From 9a64fa84a67e2e09a69330c7c9073fe4201bd036 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 16 Apr 1989 23:29:02 +0000 Subject: [PATCH 0001/4487] Initial revision --- sysdeps/vax/jmp_buf.h | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 sysdeps/vax/jmp_buf.h diff --git a/sysdeps/vax/jmp_buf.h b/sysdeps/vax/jmp_buf.h new file mode 100644 index 0000000000..46ddc6afef --- /dev/null +++ b/sysdeps/vax/jmp_buf.h @@ -0,0 +1,7 @@ +/* Define the machine-dependent type `jmp_buf'. Vax version. */ + +typedef struct + { + PTR __fp; + PTR __pc; + } jmp_buf[1]; From 8fc3406de34e6468a2ed5160e8f94e010d3b2f3c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 27 Apr 1989 23:39:20 +0000 Subject: [PATCH 0002/4487] Initial revision --- sysdeps/m68k/fpu/asin.c | 2 ++ sysdeps/m68k/fpu/atan.c | 2 ++ sysdeps/m68k/fpu/cos.c | 2 ++ sysdeps/m68k/fpu/cosh.c | 2 ++ sysdeps/m68k/fpu/log10.c | 2 ++ sysdeps/m68k/fpu/sin.c | 2 ++ sysdeps/m68k/fpu/sinh.c | 2 ++ sysdeps/m68k/fpu/sqrt.c | 2 ++ sysdeps/m68k/fpu/tan.c | 2 ++ sysdeps/m68k/fpu/tanh.c | 2 ++ 10 files changed, 20 insertions(+) create mode 100644 sysdeps/m68k/fpu/asin.c create mode 100644 sysdeps/m68k/fpu/atan.c create mode 100644 sysdeps/m68k/fpu/cos.c create mode 100644 sysdeps/m68k/fpu/cosh.c create mode 100644 sysdeps/m68k/fpu/log10.c create mode 100644 sysdeps/m68k/fpu/sin.c create mode 100644 sysdeps/m68k/fpu/sinh.c create mode 100644 sysdeps/m68k/fpu/sqrt.c create mode 100644 sysdeps/m68k/fpu/tan.c create mode 100644 sysdeps/m68k/fpu/tanh.c diff --git a/sysdeps/m68k/fpu/asin.c b/sysdeps/m68k/fpu/asin.c new file mode 100644 index 0000000000..44a8e5791b --- /dev/null +++ b/sysdeps/m68k/fpu/asin.c @@ -0,0 +1,2 @@ +#define FUNC asin +#include "acos-68881.c" diff --git a/sysdeps/m68k/fpu/atan.c b/sysdeps/m68k/fpu/atan.c new file mode 100644 index 0000000000..71ec30362a --- /dev/null +++ b/sysdeps/m68k/fpu/atan.c @@ -0,0 +1,2 @@ +#define FUNC atan +#include "acos-68881.c" diff --git a/sysdeps/m68k/fpu/cos.c b/sysdeps/m68k/fpu/cos.c new file mode 100644 index 0000000000..db6b8a4935 --- /dev/null +++ b/sysdeps/m68k/fpu/cos.c @@ -0,0 +1,2 @@ +#define FUNC cos +#include "acos-68881.c" diff --git a/sysdeps/m68k/fpu/cosh.c b/sysdeps/m68k/fpu/cosh.c new file mode 100644 index 0000000000..cc91b2ea9b --- /dev/null +++ b/sysdeps/m68k/fpu/cosh.c @@ -0,0 +1,2 @@ +#define FUNC cosh +#include "acos-68881.c" diff --git a/sysdeps/m68k/fpu/log10.c b/sysdeps/m68k/fpu/log10.c new file mode 100644 index 0000000000..9a9923da95 --- /dev/null +++ b/sysdeps/m68k/fpu/log10.c @@ -0,0 +1,2 @@ +#define FUNC log10 +#include "acos-68881.c" diff --git a/sysdeps/m68k/fpu/sin.c b/sysdeps/m68k/fpu/sin.c new file mode 100644 index 0000000000..6ee32e7986 --- /dev/null +++ b/sysdeps/m68k/fpu/sin.c @@ -0,0 +1,2 @@ +#define FUNC sin +#include "acos-68881.c" diff --git a/sysdeps/m68k/fpu/sinh.c b/sysdeps/m68k/fpu/sinh.c new file mode 100644 index 0000000000..51c8b3f922 --- /dev/null +++ b/sysdeps/m68k/fpu/sinh.c @@ -0,0 +1,2 @@ +#define FUNC sinh +#include "acos-68881.c" diff --git a/sysdeps/m68k/fpu/sqrt.c b/sysdeps/m68k/fpu/sqrt.c new file mode 100644 index 0000000000..3ba32bfcce --- /dev/null +++ b/sysdeps/m68k/fpu/sqrt.c @@ -0,0 +1,2 @@ +#define FUNC sqrt +#include "acos-68881.c" diff --git a/sysdeps/m68k/fpu/tan.c b/sysdeps/m68k/fpu/tan.c new file mode 100644 index 0000000000..2adc921247 --- /dev/null +++ b/sysdeps/m68k/fpu/tan.c @@ -0,0 +1,2 @@ +#define FUNC tan +#include "acos-68881.c" diff --git a/sysdeps/m68k/fpu/tanh.c b/sysdeps/m68k/fpu/tanh.c new file mode 100644 index 0000000000..1815c0ae5b --- /dev/null +++ b/sysdeps/m68k/fpu/tanh.c @@ -0,0 +1,2 @@ +#define FUNC tanh +#include "acos-68881.c" From 37b45064f63d516428e6434dfc3cf9f3cd7b3865 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 2 Sep 1989 08:47:33 +0000 Subject: [PATCH 0003/4487] Initial revision --- sysdeps/m68k/fpu/exp.c | 3 +++ sysdeps/m68k/fpu/fabs.c | 3 +++ sysdeps/m68k/fpu/floor.c | 3 +++ sysdeps/m68k/fpu/log.c | 3 +++ 4 files changed, 12 insertions(+) create mode 100644 sysdeps/m68k/fpu/exp.c create mode 100644 sysdeps/m68k/fpu/fabs.c create mode 100644 sysdeps/m68k/fpu/floor.c create mode 100644 sysdeps/m68k/fpu/log.c diff --git a/sysdeps/m68k/fpu/exp.c b/sysdeps/m68k/fpu/exp.c new file mode 100644 index 0000000000..2748fd351f --- /dev/null +++ b/sysdeps/m68k/fpu/exp.c @@ -0,0 +1,3 @@ +#define FUNC exp +#define OP etox +#include "acos-68881.c" diff --git a/sysdeps/m68k/fpu/fabs.c b/sysdeps/m68k/fpu/fabs.c new file mode 100644 index 0000000000..0f8feeab97 --- /dev/null +++ b/sysdeps/m68k/fpu/fabs.c @@ -0,0 +1,3 @@ +#define FUNC fabs +#define OP abs +#include "acos-68881.c" diff --git a/sysdeps/m68k/fpu/floor.c b/sysdeps/m68k/fpu/floor.c new file mode 100644 index 0000000000..bcd6be32a7 --- /dev/null +++ b/sysdeps/m68k/fpu/floor.c @@ -0,0 +1,3 @@ +#define FUNC floor +#define OP intrz +#include "acos-68881.c" diff --git a/sysdeps/m68k/fpu/log.c b/sysdeps/m68k/fpu/log.c new file mode 100644 index 0000000000..c5f5a5bf99 --- /dev/null +++ b/sysdeps/m68k/fpu/log.c @@ -0,0 +1,3 @@ +#define FUNC log +#define OP logn +#include "acos-68881.c" From 21f5db744ea5f992f540432e9c819c5e4e8c0786 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 18 Feb 1990 21:25:20 +0000 Subject: [PATCH 0004/4487] Initial revision --- sysdeps/m68k/fpu/ceil.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 sysdeps/m68k/fpu/ceil.c diff --git a/sysdeps/m68k/fpu/ceil.c b/sysdeps/m68k/fpu/ceil.c new file mode 100644 index 0000000000..d65ab0e05d --- /dev/null +++ b/sysdeps/m68k/fpu/ceil.c @@ -0,0 +1,20 @@ +/* Copyright (C) 1990 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 General Public License as published by +the Free Software Foundation; either version 1, 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with the GNU C Library; see the file COPYING. If not, write to +the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#define FUNC ceil + +#include "acos-68881.c" From 76ba4af044e195f4a6dee2810738b4ad309739f4 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 14 Sep 1990 07:40:01 +0000 Subject: [PATCH 0005/4487] entered into RCS --- sysdeps/m68k/Implies | 2 ++ sysdeps/unix/bsd/tahoe/Implies | 1 + 2 files changed, 3 insertions(+) create mode 100644 sysdeps/m68k/Implies create mode 100644 sysdeps/unix/bsd/tahoe/Implies diff --git a/sysdeps/m68k/Implies b/sysdeps/m68k/Implies new file mode 100644 index 0000000000..a67e1c2741 --- /dev/null +++ b/sysdeps/m68k/Implies @@ -0,0 +1,2 @@ +# 68k uses IEEE 754 floating point. +ieee754 diff --git a/sysdeps/unix/bsd/tahoe/Implies b/sysdeps/unix/bsd/tahoe/Implies new file mode 100644 index 0000000000..a7ecf58273 --- /dev/null +++ b/sysdeps/unix/bsd/tahoe/Implies @@ -0,0 +1 @@ +unix/bsd/vax From 9729f2614e0216a7a4e514dac0842707cbae5ad5 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 26 Sep 1990 00:00:16 +0000 Subject: [PATCH 0006/4487] Initial revision --- sysdeps/unix/bsd/sony/newsos/m68k/Implies | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/bsd/sony/newsos/m68k/Implies diff --git a/sysdeps/unix/bsd/sony/newsos/m68k/Implies b/sysdeps/unix/bsd/sony/newsos/m68k/Implies new file mode 100644 index 0000000000..2e3556a602 --- /dev/null +++ b/sysdeps/unix/bsd/sony/newsos/m68k/Implies @@ -0,0 +1 @@ +m68k/68881 From 6f6c99566c9c6c5c464280c52107f56134985d7b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 1 Oct 1990 20:46:05 +0000 Subject: [PATCH 0007/4487] Initial revision --- sysdeps/m68k/fpu/isnan.c | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sysdeps/m68k/fpu/isnan.c diff --git a/sysdeps/m68k/fpu/isnan.c b/sysdeps/m68k/fpu/isnan.c new file mode 100644 index 0000000000..f74a05b4ba --- /dev/null +++ b/sysdeps/m68k/fpu/isnan.c @@ -0,0 +1,2 @@ +#define FUNC __isnan +#include <../sysdeps/m68k/68881/isinf.c> From 19fa5b7438516c4a72466a8bec3901d67fc2bfe7 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 3 Oct 1990 00:10:50 +0000 Subject: [PATCH 0008/4487] Initial revision --- sysdeps/m68k/jmp_buf.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 sysdeps/m68k/jmp_buf.h diff --git a/sysdeps/m68k/jmp_buf.h b/sysdeps/m68k/jmp_buf.h new file mode 100644 index 0000000000..2e46bc543d --- /dev/null +++ b/sysdeps/m68k/jmp_buf.h @@ -0,0 +1,20 @@ +/* Define the machine-dependent type `jmp_buf'. Sun 3 version. */ + +typedef struct + { + + /* There are eight 4-byte data registers, but D0 is not saved. */ + long int __dregs[7]; + + /* There are six 4-byte address registers, plus the FP and SP. */ + PTR __aregs[6]; + PTR __fp; + PTR __sp; + +#if defined(__HAVE_68881__) || defined(__HAVE_FPU__) + /* There are eight floating point registers which + are saved in IEEE 96-bit extended format. */ + char __fpregs[8 * (96 / 8)]; +#endif + + } jmp_buf[1]; From 6206289a00346b73b06cea85fe20c0da05dc60b9 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 25 Oct 1990 09:16:59 +0000 Subject: [PATCH 0009/4487] entered into RCS --- sysdeps/m68k/fpu/switch/__math.h | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/m68k/fpu/switch/__math.h diff --git a/sysdeps/m68k/fpu/switch/__math.h b/sysdeps/m68k/fpu/switch/__math.h new file mode 100644 index 0000000000..c0f6966981 --- /dev/null +++ b/sysdeps/m68k/fpu/switch/__math.h @@ -0,0 +1 @@ +/* We don't want any inlines when we might not have a 68881. */ From 60293bd0ac1f928f5f543de46f4e67fb01a933b1 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 2 Nov 1990 06:11:13 +0000 Subject: [PATCH 0010/4487] entered into RCS --- sysdeps/vax/htonl.s | 30 ++++++++++++++++++++++++++++++ sysdeps/vax/htons.s | 30 ++++++++++++++++++++++++++++++ sysdeps/vax/ntohl.s | 30 ++++++++++++++++++++++++++++++ sysdeps/vax/ntohs.s | 30 ++++++++++++++++++++++++++++++ 4 files changed, 120 insertions(+) create mode 100644 sysdeps/vax/htonl.s create mode 100644 sysdeps/vax/htons.s create mode 100644 sysdeps/vax/ntohl.s create mode 100644 sysdeps/vax/ntohs.s diff --git a/sysdeps/vax/htonl.s b/sysdeps/vax/htonl.s new file mode 100644 index 0000000000..af5b96c22f --- /dev/null +++ b/sysdeps/vax/htonl.s @@ -0,0 +1,30 @@ +/* + * Copyright (c) 1983 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by the University of California, Berkeley. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)htonl.s 5.5 (Berkeley) 6/27/88" +#endif /* LIBC_SCCS and not lint */ + +/* netorder = htonl(hostorder) */ + +#include "DEFS.h" + +ENTRY(htonl, 0) + rotl $-8,4(ap),r0 + insv r0,$16,$8,r0 + movb 7(ap),r0 + ret diff --git a/sysdeps/vax/htons.s b/sysdeps/vax/htons.s new file mode 100644 index 0000000000..c500e84506 --- /dev/null +++ b/sysdeps/vax/htons.s @@ -0,0 +1,30 @@ +/* + * Copyright (c) 1983 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by the University of California, Berkeley. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)htons.s 5.5 (Berkeley) 6/27/88" +#endif /* LIBC_SCCS and not lint */ + +/* hostorder = htons(netorder) */ + +#include "DEFS.h" + +ENTRY(htons, 0) + rotl $8,4(ap),r0 + movb 5(ap),r0 + movzwl r0,r0 + ret diff --git a/sysdeps/vax/ntohl.s b/sysdeps/vax/ntohl.s new file mode 100644 index 0000000000..0fcaa2f8e4 --- /dev/null +++ b/sysdeps/vax/ntohl.s @@ -0,0 +1,30 @@ +/* + * Copyright (c) 1983 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by the University of California, Berkeley. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)ntohl.s 5.5 (Berkeley) 6/27/88" +#endif /* LIBC_SCCS and not lint */ + +/* hostorder = ntohl(netorder) */ + +#include "DEFS.h" + +ENTRY(ntohl, 0) + rotl $-8,4(ap),r0 + insv r0,$16,$8,r0 + movb 7(ap),r0 + ret diff --git a/sysdeps/vax/ntohs.s b/sysdeps/vax/ntohs.s new file mode 100644 index 0000000000..626a37bf09 --- /dev/null +++ b/sysdeps/vax/ntohs.s @@ -0,0 +1,30 @@ +/* + * Copyright (c) 1983 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by the University of California, Berkeley. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)ntohs.s 5.5 (Berkeley) 6/27/88" +#endif /* LIBC_SCCS and not lint */ + +/* hostorder = ntohs(netorder) */ + +#include "DEFS.h" + +ENTRY(ntohs, 0) + rotl $8,4(ap),r0 + movb 5(ap),r0 + movzwl r0,r0 + ret From db442a6db5010864daf01d4c6413988269213fb5 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 5 Dec 1990 04:02:48 +0000 Subject: [PATCH 0011/4487] Initial revision --- sysdeps/tahoe/Implies | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sysdeps/tahoe/Implies diff --git a/sysdeps/tahoe/Implies b/sysdeps/tahoe/Implies new file mode 100644 index 0000000000..7277f3d7f9 --- /dev/null +++ b/sysdeps/tahoe/Implies @@ -0,0 +1,2 @@ +../math/bsd/tahoe +vax From 9bbcfdb0c7804ba25a06ee20b73cff2904a091f2 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 7 Dec 1990 05:49:36 +0000 Subject: [PATCH 0012/4487] Initial revision --- sysdeps/m68k/fpu/expm1.c | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sysdeps/m68k/fpu/expm1.c diff --git a/sysdeps/m68k/fpu/expm1.c b/sysdeps/m68k/fpu/expm1.c new file mode 100644 index 0000000000..88a34dba66 --- /dev/null +++ b/sysdeps/m68k/fpu/expm1.c @@ -0,0 +1,2 @@ +#define FUNC expm1 +#include <../sysdeps/m68k/68881/acos.c> From 1ae77d2b200f2dcaeea37dcc81737091949c1924 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 7 Dec 1990 06:56:38 +0000 Subject: [PATCH 0013/4487] Formerly tahoe/Implies.~3~ --- sysdeps/tahoe/Implies | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/tahoe/Implies b/sysdeps/tahoe/Implies index 7277f3d7f9..29a36ec255 100644 --- a/sysdeps/tahoe/Implies +++ b/sysdeps/tahoe/Implies @@ -1,2 +1,2 @@ -../math/bsd/tahoe +$(bsdmath)tahoe vax From f57cb2b9fc1dc61c8c0ce234267fc6618f79b91d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 14 Dec 1990 09:30:10 +0000 Subject: [PATCH 0014/4487] Formerly m68k/jmp_buf.h.~4~ --- sysdeps/m68k/jmp_buf.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sysdeps/m68k/jmp_buf.h b/sysdeps/m68k/jmp_buf.h index 2e46bc543d..807fcb8c10 100644 --- a/sysdeps/m68k/jmp_buf.h +++ b/sysdeps/m68k/jmp_buf.h @@ -2,7 +2,6 @@ typedef struct { - /* There are eight 4-byte data registers, but D0 is not saved. */ long int __dregs[7]; @@ -17,4 +16,4 @@ typedef struct char __fpregs[8 * (96 / 8)]; #endif - } jmp_buf[1]; + } __jmp_buf[1]; From 6506fcd3732a579a0c54678397924d0322b0349c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 14 Dec 1990 09:30:27 +0000 Subject: [PATCH 0015/4487] entered into RCS --- sysdeps/vax/jmp_buf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/vax/jmp_buf.h b/sysdeps/vax/jmp_buf.h index 46ddc6afef..7adecd9a17 100644 --- a/sysdeps/vax/jmp_buf.h +++ b/sysdeps/vax/jmp_buf.h @@ -4,4 +4,4 @@ typedef struct { PTR __fp; PTR __pc; - } jmp_buf[1]; + } __jmp_buf[1]; From d2186fdb660589c1c0c22b181dd7be4b96a6fdfe Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 18 Jan 1991 09:59:14 +0000 Subject: [PATCH 0016/4487] entered into RCS --- sysdeps/unix/bsd/sun/sethostid.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/bsd/sun/sethostid.c diff --git a/sysdeps/unix/bsd/sun/sethostid.c b/sysdeps/unix/bsd/sun/sethostid.c new file mode 100644 index 0000000000..a8951fa7d5 --- /dev/null +++ b/sysdeps/unix/bsd/sun/sethostid.c @@ -0,0 +1 @@ +#include From 6c67a5fa97896bb05ea929b8c0fc4fac24b6eb93 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 30 Jan 1991 10:00:32 +0000 Subject: [PATCH 0017/4487] Initial revision --- sysdeps/m68k/fpu/acos.c | 31 +++++++++++++++++++++++++++++++ sysdeps/m68k/fpu/drem.c | 28 ++++++++++++++++++++++++++++ sysdeps/m68k/fpu/fmod.c | 26 ++++++++++++++++++++++++++ sysdeps/m68k/fpu/frexp.c | 26 ++++++++++++++++++++++++++ sysdeps/m68k/fpu/isinf.c | 31 +++++++++++++++++++++++++++++++ sysdeps/m68k/fpu/ldexp.c | 26 ++++++++++++++++++++++++++ sysdeps/m68k/fpu/pow.c | 26 ++++++++++++++++++++++++++ sysdeps/unix/bsd/tahoe/sysdep.h | 22 ++++++++++++++++++++++ 8 files changed, 216 insertions(+) create mode 100644 sysdeps/m68k/fpu/acos.c create mode 100644 sysdeps/m68k/fpu/drem.c create mode 100644 sysdeps/m68k/fpu/fmod.c create mode 100644 sysdeps/m68k/fpu/frexp.c create mode 100644 sysdeps/m68k/fpu/isinf.c create mode 100644 sysdeps/m68k/fpu/ldexp.c create mode 100644 sysdeps/m68k/fpu/pow.c create mode 100644 sysdeps/unix/bsd/tahoe/sysdep.h diff --git a/sysdeps/m68k/fpu/acos.c b/sysdeps/m68k/fpu/acos.c new file mode 100644 index 0000000000..c9968979ed --- /dev/null +++ b/sysdeps/m68k/fpu/acos.c @@ -0,0 +1,31 @@ +/* Copyright (C) 1991 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 General Public License as published by +the Free Software Foundation; either version 1, 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with the GNU C Library; see the file COPYING. If not, write to +the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#include +#define __NO_MATH_INLINES +#include + +#ifndef FUNC +#define FUNC acos +#endif + + +double +DEFUN(FUNC, (x), double x) +{ + return __m81_u(FUNC)(x); +} diff --git a/sysdeps/m68k/fpu/drem.c b/sysdeps/m68k/fpu/drem.c new file mode 100644 index 0000000000..a9c504dad8 --- /dev/null +++ b/sysdeps/m68k/fpu/drem.c @@ -0,0 +1,28 @@ +/* Copyright (C) 1991 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 General Public License as published by +the Free Software Foundation; either version 1, 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with the GNU C Library; see the file COPYING. If not, write to +the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#include +#define __NO_MATH_INLINES +#include + +#undef drem + +double +DEFUN(drem, (x, y), double x AND double y) +{ + return __drem(x, y); +} diff --git a/sysdeps/m68k/fpu/fmod.c b/sysdeps/m68k/fpu/fmod.c new file mode 100644 index 0000000000..c8caabfef9 --- /dev/null +++ b/sysdeps/m68k/fpu/fmod.c @@ -0,0 +1,26 @@ +/* Copyright (C) 1991 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 General Public License as published by +the Free Software Foundation; either version 1, 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with the GNU C Library; see the file COPYING. If not, write to +the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#include +#define __NO_MATH_INLINES +#include + +double +DEFUN(fmod, (x, y), double x AND double y) +{ + return __fmod(x, y); +} diff --git a/sysdeps/m68k/fpu/frexp.c b/sysdeps/m68k/fpu/frexp.c new file mode 100644 index 0000000000..6ab7c5b937 --- /dev/null +++ b/sysdeps/m68k/fpu/frexp.c @@ -0,0 +1,26 @@ +/* Copyright (C) 1991 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 General Public License as published by +the Free Software Foundation; either version 1, 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with the GNU C Library; see the file COPYING. If not, write to +the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#include +#define __NO_MATH_INLINES +#include + +double +DEFUN(frexp, (value, expptr), double value AND int *expptr) +{ + return __frexp(value, expptr); +} diff --git a/sysdeps/m68k/fpu/isinf.c b/sysdeps/m68k/fpu/isinf.c new file mode 100644 index 0000000000..3d336029b1 --- /dev/null +++ b/sysdeps/m68k/fpu/isinf.c @@ -0,0 +1,31 @@ +/* Copyright (C) 1991 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 General Public License as published by +the Free Software Foundation; either version 1, 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with the GNU C Library; see the file COPYING. If not, write to +the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#include +#define __NO_MATH_INLINES +#include + +#ifndef FUNC +#define FUNC __isinf +#endif + + +int +DEFUN(FUNC, (x), double x) +{ + return __m81_u(FUNC)(x); +} diff --git a/sysdeps/m68k/fpu/ldexp.c b/sysdeps/m68k/fpu/ldexp.c new file mode 100644 index 0000000000..0ecba72c7f --- /dev/null +++ b/sysdeps/m68k/fpu/ldexp.c @@ -0,0 +1,26 @@ +/* Copyright (C) 1991 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 General Public License as published by +the Free Software Foundation; either version 1, 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with the GNU C Library; see the file COPYING. If not, write to +the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#include +#define __NO_MATH_INLINES +#include + +double +DEFUN(ldexp, (x, exp), double x AND int exp) +{ + return __ldexp(x, exp); +} diff --git a/sysdeps/m68k/fpu/pow.c b/sysdeps/m68k/fpu/pow.c new file mode 100644 index 0000000000..9273c8043b --- /dev/null +++ b/sysdeps/m68k/fpu/pow.c @@ -0,0 +1,26 @@ +/* Copyright (C) 1991 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 General Public License as published by +the Free Software Foundation; either version 1, 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with the GNU C Library; see the file COPYING. If not, write to +the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#include +#define __NO_MATH_INLINES +#include + +double +DEFUN(pow, (x, y), double x AND double y) +{ + return __pow(x, y); +} diff --git a/sysdeps/unix/bsd/tahoe/sysdep.h b/sysdeps/unix/bsd/tahoe/sysdep.h new file mode 100644 index 0000000000..a115f43467 --- /dev/null +++ b/sysdeps/unix/bsd/tahoe/sysdep.h @@ -0,0 +1,22 @@ +/* Copyright (C) 1991 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 General Public License as published by +the Free Software Foundation; either version 1, 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with the GNU C Library; see the file COPYING. If not, write to +the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + +/* The Tahoe is just like the Vax, except the + `chmk' instruction is called `kcall'. */ + +#define __MAGIC_INSN "kcall" +#include "../sysdeps/unix/bsd/vax/sysdep.h" From 65f624f521f191f502cc8f5d41a9cb4f1c8d4142 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 27 Feb 1991 05:24:58 +0000 Subject: [PATCH 0018/4487] entered into RCS --- sysdeps/vax/DEFS.h | 47 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 sysdeps/vax/DEFS.h diff --git a/sysdeps/vax/DEFS.h b/sysdeps/vax/DEFS.h new file mode 100644 index 0000000000..5e20bc8e29 --- /dev/null +++ b/sysdeps/vax/DEFS.h @@ -0,0 +1,47 @@ +/* + * Copyright (c) 1982 The Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that: (1) source distributions retain this entire copyright + * notice and comment, and (2) distributions including binaries display + * the following acknowledgement: ``This product includes software + * developed by the University of California, Berkeley and its contributors'' + * in the documentation or other materials provided with the distribution + * and in all advertising materials mentioning features or use of this + * software. Neither the name of the University nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * @(#)DEFS.h 5.3 (Berkeley) 6/1/90 + */ + +#define R0 0x001 +#define R1 0x002 +#define R2 0x004 +#define R3 0x008 +#define R4 0x010 +#define R5 0x020 +#define R6 0x040 +#define R7 0x080 +#define R8 0x100 +#define R9 0x200 +#define R10 0x400 +#define R11 0x800 + +#ifdef PROF +#define ENTRY(x, regs) \ + .globl _/**/x; .align 2; _/**/x: .word regs; \ + .data; 1:; .long 0; .text; moval 1b,r0; jsb mcount +#define ASENTRY(x, regs) \ + .globl x; .align 2; x: .word regs; \ + .data; 1:; .long 0; .text; moval 1b,r0; jsb mcount +#else +#define ENTRY(x, regs) \ + .globl _/**/x; .align 2; _/**/x: .word regs +#define ASENTRY(x, regs) \ + .globl x; .align 2; x: .word regs +#endif From 98e4049505275e389e8317f3ee65e187538f56cd Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 1 Apr 1991 22:24:10 +0000 Subject: [PATCH 0019/4487] Initial revision --- sysdeps/unix/bsd/hp/m68k/start.c | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 sysdeps/unix/bsd/hp/m68k/start.c diff --git a/sysdeps/unix/bsd/hp/m68k/start.c b/sysdeps/unix/bsd/hp/m68k/start.c new file mode 100644 index 0000000000..4b321562d4 --- /dev/null +++ b/sysdeps/unix/bsd/hp/m68k/start.c @@ -0,0 +1,10 @@ +/* hp300 4.3 BSD starts at 4, rather than 0, when the start address is 0. + Go figure. */ +asm(".globl __start\n" + "__start: .long 0"); + +#define _start __start0 + +#define DUMMIES dummy0 + +#include From 433b6bacf03b7934374dec5c439b6439a48dc1c2 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 12 Apr 1991 22:08:09 +0000 Subject: [PATCH 0020/4487] Initial revision --- sysdeps/i860/memcopy.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 sysdeps/i860/memcopy.h diff --git a/sysdeps/i860/memcopy.h b/sysdeps/i860/memcopy.h new file mode 100644 index 0000000000..32d56ed990 --- /dev/null +++ b/sysdeps/i860/memcopy.h @@ -0,0 +1,32 @@ +/* Copyright (C) 1991 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 General Public License as published by +the Free Software Foundation; either version 1, 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with the GNU C Library; see the file COPYING. If not, write to +the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#include + +#if 0 +#undef MERGE +/* In order to make this work properly, an 's' constraint need to be added + to tm-i860.h, to mean the SC register. */ +#define MERGE(w0, sh_1, w1, sh_2) \ + ({ \ + unsigned int __merge; \ + asm("shrd %2,%1,%0" : \ + "=r" (__merge) : \ + "r" (w0), "r" (w1), "s" (sh_1)); \ + __merge; \ + }) +#endif From deac00f40f4ea52ecdf894e863764a7691ff293f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 10 Jun 1991 21:50:48 +0000 Subject: [PATCH 0021/4487] Initial revision --- sysdeps/unix/bsd/hp/m68k/wait3.S | 36 ++++++++++++++++++++++++++++++++ sysdeps/unix/bsd/vax/pipe.S | 26 +++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 sysdeps/unix/bsd/hp/m68k/wait3.S create mode 100644 sysdeps/unix/bsd/vax/pipe.S diff --git a/sysdeps/unix/bsd/hp/m68k/wait3.S b/sysdeps/unix/bsd/hp/m68k/wait3.S new file mode 100644 index 0000000000..b1dcef0804 --- /dev/null +++ b/sysdeps/unix/bsd/hp/m68k/wait3.S @@ -0,0 +1,36 @@ +/* Copyright (C) 1991 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +.globl ___wait3 +___wait3: + movel #SYS_wait, d0 + /* Set all condition codes to tell the kernel this is wait3. */ + movew #31, ccr + trap #0 + bcs error + + tstl sp@(4) + beq 1f + moveal sp@(4), a0 + movel d1, a0@ +1: rts + +.globl syscall_error +error: jmp syscall_error diff --git a/sysdeps/unix/bsd/vax/pipe.S b/sysdeps/unix/bsd/vax/pipe.S new file mode 100644 index 0000000000..c47bdd8598 --- /dev/null +++ b/sysdeps/unix/bsd/vax/pipe.S @@ -0,0 +1,26 @@ +/* Copyright (C) 1991 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +SYSCALL (pipe) + movl 4(ap), r2 + movl r0, (r2)+ + movl r1, (r2) + clrl r0 + ret From cc0501b97c93f7e6b3fefebb56e509a98f0cc230 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 10 Jun 1991 22:54:16 +0000 Subject: [PATCH 0022/4487] Initial revision --- sysdeps/unix/bsd/vax/wait3.S | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 sysdeps/unix/bsd/vax/wait3.S diff --git a/sysdeps/unix/bsd/vax/wait3.S b/sysdeps/unix/bsd/vax/wait3.S new file mode 100644 index 0000000000..0d427da33b --- /dev/null +++ b/sysdeps/unix/bsd/vax/wait3.S @@ -0,0 +1,34 @@ +/* Copyright (C) 1991 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +.globl ___wait3 +___wait3: + /* Set all condition codes to tell the kernel this is wait3. */ + bispsw $15 + chmk $SYS_wait + bcs error + + movl 4(ap), r2 + beq 1f + movl r1, (r2) +1: ret + +.globl syscall_error +error: jmp syscall_error From 886d17ccf6d6568299ac6c2c030a649e2ac8e7e3 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 10 Jun 1991 23:58:11 +0000 Subject: [PATCH 0023/4487] Formerly unix/bsd/vax/__pipe.S.~2~ --- sysdeps/unix/bsd/vax/pipe.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/bsd/vax/pipe.S b/sysdeps/unix/bsd/vax/pipe.S index c47bdd8598..67c6e22c03 100644 --- a/sysdeps/unix/bsd/vax/pipe.S +++ b/sysdeps/unix/bsd/vax/pipe.S @@ -18,7 +18,7 @@ Cambridge, MA 02139, USA. */ #include -SYSCALL (pipe) +SYSCALL__ (pipe) movl 4(ap), r2 movl r0, (r2)+ movl r1, (r2) From b84d36e04f96355dffa7daab48b4237040ef3b38 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 10 Jun 1991 23:59:04 +0000 Subject: [PATCH 0024/4487] Initial revision --- sysdeps/unix/bsd/vax/brk.S | 38 +++++++++++++++++++++++++++++++++++++ sysdeps/unix/bsd/vax/wait.S | 25 ++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 sysdeps/unix/bsd/vax/brk.S create mode 100644 sysdeps/unix/bsd/vax/wait.S diff --git a/sysdeps/unix/bsd/vax/brk.S b/sysdeps/unix/bsd/vax/brk.S new file mode 100644 index 0000000000..eb583a4d1d --- /dev/null +++ b/sysdeps/unix/bsd/vax/brk.S @@ -0,0 +1,38 @@ +/* Copyright (C) 1991 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#ifndef SYS_brk +#define SYS_brk 17 +#endif + +.data +.globl ___curbrk +___curbrk: +#ifdef __GNU_STAB__ + .long ___end +#else + .long _end +#endif + +.text +SYSCALL__ (brk) + movl r0, ___curbrk + clrl r0 + ret diff --git a/sysdeps/unix/bsd/vax/wait.S b/sysdeps/unix/bsd/vax/wait.S new file mode 100644 index 0000000000..ff88ec150e --- /dev/null +++ b/sysdeps/unix/bsd/vax/wait.S @@ -0,0 +1,25 @@ +/* Copyright (C) 1991 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +SYSCALL (wait) + movl 4(ap), r2 + beq 1f + movl r1, (r2) +1: ret From 1c3277132cffbf786817ad3b02405c9a0d7e3012 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 11 Jun 1991 01:20:19 +0000 Subject: [PATCH 0025/4487] Formerly unix/bsd/sony/newsos/m68k/Implies.~2~ --- sysdeps/unix/bsd/sony/newsos/m68k/Implies | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/bsd/sony/newsos/m68k/Implies b/sysdeps/unix/bsd/sony/newsos/m68k/Implies index 2e3556a602..2fae0d847d 100644 --- a/sysdeps/unix/bsd/sony/newsos/m68k/Implies +++ b/sysdeps/unix/bsd/sony/newsos/m68k/Implies @@ -1 +1,2 @@ -m68k/68881 +# A news800 is almost exactly like an hp300 +unix/bsd/hp9k3bsd From 83a57513860d30d5a9c8e0078a1b7ecf447a3c88 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 11 Jun 1991 01:20:23 +0000 Subject: [PATCH 0026/4487] entered into RCS --- sysdeps/unix/bsd/tahoe/sysdep.h | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/sysdeps/unix/bsd/tahoe/sysdep.h b/sysdeps/unix/bsd/tahoe/sysdep.h index a115f43467..b875906320 100644 --- a/sysdeps/unix/bsd/tahoe/sysdep.h +++ b/sysdeps/unix/bsd/tahoe/sysdep.h @@ -1,22 +1,5 @@ -/* Copyright (C) 1991 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 General Public License as published by -the Free Software Foundation; either version 1, 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 General Public License for more details. - -You should have received a copy of the GNU General Public License -along with the GNU C Library; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - /* The Tahoe is just like the Vax, except the `chmk' instruction is called `kcall'. */ -#define __MAGIC_INSN "kcall" -#include "../sysdeps/unix/bsd/vax/sysdep.h" +#define chmk kcall +#include From 71bc903578cb388c624c48a499f733863f1bc531 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 12 Jun 1991 18:26:17 +0000 Subject: [PATCH 0027/4487] entered into RCS --- sysdeps/i860/memcopy.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/sysdeps/i860/memcopy.h b/sysdeps/i860/memcopy.h index 32d56ed990..9f81326c97 100644 --- a/sysdeps/i860/memcopy.h +++ b/sysdeps/i860/memcopy.h @@ -1,19 +1,20 @@ /* Copyright (C) 1991 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 General Public License as published by -the Free Software Foundation; either version 1, or (at your option) -any later version. +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 +published by the Free Software Foundation; either version 2 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 General Public License for more details. +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. -You should have received a copy of the GNU General Public License -along with the GNU C Library; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ #include From c8b2bec86f98f078708871033db55791aa682e35 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 12 Jun 1991 18:27:19 +0000 Subject: [PATCH 0028/4487] Formerly m68k/fpu/__drem.c.~2~ --- sysdeps/m68k/fpu/drem.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/sysdeps/m68k/fpu/drem.c b/sysdeps/m68k/fpu/drem.c index a9c504dad8..30ad2443a6 100644 --- a/sysdeps/m68k/fpu/drem.c +++ b/sysdeps/m68k/fpu/drem.c @@ -1,19 +1,20 @@ /* Copyright (C) 1991 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 General Public License as published by -the Free Software Foundation; either version 1, or (at your option) -any later version. +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 +published by the Free Software Foundation; either version 2 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 General Public License for more details. +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. -You should have received a copy of the GNU General Public License -along with the GNU C Library; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ #include #define __NO_MATH_INLINES From 9a977fa060dfa22e48bed4a7cf97799f85e4ec9e Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 12 Jun 1991 18:33:01 +0000 Subject: [PATCH 0029/4487] Initial revision --- sysdeps/am29k/ffs.c | 34 ++++++ sysdeps/m68k/ffs.c | 42 +++++++ sysdeps/m68k/fpu/__math.h | 183 +++++++++++++++++++++++++++++ sysdeps/m68k/fpu/atan2.c | 68 +++++++++++ sysdeps/m68k/fpu/logb.c | 37 ++++++ sysdeps/m68k/fpu/switch/68881-sw.h | 70 +++++++++++ sysdeps/m68k/fpu/switch/switch.c | 92 +++++++++++++++ sysdeps/m88k/ffs.c | 36 ++++++ sysdeps/rs6000/ffs.c | 33 ++++++ 9 files changed, 595 insertions(+) create mode 100644 sysdeps/am29k/ffs.c create mode 100644 sysdeps/m68k/ffs.c create mode 100644 sysdeps/m68k/fpu/__math.h create mode 100644 sysdeps/m68k/fpu/atan2.c create mode 100644 sysdeps/m68k/fpu/logb.c create mode 100644 sysdeps/m68k/fpu/switch/68881-sw.h create mode 100644 sysdeps/m68k/fpu/switch/switch.c create mode 100644 sysdeps/m88k/ffs.c create mode 100644 sysdeps/rs6000/ffs.c diff --git a/sysdeps/am29k/ffs.c b/sysdeps/am29k/ffs.c new file mode 100644 index 0000000000..6e0846c979 --- /dev/null +++ b/sysdeps/am29k/ffs.c @@ -0,0 +1,34 @@ +/* ffs -- find first set bit in a word, counted from least significant end. + For Amd 290x0. + Copyright (C) 1991 Free Software Foundation, Inc. + Contributed by Torbjorn Granlund (tege@sics.se). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include + +#undef ffs + +int +DEFUN(ffs, (x), int x) +{ + int cnt; + + asm ("clz %0,%1" : "=r" (cnt) : "r" (x & -x)); + + return 32 - cnt; +} diff --git a/sysdeps/m68k/ffs.c b/sysdeps/m68k/ffs.c new file mode 100644 index 0000000000..d54b2faaff --- /dev/null +++ b/sysdeps/m68k/ffs.c @@ -0,0 +1,42 @@ +/* ffs -- find first set bit in a word, counted from least significant end. + For mc68020, mc68030, mc68040. + Copyright (C) 1991 Free Software Foundation, Inc. + Contributed by Torbjorn Granlund (tege@sics.se). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include + +#undef ffs + +#if defined(__mc68020__) || defined(mc68020) + +int +DEFUN(ffs, (x), int x) +{ + int cnt; + + asm("bfffo %1{#0:#0},%0" : "=d" (cnt) : "rm" (x & -x)); + + return 32 - cnt; +} + +#else + +#include + +#endif diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h new file mode 100644 index 0000000000..0fd80cea36 --- /dev/null +++ b/sysdeps/m68k/fpu/__math.h @@ -0,0 +1,183 @@ +/* Copyright (C) 1991 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifdef __GNUC__ + +/* IGNORE($ */ +#ifdef __STDC__ +/* $) IFANSI($ */ +#define __m81_s(x) #x +#define __m81_ul(x) __ ## x +/* $) IGNORE($ */ +#else +/* $) IFTRAD($ */ +#define __m81_s(x) "x" +#define __m81_ul(x) __/**/x +/* $) IGNORE($ */ +#endif +/* $) */ + +#ifdef __NO_MATH_INLINES +#define __m81_u(x) __m81_ul(x) +#else +#define __m81_u(x) x +#define __MATH_INLINES 1 +#endif + +#define __inline_mathop2(func, op) \ + extern __inline __const double \ + __m81_u(func)(double __mathop_x) \ + { \ + double __result; \ + __asm("f" __m81_s(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x)); \ + return __result; \ + } +#define __inline_mathop(op) __inline_mathop2(op, op) + +__inline_mathop(acos) +__inline_mathop(asin) +__inline_mathop(atan) +__inline_mathop(cos) +__inline_mathop(sin) +__inline_mathop(tan) +__inline_mathop(cosh) +__inline_mathop(sinh) +__inline_mathop(tanh) +__inline_mathop2(exp, etox) +__inline_mathop2(fabs, abs) +__inline_mathop(log10) +__inline_mathop2(log, logn) +__inline_mathop2(floor, intrz) +__inline_mathop(sqrt) + +#ifdef __USE_MISC +__inline_mathop2(rint, int) +__inline_mathop2(expm1, etoxm1) +__inline_mathop2(log1p, lognp1) +__inline_mathop(atanh) +#endif + +extern __inline __const double +__m81_u(__drem)(double __x, double __y) +{ + double __result; + __asm("frem%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); + return __result; +} + +extern __inline __const double +__m81_u(__scalb)(double __x, int __n) +{ + double __result; + if (__x == 0.0) + __result = __x; + else + __asm("fscale%.l %1, %0" : "=f" (__result) : "g" (__n), "0" (__x)); + return __result; +} + +extern __inline __const double +__m81_u(ldexp)(double __x, int __e) +{ + double __result; + double __double_e = (double) __e; + __asm("fscale%.x %1, %0" : "=f" (__result) : "f" (__double_e), "0" (__x)); + return __result; +} + +extern __inline __const double +__m81_u(fmod)(double __x, double __y) +{ + double __result; + __asm("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); + return __result; +} + +extern __inline double +__m81_u(frexp)(double __value, int *__expptr) +{ + double __mantissa, __exponent; + __asm("fgetexp%.x %1, %0" : "=f" (__exponent) : "f" (__value)); + __asm("fgetman%.x %1, %0" : "=f" (__mantissa) : "f" (__value)); + *__expptr = (int) __exponent; + return __mantissa; +} + +extern __inline __const double +__m81_u(pow)(double __x, double __y) +{ + double __result; + if (__y == 0.0 || __x == 1.0) + __result = 1.0; + else if (__y == 1.0) + __result = __x; + else if (__y == 2.0) + __result = __x * __x; + else if (__x == 10.0) + __asm("ftentox%.x %1, %0" : "=f" (__result) : "f" (__y)); + else if (__x == 2.0) + __asm("ftwotox%.x %1, %0" : "=f" (__result) : "f" (__y)); + else + __result = __m81_u(exp)(__y * __m81_u(log)(__x)); + return __result; +} + +extern __inline __const double +__m81_u(ceil)(double __x) +{ + double __result; + unsigned long int __ctrl_reg; + __asm("fmove%.l fpcr, %0" : "=g" (__ctrl_reg)); + /* Set rounding towards positive infinity. */ + __asm("fmove%.l %0, fpcr" : /* No outputs. */ : "g" (__ctrl_reg | 0x30)); + /* Convert X to an integer, using +Inf rounding. */ + __asm("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); + /* Restore the previous rounding mode. */ + __asm("fmove%.l %0, fpcr" : /* No outputs. */ : "g" (__ctrl_reg)); + return __result; +} + +extern __inline double +__m81_u(modf)(double __value, double *__iptr) +{ + double __modf_int = __m81_u(floor)(__value); + *__iptr = __modf_int; + return __value - __modf_int; +} + +extern __inline int +__m81_u(__isinf)(double __value) +{ + /* There is no branch-condition for infinity, + so we must extract and examine the condition codes manually. */ + unsigned long int __fpsr; + __asm("ftst%.x %1\n" + "fmove%.l fpsr, %0" : "=g" (__fpsr) : "f" (__value)); + return (__fpsr & (2 << (3 * 8))) ? (__value < 0 ? -1 : 1) : 0; +} + +extern __inline int +__m81_u(__isnan)(double __value) +{ + char __result; + __asm("ftst%.x %1\n" + "fsun %0" : "=g" (__result) : "f" (__value)); + return __result; +} + +#endif /* GCC. */ diff --git a/sysdeps/m68k/fpu/atan2.c b/sysdeps/m68k/fpu/atan2.c new file mode 100644 index 0000000000..1dfffe7fd8 --- /dev/null +++ b/sysdeps/m68k/fpu/atan2.c @@ -0,0 +1,68 @@ +/* Copyright (C) 1991 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include + +static CONST double +PIo4 = 7.8539816339744827900E-1 , /*Hex 2^ -1 * 1.921FB54442D18 */ +PIo2 = 1.5707963267948965580E0 , /*Hex 2^ 0 * 1.921FB54442D18 */ +PI = 3.1415926535897931160E0 ; /*Hex 2^ 1 * 1.921FB54442D18 */ + +double +DEFUN(atan2, (y, x), double y AND double x) +{ + static CONST double one = 1.0, zero = 0.0; + double signx, signy; + double pi; + + if (__isnan(x)) + return x; + if (__isnan(y)) + return y; + + signy = __copysign(one, y); + signx = __copysign(one, x); + + asm("fmovecr%.x %1, %0" : "=f" (pi) : "i" (0)); + + if (y == zero) + return signx == one ? y : __copysign(pi, signy); + + if (x == zero) + return __copysign(PIo2, signy); + + if (__isinf(x)) + { + if (__isinf(y)) + return __copysign(signx == one ? PIo4 : 3 * PIo4, signy); + else + return __copysign(signx == one ? zero : pi, signy); + } + + if (__isinf(y)) + return __copysign(PIo2, signy); + + y = fabs(y); + + if (x < 0.0) + /* X is negative. */ + return __copysign(pi - atan(y / -x), signy); + + return __copysign(atan(y / x), signy); +} diff --git a/sysdeps/m68k/fpu/logb.c b/sysdeps/m68k/fpu/logb.c new file mode 100644 index 0000000000..614581e786 --- /dev/null +++ b/sysdeps/m68k/fpu/logb.c @@ -0,0 +1,37 @@ +/* Copyright (C) 1991 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include + +/* Return the base 2 signed integral exponent of X. */ +double +DEFUN(__logb, (x), double x) +{ + if (__isnan(x)) + return x; + if (__isinf(x)) + return fabs(x); + + if (x == 0.0) + asm("flog2%.x %0" : "=f" (x) : "0" (x)); + else + asm("fgetexp%.x %0" : "=f" (x) : "0" (x)); + + return x; +} diff --git a/sysdeps/m68k/fpu/switch/68881-sw.h b/sysdeps/m68k/fpu/switch/68881-sw.h new file mode 100644 index 0000000000..6447c8617b --- /dev/null +++ b/sysdeps/m68k/fpu/switch/68881-sw.h @@ -0,0 +1,70 @@ +/* Copyright (C) 1991 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifndef _68881_SWITCH_H + +#define _68881_SWITCH_H 1 + + +/* This is the format of the data at the code label for a function which + wants to switch depending on whether or not a 68881 is present. + + Initially, `insn' is a `jsr' instruction, and `target' is __68881_switch. + The first time such a function is called, __68881_switch determines whether + or not a 68881 is present, and modifies the function accordingly. + Then `insn' is a `jmp' instruction, and `target' is the value of `fpu' + if there is 68881, or the value of `soft' if not. */ + +struct switch_caller + { + unsigned short int insn; /* The `jsr' or `jmp' instruction. */ + PTR target; /* The target of the instruction. */ + PTR soft; /* The address of the soft function. */ + PTR fpu; /* The address of the 68881 function. */ + }; + +/* These are opcodes (values for `insn', above) for `jmp' and `jsr' + instructions, respectively, to 32-bit absolute addresses. */ +#define JMP 0x4ef9 +#define JSR 0x4eb9 + + +/* Function to determine whether or not a 68881 is available, + and modify its caller (which must be a `struct switch_caller', above, + in data space) to use the appropriate version. */ +extern void EXFUN(__68881_switch, (int __dummy)); + + +#ifdef __STDC__ +#define __paste(a, b) a ## b +#else +#define __paste(a, b) a/**/b +#endif + +/* Define FUNCTION as a `struct switch_caller' which will call + `__FUNCTION_68881' if a 68881 is present, and `__FUNCTION_soft' if not. +#define switching_function(FUNCTION) \ + struct switch_caller FUNCTION = \ + { \ + JSR, (PTR) __68881_switch, \ + __paste(__paste(__, FUNCTION), _soft), \ + __paste(__paste(__, FUNCTION), _68881) \ + } + + +#endif /* 68881-switch.h */ diff --git a/sysdeps/m68k/fpu/switch/switch.c b/sysdeps/m68k/fpu/switch/switch.c new file mode 100644 index 0000000000..bba52f2cb8 --- /dev/null +++ b/sysdeps/m68k/fpu/switch/switch.c @@ -0,0 +1,92 @@ +/* Copyright (C) 1991 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include <68881-switch.h> + + +/* The signal that is sent when a 68881 instruction + is executed and there is no 68881. */ +#ifndef TRAPSIG +#define TRAPSIG SIGILL +#endif + +/* Nonzero if we have determined whether or not there is a 68881. */ +static int tested_fpu = 0; + +/* Nonzero if we have a 68881. */ +static int have_fpu; + + +/* Signal handler for the trap that happens if we don't have a 68881. */ +static void +DEFUN(trap, (sig), int sig) +{ + have_fpu = 0; +} + +/* This function is called by functions that want to switch. + The calling function must be a `struct switch_caller' in data space. + It determines whether a 68881 is present, and modifies its caller + to be a static jump to either the 68881 version or the soft version. + It then returns into the function it has chosen to do the work. */ +void +DEFUN(__68881_switch, (dummy), int dummy) +{ + PTR *return_address_location = &((PTR *) &dummy)[-1]; + struct switch_caller *CONST caller + = (struct switch_caller *) (((short int *) *return_address_location) - 1); + + if (!tested_fpu) + { + /* Figure out whether or not we have a 68881. */ + __sighandler_t handler = signal(TRAPSIG, trap); + if (handler == SIG_ERR) + /* We can't figure it out, so assume we don't have a 68881. + This assumption will never cause us any problems other than + lost performance, while the reverse assumption could cause + the program to crash. */ + have_fpu = 0; + else + { + /* We set `have_fpu' to nonzero, and then execute a 68881 + no-op instruction. If we have a 68881, this will do nothing. + If we don't have one, this will trap and the signal handler + will clear `have_fpu'. */ + have_fpu = 1; + asm("fnop"); + + /* Restore the old signal handler. */ + (void) signal(TRAPSIG, handler); + } + + /* Say that we've tested for a 68881, so we only do it once. */ + tested_fpu = 1; + } + + /* Modify the caller to be a jump to the appropriate address. */ + caller->insn = JMP; + caller->target = have_fpu ? caller->fpu : caller->soft; + + /* Make the address we will return to be the target we have chosen. + Our return will match the `jsr' done by the caller we have + just modified, and it will be just as if that had instead + been a `jmp' to the new target. */ + *return_address_location = caller->target; +} diff --git a/sysdeps/m88k/ffs.c b/sysdeps/m88k/ffs.c new file mode 100644 index 0000000000..85f40528a9 --- /dev/null +++ b/sysdeps/m88k/ffs.c @@ -0,0 +1,36 @@ +/* ffs -- find first set bit in a word, counted from least significant end. + For Motorola 88000. + Copyright (C) 1991 Free Software Foundation, Inc. + Contributed by Torbjorn Granlund (tege@sics.se). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include + +#undef ffs + +int +DEFUN(ffs, (x), int x) +{ + int cnt; + + if (x == 0) + return 0; + + asm ("ff1 %0,%1" : "=r" (cnt) : "r" (x & -x)); + return cnt + 1; +} diff --git a/sysdeps/rs6000/ffs.c b/sysdeps/rs6000/ffs.c new file mode 100644 index 0000000000..b8dfcdf878 --- /dev/null +++ b/sysdeps/rs6000/ffs.c @@ -0,0 +1,33 @@ +/* ffs -- find first set bit in a word, counted from least significant end. + For IBM rs6000. + Copyright (C) 1991 Free Software Foundation, Inc. + Contributed by Torbjorn Granlund (tege@sics.se). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include + +#undef ffs + +int +DEFUN(ffs, (x), int x) +{ + int cnt; + + asm ("cntlz %0,%1" : "=r" (cnt) : "r" (x & -x)); + return 32 - cnt; +} From 919160d07b2ac6dc2e0dd3b4f2868b4cef0cbe34 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 12 Jun 1991 19:43:32 +0000 Subject: [PATCH 0030/4487] Initial revision --- sysdeps/tahoe/log10.c | 21 ++++++++++++++ sysdeps/vax/fl.h | 67 +++++++++++++++++++++++++++++++++++++++++++ sysdeps/vax/log10.c | 27 +++++++++++++++++ 3 files changed, 115 insertions(+) create mode 100644 sysdeps/tahoe/log10.c create mode 100644 sysdeps/vax/fl.h create mode 100644 sysdeps/vax/log10.c diff --git a/sysdeps/tahoe/log10.c b/sysdeps/tahoe/log10.c new file mode 100644 index 0000000000..268c794118 --- /dev/null +++ b/sysdeps/tahoe/log10.c @@ -0,0 +1,21 @@ +/* Copyright (C) 1991 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 General Public License as published by +the Free Software Foundation; either version 2, 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with the GNU C Library; see the file COPYING. If not, write to +the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#define FPCONST(hi0, lo0, hi1, lo1) { (hi0), (lo0), (hi1), (lo1) } + +#include <../sysdeps/vax/log10.c> + diff --git a/sysdeps/vax/fl.h b/sysdeps/vax/fl.h new file mode 100644 index 0000000000..ae99130473 --- /dev/null +++ b/sysdeps/vax/fl.h @@ -0,0 +1,67 @@ +/* Copyright (C) 1991 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 General Public License as published by +the Free Software Foundation; either version 2, 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with the GNU C Library; see the file COPYING. If not, write to +the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#ifndef __need_HUGE_VAL + +/* Floating-point constants for Vaxen. */ + +#define FLT_RADIX 2 + +#define FLT_ROUNDS _FLT_ROUNDS_TONEAREST + +#define FLT_MANT_DIG 23 +#define DBL_MANT_DIG 55 +#define LDBL_MANT_DIG 55 + +#define FLT_DIG 6 +#define DBL_DIG 16 +#define LDBL_DIG 16 + +#define FLT_MIN_EXP (-128) +#define DBL_MIN_EXP (-128) +#define LDBL_MIN_EXP (-128) + +#define FLT_MIN_10_EXP (-38) +#define DBL_MIN_10_EXP (-38) +#define LDBL_MIN_10_EXP (-38) + +#define FLT_MAX_EXP 127 +#define DBL_MAX_EXP 127 +#define LDBL_MAX_EXP 127 + +#define FLT_MAX_10_EXP 38 +#define DBL_MAX_10_EXP 38 +#define LDBL_MAX_10_EXP 38 + +#define FLT_MAX 1.7014116e38 +#define DBL_MAX 1.70141182460469227e38 +#define LDBL_MAX DBL_MAX + +#define FLT_EPSILON 2.384186e-7 +#define DBL_EPSILON 5.55111512312578270e-17 +#define LDBL_EPSILON DBL_EPSILON + +#define FLT_MIN 0.2938736e-38 +#define DBL_MIN 0.29387358770557187e-38 +#define LDBL_MIN DBL_MIN + +#else /* Need HUGE_VAL. */ + +/* Used by and functions for overflow. */ +#define HUGE_VAL 1.70141182460469227e38 + +#endif /* Don't need HUGE_VAL. */ diff --git a/sysdeps/vax/log10.c b/sysdeps/vax/log10.c new file mode 100644 index 0000000000..c6e9b40f98 --- /dev/null +++ b/sysdeps/vax/log10.c @@ -0,0 +1,27 @@ +/* Copyright (C) 1991 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 General Public License as published by +the Free Software Foundation; either version 2, 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with the GNU C Library; see the file COPYING. If not, write to +the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#include + +#ifndef FPCONST +#define FPCONST(hi0, lo0, hi1, lo1) { (lo0), (hi0), (lo1), (hi1) } +#endif + +static CONST short int ln10[] = FPCONST(0x4113, 0x5d8d, 0xddaa, 0xa8ac); +#define LN10 (*(CONST double *) ln10) + +#include <../sysdeps/generic/log10.c> From 868236e8e93ed79490edd122b868d393c46ea1f8 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 12 Jun 1991 21:48:04 +0000 Subject: [PATCH 0031/4487] entered into RCS --- sysdeps/tahoe/log10.c | 19 ++++++++++--------- sysdeps/vax/fl.h | 19 ++++++++++--------- sysdeps/vax/log10.c | 19 ++++++++++--------- 3 files changed, 30 insertions(+), 27 deletions(-) diff --git a/sysdeps/tahoe/log10.c b/sysdeps/tahoe/log10.c index 268c794118..2cf2cee58b 100644 --- a/sysdeps/tahoe/log10.c +++ b/sysdeps/tahoe/log10.c @@ -1,19 +1,20 @@ /* Copyright (C) 1991 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 General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. +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 +published by the Free Software Foundation; either version 2 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 General Public License for more details. +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. -You should have received a copy of the GNU General Public License -along with the GNU C Library; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ #define FPCONST(hi0, lo0, hi1, lo1) { (hi0), (lo0), (hi1), (lo1) } diff --git a/sysdeps/vax/fl.h b/sysdeps/vax/fl.h index ae99130473..49e745697a 100644 --- a/sysdeps/vax/fl.h +++ b/sysdeps/vax/fl.h @@ -1,19 +1,20 @@ /* Copyright (C) 1991 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 General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. +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 +published by the Free Software Foundation; either version 2 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 General Public License for more details. +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. -You should have received a copy of the GNU General Public License -along with the GNU C Library; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ #ifndef __need_HUGE_VAL diff --git a/sysdeps/vax/log10.c b/sysdeps/vax/log10.c index c6e9b40f98..08741779eb 100644 --- a/sysdeps/vax/log10.c +++ b/sysdeps/vax/log10.c @@ -1,19 +1,20 @@ /* Copyright (C) 1991 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 General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. +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 +published by the Free Software Foundation; either version 2 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 General Public License for more details. +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. -You should have received a copy of the GNU General Public License -along with the GNU C Library; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ #include From 7d8d1a9564a4efd248a6f61607fc5d154d3449c2 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 12 Jun 1991 22:41:10 +0000 Subject: [PATCH 0032/4487] Initial revision --- sysdeps/unix/bsd/sun/m68k/sethostid.S | 45 +++++++++++++ sysdeps/vax/__longjmp.c | 96 +++++++++++++++++++++++++++ sysdeps/vax/infnan.c | 60 +++++++++++++++++ sysdeps/vax/memccpy.c | 43 ++++++++++++ sysdeps/vax/setjmp.c | 33 +++++++++ 5 files changed, 277 insertions(+) create mode 100644 sysdeps/unix/bsd/sun/m68k/sethostid.S create mode 100644 sysdeps/vax/__longjmp.c create mode 100644 sysdeps/vax/infnan.c create mode 100644 sysdeps/vax/memccpy.c create mode 100644 sysdeps/vax/setjmp.c diff --git a/sysdeps/unix/bsd/sun/m68k/sethostid.S b/sysdeps/unix/bsd/sun/m68k/sethostid.S new file mode 100644 index 0000000000..9f536d293b --- /dev/null +++ b/sysdeps/unix/bsd/sun/m68k/sethostid.S @@ -0,0 +1,45 @@ +/* Copyright (C) 1991 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#ifdef SYS_sethostid + +SYSCALL (sethostid) + ret + +#else + +#include + +.globl _sethostid +.even +_sethostid: + movel #ENOSYS, ___errno + moveq #-1, d0 + rts + +#ifdef __GNU_STAB__ + +#include + +stub_warning(sethostid); + +#endif + +#endif diff --git a/sysdeps/vax/__longjmp.c b/sysdeps/vax/__longjmp.c new file mode 100644 index 0000000000..e6979b7d31 --- /dev/null +++ b/sysdeps/vax/__longjmp.c @@ -0,0 +1,96 @@ +/* Copyright (C) 1991 Free Software Foundation, Inc. + Derived from @(#)_setjmp.s 5.7 (Berkeley) 6/27/88, + Copyright (c) 1980 Regents of the University of California. + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include + + +#define REI 02 /* Vax `rei' opcode. */ + +/* Jump to the position specified by ENV, causing the + setjmp call there to return VAL, or 1 if VAL is 0. */ +__NORETURN +void +DEFUN(__longjmp, (env, val), CONST jmp_buf env AND int val) +{ + register long int *fp asm("fp"); + long int *regsave; + unsigned long int flags; + + if (env.__fp == NULL) + __libc_fatal("longjmp: Invalid ENV argument.\n"); + + if (val == 0) + val = 1; + + asm volatile("loop:"); + + flags = *(long int *) (6 + (char *) fp); + regsave = (long int *) (20 + (char *) fp); + if (flags & 1) + /* R0 was saved by the caller. + Store VAL where it will be restored from. */ + *regsave++ = val; + if (flags & 2) + /* R1 was saved by the caller. + Store ENV where it will be restored from. */ + *regsave = env; + + /* Was the FP saved in the last call the same one in ENV? */ + asm volatile("cmpl %0, 12(fp);" + /* Yes, return to it. */ + "beql done;" + /* The FP in ENV is less than the one saved in the last call. + This means we have already returned from the function that + called `setjmp' with ENV! */ + "blssu latejump;" : /* No outputs. */ : "g" (env.__fp)); + + /* We are more than one level below the state in ENV. + Return to where we will pop another stack frame. */ + asm volatile("movl $loop, 16(fp);" + "ret"); + + asm volatile("done:"); + { + char return_insn asm("*16(fp)"); + if (return_insn == REI) + /* We're returning with an `rei' instruction. + Do a return with PSL-PC pop. */ + asm volatile("movab 0f, 16(fp)"); + else + /* Do a standard return. */ + asm volatile("movab 1f, 16(fp)"); + + /* Return. */ + asm volatile("ret"); + } + + asm volatile("0:" /* `rei' return. */ + /* Compensate for PSL-PC push. */ + "addl2 %0, sp;" + "1:" /* Standard return. */ + /* Return to saved PC. */ + "jmp %1" : /* No outputs. */ : + "g" (8), "g" (env.__pc)); + + /* Jump here when the FP saved in ENV points + to a function that has already returned. */ + asm volatile("latejump:"); + __libc_fatal("longjmp: Attempt to jump to a function that has returned.\n"); +} diff --git a/sysdeps/vax/infnan.c b/sysdeps/vax/infnan.c new file mode 100644 index 0000000000..1b9c7d3520 --- /dev/null +++ b/sysdeps/vax/infnan.c @@ -0,0 +1,60 @@ +/* Copyright (C) 1991 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifndef __GNUC__ +#include <../sysdeps/generic/infnan.c> +#else + +#include +#include +#include + +/* Deal with an infinite or NaN result. + If ERROR is ERANGE, result is +Inf; + if ERROR is - ERANGE, result is -Inf; + otherwise result is NaN. + This will set `errno' to either ERANGE or EDOM, + and may return an infinity or NaN, or may do something else. */ +double +DEFUN(__infnan, (error), int error) +{ + switch (error) + { + case ERANGE: + errno = ERANGE; + break; + + case - ERANGE: + errno = ERANGE; + break; + + default: + errno = EDOM; + break; + } + + /* Trigger a reserved operand fault. */ + { + double result; + asm volatile("emodd %1, %1, %2, %0, %0" : "=r" (result) : + "i" (0), "i" (0x8000)); + return result; + } +} + +#endif diff --git a/sysdeps/vax/memccpy.c b/sysdeps/vax/memccpy.c new file mode 100644 index 0000000000..ca01fb32a8 --- /dev/null +++ b/sysdeps/vax/memccpy.c @@ -0,0 +1,43 @@ +/* Copyright (C) 1991 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include + + +/* Copy no more than N bytes of SRC to DEST, stopping when C is found. + Return the position in DEST one byte past where C was copied, + or NULL if C was not found in the first NBYTES bytes of SRC. */ +PTR +DEFUN(__memccpy, (dest, src, c, n), + PTR dest AND CONST PTR src AND int c AND size_t nbytes) +{ + /* Except when NBYTES > 65535, this is what a hand-coded version would + do anyway. */ + + PTR found = memchr(src, c, n); + + if (found == NULL) + { + (void) memcpy(dest, src, n); + return NULL; + } + + (void) memcpy(dest, src, (char *) found + 1 - (char *) src); + return (PTR) ((char *) dest + ((char *) found + 1 - (char *) src)); +} diff --git a/sysdeps/vax/setjmp.c b/sysdeps/vax/setjmp.c new file mode 100644 index 0000000000..9687421802 --- /dev/null +++ b/sysdeps/vax/setjmp.c @@ -0,0 +1,33 @@ +/* Copyright (C) 1991 Free Software Foundation, Inc. + Derived from @(#)_setjmp.s 5.7 (Berkeley) 6/27/88, + Copyright (c) 1980 Regents of the University of California. + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include + + +/* Save the current program position in ENV and return 0. */ +int +DEFUN(__setjmp, (env), jmp_buf env) +{ + /* Save our caller's FP and PC. */ + asm("movl 12(fp), %0" : "=g" (env[0].__fp)); + asm("movl 16(fp), %0" : "=g" (env[0].__pc)); + + return 0; +} From b5fd7c44151ef8d62283067f3f08f731b9ec3b47 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 19 Jun 1991 19:47:45 +0000 Subject: [PATCH 0033/4487] Initial revision --- sysdeps/unix/bsd/sun/getdents.S | 22 ++++++++++++++++++ sysdeps/unix/bsd/vax/sysdep.h | 41 +++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 sysdeps/unix/bsd/sun/getdents.S create mode 100644 sysdeps/unix/bsd/vax/sysdep.h diff --git a/sysdeps/unix/bsd/sun/getdents.S b/sysdeps/unix/bsd/sun/getdents.S new file mode 100644 index 0000000000..20116de868 --- /dev/null +++ b/sysdeps/unix/bsd/sun/getdents.S @@ -0,0 +1,22 @@ +/* Copyright (C) 1991 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +SYSCALL__ (getdirentries) + ret diff --git a/sysdeps/unix/bsd/vax/sysdep.h b/sysdeps/unix/bsd/vax/sysdep.h new file mode 100644 index 0000000000..de1c4f34a8 --- /dev/null +++ b/sysdeps/unix/bsd/vax/sysdep.h @@ -0,0 +1,41 @@ +/* Copyright (C) 1991 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#ifdef __STDC__ +#define PSEUDO(name, syscall_name) \ + .even; \ + .globl syscall_error \ + error: jmp syscall_error; \ + .globl _##name; \ + .even; \ + _##name##:; \ + chmk $SYS_##syscall_name \ + bcs error +#else +#define PSEUDO(name, syscall_name) \ + .even; \ + .globl syscall_error \ + error: jmp syscall_error; \ + .globl _/**/name; \ + .even; \ + _/**/name/**/:; \ + chmk $SYS_/**/syscall_name \ + bcs error +#endif From 6b4aa5182e05181bc2098e08727c9cca73753e6f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 24 Jun 1991 17:38:32 +0000 Subject: [PATCH 0034/4487] Initial revision --- sysdeps/unix/bsd/hp/m68k/sysdep.h | 60 +++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 sysdeps/unix/bsd/hp/m68k/sysdep.h diff --git a/sysdeps/unix/bsd/hp/m68k/sysdep.h b/sysdeps/unix/bsd/hp/m68k/sysdep.h new file mode 100644 index 0000000000..4bcb7bd3a5 --- /dev/null +++ b/sysdeps/unix/bsd/hp/m68k/sysdep.h @@ -0,0 +1,60 @@ +/* Copyright (C) 1991 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#ifdef __STDC__ +#define ENTRY(name) \ + .globl _##name; \ + .even; \ + _##name##: +#else +#define ENTRY(name) \ + .globl _/**/name; \ + .even; \ + _/**/name/**/: +#endif + +#ifdef __STDC__ +#define PSEUDO(name, syscall_name) \ + .set sysno, SYS_##syscall_name; \ + .set zero, 0; \ + .even; \ + .globl syscall_error; \ + error: jmp syscall_error; \ + ENTRY (name): \ + movel sysno, d0; \ + trap zero; \ + bcs error +#else +#define PSEUDO(name, syscall_name) \ + .set sysno, SYS_/**/syscall_name; \ + .set zero, 0; \ + .even; \ + .globl syscall_error; \ + error: jmp syscall_error; \ + ENTRY (name) \ + movel sysno, d0; \ + trap zero; \ + bcs error +#endif + +#define ret rts +#define r0 d0 +#define r1 d1 +#define movl movel From 121e346fd8cca2874d40b534648f913787457dcb Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 24 Jun 1991 23:16:27 +0000 Subject: [PATCH 0035/4487] Formerly unix/bsd/vax/sysdep.h.~9~ --- sysdeps/unix/bsd/vax/sysdep.h | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/sysdeps/unix/bsd/vax/sysdep.h b/sysdeps/unix/bsd/vax/sysdep.h index de1c4f34a8..85ac2263d0 100644 --- a/sysdeps/unix/bsd/vax/sysdep.h +++ b/sysdeps/unix/bsd/vax/sysdep.h @@ -18,14 +18,24 @@ Cambridge, MA 02139, USA. */ #include +#ifdef __STDC__ +#define ENTRY(name) \ + .globl _##name; \ + .even; \ + _##name##: +#else +#define ENTRY(name) \ + .globl _/**/name; \ + .even; \ + _/**/name/**/: +#endif + #ifdef __STDC__ #define PSEUDO(name, syscall_name) \ .even; \ .globl syscall_error \ error: jmp syscall_error; \ - .globl _##name; \ - .even; \ - _##name##:; \ + ENTRY (name) \ chmk $SYS_##syscall_name \ bcs error #else @@ -33,9 +43,7 @@ Cambridge, MA 02139, USA. */ .even; \ .globl syscall_error \ error: jmp syscall_error; \ - .globl _/**/name; \ - .even; \ - _/**/name/**/:; \ + ENTRY (name) \ chmk $SYS_/**/syscall_name \ bcs error #endif From 1b04525160d85abcda82d7ae0f5194f895d06fda Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 24 Jun 1991 23:16:30 +0000 Subject: [PATCH 0036/4487] Initial revision --- sysdeps/unix/bsd/sun/m68k/sysdep.h | 60 ++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 sysdeps/unix/bsd/sun/m68k/sysdep.h diff --git a/sysdeps/unix/bsd/sun/m68k/sysdep.h b/sysdeps/unix/bsd/sun/m68k/sysdep.h new file mode 100644 index 0000000000..bf0b226fe7 --- /dev/null +++ b/sysdeps/unix/bsd/sun/m68k/sysdep.h @@ -0,0 +1,60 @@ +/* Copyright (C) 1991 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#ifdef __STDC__ +#define ENTRY(name) \ + .globl _##name; \ + .even; \ + _##name##: +#else +#define ENTRY(name) \ + .globl _/**/name; \ + .even; \ + _/**/name/**/: +#endif + +#ifdef __STDC__ +#define PSEUDO(name, syscall_name) \ + .set sysno, SYS_##syscall_name; \ + .set zero, 0; \ + .even; \ + .globl syscall_error; \ + error: jmp syscall_error; \ + ENTRY (name) \ + pea sysno; \ + trap zero; \ + bcs error \ +#else +#define PSEUDO(name, syscall_name) \ + .set sysno, SYS_/**/syscall_name; \ + .set zero, 0; \ + .even; \ + .globl syscall_error; \ + error: jmp syscall_error; \ + ENTRY (name) \ + pea sysno; \ + trap zero; \ + bcs error \ +#endif + +#define ret rts +#define r0 d0 +#define r1 d1 +#define movl movel From 18055ea85622d0914de03d3cf889b7d30f7faf55 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 26 Jun 1991 16:16:30 +0000 Subject: [PATCH 0037/4487] Formerly unix/bsd/hp/m68k/sysdep.h.~22~ --- sysdeps/unix/bsd/hp/m68k/sysdep.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sysdeps/unix/bsd/hp/m68k/sysdep.h b/sysdeps/unix/bsd/hp/m68k/sysdep.h index 4bcb7bd3a5..e02e5af50a 100644 --- a/sysdeps/unix/bsd/hp/m68k/sysdep.h +++ b/sysdeps/unix/bsd/hp/m68k/sysdep.h @@ -16,8 +16,12 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +/* This code wants to be run through m4. */ + #include +#define POUND(foo) (@@@Hash-Here@@@)foo + #ifdef __STDC__ #define ENTRY(name) \ .globl _##name; \ @@ -32,25 +36,21 @@ Cambridge, MA 02139, USA. */ #ifdef __STDC__ #define PSEUDO(name, syscall_name) \ - .set sysno, SYS_##syscall_name; \ - .set zero, 0; \ .even; \ .globl syscall_error; \ error: jmp syscall_error; \ - ENTRY (name): \ - movel sysno, d0; \ - trap zero; \ + ENTRY (name) \ + movel POUND(SYS_##syscall_name), d0; \ + trap POUND(0); \ bcs error #else #define PSEUDO(name, syscall_name) \ - .set sysno, SYS_/**/syscall_name; \ - .set zero, 0; \ .even; \ .globl syscall_error; \ error: jmp syscall_error; \ ENTRY (name) \ - movel sysno, d0; \ - trap zero; \ + movel POUND(SYS_/**/syscall_name), d0; \ + trap POUND(0); \ bcs error #endif From 53730463160efe4b5fe26465420aad17c4d5941d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 26 Jun 1991 19:29:24 +0000 Subject: [PATCH 0038/4487] Initial revision --- sysdeps/unix/bsd/hp/m68k/getdents.S | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/bsd/hp/m68k/getdents.S diff --git a/sysdeps/unix/bsd/hp/m68k/getdents.S b/sysdeps/unix/bsd/hp/m68k/getdents.S new file mode 100644 index 0000000000..f025591785 --- /dev/null +++ b/sysdeps/unix/bsd/hp/m68k/getdents.S @@ -0,0 +1 @@ +#include From bb8b0f1730d52178978e40e636fd212f10a4c6ab Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 26 Jun 1991 20:51:19 +0000 Subject: [PATCH 0039/4487] Initial revision --- sysdeps/unix/bsd/hp/m68k/brk.S | 47 +++++++++++++++++++++++++++++++++ sysdeps/unix/bsd/sun/m68k/brk.S | 47 +++++++++++++++++++++++++++++++++ 2 files changed, 94 insertions(+) create mode 100644 sysdeps/unix/bsd/hp/m68k/brk.S create mode 100644 sysdeps/unix/bsd/sun/m68k/brk.S diff --git a/sysdeps/unix/bsd/hp/m68k/brk.S b/sysdeps/unix/bsd/hp/m68k/brk.S new file mode 100644 index 0000000000..023b0b5b09 --- /dev/null +++ b/sysdeps/unix/bsd/hp/m68k/brk.S @@ -0,0 +1,47 @@ +/* Copyright (C) 1991 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#ifndef SYS_brk +#define SYS_brk 17 +#endif + +#ifndef __GNU_STAB__ +#define __end _end +#endif + +.data +.globl ___curbrk +___curbrk: + .long __end + +.text +ENTRY (__brk) + movel __end, d0 + cmpl sp@(4), d0 + ble 0f + movel d0, sp@(4) +0: movel POUND(SYS_brk), d0 + trap POUND(0) + bcs 1f + movel sp@(4), ___curbrk + clrl d0 + rts +1: + jmp syscall_error diff --git a/sysdeps/unix/bsd/sun/m68k/brk.S b/sysdeps/unix/bsd/sun/m68k/brk.S new file mode 100644 index 0000000000..6e0c2f27ee --- /dev/null +++ b/sysdeps/unix/bsd/sun/m68k/brk.S @@ -0,0 +1,47 @@ +/* Copyright (C) 1991 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#ifndef SYS_brk +#define SYS_brk 17 +#endif + +#ifndef __GNU_STAB__ +#define __end _end +#endif + +.data +.globl ___curbrk +___curbrk: + .long __end + +.text +ENTRY (__brk) + movel __end, d0 + cmpl sp@(4), d0 + ble 0f + movel d0, sp@(4) +0: pea @POUND(SYS_brk) + trap POUND(0) + bcs 1f + movel sp@(4), ___curbrk + clrl d0 + rts +1: + jmp syscall_error From c2a31ce3a7dfb0778c5f28b0f0775764ad6e682b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 27 Jun 1991 23:39:32 +0000 Subject: [PATCH 0040/4487] Formerly unix/bsd/vax/__wait.S.~2~ --- sysdeps/unix/bsd/vax/wait.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/bsd/vax/wait.S b/sysdeps/unix/bsd/vax/wait.S index ff88ec150e..8b8da20674 100644 --- a/sysdeps/unix/bsd/vax/wait.S +++ b/sysdeps/unix/bsd/vax/wait.S @@ -18,7 +18,7 @@ Cambridge, MA 02139, USA. */ #include -SYSCALL (wait) +SYSCALL__ (wait) movl 4(ap), r2 beq 1f movl r1, (r2) From 693a0ea7b8243d5bebbf4bf202f271f55c04a188 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 28 Jun 1991 23:05:11 +0000 Subject: [PATCH 0041/4487] Formerly unix/bsd/hp/m68k/__wait3.S.~2~ --- sysdeps/unix/bsd/hp/m68k/wait3.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/unix/bsd/hp/m68k/wait3.S b/sysdeps/unix/bsd/hp/m68k/wait3.S index b1dcef0804..4b4815dbe6 100644 --- a/sysdeps/unix/bsd/hp/m68k/wait3.S +++ b/sysdeps/unix/bsd/hp/m68k/wait3.S @@ -20,6 +20,8 @@ Cambridge, MA 02139, USA. */ .globl ___wait3 ___wait3: + movel sp@(8), d1 + moveal sp@(12), a0 movel #SYS_wait, d0 /* Set all condition codes to tell the kernel this is wait3. */ movew #31, ccr From 42e9d6c8c4f1c2df8a7c3b2024c8c44db48212f6 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 28 Jun 1991 23:05:48 +0000 Subject: [PATCH 0042/4487] Formerly unix/bsd/vax/__wait3.S.~2~ --- sysdeps/unix/bsd/vax/wait3.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/unix/bsd/vax/wait3.S b/sysdeps/unix/bsd/vax/wait3.S index 0d427da33b..0d6e94a2bd 100644 --- a/sysdeps/unix/bsd/vax/wait3.S +++ b/sysdeps/unix/bsd/vax/wait3.S @@ -20,6 +20,8 @@ Cambridge, MA 02139, USA. */ .globl ___wait3 ___wait3: + movel 8(ap), r1 + movel 12(ap), r0 /* Set all condition codes to tell the kernel this is wait3. */ bispsw $15 chmk $SYS_wait From 93206132304490ecfbd8eed405ab3ae902034457 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 26 Jul 1991 03:57:39 +0000 Subject: [PATCH 0043/4487] Initial revision --- sysdeps/unix/bsd/sun/sunos4/wait.c | 30 ++++++++++++++++++++++++++ sysdeps/unix/bsd/sun/sunos4/wait3.c | 33 +++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 sysdeps/unix/bsd/sun/sunos4/wait.c create mode 100644 sysdeps/unix/bsd/sun/sunos4/wait3.c diff --git a/sysdeps/unix/bsd/sun/sunos4/wait.c b/sysdeps/unix/bsd/sun/sunos4/wait.c new file mode 100644 index 0000000000..9610a65091 --- /dev/null +++ b/sysdeps/unix/bsd/sun/sunos4/wait.c @@ -0,0 +1,30 @@ +/* Copyright (C) 1991 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include + +/* Wait for a child to die. When one does, put its status in *STAT_LOC + and return its process ID. For errors, return (pid_t) -1. */ +__pid_t +DEFUN(__wait, (stat_loc), __WAIT_STATUS stat_loc) +{ + return __wait4 (WAIT_ANY, stat_loc, 0, (struct rusage *) NULL); +} diff --git a/sysdeps/unix/bsd/sun/sunos4/wait3.c b/sysdeps/unix/bsd/sun/sunos4/wait3.c new file mode 100644 index 0000000000..11d993ebe6 --- /dev/null +++ b/sysdeps/unix/bsd/sun/sunos4/wait3.c @@ -0,0 +1,33 @@ +/* Copyright (C) 1991 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include + +/* Wait for a child to exit. When one does, put its status in *STAT_LOC and + return its process ID. For errors return (pid_t) -1. If USAGE is not nil, + store information about the child's resource usage (as a `struct rusage') + there. If the WUNTRACED bit is set in OPTIONS, return status for stopped + children; otherwise don't. */ +pid_t +DEFUN(__wait3, (stat_loc, options, usage), + union wait *stat_loc AND int options AND PTR usage) +{ + return __wait4 (WAIT_ANY, stat_loc, options, usage); +} From b2eb4c3eb2d201455df6c58dcb711bb2a9c8a4eb Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 26 Jul 1991 22:00:09 +0000 Subject: [PATCH 0044/4487] Initial revision --- sysdeps/unix/bsd/sun/sparc/sethostid.S | 44 ++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 sysdeps/unix/bsd/sun/sparc/sethostid.S diff --git a/sysdeps/unix/bsd/sun/sparc/sethostid.S b/sysdeps/unix/bsd/sun/sparc/sethostid.S new file mode 100644 index 0000000000..e7981e9cde --- /dev/null +++ b/sysdeps/unix/bsd/sun/sparc/sethostid.S @@ -0,0 +1,44 @@ +/* Copyright (C) 1991 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#ifdef SYS_sethostid + +SYSCALL (sethostid) + ret + +#else + +#include + +ENTRY (sethostid) + mov ENOSYS, %o0 + sethi %hi(___errno), %g1 + st %o0, [%g1 + %lo(___errno)] + retl + sub 0, 1, %o0 + +#ifdef __GNU_STAB__ + +.stabs "warning: sethostid is not implemented and will always fail",30,0,0,0 +.stabs "_sethostid",1,0,0,0 + +#endif + +#endif From d0a6aa059e6042df3295d16fabdd8a3b8bf49790 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 29 Jul 1991 23:00:00 +0000 Subject: [PATCH 0045/4487] Formerly sysdeps/unix/bsd/sun/sunos4/__wait.c.~2~ --- sysdeps/unix/bsd/sun/sunos4/wait.c | 31 +----------------------------- 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/sysdeps/unix/bsd/sun/sunos4/wait.c b/sysdeps/unix/bsd/sun/sunos4/wait.c index 9610a65091..452fdd22c0 100644 --- a/sysdeps/unix/bsd/sun/sunos4/wait.c +++ b/sysdeps/unix/bsd/sun/sunos4/wait.c @@ -1,30 +1 @@ -/* Copyright (C) 1991 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include -#include -#include - -/* Wait for a child to die. When one does, put its status in *STAT_LOC - and return its process ID. For errors, return (pid_t) -1. */ -__pid_t -DEFUN(__wait, (stat_loc), __WAIT_STATUS stat_loc) -{ - return __wait4 (WAIT_ANY, stat_loc, 0, (struct rusage *) NULL); -} +#include From 26821a64f90759d02a12e0e6c32fcb8793cd5766 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 29 Jul 1991 23:00:00 +0000 Subject: [PATCH 0046/4487] Formerly sysdeps/unix/bsd/sun/sunos4/__wait3.c.~2~ --- sysdeps/unix/bsd/sun/sunos4/wait3.c | 34 +---------------------------- 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/sysdeps/unix/bsd/sun/sunos4/wait3.c b/sysdeps/unix/bsd/sun/sunos4/wait3.c index 11d993ebe6..a7485f5a64 100644 --- a/sysdeps/unix/bsd/sun/sunos4/wait3.c +++ b/sysdeps/unix/bsd/sun/sunos4/wait3.c @@ -1,33 +1 @@ -/* Copyright (C) 1991 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include -#include - -/* Wait for a child to exit. When one does, put its status in *STAT_LOC and - return its process ID. For errors return (pid_t) -1. If USAGE is not nil, - store information about the child's resource usage (as a `struct rusage') - there. If the WUNTRACED bit is set in OPTIONS, return status for stopped - children; otherwise don't. */ -pid_t -DEFUN(__wait3, (stat_loc, options, usage), - union wait *stat_loc AND int options AND PTR usage) -{ - return __wait4 (WAIT_ANY, stat_loc, options, usage); -} +#include From 3c004aa74f29cc3b822244643dc1e5a26c2b1738 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 1 Aug 1991 22:07:42 +0000 Subject: [PATCH 0047/4487] entered into RCS --- sysdeps/m68k/fpu/Makefile | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 sysdeps/m68k/fpu/Makefile diff --git a/sysdeps/m68k/fpu/Makefile b/sysdeps/m68k/fpu/Makefile new file mode 100644 index 0000000000..42db6381d3 --- /dev/null +++ b/sysdeps/m68k/fpu/Makefile @@ -0,0 +1,11 @@ +ifeq ($(subdir),math) +ifndef math-twiddled + +# Avoid twiddling in generic/Makefile. +math-twiddled := t + +endif + +bsdmath_dirs := $(bsdmath_dirs) mc68881 + +endif From 7b14d60a4c5fa9154edc43de34893b37109b55c1 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 1 Aug 1991 23:15:43 +0000 Subject: [PATCH 0048/4487] Initial revision --- sysdeps/vax/Makefile | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 sysdeps/vax/Makefile diff --git a/sysdeps/vax/Makefile b/sysdeps/vax/Makefile new file mode 100644 index 0000000000..1e0f99adbc --- /dev/null +++ b/sysdeps/vax/Makefile @@ -0,0 +1,39 @@ +# Copyright (C) 1991 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 Library General Public License as +# published by the Free Software Foundation; either version 2 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 +# Library General Public License for more details. + +# You should have received a copy of the GNU Library General Public +# License along with the GNU C Library; see the file COPYING.LIB. If +# not, write to the Free Software Foundation, Inc., 675 Mass Ave, +# Cambridge, MA 02139, USA. + +ifeq ($(subdir),posix) + +distribute := $(distribute) DEFS.h + +endif + +ifeq ($(subdir),math) +ifndef math-twiddled + +routines:= $(filter-out acos asin cos sin ceil rint hypot \ + __copysign __scalb __drem __logb __finite,$(routines))\ + asincos sincos +aux := $(aux) argred support exp__E log__L + +math-twiddled := t + +endif + +bsdmath_dirs := $(bsdmath_dirs) vax + +endif From 037ff3c9d5ae134d1ed6e3de061dba5a421fcc60 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 2 Aug 1991 07:08:34 +0000 Subject: [PATCH 0049/4487] entered into RCS --- sysdeps/vax/Dist | 1 + sysdeps/vax/Makefile | 6 ------ 2 files changed, 1 insertion(+), 6 deletions(-) create mode 100644 sysdeps/vax/Dist diff --git a/sysdeps/vax/Dist b/sysdeps/vax/Dist new file mode 100644 index 0000000000..9830be29a4 --- /dev/null +++ b/sysdeps/vax/Dist @@ -0,0 +1 @@ +DEFS.h diff --git a/sysdeps/vax/Makefile b/sysdeps/vax/Makefile index 1e0f99adbc..bcdd94ead4 100644 --- a/sysdeps/vax/Makefile +++ b/sysdeps/vax/Makefile @@ -16,12 +16,6 @@ # not, write to the Free Software Foundation, Inc., 675 Mass Ave, # Cambridge, MA 02139, USA. -ifeq ($(subdir),posix) - -distribute := $(distribute) DEFS.h - -endif - ifeq ($(subdir),math) ifndef math-twiddled From 62b4e5546b8f299e3325936d17a76566f2606c46 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 2 Aug 1991 07:11:28 +0000 Subject: [PATCH 0050/4487] Initial revision --- sysdeps/m68k/fpu/switch/Dist | 1 + sysdeps/unix/bsd/sun/sparc/Dist | 1 + sysdeps/unix/bsd/sun/sparc/Makefile | 3 +++ 3 files changed, 5 insertions(+) create mode 100644 sysdeps/m68k/fpu/switch/Dist create mode 100644 sysdeps/unix/bsd/sun/sparc/Dist create mode 100644 sysdeps/unix/bsd/sun/sparc/Makefile diff --git a/sysdeps/m68k/fpu/switch/Dist b/sysdeps/m68k/fpu/switch/Dist new file mode 100644 index 0000000000..70502fb121 --- /dev/null +++ b/sysdeps/m68k/fpu/switch/Dist @@ -0,0 +1 @@ +68881-switch.h switch.c diff --git a/sysdeps/unix/bsd/sun/sparc/Dist b/sysdeps/unix/bsd/sun/sparc/Dist new file mode 100644 index 0000000000..614a5410ca --- /dev/null +++ b/sysdeps/unix/bsd/sun/sparc/Dist @@ -0,0 +1 @@ +tramp_sigvec.c diff --git a/sysdeps/unix/bsd/sun/sparc/Makefile b/sysdeps/unix/bsd/sun/sparc/Makefile new file mode 100644 index 0000000000..5dd736f557 --- /dev/null +++ b/sysdeps/unix/bsd/sun/sparc/Makefile @@ -0,0 +1,3 @@ +ifeq ($(subdir),signal) +sysdep_routines := $(sysdep_routines) tramp_sigvec +endif From d8fffb8dff41ceb7fb0f7c4916cbd8826bb0ab0e Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 8 Aug 1991 02:14:02 +0000 Subject: [PATCH 0051/4487] Initial revision --- sysdeps/unix/bsd/sun/sunos4/Makefile | 3 ++ sysdeps/unix/bsd/sun/sunos4/sys_wait4.S | 22 +++++++++++++ sysdeps/unix/bsd/sun/sunos4/wait4.c | 44 +++++++++++++++++++++++++ sysdeps/unix/bsd/sun/sunos4/waitpid.c | 42 +++++++++++++++++++++++ 4 files changed, 111 insertions(+) create mode 100644 sysdeps/unix/bsd/sun/sunos4/Makefile create mode 100644 sysdeps/unix/bsd/sun/sunos4/sys_wait4.S create mode 100644 sysdeps/unix/bsd/sun/sunos4/wait4.c create mode 100644 sysdeps/unix/bsd/sun/sunos4/waitpid.c diff --git a/sysdeps/unix/bsd/sun/sunos4/Makefile b/sysdeps/unix/bsd/sun/sunos4/Makefile new file mode 100644 index 0000000000..550ccbbe61 --- /dev/null +++ b/sysdeps/unix/bsd/sun/sunos4/Makefile @@ -0,0 +1,3 @@ +ifeq ($(subdir), posix) +sysdep_routines := $(sysdep_routines) __wait4_syscall +endif diff --git a/sysdeps/unix/bsd/sun/sunos4/sys_wait4.S b/sysdeps/unix/bsd/sun/sunos4/sys_wait4.S new file mode 100644 index 0000000000..dee21b7051 --- /dev/null +++ b/sysdeps/unix/bsd/sun/sunos4/sys_wait4.S @@ -0,0 +1,22 @@ +/* Copyright (C) 1991 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +PSEUDO (__wait4_syscall, wait4) + ret diff --git a/sysdeps/unix/bsd/sun/sunos4/wait4.c b/sysdeps/unix/bsd/sun/sunos4/wait4.c new file mode 100644 index 0000000000..1ee7beab4c --- /dev/null +++ b/sysdeps/unix/bsd/sun/sunos4/wait4.c @@ -0,0 +1,44 @@ +/* This implements wait4 with the 4.4 BSD semantics (also those documented in + SunOS 4.1) on top of SunOS's wait4 system call, which has semantics + different from those documented. Go Sun! + +Copyright (C) 1991 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include + +pid_t +DEFUN(__wait4, (pid, stat_loc, options, usage), + pid_t pid AND union wait *stat_loc AND int options AND PTR usage) +{ + switch (pid) + { + case WAIT_ANY: + pid = 0; + break; + + case WAIT_MYPGRP: + pid = - __getpgrp (0); + break; + } + + return __wait4_syscall (pid, stat_loc, option, usage); +} diff --git a/sysdeps/unix/bsd/sun/sunos4/waitpid.c b/sysdeps/unix/bsd/sun/sunos4/waitpid.c new file mode 100644 index 0000000000..06f55ddcff --- /dev/null +++ b/sysdeps/unix/bsd/sun/sunos4/waitpid.c @@ -0,0 +1,42 @@ +/* Copyright (C) 1991 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include + + +/* Wait for a child matching PID to die. + If PID is greater than 0, match any process whose process ID is PID. + If PID is (pid_t) -1, match any process. + If PID is (pid_t) 0, match any process with the + same process group as the current process. + If PID is less than -1, match any process whose + process group is the absolute value of PID. + If the WNOHANG bit is set in OPTIONS, and that child + is not already dead, return (pid_t) 0. If successful, + return PID and store the dead child's status in STAT_LOC. + Return (pid_t) -1 for errors. If the WUNTRACED bit is set in OPTIONS, + return status for stopped children; otherwise don't. */ +pid_t +DEFUN(__waitpid, (pid, stat_loc, options), + pid_t pid AND int *stat_loc AND int options) +{ + return __wait4 (pid, stat_loc, options, NULL); +} From 3b77ef005fe6d6906612a770a33dc7049a9cadaf Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 9 Aug 1991 23:00:00 +0000 Subject: [PATCH 0052/4487] Formerly sysdeps/unix/bsd/sun/sunos4/__waitpid.c.~2~ --- sysdeps/unix/bsd/sun/sunos4/waitpid.c | 43 +-------------------------- 1 file changed, 1 insertion(+), 42 deletions(-) diff --git a/sysdeps/unix/bsd/sun/sunos4/waitpid.c b/sysdeps/unix/bsd/sun/sunos4/waitpid.c index 06f55ddcff..a4839222a6 100644 --- a/sysdeps/unix/bsd/sun/sunos4/waitpid.c +++ b/sysdeps/unix/bsd/sun/sunos4/waitpid.c @@ -1,42 +1 @@ -/* Copyright (C) 1991 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include -#include -#include - - -/* Wait for a child matching PID to die. - If PID is greater than 0, match any process whose process ID is PID. - If PID is (pid_t) -1, match any process. - If PID is (pid_t) 0, match any process with the - same process group as the current process. - If PID is less than -1, match any process whose - process group is the absolute value of PID. - If the WNOHANG bit is set in OPTIONS, and that child - is not already dead, return (pid_t) 0. If successful, - return PID and store the dead child's status in STAT_LOC. - Return (pid_t) -1 for errors. If the WUNTRACED bit is set in OPTIONS, - return status for stopped children; otherwise don't. */ -pid_t -DEFUN(__waitpid, (pid, stat_loc, options), - pid_t pid AND int *stat_loc AND int options) -{ - return __wait4 (pid, stat_loc, options, NULL); -} +#include From 1dd568a93ee4eaa84bc5a6cf638e91333c6d17bb Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 22 Oct 1991 00:53:26 +0000 Subject: [PATCH 0053/4487] Initial revision --- sysdeps/unix/bsd/sun/sunos4/Dist | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/bsd/sun/sunos4/Dist diff --git a/sysdeps/unix/bsd/sun/sunos4/Dist b/sysdeps/unix/bsd/sun/sunos4/Dist new file mode 100644 index 0000000000..188fdd5fb9 --- /dev/null +++ b/sysdeps/unix/bsd/sun/sunos4/Dist @@ -0,0 +1 @@ +__wait4_syscall.S From eb855956fb65f86c3b23ab2c86f87369489fc049 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 8 Dec 1991 23:55:00 +0000 Subject: [PATCH 0054/4487] Initial revision --- sysdeps/m68k/memcopy.h | 95 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 sysdeps/m68k/memcopy.h diff --git a/sysdeps/m68k/memcopy.h b/sysdeps/m68k/memcopy.h new file mode 100644 index 0000000000..7b0385c273 --- /dev/null +++ b/sysdeps/m68k/memcopy.h @@ -0,0 +1,95 @@ +/* memcopy.h -- definitions for memory copy functions. Motorola 68020 version. + Copyright (C) 1991 Free Software Foundation, Inc. + Contributed by Torbjorn Granlund (tege@sics.se). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#if defined(__mc68020__) || defined(mc68020) + +#undef OP_T_THRES +#define OP_T_THRES 16 + +/* WORD_COPY_FWD and WORD_COPY_BWD are not symmetric on the 68020, + because of its weird instruction overlap characteristics. */ + +#undef WORD_COPY_FWD +#define WORD_COPY_FWD(dst_bp, src_bp, nbytes_left, nbytes) \ + do \ + { \ + size_t __nwords = (nbytes) / sizeof (op_t); \ + size_t __nblocks = __nwords / 8 + 1; \ + dst_bp -= (8 - __nwords % 8) * sizeof (op_t); \ + src_bp -= (8 - __nwords % 8) * sizeof (op_t); \ + switch (__nwords % 8) \ + do \ + { \ + ((op_t *) dst_bp)[0] = ((op_t *) src_bp)[0]; \ + case 7: \ + ((op_t *) dst_bp)[1] = ((op_t *) src_bp)[1]; \ + case 6: \ + ((op_t *) dst_bp)[2] = ((op_t *) src_bp)[2]; \ + case 5: \ + ((op_t *) dst_bp)[3] = ((op_t *) src_bp)[3]; \ + case 4: \ + ((op_t *) dst_bp)[4] = ((op_t *) src_bp)[4]; \ + case 3: \ + ((op_t *) dst_bp)[5] = ((op_t *) src_bp)[5]; \ + case 2: \ + ((op_t *) dst_bp)[6] = ((op_t *) src_bp)[6]; \ + case 1: \ + ((op_t *) dst_bp)[7] = ((op_t *) src_bp)[7]; \ + case 0: \ + src_bp += 32; \ + dst_bp += 32; \ + __nblocks--; \ + } \ + while (__nblocks != 0); \ + (nbytes_left) = (nbytes) % sizeof (op_t); \ + } while (0) + +#undef WORD_COPY_BWD +#define WORD_COPY_BWD(dst_ep, src_ep, nbytes_left, nbytes) \ + do \ + { \ + size_t __nblocks = (nbytes) / 32 + 1; \ + switch ((nbytes) % 32 / sizeof (op_t)) \ + do \ + { \ + --((op_t *) dst_ep) = --((op_t *) src_ep); \ + case 7: \ + --((op_t *) dst_ep) = --((op_t *) src_ep); \ + case 6: \ + --((op_t *) dst_ep) = --((op_t *) src_ep); \ + case 5: \ + --((op_t *) dst_ep) = --((op_t *) src_ep); \ + case 4: \ + --((op_t *) dst_ep) = --((op_t *) src_ep); \ + case 3: \ + --((op_t *) dst_ep) = --((op_t *) src_ep); \ + case 2: \ + --((op_t *) dst_ep) = --((op_t *) src_ep); \ + case 1: \ + --((op_t *) dst_ep) = --((op_t *) src_ep); \ + case 0: \ + __nblocks--; \ + } \ + while (__nblocks != 0); \ + (nbytes_left) = (nbytes) % sizeof (op_t); \ + } while (0) + +#endif From ab346b1289fe0cb0b5ce94294963410241188516 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 11 Jan 1992 04:02:16 +0000 Subject: [PATCH 0055/4487] Formerly unix/bsd/hp/m68k/start.c.~6~ --- sysdeps/unix/bsd/hp/m68k/start.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/bsd/hp/m68k/start.c b/sysdeps/unix/bsd/hp/m68k/start.c index 4b321562d4..fcafa339aa 100644 --- a/sysdeps/unix/bsd/hp/m68k/start.c +++ b/sysdeps/unix/bsd/hp/m68k/start.c @@ -1,7 +1,7 @@ /* hp300 4.3 BSD starts at 4, rather than 0, when the start address is 0. Go figure. */ asm(".globl __start\n" - "__start: .long 0"); + "__start: .ascii 'scum'"); /* He he. */ #define _start __start0 From d4f409fa753530927ed33b9391f2ac70471d1df6 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 11 Jan 1992 08:27:22 +0000 Subject: [PATCH 0056/4487] Formerly unix/bsd/hp/m68k/start.c.~7~ --- sysdeps/unix/bsd/hp/m68k/start.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/bsd/hp/m68k/start.c b/sysdeps/unix/bsd/hp/m68k/start.c index fcafa339aa..d3c0ebd2f0 100644 --- a/sysdeps/unix/bsd/hp/m68k/start.c +++ b/sysdeps/unix/bsd/hp/m68k/start.c @@ -1,7 +1,7 @@ /* hp300 4.3 BSD starts at 4, rather than 0, when the start address is 0. Go figure. */ asm(".globl __start\n" - "__start: .ascii 'scum'"); /* He he. */ + "__start: .ascii \"scum\""); /* He he. */ #define _start __start0 From daacbef8c7a24028f6b6bc5509ca53247951942a Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 17 Jan 1992 00:59:04 +0000 Subject: [PATCH 0057/4487] Formerly unix/bsd/hp/m68k/start.c.~8~ --- sysdeps/unix/bsd/hp/m68k/start.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/bsd/hp/m68k/start.c b/sysdeps/unix/bsd/hp/m68k/start.c index d3c0ebd2f0..4b321562d4 100644 --- a/sysdeps/unix/bsd/hp/m68k/start.c +++ b/sysdeps/unix/bsd/hp/m68k/start.c @@ -1,7 +1,7 @@ /* hp300 4.3 BSD starts at 4, rather than 0, when the start address is 0. Go figure. */ asm(".globl __start\n" - "__start: .ascii \"scum\""); /* He he. */ + "__start: .long 0"); #define _start __start0 From 6231976998391b25c86040dfa8b10e051ec1a18b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 17 Jan 1992 05:59:40 +0000 Subject: [PATCH 0058/4487] Initial revision --- sysdeps/unix/bsd/sun/sparc/sigcontext.h | 31 +++ sysdeps/unix/bsd/sun/sparc/sigtramp.c | 242 ++++++++++++++++++++++++ 2 files changed, 273 insertions(+) create mode 100644 sysdeps/unix/bsd/sun/sparc/sigcontext.h create mode 100644 sysdeps/unix/bsd/sun/sparc/sigtramp.c diff --git a/sysdeps/unix/bsd/sun/sparc/sigcontext.h b/sysdeps/unix/bsd/sun/sparc/sigcontext.h new file mode 100644 index 0000000000..b61d642d9d --- /dev/null +++ b/sysdeps/unix/bsd/sun/sparc/sigcontext.h @@ -0,0 +1,31 @@ +/* Structure describing state saved while handling a signal. Sparc version. +Copyright (C) 1992 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +struct sigcontext + { + int sc_onstack; + sigset_t sc_mask; + +#define SPARC_MAXREGWINDOW 31 /* Maximum usable register windows. */ + int sc_sp, sc_pc, sc_npc, sc_psr, sc_g1, sc_o0; + int sc_wbcnt; /* Number of outstanding windows. */ + PTR sc_spbuf[SPARC_MAXREGWINDOW]; /* SP's for each window. */ + int sc_wbuf[SPARC_MAXREGWINDOW][16]; /* Saved register windows. */ + }; + diff --git a/sysdeps/unix/bsd/sun/sparc/sigtramp.c b/sysdeps/unix/bsd/sun/sparc/sigtramp.c new file mode 100644 index 0000000000..5896e3c51d --- /dev/null +++ b/sysdeps/unix/bsd/sun/sparc/sigtramp.c @@ -0,0 +1,242 @@ +/* Copyright (C) 1991 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +/* Get the definition of `struct sigcontext'. */ +#define KERNEL +#define sigvec sun_sigvec +#define sigstack sun_sigstack +#define sigcontext sun_sigcontext +#include "/usr/include/sys/signal.h" +#undef sigvec +#undef sigstack +#undef sigcontext +#undef NSIG +#undef SIGABRT +#undef SIGCLD +#undef SV_ONSTACK +#undef SV_RESETHAND +#undef SV_INTERRUPT +#undef SA_ONSTACK +#undef SA_NOCLDSTOP +#undef SIG_ERR +#undef SIG_DFL +#undef SIG_IGN +#undef sigmask +#undef SIG_BLOCK +#undef SIG_UNBLOCK +#undef SIG_SETMASK + +#include +#include +#include + +/* Defined in __sigvec.S. */ +extern int EXFUN(__raw_sigvec, (int sig, CONST struct sigvec *vec, + struct sigvec *ovec)); + +/* User-specified signal handlers. */ +#define mytramp 1 +#ifdef mytramp +static __sighandler_t handlers[NSIG]; +#else +#define handlers _sigfunc +extern __sighandler_t _sigfunc[]; +#endif + +#if mytramp + +/* Handler for all signals that are handled by a user-specified function. + Saves and restores the general regs %g2-%g7, the %y register, and + all the FPU regs (including %fsr), around calling the user's handler. */ +static void +DEFUN(trampoline, (sig), int sig) +{ + /* We use `double' and `long long int' so `std' (store doubleword) insns, + which might be faster than single-word stores, will be generated. */ + register double f0 asm("%f0"); + register double f2 asm("%f2"); + register double f4 asm("%f4"); + register double f6 asm("%f6"); + register double f8 asm("%f8"); + register double f10 asm("%f10"); + register double f12 asm("%f12"); + register double f14 asm("%f14"); + register double f16 asm("%f16"); + register double f18 asm("%f18"); + register double f20 asm("%f20"); + register double f22 asm("%f22"); + register double f24 asm("%f24"); + register double f26 asm("%f26"); + register double f28 asm("%f28"); + register double f30 asm("%f30"); + register long long int g2 asm("%g2"); + register long long int g4 asm("%g4"); + register long long int g6 asm("%g6"); + register int *fp asm("%fp"); + + int code; + register struct sigcontext *context asm("%i0"); /* See end of fn. */ + PTR addr; + int y; + double fpsave[16]; + int fsr; + int savefpu; + long long int glsave[3]; + + /* SIG isn't really passed as an arg. + The args to the signal handler are at fp[16..19]. */ + sig = fp[16]; + code = fp[17]; + context = (struct sigcontext *) fp[18]; + addr = (PTR) fp[19]; + + /* Save the Y register. */ + asm("rd %%y, %0" : "=r" (y)); + + /* Save the FPU regs if the FPU enable bit is set in the PSR, + and the signal isn't an FP exception. */ + savefpu = (context->sc_psr & 0x1000) && sig != SIGFPE; + if (savefpu) + { + fpsave[0] = f0; + fpsave[1] = f2; + fpsave[2] = f4; + fpsave[3] = f6; + fpsave[4] = f8; + fpsave[5] = f10; + fpsave[6] = f12; + fpsave[7] = f14; + fpsave[8] = f16; + fpsave[9] = f18; + fpsave[10] = f20; + fpsave[11] = f22; + fpsave[12] = f24; + fpsave[13] = f26; + fpsave[14] = f28; + fpsave[15] = f30; + + /* Force it into a stack slot so the asm won't barf. Sigh. */ + (void) &fsr; + asm("st %%fsr, %0" : "=m" (fsr)); + } + + /* Save the global registers (except for %g1, which is a scratch reg). */ + glsave[0] = g2; + glsave[1] = g4; + glsave[2] = g6; + + /* Call the user's handler. */ + (*((void EXFUN((*), (int sig, int code, struct sigcontext *context, + PTR addr))) handlers[sig])) + (sig, code, context, addr); + + /* Restore the Y register. */ + asm("mov %0, %%y" : : "r" (y)); + + if (savefpu) + { + /* Restore the FPU regs. */ + f0 = fpsave[0]; + f2 = fpsave[1]; + f4 = fpsave[2]; + f6 = fpsave[3]; + f8 = fpsave[4]; + f10 = fpsave[5]; + f12 = fpsave[6]; + f14 = fpsave[7]; + f16 = fpsave[8]; + f18 = fpsave[9]; + f20 = fpsave[10]; + f22 = fpsave[11]; + f24 = fpsave[12]; + f26 = fpsave[13]; + f28 = fpsave[14]; + f30 = fpsave[15]; + + asm("ld %0, %%fsr" : : "m" (fsr)); + } + + /* Restore the globals. */ + g2 = glsave[0]; + g4 = glsave[1]; + g6 = glsave[2]; + + /* Unwind a frame, and do a "sigcleanup" system call. + The system call apparently does a return. + I don't know what it's for. Ask Sun. */ + asm("restore %%g0, 139, %%g1\n" + "ta 0\n" + "mov %0, %0" /* Useless insn that will never be executed, */ + /* here to make the compiler happy. */ + : /* No outputs. */ : + /* CONTEXT is bound to %i0. We reference it as an input here to make + sure the compiler considers it live at this point, and preserves + the value in that register. The restore makes %i0 become %o0, the + argument to the system call. */ + "r" (context)); +} +#endif + +int +DEFUN(__sigvec, (sig, vec, ovec), + int sig AND CONST struct sigvec *vec AND struct sigvec *ovec) +{ +#ifndef mytramp + extern void _sigtramp (int); +#define trampoline _sigtramp +#endif + struct sigvec myvec; + int mask; + __sighandler_t ohandler; + + if (sig <= 0 || sig >= NSIG) + { + errno = EINVAL; + return -1; + } + + mask = __sigblock(sigmask(sig)); + + ohandler = handlers[sig]; + + if (vec != NULL && + vec->sv_handler != SIG_IGN && vec->sv_handler != SIG_DFL) + { + handlers[sig] = vec->sv_handler; + myvec = *vec; + myvec.sv_handler = trampoline; + vec = &myvec; + } + + if (__raw_sigvec(sig, vec, ovec) < 0) + { + int save = errno; + (void) __sigsetmask(mask); + errno = save; + return -1; + } + + if (ovec != NULL && ovec->sv_handler == trampoline) + ovec->sv_handler = ohandler; + + (void) __sigsetmask(mask); + + return 0; +} From a63531236ba7454d3a49f3ddb4796f0539212ef4 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 7 Feb 1992 23:50:07 +0000 Subject: [PATCH 0059/4487] Initial revision --- sysdeps/m68k/__longjmp.c | 54 ++++++++++++++++++++++++++++++++++++++++ sysdeps/m68k/fpu/fl.h | 36 +++++++++++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 sysdeps/m68k/__longjmp.c create mode 100644 sysdeps/m68k/fpu/fl.h diff --git a/sysdeps/m68k/__longjmp.c b/sysdeps/m68k/__longjmp.c new file mode 100644 index 0000000000..c00337c5f0 --- /dev/null +++ b/sysdeps/m68k/__longjmp.c @@ -0,0 +1,54 @@ +/* Copyright (C) 1991 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include + +/* Jump to the position specified by ENV, causing the + setjmp call there to return VAL, or 1 if VAL is 0. */ +__NORETURN +void +DEFUN(__longjmp, (env, val), CONST jmp_buf env AND int val) +{ + /* This restores the FP and SP that setjmp's caller had, + and puts the return address into A0 and VAL into D0. */ + +#if defined(__HAVE_68881__) || defined(__HAVE_FPU__) + /* Restore the floating-point registers. */ + asm volatile("fmovem%.x %0, fp0-fp7" : + /* No outputs. */ : "g" (env[0].__fpregs[0]) : + "fp0", "fp1", "fp2", "fp3", "fp4", "fp5", "fp6", "fp7"); +#endif + + /* Put VAL in D0. */ + asm volatile("move%.l %0, d0" : /* No outputs. */ : + "g" (val == 0 ? 1 : val) : "d0"); + + asm volatile(/* Restore the data and address registers. */ + "movem%.l %0, d1-d7/a0-a7\n" + /* Return to setjmp's caller. */ + "jmp a0@" : + /* No outputs. */ : "g" (env[0].__dregs[0]) + /* We don't bother with the clobbers, + because this code always jumps out anyway. */ + ); + + /* This call avoids `volatile function does return' warnings. */ + abort (); +} diff --git a/sysdeps/m68k/fpu/fl.h b/sysdeps/m68k/fpu/fl.h new file mode 100644 index 0000000000..add735122e --- /dev/null +++ b/sysdeps/m68k/fpu/fl.h @@ -0,0 +1,36 @@ +/* Floating-point constants for the 68881. + Copyright (C) 1992 Free Software Foundation, Inc. */ + +/* IGNORE($ This is used internally in the library. */ +#include +/* ansidecl.m4 here inserts the ieee file. Kludge o rama. + $) ENDCOMMENT INCLUDE($sysdeps/ieee754/fl.h$) STARTCOMMENT */ + +#if defined(FLT_ROUNDS) && defined(__GNUC__) +#undef FLT_ROUNDS + +/* Interrogate the 68881 to find the current rounding mode. */ + +static __const __inline int +DEFUN_VOID(__flt_rounds) +{ + unsigned long int __fpcr; + __asm("fmove%.l fpcr, %0" : "=g" (__fpcr)); + switch (__fpcr & (1 | 2)) + { + case 0: + return _FLT_ROUNDS_TONEAREST; + case 1: + return _FLT_ROUNDS_TOZERO; + case 2: + return _FLT_ROUNDS_TONEGINF; + case 3: + return _FLT_ROUNDS_TOPOSINF; + default: + return _FLT_ROUNDS_INDETERMINATE; + } +} + +#define FLT_ROUNDS (__flt_rounds()) + +#endif From 88601a51e20a19b273d2c01f1173bdfcdd9942b8 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 10 Feb 1992 05:19:22 +0000 Subject: [PATCH 0060/4487] Initial revision --- sysdeps/m68k/fpu/switch/Makefile | 52 ++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 sysdeps/m68k/fpu/switch/Makefile diff --git a/sysdeps/m68k/fpu/switch/Makefile b/sysdeps/m68k/fpu/switch/Makefile new file mode 100644 index 0000000000..0c020d9a79 --- /dev/null +++ b/sysdeps/m68k/fpu/switch/Makefile @@ -0,0 +1,52 @@ +# Copyright (C) 1991 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 Library General Public License as +# published by the Free Software Foundation; either version 2 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 +# Library General Public License for more details. + +# You should have received a copy of the GNU Library General Public +# License along with the GNU C Library; see the file COPYING.LIB. If +# not, write to the Free Software Foundation, Inc., 675 Mass Ave, +# Cambridge, MA 02139, USA. + +ifeq ($(subdir),math) + +sysdep_routines := $(sysdep_routines) switch + +# Find all the sources that have 68881 versions. ++68881-sources := \ + $(notdir $(wildcard $(addprefix $(filter %/68881,$(sysdirs)),$(sources)))) + +# Sysdep directories other than 68881 and 68881-switch (this one). ++non68881-dirs := $(filter-out %/68881 %/68881-switch,$(+sysdep_dirs)) + +# Get a non-68881 version of the target. ++non68881-version = $(firstword $(wildcard $(addsuffix /$@,$(+non68881-dirs)))) + +# Directory containing 68881 sources. ++68881-dir := $(filter %/68881,$(+sysdep_dirs)) + +# For all the files that have 68881 versions and don't exist already +# the source directory (math), automatically make ones that switch between +# 68881 and soft versions. +$(addprefix $(objpfx), \ + $(filter-out $(wildcard $(+68881-sources)),$(+68881-sources))): + (echo '#include ' ;\ + echo '#include <68881-switch.h>' ;\ + echo '#define $* __$*_68881' ;\ + echo '#include <$(+68881-dir)/$@>' ;\ + echo '#undef $*' ;\ + echo '#define $* __$*_soft' ;\ + echo '#include <$(non68881-version)>' ;\ + echo '#undef $*' ;\ + echo 'switching_function($*);') > $@-tmp + mv $@-tmp $@ + +endif From 0f47bb1782fe4e829d878e169f9eadeb335af3d5 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 12 Feb 1992 18:14:19 +0000 Subject: [PATCH 0061/4487] Formerly unix/bsd/sun/sparc/Makefile.~4~ --- sysdeps/unix/bsd/sun/sparc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/bsd/sun/sparc/Makefile b/sysdeps/unix/bsd/sun/sparc/Makefile index 5dd736f557..ac4121dc2c 100644 --- a/sysdeps/unix/bsd/sun/sparc/Makefile +++ b/sysdeps/unix/bsd/sun/sparc/Makefile @@ -1,3 +1,3 @@ ifeq ($(subdir),signal) -sysdep_routines := $(sysdep_routines) tramp_sigvec +sysdep_routines := $(sysdep_routines) sigtramp endif From 4a7b5e14f6134e982109a67c46a6a8c0cef1d72d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 12 Feb 1992 18:14:25 +0000 Subject: [PATCH 0062/4487] Formerly ./m68k/fpu/switch/Makefile.~4~ --- sysdeps/m68k/fpu/switch/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/m68k/fpu/switch/Makefile b/sysdeps/m68k/fpu/switch/Makefile index 0c020d9a79..691d2c948b 100644 --- a/sysdeps/m68k/fpu/switch/Makefile +++ b/sysdeps/m68k/fpu/switch/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1991 Free Software Foundation, Inc. +# Copyright (C) 1991, 1992 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 @@ -24,7 +24,7 @@ sysdep_routines := $(sysdep_routines) switch +68881-sources := \ $(notdir $(wildcard $(addprefix $(filter %/68881,$(sysdirs)),$(sources)))) -# Sysdep directories other than 68881 and 68881-switch (this one). +# Sysdep directories other than 68881 and 68881-sw (this one). +non68881-dirs := $(filter-out %/68881 %/68881-switch,$(+sysdep_dirs)) # Get a non-68881 version of the target. @@ -39,7 +39,7 @@ sysdep_routines := $(sysdep_routines) switch $(addprefix $(objpfx), \ $(filter-out $(wildcard $(+68881-sources)),$(+68881-sources))): (echo '#include ' ;\ - echo '#include <68881-switch.h>' ;\ + echo '#include <68881-sw.h>' ;\ echo '#define $* __$*_68881' ;\ echo '#include <$(+68881-dir)/$@>' ;\ echo '#undef $*' ;\ From 61de13729941b2a4f1638c39f9cfbbcfb3ee6680 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 12 Feb 1992 19:09:12 +0000 Subject: [PATCH 0063/4487] Initial revision --- sysdeps/m68k/setjmp.c | 48 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 sysdeps/m68k/setjmp.c diff --git a/sysdeps/m68k/setjmp.c b/sysdeps/m68k/setjmp.c new file mode 100644 index 0000000000..45bf8e6916 --- /dev/null +++ b/sysdeps/m68k/setjmp.c @@ -0,0 +1,48 @@ +/* Copyright (C) 1991 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include + + +/* Save the current program position in ENV and return 0. */ +int +DEFUN(__setjmp, (env), jmp_buf env) +{ + /* Save data registers D1 through D7. */ + asm volatile("movem%.l d1-d7, %0" : : "m" (env[0].__dregs)); + + /* Save return address in place of register A0. */ + env[0].__aregs[0] = (PTR) ((PTR *) &env)[-1]; + + /* Save address registers A1 through A5. */ + asm volatile("movem%.l a1-a5, %0" : : "m" (env[0].__aregs[1])); + + /* Save caller's FP, not our own. */ + env[0].__fp = (PTR) ((PTR *) &env)[-2]; + + /* Save caller's SP, not our own. */ + env[0].__sp = (PTR) &env; + +#if defined(__HAVE_68881__) || defined(__HAVE_FPU__) + /* Save floating-point (68881) registers FP0 through FP7. */ + asm volatile("fmovem%.x fp0-fp7, %0" : : "m" (env[0].__fpregs)); +#endif + + return 0; +} From 576e9962d4ffc9d2ab88b36cc415b19008e48d78 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 12 Feb 1992 19:49:16 +0000 Subject: [PATCH 0064/4487] Formerly unix/bsd/sun/sunos4/Dist.~3~ --- sysdeps/unix/bsd/sun/sunos4/Dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/bsd/sun/sunos4/Dist b/sysdeps/unix/bsd/sun/sunos4/Dist index 188fdd5fb9..d7500fde41 100644 --- a/sysdeps/unix/bsd/sun/sunos4/Dist +++ b/sysdeps/unix/bsd/sun/sunos4/Dist @@ -1 +1 @@ -__wait4_syscall.S +sys_wait4.S From 82a4cbb066ed7031b462cca0c437ecfbe54d6222 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 12 Feb 1992 19:49:28 +0000 Subject: [PATCH 0065/4487] entered into RCS --- sysdeps/m68k/fpu/switch/Dist | 2 +- sysdeps/unix/bsd/sun/sparc/Dist | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/m68k/fpu/switch/Dist b/sysdeps/m68k/fpu/switch/Dist index 70502fb121..1e00e4cd07 100644 --- a/sysdeps/m68k/fpu/switch/Dist +++ b/sysdeps/m68k/fpu/switch/Dist @@ -1 +1 @@ -68881-switch.h switch.c +68881-sw.h switch.c diff --git a/sysdeps/unix/bsd/sun/sparc/Dist b/sysdeps/unix/bsd/sun/sparc/Dist index 614a5410ca..cd893ff463 100644 --- a/sysdeps/unix/bsd/sun/sparc/Dist +++ b/sysdeps/unix/bsd/sun/sparc/Dist @@ -1 +1 @@ -tramp_sigvec.c +sigtramp.c From 00bd61bfb109c575ab25ae0d98b266e354177e87 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 14 Feb 1992 02:03:21 +0000 Subject: [PATCH 0066/4487] Formerly unix/bsd/sun/sunos4/Makefile.~2~ --- sysdeps/unix/bsd/sun/sunos4/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/bsd/sun/sunos4/Makefile b/sysdeps/unix/bsd/sun/sunos4/Makefile index 550ccbbe61..7cfecf2e18 100644 --- a/sysdeps/unix/bsd/sun/sunos4/Makefile +++ b/sysdeps/unix/bsd/sun/sunos4/Makefile @@ -1,3 +1,3 @@ ifeq ($(subdir), posix) -sysdep_routines := $(sysdep_routines) __wait4_syscall +sysdep_routines := $(sysdep_routines) sys_wait4 endif From 7f410893f8f8e93dc4b3673ea02afe1944806cb5 Mon Sep 17 00:00:00 2001 From: Torbjorn Granlund Date: Sat, 15 Feb 1992 17:52:41 +0000 Subject: [PATCH 0067/4487] Initial revision --- sysdeps/rs6000/memcopy.h | 86 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 sysdeps/rs6000/memcopy.h diff --git a/sysdeps/rs6000/memcopy.h b/sysdeps/rs6000/memcopy.h new file mode 100644 index 0000000000..36e9f2453b --- /dev/null +++ b/sysdeps/rs6000/memcopy.h @@ -0,0 +1,86 @@ +/* Copyright (C) 1991 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#undef OP_T_THRES +#define OP_T_THRES 32 + +#undef BYTE_COPY_FWD +#define BYTE_COPY_FWD(dst_bp, src_bp, nbytes) \ + do \ + { \ + size_t __nbytes = nbytes; \ + asm volatile("mtspr 1,%2\n" \ + "lsx 6,0,%1\n" \ + "stsx 6,0,%0" : /* No outputs. */ : \ + "b" (dst_bp), "b" (src_bp), "r" (__nbytes) : \ + "6", "7", "8", "9", "10", "11", "12", "13"); \ + dst_bp += __nbytes; \ + src_bp += __nbytes; \ + } while (0) + +#undef BYTE_COPY_BWD +#define BYTE_COPY_BWD(dst_ep, src_ep, nbytes) \ + do \ + { \ + size_t __nbytes; \ + dst_ep -= __nbytes; \ + src_ep -= __nbytes; \ + asm volatile("mtspr 1,%2\n" \ + "lsx 6,0,%1\n" \ + "stsx 6,0,%0" : /* No outputs. */ : \ + "b" (dst_ep), "b" (src_ep), "r" (__nbytes) : \ + "6", "7", "8", "9", "10", "11", "12", "13"); \ + } while (0) + +#undef WORD_COPY_FWD +#define WORD_COPY_FWD(dst_bp, src_bp, nbytes_left, nbytes) \ + do \ + { \ + size_t __nblocks = (nbytes) / 32; \ + if (__nblocks != 0) \ + asm volatile("mtctr %4\n" \ + "lsi 6,%1,32\n" \ + "ai %1,%1,32\n" \ + "stsi 6,%0,32\n" \ + "ai %0,%0,32\n" \ + "bdn $-16" : \ + "=b" (dst_bp), "=b" (src_bp) : \ + "0" (dst_bp), "1" (src_bp), "r" (__nblocks) : \ + "6", "7", "8", "9", "10", "11", "12", "13"); \ + (nbytes_left) = (nbytes) % 32; \ + } while (0) + +#undef WORD_COPY_BWD +#define WORD_COPY_BWD(dst_ep, src_ep, nbytes_left, nbytes) \ + do \ + { \ + size_t __nblocks = (nbytes) / 32; \ + if (__nblocks != 0) \ + asm volatile("mtctr %4\n" \ + "ai %1,%1,-32\n" \ + "lsi 6,%1,32\n" \ + "ai %0,%0,-32\n" \ + "stsi 6,%0,32\n" \ + "bdn $-16" : \ + "=b" (dst_ep), "=b" (src_ep) : \ + "0" (dst_ep), "1" (src_ep), "r" (__nblocks) : \ + "6", "7", "8", "9", "10", "11", "12", "13"); \ + (nbytes_left) = (nbytes) % 32; \ + } while (0) From d5d2d8ac215d8acbef01aa27900e26ab175e9baa Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 17 Feb 1992 05:54:02 +0000 Subject: [PATCH 0068/4487] Initial revision --- sysdeps/unix/bsd/sun/m68k/Makefile | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/bsd/sun/m68k/Makefile diff --git a/sysdeps/unix/bsd/sun/m68k/Makefile b/sysdeps/unix/bsd/sun/m68k/Makefile new file mode 100644 index 0000000000..2f0cd2e874 --- /dev/null +++ b/sysdeps/unix/bsd/sun/m68k/Makefile @@ -0,0 +1 @@ +include $(+sysdep_dir)/unix/bsd/hp9k3bsd/Makefile From 1f4e0d9b7771ff32c70406b2b6be86ad575adb9e Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 17 Feb 1992 09:28:47 +0000 Subject: [PATCH 0069/4487] entered into RCS --- sysdeps/unix/bsd/hp/m68k/getdents.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/bsd/hp/m68k/getdents.S b/sysdeps/unix/bsd/hp/m68k/getdents.S index f025591785..6d18c04eca 100644 --- a/sysdeps/unix/bsd/hp/m68k/getdents.S +++ b/sysdeps/unix/bsd/hp/m68k/getdents.S @@ -1 +1 @@ -#include +#include From 3cf947268dbe118695b4b957eb1e62854ece47fc Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 11 Mar 1992 00:26:52 +0000 Subject: [PATCH 0070/4487] entered into RCS --- sysdeps/unix/bsd/m68k/start.c | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sysdeps/unix/bsd/m68k/start.c diff --git a/sysdeps/unix/bsd/m68k/start.c b/sysdeps/unix/bsd/m68k/start.c new file mode 100644 index 0000000000..1067853d61 --- /dev/null +++ b/sysdeps/unix/bsd/m68k/start.c @@ -0,0 +1,3 @@ +#define DUMMIES ignore0 + +#include From 030ac448d8accfad42c17c2e1a6f36c18db6b455 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 11 Mar 1992 02:10:11 +0000 Subject: [PATCH 0071/4487] Formerly unix/bsd/sun/m68k/sysdep.h.~12~ --- sysdeps/unix/bsd/sun/m68k/sysdep.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/sysdeps/unix/bsd/sun/m68k/sysdep.h b/sysdeps/unix/bsd/sun/m68k/sysdep.h index bf0b226fe7..10bdcfbd21 100644 --- a/sysdeps/unix/bsd/sun/m68k/sysdep.h +++ b/sysdeps/unix/bsd/sun/m68k/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992 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 @@ -16,8 +16,12 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +/* This code wants to be run through m4. */ + #include +#define POUND(foo) (@@@Hash-Here@@@)foo + #ifdef __STDC__ #define ENTRY(name) \ .globl _##name; \ @@ -32,26 +36,22 @@ Cambridge, MA 02139, USA. */ #ifdef __STDC__ #define PSEUDO(name, syscall_name) \ - .set sysno, SYS_##syscall_name; \ - .set zero, 0; \ .even; \ .globl syscall_error; \ error: jmp syscall_error; \ ENTRY (name) \ - pea sysno; \ - trap zero; \ - bcs error \ + pea SYS_##syscall_name; \ + trap POUND(0); \ + bcs error #else #define PSEUDO(name, syscall_name) \ - .set sysno, SYS_/**/syscall_name; \ - .set zero, 0; \ .even; \ .globl syscall_error; \ error: jmp syscall_error; \ ENTRY (name) \ - pea sysno; \ - trap zero; \ - bcs error \ + pea SYS_/**/syscall_name; \ + trap POUND(0); \ + bcs error #endif #define ret rts From 7ea0dcaf37d0a1303db6eab559746965526bb43c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 11 Mar 1992 02:28:38 +0000 Subject: [PATCH 0072/4487] Formerly unix/bsd/hp/m68k/__brk.S.~4~ --- sysdeps/unix/bsd/hp/m68k/brk.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/bsd/hp/m68k/brk.S b/sysdeps/unix/bsd/hp/m68k/brk.S index 023b0b5b09..6de00b149b 100644 --- a/sysdeps/unix/bsd/hp/m68k/brk.S +++ b/sysdeps/unix/bsd/hp/m68k/brk.S @@ -22,7 +22,7 @@ Cambridge, MA 02139, USA. */ #define SYS_brk 17 #endif -#ifndef __GNU_STAB__ +#ifndef HAVE_GNU_LD #define __end _end #endif @@ -33,7 +33,7 @@ ___curbrk: .text ENTRY (__brk) - movel __end, d0 + movel POUND(__end), d0 cmpl sp@(4), d0 ble 0f movel d0, sp@(4) From bbbd4cb342b5b411935f57417809672f43de4fab Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 11 Mar 1992 02:28:42 +0000 Subject: [PATCH 0073/4487] Formerly unix/bsd/sun/m68k/sethostid.S.~4~ --- sysdeps/unix/bsd/sun/m68k/sethostid.S | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sysdeps/unix/bsd/sun/m68k/sethostid.S b/sysdeps/unix/bsd/sun/m68k/sethostid.S index 9f536d293b..8401251e80 100644 --- a/sysdeps/unix/bsd/sun/m68k/sethostid.S +++ b/sysdeps/unix/bsd/sun/m68k/sethostid.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992 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,7 +25,7 @@ SYSCALL (sethostid) #else -#include +#include .globl _sethostid .even @@ -34,11 +34,10 @@ _sethostid: moveq #-1, d0 rts -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD -#include - -stub_warning(sethostid); +.stabs "warning: sethostid is not implemented and will always fail",30,0,0,0 +.stabs "_sethostid",1,0,0,0 #endif From 5447072c696cbee81700f2926a9c31e9fec34df4 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 11 Mar 1992 02:28:44 +0000 Subject: [PATCH 0074/4487] Formerly unix/bsd/sun/m68k/__brk.S.~4~ --- sysdeps/unix/bsd/sun/m68k/brk.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/bsd/sun/m68k/brk.S b/sysdeps/unix/bsd/sun/m68k/brk.S index 6e0c2f27ee..21d2ea5468 100644 --- a/sysdeps/unix/bsd/sun/m68k/brk.S +++ b/sysdeps/unix/bsd/sun/m68k/brk.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992 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 @@ -22,7 +22,7 @@ Cambridge, MA 02139, USA. */ #define SYS_brk 17 #endif -#ifndef __GNU_STAB__ +#ifndef HAVE_GNU_LD #define __end _end #endif @@ -37,7 +37,7 @@ ENTRY (__brk) cmpl sp@(4), d0 ble 0f movel d0, sp@(4) -0: pea @POUND(SYS_brk) +0: pea SYS_brk trap POUND(0) bcs 1f movel sp@(4), ___curbrk From b12f81969618c478e5a1619403b92e63078448f5 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 11 Mar 1992 02:28:48 +0000 Subject: [PATCH 0075/4487] Formerly unix/bsd/sun/sparc/sethostid.S.~5~ --- sysdeps/unix/bsd/sun/sparc/sethostid.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/bsd/sun/sparc/sethostid.S b/sysdeps/unix/bsd/sun/sparc/sethostid.S index e7981e9cde..04e6e981be 100644 --- a/sysdeps/unix/bsd/sun/sparc/sethostid.S +++ b/sysdeps/unix/bsd/sun/sparc/sethostid.S @@ -32,9 +32,9 @@ ENTRY (sethostid) sethi %hi(___errno), %g1 st %o0, [%g1 + %lo(___errno)] retl - sub 0, 1, %o0 + sub %g0, 1, %o0 -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD .stabs "warning: sethostid is not implemented and will always fail",30,0,0,0 .stabs "_sethostid",1,0,0,0 From 3120ef0231909f84a23aa3d0f7cbc5b9efad4776 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 11 Mar 1992 02:28:58 +0000 Subject: [PATCH 0076/4487] Initial revision --- sysdeps/unix/bsd/vax/sysdep.S | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 sysdeps/unix/bsd/vax/sysdep.S diff --git a/sysdeps/unix/bsd/vax/sysdep.S b/sysdeps/unix/bsd/vax/sysdep.S new file mode 100644 index 0000000000..af18b563b5 --- /dev/null +++ b/sysdeps/unix/bsd/vax/sysdep.S @@ -0,0 +1,28 @@ +/* Copyright (C) 1991 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifdef HAVE_GNU_LD +#define ___errno _errno +#endif + +.globl ___errno +.globl syscall_error +syscall_error: + movl r0, ___errno + mnegl $1, r0 + ret From 1cc063a7808d126341d8196d5b51085b1a2c1df4 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 11 Mar 1992 02:34:24 +0000 Subject: [PATCH 0077/4487] entered into RCS --- sysdeps/unix/bsd/vax/brk.S | 21 ++++++++++++++------- sysdeps/vax/memccpy.c | 12 ++++++------ 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/sysdeps/unix/bsd/vax/brk.S b/sysdeps/unix/bsd/vax/brk.S index eb583a4d1d..9186d863b6 100644 --- a/sysdeps/unix/bsd/vax/brk.S +++ b/sysdeps/unix/bsd/vax/brk.S @@ -22,17 +22,24 @@ Cambridge, MA 02139, USA. */ #define SYS_brk 17 #endif +#ifndef HAVE_GNU_LD +#define __end _end +#endif + .data .globl ___curbrk ___curbrk: -#ifdef __GNU_STAB__ - .long ___end -#else - .long _end -#endif + .long __end .text -SYSCALL__ (brk) - movl r0, ___curbrk +ENTRY (__brk) + cmpl 4(ap), __end + bgeq 0f + movl __env, 4(ap) +0: chmk $SYS_brk + bcs 1f + movl 4(ap), ___curbrk clrl r0 ret +1: + jmp syscall_error diff --git a/sysdeps/vax/memccpy.c b/sysdeps/vax/memccpy.c index ca01fb32a8..84df894c3f 100644 --- a/sysdeps/vax/memccpy.c +++ b/sysdeps/vax/memccpy.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992 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 @@ -22,22 +22,22 @@ Cambridge, MA 02139, USA. */ /* Copy no more than N bytes of SRC to DEST, stopping when C is found. Return the position in DEST one byte past where C was copied, - or NULL if C was not found in the first NBYTES bytes of SRC. */ + or NULL if C was not found in the first N bytes of SRC. */ PTR DEFUN(__memccpy, (dest, src, c, n), PTR dest AND CONST PTR src AND int c AND size_t nbytes) { - /* Except when NBYTES > 65535, this is what a hand-coded version would + /* Except when N > 65535, this is what a hand-coded version would do anyway. */ - PTR found = memchr(src, c, n); + PTR found = memchr (src, c, n); if (found == NULL) { - (void) memcpy(dest, src, n); + (void) memcpy (dest, src, n); return NULL; } - (void) memcpy(dest, src, (char *) found + 1 - (char *) src); + (void) memcpy (dest, src, (char *) found + 1 - (char *) src); return (PTR) ((char *) dest + ((char *) found + 1 - (char *) src)); } From 0fcd922f111d2bcc843ef7e7d55a27e5990c12b8 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 11 Mar 1992 05:16:11 +0000 Subject: [PATCH 0078/4487] Initial revision --- sysdeps/unix/bsd/m68k/sysdep.S | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 sysdeps/unix/bsd/m68k/sysdep.S diff --git a/sysdeps/unix/bsd/m68k/sysdep.S b/sysdeps/unix/bsd/m68k/sysdep.S new file mode 100644 index 0000000000..764bc4beb8 --- /dev/null +++ b/sysdeps/unix/bsd/m68k/sysdep.S @@ -0,0 +1,23 @@ +/* Copyright (C) 1991, 1992 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +.globl syscall_error +syscall_error: + movel d0, _errno + moveq #-1, d0 + rts From 1ab822933f98a2ba77a3c439382768585a54c4d6 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 11 Mar 1992 23:09:31 +0000 Subject: [PATCH 0079/4487] Formerly unix/bsd/sun/sparc/sigtramp.c.~2~ --- sysdeps/unix/bsd/sun/sparc/sigtramp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/bsd/sun/sparc/sigtramp.c b/sysdeps/unix/bsd/sun/sparc/sigtramp.c index 5896e3c51d..1ccdf02f39 100644 --- a/sysdeps/unix/bsd/sun/sparc/sigtramp.c +++ b/sysdeps/unix/bsd/sun/sparc/sigtramp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992 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 @@ -18,6 +18,10 @@ Cambridge, MA 02139, USA. */ #include +#ifndef __GNUC__ + #error This file uses GNU C extensions; you must compile with GCC. +#endif + /* Get the definition of `struct sigcontext'. */ #define KERNEL #define sigvec sun_sigvec From 64f177adbc9f0decc7bac2aec12629744cd3aa25 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 11 Mar 1992 23:09:53 +0000 Subject: [PATCH 0080/4487] Formerly m68k/setjmp.c.~6~ --- sysdeps/m68k/setjmp.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sysdeps/m68k/setjmp.c b/sysdeps/m68k/setjmp.c index 45bf8e6916..aa7d7d1fe6 100644 --- a/sysdeps/m68k/setjmp.c +++ b/sysdeps/m68k/setjmp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992 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,12 +20,17 @@ Cambridge, MA 02139, USA. */ #include +#ifndef __GNUC__ + #error This file uses GNU C extensions; you must compile with GCC. +#endif + + /* Save the current program position in ENV and return 0. */ int DEFUN(__setjmp, (env), jmp_buf env) { /* Save data registers D1 through D7. */ - asm volatile("movem%.l d1-d7, %0" : : "m" (env[0].__dregs)); + asm volatile("movem%.l d1-d7, %0" : : "m" (env[0].__dregs[0])); /* Save return address in place of register A0. */ env[0].__aregs[0] = (PTR) ((PTR *) &env)[-1]; From a8ca560a49c3ac948069f361f9ca186877cd8d34 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 11 Mar 1992 23:09:57 +0000 Subject: [PATCH 0081/4487] Formerly m68k/__longjmp.c.~4~ --- sysdeps/m68k/__longjmp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sysdeps/m68k/__longjmp.c b/sysdeps/m68k/__longjmp.c index c00337c5f0..cff37bcf9e 100644 --- a/sysdeps/m68k/__longjmp.c +++ b/sysdeps/m68k/__longjmp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992 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,6 +20,10 @@ Cambridge, MA 02139, USA. */ #include #include +#ifndef __GNUC__ + #error This file uses GNU C extensions; you must compile with GCC. +#endif + /* Jump to the position specified by ENV, causing the setjmp call there to return VAL, or 1 if VAL is 0. */ __NORETURN From f92ed3b27214d866e5c7fa4c528da9f890390def Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 11 Mar 1992 23:10:11 +0000 Subject: [PATCH 0082/4487] Formerly m68k/ffs.c.~3~ --- sysdeps/m68k/ffs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/m68k/ffs.c b/sysdeps/m68k/ffs.c index d54b2faaff..f77a0afab5 100644 --- a/sysdeps/m68k/ffs.c +++ b/sysdeps/m68k/ffs.c @@ -1,6 +1,6 @@ /* ffs -- find first set bit in a word, counted from least significant end. For mc68020, mc68030, mc68040. - Copyright (C) 1991 Free Software Foundation, Inc. + Copyright (C) 1991, 1992 Free Software Foundation, Inc. Contributed by Torbjorn Granlund (tege@sics.se). The GNU C Library is free software; you can redistribute it and/or @@ -23,7 +23,7 @@ Cambridge, MA 02139, USA. */ #undef ffs -#if defined(__mc68020__) || defined(mc68020) +#if defined (__GNUC__) && defined (__mc68020__) int DEFUN(ffs, (x), int x) From e96f4881dbc0d78ef9bc9c6d6002066b29a6af4d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 11 Mar 1992 23:10:37 +0000 Subject: [PATCH 0083/4487] entered into RCS --- sysdeps/am29k/ffs.c | 8 +++++++- sysdeps/m88k/ffs.c | 8 +++++++- sysdeps/rs6000/ffs.c | 8 +++++++- sysdeps/unix/bsd/hp/m68k/start.c | 4 ++-- sysdeps/vax/__longjmp.c | 6 +++++- sysdeps/vax/setjmp.c | 6 +++++- 6 files changed, 33 insertions(+), 7 deletions(-) diff --git a/sysdeps/am29k/ffs.c b/sysdeps/am29k/ffs.c index 6e0846c979..0f38f8795c 100644 --- a/sysdeps/am29k/ffs.c +++ b/sysdeps/am29k/ffs.c @@ -1,6 +1,6 @@ /* ffs -- find first set bit in a word, counted from least significant end. For Amd 290x0. - Copyright (C) 1991 Free Software Foundation, Inc. + Copyright (C) 1991, 1992 Free Software Foundation, Inc. Contributed by Torbjorn Granlund (tege@sics.se). The GNU C Library is free software; you can redistribute it and/or @@ -23,6 +23,8 @@ Cambridge, MA 02139, USA. */ #undef ffs +#ifdef __GNUC__ + int DEFUN(ffs, (x), int x) { @@ -32,3 +34,7 @@ DEFUN(ffs, (x), int x) return 32 - cnt; } + +#else +#include +#endif diff --git a/sysdeps/m88k/ffs.c b/sysdeps/m88k/ffs.c index 85f40528a9..effca9a0d2 100644 --- a/sysdeps/m88k/ffs.c +++ b/sysdeps/m88k/ffs.c @@ -1,6 +1,6 @@ /* ffs -- find first set bit in a word, counted from least significant end. For Motorola 88000. - Copyright (C) 1991 Free Software Foundation, Inc. + Copyright (C) 1991, 1992 Free Software Foundation, Inc. Contributed by Torbjorn Granlund (tege@sics.se). The GNU C Library is free software; you can redistribute it and/or @@ -23,6 +23,8 @@ Cambridge, MA 02139, USA. */ #undef ffs +#ifdef __GNUC__ + int DEFUN(ffs, (x), int x) { @@ -34,3 +36,7 @@ DEFUN(ffs, (x), int x) asm ("ff1 %0,%1" : "=r" (cnt) : "r" (x & -x)); return cnt + 1; } + +#else +#include +#endif diff --git a/sysdeps/rs6000/ffs.c b/sysdeps/rs6000/ffs.c index b8dfcdf878..44e7a434d2 100644 --- a/sysdeps/rs6000/ffs.c +++ b/sysdeps/rs6000/ffs.c @@ -1,6 +1,6 @@ /* ffs -- find first set bit in a word, counted from least significant end. For IBM rs6000. - Copyright (C) 1991 Free Software Foundation, Inc. + Copyright (C) 1991, 1992 Free Software Foundation, Inc. Contributed by Torbjorn Granlund (tege@sics.se). The GNU C Library is free software; you can redistribute it and/or @@ -23,6 +23,8 @@ Cambridge, MA 02139, USA. */ #undef ffs +#ifdef __GNUC__ + int DEFUN(ffs, (x), int x) { @@ -31,3 +33,7 @@ DEFUN(ffs, (x), int x) asm ("cntlz %0,%1" : "=r" (cnt) : "r" (x & -x)); return 32 - cnt; } + +#else +#include +#endif diff --git a/sysdeps/unix/bsd/hp/m68k/start.c b/sysdeps/unix/bsd/hp/m68k/start.c index 4b321562d4..e04ca0632d 100644 --- a/sysdeps/unix/bsd/hp/m68k/start.c +++ b/sysdeps/unix/bsd/hp/m68k/start.c @@ -1,7 +1,7 @@ /* hp300 4.3 BSD starts at 4, rather than 0, when the start address is 0. Go figure. */ -asm(".globl __start\n" - "__start: .long 0"); +asm(".globl __start"); +asm("__start: .long 0"); #define _start __start0 diff --git a/sysdeps/vax/__longjmp.c b/sysdeps/vax/__longjmp.c index e6979b7d31..fadfae7b28 100644 --- a/sysdeps/vax/__longjmp.c +++ b/sysdeps/vax/__longjmp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. Derived from @(#)_setjmp.s 5.7 (Berkeley) 6/27/88, Copyright (c) 1980 Regents of the University of California. @@ -20,6 +20,10 @@ Cambridge, MA 02139, USA. */ #include #include +#ifndef __GNUC__ + #error This file uses GNU C extensions; you must compile with GCC. +#endif + #define REI 02 /* Vax `rei' opcode. */ diff --git a/sysdeps/vax/setjmp.c b/sysdeps/vax/setjmp.c index 9687421802..0124ae3df5 100644 --- a/sysdeps/vax/setjmp.c +++ b/sysdeps/vax/setjmp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. Derived from @(#)_setjmp.s 5.7 (Berkeley) 6/27/88, Copyright (c) 1980 Regents of the University of California. @@ -20,6 +20,10 @@ Cambridge, MA 02139, USA. */ #include #include +#ifndef __GNUC__ + #error This file uses GNU C extensions; you must compile with GCC. +#endif + /* Save the current program position in ENV and return 0. */ int From f4a378895f14acdb2be1e6497b7024f1970e8fd6 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 11 Mar 1992 23:27:38 +0000 Subject: [PATCH 0084/4487] Formerly ./m68k/fpu/switch/switch.c.~5~ --- sysdeps/m68k/fpu/switch/switch.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/sysdeps/m68k/fpu/switch/switch.c b/sysdeps/m68k/fpu/switch/switch.c index bba52f2cb8..b1deef2e98 100644 --- a/sysdeps/m68k/fpu/switch/switch.c +++ b/sysdeps/m68k/fpu/switch/switch.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992 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 @@ -27,11 +27,8 @@ Cambridge, MA 02139, USA. */ #define TRAPSIG SIGILL #endif -/* Nonzero if we have determined whether or not there is a 68881. */ -static int tested_fpu = 0; - -/* Nonzero if we have a 68881. */ -static int have_fpu; +/* Zero if no 68881, one if we have a 68881, or -1 if we don't know yet. */ +static int have_fpu = -1; /* Signal handler for the trap that happens if we don't have a 68881. */ @@ -53,10 +50,10 @@ DEFUN(__68881_switch, (dummy), int dummy) struct switch_caller *CONST caller = (struct switch_caller *) (((short int *) *return_address_location) - 1); - if (!tested_fpu) + if (have_fpu < 0) { /* Figure out whether or not we have a 68881. */ - __sighandler_t handler = signal(TRAPSIG, trap); + __sighandler_t handler = signal (TRAPSIG, trap); if (handler == SIG_ERR) /* We can't figure it out, so assume we don't have a 68881. This assumption will never cause us any problems other than @@ -70,14 +67,11 @@ DEFUN(__68881_switch, (dummy), int dummy) If we don't have one, this will trap and the signal handler will clear `have_fpu'. */ have_fpu = 1; - asm("fnop"); + asm ("fnop"); /* Restore the old signal handler. */ - (void) signal(TRAPSIG, handler); + (void) signal (TRAPSIG, handler); } - - /* Say that we've tested for a 68881, so we only do it once. */ - tested_fpu = 1; } /* Modify the caller to be a jump to the appropriate address. */ From 94292cd3a45f6fdd585388f9dbcd48877cdb02dd Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 11 Mar 1992 23:33:14 +0000 Subject: [PATCH 0085/4487] Formerly ./m68k/fpu/switch/Makefile.~5~ --- sysdeps/m68k/fpu/switch/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/m68k/fpu/switch/Makefile b/sysdeps/m68k/fpu/switch/Makefile index 691d2c948b..9482471597 100644 --- a/sysdeps/m68k/fpu/switch/Makefile +++ b/sysdeps/m68k/fpu/switch/Makefile @@ -33,7 +33,7 @@ sysdep_routines := $(sysdep_routines) switch # Directory containing 68881 sources. +68881-dir := $(filter %/68881,$(+sysdep_dirs)) -# For all the files that have 68881 versions and don't exist already +# For all the files that have 68881 versions and don't exist already in # the source directory (math), automatically make ones that switch between # 68881 and soft versions. $(addprefix $(objpfx), \ From e419b460b0668d8076e83faca36d1a8a1663dcac Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 15 Mar 1992 22:51:19 +0000 Subject: [PATCH 0086/4487] entered into RCS --- sysdeps/vax/infnan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/vax/infnan.c b/sysdeps/vax/infnan.c index 1b9c7d3520..aa755ed6bc 100644 --- a/sysdeps/vax/infnan.c +++ b/sysdeps/vax/infnan.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992 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 @@ -17,7 +17,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef __GNUC__ -#include <../sysdeps/generic/infnan.c> + #error This file uses GNU C extensions; you must compile with GCC. #else #include From c7486d0b53fb2017e5fa528356248053044670fe Mon Sep 17 00:00:00 2001 From: Torbjorn Granlund Date: Tue, 17 Mar 1992 16:42:55 +0000 Subject: [PATCH 0087/4487] entered into RCS --- sysdeps/m68k/memcopy.h | 18 +++++++++--------- sysdeps/rs6000/memcopy.h | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sysdeps/m68k/memcopy.h b/sysdeps/m68k/memcopy.h index 7b0385c273..862e1b8a7f 100644 --- a/sysdeps/m68k/memcopy.h +++ b/sysdeps/m68k/memcopy.h @@ -67,24 +67,24 @@ Cambridge, MA 02139, USA. */ do \ { \ size_t __nblocks = (nbytes) / 32 + 1; \ - switch ((nbytes) % 32 / sizeof (op_t)) \ + switch ((nbytes) / sizeof (op_t) % 8) \ do \ { \ - --((op_t *) dst_ep) = --((op_t *) src_ep); \ + *--((op_t *) dst_ep) = *--((op_t *) src_ep); \ case 7: \ - --((op_t *) dst_ep) = --((op_t *) src_ep); \ + *--((op_t *) dst_ep) = *--((op_t *) src_ep); \ case 6: \ - --((op_t *) dst_ep) = --((op_t *) src_ep); \ + *--((op_t *) dst_ep) = *--((op_t *) src_ep); \ case 5: \ - --((op_t *) dst_ep) = --((op_t *) src_ep); \ + *--((op_t *) dst_ep) = *--((op_t *) src_ep); \ case 4: \ - --((op_t *) dst_ep) = --((op_t *) src_ep); \ + *--((op_t *) dst_ep) = *--((op_t *) src_ep); \ case 3: \ - --((op_t *) dst_ep) = --((op_t *) src_ep); \ + *--((op_t *) dst_ep) = *--((op_t *) src_ep); \ case 2: \ - --((op_t *) dst_ep) = --((op_t *) src_ep); \ + *--((op_t *) dst_ep) = *--((op_t *) src_ep); \ case 1: \ - --((op_t *) dst_ep) = --((op_t *) src_ep); \ + *--((op_t *) dst_ep) = *--((op_t *) src_ep); \ case 0: \ __nblocks--; \ } \ diff --git a/sysdeps/rs6000/memcopy.h b/sysdeps/rs6000/memcopy.h index 36e9f2453b..873b31200b 100644 --- a/sysdeps/rs6000/memcopy.h +++ b/sysdeps/rs6000/memcopy.h @@ -39,7 +39,7 @@ Cambridge, MA 02139, USA. */ #define BYTE_COPY_BWD(dst_ep, src_ep, nbytes) \ do \ { \ - size_t __nbytes; \ + size_t __nbytes = (nbytes); \ dst_ep -= __nbytes; \ src_ep -= __nbytes; \ asm volatile("mtspr 1,%2\n" \ From 81a40581043d7179b7fbd21e18fec335e2c12c06 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 23 Mar 1992 22:26:36 +0000 Subject: [PATCH 0088/4487] entered into RCS --- sysdeps/m68k/setjmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/m68k/setjmp.c b/sysdeps/m68k/setjmp.c index aa7d7d1fe6..66695b8afb 100644 --- a/sysdeps/m68k/setjmp.c +++ b/sysdeps/m68k/setjmp.c @@ -46,7 +46,7 @@ DEFUN(__setjmp, (env), jmp_buf env) #if defined(__HAVE_68881__) || defined(__HAVE_FPU__) /* Save floating-point (68881) registers FP0 through FP7. */ - asm volatile("fmovem%.x fp0-fp7, %0" : : "m" (env[0].__fpregs)); + asm volatile("fmovem%.x fp0-fp7, %0" : : "m" (env[0].__fpregs[0])); #endif return 0; From 93895df7c5cebcd684dc91b9dbb097e8d249fd69 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 1 Apr 1992 07:10:17 +0000 Subject: [PATCH 0089/4487] Initial revision --- sysdeps/unix/sysv/i386/signal.S | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 sysdeps/unix/sysv/i386/signal.S diff --git a/sysdeps/unix/sysv/i386/signal.S b/sysdeps/unix/sysv/i386/signal.S new file mode 100644 index 0000000000..6fd8113557 --- /dev/null +++ b/sysdeps/unix/sysv/i386/signal.S @@ -0,0 +1,31 @@ +/* Copyright (C) 1992 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +/* This is just a standard system call, except we need to load %edx + with the address of the `__sigreturn' function. */ + + .globl syscall_error + .globl ___sigreturn +ENTRY (signal) + lea SYS_signal, %eax + lea ___sigreturn, %edx + .byte 0x9a, 0, 0, 0, 0, 7, 0 + jb syscall_error + ret From dd4e6c808a2196f86ad2c4717f5e6ddfe1cb9ad4 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 15 Apr 1992 05:55:48 +0000 Subject: [PATCH 0090/4487] Initial revision --- sysdeps/unix/sysv/sysv4/Dist | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/sysv4/Dist diff --git a/sysdeps/unix/sysv/sysv4/Dist b/sysdeps/unix/sysv/sysv4/Dist new file mode 100644 index 0000000000..300fa29757 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/Dist @@ -0,0 +1 @@ +sys_getdents.S From 77b69521ed5c24871af13b1d29193ee3381c7bf0 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 15 Apr 1992 05:55:58 +0000 Subject: [PATCH 0091/4487] Formerly sysdeps/unix/sysv/sysv4/Dist.~2~ --- sysdeps/unix/sysv/sysv4/Dist | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/sysv4/Dist b/sysdeps/unix/sysv/sysv4/Dist index 300fa29757..f23793c4a4 100644 --- a/sysdeps/unix/sysv/sysv4/Dist +++ b/sysdeps/unix/sysv/sysv4/Dist @@ -1 +1,2 @@ sys_getdents.S +bsddir.h From 65f6f3f18517896d9a2887ae41f07b013cf0ae43 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Tue, 21 Apr 1992 06:37:46 +0000 Subject: [PATCH 0092/4487] Formerly unix/bsd/hp/m68k/sysdep.h.~23~ --- sysdeps/unix/bsd/hp/m68k/sysdep.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/bsd/hp/m68k/sysdep.h b/sysdeps/unix/bsd/hp/m68k/sysdep.h index e02e5af50a..533aff6fa8 100644 --- a/sysdeps/unix/bsd/hp/m68k/sysdep.h +++ b/sysdeps/unix/bsd/hp/m68k/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992 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 @@ -35,7 +35,7 @@ Cambridge, MA 02139, USA. */ #endif #ifdef __STDC__ -#define PSEUDO(name, syscall_name) \ +#define PSEUDO(name, syscall_name, args) \ .even; \ .globl syscall_error; \ error: jmp syscall_error; \ @@ -44,7 +44,7 @@ Cambridge, MA 02139, USA. */ trap POUND(0); \ bcs error #else -#define PSEUDO(name, syscall_name) \ +#define PSEUDO(name, syscall_name, args) \ .even; \ .globl syscall_error; \ error: jmp syscall_error; \ From 5896e6b5a58b6d6a2571cec470df629134533245 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Tue, 21 Apr 1992 06:37:47 +0000 Subject: [PATCH 0093/4487] Formerly unix/bsd/sun/m68k/sysdep.h.~13~ --- sysdeps/unix/bsd/sun/m68k/sysdep.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/bsd/sun/m68k/sysdep.h b/sysdeps/unix/bsd/sun/m68k/sysdep.h index 10bdcfbd21..8dd61b56a7 100644 --- a/sysdeps/unix/bsd/sun/m68k/sysdep.h +++ b/sysdeps/unix/bsd/sun/m68k/sysdep.h @@ -35,7 +35,7 @@ Cambridge, MA 02139, USA. */ #endif #ifdef __STDC__ -#define PSEUDO(name, syscall_name) \ +#define PSEUDO(name, syscall_name, args) \ .even; \ .globl syscall_error; \ error: jmp syscall_error; \ @@ -44,7 +44,7 @@ Cambridge, MA 02139, USA. */ trap POUND(0); \ bcs error #else -#define PSEUDO(name, syscall_name) \ +#define PSEUDO(name, syscall_name, args) \ .even; \ .globl syscall_error; \ error: jmp syscall_error; \ From 22aa9559d139f3599e5f2a232fbd3f653c7ab11f Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Tue, 21 Apr 1992 06:37:48 +0000 Subject: [PATCH 0094/4487] Formerly unix/bsd/vax/sysdep.h.~10~ --- sysdeps/unix/bsd/vax/sysdep.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/bsd/vax/sysdep.h b/sysdeps/unix/bsd/vax/sysdep.h index 85ac2263d0..112a1c052b 100644 --- a/sysdeps/unix/bsd/vax/sysdep.h +++ b/sysdeps/unix/bsd/vax/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992 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 @@ -31,7 +31,7 @@ Cambridge, MA 02139, USA. */ #endif #ifdef __STDC__ -#define PSEUDO(name, syscall_name) \ +#define PSEUDO(name, syscall_name, args) \ .even; \ .globl syscall_error \ error: jmp syscall_error; \ @@ -39,7 +39,7 @@ Cambridge, MA 02139, USA. */ chmk $SYS_##syscall_name \ bcs error #else -#define PSEUDO(name, syscall_name) \ +#define PSEUDO(name, syscall_name, args) \ .even; \ .globl syscall_error \ error: jmp syscall_error; \ From 49b1fb6a132ff039d030ba4b9c05604cd0b2fd77 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Tue, 21 Apr 1992 06:38:06 +0000 Subject: [PATCH 0095/4487] Initial revision --- sysdeps/unix/bsd/m68k/pipe.S | 25 +++++++++++++++++++++++++ sysdeps/unix/bsd/m68k/wait.S | 26 ++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 sysdeps/unix/bsd/m68k/pipe.S create mode 100644 sysdeps/unix/bsd/m68k/wait.S diff --git a/sysdeps/unix/bsd/m68k/pipe.S b/sysdeps/unix/bsd/m68k/pipe.S new file mode 100644 index 0000000000..26ca4cb4ee --- /dev/null +++ b/sysdeps/unix/bsd/m68k/pipe.S @@ -0,0 +1,25 @@ +/* Copyright (C) 1991, 1992 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +SYSCALL__ (pipe, 1) + moveal sp@(4), a0 + moveml d0-d1, a0@ + clrl d0 + rts diff --git a/sysdeps/unix/bsd/m68k/wait.S b/sysdeps/unix/bsd/m68k/wait.S new file mode 100644 index 0000000000..2d4b1b6f07 --- /dev/null +++ b/sysdeps/unix/bsd/m68k/wait.S @@ -0,0 +1,26 @@ +/* Copyright (C) 1991, 1992 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +SYSCALL__ (wait, 1) + tstl sp@(4) + beq 1f + moveal sp@(4), a0 + movel d1, a0@ +1: rts From b9d5ecea3bdd77e0c7717fb39e794ae30f4161e4 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Tue, 21 Apr 1992 06:38:08 +0000 Subject: [PATCH 0096/4487] Formerly unix/bsd/hp/m68k/__wait3.S.~3~ --- sysdeps/unix/bsd/hp/m68k/wait3.S | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/bsd/hp/m68k/wait3.S b/sysdeps/unix/bsd/hp/m68k/wait3.S index 4b4815dbe6..c8e6623f88 100644 --- a/sysdeps/unix/bsd/hp/m68k/wait3.S +++ b/sysdeps/unix/bsd/hp/m68k/wait3.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992 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 @@ -18,8 +18,7 @@ Cambridge, MA 02139, USA. */ #include -.globl ___wait3 -___wait3: +ENTRY(___wait3) movel sp@(8), d1 moveal sp@(12), a0 movel #SYS_wait, d0 From 1ec2e22cd8641ceb9af61a14069bf8c5e4b598f0 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Tue, 21 Apr 1992 06:38:09 +0000 Subject: [PATCH 0097/4487] Formerly unix/bsd/sun/m68k/sethostid.S.~5~ --- sysdeps/unix/bsd/sun/m68k/sethostid.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/bsd/sun/m68k/sethostid.S b/sysdeps/unix/bsd/sun/m68k/sethostid.S index 8401251e80..7b128a1f77 100644 --- a/sysdeps/unix/bsd/sun/m68k/sethostid.S +++ b/sysdeps/unix/bsd/sun/m68k/sethostid.S @@ -20,7 +20,7 @@ Cambridge, MA 02139, USA. */ #ifdef SYS_sethostid -SYSCALL (sethostid) +SYSCALL (sethostid, 1) ret #else From c7ce7d98342b84e92b2f2df68abc3cc48f5d66ae Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Tue, 21 Apr 1992 06:38:09 +0000 Subject: [PATCH 0098/4487] Formerly unix/bsd/sun/sunos4/sys_wait4.S.~2~ --- sysdeps/unix/bsd/sun/sunos4/sys_wait4.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/bsd/sun/sunos4/sys_wait4.S b/sysdeps/unix/bsd/sun/sunos4/sys_wait4.S index dee21b7051..6b796b7ea6 100644 --- a/sysdeps/unix/bsd/sun/sunos4/sys_wait4.S +++ b/sysdeps/unix/bsd/sun/sunos4/sys_wait4.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992 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 @@ -18,5 +18,5 @@ Cambridge, MA 02139, USA. */ #include -PSEUDO (__wait4_syscall, wait4) +PSEUDO (__wait4_syscall, wait4, 4) ret From 125d6372d2148436172df343fa502db377ae6645 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Tue, 21 Apr 1992 06:38:10 +0000 Subject: [PATCH 0099/4487] Formerly unix/bsd/sun/sparc/sethostid.S.~6~ --- sysdeps/unix/bsd/sun/sparc/sethostid.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/bsd/sun/sparc/sethostid.S b/sysdeps/unix/bsd/sun/sparc/sethostid.S index 04e6e981be..7f5309b484 100644 --- a/sysdeps/unix/bsd/sun/sparc/sethostid.S +++ b/sysdeps/unix/bsd/sun/sparc/sethostid.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992 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,7 +20,7 @@ Cambridge, MA 02139, USA. */ #ifdef SYS_sethostid -SYSCALL (sethostid) +SYSCALL (sethostid, 1) ret #else From b736bc09321871c1ac697463149e569a2fe48d4c Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Tue, 21 Apr 1992 06:38:12 +0000 Subject: [PATCH 0100/4487] entered into RCS --- sysdeps/unix/bsd/sun/getdents.S | 4 ++-- sysdeps/unix/bsd/sun/sigvec.S | 24 ++++++++++++++++++++++++ sysdeps/unix/bsd/vax/pipe.S | 4 ++-- sysdeps/unix/bsd/vax/wait.S | 4 ++-- sysdeps/unix/bsd/vax/wait3.S | 5 ++--- 5 files changed, 32 insertions(+), 9 deletions(-) create mode 100644 sysdeps/unix/bsd/sun/sigvec.S diff --git a/sysdeps/unix/bsd/sun/getdents.S b/sysdeps/unix/bsd/sun/getdents.S index 20116de868..6c4f7afa7a 100644 --- a/sysdeps/unix/bsd/sun/getdents.S +++ b/sysdeps/unix/bsd/sun/getdents.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992 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 @@ -18,5 +18,5 @@ Cambridge, MA 02139, USA. */ #include -SYSCALL__ (getdirentries) +SYSCALL__ (getdirentries, 4) ret diff --git a/sysdeps/unix/bsd/sun/sigvec.S b/sysdeps/unix/bsd/sun/sigvec.S new file mode 100644 index 0000000000..fdf919c7b8 --- /dev/null +++ b/sysdeps/unix/bsd/sun/sigvec.S @@ -0,0 +1,24 @@ +/* Copyright (C) 1991, 1992 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +/* __sigvec is defined by sigtramp.c. */ + +PSEUDO (__raw_sigvec, sigvec, 3) + ret diff --git a/sysdeps/unix/bsd/vax/pipe.S b/sysdeps/unix/bsd/vax/pipe.S index 67c6e22c03..9501744c11 100644 --- a/sysdeps/unix/bsd/vax/pipe.S +++ b/sysdeps/unix/bsd/vax/pipe.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992 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 @@ -18,7 +18,7 @@ Cambridge, MA 02139, USA. */ #include -SYSCALL__ (pipe) +SYSCALL__ (pipe, 1) movl 4(ap), r2 movl r0, (r2)+ movl r1, (r2) diff --git a/sysdeps/unix/bsd/vax/wait.S b/sysdeps/unix/bsd/vax/wait.S index 8b8da20674..5316be2026 100644 --- a/sysdeps/unix/bsd/vax/wait.S +++ b/sysdeps/unix/bsd/vax/wait.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992 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 @@ -18,7 +18,7 @@ Cambridge, MA 02139, USA. */ #include -SYSCALL__ (wait) +SYSCALL__ (wait, 1) movl 4(ap), r2 beq 1f movl r1, (r2) diff --git a/sysdeps/unix/bsd/vax/wait3.S b/sysdeps/unix/bsd/vax/wait3.S index 0d6e94a2bd..2e7ab13d38 100644 --- a/sysdeps/unix/bsd/vax/wait3.S +++ b/sysdeps/unix/bsd/vax/wait3.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992 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 @@ -18,8 +18,7 @@ Cambridge, MA 02139, USA. */ #include -.globl ___wait3 -___wait3: +ENTRY(___wait3) movel 8(ap), r1 movel 12(ap), r0 /* Set all condition codes to tell the kernel this is wait3. */ From 8d2fcc7ff62ff1247a80f806af25433d707082c0 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 21 Apr 1992 08:37:37 +0000 Subject: [PATCH 0101/4487] entered into RCS --- sysdeps/vax/huge_val.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 sysdeps/vax/huge_val.h diff --git a/sysdeps/vax/huge_val.h b/sysdeps/vax/huge_val.h new file mode 100644 index 0000000000..58f5415446 --- /dev/null +++ b/sysdeps/vax/huge_val.h @@ -0,0 +1,27 @@ +/* `HUGE_VAL' constant for Vaxen. + Used by and functions for overflow. + +Copyright (C) 1992 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifndef _HUGE_VAL_H +#define _HUGE_VAL_H 1 + +#define HUGE_VAL 1.70141182460469227e38 + +#endif /* huge_val.h */ From d4262d1229fdb728153afa3dbc7142d9162c49ad Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Thu, 30 Apr 1992 03:04:58 +0000 Subject: [PATCH 0102/4487] Formerly unix/bsd/hp/m68k/sysdep.h.~24~ --- sysdeps/unix/bsd/hp/m68k/sysdep.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/bsd/hp/m68k/sysdep.h b/sysdeps/unix/bsd/hp/m68k/sysdep.h index 533aff6fa8..c5bee6af56 100644 --- a/sysdeps/unix/bsd/hp/m68k/sysdep.h +++ b/sysdeps/unix/bsd/hp/m68k/sysdep.h @@ -57,4 +57,4 @@ Cambridge, MA 02139, USA. */ #define ret rts #define r0 d0 #define r1 d1 -#define movl movel +#define MOVE(x,y) movel x , y From 02c31dffbaf49e85e4ae149bca12fbc9c6e4e27e Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Thu, 30 Apr 1992 03:04:59 +0000 Subject: [PATCH 0103/4487] Formerly unix/bsd/sun/m68k/sysdep.h.~14~ --- sysdeps/unix/bsd/sun/m68k/sysdep.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/bsd/sun/m68k/sysdep.h b/sysdeps/unix/bsd/sun/m68k/sysdep.h index 8dd61b56a7..9b9ace0561 100644 --- a/sysdeps/unix/bsd/sun/m68k/sysdep.h +++ b/sysdeps/unix/bsd/sun/m68k/sysdep.h @@ -57,4 +57,4 @@ Cambridge, MA 02139, USA. */ #define ret rts #define r0 d0 #define r1 d1 -#define movl movel +#define MOVE(x,y) movel x , y From c3d301b1ba598dc44d09b75f5745fd81aa2db29e Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Thu, 30 Apr 1992 03:09:48 +0000 Subject: [PATCH 0104/4487] Initial revision --- sysdeps/mips/jmp_buf.h | 44 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 sysdeps/mips/jmp_buf.h diff --git a/sysdeps/mips/jmp_buf.h b/sysdeps/mips/jmp_buf.h new file mode 100644 index 0000000000..9f191a1dba --- /dev/null +++ b/sysdeps/mips/jmp_buf.h @@ -0,0 +1,44 @@ +/* Copyright (C) 1992 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@cs.widener.edu). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Define the machine-dependent type `jmp_buf'. Mips version. */ + +typedef struct +{ + /* Program counter when the signal hit. */ + int __pc; + + /* Stack pointer. */ + int __sp; + + /* Callee-saved registers s0 through s7. */ + int __regs[8]; + + /* The frame pointer. */ + int __fp; + + /* The global pointer. */ + int __gp; + + /* Floating point status register. */ + int __fpc_csr; + + /* Callee-saved floating point registers. */ + int __fpregs[6]; + +} __jmp_buf[1]; From 0927a511514bea9de1c4585b268d49cb5de035be Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Thu, 30 Apr 1992 03:10:23 +0000 Subject: [PATCH 0105/4487] Formerly mips/jmp_buf.h.~2~ --- sysdeps/mips/jmp_buf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/mips/jmp_buf.h b/sysdeps/mips/jmp_buf.h index 9f191a1dba..b2c9edbe01 100644 --- a/sysdeps/mips/jmp_buf.h +++ b/sysdeps/mips/jmp_buf.h @@ -39,6 +39,6 @@ typedef struct int __fpc_csr; /* Callee-saved floating point registers. */ - int __fpregs[6]; + double __fpregs[6]; } __jmp_buf[1]; From e6eb480835bbda55454c358a21a5d967a58133e8 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Thu, 30 Apr 1992 03:11:03 +0000 Subject: [PATCH 0106/4487] entered into RCS --- sysdeps/mips/Implies | 2 + sysdeps/mips/Makefile | 3 ++ sysdeps/unix/bsd/ultrix4/getdents.S | 1 + sysdeps/unix/bsd/ultrix4/mips/sigvec.S | 24 ++++++++++ sysdeps/unix/bsd/ultrix4/posix_opt.h | 23 ++++++++++ sysdeps/unix/bsd/ultrix4/sysconf.c | 61 ++++++++++++++++++++++++++ sysdeps/unix/bsd/vax/sysdep.h | 2 + 7 files changed, 116 insertions(+) create mode 100644 sysdeps/mips/Implies create mode 100644 sysdeps/mips/Makefile create mode 100644 sysdeps/unix/bsd/ultrix4/getdents.S create mode 100644 sysdeps/unix/bsd/ultrix4/mips/sigvec.S create mode 100644 sysdeps/unix/bsd/ultrix4/posix_opt.h create mode 100644 sysdeps/unix/bsd/ultrix4/sysconf.c diff --git a/sysdeps/mips/Implies b/sysdeps/mips/Implies new file mode 100644 index 0000000000..60732cef94 --- /dev/null +++ b/sysdeps/mips/Implies @@ -0,0 +1,2 @@ +# MIPS uses IEEE 754 floating point. +ieee754 diff --git a/sysdeps/mips/Makefile b/sysdeps/mips/Makefile new file mode 100644 index 0000000000..736414197a --- /dev/null +++ b/sysdeps/mips/Makefile @@ -0,0 +1,3 @@ +ifeq ($(subdir),setjmp) +sysdep_routines := $(sysdep_routines) setjmp_aux +endif diff --git a/sysdeps/unix/bsd/ultrix4/getdents.S b/sysdeps/unix/bsd/ultrix4/getdents.S new file mode 100644 index 0000000000..6d18c04eca --- /dev/null +++ b/sysdeps/unix/bsd/ultrix4/getdents.S @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/bsd/ultrix4/mips/sigvec.S b/sysdeps/unix/bsd/ultrix4/mips/sigvec.S new file mode 100644 index 0000000000..fdf919c7b8 --- /dev/null +++ b/sysdeps/unix/bsd/ultrix4/mips/sigvec.S @@ -0,0 +1,24 @@ +/* Copyright (C) 1991, 1992 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +/* __sigvec is defined by sigtramp.c. */ + +PSEUDO (__raw_sigvec, sigvec, 3) + ret diff --git a/sysdeps/unix/bsd/ultrix4/posix_opt.h b/sysdeps/unix/bsd/ultrix4/posix_opt.h new file mode 100644 index 0000000000..ecd04d1f0e --- /dev/null +++ b/sysdeps/unix/bsd/ultrix4/posix_opt.h @@ -0,0 +1,23 @@ +/* Copyright (C) 1992 Free Software Foundation, Inc. + Contributed by Ian Lance Taylor (ian@airs.com). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#define _POSIX_JOB_CONTROL 1 +#define _POSIX_SAVED_IDS 1 +#define _POSIX_CHOWN_RESTRICTED 1 +#define _POSIX_NO_TRUNC 1 +#define _POSIX_VDISABLE ((unsigned char) -1) diff --git a/sysdeps/unix/bsd/ultrix4/sysconf.c b/sysdeps/unix/bsd/ultrix4/sysconf.c new file mode 100644 index 0000000000..c0b32038bb --- /dev/null +++ b/sysdeps/unix/bsd/ultrix4/sysconf.c @@ -0,0 +1,61 @@ +/* Copyright (C) 1992 Free Software Foundation, Inc. + Contributed by Ian Lance Taylor (ian@airs.com). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* On Ultrix we can use the getsysinfo call to get the right return + value for _SC_CHILD_MAX. Everything else is from , + which the default sysconf already knows how to handle. */ + +#include +#include +#include + +/* This is an Ultrix header file. */ +#include + +extern int EXFUN(__getsysinfo, (unsigned int op, void *buffer, + size_t nbytes, int *start, + void *arg)); +extern long int EXFUN(__default_sysconf, (int name)); + +long int +DEFUN(__sysconf, (name), int name) +{ + if (name == _SC_CHILD_MAX) + { + int save = errno; + int start = 0; + int ret; + + /* getsysinfo returns the number of values it put into the + buffer, or 0 if not available, or -1 on error. */ + if (__getsysinfo (GSI_MAX_UPROCS, &ret, sizeof (ret), &start, + (void *) 0) > 0) + { + errno = save; + return ret; + } + + errno = save; + } + + return __default_sysconf (name); +} + +#define __sysconf __default_sysconf + +#include diff --git a/sysdeps/unix/bsd/vax/sysdep.h b/sysdeps/unix/bsd/vax/sysdep.h index 112a1c052b..60e01acf7b 100644 --- a/sysdeps/unix/bsd/vax/sysdep.h +++ b/sysdeps/unix/bsd/vax/sysdep.h @@ -47,3 +47,5 @@ Cambridge, MA 02139, USA. */ chmk $SYS_/**/syscall_name \ bcs error #endif + +#define MOVE(x,y) movl x , y From 92a3358cb948747d4a48104a6877838fa4c9e8da Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Thu, 30 Apr 1992 03:11:04 +0000 Subject: [PATCH 0107/4487] Initial revision --- sysdeps/mips/__longjmp.c | 79 +++++++++++++++ sysdeps/mips/setjmp.S | 27 +++++ sysdeps/mips/setjmp_aux.c | 65 ++++++++++++ sysdeps/unix/bsd/ultrix4/Makefile | 6 ++ sysdeps/unix/bsd/ultrix4/mips/__handler.S | 109 +++++++++++++++++++++ sysdeps/unix/bsd/ultrix4/mips/sigcontext.h | 60 ++++++++++++ sysdeps/unix/bsd/ultrix4/mips/sigtramp.c | 61 ++++++++++++ 7 files changed, 407 insertions(+) create mode 100644 sysdeps/mips/__longjmp.c create mode 100644 sysdeps/mips/setjmp.S create mode 100644 sysdeps/mips/setjmp_aux.c create mode 100644 sysdeps/unix/bsd/ultrix4/Makefile create mode 100644 sysdeps/unix/bsd/ultrix4/mips/__handler.S create mode 100644 sysdeps/unix/bsd/ultrix4/mips/sigcontext.h create mode 100644 sysdeps/unix/bsd/ultrix4/mips/sigtramp.c diff --git a/sysdeps/mips/__longjmp.c b/sysdeps/mips/__longjmp.c new file mode 100644 index 0000000000..1828714803 --- /dev/null +++ b/sysdeps/mips/__longjmp.c @@ -0,0 +1,79 @@ +/* Copyright (C) 1992 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@cs.widener.edu). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include + +#undef __longjmp + +__NORETURN +void +DEFUN(__longjmp, (env, val_arg), CONST __jmp_buf env AND int val_arg) +{ + /* gcc 1.39.19 miscompiled the longjmp routine (as it did setjmp before + the hack around it); force it to use $a1 for the longjmp value. + Without this it saves $a1 in a register which gets clobbered + along the way. */ + register int val asm ("a1"); + + /* Pull back the floating point callee-saved registers. */ + asm volatile ("l.d $f20, %0" : : "m" (env[0].__fpregs[0])); + asm volatile ("l.d $f22, %0" : : "m" (env[0].__fpregs[1])); + asm volatile ("l.d $f24, %0" : : "m" (env[0].__fpregs[2])); + asm volatile ("l.d $f26, %0" : : "m" (env[0].__fpregs[3])); + asm volatile ("l.d $f28, %0" : : "m" (env[0].__fpregs[4])); + asm volatile ("l.d $f30, %0" : : "m" (env[0].__fpregs[5])); + + /* Restore the stack pointer. */ + asm volatile ("lw $29, %0" : : "m" (env[0].__sp)); + + /* Get and reconstruct the floating point csr. */ + asm volatile ("lw $2, %0" : : "m" (env[0].__fpc_csr)); + asm volatile ("ctc1 $2, $31"); + + /* Get the FP. */ + asm volatile ("lw $30, %0" : : "m" (env[0].__fp)); + + /* Get the GP. */ + asm volatile ("lw $gp, %0" : : "m" (env[0].__gp)); + + /* Get the callee-saved registers. */ + asm volatile ("lw $16, %0" : : "m" (env[0].__regs[0])); + asm volatile ("lw $17, %0" : : "m" (env[0].__regs[1])); + asm volatile ("lw $18, %0" : : "m" (env[0].__regs[2])); + asm volatile ("lw $19, %0" : : "m" (env[0].__regs[3])); + asm volatile ("lw $20, %0" : : "m" (env[0].__regs[4])); + asm volatile ("lw $21, %0" : : "m" (env[0].__regs[5])); + asm volatile ("lw $22, %0" : : "m" (env[0].__regs[6])); + asm volatile ("lw $23, %0" : : "m" (env[0].__regs[7])); + + /* Get the PC. */ + asm volatile ("lw $31, %0" : : "m" (env[0].__pc)); + + /* Give setjmp() 1 if given a 0, or what they gave us if non-zero. */ + if (val == 0) + asm volatile ("li $2, 1"); + else + asm volatile ("move $2, %0" : : "r" (val)); + + asm volatile ("j $31"); + + /* Follow the trend.. */ + abort (); +} diff --git a/sysdeps/mips/setjmp.S b/sysdeps/mips/setjmp.S new file mode 100644 index 0000000000..bb473461aa --- /dev/null +++ b/sysdeps/mips/setjmp.S @@ -0,0 +1,27 @@ +/* Copyright (C) 1992 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +/* The function __setjmp_aux saves all the registers, but it can't + reliably access the stack or frame pointers, so we pass them in as + extra arguments. */ +ENTRY (__setjmp) + move a1, sp + move a2, $fp + j __setjmp_aux diff --git a/sysdeps/mips/setjmp_aux.c b/sysdeps/mips/setjmp_aux.c new file mode 100644 index 0000000000..e4c9d20132 --- /dev/null +++ b/sysdeps/mips/setjmp_aux.c @@ -0,0 +1,65 @@ +/* Copyright (C) 1992 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@cs.widener.edu). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include + +/* This function is only called via the assembly language routine + __setjmp, which arranges to pass in the stack pointer and the frame + pointer. We do things this way because it's difficult to reliably + access them in C. */ + +int +DEFUN(__setjmp_aux, (env, sp, fp), __jmp_buf env AND int sp AND int fp) +{ + /* Store the floating point callee-saved registers... */ + asm volatile ("s.d $f20, %0" : : "m" (env[0].__fpregs[0])); + asm volatile ("s.d $f22, %0" : : "m" (env[0].__fpregs[1])); + asm volatile ("s.d $f24, %0" : : "m" (env[0].__fpregs[2])); + asm volatile ("s.d $f26, %0" : : "m" (env[0].__fpregs[3])); + asm volatile ("s.d $f28, %0" : : "m" (env[0].__fpregs[4])); + asm volatile ("s.d $f30, %0" : : "m" (env[0].__fpregs[5])); + + /* .. and the PC; */ + asm volatile ("sw $31, %0" : : "m" (env[0].__pc)); + + /* .. and the stack pointer; */ + asm volatile ("sw %1, %0" : : "m" (env[0].__sp), "r" (sp)); + + /* .. and the FP; it'll be in s8. */ + asm volatile ("sw %1, %0" : : "m" (env[0].__fp), "r" (fp)); + + /* .. and the GP; */ + asm volatile ("sw $gp, %0" : : "m" (env[0].__gp)); + + /* .. and the callee-saved registers; */ + asm volatile ("sw $16, %0" : : "m" (env[0].__regs[0])); + asm volatile ("sw $17, %0" : : "m" (env[0].__regs[1])); + asm volatile ("sw $18, %0" : : "m" (env[0].__regs[2])); + asm volatile ("sw $19, %0" : : "m" (env[0].__regs[3])); + asm volatile ("sw $20, %0" : : "m" (env[0].__regs[4])); + asm volatile ("sw $21, %0" : : "m" (env[0].__regs[5])); + asm volatile ("sw $22, %0" : : "m" (env[0].__regs[6])); + asm volatile ("sw $23, %0" : : "m" (env[0].__regs[7])); + + /* .. and finally get and reconstruct the floating point csr. */ + asm volatile ("cfc1 $2, $31"); + asm volatile ("sw $2, %0" : : "m" (env[0].__fpc_csr)); + + return 0; +} diff --git a/sysdeps/unix/bsd/ultrix4/Makefile b/sysdeps/unix/bsd/ultrix4/Makefile new file mode 100644 index 0000000000..b90d9601c2 --- /dev/null +++ b/sysdeps/unix/bsd/ultrix4/Makefile @@ -0,0 +1,6 @@ +ifeq ($(subdir),signal) +sysdep_routines := $(sysdep_routines) sigtramp __handler +endif +ifeq ($(subdir),posix) +sysdep_routines := $(sysdep_routines) __getsysinf +endif diff --git a/sysdeps/unix/bsd/ultrix4/mips/__handler.S b/sysdeps/unix/bsd/ultrix4/mips/__handler.S new file mode 100644 index 0000000000..6f26028078 --- /dev/null +++ b/sysdeps/unix/bsd/ultrix4/mips/__handler.S @@ -0,0 +1,109 @@ +/* Copyright (C) 1992 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@cs.widener.edu). + Also hacked by Ian Lance Taylor (ian@airs.com). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +/* This function saves all the registers, calls the + user function, and then executes a sigreturn system call. The + sigreturn call wants the address of a sigcontext structure. This + is all hideously system dependent and, for all intents and + purposes, undocumented. + + When we enter here, a3 holds the user's signal handler. We are + supposed to fill in the context given in a2, and then pass it and + the first two arguments to the user's function. If the user's + function returns, we execute a sigreturn system call. + + The sc_onstack, sc_mask and sc_pc elements of the context are + already set by the kernel. For some reason we don't have to save + the floating point state or the coprocessor state; the kernel may + have saved them for us, or it doesn't use them. */ + +.set noat +ENTRY (__handler) + /* Store zero and the asm temp reg. */ + sw $0, 12(a2) + sw AT, 16(a2) + + /* Put v1 in sc_regs[3]. */ + sw v1, 24(a2) + + /* Save the caller saved registers in sc_regs[8..15]. */ + sw t0, 44(a2) + sw t1, 48(a2) + sw t2, 52(a2) + sw t3, 56(a2) + sw t4, 60(a2) + sw t5, 64(a2) + sw t6, 48(a2) + sw t7, 52(a2) + + /* Save the callee saved registers in sc_regs[16..23]. */ + sw s0, 76(a2) + sw s1, 80(a2) + sw s2, 84(a2) + sw s3, 88(a2) + sw s4, 92(a2) + sw s5, 96(a2) + sw s6, 100(a2) + sw s7, 104(a2) + + /* Save the code generator registers in sc_regs[24] & sc_regs[25]. */ + sw t8, 108(a2) + sw t9, 112(a2) + + /* Save the kernel temp regs in sc_regs[26] & sc_regs[27]. */ + sw k0, 116(a2) + sw k1, 120(a2) + + /* Save the global pointer in sc_regs[28]. */ + sw gp, 124(a2) + + /* ... and also the return address in sc_regs[31]. */ + sw ra, 136(a2) + + /* Save the floating pointer and the stack pointer in + sc_regs[29] and sc_regs[30]. */ + sw sp, 128(a2) + sw $fp, 132(a2) + + /* Save the mul/div stuff in sc_mdlo and sc_mdhi. */ + mflo t0 + sw t0, 140(a2) + mfhi t0 + sw t0, 144(a2) + + /* Move the stack up four. This will save the context. */ + addu sp, sp, -32 + sw a2, 16(sp) + + /* Call their handler with the signal, code, and context; note + this will clobber the context. */ + .set noreorder + jal ra, a3 + nop + .set reorder + + /* When we come back, restore the context and pass it right + on into sigreturn(). */ + lw a0, 16(sp) + + /* Do a sigreturn syscall; this doesn't return. */ + la v0, __sigreturn + jal ra, v0 diff --git a/sysdeps/unix/bsd/ultrix4/mips/sigcontext.h b/sysdeps/unix/bsd/ultrix4/mips/sigcontext.h new file mode 100644 index 0000000000..267964f368 --- /dev/null +++ b/sysdeps/unix/bsd/ultrix4/mips/sigcontext.h @@ -0,0 +1,60 @@ +/* Copyright (C) 1992 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@cs.widener.edu). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Note that ANY change to this instantly implies a change to __handler.S. */ + +struct sigcontext +{ + /* onsigstack flag, for the sigstack state we should restore */ + int sc_onstack; + + /* signal mask to restore */ + sigset_t sc_mask; + + /* Program counter when the signal hit. */ + int sc_pc; + + /* registers 0 through 31 */ + int sc_regs[32]; + + /* mul/div low and hi; these aren't part of a jmpbuf, but are part of the + sigcontext and are referenced from the signal trampoline code. */ + int sc_mdlo; + int sc_mdhi; + + /* Flag to see if the fp's been used. */ + int sc_ownedfp; + + /* floating point registers 0 to 31 */ + int sc_fpregs[32]; + /* control & status register for fp */ + int sc_fpc_csr; + + /* exception instruction register for fp */ + int sc_fpc_eir; + + /* The coprocessor's cause register. */ + int sc_cause; + + /* CPU bad virtual address. */ + int sc_badvaddr; + + /* CPU board bad physical address. */ + int sc_badpaddr; +}; + diff --git a/sysdeps/unix/bsd/ultrix4/mips/sigtramp.c b/sysdeps/unix/bsd/ultrix4/mips/sigtramp.c new file mode 100644 index 0000000000..f653e266c9 --- /dev/null +++ b/sysdeps/unix/bsd/ultrix4/mips/sigtramp.c @@ -0,0 +1,61 @@ +/* Copyright (C) 1992 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* The sigvec system call on MIPS Ultrix takes an additional + parameter, which is the address that is actually called when the + signal occurs. + + When a signal occurs, we arrange for the kernel to call __handler. + That will save the frame and stack pointers into the context, and + then jump to this routine. See __handler.S. + + This code is based on sysdeps/unix/bsd/sun4/sigtramp.c, but it's + different because since we get passed the user signal handler we + don't actually need a trampoline. */ + +#include + +#ifndef __GNUC__ + #error This file uses GNU C extensions; you must compile with GCC. +#endif + +/* This will also get us sigcontext.h. */ +#include +#include +#include + +/* The user's signal handler is called with three arguments. */ +typedef void (*handler_type) (int sig, int code, struct sigcontext *); + +/* Defined in __raw_sigvec.S. */ +extern int EXFUN(__raw_sigvec, (int sig, CONST struct sigvec *vec, + struct sigvec *ovec, + void (*)(int sig, int code, + struct sigcontext *, + handler_type))); + +extern void EXFUN(__handler, (int sig, int code, + struct sigcontext *, + handler_type)); + +int +DEFUN(__sigvec, (sig, vec, ovec), + int sig AND CONST struct sigvec *vec AND struct sigvec *ovec) +{ + return __raw_sigvec (sig, vec, ovec, __handler); +} From 5914f782fc80491cfaf56a4f577acfa28956cdab Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Thu, 30 Apr 1992 03:20:31 +0000 Subject: [PATCH 0108/4487] Formerly mips/jmp_buf.h.~3~ --- sysdeps/mips/jmp_buf.h | 53 +++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/sysdeps/mips/jmp_buf.h b/sysdeps/mips/jmp_buf.h index b2c9edbe01..c6b10fb5fb 100644 --- a/sysdeps/mips/jmp_buf.h +++ b/sysdeps/mips/jmp_buf.h @@ -1,5 +1,7 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@cs.widener.edu). +/* Define the machine-dependent type `jmp_buf'. Mips version. + +Copyright (C) 1992 Free Software Foundation, Inc. +Contributed by Brendan Kehoe (brendan@cs.widener.edu). 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 @@ -16,29 +18,26 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* Define the machine-dependent type `jmp_buf'. Mips version. */ - typedef struct -{ - /* Program counter when the signal hit. */ - int __pc; - - /* Stack pointer. */ - int __sp; - - /* Callee-saved registers s0 through s7. */ - int __regs[8]; - - /* The frame pointer. */ - int __fp; - - /* The global pointer. */ - int __gp; - - /* Floating point status register. */ - int __fpc_csr; - - /* Callee-saved floating point registers. */ - double __fpregs[6]; - -} __jmp_buf[1]; + { + /* Program counter. */ + PTR __pc; + + /* Stack pointer. */ + PTR __sp; + + /* Callee-saved registers s0 through s7. */ + int __regs[8]; + + /* The frame pointer. */ + PTR __fp; + + /* The global pointer. */ + PTR __gp; + + /* Floating point status register. */ + int __fpc_csr; + + /* Callee-saved floating point registers. */ + double __fpregs[6]; + } __jmp_buf[1]; From cbe3ec39f3b4038071d2120fc247d2dcaaf2bdd9 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 30 Apr 1992 03:21:33 +0000 Subject: [PATCH 0109/4487] Formerly mips/setjmp.S.~2~ --- sysdeps/mips/setjmp.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/mips/setjmp.S b/sysdeps/mips/setjmp.S index bb473461aa..963a718ed8 100644 --- a/sysdeps/mips/setjmp.S +++ b/sysdeps/mips/setjmp.S @@ -24,4 +24,4 @@ Cambridge, MA 02139, USA. */ ENTRY (__setjmp) move a1, sp move a2, $fp - j __setjmp_aux + j ___setjmp_aux From 394238a7976bd145740389b1bb9bfb31fbefcb26 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 30 Apr 1992 05:09:14 +0000 Subject: [PATCH 0110/4487] entered into RCS --- sysdeps/unix/bsd/ultrix4/mips/Makefile | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sysdeps/unix/bsd/ultrix4/mips/Makefile diff --git a/sysdeps/unix/bsd/ultrix4/mips/Makefile b/sysdeps/unix/bsd/ultrix4/mips/Makefile new file mode 100644 index 0000000000..0b71fd9e18 --- /dev/null +++ b/sysdeps/unix/bsd/ultrix4/mips/Makefile @@ -0,0 +1,3 @@ +ifeq ($(subdir),signal) +sysdep_routines := $(sysdep_routines) sigtramp __handler +endif From 58b006e0cf9c9d1dc67f7f501f4361c6cb44871e Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 30 Apr 1992 06:00:32 +0000 Subject: [PATCH 0111/4487] Formerly unix/bsd/sony/newsos/m68k/Implies.~3~ --- sysdeps/unix/bsd/sony/newsos/m68k/Implies | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/bsd/sony/newsos/m68k/Implies b/sysdeps/unix/bsd/sony/newsos/m68k/Implies index 2fae0d847d..44f7b8afb0 100644 --- a/sysdeps/unix/bsd/sony/newsos/m68k/Implies +++ b/sysdeps/unix/bsd/sony/newsos/m68k/Implies @@ -1,2 +1,2 @@ # A news800 is almost exactly like an hp300 -unix/bsd/hp9k3bsd +unix/hp/m68k From fa13ab3dc44afb6daf97ab880ea73d6935324304 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 30 Apr 1992 07:10:37 +0000 Subject: [PATCH 0112/4487] Formerly unix/bsd/ultrix4/mips/sigcontext.h.~2~ --- sysdeps/unix/bsd/ultrix4/mips/sigcontext.h | 76 +++++++++++----------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/sysdeps/unix/bsd/ultrix4/mips/sigcontext.h b/sysdeps/unix/bsd/ultrix4/mips/sigcontext.h index 267964f368..60bb31247b 100644 --- a/sysdeps/unix/bsd/ultrix4/mips/sigcontext.h +++ b/sysdeps/unix/bsd/ultrix4/mips/sigcontext.h @@ -19,42 +19,42 @@ Cambridge, MA 02139, USA. */ /* Note that ANY change to this instantly implies a change to __handler.S. */ struct sigcontext -{ - /* onsigstack flag, for the sigstack state we should restore */ - int sc_onstack; - - /* signal mask to restore */ - sigset_t sc_mask; - - /* Program counter when the signal hit. */ - int sc_pc; - - /* registers 0 through 31 */ - int sc_regs[32]; - - /* mul/div low and hi; these aren't part of a jmpbuf, but are part of the - sigcontext and are referenced from the signal trampoline code. */ - int sc_mdlo; - int sc_mdhi; - - /* Flag to see if the fp's been used. */ - int sc_ownedfp; - - /* floating point registers 0 to 31 */ - int sc_fpregs[32]; - /* control & status register for fp */ - int sc_fpc_csr; - - /* exception instruction register for fp */ - int sc_fpc_eir; - - /* The coprocessor's cause register. */ - int sc_cause; - - /* CPU bad virtual address. */ - int sc_badvaddr; - - /* CPU board bad physical address. */ - int sc_badpaddr; -}; + { + /* Nonzero if running on signal stack. */ + int sc_onstack; + + /* Signal mask to restore. */ + sigset_t sc_mask; + + /* Program counter when the signal hit. */ + PTR sc_pc; + + /* Registers 0 through 31. */ + int sc_regs[32]; + + /* mul/div low and hi; these aren't part of a jmp_buf, but are part of the + sigcontext and are referenced from the signal trampoline code. */ + int sc_mdlo; + int sc_mdhi; + + /* Flag to see if the FP's been used. */ + int sc_ownedfp; + + /* Floating point registers 0 to 31. */ + int sc_fpregs[32]; + /* Control & status register for FP. */ + int sc_fpc_csr; + + /* Exception instruction register for FP. */ + int sc_fpc_eir; + + /* The coprocessor's cause register. */ + int sc_cause; + + /* CPU bad virtual address. */ + PTR sc_badvaddr; + + /* CPU board bad physical address. */ + PTR sc_badpaddr; + }; From 43c6e47ffa9c0ce67541ccdbaac5143020afeac9 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 30 Apr 1992 07:14:52 +0000 Subject: [PATCH 0113/4487] entered into RCS --- sysdeps/mips/Dist | 1 + sysdeps/unix/bsd/ultrix4/Dist | 1 + sysdeps/unix/bsd/ultrix4/Makefile | 5 +---- sysdeps/unix/bsd/ultrix4/getsysinfo.S | 25 ++++++++++++++++++++++++ sysdeps/unix/bsd/ultrix4/mips/Dist | 1 + sysdeps/unix/bsd/ultrix4/mips/sigtramp.c | 6 ------ 6 files changed, 29 insertions(+), 10 deletions(-) create mode 100644 sysdeps/mips/Dist create mode 100644 sysdeps/unix/bsd/ultrix4/Dist create mode 100644 sysdeps/unix/bsd/ultrix4/getsysinfo.S create mode 100644 sysdeps/unix/bsd/ultrix4/mips/Dist diff --git a/sysdeps/mips/Dist b/sysdeps/mips/Dist new file mode 100644 index 0000000000..ad6ea0313a --- /dev/null +++ b/sysdeps/mips/Dist @@ -0,0 +1 @@ +setjmp_aux.c diff --git a/sysdeps/unix/bsd/ultrix4/Dist b/sysdeps/unix/bsd/ultrix4/Dist new file mode 100644 index 0000000000..6745cd4b04 --- /dev/null +++ b/sysdeps/unix/bsd/ultrix4/Dist @@ -0,0 +1 @@ +getsysinfo.S diff --git a/sysdeps/unix/bsd/ultrix4/Makefile b/sysdeps/unix/bsd/ultrix4/Makefile index b90d9601c2..26b90346ee 100644 --- a/sysdeps/unix/bsd/ultrix4/Makefile +++ b/sysdeps/unix/bsd/ultrix4/Makefile @@ -1,6 +1,3 @@ -ifeq ($(subdir),signal) -sysdep_routines := $(sysdep_routines) sigtramp __handler -endif ifeq ($(subdir),posix) -sysdep_routines := $(sysdep_routines) __getsysinf +sysdep_routines := $(sysdep_routines) getsysinfo endif diff --git a/sysdeps/unix/bsd/ultrix4/getsysinfo.S b/sysdeps/unix/bsd/ultrix4/getsysinfo.S new file mode 100644 index 0000000000..1f5b2cf487 --- /dev/null +++ b/sysdeps/unix/bsd/ultrix4/getsysinfo.S @@ -0,0 +1,25 @@ +/* Copyright (C) 1992 Free Software Foundation, Inc. + Contributed by Ian Lance Taylor (ian@airs.com). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Get various sorts of information about the system. + This is an Ultrix only call. */ + +#include + +SYSCALL__ (getsysinfo, 5) + ret diff --git a/sysdeps/unix/bsd/ultrix4/mips/Dist b/sysdeps/unix/bsd/ultrix4/mips/Dist new file mode 100644 index 0000000000..c2e8abb84d --- /dev/null +++ b/sysdeps/unix/bsd/ultrix4/mips/Dist @@ -0,0 +1 @@ +sigtramp.c __handler.S diff --git a/sysdeps/unix/bsd/ultrix4/mips/sigtramp.c b/sysdeps/unix/bsd/ultrix4/mips/sigtramp.c index f653e266c9..1bb208dd8b 100644 --- a/sysdeps/unix/bsd/ultrix4/mips/sigtramp.c +++ b/sysdeps/unix/bsd/ultrix4/mips/sigtramp.c @@ -29,12 +29,6 @@ Cambridge, MA 02139, USA. */ don't actually need a trampoline. */ #include - -#ifndef __GNUC__ - #error This file uses GNU C extensions; you must compile with GCC. -#endif - -/* This will also get us sigcontext.h. */ #include #include #include From e198c4817b40f87e523ba36da17d153f6a9e9af3 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 1 May 1992 18:36:46 +0000 Subject: [PATCH 0114/4487] Formerly m68k/fpu/__drem.c.~3~ --- sysdeps/m68k/fpu/drem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/m68k/fpu/drem.c b/sysdeps/m68k/fpu/drem.c index 30ad2443a6..8ca7598f6b 100644 --- a/sysdeps/m68k/fpu/drem.c +++ b/sysdeps/m68k/fpu/drem.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992 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 @@ Cambridge, MA 02139, USA. */ #undef drem double -DEFUN(drem, (x, y), double x AND double y) +DEFUN(__drem, (x, y), double x AND double y) { - return __drem(x, y); + return ____drem(x, y); } From 61e097530ba979a348697f56da3a130b6d259e7e Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 1 May 1992 18:36:47 +0000 Subject: [PATCH 0115/4487] Formerly m68k/fpu/__isinf.c.~2~ --- sysdeps/m68k/fpu/isinf.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/sysdeps/m68k/fpu/isinf.c b/sysdeps/m68k/fpu/isinf.c index 3d336029b1..194c5a6760 100644 --- a/sysdeps/m68k/fpu/isinf.c +++ b/sysdeps/m68k/fpu/isinf.c @@ -1,19 +1,20 @@ /* Copyright (C) 1991 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 General Public License as published by -the Free Software Foundation; either version 1, or (at your option) -any later version. +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 +published by the Free Software Foundation; either version 2 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 General Public License for more details. +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. -You should have received a copy of the GNU General Public License -along with the GNU C Library; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ #include #define __NO_MATH_INLINES From fbe5d07fad19e9f0f1fee583dba53229790a4001 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 1 May 1992 18:36:48 +0000 Subject: [PATCH 0116/4487] Formerly m68k/fpu/__logb.c.~3~ --- sysdeps/m68k/fpu/logb.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sysdeps/m68k/fpu/logb.c b/sysdeps/m68k/fpu/logb.c index 614581e786..3bc3a4e701 100644 --- a/sysdeps/m68k/fpu/logb.c +++ b/sysdeps/m68k/fpu/logb.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992 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 @@ -19,6 +19,8 @@ Cambridge, MA 02139, USA. */ #include #include +#ifdef __GNUC__ + /* Return the base 2 signed integral exponent of X. */ double DEFUN(__logb, (x), double x) @@ -35,3 +37,7 @@ DEFUN(__logb, (x), double x) return x; } + +#else +#include +#endif From 68a2e4b90738416807b37b27af546265dee427b3 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 1 May 1992 18:36:49 +0000 Subject: [PATCH 0117/4487] Formerly m68k/fpu/__math.h.~10~ --- sysdeps/m68k/fpu/__math.h | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h index 0fd80cea36..8f2ded1ba0 100644 --- a/sysdeps/m68k/fpu/__math.h +++ b/sysdeps/m68k/fpu/__math.h @@ -80,17 +80,6 @@ __m81_u(__drem)(double __x, double __y) return __result; } -extern __inline __const double -__m81_u(__scalb)(double __x, int __n) -{ - double __result; - if (__x == 0.0) - __result = __x; - else - __asm("fscale%.l %1, %0" : "=f" (__result) : "g" (__n), "0" (__x)); - return __result; -} - extern __inline __const double __m81_u(ldexp)(double __x, int __e) { From e745f90155dbfcc4ad4153fffa924e1fbd98ff41 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 1 May 1992 18:36:50 +0000 Subject: [PATCH 0118/4487] Formerly m68k/fpu/acos.c.~2~ --- sysdeps/m68k/fpu/acos.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/sysdeps/m68k/fpu/acos.c b/sysdeps/m68k/fpu/acos.c index c9968979ed..e051fd4e27 100644 --- a/sysdeps/m68k/fpu/acos.c +++ b/sysdeps/m68k/fpu/acos.c @@ -1,19 +1,20 @@ /* Copyright (C) 1991 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 General Public License as published by -the Free Software Foundation; either version 1, or (at your option) -any later version. +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 +published by the Free Software Foundation; either version 2 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 General Public License for more details. +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. -You should have received a copy of the GNU General Public License -along with the GNU C Library; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ #include #define __NO_MATH_INLINES From 549628790598e52af5e4c8dd94b478e21e701962 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 1 May 1992 18:36:53 +0000 Subject: [PATCH 0119/4487] Formerly m68k/fpu/atan2.c.~4~ --- sysdeps/m68k/fpu/atan2.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sysdeps/m68k/fpu/atan2.c b/sysdeps/m68k/fpu/atan2.c index 1dfffe7fd8..7860178216 100644 --- a/sysdeps/m68k/fpu/atan2.c +++ b/sysdeps/m68k/fpu/atan2.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992 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 @@ -19,6 +19,8 @@ Cambridge, MA 02139, USA. */ #include #include +#ifdef __GNUC__ + static CONST double PIo4 = 7.8539816339744827900E-1 , /*Hex 2^ -1 * 1.921FB54442D18 */ PIo2 = 1.5707963267948965580E0 , /*Hex 2^ 0 * 1.921FB54442D18 */ @@ -66,3 +68,7 @@ DEFUN(atan2, (y, x), double y AND double x) return __copysign(atan(y / x), signy); } + +#else +#include +#endif From af48c3195084904fde8c29f10ce0d9f8ae0ff877 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 1 May 1992 18:37:00 +0000 Subject: [PATCH 0120/4487] Formerly m68k/fpu/fmod.c.~2~ --- sysdeps/m68k/fpu/fmod.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/sysdeps/m68k/fpu/fmod.c b/sysdeps/m68k/fpu/fmod.c index c8caabfef9..c5f1b5abae 100644 --- a/sysdeps/m68k/fpu/fmod.c +++ b/sysdeps/m68k/fpu/fmod.c @@ -1,19 +1,20 @@ /* Copyright (C) 1991 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 General Public License as published by -the Free Software Foundation; either version 1, or (at your option) -any later version. +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 +published by the Free Software Foundation; either version 2 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 General Public License for more details. +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. -You should have received a copy of the GNU General Public License -along with the GNU C Library; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ #include #define __NO_MATH_INLINES From a587c20ce748ffeb2a616b93e85e928d8e8b7a92 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 1 May 1992 18:37:02 +0000 Subject: [PATCH 0121/4487] Formerly m68k/fpu/ldexp.c.~2~ --- sysdeps/m68k/fpu/ldexp.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/sysdeps/m68k/fpu/ldexp.c b/sysdeps/m68k/fpu/ldexp.c index 0ecba72c7f..37d7b6d3ee 100644 --- a/sysdeps/m68k/fpu/ldexp.c +++ b/sysdeps/m68k/fpu/ldexp.c @@ -1,19 +1,20 @@ /* Copyright (C) 1991 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 General Public License as published by -the Free Software Foundation; either version 1, or (at your option) -any later version. +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 +published by the Free Software Foundation; either version 2 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 General Public License for more details. +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. -You should have received a copy of the GNU General Public License -along with the GNU C Library; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ #include #define __NO_MATH_INLINES From 3ace5dacad574ddc8b9eb367445644bf0eaa74c5 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 1 May 1992 18:37:04 +0000 Subject: [PATCH 0122/4487] Formerly m68k/fpu/pow.c.~2~ --- sysdeps/m68k/fpu/pow.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/sysdeps/m68k/fpu/pow.c b/sysdeps/m68k/fpu/pow.c index 9273c8043b..aa9d559f1d 100644 --- a/sysdeps/m68k/fpu/pow.c +++ b/sysdeps/m68k/fpu/pow.c @@ -1,19 +1,20 @@ /* Copyright (C) 1991 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 General Public License as published by -the Free Software Foundation; either version 1, or (at your option) -any later version. +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 +published by the Free Software Foundation; either version 2 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 General Public License for more details. +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. -You should have received a copy of the GNU General Public License -along with the GNU C Library; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ #include #define __NO_MATH_INLINES From ba56050a834a5c30ea2545cd786cabc0ab52d9ee Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 1 May 1992 18:47:39 +0000 Subject: [PATCH 0123/4487] entered into RCS --- sysdeps/m68k/fpu/asin.c | 2 +- sysdeps/m68k/fpu/atan.c | 2 +- sysdeps/m68k/fpu/atanh.c | 2 ++ sysdeps/m68k/fpu/ceil.c | 18 +----------------- sysdeps/m68k/fpu/cos.c | 2 +- sysdeps/m68k/fpu/cosh.c | 2 +- sysdeps/m68k/fpu/exp.c | 2 +- sysdeps/m68k/fpu/expm1.c | 5 +++-- sysdeps/m68k/fpu/fabs.c | 2 +- sysdeps/m68k/fpu/fl.h | 9 +++++++-- sysdeps/m68k/fpu/floor.c | 2 +- sysdeps/m68k/fpu/frexp.c | 19 ++++++++++--------- sysdeps/m68k/fpu/isnan.c | 2 +- sysdeps/m68k/fpu/log.c | 2 +- sysdeps/m68k/fpu/log10.c | 2 +- sysdeps/m68k/fpu/log1p.c | 2 ++ sysdeps/m68k/fpu/rint.c | 3 +++ sysdeps/m68k/fpu/sin.c | 2 +- sysdeps/m68k/fpu/sinh.c | 2 +- sysdeps/m68k/fpu/sqrt.c | 2 +- sysdeps/m68k/fpu/switch/Makefile | 8 ++++---- sysdeps/m68k/fpu/switch/switch.c | 2 +- sysdeps/m68k/fpu/tan.c | 2 +- sysdeps/m68k/fpu/tanh.c | 2 +- 24 files changed, 48 insertions(+), 50 deletions(-) create mode 100644 sysdeps/m68k/fpu/atanh.c create mode 100644 sysdeps/m68k/fpu/log1p.c create mode 100644 sysdeps/m68k/fpu/rint.c diff --git a/sysdeps/m68k/fpu/asin.c b/sysdeps/m68k/fpu/asin.c index 44a8e5791b..0e3e58f697 100644 --- a/sysdeps/m68k/fpu/asin.c +++ b/sysdeps/m68k/fpu/asin.c @@ -1,2 +1,2 @@ #define FUNC asin -#include "acos-68881.c" +#include diff --git a/sysdeps/m68k/fpu/atan.c b/sysdeps/m68k/fpu/atan.c index 71ec30362a..b9d428e170 100644 --- a/sysdeps/m68k/fpu/atan.c +++ b/sysdeps/m68k/fpu/atan.c @@ -1,2 +1,2 @@ #define FUNC atan -#include "acos-68881.c" +#include diff --git a/sysdeps/m68k/fpu/atanh.c b/sysdeps/m68k/fpu/atanh.c new file mode 100644 index 0000000000..d4636ec035 --- /dev/null +++ b/sysdeps/m68k/fpu/atanh.c @@ -0,0 +1,2 @@ +#define FUNC atanh +#include diff --git a/sysdeps/m68k/fpu/ceil.c b/sysdeps/m68k/fpu/ceil.c index d65ab0e05d..b4605e1b29 100644 --- a/sysdeps/m68k/fpu/ceil.c +++ b/sysdeps/m68k/fpu/ceil.c @@ -1,20 +1,4 @@ -/* Copyright (C) 1990 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 General Public License as published by -the Free Software Foundation; either version 1, 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 General Public License for more details. - -You should have received a copy of the GNU General Public License -along with the GNU C Library; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #define FUNC ceil -#include "acos-68881.c" +#include diff --git a/sysdeps/m68k/fpu/cos.c b/sysdeps/m68k/fpu/cos.c index db6b8a4935..fa50130af7 100644 --- a/sysdeps/m68k/fpu/cos.c +++ b/sysdeps/m68k/fpu/cos.c @@ -1,2 +1,2 @@ #define FUNC cos -#include "acos-68881.c" +#include diff --git a/sysdeps/m68k/fpu/cosh.c b/sysdeps/m68k/fpu/cosh.c index cc91b2ea9b..78a81943c6 100644 --- a/sysdeps/m68k/fpu/cosh.c +++ b/sysdeps/m68k/fpu/cosh.c @@ -1,2 +1,2 @@ #define FUNC cosh -#include "acos-68881.c" +#include diff --git a/sysdeps/m68k/fpu/exp.c b/sysdeps/m68k/fpu/exp.c index 2748fd351f..2649d72143 100644 --- a/sysdeps/m68k/fpu/exp.c +++ b/sysdeps/m68k/fpu/exp.c @@ -1,3 +1,3 @@ #define FUNC exp #define OP etox -#include "acos-68881.c" +#include diff --git a/sysdeps/m68k/fpu/expm1.c b/sysdeps/m68k/fpu/expm1.c index 88a34dba66..19f1802e56 100644 --- a/sysdeps/m68k/fpu/expm1.c +++ b/sysdeps/m68k/fpu/expm1.c @@ -1,2 +1,3 @@ -#define FUNC expm1 -#include <../sysdeps/m68k/68881/acos.c> +#define FUNC __expm1 +#define OP expm1 +#include diff --git a/sysdeps/m68k/fpu/fabs.c b/sysdeps/m68k/fpu/fabs.c index 0f8feeab97..f9538a599c 100644 --- a/sysdeps/m68k/fpu/fabs.c +++ b/sysdeps/m68k/fpu/fabs.c @@ -1,3 +1,3 @@ #define FUNC fabs #define OP abs -#include "acos-68881.c" +#include diff --git a/sysdeps/m68k/fpu/fl.h b/sysdeps/m68k/fpu/fl.h index add735122e..098e880601 100644 --- a/sysdeps/m68k/fpu/fl.h +++ b/sysdeps/m68k/fpu/fl.h @@ -6,7 +6,10 @@ /* ansidecl.m4 here inserts the ieee file. Kludge o rama. $) ENDCOMMENT INCLUDE($sysdeps/ieee754/fl.h$) STARTCOMMENT */ -#if defined(FLT_ROUNDS) && defined(__GNUC__) +#ifndef __need_HUGE_VAL + +#ifdef __GNUC__ + #undef FLT_ROUNDS /* Interrogate the 68881 to find the current rounding mode. */ @@ -33,4 +36,6 @@ DEFUN_VOID(__flt_rounds) #define FLT_ROUNDS (__flt_rounds()) -#endif +#endif /* GCC. */ + +#endif /* Don't need HUGE_VAL. */ diff --git a/sysdeps/m68k/fpu/floor.c b/sysdeps/m68k/fpu/floor.c index bcd6be32a7..92a2ca68bb 100644 --- a/sysdeps/m68k/fpu/floor.c +++ b/sysdeps/m68k/fpu/floor.c @@ -1,3 +1,3 @@ #define FUNC floor #define OP intrz -#include "acos-68881.c" +#include diff --git a/sysdeps/m68k/fpu/frexp.c b/sysdeps/m68k/fpu/frexp.c index 6ab7c5b937..de74851de9 100644 --- a/sysdeps/m68k/fpu/frexp.c +++ b/sysdeps/m68k/fpu/frexp.c @@ -1,19 +1,20 @@ /* Copyright (C) 1991 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 General Public License as published by -the Free Software Foundation; either version 1, or (at your option) -any later version. +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 +published by the Free Software Foundation; either version 2 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 General Public License for more details. +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. -You should have received a copy of the GNU General Public License -along with the GNU C Library; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ #include #define __NO_MATH_INLINES diff --git a/sysdeps/m68k/fpu/isnan.c b/sysdeps/m68k/fpu/isnan.c index f74a05b4ba..e90c691cca 100644 --- a/sysdeps/m68k/fpu/isnan.c +++ b/sysdeps/m68k/fpu/isnan.c @@ -1,2 +1,2 @@ #define FUNC __isnan -#include <../sysdeps/m68k/68881/isinf.c> +#include <__isinf.c> diff --git a/sysdeps/m68k/fpu/log.c b/sysdeps/m68k/fpu/log.c index c5f5a5bf99..4de3346545 100644 --- a/sysdeps/m68k/fpu/log.c +++ b/sysdeps/m68k/fpu/log.c @@ -1,3 +1,3 @@ #define FUNC log #define OP logn -#include "acos-68881.c" +#include diff --git a/sysdeps/m68k/fpu/log10.c b/sysdeps/m68k/fpu/log10.c index 9a9923da95..246b69a364 100644 --- a/sysdeps/m68k/fpu/log10.c +++ b/sysdeps/m68k/fpu/log10.c @@ -1,2 +1,2 @@ #define FUNC log10 -#include "acos-68881.c" +#include diff --git a/sysdeps/m68k/fpu/log1p.c b/sysdeps/m68k/fpu/log1p.c new file mode 100644 index 0000000000..028783819b --- /dev/null +++ b/sysdeps/m68k/fpu/log1p.c @@ -0,0 +1,2 @@ +#define FUNC log1p +#include diff --git a/sysdeps/m68k/fpu/rint.c b/sysdeps/m68k/fpu/rint.c new file mode 100644 index 0000000000..288ae81ce4 --- /dev/null +++ b/sysdeps/m68k/fpu/rint.c @@ -0,0 +1,3 @@ +#define FUNC __rint +#define OP intr +#include diff --git a/sysdeps/m68k/fpu/sin.c b/sysdeps/m68k/fpu/sin.c index 6ee32e7986..28ac9e50c3 100644 --- a/sysdeps/m68k/fpu/sin.c +++ b/sysdeps/m68k/fpu/sin.c @@ -1,2 +1,2 @@ #define FUNC sin -#include "acos-68881.c" +#include diff --git a/sysdeps/m68k/fpu/sinh.c b/sysdeps/m68k/fpu/sinh.c index 51c8b3f922..fae7c71459 100644 --- a/sysdeps/m68k/fpu/sinh.c +++ b/sysdeps/m68k/fpu/sinh.c @@ -1,2 +1,2 @@ #define FUNC sinh -#include "acos-68881.c" +#include diff --git a/sysdeps/m68k/fpu/sqrt.c b/sysdeps/m68k/fpu/sqrt.c index 3ba32bfcce..2365b61780 100644 --- a/sysdeps/m68k/fpu/sqrt.c +++ b/sysdeps/m68k/fpu/sqrt.c @@ -1,2 +1,2 @@ #define FUNC sqrt -#include "acos-68881.c" +#include diff --git a/sysdeps/m68k/fpu/switch/Makefile b/sysdeps/m68k/fpu/switch/Makefile index 9482471597..fd8d7c11f4 100644 --- a/sysdeps/m68k/fpu/switch/Makefile +++ b/sysdeps/m68k/fpu/switch/Makefile @@ -22,16 +22,16 @@ sysdep_routines := $(sysdep_routines) switch # Find all the sources that have 68881 versions. +68881-sources := \ - $(notdir $(wildcard $(addprefix $(filter %/68881,$(sysdirs)),$(sources)))) + $(notdir $(wildcard $(addprefix $(filter %/fpu,$(sysdirs)),$(sources)))) -# Sysdep directories other than 68881 and 68881-sw (this one). -+non68881-dirs := $(filter-out %/68881 %/68881-switch,$(+sysdep_dirs)) +# Sysdep directories other than fpu and fpu/switch (this one). ++non68881-dirs := $(filter-out %/fpu %/fpu/switch,$(+sysdep_dirs)) # Get a non-68881 version of the target. +non68881-version = $(firstword $(wildcard $(addsuffix /$@,$(+non68881-dirs)))) # Directory containing 68881 sources. -+68881-dir := $(filter %/68881,$(+sysdep_dirs)) ++68881-dir := $(filter %/fpu,$(+sysdep_dirs)) # For all the files that have 68881 versions and don't exist already in # the source directory (math), automatically make ones that switch between diff --git a/sysdeps/m68k/fpu/switch/switch.c b/sysdeps/m68k/fpu/switch/switch.c index b1deef2e98..057bd1509a 100644 --- a/sysdeps/m68k/fpu/switch/switch.c +++ b/sysdeps/m68k/fpu/switch/switch.c @@ -18,7 +18,7 @@ Cambridge, MA 02139, USA. */ #include #include -#include <68881-switch.h> +#include <68881-sw.h> /* The signal that is sent when a 68881 instruction diff --git a/sysdeps/m68k/fpu/tan.c b/sysdeps/m68k/fpu/tan.c index 2adc921247..53b3b5342e 100644 --- a/sysdeps/m68k/fpu/tan.c +++ b/sysdeps/m68k/fpu/tan.c @@ -1,2 +1,2 @@ #define FUNC tan -#include "acos-68881.c" +#include diff --git a/sysdeps/m68k/fpu/tanh.c b/sysdeps/m68k/fpu/tanh.c index 1815c0ae5b..cc6739539a 100644 --- a/sysdeps/m68k/fpu/tanh.c +++ b/sysdeps/m68k/fpu/tanh.c @@ -1,2 +1,2 @@ #define FUNC tanh -#include "acos-68881.c" +#include From b773f1ef1619058e8f10c07a422121644062a887 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 3 May 1992 17:59:14 +0000 Subject: [PATCH 0124/4487] Formerly unix/bsd/sun/sparc/sethostid.S.~7~ --- sysdeps/unix/bsd/sun/sparc/sethostid.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/unix/bsd/sun/sparc/sethostid.S b/sysdeps/unix/bsd/sun/sparc/sethostid.S index 7f5309b484..709fcea326 100644 --- a/sysdeps/unix/bsd/sun/sparc/sethostid.S +++ b/sysdeps/unix/bsd/sun/sparc/sethostid.S @@ -25,6 +25,8 @@ SYSCALL (sethostid, 1) #else +/* only defines E* #ifdef _ERRNO_H. */ +#define _ERRNO_H #include ENTRY (sethostid) From fc6606f14bc2832b003b6187059d200eb46629e3 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 6 May 1992 22:56:48 +0000 Subject: [PATCH 0125/4487] entered into RCS --- sysdeps/unix/bsd/hp/m68k/wait3.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/bsd/hp/m68k/wait3.S b/sysdeps/unix/bsd/hp/m68k/wait3.S index c8e6623f88..d02f27fe7c 100644 --- a/sysdeps/unix/bsd/hp/m68k/wait3.S +++ b/sysdeps/unix/bsd/hp/m68k/wait3.S @@ -18,7 +18,7 @@ Cambridge, MA 02139, USA. */ #include -ENTRY(___wait3) +ENTRY(__wait3) movel sp@(8), d1 moveal sp@(12), a0 movel #SYS_wait, d0 From a238abcb880dce8d3f149eedaafedde8894d03a9 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 13 May 1992 02:52:32 +0000 Subject: [PATCH 0126/4487] entered into RCS --- sysdeps/vax/bcmp.s | 57 +++++++++++++++++++++ sysdeps/vax/bcopy.s | 78 +++++++++++++++++++++++++++++ sysdeps/vax/bzero.s | 53 ++++++++++++++++++++ sysdeps/vax/ffs.s | 48 ++++++++++++++++++ sysdeps/vax/index.s | 99 ++++++++++++++++++++++++++++++++++++ sysdeps/vax/memchr.s | 73 +++++++++++++++++++++++++++ sysdeps/vax/memcmp.s | 61 ++++++++++++++++++++++ sysdeps/vax/memmove.s | 93 ++++++++++++++++++++++++++++++++++ sysdeps/vax/memset.s | 55 ++++++++++++++++++++ sysdeps/vax/rindex.s | 113 +++++++++++++++++++++++++++++++++++++++++ sysdeps/vax/strcat.s | 66 ++++++++++++++++++++++++ sysdeps/vax/strchr.s | 105 ++++++++++++++++++++++++++++++++++++++ sysdeps/vax/strcpy.s | 62 +++++++++++++++++++++++ sysdeps/vax/strcspn.s | 66 ++++++++++++++++++++++++ sysdeps/vax/strlen.s | 52 +++++++++++++++++++ sysdeps/vax/strncat.s | 83 ++++++++++++++++++++++++++++++ sysdeps/vax/strncmp.s | 89 +++++++++++++++++++++++++++++++++ sysdeps/vax/strncpy.s | 84 +++++++++++++++++++++++++++++++ sysdeps/vax/strpbrk.s | 68 +++++++++++++++++++++++++ sysdeps/vax/strrchr.s | 114 ++++++++++++++++++++++++++++++++++++++++++ sysdeps/vax/strsep.s | 85 +++++++++++++++++++++++++++++++ sysdeps/vax/strspn.s | 70 ++++++++++++++++++++++++++ sysdeps/vax/strstr.s | 113 +++++++++++++++++++++++++++++++++++++++++ 23 files changed, 1787 insertions(+) create mode 100644 sysdeps/vax/bcmp.s create mode 100644 sysdeps/vax/bcopy.s create mode 100644 sysdeps/vax/bzero.s create mode 100644 sysdeps/vax/ffs.s create mode 100644 sysdeps/vax/index.s create mode 100644 sysdeps/vax/memchr.s create mode 100644 sysdeps/vax/memcmp.s create mode 100644 sysdeps/vax/memmove.s create mode 100644 sysdeps/vax/memset.s create mode 100644 sysdeps/vax/rindex.s create mode 100644 sysdeps/vax/strcat.s create mode 100644 sysdeps/vax/strchr.s create mode 100644 sysdeps/vax/strcpy.s create mode 100644 sysdeps/vax/strcspn.s create mode 100644 sysdeps/vax/strlen.s create mode 100644 sysdeps/vax/strncat.s create mode 100644 sysdeps/vax/strncmp.s create mode 100644 sysdeps/vax/strncpy.s create mode 100644 sysdeps/vax/strpbrk.s create mode 100644 sysdeps/vax/strrchr.s create mode 100644 sysdeps/vax/strsep.s create mode 100644 sysdeps/vax/strspn.s create mode 100644 sysdeps/vax/strstr.s diff --git a/sysdeps/vax/bcmp.s b/sysdeps/vax/bcmp.s new file mode 100644 index 0000000000..d980feb8e4 --- /dev/null +++ b/sysdeps/vax/bcmp.s @@ -0,0 +1,57 @@ +/* + * Copyright (c) 1983 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)bcmp.s 5.6 (Berkeley) 6/1/90" +#endif /* LIBC_SCCS and not lint */ + +/* bcmp(s1, s2, n) */ + +#include "DEFS.h" + +ENTRY(bcmp, 0) + movl 4(ap),r1 + movl 8(ap),r3 + movl 12(ap),r4 +1: + movzwl $65535,r0 + cmpl r4,r0 + jleq 2f + subl2 r0,r4 + cmpc3 r0,(r1),(r3) + jeql 1b + addl2 r4,r0 + ret +2: + cmpc3 r4,(r1),(r3) + ret diff --git a/sysdeps/vax/bcopy.s b/sysdeps/vax/bcopy.s new file mode 100644 index 0000000000..43bb93d216 --- /dev/null +++ b/sysdeps/vax/bcopy.s @@ -0,0 +1,78 @@ +/* + * Copyright (c) 1983 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)bcopy.s 5.6 (Berkeley) 6/1/90" +#endif /* LIBC_SCCS and not lint */ + +/* bcopy(from, to, size) */ + +#include "DEFS.h" + +ENTRY(bcopy, R6) + movl 4(ap),r1 + movl 8(ap),r3 + movl 12(ap),r6 + cmpl r1,r3 + bgtr 2f # normal forward case + blss 3f # overlapping, must do backwards + ret # equal, nothing to do +1: + subl2 r0,r6 + movc3 r0,(r1),(r3) +2: + movzwl $65535,r0 + cmpl r6,r0 + jgtr 1b + movc3 r6,(r1),(r3) + ret +3: + addl2 r6,r1 + addl2 r6,r3 + movzwl $65535,r0 + jbr 5f +4: + subl2 r0,r6 + subl2 r0,r1 + subl2 r0,r3 + movc3 r0,(r1),(r3) + movzwl $65535,r0 + subl2 r0,r1 + subl2 r0,r3 +5: + cmpl r6,r0 + jgtr 4b + subl2 r6,r1 + subl2 r6,r3 + movc3 r6,(r1),(r3) + ret diff --git a/sysdeps/vax/bzero.s b/sysdeps/vax/bzero.s new file mode 100644 index 0000000000..5f90763d41 --- /dev/null +++ b/sysdeps/vax/bzero.s @@ -0,0 +1,53 @@ +/* + * Copyright (c) 1983 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)bzero.s 5.6 (Berkeley) 6/1/90" +#endif /* LIBC_SCCS and not lint */ + +/* bzero(base, length) */ + +#include "DEFS.h" + +ENTRY(bzero, 0) + movl 4(ap),r3 + jbr 2f +1: + subl2 r0,8(ap) + movc5 $0,(r3),$0,r0,(r3) +2: + movzwl $65535,r0 + cmpl 8(ap),r0 + jgtr 1b + movc5 $0,(r3),$0,8(ap),(r3) + ret diff --git a/sysdeps/vax/ffs.s b/sysdeps/vax/ffs.s new file mode 100644 index 0000000000..49faffb060 --- /dev/null +++ b/sysdeps/vax/ffs.s @@ -0,0 +1,48 @@ +/* + * Copyright (c) 1983 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)ffs.s 5.6 (Berkeley) 6/1/90" +#endif /* LIBC_SCCS and not lint */ + +/* bit = ffs(value) */ + +#include "DEFS.h" + +ENTRY(ffs, 0) + ffs $0,$32,4(ap),r0 + bneq 1f + mnegl $1,r0 +1: + incl r0 + ret diff --git a/sysdeps/vax/index.s b/sysdeps/vax/index.s new file mode 100644 index 0000000000..e599b276f0 --- /dev/null +++ b/sysdeps/vax/index.s @@ -0,0 +1,99 @@ +/* + * Copyright (c) 1980 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)index.s 5.6 (Berkeley) 6/1/90" +#endif /* LIBC_SCCS and not lint */ + +/* + * Find the first occurence of c in the string cp. + * Return pointer to match or null pointer. + * + * char * + * index(cp, c) + * char *cp, c; + */ +#include "DEFS.h" + +ENTRY(index, 0) + movq 4(ap),r1 # r1 = cp; r2 = c + tstl r2 # check for special case c == '\0' + bneq 2f +1: + locc $0,$65535,(r1) # just find end of string + beql 1b # still looking + movl r1,r0 # found it + ret +2: + moval tbl,r3 # r3 = address of table + bbss $0,(r3),5f # insure not reentering + movab (r3)[r2],r5 # table entry for c + incb (r5) + movzwl $65535,r4 # fast access +3: + scanc r4,(r1),(r3),$1 # look for c or '\0' + beql 3b # still looking + movl r1,r0 # return pointer to char + tstb (r0) # if have found '\0' + bneq 4f + clrl r0 # else return 0 +4: + clrb (r5) # clean up table + clrb (r3) + ret + + .data +tbl: .space 256 + .text + +/* + * Reentrant, but slower version of index + */ +5: + movl r1,r3 +6: + locc $0,$65535,(r3) # look for '\0' + bneq 7f + locc r2,$65535,(r3) # look for c + bneq 8f + movl r1,r3 # reset pointer and ... + jbr 6b # ... try again +7: + subl3 r3,r1,r4 # length of short block + incl r4 # +1 for '\0' + locc r2,r4,(r3) # look for c + bneq 8f + ret +8: + movl r1,r0 # return pointer to char + ret diff --git a/sysdeps/vax/memchr.s b/sysdeps/vax/memchr.s new file mode 100644 index 0000000000..c7793fb5f8 --- /dev/null +++ b/sysdeps/vax/memchr.s @@ -0,0 +1,73 @@ +/*- + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)memchr.s 5.1 (Berkeley) 5/29/90" +#endif /* LIBC_SCCS and not lint */ + +/* + * Find the first occurence of c in the memory at cp (length n). + * Return pointer to match or null pointer. + * + * This code optimises the usual case (0 < n < 65535). + * + * void * + * memchr(cp, c, n) + * char *cp, c; + * size_t n; + */ + +#include "DEFS.h" + +ENTRY(memchr, 0) + movq 4(ap),r1 # r1 = cp; r2 = c + movl 12(ap),r0 # r0 = n + movzwl $65535,r4 # handy constant +0: + cmpl r0,r4 # check for annoying locc limit + bgtru 3f + + /* n <= 65535 */ + locc r2,r0,(r1) # search n bytes for c + beql 2f # done if not found (r0 already 0) +1: /* found character c at (r1) */ + movl r1,r0 +2: + ret + +3: /* n > 65535 */ + locc r2,r4,(r1) # search 65535 bytes for c + beql 1b # done if found + decw r0 # from 0 to 65535 + subl2 r0,r4 # adjust n + brb 0b # and loop diff --git a/sysdeps/vax/memcmp.s b/sysdeps/vax/memcmp.s new file mode 100644 index 0000000000..3854fd8e4a --- /dev/null +++ b/sysdeps/vax/memcmp.s @@ -0,0 +1,61 @@ +/*- + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)memcmp.s 5.1 (Berkeley) 5/15/90" +#endif /* LIBC_SCCS and not lint */ + +/* int memcmp(s1, s2, n) */ + +#include "DEFS.h" + +ENTRY(memcmp, 0) + movl 4(ap),r1 /* r1 = s1 */ + movq 8(ap),r3 /* r3 = s2; r4 = n */ + movzwl $65535,r5 +0: + cmpl r4,r5 + jgtru 3f /* handle stupid cmpc3 limitation */ + cmpc3 r4,(r1),(r3) /* compare */ + beql 2f /* done if same (r0 = 0) */ +1: + movzbl (r1),r0 + movzbl (r3),r2 + subl2 r2,r0 /* return *s1 - *s2; s1,s2 unsigned chars */ +2: + ret +3: + subl2 r5,r4 /* do 64K; adjust count */ + cmpc3 r5,(r1),(r3) + jeql 0b /* loop if same */ + jbr 1b diff --git a/sysdeps/vax/memmove.s b/sysdeps/vax/memmove.s new file mode 100644 index 0000000000..8f897fa3f4 --- /dev/null +++ b/sysdeps/vax/memmove.s @@ -0,0 +1,93 @@ +/*- + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)memmove.s 5.1 (Berkeley) 5/15/90" +#endif /* LIBC_SCCS and not lint */ + +/* + * void *memmove(dst, src, size) + * returns dst + * + * This optimises the usual case (count < 65536) at the expense + * of some extra memory references and branches when count >= 65536. + */ + +#include "DEFS.h" + +ENTRY(memmove, 0) + movzwl $65535,r0 /* r0 = 64K (needed below) */ + movq 8(ap),r1 /* r1 = src, r2 = length */ + movl 4(ap),r3 /* r3 = dst */ + cmpl r1,r3 + bgtru 1f /* normal forward case */ + beql 2f /* equal, nothing to do */ + addl2 r2,r1 /* overlaps iff srcdst */ + cmpl r1,r3 + bgtru 4f /* overlapping, must move backwards */ + subl2 r2,r1 + +1: /* move forward */ + cmpl r2,r0 + bgtru 3f /* stupid movc3 limitation */ + movc3 r2,(r1),(r3) /* move it all */ +2: + movl 4(ap),r0 /* return original dst */ + ret +3: + subl2 r0,12(ap) /* adjust length by 64K */ + movc3 r0,(r1),(r3) /* move 64K */ + movl 12(ap),r2 + decw r0 /* from 0 to 65535 */ + brb 1b /* retry */ + +4: /* move backward */ + addl2 r2,r3 +5: + cmpl r2,r0 + bgtru 6f /* stupid movc3 limitation */ + subl2 r2,r1 + subl2 r2,r3 + movc3 r2,(r1),(r3) /* move it all */ + movl 4(ap),r0 /* return original dst */ + ret +6: + subl2 r0,12(ap) /* adjust length by 64K */ + subl2 r0,r1 + subl2 r0,r3 + movc3 r0,(r1),(r3) /* move 64K */ + movl 12(ap),r2 + decw r0 + subl2 r0,r1 + subl2 r0,r3 + brb 5b diff --git a/sysdeps/vax/memset.s b/sysdeps/vax/memset.s new file mode 100644 index 0000000000..12b1f74fe3 --- /dev/null +++ b/sysdeps/vax/memset.s @@ -0,0 +1,55 @@ +/*- + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)memset.s 5.2 (Berkeley) 5/12/91" +#endif /* LIBC_SCCS and not lint */ + +/* void *memset(base, c, length) */ + +#include "DEFS.h" + +ENTRY(memset, 0) + movl 4(ap),r3 +1: + movzwl $65535,r0 + movq 8(ap),r1 + cmpl r2,r0 + jgtru 2f + movc5 $0,(r3),r1,r2,(r3) + movl r1,r0 + ret +2: + subl2 r0,12(ap) + movc5 $0,(r3),r1,r0,(r3) + jbr 1b diff --git a/sysdeps/vax/rindex.s b/sysdeps/vax/rindex.s new file mode 100644 index 0000000000..76d7e29597 --- /dev/null +++ b/sysdeps/vax/rindex.s @@ -0,0 +1,113 @@ +/* + * Copyright (c) 1983 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)rindex.s 5.6 (Berkeley) 6/1/90" +#endif /* LIBC_SCCS and not lint */ + +/* + * Find the last occurence of c in the string cp. + * Return pointer to match or null pointer. + * + * char * + * rindex(cp, c) + * char *cp, c; + */ +#include "DEFS.h" + +ENTRY(rindex, 0) + movq 4(ap),r1 # r1 = cp; r2 = c + tstl r2 # check for special case c == '\0' + bneq 2f +1: + locc $0,$65535,(r1) # just find end of string + beql 1b # still looking + movl r1,r0 # found it + ret +2: + moval tbl,r3 # r3 = address of table + bbss $0,(r3),5f # insure not reentering + movab (r3)[r2],r5 # table entry for c + incb (r5) + clrl r4 # last found +3: + scanc $65535,(r1),(r3),$1 # look for c or '\0' + beql 3b # keep looking + tstb (r1) # if have found '\0' + beql 4f # we are done + movl r1,r4 # save most recently found + incl r1 # skip over character + jbr 3b # keep looking +4: + movl r4,r0 # return last found (if any) + clrb (r5) # clean up table + clrb (r3) + ret + + .data +tbl: .space 256 + .text + +/* + * Reentrant, but slower version of rindex + */ +5: + movl r1,r3 + clrl r4 # r4 = pointer to last match +6: + locc $0,$65535,(r3) # look for '\0' + bneq 8f + decw r0 # r0 = 65535 +1: + locc r2,r0,(r3) # look for c + bneq 7f + movl r1,r3 # reset pointer and ... + jbr 6b # ... try again +7: + movl r1,r4 # stash pointer ... + addl3 $1,r1,r3 # ... skip over match and ... + decl r0 # ... decrement count + jbr 6b # ... try again +8: + subl3 r3,r1,r0 # length of short block + incl r0 # +1 for '\0' +9: + locc r2,r0,(r3) # look for c + beql 0f + movl r1,r4 # stash pointer ... + addl3 $1,r1,r3 # ... skip over match ... + decl r0 # ... adjust count and ... + jbr 9b # ... try again +0: + movl r4,r0 # return stashed pointer + ret diff --git a/sysdeps/vax/strcat.s b/sysdeps/vax/strcat.s new file mode 100644 index 0000000000..7cf8884204 --- /dev/null +++ b/sysdeps/vax/strcat.s @@ -0,0 +1,66 @@ +/* + * Copyright (c) 1983 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)strcat.s 5.6 (Berkeley) 6/1/90" +#endif /* LIBC_SCCS and not lint */ + +/* + * Concatenate string s2 to the end of s1 + * and return the base of s1. + * + * char * + * strcat(s1, s2) + * char *s1, *s2; + */ +#include "DEFS.h" + +ENTRY(strcat, R6|R7) + movq 4(ap), r6 # r6 = s1; r7 = s2 + movl r6,r1 +0: + locc $0,$65535,(r1) # look for '\0' + beql 0b + movl r1,r3 # save end of s1 +1: + locc $0,$65535,(r7) # find length of s2 + bneq 2f + movc3 $65535,(r7),(r3)# copy full block + movl r1,r7 + jbr 1b +2: + subl2 r7,r1 # calculate length + incl r1 + movc3 r1,(r7),(r3) # copy remainder + movl r6,r0 + ret diff --git a/sysdeps/vax/strchr.s b/sysdeps/vax/strchr.s new file mode 100644 index 0000000000..18b53838ec --- /dev/null +++ b/sysdeps/vax/strchr.s @@ -0,0 +1,105 @@ +/* + * Copyright (c) 1988 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)strchr.s 5.4 (Berkeley) 6/1/90" +#endif /* LIBC_SCCS and not lint */ + +/* + * Find the first occurence of c in the string cp. + * Return pointer to match or null pointer. + * + * char * + * strchr(cp, c) + * char *cp, c; + */ +#include "DEFS.h" + + .lcomm tbl,256 + +ENTRY(strchr, 0) + movzwl $65535,r4 /* handy constant */ + movq 4(ap),r1 /* r1 = cp; r2 = c */ + movzbl r2,r2 + beql Lzero /* special case for c == '\0' */ + +/* + * Fancy scanc version. Alas, it is not reentrant. + */ + movab tbl,r3 /* r3 = base of table */ + bbss $0,(r3),Lreent /* ensure not reentering */ + movab (r3)[r2],r5 + incb (r5) /* mark both '\0' and c */ +0: + scanc r4,(r1),(r3),$1 /* look for c or '\0' */ + beql 0b /* still looking */ + movl r1,r0 /* return whatever we found */ + tstb (r0) + bneq 1f # unless it was '\0': + clrl r0 # then return NULL +1: + clrb (r5) /* clean up table */ + clrb (r3) + ret + +/* + * Special case for \0. + */ +Lzero: + locc r2,r4,(r1) /* just find end of string */ + beql Lzero /* still looking */ + movl r1,r0 /* found it */ + ret + +/* + * Slower reentrant version is two two-step searches. The first + * phase runs until we know where the string ends; it locates the + * first occurrence of c within a 65535-byte block. If we find + * the end of the string first, we switch to the second phase, + * were we look only up to the known end of string. + */ +Lreent: +0: /* first phase */ + movl r1,r3 + locc $0,r4,(r3) /* look for '\0' */ + bneq 1f + locc r2,r4,(r3) /* look for c */ + beql 0b /* not found: reset pointer and loop */ + movl r1,r0 /* found: return it */ + ret +1: /* second phase */ + subl3 r3,r1,r0 /* length of short block */ + locc r2,r0,(r3) /* look for c */ + beql 2f /* not found: return NULL */ + movl r1,r0 +2: ret diff --git a/sysdeps/vax/strcpy.s b/sysdeps/vax/strcpy.s new file mode 100644 index 0000000000..56dbe5741c --- /dev/null +++ b/sysdeps/vax/strcpy.s @@ -0,0 +1,62 @@ +/* + * Copyright (c) 1983 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)strcpy.s 5.6 (Berkeley) 6/1/90" +#endif /* LIBC_SCCS and not lint */ + +/* + * Copy string s2 over top of s1. + * Return base of s1. + * + * char * + * strcpy(s1, s2) + * char *s1, *s2; + */ +#include "DEFS.h" + +ENTRY(strcpy, R6) + movl 4(ap), r3 # r3 = s1 + movl 8(ap), r6 # r6 = s2 +1: + locc $0,$65535,(r6) # find length of s2 + bneq 2f + movc3 $65535,(r6),(r3)# copy full block + movl r1,r6 + jbr 1b +2: + subl2 r6,r1 # calculate length + incl r1 + movc3 r1,(r6),(r3) # copy remainder + movl 4(ap),r0 # return base of s1 + ret diff --git a/sysdeps/vax/strcspn.s b/sysdeps/vax/strcspn.s new file mode 100644 index 0000000000..f7b0a99792 --- /dev/null +++ b/sysdeps/vax/strcspn.s @@ -0,0 +1,66 @@ +/*- + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)strcspn.s 5.1 (Berkeley) 5/15/90" +#endif /* LIBC_SCCS and not lint */ + +/* + * Span the complement of string s2 (skip characters that are not in s2). + * Return the number of characters in s1 that were skipped. + * + * size_t + * strcspn(s1, s2) + * const char *s1, *s2; + */ +#include "DEFS.h" + +ENTRY(strcspn, 0) + subl2 $32,sp /* make 256 bit table */ + movc5 $0,(sp),$0,$32,(sp) + movq 4(ap),r1 /* r1 = s1, r2 = s2 */ + + /* turn on bit for each character in s2, including '\0' */ +1: + movzbl (r2)+,r0 + bbss r0,(sp),1b + bneq 1b + movl r1,r0 /* r0 = s (current pos in s1) */ + + /* look for a character that is in s2 */ +2: + movzbl (r0)+,r2 /* c = *s++ */ + bbc r2,(sp),2b /* loop until c is in table */ + decl r0 /* s-- */ + subl2 r1,r0 /* r0 = s - s1 = count */ + ret diff --git a/sysdeps/vax/strlen.s b/sysdeps/vax/strlen.s new file mode 100644 index 0000000000..2b7e0a7ef4 --- /dev/null +++ b/sysdeps/vax/strlen.s @@ -0,0 +1,52 @@ +/* + * Copyright (c) 1983 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)strlen.s 5.6 (Berkeley) 6/1/90" +#endif /* LIBC_SCCS and not lint */ + +/* + * Return the length of cp (not counting '\0'). + * + * strlen(cp) + * char *cp; + */ +#include "DEFS.h" + +ENTRY(strlen, 0) + movl 4(ap),r1 +1: + locc $0,$65535,(r1) # look for '\0' + beql 1b + subl3 4(ap),r1,r0 # len = cp - base + ret diff --git a/sysdeps/vax/strncat.s b/sysdeps/vax/strncat.s new file mode 100644 index 0000000000..bcf29c16c7 --- /dev/null +++ b/sysdeps/vax/strncat.s @@ -0,0 +1,83 @@ +/* + * Copyright (c) 1983 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)strncat.s 5.6 (Berkeley) 6/1/90" +#endif /* LIBC_SCCS and not lint */ + +/* + * Concatenate string s2 on the end of s1 + * and return the base of s1. The parameter + * n is the maximum length of string s2 to + * concatenate. + * + * char * + * strncat(s1, s2, n) + * char *s1, *s2; + * int n; + */ +#include "DEFS.h" + +ENTRY(strncat, R6) + movl 12(ap),r6 # r6 = n + bleq done # n <= 0 + movl 4(ap),r3 # r3 = s1 + movl r3,r1 +0: + locc $0,$65535,(r1) + beql 0b + movl r1,r3 # r3 = index(s1, '\0'); + movl 8(ap),r1 # r1 = s2 +1: + movzwl $65535,r2 # r2 = bytes in first chunk + cmpl r6,r2 # r2 = min(bytes in chunk, n); + jgeq 2f + movl r6,r2 +2: + subl2 r2,r6 # update n + locc $0,r2,(r1) # '\0' found? + jneq 3f + subl2 r2,r1 # back up pointer updated by locc + movc3 r2,(r1),(r3) # copy in next piece + tstl r6 # run out of space? + jneq 1b + clrb (r3) # force '\0' termination + jbr done +3: + subl2 r0,r2 # r2 = number of bytes to move + subl2 r2,r1 # back up pointer updated by locc + incl r2 # copy '\0' as well + movc3 r2,(r1),(r3) # copy in last piece +done: + movl 4(ap),r0 # return s1 + ret diff --git a/sysdeps/vax/strncmp.s b/sysdeps/vax/strncmp.s new file mode 100644 index 0000000000..e5bfcf2a73 --- /dev/null +++ b/sysdeps/vax/strncmp.s @@ -0,0 +1,89 @@ +/* + * Copyright (c) 1983 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)strncmp.s 5.6 (Berkeley) 6/1/90" +#endif /* LIBC_SCCS and not lint */ + +/* + * Compare at most n characters of string + * s1 lexicographically to string s2. + * Return: + * 0 s1 == s2 + * > 0 s1 > s2 + * < 0 s2 < s2 + * + * strncmp(s1, s2, n) + * char *s1, *s2; + * int n; + */ +#include "DEFS.h" + +ENTRY(strncmp, 0) + movl 4(ap),r1 # r1 = s1 + movq 8(ap),r3 # r3 = s2; r4 = n +1: + clrl r5 # calculate min bytes to next page boundry + subb3 r1,$255,r5 # r5 = (bytes - 1) to end of page for s1 + subb3 r3,$255,r0 # r0 = (bytes - 1) to end of page for s2 + cmpb r0,r5 # r5 = min(r0, r5); + bgtru 2f + movb r0,r5 +2: + incl r5 # r5 = min bytes to next page boundry + cmpl r4,r5 # r5 = min(n, r5); + bgeq 3f + movl r4,r5 +3: + cmpc3 r5,(r1),(r3) # compare strings + bneq 4f + subl2 r5,r4 # check for end of comparison + beql 5f + subl2 r5,r1 # check if found null yet + locc $0,r5,(r1) + beql 1b # not yet done, continue checking + subl2 r0,r3 + mnegb (r3),r0 # r0 = '\0' - *s2 + cvtbl r0,r0 + ret +4: + subl2 r0,r5 # check for null in matching string + subl2 r5,r1 + locc $0,r5,(r1) + bneq 5f + subb3 (r3),(r1),r0 # r0 = *s1 - *s2 + cvtbl r0,r0 + ret +5: + clrl r0 # both the same to null + ret diff --git a/sysdeps/vax/strncpy.s b/sysdeps/vax/strncpy.s new file mode 100644 index 0000000000..03a09b7bda --- /dev/null +++ b/sysdeps/vax/strncpy.s @@ -0,0 +1,84 @@ +/* + * Copyright (c) 1983 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)strncpy.s 5.6 (Berkeley) 6/1/90" +#endif /* LIBC_SCCS and not lint */ + +/* + * Copy string s2 over top of string s1. + * Truncate or null-pad to n bytes. + * + * char * + * strncpy(s1, s2, n) + * char *s1, *s2; + */ +#include "DEFS.h" + +ENTRY(strncpy, R6) + movl 12(ap),r6 # r6 = n + bleq done # n <= 0 + movl 4(ap),r3 # r3 = s1 + movl 8(ap),r1 # r1 = s2 +1: + movzwl $65535,r2 # r2 = bytes in first chunk + cmpl r6,r2 # r2 = min(bytes in chunk, n); + jgeq 2f + movl r6,r2 +2: + subl2 r2,r6 # update n + locc $0,r2,(r1) # '\0' found? + jneq 3f + subl2 r2,r1 # back up pointer updated by locc + movc3 r2,(r1),(r3) # copy in next piece + tstl r6 # run out of space? + jneq 1b + jbr done +3: # copy up to '\0' logic + addl2 r0,r6 # r6 = number of null-pad bytes + subl2 r0,r2 # r2 = number of bytes to move + subl2 r2,r1 # back up pointer updated by locc + movc3 r2,(r1),(r3) # copy in last piece +4: # null-pad logic + movzwl $65535,r2 # r2 = bytes in first chunk + cmpl r6,r2 # r2 = min(bytes in chunk, n); + jgeq 5f + movl r6,r2 +5: + subl2 r2,r6 # update n + movc5 $0,(r3),$0,r2,(r3)# pad with '\0's + tstl r6 # finished padding? + jneq 4b +done: + movl 4(ap),r0 # return s1 + ret diff --git a/sysdeps/vax/strpbrk.s b/sysdeps/vax/strpbrk.s new file mode 100644 index 0000000000..0d1b25e22f --- /dev/null +++ b/sysdeps/vax/strpbrk.s @@ -0,0 +1,68 @@ +/*- + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)strpbrk.s 5.1 (Berkeley) 5/15/90" +#endif /* LIBC_SCCS and not lint */ + +/* + * Find in s1 the first occurrence of any character from s2. + * If there are none, return NULL. + * + * char * + * strpbrk(s1, s2) + * const char *s1, *s2; + */ +#include "DEFS.h" + +ENTRY(strpbrk, 0) + subl2 $32,sp /* make 256 bit table */ + movc5 $0,(sp),$0,$32,(sp) + movq 4(ap),r0 /* r0 = s1, r1 = s2 */ + + /* turn on bit for each character in s2, including '\0' */ +1: + movzbl (r1)+,r2 + bbss r2,(sp),1b + bneq 1b + + /* look for a character that is in s2 */ +2: + movzbl (r0)+,r2 /* c = *s++ */ + bbc r2,(sp),2b /* loop until c is in table */ + beql 3f /* if c==0, go return NULL */ + decl r0 /* s-- */ + ret +3: + clrl r0 + ret diff --git a/sysdeps/vax/strrchr.s b/sysdeps/vax/strrchr.s new file mode 100644 index 0000000000..f292eaceab --- /dev/null +++ b/sysdeps/vax/strrchr.s @@ -0,0 +1,114 @@ +/* + * Copyright (c) 1988 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)strrchr.s 5.4 (Berkeley) 6/1/90" +#endif /* LIBC_SCCS and not lint */ + +/* + * Find the last occurence of c in the string cp. + * Return pointer to match or null pointer. + * + * char * + * strrchr(cp, c) + * char *cp, c; + */ +#include "DEFS.h" + + .lcomm tbl,256 + +ENTRY(strrchr, 0) + movzwl $65535,r4 /* handy 65535 */ + movq 4(ap),r1 /* r1 = cp; r2 = c */ + movzbl r2,r2 + beql Lzero /* special case for c == '\0' */ + + clrl r5 /* r5 = pointer to last match */ + +/* + * Fancy scanc version. Alas, it is not reentrant. + */ + movab tbl,r3 /* r3 = address of table */ + bbss $0,(r3),Lreent /* ensure not reentering */ + movab (r3)[r2],r4 + incb (r4) /* mark both '\0' and c */ +0: + scanc $65535,(r1),(r3),$1 /* look for c or '\0' */ + beql 0b /* keep looking */ + tstb (r1) + beql 1f /* done if '\0' */ + movab (r1)+,r5 /* save most recently found, and skip over it */ + jbr 0b /* keep looking */ +1: + movl r5,r0 /* return last found (if any) */ + clrb (r4) /* clean up table */ + clrb (r3) + ret + +/* + * Special case for \0. + */ +Lzero: + locc $0,r4,(r1) /* just find end of string */ + beql Lzero /* still looking */ + movl r1,r0 /* found it */ + ret + +/* + * Slower reentrant version is two two-step searches. The first + * phase runs until we know where the string ends; it locates any + * occurrences of c within a 65535-byte block. Once we have found + * the end of the string, we find any further occurrences before + * that location. + */ +Lreent: +0: /* first phase */ + movl r1,r3 + locc $0,r4,(r3) /* look for '\0' */ + bneq 1f + locc r2,r4,(r3) /* continue phase 1 search for c */ + beql 0b + movab (r1)+,r5 /* found c: save and increment pointer */ + brb 0b /* and continue */ + +1: /* second phase */ + subl3 r3,r1,r0 /* length of short block */ + movl r3,r1 +2: + locc r2,r0,(r1) /* look for c */ + beql 3f /* skip if not found */ + movab (r1)+,r5 /* save pointer as before */ + sobgtr r0,2b /* adjust count and loop */ +3: + movl r5,r0 /* return stashed pointer */ + ret diff --git a/sysdeps/vax/strsep.s b/sysdeps/vax/strsep.s new file mode 100644 index 0000000000..9751acc699 --- /dev/null +++ b/sysdeps/vax/strsep.s @@ -0,0 +1,85 @@ +/*- + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)strsep.s 5.1 (Berkeley) 5/15/90" +#endif /* LIBC_SCCS and not lint */ + +/* + * Get next word from string *stringp, where words are + * strings separated by characters from delim. + * + * Writes NULs into the string at *stringp to end tokens. + * On return, *stringp points past the last NUL written (if there might + * be further tokens), or is NULL (if there are definitely no more tokens). + * + * If *stringp is NULL, strtoken returns NULL. + * + * char * + * strtoken(stringp, delim) + * register char **stringp; + * register char const *delim; + */ +#include "DEFS.h" + +ENTRY(strsep, 0) + tstl *4(ap) /* if (*stringp == NULL) */ + bneq 0f + clrl r0 # return (NULL); + ret + +0: + subl2 $32,sp /* make room for 256 bit table */ + movc5 $0,(sp),$0,$32,(sp) + movq 4(ap),r1 /* r1 = stringp, r2 = delim */ + + /* turn on bit for each character in s2, including '\0' */ +1: + movzbl (r2)+,r0 + bbss r0,(sp),1b + bneq 1b + + movl (r1),r3 /* r3 = s = *stringp */ + movl r3,r0 /* save return value */ + + /* scan for delimiters */ +2: + movzbl (r3)+,r2 /* c = *s++ */ + bbc r2,(sp),2b /* loop until c is in table */ + beql 3f + clrb -1(r3) /* if c!='\0', s[-1] = 0 */ + movl r3,(r1) /* and *stringp = s */ + ret +3: + clrl (r1) /* else *stringp = NULL */ + ret diff --git a/sysdeps/vax/strspn.s b/sysdeps/vax/strspn.s new file mode 100644 index 0000000000..fc86af7c37 --- /dev/null +++ b/sysdeps/vax/strspn.s @@ -0,0 +1,70 @@ +/*- + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)strspn.s 5.1 (Berkeley) 5/15/90" +#endif /* LIBC_SCCS and not lint */ + +/* + * Span the string s2 (skip characters that are in s2). + * Return the number of characters in s1 that were skipped. + * + * size_t + * strspn(s1, s2) + * const char *s1, *s2; + */ +#include "DEFS.h" + +ENTRY(strspn, 0) + subl2 $32,sp /* make 256 bit table */ + movc5 $0,(sp),$0,$32,(sp) + movq 4(ap),r1 /* r1 = s1, r2 = s2 */ + + /* turn on bit for each character in s2, including '\0' */ +1: + movzbl (r2)+,r0 + bbss r0,(sp),1b + bneq 1b + + /* now clear bit for '\0' */ + /* (this is easier than avoiding setting it in the first place) */ + bicb2 $1,(sp) /* stop at '\0' */ + movl r1,r0 /* r0 = s (current pos in s1) */ + + /* look for a character that is not in s2 */ +2: + movzbl (r0)+,r2 /* c = *s++ */ + bbs r2,(sp),2b /* loop while c is in table */ + decl r0 /* s-- */ + subl2 r1,r0 /* r0 = s - s1 = count */ + ret diff --git a/sysdeps/vax/strstr.s b/sysdeps/vax/strstr.s new file mode 100644 index 0000000000..2e5337595d --- /dev/null +++ b/sysdeps/vax/strstr.s @@ -0,0 +1,113 @@ +/*- + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)strstr.s 5.2 (Berkeley) 8/21/90" +#endif /* LIBC_SCCS and not lint */ + +/* + * Find the first occurrence of s2 as a substring in s1. + * If s2 is empty, return s1. + * + * char *strstr(s1, s2) + * const char *s1, *s2; + */ +#include "DEFS.h" + +ENTRY(strstr, 0) + movq 4(ap),r3 /* r3 = s1, r4 = s2 */ + movzwl $65535,r2 /* r2 = locc/matchc limit */ + locc $0,r2,(r4) /* find '\0' in s2 */ + beql 4f + subl3 r4,r1,r5 /* r5 = strlen(s2) */ + beql 1f /* if r5 == 0, return s1 */ + + /* + * s2 is short enough to apply matchc. + * If s1 is long, we have to do it in stages. + */ +0: locc $0,r2,(r3) /* find '\0' in s1 */ + beql 3f + + /* + * Both strings are `short'; we can use matchc directly. + */ + subl3 r3,r1,r1 /* r1 = strlen(s1) */ + matchc r5,(r4),r1,(r3) /* find substring */ + bneq 2f + + /* + * r3 points r5 bytes past match. Return the match. + */ +1: subl3 r5,r3,r0 /* return (byte_past_match - strlen(s2)) */ + ret + + /* + * There is no matching substring. + */ +2: clrl r0 /* return NULL */ + ret + + /* + * s1 is too long (> 65535 bytes) to apply matchc directly, + * but s2 is short enough. Apply s2 to s1, then (if not + * found yet) advancing s1 by (65536-strlen(s2)) bytes and + * loop. + */ +3: matchc r5,(r4),r2,(r3) /* search */ + beql 1b /* if found, go return it */ + decw r2 /* from 0 to 65535 */ + incl r3 /* already advanced 65535, now 65536 */ + subl2 r5,r3 /* ... minus strlen(s2) */ + brb 0b + + /* + * s2 is too long (> 65535 bytes) to bother with matchc. + */ +4: locc $0,r2,(r1) /* continue working on strlen(s2) */ + beql 4b + subl3 r1,r4,r5 /* r5 = strlen(s2) */ + movb (r4)+,r2 /* r2 = *s2++ */ + decl r5 /* fix up length */ +5: movb (r3)+,r0 /* r0 = *s1++ */ + beql 2b /* if '\0', return NULL */ + cmpb r0,r2 + bneq 5b /* loop until first char found */ + pushr R5|R4|R3|R2 /* save c, s1, s2, n */ + pushr R5|R4|R3 /* strncmp(s1, s2, n) */ + calls $3,_strncmp + popr R2|R3|R4|R5 /* restore */ + tstl r0 + bneq 5b /* loop until strncmp says rest same too */ + subl3 $1,r3,r0 /* return previous s1 */ + ret From 7dd3731c2b06c512ccebe79627187860c4f9b7a5 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 13 May 1992 05:48:35 +0000 Subject: [PATCH 0127/4487] Formerly m68k/fpu/__math.h.~11~ --- sysdeps/m68k/fpu/__math.h | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h index 8f2ded1ba0..fa3f3bf979 100644 --- a/sysdeps/m68k/fpu/__math.h +++ b/sysdeps/m68k/fpu/__math.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992 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 @@ -18,22 +18,10 @@ Cambridge, MA 02139, USA. */ #ifdef __GNUC__ -/* IGNORE($ */ -#ifdef __STDC__ -/* $) IFANSI($ */ -#define __m81_s(x) #x -#define __m81_ul(x) __ ## x -/* $) IGNORE($ */ -#else -/* $) IFTRAD($ */ -#define __m81_s(x) "x" -#define __m81_ul(x) __/**/x -/* $) IGNORE($ */ -#endif -/* $) */ +#include #ifdef __NO_MATH_INLINES -#define __m81_u(x) __m81_ul(x) +#define __m81_u(x) __CONCAT(__,x) #else #define __m81_u(x) x #define __MATH_INLINES 1 @@ -44,7 +32,7 @@ Cambridge, MA 02139, USA. */ __m81_u(func)(double __mathop_x) \ { \ double __result; \ - __asm("f" __m81_s(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x)); \ + __asm("f" __STRING(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x));\ return __result; \ } #define __inline_mathop(op) __inline_mathop2(op, op) From 87c53c220e4910412b10fea68ab1b08ee5f8ca39 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 14 May 1992 21:16:40 +0000 Subject: [PATCH 0128/4487] Initial revision --- sysdeps/m68k/Makefile | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 sysdeps/m68k/Makefile diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile new file mode 100644 index 0000000000..aaa96c7fc3 --- /dev/null +++ b/sysdeps/m68k/Makefile @@ -0,0 +1,7 @@ +# m68k/bsd really means m68k with MIT assembler syntax. + +ifeq ($(subdir),uf-crypt) + +crypt := crypt.sun3 # Use uf-crypt/crypt.sun3.S. + +endif # uf-crypt From 00c9588688e94ba275115444e229d7809c8fcdf3 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 14 May 1992 21:36:45 +0000 Subject: [PATCH 0129/4487] Formerly m68k/Makefile.~2~ --- sysdeps/m68k/Makefile | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile index aaa96c7fc3..4690591cba 100644 --- a/sysdeps/m68k/Makefile +++ b/sysdeps/m68k/Makefile @@ -1,7 +1,5 @@ -# m68k/bsd really means m68k with MIT assembler syntax. +# This uses MIT assembler syntax. We have no convenient +# way to choose a sysdep file based on MIT vs Motorola syntax. +# No existing m68k ports use Motorola syntax. -ifeq ($(subdir),uf-crypt) - -crypt := crypt.sun3 # Use uf-crypt/crypt.sun3.S. - -endif # uf-crypt +crypt := crypt.sun3 # Use uf-crypt/crypt.sun3.S. From 47688c639ec10b5cebd81b5291cb5d262e523058 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 17 May 1992 21:05:41 +0000 Subject: [PATCH 0130/4487] entered into RCS --- sysdeps/m68k/ffs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/m68k/ffs.c b/sysdeps/m68k/ffs.c index f77a0afab5..d9ec2b1ced 100644 --- a/sysdeps/m68k/ffs.c +++ b/sysdeps/m68k/ffs.c @@ -19,7 +19,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#include +#include #undef ffs From 4dd8b039447f94c7895c4a24084caeee51259ee8 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 24 May 1992 05:59:13 +0000 Subject: [PATCH 0131/4487] entered into RCS --- sysdeps/m68k/fpu/switch/68881-sw.h | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/sysdeps/m68k/fpu/switch/68881-sw.h b/sysdeps/m68k/fpu/switch/68881-sw.h index 6447c8617b..3d7a3927f5 100644 --- a/sysdeps/m68k/fpu/switch/68881-sw.h +++ b/sysdeps/m68k/fpu/switch/68881-sw.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992 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 @@ -19,7 +19,7 @@ Cambridge, MA 02139, USA. */ #ifndef _68881_SWITCH_H #define _68881_SWITCH_H 1 - +#include /* This is the format of the data at the code label for a function which wants to switch depending on whether or not a 68881 is present. @@ -33,9 +33,9 @@ Cambridge, MA 02139, USA. */ struct switch_caller { unsigned short int insn; /* The `jsr' or `jmp' instruction. */ - PTR target; /* The target of the instruction. */ - PTR soft; /* The address of the soft function. */ - PTR fpu; /* The address of the 68881 function. */ + __ptr_t target; /* The target of the instruction. */ + __ptr_t soft; /* The address of the soft function. */ + __ptr_t fpu; /* The address of the 68881 function. */ }; /* These are opcodes (values for `insn', above) for `jmp' and `jsr' @@ -50,20 +50,14 @@ struct switch_caller extern void EXFUN(__68881_switch, (int __dummy)); -#ifdef __STDC__ -#define __paste(a, b) a ## b -#else -#define __paste(a, b) a/**/b -#endif - /* Define FUNCTION as a `struct switch_caller' which will call `__FUNCTION_68881' if a 68881 is present, and `__FUNCTION_soft' if not. #define switching_function(FUNCTION) \ struct switch_caller FUNCTION = \ { \ - JSR, (PTR) __68881_switch, \ - __paste(__paste(__, FUNCTION), _soft), \ - __paste(__paste(__, FUNCTION), _68881) \ + JSR, (__ptr_t) __68881_switch, \ + __CONCAT(__CONCAT(__,FUNCTION),_soft), \ + __CONCAT(__CONCAT(__,FUNCTION),_68881) \ } From bbec155d919ea5b7ab4b6a0ed7c213f991eabc99 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 26 May 1992 06:45:03 +0000 Subject: [PATCH 0132/4487] entered into RCS --- sysdeps/unix/bsd/sun/sunos4/uname.S | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/bsd/sun/sunos4/uname.S diff --git a/sysdeps/unix/bsd/sun/sunos4/uname.S b/sysdeps/unix/bsd/sun/sunos4/uname.S new file mode 100644 index 0000000000..488eeb1d97 --- /dev/null +++ b/sysdeps/unix/bsd/sun/sunos4/uname.S @@ -0,0 +1 @@ +#include From c3b4e404462097390f1ed29a54cd6ce7cdf3369b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 26 May 1992 06:45:14 +0000 Subject: [PATCH 0133/4487] Initial revision --- sysdeps/unix/bsd/sun/sunos4/utsnamelen.h | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/bsd/sun/sunos4/utsnamelen.h diff --git a/sysdeps/unix/bsd/sun/sunos4/utsnamelen.h b/sysdeps/unix/bsd/sun/sunos4/utsnamelen.h new file mode 100644 index 0000000000..f657d04ce4 --- /dev/null +++ b/sysdeps/unix/bsd/sun/sunos4/utsnamelen.h @@ -0,0 +1 @@ +#include From e38d84845407e7983fa7a8c46502c053d919254f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 28 May 1992 10:57:10 +0000 Subject: [PATCH 0134/4487] entered into RCS --- sysdeps/m68k/jmp_buf.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/m68k/jmp_buf.h b/sysdeps/m68k/jmp_buf.h index 807fcb8c10..96240f0d8e 100644 --- a/sysdeps/m68k/jmp_buf.h +++ b/sysdeps/m68k/jmp_buf.h @@ -1,4 +1,4 @@ -/* Define the machine-dependent type `jmp_buf'. Sun 3 version. */ +/* Define the machine-dependent type `jmp_buf'. m68k version. */ typedef struct { @@ -6,9 +6,9 @@ typedef struct long int __dregs[7]; /* There are six 4-byte address registers, plus the FP and SP. */ - PTR __aregs[6]; - PTR __fp; - PTR __sp; + int *__aregs[6]; + int * __fp; + int * __sp; #if defined(__HAVE_68881__) || defined(__HAVE_FPU__) /* There are eight floating point registers which From 6d1b5d43aa6ab99623fde293622046bd56a1b141 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 29 Jun 1992 23:00:00 +0000 Subject: [PATCH 0135/4487] Formerly sysdeps/unix/bsd/sun/sunos4/__wait4.c.~2~ --- sysdeps/unix/bsd/sun/sunos4/wait4.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/bsd/sun/sunos4/wait4.c b/sysdeps/unix/bsd/sun/sunos4/wait4.c index 1ee7beab4c..561457e11e 100644 --- a/sysdeps/unix/bsd/sun/sunos4/wait4.c +++ b/sysdeps/unix/bsd/sun/sunos4/wait4.c @@ -25,6 +25,9 @@ Cambridge, MA 02139, USA. */ #include #include +extern pid_t EXFUN(__wait4_syscall, + (pid_t pid, union wait *stat_loc, int options, PTR usage)); + pid_t DEFUN(__wait4, (pid, stat_loc, options, usage), pid_t pid AND union wait *stat_loc AND int options AND PTR usage) @@ -40,5 +43,5 @@ DEFUN(__wait4, (pid, stat_loc, options, usage), break; } - return __wait4_syscall (pid, stat_loc, option, usage); + return __wait4_syscall (pid, stat_loc, options, usage); } From 929c9f66003d0829a133ba354047a0967974c93d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 28 Jul 1992 22:10:16 +0000 Subject: [PATCH 0136/4487] Initial revision --- sysdeps/unix/sysv/isc2.2/rename.S | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/isc2.2/rename.S diff --git a/sysdeps/unix/sysv/isc2.2/rename.S b/sysdeps/unix/sysv/isc2.2/rename.S new file mode 100644 index 0000000000..a5a8dfeeef --- /dev/null +++ b/sysdeps/unix/sysv/isc2.2/rename.S @@ -0,0 +1 @@ +#include From cf6436afd970ae73d8464e56e3a287d0239f805c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 31 Jul 1992 00:22:36 +0000 Subject: [PATCH 0137/4487] Formerly sysdeps/unix/bsd/sun/sunos4/__wait4.c.~3~ --- sysdeps/unix/bsd/sun/sunos4/wait4.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/bsd/sun/sunos4/wait4.c b/sysdeps/unix/bsd/sun/sunos4/wait4.c index 561457e11e..6641bdfc0d 100644 --- a/sysdeps/unix/bsd/sun/sunos4/wait4.c +++ b/sysdeps/unix/bsd/sun/sunos4/wait4.c @@ -2,7 +2,7 @@ SunOS 4.1) on top of SunOS's wait4 system call, which has semantics different from those documented. Go Sun! -Copyright (C) 1991 Free Software Foundation, Inc. +Copyright (C) 1991, 1992 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 @@ -30,7 +30,8 @@ extern pid_t EXFUN(__wait4_syscall, pid_t DEFUN(__wait4, (pid, stat_loc, options, usage), - pid_t pid AND union wait *stat_loc AND int options AND PTR usage) + pid_t pid AND union wait *stat_loc AND int options AND + struct rusage *usage) { switch (pid) { From 4ca58d0af958a9d0f8b1852e838066fb78764a91 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 31 Jul 1992 00:23:30 +0000 Subject: [PATCH 0138/4487] entered into RCS --- sysdeps/unix/bsd/sun/sparc/sigcontext.h | 2 +- sysdeps/unix/bsd/sun/sunos4/wait.c | 2 +- sysdeps/unix/bsd/sun/sunos4/wait3.c | 2 +- sysdeps/unix/bsd/sun/sunos4/waitpid.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/bsd/sun/sparc/sigcontext.h b/sysdeps/unix/bsd/sun/sparc/sigcontext.h index b61d642d9d..4834f2ff9e 100644 --- a/sysdeps/unix/bsd/sun/sparc/sigcontext.h +++ b/sysdeps/unix/bsd/sun/sparc/sigcontext.h @@ -25,7 +25,7 @@ struct sigcontext #define SPARC_MAXREGWINDOW 31 /* Maximum usable register windows. */ int sc_sp, sc_pc, sc_npc, sc_psr, sc_g1, sc_o0; int sc_wbcnt; /* Number of outstanding windows. */ - PTR sc_spbuf[SPARC_MAXREGWINDOW]; /* SP's for each window. */ + __ptr_t sc_spbuf[SPARC_MAXREGWINDOW]; /* SP's for each window. */ int sc_wbuf[SPARC_MAXREGWINDOW][16]; /* Saved register windows. */ }; diff --git a/sysdeps/unix/bsd/sun/sunos4/wait.c b/sysdeps/unix/bsd/sun/sunos4/wait.c index 452fdd22c0..d9ee77b4a3 100644 --- a/sysdeps/unix/bsd/sun/sunos4/wait.c +++ b/sysdeps/unix/bsd/sun/sunos4/wait.c @@ -1 +1 @@ -#include +#include diff --git a/sysdeps/unix/bsd/sun/sunos4/wait3.c b/sysdeps/unix/bsd/sun/sunos4/wait3.c index a7485f5a64..ecc11134bb 100644 --- a/sysdeps/unix/bsd/sun/sunos4/wait3.c +++ b/sysdeps/unix/bsd/sun/sunos4/wait3.c @@ -1 +1 @@ -#include +#include diff --git a/sysdeps/unix/bsd/sun/sunos4/waitpid.c b/sysdeps/unix/bsd/sun/sunos4/waitpid.c index a4839222a6..47129a8845 100644 --- a/sysdeps/unix/bsd/sun/sunos4/waitpid.c +++ b/sysdeps/unix/bsd/sun/sunos4/waitpid.c @@ -1 +1 @@ -#include +#include From fbb6e49cbf84bc99f2dbf128365387412f7d710c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 7 Aug 1992 00:27:07 +0000 Subject: [PATCH 0139/4487] Formerly m68k/fpu/__math.h.~12~ --- sysdeps/m68k/fpu/__math.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h index fa3f3bf979..eb212a5fba 100644 --- a/sysdeps/m68k/fpu/__math.h +++ b/sysdeps/m68k/fpu/__math.h @@ -53,8 +53,10 @@ __inline_mathop2(log, logn) __inline_mathop2(floor, intrz) __inline_mathop(sqrt) +__inline_mathop2(__rint, intr) + #ifdef __USE_MISC -__inline_mathop2(rint, int) +__inline_mathop2(rint, intr) __inline_mathop2(expm1, etoxm1) __inline_mathop2(log1p, lognp1) __inline_mathop(atanh) From 09ecae354fe683ec3f6afc2f07a17a75e61703ec Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 7 Aug 1992 20:54:35 +0000 Subject: [PATCH 0140/4487] Formerly m68k/fpu/__math.h.~13~ --- sysdeps/m68k/fpu/__math.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h index eb212a5fba..c79befa1f4 100644 --- a/sysdeps/m68k/fpu/__math.h +++ b/sysdeps/m68k/fpu/__math.h @@ -53,10 +53,10 @@ __inline_mathop2(log, logn) __inline_mathop2(floor, intrz) __inline_mathop(sqrt) -__inline_mathop2(__rint, intr) +__inline_mathop2(__rint, int) #ifdef __USE_MISC -__inline_mathop2(rint, intr) +__inline_mathop2(rint, int) __inline_mathop2(expm1, etoxm1) __inline_mathop2(log1p, lognp1) __inline_mathop(atanh) From 47d4c6ae22f65ee16fead612a78fba78b0c9a416 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 10 Aug 1992 21:27:25 +0000 Subject: [PATCH 0141/4487] Formerly m68k/fpu/__math.h.~14~ --- sysdeps/m68k/fpu/__math.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h index c79befa1f4..ca95533fba 100644 --- a/sysdeps/m68k/fpu/__math.h +++ b/sysdeps/m68k/fpu/__math.h @@ -54,6 +54,7 @@ __inline_mathop2(floor, intrz) __inline_mathop(sqrt) __inline_mathop2(__rint, int) +__inline_mathop2(__expm1, etoxm1) #ifdef __USE_MISC __inline_mathop2(rint, int) From 3be55181639653e566109490d2a43ed55ed6b74c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 10 Sep 1992 22:54:01 +0000 Subject: [PATCH 0142/4487] Formerly unix/bsd/sun/sunos4/utsnamelen.h.~2~ --- sysdeps/unix/bsd/sun/sunos4/utsnamelen.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/bsd/sun/sunos4/utsnamelen.h b/sysdeps/unix/bsd/sun/sunos4/utsnamelen.h index f657d04ce4..31473cf4ea 100644 --- a/sysdeps/unix/bsd/sun/sunos4/utsnamelen.h +++ b/sysdeps/unix/bsd/sun/sunos4/utsnamelen.h @@ -1 +1 @@ -#include +#define _UTSNAME_LENGTH 9 From 188c2e4aa97715ed053eb7fd3a9a1216447ea4de Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 2 Oct 1992 22:57:23 +0000 Subject: [PATCH 0143/4487] Formerly unix/bsd/vax/sysdep.S.~2~ --- sysdeps/unix/bsd/vax/sysdep.S | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/sysdeps/unix/bsd/vax/sysdep.S b/sysdeps/unix/bsd/vax/sysdep.S index af18b563b5..e29a8783dd 100644 --- a/sysdeps/unix/bsd/vax/sysdep.S +++ b/sysdeps/unix/bsd/vax/sysdep.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992 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 @@ -16,13 +16,9 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifdef HAVE_GNU_LD -#define ___errno _errno -#endif - -.globl ___errno +.globl _errno .globl syscall_error syscall_error: - movl r0, ___errno + movl r0, _errno mnegl $1, r0 ret From e4d42dcc62b873949b02254f6c791fe993817567 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 2 Oct 1992 23:03:51 +0000 Subject: [PATCH 0144/4487] entered into RCS --- sysdeps/unix/bsd/sun/m68k/sethostid.S | 2 +- sysdeps/unix/bsd/sun/sparc/sethostid.S | 4 ++-- sysdeps/unix/sysv/i386/signal.S | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sysdeps/unix/bsd/sun/m68k/sethostid.S b/sysdeps/unix/bsd/sun/m68k/sethostid.S index 7b128a1f77..8b30f3fe65 100644 --- a/sysdeps/unix/bsd/sun/m68k/sethostid.S +++ b/sysdeps/unix/bsd/sun/m68k/sethostid.S @@ -30,7 +30,7 @@ SYSCALL (sethostid, 1) .globl _sethostid .even _sethostid: - movel #ENOSYS, ___errno + movel #ENOSYS, _errno moveq #-1, d0 rts diff --git a/sysdeps/unix/bsd/sun/sparc/sethostid.S b/sysdeps/unix/bsd/sun/sparc/sethostid.S index 709fcea326..fbafba5277 100644 --- a/sysdeps/unix/bsd/sun/sparc/sethostid.S +++ b/sysdeps/unix/bsd/sun/sparc/sethostid.S @@ -31,8 +31,8 @@ SYSCALL (sethostid, 1) ENTRY (sethostid) mov ENOSYS, %o0 - sethi %hi(___errno), %g1 - st %o0, [%g1 + %lo(___errno)] + sethi %hi(_errno), %g1 + st %o0, [%g1 + %lo(_errno)] retl sub %g0, 1, %o0 diff --git a/sysdeps/unix/sysv/i386/signal.S b/sysdeps/unix/sysv/i386/signal.S index 6fd8113557..14ef77bdc5 100644 --- a/sysdeps/unix/sysv/i386/signal.S +++ b/sysdeps/unix/sysv/i386/signal.S @@ -22,10 +22,10 @@ Cambridge, MA 02139, USA. */ with the address of the `__sigreturn' function. */ .globl syscall_error - .globl ___sigreturn + .globl C_SYMBOL_NAME(__sigreturn) ENTRY (signal) lea SYS_signal, %eax - lea ___sigreturn, %edx - .byte 0x9a, 0, 0, 0, 0, 7, 0 + lea C_SYMBOL_NAME(__sigreturn), %edx + .byte 0x9a, 0, 0, 0, 0, 7, 0 /* lcall $7, $0 -- GAS bug. */ jb syscall_error ret From 1b52c9d5a4af33eccaa116a5c266ac05fdfc628a Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 5 Oct 1992 23:40:43 +0000 Subject: [PATCH 0145/4487] entered into RCS --- sysdeps/unix/bsd/ultrix4/uname.S | 1 + sysdeps/unix/bsd/ultrix4/utsnamelen.h | 1 + 2 files changed, 2 insertions(+) create mode 100644 sysdeps/unix/bsd/ultrix4/uname.S create mode 100644 sysdeps/unix/bsd/ultrix4/utsnamelen.h diff --git a/sysdeps/unix/bsd/ultrix4/uname.S b/sysdeps/unix/bsd/ultrix4/uname.S new file mode 100644 index 0000000000..488eeb1d97 --- /dev/null +++ b/sysdeps/unix/bsd/ultrix4/uname.S @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/bsd/ultrix4/utsnamelen.h b/sysdeps/unix/bsd/ultrix4/utsnamelen.h new file mode 100644 index 0000000000..ad4389ab02 --- /dev/null +++ b/sysdeps/unix/bsd/ultrix4/utsnamelen.h @@ -0,0 +1 @@ +#define _UTSNAME_LENGTH 32 From 603bee3c228177edbd013ff9c3771c23ed173947 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 6 Oct 1992 19:13:50 +0000 Subject: [PATCH 0146/4487] Formerly m68k/Makefile.~3~ --- sysdeps/m68k/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile index 4690591cba..09f3b4355e 100644 --- a/sysdeps/m68k/Makefile +++ b/sysdeps/m68k/Makefile @@ -3,3 +3,9 @@ # No existing m68k ports use Motorola syntax. crypt := crypt.sun3 # Use uf-crypt/crypt.sun3.S. + +# Disgusting magic to get `#'s into the asm code. +$(objpfx)%.o: %.S + $(CC) $(CPPFLAGS) -E $< \ + | sed 's/(@@@Hash-Here@@@)/#/g' | $(AS) $(ASFLAGS) -o $@ +.S-rule := t From 231d75ca3944b3e07aad3fe0778beef92ffdb731 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 6 Oct 1992 19:17:50 +0000 Subject: [PATCH 0147/4487] Formerly unix/bsd/sun/m68k/sysdep.h.~15~ --- sysdeps/unix/bsd/sun/m68k/sysdep.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/bsd/sun/m68k/sysdep.h b/sysdeps/unix/bsd/sun/m68k/sysdep.h index 9b9ace0561..d89faab634 100644 --- a/sysdeps/unix/bsd/sun/m68k/sysdep.h +++ b/sysdeps/unix/bsd/sun/m68k/sysdep.h @@ -16,7 +16,7 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* This code wants to be run through m4. */ +/* This code wants to be run through m4; see sysdeps/m68k/Makefile. */ #include From c0b033d7ecf235e98424ce39b033678b6827a690 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 16 Oct 1992 21:31:28 +0000 Subject: [PATCH 0148/4487] Formerly m68k/fpu/atan2.c.~5~ --- sysdeps/m68k/fpu/atan2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/m68k/fpu/atan2.c b/sysdeps/m68k/fpu/atan2.c index 7860178216..ee7741f66e 100644 --- a/sysdeps/m68k/fpu/atan2.c +++ b/sysdeps/m68k/fpu/atan2.c @@ -70,5 +70,5 @@ DEFUN(atan2, (y, x), double y AND double x) } #else -#include +#include #endif From e4e6950ea03e53fd6bb12d58374921d18c66ac42 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 28 Oct 1992 01:11:18 +0000 Subject: [PATCH 0149/4487] entered into RCS --- sysdeps/unix/bsd/sun/sunos3/m68k/wait.S | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/bsd/sun/sunos3/m68k/wait.S diff --git a/sysdeps/unix/bsd/sun/sunos3/m68k/wait.S b/sysdeps/unix/bsd/sun/sunos3/m68k/wait.S new file mode 100644 index 0000000000..c7f681dff1 --- /dev/null +++ b/sysdeps/unix/bsd/sun/sunos3/m68k/wait.S @@ -0,0 +1 @@ +#include From 79ff545696046e4b8c8cd1db9d7b0665067dff6c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 29 Oct 1992 21:29:21 +0000 Subject: [PATCH 0150/4487] Formerly mips/setjmp.S.~3~ --- sysdeps/mips/setjmp.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/mips/setjmp.S b/sysdeps/mips/setjmp.S index 963a718ed8..507da8d4a8 100644 --- a/sysdeps/mips/setjmp.S +++ b/sysdeps/mips/setjmp.S @@ -24,4 +24,5 @@ Cambridge, MA 02139, USA. */ ENTRY (__setjmp) move a1, sp move a2, $fp - j ___setjmp_aux + j __setjmp_aux + From 223d3c5c22e5c48159d4e14fde60d5d05658f55d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 13 Nov 1992 00:04:25 +0000 Subject: [PATCH 0151/4487] Initial revision --- sysdeps/unix/bsd/sun/sunos4/fcntlbits.h | 142 ++++++++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 sysdeps/unix/bsd/sun/sunos4/fcntlbits.h diff --git a/sysdeps/unix/bsd/sun/sunos4/fcntlbits.h b/sysdeps/unix/bsd/sun/sunos4/fcntlbits.h new file mode 100644 index 0000000000..7619ea50c6 --- /dev/null +++ b/sysdeps/unix/bsd/sun/sunos4/fcntlbits.h @@ -0,0 +1,142 @@ +/* O_*, F_*, FD_* bit values for SunOS 4. +Copyright (C) 1991, 1992 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifndef _FCNTLBITS_H + +#define _FCNTLBITS_H 1 + + +/* File access modes for `open' and `fcntl'. */ +#define O_RDONLY 0 /* Open read-only. */ +#define O_WRONLY 1 /* Open write-only. */ +#define O_RDWR 2 /* Open read/write. */ + + +/* Bits OR'd into the second argument to open. */ +#define O_CREAT 0x0200 /* Create file if it doesn't exist. */ +#define O_EXCL 0x0800 /* Fail if file already exists. */ +#define O_TRUNC 0x0400 /* Truncate file to zero length. */ +#define O_NOCTTY 0x8000 /* Don't assign a controlling terminal. */ +#if defined (__USE_BSD) || defined (__USE_SVID) +#define O_ASYNC 0x0040 /* Send SIGIO to owner when data is ready. */ +#define O_FSYNC 0x2000 /* Synchronous writes. */ +#define O_SYNC O_FSYNC +#endif + +/* File status flags for `open' and `fcntl'. */ +#define O_APPEND 0x0008 /* Writes append to the file. */ +#define O_NONBLOCK 0x4000 /* Non-blocking I/O. */ + +#ifdef __USE_BSD +#define O_NDELAY 0x0004 +#endif +#if !defined (O_NDELAY) && defined (__USE_SVID) +#define O_NDELAY 0x1000 +#endif + +#ifdef __USE_BSD +/* Bits in the file status flags returned by F_GETFL. + These are all the O_* flags, plus FREAD and FWRITE, which are + independent bits set by which of O_RDONLY, O_WRONLY, and O_RDWR, was + given to `open'. */ +#define FREAD 1 +#define FWRITE 2 + +/* Traditional Unix names the O_* bits. */ +#define FASYNC O_ASYNC +#define FCREAT O_CREAT +#define FEXCL O_EXCL +#define FTRUNC O_TRUNC +#define FNOCTTY O_NOCTTY +#define FFSYNC O_FSYNC +#define FSYNC O_SYNC +#define FAPPEND O_APPEND +#define FNONBLOCK O_NONBLOCK +#define FNONBIO O_NONBLOCK +#define FNDELAY 0x0004 +#define FNBIO 0x1000 +#endif + +/* Mask for file access modes. This is system-dependent in case + some system ever wants to define some other flavor of access. */ +#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR) + +/* Values for the second argument to `fcntl'. */ +#define F_DUPFD 0 /* Duplicate file descriptor. */ +#define F_GETFD 1 /* Get file descriptor flags. */ +#define F_SETFD 2 /* Set file descriptor flags. */ +#define F_GETFL 3 /* Get file status flags. */ +#define F_SETFL 4 /* Set file status flags. */ +#ifdef __USE_BSD +#define F_GETOWN 5 /* Get owner (receiver of SIGIO). */ +#define F_SETOWN 6 /* Set owner (receiver of SIGIO). */ +#endif +#define F_GETLK 7 /* Get record locking info. */ +#define F_SETLK 8 /* Set record locking info (non-blocking). */ +#define F_SETLKW 9 /* Set record locking info (blocking). */ +#ifdef __USE_BSD +#define F_RGETLK 10 /* Get remote record locking info. */ +#define F_RSETLK 11 /* Set remote locking info (non-blocking). */ +#define F_CNVT 12 /* Convert a fhandle to an open fd. */ +#define F_RSETLKW 13 /* Set remote locking info (blocking). */ +#endif + +/* File descriptor flags used with F_GETFD and F_SETFD. */ +#define FD_CLOEXEC 1 /* Close on exec. */ + + +#include + +/* The structure describing an advisory lock. This is the type of the third + argument to `fcntl' for the F_GETLK, F_SETLK, and F_SETLKW requests. */ +struct flock + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ + __off_t l_start; /* Offset where the lock begins. */ + __off_t l_len; /* Size of the locked area; zero means until EOF. */ + short int l_pid; /* Process holding the lock. */ + short int l_xxx; /* Reserved for future use. */ + }; + +#ifdef __USE_BSD +/* The structure describing a remote advisory lock. This is the type of the + third arg to `fcntl' for the F_RGETLK, F_RSETLK, and F_RSETLKW requests. */ +struct eflock + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ + __off_t l_start; /* Offset where the lock begins. */ + __off_t l_len; /* Size of the locked area; zero means until EOF. */ + short int l_pid; /* Process holding the lock. */ + short int l_xxx; /* Reserved for future use. */ + long int l_rpid; /* Remote process ID wanting this lock. */ + long int l_rsys; /* Remote system ID wanting this lock. */ + }; + +#endif + + +/* Values for the `l_type' field of a `struct flock'. */ +#define F_RDLCK 1 /* Read lock. */ +#define F_WRLCK 2 /* Write lock. */ +#define F_UNLCK 3 /* Remove lock. */ + + +#endif /* fcntlbits.h */ From 457c6f9b22c7b5486bd3461098ed2b19efa5edbd Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 13 Nov 1992 00:23:49 +0000 Subject: [PATCH 0152/4487] entered into RCS --- sysdeps/unix/bsd/sun/sunos4/fcntlbits.h | 7 +- sysdeps/unix/bsd/ultrix4/fcntlbits.h | 125 ++++++++++++++++++++++++ 2 files changed, 130 insertions(+), 2 deletions(-) create mode 100644 sysdeps/unix/bsd/ultrix4/fcntlbits.h diff --git a/sysdeps/unix/bsd/sun/sunos4/fcntlbits.h b/sysdeps/unix/bsd/sun/sunos4/fcntlbits.h index 7619ea50c6..210072222c 100644 --- a/sysdeps/unix/bsd/sun/sunos4/fcntlbits.h +++ b/sysdeps/unix/bsd/sun/sunos4/fcntlbits.h @@ -43,6 +43,9 @@ Cambridge, MA 02139, USA. */ #define O_APPEND 0x0008 /* Writes append to the file. */ #define O_NONBLOCK 0x4000 /* Non-blocking I/O. */ +/* Sun defines O_NDELAY one way for BSD behavior and another for System V + behavior. In the GNU C library, you get the BSD behavior unless you + define _USG_SOURCE without also defining _BSD_SOURCE or _GNU_SOURCE. */ #ifdef __USE_BSD #define O_NDELAY 0x0004 #endif @@ -69,8 +72,8 @@ Cambridge, MA 02139, USA. */ #define FAPPEND O_APPEND #define FNONBLOCK O_NONBLOCK #define FNONBIO O_NONBLOCK -#define FNDELAY 0x0004 -#define FNBIO 0x1000 +#define FNDELAY 0x0004 /* BSD O_NDELAY. */ +#define FNBIO 0x1000 /* System V O_NDELAY. */ #endif /* Mask for file access modes. This is system-dependent in case diff --git a/sysdeps/unix/bsd/ultrix4/fcntlbits.h b/sysdeps/unix/bsd/ultrix4/fcntlbits.h new file mode 100644 index 0000000000..bf8e7b2a35 --- /dev/null +++ b/sysdeps/unix/bsd/ultrix4/fcntlbits.h @@ -0,0 +1,125 @@ +/* O_*, F_*, FD_* bit values for Ultrix 4. +Copyright (C) 1991, 1992 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifndef _FCNTLBITS_H + +#define _FCNTLBITS_H 1 + + +/* File access modes for `open' and `fcntl'. */ +#define O_RDONLY 0 /* Open read-only. */ +#define O_WRONLY 1 /* Open write-only. */ +#define O_RDWR 2 /* Open read/write. */ + + +/* Bits OR'd into the second argument to open. */ +#define O_CREAT 0x0200 /* Create file if it doesn't exist. */ +#define O_EXCL 0x0800 /* Fail if file already exists. */ +#define O_TRUNC 0x0400 /* Truncate file to zero length. */ +#ifdef __USE_MISC +#define O_ASYNC 0x0040 /* Send SIGIO to owner when data is ready. */ +#define O_FSYNC 0x8000 /* Synchronous writes. */ +#define O_SYNC O_FSYNC +#define O_BLKINUSE 0x1000 /* Block if "in use". */ +#define O_BLKANDSET 0x3000 /* Block, test and set "in use" flag. */ +#define O_TERMIO 0x40000 /* "termio style program". */ +#endif +#define O_NOCTTY 0x80000 /* Don't assign a controlling terminal. */ + +/* File status flags for `open' and `fcntl'. */ +#define O_APPEND 0x0008 /* Writes append to the file. */ +#define O_NONBLOCK 0x20000 /* Non-blocking I/O. */ + +#ifdef __USE_BSD +#define O_NDELAY 0x0004 +#endif + +#ifdef __USE_BSD +/* Bits in the file status flags returned by F_GETFL. + These are all the O_* flags, plus FREAD and FWRITE, which are + independent bits set by which of O_RDONLY, O_WRONLY, and O_RDWR, was + given to `open'. */ +#define FREAD 1 +#define FWRITE 2 + +/* Traditional BSD names the O_* bits. */ +#define FASYNC O_ASYNC +#define FCREAT O_CREAT +#define FEXCL O_EXCL +#define FTRUNC O_TRUNC +#define FNOCTTY O_NOCTTY +#define FFSYNC O_FSYNC +#define FSYNC O_SYNC +#define FAPPEND O_APPEND +#define FNONBLOCK O_NONBLOCK +#define FNDELAY O_NDELAY +#define FNBLOCK O_NONBLOCK +#define FTERMIO O_TERMIO +#define FNOCTTY O_NOCTTY +#define FSYNCRON O_FSYNC +#define FBLKINUSE O_BLKINUSE +#define FBLKANDSET O_BLKANDSET +#endif + +/* Mask for file access modes. This is system-dependent in case + some system ever wants to define some other flavor of access. */ +#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR) + +/* Values for the second argument to `fcntl'. */ +#define F_DUPFD 0 /* Duplicate file descriptor. */ +#define F_GETFD 1 /* Get file descriptor flags. */ +#define F_SETFD 2 /* Set file descriptor flags. */ +#define F_GETFL 3 /* Get file status flags. */ +#define F_SETFL 4 /* Set file status flags. */ +#ifdef __USE_BSD +#define F_GETOWN 5 /* Get owner (receiver of SIGIO). */ +#define F_SETOWN 6 /* Set owner (receiver of SIGIO). */ +#endif +#define F_GETLK 7 /* Get record locking info. */ +#define F_SETLK 8 /* Set record locking info (non-blocking). */ +#define F_SETLKW 9 /* Set record locking info (blocking). */ +#ifdef __USE_MISC +#define F_SETSYN 10 /* Set synchronous writing. */ +#define F_CLRSYN 10 /* Clear synchronous writing. */ +#endif + +/* File descriptor flags used with F_GETFD and F_SETFD. */ +#define FD_CLOEXEC 1 /* Close on exec. */ + + +#include + +/* The structure describing an advisory lock. This is the type of the third + argument to `fcntl' for the F_GETLK, F_SETLK, and F_SETLKW requests. */ +struct flock + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ + __off_t l_start; /* Offset where the lock begins. */ + __off_t l_len; /* Size of the locked area; zero means until EOF. */ + __pid_t l_pid; /* Process holding the lock. */ + }; + +/* Values for the `l_type' field of a `struct flock'. */ +#define F_RDLCK 1 /* Read lock. */ +#define F_WRLCK 2 /* Write lock. */ +#define F_UNLCK 3 /* Remove lock. */ + + +#endif /* fcntlbits.h */ From e9695d04cca84214693f4be24d39c4ac75b24fc4 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 16 Nov 1992 19:42:16 +0000 Subject: [PATCH 0153/4487] entered into RCS --- sysdeps/unix/sysv/minix/sigaction.h | 49 +++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 sysdeps/unix/sysv/minix/sigaction.h diff --git a/sysdeps/unix/sysv/minix/sigaction.h b/sysdeps/unix/sysv/minix/sigaction.h new file mode 100644 index 0000000000..9395206407 --- /dev/null +++ b/sysdeps/unix/sysv/minix/sigaction.h @@ -0,0 +1,49 @@ +/* Copyright (C) 1992 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Structure describing the action to be taken when a signal arrives. */ +struct sigaction + { + /* Signal handler. */ + __sighandler_t sa_handler; + + /* Additional set of signals to be blocked. */ + __sigset_t sa_mask; + + /* Special flags. */ + int sa_flags; + }; + +/* Bits in `sa_flags'. */ +#ifdef __USE_MISC +#define SA_ONSTACK 0x1 /* Take signal on signal stack. */ +#define SA_RESETHAND 0x2 /* Reset signal handler when signal caught. */ +#define SA_NODEFER 0x4 /* Don't block signal while catching it. */ +#define SA_RESTART 0x8 /* Don't restart syscall on signal return. */ +#define SA_SIGINFO 0x10 /* Extended signal handling. */ +#define SA_NOCLDWAIT 0x20 /* Don't create zombies. */ +#define SA_COMPAT 0x80 /* Internal flag for old signal catchers. */ +#define SA_DISABLE 0x100 /* Disable alternate signal stack. */ +#endif +#define SA_NOCLDSTOP 0x40 /* Don't send SIGCHLD when children stop. */ + + +/* Values for the HOW argument to `sigprocmask'. */ +#define SIG_BLOCK 0 /* Block signals. */ +#define SIG_UNBLOCK 1 /* Unblock signals. */ +#define SIG_SETMASK 2 /* Set the set of blocked signals. */ From 873550204408dcae12a0d522aaa18a87e8f4d13c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 18 Nov 1992 20:26:47 +0000 Subject: [PATCH 0154/4487] Formerly m68k/fpu/atan2.c.~6~ --- sysdeps/m68k/fpu/atan2.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/sysdeps/m68k/fpu/atan2.c b/sysdeps/m68k/fpu/atan2.c index ee7741f66e..e937833aa0 100644 --- a/sysdeps/m68k/fpu/atan2.c +++ b/sysdeps/m68k/fpu/atan2.c @@ -21,17 +21,12 @@ Cambridge, MA 02139, USA. */ #ifdef __GNUC__ -static CONST double -PIo4 = 7.8539816339744827900E-1 , /*Hex 2^ -1 * 1.921FB54442D18 */ -PIo2 = 1.5707963267948965580E0 , /*Hex 2^ 0 * 1.921FB54442D18 */ -PI = 3.1415926535897931160E0 ; /*Hex 2^ 1 * 1.921FB54442D18 */ - double DEFUN(atan2, (y, x), double y AND double x) { static CONST double one = 1.0, zero = 0.0; double signx, signy; - double pi; + double pi, PIo4, PIo2; if (__isnan(x)) return x; @@ -42,6 +37,8 @@ DEFUN(atan2, (y, x), double y AND double x) signx = __copysign(one, x); asm("fmovecr%.x %1, %0" : "=f" (pi) : "i" (0)); + PIo2 = pi / 2; + PIo4 = pi / 4; if (y == zero) return signx == one ? y : __copysign(pi, signy); From f16f19551de1bdfe7fb0678d54047420d6182f04 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 25 Nov 1992 00:50:57 +0000 Subject: [PATCH 0155/4487] Initial revision --- sysdeps/alpha/__longjmp.c | 32 ++++++++++++++++++++++++++++++++ sysdeps/alpha/jmp_buf.h | 7 +++++++ 2 files changed, 39 insertions(+) create mode 100644 sysdeps/alpha/__longjmp.c create mode 100644 sysdeps/alpha/jmp_buf.h diff --git a/sysdeps/alpha/__longjmp.c b/sysdeps/alpha/__longjmp.c new file mode 100644 index 0000000000..152df8658a --- /dev/null +++ b/sysdeps/alpha/__longjmp.c @@ -0,0 +1,32 @@ +/* Copyright (C) 1992 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#ifndef __GNUC__ +#error This file uses GNU C extensions; you must compile with GCC. +#endif + +/* Jump to the position specified by ENV, causing the + setjmp call there to return VAL, or 1 if VAL is 0. */ +__NORETURN +void +__longjmp (const jmp_buf env, int val) +{ + +} diff --git a/sysdeps/alpha/jmp_buf.h b/sysdeps/alpha/jmp_buf.h new file mode 100644 index 0000000000..98601d9c75 --- /dev/null +++ b/sysdeps/alpha/jmp_buf.h @@ -0,0 +1,7 @@ +/* Define the machine-dependent type `jmp_buf'. Alpha version. */ + +typedef struct + { + long int __iregs[30]; + double __fregs[31]; + } __jmp_buf[1]; From b14d8f912b537108331cf0d094c67dd9fe36d25c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 25 Nov 1992 01:55:31 +0000 Subject: [PATCH 0156/4487] entered into RCS --- sysdeps/alpha/jmp_buf.h | 45 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 42 insertions(+), 3 deletions(-) diff --git a/sysdeps/alpha/jmp_buf.h b/sysdeps/alpha/jmp_buf.h index 98601d9c75..6e6f6b4727 100644 --- a/sysdeps/alpha/jmp_buf.h +++ b/sysdeps/alpha/jmp_buf.h @@ -1,7 +1,46 @@ -/* Define the machine-dependent type `jmp_buf'. Alpha version. */ +/* Define the machine-dependent type `jmp_buf'. Alpha version. +Copyright (C) 1992 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ typedef struct { - long int __iregs[30]; - double __fregs[31]; + /* Integer registers: + $0 is the return value; + $1-$8, $22-$25, $28 are call-used; + $9-$14 we save here; + $15 is the FP and we save it here; + $16-$21 are input arguments (call-used); + $26 is the return PC and we save it here; + $27 is the procedure value (i.e., the address of __setjmp); + $29 is the global pointer, which the caller will reconstruct + from the return address restored in $26; + $30 is the stack pointer and we save it here; + $31 is always zero. */ + long int __9, __10, __11, __12, __13, __14; + long int *__pc, *__fp, *__sp; + +#if 1 /* XXX need predefine for TARGET_FPREGS */ + /* Floating-point registers: + $f0 is the floating return value; + $f1, $f10-$f15, $f22-$f30 are call-used; + $f2-$f9 we save here; + $f16-$21 are input args (call-used); + $f31 is always zero. */ + double __f2, __f3, __f4, __f5, __f6, __f7, __f8, __f9; +#endif /* Have FP regs. */ } __jmp_buf[1]; From d94f0508a5197b98bc151cf3fc3e9f8e08e0738d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 25 Nov 1992 02:25:48 +0000 Subject: [PATCH 0157/4487] Initial revision --- sysdeps/alpha/setjmp_aux.c | 58 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 sysdeps/alpha/setjmp_aux.c diff --git a/sysdeps/alpha/setjmp_aux.c b/sysdeps/alpha/setjmp_aux.c new file mode 100644 index 0000000000..e23939072f --- /dev/null +++ b/sysdeps/alpha/setjmp_aux.c @@ -0,0 +1,58 @@ +/* Copyright (C) 1992 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#ifndef __GNUC__ +#error This file uses GNU C extensions; you must compile with GCC. +#endif + +register long int + r9 asm ("$9"), r10 asm ("$10"), r11 asm ("$11"), r12 asm ("$12"), + r13 asm ("$13"), r14 asm ("$14"); + +register long int *fp asm ("$15"), *sp asm ("$30"), *retpc asm ("$26"); + +#if 1 /* XXX */ +register double + f2 asm ("$f2"), f3 asm ("$f3"), f4 asm ("$f4"), f5 asm ("$f5"), + f6 asm ("$f6"), f7 asm ("$f7"), f8 asm ("$f8"), f9 asm ("$f9"); +#endif + +/* Save the current program position in ENV and return 0. */ +int +__setjmp (jmp_buf env) +{ + /* Save the integer registers. */ + env[0].__9 = r9; + env[0].__10 = r10; + env[0].__11 = r11; + env[0].__12 = r12; + env[0].__13 = r13; + env[0].__14 = r14; + + /* Save the return address of our caller, where longjmp will jump to. */ + env[0].__pc = retpc; + + /* We lose if the compiler uses the FP in __setjmp. XXX */ + env[0].__fp = fp; + + env[0].__sp = sp; + + return 0; +} From 12840d1abc95d5ae8a10fcbe0d72ae4ea3d17a5d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 25 Nov 1992 03:01:55 +0000 Subject: [PATCH 0158/4487] Formerly alpha/__longjmp.c.~2~ --- sysdeps/alpha/__longjmp.c | 68 +++++++++++++++++++++++++++++++++++---- 1 file changed, 62 insertions(+), 6 deletions(-) diff --git a/sysdeps/alpha/__longjmp.c b/sysdeps/alpha/__longjmp.c index 152df8658a..1bf04df7d8 100644 --- a/sysdeps/alpha/__longjmp.c +++ b/sysdeps/alpha/__longjmp.c @@ -16,17 +16,73 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include - #ifndef __GNUC__ #error This file uses GNU C extensions; you must compile with GCC. #endif +/*#include */ +#include "jmp_buf.h" +#define jmp_buf __jmp_buf + +register long int + r9 asm ("$9"), r10 asm ("$10"), r11 asm ("$11"), r12 asm ("$12"), + r13 asm ("$13"), r14 asm ("$14"); + +register long int *fp asm ("$15"), *sp asm ("$30"), *retpc asm ("$26"); + +#if 1 /* XXX */ +register double + f2 asm ("$f2"), f3 asm ("$f3"), f4 asm ("$f4"), f5 asm ("$f5"), + f6 asm ("$f6"), f7 asm ("$f7"), f8 asm ("$f8"), f9 asm ("$f9"); +#endif + /* Jump to the position specified by ENV, causing the - setjmp call there to return VAL, or 1 if VAL is 0. */ -__NORETURN -void + setjmp call there to return VAL, or 1 if VAL is 0. + + We declare this function to return an `int'; + in fact, the value being returned is going to the caller of setjmp. */ +volatile void __longjmp (const jmp_buf env, int val) { - + register long int retval asm ("$0"); + + /* Restore the integer registers. */ + r9 = env[0].__9; + r10 = env[0].__10; + r11 = env[0].__11; + r12 = env[0].__12; + r13 = env[0].__13; + r14 = env[0].__14; + +#if 1 /* XXX */ + /* Restore the floating point registers. */ + f2 = env[0].__f2; + f3 = env[0].__f3; + f4 = env[0].__f4; + f5 = env[0].__f5; + f6 = env[0].__f6; + f7 = env[0].__f7; + f8 = env[0].__f8; + f9 = env[0].__f9; +#endif + + /* Set the return PC to that of setjmp's caller. */ + retpc = env[0].__pc; + + /* Return VAL (or 1 if VAL is zero) to setjmp's caller. */ + retval = val ?: 1; + + /* Restore the FP and SP of setjmp's caller. */ + fp = env[0].__fp; + sp = env[0].__sp; + + /* We use an asm here rather than a normal C return statement + just in case the compiler wanted to do some stack frobnication + in the function epilogue. Since we have already restored + precisely the FP and SP the desired environment needs, + we must avoid the compiler doing anything with the stack. */ + while (1) + /* The loop is just to avoid `volatile function does return' warnings. + The instruction will only be executed once. */ + asm volatile ("ret $31, (%0), 1" : : "r" (retpc)); } From 1608c2cc6dbb781e082b9525dc143b7d1863532f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 25 Nov 1992 03:28:54 +0000 Subject: [PATCH 0159/4487] Initial revision --- sysdeps/alpha/Dist | 1 + sysdeps/alpha/Makefile | 3 ++ sysdeps/alpha/__math.h | 28 +++++++++++++++++ sysdeps/alpha/copysign.c | 27 +++++++++++++++++ sysdeps/alpha/fabs.c | 26 ++++++++++++++++ sysdeps/alpha/memchr.c | 65 ++++++++++++++++++++++++++++++++++++++++ sysdeps/alpha/setjmp.S | 28 +++++++++++++++++ sysdeps/alpha/strlen.c | 57 +++++++++++++++++++++++++++++++++++ 8 files changed, 235 insertions(+) create mode 100644 sysdeps/alpha/Dist create mode 100644 sysdeps/alpha/Makefile create mode 100644 sysdeps/alpha/__math.h create mode 100644 sysdeps/alpha/copysign.c create mode 100644 sysdeps/alpha/fabs.c create mode 100644 sysdeps/alpha/memchr.c create mode 100644 sysdeps/alpha/setjmp.S create mode 100644 sysdeps/alpha/strlen.c diff --git a/sysdeps/alpha/Dist b/sysdeps/alpha/Dist new file mode 100644 index 0000000000..ad6ea0313a --- /dev/null +++ b/sysdeps/alpha/Dist @@ -0,0 +1 @@ +setjmp_aux.c diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile new file mode 100644 index 0000000000..736414197a --- /dev/null +++ b/sysdeps/alpha/Makefile @@ -0,0 +1,3 @@ +ifeq ($(subdir),setjmp) +sysdep_routines := $(sysdep_routines) setjmp_aux +endif diff --git a/sysdeps/alpha/__math.h b/sysdeps/alpha/__math.h new file mode 100644 index 0000000000..e9893f5e4f --- /dev/null +++ b/sysdeps/alpha/__math.h @@ -0,0 +1,28 @@ +/* Copyright (C) 1992 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#if defined (__GNUC__) && !defined (__NO_MATH_INLINES) + +extern __inline +__copysign (double __x, double __y) +{ + __asm ("cpys %1, %2, %0" : "=f" (__x) : "f" (__y), "f" (__x)); + return __x; +} + +#endif diff --git a/sysdeps/alpha/copysign.c b/sysdeps/alpha/copysign.c new file mode 100644 index 0000000000..ad74994f25 --- /dev/null +++ b/sysdeps/alpha/copysign.c @@ -0,0 +1,27 @@ +/* Copyright (C) 1992 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +/* Return X with its signed changed to Y's. */ +double +__copysign (double x, double y) +{ + asm ("cpys %1, %2, %0" : "=f" (x) : "f" (y), "f" (x)); + return x; +} diff --git a/sysdeps/alpha/fabs.c b/sysdeps/alpha/fabs.c new file mode 100644 index 0000000000..936202704a --- /dev/null +++ b/sysdeps/alpha/fabs.c @@ -0,0 +1,26 @@ +/* Copyright (C) 1992 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +double +fabs (double x) +{ + asm ("cpys $f31, %1, %0" : "=f" (x) : "f" (x)); + return x; +} diff --git a/sysdeps/alpha/memchr.c b/sysdeps/alpha/memchr.c new file mode 100644 index 0000000000..01a8c3eeac --- /dev/null +++ b/sysdeps/alpha/memchr.c @@ -0,0 +1,65 @@ +/* Copyright (C) 1992 Free Software Foundation, Inc. + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +/* Search no more than N bytes of S for C. */ + +void * +memchr (const void *s, int c, size_t n) +{ + const char *char_ptr; + const unsigned long int *longword_ptr; + unsigned long int charmask; + + c = (unsigned char) c; + + /* Handle the first few characters by reading one character at a time. + Do this until STR is aligned on a 8-byte border. */ + for (char_ptr = s; n > 0 && ((unsigned long int) char_ptr & 7) != 0; + --n, ++char_ptr) + if (*char_ptr == c) + return char_ptr; + + longword_ptr = (unsigned long int *) char_ptr; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); + charmask |= charmask << 16; + charmask |= charmask << 32; + + for (;;) + { + int mask; + asm ("cmpbge %1, %2, %0" + : "=r" (mask) : "r" (charmask), "r" (*longword_ptr++)); + if (mask) + { + /* Which of the bytes was the C? */ + + const char *cp = (const char *) (longword_ptr - 1); + + if (cp[0] == c) + return cp - str; + if (cp[1] == c) + return cp - str + 1; + if (cp[2] == c) + return cp - str + 2; + return cp - str + 3; + } + } +} diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S new file mode 100644 index 0000000000..a5de80cd38 --- /dev/null +++ b/sysdeps/alpha/setjmp.S @@ -0,0 +1,28 @@ +/* Copyright (C) 1992 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +/* The function __setjmp_aux saves all the registers, but it can't + reliably access the stack or frame pointers, so we pass them in as + extra arguments. */ +ENTRY (__setjmp) + lda $27, __setjmp_aux /* Load address to jump to. */ + bis $15, $15, $17 /* Pass FP as 2nd arg. */ + bis $30, $30, $18 /* Pass SP as 3nd arg. */ + jmp $31, ($27), __setjmp_aux /* Call __setjmp_aux. */ diff --git a/sysdeps/alpha/strlen.c b/sysdeps/alpha/strlen.c new file mode 100644 index 0000000000..0c108534e5 --- /dev/null +++ b/sysdeps/alpha/strlen.c @@ -0,0 +1,57 @@ +/* Copyright (C) 1992 Free Software Foundation, Inc. + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +/* Return the length of the null-terminated string STR. Scan for + the null terminator quickly by testing eight bytes at a time. */ + +size_t +strlen (const char *str) +{ + const char *char_ptr; + const unsigned long int *longword_ptr; + unsigned long int longword; + + /* Handle the first few characters by reading one character at a time. + Do this until STR is aligned on a 8-byte border. */ + for (char_ptr = str; ((unsigned long int) char_ptr & 7) != 0; ++char_ptr) + if (*char_ptr == '\0') + return char_ptr - str; + + longword_ptr = (unsigned long int *) char_ptr; + + for (;;) + { + int mask; + asm ("cmpbge %1, %2, %0" : "=r" (mask) : "r" (0), "r" (*longword_ptr++)); + if (mask) + { + /* Which of the bytes was the zero? */ + + const char *cp = (const char *) (longword_ptr - 1); + + if (cp[0] == 0) + return cp - str; + if (cp[1] == 0) + return cp - str + 1; + if (cp[2] == 0) + return cp - str + 2; + return cp - str + 3; + } + } +} From 14245eb70e2158738f3d8ec4f92d8a42db795de9 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 25 Nov 1992 03:33:01 +0000 Subject: [PATCH 0160/4487] entered into RCS --- sysdeps/alpha/Implies | 2 ++ sysdeps/alpha/bytesex.h | 3 +++ sysdeps/alpha/setjmp_aux.c | 23 +++++++++++++++++++---- 3 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 sysdeps/alpha/Implies create mode 100644 sysdeps/alpha/bytesex.h diff --git a/sysdeps/alpha/Implies b/sysdeps/alpha/Implies new file mode 100644 index 0000000000..93234096f0 --- /dev/null +++ b/sysdeps/alpha/Implies @@ -0,0 +1,2 @@ +# Alpha uses IEEE 754 floating point. +ieee754 diff --git a/sysdeps/alpha/bytesex.h b/sysdeps/alpha/bytesex.h new file mode 100644 index 0000000000..e873d2123c --- /dev/null +++ b/sysdeps/alpha/bytesex.h @@ -0,0 +1,3 @@ +/* Alpha is little-endian. */ + +#define __BYTE_ORDER __LITTLE_ENDIAN diff --git a/sysdeps/alpha/setjmp_aux.c b/sysdeps/alpha/setjmp_aux.c index e23939072f..9a67a6b799 100644 --- a/sysdeps/alpha/setjmp_aux.c +++ b/sysdeps/alpha/setjmp_aux.c @@ -16,7 +16,9 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include +/*#include */ +#include "jmp_buf.h" +#define jmp_buf __jmp_buf #ifndef __GNUC__ #error This file uses GNU C extensions; you must compile with GCC. @@ -36,7 +38,7 @@ register double /* Save the current program position in ENV and return 0. */ int -__setjmp (jmp_buf env) +__setjmp_aux (jmp_buf env, long int *sp, long int *fp) { /* Save the integer registers. */ env[0].__9 = r9; @@ -46,13 +48,26 @@ __setjmp (jmp_buf env) env[0].__13 = r13; env[0].__14 = r14; +#if 1 /* XXX */ + /* Save the floating point registers. */ + env[0].__f2 = f2; + env[0].__f3 = f3; + env[0].__f4 = f4; + env[0].__f5 = f5; + env[0].__f6 = f6; + env[0].__f7 = f7; + env[0].__f8 = f8; + env[0].__f9 = f9; +#endif + /* Save the return address of our caller, where longjmp will jump to. */ env[0].__pc = retpc; - /* We lose if the compiler uses the FP in __setjmp. XXX */ + /* Save the FP and SP of our caller. The __setjmp entry point + simply puts these in the argument register for us to fetch. */ env[0].__fp = fp; - env[0].__sp = sp; + /* Return to the original caller of __setjmp. */ return 0; } From 01305a522cb4915e9d52d2f7193b75ffa442ffd6 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 25 Nov 1992 18:45:51 +0000 Subject: [PATCH 0161/4487] entered into RCS --- sysdeps/alpha/__longjmp.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/sysdeps/alpha/__longjmp.c b/sysdeps/alpha/__longjmp.c index 1bf04df7d8..c90f408750 100644 --- a/sysdeps/alpha/__longjmp.c +++ b/sysdeps/alpha/__longjmp.c @@ -44,8 +44,6 @@ register double volatile void __longjmp (const jmp_buf env, int val) { - register long int retval asm ("$0"); - /* Restore the integer registers. */ r9 = env[0].__9; r10 = env[0].__10; @@ -69,20 +67,30 @@ __longjmp (const jmp_buf env, int val) /* Set the return PC to that of setjmp's caller. */ retpc = env[0].__pc; - /* Return VAL (or 1 if VAL is zero) to setjmp's caller. */ - retval = val ?: 1; - /* Restore the FP and SP of setjmp's caller. */ fp = env[0].__fp; sp = env[0].__sp; - /* We use an asm here rather than a normal C return statement + /* Return VAL (or 1 if VAL is zero) to setjmp's caller. + + We use an asm here rather than a normal C return statement just in case the compiler wanted to do some stack frobnication in the function epilogue. Since we have already restored precisely the FP and SP the desired environment needs, we must avoid the compiler doing anything with the stack. */ + while (1) - /* The loop is just to avoid `volatile function does return' warnings. - The instruction will only be executed once. */ - asm volatile ("ret $31, (%0), 1" : : "r" (retpc)); + { + /* The loop is just to avoid `volatile function does return' warnings. + The instruction will only be executed once. */ + + register long int retval asm ("$0"); + + asm volatile + ("cmoveq %1, 1, %0\n\t" /* $0 = val ?: 1; */ + "ret $31, (%2), 1" /* return $0 */ + : "=r" (retval) + /* The "0" constraint should force VAL into $0. */ + : "0" (val), "r" (retpc)); + } } From 98f5cde0d5d85388d4c9b6492efebc0619dea394 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 25 Nov 1992 18:54:10 +0000 Subject: [PATCH 0162/4487] Formerly alpha/strlen.c.~2~ --- sysdeps/alpha/strlen.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sysdeps/alpha/strlen.c b/sysdeps/alpha/strlen.c index 0c108534e5..3fd1b252a0 100644 --- a/sysdeps/alpha/strlen.c +++ b/sysdeps/alpha/strlen.c @@ -25,7 +25,6 @@ strlen (const char *str) { const char *char_ptr; const unsigned long int *longword_ptr; - unsigned long int longword; /* Handle the first few characters by reading one character at a time. Do this until STR is aligned on a 8-byte border. */ From fd725b9471dc760ee07325bfe6d15d2894f6df3c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 25 Nov 1992 19:02:14 +0000 Subject: [PATCH 0163/4487] Initial revision --- sysdeps/alpha/strchr.c | 85 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 sysdeps/alpha/strchr.c diff --git a/sysdeps/alpha/strchr.c b/sysdeps/alpha/strchr.c new file mode 100644 index 0000000000..8cf20245c2 --- /dev/null +++ b/sysdeps/alpha/strchr.c @@ -0,0 +1,85 @@ +/* Copyright (C) 1992 Free Software Foundation, Inc. + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +/* Return the length of the null-terminated string STR. Scan for + the null terminator quickly by testing eight bytes at a time. */ + +char * +strchr (const char *str, int c) +{ + const char *char_ptr; + const unsigned long int *longword_ptr; + unsigned long int charmask; + + c = (unsigned char) c; + + /* Handle the first few characters by reading one character at a time. + Do this until STR is aligned on a 8-byte border. */ + for (char_ptr = str; ((unsigned long int) char_ptr & 7) != 0; ++char_ptr) + if (*char_ptr == '\0') + return NULL; + else if (*char_ptr == c) + return char_ptr; + + longword_ptr = (unsigned long int *) char_ptr; + + /* Set up a longword, each of whose bytes is C. */ + charmask = c | (c << 8); + charmask |= charmask << 16; + charmask |= charmask << 32; + + for (;;) + { + const unsigned long int longword = *longword_ptr++; + int ge, le, zero; + + /* Set bits in ZERO if bytes in LONGWORD are zero. */ + asm ("cmpbge $31, %1, %0" : "=r" (zero) : "r" (longword)); + + /* Set bits in GE if bytes in CHARMASK are >= bytes in LONGWORD. */ + asm ("cmpbge %1, %2, %0" : "=r" (ge) : "r" (charmask), "r" (longword)); + + /* Set bits in LE if bytes in CHARMASK are <= bytes in LONGWORD. */ + asm ("cmpbge %2, %1, %0" : "=r" (le) : "r" (charmask), "r" (longword)); + + /* Bytes that are both <= and >= are == to C. */ + if (zero || (ge & le)) + { + /* Which of the bytes was the C? */ + + const char *cp = (const char *) (longword_ptr - 1); + + if (cp[0] == c) + return cp; + if (cp[0] == 0) + return NULL; + if (cp[1] == c) + return &cp[1]; + if (cp[1] == 0) + return NULL; + if (cp[2] == c) + return &cp[2]; + if (cp[2] == 0) + return NULL; + if (cp[3] == c) + return &cp[3]; + return NULL; + } + } +} From d207263b8ca8588753bc8e0853342d9772692e70 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 25 Nov 1992 19:02:23 +0000 Subject: [PATCH 0164/4487] Formerly alpha/memchr.c.~2~ --- sysdeps/alpha/memchr.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/sysdeps/alpha/memchr.c b/sysdeps/alpha/memchr.c index 01a8c3eeac..3c9477ed4d 100644 --- a/sysdeps/alpha/memchr.c +++ b/sysdeps/alpha/memchr.c @@ -44,22 +44,29 @@ memchr (const void *s, int c, size_t n) for (;;) { - int mask; - asm ("cmpbge %1, %2, %0" - : "=r" (mask) : "r" (charmask), "r" (*longword_ptr++)); - if (mask) + const unsigned long int longword = *longword_ptr++; + int ge, le; + + /* Set bits in GE if bytes in CHARMASK are >= bytes in LONGWORD. */ + asm ("cmpbge %1, %2, %0" : "=r" (ge) : "r" (charmask), "r" (longword)); + + /* Set bits in LE if bytes in CHARMASK are <= bytes in LONGWORD. */ + asm ("cmpbge %2, %1, %0" : "=r" (le) : "r" (charmask), "r" (longword)); + + /* Bytes that are both <= and >= are == to C. */ + if (ge & le) { /* Which of the bytes was the C? */ const char *cp = (const char *) (longword_ptr - 1); if (cp[0] == c) - return cp - str; + return cp; if (cp[1] == c) - return cp - str + 1; + return &cp[1]; if (cp[2] == c) - return cp - str + 2; - return cp - str + 3; + return &cp[2]; + return &cp[3]; } } } From cda6c9cbeb33874017eaf38fc55ec45d2fac181d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 25 Nov 1992 19:06:14 +0000 Subject: [PATCH 0165/4487] Formerly alpha/__math.h.~2~ --- sysdeps/alpha/__math.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sysdeps/alpha/__math.h b/sysdeps/alpha/__math.h index e9893f5e4f..70a2cbe542 100644 --- a/sysdeps/alpha/__math.h +++ b/sysdeps/alpha/__math.h @@ -18,11 +18,17 @@ Cambridge, MA 02139, USA. */ #if defined (__GNUC__) && !defined (__NO_MATH_INLINES) -extern __inline +extern __inline double __copysign (double __x, double __y) { __asm ("cpys %1, %2, %0" : "=f" (__x) : "f" (__y), "f" (__x)); return __x; } +extern __inline double +fabs (double __x) +{ + return __copysign (0, __x); +} + #endif From 3e151dccbc3b268c93003f440848704fa3043393 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 25 Nov 1992 19:11:17 +0000 Subject: [PATCH 0166/4487] Formerly alpha/__math.h.~3~ --- sysdeps/alpha/__math.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/alpha/__math.h b/sysdeps/alpha/__math.h index 70a2cbe542..5461fca2ac 100644 --- a/sysdeps/alpha/__math.h +++ b/sysdeps/alpha/__math.h @@ -28,7 +28,8 @@ __copysign (double __x, double __y) extern __inline double fabs (double __x) { - return __copysign (0, __x); + __asm ("cpys $f31, %1, %0" : "=f" (__x) : "f" (__x)); + return __x; } #endif From b7c90718e6af53f362f041ff193f07a134c19645 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 11 Jan 1993 23:35:56 +0000 Subject: [PATCH 0167/4487] entered into RCS --- sysdeps/unix/bsd/sony/newsos/m68k/Implies | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/bsd/sony/newsos/m68k/Implies b/sysdeps/unix/bsd/sony/newsos/m68k/Implies index 44f7b8afb0..7b5f3cfc96 100644 --- a/sysdeps/unix/bsd/sony/newsos/m68k/Implies +++ b/sysdeps/unix/bsd/sony/newsos/m68k/Implies @@ -1,2 +1,2 @@ # A news800 is almost exactly like an hp300 -unix/hp/m68k +unix/bsd/hp/m68k From 45dba738f969ff6573ed3167af00e3db9c4b1a0a Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 2 Feb 1993 00:29:15 +0000 Subject: [PATCH 0168/4487] Formerly m68k/fpu/__logb.c.~4~ --- sysdeps/m68k/fpu/logb.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sysdeps/m68k/fpu/logb.c b/sysdeps/m68k/fpu/logb.c index 3bc3a4e701..df3de1ceee 100644 --- a/sysdeps/m68k/fpu/logb.c +++ b/sysdeps/m68k/fpu/logb.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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,15 +25,15 @@ Cambridge, MA 02139, USA. */ double DEFUN(__logb, (x), double x) { - if (__isnan(x)) + if (__isnan (x)) return x; - if (__isinf(x)) - return fabs(x); + if (__isinf (x)) + return fabs (x); if (x == 0.0) - asm("flog2%.x %0" : "=f" (x) : "0" (x)); + asm ("flog2%.x %0, %0" : "=f" (x) : "0" (x)); else - asm("fgetexp%.x %0" : "=f" (x) : "0" (x)); + asm ("fgetexp%.x %0, %0" : "=f" (x) : "0" (x)); return x; } From 8fdeef183c8568be8901711292b7afed99d6b7a4 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 24 Feb 1993 22:43:49 +0000 Subject: [PATCH 0169/4487] entered into RCS --- sysdeps/unix/sysv/sysv4/Implies | 3 +++ sysdeps/unix/sysv/sysv4/fchdir.S | 2 ++ sysdeps/unix/sysv/sysv4/setegid.S | 2 ++ sysdeps/unix/sysv/sysv4/seteuid.S | 2 ++ 4 files changed, 9 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/Implies create mode 100644 sysdeps/unix/sysv/sysv4/fchdir.S create mode 100644 sysdeps/unix/sysv/sysv4/setegid.S create mode 100644 sysdeps/unix/sysv/sysv4/seteuid.S diff --git a/sysdeps/unix/sysv/sysv4/Implies b/sysdeps/unix/sysv/sysv4/Implies new file mode 100644 index 0000000000..953822ea48 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/Implies @@ -0,0 +1,3 @@ +# The directory unix/common contains things which are common to both BSD +# and SVR4. +unix/common diff --git a/sysdeps/unix/sysv/sysv4/fchdir.S b/sysdeps/unix/sysv/sysv4/fchdir.S new file mode 100644 index 0000000000..ef11d55bc0 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/fchdir.S @@ -0,0 +1,2 @@ +/* SVR4 uses the BSD 4.4 fchdir(2) syscall. */ +#include diff --git a/sysdeps/unix/sysv/sysv4/setegid.S b/sysdeps/unix/sysv/sysv4/setegid.S new file mode 100644 index 0000000000..f8fd7633a5 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/setegid.S @@ -0,0 +1,2 @@ +/* SVR4 uses the BSD 4.4 setegid() system call. */ +#include diff --git a/sysdeps/unix/sysv/sysv4/seteuid.S b/sysdeps/unix/sysv/sysv4/seteuid.S new file mode 100644 index 0000000000..4ff110610f --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/seteuid.S @@ -0,0 +1,2 @@ +/* SVR4 uses the BSD 4.4 seteuid() system call. */ +#include From d9179a09221e7c267c5b80f98d7b121783206a2e Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 24 Feb 1993 23:22:43 +0000 Subject: [PATCH 0170/4487] Formerly m68k/Makefile.~4~ --- sysdeps/m68k/Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile index 09f3b4355e..886744365c 100644 --- a/sysdeps/m68k/Makefile +++ b/sysdeps/m68k/Makefile @@ -2,10 +2,10 @@ # way to choose a sysdep file based on MIT vs Motorola syntax. # No existing m68k ports use Motorola syntax. -crypt := crypt.sun3 # Use uf-crypt/crypt.sun3.S. +crypt := crypt.sun3 # Use crypt/crypt.sun3.S. # Disgusting magic to get `#'s into the asm code. -$(objpfx)%.o: %.S - $(CC) $(CPPFLAGS) -E $< \ - | sed 's/(@@@Hash-Here@@@)/#/g' | $(AS) $(ASFLAGS) -o $@ -.S-rule := t +define compile-command.S +$(CC) $(CPPFLAGS) -E $< \ +| sed 's/(@@@Hash-Here@@@)/#/g' | $(AS) $(ASFLAGS) -o $@ +endef From 33ff6c90ec648b8b1ce538b77b25b82be3987870 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Mon, 8 Mar 1993 19:57:16 +0000 Subject: [PATCH 0171/4487] Initial revision --- sysdeps/unix/sysv/sysv4/sigaction.h | 54 +++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/sigaction.h diff --git a/sysdeps/unix/sysv/sysv4/sigaction.h b/sysdeps/unix/sysv/sysv4/sigaction.h new file mode 100644 index 0000000000..d2a236463a --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/sigaction.h @@ -0,0 +1,54 @@ +/* Copyright (C) 1991, 1992, 1993 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* The proper definitions for SVR4's sigaction. + If the operating system has a `sigaction' system call that correctly + implements the POSIX.1 behavior, there should be a system-dependent + version of this file that defines `struct sigaction' and the `SA_*' + constants appropriately. */ + +/* Structure describing the action to be taken when a signal arrives. */ +struct sigaction + { + /* Signal handler. */ + __sighandler_t sa_handler; + + /* Additional set of signals to be blocked. */ + __sigset_t sa_mask; + + /* Special flags. */ + int sa_flags; + + /* Padding. */ + int sa_resv[2]; + }; + +/* Bits in `sa_flags'. */ +#define SA_ONSTACK 0x1 /* Take signal on signal stack. */ +#define SA_RESETHAND 0x2 /* Reset to SIG_DFL on entry to handler. */ +#define SA_RESTART 0x4 /* Don't restart syscall on signal return. */ +#define SA_SIGINFO 0x8 /* Provide additional info to the handler. */ +#define SA_NODEFER 0x10 /* Don't automatically block the signal when + its handler is being executed. */ +#define SA_NOSCLDWAIT 0x10000 /* Don't create zombie processes. */ +#define SA_NOCLDSTOP 0x20000 /* Don't send SIGCHLD when children stop. */ + +/* Values for the HOW argument to `sigprocmask'. */ +#define SIG_BLOCK 1 /* Block signals. */ +#define SIG_UNBLOCK 2 /* Unblock signals. */ +#define SIG_SETMASK 3 /* Set the set of blocked signals. */ From bf6e97c48cd4483ed7596cca8590e5d071b17843 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 8 Mar 1993 20:13:15 +0000 Subject: [PATCH 0172/4487] Formerly unix/sysv/sysv4/sigaction.h.~2~ --- sysdeps/unix/sysv/sysv4/sigaction.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/sysdeps/unix/sysv/sysv4/sigaction.h b/sysdeps/unix/sysv/sysv4/sigaction.h index d2a236463a..418e7db7dd 100644 --- a/sysdeps/unix/sysv/sysv4/sigaction.h +++ b/sysdeps/unix/sysv/sysv4/sigaction.h @@ -1,4 +1,5 @@ -/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. +/* The proper definitions for SVR4's sigaction. +Copyright (C) 1993 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 @@ -16,12 +17,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* The proper definitions for SVR4's sigaction. - If the operating system has a `sigaction' system call that correctly - implements the POSIX.1 behavior, there should be a system-dependent - version of this file that defines `struct sigaction' and the `SA_*' - constants appropriately. */ - /* Structure describing the action to be taken when a signal arrives. */ struct sigaction { @@ -39,6 +34,7 @@ struct sigaction }; /* Bits in `sa_flags'. */ +#ifdef __USE_MISC #define SA_ONSTACK 0x1 /* Take signal on signal stack. */ #define SA_RESETHAND 0x2 /* Reset to SIG_DFL on entry to handler. */ #define SA_RESTART 0x4 /* Don't restart syscall on signal return. */ @@ -46,6 +42,7 @@ struct sigaction #define SA_NODEFER 0x10 /* Don't automatically block the signal when its handler is being executed. */ #define SA_NOSCLDWAIT 0x10000 /* Don't create zombie processes. */ +#endif #define SA_NOCLDSTOP 0x20000 /* Don't send SIGCHLD when children stop. */ /* Values for the HOW argument to `sigprocmask'. */ From 009d15de1bd3df19c6ed7f12199d6ba530c1add9 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 8 Mar 1993 22:16:10 +0000 Subject: [PATCH 0173/4487] Formerly mips/jmp_buf.h.~4~ --- sysdeps/mips/jmp_buf.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/sysdeps/mips/jmp_buf.h b/sysdeps/mips/jmp_buf.h index c6b10fb5fb..661997f25a 100644 --- a/sysdeps/mips/jmp_buf.h +++ b/sysdeps/mips/jmp_buf.h @@ -1,7 +1,6 @@ /* Define the machine-dependent type `jmp_buf'. Mips version. - -Copyright (C) 1992 Free Software Foundation, Inc. -Contributed by Brendan Kehoe (brendan@cs.widener.edu). + Copyright (C) 1992, 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@cygnus.com). 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,19 +20,19 @@ Cambridge, MA 02139, USA. */ typedef struct { /* Program counter. */ - PTR __pc; + __ptr_t __pc; /* Stack pointer. */ - PTR __sp; + __ptr_t __sp; /* Callee-saved registers s0 through s7. */ int __regs[8]; /* The frame pointer. */ - PTR __fp; + __ptr_t __fp; /* The global pointer. */ - PTR __gp; + __ptr_t __gp; /* Floating point status register. */ int __fpc_csr; @@ -41,3 +40,6 @@ typedef struct /* Callee-saved floating point registers. */ double __fpregs[6]; } __jmp_buf[1]; + +/* Offset to the program counter in `jmp_buf'. */ +#define JB_PC 0 From d42a69dd8390628766127fc9592b1ef9c5da9ddf Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 17 Mar 1993 18:32:04 +0000 Subject: [PATCH 0174/4487] Formerly m68k/Makefile.~5~ --- sysdeps/m68k/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile index 886744365c..3158e3b104 100644 --- a/sysdeps/m68k/Makefile +++ b/sysdeps/m68k/Makefile @@ -7,5 +7,5 @@ crypt := crypt.sun3 # Use crypt/crypt.sun3.S. # Disgusting magic to get `#'s into the asm code. define compile-command.S $(CC) $(CPPFLAGS) -E $< \ -| sed 's/(@@@Hash-Here@@@)/#/g' | $(AS) $(ASFLAGS) -o $@ +| sed -e '/^#/d' -e 's/(@@@Hash-Here@@@)/#/g' | $(AS) $(ASFLAGS) -o $@ endef From 2a96c1028262d8d5ddd4421ad862f3deba1a31d9 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 25 Mar 1993 20:17:39 +0000 Subject: [PATCH 0175/4487] Formerly m68k/Makefile.~6~ --- sysdeps/m68k/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile index 3158e3b104..886744365c 100644 --- a/sysdeps/m68k/Makefile +++ b/sysdeps/m68k/Makefile @@ -7,5 +7,5 @@ crypt := crypt.sun3 # Use crypt/crypt.sun3.S. # Disgusting magic to get `#'s into the asm code. define compile-command.S $(CC) $(CPPFLAGS) -E $< \ -| sed -e '/^#/d' -e 's/(@@@Hash-Here@@@)/#/g' | $(AS) $(ASFLAGS) -o $@ +| sed 's/(@@@Hash-Here@@@)/#/g' | $(AS) $(ASFLAGS) -o $@ endef From 6e1bdbcff12ed24150748d47594e4102da8909a8 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 26 Mar 1993 21:04:06 +0000 Subject: [PATCH 0176/4487] Initial revision --- sysdeps/unix/bsd/sun/m68k/sigtramp.c | 164 +++++++++++++++++++++++++++ 1 file changed, 164 insertions(+) create mode 100644 sysdeps/unix/bsd/sun/m68k/sigtramp.c diff --git a/sysdeps/unix/bsd/sun/m68k/sigtramp.c b/sysdeps/unix/bsd/sun/m68k/sigtramp.c new file mode 100644 index 0000000000..7b10a9f91e --- /dev/null +++ b/sysdeps/unix/bsd/sun/m68k/sigtramp.c @@ -0,0 +1,164 @@ +/* Copyright (C) 1993 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#ifndef __GNUC__ + #error This file uses GNU C extensions; you must compile with GCC. +#endif + +/* Get the definition of `struct sigcontext'. */ +#define KERNEL +#define sigvec sun_sigvec +#define sigstack sun_sigstack +#define sigcontext sun_sigcontext +#include "/usr/include/sys/signal.h" +#undef sigvec +#undef sigstack +#undef sigcontext +#undef NSIG +#undef SIGABRT +#undef SIGCLD +#undef SV_ONSTACK +#undef SV_RESETHAND +#undef SV_INTERRUPT +#undef SA_ONSTACK +#undef SA_NOCLDSTOP +#undef SIG_ERR +#undef SIG_DFL +#undef SIG_IGN +#undef sigmask +#undef SIG_BLOCK +#undef SIG_UNBLOCK +#undef SIG_SETMASK + +#include +#include +#include + +/* Defined in __sigvec.S. */ +extern int EXFUN(__raw_sigvec, (int sig, CONST struct sigvec *vec, + struct sigvec *ovec)); + +/* User-specified signal handlers. */ +#define mytramp 1 +#ifdef mytramp +static __sighandler_t handlers[NSIG]; +#else +#define handlers _sigfunc +extern __sighandler_t _sigfunc[]; +#endif + +#if mytramp + +/* Handler for all signals that are handled by a user-specified function. + Saves and restores the general regs %g2-%g7, the %y register, and + all the FPU regs (including %fsr), around calling the user's handler. */ +static void +DEFUN(trampoline, (sig, code, context, addr), + int sig AND int code AND struct sigcontext *context AND PTR addr) +{ + register int a0 asm("%a0"); + register int a1 asm("%a1"); + register int d0 asm("%d0"); + register int d1 asm("%d1"); + + int savea[2], saved[2]; + + double fpsave[16]; + int fsr; + int savefpu; + + /* Save the call-clobbered registers. */ + savea[0] = a0; + savea[1] = a1; + saved[0] = d0; + saved[1] = d1; + +#if 0 + /* Save the FPU regs if the FPU enable bit is set in the PSR, + and the signal isn't an FP exception. */ + savefpu = (context->sc_psr & 0x1000) && sig != SIGFPE; + if (savefpu) +#endif + + /* Call the user's handler. */ + (*((void EXFUN((*), (int sig, int code, struct sigcontext *context, + PTR addr))) handlers[sig])) + (sig, code, context, addr); + + /* Restore the call-clobbered registers. */ + a0 = savea[0]; + a1 = savea[1]; + d0 = saved[0]; + d1 = saved[1]; + +#if 0 + if (savefpu) + ; +#endif +} + +#endif + +int +DEFUN(__sigvec, (sig, vec, ovec), + int sig AND CONST struct sigvec *vec AND struct sigvec *ovec) +{ +#ifndef mytramp + extern void _sigtramp (int); +#define trampoline _sigtramp +#endif + struct sigvec myvec; + int mask; + __sighandler_t ohandler; + + if (sig <= 0 || sig >= NSIG) + { + errno = EINVAL; + return -1; + } + + mask = __sigblock(sigmask(sig)); + + ohandler = handlers[sig]; + + if (vec != NULL && + vec->sv_handler != SIG_IGN && vec->sv_handler != SIG_DFL) + { + handlers[sig] = vec->sv_handler; + myvec = *vec; + myvec.sv_handler = trampoline; + vec = &myvec; + } + + if (__raw_sigvec(sig, vec, ovec) < 0) + { + int save = errno; + (void) __sigsetmask(mask); + errno = save; + return -1; + } + + if (ovec != NULL && ovec->sv_handler == trampoline) + ovec->sv_handler = ohandler; + + (void) __sigsetmask(mask); + + return 0; +} From 5cc7ff46d76c3c5674259cebff1d1d9e2f2d8f45 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 26 Mar 1993 21:39:42 +0000 Subject: [PATCH 0177/4487] entered into RCS --- sysdeps/unix/bsd/sun/m68k/Dist | 1 + sysdeps/unix/bsd/sun/m68k/Makefile | 4 ++- sysdeps/unix/bsd/sun/m68k/sigcontext.h | 26 ++++++++++++++++++ sysdeps/unix/bsd/sun/m68k/sigtramp.c | 38 ++++++-------------------- sysdeps/unix/bsd/sun/sigreturn.S | 26 ++++++++++++++++++ 5 files changed, 64 insertions(+), 31 deletions(-) create mode 100644 sysdeps/unix/bsd/sun/m68k/Dist create mode 100644 sysdeps/unix/bsd/sun/m68k/sigcontext.h create mode 100644 sysdeps/unix/bsd/sun/sigreturn.S diff --git a/sysdeps/unix/bsd/sun/m68k/Dist b/sysdeps/unix/bsd/sun/m68k/Dist new file mode 100644 index 0000000000..cd893ff463 --- /dev/null +++ b/sysdeps/unix/bsd/sun/m68k/Dist @@ -0,0 +1 @@ +sigtramp.c diff --git a/sysdeps/unix/bsd/sun/m68k/Makefile b/sysdeps/unix/bsd/sun/m68k/Makefile index 2f0cd2e874..ac4121dc2c 100644 --- a/sysdeps/unix/bsd/sun/m68k/Makefile +++ b/sysdeps/unix/bsd/sun/m68k/Makefile @@ -1 +1,3 @@ -include $(+sysdep_dir)/unix/bsd/hp9k3bsd/Makefile +ifeq ($(subdir),signal) +sysdep_routines := $(sysdep_routines) sigtramp +endif diff --git a/sysdeps/unix/bsd/sun/m68k/sigcontext.h b/sysdeps/unix/bsd/sun/m68k/sigcontext.h new file mode 100644 index 0000000000..926c44f69c --- /dev/null +++ b/sysdeps/unix/bsd/sun/m68k/sigcontext.h @@ -0,0 +1,26 @@ +/* Structure describing state saved while handling a signal. Sun 3 version. +Copyright (C) 1993 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +struct sigcontext + { + int sc_onstack; + sigset_t sc_mask; + + int sc_sp, sc_pc, sc_ps; + }; diff --git a/sysdeps/unix/bsd/sun/m68k/sigtramp.c b/sysdeps/unix/bsd/sun/m68k/sigtramp.c index 7b10a9f91e..32a2c2047e 100644 --- a/sysdeps/unix/bsd/sun/m68k/sigtramp.c +++ b/sysdeps/unix/bsd/sun/m68k/sigtramp.c @@ -73,29 +73,12 @@ static void DEFUN(trampoline, (sig, code, context, addr), int sig AND int code AND struct sigcontext *context AND PTR addr) { - register int a0 asm("%a0"); - register int a1 asm("%a1"); - register int d0 asm("%d0"); - register int d1 asm("%d1"); - - int savea[2], saved[2]; - - double fpsave[16]; - int fsr; - int savefpu; + int save[4]; /* Save the call-clobbered registers. */ - savea[0] = a0; - savea[1] = a1; - saved[0] = d0; - saved[1] = d1; - -#if 0 - /* Save the FPU regs if the FPU enable bit is set in the PSR, - and the signal isn't an FP exception. */ - savefpu = (context->sc_psr & 0x1000) && sig != SIGFPE; - if (savefpu) -#endif + asm volatile ("movem%.l d0-d1/a0-a1, %0" : : "m" (save[0])); + + /* XXX should save/restore FP regs */ /* Call the user's handler. */ (*((void EXFUN((*), (int sig, int code, struct sigcontext *context, @@ -103,15 +86,10 @@ DEFUN(trampoline, (sig, code, context, addr), (sig, code, context, addr); /* Restore the call-clobbered registers. */ - a0 = savea[0]; - a1 = savea[1]; - d0 = saved[0]; - d1 = saved[1]; - -#if 0 - if (savefpu) - ; -#endif + asm volatile ("movem%.l %0, d0-d1/a0-a1" : : "g" (save[0]) : + "d0", "d1", "a0", "a1"); + + __sigreturn (context); } #endif diff --git a/sysdeps/unix/bsd/sun/sigreturn.S b/sysdeps/unix/bsd/sun/sigreturn.S new file mode 100644 index 0000000000..9a3b5e6bdf --- /dev/null +++ b/sysdeps/unix/bsd/sun/sigreturn.S @@ -0,0 +1,26 @@ +/* Copyright (C) 1993 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#ifndef SYS_sigreturn +#define SYS_sigreturn 139 +#endif + +SYSCALL__ (sigreturn, 1) + /* Does not return. */ From 024b39914f39ed80f62f357fce18d377c1400d7f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 30 Mar 1993 00:27:03 +0000 Subject: [PATCH 0178/4487] Initial revision --- sysdeps/unix/bsd/sun/sunos4/speed.c | 108 ++++++++++++++ sysdeps/unix/bsd/sun/sunos4/termbits.h | 187 +++++++++++++++++++++++++ 2 files changed, 295 insertions(+) create mode 100644 sysdeps/unix/bsd/sun/sunos4/speed.c create mode 100644 sysdeps/unix/bsd/sun/sunos4/termbits.h diff --git a/sysdeps/unix/bsd/sun/sunos4/speed.c b/sysdeps/unix/bsd/sun/sunos4/speed.c new file mode 100644 index 0000000000..8b2e14f04a --- /dev/null +++ b/sysdeps/unix/bsd/sun/sunos4/speed.c @@ -0,0 +1,108 @@ +/* `struct termios' speed frobnication functions. SunOS 4 version. +Copyright (C) 1991, 1992, 1993 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include + +static CONST speed_t speeds[] = + { + 0, + 50, + 75, + 110, + 134, + 150, + 200, + 300, + 600, + 1200, + 1800, + 2400, + 4800, + 9600, + 19200, + 38400, + }; + + +/* Return the output baud rate stored in *TERMIOS_P. */ +speed_t +DEFUN(cfgetospeed, (termios_p), CONST struct termios *termios_p) +{ + return speeds[termios_p->c_cflag & CBAUD]; +} + +/* Return the input baud rate stored in *TERMIOS_P. */ +speed_t +DEFUN(cfgetispeed, (termios_p), CONST struct termios *termios_p) +{ + return speeds[(termios_p->c_cflag & CIBAUD) >> IBSHIFT]; +} + +/* Set the output baud rate stored in *TERMIOS_P to SPEED. */ +int +DEFUN(cfsetospeed, (termios_p, speed), + struct termios *termios_p AND speed_t speed) +{ + register unsigned int i; + + if (termios_p == NULL) + { + errno = EINVAL; + return -1; + } + + for (i = 0; i < sizeof (speeds) / sizeof (speed[0]); ++i) + if (speeds[i] == speed) + { + termios_p->c_cflag &= ~CBAUD; + termios_p->c_cflag |= i; + return 0; + } + + errno = EINVAL; + return -1; +} + +/* Set the input baud rate stored in *TERMIOS_P to SPEED. */ +int +DEFUN(cfsetispeed, (termios_p, speed), + struct termios *termios_p AND speed_t speed) +{ + register unsigned int i; + + if (termios_p == NULL) + { + errno = EINVAL; + return -1; + } + + for (i = 0; i < sizeof (speeds) / sizeof (speed[0]); ++i) + if (speeds[i] == speed) + { + termios_p->c_cflag &= ~CIBAUD; + termios_p->c_cflag |= i << IBSHIFT; + return 0; + } + + errno = EINVAL; + return -1; +} diff --git a/sysdeps/unix/bsd/sun/sunos4/termbits.h b/sysdeps/unix/bsd/sun/sunos4/termbits.h new file mode 100644 index 0000000000..e50f6cb8ae --- /dev/null +++ b/sysdeps/unix/bsd/sun/sunos4/termbits.h @@ -0,0 +1,187 @@ +/* termios type and macro definitions. SunOS 4 version. +Copyright (C) 1993 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Type of terminal control flag masks. */ +typedef unsigned long int tcflag_t; + +/* Type of control characters. */ +typedef unsigned char cc_t; + +/* Type of baud rate specifiers. */ +typedef unsigned int speed_t; + +/* Terminal control structure. */ +struct termios +{ + /* Input modes. */ + tcflag_t c_iflag; +#define IGNBRK 0x0001 /* Ignore break condition. */ +#define BRKINT 0x0002 /* Signal interrupt on break. */ +#define IGNPAR 0x0004 /* Ignore characters with parity errors. */ +#define PARMRK 0x0008 /* Mark parity and framing errors. */ +#define INPCK 0x0010 /* Enable input parity check. */ +#define ISTRIP 0x0020 /* Strip 8th bit off characters. */ +#define INLCR 0x0040 /* Map NL to CR on input. */ +#define IGNCR 0x0080 /* Ignore CR. */ +#define ICRNL 0x0100 /* Map CR to NL on input. */ +#ifdef __USE_BSD +#define IUCLC 0x0200 /* Map upper case to lower case on input. */ +#endif +#define IXON 0x0400 /* Enable start/stop output control. */ +#define IXOFF 0x1000 /* Enable start/stop input control. */ +#ifdef __USE_BSD +#define IXANY 0x0800 /* Any character will restart after stop. */ +#define IMAXBEL 0x2000 /* Ring bell when input queue is full. */ +#endif + + /* Output modes. */ + tcflag_t c_oflag; +#define OPOST 0x0001 /* Perform output processing. */ +#ifdef __USE_BSD +#define OLCUC 0x00000002 /* Map lower case to upper case on output. */ +#define ONLCR 0x00000004 /* Map NL to CR-NL on output. */ +#define OCRNL 0x00000008 +#define ONOCR 0x00000010 +#define ONLRET 0x00000020 +#define OFILL 0x00000040 +#define OFDEL 0x00000080 +#define NLDLY 0x00000100 +#define NL0 0 +#define NL1 0x00000100 +#define CRDLY 0x00000600 +#define CR0 0 +#define CR1 0x00000200 +#define CR2 0x00000400 +#define CR3 0x00000600 +#define TABDLY 0x00001800 +#define TAB0 0 +#define TAB1 0x00000800 +#define TAB2 0x00001000 +#define XTABS 0x00001800 +#define TAB3 XTABS +#define BSDLY 0x00002000 +#define BS0 0 +#define BS1 0x00002000 +#define VTDLY 0x00004000 +#define VT0 0 +#define VT1 0x00004000 +#define FFDLY 0x00008000 +#define FF0 0 +#define FF1 0x00008000 +#define PAGEOUT 0x00010000 +#define WRAP 0x00020000 +#endif + + /* Control modes. */ + tcflag_t c_cflag; +#define CSIZE (CS5|CS6|CS7|CS8) /* Number of bits per byte (mask). */ +#define CS5 0 /* 5 bits per byte. */ +#define CS6 0x00000010 /* 6 bits per byte. */ +#define CS7 0x00000020 /* 7 bits per byte. */ +#define CS8 0x00000030 /* 8 bits per byte. */ +#define CSTOPB 0x00000040 /* Two stop bits instead of one. */ +#define CREAD 0x00000080 /* Enable receiver. */ +#define PARENB 0x00000100 /* Parity enable. */ +#define PARODD 0x00000200 /* Odd parity instead of even. */ +#define HUPCL 0x00000400 /* Hang up on last close. */ +#define CLOCAL 0x00000800 /* Ignore modem status lines. */ +#ifdef __USE_BSD +#define LOBLK 0x00001000 +#define CIBAUD 0x000f0000 +#define CRTSCTS 0x80000000 +#endif + + /* Local modes. */ + tcflag_t c_lflag; +#ifdef __USE_BSD +#define ECHOKE 0x00000800 /* Visual erase for KILL. */ +#endif +#define ECHOE 0x00000010 /* Visual erase for ERASE. */ +#define ECHOK 0x00000020 /* Echo NL after KILL. */ +#define ECHO 0x00000008 /* Enable echo. */ +#define ECHONL 0x00000040 /* Echo NL even if ECHO is off. */ +#ifdef __USE_BSD +#define ECHOPRT 0x00000400 /* Hardcopy visual erase. */ +#define ECHOCTL 0x00000200 /* Echo control characters as ^X. */ +#endif +#define ISIG 0x00000001 /* Enable signals. */ +#define ICANON 0x00000002 /* Do erase and kill processing. */ +#define IEXTEN 0x00008000 /* Enable DISCARD and LNEXT. */ +#define TOSTOP 0x00000100 /* Send SIGTTOU for background output. */ +#ifdef __USE_BSD +#define PENDIN 0x00004000 /* Retype pending input (state). */ +#endif +#define NOFLSH 0x00000080 /* Disable flush after interrupt. */ + + char c_line; /* Line discipline (?) */ + + /* Control characters. */ +#define VEOF 4 /* End-of-file character [ICANON]. */ +#define VEOL 5 /* End-of-line character [ICANON]. */ +#ifdef __USE_BSD +#define VEOL2 6 /* Second EOL character [ICANON]. */ +#define VSWTCH 7 /* ??? */ +#endif +#define VERASE 2 /* Erase character [ICANON]. */ +#ifdef __USE_BSD +#define VWERASE 14 /* Word-erase character [ICANON]. */ +#endif +#define VKILL 3 /* Kill-line character [ICANON]. */ +#ifdef __USE_BSD +#define VREPRINT 12 /* Reprint-line character [ICANON]. */ +#endif +#define VINTR 0 /* Interrupt character [ISIG]. */ +#define VQUIT 1 /* Quit character [ISIG]. */ +#define VSUSP 10 /* Suspend character [ISIG]. */ +#ifdef __USE_BSD +#define VDSUSP 11 /* Delayed suspend character [ISIG]. */ +#endif +#define VSTART 8 /* Start (X-ON) character [IXON, IXOFF]. */ +#define VSTOP 9 /* Stop (X-OFF) character [IXON, IXOFF]. */ +#ifdef __USE_BSD +#define VLNEXT 15 /* Literal-next character [IEXTEN]. */ +#define VDISCARD 13 /* Discard character [IEXTEN]. */ +#endif +#define VMIN VEOF /* Minimum number of bytes read at once [!ICANON]. */ +#define VTIME VEOL /* Time-out value (tenths of a second) [!ICANON]. */ +#define NCCS 17 + cc_t c_cc[NCCS]; +}; + +#define _IOT_termios /* Hurd ioctl type field. */ \ + _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2) + +/* Values for the OPTIONAL_ACTIONS argument to `tcsetattr'. */ +#define TCSANOW 0 /* Change immediately. */ +#define TCSADRAIN 1 /* Change when pending output is written. */ +#define TCSAFLUSH 2 /* Flush pending input before changing. */ +#ifdef __USE_BSD +#define TCSASOFT 0x10 /* Flag: Don't alter hardware state. */ +#endif + +/* Values for the QUEUE_SELECTOR argument to `tcflush'. */ +#define TCIFLUSH 0 /* Discard data received but not yet read. */ +#define TCOFLUSH 1 /* Discard data written but not yet sent. */ +#define TCIOFLUSH 2 /* Discard all pending data. */ + +/* Values for the ACTION argument to `tcflow'. */ +#define TCOOFF 0 /* Suspend output. */ +#define TCOON 1 /* Restart suspended output. */ +#define TCIOFF 2 /* Send a STOP character. */ +#define TCION 3 /* Send a START character. */ From 0ef42503e5502c758fc532b5a8b08fd782687778 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 30 Mar 1993 00:27:08 +0000 Subject: [PATCH 0179/4487] Formerly unix/bsd/sun/sunos4/termbits.h.~2~ --- sysdeps/unix/bsd/sun/sunos4/termbits.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/bsd/sun/sunos4/termbits.h b/sysdeps/unix/bsd/sun/sunos4/termbits.h index e50f6cb8ae..b8e9cd9a17 100644 --- a/sysdeps/unix/bsd/sun/sunos4/termbits.h +++ b/sysdeps/unix/bsd/sun/sunos4/termbits.h @@ -103,8 +103,10 @@ struct termios #define CLOCAL 0x00000800 /* Ignore modem status lines. */ #ifdef __USE_BSD #define LOBLK 0x00001000 -#define CIBAUD 0x000f0000 #define CRTSCTS 0x80000000 +#define CIBAUD 0x000f0000 /* Mask for input speed from c_cflag. */ +#define CBAUD 0x0000000f /* Mask for output speed from c_cflag. */ +#define IBSHIFT 16 /* Bits to shift for input speed. */ #endif /* Local modes. */ From b936a44bd7434d34fb230e46805a53667c004a7a Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 2 Apr 1993 21:07:39 +0000 Subject: [PATCH 0180/4487] Initial revision --- sysdeps/unix/bsd/sun/sunos4/tcflow.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 sysdeps/unix/bsd/sun/sunos4/tcflow.c diff --git a/sysdeps/unix/bsd/sun/sunos4/tcflow.c b/sysdeps/unix/bsd/sun/sunos4/tcflow.c new file mode 100644 index 0000000000..5accafd47c --- /dev/null +++ b/sysdeps/unix/bsd/sun/sunos4/tcflow.c @@ -0,0 +1,28 @@ +/* Copyright (C) 1993 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include + +/* Suspend or restart transmission on FD. */ +int +DEFUN(tcflow, (fd, action), int fd AND int action) +{ + return __ioctl (fd, TCXONC, action); +} From 9cb71d9f2dfbed18526a995e7265764c7e200689 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 2 Apr 1993 21:07:57 +0000 Subject: [PATCH 0181/4487] entered into RCS --- sysdeps/unix/bsd/sun/sunos4/tcflush.c | 29 +++++++++++++++ sysdeps/unix/bsd/sun/sunos4/tcgetattr.c | 31 ++++++++++++++++ sysdeps/unix/bsd/sun/sunos4/tcsendbrk.c | 31 ++++++++++++++++ sysdeps/unix/bsd/sun/sunos4/tcsetattr.c | 49 +++++++++++++++++++++++++ 4 files changed, 140 insertions(+) create mode 100644 sysdeps/unix/bsd/sun/sunos4/tcflush.c create mode 100644 sysdeps/unix/bsd/sun/sunos4/tcgetattr.c create mode 100644 sysdeps/unix/bsd/sun/sunos4/tcsendbrk.c create mode 100644 sysdeps/unix/bsd/sun/sunos4/tcsetattr.c diff --git a/sysdeps/unix/bsd/sun/sunos4/tcflush.c b/sysdeps/unix/bsd/sun/sunos4/tcflush.c new file mode 100644 index 0000000000..d76fc07cf0 --- /dev/null +++ b/sysdeps/unix/bsd/sun/sunos4/tcflush.c @@ -0,0 +1,29 @@ +/* Copyright (C) 1993 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include + +/* Flush pending data on FD. */ +int +DEFUN(tcflush, (fd, queue_selector), int fd AND int queue_selector) +{ + return __ioctl (fd, TCFLSH, queue_selector); +} diff --git a/sysdeps/unix/bsd/sun/sunos4/tcgetattr.c b/sysdeps/unix/bsd/sun/sunos4/tcgetattr.c new file mode 100644 index 0000000000..dce1b02ae0 --- /dev/null +++ b/sysdeps/unix/bsd/sun/sunos4/tcgetattr.c @@ -0,0 +1,31 @@ +/* Copyright (C) 1993 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include +#include + +/* Put the state of FD into *TERMIOS_P. */ +int +DEFUN(__tcgetattr, (fd, termios_p), + int fd AND struct termios *termios_p) +{ + return __ioctl (fd, TCGETS, termios_p); +} diff --git a/sysdeps/unix/bsd/sun/sunos4/tcsendbrk.c b/sysdeps/unix/bsd/sun/sunos4/tcsendbrk.c new file mode 100644 index 0000000000..7a6d5cc05f --- /dev/null +++ b/sysdeps/unix/bsd/sun/sunos4/tcsendbrk.c @@ -0,0 +1,31 @@ +/* Copyright (C) 1993 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include +#include /* Sun header file. */ + +/* Send zero bits on FD. */ +int +DEFUN(tcsendbreak, (fd, duration), int fd AND int duration) +{ + /* According to SunOS 4.1's termios(4), you can't specify a duration. */ + return __ioctl (fd, TCSBRK, 0); +} diff --git a/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c b/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c new file mode 100644 index 0000000000..4ae139a1f8 --- /dev/null +++ b/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c @@ -0,0 +1,49 @@ +/* Copyright (C) 1993 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include +#include + +/* Set the state of FD to *TERMIOS_P. */ +int +DEFUN(tcsetattr, (fd, optional_actions, termios_p), + int fd AND int optional_actions AND CONST struct termios *termios_p) +{ + int cmd; + + switch (optional_actions) + { + case TCSANOW: + cmd = TCSETS; + break; + case TCSADRAIN: + cmd = TCSETSW; + break; + case TCSAFLUSH: + cmd = TCSETSF; + break; + default: + errno = EINVAL; + return -1; + } + + return __ioctl (fd, cmd, termios_p); +} From aac1dda0576bf3e3046d6214bce0098caf778a41 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 9 Apr 1993 00:28:20 +0000 Subject: [PATCH 0182/4487] Initial revision --- sysdeps/unix/bsd/sequent/i386/sysdep.h | 87 ++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 sysdeps/unix/bsd/sequent/i386/sysdep.h diff --git a/sysdeps/unix/bsd/sequent/i386/sysdep.h b/sysdeps/unix/bsd/sequent/i386/sysdep.h new file mode 100644 index 0000000000..7a6aa0e9ec --- /dev/null +++ b/sysdeps/unix/bsd/sequent/i386/sysdep.h @@ -0,0 +1,87 @@ +/* System call interface code for Sequent Symmetry running Dynix version 3. +Copyright (C) 1993 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +/* Get the symbols for system call interrupts. */ +#include + +#ifdef __STDC__ +#define ENTRY(name) \ + .globl _##name; \ + .align 4; \ + _##name##: +#else +#define ENTRY(name) \ + .globl _/**/name; \ + .align 4; \ + _/**/name/**/: +#endif + +/* Use the BSD versions of system calls, by setting the high 16 bits + of the syscall number (see /usr/include/syscall.h). */ +#define SYS_HANDLER SYS_bsd##0000 + +/* Dynix uses an interrupt interface to system calls. + "int $T_SVCn" are syscall interfaces for 0-6 arg functions. + (see /usr/include/machine/trap.h). */ + +#ifdef __STDC__ +#define DO_CALL(syscall_name, args) \ + movl $(SYS_HANDLER | SYS_##syscall_name), %eax; \ + int $T_SVC##args; +#else +#define DO_CALL(syscall_name, args) \ + movl $(SYS_HANDLER | SYS_/**/syscall_name), %eax; \ + int $T_SVC/**/args; +#endif + +#define PSEUDO(name, syscall_name, args) \ + .text; \ + .globl syscall_error; \ + .align 4; \ + ENTRY (name) \ + ARGS (args) \ + DO_CALL (syscall_name, args) \ + jb syscall_error + +/* For one and two-argument calls, Dynix takes the arguments in %ecx and + %edx. For 3-6 argument calls, Dynix takes the address of the first + argument in %ecx. */ + +#ifdef __STDC__ +#define ARGS(n) ARGS_##n +#else +#define ARGS(n) ARGS_/**/n +#endif + +#define ARGS_0 +#define ARGS_1 movl 4(%esp), %ecx; +#define ARGS_2 movl 4(%esp), %ecx; movl 8(%esp), %edx; +#define ARGS_3 leal 4(%esp), %ecx; +#define ARGS_4 ARGS_3 +#define ARGS_5 ARGS_3 +#define ARGS_6 ARGS_3 + +/* Dynix reverses %ecx and %edx relative to most i386 Unices. */ + +#define r0 %eax /* Normal return-value register. */ +#define r1 %ecx /* Secondary return-value register. */ +#define scratch %edx /* Call-clobbered register for random use. */ +#define MOVE(x,y) movl x, y From aa809aac6f07723b3f67b9f44197c34bcc93a165 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 9 Apr 1993 00:56:41 +0000 Subject: [PATCH 0183/4487] entered into RCS --- sysdeps/unix/bsd/sequent/i386/sysdep.h | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/sysdeps/unix/bsd/sequent/i386/sysdep.h b/sysdeps/unix/bsd/sequent/i386/sysdep.h index 7a6aa0e9ec..05fe24cef7 100644 --- a/sysdeps/unix/bsd/sequent/i386/sysdep.h +++ b/sysdeps/unix/bsd/sequent/i386/sysdep.h @@ -17,31 +17,21 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include +#include /* Get the symbols for system call interrupts. */ #include - -#ifdef __STDC__ -#define ENTRY(name) \ - .globl _##name; \ - .align 4; \ - _##name##: -#else -#define ENTRY(name) \ - .globl _/**/name; \ - .align 4; \ - _/**/name/**/: -#endif /* Use the BSD versions of system calls, by setting the high 16 bits of the syscall number (see /usr/include/syscall.h). */ -#define SYS_HANDLER SYS_bsd##0000 +#define SYS_HANDLER (SYS_bsd << 16) /* Dynix uses an interrupt interface to system calls. "int $T_SVCn" are syscall interfaces for 0-6 arg functions. (see /usr/include/machine/trap.h). */ +#undef DO_CALL + #ifdef __STDC__ #define DO_CALL(syscall_name, args) \ movl $(SYS_HANDLER | SYS_##syscall_name), %eax; \ @@ -52,6 +42,7 @@ Cambridge, MA 02139, USA. */ int $T_SVC/**/args; #endif +#undef PSEUDO #define PSEUDO(name, syscall_name, args) \ .text; \ .globl syscall_error; \ @@ -81,7 +72,7 @@ Cambridge, MA 02139, USA. */ /* Dynix reverses %ecx and %edx relative to most i386 Unices. */ -#define r0 %eax /* Normal return-value register. */ +#undef r1 #define r1 %ecx /* Secondary return-value register. */ +#undef scratch #define scratch %edx /* Call-clobbered register for random use. */ -#define MOVE(x,y) movl x, y From b128f924ec347d3b1f0287957f8b40f03b1dd8f1 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 9 Apr 1993 01:33:44 +0000 Subject: [PATCH 0184/4487] Initial revision --- sysdeps/unix/bsd/sequent/i386/sigvec.S | 45 ++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 sysdeps/unix/bsd/sequent/i386/sigvec.S diff --git a/sysdeps/unix/bsd/sequent/i386/sigvec.S b/sysdeps/unix/bsd/sequent/i386/sigvec.S new file mode 100644 index 0000000000..03b1c7df4f --- /dev/null +++ b/sysdeps/unix/bsd/sequent/i386/sigvec.S @@ -0,0 +1,45 @@ +/* Copyright (C) 1993 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +/* The Dynix `sigvec' system call takes an extra argument, + which is the address of the trampoline function. */ + +.text +.align 4 +trampoline: + cld /* Clear direction flag. */ + call %eax /* Call the handler, address in %eax. */ + addl $8, %esp /* Pop signum & code off the stack. */ + /* __sigreturn will restore the context, and never return here. */ + jsr C_SYMBOL_NAME (__sigreturn) + +.globl syscall_error +ENTRY (__sigvec) + /* Put the address of the trampoline in a scratch register. */ + mov $trampoline, %edx + /* Now exchange this register with the top of the stack, + wherein now lies the return PC. */ + xchg 0(%esp), %edx + mov %esp, %ecx /* Point the syscall at the arguments. */ + DO_CALL (sigvec, 4) /* Do the system call. */ + /* Exchange again, restoring the return PC. */ + xchg 0(%esp), %edx + jb syscall_error /* Check for error. */ + ret From f63f39a68625449e60dd59c0ba9a123cb474b4a8 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 12 Apr 1993 00:49:08 +0000 Subject: [PATCH 0185/4487] Formerly alpha/__copysign.c.~2~ --- sysdeps/alpha/copysign.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/copysign.c b/sysdeps/alpha/copysign.c index ad74994f25..d86521c741 100644 --- a/sysdeps/alpha/copysign.c +++ b/sysdeps/alpha/copysign.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1993 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 @@ -18,7 +18,7 @@ Cambridge, MA 02139, USA. */ #include -/* Return X with its signed changed to Y's. */ +/* Return X with its sign changed to Y's. */ double __copysign (double x, double y) { From d1c8a6e7221a8120a572ec51887397fdba441388 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 23 Apr 1993 00:50:11 +0000 Subject: [PATCH 0186/4487] Formerly unix/bsd/sun/sunos4/speed.c.~2~ --- sysdeps/unix/bsd/sun/sunos4/speed.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/bsd/sun/sunos4/speed.c b/sysdeps/unix/bsd/sun/sunos4/speed.c index 8b2e14f04a..ce14479359 100644 --- a/sysdeps/unix/bsd/sun/sunos4/speed.c +++ b/sysdeps/unix/bsd/sun/sunos4/speed.c @@ -70,7 +70,7 @@ DEFUN(cfsetospeed, (termios_p, speed), return -1; } - for (i = 0; i < sizeof (speeds) / sizeof (speed[0]); ++i) + for (i = 0; i < sizeof (speeds) / sizeof (speeds[0]); ++i) if (speeds[i] == speed) { termios_p->c_cflag &= ~CBAUD; @@ -95,7 +95,7 @@ DEFUN(cfsetispeed, (termios_p, speed), return -1; } - for (i = 0; i < sizeof (speeds) / sizeof (speed[0]); ++i) + for (i = 0; i < sizeof (speeds) / sizeof (speeds[0]); ++i) if (speeds[i] == speed) { termios_p->c_cflag &= ~CIBAUD; From 1faa98bdde80af9afcd362735f8cc2d70e26f1c6 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 23 Apr 1993 00:54:09 +0000 Subject: [PATCH 0187/4487] Formerly sysdeps/unix/bsd/sun/sunos4/__wait4.c.~4~ --- sysdeps/unix/bsd/sun/sunos4/wait4.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sysdeps/unix/bsd/sun/sunos4/wait4.c b/sysdeps/unix/bsd/sun/sunos4/wait4.c index 6641bdfc0d..f3c1659f95 100644 --- a/sysdeps/unix/bsd/sun/sunos4/wait4.c +++ b/sysdeps/unix/bsd/sun/sunos4/wait4.c @@ -2,7 +2,7 @@ SunOS 4.1) on top of SunOS's wait4 system call, which has semantics different from those documented. Go Sun! -Copyright (C) 1991, 1992 Free Software Foundation, Inc. +Copyright (C) 1991, 1992, 1993 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,13 +25,13 @@ Cambridge, MA 02139, USA. */ #include #include -extern pid_t EXFUN(__wait4_syscall, - (pid_t pid, union wait *stat_loc, int options, PTR usage)); +extern pid_t __wait4_syscall __P ((pid_t pid, __WAIT_STATUS stat_loc, + int options, struct rusage *usage)); pid_t DEFUN(__wait4, (pid, stat_loc, options, usage), - pid_t pid AND union wait *stat_loc AND int options AND - struct rusage *usage) + pid_t pid AND __WAIT_STATUS stat_loc AND + int options AND struct rusage *usage) { switch (pid) { From c81837fdd16ea7936a6efad8a5dcdb05108979b9 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 23 Apr 1993 02:42:59 +0000 Subject: [PATCH 0188/4487] Initial revision --- sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h diff --git a/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h b/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h new file mode 100644 index 0000000000..e4f31ab83e --- /dev/null +++ b/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h @@ -0,0 +1,65 @@ +/* Copyright (C) 1993 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* This code wants to be run through m4. */ + +#include + +#define POUND(foo) (@@@Hash-Here@@@)foo + +#ifdef __STDC__ +#define ENTRY(name) \ + .globl _##name; \ + .even; \ + _##name##: +#else +#define ENTRY(name) \ + .globl _/**/name; \ + .even; \ + _/**/name/**/: +#endif + +#ifdef __STDC__ +#define PSEUDO(name, syscall_name, args) \ + .even; \ + .globl syscall_error; \ + error: jmp syscall_error; \ + ENTRY (name) \ + linkw fp, POUND(0); \ + movel POUND(SYS_##syscall_name), d0; \ + trap POUND(0); \ + bcs error; \ + unlk fp + +#else +#define PSEUDO(name, syscall_name, args) \ + .even; \ + .globl syscall_error; \ + error: jmp syscall_error; \ + ENTRY (name) \ + linkw fp, POUND(0); \ + movel POUND(SYS_/**/syscall_name), d0; \ + trap POUND(0); \ + bcs error; \ + unlk fp +#endif + +#define ret rts +#define r0 d0 +#define r1 d1 +#define MOVE(x,y) movel x , y From 5023f49b301c9cd057c0ab217993c77a90fba1a9 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 23 Apr 1993 02:43:30 +0000 Subject: [PATCH 0189/4487] Formerly unix/bsd/sony/newsos/m68k/sysdep.h.~2~ --- sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h b/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h index e4f31ab83e..d67a08969a 100644 --- a/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h +++ b/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h @@ -34,6 +34,8 @@ Cambridge, MA 02139, USA. */ _/**/name/**/: #endif +/* NewsOS 4 wants a stack frame around syscalls. */ + #ifdef __STDC__ #define PSEUDO(name, syscall_name, args) \ .even; \ From 2e634f84c4732e5c91c53953e4fecbdc6cc09f30 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 3 May 1993 23:57:05 +0000 Subject: [PATCH 0190/4487] Initial revision --- sysdeps/unix/sysv/sco3.2.4/direct.h | 13 +++++++++++++ sysdeps/unix/sysv/sco3.2.4/waitpid.S | 22 ++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 sysdeps/unix/sysv/sco3.2.4/direct.h create mode 100644 sysdeps/unix/sysv/sco3.2.4/waitpid.S diff --git a/sysdeps/unix/sysv/sco3.2.4/direct.h b/sysdeps/unix/sysv/sco3.2.4/direct.h new file mode 100644 index 0000000000..350300eb22 --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/direct.h @@ -0,0 +1,13 @@ +#ifndef MAXNAMLEN +#define MAXNAMLEN 512 +#endif +#define DIRBUF 1048 /* minimum buffer size for call to getdents */ + +struct direct + { + unsigned short int d_fileno; + short int d_pad; + long int d_off; + unsigned short int d_reclen; + char d_name[1]; + }; diff --git a/sysdeps/unix/sysv/sco3.2.4/waitpid.S b/sysdeps/unix/sysv/sco3.2.4/waitpid.S new file mode 100644 index 0000000000..73e0888f0f --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/waitpid.S @@ -0,0 +1,22 @@ +/* Copyright (C) 1993 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +SYSCALL__ (waitpid, 3) + ret From 378b732265b887dc003b3735105612e04372482f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 5 May 1993 23:34:53 +0000 Subject: [PATCH 0191/4487] Initial revision --- sysdeps/unix/sysv/sco3.2.4/sigaction.S | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 sysdeps/unix/sysv/sco3.2.4/sigaction.S diff --git a/sysdeps/unix/sysv/sco3.2.4/sigaction.S b/sysdeps/unix/sysv/sco3.2.4/sigaction.S new file mode 100644 index 0000000000..dbe41e335d --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/sigaction.S @@ -0,0 +1,22 @@ +/* Copyright (C) 1993 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +SYSCALL__ (sigaction, 3) + ret From 978108c543a45a480c1b54b7967095c77f2a1f8a Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 6 May 1993 00:31:00 +0000 Subject: [PATCH 0192/4487] entered into RCS --- sysdeps/tahoe/Implies | 2 +- sysdeps/unix/sysv/sco3.2.4/sigpending.S | 22 ++++++++++++++++++++++ sysdeps/unix/sysv/sco3.2.4/sigprocmask.S | 22 ++++++++++++++++++++++ sysdeps/unix/sysv/sysv4/sigsuspend.S | 22 ++++++++++++++++++++++ 4 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 sysdeps/unix/sysv/sco3.2.4/sigpending.S create mode 100644 sysdeps/unix/sysv/sco3.2.4/sigprocmask.S create mode 100644 sysdeps/unix/sysv/sysv4/sigsuspend.S diff --git a/sysdeps/tahoe/Implies b/sysdeps/tahoe/Implies index 29a36ec255..5a3163701f 100644 --- a/sysdeps/tahoe/Implies +++ b/sysdeps/tahoe/Implies @@ -1,2 +1,2 @@ -$(bsdmath)tahoe +# A Tahoe is mostly just like a Vax. vax diff --git a/sysdeps/unix/sysv/sco3.2.4/sigpending.S b/sysdeps/unix/sysv/sco3.2.4/sigpending.S new file mode 100644 index 0000000000..bc05b2ef6e --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/sigpending.S @@ -0,0 +1,22 @@ +/* Copyright (C) 1993 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +SYSCALL (sigpending, 1) + ret diff --git a/sysdeps/unix/sysv/sco3.2.4/sigprocmask.S b/sysdeps/unix/sysv/sco3.2.4/sigprocmask.S new file mode 100644 index 0000000000..148741ec8c --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/sigprocmask.S @@ -0,0 +1,22 @@ +/* Copyright (C) 1993 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +SYSCALL__ (sigprocmask, 3) + ret diff --git a/sysdeps/unix/sysv/sysv4/sigsuspend.S b/sysdeps/unix/sysv/sysv4/sigsuspend.S new file mode 100644 index 0000000000..85d36017b8 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/sigsuspend.S @@ -0,0 +1,22 @@ +/* Copyright (C) 1993 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +SYSCALL (sigsuspend, 1) + ret From 7ebb6b1f3c2efa3d91d6d4b5446af2153ed16270 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 6 May 1993 01:57:58 +0000 Subject: [PATCH 0193/4487] entered into RCS --- sysdeps/unix/sysv/sco3.2/Dist | 1 + sysdeps/unix/sysv/sco3.2/Makefile | 23 +++++++++++++++++ sysdeps/unix/sysv/sco3.2/__fltused.c | 3 +++ sysdeps/unix/sysv/sco3.2/local_lim.h | 37 ++++++++++++++++++++++++++++ 4 files changed, 64 insertions(+) create mode 100644 sysdeps/unix/sysv/sco3.2/Dist create mode 100644 sysdeps/unix/sysv/sco3.2/Makefile create mode 100644 sysdeps/unix/sysv/sco3.2/__fltused.c create mode 100644 sysdeps/unix/sysv/sco3.2/local_lim.h diff --git a/sysdeps/unix/sysv/sco3.2/Dist b/sysdeps/unix/sysv/sco3.2/Dist new file mode 100644 index 0000000000..60fab2bdea --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2/Dist @@ -0,0 +1 @@ +__fltused.c diff --git a/sysdeps/unix/sysv/sco3.2/Makefile b/sysdeps/unix/sysv/sco3.2/Makefile new file mode 100644 index 0000000000..1be24e85e3 --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2/Makefile @@ -0,0 +1,23 @@ +# Copyright (C) 1993 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 Library General Public License +# as published by the Free Software Foundation; either version 2 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 +# Library General Public License for more details. + +# You should have received a copy of the GNU Library General Public +# License along with the GNU C Library; see the file COPYING.LIB. If +# not, write to the Free Software Foundation, Inc., 675 Mass Ave, +# Cambridge, MA 02139, USA. + +ifeq ($(subdir),misc) + +sysdep_routines := $(sysdep_routines) __fltused + +endif diff --git a/sysdeps/unix/sysv/sco3.2/__fltused.c b/sysdeps/unix/sysv/sco3.2/__fltused.c new file mode 100644 index 0000000000..5d1d67f0b1 --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2/__fltused.c @@ -0,0 +1,3 @@ +/* Code compiled by the SCO compiler apparently likes this to be defined. */ + +int __fltused = 1; diff --git a/sysdeps/unix/sysv/sco3.2/local_lim.h b/sysdeps/unix/sysv/sco3.2/local_lim.h new file mode 100644 index 0000000000..6d6c3b0ac8 --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2/local_lim.h @@ -0,0 +1,37 @@ +/* Copyright (C) 1993 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifndef _LOCAL_LIM_H +#define _LOCAL_LIM_H 1 + +#define NGROUPS_MAX 8 /* Maximum number of supplementary groups. */ +#define ARG_MAX 5120 +#define CHILD_MAX 25 +#define OPEN_MAX 60 +#define LINK_MAX 1000 +#define MAX_CANON 256 + +/* For SVR3, this is 14. For SVR4, it is 255, at least on ufs + file systems, even though the System V limits.h incorrectly + defines it as 14. Giving it a value which is too large + is harmless (it is a maximum). */ +#define NAME_MAX 255 + +#define PATH_MAX 1024 + +#endif /* local_lim.h */ From 4f65119178303987f78ad0a118a2fc87486b2302 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 6 May 1993 23:29:21 +0000 Subject: [PATCH 0194/4487] entered into RCS --- sysdeps/unix/bsd/sun/sunos4/speed.c | 13 +++++++++---- sysdeps/unix/bsd/sun/sunos4/termbits.h | 22 ++++++++++++++++++++++ 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/bsd/sun/sunos4/speed.c b/sysdeps/unix/bsd/sun/sunos4/speed.c index ce14479359..1c09d55dab 100644 --- a/sysdeps/unix/bsd/sun/sunos4/speed.c +++ b/sysdeps/unix/bsd/sun/sunos4/speed.c @@ -47,14 +47,14 @@ static CONST speed_t speeds[] = speed_t DEFUN(cfgetospeed, (termios_p), CONST struct termios *termios_p) { - return speeds[termios_p->c_cflag & CBAUD]; + return termios_p->c_cflag & CBAUD; } /* Return the input baud rate stored in *TERMIOS_P. */ speed_t DEFUN(cfgetispeed, (termios_p), CONST struct termios *termios_p) { - return speeds[(termios_p->c_cflag & CIBAUD) >> IBSHIFT]; + return (termios_p->c_cflag & CIBAUD) >> IBSHIFT; } /* Set the output baud rate stored in *TERMIOS_P to SPEED. */ @@ -70,8 +70,12 @@ DEFUN(cfsetospeed, (termios_p, speed), return -1; } + /* This allows either B1200 or 1200 to work. XXX + Do we really want to try to support this, given that + fetching the speed must return one or the other? */ + for (i = 0; i < sizeof (speeds) / sizeof (speeds[0]); ++i) - if (speeds[i] == speed) + if (i == speed || speeds[i] == speed) { termios_p->c_cflag &= ~CBAUD; termios_p->c_cflag |= i; @@ -95,8 +99,9 @@ DEFUN(cfsetispeed, (termios_p, speed), return -1; } + /* See comment in cfsetospeed (above). */ for (i = 0; i < sizeof (speeds) / sizeof (speeds[0]); ++i) - if (speeds[i] == speed) + if (i == speed || speeds[i] == speed) { termios_p->c_cflag &= ~CIBAUD; termios_p->c_cflag |= i << IBSHIFT; diff --git a/sysdeps/unix/bsd/sun/sunos4/termbits.h b/sysdeps/unix/bsd/sun/sunos4/termbits.h index b8e9cd9a17..01ab4d7874 100644 --- a/sysdeps/unix/bsd/sun/sunos4/termbits.h +++ b/sysdeps/unix/bsd/sun/sunos4/termbits.h @@ -107,6 +107,28 @@ struct termios #define CIBAUD 0x000f0000 /* Mask for input speed from c_cflag. */ #define CBAUD 0x0000000f /* Mask for output speed from c_cflag. */ #define IBSHIFT 16 /* Bits to shift for input speed. */ +#endif + + /* Input and output baud rates. These are encoded in c_cflag. */ +#define B0 0 +#define B50 1 +#define B75 2 +#define B110 3 +#define B134 4 +#define B150 5 +#define B200 6 +#define B300 7 +#define B600 8 +#define B1200 9 +#define B1800 10 +#define B2400 11 +#define B4800 12 +#define B9600 13 +#define B19200 14 +#define B38400 15 +#ifdef __USE_BSD +#define EXTA 14 +#define EXTB 15 #endif /* Local modes. */ From 5da337e5ebd64c4cd435005b8a7ee3e79400b2ff Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 7 May 1993 00:34:46 +0000 Subject: [PATCH 0195/4487] entered into RCS --- sysdeps/unix/bsd/sun/sunos4/tcflow.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/bsd/sun/sunos4/tcflow.c b/sysdeps/unix/bsd/sun/sunos4/tcflow.c index 5accafd47c..bb9a7fc7a0 100644 --- a/sysdeps/unix/bsd/sun/sunos4/tcflow.c +++ b/sysdeps/unix/bsd/sun/sunos4/tcflow.c @@ -19,6 +19,7 @@ Cambridge, MA 02139, USA. */ #include #include #include +#include /* Suspend or restart transmission on FD. */ int From a248147b08be2d2e364d0022bbcffced58ba1730 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 12 May 1993 20:42:26 +0000 Subject: [PATCH 0196/4487] Initial revision --- sysdeps/unix/sysv/sco3.2.4/confname.h | 49 +++++++++++++++++++++++++++ sysdeps/unix/sysv/sco3.2.4/sysconf.S | 22 ++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 sysdeps/unix/sysv/sco3.2.4/confname.h create mode 100644 sysdeps/unix/sysv/sco3.2.4/sysconf.S diff --git a/sysdeps/unix/sysv/sco3.2.4/confname.h b/sysdeps/unix/sysv/sco3.2.4/confname.h new file mode 100644 index 0000000000..cfa3e07127 --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/confname.h @@ -0,0 +1,49 @@ +/* `sysconf', `pathconf', and `confstr' NAME values. Generic version. +Copyright (C) 1993 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Values for the NAME argument to `pathconf' and `fpathconf'. */ +#define _PC_LINK_MAX 0 +#define _PC_MAX_CANON 1 +#define _PC_MAX_INPUT 2 +#define _PC_NAME_MAX 3 +#define _PC_PATH_MAX 4 +#define _PC_PIPE_BUF 5 +#define _PC_CHOWN_RESTRICTED 6 +#define _PC_NO_TRUNC 7 +#define _PC_VDISABLE 8 + +/* Values for the argument to `sysconf'. */ +#define _SC_ARG_MAX 0 +#define _SC_CHILD_MAX 1 +#define _SC_CLK_TCK 2 +#define _SC_NGROUPS_MAX 3 +#define _SC_OPEN_MAX 4 +#define _SC_JOB_CONTROL 5 +#define _SC_SAVED_IDS 6 +#define _SC_VERSION 7 +#define _SC_PASS_MAX 8 +#define _SC_XOPEN_VERSION 9 + +#ifdef __USE_POSIX2 +/* Values for the NAME argument to `confstr'. */ +enum + { + _CS_PATH /* The default search path. */ + }; +#endif diff --git a/sysdeps/unix/sysv/sco3.2.4/sysconf.S b/sysdeps/unix/sysv/sco3.2.4/sysconf.S new file mode 100644 index 0000000000..bb78d5df66 --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/sysconf.S @@ -0,0 +1,22 @@ +/* Copyright (C) 1993 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +SYSCALL__ (sysconf, 1) + ret From e9f58659c814fedceec91bee1b790b8c8f0c72de Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 12 May 1993 20:42:27 +0000 Subject: [PATCH 0197/4487] entered into RCS --- sysdeps/unix/sysv/sco3.2.4/pathconf.S | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 sysdeps/unix/sysv/sco3.2.4/pathconf.S diff --git a/sysdeps/unix/sysv/sco3.2.4/pathconf.S b/sysdeps/unix/sysv/sco3.2.4/pathconf.S new file mode 100644 index 0000000000..2c737620f6 --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/pathconf.S @@ -0,0 +1,22 @@ +/* Copyright (C) 1993 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +SYSCALL__ (pathconf, 2) + ret From 3df867a734514d7e7577cef323f0b40bb40c96a9 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 12 May 1993 22:57:41 +0000 Subject: [PATCH 0198/4487] entered into RCS --- sysdeps/unix/bsd/sun/sparc/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysdeps/unix/bsd/sun/sparc/Makefile b/sysdeps/unix/bsd/sun/sparc/Makefile index ac4121dc2c..59d10dbdbf 100644 --- a/sysdeps/unix/bsd/sun/sparc/Makefile +++ b/sysdeps/unix/bsd/sun/sparc/Makefile @@ -1,3 +1,7 @@ +# Basically `-e start' is magical to the Sun linker. You would think that +# having start.o first would be enough, but you would be wrong. +LDFLAGS := $(LDFLAGS) -Xlinker -e -Xlinker start + ifeq ($(subdir),signal) sysdep_routines := $(sysdep_routines) sigtramp endif From 65a0e8f331d9c28b704e44563dcb57abf30cec55 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Thu, 13 May 1993 01:20:04 +0000 Subject: [PATCH 0199/4487] Initial revision --- sysdeps/unix/sysv/sysv4/solaris2/sparc/start.c | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/solaris2/sparc/start.c diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/start.c b/sysdeps/unix/sysv/sysv4/solaris2/sparc/start.c new file mode 100644 index 0000000000..4a9a1e9f07 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/start.c @@ -0,0 +1,2 @@ +#define NO_SHLIB +#include From eb3674eae93c2adda037148d78904e4572fc1367 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 13 May 1993 01:23:57 +0000 Subject: [PATCH 0200/4487] Initial revision --- sysdeps/unix/sysv/sysv4/solaris2/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/solaris2/Makefile diff --git a/sysdeps/unix/sysv/sysv4/solaris2/Makefile b/sysdeps/unix/sysv/sysv4/solaris2/Makefile new file mode 100644 index 0000000000..539c72577a --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/solaris2/Makefile @@ -0,0 +1,6 @@ +# The linker supplied with Solaris looks in the current directory +# before searching others. Compiling the various programs that come +# along the way (e.g., glue-ctype) will fail because it'll try to link +# with the libc.a being *constructed* in $(objdir). As a work-around, +# we add this to each native-compile. +native-CFLAGS := -L/lib From 6064be1268325aead7bb00a027e3a7c60e284669 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 13 May 1993 01:24:22 +0000 Subject: [PATCH 0201/4487] Formerly unix/sysv/sysv4/solaris2/Makefile.~2~ --- sysdeps/unix/sysv/sysv4/solaris2/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/sysv4/solaris2/Makefile b/sysdeps/unix/sysv/sysv4/solaris2/Makefile index 539c72577a..4332fb4df2 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/Makefile +++ b/sysdeps/unix/sysv/sysv4/solaris2/Makefile @@ -3,4 +3,4 @@ # along the way (e.g., glue-ctype) will fail because it'll try to link # with the libc.a being *constructed* in $(objdir). As a work-around, # we add this to each native-compile. -native-CFLAGS := -L/lib +native-CFLAGS := $(native-CFLAGS) -L/lib From fd1a0ae4da2ba2bd1ec3c406fb42d2445574f1be Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 13 May 1993 01:27:59 +0000 Subject: [PATCH 0202/4487] entered into RCS --- sysdeps/unix/sysv/sysv4/solaris2/utimes.S | 2 ++ sysdeps/unix/sysv/sysv4/utsnamelen.h | 1 + 2 files changed, 3 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/solaris2/utimes.S create mode 100644 sysdeps/unix/sysv/sysv4/utsnamelen.h diff --git a/sysdeps/unix/sysv/sysv4/solaris2/utimes.S b/sysdeps/unix/sysv/sysv4/solaris2/utimes.S new file mode 100644 index 0000000000..16baf448b1 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/solaris2/utimes.S @@ -0,0 +1,2 @@ +/* Solaris has the BSD `utimes' function. */ +#include diff --git a/sysdeps/unix/sysv/sysv4/utsnamelen.h b/sysdeps/unix/sysv/sysv4/utsnamelen.h new file mode 100644 index 0000000000..9dcc618068 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/utsnamelen.h @@ -0,0 +1 @@ +#define _UTSNAME_LENGTH 257 From 1d2696dae9ec64f6b38bbc7e1ac444cc7ad429f7 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Sat, 15 May 1993 01:24:13 +0000 Subject: [PATCH 0203/4487] Initial revision --- sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h new file mode 100644 index 0000000000..d09b6c485d --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h @@ -0,0 +1,4 @@ +/* Solaris 2 does not precede the asm names of C symbols with a `_'. */ +#define NO_UNDERSCORES + +#include From 65385dc84c3372d5f574050b565f09edec78c055 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 15 May 1993 02:15:14 +0000 Subject: [PATCH 0204/4487] entered into RCS --- sysdeps/unix/sysv/sysv4/solaris2/sparc/start.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/start.c b/sysdeps/unix/sysv/sysv4/solaris2/sparc/start.c index 4a9a1e9f07..afdfaaa2e5 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/start.c +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/start.c @@ -1,2 +1,4 @@ #define NO_SHLIB +/* Solaris needs start named `_start', not `start'. */ +#define NO_EXPLICIT_START #include From 11bd41d2a307a82fc4cb96797ebdf0026c8a1d69 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 15 May 1993 21:57:10 +0000 Subject: [PATCH 0205/4487] Formerly unix/bsd/sequent/i386/__sigvec.S.~2~ --- sysdeps/unix/bsd/sequent/i386/sigvec.S | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sysdeps/unix/bsd/sequent/i386/sigvec.S b/sysdeps/unix/bsd/sequent/i386/sigvec.S index 03b1c7df4f..53aade4393 100644 --- a/sysdeps/unix/bsd/sequent/i386/sigvec.S +++ b/sysdeps/unix/bsd/sequent/i386/sigvec.S @@ -28,18 +28,18 @@ trampoline: call %eax /* Call the handler, address in %eax. */ addl $8, %esp /* Pop signum & code off the stack. */ /* __sigreturn will restore the context, and never return here. */ - jsr C_SYMBOL_NAME (__sigreturn) + call C_SYMBOL_NAME (__sigreturn) .globl syscall_error ENTRY (__sigvec) /* Put the address of the trampoline in a scratch register. */ - mov $trampoline, %edx - /* Now exchange this register with the top of the stack, - wherein now lies the return PC. */ - xchg 0(%esp), %edx - mov %esp, %ecx /* Point the syscall at the arguments. */ + mov $trampoline, scratch + /* Now exchange this register with the fourth word on the stack, + where the fourth argument to the system call would go. */ + xchg 16(%esp), scratch + ARGS_4 /* Point the syscall at the arguments. */ DO_CALL (sigvec, 4) /* Do the system call. */ - /* Exchange again, restoring the return PC. */ - xchg 0(%esp), %edx + /* Exchange again, restoring the stack word. */ + xchg 16(%esp), scratch jb syscall_error /* Check for error. */ ret From 671631d4b1a8be06ff1596194be2d09faf114c23 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 17 May 1993 02:08:01 +0000 Subject: [PATCH 0206/4487] Formerly unix/bsd/sequent/i386/__sigvec.S.~3~ --- sysdeps/unix/bsd/sequent/i386/sigvec.S | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/sysdeps/unix/bsd/sequent/i386/sigvec.S b/sysdeps/unix/bsd/sequent/i386/sigvec.S index 53aade4393..9a9a13e079 100644 --- a/sysdeps/unix/bsd/sequent/i386/sigvec.S +++ b/sysdeps/unix/bsd/sequent/i386/sigvec.S @@ -32,14 +32,12 @@ trampoline: .globl syscall_error ENTRY (__sigvec) - /* Put the address of the trampoline in a scratch register. */ - mov $trampoline, scratch - /* Now exchange this register with the fourth word on the stack, - where the fourth argument to the system call would go. */ - xchg 16(%esp), scratch + pushl $trampoline /* Push fourth arg: trampoline address. */ + pushl 16(%esp) /* Push third arg: our third arg. */ + pushl 16(%esp) /* Push second arg: our second arg. */ + pushl 16(%esp) /* Push first arg: our first arg. */ ARGS_4 /* Point the syscall at the arguments. */ DO_CALL (sigvec, 4) /* Do the system call. */ - /* Exchange again, restoring the stack word. */ - xchg 16(%esp), scratch + addl %esp, $16 /* Pop those four args. */ jb syscall_error /* Check for error. */ ret From d97da3aeba0ba5e4b1f5b51723421268d839ed88 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Thu, 20 May 1993 18:02:23 +0000 Subject: [PATCH 0207/4487] Initial revision --- sysdeps/unix/sysv/sysv4/getdtsz.c | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 sysdeps/unix/sysv/sysv4/getdtsz.c diff --git a/sysdeps/unix/sysv/sysv4/getdtsz.c b/sysdeps/unix/sysv/sysv4/getdtsz.c new file mode 100644 index 0000000000..e69de29bb2 From abf73d69f8e9c01cbdfa7ecd8d8f4d908247c0c4 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Thu, 20 May 1993 18:02:24 +0000 Subject: [PATCH 0208/4487] entered into RCS --- sysdeps/unix/sysv/sysv4/getdtsz.c | 2 ++ sysdeps/unix/sysv/sysv4/getpagesize.c | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/getpagesize.c diff --git a/sysdeps/unix/sysv/sysv4/getdtsz.c b/sysdeps/unix/sysv/sysv4/getdtsz.c index e69de29bb2..9de35d5af6 100644 --- a/sysdeps/unix/sysv/sysv4/getdtsz.c +++ b/sysdeps/unix/sysv/sysv4/getdtsz.c @@ -0,0 +1,2 @@ +/* Solaris uses sysconf ala POSIX.1. */ +#include diff --git a/sysdeps/unix/sysv/sysv4/getpagesize.c b/sysdeps/unix/sysv/sysv4/getpagesize.c new file mode 100644 index 0000000000..241348cbfb --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/getpagesize.c @@ -0,0 +1,2 @@ +/* Solaris uses sysconf ala POSIX.1. */ +#include From 9ad31f91ba23d12b3cb9459e0d77ffecc922ec27 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Thu, 20 May 1993 18:02:28 +0000 Subject: [PATCH 0209/4487] Initial revision --- sysdeps/unix/sysv/sysv4/sysconf.c | 179 ++++++++++++++++++++++++++++ sysdeps/unix/sysv/sysv4/sysconfig.h | 0 2 files changed, 179 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/sysconf.c create mode 100644 sysdeps/unix/sysv/sysv4/sysconfig.h diff --git a/sysdeps/unix/sysv/sysv4/sysconf.c b/sysdeps/unix/sysv/sysv4/sysconf.c new file mode 100644 index 0000000000..3e4e82c1eb --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/sysconf.c @@ -0,0 +1,179 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@cygnus.com). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include +#include +#include +#include + +extern int EXFUN(__sysconfig, (int)); + +/* Get the value of the system variable NAME. */ +long int +DEFUN(__sysconf, (name), int name) +{ + switch (name) + { + default: + errno = EINVAL; + return -1; + + case _SC_ARG_MAX: +#ifdef ARG_MAX + return ARG_MAX; +#else + return -1; +#endif + + case _SC_CHILD_MAX: +#ifdef CHILD_MAX + return CHILD_MAX; +#else + return -1; +#endif + + case _SC_CLK_TCK: + return __sysconfig (_CONFIG_CLK_TCK); + + case _SC_NGROUPS_MAX: +#ifdef NGROUPS_MAX + return NGROUPS_MAX; +#else + return -1; +#endif + + /* Both of these are looking for _CONFIG_OPEN_FILES. */ + case _SC_OPEN_MAX: + case _SC_STREAM_MAX: + return __sysconfig (_CONFIG_OPEN_FILES); + + case _SC_TZNAME_MAX: + return __tzname_max (); + + case _SC_JOB_CONTROL: +#ifdef _POSIX_JOB_CONTROL + return 1; +#else + return -1; +#endif + case _SC_SAVED_IDS: +#ifdef _POSIX_SAVED_IDS + return 1; +#else + return -1; +#endif + case _SC_VERSION: + return _POSIX_VERSION; + + case _SC_PAGESIZE: + return __sysconfig (_CONFIG_PAGESIZE); + + case _SC_BC_BASE_MAX: +#ifdef BC_BASE_MAX + return BC_BASE_MAX; +#else + return -1; +#endif + + case _SC_BC_DIM_MAX: +#ifdef BC_DIM_MAX + return BC_DIM_MAX; +#else + return -1; +#endif + + case _SC_BC_SCALE_MAX: +#ifdef BC_SCALE_MAX + return BC_SCALE_MAX; +#else + return -1; +#endif + + case _SC_BC_STRING_MAX: +#ifdef BC_STRING_MAX + return BC_STRING_MAX; +#else + return -1; +#endif + + case _SC_EQUIV_CLASS_MAX: +#ifdef EQUIV_CLASS_MAX + return EQUIV_CLASS_MAX; +#else + return -1; +#endif + + case _SC_EXPR_NEST_MAX: +#ifdef EXPR_NEST_MAX + return EXPR_NEST_MAX; +#else + return -1; +#endif + + case _SC_LINE_MAX: +#ifdef LINE_MAX + return LINE_MAX; +#else + return -1; +#endif + + case _SC_RE_DUP_MAX: +#ifdef RE_DUP_MAX + return RE_DUP_MAX; +#else + return -1; +#endif + + + case _SC_2_VERSION: + /* This is actually supposed to return the version + of the 1003.2 utilities on the system {POSIX2_VERSION}. */ + return _POSIX2_C_VERSION; + + case _SC_2_C_BIND: +#ifdef _POSIX2_C_BIND + return _POSIX2_C_BIND; +#else + return -1; +#endif + + case _SC_2_C_DEV: +#ifdef _POSIX2_C_DEV + return _POSIX2_C_DEV; +#else + return -1; +#endif + + case _SC_2_FORT_DEV: +#ifdef _POSIX2_FORT_DEV + return _POSIX2_FORT_DEV; +#else + return -1; +#endif + + case _SC_2_SW_DEV: +#ifdef _POSIX2_SW_DEV + return _POSIX2_SW_DEV; +#else + return -1; +#endif + } +} diff --git a/sysdeps/unix/sysv/sysv4/sysconfig.h b/sysdeps/unix/sysv/sysv4/sysconfig.h new file mode 100644 index 0000000000..e69de29bb2 From 28537b7ecb2a6eba4bedd2b89f18b2b9de166cb8 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Thu, 20 May 1993 18:02:31 +0000 Subject: [PATCH 0210/4487] Formerly sysdeps/unix/sysv/sysv4/Dist.~4~ --- sysdeps/unix/sysv/sysv4/Dist | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/sysv4/Dist b/sysdeps/unix/sysv/sysv4/Dist index f23793c4a4..07d852f382 100644 --- a/sysdeps/unix/sysv/sysv4/Dist +++ b/sysdeps/unix/sysv/sysv4/Dist @@ -1,2 +1 @@ -sys_getdents.S -bsddir.h +sysconfig.h From c80584a6444a14d016871df962872cef0e7ac17a Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 20 May 1993 22:03:08 +0000 Subject: [PATCH 0211/4487] entered into RCS --- sysdeps/unix/sysv/sco3.2.4/direct.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/sco3.2.4/direct.h b/sysdeps/unix/sysv/sco3.2.4/direct.h index 350300eb22..b3eaa54c8b 100644 --- a/sysdeps/unix/sysv/sco3.2.4/direct.h +++ b/sysdeps/unix/sysv/sco3.2.4/direct.h @@ -9,5 +9,14 @@ struct direct short int d_pad; long int d_off; unsigned short int d_reclen; - char d_name[1]; + char d_name[1]; /* Actually longer. */ }; + +#include + +/* We calculate the length of the name by taking the length of the whole + `struct direct' record, subtracting the size of everything before the + name, and subtracting one for the terminating null. */ + +#define D_NAMLEN(d) \ + ((d)->d_reclen - offsetof (struct direct, d_name) - 1) From d8bcf7d3b4fc3c2514275e366c8d55ce1a7c3c59 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 21 May 1993 17:49:19 +0000 Subject: [PATCH 0212/4487] entered into RCS --- sysdeps/unix/bsd/sequent/i386/sigvec.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/bsd/sequent/i386/sigvec.S b/sysdeps/unix/bsd/sequent/i386/sigvec.S index 9a9a13e079..a5812c7fee 100644 --- a/sysdeps/unix/bsd/sequent/i386/sigvec.S +++ b/sysdeps/unix/bsd/sequent/i386/sigvec.S @@ -36,8 +36,8 @@ ENTRY (__sigvec) pushl 16(%esp) /* Push third arg: our third arg. */ pushl 16(%esp) /* Push second arg: our second arg. */ pushl 16(%esp) /* Push first arg: our first arg. */ - ARGS_4 /* Point the syscall at the arguments. */ + mov %esp, %ecx /* Point the syscall at the arguments. */ + addl $16, %esp /* Pop those four args. */ DO_CALL (sigvec, 4) /* Do the system call. */ - addl %esp, $16 /* Pop those four args. */ jb syscall_error /* Check for error. */ ret From d5d34291df29ed133f9225b20b1a325b434f6e44 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 21 May 1993 18:24:40 +0000 Subject: [PATCH 0213/4487] Formerly unix/sysv/sco3.2.4/__waitpid.S.~2~ --- sysdeps/unix/sysv/sco3.2.4/waitpid.S | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/sco3.2.4/waitpid.S b/sysdeps/unix/sysv/sco3.2.4/waitpid.S index 73e0888f0f..be6c19b03e 100644 --- a/sysdeps/unix/sysv/sco3.2.4/waitpid.S +++ b/sysdeps/unix/sysv/sco3.2.4/waitpid.S @@ -18,5 +18,17 @@ Cambridge, MA 02139, USA. */ #include -SYSCALL__ (waitpid, 3) - ret +ENTRY (__waitpid) + /* The `waitpid' system call is distinguished from plain + `wait' by setting lots of bits in the processor flags. */ + pushfl /* Push the flags word. */ + popl %eax /* Pop it into the accumulator. */ + orl $0x8c4, %eax /* Set lots of bits. */ + pushl $eax /* Push the new flags word. */ + popfl /* Pop it into the flags. */ + DO_CALL (wait, 2) + movl 4(%esp), scratch /* Put status pointer in scratch register. */ + testl scratch, scratch /* Is it non-nil? */ + je null + movl r1, (scratch) /* Yes; store the status there. */ +null: ret From 81e622106b9e117e88beffc7a3a84f4669d2e020 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 21 May 1993 18:26:08 +0000 Subject: [PATCH 0214/4487] Initial revision --- sysdeps/unix/sysv/sco3.2.4/Dist | 1 + sysdeps/unix/sysv/sco3.2.4/Makefile | 3 + sysdeps/unix/sysv/sco3.2.4/getpgid.c | 29 ++++++++ sysdeps/unix/sysv/sco3.2.4/setpgid.c | 30 ++++++++ sysdeps/unix/sysv/sco3.2.4/setsid.c | 31 ++++++++ sysdeps/unix/sysv/sco3.2.4/syscall.h | 104 +++++++++++++++++++++++++++ sysdeps/unix/sysv/sysv4/getpgid.c | 31 ++++++++ sysdeps/unix/sysv/sysv4/setpgid.c | 32 +++++++++ sysdeps/unix/sysv/sysv4/setsid.c | 32 +++++++++ 9 files changed, 293 insertions(+) create mode 100644 sysdeps/unix/sysv/sco3.2.4/Dist create mode 100644 sysdeps/unix/sysv/sco3.2.4/Makefile create mode 100644 sysdeps/unix/sysv/sco3.2.4/getpgid.c create mode 100644 sysdeps/unix/sysv/sco3.2.4/setpgid.c create mode 100644 sysdeps/unix/sysv/sco3.2.4/setsid.c create mode 100644 sysdeps/unix/sysv/sco3.2.4/syscall.h create mode 100644 sysdeps/unix/sysv/sysv4/getpgid.c create mode 100644 sysdeps/unix/sysv/sysv4/setpgid.c create mode 100644 sysdeps/unix/sysv/sysv4/setsid.c diff --git a/sysdeps/unix/sysv/sco3.2.4/Dist b/sysdeps/unix/sysv/sco3.2.4/Dist new file mode 100644 index 0000000000..9702380e2f --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/Dist @@ -0,0 +1 @@ +sco_setpgrp.S diff --git a/sysdeps/unix/sysv/sco3.2.4/Makefile b/sysdeps/unix/sysv/sco3.2.4/Makefile new file mode 100644 index 0000000000..3c68c72994 --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/Makefile @@ -0,0 +1,3 @@ +ifeq (posix,$(subdir)) +sysdep_routines := $(sysdep_routines) sco_pgrp.c +endif diff --git a/sysdeps/unix/sysv/sco3.2.4/getpgid.c b/sysdeps/unix/sysv/sco3.2.4/getpgid.c new file mode 100644 index 0000000000..32aa93cc61 --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/getpgid.c @@ -0,0 +1,29 @@ +/* Copyright (C) 1993 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include + +/* Get the process group ID of process PID. */ +int +DEFUN(__getpgrp, (pid), pid_t pid) +{ + return __sco_setpgrp (0, pid); +} diff --git a/sysdeps/unix/sysv/sco3.2.4/setpgid.c b/sysdeps/unix/sysv/sco3.2.4/setpgid.c new file mode 100644 index 0000000000..f3e5091d32 --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/setpgid.c @@ -0,0 +1,30 @@ +/* Copyright (C) 1993 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include + +/* Set the process group ID of the process matching PID to PGID. + If PID is zero, the current process's process group ID is set. + If PGID is zero, the process ID of the process is used. */ +int +DEFUN(__setpgrp, (pid, pgid), int pid AND int pgid) +{ + return __sco_setpgrp (1, pid, pgid); +} diff --git a/sysdeps/unix/sysv/sco3.2.4/setsid.c b/sysdeps/unix/sysv/sco3.2.4/setsid.c new file mode 100644 index 0000000000..4486482024 --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/setsid.c @@ -0,0 +1,31 @@ +/* Copyright (C) 1993 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include + + +/* Create a new session with the calling process as its leader. + The process group IDs of the session and the calling process + are set to the process ID of the calling process, which is returned. */ +int +DEFUN_VOID(__setsid) +{ + return __sco_setpgrp (3); +} diff --git a/sysdeps/unix/sysv/sco3.2.4/syscall.h b/sysdeps/unix/sysv/sco3.2.4/syscall.h new file mode 100644 index 0000000000..900a0a6525 --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/syscall.h @@ -0,0 +1,104 @@ +/* From Scott Bartram. */ + +#ifndef _SYSCALL_H +#define _SYSCALL_H + +#define SYS_access 33 +#define SYS_acct 51 +#define SYS_advfs 70 +#define SYS_alarm 27 +#define SYS_break 17 +#define SYS_brk 17 +#define SYS_chdir 12 +#define SYS_chmod 15 +#define SYS_chown 16 +#define SYS_chroot 61 +#define SYS_chsize 0x0a28 +#define SYS_close 6 +#define SYS_creat 8 +#define SYS_dup 41 +#define SYS_exec 11 +#define SYS_exece 59 +#define SYS_exit 1 +#define SYS_fcntl 62 +#define SYS_fork 2 +#define SYS_fpathconf 0x2f28 +#define SYS_fstat 28 +#define SYS_fstatfs 38 +#define SYS_ftime 0x0b28 +#define SYS_getdents 81 +#define SYS_getgid 47 +#define SYS_getgroups 0x2b28 +#define SYS_getmsg 85 +#define SYS_getpid 20 +#define SYS_getuid 24 +#define SYS_gtty 32 +#define SYS_ioctl 54 +#define SYS_kill 37 +#define SYS_link 9 +#define SYS_lock 45 +#define SYS_lseek 19 +#define SYS_lstat 91 +#define SYS_mkdir 80 +#define SYS_mknod 14 +#define SYS_mount 21 +#define SYS_msgsys 49 +#define SYS_nap 0x0c28 +#define SYS_nice 34 +#define SYS_open 5 +#define SYS_pathconf 0x2e28 +#define SYS_pause 29 +#define SYS_pipe 42 +#define SYS_plock 45 +#define SYS_poll 87 +#define SYS_prof 44 +#define SYS_ptrace 26 +#define SYS_putmsg 86 +#define SYS_rdebug 76 +#define SYS_read 3 +#define SYS_readlink 92 +#define SYS_rename 0x3028 +#define SYS_rfstart 74 +#define SYS_rfstop 77 +#define SYS_rfsys 78 +#define SYS_rmdir 79 +#define SYS_rmount 72 +#define SYS_rumount 73 +#define SYS_seek 19 +#define SYS_select 0x2428 +#define SYS_semsys 53 +#define SYS_setgid 46 +#define SYS_setgroups 0x2c28 +#define SYS_setpgrp 39 +#define SYS_setuid 23 +#define SYS_shmsys 52 +#define SYS_sigaction 0x2728 +#define SYS_signal 48 +#define SYS_sigpending 0x2928 +#define SYS_sigprocmask 0x2828 +#define SYS_sigsuspend 0x2a28 +#define SYS_stat 18 +#define SYS_statfs 35 +#define SYS_stime 25 +#define SYS_stty 31 +#define SYS_symlink 90 +#define SYS_sync 36 +#define SYS_sys3b 50 +#define SYS_sysacct 51 +#define SYS_sysconf 0x2d28 +#define SYS_sysfs 84 +#define SYS_sysi86 50 +#define SYS_time 13 +#define SYS_times 43 +#define SYS_uadmin 55 +#define SYS_ulimit 63 +#define SYS_umask 60 +#define SYS_umount 22 +#define SYS_unadvfs 71 +#define SYS_unlink 10 +#define SYS_utime 30 +#define SYS_utssys 57 +#define SYS_wait 7 +#define SYS_write 4 + +#endif diff --git a/sysdeps/unix/sysv/sysv4/getpgid.c b/sysdeps/unix/sysv/sysv4/getpgid.c new file mode 100644 index 0000000000..f667278a04 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/getpgid.c @@ -0,0 +1,31 @@ +/* Copyright (C) 1993 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include + +extern int __sco_pgrp __P ((int type, ...)); + +/* Get the process group ID of process PID. */ +int +DEFUN(__getpgrp, (pid), pid_t pid) +{ + return __sco_pgrp (0, pid); +} diff --git a/sysdeps/unix/sysv/sysv4/setpgid.c b/sysdeps/unix/sysv/sysv4/setpgid.c new file mode 100644 index 0000000000..b9266a4b9a --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/setpgid.c @@ -0,0 +1,32 @@ +/* Copyright (C) 1993 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include + +extern int __sco_pgrp __P ((int type, ...)); + +/* Set the process group ID of the process matching PID to PGID. + If PID is zero, the current process's process group ID is set. + If PGID is zero, the process ID of the process is used. */ +int +DEFUN(__setpgrp, (pid, pgid), int pid AND int pgid) +{ + return __sco_pgrp (1, pid, pgid); +} diff --git a/sysdeps/unix/sysv/sysv4/setsid.c b/sysdeps/unix/sysv/sysv4/setsid.c new file mode 100644 index 0000000000..4d3c52875a --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/setsid.c @@ -0,0 +1,32 @@ +/* Copyright (C) 1993 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include + +extern int __sco_pgrp __P ((int type, ...)); + +/* Create a new session with the calling process as its leader. + The process group IDs of the session and the calling process + are set to the process ID of the calling process, which is returned. */ +int +DEFUN_VOID(__setsid) +{ + return __sco_pgrp (3); +} From 3f195e5009ae20adfc73a46ab1a88dd66fca8421 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 24 May 1993 21:28:29 +0000 Subject: [PATCH 0215/4487] Formerly sysdeps/unix/sysv/sysv4/Dist.~5~ --- sysdeps/unix/sysv/sysv4/Dist | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/sysv4/Dist b/sysdeps/unix/sysv/sysv4/Dist index 07d852f382..8e83c60a13 100644 --- a/sysdeps/unix/sysv/sysv4/Dist +++ b/sysdeps/unix/sysv/sysv4/Dist @@ -1 +1,2 @@ sysconfig.h +sysconfig.S From ebdce729548d93fe9091e3b5a028e735c5cfa5a6 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 26 May 1993 19:14:11 +0000 Subject: [PATCH 0216/4487] Formerly unix/sysv/sco3.2.4/Makefile.~2~ --- sysdeps/unix/sysv/sco3.2.4/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/sco3.2.4/Makefile b/sysdeps/unix/sysv/sco3.2.4/Makefile index 3c68c72994..61479b3938 100644 --- a/sysdeps/unix/sysv/sco3.2.4/Makefile +++ b/sysdeps/unix/sysv/sco3.2.4/Makefile @@ -1,3 +1,3 @@ ifeq (posix,$(subdir)) -sysdep_routines := $(sysdep_routines) sco_pgrp.c +sysdep_routines := $(sysdep_routines) sco_pgrp endif From 0ac74824f4a4044e33c4ab9658391ee281b065d0 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 3 Jun 1993 20:58:07 +0000 Subject: [PATCH 0217/4487] entered into RCS --- sysdeps/m68k/bytesex.h | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sysdeps/m68k/bytesex.h diff --git a/sysdeps/m68k/bytesex.h b/sysdeps/m68k/bytesex.h new file mode 100644 index 0000000000..6f985293f2 --- /dev/null +++ b/sysdeps/m68k/bytesex.h @@ -0,0 +1,3 @@ +/* m68k is big-endian. */ + +#define __BYTE_ORDER __BIG_ENDIAN From a5b98146522a245a9c12a1c39ba54c4d20011ee7 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 8 Jun 1993 01:07:28 +0000 Subject: [PATCH 0218/4487] Formerly unix/bsd/hp/m68k/sysdep.h.~25~ --- sysdeps/unix/bsd/hp/m68k/sysdep.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/sysdeps/unix/bsd/hp/m68k/sysdep.h b/sysdeps/unix/bsd/hp/m68k/sysdep.h index c5bee6af56..a18ca0c0c2 100644 --- a/sysdeps/unix/bsd/hp/m68k/sysdep.h +++ b/sysdeps/unix/bsd/hp/m68k/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -34,21 +34,20 @@ Cambridge, MA 02139, USA. */ _/**/name/**/: #endif -#ifdef __STDC__ #define PSEUDO(name, syscall_name, args) \ .even; \ .globl syscall_error; \ error: jmp syscall_error; \ ENTRY (name) \ + DO_CALL (syscall_name, args) + +#ifdef __STDC__ +#define DO_CALL(syscall_name, args) \ movel POUND(SYS_##syscall_name), d0; \ trap POUND(0); \ bcs error #else -#define PSEUDO(name, syscall_name, args) \ - .even; \ - .globl syscall_error; \ - error: jmp syscall_error; \ - ENTRY (name) \ +#define DO_CALL(syscall_name, args) \ movel POUND(SYS_/**/syscall_name), d0; \ trap POUND(0); \ bcs error From bccfaf677d5156cf30b4ade85818ce46e9d74828 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 8 Jun 1993 01:08:51 +0000 Subject: [PATCH 0219/4487] Formerly unix/bsd/sony/newsos/m68k/sysdep.h.~3~ --- sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h b/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h index d67a08969a..e045e01795 100644 --- a/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h +++ b/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h @@ -34,31 +34,27 @@ Cambridge, MA 02139, USA. */ _/**/name/**/: #endif -/* NewsOS 4 wants a stack frame around syscalls. */ - -#ifdef __STDC__ #define PSEUDO(name, syscall_name, args) \ .even; \ .globl syscall_error; \ error: jmp syscall_error; \ ENTRY (name) \ + DO_CALL (syscall_name, args) + +#ifdef __STDC__ +#define DO_CALL(syscall_name, args) \ linkw fp, POUND(0); \ movel POUND(SYS_##syscall_name), d0; \ trap POUND(0); \ - bcs error; \ - unlk fp - + unlk fp; \ + bcs error #else -#define PSEUDO(name, syscall_name, args) \ - .even; \ - .globl syscall_error; \ - error: jmp syscall_error; \ - ENTRY (name) \ +#define DO_CALL(syscall_name, args) \ linkw fp, POUND(0); \ movel POUND(SYS_/**/syscall_name), d0; \ trap POUND(0); \ - bcs error; \ - unlk fp + unlk fp; \ + bcs error #endif #define ret rts From 35683656e691069a3f0ece015cee509454d5320f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 8 Jun 1993 01:18:40 +0000 Subject: [PATCH 0220/4487] Formerly unix/bsd/hp/m68k/__brk.S.~5~ --- sysdeps/unix/bsd/hp/m68k/brk.S | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/sysdeps/unix/bsd/hp/m68k/brk.S b/sysdeps/unix/bsd/hp/m68k/brk.S index 6de00b149b..fed4f8032d 100644 --- a/sysdeps/unix/bsd/hp/m68k/brk.S +++ b/sysdeps/unix/bsd/hp/m68k/brk.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1993 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,11 +37,8 @@ ENTRY (__brk) cmpl sp@(4), d0 ble 0f movel d0, sp@(4) -0: movel POUND(SYS_brk), d0 - trap POUND(0) - bcs 1f +0: DO_CALL (brk, 1) movel sp@(4), ___curbrk clrl d0 rts -1: - jmp syscall_error +error: jmp syscall_error From 53df7cde345ac13e20a353fb455246d25d791010 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 11 Jun 1993 00:34:05 +0000 Subject: [PATCH 0221/4487] Formerly m68k/Makefile.~7~ --- sysdeps/m68k/Makefile | 48 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile index 886744365c..637bca3b62 100644 --- a/sysdeps/m68k/Makefile +++ b/sysdeps/m68k/Makefile @@ -1,11 +1,55 @@ +# Copyright (C) 1993 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 Library General Public License +# as published by the Free Software Foundation; either version 2 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 +# Library General Public License for more details. + +# You should have received a copy of the GNU Library General Public +# License along with the GNU C Library; see the file COPYING.LIB. If +# not, write to the Free Software Foundation, Inc., 675 Mass Ave, +# Cambridge, MA 02139, USA. + # This uses MIT assembler syntax. We have no convenient # way to choose a sysdep file based on MIT vs Motorola syntax. # No existing m68k ports use Motorola syntax. crypt := crypt.sun3 # Use crypt/crypt.sun3.S. - + # Disgusting magic to get `#'s into the asm code. + +# Set `as-pipe-ok' if piping input to the assembler is likely to work. +ifneq (,$(filter -pipe,$(compile.c) $(compile.S))) +# The `-pipe' switch the compiler does it, so it must work. +as-pipe-ok = yes +endif +ifdef gnu-as +# GNU as can deal with input pipes. +as-pipe-ok = yes +endif + +ifdef as-pipe-ok + define compile-command.S -$(CC) $(CPPFLAGS) -E $< \ +$(CC) $(CPPFLAGS) $(asm-CPPFLAGS) -E $< \ | sed 's/(@@@Hash-Here@@@)/#/g' | $(AS) $(ASFLAGS) -o $@ endef + +else + +define compile-command.S +@-rm -f $@s +$(CC) $(CPPFLAGS) $(asm-CPPFLAGS) -E $< \ +| sed 's/(@@@Hash-Here@@@)/#/g' > $@s +$(AS) $(ASFLAGS) $@s -o $@ +-rm -f $@ +endef + +endif + From 4b36947a4751caa3b6bda7506db722e13b69227d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 11 Jun 1993 19:39:34 +0000 Subject: [PATCH 0222/4487] Formerly m68k/Makefile.~8~ --- sysdeps/m68k/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile index 637bca3b62..188102dbf8 100644 --- a/sysdeps/m68k/Makefile +++ b/sysdeps/m68k/Makefile @@ -48,7 +48,7 @@ define compile-command.S $(CC) $(CPPFLAGS) $(asm-CPPFLAGS) -E $< \ | sed 's/(@@@Hash-Here@@@)/#/g' > $@s $(AS) $(ASFLAGS) $@s -o $@ --rm -f $@ +-rm -f $@s endef endif From 2d8c1da501d40180b7d1be11e55d722cd2d1b9f4 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 11 Jun 1993 19:44:48 +0000 Subject: [PATCH 0223/4487] Formerly unix/bsd/m68k/__pipe.S.~2~ --- sysdeps/unix/bsd/m68k/pipe.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/bsd/m68k/pipe.S b/sysdeps/unix/bsd/m68k/pipe.S index 26ca4cb4ee..4dcf93148e 100644 --- a/sysdeps/unix/bsd/m68k/pipe.S +++ b/sysdeps/unix/bsd/m68k/pipe.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -19,7 +19,7 @@ Cambridge, MA 02139, USA. */ #include SYSCALL__ (pipe, 1) - moveal sp@(4), a0 + movel sp@(4), a0 moveml d0-d1, a0@ clrl d0 rts From 0f9a34c5eebf14e459b06c87af0f71e7b8489822 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 21 Jun 1993 23:36:26 +0000 Subject: [PATCH 0224/4487] Formerly unix/sysv/sco3.2.4/__sysconf.S.~2~ --- sysdeps/unix/sysv/sco3.2.4/sysconf.S | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/sco3.2.4/sysconf.S b/sysdeps/unix/sysv/sco3.2.4/sysconf.S index bb78d5df66..2ec8c9d139 100644 --- a/sysdeps/unix/sysv/sco3.2.4/sysconf.S +++ b/sysdeps/unix/sysv/sco3.2.4/sysconf.S @@ -17,6 +17,20 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include +#include +#include -SYSCALL__ (sysconf, 1) +.globl __tzname_max +ENTRY (sysconf) + cmpl 4(%esp), $_SC_TZNAME_MAX /* Is the arg _SC_TZNAME_MAX? */ + je tzname + DO_CALL (sysconf, 1) /* No; use the SCO system call. */ + ret +tzname: movl (C_SYMBOL_NAME(__tzname_max)), %eax /* Yes; use __tzname_max. */ +#ifdef TZNAME_MAX + cmpl $TZNAME_MAX, %eax /* Is TZNAME_MAX larger? */ + jle out + movl $TZNAME_MAX, %eax /* Yes; return it. */ +out: +#endif ret From 0d93c21cf1c70013be1c397fe34e173bf9005c20 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 21 Jun 1993 23:36:34 +0000 Subject: [PATCH 0225/4487] entered into RCS --- sysdeps/unix/sysv/sco3.2.4/confname.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/sco3.2.4/confname.h b/sysdeps/unix/sysv/sco3.2.4/confname.h index cfa3e07127..0408951863 100644 --- a/sysdeps/unix/sysv/sco3.2.4/confname.h +++ b/sysdeps/unix/sysv/sco3.2.4/confname.h @@ -39,6 +39,7 @@ Cambridge, MA 02139, USA. */ #define _SC_VERSION 7 #define _SC_PASS_MAX 8 #define _SC_XOPEN_VERSION 9 +#define _SC_TZNAME_MAX 666 /* Not handled by SCO's system call. */ #ifdef __USE_POSIX2 /* Values for the NAME argument to `confstr'. */ From aca28d6c2711d73bcc51e3d0bf4099b7c366a870 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 21 Jun 1993 23:47:08 +0000 Subject: [PATCH 0226/4487] Formerly sysdeps/unix/sysv/sysv4/__sysconf.c.~3~ --- sysdeps/unix/sysv/sysv4/sysconf.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/sysv4/sysconf.c b/sysdeps/unix/sysv/sysv4/sysconf.c index 3e4e82c1eb..0093e20bad 100644 --- a/sysdeps/unix/sysv/sysv4/sysconf.c +++ b/sysdeps/unix/sysv/sysv4/sysconf.c @@ -66,7 +66,11 @@ DEFUN(__sysconf, (name), int name) return __sysconfig (_CONFIG_OPEN_FILES); case _SC_TZNAME_MAX: - return __tzname_max (); +#ifdef TZNAME_MAX + return __tzname_max > TZNAME_MAX ? __tzname_max : TZNAME_MAX; +#else + return __tzname_max; +#endif case _SC_JOB_CONTROL: #ifdef _POSIX_JOB_CONTROL From de4f369b94c078e60f44716f51708f7b84e2f7b6 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 22 Jun 1993 06:48:36 +0000 Subject: [PATCH 0227/4487] Formerly unix/sysv/sysv4/__setpgrp.c.~2~ --- sysdeps/unix/sysv/sysv4/setpgid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/sysv4/setpgid.c b/sysdeps/unix/sysv/sysv4/setpgid.c index b9266a4b9a..4237a0b3c3 100644 --- a/sysdeps/unix/sysv/sysv4/setpgid.c +++ b/sysdeps/unix/sysv/sysv4/setpgid.c @@ -20,7 +20,7 @@ Cambridge, MA 02139, USA. */ #include #include -extern int __sco_pgrp __P ((int type, ...)); +extern int __pgrpsys __P ((int type, ...)); /* Set the process group ID of the process matching PID to PGID. If PID is zero, the current process's process group ID is set. @@ -28,5 +28,5 @@ extern int __sco_pgrp __P ((int type, ...)); int DEFUN(__setpgrp, (pid, pgid), int pid AND int pgid) { - return __sco_pgrp (1, pid, pgid); + return __pgrpsys (5, pid, pgid); } From b5aa2dfab2a0154cd14b1b31b8d382f16780b615 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 22 Jun 1993 06:49:00 +0000 Subject: [PATCH 0228/4487] Formerly unix/sysv/sysv4/__getpgrp.c.~2~ --- sysdeps/unix/sysv/sysv4/getpgid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/sysv4/getpgid.c b/sysdeps/unix/sysv/sysv4/getpgid.c index f667278a04..fad49702a0 100644 --- a/sysdeps/unix/sysv/sysv4/getpgid.c +++ b/sysdeps/unix/sysv/sysv4/getpgid.c @@ -21,11 +21,11 @@ Cambridge, MA 02139, USA. */ #include #include -extern int __sco_pgrp __P ((int type, ...)); +extern int __pgrpsys __P ((int type, ...)); /* Get the process group ID of process PID. */ int DEFUN(__getpgrp, (pid), pid_t pid) { - return __sco_pgrp (0, pid); + return __pgrpsys (4, pid); } From 2c7e2a2f923369b8e1e0c8b7c953ec5631e15d89 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 22 Jun 1993 06:54:40 +0000 Subject: [PATCH 0229/4487] entered into RCS --- sysdeps/unix/bsd/sun/sunos4/setsid.S | 1 + sysdeps/unix/bsd/ultrix4/setsid.S | 1 + sysdeps/unix/sysv/sco3.2.4/getpgid.c | 30 +------------------------- sysdeps/unix/sysv/sco3.2.4/setpgid.c | 31 +-------------------------- sysdeps/unix/sysv/sco3.2.4/setsid.c | 32 +--------------------------- sysdeps/unix/sysv/sysv4/setsid.c | 4 ++-- 6 files changed, 7 insertions(+), 92 deletions(-) create mode 100644 sysdeps/unix/bsd/sun/sunos4/setsid.S create mode 100644 sysdeps/unix/bsd/ultrix4/setsid.S diff --git a/sysdeps/unix/bsd/sun/sunos4/setsid.S b/sysdeps/unix/bsd/sun/sunos4/setsid.S new file mode 100644 index 0000000000..e0f94b0868 --- /dev/null +++ b/sysdeps/unix/bsd/sun/sunos4/setsid.S @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/bsd/ultrix4/setsid.S b/sysdeps/unix/bsd/ultrix4/setsid.S new file mode 100644 index 0000000000..e0f94b0868 --- /dev/null +++ b/sysdeps/unix/bsd/ultrix4/setsid.S @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/sco3.2.4/getpgid.c b/sysdeps/unix/sysv/sco3.2.4/getpgid.c index 32aa93cc61..6829b74312 100644 --- a/sysdeps/unix/sysv/sco3.2.4/getpgid.c +++ b/sysdeps/unix/sysv/sco3.2.4/getpgid.c @@ -1,29 +1 @@ -/* Copyright (C) 1993 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include -#include -#include - -/* Get the process group ID of process PID. */ -int -DEFUN(__getpgrp, (pid), pid_t pid) -{ - return __sco_setpgrp (0, pid); -} +#include diff --git a/sysdeps/unix/sysv/sco3.2.4/setpgid.c b/sysdeps/unix/sysv/sco3.2.4/setpgid.c index f3e5091d32..928e6d0120 100644 --- a/sysdeps/unix/sysv/sco3.2.4/setpgid.c +++ b/sysdeps/unix/sysv/sco3.2.4/setpgid.c @@ -1,30 +1 @@ -/* Copyright (C) 1993 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include -#include - -/* Set the process group ID of the process matching PID to PGID. - If PID is zero, the current process's process group ID is set. - If PGID is zero, the process ID of the process is used. */ -int -DEFUN(__setpgrp, (pid, pgid), int pid AND int pgid) -{ - return __sco_setpgrp (1, pid, pgid); -} +#include diff --git a/sysdeps/unix/sysv/sco3.2.4/setsid.c b/sysdeps/unix/sysv/sco3.2.4/setsid.c index 4486482024..4a0a706aa5 100644 --- a/sysdeps/unix/sysv/sco3.2.4/setsid.c +++ b/sysdeps/unix/sysv/sco3.2.4/setsid.c @@ -1,31 +1 @@ -/* Copyright (C) 1993 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include -#include - - -/* Create a new session with the calling process as its leader. - The process group IDs of the session and the calling process - are set to the process ID of the calling process, which is returned. */ -int -DEFUN_VOID(__setsid) -{ - return __sco_setpgrp (3); -} +#include diff --git a/sysdeps/unix/sysv/sysv4/setsid.c b/sysdeps/unix/sysv/sysv4/setsid.c index 4d3c52875a..a32b39ad3b 100644 --- a/sysdeps/unix/sysv/sysv4/setsid.c +++ b/sysdeps/unix/sysv/sysv4/setsid.c @@ -20,7 +20,7 @@ Cambridge, MA 02139, USA. */ #include #include -extern int __sco_pgrp __P ((int type, ...)); +extern int __pgrpsys __P ((int type, ...)); /* Create a new session with the calling process as its leader. The process group IDs of the session and the calling process @@ -28,5 +28,5 @@ extern int __sco_pgrp __P ((int type, ...)); int DEFUN_VOID(__setsid) { - return __sco_pgrp (3); + return __pgrpsys (3); } From 0182725d9f65e529d2d74ecea6547a8e2b0d9d18 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 22 Jun 1993 06:55:21 +0000 Subject: [PATCH 0230/4487] Formerly sysdeps/unix/sysv/sysv4/Dist.~6~ --- sysdeps/unix/sysv/sysv4/Dist | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/sysv4/Dist b/sysdeps/unix/sysv/sysv4/Dist index 8e83c60a13..ea0507ca8a 100644 --- a/sysdeps/unix/sysv/sysv4/Dist +++ b/sysdeps/unix/sysv/sysv4/Dist @@ -1,2 +1,3 @@ sysconfig.h sysconfig.S +pgrpsys.S From e699d9222b95f4d9cc6ba27e934424b0929abbd6 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 22 Jun 1993 06:55:24 +0000 Subject: [PATCH 0231/4487] Formerly unix/sysv/sco3.2.4/Makefile.~3~ --- sysdeps/unix/sysv/sco3.2.4/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/sco3.2.4/Makefile b/sysdeps/unix/sysv/sco3.2.4/Makefile index 61479b3938..deea4b1be3 100644 --- a/sysdeps/unix/sysv/sco3.2.4/Makefile +++ b/sysdeps/unix/sysv/sco3.2.4/Makefile @@ -1,3 +1,3 @@ ifeq (posix,$(subdir)) -sysdep_routines := $(sysdep_routines) sco_pgrp +sysdep_routines := $(sysdep_routines) pgrpsys endif From 3a7ab9ef98e4be140920706a2a8c6260b49fb7fb Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 22 Jun 1993 06:55:33 +0000 Subject: [PATCH 0232/4487] Initial revision --- sysdeps/unix/sysv/sysv4/pgrpsys.S | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/pgrpsys.S diff --git a/sysdeps/unix/sysv/sysv4/pgrpsys.S b/sysdeps/unix/sysv/sysv4/pgrpsys.S new file mode 100644 index 0000000000..c09be0355b --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/pgrpsys.S @@ -0,0 +1,22 @@ +/* Copyright (C) 1993 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +SYSCALL__ (pgrpsys) + ret From da6409f9019a2bbcf686b00a2a2eb9c69e14f87d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 23 Jun 1993 19:10:39 +0000 Subject: [PATCH 0233/4487] entered into RCS --- sysdeps/unix/sysv/sco3.2.4/pgrpsys.S | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/sco3.2.4/pgrpsys.S diff --git a/sysdeps/unix/sysv/sco3.2.4/pgrpsys.S b/sysdeps/unix/sysv/sco3.2.4/pgrpsys.S new file mode 100644 index 0000000000..2c7d994c28 --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/pgrpsys.S @@ -0,0 +1 @@ +#include From b01b507ffe7c6153eaa1b778e9d7e53fe9bda2da Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 23 Jun 1993 19:10:48 +0000 Subject: [PATCH 0234/4487] Formerly unix/sysv/sco3.2.4/Dist.~2~ --- sysdeps/unix/sysv/sco3.2.4/Dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/sco3.2.4/Dist b/sysdeps/unix/sysv/sco3.2.4/Dist index 9702380e2f..1dfa95db8d 100644 --- a/sysdeps/unix/sysv/sco3.2.4/Dist +++ b/sysdeps/unix/sysv/sco3.2.4/Dist @@ -1 +1 @@ -sco_setpgrp.S +pgrpsys.S From be829b7ca173c902cdd3f2365aa854ca95d891be Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 25 Jun 1993 21:00:23 +0000 Subject: [PATCH 0235/4487] Formerly unix/sysv/sco3.2.4/__sysconf.S.~3~ --- sysdeps/unix/sysv/sco3.2.4/sysconf.S | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/sysdeps/unix/sysv/sco3.2.4/sysconf.S b/sysdeps/unix/sysv/sco3.2.4/sysconf.S index 2ec8c9d139..10699a28ed 100644 --- a/sysdeps/unix/sysv/sco3.2.4/sysconf.S +++ b/sysdeps/unix/sysv/sco3.2.4/sysconf.S @@ -21,16 +21,9 @@ Cambridge, MA 02139, USA. */ #include .globl __tzname_max -ENTRY (sysconf) +ENTRY (__sysconf) cmpl 4(%esp), $_SC_TZNAME_MAX /* Is the arg _SC_TZNAME_MAX? */ je tzname DO_CALL (sysconf, 1) /* No; use the SCO system call. */ ret -tzname: movl (C_SYMBOL_NAME(__tzname_max)), %eax /* Yes; use __tzname_max. */ -#ifdef TZNAME_MAX - cmpl $TZNAME_MAX, %eax /* Is TZNAME_MAX larger? */ - jle out - movl $TZNAME_MAX, %eax /* Yes; return it. */ -out: -#endif - ret +tzname: jmp C_SYMBOL_NAME(__tzname_max) /* Yes; bounce to __tzname_max (). */ From dffe32033e634d073b311aec033b010933978505 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 28 Jun 1993 03:56:04 +0000 Subject: [PATCH 0236/4487] Formerly unix/bsd/m68k/sysdep.S.~2~ --- sysdeps/unix/bsd/m68k/sysdep.S | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/bsd/m68k/sysdep.S b/sysdeps/unix/bsd/m68k/sysdep.S index 764bc4beb8..a6b3c99557 100644 --- a/sysdeps/unix/bsd/m68k/sysdep.S +++ b/sysdeps/unix/bsd/m68k/sysdep.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -18,6 +18,11 @@ Cambridge, MA 02139, USA. */ .globl syscall_error syscall_error: +#ifdef __motorola__ + move.l d0, _errno + moveq.l #-1, d0 +#else movel d0, _errno moveq #-1, d0 +#endif rts From e982f6380c40880b73c9bacb2916f70b09155ca7 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 28 Jun 1993 03:56:39 +0000 Subject: [PATCH 0237/4487] entered into RCS --- sysdeps/m68k/__longjmp.c | 10 +++++++--- sysdeps/unix/bsd/m68k/pipe.S | 5 +++++ sysdeps/unix/bsd/m68k/wait.S | 9 ++++++++- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/sysdeps/m68k/__longjmp.c b/sysdeps/m68k/__longjmp.c index cff37bcf9e..3133e70bb3 100644 --- a/sysdeps/m68k/__longjmp.c +++ b/sysdeps/m68k/__longjmp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -47,8 +47,12 @@ DEFUN(__longjmp, (env, val), CONST jmp_buf env AND int val) asm volatile(/* Restore the data and address registers. */ "movem%.l %0, d1-d7/a0-a7\n" /* Return to setjmp's caller. */ - "jmp a0@" : - /* No outputs. */ : "g" (env[0].__dregs[0]) +#ifdef __motorola__ + "jmp (a0)" +#else + "jmp a0@" +#endif + : /* No outputs. */ : "g" (env[0].__dregs[0]) /* We don't bother with the clobbers, because this code always jumps out anyway. */ ); diff --git a/sysdeps/unix/bsd/m68k/pipe.S b/sysdeps/unix/bsd/m68k/pipe.S index 4dcf93148e..547b4f351b 100644 --- a/sysdeps/unix/bsd/m68k/pipe.S +++ b/sysdeps/unix/bsd/m68k/pipe.S @@ -19,7 +19,12 @@ Cambridge, MA 02139, USA. */ #include SYSCALL__ (pipe, 1) +#ifdef __motorola__ + move.l 4(sp), a0 + movem.l d0-d1, (a0) +#else movel sp@(4), a0 moveml d0-d1, a0@ +#endif clrl d0 rts diff --git a/sysdeps/unix/bsd/m68k/wait.S b/sysdeps/unix/bsd/m68k/wait.S index 2d4b1b6f07..927fa338b0 100644 --- a/sysdeps/unix/bsd/m68k/wait.S +++ b/sysdeps/unix/bsd/m68k/wait.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -19,8 +19,15 @@ Cambridge, MA 02139, USA. */ #include SYSCALL__ (wait, 1) +#ifdef __motorola__ + tst.l 4(sp) + beq 1f + movea.l 4(sp), a0 + move.l d1, (a0) +#else tstl sp@(4) beq 1f moveal sp@(4), a0 movel d1, a0@ +#endif 1: rts From aefa27d4fba9224cd41c18b9ee5fe1e2ca577a9a Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 30 Jun 1993 18:41:54 +0000 Subject: [PATCH 0238/4487] entered into RCS --- sysdeps/unix/sysv/sysv4/pgrpsys.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/sysv4/pgrpsys.S b/sysdeps/unix/sysv/sysv4/pgrpsys.S index c09be0355b..dcfb487e54 100644 --- a/sysdeps/unix/sysv/sysv4/pgrpsys.S +++ b/sysdeps/unix/sysv/sysv4/pgrpsys.S @@ -18,5 +18,5 @@ Cambridge, MA 02139, USA. */ #include -SYSCALL__ (pgrpsys) +SYSCALL__ (pgrpsys, 3) ret From 6063f734e701b8e127c60b28f0ba5a69433fea66 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 22 Jul 1993 19:20:16 +0000 Subject: [PATCH 0239/4487] Formerly alpha/strchr.c.~2~ --- sysdeps/alpha/strchr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/alpha/strchr.c b/sysdeps/alpha/strchr.c index 8cf20245c2..db279ded8b 100644 --- a/sysdeps/alpha/strchr.c +++ b/sysdeps/alpha/strchr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1993 Free Software Foundation, Inc. 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 @@ -35,7 +35,7 @@ strchr (const char *str, int c) if (*char_ptr == '\0') return NULL; else if (*char_ptr == c) - return char_ptr; + return (char *) char_ptr; longword_ptr = (unsigned long int *) char_ptr; @@ -63,7 +63,7 @@ strchr (const char *str, int c) { /* Which of the bytes was the C? */ - const char *cp = (const char *) (longword_ptr - 1); + char *cp = (char *) (longword_ptr - 1); if (cp[0] == c) return cp; From 4a219aa112863e6605439e0db68e31a5e4236c02 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 22 Jul 1993 19:20:18 +0000 Subject: [PATCH 0240/4487] Formerly alpha/memchr.c.~3~ --- sysdeps/alpha/memchr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/alpha/memchr.c b/sysdeps/alpha/memchr.c index 3c9477ed4d..048c9fa250 100644 --- a/sysdeps/alpha/memchr.c +++ b/sysdeps/alpha/memchr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1993 Free Software Foundation, Inc. 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 @@ -33,7 +33,7 @@ memchr (const void *s, int c, size_t n) for (char_ptr = s; n > 0 && ((unsigned long int) char_ptr & 7) != 0; --n, ++char_ptr) if (*char_ptr == c) - return char_ptr; + return (void *) char_ptr; longword_ptr = (unsigned long int *) char_ptr; @@ -58,7 +58,7 @@ memchr (const void *s, int c, size_t n) { /* Which of the bytes was the C? */ - const char *cp = (const char *) (longword_ptr - 1); + char *cp = (char *) (longword_ptr - 1); if (cp[0] == c) return cp; From 58998cd0b27088fef4e5b57c28f184e9d0113488 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Thu, 26 Aug 1993 23:25:13 +0000 Subject: [PATCH 0241/4487] Formerly unix/sysv/sysv4/solaris2/sparc/sysdep.h.~2~ --- .../unix/sysv/sysv4/solaris2/sparc/sysdep.h | 42 ++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h index d09b6c485d..cd6ef7f990 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h @@ -1,4 +1,44 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + /* Solaris 2 does not precede the asm names of C symbols with a `_'. */ #define NO_UNDERSCORES -#include +#include + +#define ENTRY(name) \ + .section ".text"; \ + .align 4; \ + .global C_SYMBOL_NAME(name); \ + .type C_SYMBOL_NAME(name), \#function; \ + C_LABEL(name) + +#define PSEUDO(name, syscall_name, args) \ + ENTRY (name) \ + mov SYS_ify(syscall_name), %g1; \ + ta 8; \ + bcs C_SYMBOL_NAME(syscall_error); \ + nop; \ + retl; \ + mov %g0, %o0 + +#define ret retl; nop +#define r0 %o0 +#define r1 %o1 +#define MOVE(x,y) mov x, y + From a13ebb05b8c61e99d5ee122c89313a6b9dfcc054 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Thu, 26 Aug 1993 23:30:55 +0000 Subject: [PATCH 0242/4487] Initial revision --- sysdeps/unix/mips/sigreturn.S | 23 ++++++++++++ .../unix/sysv/sysv4/solaris2/sparc/sysdep.S | 35 +++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 sysdeps/unix/mips/sigreturn.S create mode 100644 sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S diff --git a/sysdeps/unix/mips/sigreturn.S b/sysdeps/unix/mips/sigreturn.S new file mode 100644 index 0000000000..93a29733c0 --- /dev/null +++ b/sysdeps/unix/mips/sigreturn.S @@ -0,0 +1,23 @@ +/* Copyright (C) 1992 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +ENTRY(__sigreturn) + li v0, 103 + syscall diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S new file mode 100644 index 0000000000..9927c1a2f9 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S @@ -0,0 +1,35 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include + +ENTRY(syscall_error) + /* If it was a syscall that got interrupted, but can + be restarted, drop ERESTART in. */ + cmp %o0, ERESTART + be,a notint + mov EINTR, %o0 + + /* Store it in errno... */ +notint: sethi %hi(C_SYMBOL_NAME(errno)), %g1 + st %o0, [%g1 + %lo(C_SYMBOL_NAME(errno))] + + /* And just kick back a -1. */ + retl + mov -1, %o0 From ebb0156a4462c998f7e0a6413e6a64ef2f493fa4 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Thu, 26 Aug 1993 23:30:59 +0000 Subject: [PATCH 0243/4487] entered into RCS --- sysdeps/unix/bsd/ultrix4/mips/__handler.S | 14 +++-- sysdeps/unix/bsd/ultrix4/mips/vfork.S | 31 +++++++++++ sysdeps/unix/bsd/ultrix4/wait3.S | 22 ++++++++ sysdeps/unix/bsd/ultrix4/waitpid.S | 22 ++++++++ sysdeps/unix/mips/brk.S | 65 +++++++++++++++++++++++ sysdeps/unix/mips/fork.S | 27 ++++++++++ sysdeps/unix/mips/pipe.S | 29 ++++++++++ 7 files changed, 205 insertions(+), 5 deletions(-) create mode 100644 sysdeps/unix/bsd/ultrix4/mips/vfork.S create mode 100644 sysdeps/unix/bsd/ultrix4/wait3.S create mode 100644 sysdeps/unix/bsd/ultrix4/waitpid.S create mode 100644 sysdeps/unix/mips/brk.S create mode 100644 sysdeps/unix/mips/fork.S create mode 100644 sysdeps/unix/mips/pipe.S diff --git a/sysdeps/unix/bsd/ultrix4/mips/__handler.S b/sysdeps/unix/bsd/ultrix4/mips/__handler.S index 6f26028078..3ea697c5a0 100644 --- a/sysdeps/unix/bsd/ultrix4/mips/__handler.S +++ b/sysdeps/unix/bsd/ultrix4/mips/__handler.S @@ -1,5 +1,5 @@ /* Copyright (C) 1992 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@cs.widener.edu). + Contributed by Brendan Kehoe (brendan@zen.org). Also hacked by Ian Lance Taylor (ian@airs.com). The GNU C Library is free software; you can redistribute it and/or @@ -51,8 +51,8 @@ ENTRY (__handler) sw t3, 56(a2) sw t4, 60(a2) sw t5, 64(a2) - sw t6, 48(a2) - sw t7, 52(a2) + sw t6, 68(a2) + sw t7, 72(a2) /* Save the callee saved registers in sc_regs[16..23]. */ sw s0, 76(a2) @@ -78,9 +78,13 @@ ENTRY (__handler) /* ... and also the return address in sc_regs[31]. */ sw ra, 136(a2) - /* Save the floating pointer and the stack pointer in - sc_regs[29] and sc_regs[30]. */ + /* Note: we don't save the stack pointer in sc_regs[29]; + instead, we use the one that was already there. */ +#if 0 sw sp, 128(a2) +#endif + + /* Save the floating pointer in sc_regs[30]. */ sw $fp, 132(a2) /* Save the mul/div stuff in sc_mdlo and sc_mdhi. */ diff --git a/sysdeps/unix/bsd/ultrix4/mips/vfork.S b/sysdeps/unix/bsd/ultrix4/mips/vfork.S new file mode 100644 index 0000000000..e194db0c40 --- /dev/null +++ b/sysdeps/unix/bsd/ultrix4/mips/vfork.S @@ -0,0 +1,31 @@ +/* Copyright (C) 1992 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#ifndef SYS_vfork +#define SYS_vfork 66 +#endif + +SYSCALL__ (vfork, 0) + beq v1, zero, parent /* Branch if parent. */ + nop + move v0, zero +parent: + ret + nop diff --git a/sysdeps/unix/bsd/ultrix4/wait3.S b/sysdeps/unix/bsd/ultrix4/wait3.S new file mode 100644 index 0000000000..102ca18522 --- /dev/null +++ b/sysdeps/unix/bsd/ultrix4/wait3.S @@ -0,0 +1,22 @@ +/* Copyright (C) 1992 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +SYSCALL__ (wait3, 3) + ret diff --git a/sysdeps/unix/bsd/ultrix4/waitpid.S b/sysdeps/unix/bsd/ultrix4/waitpid.S new file mode 100644 index 0000000000..3bc5ce2f5e --- /dev/null +++ b/sysdeps/unix/bsd/ultrix4/waitpid.S @@ -0,0 +1,22 @@ +/* Copyright (C) 1992 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +SYSCALL__ (waitpid, 3) + ret diff --git a/sysdeps/unix/mips/brk.S b/sysdeps/unix/mips/brk.S new file mode 100644 index 0000000000..79e4fec493 --- /dev/null +++ b/sysdeps/unix/mips/brk.S @@ -0,0 +1,65 @@ +/* Copyright (C) 1992 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#ifndef SYS_brk +#define SYS_brk 17 +#endif + +#ifndef HAVE_GNU_LD +#define __end end +#endif + +.data +.sdata +ENTRY(__curbrk) + .word __end + +.text +.set noreorder +.set noat + +ENTRY(__brk) + /* Minimum is one page. */ + lui v0, 4096 + lw v0, __end + nop + + /* If they ask for less than a page, givvem the whole + thing anyway. */ + sltu AT, a0, v0 + beq AT, zero, down1 + nop + move a0, v0 +down1: + li v0, SYS_brk + syscall + bne a3, zero, error + + /* Update __curbrk and exit cleanly. */ + lui AT, 4096 + sw a0, __curbrk + j ra + move v0, zero + + /* What a horrible way to die. */ +error: j syscall_error + nop + nop + nop diff --git a/sysdeps/unix/mips/fork.S b/sysdeps/unix/mips/fork.S new file mode 100644 index 0000000000..53cae3c2f5 --- /dev/null +++ b/sysdeps/unix/mips/fork.S @@ -0,0 +1,27 @@ +/* Copyright (C) 1992 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +SYSCALL__ (fork, 0) + beq v1, zero, parent /* Branch if parent. */ + nop + /* We are the child. Return zero. */ + move v0, zero +parent: + ret diff --git a/sysdeps/unix/mips/pipe.S b/sysdeps/unix/mips/pipe.S new file mode 100644 index 0000000000..507a7537f5 --- /dev/null +++ b/sysdeps/unix/mips/pipe.S @@ -0,0 +1,29 @@ +/* Copyright (C) 1992 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +SYSCALL__ (pipe, 1) + /* Plop in the two descriptors. */ + sw v0, 0(a0) + sw v1, 4(a0) + + /* Go out with a clean status. */ + j ra + move v0, zero + nop From d14810a630f88fb15dd3bc3bf78462a2d457c2b1 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 26 Aug 1993 23:31:15 +0000 Subject: [PATCH 0244/4487] entered into RCS --- sysdeps/mips/__longjmp.c | 9 ++- sysdeps/mips/jmp_buf.h | 4 +- sysdeps/mips/setjmp_aux.c | 6 +- sysdeps/unix/bsd/ultrix4/mips/sigcontext.h | 8 +-- sysdeps/unix/mips/sysdep.h | 67 ++++++++++++++++++++++ 5 files changed, 85 insertions(+), 9 deletions(-) create mode 100644 sysdeps/unix/mips/sysdep.h diff --git a/sysdeps/mips/__longjmp.c b/sysdeps/mips/__longjmp.c index 1828714803..5c7eb683fb 100644 --- a/sysdeps/mips/__longjmp.c +++ b/sysdeps/mips/__longjmp.c @@ -1,5 +1,5 @@ /* Copyright (C) 1992 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@cs.widener.edu). + Contributed by Brendan Kehoe (brendan@zen.org). 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 @@ -22,6 +22,10 @@ Cambridge, MA 02139, USA. */ #undef __longjmp +#ifndef __GNUC__ + #error This file uses GNU C extensions; you must compile with GCC. +#endif + __NORETURN void DEFUN(__longjmp, (env, val_arg), CONST __jmp_buf env AND int val_arg) @@ -66,7 +70,7 @@ DEFUN(__longjmp, (env, val_arg), CONST __jmp_buf env AND int val_arg) /* Get the PC. */ asm volatile ("lw $31, %0" : : "m" (env[0].__pc)); - /* Give setjmp() 1 if given a 0, or what they gave us if non-zero. */ + /* Give setjmp 1 if given a 0, or what they gave us if non-zero. */ if (val == 0) asm volatile ("li $2, 1"); else @@ -74,6 +78,5 @@ DEFUN(__longjmp, (env, val_arg), CONST __jmp_buf env AND int val_arg) asm volatile ("j $31"); - /* Follow the trend.. */ abort (); } diff --git a/sysdeps/mips/jmp_buf.h b/sysdeps/mips/jmp_buf.h index 661997f25a..eed47dce7f 100644 --- a/sysdeps/mips/jmp_buf.h +++ b/sysdeps/mips/jmp_buf.h @@ -1,6 +1,6 @@ /* Define the machine-dependent type `jmp_buf'. Mips version. Copyright (C) 1992, 1993 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@cygnus.com). + Contributed by Brendan Kehoe (brendan@zen.org). 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 @@ -41,5 +41,7 @@ typedef struct double __fpregs[6]; } __jmp_buf[1]; +#ifdef __USE_MISC /* Offset to the program counter in `jmp_buf'. */ #define JB_PC 0 +#endif diff --git a/sysdeps/mips/setjmp_aux.c b/sysdeps/mips/setjmp_aux.c index e4c9d20132..3a3ed208c1 100644 --- a/sysdeps/mips/setjmp_aux.c +++ b/sysdeps/mips/setjmp_aux.c @@ -1,5 +1,5 @@ /* Copyright (C) 1992 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@cs.widener.edu). + Contributed by Brendan Kehoe (brendan@zen.org). 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 @@ -19,6 +19,10 @@ Cambridge, MA 02139, USA. */ #include #include +#ifndef __GNUC__ + #error This file uses GNU C extensions; you must compile with GCC. +#endif + /* This function is only called via the assembly language routine __setjmp, which arranges to pass in the stack pointer and the frame pointer. We do things this way because it's difficult to reliably diff --git a/sysdeps/unix/bsd/ultrix4/mips/sigcontext.h b/sysdeps/unix/bsd/ultrix4/mips/sigcontext.h index 60bb31247b..107d2fc5f6 100644 --- a/sysdeps/unix/bsd/ultrix4/mips/sigcontext.h +++ b/sysdeps/unix/bsd/ultrix4/mips/sigcontext.h @@ -1,5 +1,5 @@ /* Copyright (C) 1992 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@cs.widener.edu). + Contributed by Brendan Kehoe (brendan@zen.org). 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 @@ -27,7 +27,7 @@ struct sigcontext sigset_t sc_mask; /* Program counter when the signal hit. */ - PTR sc_pc; + __ptr_t sc_pc; /* Registers 0 through 31. */ int sc_regs[32]; @@ -52,9 +52,9 @@ struct sigcontext int sc_cause; /* CPU bad virtual address. */ - PTR sc_badvaddr; + __ptr_t sc_badvaddr; /* CPU board bad physical address. */ - PTR sc_badpaddr; + __ptr_t sc_badpaddr; }; diff --git a/sysdeps/unix/mips/sysdep.h b/sysdeps/unix/mips/sysdep.h new file mode 100644 index 0000000000..bbf742b733 --- /dev/null +++ b/sysdeps/unix/mips/sysdep.h @@ -0,0 +1,67 @@ +/* Copyright (C) 1992 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include + +#ifdef __STDC__ +#define ENTRY(name) \ + .globl name; \ + .align 2; \ + name##: +#else +#define ENTRY(name) \ + .globl name; \ + .align 2; \ + name/**/: +#endif + +/* Note that while it's better structurally, going back to call syscall_error + can make things confusing if you're debugging---it looks like it's jumping + backwards into the previous fn. */ +#ifdef __STDC__ +#define PSEUDO(name, syscall_name, args) \ + .set noreorder; \ + .align 2; \ + 99: j syscall_error; \ + nop; \ + ENTRY(name) \ + li v0, SYS_##syscall_name; \ + syscall; \ + bne a3, zero, 99b; \ + nop; \ +syse1: +#else +#define PSEUDO(name, syscall_name, args) \ + .set noreorder; \ + .align 2; \ + 99: j syscall_error; \ + nop; \ + ENTRY(name) \ + li v0, SYS_/**/syscall_name; \ + syscall; \ + bne a3, zero, 99b; \ + nop; \ +syse1: +#endif + +#define ret j ra ; nop +#define r0 v0 +#define r1 v1 +/* The mips move insn is d,s. */ +#define MOVE(x,y) move y , x From d74175455ddc9c9de6fae8f42d07118a09f4f8b6 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Thu, 23 Sep 1993 00:05:36 +0000 Subject: [PATCH 0245/4487] Initial revision --- sysdeps/unix/sysv/sysv4/i386/statbuf.h | 85 ++++++++++++++++++++++ sysdeps/unix/sysv/sysv4/solaris2/statbuf.h | 82 +++++++++++++++++++++ 2 files changed, 167 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/i386/statbuf.h create mode 100644 sysdeps/unix/sysv/sysv4/solaris2/statbuf.h diff --git a/sysdeps/unix/sysv/sysv4/i386/statbuf.h b/sysdeps/unix/sysv/sysv4/i386/statbuf.h new file mode 100644 index 0000000000..b448dcb8c8 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/i386/statbuf.h @@ -0,0 +1,85 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifndef _STATBUF_H +#define _STATBUF_H + +#include + +/* Structure describing file characteristics. */ +struct stat + { + short int st_dev; + long st_filler1[3]; + __ino_t st_ino; /* File serial number. */ + unsigned long int st_mode; /* File mode. */ + /* This is unsigned long instead of __nlink_t, since SVR4 has + a long nlink_t, not a short one. */ + unsigned long int 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.*/ + unsigned long int st_rdev; /* Device number, if device. */ + long st_filler2[2]; + + __off_t st_size; /* Size of file, in bytes. */ + /* SVR4 added this extra long to allow for expansion of off_t. */ + long st_filler3; + + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atime_usec; + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtime_usec; + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctime_usec; + + long st_blksize; /* Optimal block size for I/O. */ +#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ + + long st_blocks; /* Number of 512-byte blocks allocated. */ + int st_aclcnt; + unsigned long int st_level; + unsigned long int st_flags; + unsigned long int st_cmwlevel; + long st_filler4[4]; + }; + +/* Encoding of the file mode. */ + +#define __S_IFMT 0170000 /* These bits determine file type. */ + +/* File types. */ +#define __S_IFDIR 0040000 /* Directory. */ +#define __S_IFCHR 0020000 /* Character device. */ +#define __S_IFBLK 0060000 /* Block device. */ +#define __S_IFREG 0100000 /* Regular file. */ +#define __S_IFIFO 0010000 /* FIFO. */ + +/* These don't actually exist on System V, but having them doesn't hurt. */ +#define __S_IFLNK 0120000 /* Symbolic link. */ +#define __S_IFSOCK 0140000 /* Socket. */ + +/* Protection bits. */ + +#define __S_ISUID 04000 /* Set user ID on execution. */ +#define __S_ISGID 02000 /* Set group ID on execution. */ +#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ +#define __S_IREAD 0400 /* Read by owner. */ +#define __S_IWRITE 0200 /* Write by owner. */ +#define __S_IEXEC 0100 /* Execute by owner. */ + +#endif /* statbuf.h */ diff --git a/sysdeps/unix/sysv/sysv4/solaris2/statbuf.h b/sysdeps/unix/sysv/sysv4/solaris2/statbuf.h new file mode 100644 index 0000000000..eb994ddc11 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/solaris2/statbuf.h @@ -0,0 +1,82 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifndef _STATBUF_H +#define _STATBUF_H + +#include + +/* Structure describing file characteristics. */ +struct stat + { + short int st_dev; + long st_filler1[3]; + __ino_t st_ino; /* File serial number. */ + unsigned long int st_mode; /* File mode. */ + /* This is unsigned long instead of __nlink_t, since SVR4 has + a long nlink_t, not a short one. */ + unsigned long int 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.*/ + unsigned long int st_rdev; /* Device number, if device. */ + long st_filler2[2]; + + __off_t st_size; /* Size of file, in bytes. */ + /* SVR4 added this extra long to allow for expansion of off_t. */ + long st_filler3; + + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atime_usec; + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtime_usec; + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctime_usec; + + long st_blksize; /* Optimal block size for I/O. */ +#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ + + long st_blocks; /* Number of 512-byte blocks allocated. */ + char st_fstype[16]; + long st_filler4[8]; + }; + +/* Encoding of the file mode. */ + +#define __S_IFMT 0170000 /* These bits determine file type. */ + +/* File types. */ +#define __S_IFDIR 0040000 /* Directory. */ +#define __S_IFCHR 0020000 /* Character device. */ +#define __S_IFBLK 0060000 /* Block device. */ +#define __S_IFREG 0100000 /* Regular file. */ +#define __S_IFIFO 0010000 /* FIFO. */ + +/* These don't actually exist on System V, but having them doesn't hurt. */ +#define __S_IFLNK 0120000 /* Symbolic link. */ +#define __S_IFSOCK 0140000 /* Socket. */ + +/* Protection bits. */ + +#define __S_ISUID 04000 /* Set user ID on execution. */ +#define __S_ISGID 02000 /* Set group ID on execution. */ +#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ +#define __S_IREAD 0400 /* Read by owner. */ +#define __S_IWRITE 0200 /* Write by owner. */ +#define __S_IEXEC 0100 /* Execute by owner. */ + +#endif /* statbuf.h */ From e052e2a4e950c597efadc6751f7c70fb267937bd Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Thu, 23 Sep 1993 00:07:20 +0000 Subject: [PATCH 0246/4487] entered into RCS --- sysdeps/unix/sysv/sysv4/sysconfig.S | 22 ++++++++++++++++++++++ sysdeps/unix/sysv/sysv4/sysconfig.h | 28 ++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/sysconfig.S diff --git a/sysdeps/unix/sysv/sysv4/sysconfig.S b/sysdeps/unix/sysv/sysv4/sysconfig.S new file mode 100644 index 0000000000..034e012e84 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/sysconfig.S @@ -0,0 +1,22 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +SYSCALL__ (sysconfig, 1) + ret diff --git a/sysdeps/unix/sysv/sysv4/sysconfig.h b/sysdeps/unix/sysv/sysv4/sysconfig.h index e69de29bb2..77c84c7af6 100644 --- a/sysdeps/unix/sysv/sysv4/sysconfig.h +++ b/sysdeps/unix/sysv/sysv4/sysconfig.h @@ -0,0 +1,28 @@ +/* `__sysconfig' NAME values. + Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifndef __SYSCONFIG_H +#define __SYSCONFIG_H + +#define _CONFIG_OPEN_FILES 4 /* process limit on open files */ +#define _CONFIG_PAGESIZE 6 /* MMU page size */ +#define _CONFIG_CLK_TCK 7 /* all times are in CLK_TCKths of a second */ + +#endif + From 663cccc8258a84295159424ebe73a2936914ee3f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 23 Sep 1993 00:08:05 +0000 Subject: [PATCH 0247/4487] Initial revision --- sysdeps/unix/sysv/sysv4/signum.h | 68 ++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/signum.h diff --git a/sysdeps/unix/sysv/sysv4/signum.h b/sysdeps/unix/sysv/sysv4/signum.h new file mode 100644 index 0000000000..2f70495c05 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/signum.h @@ -0,0 +1,68 @@ +/* Copyright (C) 1992, 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifdef _SIGNAL_H + +/* This file defines the fake signal functions and signal + number constants for System V Release 4 UNIX. */ + +/* Fake signal functions. */ +#define SIG_ERR ((__sighandler_t) -1) +#define SIG_DFL ((__sighandler_t) 0) +#define SIG_IGN ((__sighandler_t) 1) + + +/* Signals. */ +#define SIGHUP 1 /* Hangup (POSIX). */ +#define SIGINT 2 /* Interrupt (ANSI). */ +#define SIGQUIT 3 /* Quit (POSIX). */ +#define SIGILL 4 /* Illegal instruction (ANSI). */ +#define SIGABRT SIGIOT /* Abort (ANSI). */ +#define SIGTRAP 5 /* Trace trap (POSIX). */ +#define SIGIOT 6 /* IOT trap. */ +#define SIGEMT 7 /* EMT trap. */ +#define SIGFPE 8 /* Floating-point exception (ANSI). */ +#define SIGKILL 9 /* Kill, unblockable (POSIX). */ +#define SIGBUS 10 /* Bus error. */ +#define SIGSEGV 11 /* Segmentation violation (ANSI). */ +#define SIGSYS 12 /* Bad argument to system call*/ +#define SIGPIPE 13 /* Broken pipe (POSIX). */ +#define SIGALRM 14 /* Alarm clock (POSIX). */ +#define SIGTERM 15 /* Termination (ANSI). */ +#define SIGUSR1 16 /* User-defined signal 1 (POSIX). */ +#define SIGUSR2 17 /* User-defined signal 2 (POSIX). */ +#define SIGCHLD 18 /* Child status has changed (POSIX). */ +#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */ +#define SIGPWR 19 /* Power going down. */ +#define SIGWINCH 20 /* Window size change. */ +#define SIGURG 21 /* Urgent condition on socket.*/ +#define SIGIO SIGPOLL /* I/O now possible. */ +#define SIGPOLL 22 /* Same as SIGIO? (SVID). */ +#define SIGSTOP 23 /* Stop, unblockable (POSIX). */ +#define SIGTSTP 24 /* Keyboard stop (POSIX). */ +#define SIGCONT 25 /* Continue (POSIX). */ +#define SIGTTIN 26 /* Background read from tty (POSIX). */ +#define SIGTTOU 27 /* Background write to tty (POSIX). */ +#define SIGVTALRM 28 /* Virtual alarm clock. */ +#define SIGPROF 29 /* Profiling alarm clock. */ +#define SIGXCPU 30 /* CPU limit exceeded. */ +#define SIGXFSZ 31 /* File size limit exceeded. */ + +#endif /* included. */ + +#define _NSIG 32 /* Biggest signal number + 1. */ From 8716b685ef95b4c3ef7c0f5b9e296970240b141e Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 23 Sep 1993 00:08:14 +0000 Subject: [PATCH 0248/4487] entered into RCS --- sysdeps/unix/sysv/sysv4/sigprocmask.S | 22 ++++++++++++++++++++++ sysdeps/unix/sysv/sysv4/sysconf.c | 8 ++------ sysdeps/unix/sysv/sysv4/time.S | 22 ++++++++++++++++++++++ 3 files changed, 46 insertions(+), 6 deletions(-) create mode 100644 sysdeps/unix/sysv/sysv4/sigprocmask.S create mode 100644 sysdeps/unix/sysv/sysv4/time.S diff --git a/sysdeps/unix/sysv/sysv4/sigprocmask.S b/sysdeps/unix/sysv/sysv4/sigprocmask.S new file mode 100644 index 0000000000..5da366da82 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/sigprocmask.S @@ -0,0 +1,22 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +SYSCALL__ (sigprocmask, 3) + ret diff --git a/sysdeps/unix/sysv/sysv4/sysconf.c b/sysdeps/unix/sysv/sysv4/sysconf.c index 0093e20bad..71d3d08725 100644 --- a/sysdeps/unix/sysv/sysv4/sysconf.c +++ b/sysdeps/unix/sysv/sysv4/sysconf.c @@ -1,5 +1,5 @@ /* Copyright (C) 1993 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@cygnus.com). + Contributed by Brendan Kehoe (brendan@zen.org). 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 @@ -66,11 +66,7 @@ DEFUN(__sysconf, (name), int name) return __sysconfig (_CONFIG_OPEN_FILES); case _SC_TZNAME_MAX: -#ifdef TZNAME_MAX - return __tzname_max > TZNAME_MAX ? __tzname_max : TZNAME_MAX; -#else - return __tzname_max; -#endif + return __tzname_max (); case _SC_JOB_CONTROL: #ifdef _POSIX_JOB_CONTROL diff --git a/sysdeps/unix/sysv/sysv4/time.S b/sysdeps/unix/sysv/sysv4/time.S new file mode 100644 index 0000000000..61f3514fb7 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/time.S @@ -0,0 +1,22 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +SYSCALL (time, 1) + ret From a057dbb1eb6a0fc646538a0c053e4914ac6c5750 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Thu, 23 Sep 1993 19:14:00 +0000 Subject: [PATCH 0249/4487] entered into RCS --- sysdeps/unix/sysv/sysv4/dup2.c | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/dup2.c diff --git a/sysdeps/unix/sysv/sysv4/dup2.c b/sysdeps/unix/sysv/sysv4/dup2.c new file mode 100644 index 0000000000..06270b4339 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/dup2.c @@ -0,0 +1,2 @@ +/* SVR4 uses the POSIX dup2. */ +#include From 168f03be1edf7ab70220e1638fd841514e244eee Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 9 Oct 1993 00:32:32 +0000 Subject: [PATCH 0250/4487] Initial revision --- sysdeps/unix/sysv/irix4/Implies | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sysdeps/unix/sysv/irix4/Implies diff --git a/sysdeps/unix/sysv/irix4/Implies b/sysdeps/unix/sysv/irix4/Implies new file mode 100644 index 0000000000..78437f6ad2 --- /dev/null +++ b/sysdeps/unix/sysv/irix4/Implies @@ -0,0 +1,2 @@ +# Irix 4 has the set of things which are also common to BSD and SVR4. +unix/common From f09f73303631a9b057001d02a56e2d13dbb7fa18 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 13 Oct 1993 01:24:46 +0000 Subject: [PATCH 0251/4487] Initial revision --- sysdeps/unix/sysv/irix4/setgroups.c | 29 +++++++++++++++++++++++++++++ sysdeps/unix/sysv/irix4/syssgi.S | 22 ++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 sysdeps/unix/sysv/irix4/setgroups.c create mode 100644 sysdeps/unix/sysv/irix4/syssgi.S diff --git a/sysdeps/unix/sysv/irix4/setgroups.c b/sysdeps/unix/sysv/irix4/setgroups.c new file mode 100644 index 0000000000..70d748b216 --- /dev/null +++ b/sysdeps/unix/sysv/irix4/setgroups.c @@ -0,0 +1,29 @@ +/* Copyright (C) 1992 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include + +/* Set the group set for the current user to GROUPS (N of them). */ +int +DEFUN(setgroups, (n, groups), size_t n AND CONST gid_t *groups) +{ + return syssgi(SGI_SETGROUPS, n, groups); +} diff --git a/sysdeps/unix/sysv/irix4/syssgi.S b/sysdeps/unix/sysv/irix4/syssgi.S new file mode 100644 index 0000000000..39b82ea78b --- /dev/null +++ b/sysdeps/unix/sysv/irix4/syssgi.S @@ -0,0 +1,22 @@ +/* Copyright (C) 1992 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +SYSCALL (syssgi, 2) + ret From 746dce604d05570f72421024259a891e2d7843b4 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 14 Oct 1993 00:27:29 +0000 Subject: [PATCH 0252/4487] Initial revision --- sysdeps/unix/sysv/irix4/getpgid.S | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 sysdeps/unix/sysv/irix4/getpgid.S diff --git a/sysdeps/unix/sysv/irix4/getpgid.S b/sysdeps/unix/sysv/irix4/getpgid.S new file mode 100644 index 0000000000..b84b41a3bf --- /dev/null +++ b/sysdeps/unix/sysv/irix4/getpgid.S @@ -0,0 +1,22 @@ +/* Copyright (C) 1991, 1992 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +SYSCALL__ (bsdgetpgrp, 1) + ret From 1771c7559d9b8f0b46bcffa33fede6e58fadde88 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 20 Oct 1993 01:14:17 +0000 Subject: [PATCH 0253/4487] Initial revision --- sysdeps/unix/sysv/irix4/getrusage.c | 40 +++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 sysdeps/unix/sysv/irix4/getrusage.c diff --git a/sysdeps/unix/sysv/irix4/getrusage.c b/sysdeps/unix/sysv/irix4/getrusage.c new file mode 100644 index 0000000000..7222a0db79 --- /dev/null +++ b/sysdeps/unix/sysv/irix4/getrusage.c @@ -0,0 +1,40 @@ +/* Copyright (C) 1991 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include + +/* Return resource usage information on process indicated by WHO + and put it in *USAGE. Returns 0 for success, -1 for failure. */ +int +DEFUN(__getrusage, (who, usage), + enum __rusage_who who AND struct rusage *usage) +{ + return syssgi(SGI_RUSAGE, who, usage); +} + + +#ifdef HAVE_GNU_LD + +#include + +stub_warning(__getrusage); + +#endif /* GNU stabs. */ From 19d9b4ea1259df1c43b11431f88d934f2be91b51 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 22 Oct 1993 22:09:40 +0000 Subject: [PATCH 0254/4487] entered into RCS --- sysdeps/unix/sysv/irix4/start.c | 68 +++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 sysdeps/unix/sysv/irix4/start.c diff --git a/sysdeps/unix/sysv/irix4/start.c b/sysdeps/unix/sysv/irix4/start.c new file mode 100644 index 0000000000..4382e6f855 --- /dev/null +++ b/sysdeps/unix/sysv/irix4/start.c @@ -0,0 +1,68 @@ +/* Copyright (C) 1991, 1992 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include + +#ifndef __GNUC__ + #error This file uses GNU C extensions; you must compile with GCC. +#endif + +/* The first piece of initialized data. */ +int __data_start = 0; + +VOLATILE int errno = 0; + +#ifndef HAVE_GNU_LD +#undef environ +#define __environ environ +#endif + +char **__environ; + +extern void EXFUN(__libc_init, (int argc, char **argv, char **envp)); +extern int EXFUN(main, (int argc, char **argv, char **envp)); + +/* Use the stack pointer to access the arguments. This assumes that + we can guess how big the frame will be. */ +register long int sp asm("sp"); +#ifdef __OPTIMIZE__ +#define STACKSIZE 8 +#else +#define STACKSIZE 10 +#endif + +void +DEFUN_VOID(__start) +{ + int argc; + char **argv, **envp; + + /* Set up the global pointer. */ + asm volatile ("la $28,_gp"); + argc = ((int *) sp)[STACKSIZE]; + argv = (char **) &((int *) sp)[STACKSIZE + 1]; + envp = &argv[argc + 1]; + __environ = envp; + + __libc_init (argc, argv, envp); + errno = 0; + exit (main (argc, argv, envp)); +} From d03c81340cbe323f1c41d94ac22aa5385083c4f5 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 23 Oct 1993 00:50:20 +0000 Subject: [PATCH 0255/4487] entered into RCS --- sysdeps/unix/sysv/irix4/__handler.S | 116 ++++++++++++++++++++++++++++ sysdeps/unix/sysv/irix4/signal.S | 22 ++++++ sysdeps/unix/sysv/irix4/sigreturn.S | 23 ++++++ sysdeps/unix/sysv/irix4/sigtramp.c | 54 +++++++++++++ 4 files changed, 215 insertions(+) create mode 100644 sysdeps/unix/sysv/irix4/__handler.S create mode 100644 sysdeps/unix/sysv/irix4/signal.S create mode 100644 sysdeps/unix/sysv/irix4/sigreturn.S create mode 100644 sysdeps/unix/sysv/irix4/sigtramp.c diff --git a/sysdeps/unix/sysv/irix4/__handler.S b/sysdeps/unix/sysv/irix4/__handler.S new file mode 100644 index 0000000000..bd756a4278 --- /dev/null +++ b/sysdeps/unix/sysv/irix4/__handler.S @@ -0,0 +1,116 @@ +/* Copyright (C) 1992 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@cs.widener.edu). + Also hacked by Ian Lance Taylor (ian@airs.com). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +/* This function saves all the registers, calls the + user function, and then executes a sigreturn system call. The + sigreturn call wants the address of a sigcontext structure. This + is all hideously system dependent and, for all intents and + purposes, undocumented. + + When we enter here, a3 holds the user's signal handler. We are + supposed to fill in the context given in a2, and then pass it and + the first two arguments to the user's function. If the user's + function returns, we execute a sigreturn system call. + + The sc_onstack, sc_mask and sc_pc elements of the context are + already set by the kernel. For some reason we don't have to save + the floating point state or the coprocessor state; the kernel may + have saved them for us, or it doesn't use them. */ + +.set noat +ENTRY (__handler) +#if 0 + /* Store zero and the asm temp reg. */ + sw $0, 12(a2) + sw AT, 16(a2) + + /* Put v1 in sc_regs[3]. */ + sw v1, 24(a2) + + /* Save the caller saved registers in sc_regs[8..15]. */ + sw t0, 44(a2) + sw t1, 48(a2) + sw t2, 52(a2) + sw t3, 56(a2) + sw t4, 60(a2) + sw t5, 64(a2) + sw t6, 68(a2) + sw t7, 72(a2) + + /* Save the callee saved registers in sc_regs[16..23]. */ + sw s0, 76(a2) + sw s1, 80(a2) + sw s2, 84(a2) + sw s3, 88(a2) + sw s4, 92(a2) + sw s5, 96(a2) + sw s6, 100(a2) + sw s7, 104(a2) + + /* Save the code generator registers in sc_regs[24] & sc_regs[25]. */ + sw t8, 108(a2) + sw t9, 112(a2) + + /* Save the kernel temp regs in sc_regs[26] & sc_regs[27]. */ + sw k0, 116(a2) + sw k1, 120(a2) + + /* Save the global pointer in sc_regs[28]. */ + sw gp, 124(a2) + + /* ... and also the return address in sc_regs[31]. */ + sw ra, 136(a2) + + /* Note: we don't save the stack pointer in sc_regs[29]; + instead, we use the one that was already there. */ +#if 0 + sw sp, 128(a2) +#endif + + /* Save the floating pointer in sc_regs[30]. */ + sw fp, 132(a2) + + /* Save the mul/div stuff in sc_mdlo and sc_mdhi. */ + mflo t0 + sw t0, 140(a2) + mfhi t0 + sw t0, 144(a2) + +#endif + /* Move the stack up six. This will save the context. */ + addu sp, sp, -24 + sw a2, 16(sp) + + /* Call their handler with the signal, code, and context; note + this will clobber the context. */ + .set noreorder + jal ra, a3 + nop + .set reorder + + /* When we come back, restore the context and pass it right + on into sigreturn(). */ + lw a0, 16(sp) + + /* Do a sigreturn syscall; this doesn't return. */ + li v0, SYS_sigreturn + syscall + nop diff --git a/sysdeps/unix/sysv/irix4/signal.S b/sysdeps/unix/sysv/irix4/signal.S new file mode 100644 index 0000000000..b0c147dadb --- /dev/null +++ b/sysdeps/unix/sysv/irix4/signal.S @@ -0,0 +1,22 @@ +/* Copyright (C) 1991, 1992 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +PSEUDO (__raw_signal, signal, 3) + ret diff --git a/sysdeps/unix/sysv/irix4/sigreturn.S b/sysdeps/unix/sysv/irix4/sigreturn.S new file mode 100644 index 0000000000..1d624685fd --- /dev/null +++ b/sysdeps/unix/sysv/irix4/sigreturn.S @@ -0,0 +1,23 @@ +/* Copyright (C) 1992 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@cs.widener.edu). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +ENTRY(__sigreturn) + li v0, SYS_sigreturn + syscall diff --git a/sysdeps/unix/sysv/irix4/sigtramp.c b/sysdeps/unix/sysv/irix4/sigtramp.c new file mode 100644 index 0000000000..85c2c3a9a9 --- /dev/null +++ b/sysdeps/unix/sysv/irix4/sigtramp.c @@ -0,0 +1,54 @@ +/* Copyright (C) 1992 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* The sigvec system call on MIPS Ultrix takes an additional + parameter, which is the address that is actually called when the + signal occurs. + + When a signal occurs, we arrange for the kernel to call __handler. + That will save the frame and stack pointers into the context, and + then jump to this routine. See __handler.S. + + This code is based on sysdeps/unix/bsd/sun4/sigtramp.c, but it's + different because since we get passed the user signal handler we + don't actually need a trampoline. */ + +#include +#include +#include +#include + +/* The user's signal handler is called with three arguments. */ +typedef void (*handler_type) (int sig, int code, struct sigcontext *); + +/* Defined in signal.S. */ +extern __sighandler_t EXFUN(__raw_signal, (int sig, __sighandler_t func, + void (*)(int sig, int code, + struct sigcontext *, + handler_type))); + +extern void EXFUN(__handler, (int sig, int code, + struct sigcontext *, + handler_type)); + +__sighandler_t +DEFUN(signal, (sig, func), + int sig AND __sighandler_t func) +{ + return __raw_signal (sig, func, __handler); +} From 3c94da87c06ce407e9c676d1f076bd25a0b4175b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 26 Oct 1993 23:50:09 +0000 Subject: [PATCH 0256/4487] Formerly unix/sysv/sco3.2.4/__sysconf.S.~4~ --- sysdeps/unix/sysv/sco3.2.4/sysconf.S | 1 - 1 file changed, 1 deletion(-) diff --git a/sysdeps/unix/sysv/sco3.2.4/sysconf.S b/sysdeps/unix/sysv/sco3.2.4/sysconf.S index 10699a28ed..43af8694d3 100644 --- a/sysdeps/unix/sysv/sco3.2.4/sysconf.S +++ b/sysdeps/unix/sysv/sco3.2.4/sysconf.S @@ -18,7 +18,6 @@ Cambridge, MA 02139, USA. */ #include #include -#include .globl __tzname_max ENTRY (__sysconf) From 3f52c8c51bdef9185a3aba27142ee8f23f48c1e4 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 28 Oct 1993 00:04:50 +0000 Subject: [PATCH 0257/4487] entered into RCS --- sysdeps/unix/sysv/irix4/statbuf.h | 61 +++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 sysdeps/unix/sysv/irix4/statbuf.h diff --git a/sysdeps/unix/sysv/irix4/statbuf.h b/sysdeps/unix/sysv/irix4/statbuf.h new file mode 100644 index 0000000000..8b327bae11 --- /dev/null +++ b/sysdeps/unix/sysv/irix4/statbuf.h @@ -0,0 +1,61 @@ +/* Copyright (C) 1992 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifndef _STATBUF_H +#define _STATBUF_H + +struct stat + { + unsigned long st_ino; + short int st_dev; + unsigned short int st_mode; + short int st_nlink; + unsigned short int st_uid; + unsigned short int st_gid; + short int st_rdev; + long int st_size; + long int st_atime; + long int st_mtime; + long int st_ctime; + }; + +/* Encoding of the file mode. */ + +#define __S_IFMT 0170000 /* These bits determine file type. */ + +/* File types. */ +#define __S_IFDIR 0040000 /* Directory. */ +#define __S_IFCHR 0020000 /* Character device. */ +#define __S_IFBLK 0060000 /* Block device. */ +#define __S_IFREG 0100000 /* Regular file. */ +#define __S_IFIFO 0010000 /* FIFO. */ + +/* These don't actually exist on System V, but having them doesn't hurt. */ +#define __S_IFLNK 0120000 /* Symbolic link. */ +#define __S_IFSOCK 0140000 /* Socket. */ + +/* Protection bits. */ + +#define __S_ISUID 04000 /* Set user ID on execution. */ +#define __S_ISGID 02000 /* Set group ID on execution. */ +#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ +#define __S_IREAD 0400 /* Read by owner. */ +#define __S_IWRITE 0200 /* Write by owner. */ +#define __S_IEXEC 0100 /* Execute by owner. */ + +#endif /* statbuf.h */ From 8ea6bd16c927a9e10c8384d9191db755be7f8e27 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 28 Oct 1993 16:07:49 +0000 Subject: [PATCH 0258/4487] Initial revision --- sysdeps/unix/sysv/irix4/sysconf.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 sysdeps/unix/sysv/irix4/sysconf.c diff --git a/sysdeps/unix/sysv/irix4/sysconf.c b/sysdeps/unix/sysv/irix4/sysconf.c new file mode 100644 index 0000000000..03bb324368 --- /dev/null +++ b/sysdeps/unix/sysv/irix4/sysconf.c @@ -0,0 +1,27 @@ +/* Copyright (C) 1991, 1993 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include + +/* Get the value of the system variable NAME. */ +long int +DEFUN(__sysconf, (name), int name) +{ + return syssgi(SGI_SYSCONF, name); +} From 42115b8a4cd1bdbd3f00d0ef6cddc21e0c4aa755 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 28 Oct 1993 21:25:05 +0000 Subject: [PATCH 0259/4487] Formerly unix/bsd/vax/sysdep.S.~3~ --- sysdeps/unix/bsd/vax/sysdep.S | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/bsd/vax/sysdep.S b/sysdeps/unix/bsd/vax/sysdep.S index e29a8783dd..df2123a74e 100644 --- a/sysdeps/unix/bsd/vax/sysdep.S +++ b/sysdeps/unix/bsd/vax/sysdep.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -16,9 +16,17 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include + .globl _errno .globl syscall_error syscall_error: - movl r0, _errno + /* We translate the system's EWOULDBLOCK error into EAGAIN. + The GNU C library always defines EWOULDBLOCK==EAGAIN. + EWOULDBLOCK_sys is the original number. */ + cmpl r0, $EWOULDBLOCK_sys + bne 0f + movl $EAGAIN, r0 +0: movl r0, _errno mnegl $1, r0 ret From 0e28fe44c735e8e2f0ebe0dc3f919b03d31bbd12 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 28 Oct 1993 21:47:10 +0000 Subject: [PATCH 0260/4487] Formerly unix/bsd/vax/sysdep.S.~4~ --- sysdeps/unix/bsd/vax/sysdep.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/unix/bsd/vax/sysdep.S b/sysdeps/unix/bsd/vax/sysdep.S index df2123a74e..74c366e4cd 100644 --- a/sysdeps/unix/bsd/vax/sysdep.S +++ b/sysdeps/unix/bsd/vax/sysdep.S @@ -21,12 +21,14 @@ Cambridge, MA 02139, USA. */ .globl _errno .globl syscall_error syscall_error: +#ifdef EWOULDBLOCK_sys /* We translate the system's EWOULDBLOCK error into EAGAIN. The GNU C library always defines EWOULDBLOCK==EAGAIN. EWOULDBLOCK_sys is the original number. */ cmpl r0, $EWOULDBLOCK_sys bne 0f movl $EAGAIN, r0 +#endif 0: movl r0, _errno mnegl $1, r0 ret From 635f87a43a384b86891b048a1690da27ecab755f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 28 Oct 1993 21:47:12 +0000 Subject: [PATCH 0261/4487] Formerly unix/bsd/m68k/sysdep.S.~3~ --- sysdeps/unix/bsd/m68k/sysdep.S | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/bsd/m68k/sysdep.S b/sysdeps/unix/bsd/m68k/sysdep.S index a6b3c99557..fccc605d7f 100644 --- a/sysdeps/unix/bsd/m68k/sysdep.S +++ b/sysdeps/unix/bsd/m68k/sysdep.S @@ -16,13 +16,28 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include + .globl syscall_error syscall_error: + /* We translate the system's EWOULDBLOCK error into EAGAIN. + The GNU C library always defines EWOULDBLOCK==EAGAIN. + EWOULDBLOCK_sys is the original number. */ #ifdef __motorola__ - move.l d0, _errno +#ifdef EWOULDBLOCK_sys + cmp.l d0, #EWOULDBLOCK_sys + bne store + moveq.l #EAGAIN, d0 +#endif +store: move.l d0, _errno moveq.l #-1, d0 #else - movel d0, _errno +#ifdef EWOULDBLOCK_sys + cmpl d0, #EWOULDBLOCK_sys + bne 0f + moveq #EAGAIN, d0 +#endif +0: movel d0, _errno moveq #-1, d0 #endif rts From 5412bc1b048289f0951232fb9d7cc7e09dae3522 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 28 Oct 1993 21:47:13 +0000 Subject: [PATCH 0262/4487] Formerly unix/sysv/sysv4/solaris2/sparc/sysdep.S.~2~ --- sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S index 9927c1a2f9..43682f3e0d 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S @@ -21,13 +21,23 @@ Cambridge, MA 02139, USA. */ ENTRY(syscall_error) /* If it was a syscall that got interrupted, but can - be restarted, drop ERESTART in. */ + be restarted, drop EINTR in. */ cmp %o0, ERESTART be,a notint mov EINTR, %o0 - /* Store it in errno... */ -notint: sethi %hi(C_SYMBOL_NAME(errno)), %g1 +notint: +#ifdef EWOULDBLOCK_sys + /* We translate the system's EWOULDBLOCK error into EAGAIN. + The GNU C library always defines EWOULDBLOCK==EAGAIN. + EWOULDBLOCK_sys is the original number. */ + cmp %o0, EWOULDBLOCK_sys + be,a notblock + mov EAGAIN, %o0 +#endif + +notblock:/* Store it in errno... */ + sethi %hi(C_SYMBOL_NAME(errno)), %g1 st %o0, [%g1 + %lo(C_SYMBOL_NAME(errno))] /* And just kick back a -1. */ From eec2fe304793607eb695d961784bf3314eb43e93 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 30 Oct 1993 23:44:43 +0000 Subject: [PATCH 0263/4487] entered into RCS --- sysdeps/unix/sysv/irix4/wait.S | 40 ++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 sysdeps/unix/sysv/irix4/wait.S diff --git a/sysdeps/unix/sysv/irix4/wait.S b/sysdeps/unix/sysv/irix4/wait.S new file mode 100644 index 0000000000..a50a5e6816 --- /dev/null +++ b/sysdeps/unix/sysv/irix4/wait.S @@ -0,0 +1,40 @@ +/* Copyright (C) 1992 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@cs.widener.edu). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +.set noreorder + +ENTRY(__wait) + /* Prep it for wait */ + move a1, zero + move a2, zero + + li v0, SYS_wait + syscall + beq a3, zero, noerror + nop + j syscall_error + nop +noerror: + beq a0, zero, noarg + nop + sw v1, 0(a0) + nop +noarg: + ret From c7edefbd7cf39d4b6cc41fdd6491289d302f9640 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 2 Nov 1993 18:47:48 +0000 Subject: [PATCH 0264/4487] Initial revision --- sysdeps/unix/sysv/irix4/signum.h | 68 ++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 sysdeps/unix/sysv/irix4/signum.h diff --git a/sysdeps/unix/sysv/irix4/signum.h b/sysdeps/unix/sysv/irix4/signum.h new file mode 100644 index 0000000000..d1e2b21623 --- /dev/null +++ b/sysdeps/unix/sysv/irix4/signum.h @@ -0,0 +1,68 @@ +/* Copyright (C) 1992, 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@cygnus.com). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifdef _SIGNAL_H + +/* This file defines the fake signal functions and signal + number constants for System V Release 4 UNIX. */ + +/* Fake signal functions. */ +#define SIG_ERR ((__sighandler_t) -1) +#define SIG_DFL ((__sighandler_t) 0) +#define SIG_IGN ((__sighandler_t) 1) + + +/* Signals. */ +#define SIGHUP 1 /* Hangup (POSIX). */ +#define SIGINT 2 /* Interrupt (ANSI). */ +#define SIGQUIT 3 /* Quit (POSIX). */ +#define SIGILL 4 /* Illegal instruction (ANSI). */ +#define SIGABRT SIGIOT /* Abort (ANSI). */ +#define SIGTRAP 5 /* Trace trap (POSIX). */ +#define SIGIOT 6 /* IOT trap. */ +#define SIGEMT 7 /* EMT trap. */ +#define SIGFPE 8 /* Floating-point exception (ANSI). */ +#define SIGKILL 9 /* Kill, unblockable (POSIX). */ +#define SIGBUS 10 /* Bus error. */ +#define SIGSEGV 11 /* Segmentation violation (ANSI). */ +#define SIGSYS 12 /* Bad argument to system call*/ +#define SIGPIPE 13 /* Broken pipe (POSIX). */ +#define SIGALRM 14 /* Alarm clock (POSIX). */ +#define SIGTERM 15 /* Termination (ANSI). */ +#define SIGUSR1 16 /* User-defined signal 1 (POSIX). */ +#define SIGUSR2 17 /* User-defined signal 2 (POSIX). */ +#define SIGCHLD 18 /* Child status has changed (POSIX). */ +#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */ +#define SIGPWR 19 /* Power going down. */ +#define SIGSTOP 20 /* Stop, unblockable (POSIX). */ +#define SIGTSTP 21 /* Keyboard stop (POSIX). */ +#define SIGPOLL 22 /* Same as SIGIO? (SVID). */ +#define SIGIO 23 /* I/O now possible. */ +#define SIGURG 24 /* Urgent condition on socket.*/ +#define SIGWINCH 25 /* Window size change. */ +#define SIGVTALRM 26 /* Virtual alarm clock. */ +#define SIGPROF 27 /* Profiling alarm clock. */ +#define SIGCONT 28 /* Continue (POSIX). */ +#define SIGTTIN 29 /* Background read from tty (POSIX). */ +#define SIGTTOU 30 /* Background write to tty (POSIX). */ +#define SIGXCPU 31 /* CPU limit exceeded. */ +#define SIGXFSZ 32 /* File size limit exceeded. */ + +#endif /* included. */ + +#define _NSIG 33 /* Biggest signal number + 1. */ From 94cbbc939dbbb188e8c8c362e2e93bb8ef221ee5 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 3 Nov 1993 17:14:27 +0000 Subject: [PATCH 0265/4487] entered into RCS --- sysdeps/unix/sysv/irix4/direct.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 sysdeps/unix/sysv/irix4/direct.h diff --git a/sysdeps/unix/sysv/irix4/direct.h b/sysdeps/unix/sysv/irix4/direct.h new file mode 100644 index 0000000000..153087fef5 --- /dev/null +++ b/sysdeps/unix/sysv/irix4/direct.h @@ -0,0 +1,15 @@ +#ifndef MAXNAMLEN +#define MAXNAMLEN 255 +#endif + +struct direct + { + unsigned long int d_ino; + off_t d_off; + unsigned short int d_reclen; + char d_name[MAXNAMLEN + 1]; + }; + +#define D_NAMLEN(d) (strlen ((d)->d_name)) + +#define D_RECLEN(d) (d->d_reclen) From c2c77f1197d4b5e7e2a6ee8f92d8e750a2b55a52 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 9 Nov 1993 11:59:16 +0000 Subject: [PATCH 0266/4487] entered into RCS --- sysdeps/unix/bsd/sun/m68k/syscall.S | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 sysdeps/unix/bsd/sun/m68k/syscall.S diff --git a/sysdeps/unix/bsd/sun/m68k/syscall.S b/sysdeps/unix/bsd/sun/m68k/syscall.S new file mode 100644 index 0000000000..0a98da7c67 --- /dev/null +++ b/sysdeps/unix/bsd/sun/m68k/syscall.S @@ -0,0 +1,28 @@ +/* Copyright (C) 1993 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +ENTRY (syscall) + movel sp@, d0 /* Save return address in D0. */ + movel sp@(4), sp@ /* Put syscall number at top of stack. */ + movel d0, sp@(4) /* Put return address under it. */ + trap #0 /* Do syscall; pops number from stack. */ + jcs error + ret +error: jmp syscall_error From 53b4c8b8a47014846863ac94fefc0508466da271 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 9 Nov 1993 12:19:22 +0000 Subject: [PATCH 0267/4487] Initial revision --- sysdeps/unix/bsd/m68k/syscall.S | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 sysdeps/unix/bsd/m68k/syscall.S diff --git a/sysdeps/unix/bsd/m68k/syscall.S b/sysdeps/unix/bsd/m68k/syscall.S new file mode 100644 index 0000000000..960dbaca2b --- /dev/null +++ b/sysdeps/unix/bsd/m68k/syscall.S @@ -0,0 +1,26 @@ +/* Copyright (C) 1993 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +ENTRY (syscall) + moveal sp@+, a0 /* Pop return address into A0. */ + DO_CALL (sp@, 0) /* Do system call. */ + jmp a0@ /* Return to A0. */ +error: moveal a0, sp@- /* Error; push return address */ + jmp syscall_error /* and jump to error handler. */ From 0a255fb6c1fca1944b430068f83bd7210def08e3 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 9 Nov 1993 12:19:23 +0000 Subject: [PATCH 0268/4487] Formerly unix/bsd/hp/m68k/sysdep.h.~26~ --- sysdeps/unix/bsd/hp/m68k/sysdep.h | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/sysdeps/unix/bsd/hp/m68k/sysdep.h b/sysdeps/unix/bsd/hp/m68k/sysdep.h index a18ca0c0c2..eddb98f461 100644 --- a/sysdeps/unix/bsd/hp/m68k/sysdep.h +++ b/sysdeps/unix/bsd/hp/m68k/sysdep.h @@ -39,19 +39,12 @@ Cambridge, MA 02139, USA. */ .globl syscall_error; \ error: jmp syscall_error; \ ENTRY (name) \ - DO_CALL (syscall_name, args) + DO_CALL (POUND (SYS_ify (syscall_name), args) -#ifdef __STDC__ -#define DO_CALL(syscall_name, args) \ - movel POUND(SYS_##syscall_name), d0; \ +#define DO_CALL(syscall, args) \ + movel syscall, d0; \ trap POUND(0); \ bcs error -#else -#define DO_CALL(syscall_name, args) \ - movel POUND(SYS_/**/syscall_name), d0; \ - trap POUND(0); \ - bcs error -#endif #define ret rts #define r0 d0 From 766f5a17163d101f476126d2900bb8d4af2cbe4f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 9 Nov 1993 12:19:26 +0000 Subject: [PATCH 0269/4487] Formerly unix/bsd/hp/m68k/__brk.S.~6~ --- sysdeps/unix/bsd/hp/m68k/brk.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/bsd/hp/m68k/brk.S b/sysdeps/unix/bsd/hp/m68k/brk.S index fed4f8032d..12db4d3742 100644 --- a/sysdeps/unix/bsd/hp/m68k/brk.S +++ b/sysdeps/unix/bsd/hp/m68k/brk.S @@ -37,7 +37,7 @@ ENTRY (__brk) cmpl sp@(4), d0 ble 0f movel d0, sp@(4) -0: DO_CALL (brk, 1) +0: DO_CALL (#SYS_brk, 1) movel sp@(4), ___curbrk clrl d0 rts From 8cf99cec86a8c0ceff14dcc42d30c44c6c7e57dd Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 9 Nov 1993 12:19:28 +0000 Subject: [PATCH 0270/4487] Formerly unix/bsd/sony/newsos/m68k/sysdep.h.~4~ --- sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h b/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h index e045e01795..f707bb5178 100644 --- a/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h +++ b/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h @@ -39,23 +39,14 @@ Cambridge, MA 02139, USA. */ .globl syscall_error; \ error: jmp syscall_error; \ ENTRY (name) \ - DO_CALL (syscall_name, args) + DO_CALL (POUND (SYS_ify (syscall_name)), args) -#ifdef __STDC__ -#define DO_CALL(syscall_name, args) \ +#define DO_CALL(syscall, args) \ + movel syscall, d0; \ linkw fp, POUND(0); \ - movel POUND(SYS_##syscall_name), d0; \ trap POUND(0); \ unlk fp; \ bcs error -#else -#define DO_CALL(syscall_name, args) \ - linkw fp, POUND(0); \ - movel POUND(SYS_/**/syscall_name), d0; \ - trap POUND(0); \ - unlk fp; \ - bcs error -#endif #define ret rts #define r0 d0 From 36b6dba79f9c98182fa004d59c02c86bc93c938e Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 10 Nov 1993 11:42:10 +0000 Subject: [PATCH 0271/4487] entered into RCS --- sysdeps/m68k/fpu/__math.h | 6 +++--- sysdeps/unix/bsd/m68k/syscall.S | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h index ca95533fba..3d0d4dfbfd 100644 --- a/sysdeps/m68k/fpu/__math.h +++ b/sysdeps/m68k/fpu/__math.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -140,7 +140,7 @@ __m81_u(modf)(double __value, double *__iptr) return __value - __modf_int; } -extern __inline int +extern __inline __CONSTVALUE int __m81_u(__isinf)(double __value) { /* There is no branch-condition for infinity, @@ -151,7 +151,7 @@ __m81_u(__isinf)(double __value) return (__fpsr & (2 << (3 * 8))) ? (__value < 0 ? -1 : 1) : 0; } -extern __inline int +extern __inline __CONSTVALUE int __m81_u(__isnan)(double __value) { char __result; diff --git a/sysdeps/unix/bsd/m68k/syscall.S b/sysdeps/unix/bsd/m68k/syscall.S index 960dbaca2b..18ef815559 100644 --- a/sysdeps/unix/bsd/m68k/syscall.S +++ b/sysdeps/unix/bsd/m68k/syscall.S @@ -19,8 +19,8 @@ Cambridge, MA 02139, USA. */ #include ENTRY (syscall) - moveal sp@+, a0 /* Pop return address into A0. */ + movel sp@+, a0 /* Pop return address into A0. */ DO_CALL (sp@, 0) /* Do system call. */ jmp a0@ /* Return to A0. */ -error: moveal a0, sp@- /* Error; push return address */ +error: movel a0, sp@- /* Error; push return address */ jmp syscall_error /* and jump to error handler. */ From d66d490994f11413d2f69a33b7c91b520636bc60 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 24 Nov 1993 01:20:30 +0000 Subject: [PATCH 0272/4487] Formerly unix/sysv/sysv4/solaris2/sparc/sysdep.S.~3~ --- sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S index 43682f3e0d..cf5d272f4d 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S @@ -17,6 +17,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include +#define _ERRNO_H #include ENTRY(syscall_error) From b58d8a639652ddb7d4e2ccf3752989087aa66595 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 24 Nov 1993 01:20:34 +0000 Subject: [PATCH 0273/4487] Formerly unix/bsd/m68k/sysdep.S.~4~ --- sysdeps/unix/bsd/m68k/sysdep.S | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/bsd/m68k/sysdep.S b/sysdeps/unix/bsd/m68k/sysdep.S index fccc605d7f..a7f599c8f7 100644 --- a/sysdeps/unix/bsd/m68k/sysdep.S +++ b/sysdeps/unix/bsd/m68k/sysdep.S @@ -16,6 +16,7 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#define _ERRNO_H #include .globl syscall_error From b7395944e914bdf4e2429d96c55af7f185bb9b7e Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 24 Nov 1993 01:20:41 +0000 Subject: [PATCH 0274/4487] Formerly unix/bsd/vax/sysdep.S.~5~ --- sysdeps/unix/bsd/vax/sysdep.S | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/bsd/vax/sysdep.S b/sysdeps/unix/bsd/vax/sysdep.S index 74c366e4cd..9f39b8248a 100644 --- a/sysdeps/unix/bsd/vax/sysdep.S +++ b/sysdeps/unix/bsd/vax/sysdep.S @@ -16,6 +16,7 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#define _ERRNO_H #include .globl _errno From 74c074423504d521395e7117e09d3484fa89dbe1 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Fri, 3 Dec 1993 00:03:07 +0000 Subject: [PATCH 0275/4487] entered into RCS --- sysdeps/unix/bsd/sun/sunos4/wait4.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/bsd/sun/sunos4/wait4.c b/sysdeps/unix/bsd/sun/sunos4/wait4.c index f3c1659f95..3e9fdcbe63 100644 --- a/sysdeps/unix/bsd/sun/sunos4/wait4.c +++ b/sysdeps/unix/bsd/sun/sunos4/wait4.c @@ -25,12 +25,12 @@ Cambridge, MA 02139, USA. */ #include #include -extern pid_t __wait4_syscall __P ((pid_t pid, __WAIT_STATUS stat_loc, +extern pid_t __wait4_syscall __P ((pid_t pid, __WAIT_STATUS_DEFN stat_loc, int options, struct rusage *usage)); pid_t DEFUN(__wait4, (pid, stat_loc, options, usage), - pid_t pid AND __WAIT_STATUS stat_loc AND + pid_t pid AND __WAIT_STATUS_DEFN stat_loc AND int options AND struct rusage *usage) { switch (pid) From d1c66cfdd094282ba5382e65c5c04e4d2045daff Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Sun, 5 Dec 1993 06:53:02 +0000 Subject: [PATCH 0276/4487] Initial revision --- sysdeps/unix/bsd/ultrix4/mips/start.S | 70 +++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 sysdeps/unix/bsd/ultrix4/mips/start.S diff --git a/sysdeps/unix/bsd/ultrix4/mips/start.S b/sysdeps/unix/bsd/ultrix4/mips/start.S new file mode 100644 index 0000000000..7829211cab --- /dev/null +++ b/sysdeps/unix/bsd/ultrix4/mips/start.S @@ -0,0 +1,70 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 published by the Free Software Foundation; either version 2 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 Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#ifndef HAVE_GNU_LD +#define __environ environ +#endif + +.comm __environ, 4 +.comm errno, 4 + +ENTRY(__start) + .set noreorder + + /* The first thing on the stack is argc. */ + lw t0, 0(sp) + nop + + /* Set up the global pointer. We take up a nop spot here. */ + la gp, _gp + + /* Then set up argv. */ + addiu t1, sp, 4 + + /* To compute where envp is, first we have to jump ahead four + bytes from what argv was. This will bring us ahead, so we don't + need to compute the NULL at the end of argv later. */ + addiu v1, t1, 4 + + /* Now, compute the space to skip given the number of arguments + we've got. We do this by multiplying argc by 4. */ + sll v0, t0, 2 + + /* Now, add (argv+4) with the space to skip...that's envp. */ + addu v1, v1, v0 + move t2, v1 + + /* __environ = envp; */ + sw t2, __environ + + addiu sp, sp, -24 + + /* __libc_init (argc, argv, envp); */ + move a0, t0 + move a1, t1 + move a2, t2 + jal __libc_init + nop + + /* errno = 0; */ + sw zero, errno + + /* exit (main (argc, argv, envp)); */ + move a0, t0 + move a1, t1 + move a2, t2 + jal main + nop + + /* Make the value returned by main be the argument to exit. */ + jal exit + move a0, v0 From 39208af4678f18786e26a1f23e525965b17ac3c3 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Sun, 5 Dec 1993 06:54:56 +0000 Subject: [PATCH 0277/4487] entered into RCS --- sysdeps/unix/bsd/ultrix4/mips/start.S | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/bsd/ultrix4/mips/start.S b/sysdeps/unix/bsd/ultrix4/mips/start.S index 7829211cab..108f7d9790 100644 --- a/sysdeps/unix/bsd/ultrix4/mips/start.S +++ b/sysdeps/unix/bsd/ultrix4/mips/start.S @@ -1,7 +1,15 @@ /* Copyright (C) 1993 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). -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 published by the Free Software Foundation; either version 2 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 Library General Public License for more details. +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If @@ -24,7 +32,7 @@ ENTRY(__start) lw t0, 0(sp) nop - /* Set up the global pointer. We take up a nop spot here. */ + /* Set up the global pointer. */ la gp, _gp /* Then set up argv. */ From dabd8459d0612fb5335c22136cc1c03fa952129f Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Tue, 7 Dec 1993 03:48:27 +0000 Subject: [PATCH 0278/4487] Formerly unix/sysv/sysv4/solaris2/sparc/sysdep.h.~4~ --- sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h index cd6ef7f990..758d23ea2e 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h @@ -35,7 +35,7 @@ Cambridge, MA 02139, USA. */ bcs C_SYMBOL_NAME(syscall_error); \ nop; \ retl; \ - mov %g0, %o0 + nop #define ret retl; nop #define r0 %o0 From cafe55ef2a3ab2d794524c5ee272369076aa28ac Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Tue, 7 Dec 1993 03:48:28 +0000 Subject: [PATCH 0279/4487] entered into RCS --- sysdeps/unix/sysv/sysv4/solaris2/direct.h | 39 ++++++++++++++++++++++ sysdeps/unix/sysv/sysv4/solaris2/statbuf.h | 2 +- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 sysdeps/unix/sysv/sysv4/solaris2/direct.h diff --git a/sysdeps/unix/sysv/sysv4/solaris2/direct.h b/sysdeps/unix/sysv/sysv4/solaris2/direct.h new file mode 100644 index 0000000000..f9822dcbc5 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/solaris2/direct.h @@ -0,0 +1,39 @@ +/* Copyright (C) 1992, 1993 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifndef _BSDDIR_H +#define _BSDDIR_H 1 + +#include + +/* This is the Solaris direct; it's the same as that in + sysdeps/unix/sysv/sysv4/direct.h, but it uses the length given by d_namlen, + since we can't reliably use tyhe sysv4/direct.h method of computing + the length. */ + +struct direct + { + unsigned long int d_fileno; + long int d_off; + unsigned short int d_reclen; + char d_name[NAME_MAX + 1]; + }; + +#define D_NAMLEN(d) (strlen ((d)->d_name)) + +#endif diff --git a/sysdeps/unix/sysv/sysv4/solaris2/statbuf.h b/sysdeps/unix/sysv/sysv4/solaris2/statbuf.h index eb994ddc11..ac74cdffa7 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/statbuf.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/statbuf.h @@ -24,7 +24,7 @@ Cambridge, MA 02139, USA. */ /* Structure describing file characteristics. */ struct stat { - short int st_dev; + unsigned long int st_dev; long st_filler1[3]; __ino_t st_ino; /* File serial number. */ unsigned long int st_mode; /* File mode. */ From 096400d53bac1f3a31a30097b4c99c2e659e9bd3 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Tue, 7 Dec 1993 04:52:10 +0000 Subject: [PATCH 0280/4487] entered into RCS --- sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h index 758d23ea2e..711fd8c7ff 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h @@ -33,8 +33,6 @@ Cambridge, MA 02139, USA. */ mov SYS_ify(syscall_name), %g1; \ ta 8; \ bcs C_SYMBOL_NAME(syscall_error); \ - nop; \ - retl; \ nop #define ret retl; nop From aac7bfb3e546ab31b9762c44694889decf9b46c6 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Sat, 18 Dec 1993 06:37:58 +0000 Subject: [PATCH 0281/4487] Formerly sysdeps/unix/sysv/sysv4/Dist.~7~ --- sysdeps/unix/sysv/sysv4/Dist | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/unix/sysv/sysv4/Dist b/sysdeps/unix/sysv/sysv4/Dist index ea0507ca8a..421ad473c3 100644 --- a/sysdeps/unix/sysv/sysv4/Dist +++ b/sysdeps/unix/sysv/sysv4/Dist @@ -1,3 +1,5 @@ sysconfig.h sysconfig.S pgrpsys.S +__waitid.S +siginfo.h From d5d075ee6b2738ac117b690cbabcc09407b2f6f6 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Sat, 18 Dec 1993 06:37:59 +0000 Subject: [PATCH 0282/4487] Initial revision --- sysdeps/unix/sysv/sysv4/__setpgid.c | 0 sysdeps/unix/sysv/sysv4/__waitid.S | 0 sysdeps/unix/sysv/sysv4/waitflags.h | 0 3 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 sysdeps/unix/sysv/sysv4/__setpgid.c create mode 100644 sysdeps/unix/sysv/sysv4/__waitid.S create mode 100644 sysdeps/unix/sysv/sysv4/waitflags.h diff --git a/sysdeps/unix/sysv/sysv4/__setpgid.c b/sysdeps/unix/sysv/sysv4/__setpgid.c new file mode 100644 index 0000000000..e69de29bb2 diff --git a/sysdeps/unix/sysv/sysv4/__waitid.S b/sysdeps/unix/sysv/sysv4/__waitid.S new file mode 100644 index 0000000000..e69de29bb2 diff --git a/sysdeps/unix/sysv/sysv4/waitflags.h b/sysdeps/unix/sysv/sysv4/waitflags.h new file mode 100644 index 0000000000..e69de29bb2 From 32ce7e8a01fc690cb10f8ce29cbdb103441c72c3 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Sat, 18 Dec 1993 06:38:01 +0000 Subject: [PATCH 0283/4487] entered into RCS --- sysdeps/unix/sysv/sysv4/__setpgid.c | 31 +++++++++++++++++++++++++ sysdeps/unix/sysv/sysv4/__waitid.S | 25 ++++++++++++++++++++ sysdeps/unix/sysv/sysv4/getpgid.c | 2 +- sysdeps/unix/sysv/sysv4/pipestream.c | 2 ++ sysdeps/unix/sysv/sysv4/setpgid.c | 2 +- sysdeps/unix/sysv/sysv4/waitflags.h | 34 ++++++++++++++++++++++++++++ 6 files changed, 94 insertions(+), 2 deletions(-) create mode 100644 sysdeps/unix/sysv/sysv4/pipestream.c diff --git a/sysdeps/unix/sysv/sysv4/__setpgid.c b/sysdeps/unix/sysv/sysv4/__setpgid.c index e69de29bb2..594e4e9fe6 100644 --- a/sysdeps/unix/sysv/sysv4/__setpgid.c +++ b/sysdeps/unix/sysv/sysv4/__setpgid.c @@ -0,0 +1,31 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include + +extern int __pgrpsys __P ((int type, ...)); + +/* Get the process group ID of process PID. */ +int +DEFUN(__setpgid, (pid, pgid), pid_t pid AND pid_t pgid) +{ + return __pgrpsys (5, pid, pgid); +} diff --git a/sysdeps/unix/sysv/sysv4/__waitid.S b/sysdeps/unix/sysv/sysv4/__waitid.S index e69de29bb2..845bec85e2 100644 --- a/sysdeps/unix/sysv/sysv4/__waitid.S +++ b/sysdeps/unix/sysv/sysv4/__waitid.S @@ -0,0 +1,25 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +/* XXX */ +#define SYS_waitid SYS_waitsys + +SYSCALL__ (waitid, 3) + ret diff --git a/sysdeps/unix/sysv/sysv4/getpgid.c b/sysdeps/unix/sysv/sysv4/getpgid.c index fad49702a0..f777769924 100644 --- a/sysdeps/unix/sysv/sysv4/getpgid.c +++ b/sysdeps/unix/sysv/sysv4/getpgid.c @@ -27,5 +27,5 @@ extern int __pgrpsys __P ((int type, ...)); int DEFUN(__getpgrp, (pid), pid_t pid) { - return __pgrpsys (4, pid); + return __pgrpsys (0, pid); } diff --git a/sysdeps/unix/sysv/sysv4/pipestream.c b/sysdeps/unix/sysv/sysv4/pipestream.c new file mode 100644 index 0000000000..6a32f9507c --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/pipestream.c @@ -0,0 +1,2 @@ +/* We deliberately avoid having NO_WAITPID set. */ +#include diff --git a/sysdeps/unix/sysv/sysv4/setpgid.c b/sysdeps/unix/sysv/sysv4/setpgid.c index 4237a0b3c3..90eff3c51c 100644 --- a/sysdeps/unix/sysv/sysv4/setpgid.c +++ b/sysdeps/unix/sysv/sysv4/setpgid.c @@ -28,5 +28,5 @@ extern int __pgrpsys __P ((int type, ...)); int DEFUN(__setpgrp, (pid, pgid), int pid AND int pgid) { - return __pgrpsys (5, pid, pgid); + return __pgrpsys (1, pid, pgid); } diff --git a/sysdeps/unix/sysv/sysv4/waitflags.h b/sysdeps/unix/sysv/sysv4/waitflags.h index e69de29bb2..cdb6f29e1d 100644 --- a/sysdeps/unix/sysv/sysv4/waitflags.h +++ b/sysdeps/unix/sysv/sysv4/waitflags.h @@ -0,0 +1,34 @@ +/* Definitions of flag bits for `waitpid' et al. + Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifndef _WAITFLAGS_H + +#define _WAITFLAGS_H 1 + +/* Bits in the third argument to `waitpid'. */ +#define WNOHANG 64 /* Don't block waiting. */ +#define WUNTRACED 4 /* Report status of stopped children. */ + +#ifdef __USE_SVID +#define WEXITED 1 /* Look for children that have exited. */ +#define WTRAPPED 2 /* Look for processes that stopped + while tracing. */ +#endif + +#endif /* waitflags.h */ From 39224cc9be82c0a2abf08c6ae3b98823d42dd262 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Sat, 18 Dec 1993 06:38:01 +0000 Subject: [PATCH 0284/4487] Initial revision --- sysdeps/unix/sysv/sysv4/siginfo.h | 0 sysdeps/unix/sysv/sysv4/waitpid.c | 99 +++++++++++++++++++++++++++++++ 2 files changed, 99 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/siginfo.h create mode 100644 sysdeps/unix/sysv/sysv4/waitpid.c diff --git a/sysdeps/unix/sysv/sysv4/siginfo.h b/sysdeps/unix/sysv/sysv4/siginfo.h new file mode 100644 index 0000000000..e69de29bb2 diff --git a/sysdeps/unix/sysv/sysv4/waitpid.c b/sysdeps/unix/sysv/sysv4/waitpid.c new file mode 100644 index 0000000000..4466141b19 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/waitpid.c @@ -0,0 +1,99 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include +#include +#include "siginfo.h" + +typedef enum __idtype +{ + /* Look for processes based upon a given PID. */ + P_PID, + + /* Look for processes based upon a given process-group ID. */ + P_PGID = 2, + + /* Look for any process. */ + P_ALL = 7, +} __idtype_t; + +extern __pid_t __getpgid __P ((__pid_t pid)); +extern int __waitid __P ((__idtype_t idtype, __pid_t id, + __siginfo_t *infop, int options)); + +/* Wait for a child matching PID to die. + If PID is greater than 0, match any process whose process ID is PID. + If PID is (pid_t) -1, match any process. + If PID is (pid_t) 0, match any process with the + same process group as the current process. + If PID is less than -1, match any process whose + process group is the absolute value of PID. + If the WNOHANG bit is set in OPTIONS, and that child + is not already dead, return (pid_t) 0. If successful, + return PID and store the dead child's status in STAT_LOC. + Return (pid_t) -1 for errors. If the WUNTRACED bit is set in OPTIONS, + return status for stopped children; otherwise don't. */ + +__pid_t +DEFUN(__waitpid, (__pid, __stat_loc, __options), + __pid_t __pid AND int *__stat_loc AND int __options) +{ + __idtype_t idtype; + __pid_t tmp_pid = __pid; + __siginfo_t infop; + + if (__pid <= WAIT_MYPGRP) + { + if (__pid == WAIT_ANY) + { + /* Request the status for any child. */ + idtype = P_ALL; + } + else if (__pid == WAIT_MYPGRP) + { + /* Request the status for any child process that has + a pgid that's equal to that of our parent. */ + tmp_pid = __getpgid (0); + idtype = P_PGID; + } + else /* __pid < -1 */ + { + /* Request the status for any child whose pgid is equal + to the absolute value of PID. */ + tmp_pid = __pid & ~0; /* XXX not pseudo-insn */ + idtype = P_PGID; + } + } + else + { + /* Request the status for the child whose pid is PID. */ + idtype = P_PID; + } + + if (__waitid (idtype, tmp_pid, &infop, __options | WEXITED | WTRAPPED) < 0) + { + *__stat_loc = infop.__status; + return -1; + } + + *__stat_loc = infop.__status; + return __pid; +} From f30a71c1e3681e703045afc327b647bf6983eb21 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Sat, 18 Dec 1993 06:38:02 +0000 Subject: [PATCH 0285/4487] Formerly unix/sysv/sysv4/siginfo.h.~2~ --- sysdeps/unix/sysv/sysv4/siginfo.h | 44 +++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/sysdeps/unix/sysv/sysv4/siginfo.h b/sysdeps/unix/sysv/sysv4/siginfo.h index e69de29bb2..16b1bacb19 100644 --- a/sysdeps/unix/sysv/sysv4/siginfo.h +++ b/sysdeps/unix/sysv/sysv4/siginfo.h @@ -0,0 +1,44 @@ +/* Definitions of the siginfo structure. + Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifndef _SIGINFO_H +#define _SIGINFO_H 1 + +#ifdef __USE_SVID +/* SVR4 puts a ton of other stuff in this structure. For now, we'll just + define the two things we really need out of it, and hope for the best. */ + +typedef struct __siginfo +{ + int filler1[3]; + + /* The PID of the child. */ + __pid_t __pid; + + int filler2; + + /* The child's status. */ + int __status; + + int filler3[26]; + +} __siginfo_t; + +#endif /* __USE_SVID */ +#endif /* siginfo.h */ From 6919548ee97a5a582edcd9fddd2b50dea0a05e5e Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Wed, 22 Dec 1993 01:34:24 +0000 Subject: [PATCH 0286/4487] entered into RCS --- sysdeps/unix/sysv/sysv4/i386/statbuf.h | 37 +++++++++++++------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/sysdeps/unix/sysv/sysv4/i386/statbuf.h b/sysdeps/unix/sysv/sysv4/i386/statbuf.h index b448dcb8c8..6f1bfed850 100644 --- a/sysdeps/unix/sysv/sysv4/i386/statbuf.h +++ b/sysdeps/unix/sysv/sysv4/i386/statbuf.h @@ -24,37 +24,36 @@ Cambridge, MA 02139, USA. */ /* Structure describing file characteristics. */ struct stat { - short int st_dev; + unsigned long st_dev; /* Device. */ long st_filler1[3]; - __ino_t st_ino; /* File serial number. */ - unsigned long int st_mode; /* File mode. */ - /* This is unsigned long instead of __nlink_t, since SVR4 has - a long nlink_t, not a short one. */ - unsigned long int 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.*/ - unsigned long int st_rdev; /* Device number, if device. */ + unsigned long st_ino; /* File serial number. */ + unsigned long st_mode; /* File mode. */ + unsigned long st_nlink; /* Link count. */ + long st_uid; /* User ID of the file's owner. */ + long st_gid; /* Group ID of the file's group.*/ + unsigned long st_rdev; /* Device number, if device. */ long st_filler2[2]; - __off_t st_size; /* Size of file, in bytes. */ + long st_size; /* Size of file, in bytes. */ /* SVR4 added this extra long to allow for expansion of off_t. */ long st_filler3; - __time_t st_atime; /* Time of last access. */ - unsigned long int st_atime_usec; - __time_t st_mtime; /* Time of last modification. */ - unsigned long int st_mtime_usec; - __time_t st_ctime; /* Time of last status change. */ - unsigned long int st_ctime_usec; + long st_atime; /* Time of last access. */ + unsigned long st_atime_usec; + long st_mtime; /* Time of last modification. */ + unsigned long st_mtime_usec; + long st_ctime; /* Time of last status change. */ + unsigned long st_ctime_usec; long st_blksize; /* Optimal block size for I/O. */ #define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ long st_blocks; /* Number of 512-byte blocks allocated. */ + char st_fstype[16]; /* The type of this filesystem. */ int st_aclcnt; - unsigned long int st_level; - unsigned long int st_flags; - unsigned long int st_cmwlevel; + unsigned long st_level; + unsigned long st_flags; + unsigned long st_cmwlevel; long st_filler4[4]; }; From 20c68d3f5d069703100923a9217931360ce5b8a4 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 22 Dec 1993 23:00:17 +0000 Subject: [PATCH 0287/4487] Formerly sysdeps/unix/sysv/sysv4/Dist.~8~ --- sysdeps/unix/sysv/sysv4/Dist | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/sysv4/Dist b/sysdeps/unix/sysv/sysv4/Dist index 421ad473c3..46c09807b4 100644 --- a/sysdeps/unix/sysv/sysv4/Dist +++ b/sysdeps/unix/sysv/sysv4/Dist @@ -3,3 +3,4 @@ sysconfig.S pgrpsys.S __waitid.S siginfo.h +__getpgid.c __setpgid.c From d871481858c29b2ad71874e587f3ac396ecd1f7f Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Thu, 23 Dec 1993 06:02:55 +0000 Subject: [PATCH 0288/4487] Initial revision --- sysdeps/alpha/DEFS.h | 0 sysdeps/alpha/macros.m4 | 0 sysdeps/unix/bsd/Attic/osf1/alpha/brk.S | 0 sysdeps/unix/bsd/Attic/osf1/alpha/killpg.S | 0 sysdeps/unix/bsd/Attic/osf1/alpha/pipe.S | 0 sysdeps/unix/bsd/Attic/osf1/alpha/sigpause.S | 0 sysdeps/unix/bsd/Attic/osf1/alpha/sigsetmask.S | 0 sysdeps/unix/bsd/Attic/osf1/alpha/start.S | 0 sysdeps/unix/bsd/Attic/osf1/alpha/statbuf.h | 0 sysdeps/unix/bsd/Attic/osf1/alpha/waitpid.c | 0 10 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 sysdeps/alpha/DEFS.h create mode 100644 sysdeps/alpha/macros.m4 create mode 100644 sysdeps/unix/bsd/Attic/osf1/alpha/brk.S create mode 100644 sysdeps/unix/bsd/Attic/osf1/alpha/killpg.S create mode 100644 sysdeps/unix/bsd/Attic/osf1/alpha/pipe.S create mode 100644 sysdeps/unix/bsd/Attic/osf1/alpha/sigpause.S create mode 100644 sysdeps/unix/bsd/Attic/osf1/alpha/sigsetmask.S create mode 100644 sysdeps/unix/bsd/Attic/osf1/alpha/start.S create mode 100644 sysdeps/unix/bsd/Attic/osf1/alpha/statbuf.h create mode 100644 sysdeps/unix/bsd/Attic/osf1/alpha/waitpid.c diff --git a/sysdeps/alpha/DEFS.h b/sysdeps/alpha/DEFS.h new file mode 100644 index 0000000000..e69de29bb2 diff --git a/sysdeps/alpha/macros.m4 b/sysdeps/alpha/macros.m4 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/brk.S b/sysdeps/unix/bsd/Attic/osf1/alpha/brk.S new file mode 100644 index 0000000000..e69de29bb2 diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/killpg.S b/sysdeps/unix/bsd/Attic/osf1/alpha/killpg.S new file mode 100644 index 0000000000..e69de29bb2 diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/pipe.S b/sysdeps/unix/bsd/Attic/osf1/alpha/pipe.S new file mode 100644 index 0000000000..e69de29bb2 diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/sigpause.S b/sysdeps/unix/bsd/Attic/osf1/alpha/sigpause.S new file mode 100644 index 0000000000..e69de29bb2 diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/sigsetmask.S b/sysdeps/unix/bsd/Attic/osf1/alpha/sigsetmask.S new file mode 100644 index 0000000000..e69de29bb2 diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/start.S b/sysdeps/unix/bsd/Attic/osf1/alpha/start.S new file mode 100644 index 0000000000..e69de29bb2 diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/statbuf.h b/sysdeps/unix/bsd/Attic/osf1/alpha/statbuf.h new file mode 100644 index 0000000000..e69de29bb2 diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/waitpid.c b/sysdeps/unix/bsd/Attic/osf1/alpha/waitpid.c new file mode 100644 index 0000000000..e69de29bb2 From 72d531d675d7655a4e8a7ad3a36f38288c4c864f Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Thu, 23 Dec 1993 06:27:57 +0000 Subject: [PATCH 0289/4487] entered into RCS --- sysdeps/alpha/DEFS.h | 27 ++++++ sysdeps/alpha/Dist | 3 + sysdeps/alpha/Makefile | 88 +++++++++++++++++++ sysdeps/alpha/__math.h | 2 +- sysdeps/alpha/copysign.c | 10 ++- sysdeps/alpha/divrem.m4 | 48 ++++++++++ sysdeps/alpha/fabs.c | 10 ++- sysdeps/alpha/macros.m4 | 34 +++++++ sysdeps/alpha/memchr.c | 31 +++++-- sysdeps/alpha/remqu.S | 60 +++++++++++++ sysdeps/alpha/setjmp.S | 1 + sysdeps/alpha/strchr.c | 31 +++---- sysdeps/alpha/strlen.c | 12 ++- sysdeps/unix/bsd/Attic/osf1/alpha/brk.S | 51 +++++++++++ sysdeps/unix/bsd/Attic/osf1/alpha/fork.S | 23 +++++ sysdeps/unix/bsd/Attic/osf1/alpha/getdents.S | 22 +++++ sysdeps/unix/bsd/Attic/osf1/alpha/killpg.S | 25 ++++++ sysdeps/unix/bsd/Attic/osf1/alpha/pipe.S | 28 ++++++ sysdeps/unix/bsd/Attic/osf1/alpha/recv.S | 25 ++++++ sysdeps/unix/bsd/Attic/osf1/alpha/send.S | 25 ++++++ sysdeps/unix/bsd/Attic/osf1/alpha/sigpause.S | 25 ++++++ .../unix/bsd/Attic/osf1/alpha/sigsetmask.S | 25 ++++++ sysdeps/unix/bsd/Attic/osf1/alpha/sigvec.S | 25 ++++++ sysdeps/unix/bsd/Attic/osf1/alpha/start.S | 70 +++++++++++++++ sysdeps/unix/bsd/Attic/osf1/alpha/statbuf.h | 75 ++++++++++++++++ sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.S | 40 +++++++++ sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.h | 68 ++++++++++++++ sysdeps/unix/bsd/Attic/osf1/alpha/vhangup.S | 25 ++++++ sysdeps/unix/bsd/Attic/osf1/alpha/wait4.S | 1 + sysdeps/unix/bsd/Attic/osf1/alpha/waitpid.c | 1 + 30 files changed, 869 insertions(+), 42 deletions(-) create mode 100644 sysdeps/alpha/divrem.m4 create mode 100644 sysdeps/alpha/remqu.S create mode 100644 sysdeps/unix/bsd/Attic/osf1/alpha/fork.S create mode 100644 sysdeps/unix/bsd/Attic/osf1/alpha/getdents.S create mode 100644 sysdeps/unix/bsd/Attic/osf1/alpha/recv.S create mode 100644 sysdeps/unix/bsd/Attic/osf1/alpha/send.S create mode 100644 sysdeps/unix/bsd/Attic/osf1/alpha/sigvec.S create mode 100644 sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.S create mode 100644 sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.h create mode 100644 sysdeps/unix/bsd/Attic/osf1/alpha/vhangup.S create mode 100644 sysdeps/unix/bsd/Attic/osf1/alpha/wait4.S diff --git a/sysdeps/alpha/DEFS.h b/sysdeps/alpha/DEFS.h index e69de29bb2..c2a4fc88ae 100644 --- a/sysdeps/alpha/DEFS.h +++ b/sysdeps/alpha/DEFS.h @@ -0,0 +1,27 @@ +#ifdef __STDC__ +#define FUNC__(name) \ + .align 3; \ + .globl __##name; \ + .ent __##name; \ + __##name: \ + lda sp, -16(sp); \ + .frame sp, 16, t9, 0; \ + .prologue 0 +#else +#define FUNC__(name) \ + .align 3; \ + .globl __/**/name; \ + .ent __/**/name,0; \ + __/**/name: \ + lda sp, -16(sp); \ + .frame sp, 16, t9, 0; \ + .prologue 0 +#endif + +#ifdef __STDC__ +#define NAME__(name) \ + __##name +#else +#define NAME__(name) \ + __/**/name +#endif diff --git a/sysdeps/alpha/Dist b/sysdeps/alpha/Dist index ad6ea0313a..c4ea856629 100644 --- a/sysdeps/alpha/Dist +++ b/sysdeps/alpha/Dist @@ -1 +1,4 @@ setjmp_aux.c +DEFS.h +divrem.m4 macros.m4 +divl.S divlu.S divq.S divqu.S reml.S remlu.S remq.S remqu.S diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile index 736414197a..5490776da6 100644 --- a/sysdeps/alpha/Makefile +++ b/sysdeps/alpha/Makefile @@ -1,3 +1,91 @@ +# Copyright (C) 1993 Free Software Foundation, Inc. +# Contributed by Brendan Kehoe (brendan@zen.org). + +# 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 published by the Free Software Foundation; either version 2 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 +# Library General Public License for more details. + +# You should have received a copy of the GNU Library General Public +# License along with the GNU C Library; see the file COPYING.LIB. If +# not, write to the Free Software Foundation, Inc., 675 Mass Ave, +# Cambridge, MA 02139, USA. + ifeq ($(subdir),setjmp) sysdep_routines := $(sysdep_routines) setjmp_aux endif + +ifeq ($(subdir),gnulib) +routines = $(divrem) +endif # gnulib + +# We distribute these files, even though they are generated, +# so as to avoid the need for a functioning m4 to build the library. +divrem := divl divlu divq divqu reml remlu remq remqu + ++divrem-NAME-divl := divl ++divrem-NAME-divlu := divlu ++divrem-NAME-divq := divq ++divrem-NAME-divqu := divqu ++divrem-NAME-reml := reml ++divrem-NAME-remlu := remlu ++divrem-NAME-remq := remq ++divrem-NAME-remqu := remqu ++divrem-NAME = $(+divrem-NAME-$(basename $(notdir $@))) + ++divrem-OP-divl := divl ++divrem-OP-divlu := divlu ++divrem-OP-divq := divq ++divrem-OP-divqu := divqu ++divrem-OP-reml := reml ++divrem-OP-remlu := remlu ++divrem-OP-remq := remq ++divrem-OP-remqu := remqu ++divrem-BASEOP-divl := div ++divrem-BASEOP-divlu := div ++divrem-BASEOP-divq := div ++divrem-BASEOP-divqu := div ++divrem-BASEOP-reml := rem ++divrem-BASEOP-remlu := rem ++divrem-BASEOP-remq := rem ++divrem-BASEOP-remqu := rem ++divrem-S-divl := true ++divrem-S-divlu := false ++divrem-S-divq := true ++divrem-S-divqu := false ++divrem-S-reml := true ++divrem-S-remlu := false ++divrem-S-remq := true ++divrem-S-remqu := false ++divrem-SIZE-divl := l ++divrem-SIZE-divlu := l ++divrem-SIZE-divq := q ++divrem-SIZE-divqu := q ++divrem-SIZE-reml := l ++divrem-SIZE-remlu := l ++divrem-SIZE-remq := q ++divrem-SIZE-remqu := q ++divrem-MODE-divl := l ++divrem-MODE-divlu := lu ++divrem-MODE-divq := q ++divrem-MODE-divqu := qu ++divrem-MODE-reml := l ++divrem-MODE-remlu := lu ++divrem-MODE-remq := q ++divrem-MODE-remqu := qu + +$(divrem:%=$(sysdep_dir)/alpha/%.S): $(sysdep_dir)/alpha/divrem.m4 $(sysdep_dir)/alpha/DEFS.h $(sysdep_dir)/alpha/macros.m4 + (echo "define(OP,\`$(+divrem-NAME)')\ + define(BASEOP,\`$(+divrem-BASEOP-$(+divrem-NAME))')\ + define(MODE,\`$(+divrem-MODE-$(+divrem-NAME))')\ + define(SIZE,\`$(+divrem-SIZE-$(+divrem-NAME))')\ + define(SIGNED,\`$(+divrem-S-$(+divrem-NAME))')\ + define(SYSDEP_DIR, \`$(sysdep_dir)/alpha')\ + /* This file is generated from divrem.m4; DO NOT EDIT! */"; \ + cat $<) | $(M4) > $@-tmp + mv $@-tmp $@ diff --git a/sysdeps/alpha/__math.h b/sysdeps/alpha/__math.h index 5461fca2ac..b06f716c50 100644 --- a/sysdeps/alpha/__math.h +++ b/sysdeps/alpha/__math.h @@ -18,7 +18,7 @@ Cambridge, MA 02139, USA. */ #if defined (__GNUC__) && !defined (__NO_MATH_INLINES) -extern __inline double +extern __inline __CONSTVALUE double __copysign (double __x, double __y) { __asm ("cpys %1, %2, %0" : "=f" (__x) : "f" (__y), "f" (__x)); diff --git a/sysdeps/alpha/copysign.c b/sysdeps/alpha/copysign.c index d86521c741..2136f6bfb0 100644 --- a/sysdeps/alpha/copysign.c +++ b/sysdeps/alpha/copysign.c @@ -16,12 +16,14 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#define __NO_MATH_INLINES + #include /* Return X with its sign changed to Y's. */ -double -__copysign (double x, double y) +__inline __CONSTVALUE double +__copysign (double __x, double __y) { - asm ("cpys %1, %2, %0" : "=f" (x) : "f" (y), "f" (x)); - return x; + __asm ("cpys %1, %2, %0" : "=f" (__x) : "f" (__y), "f" (__x)); + return __x; } diff --git a/sysdeps/alpha/divrem.m4 b/sysdeps/alpha/divrem.m4 new file mode 100644 index 0000000000..ab86128a16 --- /dev/null +++ b/sysdeps/alpha/divrem.m4 @@ -0,0 +1,48 @@ +/* For each N divided by D, we do: + result = (double) N / (double) D + Then, for each N mod D, we do: + result = N - (D * divMODE (N, D)) + + FIXME: + The q and qu versions won't deal with operands > 50 bits. We also + don't check for divide by zero. */ + +#include "DEFS.h" +#if 0 +/* We do not handle div by zero yet. */ +#include +#endif +#include + +define(path, `SYSDEP_DIR/macros.m4')dnl +include(path) + +FUNC__(OP) + ! First set up the dividend. + EXTEND(t10) + stq t10,0(sp) + ldt $f10,0(sp) + cvtqt $f10,$f10 + ADJQU($f10) + + ! Then set up the divisor. + EXTEND(t11) + stq t11,0(sp) + ldt $f1,0(sp) + cvtqt $f1,$f1 + ADJQU($f1) + + ! Do the division. + divt $f10,$f1,$f10 + cvttqc $f10,$f10 + + ! Put the result in t12. + stt $f10,0(sp) + ldq t12,0(sp) + FULLEXTEND(t12) + + DOREM + + lda sp,16(sp) + ret zero,(t9),1 + .end NAME__(OP) diff --git a/sysdeps/alpha/fabs.c b/sysdeps/alpha/fabs.c index 936202704a..321df0d1e1 100644 --- a/sysdeps/alpha/fabs.c +++ b/sysdeps/alpha/fabs.c @@ -16,11 +16,13 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#define __NO_MATH_INLINES + #include -double -fabs (double x) +__inline double +fabs (double __x) { - asm ("cpys $f31, %1, %0" : "=f" (x) : "f" (x)); - return x; + __asm ("cpys $f31, %1, %0" : "=f" (__x) : "f" (__x)); + return __x; } diff --git a/sysdeps/alpha/macros.m4 b/sysdeps/alpha/macros.m4 index e69de29bb2..982e705d19 100644 --- a/sysdeps/alpha/macros.m4 +++ b/sysdeps/alpha/macros.m4 @@ -0,0 +1,34 @@ +dnl NOTE: The $1 below is the argument to EXTEND, not register $1. +define(EXTEND, +`ifelse(SIZE, `l', +`ifelse(SIGNED, `true', +` sextl $1, $1 +',dnl +` zapnot $1, 0xf, $1 +')')')dnl + +dnl FULLEXTEND -- extend the register named in the first argument +define(FULLEXTEND, +`ifelse(SIZE, `l', +` sextl $1, $1 +')')dnl + +dnl This is used by divqu. +define(ADJQU, +`ifelse(MODE, `qu', +` ldit $f26, 18446744073709551616.0 + addt $f26, $1, $f26 + fcmovlt $1, $f26, $1 +')')dnl + +define(DOREM, +`ifelse(BASEOP, `rem', +` ! Compute the remainder. +ifelse(SIZE, `l', +` mull t11, t12, t11 + subl t10, t11, t12 +',dnl Note mulq/subq were only really used in remq, but we will find out +dnl if assuming they apply to remqu as well is wrong or not. +` mulq t11, t12, t11 + subq t10, t11, t12 +')')')dnl diff --git a/sysdeps/alpha/memchr.c b/sysdeps/alpha/memchr.c index 048c9fa250..c6f99bfd6f 100644 --- a/sysdeps/alpha/memchr.c +++ b/sysdeps/alpha/memchr.c @@ -25,6 +25,7 @@ memchr (const void *s, int c, size_t n) const char *char_ptr; const unsigned long int *longword_ptr; unsigned long int charmask; + size_t x; c = (unsigned char) c; @@ -35,18 +36,29 @@ memchr (const void *s, int c, size_t n) if (*char_ptr == c) return (void *) char_ptr; + if (n == (size_t)0) + return NULL; + + x = n; + longword_ptr = (unsigned long int *) char_ptr; /* Set up a longword, each of whose bytes is C. */ charmask = c | (c << 8); charmask |= charmask << 16; charmask |= charmask << 32; + charmask |= charmask << 64; for (;;) { const unsigned long int longword = *longword_ptr++; int ge, le; + if (x < 4) + x = (size_t) 0; + else + x -= 4; + /* Set bits in GE if bytes in CHARMASK are >= bytes in LONGWORD. */ asm ("cmpbge %1, %2, %0" : "=r" (ge) : "r" (charmask), "r" (longword)); @@ -58,15 +70,18 @@ memchr (const void *s, int c, size_t n) { /* Which of the bytes was the C? */ - char *cp = (char *) (longword_ptr - 1); + unsigned char *cp = (unsigned char *) (longword_ptr - 1); + int i; - if (cp[0] == c) - return cp; - if (cp[1] == c) - return &cp[1]; - if (cp[2] == c) - return &cp[2]; - return &cp[3]; + for (i = 0; i < 6; i++) + if (cp[i] == c) + return &cp[i]; + return &cp[7]; } + + if (x == (size_t)0) + break; } + + return NULL; } diff --git a/sysdeps/alpha/remqu.S b/sysdeps/alpha/remqu.S new file mode 100644 index 0000000000..4bdc3db394 --- /dev/null +++ b/sysdeps/alpha/remqu.S @@ -0,0 +1,60 @@ + /* This file is generated from divrem.m4; DO NOT EDIT! */ +/* For each N divided by D, we do: + result = (double) N / (double) D + Then, for each N mod D, we do: + result = N - (D * divMODE (N, D)) + + FIXME: + The q and qu versions won't deal with operands > 50 bits. We also + don't check for divide by zero. */ + +#include "DEFS.h" +#if 0 +/* We do not handle div by zero yet. */ +#include +#endif +#include + + + + + + +FUNC__(remqu) + ! First set up the dividend. + + stq t10,0(sp) + ldt $f10,0(sp) + cvtqt $f10,$f10 + ldit $f26, 18446744073709551616.0 + addt $f26, $f10, $f26 + fcmovlt $f10, $f26, $f10 + + + ! Then set up the divisor. + + stq t11,0(sp) + ldt $f1,0(sp) + cvtqt $f1,$f1 + ldit $f26, 18446744073709551616.0 + addt $f26, $f1, $f26 + fcmovlt $f1, $f26, $f1 + + + ! Do the division. + divt $f10,$f1,$f10 + cvttqc $f10,$f10 + + ! Put the result in t12. + stt $f10,0(sp) + ldq t12,0(sp) + + + ! Compute the remainder. + mulq t11, t12, t11 + subq t10, t11, t12 + + + lda sp,16(sp) + ret zero,(t9),1 + .end NAME__(remqu) diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S index a5de80cd38..3880d0ffdf 100644 --- a/sysdeps/alpha/setjmp.S +++ b/sysdeps/alpha/setjmp.S @@ -26,3 +26,4 @@ ENTRY (__setjmp) bis $15, $15, $17 /* Pass FP as 2nd arg. */ bis $30, $30, $18 /* Pass SP as 3nd arg. */ jmp $31, ($27), __setjmp_aux /* Call __setjmp_aux. */ + .end __setjmp diff --git a/sysdeps/alpha/strchr.c b/sysdeps/alpha/strchr.c index db279ded8b..fc56d518cc 100644 --- a/sysdeps/alpha/strchr.c +++ b/sysdeps/alpha/strchr.c @@ -32,10 +32,10 @@ strchr (const char *str, int c) /* Handle the first few characters by reading one character at a time. Do this until STR is aligned on a 8-byte border. */ for (char_ptr = str; ((unsigned long int) char_ptr & 7) != 0; ++char_ptr) - if (*char_ptr == '\0') - return NULL; - else if (*char_ptr == c) + if (*char_ptr == c) return (char *) char_ptr; + else if (*char_ptr == '\0') + return NULL; longword_ptr = (unsigned long int *) char_ptr; @@ -43,6 +43,7 @@ strchr (const char *str, int c) charmask = c | (c << 8); charmask |= charmask << 16; charmask |= charmask << 32; + charmask |= charmask << 64; for (;;) { @@ -64,21 +65,15 @@ strchr (const char *str, int c) /* Which of the bytes was the C? */ char *cp = (char *) (longword_ptr - 1); - - if (cp[0] == c) - return cp; - if (cp[0] == 0) - return NULL; - if (cp[1] == c) - return &cp[1]; - if (cp[1] == 0) - return NULL; - if (cp[2] == c) - return &cp[2]; - if (cp[2] == 0) - return NULL; - if (cp[3] == c) - return &cp[3]; + int i; + + for (i = 0; i < 8; i++) + { + if (cp[i] == c) + return &cp[i]; + if (cp[i] == 0) + return NULL; + } return NULL; } } diff --git a/sysdeps/alpha/strlen.c b/sysdeps/alpha/strlen.c index 3fd1b252a0..d7744476ad 100644 --- a/sysdeps/alpha/strlen.c +++ b/sysdeps/alpha/strlen.c @@ -43,14 +43,12 @@ strlen (const char *str) /* Which of the bytes was the zero? */ const char *cp = (const char *) (longword_ptr - 1); + int i; - if (cp[0] == 0) - return cp - str; - if (cp[1] == 0) - return cp - str + 1; - if (cp[2] == 0) - return cp - str + 2; - return cp - str + 3; + for (i = 0; i < 6; i++) + if (cp[i] == 0) + return cp - str + i; + return cp - str + 7; } } } diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/brk.S b/sysdeps/unix/bsd/Attic/osf1/alpha/brk.S index e69de29bb2..1475108d64 100644 --- a/sysdeps/unix/bsd/Attic/osf1/alpha/brk.S +++ b/sysdeps/unix/bsd/Attic/osf1/alpha/brk.S @@ -0,0 +1,51 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#ifndef SYS_brk +#define SYS_brk 17 +#endif + +#ifndef HAVE_GNU_LD +#define __end end +#endif + +.data + .extern __end,8 + .globl __curbrk +__curbrk: + .quad __end + +.text +ENTRY(__brk) + ! FIXME We do not check for asking for less than a page yet. + ldiq v0, SYS_brk + call_pal PAL_callsys + bne a3, error + + /* Update __curbrk and exit cleanly. */ +! ldgp gp, 0(t12) + stl a0, __curbrk + + mov zero, v0 + ret + /* What a horrible way to die. */ +error: ldgp gp,0(gp) + jmp zero,syscall_error + .end __brk diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/fork.S b/sysdeps/unix/bsd/Attic/osf1/alpha/fork.S new file mode 100644 index 0000000000..8afcfbc43e --- /dev/null +++ b/sysdeps/unix/bsd/Attic/osf1/alpha/fork.S @@ -0,0 +1,23 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +SYSCALL__ (fork, 0) + cmovne a4, 0, v0 + ret diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/getdents.S b/sysdeps/unix/bsd/Attic/osf1/alpha/getdents.S new file mode 100644 index 0000000000..52f7cdbfea --- /dev/null +++ b/sysdeps/unix/bsd/Attic/osf1/alpha/getdents.S @@ -0,0 +1,22 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +SYSCALL__ (getdirentries, 4) + ret diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/killpg.S b/sysdeps/unix/bsd/Attic/osf1/alpha/killpg.S index e69de29bb2..f0b82b3d1a 100644 --- a/sysdeps/unix/bsd/Attic/osf1/alpha/killpg.S +++ b/sysdeps/unix/bsd/Attic/osf1/alpha/killpg.S @@ -0,0 +1,25 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#include +#define SYS_killpg SYS_ult_killpg + +SYSCALL (killpg, 2) + ret diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/pipe.S b/sysdeps/unix/bsd/Attic/osf1/alpha/pipe.S index e69de29bb2..6973e96031 100644 --- a/sysdeps/unix/bsd/Attic/osf1/alpha/pipe.S +++ b/sysdeps/unix/bsd/Attic/osf1/alpha/pipe.S @@ -0,0 +1,28 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +SYSCALL__ (pipe, 1) + /* Plop in the two descriptors. */ + stl r0, 0(a0) + stl r1, 4(a0) + + /* Go out with a clean status. */ + mov zero, r0 + ret diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/recv.S b/sysdeps/unix/bsd/Attic/osf1/alpha/recv.S new file mode 100644 index 0000000000..4ac00eb44e --- /dev/null +++ b/sysdeps/unix/bsd/Attic/osf1/alpha/recv.S @@ -0,0 +1,25 @@ +/* Copyright (C) 1991, 1992 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#include +#define SYS_recv SYS_ult_recv + +SYSCALL (recv, 4) + ret diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/send.S b/sysdeps/unix/bsd/Attic/osf1/alpha/send.S new file mode 100644 index 0000000000..ca46894a25 --- /dev/null +++ b/sysdeps/unix/bsd/Attic/osf1/alpha/send.S @@ -0,0 +1,25 @@ +/* Copyright (C) 1991, 1992 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#include +#define SYS_send SYS_ult_send + +SYSCALL (send, 4) + ret diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/sigpause.S b/sysdeps/unix/bsd/Attic/osf1/alpha/sigpause.S index e69de29bb2..893ee089eb 100644 --- a/sysdeps/unix/bsd/Attic/osf1/alpha/sigpause.S +++ b/sysdeps/unix/bsd/Attic/osf1/alpha/sigpause.S @@ -0,0 +1,25 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#include +#define SYS_sigpause SYS_ult_sigpause + +SYSCALL__ (sigpause, 1) + ret diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/sigsetmask.S b/sysdeps/unix/bsd/Attic/osf1/alpha/sigsetmask.S index e69de29bb2..f2536d7aff 100644 --- a/sysdeps/unix/bsd/Attic/osf1/alpha/sigsetmask.S +++ b/sysdeps/unix/bsd/Attic/osf1/alpha/sigsetmask.S @@ -0,0 +1,25 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#include +#define SYS_sigsetmask SYS_ult_sigsetmask + +SYSCALL__ (sigsetmask, 1) + ret diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/sigvec.S b/sysdeps/unix/bsd/Attic/osf1/alpha/sigvec.S new file mode 100644 index 0000000000..d0d3ae00ed --- /dev/null +++ b/sysdeps/unix/bsd/Attic/osf1/alpha/sigvec.S @@ -0,0 +1,25 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#include +#define SYS_sigvec SYS_ult_sigvec + +SYSCALL__ (sigvec, 3) + ret diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/start.S b/sysdeps/unix/bsd/Attic/osf1/alpha/start.S index e69de29bb2..d88b47e8e7 100644 --- a/sysdeps/unix/bsd/Attic/osf1/alpha/start.S +++ b/sysdeps/unix/bsd/Attic/osf1/alpha/start.S @@ -0,0 +1,70 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#ifndef HAVE_GNU_LD +#define __environ environ +#endif + +.comm __environ, 8 +.comm errno, 4 + +!.sdata +!.globl STARTFRM +!STARTFRM = 0 + +.text +ENTRY(__start) + lda sp, -16(sp) + stq zero, 8(sp) + + ! This branch puts the address of the current insn in t0. + br t0, 10f +10: + ! We set the GP register by using the address of the ldgp + ! (what we just put into t0). + ldgp gp, 0(t0) + + ! get argc + ldl a0, 16(sp) + + ! get argv + lda a1, 24(sp) + + ! move ahead to envp + s8addq a0, a1, a2 + addq a2, 0x8, a2 + + ! Store in environ. + stq a2, environ + + ! Clear out errno. +! ldgp gp, 0(t12) + stl zero, errno + + ! Call main. + jsr ra, main + ldgp gp, 0(ra) + + mov v0, a0 + + jsr ra, exit + ldgp gp, 0(ra) + + .end __start diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/statbuf.h b/sysdeps/unix/bsd/Attic/osf1/alpha/statbuf.h index e69de29bb2..9cadfaefd3 100644 --- a/sysdeps/unix/bsd/Attic/osf1/alpha/statbuf.h +++ b/sysdeps/unix/bsd/Attic/osf1/alpha/statbuf.h @@ -0,0 +1,75 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifndef _STATBUF_H +#define _STATBUF_H + +#include + +/* Structure describing file characteristics. */ +struct stat + { + int st_dev; /* Device. */ + unsigned int st_ino; /* File serial number. */ + unsigned int st_mode; /* File mode. */ + unsigned short st_nlink; /* Link count. */ + unsigned int st_uid; /* User ID of the file's owner. */ + unsigned int st_gid; /* Group ID of the file's group.*/ + int st_rdev; /* Device number, if device. */ + + long st_size; /* Size of file, in bytes. */ + + int st_atime; /* Time of last access. */ + int st_atime_usec; + int st_mtime; /* Time of last modification. */ + int st_mtime_usec; + int st_ctime; /* Time of last status change. */ + int st_ctime_usec; + + unsigned int st_blksize; /* Optimal block size for I/O. */ +#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ + + int st_blocks; /* Number of 512-byte blocks allocated. */ + unsigned int st_flags; + unsigned int st_gen; + }; + +/* Encoding of the file mode. */ + +#define __S_IFMT 0170000 /* These bits determine file type. */ + +/* File types. */ +#define __S_IFDIR 0040000 /* Directory. */ +#define __S_IFCHR 0020000 /* Character device. */ +#define __S_IFBLK 0060000 /* Block device. */ +#define __S_IFREG 0100000 /* Regular file. */ +#define __S_IFIFO 0010000 /* FIFO. */ + +#define __S_IFLNK 0120000 /* Symbolic link. */ +#define __S_IFSOCK 0140000 /* Socket. */ + +/* Protection bits. */ + +#define __S_ISUID 04000 /* Set user ID on execution. */ +#define __S_ISGID 02000 /* Set group ID on execution. */ +#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ +#define __S_IREAD 0400 /* Read by owner. */ +#define __S_IWRITE 0200 /* Write by owner. */ +#define __S_IEXEC 0100 /* Execute by owner. */ + +#endif /* statbuf.h */ diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.S b/sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.S new file mode 100644 index 0000000000..bc4865cef2 --- /dev/null +++ b/sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.S @@ -0,0 +1,40 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#define _ERRNO_H +#include + +ENTRY(syscall_error) +#ifdef EWOULDBLOCK_sys + /* We translate the system's EWOULDBLOCK error into EAGAIN. + The GNU C library always defines EWOULDBLOCK==EAGAIN. + EWOULDBLOCK_sys is the original number. */ + subq v0, EWOULDBLOCK_sys, t0 + cmoveq t0, EAGAIN, v0 +#endif + + /* Store it in errno... */ +! ldgp gp, 0(t12) + stl v0, errno + + /* And just kick back a -1. */ + ldil v0, -1 + ret + + .end syscall_error diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.h b/sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.h new file mode 100644 index 0000000000..279461b089 --- /dev/null +++ b/sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.h @@ -0,0 +1,68 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include /* get PAL_callsys */ +#include + +#ifdef __STDC__ +#define ENTRY(name) \ + .globl name; \ + .ent name,0; \ + name##:; \ + .frame sp,0,ra +#else +#define ENTRY(name) \ + .globl name; \ + .ent name,0; \ + name/**/:; \ + .frame sp,0,ra +#endif + +#ifdef __STDC__ +#define PSEUDO(name, syscall_name, args) \ + ENTRY(name); \ + ldiq v0, SYS_##syscall_name; \ + .set noat; \ + call_pal PAL_callsys; \ + .set at; \ + beq a3, 10f; \ + br gp, 20f; \ +20:; \ + ldgp gp, 0(gp); \ + jmp zero, syscall_error; \ +10: +#else +#define PSEUDO(name, syscall_name, args) \ + ENTRY(name); \ + ldiq v0, SYS_/**/syscall_name; \ + .set noat; \ + call_pal PAL_callsys; \ + .set at; \ + beq a3, 10f; \ + br gp, 20f; \ +20:; \ + ldgp gp, 0(gp); \ + jmp zero, syscall_error; \ +10: +#endif + +#define ret ret zero,(ra),1 +#define r0 v0 +#define r1 a4 +#define MOVE(x,y) mov x, y diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/vhangup.S b/sysdeps/unix/bsd/Attic/osf1/alpha/vhangup.S new file mode 100644 index 0000000000..d4d2b1c485 --- /dev/null +++ b/sysdeps/unix/bsd/Attic/osf1/alpha/vhangup.S @@ -0,0 +1,25 @@ +/* Copyright (C) 1991, 1992 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#include +#define SYS_vhangup SYS_ult_vhangup + +SYSCALL (vhangup, 1) + ret diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/wait4.S b/sysdeps/unix/bsd/Attic/osf1/alpha/wait4.S new file mode 100644 index 0000000000..0f76c625b6 --- /dev/null +++ b/sysdeps/unix/bsd/Attic/osf1/alpha/wait4.S @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/waitpid.c b/sysdeps/unix/bsd/Attic/osf1/alpha/waitpid.c index e69de29bb2..47129a8845 100644 --- a/sysdeps/unix/bsd/Attic/osf1/alpha/waitpid.c +++ b/sysdeps/unix/bsd/Attic/osf1/alpha/waitpid.c @@ -0,0 +1 @@ +#include From 1cfb0487a6fc04757046874a97d607df89556aa0 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 23 Dec 1993 23:51:09 +0000 Subject: [PATCH 0290/4487] Formerly m68k/Makefile.~9~ --- sysdeps/m68k/Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile index 188102dbf8..7d6f62de3e 100644 --- a/sysdeps/m68k/Makefile +++ b/sysdeps/m68k/Makefile @@ -37,7 +37,7 @@ endif ifdef as-pipe-ok define compile-command.S -$(CC) $(CPPFLAGS) $(asm-CPPFLAGS) -E $< \ +$(CC) $(CPPFLAGS) $(m68k-syntax-flag) $(asm-CPPFLAGS) -E $< \ | sed 's/(@@@Hash-Here@@@)/#/g' | $(AS) $(ASFLAGS) -o $@ endef @@ -45,7 +45,7 @@ else define compile-command.S @-rm -f $@s -$(CC) $(CPPFLAGS) $(asm-CPPFLAGS) -E $< \ +$(CC) $(CPPFLAGS) $(m68k-syntax-flag) $(asm-CPPFLAGS) -E $< \ | sed 's/(@@@Hash-Here@@@)/#/g' > $@s $(AS) $(ASFLAGS) $@s -o $@ -rm -f $@s @@ -53,3 +53,9 @@ endef endif +# The mpn functions need this. All existing 68k ports use MIT syntax. If +# a new port wants to use Motorola or Sony syntax, it can redefine this +# variable. +ifndef m68k-syntax-flag +m68k-syntax-flag = -DMIT_SYNTAX +endif From 36a0d2a23807e3fe0fb4796bc10b96257a7fd5b9 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 15 Jan 1994 00:09:40 +0000 Subject: [PATCH 0291/4487] entered into RCS --- sysdeps/unix/sysv/sco3.2.4/sysconf.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/sco3.2.4/sysconf.S b/sysdeps/unix/sysv/sco3.2.4/sysconf.S index 43af8694d3..58e14654d1 100644 --- a/sysdeps/unix/sysv/sco3.2.4/sysconf.S +++ b/sysdeps/unix/sysv/sco3.2.4/sysconf.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1994 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 @@ -21,7 +21,7 @@ Cambridge, MA 02139, USA. */ .globl __tzname_max ENTRY (__sysconf) - cmpl 4(%esp), $_SC_TZNAME_MAX /* Is the arg _SC_TZNAME_MAX? */ + cmpl $_SC_TZNAME_MAX, 4(%esp) /* Is the arg _SC_TZNAME_MAX? */ je tzname DO_CALL (sysconf, 1) /* No; use the SCO system call. */ ret From 10c3ad380a400a38c3a5e3fa6893803731efcaaf Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 16 Jan 1994 04:28:11 +0000 Subject: [PATCH 0292/4487] Initial revision --- sysdeps/unix/sysv/i386/sigreturn.S | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sysdeps/unix/sysv/i386/sigreturn.S diff --git a/sysdeps/unix/sysv/i386/sigreturn.S b/sysdeps/unix/sysv/i386/sigreturn.S new file mode 100644 index 0000000000..0e382a6465 --- /dev/null +++ b/sysdeps/unix/sysv/i386/sigreturn.S @@ -0,0 +1,25 @@ +/* Copyright (C) 19921994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +.text +ENTRY (__sigreturn) + addl $4, %esp /* Pop the return PC. */ + lcall $0xf, $0 /* Do the magic sigreturn trap. */ + /* NOTREACHED */ From 5b8c088836a4dd34f57f08302ab9fdc887f4b17e Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 16 Jan 1994 04:33:05 +0000 Subject: [PATCH 0293/4487] entered into RCS --- sysdeps/unix/sysv/i386/sigreturn.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/i386/sigreturn.S b/sysdeps/unix/sysv/i386/sigreturn.S index 0e382a6465..47905b36fa 100644 --- a/sysdeps/unix/sysv/i386/sigreturn.S +++ b/sysdeps/unix/sysv/i386/sigreturn.S @@ -1,4 +1,4 @@ -/* Copyright (C) 19921994 Free Software Foundation, Inc. +/* Copyright (C) 1994 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 From a6be4fb8c54e2da8592c2ccecf3f5b3177c2da3c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 17 Jan 1994 22:36:41 +0000 Subject: [PATCH 0294/4487] entered into RCS --- sysdeps/unix/bsd/sequent/i386/syscall.S | 31 +++++++++++++++++++++++++ sysdeps/unix/sysv/sco3.2.4/__setpgid.c | 30 ++++++++++++++++++++++++ sysdeps/unix/sysv/sco3.2.4/syscall.h | 3 +++ 3 files changed, 64 insertions(+) create mode 100644 sysdeps/unix/bsd/sequent/i386/syscall.S create mode 100644 sysdeps/unix/sysv/sco3.2.4/__setpgid.c diff --git a/sysdeps/unix/bsd/sequent/i386/syscall.S b/sysdeps/unix/bsd/sequent/i386/syscall.S new file mode 100644 index 0000000000..bebab8ee51 --- /dev/null +++ b/sysdeps/unix/bsd/sequent/i386/syscall.S @@ -0,0 +1,31 @@ +/* `syscall' function for Sequent Symmetry running Dynix version 3. +Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +.text +.globl syscall_error +.align 4 +ENTRY (syscall) + leal 8(%esp), %ecx /* Load address of second argument. */ + movl $SYS_HANDLER, %eax /* Use BSD system calls. */ + movw 4(%esp), %ax /* Load system call number into low word. */ + int $T_SVC6 /* Pretend it takes six args. */ + jb syscall_error + ret diff --git a/sysdeps/unix/sysv/sco3.2.4/__setpgid.c b/sysdeps/unix/sysv/sco3.2.4/__setpgid.c new file mode 100644 index 0000000000..3c4304c633 --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/__setpgid.c @@ -0,0 +1,30 @@ +/* Copyright (C) 1994 Free Software Foundation, Inc. + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include + +extern int __pgrpsys __P ((int type, ...)); + +/* Get the process group ID of process PID. */ +int +DEFUN(__setpgid, (pid, pgid), pid_t pid AND pid_t pgid) +{ + return __pgrpsys (2, pid, pgid); +} diff --git a/sysdeps/unix/sysv/sco3.2.4/syscall.h b/sysdeps/unix/sysv/sco3.2.4/syscall.h index 900a0a6525..316bd0d0ce 100644 --- a/sysdeps/unix/sysv/sco3.2.4/syscall.h +++ b/sysdeps/unix/sysv/sco3.2.4/syscall.h @@ -29,6 +29,7 @@ #define SYS_getdents 81 #define SYS_getgid 47 #define SYS_getgroups 0x2b28 +#define SYS_getitimer 0x3728 #define SYS_getmsg 85 #define SYS_getpid 20 #define SYS_getuid 24 @@ -48,6 +49,7 @@ #define SYS_open 5 #define SYS_pathconf 0x2e28 #define SYS_pause 29 +#define SYS_pgrpsys 39 #define SYS_pipe 42 #define SYS_plock 45 #define SYS_poll 87 @@ -69,6 +71,7 @@ #define SYS_semsys 53 #define SYS_setgid 46 #define SYS_setgroups 0x2c28 +#define SYS_setitimer 0x3828 #define SYS_setpgrp 39 #define SYS_setuid 23 #define SYS_shmsys 52 From d7fbd03bcf350f156356af0e2280c6c4b80c2db2 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 21 Jan 1994 22:06:15 +0000 Subject: [PATCH 0295/4487] Initial revision --- sysdeps/unix/sysv/sysv4/i386/stat.S | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/i386/stat.S diff --git a/sysdeps/unix/sysv/sysv4/i386/stat.S b/sysdeps/unix/sysv/sysv4/i386/stat.S new file mode 100644 index 0000000000..16319119fb --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/i386/stat.S @@ -0,0 +1,28 @@ +/* Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +.globl syscall_error +ENTRY (__stat) + popl %eax /* Pop return address into %eax. */ + pushl $2 /* Push extra first arg to syscall. */ + pushl %eax /* Push back the return address. */ + DO_CALL (xstat, 3) /* Do the syscall. */ + jb syscall_error /* Check for error. */ + ret /* Return success. */ From 593cac4d9b1c0e6babd59cde919f50a626dfbbf7 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 21 Jan 1994 22:09:15 +0000 Subject: [PATCH 0296/4487] entered into RCS --- sysdeps/unix/sysv/sysv4/i386/stat.S | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/sysv4/i386/stat.S b/sysdeps/unix/sysv/sysv4/i386/stat.S index 16319119fb..72829332fd 100644 --- a/sysdeps/unix/sysv/sysv4/i386/stat.S +++ b/sysdeps/unix/sysv/sysv4/i386/stat.S @@ -18,10 +18,17 @@ Cambridge, MA 02139, USA. */ #include +/* In SVR4 the `stat' call is actually done by the `xstat' system call, + which takes an additional first argument giving a version number for + `struct stat'. Likewise for `fstat' and `lstat' there are `fxstat' and + `lxstat' system calls. This macro gives the SVR4 version number that + corresponds to the definition of `struct stat' in . */ +#define _STAT_VER 2 + .globl syscall_error ENTRY (__stat) popl %eax /* Pop return address into %eax. */ - pushl $2 /* Push extra first arg to syscall. */ + pushl $_STAT_VER /* Push extra first arg to syscall. */ pushl %eax /* Push back the return address. */ DO_CALL (xstat, 3) /* Do the syscall. */ jb syscall_error /* Check for error. */ From fb4403ddeda4638d4d2e7b37cccdacc43e54dd58 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 21 Jan 1994 22:09:51 +0000 Subject: [PATCH 0297/4487] Initial revision --- sysdeps/unix/sysv/sysv4/i386/fstat.S | 35 ++++++++++++++++++++++++++++ sysdeps/unix/sysv/sysv4/i386/lstat.S | 35 ++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/i386/fstat.S create mode 100644 sysdeps/unix/sysv/sysv4/i386/lstat.S diff --git a/sysdeps/unix/sysv/sysv4/i386/fstat.S b/sysdeps/unix/sysv/sysv4/i386/fstat.S new file mode 100644 index 0000000000..7c6a132a89 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/i386/fstat.S @@ -0,0 +1,35 @@ +/* Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +/* In SVR4 the `stat' call is actually done by the `xstat' system call, + which takes an additional first argument giving a version number for + `struct stat'. Likewise for `fstat' and `lstat' there are `fxstat' and + `lxstat' system calls. This macro gives the SVR4 version number that + corresponds to the definition of `struct stat' in . */ +#define _STAT_VER 2 + +.globl syscall_error +ENTRY (__fstat) + popl %eax /* Pop return address into %eax. */ + pushl $_STAT_VER /* Push extra first arg to syscall. */ + pushl %eax /* Push back the return address. */ + DO_CALL (xfstat, 3) /* Do the syscall. */ + jb syscall_error /* Check for error. */ + ret /* Return success. */ diff --git a/sysdeps/unix/sysv/sysv4/i386/lstat.S b/sysdeps/unix/sysv/sysv4/i386/lstat.S new file mode 100644 index 0000000000..9282798803 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/i386/lstat.S @@ -0,0 +1,35 @@ +/* Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +/* In SVR4 the `stat' call is actually done by the `xstat' system call, + which takes an additional first argument giving a version number for + `struct stat'. Likewise for `fstat' and `lstat' there are `fxstat' and + `lxstat' system calls. This macro gives the SVR4 version number that + corresponds to the definition of `struct stat' in . */ +#define _STAT_VER 2 + +.globl syscall_error +ENTRY (__lstat) + popl %eax /* Pop return address into %eax. */ + pushl $_STAT_VER /* Push extra first arg to syscall. */ + pushl %eax /* Push back the return address. */ + DO_CALL (xlstat, 3) /* Do the syscall. */ + jb syscall_error /* Check for error. */ + ret /* Return success. */ From d993a9faf4ce42fba1b5ed0ace19e6d0521ad152 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 24 Jan 1994 22:56:11 +0000 Subject: [PATCH 0298/4487] Initial revision --- sysdeps/unix/sysv/sco3.2.4/system.c | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sysdeps/unix/sysv/sco3.2.4/system.c diff --git a/sysdeps/unix/sysv/sco3.2.4/system.c b/sysdeps/unix/sysv/sco3.2.4/system.c new file mode 100644 index 0000000000..cd97649be5 --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/system.c @@ -0,0 +1,3 @@ +/* SCO 3.2v4 does have `waitpid'. + Avoid unix/system.c, which says we don't. */ +#include From 065a020362219aa9f07b9527447a747fe7f38762 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 24 Jan 1994 22:56:32 +0000 Subject: [PATCH 0299/4487] entered into RCS --- sysdeps/unix/bsd/sun/sunos4/system.c | 2 ++ sysdeps/unix/bsd/ultrix4/system.c | 2 ++ sysdeps/unix/sysv/sysv4/system.c | 2 ++ 3 files changed, 6 insertions(+) create mode 100644 sysdeps/unix/bsd/sun/sunos4/system.c create mode 100644 sysdeps/unix/bsd/ultrix4/system.c create mode 100644 sysdeps/unix/sysv/sysv4/system.c diff --git a/sysdeps/unix/bsd/sun/sunos4/system.c b/sysdeps/unix/bsd/sun/sunos4/system.c new file mode 100644 index 0000000000..2c8e634bc8 --- /dev/null +++ b/sysdeps/unix/bsd/sun/sunos4/system.c @@ -0,0 +1,2 @@ +/* SunOS 4 does have `waitpid'. Avoid unix/system.c, which says we don't. */ +#include diff --git a/sysdeps/unix/bsd/ultrix4/system.c b/sysdeps/unix/bsd/ultrix4/system.c new file mode 100644 index 0000000000..b133fe77c0 --- /dev/null +++ b/sysdeps/unix/bsd/ultrix4/system.c @@ -0,0 +1,2 @@ +/* Ultrix 4 does have `waitpid'. Avoid unix/system.c, which says we don't. */ +#include diff --git a/sysdeps/unix/sysv/sysv4/system.c b/sysdeps/unix/sysv/sysv4/system.c new file mode 100644 index 0000000000..fbfe43f19a --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/system.c @@ -0,0 +1,2 @@ +/* SVR4 does have `waitpid'. Avoid unix/system.c, which says we don't. */ +#include From 0312ea95d955e74420995374422ae97acfec91e6 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 24 Jan 1994 23:01:28 +0000 Subject: [PATCH 0300/4487] Formerly sysdeps/unix/sysv/sysv4/__waitpid.c.~3~ --- sysdeps/unix/sysv/sysv4/waitpid.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/sysv4/waitpid.c b/sysdeps/unix/sysv/sysv4/waitpid.c index 4466141b19..4fd167a405 100644 --- a/sysdeps/unix/sysv/sysv4/waitpid.c +++ b/sysdeps/unix/sysv/sysv4/waitpid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1994 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -95,5 +95,9 @@ DEFUN(__waitpid, (__pid, __stat_loc, __options), } *__stat_loc = infop.__status; - return __pid; + + /* Return the PID out of the INFOP structure instead of the one we were + called with, to account for cases of being called with -1 to signify + any PID. */ + return infop.__pid; } From 9b86fd2eae0599d6b18e84b04df3b789c00fffc3 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 25 Jan 1994 19:35:24 +0000 Subject: [PATCH 0301/4487] Formerly unix/sysv/sco3.2.4/__waitpid.S.~3~ --- sysdeps/unix/sysv/sco3.2.4/waitpid.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/sco3.2.4/waitpid.S b/sysdeps/unix/sysv/sco3.2.4/waitpid.S index be6c19b03e..f16b643f2f 100644 --- a/sysdeps/unix/sysv/sco3.2.4/waitpid.S +++ b/sysdeps/unix/sysv/sco3.2.4/waitpid.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1994 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 @@ -24,7 +24,7 @@ ENTRY (__waitpid) pushfl /* Push the flags word. */ popl %eax /* Pop it into the accumulator. */ orl $0x8c4, %eax /* Set lots of bits. */ - pushl $eax /* Push the new flags word. */ + pushl %eax /* Push the new flags word. */ popfl /* Pop it into the flags. */ DO_CALL (wait, 2) movl 4(%esp), scratch /* Put status pointer in scratch register. */ From 84e961871cabd94e1ad3c4e46324fb7d18a06a3f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 27 Jan 1994 01:08:59 +0000 Subject: [PATCH 0302/4487] Formerly unix/sysv/sysv4/siginfo.h.~3~ --- sysdeps/unix/sysv/sysv4/siginfo.h | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/sysv4/siginfo.h b/sysdeps/unix/sysv/sysv4/siginfo.h index 16b1bacb19..7284b550a8 100644 --- a/sysdeps/unix/sysv/sysv4/siginfo.h +++ b/sysdeps/unix/sysv/sysv4/siginfo.h @@ -24,19 +24,34 @@ Cambridge, MA 02139, USA. */ /* SVR4 puts a ton of other stuff in this structure. For now, we'll just define the two things we really need out of it, and hope for the best. */ +/* These define the different states a child can have on exit. Need these +to build the correct status return for things like waitpid */ + +#define EXITED 1 +#define KILLED 2 +#define CORED 3 +#define TRAPPED 4 +#define STOPPED 5 +#define CONTINUED 6 + typedef struct __siginfo { - int filler1[3]; + int filler1; - /* The PID of the child. */ - __pid_t __pid; + /* Code indicating child's status */ + int __code; int filler2; + /* The PID of the child. */ + long __pid; + + int filler3; + /* The child's status. */ int __status; - int filler3[26]; + int filler4[26]; } __siginfo_t; From b973b356ecc59406e64e68d87db5d801fa41ad5a Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 27 Jan 1994 01:18:03 +0000 Subject: [PATCH 0303/4487] entered into RCS --- sysdeps/unix/sysv/sysv4/siginfo.h | 31 ++++++++--------- sysdeps/unix/sysv/sysv4/waitpid.c | 57 +++++++++++++++++++------------ 2 files changed, 51 insertions(+), 37 deletions(-) diff --git a/sysdeps/unix/sysv/sysv4/siginfo.h b/sysdeps/unix/sysv/sysv4/siginfo.h index 7284b550a8..ce8dd35bf1 100644 --- a/sysdeps/unix/sysv/sysv4/siginfo.h +++ b/sysdeps/unix/sysv/sysv4/siginfo.h @@ -1,5 +1,5 @@ /* Definitions of the siginfo structure. - Copyright (C) 1993 Free Software Foundation, Inc. + Copyright (C) 1993, 1994 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -24,9 +24,8 @@ Cambridge, MA 02139, USA. */ /* SVR4 puts a ton of other stuff in this structure. For now, we'll just define the two things we really need out of it, and hope for the best. */ -/* These define the different states a child can have on exit. Need these -to build the correct status return for things like waitpid */ - +/* These define the different states a child can have on exit. + We need these to build the status return for things like waitpid. */ #define EXITED 1 #define KILLED 2 #define CORED 3 @@ -35,25 +34,25 @@ to build the correct status return for things like waitpid */ #define CONTINUED 6 typedef struct __siginfo -{ - int filler1; + { + int filler1; - /* Code indicating child's status */ - int __code; + /* Code indicating child's status */ + int __code; - int filler2; + int filler2; - /* The PID of the child. */ - long __pid; + /* The PID of the child. */ + long __pid; - int filler3; + int filler3; - /* The child's status. */ - int __status; + /* The child's status. */ + int __status; - int filler4[26]; + int filler4[26]; -} __siginfo_t; + } __siginfo_t; #endif /* __USE_SVID */ #endif /* siginfo.h */ diff --git a/sysdeps/unix/sysv/sysv4/waitpid.c b/sysdeps/unix/sysv/sysv4/waitpid.c index 4fd167a405..a0ca8c2f12 100644 --- a/sysdeps/unix/sysv/sysv4/waitpid.c +++ b/sysdeps/unix/sysv/sysv4/waitpid.c @@ -24,16 +24,16 @@ Cambridge, MA 02139, USA. */ #include "siginfo.h" typedef enum __idtype -{ - /* Look for processes based upon a given PID. */ - P_PID, + { + /* Look for processes based upon a given PID. */ + P_PID, - /* Look for processes based upon a given process-group ID. */ - P_PGID = 2, + /* Look for processes based upon a given process-group ID. */ + P_PGID = 2, - /* Look for any process. */ - P_ALL = 7, -} __idtype_t; + /* Look for any process. */ + P_ALL = 7, + } __idtype_t; extern __pid_t __getpgid __P ((__pid_t pid)); extern int __waitid __P ((__idtype_t idtype, __pid_t id, @@ -53,32 +53,32 @@ extern int __waitid __P ((__idtype_t idtype, __pid_t id, return status for stopped children; otherwise don't. */ __pid_t -DEFUN(__waitpid, (__pid, __stat_loc, __options), - __pid_t __pid AND int *__stat_loc AND int __options) +DEFUN(__waitpid, (pid, stat_loc, options), + __pid_t pid AND int *stat_loc AND int options) { __idtype_t idtype; - __pid_t tmp_pid = __pid; + __pid_t tmp_pid = pid; __siginfo_t infop; - if (__pid <= WAIT_MYPGRP) + if (pid <= WAIT_MYPGRP) { - if (__pid == WAIT_ANY) + if (pid == WAIT_ANY) { /* Request the status for any child. */ idtype = P_ALL; } - else if (__pid == WAIT_MYPGRP) + else if (pid == WAIT_MYPGRP) { /* Request the status for any child process that has a pgid that's equal to that of our parent. */ tmp_pid = __getpgid (0); idtype = P_PGID; } - else /* __pid < -1 */ + else /* PID < -1 */ { /* Request the status for any child whose pgid is equal to the absolute value of PID. */ - tmp_pid = __pid & ~0; /* XXX not pseudo-insn */ + tmp_pid = pid & ~0; /* XXX not pseudo-insn */ idtype = P_PGID; } } @@ -88,14 +88,29 @@ DEFUN(__waitpid, (__pid, __stat_loc, __options), idtype = P_PID; } - if (__waitid (idtype, tmp_pid, &infop, __options | WEXITED | WTRAPPED) < 0) + if (__waitid (idtype, tmp_pid, &infop, options | WEXITED | WTRAPPED) < 0) + return -1; + + switch (infop.__code) { - *__stat_loc = infop.__status; - return -1; + case EXITED: + *stat_loc = W_EXITCODE (infop.__status, 0); + break; + case STOPPED: + case TRAPPED: + *stat_loc = W_STOPCODE (infop.__status); + break; + case KILLED: + /* Don't know what to do with continue, since it isn't documented. + Putting it here seemed the right place though. */ + case CONTINUED: + *stat_loc = infop.__status; + /* FALLTHROUGH */ + case CORED: + *stat_loc |= WCOREFLAG; + break; } - *__stat_loc = infop.__status; - /* Return the PID out of the INFOP structure instead of the one we were called with, to account for cases of being called with -1 to signify any PID. */ From e1b58f4d4a25eeaa6134ac9133aacab0c1f8108e Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 27 Jan 1994 03:07:02 +0000 Subject: [PATCH 0304/4487] entered into RCS --- sysdeps/unix/bsd/sequent/i386/getgroups.S | 42 +++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 sysdeps/unix/bsd/sequent/i386/getgroups.S diff --git a/sysdeps/unix/bsd/sequent/i386/getgroups.S b/sysdeps/unix/bsd/sequent/i386/getgroups.S new file mode 100644 index 0000000000..cf25abe043 --- /dev/null +++ b/sysdeps/unix/bsd/sequent/i386/getgroups.S @@ -0,0 +1,42 @@ +/* Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include + +/* Dynix erroneously reports `getgroups (0, 0)' as an error. + We fix up for that case. */ + +#define syscall_error myerror +SYSCALL__ (getgroups, 2) +#undef syscall_error + ret +myerror: + tstl 4(%esp) /* Was the first arg 0? */ + jnz syscall_error /* If not, go to the normal error case. */ + /* When called with (0, 0), we want to return the number of groups + without storing anything. The Dynix system call gives an error + for this case, so we fix up by calling it with a local array we + never use, and just use the return value. */ + subl %esp, $(NGROUPS_MAX * 4) /* Allocate a local array. */ + movl $NGROUPS_MAX, %ecx /* Pass NGROUPS_MAX for first arg. */ + movl %esp, %edx /* Pass local array for second arg. */ + DO_CALL (getgroups, 2) /* Do the system call. */ + addl %esp, $(NGROUPS_MAX * 4) /* Pop the local array. */ + jb syscall_error /* Check for error from the system call. */ + ret /* Return its value. */ From f075b1b2c0c8bb9dd7ec6504acbe8f96688612cf Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 1 Feb 1994 00:52:02 +0000 Subject: [PATCH 0305/4487] Formerly unix/bsd/m68k/sysdep.S.~5~ --- sysdeps/unix/bsd/m68k/sysdep.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/bsd/m68k/sysdep.S b/sysdeps/unix/bsd/m68k/sysdep.S index a7f599c8f7..1ec1ba4c94 100644 --- a/sysdeps/unix/bsd/m68k/sysdep.S +++ b/sysdeps/unix/bsd/m68k/sysdep.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993, 1994 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,7 +25,7 @@ syscall_error: The GNU C library always defines EWOULDBLOCK==EAGAIN. EWOULDBLOCK_sys is the original number. */ #ifdef __motorola__ -#ifdef EWOULDBLOCK_sys +#if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN cmp.l d0, #EWOULDBLOCK_sys bne store moveq.l #EAGAIN, d0 @@ -33,7 +33,7 @@ syscall_error: store: move.l d0, _errno moveq.l #-1, d0 #else -#ifdef EWOULDBLOCK_sys +#if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN cmpl d0, #EWOULDBLOCK_sys bne 0f moveq #EAGAIN, d0 From 6ad344f009f70524d5ab135aaf71ca851e3f6ab7 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 1 Feb 1994 00:52:15 +0000 Subject: [PATCH 0306/4487] Initial revision --- sysdeps/unix/mips/sysdep.S | 40 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 sysdeps/unix/mips/sysdep.S diff --git a/sysdeps/unix/mips/sysdep.S b/sysdeps/unix/mips/sysdep.S new file mode 100644 index 0000000000..d75217da5c --- /dev/null +++ b/sysdeps/unix/mips/sysdep.S @@ -0,0 +1,40 @@ +/* Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#define _ERRNO_H +#include + +/* .globl errno */ + +ENTRY(syscall_error) +#if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN + /* We translate the system's EWOULDBLOCK error into EAGAIN. + The GNU C library always defines EWOULDBLOCK==EAGAIN. + EWOULDBLOCK_sys is the original number. */ + bne v0, EWOULDBLOCK_sys, skip + nop + li v0, EAGAIN +skip: +#endif + /* Store it in errno... */ + sw v0, errno + + /* And just kick back a -1. */ + li v0, -1 + j ra From 64d88a4ad0e68ccc97f003a60ba0d818638e7f15 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 1 Feb 1994 00:52:23 +0000 Subject: [PATCH 0307/4487] entered into RCS --- sysdeps/unix/bsd/vax/sysdep.S | 4 ++-- sysdeps/unix/sysv/sysv4/i386/vfork.S | 1 + sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 sysdeps/unix/sysv/sysv4/i386/vfork.S diff --git a/sysdeps/unix/bsd/vax/sysdep.S b/sysdeps/unix/bsd/vax/sysdep.S index 9f39b8248a..618d889742 100644 --- a/sysdeps/unix/bsd/vax/sysdep.S +++ b/sysdeps/unix/bsd/vax/sysdep.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993, 1994 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 @@ -22,7 +22,7 @@ Cambridge, MA 02139, USA. */ .globl _errno .globl syscall_error syscall_error: -#ifdef EWOULDBLOCK_sys +#if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN /* We translate the system's EWOULDBLOCK error into EAGAIN. The GNU C library always defines EWOULDBLOCK==EAGAIN. EWOULDBLOCK_sys is the original number. */ diff --git a/sysdeps/unix/sysv/sysv4/i386/vfork.S b/sysdeps/unix/sysv/sysv4/i386/vfork.S new file mode 100644 index 0000000000..1cdebcded9 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/i386/vfork.S @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S index cf5d272f4d..da3cd6b8be 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1994 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -28,7 +28,7 @@ ENTRY(syscall_error) mov EINTR, %o0 notint: -#ifdef EWOULDBLOCK_sys +#if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN /* We translate the system's EWOULDBLOCK error into EAGAIN. The GNU C library always defines EWOULDBLOCK==EAGAIN. EWOULDBLOCK_sys is the original number. */ From 30d3e739362de618dce7dcdef13203f8e60b562d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 2 Feb 1994 22:10:28 +0000 Subject: [PATCH 0308/4487] Initial revision --- sysdeps/unix/sysv/sysv4/sigaltstack.S | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/sigaltstack.S diff --git a/sysdeps/unix/sysv/sysv4/sigaltstack.S b/sysdeps/unix/sysv/sysv4/sigaltstack.S new file mode 100644 index 0000000000..f7cf0d57f4 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/sigaltstack.S @@ -0,0 +1,2 @@ +/* SVR4 uses the BSD 4.4 sigaltstack syscall. */ +#include From f5516c0c0ca075989cb09451b9bee41255372067 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 2 Feb 1994 22:26:32 +0000 Subject: [PATCH 0309/4487] entered into RCS --- sysdeps/unix/sysv/sco3.2.4/sigsuspend.S | 1 + sysdeps/unix/sysv/sysv4/i386/fstat.S | 2 +- sysdeps/unix/sysv/sysv4/i386/lstat.S | 2 +- sysdeps/unix/sysv/sysv4/sigaltstack.S | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 sysdeps/unix/sysv/sco3.2.4/sigsuspend.S diff --git a/sysdeps/unix/sysv/sco3.2.4/sigsuspend.S b/sysdeps/unix/sysv/sco3.2.4/sigsuspend.S new file mode 100644 index 0000000000..9bce3878fd --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/sigsuspend.S @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/sysv4/i386/fstat.S b/sysdeps/unix/sysv/sysv4/i386/fstat.S index 7c6a132a89..bf83d6f301 100644 --- a/sysdeps/unix/sysv/sysv4/i386/fstat.S +++ b/sysdeps/unix/sysv/sysv4/i386/fstat.S @@ -30,6 +30,6 @@ ENTRY (__fstat) popl %eax /* Pop return address into %eax. */ pushl $_STAT_VER /* Push extra first arg to syscall. */ pushl %eax /* Push back the return address. */ - DO_CALL (xfstat, 3) /* Do the syscall. */ + DO_CALL (fxstat, 3) /* Do the syscall. */ jb syscall_error /* Check for error. */ ret /* Return success. */ diff --git a/sysdeps/unix/sysv/sysv4/i386/lstat.S b/sysdeps/unix/sysv/sysv4/i386/lstat.S index 9282798803..0ca214fa47 100644 --- a/sysdeps/unix/sysv/sysv4/i386/lstat.S +++ b/sysdeps/unix/sysv/sysv4/i386/lstat.S @@ -30,6 +30,6 @@ ENTRY (__lstat) popl %eax /* Pop return address into %eax. */ pushl $_STAT_VER /* Push extra first arg to syscall. */ pushl %eax /* Push back the return address. */ - DO_CALL (xlstat, 3) /* Do the syscall. */ + DO_CALL (lxstat, 3) /* Do the syscall. */ jb syscall_error /* Check for error. */ ret /* Return success. */ diff --git a/sysdeps/unix/sysv/sysv4/sigaltstack.S b/sysdeps/unix/sysv/sysv4/sigaltstack.S index f7cf0d57f4..e7e4060fba 100644 --- a/sysdeps/unix/sysv/sysv4/sigaltstack.S +++ b/sysdeps/unix/sysv/sysv4/sigaltstack.S @@ -1,2 +1,2 @@ /* SVR4 uses the BSD 4.4 sigaltstack syscall. */ -#include +#include From 7e66b0a979e76be757d090cb8d34d7f344db0422 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 5 Feb 1994 19:31:48 +0000 Subject: [PATCH 0310/4487] Initial revision --- sysdeps/unix/sysv/sysv4/sigset.h | 76 ++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/sigset.h diff --git a/sysdeps/unix/sysv/sysv4/sigset.h b/sysdeps/unix/sysv/sysv4/sigset.h new file mode 100644 index 0000000000..b3e9f0ea58 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/sigset.h @@ -0,0 +1,76 @@ +/* Copyright (C) 1991, 1992, 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifndef _SIGSET_H +#define _SIGSET_H 1 + +typedef int __sig_atomic_t; + +/* Return a mask that includes SIG only. */ +#define __sigmask(sig) (1 << ((sig) - 1)) + +/* A `sigset_t' has a bit for each signal. */ +typedef struct + { + unsigned long int __sigbits[4]; + } __sigset_t; + +/* It's easier to assume 8-bit bytes than to get CHAR_BIT. */ +#define __NSSBITS (sizeof (__sigset_t) * 8) +#define __SSELT(s) ((s) / __NSSBITS) +#define __SSMASK(s) (1 << ((s) % __NSSBITS)) + +extern __inline int +__sigemptyset (__sigset_t *__set) +{ + __set->__sigbits[0] = __set->__sigbits[1] = 0L; + __set->__sigbits[2] = __set->__sigbits[3] = 0L; + return 0; +} + +extern __inline int +__sigfillset (__sigset_t *__set) +{ + __set->__sigbits[0] = 0x7fffffffL; + __set->__sigbits[1] = __set->__sigbits[2] = __set->__sigbits[3] = 0L; + return 0; +} + +extern __inline int +__sigaddset (__sigset_t *__set, int __sig) +{ + __set->__sigbits[__SSELT (sig)] |= __SSMASK (__sig); + return 0; +} + +extern __inline int +__sigdelset (__sigset_t *__set, int __sig) +{ + __set->__sigbits[__SSELT (sig)] &= ~__SSMASK (__sig); + return 0; +} + +extern __inline int +__sigismember (__sigset_t *__set, int __sig) +{ + if (__set->__sigbits[__SSELT (sig)] & __SSMASK (__sig)) + return 1; + return 0; +} + +#endif /* sigset.h */ From 068c7fc064e14355ba5c897c90cd246456c78084 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 5 Feb 1994 19:38:01 +0000 Subject: [PATCH 0311/4487] Formerly unix/sysv/sysv4/sigset.h.~2~ --- sysdeps/unix/sysv/sysv4/sigset.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/sysdeps/unix/sysv/sysv4/sigset.h b/sysdeps/unix/sysv/sysv4/sigset.h index b3e9f0ea58..ec8387ad7f 100644 --- a/sysdeps/unix/sysv/sysv4/sigset.h +++ b/sysdeps/unix/sysv/sysv4/sigset.h @@ -1,4 +1,5 @@ -/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc. +/* __sig_atomic_t, __sigset_t, and related definitions. SVR4 version. +Copyright (C) 1994 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 @@ -38,16 +39,19 @@ typedef struct extern __inline int __sigemptyset (__sigset_t *__set) { - __set->__sigbits[0] = __set->__sigbits[1] = 0L; - __set->__sigbits[2] = __set->__sigbits[3] = 0L; + __set->__sigbits[0] = __set->__sigbits[1] = + __set->__sigbits[2] = __set->__sigbits[3] = 0L; return 0; } extern __inline int __sigfillset (__sigset_t *__set) { - __set->__sigbits[0] = 0x7fffffffL; - __set->__sigbits[1] = __set->__sigbits[2] = __set->__sigbits[3] = 0L; + /* SVR4 has a system call for `sigfillset' (!), and it only sets the bits + for signals [1,31]. Setting bits for unimplemented signals seems + harmless (and we will find out if it really is). */ + __set->__sigbits[0] = __set->__sigbits[1] = + __set->__sigbits[2] = __set->__sigbits[3] = -1; return 0; } From f4987f84424189a06afe069ef274b1c1835a3214 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 5 Feb 1994 19:54:25 +0000 Subject: [PATCH 0312/4487] entered into RCS --- sysdeps/unix/sysv/sysv4/sigaction.h | 10 ++-- sysdeps/unix/sysv/sysv4/signum.h | 40 ++++++------- sysdeps/unix/sysv/sysv4/solaris2/signum.h | 73 +++++++++++++++++++++++ 3 files changed, 97 insertions(+), 26 deletions(-) create mode 100644 sysdeps/unix/sysv/sysv4/solaris2/signum.h diff --git a/sysdeps/unix/sysv/sysv4/sigaction.h b/sysdeps/unix/sysv/sysv4/sigaction.h index 418e7db7dd..dbb31f1077 100644 --- a/sysdeps/unix/sysv/sysv4/sigaction.h +++ b/sysdeps/unix/sysv/sysv4/sigaction.h @@ -1,5 +1,5 @@ /* The proper definitions for SVR4's sigaction. -Copyright (C) 1993 Free Software Foundation, Inc. +Copyright (C) 1993, 1994 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,15 +20,15 @@ Cambridge, MA 02139, USA. */ /* Structure describing the action to be taken when a signal arrives. */ struct sigaction { + /* Special flags. */ + int sa_flags; + /* Signal handler. */ __sighandler_t sa_handler; /* Additional set of signals to be blocked. */ __sigset_t sa_mask; - /* Special flags. */ - int sa_flags; - /* Padding. */ int sa_resv[2]; }; @@ -41,7 +41,7 @@ struct sigaction #define SA_SIGINFO 0x8 /* Provide additional info to the handler. */ #define SA_NODEFER 0x10 /* Don't automatically block the signal when its handler is being executed. */ -#define SA_NOSCLDWAIT 0x10000 /* Don't create zombie processes. */ +#define SA_NOCLDWAIT 0x10000 /* Don't save zombie processes. */ #endif #define SA_NOCLDSTOP 0x20000 /* Don't send SIGCHLD when children stop. */ diff --git a/sysdeps/unix/sysv/sysv4/signum.h b/sysdeps/unix/sysv/sysv4/signum.h index 2f70495c05..aa3dc7fa25 100644 --- a/sysdeps/unix/sysv/sysv4/signum.h +++ b/sysdeps/unix/sysv/sysv4/signum.h @@ -1,5 +1,6 @@ -/* Copyright (C) 1992, 1993 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@zen.org). +/* Signal number definitions. SVR4 version. +Copyright (C) 1994 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 Library General Public License as @@ -18,13 +19,10 @@ Cambridge, MA 02139, USA. */ #ifdef _SIGNAL_H -/* This file defines the fake signal functions and signal - number constants for System V Release 4 UNIX. */ - /* Fake signal functions. */ -#define SIG_ERR ((__sighandler_t) -1) -#define SIG_DFL ((__sighandler_t) 0) -#define SIG_IGN ((__sighandler_t) 1) +#define SIG_ERR ((__sighandler_t) -1) /* Error return. */ +#define SIG_DFL ((__sighandler_t) 0) /* Default action. */ +#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */ /* Signals. */ @@ -34,13 +32,13 @@ Cambridge, MA 02139, USA. */ #define SIGILL 4 /* Illegal instruction (ANSI). */ #define SIGABRT SIGIOT /* Abort (ANSI). */ #define SIGTRAP 5 /* Trace trap (POSIX). */ -#define SIGIOT 6 /* IOT trap. */ -#define SIGEMT 7 /* EMT trap. */ +#define SIGIOT 6 /* IOT trap (4.2 BSD). */ +#define SIGEMT 7 /* EMT trap (4.2 BSD). */ #define SIGFPE 8 /* Floating-point exception (ANSI). */ #define SIGKILL 9 /* Kill, unblockable (POSIX). */ -#define SIGBUS 10 /* Bus error. */ +#define SIGBUS 10 /* Bus error (4.2 BSD). */ #define SIGSEGV 11 /* Segmentation violation (ANSI). */ -#define SIGSYS 12 /* Bad argument to system call*/ +#define SIGSYS 12 /* Bad argument to system call (4.2 BSD)*/ #define SIGPIPE 13 /* Broken pipe (POSIX). */ #define SIGALRM 14 /* Alarm clock (POSIX). */ #define SIGTERM 15 /* Termination (ANSI). */ @@ -48,20 +46,20 @@ Cambridge, MA 02139, USA. */ #define SIGUSR2 17 /* User-defined signal 2 (POSIX). */ #define SIGCHLD 18 /* Child status has changed (POSIX). */ #define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */ -#define SIGPWR 19 /* Power going down. */ -#define SIGWINCH 20 /* Window size change. */ -#define SIGURG 21 /* Urgent condition on socket.*/ -#define SIGIO SIGPOLL /* I/O now possible. */ -#define SIGPOLL 22 /* Same as SIGIO? (SVID). */ +#define SIGPWR 19 /* Power failure restart (System V). */ +#define SIGWINCH 20 /* Window size change (4.3 BSD, Sun). */ +#define SIGURG 21 /* Urgent condition on socket (4.2 BSD).*/ +#define SIGPOLL 22 /* Pollable event occurred (System V). */ +#define SIGIO SIGPOLL /* I/O now possible (4.2 BSD). */ #define SIGSTOP 23 /* Stop, unblockable (POSIX). */ #define SIGTSTP 24 /* Keyboard stop (POSIX). */ #define SIGCONT 25 /* Continue (POSIX). */ #define SIGTTIN 26 /* Background read from tty (POSIX). */ #define SIGTTOU 27 /* Background write to tty (POSIX). */ -#define SIGVTALRM 28 /* Virtual alarm clock. */ -#define SIGPROF 29 /* Profiling alarm clock. */ -#define SIGXCPU 30 /* CPU limit exceeded. */ -#define SIGXFSZ 31 /* File size limit exceeded. */ +#define SIGVTALRM 28 /* Virtual alarm clock (4.2 BSD). */ +#define SIGPROF 29 /* Profiling alarm clock (4.2 BSD). */ +#define SIGXCPU 30 /* CPU limit exceeded (4.2 BSD). */ +#define SIGXFSZ 31 /* File size limit exceeded (4.2 BSD). */ #endif /* included. */ diff --git a/sysdeps/unix/sysv/sysv4/solaris2/signum.h b/sysdeps/unix/sysv/sysv4/solaris2/signum.h new file mode 100644 index 0000000000..8219626c3e --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/solaris2/signum.h @@ -0,0 +1,73 @@ +/* Signal number definitions. Solaris 2 version. +Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifdef _SIGNAL_H + +/* Fake signal functions. */ +#define SIG_ERR ((__sighandler_t) -1) /* Error return. */ +#define SIG_DFL ((__sighandler_t) 0) /* Default action. */ +#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */ + + +/* Signals. */ +#define SIGHUP 1 /* Hangup (POSIX). */ +#define SIGINT 2 /* Interrupt (ANSI). */ +#define SIGQUIT 3 /* Quit (POSIX). */ +#define SIGILL 4 /* Illegal instruction (ANSI). */ +#define SIGABRT SIGIOT /* Abort (ANSI). */ +#define SIGTRAP 5 /* Trace trap (POSIX). */ +#define SIGIOT 6 /* IOT trap (4.2 BSD). */ +#define SIGEMT 7 /* EMT trap (4.2 BSD). */ +#define SIGFPE 8 /* Floating-point exception (ANSI). */ +#define SIGKILL 9 /* Kill, unblockable (POSIX). */ +#define SIGBUS 10 /* Bus error (4.2 BSD). */ +#define SIGSEGV 11 /* Segmentation violation (ANSI). */ +#define SIGSYS 12 /* Bad argument to system call (4.2 BSD)*/ +#define SIGPIPE 13 /* Broken pipe (POSIX). */ +#define SIGALRM 14 /* Alarm clock (POSIX). */ +#define SIGTERM 15 /* Termination (ANSI). */ +#define SIGUSR1 16 /* User-defined signal 1 (POSIX). */ +#define SIGUSR2 17 /* User-defined signal 2 (POSIX). */ +#define SIGCHLD 18 /* Child status has changed (POSIX). */ +#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */ +#define SIGPWR 19 /* Power failure restart (System V). */ +#define SIGWINCH 20 /* Window size change (4.3 BSD, Sun). */ +#define SIGURG 21 /* Urgent condition on socket (4.2 BSD).*/ +#define SIGPOLL 22 /* Pollable event occurred (System V). */ +#define SIGIO SIGPOLL /* I/O now possible (4.2 BSD). */ +#define SIGSTOP 23 /* Stop, unblockable (POSIX). */ +#define SIGTSTP 24 /* Keyboard stop (POSIX). */ +#define SIGCONT 25 /* Continue (POSIX). */ +#define SIGTTIN 26 /* Background read from tty (POSIX). */ +#define SIGTTOU 27 /* Background write to tty (POSIX). */ +#define SIGVTALRM 28 /* Virtual alarm clock (4.2 BSD). */ +#define SIGPROF 29 /* Profiling alarm clock (4.2 BSD). */ +#define SIGXCPU 30 /* CPU limit exceeded (4.2 BSD). */ +#define SIGXFSZ 31 /* File size limit exceeded (4.2 BSD). */ +/* The following signals are new in Solaris 2. */ +#define SIGWAITING 32 /* Process's lwps are blocked. */ +#define SIGLWP 33 /* Special signal used by thread library. */ +#define SIGFREEZE 34 /* Special signal used by CPR. */ +#define SIGTHAW 35 /* Special signal used by CPR. */ +#define _SIGRTMIN 36 /* First (highest-priority) realtime signal. */ +#define _SIGRTMAX 43 /* Last (lowest-priority) realtime signal. */ + +#endif /* included. */ + +#define _NSIG 44 /* Biggest signal number + 1. */ From 30044853c8390b98864252a1d994ad19fae61f34 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 9 Feb 1994 16:59:26 +0000 Subject: [PATCH 0313/4487] Formerly unix/sysv/sysv4/sigset.h.~3~ --- sysdeps/unix/sysv/sysv4/sigset.h | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/sysdeps/unix/sysv/sysv4/sigset.h b/sysdeps/unix/sysv/sysv4/sigset.h index ec8387ad7f..c461f602d6 100644 --- a/sysdeps/unix/sysv/sysv4/sigset.h +++ b/sysdeps/unix/sysv/sysv4/sigset.h @@ -17,20 +17,32 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifndef _SIGSET_H -#define _SIGSET_H 1 +#ifndef _SIGSET_H_types +#define _SIGSET_H_types 1 typedef int __sig_atomic_t; -/* Return a mask that includes SIG only. */ -#define __sigmask(sig) (1 << ((sig) - 1)) - /* A `sigset_t' has a bit for each signal. */ typedef struct { unsigned long int __sigbits[4]; } __sigset_t; +#endif /* ! _SIGSET_H_types */ + +/* We only want to define these functions if was actually + included; otherwise we were included just to define the types. Since we + are namespace-clean, it wouldn't hurt to define extra macros. But + trouble can be caused by functions being defined (e.g., any global + register vars declared later will cause compilation errors). */ + +#if !defined (_SIGSET_H_fns) && defined (_SIGNAL_H) +#define _SIGSET_H_fns 1 + +/* Return a mask that includes SIG only. */ +#define __sigmask(sig) (1 << ((sig) - 1)) + + /* It's easier to assume 8-bit bytes than to get CHAR_BIT. */ #define __NSSBITS (sizeof (__sigset_t) * 8) #define __SSELT(s) ((s) / __NSSBITS) @@ -58,23 +70,24 @@ __sigfillset (__sigset_t *__set) extern __inline int __sigaddset (__sigset_t *__set, int __sig) { - __set->__sigbits[__SSELT (sig)] |= __SSMASK (__sig); + __set->__sigbits[__SSELT (__sig)] |= __SSMASK (__sig); return 0; } extern __inline int __sigdelset (__sigset_t *__set, int __sig) { - __set->__sigbits[__SSELT (sig)] &= ~__SSMASK (__sig); + __set->__sigbits[__SSELT (__sig)] &= ~__SSMASK (__sig); return 0; } extern __inline int __sigismember (__sigset_t *__set, int __sig) { - if (__set->__sigbits[__SSELT (sig)] & __SSMASK (__sig)) + if (__set->__sigbits[__SSELT (__sig)] & __SSMASK (__sig)) return 1; return 0; } -#endif /* sigset.h */ +#endif /* ! _SIGSET_H_fns */ + From bfe25d77487586dcacb5c0a1caddcf8672962e97 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 10 Feb 1994 06:54:09 +0000 Subject: [PATCH 0314/4487] Formerly unix/sysv/sysv4/sigset.h.~4~ --- sysdeps/unix/sysv/sysv4/sigset.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/sysv4/sigset.h b/sysdeps/unix/sysv/sysv4/sigset.h index c461f602d6..957ec0822c 100644 --- a/sysdeps/unix/sysv/sysv4/sigset.h +++ b/sysdeps/unix/sysv/sysv4/sigset.h @@ -82,7 +82,7 @@ __sigdelset (__sigset_t *__set, int __sig) } extern __inline int -__sigismember (__sigset_t *__set, int __sig) +__sigismember (__const __sigset_t *__set, int __sig) { if (__set->__sigbits[__SSELT (__sig)] & __SSMASK (__sig)) return 1; From 1d84d0a0c0ec7ddb1a3db3adf4b4482f80366f1d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 13 Feb 1994 01:15:21 +0000 Subject: [PATCH 0315/4487] Initial revision --- sysdeps/unix/sysv/irix4/getgroups.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 sysdeps/unix/sysv/irix4/getgroups.c diff --git a/sysdeps/unix/sysv/irix4/getgroups.c b/sysdeps/unix/sysv/irix4/getgroups.c new file mode 100644 index 0000000000..525ff0cc7e --- /dev/null +++ b/sysdeps/unix/sysv/irix4/getgroups.c @@ -0,0 +1,29 @@ +/* Copyright (C) 1992 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include + +/* Set the group set for the current user to GROUPS (N of them). */ +int +DEFUN(getgroups, (n, groups), size_t n AND gid_t *groups) +{ + return syssgi(SGI_GETGROUPS, n, groups); +} From 17fc35d6381abeee7e6e8df5003b82f2057ae17c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 14 Feb 1994 03:10:40 +0000 Subject: [PATCH 0316/4487] Formerly unix/bsd/sony/newsos/m68k/sysdep.h.~5~ --- sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h b/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h index f707bb5178..c843b8d3cc 100644 --- a/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h +++ b/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1994 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,7 +20,7 @@ Cambridge, MA 02139, USA. */ #include -#define POUND(foo) (@@@Hash-Here@@@)foo +#define POUND # #ifdef __STDC__ #define ENTRY(name) \ @@ -39,7 +39,7 @@ Cambridge, MA 02139, USA. */ .globl syscall_error; \ error: jmp syscall_error; \ ENTRY (name) \ - DO_CALL (POUND (SYS_ify (syscall_name)), args) + DO_CALL (POUND SYS_ify (syscall_name), args) #define DO_CALL(syscall, args) \ movel syscall, d0; \ From 2bc551d14f4cbd439044146646d8333c18dc861e Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 14 Feb 1994 03:10:44 +0000 Subject: [PATCH 0317/4487] entered into RCS --- sysdeps/unix/bsd/hp/m68k/brk.S | 4 ++-- sysdeps/unix/bsd/hp/m68k/sysdep.h | 8 ++++---- sysdeps/unix/bsd/sun/m68k/brk.S | 4 ++-- sysdeps/unix/bsd/sun/m68k/sysdep.h | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/sysdeps/unix/bsd/hp/m68k/brk.S b/sysdeps/unix/bsd/hp/m68k/brk.S index 12db4d3742..1b06c12fe9 100644 --- a/sysdeps/unix/bsd/hp/m68k/brk.S +++ b/sysdeps/unix/bsd/hp/m68k/brk.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1993 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1993, 1994 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 @@ -33,7 +33,7 @@ ___curbrk: .text ENTRY (__brk) - movel POUND(__end), d0 + movel #__end, d0 cmpl sp@(4), d0 ble 0f movel d0, sp@(4) diff --git a/sysdeps/unix/bsd/hp/m68k/sysdep.h b/sysdeps/unix/bsd/hp/m68k/sysdep.h index eddb98f461..bd30bb8ba0 100644 --- a/sysdeps/unix/bsd/hp/m68k/sysdep.h +++ b/sysdeps/unix/bsd/hp/m68k/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993, 1994 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,7 +20,7 @@ Cambridge, MA 02139, USA. */ #include -#define POUND(foo) (@@@Hash-Here@@@)foo +#define POUND # #ifdef __STDC__ #define ENTRY(name) \ @@ -39,11 +39,11 @@ Cambridge, MA 02139, USA. */ .globl syscall_error; \ error: jmp syscall_error; \ ENTRY (name) \ - DO_CALL (POUND (SYS_ify (syscall_name), args) + DO_CALL (POUND SYS_ify (syscall_name), args) #define DO_CALL(syscall, args) \ movel syscall, d0; \ - trap POUND(0); \ + trap POUND 0; \ bcs error #define ret rts diff --git a/sysdeps/unix/bsd/sun/m68k/brk.S b/sysdeps/unix/bsd/sun/m68k/brk.S index 21d2ea5468..6a69dd0da4 100644 --- a/sysdeps/unix/bsd/sun/m68k/brk.S +++ b/sysdeps/unix/bsd/sun/m68k/brk.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1994 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 @@ -38,7 +38,7 @@ ENTRY (__brk) ble 0f movel d0, sp@(4) 0: pea SYS_brk - trap POUND(0) + trap #0 bcs 1f movel sp@(4), ___curbrk clrl d0 diff --git a/sysdeps/unix/bsd/sun/m68k/sysdep.h b/sysdeps/unix/bsd/sun/m68k/sysdep.h index d89faab634..8655f37147 100644 --- a/sysdeps/unix/bsd/sun/m68k/sysdep.h +++ b/sysdeps/unix/bsd/sun/m68k/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1994 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,7 +20,7 @@ Cambridge, MA 02139, USA. */ #include -#define POUND(foo) (@@@Hash-Here@@@)foo +#define POUND # #ifdef __STDC__ #define ENTRY(name) \ @@ -41,7 +41,7 @@ Cambridge, MA 02139, USA. */ error: jmp syscall_error; \ ENTRY (name) \ pea SYS_##syscall_name; \ - trap POUND(0); \ + trap POUND 0; \ bcs error #else #define PSEUDO(name, syscall_name, args) \ @@ -50,7 +50,7 @@ Cambridge, MA 02139, USA. */ error: jmp syscall_error; \ ENTRY (name) \ pea SYS_/**/syscall_name; \ - trap POUND(0); \ + trap POUND 0; \ bcs error #endif From 1491337a35af9f6bd4895dd41211e38ce6bcb190 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 14 Feb 1994 03:10:48 +0000 Subject: [PATCH 0318/4487] Formerly m68k/Makefile.~10~ --- sysdeps/m68k/Makefile | 33 +-------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile index 7d6f62de3e..6e9f261c03 100644 --- a/sysdeps/m68k/Makefile +++ b/sysdeps/m68k/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1993 Free Software Foundation, Inc. +# Copyright (C) 1993, 1994 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 @@ -22,37 +22,6 @@ crypt := crypt.sun3 # Use crypt/crypt.sun3.S. -# Disgusting magic to get `#'s into the asm code. - -# Set `as-pipe-ok' if piping input to the assembler is likely to work. -ifneq (,$(filter -pipe,$(compile.c) $(compile.S))) -# The `-pipe' switch the compiler does it, so it must work. -as-pipe-ok = yes -endif -ifdef gnu-as -# GNU as can deal with input pipes. -as-pipe-ok = yes -endif - -ifdef as-pipe-ok - -define compile-command.S -$(CC) $(CPPFLAGS) $(m68k-syntax-flag) $(asm-CPPFLAGS) -E $< \ -| sed 's/(@@@Hash-Here@@@)/#/g' | $(AS) $(ASFLAGS) -o $@ -endef - -else - -define compile-command.S -@-rm -f $@s -$(CC) $(CPPFLAGS) $(m68k-syntax-flag) $(asm-CPPFLAGS) -E $< \ -| sed 's/(@@@Hash-Here@@@)/#/g' > $@s -$(AS) $(ASFLAGS) $@s -o $@ --rm -f $@s -endef - -endif - # The mpn functions need this. All existing 68k ports use MIT syntax. If # a new port wants to use Motorola or Sony syntax, it can redefine this # variable. From 8e8d49c898a02fa86a86ae2f2195b86b6a10f3e0 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 14 Feb 1994 15:36:49 +0000 Subject: [PATCH 0319/4487] Formerly unix/bsd/m68k/sysdep.S.~6~ --- sysdeps/unix/bsd/m68k/sysdep.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/bsd/m68k/sysdep.S b/sysdeps/unix/bsd/m68k/sysdep.S index 1ec1ba4c94..afca46adb0 100644 --- a/sysdeps/unix/bsd/m68k/sysdep.S +++ b/sysdeps/unix/bsd/m68k/sysdep.S @@ -34,7 +34,7 @@ store: move.l d0, _errno moveq.l #-1, d0 #else #if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN - cmpl d0, #EWOULDBLOCK_sys + cmpl #EWOULDBLOCK_sys, d0 bne 0f moveq #EAGAIN, d0 #endif From 113d0e2f21db8fd3a736378a44380fcb69a57c09 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 14 Feb 1994 16:04:07 +0000 Subject: [PATCH 0320/4487] entered into RCS --- sysdeps/m68k/fpu/acos.c | 4 ++-- sysdeps/m68k/fpu/atan2.c | 4 ++-- sysdeps/m68k/fpu/drem.c | 4 ++-- sysdeps/m68k/fpu/fmod.c | 4 ++-- sysdeps/m68k/fpu/isinf.c | 4 ++-- sysdeps/m68k/fpu/ldexp.c | 4 ++-- sysdeps/m68k/fpu/logb.c | 5 +++-- sysdeps/m68k/fpu/pow.c | 4 ++-- 8 files changed, 17 insertions(+), 16 deletions(-) diff --git a/sysdeps/m68k/fpu/acos.c b/sysdeps/m68k/fpu/acos.c index e051fd4e27..d4be88f17c 100644 --- a/sysdeps/m68k/fpu/acos.c +++ b/sysdeps/m68k/fpu/acos.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1994 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,7 +25,7 @@ Cambridge, MA 02139, USA. */ #endif -double +__CONSTVALUE double DEFUN(FUNC, (x), double x) { return __m81_u(FUNC)(x); diff --git a/sysdeps/m68k/fpu/atan2.c b/sysdeps/m68k/fpu/atan2.c index e937833aa0..1efdb1f7a6 100644 --- a/sysdeps/m68k/fpu/atan2.c +++ b/sysdeps/m68k/fpu/atan2.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1994 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 @@ -21,7 +21,7 @@ Cambridge, MA 02139, USA. */ #ifdef __GNUC__ -double +__CONSTVALUE double DEFUN(atan2, (y, x), double y AND double x) { static CONST double one = 1.0, zero = 0.0; diff --git a/sysdeps/m68k/fpu/drem.c b/sysdeps/m68k/fpu/drem.c index 8ca7598f6b..b3efffb777 100644 --- a/sysdeps/m68k/fpu/drem.c +++ b/sysdeps/m68k/fpu/drem.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1994 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 @@ -22,7 +22,7 @@ Cambridge, MA 02139, USA. */ #undef drem -double +__CONSTVALUE double DEFUN(__drem, (x, y), double x AND double y) { return ____drem(x, y); diff --git a/sysdeps/m68k/fpu/fmod.c b/sysdeps/m68k/fpu/fmod.c index c5f1b5abae..9a6c8cd162 100644 --- a/sysdeps/m68k/fpu/fmod.c +++ b/sysdeps/m68k/fpu/fmod.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1994 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,7 +20,7 @@ Cambridge, MA 02139, USA. */ #define __NO_MATH_INLINES #include -double +__CONSTVALUE double DEFUN(fmod, (x, y), double x AND double y) { return __fmod(x, y); diff --git a/sysdeps/m68k/fpu/isinf.c b/sysdeps/m68k/fpu/isinf.c index 194c5a6760..c816dcd067 100644 --- a/sysdeps/m68k/fpu/isinf.c +++ b/sysdeps/m68k/fpu/isinf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1994 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,7 +25,7 @@ Cambridge, MA 02139, USA. */ #endif -int +__CONSTVALUE int DEFUN(FUNC, (x), double x) { return __m81_u(FUNC)(x); diff --git a/sysdeps/m68k/fpu/ldexp.c b/sysdeps/m68k/fpu/ldexp.c index 37d7b6d3ee..ba912805d6 100644 --- a/sysdeps/m68k/fpu/ldexp.c +++ b/sysdeps/m68k/fpu/ldexp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1994 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,7 +20,7 @@ Cambridge, MA 02139, USA. */ #define __NO_MATH_INLINES #include -double +__CONSTVALUE double DEFUN(ldexp, (x, exp), double x AND int exp) { return __ldexp(x, exp); diff --git a/sysdeps/m68k/fpu/logb.c b/sysdeps/m68k/fpu/logb.c index df3de1ceee..27ce1048fd 100644 --- a/sysdeps/m68k/fpu/logb.c +++ b/sysdeps/m68k/fpu/logb.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993, 1994 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 @@ -22,7 +22,8 @@ Cambridge, MA 02139, USA. */ #ifdef __GNUC__ /* Return the base 2 signed integral exponent of X. */ -double + +__CONSTVALUE double DEFUN(__logb, (x), double x) { if (__isnan (x)) diff --git a/sysdeps/m68k/fpu/pow.c b/sysdeps/m68k/fpu/pow.c index aa9d559f1d..3360020f1d 100644 --- a/sysdeps/m68k/fpu/pow.c +++ b/sysdeps/m68k/fpu/pow.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1994 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,7 +20,7 @@ Cambridge, MA 02139, USA. */ #define __NO_MATH_INLINES #include -double +__CONSTVALUE double DEFUN(pow, (x, y), double x AND double y) { return __pow(x, y); From 98338733068d49b42f254ccd61e155619cfbb3ae Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 15 Feb 1994 02:04:46 +0000 Subject: [PATCH 0321/4487] entered into RCS --- sysdeps/unix/sysv/irix4/Makefile | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sysdeps/unix/sysv/irix4/Makefile diff --git a/sysdeps/unix/sysv/irix4/Makefile b/sysdeps/unix/sysv/irix4/Makefile new file mode 100644 index 0000000000..a7f3ea8ce5 --- /dev/null +++ b/sysdeps/unix/sysv/irix4/Makefile @@ -0,0 +1,25 @@ +# Copyright (C) 1993 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 Library General Public License +# as published by the Free Software Foundation; either version 2 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 +# Library General Public License for more details. + +# You should have received a copy of the GNU Library General Public +# License along with the GNU C Library; see the file COPYING.LIB. If +# not, write to the Free Software Foundation, Inc., 675 Mass Ave, +# Cambridge, MA 02139, USA. + +ifeq ($(subdir),signal) +sysdep_routines := $(sysdep_routines) sigtramp __handler +endif + +ifeq ($(subdir),misc) +sysdep_routines := $(sysdep_routines) syssgi sysmp +endif From 8eabdea1fb0ffbf22890a8cb39d5d662fb4fcd61 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 15 Feb 1994 02:17:49 +0000 Subject: [PATCH 0322/4487] Initial revision --- sysdeps/unix/sysv/irix4/getpriority.c | 40 +++++++++++++++++++++++++++ sysdeps/unix/sysv/irix4/setpriority.c | 40 +++++++++++++++++++++++++++ sysdeps/unix/sysv/irix4/sysmp.S | 22 +++++++++++++++ 3 files changed, 102 insertions(+) create mode 100644 sysdeps/unix/sysv/irix4/getpriority.c create mode 100644 sysdeps/unix/sysv/irix4/setpriority.c create mode 100644 sysdeps/unix/sysv/irix4/sysmp.S diff --git a/sysdeps/unix/sysv/irix4/getpriority.c b/sysdeps/unix/sysv/irix4/getpriority.c new file mode 100644 index 0000000000..c5232784ad --- /dev/null +++ b/sysdeps/unix/sysv/irix4/getpriority.c @@ -0,0 +1,40 @@ +/* Copyright (C) 1991 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include + +/* Return the highest priority of any process specified by WHICH and WHO + (see ); if WHO is zero, the current process, process group, + or user (as specified by WHO) is used. A lower priority number means higher + priority. Priorities range from PRIO_MIN to PRIO_MAX. */ +int +DEFUN(getpriority, (which, who), + enum __priority_which which AND int who) +{ + if(which == PRIO_PROCESS) + return(sysmp(MP_SCHED, MPTS_GTNICE_PROC, who)); + else if(which == PRIO_PGRP) + return(sysmp(MP_SCHED, MPTS_GTNICE_PGRP, who)); + else if(which == PRIO_USER) + return(sysmp(MP_SCHED, MPTS_GTNICE_USER, who)); + errno = EINVAL; + return -1; +} diff --git a/sysdeps/unix/sysv/irix4/setpriority.c b/sysdeps/unix/sysv/irix4/setpriority.c new file mode 100644 index 0000000000..ff9108bb79 --- /dev/null +++ b/sysdeps/unix/sysv/irix4/setpriority.c @@ -0,0 +1,40 @@ +/* Copyright (C) 1991 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include + +/* Return the highest priority of any process specified by WHICH and WHO + (see ); if WHO is zero, the current process, process group, + or user (as specified by WHO) is used. A lower priority number means higher + priority. Priorities range from PRIO_MIN to PRIO_MAX. */ +int +DEFUN(setpriority, (which, who, prio), + enum __priority_which which AND int who AND int prio) +{ + if(which == PRIO_PROCESS) + return(sysmp(MP_SCHED, MPTS_GTNICE_PROC, who, prio)); + else if(which == PRIO_PGRP) + return(sysmp(MP_SCHED, MPTS_GTNICE_PGRP, who, prio)); + else if(which == PRIO_USER) + return(sysmp(MP_SCHED, MPTS_GTNICE_USER, who, prio)); + errno = EINVAL; + return -1; +} diff --git a/sysdeps/unix/sysv/irix4/sysmp.S b/sysdeps/unix/sysv/irix4/sysmp.S new file mode 100644 index 0000000000..a7c06a5dd9 --- /dev/null +++ b/sysdeps/unix/sysv/irix4/sysmp.S @@ -0,0 +1,22 @@ +/* Copyright (C) 1992 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +SYSCALL (sysmp, 4) + ret From 284dea21bb92b75ca01a60255a60253734b1a702 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 15 Feb 1994 18:03:42 +0000 Subject: [PATCH 0323/4487] Initial revision --- sysdeps/unix/sysv/irix4/uname.S | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 sysdeps/unix/sysv/irix4/uname.S diff --git a/sysdeps/unix/sysv/irix4/uname.S b/sysdeps/unix/sysv/irix4/uname.S new file mode 100644 index 0000000000..a45c99bb7e --- /dev/null +++ b/sysdeps/unix/sysv/irix4/uname.S @@ -0,0 +1,23 @@ +/* Copyright (C) 1992 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +ENTRY(uname) +SYSCALL (utssys, 1) + ret From 74cd51ad202fe06f3770efcbe04e05cd122c283c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 16 Feb 1994 23:11:21 +0000 Subject: [PATCH 0324/4487] Initial revision --- sysdeps/unix/bsd/sun/sunos4/mmap.c | 41 ++++++++++ sysdeps/unix/bsd/sun/sunos4/sys/mman.h | 107 +++++++++++++++++++++++++ 2 files changed, 148 insertions(+) create mode 100644 sysdeps/unix/bsd/sun/sunos4/mmap.c create mode 100644 sysdeps/unix/bsd/sun/sunos4/sys/mman.h diff --git a/sysdeps/unix/bsd/sun/sunos4/mmap.c b/sysdeps/unix/bsd/sun/sunos4/mmap.c new file mode 100644 index 0000000000..2379daa1c1 --- /dev/null +++ b/sysdeps/unix/bsd/sun/sunos4/mmap.c @@ -0,0 +1,41 @@ +/* Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include + +/* Map addresses starting near ADDR and extending for LEN bytes. from + OFFSET into the file FD describes according to PROT and FLAGS. If ADDR + is nonzero, it is the desired mapping address. If the MAP_FIXED bit is + set in FLAGS, the mapping will be at ADDR exactly (which must be + page-aligned); otherwise the system chooses a convenient nearby address. + The return value is the actual mapping address chosen or (caddr_t) -1 + for errors (in which case `errno' is set). A successful `mmap' call + deallocates any previous mapping for the affected region. */ + +extern caddr_t __mmap_syscall (caddr_t addr, size_t len, + int prot, int flags, int fd, off_t offset) + + +caddr_t +mmap (caddr_t addr, size_t len, int prot, int flags, int fd, off_t offset) +{ + return __mmap_syscall (addr, len, prot, flags | _MAP_NEW, fd, offset); +} + diff --git a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h new file mode 100644 index 0000000000..5e4555703e --- /dev/null +++ b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h @@ -0,0 +1,107 @@ +/* Definitions for BSD-style memory management. SunOS 4 version. +Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* These are the bits used by 4.4 BSD and its derivatives. On systems + (such as GNU) where these facilities are not system services but can be + emulated in the C library, these are the definitions we emulate. */ + +#ifndef _SYS_MMAN_H + +#define _SYS_MMAN_H 1 +#include + +#include +#define __need_size_t +#include + + +/* Protections are chosen from these bits, OR'd together. The + implementation does not necessarily support PROT_EXEC or PROT_WRITE + without PROT_READ. The only guarantees are that no writing will be + allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ + +#define PROT_NONE 0x00 /* No access. */ +#define PROT_READ 0x01 /* Pages can be read. */ +#define PROT_WRITE 0x02 /* Pages can be written. */ +#define PROT_EXEC 0x04 /* Pages can be executed. */ + + +/* Sharing types (must choose one and only one of these). */ +#define MAP_SHARED 0x01 /* Share changes. */ +#define MAP_PRIVATE 0x02 /* Changes private; copy pages on write. */ +#define MAP_TYPE 0x0f /* Mask for sharing type. */ + +/* Other flags. */ +#define MAP_FIXED 0x10 /* Map address must be exactly as requested. */ +/* The following three flags are not actually implemented in SunOS 4.1. */ +#define MAP_RENAME 0x20 /* Rename private pages to file. */ +#define MAP_NORESERVE 0x40 /* Don't reserve needed swap area. */ +#define MAP_INHERIT 0x80 /* Region is retained after exec. */ + +/* This is an internal flag that is always set in `mmap' system calls. In + older versions of SunOS 4 `mmap' did not return the actual mapping + address, but always returned zero. This flag says to return the + address; the `mmap' C library function always sets it. */ +#define _MAP_NEW 0x80000000 + +/* Advice to `madvise'. */ +#define MADV_NORMAL 0 /* No further special treatment. */ +#define MADV_RANDOM 1 /* Expect random page references. */ +#define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +#define MADV_WILLNEED 3 /* Will need these pages. */ +#define MADV_DONTNEED 4 /* Don't need these pages. */ + +/* Flags to `msync'. */ +#define MS_ASYNC 0x1 /* Return immediately, don't fsync. */ +#define MS_INVALIDATE 0x2 /* Invalidate caches. */ + + +#include + +__BEGIN_DECLS +/* Map addresses starting near ADDR and extending for LEN bytes. from + OFFSET into the file FD describes according to PROT and FLAGS. If ADDR + is nonzero, it is the desired mapping address. If the MAP_FIXED bit is + set in FLAGS, the mapping will be at ADDR exactly (which must be + page-aligned); otherwise the system chooses a convenient nearby address. + The return value is the actual mapping address chosen or (caddr_t) -1 + for errors (in which case `errno' is set). A successful `mmap' call + deallocates any previous mapping for the affected region. */ + +__caddr_t mmap __P ((__caddr_t __addr, size_t __len, + int __prot, int __flags, int __fd, off_t __offset)); + +/* Deallocate any mapping for the region starting at ADDR and extending LEN + bytes. Returns 0 if successful, -1 for errors (and sets errno). */ +int munmap __P ((__caddr_t __addr, size_t __len)); + +/* Change the memory protection of the region starting at ADDR and + extending LEN bytes to PROT. Returns 0 if successful, -1 for errors + (and sets errno). */ +int mprotect __P ((__caddr_t __addr, size_t __len, int __prot)); + +/* Synchronize the region starting at ADDR and extending LEN bytes with the + file it maps. Filesystem operations on a file being mapped are + unpredictable before this is done. */ +int msync __P ((caddr_t __addr, size_t __len, int __flags)); + +__END_DECLS + + +#endif /* sys/mman.h */ From 0537101d83555ddc01ad538acf6e445eb146679a Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 16 Feb 1994 23:13:37 +0000 Subject: [PATCH 0325/4487] entered into RCS --- sysdeps/unix/bsd/sun/sunos4/Makefile | 4 ++++ sysdeps/unix/bsd/sun/sunos4/sys_mmap.S | 22 ++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 sysdeps/unix/bsd/sun/sunos4/sys_mmap.S diff --git a/sysdeps/unix/bsd/sun/sunos4/Makefile b/sysdeps/unix/bsd/sun/sunos4/Makefile index 7cfecf2e18..96b88e1b72 100644 --- a/sysdeps/unix/bsd/sun/sunos4/Makefile +++ b/sysdeps/unix/bsd/sun/sunos4/Makefile @@ -1,3 +1,7 @@ ifeq ($(subdir), posix) sysdep_routines := $(sysdep_routines) sys_wait4 endif + +ifeq ($(subdir), misc) +sysdep_routines := $(sysdep_routines) sys_mmap +endif diff --git a/sysdeps/unix/bsd/sun/sunos4/sys_mmap.S b/sysdeps/unix/bsd/sun/sunos4/sys_mmap.S new file mode 100644 index 0000000000..61fe877342 --- /dev/null +++ b/sysdeps/unix/bsd/sun/sunos4/sys_mmap.S @@ -0,0 +1,22 @@ +/* Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +PSEUDO (__mmap_syscall, mmap, 5) + ret From 85a18dbaccd950c3bb180b738249f42802786ee7 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 16 Feb 1994 23:49:29 +0000 Subject: [PATCH 0326/4487] Formerly unix/bsd/sun/sunos4/sys/mman.h.~2~ --- sysdeps/unix/bsd/sun/sunos4/sys/mman.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h index 5e4555703e..1726f640c9 100644 --- a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h +++ b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h @@ -101,6 +101,10 @@ int mprotect __P ((__caddr_t __addr, size_t __len, int __prot)); unpredictable before this is done. */ int msync __P ((caddr_t __addr, size_t __len, int __flags)); +/* Advise the system about particular usage patterns the program follows + for the region starting at ADDR and extending LEN bytes. */ +int madvise __P ((__caddr_t __addr, size_t __len, int __advice)); + __END_DECLS From e4fbc86a5e82d463ca2cc8162b35f3103069cbe6 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 17 Feb 1994 00:34:24 +0000 Subject: [PATCH 0327/4487] entered into RCS --- sysdeps/unix/bsd/ultrix4/sys/mman.h | 99 +++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 sysdeps/unix/bsd/ultrix4/sys/mman.h diff --git a/sysdeps/unix/bsd/ultrix4/sys/mman.h b/sysdeps/unix/bsd/ultrix4/sys/mman.h new file mode 100644 index 0000000000..c850b4f7c8 --- /dev/null +++ b/sysdeps/unix/bsd/ultrix4/sys/mman.h @@ -0,0 +1,99 @@ +/* Definitions for BSD-style memory management. Ultrix 4 version. +Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* These are the bits used by 4.4 BSD and its derivatives. On systems + (such as GNU) where these facilities are not system services but can be + emulated in the C library, these are the definitions we emulate. */ + +#ifndef _SYS_MMAN_H + +#define _SYS_MMAN_H 1 +#include + +#include +#define __need_size_t +#include + + +/* Protections are chosen from these bits, OR'd together. The + implementation does not necessarily support PROT_EXEC or PROT_WRITE + without PROT_READ. The only guarantees are that no writing will be + allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ + +#define PROT_NONE 0x00 /* No access. */ +#define PROT_READ 0x01 /* Pages can be read. */ +#define PROT_WRITE 0x02 /* Pages can be written. */ +#define PROT_EXEC 0x04 /* Pages can be executed. */ + + +/* Sharing types (must choose one and only one of these). */ +#define MAP_SHARED 0x01 /* Share changes. */ +#define MAP_PRIVATE 0x02 /* Changes private; copy pages on write. */ +#define MAP_TYPE 0x0f /* Mask for sharing type. */ + +/* Other flags. */ +#define MAP_FIXED 0x10 /* Map address must be exactly as requested. */ + +/* Advice to `madvise'. */ +#define MADV_NORMAL 0 /* No further special treatment. */ +#define MADV_RANDOM 1 /* Expect random page references. */ +#define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +#define MADV_WILLNEED 3 /* Will need these pages. */ +#define MADV_DONTNEED 4 /* Don't need these pages. */ + + +#include + +__BEGIN_DECLS +/* Map addresses starting near ADDR and extending for LEN bytes. from + OFFSET into the file FD describes according to PROT and FLAGS. If ADDR + is nonzero, it is the desired mapping address. If the MAP_FIXED bit is + set in FLAGS, the mapping will be at ADDR exactly (which must be + page-aligned); otherwise the system chooses a convenient nearby address. + The return value is the actual mapping address chosen or (caddr_t) -1 + for errors (in which case `errno' is set). A successful `mmap' call + deallocates any previous mapping for the affected region. */ + +__caddr_t mmap __P ((__caddr_t __addr, size_t __len, + int __prot, int __flags, int __fd, off_t __offset)); + +/* Deallocate any mapping for the region starting at ADDR and extending LEN + bytes. Returns 0 if successful, -1 for errors (and sets errno). */ +int munmap __P ((__caddr_t __addr, size_t __len)); + +/* Change the memory protection of the region starting at ADDR and + extending LEN bytes to PROT. Returns 0 if successful, -1 for errors + (and sets errno). */ +int mprotect __P ((__caddr_t __addr, size_t __len, int __prot)); + +/* Ultrix 4 does not implement `msync' or `madvise'. */ + +/* Synchronize the region starting at ADDR and extending LEN bytes with the + file it maps. Filesystem operations on a file being mapped are + unpredictable before this is done. */ +int msync __P ((caddr_t __addr, size_t __len)); + +/* Advise the system about particular usage patterns the program follows + for the region starting at ADDR and extending LEN bytes. */ +int madvise __P ((__caddr_t __addr, size_t __len, int __advice)); + +__END_DECLS + + +#endif /* sys/mman.h */ From 8e5479462521d18926f8d21d5e06f9c35b4856da Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 17 Feb 1994 01:57:33 +0000 Subject: [PATCH 0328/4487] entered into RCS --- sysdeps/unix/sysv/sysv4/i386/Makefile | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/i386/Makefile diff --git a/sysdeps/unix/sysv/sysv4/i386/Makefile b/sysdeps/unix/sysv/sysv4/i386/Makefile new file mode 100644 index 0000000000..56f0a37de1 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/i386/Makefile @@ -0,0 +1,3 @@ +ifeq ($(subdir),signal) +sysdep_routines := $(sysdep_routines) sys-sig +endif From 4fa5a741d85f3f0d2da0e326e8b1587074fa8492 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 17 Feb 1994 01:57:40 +0000 Subject: [PATCH 0329/4487] Initial revision --- sysdeps/unix/sysv/sysv4/i386/sys-sig.S | 25 +++++++++ sysdeps/unix/sysv/sysv4/sigaction.c | 75 ++++++++++++++++++++++++++ 2 files changed, 100 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/i386/sys-sig.S create mode 100644 sysdeps/unix/sysv/sysv4/sigaction.c diff --git a/sysdeps/unix/sysv/sysv4/i386/sys-sig.S b/sysdeps/unix/sysv/sysv4/i386/sys-sig.S new file mode 100644 index 0000000000..c62459abdf --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/i386/sys-sig.S @@ -0,0 +1,25 @@ +/* Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +PSEUDO (__sigaction_syscall, sigaction, 3) + ret + +PSEUDO (__context_syscall, context, 2) + ret diff --git a/sysdeps/unix/sysv/sysv4/sigaction.c b/sysdeps/unix/sysv/sysv4/sigaction.c new file mode 100644 index 0000000000..afb8338f7e --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/sigaction.c @@ -0,0 +1,75 @@ +/* Copyright (C) 1991, 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include + +static __sighandler_t user_handlers[NSIG]; + +extern int __context_syscall (int, struct sigcontext *); +extern int __sigaction_syscall (int, + const struct sigaction *, struct sigaction *); + +static void +trampoline (int sig, int code, struct sigcontext *context) +{ + (*user_handlers[sig]) (sig, code, context); + __context_syscall (1, context); +} + +/* If ACT is not NULL, change the action for SIG to *ACT. + If OACT is not NULL, put the old action for SIG in *OACT. */ +int +DEFUN(__sigaction, (sig, act, oact), + int sig AND CONST struct sigaction *act AND struct sigaction *OACT) +{ + struct sigaction myact; + __sighandler_t ohandler; + + if (sig <= 0 || sig >= NSIG) + { + errno = EINVAL; + return -1; + } + + ohandler = user_handlers[sig]; + + if (act != NULL) + { + user_handlers[sig] = act->sa_handler; + if (act->sa_handler != SIG_DFL && act->sa_handler != SIG_IGN) + { + myact = *act; + act = &myact; + act->sa_handler = (__sighandler_t) trampoline; + } + } + + if (__sigaction_syscall (sig, act, oact) < 0) + { + /* The syscall got an error. Restore the old handler and return -1. */ + user_handlers[sig] = ohandler; + return -1; + } + + if (oact != NULL && oact->sa_handler == (__sighandler_t) trampoline) + oact->sa_handler = ohandler; + + return 0; +} From 6ae483762bdf84b9fd75e3f33b86828f7bb70a26 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 17 Feb 1994 01:59:26 +0000 Subject: [PATCH 0330/4487] Formerly unix/sysv/sysv4/i386/sys-sig.S.~2~ --- sysdeps/unix/sysv/sysv4/i386/sys-sig.S | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/sysv4/i386/sys-sig.S b/sysdeps/unix/sysv/sysv4/i386/sys-sig.S index c62459abdf..ac4c07b7f7 100644 --- a/sysdeps/unix/sysv/sysv4/i386/sys-sig.S +++ b/sysdeps/unix/sysv/sysv4/i386/sys-sig.S @@ -18,7 +18,12 @@ Cambridge, MA 02139, USA. */ #include -PSEUDO (__sigaction_syscall, sigaction, 3) +.globl C_SYMBOL_NAME(__sigreturn) + +ENTRY (__sigaction_syscall) + movel $C_SYMBOL_NAME(__sigreturn), %edx + DO_CALL (sigaction, 3) + jb syscall_error ret PSEUDO (__context_syscall, context, 2) From a5cbab6ea8d530943596c686ccb5f2ab064798a4 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 17 Feb 1994 01:59:39 +0000 Subject: [PATCH 0331/4487] Formerly unix/sysv/sysv4/__sigact.c.~2~ --- sysdeps/unix/sysv/sysv4/sigaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/sysv4/sigaction.c b/sysdeps/unix/sysv/sysv4/sigaction.c index afb8338f7e..7ce5ab54ae 100644 --- a/sysdeps/unix/sysv/sysv4/sigaction.c +++ b/sysdeps/unix/sysv/sysv4/sigaction.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994 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 From f3ee7dde2ed890dc2e2f0cfbe3d9876a19891ac5 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 17 Feb 1994 23:44:17 +0000 Subject: [PATCH 0332/4487] entered into RCS --- sysdeps/unix/bsd/sun/sunos4/Dist | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/bsd/sun/sunos4/Dist b/sysdeps/unix/bsd/sun/sunos4/Dist index d7500fde41..f1c9046516 100644 --- a/sysdeps/unix/bsd/sun/sunos4/Dist +++ b/sysdeps/unix/bsd/sun/sunos4/Dist @@ -1 +1,2 @@ sys_wait4.S +sys_mmap.S From b1e2de3d8d5b2d1665ab50d251d230318ac127b2 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 19 Feb 1994 22:39:32 +0000 Subject: [PATCH 0333/4487] entered into RCS --- sysdeps/unix/sysv/sysv4/i386/Dist | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/sysv4/i386/Dist diff --git a/sysdeps/unix/sysv/sysv4/i386/Dist b/sysdeps/unix/sysv/sysv4/i386/Dist new file mode 100644 index 0000000000..69d16ac6bf --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/i386/Dist @@ -0,0 +1 @@ +sys-sig.S From 9592e8f126bcf4bb26fd889965628c75b9d02a6b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 20 Feb 1994 05:46:12 +0000 Subject: [PATCH 0334/4487] entered into RCS --- sysdeps/unix/mips/sigreturn.S | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/mips/sigreturn.S b/sysdeps/unix/mips/sigreturn.S index 93a29733c0..02e4d2519e 100644 --- a/sysdeps/unix/mips/sigreturn.S +++ b/sysdeps/unix/mips/sigreturn.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1994 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -18,6 +18,10 @@ Cambridge, MA 02139, USA. */ #include +#ifndef SYS_sigreturn +#define SYS_sigreturn 103 +#endif + ENTRY(__sigreturn) - li v0, 103 + li v0, SYS_sigreturn syscall From 515236670238e1bf590a281380b3ab8c974e9a88 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 20 Feb 1994 19:18:22 +0000 Subject: [PATCH 0335/4487] entered into RCS --- sysdeps/unix/bsd/sun/sunos4/mmap.c | 2 +- sysdeps/unix/bsd/sun/sunos4/msync.S | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 sysdeps/unix/bsd/sun/sunos4/msync.S diff --git a/sysdeps/unix/bsd/sun/sunos4/mmap.c b/sysdeps/unix/bsd/sun/sunos4/mmap.c index 2379daa1c1..4dfc1ca2da 100644 --- a/sysdeps/unix/bsd/sun/sunos4/mmap.c +++ b/sysdeps/unix/bsd/sun/sunos4/mmap.c @@ -30,7 +30,7 @@ Cambridge, MA 02139, USA. */ deallocates any previous mapping for the affected region. */ extern caddr_t __mmap_syscall (caddr_t addr, size_t len, - int prot, int flags, int fd, off_t offset) + int prot, int flags, int fd, off_t offset); caddr_t diff --git a/sysdeps/unix/bsd/sun/sunos4/msync.S b/sysdeps/unix/bsd/sun/sunos4/msync.S new file mode 100644 index 0000000000..9fb8955dc2 --- /dev/null +++ b/sysdeps/unix/bsd/sun/sunos4/msync.S @@ -0,0 +1,22 @@ +/* Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +SYSCALL (msync, 3) + ret From 781e3c546023a99677df73c3958c8843b67d691a Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Tue, 22 Feb 1994 01:47:51 +0000 Subject: [PATCH 0336/4487] Formerly unix/sysv/sysv4/__sigact.c.~3~ --- sysdeps/unix/sysv/sysv4/sigaction.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/sysv4/sigaction.c b/sysdeps/unix/sysv/sysv4/sigaction.c index 7ce5ab54ae..e9453733b4 100644 --- a/sysdeps/unix/sysv/sysv4/sigaction.c +++ b/sysdeps/unix/sysv/sysv4/sigaction.c @@ -29,7 +29,8 @@ extern int __sigaction_syscall (int, static void trampoline (int sig, int code, struct sigcontext *context) { - (*user_handlers[sig]) (sig, code, context); + (*(void (*) (int, int, struct sigcontext *)) user_handlers[sig]) + (sig, code, context); __context_syscall (1, context); } From 95e37139f070a1fa4abd03fd2aa9571107fd0506 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 23 Feb 1994 02:50:58 +0000 Subject: [PATCH 0337/4487] Formerly unix/bsd/sun/sunos4/sys/mman.h.~3~ --- sysdeps/unix/bsd/sun/sunos4/sys/mman.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h index 1726f640c9..17fd8de46c 100644 --- a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h +++ b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h @@ -85,7 +85,7 @@ __BEGIN_DECLS deallocates any previous mapping for the affected region. */ __caddr_t mmap __P ((__caddr_t __addr, size_t __len, - int __prot, int __flags, int __fd, off_t __offset)); + int __prot, int __flags, int __fd, __off_t __offset)); /* Deallocate any mapping for the region starting at ADDR and extending LEN bytes. Returns 0 if successful, -1 for errors (and sets errno). */ From fe35453a7a94f323d37b7bf2cfa7261be7e27c1c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 24 Feb 1994 23:55:30 +0000 Subject: [PATCH 0338/4487] Formerly unix/sysv/irix4/__getgrps.c.~2~ --- sysdeps/unix/sysv/irix4/getgroups.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/irix4/getgroups.c b/sysdeps/unix/sysv/irix4/getgroups.c index 525ff0cc7e..b6f002ab2e 100644 --- a/sysdeps/unix/sysv/irix4/getgroups.c +++ b/sysdeps/unix/sysv/irix4/getgroups.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1994 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 @@ -21,9 +21,11 @@ Cambridge, MA 02139, USA. */ #include #include +extern int __syssgi __P ((int, ...)); + /* Set the group set for the current user to GROUPS (N of them). */ int DEFUN(getgroups, (n, groups), size_t n AND gid_t *groups) { - return syssgi(SGI_GETGROUPS, n, groups); + return __syssgi (SGI_GETGROUPS, n, groups); } From ba41db06a8b18e58984516042f00e6e45a6ada5f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 25 Feb 1994 00:03:44 +0000 Subject: [PATCH 0339/4487] entered into RCS --- sysdeps/unix/sysv/irix4/getpgid.S | 4 ++-- sysdeps/unix/sysv/irix4/getpriority.c | 20 +++++++++++++------- sysdeps/unix/sysv/irix4/getrusage.c | 15 ++++----------- sysdeps/unix/sysv/irix4/setgroups.c | 6 ++++-- sysdeps/unix/sysv/irix4/setpgid.S | 22 ++++++++++++++++++++++ 5 files changed, 45 insertions(+), 22 deletions(-) create mode 100644 sysdeps/unix/sysv/irix4/setpgid.S diff --git a/sysdeps/unix/sysv/irix4/getpgid.S b/sysdeps/unix/sysv/irix4/getpgid.S index b84b41a3bf..c13a69170a 100644 --- a/sysdeps/unix/sysv/irix4/getpgid.S +++ b/sysdeps/unix/sysv/irix4/getpgid.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1994 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 @@ -18,5 +18,5 @@ Cambridge, MA 02139, USA. */ #include -SYSCALL__ (bsdgetpgrp, 1) +PSEUDO (__getpgrp, bsdgetpgrp, 1) ret diff --git a/sysdeps/unix/sysv/irix4/getpriority.c b/sysdeps/unix/sysv/irix4/getpriority.c index c5232784ad..70a9431890 100644 --- a/sysdeps/unix/sysv/irix4/getpriority.c +++ b/sysdeps/unix/sysv/irix4/getpriority.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1994 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 @@ -21,6 +21,8 @@ Cambridge, MA 02139, USA. */ #include #include +extern int __sysmp __P ((int, ...)); + /* Return the highest priority of any process specified by WHICH and WHO (see ); if WHO is zero, the current process, process group, or user (as specified by WHO) is used. A lower priority number means higher @@ -29,12 +31,16 @@ int DEFUN(getpriority, (which, who), enum __priority_which which AND int who) { - if(which == PRIO_PROCESS) - return(sysmp(MP_SCHED, MPTS_GTNICE_PROC, who)); - else if(which == PRIO_PGRP) - return(sysmp(MP_SCHED, MPTS_GTNICE_PGRP, who)); - else if(which == PRIO_USER) - return(sysmp(MP_SCHED, MPTS_GTNICE_USER, who)); + switch (which) + { + case PRIO_PROCESS: + return __sysmp (MP_SCHED, MPTS_GTNICE_PROC, who); + case PRIO_PGRP: + return __sysmp (MP_SCHED, MPTS_GTNICE_PGRP, who); + case PRIO_USER: + return __sysmp (MP_SCHED, MPTS_GTNICE_USER, who); + } + errno = EINVAL; return -1; } diff --git a/sysdeps/unix/sysv/irix4/getrusage.c b/sysdeps/unix/sysv/irix4/getrusage.c index 7222a0db79..e160980a7f 100644 --- a/sysdeps/unix/sysv/irix4/getrusage.c +++ b/sysdeps/unix/sysv/irix4/getrusage.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1994 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 @@ -21,20 +21,13 @@ Cambridge, MA 02139, USA. */ #include #include +extern int __syssgi __P ((int, ...)); + /* Return resource usage information on process indicated by WHO and put it in *USAGE. Returns 0 for success, -1 for failure. */ int DEFUN(__getrusage, (who, usage), enum __rusage_who who AND struct rusage *usage) { - return syssgi(SGI_RUSAGE, who, usage); + return __syssgi (SGI_RUSAGE, who, usage); } - - -#ifdef HAVE_GNU_LD - -#include - -stub_warning(__getrusage); - -#endif /* GNU stabs. */ diff --git a/sysdeps/unix/sysv/irix4/setgroups.c b/sysdeps/unix/sysv/irix4/setgroups.c index 70d748b216..052df0f830 100644 --- a/sysdeps/unix/sysv/irix4/setgroups.c +++ b/sysdeps/unix/sysv/irix4/setgroups.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1994 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 @@ -21,9 +21,11 @@ Cambridge, MA 02139, USA. */ #include #include +extern int __syssgi __P ((int, ...)); + /* Set the group set for the current user to GROUPS (N of them). */ int DEFUN(setgroups, (n, groups), size_t n AND CONST gid_t *groups) { - return syssgi(SGI_SETGROUPS, n, groups); + return __syssgi (SGI_SETGROUPS, n, groups); } diff --git a/sysdeps/unix/sysv/irix4/setpgid.S b/sysdeps/unix/sysv/irix4/setpgid.S new file mode 100644 index 0000000000..2e3135b51c --- /dev/null +++ b/sysdeps/unix/sysv/irix4/setpgid.S @@ -0,0 +1,22 @@ +/* Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +PSEUDO (__setpgrp, bsdsetpgrp, 2) + ret From f0b44502672440b94fe87e74a4ad6979dccbbb5b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 25 Feb 1994 00:29:31 +0000 Subject: [PATCH 0340/4487] Initial revision --- sysdeps/unix/mips/wait.S | 42 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 sysdeps/unix/mips/wait.S diff --git a/sysdeps/unix/mips/wait.S b/sysdeps/unix/mips/wait.S new file mode 100644 index 0000000000..05fdb605aa --- /dev/null +++ b/sysdeps/unix/mips/wait.S @@ -0,0 +1,42 @@ +/* Copyright (C) 1992 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +.set noreorder + +ENTRY(__wait) + /* Prep it for wait. */ + move a1, zero + move a2, zero + + li v0, SYS_wait + syscall + beq a3, zero, noerror + nop + j syscall_error + nop + +noerror: + /* If the arg is not NULL, store v1 there. */ + beq a0, zero, noarg + nop + sw v1, 0(a0) + nop +noarg: + ret From 1ee700c8a6254bb907547300dc07206f9bb9200d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 25 Feb 1994 00:46:06 +0000 Subject: [PATCH 0341/4487] Formerly unix/sysv/irix4/signum.h.~2~ --- sysdeps/unix/sysv/irix4/signum.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/irix4/signum.h b/sysdeps/unix/sysv/irix4/signum.h index d1e2b21623..71b8c98e22 100644 --- a/sysdeps/unix/sysv/irix4/signum.h +++ b/sysdeps/unix/sysv/irix4/signum.h @@ -1,5 +1,4 @@ -/* Copyright (C) 1992, 1993 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@cygnus.com). +/* Copyright (C) Free Software Foundation, Inc. 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 @@ -19,7 +18,7 @@ Cambridge, MA 02139, USA. */ #ifdef _SIGNAL_H /* This file defines the fake signal functions and signal - number constants for System V Release 4 UNIX. */ + number constants for SGI Irix 4. */ /* Fake signal functions. */ #define SIG_ERR ((__sighandler_t) -1) @@ -43,7 +42,7 @@ Cambridge, MA 02139, USA. */ #define SIGSYS 12 /* Bad argument to system call*/ #define SIGPIPE 13 /* Broken pipe (POSIX). */ #define SIGALRM 14 /* Alarm clock (POSIX). */ -#define SIGTERM 15 /* Termination (ANSI). */ +1994#define SIGTERM 15 /* Termination (ANSI). */ #define SIGUSR1 16 /* User-defined signal 1 (POSIX). */ #define SIGUSR2 17 /* User-defined signal 2 (POSIX). */ #define SIGCHLD 18 /* Child status has changed (POSIX). */ From b2ff3460e483f3bd5c9315814a8b3c38ee87af18 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 25 Feb 1994 00:58:57 +0000 Subject: [PATCH 0342/4487] Formerly unix/mips/sysdep.S.~2~ --- sysdeps/unix/mips/sysdep.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/mips/sysdep.S b/sysdeps/unix/mips/sysdep.S index d75217da5c..4d3aec32d4 100644 --- a/sysdeps/unix/mips/sysdep.S +++ b/sysdeps/unix/mips/sysdep.S @@ -36,5 +36,5 @@ skip: sw v0, errno /* And just kick back a -1. */ - li v0, -1 j ra + li v0, -1 From 10e51d0930a8a0bf13520f36fc3bd012b42264bb Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 25 Feb 1994 01:04:05 +0000 Subject: [PATCH 0343/4487] entered into RCS --- sysdeps/unix/bsd/sun/sunos4/Implies | 2 + sysdeps/unix/bsd/sun/sunos4/sys/mman.h | 4 - sysdeps/unix/bsd/ultrix4/Implies | 2 + sysdeps/unix/mips/wait.S | 2 +- sysdeps/unix/sysv/irix4/Implies | 2 + sysdeps/unix/sysv/irix4/confname.h | 80 ++++++++++++++++++++ sysdeps/unix/sysv/irix4/fpathconf.c | 32 ++++++++ sysdeps/unix/sysv/irix4/gettimeofday.c | 1 + sysdeps/unix/sysv/irix4/msync.S | 1 + sysdeps/unix/sysv/irix4/pathconf.c | 32 ++++++++ sysdeps/unix/sysv/irix4/reboot.c | 1 + sysdeps/unix/sysv/irix4/setpriority.c | 23 +++--- sysdeps/unix/sysv/irix4/swapon.c | 1 + sysdeps/unix/sysv/irix4/sys/mman.h | 101 +++++++++++++++++++++++++ sysdeps/unix/sysv/irix4/sysconf.c | 10 ++- sysdeps/unix/sysv/irix4/sysmp.S | 4 +- sysdeps/unix/sysv/irix4/syssgi.S | 4 +- sysdeps/unix/sysv/irix4/uname.S | 9 ++- 18 files changed, 286 insertions(+), 25 deletions(-) create mode 100644 sysdeps/unix/bsd/sun/sunos4/Implies create mode 100644 sysdeps/unix/bsd/ultrix4/Implies create mode 100644 sysdeps/unix/sysv/irix4/confname.h create mode 100644 sysdeps/unix/sysv/irix4/fpathconf.c create mode 100644 sysdeps/unix/sysv/irix4/gettimeofday.c create mode 100644 sysdeps/unix/sysv/irix4/msync.S create mode 100644 sysdeps/unix/sysv/irix4/pathconf.c create mode 100644 sysdeps/unix/sysv/irix4/reboot.c create mode 100644 sysdeps/unix/sysv/irix4/swapon.c create mode 100644 sysdeps/unix/sysv/irix4/sys/mman.h diff --git a/sysdeps/unix/bsd/sun/sunos4/Implies b/sysdeps/unix/bsd/sun/sunos4/Implies new file mode 100644 index 0000000000..c99e256ac1 --- /dev/null +++ b/sysdeps/unix/bsd/sun/sunos4/Implies @@ -0,0 +1,2 @@ +# SunOS 4 has the canonical set of system calls. +unix/mman diff --git a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h index 17fd8de46c..0e66416b04 100644 --- a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h +++ b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h @@ -17,10 +17,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* These are the bits used by 4.4 BSD and its derivatives. On systems - (such as GNU) where these facilities are not system services but can be - emulated in the C library, these are the definitions we emulate. */ - #ifndef _SYS_MMAN_H #define _SYS_MMAN_H 1 diff --git a/sysdeps/unix/bsd/ultrix4/Implies b/sysdeps/unix/bsd/ultrix4/Implies new file mode 100644 index 0000000000..b0e08ef1db --- /dev/null +++ b/sysdeps/unix/bsd/ultrix4/Implies @@ -0,0 +1,2 @@ +# Ultrix 4 has the canonical set of system calls. +unix/mman diff --git a/sysdeps/unix/mips/wait.S b/sysdeps/unix/mips/wait.S index 05fdb605aa..2e9a259618 100644 --- a/sysdeps/unix/mips/wait.S +++ b/sysdeps/unix/mips/wait.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1994 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/unix/sysv/irix4/Implies b/sysdeps/unix/sysv/irix4/Implies index 78437f6ad2..35e1edd830 100644 --- a/sysdeps/unix/sysv/irix4/Implies +++ b/sysdeps/unix/sysv/irix4/Implies @@ -1,2 +1,4 @@ # Irix 4 has the set of things which are also common to BSD and SVR4. unix/common +# Irix 4 has the canonical set of system calls. +unix/mman diff --git a/sysdeps/unix/sysv/irix4/confname.h b/sysdeps/unix/sysv/irix4/confname.h new file mode 100644 index 0000000000..49d2f9c989 --- /dev/null +++ b/sysdeps/unix/sysv/irix4/confname.h @@ -0,0 +1,80 @@ +/* `sysconf', `pathconf', and `confstr' NAME values. Irix 4 version. +Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Values for the NAME argument to `pathconf' and `fpathconf'. */ +enum + { + _PC_LINK_MAX = 1, + _PC_MAX_CANON, + _PC_MAX_INPUT, + _PC_NAME_MAX, + _PC_PATH_MAX, + _PC_PIPE_BUF, + _PC_CHOWN_RESTRICTED, + _PC_NO_TRUNC, + _PC_VDISABLE + }; + +/* Values for the argument to `sysconf'. */ +enum + { + _SC_ARG_MAX = 1, + _SC_CHILD_MAX, + _SC_CLK_TCK, + _SC_NGROUPS_MAX, + _SC_OPEN_MAX, + _SC_JOB_CONTROL, + _SC_SAVED_IDS, + _SC_VERSION, + + /* Above are done by the Irix system call. + The rest are done by the C library (or are not really implemented). */ + + _SC_STREAM_MAX, + _SC_TZNAME_MAX, + _SC_PAGESIZE, + + /* Values for the argument to `sysconf' + corresponding to _POSIX2_* symbols. */ + _SC_BC_BASE_MAX, + _SC_BC_DIM_MAX, + _SC_BC_SCALE_MAX, + _SC_BC_STRING_MAX, + _SC_COLL_WEIGHTS_MAX, + _SC_EQUIV_CLASS_MAX, + _SC_EXPR_NEST_MAX, + _SC_LINE_MAX, + _SC_RE_DUP_MAX, + + _SC_2_VERSION, + _SC_2_C_BIND, + _SC_2_C_DEV, + _SC_2_FORT_DEV, + _SC_2_FORT_RUN, + _SC_2_SW_DEV, + _SC_2_LOCALEDEF + }; + +#ifdef __USE_POSIX2 +/* Values for the NAME argument to `confstr'. */ +enum + { + _CS_PATH /* The default search path. */ + }; +#endif diff --git a/sysdeps/unix/sysv/irix4/fpathconf.c b/sysdeps/unix/sysv/irix4/fpathconf.c new file mode 100644 index 0000000000..be39d2f349 --- /dev/null +++ b/sysdeps/unix/sysv/irix4/fpathconf.c @@ -0,0 +1,32 @@ +/* Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include +#include + +extern int __syssgi __P ((int, ...)); + +/* Get file-specific information about descriptor FD. */ +long int +DEFUN(__fpathconf, (fd, name), int fd AND int name) +{ + return __syssgi (SGI_PATHCONF, FPATHCONF, fd, name); +} diff --git a/sysdeps/unix/sysv/irix4/gettimeofday.c b/sysdeps/unix/sysv/irix4/gettimeofday.c new file mode 100644 index 0000000000..d92b3bb868 --- /dev/null +++ b/sysdeps/unix/sysv/irix4/gettimeofday.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/irix4/msync.S b/sysdeps/unix/sysv/irix4/msync.S new file mode 100644 index 0000000000..75b9f1531d --- /dev/null +++ b/sysdeps/unix/sysv/irix4/msync.S @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/irix4/pathconf.c b/sysdeps/unix/sysv/irix4/pathconf.c new file mode 100644 index 0000000000..6e54661f4b --- /dev/null +++ b/sysdeps/unix/sysv/irix4/pathconf.c @@ -0,0 +1,32 @@ +/* Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include +#include + +extern int __syssgi __P ((int, ...)); + +/* Get file-specific information about PATH. */ +long int +DEFUN(__pathconf, (path, name), CONST char *path AND int name) +{ + return __syssgi (SGI_PATHCONF, PATHCONF, path, name); +} diff --git a/sysdeps/unix/sysv/irix4/reboot.c b/sysdeps/unix/sysv/irix4/reboot.c new file mode 100644 index 0000000000..d7a3659d2b --- /dev/null +++ b/sysdeps/unix/sysv/irix4/reboot.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/irix4/setpriority.c b/sysdeps/unix/sysv/irix4/setpriority.c index ff9108bb79..a632953423 100644 --- a/sysdeps/unix/sysv/irix4/setpriority.c +++ b/sysdeps/unix/sysv/irix4/setpriority.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1994 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 @@ -21,20 +21,21 @@ Cambridge, MA 02139, USA. */ #include #include -/* Return the highest priority of any process specified by WHICH and WHO - (see ); if WHO is zero, the current process, process group, - or user (as specified by WHO) is used. A lower priority number means higher - priority. Priorities range from PRIO_MIN to PRIO_MAX. */ int DEFUN(setpriority, (which, who, prio), enum __priority_which which AND int who AND int prio) { - if(which == PRIO_PROCESS) - return(sysmp(MP_SCHED, MPTS_GTNICE_PROC, who, prio)); - else if(which == PRIO_PGRP) - return(sysmp(MP_SCHED, MPTS_GTNICE_PGRP, who, prio)); - else if(which == PRIO_USER) - return(sysmp(MP_SCHED, MPTS_GTNICE_USER, who, prio)); + switch (which) + { + case PRIO_PROCESS: + return __sysmp (MP_SCHED, MPTS_RENICE_PROC, who, prio); + case PRIO_PGRP: + return __sysmp (MP_SCHED, MPTS_RENICE_PGRP, who, prio); + case PRIO_USER: + return __sysmp (MP_SCHED, MPTS_RENICE_USER, who, prio); + } + errno = EINVAL; return -1; } + diff --git a/sysdeps/unix/sysv/irix4/swapon.c b/sysdeps/unix/sysv/irix4/swapon.c new file mode 100644 index 0000000000..86a638fdc5 --- /dev/null +++ b/sysdeps/unix/sysv/irix4/swapon.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/irix4/sys/mman.h b/sysdeps/unix/sysv/irix4/sys/mman.h new file mode 100644 index 0000000000..ac50aab6dd --- /dev/null +++ b/sysdeps/unix/sysv/irix4/sys/mman.h @@ -0,0 +1,101 @@ +/* Definitions for BSD-style memory management. Irix 4 version. +Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifndef _SYS_MMAN_H + +#define _SYS_MMAN_H 1 +#include + +#include +#define __need_size_t +#include + + +/* Protections are chosen from these bits, OR'd together. The + implementation does not necessarily support PROT_EXEC or PROT_WRITE + without PROT_READ. The only guarantees are that no writing will be + allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ + +#define PROT_NONE 0x00 /* No access. */ +#define PROT_READ 0x04 /* Pages can be read. */ +#define PROT_WRITE 0x02 /* Pages can be written. */ +#define PROT_EXEC 0x01 /* Pages can be executed. */ +#define PROT_EXECUTE PROT_EXEC + + +/* Sharing types (must choose one and only one of these). */ +#define MAP_SHARED 0x01 /* Share changes. */ +#define MAP_PRIVATE 0x02 /* Changes private; copy pages on write. */ +#define MAP_TYPE 0x0f /* Mask for sharing type. */ + +/* Other flags. */ +#define MAP_FIXED 0x10 /* Map address must be exactly as requested. */ +#define MAP_RENAME 0x20 /* Rename private pages to file. */ +#define MAP_AUTOGROW 0x40 /* Grow file as pages are written. */ +#define MAP_LOCAL 0x80 /* Copy the mapped region on fork. */ + +/* Advice to `madvise'. */ +#define MADV_NORMAL 0 /* No further special treatment. */ +#define MADV_RANDOM 1 /* Expect random page references. */ +#define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +#define MADV_WILLNEED 3 /* Will need these pages. */ +#define MADV_DONTNEED 4 /* Don't need these pages. */ + +/* Flags to `msync'. */ +#define MS_ASYNC 0x1 /* Return immediately, don't fsync. */ +#define MS_INVALIDATE 0x2 /* Invalidate caches. */ + + +#include + +__BEGIN_DECLS +/* Map addresses starting near ADDR and extending for LEN bytes. from + OFFSET into the file FD describes according to PROT and FLAGS. If ADDR + is nonzero, it is the desired mapping address. If the MAP_FIXED bit is + set in FLAGS, the mapping will be at ADDR exactly (which must be + page-aligned); otherwise the system chooses a convenient nearby address. + The return value is the actual mapping address chosen or (caddr_t) -1 + for errors (in which case `errno' is set). A successful `mmap' call + deallocates any previous mapping for the affected region. */ + +__caddr_t mmap __P ((__caddr_t __addr, size_t __len, + int __prot, int __flags, int __fd, __off_t __offset)); + +/* Deallocate any mapping for the region starting at ADDR and extending LEN + bytes. Returns 0 if successful, -1 for errors (and sets errno). */ +int munmap __P ((__caddr_t __addr, size_t __len)); + +/* Change the memory protection of the region starting at ADDR and + extending LEN bytes to PROT. Returns 0 if successful, -1 for errors + (and sets errno). */ +int mprotect __P ((__caddr_t __addr, size_t __len, int __prot)); + +/* Synchronize the region starting at ADDR and extending LEN bytes with the + file it maps. Filesystem operations on a file being mapped are + unpredictable before this is done. */ +int msync __P ((caddr_t __addr, size_t __len, int __flags)); + +/* Advise the system about particular usage patterns the program follows + for the region starting at ADDR and extending LEN bytes. */ +int madvise __P ((__caddr_t __addr, size_t __len, int __advice)); + +__END_DECLS + + +#endif /* sys/mman.h */ diff --git a/sysdeps/unix/sysv/irix4/sysconf.c b/sysdeps/unix/sysv/irix4/sysconf.c index 03bb324368..497c6a7828 100644 --- a/sysdeps/unix/sysv/irix4/sysconf.c +++ b/sysdeps/unix/sysv/irix4/sysconf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1993 Free Software Foundation, Inc. +/* Copyright (C) 1994 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 @@ -17,11 +17,17 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include +#include #include +extern int __syssgi __P ((int, ...)); + /* Get the value of the system variable NAME. */ long int DEFUN(__sysconf, (name), int name) { - return syssgi(SGI_SYSCONF, name); + if (name == _SC_TZNAME_MAX) + return __tzname_max (); + + return __syssgi (SGI_SYSCONF, name); } diff --git a/sysdeps/unix/sysv/irix4/sysmp.S b/sysdeps/unix/sysv/irix4/sysmp.S index a7c06a5dd9..438da60d69 100644 --- a/sysdeps/unix/sysv/irix4/sysmp.S +++ b/sysdeps/unix/sysv/irix4/sysmp.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1994 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 @@ -18,5 +18,5 @@ Cambridge, MA 02139, USA. */ #include -SYSCALL (sysmp, 4) +SYSCALL__ (sysmp, 4) ret diff --git a/sysdeps/unix/sysv/irix4/syssgi.S b/sysdeps/unix/sysv/irix4/syssgi.S index 39b82ea78b..2715d2899c 100644 --- a/sysdeps/unix/sysv/irix4/syssgi.S +++ b/sysdeps/unix/sysv/irix4/syssgi.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1994 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 @@ -18,5 +18,5 @@ Cambridge, MA 02139, USA. */ #include -SYSCALL (syssgi, 2) +SYSCALL__ (syssgi, 2) ret diff --git a/sysdeps/unix/sysv/irix4/uname.S b/sysdeps/unix/sysv/irix4/uname.S index a45c99bb7e..fe912403b1 100644 --- a/sysdeps/unix/sysv/irix4/uname.S +++ b/sysdeps/unix/sysv/irix4/uname.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1994 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 @@ -19,5 +19,8 @@ Cambridge, MA 02139, USA. */ #include ENTRY(uname) -SYSCALL (utssys, 1) - ret + li a2, 0 + li a3, 0 +SYSCALL__ (utssys, 1) + j ra + move v0, zero From 948956956f70fadaa85b20e93ec0411ca96fabeb Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 1 Mar 1994 16:44:24 +0000 Subject: [PATCH 0344/4487] entered into RCS --- sysdeps/unix/sysv/isc2.2/rename.S | 2 +- sysdeps/unix/sysv/sco3.2.4/waitpid.S | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/isc2.2/rename.S b/sysdeps/unix/sysv/isc2.2/rename.S index a5a8dfeeef..a4b2c4207c 100644 --- a/sysdeps/unix/sysv/isc2.2/rename.S +++ b/sysdeps/unix/sysv/isc2.2/rename.S @@ -1 +1 @@ -#include +#include diff --git a/sysdeps/unix/sysv/sco3.2.4/waitpid.S b/sysdeps/unix/sysv/sco3.2.4/waitpid.S index f16b643f2f..63decf1d9c 100644 --- a/sysdeps/unix/sysv/sco3.2.4/waitpid.S +++ b/sysdeps/unix/sysv/sco3.2.4/waitpid.S @@ -27,7 +27,7 @@ ENTRY (__waitpid) pushl %eax /* Push the new flags word. */ popfl /* Pop it into the flags. */ DO_CALL (wait, 2) - movl 4(%esp), scratch /* Put status pointer in scratch register. */ + movl 8(%esp), scratch /* Put status pointer in scratch register. */ testl scratch, scratch /* Is it non-nil? */ je null movl r1, (scratch) /* Yes; store the status there. */ From 609191269db1479ccaf8510bf33a3f9fbf6fe754 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 3 Mar 1994 22:35:49 +0000 Subject: [PATCH 0345/4487] entered into RCS --- sysdeps/unix/sysv/sysv4/i386/mknod.S | 34 ++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/i386/mknod.S diff --git a/sysdeps/unix/sysv/sysv4/i386/mknod.S b/sysdeps/unix/sysv/sysv4/i386/mknod.S new file mode 100644 index 0000000000..4c879cbefb --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/i386/mknod.S @@ -0,0 +1,34 @@ +/* Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +/* In SVR4 the `mknod' call is actually done by the `xmknod' system call, + which takes an additional first argument giving a version number for + the interface. This macro gives the SVR4 version number that + corresponds to the modern interface. */ +#define _MKNOD_VER 2 + +.globl syscall_error +ENTRY (__mknod) + popl %eax /* Pop return address into %eax. */ + pushl $_MKNOD_VER /* Push extra first arg to syscall. */ + pushl %eax /* Push back the return address. */ + DO_CALL (xmknod, 3) /* Do the syscall. */ + jb syscall_error /* Check for error. */ + ret /* Return success. */ From abf0661750bb75660ee039edb4e611eee8539472 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 7 Mar 1994 22:46:41 +0000 Subject: [PATCH 0346/4487] entered into RCS --- sysdeps/unix/bsd/Attic/osf1/alpha/sigblock.S | 25 ++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sysdeps/unix/bsd/Attic/osf1/alpha/sigblock.S diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/sigblock.S b/sysdeps/unix/bsd/Attic/osf1/alpha/sigblock.S new file mode 100644 index 0000000000..eefd641424 --- /dev/null +++ b/sysdeps/unix/bsd/Attic/osf1/alpha/sigblock.S @@ -0,0 +1,25 @@ +/* Copyright (C) 1994 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#include +#define SYS_sigblock SYS_ult_sigblock + +SYSCALL__ (sigblock, 1) + ret From 62256c24863ce9e4b6f222f56a8da0c9ff662425 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 18 Mar 1994 06:02:48 +0000 Subject: [PATCH 0347/4487] entered into RCS --- sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h b/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h index c843b8d3cc..43ef480ee9 100644 --- a/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h +++ b/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h @@ -43,9 +43,9 @@ Cambridge, MA 02139, USA. */ #define DO_CALL(syscall, args) \ movel syscall, d0; \ - linkw fp, POUND(0); \ + linkw a6, POUND(0); \ trap POUND(0); \ - unlk fp; \ + unlk a6; \ bcs error #define ret rts From 30a3f7d7a74fea58c95b673446be2678467e690d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 22 Mar 1994 03:11:12 +0000 Subject: [PATCH 0348/4487] entered into RCS --- sysdeps/unix/bsd/m68k/sysdep.S | 4 ++-- sysdeps/unix/bsd/sony/newsos4/Dist | 1 + sysdeps/unix/bsd/sony/newsos4/Makefile | 3 +++ sysdeps/unix/bsd/sony/newsos4/fchdir.S | 1 + sysdeps/unix/bsd/sony/newsos4/sys_wait4.S | 1 + sysdeps/unix/bsd/sony/newsos4/wait.c | 1 + sysdeps/unix/bsd/sony/newsos4/wait3.c | 1 + sysdeps/unix/bsd/sony/newsos4/wait4.c | 1 + 8 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 sysdeps/unix/bsd/sony/newsos4/Dist create mode 100644 sysdeps/unix/bsd/sony/newsos4/Makefile create mode 100644 sysdeps/unix/bsd/sony/newsos4/fchdir.S create mode 100644 sysdeps/unix/bsd/sony/newsos4/sys_wait4.S create mode 100644 sysdeps/unix/bsd/sony/newsos4/wait.c create mode 100644 sysdeps/unix/bsd/sony/newsos4/wait3.c create mode 100644 sysdeps/unix/bsd/sony/newsos4/wait4.c diff --git a/sysdeps/unix/bsd/m68k/sysdep.S b/sysdeps/unix/bsd/m68k/sysdep.S index afca46adb0..95136bbdbb 100644 --- a/sysdeps/unix/bsd/m68k/sysdep.S +++ b/sysdeps/unix/bsd/m68k/sysdep.S @@ -35,10 +35,10 @@ store: move.l d0, _errno #else #if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN cmpl #EWOULDBLOCK_sys, d0 - bne 0f + bne store moveq #EAGAIN, d0 #endif -0: movel d0, _errno +store: movel d0, _errno moveq #-1, d0 #endif rts diff --git a/sysdeps/unix/bsd/sony/newsos4/Dist b/sysdeps/unix/bsd/sony/newsos4/Dist new file mode 100644 index 0000000000..d7500fde41 --- /dev/null +++ b/sysdeps/unix/bsd/sony/newsos4/Dist @@ -0,0 +1 @@ +sys_wait4.S diff --git a/sysdeps/unix/bsd/sony/newsos4/Makefile b/sysdeps/unix/bsd/sony/newsos4/Makefile new file mode 100644 index 0000000000..7cfecf2e18 --- /dev/null +++ b/sysdeps/unix/bsd/sony/newsos4/Makefile @@ -0,0 +1,3 @@ +ifeq ($(subdir), posix) +sysdep_routines := $(sysdep_routines) sys_wait4 +endif diff --git a/sysdeps/unix/bsd/sony/newsos4/fchdir.S b/sysdeps/unix/bsd/sony/newsos4/fchdir.S new file mode 100644 index 0000000000..6db7282ac9 --- /dev/null +++ b/sysdeps/unix/bsd/sony/newsos4/fchdir.S @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/bsd/sony/newsos4/sys_wait4.S b/sysdeps/unix/bsd/sony/newsos4/sys_wait4.S new file mode 100644 index 0000000000..6a79710b07 --- /dev/null +++ b/sysdeps/unix/bsd/sony/newsos4/sys_wait4.S @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/bsd/sony/newsos4/wait.c b/sysdeps/unix/bsd/sony/newsos4/wait.c new file mode 100644 index 0000000000..d9ee77b4a3 --- /dev/null +++ b/sysdeps/unix/bsd/sony/newsos4/wait.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/bsd/sony/newsos4/wait3.c b/sysdeps/unix/bsd/sony/newsos4/wait3.c new file mode 100644 index 0000000000..ecc11134bb --- /dev/null +++ b/sysdeps/unix/bsd/sony/newsos4/wait3.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/bsd/sony/newsos4/wait4.c b/sysdeps/unix/bsd/sony/newsos4/wait4.c new file mode 100644 index 0000000000..9183ce1b53 --- /dev/null +++ b/sysdeps/unix/bsd/sony/newsos4/wait4.c @@ -0,0 +1 @@ +#include From 9ed7c960c0dd0eed9e6e044f97cc306cf285cf16 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 24 Mar 1994 20:01:19 +0000 Subject: [PATCH 0349/4487] Formerly unix/sysv/sco3.2.4/__sigact.S.~2~ --- sysdeps/unix/sysv/sco3.2.4/sigaction.S | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/sco3.2.4/sigaction.S b/sysdeps/unix/sysv/sco3.2.4/sigaction.S index dbe41e335d..1d55f2d6ae 100644 --- a/sysdeps/unix/sysv/sco3.2.4/sigaction.S +++ b/sysdeps/unix/sysv/sco3.2.4/sigaction.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1994 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 @@ -18,5 +18,10 @@ Cambridge, MA 02139, USA. */ #include -SYSCALL__ (sigaction, 3) +.globla C_SYMBOL_NAME(__sigreturn) + +ENTRY (__sigaction) + movl $C_SYMBOL_NAME(__sigreturn), %ecx + DO_CALL (sigaction, 3) + jb syscall_error ret From bf86fbef3a438bac91ebf676118a244d5d9b4bbc Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 24 Mar 1994 20:03:52 +0000 Subject: [PATCH 0350/4487] entered into RCS --- sysdeps/unix/sysv/sco3.2.4/sigaction.h | 39 ++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 sysdeps/unix/sysv/sco3.2.4/sigaction.h diff --git a/sysdeps/unix/sysv/sco3.2.4/sigaction.h b/sysdeps/unix/sysv/sco3.2.4/sigaction.h new file mode 100644 index 0000000000..c6344f0810 --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/sigaction.h @@ -0,0 +1,39 @@ +/* The proper definitions for SCO's sigaction. +Copyright (C) 1993, 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Structure describing the action to be taken when a signal arrives. */ +struct sigaction + { + /* Signal handler. */ + __sighandler_t sa_handler; + + /* Additional set of signals to be blocked. */ + __sigset_t sa_mask; + + /* Special flags. */ + int sa_flags; + }; + +/* Bits in `sa_flags'. */ +#define SA_NOCLDSTOP 0x01 /* Don't send SIGCHLD when children stop. */ + +/* Values for the HOW argument to `sigprocmask'. */ +#define SIG_SETMASK 0 /* Set the set of blocked signals. */ +#define SIG_BLOCK 1 /* Block signals. */ +#define SIG_UNBLOCK 2 /* Unblock signals. */ From b12af630af4938650cb8c2559133b695f85982eb Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 6 Apr 1994 01:26:12 +0000 Subject: [PATCH 0351/4487] Formerly unix/sysv/sysv4/__sigact.c.~4~ --- sysdeps/unix/sysv/sysv4/sigaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/sysv4/sigaction.c b/sysdeps/unix/sysv/sysv4/sigaction.c index e9453733b4..8ea55ef9bd 100644 --- a/sysdeps/unix/sysv/sysv4/sigaction.c +++ b/sysdeps/unix/sysv/sysv4/sigaction.c @@ -38,7 +38,7 @@ trampoline (int sig, int code, struct sigcontext *context) If OACT is not NULL, put the old action for SIG in *OACT. */ int DEFUN(__sigaction, (sig, act, oact), - int sig AND CONST struct sigaction *act AND struct sigaction *OACT) + int sig AND CONST struct sigaction *act AND struct sigaction *oact) { struct sigaction myact; __sighandler_t ohandler; From 0e43ba5d2aa2cad390df65b706515caad3b393cf Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 20 Apr 1994 03:12:09 +0000 Subject: [PATCH 0352/4487] entered into RCS --- sysdeps/unix/sysv/sco3.2.4/pipestream.c | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sysdeps/unix/sysv/sco3.2.4/pipestream.c diff --git a/sysdeps/unix/sysv/sco3.2.4/pipestream.c b/sysdeps/unix/sysv/sco3.2.4/pipestream.c new file mode 100644 index 0000000000..b768e62043 --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/pipestream.c @@ -0,0 +1,3 @@ +/* SCO 3.2v4 does have `waitpid'. + Avoid unix/pipestream.c, which says we don't. */ +#include From 325552ed3a90ae04920d18ab0e227df31a7181a1 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 22 Apr 1994 22:17:17 +0000 Subject: [PATCH 0353/4487] entered into RCS --- sysdeps/unix/sysv/irix4/time.S | 1 + sysdeps/unix/sysv/irix4/wait3.S | 1 + sysdeps/unix/sysv/irix4/waitpid.c | 1 + 3 files changed, 3 insertions(+) create mode 100644 sysdeps/unix/sysv/irix4/time.S create mode 100644 sysdeps/unix/sysv/irix4/wait3.S create mode 100644 sysdeps/unix/sysv/irix4/waitpid.c diff --git a/sysdeps/unix/sysv/irix4/time.S b/sysdeps/unix/sysv/irix4/time.S new file mode 100644 index 0000000000..23bfe5deac --- /dev/null +++ b/sysdeps/unix/sysv/irix4/time.S @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/irix4/wait3.S b/sysdeps/unix/sysv/irix4/wait3.S new file mode 100644 index 0000000000..d4ed738f8c --- /dev/null +++ b/sysdeps/unix/sysv/irix4/wait3.S @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/irix4/waitpid.c b/sysdeps/unix/sysv/irix4/waitpid.c new file mode 100644 index 0000000000..47129a8845 --- /dev/null +++ b/sysdeps/unix/sysv/irix4/waitpid.c @@ -0,0 +1 @@ +#include From 4cea7a7f28271dacc5fab918d159df8fd43bb361 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 10 May 1994 21:29:35 +0000 Subject: [PATCH 0354/4487] Initial revision --- sysdeps/unix/sysv/irix4/Dist | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/irix4/Dist diff --git a/sysdeps/unix/sysv/irix4/Dist b/sysdeps/unix/sysv/irix4/Dist new file mode 100644 index 0000000000..91dad24609 --- /dev/null +++ b/sysdeps/unix/sysv/irix4/Dist @@ -0,0 +1 @@ +syssgi.S sysmp.S From 617dce8b65709b9db5da513fc3d30184819ed714 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 10 May 1994 21:29:43 +0000 Subject: [PATCH 0355/4487] Formerly mips/setjmp.S.~4~ --- sysdeps/mips/setjmp.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/mips/setjmp.S b/sysdeps/mips/setjmp.S index 507da8d4a8..aba375ab5b 100644 --- a/sysdeps/mips/setjmp.S +++ b/sysdeps/mips/setjmp.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1994 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,6 +23,6 @@ Cambridge, MA 02139, USA. */ extra arguments. */ ENTRY (__setjmp) move a1, sp - move a2, $fp + move a2, fp j __setjmp_aux From b2fb4526df548eb92e79855bba0db9adb9e6a4ba Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 10 May 1994 21:47:20 +0000 Subject: [PATCH 0356/4487] entered into RCS --- sysdeps/unix/mips/sysdep.S | 1 + sysdeps/unix/sysv/irix4/Dist | 1 + sysdeps/unix/sysv/irix4/dup2.c | 1 + sysdeps/unix/sysv/irix4/fcntlbits.h | 98 +++++++++++++++++++++++++++++ sysdeps/unix/sysv/irix4/readv.c | 1 + sysdeps/unix/sysv/irix4/signum.h | 4 +- sysdeps/unix/sysv/irix4/writev.c | 1 + 7 files changed, 105 insertions(+), 2 deletions(-) create mode 100644 sysdeps/unix/sysv/irix4/dup2.c create mode 100644 sysdeps/unix/sysv/irix4/fcntlbits.h create mode 100644 sysdeps/unix/sysv/irix4/readv.c create mode 100644 sysdeps/unix/sysv/irix4/writev.c diff --git a/sysdeps/unix/mips/sysdep.S b/sysdeps/unix/mips/sysdep.S index 4d3aec32d4..21bdf234f9 100644 --- a/sysdeps/unix/mips/sysdep.S +++ b/sysdeps/unix/mips/sysdep.S @@ -21,6 +21,7 @@ Cambridge, MA 02139, USA. */ #include /* .globl errno */ +.set noreorder ENTRY(syscall_error) #if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN diff --git a/sysdeps/unix/sysv/irix4/Dist b/sysdeps/unix/sysv/irix4/Dist index 91dad24609..c5dd106b55 100644 --- a/sysdeps/unix/sysv/irix4/Dist +++ b/sysdeps/unix/sysv/irix4/Dist @@ -1 +1,2 @@ syssgi.S sysmp.S +__handler.S sigtramp.c diff --git a/sysdeps/unix/sysv/irix4/dup2.c b/sysdeps/unix/sysv/irix4/dup2.c new file mode 100644 index 0000000000..53691b6022 --- /dev/null +++ b/sysdeps/unix/sysv/irix4/dup2.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/irix4/fcntlbits.h b/sysdeps/unix/sysv/irix4/fcntlbits.h new file mode 100644 index 0000000000..a8bb776cf4 --- /dev/null +++ b/sysdeps/unix/sysv/irix4/fcntlbits.h @@ -0,0 +1,98 @@ +/* O_*, F_*, FD_* bit values for SGI Irix 4. +Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifndef _FCNTLBITS_H + +#define _FCNTLBITS_H 1 + + +/* File access modes for `open' and `fcntl'. */ +#define O_RDONLY 0 /* Open read-only. */ +#define O_WRONLY 1 /* Open write-only. */ +#define O_RDWR 2 /* Open read/write. */ + + +/* Bits OR'd into the second argument to open. */ +#define O_CREAT 00400 /* Create file if it doesn't exist. */ +#define O_EXCL 02000 /* Fail if file already exists. */ +#define O_TRUNC 01000 /* Truncate file to zero length. */ +#ifdef __USE_MISC +#define O_SYNC 00020 /* Synchronous writes. */ +#define O_ASYNC 00100 /* Send SIGIO to owner when data is ready. */ +#endif + +/* File status flags for `open' and `fcntl'. */ +#define O_APPEND 000010 /* Writes append to the file. */ +#ifdef __USE_BSD +#define O_NDELAY 000004 /* Non-blocking I/O. */ +#endif +#define O_NONBLOCK 000200 /* POSIX.1 non-blocking I/O. */ + +/* Mask for file access modes. This is system-dependent in case + some system ever wants to define some other flavor of access. */ +#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR) + +/* Values for the second argument to `fcntl'. */ +#define F_DUPFD 0 /* Duplicate file descriptor. */ +#define F_GETFD 1 /* Get file descriptor flags. */ +#define F_SETFD 2 /* Set file descriptor flags. */ +#define F_GETFL 3 /* Get file status flags. */ +#define F_SETFL 4 /* Set file status flags. */ +#define F_GETLK 5 /* Get record locking info. */ +#define F_SETLK 6 /* Set record locking info. */ +#define F_SETLKW 7 /* Set record locking info, wait. */ +#ifdef __USE_MISC +#define F_CHKFL 8 /* Check legality of file flag changes. */ +#define F_ALLOCSP 10 +#define F_FREESP 11 +#define F_SETBSDLK 12 /* Set Berkeley record lock. */ +#define F_SETBSDLKW 13 /* Set Berkeley record lock and wait. */ +#define F_RGETLK 20 /* Get info on a remote lock. */ +#define F_RSETLK 21 /* Set or unlock a remote lock. */ +#define F_RSETLKW 22 /* Set or unlock a remote lock and wait. */ +#define F_GETOWN 10 /* Get owner; only works on sockets. */ +#define F_SETOWN 11 /* Set owner; only works on sockets. */ +#endif + + +/* File descriptor flags used with F_GETFD and F_SETFD. */ +#define FD_CLOEXEC 1 /* Close on exec. */ + + +#include + +/* The structure describing an advisory lock. This is the type of the third + argument to `fcntl' for the F_GETLK, F_SETLK, and F_SETLKW requests. */ +struct flock + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ + __off_t l_start; /* Offset where the lock begins. */ + __off_t l_len; /* Size of the locked area; zero means until EOF. */ + short int l_sysid; /* System ID where locking process resides. */ + short int l_pid; /* Process holding the lock. */ + }; + +/* Values for the `l_type' field of a `struct flock'. */ +#define F_RDLCK 1 /* Read lock. */ +#define F_WRLCK 2 /* Write lock. */ +#define F_UNLCK 3 /* Remove lock. */ + + +#endif /* fcntlbits.h */ diff --git a/sysdeps/unix/sysv/irix4/readv.c b/sysdeps/unix/sysv/irix4/readv.c new file mode 100644 index 0000000000..baa976da6d --- /dev/null +++ b/sysdeps/unix/sysv/irix4/readv.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/irix4/signum.h b/sysdeps/unix/sysv/irix4/signum.h index 71b8c98e22..5d30ebb875 100644 --- a/sysdeps/unix/sysv/irix4/signum.h +++ b/sysdeps/unix/sysv/irix4/signum.h @@ -1,4 +1,4 @@ -/* Copyright (C) Free Software Foundation, Inc. +/* Copyright (C) 1994 Free Software Foundation, Inc. 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 @@ -42,7 +42,7 @@ Cambridge, MA 02139, USA. */ #define SIGSYS 12 /* Bad argument to system call*/ #define SIGPIPE 13 /* Broken pipe (POSIX). */ #define SIGALRM 14 /* Alarm clock (POSIX). */ -1994#define SIGTERM 15 /* Termination (ANSI). */ +#define SIGTERM 15 /* Termination (ANSI). */ #define SIGUSR1 16 /* User-defined signal 1 (POSIX). */ #define SIGUSR2 17 /* User-defined signal 2 (POSIX). */ #define SIGCHLD 18 /* Child status has changed (POSIX). */ diff --git a/sysdeps/unix/sysv/irix4/writev.c b/sysdeps/unix/sysv/irix4/writev.c new file mode 100644 index 0000000000..0dc6a76014 --- /dev/null +++ b/sysdeps/unix/sysv/irix4/writev.c @@ -0,0 +1 @@ +#include From 94606a4a68fef55ea8a4268c38338a55a9068b2b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 12 May 1994 03:08:56 +0000 Subject: [PATCH 0357/4487] entered into RCS --- sysdeps/unix/bsd/sun/sunos4/poll.S | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/bsd/sun/sunos4/poll.S diff --git a/sysdeps/unix/bsd/sun/sunos4/poll.S b/sysdeps/unix/bsd/sun/sunos4/poll.S new file mode 100644 index 0000000000..95c4fd2f82 --- /dev/null +++ b/sysdeps/unix/bsd/sun/sunos4/poll.S @@ -0,0 +1 @@ +#include From 4448e9e36b5db31222419e73aafca22a10805541 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 16 May 1994 20:39:16 +0000 Subject: [PATCH 0358/4487] entered into RCS --- sysdeps/unix/sysv/sco3.2.4/sigaction.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/sco3.2.4/sigaction.S b/sysdeps/unix/sysv/sco3.2.4/sigaction.S index 1d55f2d6ae..17ae6e7484 100644 --- a/sysdeps/unix/sysv/sco3.2.4/sigaction.S +++ b/sysdeps/unix/sysv/sco3.2.4/sigaction.S @@ -18,7 +18,7 @@ Cambridge, MA 02139, USA. */ #include -.globla C_SYMBOL_NAME(__sigreturn) +.global C_SYMBOL_NAME(__sigreturn) ENTRY (__sigaction) movl $C_SYMBOL_NAME(__sigreturn), %ecx From 854002b9b80baf2dd11020a002453d10ea60872b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 16 May 1994 22:43:49 +0000 Subject: [PATCH 0359/4487] entered into RCS --- sysdeps/unix/sysv/sco3.2.4/system.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sysdeps/unix/sysv/sco3.2.4/system.c b/sysdeps/unix/sysv/sco3.2.4/system.c index cd97649be5..06dc066b88 100644 --- a/sysdeps/unix/sysv/sco3.2.4/system.c +++ b/sysdeps/unix/sysv/sco3.2.4/system.c @@ -1,3 +1,10 @@ +/* SCO has a bug where `waitpid' will never return if SIGCHLD is blocked. + They have acknowledged that this is a bug but I have not seen nor heard + of any forthcoming fix. */ + +#define WAITPID_CANNOT_BLOCK_SIGCHLD + /* SCO 3.2v4 does have `waitpid'. Avoid unix/system.c, which says we don't. */ + #include From 279e20b3acc942fd9aa4551333baf280155bd816 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 18 May 1994 21:54:10 +0000 Subject: [PATCH 0360/4487] entered into RCS --- sysdeps/unix/sysv/sysv4/i386/sys-sig.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/sysv4/i386/sys-sig.S b/sysdeps/unix/sysv/sysv4/i386/sys-sig.S index ac4c07b7f7..58430e494f 100644 --- a/sysdeps/unix/sysv/sysv4/i386/sys-sig.S +++ b/sysdeps/unix/sysv/sysv4/i386/sys-sig.S @@ -21,7 +21,7 @@ Cambridge, MA 02139, USA. */ .globl C_SYMBOL_NAME(__sigreturn) ENTRY (__sigaction_syscall) - movel $C_SYMBOL_NAME(__sigreturn), %edx + movl $C_SYMBOL_NAME(__sigreturn), %edx DO_CALL (sigaction, 3) jb syscall_error ret From 4536ecf5b2c8cb2fd77bd75b36eda1ad295b3e2e Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 18 May 1994 22:13:04 +0000 Subject: [PATCH 0361/4487] Initial revision --- sysdeps/unix/sysv/sysv4/i386/sysdep.h | 36 +++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/i386/sysdep.h diff --git a/sysdeps/unix/sysv/sysv4/i386/sysdep.h b/sysdeps/unix/sysv/sysv4/i386/sysdep.h new file mode 100644 index 0000000000..e9541858c6 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/i386/sysdep.h @@ -0,0 +1,36 @@ +/* Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +/* In SVR4 some system calls can fail with the error ERESTART, + and this means the call should be retried. */ + +#define _ERRNO_H +#include + +#undef PSEUDO +#define PSEUDO(name, syscall_name, args) \ + .globl syscall_error; \ + ENTRY (name) \ + DO_CALL (syscall_name, args); \ + jae noerror; \ + cmpb $ERESTART, %al; \ + je C_SYMBOL_NAME (name); \ + jmp syscall_error; \ + noerror: ret From d0467bc697d72e7953aff4e680ff67e17e88058c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 18 May 1994 23:30:27 +0000 Subject: [PATCH 0362/4487] entered into RCS --- sysdeps/unix/bsd/sun/sunos4/resourcebits.h | 48 ++++++++++++++++++++++ sysdeps/unix/bsd/sun/sunos4/utsnamelen.h | 1 + 2 files changed, 49 insertions(+) create mode 100644 sysdeps/unix/bsd/sun/sunos4/resourcebits.h diff --git a/sysdeps/unix/bsd/sun/sunos4/resourcebits.h b/sysdeps/unix/bsd/sun/sunos4/resourcebits.h new file mode 100644 index 0000000000..b5d3704e6c --- /dev/null +++ b/sysdeps/unix/bsd/sun/sunos4/resourcebits.h @@ -0,0 +1,48 @@ +/* Bit values for resource limits. SunOS 4 version. +Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* These are the values for 4.4 BSD and GNU. Earlier BSD systems have a + subset of these kinds of resource limit. In systems where `getrlimit' + and `setrlimit' are not system calls, these are the values used by the C + library to emulate them. */ + +/* Kinds of resource limit. */ +enum __rlimit_resource + { + /* Per-process CPU limit, in seconds. */ + RLIMIT_CPU, + /* Largest file that can be created, in bytes. */ + RLIMIT_FSIZE, + /* Maximum size of data segment, in bytes. */ + RLIMIT_DATA, + /* Maximum size of stack segment, in bytes. */ + RLIMIT_STACK, + /* Largest core file that can be created, in bytes. */ + RLIMIT_CORE, + /* Largest resident set size, in bytes. + This affects swapping; processes that are exceeding their + resident set size will be more likely to have physical memory + taken from them. */ + RLIMIT_RSS, + /* Number of open files. */ + RLIMIT_NOFILE, + RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */ + + RLIM_NLIMITS + }; diff --git a/sysdeps/unix/bsd/sun/sunos4/utsnamelen.h b/sysdeps/unix/bsd/sun/sunos4/utsnamelen.h index 31473cf4ea..e9111b6504 100644 --- a/sysdeps/unix/bsd/sun/sunos4/utsnamelen.h +++ b/sysdeps/unix/bsd/sun/sunos4/utsnamelen.h @@ -1 +1,2 @@ #define _UTSNAME_LENGTH 9 +#define _UTSNAME_NODENAME_LENGTH 65 From 10d0017f67a34c426e1564a3fb83ad38c841f2f6 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 19 May 1994 03:36:32 +0000 Subject: [PATCH 0363/4487] entered into RCS --- sysdeps/m68k/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile index 6e9f261c03..ea0c7d5cbb 100644 --- a/sysdeps/m68k/Makefile +++ b/sysdeps/m68k/Makefile @@ -28,3 +28,5 @@ crypt := crypt.sun3 # Use crypt/crypt.sun3.S. ifndef m68k-syntax-flag m68k-syntax-flag = -DMIT_SYNTAX endif + +asm-CPPFLAGS := $(asm-CPPFLAGS) $(m68k-syntax-flag) From 7bc3467f404074e489531f550c055aa0e0bb63f2 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 19 May 1994 15:29:10 +0000 Subject: [PATCH 0364/4487] entered into RCS --- sysdeps/unix/sysv/sysv4/sigaction.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/sysv4/sigaction.c b/sysdeps/unix/sysv/sysv4/sigaction.c index 8ea55ef9bd..2644fb03ad 100644 --- a/sysdeps/unix/sysv/sysv4/sigaction.c +++ b/sysdeps/unix/sysv/sysv4/sigaction.c @@ -19,6 +19,7 @@ Cambridge, MA 02139, USA. */ #include #include #include +#include static __sighandler_t user_handlers[NSIG]; From 6bf0741b634269636dba980820935de215acf0de Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 21 May 1994 01:32:10 +0000 Subject: [PATCH 0365/4487] Initial revision --- sysdeps/unix/sysv/sco3.2.4/getgroups.c | 42 ++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 sysdeps/unix/sysv/sco3.2.4/getgroups.c diff --git a/sysdeps/unix/sysv/sco3.2.4/getgroups.c b/sysdeps/unix/sysv/sco3.2.4/getgroups.c new file mode 100644 index 0000000000..c83d6ba58b --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/getgroups.c @@ -0,0 +1,42 @@ +/* Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include + +extern int __sco_getgroups __P ((int size, unsigned short int *list)); + +int +DEFUN(__getgroups, (size, list), int size AND gid_t *list) +{ + int i; + unsigned short int *shortlist; + + if (size <= 0) + return __sco_getgroups (size, NULL); + + shortlist = __alloca (size * sizeof (*shortlist)); + + size = __sco_getgroups (size, shortlist); + for (i = 0; i < size; ++i) + list[i] = shortlist[i]; + + return size; +} From 9e2dc2608fd200cc91f8c0cd2c5faa1a4d118ec5 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 21 May 1994 01:33:03 +0000 Subject: [PATCH 0366/4487] entered into RCS --- sysdeps/unix/sysv/sco3.2.4/Makefile | 2 +- sysdeps/unix/sysv/sco3.2.4/sco_getgrp.S | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 sysdeps/unix/sysv/sco3.2.4/sco_getgrp.S diff --git a/sysdeps/unix/sysv/sco3.2.4/Makefile b/sysdeps/unix/sysv/sco3.2.4/Makefile index deea4b1be3..23525e527d 100644 --- a/sysdeps/unix/sysv/sco3.2.4/Makefile +++ b/sysdeps/unix/sysv/sco3.2.4/Makefile @@ -1,3 +1,3 @@ ifeq (posix,$(subdir)) -sysdep_routines := $(sysdep_routines) pgrpsys +sysdep_routines := $(sysdep_routines) pgrpsys sco_getgrp endif diff --git a/sysdeps/unix/sysv/sco3.2.4/sco_getgrp.S b/sysdeps/unix/sysv/sco3.2.4/sco_getgrp.S new file mode 100644 index 0000000000..e68c300821 --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/sco_getgrp.S @@ -0,0 +1,22 @@ +/* Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +PSEUDO (__sco_getgroups, getgroups, 2) + ret From f86d8fd4cd07b5d0463cc9681b13bc5b7ff38e1f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 21 May 1994 20:42:51 +0000 Subject: [PATCH 0367/4487] Formerly unix/sysv/sysv4/sigset.h.~5~ --- sysdeps/unix/sysv/sysv4/sigset.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/sysdeps/unix/sysv/sysv4/sigset.h b/sysdeps/unix/sysv/sysv4/sigset.h index 957ec0822c..9fd9a1e2c8 100644 --- a/sysdeps/unix/sysv/sysv4/sigset.h +++ b/sysdeps/unix/sysv/sysv4/sigset.h @@ -48,7 +48,11 @@ typedef struct #define __SSELT(s) ((s) / __NSSBITS) #define __SSMASK(s) (1 << ((s) % __NSSBITS)) -extern __inline int +#ifndef _EXTERN_INLINE +#define _EXTERN_INLINE +#endif + +_EXTERN_INLINE int __sigemptyset (__sigset_t *__set) { __set->__sigbits[0] = __set->__sigbits[1] = @@ -56,7 +60,7 @@ __sigemptyset (__sigset_t *__set) return 0; } -extern __inline int +_EXTERN_INLINE int __sigfillset (__sigset_t *__set) { /* SVR4 has a system call for `sigfillset' (!), and it only sets the bits @@ -67,21 +71,21 @@ __sigfillset (__sigset_t *__set) return 0; } -extern __inline int +_EXTERN_INLINE int __sigaddset (__sigset_t *__set, int __sig) { __set->__sigbits[__SSELT (__sig)] |= __SSMASK (__sig); return 0; } -extern __inline int +_EXTERN_INLINE int __sigdelset (__sigset_t *__set, int __sig) { __set->__sigbits[__SSELT (__sig)] &= ~__SSMASK (__sig); return 0; } -extern __inline int +_EXTERN_INLINE int __sigismember (__const __sigset_t *__set, int __sig) { if (__set->__sigbits[__SSELT (__sig)] & __SSMASK (__sig)) From 5d3fde1a0211e08ba21f929e067514529ae3b1b4 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 24 May 1994 05:56:11 +0000 Subject: [PATCH 0368/4487] Formerly unix/sysv/sysv4/i386/sysdep.h.~2~ --- sysdeps/unix/sysv/sysv4/i386/sysdep.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/sysv4/i386/sysdep.h b/sysdeps/unix/sysv/sysv4/i386/sysdep.h index e9541858c6..1f61e07b39 100644 --- a/sysdeps/unix/sysv/sysv4/i386/sysdep.h +++ b/sysdeps/unix/sysv/sysv4/i386/sysdep.h @@ -16,7 +16,7 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include +#include /* In SVR4 some system calls can fail with the error ERESTART, and this means the call should be retried. */ From 45f830dc74950bf4c6265959289c4b9cf9382d99 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 10 Jun 1994 22:43:23 +0000 Subject: [PATCH 0369/4487] entered into RCS --- sysdeps/unix/sysv/sco3.2.4/Dist | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/sco3.2.4/Dist b/sysdeps/unix/sysv/sco3.2.4/Dist index 1dfa95db8d..462b9fb1a6 100644 --- a/sysdeps/unix/sysv/sco3.2.4/Dist +++ b/sysdeps/unix/sysv/sco3.2.4/Dist @@ -1 +1,2 @@ pgrpsys.S +sco_getgrp.S From 6cba56a4a6ef406ae2a976f598da298e90547863 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 13 Jun 1994 23:50:11 +0000 Subject: [PATCH 0370/4487] entered into RCS --- sysdeps/unix/bsd/sun/sparc/sigtramp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/bsd/sun/sparc/sigtramp.c b/sysdeps/unix/bsd/sun/sparc/sigtramp.c index 1ccdf02f39..54f62933a8 100644 --- a/sysdeps/unix/bsd/sun/sparc/sigtramp.c +++ b/sysdeps/unix/bsd/sun/sparc/sigtramp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1994 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 @@ -187,7 +187,7 @@ DEFUN(trampoline, (sig), int sig) I don't know what it's for. Ask Sun. */ asm("restore %%g0, 139, %%g1\n" "ta 0\n" - "mov %0, %0" /* Useless insn that will never be executed, */ + "! this should be i0: %0" /* Useless insn that will never be executed, */ /* here to make the compiler happy. */ : /* No outputs. */ : /* CONTEXT is bound to %i0. We reference it as an input here to make From 12aeba0610a6edb3e39fac208bdb32c6424a3df7 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Tue, 14 Jun 1994 18:09:31 +0000 Subject: [PATCH 0371/4487] entered into RCS --- sysdeps/mips/setjmp.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/mips/setjmp.S b/sysdeps/mips/setjmp.S index aba375ab5b..ccba78b47f 100644 --- a/sysdeps/mips/setjmp.S +++ b/sysdeps/mips/setjmp.S @@ -23,6 +23,6 @@ Cambridge, MA 02139, USA. */ extra arguments. */ ENTRY (__setjmp) move a1, sp - move a2, fp + move a2, $fp j __setjmp_aux From 7088289daa2bfc5691bcd215acf6105ff1f2d2d8 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 23 Jun 1994 05:17:22 +0000 Subject: [PATCH 0372/4487] entered into RCS --- sysdeps/unix/sysv/irix4/getgroups.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/irix4/getgroups.c b/sysdeps/unix/sysv/irix4/getgroups.c index b6f002ab2e..b85b13942c 100644 --- a/sysdeps/unix/sysv/irix4/getgroups.c +++ b/sysdeps/unix/sysv/irix4/getgroups.c @@ -25,7 +25,7 @@ extern int __syssgi __P ((int, ...)); /* Set the group set for the current user to GROUPS (N of them). */ int -DEFUN(getgroups, (n, groups), size_t n AND gid_t *groups) +DEFUN(__getgroups, (n, groups), size_t n AND gid_t *groups) { return __syssgi (SGI_GETGROUPS, n, groups); } From 81c4ea64ef5ee6891b6d1079ddbf875c1cc07ec8 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 28 Jun 1994 20:31:20 +0000 Subject: [PATCH 0373/4487] entered into RCS --- sysdeps/unix/sysv/sysv4/sigset.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/sysv4/sigset.h b/sysdeps/unix/sysv/sysv4/sigset.h index 9fd9a1e2c8..a007a43470 100644 --- a/sysdeps/unix/sysv/sysv4/sigset.h +++ b/sysdeps/unix/sysv/sysv4/sigset.h @@ -49,7 +49,7 @@ typedef struct #define __SSMASK(s) (1 << ((s) % __NSSBITS)) #ifndef _EXTERN_INLINE -#define _EXTERN_INLINE +#define _EXTERN_INLINE extern __inline #endif _EXTERN_INLINE int From 2e91173e397012590cae861114ae33d303c43641 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 8 Jul 1994 18:39:48 +0000 Subject: [PATCH 0374/4487] entered into RCS --- sysdeps/unix/sysv/sysv4/i386/sysdep.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/unix/sysv/sysv4/i386/sysdep.h b/sysdeps/unix/sysv/sysv4/i386/sysdep.h index 1f61e07b39..60778e307a 100644 --- a/sysdeps/unix/sysv/sysv4/i386/sysdep.h +++ b/sysdeps/unix/sysv/sysv4/i386/sysdep.h @@ -21,7 +21,9 @@ Cambridge, MA 02139, USA. */ /* In SVR4 some system calls can fail with the error ERESTART, and this means the call should be retried. */ +#ifndef _ERRNO_H #define _ERRNO_H +#endif #include #undef PSEUDO From 3f9ea18cb599b26630e1b969e5258c67f3eb0a14 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Sat, 9 Jul 1994 00:26:26 +0000 Subject: [PATCH 0375/4487] Formerly unix/sysv/sysv4/solaris2/Makefile.~3~ --- sysdeps/unix/sysv/sysv4/solaris2/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sysdeps/unix/sysv/sysv4/solaris2/Makefile b/sysdeps/unix/sysv/sysv4/solaris2/Makefile index 4332fb4df2..4a5d59b956 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/Makefile +++ b/sysdeps/unix/sysv/sysv4/solaris2/Makefile @@ -4,3 +4,8 @@ # with the libc.a being *constructed* in $(objdir). As a work-around, # we add this to each native-compile. native-CFLAGS := $(native-CFLAGS) -L/lib +# This flag is necessary because GCC now tries to call _Q_{mul, etc...} +# instead of doing the stuff the hard way. For now, printf_fp.o, __vfscanf.o, +# and difftime.o don't work because of this. The long-term fix is to actually +# implement what they're doing, but for the short-term, we must do this. +sysdep-CFLAGS := $(sysdep-CFLAGS) -mhard-quad-float From 876bbb9e033043d2ae8a34cf3f42ba07e1f62153 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Sat, 9 Jul 1994 01:38:37 +0000 Subject: [PATCH 0376/4487] Initial revision --- sysdeps/unix/sysv/sysv4/solaris2/sparc/Dist | 0 sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile | 3 +++ 2 files changed, 3 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/solaris2/sparc/Dist create mode 100644 sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/Dist b/sysdeps/unix/sysv/sysv4/solaris2/sparc/Dist new file mode 100644 index 0000000000..e69de29bb2 diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile b/sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile new file mode 100644 index 0000000000..56f0a37de1 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile @@ -0,0 +1,3 @@ +ifeq ($(subdir),signal) +sysdep_routines := $(sysdep_routines) sys-sig +endif From 5654dd81f0aba2a6a3ed828a1356393d8ce6c544 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Sat, 9 Jul 1994 01:59:20 +0000 Subject: [PATCH 0377/4487] entered into RCS --- sysdeps/unix/sysv/sysv4/solaris2/Makefile | 5 ---- sysdeps/unix/sysv/sysv4/solaris2/sparc/Dist | 1 + .../unix/sysv/sysv4/solaris2/sparc/sys-sig.S | 25 +++++++++++++++++++ 3 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 sysdeps/unix/sysv/sysv4/solaris2/sparc/sys-sig.S diff --git a/sysdeps/unix/sysv/sysv4/solaris2/Makefile b/sysdeps/unix/sysv/sysv4/solaris2/Makefile index 4a5d59b956..4332fb4df2 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/Makefile +++ b/sysdeps/unix/sysv/sysv4/solaris2/Makefile @@ -4,8 +4,3 @@ # with the libc.a being *constructed* in $(objdir). As a work-around, # we add this to each native-compile. native-CFLAGS := $(native-CFLAGS) -L/lib -# This flag is necessary because GCC now tries to call _Q_{mul, etc...} -# instead of doing the stuff the hard way. For now, printf_fp.o, __vfscanf.o, -# and difftime.o don't work because of this. The long-term fix is to actually -# implement what they're doing, but for the short-term, we must do this. -sysdep-CFLAGS := $(sysdep-CFLAGS) -mhard-quad-float diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/Dist b/sysdeps/unix/sysv/sysv4/solaris2/sparc/Dist index e69de29bb2..69d16ac6bf 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/Dist +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/Dist @@ -0,0 +1 @@ +sys-sig.S diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys-sig.S b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys-sig.S new file mode 100644 index 0000000000..8baa997e80 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys-sig.S @@ -0,0 +1,25 @@ +/* Copyright (C) 1994 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +PSEUDO (__sigaction_syscall, sigaction, 3) + ret + +PSEUDO (__context_syscall, context, 2) + ret From d828aec47f5cae49a3566b2ae5ecef7122a218af Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Sat, 9 Jul 1994 01:59:28 +0000 Subject: [PATCH 0378/4487] Formerly sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile.~3~ --- sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile b/sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile index 56f0a37de1..dde3f820d4 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile @@ -1,3 +1,9 @@ +# This flag is necessary because GCC now tries to call _Q_{mul, etc...} +# instead of doing the stuff the hard way. For now, printf_fp.o, __vfscanf.o, +# and difftime.o don't work because of this. The long-term fix is to actually +# implement what they're doing, but for the short-term, we must do this. +sysdep-CFLAGS := $(sysdep-CFLAGS) -mhard-quad-float + ifeq ($(subdir),signal) sysdep_routines := $(sysdep_routines) sys-sig endif From c4a19f6a24771658d2bb9e45a019f4114f0f32e7 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 9 Jul 1994 07:12:44 +0000 Subject: [PATCH 0379/4487] Initial revision --- sysdeps/mach/hurd/mips/sigcontext.h | 41 +++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 sysdeps/mach/hurd/mips/sigcontext.h diff --git a/sysdeps/mach/hurd/mips/sigcontext.h b/sysdeps/mach/hurd/mips/sigcontext.h new file mode 100644 index 0000000000..5b062a2113 --- /dev/null +++ b/sysdeps/mach/hurd/mips/sigcontext.h @@ -0,0 +1,41 @@ +/* Copyright (C) 1991, 1992, 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Signal handlers are actually called: + void handler (int sig, int code, struct sigcontext *scp); */ + +/* State of this thread when the signal was taken. */ +struct sigcontext + { + int sc_onstack; /* Nonzero if running on sigstack. */ + sigset_t sc_mask; /* Blocked signals to restore. */ + + /* MiG reply port this thread is using. */ + unsigned int sc_reply_port; + + /* Port this thread is doing an interruptible RPC on. */ + unsigned long int sc_intr_port; + + /* "General" registers. */ + int sc_gpr[32]; + + int sc_sp; /* Stack pointer. */ + int sc_fp; /* Frame pointer. */ + int sc_pc; /* Instruction pointer. */ + int sc_ps; /* Processor status. */ + }; From 76657427f58d28e09a07b2ab978ffbd2d9058ee9 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 9 Jul 1994 07:24:37 +0000 Subject: [PATCH 0380/4487] entered into RCS --- sysdeps/mach/hurd/mips/exc2signal.c | 95 +++++++++++++++++++++++++++ sysdeps/mach/hurd/mips/init-fault.c | 41 ++++++++++++ sysdeps/mach/hurd/mips/longjmp-ctx.c | 41 ++++++++++++ sysdeps/mach/hurd/mips/longjmp-ts.c | 45 +++++++++++++ sysdeps/mach/hurd/mips/sigcontext.h | 2 +- sysdeps/mach/hurd/mips/sigreturn.c | 93 +++++++++++++++++++++++++++ sysdeps/mach/hurd/mips/trampoline.c | 96 ++++++++++++++++++++++++++++ sysdeps/mach/mips/machine-lock.h | 73 +++++++++++++++++++++ sysdeps/mach/mips/machine-sp.h | 38 +++++++++++ sysdeps/mach/mips/sysdep.h | 69 ++++++++++++++++++++ sysdeps/mach/mips/thread_state.h | 30 +++++++++ 11 files changed, 622 insertions(+), 1 deletion(-) create mode 100644 sysdeps/mach/hurd/mips/exc2signal.c create mode 100644 sysdeps/mach/hurd/mips/init-fault.c create mode 100644 sysdeps/mach/hurd/mips/longjmp-ctx.c create mode 100644 sysdeps/mach/hurd/mips/longjmp-ts.c create mode 100644 sysdeps/mach/hurd/mips/sigreturn.c create mode 100644 sysdeps/mach/hurd/mips/trampoline.c create mode 100644 sysdeps/mach/mips/machine-lock.h create mode 100644 sysdeps/mach/mips/machine-sp.h create mode 100644 sysdeps/mach/mips/sysdep.h create mode 100644 sysdeps/mach/mips/thread_state.h diff --git a/sysdeps/mach/hurd/mips/exc2signal.c b/sysdeps/mach/hurd/mips/exc2signal.c new file mode 100644 index 0000000000..b894dfba25 --- /dev/null +++ b/sysdeps/mach/hurd/mips/exc2signal.c @@ -0,0 +1,95 @@ +/* Translate Mach exception codes into signal numbers. MIPS version. +Copyright (C) 1991, 1992, 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include + +/* Translate the Mach exception codes, as received in an `exception_raise' RPC, + into a signal number and signal subcode. */ + +void +_hurd_exception2signal (int exception, int code, int subcode, + int *signo, int *sigcode) +{ + switch (exception) + { + default: + *signo = SIGIOT; + *sigcode = exception; + break; + + case EXC_BAD_ACCESS: + if (code == KERN_PROTECTION_FAILURE) + *signo = SIGSEGV; + else + *signo = SIGBUS; + *sigcode = subcode; + break; + + case EXC_BAD_INSTRUCTION: + *signo = SIGILL; + if (code == EXC_MIPS_II) + *sigcode = code; + else + *sigcode = 0; + break; + + case EXC_ARITHMETIC: + switch (code) + { + case EXC_MIPS_OV: /* integer overflow */ + *signo = SIGFPE; + *sigcode = EXC_MIPS_FLT_OVERFLOW; + break; + + default: + *signo = SIGFPE; + *sigcode = 0; + break; + + case EXC_MIPS_INT: + /* Subcode is the fp_status word saved by the hardware. + Give an error code corresponding to the first bit set. */ + if (subcode == EXC_MIPS_FLT_UNIMP) + *signo = SIGILL; + else + *signo = SIGFPE; + *sigcode = subcode; + break; + } + break; + + case EXC_EMULATION: + /* 3.0 doesn't give this one, why, I don't know. */ + *signo = SIGEMT; + *sigcode = 0; + break; + + case EXC_SOFTWARE: + *signo = SIGEMT; + *sigcode = 0; + break; + + case EXC_BREAKPOINT: + *signo = SIGTRAP; + *sigcode = code; + break; + } +} diff --git a/sysdeps/mach/hurd/mips/init-fault.c b/sysdeps/mach/hurd/mips/init-fault.c new file mode 100644 index 0000000000..e6f8acf64d --- /dev/null +++ b/sysdeps/mach/hurd/mips/init-fault.c @@ -0,0 +1,41 @@ +/* Set up a thread_state for proc_handle_exceptions. MIPS version. +Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include + +extern jmp_buf _hurd_sigthread_fault_env; + +static char fault_stack[32]; +static volatile void +faulted (void) +{ + __longjmp (_hurd_sigthread_fault_env, 1); +} + +void +_hurd_initialize_fault_recovery_state (void *state) +{ + struct mips_thread_state *ts = state; + memset (ts, 0, sizeof (*ts)); + ts->r29 = (int) &fault_stack[sizeof (fault_stack)]; + ts->pc = (int) &faulted; +} diff --git a/sysdeps/mach/hurd/mips/longjmp-ctx.c b/sysdeps/mach/hurd/mips/longjmp-ctx.c new file mode 100644 index 0000000000..0c78f6b4d6 --- /dev/null +++ b/sysdeps/mach/hurd/mips/longjmp-ctx.c @@ -0,0 +1,41 @@ +/* Perform a `longjmp' on a `struct sigcontext'. MIPS version. +Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include + +void +_hurd_longjmp_sigcontext (struct sigcontext *scp, jmp_buf env, int retval) +{ + scp->sc_gpr[16] = env[0].__regs[0]; + scp->sc_gpr[17] = env[0].__regs[1]; + scp->sc_gpr[18] = env[0].__regs[2]; + scp->sc_gpr[19] = env[0].__regs[3]; + scp->sc_gpr[20] = env[0].__regs[4]; + scp->sc_gpr[21] = env[0].__regs[5]; + scp->sc_gpr[22] = env[0].__regs[6]; + scp->sc_gpr[23] = env[0].__regs[7]; + + scp->sc_gpr[28] = (int) env[0].__gp; + scp->sc_fp = (int) env[0].__fp; + scp->sc_sp = (int) env[0].__sp; + scp->sc_pc = (int) env[0].__pc; + scp->sc_gpr[2] = retval ?: 1; +} diff --git a/sysdeps/mach/hurd/mips/longjmp-ts.c b/sysdeps/mach/hurd/mips/longjmp-ts.c new file mode 100644 index 0000000000..e60fdb7e5b --- /dev/null +++ b/sysdeps/mach/hurd/mips/longjmp-ts.c @@ -0,0 +1,45 @@ +/* Perform a `longjmp' on a Mach thread_state. MIPS version. +Copyright (C) 1991, 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include + + +/* Set up STATE to do the equivalent of `longjmp (ENV, VAL);'. */ + +void +_hurd_longjmp_thread_state (void *state, jmp_buf env, int val) +{ + struct mips_thread_state *ts = state; + + ts->r16 = env[0].__regs[0]; + ts->r17 = env[0].__regs[1]; + ts->r18 = env[0].__regs[2]; + ts->r19 = env[0].__regs[3]; + ts->r20 = env[0].__regs[4]; + ts->r21 = env[0].__regs[5]; + ts->r22 = env[0].__regs[6]; + ts->r23 = env[0].__regs[7]; + ts->r28 = (int) env[0].__gp; + ts->r29 = (int) env[0].__sp; + ts->r30 = (int) env[0].__fp; + ts->pc = (int) env[0].__pc; + ts->r2 = val ?: 1; +} diff --git a/sysdeps/mach/hurd/mips/sigcontext.h b/sysdeps/mach/hurd/mips/sigcontext.h index 5b062a2113..b62fb1827a 100644 --- a/sysdeps/mach/hurd/mips/sigcontext.h +++ b/sysdeps/mach/hurd/mips/sigcontext.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994 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 diff --git a/sysdeps/mach/hurd/mips/sigreturn.c b/sysdeps/mach/hurd/mips/sigreturn.c new file mode 100644 index 0000000000..4df311253e --- /dev/null +++ b/sysdeps/mach/hurd/mips/sigreturn.c @@ -0,0 +1,93 @@ +/* Copyright (C) 1991, 1992, 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include + +int +__sigreturn (const struct sigcontext *scp) +{ + struct hurd_sigstate *ss; + mach_port_t *reply_port; + + if (scp == NULL) + { + errno = EINVAL; + return -1; + } + + ss = _hurd_self_sigstate (); + ss->blocked = scp->sc_mask; + ss->intr_port = scp->sc_intr_port; + if (scp->sc_onstack) + ss->sigaltstack.ss_flags &= ~SA_ONSTACK; /* XXX threadvars */ + __mutex_unlock (&ss->lock); + + /* Destroy the MiG reply port used by the signal handler, and restore the + reply port in use by the thread when interrupted. */ + reply_port = + (mach_port_t *) __hurd_threadvar_location (_HURD_THREADVAR_MIG_REPLY); + if (*reply_port) + __mach_port_destroy (__mach_task_self (), *reply_port); + *reply_port = scp->sc_reply_port; + + /* Restore registers. */ +#define restore_gpr(n) \ + asm volatile ("lw $" #n ",%0" : : "m"(at->sc_gpr[(n)])) + + asm volatile (".set noreorder; .set noat;"); + { + register const struct sigcontext *at asm ("$1") = scp; + + restore_gpr(2); + restore_gpr(3); + restore_gpr(4); + restore_gpr(5); + restore_gpr(6); + restore_gpr(7); + restore_gpr(8); + restore_gpr(9); + restore_gpr(10); + restore_gpr(11); + restore_gpr(12); + restore_gpr(13); + restore_gpr(14); + restore_gpr(15); + restore_gpr(16); + restore_gpr(17); + restore_gpr(18); + restore_gpr(19); + restore_gpr(20); + restore_gpr(21); + restore_gpr(22); + restore_gpr(23); + restore_gpr(24); + restore_gpr(25); + restore_gpr(28); + asm volatile ("lw $29,%0" : : "m"(scp->sc_sp)); + asm volatile ("lw $30,%0" : : "m"(scp->sc_fp)); + asm volatile ("lw $31,%0" : : "m"(scp->sc_pc)); + asm volatile ("j $31"); + restore_gpr(1); + asm volatile (".set reorder; .set at;"); + } + + /* NOTREACHED */ + return -1; +} diff --git a/sysdeps/mach/hurd/mips/trampoline.c b/sysdeps/mach/hurd/mips/trampoline.c new file mode 100644 index 0000000000..a6c9cec770 --- /dev/null +++ b/sysdeps/mach/hurd/mips/trampoline.c @@ -0,0 +1,96 @@ +/* Set thread_state for sighandler, and sigcontext to recover. MIPS version. +Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include + +static void +trampoline (void (*handler) (int signo, int sigcode, struct sigcontext *scp), + int signo, int sigcode, struct sigcontext *scp) +{ + (*handler) (signo, sigcode, scp); + (void) __sigreturn (scp); /* Does not return. */ + while (1) + LOSE; /* Firewall. */ +} + +struct sigcontext * +_hurd_setup_sighandler (int flags, + __sighandler_t handler, + struct sigaltstack *sigaltstack, + int signo, int sigcode, + void *state) +{ + struct mips_thread_state *ts; + void *sigsp; + struct sigcontext *scp; + struct + { + void *retaddr; /* Never used. */ + __sighandler_t handler; + int signo; + int sigcode; + struct sigcontext *scp; /* Points to ctx, below. */ + struct sigcontext ctx; + } *stackframe; + + ts = state; + + if ((flags & SA_ONSTACK) && + !(sigaltstack->ss_flags & (SA_DISABLE|SA_ONSTACK))) + { + sigsp = sigaltstack->ss_sp + sigaltstack->ss_size; + sigaltstack->ss_flags |= SA_ONSTACK; + } + else + sigsp = (char *) ts->r29; + + /* Push the arguments to call `trampoline' on the stack. */ + sigsp -= sizeof (*stackframe); + stackframe = sigsp; + stackframe->handler = handler; + stackframe->signo = signo; + stackframe->sigcode = sigcode; + stackframe->scp = scp = &stackframe->ctx; + + /* Set up the sigcontext from the current state of the thread. */ + + scp->sc_onstack = sigaltstack->ss_flags & SA_ONSTACK ? 1 : 0; + + scp->sc_gpr[16] = ts->r16; + scp->sc_gpr[17] = ts->r17; + scp->sc_gpr[18] = ts->r18; + scp->sc_gpr[19] = ts->r19; + scp->sc_gpr[20] = ts->r20; + scp->sc_gpr[21] = ts->r21; + scp->sc_gpr[22] = ts->r22; + scp->sc_gpr[23] = ts->r23; + scp->sc_gpr[28] = ts->r28; + scp->sc_gpr[31] = ts->r31; + + scp->sc_pc = ts->pc; + scp->sc_sp = ts->r29; + scp->sc_fp = ts->r30; + + /* Modify the thread state to call `trampoline' on the new stack. */ + ts->r29 = (int) sigsp; + ts->pc = (int) &trampoline; + + return scp; +} diff --git a/sysdeps/mach/mips/machine-lock.h b/sysdeps/mach/mips/machine-lock.h new file mode 100644 index 0000000000..628aae41bb --- /dev/null +++ b/sysdeps/mach/mips/machine-lock.h @@ -0,0 +1,73 @@ +/* Machine-specific definition for spin locks. MIPS version. +Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifndef _MACHINE_LOCK_H +#define _MACHINE_LOCK_H + +/* The type of a spin lock variable. */ + +typedef __volatile int __spin_lock_t; + +/* Value to initialize `__spin_lock_t' variables to. */ + +#define __SPIN_LOCK_INITIALIZER 0 + + +#ifndef _EXTERN_INLINE +#define _EXTERN_INLINE extern __inline +#endif + +/* Unlock LOCK. */ + +_EXTERN_INLINE void +__spin_unlock (__spin_lock_t *__lock) +{ + *__lock = 0; +} + +/* Try to lock LOCK; return nonzero if we locked it, zero if another has. */ + +_EXTERN_INLINE int +__spin_try_lock (register __spin_lock_t *__lock) +{ + register int __rtn; + __asm__ __volatile (".set noreorder"); +#if 0 + __asm__ __volatile ("lw %0,0(%1)": "=r" (__rtn) : "r" (__lock)); + __asm__ __volatile ("sw %0,0(%0)": : "r" (__lock)); + __asm__ __volatile ("xor %0,%1,%0": "=r" (__rtn) : "r" (__lock)); +#else + /* Use the Mach microkernel's emulated TAS pseudo-instruction. */ + register int __rtn __asm__ ("a0"); + __asm__ __volatile (".word 0xf ! %0 " : "=r" (__rtn) : "0" (__lock)); +#endif + __asm__ __volatile (".set reorder"); + return __rtn ^ (int) __lock; +} + +/* Return nonzero if LOCK is locked. */ + +_EXTERN_INLINE int +__spin_lock_locked (__spin_lock_t *__lock) +{ + return *__lock != 0; +} + + +#endif /* machine-lock.h */ diff --git a/sysdeps/mach/mips/machine-sp.h b/sysdeps/mach/mips/machine-sp.h new file mode 100644 index 0000000000..7406658f53 --- /dev/null +++ b/sysdeps/mach/mips/machine-sp.h @@ -0,0 +1,38 @@ +/* Machine-specific function to return the stack pointer. MIPS version. +Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifndef _MACHINE_SP_H +#define _MACHINE_SP_H + +/* Return the current stack pointer. */ + +#ifndef _EXTERN_INLINE +#define _EXTERN_INLINE extern __inline +#endif + +_EXTERN_INLINE void * +__thread_stack_pointer (void) +{ + void *__sp__; + __asm__ ("move %0,$29" : "=r" (__sp__)); + return __sp__; +} + +#endif /* machine-sp.h */ + diff --git a/sysdeps/mach/mips/sysdep.h b/sysdeps/mach/mips/sysdep.h new file mode 100644 index 0000000000..7609be5931 --- /dev/null +++ b/sysdeps/mach/mips/sysdep.h @@ -0,0 +1,69 @@ +/* Copyright (C) 1991, 1992, 1993, 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#define MOVE(x,y) move y , x + +#if 0 +#define LOSE asm volatile ("1: b 1b") +#endif + +#define SNARF_ARGS(argc, argv, envp) \ + do \ + { \ + int *entry_sp; \ + register char **p; \ + \ + asm ("addu %0,$30,4" : "=r" (entry_sp)); \ + \ + argc = *entry_sp; \ + argv = (char **) (entry_sp + 1); \ + p = argv; \ + while (*p++ != NULL) \ + ; \ + if (p >= (char **) argv[0]) \ + --p; \ + envp = p; \ + } while (0) + +#define CALL_WITH_SP(fn, sp) \ + ({ register int __fn = fn, __sp = (int) sp; \ + asm volatile ("move $sp,%0; j %1" : : "r" (__sp), "r" (__fn));}) + +#define STACK_GROWTH_DOWN + +#ifdef P40 +#include + +#define SYSCALL(name, args) \ + .globl syscall_error; \ + kernel_trap(name,SYS_##name,args); \ + beq $1,$0,1f; \ + j syscall_error; \ +1: + +#define SYSCALL__(name, args) \ + .globl syscall_error; \ + kernel_trap(__##name,SYS_##name,args); \ + beq $1,$0,1f; \ + j syscall_error; \ +1: + +#define ret j ra; nop +#endif + +#include_next diff --git a/sysdeps/mach/mips/thread_state.h b/sysdeps/mach/mips/thread_state.h new file mode 100644 index 0000000000..541461fd85 --- /dev/null +++ b/sysdeps/mach/mips/thread_state.h @@ -0,0 +1,30 @@ +/* Mach thread state definitions for machine-independent code. MIPS version. +Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Everything else is called `thread_state', but CMU's header file is + called `thread_status'. Oh boy. */ +#include + +#define MACHINE_THREAD_STATE_FLAVOR MIPS_THREAD_STATE +#define MACHINE_THREAD_STATE_COUNT MIPS_THREAD_STATE_COUNT + +#define machine_thread_state mips_thread_state + +#define PC pc +#define SP r29 From 2200643a09c313ddf4cf99d032b3bd99549576d9 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Mon, 11 Jul 1994 21:49:56 +0000 Subject: [PATCH 0381/4487] entered into RCS --- sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile b/sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile index dde3f820d4..7ad4bb1633 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile @@ -3,7 +3,3 @@ # and difftime.o don't work because of this. The long-term fix is to actually # implement what they're doing, but for the short-term, we must do this. sysdep-CFLAGS := $(sysdep-CFLAGS) -mhard-quad-float - -ifeq ($(subdir),signal) -sysdep_routines := $(sysdep_routines) sys-sig -endif From bc8037a42c063f2774391780ce4f2658200ed9a9 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Thu, 14 Jul 1994 19:43:12 +0000 Subject: [PATCH 0382/4487] entered into RCS --- sysdeps/unix/sysv/sysv4/solaris2/fsync.S | 29 ++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/solaris2/fsync.S diff --git a/sysdeps/unix/sysv/sysv4/solaris2/fsync.S b/sysdeps/unix/sysv/sysv4/solaris2/fsync.S new file mode 100644 index 0000000000..aefa3e3af7 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/solaris2/fsync.S @@ -0,0 +1,29 @@ +/* Copyright (C) 1994 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +/* Solaris uses fdsync for the normal fsync. */ +ENTRY(fsync) + mov 16, %i1 + mov SYS_ify(fdsync), %g1 + ta 8 + bcs syscall_error + nop + mov %g0, %o0 + ret From c286ffe823123fbeceac11a9d9e2c6d856d478a9 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Thu, 14 Jul 1994 22:13:18 +0000 Subject: [PATCH 0383/4487] Initial revision --- sysdeps/unix/sysv/sysv4/sysinfo.S | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 sysdeps/unix/sysv/sysv4/sysinfo.S diff --git a/sysdeps/unix/sysv/sysv4/sysinfo.S b/sysdeps/unix/sysv/sysv4/sysinfo.S new file mode 100644 index 0000000000..e69de29bb2 From 85b67f1ffb05b8e908d82e59ae224b15ee26f9cd Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Thu, 14 Jul 1994 22:21:57 +0000 Subject: [PATCH 0384/4487] entered into RCS --- sysdeps/unix/sysv/sysv4/Dist | 1 + sysdeps/unix/sysv/sysv4/gethostname.c | 31 +++++++++++++++++++++++++++ sysdeps/unix/sysv/sysv4/sethostname.c | 31 +++++++++++++++++++++++++++ sysdeps/unix/sysv/sysv4/sysinfo.S | 22 +++++++++++++++++++ 4 files changed, 85 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/gethostname.c create mode 100644 sysdeps/unix/sysv/sysv4/sethostname.c diff --git a/sysdeps/unix/sysv/sysv4/Dist b/sysdeps/unix/sysv/sysv4/Dist index 46c09807b4..f603d8b8ff 100644 --- a/sysdeps/unix/sysv/sysv4/Dist +++ b/sysdeps/unix/sysv/sysv4/Dist @@ -4,3 +4,4 @@ pgrpsys.S __waitid.S siginfo.h __getpgid.c __setpgid.c +sysinfo.S diff --git a/sysdeps/unix/sysv/sysv4/gethostname.c b/sysdeps/unix/sysv/sysv4/gethostname.c new file mode 100644 index 0000000000..c1c9e0a454 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/gethostname.c @@ -0,0 +1,31 @@ +/* Copyright (C) 1994 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include +#include + +extern int __sysinfo __P ((int command, char *buf, long count)); + +int +DEFUN(__gethostname, (name, namelen), char *name AND size_t namelen) +{ + return __sysinfo (SI_HOSTNAME, name, namelen); +} diff --git a/sysdeps/unix/sysv/sysv4/sethostname.c b/sysdeps/unix/sysv/sysv4/sethostname.c new file mode 100644 index 0000000000..4cebc456e1 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/sethostname.c @@ -0,0 +1,31 @@ +/* Copyright (C) 1994 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include +#include + +extern int __sysinfo __P ((int command, const char *buf, long count)); + +int +DEFUN(sethostname, (name, namelen), const char *name AND size_t namelen) +{ + return __sysinfo (SI_SET_HOSTNAME, name, namelen); +} diff --git a/sysdeps/unix/sysv/sysv4/sysinfo.S b/sysdeps/unix/sysv/sysv4/sysinfo.S index e69de29bb2..c279c96e9c 100644 --- a/sysdeps/unix/sysv/sysv4/sysinfo.S +++ b/sysdeps/unix/sysv/sysv4/sysinfo.S @@ -0,0 +1,22 @@ +/* Copyright (C) 1994 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +PSEUDO (__sysinfo, systeminfo, 3) + ret From bab9b6590377bfd827782833c3fbfdc5551b55c3 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 16 Jul 1994 04:43:42 +0000 Subject: [PATCH 0385/4487] entered into RCS --- sysdeps/mips/dec/bytesex.h | 4 ++++ sysdeps/mips/p40/bytesex.h | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 sysdeps/mips/dec/bytesex.h create mode 100644 sysdeps/mips/p40/bytesex.h diff --git a/sysdeps/mips/dec/bytesex.h b/sysdeps/mips/dec/bytesex.h new file mode 100644 index 0000000000..157bc44d06 --- /dev/null +++ b/sysdeps/mips/dec/bytesex.h @@ -0,0 +1,4 @@ +/* The MIPS architecture has selectable endianness. + The DECstation uses little-endian mode. */ + +#define __BYTE_ORDER __LITTLE_ENDIAN diff --git a/sysdeps/mips/p40/bytesex.h b/sysdeps/mips/p40/bytesex.h new file mode 100644 index 0000000000..e4b0119433 --- /dev/null +++ b/sysdeps/mips/p40/bytesex.h @@ -0,0 +1,4 @@ +/* The MIPS has selectable endianness. + The Japanese homebrew P40 architecture uses big-endian mode. */ + +#define __BYTE_ORDER __BIG_ENDIAN From 0ba370609fd41f64a3440f758056bc53ac381999 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 16 Jul 1994 21:16:31 +0000 Subject: [PATCH 0386/4487] Initial revision --- sysdeps/unix/bsd/sun/signum.h | 69 ++++++++++++++++++++++++++++++ sysdeps/unix/sysv/sco3.2.4/uname.S | 42 ++++++++++++++++++ 2 files changed, 111 insertions(+) create mode 100644 sysdeps/unix/bsd/sun/signum.h create mode 100644 sysdeps/unix/sysv/sco3.2.4/uname.S diff --git a/sysdeps/unix/bsd/sun/signum.h b/sysdeps/unix/bsd/sun/signum.h new file mode 100644 index 0000000000..f990fefdcd --- /dev/null +++ b/sysdeps/unix/bsd/sun/signum.h @@ -0,0 +1,69 @@ +/* Signal number definitions. SunOS version. +Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifdef _SIGNAL_H + +/* This file defines the fake signal functions and signal + number constants for 4.2 or 4.3 BSD-derived Unix system. */ + +/* Fake signal functions. */ +#define SIG_ERR ((__sighandler_t) -1) /* Error return. */ +#define SIG_DFL ((__sighandler_t) 0) /* Default action. */ +#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */ + + +/* Signals. */ +#define SIGHUP 1 /* Hangup (POSIX). */ +#define SIGINT 2 /* Interrupt (ANSI). */ +#define SIGQUIT 3 /* Quit (POSIX). */ +#define SIGILL 4 /* Illegal instruction (ANSI). */ +#define SIGABRT SIGIOT /* Abort (ANSI). */ +#define SIGTRAP 5 /* Trace trap (POSIX). */ +#define SIGIOT 6 /* IOT trap (4.2 BSD). */ +#define SIGEMT 7 /* EMT trap (4.2 BSD). */ +#define SIGFPE 8 /* Floating-point exception (ANSI). */ +#define SIGKILL 9 /* Kill, unblockable (POSIX). */ +#define SIGBUS 10 /* Bus error (4.2 BSD). */ +#define SIGSEGV 11 /* Segmentation violation (ANSI). */ +#define SIGSYS 12 /* Bad argument to system call (4.2 BSD). */ +#define SIGPIPE 13 /* Broken pipe (POSIX). */ +#define SIGALRM 14 /* Alarm clock (POSIX). */ +#define SIGTERM 15 /* Termination (ANSI). */ +#define SIGURG 16 /* Urgent condition on socket (4.2 BSD). */ +#define SIGSTOP 17 /* Stop, unblockable (POSIX). */ +#define SIGTSTP 18 /* Keyboard stop (POSIX). */ +#define SIGCONT 19 /* Continue (POSIX). */ +#define SIGCHLD 20 /* Child status has changed (POSIX). */ +#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */ +#define SIGTTIN 21 /* Background read from tty (POSIX). */ +#define SIGTTOU 22 /* Background write to tty (POSIX). */ +#define SIGIO 23 /* I/O now possible (4.2 BSD). */ +#define SIGPOLL SIGIO /* Same as SIGIO? (SVID). */ +#define SIGXCPU 24 /* CPU limit exceeded (4.2 BSD). */ +#define SIGXFSZ 25 /* File size limit exceeded (4.2 BSD). */ +#define SIGVTALRM 26 /* Virtual alarm clock (4.2 BSD). */ +#define SIGPROF 27 /* Profiling alarm clock (4.2 BSD). */ +#define SIGWINCH 28 /* Window size change (4.3 BSD, Sun). */ +#define SIGLOST 29 /* Resource lost (Sun). */ +#define SIGUSR1 30 /* User-defined signal 1 (POSIX). */ +#define SIGUSR2 31 /* User-defined signal 2 (POSIX). */ + +#endif /* included. */ + +#define _NSIG 32 /* Biggest signal number + 1. */ diff --git a/sysdeps/unix/sysv/sco3.2.4/uname.S b/sysdeps/unix/sysv/sco3.2.4/uname.S new file mode 100644 index 0000000000..4500c578eb --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/uname.S @@ -0,0 +1,42 @@ +/* Copyright (C) 1993, 1994 Free Software Foundation, Inc. + Contributed by Scott Bartram. + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +/* + before lcall, stack contents should be: + + 4(%esp) -> name + 8(%esp) -> unspecified + 12(%esp) -> 0 + */ + +ENTRY (uname) + pushl $0x0 /* Push the discriminator flag. */ + pushl $0x0 /* Push dummy placeholder. */ + pushl 12(%esp,1) /* Push name (ptr to struct utsname) */ + subl $0x4, %esp /* Adjust stack pointer. */ + DO_CALL (utssys, 3) + jb error /* Test for error. */ + addl $0x10, %esp /* Adjust the stack pointer. */ + xorl %eax, %eax /* Clear return value. */ + ret +error: addl $0x10, %esp /* Adjust the stack pointer. */ + jmp syscall_error From d3e17c74465ce25c455938ff3f0445efdacc1972 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 16 Jul 1994 21:16:53 +0000 Subject: [PATCH 0387/4487] entered into RCS --- sysdeps/unix/bsd/sun/signum.h | 2 +- sysdeps/unix/sysv/sco3.2.4/getgroups.c | 1 + sysdeps/unix/sysv/sco3.2.4/uname.S | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/bsd/sun/signum.h b/sysdeps/unix/bsd/sun/signum.h index f990fefdcd..ea83d710f6 100644 --- a/sysdeps/unix/bsd/sun/signum.h +++ b/sysdeps/unix/bsd/sun/signum.h @@ -20,7 +20,7 @@ Cambridge, MA 02139, USA. */ #ifdef _SIGNAL_H /* This file defines the fake signal functions and signal - number constants for 4.2 or 4.3 BSD-derived Unix system. */ + number constants for SunOS 3 and 4 Unix systems. */ /* Fake signal functions. */ #define SIG_ERR ((__sighandler_t) -1) /* Error return. */ diff --git a/sysdeps/unix/sysv/sco3.2.4/getgroups.c b/sysdeps/unix/sysv/sco3.2.4/getgroups.c index c83d6ba58b..82e5fbab64 100644 --- a/sysdeps/unix/sysv/sco3.2.4/getgroups.c +++ b/sysdeps/unix/sysv/sco3.2.4/getgroups.c @@ -20,6 +20,7 @@ Cambridge, MA 02139, USA. */ #include #include #include +#include extern int __sco_getgroups __P ((int size, unsigned short int *list)); diff --git a/sysdeps/unix/sysv/sco3.2.4/uname.S b/sysdeps/unix/sysv/sco3.2.4/uname.S index 4500c578eb..a22d18a3e6 100644 --- a/sysdeps/unix/sysv/sco3.2.4/uname.S +++ b/sysdeps/unix/sysv/sco3.2.4/uname.S @@ -31,7 +31,7 @@ Cambridge, MA 02139, USA. */ ENTRY (uname) pushl $0x0 /* Push the discriminator flag. */ pushl $0x0 /* Push dummy placeholder. */ - pushl 12(%esp,1) /* Push name (ptr to struct utsname) */ + pushl 12(%esp,1) /* Push NAME (ptr to struct utsname) */ subl $0x4, %esp /* Adjust stack pointer. */ DO_CALL (utssys, 3) jb error /* Test for error. */ From 5736111e49f39f3094ff1b6afc5009150749730f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 22 Jul 1994 23:54:43 +0000 Subject: [PATCH 0388/4487] (PSEUDO): Remove ret at end. --- sysdeps/unix/sysv/sysv4/i386/sysdep.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/sysv4/i386/sysdep.h b/sysdeps/unix/sysv/sysv4/i386/sysdep.h index 60778e307a..1e0cd69f74 100644 --- a/sysdeps/unix/sysv/sysv4/i386/sysdep.h +++ b/sysdeps/unix/sysv/sysv4/i386/sysdep.h @@ -35,4 +35,4 @@ Cambridge, MA 02139, USA. */ cmpb $ERESTART, %al; \ je C_SYMBOL_NAME (name); \ jmp syscall_error; \ - noerror: ret + noerror: From 840c5e79e31877a48931440e52a430c25d42fd20 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 29 Jul 1994 15:46:10 +0000 Subject: [PATCH 0389/4487] Don't set up args on the stack; pass them in registers. --- sysdeps/mach/hurd/mips/trampoline.c | 32 ++++++++++++++--------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/sysdeps/mach/hurd/mips/trampoline.c b/sysdeps/mach/hurd/mips/trampoline.c index a6c9cec770..856cce6d0b 100644 --- a/sysdeps/mach/hurd/mips/trampoline.c +++ b/sysdeps/mach/hurd/mips/trampoline.c @@ -40,15 +40,6 @@ _hurd_setup_sighandler (int flags, struct mips_thread_state *ts; void *sigsp; struct sigcontext *scp; - struct - { - void *retaddr; /* Never used. */ - __sighandler_t handler; - int signo; - int sigcode; - struct sigcontext *scp; /* Points to ctx, below. */ - struct sigcontext ctx; - } *stackframe; ts = state; @@ -61,18 +52,16 @@ _hurd_setup_sighandler (int flags, else sigsp = (char *) ts->r29; - /* Push the arguments to call `trampoline' on the stack. */ - sigsp -= sizeof (*stackframe); - stackframe = sigsp; - stackframe->handler = handler; - stackframe->signo = signo; - stackframe->sigcode = sigcode; - stackframe->scp = scp = &stackframe->ctx; + /* Set up the sigcontext structure on the stack. This is all the stack + needs, since the args are passed in registers (below). */ + sigsp -= sizeof (*scp); + scp = sigsp; /* Set up the sigcontext from the current state of the thread. */ scp->sc_onstack = sigaltstack->ss_flags & SA_ONSTACK ? 1 : 0; + scp->sc_gpr[2] = ts->r2; scp->sc_gpr[16] = ts->r16; scp->sc_gpr[17] = ts->r17; scp->sc_gpr[18] = ts->r18; @@ -89,7 +78,16 @@ _hurd_setup_sighandler (int flags, scp->sc_fp = ts->r30; /* Modify the thread state to call `trampoline' on the new stack. */ - ts->r29 = (int) sigsp; + + /* These registers are used for passing the first four arguments to a + function (the rest go on the stack). Fortunately `trampoline' takes + just four arguments, so they all fit in registers. */ + ts->r4 = (int) handler; + ts->r5 = signo; + ts->r6 = sigcode; + ts->r7 = (int) scp; + + ts->r29 = (int) sigsp; /* r29 is the stack pointer register. */ ts->pc = (int) &trampoline; return scp; From 3844669a628ec08240e6bd0dff64cefee1578ac6 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 29 Jul 1994 15:53:52 +0000 Subject: [PATCH 0390/4487] Use `unsigned int' consistently for port names. --- sysdeps/mach/hurd/mips/sigcontext.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/mach/hurd/mips/sigcontext.h b/sysdeps/mach/hurd/mips/sigcontext.h index b62fb1827a..d0fdee7c90 100644 --- a/sysdeps/mach/hurd/mips/sigcontext.h +++ b/sysdeps/mach/hurd/mips/sigcontext.h @@ -29,7 +29,7 @@ struct sigcontext unsigned int sc_reply_port; /* Port this thread is doing an interruptible RPC on. */ - unsigned long int sc_intr_port; + unsigned int sc_intr_port; /* "General" registers. */ int sc_gpr[32]; From 6adee8d53b6f822a13f150c80cee5a0eb2a89f46 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 29 Jul 1994 16:39:58 +0000 Subject: [PATCH 0391/4487] Rename variable AT (which is the register's name) to SCPREG. Fix some SCP references in register loads to use SCPREG instead. Load SCPREG->sc_pc into $24 and jump to it, restoring $at in the delay slot. This still leaves $24 clobbered. --- sysdeps/mach/hurd/mips/sigreturn.c | 77 +++++++++++++++++------------- 1 file changed, 45 insertions(+), 32 deletions(-) diff --git a/sysdeps/mach/hurd/mips/sigreturn.c b/sysdeps/mach/hurd/mips/sigreturn.c index 4df311253e..147243f5b9 100644 --- a/sysdeps/mach/hurd/mips/sigreturn.c +++ b/sysdeps/mach/hurd/mips/sigreturn.c @@ -16,6 +16,8 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +register int sp asm ("$29"), fp asm ("$30"); + #include #include #include @@ -49,42 +51,53 @@ __sigreturn (const struct sigcontext *scp) /* Restore registers. */ #define restore_gpr(n) \ - asm volatile ("lw $" #n ",%0" : : "m"(at->sc_gpr[(n)])) + asm volatile ("lw $" #n ",%0" : : "m" (scpreg->sc_gpr[n])) asm volatile (".set noreorder; .set noat;"); { - register const struct sigcontext *at asm ("$1") = scp; + register const struct sigcontext *const scpreg asm ("$1") = scp; + + /* Load the general-purpose registers from the sigcontext. */ + restore_gpr (2); + restore_gpr (3); + restore_gpr (4); + restore_gpr (5); + restore_gpr (6); + restore_gpr (7); + restore_gpr (8); + restore_gpr (9); + restore_gpr (10); + restore_gpr (11); + restore_gpr (12); + restore_gpr (13); + restore_gpr (14); + restore_gpr (15); + restore_gpr (16); + restore_gpr (17); + restore_gpr (18); + restore_gpr (19); + restore_gpr (20); + restore_gpr (21); + restore_gpr (22); + restore_gpr (23); + restore_gpr (24); + restore_gpr (25); + /* Registers 26-27 are kernel-only. */ + restore_gpr (28); + + /* Now the special-purpose registers. */ + sp = scpreg->sc_sp; /* Stack pointer. */ + fp = scpreg->sc_fp; /* Frame pointer. */ + restore_gpr (31); /* Return address. */ - restore_gpr(2); - restore_gpr(3); - restore_gpr(4); - restore_gpr(5); - restore_gpr(6); - restore_gpr(7); - restore_gpr(8); - restore_gpr(9); - restore_gpr(10); - restore_gpr(11); - restore_gpr(12); - restore_gpr(13); - restore_gpr(14); - restore_gpr(15); - restore_gpr(16); - restore_gpr(17); - restore_gpr(18); - restore_gpr(19); - restore_gpr(20); - restore_gpr(21); - restore_gpr(22); - restore_gpr(23); - restore_gpr(24); - restore_gpr(25); - restore_gpr(28); - asm volatile ("lw $29,%0" : : "m"(scp->sc_sp)); - asm volatile ("lw $30,%0" : : "m"(scp->sc_fp)); - asm volatile ("lw $31,%0" : : "m"(scp->sc_pc)); - asm volatile ("j $31"); - restore_gpr(1); + /* Now jump to the saved PC. */ + asm volatile ("lw $24, %0\n" /* Load saved PC into temporary $t8. */ + "j $24\n" /* Jump to the saved PC value. */ + "lw $1, %1\n" /* Restore $at in delay slot. */ + : : + "m" (scpreg->sc_pc), + "m" (scpreg->sc_r1) /* $at */ + : "$24"); /* XXX clobbers $24 (aka $t8)!! */ asm volatile (".set reorder; .set at;"); } From cad7e45a3b4809fd086a30f3a481d99dcca230a1 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 31 Jul 1994 20:01:52 +0000 Subject: [PATCH 0392/4487] Incorporated from BSD 4.4-Lite. --- sysdeps/vax/DEFS.h | 46 ++++++++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/sysdeps/vax/DEFS.h b/sysdeps/vax/DEFS.h index 5e20bc8e29..01f1f0cdd0 100644 --- a/sysdeps/vax/DEFS.h +++ b/sysdeps/vax/DEFS.h @@ -1,22 +1,36 @@ /* - * Copyright (c) 1982 The Regents of the University of California. - * All rights reserved. + * Copyright (c) 1982, 1993 + * The Regents of the University of California. All rights reserved. * - * Redistribution and use in source and binary forms are permitted - * provided that: (1) source distributions retain this entire copyright - * notice and comment, and (2) distributions including binaries display - * the following acknowledgement: ``This product includes software - * developed by the University of California, Berkeley and its contributors'' - * in the documentation or other materials provided with the distribution - * and in all advertising materials mentioning features or use of this - * software. Neither the name of the University nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. * - * @(#)DEFS.h 5.3 (Berkeley) 6/1/90 + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)DEFS.h 8.1 (Berkeley) 6/4/93 */ #define R0 0x001 From e0ec2e47de5dc5e6ebcfe070f2c2c5f25487441c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 2 Aug 1994 00:12:17 +0000 Subject: [PATCH 0393/4487] (struct sigcontext): Add members sc_mdlo, sc_mdhi. --- sysdeps/mach/hurd/mips/sigcontext.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/mach/hurd/mips/sigcontext.h b/sysdeps/mach/hurd/mips/sigcontext.h index d0fdee7c90..63632e8758 100644 --- a/sysdeps/mach/hurd/mips/sigcontext.h +++ b/sysdeps/mach/hurd/mips/sigcontext.h @@ -38,4 +38,6 @@ struct sigcontext int sc_fp; /* Frame pointer. */ int sc_pc; /* Instruction pointer. */ int sc_ps; /* Processor status. */ + + int sc_mdlo, sc_mdhi; /* High and low multiplication results. */ }; From c1eb1d76e21f9eb54c1a5f65f9c2c38babed1b5d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 2 Aug 1994 00:15:34 +0000 Subject: [PATCH 0394/4487] (_hurd_setup_sighandler): Save mdlo and mdhi. --- sysdeps/mach/hurd/mips/trampoline.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysdeps/mach/hurd/mips/trampoline.c b/sysdeps/mach/hurd/mips/trampoline.c index 856cce6d0b..559d8e8146 100644 --- a/sysdeps/mach/hurd/mips/trampoline.c +++ b/sysdeps/mach/hurd/mips/trampoline.c @@ -73,6 +73,9 @@ _hurd_setup_sighandler (int flags, scp->sc_gpr[28] = ts->r28; scp->sc_gpr[31] = ts->r31; + scp->sc_mdlo = ts->mdlo; + scp->sc_mdhi = ts->mdhi; + scp->sc_pc = ts->pc; scp->sc_sp = ts->r29; scp->sc_fp = ts->r30; From 5064f78e9df40dc88fc6d1ce84044ef8911f4358 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 3 Aug 1994 01:03:35 +0000 Subject: [PATCH 0395/4487] [__sgi__]: Use `fp' instead of `$fp'. --- sysdeps/mips/setjmp.S | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysdeps/mips/setjmp.S b/sysdeps/mips/setjmp.S index ccba78b47f..485811e350 100644 --- a/sysdeps/mips/setjmp.S +++ b/sysdeps/mips/setjmp.S @@ -23,6 +23,10 @@ Cambridge, MA 02139, USA. */ extra arguments. */ ENTRY (__setjmp) move a1, sp +#ifdef __sgi__ + move a2, fp +#else move a2, $fp +#endif j __setjmp_aux From b6cc52076465c392cbeedea0e68a4a8fe1cffa65 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 3 Aug 1994 01:36:31 +0000 Subject: [PATCH 0396/4487] (struct sigcontext): sc_gpr has 31 elts; sc_gpr, sc_pc, sc_mdlo, sc_mdhi are arranged in that order to mimic struct mips_thread_state. --- sysdeps/mach/hurd/mips/sigcontext.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/sysdeps/mach/hurd/mips/sigcontext.h b/sysdeps/mach/hurd/mips/sigcontext.h index 63632e8758..2cb9459b6e 100644 --- a/sysdeps/mach/hurd/mips/sigcontext.h +++ b/sysdeps/mach/hurd/mips/sigcontext.h @@ -30,14 +30,12 @@ struct sigcontext /* Port this thread is doing an interruptible RPC on. */ unsigned int sc_intr_port; - - /* "General" registers. */ - int sc_gpr[32]; - - int sc_sp; /* Stack pointer. */ - int sc_fp; /* Frame pointer. */ - int sc_pc; /* Instruction pointer. */ - int sc_ps; /* Processor status. */ + /* These four elements are laid out just like a `struct mips_thread_state'; + trampoline.c knows this, so it must be changed if this changes. */ + int sc_gpr[31]; /* "General" registers; [0] is r1. */ + int sc_pc; /* Instruction pointer. */ int sc_mdlo, sc_mdhi; /* High and low multiplication results. */ + + int sc_ps; /* Processor status. */ }; From 8d2f85c668a30bafd78d622747a4b9db7c7675cd Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 3 Aug 1994 01:38:43 +0000 Subject: [PATCH 0397/4487] (_hurd_setup_sighandler): Copy TS to SCP all at once. --- sysdeps/mach/hurd/mips/trampoline.c | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/sysdeps/mach/hurd/mips/trampoline.c b/sysdeps/mach/hurd/mips/trampoline.c index 559d8e8146..4fc9fda31d 100644 --- a/sysdeps/mach/hurd/mips/trampoline.c +++ b/sysdeps/mach/hurd/mips/trampoline.c @@ -48,6 +48,8 @@ _hurd_setup_sighandler (int flags, { sigsp = sigaltstack->ss_sp + sigaltstack->ss_size; sigaltstack->ss_flags |= SA_ONSTACK; + /* XXX need to set up base of new stack for + per-thread variables, cthreads. */ } else sigsp = (char *) ts->r29; @@ -61,24 +63,9 @@ _hurd_setup_sighandler (int flags, scp->sc_onstack = sigaltstack->ss_flags & SA_ONSTACK ? 1 : 0; - scp->sc_gpr[2] = ts->r2; - scp->sc_gpr[16] = ts->r16; - scp->sc_gpr[17] = ts->r17; - scp->sc_gpr[18] = ts->r18; - scp->sc_gpr[19] = ts->r19; - scp->sc_gpr[20] = ts->r20; - scp->sc_gpr[21] = ts->r21; - scp->sc_gpr[22] = ts->r22; - scp->sc_gpr[23] = ts->r23; - scp->sc_gpr[28] = ts->r28; - scp->sc_gpr[31] = ts->r31; - - scp->sc_mdlo = ts->mdlo; - scp->sc_mdhi = ts->mdhi; - - scp->sc_pc = ts->pc; - scp->sc_sp = ts->r29; - scp->sc_fp = ts->r30; + /* struct sigcontext is laid out so that starting at sc_gpr + mimics a struct mips_thread_state. */ + memcpy (scp->sc_gpr, &ts, sizeof ts); /* Modify the thread state to call `trampoline' on the new stack. */ From b8f04323dc64d1221e5fb3f1162bd6a5aea81912 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 3 Aug 1994 06:45:59 +0000 Subject: [PATCH 0398/4487] Compare *reply_port to MACH_PORT_NULL, not implicit zero. (restore_gpr): Use N-1 as subscript into sc_gpr (sc_gpr[0] => $1). Before general regs, restore from sc_mdlo and sc_mdhi. Don't treat sp, fp specially; use restore_gpr for them too. For final return, store user $1 value beyond top of user stack ahead of time; Then use $1 to hold the user PC, and restore it from the stack in the delay slot. --- sysdeps/mach/hurd/mips/sigreturn.c | 42 +++++++++++++++++------------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/sysdeps/mach/hurd/mips/sigreturn.c b/sysdeps/mach/hurd/mips/sigreturn.c index 147243f5b9..8082acaf9b 100644 --- a/sysdeps/mach/hurd/mips/sigreturn.c +++ b/sysdeps/mach/hurd/mips/sigreturn.c @@ -16,8 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -register int sp asm ("$29"), fp asm ("$30"); - #include #include #include @@ -45,19 +43,31 @@ __sigreturn (const struct sigcontext *scp) reply port in use by the thread when interrupted. */ reply_port = (mach_port_t *) __hurd_threadvar_location (_HURD_THREADVAR_MIG_REPLY); - if (*reply_port) + if (*reply_port != MACH_PORT_NULL) __mach_port_destroy (__mach_task_self (), *reply_port); *reply_port = scp->sc_reply_port; - /* Restore registers. */ + /* Load all the registers from the sigcontext. */ #define restore_gpr(n) \ - asm volatile ("lw $" #n ",%0" : : "m" (scpreg->sc_gpr[n])) + asm volatile ("lw $" #n ",%0" : : "m" (scpreg->sc_gpr[n - 1])) - asm volatile (".set noreorder; .set noat;"); { register const struct sigcontext *const scpreg asm ("$1") = scp; - /* Load the general-purpose registers from the sigcontext. */ + /* Just beyond the top of the user stack, store the user's value for $1 + (which we are using for SCPREG). We restore this register as the + very last thing, below. */ + ((int *) scpreg->sc_gpr[29 - 1])[-1] = scpreg->sc_gpr[0]; + + /* First restore the multiplication result registers. The compiler + will use some temporary registers, so we do this before restoring + the general registers. */ + asm volatile ("mtlo %0" : : "r" (scpreg->sc_mdlo)); + asm volatile ("mthi %0" : : "r" (scpreg->sc_mdhi)); + + asm volatile (".set noreorder; .set noat;"); + + /* Restore the normal registers. */ restore_gpr (2); restore_gpr (3); restore_gpr (4); @@ -84,20 +94,16 @@ __sigreturn (const struct sigcontext *scp) restore_gpr (25); /* Registers 26-27 are kernel-only. */ restore_gpr (28); - - /* Now the special-purpose registers. */ - sp = scpreg->sc_sp; /* Stack pointer. */ - fp = scpreg->sc_fp; /* Frame pointer. */ + restore_gpr (29); /* Stack pointer. */ + restore_gpr (30); /* Frame pointer. */ restore_gpr (31); /* Return address. */ /* Now jump to the saved PC. */ - asm volatile ("lw $24, %0\n" /* Load saved PC into temporary $t8. */ - "j $24\n" /* Jump to the saved PC value. */ - "lw $1, %1\n" /* Restore $at in delay slot. */ - : : - "m" (scpreg->sc_pc), - "m" (scpreg->sc_r1) /* $at */ - : "$24"); /* XXX clobbers $24 (aka $t8)!! */ + asm volatile ("lw $1, %0\n" /* Load saved PC into $1. */ + "j $1\n" /* Jump to the saved PC value. */ + "lw $1, -4(sp)\n" /* Restore $1 from stack in delay slot. */ + : : "m" (scpreg->sc_pc)); + asm volatile (".set reorder; .set at;"); } From d85eb528c4405cf8d1fd109fd06ab8c418e47744 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 3 Aug 1994 16:32:47 +0000 Subject: [PATCH 0399/4487] Rearranged structure so machine-dependent portion is laid out like `struct mips_thread_state; struct mips_exc_state; struct mips_float_state;'. --- sysdeps/mach/hurd/mips/sigcontext.h | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/sysdeps/mach/hurd/mips/sigcontext.h b/sysdeps/mach/hurd/mips/sigcontext.h index 2cb9459b6e..ca86a2fab1 100644 --- a/sysdeps/mach/hurd/mips/sigcontext.h +++ b/sysdeps/mach/hurd/mips/sigcontext.h @@ -31,11 +31,31 @@ struct sigcontext /* Port this thread is doing an interruptible RPC on. */ unsigned int sc_intr_port; - /* These four elements are laid out just like a `struct mips_thread_state'; + /* The rest of this structure is written to be laid out identically + to: + { + struct mips_thread_state ts; + struct mips_exc_state es; + struct mips_float_state fs; + } trampoline.c knows this, so it must be changed if this changes. */ int sc_gpr[31]; /* "General" registers; [0] is r1. */ - int sc_pc; /* Instruction pointer. */ int sc_mdlo, sc_mdhi; /* High and low multiplication results. */ + int sc_pc; /* Instruction pointer. */ - int sc_ps; /* Processor status. */ + /* struct mips_exc_state */ + unsigned int sc_cause; /* Machine-level trap code. */ +#define SC_CAUSE_SST 0x00000044 + unsigned int sc_badvaddr; + unsigned int sc_coproc_used; /* Which coprocessors the thread has used. */ +#define SC_COPROC_USE_COP0 1 /* (by definition) */ +#define SC_COPROC_USE_COP1 2 /* FPA */ +#define SC_COPROC_USE_FPU SC_COPROC_USE_COP1 +#define SC_COPROC_USE_COP2 4 +#define SC_COPROC_USE_COP3 8 + + /* struct mips_float_state */ + int sc_fpr[32]; /* FP registers. */ + int sc_fpcsr; /* FPU status register. */ + int sc_fpeir; /* FP exception instruction register. */ }; From c693c1caaf48160d9e2d8c22dd5a2d0806a4a333 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 8 Aug 1994 07:39:58 +0000 Subject: [PATCH 0400/4487] (struct machine_thread_all_state): New type. --- sysdeps/mach/mips/thread_state.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sysdeps/mach/mips/thread_state.h b/sysdeps/mach/mips/thread_state.h index 541461fd85..f402c13273 100644 --- a/sysdeps/mach/mips/thread_state.h +++ b/sysdeps/mach/mips/thread_state.h @@ -28,3 +28,11 @@ Cambridge, MA 02139, USA. */ #define PC pc #define SP r29 + +struct machine_thread_all_state + { + int set; /* Mask of bits (1 << FLAVOR). */ + struct mips_thread_state basic; + struct mips_exc_state exc; + struct mips_float_state fpu; + }; From bd2a5f499dbe70748ffca2b1eaa9f8c4aa59e853 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 8 Aug 1994 07:58:38 +0000 Subject: [PATCH 0401/4487] (struct sigcontext): Added member `sc_err'. --- sysdeps/mach/hurd/mips/sigcontext.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/sysdeps/mach/hurd/mips/sigcontext.h b/sysdeps/mach/hurd/mips/sigcontext.h index ca86a2fab1..edc807c1a2 100644 --- a/sysdeps/mach/hurd/mips/sigcontext.h +++ b/sysdeps/mach/hurd/mips/sigcontext.h @@ -22,6 +22,8 @@ Cambridge, MA 02139, USA. */ /* State of this thread when the signal was taken. */ struct sigcontext { + /* These first members are machine-independent. */ + int sc_onstack; /* Nonzero if running on sigstack. */ sigset_t sc_mask; /* Blocked signals to restore. */ @@ -31,8 +33,11 @@ struct sigcontext /* Port this thread is doing an interruptible RPC on. */ unsigned int sc_intr_port; - /* The rest of this structure is written to be laid out identically - to: + /* Error code associated with this signal (interpreted as `error_t'). */ + int sc_err; + + /* All following members are machine-dependent. The rest of this + structure is written to be laid out identically to: { struct mips_thread_state ts; struct mips_exc_state es; @@ -54,7 +59,9 @@ struct sigcontext #define SC_COPROC_USE_COP2 4 #define SC_COPROC_USE_COP3 8 - /* struct mips_float_state */ + /* struct mips_float_state + This is only filled in if the SC_COPROC_USE_FPU bit + is set in sc_coproc_used. */ int sc_fpr[32]; /* FP registers. */ int sc_fpcsr; /* FPU status register. */ int sc_fpeir; /* FP exception instruction register. */ From b87619900a4c9f0b7142502177ad16646a7cba69 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 8 Aug 1994 22:54:44 +0000 Subject: [PATCH 0402/4487] (_hurd_exception2signal): Take new arg `int *error'; set it. --- sysdeps/mach/hurd/mips/exc2signal.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sysdeps/mach/hurd/mips/exc2signal.c b/sysdeps/mach/hurd/mips/exc2signal.c index b894dfba25..7a9ab31d9c 100644 --- a/sysdeps/mach/hurd/mips/exc2signal.c +++ b/sysdeps/mach/hurd/mips/exc2signal.c @@ -26,8 +26,10 @@ Cambridge, MA 02139, USA. */ void _hurd_exception2signal (int exception, int code, int subcode, - int *signo, int *sigcode) + int *signo, int *sigcode, int *error) { + *error = 0; + switch (exception) { default: @@ -41,6 +43,7 @@ _hurd_exception2signal (int exception, int code, int subcode, else *signo = SIGBUS; *sigcode = subcode; + *error = code; break; case EXC_BAD_INSTRUCTION: From 2a1ec466abbce0fdef4cce1a35464f67e4ff73dc Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 11 Aug 1994 00:26:03 +0000 Subject: [PATCH 0403/4487] (struct sigcontext): Renamed member `sc_err' to `sc_error'. --- sysdeps/mach/hurd/mips/sigcontext.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/mach/hurd/mips/sigcontext.h b/sysdeps/mach/hurd/mips/sigcontext.h index edc807c1a2..b57d64878f 100644 --- a/sysdeps/mach/hurd/mips/sigcontext.h +++ b/sysdeps/mach/hurd/mips/sigcontext.h @@ -34,7 +34,7 @@ struct sigcontext unsigned int sc_intr_port; /* Error code associated with this signal (interpreted as `error_t'). */ - int sc_err; + int sc_error; /* All following members are machine-dependent. The rest of this structure is written to be laid out identically to: @@ -45,7 +45,7 @@ struct sigcontext } trampoline.c knows this, so it must be changed if this changes. */ int sc_gpr[31]; /* "General" registers; [0] is r1. */ - int sc_mdlo, sc_mdhi; /* High and low multiplication results. */ + int sc_mdlo, sc_mdhi; /* Low and high multiplication results. */ int sc_pc; /* Instruction pointer. */ /* struct mips_exc_state */ From 4a3fb4cb93106f054fb6884186886bf1d6e2468e Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 16 Aug 1994 00:35:22 +0000 Subject: [PATCH 0404/4487] (elided-routines): New variable (append to it). (aux, routines): Don't set these. (sysdep_routines): Append things here instead. --- sysdeps/vax/Makefile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sysdeps/vax/Makefile b/sysdeps/vax/Makefile index bcdd94ead4..a6149a9524 100644 --- a/sysdeps/vax/Makefile +++ b/sysdeps/vax/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1991 Free Software Foundation, Inc. +# Copyright (C) 1991, 1994 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 @@ -19,13 +19,12 @@ ifeq ($(subdir),math) ifndef math-twiddled -routines:= $(filter-out acos asin cos sin ceil rint hypot \ - __copysign __scalb __drem __logb __finite,$(routines))\ - asincos sincos -aux := $(aux) argred support exp__E log__L +elided-routines := $(elided-routines) acos asin cos sin ceil rint hypot \ + __copysign __scalb __drem __logb __finite +sysdep_routines := $(sysdep_routines) asincos sincos argred \ + support exp__E log__L math-twiddled := t - endif bsdmath_dirs := $(bsdmath_dirs) vax From 2c6864f1bc939671b905869f43273207262ce878 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 16 Aug 1994 00:42:48 +0000 Subject: [PATCH 0405/4487] Replace all uses of __const with __CONSTVALUE. --- sysdeps/m68k/fpu/__math.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h index 3d0d4dfbfd..2617ae2e56 100644 --- a/sysdeps/m68k/fpu/__math.h +++ b/sysdeps/m68k/fpu/__math.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993, 1994 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 @@ Cambridge, MA 02139, USA. */ #endif #define __inline_mathop2(func, op) \ - extern __inline __const double \ + extern __inline __CONSTVALUE double \ __m81_u(func)(double __mathop_x) \ { \ double __result; \ @@ -63,7 +63,7 @@ __inline_mathop2(log1p, lognp1) __inline_mathop(atanh) #endif -extern __inline __const double +extern __inline __CONSTVALUE double __m81_u(__drem)(double __x, double __y) { double __result; @@ -71,7 +71,7 @@ __m81_u(__drem)(double __x, double __y) return __result; } -extern __inline __const double +extern __inline __CONSTVALUE double __m81_u(ldexp)(double __x, int __e) { double __result; @@ -80,7 +80,7 @@ __m81_u(ldexp)(double __x, int __e) return __result; } -extern __inline __const double +extern __inline __CONSTVALUE double __m81_u(fmod)(double __x, double __y) { double __result; @@ -98,7 +98,7 @@ __m81_u(frexp)(double __value, int *__expptr) return __mantissa; } -extern __inline __const double +extern __inline __CONSTVALUE double __m81_u(pow)(double __x, double __y) { double __result; @@ -117,7 +117,7 @@ __m81_u(pow)(double __x, double __y) return __result; } -extern __inline __const double +extern __inline __CONSTVALUE double __m81_u(ceil)(double __x) { double __result; From a101c158c5611006d2779a8ed879823b2eeeec56 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 16 Aug 1994 00:52:22 +0000 Subject: [PATCH 0406/4487] Replace uses of HOST_CC with BUILD_CC and native-CFLAGS with BUILD_CFLAGS. --- sysdeps/unix/sysv/sysv4/solaris2/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/sysv4/solaris2/Makefile b/sysdeps/unix/sysv/sysv4/solaris2/Makefile index 4332fb4df2..3f86c46cc8 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/Makefile +++ b/sysdeps/unix/sysv/sysv4/solaris2/Makefile @@ -3,4 +3,4 @@ # along the way (e.g., glue-ctype) will fail because it'll try to link # with the libc.a being *constructed* in $(objdir). As a work-around, # we add this to each native-compile. -native-CFLAGS := $(native-CFLAGS) -L/lib +BUILD_CFLAGS := $(BUILD_CFLAGS) -L/lib From cd582f3e94740ec18ae27b116c211d0310b92393 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 16 Aug 1994 05:58:17 +0000 Subject: [PATCH 0407/4487] (sc_mips_thread_state, sc_mips_exc_state, sc_mips_float_state): New macros, marking members that correspond to thread_state.h structs. --- sysdeps/mach/hurd/mips/sigcontext.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysdeps/mach/hurd/mips/sigcontext.h b/sysdeps/mach/hurd/mips/sigcontext.h index b57d64878f..37922361f6 100644 --- a/sysdeps/mach/hurd/mips/sigcontext.h +++ b/sysdeps/mach/hurd/mips/sigcontext.h @@ -44,11 +44,13 @@ struct sigcontext struct mips_float_state fs; } trampoline.c knows this, so it must be changed if this changes. */ +#define sc_mips_thread_state sc_gpr /* Beginning of correspondence. */ int sc_gpr[31]; /* "General" registers; [0] is r1. */ int sc_mdlo, sc_mdhi; /* Low and high multiplication results. */ int sc_pc; /* Instruction pointer. */ /* struct mips_exc_state */ +#define sc_mips_exc_state sc_cause unsigned int sc_cause; /* Machine-level trap code. */ #define SC_CAUSE_SST 0x00000044 unsigned int sc_badvaddr; @@ -62,6 +64,7 @@ struct sigcontext /* struct mips_float_state This is only filled in if the SC_COPROC_USE_FPU bit is set in sc_coproc_used. */ +#define sc_mips_float_state sc_fpr int sc_fpr[32]; /* FP registers. */ int sc_fpcsr; /* FPU status register. */ int sc_fpeir; /* FP exception instruction register. */ From 275f77287816c7db30b17666b57ba2994f8bcf45 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 16 Aug 1994 06:04:07 +0000 Subject: [PATCH 0408/4487] Add #include_next at end. --- sysdeps/mach/mips/thread_state.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/mach/mips/thread_state.h b/sysdeps/mach/mips/thread_state.h index f402c13273..cf9dbc623d 100644 --- a/sysdeps/mach/mips/thread_state.h +++ b/sysdeps/mach/mips/thread_state.h @@ -36,3 +36,5 @@ struct machine_thread_all_state struct mips_exc_state exc; struct mips_float_state fpu; }; + +#include_next From 817a880cc15b80a68abd83af971a921e292e943b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 16 Aug 1994 06:06:18 +0000 Subject: [PATCH 0409/4487] Don't #include . --- sysdeps/mach/mips/thread_state.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sysdeps/mach/mips/thread_state.h b/sysdeps/mach/mips/thread_state.h index cf9dbc623d..983aa0e0dc 100644 --- a/sysdeps/mach/mips/thread_state.h +++ b/sysdeps/mach/mips/thread_state.h @@ -17,10 +17,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* Everything else is called `thread_state', but CMU's header file is - called `thread_status'. Oh boy. */ -#include - #define MACHINE_THREAD_STATE_FLAVOR MIPS_THREAD_STATE #define MACHINE_THREAD_STATE_COUNT MIPS_THREAD_STATE_COUNT From 62833ce689777098f353bd1d5f952f97175a89e6 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 22 Aug 1994 05:02:49 +0000 Subject: [PATCH 0410/4487] Include "thread_state.h" instead of . (struct mach_msg_trap_args): New type. (trampoline): Function removed. (_hurd_setup_sighandler): Take struct hurd_sigstate * arg instead of FLAGS and SIGALTSTACK args; take new flag arg RPC_WAIT; use struct machine_thread_all_state * for STATE arg. New declared labels `trampoline', `rpc_wait_trampoline' mark asm code at end of function (after return). Add another struct sigcontext * to STACKFRAME after the first one, for the arg to __sigreturn. If SS->context is set, fill registers in SCP from that instead of STATE, and reset SS->INTR_PORT from it. If RPC_WAIT is set, set up to use rpc_wait_trampoline and frob args to mach_msg_trap syscall in progress so that it will retry the receive operation (but not resend!). {rpc_wait_trampoline, trampoline}: New trampoline code. (_hurd_rcv_interrupted_p): New function. --- sysdeps/mach/hurd/mips/trampoline.c | 245 ++++++++++++++++++++++++---- 1 file changed, 209 insertions(+), 36 deletions(-) diff --git a/sysdeps/mach/hurd/mips/trampoline.c b/sysdeps/mach/hurd/mips/trampoline.c index 4fc9fda31d..2161cbae7c 100644 --- a/sysdeps/mach/hurd/mips/trampoline.c +++ b/sysdeps/mach/hurd/mips/trampoline.c @@ -18,67 +18,240 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#include +#include "thread_state.h" + + +struct mach_msg_trap_args + { + /* This is the order of arguments to mach_msg_trap. */ + mach_msg_header_t *msg; + mach_msg_option_t option; + mach_msg_size_t send_size; + mach_msg_size_t rcv_size; + mach_port_t rcv_name; + mach_msg_timeout_t timeout; + mach_port_t notify; + }; -static void -trampoline (void (*handler) (int signo, int sigcode, struct sigcontext *scp), - int signo, int sigcode, struct sigcontext *scp) -{ - (*handler) (signo, sigcode, scp); - (void) __sigreturn (scp); /* Does not return. */ - while (1) - LOSE; /* Firewall. */ -} struct sigcontext * -_hurd_setup_sighandler (int flags, - __sighandler_t handler, - struct sigaltstack *sigaltstack, +_hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, int signo, int sigcode, - void *state) + int rpc_wait, + struct machine_thread_all_state *state) { - struct mips_thread_state *ts; + + __label__ trampoline, rpc_wait_trampoline; void *sigsp; struct sigcontext *scp; - ts = state; + if (ss->context) + { + /* We have a previous sigcontext that sigreturn was about + to restore when another signal arrived. We will just base + our setup on that. */ + if (! setjmp (_hurd_sigthread_fault_env)) + { + memcpy (&state->basic, &ss->context->sc_mips_thread_state, + sizeof (state->basic)); + memcpy (&state->exc, &ss->context->sc_mips_exc_state, + sizeof (state->exc)); + state->set = (1 << MIPS_THREAD_STATE) | (1 << MIPS_EXC_STATE); + if (state->exc.coproc_state & SC_COPROC_USE_FPU) + { + memcpy (&state->fpu, &ss->context->sc_mips_loat_state, + sizeof (state->fpu)); + state->set |= (1 << MIPS_FLOAT_STATE); + } + assert (! rpc_wait); + /* The intr_port slot was cleared before sigreturn sent us the + sig_post that made us notice this pending signal, so + _hurd_internal_post_signal wouldn't do interrupt_operation. + After we return, our caller will set SCP->sc_intr_port (in the + new context) from SS->intr_port and clear SS->intr_port. Now + that we are restoring this old context recorded by sigreturn, + we want to restore its intr_port too; so store it in + SS->intr_port now, so it will end up in SCP->sc_intr_port + later. */ + ss->intr_port = ss->context->sc_intr_port; + } + /* If the sigreturn context was bogus, just ignore it. */ + ss->context = NULL; + } + else if (! machine_get_basic_state (ss->thread, state)) + return NULL; - if ((flags & SA_ONSTACK) && - !(sigaltstack->ss_flags & (SA_DISABLE|SA_ONSTACK))) + if ((ss->actions[signo].sa_flags & SA_ONSTACK) && + !(ss->sigaltstack.ss_flags & (SA_DISABLE|SA_ONSTACK))) { - sigsp = sigaltstack->ss_sp + sigaltstack->ss_size; - sigaltstack->ss_flags |= SA_ONSTACK; + sigsp = ss->sigaltstack.ss_sp + ss->sigaltstack.ss_size; + ss->sigaltstack.ss_flags |= SA_ONSTACK; /* XXX need to set up base of new stack for per-thread variables, cthreads. */ } else - sigsp = (char *) ts->r29; + sigsp = (char *) state->basic.r29; /* Set up the sigcontext structure on the stack. This is all the stack needs, since the args are passed in registers (below). */ sigsp -= sizeof (*scp); scp = sigsp; - /* Set up the sigcontext from the current state of the thread. */ + if (! setjmp (_hurd_sigthread_fault_env)) + { + /* Set up the sigcontext from the current state of the thread. */ - scp->sc_onstack = sigaltstack->ss_flags & SA_ONSTACK ? 1 : 0; + scp->sc_onstack = ss->sigaltstack.ss_flags & SA_ONSTACK ? 1 : 0; - /* struct sigcontext is laid out so that starting at sc_gpr - mimics a struct mips_thread_state. */ - memcpy (scp->sc_gpr, &ts, sizeof ts); + /* struct sigcontext is laid out so that starting at sc_gpr + mimics a struct mips_thread_state. */ + memcpy (&scp->sc_mips_thread_state, + &state->basic, sizeof (state->basic)); - /* Modify the thread state to call `trampoline' on the new stack. */ + /* struct sigcontext is laid out so that starting at sc_cause + mimics a struct mips_exc_state. */ + if (! machine_get_state (ss->thread, state, MIPS_EXC_STATE, + &state->exc, &scp->sc_cause, + sizeof (state->exc))) + return NULL; + if ((scp->sc_coproc_used & SC_COPROC_USE_FPU) && + /* struct sigcontext is laid out so that starting at sc_fpr + mimics a struct mips_float_state. This state + is only meaningful if the coprocessor was used. */ + ! machine_get_state (ss->thread, state, MIPS_FLOAT_STATE, + &state->fpu, + &scp->sc_mips_float_state, sizeof (state->fpu))) + return NULL; + } + else + /* We got a fault trying to write the stack frame. + We cannot set up the signal handler. + Returning NULL tells our caller, who will nuke us with a SIGILL. */ + return NULL; + + /* Modify the thread state to call the trampoline code on the new stack. */ + if (rpc_wait) + { + /* The signalee thread was blocked in a mach_msg_trap system call, + still waiting for a reply. We will have it run the special + trampoline code which retries the message receive before running + the signal handler. + + To do this we change the OPTION argument in its registers to + enable only message reception, since the request message has + already been sent. */ - /* These registers are used for passing the first four arguments to a - function (the rest go on the stack). Fortunately `trampoline' takes - just four arguments, so they all fit in registers. */ - ts->r4 = (int) handler; - ts->r5 = signo; - ts->r6 = sigcode; - ts->r7 = (int) scp; + /* The system call arguments are stored in consecutive registers + starting with a0 ($4). */ + struct mach_msg_trap_args *args = (void *) &state->basic.r4; + + assert (args->option & MACH_RCV_MSG); + /* Disable the message-send, since it has already completed. The + calls we retry need only wait to receive the reply message. */ + args->option &= ~MACH_SEND_MSG; + + state->basic.pc = (int) &&rpc_wait_trampoline; + state->basic.r29 = (int) sigsp; /* $29 is the stack pointer register. */ + /* After doing the message receive, the trampoline code will need to + update the v0 ($2) value to be restored by sigreturn. To simplify + the assembly code, we pass the address of its slot in SCP to the + trampoline code in v1 ($3). */ + state->basic.r3 = (int) &scp->sc_gpr[1]; + /* We must preserve the mach_msg_trap args in a0..t2 ($4..$10). + Pass the handler args to the trampoline code in s1..s3 ($17..$19). */ + state->basic.r17 = signo; + state->basic.r18 = sigcode; + state->basic.r19 = (int) scp; + } + else + { + state->basic.pc = (int) &&trampoline; + state->basic.r29 = (int) sigsp; + state->basic.r4 = signo; + state->basic.r5 = sigcode; + state->basic.r6 = (int) scp; + } - ts->r29 = (int) sigsp; /* r29 is the stack pointer register. */ - ts->pc = (int) &trampoline; + /* We pass the handler function to the trampoline code in at ($1). */ + state->basic.r1 = (int) handler; + /* In the callee-saved register s0 ($16), we save the SCP value to pass + to __sigreturn after the handler returns. */ + state->basic.r16 = (int) scp; return scp; + + /* The trampoline code follows. This is not actually executed as part of + this function, it is just convenient to write it that way. */ + + rpc_wait_trampoline: + /* This is the entry point when we have an RPC reply message to receive + before running the handler. The MACH_MSG_SEND bit has already been + cleared in the OPTION argument in our registers. For our convenience, + $3 points to the sc_gpr[1] member of the sigcontext (saved v0 ($2)). */ + asm volatile + (".set noat; .set noreorder; .set nomacro\n" + /* Retry the interrupted mach_msg system call. */ + "li v0, -25\n" /* mach_msg_trap */ + "syscall\n" + /* When the sigcontext was saved, v0 was MACH_RCV_INTERRUPTED. But + now the message receive has completed and the original caller of + the RPC (i.e. the code running when the signal arrived) needs to + see the final return value of the message receive in v0. So + store the new v0 value into the sc_gpr[1] member of the sigcontext + (whose address is in v1 to make this code simpler). */ + "sw v0, (v1)\n" + /* Since the argument registers needed to have the mach_msg_trap + arguments, we've stored the arguments to the handler function + in registers s1..s3 ($17..$19). */ + "move a0, s1\n" + "move a1, s2\n" + "move a2, s3\n"); + + trampoline: + /* Entry point for running the handler normally. The arguments to the + handler function are already in the standard registers: + + a0 SIGNO + a1 SIGCODE + a2 SCP + */ + asm volatile + ("jal $1; nop\n" /* Call the handler function. */ + /* Call __sigreturn (SCP); this cannot return. */ + "j %0\n" + "move a0, s0" /* Set up arg from saved SCP in delay slot. */ + : : "i" (&__sigreturn)); + + /* NOTREACHED */ + asm volatile (".set reorder; .set at; .set macro"); + + return NULL; +} + +/* STATE describes a thread that had intr_port set (meaning it was inside + HURD_EINTR_RPC), after it has been thread_abort'd. It it looks to have + just completed a mach_msg_trap system call that returned + MACH_RCV_INTERRUPTED, return nonzero and set *PORT to the receive right + being waited on. */ +int +_hurdsig_rcv_interrupted_p (struct machine_thread_all_state *state, + mach_port_t *port) +{ + if (! setjmp (_hurd_sigthread_fault_env)) + { + const unsigned int *pc = (void *) state->basic.pc; + if (state->basic.r2 == MACH_RCV_INTERRUPTED && + pc[-1] == 0xc) /* syscall */ + { + /* We did just return from a mach_msg_trap system call + doing a message receive that was interrupted. + Examine the parameters to find the receive right. */ + struct mach_msg_trap_args *args = (void *) &state->basic.r4; + + *port = args->rcv_name; + return 1; + } + } + + return 0; } From 92ae11d4564e4df19bffc862da14a5ba261fb390 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 22 Aug 1994 09:06:46 +0000 Subject: [PATCH 0411/4487] (__sigreturn): Arg is not const. After restoring SCP->sc_mask, check for pending signals (newly unblocked); if any, set SS->context to SCP, clear SS->intr_port, and send sig_post to the signal thread to deliver the pending signals. Don't write $1 value into the user stack. Instead, write it into the word just past SCP->sc_pc; then point $1 at SCP->sc_pc and use `op_sigreturn' pseudo-instruction to restore the PC and $1 from that. --- sysdeps/mach/hurd/mips/sigreturn.c | 64 ++++++++++++++++++++++-------- 1 file changed, 48 insertions(+), 16 deletions(-) diff --git a/sysdeps/mach/hurd/mips/sigreturn.c b/sysdeps/mach/hurd/mips/sigreturn.c index 8082acaf9b..f02e799dcb 100644 --- a/sysdeps/mach/hurd/mips/sigreturn.c +++ b/sysdeps/mach/hurd/mips/sigreturn.c @@ -19,45 +19,75 @@ Cambridge, MA 02139, USA. */ #include #include #include +#include int -__sigreturn (const struct sigcontext *scp) +__sigreturn (struct sigcontext *scp) { struct hurd_sigstate *ss; mach_port_t *reply_port; - if (scp == NULL) + if (scp == NULL || (scp->sc_mask & _SIG_CANT_MASK)) { errno = EINVAL; return -1; } - ss = _hurd_self_sigstate (); + ss = _hurd_self_sigstate (); /* SS->lock now locked. */ + + /* Restore the set of blocked signals, and the intr_port slot. */ ss->blocked = scp->sc_mask; ss->intr_port = scp->sc_intr_port; + + /* Check for pending signals that were blocked by the old set. */ + if (ss->pending & ~ss->blocked) + { + /* There are pending signals that just became unblocked. Wake up the + signal thread to deliver them. But first, squirrel away SCP where + the signal thread will notice it if it runs another handler, and + arrange to have us called over again in the new reality. */ + ss->context = scp; + /* Clear the intr_port slot, since we are not in fact doing + an interruptible RPC right now. If SS->intr_port is not null, + the SCP context is doing an interruptible RPC, but the signal + thread will examine us while we are blocked in the sig_post RPC. */ + ss->intr_port = MACH_PORT_NULL; + __mutex_unlock (&ss->lock); + __sig_post (_hurd_msgport, 0, __mach_task_self ()); + /* If a pending signal was handled, sig_post never returned. */ + __mutex_lock (&ss->lock); + } + if (scp->sc_onstack) - ss->sigaltstack.ss_flags &= ~SA_ONSTACK; /* XXX threadvars */ - __mutex_unlock (&ss->lock); + { + ss->sigaltstack.ss_flags &= ~SA_ONSTACK; /* XXX threadvars */ + /* XXX cannot unlock until off sigstack */ + abort (); + } + else + __mutex_unlock (&ss->lock); /* Destroy the MiG reply port used by the signal handler, and restore the reply port in use by the thread when interrupted. */ reply_port = (mach_port_t *) __hurd_threadvar_location (_HURD_THREADVAR_MIG_REPLY); - if (*reply_port != MACH_PORT_NULL) + if (*reply_port) __mach_port_destroy (__mach_task_self (), *reply_port); *reply_port = scp->sc_reply_port; + if (scp->sc_coproc_used & SC_COPROC_USE_FPU) + { + /* XXX should restore FPU state here */ + abort (); + } + /* Load all the registers from the sigcontext. */ #define restore_gpr(n) \ asm volatile ("lw $" #n ",%0" : : "m" (scpreg->sc_gpr[n - 1])) { register const struct sigcontext *const scpreg asm ("$1") = scp; - - /* Just beyond the top of the user stack, store the user's value for $1 - (which we are using for SCPREG). We restore this register as the - very last thing, below. */ - ((int *) scpreg->sc_gpr[29 - 1])[-1] = scpreg->sc_gpr[0]; + register int *at asm ("$1"); /* First restore the multiplication result registers. The compiler will use some temporary registers, so we do this before restoring @@ -65,6 +95,9 @@ __sigreturn (const struct sigcontext *scp) asm volatile ("mtlo %0" : : "r" (scpreg->sc_mdlo)); asm volatile ("mthi %0" : : "r" (scpreg->sc_mdhi)); + /* In the word after the saved PC, store the saved $1 value. */ + (&scpreg->sc_pc)[1] = scpreg->sc_gpr[0]; + asm volatile (".set noreorder; .set noat;"); /* Restore the normal registers. */ @@ -98,11 +131,10 @@ __sigreturn (const struct sigcontext *scp) restore_gpr (30); /* Frame pointer. */ restore_gpr (31); /* Return address. */ - /* Now jump to the saved PC. */ - asm volatile ("lw $1, %0\n" /* Load saved PC into $1. */ - "j $1\n" /* Jump to the saved PC value. */ - "lw $1, -4(sp)\n" /* Restore $1 from stack in delay slot. */ - : : "m" (scpreg->sc_pc)); + at = &scpreg->sc_pc; + /* This is an emulated instruction that will find at the address in $1 + two words: the PC value to restore, and the $1 value to restore. */ + asm volatile (".word op_sigreturn"); asm volatile (".set reorder; .set at;"); } From 1e5c57652a3bb3007563f83e06adb5eb31374556 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 22 Aug 1994 19:00:39 +0000 Subject: [PATCH 0412/4487] (SYSRETURN): New macro. --- sysdeps/mach/mips/thread_state.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/mach/mips/thread_state.h b/sysdeps/mach/mips/thread_state.h index 983aa0e0dc..f4f4b429cf 100644 --- a/sysdeps/mach/mips/thread_state.h +++ b/sysdeps/mach/mips/thread_state.h @@ -24,6 +24,7 @@ Cambridge, MA 02139, USA. */ #define PC pc #define SP r29 +#define SYSRETURN r2 struct machine_thread_all_state { From eed38fbd8df6d912d8297abd3a464f50d553a2c6 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 24 Aug 1994 13:54:00 +0000 Subject: [PATCH 0413/4487] entered into RCS --- sysdeps/standalone/m68k/m68020/mvme135/Implies | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sysdeps/standalone/m68k/m68020/mvme135/Implies diff --git a/sysdeps/standalone/m68k/m68020/mvme135/Implies b/sysdeps/standalone/m68k/m68020/mvme135/Implies new file mode 100644 index 0000000000..7142fe2985 --- /dev/null +++ b/sysdeps/standalone/m68k/m68020/mvme135/Implies @@ -0,0 +1,2 @@ +# Motorola MVME135 and MVME136 are compatible. +standalone/m68k/m68020/mvme136 From 56a805307ff1f62e34927bf8853564f3511ea5ee Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 24 Aug 1994 22:55:10 +0000 Subject: [PATCH 0414/4487] Initial revision --- .../standalone/m68k/m68020/mvme136/brdinit.c | 53 +++++++++ .../standalone/m68k/m68020/mvme136/console.c | 101 ++++++++++++++++++ 2 files changed, 154 insertions(+) create mode 100644 sysdeps/standalone/m68k/m68020/mvme136/brdinit.c create mode 100644 sysdeps/standalone/m68k/m68020/mvme136/console.c diff --git a/sysdeps/standalone/m68k/m68020/mvme136/brdinit.c b/sysdeps/standalone/m68k/m68020/mvme136/brdinit.c new file mode 100644 index 0000000000..55c28d4f89 --- /dev/null +++ b/sysdeps/standalone/m68k/m68020/mvme136/brdinit.c @@ -0,0 +1,53 @@ +/* Copyright (C) 1994 Free Software Foundation, Inc. + Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), + On-Line Applications Research Corporation. + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include "__m68020.h" + +/* _Board_Initialize() + +This routine initializes the Motorola MVME135/MVME136. */ + +void +DEFUN_VOID(_Board_Initialize) +{ + mc68020_isr *monitors_vector_table; + int index; + + monitors_vector_table = (mc68020_isr *)0; /* 135Bug Vectors are at 0 */ + set_vbr( monitors_vector_table ); + + for ( index=2 ; index<=255 ; index++ ) + M68Kvec[ index ] = monitors_vector_table[ 32 ]; + + M68Kvec[ 2 ] = monitors_vector_table[ 2 ]; /* bus error vector */ + M68Kvec[ 4 ] = monitors_vector_table[ 4 ]; /* breakpoints vector */ + M68Kvec[ 9 ] = monitors_vector_table[ 9 ]; /* trace vector */ + M68Kvec[ 47 ] = monitors_vector_table[ 47 ]; /* system call vector */ + + set_vbr( &M68Kvec ); + + (*(unsigned char *)0xfffb0067) = 0x7f; /* make VME access round-robin */ + + enable_caching(); + +} diff --git a/sysdeps/standalone/m68k/m68020/mvme136/console.c b/sysdeps/standalone/m68k/m68020/mvme136/console.c new file mode 100644 index 0000000000..7c1cd41e7c --- /dev/null +++ b/sysdeps/standalone/m68k/m68020/mvme136/console.c @@ -0,0 +1,101 @@ +/* Copyright (C) 1994 Free Software Foundation, Inc. + Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), + On-Line Applications Research Corporation. + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include "__m68020.h" + +/* Console IO routines for a Motorola MVME135/MVME136 board. + +They currently use the B port. It should be possible to +use the A port by filling in the reset of the chip structure, +adding an ifdef for PORTA/PORTB, and switching the addresses, +and maybe the macroes based on the macro. */ + +/* M68681 DUART chip register structures and constants */ + +typedef struct { + volatile unsigned char fill1[ 5 ]; /* channel A regs ( not used ) */ + volatile unsigned char isr; /* interrupt status reg */ + volatile unsigned char fill2[ 2 ]; /* counter regs (not used) */ + volatile unsigned char mr1mr2b; /* MR1B and MR2B regs */ + volatile unsigned char srb; /* status reg channel B */ + volatile unsigned char fill3; /* do not access */ + volatile unsigned char rbb; /* receive buffer channel B */ + volatile unsigned char ivr; /* interrupt vector register */ +} r_m681_info; + +typedef struct { + volatile unsigned char fill1[ 4 ]; /* channel A regs (not used) */ + volatile unsigned char acr; /* auxillary control reg */ + volatile unsigned char imr; /* interrupt mask reg */ + volatile unsigned char fill2[ 2 ]; /* counter regs (not used) */ + volatile unsigned char mr1mr2b; /* MR1B and MR2B regs */ + volatile unsigned char csrb; /* clock select reg */ + volatile unsigned char crb; /* command reg */ + volatile unsigned char tbb; /* transmit buffer channel B */ + volatile unsigned char ivr; /* interrupt vector register */ +} w_m681_info; + +#define RD_M68681 ((r_m681_info *)0xfffb0040) /* ptr to the M68681 */ +#define WR_M68681 ((w_m681_info *)0xfffb0040) /* ptr to the M68681 */ +#define RXRDYB 0x01 /* status reg recv ready mask */ +#define TXRDYB 0x04 /* status reg trans ready mask */ + +/* _Console_Putc + +This routine transmits a character out the M68681. It supports +XON/XOFF flow control. */ + +#define XON 0x11 /* control-Q */ +#define XOFF 0x13 /* control-S */ + +int +DEFUN( _Console_Putc, (ch), char ch ) +{ + while ( ! (RD_M68681->srb & TXRDYB) ) ; + while ( RD_M68681->srb & RXRDYB ) /* must be an XOFF */ + if ( RD_M68681->rbb == XOFF ) + do { + while ( ! (RD_M68681->srb & RXRDYB) ) ; + } while ( RD_M68681->rbb != XON ); + + WR_M68681->tbb = ch; + return( 0 ); +} + +/* _Console_Getc + +This routine reads a character from the UART and returns it. */ + +int +DEFUN( _Console_Getc, (poll), int poll ) +{ + if ( poll ) { + if ( !(RD_M68681->srb & RXRDYB) ) + return -1; + else + return RD_M68681->rbb; + } else { + while ( !(RD_M68681->srb & RXRDYB) ); + return RD_M68681->rbb; + } +} From 7b86171d64da1fcde3eaed1669f55e4e118e1064 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 24 Aug 1994 22:57:24 +0000 Subject: [PATCH 0415/4487] entered into RCS --- sysdeps/standalone/m68k/m68020/start.S | 155 +++++++++++++++++++++++++ 1 file changed, 155 insertions(+) create mode 100644 sysdeps/standalone/m68k/m68020/start.S diff --git a/sysdeps/standalone/m68k/m68020/start.S b/sysdeps/standalone/m68k/m68020/start.S new file mode 100644 index 0000000000..cbabf5bf07 --- /dev/null +++ b/sysdeps/standalone/m68k/m68020/start.S @@ -0,0 +1,155 @@ +/* Copyright (C) 1994 Free Software Foundation, Inc. + Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), + On-Line Applications Research Corporation. + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* entry.s + * + * This file contains the entry point for the application. + * The name of this entry point is compiler dependent. + * It jumps to the BSP which is responsible for performing + * all initialization. + */ + + .text + .globl start | Default entry point + .globl _start | Default entry point + .globl M68Kvec | Vector Table + .globl _M68Kvec | Vector Table + +start: +_start: +M68Kvec: | standard location for vectors +_M68Kvec: | standard location for vectors + nop | for linkers with problem + | using location zero as entry + jmp around + .space 4088 | to avoid initial intr stack + | from 135BUG on MVME13? as entry + | and start code at 0x4000 +around: + move.w %sr,initial_sr | save initial values + movec %isp,%a0 + movel %a0,initial_isp + movec %usp,%a0 + movel %a0,initial_usp + movec %msp,%a0 + movel %a0,initial_msp + oriw #0x0700,%sr | INTERRUPTS OFF!!! + + + + | + | zero out uninitialized data area + | +zerobss: + moveal #end,%a0 | find end of .bss + moveal #_bss_start,%a1 | find beginning of .bss + movel #0,%d0 + +loop: movel #0,%a1@+ | to zero out uninitialized + cmpal %a0,%a1 + jlt loop | loop until _end reached + + movel #heap_size,__C_heap_size | set ___C_heap_size + movel #heap_memory,__C_heap_start | set ___C_heap_start + moveal #interrupt_stack_end,%a0 | set interrupt stack pointer + movec %a0,%isp + moveal #stack_end,%a0 | set master stack pointer + movec %a0,%msp + moveal #stack_end,%a6 | set base pointer + movw #0x3000,%sr | SUPV MODE,INTERRUPTS ON!!! + +#ifdef NEED_UNDERSCORES + jsr __Board_Initialize | initialize the board +#else + jsr _Board_Initialize | initialize the board +#endif + + move.l #0,%sp@- | envp = NULL + move.l #0,%sp@- | argv = NULL + move.l #0,%sp@- | argc = NULL +#ifdef NEED_UNDERSCORES + jsr ___libc_init | initialize the library and + | call main +#else + jsr __libc_init | initialize the library and + | call main +#endif + add.l #12,%sp + + move.l #0,%sp@- | argc = NULL + jsr __exit | call the Board specific exit + addq.l #4,%sp + + move.l initial_isp,%a0 | if __exit returns then we can + movec %a0,%isp | restore the initial values + move.l initial_usp,%a0 + movec %a0,%usp + move.l initial_msp,%a0 + movec %a0,%msp + move.w initial_sr,%sr + rts + + + .bss + +/* + * So initial stack registers and status register can be saved. + */ + +#define DECLARE_SPACE(_name,_space,_align) \ + .globl _name ; \ + .align _align ; \ +_name##: .space _space + +#define DECLARE_LABEL(_name) \ + .globl _name ; \ +_name##: + +#define DECLARE_PTR(_name) DECLARE_SPACE(_name,4,2) +#define DECLARE_U32(_name) DECLARE_SPACE(_name,4,2) +#define DECLARE_U16(_name) DECLARE_SPACE(_name,2,1) + +DECLARE_U32(initial_isp) +DECLARE_U32(initial_msp) +DECLARE_U32(initial_usp) +DECLARE_U16(initial_sr) + +/* + * Require environment stuff + */ + +DECLARE_LABEL(_environ) +DECLARE_PTR(environ) + +DECLARE_LABEL(_errno) +DECLARE_U32(errno) + +/* + * Stack Size and Space + */ + + .set stack_size, 0x20000 + +DECLARE_SPACE(stack_memory,stack_size,4) +DECLARE_LABEL(stack_end) + +DECLARE_SPACE(interrupt_stack_memory,0x1000,4) +DECLARE_LABEL(interrupt_stack_end) From 55bb85f22cf02644de5fec43a5b1f06f23f4aa00 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 25 Aug 1994 00:09:09 +0000 Subject: [PATCH 0416/4487] Initial revision --- .../standalone/i386/force_cpu386/brdinit.c | 44 +++++ .../standalone/i386/force_cpu386/console.c | 163 ++++++++++++++++++ sysdeps/standalone/i960/nindy960/brdinit.c | 66 +++++++ 3 files changed, 273 insertions(+) create mode 100644 sysdeps/standalone/i386/force_cpu386/brdinit.c create mode 100644 sysdeps/standalone/i386/force_cpu386/console.c create mode 100644 sysdeps/standalone/i960/nindy960/brdinit.c diff --git a/sysdeps/standalone/i386/force_cpu386/brdinit.c b/sysdeps/standalone/i386/force_cpu386/brdinit.c new file mode 100644 index 0000000000..46b5691d0b --- /dev/null +++ b/sysdeps/standalone/i386/force_cpu386/brdinit.c @@ -0,0 +1,44 @@ +/* Copyright (C) 1994 Free Software Foundation, Inc. + Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), + On-Line Applications Research Corporation. + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include "__i386.h" + +/* _Board_Initialize() + +This routine initializes the FORCE CPU386 board. */ + +void DEFUN_VOID(_Console_Initialize); + +void +DEFUN_VOID(_Board_Initialize) +{ + /* + * FORCE documentation incorrectly states that the bus request + * level is initialized to 3. It is actually initialized by + * FORCEbug to 0. + */ + + outport_byte( 0x00, 0x3f ); /* resets VMEbus request level */ + + _Console_Initialize(); +} diff --git a/sysdeps/standalone/i386/force_cpu386/console.c b/sysdeps/standalone/i386/force_cpu386/console.c new file mode 100644 index 0000000000..a9d05d35fc --- /dev/null +++ b/sysdeps/standalone/i386/force_cpu386/console.c @@ -0,0 +1,163 @@ +/* Copyright (C) 1994 Free Software Foundation, Inc. + Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), + On-Line Applications Research Corporation. + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include "__i386.h" + +/* Console IO routines for a FORCE CPU386 board. */ + +/* Force CPU/386 specific IO addressing + * + * The following determines whether Port B or the Console should + * be used for console I/O. Setting ONE (and only ONE) of these to 1 + * enables I/O on that port. + * + * PORT A - DUSCC MC68562 Channel A (*** not supported here ***) + * PORT B - DUSCC MC68562 Channel B + * PORT C - MFP MC68901 Channel (*** FORCEbug console ***) + */ + +#define PORTB 1 /* use port b as console */ +#define PORTC 0 /* use console port as console */ + +#if ( PORTB == 1 ) +#define TX_STATUS 0x1b6 /* DUSCC General Status Register */ +#define RX_STATUS 0x1b6 /* DUSCC General Status Register */ +#define TX_BUFFER 0x1e0 /* DUSCC Transmitter Channel B */ +#define RX_BUFFER 0x1e8 /* DUSCC Receiver Channel B */ +#define Is_tx_ready( _status ) ( (_status) & 0x20 ) +#define Is_rx_ready( _status ) ( (_status) & 0x10 ) +#endif + +#if ( PORTC == 1 ) +#define TX_STATUS 0x12c /* MFP Transmit Status Register */ +#define RX_STATUS 0x12a /* MFP Receive Status Register */ +#define TX_BUFFER 0x12e /* MFP Transmitter Channel */ +#define RX_BUFFER 0x12e /* MFP Receiver Channel */ +#define Is_tx_ready( _status ) ( (_status) & 0x80 ) +#define Is_rx_ready( _status ) ( (_status) & 0x80 ) +#endif + +/* _Console_Initialize + +On the Force board the console require some initialization. */ + +void +DEFUN_VOID(_Console_Initialize) +{ + register unsigned8 ignored; + + /* FORCE technical support mentioned that it may be necessary to + read the DUSCC RX_BUFFER port four times to remove all junk. + This code is a little more paranoid. */ + + inport_byte( RX_BUFFER, ignored ); + inport_byte( RX_BUFFER, ignored ); + inport_byte( RX_BUFFER, ignored ); + inport_byte( RX_BUFFER, ignored ); + inport_byte( RX_BUFFER, ignored ); +} + +/* Miscellaneous support for console IO */ + +static inline int _Force386_is_rx_ready() +{ + register unsigned8 status; + + inport_byte( RX_STATUS, status ); + + if ( Is_rx_ready( status ) ) return 1; + else return 0; +} + +static inline int _Force386_is_tx_ready() +{ + register unsigned8 status; + + inport_byte( TX_STATUS, status ); + + if ( Is_tx_ready( status ) ) return 1; + else return 0; +} + + +static inline int _Force386_read_data() +{ + register unsigned8 ch; + +#if ( PORTB == 1 ) + /* Force example code resets the Channel B Receiver here. + * It appears to cause XON's to be lost. + */ + + /* outport_byte( RX_STATUS, 0x10 ); */ +#endif + + inport_byte( RX_BUFFER, ch ); + + return ch; +} + +/* _Console_Putc + +This routine transmits a character. It supports XON/XOFF flow control. */ + +#define XON 0x11 /* control-Q */ +#define XOFF 0x13 /* control-S */ + +int +DEFUN( _Console_Putc, (ch), char ch ) +{ + register unsigned8 inch; + + while ( !_Force386_is_tx_ready() ); + + while ( _Force386_is_rx_ready() == 1 ) { /* must be an XOFF */ + inch = _Force386_read_data(); + if ( inch == XOFF ) + do { + while ( _Force386_is_rx_ready() == 0 ); + inch = _Force386_read_data(); + } while ( inch != XON ); + } + + outport_byte( TX_BUFFER, ch ); + return( 0 ); +} + +/* _Console_Getc + +This routine reads a character from the UART and returns it. */ + +int +DEFUN( _Console_Getc, (poll), int poll ) +{ + if ( poll ) { + if ( !_Force386_is_rx_ready() ) + return -1; + else + return _Force386_read_data(); + } else { + while ( !_Force386_is_rx_ready() ); + return _Force386_read_data(); + } +} diff --git a/sysdeps/standalone/i960/nindy960/brdinit.c b/sysdeps/standalone/i960/nindy960/brdinit.c new file mode 100644 index 0000000000..a59c97c0ca --- /dev/null +++ b/sysdeps/standalone/i960/nindy960/brdinit.c @@ -0,0 +1,66 @@ +/* Copyright (C) 1994 Free Software Foundation, Inc. + Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), + On-Line Applications Research Corporation. + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include "__i960ca.h" + +/* _Board_Initialize() + +This routine initializes the board. + +NOTE: Only tested on a Cyclone CVME961 but should be OK on any i960ca board. */ + +void +DEFUN_VOID(_Board_Initialize) +{ + struct i80960ca_prcb *prcb; /* ptr to processor control block */ + struct i80960ca_ctltbl *ctl_tbl; /* ptr to control table */ + + static inline struct i80960ca_prcb *get_prcb() + { register struct i80960ca_prcb *_prcb = 0; + asm volatile( "calls 5; \ + mov g0,%0" \ + : "=d" (_prcb) \ + : "0" (_prcb) ); + return ( _prcb ); + } + + prcb = get_prcb(); + ctl_tbl = prcb->control_tbl; + + /* The following configures the data breakpoint (which must be set + * before this is executed) to break on writes only. + */ + + ctl_tbl->bpcon &= ~0x00cc0000; + reload_ctl_group( 6 ); + + /* bit 31 of the Register Cache Control can be set to + * enable an alternative caching algorithm. It does + * not appear to help our applications. + */ + + /* Configure Number of Register Caches */ + + prcb->reg_cache_cfg = 8; + soft_reset( prcb ); +} From bd1a0b2259f03c19b313b26c006f5debddfd07b4 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 25 Aug 1994 13:55:25 +0000 Subject: [PATCH 0417/4487] entered into RCS --- sysdeps/standalone/i386/start.S | 323 ++++++++++++++++++++++++++++++++ 1 file changed, 323 insertions(+) create mode 100644 sysdeps/standalone/i386/start.S diff --git a/sysdeps/standalone/i386/start.S b/sysdeps/standalone/i386/start.S new file mode 100644 index 0000000000..8331a331c1 --- /dev/null +++ b/sysdeps/standalone/i386/start.S @@ -0,0 +1,323 @@ +/* Copyright (C) 1994 Free Software Foundation, Inc. + Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), + On-Line Applications Research Corporation. + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* entry.s + * + * This file contains the entry point for the application. + * The name of this entry point is compiler dependent. + * It jumps to the BSP which is responsible for performing + * all initialization. + * + */ + + .data + .global _Do_Load_IDT + .global _Do_Load_GDT + + .text + .global start # GNU default entry point + .global _establish_stack + + .global _bsp_start + .global _load_segments + .global __exit + +start: + nop + cli # DISABLE INTERRUPTS!!! +# +# Load the segment registers +# +# NOTE: Upon return, gs will contain the segment descriptor for +# a segment which maps directly to all of physical memory. +# + jmp _load_segments # load board dependent segments + +# +# Set up the stack +# + +_establish_stack: + + movl $stack_end,%esp # set stack pointer + movl $stack_end,%ebp # set base pointer + +# +# Zero out the BSS segment +# +zero_bss: + cld # make direction flag count up + movl $_end,%ecx # find end of .bss + movl $_bss_start,%edi # edi = beginning of .bss + subl %edi,%ecx # ecx = size of .bss in bytes + shrl $2,%ecx # size of .bss in longs + xorl %eax,%eax # value to clear out memory + repne # while ecx != 0 + stosl # clear a long in the bss + +# +# Set the C heap information for malloc +# + movl $heap_size,___C_heap_size # set ___C_heap_size + movl $heap_memory,___C_heap_start # set ___C_heap_start + +# +# Copy the Global Descriptor Table to our space +# + + sgdt _Original_GDTR # save original GDT + movzwl _Original_GDTR_limit,%ecx # size of GDT in bytes; limit + # is 8192 entries * 8 bytes per + + # make ds:esi point to the original GDT + + movl _Original_GDTR_base,%esi + push %ds # save ds + movw %gs,%ax + movw %ax,%ds + + # make es:edi point to the new (our copy) GDT + movl $_Global_descriptor_table,%edi + + rep + movsb # copy the GDT (ds:esi -> es:edi) + + pop %ds # restore ds + + # Build and load new contents of GDTR + movw _Original_GDTR_limit,%ecx # set new limit + movw %cx,_New_GDTR_limit + + push $_Global_descriptor_table + push %es + call _Logical_to_physical + addl $6,%esp + movl %eax,_New_GDTR_base # set new base + + cmpb $0,_Do_Load_GDT # Should the new GDT be loaded? + je no_gdt_load # NO, then branch + lgdt _New_GDTR # load the new GDT +no_gdt_load: + +# +# Copy the Interrupt Descriptor Table to our space +# + + sidt _Original_IDTR # save original IDT + movzwl _Original_IDTR_limit,%ecx # size of IDT in bytes; limit + # is 256 entries * 8 bytes per + + + # make ds:esi point to the original IDT + movl _Original_IDTR_base,%esi + + push %ds # save ds + movw %gs,%ax + movw %ax,%ds + + # make es:edi point to the new (our copy) IDT + movl $_Interrupt_descriptor_table,%edi + + rep + movsb # copy the IDT (ds:esi -> es:edi) + pop %ds # restore ds + + # Build and load new contents of IDTR + movw _Original_IDTR_limit,%ecx # set new limit + movw %cx,_New_IDTR_limit + + push $_Interrupt_descriptor_table + push %es + call _Logical_to_physical + addl $6,%esp + movl %eax,_New_IDTR_base # set new base + + cmpb $0,_Do_Load_IDT # Should the new IDT be loaded? + je no_idt_load # NO, then branch + lidt _New_IDTR # load the new IDT +no_idt_load: + +# +# Initialize the i387. +# +# Using the NO WAIT form of the instruction insures that if +# it is not present the board will not lock up or get an +# exception. +# + + fninit # MUST USE NO-WAIT FORM + + call __Board_Initialize # initialize the board + + pushl $0 # envp = NULL + pushl $0 # argv = NULL + pushl $0 # argc = NULL + call ___libc_init # initialize the library and + # call main + addl $12,%esp + + pushl $0 # argc = NULL + call __exit # call the Board specific exit + addl $4,%esp + +# +# Clean up +# + + + .global _Bsp_cleanup + + .global _return_to_monitor + +_Bsp_cleanup: + cmpb $0,_Do_Load_IDT # Was the new IDT loaded? + je no_idt_restore # NO, then branch + lidt _Original_IDTR # restore the new IDT +no_idt_restore: + + cmpb $0,_Do_Load_GDT # Was the new GDT loaded? + je no_gdt_restore # NO, then branch + lgdt _Original_GDTR # restore the new GDT +no_gdt_restore: + jmp _return_to_monitor + +# +# void *Logical_to_physical( +# rtems_unsigned16 segment, +# void *address +# ); +# +# Returns thirty-two bit physical address for segment:address. +# + + .global _Logical_to_physical + +.set SEGMENT_ARG, 4 +.set ADDRESS_ARG, 8 + +_Logical_to_physical: + + xorl %eax,%eax # clear eax + movzwl SEGMENT_ARG(%esp),%ecx # ecx = segment value + movl $_Global_descriptor_table,%edx # edx = address of our GDT + addl %ecx,%edx # edx = address of desired entry + movb 7(%edx),%ah # ah = base 31:24 + movb 4(%edx),%al # al = base 23:16 + shll $16,%eax # move ax into correct bits + movw 2(%edx),%ax # ax = base 0:15 + movl ADDRESS_ARG(%esp),%ecx # ecx = address to convert + addl %eax,%ecx # ecx = physical address equivalent + movl %ecx,%eax # eax = ecx + ret + +# +# void *Physical_to_logical( +# rtems_unsigned16 segment, +# void *address +# ); +# +# Returns thirty-two bit physical address for segment:address. +# + + .global _Physical_to_logical + +#.set SEGMENT_ARG, 4 +#.set ADDRESS_ARG, 8 -- use sets from above + +_Physical_to_logical: + + xorl %eax,%eax # clear eax + movzwl SEGMENT_ARG(%esp),%ecx # ecx = segment value + movl $_Global_descriptor_table,%edx # edx = address of our GDT + addl %ecx,%edx # edx = address of desired entry + movb 7(%edx),%ah # ah = base 31:24 + movb 4(%edx),%al # al = base 23:16 + shll $16,%eax # move ax into correct bits + movw 2(%edx),%ax # ax = base 0:15 + movl ADDRESS_ARG(%esp),%ecx # ecx = address to convert + subl %eax,%ecx # ecx = logical address equivalent + movl %ecx,%eax # eax = ecx + ret + + +/* + * Data Declarations. Start with a macro which helps declare space. + */ + + .bss + +#define DECLARE_SPACE(_name,_space,_align) \ + .globl _name ; \ + .align _align ; \ +_name##: .space _space + +#define DECLARE_LABEL(_name) \ + .globl _name ; \ +_name##: + +#define DECLARE_PTR(_name) DECLARE_SPACE(_name,4,2) +#define DECLARE_U32(_name) DECLARE_SPACE(_name,4,2) +#define DECLARE_U16(_name) DECLARE_SPACE(_name,2,1) + +/* + * Require environment stuff + */ + +DECLARE_LABEL(_environ) +DECLARE_PTR(environ) + +DECLARE_LABEL(_errno) +DECLARE_U32(errno) + +/* + * Miscellaneous Variables used to restore the CPU state. + * + * Start with a macro to declare the space for the contents of + * a Descriptor Table register. + */ + +#define DECLARE_DTR_SPACE(_name) \ + .global _name ; \ + .align 4 ; \ +_name##: ; \ +_name##_limit: .space 2 ; \ +_name##_base: .space 4 + +DECLARE_SPACE(_Interrupt_descriptor_table,256*8,4) +DECLARE_SPACE(_Global_descriptor_table,8192*8,4) + +DECLARE_DTR_SPACE(_Original_IDTR) +DECLARE_DTR_SPACE(_New_IDTR) +DECLARE_DTR_SPACE(_Original_GDTR) +DECLARE_DTR_SPACE(_New_GDTR) + +DECLARE_SPACE(_Physical_base_of_ds,4,4) +DECLARE_SPACE(_Physical_base_of_cs,4,4) + +/* + * Stack Size and Space + */ + + .set stack_size, 0x20000 + +DECLARE_SPACE(stack_memory,stack_size,4) +DECLARE_LABEL(stack_end) + From cee6cb4fc23e08f528580ec84a6c4d361ec16feb Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 25 Aug 1994 14:44:14 +0000 Subject: [PATCH 0418/4487] Initial revision --- sysdeps/standalone/i960/nindy960/console.c | 76 ++++++++++++ sysdeps/standalone/i960/start.S | 137 +++++++++++++++++++++ 2 files changed, 213 insertions(+) create mode 100644 sysdeps/standalone/i960/nindy960/console.c create mode 100644 sysdeps/standalone/i960/start.S diff --git a/sysdeps/standalone/i960/nindy960/console.c b/sysdeps/standalone/i960/nindy960/console.c new file mode 100644 index 0000000000..fcdaade26b --- /dev/null +++ b/sysdeps/standalone/i960/nindy960/console.c @@ -0,0 +1,76 @@ +/* Copyright (C) 1994 Free Software Foundation, Inc. + Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), + On-Line Applications Research Corporation. + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include "__i960ca.h" + +/* Console IO routines for a NINDY960 board. */ + +/* + * NINDY_IO( ... ) + * + * Interface to NINDY. + */ + +#define NINDY_INPUT 0 +#define NINDY_OUTPUT 1 + +void ___NINDY_IO_WRAPPER( void ) /* never called */ +{ + asm volatile ( " .text" ); + asm volatile ( " .align 4" ); + asm volatile ( " .globl _NINDY_IO" ); + asm volatile ( "_NINDY_IO:" ); + asm volatile ( " calls 0 /* call console routines */" ); + asm volatile ( " ret" ); +} + +/***** !!!! HOW DO I EXFUN NINDY_IO? !!!! *****/ + +/* _Console_Putc + +This routine transmits a character using NINDY. */ + +int +DEFUN( _Console_Putc, (ch), char ch ) +{ + NINDY_IO( NINDY_OUTPUT, ch ); + return( 0 ); +} + +/* _Console_Getc + +This routine reads a character from NINDY and returns it. */ + +int +DEFUN( _Console_Getc, (poll), int poll ) +{ + char ch; + + if ( poll ) { + /* I don't know how to poll with NINDY */ + return -1; + } else { + NINDY_IO( NINDY_INPUT, &ch ); + return ch; + } +} diff --git a/sysdeps/standalone/i960/start.S b/sysdeps/standalone/i960/start.S new file mode 100644 index 0000000000..6cdc604f69 --- /dev/null +++ b/sysdeps/standalone/i960/start.S @@ -0,0 +1,137 @@ +/* Copyright (C) 1994 Free Software Foundation, Inc. + Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), + On-Line Applications Research Corporation. + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* entry.s + * + * This file contains the entry point for the application. + * The name of this entry point is compiler dependent. + * It jumps to the BSP which is responsible for performing + * all initialization. + * + */ + + .text + .globl start # GNU960 default entry point + +start: + mov 3, r12 + modpc r12, r12, r12 # enable tracing/trace faults + mov g5, g5 # NOP + mov 0, g14 # initialize constant for C + + /* + * zero out uninitialized data area + */ +zerobss: + lda _end, r4 /* find end of .bss */ + lda _bss_start, r5 /* find beginning of .bss */ + ldconst 0, r6 + +loop: st r6, (r5) /* to zero out uninitialized */ + addo 4, r5, r5 /* data area */ + cmpobl r5, r4, loop /* loop until _end reached */ + + + lda heap_memory, r12 /* tell C lib where heap is */ + st r12,___C_heap_start + lda heap_size, r12 /* tell C lib how big heap is */ + st r12,___C_heap_size + lda stack_memory,r12 /* set up stack pointer: */ + mov r12, sp + mov 0, g14 /* initialize constant for C */ + + call init_frames + ret /* return to monitor */ + +init_frames: + ldconst 0x3b001000, g0 + ldconst 0x00009107, g1 + modac g1, g0, g0 /* set AC controls */ + + /* + * Call application mainline. + * Someday, real values of argc and argv will be set up. + * For now, they are set to 0. + */ + + callx __Board_Initialize /* Initialize the board */ + + ldconst 0,g0 + ldconst 0,g1 + ldconst 0,g2 + callx ___libc_init /* initialize the library and */ + /* call main */ + /* + * if we return from main, we have "fallen" off the end + * of the program, therefore status is 0 + * so move 0 to g0 (exit parameter) + */ + + mov 0, g0 + callx ___exit + ret + + +/* + * Data Declarations. Start with a macro which helps declare space. + */ + +#define DECLARE_SPACE(_name,_space,_align) \ + .globl _name ; \ + .align _align ; \ +.comm _name##,_space + +#define DECLARE_LABEL(_name) \ + .globl _name ; \ +_name##: + +#define DECLARE_PTR(_name) DECLARE_SPACE(_name,4,2) +#define DECLARE_U32(_name) DECLARE_SPACE(_name,4,2) +#define DECLARE_U16(_name) DECLARE_SPACE(_name,2,1) + +/* + * Require environment stuff + */ + +DECLARE_LABEL(_environ) +DECLARE_PTR(environ) + +DECLARE_LABEL(_errno) +DECLARE_U32(errno) + +/* + * Stack Size and Space + */ + + .set stack_size, 0x20000 + +DECLARE_SPACE(stack_memory,stack_size,4) +DECLARE_LABEL(stack_end) + +/* + * Heap Size and Space + */ + + .set heap_size, 0x20000 + +DECLARE_SPACE(heap_memory,heap_size,4) +DECLARE_LABEL(heap_end) + From 61e2ba14eb0beae01233090040395efa59dd7592 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 25 Aug 1994 17:35:58 +0000 Subject: [PATCH 0419/4487] Initial revision --- sysdeps/standalone/i386/force_cpu386/Makefile | 22 +++++++ .../standalone/m68k/m68020/mvme136/_exit.c | 58 +++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 sysdeps/standalone/i386/force_cpu386/Makefile create mode 100644 sysdeps/standalone/m68k/m68020/mvme136/_exit.c diff --git a/sysdeps/standalone/i386/force_cpu386/Makefile b/sysdeps/standalone/i386/force_cpu386/Makefile new file mode 100644 index 0000000000..429f822594 --- /dev/null +++ b/sysdeps/standalone/i386/force_cpu386/Makefile @@ -0,0 +1,22 @@ +# Copyright (C) 1993 Free Software Foundation, Inc. +# Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), +# On-Line Applications Research Corporation. + +# 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 published by the Free Software Foundation; either version 2 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 +# Library General Public License for more details. + +# You should have received a copy of the GNU Library General Public +# License along with the GNU C Library; see the file COPYING.LIB. If +# not, write to the Free Software Foundation, Inc., 675 Mass Ave, +# Cambridge, MA 02139, USA. + +ifeq (bare,$(subdir)) +install-lib += force_cpu386.ld +endif diff --git a/sysdeps/standalone/m68k/m68020/mvme136/_exit.c b/sysdeps/standalone/m68k/m68020/mvme136/_exit.c new file mode 100644 index 0000000000..b7669026fe --- /dev/null +++ b/sysdeps/standalone/m68k/m68020/mvme136/_exit.c @@ -0,0 +1,58 @@ +/* Copyright (C) 1991 Free Software Foundation, Inc. + Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), + On-Line Applications Research Corporation. + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include "__m68020.h" + +/* Return control to 135Bug */ + +void +DEFUN_VOID(__exit_trap) +{ + set_vbr( 0 ); /* restore 135Bug vectors */ + asm volatile( "trap #15" ); /* trap to 135Bug */ + asm volatile( ".short 0x63" ); /* return to 135Bug (.RETURN) */ + asm volatile( "jmp main" ); /* restart program */ +} + +/* The function `_exit' should take a status argument and simply + terminate program execution, using the low-order 8 bits of the + given integer as status. */ + +__NORETURN void +DEFUN(_exit, (status), int status) +{ + /* status is ignored */ + + + M68Kvec[ 45 ] = exit_trap; /* install exit_trap handler */ + asm volatile( "trap #13" ); /* insures SUPV mode */ +} + +#ifdef HAVE_GNU_LD + +#include + +stub_warning(_exit); + +#endif /* GNU stabs. */ From a1106e3b5e9c7c2bfa96255f7c0d86c95f8d0df7 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 25 Aug 1994 18:07:56 +0000 Subject: [PATCH 0420/4487] entered into RCS --- sysdeps/standalone/i386/force_cpu386/_exit.c | 47 ++++++++++ .../standalone/i386/force_cpu386/strtsupp.S | 89 +++++++++++++++++++ sysdeps/standalone/i960/nindy960/Makefile | 23 +++++ sysdeps/standalone/i960/nindy960/_exit.c | 55 ++++++++++++ .../standalone/m68k/m68020/mvme136/Makefile | 22 +++++ 5 files changed, 236 insertions(+) create mode 100644 sysdeps/standalone/i386/force_cpu386/_exit.c create mode 100644 sysdeps/standalone/i386/force_cpu386/strtsupp.S create mode 100644 sysdeps/standalone/i960/nindy960/Makefile create mode 100644 sysdeps/standalone/i960/nindy960/_exit.c create mode 100644 sysdeps/standalone/m68k/m68020/mvme136/Makefile diff --git a/sysdeps/standalone/i386/force_cpu386/_exit.c b/sysdeps/standalone/i386/force_cpu386/_exit.c new file mode 100644 index 0000000000..011bb8bda9 --- /dev/null +++ b/sysdeps/standalone/i386/force_cpu386/_exit.c @@ -0,0 +1,47 @@ +/* Copyright (C) 1991 Free Software Foundation, Inc. + Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), + On-Line Applications Research Corporation. + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include + +/* This returns control to FORCEbug. */ + +void DEFUN_VOID(Bsp_cleanup); + +/* The function `_exit' should take a status argument and simply + terminate program execution, using the low-order 8 bits of the + given integer as status. */ + +__NORETURN void +DEFUN(_exit, (status), int status) +{ + /* status is ignored */ + Bsp_cleanup(); +} + +#ifdef HAVE_GNU_LD + +#include + +stub_warning(_exit); + +#endif /* GNU stabs. */ diff --git a/sysdeps/standalone/i386/force_cpu386/strtsupp.S b/sysdeps/standalone/i386/force_cpu386/strtsupp.S new file mode 100644 index 0000000000..6b78a8c343 --- /dev/null +++ b/sysdeps/standalone/i386/force_cpu386/strtsupp.S @@ -0,0 +1,89 @@ +/* Copyright (C) 1994 Free Software Foundation, Inc. + Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), + On-Line Applications Research Corporation. + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* This file assists the board independent startup code by + * loading the proper segment register values. The values + * loaded are dependent on the FORCEBUG. + * + * NOTE: No stack has been established when this routine + * is invoked. It returns by jumping back to the start code. + * + */ + +/* + * FORCEBUG loads us into a virtual address space which + * really starts at PHYSICAL_ADDRESS_BASE. + * + */ + +.set PHYSICAL_ADDRESS_BASE, 0x00002000 + +/* + * At reset time, FORCEBUG normally has the segment selectors preloaded. + * If a human resets the instruction pointer, this will not have occurred. + * However, no guarantee can be made of the other registers if cs:ip was + * modified to restart the program. Because of this, the BSP reloads all + * segment registers (except cs) with the values they have following + * a reset. + */ + + +.set RESET_SS, 0x40 # initial value of stack segment register +.set RESET_DS, 0x40 # initial value of data segment register +.set RESET_ES, 0x40 # initial value of extra segment register +.set RESET_FS, 0x40 # initial value of "f" segment register +.set RESET_GS, 0x30 # initial value of "g" segment register + + +#define LOAD_SEGMENTS(_value,_segreg) \ + movw $_value##,%ax ; \ + movw %ax,##_segreg + + + .global _load_segments + + .global _establish_stack + +_load_segments: + + LOAD_SEGMENTS( RESET_SS, %ss ) + LOAD_SEGMENTS( RESET_DS, %ds ) + LOAD_SEGMENTS( RESET_ES, %es ) + LOAD_SEGMENTS( RESET_FS, %fs ) + LOAD_SEGMENTS( RESET_GS, %gs ) + + jmp _establish_stack # return to the bsp entry code + + .global _return_to_monitor +_return_to_monitor: + + movb $0,%al + int $0x20 # restart FORCEbug + jmp start # FORCEbug does not reset PC + + .data + + .global _Do_Load_IDT +_Do_Load_IDT: .byte 1 + + .global _Do_Load_GDT +_Do_Load_GDT: .byte 0 + diff --git a/sysdeps/standalone/i960/nindy960/Makefile b/sysdeps/standalone/i960/nindy960/Makefile new file mode 100644 index 0000000000..e6e65ea064 --- /dev/null +++ b/sysdeps/standalone/i960/nindy960/Makefile @@ -0,0 +1,23 @@ +# Copyright (C) 1993 Free Software Foundation, Inc. +# Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), +# On-Line Applications Research Corporation. + +# 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 published by the Free Software Foundation; either version 2 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 +# Library General Public License for more details. + +# You should have received a copy of the GNU Library General Public +# License along with the GNU C Library; see the file COPYING.LIB. If +# not, write to the Free Software Foundation, Inc., 675 Mass Ave, +# Cambridge, MA 02139, USA. + + +# The nindy960 support has only been tested on the following boards: +# +# + Cyclone CVME961 VMEbus single board computer. diff --git a/sysdeps/standalone/i960/nindy960/_exit.c b/sysdeps/standalone/i960/nindy960/_exit.c new file mode 100644 index 0000000000..33553a7a2c --- /dev/null +++ b/sysdeps/standalone/i960/nindy960/_exit.c @@ -0,0 +1,55 @@ +/* Copyright (C) 1991 Free Software Foundation, Inc. + Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), + On-Line Applications Research Corporation. + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include + +/* The function `_exit' should take a status argument and simply + terminate program execution, using the low-order 8 bits of the + given integer as status. */ + +/* This returns control to Nindy. */ + +__NORETURN void +DEFUN(_exit, (status), int status) +{ + /* status is ignored */ + + asm volatile( "mov 0,g0; \ + fmark ; \ + syncf ; \ + .word 0xfeedface ; \ + bx start" : : ); + /* The constant 0xfeedface is a magic word for break which + * is defined by NINDY. The branch extended restarts the + * application if the user types "go". + */ +} + + +#ifdef HAVE_GNU_LD + +#include + +stub_warning(_exit); + +#endif /* GNU stabs. */ diff --git a/sysdeps/standalone/m68k/m68020/mvme136/Makefile b/sysdeps/standalone/m68k/m68020/mvme136/Makefile new file mode 100644 index 0000000000..33f049c58c --- /dev/null +++ b/sysdeps/standalone/m68k/m68020/mvme136/Makefile @@ -0,0 +1,22 @@ +# Copyright (C) 1993 Free Software Foundation, Inc. +# Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), +# On-Line Applications Research Corporation. + +# 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 published by the Free Software Foundation; either version 2 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 +# Library General Public License for more details. + +# You should have received a copy of the GNU Library General Public +# License along with the GNU C Library; see the file COPYING.LIB. If +# not, write to the Free Software Foundation, Inc., 675 Mass Ave, +# Cambridge, MA 02139, USA. + +ifeq (bare,$(subdir)) +install-lib += mvme136.ld +endif From 11ab92947ee57ff83bc7d6f0cd0d68b58373b975 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 26 Aug 1994 06:15:17 +0000 Subject: [PATCH 0421/4487] Initial revision --- bare/Makefile | 54 ++++++++++++++ sysdeps/i960/Implies | 2 + sysdeps/i960/ffs.c | 43 +++++++++++ sysdeps/standalone/Subdirs | 4 ++ sysdeps/standalone/brk.c | 68 ++++++++++++++++++ sysdeps/standalone/close.c | 42 +++++++++++ sysdeps/standalone/filedesc.h | 48 +++++++++++++ sysdeps/standalone/open.c | 124 ++++++++++++++++++++++++++++++++ sysdeps/standalone/read.c | 85 ++++++++++++++++++++++ sysdeps/standalone/standalone.h | 32 +++++++++ sysdeps/standalone/stdio_lim.h | 27 +++++++ sysdeps/standalone/write.c | 72 +++++++++++++++++++ 12 files changed, 601 insertions(+) create mode 100644 bare/Makefile create mode 100644 sysdeps/i960/Implies create mode 100644 sysdeps/i960/ffs.c create mode 100644 sysdeps/standalone/Subdirs create mode 100644 sysdeps/standalone/brk.c create mode 100644 sysdeps/standalone/close.c create mode 100644 sysdeps/standalone/filedesc.h create mode 100644 sysdeps/standalone/open.c create mode 100644 sysdeps/standalone/read.c create mode 100644 sysdeps/standalone/standalone.h create mode 100644 sysdeps/standalone/stdio_lim.h create mode 100644 sysdeps/standalone/write.c diff --git a/bare/Makefile b/bare/Makefile new file mode 100644 index 0000000000..bb1807f9c7 --- /dev/null +++ b/bare/Makefile @@ -0,0 +1,54 @@ +# Copyright (C) 1994 Free Software Foundation, Inc. +# Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), +# On-Line Applications Research Corporation. +# +# 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 Library General Public License as +# published by the Free Software Foundation; either version 2 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with the GNU C Library; see the file COPYING.LIB. If +# not, write to the Free Software Foundation, Inc., 675 Mass Ave, +# Cambridge, MA 02139, USA. + +subdir := bare + +bare-routines := brdinit console strtsupp +extra-objs = $(bare-routines:%=%.o) +distribute = $(bare-routines:%=%.c) + +install-lib = lib$(config-vendor).a + +include ../Rules + +# +# For bare targets, the $(config-vendor) is the name of the board. +# We will place the board dependent code ONLY in a library which +# is board dependent. This way many target boards can share a +# single libc.a. To resolve all symbols and successfully link +# a program, the application must link against libc.a and libMY_TARGET.a. +# For example, the target specific library for the Motorola MVME135 +# board will be named libmvme135.a. To link a program for the +# MVME135, one must link against -lc and -lmvme135. +# + +lib: $(objpfx)lib$(config-vendor).a + +$(objpfx)lib$(config-vendor).a: $(bare-routines:%=$(objpfx)%.o) +# This library is small enough that it's simplest to recreate the archive +# from scratch each time. + rm -f $@ +ifdef objdir + cd $(objdir); $(AR) cq$(verbose) $@ $(^:$(objpfx)%=%) +else + $(AR) cq$(verbose) $@ $^ +endif + $(RANLIB) $@ diff --git a/sysdeps/i960/Implies b/sysdeps/i960/Implies new file mode 100644 index 0000000000..f8c4079ab5 --- /dev/null +++ b/sysdeps/i960/Implies @@ -0,0 +1,2 @@ +# i960 family uses IEEE 754 floating point. +ieee754 diff --git a/sysdeps/i960/ffs.c b/sysdeps/i960/ffs.c new file mode 100644 index 0000000000..62b8742da7 --- /dev/null +++ b/sysdeps/i960/ffs.c @@ -0,0 +1,43 @@ +/* ffs -- find first set bit in a word, counted from least significant end. + For i960 Core architecture + Copyright (C) 1994 Free Software Foundation, Inc. + Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), + On-Line Applications Research Corporation. + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include + +#undef ffs + +#if defined (__GNUC__) && defined (__i960__) + +int +DEFUN(ffs, (x), int x) +{ + int cnt; + + asm("scanbit %1,%0" : "=d" (cnt) : "rm" (x & -x)); + + return cnt; +} + +#else + +#include + +#endif diff --git a/sysdeps/standalone/Subdirs b/sysdeps/standalone/Subdirs new file mode 100644 index 0000000000..4125ae86db --- /dev/null +++ b/sysdeps/standalone/Subdirs @@ -0,0 +1,4 @@ +# The `bare' subdirectory defines some structure for a target-specific +# library of functions which are actually implemented in +# sysdeps/standalone/CPU/TARGET. +bare diff --git a/sysdeps/standalone/brk.c b/sysdeps/standalone/brk.c new file mode 100644 index 0000000000..be9174c8dd --- /dev/null +++ b/sysdeps/standalone/brk.c @@ -0,0 +1,68 @@ +/* Copyright (C) 1991, 1994 Free Software Foundation, Inc. + Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil, + On-Line Applications Research Corporation. + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include + +PTR __curbrk; +PTR __rorig; +PTR __rlimit; + +int +DEFUN(__brk, (inaddr), PTR inaddr) +{ + + if ( ( (void *)inaddr > (void *)__rlimit ) || + ( (void *)inaddr < (void *)__rorig ) ) + return -1; + + __curbrk = inaddr; + return 0; +} + +/* Initialization Code for Memory Allocation */ + +PTR __C_heap_start; +int __C_heap_size; + +#ifdef HAVE_GNU_LD +static +#endif +void +DEFUN(__NONE_set_memvals, (argc, argv, envp), + int argc AND char **argv AND char **envp) +{ + + __rorig = + __curbrk = __C_heap_start; + __rlimit = __curbrk + __C_heap_size; + + (void) &__NONE_set_memvals; /* Avoid "defined but not used" warning. */ +} + +#ifdef HAVE_GNU_LD + +#include + +text_set_element (__libc_subinit, __NONE_set_memvals); + +#endif + diff --git a/sysdeps/standalone/close.c b/sysdeps/standalone/close.c new file mode 100644 index 0000000000..d7674ae676 --- /dev/null +++ b/sysdeps/standalone/close.c @@ -0,0 +1,42 @@ +/* Copyright (C) 1994 Free Software Foundation, Inc. + Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil, + On-Line Applications Research Corporation. + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include + +#include +#include "filedesc.h" + +/* Close the file descriptor FD. */ +int +DEFUN(__close, (fd), int fd) +{ + if ( !__FD_Is_valid( fd ) || !__FD_Table[ fd ].in_use ) + { + errno = EBADF; + return -1; + } + + __FD_Table[ fd ].in_use = 0; + return 0; +} + diff --git a/sysdeps/standalone/filedesc.h b/sysdeps/standalone/filedesc.h new file mode 100644 index 0000000000..bf3b6a9f0c --- /dev/null +++ b/sysdeps/standalone/filedesc.h @@ -0,0 +1,48 @@ +/* Copyright (C) 1994 Free Software Foundation, Inc. + Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil, + On-Line Applications Research Corporation. + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* + * This is the file descriptor used by the no OS implementation + * of __open, __read, __write, and __close. + */ + +#ifndef __FILEDESC_h +#define __FILEDESC_h + +#include + +#ifndef __DECLARE_FILE_DESCRIPTORS__ +#define FILEDESC_EXTERN extern +#else +#define FILEDESC_EXTERN +#endif + +typedef struct { + int in_use; /* 1 if in use, 0 otherwise */ + int flags; /* Flags from open */ +} __no_os_file_descriptor; + +#define __FD_Is_valid( _fd ) \ + ( (_fd) >= 0 && (_fd) < FOPEN_MAX ) + +FILEDESC_EXTERN __no_os_file_descriptor __FD_Table[ FOPEN_MAX ]; + +#endif diff --git a/sysdeps/standalone/open.c b/sysdeps/standalone/open.c new file mode 100644 index 0000000000..fdcaf65134 --- /dev/null +++ b/sysdeps/standalone/open.c @@ -0,0 +1,124 @@ +/* Copyright (C) 1994 Free Software Foundation, Inc. + Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil, + On-Line Applications Research Corporation. + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include +#include + +#include +#include +#include + +#define __DECLARE_FILE_DESCRIPTORS__ + +#include "filedesc.h" + +/* Open FILE with access OFLAG. If OFLAG includes O_CREAT, + a third argument is the file protection. */ +int +DEFUN(__open, (file, oflag), CONST char *file AND int oflag DOTS) +{ + int mode; + int newfd; + int index; + + if (file == NULL) + { + errno = EINVAL; + return -1; + } + + if (oflag & O_CREAT) + { + va_list arg; + va_start(arg, oflag); + mode = va_arg(arg, int); + va_end(arg); + } + + /* + * Find an open slot. + */ + + newfd = -1; + + for ( index=0 ; index< FOPEN_MAX ; index++ ) + if ( !__FD_Table[ index ].in_use ) { + newfd = index; + break; + } + + if ( newfd == -1 ) { + errno = ENFILE; + return -1; + } + + /* + * Initialize the open slot + */ + + __FD_Table[ newfd ].in_use = 1; + __FD_Table[ newfd ].flags = oflag; + + return newfd; +} + +/* Initialization Code for Console I/O */ + +#ifdef HAVE_GNU_LD +static +#endif +void +DEFUN(__NONE_init_console_io, (argc, argv, envp), + int argc AND char **argv AND char **envp) +{ + int index; + + for ( index=0 ; index< FOPEN_MAX ; index++ ) + __FD_Table[ index ].in_use = 0; + + stdin = fopen( "", "r" ); + + stdout = fopen( "", "w" ); + + stderr = fopen( "", "w" ); + + /* + * Line buffer the standard input and output and use no buffering for + * standard error. + */ + + setvbuf( stdin, NULL, _IOLBF, BUFSIZ ); + setvbuf( stdout, NULL, _IOLBF, BUFSIZ ); + setvbuf( stderr, NULL, _IONBF, BUFSIZ ); + + (void) &__NONE_init_console_io; /* Avoid "defined but not used" warning. */ +} + +#ifdef HAVE_GNU_LD + +#include + +text_set_element (__libc_subinit, __NONE_init_console_io); + +#endif diff --git a/sysdeps/standalone/read.c b/sysdeps/standalone/read.c new file mode 100644 index 0000000000..1c87b1103a --- /dev/null +++ b/sysdeps/standalone/read.c @@ -0,0 +1,85 @@ +/* Copyright (C) 1994 Free Software Foundation, Inc. + Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil, + On-Line Applications Research Corporation. + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include + +#include "filedesc.h" +#include +#include + +/* Read NBYTES into BUF from FD. Return the number read or -1. */ +ssize_t +DEFUN(__read, (fd, buf, nbytes), + int fd AND PTR buf AND size_t nbytes) +{ + char *buffer = (char *) buf; + int data; + int poll; + + errno = 0; + + if (nbytes == 0) + return 0; + + if ( !__FD_Is_valid( fd ) || !__FD_Table[ fd ].in_use ) + { + errno = EBADF; + return -1; + } + if (buf == NULL) + { + errno = EINVAL; + return -1; + } + + if ( __FD_Table[ fd ].flags & O_WRONLY ) /* is it write only? */ + { + errno = EBADF; + return -1; + } + + /* If this is a non-blocking fd, then we want to poll the console. */ + + poll = ( __FD_Table[ fd ].flags & O_NONBLOCK ) ? 1 : 0; + + /* Read a single character. This is a cheap way to insure that the + upper layers get every character because _Console_Getc can't timeout + or otherwise know when to stop. */ + + + data = _Console_Getc(poll); + + if ( data == -1 ) /* if no data return */ + return -1; + + (void) _Console_Putc(data); /* echo the character */ + + if ( data == '\r' ) { /* translate CR -> CR/LF */ + (void) _Console_Putc('\n'); + data = '\n'; + } + + *buffer = data; + return 1; +} diff --git a/sysdeps/standalone/standalone.h b/sysdeps/standalone/standalone.h new file mode 100644 index 0000000000..07f83559c7 --- /dev/null +++ b/sysdeps/standalone/standalone.h @@ -0,0 +1,32 @@ +/* Copyright (C) 1994 Free Software Foundation, Inc. + Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), + On-Line Applications Research Corporation. + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifndef _STANDALONE_H +#define _STANDALONE_H + +#include + +extern void _Board_Initialize __PP ((void)); + +extern int _Console_Putc __P ((char c)); +extern int _Console_Getc __P ((int poll)); + +#endif diff --git a/sysdeps/standalone/stdio_lim.h b/sysdeps/standalone/stdio_lim.h new file mode 100644 index 0000000000..5552bc4325 --- /dev/null +++ b/sysdeps/standalone/stdio_lim.h @@ -0,0 +1,27 @@ +/* Copyright (C) 1994 Free Software Foundation, Inc. + Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil, + On-Line Applications Research Corporation. + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#define L_tmpnam 1 +#define TMPMAX 0 +#define L_ctermid 1 +#define L_cuserid 1 +#define FOPEN_MAX 16 +#define FILENAME_MAX 14 diff --git a/sysdeps/standalone/write.c b/sysdeps/standalone/write.c new file mode 100644 index 0000000000..22c01a4f04 --- /dev/null +++ b/sysdeps/standalone/write.c @@ -0,0 +1,72 @@ +/* Copyright (C) 1994 Free Software Foundation, Inc. + Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil, + On-Line Applications Research Corporation. + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include +#include + +#include "filedesc.h" +#include +#include + +/* Write NBYTES of BUF to FD. Return the number written, or -1. */ +ssize_t +DEFUN(__write, (fd, buf, nbytes), + int fd AND CONST PTR buf AND size_t nbytes) +{ + int count; + CONST char *data = buf; + + if (nbytes == 0) + return 0; + if ( !__FD_Is_valid( fd ) || !__FD_Table[ fd ].in_use ) + { + errno = EBADF; + return -1; + } + if (buf == NULL) + { + errno = EINVAL; + return -1; + } + + if ( !(__FD_Table[ fd ].flags & (O_WRONLY|O_RDWR)) ) /* is it writeable? */ + { + errno = EBADF; + return -1; + } + + /* + * All open file descriptors are mapped to the console. + */ + + for ( count=0 ; count != nbytes ; count++ ) { + if ( _Console_Putc(data[ count ]) == -1 ) + return -1; + if ( data[count] == '\n' && _Console_Putc('\r') == -1 ) + return -1; + } + + return count; +} + From f45ec7f2e22374917d2b83e8bae5918af21a2590 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 26 Aug 1994 06:15:51 +0000 Subject: [PATCH 0422/4487] entered into RCS --- sysdeps/standalone/Dist | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sysdeps/standalone/Dist diff --git a/sysdeps/standalone/Dist b/sysdeps/standalone/Dist new file mode 100644 index 0000000000..b6b12b709a --- /dev/null +++ b/sysdeps/standalone/Dist @@ -0,0 +1,2 @@ +filedesc.h +standalone.h From 137575e677ef73d3d8f2565fd2e58f4460246c44 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 28 Aug 1994 08:13:00 +0000 Subject: [PATCH 0423/4487] entered into RCS --- sysdeps/standalone/i960/start.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/standalone/i960/start.S b/sysdeps/standalone/i960/start.S index 6cdc604f69..c14449d3ff 100644 --- a/sysdeps/standalone/i960/start.S +++ b/sysdeps/standalone/i960/start.S @@ -86,7 +86,7 @@ init_frames: */ mov 0, g0 - callx ___exit + callx __exit ret From ece89a1215ab74090619029ed23f33ff3f86ba3b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 28 Aug 1994 08:50:46 +0000 Subject: [PATCH 0424/4487] Formerly ./standalone/m68k/m68020/mvme136/_exit.c.~2~ --- sysdeps/standalone/m68k/m68020/mvme136/_exit.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/sysdeps/standalone/m68k/m68020/mvme136/_exit.c b/sysdeps/standalone/m68k/m68020/mvme136/_exit.c index b7669026fe..2deecaa157 100644 --- a/sysdeps/standalone/m68k/m68020/mvme136/_exit.c +++ b/sysdeps/standalone/m68k/m68020/mvme136/_exit.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1994 Free Software Foundation, Inc. Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), On-Line Applications Research Corporation. @@ -44,15 +44,6 @@ DEFUN(_exit, (status), int status) { /* status is ignored */ - - M68Kvec[ 45 ] = exit_trap; /* install exit_trap handler */ + M68Kvec[ 45 ] = __exit_trap; /* install exit_trap handler */ asm volatile( "trap #13" ); /* insures SUPV mode */ } - -#ifdef HAVE_GNU_LD - -#include - -stub_warning(_exit); - -#endif /* GNU stabs. */ From 3635a087575d0cf83f872d165d7b29672a746310 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 30 Aug 1994 12:38:38 +0000 Subject: [PATCH 0425/4487] Initial revision --- sysdeps/mach/mips/syscall.S | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 sysdeps/mach/mips/syscall.S diff --git a/sysdeps/mach/mips/syscall.S b/sysdeps/mach/mips/syscall.S new file mode 100644 index 0000000000..bf56b401dd --- /dev/null +++ b/sysdeps/mach/mips/syscall.S @@ -0,0 +1,37 @@ +/* Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +ENTRY (syscall) + .frame sp,0,ra + move v0, a0 /* Load system call number from first arg. */ + move a0, a1 /* Move the next three args up a register. */ + move a1, a2 + move a2, a3 + /* Load the remaining possible args (up to 11) from the stack. */ + lw t0,16(sp) + lw t1,20(sp) + lw t2,24(sp) + lw t3,28(sp) + lw t4,32(sp) + lw t5,36(sp) + lw t6,40(sp) + syscall /* Do the system call. */ + j ra /* Return to caller. */ + .end syscall From 9ebc812a40346d375e5b0922da5e2bc61ec0f44f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 2 Sep 1994 03:21:20 +0000 Subject: [PATCH 0426/4487] (routines, elided-routines): Set these both to $(bare-routines). (distribute): Don't set this. --- bare/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bare/Makefile b/bare/Makefile index bb1807f9c7..588a713c83 100644 --- a/bare/Makefile +++ b/bare/Makefile @@ -22,8 +22,9 @@ subdir := bare bare-routines := brdinit console strtsupp +routines = $(bare-routines) +elided-routines = $(bare-routines) extra-objs = $(bare-routines:%=%.o) -distribute = $(bare-routines:%=%.c) install-lib = lib$(config-vendor).a From 7704bac4de34fe1c3d367c02de17ed79577f2379 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 3 Sep 1994 02:31:57 +0000 Subject: [PATCH 0427/4487] Restore FPU state. Code from kkojima. --- sysdeps/mach/hurd/mips/sigreturn.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/sysdeps/mach/hurd/mips/sigreturn.c b/sysdeps/mach/hurd/mips/sigreturn.c index f02e799dcb..0b3a474986 100644 --- a/sysdeps/mach/hurd/mips/sigreturn.c +++ b/sysdeps/mach/hurd/mips/sigreturn.c @@ -77,8 +77,30 @@ __sigreturn (struct sigcontext *scp) if (scp->sc_coproc_used & SC_COPROC_USE_FPU) { - /* XXX should restore FPU state here */ - abort (); + /* Restore FPU state. */ +#define restore_fpr(n) \ + asm volatile ("l.d $f" #n ",%0" : : "m" (scp->sc_fpr[n])) + + /* Restore floating-point registers. */ + restore_fpr (0); + restore_fpr (2); + restore_fpr (4); + restore_fpr (6); + restore_fpr (8); + restore_fpr (10); + restore_fpr (12); + restore_fpr (14); + restore_fpr (16); + restore_fpr (18); + restore_fpr (20); + restore_fpr (22); + restore_fpr (24); + restore_fpr (26); + restore_fpr (28); + restore_fpr (30); + + /* Restore the floating-point control/status register ($f31). */ + asm volatile ("ctc1 %0,$f31" : : "r" (scp->sc_fpcsr)); } /* Load all the registers from the sigcontext. */ From 09dbb2c168a338a36f4debd8ce40d4e5089987a7 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 13 Sep 1994 17:09:48 +0000 Subject: [PATCH 0428/4487] entered into RCS --- .../standalone/i386/force_cpu386/target.ld | 59 +++++++++++++ sysdeps/standalone/m68k/m68020/m68020.h | 88 +++++++++++++++++++ .../standalone/m68k/m68020/mvme136/mvme136.ld | 62 +++++++++++++ 3 files changed, 209 insertions(+) create mode 100644 sysdeps/standalone/i386/force_cpu386/target.ld create mode 100644 sysdeps/standalone/m68k/m68020/m68020.h create mode 100644 sysdeps/standalone/m68k/m68020/mvme136/mvme136.ld diff --git a/sysdeps/standalone/i386/force_cpu386/target.ld b/sysdeps/standalone/i386/force_cpu386/target.ld new file mode 100644 index 0000000000..056da10d55 --- /dev/null +++ b/sysdeps/standalone/i386/force_cpu386/target.ld @@ -0,0 +1,59 @@ +/* Copyright (C) 1994 Free Software Foundation, Inc. + Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), + On-Line Applications Research Corporation. + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* This file contains directives for the GNU linker which are specific +to the FORCE CPU386 board. */ + +MEMORY + { + ram : org = 0x0, l = 1M + } + +/* This value is also when the space is allocated. If you change +this one, change the other one!!! */ + +heap_size = 0x20000; + +SECTIONS +{ + .text 0x0 : + { + _text_start = ABSOLUTE(.) ; + *(.text) + _etext = ALIGN( 0x10 ) ; + } + .data ADDR( .text ) + SIZEOF( .text ): + { + _data_start = . ; + *(.data) + _edata = ALIGN( 0x10 ) ; + } + .bss ADDR( .data ) + SIZEOF( .data ): + { + _bss_start = . ; + *(.bss) + *(COMMON) + heap_memory = .; + . += 0x20000; + _end = . ; + __end = . ; + } +} diff --git a/sysdeps/standalone/m68k/m68020/m68020.h b/sysdeps/standalone/m68k/m68020/m68020.h new file mode 100644 index 0000000000..e9e6f7d875 --- /dev/null +++ b/sysdeps/standalone/m68k/m68020/m68020.h @@ -0,0 +1,88 @@ +/* Copyright (C) 1994 Free Software Foundation, Inc. + Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), + On-Line Applications Research Corporation. + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* m68020.h + * + * This file contains macros which are used to access MC68020 + * registers which are not addressable by C. These are + * useful when developing the board specific support. + */ + +#ifndef m68020_h__ +#define m68020_h__ + +typedef void ( *mc68020_isr )( void ); + +#define disable_intr( level ) \ + { (level) = 0; \ + asm volatile ( "movew %%sr,%0 ; \ + orw #0x0700,%%sr" \ + : "=d" ((level)) : "0" ((level)) ); \ + } + +#define enable_intr( level ) \ + { asm volatile ( "movew %0,%%sr " \ + : "=d" ((level)) : "0" ((level)) ); \ + } + +#define flash_intr( level ) \ + { asm volatile ( "movew %0,%%sr ; \ + orw #0x0700,%%sr" \ + : "=d" ((level)) : "0" ((level)) ); \ + } + +#define get_vbr( vbr ) \ + { (vbr) = 0; \ + asm volatile ( "movec %%vbr,%0 " \ + : "=a" (vbr) : "0" (vbr) ); \ + } + +#define set_vbr( vbr ) \ + { register mc68020_isr *_vbr= (mc68020_isr *)(vbr); \ + asm volatile ( "movec %0,%%vbr " \ + : "=a" (_vbr) : "0" (_vbr) ); \ + } + +#define enable_caching() \ + { register unsigned int _ctl=0x01; \ + asm volatile ( "movec %0,%%cacr" \ + : "=d" (_ctl) : "0" (_ctl) ); \ + } + +#define delay( microseconds ) \ + { register unsigned int _delay=(microseconds); \ + register unsigned int _tmp=123; \ + asm volatile( "0: \ + nbcd %0 ; \ + nbcd %0 ; \ + dbf %1,0 " \ + : "=d" (_tmp), "=d" (_delay) \ + : "0" (_tmp), "1" (_delay) ); \ + } + +#define enable_tracing() +#define cause_intr( X ) +#define clear_intr( X ) + +extern mc68020_isr M68Kvec[]; /* vector table address */ + +#endif +/* end of include file */ diff --git a/sysdeps/standalone/m68k/m68020/mvme136/mvme136.ld b/sysdeps/standalone/m68k/m68020/mvme136/mvme136.ld new file mode 100644 index 0000000000..0f68330241 --- /dev/null +++ b/sysdeps/standalone/m68k/m68020/mvme136/mvme136.ld @@ -0,0 +1,62 @@ +/* Copyright (C) 1994 Free Software Foundation, Inc. + Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), + On-Line Applications Research Corporation. + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* This file contains directives for the GNU linker which are specific +to the Motorola MVME136/MVME135 boards. */ + +MEMORY + { + ram : org = 0x3000, l = 1M + } + +/* This value is also when the space is allocated. If you change +this one, change the other one!!! */ + +heap_size = 0x20000; + +SECTIONS +{ + .text 0x3000 : + { + text_start = ABSOLUTE(.) ; + *(.text) + etext = ALIGN( 0x10 ) ; + } + + .data ADDR( .text ) + SIZEOF( .text ): + { + data_start = . ; + *(.data) + edata = ALIGN( 0x10 ) ; + } + + .bss ADDR( .data ) + SIZEOF( .data ): + { + bss_start = . ; + _bss_start = . ; + *(.bss) + *(COMMON) + heap_memory = .; + . += 0x20000; + end = . ; + _end = . ; + } +} From de20f4e300e8405ff3fca4edf5837831c52b8ff0 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 13 Sep 1994 19:28:54 +0000 Subject: [PATCH 0429/4487] entered into RCS --- sysdeps/standalone/i960/i960ca.h | 207 +++++++++++++++++++++++++++++++ 1 file changed, 207 insertions(+) create mode 100644 sysdeps/standalone/i960/i960ca.h diff --git a/sysdeps/standalone/i960/i960ca.h b/sysdeps/standalone/i960/i960ca.h new file mode 100644 index 0000000000..21012b4ccc --- /dev/null +++ b/sysdeps/standalone/i960/i960ca.h @@ -0,0 +1,207 @@ +/* Copyright (C) 1994 Free Software Foundation, Inc. + Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), + On-Line Applications Research Corporation. + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* i960ca.h + * + * This file contains macros which are used to access i80960CA + * registers which are not addressable by C. The functions + * in this file sould be useful to the developer of target + * specific code. + */ + +#ifndef i960ca_h__ +#define i960ca_h__ + +typedef unsigned char unsigned8; +typedef unsigned short unsigned16; +typedef unsigned int unsigned32; + +/* + * Intel i80960CA Processor Control Block + */ + +struct i80960ca_prcb { + unsigned32 *fault_tbl; /* fault table base address */ + struct i80960ca_ctltbl + *control_tbl; /* control table base address */ + unsigned32 initial_ac; /* AC register initial value */ + unsigned32 fault_config; /* fault configuration word */ + void *intr_tbl; /* interrupt table base address */ + void *sys_proc_tbl; /* system procedure table */ + /* base address */ + unsigned32 reserved; /* reserved */ + unsigned32 *intr_stack; /* interrupt stack pointer */ + unsigned32 ins_cache_cfg; /* instruction cache */ + /* configuration word */ + unsigned32 reg_cache_cfg; /* register cache */ + /* configuration word */ +}; + +/* + * Intel i80960CA Control Table + */ + +struct i80960ca_ctltbl { + /* Control Group 0 */ + unsigned32 ipb0; /* IP breakpoint 0 */ + unsigned32 ipb1; /* IP breakpoint 1 */ + unsigned32 dab0; /* data address breakpoint 0 */ + unsigned32 dab1; /* data address breakpoint 1 */ + /* Control Group 1 */ + unsigned32 imap0; /* interrupt map 0 */ + unsigned32 imap1; /* interrupt map 1 */ + unsigned32 imap2; /* interrupt map 2 */ + unsigned32 icon; /* interrupt control */ + /* Control Group 2 */ + unsigned32 mcon0; /* memory region 0 configuration */ + unsigned32 mcon1; /* memory region 1 configuration */ + unsigned32 mcon2; /* memory region 2 configuration */ + unsigned32 mcon3; /* memory region 3 configuration */ + /* Control Group 3 */ + unsigned32 mcon4; /* memory region 4 configuration */ + unsigned32 mcon5; /* memory region 5 configuration */ + unsigned32 mcon6; /* memory region 6 configuration */ + unsigned32 mcon7; /* memory region 7 configuration */ + /* Control Group 4 */ + unsigned32 mcon8; /* memory region 8 configuration */ + unsigned32 mcon9; /* memory region 9 configuration */ + unsigned32 mcon10; /* memory region 10 configuration */ + unsigned32 mcon11; /* memory region 11 configuration */ + /* Control Group 5 */ + unsigned32 mcon12; /* memory region 12 configuration */ + unsigned32 mcon13; /* memory region 13 configuration */ + unsigned32 mcon14; /* memory region 14 configuration */ + unsigned32 mcon15; /* memory region 15 configuration */ + /* Control Group 6 */ + unsigned32 bpcon; /* breakpoint control */ + unsigned32 tc; /* trace control */ + unsigned32 bcon; /* bus configuration control */ + unsigned32 reserved; /* reserved */ +}; + +#define disable_intr( oldlevel ) \ + { (oldlevel) = 0x1f0000; \ + asm volatile ( "modpc 0,%1,%1" \ + : "=d" ((oldlevel)) \ + : "0" ((oldlevel)) ); \ + } + +#define enable_intr( oldlevel ) \ + { unsigned32 _mask = 0x1f0000; \ + asm volatile ( "modpc 0,%0,%1" \ + : "=d" (_mask), "=d" ((oldlevel)) \ + : "0" (_mask), "1" ((oldlevel)) ); \ + } + +#define flash_intr( oldlevel ) \ + { unsigned32 _mask = 0x1f0000; \ + asm volatile ( "modpc 0,%0,%1 ; \ + mov %0,%1 ; \ + modpc 0,%0,%1" \ + : "=d" (_mask), "=d" ((oldlevel)) \ + : "0" (_mask), "1" ((oldlevel)) ); \ + } + +#define atomic_modify( mask, addr, prev ) \ + { register unsigned32 _mask = (mask); \ + register unsigned32 *_addr = (unsigned32 *)(addr); \ + asm volatile( "atmod %0,%1,%1" \ + : "=d" (_addr), "=d" (_mask) \ + : "0" (_addr), "1" (_mask) ); \ + (prev) = _mask; \ + } + +#define delay( microseconds ) \ + { register unsigned32 _delay=(microseconds); \ + register unsigned32 _tmp; \ + asm volatile( "delay0: \ + remo 3,31,%0 ; \ + cmpo 0,%0 ; \ + subo 1,%1,%1 ; \ + cmpobne.t 0,%1,delay0 " \ + : "=d" (_tmp), "=d" (_delay) \ + : "0" (_tmp), "1" (_delay) ); \ + } + +#define enable_tracing() \ + { register unsigned32 _pc = 0x1; \ + asm volatile( "modpc 0,%0,%0" : "=d" (_pc) : "0" (_pc) ); \ + } + +#define unmask_intr( xint ) \ + { register unsigned32 _mask= (1<<(xint)); \ + asm volatile( "or sf1,%0,sf1" : "=d" (_mask) : "0" (_mask) ); \ + } + +#define mask_intr( xint ) \ + { register unsigned32 _mask= (1<<(xint)); \ + asm volatile( "andnot %0,sf1,sf1" : "=d" (_mask) : "0" (_mask) ); \ + } + +#define clear_intr( xint ) \ + { register unsigned32 _xint=(xint); \ + asm volatile( "loop_til_cleared: + clrbit %0,sf0,sf0 ; \ + bbs %0,sf0,loop_til_cleared" \ + : "=d" (_xint) : "0" (_xint) ); \ + } + +#define reload_ctl_group( group ) \ + { register int _cmd = ((group)|0x400) ; \ + asm volatile( "sysctl %0,%0,%0" : "=d" (_cmd) : "0" (_cmd) ); \ + } + +#define cause_intr( intr ) \ + { register int _intr = (intr); \ + asm volatile( "sysctl %0,%0,%0" : "=d" (_intr) : "0" (_intr) ); \ + } + +#define soft_reset( prcb ) \ + { register struct i80960ca_prcb *_prcb = (prcb); \ + register unsigned32 *_next=0; \ + register unsigned32 _cmd = 0x30000; \ + asm volatile( "lda next,%1; \ + sysctl %0,%1,%2; \ + next: mov g0,g0" \ + : "=d" (_cmd), "=d" (_next), "=d" (_prcb) \ + : "0" (_cmd), "1" (_next), "2" (_prcb) ); \ + } + +static inline unsigned32 pend_intrs() +{ register unsigned32 _intr=0; + asm volatile( "mov sf0,%0" : "=d" (_intr) : "0" (_intr) ); + return ( _intr ); +} + +static inline unsigned32 mask_intrs() +{ register unsigned32 _intr=0; + asm volatile( "mov sf1,%0" : "=d" (_intr) : "0" (_intr) ); + return( _intr ); +} + +static inline unsigned32 get_fp() +{ register unsigned32 _fp=0; + asm volatile( "mov fp,%0" : "=d" (_fp) : "0" (_fp) ); + return ( _fp ); +} + +#endif +/* end of include file */ From 5c84ce029b275dd00e7b61e2fd8f246a8c279b0f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 16 Sep 1994 02:14:38 +0000 Subject: [PATCH 0430/4487] entered into RCS --- sysdeps/standalone/i960/Dist | 1 + sysdeps/standalone/m68k/m68020/Dist | 1 + sysdeps/standalone/m68k/m68020/mvme136/Dist | 1 + 3 files changed, 3 insertions(+) create mode 100644 sysdeps/standalone/i960/Dist create mode 100644 sysdeps/standalone/m68k/m68020/Dist create mode 100644 sysdeps/standalone/m68k/m68020/mvme136/Dist diff --git a/sysdeps/standalone/i960/Dist b/sysdeps/standalone/i960/Dist new file mode 100644 index 0000000000..e1747ef91e --- /dev/null +++ b/sysdeps/standalone/i960/Dist @@ -0,0 +1 @@ +i960ca.h diff --git a/sysdeps/standalone/m68k/m68020/Dist b/sysdeps/standalone/m68k/m68020/Dist new file mode 100644 index 0000000000..90b37b40eb --- /dev/null +++ b/sysdeps/standalone/m68k/m68020/Dist @@ -0,0 +1 @@ +m68020.h diff --git a/sysdeps/standalone/m68k/m68020/mvme136/Dist b/sysdeps/standalone/m68k/m68020/mvme136/Dist new file mode 100644 index 0000000000..97b90583eb --- /dev/null +++ b/sysdeps/standalone/m68k/m68020/mvme136/Dist @@ -0,0 +1 @@ +mvme136.ld From 8df6e75faf01140637b0bb08651d9c00f238d321 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 16 Sep 1994 02:14:48 +0000 Subject: [PATCH 0431/4487] Initial revision --- sysdeps/standalone/i386/force_cpu386/Dist | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/standalone/i386/force_cpu386/Dist diff --git a/sysdeps/standalone/i386/force_cpu386/Dist b/sysdeps/standalone/i386/force_cpu386/Dist new file mode 100644 index 0000000000..fed1490852 --- /dev/null +++ b/sysdeps/standalone/i386/force_cpu386/Dist @@ -0,0 +1 @@ +force_cpu386.ld From 152f50979835aa4a88123c27ed97c0539075616f Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Thu, 29 Sep 1994 21:21:19 +0000 Subject: [PATCH 0432/4487] * sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h (ENTRY): Use poundfnc instead of \#function, to satisfy gcc-2.6.0 and higher. (cat, poundfnc): Define macros to pull it off. --- sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h index 711fd8c7ff..90e2b38427 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1994 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -21,11 +21,17 @@ Cambridge, MA 02139, USA. */ #include +/* As of gcc-2.6.0, it complains about pound signs in front of things + that aren't arguments to the macro. So we use this to pull it off + instead. */ +#define cat(a,b) a##b +#define poundfnc cat(#,function) + #define ENTRY(name) \ .section ".text"; \ .align 4; \ .global C_SYMBOL_NAME(name); \ - .type C_SYMBOL_NAME(name), \#function; \ + .type C_SYMBOL_NAME(name), poundfnc; \ C_LABEL(name) #define PSEUDO(name, syscall_name, args) \ From 2a5c38e6378ec604f37c72529eb52351d68307e1 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 30 Sep 1994 21:50:55 +0000 Subject: [PATCH 0433/4487] Initial revision --- sysdeps/standalone/dirstream.h | 47 ++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 sysdeps/standalone/dirstream.h diff --git a/sysdeps/standalone/dirstream.h b/sysdeps/standalone/dirstream.h new file mode 100644 index 0000000000..b117a5a254 --- /dev/null +++ b/sysdeps/standalone/dirstream.h @@ -0,0 +1,47 @@ +/* Copyright (C) 1994 Free Software Foundation, Inc. + Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil, + On-Line Applications Research Corporation. + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifndef _DIRSTREAM_H + +#define _DIRSTREAM_H 1 + +#define __need_size_t +#include + +/* Directory stream type. + + The miscellaneous Unix `readdir' implementations read directory data + into a buffer and fill in a `struct dirent' copy in the `DIR' object. +*/ + +typedef struct + { + int __fd; /* File descriptor. */ + + char *__data; /* Directory block. */ + size_t __allocation; /* Space allocated for the block. */ + size_t __offset; /* Current offset into the block. */ + size_t __size; /* Total valid data in the block. */ + + struct dirent __entry; /* Returned by `readdir'. */ + } DIR; + +#endif /* dirstream.h */ From 735888584ded5b8b41c46f7c1846b30567d12a8a Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 30 Sep 1994 21:51:53 +0000 Subject: [PATCH 0434/4487] entered into RCS --- sysdeps/standalone/dirstream.h | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/sysdeps/standalone/dirstream.h b/sysdeps/standalone/dirstream.h index b117a5a254..20c4922fb9 100644 --- a/sysdeps/standalone/dirstream.h +++ b/sysdeps/standalone/dirstream.h @@ -1,7 +1,4 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. - Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil, - On-Line Applications Research Corporation. - +/* Copyright (C) 1993 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 @@ -19,9 +16,9 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifndef _DIRSTREAM_H +#ifndef _DIRSTREAM_H -#define _DIRSTREAM_H 1 +#define _DIRSTREAM_H 1 #define __need_size_t #include @@ -29,19 +26,18 @@ Cambridge, MA 02139, USA. */ /* Directory stream type. The miscellaneous Unix `readdir' implementations read directory data - into a buffer and fill in a `struct dirent' copy in the `DIR' object. -*/ + into a buffer and fill in a `struct dirent' copy in the `DIR' object. */ typedef struct { - int __fd; /* File descriptor. */ + int __fd; /* File descriptor. */ - char *__data; /* Directory block. */ - size_t __allocation; /* Space allocated for the block. */ - size_t __offset; /* Current offset into the block. */ - size_t __size; /* Total valid data in the block. */ + char *__data; /* Directory block. */ + size_t __allocation; /* Space allocated for the block. */ + size_t __offset; /* Current offset into the block. */ + size_t __size; /* Total valid data in the block. */ - struct dirent __entry; /* Returned by `readdir'. */ + struct dirent __entry; /* Returned by `readdir'. */ } DIR; -#endif /* dirstream.h */ +#endif /* dirstream.h */ From 5302ac2b99ae3bdc2efd1d6ae2672a548eedcf00 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 27 Oct 1994 19:00:37 +0000 Subject: [PATCH 0435/4487] Fixed typo. --- sysdeps/standalone/standalone.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/standalone/standalone.h b/sysdeps/standalone/standalone.h index 07f83559c7..13d58f03e8 100644 --- a/sysdeps/standalone/standalone.h +++ b/sysdeps/standalone/standalone.h @@ -24,7 +24,7 @@ Cambridge, MA 02139, USA. */ #include -extern void _Board_Initialize __PP ((void)); +extern void _Board_Initialize __P ((void)); extern int _Console_Putc __P ((char c)); extern int _Console_Getc __P ((int poll)); From 8f476a532793b8857f0f9843e667df927202d6dd Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 31 Oct 1994 12:14:14 +0000 Subject: [PATCH 0436/4487] (TCSASOFT): Macro removed. --- sysdeps/unix/bsd/sun/sunos4/termbits.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sysdeps/unix/bsd/sun/sunos4/termbits.h b/sysdeps/unix/bsd/sun/sunos4/termbits.h index 01ab4d7874..b768deab6f 100644 --- a/sysdeps/unix/bsd/sun/sunos4/termbits.h +++ b/sysdeps/unix/bsd/sun/sunos4/termbits.h @@ -1,5 +1,5 @@ /* termios type and macro definitions. SunOS 4 version. -Copyright (C) 1993 Free Software Foundation, Inc. +Copyright (C) 1993, 1994 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 @@ -195,9 +195,6 @@ struct termios #define TCSANOW 0 /* Change immediately. */ #define TCSADRAIN 1 /* Change when pending output is written. */ #define TCSAFLUSH 2 /* Flush pending input before changing. */ -#ifdef __USE_BSD -#define TCSASOFT 0x10 /* Flag: Don't alter hardware state. */ -#endif /* Values for the QUEUE_SELECTOR argument to `tcflush'. */ #define TCIFLUSH 0 /* Discard data received but not yet read. */ From 216eed1fd6c0cb08ff25eb7f8b8c73adebd27ca2 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 1 Nov 1994 06:28:24 +0000 Subject: [PATCH 0437/4487] entered into RCS --- sysdeps/standalone/i386/force_cpu386/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sysdeps/standalone/i386/force_cpu386/Makefile b/sysdeps/standalone/i386/force_cpu386/Makefile index 429f822594..8483724ee3 100644 --- a/sysdeps/standalone/i386/force_cpu386/Makefile +++ b/sysdeps/standalone/i386/force_cpu386/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1993 Free Software Foundation, Inc. +# Copyright (C) 1994 Free Software Foundation, Inc. # Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), # On-Line Applications Research Corporation. @@ -18,5 +18,7 @@ # Cambridge, MA 02139, USA. ifeq (bare,$(subdir)) -install-lib += force_cpu386.ld +install-others += $(libdir)/force_cpu386.ld +$(libdir)/force_cpu386.ld: $(sysdep_dir)/standalone/i386/target.ld + $(do-install) endif From 92c456e486df6f591d452c6c8560a2e5e5abf2b3 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 1 Nov 1994 08:32:25 +0000 Subject: [PATCH 0438/4487] entered into RCS --- sysdeps/standalone/i386/force_cpu386/Dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/standalone/i386/force_cpu386/Dist b/sysdeps/standalone/i386/force_cpu386/Dist index fed1490852..8b7b09e10a 100644 --- a/sysdeps/standalone/i386/force_cpu386/Dist +++ b/sysdeps/standalone/i386/force_cpu386/Dist @@ -1 +1 @@ -force_cpu386.ld +target.ld From 2131138c9039fe22c670fd285bab17943f5213c4 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 8 Nov 1994 22:33:29 +0000 Subject: [PATCH 0439/4487] entered into RCS --- sysdeps/mach/alpha/machine-sp.h | 36 +++++++++++++++++++++++++++++ sysdeps/mach/alpha/thread_state.h | 38 +++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 sysdeps/mach/alpha/machine-sp.h create mode 100644 sysdeps/mach/alpha/thread_state.h diff --git a/sysdeps/mach/alpha/machine-sp.h b/sysdeps/mach/alpha/machine-sp.h new file mode 100644 index 0000000000..6a8a3c6d40 --- /dev/null +++ b/sysdeps/mach/alpha/machine-sp.h @@ -0,0 +1,36 @@ +/* Machine-specific function to return the stack pointer. Alpha version. +Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifndef _MACHINE_SP_H +#define _MACHINE_SP_H + +/* Return the current stack pointer. */ + +#ifndef _EXTERN_INLINE +#define _EXTERN_INLINE extern __inline +#endif + +_EXTERN_INLINE void * +__thread_stack_pointer (void) +{ + register void *__sp__ __asm__ ("$30"); + return __sp__; +} + +#endif /* machine-sp.h */ diff --git a/sysdeps/mach/alpha/thread_state.h b/sysdeps/mach/alpha/thread_state.h new file mode 100644 index 0000000000..38527df654 --- /dev/null +++ b/sysdeps/mach/alpha/thread_state.h @@ -0,0 +1,38 @@ +/* Mach thread state definitions for machine-independent code. Alpha version. +Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#define MACHINE_THREAD_STATE_FLAVOR ALPHA_THREAD_STATE +#define MACHINE_THREAD_STATE_COUNT ALPHA_THREAD_STATE_COUNT + +#define machine_thread_state alpha_thread_state + +#define PC pc +#define SP r30 +#define SYSRETURN r0 + +struct machine_thread_all_state + { + int set; /* Mask of bits (1 << FLAVOR). */ + struct alpha_thread_state basic; + struct alpha_float_state fpu; + }; + +#include_next From 72dd53ade3c0be284deb043926cccffa2455195e Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 8 Nov 1994 23:32:22 +0000 Subject: [PATCH 0440/4487] Initial revision --- sysdeps/mach/hurd/alpha/longjmp-ctx.c | 38 ++++++++++++++++++ sysdeps/mach/hurd/alpha/sigcontext.h | 56 +++++++++++++++++++++++++++ 2 files changed, 94 insertions(+) create mode 100644 sysdeps/mach/hurd/alpha/longjmp-ctx.c create mode 100644 sysdeps/mach/hurd/alpha/sigcontext.h diff --git a/sysdeps/mach/hurd/alpha/longjmp-ctx.c b/sysdeps/mach/hurd/alpha/longjmp-ctx.c new file mode 100644 index 0000000000..51fd5c5b50 --- /dev/null +++ b/sysdeps/mach/hurd/alpha/longjmp-ctx.c @@ -0,0 +1,38 @@ +/* Perform a `longjmp' on a `struct sigcontext'. i386 version. +Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include + +void +_hurd_longjmp_sigcontext (struct sigcontext *scp, jmp_buf env, int retval) +{ + memset (scp, 0, sizeof (*scp)); + scp->sc_regs[9] = env[0].__9; + scp->sc_regs[11] = env[0].__11; + scp->sc_regs[12] = env[0].__12; + scp->sc_regs[13] = env[0].__13; + scp->sc_regs[14] = env[0].__14; + scp->sc_regs[15] = (long int) env[0].__fp; + scp->sc_regs[30] = (long int) env[0].__sp; + scp->sc_pc = (long int) env[0].__pc; + + memcpy (&scp->sc_fpregs[2], &env[0].__f2, sizeof (double)); +} diff --git a/sysdeps/mach/hurd/alpha/sigcontext.h b/sysdeps/mach/hurd/alpha/sigcontext.h new file mode 100644 index 0000000000..5767e8be4c --- /dev/null +++ b/sysdeps/mach/hurd/alpha/sigcontext.h @@ -0,0 +1,56 @@ +/* Machine-dependent signal context structure for GNU Hurd. Alpha version. +Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Signal handlers are actually called: + void handler (int sig, int code, struct sigcontext *scp); */ + +/* State of this thread when the signal was taken. */ +struct sigcontext + { + /* These first members are machine-independent. */ + + int sc_onstack; /* Nonzero if running on sigstack. */ + sigset_t sc_mask; /* Blocked signals to restore. */ + + /* MiG reply port this thread is using. */ + unsigned int sc_reply_port; + + /* Port this thread is doing an interruptible RPC on. */ + unsigned int sc_intr_port; + + /* Error code associated with this signal (interpreted as `error_t'). */ + int sc_error; + + /* All following members are machine-dependent. The rest of this + structure is written to be laid out identically to: + { + struct alpha_thread_state basic; + struct alpha_float_state fpu; + } + trampoline.c knows this, so it must be changed if this changes. */ + +#define sc_alpha_thread_state sc_gs /* Beginning of correspondence. */ + long int sc_regs[31]; /* General registers $0..$30. */ + long int sc_pc; /* Program counter. */ + long int sc_ps; /* Processor status. */ + + /* struct alpha_float_state */ +#define sc_alpha_float_state sc_fpregs + long int sc_fpregs[32]; /* Floating point registers $f0..$f31. */ + }; From eacddc0a20f6fa71fff1a4bba4bf91497193680b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 8 Nov 1994 23:34:47 +0000 Subject: [PATCH 0441/4487] entered into RCS --- sysdeps/mach/hurd/alpha/longjmp-ctx.c | 2 +- sysdeps/mach/hurd/alpha/longjmp-ts.c | 41 +++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 sysdeps/mach/hurd/alpha/longjmp-ts.c diff --git a/sysdeps/mach/hurd/alpha/longjmp-ctx.c b/sysdeps/mach/hurd/alpha/longjmp-ctx.c index 51fd5c5b50..dfc16fdfe4 100644 --- a/sysdeps/mach/hurd/alpha/longjmp-ctx.c +++ b/sysdeps/mach/hurd/alpha/longjmp-ctx.c @@ -1,4 +1,4 @@ -/* Perform a `longjmp' on a `struct sigcontext'. i386 version. +/* Perform a `longjmp' on a `struct sigcontext'. Alpha version. Copyright (C) 1994 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/sysdeps/mach/hurd/alpha/longjmp-ts.c b/sysdeps/mach/hurd/alpha/longjmp-ts.c new file mode 100644 index 0000000000..8ee2b9a814 --- /dev/null +++ b/sysdeps/mach/hurd/alpha/longjmp-ts.c @@ -0,0 +1,41 @@ +/* Perform a `longjmp' on a Mach thread_state. Alpha version. +Copyright (C) 1991, 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include + + +/* Set up STATE to do the equivalent of `longjmp (ENV, VAL);'. */ + +void +_hurd_longjmp_thread_state (void *state, jmp_buf env, int val) +{ + struct alpha_thread_state *ts = state; + + ts->r9 = env[0].__9; + ts->r11 = env[0].__11; + ts->r12 = env[0].__12; + ts->r13 = env[0].__13; + ts->r14 = env[0].__14; + ts->r15 = (long int) env[0].__fp; + ts->r30 = (long int) env[0].__sp; + ts->pc = (long int) env[0].__pc; + ts->r0 = val ?: 1; +} From 1db9e43738324c9c335f5b322a88880d1f4b0bb3 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 9 Nov 1994 12:23:25 +0000 Subject: [PATCH 0442/4487] Initial revision --- sysdeps/mach/hurd/alpha/trampoline.c | 253 +++++++++++++++++++++++++++ 1 file changed, 253 insertions(+) create mode 100644 sysdeps/mach/hurd/alpha/trampoline.c diff --git a/sysdeps/mach/hurd/alpha/trampoline.c b/sysdeps/mach/hurd/alpha/trampoline.c new file mode 100644 index 0000000000..575d88d646 --- /dev/null +++ b/sysdeps/mach/hurd/alpha/trampoline.c @@ -0,0 +1,253 @@ +/* Set thread_state for sighandler, and sigcontext to recover. Alpha version. +Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include "thread_state.h" + + +struct mach_msg_trap_args + { + /* This is the order of arguments to mach_msg_trap. */ + mach_msg_header_t *msg; + mach_msg_option_t option; + mach_msg_size_t send_size; + mach_msg_size_t rcv_size; + mach_port_t rcv_name; + mach_msg_timeout_t timeout; + mach_port_t notify; + }; + + +struct sigcontext * +_hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, + int signo, int sigcode, + int rpc_wait, + struct machine_thread_all_state *state) +{ + + __label__ trampoline, rpc_wait_trampoline; + void *sigsp; + struct sigcontext *scp; + + if (ss->context) + { + /* We have a previous sigcontext that sigreturn was about + to restore when another signal arrived. We will just base + our setup on that. */ + if (! setjmp (_hurd_sigthread_fault_env)) + { + memcpy (&state->basic, &ss->context->sc_alpha_thread_state, + sizeof (state->basic)); + state->set = (1 << ALPHA_THREAD_STATE); + if (1) /* if fpu used XXX */ + { + memcpy (&state->fpu, &ss->context->sc_alpha_float_state, + sizeof (state->fpu)); + state->set |= (1 << ALPHA_FLOAT_STATE); + } + assert (! rpc_wait); + /* The intr_port slot was cleared before sigreturn sent us the + sig_post that made us notice this pending signal, so + _hurd_internal_post_signal wouldn't do interrupt_operation. + After we return, our caller will set SCP->sc_intr_port (in the + new context) from SS->intr_port and clear SS->intr_port. Now + that we are restoring this old context recorded by sigreturn, + we want to restore its intr_port too; so store it in + SS->intr_port now, so it will end up in SCP->sc_intr_port + later. */ + ss->intr_port = ss->context->sc_intr_port; + } + /* If the sigreturn context was bogus, just ignore it. */ + ss->context = NULL; + } + else if (! machine_get_basic_state (ss->thread, state)) + return NULL; + + if ((ss->actions[signo].sa_flags & SA_ONSTACK) && + !(ss->sigaltstack.ss_flags & (SA_DISABLE|SA_ONSTACK))) + { + sigsp = ss->sigaltstack.ss_sp + ss->sigaltstack.ss_size; + ss->sigaltstack.ss_flags |= SA_ONSTACK; + /* XXX need to set up base of new stack for + per-thread variables, cthreads. */ + } + else + sigsp = (char *) state->basic.r29; + + /* Set up the sigcontext structure on the stack. This is all the stack + needs, since the args are passed in registers (below). */ + sigsp -= sizeof (*scp); + scp = sigsp; + + if (! setjmp (_hurd_sigthread_fault_env)) + { + /* Set up the sigcontext from the current state of the thread. */ + + scp->sc_onstack = ss->sigaltstack.ss_flags & SA_ONSTACK ? 1 : 0; + + /* struct sigcontext is laid out so that starting at sc_regs + mimics a struct alpha_thread_state. */ + memcpy (&scp->sc_alpha_thread_state, + &state->basic, sizeof (state->basic)); + + if (1 && /* XXX fpu used */ + /* struct sigcontext is laid out so that starting at sc_fpregs + mimics a struct alpha_float_state. This state + is only meaningful if the coprocessor was used. */ + ! machine_get_state (ss->thread, state, ALPHA_FLOAT_STATE, + &state->fpu, + &scp->sc_alpha_float_state, + sizeof (state->fpu))) + return NULL; + } + else + /* We got a fault trying to write the stack frame. + We cannot set up the signal handler. + Returning NULL tells our caller, who will nuke us with a SIGILL. */ + return NULL; + + /* Modify the thread state to call the trampoline code on the new stack. */ + if (rpc_wait) + { + /* The signalee thread was blocked in a mach_msg_trap system call, + still waiting for a reply. We will have it run the special + trampoline code which retries the message receive before running + the signal handler. + + To do this we change the OPTION argument in its registers to + enable only message reception, since the request message has + already been sent. */ + + /* The system call arguments are stored in consecutive registers + starting with a0 ($16). */ + struct mach_msg_trap_args *args = (void *) &state->basic.r16; + + assert (args->option & MACH_RCV_MSG); + /* Disable the message-send, since it has already completed. The + calls we retry need only wait to receive the reply message. */ + args->option &= ~MACH_SEND_MSG; + + state->basic.pc = (long int) &&rpc_wait_trampoline; + /* After doing the message receive, the trampoline code will need to + update the v0 ($0) value to be restored by sigreturn. To simplify + the assembly code, we pass the address of its slot in SCP to the + trampoline code in at ($28). */ + state->basic.r28 = (long int) &scp->sc_regs[0]; + /* We must preserve the mach_msg_trap args in a0..a5 and t0 + ($16..$21, $1). Pass the handler args to the trampoline code in + t8..t10 ($22.$24). */ + state->basic.r22 = signo; + state->basic.r23 = sigcode; + state->basic.r24 = (long int) scp; + } + else + { + state->basic.pc = (long int) &&trampoline; + state->basic.r16 = signo; + state->basic.r17 = sigcode; + state->basic.r18 = (long int) scp; + } + + state->basic.r30 = (long int) sigsp; /* $30 is the stack pointer. */ + + /* We pass the handler function to the trampoline code in ra ($26). */ + state->basic.r26 = (long int) handler; + /* In the callee-saved register t12 ($27), we save the SCP value to pass + to __sigreturn after the handler returns. */ + state->basic.r27 = (long int) scp; + + return scp; + + /* The trampoline code follows. This is not actually executed as part of + this function, it is just convenient to write it that way. */ + + rpc_wait_trampoline: + /* This is the entry point when we have an RPC reply message to receive + before running the handler. The MACH_MSG_SEND bit has already been + cleared in the OPTION argument in our registers. For our convenience, + $3 points to the sc_gpr[1] member of the sigcontext (saved v0 ($2)). */ + asm volatile + (".set noat; .set noreorder; .set nomacro\n" + /* Retry the interrupted mach_msg system call. */ + "ldiq $0, -25\n" /* mach_msg_trap */ + "call_pal PAL_callsys\n" + /* When the sigcontext was saved, v0 was MACH_RCV_INTERRUPTED. But + now the message receive has completed and the original caller of + the RPC (i.e. the code running when the signal arrived) needs to + see the final return value of the message receive in v0. So + store the new v0 value into the sc_regs[0] member of the sigcontext + (whose address is in at to make this code simpler). */ + "stq v0, 0(at)\n" + /* Since the argument registers needed to have the mach_msg_trap + arguments, we've stored the arguments to the handler function + in registers t8..t10 ($22..$24). */ + "mov t8, a0\n" + "mov t9, a1\n" + "mov t10, a2\n"); + + trampoline: + /* Entry point for running the handler normally. The arguments to the + handler function are already in the standard registers: + + a0 SIGNO + a1 SIGCODE + a2 SCP + */ + asm volatile + ("br at, 0f;0: ldgp gp, 0(at)\n" /* Reset GP (???). */ + /* Call the handler function. */ + "jsr ra, ra; ldgp gp, 0(ra)\n" + /* Call __sigreturn (SCP); this cannot return. */ + "mov t12, a0\n" + "jsr ra, %0; ldgp gp, 0(ra)\n" + : : "i" (&__sigreturn)); + + /* NOTREACHED */ + asm volatile (".set reorder; .set at; .set macro"); + + return NULL; +} + +/* STATE describes a thread that had intr_port set (meaning it was inside + HURD_EINTR_RPC), after it has been thread_abort'd. It it looks to have + just completed a mach_msg_trap system call that returned + MACH_RCV_INTERRUPTED, return nonzero and set *PORT to the receive right + being waited on. */ +int +_hurdsig_rcv_interrupted_p (struct machine_thread_all_state *state, + mach_port_t *port) +{ + if (! setjmp (_hurd_sigthread_fault_env)) + { + const unsigned int *pc = (void *) state->basic.pc; + if (state->basic.r2 == MACH_RCV_INTERRUPTED && + pc[-1] == 0xc) /* XXX ???? syscall */ + { + /* We did just return from a mach_msg_trap system call + doing a message receive that was interrupted. + Examine the parameters to find the receive right. */ + struct mach_msg_trap_args *args = (void *) &state->basic.r16; + + *port = args->rcv_name; + return 1; + } + } + + return 0; +} From 0d92fbeca71981a5fd7e1417619bf1cdede60657 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 10 Nov 1994 04:35:29 +0000 Subject: [PATCH 0443/4487] entered into RCS --- sysdeps/mach/alpha/syscall.S | 38 ++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 sysdeps/mach/alpha/syscall.S diff --git a/sysdeps/mach/alpha/syscall.S b/sysdeps/mach/alpha/syscall.S new file mode 100644 index 0000000000..0fd10fa94c --- /dev/null +++ b/sysdeps/mach/alpha/syscall.S @@ -0,0 +1,38 @@ +/* Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +ENTRY (syscall) + .frame sp,0,ra + mov a0, v0 /* Load system call number from first arg. */ + mov a1, a0 + mov a2, a1 + mov a3, a2 + mov a4, a3 + mov a5, a4 + /* Load the remaining possible args (up to 11) from the stack. */ + ldq a5,0(sp) + ldq t0,8(sp) + ldq t1,16(sp) + ldq t2,24(sp) + ldq t3,32(sp) + ldq t4,40(sp) + call_pal op_chmk + RET + .end syscall From 9bcfb9b9bc2cca2baf08303eab0b0729508c8088 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 10 Nov 1994 04:41:19 +0000 Subject: [PATCH 0444/4487] Initial revision --- sysdeps/mach/alpha/sysdep.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 sysdeps/mach/alpha/sysdep.h diff --git a/sysdeps/mach/alpha/sysdep.h b/sysdeps/mach/alpha/sysdep.h new file mode 100644 index 0000000000..9c54850b5e --- /dev/null +++ b/sysdeps/mach/alpha/sysdep.h @@ -0,0 +1,32 @@ +/* Copyright (C) 1991, 1992, 1993, 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#define MOVE(x,y) mov x, y + +#define LOSE asm volatile ("call_pal 0") /* halt */ + +/* XXX SNARF_ARGS */ + +#define CALL_WITH_SP(fn, sp) \ + ({ register long int __fn = fn, __sp = (long int) sp; \ + asm volatile ("mov %0,$30; jmp $31, %1; ldgp $29, 0(%1)" \ + : : "r" (__sp), "r" (__fn)); }) + +#define STACK_GROWTH_DOWN + +#include_next From 18b0df639cea6905b235650bd7e31e5b2f540f61 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 10 Nov 1994 09:29:41 +0000 Subject: [PATCH 0445/4487] Formerly ./mach/hurd/alpha/trampoline.c.~2~ --- sysdeps/mach/hurd/alpha/trampoline.c | 61 ++++++++++++++++++---------- 1 file changed, 40 insertions(+), 21 deletions(-) diff --git a/sysdeps/mach/hurd/alpha/trampoline.c b/sysdeps/mach/hurd/alpha/trampoline.c index 575d88d646..fa6a4a5873 100644 --- a/sysdeps/mach/hurd/alpha/trampoline.c +++ b/sysdeps/mach/hurd/alpha/trampoline.c @@ -19,6 +19,7 @@ Cambridge, MA 02139, USA. */ #include #include "thread_state.h" +#include struct mach_msg_trap_args @@ -54,8 +55,10 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, { memcpy (&state->basic, &ss->context->sc_alpha_thread_state, sizeof (state->basic)); - state->set = (1 << ALPHA_THREAD_STATE); - if (1) /* if fpu used XXX */ + memcpy (&state->exc, &ss->context->sc_alpha_exc_state, + sizeof (state->exc)); + state->set = (1 << ALPHA_THREAD_STATE) | (1 << ALPHA_EXC_STATE); + if (state->exc.used_fpa) { memcpy (&state->fpu, &ss->context->sc_alpha_float_state, sizeof (state->fpu)); @@ -88,7 +91,7 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, per-thread variables, cthreads. */ } else - sigsp = (char *) state->basic.r29; + sigsp = (char *) state->basic.SP; /* Set up the sigcontext structure on the stack. This is all the stack needs, since the args are passed in registers (below). */ @@ -106,7 +109,14 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, memcpy (&scp->sc_alpha_thread_state, &state->basic, sizeof (state->basic)); - if (1 && /* XXX fpu used */ + /* struct sigcontext is laid out so that starting at sc_badvaddr + mimics a struct mips_exc_state. */ + if (! machine_get_state (ss->thread, state, ALPHA_EXC_STATE, + &state->exc, &scp->sc_alpha_exc_state, + sizeof (state->exc))) + return NULL; + + if (state->exc.used_fpa && /* struct sigcontext is laid out so that starting at sc_fpregs mimics a struct alpha_float_state. This state is only meaningful if the coprocessor was used. */ @@ -181,25 +191,27 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, /* This is the entry point when we have an RPC reply message to receive before running the handler. The MACH_MSG_SEND bit has already been cleared in the OPTION argument in our registers. For our convenience, - $3 points to the sc_gpr[1] member of the sigcontext (saved v0 ($2)). */ + at ($28) points to the sc_regs[0] member of the sigcontext (saved v0 + ($0)). */ asm volatile (".set noat; .set noreorder; .set nomacro\n" /* Retry the interrupted mach_msg system call. */ - "ldiq $0, -25\n" /* mach_msg_trap */ - "call_pal PAL_callsys\n" + "lda $0, -25($31)\n" /* mach_msg_trap */ + "call_pal %0\n" /* Magic system call instruction. */ /* When the sigcontext was saved, v0 was MACH_RCV_INTERRUPTED. But now the message receive has completed and the original caller of the RPC (i.e. the code running when the signal arrived) needs to see the final return value of the message receive in v0. So store the new v0 value into the sc_regs[0] member of the sigcontext (whose address is in at to make this code simpler). */ - "stq v0, 0(at)\n" + "stq $0, 0($28)\n" /* Since the argument registers needed to have the mach_msg_trap arguments, we've stored the arguments to the handler function in registers t8..t10 ($22..$24). */ - "mov t8, a0\n" - "mov t9, a1\n" - "mov t10, a2\n"); + "mov $22, $16\n" + "mov $23, $17\n" + "mov $24, $18\n" + : : "i" (op_chmk)); trampoline: /* Entry point for running the handler normally. The arguments to the @@ -208,15 +220,20 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, a0 SIGNO a1 SIGCODE a2 SCP - */ + + t12 also contains SCP; this value is callee-saved (and so should not get + clobbered by running the handler). We use this saved value to pass to + __sigreturn, so the handler can clobber the argument registers if it + likes. */ asm volatile - ("br at, 0f;0: ldgp gp, 0(at)\n" /* Reset GP (???). */ - /* Call the handler function. */ - "jsr ra, ra; ldgp gp, 0(ra)\n" + (/* Call the handler function, saving return address in ra ($26). */ + "jsr $26, $26\n" + /* Reset gp ($29) from the return address (here) in ra ($26). + This may be required to locate __sigreturn. */ + "ldgp $29, 0($26)\n" /* Call __sigreturn (SCP); this cannot return. */ - "mov t12, a0\n" - "jsr ra, %0; ldgp gp, 0(ra)\n" - : : "i" (&__sigreturn)); + "mov $27, $16\n" /* Move saved SCP to argument register. */ + "jmp $31, %0" : : "i" (&__sigreturn)); /* NOTREACHED */ asm volatile (".set reorder; .set at; .set macro"); @@ -225,7 +242,7 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, } /* STATE describes a thread that had intr_port set (meaning it was inside - HURD_EINTR_RPC), after it has been thread_abort'd. It it looks to have + HURD_EINTR_RPC), after it has been thread_abort'd. If it looks to have just completed a mach_msg_trap system call that returned MACH_RCV_INTERRUPTED, return nonzero and set *PORT to the receive right being waited on. */ @@ -236,8 +253,10 @@ _hurdsig_rcv_interrupted_p (struct machine_thread_all_state *state, if (! setjmp (_hurd_sigthread_fault_env)) { const unsigned int *pc = (void *) state->basic.pc; - if (state->basic.r2 == MACH_RCV_INTERRUPTED && - pc[-1] == 0xc) /* XXX ???? syscall */ + if (state->basic.r0 == MACH_RCV_INTERRUPTED && + pc[-1] == ((alpha_instruction) { pal_format: + { opcode: op_pal, + function: op_chmk } }).bits) { /* We did just return from a mach_msg_trap system call doing a message receive that was interrupted. From 7d99e5148d4530c59c9d6bfac4f7d34fd408f835 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 10 Nov 1994 09:58:40 +0000 Subject: [PATCH 0446/4487] entered into RCS --- sysdeps/mach/alpha/machine-lock.h | 83 ++++++++++++++++++++++++++++ sysdeps/mach/alpha/sysdep.h | 11 +++- sysdeps/mach/hurd/alpha/exc2signal.c | 76 +++++++++++++++++++++++++ sysdeps/mach/hurd/alpha/sigcontext.h | 23 +++++--- 4 files changed, 184 insertions(+), 9 deletions(-) create mode 100644 sysdeps/mach/alpha/machine-lock.h create mode 100644 sysdeps/mach/hurd/alpha/exc2signal.c diff --git a/sysdeps/mach/alpha/machine-lock.h b/sysdeps/mach/alpha/machine-lock.h new file mode 100644 index 0000000000..a73b9a0ff8 --- /dev/null +++ b/sysdeps/mach/alpha/machine-lock.h @@ -0,0 +1,83 @@ +/* Machine-specific definition for spin locks. Alpha version. +Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifndef _MACHINE_LOCK_H +#define _MACHINE_LOCK_H + +/* The type of a spin lock variable. */ + +typedef __volatile long int __spin_lock_t; + +/* Value to initialize `__spin_lock_t' variables to. */ + +#define __SPIN_LOCK_INITIALIZER 0L + + +#ifndef _EXTERN_INLINE +#define _EXTERN_INLINE extern __inline +#endif + +/* Unlock LOCK. */ + +_EXTERN_INLINE void +__spin_unlock (__spin_lock_t *__lock) +{ + __asm__ __volatile__ (".set noreorder\n" + "mb; stq $31, %0; mb\n" + ".set reorder" + : "=m" (__lock)); +} + +/* Try to lock LOCK; return nonzero if we locked it, zero if another has. */ + +_EXTERN_INLINE int +__spin_try_lock (register __spin_lock_t *__lock) +{ + register long int __rtn, __tmp; + + do + { + __asm__ __volatile__ (".set noreorder\n" + /* %0 is TMP, %1 is RTN, %2 is LOCK. */ + "mb; ldq_l %0,%2\n" /* Load lock into TMP. */ + "or $31,2,%1\n" /* Locked value in RTN. */ + ".set reorder" + : "=r" (__tmp), "=r" (__rtn) : "m" (__lock)); + if (__tmp) + /* The lock is already taken. */ + return 0; + + /* The lock is not taken; try to get it now. */ + __asm__ __volatile__ ("stq_c %0,%1" : "+r" (__rtn), "+m" (__lock)); + /* RTN is clear if stq_c was interrupted; loop to try the lock again. */ + } while (! __rtn); + /* RTN is now nonzero; we have the lock. */ + return __rtn; +} + +/* Return nonzero if LOCK is locked. */ + +_EXTERN_INLINE int +__spin_lock_locked (__spin_lock_t *__lock) +{ + return *__lock != 0; +} + + +#endif /* machine-lock.h */ diff --git a/sysdeps/mach/alpha/sysdep.h b/sysdeps/mach/alpha/sysdep.h index 9c54850b5e..52efb586ff 100644 --- a/sysdeps/mach/alpha/sysdep.h +++ b/sysdeps/mach/alpha/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994 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,7 +20,14 @@ Cambridge, MA 02139, USA. */ #define LOSE asm volatile ("call_pal 0") /* halt */ -/* XXX SNARF_ARGS */ +#define START_MACHDEP \ + asm ("_start: mov $30, $16\n" /* Put initial SP in a0. */ + " br $27, 1f\n" /* Load GP from PC. */ + "1: ldgp $29, 0($27)\n" + " jmp $26, _start0"); /* Jump to _start0; don't return. */ +#define START_ARGS char **sp +#define SNARF_ARGS(argc, argv, envp) \ + (envp = &(argv = &sp[1])[(argc = *(int *) sp) + 1]) #define CALL_WITH_SP(fn, sp) \ ({ register long int __fn = fn, __sp = (long int) sp; \ diff --git a/sysdeps/mach/hurd/alpha/exc2signal.c b/sysdeps/mach/hurd/alpha/exc2signal.c new file mode 100644 index 0000000000..c67c670214 --- /dev/null +++ b/sysdeps/mach/hurd/alpha/exc2signal.c @@ -0,0 +1,76 @@ +/* Translate Mach exception codes into signal numbers. Alpha version. +Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include + +/* Translate the Mach exception codes, as received in an `exception_raise' RPC, + into a signal number and signal subcode. */ + +void +_hurd_exception2signal (int exception, int code, int subcode, + int *signo, int *sigcode, int *error) +{ + *error = 0; + + switch (exception) + { + default: + *signo = SIGIOT; + *sigcode = exception; + break; + + case EXC_BAD_ACCESS: + if (code == KERN_PROTECTION_FAILURE) + *signo = SIGSEGV; + else + *signo = SIGBUS; + *sigcode = subcode; + *error = code; + break; + + case EXC_BAD_INSTRUCTION: + *signo = SIGILL; + *sigcode = code; + break; + + case EXC_ARITHMETIC: + *signo = SIGFPE; + *sigcode = code; + break; + break; + + case EXC_EMULATION: + /* 3.0 doesn't give this one, why, I don't know. */ + *signo = SIGEMT; + *sigcode = code; + break; + + case EXC_SOFTWARE: + *signo = SIGEMT; + *sigcode = code; + break; + + case EXC_BREAKPOINT: + *signo = SIGTRAP; + *sigcode = code; + break; + } +} diff --git a/sysdeps/mach/hurd/alpha/sigcontext.h b/sysdeps/mach/hurd/alpha/sigcontext.h index 5767e8be4c..2f8dee8274 100644 --- a/sysdeps/mach/hurd/alpha/sigcontext.h +++ b/sysdeps/mach/hurd/alpha/sigcontext.h @@ -25,14 +25,14 @@ struct sigcontext { /* These first members are machine-independent. */ - int sc_onstack; /* Nonzero if running on sigstack. */ + long int sc_onstack; /* Nonzero if running on sigstack. */ sigset_t sc_mask; /* Blocked signals to restore. */ /* MiG reply port this thread is using. */ - unsigned int sc_reply_port; + unsigned long int sc_reply_port; /* Port this thread is doing an interruptible RPC on. */ - unsigned int sc_intr_port; + unsigned long int sc_intr_port; /* Error code associated with this signal (interpreted as `error_t'). */ int sc_error; @@ -41,16 +41,25 @@ struct sigcontext structure is written to be laid out identically to: { struct alpha_thread_state basic; + struct alpha_exc_state exc; struct alpha_float_state fpu; } trampoline.c knows this, so it must be changed if this changes. */ -#define sc_alpha_thread_state sc_gs /* Beginning of correspondence. */ +#define sc_alpha_thread_state sc_regs /* Beginning of correspondence. */ long int sc_regs[31]; /* General registers $0..$30. */ long int sc_pc; /* Program counter. */ - long int sc_ps; /* Processor status. */ - /* struct alpha_float_state */ + /* struct mips_exc_state */ +#define sc_alpha_exc_state sc_badvaddr + unsigned long int sc_badvaddr; + unsigned int sc_cause; /* Machine-level trap code. */ +#define SC_CAUSE_SET_SSTEP 1 + int sc_used_fpa; /* Nonzero if FPU was used. */ + + /* struct alpha_float_state + This is only filled in if sc_used_fpa is nonzero. */ #define sc_alpha_float_state sc_fpregs - long int sc_fpregs[32]; /* Floating point registers $f0..$f31. */ + double sc_fpregs[31]; /* Floating point registers $f0..$f30. */ + long int sc_fpcsr; /* Floating point control/status register. */ }; From ac63472234644bc1eff9bcbc4841f343ead085a2 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 10 Nov 1994 21:53:39 +0000 Subject: [PATCH 0447/4487] (msync): Use __caddr_t instead of caddr_t in decl. --- sysdeps/unix/bsd/sun/sunos4/sys/mman.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h index 0e66416b04..727e665fb6 100644 --- a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h +++ b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h @@ -95,7 +95,7 @@ int mprotect __P ((__caddr_t __addr, size_t __len, int __prot)); /* Synchronize the region starting at ADDR and extending LEN bytes with the file it maps. Filesystem operations on a file being mapped are unpredictable before this is done. */ -int msync __P ((caddr_t __addr, size_t __len, int __flags)); +int msync __P ((__caddr_t __addr, size_t __len, int __flags)); /* Advise the system about particular usage patterns the program follows for the region starting at ADDR and extending LEN bytes. */ From 8e576015fbb5d3d86dfec6c32e8d52a66e653b63 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 15 Nov 1994 06:48:25 +0000 Subject: [PATCH 0448/4487] entered into RCS --- sysdeps/mach/hurd/alpha/trampoline.c | 1 - sysdeps/standalone/i386/Dist | 1 + .../standalone/i386/force_cpu386/brdinit.c | 2 +- .../standalone/i386/force_cpu386/console.c | 2 +- sysdeps/standalone/i386/i386.h | 327 ++++++++++++++++++ sysdeps/standalone/i960/nindy960/brdinit.c | 2 +- sysdeps/standalone/i960/nindy960/console.c | 2 +- .../standalone/m68k/m68020/mvme136/_exit.c | 2 +- .../standalone/m68k/m68020/mvme136/brdinit.c | 2 +- .../standalone/m68k/m68020/mvme136/console.c | 2 +- 10 files changed, 335 insertions(+), 8 deletions(-) create mode 100644 sysdeps/standalone/i386/Dist create mode 100644 sysdeps/standalone/i386/i386.h diff --git a/sysdeps/mach/hurd/alpha/trampoline.c b/sysdeps/mach/hurd/alpha/trampoline.c index fa6a4a5873..730439f32c 100644 --- a/sysdeps/mach/hurd/alpha/trampoline.c +++ b/sysdeps/mach/hurd/alpha/trampoline.c @@ -41,7 +41,6 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, int rpc_wait, struct machine_thread_all_state *state) { - __label__ trampoline, rpc_wait_trampoline; void *sigsp; struct sigcontext *scp; diff --git a/sysdeps/standalone/i386/Dist b/sysdeps/standalone/i386/Dist new file mode 100644 index 0000000000..98d13be9af --- /dev/null +++ b/sysdeps/standalone/i386/Dist @@ -0,0 +1 @@ +i386.h diff --git a/sysdeps/standalone/i386/force_cpu386/brdinit.c b/sysdeps/standalone/i386/force_cpu386/brdinit.c index 46b5691d0b..0d27218121 100644 --- a/sysdeps/standalone/i386/force_cpu386/brdinit.c +++ b/sysdeps/standalone/i386/force_cpu386/brdinit.c @@ -21,7 +21,7 @@ Cambridge, MA 02139, USA. */ #include #include -#include "__i386.h" +#include "i386.h" /* _Board_Initialize() diff --git a/sysdeps/standalone/i386/force_cpu386/console.c b/sysdeps/standalone/i386/force_cpu386/console.c index a9d05d35fc..5d56f768ea 100644 --- a/sysdeps/standalone/i386/force_cpu386/console.c +++ b/sysdeps/standalone/i386/force_cpu386/console.c @@ -21,7 +21,7 @@ Cambridge, MA 02139, USA. */ #include #include -#include "__i386.h" +#include "i386.h" /* Console IO routines for a FORCE CPU386 board. */ diff --git a/sysdeps/standalone/i386/i386.h b/sysdeps/standalone/i386/i386.h new file mode 100644 index 0000000000..8302773709 --- /dev/null +++ b/sysdeps/standalone/i386/i386.h @@ -0,0 +1,327 @@ +/* Copyright (C) 1994 Free Software Foundation, Inc. + Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), + On-Line Applications Research Corporation. + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* i386.h + * + * This file contains macros which are used to access i80386 + * registers which are not addressable by C. This file contains + * functions which are useful to those developing target + * specific support routines. + */ + +#ifndef i386_h__ +#define i386_h__ + +typedef unsigned char unsigned8; +typedef unsigned short unsigned16; +typedef unsigned int unsigned32; + +#define disable_intr( isrlevel ) \ + { (isrlevel) = 0; \ + asm volatile ( "pushf ; \ + pop %0 ; \ + cli " \ + : "=r" ((isrlevel)) : "0" ((isrlevel)) ); \ + } + + +#define enable_intr( isrlevel ) \ + { asm volatile ( "push %0 ; \ + popf " \ + : "=r" ((isrlevel)) : "0" ((isrlevel)) ); \ + } + +#define delay( _microseconds ) \ + { \ + unsigned32 _counter; \ + \ + _counter = (_microseconds); \ + \ + asm volatile ( "0: nop;" \ + " mov %0,%0 ;" \ + " loop 0" : "=c" (_counter) \ + : "0" (_counter) \ + ); \ + \ + } + +/* segment access functions */ + +static inline unsigned16 get_cs() +{ + register unsigned16 segment = 0; + + asm volatile ( "movw %%cs,%0" : "=r" (segment) : "0" (segment) ); + + return segment; +} + +static inline unsigned16 get_ds() +{ + register unsigned16 segment = 0; + + asm volatile ( "movw %%ds,%0" : "=r" (segment) : "0" (segment) ); + + return segment; +} + +static inline unsigned16 get_es() +{ + register unsigned16 segment = 0; + + asm volatile ( "movw %%es,%0" : "=r" (segment) : "0" (segment) ); + + return segment; +} + +static inline unsigned16 get_ss() +{ + register unsigned16 segment = 0; + + asm volatile ( "movw %%ss,%0" : "=r" (segment) : "0" (segment) ); + + return segment; +} + +static inline unsigned16 get_fs() +{ + register unsigned16 segment = 0; + + asm volatile ( "movw %%fs,%0" : "=r" (segment) : "0" (segment) ); + + return segment; +} + +static inline unsigned16 get_gs() +{ + register unsigned16 segment = 0; + + asm volatile ( "movw %%gs,%0" : "=r" (segment) : "0" (segment) ); + + return segment; +} + +/* i80x86 I/O instructions */ + +#define outport_byte( _port, _value ) \ + { register unsigned16 __port = _port; \ + register unsigned8 __value = _value; \ + \ + asm volatile ( "outb %0,%1" : "=a" (__value), "=d" (__port) \ + : "0" (__value), "1" (__port) \ + ); \ + } + +#define outport_word( _port, _value ) \ + { register unsigned16 __port = _port; \ + register unsigned16 __value = _value; \ + \ + asm volatile ( "outw %0,%1" : "=a" (__value), "=d" (__port) \ + : "0" (__value), "1" (__port) \ + ); \ + } + +#define outport_long( _port, _value ) \ + { register unsigned16 __port = _port; \ + register unsigned32 __value = _value; \ + \ + asm volatile ( "outl %0,%1" : "=a" (__value), "=d" (__port) \ + : "0" (__value), "1" (__port) \ + ); \ + } + +#define inport_byte( _port, _value ) \ + { register unsigned16 __port = _port; \ + register unsigned8 __value = 0; \ + \ + asm volatile ( "inb %1,%0" : "=a" (__value), "=d" (__port) \ + : "0" (__value), "1" (__port) \ + ); \ + _value = __value; \ + } + +#define inport_word( _port, _value ) \ + { register unsigned16 __port = _port; \ + register unsigned16 __value = 0; \ + \ + asm volatile ( "inw %1,%0" : "=a" (__value), "=d" (__port) \ + : "0" (__value), "1" (__port) \ + ); \ + _value = __value; \ + } + +#define inport_long( _port, _value ) \ + { register unsigned16 __port = _port; \ + register unsigned32 __value = 0; \ + \ + asm volatile ( "inl %1,%0" : "=a" (__value), "=d" (__port) \ + : "0" (__value), "1" (__port) \ + ); \ + _value = __value; \ + } + +/* structures */ + +/* See Chapter 5 - Memory Management in i386 manual */ + +struct GDT_slot { + unsigned16 limit_0_15; + unsigned16 base_0_15; + unsigned8 base_16_23; + unsigned8 type_dt_dpl_p; + unsigned8 limit_16_19_granularity; + unsigned8 base_24_31; +}; + +/* See Chapter 9 - Exceptions and Interrupts in i386 manual + * + * NOTE: This is the IDT entry for interrupt gates ONLY. + */ + +struct IDT_slot { + unsigned16 offset_0_15; + unsigned16 segment_selector; + unsigned8 reserved; + unsigned8 p_dpl; + unsigned16 offset_16_31; +}; + +struct DTR_load_save_format { + unsigned16 limit; + unsigned32 physical_address; +}; + +/* variables */ + +extern struct IDT_slot Interrupt_descriptor_table[ 256 ]; +extern struct GDT_slot Global_descriptor_table[ 8192 ]; + +/* functions */ + +#ifdef CPU_INITIALIZE +#define EXTERN +#else +#undef EXTERN +#define EXTERN extern +#endif + +void *Logical_to_physical( + unsigned16 segment, + void *address +); + +void *Physical_to_logical( + unsigned16 segment, + void *address +); + +/* complicated static inline functions */ + +#define get_GDTR( _gdtr_address ) \ + { \ + void *_gdtr = (_gdtr_address); \ + \ + asm volatile( "sgdt (%0)" : "=r" (_gdtr) : "0" (_gdtr) ); \ + } + +#define get_GDT_slot( _gdtr_base, _segment, _slot_address ) \ + { \ + register unsigned32 _gdt_slot = (_gdtr_base) + (_segment); \ + register volatile void *_slot = (_slot_address); \ + register unsigned32 _temporary = 0; \ + \ + asm volatile( "movl %%gs:(%0),%1 ; \ + movl %1,(%2) ; \ + movl %%gs:4(%0),%1 ; \ + movl %1,4(%2)" \ + : "=r" (_gdt_slot), "=r" (_temporary), "=r" (_slot) \ + : "0" (_gdt_slot), "1" (_temporary), "2" (_slot) \ + ); \ + } + +#define set_GDT_slot( _gdtr_base, _segment, _slot_address ) \ + { \ + register unsigned32 _gdt_slot = (_gdtr_base) + (_segment); \ + register volatile void *_slot = (_slot_address); \ + register unsigned32 _temporary = 0; \ + \ + asm volatile( "movl (%2),%1 ; \ + movl %1,%%gs:(%0) ; \ + movl 4(%2),%1 ; \ + movl %1,%%gs:4(%0) \ + " \ + : "=r" (_gdt_slot), "=r" (_temporary), "=r" (_slot) \ + : "0" (_gdt_slot), "1" (_temporary), "2" (_slot) \ + ); \ + } + +static inline void set_segment( + unsigned16 segment, + unsigned32 base, + unsigned32 limit +) +{ + struct DTR_load_save_format gdtr; + volatile struct GDT_slot Gdt_slot; + volatile struct GDT_slot *gdt_slot = &Gdt_slot; + unsigned16 tmp_segment = 0; + unsigned32 limit_adjusted; + + + /* load physical address of the GDT */ + + get_GDTR( &gdtr ); + + gdt_slot->type_dt_dpl_p = 0x92; /* present, dpl=0, */ + /* application=1, */ + /* type=data read/write */ + gdt_slot->limit_16_19_granularity = 0x40; /* 32 bit segment */ + + limit_adjusted = limit; + if ( limit > 4095 ) { + gdt_slot->limit_16_19_granularity |= 0x80; /* set granularity bit */ + limit_adjusted /= 4096; + } + + gdt_slot->limit_16_19_granularity |= (limit_adjusted >> 16) & 0xff; + gdt_slot->limit_0_15 = limit_adjusted & 0xffff; + + gdt_slot->base_0_15 = base & 0xffff; + gdt_slot->base_16_23 = (base >> 16) & 0xff; + gdt_slot->base_24_31 = (base >> 24); + + set_GDT_slot( gdtr.physical_address, segment, gdt_slot ); + + /* Now, reload all segment registers so the limit takes effect. */ + + asm volatile( "movw %%ds,%0 ; movw %0,%%ds + movw %%es,%0 ; movw %0,%%es + movw %%fs,%0 ; movw %0,%%fs + movw %%gs,%0 ; movw %0,%%gs + movw %%ss,%0 ; movw %0,%%ss" + : "=r" (tmp_segment) + : "0" (tmp_segment) + ); + +} + +#endif +/* end of include file */ diff --git a/sysdeps/standalone/i960/nindy960/brdinit.c b/sysdeps/standalone/i960/nindy960/brdinit.c index a59c97c0ca..c16adcd390 100644 --- a/sysdeps/standalone/i960/nindy960/brdinit.c +++ b/sysdeps/standalone/i960/nindy960/brdinit.c @@ -21,7 +21,7 @@ Cambridge, MA 02139, USA. */ #include #include -#include "__i960ca.h" +#include "i960ca.h" /* _Board_Initialize() diff --git a/sysdeps/standalone/i960/nindy960/console.c b/sysdeps/standalone/i960/nindy960/console.c index fcdaade26b..821514458a 100644 --- a/sysdeps/standalone/i960/nindy960/console.c +++ b/sysdeps/standalone/i960/nindy960/console.c @@ -21,7 +21,7 @@ Cambridge, MA 02139, USA. */ #include #include -#include "__i960ca.h" +#include "i960ca.h" /* Console IO routines for a NINDY960 board. */ diff --git a/sysdeps/standalone/m68k/m68020/mvme136/_exit.c b/sysdeps/standalone/m68k/m68020/mvme136/_exit.c index 2deecaa157..d13b4d9770 100644 --- a/sysdeps/standalone/m68k/m68020/mvme136/_exit.c +++ b/sysdeps/standalone/m68k/m68020/mvme136/_exit.c @@ -22,7 +22,7 @@ Cambridge, MA 02139, USA. */ #include #include #include -#include "__m68020.h" +#include "m68020.h" /* Return control to 135Bug */ diff --git a/sysdeps/standalone/m68k/m68020/mvme136/brdinit.c b/sysdeps/standalone/m68k/m68020/mvme136/brdinit.c index 55c28d4f89..0c4801a49b 100644 --- a/sysdeps/standalone/m68k/m68020/mvme136/brdinit.c +++ b/sysdeps/standalone/m68k/m68020/mvme136/brdinit.c @@ -21,7 +21,7 @@ Cambridge, MA 02139, USA. */ #include #include -#include "__m68020.h" +#include "m68020.h" /* _Board_Initialize() diff --git a/sysdeps/standalone/m68k/m68020/mvme136/console.c b/sysdeps/standalone/m68k/m68020/mvme136/console.c index 7c1cd41e7c..159070bab9 100644 --- a/sysdeps/standalone/m68k/m68020/mvme136/console.c +++ b/sysdeps/standalone/m68k/m68020/mvme136/console.c @@ -21,7 +21,7 @@ Cambridge, MA 02139, USA. */ #include #include -#include "__m68020.h" +#include "m68020.h" /* Console IO routines for a Motorola MVME135/MVME136 board. From dae2877c9ec505d9ed260f824bd43da78bba8e06 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 15 Nov 1994 06:55:45 +0000 Subject: [PATCH 0449/4487] (divrem rule): Make the output unwritable, use mv -f. --- sysdeps/alpha/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile index 5490776da6..4ea38941cc 100644 --- a/sysdeps/alpha/Makefile +++ b/sysdeps/alpha/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1993 Free Software Foundation, Inc. +# Copyright (C) 1993, 1994 Free Software Foundation, Inc. # Contributed by Brendan Kehoe (brendan@zen.org). # The GNU C Library is free software; you can redistribute it and/or @@ -88,4 +88,6 @@ $(divrem:%=$(sysdep_dir)/alpha/%.S): $(sysdep_dir)/alpha/divrem.m4 $(sysdep_dir) define(SYSDEP_DIR, \`$(sysdep_dir)/alpha')\ /* This file is generated from divrem.m4; DO NOT EDIT! */"; \ cat $<) | $(M4) > $@-tmp - mv $@-tmp $@ +# Make it unwritable so noone will edit it by mistake. + -chmod a-w $@-tmp + mv -f $@-tmp $@ From 0044b03ec3f17547a87b4371e8e97260c9a83ea9 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 15 Nov 1994 07:01:18 +0000 Subject: [PATCH 0450/4487] Initial revision --- sysdeps/unix/sysv/sysv4/Makefile | 37 +++++++++++++++++++++++++++++ sysdeps/unix/sysv/sysv4/__getpgid.c | 31 ++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/Makefile create mode 100644 sysdeps/unix/sysv/sysv4/__getpgid.c diff --git a/sysdeps/unix/sysv/sysv4/Makefile b/sysdeps/unix/sysv/sysv4/Makefile new file mode 100644 index 0000000000..d44214b580 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/Makefile @@ -0,0 +1,37 @@ +# Copyright (C) 1992, 1993 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 Library General Public License +# as published by the Free Software Foundation; either version 2 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 +# Library General Public License for more details. + +# You should have received a copy of the GNU Library General Public +# License along with the GNU C Library; see the file COPYING.LIB. If +# not, write to the Free Software Foundation, Inc., 675 Mass Ave, +# Cambridge, MA 02139, USA. + +ifeq ($(subdir),posix) + +sysdep_routines := $(sysdep_routines) sysconfig pgrpsys \ + __getpgid __setpgid __waitid + +endif + + +ifeq ($(subdir),signal) + +sysdep_routines := $(sysdep_routines) sys-sig + +endif + +ifeq ($(subdir),misc) + +sysdep_routines := $(sysdep_routines) sysinfo + +endif diff --git a/sysdeps/unix/sysv/sysv4/__getpgid.c b/sysdeps/unix/sysv/sysv4/__getpgid.c new file mode 100644 index 0000000000..76a6e80f59 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/__getpgid.c @@ -0,0 +1,31 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include + +extern int __pgrpsys __P ((int type, ...)); + +/* Get the process group ID of process PID. */ +int +DEFUN(__getpgid, (pid), pid_t pid) +{ + return __pgrpsys (4, pid); +} From cef89fdba9ac9b35d0666fc5bca905967084823f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 15 Nov 1994 10:39:12 +0000 Subject: [PATCH 0451/4487] Initial revision --- sysdeps/mach/hurd/alpha/sigreturn.c | 222 ++++++++++++++++++++++++++++ 1 file changed, 222 insertions(+) create mode 100644 sysdeps/mach/hurd/alpha/sigreturn.c diff --git a/sysdeps/mach/hurd/alpha/sigreturn.c b/sysdeps/mach/hurd/alpha/sigreturn.c new file mode 100644 index 0000000000..37f36b6b11 --- /dev/null +++ b/sysdeps/mach/hurd/alpha/sigreturn.c @@ -0,0 +1,222 @@ +/* Return from signal handler in GNU C library for Hurd. Alpha version. +Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Declare global register variables before any code. */ +register double f0 asm ("$f0"); +register double f1 asm ("$f1"); +register double f2 asm ("$f2"); +register double f3 asm ("$f3"); +register double f4 asm ("$f4"); +register double f5 asm ("$f5"); +register double f6 asm ("$f6"); +register double f7 asm ("$f7"); +register double f8 asm ("$f8"); +register double f9 asm ("$f9"); +register double f10 asm ("$f10"); +register double f11 asm ("$f11"); +register double f12 asm ("$f12"); +register double f13 asm ("$f13"); +register double f14 asm ("$f14"); +register double f15 asm ("$f15"); +register double f16 asm ("$f16"); +register double f17 asm ("$f17"); +register double f18 asm ("$f18"); +register double f19 asm ("$f19"); +register double f20 asm ("$f20"); +register double f21 asm ("$f21"); +register double f22 asm ("$f22"); +register double f23 asm ("$f23"); +register double f24 asm ("$f24"); +register double f25 asm ("$f25"); +register double f26 asm ("$f26"); +register double f27 asm ("$f27"); +register double f28 asm ("$f28"); +register double f29 asm ("$f29"); +register double f30 asm ("$f30");; + +#include +#include +#include +#include + +int +__sigreturn (struct sigcontext *scp) +{ + struct hurd_sigstate *ss; + mach_port_t *reply_port; + + if (scp == NULL || (scp->sc_mask & _SIG_CANT_MASK)) + { + errno = EINVAL; + return -1; + } + + ss = _hurd_self_sigstate (); /* SS->lock now locked. */ + + /* Restore the set of blocked signals, and the intr_port slot. */ + ss->blocked = scp->sc_mask; + ss->intr_port = scp->sc_intr_port; + + /* Check for pending signals that were blocked by the old set. */ + if (ss->pending & ~ss->blocked) + { + /* There are pending signals that just became unblocked. Wake up the + signal thread to deliver them. But first, squirrel away SCP where + the signal thread will notice it if it runs another handler, and + arrange to have us called over again in the new reality. */ + ss->context = scp; + /* Clear the intr_port slot, since we are not in fact doing + an interruptible RPC right now. If SS->intr_port is not null, + the SCP context is doing an interruptible RPC, but the signal + thread will examine us while we are blocked in the sig_post RPC. */ + ss->intr_port = MACH_PORT_NULL; + __mutex_unlock (&ss->lock); + __sig_post (_hurd_msgport, 0, __mach_task_self ()); + /* If a pending signal was handled, sig_post never returned. */ + __mutex_lock (&ss->lock); + } + + if (scp->sc_onstack) + { + ss->sigaltstack.ss_flags &= ~SA_ONSTACK; /* XXX threadvars */ + /* XXX cannot unlock until off sigstack */ + abort (); + } + else + __mutex_unlock (&ss->lock); + + /* Destroy the MiG reply port used by the signal handler, and restore the + reply port in use by the thread when interrupted. */ + reply_port = + (mach_port_t *) __hurd_threadvar_location (_HURD_THREADVAR_MIG_REPLY); + if (*reply_port) + __mach_port_destroy (__mach_task_self (), *reply_port); + *reply_port = scp->sc_reply_port; + + if (scp->sc_used_fpa) + { + /* Restore FPU state. */ + + /* Restore the floating-point control/status register. + We must do this first because the compiler will need + a temporary FP register for the load. */ + asm volatile ("mt_fpcr %0" : : "f" (scp->sc_fpcsr)); + + /* Restore floating-point registers. */ + f0 = scp->sc_fpregs[0]; + f1 = scp->sc_fpregs[1]; + f2 = scp->sc_fpregs[2]; + f3 = scp->sc_fpregs[3]; + f4 = scp->sc_fpregs[4]; + f5 = scp->sc_fpregs[5]; + f6 = scp->sc_fpregs[6]; + f7 = scp->sc_fpregs[7]; + f8 = scp->sc_fpregs[8]; + f9 = scp->sc_fpregs[9]; + f10 = scp->sc_fpregs[10]; + f11 = scp->sc_fpregs[11]; + f12 = scp->sc_fpregs[12]; + f13 = scp->sc_fpregs[13]; + f14 = scp->sc_fpregs[14]; + f15 = scp->sc_fpregs[15]; + f16 = scp->sc_fpregs[16]; + f17 = scp->sc_fpregs[17]; + f18 = scp->sc_fpregs[18]; + f19 = scp->sc_fpregs[19]; + f20 = scp->sc_fpregs[20]; + f21 = scp->sc_fpregs[21]; + f22 = scp->sc_fpregs[22]; + f23 = scp->sc_fpregs[23]; + f24 = scp->sc_fpregs[24]; + f25 = scp->sc_fpregs[25]; + f26 = scp->sc_fpregs[26]; + f27 = scp->sc_fpregs[27]; + f28 = scp->sc_fpregs[28]; + f29 = scp->sc_fpregs[29]; + f30 = scp->sc_fpregs[30]; + } + + /* Load all the registers from the sigcontext. */ +#define restore_gpr(n) \ + asm volatile ("ldq $" #n ",%0" : : "m" (scpreg->sc_gpr[n])) + + { + /* The `rei' PAL pseudo-instruction restores registers $2..$7, + the PC and processor status. So we can use these few registers + for our working variables. */ + register const struct sigcontext *const scpreg asm ("$2") = scp; + register long int *sp asm ("$30"); + + asm volatile (".set noreorder; .set noat;"); + + /* Restore the other general registers. */ + restore_gpr (1); + restore_gpr (8); + restore_gpr (9); + restore_gpr (10); + restore_gpr (11); + restore_gpr (12); + restore_gpr (13); + restore_gpr (14); + restore_gpr (15); + restore_gpr (16); + restore_gpr (17); + restore_gpr (18); + restore_gpr (19); + restore_gpr (20); + restore_gpr (21); + restore_gpr (22); + restore_gpr (23); + restore_gpr (24); + restore_gpr (25); + restore_gpr (26); + restore_gpr (27); + restore_gpr (28); + restore_gpr (29); + restore_gpr (30); /* Stack pointer. */ + + /* The magical `rei' instruction looks at the SP ($30) for: + + sp--> t1 ($2) + +0x8 t2 ($3) + +0x10 t3 ($4) + +0x18 t4 ($5) + +0x20 t5 ($6) + +0x28 t6 ($7) + +0x30 PC + +0x38 PS + + For the first six words, &scp->sc_regs[2] already looks like this. + So we clobber the following words words where $8 and $9 were saved + (we already restored them above) with the PC and PS to be restored, + and then point the SP there. */ + + scpreg->sc_regs[8] = scpreg->sc_pc; + /* scpreg->sc_regs[9] = scpreg->sc_ps; XXX where to get it from??? */ + + /* XXX What will restore the user's SP??? */ + sp = &scpreg->sc_regs[2]; + asm volatile ("call_pal %0" : : "i" (op_rei)); + + asm volatile (".set reorder; .set at;"); + } + + /* NOTREACHED */ + return -1; +} From e8a261b3fcf78bcce4e13092319bb81a9b9c7e4e Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 17 Nov 1994 01:59:01 +0000 Subject: [PATCH 0452/4487] [__motorola__]: Swap operands in cmp.l. --- sysdeps/unix/bsd/m68k/sysdep.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/bsd/m68k/sysdep.S b/sysdeps/unix/bsd/m68k/sysdep.S index 95136bbdbb..cef8990eea 100644 --- a/sysdeps/unix/bsd/m68k/sysdep.S +++ b/sysdeps/unix/bsd/m68k/sysdep.S @@ -26,7 +26,7 @@ syscall_error: EWOULDBLOCK_sys is the original number. */ #ifdef __motorola__ #if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN - cmp.l d0, #EWOULDBLOCK_sys + cmp.l #EWOULDBLOCK_sys, d0 bne store moveq.l #EAGAIN, d0 #endif From 239291e1db1333a99d06d58965144436d7816948 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 22 Nov 1994 22:29:25 +0000 Subject: [PATCH 0453/4487] (struct sigcontext): Use `__sigset_t' instead of `sigset_t' for `sc_mask'. --- sysdeps/mach/hurd/alpha/sigcontext.h | 2 +- sysdeps/mach/hurd/mips/sigcontext.h | 2 +- sysdeps/unix/bsd/sun/m68k/sigcontext.h | 4 ++-- sysdeps/unix/bsd/sun/sparc/sigcontext.h | 4 ++-- sysdeps/unix/bsd/ultrix4/mips/sigcontext.h | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sysdeps/mach/hurd/alpha/sigcontext.h b/sysdeps/mach/hurd/alpha/sigcontext.h index 2f8dee8274..85feda2a64 100644 --- a/sysdeps/mach/hurd/alpha/sigcontext.h +++ b/sysdeps/mach/hurd/alpha/sigcontext.h @@ -26,7 +26,7 @@ struct sigcontext /* These first members are machine-independent. */ long int sc_onstack; /* Nonzero if running on sigstack. */ - sigset_t sc_mask; /* Blocked signals to restore. */ + __sigset_t sc_mask; /* Blocked signals to restore. */ /* MiG reply port this thread is using. */ unsigned long int sc_reply_port; diff --git a/sysdeps/mach/hurd/mips/sigcontext.h b/sysdeps/mach/hurd/mips/sigcontext.h index 37922361f6..81d1f25f25 100644 --- a/sysdeps/mach/hurd/mips/sigcontext.h +++ b/sysdeps/mach/hurd/mips/sigcontext.h @@ -25,7 +25,7 @@ struct sigcontext /* These first members are machine-independent. */ int sc_onstack; /* Nonzero if running on sigstack. */ - sigset_t sc_mask; /* Blocked signals to restore. */ + __sigset_t sc_mask; /* Blocked signals to restore. */ /* MiG reply port this thread is using. */ unsigned int sc_reply_port; diff --git a/sysdeps/unix/bsd/sun/m68k/sigcontext.h b/sysdeps/unix/bsd/sun/m68k/sigcontext.h index 926c44f69c..471b516bdc 100644 --- a/sysdeps/unix/bsd/sun/m68k/sigcontext.h +++ b/sysdeps/unix/bsd/sun/m68k/sigcontext.h @@ -1,5 +1,5 @@ /* Structure describing state saved while handling a signal. Sun 3 version. -Copyright (C) 1993 Free Software Foundation, Inc. +Copyright (C) 1993, 1994 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,7 +20,7 @@ Cambridge, MA 02139, USA. */ struct sigcontext { int sc_onstack; - sigset_t sc_mask; + __sigset_t sc_mask; int sc_sp, sc_pc, sc_ps; }; diff --git a/sysdeps/unix/bsd/sun/sparc/sigcontext.h b/sysdeps/unix/bsd/sun/sparc/sigcontext.h index 4834f2ff9e..290bf817af 100644 --- a/sysdeps/unix/bsd/sun/sparc/sigcontext.h +++ b/sysdeps/unix/bsd/sun/sparc/sigcontext.h @@ -1,5 +1,5 @@ /* Structure describing state saved while handling a signal. Sparc version. -Copyright (C) 1992 Free Software Foundation, Inc. +Copyright (C) 1992, 1994 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,7 +20,7 @@ Cambridge, MA 02139, USA. */ struct sigcontext { int sc_onstack; - sigset_t sc_mask; + __sigset_t sc_mask; #define SPARC_MAXREGWINDOW 31 /* Maximum usable register windows. */ int sc_sp, sc_pc, sc_npc, sc_psr, sc_g1, sc_o0; diff --git a/sysdeps/unix/bsd/ultrix4/mips/sigcontext.h b/sysdeps/unix/bsd/ultrix4/mips/sigcontext.h index 107d2fc5f6..4bddcf2f4b 100644 --- a/sysdeps/unix/bsd/ultrix4/mips/sigcontext.h +++ b/sysdeps/unix/bsd/ultrix4/mips/sigcontext.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1994 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -24,7 +24,7 @@ struct sigcontext int sc_onstack; /* Signal mask to restore. */ - sigset_t sc_mask; + __sigset_t sc_mask; /* Program counter when the signal hit. */ __ptr_t sc_pc; From d2d635a9db4f100676e8224a82d5c5db0ac57c31 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 3 Dec 1994 00:31:14 +0000 Subject: [PATCH 0454/4487] Fix typo `.global' to `.globl'. --- sysdeps/unix/sysv/sco3.2.4/sigaction.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/sco3.2.4/sigaction.S b/sysdeps/unix/sysv/sco3.2.4/sigaction.S index 17ae6e7484..f5453da4cf 100644 --- a/sysdeps/unix/sysv/sco3.2.4/sigaction.S +++ b/sysdeps/unix/sysv/sco3.2.4/sigaction.S @@ -18,7 +18,7 @@ Cambridge, MA 02139, USA. */ #include -.global C_SYMBOL_NAME(__sigreturn) +.globl C_SYMBOL_NAME(__sigreturn) ENTRY (__sigaction) movl $C_SYMBOL_NAME(__sigreturn), %ecx From 39edbfd9c8e84e0fe2a700c932dc48b0cdfc70a2 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 3 Dec 1994 13:57:03 +0000 Subject: [PATCH 0455/4487] (sigcontext ): Fixed typo. --- sysdeps/mach/hurd/alpha/sigcontext.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/mach/hurd/alpha/sigcontext.h b/sysdeps/mach/hurd/alpha/sigcontext.h index 85feda2a64..32e0c94f98 100644 --- a/sysdeps/mach/hurd/alpha/sigcontext.h +++ b/sysdeps/mach/hurd/alpha/sigcontext.h @@ -50,7 +50,7 @@ struct sigcontext long int sc_regs[31]; /* General registers $0..$30. */ long int sc_pc; /* Program counter. */ - /* struct mips_exc_state */ + /* struct alpha_exc_state */ #define sc_alpha_exc_state sc_badvaddr unsigned long int sc_badvaddr; unsigned int sc_cause; /* Machine-level trap code. */ From 5c87d70ba0acb34548c43934949306b684c98938 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 3 Dec 1994 14:00:08 +0000 Subject: [PATCH 0456/4487] Set up frame for `rei' to restore on user stack, aligned to an 8-word boundary and with a PS value that restores user's stack alignment. --- sysdeps/mach/hurd/alpha/sigreturn.c | 80 ++++++++++++++++++----------- 1 file changed, 50 insertions(+), 30 deletions(-) diff --git a/sysdeps/mach/hurd/alpha/sigreturn.c b/sysdeps/mach/hurd/alpha/sigreturn.c index 37f36b6b11..6ef718c864 100644 --- a/sysdeps/mach/hurd/alpha/sigreturn.c +++ b/sysdeps/mach/hurd/alpha/sigreturn.c @@ -154,18 +154,54 @@ __sigreturn (struct sigcontext *scp) /* Load all the registers from the sigcontext. */ #define restore_gpr(n) \ - asm volatile ("ldq $" #n ",%0" : : "m" (scpreg->sc_gpr[n])) + asm volatile ("ldq $" #n ",%0" : : "m" (scpreg->sc_regs[n])) { - /* The `rei' PAL pseudo-instruction restores registers $2..$7, - the PC and processor status. So we can use these few registers - for our working variables. */ + /* The `rei' PAL pseudo-instruction restores registers $2..$7, the PC + and processor status. So we can use these few registers for our + working variables. Unfortunately, it finds its data on the stack + and merely pops the SP ($30) over the words of state restored, + allowing no other option for the new SP value. So we must push the + registers and PSW it will to restore, onto the user's stack and let + it pop them from there. */ register const struct sigcontext *const scpreg asm ("$2") = scp; - register long int *sp asm ("$30"); + register integer_t *usp asm ("$3") = scpreg->sc_regs[30]; + register integer_t usp_align asm ("$4"); + register integer_t *sp asm ("$30"); + + /* Push an 8-word "trap frame" onto the user stack for `rei': + registers $2..$7, the PC, and the PSW. */ + + register struct rei_frame + { + integer_t regs[5], pc, ps; + } *rei_frame asm ("$5"); + + usp -= 8; + /* `rei' demands that the stack be aligned to a 64 byte (8 word) + boundary; bits 61..56 of the PSW are OR'd back into the SP value + after popping the 8-word trap frame, so we store (sp % 64) + there and this restores the original user SP. */ + usp_align = (integer_t) usp & 63L; + rei_frame = (void *) ((integer_t) usp & ~63L); + + /* Copy the registers and PC from the sigcontext. */ + memcpy (rei_frame->regs, &scpreg->sc_regs[2], sizeof rei_frame->regs); + rei_frame->pc = scpreg->sc_pc; + + /* Compute the new PS value to be restored. `rei' adds the value at + bits 61..56 to the SP to compensate for the alignment above that + cleared the low 6 bits; bits 5..3 are the new mode/privilege level + (must be >= current mode; 3 == user mode); bits 2..0 are "software", + unused by the processor or kernel (XXX should trampoline save these? + How?); in user mode, `rei' demands that all other bits be zero. */ + rei_frame->ps = (usp_align << 56) | (3 << 3); /* XXX low 3 bits??? */ asm volatile (".set noreorder; .set noat;"); - /* Restore the other general registers. */ + /* Restore the other general registers: everything except $2..$7, which + are in the `rei' trap frame we set up above, and $30, which is the + SP which is popped by `rei'. */ restore_gpr (1); restore_gpr (8); restore_gpr (9); @@ -189,30 +225,14 @@ __sigreturn (struct sigcontext *scp) restore_gpr (27); restore_gpr (28); restore_gpr (29); - restore_gpr (30); /* Stack pointer. */ - - /* The magical `rei' instruction looks at the SP ($30) for: - - sp--> t1 ($2) - +0x8 t2 ($3) - +0x10 t3 ($4) - +0x18 t4 ($5) - +0x20 t5 ($6) - +0x28 t6 ($7) - +0x30 PC - +0x38 PS - - For the first six words, &scp->sc_regs[2] already looks like this. - So we clobber the following words words where $8 and $9 were saved - (we already restored them above) with the PC and PS to be restored, - and then point the SP there. */ - - scpreg->sc_regs[8] = scpreg->sc_pc; - /* scpreg->sc_regs[9] = scpreg->sc_ps; XXX where to get it from??? */ - - /* XXX What will restore the user's SP??? */ - sp = &scpreg->sc_regs[2]; - asm volatile ("call_pal %0" : : "i" (op_rei)); + + /* Switch the stack pointer to the trap frame set up on + the user stack and do the magical `rei' PAL call. */ + asm volatile ("mov %0, $30\n" + "call_pal %0" + : : "r" (rei_frame), "i" (op_rei)); + /* Firewall. */ + asm volatile ("call_pal %0" : : "i" (op_halt)); asm volatile (".set reorder; .set at;"); } From 1f58923f3c7fc2cb0dc823f3cf1c55773f759318 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 4 Dec 1994 17:53:34 +0000 Subject: [PATCH 0457/4487] Implement __sigsetjmp instead of __setjmp; call __sigjmp_save. --- sysdeps/m68k/setjmp.c | 18 +++++++----------- sysdeps/vax/setjmp.c | 16 +++++++--------- 2 files changed, 14 insertions(+), 20 deletions(-) diff --git a/sysdeps/m68k/setjmp.c b/sysdeps/m68k/setjmp.c index 66695b8afb..acb831e655 100644 --- a/sysdeps/m68k/setjmp.c +++ b/sysdeps/m68k/setjmp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1994 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 @@ -16,27 +16,23 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include - -#ifndef __GNUC__ - #error This file uses GNU C extensions; you must compile with GCC. -#endif - - /* Save the current program position in ENV and return 0. */ int -DEFUN(__setjmp, (env), jmp_buf env) +__sigsetjmp (jmp_buf env, int savemask) { /* Save data registers D1 through D7. */ - asm volatile("movem%.l d1-d7, %0" : : "m" (env[0].__dregs[0])); + asm volatile ("movem%.l d1-d7, %0" : : "m" (env[0].__dregs[0])); /* Save return address in place of register A0. */ env[0].__aregs[0] = (PTR) ((PTR *) &env)[-1]; /* Save address registers A1 through A5. */ - asm volatile("movem%.l a1-a5, %0" : : "m" (env[0].__aregs[1])); + asm volatile ("movem%.l a1-a5, %0" : : "m" (env[0].__aregs[1])); + + /* Save the signal mask if requested. */ + __sigjmp_save (env, savemask); /* Save caller's FP, not our own. */ env[0].__fp = (PTR) ((PTR *) &env)[-2]; diff --git a/sysdeps/vax/setjmp.c b/sysdeps/vax/setjmp.c index 0124ae3df5..a3a71c16c0 100644 --- a/sysdeps/vax/setjmp.c +++ b/sysdeps/vax/setjmp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc. Derived from @(#)_setjmp.s 5.7 (Berkeley) 6/27/88, Copyright (c) 1980 Regents of the University of California. @@ -17,21 +17,19 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include -#ifndef __GNUC__ - #error This file uses GNU C extensions; you must compile with GCC. -#endif - /* Save the current program position in ENV and return 0. */ int -DEFUN(__setjmp, (env), jmp_buf env) +__sigsetjmp (jmp_buf env, int savemask) { /* Save our caller's FP and PC. */ - asm("movl 12(fp), %0" : "=g" (env[0].__fp)); - asm("movl 16(fp), %0" : "=g" (env[0].__pc)); + asm ("movl 12(fp), %0" : "=g" (env[0].__fp)); + asm ("movl 16(fp), %0" : "=g" (env[0].__pc)); + + /* Save the signal mask if requested. */ + __sigjmp_save (env, savemask); return 0; } From 75ab5314ea5afee291baaca0fa3a5d309cd0c6a6 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 4 Dec 1994 18:00:25 +0000 Subject: [PATCH 0458/4487] Implement __sigsetjmp_aux instead of __setjmp_aux; call __sigjmp_save. --- sysdeps/mips/setjmp_aux.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/sysdeps/mips/setjmp_aux.c b/sysdeps/mips/setjmp_aux.c index 3a3ed208c1..3d0ea14352 100644 --- a/sysdeps/mips/setjmp_aux.c +++ b/sysdeps/mips/setjmp_aux.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1994 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -16,20 +16,15 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include -#ifndef __GNUC__ - #error This file uses GNU C extensions; you must compile with GCC. -#endif - /* This function is only called via the assembly language routine __setjmp, which arranges to pass in the stack pointer and the frame pointer. We do things this way because it's difficult to reliably access them in C. */ int -DEFUN(__setjmp_aux, (env, sp, fp), __jmp_buf env AND int sp AND int fp) +__sigsetjmp_aux (jmp_buf env, int savemask, int sp, int fp) { /* Store the floating point callee-saved registers... */ asm volatile ("s.d $f20, %0" : : "m" (env[0].__fpregs[0])); @@ -62,8 +57,10 @@ DEFUN(__setjmp_aux, (env, sp, fp), __jmp_buf env AND int sp AND int fp) asm volatile ("sw $23, %0" : : "m" (env[0].__regs[7])); /* .. and finally get and reconstruct the floating point csr. */ - asm volatile ("cfc1 $2, $31"); - asm volatile ("sw $2, %0" : : "m" (env[0].__fpc_csr)); + asm ("cfc1 %0, $31" : "=r" (env[0].__fpc_csr)); + + /* Save the signal mask if requested. */ + __sigjmp_save (env, savemask); return 0; } From 0df328ab41f20c4bffd03c911703907e04ddf608 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 4 Dec 1994 18:00:48 +0000 Subject: [PATCH 0459/4487] Comment fix. --- sysdeps/mips/setjmp_aux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/mips/setjmp_aux.c b/sysdeps/mips/setjmp_aux.c index 3d0ea14352..ee2d20977d 100644 --- a/sysdeps/mips/setjmp_aux.c +++ b/sysdeps/mips/setjmp_aux.c @@ -19,7 +19,7 @@ Cambridge, MA 02139, USA. */ #include /* This function is only called via the assembly language routine - __setjmp, which arranges to pass in the stack pointer and the frame + __sigsetjmp, which arranges to pass in the stack pointer and the frame pointer. We do things this way because it's difficult to reliably access them in C. */ From e5eb42c5555850c121b614c3433916b6dff0b2c3 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 4 Dec 1994 18:07:13 +0000 Subject: [PATCH 0460/4487] Implement __sigsetjmp instead of __setjmp; call __sigsetjmp_aux instead of __setjmp_aux. --- sysdeps/alpha/setjmp.S | 12 ++++++------ sysdeps/mips/setjmp.S | 7 +++---- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S index 3880d0ffdf..50d75ff859 100644 --- a/sysdeps/alpha/setjmp.S +++ b/sysdeps/alpha/setjmp.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1994 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 @@ -18,12 +18,12 @@ Cambridge, MA 02139, USA. */ #include -/* The function __setjmp_aux saves all the registers, but it can't +/* The function __sigsetjmp_aux saves all the registers, but it can't reliably access the stack or frame pointers, so we pass them in as extra arguments. */ -ENTRY (__setjmp) - lda $27, __setjmp_aux /* Load address to jump to. */ +ENTRY (__sigsetjmp) + lda $27, __sigsetjmp_aux/* Load address to jump to. */ bis $15, $15, $17 /* Pass FP as 2nd arg. */ bis $30, $30, $18 /* Pass SP as 3nd arg. */ - jmp $31, ($27), __setjmp_aux /* Call __setjmp_aux. */ - .end __setjmp + jmp $31, ($27), __sigsetjmp_aux /* Call __sigsetjmp_aux. */ + .end __sigsetjmp diff --git a/sysdeps/mips/setjmp.S b/sysdeps/mips/setjmp.S index 485811e350..fc61e34706 100644 --- a/sysdeps/mips/setjmp.S +++ b/sysdeps/mips/setjmp.S @@ -18,15 +18,14 @@ Cambridge, MA 02139, USA. */ #include -/* The function __setjmp_aux saves all the registers, but it can't +/* The function __sigsetjmp_aux saves all the registers, but it can't reliably access the stack or frame pointers, so we pass them in as extra arguments. */ -ENTRY (__setjmp) +ENTRY (__sigsetjmp) move a1, sp #ifdef __sgi__ move a2, fp #else move a2, $fp #endif - j __setjmp_aux - + j __sigsetjmp_aux From 3adc78aced7e0a3caf6c5521a5737f39df3af8c1 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 4 Dec 1994 18:08:19 +0000 Subject: [PATCH 0461/4487] Implement __sigsetjmp_aux instead of __setjmp_aux; call __sigjmp_save. --- sysdeps/alpha/setjmp_aux.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/sysdeps/alpha/setjmp_aux.c b/sysdeps/alpha/setjmp_aux.c index 9a67a6b799..031c5a56db 100644 --- a/sysdeps/alpha/setjmp_aux.c +++ b/sysdeps/alpha/setjmp_aux.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1994 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 @@ -16,13 +16,7 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/*#include */ -#include "jmp_buf.h" -#define jmp_buf __jmp_buf - -#ifndef __GNUC__ -#error This file uses GNU C extensions; you must compile with GCC. -#endif +/* Global register decls must come before any function defn. */ register long int r9 asm ("$9"), r10 asm ("$10"), r11 asm ("$11"), r12 asm ("$12"), @@ -36,9 +30,13 @@ register double f6 asm ("$f6"), f7 asm ("$f7"), f8 asm ("$f8"), f9 asm ("$f9"); #endif + +#include + + /* Save the current program position in ENV and return 0. */ int -__setjmp_aux (jmp_buf env, long int *sp, long int *fp) +__sigsetjmp_aux (sigjmp_buf env, int savemask, long int *sp, long int *fp) { /* Save the integer registers. */ env[0].__9 = r9; @@ -63,11 +61,14 @@ __setjmp_aux (jmp_buf env, long int *sp, long int *fp) /* Save the return address of our caller, where longjmp will jump to. */ env[0].__pc = retpc; - /* Save the FP and SP of our caller. The __setjmp entry point - simply puts these in the argument register for us to fetch. */ + /* Save the FP and SP of our caller. The __sigsetjmp entry point + simply puts these in the argument registers for us to fetch. */ env[0].__fp = fp; env[0].__sp = sp; - /* Return to the original caller of __setjmp. */ + /* Save the signal mask if requested. */ + __sigjmp_save (env, savemask); + + /* Return to the original caller of __sigsetjmp. */ return 0; } From 876f191f7f9a7380a53bf0262ed7b5140df0523a Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 4 Dec 1994 18:09:25 +0000 Subject: [PATCH 0462/4487] Pass FP and SP as 3rd and 4th args, not 2nd and 3rd. --- sysdeps/alpha/setjmp.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S index 50d75ff859..08932ccd1a 100644 --- a/sysdeps/alpha/setjmp.S +++ b/sysdeps/alpha/setjmp.S @@ -23,7 +23,7 @@ Cambridge, MA 02139, USA. */ extra arguments. */ ENTRY (__sigsetjmp) lda $27, __sigsetjmp_aux/* Load address to jump to. */ - bis $15, $15, $17 /* Pass FP as 2nd arg. */ - bis $30, $30, $18 /* Pass SP as 3nd arg. */ + bis $15, $15, $18 /* Pass FP as 3rd arg. */ + bis $30, $30, $19 /* Pass SP as 4th arg. */ jmp $31, ($27), __sigsetjmp_aux /* Call __sigsetjmp_aux. */ .end __sigsetjmp From 97f187ac88943a87b582507495f1f9e9b9334b51 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 4 Dec 1994 18:10:46 +0000 Subject: [PATCH 0463/4487] Pass SP and FP as 3rd and 4th args, not 2nd and 3rd. --- sysdeps/mips/setjmp.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/mips/setjmp.S b/sysdeps/mips/setjmp.S index fc61e34706..b3c0247468 100644 --- a/sysdeps/mips/setjmp.S +++ b/sysdeps/mips/setjmp.S @@ -22,10 +22,10 @@ Cambridge, MA 02139, USA. */ reliably access the stack or frame pointers, so we pass them in as extra arguments. */ ENTRY (__sigsetjmp) - move a1, sp + move a2, sp #ifdef __sgi__ - move a2, fp + move a3, fp #else - move a2, $fp + move a3, $fp #endif j __sigsetjmp_aux From 65377bcaa1cc419d3c547dc7241acfc5313ccdbe Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 4 Dec 1994 18:14:36 +0000 Subject: [PATCH 0464/4487] Initial revision --- sysdeps/alpha/bsd-_setjmp.S | 30 ++++++++++++++++++++++++++++ sysdeps/alpha/bsd-setjmp.S | 30 ++++++++++++++++++++++++++++ sysdeps/m68k/bsd-_setjmp.S | 39 +++++++++++++++++++++++++++++++++++++ sysdeps/m68k/bsd-setjmp.S | 39 +++++++++++++++++++++++++++++++++++++ sysdeps/mips/bsd-_setjmp.S | 28 ++++++++++++++++++++++++++ sysdeps/mips/bsd-setjmp.S | 28 ++++++++++++++++++++++++++ sysdeps/vax/bsd-_setjmp.S | 32 ++++++++++++++++++++++++++++++ sysdeps/vax/bsd-setjmp.S | 32 ++++++++++++++++++++++++++++++ 8 files changed, 258 insertions(+) create mode 100644 sysdeps/alpha/bsd-_setjmp.S create mode 100644 sysdeps/alpha/bsd-setjmp.S create mode 100644 sysdeps/m68k/bsd-_setjmp.S create mode 100644 sysdeps/m68k/bsd-setjmp.S create mode 100644 sysdeps/mips/bsd-_setjmp.S create mode 100644 sysdeps/mips/bsd-setjmp.S create mode 100644 sysdeps/vax/bsd-_setjmp.S create mode 100644 sysdeps/vax/bsd-setjmp.S diff --git a/sysdeps/alpha/bsd-_setjmp.S b/sysdeps/alpha/bsd-_setjmp.S new file mode 100644 index 0000000000..9947d8f45a --- /dev/null +++ b/sysdeps/alpha/bsd-_setjmp.S @@ -0,0 +1,30 @@ +/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. Alpha version. +Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* This just does a tail-call to `__sigsetjmp (ARG, 0)'. + We cannot do it in C because it must be a tail-call, so frame-unwinding + in setjmp doesn't clobber the state restored by longjmp. */ + +#include + +ENTRY (setjmp) + lda $27, __sigsetjmp /* Load address to jump to. */ + bis $31, $31, $17 /* Pass a second argument of zero. */ + jmp $31, ($27), __sigsetjmp /* Call __sigsetjmp. */ + .end setjmp diff --git a/sysdeps/alpha/bsd-setjmp.S b/sysdeps/alpha/bsd-setjmp.S new file mode 100644 index 0000000000..b6f00ce99f --- /dev/null +++ b/sysdeps/alpha/bsd-setjmp.S @@ -0,0 +1,30 @@ +/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. Alpha version. +Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* This just does a tail-call to `__sigsetjmp (ARG, 1)'. + We cannot do it in C because it must be a tail-call, so frame-unwinding + in setjmp doesn't clobber the state restored by longjmp. */ + +#include + +ENTRY (setjmp) + lda $27, __sigsetjmp /* Load address to jump to. */ + bis 1, $31, $17 /* Pass a second argument of one. */ + jmp $31, ($27), __sigsetjmp /* Call __sigsetjmp. */ + .end setjmp diff --git a/sysdeps/m68k/bsd-_setjmp.S b/sysdeps/m68k/bsd-_setjmp.S new file mode 100644 index 0000000000..5525534536 --- /dev/null +++ b/sysdeps/m68k/bsd-_setjmp.S @@ -0,0 +1,39 @@ +/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. m68k version. +Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* This just does a tail-call to `__sigsetjmp (ARG, 0)'. + We cannot do it in C because it must be a tail-call, so frame-unwinding + in setjmp doesn't clobber the state restored by longjmp. */ + +#include + +#ifdef MOTOROLA_SYNTAX +#define d0 %d0 +#define d1 %d1 +#define popl pop.l +#define pushl push.l +#endif + +ENTRY (_setjmp) + popl d0 /* Pop return PC. */ + popl d1 /* Pop jmp_buf argument. */ + pushl #0 /* Push second argument of zero. */ + pushl d1 /* Push back first argument. */ + pushl d0 /* Push back return PC. */ + jmp C_SYMBOL_NAME (__sigsetjmp) diff --git a/sysdeps/m68k/bsd-setjmp.S b/sysdeps/m68k/bsd-setjmp.S new file mode 100644 index 0000000000..52c8e2b88f --- /dev/null +++ b/sysdeps/m68k/bsd-setjmp.S @@ -0,0 +1,39 @@ +/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. m68k version. +Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* This just does a tail-call to `__sigsetjmp (ARG, 1)'. + We cannot do it in C because it must be a tail-call, so frame-unwinding + in setjmp doesn't clobber the state restored by longjmp. */ + +#include + +#ifdef MOTOROLA_SYNTAX +#define d0 %d0 +#define d1 %d1 +#define popl pop.l +#define pushl push.l +#endif + +ENTRY (setjmp) + popl d0 /* Pop return PC. */ + popl d1 /* Pop jmp_buf argument. */ + pushl #1 /* Push second argument of one. */ + pushl d1 /* Push back first argument. */ + pushl d0 /* Push back return PC. */ + jmp C_SYMBOL_NAME (__sigsetjmp) diff --git a/sysdeps/mips/bsd-_setjmp.S b/sysdeps/mips/bsd-_setjmp.S new file mode 100644 index 0000000000..b0f2e8d064 --- /dev/null +++ b/sysdeps/mips/bsd-_setjmp.S @@ -0,0 +1,28 @@ +/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. MIPS version. +Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* This just does a tail-call to `__sigsetjmp (ARG, 0)'. + We cannot do it in C because it must be a tail-call, so frame-unwinding + in setjmp doesn't clobber the state restored by longjmp. */ + +#include + +ENTRY (setjmp) + j C_SYMBOL_NAME (__sigsetjmp) + move a1, zero /* Pass a second argument of zero. */ diff --git a/sysdeps/mips/bsd-setjmp.S b/sysdeps/mips/bsd-setjmp.S new file mode 100644 index 0000000000..103edd3a7c --- /dev/null +++ b/sysdeps/mips/bsd-setjmp.S @@ -0,0 +1,28 @@ +/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. MIPS version. +Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* This just does a tail-call to `__sigsetjmp (ARG, 1)'. + We cannot do it in C because it must be a tail-call, so frame-unwinding + in setjmp doesn't clobber the state restored by longjmp. */ + +#include + +ENTRY (setjmp) + j C_SYMBOL_NAME (__sigsetjmp) + move a1, 1 /* Pass a second argument of one. */ diff --git a/sysdeps/vax/bsd-_setjmp.S b/sysdeps/vax/bsd-_setjmp.S new file mode 100644 index 0000000000..039fd71fdb --- /dev/null +++ b/sysdeps/vax/bsd-_setjmp.S @@ -0,0 +1,32 @@ +/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. Vax version. +Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* This just does a tail-call to `__sigsetjmp (ARG, 0)'. + We cannot do it in C because it must be a tail-call, so frame-unwinding + in setjmp doesn't clobber the state restored by longjmp. */ + +#include + +ENTRY (setjmp) + popl r0 /* Pop return PC. */ + popl r1 /* Pop jmp_buf argument. */ + pushl $0 /* Push second argument of zero. */ + pushl r1 /* Push back first argument. */ + pushl r0 /* Push back return PC. */ + jmp C_SYMBOL_NAME (__sigsetjmp) diff --git a/sysdeps/vax/bsd-setjmp.S b/sysdeps/vax/bsd-setjmp.S new file mode 100644 index 0000000000..379a65c0e5 --- /dev/null +++ b/sysdeps/vax/bsd-setjmp.S @@ -0,0 +1,32 @@ +/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. Vax version. +Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* This just does a tail-call to `__sigsetjmp (ARG, 1)'. + We cannot do it in C because it must be a tail-call, so frame-unwinding + in setjmp doesn't clobber the state restored by longjmp. */ + +#include + +ENTRY (setjmp) + popl r0 /* Pop return PC. */ + popl r1 /* Pop jmp_buf argument. */ + pushl $1 /* Push second argument of one. */ + pushl r1 /* Push back first argument. */ + pushl r0 /* Push back return PC. */ + jmp C_SYMBOL_NAME (__sigsetjmp) From 4afe5be04199079b0f89b6a205e6ba2a4ada044c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 4 Dec 1994 18:46:59 +0000 Subject: [PATCH 0465/4487] Set members in ENV[0].__jmp_buf[0], not ENV[0]. --- sysdeps/m68k/setjmp.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/sysdeps/m68k/setjmp.c b/sysdeps/m68k/setjmp.c index acb831e655..75e06626e6 100644 --- a/sysdeps/m68k/setjmp.c +++ b/sysdeps/m68k/setjmp.c @@ -23,27 +23,26 @@ int __sigsetjmp (jmp_buf env, int savemask) { /* Save data registers D1 through D7. */ - asm volatile ("movem%.l d1-d7, %0" : : "m" (env[0].__dregs[0])); + asm volatile ("movem%.l d1-d7, %0" : : "m" (env[0].__jmp_buf[0].__dregs[0])); /* Save return address in place of register A0. */ - env[0].__aregs[0] = (PTR) ((PTR *) &env)[-1]; + env[0].__jmp_buf[0].__aregs[0] = (PTR) ((PTR *) &env)[-1]; /* Save address registers A1 through A5. */ - asm volatile ("movem%.l a1-a5, %0" : : "m" (env[0].__aregs[1])); - - /* Save the signal mask if requested. */ - __sigjmp_save (env, savemask); + asm volatile ("movem%.l a1-a5, %0" : : "m" (env[0].__jmp_buf[0].__aregs[1])); /* Save caller's FP, not our own. */ - env[0].__fp = (PTR) ((PTR *) &env)[-2]; + env[0].__jmp_buf[0].__fp = ((void **) &env)[-2]; /* Save caller's SP, not our own. */ - env[0].__sp = (PTR) &env; + env[0].__jmp_buf[0].__sp = (void *) &env; #if defined(__HAVE_68881__) || defined(__HAVE_FPU__) /* Save floating-point (68881) registers FP0 through FP7. */ - asm volatile("fmovem%.x fp0-fp7, %0" : : "m" (env[0].__fpregs[0])); + asm volatile ("fmovem%.x fp0-fp7, %0" + : : "m" (env[0].__jmp_buf[0].__fpregs[0])); #endif - return 0; + /* Save the signal mask if requested. */ + return __sigjmp_save (env, savemask); } From fd339eecd8ea8df9224ce380c3fbc791d4eb4379 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 4 Dec 1994 18:48:04 +0000 Subject: [PATCH 0466/4487] (__sigsetjmp): That's __jmpbuf, not __jmp_buf. --- sysdeps/m68k/setjmp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sysdeps/m68k/setjmp.c b/sysdeps/m68k/setjmp.c index 75e06626e6..333c2fa3b9 100644 --- a/sysdeps/m68k/setjmp.c +++ b/sysdeps/m68k/setjmp.c @@ -23,24 +23,24 @@ int __sigsetjmp (jmp_buf env, int savemask) { /* Save data registers D1 through D7. */ - asm volatile ("movem%.l d1-d7, %0" : : "m" (env[0].__jmp_buf[0].__dregs[0])); + asm volatile ("movem%.l d1-d7, %0" : : "m" (env[0].__jmpbuf[0].__dregs[0])); /* Save return address in place of register A0. */ env[0].__jmp_buf[0].__aregs[0] = (PTR) ((PTR *) &env)[-1]; /* Save address registers A1 through A5. */ - asm volatile ("movem%.l a1-a5, %0" : : "m" (env[0].__jmp_buf[0].__aregs[1])); + asm volatile ("movem%.l a1-a5, %0" : : "m" (env[0].__jmpbuf[0].__aregs[1])); /* Save caller's FP, not our own. */ - env[0].__jmp_buf[0].__fp = ((void **) &env)[-2]; + env[0].__jmpbuf[0].__fp = ((void **) &env)[-2]; /* Save caller's SP, not our own. */ - env[0].__jmp_buf[0].__sp = (void *) &env; + env[0].__jmpbuf[0].__sp = (void *) &env; #if defined(__HAVE_68881__) || defined(__HAVE_FPU__) /* Save floating-point (68881) registers FP0 through FP7. */ asm volatile ("fmovem%.x fp0-fp7, %0" - : : "m" (env[0].__jmp_buf[0].__fpregs[0])); + : : "m" (env[0].__jmpbuf[0].__fpregs[0])); #endif /* Save the signal mask if requested. */ From 5b743d860e89c57c4a2f36dff7296a125665e41f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 4 Dec 1994 18:51:22 +0000 Subject: [PATCH 0467/4487] Set members in ENV[0].__jmpbuf[0], not ENV[0]. --- sysdeps/vax/setjmp.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sysdeps/vax/setjmp.c b/sysdeps/vax/setjmp.c index a3a71c16c0..9d711cbfda 100644 --- a/sysdeps/vax/setjmp.c +++ b/sysdeps/vax/setjmp.c @@ -25,11 +25,9 @@ int __sigsetjmp (jmp_buf env, int savemask) { /* Save our caller's FP and PC. */ - asm ("movl 12(fp), %0" : "=g" (env[0].__fp)); - asm ("movl 16(fp), %0" : "=g" (env[0].__pc)); + asm ("movl 12(fp), %0" : "=g" (env[0].__jmpbuf[0].__fp)); + asm ("movl 16(fp), %0" : "=g" (env[0].__jmpbuf[0].__pc)); /* Save the signal mask if requested. */ - __sigjmp_save (env, savemask); - - return 0; + return __sigjmp_save (env, savemask); } From 60074b22a2931c8ef5e25f56b0f250744ee65a49 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 4 Dec 1994 18:56:14 +0000 Subject: [PATCH 0468/4487] (__longjmp): Take arg of type __jmp_buf, not jmp_buf. --- sysdeps/m68k/__longjmp.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/sysdeps/m68k/__longjmp.c b/sysdeps/m68k/__longjmp.c index 3133e70bb3..787281708c 100644 --- a/sysdeps/m68k/__longjmp.c +++ b/sysdeps/m68k/__longjmp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993, 1994 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 @@ -16,19 +16,14 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include #include -#ifndef __GNUC__ - #error This file uses GNU C extensions; you must compile with GCC. -#endif - /* Jump to the position specified by ENV, causing the setjmp call there to return VAL, or 1 if VAL is 0. */ __NORETURN void -DEFUN(__longjmp, (env, val), CONST jmp_buf env AND int val) +__longjmp (__jmp_buf env, int val) { /* This restores the FP and SP that setjmp's caller had, and puts the return address into A0 and VAL into D0. */ From b0a51e539542cd5303361cbf9908b404ea4eb3cc Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 4 Dec 1994 18:57:56 +0000 Subject: [PATCH 0469/4487] (__longjmp): Make arg const. --- sysdeps/m68k/__longjmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/m68k/__longjmp.c b/sysdeps/m68k/__longjmp.c index 787281708c..10e1705f9c 100644 --- a/sysdeps/m68k/__longjmp.c +++ b/sysdeps/m68k/__longjmp.c @@ -23,7 +23,7 @@ Cambridge, MA 02139, USA. */ setjmp call there to return VAL, or 1 if VAL is 0. */ __NORETURN void -__longjmp (__jmp_buf env, int val) +__longjmp (const __jmp_buf env, int val) { /* This restores the FP and SP that setjmp's caller had, and puts the return address into A0 and VAL into D0. */ From 29031a89a27e2637c419333632c36b6de5d5a6d7 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 4 Dec 1994 19:04:45 +0000 Subject: [PATCH 0470/4487] Take arg of type __jmp_buf, not jmp_buf. --- sysdeps/alpha/__longjmp.c | 23 +++++++++-------------- sysdeps/vax/__longjmp.c | 4 ++-- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/sysdeps/alpha/__longjmp.c b/sysdeps/alpha/__longjmp.c index c90f408750..19a2e26696 100644 --- a/sysdeps/alpha/__longjmp.c +++ b/sysdeps/alpha/__longjmp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1994 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 @@ -16,13 +16,7 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifndef __GNUC__ -#error This file uses GNU C extensions; you must compile with GCC. -#endif - -/*#include */ -#include "jmp_buf.h" -#define jmp_buf __jmp_buf +/* Global register vars must come before any function defn. */ register long int r9 asm ("$9"), r10 asm ("$10"), r11 asm ("$11"), r12 asm ("$12"), @@ -36,13 +30,14 @@ register double f6 asm ("$f6"), f7 asm ("$f7"), f8 asm ("$f8"), f9 asm ("$f9"); #endif -/* Jump to the position specified by ENV, causing the - setjmp call there to return VAL, or 1 if VAL is 0. +#include - We declare this function to return an `int'; - in fact, the value being returned is going to the caller of setjmp. */ -volatile void -__longjmp (const jmp_buf env, int val) + +/* Jump to the position specified by ENV, causing the + setjmp call there to return VAL, or 1 if VAL is 0. */ +__NORETURN +void +__longjmp (const __jmp_buf env, int val) { /* Restore the integer registers. */ r9 = env[0].__9; diff --git a/sysdeps/vax/__longjmp.c b/sysdeps/vax/__longjmp.c index fadfae7b28..0ee040ab25 100644 --- a/sysdeps/vax/__longjmp.c +++ b/sysdeps/vax/__longjmp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc. Derived from @(#)_setjmp.s 5.7 (Berkeley) 6/27/88, Copyright (c) 1980 Regents of the University of California. @@ -31,7 +31,7 @@ Cambridge, MA 02139, USA. */ setjmp call there to return VAL, or 1 if VAL is 0. */ __NORETURN void -DEFUN(__longjmp, (env, val), CONST jmp_buf env AND int val) +DEFUN(__longjmp, (env, val), CONST __jmp_buf env AND int val) { register long int *fp asm("fp"); long int *regsave; From eb6741dde4ca67c91c3ceab894953e236d750ea3 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 4 Dec 1994 19:06:52 +0000 Subject: [PATCH 0471/4487] (__sigsetjmp): Fix typo. --- sysdeps/m68k/setjmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/m68k/setjmp.c b/sysdeps/m68k/setjmp.c index 333c2fa3b9..853977eab9 100644 --- a/sysdeps/m68k/setjmp.c +++ b/sysdeps/m68k/setjmp.c @@ -26,7 +26,7 @@ __sigsetjmp (jmp_buf env, int savemask) asm volatile ("movem%.l d1-d7, %0" : : "m" (env[0].__jmpbuf[0].__dregs[0])); /* Save return address in place of register A0. */ - env[0].__jmp_buf[0].__aregs[0] = (PTR) ((PTR *) &env)[-1]; + env[0].__jmpbuf[0].__aregs[0] = ((void **) &env)[-1]; /* Save address registers A1 through A5. */ asm volatile ("movem%.l a1-a5, %0" : : "m" (env[0].__jmpbuf[0].__aregs[1])); From 2782be74517b3cbf69c3d1206d23365bcdc9b04d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 4 Dec 1994 19:08:38 +0000 Subject: [PATCH 0472/4487] Use `movel' for pushes and pops. --- sysdeps/m68k/bsd-_setjmp.S | 17 ++++++++++------- sysdeps/m68k/bsd-setjmp.S | 17 ++++++++++------- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/sysdeps/m68k/bsd-_setjmp.S b/sysdeps/m68k/bsd-_setjmp.S index 5525534536..a0b639306d 100644 --- a/sysdeps/m68k/bsd-_setjmp.S +++ b/sysdeps/m68k/bsd-_setjmp.S @@ -26,14 +26,17 @@ Cambridge, MA 02139, USA. */ #ifdef MOTOROLA_SYNTAX #define d0 %d0 #define d1 %d1 -#define popl pop.l -#define pushl push.l +#define PUSH(reg) move.l reg, -(%esp) +#define POP(reg) move.l (%esp)+, reg +#else +#define PUSH(reg) movel reg, sp@- +#define POP(reg) movel sp@+, reg #endif ENTRY (_setjmp) - popl d0 /* Pop return PC. */ - popl d1 /* Pop jmp_buf argument. */ - pushl #0 /* Push second argument of zero. */ - pushl d1 /* Push back first argument. */ - pushl d0 /* Push back return PC. */ + POP (d0) /* Pop return PC. */ + POP (d1) /* Pop jmp_buf argument. */ + PUSH (#0) /* Push second argument of zero. */ + PUSH (d1) /* Push back first argument. */ + PUSH (d0) /* Push back return PC. */ jmp C_SYMBOL_NAME (__sigsetjmp) diff --git a/sysdeps/m68k/bsd-setjmp.S b/sysdeps/m68k/bsd-setjmp.S index 52c8e2b88f..d218b44279 100644 --- a/sysdeps/m68k/bsd-setjmp.S +++ b/sysdeps/m68k/bsd-setjmp.S @@ -26,14 +26,17 @@ Cambridge, MA 02139, USA. */ #ifdef MOTOROLA_SYNTAX #define d0 %d0 #define d1 %d1 -#define popl pop.l -#define pushl push.l +#define PUSH(reg) move.l reg, -(%esp) +#define POP(reg) move.l (%esp)+, reg +#else +#define PUSH(reg) movel reg, sp@- +#define POP(reg) movel sp@+, reg #endif ENTRY (setjmp) - popl d0 /* Pop return PC. */ - popl d1 /* Pop jmp_buf argument. */ - pushl #1 /* Push second argument of one. */ - pushl d1 /* Push back first argument. */ - pushl d0 /* Push back return PC. */ + POP (d0) /* Pop return PC. */ + POP (d1) /* Pop jmp_buf argument. */ + PUSH (#1) /* Push second argument of one. */ + PUSH (d1) /* Push back first argument. */ + PUSH (d0) /* Push back return PC. */ jmp C_SYMBOL_NAME (__sigsetjmp) From 69edd206e9deff9add4cc1442cd31db2388e9ced Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 5 Dec 1994 17:55:41 +0000 Subject: [PATCH 0473/4487] Use ENV[0].__jmpbuf. --- sysdeps/mach/hurd/mips/longjmp-ts.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/sysdeps/mach/hurd/mips/longjmp-ts.c b/sysdeps/mach/hurd/mips/longjmp-ts.c index e60fdb7e5b..ebf56bdb1c 100644 --- a/sysdeps/mach/hurd/mips/longjmp-ts.c +++ b/sysdeps/mach/hurd/mips/longjmp-ts.c @@ -29,17 +29,17 @@ _hurd_longjmp_thread_state (void *state, jmp_buf env, int val) { struct mips_thread_state *ts = state; - ts->r16 = env[0].__regs[0]; - ts->r17 = env[0].__regs[1]; - ts->r18 = env[0].__regs[2]; - ts->r19 = env[0].__regs[3]; - ts->r20 = env[0].__regs[4]; - ts->r21 = env[0].__regs[5]; - ts->r22 = env[0].__regs[6]; - ts->r23 = env[0].__regs[7]; - ts->r28 = (int) env[0].__gp; - ts->r29 = (int) env[0].__sp; - ts->r30 = (int) env[0].__fp; - ts->pc = (int) env[0].__pc; + ts->r16 = env[0].__jmpbuf.__regs[0]; + ts->r17 = env[0].__jmpbuf.__regs[1]; + ts->r18 = env[0].__jmpbuf.__regs[2]; + ts->r19 = env[0].__jmpbuf.__regs[3]; + ts->r20 = env[0].__jmpbuf.__regs[4]; + ts->r21 = env[0].__jmpbuf.__regs[5]; + ts->r22 = env[0].__jmpbuf.__regs[6]; + ts->r23 = env[0].__jmpbuf.__regs[7]; + ts->r28 = (int) env[0].__jmpbuf.__gp; + ts->r29 = (int) env[0].__jmpbuf.__sp; + ts->r30 = (int) env[0].__jmpbuf.__fp; + ts->pc = (int) env[0].__jmpbuf.__pc; ts->r2 = val ?: 1; } From ccd1325bd5bdf9cccae2e8c10d2f756a02d3d777 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 5 Dec 1994 17:57:43 +0000 Subject: [PATCH 0474/4487] Use ENV[0].__jmpbuf[0]. --- sysdeps/mach/hurd/alpha/longjmp-ts.c | 16 ++++++++-------- sysdeps/mach/hurd/mips/longjmp-ts.c | 24 ++++++++++++------------ 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/sysdeps/mach/hurd/alpha/longjmp-ts.c b/sysdeps/mach/hurd/alpha/longjmp-ts.c index 8ee2b9a814..ad6f80cdb0 100644 --- a/sysdeps/mach/hurd/alpha/longjmp-ts.c +++ b/sysdeps/mach/hurd/alpha/longjmp-ts.c @@ -29,13 +29,13 @@ _hurd_longjmp_thread_state (void *state, jmp_buf env, int val) { struct alpha_thread_state *ts = state; - ts->r9 = env[0].__9; - ts->r11 = env[0].__11; - ts->r12 = env[0].__12; - ts->r13 = env[0].__13; - ts->r14 = env[0].__14; - ts->r15 = (long int) env[0].__fp; - ts->r30 = (long int) env[0].__sp; - ts->pc = (long int) env[0].__pc; + ts->r9 = env[0].__jmpbuf[0].__9; + ts->r11 = env[0].__jmpbuf[0].__11; + ts->r12 = env[0].__jmpbuf[0].__12; + ts->r13 = env[0].__jmpbuf[0].__13; + ts->r14 = env[0].__jmpbuf[0].__14; + ts->r15 = (long int) env[0].__jmpbuf[0].__fp; + ts->r30 = (long int) env[0].__jmpbuf[0].__sp; + ts->pc = (long int) env[0].__jmpbuf[0].__pc; ts->r0 = val ?: 1; } diff --git a/sysdeps/mach/hurd/mips/longjmp-ts.c b/sysdeps/mach/hurd/mips/longjmp-ts.c index ebf56bdb1c..980a2ceb94 100644 --- a/sysdeps/mach/hurd/mips/longjmp-ts.c +++ b/sysdeps/mach/hurd/mips/longjmp-ts.c @@ -29,17 +29,17 @@ _hurd_longjmp_thread_state (void *state, jmp_buf env, int val) { struct mips_thread_state *ts = state; - ts->r16 = env[0].__jmpbuf.__regs[0]; - ts->r17 = env[0].__jmpbuf.__regs[1]; - ts->r18 = env[0].__jmpbuf.__regs[2]; - ts->r19 = env[0].__jmpbuf.__regs[3]; - ts->r20 = env[0].__jmpbuf.__regs[4]; - ts->r21 = env[0].__jmpbuf.__regs[5]; - ts->r22 = env[0].__jmpbuf.__regs[6]; - ts->r23 = env[0].__jmpbuf.__regs[7]; - ts->r28 = (int) env[0].__jmpbuf.__gp; - ts->r29 = (int) env[0].__jmpbuf.__sp; - ts->r30 = (int) env[0].__jmpbuf.__fp; - ts->pc = (int) env[0].__jmpbuf.__pc; + ts->r16 = env[0].__jmpbuf[0].__regs[0]; + ts->r17 = env[0].__jmpbuf[0].__regs[1]; + ts->r18 = env[0].__jmpbuf[0].__regs[2]; + ts->r19 = env[0].__jmpbuf[0].__regs[3]; + ts->r20 = env[0].__jmpbuf[0].__regs[4]; + ts->r21 = env[0].__jmpbuf[0].__regs[5]; + ts->r22 = env[0].__jmpbuf[0].__regs[6]; + ts->r23 = env[0].__jmpbuf[0].__regs[7]; + ts->r28 = (int) env[0].__jmpbuf[0].__gp; + ts->r29 = (int) env[0].__jmpbuf[0].__sp; + ts->r30 = (int) env[0].__jmpbuf[0].__fp; + ts->pc = (int) env[0].__jmpbuf[0].__pc; ts->r2 = val ?: 1; } From 5a8d8a2049dc9f61571d31cf95c1d04bc541cfeb Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 7 Dec 1994 20:02:38 +0000 Subject: [PATCH 0475/4487] Initial revision --- sysdeps/mach/mips/Dist | 1 + sysdeps/mach/mips/Makefile | 3 +++ sysdeps/mach/mips/cacheflush.c | 44 ++++++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 sysdeps/mach/mips/Dist create mode 100644 sysdeps/mach/mips/Makefile create mode 100644 sysdeps/mach/mips/cacheflush.c diff --git a/sysdeps/mach/mips/Dist b/sysdeps/mach/mips/Dist new file mode 100644 index 0000000000..f2699bf887 --- /dev/null +++ b/sysdeps/mach/mips/Dist @@ -0,0 +1 @@ +cacheflush.c diff --git a/sysdeps/mach/mips/Makefile b/sysdeps/mach/mips/Makefile new file mode 100644 index 0000000000..a890ae7b46 --- /dev/null +++ b/sysdeps/mach/mips/Makefile @@ -0,0 +1,3 @@ +ifeq ($(subdir),gnulib) +sysdep_routines += cacheflush +endif diff --git a/sysdeps/mach/mips/cacheflush.c b/sysdeps/mach/mips/cacheflush.c new file mode 100644 index 0000000000..5325e6fd1e --- /dev/null +++ b/sysdeps/mach/mips/cacheflush.c @@ -0,0 +1,44 @@ +/* Flush the insn cache after GCC writes a closure on the stack. Mach/MIPS. +Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include + +/* Stupid name, but this is what GCC generates (config/mips/mips.h). */ +void +cacheflush (void *addr, size_t size, int flag) +{ + vm_machine_attribute_val_t val; + + switch (flag) + { + case 0: /* ? */ + val = MATTR_VAL_DCACHE_FLUSH; + case 1: /* This is the only value GCC uses. */ + val = MATTR_VAL_ICACHE_FLUSH; + break; + default: + val = MATTR_VAL_CACHE_FLUSH; + } + + __vm_machine_attribute (__mach_task_self (), + (vm_address_t) addr, size, + MATTR_CACHE, + &val); +} From 89347dc3e90749f32e23baf13800b8c1c5484905 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 8 Dec 1994 19:43:43 +0000 Subject: [PATCH 0476/4487] Remove unused variable. --- sysdeps/mach/hurd/alpha/sigreturn.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sysdeps/mach/hurd/alpha/sigreturn.c b/sysdeps/mach/hurd/alpha/sigreturn.c index 6ef718c864..db6e8732d4 100644 --- a/sysdeps/mach/hurd/alpha/sigreturn.c +++ b/sysdeps/mach/hurd/alpha/sigreturn.c @@ -167,7 +167,6 @@ __sigreturn (struct sigcontext *scp) register const struct sigcontext *const scpreg asm ("$2") = scp; register integer_t *usp asm ("$3") = scpreg->sc_regs[30]; register integer_t usp_align asm ("$4"); - register integer_t *sp asm ("$30"); /* Push an 8-word "trap frame" onto the user stack for `rei': registers $2..$7, the PC, and the PSW. */ From a11dbdebf08a7d0afc1f4e43085b3aeaee07daf9 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 8 Dec 1994 19:45:02 +0000 Subject: [PATCH 0477/4487] Rename variable `sp' to avoid conflict with #define in . --- sysdeps/mach/alpha/sysdep.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/mach/alpha/sysdep.h b/sysdeps/mach/alpha/sysdep.h index 52efb586ff..207fb58865 100644 --- a/sysdeps/mach/alpha/sysdep.h +++ b/sysdeps/mach/alpha/sysdep.h @@ -25,9 +25,9 @@ Cambridge, MA 02139, USA. */ " br $27, 1f\n" /* Load GP from PC. */ "1: ldgp $29, 0($27)\n" " jmp $26, _start0"); /* Jump to _start0; don't return. */ -#define START_ARGS char **sp +#define START_ARGS char **sparg #define SNARF_ARGS(argc, argv, envp) \ - (envp = &(argv = &sp[1])[(argc = *(int *) sp) + 1]) + (envp = &(argv = &sparg[1])[(argc = *(int *) sparg) + 1]) #define CALL_WITH_SP(fn, sp) \ ({ register long int __fn = fn, __sp = (long int) sp; \ From 157aaa4ee6cbe712ff16556596e72fb4bb189112 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 9 Dec 1994 03:42:31 +0000 Subject: [PATCH 0478/4487] Remove ".set noreorder" et al; GCC already emits them. --- sysdeps/mach/hurd/alpha/sigreturn.c | 4 ---- sysdeps/mach/hurd/alpha/trampoline.c | 5 +---- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/sysdeps/mach/hurd/alpha/sigreturn.c b/sysdeps/mach/hurd/alpha/sigreturn.c index db6e8732d4..265a4f7877 100644 --- a/sysdeps/mach/hurd/alpha/sigreturn.c +++ b/sysdeps/mach/hurd/alpha/sigreturn.c @@ -196,8 +196,6 @@ __sigreturn (struct sigcontext *scp) How?); in user mode, `rei' demands that all other bits be zero. */ rei_frame->ps = (usp_align << 56) | (3 << 3); /* XXX low 3 bits??? */ - asm volatile (".set noreorder; .set noat;"); - /* Restore the other general registers: everything except $2..$7, which are in the `rei' trap frame we set up above, and $30, which is the SP which is popped by `rei'. */ @@ -232,8 +230,6 @@ __sigreturn (struct sigcontext *scp) : : "r" (rei_frame), "i" (op_rei)); /* Firewall. */ asm volatile ("call_pal %0" : : "i" (op_halt)); - - asm volatile (".set reorder; .set at;"); } /* NOTREACHED */ diff --git a/sysdeps/mach/hurd/alpha/trampoline.c b/sysdeps/mach/hurd/alpha/trampoline.c index 730439f32c..9b3228467b 100644 --- a/sysdeps/mach/hurd/alpha/trampoline.c +++ b/sysdeps/mach/hurd/alpha/trampoline.c @@ -193,8 +193,7 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, at ($28) points to the sc_regs[0] member of the sigcontext (saved v0 ($0)). */ asm volatile - (".set noat; .set noreorder; .set nomacro\n" - /* Retry the interrupted mach_msg system call. */ + (/* Retry the interrupted mach_msg system call. */ "lda $0, -25($31)\n" /* mach_msg_trap */ "call_pal %0\n" /* Magic system call instruction. */ /* When the sigcontext was saved, v0 was MACH_RCV_INTERRUPTED. But @@ -235,8 +234,6 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, "jmp $31, %0" : : "i" (&__sigreturn)); /* NOTREACHED */ - asm volatile (".set reorder; .set at; .set macro"); - return NULL; } From 946b6e002aa61bf882416bc60670089eaae3093d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 9 Dec 1994 05:05:05 +0000 Subject: [PATCH 0479/4487] Remove ".set noreorder" et al; GCC already emits them. Fix register constraints in asms. Set RTN in C, not asm. --- sysdeps/mach/alpha/machine-lock.h | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/sysdeps/mach/alpha/machine-lock.h b/sysdeps/mach/alpha/machine-lock.h index a73b9a0ff8..42e21d8df2 100644 --- a/sysdeps/mach/alpha/machine-lock.h +++ b/sysdeps/mach/alpha/machine-lock.h @@ -38,9 +38,7 @@ typedef __volatile long int __spin_lock_t; _EXTERN_INLINE void __spin_unlock (__spin_lock_t *__lock) { - __asm__ __volatile__ (".set noreorder\n" - "mb; stq $31, %0; mb\n" - ".set reorder" + __asm__ __volatile__ ("mb; stq $31, %0; mb" : "=m" (__lock)); } @@ -53,18 +51,17 @@ __spin_try_lock (register __spin_lock_t *__lock) do { - __asm__ __volatile__ (".set noreorder\n" - /* %0 is TMP, %1 is RTN, %2 is LOCK. */ - "mb; ldq_l %0,%2\n" /* Load lock into TMP. */ - "or $31,2,%1\n" /* Locked value in RTN. */ - ".set reorder" - : "=r" (__tmp), "=r" (__rtn) : "m" (__lock)); + __asm__ __volatile__ ("mb; ldq_l %0,%1" /* Load lock value into TMP. */ + : "=r" (__tmp) : "m" (*__lock)); + __rtn = 2; /* Load locked value into RTN. */ if (__tmp) /* The lock is already taken. */ return 0; /* The lock is not taken; try to get it now. */ - __asm__ __volatile__ ("stq_c %0,%1" : "+r" (__rtn), "+m" (__lock)); + __asm__ __volatile__ ("stq_c %0,%1" + : "=r" (__rtn), "=m" (*__lock) + : "0" (__rtn), "1" (*__lock)); /* RTN is clear if stq_c was interrupted; loop to try the lock again. */ } while (! __rtn); /* RTN is now nonzero; we have the lock. */ From 8b0538623b8d656064bbc641ad3ff168a43a7c48 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 9 Dec 1994 05:42:09 +0000 Subject: [PATCH 0480/4487] (struct machine_thread_all_state): New member `exc'. --- sysdeps/mach/alpha/thread_state.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/mach/alpha/thread_state.h b/sysdeps/mach/alpha/thread_state.h index 38527df654..28b0a15758 100644 --- a/sysdeps/mach/alpha/thread_state.h +++ b/sysdeps/mach/alpha/thread_state.h @@ -32,6 +32,7 @@ struct machine_thread_all_state { int set; /* Mask of bits (1 << FLAVOR). */ struct alpha_thread_state basic; + struct alpha_exc_state exc; struct alpha_float_state fpu; }; From 60bbd54df8fede3d61060ea620d928d43d51dc20 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 9 Dec 1994 05:47:43 +0000 Subject: [PATCH 0481/4487] (START_MACHDEP): Add missing backslashes. (CALL_WITH_SP): Cast FN to long int. --- sysdeps/mach/alpha/sysdep.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/mach/alpha/sysdep.h b/sysdeps/mach/alpha/sysdep.h index 207fb58865..166c711d5e 100644 --- a/sysdeps/mach/alpha/sysdep.h +++ b/sysdeps/mach/alpha/sysdep.h @@ -21,16 +21,16 @@ Cambridge, MA 02139, USA. */ #define LOSE asm volatile ("call_pal 0") /* halt */ #define START_MACHDEP \ - asm ("_start: mov $30, $16\n" /* Put initial SP in a0. */ - " br $27, 1f\n" /* Load GP from PC. */ - "1: ldgp $29, 0($27)\n" + asm ("_start: mov $30, $16\n" /* Put initial SP in a0. */ \ + " br $27, 1f\n" /* Load GP from PC. */ \ + "1: ldgp $29, 0($27)\n" \ " jmp $26, _start0"); /* Jump to _start0; don't return. */ #define START_ARGS char **sparg #define SNARF_ARGS(argc, argv, envp) \ (envp = &(argv = &sparg[1])[(argc = *(int *) sparg) + 1]) #define CALL_WITH_SP(fn, sp) \ - ({ register long int __fn = fn, __sp = (long int) sp; \ + ({ register long int __fn = (long int) fn, __sp = (long int) sp; \ asm volatile ("mov %0,$30; jmp $31, %1; ldgp $29, 0(%1)" \ : : "r" (__sp), "r" (__fn)); }) From 94b0df52ff816fbb76793f53feb8f296a253bc8f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 9 Dec 1994 06:07:49 +0000 Subject: [PATCH 0482/4487] Initial revision --- sysdeps/mips/mipsel/bytesex.h | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 sysdeps/mips/mipsel/bytesex.h diff --git a/sysdeps/mips/mipsel/bytesex.h b/sysdeps/mips/mipsel/bytesex.h new file mode 100644 index 0000000000..5da5965cb2 --- /dev/null +++ b/sysdeps/mips/mipsel/bytesex.h @@ -0,0 +1,4 @@ +/* The MIPS architecture has selectable endianness. + This file is for a machine using little-endian mode. */ + +#define __BYTE_ORDER __LITTLE_ENDIAN From d73a59163ef705b6112ff18591d55c172cd764ae Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 9 Dec 1994 20:00:58 +0000 Subject: [PATCH 0483/4487] (ENTRY): New macro. --- sysdeps/mach/alpha/sysdep.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/mach/alpha/sysdep.h b/sysdeps/mach/alpha/sysdep.h index 166c711d5e..4ef23ae21b 100644 --- a/sysdeps/mach/alpha/sysdep.h +++ b/sysdeps/mach/alpha/sysdep.h @@ -34,6 +34,8 @@ Cambridge, MA 02139, USA. */ asm volatile ("mov %0,$30; jmp $31, %1; ldgp $29, 0(%1)" \ : : "r" (__sp), "r" (__fn)); }) +#define ENTRY(name) LEAF(name, ***loser no arg count***) + #define STACK_GROWTH_DOWN #include_next From c82ceb0b001b1d40411e2986e74b84be462a906e Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 9 Dec 1994 20:02:05 +0000 Subject: [PATCH 0484/4487] Use ENV[0].__jmpbuf[0]. --- sysdeps/alpha/setjmp_aux.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/sysdeps/alpha/setjmp_aux.c b/sysdeps/alpha/setjmp_aux.c index 031c5a56db..f92517be92 100644 --- a/sysdeps/alpha/setjmp_aux.c +++ b/sysdeps/alpha/setjmp_aux.c @@ -39,32 +39,32 @@ int __sigsetjmp_aux (sigjmp_buf env, int savemask, long int *sp, long int *fp) { /* Save the integer registers. */ - env[0].__9 = r9; - env[0].__10 = r10; - env[0].__11 = r11; - env[0].__12 = r12; - env[0].__13 = r13; - env[0].__14 = r14; + env[0].__jmpbuf[0].__9 = r9; + env[0].__jmpbuf[0].__10 = r10; + env[0].__jmpbuf[0].__11 = r11; + env[0].__jmpbuf[0].__12 = r12; + env[0].__jmpbuf[0].__13 = r13; + env[0].__jmpbuf[0].__14 = r14; #if 1 /* XXX */ /* Save the floating point registers. */ - env[0].__f2 = f2; - env[0].__f3 = f3; - env[0].__f4 = f4; - env[0].__f5 = f5; - env[0].__f6 = f6; - env[0].__f7 = f7; - env[0].__f8 = f8; - env[0].__f9 = f9; + env[0].__jmpbuf[0].__f2 = f2; + env[0].__jmpbuf[0].__f3 = f3; + env[0].__jmpbuf[0].__f4 = f4; + env[0].__jmpbuf[0].__f5 = f5; + env[0].__jmpbuf[0].__f6 = f6; + env[0].__jmpbuf[0].__f7 = f7; + env[0].__jmpbuf[0].__f8 = f8; + env[0].__jmpbuf[0].__f9 = f9; #endif /* Save the return address of our caller, where longjmp will jump to. */ - env[0].__pc = retpc; + env[0].__jmpbuf[0].__pc = retpc; /* Save the FP and SP of our caller. The __sigsetjmp entry point simply puts these in the argument registers for us to fetch. */ - env[0].__fp = fp; - env[0].__sp = sp; + env[0].__jmpbuf[0].__fp = fp; + env[0].__jmpbuf[0].__sp = sp; /* Save the signal mask if requested. */ __sigjmp_save (env, savemask); From b5f9dfd1a18bd46d8f9132b37f034351015bd204 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 9 Dec 1994 20:16:06 +0000 Subject: [PATCH 0485/4487] Remove extra shift and OR of CHARMASK. --- sysdeps/alpha/memchr.c | 3 +-- sysdeps/alpha/strchr.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/sysdeps/alpha/memchr.c b/sysdeps/alpha/memchr.c index c6f99bfd6f..11ff542f25 100644 --- a/sysdeps/alpha/memchr.c +++ b/sysdeps/alpha/memchr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1993 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. 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 @@ -47,7 +47,6 @@ memchr (const void *s, int c, size_t n) charmask = c | (c << 8); charmask |= charmask << 16; charmask |= charmask << 32; - charmask |= charmask << 64; for (;;) { diff --git a/sysdeps/alpha/strchr.c b/sysdeps/alpha/strchr.c index fc56d518cc..666e0c0196 100644 --- a/sysdeps/alpha/strchr.c +++ b/sysdeps/alpha/strchr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1993 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. 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 @@ -43,7 +43,6 @@ strchr (const char *str, int c) charmask = c | (c << 8); charmask |= charmask << 16; charmask |= charmask << 32; - charmask |= charmask << 64; for (;;) { From fa7242a3a97b55aa6ed60fa1ca06a5140f15f48f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 9 Dec 1994 20:24:26 +0000 Subject: [PATCH 0486/4487] Include instead of . Use C comments instead of ! comments. --- sysdeps/alpha/divrem.m4 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sysdeps/alpha/divrem.m4 b/sysdeps/alpha/divrem.m4 index ab86128a16..5942cf447f 100644 --- a/sysdeps/alpha/divrem.m4 +++ b/sysdeps/alpha/divrem.m4 @@ -12,31 +12,31 @@ /* We do not handle div by zero yet. */ #include #endif -#include +#include define(path, `SYSDEP_DIR/macros.m4')dnl include(path) FUNC__(OP) - ! First set up the dividend. + /* First set up the dividend. */ EXTEND(t10) stq t10,0(sp) ldt $f10,0(sp) cvtqt $f10,$f10 ADJQU($f10) - ! Then set up the divisor. + /* Then set up the divisor. */ EXTEND(t11) stq t11,0(sp) ldt $f1,0(sp) cvtqt $f1,$f1 ADJQU($f1) - ! Do the division. + /* Do the division. */ divt $f10,$f1,$f10 cvttqc $f10,$f10 - ! Put the result in t12. + /* Put the result in t12. */ stt $f10,0(sp) ldq t12,0(sp) FULLEXTEND(t12) From 25e6db514e518a465856ebb08712964ce253a237 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 10 Dec 1994 04:41:06 +0000 Subject: [PATCH 0487/4487] Use `long int' for sigcode values. --- sysdeps/mach/hurd/alpha/exc2signal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/mach/hurd/alpha/exc2signal.c b/sysdeps/mach/hurd/alpha/exc2signal.c index c67c670214..edac0aaa67 100644 --- a/sysdeps/mach/hurd/alpha/exc2signal.c +++ b/sysdeps/mach/hurd/alpha/exc2signal.c @@ -26,7 +26,7 @@ Cambridge, MA 02139, USA. */ void _hurd_exception2signal (int exception, int code, int subcode, - int *signo, int *sigcode, int *error) + int *signo, long int *sigcode, int *error) { *error = 0; From d61ce4f4b8a7c0956b0d11bec165ebad0adb943c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 10 Dec 1994 05:17:13 +0000 Subject: [PATCH 0488/4487] Include to define op_chmk. --- sysdeps/mach/alpha/syscall.S | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/mach/alpha/syscall.S b/sysdeps/mach/alpha/syscall.S index 0fd10fa94c..31ccb5fc30 100644 --- a/sysdeps/mach/alpha/syscall.S +++ b/sysdeps/mach/alpha/syscall.S @@ -17,6 +17,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include +#include ENTRY (syscall) .frame sp,0,ra From 079f003a7cb67b07dd5f579c0e8749fe41f26715 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 10 Dec 1994 05:20:47 +0000 Subject: [PATCH 0489/4487] Use C comments instead of ! comments. --- sysdeps/alpha/macros.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/alpha/macros.m4 b/sysdeps/alpha/macros.m4 index 982e705d19..f8c1fe9662 100644 --- a/sysdeps/alpha/macros.m4 +++ b/sysdeps/alpha/macros.m4 @@ -23,7 +23,7 @@ define(ADJQU, define(DOREM, `ifelse(BASEOP, `rem', -` ! Compute the remainder. +` /* Compute the remainder. */ ifelse(SIZE, `l', ` mull t11, t12, t11 subl t10, t11, t12 From 94cd6ef1f80044993be27b59c8c8a376f4b51b9d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 12 Dec 1994 06:41:03 +0000 Subject: [PATCH 0490/4487] Use asms instead of global register vars to restore FP regs. Fix typo in REI invocation. --- sysdeps/mach/hurd/alpha/sigreturn.c | 104 ++++++++++------------------ 1 file changed, 38 insertions(+), 66 deletions(-) diff --git a/sysdeps/mach/hurd/alpha/sigreturn.c b/sysdeps/mach/hurd/alpha/sigreturn.c index 265a4f7877..c178a03435 100644 --- a/sysdeps/mach/hurd/alpha/sigreturn.c +++ b/sysdeps/mach/hurd/alpha/sigreturn.c @@ -17,43 +17,13 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* Declare global register variables before any code. */ -register double f0 asm ("$f0"); -register double f1 asm ("$f1"); -register double f2 asm ("$f2"); -register double f3 asm ("$f3"); -register double f4 asm ("$f4"); -register double f5 asm ("$f5"); -register double f6 asm ("$f6"); -register double f7 asm ("$f7"); -register double f8 asm ("$f8"); -register double f9 asm ("$f9"); -register double f10 asm ("$f10"); -register double f11 asm ("$f11"); -register double f12 asm ("$f12"); -register double f13 asm ("$f13"); -register double f14 asm ("$f14"); -register double f15 asm ("$f15"); -register double f16 asm ("$f16"); -register double f17 asm ("$f17"); -register double f18 asm ("$f18"); -register double f19 asm ("$f19"); -register double f20 asm ("$f20"); -register double f21 asm ("$f21"); -register double f22 asm ("$f22"); -register double f23 asm ("$f23"); -register double f24 asm ("$f24"); -register double f25 asm ("$f25"); -register double f26 asm ("$f26"); -register double f27 asm ("$f27"); -register double f28 asm ("$f28"); -register double f29 asm ("$f29"); -register double f30 asm ("$f30");; - #include #include #include +#include #include +#include +#include int __sigreturn (struct sigcontext *scp) @@ -119,37 +89,39 @@ __sigreturn (struct sigcontext *scp) asm volatile ("mt_fpcr %0" : : "f" (scp->sc_fpcsr)); /* Restore floating-point registers. */ - f0 = scp->sc_fpregs[0]; - f1 = scp->sc_fpregs[1]; - f2 = scp->sc_fpregs[2]; - f3 = scp->sc_fpregs[3]; - f4 = scp->sc_fpregs[4]; - f5 = scp->sc_fpregs[5]; - f6 = scp->sc_fpregs[6]; - f7 = scp->sc_fpregs[7]; - f8 = scp->sc_fpregs[8]; - f9 = scp->sc_fpregs[9]; - f10 = scp->sc_fpregs[10]; - f11 = scp->sc_fpregs[11]; - f12 = scp->sc_fpregs[12]; - f13 = scp->sc_fpregs[13]; - f14 = scp->sc_fpregs[14]; - f15 = scp->sc_fpregs[15]; - f16 = scp->sc_fpregs[16]; - f17 = scp->sc_fpregs[17]; - f18 = scp->sc_fpregs[18]; - f19 = scp->sc_fpregs[19]; - f20 = scp->sc_fpregs[20]; - f21 = scp->sc_fpregs[21]; - f22 = scp->sc_fpregs[22]; - f23 = scp->sc_fpregs[23]; - f24 = scp->sc_fpregs[24]; - f25 = scp->sc_fpregs[25]; - f26 = scp->sc_fpregs[26]; - f27 = scp->sc_fpregs[27]; - f28 = scp->sc_fpregs[28]; - f29 = scp->sc_fpregs[29]; - f30 = scp->sc_fpregs[30]; +#define restore_fpr(n) \ + asm volatile ("ldt $f" #n ",%0" : : "m" (scp->sc_fpregs[n])) + restore_fpr (0); + restore_fpr (1); + restore_fpr (2); + restore_fpr (3); + restore_fpr (4); + restore_fpr (5); + restore_fpr (6); + restore_fpr (7); + restore_fpr (8); + restore_fpr (9); + restore_fpr (10); + restore_fpr (11); + restore_fpr (12); + restore_fpr (13); + restore_fpr (14); + restore_fpr (15); + restore_fpr (16); + restore_fpr (17); + restore_fpr (18); + restore_fpr (19); + restore_fpr (20); + restore_fpr (21); + restore_fpr (22); + restore_fpr (23); + restore_fpr (24); + restore_fpr (25); + restore_fpr (26); + restore_fpr (27); + restore_fpr (28); + restore_fpr (29); + restore_fpr (30); } /* Load all the registers from the sigcontext. */ @@ -165,7 +137,7 @@ __sigreturn (struct sigcontext *scp) registers and PSW it will to restore, onto the user's stack and let it pop them from there. */ register const struct sigcontext *const scpreg asm ("$2") = scp; - register integer_t *usp asm ("$3") = scpreg->sc_regs[30]; + register integer_t *usp asm ("$3") = (integer_t *) scpreg->sc_regs[30]; register integer_t usp_align asm ("$4"); /* Push an 8-word "trap frame" onto the user stack for `rei': @@ -226,7 +198,7 @@ __sigreturn (struct sigcontext *scp) /* Switch the stack pointer to the trap frame set up on the user stack and do the magical `rei' PAL call. */ asm volatile ("mov %0, $30\n" - "call_pal %0" + "call_pal %1" : : "r" (rei_frame), "i" (op_rei)); /* Firewall. */ asm volatile ("call_pal %0" : : "i" (op_halt)); From edae2ab8afe17418d55bf693da3d3af77c7ba5ed Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 12 Dec 1994 06:43:12 +0000 Subject: [PATCH 0491/4487] Use `long int' for sigcode values. Use _hurdsig_catch_fault. Pass address of __sigreturn in $27, SCP value in $25. In trampoline code, use those regs. --- sysdeps/mach/hurd/alpha/trampoline.c | 83 +++++++++++++++++----------- 1 file changed, 51 insertions(+), 32 deletions(-) diff --git a/sysdeps/mach/hurd/alpha/trampoline.c b/sysdeps/mach/hurd/alpha/trampoline.c index 9b3228467b..455aa57c20 100644 --- a/sysdeps/mach/hurd/alpha/trampoline.c +++ b/sysdeps/mach/hurd/alpha/trampoline.c @@ -20,7 +20,8 @@ Cambridge, MA 02139, USA. */ #include #include "thread_state.h" #include - +#include "hurdfault.h" +#include struct mach_msg_trap_args { @@ -37,7 +38,7 @@ struct mach_msg_trap_args struct sigcontext * _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, - int signo, int sigcode, + int signo, long int sigcode, int rpc_wait, struct machine_thread_all_state *state) { @@ -50,7 +51,10 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, /* We have a previous sigcontext that sigreturn was about to restore when another signal arrived. We will just base our setup on that. */ - if (! setjmp (_hurd_sigthread_fault_env)) + if (_hurdsig_catch_fault (SIGSEGV)) + assert (_hurdsig_fault_sigcode >= (long int) ss->context && + _hurdsig_fault_sigcode < (long int) (ss->context + 1)); + else { memcpy (&state->basic, &ss->context->sc_alpha_thread_state, sizeof (state->basic)); @@ -97,7 +101,16 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, sigsp -= sizeof (*scp); scp = sigsp; - if (! setjmp (_hurd_sigthread_fault_env)) + if (_hurdsig_catch_fault (SIGSEGV)) + { + assert (_hurdsig_fault_sigcode >= (long int) scp && + _hurdsig_fault_sigcode < (long int) (scp + 1)); + /* We got a fault trying to write the stack frame. + We cannot set up the signal handler. + Returning NULL tells our caller, who will nuke us with a SIGILL. */ + return NULL; + } + else { /* Set up the sigcontext from the current state of the thread. */ @@ -125,11 +138,6 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, sizeof (state->fpu))) return NULL; } - else - /* We got a fault trying to write the stack frame. - We cannot set up the signal handler. - Returning NULL tells our caller, who will nuke us with a SIGILL. */ - return NULL; /* Modify the thread state to call the trampoline code on the new stack. */ if (rpc_wait) @@ -177,9 +185,12 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, /* We pass the handler function to the trampoline code in ra ($26). */ state->basic.r26 = (long int) handler; - /* In the callee-saved register t12 ($27), we save the SCP value to pass + /* In the callee-saved register t12/pv ($27), we store the + address of __sigreturn itself, for the trampoline code to use. */ + state->basic.r27 = (long int) &__sigreturn; + /* In the callee-saved register t11/ai ($25), we save the SCP value to pass to __sigreturn after the handler returns. */ - state->basic.r27 = (long int) scp; + state->basic.r25 = (long int) scp; return scp; @@ -223,15 +234,14 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, clobbered by running the handler). We use this saved value to pass to __sigreturn, so the handler can clobber the argument registers if it likes. */ - asm volatile - (/* Call the handler function, saving return address in ra ($26). */ - "jsr $26, $26\n" - /* Reset gp ($29) from the return address (here) in ra ($26). - This may be required to locate __sigreturn. */ - "ldgp $29, 0($26)\n" - /* Call __sigreturn (SCP); this cannot return. */ - "mov $27, $16\n" /* Move saved SCP to argument register. */ - "jmp $31, %0" : : "i" (&__sigreturn)); +#define A(line) asm volatile (#line) + /* Call the handler function, saving return address in ra ($26). */ + A (jsr $26, $26); + /* Reset gp ($29) from the return address (here) in ra ($26). */ + A (ldgp $29, 0($26)); + A (mov $25, $16); /* Move saved SCP to argument register. */ + /* Call __sigreturn (SCP); this cannot return. */ + A (jmp $31, $27); /* NOTREACHED */ return NULL; @@ -246,21 +256,30 @@ int _hurdsig_rcv_interrupted_p (struct machine_thread_all_state *state, mach_port_t *port) { - if (! setjmp (_hurd_sigthread_fault_env)) + if (state->basic.r0 == MACH_RCV_INTERRUPTED) { const unsigned int *pc = (void *) state->basic.pc; - if (state->basic.r0 == MACH_RCV_INTERRUPTED && - pc[-1] == ((alpha_instruction) { pal_format: - { opcode: op_pal, - function: op_chmk } }).bits) - { - /* We did just return from a mach_msg_trap system call - doing a message receive that was interrupted. - Examine the parameters to find the receive right. */ - struct mach_msg_trap_args *args = (void *) &state->basic.r16; + struct mach_msg_trap_args *args = (void *) &state->basic.r16; - *port = args->rcv_name; - return 1; + if (_hurdsig_catch_fault (SIGSEGV)) + { + assert (_hurdsig_fault_sigcode == (long int) (pc - 1) || + _hurdsig_fault_sigcode == (long int) &args->rcv_name); + /* We got a fault trying to read the PC or stack. */ + return 0; + } + else + { + if (pc[-1] == ((alpha_instruction) { pal_format: + { opcode: op_pal, + function: op_chmk } }).bits) + { + /* We did just return from a mach_msg_trap system call + doing a message receive that was interrupted. + Examine the parameters to find the receive right. */ + *port = args->rcv_name; + return 1; + } } } From 33aa4240f65551f5df406462a2b05cc357da92b6 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 15 Dec 1994 00:09:43 +0000 Subject: [PATCH 0492/4487] (CALL_WITH_SP): Put parens around jmp target register. --- sysdeps/mach/alpha/sysdep.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/mach/alpha/sysdep.h b/sysdeps/mach/alpha/sysdep.h index 4ef23ae21b..a32766270b 100644 --- a/sysdeps/mach/alpha/sysdep.h +++ b/sysdeps/mach/alpha/sysdep.h @@ -31,7 +31,7 @@ Cambridge, MA 02139, USA. */ #define CALL_WITH_SP(fn, sp) \ ({ register long int __fn = (long int) fn, __sp = (long int) sp; \ - asm volatile ("mov %0,$30; jmp $31, %1; ldgp $29, 0(%1)" \ + asm volatile ("mov %0,$30; jmp $31, (%1); ldgp $29, 0(%1)" \ : : "r" (__sp), "r" (__fn)); }) #define ENTRY(name) LEAF(name, ***loser no arg count***) From ca194bd9dabff6318dbe850f64461e00106b9e29 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 15 Dec 1994 00:12:48 +0000 Subject: [PATCH 0493/4487] (_hurd_setup_sighandler): Remove A macro; just use `asm volatile' with proper quotes in each line. --- sysdeps/mach/hurd/alpha/trampoline.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sysdeps/mach/hurd/alpha/trampoline.c b/sysdeps/mach/hurd/alpha/trampoline.c index 455aa57c20..85f4964e14 100644 --- a/sysdeps/mach/hurd/alpha/trampoline.c +++ b/sysdeps/mach/hurd/alpha/trampoline.c @@ -234,14 +234,13 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, clobbered by running the handler). We use this saved value to pass to __sigreturn, so the handler can clobber the argument registers if it likes. */ -#define A(line) asm volatile (#line) /* Call the handler function, saving return address in ra ($26). */ - A (jsr $26, $26); + asm volatile ("jsr $26, ($26)"); /* Reset gp ($29) from the return address (here) in ra ($26). */ - A (ldgp $29, 0($26)); - A (mov $25, $16); /* Move saved SCP to argument register. */ + asm volatile ("ldgp $29, 0($26)"); + asm volatile ("mov $25, $16"); /* Move saved SCP to argument register. */ /* Call __sigreturn (SCP); this cannot return. */ - A (jmp $31, $27); + asm volatile ("jmp $31, ($27)"); /* NOTREACHED */ return NULL; From 4be66ebd61a8a880e5ae4d005b260002097e727b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 15 Dec 1994 01:01:53 +0000 Subject: [PATCH 0494/4487] Reverse register and immediate args in `bis' insn; immediate must be second. --- sysdeps/alpha/bsd-setjmp.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/alpha/bsd-setjmp.S b/sysdeps/alpha/bsd-setjmp.S index b6f00ce99f..470f7bc47d 100644 --- a/sysdeps/alpha/bsd-setjmp.S +++ b/sysdeps/alpha/bsd-setjmp.S @@ -25,6 +25,6 @@ Cambridge, MA 02139, USA. */ ENTRY (setjmp) lda $27, __sigsetjmp /* Load address to jump to. */ - bis 1, $31, $17 /* Pass a second argument of one. */ + bis $31, 1, $17 /* Pass a second argument of one. */ jmp $31, ($27), __sigsetjmp /* Call __sigsetjmp. */ .end setjmp From 71a986ecd74321c973bf916610a8d3a1516f1b39 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 28 Dec 1994 09:57:21 +0000 Subject: [PATCH 0495/4487] (__m81_inline): New macro. Replace all uses of `extern __inline' with `__m81_inline'. --- sysdeps/m68k/fpu/__math.h | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h index 2617ae2e56..a9ae2d966c 100644 --- a/sysdeps/m68k/fpu/__math.h +++ b/sysdeps/m68k/fpu/__math.h @@ -21,14 +21,19 @@ Cambridge, MA 02139, USA. */ #include #ifdef __NO_MATH_INLINES +/* This is used when defining the functions themselves. Define them with + __ names, and with `static inline' instead of `extern inline' so the + bodies will always be used, never an external function call. */ #define __m81_u(x) __CONCAT(__,x) +#define __m81_inline static __inline #else #define __m81_u(x) x +#define __m81_inline exter __inline #define __MATH_INLINES 1 #endif #define __inline_mathop2(func, op) \ - extern __inline __CONSTVALUE double \ + __m81_inline __CONSTVALUE double \ __m81_u(func)(double __mathop_x) \ { \ double __result; \ @@ -63,7 +68,7 @@ __inline_mathop2(log1p, lognp1) __inline_mathop(atanh) #endif -extern __inline __CONSTVALUE double +__m81_inline __CONSTVALUE double __m81_u(__drem)(double __x, double __y) { double __result; @@ -71,7 +76,7 @@ __m81_u(__drem)(double __x, double __y) return __result; } -extern __inline __CONSTVALUE double +__m81_inline __CONSTVALUE double __m81_u(ldexp)(double __x, int __e) { double __result; @@ -80,7 +85,7 @@ __m81_u(ldexp)(double __x, int __e) return __result; } -extern __inline __CONSTVALUE double +__m81_inline __CONSTVALUE double __m81_u(fmod)(double __x, double __y) { double __result; @@ -88,7 +93,7 @@ __m81_u(fmod)(double __x, double __y) return __result; } -extern __inline double +__m81_inline double __m81_u(frexp)(double __value, int *__expptr) { double __mantissa, __exponent; @@ -98,7 +103,7 @@ __m81_u(frexp)(double __value, int *__expptr) return __mantissa; } -extern __inline __CONSTVALUE double +__m81_inline __CONSTVALUE double __m81_u(pow)(double __x, double __y) { double __result; @@ -117,7 +122,7 @@ __m81_u(pow)(double __x, double __y) return __result; } -extern __inline __CONSTVALUE double +__m81_inline __CONSTVALUE double __m81_u(ceil)(double __x) { double __result; @@ -132,7 +137,7 @@ __m81_u(ceil)(double __x) return __result; } -extern __inline double +__m81_inline double __m81_u(modf)(double __value, double *__iptr) { double __modf_int = __m81_u(floor)(__value); @@ -140,7 +145,7 @@ __m81_u(modf)(double __value, double *__iptr) return __value - __modf_int; } -extern __inline __CONSTVALUE int +__m81_inline __CONSTVALUE int __m81_u(__isinf)(double __value) { /* There is no branch-condition for infinity, @@ -151,7 +156,7 @@ __m81_u(__isinf)(double __value) return (__fpsr & (2 << (3 * 8))) ? (__value < 0 ? -1 : 1) : 0; } -extern __inline __CONSTVALUE int +__m81_inline __CONSTVALUE int __m81_u(__isnan)(double __value) { char __result; From 2d4d45d59d3649e11f9f604a934db0c8a6f1d205 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Tue, 10 Jan 1995 18:46:33 +0000 Subject: [PATCH 0496/4487] * sysdeps/unix/bsd/ultrix4/mips/start.S: Use s0, s1, and s2 instead of t0, t1, and t2. --- sysdeps/unix/bsd/ultrix4/mips/start.S | 29 ++++++++++++--------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/sysdeps/unix/bsd/ultrix4/mips/start.S b/sysdeps/unix/bsd/ultrix4/mips/start.S index 108f7d9790..6146b57726 100644 --- a/sysdeps/unix/bsd/ultrix4/mips/start.S +++ b/sysdeps/unix/bsd/ultrix4/mips/start.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -29,49 +29,46 @@ ENTRY(__start) .set noreorder /* The first thing on the stack is argc. */ - lw t0, 0(sp) + lw s0, 0(sp) nop /* Set up the global pointer. */ la gp, _gp /* Then set up argv. */ - addiu t1, sp, 4 + addiu s1, sp, 4 /* To compute where envp is, first we have to jump ahead four bytes from what argv was. This will bring us ahead, so we don't need to compute the NULL at the end of argv later. */ - addiu v1, t1, 4 + addiu v1, s1, 4 /* Now, compute the space to skip given the number of arguments we've got. We do this by multiplying argc by 4. */ - sll v0, t0, 2 + sll v0, s0, 2 /* Now, add (argv+4) with the space to skip...that's envp. */ - addu v1, v1, v0 - move t2, v1 + addu s2, v1, v0 /* __environ = envp; */ - sw t2, __environ + sw s2, __environ addiu sp, sp, -24 /* __libc_init (argc, argv, envp); */ - move a0, t0 - move a1, t1 - move a2, t2 + move a0, s0 + move a1, s1 jal __libc_init - nop + move a2, s2 /* errno = 0; */ sw zero, errno /* exit (main (argc, argv, envp)); */ - move a0, t0 - move a1, t1 - move a2, t2 + move a0, s0 + move a1, s1 jal main - nop + move a2, s2 /* Make the value returned by main be the argument to exit. */ jal exit From 3332ae5c899e5163c0038fbbe427eba4f029b5d9 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 15 Jan 1995 16:50:59 +0000 Subject: [PATCH 0497/4487] Initial revision --- sysdeps/unix/sysv/sysv4/ftruncate.c | 37 +++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/ftruncate.c diff --git a/sysdeps/unix/sysv/sysv4/ftruncate.c b/sysdeps/unix/sysv/sysv4/ftruncate.c new file mode 100644 index 0000000000..45f2614257 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/ftruncate.c @@ -0,0 +1,37 @@ +/* ftruncate for SVR4 using the fcntl F_FREESP command. +Copyright (C) 1995 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include +#include + +/* Truncate the file FD refers to to LENGTH bytes. */ +int +DEFUN(ftruncate, (fd, length), + int fd AND off_t length) +{ + struct flock fl; + + memset (&fl, 0, sizeof fl); + fl.l_type = F_WRLCK; + fl.l_start = length; + return fcntl (fd, F_FREESP, &fl); +} From 3c22ede5ecfc0f03bacdb096c965265ebbb9d409 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 21 Jan 1995 14:40:39 +0000 Subject: [PATCH 0498/4487] Converted to use weak aliases with macros from libc-symbols.h. --- sysdeps/alpha/copysign.c | 6 ++++-- sysdeps/m68k/fpu/drem.c | 6 ++++-- sysdeps/standalone/brk.c | 7 ++----- sysdeps/standalone/close.c | 4 +++- sysdeps/unix/bsd/Attic/osf1/alpha/brk.S | 4 +++- sysdeps/unix/bsd/Attic/osf1/alpha/fork.S | 4 +++- sysdeps/unix/bsd/Attic/osf1/alpha/getdents.S | 5 ++++- sysdeps/unix/bsd/hp/m68k/brk.S | 4 +++- sysdeps/unix/bsd/sun/getdents.S | 4 +++- sysdeps/unix/bsd/sun/m68k/brk.S | 4 +++- sysdeps/unix/bsd/ultrix4/getdents.S | 2 +- sysdeps/unix/bsd/vax/brk.S | 4 +++- sysdeps/unix/mips/brk.S | 4 +++- sysdeps/unix/mips/fork.S | 4 +++- sysdeps/unix/sysv/irix4/dup2.c | 2 ++ sysdeps/unix/sysv/irix4/fpathconf.c | 4 +++- sysdeps/unix/sysv/sysv4/dup2.c | 2 ++ sysdeps/unix/sysv/sysv4/i386/fstat.S | 4 +++- 18 files changed, 52 insertions(+), 22 deletions(-) diff --git a/sysdeps/alpha/copysign.c b/sysdeps/alpha/copysign.c index 2136f6bfb0..69544b01fb 100644 --- a/sysdeps/alpha/copysign.c +++ b/sysdeps/alpha/copysign.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1993 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1993, 1995 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 @@ -21,9 +21,11 @@ Cambridge, MA 02139, USA. */ #include /* Return X with its sign changed to Y's. */ -__inline __CONSTVALUE double +__inline double __copysign (double __x, double __y) { __asm ("cpys %1, %2, %0" : "=f" (__x) : "f" (__y), "f" (__x)); return __x; } + +weak_alias (__copysign, copysign) diff --git a/sysdeps/m68k/fpu/drem.c b/sysdeps/m68k/fpu/drem.c index b3efffb777..16caacfd81 100644 --- a/sysdeps/m68k/fpu/drem.c +++ b/sysdeps/m68k/fpu/drem.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1994, 1995 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 @@ -22,8 +22,10 @@ Cambridge, MA 02139, USA. */ #undef drem -__CONSTVALUE double +double DEFUN(__drem, (x, y), double x AND double y) { return ____drem(x, y); } + +weak_alias (__drem, drem) diff --git a/sysdeps/standalone/brk.c b/sysdeps/standalone/brk.c index be9174c8dd..67fbf771a0 100644 --- a/sysdeps/standalone/brk.c +++ b/sysdeps/standalone/brk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1994 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1994, 1995 Free Software Foundation, Inc. Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil, On-Line Applications Research Corporation. @@ -59,10 +59,7 @@ DEFUN(__NONE_set_memvals, (argc, argv, envp), } #ifdef HAVE_GNU_LD - -#include - text_set_element (__libc_subinit, __NONE_set_memvals); - #endif +weak_alias (__brk, brk) diff --git a/sysdeps/standalone/close.c b/sysdeps/standalone/close.c index d7674ae676..59b607305f 100644 --- a/sysdeps/standalone/close.c +++ b/sysdeps/standalone/close.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995 Free Software Foundation, Inc. Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil, On-Line Applications Research Corporation. @@ -40,3 +40,5 @@ DEFUN(__close, (fd), int fd) return 0; } + +weak_alias (__close, close) diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/brk.S b/sysdeps/unix/bsd/Attic/osf1/alpha/brk.S index 1475108d64..111f3397af 100644 --- a/sysdeps/unix/bsd/Attic/osf1/alpha/brk.S +++ b/sysdeps/unix/bsd/Attic/osf1/alpha/brk.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -49,3 +49,5 @@ ENTRY(__brk) error: ldgp gp,0(gp) jmp zero,syscall_error .end __brk + +weak_alias (__brk, brk) diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/fork.S b/sysdeps/unix/bsd/Attic/osf1/alpha/fork.S index 8afcfbc43e..7c8d671893 100644 --- a/sysdeps/unix/bsd/Attic/osf1/alpha/fork.S +++ b/sysdeps/unix/bsd/Attic/osf1/alpha/fork.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -21,3 +21,5 @@ Cambridge, MA 02139, USA. */ SYSCALL__ (fork, 0) cmovne a4, 0, v0 ret + +weak_alias (__fork, fork) diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/getdents.S b/sysdeps/unix/bsd/Attic/osf1/alpha/getdents.S index 52f7cdbfea..16ccbc2ce2 100644 --- a/sysdeps/unix/bsd/Attic/osf1/alpha/getdents.S +++ b/sysdeps/unix/bsd/Attic/osf1/alpha/getdents.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -20,3 +20,6 @@ Cambridge, MA 02139, USA. */ SYSCALL__ (getdirentries, 4) ret + +weak_alias (__getdirentries, getdirentries) + diff --git a/sysdeps/unix/bsd/hp/m68k/brk.S b/sysdeps/unix/bsd/hp/m68k/brk.S index 1b06c12fe9..cf46b4d902 100644 --- a/sysdeps/unix/bsd/hp/m68k/brk.S +++ b/sysdeps/unix/bsd/hp/m68k/brk.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1993, 1994 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1993, 1994, 1995 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 @@ -42,3 +42,5 @@ ENTRY (__brk) clrl d0 rts error: jmp syscall_error + +weak_alias (__brk, brk) diff --git a/sysdeps/unix/bsd/sun/getdents.S b/sysdeps/unix/bsd/sun/getdents.S index 6c4f7afa7a..f283a5cc71 100644 --- a/sysdeps/unix/bsd/sun/getdents.S +++ b/sysdeps/unix/bsd/sun/getdents.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1995 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,3 +20,5 @@ Cambridge, MA 02139, USA. */ SYSCALL__ (getdirentries, 4) ret + +weak_alias (__getdirentries, getdirentries) diff --git a/sysdeps/unix/bsd/sun/m68k/brk.S b/sysdeps/unix/bsd/sun/m68k/brk.S index 6a69dd0da4..114fa73c85 100644 --- a/sysdeps/unix/bsd/sun/m68k/brk.S +++ b/sysdeps/unix/bsd/sun/m68k/brk.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1994, 1995 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 @@ -45,3 +45,5 @@ ENTRY (__brk) rts 1: jmp syscall_error + +weak_alias (__brk, brk) diff --git a/sysdeps/unix/bsd/ultrix4/getdents.S b/sysdeps/unix/bsd/ultrix4/getdents.S index 6d18c04eca..be449b2bcb 100644 --- a/sysdeps/unix/bsd/ultrix4/getdents.S +++ b/sysdeps/unix/bsd/ultrix4/getdents.S @@ -1 +1 @@ -#include +#include diff --git a/sysdeps/unix/bsd/vax/brk.S b/sysdeps/unix/bsd/vax/brk.S index 9186d863b6..b3e8e10307 100644 --- a/sysdeps/unix/bsd/vax/brk.S +++ b/sysdeps/unix/bsd/vax/brk.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1995 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 @@ -43,3 +43,5 @@ ENTRY (__brk) ret 1: jmp syscall_error + +weak_alias (__brk, brk) diff --git a/sysdeps/unix/mips/brk.S b/sysdeps/unix/mips/brk.S index 79e4fec493..1754c0c4de 100644 --- a/sysdeps/unix/mips/brk.S +++ b/sysdeps/unix/mips/brk.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -63,3 +63,5 @@ error: j syscall_error nop nop nop + +weak_alias (__brk, brk) diff --git a/sysdeps/unix/mips/fork.S b/sysdeps/unix/mips/fork.S index 53cae3c2f5..2347bf4d50 100644 --- a/sysdeps/unix/mips/fork.S +++ b/sysdeps/unix/mips/fork.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -25,3 +25,5 @@ SYSCALL__ (fork, 0) move v0, zero parent: ret + +weak_alias (__fork, fork) diff --git a/sysdeps/unix/sysv/irix4/dup2.c b/sysdeps/unix/sysv/irix4/dup2.c index 53691b6022..86720b1b70 100644 --- a/sysdeps/unix/sysv/irix4/dup2.c +++ b/sysdeps/unix/sysv/irix4/dup2.c @@ -1 +1,3 @@ #include + +weak_alias (__dup2, dup2) diff --git a/sysdeps/unix/sysv/irix4/fpathconf.c b/sysdeps/unix/sysv/irix4/fpathconf.c index be39d2f349..3c9f1750ff 100644 --- a/sysdeps/unix/sysv/irix4/fpathconf.c +++ b/sysdeps/unix/sysv/irix4/fpathconf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995 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 @@ -30,3 +30,5 @@ DEFUN(__fpathconf, (fd, name), int fd AND int name) { return __syssgi (SGI_PATHCONF, FPATHCONF, fd, name); } + +weak_alias (__fpathconf, fpathconf) diff --git a/sysdeps/unix/sysv/sysv4/dup2.c b/sysdeps/unix/sysv/sysv4/dup2.c index 06270b4339..c7015fce7e 100644 --- a/sysdeps/unix/sysv/sysv4/dup2.c +++ b/sysdeps/unix/sysv/sysv4/dup2.c @@ -1,2 +1,4 @@ /* SVR4 uses the POSIX dup2. */ #include + +weak_alias (__dup2, dup2) diff --git a/sysdeps/unix/sysv/sysv4/i386/fstat.S b/sysdeps/unix/sysv/sysv4/i386/fstat.S index bf83d6f301..11743b3fc3 100644 --- a/sysdeps/unix/sysv/sysv4/i386/fstat.S +++ b/sysdeps/unix/sysv/sysv4/i386/fstat.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995 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 @@ -33,3 +33,5 @@ ENTRY (__fstat) DO_CALL (fxstat, 3) /* Do the syscall. */ jb syscall_error /* Check for error. */ ret /* Return success. */ + +weak_alias (__fstat, fstat) From 1cec31f4d43f0a2ddc3ff268512b9f0db79f2466 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 21 Jan 1995 15:40:54 +0000 Subject: [PATCH 0499/4487] Converted to use weak aliases with macros from libc-symbols.h. --- sysdeps/m68k/fpu/isinf.c | 6 ++++-- sysdeps/m68k/fpu/isnan.c | 4 +++- sysdeps/m68k/fpu/logb.c | 8 +++++--- sysdeps/m68k/fpu/rint.c | 2 ++ sysdeps/mach/hurd/alpha/sigreturn.c | 4 +++- sysdeps/mach/hurd/mips/sigreturn.c | 4 +++- sysdeps/standalone/open.c | 8 +++----- sysdeps/standalone/read.c | 4 +++- sysdeps/standalone/write.c | 4 +++- sysdeps/unix/bsd/Attic/osf1/alpha/pipe.S | 4 +++- sysdeps/unix/bsd/Attic/osf1/alpha/sigblock.S | 4 +++- sysdeps/unix/bsd/Attic/osf1/alpha/sigpause.S | 4 +++- sysdeps/unix/bsd/Attic/osf1/alpha/sigsetmask.S | 4 +++- sysdeps/unix/bsd/Attic/osf1/alpha/sigvec.S | 4 +++- sysdeps/unix/bsd/Attic/osf1/alpha/wait4.S | 2 +- sysdeps/unix/bsd/Attic/osf1/alpha/waitpid.c | 2 +- sysdeps/unix/bsd/hp/m68k/wait3.S | 4 +++- sysdeps/unix/bsd/m68k/pipe.S | 4 +++- sysdeps/unix/bsd/m68k/wait.S | 4 +++- sysdeps/unix/bsd/sequent/i386/getgroups.S | 4 +++- sysdeps/unix/bsd/sequent/i386/sigvec.S | 4 +++- sysdeps/unix/bsd/sony/newsos4/wait.c | 2 +- sysdeps/unix/bsd/sony/newsos4/wait3.c | 2 +- sysdeps/unix/bsd/sony/newsos4/wait4.c | 2 +- sysdeps/unix/bsd/sun/sigreturn.S | 4 +++- sysdeps/unix/bsd/sun/sigvec.S | 4 +++- sysdeps/unix/bsd/sun/sunos3/m68k/wait.S | 2 +- sysdeps/unix/bsd/sun/sunos4/setsid.S | 2 +- sysdeps/unix/bsd/sun/sunos4/tcgetattr.c | 4 +++- sysdeps/unix/bsd/sun/sunos4/wait.c | 2 +- sysdeps/unix/bsd/sun/sunos4/wait3.c | 2 +- sysdeps/unix/bsd/sun/sunos4/wait4.c | 4 +++- sysdeps/unix/bsd/sun/sunos4/waitpid.c | 2 +- sysdeps/unix/bsd/ultrix4/mips/sigvec.S | 2 +- sysdeps/unix/bsd/ultrix4/mips/vfork.S | 4 +++- sysdeps/unix/bsd/ultrix4/setsid.S | 2 +- sysdeps/unix/bsd/ultrix4/sysconf.c | 4 ++-- sysdeps/unix/bsd/ultrix4/wait3.S | 4 +++- sysdeps/unix/bsd/ultrix4/waitpid.S | 4 +++- sysdeps/unix/bsd/vax/pipe.S | 4 +++- sysdeps/unix/bsd/vax/wait.S | 4 +++- sysdeps/unix/bsd/vax/wait3.S | 4 +++- sysdeps/unix/mips/pipe.S | 4 +++- sysdeps/unix/mips/sigreturn.S | 4 +++- sysdeps/unix/mips/wait.S | 4 +++- sysdeps/unix/sysv/i386/sigreturn.S | 4 +++- sysdeps/unix/sysv/irix4/getgroups.c | 4 +++- sysdeps/unix/sysv/irix4/getrusage.c | 4 +++- sysdeps/unix/sysv/irix4/gettimeofday.c | 2 ++ sysdeps/unix/sysv/irix4/pathconf.c | 4 +++- sysdeps/unix/sysv/irix4/setpgid.S | 4 +++- sysdeps/unix/sysv/irix4/sigreturn.S | 4 +++- sysdeps/unix/sysv/irix4/sysconf.c | 4 +++- sysdeps/unix/sysv/irix4/wait.S | 4 +++- sysdeps/unix/sysv/irix4/wait3.S | 2 +- sysdeps/unix/sysv/irix4/waitpid.c | 2 +- sysdeps/unix/sysv/sco3.2.4/getgroups.c | 4 +++- sysdeps/unix/sysv/sco3.2.4/pathconf.S | 4 +++- sysdeps/unix/sysv/sco3.2.4/setpgid.c | 2 +- sysdeps/unix/sysv/sco3.2.4/setsid.c | 2 +- sysdeps/unix/sysv/sco3.2.4/sigaction.S | 4 +++- sysdeps/unix/sysv/sco3.2.4/sigprocmask.S | 4 +++- sysdeps/unix/sysv/sco3.2.4/sysconf.S | 4 +++- sysdeps/unix/sysv/sco3.2.4/waitpid.S | 4 +++- sysdeps/unix/sysv/sysv4/getdtsz.c | 2 +- sysdeps/unix/sysv/sysv4/gethostname.c | 4 +++- sysdeps/unix/sysv/sysv4/getpagesize.c | 2 +- sysdeps/unix/sysv/sysv4/i386/lstat.S | 4 +++- sysdeps/unix/sysv/sysv4/i386/mknod.S | 4 +++- sysdeps/unix/sysv/sysv4/i386/stat.S | 4 +++- sysdeps/unix/sysv/sysv4/i386/vfork.S | 2 +- sysdeps/unix/sysv/sysv4/setpgid.c | 4 +++- sysdeps/unix/sysv/sysv4/setsid.c | 4 +++- sysdeps/unix/sysv/sysv4/sigaction.c | 4 +++- sysdeps/unix/sysv/sysv4/sigprocmask.S | 4 +++- sysdeps/unix/sysv/sysv4/solaris2/utimes.S | 2 +- sysdeps/unix/sysv/sysv4/sysconf.c | 4 +++- sysdeps/unix/sysv/sysv4/waitpid.c | 4 +++- sysdeps/vax/infnan.c | 4 +++- sysdeps/vax/memccpy.c | 4 +++- 80 files changed, 200 insertions(+), 86 deletions(-) diff --git a/sysdeps/m68k/fpu/isinf.c b/sysdeps/m68k/fpu/isinf.c index c816dcd067..ab2cf0bb03 100644 --- a/sysdeps/m68k/fpu/isinf.c +++ b/sysdeps/m68k/fpu/isinf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1994 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1994, 1995 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,8 +25,10 @@ Cambridge, MA 02139, USA. */ #endif -__CONSTVALUE int +int DEFUN(FUNC, (x), double x) { return __m81_u(FUNC)(x); } + +weak_alias (__isinf, isinf) diff --git a/sysdeps/m68k/fpu/isnan.c b/sysdeps/m68k/fpu/isnan.c index e90c691cca..d0984911d2 100644 --- a/sysdeps/m68k/fpu/isnan.c +++ b/sysdeps/m68k/fpu/isnan.c @@ -1,2 +1,4 @@ #define FUNC __isnan -#include <__isinf.c> +#include + +weak_alias (__isnan, isnan) diff --git a/sysdeps/m68k/fpu/logb.c b/sysdeps/m68k/fpu/logb.c index 27ce1048fd..8619c908c8 100644 --- a/sysdeps/m68k/fpu/logb.c +++ b/sysdeps/m68k/fpu/logb.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993, 1994, 1995 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 @@ Cambridge, MA 02139, USA. */ /* Return the base 2 signed integral exponent of X. */ -__CONSTVALUE double +double DEFUN(__logb, (x), double x) { if (__isnan (x)) @@ -39,6 +39,8 @@ DEFUN(__logb, (x), double x) return x; } +weak_alias (__logb, logb) + #else -#include +#include #endif diff --git a/sysdeps/m68k/fpu/rint.c b/sysdeps/m68k/fpu/rint.c index 288ae81ce4..f83a4e4c3f 100644 --- a/sysdeps/m68k/fpu/rint.c +++ b/sysdeps/m68k/fpu/rint.c @@ -1,3 +1,5 @@ #define FUNC __rint #define OP intr #include + +weak_alias (__rint, rint) diff --git a/sysdeps/mach/hurd/alpha/sigreturn.c b/sysdeps/mach/hurd/alpha/sigreturn.c index c178a03435..4adfb8d78f 100644 --- a/sysdeps/mach/hurd/alpha/sigreturn.c +++ b/sysdeps/mach/hurd/alpha/sigreturn.c @@ -1,5 +1,5 @@ /* Return from signal handler in GNU C library for Hurd. Alpha version. -Copyright (C) 1994 Free Software Foundation, Inc. +Copyright (C) 1994, 1995 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 @@ -207,3 +207,5 @@ __sigreturn (struct sigcontext *scp) /* NOTREACHED */ return -1; } + +weak_alias (__sigreturn, sigreturn) diff --git a/sysdeps/mach/hurd/mips/sigreturn.c b/sysdeps/mach/hurd/mips/sigreturn.c index 0b3a474986..d1d444f075 100644 --- a/sysdeps/mach/hurd/mips/sigreturn.c +++ b/sysdeps/mach/hurd/mips/sigreturn.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1994, 1995 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 @@ -164,3 +164,5 @@ __sigreturn (struct sigcontext *scp) /* NOTREACHED */ return -1; } + +weak_alias (__sigreturn, sigreturn) diff --git a/sysdeps/standalone/open.c b/sysdeps/standalone/open.c index fdcaf65134..910e7933e7 100644 --- a/sysdeps/standalone/open.c +++ b/sysdeps/standalone/open.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995 Free Software Foundation, Inc. Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil, On-Line Applications Research Corporation. @@ -116,9 +116,7 @@ DEFUN(__NONE_init_console_io, (argc, argv, envp), } #ifdef HAVE_GNU_LD - -#include - text_set_element (__libc_subinit, __NONE_init_console_io); - #endif + +weak_alias (__open, open) diff --git a/sysdeps/standalone/read.c b/sysdeps/standalone/read.c index 1c87b1103a..284321d717 100644 --- a/sysdeps/standalone/read.c +++ b/sysdeps/standalone/read.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995 Free Software Foundation, Inc. Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil, On-Line Applications Research Corporation. @@ -83,3 +83,5 @@ DEFUN(__read, (fd, buf, nbytes), *buffer = data; return 1; } + +weak_alias (__read, read) diff --git a/sysdeps/standalone/write.c b/sysdeps/standalone/write.c index 22c01a4f04..f0ae3888f6 100644 --- a/sysdeps/standalone/write.c +++ b/sysdeps/standalone/write.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995 Free Software Foundation, Inc. Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil, On-Line Applications Research Corporation. @@ -70,3 +70,5 @@ DEFUN(__write, (fd, buf, nbytes), return count; } + +weak_alias (__write, write) diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/pipe.S b/sysdeps/unix/bsd/Attic/osf1/alpha/pipe.S index 6973e96031..6b074eda1a 100644 --- a/sysdeps/unix/bsd/Attic/osf1/alpha/pipe.S +++ b/sysdeps/unix/bsd/Attic/osf1/alpha/pipe.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -26,3 +26,5 @@ SYSCALL__ (pipe, 1) /* Go out with a clean status. */ mov zero, r0 ret + +weak_alias (__pipe, pipe) diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/sigblock.S b/sysdeps/unix/bsd/Attic/osf1/alpha/sigblock.S index eefd641424..c3556a915f 100644 --- a/sysdeps/unix/bsd/Attic/osf1/alpha/sigblock.S +++ b/sysdeps/unix/bsd/Attic/osf1/alpha/sigblock.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -23,3 +23,5 @@ Cambridge, MA 02139, USA. */ SYSCALL__ (sigblock, 1) ret + +weak_alias (__sigblock, sigblock) diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/sigpause.S b/sysdeps/unix/bsd/Attic/osf1/alpha/sigpause.S index 893ee089eb..04b6d45db7 100644 --- a/sysdeps/unix/bsd/Attic/osf1/alpha/sigpause.S +++ b/sysdeps/unix/bsd/Attic/osf1/alpha/sigpause.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -23,3 +23,5 @@ Cambridge, MA 02139, USA. */ SYSCALL__ (sigpause, 1) ret + +weak_alias (__sigpause, sigpause) diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/sigsetmask.S b/sysdeps/unix/bsd/Attic/osf1/alpha/sigsetmask.S index f2536d7aff..fb3a1d19f7 100644 --- a/sysdeps/unix/bsd/Attic/osf1/alpha/sigsetmask.S +++ b/sysdeps/unix/bsd/Attic/osf1/alpha/sigsetmask.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -23,3 +23,5 @@ Cambridge, MA 02139, USA. */ SYSCALL__ (sigsetmask, 1) ret + +weak_alias (__sigsetmask, sigsetmask) diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/sigvec.S b/sysdeps/unix/bsd/Attic/osf1/alpha/sigvec.S index d0d3ae00ed..b04ec6e12e 100644 --- a/sysdeps/unix/bsd/Attic/osf1/alpha/sigvec.S +++ b/sysdeps/unix/bsd/Attic/osf1/alpha/sigvec.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -23,3 +23,5 @@ Cambridge, MA 02139, USA. */ SYSCALL__ (sigvec, 3) ret + +weak_alias (__sigvec, sigvec) diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/wait4.S b/sysdeps/unix/bsd/Attic/osf1/alpha/wait4.S index 0f76c625b6..e4c322341d 100644 --- a/sysdeps/unix/bsd/Attic/osf1/alpha/wait4.S +++ b/sysdeps/unix/bsd/Attic/osf1/alpha/wait4.S @@ -1 +1 @@ -#include +#include diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/waitpid.c b/sysdeps/unix/bsd/Attic/osf1/alpha/waitpid.c index 47129a8845..8378982ac7 100644 --- a/sysdeps/unix/bsd/Attic/osf1/alpha/waitpid.c +++ b/sysdeps/unix/bsd/Attic/osf1/alpha/waitpid.c @@ -1 +1 @@ -#include +#include diff --git a/sysdeps/unix/bsd/hp/m68k/wait3.S b/sysdeps/unix/bsd/hp/m68k/wait3.S index d02f27fe7c..d0e758595a 100644 --- a/sysdeps/unix/bsd/hp/m68k/wait3.S +++ b/sysdeps/unix/bsd/hp/m68k/wait3.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1995 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 @@ -35,3 +35,5 @@ ENTRY(__wait3) .globl syscall_error error: jmp syscall_error + +weak_alias (__wait3, wait3) diff --git a/sysdeps/unix/bsd/m68k/pipe.S b/sysdeps/unix/bsd/m68k/pipe.S index 547b4f351b..633d18fe2c 100644 --- a/sysdeps/unix/bsd/m68k/pipe.S +++ b/sysdeps/unix/bsd/m68k/pipe.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993, 1995 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,3 +28,5 @@ SYSCALL__ (pipe, 1) #endif clrl d0 rts + +weak_alias (__pipe, pipe) diff --git a/sysdeps/unix/bsd/m68k/wait.S b/sysdeps/unix/bsd/m68k/wait.S index 927fa338b0..c7685b72aa 100644 --- a/sysdeps/unix/bsd/m68k/wait.S +++ b/sysdeps/unix/bsd/m68k/wait.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993, 1995 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 @@ -31,3 +31,5 @@ SYSCALL__ (wait, 1) movel d1, a0@ #endif 1: rts + +weak_alias (__wait, wait) diff --git a/sysdeps/unix/bsd/sequent/i386/getgroups.S b/sysdeps/unix/bsd/sequent/i386/getgroups.S index cf25abe043..b68bcbdbaa 100644 --- a/sysdeps/unix/bsd/sequent/i386/getgroups.S +++ b/sysdeps/unix/bsd/sequent/i386/getgroups.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995 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 @@ -40,3 +40,5 @@ myerror: addl %esp, $(NGROUPS_MAX * 4) /* Pop the local array. */ jb syscall_error /* Check for error from the system call. */ ret /* Return its value. */ + +weak_alias (__getgroups, getgroups) diff --git a/sysdeps/unix/bsd/sequent/i386/sigvec.S b/sysdeps/unix/bsd/sequent/i386/sigvec.S index a5812c7fee..1bb57c2074 100644 --- a/sysdeps/unix/bsd/sequent/i386/sigvec.S +++ b/sysdeps/unix/bsd/sequent/i386/sigvec.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995 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 @@ -41,3 +41,5 @@ ENTRY (__sigvec) DO_CALL (sigvec, 4) /* Do the system call. */ jb syscall_error /* Check for error. */ ret + +weak_alias (__sigvec, sigvec) diff --git a/sysdeps/unix/bsd/sony/newsos4/wait.c b/sysdeps/unix/bsd/sony/newsos4/wait.c index d9ee77b4a3..79d54580fd 100644 --- a/sysdeps/unix/bsd/sony/newsos4/wait.c +++ b/sysdeps/unix/bsd/sony/newsos4/wait.c @@ -1 +1 @@ -#include +#include diff --git a/sysdeps/unix/bsd/sony/newsos4/wait3.c b/sysdeps/unix/bsd/sony/newsos4/wait3.c index ecc11134bb..0b3bdee771 100644 --- a/sysdeps/unix/bsd/sony/newsos4/wait3.c +++ b/sysdeps/unix/bsd/sony/newsos4/wait3.c @@ -1 +1 @@ -#include +#include diff --git a/sysdeps/unix/bsd/sony/newsos4/wait4.c b/sysdeps/unix/bsd/sony/newsos4/wait4.c index 9183ce1b53..856c99fd61 100644 --- a/sysdeps/unix/bsd/sony/newsos4/wait4.c +++ b/sysdeps/unix/bsd/sony/newsos4/wait4.c @@ -1 +1 @@ -#include +#include diff --git a/sysdeps/unix/bsd/sun/sigreturn.S b/sysdeps/unix/bsd/sun/sigreturn.S index 9a3b5e6bdf..d0a3f3a56b 100644 --- a/sysdeps/unix/bsd/sun/sigreturn.S +++ b/sysdeps/unix/bsd/sun/sigreturn.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995 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 @@ -24,3 +24,5 @@ Cambridge, MA 02139, USA. */ SYSCALL__ (sigreturn, 1) /* Does not return. */ + +weak_alias (__sigreturn, sigreturn) diff --git a/sysdeps/unix/bsd/sun/sigvec.S b/sysdeps/unix/bsd/sun/sigvec.S index fdf919c7b8..c09397486f 100644 --- a/sysdeps/unix/bsd/sun/sigvec.S +++ b/sysdeps/unix/bsd/sun/sigvec.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1995 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 @@ -22,3 +22,5 @@ Cambridge, MA 02139, USA. */ PSEUDO (__raw_sigvec, sigvec, 3) ret + +weak_alias (__sigvec, sigvec) diff --git a/sysdeps/unix/bsd/sun/sunos3/m68k/wait.S b/sysdeps/unix/bsd/sun/sunos3/m68k/wait.S index c7f681dff1..f69c4b4431 100644 --- a/sysdeps/unix/bsd/sun/sunos3/m68k/wait.S +++ b/sysdeps/unix/bsd/sun/sunos3/m68k/wait.S @@ -1 +1 @@ -#include +#include diff --git a/sysdeps/unix/bsd/sun/sunos4/setsid.S b/sysdeps/unix/bsd/sun/sunos4/setsid.S index e0f94b0868..4930c56dcf 100644 --- a/sysdeps/unix/bsd/sun/sunos4/setsid.S +++ b/sysdeps/unix/bsd/sun/sunos4/setsid.S @@ -1 +1 @@ -#include +#include diff --git a/sysdeps/unix/bsd/sun/sunos4/tcgetattr.c b/sysdeps/unix/bsd/sun/sunos4/tcgetattr.c index dce1b02ae0..5e45037bb2 100644 --- a/sysdeps/unix/bsd/sun/sunos4/tcgetattr.c +++ b/sysdeps/unix/bsd/sun/sunos4/tcgetattr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995 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 @@ -29,3 +29,5 @@ DEFUN(__tcgetattr, (fd, termios_p), { return __ioctl (fd, TCGETS, termios_p); } + +weak_alias (__tcgetattr, tcgetattr) diff --git a/sysdeps/unix/bsd/sun/sunos4/wait.c b/sysdeps/unix/bsd/sun/sunos4/wait.c index d9ee77b4a3..79d54580fd 100644 --- a/sysdeps/unix/bsd/sun/sunos4/wait.c +++ b/sysdeps/unix/bsd/sun/sunos4/wait.c @@ -1 +1 @@ -#include +#include diff --git a/sysdeps/unix/bsd/sun/sunos4/wait3.c b/sysdeps/unix/bsd/sun/sunos4/wait3.c index ecc11134bb..0b3bdee771 100644 --- a/sysdeps/unix/bsd/sun/sunos4/wait3.c +++ b/sysdeps/unix/bsd/sun/sunos4/wait3.c @@ -1 +1 @@ -#include +#include diff --git a/sysdeps/unix/bsd/sun/sunos4/wait4.c b/sysdeps/unix/bsd/sun/sunos4/wait4.c index 3e9fdcbe63..4d15ddc9e8 100644 --- a/sysdeps/unix/bsd/sun/sunos4/wait4.c +++ b/sysdeps/unix/bsd/sun/sunos4/wait4.c @@ -2,7 +2,7 @@ SunOS 4.1) on top of SunOS's wait4 system call, which has semantics different from those documented. Go Sun! -Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. +Copyright (C) 1991, 1992, 1993, 1995 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 @@ -46,3 +46,5 @@ DEFUN(__wait4, (pid, stat_loc, options, usage), return __wait4_syscall (pid, stat_loc, options, usage); } + +weak_alias (__wait4, wait4) diff --git a/sysdeps/unix/bsd/sun/sunos4/waitpid.c b/sysdeps/unix/bsd/sun/sunos4/waitpid.c index 47129a8845..8378982ac7 100644 --- a/sysdeps/unix/bsd/sun/sunos4/waitpid.c +++ b/sysdeps/unix/bsd/sun/sunos4/waitpid.c @@ -1 +1 @@ -#include +#include diff --git a/sysdeps/unix/bsd/ultrix4/mips/sigvec.S b/sysdeps/unix/bsd/ultrix4/mips/sigvec.S index fdf919c7b8..20a5dd1c49 100644 --- a/sysdeps/unix/bsd/ultrix4/mips/sigvec.S +++ b/sysdeps/unix/bsd/ultrix4/mips/sigvec.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1995 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 diff --git a/sysdeps/unix/bsd/ultrix4/mips/vfork.S b/sysdeps/unix/bsd/ultrix4/mips/vfork.S index e194db0c40..37f6d8016d 100644 --- a/sysdeps/unix/bsd/ultrix4/mips/vfork.S +++ b/sysdeps/unix/bsd/ultrix4/mips/vfork.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -29,3 +29,5 @@ SYSCALL__ (vfork, 0) parent: ret nop + +weak_alias (__vfork, vfork) diff --git a/sysdeps/unix/bsd/ultrix4/setsid.S b/sysdeps/unix/bsd/ultrix4/setsid.S index e0f94b0868..4930c56dcf 100644 --- a/sysdeps/unix/bsd/ultrix4/setsid.S +++ b/sysdeps/unix/bsd/ultrix4/setsid.S @@ -1 +1 @@ -#include +#include diff --git a/sysdeps/unix/bsd/ultrix4/sysconf.c b/sysdeps/unix/bsd/ultrix4/sysconf.c index c0b32038bb..a9f3c5bbbe 100644 --- a/sysdeps/unix/bsd/ultrix4/sysconf.c +++ b/sysdeps/unix/bsd/ultrix4/sysconf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995 Free Software Foundation, Inc. Contributed by Ian Lance Taylor (ian@airs.com). The GNU C Library is free software; you can redistribute it and/or @@ -58,4 +58,4 @@ DEFUN(__sysconf, (name), int name) #define __sysconf __default_sysconf -#include +#include diff --git a/sysdeps/unix/bsd/ultrix4/wait3.S b/sysdeps/unix/bsd/ultrix4/wait3.S index 102ca18522..83910a5d7b 100644 --- a/sysdeps/unix/bsd/ultrix4/wait3.S +++ b/sysdeps/unix/bsd/ultrix4/wait3.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -20,3 +20,5 @@ Cambridge, MA 02139, USA. */ SYSCALL__ (wait3, 3) ret + +weak_alias (__wait3, wait3) diff --git a/sysdeps/unix/bsd/ultrix4/waitpid.S b/sysdeps/unix/bsd/ultrix4/waitpid.S index 3bc5ce2f5e..b64e528b69 100644 --- a/sysdeps/unix/bsd/ultrix4/waitpid.S +++ b/sysdeps/unix/bsd/ultrix4/waitpid.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -20,3 +20,5 @@ Cambridge, MA 02139, USA. */ SYSCALL__ (waitpid, 3) ret + +weak_alias (__waitpid, waitpid) diff --git a/sysdeps/unix/bsd/vax/pipe.S b/sysdeps/unix/bsd/vax/pipe.S index 9501744c11..10c681aac6 100644 --- a/sysdeps/unix/bsd/vax/pipe.S +++ b/sysdeps/unix/bsd/vax/pipe.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1995 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 @@ -24,3 +24,5 @@ SYSCALL__ (pipe, 1) movl r1, (r2) clrl r0 ret + +weak_alias (__pipe, pipe) diff --git a/sysdeps/unix/bsd/vax/wait.S b/sysdeps/unix/bsd/vax/wait.S index 5316be2026..77311b49bf 100644 --- a/sysdeps/unix/bsd/vax/wait.S +++ b/sysdeps/unix/bsd/vax/wait.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1995 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,3 +23,5 @@ SYSCALL__ (wait, 1) beq 1f movl r1, (r2) 1: ret + +weak_alias (__wait, wait) diff --git a/sysdeps/unix/bsd/vax/wait3.S b/sysdeps/unix/bsd/vax/wait3.S index 2e7ab13d38..2d8dba8297 100644 --- a/sysdeps/unix/bsd/vax/wait3.S +++ b/sysdeps/unix/bsd/vax/wait3.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1995 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 @@ -33,3 +33,5 @@ ENTRY(___wait3) .globl syscall_error error: jmp syscall_error + +weak_alias (__wait3, wait3) diff --git a/sysdeps/unix/mips/pipe.S b/sysdeps/unix/mips/pipe.S index 507a7537f5..f8ce56b118 100644 --- a/sysdeps/unix/mips/pipe.S +++ b/sysdeps/unix/mips/pipe.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -27,3 +27,5 @@ SYSCALL__ (pipe, 1) j ra move v0, zero nop + +weak_alias (__pipe, pipe) diff --git a/sysdeps/unix/mips/sigreturn.S b/sysdeps/unix/mips/sigreturn.S index 02e4d2519e..1e76bf5f99 100644 --- a/sysdeps/unix/mips/sigreturn.S +++ b/sysdeps/unix/mips/sigreturn.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1994 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -25,3 +25,5 @@ Cambridge, MA 02139, USA. */ ENTRY(__sigreturn) li v0, SYS_sigreturn syscall + +weak_alias (__sigreturn, sigreturn) diff --git a/sysdeps/unix/mips/wait.S b/sysdeps/unix/mips/wait.S index 2e9a259618..63bce849d4 100644 --- a/sysdeps/unix/mips/wait.S +++ b/sysdeps/unix/mips/wait.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1994 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -40,3 +40,5 @@ noerror: nop noarg: ret + +weak_alias (__wait, wait) diff --git a/sysdeps/unix/sysv/i386/sigreturn.S b/sysdeps/unix/sysv/i386/sigreturn.S index 47905b36fa..be1c6b89bf 100644 --- a/sysdeps/unix/sysv/i386/sigreturn.S +++ b/sysdeps/unix/sysv/i386/sigreturn.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995 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,3 +23,5 @@ ENTRY (__sigreturn) addl $4, %esp /* Pop the return PC. */ lcall $0xf, $0 /* Do the magic sigreturn trap. */ /* NOTREACHED */ + +weak_alias (__sigreturn, sigreturn) diff --git a/sysdeps/unix/sysv/irix4/getgroups.c b/sysdeps/unix/sysv/irix4/getgroups.c index b85b13942c..714f66077f 100644 --- a/sysdeps/unix/sysv/irix4/getgroups.c +++ b/sysdeps/unix/sysv/irix4/getgroups.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995 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 @@ -29,3 +29,5 @@ DEFUN(__getgroups, (n, groups), size_t n AND gid_t *groups) { return __syssgi (SGI_GETGROUPS, n, groups); } + +weak_alias (__getgroups, getgroups) diff --git a/sysdeps/unix/sysv/irix4/getrusage.c b/sysdeps/unix/sysv/irix4/getrusage.c index e160980a7f..fdd3a24042 100644 --- a/sysdeps/unix/sysv/irix4/getrusage.c +++ b/sysdeps/unix/sysv/irix4/getrusage.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995 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 @@ -31,3 +31,5 @@ DEFUN(__getrusage, (who, usage), { return __syssgi (SGI_RUSAGE, who, usage); } + +weak_alias (__getrusage, getrusage) diff --git a/sysdeps/unix/sysv/irix4/gettimeofday.c b/sysdeps/unix/sysv/irix4/gettimeofday.c index d92b3bb868..8a55f99984 100644 --- a/sysdeps/unix/sysv/irix4/gettimeofday.c +++ b/sysdeps/unix/sysv/irix4/gettimeofday.c @@ -1 +1,3 @@ #include + +weak_alias (__gettimeofday, gettimeofday) diff --git a/sysdeps/unix/sysv/irix4/pathconf.c b/sysdeps/unix/sysv/irix4/pathconf.c index 6e54661f4b..698e30aab7 100644 --- a/sysdeps/unix/sysv/irix4/pathconf.c +++ b/sysdeps/unix/sysv/irix4/pathconf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995 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 @@ -30,3 +30,5 @@ DEFUN(__pathconf, (path, name), CONST char *path AND int name) { return __syssgi (SGI_PATHCONF, PATHCONF, path, name); } + +weak_alias (__pathconf, pathconf) diff --git a/sysdeps/unix/sysv/irix4/setpgid.S b/sysdeps/unix/sysv/irix4/setpgid.S index 2e3135b51c..38ce9cbdcc 100644 --- a/sysdeps/unix/sysv/irix4/setpgid.S +++ b/sysdeps/unix/sysv/irix4/setpgid.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995 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,3 +20,5 @@ Cambridge, MA 02139, USA. */ PSEUDO (__setpgrp, bsdsetpgrp, 2) ret + +weak_alias (__setpgrp, setpgrp) diff --git a/sysdeps/unix/sysv/irix4/sigreturn.S b/sysdeps/unix/sysv/irix4/sigreturn.S index 1d624685fd..ebb5c1ae44 100644 --- a/sysdeps/unix/sysv/irix4/sigreturn.S +++ b/sysdeps/unix/sysv/irix4/sigreturn.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@cs.widener.edu). The GNU C Library is free software; you can redistribute it and/or @@ -21,3 +21,5 @@ Cambridge, MA 02139, USA. */ ENTRY(__sigreturn) li v0, SYS_sigreturn syscall + +weak_alias (__sigreturn, sigreturn) diff --git a/sysdeps/unix/sysv/irix4/sysconf.c b/sysdeps/unix/sysv/irix4/sysconf.c index 497c6a7828..a310362239 100644 --- a/sysdeps/unix/sysv/irix4/sysconf.c +++ b/sysdeps/unix/sysv/irix4/sysconf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995 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 @@ -31,3 +31,5 @@ DEFUN(__sysconf, (name), int name) return __syssgi (SGI_SYSCONF, name); } + +weak_alias (__sysconf, sysconf) diff --git a/sysdeps/unix/sysv/irix4/wait.S b/sysdeps/unix/sysv/irix4/wait.S index a50a5e6816..9f2afa7997 100644 --- a/sysdeps/unix/sysv/irix4/wait.S +++ b/sysdeps/unix/sysv/irix4/wait.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@cs.widener.edu). The GNU C Library is free software; you can redistribute it and/or @@ -38,3 +38,5 @@ noerror: nop noarg: ret + +weak_alias (__wait, wait) diff --git a/sysdeps/unix/sysv/irix4/wait3.S b/sysdeps/unix/sysv/irix4/wait3.S index d4ed738f8c..54065aefdf 100644 --- a/sysdeps/unix/sysv/irix4/wait3.S +++ b/sysdeps/unix/sysv/irix4/wait3.S @@ -1 +1 @@ -#include +#include diff --git a/sysdeps/unix/sysv/irix4/waitpid.c b/sysdeps/unix/sysv/irix4/waitpid.c index 47129a8845..8378982ac7 100644 --- a/sysdeps/unix/sysv/irix4/waitpid.c +++ b/sysdeps/unix/sysv/irix4/waitpid.c @@ -1 +1 @@ -#include +#include diff --git a/sysdeps/unix/sysv/sco3.2.4/getgroups.c b/sysdeps/unix/sysv/sco3.2.4/getgroups.c index 82e5fbab64..68966bc5df 100644 --- a/sysdeps/unix/sysv/sco3.2.4/getgroups.c +++ b/sysdeps/unix/sysv/sco3.2.4/getgroups.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995 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 @@ -41,3 +41,5 @@ DEFUN(__getgroups, (size, list), int size AND gid_t *list) return size; } + +weak_alias (__getgroups, getgroups) diff --git a/sysdeps/unix/sysv/sco3.2.4/pathconf.S b/sysdeps/unix/sysv/sco3.2.4/pathconf.S index 2c737620f6..1c4dd9571c 100644 --- a/sysdeps/unix/sysv/sco3.2.4/pathconf.S +++ b/sysdeps/unix/sysv/sco3.2.4/pathconf.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995 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,3 +20,5 @@ Cambridge, MA 02139, USA. */ SYSCALL__ (pathconf, 2) ret + +weak_alias (__pathconf, pathconf) diff --git a/sysdeps/unix/sysv/sco3.2.4/setpgid.c b/sysdeps/unix/sysv/sco3.2.4/setpgid.c index 928e6d0120..32f7daf005 100644 --- a/sysdeps/unix/sysv/sco3.2.4/setpgid.c +++ b/sysdeps/unix/sysv/sco3.2.4/setpgid.c @@ -1 +1 @@ -#include +#include diff --git a/sysdeps/unix/sysv/sco3.2.4/setsid.c b/sysdeps/unix/sysv/sco3.2.4/setsid.c index 4a0a706aa5..6337652552 100644 --- a/sysdeps/unix/sysv/sco3.2.4/setsid.c +++ b/sysdeps/unix/sysv/sco3.2.4/setsid.c @@ -1 +1 @@ -#include +#include diff --git a/sysdeps/unix/sysv/sco3.2.4/sigaction.S b/sysdeps/unix/sysv/sco3.2.4/sigaction.S index f5453da4cf..dc1bb418d6 100644 --- a/sysdeps/unix/sysv/sco3.2.4/sigaction.S +++ b/sysdeps/unix/sysv/sco3.2.4/sigaction.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1994 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1994, 1995 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,3 +25,5 @@ ENTRY (__sigaction) DO_CALL (sigaction, 3) jb syscall_error ret + +weak_alias (__sigaction, sigaction) diff --git a/sysdeps/unix/sysv/sco3.2.4/sigprocmask.S b/sysdeps/unix/sysv/sco3.2.4/sigprocmask.S index 148741ec8c..ff199158a4 100644 --- a/sysdeps/unix/sysv/sco3.2.4/sigprocmask.S +++ b/sysdeps/unix/sysv/sco3.2.4/sigprocmask.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995 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,3 +20,5 @@ Cambridge, MA 02139, USA. */ SYSCALL__ (sigprocmask, 3) ret + +weak_alias (__sigprocmask, sigprocmask) diff --git a/sysdeps/unix/sysv/sco3.2.4/sysconf.S b/sysdeps/unix/sysv/sco3.2.4/sysconf.S index 58e14654d1..631e5e977a 100644 --- a/sysdeps/unix/sysv/sco3.2.4/sysconf.S +++ b/sysdeps/unix/sysv/sco3.2.4/sysconf.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1994 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1994, 1995 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 @@ -26,3 +26,5 @@ ENTRY (__sysconf) DO_CALL (sysconf, 1) /* No; use the SCO system call. */ ret tzname: jmp C_SYMBOL_NAME(__tzname_max) /* Yes; bounce to __tzname_max (). */ + +weak_alias (__sysconf, sysconf) diff --git a/sysdeps/unix/sysv/sco3.2.4/waitpid.S b/sysdeps/unix/sysv/sco3.2.4/waitpid.S index 63decf1d9c..523ef37e53 100644 --- a/sysdeps/unix/sysv/sco3.2.4/waitpid.S +++ b/sysdeps/unix/sysv/sco3.2.4/waitpid.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1994 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1994, 1995 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 @@ -32,3 +32,5 @@ ENTRY (__waitpid) je null movl r1, (scratch) /* Yes; store the status there. */ null: ret + +weak_alias (__waitpid, waitpid) diff --git a/sysdeps/unix/sysv/sysv4/getdtsz.c b/sysdeps/unix/sysv/sysv4/getdtsz.c index 9de35d5af6..c1ae6108fb 100644 --- a/sysdeps/unix/sysv/sysv4/getdtsz.c +++ b/sysdeps/unix/sysv/sysv4/getdtsz.c @@ -1,2 +1,2 @@ /* Solaris uses sysconf ala POSIX.1. */ -#include +#include diff --git a/sysdeps/unix/sysv/sysv4/gethostname.c b/sysdeps/unix/sysv/sysv4/gethostname.c index c1c9e0a454..cce1149e7f 100644 --- a/sysdeps/unix/sysv/sysv4/gethostname.c +++ b/sysdeps/unix/sysv/sysv4/gethostname.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -29,3 +29,5 @@ DEFUN(__gethostname, (name, namelen), char *name AND size_t namelen) { return __sysinfo (SI_HOSTNAME, name, namelen); } + +weak_alias (__gethostname, gethostname) diff --git a/sysdeps/unix/sysv/sysv4/getpagesize.c b/sysdeps/unix/sysv/sysv4/getpagesize.c index 241348cbfb..6119640758 100644 --- a/sysdeps/unix/sysv/sysv4/getpagesize.c +++ b/sysdeps/unix/sysv/sysv4/getpagesize.c @@ -1,2 +1,2 @@ /* Solaris uses sysconf ala POSIX.1. */ -#include +#include diff --git a/sysdeps/unix/sysv/sysv4/i386/lstat.S b/sysdeps/unix/sysv/sysv4/i386/lstat.S index 0ca214fa47..52ffdbadfd 100644 --- a/sysdeps/unix/sysv/sysv4/i386/lstat.S +++ b/sysdeps/unix/sysv/sysv4/i386/lstat.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995 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 @@ -33,3 +33,5 @@ ENTRY (__lstat) DO_CALL (lxstat, 3) /* Do the syscall. */ jb syscall_error /* Check for error. */ ret /* Return success. */ + +weak_alias (__lstat, lstat) diff --git a/sysdeps/unix/sysv/sysv4/i386/mknod.S b/sysdeps/unix/sysv/sysv4/i386/mknod.S index 4c879cbefb..21f932c921 100644 --- a/sysdeps/unix/sysv/sysv4/i386/mknod.S +++ b/sysdeps/unix/sysv/sysv4/i386/mknod.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995 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 @@ -32,3 +32,5 @@ ENTRY (__mknod) DO_CALL (xmknod, 3) /* Do the syscall. */ jb syscall_error /* Check for error. */ ret /* Return success. */ + +weak_alias (__mknod, mknod) diff --git a/sysdeps/unix/sysv/sysv4/i386/stat.S b/sysdeps/unix/sysv/sysv4/i386/stat.S index 72829332fd..3a5107c267 100644 --- a/sysdeps/unix/sysv/sysv4/i386/stat.S +++ b/sysdeps/unix/sysv/sysv4/i386/stat.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995 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 @@ -33,3 +33,5 @@ ENTRY (__stat) DO_CALL (xstat, 3) /* Do the syscall. */ jb syscall_error /* Check for error. */ ret /* Return success. */ + +weak_alias (__stat, stat) diff --git a/sysdeps/unix/sysv/sysv4/i386/vfork.S b/sysdeps/unix/sysv/sysv4/i386/vfork.S index 1cdebcded9..bbe99fbc41 100644 --- a/sysdeps/unix/sysv/sysv4/i386/vfork.S +++ b/sysdeps/unix/sysv/sysv4/i386/vfork.S @@ -1 +1 @@ -#include +#include diff --git a/sysdeps/unix/sysv/sysv4/setpgid.c b/sysdeps/unix/sysv/sysv4/setpgid.c index 90eff3c51c..e71f0db7f0 100644 --- a/sysdeps/unix/sysv/sysv4/setpgid.c +++ b/sysdeps/unix/sysv/sysv4/setpgid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995 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 @@ -30,3 +30,5 @@ DEFUN(__setpgrp, (pid, pgid), int pid AND int pgid) { return __pgrpsys (1, pid, pgid); } + +weak_alias (__setpgrp, setpgrp) diff --git a/sysdeps/unix/sysv/sysv4/setsid.c b/sysdeps/unix/sysv/sysv4/setsid.c index a32b39ad3b..f0d6c8a4cd 100644 --- a/sysdeps/unix/sysv/sysv4/setsid.c +++ b/sysdeps/unix/sysv/sysv4/setsid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995 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 @@ -30,3 +30,5 @@ DEFUN_VOID(__setsid) { return __pgrpsys (3); } + +weak_alias (__setsid, setsid) diff --git a/sysdeps/unix/sysv/sysv4/sigaction.c b/sysdeps/unix/sysv/sysv4/sigaction.c index 2644fb03ad..68fd7a1846 100644 --- a/sysdeps/unix/sysv/sysv4/sigaction.c +++ b/sysdeps/unix/sysv/sysv4/sigaction.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995 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 @@ -75,3 +75,5 @@ DEFUN(__sigaction, (sig, act, oact), return 0; } + +weak_alias (__sigaction, sigaction) diff --git a/sysdeps/unix/sysv/sysv4/sigprocmask.S b/sysdeps/unix/sysv/sysv4/sigprocmask.S index 5da366da82..51fddb0bee 100644 --- a/sysdeps/unix/sysv/sysv4/sigprocmask.S +++ b/sysdeps/unix/sysv/sysv4/sigprocmask.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -20,3 +20,5 @@ Cambridge, MA 02139, USA. */ SYSCALL__ (sigprocmask, 3) ret + +weak_alias (__sigprocmask, sigprocmask) diff --git a/sysdeps/unix/sysv/sysv4/solaris2/utimes.S b/sysdeps/unix/sysv/sysv4/solaris2/utimes.S index 16baf448b1..54a043c835 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/utimes.S +++ b/sysdeps/unix/sysv/sysv4/solaris2/utimes.S @@ -1,2 +1,2 @@ /* Solaris has the BSD `utimes' function. */ -#include +#include diff --git a/sysdeps/unix/sysv/sysv4/sysconf.c b/sysdeps/unix/sysv/sysv4/sysconf.c index 71d3d08725..607cd05d14 100644 --- a/sysdeps/unix/sysv/sysv4/sysconf.c +++ b/sysdeps/unix/sysv/sysv4/sysconf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -177,3 +177,5 @@ DEFUN(__sysconf, (name), int name) #endif } } + +weak_alias (__sysconf, sysconf) diff --git a/sysdeps/unix/sysv/sysv4/waitpid.c b/sysdeps/unix/sysv/sysv4/waitpid.c index a0ca8c2f12..f54df4bf6b 100644 --- a/sysdeps/unix/sysv/sysv4/waitpid.c +++ b/sysdeps/unix/sysv/sysv4/waitpid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1994 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -116,3 +116,5 @@ DEFUN(__waitpid, (pid, stat_loc, options), any PID. */ return infop.__pid; } + +weak_alias (__waitpid, waitpid) diff --git a/sysdeps/vax/infnan.c b/sysdeps/vax/infnan.c index aa755ed6bc..62ec9dca0f 100644 --- a/sysdeps/vax/infnan.c +++ b/sysdeps/vax/infnan.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1995 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 @@ -58,3 +58,5 @@ DEFUN(__infnan, (error), int error) } #endif + +weak_alias (__infnan, infnan) diff --git a/sysdeps/vax/memccpy.c b/sysdeps/vax/memccpy.c index 84df894c3f..9849761f13 100644 --- a/sysdeps/vax/memccpy.c +++ b/sysdeps/vax/memccpy.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1995 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 @@ -41,3 +41,5 @@ DEFUN(__memccpy, (dest, src, c, n), (void) memcpy (dest, src, (char *) found + 1 - (char *) src); return (PTR) ((char *) dest + ((char *) found + 1 - (char *) src)); } + +weak_alias (__memccpy, memccpy) From cc8aa8bf32b3b75564675cc9afc568acc9d48b11 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 22 Jan 1995 20:28:20 +0000 Subject: [PATCH 0500/4487] [weak_alias] (index): Define as weak alias for strchr. --- sysdeps/alpha/strchr.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sysdeps/alpha/strchr.c b/sysdeps/alpha/strchr.c index 666e0c0196..69afa4b87f 100644 --- a/sysdeps/alpha/strchr.c +++ b/sysdeps/alpha/strchr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. 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 @@ -77,3 +77,8 @@ strchr (const char *str, int c) } } } + +#ifdef weak_alias +#undef index +weak_alias (strchr, index) +#endif From ba5bfe42356004afd6ce5c6d51886d3e8cf01ac3 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 25 Jan 1995 21:38:14 +0000 Subject: [PATCH 0501/4487] Remove __NORETURN; it's obsolete. --- sysdeps/m68k/__longjmp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sysdeps/m68k/__longjmp.c b/sysdeps/m68k/__longjmp.c index 10e1705f9c..debd0f1dc5 100644 --- a/sysdeps/m68k/__longjmp.c +++ b/sysdeps/m68k/__longjmp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993, 1994, 1995 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 @@ -21,7 +21,6 @@ Cambridge, MA 02139, USA. */ /* Jump to the position specified by ENV, causing the setjmp call there to return VAL, or 1 if VAL is 0. */ -__NORETURN void __longjmp (const __jmp_buf env, int val) { From 1a0149ddaae350b3d4bb1f8c65eef2b2befdf66c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 25 Jan 1995 22:39:24 +0000 Subject: [PATCH 0502/4487] Included file was renamed from __getdents.S. --- sysdeps/unix/bsd/hp/m68k/getdents.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/bsd/hp/m68k/getdents.S b/sysdeps/unix/bsd/hp/m68k/getdents.S index 6d18c04eca..be449b2bcb 100644 --- a/sysdeps/unix/bsd/hp/m68k/getdents.S +++ b/sysdeps/unix/bsd/hp/m68k/getdents.S @@ -1 +1 @@ -#include +#include From 9207d658052a6c73c64e19907bd48aeda65b3f8a Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 26 Jan 1995 01:21:48 +0000 Subject: [PATCH 0503/4487] Renamed __setpgrp to __setpgid, added weak aliases setpgid and setpgrp. --- sysdeps/unix/sysv/sysv4/setpgid.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/sysv4/setpgid.c b/sysdeps/unix/sysv/sysv4/setpgid.c index e71f0db7f0..0a1849272d 100644 --- a/sysdeps/unix/sysv/sysv4/setpgid.c +++ b/sysdeps/unix/sysv/sysv4/setpgid.c @@ -26,9 +26,10 @@ extern int __pgrpsys __P ((int type, ...)); If PID is zero, the current process's process group ID is set. If PGID is zero, the process ID of the process is used. */ int -DEFUN(__setpgrp, (pid, pgid), int pid AND int pgid) +DEFUN(__setpgid, (pid, pgid), int pid AND int pgid) { return __pgrpsys (1, pid, pgid); } -weak_alias (__setpgrp, setpgrp) +weak_alias (__setpgid, setpgid) +weak_alias (__setpgid, setpgrp) From 86c4edb31b2632c6731dd0ae0419d5eea13cde9d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 26 Jan 1995 01:22:57 +0000 Subject: [PATCH 0504/4487] Renamed __getpgrp to __getpgid, added weak alias getpgid. --- sysdeps/unix/sysv/sysv4/getpgid.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/sysv4/getpgid.c b/sysdeps/unix/sysv/sysv4/getpgid.c index f777769924..c957bf933b 100644 --- a/sysdeps/unix/sysv/sysv4/getpgid.c +++ b/sysdeps/unix/sysv/sysv4/getpgid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995 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,7 +25,9 @@ extern int __pgrpsys __P ((int type, ...)); /* Get the process group ID of process PID. */ int -DEFUN(__getpgrp, (pid), pid_t pid) +DEFUN(__getpgid, (pid), pid_t pid) { return __pgrpsys (0, pid); } + +weak_alias (__getpgid, getpgid) From a38d08f7b4434cbc87eccb1ba8792d0732099b8a Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 26 Jan 1995 01:24:28 +0000 Subject: [PATCH 0505/4487] Use subcall 5 to __pgrpsys. --- sysdeps/unix/sysv/sysv4/setpgid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/sysv4/setpgid.c b/sysdeps/unix/sysv/sysv4/setpgid.c index 0a1849272d..b9e06dc719 100644 --- a/sysdeps/unix/sysv/sysv4/setpgid.c +++ b/sysdeps/unix/sysv/sysv4/setpgid.c @@ -28,7 +28,7 @@ extern int __pgrpsys __P ((int type, ...)); int DEFUN(__setpgid, (pid, pgid), int pid AND int pgid) { - return __pgrpsys (1, pid, pgid); + return __pgrpsys (5, pid, pgid); } weak_alias (__setpgid, setpgid) From c54278121e1909f125c8997c32eedfb14f4a1b06 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 26 Jan 1995 01:25:38 +0000 Subject: [PATCH 0506/4487] Use subcall 4 to __pgrpsys. --- sysdeps/unix/sysv/sysv4/getpgid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/sysv4/getpgid.c b/sysdeps/unix/sysv/sysv4/getpgid.c index c957bf933b..309e2f11e4 100644 --- a/sysdeps/unix/sysv/sysv4/getpgid.c +++ b/sysdeps/unix/sysv/sysv4/getpgid.c @@ -27,7 +27,7 @@ extern int __pgrpsys __P ((int type, ...)); int DEFUN(__getpgid, (pid), pid_t pid) { - return __pgrpsys (0, pid); + return __pgrpsys (4, pid); } weak_alias (__getpgid, getpgid) From f612f28027d9a60266bb802ed29ea791fac8c29e Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 26 Jan 1995 01:27:55 +0000 Subject: [PATCH 0507/4487] Included file was renamed from __getpgrp.c. --- sysdeps/unix/sysv/sco3.2.4/getpgid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/sco3.2.4/getpgid.c b/sysdeps/unix/sysv/sco3.2.4/getpgid.c index 6829b74312..3b47d9dee2 100644 --- a/sysdeps/unix/sysv/sco3.2.4/getpgid.c +++ b/sysdeps/unix/sysv/sco3.2.4/getpgid.c @@ -1 +1 @@ -#include +#include From 1bf2d9ab9ba8a51855273a8500d362a1bf18f9f2 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 26 Jan 1995 01:28:44 +0000 Subject: [PATCH 0508/4487] Included file was renamed from setpgrp.c. --- sysdeps/unix/sysv/sco3.2.4/setpgid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/sco3.2.4/setpgid.c b/sysdeps/unix/sysv/sco3.2.4/setpgid.c index 32f7daf005..cc9c4cd61b 100644 --- a/sysdeps/unix/sysv/sco3.2.4/setpgid.c +++ b/sysdeps/unix/sysv/sco3.2.4/setpgid.c @@ -1 +1 @@ -#include +#include From 628d175a3c9254e8658a1560acbd2aca20fbaea7 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 26 Jan 1995 01:31:06 +0000 Subject: [PATCH 0509/4487] (__getpgrp): Renamed to __getpgid, with weak alias getpgid. --- sysdeps/unix/sysv/irix4/getpgid.S | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/irix4/getpgid.S b/sysdeps/unix/sysv/irix4/getpgid.S index c13a69170a..fbef7a2b27 100644 --- a/sysdeps/unix/sysv/irix4/getpgid.S +++ b/sysdeps/unix/sysv/irix4/getpgid.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995 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 @@ -18,5 +18,7 @@ Cambridge, MA 02139, USA. */ #include -PSEUDO (__getpgrp, bsdgetpgrp, 1) +PSEUDO (__getpgid, bsdgetpgrp, 1) ret + +weak_alias (__getpgid, getpgid) From c9db5502eba875dd712553d8c44374f4c9dc52e8 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 26 Jan 1995 01:32:08 +0000 Subject: [PATCH 0510/4487] Renamed __setpgrp to __setpgid, added weak aliases setpgid and setpgrp. --- sysdeps/unix/sysv/irix4/setpgid.S | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/irix4/setpgid.S b/sysdeps/unix/sysv/irix4/setpgid.S index 38ce9cbdcc..9267054fe9 100644 --- a/sysdeps/unix/sysv/irix4/setpgid.S +++ b/sysdeps/unix/sysv/irix4/setpgid.S @@ -18,7 +18,8 @@ Cambridge, MA 02139, USA. */ #include -PSEUDO (__setpgrp, bsdsetpgrp, 2) +PSEUDO (__setpgid, bsdsetpgrp, 2) ret -weak_alias (__setpgrp, setpgrp) +weak_alias (__setpgid, setpgid) +weak_alias (__setpgid, setpgrp) From d6961ffadfdb6007d0959cf1c843a954261645d4 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 26 Jan 1995 01:43:07 +0000 Subject: [PATCH 0511/4487] (sysdep_routines): Removed __setpgid, __getpgid. --- sysdeps/unix/sysv/sysv4/Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/sysv4/Makefile b/sysdeps/unix/sysv/sysv4/Makefile index d44214b580..0c149da85c 100644 --- a/sysdeps/unix/sysv/sysv4/Makefile +++ b/sysdeps/unix/sysv/sysv4/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1992, 1993 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1995 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 @@ -18,8 +18,7 @@ ifeq ($(subdir),posix) -sysdep_routines := $(sysdep_routines) sysconfig pgrpsys \ - __getpgid __setpgid __waitid +sysdep_routines := $(sysdep_routines) sysconfig pgrpsys __waitid endif From 1d3e470455d8089c37aa3f98a25875d69c11318f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 26 Jan 1995 03:46:04 +0000 Subject: [PATCH 0512/4487] (environ): Define as weak alias for __environ. --- sysdeps/unix/bsd/Attic/osf1/alpha/start.S | 6 ++++-- sysdeps/unix/bsd/ultrix4/mips/start.S | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/start.S b/sysdeps/unix/bsd/Attic/osf1/alpha/start.S index d88b47e8e7..8b7109a512 100644 --- a/sysdeps/unix/bsd/Attic/osf1/alpha/start.S +++ b/sysdeps/unix/bsd/Attic/osf1/alpha/start.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -18,8 +18,10 @@ Cambridge, MA 02139, USA. */ #include -#ifndef HAVE_GNU_LD +#ifndef HAVE_WEAK_SYMBOLS #define __environ environ +#else +weak_alias (__environ, environ) #endif .comm __environ, 8 diff --git a/sysdeps/unix/bsd/ultrix4/mips/start.S b/sysdeps/unix/bsd/ultrix4/mips/start.S index 6146b57726..ec0f9d833d 100644 --- a/sysdeps/unix/bsd/ultrix4/mips/start.S +++ b/sysdeps/unix/bsd/ultrix4/mips/start.S @@ -18,8 +18,10 @@ Cambridge, MA 02139, USA. */ #include -#ifndef HAVE_GNU_LD +#ifndef HAVE_WEAK_SYMBOLS #define __environ environ +#else +weak_alias (__environ, environ) #endif .comm __environ, 4 From 05834bf1c793854c40dda6b71522234a1c8a5c71 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 26 Jan 1995 05:36:51 +0000 Subject: [PATCH 0513/4487] [ASSEMBLER]: Protect macros with this. --- sysdeps/unix/bsd/hp/m68k/sysdep.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/bsd/hp/m68k/sysdep.h b/sysdeps/unix/bsd/hp/m68k/sysdep.h index bd30bb8ba0..3487ab2027 100644 --- a/sysdeps/unix/bsd/hp/m68k/sysdep.h +++ b/sysdeps/unix/bsd/hp/m68k/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993, 1994, 1995 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,6 +20,8 @@ Cambridge, MA 02139, USA. */ #include +#ifdef ASSEMBLER + #define POUND # #ifdef __STDC__ @@ -50,3 +52,5 @@ Cambridge, MA 02139, USA. */ #define r0 d0 #define r1 d1 #define MOVE(x,y) movel x , y + +#endif /* ASSEMBLER */ From f6aa1372e124578e8b356ea97e592b4a46b97421 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 26 Jan 1995 06:23:39 +0000 Subject: [PATCH 0514/4487] Call getpgrp instead of __getpgrp. --- sysdeps/unix/bsd/sun/sunos4/wait4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/bsd/sun/sunos4/wait4.c b/sysdeps/unix/bsd/sun/sunos4/wait4.c index 4d15ddc9e8..919cd7c42c 100644 --- a/sysdeps/unix/bsd/sun/sunos4/wait4.c +++ b/sysdeps/unix/bsd/sun/sunos4/wait4.c @@ -40,7 +40,7 @@ DEFUN(__wait4, (pid, stat_loc, options, usage), break; case WAIT_MYPGRP: - pid = - __getpgrp (0); + pid = - getpgrp (); break; } From a1350964e9872e8b6b7737df25bab7fd756e5c40 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 27 Jan 1995 20:48:38 +0000 Subject: [PATCH 0515/4487] [ASSEMBLER]: Protect macros with this. --- sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.h | 7 ++++++- sysdeps/unix/bsd/sequent/i386/sysdep.h | 6 +++++- sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h | 8 +++++--- sysdeps/unix/bsd/sun/m68k/sysdep.h | 8 +++++--- sysdeps/unix/bsd/vax/sysdep.h | 6 +++++- sysdeps/unix/mips/sysdep.h | 7 ++++++- sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h | 5 ++++- 7 files changed, 36 insertions(+), 11 deletions(-) diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.h b/sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.h index 279461b089..3669a69b9b 100644 --- a/sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.h +++ b/sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -17,6 +17,9 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include + +#ifdef ASSEMBLER + #include /* get PAL_callsys */ #include @@ -66,3 +69,5 @@ Cambridge, MA 02139, USA. */ #define r0 v0 #define r1 a4 #define MOVE(x,y) mov x, y + +#endif /* ASSEMBLER */ diff --git a/sysdeps/unix/bsd/sequent/i386/sysdep.h b/sysdeps/unix/bsd/sequent/i386/sysdep.h index 05fe24cef7..f1365e764e 100644 --- a/sysdeps/unix/bsd/sequent/i386/sysdep.h +++ b/sysdeps/unix/bsd/sequent/i386/sysdep.h @@ -1,5 +1,5 @@ /* System call interface code for Sequent Symmetry running Dynix version 3. -Copyright (C) 1993 Free Software Foundation, Inc. +Copyright (C) 1993, 1995 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 @@ -19,6 +19,8 @@ Cambridge, MA 02139, USA. */ #include +#ifdef ASSEMBLER + /* Get the symbols for system call interrupts. */ #include @@ -76,3 +78,5 @@ Cambridge, MA 02139, USA. */ #define r1 %ecx /* Secondary return-value register. */ #undef scratch #define scratch %edx /* Call-clobbered register for random use. */ + +#endif /* ASSEMBLER */ diff --git a/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h b/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h index 43ef480ee9..a62c17edbc 100644 --- a/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h +++ b/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1994 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1994, 1995 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 @@ -16,10 +16,10 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* This code wants to be run through m4. */ - #include +#ifdef ASSEMBLER + #define POUND # #ifdef __STDC__ @@ -52,3 +52,5 @@ Cambridge, MA 02139, USA. */ #define r0 d0 #define r1 d1 #define MOVE(x,y) movel x , y + +#endif diff --git a/sysdeps/unix/bsd/sun/m68k/sysdep.h b/sysdeps/unix/bsd/sun/m68k/sysdep.h index 8655f37147..80f6aba7b0 100644 --- a/sysdeps/unix/bsd/sun/m68k/sysdep.h +++ b/sysdeps/unix/bsd/sun/m68k/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1994, 1995 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 @@ -16,10 +16,10 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* This code wants to be run through m4; see sysdeps/m68k/Makefile. */ - #include +#ifdef ASSEMBLER + #define POUND # #ifdef __STDC__ @@ -58,3 +58,5 @@ Cambridge, MA 02139, USA. */ #define r0 d0 #define r1 d1 #define MOVE(x,y) movel x , y + +#endif /* ASSEMBLER */ diff --git a/sysdeps/unix/bsd/vax/sysdep.h b/sysdeps/unix/bsd/vax/sysdep.h index 60e01acf7b..aeddad99ae 100644 --- a/sysdeps/unix/bsd/vax/sysdep.h +++ b/sysdeps/unix/bsd/vax/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1995 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 @@ -18,6 +18,8 @@ Cambridge, MA 02139, USA. */ #include +#ifdef ASSEMBLER + #ifdef __STDC__ #define ENTRY(name) \ .globl _##name; \ @@ -49,3 +51,5 @@ Cambridge, MA 02139, USA. */ #endif #define MOVE(x,y) movl x , y + +#endif /* ASSEMBLER */ diff --git a/sysdeps/unix/mips/sysdep.h b/sysdeps/unix/mips/sysdep.h index bbf742b733..ee047fb28e 100644 --- a/sysdeps/unix/mips/sysdep.h +++ b/sysdeps/unix/mips/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -17,6 +17,9 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include + +#ifdef ASSEMBLER + #include #ifdef __STDC__ @@ -65,3 +68,5 @@ Cambridge, MA 02139, USA. */ #define r1 v1 /* The mips move insn is d,s. */ #define MOVE(x,y) move y , x + +#endif diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h index 90e2b38427..edb98309e6 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1994 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -21,6 +21,8 @@ Cambridge, MA 02139, USA. */ #include +#ifdef ASSEMBLER + /* As of gcc-2.6.0, it complains about pound signs in front of things that aren't arguments to the macro. So we use this to pull it off instead. */ @@ -46,3 +48,4 @@ Cambridge, MA 02139, USA. */ #define r1 %o1 #define MOVE(x,y) mov x, y +#endif /* ASSEMBLER */ From 37da91a00d7295b56dc889dc2a0bc72be97b413a Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 3 Feb 1995 23:15:48 +0000 Subject: [PATCH 0516/4487] Use `long int' for sigcode. --- sysdeps/mach/hurd/mips/exc2signal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/mach/hurd/mips/exc2signal.c b/sysdeps/mach/hurd/mips/exc2signal.c index 7a9ab31d9c..f907c89cf0 100644 --- a/sysdeps/mach/hurd/mips/exc2signal.c +++ b/sysdeps/mach/hurd/mips/exc2signal.c @@ -1,5 +1,5 @@ /* Translate Mach exception codes into signal numbers. MIPS version. -Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc. +Copyright (C) 1991, 1992, 1994, 1995 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 @@ -26,7 +26,7 @@ Cambridge, MA 02139, USA. */ void _hurd_exception2signal (int exception, int code, int subcode, - int *signo, int *sigcode, int *error) + int *signo, long int *sigcode, int *error) { *error = 0; From 14b832adfda73961eb0c8b143941fcb4132faa4b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 3 Feb 1995 23:20:27 +0000 Subject: [PATCH 0517/4487] (_hurd_setup_sighandler): Use `long int' for sigcode. Use explicit register numbers instead of names. (_hurdsig_rcv_interrupted_p): Use _hurdsig_catch_fault. --- sysdeps/mach/hurd/mips/trampoline.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/sysdeps/mach/hurd/mips/trampoline.c b/sysdeps/mach/hurd/mips/trampoline.c index 2161cbae7c..f03ad5852f 100644 --- a/sysdeps/mach/hurd/mips/trampoline.c +++ b/sysdeps/mach/hurd/mips/trampoline.c @@ -1,5 +1,5 @@ /* Set thread_state for sighandler, and sigcontext to recover. MIPS version. -Copyright (C) 1994 Free Software Foundation, Inc. +Copyright (C) 1994, 1995 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 @@ -36,7 +36,7 @@ struct mach_msg_trap_args struct sigcontext * _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, - int signo, int sigcode, + int signo, long int sigcode, int rpc_wait, struct machine_thread_all_state *state) { @@ -59,7 +59,7 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, state->set = (1 << MIPS_THREAD_STATE) | (1 << MIPS_EXC_STATE); if (state->exc.coproc_state & SC_COPROC_USE_FPU) { - memcpy (&state->fpu, &ss->context->sc_mips_loat_state, + memcpy (&state->fpu, &ss->context->sc_mips_float_state, sizeof (state->fpu)); state->set |= (1 << MIPS_FLOAT_STATE); } @@ -191,7 +191,7 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, asm volatile (".set noat; .set noreorder; .set nomacro\n" /* Retry the interrupted mach_msg system call. */ - "li v0, -25\n" /* mach_msg_trap */ + "li $2, -25\n" /* mach_msg_trap */ "syscall\n" /* When the sigcontext was saved, v0 was MACH_RCV_INTERRUPTED. But now the message receive has completed and the original caller of @@ -199,13 +199,13 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, see the final return value of the message receive in v0. So store the new v0 value into the sc_gpr[1] member of the sigcontext (whose address is in v1 to make this code simpler). */ - "sw v0, (v1)\n" + "sw $2, ($3)\n" /* Since the argument registers needed to have the mach_msg_trap arguments, we've stored the arguments to the handler function in registers s1..s3 ($17..$19). */ - "move a0, s1\n" - "move a1, s2\n" - "move a2, s3\n"); + "move $4, $17\n" + "move $5, $18\n" + "move $6, $19\n"); trampoline: /* Entry point for running the handler normally. The arguments to the @@ -219,7 +219,7 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, ("jal $1; nop\n" /* Call the handler function. */ /* Call __sigreturn (SCP); this cannot return. */ "j %0\n" - "move a0, s0" /* Set up arg from saved SCP in delay slot. */ + "move $4, $16" /* Set up arg from saved SCP in delay slot. */ : : "i" (&__sigreturn)); /* NOTREACHED */ @@ -237,9 +237,12 @@ int _hurdsig_rcv_interrupted_p (struct machine_thread_all_state *state, mach_port_t *port) { - if (! setjmp (_hurd_sigthread_fault_env)) + const unsigned int *const pc = (void *) state->basic.pc; + + if (_hurdsig_catch_fault (SIGSEGV)) + assert (_hurdsig_fault_sigcode == (long int) pc); + else { - const unsigned int *pc = (void *) state->basic.pc; if (state->basic.r2 == MACH_RCV_INTERRUPTED && pc[-1] == 0xc) /* syscall */ { From b0dcd6754fe06b4ad0d02c84e10ab425291b19e3 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 3 Feb 1995 23:22:27 +0000 Subject: [PATCH 0518/4487] Remove obsolete __NORETURN keyword. --- sysdeps/mips/__longjmp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sysdeps/mips/__longjmp.c b/sysdeps/mips/__longjmp.c index 5c7eb683fb..7ea3df2827 100644 --- a/sysdeps/mips/__longjmp.c +++ b/sysdeps/mips/__longjmp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -26,7 +26,6 @@ Cambridge, MA 02139, USA. */ #error This file uses GNU C extensions; you must compile with GCC. #endif -__NORETURN void DEFUN(__longjmp, (env, val_arg), CONST __jmp_buf env AND int val_arg) { From ff775c1262ac0f4c3c75694c67efea90a31c1af7 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 3 Feb 1995 23:24:38 +0000 Subject: [PATCH 0519/4487] Use `li' insn instead of `move'. --- sysdeps/mips/bsd-_setjmp.S | 4 ++-- sysdeps/mips/bsd-setjmp.S | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/mips/bsd-_setjmp.S b/sysdeps/mips/bsd-_setjmp.S index b0f2e8d064..6e6844cc52 100644 --- a/sysdeps/mips/bsd-_setjmp.S +++ b/sysdeps/mips/bsd-_setjmp.S @@ -1,5 +1,5 @@ /* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. MIPS version. -Copyright (C) 1994 Free Software Foundation, Inc. +Copyright (C) 1994, 1995 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,4 +25,4 @@ Cambridge, MA 02139, USA. */ ENTRY (setjmp) j C_SYMBOL_NAME (__sigsetjmp) - move a1, zero /* Pass a second argument of zero. */ + li a1, zero /* Pass a second argument of zero. */ diff --git a/sysdeps/mips/bsd-setjmp.S b/sysdeps/mips/bsd-setjmp.S index 103edd3a7c..5cd090a31c 100644 --- a/sysdeps/mips/bsd-setjmp.S +++ b/sysdeps/mips/bsd-setjmp.S @@ -1,5 +1,5 @@ /* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. MIPS version. -Copyright (C) 1994 Free Software Foundation, Inc. +Copyright (C) 1994, 1995 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,4 +25,4 @@ Cambridge, MA 02139, USA. */ ENTRY (setjmp) j C_SYMBOL_NAME (__sigsetjmp) - move a1, 1 /* Pass a second argument of one. */ + li a1, 1 /* Pass a second argument of one. */ From a4b6477451f4147299aa953c9f9d5917ff94e00c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 3 Feb 1995 23:29:20 +0000 Subject: [PATCH 0520/4487] Use ENV[0].__jmpbuf[0]. --- sysdeps/mips/setjmp_aux.c | 44 +++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/sysdeps/mips/setjmp_aux.c b/sysdeps/mips/setjmp_aux.c index ee2d20977d..d478e3fdc9 100644 --- a/sysdeps/mips/setjmp_aux.c +++ b/sysdeps/mips/setjmp_aux.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1994 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -27,40 +27,38 @@ int __sigsetjmp_aux (jmp_buf env, int savemask, int sp, int fp) { /* Store the floating point callee-saved registers... */ - asm volatile ("s.d $f20, %0" : : "m" (env[0].__fpregs[0])); - asm volatile ("s.d $f22, %0" : : "m" (env[0].__fpregs[1])); - asm volatile ("s.d $f24, %0" : : "m" (env[0].__fpregs[2])); - asm volatile ("s.d $f26, %0" : : "m" (env[0].__fpregs[3])); - asm volatile ("s.d $f28, %0" : : "m" (env[0].__fpregs[4])); - asm volatile ("s.d $f30, %0" : : "m" (env[0].__fpregs[5])); + asm volatile ("s.d $f20, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[0])); + asm volatile ("s.d $f22, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[1])); + asm volatile ("s.d $f24, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[2])); + asm volatile ("s.d $f26, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[3])); + asm volatile ("s.d $f28, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[4])); + asm volatile ("s.d $f30, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[5])); /* .. and the PC; */ - asm volatile ("sw $31, %0" : : "m" (env[0].__pc)); + asm volatile ("sw $31, %0" : : "m" (env[0].__jmpbuf[0].__pc)); /* .. and the stack pointer; */ - asm volatile ("sw %1, %0" : : "m" (env[0].__sp), "r" (sp)); + env[0].__jmpbuf[0].__sp = sp; /* .. and the FP; it'll be in s8. */ - asm volatile ("sw %1, %0" : : "m" (env[0].__fp), "r" (fp)); + env[0].__jmpbuf[0].__fp = fp; /* .. and the GP; */ - asm volatile ("sw $gp, %0" : : "m" (env[0].__gp)); + asm volatile ("sw $gp, %0" : : "m" (env[0].__jmpbuf[0].__gp)); /* .. and the callee-saved registers; */ - asm volatile ("sw $16, %0" : : "m" (env[0].__regs[0])); - asm volatile ("sw $17, %0" : : "m" (env[0].__regs[1])); - asm volatile ("sw $18, %0" : : "m" (env[0].__regs[2])); - asm volatile ("sw $19, %0" : : "m" (env[0].__regs[3])); - asm volatile ("sw $20, %0" : : "m" (env[0].__regs[4])); - asm volatile ("sw $21, %0" : : "m" (env[0].__regs[5])); - asm volatile ("sw $22, %0" : : "m" (env[0].__regs[6])); - asm volatile ("sw $23, %0" : : "m" (env[0].__regs[7])); + asm volatile ("sw $16, %0" : : "m" (env[0].__jmpbuf[0].__regs[0])); + asm volatile ("sw $17, %0" : : "m" (env[0].__jmpbuf[0].__regs[1])); + asm volatile ("sw $18, %0" : : "m" (env[0].__jmpbuf[0].__regs[2])); + asm volatile ("sw $19, %0" : : "m" (env[0].__jmpbuf[0].__regs[3])); + asm volatile ("sw $20, %0" : : "m" (env[0].__jmpbuf[0].__regs[4])); + asm volatile ("sw $21, %0" : : "m" (env[0].__jmpbuf[0].__regs[5])); + asm volatile ("sw $22, %0" : : "m" (env[0].__jmpbuf[0].__regs[6])); + asm volatile ("sw $23, %0" : : "m" (env[0].__jmpbuf[0].__regs[7])); /* .. and finally get and reconstruct the floating point csr. */ - asm ("cfc1 %0, $31" : "=r" (env[0].__fpc_csr)); + asm ("cfc1 %0, $31" : "=r" (env[0].__jmpbuf[0].__fpc_csr)); /* Save the signal mask if requested. */ - __sigjmp_save (env, savemask); - - return 0; + return __sigjmp_save (env, savemask); } From 23afbf2338fc81cb10508d0028b5581ed91d2eb3 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 5 Feb 1995 22:59:48 +0000 Subject: [PATCH 0521/4487] (ENTRY): Add `.ent' directive. --- sysdeps/unix/mips/sysdep.h | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/sysdeps/unix/mips/sysdep.h b/sysdeps/unix/mips/sysdep.h index ee047fb28e..c09c5af7d2 100644 --- a/sysdeps/unix/mips/sysdep.h +++ b/sysdeps/unix/mips/sysdep.h @@ -22,22 +22,15 @@ Cambridge, MA 02139, USA. */ #include -#ifdef __STDC__ #define ENTRY(name) \ .globl name; \ .align 2; \ + .ent name,0; \ name##: -#else -#define ENTRY(name) \ - .globl name; \ - .align 2; \ - name/**/: -#endif /* Note that while it's better structurally, going back to call syscall_error can make things confusing if you're debugging---it looks like it's jumping backwards into the previous fn. */ -#ifdef __STDC__ #define PSEUDO(name, syscall_name, args) \ .set noreorder; \ .align 2; \ @@ -49,19 +42,6 @@ Cambridge, MA 02139, USA. */ bne a3, zero, 99b; \ nop; \ syse1: -#else -#define PSEUDO(name, syscall_name, args) \ - .set noreorder; \ - .align 2; \ - 99: j syscall_error; \ - nop; \ - ENTRY(name) \ - li v0, SYS_/**/syscall_name; \ - syscall; \ - bne a3, zero, 99b; \ - nop; \ -syse1: -#endif #define ret j ra ; nop #define r0 v0 From 8548d4c0841422a974065e0599ce71fd82f9ba7f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 7 Feb 1995 04:25:56 +0000 Subject: [PATCH 0522/4487] Use spin lock operations on sigstate lock. Don't expect _hurd_self_sigstate to lock it. --- sysdeps/mach/hurd/alpha/sigreturn.c | 11 ++++++----- sysdeps/mach/hurd/mips/sigreturn.c | 11 ++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/sysdeps/mach/hurd/alpha/sigreturn.c b/sysdeps/mach/hurd/alpha/sigreturn.c index 4adfb8d78f..e5dc383a3a 100644 --- a/sysdeps/mach/hurd/alpha/sigreturn.c +++ b/sysdeps/mach/hurd/alpha/sigreturn.c @@ -37,7 +37,8 @@ __sigreturn (struct sigcontext *scp) return -1; } - ss = _hurd_self_sigstate (); /* SS->lock now locked. */ + ss = _hurd_self_sigstate (); + __spin_lock (&ss->lock); /* Restore the set of blocked signals, and the intr_port slot. */ ss->blocked = scp->sc_mask; @@ -56,10 +57,10 @@ __sigreturn (struct sigcontext *scp) the SCP context is doing an interruptible RPC, but the signal thread will examine us while we are blocked in the sig_post RPC. */ ss->intr_port = MACH_PORT_NULL; - __mutex_unlock (&ss->lock); - __sig_post (_hurd_msgport, 0, __mach_task_self ()); + __spin_unlock (&ss->lock); + __msg_sig_post (_hurd_msgport, 0, __mach_task_self ()); /* If a pending signal was handled, sig_post never returned. */ - __mutex_lock (&ss->lock); + __spin_lock (&ss->lock); } if (scp->sc_onstack) @@ -69,7 +70,7 @@ __sigreturn (struct sigcontext *scp) abort (); } else - __mutex_unlock (&ss->lock); + __spin_unlock (&ss->lock); /* Destroy the MiG reply port used by the signal handler, and restore the reply port in use by the thread when interrupted. */ diff --git a/sysdeps/mach/hurd/mips/sigreturn.c b/sysdeps/mach/hurd/mips/sigreturn.c index d1d444f075..7396a8bb22 100644 --- a/sysdeps/mach/hurd/mips/sigreturn.c +++ b/sysdeps/mach/hurd/mips/sigreturn.c @@ -33,7 +33,8 @@ __sigreturn (struct sigcontext *scp) return -1; } - ss = _hurd_self_sigstate (); /* SS->lock now locked. */ + ss = _hurd_self_sigstate (); + __spin_lock (&ss->lock); /* Restore the set of blocked signals, and the intr_port slot. */ ss->blocked = scp->sc_mask; @@ -52,10 +53,10 @@ __sigreturn (struct sigcontext *scp) the SCP context is doing an interruptible RPC, but the signal thread will examine us while we are blocked in the sig_post RPC. */ ss->intr_port = MACH_PORT_NULL; - __mutex_unlock (&ss->lock); - __sig_post (_hurd_msgport, 0, __mach_task_self ()); + __spin_unlock (&ss->lock); + __msg_sig_post (_hurd_msgport, 0, __mach_task_self ()); /* If a pending signal was handled, sig_post never returned. */ - __mutex_lock (&ss->lock); + __spin_lock (&ss->lock); } if (scp->sc_onstack) @@ -65,7 +66,7 @@ __sigreturn (struct sigcontext *scp) abort (); } else - __mutex_unlock (&ss->lock); + __spin_unlock (&ss->lock); /* Destroy the MiG reply port used by the signal handler, and restore the reply port in use by the thread when interrupted. */ From 1eae31ac32358223f5f72fa3c881e113962faf02 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 8 Feb 1995 03:06:52 +0000 Subject: [PATCH 0523/4487] Initial revision --- sysdeps/mach/hppa/machine-lock.h | 63 ++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 sysdeps/mach/hppa/machine-lock.h diff --git a/sysdeps/mach/hppa/machine-lock.h b/sysdeps/mach/hppa/machine-lock.h new file mode 100644 index 0000000000..0a178357a3 --- /dev/null +++ b/sysdeps/mach/hppa/machine-lock.h @@ -0,0 +1,63 @@ +/* Machine-specific definition for spin locks. HPPA version. +Copyright (C) 1995 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifndef _MACHINE_LOCK_H +#define _MACHINE_LOCK_H + +/* The type of a spin lock variable. */ + +typedef __volatile int __spin_lock_t __attribute__ ((__aligned__ (16))); + +/* Value to initialize `__spin_lock_t' variables to. */ + +#define __SPIN_LOCK_INITIALIZER -1 + + +#ifndef _EXTERN_INLINE +#define _EXTERN_INLINE extern __inline +#endif + +/* Unlock LOCK. */ + +_EXTERN_INLINE void +__spin_unlock (__spin_lock_t *__lock) +{ + *__lock = -1; +} + +/* Try to lock LOCK; return nonzero if we locked it, zero if another has. */ + +_EXTERN_INLINE int +__spin_try_lock (__spin_lock_t *__lock) +{ + register int __result; + __asm__ __volatile__ ("ldcws %0, %1" : "=m" (*__lock), "=r" (__result)); + return __result != 0; +} + +/* Return nonzero if LOCK is locked. */ + +_EXTERN_INLINE int +__spin_lock_locked (__spin_lock_t *__lock) +{ + return *__lock == 0; +} + + +#endif /* machine-lock.h */ From 6b31933688909d5c22aa979a5fd74d3f4c859d2b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 10 Feb 1995 00:10:54 +0000 Subject: [PATCH 0524/4487] Remove `const' from function prototype. --- sysdeps/m68k/__longjmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/m68k/__longjmp.c b/sysdeps/m68k/__longjmp.c index debd0f1dc5..4fc61084a0 100644 --- a/sysdeps/m68k/__longjmp.c +++ b/sysdeps/m68k/__longjmp.c @@ -22,7 +22,7 @@ Cambridge, MA 02139, USA. */ /* Jump to the position specified by ENV, causing the setjmp call there to return VAL, or 1 if VAL is 0. */ void -__longjmp (const __jmp_buf env, int val) +__longjmp (__jmp_buf env, int val) { /* This restores the FP and SP that setjmp's caller had, and puts the return address into A0 and VAL into D0. */ From 7ae4a9668a2ae3c40493253871b4fa1c11790a62 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 17 Feb 1995 18:39:13 +0000 Subject: [PATCH 0525/4487] Update #include for renaming. --- sysdeps/unix/sysv/irix4/gettimeofday.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/irix4/gettimeofday.c b/sysdeps/unix/sysv/irix4/gettimeofday.c index 8a55f99984..d7055be82e 100644 --- a/sysdeps/unix/sysv/irix4/gettimeofday.c +++ b/sysdeps/unix/sysv/irix4/gettimeofday.c @@ -1,3 +1 @@ -#include - -weak_alias (__gettimeofday, gettimeofday) +#include From 3b84e62ef211c4d80b4f95ba3c5cadbbdea6727c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 17 Feb 1995 20:13:09 +0000 Subject: [PATCH 0526/4487] Imported from gmp-1.900 --- sysdeps/alpha/gmp-mparam.h | 26 ++++++ sysdeps/alpha/udiv_qrnnd.S | 152 +++++++++++++++++++++++++++++++ sysdeps/m68k/m68020/add_n.S | 76 ++++++++++++++++ sysdeps/m68k/m68020/addmul_1.S | 80 ++++++++++++++++ sysdeps/m68k/m68020/asm-syntax.h | 105 +++++++++++++++++++++ sysdeps/m68k/m68020/mul_1.S | 87 ++++++++++++++++++ sysdeps/m68k/m68020/sub_n.S | 76 ++++++++++++++++ sysdeps/m68k/m68020/submul_1.S | 80 ++++++++++++++++ sysdeps/m88k/m88100/add_n.S | 133 +++++++++++++++++++++++++++ sysdeps/m88k/m88100/mul_1.S | 127 ++++++++++++++++++++++++++ sysdeps/m88k/m88100/sub_n.S | 134 +++++++++++++++++++++++++++ sysdeps/m88k/m88110/mul_1.S | 80 ++++++++++++++++ sysdeps/mips/mips64/gmp-mparam.h | 26 ++++++ sysdeps/z8000/gmp-mparam.h | 26 ++++++ 14 files changed, 1208 insertions(+) create mode 100644 sysdeps/alpha/gmp-mparam.h create mode 100644 sysdeps/alpha/udiv_qrnnd.S create mode 100644 sysdeps/m68k/m68020/add_n.S create mode 100644 sysdeps/m68k/m68020/addmul_1.S create mode 100644 sysdeps/m68k/m68020/asm-syntax.h create mode 100644 sysdeps/m68k/m68020/mul_1.S create mode 100644 sysdeps/m68k/m68020/sub_n.S create mode 100644 sysdeps/m68k/m68020/submul_1.S create mode 100644 sysdeps/m88k/m88100/add_n.S create mode 100644 sysdeps/m88k/m88100/mul_1.S create mode 100644 sysdeps/m88k/m88100/sub_n.S create mode 100644 sysdeps/m88k/m88110/mul_1.S create mode 100644 sysdeps/mips/mips64/gmp-mparam.h create mode 100644 sysdeps/z8000/gmp-mparam.h diff --git a/sysdeps/alpha/gmp-mparam.h b/sysdeps/alpha/gmp-mparam.h new file mode 100644 index 0000000000..05c893f790 --- /dev/null +++ b/sysdeps/alpha/gmp-mparam.h @@ -0,0 +1,26 @@ +/* gmp-mparam.h -- Compiler/machine parameter header file. + +Copyright (C) 1991, 1993, 1994 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Library General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at your +option) any later version. + +The GNU MP 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 Library General Public +License for more details. + +You should have received a copy of the GNU Library General Public License +along with the GNU MP Library; see the file COPYING.LIB. If not, write to +the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#define BITS_PER_MP_LIMB 64 +#define BYTES_PER_MP_LIMB 8 +#define BITS_PER_LONGINT 64 +#define BITS_PER_INT 32 +#define BITS_PER_SHORTINT 16 +#define BITS_PER_CHAR 8 diff --git a/sysdeps/alpha/udiv_qrnnd.S b/sysdeps/alpha/udiv_qrnnd.S new file mode 100644 index 0000000000..942d7a884b --- /dev/null +++ b/sysdeps/alpha/udiv_qrnnd.S @@ -0,0 +1,152 @@ + # Alpha 21064 __udiv_qrnnd + + # Copyright (C) 1992, 1994 Free Software Foundation, Inc. + + # This file is part of the GNU MP Library. + + # The GNU MP Library is free software; you can redistribute it and/or modify + # it under the terms of the GNU Library General Public License as published by + # the Free Software Foundation; either version 2 of the License, or (at your + # option) any later version. + + # The GNU MP 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 Library General Public + # License for more details. + + # You should have received a copy of the GNU Library General Public License + # along with the GNU MP Library; see the file COPYING.LIB. If not, write to + # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + + .set noreorder + .set noat + +.text + .align 3 + .globl __udiv_qrnnd + .ent __udiv_qrnnd 0 +__udiv_qrnnd: +__udiv_qrnnd..ng: + .frame $30,0,$26,0 + .prologue 0 +#define cnt $2 +#define tmp $3 +#define rem_ptr $16 +#define n1 $17 +#define n0 $18 +#define d $19 +#define qb $20 + + ldiq cnt,16 + blt d,Largedivisor + +Loop1: cmplt n0,0,tmp + addq n1,n1,n1 + bis n1,tmp,n1 + addq n0,n0,n0 + cmpule d,n1,qb + subq n1,d,tmp + cmovne qb,tmp,n1 + bis n0,qb,n0 + cmplt n0,0,tmp + addq n1,n1,n1 + bis n1,tmp,n1 + addq n0,n0,n0 + cmpule d,n1,qb + subq n1,d,tmp + cmovne qb,tmp,n1 + bis n0,qb,n0 + cmplt n0,0,tmp + addq n1,n1,n1 + bis n1,tmp,n1 + addq n0,n0,n0 + cmpule d,n1,qb + subq n1,d,tmp + cmovne qb,tmp,n1 + bis n0,qb,n0 + cmplt n0,0,tmp + addq n1,n1,n1 + bis n1,tmp,n1 + addq n0,n0,n0 + cmpule d,n1,qb + subq n1,d,tmp + cmovne qb,tmp,n1 + bis n0,qb,n0 + subq cnt,1,cnt + bgt cnt,Loop1 + stq n1,0(rem_ptr) + bis $31,n0,$0 + ret $31,($26),1 + +Largedivisor: + and n0,1,$4 + + srl n0,1,n0 + sll n1,63,tmp + or tmp,n0,n0 + srl n1,1,n1 + + and d,1,$6 + srl d,1,$5 + addq $5,$6,$5 + +Loop2: cmplt n0,0,tmp + addq n1,n1,n1 + bis n1,tmp,n1 + addq n0,n0,n0 + cmpule $5,n1,qb + subq n1,$5,tmp + cmovne qb,tmp,n1 + bis n0,qb,n0 + cmplt n0,0,tmp + addq n1,n1,n1 + bis n1,tmp,n1 + addq n0,n0,n0 + cmpule $5,n1,qb + subq n1,$5,tmp + cmovne qb,tmp,n1 + bis n0,qb,n0 + cmplt n0,0,tmp + addq n1,n1,n1 + bis n1,tmp,n1 + addq n0,n0,n0 + cmpule $5,n1,qb + subq n1,$5,tmp + cmovne qb,tmp,n1 + bis n0,qb,n0 + cmplt n0,0,tmp + addq n1,n1,n1 + bis n1,tmp,n1 + addq n0,n0,n0 + cmpule $5,n1,qb + subq n1,$5,tmp + cmovne qb,tmp,n1 + bis n0,qb,n0 + subq cnt,1,cnt + bgt cnt,Loop2 + + addq n1,n1,n1 + addq $4,n1,n1 + bne $6,Odd + stq n1,0(rem_ptr) + bis $31,n0,$0 + ret $31,($26),1 + +Odd: + /* q' in n0. r' in n1. */ + addq n1,n0,n1 + cmpult n1,n0,tmp # tmp := carry from addq + beq tmp,LLp6 + addq n0,1,n0 + subq n1,d,n1 +LLp6: cmpult n1,d,tmp + bne tmp,LLp7 + addq n0,1,n0 + subq n1,d,n1 +LLp7: + stq n1,0(rem_ptr) + bis $31,n0,$0 + ret $31,($26),1 + + .end __udiv_qrnnd diff --git a/sysdeps/m68k/m68020/add_n.S b/sysdeps/m68k/m68020/add_n.S new file mode 100644 index 0000000000..ea7a4458ea --- /dev/null +++ b/sysdeps/m68k/m68020/add_n.S @@ -0,0 +1,76 @@ +/* mc68020 __mpn_add_n -- Add two limb vectors of the same length > 0 and store + sum in a third limb vector. + +Copyright (C) 1992, 1994 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Library General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at your +option) any later version. + +The GNU MP 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 Library General Public +License for more details. + +You should have received a copy of the GNU Library General Public License +along with the GNU MP Library; see the file COPYING.LIB. If not, write to +the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +/* + INPUT PARAMETERS + res_ptr (sp + 4) + s1_ptr (sp + 8) + s2_ptr (sp + 16) + size (sp + 12) +*/ + +#include "asm-syntax.h" + + TEXT + ALIGN + GLOBL ___mpn_add_n + +LAB(___mpn_add_n) +/* Save used registers on the stack. */ + INSN2(move,l ,MEM_PREDEC(sp),d2) + INSN2(move,l ,MEM_PREDEC(sp),a2) + +/* Copy the arguments to registers. Better use movem? */ + INSN2(move,l ,a2,MEM_DISP(sp,12)) + INSN2(move,l ,a0,MEM_DISP(sp,16)) + INSN2(move,l ,a1,MEM_DISP(sp,20)) + INSN2(move,l ,d2,MEM_DISP(sp,24)) + + INSN2(eor,w ,d2,#1) + INSN2(lsr,l ,d2,#1) + bcc L1 + INSN2(subq,l ,d2,#1) /* clears cy as side effect */ + +LAB(Loop) + INSN2(move,l ,d0,MEM_POSTINC(a0)) + INSN2(move,l ,d1,MEM_POSTINC(a1)) + INSN2(addx,l ,d0,d1) + INSN2(move,l ,MEM_POSTINC(a2),d0) +LAB(L1) INSN2(move,l ,d0,MEM_POSTINC(a0)) + INSN2(move,l ,d1,MEM_POSTINC(a1)) + INSN2(addx,l ,d0,d1) + INSN2(move,l ,MEM_POSTINC(a2),d0) + + dbf d2,Loop /* loop until 16 lsb of %4 == -1 */ + INSN2(subx,l ,d0,d0) /* d0 <= -cy; save cy as 0 or -1 in d0 */ + INSN2(sub,l ,d2,#0x10000) + bcs L2 + INSN2(add,l ,d0,d0) /* restore cy */ + bra Loop + +LAB(L2) + INSN1(neg,l ,d0) + +/* Restore used registers from stack frame. */ + INSN2(move,l ,a2,MEM_POSTINC(sp)) + INSN2(move,l ,d2,MEM_POSTINC(sp)) + + rts diff --git a/sysdeps/m68k/m68020/addmul_1.S b/sysdeps/m68k/m68020/addmul_1.S new file mode 100644 index 0000000000..3f244c40b4 --- /dev/null +++ b/sysdeps/m68k/m68020/addmul_1.S @@ -0,0 +1,80 @@ +/* mc68020 __mpn_addmul_1 -- Multiply a limb vector with a limb and add + the result to a second limb vector. + +Copyright (C) 1992, 1994 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Library General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at your +option) any later version. + +The GNU MP 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 Library General Public +License for more details. + +You should have received a copy of the GNU Library General Public License +along with the GNU MP Library; see the file COPYING.LIB. If not, write to +the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +/* + INPUT PARAMETERS + res_ptr (sp + 4) + s1_ptr (sp + 8) + size (sp + 12) + s2_limb (sp + 16) +*/ + +#include "asm-syntax.h" + + TEXT + ALIGN + GLOBL ___mpn_addmul_1 + +LAB(___mpn_addmul_1) + +#define res_ptr a0 +#define s1_ptr a1 +#define size d2 +#define s2_limb d4 + +/* Save used registers on the stack. */ + INSN2(movem,l ,MEM_PREDEC(sp),d2-d5) + +/* Copy the arguments to registers. Better use movem? */ + INSN2(move,l ,res_ptr,MEM_DISP(sp,20)) + INSN2(move,l ,s1_ptr,MEM_DISP(sp,24)) + INSN2(move,l ,size,MEM_DISP(sp,28)) + INSN2(move,l ,s2_limb,MEM_DISP(sp,32)) + + INSN2(eor,w ,size,#1) + INSN1(clr,l ,d1) + INSN1(clr,l ,d5) + INSN2(lsr,l ,size,#1) + bcc L1 + INSN2(subq,l ,size,#1) + INSN2(sub,l ,d0,d0) /* (d0,cy) <= (0,0) */ + +LAB(Loop) + INSN2(move,l ,d3,MEM_POSTINC(s1_ptr)) + INSN2(mulu,l ,d1:d3,s2_limb) + INSN2(addx,l ,d3,d0) + INSN2(addx,l ,d1,d5) + INSN2(add,l ,MEM_POSTINC(res_ptr),d3) +LAB(L1) INSN2(move,l ,d3,MEM_POSTINC(s1_ptr)) + INSN2(mulu,l ,d0:d3,s2_limb) + INSN2(addx,l ,d3,d1) + INSN2(addx,l ,d0,d5) + INSN2(add,l ,MEM_POSTINC(res_ptr),d3) + + dbf size,Loop + INSN2(addx,l ,d0,d5) + INSN2(sub,l ,size,#0x10000) + bcc Loop + +/* Restore used registers from stack frame. */ + INSN2(movem,l ,d2-d5,MEM_POSTINC(sp)) + + rts diff --git a/sysdeps/m68k/m68020/asm-syntax.h b/sysdeps/m68k/m68020/asm-syntax.h new file mode 100644 index 0000000000..394b3ca739 --- /dev/null +++ b/sysdeps/m68k/m68020/asm-syntax.h @@ -0,0 +1,105 @@ +/* asm.h -- Definitions for 68k syntax variations. + +Copyright (C) 1992, 1994 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Library General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at your +option) any later version. + +The GNU MP 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 Library General Public +License for more details. + +You should have received a copy of the GNU Library General Public License +along with the GNU MP Library; see the file COPYING.LIB. If not, write to +the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#ifdef MIT_SYNTAX +#define MEM(base)base@ +#define MEM_DISP(base,displacement)base@(displacement) +#define MEM_PREDEC(memory_base)memory_base@- +#define MEM_POSTINC(memory_base)memory_base@+ +#ifdef __STDC__ +#define INSN1(mnemonic,size_suffix,dst)mnemonic##size_suffix dst +#define INSN2(mnemonic,size_suffix,dst,src)mnemonic##size_suffix src,dst +#else +#define INSN1(mnemonic,size_suffix,dst)mnemonic/**/size_suffix dst +#define INSN2(mnemonic,size_suffix,dst,src)mnemonic/**/size_suffix src,dst +#endif +#define LAB(label) label: +#define TEXT .text +#define ALIGN .even +#define GLOBL .globl +#endif + +#ifdef SONY_SYNTAX +#define MEM(base)(base) +#define MEM_DISP(base,displacement)(displacement,base) +#define MEM_PREDEC(memory_base)-(memory_base) +#define MEM_POSTINC(memory_base)(memory_base)+ +#define INSN1(mnemonic,size_suffix,dst)mnemonic.size_suffix dst +#ifdef __STDC__ +#define INSN2(mnemonic,size_suffix,dst,src)mnemonic.size_suffix src##,dst +#else +#define INSN2(mnemonic,size_suffix,dst,src)mnemonic.size_suffix src/**/,dst +#endif +#define LAB(label) label: +#define TEXT .text +#define ALIGN .even +#define GLOBL .globl +#endif + +#ifdef MOTOROLA_SYNTAX +#define MEM(base)(base) +#define MEM_DISP(base,displacement)(displacement,base) +#define MEM_PREDEC(memory_base)-(memory_base) +#define MEM_POSTINC(memory_base)(memory_base)+ +#define INSN1(mnemonic,size_suffix,dst)mnemonic.size_suffix dst +#ifdef __STDC__ +#define INSN2(mnemonic,size_suffix,dst,src)mnemonic.size_suffix src##,dst +#else +#define INSN2(mnemonic,size_suffix,dst,src)mnemonic.size_suffix src/**/,dst +#endif +#define LAB(label) label +#define TEXT +#define ALIGN +#define GLOBL XDEF +#define l L +#define w W +#define move MOVE +#define eor EOR +#define lsr LSR +#define add ADD +#define addx ADDX +#define addq ADDQ +#define sub SUB +#define subx SUBX +#define subq SUBQ +#define neg NEG +#define bcc BCC +#define bcs BCS +#define bra BRA +#define dbf DBF +#define rts RTS +#define d0 D0 +#define d1 D1 +#define d2 D2 +#define d3 D3 +#define d4 D4 +#define d5 D5 +#define d6 D6 +#define d7 D7 +#define a0 A0 +#define a1 A1 +#define a2 A2 +#define a3 A3 +#define a4 A4 +#define a5 A5 +#define a6 A6 +#define a7 A7 +#define sp SP +#endif diff --git a/sysdeps/m68k/m68020/mul_1.S b/sysdeps/m68k/m68020/mul_1.S new file mode 100644 index 0000000000..548ca0091b --- /dev/null +++ b/sysdeps/m68k/m68020/mul_1.S @@ -0,0 +1,87 @@ +/* mc68020 __mpn_mul_1 -- Multiply a limb vector with a limb and store + the result in a second limb vector. + +Copyright (C) 1992, 1994 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Library General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at your +option) any later version. + +The GNU MP 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 Library General Public +License for more details. + +You should have received a copy of the GNU Library General Public License +along with the GNU MP Library; see the file COPYING.LIB. If not, write to +the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +/* + INPUT PARAMETERS + res_ptr (sp + 4) + s1_ptr (sp + 8) + size (sp + 12) + s2_limb (sp + 16) +*/ + +#include "asm-syntax.h" + + TEXT + ALIGN + GLOBL ___mpn_mul_1 + +LAB(___mpn_mul_1) + +#define res_ptr a0 +#define s1_ptr a1 +#define size d2 +#define s2_limb d4 + +/* Save used registers on the stack. */ + INSN2(movem,l ,MEM_PREDEC(sp),d2-d4) +#if 0 + INSN2(move,l ,MEM_PREDEC(sp),d2) + INSN2(move,l ,MEM_PREDEC(sp),d3) + INSN2(move,l ,MEM_PREDEC(sp),d4) +#endif + +/* Copy the arguments to registers. Better use movem? */ + INSN2(move,l ,res_ptr,MEM_DISP(sp,16)) + INSN2(move,l ,s1_ptr,MEM_DISP(sp,20)) + INSN2(move,l ,size,MEM_DISP(sp,24)) + INSN2(move,l ,s2_limb,MEM_DISP(sp,28)) + + INSN2(eor,w ,size,#1) + INSN1(clr,l ,d1) + INSN2(lsr,l ,size,#1) + bcc L1 + INSN2(subq,l ,size,#1) + INSN2(sub,l ,d0,d0) /* (d0,cy) <= (0,0) */ + +LAB(Loop) + INSN2(move,l ,d3,MEM_POSTINC(s1_ptr)) + INSN2(mulu,l ,d1:d3,s2_limb) + INSN2(addx,l ,d3,d0) + INSN2(move,l ,MEM_POSTINC(res_ptr),d3) +LAB(L1) INSN2(move,l ,d3,MEM_POSTINC(s1_ptr)) + INSN2(mulu,l ,d0:d3,s2_limb) + INSN2(addx,l ,d3,d1) + INSN2(move,l ,MEM_POSTINC(res_ptr),d3) + + dbf size,Loop + INSN1(clr,l ,d3) + INSN2(addx,l ,d0,d3) + INSN2(sub,l ,size,#0x10000) + bcc Loop + +/* Restore used registers from stack frame. */ + INSN2(movem,l ,d2-d4,MEM_POSTINC(sp)) +#if 0 + INSN2(move,l ,d4,MEM_POSTINC(sp)) + INSN2(move,l ,d3,MEM_POSTINC(sp)) + INSN2(move,l ,d2,MEM_POSTINC(sp)) +#endif + rts diff --git a/sysdeps/m68k/m68020/sub_n.S b/sysdeps/m68k/m68020/sub_n.S new file mode 100644 index 0000000000..19f0ec1568 --- /dev/null +++ b/sysdeps/m68k/m68020/sub_n.S @@ -0,0 +1,76 @@ +/* mc68020 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and + store difference in a third limb vector. + +Copyright (C) 1992, 1994 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Library General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at your +option) any later version. + +The GNU MP 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 Library General Public +License for more details. + +You should have received a copy of the GNU Library General Public License +along with the GNU MP Library; see the file COPYING.LIB. If not, write to +the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +/* + INPUT PARAMETERS + res_ptr (sp + 4) + s1_ptr (sp + 8) + s2_ptr (sp + 16) + size (sp + 12) +*/ + +#include "asm-syntax.h" + + TEXT + ALIGN + GLOBL ___mpn_sub_n + +LAB(___mpn_sub_n) +/* Save used registers on the stack. */ + INSN2(move,l ,MEM_PREDEC(sp),d2) + INSN2(move,l ,MEM_PREDEC(sp),a2) + +/* Copy the arguments to registers. Better use movem? */ + INSN2(move,l ,a2,MEM_DISP(sp,12)) + INSN2(move,l ,a0,MEM_DISP(sp,16)) + INSN2(move,l ,a1,MEM_DISP(sp,20)) + INSN2(move,l ,d2,MEM_DISP(sp,24)) + + INSN2(eor,w ,d2,#1) + INSN2(lsr,l ,d2,#1) + bcc L1 + INSN2(subq,l ,d2,#1) /* clears cy as side effect */ + +LAB(Loop) + INSN2(move,l ,d0,MEM_POSTINC(a0)) + INSN2(move,l ,d1,MEM_POSTINC(a1)) + INSN2(subx,l ,d0,d1) + INSN2(move,l ,MEM_POSTINC(a2),d0) +LAB(L1) INSN2(move,l ,d0,MEM_POSTINC(a0)) + INSN2(move,l ,d1,MEM_POSTINC(a1)) + INSN2(subx,l ,d0,d1) + INSN2(move,l ,MEM_POSTINC(a2),d0) + + dbf d2,Loop /* loop until 16 lsb of %4 == -1 */ + INSN2(subx,l ,d0,d0) /* d0 <= -cy; save cy as 0 or -1 in d0 */ + INSN2(sub,l ,d2,#0x10000) + bcs L2 + INSN2(add,l ,d0,d0) /* restore cy */ + bra Loop + +LAB(L2) + INSN1(neg,l ,d0) + +/* Restore used registers from stack frame. */ + INSN2(move,l ,a2,MEM_POSTINC(sp)) + INSN2(move,l ,d2,MEM_POSTINC(sp)) + + rts diff --git a/sysdeps/m68k/m68020/submul_1.S b/sysdeps/m68k/m68020/submul_1.S new file mode 100644 index 0000000000..ef7f39de7a --- /dev/null +++ b/sysdeps/m68k/m68020/submul_1.S @@ -0,0 +1,80 @@ +/* mc68020 __mpn_submul_1 -- Multiply a limb vector with a limb and subtract + the result from a second limb vector. + +Copyright (C) 1992, 1994 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Library General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at your +option) any later version. + +The GNU MP 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 Library General Public +License for more details. + +You should have received a copy of the GNU Library General Public License +along with the GNU MP Library; see the file COPYING.LIB. If not, write to +the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +/* + INPUT PARAMETERS + res_ptr (sp + 4) + s1_ptr (sp + 8) + size (sp + 12) + s2_limb (sp + 16) +*/ + +#include "asm-syntax.h" + + TEXT + ALIGN + GLOBL ___mpn_submul_1 + +LAB(___mpn_submul_1) + +#define res_ptr a0 +#define s1_ptr a1 +#define size d2 +#define s2_limb d4 + +/* Save used registers on the stack. */ + INSN2(movem,l ,MEM_PREDEC(sp),d2-d5) + +/* Copy the arguments to registers. Better use movem? */ + INSN2(move,l ,res_ptr,MEM_DISP(sp,20)) + INSN2(move,l ,s1_ptr,MEM_DISP(sp,24)) + INSN2(move,l ,size,MEM_DISP(sp,28)) + INSN2(move,l ,s2_limb,MEM_DISP(sp,32)) + + INSN2(eor,w ,size,#1) + INSN1(clr,l ,d1) + INSN1(clr,l ,d5) + INSN2(lsr,l ,size,#1) + bcc L1 + INSN2(subq,l ,size,#1) + INSN2(sub,l ,d0,d0) /* (d0,cy) <= (0,0) */ + +LAB(Loop) + INSN2(move,l ,d3,MEM_POSTINC(s1_ptr)) + INSN2(mulu,l ,d1:d3,s2_limb) + INSN2(addx,l ,d3,d0) + INSN2(addx,l ,d1,d5) + INSN2(sub,l ,MEM_POSTINC(res_ptr),d3) +LAB(L1) INSN2(move,l ,d3,MEM_POSTINC(s1_ptr)) + INSN2(mulu,l ,d0:d3,s2_limb) + INSN2(addx,l ,d3,d1) + INSN2(addx,l ,d0,d5) + INSN2(sub,l ,MEM_POSTINC(res_ptr),d3) + + dbf size,Loop + INSN2(addx,l ,d0,d5) + INSN2(sub,l ,size,#0x10000) + bcc Loop + +/* Restore used registers from stack frame. */ + INSN2(movem,l ,d2-d5,MEM_POSTINC(sp)) + + rts diff --git a/sysdeps/m88k/m88100/add_n.S b/sysdeps/m88k/m88100/add_n.S new file mode 100644 index 0000000000..2107eb55cb --- /dev/null +++ b/sysdeps/m88k/m88100/add_n.S @@ -0,0 +1,133 @@ +; mc88100 __mpn_add -- Add two limb vectors of the same length > 0 and store +; sum in a third limb vector. + +; Copyright (C) 1992, 1994 Free Software Foundation, Inc. + +; This file is part of the GNU MP Library. + +; The GNU MP Library is free software; you can redistribute it and/or modify +; it under the terms of the GNU General Public License as published by +; the Free Software Foundation; either version 2, or (at your option) +; any later version. + +; The GNU MP 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 General Public License for more details. + +; You should have received a copy of the GNU General Public License +; along with the GNU MP Library; see the file COPYING. If not, write to +; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + + +; INPUT PARAMETERS +; res_ptr r2 +; s1_ptr r3 +; s2_ptr r4 +; size r5 + +; This code has been optimized to run one instruction per clock, avoiding +; load stalls and writeback contention. As a result, the instruction +; order is not always natural. + +; The speed is approximately 4.3 clocks/limb + 18 clocks/limb-vector. + +#include "sysdep.h" + +ENTRY (__mpn_add_n) + ld r6,r3,0 ; read first limb from s1_ptr + extu r10,r5,4 + ld r7,r4,0 ; read first limb from s2_ptr + + subu.co r5,r0,r5 ; (clear carry as side effect) + mak r5,r5,4<4> + bcnd eq0,r5,Lzero + + or r12,r0,lo16(Lbase) + or.u r12,r12,hi16(Lbase) + addu r12,r12,r5 ; r12 is address for entering in loop + + extu r5,r5,2 ; divide by 4 + subu r2,r2,r5 ; adjust res_ptr + subu r3,r3,r5 ; adjust s1_ptr + subu r4,r4,r5 ; adjust s2_ptr + + or r8,r6,r0 + + jmp.n r12 + or r9,r7,r0 + +Loop: addu r3,r3,64 + st r8,r2,60 + addu r4,r4,64 + ld r6,r3,0 + addu r2,r2,64 + ld r7,r4,0 +Lzero: subu r10,r10,1 ; add 0 + 16r limbs (adjust loop counter) +Lbase: ld r8,r3,4 + addu.cio r6,r6,r7 + ld r9,r4,4 + st r6,r2,0 + ld r6,r3,8 ; add 15 + 16r limbs + addu.cio r8,r8,r9 + ld r7,r4,8 + st r8,r2,4 + ld r8,r3,12 ; add 14 + 16r limbs + addu.cio r6,r6,r7 + ld r9,r4,12 + st r6,r2,8 + ld r6,r3,16 ; add 13 + 16r limbs + addu.cio r8,r8,r9 + ld r7,r4,16 + st r8,r2,12 + ld r8,r3,20 ; add 12 + 16r limbs + addu.cio r6,r6,r7 + ld r9,r4,20 + st r6,r2,16 + ld r6,r3,24 ; add 11 + 16r limbs + addu.cio r8,r8,r9 + ld r7,r4,24 + st r8,r2,20 + ld r8,r3,28 ; add 10 + 16r limbs + addu.cio r6,r6,r7 + ld r9,r4,28 + st r6,r2,24 + ld r6,r3,32 ; add 9 + 16r limbs + addu.cio r8,r8,r9 + ld r7,r4,32 + st r8,r2,28 + ld r8,r3,36 ; add 8 + 16r limbs + addu.cio r6,r6,r7 + ld r9,r4,36 + st r6,r2,32 + ld r6,r3,40 ; add 7 + 16r limbs + addu.cio r8,r8,r9 + ld r7,r4,40 + st r8,r2,36 + ld r8,r3,44 ; add 6 + 16r limbs + addu.cio r6,r6,r7 + ld r9,r4,44 + st r6,r2,40 + ld r6,r3,48 ; add 5 + 16r limbs + addu.cio r8,r8,r9 + ld r7,r4,48 + st r8,r2,44 + ld r8,r3,52 ; add 4 + 16r limbs + addu.cio r6,r6,r7 + ld r9,r4,52 + st r6,r2,48 + ld r6,r3,56 ; add 3 + 16r limbs + addu.cio r8,r8,r9 + ld r7,r4,56 + st r8,r2,52 + ld r8,r3,60 ; add 2 + 16r limbs + addu.cio r6,r6,r7 + ld r9,r4,60 + st r6,r2,56 + bcnd.n ne0,r10,Loop ; add 1 + 16r limbs + addu.cio r8,r8,r9 + + st r8,r2,60 ; store most significant limb + + jmp.n r1 + addu.ci r2,r0,r0 ; return carry-out from most sign. limb diff --git a/sysdeps/m88k/m88100/mul_1.S b/sysdeps/m88k/m88100/mul_1.S new file mode 100644 index 0000000000..503897b298 --- /dev/null +++ b/sysdeps/m88k/m88100/mul_1.S @@ -0,0 +1,127 @@ +; mc88100 __mpn_mul_1 -- Multiply a limb vector with a single limb and +; store the product in a second limb vector. + +; Copyright (C) 1992, 1994 Free Software Foundation, Inc. + +; This file is part of the GNU MP Library. + +; The GNU MP Library is free software; you can redistribute it and/or modify +; it under the terms of the GNU General Public License as published by +; the Free Software Foundation; either version 2, or (at your option) +; any later version. + +; The GNU MP 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 General Public License for more details. + +; You should have received a copy of the GNU General Public License +; along with the GNU MP Library; see the file COPYING. If not, write to +; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + + +; INPUT PARAMETERS +; res_ptr r2 +; s1_ptr r3 +; size r4 +; s2_limb r5 + +; Common overhead is about 11 cycles/invocation. + +; The speed for S2_LIMB >= 0x10000 is approximately 21 cycles/limb. (The +; pipeline stalls 2 cycles due to WB contention.) + +; The speed for S2_LIMB < 0x10000 is approximately 16 cycles/limb. (The +; pipeline stalls 2 cycles due to WB contention and 1 cycle due to latency.) + +; To enhance speed: +; 1. Unroll main loop 4-8 times. +; 2. Schedule code to avoid WB contention. It might be tempting to move the +; ld instruction in the loops down to save 2 cycles (less WB contention), +; but that looses because the ultimate value will be read from outside +; the allocated space. But if we handle the ultimate multiplication in +; the tail, we can do this. +; 3. Make the multiplication with less instructions. I think the code for +; (S2_LIMB >= 0x10000) is not minimal. +; With these techniques the (S2_LIMB >= 0x10000) case would run in 17 or +; less cycles/limb; the (S2_LIMB < 0x10000) case would run in 11 +; cycles/limb. (Assuming infinite unrolling.) + +#include "sysdep.h" + +ENTRY (__mpn_mul_1) + + ; Make S1_PTR and RES_PTR point at the end of their blocks + ; and negate SIZE. + lda r3,r3[r4] + lda r6,r2[r4] ; RES_PTR in r6 since r2 is retval + subu r4,r0,r4 + + addu.co r2,r0,r0 ; r2 = cy = 0 + ld r9,r3[r4] + mask r7,r5,0xffff ; r7 = lo(S2_LIMB) + extu r8,r5,16 ; r8 = hi(S2_LIMB) + bcnd.n eq0,r8,Lsmall ; jump if (hi(S2_LIMB) == 0) + subu r6,r6,4 + +; General code for any value of S2_LIMB. + + ; Make a stack frame and save r25 and r26 + subu r31,r31,16 + st.d r25,r31,8 + + ; Enter the loop in the middle + br.n L1 + addu r4,r4,1 + +Loop: + ld r9,r3[r4] + st r26,r6[r4] +; bcnd ne0,r0,0 ; bubble + addu r4,r4,1 +L1: mul r26,r9,r5 ; low word of product mul_1 WB ld + mask r12,r9,0xffff ; r12 = lo(s1_limb) mask_1 + mul r11,r12,r7 ; r11 = prod_0 mul_2 WB mask_1 + mul r10,r12,r8 ; r10 = prod_1a mul_3 + extu r13,r9,16 ; r13 = hi(s1_limb) extu_1 WB mul_1 + mul r12,r13,r7 ; r12 = prod_1b mul_4 WB extu_1 + mul r25,r13,r8 ; r25 = prod_2 mul_5 WB mul_2 + extu r11,r11,16 ; r11 = hi(prod_0) extu_2 WB mul_3 + addu r10,r10,r11 ; addu_1 WB extu_2 +; bcnd ne0,r0,0 ; bubble WB addu_1 + addu.co r10,r10,r12 ; WB mul_4 + mask.u r10,r10,0xffff ; move the 16 most significant bits... + addu.ci r10,r10,r0 ; ...to the low half of the word... + rot r10,r10,16 ; ...and put carry in pos 16. + addu.co r26,r26,r2 ; add old carry limb + bcnd.n ne0,r4,Loop + addu.ci r2,r25,r10 ; compute new carry limb + + st r26,r6[r4] + ld.d r25,r31,8 + jmp.n r1 + addu r31,r31,16 + +; Fast code for S2_LIMB < 0x10000 +Lsmall: + ; Enter the loop in the middle + br.n SL1 + addu r4,r4,1 + +SLoop: + ld r9,r3[r4] ; + st r8,r6[r4] ; + addu r4,r4,1 ; +SL1: mul r8,r9,r5 ; low word of product + mask r12,r9,0xffff ; r12 = lo(s1_limb) + extu r13,r9,16 ; r13 = hi(s1_limb) + mul r11,r12,r7 ; r11 = prod_0 + mul r12,r13,r7 ; r12 = prod_1b + addu.cio r8,r8,r2 ; add old carry limb + extu r10,r11,16 ; r11 = hi(prod_0) + addu r10,r10,r12 ; + bcnd.n ne0,r4,SLoop + extu r2,r10,16 ; r2 = new carry limb + + jmp.n r1 + st r8,r6[r4] diff --git a/sysdeps/m88k/m88100/sub_n.S b/sysdeps/m88k/m88100/sub_n.S new file mode 100644 index 0000000000..927ece4f15 --- /dev/null +++ b/sysdeps/m88k/m88100/sub_n.S @@ -0,0 +1,134 @@ +; mc88100 __mpn_sub -- Subtract two limb vectors of the same length > 0 and +; store difference in a third limb vector. + +; Copyright (C) 1992, 1994 Free Software Foundation, Inc. + +; This file is part of the GNU MP Library. + +; The GNU MP Library is free software; you can redistribute it and/or modify +; it under the terms of the GNU General Public License as published by +; the Free Software Foundation; either version 2, or (at your option) +; any later version. + +; The GNU MP 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 General Public License for more details. + +; You should have received a copy of the GNU General Public License +; along with the GNU MP Library; see the file COPYING. If not, write to +; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + + +; INPUT PARAMETERS +; res_ptr r2 +; s1_ptr r3 +; s2_ptr r4 +; size r5 + +; This code has been optimized to run one instruction per clock, avoiding +; load stalls and writeback contention. As a result, the instruction +; order is not always natural. + +; The speed is approximately 4.3 clocks/limb + 18 clocks/limb-vector. + +#include "sysdep.h" + +ENTRY (__mpn_sub_n) + ld r6,r3,0 ; read first limb from s1_ptr + extu r10,r5,4 + ld r7,r4,0 ; read first limb from s2_ptr + + subu.co r5,r0,r5 ; (clear carry as side effect) + mak r5,r5,4<4> + bcnd eq0,r5,Lzero + + or r12,r0,lo16(Lbase) + or.u r12,r12,hi16(Lbase) + addu r12,r12,r5 ; r12 is address for entering in loop + + extu r5,r5,2 ; divide by 4 + subu r2,r2,r5 ; adjust res_ptr + subu r3,r3,r5 ; adjust s1_ptr + subu r4,r4,r5 ; adjust s2_ptr + + or r8,r6,r0 + + jmp.n r12 + or r9,r7,r0 + +Loop: addu r3,r3,64 + st r8,r2,60 + addu r4,r4,64 + ld r6,r3,0 + addu r2,r2,64 + ld r7,r4,0 +Lzero: subu r10,r10,1 ; subtract 0 + 16r limbs (adjust loop counter) +Lbase: ld r8,r3,4 + subu.cio r6,r6,r7 + ld r9,r4,4 + st r6,r2,0 + ld r6,r3,8 ; subtract 15 + 16r limbs + subu.cio r8,r8,r9 + ld r7,r4,8 + st r8,r2,4 + ld r8,r3,12 ; subtract 14 + 16r limbs + subu.cio r6,r6,r7 + ld r9,r4,12 + st r6,r2,8 + ld r6,r3,16 ; subtract 13 + 16r limbs + subu.cio r8,r8,r9 + ld r7,r4,16 + st r8,r2,12 + ld r8,r3,20 ; subtract 12 + 16r limbs + subu.cio r6,r6,r7 + ld r9,r4,20 + st r6,r2,16 + ld r6,r3,24 ; subtract 11 + 16r limbs + subu.cio r8,r8,r9 + ld r7,r4,24 + st r8,r2,20 + ld r8,r3,28 ; subtract 10 + 16r limbs + subu.cio r6,r6,r7 + ld r9,r4,28 + st r6,r2,24 + ld r6,r3,32 ; subtract 9 + 16r limbs + subu.cio r8,r8,r9 + ld r7,r4,32 + st r8,r2,28 + ld r8,r3,36 ; subtract 8 + 16r limbs + subu.cio r6,r6,r7 + ld r9,r4,36 + st r6,r2,32 + ld r6,r3,40 ; subtract 7 + 16r limbs + subu.cio r8,r8,r9 + ld r7,r4,40 + st r8,r2,36 + ld r8,r3,44 ; subtract 6 + 16r limbs + subu.cio r6,r6,r7 + ld r9,r4,44 + st r6,r2,40 + ld r6,r3,48 ; subtract 5 + 16r limbs + subu.cio r8,r8,r9 + ld r7,r4,48 + st r8,r2,44 + ld r8,r3,52 ; subtract 4 + 16r limbs + subu.cio r6,r6,r7 + ld r9,r4,52 + st r6,r2,48 + ld r6,r3,56 ; subtract 3 + 16r limbs + subu.cio r8,r8,r9 + ld r7,r4,56 + st r8,r2,52 + ld r8,r3,60 ; subtract 2 + 16r limbs + subu.cio r6,r6,r7 + ld r9,r4,60 + st r6,r2,56 + bcnd.n ne0,r10,Loop ; subtract 1 + 16r limbs + subu.cio r8,r8,r9 + + st r8,r2,60 ; store most significant limb + + addu.ci r2,r0,r0 ; return carry-out from most sign. limb + jmp.n r1 + xor r2,r2,1 diff --git a/sysdeps/m88k/m88110/mul_1.S b/sysdeps/m88k/m88110/mul_1.S new file mode 100644 index 0000000000..7a07623865 --- /dev/null +++ b/sysdeps/m88k/m88110/mul_1.S @@ -0,0 +1,80 @@ +; mc88110 __mpn_mul_1 -- Multiply a limb vector with a single limb and +; store the product in a second limb vector. + +; Copyright (C) 1992, 1994 Free Software Foundation, Inc. + +; This file is part of the GNU MP Library. + +; The GNU MP Library is free software; you can redistribute it and/or modify +; it under the terms of the GNU General Public License as published by +; the Free Software Foundation; either version 2, or (at your option) +; any later version. + +; The GNU MP 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 General Public License for more details. + +; You should have received a copy of the GNU General Public License +; along with the GNU MP Library; see the file COPYING. If not, write to +; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + + +; INPUT PARAMETERS +; res_ptr r2 +; s1_ptr r3 +; size r4 +; s2_limb r5 + +#include "sysdep.h" + +ENTRY (__mpn_mul_1) + ld r6,r3,0 + sub r4,r0,r4 + sub r3,r3,r4 ; r3 is offset s1_ptr + sub r2,r2,r4 + sub r8,r2,8 ; r8 is offset res_ptr + mulu.d r10,r6,r5 + + addu r4,r4,1 + bcnd eq0,r4,Lend + addu.co r2,r0,0 ; clear cy_limb + +Loop: ld r6,r3[r4] + addu.cio r9,r11,r2 + or r2,r10,r0 ; could be avoided if unrolled + addu r4,r4,1 + mulu.d r10,r6,r5 + bcnd ne0,r4,Loop + st r9,r8[r4] + +Lend: addu.cio r9,r11,r2 + st r9,r8,4 + jmp.n r1 + addu.ci r2,r10,r0 + +; This is the Right Way to do this on '110. 4 cycles / 64-bit limb. +; ld.d r10, +; mulu.d +; addu.cio +; addu.cio +; st.d +; mulu.d ,r11,r5 +; ld.d r12, +; mulu.d ,r10,r5 +; addu.cio +; addu.cio +; st.d +; mulu.d +; ld.d r10, +; mulu.d +; addu.cio +; addu.cio +; st.d +; mulu.d +; ld.d r10, +; mulu.d +; addu.cio +; addu.cio +; st.d +; mulu.d diff --git a/sysdeps/mips/mips64/gmp-mparam.h b/sysdeps/mips/mips64/gmp-mparam.h new file mode 100644 index 0000000000..a801b35d7a --- /dev/null +++ b/sysdeps/mips/mips64/gmp-mparam.h @@ -0,0 +1,26 @@ +/* gmp-mparam.h -- Compiler/machine parameter header file. + +Copyright (C) 1991, 1993, 1994 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Library General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at your +option) any later version. + +The GNU MP 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 Library General Public +License for more details. + +You should have received a copy of the GNU Library General Public License +along with the GNU MP Library; see the file COPYING.LIB. If not, write to +the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#define BITS_PER_MP_LIMB 64 +#define BYTES_PER_MP_LIMB 8 +#define BITS_PER_LONGINT 32 +#define BITS_PER_INT 32 +#define BITS_PER_SHORTINT 16 +#define BITS_PER_CHAR 8 diff --git a/sysdeps/z8000/gmp-mparam.h b/sysdeps/z8000/gmp-mparam.h new file mode 100644 index 0000000000..73df5b9d4e --- /dev/null +++ b/sysdeps/z8000/gmp-mparam.h @@ -0,0 +1,26 @@ +/* gmp-mparam.h -- Compiler/machine parameter header file. + +Copyright (C) 1991, 1993, 1994 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Library General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at your +option) any later version. + +The GNU MP 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 Library General Public +License for more details. + +You should have received a copy of the GNU Library General Public License +along with the GNU MP Library; see the file COPYING.LIB. If not, write to +the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#define BITS_PER_MP_LIMB 16 +#define BYTES_PER_MP_LIMB 2 +#define BITS_PER_LONGINT 32 +#define BITS_PER_INT 16 +#define BITS_PER_SHORTINT 16 +#define BITS_PER_CHAR 8 From a424e41858ca32d2cff1a1fc57ccceb415cccb79 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 17 Feb 1995 20:14:40 +0000 Subject: [PATCH 0527/4487] Files generated from divrem.m4. --- sysdeps/alpha/divl.S | 54 ++++++++++++++++++++++++++++++++++++++++ sysdeps/alpha/divlu.S | 54 ++++++++++++++++++++++++++++++++++++++++ sysdeps/alpha/divq.S | 51 ++++++++++++++++++++++++++++++++++++++ sysdeps/alpha/divqu.S | 57 +++++++++++++++++++++++++++++++++++++++++++ sysdeps/alpha/reml.S | 57 +++++++++++++++++++++++++++++++++++++++++++ sysdeps/alpha/remlu.S | 57 +++++++++++++++++++++++++++++++++++++++++++ sysdeps/alpha/remq.S | 54 ++++++++++++++++++++++++++++++++++++++++ sysdeps/alpha/remqu.S | 12 ++++----- 8 files changed, 390 insertions(+), 6 deletions(-) create mode 100644 sysdeps/alpha/divl.S create mode 100644 sysdeps/alpha/divlu.S create mode 100644 sysdeps/alpha/divq.S create mode 100644 sysdeps/alpha/divqu.S create mode 100644 sysdeps/alpha/reml.S create mode 100644 sysdeps/alpha/remlu.S create mode 100644 sysdeps/alpha/remq.S diff --git a/sysdeps/alpha/divl.S b/sysdeps/alpha/divl.S new file mode 100644 index 0000000000..7ae3e0cc13 --- /dev/null +++ b/sysdeps/alpha/divl.S @@ -0,0 +1,54 @@ + /* This file is generated from divrem.m4; DO NOT EDIT! */ +/* For each N divided by D, we do: + result = (double) N / (double) D + Then, for each N mod D, we do: + result = N - (D * divMODE (N, D)) + + FIXME: + The q and qu versions won't deal with operands > 50 bits. We also + don't check for divide by zero. */ + +#include "DEFS.h" +#if 0 +/* We do not handle div by zero yet. */ +#include +#endif +#include + + + + + + +FUNC__(divl) + /* First set up the dividend. */ + sextl t10, t10 + + stq t10,0(sp) + ldt $f10,0(sp) + cvtqt $f10,$f10 + + + /* Then set up the divisor. */ + sextl t11, t11 + + stq t11,0(sp) + ldt $f1,0(sp) + cvtqt $f1,$f1 + + + /* Do the division. */ + divt $f10,$f1,$f10 + cvttqc $f10,$f10 + + /* Put the result in t12. */ + stt $f10,0(sp) + ldq t12,0(sp) + sextl t12, t12 + + + + + lda sp,16(sp) + ret zero,(t9),1 + .end NAME__(divl) diff --git a/sysdeps/alpha/divlu.S b/sysdeps/alpha/divlu.S new file mode 100644 index 0000000000..9ae5950c53 --- /dev/null +++ b/sysdeps/alpha/divlu.S @@ -0,0 +1,54 @@ + /* This file is generated from divrem.m4; DO NOT EDIT! */ +/* For each N divided by D, we do: + result = (double) N / (double) D + Then, for each N mod D, we do: + result = N - (D * divMODE (N, D)) + + FIXME: + The q and qu versions won't deal with operands > 50 bits. We also + don't check for divide by zero. */ + +#include "DEFS.h" +#if 0 +/* We do not handle div by zero yet. */ +#include +#endif +#include + + + + + + +FUNC__(divlu) + /* First set up the dividend. */ + zapnot t10, 0xf, t10 + + stq t10,0(sp) + ldt $f10,0(sp) + cvtqt $f10,$f10 + + + /* Then set up the divisor. */ + zapnot t11, 0xf, t11 + + stq t11,0(sp) + ldt $f1,0(sp) + cvtqt $f1,$f1 + + + /* Do the division. */ + divt $f10,$f1,$f10 + cvttqc $f10,$f10 + + /* Put the result in t12. */ + stt $f10,0(sp) + ldq t12,0(sp) + sextl t12, t12 + + + + + lda sp,16(sp) + ret zero,(t9),1 + .end NAME__(divlu) diff --git a/sysdeps/alpha/divq.S b/sysdeps/alpha/divq.S new file mode 100644 index 0000000000..79ff6ca7c5 --- /dev/null +++ b/sysdeps/alpha/divq.S @@ -0,0 +1,51 @@ + /* This file is generated from divrem.m4; DO NOT EDIT! */ +/* For each N divided by D, we do: + result = (double) N / (double) D + Then, for each N mod D, we do: + result = N - (D * divMODE (N, D)) + + FIXME: + The q and qu versions won't deal with operands > 50 bits. We also + don't check for divide by zero. */ + +#include "DEFS.h" +#if 0 +/* We do not handle div by zero yet. */ +#include +#endif +#include + + + + + + +FUNC__(divq) + /* First set up the dividend. */ + + stq t10,0(sp) + ldt $f10,0(sp) + cvtqt $f10,$f10 + + + /* Then set up the divisor. */ + + stq t11,0(sp) + ldt $f1,0(sp) + cvtqt $f1,$f1 + + + /* Do the division. */ + divt $f10,$f1,$f10 + cvttqc $f10,$f10 + + /* Put the result in t12. */ + stt $f10,0(sp) + ldq t12,0(sp) + + + + + lda sp,16(sp) + ret zero,(t9),1 + .end NAME__(divq) diff --git a/sysdeps/alpha/divqu.S b/sysdeps/alpha/divqu.S new file mode 100644 index 0000000000..7908b9f77d --- /dev/null +++ b/sysdeps/alpha/divqu.S @@ -0,0 +1,57 @@ + /* This file is generated from divrem.m4; DO NOT EDIT! */ +/* For each N divided by D, we do: + result = (double) N / (double) D + Then, for each N mod D, we do: + result = N - (D * divMODE (N, D)) + + FIXME: + The q and qu versions won't deal with operands > 50 bits. We also + don't check for divide by zero. */ + +#include "DEFS.h" +#if 0 +/* We do not handle div by zero yet. */ +#include +#endif +#include + + + + + + +FUNC__(divqu) + /* First set up the dividend. */ + + stq t10,0(sp) + ldt $f10,0(sp) + cvtqt $f10,$f10 + ldit $f26, 18446744073709551616.0 + addt $f26, $f10, $f26 + fcmovlt $f10, $f26, $f10 + + + /* Then set up the divisor. */ + + stq t11,0(sp) + ldt $f1,0(sp) + cvtqt $f1,$f1 + ldit $f26, 18446744073709551616.0 + addt $f26, $f1, $f26 + fcmovlt $f1, $f26, $f1 + + + /* Do the division. */ + divt $f10,$f1,$f10 + cvttqc $f10,$f10 + + /* Put the result in t12. */ + stt $f10,0(sp) + ldq t12,0(sp) + + + + + lda sp,16(sp) + ret zero,(t9),1 + .end NAME__(divqu) diff --git a/sysdeps/alpha/reml.S b/sysdeps/alpha/reml.S new file mode 100644 index 0000000000..2ece297f09 --- /dev/null +++ b/sysdeps/alpha/reml.S @@ -0,0 +1,57 @@ + /* This file is generated from divrem.m4; DO NOT EDIT! */ +/* For each N divided by D, we do: + result = (double) N / (double) D + Then, for each N mod D, we do: + result = N - (D * divMODE (N, D)) + + FIXME: + The q and qu versions won't deal with operands > 50 bits. We also + don't check for divide by zero. */ + +#include "DEFS.h" +#if 0 +/* We do not handle div by zero yet. */ +#include +#endif +#include + + + + + + +FUNC__(reml) + /* First set up the dividend. */ + sextl t10, t10 + + stq t10,0(sp) + ldt $f10,0(sp) + cvtqt $f10,$f10 + + + /* Then set up the divisor. */ + sextl t11, t11 + + stq t11,0(sp) + ldt $f1,0(sp) + cvtqt $f1,$f1 + + + /* Do the division. */ + divt $f10,$f1,$f10 + cvttqc $f10,$f10 + + /* Put the result in t12. */ + stt $f10,0(sp) + ldq t12,0(sp) + sextl t12, t12 + + + /* Compute the remainder. */ + mull t11, t12, t11 + subl t10, t11, t12 + + + lda sp,16(sp) + ret zero,(t9),1 + .end NAME__(reml) diff --git a/sysdeps/alpha/remlu.S b/sysdeps/alpha/remlu.S new file mode 100644 index 0000000000..d7700e6595 --- /dev/null +++ b/sysdeps/alpha/remlu.S @@ -0,0 +1,57 @@ + /* This file is generated from divrem.m4; DO NOT EDIT! */ +/* For each N divided by D, we do: + result = (double) N / (double) D + Then, for each N mod D, we do: + result = N - (D * divMODE (N, D)) + + FIXME: + The q and qu versions won't deal with operands > 50 bits. We also + don't check for divide by zero. */ + +#include "DEFS.h" +#if 0 +/* We do not handle div by zero yet. */ +#include +#endif +#include + + + + + + +FUNC__(remlu) + /* First set up the dividend. */ + zapnot t10, 0xf, t10 + + stq t10,0(sp) + ldt $f10,0(sp) + cvtqt $f10,$f10 + + + /* Then set up the divisor. */ + zapnot t11, 0xf, t11 + + stq t11,0(sp) + ldt $f1,0(sp) + cvtqt $f1,$f1 + + + /* Do the division. */ + divt $f10,$f1,$f10 + cvttqc $f10,$f10 + + /* Put the result in t12. */ + stt $f10,0(sp) + ldq t12,0(sp) + sextl t12, t12 + + + /* Compute the remainder. */ + mull t11, t12, t11 + subl t10, t11, t12 + + + lda sp,16(sp) + ret zero,(t9),1 + .end NAME__(remlu) diff --git a/sysdeps/alpha/remq.S b/sysdeps/alpha/remq.S new file mode 100644 index 0000000000..47510cbc8e --- /dev/null +++ b/sysdeps/alpha/remq.S @@ -0,0 +1,54 @@ + /* This file is generated from divrem.m4; DO NOT EDIT! */ +/* For each N divided by D, we do: + result = (double) N / (double) D + Then, for each N mod D, we do: + result = N - (D * divMODE (N, D)) + + FIXME: + The q and qu versions won't deal with operands > 50 bits. We also + don't check for divide by zero. */ + +#include "DEFS.h" +#if 0 +/* We do not handle div by zero yet. */ +#include +#endif +#include + + + + + + +FUNC__(remq) + /* First set up the dividend. */ + + stq t10,0(sp) + ldt $f10,0(sp) + cvtqt $f10,$f10 + + + /* Then set up the divisor. */ + + stq t11,0(sp) + ldt $f1,0(sp) + cvtqt $f1,$f1 + + + /* Do the division. */ + divt $f10,$f1,$f10 + cvttqc $f10,$f10 + + /* Put the result in t12. */ + stt $f10,0(sp) + ldq t12,0(sp) + + + /* Compute the remainder. */ + mulq t11, t12, t11 + subq t10, t11, t12 + + + lda sp,16(sp) + ret zero,(t9),1 + .end NAME__(remq) diff --git a/sysdeps/alpha/remqu.S b/sysdeps/alpha/remqu.S index 4bdc3db394..ec9572dd62 100644 --- a/sysdeps/alpha/remqu.S +++ b/sysdeps/alpha/remqu.S @@ -13,7 +13,7 @@ /* We do not handle div by zero yet. */ #include #endif -#include +#include @@ -21,7 +21,7 @@ FUNC__(remqu) - ! First set up the dividend. + /* First set up the dividend. */ stq t10,0(sp) ldt $f10,0(sp) @@ -31,7 +31,7 @@ FUNC__(remqu) fcmovlt $f10, $f26, $f10 - ! Then set up the divisor. + /* Then set up the divisor. */ stq t11,0(sp) ldt $f1,0(sp) @@ -41,16 +41,16 @@ FUNC__(remqu) fcmovlt $f1, $f26, $f1 - ! Do the division. + /* Do the division. */ divt $f10,$f1,$f10 cvttqc $f10,$f10 - ! Put the result in t12. + /* Put the result in t12. */ stt $f10,0(sp) ldq t12,0(sp) - ! Compute the remainder. + /* Compute the remainder. */ mulq t11, t12, t11 subq t10, t11, t12 From 5e7cd26de60edf58727036e6900db75dc434d6d8 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 17 Feb 1995 23:48:00 +0000 Subject: [PATCH 0528/4487] (divrem output): Do cvs commit if there is a CVS directory. --- sysdeps/alpha/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile index 4ea38941cc..06621b824d 100644 --- a/sysdeps/alpha/Makefile +++ b/sysdeps/alpha/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1993, 1994 Free Software Foundation, Inc. +# Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. # Contributed by Brendan Kehoe (brendan@zen.org). # The GNU C Library is free software; you can redistribute it and/or @@ -91,3 +91,4 @@ $(divrem:%=$(sysdep_dir)/alpha/%.S): $(sysdep_dir)/alpha/divrem.m4 $(sysdep_dir) # Make it unwritable so noone will edit it by mistake. -chmod a-w $@-tmp mv -f $@-tmp $@ + test -d CVS && cvs commit -m'Regenerated from $<' $@ From 92c7a8e20e7d92acbdb081450b07d6cb98150c81 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 18 Feb 1995 00:05:51 +0000 Subject: [PATCH 0529/4487] Previously uncontrolled files put into CVS. --- sysdeps/mach/hurd/hppa/sigcontext.h | 86 +++++++++ sysdeps/mach/hurd/hppa/trampoline.c | 258 +++++++++++++++++++++++++ sysdeps/mips/.cvsignore | 4 + sysdeps/unix/bsd/sun/sunos4/.cvsignore | 4 + 4 files changed, 352 insertions(+) create mode 100644 sysdeps/mach/hurd/hppa/sigcontext.h create mode 100644 sysdeps/mach/hurd/hppa/trampoline.c create mode 100644 sysdeps/mips/.cvsignore create mode 100644 sysdeps/unix/bsd/sun/sunos4/.cvsignore diff --git a/sysdeps/mach/hurd/hppa/sigcontext.h b/sysdeps/mach/hurd/hppa/sigcontext.h new file mode 100644 index 0000000000..b616469f21 --- /dev/null +++ b/sysdeps/mach/hurd/hppa/sigcontext.h @@ -0,0 +1,86 @@ +/* Machine-dependent signal context structure for GNU Hurd. HPPA version. +Copyright (C) 1995 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Signal handlers are actually called: + void handler (int sig, int code, struct sigcontext *scp); */ + +/* State of this thread when the signal was taken. */ +struct sigcontext + { + /* These first members are machine-independent. */ + + int sc_onstack; /* Nonzero if running on sigstack. */ + __sigset_t sc_mask; /* Blocked signals to restore. */ + + /* MiG reply port this thread is using. */ + unsigned int sc_reply_port; + + /* Port this thread is doing an interruptible RPC on. */ + unsigned int sc_intr_port; + + /* Error code associated with this signal (interpreted as `error_t'). */ + int sc_error; + + /* All following members are machine-dependent. The rest of this + structure is written to be laid out identically to a `struct + parisc_thread_state'. trampoline.c knows this, so it must be + changed if this changes. */ + +#define sc_parisc_thread_state sc_flags /* Beginning of correspondence. */ + /* "General" registers $1..$31. */ + unsigned int sc_regs[31]; + + /* Control registers. */ + unsigned int sc_cr11; /* sar */ + /* These four registers make up the PC. */ + unsigned int iioq_head; + unsigned int iisq_head; + unsigned int iioq_tail; + unsigned int iisq_tail; + unsigned int sc_cr15; + unsigned int sc_cr19; + unsigned int sc_cr20; + unsigned int sc_cr21; + unsigned int sc_cr22; /* ipsw */ + unsigned int sc_bsd_goto; /* unused */ + unsigned int sc_sr4; + unsigned int sc_sr0; + unsigned int sc_sr1; + unsigned int sc_sr2; + unsigned int sc_sr3; + unsigned int sc_sr5; + unsigned int sc_sr6; + unsigned int sc_sr7; + unsigned int sc_cr0; + unsigned int sc_cr8; + unsigned int sc_cr9; + unsigned int sc_cr10; /* unused */ + unsigned int sc_cr12; + unsigned int sc_cr13; + unsigned int sc_cr24; /* unused */ + unsigned int sc_cr25; /* unused */ + unsigned int sc_cr26; /* unused */ + unsigned sc_mpsfu_high; /* unused */ + unsigned sc_mpsfu_low; /* unused */ + unsigned sc_mpsfu_ovflo; /* unused */ + int sc_pad; + + /* Floating point registers $f0..$f31. */ + double sc_fpregs[32]; + }; diff --git a/sysdeps/mach/hurd/hppa/trampoline.c b/sysdeps/mach/hurd/hppa/trampoline.c new file mode 100644 index 0000000000..09ab71e88d --- /dev/null +++ b/sysdeps/mach/hurd/hppa/trampoline.c @@ -0,0 +1,258 @@ +/* Set thread_state for sighandler, and sigcontext to recover. HPPA version. +Copyright (C) 1995 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include "thread_state.h" +#include +#include +#include "hurdfault.h" + + +struct mach_msg_trap_regargs + { + /* These first four arguments are in registers 26..23. */ + mach_msg_size_t rcv_size; /* arg3 */ + mach_msg_size_t send_size; /* arg2 */ + mach_msg_option_t option; /* arg1 */ + mach_msg_header_t *msg; /* arg0 */ + }; + +struct sigcontext * +_hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, + int signo, long int sigcode, + volatile int rpc_wait, + struct machine_thread_all_state *state) +{ + __label__ trampoline, rpc_wait_trampoline; + void *volatile sigsp; + struct sigcontext *scp; + + if (ss->context) + { + /* We have a previous sigcontext that sigreturn was about + to restore when another signal arrived. We will just base + our setup on that. */ + if (_hurdsig_catch_fault (SIGSEGV)) + assert (_hurdsig_fault_sigcode >= (long int) ss->context && + _hurdsig_fault_sigcode < (long int) (ss->context + 1)); + else + { + memcpy (&state->basic, &ss->context->sc_parisc_thread_state, + sizeof (state->basic)); + state->set = (1 << PARISC_THREAD_STATE); + assert (! rpc_wait); + /* The intr_port slot was cleared before sigreturn sent us the + sig_post that made us notice this pending signal, so + _hurd_internal_post_signal wouldn't do interrupt_operation. + After we return, our caller will set SCP->sc_intr_port (in the + new context) from SS->intr_port and clear SS->intr_port. Now + that we are restoring this old context recorded by sigreturn, + we want to restore its intr_port too; so store it in + SS->intr_port now, so it will end up in SCP->sc_intr_port + later. */ + ss->intr_port = ss->context->sc_intr_port; + } + /* If the sigreturn context was bogus, just ignore it. */ + ss->context = NULL; + } + else if (! machine_get_basic_state (ss->thread, state)) + return NULL; + + if ((ss->actions[signo].sa_flags & SA_ONSTACK) && + !(ss->sigaltstack.ss_flags & (SA_DISABLE|SA_ONSTACK))) + { + sigsp = ss->sigaltstack.ss_sp + ss->sigaltstack.ss_size; + ss->sigaltstack.ss_flags |= SA_ONSTACK; + /* XXX need to set up base of new stack for + per-thread variables, cthreads. */ + } + else + sigsp = (char *) state->basic.uesp; + + /* Push the signal context on the stack. */ + sigsp -= sizeof (*scp); + scp = sigsp; + + if (_hurdsig_catch_fault (SIGSEGV)) + { + assert (_hurdsig_fault_sigcode >= (long int) scp && + _hurdsig_fault_sigcode <= (long int) (scp + 1)); + /* We got a fault trying to write the stack frame. + We cannot set up the signal handler. + Returning NULL tells our caller, who will nuke us with a SIGILL. */ + return NULL; + } + else + { + int ok; + + /* Set up the sigcontext from the current state of the thread. */ + + scp->sc_onstack = ss->sigaltstack.ss_flags & SA_ONSTACK ? 1 : 0; + + /* struct sigcontext is laid out so that starting at sc_regs mimics a + struct parisc_thread_state. */ + memcpy (&scp->sc_parisc_thread_state, + &state->basic, sizeof (state->basic)); + + _hurdsig_end_catch_fault (); + + if (! ok) + return NULL; + } + + /* Modify the thread state to call the trampoline code on the new stack. */ + if (rpc_wait) + { + /* The signalee thread was blocked in a mach_msg_trap system call, + still waiting for a reply. We will have it run the special + trampoline code which retries the message receive before running + the signal handler. + + To do this we change the OPTION argument on its stack to enable only + message reception, since the request message has already been + sent. */ + + struct mach_msg_trap_regargs *args = (void *) &state->basic.r23; + + if (_hurdsig_catch_fault (SIGSEGV)) + { + assert (_hurdsig_fault_sigcode >= (long int) args && + _hurdsig_fault_sigcode < (long int) (args + 1)); + /* Faulted accessing ARGS. Bomb. */ + return NULL; + } + + assert (args->option & MACH_RCV_MSG); + /* Disable the message-send, since it has already completed. The + calls we retry need only wait to receive the reply message. */ + args->option &= ~MACH_SEND_MSG; + + _hurdsig_end_catch_fault (); + + MACHINE_THREAD_STATE_SET_PC (&state->basic, &&rpc_wait_trampoline); + /* The reply-receiving trampoline code runs initially on the original + user stack. We pass it the signal stack pointer in %r5. */ + state->basic.r5 = (int) sigsp; + /* After doing the message receive, the trampoline code will need to + update the %r28 value to be restored by sigreturn. To simplify + the assembly code, we pass the address of its slot in SCP to the + trampoline code in %r4. */ + state->basic.r4 = (unsigned int) &scp->sc_regs[27]; + /* Set up the arguments for the handler function in callee-saved + registers that we will move to the argument registers after + mach_msg_trap returns. */ + state->basic.r6 = signo; + state->basic.r7 = sigcode; + state->basic.r8 = (unsigned int) scp; + } + else + { + MACHINE_THREAD_STATE_SET_PC (&state->basic, &&trampoline); + state->basic.r20 = (unsigned int) sigsp; + /* Set up the arguments for the handler function. */ + state->basic.r26 = signo; + state->basic.r25 = sigcode; + state->basic.r24 = (unsigned int) scp; + } + + /* We pass the handler function to the trampoline code in %r9. */ + state->basic.r9 = (unsigned int) handler; + /* For convenience, we pass the address of __sigreturn in %r10. */ + state->basic.r10 = (unsigned int) &__sigreturn; + /* The extra copy of SCP for the __sigreturn arg goes in %r8. */ + state->basic.r10 = (unsigned int) scp; + + return scp; + + /* The trampoline code follows. This is not actually executed as part of + this function, it is just convenient to write it that way. */ + + rpc_wait_trampoline: + /* This is the entry point when we have an RPC reply message to receive + before running the handler. The MACH_MSG_SEND bit has already been + cleared in the OPTION argument on our stack. The interrupted user + stack pointer has not been changed, so the system call can find its + arguments; the signal stack pointer is in %ebx. For our convenience, + %ecx points to the sc_eax member of the sigcontext. */ + asm volatile + (/* Retry the interrupted mach_msg system call. */ + "ldil L%0xC0000000,%r1\nble 4(%sr7,%r1)\n" + "ldi -25, %r22\n" /* mach_msg_trap */ + /* When the sigcontext was saved, %r28 was MACH_RCV_INTERRUPTED. But + now the message receive has completed and the original caller of + the RPC (i.e. the code running when the signal arrived) needs to + see the final return value of the message receive in %r28. So + store the new %r28 value into the sc_regs[27] member of the sigcontext + (whose address is in %r4 to make this code simpler). */ + "stw (%r4), %r28\n" + /* Switch to the signal stack. */ + "copy %r5, %r30\n" + /* Copy the handler arguments to the argument registers. */ + "copy %r6, %r26\n" + "copy %r7, %r25\n" + "copy %r8, %r24\n" + ); + + trampoline: + /* Entry point for running the handler normally. The arguments to the + handler function are already in the argument registers. */ + asm volatile + ("bv (%r9); nop" /* Call the handler function. */ + "bv (%r10)\n" /* Call __sigreturn (SCP); never returns. */ + "copy %r8, %r26" /* Set up arg in delay slot. */ + : : "i" (&__sigreturn)); + + /* NOTREACHED */ + return NULL; +} + +/* STATE describes a thread that had intr_port set (meaning it was inside + HURD_EINTR_RPC), after it has been thread_abort'd. It it looks to have + just completed a mach_msg_trap system call that returned + MACH_RCV_INTERRUPTED, return nonzero and set *PORT to the receive right + being waited on. */ +int +_hurdsig_rcv_interrupted_p (struct machine_thread_all_state *state, + mach_port_t *port) +{ + const unsigned int *volatile pc + = MACHINE_THREAD_STATE_PC (&state->basic); + const mach_port_t *rcv_name + = (void *) state->r30 -32-20; /* VA_ARG4 from . */ + + if (_hurdsig_catch_fault (SIGSEGV)) + assert (_hurdsig_fault_sigcode == (long int) pc || + _hurdsig_fault_sigcode == (long int) rcv_name); + else + { + int rcving = (state->basic.r28 == MACH_RCV_INTERRUPTED && + pc == ???unfinished???); + if (rcving) + /* We did just return from a mach_msg_trap system call + doing a message receive that was interrupted. + Examine the parameters to find the receive right. */ + *port = *rcv_name; + _hurdsig_end_catch_fault (); + if (rcving) + return 1; + } + + return 0; +} diff --git a/sysdeps/mips/.cvsignore b/sysdeps/mips/.cvsignore new file mode 100644 index 0000000000..1f69fd919a --- /dev/null +++ b/sysdeps/mips/.cvsignore @@ -0,0 +1,4 @@ +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* diff --git a/sysdeps/unix/bsd/sun/sunos4/.cvsignore b/sysdeps/unix/bsd/sun/sunos4/.cvsignore new file mode 100644 index 0000000000..1f69fd919a --- /dev/null +++ b/sysdeps/unix/bsd/sun/sunos4/.cvsignore @@ -0,0 +1,4 @@ +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* From 484d089077a2e3316bb5e6d365aa33b638077a60 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 19 Feb 1995 23:33:19 +0000 Subject: [PATCH 0530/4487] Fix unsquashed file name in #include. --- sysdeps/unix/sysv/sysv4/sigaltstack.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/sysv4/sigaltstack.S b/sysdeps/unix/sysv/sysv4/sigaltstack.S index e7e4060fba..f7cf0d57f4 100644 --- a/sysdeps/unix/sysv/sysv4/sigaltstack.S +++ b/sysdeps/unix/sysv/sysv4/sigaltstack.S @@ -1,2 +1,2 @@ /* SVR4 uses the BSD 4.4 sigaltstack syscall. */ -#include +#include From e95606364c937da4a9b0596cfde2db8a307fd547 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 19 Feb 1995 23:43:06 +0000 Subject: [PATCH 0531/4487] Fix #include of renamed file. Remove extra weak alias. --- sysdeps/unix/sysv/sysv4/dup2.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/sysv4/dup2.c b/sysdeps/unix/sysv/sysv4/dup2.c index c7015fce7e..7d36e0e352 100644 --- a/sysdeps/unix/sysv/sysv4/dup2.c +++ b/sysdeps/unix/sysv/sysv4/dup2.c @@ -1,4 +1,2 @@ /* SVR4 uses the POSIX dup2. */ -#include - -weak_alias (__dup2, dup2) +#include From f427a39dbda2671bc46ee39b4dfc08d49f5337ed Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 20 Feb 1995 00:53:51 +0000 Subject: [PATCH 0532/4487] Remove __environ definition. --- sysdeps/unix/sysv/irix4/start.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/sysdeps/unix/sysv/irix4/start.c b/sysdeps/unix/sysv/irix4/start.c index 4382e6f855..cd86f85244 100644 --- a/sysdeps/unix/sysv/irix4/start.c +++ b/sysdeps/unix/sysv/irix4/start.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1995 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 @@ -30,13 +30,6 @@ int __data_start = 0; VOLATILE int errno = 0; -#ifndef HAVE_GNU_LD -#undef environ -#define __environ environ -#endif - -char **__environ; - extern void EXFUN(__libc_init, (int argc, char **argv, char **envp)); extern int EXFUN(main, (int argc, char **argv, char **envp)); From 882ec8cfeb04fd31d6a2bc4c3fe06f3fe806e87a Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 21 Feb 1995 03:05:56 +0000 Subject: [PATCH 0533/4487] Remove `__environ' definition. --- sysdeps/unix/bsd/Attic/osf1/alpha/start.S | 7 ------- sysdeps/unix/bsd/ultrix4/mips/start.S | 7 ------- 2 files changed, 14 deletions(-) diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/start.S b/sysdeps/unix/bsd/Attic/osf1/alpha/start.S index 8b7109a512..52eb03667f 100644 --- a/sysdeps/unix/bsd/Attic/osf1/alpha/start.S +++ b/sysdeps/unix/bsd/Attic/osf1/alpha/start.S @@ -18,13 +18,6 @@ Cambridge, MA 02139, USA. */ #include -#ifndef HAVE_WEAK_SYMBOLS -#define __environ environ -#else -weak_alias (__environ, environ) -#endif - -.comm __environ, 8 .comm errno, 4 !.sdata diff --git a/sysdeps/unix/bsd/ultrix4/mips/start.S b/sysdeps/unix/bsd/ultrix4/mips/start.S index ec0f9d833d..eec8ce08be 100644 --- a/sysdeps/unix/bsd/ultrix4/mips/start.S +++ b/sysdeps/unix/bsd/ultrix4/mips/start.S @@ -18,13 +18,6 @@ Cambridge, MA 02139, USA. */ #include -#ifndef HAVE_WEAK_SYMBOLS -#define __environ environ -#else -weak_alias (__environ, environ) -#endif - -.comm __environ, 4 .comm errno, 4 ENTRY(__start) From ac873351a085933e6f2b8aa08db4844732fb4be6 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 22 Feb 1995 02:53:16 +0000 Subject: [PATCH 0534/4487] [subdir=crypt] (crypt): New variable, set to crypt.solar. --- sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile b/sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile index 7ad4bb1633..1c17ea168e 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile @@ -3,3 +3,9 @@ # and difftime.o don't work because of this. The long-term fix is to actually # implement what they're doing, but for the short-term, we must do this. sysdep-CFLAGS := $(sysdep-CFLAGS) -mhard-quad-float + +ifeq ($(subdir),crypt) + +crypt := crypt.solar + +endif From 35618994bc6004999a5b99577909b9fb26933c46 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 3 Mar 1995 19:42:08 +0000 Subject: [PATCH 0535/4487] (mmap): Rename to __mmap, add weak alias mmap. --- sysdeps/unix/bsd/sun/sunos4/mmap.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/bsd/sun/sunos4/mmap.c b/sysdeps/unix/bsd/sun/sunos4/mmap.c index 4dfc1ca2da..b71937381b 100644 --- a/sysdeps/unix/bsd/sun/sunos4/mmap.c +++ b/sysdeps/unix/bsd/sun/sunos4/mmap.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995 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 @@ -34,8 +34,9 @@ extern caddr_t __mmap_syscall (caddr_t addr, size_t len, caddr_t -mmap (caddr_t addr, size_t len, int prot, int flags, int fd, off_t offset) +__mmap (caddr_t addr, size_t len, int prot, int flags, int fd, off_t offset) { return __mmap_syscall (addr, len, prot, flags | _MAP_NEW, fd, offset); } - + +weak_alias (__mmap, mmap) From 35ca0c8d1b6d0d8d3c9d76191872ec371ac34f24 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 3 Mar 1995 20:06:13 +0000 Subject: [PATCH 0536/4487] (__mmap, __munmap): Declare these. --- sysdeps/unix/bsd/sun/sunos4/sys/mman.h | 5 ++++- sysdeps/unix/bsd/ultrix4/sys/mman.h | 9 ++++----- sysdeps/unix/sysv/irix4/sys/mman.h | 5 ++++- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h index 727e665fb6..10f31a898e 100644 --- a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h +++ b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h @@ -1,5 +1,5 @@ /* Definitions for BSD-style memory management. SunOS 4 version. -Copyright (C) 1994 Free Software Foundation, Inc. +Copyright (C) 1994, 1995 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 @@ -80,11 +80,14 @@ __BEGIN_DECLS for errors (in which case `errno' is set). A successful `mmap' call deallocates any previous mapping for the affected region. */ +__caddr_t __mmap __P ((__caddr_t __addr, size_t __len, + int __prot, int __flags, int __fd, __off_t __offset)); __caddr_t mmap __P ((__caddr_t __addr, size_t __len, int __prot, int __flags, int __fd, __off_t __offset)); /* Deallocate any mapping for the region starting at ADDR and extending LEN bytes. Returns 0 if successful, -1 for errors (and sets errno). */ +int __munmap __P ((__caddr_t __addr, size_t __len)); int munmap __P ((__caddr_t __addr, size_t __len)); /* Change the memory protection of the region starting at ADDR and diff --git a/sysdeps/unix/bsd/ultrix4/sys/mman.h b/sysdeps/unix/bsd/ultrix4/sys/mman.h index c850b4f7c8..d49da02c32 100644 --- a/sysdeps/unix/bsd/ultrix4/sys/mman.h +++ b/sysdeps/unix/bsd/ultrix4/sys/mman.h @@ -1,5 +1,5 @@ /* Definitions for BSD-style memory management. Ultrix 4 version. -Copyright (C) 1994 Free Software Foundation, Inc. +Copyright (C) 1994, 1995 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 @@ -17,10 +17,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* These are the bits used by 4.4 BSD and its derivatives. On systems - (such as GNU) where these facilities are not system services but can be - emulated in the C library, these are the definitions we emulate. */ - #ifndef _SYS_MMAN_H #define _SYS_MMAN_H 1 @@ -70,11 +66,14 @@ __BEGIN_DECLS for errors (in which case `errno' is set). A successful `mmap' call deallocates any previous mapping for the affected region. */ +__caddr_t __mmap __P ((__caddr_t __addr, size_t __len, + int __prot, int __flags, int __fd, off_t __offset)); __caddr_t mmap __P ((__caddr_t __addr, size_t __len, int __prot, int __flags, int __fd, off_t __offset)); /* Deallocate any mapping for the region starting at ADDR and extending LEN bytes. Returns 0 if successful, -1 for errors (and sets errno). */ +int __munmap __P ((__caddr_t __addr, size_t __len)); int munmap __P ((__caddr_t __addr, size_t __len)); /* Change the memory protection of the region starting at ADDR and diff --git a/sysdeps/unix/sysv/irix4/sys/mman.h b/sysdeps/unix/sysv/irix4/sys/mman.h index ac50aab6dd..543ce552f3 100644 --- a/sysdeps/unix/sysv/irix4/sys/mman.h +++ b/sysdeps/unix/sysv/irix4/sys/mman.h @@ -1,5 +1,5 @@ /* Definitions for BSD-style memory management. Irix 4 version. -Copyright (C) 1994 Free Software Foundation, Inc. +Copyright (C) 1994, 1995 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 @@ -74,11 +74,14 @@ __BEGIN_DECLS for errors (in which case `errno' is set). A successful `mmap' call deallocates any previous mapping for the affected region. */ +__caddr_t __mmap __P ((__caddr_t __addr, size_t __len, + int __prot, int __flags, int __fd, __off_t __offset)); __caddr_t mmap __P ((__caddr_t __addr, size_t __len, int __prot, int __flags, int __fd, __off_t __offset)); /* Deallocate any mapping for the region starting at ADDR and extending LEN bytes. Returns 0 if successful, -1 for errors (and sets errno). */ +int __munmap __P ((__caddr_t __addr, size_t __len)); int munmap __P ((__caddr_t __addr, size_t __len)); /* Change the memory protection of the region starting at ADDR and From 66971be81100ed599e4acb31fd7d9edd86b680b6 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 6 Mar 1995 00:22:30 +0000 Subject: [PATCH 0537/4487] Initial checkin. --- sysdeps/unix/bsd/hp/m68k/vfork.S | 55 +++++++++++++++++++++++++++++ sysdeps/unix/bsd/sun/m68k/vfork.S | 55 +++++++++++++++++++++++++++++ sysdeps/unix/bsd/vax/vfork.S | 57 +++++++++++++++++++++++++++++++ 3 files changed, 167 insertions(+) create mode 100644 sysdeps/unix/bsd/hp/m68k/vfork.S create mode 100644 sysdeps/unix/bsd/sun/m68k/vfork.S create mode 100644 sysdeps/unix/bsd/vax/vfork.S diff --git a/sysdeps/unix/bsd/hp/m68k/vfork.S b/sysdeps/unix/bsd/hp/m68k/vfork.S new file mode 100644 index 0000000000..b70c122838 --- /dev/null +++ b/sysdeps/unix/bsd/hp/m68k/vfork.S @@ -0,0 +1,55 @@ +/* Copyright (C) 1991, 1994, 1995 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#ifndef SYS_vfork +#define SYS_vfork 66 +#endif + +/* Clone the calling process, but without copying the whole address space. + The the calling process is suspended until the the new process exits or is + replaced by a call to `execve'. Return -1 for errors, 0 to the new process, + and the process ID of the new process to the old process. */ +.globl ___vfork +___vfork: + /* Pop the return PC value into A0. */ + moveal sp@+, a0 + + /* Stuff the syscall number in D0 and trap into the kernel. */ + movel #SYS_vfork, d0 + trap #0 + bcs error /* Branch forward if it failed. */ + + /* It succeeded. See which fork we're in. D1 is now 0 for the + parent and 1 for the child. Decrement it to make it -1 (all + bits set) for the parent, and 0 (no bits set) for the child. + Then AND it with D0, so the parent gets D0&-1==R0, and the child + gets D0&0==0. */ + subl #1, d1 + andl d1, d0 + + /* Jump to the return PC. */ + jmp a0@ + +error: + movel d0, _errno + moveq #-1, d0 + jmp a0@ + +weak_alias (__vfork, vfork) diff --git a/sysdeps/unix/bsd/sun/m68k/vfork.S b/sysdeps/unix/bsd/sun/m68k/vfork.S new file mode 100644 index 0000000000..cb7dae8d2b --- /dev/null +++ b/sysdeps/unix/bsd/sun/m68k/vfork.S @@ -0,0 +1,55 @@ +/* Copyright (C) 1991, 1992, 1993, 1994, 1995 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#ifndef SYS_vfork +#define SYS_vfork 66 +#endif + +/* Clone the calling process, but without copying the whole address space. + The the calling process is suspended until the the new process exits or is + replaced by a call to `execve'. Return -1 for errors, 0 to the new process, + and the process ID of the new process to the old process. */ +.globl ___vfork +___vfork: + /* Pop the return PC value into A0. */ + movel sp@+, a0 + + /* Push the syscall number and trap into the kernel. */ + movel #SYS_vfork, sp@- + trap #0 + bcs error /* Branch forward if it failed. */ + + /* It succeeded. See which fork we're in. D1 is now 0 for the + parent and 1 for the child. Decrement it to make it -1 (all + bits set) for the parent, and 0 (no bits set) for the child. + Then AND it with D0, so the parent gets D0&-1==R0, and the child + gets D0&0==0. */ + decl d1 + andl d1, d0 + + /* Jump to the return PC. */ + jmp a0@ + +error: + movel d0, _errno + moveq #-1, d0 + jmp a0@ + +weak_alias (__vfork, vfork) diff --git a/sysdeps/unix/bsd/vax/vfork.S b/sysdeps/unix/bsd/vax/vfork.S new file mode 100644 index 0000000000..daf8f0f20d --- /dev/null +++ b/sysdeps/unix/bsd/vax/vfork.S @@ -0,0 +1,57 @@ +/* Copyright (C) 1991, 1992, 1995 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#ifndef SYS_vfork +#define SYS_vfork 66 +#endif + +/* Clone the calling process, but without copying the whole address space. + The the calling process is suspended until the the new process exits or is + replaced by a call to `execve'. Return -1 for errors, 0 to the new process, + and the process ID of the new process to the old process. */ +.globl ___vfork +error: jmp syscall_error +___vfork: + .word 0 + /* Save our return address in R2, and return to code below. */ + movl 16(fp), r2 + movab unwind, 16(fp) + ret +unwind: + /* Do the system call. */ + chmk $SYS_vfork + bcs error + + tstl r1 + beq parent + + /* We are the child. Return zero. */ + clrl r0 + + /* Return to the saved address. */ +parent: jmp (r2) + +.globl _errno +error: + movl r0, _errno + mnegl $1, r0 + jmp (r2) + +weak_alias (__vfork, vfork) From e667dcee383d4b1e6416bcce7d0b72e9ce340630 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Fri, 10 Mar 1995 01:22:34 +0000 Subject: [PATCH 0538/4487] moved to ../osf --- sysdeps/unix/bsd/Attic/osf1/alpha/brk.S | 53 ------------- sysdeps/unix/bsd/Attic/osf1/alpha/fork.S | 25 ------- sysdeps/unix/bsd/Attic/osf1/alpha/getdents.S | 25 ------- sysdeps/unix/bsd/Attic/osf1/alpha/killpg.S | 25 ------- sysdeps/unix/bsd/Attic/osf1/alpha/pipe.S | 30 -------- sysdeps/unix/bsd/Attic/osf1/alpha/recv.S | 25 ------- sysdeps/unix/bsd/Attic/osf1/alpha/send.S | 25 ------- sysdeps/unix/bsd/Attic/osf1/alpha/sigblock.S | 27 ------- sysdeps/unix/bsd/Attic/osf1/alpha/sigpause.S | 27 ------- .../unix/bsd/Attic/osf1/alpha/sigsetmask.S | 27 ------- sysdeps/unix/bsd/Attic/osf1/alpha/sigvec.S | 27 ------- sysdeps/unix/bsd/Attic/osf1/alpha/start.S | 65 ---------------- sysdeps/unix/bsd/Attic/osf1/alpha/statbuf.h | 75 ------------------- sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.S | 40 ---------- sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.h | 73 ------------------ sysdeps/unix/bsd/Attic/osf1/alpha/vhangup.S | 25 ------- sysdeps/unix/bsd/Attic/osf1/alpha/wait4.S | 1 - sysdeps/unix/bsd/Attic/osf1/alpha/waitpid.c | 1 - 18 files changed, 596 deletions(-) delete mode 100644 sysdeps/unix/bsd/Attic/osf1/alpha/brk.S delete mode 100644 sysdeps/unix/bsd/Attic/osf1/alpha/fork.S delete mode 100644 sysdeps/unix/bsd/Attic/osf1/alpha/getdents.S delete mode 100644 sysdeps/unix/bsd/Attic/osf1/alpha/killpg.S delete mode 100644 sysdeps/unix/bsd/Attic/osf1/alpha/pipe.S delete mode 100644 sysdeps/unix/bsd/Attic/osf1/alpha/recv.S delete mode 100644 sysdeps/unix/bsd/Attic/osf1/alpha/send.S delete mode 100644 sysdeps/unix/bsd/Attic/osf1/alpha/sigblock.S delete mode 100644 sysdeps/unix/bsd/Attic/osf1/alpha/sigpause.S delete mode 100644 sysdeps/unix/bsd/Attic/osf1/alpha/sigsetmask.S delete mode 100644 sysdeps/unix/bsd/Attic/osf1/alpha/sigvec.S delete mode 100644 sysdeps/unix/bsd/Attic/osf1/alpha/start.S delete mode 100644 sysdeps/unix/bsd/Attic/osf1/alpha/statbuf.h delete mode 100644 sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.S delete mode 100644 sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.h delete mode 100644 sysdeps/unix/bsd/Attic/osf1/alpha/vhangup.S delete mode 100644 sysdeps/unix/bsd/Attic/osf1/alpha/wait4.S delete mode 100644 sysdeps/unix/bsd/Attic/osf1/alpha/waitpid.c diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/brk.S b/sysdeps/unix/bsd/Attic/osf1/alpha/brk.S deleted file mode 100644 index 111f3397af..0000000000 --- a/sysdeps/unix/bsd/Attic/osf1/alpha/brk.S +++ /dev/null @@ -1,53 +0,0 @@ -/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@zen.org). - -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 -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -#ifndef SYS_brk -#define SYS_brk 17 -#endif - -#ifndef HAVE_GNU_LD -#define __end end -#endif - -.data - .extern __end,8 - .globl __curbrk -__curbrk: - .quad __end - -.text -ENTRY(__brk) - ! FIXME We do not check for asking for less than a page yet. - ldiq v0, SYS_brk - call_pal PAL_callsys - bne a3, error - - /* Update __curbrk and exit cleanly. */ -! ldgp gp, 0(t12) - stl a0, __curbrk - - mov zero, v0 - ret - /* What a horrible way to die. */ -error: ldgp gp,0(gp) - jmp zero,syscall_error - .end __brk - -weak_alias (__brk, brk) diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/fork.S b/sysdeps/unix/bsd/Attic/osf1/alpha/fork.S deleted file mode 100644 index 7c8d671893..0000000000 --- a/sysdeps/unix/bsd/Attic/osf1/alpha/fork.S +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@zen.org). - -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 -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -SYSCALL__ (fork, 0) - cmovne a4, 0, v0 - ret - -weak_alias (__fork, fork) diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/getdents.S b/sysdeps/unix/bsd/Attic/osf1/alpha/getdents.S deleted file mode 100644 index 16ccbc2ce2..0000000000 --- a/sysdeps/unix/bsd/Attic/osf1/alpha/getdents.S +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@zen.org). - -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 -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -SYSCALL__ (getdirentries, 4) - ret - -weak_alias (__getdirentries, getdirentries) - diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/killpg.S b/sysdeps/unix/bsd/Attic/osf1/alpha/killpg.S deleted file mode 100644 index f0b82b3d1a..0000000000 --- a/sysdeps/unix/bsd/Attic/osf1/alpha/killpg.S +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@zen.org). - -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 -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -#include -#define SYS_killpg SYS_ult_killpg - -SYSCALL (killpg, 2) - ret diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/pipe.S b/sysdeps/unix/bsd/Attic/osf1/alpha/pipe.S deleted file mode 100644 index 6b074eda1a..0000000000 --- a/sysdeps/unix/bsd/Attic/osf1/alpha/pipe.S +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@zen.org). - -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 -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -SYSCALL__ (pipe, 1) - /* Plop in the two descriptors. */ - stl r0, 0(a0) - stl r1, 4(a0) - - /* Go out with a clean status. */ - mov zero, r0 - ret - -weak_alias (__pipe, pipe) diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/recv.S b/sysdeps/unix/bsd/Attic/osf1/alpha/recv.S deleted file mode 100644 index 4ac00eb44e..0000000000 --- a/sysdeps/unix/bsd/Attic/osf1/alpha/recv.S +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (C) 1991, 1992 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -#include -#define SYS_recv SYS_ult_recv - -SYSCALL (recv, 4) - ret diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/send.S b/sysdeps/unix/bsd/Attic/osf1/alpha/send.S deleted file mode 100644 index ca46894a25..0000000000 --- a/sysdeps/unix/bsd/Attic/osf1/alpha/send.S +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (C) 1991, 1992 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -#include -#define SYS_send SYS_ult_send - -SYSCALL (send, 4) - ret diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/sigblock.S b/sysdeps/unix/bsd/Attic/osf1/alpha/sigblock.S deleted file mode 100644 index c3556a915f..0000000000 --- a/sysdeps/unix/bsd/Attic/osf1/alpha/sigblock.S +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 1994, 1995 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@zen.org). - -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 -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -#include -#define SYS_sigblock SYS_ult_sigblock - -SYSCALL__ (sigblock, 1) - ret - -weak_alias (__sigblock, sigblock) diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/sigpause.S b/sysdeps/unix/bsd/Attic/osf1/alpha/sigpause.S deleted file mode 100644 index 04b6d45db7..0000000000 --- a/sysdeps/unix/bsd/Attic/osf1/alpha/sigpause.S +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@zen.org). - -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 -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -#include -#define SYS_sigpause SYS_ult_sigpause - -SYSCALL__ (sigpause, 1) - ret - -weak_alias (__sigpause, sigpause) diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/sigsetmask.S b/sysdeps/unix/bsd/Attic/osf1/alpha/sigsetmask.S deleted file mode 100644 index fb3a1d19f7..0000000000 --- a/sysdeps/unix/bsd/Attic/osf1/alpha/sigsetmask.S +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@zen.org). - -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 -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -#include -#define SYS_sigsetmask SYS_ult_sigsetmask - -SYSCALL__ (sigsetmask, 1) - ret - -weak_alias (__sigsetmask, sigsetmask) diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/sigvec.S b/sysdeps/unix/bsd/Attic/osf1/alpha/sigvec.S deleted file mode 100644 index b04ec6e12e..0000000000 --- a/sysdeps/unix/bsd/Attic/osf1/alpha/sigvec.S +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@zen.org). - -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 -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -#include -#define SYS_sigvec SYS_ult_sigvec - -SYSCALL__ (sigvec, 3) - ret - -weak_alias (__sigvec, sigvec) diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/start.S b/sysdeps/unix/bsd/Attic/osf1/alpha/start.S deleted file mode 100644 index 52eb03667f..0000000000 --- a/sysdeps/unix/bsd/Attic/osf1/alpha/start.S +++ /dev/null @@ -1,65 +0,0 @@ -/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@zen.org). - -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 -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -.comm errno, 4 - -!.sdata -!.globl STARTFRM -!STARTFRM = 0 - -.text -ENTRY(__start) - lda sp, -16(sp) - stq zero, 8(sp) - - ! This branch puts the address of the current insn in t0. - br t0, 10f -10: - ! We set the GP register by using the address of the ldgp - ! (what we just put into t0). - ldgp gp, 0(t0) - - ! get argc - ldl a0, 16(sp) - - ! get argv - lda a1, 24(sp) - - ! move ahead to envp - s8addq a0, a1, a2 - addq a2, 0x8, a2 - - ! Store in environ. - stq a2, environ - - ! Clear out errno. -! ldgp gp, 0(t12) - stl zero, errno - - ! Call main. - jsr ra, main - ldgp gp, 0(ra) - - mov v0, a0 - - jsr ra, exit - ldgp gp, 0(ra) - - .end __start diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/statbuf.h b/sysdeps/unix/bsd/Attic/osf1/alpha/statbuf.h deleted file mode 100644 index 9cadfaefd3..0000000000 --- a/sysdeps/unix/bsd/Attic/osf1/alpha/statbuf.h +++ /dev/null @@ -1,75 +0,0 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@zen.org). - -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 -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#ifndef _STATBUF_H -#define _STATBUF_H - -#include - -/* Structure describing file characteristics. */ -struct stat - { - int st_dev; /* Device. */ - unsigned int st_ino; /* File serial number. */ - unsigned int st_mode; /* File mode. */ - unsigned short st_nlink; /* Link count. */ - unsigned int st_uid; /* User ID of the file's owner. */ - unsigned int st_gid; /* Group ID of the file's group.*/ - int st_rdev; /* Device number, if device. */ - - long st_size; /* Size of file, in bytes. */ - - int st_atime; /* Time of last access. */ - int st_atime_usec; - int st_mtime; /* Time of last modification. */ - int st_mtime_usec; - int st_ctime; /* Time of last status change. */ - int st_ctime_usec; - - unsigned int st_blksize; /* Optimal block size for I/O. */ -#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ - - int st_blocks; /* Number of 512-byte blocks allocated. */ - unsigned int st_flags; - unsigned int st_gen; - }; - -/* Encoding of the file mode. */ - -#define __S_IFMT 0170000 /* These bits determine file type. */ - -/* File types. */ -#define __S_IFDIR 0040000 /* Directory. */ -#define __S_IFCHR 0020000 /* Character device. */ -#define __S_IFBLK 0060000 /* Block device. */ -#define __S_IFREG 0100000 /* Regular file. */ -#define __S_IFIFO 0010000 /* FIFO. */ - -#define __S_IFLNK 0120000 /* Symbolic link. */ -#define __S_IFSOCK 0140000 /* Socket. */ - -/* Protection bits. */ - -#define __S_ISUID 04000 /* Set user ID on execution. */ -#define __S_ISGID 02000 /* Set group ID on execution. */ -#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ -#define __S_IREAD 0400 /* Read by owner. */ -#define __S_IWRITE 0200 /* Write by owner. */ -#define __S_IEXEC 0100 /* Execute by owner. */ - -#endif /* statbuf.h */ diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.S b/sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.S deleted file mode 100644 index bc4865cef2..0000000000 --- a/sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.S +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@zen.org). - -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 -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#define _ERRNO_H -#include - -ENTRY(syscall_error) -#ifdef EWOULDBLOCK_sys - /* We translate the system's EWOULDBLOCK error into EAGAIN. - The GNU C library always defines EWOULDBLOCK==EAGAIN. - EWOULDBLOCK_sys is the original number. */ - subq v0, EWOULDBLOCK_sys, t0 - cmoveq t0, EAGAIN, v0 -#endif - - /* Store it in errno... */ -! ldgp gp, 0(t12) - stl v0, errno - - /* And just kick back a -1. */ - ldil v0, -1 - ret - - .end syscall_error diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.h b/sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.h deleted file mode 100644 index 3669a69b9b..0000000000 --- a/sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.h +++ /dev/null @@ -1,73 +0,0 @@ -/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@zen.org). - -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 -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -#ifdef ASSEMBLER - -#include /* get PAL_callsys */ -#include - -#ifdef __STDC__ -#define ENTRY(name) \ - .globl name; \ - .ent name,0; \ - name##:; \ - .frame sp,0,ra -#else -#define ENTRY(name) \ - .globl name; \ - .ent name,0; \ - name/**/:; \ - .frame sp,0,ra -#endif - -#ifdef __STDC__ -#define PSEUDO(name, syscall_name, args) \ - ENTRY(name); \ - ldiq v0, SYS_##syscall_name; \ - .set noat; \ - call_pal PAL_callsys; \ - .set at; \ - beq a3, 10f; \ - br gp, 20f; \ -20:; \ - ldgp gp, 0(gp); \ - jmp zero, syscall_error; \ -10: -#else -#define PSEUDO(name, syscall_name, args) \ - ENTRY(name); \ - ldiq v0, SYS_/**/syscall_name; \ - .set noat; \ - call_pal PAL_callsys; \ - .set at; \ - beq a3, 10f; \ - br gp, 20f; \ -20:; \ - ldgp gp, 0(gp); \ - jmp zero, syscall_error; \ -10: -#endif - -#define ret ret zero,(ra),1 -#define r0 v0 -#define r1 a4 -#define MOVE(x,y) mov x, y - -#endif /* ASSEMBLER */ diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/vhangup.S b/sysdeps/unix/bsd/Attic/osf1/alpha/vhangup.S deleted file mode 100644 index d4d2b1c485..0000000000 --- a/sysdeps/unix/bsd/Attic/osf1/alpha/vhangup.S +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (C) 1991, 1992 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -#include -#define SYS_vhangup SYS_ult_vhangup - -SYSCALL (vhangup, 1) - ret diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/wait4.S b/sysdeps/unix/bsd/Attic/osf1/alpha/wait4.S deleted file mode 100644 index e4c322341d..0000000000 --- a/sysdeps/unix/bsd/Attic/osf1/alpha/wait4.S +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/waitpid.c b/sysdeps/unix/bsd/Attic/osf1/alpha/waitpid.c deleted file mode 100644 index 8378982ac7..0000000000 --- a/sysdeps/unix/bsd/Attic/osf1/alpha/waitpid.c +++ /dev/null @@ -1 +0,0 @@ -#include From 864a3e4e2947eed46808e184fb4426c278995a11 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Fri, 10 Mar 1995 01:49:04 +0000 Subject: [PATCH 0539/4487] imoved from osf1 (had to do it over here, cvs crashed at Cygnus trying to do it remotely) --- sysdeps/unix/bsd/osf/sys/mman.h | 113 ++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 sysdeps/unix/bsd/osf/sys/mman.h diff --git a/sysdeps/unix/bsd/osf/sys/mman.h b/sysdeps/unix/bsd/osf/sys/mman.h new file mode 100644 index 0000000000..397ad28535 --- /dev/null +++ b/sysdeps/unix/bsd/osf/sys/mman.h @@ -0,0 +1,113 @@ +/* Definitions for BSD-style memory management. OSF/1 version. +Copyright (C) 1994, 1995 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifndef _SYS_MMAN_H + +#define _SYS_MMAN_H 1 +#include + +#include +#define __need_size_t +#include + + +/* Protections are chosen from these bits, OR'd together. The + implementation does not necessarily support PROT_EXEC or PROT_WRITE + without PROT_READ. The only guarantees are that no writing will be + allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ + +#define PROT_NONE 0x00 /* No access. */ +#define PROT_READ 0x01 /* Pages can be read. */ +#define PROT_WRITE 0x02 /* Pages can be written. */ +#define PROT_EXEC 0x04 /* Pages can be executed. */ + + +/* Flags contain mapping type, sharing type and options. */ + +/* Mapping type (must choose one and only one of these). */ +#define MAP_FILE 0x00 /* Mapped from a file or device. */ +#define MAP_ANON 0x10 /* Allocated from anonymous virtual memory. */ +#define MAP_ANONYMOUS MAP_ANON +#define MAP_TYPE 0xf0 /* Mask for type field. */ + +/* Sharing types (must choose one and only one of these). */ +#define MAP_SHARED 0x01 /* Share changes. */ +#define MAP_PRIVATE 0x02 /* Changes private; copy pages on write. */ + +/* Other flags. */ +#define MAP_FIXED 0x0100 /* Map address must be exactly as requested. */ +#define MAP_VARIABLE 0 /* Absence of MAP_FIXED. */ +#define MAP_HASSEMPHORE 0x0200 /* Region may contain semaphores. */ +#define MAP_INHERIT 0x0400 /* Region is retained after exec. */ +#define MAP_UNALIGNED 0x0800 /* File offset need not be page-aligned. */ + +/* Advice to `madvise'. */ +#define MADV_NORMAL 0 /* No further special treatment. */ +#define MADV_RANDOM 1 /* Expect random page references. */ +#define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +#define MADV_WILLNEED 3 /* Will need these pages. */ +#define MADV_DONTNEED 4 /* Don't need these pages. */ +#define MADV_SPACEAVAIL 5 /* Ensure that resources are available. */ + +/* Flags to `msync'. */ +#define MS_ASYNC 1 /* Asynchronous cache flush. */ +#define MS_SYNC 3 /* Synchronous cache flush. */ +#define MS_INVALIDATE 4 /* Invalidate cached pages. */ + + +#include + +__BEGIN_DECLS +/* Map addresses starting near ADDR and extending for LEN bytes. from + OFFSET into the file FD describes according to PROT and FLAGS. If ADDR + is nonzero, it is the desired mapping address. If the MAP_FIXED bit is + set in FLAGS, the mapping will be at ADDR exactly (which must be + page-aligned); otherwise the system chooses a convenient nearby address. + The return value is the actual mapping address chosen or (caddr_t) -1 + for errors (in which case `errno' is set). A successful `mmap' call + deallocates any previous mapping for the affected region. */ + +__caddr_t __mmap __P ((__caddr_t __addr, size_t __len, + int __prot, int __flags, int __fd, off_t __offset)); +__caddr_t mmap __P ((__caddr_t __addr, size_t __len, + int __prot, int __flags, int __fd, off_t __offset)); + +/* Deallocate any mapping for the region starting at ADDR and extending LEN + bytes. Returns 0 if successful, -1 for errors (and sets errno). */ +int __munmap __P ((__caddr_t __addr, size_t __len)); +int munmap __P ((__caddr_t __addr, size_t __len)); + +/* Change the memory protection of the region starting at ADDR and + extending LEN bytes to PROT. Returns 0 if successful, -1 for errors + (and sets errno). */ +int mprotect __P ((__caddr_t __addr, size_t __len, int __prot)); + +/* Synchronize the region starting at ADDR and extending LEN bytes with the + file it maps. Filesystem operations on a file being mapped are + unpredictable before this is done. */ +int msync __P ((__caddr_t __addr, size_t __len, int __flags)); + +/* Advise the system about particular usage patterns the program follows + for the region starting at ADDR and extending LEN bytes. */ +int madvise __P ((__caddr_t __addr, size_t __len, int __advice)); + +__END_DECLS + + +#endif /* sys/mman.h */ From 77072f48a55f5d537e8bd38a51fd9873816795d3 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Fri, 10 Mar 1995 01:51:02 +0000 Subject: [PATCH 0540/4487] moved from ../osf1 --- sysdeps/unix/bsd/osf/=dirstream.h | 44 +++++++++++++++ sysdeps/unix/bsd/osf/Implies | 2 + sysdeps/unix/bsd/osf/Makefile | 3 + sysdeps/unix/bsd/osf/alpha/brk.S | 53 +++++++++++++++++ sysdeps/unix/bsd/osf/alpha/fork.S | 25 +++++++++ sysdeps/unix/bsd/osf/alpha/getdents.S | 25 +++++++++ sysdeps/unix/bsd/osf/alpha/killpg.S | 25 +++++++++ sysdeps/unix/bsd/osf/alpha/pipe.S | 30 ++++++++++ sysdeps/unix/bsd/osf/alpha/recv.S | 25 +++++++++ sysdeps/unix/bsd/osf/alpha/send.S | 25 +++++++++ sysdeps/unix/bsd/osf/alpha/sigblock.S | 27 +++++++++ sysdeps/unix/bsd/osf/alpha/sigpause.S | 27 +++++++++ sysdeps/unix/bsd/osf/alpha/sigsetmask.S | 27 +++++++++ sysdeps/unix/bsd/osf/alpha/sigvec.S | 27 +++++++++ sysdeps/unix/bsd/osf/alpha/start.S | 65 +++++++++++++++++++++ sysdeps/unix/bsd/osf/alpha/statbuf.h | 75 +++++++++++++++++++++++++ sysdeps/unix/bsd/osf/alpha/sysdep.S | 40 +++++++++++++ sysdeps/unix/bsd/osf/alpha/sysdep.h | 73 ++++++++++++++++++++++++ sysdeps/unix/bsd/osf/alpha/vhangup.S | 25 +++++++++ sysdeps/unix/bsd/osf/alpha/wait4.S | 1 + sysdeps/unix/bsd/osf/alpha/waitpid.c | 1 + sysdeps/unix/bsd/osf/msync.S | 1 + sysdeps/unix/bsd/osf/sigaction.h | 45 +++++++++++++++ sysdeps/unix/bsd/osf/system.c | 2 + 24 files changed, 693 insertions(+) create mode 100644 sysdeps/unix/bsd/osf/=dirstream.h create mode 100644 sysdeps/unix/bsd/osf/Implies create mode 100644 sysdeps/unix/bsd/osf/Makefile create mode 100644 sysdeps/unix/bsd/osf/alpha/brk.S create mode 100644 sysdeps/unix/bsd/osf/alpha/fork.S create mode 100644 sysdeps/unix/bsd/osf/alpha/getdents.S create mode 100644 sysdeps/unix/bsd/osf/alpha/killpg.S create mode 100644 sysdeps/unix/bsd/osf/alpha/pipe.S create mode 100644 sysdeps/unix/bsd/osf/alpha/recv.S create mode 100644 sysdeps/unix/bsd/osf/alpha/send.S create mode 100644 sysdeps/unix/bsd/osf/alpha/sigblock.S create mode 100644 sysdeps/unix/bsd/osf/alpha/sigpause.S create mode 100644 sysdeps/unix/bsd/osf/alpha/sigsetmask.S create mode 100644 sysdeps/unix/bsd/osf/alpha/sigvec.S create mode 100644 sysdeps/unix/bsd/osf/alpha/start.S create mode 100644 sysdeps/unix/bsd/osf/alpha/statbuf.h create mode 100644 sysdeps/unix/bsd/osf/alpha/sysdep.S create mode 100644 sysdeps/unix/bsd/osf/alpha/sysdep.h create mode 100644 sysdeps/unix/bsd/osf/alpha/vhangup.S create mode 100644 sysdeps/unix/bsd/osf/alpha/wait4.S create mode 100644 sysdeps/unix/bsd/osf/alpha/waitpid.c create mode 100644 sysdeps/unix/bsd/osf/msync.S create mode 100644 sysdeps/unix/bsd/osf/sigaction.h create mode 100644 sysdeps/unix/bsd/osf/system.c diff --git a/sysdeps/unix/bsd/osf/=dirstream.h b/sysdeps/unix/bsd/osf/=dirstream.h new file mode 100644 index 0000000000..c37610e258 --- /dev/null +++ b/sysdeps/unix/bsd/osf/=dirstream.h @@ -0,0 +1,44 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifndef _DIRSTREAM_H + +#define _DIRSTREAM_H 1 + +#define __need_size_t +#include + +/* Directory stream type. */ + +typedef struct + { + int __fd; /* File descriptor. */ + + size_t __offset; /* Current offset into the block. */ + size_t __size; /* Total valid data in the block. */ + char *__data; /* Directory block. */ + + int __allocation; /* Space allocated for the block. */ + + int __data_len; /* Size of __data. */ + long __dd_seek; /* OSF/1 magic cookie returned by getdents. */ + void *dd_lock; /* Used by OSF/1 for inter-thread locking. */ + + } DIR; + +#endif /* dirstream.h */ diff --git a/sysdeps/unix/bsd/osf/Implies b/sysdeps/unix/bsd/osf/Implies new file mode 100644 index 0000000000..82719f5a5d --- /dev/null +++ b/sysdeps/unix/bsd/osf/Implies @@ -0,0 +1,2 @@ +# OSF/1 has the canonical set of system calls. +unix/mman diff --git a/sysdeps/unix/bsd/osf/Makefile b/sysdeps/unix/bsd/osf/Makefile new file mode 100644 index 0000000000..743788a41a --- /dev/null +++ b/sysdeps/unix/bsd/osf/Makefile @@ -0,0 +1,3 @@ +# Without -non_shared (via the compiler's -static flag), we'll end up +# with some unresolved symbols wrt exceptions. +LDFLAGS := $(LDFLAGS) -static diff --git a/sysdeps/unix/bsd/osf/alpha/brk.S b/sysdeps/unix/bsd/osf/alpha/brk.S new file mode 100644 index 0000000000..111f3397af --- /dev/null +++ b/sysdeps/unix/bsd/osf/alpha/brk.S @@ -0,0 +1,53 @@ +/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#ifndef SYS_brk +#define SYS_brk 17 +#endif + +#ifndef HAVE_GNU_LD +#define __end end +#endif + +.data + .extern __end,8 + .globl __curbrk +__curbrk: + .quad __end + +.text +ENTRY(__brk) + ! FIXME We do not check for asking for less than a page yet. + ldiq v0, SYS_brk + call_pal PAL_callsys + bne a3, error + + /* Update __curbrk and exit cleanly. */ +! ldgp gp, 0(t12) + stl a0, __curbrk + + mov zero, v0 + ret + /* What a horrible way to die. */ +error: ldgp gp,0(gp) + jmp zero,syscall_error + .end __brk + +weak_alias (__brk, brk) diff --git a/sysdeps/unix/bsd/osf/alpha/fork.S b/sysdeps/unix/bsd/osf/alpha/fork.S new file mode 100644 index 0000000000..7c8d671893 --- /dev/null +++ b/sysdeps/unix/bsd/osf/alpha/fork.S @@ -0,0 +1,25 @@ +/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +SYSCALL__ (fork, 0) + cmovne a4, 0, v0 + ret + +weak_alias (__fork, fork) diff --git a/sysdeps/unix/bsd/osf/alpha/getdents.S b/sysdeps/unix/bsd/osf/alpha/getdents.S new file mode 100644 index 0000000000..16ccbc2ce2 --- /dev/null +++ b/sysdeps/unix/bsd/osf/alpha/getdents.S @@ -0,0 +1,25 @@ +/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +SYSCALL__ (getdirentries, 4) + ret + +weak_alias (__getdirentries, getdirentries) + diff --git a/sysdeps/unix/bsd/osf/alpha/killpg.S b/sysdeps/unix/bsd/osf/alpha/killpg.S new file mode 100644 index 0000000000..f0b82b3d1a --- /dev/null +++ b/sysdeps/unix/bsd/osf/alpha/killpg.S @@ -0,0 +1,25 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#include +#define SYS_killpg SYS_ult_killpg + +SYSCALL (killpg, 2) + ret diff --git a/sysdeps/unix/bsd/osf/alpha/pipe.S b/sysdeps/unix/bsd/osf/alpha/pipe.S new file mode 100644 index 0000000000..6b074eda1a --- /dev/null +++ b/sysdeps/unix/bsd/osf/alpha/pipe.S @@ -0,0 +1,30 @@ +/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +SYSCALL__ (pipe, 1) + /* Plop in the two descriptors. */ + stl r0, 0(a0) + stl r1, 4(a0) + + /* Go out with a clean status. */ + mov zero, r0 + ret + +weak_alias (__pipe, pipe) diff --git a/sysdeps/unix/bsd/osf/alpha/recv.S b/sysdeps/unix/bsd/osf/alpha/recv.S new file mode 100644 index 0000000000..4ac00eb44e --- /dev/null +++ b/sysdeps/unix/bsd/osf/alpha/recv.S @@ -0,0 +1,25 @@ +/* Copyright (C) 1991, 1992 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#include +#define SYS_recv SYS_ult_recv + +SYSCALL (recv, 4) + ret diff --git a/sysdeps/unix/bsd/osf/alpha/send.S b/sysdeps/unix/bsd/osf/alpha/send.S new file mode 100644 index 0000000000..ca46894a25 --- /dev/null +++ b/sysdeps/unix/bsd/osf/alpha/send.S @@ -0,0 +1,25 @@ +/* Copyright (C) 1991, 1992 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#include +#define SYS_send SYS_ult_send + +SYSCALL (send, 4) + ret diff --git a/sysdeps/unix/bsd/osf/alpha/sigblock.S b/sysdeps/unix/bsd/osf/alpha/sigblock.S new file mode 100644 index 0000000000..c3556a915f --- /dev/null +++ b/sysdeps/unix/bsd/osf/alpha/sigblock.S @@ -0,0 +1,27 @@ +/* Copyright (C) 1994, 1995 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#include +#define SYS_sigblock SYS_ult_sigblock + +SYSCALL__ (sigblock, 1) + ret + +weak_alias (__sigblock, sigblock) diff --git a/sysdeps/unix/bsd/osf/alpha/sigpause.S b/sysdeps/unix/bsd/osf/alpha/sigpause.S new file mode 100644 index 0000000000..04b6d45db7 --- /dev/null +++ b/sysdeps/unix/bsd/osf/alpha/sigpause.S @@ -0,0 +1,27 @@ +/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#include +#define SYS_sigpause SYS_ult_sigpause + +SYSCALL__ (sigpause, 1) + ret + +weak_alias (__sigpause, sigpause) diff --git a/sysdeps/unix/bsd/osf/alpha/sigsetmask.S b/sysdeps/unix/bsd/osf/alpha/sigsetmask.S new file mode 100644 index 0000000000..fb3a1d19f7 --- /dev/null +++ b/sysdeps/unix/bsd/osf/alpha/sigsetmask.S @@ -0,0 +1,27 @@ +/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#include +#define SYS_sigsetmask SYS_ult_sigsetmask + +SYSCALL__ (sigsetmask, 1) + ret + +weak_alias (__sigsetmask, sigsetmask) diff --git a/sysdeps/unix/bsd/osf/alpha/sigvec.S b/sysdeps/unix/bsd/osf/alpha/sigvec.S new file mode 100644 index 0000000000..b04ec6e12e --- /dev/null +++ b/sysdeps/unix/bsd/osf/alpha/sigvec.S @@ -0,0 +1,27 @@ +/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#include +#define SYS_sigvec SYS_ult_sigvec + +SYSCALL__ (sigvec, 3) + ret + +weak_alias (__sigvec, sigvec) diff --git a/sysdeps/unix/bsd/osf/alpha/start.S b/sysdeps/unix/bsd/osf/alpha/start.S new file mode 100644 index 0000000000..52eb03667f --- /dev/null +++ b/sysdeps/unix/bsd/osf/alpha/start.S @@ -0,0 +1,65 @@ +/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +.comm errno, 4 + +!.sdata +!.globl STARTFRM +!STARTFRM = 0 + +.text +ENTRY(__start) + lda sp, -16(sp) + stq zero, 8(sp) + + ! This branch puts the address of the current insn in t0. + br t0, 10f +10: + ! We set the GP register by using the address of the ldgp + ! (what we just put into t0). + ldgp gp, 0(t0) + + ! get argc + ldl a0, 16(sp) + + ! get argv + lda a1, 24(sp) + + ! move ahead to envp + s8addq a0, a1, a2 + addq a2, 0x8, a2 + + ! Store in environ. + stq a2, environ + + ! Clear out errno. +! ldgp gp, 0(t12) + stl zero, errno + + ! Call main. + jsr ra, main + ldgp gp, 0(ra) + + mov v0, a0 + + jsr ra, exit + ldgp gp, 0(ra) + + .end __start diff --git a/sysdeps/unix/bsd/osf/alpha/statbuf.h b/sysdeps/unix/bsd/osf/alpha/statbuf.h new file mode 100644 index 0000000000..9cadfaefd3 --- /dev/null +++ b/sysdeps/unix/bsd/osf/alpha/statbuf.h @@ -0,0 +1,75 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifndef _STATBUF_H +#define _STATBUF_H + +#include + +/* Structure describing file characteristics. */ +struct stat + { + int st_dev; /* Device. */ + unsigned int st_ino; /* File serial number. */ + unsigned int st_mode; /* File mode. */ + unsigned short st_nlink; /* Link count. */ + unsigned int st_uid; /* User ID of the file's owner. */ + unsigned int st_gid; /* Group ID of the file's group.*/ + int st_rdev; /* Device number, if device. */ + + long st_size; /* Size of file, in bytes. */ + + int st_atime; /* Time of last access. */ + int st_atime_usec; + int st_mtime; /* Time of last modification. */ + int st_mtime_usec; + int st_ctime; /* Time of last status change. */ + int st_ctime_usec; + + unsigned int st_blksize; /* Optimal block size for I/O. */ +#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ + + int st_blocks; /* Number of 512-byte blocks allocated. */ + unsigned int st_flags; + unsigned int st_gen; + }; + +/* Encoding of the file mode. */ + +#define __S_IFMT 0170000 /* These bits determine file type. */ + +/* File types. */ +#define __S_IFDIR 0040000 /* Directory. */ +#define __S_IFCHR 0020000 /* Character device. */ +#define __S_IFBLK 0060000 /* Block device. */ +#define __S_IFREG 0100000 /* Regular file. */ +#define __S_IFIFO 0010000 /* FIFO. */ + +#define __S_IFLNK 0120000 /* Symbolic link. */ +#define __S_IFSOCK 0140000 /* Socket. */ + +/* Protection bits. */ + +#define __S_ISUID 04000 /* Set user ID on execution. */ +#define __S_ISGID 02000 /* Set group ID on execution. */ +#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ +#define __S_IREAD 0400 /* Read by owner. */ +#define __S_IWRITE 0200 /* Write by owner. */ +#define __S_IEXEC 0100 /* Execute by owner. */ + +#endif /* statbuf.h */ diff --git a/sysdeps/unix/bsd/osf/alpha/sysdep.S b/sysdeps/unix/bsd/osf/alpha/sysdep.S new file mode 100644 index 0000000000..bc4865cef2 --- /dev/null +++ b/sysdeps/unix/bsd/osf/alpha/sysdep.S @@ -0,0 +1,40 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#define _ERRNO_H +#include + +ENTRY(syscall_error) +#ifdef EWOULDBLOCK_sys + /* We translate the system's EWOULDBLOCK error into EAGAIN. + The GNU C library always defines EWOULDBLOCK==EAGAIN. + EWOULDBLOCK_sys is the original number. */ + subq v0, EWOULDBLOCK_sys, t0 + cmoveq t0, EAGAIN, v0 +#endif + + /* Store it in errno... */ +! ldgp gp, 0(t12) + stl v0, errno + + /* And just kick back a -1. */ + ldil v0, -1 + ret + + .end syscall_error diff --git a/sysdeps/unix/bsd/osf/alpha/sysdep.h b/sysdeps/unix/bsd/osf/alpha/sysdep.h new file mode 100644 index 0000000000..3669a69b9b --- /dev/null +++ b/sysdeps/unix/bsd/osf/alpha/sysdep.h @@ -0,0 +1,73 @@ +/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#ifdef ASSEMBLER + +#include /* get PAL_callsys */ +#include + +#ifdef __STDC__ +#define ENTRY(name) \ + .globl name; \ + .ent name,0; \ + name##:; \ + .frame sp,0,ra +#else +#define ENTRY(name) \ + .globl name; \ + .ent name,0; \ + name/**/:; \ + .frame sp,0,ra +#endif + +#ifdef __STDC__ +#define PSEUDO(name, syscall_name, args) \ + ENTRY(name); \ + ldiq v0, SYS_##syscall_name; \ + .set noat; \ + call_pal PAL_callsys; \ + .set at; \ + beq a3, 10f; \ + br gp, 20f; \ +20:; \ + ldgp gp, 0(gp); \ + jmp zero, syscall_error; \ +10: +#else +#define PSEUDO(name, syscall_name, args) \ + ENTRY(name); \ + ldiq v0, SYS_/**/syscall_name; \ + .set noat; \ + call_pal PAL_callsys; \ + .set at; \ + beq a3, 10f; \ + br gp, 20f; \ +20:; \ + ldgp gp, 0(gp); \ + jmp zero, syscall_error; \ +10: +#endif + +#define ret ret zero,(ra),1 +#define r0 v0 +#define r1 a4 +#define MOVE(x,y) mov x, y + +#endif /* ASSEMBLER */ diff --git a/sysdeps/unix/bsd/osf/alpha/vhangup.S b/sysdeps/unix/bsd/osf/alpha/vhangup.S new file mode 100644 index 0000000000..d4d2b1c485 --- /dev/null +++ b/sysdeps/unix/bsd/osf/alpha/vhangup.S @@ -0,0 +1,25 @@ +/* Copyright (C) 1991, 1992 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#include +#define SYS_vhangup SYS_ult_vhangup + +SYSCALL (vhangup, 1) + ret diff --git a/sysdeps/unix/bsd/osf/alpha/wait4.S b/sysdeps/unix/bsd/osf/alpha/wait4.S new file mode 100644 index 0000000000..e4c322341d --- /dev/null +++ b/sysdeps/unix/bsd/osf/alpha/wait4.S @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/bsd/osf/alpha/waitpid.c b/sysdeps/unix/bsd/osf/alpha/waitpid.c new file mode 100644 index 0000000000..8378982ac7 --- /dev/null +++ b/sysdeps/unix/bsd/osf/alpha/waitpid.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/bsd/osf/msync.S b/sysdeps/unix/bsd/osf/msync.S new file mode 100644 index 0000000000..75b9f1531d --- /dev/null +++ b/sysdeps/unix/bsd/osf/msync.S @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/bsd/osf/sigaction.h b/sysdeps/unix/bsd/osf/sigaction.h new file mode 100644 index 0000000000..8a4e2c5b84 --- /dev/null +++ b/sysdeps/unix/bsd/osf/sigaction.h @@ -0,0 +1,45 @@ +/* Structure and constand definitions for sigaction et al. OSF/1 version. + Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Structure describing the action to be taken when a signal arrives. */ +struct sigaction + { + /* Signal handler. */ + __sighandler_t sa_handler; + + /* Additional set of signals to be blocked. */ + __sigset_t sa_mask; + + /* Special flags. */ + int sa_flags; + }; + +/* Bits in `sa_flags'. */ +#ifdef __USE_BSD +#define SA_ONSTACK 0x1 /* Take signal on signal stack. */ +#define SA_RESTART 0x2 /* Don't restart syscall on signal return. */ +#define SA_DISABLE 0x4 /* Disable alternate signal stack. */ +#endif +#define SA_NOCLDSTOP 0x4 /* Don't send SIGCHLD when children stop. */ + + +/* Values for the HOW argument to `sigprocmask'. */ +#define SIG_BLOCK 1 /* Block signals. */ +#define SIG_UNBLOCK 2 /* Unblock signals. */ +#define SIG_SETMASK 3 /* Set the set of blocked signals. */ diff --git a/sysdeps/unix/bsd/osf/system.c b/sysdeps/unix/bsd/osf/system.c new file mode 100644 index 0000000000..ef42ea2155 --- /dev/null +++ b/sysdeps/unix/bsd/osf/system.c @@ -0,0 +1,2 @@ +/* OSF/1 does have `waitpid'. Avoid unix/system.c, which says we don't. */ +#include From 9ef37b04541d809323a6c5b3298ed161d4063f23 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Fri, 10 Mar 1995 02:10:40 +0000 Subject: [PATCH 0541/4487] * sysdeps/alpha/__math.h (__copysign): Use attribute instead of old __CONSTVALUE by adding forward decl first with the const attribute. --- sysdeps/alpha/__math.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysdeps/alpha/__math.h b/sysdeps/alpha/__math.h index b06f716c50..06e43dbf04 100644 --- a/sysdeps/alpha/__math.h +++ b/sysdeps/alpha/__math.h @@ -18,7 +18,9 @@ Cambridge, MA 02139, USA. */ #if defined (__GNUC__) && !defined (__NO_MATH_INLINES) -extern __inline __CONSTVALUE double +extern __inline double __copysign (double __x, double __y) __attribute__ ((__const__)); + +extern __inline double __copysign (double __x, double __y) { __asm ("cpys %1, %2, %0" : "=f" (__x) : "f" (__y), "f" (__x)); From 9d7c89bc4be80983b395784bb49a4875edf890e3 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Fri, 10 Mar 1995 02:16:23 +0000 Subject: [PATCH 0542/4487] * sysdeps/alpha/__longjmp.c (__longjmp): Remove obsolete __NORETURN keyword. --- sysdeps/alpha/__longjmp.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sysdeps/alpha/__longjmp.c b/sysdeps/alpha/__longjmp.c index 19a2e26696..ad0489894d 100644 --- a/sysdeps/alpha/__longjmp.c +++ b/sysdeps/alpha/__longjmp.c @@ -35,7 +35,6 @@ register double /* Jump to the position specified by ENV, causing the setjmp call there to return VAL, or 1 if VAL is 0. */ -__NORETURN void __longjmp (const __jmp_buf env, int val) { From 8c632b258d8627d5c8f6899b6b3e49f4e5327882 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Fri, 10 Mar 1995 02:44:20 +0000 Subject: [PATCH 0543/4487] duh, don't need __attribute__ in the alpha header, it's in the toplevel one --- sysdeps/alpha/__math.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/sysdeps/alpha/__math.h b/sysdeps/alpha/__math.h index 06e43dbf04..5461fca2ac 100644 --- a/sysdeps/alpha/__math.h +++ b/sysdeps/alpha/__math.h @@ -18,8 +18,6 @@ Cambridge, MA 02139, USA. */ #if defined (__GNUC__) && !defined (__NO_MATH_INLINES) -extern __inline double __copysign (double __x, double __y) __attribute__ ((__const__)); - extern __inline double __copysign (double __x, double __y) { From 3b96aa40f8887fe6fb3158928db6ff658e2a06e9 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Fri, 10 Mar 1995 02:59:06 +0000 Subject: [PATCH 0544/4487] * sysdeps/alpha/divrem.m4: Undefine `ret' to avoid the definition that's used inside the alpha sysdep.h. --- sysdeps/alpha/divrem.m4 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysdeps/alpha/divrem.m4 b/sysdeps/alpha/divrem.m4 index 5942cf447f..d2f36383cb 100644 --- a/sysdeps/alpha/divrem.m4 +++ b/sysdeps/alpha/divrem.m4 @@ -14,6 +14,9 @@ #endif #include +/* Avoid the definition of ret that we set in the alpha sysdep.h. */ +#undef ret + define(path, `SYSDEP_DIR/macros.m4')dnl include(path) From fdf91378b95f9e49c2fb18f223decb9da6a045bc Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Fri, 10 Mar 1995 02:59:52 +0000 Subject: [PATCH 0545/4487] newly generated ones --- sysdeps/alpha/divl.S | 3 +++ sysdeps/alpha/divlu.S | 3 +++ sysdeps/alpha/divq.S | 3 +++ sysdeps/alpha/divqu.S | 3 +++ sysdeps/alpha/reml.S | 3 +++ sysdeps/alpha/remlu.S | 3 +++ sysdeps/alpha/remq.S | 3 +++ sysdeps/alpha/remqu.S | 3 +++ 8 files changed, 24 insertions(+) diff --git a/sysdeps/alpha/divl.S b/sysdeps/alpha/divl.S index 7ae3e0cc13..5c94362cf5 100644 --- a/sysdeps/alpha/divl.S +++ b/sysdeps/alpha/divl.S @@ -15,6 +15,9 @@ #endif #include +/* Avoid the definition of ret that we set in the alpha sysdep.h. */ +#undef ret + diff --git a/sysdeps/alpha/divlu.S b/sysdeps/alpha/divlu.S index 9ae5950c53..3a7589d355 100644 --- a/sysdeps/alpha/divlu.S +++ b/sysdeps/alpha/divlu.S @@ -15,6 +15,9 @@ #endif #include +/* Avoid the definition of ret that we set in the alpha sysdep.h. */ +#undef ret + diff --git a/sysdeps/alpha/divq.S b/sysdeps/alpha/divq.S index 79ff6ca7c5..730a338f63 100644 --- a/sysdeps/alpha/divq.S +++ b/sysdeps/alpha/divq.S @@ -15,6 +15,9 @@ #endif #include +/* Avoid the definition of ret that we set in the alpha sysdep.h. */ +#undef ret + diff --git a/sysdeps/alpha/divqu.S b/sysdeps/alpha/divqu.S index 7908b9f77d..7614742440 100644 --- a/sysdeps/alpha/divqu.S +++ b/sysdeps/alpha/divqu.S @@ -15,6 +15,9 @@ #endif #include +/* Avoid the definition of ret that we set in the alpha sysdep.h. */ +#undef ret + diff --git a/sysdeps/alpha/reml.S b/sysdeps/alpha/reml.S index 2ece297f09..95896fb831 100644 --- a/sysdeps/alpha/reml.S +++ b/sysdeps/alpha/reml.S @@ -15,6 +15,9 @@ #endif #include +/* Avoid the definition of ret that we set in the alpha sysdep.h. */ +#undef ret + diff --git a/sysdeps/alpha/remlu.S b/sysdeps/alpha/remlu.S index d7700e6595..24e07cf327 100644 --- a/sysdeps/alpha/remlu.S +++ b/sysdeps/alpha/remlu.S @@ -15,6 +15,9 @@ #endif #include +/* Avoid the definition of ret that we set in the alpha sysdep.h. */ +#undef ret + diff --git a/sysdeps/alpha/remq.S b/sysdeps/alpha/remq.S index 47510cbc8e..ce38c2460a 100644 --- a/sysdeps/alpha/remq.S +++ b/sysdeps/alpha/remq.S @@ -15,6 +15,9 @@ #endif #include +/* Avoid the definition of ret that we set in the alpha sysdep.h. */ +#undef ret + diff --git a/sysdeps/alpha/remqu.S b/sysdeps/alpha/remqu.S index ec9572dd62..26bdd3b037 100644 --- a/sysdeps/alpha/remqu.S +++ b/sysdeps/alpha/remqu.S @@ -15,6 +15,9 @@ #endif #include +/* Avoid the definition of ret that we set in the alpha sysdep.h. */ +#undef ret + From 2e444e579a4963e7212cd4fa04863640e2652039 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 27 Mar 1995 09:27:34 +0000 Subject: [PATCH 0546/4487] (_JMPBUF_UNWINDS): New macro. --- sysdeps/mips/jmp_buf.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sysdeps/mips/jmp_buf.h b/sysdeps/mips/jmp_buf.h index eed47dce7f..102a0193d8 100644 --- a/sysdeps/mips/jmp_buf.h +++ b/sysdeps/mips/jmp_buf.h @@ -1,5 +1,5 @@ -/* Define the machine-dependent type `jmp_buf'. Mips version. - Copyright (C) 1992, 1993 Free Software Foundation, Inc. +/* Define the machine-dependent type `jmp_buf'. MIPS version. + Copyright (C) 1992, 1993, 1995 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -45,3 +45,9 @@ typedef struct /* Offset to the program counter in `jmp_buf'. */ #define JB_PC 0 #endif + + +/* Test if longjmp to JMPBUF would unwind the frame + containing a local variable at ADDRESS. */ +#define _JMPBUF_UNWINDS(jmpbuf, address) \ + ((__ptr_t) (address) < (jmpbuf)[0].__sp) From 44b64eff597f1e1f86802b86860f20c214da41c2 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 29 Mar 1995 16:56:35 +0000 Subject: [PATCH 0547/4487] . --- bare/.cvsignore | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 bare/.cvsignore diff --git a/bare/.cvsignore b/bare/.cvsignore new file mode 100644 index 0000000000..c8367a7367 --- /dev/null +++ b/bare/.cvsignore @@ -0,0 +1,5 @@ +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo From e34abb0bcb812a971e73abeeb99e6a98d3664f77 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Fri, 31 Mar 1995 01:47:52 +0000 Subject: [PATCH 0548/4487] * sysdeps/mips/__longjmp.c (__longjmp): Take out CONST. --- sysdeps/mips/__longjmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/mips/__longjmp.c b/sysdeps/mips/__longjmp.c index 7ea3df2827..c54d8a9139 100644 --- a/sysdeps/mips/__longjmp.c +++ b/sysdeps/mips/__longjmp.c @@ -27,7 +27,7 @@ Cambridge, MA 02139, USA. */ #endif void -DEFUN(__longjmp, (env, val_arg), CONST __jmp_buf env AND int val_arg) +DEFUN(__longjmp, (env, val_arg), __jmp_buf env AND int val_arg) { /* gcc 1.39.19 miscompiled the longjmp routine (as it did setjmp before the hack around it); force it to use $a1 for the longjmp value. From 202cae361f3e9c14beadf88175866f3ac6c1194f Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Fri, 31 Mar 1995 03:52:13 +0000 Subject: [PATCH 0549/4487] * sysdeps/alpha/__longjmp.c (__longjmp): Take out const. --- sysdeps/alpha/__longjmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/alpha/__longjmp.c b/sysdeps/alpha/__longjmp.c index ad0489894d..f3f35eec9c 100644 --- a/sysdeps/alpha/__longjmp.c +++ b/sysdeps/alpha/__longjmp.c @@ -36,7 +36,7 @@ register double /* Jump to the position specified by ENV, causing the setjmp call there to return VAL, or 1 if VAL is 0. */ void -__longjmp (const __jmp_buf env, int val) +__longjmp (__jmp_buf env, int val) { /* Restore the integer registers. */ r9 = env[0].__9; From af4fa09130ed122f2dcb414f0ece8f3ed0b9822d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 5 Apr 1995 16:07:53 +0000 Subject: [PATCH 0550/4487] (__sigfillset): Use ~0L instead of -1 to avoid compiler warning. --- sysdeps/unix/sysv/sysv4/sigset.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/sysv4/sigset.h b/sysdeps/unix/sysv/sysv4/sigset.h index a007a43470..b21b519fc9 100644 --- a/sysdeps/unix/sysv/sysv4/sigset.h +++ b/sysdeps/unix/sysv/sysv4/sigset.h @@ -1,5 +1,5 @@ /* __sig_atomic_t, __sigset_t, and related definitions. SVR4 version. -Copyright (C) 1994 Free Software Foundation, Inc. +Copyright (C) 1994, 1995 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 @@ -67,7 +67,7 @@ __sigfillset (__sigset_t *__set) for signals [1,31]. Setting bits for unimplemented signals seems harmless (and we will find out if it really is). */ __set->__sigbits[0] = __set->__sigbits[1] = - __set->__sigbits[2] = __set->__sigbits[3] = -1; + __set->__sigbits[2] = __set->__sigbits[3] = ~0L; return 0; } From b2531dea3aa1021f9f4cefee3ba4a3b60307af26 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Sat, 15 Apr 1995 01:56:26 +0000 Subject: [PATCH 0551/4487] * sysdeps/unix/bsd/osf/alpha/sysdep.h (NO_UNDERSCORES): Define. --- sysdeps/unix/bsd/osf/alpha/sysdep.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysdeps/unix/bsd/osf/alpha/sysdep.h b/sysdeps/unix/bsd/osf/alpha/sysdep.h index 3669a69b9b..fc661a6b86 100644 --- a/sysdeps/unix/bsd/osf/alpha/sysdep.h +++ b/sysdeps/unix/bsd/osf/alpha/sysdep.h @@ -16,6 +16,9 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +/* OSF/1 does not precede the asm names of C symbols with a `_'. */ +#define NO_UNDERSCORES + #include #ifdef ASSEMBLER From 275f4b54f40aa637204a7ec3859c0a4b4be7cad6 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Sat, 15 Apr 1995 02:07:14 +0000 Subject: [PATCH 0552/4487] * sysdeps/unix/bsd/osf/alpha/start.S: Change comments to be preprocessor comments, not assembler comments. --- sysdeps/unix/bsd/osf/alpha/start.S | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/sysdeps/unix/bsd/osf/alpha/start.S b/sysdeps/unix/bsd/osf/alpha/start.S index 52eb03667f..f3995a2fd6 100644 --- a/sysdeps/unix/bsd/osf/alpha/start.S +++ b/sysdeps/unix/bsd/osf/alpha/start.S @@ -20,40 +20,42 @@ Cambridge, MA 02139, USA. */ .comm errno, 4 -!.sdata -!.globl STARTFRM -!STARTFRM = 0 +#if 0 +.sdata +.globl STARTFRM +STARTFRM = 0 +#endif .text ENTRY(__start) lda sp, -16(sp) stq zero, 8(sp) - ! This branch puts the address of the current insn in t0. + /* This branch puts the address of the current insn in t0. */ br t0, 10f 10: - ! We set the GP register by using the address of the ldgp - ! (what we just put into t0). + /* We set the GP register by using the address of the ldgp */ + /* (what we just put into t0). */ ldgp gp, 0(t0) - ! get argc + /* get argc */ ldl a0, 16(sp) - ! get argv + /* get argv */ lda a1, 24(sp) - ! move ahead to envp + /* move ahead to envp */ s8addq a0, a1, a2 addq a2, 0x8, a2 - ! Store in environ. + /* Store in environ. */ stq a2, environ - ! Clear out errno. -! ldgp gp, 0(t12) + /* Clear out errno. */ +/* ldgp gp, 0(t12) */ stl zero, errno - ! Call main. + /* Call main. */ jsr ra, main ldgp gp, 0(ra) From 487e658eebe1a69a45a6e74402ef299c704c8eb8 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Sat, 15 Apr 1995 02:30:20 +0000 Subject: [PATCH 0553/4487] * sysdeps/unix/mips/brk.S (__brk, __curbrk): Add .end. * sysdeps/unix/mips/fork.S (fork): Likewise. * sysdeps/unix/mips/pipe.S (fork): Likewise. * sysdeps/unix/mips/sigreturn.S (__sigreturn): Likewise. * sysdeps/unix/mips/sysdep.S (sysdep_error): Likewise. * sysdeps/unix/mips/wait.S (__handler): Likewise. * sysdeps/mips/setjmp.S (__sigsetjmp): Likewise. * sysdeps/mips/bsd-setjmp.S (setjmp): Likewise. * sysdeps/unix/bsd/ultrix4/getsysinfo.S (getsysinfo): Likewise. * sysdeps/unix/bsd/ultrix4/wait3.S (waitpid): Likewise. * sysdeps/unix/bsd/ultrix4/waitpid.S (waitpid): Likewise. * sysdeps/unix/bsd/ultrix4/mips/__handler.S (__handler): Likewise. * sysdeps/unix/bsd/ultrix4/mips/sigvec.S (__raw_sigvec): Likewise. * sysdeps/unix/bsd/ultrix4/mips/start.S (__start): Likewise. * sysdeps/unix/bsd/ultrix4/mips/vfork.S (vfork): Likewise. * sysdeps/mips/bsd-_setjmp.S (setjmp): Likewise. Use `$0' instead of `zero' for the li instruction. --- sysdeps/mips/bsd-_setjmp.S | 3 ++- sysdeps/mips/bsd-setjmp.S | 1 + sysdeps/mips/setjmp.S | 1 + sysdeps/unix/bsd/ultrix4/getsysinfo.S | 1 + sysdeps/unix/bsd/ultrix4/mips/__handler.S | 1 + sysdeps/unix/bsd/ultrix4/mips/sigvec.S | 1 + sysdeps/unix/bsd/ultrix4/mips/start.S | 1 + sysdeps/unix/bsd/ultrix4/mips/vfork.S | 1 + sysdeps/unix/bsd/ultrix4/wait3.S | 1 + sysdeps/unix/bsd/ultrix4/waitpid.S | 1 + sysdeps/unix/mips/brk.S | 3 ++- sysdeps/unix/mips/fork.S | 1 + sysdeps/unix/mips/pipe.S | 1 + sysdeps/unix/mips/sigreturn.S | 1 + sysdeps/unix/mips/sysdep.S | 1 + sysdeps/unix/mips/wait.S | 1 + 16 files changed, 18 insertions(+), 2 deletions(-) diff --git a/sysdeps/mips/bsd-_setjmp.S b/sysdeps/mips/bsd-_setjmp.S index 6e6844cc52..78776cd3e5 100644 --- a/sysdeps/mips/bsd-_setjmp.S +++ b/sysdeps/mips/bsd-_setjmp.S @@ -25,4 +25,5 @@ Cambridge, MA 02139, USA. */ ENTRY (setjmp) j C_SYMBOL_NAME (__sigsetjmp) - li a1, zero /* Pass a second argument of zero. */ + li a1, $0 /* Pass a second argument of zero. */ + .end setjmp diff --git a/sysdeps/mips/bsd-setjmp.S b/sysdeps/mips/bsd-setjmp.S index 5cd090a31c..4742462e88 100644 --- a/sysdeps/mips/bsd-setjmp.S +++ b/sysdeps/mips/bsd-setjmp.S @@ -26,3 +26,4 @@ Cambridge, MA 02139, USA. */ ENTRY (setjmp) j C_SYMBOL_NAME (__sigsetjmp) li a1, 1 /* Pass a second argument of one. */ + .end setjmp diff --git a/sysdeps/mips/setjmp.S b/sysdeps/mips/setjmp.S index b3c0247468..0f5dba3a60 100644 --- a/sysdeps/mips/setjmp.S +++ b/sysdeps/mips/setjmp.S @@ -29,3 +29,4 @@ ENTRY (__sigsetjmp) move a3, $fp #endif j __sigsetjmp_aux + .end __sigsetjmp diff --git a/sysdeps/unix/bsd/ultrix4/getsysinfo.S b/sysdeps/unix/bsd/ultrix4/getsysinfo.S index 1f5b2cf487..41718ba228 100644 --- a/sysdeps/unix/bsd/ultrix4/getsysinfo.S +++ b/sysdeps/unix/bsd/ultrix4/getsysinfo.S @@ -23,3 +23,4 @@ Cambridge, MA 02139, USA. */ SYSCALL__ (getsysinfo, 5) ret + .end __getsysinfo diff --git a/sysdeps/unix/bsd/ultrix4/mips/__handler.S b/sysdeps/unix/bsd/ultrix4/mips/__handler.S index 3ea697c5a0..ca9c3fe858 100644 --- a/sysdeps/unix/bsd/ultrix4/mips/__handler.S +++ b/sysdeps/unix/bsd/ultrix4/mips/__handler.S @@ -111,3 +111,4 @@ ENTRY (__handler) /* Do a sigreturn syscall; this doesn't return. */ la v0, __sigreturn jal ra, v0 + .end __handler diff --git a/sysdeps/unix/bsd/ultrix4/mips/sigvec.S b/sysdeps/unix/bsd/ultrix4/mips/sigvec.S index 20a5dd1c49..4d7aa4409c 100644 --- a/sysdeps/unix/bsd/ultrix4/mips/sigvec.S +++ b/sysdeps/unix/bsd/ultrix4/mips/sigvec.S @@ -22,3 +22,4 @@ Cambridge, MA 02139, USA. */ PSEUDO (__raw_sigvec, sigvec, 3) ret + .end __raw_sigvec diff --git a/sysdeps/unix/bsd/ultrix4/mips/start.S b/sysdeps/unix/bsd/ultrix4/mips/start.S index eec8ce08be..24bcbb4e00 100644 --- a/sysdeps/unix/bsd/ultrix4/mips/start.S +++ b/sysdeps/unix/bsd/ultrix4/mips/start.S @@ -68,3 +68,4 @@ ENTRY(__start) /* Make the value returned by main be the argument to exit. */ jal exit move a0, v0 + .end __start diff --git a/sysdeps/unix/bsd/ultrix4/mips/vfork.S b/sysdeps/unix/bsd/ultrix4/mips/vfork.S index 37f6d8016d..05e4b87f2e 100644 --- a/sysdeps/unix/bsd/ultrix4/mips/vfork.S +++ b/sysdeps/unix/bsd/ultrix4/mips/vfork.S @@ -29,5 +29,6 @@ SYSCALL__ (vfork, 0) parent: ret nop + .end __vfork weak_alias (__vfork, vfork) diff --git a/sysdeps/unix/bsd/ultrix4/wait3.S b/sysdeps/unix/bsd/ultrix4/wait3.S index 83910a5d7b..930c67e825 100644 --- a/sysdeps/unix/bsd/ultrix4/wait3.S +++ b/sysdeps/unix/bsd/ultrix4/wait3.S @@ -20,5 +20,6 @@ Cambridge, MA 02139, USA. */ SYSCALL__ (wait3, 3) ret + .end __wait3 weak_alias (__wait3, wait3) diff --git a/sysdeps/unix/bsd/ultrix4/waitpid.S b/sysdeps/unix/bsd/ultrix4/waitpid.S index b64e528b69..3470da783e 100644 --- a/sysdeps/unix/bsd/ultrix4/waitpid.S +++ b/sysdeps/unix/bsd/ultrix4/waitpid.S @@ -20,5 +20,6 @@ Cambridge, MA 02139, USA. */ SYSCALL__ (waitpid, 3) ret + .end __waitpid weak_alias (__waitpid, waitpid) diff --git a/sysdeps/unix/mips/brk.S b/sysdeps/unix/mips/brk.S index 1754c0c4de..9c4ee26edc 100644 --- a/sysdeps/unix/mips/brk.S +++ b/sysdeps/unix/mips/brk.S @@ -30,7 +30,7 @@ Cambridge, MA 02139, USA. */ .sdata ENTRY(__curbrk) .word __end - + .end __curbrk .text .set noreorder .set noat @@ -63,5 +63,6 @@ error: j syscall_error nop nop nop + .end __brk weak_alias (__brk, brk) diff --git a/sysdeps/unix/mips/fork.S b/sysdeps/unix/mips/fork.S index 2347bf4d50..17efcc92a8 100644 --- a/sysdeps/unix/mips/fork.S +++ b/sysdeps/unix/mips/fork.S @@ -25,5 +25,6 @@ SYSCALL__ (fork, 0) move v0, zero parent: ret + .end __fork weak_alias (__fork, fork) diff --git a/sysdeps/unix/mips/pipe.S b/sysdeps/unix/mips/pipe.S index f8ce56b118..b9f376d365 100644 --- a/sysdeps/unix/mips/pipe.S +++ b/sysdeps/unix/mips/pipe.S @@ -27,5 +27,6 @@ SYSCALL__ (pipe, 1) j ra move v0, zero nop + .end __pipe weak_alias (__pipe, pipe) diff --git a/sysdeps/unix/mips/sigreturn.S b/sysdeps/unix/mips/sigreturn.S index 1e76bf5f99..70ae0c2749 100644 --- a/sysdeps/unix/mips/sigreturn.S +++ b/sysdeps/unix/mips/sigreturn.S @@ -25,5 +25,6 @@ Cambridge, MA 02139, USA. */ ENTRY(__sigreturn) li v0, SYS_sigreturn syscall + .end __sigreturn weak_alias (__sigreturn, sigreturn) diff --git a/sysdeps/unix/mips/sysdep.S b/sysdeps/unix/mips/sysdep.S index 21bdf234f9..f17ba44341 100644 --- a/sysdeps/unix/mips/sysdep.S +++ b/sysdeps/unix/mips/sysdep.S @@ -39,3 +39,4 @@ skip: /* And just kick back a -1. */ j ra li v0, -1 + .end syscall_error diff --git a/sysdeps/unix/mips/wait.S b/sysdeps/unix/mips/wait.S index 63bce849d4..f1f4f9b42c 100644 --- a/sysdeps/unix/mips/wait.S +++ b/sysdeps/unix/mips/wait.S @@ -40,5 +40,6 @@ noerror: nop noarg: ret + .end __wait weak_alias (__wait, wait) From 7c2ec3d419b0f6e87db3c059220f5b3cf2e9a5b9 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Sat, 15 Apr 1995 02:38:17 +0000 Subject: [PATCH 0554/4487] ... changing to use /**/ instead of ! as comments * sysdeps/unix/bsd/osf/alpha/brk.S: Likewise. --- sysdeps/unix/bsd/osf/alpha/brk.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/bsd/osf/alpha/brk.S b/sysdeps/unix/bsd/osf/alpha/brk.S index 111f3397af..6e4bd2cc71 100644 --- a/sysdeps/unix/bsd/osf/alpha/brk.S +++ b/sysdeps/unix/bsd/osf/alpha/brk.S @@ -34,13 +34,13 @@ __curbrk: .text ENTRY(__brk) - ! FIXME We do not check for asking for less than a page yet. + /* FIXME We do not check for asking for less than a page yet. */ ldiq v0, SYS_brk call_pal PAL_callsys bne a3, error /* Update __curbrk and exit cleanly. */ -! ldgp gp, 0(t12) +/* ldgp gp, 0(t12) */ stl a0, __curbrk mov zero, v0 From be61b0710e3f278188de5d836b357d061bc3b2cc Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Sat, 15 Apr 1995 04:07:56 +0000 Subject: [PATCH 0555/4487] * sysdeps/unix/bsd/osf/alpha/killpg.S (killpg): Add .end directive. * sysdeps/unix/bsd/osf/alpha/sigblock.S (__sigblock): Likewise. * sysdeps/unix/bsd/osf/alpha/sigsetmask.S (__sigsetmask): Likewise. * sysdeps/unix/bsd/osf/alpha/sigpause.S (__sigpause): Likewise. * sysdeps/unix/bsd/osf/alpha/sigvec.S (__sigvec): Likewise. * sysdeps/unix/bsd/osf/alpha/getdents.S (__getdirentries): Likewise. * sysdeps/unix/bsd/osf/alpha/fork.S (__fork): Likewise. * sysdeps/unix/bsd/osf/alpha/pipe.S (__pipe): Likewise. * sysdeps/unix/bsd/osf/alpha/recv.S (recv): Likewise. * sysdeps/unix/bsd/osf/alpha/send.S (send): Likewise. * sysdeps/unix/bsd/osf/alpha/vhangup.S (vhangup): Likewise. --- sysdeps/unix/bsd/osf/alpha/fork.S | 1 + sysdeps/unix/bsd/osf/alpha/getdents.S | 1 + sysdeps/unix/bsd/osf/alpha/killpg.S | 1 + sysdeps/unix/bsd/osf/alpha/pipe.S | 1 + sysdeps/unix/bsd/osf/alpha/recv.S | 1 + sysdeps/unix/bsd/osf/alpha/send.S | 1 + sysdeps/unix/bsd/osf/alpha/sigblock.S | 1 + sysdeps/unix/bsd/osf/alpha/sigpause.S | 1 + sysdeps/unix/bsd/osf/alpha/sigsetmask.S | 1 + sysdeps/unix/bsd/osf/alpha/sigvec.S | 1 + sysdeps/unix/bsd/osf/alpha/vhangup.S | 1 + 11 files changed, 11 insertions(+) diff --git a/sysdeps/unix/bsd/osf/alpha/fork.S b/sysdeps/unix/bsd/osf/alpha/fork.S index 7c8d671893..be6f015e52 100644 --- a/sysdeps/unix/bsd/osf/alpha/fork.S +++ b/sysdeps/unix/bsd/osf/alpha/fork.S @@ -21,5 +21,6 @@ Cambridge, MA 02139, USA. */ SYSCALL__ (fork, 0) cmovne a4, 0, v0 ret + .end __fork weak_alias (__fork, fork) diff --git a/sysdeps/unix/bsd/osf/alpha/getdents.S b/sysdeps/unix/bsd/osf/alpha/getdents.S index 16ccbc2ce2..df2c26db85 100644 --- a/sysdeps/unix/bsd/osf/alpha/getdents.S +++ b/sysdeps/unix/bsd/osf/alpha/getdents.S @@ -20,6 +20,7 @@ Cambridge, MA 02139, USA. */ SYSCALL__ (getdirentries, 4) ret + .end __getdirentries weak_alias (__getdirentries, getdirentries) diff --git a/sysdeps/unix/bsd/osf/alpha/killpg.S b/sysdeps/unix/bsd/osf/alpha/killpg.S index f0b82b3d1a..831c3fda4b 100644 --- a/sysdeps/unix/bsd/osf/alpha/killpg.S +++ b/sysdeps/unix/bsd/osf/alpha/killpg.S @@ -23,3 +23,4 @@ Cambridge, MA 02139, USA. */ SYSCALL (killpg, 2) ret + .end killpg diff --git a/sysdeps/unix/bsd/osf/alpha/pipe.S b/sysdeps/unix/bsd/osf/alpha/pipe.S index 6b074eda1a..eada33b226 100644 --- a/sysdeps/unix/bsd/osf/alpha/pipe.S +++ b/sysdeps/unix/bsd/osf/alpha/pipe.S @@ -26,5 +26,6 @@ SYSCALL__ (pipe, 1) /* Go out with a clean status. */ mov zero, r0 ret + .end __pipe weak_alias (__pipe, pipe) diff --git a/sysdeps/unix/bsd/osf/alpha/recv.S b/sysdeps/unix/bsd/osf/alpha/recv.S index 4ac00eb44e..a68bfe8fba 100644 --- a/sysdeps/unix/bsd/osf/alpha/recv.S +++ b/sysdeps/unix/bsd/osf/alpha/recv.S @@ -23,3 +23,4 @@ Cambridge, MA 02139, USA. */ SYSCALL (recv, 4) ret + .end recv diff --git a/sysdeps/unix/bsd/osf/alpha/send.S b/sysdeps/unix/bsd/osf/alpha/send.S index ca46894a25..526f4c8a01 100644 --- a/sysdeps/unix/bsd/osf/alpha/send.S +++ b/sysdeps/unix/bsd/osf/alpha/send.S @@ -23,3 +23,4 @@ Cambridge, MA 02139, USA. */ SYSCALL (send, 4) ret + .end send diff --git a/sysdeps/unix/bsd/osf/alpha/sigblock.S b/sysdeps/unix/bsd/osf/alpha/sigblock.S index c3556a915f..402ed8d1e0 100644 --- a/sysdeps/unix/bsd/osf/alpha/sigblock.S +++ b/sysdeps/unix/bsd/osf/alpha/sigblock.S @@ -23,5 +23,6 @@ Cambridge, MA 02139, USA. */ SYSCALL__ (sigblock, 1) ret + .end __sigblock weak_alias (__sigblock, sigblock) diff --git a/sysdeps/unix/bsd/osf/alpha/sigpause.S b/sysdeps/unix/bsd/osf/alpha/sigpause.S index 04b6d45db7..6136cfcab6 100644 --- a/sysdeps/unix/bsd/osf/alpha/sigpause.S +++ b/sysdeps/unix/bsd/osf/alpha/sigpause.S @@ -23,5 +23,6 @@ Cambridge, MA 02139, USA. */ SYSCALL__ (sigpause, 1) ret + .end __sigpause weak_alias (__sigpause, sigpause) diff --git a/sysdeps/unix/bsd/osf/alpha/sigsetmask.S b/sysdeps/unix/bsd/osf/alpha/sigsetmask.S index fb3a1d19f7..71aea92e1f 100644 --- a/sysdeps/unix/bsd/osf/alpha/sigsetmask.S +++ b/sysdeps/unix/bsd/osf/alpha/sigsetmask.S @@ -23,5 +23,6 @@ Cambridge, MA 02139, USA. */ SYSCALL__ (sigsetmask, 1) ret + .end __sigsetmask weak_alias (__sigsetmask, sigsetmask) diff --git a/sysdeps/unix/bsd/osf/alpha/sigvec.S b/sysdeps/unix/bsd/osf/alpha/sigvec.S index b04ec6e12e..f199f35334 100644 --- a/sysdeps/unix/bsd/osf/alpha/sigvec.S +++ b/sysdeps/unix/bsd/osf/alpha/sigvec.S @@ -23,5 +23,6 @@ Cambridge, MA 02139, USA. */ SYSCALL__ (sigvec, 3) ret + .end __sigvec weak_alias (__sigvec, sigvec) diff --git a/sysdeps/unix/bsd/osf/alpha/vhangup.S b/sysdeps/unix/bsd/osf/alpha/vhangup.S index d4d2b1c485..8759f023b3 100644 --- a/sysdeps/unix/bsd/osf/alpha/vhangup.S +++ b/sysdeps/unix/bsd/osf/alpha/vhangup.S @@ -23,3 +23,4 @@ Cambridge, MA 02139, USA. */ SYSCALL (vhangup, 1) ret + .end vhangup From 9e1fadd6c682a63e9b58b18a8b395b196f8b521e Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Sun, 16 Apr 1995 08:24:34 +0000 Subject: [PATCH 0556/4487] * /sysdeps/unix/bsd/ultrix4/mips/sysdep.h: New file defining NO_UNDERSCORES then using sysdeps/unix/mips/sysdep.h. --- sysdeps/unix/bsd/ultrix4/mips/sysdep.h | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sysdeps/unix/bsd/ultrix4/mips/sysdep.h diff --git a/sysdeps/unix/bsd/ultrix4/mips/sysdep.h b/sysdeps/unix/bsd/ultrix4/mips/sysdep.h new file mode 100644 index 0000000000..09b69ff854 --- /dev/null +++ b/sysdeps/unix/bsd/ultrix4/mips/sysdep.h @@ -0,0 +1,3 @@ +#define NO_UNDERSCORES + +#include From fd1e71567ef998ce868f81eba43cfa9d22f79373 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Mon, 17 Apr 1995 22:02:01 +0000 Subject: [PATCH 0557/4487] * sysdeps/alpha/strlen.c (strlen): Fix cmpbge insn, and returning of the byte that was zero, so we return a valid number. --- sysdeps/alpha/strlen.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sysdeps/alpha/strlen.c b/sysdeps/alpha/strlen.c index d7744476ad..36f106c9c3 100644 --- a/sysdeps/alpha/strlen.c +++ b/sysdeps/alpha/strlen.c @@ -36,19 +36,20 @@ strlen (const char *str) for (;;) { + const unsigned long int longword = *longword_ptr++; int mask; - asm ("cmpbge %1, %2, %0" : "=r" (mask) : "r" (0), "r" (*longword_ptr++)); + + /* Set bits in MASK if bytes in LONGWORD are zero. */ + asm ("cmpbge $31, %1, %0" : "=r" (mask) : "r" (longword)); if (mask) { /* Which of the bytes was the zero? */ - const char *cp = (const char *) (longword_ptr - 1); int i; - for (i = 0; i < 6; i++) + for (i = 0; i < 8; i++) if (cp[i] == 0) return cp - str + i; - return cp - str + 7; } } } From 87258b84a3b76a23af2befa5cab091e6f3cab612 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 19 May 1995 21:51:40 +0000 Subject: [PATCH 0558/4487] Fix "cvs commit" cmds in rules to not fail in the absence of CVS dirs. --- sysdeps/alpha/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile index 06621b824d..8573ca811c 100644 --- a/sysdeps/alpha/Makefile +++ b/sysdeps/alpha/Makefile @@ -91,4 +91,4 @@ $(divrem:%=$(sysdep_dir)/alpha/%.S): $(sysdep_dir)/alpha/divrem.m4 $(sysdep_dir) # Make it unwritable so noone will edit it by mistake. -chmod a-w $@-tmp mv -f $@-tmp $@ - test -d CVS && cvs commit -m'Regenerated from $<' $@ + test ! -d CVS || cvs commit -m'Regenerated from $<' $@ From 39bd749af3749113d7a84c54018058e0051d5812 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Tue, 13 Jun 1995 19:35:18 +0000 Subject: [PATCH 0559/4487] * sysdeps/unix/bsd/osf/alpha/sysdep.h (HAVE_ASM_SET_DIRECTIVE): Put in #undef. --- sysdeps/unix/bsd/osf/alpha/sysdep.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysdeps/unix/bsd/osf/alpha/sysdep.h b/sysdeps/unix/bsd/osf/alpha/sysdep.h index fc661a6b86..c302204b2b 100644 --- a/sysdeps/unix/bsd/osf/alpha/sysdep.h +++ b/sysdeps/unix/bsd/osf/alpha/sysdep.h @@ -19,6 +19,9 @@ Cambridge, MA 02139, USA. */ /* OSF/1 does not precede the asm names of C symbols with a `_'. */ #define NO_UNDERSCORES +/* We really can't handle the .set directive for weak aliases. */ +#undef HAVE_ASM_SET_DIRECTIVE + #include #ifdef ASSEMBLER From 5b45242d5ce25a327139055ff47be5c44956292f Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Wed, 14 Jun 1995 00:15:10 +0000 Subject: [PATCH 0560/4487] undo previous change, not needed w/ configure fix --- sysdeps/unix/bsd/osf/alpha/sysdep.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/sysdeps/unix/bsd/osf/alpha/sysdep.h b/sysdeps/unix/bsd/osf/alpha/sysdep.h index c302204b2b..fc661a6b86 100644 --- a/sysdeps/unix/bsd/osf/alpha/sysdep.h +++ b/sysdeps/unix/bsd/osf/alpha/sysdep.h @@ -19,9 +19,6 @@ Cambridge, MA 02139, USA. */ /* OSF/1 does not precede the asm names of C symbols with a `_'. */ #define NO_UNDERSCORES -/* We really can't handle the .set directive for weak aliases. */ -#undef HAVE_ASM_SET_DIRECTIVE - #include #ifdef ASSEMBLER From e56c8d6e9fecc6b96c26aa83317fda3fb916d8c0 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 22 Jul 1995 07:43:56 +0000 Subject: [PATCH 0561/4487] Files moved from defunct sysdeps/unix/sysv/linux directory. --- sysdeps/unix/sysv/sysv4/linux/accept.S | 2 ++ sysdeps/unix/sysv/sysv4/linux/bind.S | 2 ++ sysdeps/unix/sysv/sysv4/linux/connect.S | 2 ++ sysdeps/unix/sysv/sysv4/linux/getpeername.S | 2 ++ sysdeps/unix/sysv/sysv4/linux/getsockname.S | 2 ++ sysdeps/unix/sysv/sysv4/linux/listen.S | 2 ++ sysdeps/unix/sysv/sysv4/linux/rename.S | 1 + sysdeps/unix/sysv/sysv4/linux/setsid.S | 1 + sysdeps/unix/sysv/sysv4/linux/socketpair.S | 2 ++ sysdeps/unix/sysv/sysv4/linux/wait4.S | 1 + sysdeps/unix/sysv/sysv4/linux/waitpid.S | 24 +++++++++++++++++++++ 11 files changed, 41 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/linux/accept.S create mode 100644 sysdeps/unix/sysv/sysv4/linux/bind.S create mode 100644 sysdeps/unix/sysv/sysv4/linux/connect.S create mode 100644 sysdeps/unix/sysv/sysv4/linux/getpeername.S create mode 100644 sysdeps/unix/sysv/sysv4/linux/getsockname.S create mode 100644 sysdeps/unix/sysv/sysv4/linux/listen.S create mode 100644 sysdeps/unix/sysv/sysv4/linux/rename.S create mode 100644 sysdeps/unix/sysv/sysv4/linux/setsid.S create mode 100644 sysdeps/unix/sysv/sysv4/linux/socketpair.S create mode 100644 sysdeps/unix/sysv/sysv4/linux/wait4.S create mode 100644 sysdeps/unix/sysv/sysv4/linux/waitpid.S diff --git a/sysdeps/unix/sysv/sysv4/linux/accept.S b/sysdeps/unix/sysv/sysv4/linux/accept.S new file mode 100644 index 0000000000..5936a0185b --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/linux/accept.S @@ -0,0 +1,2 @@ +#define socket accept +#include diff --git a/sysdeps/unix/sysv/sysv4/linux/bind.S b/sysdeps/unix/sysv/sysv4/linux/bind.S new file mode 100644 index 0000000000..fc82b65a2f --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/linux/bind.S @@ -0,0 +1,2 @@ +#define socket bind +#include diff --git a/sysdeps/unix/sysv/sysv4/linux/connect.S b/sysdeps/unix/sysv/sysv4/linux/connect.S new file mode 100644 index 0000000000..3433043d8c --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/linux/connect.S @@ -0,0 +1,2 @@ +#define socket connect +#include diff --git a/sysdeps/unix/sysv/sysv4/linux/getpeername.S b/sysdeps/unix/sysv/sysv4/linux/getpeername.S new file mode 100644 index 0000000000..8429fcdf76 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/linux/getpeername.S @@ -0,0 +1,2 @@ +#define socket getpeername +#include diff --git a/sysdeps/unix/sysv/sysv4/linux/getsockname.S b/sysdeps/unix/sysv/sysv4/linux/getsockname.S new file mode 100644 index 0000000000..6782707f88 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/linux/getsockname.S @@ -0,0 +1,2 @@ +#define socket getsockname +#include diff --git a/sysdeps/unix/sysv/sysv4/linux/listen.S b/sysdeps/unix/sysv/sysv4/linux/listen.S new file mode 100644 index 0000000000..d2cbec60a0 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/linux/listen.S @@ -0,0 +1,2 @@ +#define socket listen +#include diff --git a/sysdeps/unix/sysv/sysv4/linux/rename.S b/sysdeps/unix/sysv/sysv4/linux/rename.S new file mode 100644 index 0000000000..a5a8dfeeef --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/linux/rename.S @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/sysv4/linux/setsid.S b/sysdeps/unix/sysv/sysv4/linux/setsid.S new file mode 100644 index 0000000000..4930c56dcf --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/linux/setsid.S @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/sysv4/linux/socketpair.S b/sysdeps/unix/sysv/sysv4/linux/socketpair.S new file mode 100644 index 0000000000..da71c57dea --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/linux/socketpair.S @@ -0,0 +1,2 @@ +#define socket socketpair +#include diff --git a/sysdeps/unix/sysv/sysv4/linux/wait4.S b/sysdeps/unix/sysv/sysv4/linux/wait4.S new file mode 100644 index 0000000000..e4c322341d --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/linux/wait4.S @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/sysv4/linux/waitpid.S b/sysdeps/unix/sysv/sysv4/linux/waitpid.S new file mode 100644 index 0000000000..20d9d669bb --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/linux/waitpid.S @@ -0,0 +1,24 @@ +/* Copyright (C) 1991, 1992, 1995 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +SYSCALL__ (waitpid, 3) + ret + +weak_alias (__waitpid, waitpid) From 6784c7e3685c03d0525c2c8ae05ee91347186a8f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 22 Jul 1995 08:42:28 +0000 Subject: [PATCH 0562/4487] Rewritten, #include'ing unix/i386/sysdep.S for most of the code. --- sysdeps/unix/sysv/sysv4/linux/i386/sysdep.S | 27 +++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/linux/i386/sysdep.S diff --git a/sysdeps/unix/sysv/sysv4/linux/i386/sysdep.S b/sysdeps/unix/sysv/sysv4/linux/i386/sysdep.S new file mode 100644 index 0000000000..5cf29ec0cf --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/linux/i386/sysdep.S @@ -0,0 +1,27 @@ +/* Copyright (C) 1995 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* The syscall stubs jump here when they detect an error. + The code for Linux is almost identical to the canonical Unix/i386 + code, except that the error number in %eax is negated. */ + +__syscall_error: + negl %eax + +#define __syscall_error __syscall_error_1 +#include From 48daea4ca6d8c84e3f18f36308e9e6a0ccfd6967 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 22 Jul 1995 10:16:46 +0000 Subject: [PATCH 0563/4487] New file. --- sysdeps/unix/sysv/sysv4/linux/i386/syscall.S | 29 ++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/linux/i386/syscall.S diff --git a/sysdeps/unix/sysv/sysv4/linux/i386/syscall.S b/sysdeps/unix/sysv/sysv4/linux/i386/syscall.S new file mode 100644 index 0000000000..74e1047592 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/linux/i386/syscall.S @@ -0,0 +1,29 @@ +/* Copyright (C) 1995 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +ASM_GLOBAL_DIRECTIVE syscall_error +ENTRY (syscall) + popl %ecx /* Pop return address into %ecx. */ + popl %eax /* Pop syscall number into %eax. */ + pushl %ecx /* Push back return address. */ + DO_CALL (5) /* Frob the args and do the system call. */ + testl %eax, %eax /* Check %eax for error. */ + jl syscall_error /* Jump to error handler if negative. */ + ret /* Return to caller. */ From 80e6394278eed0a5f46e118142ba2546301ac962 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 22 Jul 1995 10:29:55 +0000 Subject: [PATCH 0564/4487] Use JUMPTARGET(syscall_error) in jump insn. --- sysdeps/unix/sysv/sysv4/linux/i386/syscall.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/sysv4/linux/i386/syscall.S b/sysdeps/unix/sysv/sysv4/linux/i386/syscall.S index 74e1047592..efe6d36086 100644 --- a/sysdeps/unix/sysv/sysv4/linux/i386/syscall.S +++ b/sysdeps/unix/sysv/sysv4/linux/i386/syscall.S @@ -25,5 +25,5 @@ ENTRY (syscall) pushl %ecx /* Push back return address. */ DO_CALL (5) /* Frob the args and do the system call. */ testl %eax, %eax /* Check %eax for error. */ - jl syscall_error /* Jump to error handler if negative. */ + jl JUMPTARGET(syscall_error) /* Jump to error handler if negative. */ ret /* Return to caller. */ From f7bee9b870b6dcd92170ac85962761a80dcc3359 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 22 Jul 1995 10:34:43 +0000 Subject: [PATCH 0565/4487] Rewritten. --- sysdeps/unix/sysv/sysv4/linux/i386/sysdep.h | 86 +++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/linux/i386/sysdep.h diff --git a/sysdeps/unix/sysv/sysv4/linux/i386/sysdep.h b/sysdeps/unix/sysv/sysv4/linux/i386/sysdep.h new file mode 100644 index 0000000000..d0c1c10dba --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/linux/i386/sysdep.h @@ -0,0 +1,86 @@ +/* Copyright (C) 1992, 1993, 1995 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* In the Linux/ELF world, C symbols are asm symbols. */ +#define NO_UNDERSCORES + +/* There is some commonality. */ +#include + +#ifdef ASSEMBLER + +/* Linux uses a negative return value to indicate syscall errors, unlike + most Unices, which use the condition codes' carry flag. */ +#undef PSEUDO +#define PSEUDO(name, syscall_name, args) \ + .text; \ + .globl __syscall_error; \ + ENTRY (name) \ + movl $SYS_##syscall_name, %eax; \ + DO_CALL (args) \ + testl %eax, %eax; \ + jl JUMPTARGET(__syscall_error) + + +/* Linux takes system call arguments in registers: + + syscall number %eax call-clobbered + arg 1 %ebx call-saved + arg 2 %ecx call-clobbered + arg 3 %edx call-clobbered + arg 4 %esi call-saved + arg 5 %edi call-saved + + The stack layout upon entering the function is: + + 24(%esp) Arg# 5 + 20(%esp) Arg# 4 + 16(%esp) Arg# 3 + 12(%esp) Arg# 2 + 8(%esp) Arg# 1 + 4(%esp) Return address + (%esp) + + (Of course a function with e.g. 3 argumentS does not have entries for + arguments 4 and 5.) + + We put the arguments into registers from the stack, and save the + call-saved registers, by using the 386 `xchg' instruction to swap the + values in both directions. */ + +#undef DO_CALL +#define DO_CALL(args) \ + DOARGS_##args \ + int $0x80; \ + UNDOARGS_##args \ + +#define DOARGS_0 /* No arguments to frob. */ +#define UNDOARGS_0 /* No arguments to unfrob. */ +#define DOARGS_1 xchg 8(%esp), %ebx; DOARGS_0 /* Save %ebx on stack. */ +#define UNDOARGS_1 xchg 8(%esp), %ebx; UNDOARGS_0 /* Restore %ebx */ +#define DOARGS_2 movel 12(%esp), %ecx; DOARGS_1 +#define UNDOARGS_2 UNDOARGS_1 /* %ecx is clobbered. */ +#define DOARGS_3 movel 16(%esp), %edx; DOARGS_2 +#define UNDOARGS_3 UNDOARGS_2 /* %edx is clobbered. */ +#define DOARGS_4 xchg 20(%esp), %esi; DOARGS_3 /* Save %esi on stack. */ +#define UNDOARGS_4 xchg 20(%esp), %esi; UNDOARGS_3 /* Restore %esi. */ +#define DOARGS_5 xchg 24(%esp), %edi; DOARGS_3 /* Save %edi on stack. */ +#define UNDOARGS_5 xchg 24(%esp), %edi; UNDOARGS_3 /* Restore %edi. */ + + +#endif /* ASSEMBLER */ From 06bcdbfcc0962c0312cb4bfa4ec6447254a511c4 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 22 Jul 1995 10:47:25 +0000 Subject: [PATCH 0566/4487] Include . Save %ebx in call-clobbered %edx instead of stack. Use JUMPTARGET(syscall_error) in jump insn. --- sysdeps/unix/sysv/sysv4/linux/i386/socket.S | 54 +++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/linux/i386/socket.S diff --git a/sysdeps/unix/sysv/sysv4/linux/i386/socket.S b/sysdeps/unix/sysv/sysv4/linux/i386/socket.S new file mode 100644 index 0000000000..7b8dd75ed8 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/linux/i386/socket.S @@ -0,0 +1,54 @@ +/* Copyright (C) 1995 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include + +.globl syscall_error + +/* The socket-oriented system calls are handled unusally in Linux. + They are all gated through the single `socketcall' system call number. + `socketcall' takes two arguments: the first is the subcode, specifying + which socket function is being called; and the second is a pointer to + the arguments to the specific function. + + The .S files for the other calls just #define socket and #include this. */ + +ENTRY (socket) + + /* Save registers. */ + movl %ebx, %edx + + movl $SYS_socketcall, %eax /* System call number in %eax. */ + + /* Use ## so `socket' is a separate token that might be #define'd. */ + movl $SYS_##socket, %ebx /* Subcode is first arg to syscall. */ + lea 8(%esp), %ecx /* Address of args is 2nd arg. */ + + /* Do the system call trap. */ + int $0x80 + + /* Restore registers. */ + movl %edx, %ebx + + /* %eax is < 0 if there was an error. */ + testl %eax, %eax + jl JUMPTARGET(syscall_error) + + /* Successful; return the syscall's value. */ + ret From 0bbcc469009b915e2a3edc577511e9f3e75b332a Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 26 Jul 1995 15:38:25 +0000 Subject: [PATCH 0567/4487] [$(subdir)=csu] (start-installed-rule, start-installed-name-rule): New variables; specify crt1.o, created by our own rule. ($(objpfx)crt1.o): New rule. --- sysdeps/unix/sysv/sco3.2.4/Makefile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sysdeps/unix/sysv/sco3.2.4/Makefile b/sysdeps/unix/sysv/sco3.2.4/Makefile index 23525e527d..a199ba9003 100644 --- a/sysdeps/unix/sysv/sco3.2.4/Makefile +++ b/sysdeps/unix/sysv/sco3.2.4/Makefile @@ -1,3 +1,17 @@ ifeq (posix,$(subdir)) sysdep_routines := $(sysdep_routines) pgrpsys sco_getgrp endif + +ifeq (csu,$(subdir)) + +# SCO uses crt1.o, and expects that single initializer file to also start +# the .init and .fini sections as crti.o normally does. +start-installed-name = crt1.o +start-installed-name-rule = yes + +# Link together start.o and crti.o into the expected crt1.o. +# Now crt1.o as initializer and crtn.o as finalizer will work. +$(objpfx)crt1.o: $(objpfx)start.o $(objpfx)crti.o + $(CC) -nostdlib -nostartfiles -Wl,-r -o $@ $^ + +endif From bdaaafad70486baef0305b849e32041a31e6707a Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 14 Aug 1995 22:12:34 +0000 Subject: [PATCH 0568/4487] (_hurdsig_rcv_interrupted_p): Function removed. --- sysdeps/mach/hurd/mips/trampoline.c | 31 ----------------------------- 1 file changed, 31 deletions(-) diff --git a/sysdeps/mach/hurd/mips/trampoline.c b/sysdeps/mach/hurd/mips/trampoline.c index f03ad5852f..ba3450e1fb 100644 --- a/sysdeps/mach/hurd/mips/trampoline.c +++ b/sysdeps/mach/hurd/mips/trampoline.c @@ -227,34 +227,3 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, return NULL; } - -/* STATE describes a thread that had intr_port set (meaning it was inside - HURD_EINTR_RPC), after it has been thread_abort'd. It it looks to have - just completed a mach_msg_trap system call that returned - MACH_RCV_INTERRUPTED, return nonzero and set *PORT to the receive right - being waited on. */ -int -_hurdsig_rcv_interrupted_p (struct machine_thread_all_state *state, - mach_port_t *port) -{ - const unsigned int *const pc = (void *) state->basic.pc; - - if (_hurdsig_catch_fault (SIGSEGV)) - assert (_hurdsig_fault_sigcode == (long int) pc); - else - { - if (state->basic.r2 == MACH_RCV_INTERRUPTED && - pc[-1] == 0xc) /* syscall */ - { - /* We did just return from a mach_msg_trap system call - doing a message receive that was interrupted. - Examine the parameters to find the receive right. */ - struct mach_msg_trap_args *args = (void *) &state->basic.r4; - - *port = args->rcv_name; - return 1; - } - } - - return 0; -} From 4003d88d7ba2eb3adefbbc6e87bafe2a647e49b2 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 14 Aug 1995 22:17:20 +0000 Subject: [PATCH 0569/4487] (_hurd_setup_sighandler): In rpc_wait case, frob mach_msg args to set timeout on receive. --- sysdeps/mach/hurd/mips/trampoline.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sysdeps/mach/hurd/mips/trampoline.c b/sysdeps/mach/hurd/mips/trampoline.c index ba3450e1fb..03e3d1da6f 100644 --- a/sysdeps/mach/hurd/mips/trampoline.c +++ b/sysdeps/mach/hurd/mips/trampoline.c @@ -150,6 +150,12 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, calls we retry need only wait to receive the reply message. */ args->option &= ~MACH_SEND_MSG; + /* Limit the time to receive the reply message, in case the server + claimed that `interrupt_operation' succeeded but in fact the RPC + is hung. */ + args->option |= MACH_RCV_TIMEOUT; + args->timeout = _hurd_interrupted_rpc_timeout; + state->basic.pc = (int) &&rpc_wait_trampoline; state->basic.r29 = (int) sigsp; /* $29 is the stack pointer register. */ /* After doing the message receive, the trampoline code will need to From b69e40a6f6b175ebfe2b116d2c04945afbf4fb44 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 14 Aug 1995 22:19:38 +0000 Subject: [PATCH 0570/4487] (_hurd_setup_sighandler): In rpc_wait case, frob mach_msg args to set timeout on receive. (_hurdsig_rcv_interrupted_p): Function removed. --- sysdeps/mach/hurd/alpha/trampoline.c | 47 +++++----------------------- sysdeps/mach/hurd/hppa/trampoline.c | 40 ++++------------------- 2 files changed, 13 insertions(+), 74 deletions(-) diff --git a/sysdeps/mach/hurd/alpha/trampoline.c b/sysdeps/mach/hurd/alpha/trampoline.c index 85f4964e14..f3872fcfe6 100644 --- a/sysdeps/mach/hurd/alpha/trampoline.c +++ b/sysdeps/mach/hurd/alpha/trampoline.c @@ -1,5 +1,5 @@ /* Set thread_state for sighandler, and sigcontext to recover. Alpha version. -Copyright (C) 1994 Free Software Foundation, Inc. +Copyright (C) 1994, 1995 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 @@ -160,6 +160,12 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, calls we retry need only wait to receive the reply message. */ args->option &= ~MACH_SEND_MSG; + /* Limit the time to receive the reply message, in case the server + claimed that `interrupt_operation' succeeded but in fact the RPC + is hung. */ + args->option |= MACH_RCV_TIMEOUT; + args->timeout = _hurd_interrupted_rpc_timeout; + state->basic.pc = (long int) &&rpc_wait_trampoline; /* After doing the message receive, the trampoline code will need to update the v0 ($0) value to be restored by sigreturn. To simplify @@ -245,42 +251,3 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, /* NOTREACHED */ return NULL; } - -/* STATE describes a thread that had intr_port set (meaning it was inside - HURD_EINTR_RPC), after it has been thread_abort'd. If it looks to have - just completed a mach_msg_trap system call that returned - MACH_RCV_INTERRUPTED, return nonzero and set *PORT to the receive right - being waited on. */ -int -_hurdsig_rcv_interrupted_p (struct machine_thread_all_state *state, - mach_port_t *port) -{ - if (state->basic.r0 == MACH_RCV_INTERRUPTED) - { - const unsigned int *pc = (void *) state->basic.pc; - struct mach_msg_trap_args *args = (void *) &state->basic.r16; - - if (_hurdsig_catch_fault (SIGSEGV)) - { - assert (_hurdsig_fault_sigcode == (long int) (pc - 1) || - _hurdsig_fault_sigcode == (long int) &args->rcv_name); - /* We got a fault trying to read the PC or stack. */ - return 0; - } - else - { - if (pc[-1] == ((alpha_instruction) { pal_format: - { opcode: op_pal, - function: op_chmk } }).bits) - { - /* We did just return from a mach_msg_trap system call - doing a message receive that was interrupted. - Examine the parameters to find the receive right. */ - *port = args->rcv_name; - return 1; - } - } - } - - return 0; -} diff --git a/sysdeps/mach/hurd/hppa/trampoline.c b/sysdeps/mach/hurd/hppa/trampoline.c index 09ab71e88d..1dbbe6dead 100644 --- a/sysdeps/mach/hurd/hppa/trampoline.c +++ b/sysdeps/mach/hurd/hppa/trampoline.c @@ -144,6 +144,12 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, calls we retry need only wait to receive the reply message. */ args->option &= ~MACH_SEND_MSG; + /* Limit the time to receive the reply message, in case the server + claimed that `interrupt_operation' succeeded but in fact the RPC + is hung. */ + args->option |= MACH_RCV_TIMEOUT; + args->timeout = _hurd_interrupted_rpc_timeout; + _hurdsig_end_catch_fault (); MACHINE_THREAD_STATE_SET_PC (&state->basic, &&rpc_wait_trampoline); @@ -222,37 +228,3 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, /* NOTREACHED */ return NULL; } - -/* STATE describes a thread that had intr_port set (meaning it was inside - HURD_EINTR_RPC), after it has been thread_abort'd. It it looks to have - just completed a mach_msg_trap system call that returned - MACH_RCV_INTERRUPTED, return nonzero and set *PORT to the receive right - being waited on. */ -int -_hurdsig_rcv_interrupted_p (struct machine_thread_all_state *state, - mach_port_t *port) -{ - const unsigned int *volatile pc - = MACHINE_THREAD_STATE_PC (&state->basic); - const mach_port_t *rcv_name - = (void *) state->r30 -32-20; /* VA_ARG4 from . */ - - if (_hurdsig_catch_fault (SIGSEGV)) - assert (_hurdsig_fault_sigcode == (long int) pc || - _hurdsig_fault_sigcode == (long int) rcv_name); - else - { - int rcving = (state->basic.r28 == MACH_RCV_INTERRUPTED && - pc == ???unfinished???); - if (rcving) - /* We did just return from a mach_msg_trap system call - doing a message receive that was interrupted. - Examine the parameters to find the receive right. */ - *port = *rcv_name; - _hurdsig_end_catch_fault (); - if (rcving) - return 1; - } - - return 0; -} From e8696ee7ebb13d25e375a25129954eae2f8484ab Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 8 Sep 1995 13:28:13 +0000 Subject: [PATCH 0571/4487] Linux is now based in sysdeps/unix/sysv. --- sysdeps/unix/sysv/sysv4/linux/accept.S | 2 - sysdeps/unix/sysv/sysv4/linux/bind.S | 2 - sysdeps/unix/sysv/sysv4/linux/connect.S | 2 - sysdeps/unix/sysv/sysv4/linux/getpeername.S | 2 - sysdeps/unix/sysv/sysv4/linux/getsockname.S | 2 - sysdeps/unix/sysv/sysv4/linux/i386/socket.S | 54 ------------ sysdeps/unix/sysv/sysv4/linux/i386/syscall.S | 29 ------- sysdeps/unix/sysv/sysv4/linux/i386/sysdep.S | 27 ------ sysdeps/unix/sysv/sysv4/linux/i386/sysdep.h | 86 -------------------- sysdeps/unix/sysv/sysv4/linux/listen.S | 2 - sysdeps/unix/sysv/sysv4/linux/rename.S | 1 - sysdeps/unix/sysv/sysv4/linux/setsid.S | 1 - sysdeps/unix/sysv/sysv4/linux/socketpair.S | 2 - sysdeps/unix/sysv/sysv4/linux/wait4.S | 1 - sysdeps/unix/sysv/sysv4/linux/waitpid.S | 24 ------ 15 files changed, 237 deletions(-) delete mode 100644 sysdeps/unix/sysv/sysv4/linux/accept.S delete mode 100644 sysdeps/unix/sysv/sysv4/linux/bind.S delete mode 100644 sysdeps/unix/sysv/sysv4/linux/connect.S delete mode 100644 sysdeps/unix/sysv/sysv4/linux/getpeername.S delete mode 100644 sysdeps/unix/sysv/sysv4/linux/getsockname.S delete mode 100644 sysdeps/unix/sysv/sysv4/linux/i386/socket.S delete mode 100644 sysdeps/unix/sysv/sysv4/linux/i386/syscall.S delete mode 100644 sysdeps/unix/sysv/sysv4/linux/i386/sysdep.S delete mode 100644 sysdeps/unix/sysv/sysv4/linux/i386/sysdep.h delete mode 100644 sysdeps/unix/sysv/sysv4/linux/listen.S delete mode 100644 sysdeps/unix/sysv/sysv4/linux/rename.S delete mode 100644 sysdeps/unix/sysv/sysv4/linux/setsid.S delete mode 100644 sysdeps/unix/sysv/sysv4/linux/socketpair.S delete mode 100644 sysdeps/unix/sysv/sysv4/linux/wait4.S delete mode 100644 sysdeps/unix/sysv/sysv4/linux/waitpid.S diff --git a/sysdeps/unix/sysv/sysv4/linux/accept.S b/sysdeps/unix/sysv/sysv4/linux/accept.S deleted file mode 100644 index 5936a0185b..0000000000 --- a/sysdeps/unix/sysv/sysv4/linux/accept.S +++ /dev/null @@ -1,2 +0,0 @@ -#define socket accept -#include diff --git a/sysdeps/unix/sysv/sysv4/linux/bind.S b/sysdeps/unix/sysv/sysv4/linux/bind.S deleted file mode 100644 index fc82b65a2f..0000000000 --- a/sysdeps/unix/sysv/sysv4/linux/bind.S +++ /dev/null @@ -1,2 +0,0 @@ -#define socket bind -#include diff --git a/sysdeps/unix/sysv/sysv4/linux/connect.S b/sysdeps/unix/sysv/sysv4/linux/connect.S deleted file mode 100644 index 3433043d8c..0000000000 --- a/sysdeps/unix/sysv/sysv4/linux/connect.S +++ /dev/null @@ -1,2 +0,0 @@ -#define socket connect -#include diff --git a/sysdeps/unix/sysv/sysv4/linux/getpeername.S b/sysdeps/unix/sysv/sysv4/linux/getpeername.S deleted file mode 100644 index 8429fcdf76..0000000000 --- a/sysdeps/unix/sysv/sysv4/linux/getpeername.S +++ /dev/null @@ -1,2 +0,0 @@ -#define socket getpeername -#include diff --git a/sysdeps/unix/sysv/sysv4/linux/getsockname.S b/sysdeps/unix/sysv/sysv4/linux/getsockname.S deleted file mode 100644 index 6782707f88..0000000000 --- a/sysdeps/unix/sysv/sysv4/linux/getsockname.S +++ /dev/null @@ -1,2 +0,0 @@ -#define socket getsockname -#include diff --git a/sysdeps/unix/sysv/sysv4/linux/i386/socket.S b/sysdeps/unix/sysv/sysv4/linux/i386/socket.S deleted file mode 100644 index 7b8dd75ed8..0000000000 --- a/sysdeps/unix/sysv/sysv4/linux/i386/socket.S +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (C) 1995 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include - -.globl syscall_error - -/* The socket-oriented system calls are handled unusally in Linux. - They are all gated through the single `socketcall' system call number. - `socketcall' takes two arguments: the first is the subcode, specifying - which socket function is being called; and the second is a pointer to - the arguments to the specific function. - - The .S files for the other calls just #define socket and #include this. */ - -ENTRY (socket) - - /* Save registers. */ - movl %ebx, %edx - - movl $SYS_socketcall, %eax /* System call number in %eax. */ - - /* Use ## so `socket' is a separate token that might be #define'd. */ - movl $SYS_##socket, %ebx /* Subcode is first arg to syscall. */ - lea 8(%esp), %ecx /* Address of args is 2nd arg. */ - - /* Do the system call trap. */ - int $0x80 - - /* Restore registers. */ - movl %edx, %ebx - - /* %eax is < 0 if there was an error. */ - testl %eax, %eax - jl JUMPTARGET(syscall_error) - - /* Successful; return the syscall's value. */ - ret diff --git a/sysdeps/unix/sysv/sysv4/linux/i386/syscall.S b/sysdeps/unix/sysv/sysv4/linux/i386/syscall.S deleted file mode 100644 index efe6d36086..0000000000 --- a/sysdeps/unix/sysv/sysv4/linux/i386/syscall.S +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 1995 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -ASM_GLOBAL_DIRECTIVE syscall_error -ENTRY (syscall) - popl %ecx /* Pop return address into %ecx. */ - popl %eax /* Pop syscall number into %eax. */ - pushl %ecx /* Push back return address. */ - DO_CALL (5) /* Frob the args and do the system call. */ - testl %eax, %eax /* Check %eax for error. */ - jl JUMPTARGET(syscall_error) /* Jump to error handler if negative. */ - ret /* Return to caller. */ diff --git a/sysdeps/unix/sysv/sysv4/linux/i386/sysdep.S b/sysdeps/unix/sysv/sysv4/linux/i386/sysdep.S deleted file mode 100644 index 5cf29ec0cf..0000000000 --- a/sysdeps/unix/sysv/sysv4/linux/i386/sysdep.S +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 1995 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -/* The syscall stubs jump here when they detect an error. - The code for Linux is almost identical to the canonical Unix/i386 - code, except that the error number in %eax is negated. */ - -__syscall_error: - negl %eax - -#define __syscall_error __syscall_error_1 -#include diff --git a/sysdeps/unix/sysv/sysv4/linux/i386/sysdep.h b/sysdeps/unix/sysv/sysv4/linux/i386/sysdep.h deleted file mode 100644 index d0c1c10dba..0000000000 --- a/sysdeps/unix/sysv/sysv4/linux/i386/sysdep.h +++ /dev/null @@ -1,86 +0,0 @@ -/* Copyright (C) 1992, 1993, 1995 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -/* In the Linux/ELF world, C symbols are asm symbols. */ -#define NO_UNDERSCORES - -/* There is some commonality. */ -#include - -#ifdef ASSEMBLER - -/* Linux uses a negative return value to indicate syscall errors, unlike - most Unices, which use the condition codes' carry flag. */ -#undef PSEUDO -#define PSEUDO(name, syscall_name, args) \ - .text; \ - .globl __syscall_error; \ - ENTRY (name) \ - movl $SYS_##syscall_name, %eax; \ - DO_CALL (args) \ - testl %eax, %eax; \ - jl JUMPTARGET(__syscall_error) - - -/* Linux takes system call arguments in registers: - - syscall number %eax call-clobbered - arg 1 %ebx call-saved - arg 2 %ecx call-clobbered - arg 3 %edx call-clobbered - arg 4 %esi call-saved - arg 5 %edi call-saved - - The stack layout upon entering the function is: - - 24(%esp) Arg# 5 - 20(%esp) Arg# 4 - 16(%esp) Arg# 3 - 12(%esp) Arg# 2 - 8(%esp) Arg# 1 - 4(%esp) Return address - (%esp) - - (Of course a function with e.g. 3 argumentS does not have entries for - arguments 4 and 5.) - - We put the arguments into registers from the stack, and save the - call-saved registers, by using the 386 `xchg' instruction to swap the - values in both directions. */ - -#undef DO_CALL -#define DO_CALL(args) \ - DOARGS_##args \ - int $0x80; \ - UNDOARGS_##args \ - -#define DOARGS_0 /* No arguments to frob. */ -#define UNDOARGS_0 /* No arguments to unfrob. */ -#define DOARGS_1 xchg 8(%esp), %ebx; DOARGS_0 /* Save %ebx on stack. */ -#define UNDOARGS_1 xchg 8(%esp), %ebx; UNDOARGS_0 /* Restore %ebx */ -#define DOARGS_2 movel 12(%esp), %ecx; DOARGS_1 -#define UNDOARGS_2 UNDOARGS_1 /* %ecx is clobbered. */ -#define DOARGS_3 movel 16(%esp), %edx; DOARGS_2 -#define UNDOARGS_3 UNDOARGS_2 /* %edx is clobbered. */ -#define DOARGS_4 xchg 20(%esp), %esi; DOARGS_3 /* Save %esi on stack. */ -#define UNDOARGS_4 xchg 20(%esp), %esi; UNDOARGS_3 /* Restore %esi. */ -#define DOARGS_5 xchg 24(%esp), %edi; DOARGS_3 /* Save %edi on stack. */ -#define UNDOARGS_5 xchg 24(%esp), %edi; UNDOARGS_3 /* Restore %edi. */ - - -#endif /* ASSEMBLER */ diff --git a/sysdeps/unix/sysv/sysv4/linux/listen.S b/sysdeps/unix/sysv/sysv4/linux/listen.S deleted file mode 100644 index d2cbec60a0..0000000000 --- a/sysdeps/unix/sysv/sysv4/linux/listen.S +++ /dev/null @@ -1,2 +0,0 @@ -#define socket listen -#include diff --git a/sysdeps/unix/sysv/sysv4/linux/rename.S b/sysdeps/unix/sysv/sysv4/linux/rename.S deleted file mode 100644 index a5a8dfeeef..0000000000 --- a/sysdeps/unix/sysv/sysv4/linux/rename.S +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/sysv4/linux/setsid.S b/sysdeps/unix/sysv/sysv4/linux/setsid.S deleted file mode 100644 index 4930c56dcf..0000000000 --- a/sysdeps/unix/sysv/sysv4/linux/setsid.S +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/sysv4/linux/socketpair.S b/sysdeps/unix/sysv/sysv4/linux/socketpair.S deleted file mode 100644 index da71c57dea..0000000000 --- a/sysdeps/unix/sysv/sysv4/linux/socketpair.S +++ /dev/null @@ -1,2 +0,0 @@ -#define socket socketpair -#include diff --git a/sysdeps/unix/sysv/sysv4/linux/wait4.S b/sysdeps/unix/sysv/sysv4/linux/wait4.S deleted file mode 100644 index e4c322341d..0000000000 --- a/sysdeps/unix/sysv/sysv4/linux/wait4.S +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/sysv4/linux/waitpid.S b/sysdeps/unix/sysv/sysv4/linux/waitpid.S deleted file mode 100644 index 20d9d669bb..0000000000 --- a/sysdeps/unix/sysv/sysv4/linux/waitpid.S +++ /dev/null @@ -1,24 +0,0 @@ -/* Copyright (C) 1991, 1992, 1995 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -SYSCALL__ (waitpid, 3) - ret - -weak_alias (__waitpid, waitpid) From 3a29975f0ad24500841791878ca9906315f7592e Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 14 Oct 1995 02:29:43 +0000 Subject: [PATCH 0572/4487] Updated from ../=mpn/gmp-1.906.7 --- sysdeps/alpha/udiv_qrnnd.S | 2 +- sysdeps/mips/mips3/gmp-mparam.h | 26 ++++++++++++++++++++++++++ sysdeps/vax/gmp-mparam.h | 28 ++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 sysdeps/mips/mips3/gmp-mparam.h create mode 100644 sysdeps/vax/gmp-mparam.h diff --git a/sysdeps/alpha/udiv_qrnnd.S b/sysdeps/alpha/udiv_qrnnd.S index 942d7a884b..bafafd672e 100644 --- a/sysdeps/alpha/udiv_qrnnd.S +++ b/sysdeps/alpha/udiv_qrnnd.S @@ -134,7 +134,7 @@ Loop2: cmplt n0,0,tmp ret $31,($26),1 Odd: - /* q' in n0. r' in n1. */ + /* q' in n0. r' in n1 */ addq n1,n0,n1 cmpult n1,n0,tmp # tmp := carry from addq beq tmp,LLp6 diff --git a/sysdeps/mips/mips3/gmp-mparam.h b/sysdeps/mips/mips3/gmp-mparam.h new file mode 100644 index 0000000000..a801b35d7a --- /dev/null +++ b/sysdeps/mips/mips3/gmp-mparam.h @@ -0,0 +1,26 @@ +/* gmp-mparam.h -- Compiler/machine parameter header file. + +Copyright (C) 1991, 1993, 1994 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Library General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at your +option) any later version. + +The GNU MP 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 Library General Public +License for more details. + +You should have received a copy of the GNU Library General Public License +along with the GNU MP Library; see the file COPYING.LIB. If not, write to +the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#define BITS_PER_MP_LIMB 64 +#define BYTES_PER_MP_LIMB 8 +#define BITS_PER_LONGINT 32 +#define BITS_PER_INT 32 +#define BITS_PER_SHORTINT 16 +#define BITS_PER_CHAR 8 diff --git a/sysdeps/vax/gmp-mparam.h b/sysdeps/vax/gmp-mparam.h new file mode 100644 index 0000000000..687f12aa35 --- /dev/null +++ b/sysdeps/vax/gmp-mparam.h @@ -0,0 +1,28 @@ +/* gmp-mparam.h -- Compiler/machine parameter header file. + +Copyright (C) 1991, 1993, 1994 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Library General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at your +option) any later version. + +The GNU MP 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 Library General Public +License for more details. + +You should have received a copy of the GNU Library General Public License +along with the GNU MP Library; see the file COPYING.LIB. If not, write to +the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#define BITS_PER_MP_LIMB 32 +#define BYTES_PER_MP_LIMB 4 +#define BITS_PER_LONGINT 32 +#define BITS_PER_INT 32 +#define BITS_PER_SHORTINT 16 +#define BITS_PER_CHAR 8 + +#define IEEE_DOUBLE_BIG_ENDIAN 0 From 7def3d92a4edd807d2df2f016e5c1d6b8e748358 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 16 Oct 1995 01:18:40 +0000 Subject: [PATCH 0573/4487] Updated from ../=mpn/gmp-1.906.7 --- sysdeps/alpha/add_n.s | 119 +++++++++++++ sysdeps/alpha/addmul_1.s | 100 +++++++++++ sysdeps/alpha/alphaev5/add_n.s | 118 +++++++++++++ sysdeps/alpha/alphaev5/lshift.s | 175 ++++++++++++++++++ sysdeps/alpha/alphaev5/rshift.s | 173 ++++++++++++++++++ sysdeps/alpha/lshift.s | 108 +++++++++++ sysdeps/alpha/mul_1.s | 84 +++++++++ sysdeps/alpha/rshift.s | 106 +++++++++++ sysdeps/alpha/sub_n.s | 119 +++++++++++++ sysdeps/alpha/submul_1.s | 100 +++++++++++ sysdeps/hppa/add_n.s | 57 ++++++ sysdeps/hppa/hppa1.1/addmul_1.s | 101 +++++++++++ sysdeps/hppa/hppa1.1/mul_1.s | 97 ++++++++++ sysdeps/hppa/hppa1.1/submul_1.s | 110 ++++++++++++ sysdeps/hppa/hppa1.1/udiv_qrnnd.s | 74 ++++++++ sysdeps/hppa/lshift.s | 65 +++++++ sysdeps/hppa/rshift.s | 62 +++++++ sysdeps/hppa/sub_n.s | 58 ++++++ sysdeps/hppa/udiv_qrnnd.s | 285 ++++++++++++++++++++++++++++++ sysdeps/i960/add_n.s | 21 +++ sysdeps/i960/addmul_1.s | 26 +++ sysdeps/i960/mul_1.s | 23 +++ sysdeps/i960/sub_n.s | 21 +++ sysdeps/m88k/m88100/add_n.s | 103 +++++++++++ sysdeps/m88k/m88100/mul_1.s | 128 ++++++++++++++ sysdeps/m88k/m88100/sub_n.s | 104 +++++++++++ sysdeps/m88k/m88110/mul_1.s | 84 +++++++++ sysdeps/mips/add_n.s | 119 +++++++++++++ sysdeps/mips/addmul_1.s | 96 ++++++++++ sysdeps/mips/lshift.s | 94 ++++++++++ sysdeps/mips/mips3/add_n.s | 119 +++++++++++++ sysdeps/mips/mips3/addmul_1.s | 96 ++++++++++ sysdeps/mips/mips3/lshift.s | 94 ++++++++++ sysdeps/mips/mips3/mul_1.s | 84 +++++++++ sysdeps/mips/mips3/rshift.s | 91 ++++++++++ sysdeps/mips/mips3/sub_n.s | 119 +++++++++++++ sysdeps/mips/mips3/submul_1.s | 96 ++++++++++ sysdeps/mips/mul_1.s | 84 +++++++++ sysdeps/mips/rshift.s | 91 ++++++++++ sysdeps/mips/sub_n.s | 119 +++++++++++++ sysdeps/mips/submul_1.s | 96 ++++++++++ sysdeps/rs6000/add_n.s | 54 ++++++ sysdeps/rs6000/addmul_1.s | 122 +++++++++++++ sysdeps/rs6000/lshift.s | 58 ++++++ sysdeps/rs6000/mul_1.s | 109 ++++++++++++ sysdeps/rs6000/rshift.s | 56 ++++++ sysdeps/rs6000/sub_n.s | 55 ++++++ sysdeps/rs6000/submul_1.s | 127 +++++++++++++ sysdeps/vax/add_n.s | 47 +++++ sysdeps/vax/addmul_1.s | 125 +++++++++++++ sysdeps/vax/mul_1.s | 122 +++++++++++++ sysdeps/vax/sub_n.s | 47 +++++ sysdeps/vax/submul_1.s | 125 +++++++++++++ sysdeps/z8000/add_n.s | 52 ++++++ sysdeps/z8000/mul_1.s | 67 +++++++ sysdeps/z8000/sub_n.s | 53 ++++++ 56 files changed, 5238 insertions(+) create mode 100644 sysdeps/alpha/add_n.s create mode 100644 sysdeps/alpha/addmul_1.s create mode 100644 sysdeps/alpha/alphaev5/add_n.s create mode 100644 sysdeps/alpha/alphaev5/lshift.s create mode 100644 sysdeps/alpha/alphaev5/rshift.s create mode 100644 sysdeps/alpha/lshift.s create mode 100644 sysdeps/alpha/mul_1.s create mode 100644 sysdeps/alpha/rshift.s create mode 100644 sysdeps/alpha/sub_n.s create mode 100644 sysdeps/alpha/submul_1.s create mode 100644 sysdeps/hppa/add_n.s create mode 100644 sysdeps/hppa/hppa1.1/addmul_1.s create mode 100644 sysdeps/hppa/hppa1.1/mul_1.s create mode 100644 sysdeps/hppa/hppa1.1/submul_1.s create mode 100644 sysdeps/hppa/hppa1.1/udiv_qrnnd.s create mode 100644 sysdeps/hppa/lshift.s create mode 100644 sysdeps/hppa/rshift.s create mode 100644 sysdeps/hppa/sub_n.s create mode 100644 sysdeps/hppa/udiv_qrnnd.s create mode 100644 sysdeps/i960/add_n.s create mode 100644 sysdeps/i960/addmul_1.s create mode 100644 sysdeps/i960/mul_1.s create mode 100644 sysdeps/i960/sub_n.s create mode 100644 sysdeps/m88k/m88100/add_n.s create mode 100644 sysdeps/m88k/m88100/mul_1.s create mode 100644 sysdeps/m88k/m88100/sub_n.s create mode 100644 sysdeps/m88k/m88110/mul_1.s create mode 100644 sysdeps/mips/add_n.s create mode 100644 sysdeps/mips/addmul_1.s create mode 100644 sysdeps/mips/lshift.s create mode 100644 sysdeps/mips/mips3/add_n.s create mode 100644 sysdeps/mips/mips3/addmul_1.s create mode 100644 sysdeps/mips/mips3/lshift.s create mode 100644 sysdeps/mips/mips3/mul_1.s create mode 100644 sysdeps/mips/mips3/rshift.s create mode 100644 sysdeps/mips/mips3/sub_n.s create mode 100644 sysdeps/mips/mips3/submul_1.s create mode 100644 sysdeps/mips/mul_1.s create mode 100644 sysdeps/mips/rshift.s create mode 100644 sysdeps/mips/sub_n.s create mode 100644 sysdeps/mips/submul_1.s create mode 100644 sysdeps/rs6000/add_n.s create mode 100644 sysdeps/rs6000/addmul_1.s create mode 100644 sysdeps/rs6000/lshift.s create mode 100644 sysdeps/rs6000/mul_1.s create mode 100644 sysdeps/rs6000/rshift.s create mode 100644 sysdeps/rs6000/sub_n.s create mode 100644 sysdeps/rs6000/submul_1.s create mode 100644 sysdeps/vax/add_n.s create mode 100644 sysdeps/vax/addmul_1.s create mode 100644 sysdeps/vax/mul_1.s create mode 100644 sysdeps/vax/sub_n.s create mode 100644 sysdeps/vax/submul_1.s create mode 100644 sysdeps/z8000/add_n.s create mode 100644 sysdeps/z8000/mul_1.s create mode 100644 sysdeps/z8000/sub_n.s diff --git a/sysdeps/alpha/add_n.s b/sysdeps/alpha/add_n.s new file mode 100644 index 0000000000..e1ad4600f5 --- /dev/null +++ b/sysdeps/alpha/add_n.s @@ -0,0 +1,119 @@ + # Alpha __mpn_add_n -- Add two limb vectors of the same length > 0 and + # store sum in a third limb vector. + + # Copyright (C) 1995 Free Software Foundation, Inc. + + # This file is part of the GNU MP Library. + + # The GNU MP Library is free software; you can redistribute it and/or modify + # it under the terms of the GNU Library General Public License as published by + # the Free Software Foundation; either version 2 of the License, or (at your + # option) any later version. + + # The GNU MP 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 Library General Public + # License for more details. + + # You should have received a copy of the GNU Library General Public License + # along with the GNU MP Library; see the file COPYING.LIB. If not, write to + # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + + # INPUT PARAMETERS + # res_ptr $16 + # s1_ptr $17 + # s2_ptr $18 + # size $19 + + .set noreorder + .set noat +.text + .align 3 + .globl __mpn_add_n + .ent __mpn_add_n +__mpn_add_n: + .frame $30,0,$26,0 + + ldq $3,0($17) + ldq $4,0($18) + + subq $19,1,$19 + and $19,4-1,$2 # number of limbs in first loop + bis $31,$31,$0 + beq $2,.L0 # if multiple of 4 limbs, skip first loop + + subq $19,$2,$19 + +.Loop0: subq $2,1,$2 + ldq $5,8($17) + addq $4,$0,$4 + ldq $6,8($18) + cmpult $4,$0,$1 + addq $3,$4,$4 + cmpult $4,$3,$0 + stq $4,0($16) + or $0,$1,$0 + + addq $17,8,$17 + addq $18,8,$18 + bis $5,$5,$3 + bis $6,$6,$4 + addq $16,8,$16 + bne $2,.Loop0 + +.L0: beq $19,.Lend + + .align 3 +.Loop: subq $19,4,$19 + + ldq $5,8($17) + addq $4,$0,$4 + ldq $6,8($18) + cmpult $4,$0,$1 + addq $3,$4,$4 + cmpult $4,$3,$0 + stq $4,0($16) + or $0,$1,$0 + + ldq $3,16($17) + addq $6,$0,$6 + ldq $4,16($18) + cmpult $6,$0,$1 + addq $5,$6,$6 + cmpult $6,$5,$0 + stq $6,8($16) + or $0,$1,$0 + + ldq $5,24($17) + addq $4,$0,$4 + ldq $6,24($18) + cmpult $4,$0,$1 + addq $3,$4,$4 + cmpult $4,$3,$0 + stq $4,16($16) + or $0,$1,$0 + + ldq $3,32($17) + addq $6,$0,$6 + ldq $4,32($18) + cmpult $6,$0,$1 + addq $5,$6,$6 + cmpult $6,$5,$0 + stq $6,24($16) + or $0,$1,$0 + + addq $17,32,$17 + addq $18,32,$18 + addq $16,32,$16 + bne $19,.Loop + +.Lend: addq $4,$0,$4 + cmpult $4,$0,$1 + addq $3,$4,$4 + cmpult $4,$3,$0 + stq $4,0($16) + or $0,$1,$0 + ret $31,($26),1 + + .end __mpn_add_n diff --git a/sysdeps/alpha/addmul_1.s b/sysdeps/alpha/addmul_1.s new file mode 100644 index 0000000000..46d277df6e --- /dev/null +++ b/sysdeps/alpha/addmul_1.s @@ -0,0 +1,100 @@ + # Alpha 21064 __mpn_addmul_1 -- Multiply a limb vector with a limb and add + # the result to a second limb vector. + + # Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc. + + # This file is part of the GNU MP Library. + + # The GNU MP Library is free software; you can redistribute it and/or modify + # it under the terms of the GNU Library General Public License as published by + # the Free Software Foundation; either version 2 of the License, or (at your + # option) any later version. + + # The GNU MP 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 Library General Public + # License for more details. + + # You should have received a copy of the GNU Library General Public License + # along with the GNU MP Library; see the file COPYING.LIB. If not, write to + # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + + # INPUT PARAMETERS + # res_ptr r16 + # s1_ptr r17 + # size r18 + # s2_limb r19 + + # This code runs at 42 cycles/limb on the 21064. + + # To improve performance for long multiplications, we would use + # 'fetch' for S1 and 'fetch_m' for RES. It's not obvious how to use + # these instructions without slowing down the general code: 1. We can + # only have two prefetches in operation at any time in the Alpha + # architecture. 2. There will seldom be any special alignment + # between RES_PTR and S1_PTR. Maybe we can simply divide the current + # loop into an inner and outer loop, having the inner loop handle + # exactly one prefetch block? + + .set noreorder + .set noat +.text + .align 3 + .globl __mpn_addmul_1 + .ent __mpn_addmul_1 2 +__mpn_addmul_1: + .frame $30,0,$26 + + ldq $2,0($17) # $2 = s1_limb + addq $17,8,$17 # s1_ptr++ + subq $18,1,$18 # size-- + mulq $2,$19,$3 # $3 = prod_low + ldq $5,0($16) # $5 = *res_ptr + umulh $2,$19,$0 # $0 = prod_high + beq $18,Lend1 # jump if size was == 1 + ldq $2,0($17) # $2 = s1_limb + addq $17,8,$17 # s1_ptr++ + subq $18,1,$18 # size-- + addq $5,$3,$3 + cmpult $3,$5,$4 + stq $3,0($16) + addq $16,8,$16 # res_ptr++ + beq $18,Lend2 # jump if size was == 2 + + .align 3 +Loop: mulq $2,$19,$3 # $3 = prod_low + ldq $5,0($16) # $5 = *res_ptr + addq $4,$0,$0 # cy_limb = cy_limb + 'cy' + subq $18,1,$18 # size-- + umulh $2,$19,$4 # $4 = cy_limb + ldq $2,0($17) # $2 = s1_limb + addq $17,8,$17 # s1_ptr++ + addq $3,$0,$3 # $3 = cy_limb + prod_low + cmpult $3,$0,$0 # $0 = carry from (cy_limb + prod_low) + addq $5,$3,$3 + cmpult $3,$5,$5 + stq $3,0($16) + addq $16,8,$16 # res_ptr++ + addq $5,$0,$0 # combine carries + bne $18,Loop + +Lend2: mulq $2,$19,$3 # $3 = prod_low + ldq $5,0($16) # $5 = *res_ptr + addq $4,$0,$0 # cy_limb = cy_limb + 'cy' + umulh $2,$19,$4 # $4 = cy_limb + addq $3,$0,$3 # $3 = cy_limb + prod_low + cmpult $3,$0,$0 # $0 = carry from (cy_limb + prod_low) + addq $5,$3,$3 + cmpult $3,$5,$5 + stq $3,0($16) + addq $5,$0,$0 # combine carries + addq $4,$0,$0 # cy_limb = prod_high + cy + ret $31,($26),1 +Lend1: addq $5,$3,$3 + cmpult $3,$5,$5 + stq $3,0($16) + addq $0,$5,$0 + ret $31,($26),1 + + .end __mpn_addmul_1 diff --git a/sysdeps/alpha/alphaev5/add_n.s b/sysdeps/alpha/alphaev5/add_n.s new file mode 100644 index 0000000000..2aaf041774 --- /dev/null +++ b/sysdeps/alpha/alphaev5/add_n.s @@ -0,0 +1,118 @@ + # Alpha __mpn_add_n -- Add two limb vectors of the same length > 0 and + # store sum in a third limb vector. + + # Copyright (C) 1995 Free Software Foundation, Inc. + + # This file is part of the GNU MP Library. + + # The GNU MP Library is free software; you can redistribute it and/or modify + # it under the terms of the GNU Library General Public License as published by + # the Free Software Foundation; either version 2 of the License, or (at your + # option) any later version. + + # The GNU MP 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 Library General Public + # License for more details. + + # You should have received a copy of the GNU Library General Public License + # along with the GNU MP Library; see the file COPYING.LIB. If not, write to + # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + + # INPUT PARAMETERS + # res_ptr $16 + # s1_ptr $17 + # s2_ptr $18 + # size $19 + + .set noreorder + .set noat +.text + .align 3 + .globl __mpn_add_n + .ent __mpn_add_n +__mpn_add_n: + .frame $30,0,$26,0 + + ldq $3,0($17) + ldq $4,0($18) + + subq $19,1,$19 + and $19,4-1,$2 # number of limbs in first loop + bis $31,$31,$0 + beq $2,.L0 # if multiple of 4 limbs, skip first loop + + subq $19,$2,$19 + +.Loop0: subq $2,1,$2 + ldq $5,8($17) + addq $4,$0,$4 + ldq $6,8($18) + cmpult $4,$0,$1 + addq $3,$4,$4 + cmpult $4,$3,$0 + stq $4,0($16) + or $0,$1,$0 + + addq $17,8,$17 + addq $18,8,$18 + bis $5,$5,$3 + bis $6,$6,$4 + addq $16,8,$16 + bne $2,.Loop0 + +.L0: beq $19,.Lend + + .align 4 +.Loop: subq $19,4,$19 + unop + + ldq $6,8($18) + addq $4,$0,$0 + ldq $5,8($17) + cmpult $0,$4,$1 + ldq $4,16($18) + addq $3,$0,$20 + cmpult $20,$3,$0 + ldq $3,16($17) + or $0,$1,$0 + addq $6,$0,$0 + cmpult $0,$6,$1 + ldq $6,24($18) + addq $5,$0,$21 + cmpult $21,$5,$0 + ldq $5,24($17) + or $0,$1,$0 + addq $4,$0,$0 + cmpult $0,$4,$1 + ldq $4,32($18) + addq $3,$0,$22 + cmpult $22,$3,$0 + ldq $3,32($17) + or $0,$1,$0 + addq $6,$0,$0 + cmpult $0,$6,$1 + addq $5,$0,$23 + cmpult $23,$5,$0 + or $0,$1,$0 + + stq $20,0($16) + stq $21,8($16) + stq $22,16($16) + stq $23,24($16) + + addq $17,32,$17 + addq $18,32,$18 + addq $16,32,$16 + bne $19,.Loop + +.Lend: addq $4,$0,$4 + cmpult $4,$0,$1 + addq $3,$4,$4 + cmpult $4,$3,$0 + stq $4,0($16) + or $0,$1,$0 + ret $31,($26),1 + + .end __mpn_add_n diff --git a/sysdeps/alpha/alphaev5/lshift.s b/sysdeps/alpha/alphaev5/lshift.s new file mode 100644 index 0000000000..fdb089550f --- /dev/null +++ b/sysdeps/alpha/alphaev5/lshift.s @@ -0,0 +1,175 @@ + # Alpha EV5 __mpn_lshift -- + + # Copyright (C) 1994, 1995 Free Software Foundation, Inc. + + # This file is part of the GNU MP Library. + + # The GNU MP Library is free software; you can redistribute it and/or modify + # it under the terms of the GNU Library General Public License as published by + # the Free Software Foundation; either version 2 of the License, or (at your + # option) any later version. + + # The GNU MP 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 Library General Public + # License for more details. + + # You should have received a copy of the GNU Library General Public License + # along with the GNU MP Library; see the file COPYING.LIB. If not, write to + # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + + # INPUT PARAMETERS + # res_ptr r16 + # s1_ptr r17 + # size r18 + # cnt r19 + + # This code runs at 4.25 cycles/limb on the EV5. + + .set noreorder + .set noat +.text + .align 3 + .globl __mpn_lshift + .ent __mpn_lshift +__mpn_lshift: + .frame $30,0,$26,0 + + s8addq $18,$17,$17 # make r17 point at end of s1 + ldq $4,-8($17) # load first limb + subq $31,$19,$20 + s8addq $18,$16,$16 # make r16 point at end of RES + subq $18,1,$18 + and $18,4-1,$28 # number of limbs in first loop + srl $4,$20,$0 # compute function result + + beq $28,L0 + subq $18,$28,$18 + + .align 3 +Loop0: ldq $3,-16($17) + subq $16,8,$16 + sll $4,$19,$5 + subq $17,8,$17 + subq $28,1,$28 + srl $3,$20,$6 + or $3,$3,$4 + or $5,$6,$8 + stq $8,0($16) + bne $28,Loop0 + +L0: sll $4,$19,$24 + beq $18,Lend + # warm up phase 1 + ldq $1,-16($17) + subq $18,4,$18 + ldq $2,-24($17) + ldq $3,-32($17) + ldq $4,-40($17) + beq $18,Lcool1 + # warm up phase 2 + srl $1,$20,$7 + sll $1,$19,$21 + srl $2,$20,$8 + ldq $1,-48($17) + sll $2,$19,$22 + ldq $2,-56($17) + srl $3,$20,$5 + or $7,$24,$7 + sll $3,$19,$23 + or $8,$21,$8 + srl $4,$20,$6 + ldq $3,-64($17) + sll $4,$19,$24 + ldq $4,-72($17) + subq $18,4,$18 + beq $18,Lcool1 + .align 4 + # main loop +Loop: stq $7,-8($16) + or $5,$22,$5 + stq $8,-16($16) + or $6,$23,$6 + + srl $1,$20,$7 + subq $18,4,$18 + sll $1,$19,$21 + unop # ldq $31,-96($17) + + srl $2,$20,$8 + ldq $1,-80($17) + sll $2,$19,$22 + ldq $2,-88($17) + + stq $5,-24($16) + or $7,$24,$7 + stq $6,-32($16) + or $8,$21,$8 + + srl $3,$20,$5 + unop # ldq $31,-96($17) + sll $3,$19,$23 + subq $16,32,$16 + + srl $4,$20,$6 + ldq $3,-96($17 + sll $4,$19,$24 + ldq $4,-104($17) + + subq $17,32,$17 + bne $18,Loop + unop + unop + # cool down phase 2/1 +Lcool1: stq $7,-8($16) + or $5,$22,$5 + stq $8,-16($16) + or $6,$23,$6 + srl $1,$20,$7 + sll $1,$19,$21 + srl $2,$20,$8 + sll $2,$19,$22 + stq $5,-24($16) + or $7,$24,$7 + stq $6,-32($16) + or $8,$21,$8 + srl $3,$20,$5 + sll $3,$19,$23 + srl $4,$20,$6 + sll $4,$19,$24 + # cool down phase 2/2 + stq $7,-40($16) + or $5,$22,$5 + stq $8,-48($16) + or $6,$23,$6 + stq $5,-56($16) + stq $6,-64($16) + # cool down phase 2/3 + stq $24,-72($16) + ret $31,($26),1 + + # cool down phase 1/1 +Lcool1: srl $1,$20,$7 + sll $1,$19,$21 + srl $2,$20,$8 + sll $2,$19,$22 + srl $3,$20,$5 + or $7,$24,$7 + sll $3,$19,$23 + or $8,$21,$8 + srl $4,$20,$6 + sll $4,$19,$24 + # cool down phase 1/2 + stq $7,-8($16) + or $5,$22,$5 + stq $8,-16($16) + or $6,$23,$6 + stq $5,-24($16) + stq $6,-32($16) + stq $24,-40($16) + ret $31,($26),1 + +Lend stq $24,-8($16) + ret $31,($26),1 + .end __mpn_lshift diff --git a/sysdeps/alpha/alphaev5/rshift.s b/sysdeps/alpha/alphaev5/rshift.s new file mode 100644 index 0000000000..1da9960b46 --- /dev/null +++ b/sysdeps/alpha/alphaev5/rshift.s @@ -0,0 +1,173 @@ + # Alpha EV5 __mpn_rshift -- + + # Copyright (C) 1994, 1995 Free Software Foundation, Inc. + + # This file is part of the GNU MP Library. + + # The GNU MP Library is free software; you can redistribute it and/or modify + # it under the terms of the GNU Library General Public License as published by + # the Free Software Foundation; either version 2 of the License, or (at your + # option) any later version. + + # The GNU MP 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 Library General Public + # License for more details. + + # You should have received a copy of the GNU Library General Public License + # along with the GNU MP Library; see the file COPYING.LIB. If not, write to + # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + + # INPUT PARAMETERS + # res_ptr r16 + # s1_ptr r17 + # size r18 + # cnt r19 + + # This code runs at 4.25 cycles/limb on the EV5. + + .set noreorder + .set noat +.text + .align 3 + .globl __mpn_rshift + .ent __mpn_rshift +__mpn_rshift: + .frame $30,0,$26,0 + + ldq $4,0($17) # load first limb + subq $31,$19,$20 + subq $18,1,$18 + and $18,4-1,$28 # number of limbs in first loop + sll $4,$20,$0 # compute function result + + beq $28,L0 + subq $18,$28,$18 + + .align 3 +Loop0: ldq $3,8($17) + addq $16,8,$16 + srl $4,$19,$5 + addq $17,8,$17 + subq $28,1,$28 + sll $3,$20,$6 + or $3,$3,$4 + or $5,$6,$8 + stq $8,-8($16) + bne $28,Loop0 + +L0: srl $4,$19,$24 + beq $18,Lend + # warm up phase 1 + ldq $1,8($17) + subq $18,4,$18 + ldq $2,16($17) + ldq $3,24($17) + ldq $4,32($17) + beq $18,Lcool1 + # warm up phase 2 + sll $1,$20,$7 + srl $1,$19,$21 + sll $2,$20,$8 + ldq $1,40($17) + srl $2,$19,$22 + ldq $2,48($17) + sll $3,$20,$5 + or $7,$24,$7 + srl $3,$19,$23 + or $8,$21,$8 + sll $4,$20,$6 + ldq $3,56($17) + srl $4,$19,$24 + ldq $4,64($17) + subq $18,4,$18 + beq $18,Lcool2 + .align 4 + # main loop +Loop: stq $7,0($16) + or $5,$22,$5 + stq $8,8($16) + or $6,$23,$6 + + sll $1,$20,$7 + subq $18,4,$18 + srl $1,$19,$21 + unop # ldq $31,-96($17) + + sll $2,$20,$8 + ldq $1,72($17) + srl $2,$19,$22 + ldq $2,80($17) + + stq $5,16($16) + or $7,$24,$7 + stq $6,24($16) + or $8,$21,$8 + + sll $3,$20,$5 + unop # ldq $31,-96($17) + srl $3,$19,$23 + addq $16,32,$16 + + sll $4,$20,$6 + ldq $3,88($17) + srl $4,$19,$24 + ldq $4,96($17) + + addq $17,32,$17 + bne $18,Loop + unop + unop + # cool down phase 2/1 +Lcool2: stq $7,0($16) + or $5,$22,$5 + stq $8,8($16) + or $6,$23,$6 + sll $1,$20,$7 + srl $1,$19,$21 + sll $2,$20,$8 + srl $2,$19,$22 + stq $5,16($16) + or $7,$24,$7 + stq $6,24($16) + or $8,$21,$8 + sll $3,$20,$5 + srl $3,$19,$23 + sll $4,$20,$6 + srl $4,$19,$24 + # cool down phase 2/2 + stq $7,32($16) + or $5,$22,$5 + stq $8,40($16) + or $6,$23,$6 + stq $5,48($16) + stq $6,56($16) + # cool down phase 2/3 + stq $24,64($16) + ret $31,($26),1 + + # cool down phase 1/1 +Lcool1: sll $1,$20,$7 + srl $1,$19,$21 + sll $2,$20,$8 + srl $2,$19,$22 + sll $3,$20,$5 + or $7,$24,$7 + srl $3,$19,$23 + or $8,$21,$8 + sll $4,$20,$6 + srl $4,$19,$24 + # cool down phase 1/2 + stq $7,0($16) + or $5,$22,$5 + stq $8,8($16) + or $6,$23,$6 + stq $5,16($16) + stq $6,24($16) + stq $24,32($16) + ret $31,($26),1 + +Lend: stq $24,0($16) + ret $31,($26),1 + .end __mpn_rshift diff --git a/sysdeps/alpha/lshift.s b/sysdeps/alpha/lshift.s new file mode 100644 index 0000000000..c28434926b --- /dev/null +++ b/sysdeps/alpha/lshift.s @@ -0,0 +1,108 @@ + # Alpha 21064 __mpn_lshift -- + + # Copyright (C) 1994, 1995 Free Software Foundation, Inc. + + # This file is part of the GNU MP Library. + + # The GNU MP Library is free software; you can redistribute it and/or modify + # it under the terms of the GNU Library General Public License as published by + # the Free Software Foundation; either version 2 of the License, or (at your + # option) any later version. + + # The GNU MP 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 Library General Public + # License for more details. + + # You should have received a copy of the GNU Library General Public License + # along with the GNU MP Library; see the file COPYING.LIB. If not, write to + # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + + # INPUT PARAMETERS + # res_ptr r16 + # s1_ptr r17 + # size r18 + # cnt r19 + + # This code runs at 4.8 cycles/limb on the 21064. With infinite unrolling, + # it would take 4 cycles/limb. It should be possible to get down to 3 + # cycles/limb since both ldq and stq can be paired with the other used + # instructions. But there are many restrictions in the 21064 pipeline that + # makes it hard, if not impossible, to get down to 3 cycles/limb: + + # 1. ldq has a 3 cycle delay, srl and sll have a 2 cycle delay. + # 2. Only aligned instruction pairs can be paired. + # 3. The store buffer or silo might not be able to deal with the bandwidth. + + .set noreorder + .set noat +.text + .align 3 + .globl __mpn_lshift + .ent __mpn_lshift +__mpn_lshift: + .frame $30,0,$26,0 + + s8addq $18,$17,$17 # make r17 point at end of s1 + ldq $4,-8($17) # load first limb + subq $17,8,$17 + subq $31,$19,$7 + s8addq $18,$16,$16 # make r16 point at end of RES + subq $18,1,$18 + and $18,4-1,$20 # number of limbs in first loop + srl $4,$7,$0 # compute function result + + beq $20,L0 + subq $18,$20,$18 + + .align 3 +Loop0: + ldq $3,-8($17) + subq $16,8,$16 + subq $17,8,$17 + subq $20,1,$20 + sll $4,$19,$5 + srl $3,$7,$6 + bis $3,$3,$4 + bis $5,$6,$8 + stq $8,0($16) + bne $20,Loop0 + +L0: beq $18,Lend + + .align 3 +Loop: ldq $3,-8($17) + subq $16,32,$16 + subq $18,4,$18 + sll $4,$19,$5 + srl $3,$7,$6 + + ldq $4,-16($17) + sll $3,$19,$1 + bis $5,$6,$8 + stq $8,24($16) + srl $4,$7,$2 + + ldq $3,-24($17) + sll $4,$19,$5 + bis $1,$2,$8 + stq $8,16($16) + srl $3,$7,$6 + + ldq $4,-32($17) + sll $3,$19,$1 + bis $5,$6,$8 + stq $8,8($16) + srl $4,$7,$2 + + subq $17,32,$17 + bis $1,$2,$8 + stq $8,0($16) + + bgt $18,Loop + +Lend: sll $4,$19,$8 + stq $8,-8($16) + ret $31,($26),1 + .end __mpn_lshift diff --git a/sysdeps/alpha/mul_1.s b/sysdeps/alpha/mul_1.s new file mode 100644 index 0000000000..3ef194d7e6 --- /dev/null +++ b/sysdeps/alpha/mul_1.s @@ -0,0 +1,84 @@ + # Alpha 21064 __mpn_mul_1 -- Multiply a limb vector with a limb and store + # the result in a second limb vector. + + # Copyright (C) 1992, 1994 Free Software Foundation, Inc. + + # This file is part of the GNU MP Library. + + # The GNU MP Library is free software; you can redistribute it and/or modify + # it under the terms of the GNU Library General Public License as published by + # the Free Software Foundation; either version 2 of the License, or (at your + # option) any later version. + + # The GNU MP 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 Library General Public + # License for more details. + + # You should have received a copy of the GNU Library General Public License + # along with the GNU MP Library; see the file COPYING.LIB. If not, write to + # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + + # INPUT PARAMETERS + # res_ptr r16 + # s1_ptr r17 + # size r18 + # s2_limb r19 + + # This code runs at 42 cycles/limb on the EV4 and 18 cycles/limb on the EV5. + + # To improve performance for long multiplications, we would use + # 'fetch' for S1 and 'fetch_m' for RES. It's not obvious how to use + # these instructions without slowing down the general code: 1. We can + # only have two prefetches in operation at any time in the Alpha + # architecture. 2. There will seldom be any special alignment + # between RES_PTR and S1_PTR. Maybe we can simply divide the current + # loop into an inner and outer loop, having the inner loop handle + # exactly one prefetch block? + + .set noreorder + .set noat +.text + .align 3 + .globl __mpn_mul_1 + .ent __mpn_mul_1 2 +__mpn_mul_1: + .frame $30,0,$26 + + ldq $2,0($17) # $2 = s1_limb + subq $18,1,$18 # size-- + mulq $2,$19,$3 # $3 = prod_low + bic $31,$31,$4 # clear cy_limb + umulh $2,$19,$0 # $0 = prod_high + beq $18,Lend1 # jump if size was == 1 + ldq $2,8($17) # $2 = s1_limb + subq $18,1,$18 # size-- + stq $3,0($16) + beq $18,Lend2 # jump if size was == 2 + + .align 3 +Loop: mulq $2,$19,$3 # $3 = prod_low + addq $4,$0,$0 # cy_limb = cy_limb + 'cy' + subq $18,1,$18 # size-- + umulh $2,$19,$4 # $4 = cy_limb + ldq $2,16($17) # $2 = s1_limb + addq $17,8,$17 # s1_ptr++ + addq $3,$0,$3 # $3 = cy_limb + prod_low + stq $3,8($16) + cmpult $3,$0,$0 # $0 = carry from (cy_limb + prod_low) + addq $16,8,$16 # res_ptr++ + bne $18,Loop + +Lend2: mulq $2,$19,$3 # $3 = prod_low + addq $4,$0,$0 # cy_limb = cy_limb + 'cy' + umulh $2,$19,$4 # $4 = cy_limb + addq $3,$0,$3 # $3 = cy_limb + prod_low + cmpult $3,$0,$0 # $0 = carry from (cy_limb + prod_low) + stq $3,8($16) + addq $4,$0,$0 # cy_limb = prod_high + cy + ret $31,($26),1 +Lend1: stq $3,0($16) + ret $31,($26),1 + + .end __mpn_mul_1 diff --git a/sysdeps/alpha/rshift.s b/sysdeps/alpha/rshift.s new file mode 100644 index 0000000000..74eab0434a --- /dev/null +++ b/sysdeps/alpha/rshift.s @@ -0,0 +1,106 @@ + # Alpha 21064 __mpn_rshift -- + + # Copyright (C) 1994, 1995 Free Software Foundation, Inc. + + # This file is part of the GNU MP Library. + + # The GNU MP Library is free software; you can redistribute it and/or modify + # it under the terms of the GNU Library General Public License as published by + # the Free Software Foundation; either version 2 of the License, or (at your + # option) any later version. + + # The GNU MP 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 Library General Public + # License for more details. + + # You should have received a copy of the GNU Library General Public License + # along with the GNU MP Library; see the file COPYING.LIB. If not, write to + # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + + # INPUT PARAMETERS + # res_ptr r16 + # s1_ptr r17 + # size r18 + # cnt r19 + + # This code runs at 4.8 cycles/limb on the 21064. With infinite unrolling, + # it would take 4 cycles/limb. It should be possible to get down to 3 + # cycles/limb since both ldq and stq can be paired with the other used + # instructions. But there are many restrictions in the 21064 pipeline that + # makes it hard, if not impossible, to get down to 3 cycles/limb: + + # 1. ldq has a 3 cycle delay, srl and sll have a 2 cycle delay. + # 2. Only aligned instruction pairs can be paired. + # 3. The store buffer or silo might not be able to deal with the bandwidth. + + .set noreorder + .set noat +.text + .align 3 + .globl __mpn_rshift + .ent __mpn_rshift +__mpn_rshift: + .frame $30,0,$26,0 + + ldq $4,0($17) # load first limb + addq $17,8,$17 + subq $31,$19,$7 + subq $18,1,$18 + and $18,4-1,$20 # number of limbs in first loop + sll $4,$7,$0 # compute function result + + beq $20,L0 + subq $18,$20,$18 + + .align 3 +Loop0: + ldq $3,0($17) + addq $16,8,$16 + addq $17,8,$17 + subq $20,1,$20 + srl $4,$19,$5 + sll $3,$7,$6 + bis $3,$3,$4 + bis $5,$6,$8 + stq $8,-8($16) + bne $20,Loop0 + +L0: beq $18,Lend + + .align 3 +Loop: ldq $3,0($17) + addq $16,32,$16 + subq $18,4,$18 + srl $4,$19,$5 + sll $3,$7,$6 + + ldq $4,8($17) + srl $3,$19,$1 + bis $5,$6,$8 + stq $8,-32($16) + sll $4,$7,$2 + + ldq $3,16($17) + srl $4,$19,$5 + bis $1,$2,$8 + stq $8,-24($16) + sll $3,$7,$6 + + ldq $4,24($17) + srl $3,$19,$1 + bis $5,$6,$8 + stq $8,-16($16) + sll $4,$7,$2 + + addq $17,32,$17 + bis $1,$2,$8 + stq $8,-8($16) + + bgt $18,Loop + +Lend: srl $4,$19,$8 + stq $8,0($16) + ret $31,($26),1 + .end __mpn_rshift diff --git a/sysdeps/alpha/sub_n.s b/sysdeps/alpha/sub_n.s new file mode 100644 index 0000000000..5200025b41 --- /dev/null +++ b/sysdeps/alpha/sub_n.s @@ -0,0 +1,119 @@ + # Alpha __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and + # store difference in a third limb vector. + + # Copyright (C) 1995 Free Software Foundation, Inc. + + # This file is part of the GNU MP Library. + + # The GNU MP Library is free software; you can redistribute it and/or modify + # it under the terms of the GNU Library General Public License as published by + # the Free Software Foundation; either version 2 of the License, or (at your + # option) any later version. + + # The GNU MP 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 Library General Public + # License for more details. + + # You should have received a copy of the GNU Library General Public License + # along with the GNU MP Library; see the file COPYING.LIB. If not, write to + # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + + # INPUT PARAMETERS + # res_ptr $16 + # s1_ptr $17 + # s2_ptr $18 + # size $19 + + .set noreorder + .set noat +.text + .align 3 + .globl __mpn_sub_n + .ent __mpn_sub_n +__mpn_sub_n: + .frame $30,0,$26,0 + + ldq $3,0($17) + ldq $4,0($18) + + subq $19,1,$19 + and $19,4-1,$2 # number of limbs in first loop + bis $31,$31,$0 + beq $2,.L0 # if multiple of 4 limbs, skip first loop + + subq $19,$2,$19 + +.Loop0: subq $2,1,$2 + ldq $5,8($17) + addq $4,$0,$4 + ldq $6,8($18) + cmpult $4,$0,$1 + subq $3,$4,$4 + cmpult $3,$4,$0 + stq $4,0($16) + or $0,$1,$0 + + addq $17,8,$17 + addq $18,8,$18 + bis $5,$5,$3 + bis $6,$6,$4 + addq $16,8,$16 + bne $2,.Loop0 + +.L0: beq $19,.Lend + + .align 3 +.Loop: subq $19,4,$19 + + ldq $5,8($17) + addq $4,$0,$4 + ldq $6,8($18) + cmpult $4,$0,$1 + subq $3,$4,$4 + cmpult $3,$4,$0 + stq $4,0($16) + or $0,$1,$0 + + ldq $3,16($17) + addq $6,$0,$6 + ldq $4,16($18) + cmpult $6,$0,$1 + subq $5,$6,$6 + cmpult $5,$6,$0 + stq $6,8($16) + or $0,$1,$0 + + ldq $5,24($17) + addq $4,$0,$4 + ldq $6,24($18) + cmpult $4,$0,$1 + subq $3,$4,$4 + cmpult $3,$4,$0 + stq $4,16($16) + or $0,$1,$0 + + ldq $3,32($17) + addq $6,$0,$6 + ldq $4,32($18) + cmpult $6,$0,$1 + subq $5,$6,$6 + cmpult $5,$6,$0 + stq $6,24($16) + or $0,$1,$0 + + addq $17,32,$17 + addq $18,32,$18 + addq $16,32,$16 + bne $19,.Loop + +.Lend: addq $4,$0,$4 + cmpult $4,$0,$1 + subq $3,$4,$4 + cmpult $3,$4,$0 + stq $4,0($16) + or $0,$1,$0 + ret $31,($26),1 + + .end __mpn_sub_n diff --git a/sysdeps/alpha/submul_1.s b/sysdeps/alpha/submul_1.s new file mode 100644 index 0000000000..acaa11c545 --- /dev/null +++ b/sysdeps/alpha/submul_1.s @@ -0,0 +1,100 @@ + # Alpha 21064 __mpn_submul_1 -- Multiply a limb vector with a limb and + # subtract the result from a second limb vector. + + # Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc. + + # This file is part of the GNU MP Library. + + # The GNU MP Library is free software; you can redistribute it and/or modify + # it under the terms of the GNU Library General Public License as published by + # the Free Software Foundation; either version 2 of the License, or (at your + # option) any later version. + + # The GNU MP 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 Library General Public + # License for more details. + + # You should have received a copy of the GNU Library General Public License + # along with the GNU MP Library; see the file COPYING.LIB. If not, write to + # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + + # INPUT PARAMETERS + # res_ptr r16 + # s1_ptr r17 + # size r18 + # s2_limb r19 + + # This code runs at 42 cycles/limb on the 21064. + + # To improve performance for long multiplications, we would use + # 'fetch' for S1 and 'fetch_m' for RES. It's not obvious how to use + # these instructions without slowing down the general code: 1. We can + # only have two prefetches in operation at any time in the Alpha + # architecture. 2. There will seldom be any special alignment + # between RES_PTR and S1_PTR. Maybe we can simply divide the current + # loop into an inner and outer loop, having the inner loop handle + # exactly one prefetch block? + + .set noreorder + .set noat +.text + .align 3 + .globl __mpn_submul_1 + .ent __mpn_submul_1 2 +__mpn_submul_1: + .frame $30,0,$26 + + ldq $2,0($17) # $2 = s1_limb + addq $17,8,$17 # s1_ptr++ + subq $18,1,$18 # size-- + mulq $2,$19,$3 # $3 = prod_low + ldq $5,0($16) # $5 = *res_ptr + umulh $2,$19,$0 # $0 = prod_high + beq $18,Lend1 # jump if size was == 1 + ldq $2,0($17) # $2 = s1_limb + addq $17,8,$17 # s1_ptr++ + subq $18,1,$18 # size-- + subq $5,$3,$3 + cmpult $5,$3,$4 + stq $3,0($16) + addq $16,8,$16 # res_ptr++ + beq $18,Lend2 # jump if size was == 2 + + .align 3 +Loop: mulq $2,$19,$3 # $3 = prod_low + ldq $5,0($16) # $5 = *res_ptr + addq $4,$0,$0 # cy_limb = cy_limb + 'cy' + subq $18,1,$18 # size-- + umulh $2,$19,$4 # $4 = cy_limb + ldq $2,0($17) # $2 = s1_limb + addq $17,8,$17 # s1_ptr++ + addq $3,$0,$3 # $3 = cy_limb + prod_low + cmpult $3,$0,$0 # $0 = carry from (cy_limb + prod_low) + subq $5,$3,$3 + cmpult $5,$3,$5 + stq $3,0($16) + addq $16,8,$16 # res_ptr++ + addq $5,$0,$0 # combine carries + bne $18,Loop + +Lend2: mulq $2,$19,$3 # $3 = prod_low + ldq $5,0($16) # $5 = *res_ptr + addq $4,$0,$0 # cy_limb = cy_limb + 'cy' + umulh $2,$19,$4 # $4 = cy_limb + addq $3,$0,$3 # $3 = cy_limb + prod_low + cmpult $3,$0,$0 # $0 = carry from (cy_limb + prod_low) + subq $5,$3,$3 + cmpult $5,$3,$5 + stq $3,0($16) + addq $5,$0,$0 # combine carries + addq $4,$0,$0 # cy_limb = prod_high + cy + ret $31,($26),1 +Lend1: subq $5,$3,$3 + cmpult $5,$3,$5 + stq $3,0($16) + addq $0,$5,$0 + ret $31,($26),1 + + .end __mpn_submul_1 diff --git a/sysdeps/hppa/add_n.s b/sysdeps/hppa/add_n.s new file mode 100644 index 0000000000..7f3e32342b --- /dev/null +++ b/sysdeps/hppa/add_n.s @@ -0,0 +1,57 @@ +; HP-PA __mpn_add_n -- Add two limb vectors of the same length > 0 and store +; sum in a third limb vector. + +; Copyright (C) 1992, 1994 Free Software Foundation, Inc. + +; This file is part of the GNU MP Library. + +; The GNU MP Library is free software; you can redistribute it and/or modify +; it under the terms of the GNU Library General Public License as published by +; the Free Software Foundation; either version 2 of the License, or (at your +; option) any later version. + +; The GNU MP 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 Library General Public +; License for more details. + +; You should have received a copy of the GNU Library General Public License +; along with the GNU MP Library; see the file COPYING.LIB. If not, write to +; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + +; INPUT PARAMETERS +; res_ptr gr26 +; s1_ptr gr25 +; s2_ptr gr24 +; size gr23 + +; One might want to unroll this as for other processors, but it turns +; out that the data cache contention after a store makes such +; unrolling useless. We can't come under 5 cycles/limb anyway. + + .code + .export __mpn_add_n +__mpn_add_n + .proc + .callinfo frame=0,no_calls + .entry + + ldws,ma 4(0,%r25),%r20 + ldws,ma 4(0,%r24),%r19 + + addib,= -1,%r23,L$end ; check for (SIZE == 1) + add %r20,%r19,%r28 ; add first limbs ignoring cy + +L$loop ldws,ma 4(0,%r25),%r20 + ldws,ma 4(0,%r24),%r19 + stws,ma %r28,4(0,%r26) + addib,<> -1,%r23,L$loop + addc %r20,%r19,%r28 + +L$end stws %r28,0(0,%r26) + bv 0(%r2) + addc %r0,%r0,%r28 + + .exit + .procend diff --git a/sysdeps/hppa/hppa1.1/addmul_1.s b/sysdeps/hppa/hppa1.1/addmul_1.s new file mode 100644 index 0000000000..a9dfdd1c28 --- /dev/null +++ b/sysdeps/hppa/hppa1.1/addmul_1.s @@ -0,0 +1,101 @@ +; HP-PA-1.1 __mpn_addmul_1 -- Multiply a limb vector with a limb and +; add the result to a second limb vector. + +; Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. + +; This file is part of the GNU MP Library. + +; The GNU MP Library is free software; you can redistribute it and/or modify +; it under the terms of the GNU Library General Public License as published by +; the Free Software Foundation; either version 2 of the License, or (at your +; option) any later version. + +; The GNU MP 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 Library General Public +; License for more details. + +; You should have received a copy of the GNU Library General Public License +; along with the GNU MP Library; see the file COPYING.LIB. If not, write to +; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + +; INPUT PARAMETERS +; res_ptr r26 +; s1_ptr r25 +; size r24 +; s2_limb r23 + +; This runs at 11 cycles/limb on a PA7000. With the used instructions, it +; can not become faster due to data cache contention after a store. On the +; PA7100 it runs at 10 cycles/limb, and that can not be improved either, +; since only the xmpyu does not need the integer pipeline, so the only +; dual-issue we will get are addc+xmpyu. Unrolling could gain a cycle/limb +; on the PA7100. + +; There are some ideas described in mul_1.s that applies to this code too. + + .code + .export __mpn_addmul_1 +__mpn_addmul_1 + .proc + .callinfo frame=64,no_calls + .entry + + ldo 64(%r30),%r30 + fldws,ma 4(%r25),%fr5 + stw %r23,-16(%r30) ; move s2_limb ... + addib,= -1,%r24,L$just_one_limb + fldws -16(%r30),%fr4 ; ... into fr4 + add %r0,%r0,%r0 ; clear carry + xmpyu %fr4,%fr5,%fr6 + fldws,ma 4(%r25),%fr7 + fstds %fr6,-16(%r30) + xmpyu %fr4,%fr7,%fr8 + ldw -12(%r30),%r19 ; least significant limb in product + ldw -16(%r30),%r28 + + fstds %fr8,-16(%r30) + addib,= -1,%r24,L$end + ldw -12(%r30),%r1 + +; Main loop +L$loop ldws 0(%r26),%r29 + fldws,ma 4(%r25),%fr5 + add %r29,%r19,%r19 + stws,ma %r19,4(%r26) + addc %r28,%r1,%r19 + xmpyu %fr4,%fr5,%fr6 + ldw -16(%r30),%r28 + fstds %fr6,-16(%r30) + addc %r0,%r28,%r28 + addib,<> -1,%r24,L$loop + ldw -12(%r30),%r1 + +L$end ldw 0(%r26),%r29 + add %r29,%r19,%r19 + stws,ma %r19,4(%r26) + addc %r28,%r1,%r19 + ldw -16(%r30),%r28 + ldws 0(%r26),%r29 + addc %r0,%r28,%r28 + add %r29,%r19,%r19 + stws,ma %r19,4(%r26) + addc %r0,%r28,%r28 + bv 0(%r2) + ldo -64(%r30),%r30 + +L$just_one_limb + xmpyu %fr4,%fr5,%fr6 + ldw 0(%r26),%r29 + fstds %fr6,-16(%r30) + ldw -12(%r30),%r1 + ldw -16(%r30),%r28 + add %r29,%r1,%r19 + stw %r19,0(%r26) + addc %r0,%r28,%r28 + bv 0(%r2) + ldo -64(%r30),%r30 + + .exit + .procend diff --git a/sysdeps/hppa/hppa1.1/mul_1.s b/sysdeps/hppa/hppa1.1/mul_1.s new file mode 100644 index 0000000000..ebf0778b90 --- /dev/null +++ b/sysdeps/hppa/hppa1.1/mul_1.s @@ -0,0 +1,97 @@ +; HP-PA-1.1 __mpn_mul_1 -- Multiply a limb vector with a limb and store +; the result in a second limb vector. + +; Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. + +; This file is part of the GNU MP Library. + +; The GNU MP Library is free software; you can redistribute it and/or modify +; it under the terms of the GNU Library General Public License as published by +; the Free Software Foundation; either version 2 of the License, or (at your +; option) any later version. + +; The GNU MP 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 Library General Public +; License for more details. + +; You should have received a copy of the GNU Library General Public License +; along with the GNU MP Library; see the file COPYING.LIB. If not, write to +; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + +; INPUT PARAMETERS +; res_ptr r26 +; s1_ptr r25 +; size r24 +; s2_limb r23 + +; This runs at 9 cycles/limb on a PA7000. With the used instructions, it can +; not become faster due to data cache contention after a store. On the +; PA7100 it runs at 7 cycles/limb, and that can not be improved either, since +; only the xmpyu does not need the integer pipeline, so the only dual-issue +; we will get are addc+xmpyu. Unrolling would not help either CPU. + +; We could use fldds to read two limbs at a time from the S1 array, and that +; could bring down the times to 8.5 and 6.5 cycles/limb for the PA7000 and +; PA7100, respectively. We don't do that since it does not seem worth the +; (alignment) troubles... + +; At least the PA7100 is rumored to be able to deal with cache-misses +; without stalling instruction issue. If this is true, and the cache is +; actually also lockup-free, we should use a deeper software pipeline, and +; load from S1 very early! (The loads and stores to -12(sp) will surely be +; in the cache.) + + .code + .export __mpn_mul_1 +__mpn_mul_1 + .proc + .callinfo frame=64,no_calls + .entry + + ldo 64(%r30),%r30 + fldws,ma 4(%r25),%fr5 + stw %r23,-16(%r30) ; move s2_limb ... + addib,= -1,%r24,L$just_one_limb + fldws -16(%r30),%fr4 ; ... into fr4 + add %r0,%r0,%r0 ; clear carry + xmpyu %fr4,%fr5,%fr6 + fldws,ma 4(%r25),%fr7 + fstds %fr6,-16(%r30) + xmpyu %fr4,%fr7,%fr8 + ldw -12(%r30),%r19 ; least significant limb in product + ldw -16(%r30),%r28 + + fstds %fr8,-16(%r30) + addib,= -1,%r24,L$end + ldw -12(%r30),%r1 + +; Main loop +L$loop fldws,ma 4(%r25),%fr5 + stws,ma %r19,4(%r26) + addc %r28,%r1,%r19 + xmpyu %fr4,%fr5,%fr6 + ldw -16(%r30),%r28 + fstds %fr6,-16(%r30) + addib,<> -1,%r24,L$loop + ldw -12(%r30),%r1 + +L$end stws,ma %r19,4(%r26) + addc %r28,%r1,%r19 + ldw -16(%r30),%r28 + stws,ma %r19,4(%r26) + addc %r0,%r28,%r28 + bv 0(%r2) + ldo -64(%r30),%r30 + +L$just_one_limb + xmpyu %fr4,%fr5,%fr6 + fstds %fr6,-16(%r30) + ldw -16(%r30),%r28 + ldo -64(%r30),%r30 + bv 0(%r2) + fstws %fr6R,0(%r26) + + .exit + .procend diff --git a/sysdeps/hppa/hppa1.1/submul_1.s b/sysdeps/hppa/hppa1.1/submul_1.s new file mode 100644 index 0000000000..44cabf4690 --- /dev/null +++ b/sysdeps/hppa/hppa1.1/submul_1.s @@ -0,0 +1,110 @@ +; HP-PA-1.1 __mpn_submul_1 -- Multiply a limb vector with a limb and +; subtract the result from a second limb vector. + +; Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. + +; This file is part of the GNU MP Library. + +; The GNU MP Library is free software; you can redistribute it and/or modify +; it under the terms of the GNU Library General Public License as published by +; the Free Software Foundation; either version 2 of the License, or (at your +; option) any later version. + +; The GNU MP 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 Library General Public +; License for more details. + +; You should have received a copy of the GNU Library General Public License +; along with the GNU MP Library; see the file COPYING.LIB. If not, write to +; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + +; INPUT PARAMETERS +; res_ptr r26 +; s1_ptr r25 +; size r24 +; s2_limb r23 + +; This runs at 12 cycles/limb on a PA7000. With the used instructions, it +; can not become faster due to data cache contention after a store. On the +; PA7100 it runs at 11 cycles/limb, and that can not be improved either, +; since only the xmpyu does not need the integer pipeline, so the only +; dual-issue we will get are addc+xmpyu. Unrolling could gain a cycle/limb +; on the PA7100. + +; There are some ideas described in mul_1.s that applies to this code too. + +; It seems possible to make this run as fast as __mpn_addmul_1, if we use +; sub,>>= %r29,%r19,%r22 +; addi 1,%r28,%r28 +; but that requires reworking the hairy software pipeline... + + .code + .export __mpn_submul_1 +__mpn_submul_1 + .proc + .callinfo frame=64,no_calls + .entry + + ldo 64(%r30),%r30 + fldws,ma 4(%r25),%fr5 + stw %r23,-16(%r30) ; move s2_limb ... + addib,= -1,%r24,L$just_one_limb + fldws -16(%r30),%fr4 ; ... into fr4 + add %r0,%r0,%r0 ; clear carry + xmpyu %fr4,%fr5,%fr6 + fldws,ma 4(%r25),%fr7 + fstds %fr6,-16(%r30) + xmpyu %fr4,%fr7,%fr8 + ldw -12(%r30),%r19 ; least significant limb in product + ldw -16(%r30),%r28 + + fstds %fr8,-16(%r30) + addib,= -1,%r24,L$end + ldw -12(%r30),%r1 + +; Main loop +L$loop ldws 0(%r26),%r29 + fldws,ma 4(%r25),%fr5 + sub %r29,%r19,%r22 + add %r22,%r19,%r0 + stws,ma %r22,4(%r26) + addc %r28,%r1,%r19 + xmpyu %fr4,%fr5,%fr6 + ldw -16(%r30),%r28 + fstds %fr6,-16(%r30) + addc %r0,%r28,%r28 + addib,<> -1,%r24,L$loop + ldw -12(%r30),%r1 + +L$end ldw 0(%r26),%r29 + sub %r29,%r19,%r22 + add %r22,%r19,%r0 + stws,ma %r22,4(%r26) + addc %r28,%r1,%r19 + ldw -16(%r30),%r28 + ldws 0(%r26),%r29 + addc %r0,%r28,%r28 + sub %r29,%r19,%r22 + add %r22,%r19,%r0 + stws,ma %r22,4(%r26) + addc %r0,%r28,%r28 + bv 0(%r2) + ldo -64(%r30),%r30 + +L$just_one_limb + xmpyu %fr4,%fr5,%fr6 + ldw 0(%r26),%r29 + fstds %fr6,-16(%r30) + ldw -12(%r30),%r1 + ldw -16(%r30),%r28 + sub %r29,%r1,%r22 + add %r22,%r1,%r0 + stw %r22,0(%r26) + addc %r0,%r28,%r28 + bv 0(%r2) + ldo -64(%r30),%r30 + + .exit + .procend diff --git a/sysdeps/hppa/hppa1.1/udiv_qrnnd.s b/sysdeps/hppa/hppa1.1/udiv_qrnnd.s new file mode 100644 index 0000000000..4ffef3a4fb --- /dev/null +++ b/sysdeps/hppa/hppa1.1/udiv_qrnnd.s @@ -0,0 +1,74 @@ +; HP-PA __udiv_qrnnd division support, used from longlong.h. +; This version runs fast on PA 7000 and later. + +; Copyright (C) 1993, 1994 Free Software Foundation, Inc. + +; This file is part of the GNU MP Library. + +; The GNU MP Library is free software; you can redistribute it and/or modify +; it under the terms of the GNU Library General Public License as published by +; the Free Software Foundation; either version 2 of the License, or (at your +; option) any later version. + +; The GNU MP 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 Library General Public +; License for more details. + +; You should have received a copy of the GNU Library General Public License +; along with the GNU MP Library; see the file COPYING.LIB. If not, write to +; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + +; INPUT PARAMETERS +; rem_ptr gr26 +; n1 gr25 +; n0 gr24 +; d gr23 + + .code +L$0000 .word 0x43f00000 + .word 0x0 + .export __udiv_qrnnd +__udiv_qrnnd + .proc + .callinfo frame=64,no_calls + .entry + ldo 64(%r30),%r30 + + stws %r25,-16(0,%r30) ; n_hi + stws %r24,-12(0,%r30) ; n_lo + ldil L'L$0000,%r19 + ldo R'L$0000(%r19),%r19 + fldds -16(0,%r30),%fr5 + stws %r23,-12(0,%r30) + comib,<= 0,%r25,L$1 + fcnvxf,dbl,dbl %fr5,%fr5 + fldds 0(0,%r19),%fr4 + fadd,dbl %fr4,%fr5,%fr5 +L$1 + fcpy,sgl %fr0,%fr6L + fldws -12(0,%r30),%fr6R + fcnvxf,dbl,dbl %fr6,%fr4 + + fdiv,dbl %fr5,%fr4,%fr5 + + fcnvfx,dbl,dbl %fr5,%fr4 + fstws %fr4R,-16(%r30) + xmpyu %fr4R,%fr6R,%fr6 + ldws -16(%r30),%r28 + fstds %fr6,-16(0,%r30) + ldws -12(0,%r30),%r21 + ldws -16(0,%r30),%r20 + sub %r24,%r21,%r22 + subb %r25,%r20,%r19 + comib,= 0,%r19,L$2 + ldo -64(%r30),%r30 + + add %r22,%r23,%r22 + ldo -1(%r28),%r28 +L$2 bv 0(%r2) + stws %r22,0(0,%r26) + + .exit + .procend diff --git a/sysdeps/hppa/lshift.s b/sysdeps/hppa/lshift.s new file mode 100644 index 0000000000..0479f4a281 --- /dev/null +++ b/sysdeps/hppa/lshift.s @@ -0,0 +1,65 @@ +; HP-PA __mpn_lshift -- + +; Copyright (C) 1992, 1994 Free Software Foundation, Inc. + +; This file is part of the GNU MP Library. + +; The GNU MP Library is free software; you can redistribute it and/or modify +; it under the terms of the GNU Library General Public License as published by +; the Free Software Foundation; either version 2 of the License, or (at your +; option) any later version. + +; The GNU MP 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 Library General Public +; License for more details. + +; You should have received a copy of the GNU Library General Public License +; along with the GNU MP Library; see the file COPYING.LIB. If not, write to +; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + +; INPUT PARAMETERS +; res_ptr gr26 +; s_ptr gr25 +; size gr24 +; cnt gr23 + + .code + .export __mpn_lshift +__mpn_lshift + .proc + .callinfo frame=64,no_calls + .entry + + sh2add %r24,%r25,%r25 + sh2add %r24,%r26,%r26 + ldws,mb -4(0,%r25),%r22 + subi 32,%r23,%r1 + mtsar %r1 + addib,= -1,%r24,L$0004 + vshd %r0,%r22,%r28 ; compute carry out limb + ldws,mb -4(0,%r25),%r29 + addib,= -1,%r24,L$0002 + vshd %r22,%r29,%r20 + +L$loop ldws,mb -4(0,%r25),%r22 + stws,mb %r20,-4(0,%r26) + addib,= -1,%r24,L$0003 + vshd %r29,%r22,%r20 + ldws,mb -4(0,%r25),%r29 + stws,mb %r20,-4(0,%r26) + addib,<> -1,%r24,L$loop + vshd %r22,%r29,%r20 + +L$0002 stws,mb %r20,-4(0,%r26) + vshd %r29,%r0,%r20 + bv 0(%r2) + stw %r20,-4(0,%r26) +L$0003 stws,mb %r20,-4(0,%r26) +L$0004 vshd %r22,%r0,%r20 + bv 0(%r2) + stw %r20,-4(0,%r26) + + .exit + .procend diff --git a/sysdeps/hppa/rshift.s b/sysdeps/hppa/rshift.s new file mode 100644 index 0000000000..18d33f2f86 --- /dev/null +++ b/sysdeps/hppa/rshift.s @@ -0,0 +1,62 @@ +; HP-PA __mpn_rshift -- + +; Copyright (C) 1992, 1994 Free Software Foundation, Inc. + +; This file is part of the GNU MP Library. + +; The GNU MP Library is free software; you can redistribute it and/or modify +; it under the terms of the GNU Library General Public License as published by +; the Free Software Foundation; either version 2 of the License, or (at your +; option) any later version. + +; The GNU MP 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 Library General Public +; License for more details. + +; You should have received a copy of the GNU Library General Public License +; along with the GNU MP Library; see the file COPYING.LIB. If not, write to +; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + +; INPUT PARAMETERS +; res_ptr gr26 +; s_ptr gr25 +; size gr24 +; cnt gr23 + + .code + .export __mpn_rshift +__mpn_rshift + .proc + .callinfo frame=64,no_calls + .entry + + ldws,ma 4(0,%r25),%r22 + mtsar %r23 + addib,= -1,%r24,L$0004 + vshd %r22,%r0,%r28 ; compute carry out limb + ldws,ma 4(0,%r25),%r29 + addib,= -1,%r24,L$0002 + vshd %r29,%r22,%r20 + +L$loop ldws,ma 4(0,%r25),%r22 + stws,ma %r20,4(0,%r26) + addib,= -1,%r24,L$0003 + vshd %r22,%r29,%r20 + ldws,ma 4(0,%r25),%r29 + stws,ma %r20,4(0,%r26) + addib,<> -1,%r24,L$loop + vshd %r29,%r22,%r20 + +L$0002 stws,ma %r20,4(0,%r26) + vshd %r0,%r29,%r20 + bv 0(%r2) + stw %r20,0(0,%r26) +L$0003 stws,ma %r20,4(0,%r26) +L$0004 vshd %r0,%r22,%r20 + bv 0(%r2) + stw %r20,0(0,%r26) + + .exit + .procend diff --git a/sysdeps/hppa/sub_n.s b/sysdeps/hppa/sub_n.s new file mode 100644 index 0000000000..daae46e61d --- /dev/null +++ b/sysdeps/hppa/sub_n.s @@ -0,0 +1,58 @@ +; HP-PA __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and +; store difference in a third limb vector. + +; Copyright (C) 1992, 1994 Free Software Foundation, Inc. + +; This file is part of the GNU MP Library. + +; The GNU MP Library is free software; you can redistribute it and/or modify +; it under the terms of the GNU Library General Public License as published by +; the Free Software Foundation; either version 2 of the License, or (at your +; option) any later version. + +; The GNU MP 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 Library General Public +; License for more details. + +; You should have received a copy of the GNU Library General Public License +; along with the GNU MP Library; see the file COPYING.LIB. If not, write to +; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + +; INPUT PARAMETERS +; res_ptr gr26 +; s1_ptr gr25 +; s2_ptr gr24 +; size gr23 + +; One might want to unroll this as for other processors, but it turns +; out that the data cache contention after a store makes such +; unrolling useless. We can't come under 5 cycles/limb anyway. + + .code + .export __mpn_sub_n +__mpn_sub_n + .proc + .callinfo frame=0,no_calls + .entry + + ldws,ma 4(0,%r25),%r20 + ldws,ma 4(0,%r24),%r19 + + addib,= -1,%r23,L$end ; check for (SIZE == 1) + sub %r20,%r19,%r28 ; subtract first limbs ignoring cy + +L$loop ldws,ma 4(0,%r25),%r20 + ldws,ma 4(0,%r24),%r19 + stws,ma %r28,4(0,%r26) + addib,<> -1,%r23,L$loop + subb %r20,%r19,%r28 + +L$end stws %r28,0(0,%r26) + addc %r0,%r0,%r28 + bv 0(%r2) + subi 1,%r28,%r28 + + .exit + .procend diff --git a/sysdeps/hppa/udiv_qrnnd.s b/sysdeps/hppa/udiv_qrnnd.s new file mode 100644 index 0000000000..0b069bf7f9 --- /dev/null +++ b/sysdeps/hppa/udiv_qrnnd.s @@ -0,0 +1,285 @@ +; HP-PA __udiv_qrnnd division support, used from longlong.h. +; This version runs fast on pre-PA7000 CPUs. + +; Copyright (C) 1993, 1994 Free Software Foundation, Inc. + +; This file is part of the GNU MP Library. + +; The GNU MP Library is free software; you can redistribute it and/or modify +; it under the terms of the GNU Library General Public License as published by +; the Free Software Foundation; either version 2 of the License, or (at your +; option) any later version. + +; The GNU MP 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 Library General Public +; License for more details. + +; You should have received a copy of the GNU Library General Public License +; along with the GNU MP Library; see the file COPYING.LIB. If not, write to +; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + +; INPUT PARAMETERS +; rem_ptr gr26 +; n1 gr25 +; n0 gr24 +; d gr23 + +; The code size is a bit excessive. We could merge the last two ds;addc +; sequences by simply moving the "bb,< Odd" instruction down. The only +; trouble is the FFFFFFFF code that would need some hacking. + + .code + .export __udiv_qrnnd +__udiv_qrnnd + .proc + .callinfo frame=0,no_calls + .entry + + comb,< %r23,0,L$largedivisor + sub %r0,%r23,%r1 ; clear cy as side-effect + ds %r0,%r1,%r0 + addc %r24,%r24,%r24 + ds %r25,%r23,%r25 + addc %r24,%r24,%r24 + ds %r25,%r23,%r25 + addc %r24,%r24,%r24 + ds %r25,%r23,%r25 + addc %r24,%r24,%r24 + ds %r25,%r23,%r25 + addc %r24,%r24,%r24 + ds %r25,%r23,%r25 + addc %r24,%r24,%r24 + ds %r25,%r23,%r25 + addc %r24,%r24,%r24 + ds %r25,%r23,%r25 + addc %r24,%r24,%r24 + ds %r25,%r23,%r25 + addc %r24,%r24,%r24 + ds %r25,%r23,%r25 + addc %r24,%r24,%r24 + ds %r25,%r23,%r25 + addc %r24,%r24,%r24 + ds %r25,%r23,%r25 + addc %r24,%r24,%r24 + ds %r25,%r23,%r25 + addc %r24,%r24,%r24 + ds %r25,%r23,%r25 + addc %r24,%r24,%r24 + ds %r25,%r23,%r25 + addc %r24,%r24,%r24 + ds %r25,%r23,%r25 + addc %r24,%r24,%r24 + ds %r25,%r23,%r25 + addc %r24,%r24,%r24 + ds %r25,%r23,%r25 + addc %r24,%r24,%r24 + ds %r25,%r23,%r25 + addc %r24,%r24,%r24 + ds %r25,%r23,%r25 + addc %r24,%r24,%r24 + ds %r25,%r23,%r25 + addc %r24,%r24,%r24 + ds %r25,%r23,%r25 + addc %r24,%r24,%r24 + ds %r25,%r23,%r25 + addc %r24,%r24,%r24 + ds %r25,%r23,%r25 + addc %r24,%r24,%r24 + ds %r25,%r23,%r25 + addc %r24,%r24,%r24 + ds %r25,%r23,%r25 + addc %r24,%r24,%r24 + ds %r25,%r23,%r25 + addc %r24,%r24,%r24 + ds %r25,%r23,%r25 + addc %r24,%r24,%r24 + ds %r25,%r23,%r25 + addc %r24,%r24,%r24 + ds %r25,%r23,%r25 + addc %r24,%r24,%r24 + ds %r25,%r23,%r25 + addc %r24,%r24,%r24 + ds %r25,%r23,%r25 + addc %r24,%r24,%r28 + ds %r25,%r23,%r25 + comclr,>= %r25,%r0,%r0 + addl %r25,%r23,%r25 + stws %r25,0(0,%r26) + bv 0(%r2) + addc %r28,%r28,%r28 + +L$largedivisor + extru %r24,31,1,%r19 ; r19 = n0 & 1 + bb,< %r23,31,L$odd + extru %r23,30,31,%r22 ; r22 = d >> 1 + shd %r25,%r24,1,%r24 ; r24 = new n0 + extru %r25,30,31,%r25 ; r25 = new n1 + sub %r0,%r22,%r21 + ds %r0,%r21,%r0 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + comclr,>= %r25,%r0,%r0 + addl %r25,%r22,%r25 + sh1addl %r25,%r19,%r25 + stws %r25,0(0,%r26) + bv 0(%r2) + addc %r24,%r24,%r28 + +L$odd addib,sv,n 1,%r22,L$FF.. ; r22 = (d / 2 + 1) + shd %r25,%r24,1,%r24 ; r24 = new n0 + extru %r25,30,31,%r25 ; r25 = new n1 + sub %r0,%r22,%r21 + ds %r0,%r21,%r0 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r24 + ds %r25,%r22,%r25 + addc %r24,%r24,%r28 + comclr,>= %r25,%r0,%r0 + addl %r25,%r22,%r25 + sh1addl %r25,%r19,%r25 +; We have computed (n1,,n0) / (d + 1), q' = r28, r' = r25 + add,nuv %r28,%r25,%r25 + addl %r25,%r1,%r25 + addc %r0,%r28,%r28 + sub,<< %r25,%r23,%r0 + addl %r25,%r1,%r25 + stws %r25,0(0,%r26) + bv 0(%r2) + addc %r0,%r28,%r28 + +; This is just a special case of the code above. +; We come here when d == 0xFFFFFFFF +L$FF.. add,uv %r25,%r24,%r24 + sub,<< %r24,%r23,%r0 + ldo 1(%r24),%r24 + stws %r24,0(0,%r26) + bv 0(%r2) + addc %r0,%r25,%r28 + + .exit + .procend diff --git a/sysdeps/i960/add_n.s b/sysdeps/i960/add_n.s new file mode 100644 index 0000000000..6031f6d4c3 --- /dev/null +++ b/sysdeps/i960/add_n.s @@ -0,0 +1,21 @@ +.text + .align 4 + .globl ___mpn_add_n +___mpn_add_n: + mov 0,g6 # clear carry-save register + cmpo 1,0 # clear cy + +Loop: subo 1,g3,g3 # update loop counter + ld (g1),g5 # load from s1_ptr + addo 4,g1,g1 # s1_ptr++ + ld (g2),g4 # load from s2_ptr + addo 4,g2,g2 # s2_ptr++ + cmpo g6,1 # restore cy from g6, relies on cy being 0 + addc g4,g5,g4 # main add + subc 0,0,g6 # save cy in g6 + st g4,(g0) # store result to res_ptr + addo 4,g0,g0 # res_ptr++ + cmpobne 0,g3,Loop # when branch is taken, clears C bit + + mov g6,g0 + ret diff --git a/sysdeps/i960/addmul_1.s b/sysdeps/i960/addmul_1.s new file mode 100644 index 0000000000..1a3de95e50 --- /dev/null +++ b/sysdeps/i960/addmul_1.s @@ -0,0 +1,26 @@ +.text + .align 4 + .globl ___mpn_mul_1 +___mpn_mul_1: + subo g2,0,g2 + shlo 2,g2,g4 + subo g4,g1,g1 + subo g4,g0,g13 + mov 0,g0 + + cmpo 1,0 # clear C bit on AC.cc + +Loop: ld (g1)[g2*4],g5 + emul g3,g5,g6 + ld (g13)[g2*4],g5 + + addc g0,g6,g6 # relies on that C bit is clear + addc 0,g7,g7 + addc g5,g6,g6 # relies on that C bit is clear + st g6,(g13)[g2*4] + addc 0,g7,g0 + + addo g2,1,g2 + cmpobne 0,g2,Loop # when branch is taken, clears C bit + + ret diff --git a/sysdeps/i960/mul_1.s b/sysdeps/i960/mul_1.s new file mode 100644 index 0000000000..e75ea42d39 --- /dev/null +++ b/sysdeps/i960/mul_1.s @@ -0,0 +1,23 @@ +.text + .align 4 + .globl ___mpn_mul_1 +___mpn_mul_1: + subo g2,0,g2 + shlo 2,g2,g4 + subo g4,g1,g1 + subo g4,g0,g13 + mov 0,g0 + + cmpo 1,0 # clear C bit on AC.cc + +Loop: ld (g1)[g2*4],g5 + emul g3,g5,g6 + + addc g0,g6,g6 # relies on that C bit is clear + st g6,(g13)[g2*4] + addc 0,g7,g0 + + addo g2,1,g2 + cmpobne 0,g2,Loop # when branch is taken, clears C bit + + ret diff --git a/sysdeps/i960/sub_n.s b/sysdeps/i960/sub_n.s new file mode 100644 index 0000000000..13ebbfa9f2 --- /dev/null +++ b/sysdeps/i960/sub_n.s @@ -0,0 +1,21 @@ +.text + .align 4 + .globl ___mpn_sub_n +___mpn_sub_n: + mov 1,g6 # set carry-save register + cmpo 1,0 # clear cy + +Loop: subo 1,g3,g3 # update loop counter + ld (g1),g5 # load from s1_ptr + addo 4,g1,g1 # s1_ptr++ + ld (g2),g4 # load from s2_ptr + addo 4,g2,g2 # s2_ptr++ + cmpo g6,1 # restore cy from g6, relies on cy being 0 + subc g4,g5,g4 # main subtract + subc 0,0,g6 # save cy in g6 + st g4,(g0) # store result to res_ptr + addo 4,g0,g0 # res_ptr++ + cmpobne 0,g3,Loop # when branch is taken, cy will be 0 + + mov g6,g0 + ret diff --git a/sysdeps/m88k/m88100/add_n.s b/sysdeps/m88k/m88100/add_n.s new file mode 100644 index 0000000000..7e4ccccb90 --- /dev/null +++ b/sysdeps/m88k/m88100/add_n.s @@ -0,0 +1,103 @@ +; mc88100 __mpn_add -- Add two limb vectors of the same length > 0 and store +; sum in a third limb vector. + +; Copyright (C) 1992, 1994 Free Software Foundation, Inc. + +; This file is part of the GNU MP Library. + +; The GNU MP Library is free software; you can redistribute it and/or modify +; it under the terms of the GNU Library General Public License as published by +; the Free Software Foundation; either version 2 of the License, or (at your +; option) any later version. + +; The GNU MP 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 Library General Public +; License for more details. + +; You should have received a copy of the GNU Library General Public License +; along with the GNU MP Library; see the file COPYING.LIB. If not, write to +; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + +; INPUT PARAMETERS +; res_ptr r2 +; s1_ptr r3 +; s2_ptr r4 +; size r5 + +; This code has been optimized to run one instruction per clock, avoiding +; load stalls and writeback contention. As a result, the instruction +; order is not always natural. + +; The speed is about 4.6 clocks/limb + 18 clocks/limb-vector on an 88100, +; but on the 88110, it seems to run much slower, 6.6 clocks/limb. + + text + align 16 + global ___mpn_add_n +___mpn_add_n: + ld r6,r3,0 ; read first limb from s1_ptr + extu r10,r5,3 + ld r7,r4,0 ; read first limb from s2_ptr + + subu.co r5,r0,r5 ; (clear carry as side effect) + mak r5,r5,3<4> + bcnd eq0,r5,Lzero + + or r12,r0,lo16(Lbase) + or.u r12,r12,hi16(Lbase) + addu r12,r12,r5 ; r12 is address for entering in loop + + extu r5,r5,2 ; divide by 4 + subu r2,r2,r5 ; adjust res_ptr + subu r3,r3,r5 ; adjust s1_ptr + subu r4,r4,r5 ; adjust s2_ptr + + or r8,r6,r0 + + jmp.n r12 + or r9,r7,r0 + +Loop: addu r3,r3,32 + st r8,r2,28 + addu r4,r4,32 + ld r6,r3,0 + addu r2,r2,32 + ld r7,r4,0 +Lzero: subu r10,r10,1 ; add 0 + 8r limbs (adj loop cnt) +Lbase: ld r8,r3,4 + addu.cio r6,r6,r7 + ld r9,r4,4 + st r6,r2,0 + ld r6,r3,8 ; add 7 + 8r limbs + addu.cio r8,r8,r9 + ld r7,r4,8 + st r8,r2,4 + ld r8,r3,12 ; add 6 + 8r limbs + addu.cio r6,r6,r7 + ld r9,r4,12 + st r6,r2,8 + ld r6,r3,16 ; add 5 + 8r limbs + addu.cio r8,r8,r9 + ld r7,r4,16 + st r8,r2,12 + ld r8,r3,20 ; add 4 + 8r limbs + addu.cio r6,r6,r7 + ld r9,r4,20 + st r6,r2,16 + ld r6,r3,24 ; add 3 + 8r limbs + addu.cio r8,r8,r9 + ld r7,r4,24 + st r8,r2,20 + ld r8,r3,28 ; add 2 + 8r limbs + addu.cio r6,r6,r7 + ld r9,r4,28 + st r6,r2,24 + bcnd.n ne0,r10,Loop ; add 1 + 8r limbs + addu.cio r8,r8,r9 + + st r8,r2,28 ; store most significant limb + + jmp.n r1 + addu.ci r2,r0,r0 ; return carry-out from most sign. limb diff --git a/sysdeps/m88k/m88100/mul_1.s b/sysdeps/m88k/m88100/mul_1.s new file mode 100644 index 0000000000..35c238d570 --- /dev/null +++ b/sysdeps/m88k/m88100/mul_1.s @@ -0,0 +1,128 @@ +; mc88100 __mpn_mul_1 -- Multiply a limb vector with a single limb and +; store the product in a second limb vector. + +; Copyright (C) 1992, 1994 Free Software Foundation, Inc. + +; This file is part of the GNU MP Library. + +; The GNU MP Library is free software; you can redistribute it and/or modify +; it under the terms of the GNU Library General Public License as published by +; the Free Software Foundation; either version 2 of the License, or (at your +; option) any later version. + +; The GNU MP 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 Library General Public +; License for more details. + +; You should have received a copy of the GNU Library General Public License +; along with the GNU MP Library; see the file COPYING.LIB. If not, write to +; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + +; INPUT PARAMETERS +; res_ptr r2 +; s1_ptr r3 +; size r4 +; s2_limb r5 + +; Common overhead is about 11 cycles/invocation. + +; The speed for S2_LIMB >= 0x10000 is approximately 21 cycles/limb. (The +; pipeline stalls 2 cycles due to WB contention.) + +; The speed for S2_LIMB < 0x10000 is approximately 16 cycles/limb. (The +; pipeline stalls 2 cycles due to WB contention and 1 cycle due to latency.) + +; To enhance speed: +; 1. Unroll main loop 4-8 times. +; 2. Schedule code to avoid WB contention. It might be tempting to move the +; ld instruction in the loops down to save 2 cycles (less WB contention), +; but that looses because the ultimate value will be read from outside +; the allocated space. But if we handle the ultimate multiplication in +; the tail, we can do this. +; 3. Make the multiplication with less instructions. I think the code for +; (S2_LIMB >= 0x10000) is not minimal. +; With these techniques the (S2_LIMB >= 0x10000) case would run in 17 or +; less cycles/limb; the (S2_LIMB < 0x10000) case would run in 11 +; cycles/limb. (Assuming infinite unrolling.) + + text + align 16 + global ___mpn_mul_1 +___mpn_mul_1: + + ; Make S1_PTR and RES_PTR point at the end of their blocks + ; and negate SIZE. + lda r3,r3[r4] + lda r6,r2[r4] ; RES_PTR in r6 since r2 is retval + subu r4,r0,r4 + + addu.co r2,r0,r0 ; r2 = cy = 0 + ld r9,r3[r4] + mask r7,r5,0xffff ; r7 = lo(S2_LIMB) + extu r8,r5,16 ; r8 = hi(S2_LIMB) + bcnd.n eq0,r8,Lsmall ; jump if (hi(S2_LIMB) == 0) + subu r6,r6,4 + +; General code for any value of S2_LIMB. + + ; Make a stack frame and save r25 and r26 + subu r31,r31,16 + st.d r25,r31,8 + + ; Enter the loop in the middle + br.n L1 + addu r4,r4,1 + +Loop: + ld r9,r3[r4] + st r26,r6[r4] +; bcnd ne0,r0,0 ; bubble + addu r4,r4,1 +L1: mul r26,r9,r5 ; low word of product mul_1 WB ld + mask r12,r9,0xffff ; r12 = lo(s1_limb) mask_1 + mul r11,r12,r7 ; r11 = prod_0 mul_2 WB mask_1 + mul r10,r12,r8 ; r10 = prod_1a mul_3 + extu r13,r9,16 ; r13 = hi(s1_limb) extu_1 WB mul_1 + mul r12,r13,r7 ; r12 = prod_1b mul_4 WB extu_1 + mul r25,r13,r8 ; r25 = prod_2 mul_5 WB mul_2 + extu r11,r11,16 ; r11 = hi(prod_0) extu_2 WB mul_3 + addu r10,r10,r11 ; addu_1 WB extu_2 +; bcnd ne0,r0,0 ; bubble WB addu_1 + addu.co r10,r10,r12 ; WB mul_4 + mask.u r10,r10,0xffff ; move the 16 most significant bits... + addu.ci r10,r10,r0 ; ...to the low half of the word... + rot r10,r10,16 ; ...and put carry in pos 16. + addu.co r26,r26,r2 ; add old carry limb + bcnd.n ne0,r4,Loop + addu.ci r2,r25,r10 ; compute new carry limb + + st r26,r6[r4] + ld.d r25,r31,8 + jmp.n r1 + addu r31,r31,16 + +; Fast code for S2_LIMB < 0x10000 +Lsmall: + ; Enter the loop in the middle + br.n SL1 + addu r4,r4,1 + +SLoop: + ld r9,r3[r4] ; + st r8,r6[r4] ; + addu r4,r4,1 ; +SL1: mul r8,r9,r5 ; low word of product + mask r12,r9,0xffff ; r12 = lo(s1_limb) + extu r13,r9,16 ; r13 = hi(s1_limb) + mul r11,r12,r7 ; r11 = prod_0 + mul r12,r13,r7 ; r12 = prod_1b + addu.cio r8,r8,r2 ; add old carry limb + extu r10,r11,16 ; r11 = hi(prod_0) + addu r10,r10,r12 ; + bcnd.n ne0,r4,SLoop + extu r2,r10,16 ; r2 = new carry limb + + jmp.n r1 + st r8,r6[r4] diff --git a/sysdeps/m88k/m88100/sub_n.s b/sysdeps/m88k/m88100/sub_n.s new file mode 100644 index 0000000000..3963cd5479 --- /dev/null +++ b/sysdeps/m88k/m88100/sub_n.s @@ -0,0 +1,104 @@ +; mc88100 __mpn_sub -- Subtract two limb vectors of the same length > 0 and +; store difference in a third limb vector. + +; Copyright (C) 1992, 1994 Free Software Foundation, Inc. + +; This file is part of the GNU MP Library. + +; The GNU MP Library is free software; you can redistribute it and/or modify +; it under the terms of the GNU Library General Public License as published by +; the Free Software Foundation; either version 2 of the License, or (at your +; option) any later version. + +; The GNU MP 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 Library General Public +; License for more details. + +; You should have received a copy of the GNU Library General Public License +; along with the GNU MP Library; see the file COPYING.LIB. If not, write to +; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + +; INPUT PARAMETERS +; res_ptr r2 +; s1_ptr r3 +; s2_ptr r4 +; size r5 + +; This code has been optimized to run one instruction per clock, avoiding +; load stalls and writeback contention. As a result, the instruction +; order is not always natural. + +; The speed is about 4.6 clocks/limb + 18 clocks/limb-vector on an 88100, +; but on the 88110, it seems to run much slower, 6.6 clocks/limb. + + text + align 16 + global ___mpn_sub_n +___mpn_sub_n: + ld r6,r3,0 ; read first limb from s1_ptr + extu r10,r5,3 + ld r7,r4,0 ; read first limb from s2_ptr + + subu.co r5,r0,r5 ; (clear carry as side effect) + mak r5,r5,3<4> + bcnd eq0,r5,Lzero + + or r12,r0,lo16(Lbase) + or.u r12,r12,hi16(Lbase) + addu r12,r12,r5 ; r12 is address for entering in loop + + extu r5,r5,2 ; divide by 4 + subu r2,r2,r5 ; adjust res_ptr + subu r3,r3,r5 ; adjust s1_ptr + subu r4,r4,r5 ; adjust s2_ptr + + or r8,r6,r0 + + jmp.n r12 + or r9,r7,r0 + +Loop: addu r3,r3,32 + st r8,r2,28 + addu r4,r4,32 + ld r6,r3,0 + addu r2,r2,32 + ld r7,r4,0 +Lzero: subu r10,r10,1 ; subtract 0 + 8r limbs (adj loop cnt) +Lbase: ld r8,r3,4 + subu.cio r6,r6,r7 + ld r9,r4,4 + st r6,r2,0 + ld r6,r3,8 ; subtract 7 + 8r limbs + subu.cio r8,r8,r9 + ld r7,r4,8 + st r8,r2,4 + ld r8,r3,12 ; subtract 6 + 8r limbs + subu.cio r6,r6,r7 + ld r9,r4,12 + st r6,r2,8 + ld r6,r3,16 ; subtract 5 + 8r limbs + subu.cio r8,r8,r9 + ld r7,r4,16 + st r8,r2,12 + ld r8,r3,20 ; subtract 4 + 8r limbs + subu.cio r6,r6,r7 + ld r9,r4,20 + st r6,r2,16 + ld r6,r3,24 ; subtract 3 + 8r limbs + subu.cio r8,r8,r9 + ld r7,r4,24 + st r8,r2,20 + ld r8,r3,28 ; subtract 2 + 8r limbs + subu.cio r6,r6,r7 + ld r9,r4,28 + st r6,r2,24 + bcnd.n ne0,r10,Loop ; subtract 1 + 8r limbs + subu.cio r8,r8,r9 + + st r8,r2,28 ; store most significant limb + + addu.ci r2,r0,r0 ; return carry-out from most sign. limb + jmp.n r1 + xor r2,r2,1 diff --git a/sysdeps/m88k/m88110/mul_1.s b/sysdeps/m88k/m88110/mul_1.s new file mode 100644 index 0000000000..08c3ca07ee --- /dev/null +++ b/sysdeps/m88k/m88110/mul_1.s @@ -0,0 +1,84 @@ +; mc88110 __mpn_mul_1 -- Multiply a limb vector with a single limb and +; store the product in a second limb vector. + +; Copyright (C) 1992, 1994 Free Software Foundation, Inc. + +; This file is part of the GNU MP Library. + +; The GNU MP Library is free software; you can redistribute it and/or modify +; it under the terms of the GNU Library General Public License as published by +; the Free Software Foundation; either version 2 of the License, or (at your +; option) any later version. + +; The GNU MP 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 Library General Public +; License for more details. + +; You should have received a copy of the GNU Library General Public License +; along with the GNU MP Library; see the file COPYING.LIB. If not, write to +; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + +; INPUT PARAMETERS +; res_ptr r2 +; s1_ptr r3 +; size r4 +; s2_limb r5 + + text + align 16 + global ___mpn_mul_1 +___mpn_mul_1: + ; Make S1_PTR and RES_PTR point at the end of their blocks + ; and negate SIZE. + lda r3,r3[r4] + lda r8,r2[r4] ; RES_PTR in r8 since r2 is retval + subu r4,r0,r4 + + addu.co r2,r0,r0 ; r2 = cy = 0 + + ld r6,r3[r4] + addu r4,r4,1 + mulu.d r10,r6,r5 + bcnd.n eq0,r4,Lend + subu r8,r8,8 + +Loop: ld r6,r3[r4] + addu.cio r9,r11,r2 + or r2,r10,r0 ; could be avoided if unrolled + addu r4,r4,1 + mulu.d r10,r6,r5 + bcnd.n ne0,r4,Loop + st r9,r8[r4] + +Lend: addu.cio r9,r11,r2 + st r9,r8,4 + jmp.n r1 + addu.ci r2,r10,r0 + +; This is the Right Way to do this on '110. 4 cycles / 64-bit limb. +; ld.d r10, +; mulu.d +; addu.cio +; addu.cio +; st.d +; mulu.d ,r11,r5 +; ld.d r12, +; mulu.d ,r10,r5 +; addu.cio +; addu.cio +; st.d +; mulu.d +; ld.d r10, +; mulu.d +; addu.cio +; addu.cio +; st.d +; mulu.d +; ld.d r10, +; mulu.d +; addu.cio +; addu.cio +; st.d +; mulu.d diff --git a/sysdeps/mips/add_n.s b/sysdeps/mips/add_n.s new file mode 100644 index 0000000000..c82910816e --- /dev/null +++ b/sysdeps/mips/add_n.s @@ -0,0 +1,119 @@ + # MIPS2 __mpn_add_n -- Add two limb vectors of the same length > 0 and + # store sum in a third limb vector. + + # Copyright (C) 1995 Free Software Foundation, Inc. + + # This file is part of the GNU MP Library. + + # The GNU MP Library is free software; you can redistribute it and/or modify + # it under the terms of the GNU Library General Public License as published by + # the Free Software Foundation; either version 2 of the License, or (at your + # option) any later version. + + # The GNU MP 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 Library General Public + # License for more details. + + # You should have received a copy of the GNU Library General Public License + # along with the GNU MP Library; see the file COPYING.LIB. If not, write to + # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + + # INPUT PARAMETERS + # res_ptr $4 + # s1_ptr $5 + # s2_ptr $6 + # size $7 + + .text + .align 2 + .globl __mpn_add_n + .ent __mpn_add_n +__mpn_add_n: + .set noreorder + .set nomacro + + lw $10,0($5) + lw $11,0($6) + + addiu $7,$7,-1 + and $9,$7,4-1 # number of limbs in first loop + beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop + move $2,$0 + + subu $7,$7,$9 + +.Loop0: addiu $9,$9,-1 + lw $12,4($5) + addu $11,$11,$2 + lw $13,4($6) + sltu $8,$11,$2 + addu $11,$10,$11 + sltu $2,$11,$10 + sw $11,0($4) + or $2,$2,$8 + + addiu $5,$5,4 + addiu $6,$6,4 + move $10,$12 + move $11,$13 + bne $9,$0,.Loop0 + addiu $4,$4,4 + +.L0: beq $7,$0,.Lend + nop + +.Loop: addiu $7,$7,-4 + + lw $12,4($5) + addu $11,$11,$2 + lw $13,4($6) + sltu $8,$11,$2 + addu $11,$10,$11 + sltu $2,$11,$10 + sw $11,0($4) + or $2,$2,$8 + + lw $10,8($5) + addu $13,$13,$2 + lw $11,8($6) + sltu $8,$13,$2 + addu $13,$12,$13 + sltu $2,$13,$12 + sw $13,4($4) + or $2,$2,$8 + + lw $12,12($5) + addu $11,$11,$2 + lw $13,12($6) + sltu $8,$11,$2 + addu $11,$10,$11 + sltu $2,$11,$10 + sw $11,8($4) + or $2,$2,$8 + + lw $10,16($5) + addu $13,$13,$2 + lw $11,16($6) + sltu $8,$13,$2 + addu $13,$12,$13 + sltu $2,$13,$12 + sw $13,12($4) + or $2,$2,$8 + + addiu $5,$5,16 + addiu $6,$6,16 + + bne $7,$0,.Loop + addiu $4,$4,16 + +.Lend: addu $11,$11,$2 + sltu $8,$11,$2 + addu $11,$10,$11 + sltu $2,$11,$10 + sw $11,0($4) + j $31 + or $2,$2,$8 + + .end __mpn_add_n diff --git a/sysdeps/mips/addmul_1.s b/sysdeps/mips/addmul_1.s new file mode 100644 index 0000000000..abc2fb8dcf --- /dev/null +++ b/sysdeps/mips/addmul_1.s @@ -0,0 +1,96 @@ + # MIPS __mpn_addmul_1 -- Multiply a limb vector with a single limb and + # add the product to a second limb vector. + + # Copyright (C) 1992, 1994 Free Software Foundation, Inc. + + # This file is part of the GNU MP Library. + + # The GNU MP Library is free software; you can redistribute it and/or modify + # it under the terms of the GNU Library General Public License as published by + # the Free Software Foundation; either version 2 of the License, or (at your + # option) any later version. + + # The GNU MP 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 Library General Public + # License for more details. + + # You should have received a copy of the GNU Library General Public License + # along with the GNU MP Library; see the file COPYING.LIB. If not, write to + # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + + # INPUT PARAMETERS + # res_ptr $4 + # s1_ptr $5 + # size $6 + # s2_limb $7 + + .text + .align 4 + .globl __mpn_addmul_1 + .ent __mpn_addmul_1 +__mpn_addmul_1: + .set noreorder + .set nomacro + + # warm up phase 0 + lw $8,0($5) + + # warm up phase 1 + addiu $5,$5,4 + multu $8,$7 + + addiu $6,$6,-1 + beq $6,$0,$LC0 + move $2,$0 # zero cy2 + + addiu $6,$6,-1 + beq $6,$0,$LC1 + lw $8,0($5) # load new s1 limb as early as possible + +Loop: lw $10,0($4) + mflo $3 + mfhi $9 + addiu $5,$5,4 + addu $3,$3,$2 # add old carry limb to low product limb + multu $8,$7 + lw $8,0($5) # load new s1 limb as early as possible + addiu $6,$6,-1 # decrement loop counter + sltu $2,$3,$2 # carry from previous addition -> $2 + addu $3,$10,$3 + sltu $10,$3,$10 + addu $2,$2,$10 + sw $3,0($4) + addiu $4,$4,4 + bne $6,$0,Loop # should be "bnel" + addu $2,$9,$2 # add high product limb and carry from addition + + # cool down phase 1 +$LC1: lw $10,0($4) + mflo $3 + mfhi $9 + addu $3,$3,$2 + sltu $2,$3,$2 + multu $8,$7 + addu $3,$10,$3 + sltu $10,$3,$10 + addu $2,$2,$10 + sw $3,0($4) + addiu $4,$4,4 + addu $2,$9,$2 # add high product limb and carry from addition + + # cool down phase 0 +$LC0: lw $10,0($4) + mflo $3 + mfhi $9 + addu $3,$3,$2 + sltu $2,$3,$2 + addu $3,$10,$3 + sltu $10,$3,$10 + addu $2,$2,$10 + sw $3,0($4) + j $31 + addu $2,$9,$2 # add high product limb and carry from addition + + .end __mpn_addmul_1 diff --git a/sysdeps/mips/lshift.s b/sysdeps/mips/lshift.s new file mode 100644 index 0000000000..ce33e7c84c --- /dev/null +++ b/sysdeps/mips/lshift.s @@ -0,0 +1,94 @@ + # MIPS2 __mpn_lshift -- + + # Copyright (C) 1995 Free Software Foundation, Inc. + + # This file is part of the GNU MP Library. + + # The GNU MP Library is free software; you can redistribute it and/or modify + # it under the terms of the GNU Library General Public License as published by + # the Free Software Foundation; either version 2 of the License, or (at your + # option) any later version. + + # The GNU MP 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 Library General Public + # License for more details. + + # You should have received a copy of the GNU Library General Public License + # along with the GNU MP Library; see the file COPYING.LIB. If not, write to + # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + + # INPUT PARAMETERS + # res_ptr $4 + # src_ptr $5 + # size $6 + # cnt $7 + + .text + .align 2 + .globl __mpn_lshift + .ent __mpn_lshift +__mpn_lshift: + .set noreorder + .set nomacro + + sll $2,$6,2 + addu $5,$5,$2 # make r5 point at end of src + lw $10,-4($5) # load first limb + subu $13,$0,$7 + addu $4,$4,$2 # make r4 point at end of res + addiu $6,$6,-1 + and $9,$6,4-1 # number of limbs in first loop + beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop + srl $2,$10,$13 # compute function result + + subu $6,$6,$9 + +.Loop0: lw $3,-8($5) + addiu $4,$4,-4 + addiu $5,$5,-4 + addiu $9,$9,-1 + sll $11,$10,$7 + srl $12,$3,$13 + move $10,$3 + or $8,$11,$12 + bne $9,$0,.Loop0 + sw $8,0($4) + +.L0: beq $6,$0,.Lend + nop + +.Loop: lw $3,-8($5) + addiu $4,$4,-16 + addiu $6,$6,-4 + sll $11,$10,$7 + srl $12,$3,$13 + + lw $10,-12($5) + sll $14,$3,$7 + or $8,$11,$12 + sw $8,12($4) + srl $9,$10,$13 + + lw $3,-16($5) + sll $11,$10,$7 + or $8,$14,$9 + sw $8,8($4) + srl $12,$3,$13 + + lw $10,-20($5) + sll $14,$3,$7 + or $8,$11,$12 + sw $8,4($4) + srl $9,$10,$13 + + addiu $5,$5,-16 + or $8,$14,$9 + bgtz $6,.Loop + sw $8,0($4) + +.Lend: sll $8,$10,$7 + j $31 + sw $8,-4($4) + .end __mpn_lshift diff --git a/sysdeps/mips/mips3/add_n.s b/sysdeps/mips/mips3/add_n.s new file mode 100644 index 0000000000..b5257804ad --- /dev/null +++ b/sysdeps/mips/mips3/add_n.s @@ -0,0 +1,119 @@ + # MIPS3 __mpn_add_n -- Add two limb vectors of the same length > 0 and + # store sum in a third limb vector. + + # Copyright (C) 1995 Free Software Foundation, Inc. + + # This file is part of the GNU MP Library. + + # The GNU MP Library is free software; you can redistribute it and/or modify + # it under the terms of the GNU Library General Public License as published by + # the Free Software Foundation; either version 2 of the License, or (at your + # option) any later version. + + # The GNU MP 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 Library General Public + # License for more details. + + # You should have received a copy of the GNU Library General Public License + # along with the GNU MP Library; see the file COPYING.LIB. If not, write to + # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + + # INPUT PARAMETERS + # res_ptr $4 + # s1_ptr $5 + # s2_ptr $6 + # size $7 + + .text + .align 2 + .globl __mpn_add_n + .ent __mpn_add_n +__mpn_add_n: + .set noreorder + .set nomacro + + ld $10,0($5) + ld $11,0($6) + + daddiu $7,$7,-1 + and $9,$7,4-1 # number of limbs in first loop + beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop + move $2,$0 + + dsubu $7,$7,$9 + +.Loop0: daddiu $9,$9,-1 + ld $12,8($5) + daddu $11,$11,$2 + ld $13,8($6) + sltu $8,$11,$2 + daddu $11,$10,$11 + sltu $2,$11,$10 + sd $11,0($4) + or $2,$2,$8 + + daddiu $5,$5,8 + daddiu $6,$6,8 + move $10,$12 + move $11,$13 + bne $9,$0,.Loop0 + daddiu $4,$4,8 + +.L0: beq $7,$0,.Lend + nop + +.Loop: daddiu $7,$7,-4 + + ld $12,8($5) + daddu $11,$11,$2 + ld $13,8($6) + sltu $8,$11,$2 + daddu $11,$10,$11 + sltu $2,$11,$10 + sd $11,0($4) + or $2,$2,$8 + + ld $10,16($5) + daddu $13,$13,$2 + ld $11,16($6) + sltu $8,$13,$2 + daddu $13,$12,$13 + sltu $2,$13,$12 + sd $13,8($4) + or $2,$2,$8 + + ld $12,24($5) + daddu $11,$11,$2 + ld $13,24($6) + sltu $8,$11,$2 + daddu $11,$10,$11 + sltu $2,$11,$10 + sd $11,16($4) + or $2,$2,$8 + + ld $10,32($5) + daddu $13,$13,$2 + ld $11,32($6) + sltu $8,$13,$2 + daddu $13,$12,$13 + sltu $2,$13,$12 + sd $13,24($4) + or $2,$2,$8 + + daddiu $5,$5,32 + daddiu $6,$6,32 + + bne $7,$0,.Loop + daddiu $4,$4,32 + +.Lend: daddu $11,$11,$2 + sltu $8,$11,$2 + daddu $11,$10,$11 + sltu $2,$11,$10 + sd $11,0($4) + j $31 + or $2,$2,$8 + + .end __mpn_add_n diff --git a/sysdeps/mips/mips3/addmul_1.s b/sysdeps/mips/mips3/addmul_1.s new file mode 100644 index 0000000000..7af0172614 --- /dev/null +++ b/sysdeps/mips/mips3/addmul_1.s @@ -0,0 +1,96 @@ + # MIPS3 __mpn_addmul_1 -- Multiply a limb vector with a single limb and + # add the product to a second limb vector. + + # Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc. + + # This file is part of the GNU MP Library. + + # The GNU MP Library is free software; you can redistribute it and/or modify + # it under the terms of the GNU Library General Public License as published by + # the Free Software Foundation; either version 2 of the License, or (at your + # option) any later version. + + # The GNU MP 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 Library General Public + # License for more details. + + # You should have received a copy of the GNU Library General Public License + # along with the GNU MP Library; see the file COPYING.LIB. If not, write to + # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + + # INPUT PARAMETERS + # res_ptr $4 + # s1_ptr $5 + # size $6 + # s2_limb $7 + + .text + .align 4 + .globl __mpn_addmul_1 + .ent __mpn_addmul_1 +__mpn_addmul_1: + .set noreorder + .set nomacro + + # warm up phase 0 + ld $8,0($5) + + # warm up phase 1 + daddiu $5,$5,8 + dmultu $8,$7 + + daddiu $6,$6,-1 + beq $6,$0,$LC0 + move $2,$0 # zero cy2 + + daddiu $6,$6,-1 + beq $6,$0,$LC1 + ld $8,0($5) # load new s1 limb as early as possible + +Loop: ld $10,0($4) + mflo $3 + mfhi $9 + daddiu $5,$5,8 + daddu $3,$3,$2 # add old carry limb to low product limb + dmultu $8,$7 + ld $8,0($5) # load new s1 limb as early as possible + daddiu $6,$6,-1 # decrement loop counter + sltu $2,$3,$2 # carry from previous addition -> $2 + daddu $3,$10,$3 + sltu $10,$3,$10 + daddu $2,$2,$10 + sd $3,0($4) + daddiu $4,$4,8 + bne $6,$0,Loop # should be "bnel" + daddu $2,$9,$2 # add high product limb and carry from addition + + # cool down phase 1 +$LC1: ld $10,0($4) + mflo $3 + mfhi $9 + daddu $3,$3,$2 + sltu $2,$3,$2 + dmultu $8,$7 + daddu $3,$10,$3 + sltu $10,$3,$10 + daddu $2,$2,$10 + sd $3,0($4) + daddiu $4,$4,8 + daddu $2,$9,$2 # add high product limb and carry from addition + + # cool down phase 0 +$LC0: ld $10,0($4) + mflo $3 + mfhi $9 + daddu $3,$3,$2 + sltu $2,$3,$2 + daddu $3,$10,$3 + sltu $10,$3,$10 + daddu $2,$2,$10 + sd $3,0($4) + j $31 + daddu $2,$9,$2 # add high product limb and carry from addition + + .end __mpn_addmul_1 diff --git a/sysdeps/mips/mips3/lshift.s b/sysdeps/mips/mips3/lshift.s new file mode 100644 index 0000000000..c05dcafffd --- /dev/null +++ b/sysdeps/mips/mips3/lshift.s @@ -0,0 +1,94 @@ + # MIPS3 __mpn_lshift -- + + # Copyright (C) 1995 Free Software Foundation, Inc. + + # This file is part of the GNU MP Library. + + # The GNU MP Library is free software; you can redistribute it and/or modify + # it under the terms of the GNU Library General Public License as published by + # the Free Software Foundation; either version 2 of the License, or (at your + # option) any later version. + + # The GNU MP 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 Library General Public + # License for more details. + + # You should have received a copy of the GNU Library General Public License + # along with the GNU MP Library; see the file COPYING.LIB. If not, write to + # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + + # INPUT PARAMETERS + # res_ptr $4 + # src_ptr $5 + # size $6 + # cnt $7 + + .text + .align 2 + .globl __mpn_lshift + .ent __mpn_lshift +__mpn_lshift: + .set noreorder + .set nomacro + + dsll $2,$6,3 + daddu $5,$5,$2 # make r5 point at end of src + ld $10,-8($5) # load first limb + dsubu $13,$0,$7 + daddu $4,$4,$2 # make r4 point at end of res + daddiu $6,$6,-1 + and $9,$6,4-1 # number of limbs in first loop + beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop + dsrl $2,$10,$13 # compute function result + + dsubu $6,$6,$9 + +.Loop0: ld $3,-16($5) + daddiu $4,$4,-8 + daddiu $5,$5,-8 + daddiu $9,$9,-1 + dsll $11,$10,$7 + dsrl $12,$3,$13 + move $10,$3 + or $8,$11,$12 + bne $9,$0,.Loop0 + sd $8,0($4) + +.L0: beq $6,$0,.Lend + nop + +.Loop: ld $3,-16($5) + daddiu $4,$4,-32 + daddiu $6,$6,-4 + dsll $11,$10,$7 + dsrl $12,$3,$13 + + ld $10,-24($5) + dsll $14,$3,$7 + or $8,$11,$12 + sd $8,24($4) + dsrl $9,$10,$13 + + ld $3,-32($5) + dsll $11,$10,$7 + or $8,$14,$9 + sd $8,16($4) + dsrl $12,$3,$13 + + ld $10,-40($5) + dsll $14,$3,$7 + or $8,$11,$12 + sd $8,8($4) + dsrl $9,$10,$13 + + daddiu $5,$5,-32 + or $8,$14,$9 + bgtz $6,.Loop + sd $8,0($4) + +.Lend: dsll $8,$10,$7 + j $31 + sd $8,-8($4) + .end __mpn_lshift diff --git a/sysdeps/mips/mips3/mul_1.s b/sysdeps/mips/mips3/mul_1.s new file mode 100644 index 0000000000..87954e5bc3 --- /dev/null +++ b/sysdeps/mips/mips3/mul_1.s @@ -0,0 +1,84 @@ + # MIPS3 __mpn_mul_1 -- Multiply a limb vector with a single limb and + # store the product in a second limb vector. + + # Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc. + + # This file is part of the GNU MP Library. + + # The GNU MP Library is free software; you can redistribute it and/or modify + # it under the terms of the GNU Library General Public License as published by + # the Free Software Foundation; either version 2 of the License, or (at your + # option) any later version. + + # The GNU MP 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 Library General Public + # License for more details. + + # You should have received a copy of the GNU Library General Public License + # along with the GNU MP Library; see the file COPYING.LIB. If not, write to + # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + + # INPUT PARAMETERS + # res_ptr $4 + # s1_ptr $5 + # size $6 + # s2_limb $7 + + .text + .align 4 + .globl __mpn_mul_1 + .ent __mpn_mul_1 +__mpn_mul_1: + .set noreorder + .set nomacro + + # warm up phase 0 + ld $8,0($5) + + # warm up phase 1 + daddiu $5,$5,8 + dmultu $8,$7 + + daddiu $6,$6,-1 + beq $6,$0,$LC0 + move $2,$0 # zero cy2 + + daddiu $6,$6,-1 + beq $6,$0,$LC1 + ld $8,0($5) # load new s1 limb as early as possible + +Loop: mflo $10 + mfhi $9 + daddiu $5,$5,8 + daddu $10,$10,$2 # add old carry limb to low product limb + dmultu $8,$7 + ld $8,0($5) # load new s1 limb as early as possible + daddiu $6,$6,-1 # decrement loop counter + sltu $2,$10,$2 # carry from previous addition -> $2 + sd $10,0($4) + daddiu $4,$4,8 + bne $6,$0,Loop # should be "bnel" + daddu $2,$9,$2 # add high product limb and carry from addition + + # cool down phase 1 +$LC1: mflo $10 + mfhi $9 + daddu $10,$10,$2 + sltu $2,$10,$2 + dmultu $8,$7 + sd $10,0($4) + daddiu $4,$4,8 + daddu $2,$9,$2 # add high product limb and carry from addition + + # cool down phase 0 +$LC0: mflo $10 + mfhi $9 + daddu $10,$10,$2 + sltu $2,$10,$2 + sd $10,0($4) + j $31 + daddu $2,$9,$2 # add high product limb and carry from addition + + .end __mpn_mul_1 diff --git a/sysdeps/mips/mips3/rshift.s b/sysdeps/mips/mips3/rshift.s new file mode 100644 index 0000000000..e0e2ca2c5f --- /dev/null +++ b/sysdeps/mips/mips3/rshift.s @@ -0,0 +1,91 @@ + # MIPS3 __mpn_rshift -- + + # Copyright (C) 1995 Free Software Foundation, Inc. + + # This file is part of the GNU MP Library. + + # The GNU MP Library is free software; you can redistribute it and/or modify + # it under the terms of the GNU Library General Public License as published by + # the Free Software Foundation; either version 2 of the License, or (at your + # option) any later version. + + # The GNU MP 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 Library General Public + # License for more details. + + # You should have received a copy of the GNU Library General Public License + # along with the GNU MP Library; see the file COPYING.LIB. If not, write to + # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + + # INPUT PARAMETERS + # res_ptr $4 + # src_ptr $5 + # size $6 + # cnt $7 + + .text + .align 2 + .globl __mpn_rshift + .ent __mpn_rshift +__mpn_rshift: + .set noreorder + .set nomacro + + ld $10,0($5) # load first limb + dsubu $13,$0,$7 + daddiu $6,$6,-1 + and $9,$6,4-1 # number of limbs in first loop + beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop + dsll $2,$10,$13 # compute function result + + dsubu $6,$6,$9 + +.Loop0: ld $3,8($5) + daddiu $4,$4,8 + daddiu $5,$5,8 + daddiu $9,$9,-1 + dsrl $11,$10,$7 + dsll $12,$3,$13 + move $10,$3 + or $8,$11,$12 + bne $9,$0,.Loop0 + sd $8,-8($4) + +.L0: beq $6,$0,.Lend + nop + +.Loop: ld $3,8($5) + daddiu $4,$4,32 + daddiu $6,$6,-4 + dsrl $11,$10,$7 + dsll $12,$3,$13 + + ld $10,16($5) + dsrl $14,$3,$7 + or $8,$11,$12 + sd $8,-32($4) + dsll $9,$10,$13 + + ld $3,24($5) + dsrl $11,$10,$7 + or $8,$14,$9 + sd $8,-24($4) + dsll $12,$3,$13 + + ld $10,32($5) + dsrl $14,$3,$7 + or $8,$11,$12 + sd $8,-16($4) + dsll $9,$10,$13 + + daddiu $5,$5,32 + or $8,$14,$9 + bgtz $6,.Loop + sd $8,-8($4) + +.Lend: dsrl $8,$10,$7 + j $31 + sd $8,0($4) + .end __mpn_rshift diff --git a/sysdeps/mips/mips3/sub_n.s b/sysdeps/mips/mips3/sub_n.s new file mode 100644 index 0000000000..9a45ffde5a --- /dev/null +++ b/sysdeps/mips/mips3/sub_n.s @@ -0,0 +1,119 @@ + # MIPS3 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and + # store difference in a third limb vector. + + # Copyright (C) 1995 Free Software Foundation, Inc. + + # This file is part of the GNU MP Library. + + # The GNU MP Library is free software; you can redistribute it and/or modify + # it under the terms of the GNU Library General Public License as published by + # the Free Software Foundation; either version 2 of the License, or (at your + # option) any later version. + + # The GNU MP 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 Library General Public + # License for more details. + + # You should have received a copy of the GNU Library General Public License + # along with the GNU MP Library; see the file COPYING.LIB. If not, write to + # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + + # INPUT PARAMETERS + # res_ptr $4 + # s1_ptr $5 + # s2_ptr $6 + # size $7 + + .text + .align 2 + .globl __mpn_sub_n + .ent __mpn_sub_n +__mpn_sub_n: + .set noreorder + .set nomacro + + ld $10,0($5) + ld $11,0($6) + + daddiu $7,$7,-1 + and $9,$7,4-1 # number of limbs in first loop + beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop + move $2,$0 + + dsubu $7,$7,$9 + +.Loop0: daddiu $9,$9,-1 + ld $12,8($5) + daddu $11,$11,$2 + ld $13,8($6) + sltu $8,$11,$2 + dsubu $11,$10,$11 + sltu $2,$10,$11 + sd $11,0($4) + or $2,$2,$8 + + daddiu $5,$5,8 + daddiu $6,$6,8 + move $10,$12 + move $11,$13 + bne $9,$0,.Loop0 + daddiu $4,$4,8 + +.L0: beq $7,$0,.Lend + nop + +.Loop: daddiu $7,$7,-4 + + ld $12,8($5) + daddu $11,$11,$2 + ld $13,8($6) + sltu $8,$11,$2 + dsubu $11,$10,$11 + sltu $2,$10,$11 + sd $11,0($4) + or $2,$2,$8 + + ld $10,16($5) + daddu $13,$13,$2 + ld $11,16($6) + sltu $8,$13,$2 + dsubu $13,$12,$13 + sltu $2,$12,$13 + sd $13,8($4) + or $2,$2,$8 + + ld $12,24($5) + daddu $11,$11,$2 + ld $13,24($6) + sltu $8,$11,$2 + dsubu $11,$10,$11 + sltu $2,$10,$11 + sd $11,16($4) + or $2,$2,$8 + + ld $10,32($5) + daddu $13,$13,$2 + ld $11,32($6) + sltu $8,$13,$2 + dsubu $13,$12,$13 + sltu $2,$12,$13 + sd $13,24($4) + or $2,$2,$8 + + daddiu $5,$5,32 + daddiu $6,$6,32 + + bne $7,$0,.Loop + daddiu $4,$4,32 + +.Lend: daddu $11,$11,$2 + sltu $8,$11,$2 + dsubu $11,$10,$11 + sltu $2,$10,$11 + sd $11,0($4) + j $31 + or $2,$2,$8 + + .end __mpn_sub_n diff --git a/sysdeps/mips/mips3/submul_1.s b/sysdeps/mips/mips3/submul_1.s new file mode 100644 index 0000000000..f28c6a5167 --- /dev/null +++ b/sysdeps/mips/mips3/submul_1.s @@ -0,0 +1,96 @@ + # MIPS3 __mpn_submul_1 -- Multiply a limb vector with a single limb and + # subtract the product from a second limb vector. + + # Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc. + + # This file is part of the GNU MP Library. + + # The GNU MP Library is free software; you can redistribute it and/or modify + # it under the terms of the GNU Library General Public License as published by + # the Free Software Foundation; either version 2 of the License, or (at your + # option) any later version. + + # The GNU MP 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 Library General Public + # License for more details. + + # You should have received a copy of the GNU Library General Public License + # along with the GNU MP Library; see the file COPYING.LIB. If not, write to + # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + + # INPUT PARAMETERS + # res_ptr $4 + # s1_ptr $5 + # size $6 + # s2_limb $7 + + .text + .align 4 + .globl __mpn_submul_1 + .ent __mpn_submul_1 +__mpn_submul_1: + .set noreorder + .set nomacro + + # warm up phase 0 + ld $8,0($5) + + # warm up phase 1 + daddiu $5,$5,8 + dmultu $8,$7 + + daddiu $6,$6,-1 + beq $6,$0,$LC0 + move $2,$0 # zero cy2 + + daddiu $6,$6,-1 + beq $6,$0,$LC1 + ld $8,0($5) # load new s1 limb as early as possible + +Loop: ld $10,0($4) + mflo $3 + mfhi $9 + daddiu $5,$5,8 + daddu $3,$3,$2 # add old carry limb to low product limb + dmultu $8,$7 + ld $8,0($5) # load new s1 limb as early as possible + daddiu $6,$6,-1 # decrement loop counter + sltu $2,$3,$2 # carry from previous addition -> $2 + dsubu $3,$10,$3 + sgtu $10,$3,$10 + daddu $2,$2,$10 + sd $3,0($4) + daddiu $4,$4,8 + bne $6,$0,Loop # should be "bnel" + daddu $2,$9,$2 # add high product limb and carry from addition + + # cool down phase 1 +$LC1: ld $10,0($4) + mflo $3 + mfhi $9 + daddu $3,$3,$2 + sltu $2,$3,$2 + dmultu $8,$7 + dsubu $3,$10,$3 + sgtu $10,$3,$10 + daddu $2,$2,$10 + sd $3,0($4) + daddiu $4,$4,8 + daddu $2,$9,$2 # add high product limb and carry from addition + + # cool down phase 0 +$LC0: ld $10,0($4) + mflo $3 + mfhi $9 + daddu $3,$3,$2 + sltu $2,$3,$2 + dsubu $3,$10,$3 + sgtu $10,$3,$10 + daddu $2,$2,$10 + sd $3,0($4) + j $31 + daddu $2,$9,$2 # add high product limb and carry from addition + + .end __mpn_submul_1 diff --git a/sysdeps/mips/mul_1.s b/sysdeps/mips/mul_1.s new file mode 100644 index 0000000000..01327e22d8 --- /dev/null +++ b/sysdeps/mips/mul_1.s @@ -0,0 +1,84 @@ + # MIPS __mpn_mul_1 -- Multiply a limb vector with a single limb and + # store the product in a second limb vector. + + # Copyright (C) 1992, 1994 Free Software Foundation, Inc. + + # This file is part of the GNU MP Library. + + # The GNU MP Library is free software; you can redistribute it and/or modify + # it under the terms of the GNU Library General Public License as published by + # the Free Software Foundation; either version 2 of the License, or (at your + # option) any later version. + + # The GNU MP 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 Library General Public + # License for more details. + + # You should have received a copy of the GNU Library General Public License + # along with the GNU MP Library; see the file COPYING.LIB. If not, write to + # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + + # INPUT PARAMETERS + # res_ptr $4 + # s1_ptr $5 + # size $6 + # s2_limb $7 + + .text + .align 4 + .globl __mpn_mul_1 + .ent __mpn_mul_1 +__mpn_mul_1: + .set noreorder + .set nomacro + + # warm up phase 0 + lw $8,0($5) + + # warm up phase 1 + addiu $5,$5,4 + multu $8,$7 + + addiu $6,$6,-1 + beq $6,$0,$LC0 + move $2,$0 # zero cy2 + + addiu $6,$6,-1 + beq $6,$0,$LC1 + lw $8,0($5) # load new s1 limb as early as possible + +Loop: mflo $10 + mfhi $9 + addiu $5,$5,4 + addu $10,$10,$2 # add old carry limb to low product limb + multu $8,$7 + lw $8,0($5) # load new s1 limb as early as possible + addiu $6,$6,-1 # decrement loop counter + sltu $2,$10,$2 # carry from previous addition -> $2 + sw $10,0($4) + addiu $4,$4,4 + bne $6,$0,Loop # should be "bnel" + addu $2,$9,$2 # add high product limb and carry from addition + + # cool down phase 1 +$LC1: mflo $10 + mfhi $9 + addu $10,$10,$2 + sltu $2,$10,$2 + multu $8,$7 + sw $10,0($4) + addiu $4,$4,4 + addu $2,$9,$2 # add high product limb and carry from addition + + # cool down phase 0 +$LC0: mflo $10 + mfhi $9 + addu $10,$10,$2 + sltu $2,$10,$2 + sw $10,0($4) + j $31 + addu $2,$9,$2 # add high product limb and carry from addition + + .end __mpn_mul_1 diff --git a/sysdeps/mips/rshift.s b/sysdeps/mips/rshift.s new file mode 100644 index 0000000000..6941691373 --- /dev/null +++ b/sysdeps/mips/rshift.s @@ -0,0 +1,91 @@ + # MIPS2 __mpn_rshift -- + + # Copyright (C) 1995 Free Software Foundation, Inc. + + # This file is part of the GNU MP Library. + + # The GNU MP Library is free software; you can redistribute it and/or modify + # it under the terms of the GNU Library General Public License as published by + # the Free Software Foundation; either version 2 of the License, or (at your + # option) any later version. + + # The GNU MP 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 Library General Public + # License for more details. + + # You should have received a copy of the GNU Library General Public License + # along with the GNU MP Library; see the file COPYING.LIB. If not, write to + # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + + # INPUT PARAMETERS + # res_ptr $4 + # src_ptr $5 + # size $6 + # cnt $7 + + .text + .align 2 + .globl __mpn_rshift + .ent __mpn_rshift +__mpn_rshift: + .set noreorder + .set nomacro + + lw $10,0($5) # load first limb + subu $13,$0,$7 + addiu $6,$6,-1 + and $9,$6,4-1 # number of limbs in first loop + beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop + sll $2,$10,$13 # compute function result + + subu $6,$6,$9 + +.Loop0: lw $3,4($5) + addiu $4,$4,4 + addiu $5,$5,4 + addiu $9,$9,-1 + srl $11,$10,$7 + sll $12,$3,$13 + move $10,$3 + or $8,$11,$12 + bne $9,$0,.Loop0 + sw $8,-4($4) + +.L0: beq $6,$0,.Lend + nop + +.Loop: lw $3,4($5) + addiu $4,$4,16 + addiu $6,$6,-4 + srl $11,$10,$7 + sll $12,$3,$13 + + lw $10,8($5) + srl $14,$3,$7 + or $8,$11,$12 + sw $8,-16($4) + sll $9,$10,$13 + + lw $3,12($5) + srl $11,$10,$7 + or $8,$14,$9 + sw $8,-12($4) + sll $12,$3,$13 + + lw $10,16($5) + srl $14,$3,$7 + or $8,$11,$12 + sw $8,-8($4) + sll $9,$10,$13 + + addiu $5,$5,16 + or $8,$14,$9 + bgtz $6,.Loop + sw $8,-4($4) + +.Lend: srl $8,$10,$7 + j $31 + sw $8,0($4) + .end __mpn_rshift diff --git a/sysdeps/mips/sub_n.s b/sysdeps/mips/sub_n.s new file mode 100644 index 0000000000..63f3b55354 --- /dev/null +++ b/sysdeps/mips/sub_n.s @@ -0,0 +1,119 @@ + # MIPS2 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and + # store difference in a third limb vector. + + # Copyright (C) 1995 Free Software Foundation, Inc. + + # This file is part of the GNU MP Library. + + # The GNU MP Library is free software; you can redistribute it and/or modify + # it under the terms of the GNU Library General Public License as published by + # the Free Software Foundation; either version 2 of the License, or (at your + # option) any later version. + + # The GNU MP 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 Library General Public + # License for more details. + + # You should have received a copy of the GNU Library General Public License + # along with the GNU MP Library; see the file COPYING.LIB. If not, write to + # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + + # INPUT PARAMETERS + # res_ptr $4 + # s1_ptr $5 + # s2_ptr $6 + # size $7 + + .text + .align 2 + .globl __mpn_sub_n + .ent __mpn_sub_n +__mpn_sub_n: + .set noreorder + .set nomacro + + lw $10,0($5) + lw $11,0($6) + + addiu $7,$7,-1 + and $9,$7,4-1 # number of limbs in first loop + beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop + move $2,$0 + + subu $7,$7,$9 + +.Loop0: addiu $9,$9,-1 + lw $12,4($5) + addu $11,$11,$2 + lw $13,4($6) + sltu $8,$11,$2 + subu $11,$10,$11 + sltu $2,$10,$11 + sw $11,0($4) + or $2,$2,$8 + + addiu $5,$5,4 + addiu $6,$6,4 + move $10,$12 + move $11,$13 + bne $9,$0,.Loop0 + addiu $4,$4,4 + +.L0: beq $7,$0,.Lend + nop + +.Loop: addiu $7,$7,-4 + + lw $12,4($5) + addu $11,$11,$2 + lw $13,4($6) + sltu $8,$11,$2 + subu $11,$10,$11 + sltu $2,$10,$11 + sw $11,0($4) + or $2,$2,$8 + + lw $10,8($5) + addu $13,$13,$2 + lw $11,8($6) + sltu $8,$13,$2 + subu $13,$12,$13 + sltu $2,$12,$13 + sw $13,4($4) + or $2,$2,$8 + + lw $12,12($5) + addu $11,$11,$2 + lw $13,12($6) + sltu $8,$11,$2 + subu $11,$10,$11 + sltu $2,$10,$11 + sw $11,8($4) + or $2,$2,$8 + + lw $10,16($5) + addu $13,$13,$2 + lw $11,16($6) + sltu $8,$13,$2 + subu $13,$12,$13 + sltu $2,$12,$13 + sw $13,12($4) + or $2,$2,$8 + + addiu $5,$5,16 + addiu $6,$6,16 + + bne $7,$0,.Loop + addiu $4,$4,16 + +.Lend: addu $11,$11,$2 + sltu $8,$11,$2 + subu $11,$10,$11 + sltu $2,$10,$11 + sw $11,0($4) + j $31 + or $2,$2,$8 + + .end __mpn_sub_n diff --git a/sysdeps/mips/submul_1.s b/sysdeps/mips/submul_1.s new file mode 100644 index 0000000000..616dd1b47c --- /dev/null +++ b/sysdeps/mips/submul_1.s @@ -0,0 +1,96 @@ + # MIPS __mpn_submul_1 -- Multiply a limb vector with a single limb and + # subtract the product from a second limb vector. + + # Copyright (C) 1992, 1994 Free Software Foundation, Inc. + + # This file is part of the GNU MP Library. + + # The GNU MP Library is free software; you can redistribute it and/or modify + # it under the terms of the GNU Library General Public License as published by + # the Free Software Foundation; either version 2 of the License, or (at your + # option) any later version. + + # The GNU MP 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 Library General Public + # License for more details. + + # You should have received a copy of the GNU Library General Public License + # along with the GNU MP Library; see the file COPYING.LIB. If not, write to + # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + + # INPUT PARAMETERS + # res_ptr $4 + # s1_ptr $5 + # size $6 + # s2_limb $7 + + .text + .align 4 + .globl __mpn_submul_1 + .ent __mpn_submul_1 +__mpn_submul_1: + .set noreorder + .set nomacro + + # warm up phase 0 + lw $8,0($5) + + # warm up phase 1 + addiu $5,$5,4 + multu $8,$7 + + addiu $6,$6,-1 + beq $6,$0,$LC0 + move $2,$0 # zero cy2 + + addiu $6,$6,-1 + beq $6,$0,$LC1 + lw $8,0($5) # load new s1 limb as early as possible + +Loop: lw $10,0($4) + mflo $3 + mfhi $9 + addiu $5,$5,4 + addu $3,$3,$2 # add old carry limb to low product limb + multu $8,$7 + lw $8,0($5) # load new s1 limb as early as possible + addiu $6,$6,-1 # decrement loop counter + sltu $2,$3,$2 # carry from previous addition -> $2 + subu $3,$10,$3 + sgtu $10,$3,$10 + addu $2,$2,$10 + sw $3,0($4) + addiu $4,$4,4 + bne $6,$0,Loop # should be "bnel" + addu $2,$9,$2 # add high product limb and carry from addition + + # cool down phase 1 +$LC1: lw $10,0($4) + mflo $3 + mfhi $9 + addu $3,$3,$2 + sltu $2,$3,$2 + multu $8,$7 + subu $3,$10,$3 + sgtu $10,$3,$10 + addu $2,$2,$10 + sw $3,0($4) + addiu $4,$4,4 + addu $2,$9,$2 # add high product limb and carry from addition + + # cool down phase 0 +$LC0: lw $10,0($4) + mflo $3 + mfhi $9 + addu $3,$3,$2 + sltu $2,$3,$2 + subu $3,$10,$3 + sgtu $10,$3,$10 + addu $2,$2,$10 + sw $3,0($4) + j $31 + addu $2,$9,$2 # add high product limb and carry from addition + + .end __mpn_submul_1 diff --git a/sysdeps/rs6000/add_n.s b/sysdeps/rs6000/add_n.s new file mode 100644 index 0000000000..34ad9e1d2d --- /dev/null +++ b/sysdeps/rs6000/add_n.s @@ -0,0 +1,54 @@ +# IBM POWER __mpn_add_n -- Add two limb vectors of equal, non-zero length. + +# Copyright (C) 1992, 1994 Free Software Foundation, Inc. + +# This file is part of the GNU MP Library. + +# The GNU MP Library is free software; you can redistribute it and/or modify +# it under the terms of the GNU Library General Public License as published by +# the Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. + +# The GNU MP 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 Library General Public +# License for more details. + +# You should have received a copy of the GNU Library General Public License +# along with the GNU MP Library; see the file COPYING.LIB. If not, write to +# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + +# INPUT PARAMETERS +# res_ptr r3 +# s1_ptr r4 +# s2_ptr r5 +# size r6 + + .toc + .extern __mpn_add_n[DS] + .extern .__mpn_add_n +.csect [PR] + .align 2 + .globl __mpn_add_n + .globl .__mpn_add_n + .csect __mpn_add_n[DS] +__mpn_add_n: + .long .__mpn_add_n, TOC[tc0], 0 + .csect [PR] +.__mpn_add_n: + mtctr 6 # copy size into CTR + l 8,0(4) # load least significant s1 limb + l 0,0(5) # load least significant s2 limb + cal 3,-4(3) # offset res_ptr, it's updated before used + a 7,0,8 # add least significant limbs, set cy + bdz Lend # If done, skip loop +Loop: lu 8,4(4) # load s1 limb and update s1_ptr + lu 0,4(5) # load s2 limb and update s2_ptr + stu 7,4(3) # store previous limb in load latecny slot + ae 7,0,8 # add new limbs with cy, set cy + bdn Loop # decrement CTR and loop back +Lend: st 7,4(3) # store ultimate result limb + lil 3,0 # load cy into ... + aze 3,3 # ... return value register + br diff --git a/sysdeps/rs6000/addmul_1.s b/sysdeps/rs6000/addmul_1.s new file mode 100644 index 0000000000..862b6139fe --- /dev/null +++ b/sysdeps/rs6000/addmul_1.s @@ -0,0 +1,122 @@ +# IBM POWER __mpn_addmul_1 -- Multiply a limb vector with a limb and add +# the result to a second limb vector. + +# Copyright (C) 1992, 1994 Free Software Foundation, Inc. + +# This file is part of the GNU MP Library. + +# The GNU MP Library is free software; you can redistribute it and/or modify +# it under the terms of the GNU Library General Public License as published by +# the Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. + +# The GNU MP 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 Library General Public +# License for more details. + +# You should have received a copy of the GNU Library General Public License +# along with the GNU MP Library; see the file COPYING.LIB. If not, write to +# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + +# INPUT PARAMETERS +# res_ptr r3 +# s1_ptr r4 +# size r5 +# s2_limb r6 + +# The RS/6000 has no unsigned 32x32->64 bit multiplication instruction. To +# obtain that operation, we have to use the 32x32->64 signed multiplication +# instruction, and add the appropriate compensation to the high limb of the +# result. We add the multiplicand if the multiplier has its most significant +# bit set, and we add the multiplier if the multiplicand has its most +# significant bit set. We need to preserve the carry flag between each +# iteration, so we have to compute the compensation carefully (the natural, +# srai+and doesn't work). Since the POWER architecture has a branch unit +# we can branch in zero cycles, so that's how we perform the additions. + + .toc + .csect .__mpn_addmul_1[PR] + .align 2 + .globl __mpn_addmul_1 + .globl .__mpn_addmul_1 + .csect __mpn_addmul_1[DS] +__mpn_addmul_1: + .long .__mpn_addmul_1[PR], TOC[tc0], 0 + .csect .__mpn_addmul_1[PR] +.__mpn_addmul_1: + + cal 3,-4(3) + l 0,0(4) + cmpi 0,6,0 + mtctr 5 + mul 9,0,6 + srai 7,0,31 + and 7,7,6 + mfmq 8 + cax 9,9,7 + l 7,4(3) + a 8,8,7 # add res_limb + blt Lneg +Lpos: bdz Lend + +Lploop: lu 0,4(4) + stu 8,4(3) + cmpi 0,0,0 + mul 10,0,6 + mfmq 0 + ae 8,0,9 # low limb + old_cy_limb + old cy + l 7,4(3) + aze 10,10 # propagate cy to new cy_limb + a 8,8,7 # add res_limb + bge Lp0 + cax 10,10,6 # adjust high limb for negative limb from s1 +Lp0: bdz Lend0 + lu 0,4(4) + stu 8,4(3) + cmpi 0,0,0 + mul 9,0,6 + mfmq 0 + ae 8,0,10 + l 7,4(3) + aze 9,9 + a 8,8,7 + bge Lp1 + cax 9,9,6 # adjust high limb for negative limb from s1 +Lp1: bdn Lploop + + b Lend + +Lneg: cax 9,9,0 + bdz Lend +Lnloop: lu 0,4(4) + stu 8,4(3) + cmpi 0,0,0 + mul 10,0,6 + mfmq 7 + ae 8,7,9 + l 7,4(3) + ae 10,10,0 # propagate cy to new cy_limb + a 8,8,7 # add res_limb + bge Ln0 + cax 10,10,6 # adjust high limb for negative limb from s1 +Ln0: bdz Lend0 + lu 0,4(4) + stu 8,4(3) + cmpi 0,0,0 + mul 9,0,6 + mfmq 7 + ae 8,7,10 + l 7,4(3) + ae 9,9,0 # propagate cy to new cy_limb + a 8,8,7 # add res_limb + bge Ln1 + cax 9,9,6 # adjust high limb for negative limb from s1 +Ln1: bdn Lnloop + b Lend + +Lend0: cal 9,0(10) +Lend: st 8,4(3) + aze 3,9 + br diff --git a/sysdeps/rs6000/lshift.s b/sysdeps/rs6000/lshift.s new file mode 100644 index 0000000000..69c7502061 --- /dev/null +++ b/sysdeps/rs6000/lshift.s @@ -0,0 +1,58 @@ +# IBM POWER __mpn_lshift -- + +# Copyright (C) 1992, 1994 Free Software Foundation, Inc. + +# This file is part of the GNU MP Library. + +# The GNU MP Library is free software; you can redistribute it and/or modify +# it under the terms of the GNU Library General Public License as published by +# the Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. + +# The GNU MP 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 Library General Public +# License for more details. + +# You should have received a copy of the GNU Library General Public License +# along with the GNU MP Library; see the file COPYING.LIB. If not, write to +# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + +# INPUT PARAMETERS +# res_ptr r3 +# s_ptr r4 +# size r5 +# cnt r6 + + .toc + .extern __mpn_lshift[DS] + .extern .__mpn_lshift +.csect [PR] + .align 2 + .globl __mpn_lshift + .globl .__mpn_lshift + .csect __mpn_lshift[DS] +__mpn_lshift: + .long .__mpn_lshift, TOC[tc0], 0 + .csect [PR] +.__mpn_lshift: + sli 0,5,2 + cax 9,3,0 + cax 4,4,0 + sfi 8,6,32 + mtctr 5 # put limb count in CTR loop register + lu 0,-4(4) # read most significant limb + sre 3,0,8 # compute carry out limb, and init MQ register + bdz Lend2 # if just one limb, skip loop + lu 0,-4(4) # read 2:nd most significant limb + sreq 7,0,8 # compute most significant limb of result + bdz Lend # if just two limb, skip loop +Loop: lu 0,-4(4) # load next lower limb + stu 7,-4(9) # store previous result during read latency + sreq 7,0,8 # compute result limb + bdn Loop # loop back until CTR is zero +Lend: stu 7,-4(9) # store 2:nd least significant limb +Lend2: sle 7,0,6 # compute least significant limb + st 7,-4(9) # store it" \ + br diff --git a/sysdeps/rs6000/mul_1.s b/sysdeps/rs6000/mul_1.s new file mode 100644 index 0000000000..f4fa894339 --- /dev/null +++ b/sysdeps/rs6000/mul_1.s @@ -0,0 +1,109 @@ +# IBM POWER __mpn_mul_1 -- Multiply a limb vector with a limb and store +# the result in a second limb vector. + +# Copyright (C) 1992, 1994 Free Software Foundation, Inc. + +# This file is part of the GNU MP Library. + +# The GNU MP Library is free software; you can redistribute it and/or modify +# it under the terms of the GNU Library General Public License as published by +# the Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. + +# The GNU MP 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 Library General Public +# License for more details. + +# You should have received a copy of the GNU Library General Public License +# along with the GNU MP Library; see the file COPYING.LIB. If not, write to +# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + +# INPUT PARAMETERS +# res_ptr r3 +# s1_ptr r4 +# size r5 +# s2_limb r6 + +# The RS/6000 has no unsigned 32x32->64 bit multiplication instruction. To +# obtain that operation, we have to use the 32x32->64 signed multiplication +# instruction, and add the appropriate compensation to the high limb of the +# result. We add the multiplicand if the multiplier has its most significant +# bit set, and we add the multiplier if the multiplicand has its most +# significant bit set. We need to preserve the carry flag between each +# iteration, so we have to compute the compensation carefully (the natural, +# srai+and doesn't work). Since the POWER architecture has a branch unit +# we can branch in zero cycles, so that's how we perform the additions. + + .toc + .csect .__mpn_mul_1[PR] + .align 2 + .globl __mpn_mul_1 + .globl .__mpn_mul_1 + .csect __mpn_mul_1[DS] +__mpn_mul_1: + .long .__mpn_mul_1[PR], TOC[tc0], 0 + .csect .__mpn_mul_1[PR] +.__mpn_mul_1: + + cal 3,-4(3) + l 0,0(4) + cmpi 0,6,0 + mtctr 5 + mul 9,0,6 + srai 7,0,31 + and 7,7,6 + mfmq 8 + ai 0,0,0 # reset carry + cax 9,9,7 + blt Lneg +Lpos: bdz Lend +Lploop: lu 0,4(4) + stu 8,4(3) + cmpi 0,0,0 + mul 10,0,6 + mfmq 0 + ae 8,0,9 + bge Lp0 + cax 10,10,6 # adjust high limb for negative limb from s1 +Lp0: bdz Lend0 + lu 0,4(4) + stu 8,4(3) + cmpi 0,0,0 + mul 9,0,6 + mfmq 0 + ae 8,0,10 + bge Lp1 + cax 9,9,6 # adjust high limb for negative limb from s1 +Lp1: bdn Lploop + b Lend + +Lneg: cax 9,9,0 + bdz Lend +Lnloop: lu 0,4(4) + stu 8,4(3) + cmpi 0,0,0 + mul 10,0,6 + cax 10,10,0 # adjust high limb for negative s2_limb + mfmq 0 + ae 8,0,9 + bge Ln0 + cax 10,10,6 # adjust high limb for negative limb from s1 +Ln0: bdz Lend0 + lu 0,4(4) + stu 8,4(3) + cmpi 0,0,0 + mul 9,0,6 + cax 9,9,0 # adjust high limb for negative s2_limb + mfmq 0 + ae 8,0,10 + bge Ln1 + cax 9,9,6 # adjust high limb for negative limb from s1 +Ln1: bdn Lnloop + b Lend + +Lend0: cal 9,0(10) +Lend: st 8,4(3) + aze 3,9 + br diff --git a/sysdeps/rs6000/rshift.s b/sysdeps/rs6000/rshift.s new file mode 100644 index 0000000000..6056acc753 --- /dev/null +++ b/sysdeps/rs6000/rshift.s @@ -0,0 +1,56 @@ +# IBM POWER __mpn_rshift -- + +# Copyright (C) 1992, 1994 Free Software Foundation, Inc. + +# This file is part of the GNU MP Library. + +# The GNU MP Library is free software; you can redistribute it and/or modify +# it under the terms of the GNU Library General Public License as published by +# the Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. + +# The GNU MP 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 Library General Public +# License for more details. + +# You should have received a copy of the GNU Library General Public License +# along with the GNU MP Library; see the file COPYING.LIB. If not, write to +# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + +# INPUT PARAMETERS +# res_ptr r3 +# s_ptr r4 +# size r5 +# cnt r6 + + .toc + .extern __mpn_rshift[DS] + .extern .__mpn_rshift +.csect [PR] + .align 2 + .globl __mpn_rshift + .globl .__mpn_rshift + .csect __mpn_rshift[DS] +__mpn_rshift: + .long .__mpn_rshift, TOC[tc0], 0 + .csect [PR] +.__mpn_rshift: + sfi 8,6,32 + mtctr 5 # put limb count in CTR loop register + l 0,0(4) # read least significant limb + ai 9,3,-4 # adjust res_ptr since it's offset in the stu:s + sle 3,0,8 # compute carry limb, and init MQ register + bdz Lend2 # if just one limb, skip loop + lu 0,4(4) # read 2:nd least significant limb + sleq 7,0,8 # compute least significant limb of result + bdz Lend # if just two limb, skip loop +Loop: lu 0,4(4) # load next higher limb + stu 7,4(9) # store previous result during read latency + sleq 7,0,8 # compute result limb + bdn Loop # loop back until CTR is zero +Lend: stu 7,4(9) # store 2:nd most significant limb +Lend2: sre 7,0,6 # compute most significant limb + st 7,4(9) # store it" \ + br diff --git a/sysdeps/rs6000/sub_n.s b/sysdeps/rs6000/sub_n.s new file mode 100644 index 0000000000..402fdcefc4 --- /dev/null +++ b/sysdeps/rs6000/sub_n.s @@ -0,0 +1,55 @@ +# IBM POWER __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and +# store difference in a third limb vector. + +# Copyright (C) 1992, 1994 Free Software Foundation, Inc. + +# This file is part of the GNU MP Library. + +# The GNU MP Library is free software; you can redistribute it and/or modify +# it under the terms of the GNU Library General Public License as published by +# the Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. + +# The GNU MP 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 Library General Public +# License for more details. + +# You should have received a copy of the GNU Library General Public License +# along with the GNU MP Library; see the file COPYING.LIB. If not, write to +# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + +# INPUT PARAMETERS +# res_ptr r3 +# s1_ptr r4 +# s2_ptr r5 +# size r6 + + .toc + .extern __mpn_sub_n[DS] + .extern .__mpn_sub_n +.csect [PR] + .align 2 + .globl __mpn_sub_n + .globl .__mpn_sub_n + .csect __mpn_sub_n[DS] +__mpn_sub_n: + .long .__mpn_sub_n, TOC[tc0], 0 + .csect [PR] +.__mpn_sub_n: + mtctr 6 # copy size into CTR + l 8,0(4) # load least significant s1 limb + l 0,0(5) # load least significant s2 limb + cal 3,-4(3) # offset res_ptr, it's updated before used + sf 7,0,8 # add least significant limbs, set cy + bdz Lend # If done, skip loop +Loop: lu 8,4(4) # load s1 limb and update s1_ptr + lu 0,4(5) # load s2 limb and update s2_ptr + stu 7,4(3) # store previous limb in load latecny slot + sfe 7,0,8 # add new limbs with cy, set cy + bdn Loop # decrement CTR and loop back +Lend: st 7,4(3) # store ultimate result limb + sfe 3,0,0 # load !cy into ... + sfi 3,3,0 # ... return value register + br diff --git a/sysdeps/rs6000/submul_1.s b/sysdeps/rs6000/submul_1.s new file mode 100644 index 0000000000..252633261d --- /dev/null +++ b/sysdeps/rs6000/submul_1.s @@ -0,0 +1,127 @@ +# IBM POWER __mpn_submul_1 -- Multiply a limb vector with a limb and subtract +# the result from a second limb vector. + +# Copyright (C) 1992, 1994 Free Software Foundation, Inc. + +# This file is part of the GNU MP Library. + +# The GNU MP Library is free software; you can redistribute it and/or modify +# it under the terms of the GNU Library General Public License as published by +# the Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. + +# The GNU MP 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 Library General Public +# License for more details. + +# You should have received a copy of the GNU Library General Public License +# along with the GNU MP Library; see the file COPYING.LIB. If not, write to +# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + +# INPUT PARAMETERS +# res_ptr r3 +# s1_ptr r4 +# size r5 +# s2_limb r6 + +# The RS/6000 has no unsigned 32x32->64 bit multiplication instruction. To +# obtain that operation, we have to use the 32x32->64 signed multiplication +# instruction, and add the appropriate compensation to the high limb of the +# result. We add the multiplicand if the multiplier has its most significant +# bit set, and we add the multiplier if the multiplicand has its most +# significant bit set. We need to preserve the carry flag between each +# iteration, so we have to compute the compensation carefully (the natural, +# srai+and doesn't work). Since the POWER architecture has a branch unit +# we can branch in zero cycles, so that's how we perform the additions. + + .toc + .csect .__mpn_submul_1[PR] + .align 2 + .globl __mpn_submul_1 + .globl .__mpn_submul_1 + .csect __mpn_submul_1[DS] +__mpn_submul_1: + .long .__mpn_submul_1[PR], TOC[tc0], 0 + .csect .__mpn_submul_1[PR] +.__mpn_submul_1: + + cal 3,-4(3) + l 0,0(4) + cmpi 0,6,0 + mtctr 5 + mul 9,0,6 + srai 7,0,31 + and 7,7,6 + mfmq 11 + cax 9,9,7 + l 7,4(3) + sf 8,11,7 # add res_limb + a 11,8,11 # invert cy (r11 is junk) + blt Lneg +Lpos: bdz Lend + +Lploop: lu 0,4(4) + stu 8,4(3) + cmpi 0,0,0 + mul 10,0,6 + mfmq 0 + ae 11,0,9 # low limb + old_cy_limb + old cy + l 7,4(3) + aze 10,10 # propagate cy to new cy_limb + sf 8,11,7 # add res_limb + a 11,8,11 # invert cy (r11 is junk) + bge Lp0 + cax 10,10,6 # adjust high limb for negative limb from s1 +Lp0: bdz Lend0 + lu 0,4(4) + stu 8,4(3) + cmpi 0,0,0 + mul 9,0,6 + mfmq 0 + ae 11,0,10 + l 7,4(3) + aze 9,9 + sf 8,11,7 + a 11,8,11 # invert cy (r11 is junk) + bge Lp1 + cax 9,9,6 # adjust high limb for negative limb from s1 +Lp1: bdn Lploop + + b Lend + +Lneg: cax 9,9,0 + bdz Lend +Lnloop: lu 0,4(4) + stu 8,4(3) + cmpi 0,0,0 + mul 10,0,6 + mfmq 7 + ae 11,7,9 + l 7,4(3) + ae 10,10,0 # propagate cy to new cy_limb + sf 8,11,7 # add res_limb + a 11,8,11 # invert cy (r11 is junk) + bge Ln0 + cax 10,10,6 # adjust high limb for negative limb from s1 +Ln0: bdz Lend0 + lu 0,4(4) + stu 8,4(3) + cmpi 0,0,0 + mul 9,0,6 + mfmq 7 + ae 11,7,10 + l 7,4(3) + ae 9,9,0 # propagate cy to new cy_limb + sf 8,11,7 # add res_limb + a 11,8,11 # invert cy (r11 is junk) + bge Ln1 + cax 9,9,6 # adjust high limb for negative limb from s1 +Ln1: bdn Lnloop + b Lend + +Lend0: cal 9,0(10) +Lend: st 8,4(3) + aze 3,9 + br diff --git a/sysdeps/vax/add_n.s b/sysdeps/vax/add_n.s new file mode 100644 index 0000000000..c89b226051 --- /dev/null +++ b/sysdeps/vax/add_n.s @@ -0,0 +1,47 @@ +# VAX __mpn_add_n -- Add two limb vectors of the same length > 0 and store +# sum in a third limb vector. + +# Copyright (C) 1992, 1994 Free Software Foundation, Inc. + +# This file is part of the GNU MP Library. + +# The GNU MP Library is free software; you can redistribute it and/or modify +# it under the terms of the GNU Library General Public License as published by +# the Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. + +# The GNU MP 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 Library General Public +# License for more details. + +# You should have received a copy of the GNU Library General Public License +# along with the GNU MP Library; see the file COPYING.LIB. If not, write to +# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + +# INPUT PARAMETERS +# res_ptr (sp + 4) +# s1_ptr (sp + 8) +# s2_ptr (sp + 12) +# size (sp + 16) + +.text + .align 1 +.globl ___mpn_add_n +___mpn_add_n: + .word 0x0 + movl 16(ap),r0 + movl 12(ap),r1 + movl 8(ap),r2 + movl 4(ap),r3 + subl2 r4,r4 + +Loop: + movl (r2)+,r4 + adwc (r1)+,r4 + movl r4,(r3)+ + jsobgtr r0,Loop + + adwc r0,r0 + ret diff --git a/sysdeps/vax/addmul_1.s b/sysdeps/vax/addmul_1.s new file mode 100644 index 0000000000..8e83204b81 --- /dev/null +++ b/sysdeps/vax/addmul_1.s @@ -0,0 +1,125 @@ +# VAX __mpn_addmul_1 -- Multiply a limb vector with a limb and add +# the result to a second limb vector. + +# Copyright (C) 1992, 1994 Free Software Foundation, Inc. + +# This file is part of the GNU MP Library. + +# The GNU MP Library is free software; you can redistribute it and/or modify +# it under the terms of the GNU Library General Public License as published by +# the Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. + +# The GNU MP 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 Library General Public +# License for more details. + +# You should have received a copy of the GNU Library General Public License +# along with the GNU MP Library; see the file COPYING.LIB. If not, write to +# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + +# INPUT PARAMETERS +# res_ptr (sp + 4) +# s1_ptr (sp + 8) +# size (sp + 12) +# s2_limb (sp + 16) + +.text + .align 1 +.globl ___mpn_addmul_1 +___mpn_addmul_1: + .word 0xfc0 + movl 12(ap),r4 + movl 8(ap),r8 + movl 4(ap),r9 + movl 16(ap),r6 + jlss s2_big + + clrl r3 + incl r4 + ashl $-1,r4,r7 + jlbc r4,L1 + clrl r11 + +# Loop for S2_LIMB < 0x80000000 +Loop1: movl (r8)+,r1 + jlss L1n0 + emul r1,r6,$0,r2 + addl2 r11,r2 + adwc $0,r3 + addl2 r2,(r9)+ + adwc $0,r3 +L1: movl (r8)+,r1 + jlss L1n1 +L1p1: emul r1,r6,$0,r10 + addl2 r3,r10 + adwc $0,r11 + addl2 r10,(r9)+ + adwc $0,r11 + + jsobgtr r7,Loop1 + movl r11,r0 + ret + +L1n0: emul r1,r6,$0,r2 + addl2 r11,r2 + adwc r6,r3 + addl2 r2,(r9)+ + adwc $0,r3 + movl (r8)+,r1 + jgeq L1p1 +L1n1: emul r1,r6,$0,r10 + addl2 r3,r10 + adwc r6,r11 + addl2 r10,(r9)+ + adwc $0,r11 + + jsobgtr r7,Loop1 + movl r11,r0 + ret + + +s2_big: clrl r3 + incl r4 + ashl $-1,r4,r7 + jlbc r4,L2 + clrl r11 + +# Loop for S2_LIMB >= 0x80000000 +Loop2: movl (r8)+,r1 + jlss L2n0 + emul r1,r6,$0,r2 + addl2 r11,r2 + adwc r1,r3 + addl2 r2,(r9)+ + adwc $0,r3 +L2: movl (r8)+,r1 + jlss L2n1 +L2p1: emul r1,r6,$0,r10 + addl2 r3,r10 + adwc r1,r11 + addl2 r10,(r9)+ + adwc $0,r11 + + jsobgtr r7,Loop2 + movl r11,r0 + ret + +L2n0: emul r1,r6,$0,r2 + addl2 r11,r2 + adwc r6,r3 + addl2 r2,(r9)+ + adwc r1,r3 + movl (r8)+,r1 + jgeq L2p1 +L2n1: emul r1,r6,$0,r10 + addl2 r3,r10 + adwc r6,r11 + addl2 r10,(r9)+ + adwc r1,r11 + + jsobgtr r7,Loop2 + movl r11,r0 + ret diff --git a/sysdeps/vax/mul_1.s b/sysdeps/vax/mul_1.s new file mode 100644 index 0000000000..3fe375bacf --- /dev/null +++ b/sysdeps/vax/mul_1.s @@ -0,0 +1,122 @@ +# VAX __mpn_mul_1 -- Multiply a limb vector with a limb and store +# the result in a second limb vector. + +# Copyright (C) 1992, 1994 Free Software Foundation, Inc. + +# This file is part of the GNU MP Library. + +# The GNU MP Library is free software; you can redistribute it and/or modify +# it under the terms of the GNU Library General Public License as published by +# the Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. + +# The GNU MP 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 Library General Public +# License for more details. + +# You should have received a copy of the GNU Library General Public License +# along with the GNU MP Library; see the file COPYING.LIB. If not, write to +# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + +# INPUT PARAMETERS +# res_ptr (sp + 4) +# s1_ptr (sp + 8) +# size (sp + 12) +# s2_limb (sp + 16) + +.text + .align 1 +.globl ___mpn_mul_1 +___mpn_mul_1: + .word 0xfc0 + movl 12(ap),r4 + movl 8(ap),r8 + movl 4(ap),r9 + movl 16(ap),r6 + jlss s2_big + +# One might want to combine the addl2 and the store below, but that +# is actually just slower according to my timing tests. (VAX 3600) + + clrl r3 + incl r4 + ashl $-1,r4,r7 + jlbc r4,L1 + clrl r11 + +# Loop for S2_LIMB < 0x80000000 +Loop1: movl (r8)+,r1 + jlss L1n0 + emul r1,r6,$0,r2 + addl2 r11,r2 + adwc $0,r3 + movl r2,(r9)+ +L1: movl (r8)+,r1 + jlss L1n1 +L1p1: emul r1,r6,$0,r10 + addl2 r3,r10 + adwc $0,r11 + movl r10,(r9)+ + + jsobgtr r7,Loop1 + movl r11,r0 + ret + +L1n0: emul r1,r6,$0,r2 + addl2 r11,r2 + adwc r6,r3 + movl r2,(r9)+ + movl (r8)+,r1 + jgeq L1p1 +L1n1: emul r1,r6,$0,r10 + addl2 r3,r10 + adwc r6,r11 + movl r10,(r9)+ + + jsobgtr r7,Loop1 + movl r11,r0 + ret + + +s2_big: clrl r3 + incl r4 + ashl $-1,r4,r7 + jlbc r4,L2 + clrl r11 + +# Loop for S2_LIMB >= 0x80000000 +Loop2: movl (r8)+,r1 + jlss L2n0 + emul r1,r6,$0,r2 + addl2 r11,r2 + adwc r1,r3 + movl r2,(r9)+ +L2: movl (r8)+,r1 + jlss L2n1 +L2p1: emul r1,r6,$0,r10 + addl2 r3,r10 + adwc r1,r11 + movl r10,(r9)+ + + jsobgtr r7,Loop2 + movl r11,r0 + ret + +L2n0: emul r1,r6,$0,r2 + addl2 r1,r3 + addl2 r11,r2 + adwc r6,r3 + movl r2,(r9)+ + movl (r8)+,r1 + jgeq L2p1 +L2n1: emul r1,r6,$0,r10 + addl2 r1,r11 + addl2 r3,r10 + adwc r6,r11 + movl r10,(r9)+ + + jsobgtr r7,Loop2 + movl r11,r0 + ret diff --git a/sysdeps/vax/sub_n.s b/sysdeps/vax/sub_n.s new file mode 100644 index 0000000000..300b4dee8f --- /dev/null +++ b/sysdeps/vax/sub_n.s @@ -0,0 +1,47 @@ +# VAX __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and store +# difference in a third limb vector. + +# Copyright (C) 1992, 1994 Free Software Foundation, Inc. + +# This file is part of the GNU MP Library. + +# The GNU MP Library is free software; you can redistribute it and/or modify +# it under the terms of the GNU Library General Public License as published by +# the Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. + +# The GNU MP 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 Library General Public +# License for more details. + +# You should have received a copy of the GNU Library General Public License +# along with the GNU MP Library; see the file COPYING.LIB. If not, write to +# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + +# INPUT PARAMETERS +# res_ptr (sp + 4) +# s1_ptr (sp + 8) +# s2_ptr (sp + 12) +# size (sp + 16) + +.text + .align 1 +.globl ___mpn_sub_n +___mpn_sub_n: + .word 0x0 + movl 16(ap),r0 + movl 12(ap),r1 + movl 8(ap),r2 + movl 4(ap),r3 + subl2 r4,r4 + +Loop: + movl (r2)+,r4 + sbwc (r1)+,r4 + movl r4,(r3)+ + jsobgtr r0,Loop + + adwc r0,r0 + ret diff --git a/sysdeps/vax/submul_1.s b/sysdeps/vax/submul_1.s new file mode 100644 index 0000000000..875cbfd651 --- /dev/null +++ b/sysdeps/vax/submul_1.s @@ -0,0 +1,125 @@ +# VAX __mpn_submul_1 -- Multiply a limb vector with a limb and subtract +# the result from a second limb vector. + +# Copyright (C) 1992, 1994 Free Software Foundation, Inc. + +# This file is part of the GNU MP Library. + +# The GNU MP Library is free software; you can redistribute it and/or modify +# it under the terms of the GNU Library General Public License as published by +# the Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. + +# The GNU MP 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 Library General Public +# License for more details. + +# You should have received a copy of the GNU Library General Public License +# along with the GNU MP Library; see the file COPYING.LIB. If not, write to +# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + +# INPUT PARAMETERS +# res_ptr (sp + 4) +# s1_ptr (sp + 8) +# size (sp + 12) +# s2_limb (sp + 16) + +.text + .align 1 +.globl ___mpn_submul_1 +___mpn_submul_1: + .word 0xfc0 + movl 12(ap),r4 + movl 8(ap),r8 + movl 4(ap),r9 + movl 16(ap),r6 + jlss s2_big + + clrl r3 + incl r4 + ashl $-1,r4,r7 + jlbc r4,L1 + clrl r11 + +# Loop for S2_LIMB < 0x80000000 +Loop1: movl (r8)+,r1 + jlss L1n0 + emul r1,r6,$0,r2 + addl2 r11,r2 + adwc $0,r3 + subl2 r2,(r9)+ + adwc $0,r3 +L1: movl (r8)+,r1 + jlss L1n1 +L1p1: emul r1,r6,$0,r10 + addl2 r3,r10 + adwc $0,r11 + subl2 r10,(r9)+ + adwc $0,r11 + + jsobgtr r7,Loop1 + movl r11,r0 + ret + +L1n0: emul r1,r6,$0,r2 + addl2 r11,r2 + adwc r6,r3 + subl2 r2,(r9)+ + adwc $0,r3 + movl (r8)+,r1 + jgeq L1p1 +L1n1: emul r1,r6,$0,r10 + addl2 r3,r10 + adwc r6,r11 + subl2 r10,(r9)+ + adwc $0,r11 + + jsobgtr r7,Loop1 + movl r11,r0 + ret + + +s2_big: clrl r3 + incl r4 + ashl $-1,r4,r7 + jlbc r4,L2 + clrl r11 + +# Loop for S2_LIMB >= 0x80000000 +Loop2: movl (r8)+,r1 + jlss L2n0 + emul r1,r6,$0,r2 + addl2 r11,r2 + adwc r1,r3 + subl2 r2,(r9)+ + adwc $0,r3 +L2: movl (r8)+,r1 + jlss L2n1 +L2p1: emul r1,r6,$0,r10 + addl2 r3,r10 + adwc r1,r11 + subl2 r10,(r9)+ + adwc $0,r11 + + jsobgtr r7,Loop2 + movl r11,r0 + ret + +L2n0: emul r1,r6,$0,r2 + addl2 r11,r2 + adwc r6,r3 + subl2 r2,(r9)+ + adwc r1,r3 + movl (r8)+,r1 + jgeq L2p1 +L2n1: emul r1,r6,$0,r10 + addl2 r3,r10 + adwc r6,r11 + subl2 r10,(r9)+ + adwc r1,r11 + + jsobgtr r7,Loop2 + movl r11,r0 + ret diff --git a/sysdeps/z8000/add_n.s b/sysdeps/z8000/add_n.s new file mode 100644 index 0000000000..21efaf5714 --- /dev/null +++ b/sysdeps/z8000/add_n.s @@ -0,0 +1,52 @@ +! Z8000 __mpn_add_n -- Add two limb vectors of equal, non-zero length. + +! Copyright (C) 1993, 1994 Free Software Foundation, Inc. + +! This file is part of the GNU MP Library. + +! The GNU MP Library is free software; you can redistribute it and/or modify +! it under the terms of the GNU Library General Public License as published by +! the Free Software Foundation; either version 2 of the License, or (at your +! option) any later version. + +! The GNU MP 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 Library General Public +! License for more details. + +! You should have received a copy of the GNU Library General Public License +! along with the GNU MP Library; see the file COPYING.LIB. If not, write to +! the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + +! INPUT PARAMETERS +! res_ptr r7 +! s1_ptr r6 +! s2_ptr r5 +! size r4 + +! If we are really crazy, we can use push to write a few result words +! backwards, using push just because it is faster than reg+disp. We'd +! then add 2x the number of words written to r7... + + unseg + .text + even + global ___mpn_add_n +___mpn_add_n: + pop r0,@r6 + pop r1,@r5 + add r0,r1 + ld @r7,r0 + dec r4 + jr eq,Lend +Loop: pop r0,@r6 + pop r1,@r5 + adc r0,r1 + inc r7,#2 + ld @r7,r0 + dec r4 + jr ne,Loop +Lend: ld r2,r4 ! use 0 already in r4 + adc r2,r2 + ret t diff --git a/sysdeps/z8000/mul_1.s b/sysdeps/z8000/mul_1.s new file mode 100644 index 0000000000..2075225d11 --- /dev/null +++ b/sysdeps/z8000/mul_1.s @@ -0,0 +1,67 @@ +! Z8000 __mpn_mul_1 -- Multiply a limb vector with a limb and store +! the result in a second limb vector. + +! Copyright (C) 1993, 1994 Free Software Foundation, Inc. + +! This file is part of the GNU MP Library. + +! The GNU MP Library is free software; you can redistribute it and/or modify +! it under the terms of the GNU Library General Public License as published by +! the Free Software Foundation; either version 2 of the License, or (at your +! option) any later version. + +! The GNU MP 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 Library General Public +! License for more details. + +! You should have received a copy of the GNU Library General Public License +! along with the GNU MP Library; see the file COPYING.LIB. If not, write to +! the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + +! INPUT PARAMETERS +! res_ptr r7 +! s1_ptr r6 +! size r5 +! s2_limb r4 + + unseg + .text + even + global ___mpn_mul_1 +___mpn_mul_1: + sub r2,r2 ! zero carry limb + and r4,r4 + jr mi,Lneg + +Lpos: pop r1,@r6 + ld r9,r1 + mult rr8,r4 + and r1,r1 ! shift msb of loaded limb into cy + jr mi,Lp ! branch if loaded limb's msb is set + add r8,r4 ! hi_limb += sign_comp2 +Lp: add r9,r2 ! lo_limb += cy_limb + xor r2,r2 + adc r2,r8 + ld @r7,r9 + inc r7,#2 + dec r5 + jr ne,Lpos + ret t + +Lneg: pop r1,@r6 + ld r9,r1 + mult rr8,r4 + add r8,r1 ! hi_limb += sign_comp1 + and r1,r1 + jr mi,Ln + add r8,r4 ! hi_limb += sign_comp2 +Ln: add r9,r2 ! lo_limb += cy_limb + xor r2,r2 + adc r2,r8 + ld @r7,r9 + inc r7,#2 + dec r5 + jr ne,Lneg + ret t diff --git a/sysdeps/z8000/sub_n.s b/sysdeps/z8000/sub_n.s new file mode 100644 index 0000000000..f75ef22d04 --- /dev/null +++ b/sysdeps/z8000/sub_n.s @@ -0,0 +1,53 @@ +! Z8000 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and +! store difference in a third limb vector. + +! Copyright (C) 1993, 1994 Free Software Foundation, Inc. + +! This file is part of the GNU MP Library. + +! The GNU MP Library is free software; you can redistribute it and/or modify +! it under the terms of the GNU Library General Public License as published by +! the Free Software Foundation; either version 2 of the License, or (at your +! option) any later version. + +! The GNU MP 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 Library General Public +! License for more details. + +! You should have received a copy of the GNU Library General Public License +! along with the GNU MP Library; see the file COPYING.LIB. If not, write to +! the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + +! INPUT PARAMETERS +! res_ptr r7 +! s1_ptr r6 +! s2_ptr r5 +! size r4 + +! If we are really crazy, we can use push to write a few result words +! backwards, using push just because it is faster than reg+disp. We'd +! then add 2x the number of words written to r7... + + unseg + .text + even + global ___mpn_sub_n +___mpn_sub_n: + pop r0,@r6 + pop r1,@r5 + sub r0,r1 + ld @r7,r0 + dec r4 + jr eq,Lend +Loop: pop r0,@r6 + pop r1,@r5 + sbc r0,r1 + inc r7,#2 + ld @r7,r0 + dec r4 + jr ne,Loop +Lend: ld r2,r4 ! use 0 already in r4 + adc r2,r2 + ret t From 2b30df178565f0400ab69962eaf4743b891aa229 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 4 Dec 1995 18:37:48 +0000 Subject: [PATCH 0574/4487] Updated from ../=mpn/gmp-1.910 --- sysdeps/m68k/add_n.S | 76 ++++++++++++++++++++++++ sysdeps/m68k/sub_n.S | 76 ++++++++++++++++++++++++ sysdeps/m88k/add_n.s | 103 +++++++++++++++++++++++++++++++++ sysdeps/m88k/mul_1.s | 128 +++++++++++++++++++++++++++++++++++++++++ sysdeps/m88k/sub_n.s | 104 +++++++++++++++++++++++++++++++++ sysdeps/rs6000/add_n.s | 2 +- sysdeps/rs6000/sub_n.s | 2 +- 7 files changed, 489 insertions(+), 2 deletions(-) create mode 100644 sysdeps/m68k/add_n.S create mode 100644 sysdeps/m68k/sub_n.S create mode 100644 sysdeps/m88k/add_n.s create mode 100644 sysdeps/m88k/mul_1.s create mode 100644 sysdeps/m88k/sub_n.s diff --git a/sysdeps/m68k/add_n.S b/sysdeps/m68k/add_n.S new file mode 100644 index 0000000000..ea7a4458ea --- /dev/null +++ b/sysdeps/m68k/add_n.S @@ -0,0 +1,76 @@ +/* mc68020 __mpn_add_n -- Add two limb vectors of the same length > 0 and store + sum in a third limb vector. + +Copyright (C) 1992, 1994 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Library General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at your +option) any later version. + +The GNU MP 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 Library General Public +License for more details. + +You should have received a copy of the GNU Library General Public License +along with the GNU MP Library; see the file COPYING.LIB. If not, write to +the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +/* + INPUT PARAMETERS + res_ptr (sp + 4) + s1_ptr (sp + 8) + s2_ptr (sp + 16) + size (sp + 12) +*/ + +#include "asm-syntax.h" + + TEXT + ALIGN + GLOBL ___mpn_add_n + +LAB(___mpn_add_n) +/* Save used registers on the stack. */ + INSN2(move,l ,MEM_PREDEC(sp),d2) + INSN2(move,l ,MEM_PREDEC(sp),a2) + +/* Copy the arguments to registers. Better use movem? */ + INSN2(move,l ,a2,MEM_DISP(sp,12)) + INSN2(move,l ,a0,MEM_DISP(sp,16)) + INSN2(move,l ,a1,MEM_DISP(sp,20)) + INSN2(move,l ,d2,MEM_DISP(sp,24)) + + INSN2(eor,w ,d2,#1) + INSN2(lsr,l ,d2,#1) + bcc L1 + INSN2(subq,l ,d2,#1) /* clears cy as side effect */ + +LAB(Loop) + INSN2(move,l ,d0,MEM_POSTINC(a0)) + INSN2(move,l ,d1,MEM_POSTINC(a1)) + INSN2(addx,l ,d0,d1) + INSN2(move,l ,MEM_POSTINC(a2),d0) +LAB(L1) INSN2(move,l ,d0,MEM_POSTINC(a0)) + INSN2(move,l ,d1,MEM_POSTINC(a1)) + INSN2(addx,l ,d0,d1) + INSN2(move,l ,MEM_POSTINC(a2),d0) + + dbf d2,Loop /* loop until 16 lsb of %4 == -1 */ + INSN2(subx,l ,d0,d0) /* d0 <= -cy; save cy as 0 or -1 in d0 */ + INSN2(sub,l ,d2,#0x10000) + bcs L2 + INSN2(add,l ,d0,d0) /* restore cy */ + bra Loop + +LAB(L2) + INSN1(neg,l ,d0) + +/* Restore used registers from stack frame. */ + INSN2(move,l ,a2,MEM_POSTINC(sp)) + INSN2(move,l ,d2,MEM_POSTINC(sp)) + + rts diff --git a/sysdeps/m68k/sub_n.S b/sysdeps/m68k/sub_n.S new file mode 100644 index 0000000000..19f0ec1568 --- /dev/null +++ b/sysdeps/m68k/sub_n.S @@ -0,0 +1,76 @@ +/* mc68020 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and + store difference in a third limb vector. + +Copyright (C) 1992, 1994 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Library General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at your +option) any later version. + +The GNU MP 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 Library General Public +License for more details. + +You should have received a copy of the GNU Library General Public License +along with the GNU MP Library; see the file COPYING.LIB. If not, write to +the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +/* + INPUT PARAMETERS + res_ptr (sp + 4) + s1_ptr (sp + 8) + s2_ptr (sp + 16) + size (sp + 12) +*/ + +#include "asm-syntax.h" + + TEXT + ALIGN + GLOBL ___mpn_sub_n + +LAB(___mpn_sub_n) +/* Save used registers on the stack. */ + INSN2(move,l ,MEM_PREDEC(sp),d2) + INSN2(move,l ,MEM_PREDEC(sp),a2) + +/* Copy the arguments to registers. Better use movem? */ + INSN2(move,l ,a2,MEM_DISP(sp,12)) + INSN2(move,l ,a0,MEM_DISP(sp,16)) + INSN2(move,l ,a1,MEM_DISP(sp,20)) + INSN2(move,l ,d2,MEM_DISP(sp,24)) + + INSN2(eor,w ,d2,#1) + INSN2(lsr,l ,d2,#1) + bcc L1 + INSN2(subq,l ,d2,#1) /* clears cy as side effect */ + +LAB(Loop) + INSN2(move,l ,d0,MEM_POSTINC(a0)) + INSN2(move,l ,d1,MEM_POSTINC(a1)) + INSN2(subx,l ,d0,d1) + INSN2(move,l ,MEM_POSTINC(a2),d0) +LAB(L1) INSN2(move,l ,d0,MEM_POSTINC(a0)) + INSN2(move,l ,d1,MEM_POSTINC(a1)) + INSN2(subx,l ,d0,d1) + INSN2(move,l ,MEM_POSTINC(a2),d0) + + dbf d2,Loop /* loop until 16 lsb of %4 == -1 */ + INSN2(subx,l ,d0,d0) /* d0 <= -cy; save cy as 0 or -1 in d0 */ + INSN2(sub,l ,d2,#0x10000) + bcs L2 + INSN2(add,l ,d0,d0) /* restore cy */ + bra Loop + +LAB(L2) + INSN1(neg,l ,d0) + +/* Restore used registers from stack frame. */ + INSN2(move,l ,a2,MEM_POSTINC(sp)) + INSN2(move,l ,d2,MEM_POSTINC(sp)) + + rts diff --git a/sysdeps/m88k/add_n.s b/sysdeps/m88k/add_n.s new file mode 100644 index 0000000000..7e4ccccb90 --- /dev/null +++ b/sysdeps/m88k/add_n.s @@ -0,0 +1,103 @@ +; mc88100 __mpn_add -- Add two limb vectors of the same length > 0 and store +; sum in a third limb vector. + +; Copyright (C) 1992, 1994 Free Software Foundation, Inc. + +; This file is part of the GNU MP Library. + +; The GNU MP Library is free software; you can redistribute it and/or modify +; it under the terms of the GNU Library General Public License as published by +; the Free Software Foundation; either version 2 of the License, or (at your +; option) any later version. + +; The GNU MP 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 Library General Public +; License for more details. + +; You should have received a copy of the GNU Library General Public License +; along with the GNU MP Library; see the file COPYING.LIB. If not, write to +; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + +; INPUT PARAMETERS +; res_ptr r2 +; s1_ptr r3 +; s2_ptr r4 +; size r5 + +; This code has been optimized to run one instruction per clock, avoiding +; load stalls and writeback contention. As a result, the instruction +; order is not always natural. + +; The speed is about 4.6 clocks/limb + 18 clocks/limb-vector on an 88100, +; but on the 88110, it seems to run much slower, 6.6 clocks/limb. + + text + align 16 + global ___mpn_add_n +___mpn_add_n: + ld r6,r3,0 ; read first limb from s1_ptr + extu r10,r5,3 + ld r7,r4,0 ; read first limb from s2_ptr + + subu.co r5,r0,r5 ; (clear carry as side effect) + mak r5,r5,3<4> + bcnd eq0,r5,Lzero + + or r12,r0,lo16(Lbase) + or.u r12,r12,hi16(Lbase) + addu r12,r12,r5 ; r12 is address for entering in loop + + extu r5,r5,2 ; divide by 4 + subu r2,r2,r5 ; adjust res_ptr + subu r3,r3,r5 ; adjust s1_ptr + subu r4,r4,r5 ; adjust s2_ptr + + or r8,r6,r0 + + jmp.n r12 + or r9,r7,r0 + +Loop: addu r3,r3,32 + st r8,r2,28 + addu r4,r4,32 + ld r6,r3,0 + addu r2,r2,32 + ld r7,r4,0 +Lzero: subu r10,r10,1 ; add 0 + 8r limbs (adj loop cnt) +Lbase: ld r8,r3,4 + addu.cio r6,r6,r7 + ld r9,r4,4 + st r6,r2,0 + ld r6,r3,8 ; add 7 + 8r limbs + addu.cio r8,r8,r9 + ld r7,r4,8 + st r8,r2,4 + ld r8,r3,12 ; add 6 + 8r limbs + addu.cio r6,r6,r7 + ld r9,r4,12 + st r6,r2,8 + ld r6,r3,16 ; add 5 + 8r limbs + addu.cio r8,r8,r9 + ld r7,r4,16 + st r8,r2,12 + ld r8,r3,20 ; add 4 + 8r limbs + addu.cio r6,r6,r7 + ld r9,r4,20 + st r6,r2,16 + ld r6,r3,24 ; add 3 + 8r limbs + addu.cio r8,r8,r9 + ld r7,r4,24 + st r8,r2,20 + ld r8,r3,28 ; add 2 + 8r limbs + addu.cio r6,r6,r7 + ld r9,r4,28 + st r6,r2,24 + bcnd.n ne0,r10,Loop ; add 1 + 8r limbs + addu.cio r8,r8,r9 + + st r8,r2,28 ; store most significant limb + + jmp.n r1 + addu.ci r2,r0,r0 ; return carry-out from most sign. limb diff --git a/sysdeps/m88k/mul_1.s b/sysdeps/m88k/mul_1.s new file mode 100644 index 0000000000..35c238d570 --- /dev/null +++ b/sysdeps/m88k/mul_1.s @@ -0,0 +1,128 @@ +; mc88100 __mpn_mul_1 -- Multiply a limb vector with a single limb and +; store the product in a second limb vector. + +; Copyright (C) 1992, 1994 Free Software Foundation, Inc. + +; This file is part of the GNU MP Library. + +; The GNU MP Library is free software; you can redistribute it and/or modify +; it under the terms of the GNU Library General Public License as published by +; the Free Software Foundation; either version 2 of the License, or (at your +; option) any later version. + +; The GNU MP 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 Library General Public +; License for more details. + +; You should have received a copy of the GNU Library General Public License +; along with the GNU MP Library; see the file COPYING.LIB. If not, write to +; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + +; INPUT PARAMETERS +; res_ptr r2 +; s1_ptr r3 +; size r4 +; s2_limb r5 + +; Common overhead is about 11 cycles/invocation. + +; The speed for S2_LIMB >= 0x10000 is approximately 21 cycles/limb. (The +; pipeline stalls 2 cycles due to WB contention.) + +; The speed for S2_LIMB < 0x10000 is approximately 16 cycles/limb. (The +; pipeline stalls 2 cycles due to WB contention and 1 cycle due to latency.) + +; To enhance speed: +; 1. Unroll main loop 4-8 times. +; 2. Schedule code to avoid WB contention. It might be tempting to move the +; ld instruction in the loops down to save 2 cycles (less WB contention), +; but that looses because the ultimate value will be read from outside +; the allocated space. But if we handle the ultimate multiplication in +; the tail, we can do this. +; 3. Make the multiplication with less instructions. I think the code for +; (S2_LIMB >= 0x10000) is not minimal. +; With these techniques the (S2_LIMB >= 0x10000) case would run in 17 or +; less cycles/limb; the (S2_LIMB < 0x10000) case would run in 11 +; cycles/limb. (Assuming infinite unrolling.) + + text + align 16 + global ___mpn_mul_1 +___mpn_mul_1: + + ; Make S1_PTR and RES_PTR point at the end of their blocks + ; and negate SIZE. + lda r3,r3[r4] + lda r6,r2[r4] ; RES_PTR in r6 since r2 is retval + subu r4,r0,r4 + + addu.co r2,r0,r0 ; r2 = cy = 0 + ld r9,r3[r4] + mask r7,r5,0xffff ; r7 = lo(S2_LIMB) + extu r8,r5,16 ; r8 = hi(S2_LIMB) + bcnd.n eq0,r8,Lsmall ; jump if (hi(S2_LIMB) == 0) + subu r6,r6,4 + +; General code for any value of S2_LIMB. + + ; Make a stack frame and save r25 and r26 + subu r31,r31,16 + st.d r25,r31,8 + + ; Enter the loop in the middle + br.n L1 + addu r4,r4,1 + +Loop: + ld r9,r3[r4] + st r26,r6[r4] +; bcnd ne0,r0,0 ; bubble + addu r4,r4,1 +L1: mul r26,r9,r5 ; low word of product mul_1 WB ld + mask r12,r9,0xffff ; r12 = lo(s1_limb) mask_1 + mul r11,r12,r7 ; r11 = prod_0 mul_2 WB mask_1 + mul r10,r12,r8 ; r10 = prod_1a mul_3 + extu r13,r9,16 ; r13 = hi(s1_limb) extu_1 WB mul_1 + mul r12,r13,r7 ; r12 = prod_1b mul_4 WB extu_1 + mul r25,r13,r8 ; r25 = prod_2 mul_5 WB mul_2 + extu r11,r11,16 ; r11 = hi(prod_0) extu_2 WB mul_3 + addu r10,r10,r11 ; addu_1 WB extu_2 +; bcnd ne0,r0,0 ; bubble WB addu_1 + addu.co r10,r10,r12 ; WB mul_4 + mask.u r10,r10,0xffff ; move the 16 most significant bits... + addu.ci r10,r10,r0 ; ...to the low half of the word... + rot r10,r10,16 ; ...and put carry in pos 16. + addu.co r26,r26,r2 ; add old carry limb + bcnd.n ne0,r4,Loop + addu.ci r2,r25,r10 ; compute new carry limb + + st r26,r6[r4] + ld.d r25,r31,8 + jmp.n r1 + addu r31,r31,16 + +; Fast code for S2_LIMB < 0x10000 +Lsmall: + ; Enter the loop in the middle + br.n SL1 + addu r4,r4,1 + +SLoop: + ld r9,r3[r4] ; + st r8,r6[r4] ; + addu r4,r4,1 ; +SL1: mul r8,r9,r5 ; low word of product + mask r12,r9,0xffff ; r12 = lo(s1_limb) + extu r13,r9,16 ; r13 = hi(s1_limb) + mul r11,r12,r7 ; r11 = prod_0 + mul r12,r13,r7 ; r12 = prod_1b + addu.cio r8,r8,r2 ; add old carry limb + extu r10,r11,16 ; r11 = hi(prod_0) + addu r10,r10,r12 ; + bcnd.n ne0,r4,SLoop + extu r2,r10,16 ; r2 = new carry limb + + jmp.n r1 + st r8,r6[r4] diff --git a/sysdeps/m88k/sub_n.s b/sysdeps/m88k/sub_n.s new file mode 100644 index 0000000000..3963cd5479 --- /dev/null +++ b/sysdeps/m88k/sub_n.s @@ -0,0 +1,104 @@ +; mc88100 __mpn_sub -- Subtract two limb vectors of the same length > 0 and +; store difference in a third limb vector. + +; Copyright (C) 1992, 1994 Free Software Foundation, Inc. + +; This file is part of the GNU MP Library. + +; The GNU MP Library is free software; you can redistribute it and/or modify +; it under the terms of the GNU Library General Public License as published by +; the Free Software Foundation; either version 2 of the License, or (at your +; option) any later version. + +; The GNU MP 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 Library General Public +; License for more details. + +; You should have received a copy of the GNU Library General Public License +; along with the GNU MP Library; see the file COPYING.LIB. If not, write to +; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + +; INPUT PARAMETERS +; res_ptr r2 +; s1_ptr r3 +; s2_ptr r4 +; size r5 + +; This code has been optimized to run one instruction per clock, avoiding +; load stalls and writeback contention. As a result, the instruction +; order is not always natural. + +; The speed is about 4.6 clocks/limb + 18 clocks/limb-vector on an 88100, +; but on the 88110, it seems to run much slower, 6.6 clocks/limb. + + text + align 16 + global ___mpn_sub_n +___mpn_sub_n: + ld r6,r3,0 ; read first limb from s1_ptr + extu r10,r5,3 + ld r7,r4,0 ; read first limb from s2_ptr + + subu.co r5,r0,r5 ; (clear carry as side effect) + mak r5,r5,3<4> + bcnd eq0,r5,Lzero + + or r12,r0,lo16(Lbase) + or.u r12,r12,hi16(Lbase) + addu r12,r12,r5 ; r12 is address for entering in loop + + extu r5,r5,2 ; divide by 4 + subu r2,r2,r5 ; adjust res_ptr + subu r3,r3,r5 ; adjust s1_ptr + subu r4,r4,r5 ; adjust s2_ptr + + or r8,r6,r0 + + jmp.n r12 + or r9,r7,r0 + +Loop: addu r3,r3,32 + st r8,r2,28 + addu r4,r4,32 + ld r6,r3,0 + addu r2,r2,32 + ld r7,r4,0 +Lzero: subu r10,r10,1 ; subtract 0 + 8r limbs (adj loop cnt) +Lbase: ld r8,r3,4 + subu.cio r6,r6,r7 + ld r9,r4,4 + st r6,r2,0 + ld r6,r3,8 ; subtract 7 + 8r limbs + subu.cio r8,r8,r9 + ld r7,r4,8 + st r8,r2,4 + ld r8,r3,12 ; subtract 6 + 8r limbs + subu.cio r6,r6,r7 + ld r9,r4,12 + st r6,r2,8 + ld r6,r3,16 ; subtract 5 + 8r limbs + subu.cio r8,r8,r9 + ld r7,r4,16 + st r8,r2,12 + ld r8,r3,20 ; subtract 4 + 8r limbs + subu.cio r6,r6,r7 + ld r9,r4,20 + st r6,r2,16 + ld r6,r3,24 ; subtract 3 + 8r limbs + subu.cio r8,r8,r9 + ld r7,r4,24 + st r8,r2,20 + ld r8,r3,28 ; subtract 2 + 8r limbs + subu.cio r6,r6,r7 + ld r9,r4,28 + st r6,r2,24 + bcnd.n ne0,r10,Loop ; subtract 1 + 8r limbs + subu.cio r8,r8,r9 + + st r8,r2,28 ; store most significant limb + + addu.ci r2,r0,r0 ; return carry-out from most sign. limb + jmp.n r1 + xor r2,r2,1 diff --git a/sysdeps/rs6000/add_n.s b/sysdeps/rs6000/add_n.s index 34ad9e1d2d..7090cf1b00 100644 --- a/sysdeps/rs6000/add_n.s +++ b/sysdeps/rs6000/add_n.s @@ -45,7 +45,7 @@ __mpn_add_n: bdz Lend # If done, skip loop Loop: lu 8,4(4) # load s1 limb and update s1_ptr lu 0,4(5) # load s2 limb and update s2_ptr - stu 7,4(3) # store previous limb in load latecny slot + stu 7,4(3) # store previous limb in load latency slot ae 7,0,8 # add new limbs with cy, set cy bdn Loop # decrement CTR and loop back Lend: st 7,4(3) # store ultimate result limb diff --git a/sysdeps/rs6000/sub_n.s b/sysdeps/rs6000/sub_n.s index 402fdcefc4..40fe7d68bd 100644 --- a/sysdeps/rs6000/sub_n.s +++ b/sysdeps/rs6000/sub_n.s @@ -46,7 +46,7 @@ __mpn_sub_n: bdz Lend # If done, skip loop Loop: lu 8,4(4) # load s1 limb and update s1_ptr lu 0,4(5) # load s2 limb and update s2_ptr - stu 7,4(3) # store previous limb in load latecny slot + stu 7,4(3) # store previous limb in load latency slot sfe 7,0,8 # add new limbs with cy, set cy bdn Loop # decrement CTR and loop back Lend: st 7,4(3) # store ultimate result limb From 69c85398dbe8f5d134248c01133958a253405cd3 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 17 Jan 1996 02:02:35 +0000 Subject: [PATCH 0575/4487] Sun Jan 14 17:51:09 1996 Andreas Schwab * misc/efgcvt_r.c (ecvt_r): Handle negative values. * stdlib/stdlib.h: Replace __CONSTVALUE by attribute. * stdlib/abs.c, stdlib/div.c, stdlib/labs.c, stdlib/ldiv.c, sysdeps/generic/hypot.c: Remove obsolete __CONSTVALUE. * stdio-common/printf_fp.c (__printf_fp): Fix parameter declaration. * sysdeps/generic/putenv.c (putenv): Fix second argument of setenv. * sysdeps/ieee754/hypot.c: New file, extracted out of cabs.c. * sysdeps/ieee754/cabs.c: Don't define hypot here. * sysdeps/ieee754/ieee754.h (union ieee854_long_double): Fix definition of ieee_nan alternative. * sysdeps/m68k/__longjmp.c, sysdeps/m68k/setjmp.c: Add register prefix spec. * sysdeps/m68k/ffs.c (ffs): Fix register constraint. * sysdeps/m68k/fpu/__math.h: Include . Replace obsolete __CONSTVALUE by attribute. (floor): Round to negative infinity. (rint, expm1) [__NO_MATH_INLINES]: Don't define, to avoid type clash when compiling source. (pow): Handle x == 0 and x < 0. (ceil, __isinf, __isnan): Fix register constraints. (__isinfl, __isnanl): Added. * sysdeps/m68k/fpu/acos.c, sysdeps/m68k/fpu/atan2.c, sysdeps/m68k/fpu/fmod.c, sysdeps/m68k/fpu/ldexp.c, sysdeps/m68k/fpu/pow.c: Remove obsolete __CONSTVALUE. * sysdeps/m68k/bsd-_setjmp.S, sysdeps/m68k/bsd-setjmp.S: Fix assembler syntax. * sysdeps/unix/bsd/bsd4.4/fchdir.S (fchdir): Take only one argument. * sysdeps/unix/bsd/clock.c (timeval_to_clock_t): Fix timeval to clock_t conversion. (clock): Don't multiply by CLOCKS_PER_SEC. * sysdeps/unix/bsd/poll.c (poll): Fix msec to timeval conversion. * sysdeps/unix/bsd/sun/m68k/brk.S (brk): Compare with address of __end. * sysdeps/unix/bsd/sun/m68k/vfork.S: Fix assembler syntax. * sysdeps/unix/bsd/ualarm.c (ualarm): Fix timeval calculation. * sysdeps/unix/bsd/vax/vfork.S: Remove duplicate label. --- sysdeps/m68k/__longjmp.c | 13 ++-- sysdeps/m68k/bsd-_setjmp.S | 12 ++- sysdeps/m68k/bsd-setjmp.S | 10 ++- sysdeps/m68k/ffs.c | 2 +- sysdeps/m68k/fpu/__math.h | 118 +++++++++++++++++++++++++----- sysdeps/m68k/fpu/acos.c | 2 +- sysdeps/m68k/fpu/atan2.c | 2 +- sysdeps/m68k/fpu/fmod.c | 2 +- sysdeps/m68k/fpu/ldexp.c | 2 +- sysdeps/m68k/fpu/pow.c | 2 +- sysdeps/m68k/setjmp.c | 8 +- sysdeps/unix/bsd/sun/m68k/brk.S | 2 +- sysdeps/unix/bsd/sun/m68k/vfork.S | 2 +- sysdeps/unix/bsd/vax/vfork.S | 1 - 14 files changed, 136 insertions(+), 42 deletions(-) diff --git a/sysdeps/m68k/__longjmp.c b/sysdeps/m68k/__longjmp.c index 4fc61084a0..92dd803c17 100644 --- a/sysdeps/m68k/__longjmp.c +++ b/sysdeps/m68k/__longjmp.c @@ -29,22 +29,21 @@ __longjmp (__jmp_buf env, int val) #if defined(__HAVE_68881__) || defined(__HAVE_FPU__) /* Restore the floating-point registers. */ - asm volatile("fmovem%.x %0, fp0-fp7" : - /* No outputs. */ : "g" (env[0].__fpregs[0]) : - "fp0", "fp1", "fp2", "fp3", "fp4", "fp5", "fp6", "fp7"); + asm volatile("fmovem%.x %0, %/fp0-%/fp7" : + /* No outputs. */ : "g" (env[0].__fpregs[0])); #endif /* Put VAL in D0. */ - asm volatile("move%.l %0, d0" : /* No outputs. */ : + asm volatile("move%.l %0, %/d0" : /* No outputs. */ : "g" (val == 0 ? 1 : val) : "d0"); asm volatile(/* Restore the data and address registers. */ - "movem%.l %0, d1-d7/a0-a7\n" + "movem%.l %0, %/d1-%/d7/%/a0-%/a7\n" /* Return to setjmp's caller. */ #ifdef __motorola__ - "jmp (a0)" + "jmp (%/a0)" #else - "jmp a0@" + "jmp %/a0@" #endif : /* No outputs. */ : "g" (env[0].__dregs[0]) /* We don't bother with the clobbers, diff --git a/sysdeps/m68k/bsd-_setjmp.S b/sysdeps/m68k/bsd-_setjmp.S index a0b639306d..69aa7de04c 100644 --- a/sysdeps/m68k/bsd-_setjmp.S +++ b/sysdeps/m68k/bsd-_setjmp.S @@ -26,17 +26,23 @@ Cambridge, MA 02139, USA. */ #ifdef MOTOROLA_SYNTAX #define d0 %d0 #define d1 %d1 -#define PUSH(reg) move.l reg, -(%esp) -#define POP(reg) move.l (%esp)+, reg +#define PUSH(reg) move.l reg, -(%sp) +#define POP(reg) move.l (%sp)+, reg +#define PUSH0 clr.l -(%sp) #else #define PUSH(reg) movel reg, sp@- #define POP(reg) movel sp@+, reg +#define PUSH0 clrl sp@- #endif ENTRY (_setjmp) POP (d0) /* Pop return PC. */ POP (d1) /* Pop jmp_buf argument. */ - PUSH (#0) /* Push second argument of zero. */ + PUSH0 /* Push second argument of zero. */ PUSH (d1) /* Push back first argument. */ PUSH (d0) /* Push back return PC. */ +#ifdef PIC + bra.l C_SYMBOL_NAME (__sigsetjmp@PLTPC) +#else jmp C_SYMBOL_NAME (__sigsetjmp) +#endif diff --git a/sysdeps/m68k/bsd-setjmp.S b/sysdeps/m68k/bsd-setjmp.S index d218b44279..c853516824 100644 --- a/sysdeps/m68k/bsd-setjmp.S +++ b/sysdeps/m68k/bsd-setjmp.S @@ -26,8 +26,8 @@ Cambridge, MA 02139, USA. */ #ifdef MOTOROLA_SYNTAX #define d0 %d0 #define d1 %d1 -#define PUSH(reg) move.l reg, -(%esp) -#define POP(reg) move.l (%esp)+, reg +#define PUSH(reg) move.l reg, -(%sp) +#define POP(reg) move.l (%sp)+, reg #else #define PUSH(reg) movel reg, sp@- #define POP(reg) movel sp@+, reg @@ -36,7 +36,11 @@ Cambridge, MA 02139, USA. */ ENTRY (setjmp) POP (d0) /* Pop return PC. */ POP (d1) /* Pop jmp_buf argument. */ - PUSH (#1) /* Push second argument of one. */ + pea 1 /* Push second argument of one. */ PUSH (d1) /* Push back first argument. */ PUSH (d0) /* Push back return PC. */ +#ifdef PIC + bra.l C_SYMBOL_NAME (__sigsetjmp@PLTPC) +#else jmp C_SYMBOL_NAME (__sigsetjmp) +#endif diff --git a/sysdeps/m68k/ffs.c b/sysdeps/m68k/ffs.c index d9ec2b1ced..9de7cf3c41 100644 --- a/sysdeps/m68k/ffs.c +++ b/sysdeps/m68k/ffs.c @@ -30,7 +30,7 @@ DEFUN(ffs, (x), int x) { int cnt; - asm("bfffo %1{#0:#0},%0" : "=d" (cnt) : "rm" (x & -x)); + asm("bfffo %1{#0:#0},%0" : "=d" (cnt) : "dm" (x & -x)); return 32 - cnt; } diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h index a9ae2d966c..e357364fb7 100644 --- a/sysdeps/m68k/fpu/__math.h +++ b/sysdeps/m68k/fpu/__math.h @@ -19,6 +19,8 @@ Cambridge, MA 02139, USA. */ #ifdef __GNUC__ #include +#define __need_Emath +#include #ifdef __NO_MATH_INLINES /* This is used when defining the functions themselves. Define them with @@ -28,12 +30,14 @@ Cambridge, MA 02139, USA. */ #define __m81_inline static __inline #else #define __m81_u(x) x -#define __m81_inline exter __inline +#define __m81_inline extern __inline #define __MATH_INLINES 1 #endif #define __inline_mathop2(func, op) \ - __m81_inline __CONSTVALUE double \ + __m81_inline double \ + __m81_u(func)(double __mathop_x) __attribute__((__const__)); \ + __m81_inline double \ __m81_u(func)(double __mathop_x) \ { \ double __result; \ @@ -55,20 +59,23 @@ __inline_mathop2(exp, etox) __inline_mathop2(fabs, abs) __inline_mathop(log10) __inline_mathop2(log, logn) -__inline_mathop2(floor, intrz) __inline_mathop(sqrt) __inline_mathop2(__rint, int) __inline_mathop2(__expm1, etoxm1) #ifdef __USE_MISC +#ifndef __NO_MATH_INLINES __inline_mathop2(rint, int) __inline_mathop2(expm1, etoxm1) +#endif __inline_mathop2(log1p, lognp1) __inline_mathop(atanh) #endif -__m81_inline __CONSTVALUE double +__m81_inline double +__m81_u(__drem)(double __x, double __y) __attribute__ ((__const__)); +__m81_inline double __m81_u(__drem)(double __x, double __y) { double __result; @@ -76,7 +83,9 @@ __m81_u(__drem)(double __x, double __y) return __result; } -__m81_inline __CONSTVALUE double +__m81_inline double +__m81_u(ldexp)(double __x, int __e) __attribute__ ((__const__)); +__m81_inline double __m81_u(ldexp)(double __x, int __e) { double __result; @@ -85,7 +94,9 @@ __m81_u(ldexp)(double __x, int __e) return __result; } -__m81_inline __CONSTVALUE double +__m81_inline double +__m81_u(fmod)(double __x, double __y) __attribute__ ((__const__)); +__m81_inline double __m81_u(fmod)(double __x, double __y) { double __result; @@ -103,11 +114,39 @@ __m81_u(frexp)(double __value, int *__expptr) return __mantissa; } -__m81_inline __CONSTVALUE double +__m81_inline double +__m81_u(floor)(double __x) __attribute__ ((__const__)); +__m81_inline double +__m81_u(floor)(double __x) +{ + double __result; + unsigned long int __ctrl_reg; + __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); + /* Set rounding towards negative infinity. */ + __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ + : "dmi" ((__ctrl_reg & ~0x10) | 0x20)); + /* Convert X to an integer, using -Inf rounding. */ + __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); + /* Restore the previous rounding mode. */ + __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ + : "dmi" (__ctrl_reg)); + return __result; +} + +__m81_inline double +__m81_u(pow)(double __x, double __y) __attribute__ ((__const__)); +__m81_inline double __m81_u(pow)(double __x, double __y) { double __result; - if (__y == 0.0 || __x == 1.0) + if (__x == 0.0) + { + if (__y <= 0.0) + __result = __infnan (EDOM); + else + __result = 0.0; + } + else if (__y == 0.0 || __x == 1.0) __result = 1.0; else if (__y == 1.0) __result = __x; @@ -117,23 +156,40 @@ __m81_u(pow)(double __x, double __y) __asm("ftentox%.x %1, %0" : "=f" (__result) : "f" (__y)); else if (__x == 2.0) __asm("ftwotox%.x %1, %0" : "=f" (__result) : "f" (__y)); + else if (__x < 0.0) + { + double __temp = __m81_u (__rint) (__y); + if (__y == __temp) + { + int i = (int) __y; + __result = __m81_u (exp) (__y * __m81_u (log) (-__x)); + if (i & 1) + __result = -__result; + } + else + __result = __infnan (EDOM); + } else __result = __m81_u(exp)(__y * __m81_u(log)(__x)); return __result; } -__m81_inline __CONSTVALUE double +__m81_inline double +__m81_u(ceil)(double __x) __attribute__ ((__const__)); +__m81_inline double __m81_u(ceil)(double __x) { double __result; unsigned long int __ctrl_reg; - __asm("fmove%.l fpcr, %0" : "=g" (__ctrl_reg)); + __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); /* Set rounding towards positive infinity. */ - __asm("fmove%.l %0, fpcr" : /* No outputs. */ : "g" (__ctrl_reg | 0x30)); + __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ + : "dmi" (__ctrl_reg | 0x30)); /* Convert X to an integer, using +Inf rounding. */ - __asm("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); + __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); /* Restore the previous rounding mode. */ - __asm("fmove%.l %0, fpcr" : /* No outputs. */ : "g" (__ctrl_reg)); + __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ + : "dmi" (__ctrl_reg)); return __result; } @@ -145,23 +201,51 @@ __m81_u(modf)(double __value, double *__iptr) return __value - __modf_int; } -__m81_inline __CONSTVALUE int +__m81_inline int +__m81_u(__isinf)(double __value) __attribute__ ((__const__)); +__m81_inline int __m81_u(__isinf)(double __value) { /* There is no branch-condition for infinity, so we must extract and examine the condition codes manually. */ unsigned long int __fpsr; __asm("ftst%.x %1\n" - "fmove%.l fpsr, %0" : "=g" (__fpsr) : "f" (__value)); + "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); return (__fpsr & (2 << (3 * 8))) ? (__value < 0 ? -1 : 1) : 0; } -__m81_inline __CONSTVALUE int +__m81_inline int +__m81_u(__isnan)(double __value) __attribute__ ((__const__)); +__m81_inline int __m81_u(__isnan)(double __value) { char __result; __asm("ftst%.x %1\n" - "fsun %0" : "=g" (__result) : "f" (__value)); + "fsun %0" : "=dm" (__result) : "f" (__value)); + return __result; +} + +__m81_inline int +__m81_u(__isinfl)(long double __value) __attribute__ ((__const__)); +__m81_inline int +__m81_u(__isinfl)(long double __value) +{ + /* There is no branch-condition for infinity, + so we must extract and examine the condition codes manually. */ + unsigned long int __fpsr; + __asm("ftst%.x %1\n" + "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); + return (__fpsr & (2 << (3 * 8))) ? (__value < 0 ? -1 : 1) : 0; +} + +__m81_inline int +__m81_u(__isnanl)(long double __value) __attribute__ ((__const__)); +__m81_inline int +__m81_u(__isnanl)(long double __value) +{ + char __result; + __asm("ftst%.x %1\n" + "fsun %0" : "=dm" (__result) : "f" (__value)); return __result; } diff --git a/sysdeps/m68k/fpu/acos.c b/sysdeps/m68k/fpu/acos.c index d4be88f17c..1481ce2cd9 100644 --- a/sysdeps/m68k/fpu/acos.c +++ b/sysdeps/m68k/fpu/acos.c @@ -25,7 +25,7 @@ Cambridge, MA 02139, USA. */ #endif -__CONSTVALUE double +double DEFUN(FUNC, (x), double x) { return __m81_u(FUNC)(x); diff --git a/sysdeps/m68k/fpu/atan2.c b/sysdeps/m68k/fpu/atan2.c index 1efdb1f7a6..753b7f04af 100644 --- a/sysdeps/m68k/fpu/atan2.c +++ b/sysdeps/m68k/fpu/atan2.c @@ -21,7 +21,7 @@ Cambridge, MA 02139, USA. */ #ifdef __GNUC__ -__CONSTVALUE double +double DEFUN(atan2, (y, x), double y AND double x) { static CONST double one = 1.0, zero = 0.0; diff --git a/sysdeps/m68k/fpu/fmod.c b/sysdeps/m68k/fpu/fmod.c index 9a6c8cd162..e3a2de0689 100644 --- a/sysdeps/m68k/fpu/fmod.c +++ b/sysdeps/m68k/fpu/fmod.c @@ -20,7 +20,7 @@ Cambridge, MA 02139, USA. */ #define __NO_MATH_INLINES #include -__CONSTVALUE double +double DEFUN(fmod, (x, y), double x AND double y) { return __fmod(x, y); diff --git a/sysdeps/m68k/fpu/ldexp.c b/sysdeps/m68k/fpu/ldexp.c index ba912805d6..7e34882282 100644 --- a/sysdeps/m68k/fpu/ldexp.c +++ b/sysdeps/m68k/fpu/ldexp.c @@ -20,7 +20,7 @@ Cambridge, MA 02139, USA. */ #define __NO_MATH_INLINES #include -__CONSTVALUE double +double DEFUN(ldexp, (x, exp), double x AND int exp) { return __ldexp(x, exp); diff --git a/sysdeps/m68k/fpu/pow.c b/sysdeps/m68k/fpu/pow.c index 3360020f1d..5ace4dad2f 100644 --- a/sysdeps/m68k/fpu/pow.c +++ b/sysdeps/m68k/fpu/pow.c @@ -20,7 +20,7 @@ Cambridge, MA 02139, USA. */ #define __NO_MATH_INLINES #include -__CONSTVALUE double +double DEFUN(pow, (x, y), double x AND double y) { return __pow(x, y); diff --git a/sysdeps/m68k/setjmp.c b/sysdeps/m68k/setjmp.c index 853977eab9..95c723c122 100644 --- a/sysdeps/m68k/setjmp.c +++ b/sysdeps/m68k/setjmp.c @@ -23,13 +23,15 @@ int __sigsetjmp (jmp_buf env, int savemask) { /* Save data registers D1 through D7. */ - asm volatile ("movem%.l d1-d7, %0" : : "m" (env[0].__jmpbuf[0].__dregs[0])); + asm volatile ("movem%.l %/d1-%/d7, %0" + : : "m" (env[0].__jmpbuf[0].__dregs[0])); /* Save return address in place of register A0. */ env[0].__jmpbuf[0].__aregs[0] = ((void **) &env)[-1]; /* Save address registers A1 through A5. */ - asm volatile ("movem%.l a1-a5, %0" : : "m" (env[0].__jmpbuf[0].__aregs[1])); + asm volatile ("movem%.l %/a1-%/a5, %0" + : : "m" (env[0].__jmpbuf[0].__aregs[1])); /* Save caller's FP, not our own. */ env[0].__jmpbuf[0].__fp = ((void **) &env)[-2]; @@ -39,7 +41,7 @@ __sigsetjmp (jmp_buf env, int savemask) #if defined(__HAVE_68881__) || defined(__HAVE_FPU__) /* Save floating-point (68881) registers FP0 through FP7. */ - asm volatile ("fmovem%.x fp0-fp7, %0" + asm volatile ("fmovem%.x %/fp0-%/fp7, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[0])); #endif diff --git a/sysdeps/unix/bsd/sun/m68k/brk.S b/sysdeps/unix/bsd/sun/m68k/brk.S index 114fa73c85..462910ad30 100644 --- a/sysdeps/unix/bsd/sun/m68k/brk.S +++ b/sysdeps/unix/bsd/sun/m68k/brk.S @@ -33,7 +33,7 @@ ___curbrk: .text ENTRY (__brk) - movel __end, d0 + movel #__end, d0 cmpl sp@(4), d0 ble 0f movel d0, sp@(4) diff --git a/sysdeps/unix/bsd/sun/m68k/vfork.S b/sysdeps/unix/bsd/sun/m68k/vfork.S index cb7dae8d2b..63d2a09903 100644 --- a/sysdeps/unix/bsd/sun/m68k/vfork.S +++ b/sysdeps/unix/bsd/sun/m68k/vfork.S @@ -41,7 +41,7 @@ ___vfork: bits set) for the parent, and 0 (no bits set) for the child. Then AND it with D0, so the parent gets D0&-1==R0, and the child gets D0&0==0. */ - decl d1 + subql #1, d1 andl d1, d0 /* Jump to the return PC. */ diff --git a/sysdeps/unix/bsd/vax/vfork.S b/sysdeps/unix/bsd/vax/vfork.S index daf8f0f20d..96f27ea098 100644 --- a/sysdeps/unix/bsd/vax/vfork.S +++ b/sysdeps/unix/bsd/vax/vfork.S @@ -27,7 +27,6 @@ Cambridge, MA 02139, USA. */ replaced by a call to `execve'. Return -1 for errors, 0 to the new process, and the process ID of the new process to the old process. */ .globl ___vfork -error: jmp syscall_error ___vfork: .word 0 /* Save our return address in R2, and return to code below. */ From 558e7e0f601bcae5d3d673d2108ea3e632920010 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 17 Jan 1996 02:31:44 +0000 Subject: [PATCH 0576/4487] (crypt): Don't define if building a shared library. --- sysdeps/m68k/Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile index ea0c7d5cbb..12e9b56787 100644 --- a/sysdeps/m68k/Makefile +++ b/sysdeps/m68k/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1993, 1994 Free Software Foundation, Inc. +# Copyright (C) 1993, 1994, 1996 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,7 +20,10 @@ # way to choose a sysdep file based on MIT vs Motorola syntax. # No existing m68k ports use Motorola syntax. -crypt := crypt.sun3 # Use crypt/crypt.sun3.S. +# Don't use crypt/crypt.sun3.S. It's not pic-clean. +ifneq (yes,$(build-shared)) +crypt := crypt.sun3 +endif # The mpn functions need this. All existing 68k ports use MIT syntax. If # a new port wants to use Motorola or Sony syntax, it can redefine this @@ -29,4 +32,4 @@ ifndef m68k-syntax-flag m68k-syntax-flag = -DMIT_SYNTAX endif -asm-CPPFLAGS := $(asm-CPPFLAGS) $(m68k-syntax-flag) +asm-CPPFLAGS += $(m68k-syntax-flag) From ec5264327918c74d4997450b33ac0e566c96ea46 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 17 Jan 1996 16:17:48 +0000 Subject: [PATCH 0577/4487] Wed Jan 17 11:04:58 1996 Roland McGrath * sysdeps/unix/sysv/time.S: Moved from sysv4. * sysdeps/unix/sysv/irix4/time.S: File removed. * sysdeps/unix/sysv/linux/signum.h: Moved from sysdeps/unix/sysv/linux/i386. (_NSIG): Move inside #ifdef _SIGNAL_H. --- sysdeps/unix/sysv/irix4/time.S | 1 - sysdeps/unix/sysv/sysv4/time.S | 22 ---------------------- 2 files changed, 23 deletions(-) delete mode 100644 sysdeps/unix/sysv/irix4/time.S delete mode 100644 sysdeps/unix/sysv/sysv4/time.S diff --git a/sysdeps/unix/sysv/irix4/time.S b/sysdeps/unix/sysv/irix4/time.S deleted file mode 100644 index 23bfe5deac..0000000000 --- a/sysdeps/unix/sysv/irix4/time.S +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/sysv4/time.S b/sysdeps/unix/sysv/sysv4/time.S deleted file mode 100644 index 61f3514fb7..0000000000 --- a/sysdeps/unix/sysv/sysv4/time.S +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@zen.org). - -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 -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -SYSCALL (time, 1) - ret From 39a7d65249b333904ffac088172d8c8e9091d49b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 17 Jan 1996 17:13:22 +0000 Subject: [PATCH 0578/4487] Sun Jan 14 01:01:10 1996 Ulrich Drepper * sysdeps/mips/bytesex.h: Add default byte sex. By Ralf Baechle. * sysdeps/unix/sysv/linux/adjtime.c [! MOD_OFFSET]: Use `mode' member of `struct timex' instead of `modes'. From Andreas Schwab. * sysdeps/unix/sysv/linux/mknod.c: New file. Generic C version. * sysdeps/unix/sysv/linux/i386/mknod.S: Remove assembler version. * sysdeps/unix/sysv/linux/Makefile (inhibit-glue): New variable. [$(subdir) = misc] (sysdep_routines): Add mount, umount, and s_ptrace. [$(subdir) = misc] (headers): Append sys/mount.h. * sysdeps/unix/sysv/linux/mount.S, sysdeps/unix/sysv/linux/umount.S: New files. Implement system calls. * sysdeps/unix/sysv/linux/sys/mount.h: New header file. * sysdeps/unix/sysv/linux/ptrace.c: New file. Wrapper around ptrace system call. * sysdeps/unix/sysv/linux/s_ptrace.S: New file: ptrace system call. * sysdeps/unix/sysv/linux/i386/gnu/types.h: New file with correct types for i386/Linux. --- sysdeps/mips/bytesex.h | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 sysdeps/mips/bytesex.h diff --git a/sysdeps/mips/bytesex.h b/sysdeps/mips/bytesex.h new file mode 100644 index 0000000000..ba555cd76e --- /dev/null +++ b/sysdeps/mips/bytesex.h @@ -0,0 +1,4 @@ +/* The MIPS architecture has selectable endianness. + This file is for a machine using big-endian mode. */ + +#define __BYTE_ORDER __BIG_ENDIAN From 6a877eaec38b3b9bff5ce6e86ba22f226cd0f26d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 18 Jan 1996 00:32:06 +0000 Subject: [PATCH 0579/4487] Wed Jan 17 11:04:58 1996 Roland McGrath * io/sys/stat.h (_STAT_VER, _MKNOD_VER): New macros. (__xstat, __fxstat, __lxstat, __xmknod): Declare new functions. [__GNUC__] (stat, fstat, lstat, mknod): Define these (and __ names) as `extern inline's calling the `x' functions. * sysdeps/generic/lstat.c: File removed. * sysdeps/generic/lxstat.c: New file. * sysdeps/mach/hurd/fstat.c: File removed. * sysdeps/mach/hurd/fxstat.c: New file. * sysdeps/mach/hurd/lstat.c: File removed. * sysdeps/mach/hurd/lxstat.c: New file. * sysdeps/mach/hurd/mknod.c: File removed. * sysdeps/mach/hurd/stat.c: File removed. * sysdeps/mach/hurd/xmknod.c: New file. * sysdeps/mach/hurd/xstat.c: New file. * sysdeps/stub/fstat.c: File removed. * sysdeps/stub/fxstat.c: New file. * sysdeps/stub/lstat.c: File removed. * sysdeps/stub/lxstat.c: New file. * sysdeps/stub/mknod.c: File removed. * sysdeps/stub/stat.c: File removed. * sysdeps/stub/xmknod.c: New file. * sysdeps/stub/xstat.c: New file. * sysdeps/unix/common/lstat.S: File removed. * sysdeps/unix/common/lxstat.c: New file. * sysdeps/unix/fstat.S: File removed. * sysdeps/unix/fxstat.c: New file. * sysdeps/unix/mknod.S: File removed. * sysdeps/unix/stat.S: File removed. * sysdeps/unix/sysv/linux/fstat.c: File removed. * sysdeps/unix/sysv/linux/i386/fxstat.S: File removed. * sysdeps/unix/sysv/linux/i386/lxstat.S: File removed. * sysdeps/unix/sysv/linux/i386/xmknod.S: File removed. * sysdeps/unix/sysv/linux/i386/xstat.S: File removed. * sysdeps/unix/sysv/linux/lstat.c: File removed. * sysdeps/unix/sysv/linux/mknod.c: File removed. * sysdeps/unix/sysv/linux/stat.c: File removed. * sysdeps/unix/sysv/sysv4/i386/fstat.S: File removed. * sysdeps/unix/sysv/sysv4/i386/lstat.S: File removed. * sysdeps/unix/sysv/sysv4/i386/mknod.S: File removed. * sysdeps/unix/sysv/sysv4/i386/stat.S: File removed. * sysdeps/unix/xmknod.c: New file. * sysdeps/unix/xstat.c: New file. * sysdeps/unix/mkfifo.c: Use __xmknod instead of __mknod. * misc/Makefile (routines): Remove mknod. --- sysdeps/unix/sysv/sysv4/i386/fstat.S | 37 ---------------------------- sysdeps/unix/sysv/sysv4/i386/lstat.S | 37 ---------------------------- sysdeps/unix/sysv/sysv4/i386/mknod.S | 36 --------------------------- sysdeps/unix/sysv/sysv4/i386/stat.S | 37 ---------------------------- 4 files changed, 147 deletions(-) delete mode 100644 sysdeps/unix/sysv/sysv4/i386/fstat.S delete mode 100644 sysdeps/unix/sysv/sysv4/i386/lstat.S delete mode 100644 sysdeps/unix/sysv/sysv4/i386/mknod.S delete mode 100644 sysdeps/unix/sysv/sysv4/i386/stat.S diff --git a/sysdeps/unix/sysv/sysv4/i386/fstat.S b/sysdeps/unix/sysv/sysv4/i386/fstat.S deleted file mode 100644 index 11743b3fc3..0000000000 --- a/sysdeps/unix/sysv/sysv4/i386/fstat.S +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (C) 1994, 1995 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -/* In SVR4 the `stat' call is actually done by the `xstat' system call, - which takes an additional first argument giving a version number for - `struct stat'. Likewise for `fstat' and `lstat' there are `fxstat' and - `lxstat' system calls. This macro gives the SVR4 version number that - corresponds to the definition of `struct stat' in . */ -#define _STAT_VER 2 - -.globl syscall_error -ENTRY (__fstat) - popl %eax /* Pop return address into %eax. */ - pushl $_STAT_VER /* Push extra first arg to syscall. */ - pushl %eax /* Push back the return address. */ - DO_CALL (fxstat, 3) /* Do the syscall. */ - jb syscall_error /* Check for error. */ - ret /* Return success. */ - -weak_alias (__fstat, fstat) diff --git a/sysdeps/unix/sysv/sysv4/i386/lstat.S b/sysdeps/unix/sysv/sysv4/i386/lstat.S deleted file mode 100644 index 52ffdbadfd..0000000000 --- a/sysdeps/unix/sysv/sysv4/i386/lstat.S +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (C) 1994, 1995 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -/* In SVR4 the `stat' call is actually done by the `xstat' system call, - which takes an additional first argument giving a version number for - `struct stat'. Likewise for `fstat' and `lstat' there are `fxstat' and - `lxstat' system calls. This macro gives the SVR4 version number that - corresponds to the definition of `struct stat' in . */ -#define _STAT_VER 2 - -.globl syscall_error -ENTRY (__lstat) - popl %eax /* Pop return address into %eax. */ - pushl $_STAT_VER /* Push extra first arg to syscall. */ - pushl %eax /* Push back the return address. */ - DO_CALL (lxstat, 3) /* Do the syscall. */ - jb syscall_error /* Check for error. */ - ret /* Return success. */ - -weak_alias (__lstat, lstat) diff --git a/sysdeps/unix/sysv/sysv4/i386/mknod.S b/sysdeps/unix/sysv/sysv4/i386/mknod.S deleted file mode 100644 index 21f932c921..0000000000 --- a/sysdeps/unix/sysv/sysv4/i386/mknod.S +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright (C) 1994, 1995 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -/* In SVR4 the `mknod' call is actually done by the `xmknod' system call, - which takes an additional first argument giving a version number for - the interface. This macro gives the SVR4 version number that - corresponds to the modern interface. */ -#define _MKNOD_VER 2 - -.globl syscall_error -ENTRY (__mknod) - popl %eax /* Pop return address into %eax. */ - pushl $_MKNOD_VER /* Push extra first arg to syscall. */ - pushl %eax /* Push back the return address. */ - DO_CALL (xmknod, 3) /* Do the syscall. */ - jb syscall_error /* Check for error. */ - ret /* Return success. */ - -weak_alias (__mknod, mknod) diff --git a/sysdeps/unix/sysv/sysv4/i386/stat.S b/sysdeps/unix/sysv/sysv4/i386/stat.S deleted file mode 100644 index 3a5107c267..0000000000 --- a/sysdeps/unix/sysv/sysv4/i386/stat.S +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (C) 1994, 1995 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -/* In SVR4 the `stat' call is actually done by the `xstat' system call, - which takes an additional first argument giving a version number for - `struct stat'. Likewise for `fstat' and `lstat' there are `fxstat' and - `lxstat' system calls. This macro gives the SVR4 version number that - corresponds to the definition of `struct stat' in . */ -#define _STAT_VER 2 - -.globl syscall_error -ENTRY (__stat) - popl %eax /* Pop return address into %eax. */ - pushl $_STAT_VER /* Push extra first arg to syscall. */ - pushl %eax /* Push back the return address. */ - DO_CALL (xstat, 3) /* Do the syscall. */ - jb syscall_error /* Check for error. */ - ret /* Return success. */ - -weak_alias (__stat, stat) From db8f417b654e942b8fa7f65f4138e4b15cb7696c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 18 Jan 1996 00:47:59 +0000 Subject: [PATCH 0580/4487] (_STAT_VER, _MKNOD_VER): New macros. --- sysdeps/unix/sysv/sysv4/i386/statbuf.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/sysv4/i386/statbuf.h b/sysdeps/unix/sysv/sysv4/i386/statbuf.h index 6f1bfed850..ada49ce6d0 100644 --- a/sysdeps/unix/sysv/sysv4/i386/statbuf.h +++ b/sysdeps/unix/sysv/sysv4/i386/statbuf.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1996 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -21,6 +21,11 @@ Cambridge, MA 02139, USA. */ #include +/* Versions of the `struct stat' data structure and + the bits of the `xmknod' interface. */ +#define _STAT_VER 2 +#define _MKNOD_VER 2 + /* Structure describing file characteristics. */ struct stat { @@ -35,7 +40,7 @@ struct stat long st_filler2[2]; long st_size; /* Size of file, in bytes. */ - /* SVR4 added this extra long to allow for expansion of off_t. */ + /* SVR4 added this extra long to allow for expansion of off_t. */ long st_filler3; long st_atime; /* Time of last access. */ From e2967628e22fb2530d152b1dbd2398e45bc4fc97 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 19 Jan 1996 00:42:21 +0000 Subject: [PATCH 0581/4487] Thu Jan 18 00:32:43 1996 Roland McGrath Replaced all simple system call files *.S throughout sysdeps/unix with syscalls.list files to be processed by make-syscalls.sh. * sysdeps/unix/s-proto.S: New file. * sysdeps/unix/syscalls.list: New file. * sysdeps/unix/bsd/syscalls.list: New file. * sysdeps/unix/bsd/bsd4.4/syscalls.list: New file. * sysdeps/unix/bsd/hp/m68k/syscalls.list: New file. * sysdeps/unix/bsd/osf/syscalls.list: New file. * sysdeps/unix/bsd/osf/alpha/syscalls.list: New file. * sysdeps/unix/bsd/sony/newsos4/syscalls.list: New file. * sysdeps/unix/bsd/sun/syscalls.list: New file. * sysdeps/unix/bsd/sun/sunos4/syscalls.list: New file. * sysdeps/unix/bsd/ultrix4/syscalls.list: New file. * sysdeps/unix/common/syscalls.list: New file. * sysdeps/unix/inet/syscalls.list: New file. * sysdeps/unix/mman/syscalls.list: New file. * sysdeps/unix/sysv/syscalls.list: New file. * sysdeps/unix/sysv/irix4/syscalls.list: New file. * sysdeps/unix/sysv/isc2.2/syscalls.list: New file. * sysdeps/unix/sysv/linux/syscalls.list: New file. * sysdeps/unix/sysv/linux/i386/syscalls.list: New file. * sysdeps/unix/sysv/sco3.2.4/syscalls.list: New file. * sysdeps/unix/sysv/sysv4/syscalls.list: New file. * sysdeps/unix/sysv/sysv4/i386/syscalls.list: New file. * sysdeps/unix/sysv/sysv4/solaris2/sparc/syscalls.list: New file. * sysdeps/unix/acct.S: File removed. * sysdeps/unix/chdir.S: File removed. * sysdeps/unix/chmod.S: File removed. * sysdeps/unix/chown.S: File removed. * sysdeps/unix/chroot.S: File removed. * sysdeps/unix/close.S: File removed. * sysdeps/unix/configure: File removed. * sysdeps/unix/configure.in: File removed. * sysdeps/unix/dup.S: File removed. * sysdeps/unix/fcntl.S: File removed. * sysdeps/unix/fsync.S: File removed. * sysdeps/unix/getgid.S: File removed. * sysdeps/unix/getpid.S: File removed. * sysdeps/unix/getuid.S: File removed. * sysdeps/unix/ioctl.S: File removed. * sysdeps/unix/kill.S: File removed. * sysdeps/unix/link.S: File removed. * sysdeps/unix/lseek.S: File removed. * sysdeps/unix/open.S: File removed. * sysdeps/unix/ptrace.S: File removed. * sysdeps/unix/read.S: File removed. * sysdeps/unix/reboot.S: File removed. * sysdeps/unix/setgid.S: File removed. * sysdeps/unix/setuid.S: File removed. * sysdeps/unix/sync.S: File removed. * sysdeps/unix/umask.S: File removed. * sysdeps/unix/unlink.S: File removed. * sysdeps/unix/write.S: File removed. * sysdeps/unix/bsd/flock.S: File removed. * sysdeps/unix/bsd/getdtsz.S: File removed. * sysdeps/unix/bsd/getpagesize.S: File removed. * sysdeps/unix/bsd/killpg.S: File removed. * sysdeps/unix/bsd/profil.S: File removed. * sysdeps/unix/bsd/readv.S: File removed. * sysdeps/unix/bsd/settimeofday.S: File removed. * sysdeps/unix/bsd/sigblock.S: File removed. * sysdeps/unix/bsd/sigpause.S: File removed. * sysdeps/unix/bsd/sigsetmask.S: File removed. * sysdeps/unix/bsd/sigstack.S: File removed. * sysdeps/unix/bsd/sigvec.S: File removed. * sysdeps/unix/bsd/utimes.S: File removed. * sysdeps/unix/bsd/writev.S: File removed. * sysdeps/unix/bsd/bsd4.4/chflags.S: File removed. * sysdeps/unix/bsd/bsd4.4/fchdir.S: File removed. * sysdeps/unix/bsd/bsd4.4/fchflags.S: File removed. * sysdeps/unix/bsd/bsd4.4/getdents.S: File removed. * sysdeps/unix/bsd/bsd4.4/getdomain.S: File removed. * sysdeps/unix/bsd/bsd4.4/revoke.S: File removed. * sysdeps/unix/bsd/bsd4.4/setdomain.S: File removed. * sysdeps/unix/bsd/bsd4.4/setegid.S: File removed. * sysdeps/unix/bsd/bsd4.4/seteuid.S: File removed. * sysdeps/unix/bsd/bsd4.4/setlogin.S: File removed. * sysdeps/unix/bsd/bsd4.4/setsid.S: File removed. * sysdeps/unix/bsd/bsd4.4/sigaltstack.S: File removed. * sysdeps/unix/bsd/bsd4.4/wait4.S: File removed. * sysdeps/unix/bsd/hp/m68k/getdents.S: File removed. * sysdeps/unix/bsd/osf/msync.S: File removed. * sysdeps/unix/bsd/osf/alpha/wait4.S: File removed. * sysdeps/unix/bsd/sony/newsos4/fchdir.S: File removed. * sysdeps/unix/bsd/sony/newsos4/sys_wait4.S: File removed. * sysdeps/unix/bsd/sun/getdents.S: File removed. * sysdeps/unix/bsd/sun/sunos3/m68k/wait.S: File removed. * sysdeps/unix/bsd/sun/sunos4/msync.S: File removed. * sysdeps/unix/bsd/sun/sunos4/poll.S: File removed. * sysdeps/unix/bsd/sun/sunos4/setsid.S: File removed. * sysdeps/unix/bsd/sun/sunos4/sys_mmap.S: File removed. * sysdeps/unix/bsd/sun/sunos4/sys_wait4.S: File removed. * sysdeps/unix/bsd/sun/sunos4/uname.S: File removed. * sysdeps/unix/bsd/ultrix4/getdents.S: File removed. * sysdeps/unix/bsd/ultrix4/setsid.S: File removed. * sysdeps/unix/bsd/ultrix4/uname.S: File removed. * sysdeps/unix/common/access.S: File removed. * sysdeps/unix/common/adjtime.S: File removed. * sysdeps/unix/common/dup2.S: File removed. * sysdeps/unix/common/fchmod.S: File removed. * sysdeps/unix/common/fchown.S: File removed. * sysdeps/unix/common/ftruncate.S: File removed. * sysdeps/unix/common/getgroups.S: File removed. * sysdeps/unix/common/getitimer.S: File removed. * sysdeps/unix/common/getpgid.S: File removed. * sysdeps/unix/common/getpriority.S: File removed. * sysdeps/unix/common/getrlimit.S: File removed. * sysdeps/unix/common/getrusage.S: File removed. * sysdeps/unix/common/gettimeofday.S: File removed. * sysdeps/unix/common/mkdir.S: File removed. * sysdeps/unix/common/readlink.S: File removed. * sysdeps/unix/common/rename.S: File removed. * sysdeps/unix/common/rmdir.S: File removed. * sysdeps/unix/common/select.S: File removed. * sysdeps/unix/common/setgroups.S: File removed. * sysdeps/unix/common/setitimer.S: File removed. * sysdeps/unix/common/setpgid.S: File removed. * sysdeps/unix/common/setpriority.S: File removed. * sysdeps/unix/common/setregid.S: File removed. * sysdeps/unix/common/setreuid.S: File removed. * sysdeps/unix/common/setrlimit.S: File removed. * sysdeps/unix/common/swapon.S: File removed. * sysdeps/unix/common/symlink.S: File removed. * sysdeps/unix/common/truncate.S: File removed. * sysdeps/unix/common/vhangup.S: File removed. * sysdeps/unix/inet/accept.S: File removed. * sysdeps/unix/inet/bind.S: File removed. * sysdeps/unix/inet/connect.S: File removed. * sysdeps/unix/inet/gethostid.S: File removed. * sysdeps/unix/inet/gethostname.S: File removed. * sysdeps/unix/inet/getpeername.S: File removed. * sysdeps/unix/inet/getsockname.S: File removed. * sysdeps/unix/inet/getsockopt.S: File removed. * sysdeps/unix/inet/listen.S: File removed. * sysdeps/unix/inet/recv.S: File removed. * sysdeps/unix/inet/recvfrom.S: File removed. * sysdeps/unix/inet/recvmsg.S: File removed. * sysdeps/unix/inet/send.S: File removed. * sysdeps/unix/inet/sendmsg.S: File removed. * sysdeps/unix/inet/sendto.S: File removed. * sysdeps/unix/inet/sethostid.S: File removed. * sysdeps/unix/inet/sethostname.S: File removed. * sysdeps/unix/inet/setsockopt.S: File removed. * sysdeps/unix/inet/shutdown.S: File removed. * sysdeps/unix/inet/socket.S: File removed. * sysdeps/unix/inet/socketpair.S: File removed. * sysdeps/unix/mman/madvise.S: File removed. * sysdeps/unix/mman/mmap.S: File removed. * sysdeps/unix/mman/mprotect.S: File removed. * sysdeps/unix/mman/msync.S: File removed. * sysdeps/unix/mman/munmap.S: File removed. * sysdeps/unix/sysv/alarm.S: File removed. * sysdeps/unix/sysv/ftime.S: File removed. * sysdeps/unix/sysv/nice.S: File removed. * sysdeps/unix/sysv/pause.S: File removed. * sysdeps/unix/sysv/poll.S: File removed. * sysdeps/unix/sysv/s_getdents.S: File removed. * sysdeps/unix/sysv/signal.S: File removed. * sysdeps/unix/sysv/stime.S: File removed. * sysdeps/unix/sysv/time.S: File removed. * sysdeps/unix/sysv/times.S: File removed. * sysdeps/unix/sysv/ulimit.S: File removed. * sysdeps/unix/sysv/uname.S: File removed. * sysdeps/unix/sysv/utime.S: File removed. * sysdeps/unix/sysv/irix4/getpgid.S: File removed. * sysdeps/unix/sysv/irix4/msync.S: File removed. * sysdeps/unix/sysv/irix4/setpgid.S: File removed. * sysdeps/unix/sysv/irix4/signal.S: File removed. * sysdeps/unix/sysv/irix4/sysmp.S: File removed. * sysdeps/unix/sysv/irix4/syssgi.S: File removed. * sysdeps/unix/sysv/isc2.2/rename.S: File removed. * sysdeps/unix/sysv/linux/adjtimex.S: File removed. * sysdeps/unix/sysv/linux/fork.S: File removed. * sysdeps/unix/sysv/linux/getpgid.S: File removed. * sysdeps/unix/sysv/linux/getpgrp.S: File removed. * sysdeps/unix/sysv/linux/getsid.S: File removed. * sysdeps/unix/sysv/linux/gtty.S: File removed. * sysdeps/unix/sysv/linux/mlock.S: File removed. * sysdeps/unix/sysv/linux/mlockall.S: File removed. * sysdeps/unix/sysv/linux/mount.S: File removed. * sysdeps/unix/sysv/linux/munlock.S: File removed. * sysdeps/unix/sysv/linux/munlockall.S: File removed. * sysdeps/unix/sysv/linux/pipe.S: File removed. * sysdeps/unix/sysv/linux/s_ptrace.S: File removed. * sysdeps/unix/sysv/linux/setpgid.S: File removed. * sysdeps/unix/sysv/linux/setsid.S: File removed. * sysdeps/unix/sysv/linux/settimeofday.S: File removed. * sysdeps/unix/sysv/linux/sigpending.S: File removed. * sysdeps/unix/sysv/linux/stty.S: File removed. * sysdeps/unix/sysv/linux/umount.S: File removed. * sysdeps/unix/sysv/linux/wait4.S: File removed. * sysdeps/unix/sysv/linux/i386/ipc.S: File removed. * sysdeps/unix/sysv/sco3.2.4/pathconf.S: File removed. * sysdeps/unix/sysv/sco3.2.4/pgrpsys.S: File removed. * sysdeps/unix/sysv/sco3.2.4/sco_getgrp.S: File removed. * sysdeps/unix/sysv/sco3.2.4/sigpending.S: File removed. * sysdeps/unix/sysv/sco3.2.4/sigprocmask.S: File removed. * sysdeps/unix/sysv/sco3.2.4/sigsuspend.S: File removed. * sysdeps/unix/sysv/sysv4/pgrpsys.S: File removed. * sysdeps/unix/sysv/sysv4/sigprocmask.S: File removed. * sysdeps/unix/sysv/sysv4/sigsuspend.S: File removed. * sysdeps/unix/sysv/sysv4/sysconfig.S: File removed. * sysdeps/unix/sysv/sysv4/sysinfo.S: File removed. * sysdeps/unix/sysv/sysv4/solaris2/sparc/sys-sig.S: File removed. --- sysdeps/unix/bsd/hp/m68k/getdents.S | 1 - sysdeps/unix/bsd/hp/m68k/syscalls.list | 3 +++ sysdeps/unix/bsd/osf/alpha/syscalls.list | 3 +++ sysdeps/unix/bsd/osf/alpha/wait4.S | 1 - sysdeps/unix/bsd/osf/msync.S | 1 - sysdeps/unix/bsd/osf/syscalls.list | 3 +++ sysdeps/unix/bsd/sony/newsos4/fchdir.S | 1 - sysdeps/unix/bsd/sony/newsos4/sys_wait4.S | 1 - sysdeps/unix/bsd/sony/newsos4/syscalls.list | 3 +++ sysdeps/unix/bsd/sun/getdents.S | 24 ------------------ sysdeps/unix/bsd/sun/sunos3/m68k/wait.S | 1 - sysdeps/unix/bsd/sun/sunos4/msync.S | 22 ---------------- sysdeps/unix/bsd/sun/sunos4/poll.S | 1 - sysdeps/unix/bsd/sun/sunos4/setsid.S | 1 - sysdeps/unix/bsd/sun/sunos4/sys_mmap.S | 22 ---------------- sysdeps/unix/bsd/sun/sunos4/sys_wait4.S | 22 ---------------- sysdeps/unix/bsd/sun/sunos4/syscalls.list | 8 ++++++ sysdeps/unix/bsd/sun/sunos4/uname.S | 1 - sysdeps/unix/bsd/sun/syscalls.list | 3 +++ sysdeps/unix/bsd/ultrix4/getdents.S | 1 - sysdeps/unix/bsd/ultrix4/setsid.S | 1 - sysdeps/unix/bsd/ultrix4/syscalls.list | 5 ++++ sysdeps/unix/bsd/ultrix4/uname.S | 1 - sysdeps/unix/sysv/irix4/getpgid.S | 24 ------------------ sysdeps/unix/sysv/irix4/msync.S | 1 - sysdeps/unix/sysv/irix4/setpgid.S | 25 ------------------- sysdeps/unix/sysv/irix4/signal.S | 22 ---------------- sysdeps/unix/sysv/irix4/syscalls.list | 8 ++++++ sysdeps/unix/sysv/irix4/sysmp.S | 22 ---------------- sysdeps/unix/sysv/irix4/syssgi.S | 22 ---------------- sysdeps/unix/sysv/isc2.2/rename.S | 1 - sysdeps/unix/sysv/isc2.2/syscalls.list | 2 ++ sysdeps/unix/sysv/sco3.2.4/pathconf.S | 24 ------------------ sysdeps/unix/sysv/sco3.2.4/pgrpsys.S | 1 - sysdeps/unix/sysv/sco3.2.4/sco_getgrp.S | 22 ---------------- sysdeps/unix/sysv/sco3.2.4/sigpending.S | 22 ---------------- sysdeps/unix/sysv/sco3.2.4/sigprocmask.S | 24 ------------------ sysdeps/unix/sysv/sco3.2.4/sigsuspend.S | 1 - sysdeps/unix/sysv/sco3.2.4/syscalls.list | 8 ++++++ sysdeps/unix/sysv/sysv4/i386/syscalls.list | 6 +++++ sysdeps/unix/sysv/sysv4/pgrpsys.S | 22 ---------------- sysdeps/unix/sysv/sysv4/sigprocmask.S | 24 ------------------ sysdeps/unix/sysv/sysv4/sigsuspend.S | 22 ---------------- .../unix/sysv/sysv4/solaris2/sparc/sys-sig.S | 25 ------------------- .../sysv/sysv4/solaris2/sparc/syscalls.list | 3 +++ sysdeps/unix/sysv/sysv4/syscalls.list | 7 ++++++ sysdeps/unix/sysv/sysv4/sysconfig.S | 22 ---------------- sysdeps/unix/sysv/sysv4/sysinfo.S | 22 ---------------- 48 files changed, 62 insertions(+), 450 deletions(-) delete mode 100644 sysdeps/unix/bsd/hp/m68k/getdents.S create mode 100644 sysdeps/unix/bsd/hp/m68k/syscalls.list create mode 100644 sysdeps/unix/bsd/osf/alpha/syscalls.list delete mode 100644 sysdeps/unix/bsd/osf/alpha/wait4.S delete mode 100644 sysdeps/unix/bsd/osf/msync.S create mode 100644 sysdeps/unix/bsd/osf/syscalls.list delete mode 100644 sysdeps/unix/bsd/sony/newsos4/fchdir.S delete mode 100644 sysdeps/unix/bsd/sony/newsos4/sys_wait4.S create mode 100644 sysdeps/unix/bsd/sony/newsos4/syscalls.list delete mode 100644 sysdeps/unix/bsd/sun/getdents.S delete mode 100644 sysdeps/unix/bsd/sun/sunos3/m68k/wait.S delete mode 100644 sysdeps/unix/bsd/sun/sunos4/msync.S delete mode 100644 sysdeps/unix/bsd/sun/sunos4/poll.S delete mode 100644 sysdeps/unix/bsd/sun/sunos4/setsid.S delete mode 100644 sysdeps/unix/bsd/sun/sunos4/sys_mmap.S delete mode 100644 sysdeps/unix/bsd/sun/sunos4/sys_wait4.S create mode 100644 sysdeps/unix/bsd/sun/sunos4/syscalls.list delete mode 100644 sysdeps/unix/bsd/sun/sunos4/uname.S create mode 100644 sysdeps/unix/bsd/sun/syscalls.list delete mode 100644 sysdeps/unix/bsd/ultrix4/getdents.S delete mode 100644 sysdeps/unix/bsd/ultrix4/setsid.S create mode 100644 sysdeps/unix/bsd/ultrix4/syscalls.list delete mode 100644 sysdeps/unix/bsd/ultrix4/uname.S delete mode 100644 sysdeps/unix/sysv/irix4/getpgid.S delete mode 100644 sysdeps/unix/sysv/irix4/msync.S delete mode 100644 sysdeps/unix/sysv/irix4/setpgid.S delete mode 100644 sysdeps/unix/sysv/irix4/signal.S create mode 100644 sysdeps/unix/sysv/irix4/syscalls.list delete mode 100644 sysdeps/unix/sysv/irix4/sysmp.S delete mode 100644 sysdeps/unix/sysv/irix4/syssgi.S delete mode 100644 sysdeps/unix/sysv/isc2.2/rename.S create mode 100644 sysdeps/unix/sysv/isc2.2/syscalls.list delete mode 100644 sysdeps/unix/sysv/sco3.2.4/pathconf.S delete mode 100644 sysdeps/unix/sysv/sco3.2.4/pgrpsys.S delete mode 100644 sysdeps/unix/sysv/sco3.2.4/sco_getgrp.S delete mode 100644 sysdeps/unix/sysv/sco3.2.4/sigpending.S delete mode 100644 sysdeps/unix/sysv/sco3.2.4/sigprocmask.S delete mode 100644 sysdeps/unix/sysv/sco3.2.4/sigsuspend.S create mode 100644 sysdeps/unix/sysv/sco3.2.4/syscalls.list create mode 100644 sysdeps/unix/sysv/sysv4/i386/syscalls.list delete mode 100644 sysdeps/unix/sysv/sysv4/pgrpsys.S delete mode 100644 sysdeps/unix/sysv/sysv4/sigprocmask.S delete mode 100644 sysdeps/unix/sysv/sysv4/sigsuspend.S delete mode 100644 sysdeps/unix/sysv/sysv4/solaris2/sparc/sys-sig.S create mode 100644 sysdeps/unix/sysv/sysv4/solaris2/sparc/syscalls.list create mode 100644 sysdeps/unix/sysv/sysv4/syscalls.list delete mode 100644 sysdeps/unix/sysv/sysv4/sysconfig.S delete mode 100644 sysdeps/unix/sysv/sysv4/sysinfo.S diff --git a/sysdeps/unix/bsd/hp/m68k/getdents.S b/sysdeps/unix/bsd/hp/m68k/getdents.S deleted file mode 100644 index be449b2bcb..0000000000 --- a/sysdeps/unix/bsd/hp/m68k/getdents.S +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/bsd/hp/m68k/syscalls.list b/sysdeps/unix/bsd/hp/m68k/syscalls.list new file mode 100644 index 0000000000..b9dca13bf7 --- /dev/null +++ b/sysdeps/unix/bsd/hp/m68k/syscalls.list @@ -0,0 +1,3 @@ +# File name Caller Syscall name # args Strong name Weak names + +getdents - getdirentries 4 __getdirentries getdirentries diff --git a/sysdeps/unix/bsd/osf/alpha/syscalls.list b/sysdeps/unix/bsd/osf/alpha/syscalls.list new file mode 100644 index 0000000000..ac883925e1 --- /dev/null +++ b/sysdeps/unix/bsd/osf/alpha/syscalls.list @@ -0,0 +1,3 @@ +# File name Caller Syscall name # args Strong name Weak names + +wait4 - wait4 4 __wait4 wait4 diff --git a/sysdeps/unix/bsd/osf/alpha/wait4.S b/sysdeps/unix/bsd/osf/alpha/wait4.S deleted file mode 100644 index e4c322341d..0000000000 --- a/sysdeps/unix/bsd/osf/alpha/wait4.S +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/bsd/osf/msync.S b/sysdeps/unix/bsd/osf/msync.S deleted file mode 100644 index 75b9f1531d..0000000000 --- a/sysdeps/unix/bsd/osf/msync.S +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/bsd/osf/syscalls.list b/sysdeps/unix/bsd/osf/syscalls.list new file mode 100644 index 0000000000..731763b3eb --- /dev/null +++ b/sysdeps/unix/bsd/osf/syscalls.list @@ -0,0 +1,3 @@ +# File name Caller Syscall name # args Strong name Weak names + +msync - msync 3 msync diff --git a/sysdeps/unix/bsd/sony/newsos4/fchdir.S b/sysdeps/unix/bsd/sony/newsos4/fchdir.S deleted file mode 100644 index 6db7282ac9..0000000000 --- a/sysdeps/unix/bsd/sony/newsos4/fchdir.S +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/bsd/sony/newsos4/sys_wait4.S b/sysdeps/unix/bsd/sony/newsos4/sys_wait4.S deleted file mode 100644 index 6a79710b07..0000000000 --- a/sysdeps/unix/bsd/sony/newsos4/sys_wait4.S +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/bsd/sony/newsos4/syscalls.list b/sysdeps/unix/bsd/sony/newsos4/syscalls.list new file mode 100644 index 0000000000..b90087f426 --- /dev/null +++ b/sysdeps/unix/bsd/sony/newsos4/syscalls.list @@ -0,0 +1,3 @@ +# File name Caller Syscall name # args Strong name Weak names + +sys_wait4 wait4 wait4 4 __wait4_syscall diff --git a/sysdeps/unix/bsd/sun/getdents.S b/sysdeps/unix/bsd/sun/getdents.S deleted file mode 100644 index f283a5cc71..0000000000 --- a/sysdeps/unix/bsd/sun/getdents.S +++ /dev/null @@ -1,24 +0,0 @@ -/* Copyright (C) 1991, 1992, 1995 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -SYSCALL__ (getdirentries, 4) - ret - -weak_alias (__getdirentries, getdirentries) diff --git a/sysdeps/unix/bsd/sun/sunos3/m68k/wait.S b/sysdeps/unix/bsd/sun/sunos3/m68k/wait.S deleted file mode 100644 index f69c4b4431..0000000000 --- a/sysdeps/unix/bsd/sun/sunos3/m68k/wait.S +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/bsd/sun/sunos4/msync.S b/sysdeps/unix/bsd/sun/sunos4/msync.S deleted file mode 100644 index 9fb8955dc2..0000000000 --- a/sysdeps/unix/bsd/sun/sunos4/msync.S +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright (C) 1994 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -SYSCALL (msync, 3) - ret diff --git a/sysdeps/unix/bsd/sun/sunos4/poll.S b/sysdeps/unix/bsd/sun/sunos4/poll.S deleted file mode 100644 index 95c4fd2f82..0000000000 --- a/sysdeps/unix/bsd/sun/sunos4/poll.S +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/bsd/sun/sunos4/setsid.S b/sysdeps/unix/bsd/sun/sunos4/setsid.S deleted file mode 100644 index 4930c56dcf..0000000000 --- a/sysdeps/unix/bsd/sun/sunos4/setsid.S +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/bsd/sun/sunos4/sys_mmap.S b/sysdeps/unix/bsd/sun/sunos4/sys_mmap.S deleted file mode 100644 index 61fe877342..0000000000 --- a/sysdeps/unix/bsd/sun/sunos4/sys_mmap.S +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright (C) 1994 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -PSEUDO (__mmap_syscall, mmap, 5) - ret diff --git a/sysdeps/unix/bsd/sun/sunos4/sys_wait4.S b/sysdeps/unix/bsd/sun/sunos4/sys_wait4.S deleted file mode 100644 index 6b796b7ea6..0000000000 --- a/sysdeps/unix/bsd/sun/sunos4/sys_wait4.S +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright (C) 1991, 1992 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -PSEUDO (__wait4_syscall, wait4, 4) - ret diff --git a/sysdeps/unix/bsd/sun/sunos4/syscalls.list b/sysdeps/unix/bsd/sun/sunos4/syscalls.list new file mode 100644 index 0000000000..7dafdf7afe --- /dev/null +++ b/sysdeps/unix/bsd/sun/sunos4/syscalls.list @@ -0,0 +1,8 @@ +# File name Caller Syscall name # args Strong name Weak names + +msync - msync 3 msync +poll - poll 3 poll +setsid - setsid 0 __setsid setsid +sys_mmap mmap mmap 5 __mmap_syscall +sys_wait4 wait4 wait4 4 __wait4_syscall +uname - uname 1 uname diff --git a/sysdeps/unix/bsd/sun/sunos4/uname.S b/sysdeps/unix/bsd/sun/sunos4/uname.S deleted file mode 100644 index 488eeb1d97..0000000000 --- a/sysdeps/unix/bsd/sun/sunos4/uname.S +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/bsd/sun/syscalls.list b/sysdeps/unix/bsd/sun/syscalls.list new file mode 100644 index 0000000000..b9dca13bf7 --- /dev/null +++ b/sysdeps/unix/bsd/sun/syscalls.list @@ -0,0 +1,3 @@ +# File name Caller Syscall name # args Strong name Weak names + +getdents - getdirentries 4 __getdirentries getdirentries diff --git a/sysdeps/unix/bsd/ultrix4/getdents.S b/sysdeps/unix/bsd/ultrix4/getdents.S deleted file mode 100644 index be449b2bcb..0000000000 --- a/sysdeps/unix/bsd/ultrix4/getdents.S +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/bsd/ultrix4/setsid.S b/sysdeps/unix/bsd/ultrix4/setsid.S deleted file mode 100644 index 4930c56dcf..0000000000 --- a/sysdeps/unix/bsd/ultrix4/setsid.S +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/bsd/ultrix4/syscalls.list b/sysdeps/unix/bsd/ultrix4/syscalls.list new file mode 100644 index 0000000000..dd1052aa8f --- /dev/null +++ b/sysdeps/unix/bsd/ultrix4/syscalls.list @@ -0,0 +1,5 @@ +# File name Caller Syscall name # args Strong name Weak names + +getdents - getdirentries 4 __getdirentries getdirentries +setsid - setsid 0 __setsid setsid +uname - uname 1 uname diff --git a/sysdeps/unix/bsd/ultrix4/uname.S b/sysdeps/unix/bsd/ultrix4/uname.S deleted file mode 100644 index 488eeb1d97..0000000000 --- a/sysdeps/unix/bsd/ultrix4/uname.S +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/irix4/getpgid.S b/sysdeps/unix/sysv/irix4/getpgid.S deleted file mode 100644 index fbef7a2b27..0000000000 --- a/sysdeps/unix/sysv/irix4/getpgid.S +++ /dev/null @@ -1,24 +0,0 @@ -/* Copyright (C) 1994, 1995 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -PSEUDO (__getpgid, bsdgetpgrp, 1) - ret - -weak_alias (__getpgid, getpgid) diff --git a/sysdeps/unix/sysv/irix4/msync.S b/sysdeps/unix/sysv/irix4/msync.S deleted file mode 100644 index 75b9f1531d..0000000000 --- a/sysdeps/unix/sysv/irix4/msync.S +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/irix4/setpgid.S b/sysdeps/unix/sysv/irix4/setpgid.S deleted file mode 100644 index 9267054fe9..0000000000 --- a/sysdeps/unix/sysv/irix4/setpgid.S +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (C) 1994, 1995 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -PSEUDO (__setpgid, bsdsetpgrp, 2) - ret - -weak_alias (__setpgid, setpgid) -weak_alias (__setpgid, setpgrp) diff --git a/sysdeps/unix/sysv/irix4/signal.S b/sysdeps/unix/sysv/irix4/signal.S deleted file mode 100644 index b0c147dadb..0000000000 --- a/sysdeps/unix/sysv/irix4/signal.S +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright (C) 1991, 1992 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -PSEUDO (__raw_signal, signal, 3) - ret diff --git a/sysdeps/unix/sysv/irix4/syscalls.list b/sysdeps/unix/sysv/irix4/syscalls.list new file mode 100644 index 0000000000..47e1c48821 --- /dev/null +++ b/sysdeps/unix/sysv/irix4/syscalls.list @@ -0,0 +1,8 @@ +# File name Caller Syscall name # args Strong name Weak names + +getpgid - bsdgetpgrp 1 __getpgid getpgid +msync - msync 3 msync +setpgid - bsdsetpgrp 2 __setpgid setpgid setpgrp +signal - signal 3 __raw_signal +sysmp - sysmp 4 __sysmp +syssgi - syssgi 2 __syssgi diff --git a/sysdeps/unix/sysv/irix4/sysmp.S b/sysdeps/unix/sysv/irix4/sysmp.S deleted file mode 100644 index 438da60d69..0000000000 --- a/sysdeps/unix/sysv/irix4/sysmp.S +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright (C) 1994 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -SYSCALL__ (sysmp, 4) - ret diff --git a/sysdeps/unix/sysv/irix4/syssgi.S b/sysdeps/unix/sysv/irix4/syssgi.S deleted file mode 100644 index 2715d2899c..0000000000 --- a/sysdeps/unix/sysv/irix4/syssgi.S +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright (C) 1994 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -SYSCALL__ (syssgi, 2) - ret diff --git a/sysdeps/unix/sysv/isc2.2/rename.S b/sysdeps/unix/sysv/isc2.2/rename.S deleted file mode 100644 index a4b2c4207c..0000000000 --- a/sysdeps/unix/sysv/isc2.2/rename.S +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/isc2.2/syscalls.list b/sysdeps/unix/sysv/isc2.2/syscalls.list new file mode 100644 index 0000000000..0ea253e3ca --- /dev/null +++ b/sysdeps/unix/sysv/isc2.2/syscalls.list @@ -0,0 +1,2 @@ +# File name Caller Syscall name # args Strong name Weak names + diff --git a/sysdeps/unix/sysv/sco3.2.4/pathconf.S b/sysdeps/unix/sysv/sco3.2.4/pathconf.S deleted file mode 100644 index 1c4dd9571c..0000000000 --- a/sysdeps/unix/sysv/sco3.2.4/pathconf.S +++ /dev/null @@ -1,24 +0,0 @@ -/* Copyright (C) 1993, 1995 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -SYSCALL__ (pathconf, 2) - ret - -weak_alias (__pathconf, pathconf) diff --git a/sysdeps/unix/sysv/sco3.2.4/pgrpsys.S b/sysdeps/unix/sysv/sco3.2.4/pgrpsys.S deleted file mode 100644 index 2c7d994c28..0000000000 --- a/sysdeps/unix/sysv/sco3.2.4/pgrpsys.S +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/sco3.2.4/sco_getgrp.S b/sysdeps/unix/sysv/sco3.2.4/sco_getgrp.S deleted file mode 100644 index e68c300821..0000000000 --- a/sysdeps/unix/sysv/sco3.2.4/sco_getgrp.S +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright (C) 1994 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -PSEUDO (__sco_getgroups, getgroups, 2) - ret diff --git a/sysdeps/unix/sysv/sco3.2.4/sigpending.S b/sysdeps/unix/sysv/sco3.2.4/sigpending.S deleted file mode 100644 index bc05b2ef6e..0000000000 --- a/sysdeps/unix/sysv/sco3.2.4/sigpending.S +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright (C) 1993 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -SYSCALL (sigpending, 1) - ret diff --git a/sysdeps/unix/sysv/sco3.2.4/sigprocmask.S b/sysdeps/unix/sysv/sco3.2.4/sigprocmask.S deleted file mode 100644 index ff199158a4..0000000000 --- a/sysdeps/unix/sysv/sco3.2.4/sigprocmask.S +++ /dev/null @@ -1,24 +0,0 @@ -/* Copyright (C) 1993, 1995 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -SYSCALL__ (sigprocmask, 3) - ret - -weak_alias (__sigprocmask, sigprocmask) diff --git a/sysdeps/unix/sysv/sco3.2.4/sigsuspend.S b/sysdeps/unix/sysv/sco3.2.4/sigsuspend.S deleted file mode 100644 index 9bce3878fd..0000000000 --- a/sysdeps/unix/sysv/sco3.2.4/sigsuspend.S +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/sco3.2.4/syscalls.list b/sysdeps/unix/sysv/sco3.2.4/syscalls.list new file mode 100644 index 0000000000..bda6c16c76 --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/syscalls.list @@ -0,0 +1,8 @@ +# File name Caller Syscall name # args Strong name Weak names + +pathconf - pathconf 2 __pathconf pathconf +pgrpsys - pgrpsys 3 __pgrpsys +sco_getgrp getgroups getgroups 2 __sco_getgroups +sigpending - sigpending 1 sigpending +sigprocmask - sigprocmask 3 __sigprocmask sigprocmask +sigsuspend - sigsuspend 1 sigsuspend diff --git a/sysdeps/unix/sysv/sysv4/i386/syscalls.list b/sysdeps/unix/sysv/sysv4/i386/syscalls.list new file mode 100644 index 0000000000..560cd8366e --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/i386/syscalls.list @@ -0,0 +1,6 @@ +# File name Caller Syscall name # args Strong name Weak names + +xstat - xstat 3 __xstat _xstat +fxstat - fxstat 3 __fxstat _fxstat +lxstat - lxstat 3 __lxstat _lxstat +xmknod - xmknod 4 __xmknod _xmknod diff --git a/sysdeps/unix/sysv/sysv4/pgrpsys.S b/sysdeps/unix/sysv/sysv4/pgrpsys.S deleted file mode 100644 index dcfb487e54..0000000000 --- a/sysdeps/unix/sysv/sysv4/pgrpsys.S +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright (C) 1993 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -SYSCALL__ (pgrpsys, 3) - ret diff --git a/sysdeps/unix/sysv/sysv4/sigprocmask.S b/sysdeps/unix/sysv/sysv4/sigprocmask.S deleted file mode 100644 index 51fddb0bee..0000000000 --- a/sysdeps/unix/sysv/sysv4/sigprocmask.S +++ /dev/null @@ -1,24 +0,0 @@ -/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@zen.org). - -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 -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -SYSCALL__ (sigprocmask, 3) - ret - -weak_alias (__sigprocmask, sigprocmask) diff --git a/sysdeps/unix/sysv/sysv4/sigsuspend.S b/sysdeps/unix/sysv/sysv4/sigsuspend.S deleted file mode 100644 index 85d36017b8..0000000000 --- a/sysdeps/unix/sysv/sysv4/sigsuspend.S +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright (C) 1993 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -SYSCALL (sigsuspend, 1) - ret diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys-sig.S b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys-sig.S deleted file mode 100644 index 8baa997e80..0000000000 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys-sig.S +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@zen.org). - -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 -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -PSEUDO (__sigaction_syscall, sigaction, 3) - ret - -PSEUDO (__context_syscall, context, 2) - ret diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/syscalls.list b/sysdeps/unix/sysv/sysv4/solaris2/sparc/syscalls.list new file mode 100644 index 0000000000..d96fbba7e2 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/syscalls.list @@ -0,0 +1,3 @@ +# File name Caller Syscall name # args Strong name Weak names + +sys-sig - context 2 __context_syscall diff --git a/sysdeps/unix/sysv/sysv4/syscalls.list b/sysdeps/unix/sysv/sysv4/syscalls.list new file mode 100644 index 0000000000..2919bcc27f --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/syscalls.list @@ -0,0 +1,7 @@ +# File name Caller Syscall name # args Strong name Weak names + +pgrpsys - pgrpsys 3 __pgrpsys +sigprocmask - sigprocmask 3 __sigprocmask sigprocmask +sigsuspend - sigsuspend 1 sigsuspend +sysconfig - sysconfig 1 __sysconfig +sysinfo - systeminfo 3 __sysinfo diff --git a/sysdeps/unix/sysv/sysv4/sysconfig.S b/sysdeps/unix/sysv/sysv4/sysconfig.S deleted file mode 100644 index 034e012e84..0000000000 --- a/sysdeps/unix/sysv/sysv4/sysconfig.S +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@zen.org). - -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 -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -SYSCALL__ (sysconfig, 1) - ret diff --git a/sysdeps/unix/sysv/sysv4/sysinfo.S b/sysdeps/unix/sysv/sysv4/sysinfo.S deleted file mode 100644 index c279c96e9c..0000000000 --- a/sysdeps/unix/sysv/sysv4/sysinfo.S +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@zen.org). - -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 -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -PSEUDO (__sysinfo, systeminfo, 3) - ret From 6e6b8a3126b96ade8383cef2422775cea8706654 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 7 Feb 1996 21:15:15 +0000 Subject: [PATCH 0582/4487] Added sigvec. --- sysdeps/unix/bsd/sun/syscalls.list | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/bsd/sun/syscalls.list b/sysdeps/unix/bsd/sun/syscalls.list index b9dca13bf7..1c0d44d8d9 100644 --- a/sysdeps/unix/bsd/sun/syscalls.list +++ b/sysdeps/unix/bsd/sun/syscalls.list @@ -1,3 +1,4 @@ # File name Caller Syscall name # args Strong name Weak names getdents - getdirentries 4 __getdirentries getdirentries +sigvec - sigvec 3 __raw_sigvec From 3e8eb6b98d39bf00a00042c2127d10c4b0fe7634 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 7 Feb 1996 21:15:47 +0000 Subject: [PATCH 0583/4487] obsolete --- sysdeps/unix/bsd/sun/sigvec.S | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 sysdeps/unix/bsd/sun/sigvec.S diff --git a/sysdeps/unix/bsd/sun/sigvec.S b/sysdeps/unix/bsd/sun/sigvec.S deleted file mode 100644 index c09397486f..0000000000 --- a/sysdeps/unix/bsd/sun/sigvec.S +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright (C) 1991, 1992, 1995 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -/* __sigvec is defined by sigtramp.c. */ - -PSEUDO (__raw_sigvec, sigvec, 3) - ret - -weak_alias (__sigvec, sigvec) From e171df271e8c4fd883a163911a7b2b492b34455b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 12 Feb 1996 08:11:19 +0000 Subject: [PATCH 0584/4487] (sysdep_routines): Removed sigtramp. --- sysdeps/unix/bsd/ultrix4/mips/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/bsd/ultrix4/mips/Makefile b/sysdeps/unix/bsd/ultrix4/mips/Makefile index 0b71fd9e18..74e3b04f6c 100644 --- a/sysdeps/unix/bsd/ultrix4/mips/Makefile +++ b/sysdeps/unix/bsd/ultrix4/mips/Makefile @@ -1,3 +1,3 @@ ifeq ($(subdir),signal) -sysdep_routines := $(sysdep_routines) sigtramp __handler +sysdep_routines := $(sysdep_routines) __handler endif From 5be02f042e5d799d712d26fcebf4c5ebf493604b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 12 Feb 1996 08:33:18 +0000 Subject: [PATCH 0585/4487] Remove redundancies. --- sysdeps/unix/bsd/sun/sunos4/syscalls.list | 2 -- sysdeps/unix/bsd/sun/syscalls.list | 1 - 2 files changed, 3 deletions(-) diff --git a/sysdeps/unix/bsd/sun/sunos4/syscalls.list b/sysdeps/unix/bsd/sun/sunos4/syscalls.list index 7dafdf7afe..59992eed53 100644 --- a/sysdeps/unix/bsd/sun/sunos4/syscalls.list +++ b/sysdeps/unix/bsd/sun/sunos4/syscalls.list @@ -2,7 +2,5 @@ msync - msync 3 msync poll - poll 3 poll -setsid - setsid 0 __setsid setsid sys_mmap mmap mmap 5 __mmap_syscall sys_wait4 wait4 wait4 4 __wait4_syscall -uname - uname 1 uname diff --git a/sysdeps/unix/bsd/sun/syscalls.list b/sysdeps/unix/bsd/sun/syscalls.list index 1c0d44d8d9..079aa9157a 100644 --- a/sysdeps/unix/bsd/sun/syscalls.list +++ b/sysdeps/unix/bsd/sun/syscalls.list @@ -1,4 +1,3 @@ # File name Caller Syscall name # args Strong name Weak names -getdents - getdirentries 4 __getdirentries getdirentries sigvec - sigvec 3 __raw_sigvec From add1bba61387ab14036eec5b1236e18fa1643826 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 12 Feb 1996 08:34:00 +0000 Subject: [PATCH 0586/4487] Remove redundancies. Add getsysinfo. --- sysdeps/unix/bsd/ultrix4/syscalls.list | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sysdeps/unix/bsd/ultrix4/syscalls.list b/sysdeps/unix/bsd/ultrix4/syscalls.list index dd1052aa8f..68df0a766a 100644 --- a/sysdeps/unix/bsd/ultrix4/syscalls.list +++ b/sysdeps/unix/bsd/ultrix4/syscalls.list @@ -1,5 +1,3 @@ # File name Caller Syscall name # args Strong name Weak names -getdents - getdirentries 4 __getdirentries getdirentries -setsid - setsid 0 __setsid setsid -uname - uname 1 uname +getsysinfo sysconf getsysinfo 5 __getsysinfo From 312096ab57d80e70c71367d80a53ec02e49c56dc Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 12 Feb 1996 08:35:16 +0000 Subject: [PATCH 0587/4487] Remove redundancies. Add __waitid. --- sysdeps/unix/sysv/sysv4/syscalls.list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/sysv4/syscalls.list b/sysdeps/unix/sysv/sysv4/syscalls.list index 2919bcc27f..7b75d55248 100644 --- a/sysdeps/unix/sysv/sysv4/syscalls.list +++ b/sysdeps/unix/sysv/sysv4/syscalls.list @@ -2,6 +2,6 @@ pgrpsys - pgrpsys 3 __pgrpsys sigprocmask - sigprocmask 3 __sigprocmask sigprocmask -sigsuspend - sigsuspend 1 sigsuspend sysconfig - sysconfig 1 __sysconfig sysinfo - systeminfo 3 __sysinfo +__waitid waitpid waitsys 3 __waitid From 7fb027dc33db82b586adaf488cd8f71b0ecef32d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 12 Feb 1996 08:44:32 +0000 Subject: [PATCH 0588/4487] Mon Feb 12 03:10:41 1996 Roland McGrath * sysdeps/unix/sysv/sysv4/syscalls.list: Remove redundancies. Add __waitid. * sysdeps/unix/sysv/linux/syscalls.list: Remove redundancies. Define __ name for sigprocmask. * sysdeps/unix/bsd/ultrix4/syscalls.list: Remove redundancies. Add getsysinfo. * sysdeps/unix/bsd/sun/sunos4/syscalls.list: Remove redundancies. * sysdeps/unix/bsd/sun/syscalls.list: Remove redundancies. * sysdeps/unix/bsd/bsd4.4/syscalls.list: Remove redundancies. * sysdeps/unix/bsd/syscalls.list: Remove settimeofday, utimes. Add getdents, wait3, waitpid. * sysdeps/unix/syscalls.list: Add seteuid, setegid, setsid, settimeofday, sigsuspend, sstk, utimes. * sysdeps/unix/bsd/ultrix4/mips/sigvec.S: File removed. * sysdeps/unix/bsd/ultrix4/mips/syscalls.list: New file. * sysdeps/unix/bsd/ultrix4/mips/Makefile (sysdep_routines): Removed sigtramp. * sysdeps/unix/bsd/ultrix4/mips/sigvec.c: Renamed from sigtramp.c. * sysdeps/unix/bsd/bsd4.4/sstk.S: File removed. * sysdeps/unix/bsd/hp/m68k/syscalls.list: File removed. * sysdeps/unix/bsd/osf/alpha/getdents.S: File removed. * sysdeps/unix/bsd/ultrix4/getsysinfo.S: File removed. * sysdeps/unix/bsd/ultrix4/waitpid.S: File removed. * sysdeps/unix/bsd/ultrix4/mips/sigtramp.c: File removed. * sysdeps/unix/bsd/ultrix4/mips/sigvec.S: File removed. * sysdeps/unix/bsd/ultrix4/mips/sigvec.c: New file. * sysdeps/unix/bsd/ultrix4/mips/syscalls.list: New file. * sysdeps/unix/sysv/irix4/wait3.S: File removed. * sysdeps/unix/sysv/sysv4/__waitid.S: File removed. * sysdeps/unix/sysv/sysv4/fchdir.S: File removed. * sysdeps/unix/sysv/sysv4/setegid.S: File removed. * sysdeps/unix/sysv/sysv4/seteuid.S: File removed. * sysdeps/unix/sysv/sysv4/sigaltstack.S: File removed. * sysdeps/unix/sysv/sysv4/solaris2/utimes.S: File removed. --- sysdeps/unix/bsd/osf/alpha/getdents.S | 26 ------------------- sysdeps/unix/bsd/ultrix4/getsysinfo.S | 26 ------------------- sysdeps/unix/bsd/ultrix4/mips/sigvec.S | 25 ------------------ .../bsd/ultrix4/mips/{sigtramp.c => sigvec.c} | 3 +-- .../{hp/m68k => ultrix4/mips}/syscalls.list | 2 +- sysdeps/unix/bsd/ultrix4/waitpid.S | 25 ------------------ sysdeps/unix/sysv/irix4/wait3.S | 1 - sysdeps/unix/sysv/sysv4/__waitid.S | 25 ------------------ sysdeps/unix/sysv/sysv4/fchdir.S | 2 -- sysdeps/unix/sysv/sysv4/setegid.S | 2 -- sysdeps/unix/sysv/sysv4/seteuid.S | 2 -- sysdeps/unix/sysv/sysv4/sigaltstack.S | 2 -- sysdeps/unix/sysv/sysv4/solaris2/utimes.S | 2 -- 13 files changed, 2 insertions(+), 141 deletions(-) delete mode 100644 sysdeps/unix/bsd/osf/alpha/getdents.S delete mode 100644 sysdeps/unix/bsd/ultrix4/getsysinfo.S delete mode 100644 sysdeps/unix/bsd/ultrix4/mips/sigvec.S rename sysdeps/unix/bsd/ultrix4/mips/{sigtramp.c => sigvec.c} (95%) rename sysdeps/unix/bsd/{hp/m68k => ultrix4/mips}/syscalls.list (52%) delete mode 100644 sysdeps/unix/bsd/ultrix4/waitpid.S delete mode 100644 sysdeps/unix/sysv/irix4/wait3.S delete mode 100644 sysdeps/unix/sysv/sysv4/__waitid.S delete mode 100644 sysdeps/unix/sysv/sysv4/fchdir.S delete mode 100644 sysdeps/unix/sysv/sysv4/setegid.S delete mode 100644 sysdeps/unix/sysv/sysv4/seteuid.S delete mode 100644 sysdeps/unix/sysv/sysv4/sigaltstack.S delete mode 100644 sysdeps/unix/sysv/sysv4/solaris2/utimes.S diff --git a/sysdeps/unix/bsd/osf/alpha/getdents.S b/sysdeps/unix/bsd/osf/alpha/getdents.S deleted file mode 100644 index df2c26db85..0000000000 --- a/sysdeps/unix/bsd/osf/alpha/getdents.S +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@zen.org). - -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 -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -SYSCALL__ (getdirentries, 4) - ret - .end __getdirentries - -weak_alias (__getdirentries, getdirentries) - diff --git a/sysdeps/unix/bsd/ultrix4/getsysinfo.S b/sysdeps/unix/bsd/ultrix4/getsysinfo.S deleted file mode 100644 index 41718ba228..0000000000 --- a/sysdeps/unix/bsd/ultrix4/getsysinfo.S +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. - Contributed by Ian Lance Taylor (ian@airs.com). - -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 -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -/* Get various sorts of information about the system. - This is an Ultrix only call. */ - -#include - -SYSCALL__ (getsysinfo, 5) - ret - .end __getsysinfo diff --git a/sysdeps/unix/bsd/ultrix4/mips/sigvec.S b/sysdeps/unix/bsd/ultrix4/mips/sigvec.S deleted file mode 100644 index 4d7aa4409c..0000000000 --- a/sysdeps/unix/bsd/ultrix4/mips/sigvec.S +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (C) 1991, 1992, 1995 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -/* __sigvec is defined by sigtramp.c. */ - -PSEUDO (__raw_sigvec, sigvec, 3) - ret - .end __raw_sigvec diff --git a/sysdeps/unix/bsd/ultrix4/mips/sigtramp.c b/sysdeps/unix/bsd/ultrix4/mips/sigvec.c similarity index 95% rename from sysdeps/unix/bsd/ultrix4/mips/sigtramp.c rename to sysdeps/unix/bsd/ultrix4/mips/sigvec.c index 1bb208dd8b..6969594c32 100644 --- a/sysdeps/unix/bsd/ultrix4/mips/sigtramp.c +++ b/sysdeps/unix/bsd/ultrix4/mips/sigvec.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1996 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 @@ -36,7 +36,6 @@ Cambridge, MA 02139, USA. */ /* The user's signal handler is called with three arguments. */ typedef void (*handler_type) (int sig, int code, struct sigcontext *); -/* Defined in __raw_sigvec.S. */ extern int EXFUN(__raw_sigvec, (int sig, CONST struct sigvec *vec, struct sigvec *ovec, void (*)(int sig, int code, diff --git a/sysdeps/unix/bsd/hp/m68k/syscalls.list b/sysdeps/unix/bsd/ultrix4/mips/syscalls.list similarity index 52% rename from sysdeps/unix/bsd/hp/m68k/syscalls.list rename to sysdeps/unix/bsd/ultrix4/mips/syscalls.list index b9dca13bf7..f7d0bba6a8 100644 --- a/sysdeps/unix/bsd/hp/m68k/syscalls.list +++ b/sysdeps/unix/bsd/ultrix4/mips/syscalls.list @@ -1,3 +1,3 @@ # File name Caller Syscall name # args Strong name Weak names -getdents - getdirentries 4 __getdirentries getdirentries +raw-sigvec sigvec sigvec 4 __raw_sigvec diff --git a/sysdeps/unix/bsd/ultrix4/waitpid.S b/sysdeps/unix/bsd/ultrix4/waitpid.S deleted file mode 100644 index 3470da783e..0000000000 --- a/sysdeps/unix/bsd/ultrix4/waitpid.S +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (C) 1992, 1995 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@zen.org). - -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 -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -SYSCALL__ (waitpid, 3) - ret - .end __waitpid - -weak_alias (__waitpid, waitpid) diff --git a/sysdeps/unix/sysv/irix4/wait3.S b/sysdeps/unix/sysv/irix4/wait3.S deleted file mode 100644 index 54065aefdf..0000000000 --- a/sysdeps/unix/sysv/irix4/wait3.S +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/sysv4/__waitid.S b/sysdeps/unix/sysv/sysv4/__waitid.S deleted file mode 100644 index 845bec85e2..0000000000 --- a/sysdeps/unix/sysv/sysv4/__waitid.S +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@zen.org). - -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 -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -/* XXX */ -#define SYS_waitid SYS_waitsys - -SYSCALL__ (waitid, 3) - ret diff --git a/sysdeps/unix/sysv/sysv4/fchdir.S b/sysdeps/unix/sysv/sysv4/fchdir.S deleted file mode 100644 index ef11d55bc0..0000000000 --- a/sysdeps/unix/sysv/sysv4/fchdir.S +++ /dev/null @@ -1,2 +0,0 @@ -/* SVR4 uses the BSD 4.4 fchdir(2) syscall. */ -#include diff --git a/sysdeps/unix/sysv/sysv4/setegid.S b/sysdeps/unix/sysv/sysv4/setegid.S deleted file mode 100644 index f8fd7633a5..0000000000 --- a/sysdeps/unix/sysv/sysv4/setegid.S +++ /dev/null @@ -1,2 +0,0 @@ -/* SVR4 uses the BSD 4.4 setegid() system call. */ -#include diff --git a/sysdeps/unix/sysv/sysv4/seteuid.S b/sysdeps/unix/sysv/sysv4/seteuid.S deleted file mode 100644 index 4ff110610f..0000000000 --- a/sysdeps/unix/sysv/sysv4/seteuid.S +++ /dev/null @@ -1,2 +0,0 @@ -/* SVR4 uses the BSD 4.4 seteuid() system call. */ -#include diff --git a/sysdeps/unix/sysv/sysv4/sigaltstack.S b/sysdeps/unix/sysv/sysv4/sigaltstack.S deleted file mode 100644 index f7cf0d57f4..0000000000 --- a/sysdeps/unix/sysv/sysv4/sigaltstack.S +++ /dev/null @@ -1,2 +0,0 @@ -/* SVR4 uses the BSD 4.4 sigaltstack syscall. */ -#include diff --git a/sysdeps/unix/sysv/sysv4/solaris2/utimes.S b/sysdeps/unix/sysv/sysv4/solaris2/utimes.S deleted file mode 100644 index 54a043c835..0000000000 --- a/sysdeps/unix/sysv/sysv4/solaris2/utimes.S +++ /dev/null @@ -1,2 +0,0 @@ -/* Solaris has the BSD `utimes' function. */ -#include From 5f51e1132af7423b2bb22091a7a8e80bc17ab378 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 13 Feb 1996 09:26:53 +0000 Subject: [PATCH 0589/4487] Sat Feb 10 13:09:03 1996 Andreas Schwab * sysdeps/unix/sysv/linux/sys/mman.h: Define MAP_ANON and MAP_FILE if not already defined. * elf/elf.h: Add m68k reloc definitions. * sysdeps/m68k/dl-machine.h, sysdeps/m68k/elf/start.S: New files. --- sysdeps/m68k/dl-machine.h | 230 ++++++++++++++++++++++++++++++++++++++ sysdeps/m68k/elf/start.S | 90 +++++++++++++++ 2 files changed, 320 insertions(+) create mode 100644 sysdeps/m68k/dl-machine.h create mode 100644 sysdeps/m68k/elf/start.S diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h new file mode 100644 index 0000000000..2208cd2259 --- /dev/null +++ b/sysdeps/m68k/dl-machine.h @@ -0,0 +1,230 @@ +/* Machine-dependent ELF dynamic relocation inline functions. m68k version. +Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#define ELF_MACHINE_NAME "m68k" + +#include +#include +#include + + +/* Return nonzero iff E_MACHINE is compatible with the running host. */ +static inline int +elf_machine_matches_host (Elf32_Half e_machine) +{ + switch (e_machine) + { + case EM_68K: + return 1; + default: + return 0; + } +} + + +/* Return the run-time address of the _GLOBAL_OFFSET_TABLE_. + Must be inlined in a function which uses global data. */ +static inline Elf32_Addr * +elf_machine_got (void) +{ + register Elf32_Addr *got asm ("%a5"); + return got; +} + + +/* Return the run-time load address of the shared object. */ +static inline Elf32_Addr +elf_machine_load_address (void) +{ + ... +} + +/* Perform the relocation specified by RELOC and SYM (which is fully resolved). + MAP is the object containing the reloc. */ + +static inline void +elf_machine_rela (struct link_map *map, + const Elf32_Rela *reloc, + Elf32_Addr sym_loadaddr, const Elf32_Sym *sym) +{ + Elf32_Addr *const reloc_addr = (void *) (map->l_addr + reloc->r_offset); + const Elf32_Addr sym_value = sym ? sym_loadaddr + sym->st_value : 0; + + switch (ELF32_R_TYPE (reloc->r_info)) + { + case R_68K_COPY: + memcpy (reloc_addr, (void *) sym_value, sym->st_size); + break; + case R_68K_GLOB_DAT: + case R_68K_JMP_SLOT: + *reloc_addr = sym_value; + break; + case R_68K_8: + *(char *) reloc_addr = sym_value + reloc->r_addend; + break; + case R_68K_16: + *(short *) reloc_addr = sym_value + reloc->r_addend; + break; + case R_68K_32: + *reloc_addr = sym_value + reloc->r_addend; + break; + case R_68K_RELATIVE: + *reloc_addr = map->l_addr + reloc->r_addend; + break; + case R_68K_PC8: + *(char *) reloc_addr = (sym_value + reloc->r_addend + - (Elf32_Addr) reloc_addr); + break; + case R_68K_PC16: + *(short *) reloc_addr = (sym_value + reloc->r_addend + - (Elf32_Addr) reloc_addr); + break; + case R_68K_PC32: + *reloc_addr = sym_value + reloc->r_addend - (Elf32_Addr) reloc_addr; + break; + case R_68K_NONE: /* Alright, Wilbur. */ + break; + default: + assert (! "unexpected dynamic reloc type"); + break; + } +} + +static inline void +elf_machine_lazy_rel (struct link_map *map, const Elf32_Rela *reloc) +{ + Elf32_Addr *const reloc_addr = (void *) (map->l_addr + reloc->r_offset); + switch (ELF32_R_TYPE (reloc->r_info)) + { + case R_68K_NONE: + break; + case R_68K_JMP_SLOT: + *reloc_addr += map->l_addr; + break; + default: + assert (! "unexpected PLT reloc type"); + break; + } +} + +/* The m68k never uses Elf32_Rel relocations. */ +#define ELF_MACHINE_NO_REL 1 + + +/* Set up the loaded object described by L so its unrelocated PLT + entries will jump to the on-demand fixup code in dl-runtime.c. */ + +static inline void +elf_machine_runtime_setup (struct link_map *l, int lazy) +{ + Elf32_Addr *got; + extern void _dl_runtime_resolve (Elf32_Word); + + if (l->l_info[DT_JMPREL] && lazy) + { + /* The GOT entries for functions in the PLT have not yet been + filled in. Their initial contents will arrange when called + to push an offset into the .rela.plt section, push + _GLOBAL_OFFSET_TABLE_[1], and then jump to + _GLOBAL_OFFSET_TABLE_[2]. */ + got = (Elf32_Addr *) (l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr); + got[1] = (Elf32_Addr) l; /* Identify this shared object. */ + /* This function will get called to fix up the GOT entry + indicated by the offset on the stack, and then jump to the + resolved address. */ + got[2] = (Elf32_Addr) &_dl_runtime_resolve; + } + + /* This code is used in dl-runtime.c to call the `fixup' function + and then redirect to the address it returns. */ +#define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\ +| Trampoline for _dl_runtime_resolver + .globl _dl_runtime_resolve + .type _dl_runtime_resolve, @function +_dl_runtime_resolve: + | Save %a0 (struct return address). + move.l %a0, -(%sp) + | Call the real address resolver. + bsr.l fixup + | Restore register %a0. + move.l (%sp)+, %a0 + | Pop parameters + addq.l #8, %sp + | Call real function. + jmp (%d0) + .size _dl_runtime_resolve, . - _dl_runtime_resolve +"); +#define ELF_MACHINE_RUNTIME_FIXUP_ARGS long int save_a0 +} + + +/* Mask identifying addresses reserved for the user program, + where the dynamic linker should not map anything. */ +#define ELF_MACHINE_USER_ADDRESS_MASK 0x80000000UL + +/* Initial entry point code for the dynamic linker. + The C function `_dl_start' is the real entry point; + its return value is the user program's entry point. */ + +#define RTLD_START asm ("\ +.text +.globl _start +.globl _dl_start_user +_start: + jbsr _dl_start +_dl_start_user: + | Save the user entry point address in %a4. + move.l %d0, %a4 + | Point %a5 at the GOT. + lea _GLOBAL_OFFSET_TABLE_@GOTPC(%pc), %a5 + | See if we were run as a command with the executable file + | name as an extra leading argument. + move.l ([_dl_skip_args@GOT, %a5]), %d0 + jeq 0f + | Pop the original argument count + move.l (%sp)+, %d1 + | Subtract _dl_skip_args from it. + sub.l %d0, %d1 + | Adjust the stack pointer to skip _dl_skip_args words. + lea (%sp, %d0*4), %sp + | Push back the modified argument count. + move.l %d1, -(%sp) + | Call _dl_init_next to return the address of an initializer + | function to run. +0: bsr.l _dl_init_next@PLTPC + | Check for zero return, when out of initializers. + tst.l %d0 + jeq 1f + | Call the shared object initializer function. + | NOTE: We depend only on the registers (%a4 and %a5) + | and the return address pushed by this call; + | the initializer is called with the stack just + | as it appears on entry, and it is free to move + | the stack around, as long as it winds up jumping to + | the return address on the top of the stack. + move.l %d0, %a0 + jsr (%a0) + | Loop to call _dl_init_next for the next initializer. + jra 0b +1: | Pass our finalizer function to the user in %a1. + move.l _dl_fini@GOT(%a5), %a1 + | Initialize %fp with the stack pointer. + move.l %sp, %fp + | Jump to the user's entry point. + jmp (%a4)"); diff --git a/sysdeps/m68k/elf/start.S b/sysdeps/m68k/elf/start.S new file mode 100644 index 0000000000..1b622d6e08 --- /dev/null +++ b/sysdeps/m68k/elf/start.S @@ -0,0 +1,90 @@ +/* Startup code compliant to the ELF m68k ABI. +Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* This is the canonical entry point, usually the first thing in the text + segment. The SVR4/m68k ABI says that when the entry point runs, + most registers' values are unspecified, except for: + + %a1 Contains a function pointer to be registered with `atexit'. + This is how the dynamic linker arranges to have DT_FINI + functions called for shared libraries that have been loaded + before this code runs. + + %sp The stack contains the arguments and environment: + 0(%sp) argc + 4(%sp) argv[0] + ... + (4*argc)(%sp) NULL + (4*(argc+1))(%sp) envp[0] + ... + NULL +*/ + + .text + .globl _start +_start: + /* Clear the frame pointer. The ABI suggests this be done, to mark + the outermost frame obviously. */ + sub.l %fp, %fp + + /* %a1 contains the address of the shared library termination + function, which we will register with `atexit' to be called by + `exit'. */ + tstl %a1 + jbeq 1f + move.l %a1, -(%sp) + jbsr atexit + addql #4, %sp +1: + + /* Do essential libc initialization. In statically linked + programs under the GNU Hurd, this is what sets up the + arguments on the stack for the code below. */ + jbsr __libc_init_first + + /* Extract the arguments and environment as encoded on the stack + and set up the arguments for `main': argc, argv, envp. */ + move.l (%sp)+, %d0 /* Pop the argument count. */ + lea (4,%sp,%d0*4), %a0 /* envp = &argv[argc + 1] */ + move.l %a0, _environ /* Store it in the global variable. */ + pea (%a0) /* Push third argument: envp. */ + pea 4(%sp) /* Push second argument: argv. */ + move.l %d0, -(%sp) /* Push first argument: argc. */ + + /* Call `_init', which is the entry point to our own `.init' + section; and register with `atexit' to have `exit' call + `_fini', which is the entry point to our own `.fini' section. */ + jbsr _init + move.l #_fini, -(%sp) + jbsr atexit + addq.l #4, %sp + + /* Call the user's main function, and exit with its value. */ + jbsr main + move.l %d0, (%sp) +1: jbsr exit /* This should never return. */ + jbra 1b /* Try again if somehow it does return. */ + +/* Define a symbol for the first piece of initialized data. */ + .data + .globl __data_start +__data_start: + .long 0 + .weak data_start + data_start = __data_start From 9168a08cef1a6cc20646061ebab0f660f3a26f79 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 13 Feb 1996 09:51:13 +0000 Subject: [PATCH 0590/4487] Sat Feb 10 13:09:03 1996 Andreas Schwab * sysdeps/m68k/fpu/isinfl.c, sysdeps/m68k/fpu/isnanl.c, sysdeps/m68k/isinfl.c, sysdeps/m68k/isnanl.c: New files. --- sysdeps/m68k/fpu/isinfl.c | 4 ++++ sysdeps/m68k/fpu/isnanl.c | 4 ++++ sysdeps/m68k/isinfl.c | 45 +++++++++++++++++++++++++++++++++++++++ sysdeps/m68k/isnanl.c | 41 +++++++++++++++++++++++++++++++++++ 4 files changed, 94 insertions(+) create mode 100644 sysdeps/m68k/fpu/isinfl.c create mode 100644 sysdeps/m68k/fpu/isnanl.c create mode 100644 sysdeps/m68k/isinfl.c create mode 100644 sysdeps/m68k/isnanl.c diff --git a/sysdeps/m68k/fpu/isinfl.c b/sysdeps/m68k/fpu/isinfl.c new file mode 100644 index 0000000000..f3eeaa2b30 --- /dev/null +++ b/sysdeps/m68k/fpu/isinfl.c @@ -0,0 +1,4 @@ +#define FUNC __isinfl +#include + +weak_alias (__isinfl, isinfl) diff --git a/sysdeps/m68k/fpu/isnanl.c b/sysdeps/m68k/fpu/isnanl.c new file mode 100644 index 0000000000..0f48a73fbc --- /dev/null +++ b/sysdeps/m68k/fpu/isnanl.c @@ -0,0 +1,4 @@ +#define FUNC __isnanl +#include + +weak_alias (__isnanl, isnanl) diff --git a/sysdeps/m68k/isinfl.c b/sysdeps/m68k/isinfl.c new file mode 100644 index 0000000000..1b06d47d52 --- /dev/null +++ b/sysdeps/m68k/isinfl.c @@ -0,0 +1,45 @@ +/* Copyright (C) 1991, 1992, 1995 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include "ieee754.h" + +#undef __isinfl +#undef isinfl + + +/* Return 0 if VALUE is finite or NaN, +1 if it + is +Infinity, -1 if it is -Infinity. */ +int +__isinfl (long double value) +{ + union ieee854_long_double u; + + u.d = value; + + /* An IEEE 854 infinity has an exponent with the + maximum possible value and a zero mantissa. + In Motorola's interpretation the integer bit is ignored. */ + if ((u.ieee.exponent & 0x7fff) == 0x7fff && + (u.ieee.mantissa0 & 0x7fffffff) == 0 && u.ieee.mantissa1 == 0) + return u.ieee.negative ? -1 : 1; + + return 0; +} + +weak_alias (__isinfl, isinfl); diff --git a/sysdeps/m68k/isnanl.c b/sysdeps/m68k/isnanl.c new file mode 100644 index 0000000000..38a9616593 --- /dev/null +++ b/sysdeps/m68k/isnanl.c @@ -0,0 +1,41 @@ +/* Copyright (C) 1991, 1992, 1995 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include "ieee754.h" + +#undef __isnanl +#undef isnanl + + +/* Return nonzero if VALUE is not a number. */ +int +__isnanl (long double value) +{ + union ieee854_long_double u; + + u.d = value; + + /* IEEE 854 NaN's have the maximum possible + exponent and a nonzero mantissa. In Motorola's + interpretation the integer bit is ignored. */ + return ((u.ieee.exponent & 0x7fff) == 0x7fff && + ((u.ieee.mantissa0 & 0x7fffffff) != 0 || u.ieee.mantissa1 != 0)); +} + +weak_alias (__isnanl, isnanl); From 9298f9e195186e6ebc1261c75e1643d6dd5c182f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 13 Feb 1996 11:38:58 +0000 Subject: [PATCH 0591/4487] Sat Feb 10 13:09:03 1996 Andreas Schwab * sysdeps/unix/sysv/linux/m68k/brk.c, sysdeps/unix/sysv/linux/m68k/mmap.S, sysdeps/unix/sysv/linux/m68k/select.S, sysdeps/unix/sysv/linux/m68k/sigcontext.h, sysdeps/unix/sysv/linux/m68k/sigreturn.S, sysdeps/unix/sysv/linux/m68k/socket.S, sysdeps/unix/sysv/linux/m68k/syscall.S, sysdeps/unix/sysv/linux/m68k/sysdep.S, sysdeps/unix/sysv/linux/m68k/sysdep.h: New files. --- sysdeps/unix/sysv/linux/m68k/brk.c | 52 +++++++++ sysdeps/unix/sysv/linux/m68k/mmap.S | 44 ++++++++ sysdeps/unix/sysv/linux/m68k/select.S | 53 +++++++++ sysdeps/unix/sysv/linux/m68k/sigcontext.h | 31 +++++ sysdeps/unix/sysv/linux/m68k/sigreturn.S | 28 +++++ sysdeps/unix/sysv/linux/m68k/socket.S | 62 ++++++++++ sysdeps/unix/sysv/linux/m68k/syscall.S | 31 +++++ sysdeps/unix/sysv/linux/m68k/sysdep.S | 71 ++++++++++++ sysdeps/unix/sysv/linux/m68k/sysdep.h | 131 ++++++++++++++++++++++ 9 files changed, 503 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/brk.c create mode 100644 sysdeps/unix/sysv/linux/m68k/mmap.S create mode 100644 sysdeps/unix/sysv/linux/m68k/select.S create mode 100644 sysdeps/unix/sysv/linux/m68k/sigcontext.h create mode 100644 sysdeps/unix/sysv/linux/m68k/sigreturn.S create mode 100644 sysdeps/unix/sysv/linux/m68k/socket.S create mode 100644 sysdeps/unix/sysv/linux/m68k/syscall.S create mode 100644 sysdeps/unix/sysv/linux/m68k/sysdep.S create mode 100644 sysdeps/unix/sysv/linux/m68k/sysdep.h diff --git a/sysdeps/unix/sysv/linux/m68k/brk.c b/sysdeps/unix/sysv/linux/m68k/brk.c new file mode 100644 index 0000000000..3fd547545e --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/brk.c @@ -0,0 +1,52 @@ +/* brk system call for Linux/m68k. +Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include + +void *__curbrk; + +int +__brk (void *addr) +{ + void *newbrk; + + { + register long d0 __asm__ ("%d0"); + + asm ("move%.l %2, %%d1\n" + "trap #0" /* Perform the system call. */ + : "=d" (d0) + : "0" (SYS_ify (brk)), "g" (addr) + : "%d0", "%d1"); + newbrk = (void *) d0; + } + __curbrk = newbrk; + + if (newbrk < addr) + { + errno = ENOMEM; + return -1; + } + + return 0; +} +weak_alias (__brk, brk) + diff --git a/sysdeps/unix/sysv/linux/m68k/mmap.S b/sysdeps/unix/sysv/linux/m68k/mmap.S new file mode 100644 index 0000000000..ed0480dfd7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/mmap.S @@ -0,0 +1,44 @@ +/* Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + + .text + SYSCALL_ERROR_HANDLER + +ENTRY (__mmap) + + move.l #SYS_ify (mmap), %d0 /* System call number in %d0. */ + + lea 4(%sp), %a0 /* Address of args is 1st arg. */ + move.l %a0, %d1 + + /* Do the system call trap. */ + trap #0 + + /* Kludge: negative numbers are among the legal return values. + If %d0 is between -4096 and 0 then there was an error. */ + cmp.l #-4096, %d0 + jhi syscall_error + + /* Successful; return the syscall's value. Copy it to %a0 because + mmap is declared to return a pointer. */ + move.l %d0, %a0 + rts + +weak_alias (__mmap, mmap) diff --git a/sysdeps/unix/sysv/linux/m68k/select.S b/sysdeps/unix/sysv/linux/m68k/select.S new file mode 100644 index 0000000000..2770df82d1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/select.S @@ -0,0 +1,53 @@ +/* Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +#include +#define _ERRNO_H +#include + +/* Linux has two versions of the select system call. The old one expected + one argument which must be a pointer to a struct which contains the + five values. The new version expects the five arguments be given in the + registers. First try the new version, if it's not available fall back + to the old version. */ + + .text + SYSCALL_ERROR_HANDLER +ENTRY (__select) + +#if 0 /* For now only use the old version. */ + DO_CALL (#SYS_ify (_newselect), 5) + tst.l %d0 + jmi 1f + rts + +1: move.l #-ENOSYS, %d1 + cmp.l %d1, %d0 + jne syscall_error /* Real error */ + + /* Try again using the old syscall interface. */ +#endif + lea 4(%sp), %a0 + move.l %a0, %d1 + move.l #SYS_ify (select), %d0 + trap #0 + tst.l %d0 + jmi syscall_error + ret + +weak_alias (__select, select) diff --git a/sysdeps/unix/sysv/linux/m68k/sigcontext.h b/sysdeps/unix/sysv/linux/m68k/sigcontext.h new file mode 100644 index 0000000000..585b47993a --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/sigcontext.h @@ -0,0 +1,31 @@ +/* Structure describing state saved while handling a signal. Linux/m68k version. +Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* State of this thread when the signal was taken. */ +struct sigcontext +{ + __sigset_t sc_mask; + unsigned long sc_usp; + unsigned long sc_d0; + unsigned long sc_d1; + unsigned long sc_a0; + unsigned long sc_a1; + unsigned short sc_sr; + unsigned long sc_pc; +}; diff --git a/sysdeps/unix/sysv/linux/m68k/sigreturn.S b/sysdeps/unix/sysv/linux/m68k/sigreturn.S new file mode 100644 index 0000000000..7f6d643cb9 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/sigreturn.S @@ -0,0 +1,28 @@ +/* Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +.text +ENTRY (__sigreturn) + addq.l #4, %sp /* Pop the return PC. */ + DO_CALL (#SYS_ify (sigreturn), 0) + /* Do the system call; it never returns. */ + /* NOTREACHED */ + +weak_alias (__sigreturn, sigreturn) diff --git a/sysdeps/unix/sysv/linux/m68k/socket.S b/sysdeps/unix/sysv/linux/m68k/socket.S new file mode 100644 index 0000000000..a85f41c334 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/socket.S @@ -0,0 +1,62 @@ +/* Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include + +#define P(a, b) P2(a, b) +#define P2(a, b) a##b + + .text + SYSCALL_ERROR_HANDLER + +/* The socket-oriented system calls are handled unusally in Linux. + They are all gated through the single `socketcall' system call number. + `socketcall' takes two arguments: the first is the subcode, specifying + which socket function is being called; and the second is a pointer to + the arguments to the specific function. + + The .S files for the other calls just #define socket and #include this. */ + +.globl P(__,socket) +ENTRY (P(__,socket)) + + /* Save registers. */ + move.l %d2, %a0 + + move.l #SYS_ify (socketcall), %d0 /* System call number in %d0. */ + + /* Use ## so `socket' is a separate token that might be #define'd. */ + move.l #P (SOCKOP_,socket), %d1 /* Subcode is first arg to syscall. */ + lea 4(%sp), %a1 /* Address of args is 2nd arg. */ + move.l %a1, %d2 + + /* Do the system call trap. */ + trap #0 + + /* Restore registers. */ + move.l %a0, %d2 + + /* %d0 is < 0 if there was an error. */ + tst.l %d0 + jmi syscall_error + + /* Successful; return the syscall's value. */ + rts + +weak_alias (P(__,socket), socket) diff --git a/sysdeps/unix/sysv/linux/m68k/syscall.S b/sysdeps/unix/sysv/linux/m68k/syscall.S new file mode 100644 index 0000000000..2cc451c58b --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/syscall.S @@ -0,0 +1,31 @@ +/* Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + + .text + SYSCALL_ERROR_HANDLER +ENTRY (syscall) + move.l (%sp)+, %a0 /* Pop return address. */ + DO_CALL ((%sp), 5) /* Frob the args and do the system call. */ + tst.l %d0 /* Check %d0 for error. */ + jmi error /* Jump to error handler if negative. */ + jmp (%a0) /* Return to caller. */ + +error: pea (%a0) + jra syscall_error diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.S b/sysdeps/unix/sysv/linux/m68k/sysdep.S new file mode 100644 index 0000000000..895ea2770b --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.S @@ -0,0 +1,71 @@ +/* Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Because the Linux version is in fact m68k/ELF and the start.? file + for this system (sysdeps/m68k/elf/start.S) is also used by The Hurd + and therefore this files must not contain the definition of the + `errno' variable (I don't know why, ask Roland), we have to define + it somewhere else. + + ...and this place is here. */ + .bss + .globl errno + .type errno,@object +errno: .space 4 + .size errno,4 + .globl _errno + .type _errno,@object +_errno = errno /* This name is expected by hj libc.so.5 startup code. */ + .text + +/* The following code is not used at all in the shared library. + The PIC system call stubs set errno themselves. */ + +#ifndef PIC + +#include +#define _ERRNO_H +#include + +.globl errno +.globl __syscall_error + +/* The syscall stubs jump here when they detect an error. */ + +.globl __syscall_error +__syscall_error: + neg.l %d0 + +#if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN + /* We translate the system's EWOULDBLOCK error into EAGAIN. + The GNU C library always defines EWOULDBLOCK==EAGAIN. + EWOULDBLOCK_sys is the original number. */ + move.l #EWOULDBLOCK_sys, %d1 + cmp.l %d0, %d1 + jne 1f + move.l #EAGAIN, %d0 +1: +#endif + + move.l %d0, errno + move.l #-1, %d0 + /* Copy return value to %a0 for syscalls that are declared to + return a pointer. */ + move.l %d0, %a0 + rts +#endif /* PIC */ diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h new file mode 100644 index 0000000000..9b6c8e1975 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -0,0 +1,131 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. +This file is part of the GNU C Library. +Written by Andreas Schwab, , +December 1995. + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* In the Linux/ELF world, C symbols are asm symbols. */ +#define NO_UNDERSCORES + +#include + +#ifdef ASSEMBLER + +#define POUND # + +/* Define an entry point visible from C. */ +#define ENTRY(name) \ + .globl name; \ + .type name, @function; \ + .align 4; \ + name##: + +/* Since C identifiers are not normally prefixed with an underscore + on this system, the asm identifier `syscall_error' intrudes on the + C name space. Make sure we use an innocuous name. */ +#define syscall_error __syscall_error + +/* Linux uses a negative return value to indicate syscall errors, unlike + most Unices, which use the condition codes' carry flag. */ +#define PSEUDO(name, syscall_name, args) \ + .text; \ + SYSCALL_ERROR_HANDLER \ + ENTRY (name) \ + DO_CALL (POUND SYS_ify (syscall_name), args); \ + tst.l %d0; \ + jmi syscall_error; + +#ifdef PIC +/* Store (- %d0) into errno through the GOT. */ +#define SYSCALL_ERROR_HANDLER \ +syscall_error: \ + move.l (errno@GOTPC.l, %pc), %a0; \ + neg.l %d0; \ + move.l %d0, (%a0); \ + move.l POUND -1, %d0; \ + /* Copy return value to %a0 for syscalls that are declared to return \ + a pointer (e.g., mmap). */ \ + move.l %d0, %a0; \ + rts; +#else +#define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */ +#endif + +/* Linux takes system call arguments in registers: + + syscall number %d0 call-clobbered + arg 1 %d1 call-clobbered + arg 2 %d2 call-saved + arg 3 %d3 call-saved + arg 4 %d4 call-saved + arg 5 %d5 call-saved + + The stack layout upon entering the function is: + + 20(%sp) Arg# 5 + 16(%sp) Arg# 4 + 12(%sp) Arg# 3 + 8(%sp) Arg# 2 + 4(%sp) Arg# 1 + (%sp) Return address + + (Of course a function with say 3 arguments does not have entries for + arguments 4 and 5.) + + Separate move's are faster than movem, but need more space. Since + speed is more important, we don't use movem. Since %a0 and %a1 are + scratch registers, we can use them for saving as well. */ + +#define DO_CALL(syscall, args) \ + move.l syscall, %d0; \ + DOARGS_##args \ + trap POUND 0; \ + UNDOARGS_##args + +#define DOARGS_0 /* No arguments to frob. */ +#define UNDOARGS_0 /* No arguments to unfrob. */ +#define _DOARGS_0(n) /* No arguments to frob. */ + +#define DOARGS_1 _DOARGS_1 (4) +#define _DOARGS_1(n) move.l n(%sp), %d1; _DOARGS_0 (n) +#define UNDOARGS_1 UNDOARGS_0 + +#define DOARGS_2 _DOARGS_2 (8) +#define _DOARGS_2(n) move.l %d2, %a0; move.l n(%sp), %d2; _DOARGS_1 (n-4) +#define UNDOARGS_2 UNDOARGS_1; move.l %a0, %d2 + +#define DOARGS_3 _DOARGS_3 (12) +#define _DOARGS_3(n) move.l %d3, %a1; move.l n(%sp), %d3; _DOARGS_2 (n-4) +#define UNDOARGS_3 UNDOARGS_2; move.l %a1, %d3 + +#define DOARGS_4 _DOARGS_4 (16) +#define _DOARGS_4(n) move.l %d4, -(%sp); move.l n+4(%sp), %d4; _DOARGS_3 (n) +#define UNDOARGS_4 UNDOARGS_3; move.l (%sp)+, %d4 + +#define DOARGS_5 _DOARGS_5 (20) +#define _DOARGS_5(n) move.l %d5, -(%sp); move.l n+4(%sp), %d5; _DOARGS_4 (n) +#define UNDOARGS_5 UNDOARGS_4; move.l (%sp)+, %d5 + + +#define ret rts +#if 0 /* Not used by Linux */ +#define r0 %d0 +#define r1 %d1 +#define MOVE(x,y) movel x , y +#endif + +#endif /* ASSEMBLER */ From da184b1bcfcc27b7c1e40ff29953cfea57a7b3a9 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 13 Feb 1996 11:40:27 +0000 Subject: [PATCH 0592/4487] New file from Schwab --- sysdeps/unix/sysv/linux/m68k/fpu_control.h | 110 +++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/fpu_control.h diff --git a/sysdeps/unix/sysv/linux/m68k/fpu_control.h b/sysdeps/unix/sysv/linux/m68k/fpu_control.h new file mode 100644 index 0000000000..0bbbb08916 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/fpu_control.h @@ -0,0 +1,110 @@ +/* 68k FPU control word definitions. +Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifndef _FPU_CONTROL_H +#define _FPU_CONTROL_H + +/* + * Motorola floating point control register bits. + * + * 31-16 -> reserved (read as 0, ignored on write) + * 15 -> enable trap for BSUN exception + * 14 -> enable trap for SNAN exception + * 13 -> enable trap for OPERR exception + * 12 -> enable trap for OVFL exception + * 11 -> enable trap for UNFL exception + * 10 -> enable trap for DZ exception + * 9 -> enable trap for INEX2 exception + * 8 -> enable trap for INEX1 exception + * 7-6 -> Precision Control + * 5-4 -> Rounding Control + * 3-0 -> zero (read as 0, write as 0) + * + * + * Precision Control: + * 00 - round to extended precision + * 01 - round to single precision + * 10 - round to double precision + * 11 - undefined + * + * Rounding Control: + * 00 - rounding to nearest (RN) + * 01 - rounding toward zero (RZ) + * 10 - rounding (down)toward minus infinity (RM) + * 11 - rounding (up) toward plus infinity (RP) + * + * The hardware default is 0x0000. I choose 0x5400. + */ + +#include + +/* masking of interrupts */ +#define _FPU_MASK_BSUN 0x8000 +#define _FPU_MASK_SNAN 0x4000 +#define _FPU_MASK_OPERR 0x2000 +#define _FPU_MASK_OVFL 0x1000 +#define _FPU_MASK_UNFL 0x0800 +#define _FPU_MASK_DZ 0x0400 +#define _FPU_MASK_INEX1 0x0200 +#define _FPU_MASK_INEX2 0x0100 + +/* precision control */ +#define _FPU_EXTENDED 0x00 /* RECOMMENDED */ +#define _FPU_DOUBLE 0x80 +#define _FPU_SINGLE 0x40 /* DO NOT USE */ + +/* rounding control */ +#define _FPU_RC_NEAREST 0x00 /* RECOMMENDED */ +#define _FPU_RC_ZERO 0x10 +#define _FPU_RC_DOWN 0x20 +#define _FPU_RC_UP 0x30 + +#define _FPU_RESERVED 0xFFFF000F /* Reserved bits in fpucr */ + + +/* Now two recommended fpucr */ + +/* Linux default: + - extended precision + - rounding to nearest + - exceptions on overflow, zero divide and NaN */ +#define _FPU_DEFAULT 0x00005400 + +/* IEEE: same as above, but exceptions. We must make it non-zero so + that __setfpucw works. This bit will be ignored. */ +#define _FPU_IEEE 0x00000001 + +/* Type of the control word. */ +typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__SI__))); + +/* Macros for accessing the hardware control word. */ +#define _FPU_GETCW(cw) __asm__ ("fmove%.l %!, %0" : "=dm" (cw)) +#define _FPU_SETCW(cw) __asm__ ("fmove%.l %0, %!" : "dm" (cw)) + +/* Default control word set at startup. */ +extern fpu_control_t __fpu_control; + +__BEGIN_DECLS + +/* Called at startup. It can be used to manipulate fpu control register. */ +extern void __setfpucw __P ((fpu_control_t)); + +__END_DECLS + +#endif /* _M68K_FPU_CONTROL_H */ From 3964340a690d43564e6a9ac451b67a37ffa710c7 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 15 Feb 1996 16:47:45 +0000 Subject: [PATCH 0593/4487] Wed Feb 14 00:21:17 1996 David Mosberger-Tang * sysdeps/alpha/memchr.c (memchr): loop searching for matching character bailed out one too early; changed constant 6 to 7 to fix this. --- sysdeps/alpha/memchr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/alpha/memchr.c b/sysdeps/alpha/memchr.c index 11ff542f25..a911302ea6 100644 --- a/sysdeps/alpha/memchr.c +++ b/sysdeps/alpha/memchr.c @@ -72,7 +72,7 @@ memchr (const void *s, int c, size_t n) unsigned char *cp = (unsigned char *) (longword_ptr - 1); int i; - for (i = 0; i < 6; i++) + for (i = 0; i < 7; i++) if (cp[i] == c) return &cp[i]; return &cp[7]; From 83cfd73cf6d2d897e9401aee53ce0fe3b42a3394 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 15 Feb 1996 17:14:48 +0000 Subject: [PATCH 0594/4487] [$(subdir)-signal] (sysdep_routines): Don't sys-sig. --- sysdeps/unix/sysv/sysv4/Makefile | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/sysdeps/unix/sysv/sysv4/Makefile b/sysdeps/unix/sysv/sysv4/Makefile index 0c149da85c..320e99bcf4 100644 --- a/sysdeps/unix/sysv/sysv4/Makefile +++ b/sysdeps/unix/sysv/sysv4/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1992, 1993, 1995 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1995, 1996 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 @@ -22,13 +22,6 @@ sysdep_routines := $(sysdep_routines) sysconfig pgrpsys __waitid endif - -ifeq ($(subdir),signal) - -sysdep_routines := $(sysdep_routines) sys-sig - -endif - ifeq ($(subdir),misc) sysdep_routines := $(sysdep_routines) sysinfo From a9eac710a2c0922e385d3fba3a498e0d001952f5 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 18 Feb 1996 18:31:55 +0000 Subject: [PATCH 0595/4487] Thu Feb 15 16:56:17 1996 Andreas Schwab * sysdeps/m68k/dl-machine.h (elf_machine_load_address): Corrected. (ELF_MACHINE_BEFORE_RTLD_RELOC): Define. (_dl_runtime_resolve): Save %a1 as well. (ELF_MACHINE_RUNTIME_FIXUP_ARGS): Add second dummy arg. (elf_machine_relplt): Define. --- sysdeps/m68k/dl-machine.h | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index 2208cd2259..8cbb97787c 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -52,9 +52,22 @@ elf_machine_got (void) static inline Elf32_Addr elf_machine_load_address (void) { - ... + Elf32_Addr addr; + asm ("here: lea here(%%pc), %0\n" + " sub.l %#here, %0" + : "=a" (addr)); + return addr; } +/* The `subl' insn above will contain an R_68K_RELATIVE relocation + entry intended to insert the run-time address of the label `here'. + This will be the first relocation in the text of the dynamic + linker; we skip it to avoid trying to modify read-only text in this + early stage. */ +#define ELF_MACHINE_BEFORE_RTLD_RELOC(dynamic_info) \ + ((dynamic_info)[DT_RELA]->d_un.d_ptr += sizeof (Elf32_Rela), \ + (dynamic_info)[DT_RELASZ]->d_un.d_val -= sizeof (Elf32_Rela)) + /* Perform the relocation specified by RELOC and SYM (which is fully resolved). MAP is the object containing the reloc. */ @@ -158,11 +171,13 @@ elf_machine_runtime_setup (struct link_map *l, int lazy) .globl _dl_runtime_resolve .type _dl_runtime_resolve, @function _dl_runtime_resolve: - | Save %a0 (struct return address). + | Save %a0 (struct return address) and %a1. move.l %a0, -(%sp) + move.l %a1, -(%sp) | Call the real address resolver. - bsr.l fixup - | Restore register %a0. + jbsr fixup + | Restore register %a0 and %a1. + move.l (%sp)+, %a1 move.l (%sp)+, %a0 | Pop parameters addq.l #8, %sp @@ -170,7 +185,9 @@ elf_machine_runtime_setup (struct link_map *l, int lazy) jmp (%d0) .size _dl_runtime_resolve, . - _dl_runtime_resolve "); -#define ELF_MACHINE_RUNTIME_FIXUP_ARGS long int save_a0 +#define ELF_MACHINE_RUNTIME_FIXUP_ARGS long int save_a0, long int save_a1 +/* The PLT uses Elf32_Rela relocs. */ +#define elf_machine_relplt elf_machine_rela } From 0650e14d6fafe2d061ad2f77fe4890dd1dda639e Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 19 Feb 1996 20:54:34 +0000 Subject: [PATCH 0596/4487] *** empty log message *** --- sysdeps/m68k/bsd-_setjmp.S | 2 +- sysdeps/m68k/bsd-setjmp.S | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/m68k/bsd-_setjmp.S b/sysdeps/m68k/bsd-_setjmp.S index 69aa7de04c..db777cf67d 100644 --- a/sysdeps/m68k/bsd-_setjmp.S +++ b/sysdeps/m68k/bsd-_setjmp.S @@ -23,7 +23,7 @@ Cambridge, MA 02139, USA. */ #include -#ifdef MOTOROLA_SYNTAX +#if defined (MOTOROLA_SYNTAX) || defined (ELF_SYNTAX) #define d0 %d0 #define d1 %d1 #define PUSH(reg) move.l reg, -(%sp) diff --git a/sysdeps/m68k/bsd-setjmp.S b/sysdeps/m68k/bsd-setjmp.S index c853516824..c1794978bc 100644 --- a/sysdeps/m68k/bsd-setjmp.S +++ b/sysdeps/m68k/bsd-setjmp.S @@ -23,7 +23,7 @@ Cambridge, MA 02139, USA. */ #include -#ifdef MOTOROLA_SYNTAX +#if defined (MOTOROLA_SYNTAX) || defined (ELF_SYNTAX) #define d0 %d0 #define d1 %d1 #define PUSH(reg) move.l reg, -(%sp) From 08eb417403694b166fafe7cfdec1504b6e6560cb Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 19 Feb 1996 21:04:28 +0000 Subject: [PATCH 0597/4487] Reverting inadvertant commits --- sysdeps/m68k/bsd-_setjmp.S | 2 +- sysdeps/m68k/bsd-setjmp.S | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/m68k/bsd-_setjmp.S b/sysdeps/m68k/bsd-_setjmp.S index db777cf67d..69aa7de04c 100644 --- a/sysdeps/m68k/bsd-_setjmp.S +++ b/sysdeps/m68k/bsd-_setjmp.S @@ -23,7 +23,7 @@ Cambridge, MA 02139, USA. */ #include -#if defined (MOTOROLA_SYNTAX) || defined (ELF_SYNTAX) +#ifdef MOTOROLA_SYNTAX #define d0 %d0 #define d1 %d1 #define PUSH(reg) move.l reg, -(%sp) diff --git a/sysdeps/m68k/bsd-setjmp.S b/sysdeps/m68k/bsd-setjmp.S index c1794978bc..c853516824 100644 --- a/sysdeps/m68k/bsd-setjmp.S +++ b/sysdeps/m68k/bsd-setjmp.S @@ -23,7 +23,7 @@ Cambridge, MA 02139, USA. */ #include -#if defined (MOTOROLA_SYNTAX) || defined (ELF_SYNTAX) +#ifdef MOTOROLA_SYNTAX #define d0 %d0 #define d1 %d1 #define PUSH(reg) move.l reg, -(%sp) From 6103f53bab2f708750db71f183e116db857a59e8 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 19 Feb 1996 23:06:16 +0000 Subject: [PATCH 0598/4487] Sun Feb 18 12:13:07 1996 Andreas Schwab * sysdeps/unix/sysv/linux/m68k/fpu_control.h (_FPU_SETCW): Corrected. --- sysdeps/unix/sysv/linux/m68k/fpu_control.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/m68k/fpu_control.h b/sysdeps/unix/sysv/linux/m68k/fpu_control.h index 0bbbb08916..0b3623d9a3 100644 --- a/sysdeps/unix/sysv/linux/m68k/fpu_control.h +++ b/sysdeps/unix/sysv/linux/m68k/fpu_control.h @@ -95,7 +95,7 @@ typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__SI__))); /* Macros for accessing the hardware control word. */ #define _FPU_GETCW(cw) __asm__ ("fmove%.l %!, %0" : "=dm" (cw)) -#define _FPU_SETCW(cw) __asm__ ("fmove%.l %0, %!" : "dm" (cw)) +#define _FPU_SETCW(cw) __asm__ volatile ("fmove%.l %0, %!" : : "dm" (cw)) /* Default control word set at startup. */ extern fpu_control_t __fpu_control; From 9c27e3112aca24ff9d279001ea1e1f51e52c3d12 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 27 Feb 1996 00:54:24 +0000 Subject: [PATCH 0599/4487] Mon Feb 26 10:22:30 1996 Roland McGrath * sysdeps/unix/sysv/sysv4/solaris2/syscalls.list: New file. --- sysdeps/unix/sysv/sysv4/solaris2/syscalls.list | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/solaris2/syscalls.list diff --git a/sysdeps/unix/sysv/sysv4/solaris2/syscalls.list b/sysdeps/unix/sysv/sysv4/solaris2/syscalls.list new file mode 100644 index 0000000000..52063630dc --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/solaris2/syscalls.list @@ -0,0 +1,3 @@ +# File name Caller Syscall name # args Strong name Weak names + +sigaction - sigaction 3 __sigaction sigaction From 0d4439738a02f57dae3a7981c23925393548b784 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 27 Feb 1996 14:51:36 +0000 Subject: [PATCH 0600/4487] Mon Feb 26 10:22:30 1996 Roland McGrath * sysdeps/unix/dirstream.h: Rewritten. * sysdeps/unix/readdir.c: Rewritten. * sysdeps/unix/telldir.c: Rewritten. * sysdeps/unix/closedir.c: Use <...> instead of "..." for dirstream.h. Remove __ from DIR struct member names. * sysdeps/unix/dirfd.c: Likewise. * sysdeps/unix/seekdir.c: Likewise. * sysdeps/unix/rewinddir.c: Likewise. * sysdeps/unix/opendir.c: Likewise. Don't allocate extra space after DIR structure. * sysdeps/stub/direct.h: File removed. * sysdeps/unix/bsd/bsd4.4/direct.h: File removed. * sysdeps/unix/bsd/direct.h: File removed. * sysdeps/unix/common/direct.h: File removed. * sysdeps/unix/sysv/irix4/direct.h: File removed. * sysdeps/unix/sysv/isc3/direct.h: File removed. * sysdeps/unix/sysv/sco3.2.4/direct.h: File removed. * sysdeps/unix/sysv/sysv4/solaris2/direct.h: File removed. * sysdeps/unix/common/direntry.h: New file. * sysdeps/unix/bsd/direntry.h: New file. * sysdeps/unix/bsd/bsd4.4/direntry.h: New file. * sysdeps/unix/sysv/direntry.h: New file. * sysdeps/stub/direntry.h: New file. * dirent/dirent.h (struct dirent): Type removed. Include to define it. (_D_EXACT_NAMLEN, _D_ALLOC_NAMLEN): New macros. * dirent/Makefile (headers): Add direntry.h. (distribute): Remove direct.h. * sysdeps/posix/getcwd.c: Use new macros instead of d_namlen. * dirent/scandir.c: Likewise. * io/fts.c (fts_build): Likewise. * io/ftw.c (ftw_dir): Likewise. * sysdeps/posix/ttyname.c: Likewise. --- sysdeps/unix/sysv/irix4/direct.h | 15 --------- sysdeps/unix/sysv/sco3.2.4/direct.h | 22 ------------- sysdeps/unix/sysv/sysv4/solaris2/direct.h | 39 ----------------------- 3 files changed, 76 deletions(-) delete mode 100644 sysdeps/unix/sysv/irix4/direct.h delete mode 100644 sysdeps/unix/sysv/sco3.2.4/direct.h delete mode 100644 sysdeps/unix/sysv/sysv4/solaris2/direct.h diff --git a/sysdeps/unix/sysv/irix4/direct.h b/sysdeps/unix/sysv/irix4/direct.h deleted file mode 100644 index 153087fef5..0000000000 --- a/sysdeps/unix/sysv/irix4/direct.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef MAXNAMLEN -#define MAXNAMLEN 255 -#endif - -struct direct - { - unsigned long int d_ino; - off_t d_off; - unsigned short int d_reclen; - char d_name[MAXNAMLEN + 1]; - }; - -#define D_NAMLEN(d) (strlen ((d)->d_name)) - -#define D_RECLEN(d) (d->d_reclen) diff --git a/sysdeps/unix/sysv/sco3.2.4/direct.h b/sysdeps/unix/sysv/sco3.2.4/direct.h deleted file mode 100644 index b3eaa54c8b..0000000000 --- a/sysdeps/unix/sysv/sco3.2.4/direct.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef MAXNAMLEN -#define MAXNAMLEN 512 -#endif -#define DIRBUF 1048 /* minimum buffer size for call to getdents */ - -struct direct - { - unsigned short int d_fileno; - short int d_pad; - long int d_off; - unsigned short int d_reclen; - char d_name[1]; /* Actually longer. */ - }; - -#include - -/* We calculate the length of the name by taking the length of the whole - `struct direct' record, subtracting the size of everything before the - name, and subtracting one for the terminating null. */ - -#define D_NAMLEN(d) \ - ((d)->d_reclen - offsetof (struct direct, d_name) - 1) diff --git a/sysdeps/unix/sysv/sysv4/solaris2/direct.h b/sysdeps/unix/sysv/sysv4/solaris2/direct.h deleted file mode 100644 index f9822dcbc5..0000000000 --- a/sysdeps/unix/sysv/sysv4/solaris2/direct.h +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright (C) 1992, 1993 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#ifndef _BSDDIR_H -#define _BSDDIR_H 1 - -#include - -/* This is the Solaris direct; it's the same as that in - sysdeps/unix/sysv/sysv4/direct.h, but it uses the length given by d_namlen, - since we can't reliably use tyhe sysv4/direct.h method of computing - the length. */ - -struct direct - { - unsigned long int d_fileno; - long int d_off; - unsigned short int d_reclen; - char d_name[NAME_MAX + 1]; - }; - -#define D_NAMLEN(d) (strlen ((d)->d_name)) - -#endif From f860256b2edcde37ffd62396f1506f90769de0b7 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 1 Mar 1996 18:14:40 +0000 Subject: [PATCH 0601/4487] Thu Feb 29 20:55:57 1996 Andreas Schwab * sysdeps/unix/sysv/linux/m68k/profil-counter.h: New file. --- sysdeps/unix/sysv/linux/m68k/profil-counter.h | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/profil-counter.h diff --git a/sysdeps/unix/sysv/linux/m68k/profil-counter.h b/sysdeps/unix/sysv/linux/m68k/profil-counter.h new file mode 100644 index 0000000000..4e7b132dc9 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/profil-counter.h @@ -0,0 +1,24 @@ +/* Machine-dependent SIGPROF signal handler. Linux/m68k version. +Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +static void +profil_counter (int signr, int code, struct sigcontext *scp) +{ + profil_count ((void *) scp->sc_pc); +} From 3de9f02e926f066b8ccd1cd3c1b58285d9034646 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 1 Mar 1996 18:43:45 +0000 Subject: [PATCH 0602/4487] Updated from /src/gmp-1.937 --- sysdeps/alpha/addmul_1.s | 23 +-- sysdeps/alpha/alphaev5/add_n.s | 175 +++++++++++--------- sysdeps/alpha/alphaev5/lshift.s | 30 ++-- sysdeps/alpha/alphaev5/rshift.s | 28 ++-- sysdeps/alpha/alphaev5/sub_n.s | 148 +++++++++++++++++ sysdeps/alpha/lshift.s | 14 +- sysdeps/alpha/mul_1.s | 2 +- sysdeps/alpha/rshift.s | 16 +- sysdeps/alpha/submul_1.s | 23 +-- sysdeps/alpha/udiv_qrnnd.S | 34 ++-- sysdeps/m68k/add_n.S | 75 ++++----- sysdeps/m68k/lshift.S | 150 +++++++++++++++++ sysdeps/m68k/m68020/addmul_1.S | 75 ++++----- sysdeps/m68k/m68020/mul_1.S | 83 +++++----- sysdeps/m68k/m68020/submul_1.S | 75 ++++----- sysdeps/m68k/rshift.S | 149 +++++++++++++++++ sysdeps/m68k/sub_n.S | 75 ++++----- sysdeps/m88k/add_n.s | 2 +- sysdeps/m88k/m88110/add_n.S | 199 +++++++++++++++++++++++ sysdeps/m88k/m88110/addmul_1.s | 60 +++++++ sysdeps/m88k/m88110/mul_1.s | 28 +--- sysdeps/m88k/m88110/sub_n.S | 275 ++++++++++++++++++++++++++++++++ sysdeps/m88k/mul_1.s | 74 +++++---- sysdeps/m88k/sub_n.s | 7 +- sysdeps/mips/addmul_1.s | 4 +- sysdeps/mips/mips3/addmul_1.s | 2 +- sysdeps/mips/mips3/mul_1.s | 2 +- sysdeps/mips/mips3/submul_1.s | 2 +- sysdeps/mips/mul_1.s | 4 +- sysdeps/mips/submul_1.s | 4 +- sysdeps/rs6000/add_n.s | 2 +- sysdeps/rs6000/sub_n.s | 2 +- sysdeps/vax/gmp-mparam.h | 2 +- sysdeps/z8000/mul_1.s | 2 +- 34 files changed, 1410 insertions(+), 436 deletions(-) create mode 100644 sysdeps/alpha/alphaev5/sub_n.s create mode 100644 sysdeps/m68k/lshift.S create mode 100644 sysdeps/m68k/rshift.S create mode 100644 sysdeps/m88k/m88110/add_n.S create mode 100644 sysdeps/m88k/m88110/addmul_1.s create mode 100644 sysdeps/m88k/m88110/sub_n.S diff --git a/sysdeps/alpha/addmul_1.s b/sysdeps/alpha/addmul_1.s index 46d277df6e..8b168cb46d 100644 --- a/sysdeps/alpha/addmul_1.s +++ b/sysdeps/alpha/addmul_1.s @@ -26,16 +26,7 @@ # size r18 # s2_limb r19 - # This code runs at 42 cycles/limb on the 21064. - - # To improve performance for long multiplications, we would use - # 'fetch' for S1 and 'fetch_m' for RES. It's not obvious how to use - # these instructions without slowing down the general code: 1. We can - # only have two prefetches in operation at any time in the Alpha - # architecture. 2. There will seldom be any special alignment - # between RES_PTR and S1_PTR. Maybe we can simply divide the current - # loop into an inner and outer loop, having the inner loop handle - # exactly one prefetch block? + # This code runs at 42 cycles/limb on EV4 and 18 cycles/limb on EV5. .set noreorder .set noat @@ -52,7 +43,7 @@ __mpn_addmul_1: mulq $2,$19,$3 # $3 = prod_low ldq $5,0($16) # $5 = *res_ptr umulh $2,$19,$0 # $0 = prod_high - beq $18,Lend1 # jump if size was == 1 + beq $18,.Lend1 # jump if size was == 1 ldq $2,0($17) # $2 = s1_limb addq $17,8,$17 # s1_ptr++ subq $18,1,$18 # size-- @@ -60,10 +51,10 @@ __mpn_addmul_1: cmpult $3,$5,$4 stq $3,0($16) addq $16,8,$16 # res_ptr++ - beq $18,Lend2 # jump if size was == 2 + beq $18,.Lend2 # jump if size was == 2 .align 3 -Loop: mulq $2,$19,$3 # $3 = prod_low +.Loop: mulq $2,$19,$3 # $3 = prod_low ldq $5,0($16) # $5 = *res_ptr addq $4,$0,$0 # cy_limb = cy_limb + 'cy' subq $18,1,$18 # size-- @@ -77,9 +68,9 @@ Loop: mulq $2,$19,$3 # $3 = prod_low stq $3,0($16) addq $16,8,$16 # res_ptr++ addq $5,$0,$0 # combine carries - bne $18,Loop + bne $18,.Loop -Lend2: mulq $2,$19,$3 # $3 = prod_low +.Lend2: mulq $2,$19,$3 # $3 = prod_low ldq $5,0($16) # $5 = *res_ptr addq $4,$0,$0 # cy_limb = cy_limb + 'cy' umulh $2,$19,$4 # $4 = cy_limb @@ -91,7 +82,7 @@ Lend2: mulq $2,$19,$3 # $3 = prod_low addq $5,$0,$0 # combine carries addq $4,$0,$0 # cy_limb = prod_high + cy ret $31,($26),1 -Lend1: addq $5,$3,$3 +.Lend1: addq $5,$3,$3 cmpult $3,$5,$5 stq $3,0($16) addq $0,$5,$0 diff --git a/sysdeps/alpha/alphaev5/add_n.s b/sysdeps/alpha/alphaev5/add_n.s index 2aaf041774..66cf82b3c3 100644 --- a/sysdeps/alpha/alphaev5/add_n.s +++ b/sysdeps/alpha/alphaev5/add_n.s @@ -35,84 +35,113 @@ __mpn_add_n: .frame $30,0,$26,0 - ldq $3,0($17) - ldq $4,0($18) - - subq $19,1,$19 - and $19,4-1,$2 # number of limbs in first loop - bis $31,$31,$0 - beq $2,.L0 # if multiple of 4 limbs, skip first loop - - subq $19,$2,$19 - -.Loop0: subq $2,1,$2 + or $31,$31,$25 # clear cy + subq $19,4,$19 # decr loop cnt + blt $19,.Lend2 # if less than 4 limbs, goto 2nd loop + # Start software pipeline for 1st loop + ldq $0,0($18) + ldq $1,8($18) + ldq $4,0($17) ldq $5,8($17) - addq $4,$0,$4 - ldq $6,8($18) - cmpult $4,$0,$1 - addq $3,$4,$4 - cmpult $4,$3,$0 - stq $4,0($16) - or $0,$1,$0 - - addq $17,8,$17 - addq $18,8,$18 - bis $5,$5,$3 - bis $6,$6,$4 - addq $16,8,$16 - bne $2,.Loop0 - -.L0: beq $19,.Lend - + addq $17,32,$17 # update s1_ptr + ldq $2,16($18) + addq $0,$4,$20 # 1st main add + ldq $3,24($18) + subq $19,4,$19 # decr loop cnt + ldq $6,-16($17) + cmpult $20,$0,$25 # compute cy from last add + ldq $7,-8($17) + addq $1,$25,$28 # cy add + addq $18,32,$18 # update s2_ptr + addq $5,$28,$21 # 2nd main add + cmpult $28,$25,$8 # compute cy from last add + blt $19,.Lend1 # if less than 4 limbs remain, jump + # 1st loop handles groups of 4 limbs in a software pipeline .align 4 -.Loop: subq $19,4,$19 - unop - - ldq $6,8($18) - addq $4,$0,$0 +.Loop: cmpult $21,$28,$25 # compute cy from last add + ldq $0,0($18) + or $8,$25,$25 # combine cy from the two adds + ldq $1,8($18) + addq $2,$25,$28 # cy add + ldq $4,0($17) + addq $28,$6,$22 # 3rd main add ldq $5,8($17) - cmpult $0,$4,$1 - ldq $4,16($18) - addq $3,$0,$20 - cmpult $20,$3,$0 - ldq $3,16($17) - or $0,$1,$0 - addq $6,$0,$0 - cmpult $0,$6,$1 - ldq $6,24($18) - addq $5,$0,$21 - cmpult $21,$5,$0 - ldq $5,24($17) - or $0,$1,$0 - addq $4,$0,$0 - cmpult $0,$4,$1 - ldq $4,32($18) - addq $3,$0,$22 - cmpult $22,$3,$0 - ldq $3,32($17) - or $0,$1,$0 - addq $6,$0,$0 - cmpult $0,$6,$1 - addq $5,$0,$23 - cmpult $23,$5,$0 - or $0,$1,$0 - + cmpult $28,$25,$8 # compute cy from last add + cmpult $22,$28,$25 # compute cy from last add stq $20,0($16) + or $8,$25,$25 # combine cy from the two adds stq $21,8($16) - stq $22,16($16) - stq $23,24($16) - - addq $17,32,$17 - addq $18,32,$18 - addq $16,32,$16 - bne $19,.Loop + addq $3,$25,$28 # cy add + addq $28,$7,$23 # 4th main add + cmpult $28,$25,$8 # compute cy from last add + cmpult $23,$28,$25 # compute cy from last add + addq $17,32,$17 # update s1_ptr + or $8,$25,$25 # combine cy from the two adds + addq $16,32,$16 # update res_ptr + addq $0,$25,$28 # cy add + ldq $2,16($18) + addq $4,$28,$20 # 1st main add + ldq $3,24($18) + cmpult $28,$25,$8 # compute cy from last add + ldq $6,-16($17) + cmpult $20,$28,$25 # compute cy from last add + ldq $7,-8($17) + or $8,$25,$25 # combine cy from the two adds + subq $19,4,$19 # decr loop cnt + stq $22,-16($16) + addq $1,$25,$28 # cy add + stq $23,-8($16) + addq $5,$28,$21 # 2nd main add + addq $18,32,$18 # update s2_ptr + cmpult $28,$25,$8 # compute cy from last add + bge $19,.Loop + # Finish software pipeline for 1st loop +.Lend1: cmpult $21,$28,$25 # compute cy from last add + or $8,$25,$25 # combine cy from the two adds + addq $2,$25,$28 # cy add + addq $28,$6,$22 # 3rd main add + cmpult $28,$25,$8 # compute cy from last add + cmpult $22,$28,$25 # compute cy from last add + stq $20,0($16) + or $8,$25,$25 # combine cy from the two adds + stq $21,8($16) + addq $3,$25,$28 # cy add + addq $28,$7,$23 # 4th main add + cmpult $28,$25,$8 # compute cy from last add + cmpult $23,$28,$25 # compute cy from last add + or $8,$25,$25 # combine cy from the two adds + addq $16,32,$16 # update res_ptr + stq $22,-16($16) + stq $23,-8($16) +.Lend2: addq $19,4,$19 # restore loop cnt + beq $19,.Lret + # Start software pipeline for 2nd loop + ldq $0,0($18) + ldq $4,0($17) + subq $19,1,$19 + beq $19,.Lend0 + # 2nd loop handles remaining 1-3 limbs + .align 4 +.Loop0: addq $0,$25,$28 # cy add + ldq $0,8($18) + addq $4,$28,$20 # main add + ldq $4,8($17) + addq $18,8,$18 + cmpult $28,$25,$8 # compute cy from last add + addq $17,8,$17 + stq $20,0($16) + cmpult $20,$28,$25 # compute cy from last add + subq $19,1,$19 # decr loop cnt + or $8,$25,$25 # combine cy from the two adds + addq $16,8,$16 + bne $19,.Loop0 +.Lend0: addq $0,$25,$28 # cy add + addq $4,$28,$20 # main add + cmpult $28,$25,$8 # compute cy from last add + cmpult $20,$28,$25 # compute cy from last add + stq $20,0($16) + or $8,$25,$25 # combine cy from the two adds -.Lend: addq $4,$0,$4 - cmpult $4,$0,$1 - addq $3,$4,$4 - cmpult $4,$3,$0 - stq $4,0($16) - or $0,$1,$0 +.Lret: or $25,$31,$0 # return cy ret $31,($26),1 - .end __mpn_add_n diff --git a/sysdeps/alpha/alphaev5/lshift.s b/sysdeps/alpha/alphaev5/lshift.s index fdb089550f..392b4249b8 100644 --- a/sysdeps/alpha/alphaev5/lshift.s +++ b/sysdeps/alpha/alphaev5/lshift.s @@ -25,7 +25,7 @@ # size r18 # cnt r19 - # This code runs at 4.25 cycles/limb on the EV5. + # This code runs at 3.25 cycles/limb on the EV5. .set noreorder .set noat @@ -44,11 +44,11 @@ __mpn_lshift: and $18,4-1,$28 # number of limbs in first loop srl $4,$20,$0 # compute function result - beq $28,L0 + beq $28,.L0 subq $18,$28,$18 .align 3 -Loop0: ldq $3,-16($17) +.Loop0: ldq $3,-16($17) subq $16,8,$16 sll $4,$19,$5 subq $17,8,$17 @@ -57,17 +57,17 @@ Loop0: ldq $3,-16($17) or $3,$3,$4 or $5,$6,$8 stq $8,0($16) - bne $28,Loop0 + bne $28,.Loop0 -L0: sll $4,$19,$24 - beq $18,Lend +.L0: sll $4,$19,$24 + beq $18,.Lend # warm up phase 1 ldq $1,-16($17) subq $18,4,$18 ldq $2,-24($17) ldq $3,-32($17) ldq $4,-40($17) - beq $18,Lcool1 + beq $18,.Lend1 # warm up phase 2 srl $1,$20,$7 sll $1,$19,$21 @@ -84,10 +84,10 @@ L0: sll $4,$19,$24 sll $4,$19,$24 ldq $4,-72($17) subq $18,4,$18 - beq $18,Lcool1 + beq $18,.Lend2 .align 4 # main loop -Loop: stq $7,-8($16) +.Loop: stq $7,-8($16) or $5,$22,$5 stq $8,-16($16) or $6,$23,$6 @@ -113,16 +113,14 @@ Loop: stq $7,-8($16) subq $16,32,$16 srl $4,$20,$6 - ldq $3,-96($17 + ldq $3,-96($17) sll $4,$19,$24 ldq $4,-104($17) subq $17,32,$17 - bne $18,Loop - unop - unop + bne $18,.Loop # cool down phase 2/1 -Lcool1: stq $7,-8($16) +.Lend2: stq $7,-8($16) or $5,$22,$5 stq $8,-16($16) or $6,$23,$6 @@ -150,7 +148,7 @@ Lcool1: stq $7,-8($16) ret $31,($26),1 # cool down phase 1/1 -Lcool1: srl $1,$20,$7 +.Lend1: srl $1,$20,$7 sll $1,$19,$21 srl $2,$20,$8 sll $2,$19,$22 @@ -170,6 +168,6 @@ Lcool1: srl $1,$20,$7 stq $24,-40($16) ret $31,($26),1 -Lend stq $24,-8($16) +.Lend: stq $24,-8($16) ret $31,($26),1 .end __mpn_lshift diff --git a/sysdeps/alpha/alphaev5/rshift.s b/sysdeps/alpha/alphaev5/rshift.s index 1da9960b46..d20dde35b7 100644 --- a/sysdeps/alpha/alphaev5/rshift.s +++ b/sysdeps/alpha/alphaev5/rshift.s @@ -25,7 +25,7 @@ # size r18 # cnt r19 - # This code runs at 4.25 cycles/limb on the EV5. + # This code runs at 3.25 cycles/limb on the EV5. .set noreorder .set noat @@ -42,11 +42,11 @@ __mpn_rshift: and $18,4-1,$28 # number of limbs in first loop sll $4,$20,$0 # compute function result - beq $28,L0 + beq $28,.L0 subq $18,$28,$18 .align 3 -Loop0: ldq $3,8($17) +.Loop0: ldq $3,8($17) addq $16,8,$16 srl $4,$19,$5 addq $17,8,$17 @@ -55,17 +55,17 @@ Loop0: ldq $3,8($17) or $3,$3,$4 or $5,$6,$8 stq $8,-8($16) - bne $28,Loop0 + bne $28,.Loop0 -L0: srl $4,$19,$24 - beq $18,Lend +.L0: srl $4,$19,$24 + beq $18,.Lend # warm up phase 1 ldq $1,8($17) subq $18,4,$18 ldq $2,16($17) ldq $3,24($17) ldq $4,32($17) - beq $18,Lcool1 + beq $18,.Lend1 # warm up phase 2 sll $1,$20,$7 srl $1,$19,$21 @@ -82,10 +82,10 @@ L0: srl $4,$19,$24 srl $4,$19,$24 ldq $4,64($17) subq $18,4,$18 - beq $18,Lcool2 + beq $18,.Lend2 .align 4 # main loop -Loop: stq $7,0($16) +.Loop: stq $7,0($16) or $5,$22,$5 stq $8,8($16) or $6,$23,$6 @@ -116,11 +116,9 @@ Loop: stq $7,0($16) ldq $4,96($17) addq $17,32,$17 - bne $18,Loop - unop - unop + bne $18,.Loop # cool down phase 2/1 -Lcool2: stq $7,0($16) +.Lend2: stq $7,0($16) or $5,$22,$5 stq $8,8($16) or $6,$23,$6 @@ -148,7 +146,7 @@ Lcool2: stq $7,0($16) ret $31,($26),1 # cool down phase 1/1 -Lcool1: sll $1,$20,$7 +.Lend1: sll $1,$20,$7 srl $1,$19,$21 sll $2,$20,$8 srl $2,$19,$22 @@ -168,6 +166,6 @@ Lcool1: sll $1,$20,$7 stq $24,32($16) ret $31,($26),1 -Lend: stq $24,0($16) +.Lend: stq $24,0($16) ret $31,($26),1 .end __mpn_rshift diff --git a/sysdeps/alpha/alphaev5/sub_n.s b/sysdeps/alpha/alphaev5/sub_n.s new file mode 100644 index 0000000000..c9f3a4ec3a --- /dev/null +++ b/sysdeps/alpha/alphaev5/sub_n.s @@ -0,0 +1,148 @@ + # Alpha __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and + # store difference in a third limb vector. + + # Copyright (C) 1995 Free Software Foundation, Inc. + + # This file is part of the GNU MP Library. + + # The GNU MP Library is free software; you can redistribute it and/or modify + # it under the terms of the GNU Library General Public License as published by + # the Free Software Foundation; either version 2 of the License, or (at your + # option) any later version. + + # The GNU MP 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 Library General Public + # License for more details. + + # You should have received a copy of the GNU Library General Public License + # along with the GNU MP Library; see the file COPYING.LIB. If not, write to + # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + + # INPUT PARAMETERS + # res_ptr $16 + # s1_ptr $17 + # s2_ptr $18 + # size $19 + + .set noreorder + .set noat +.text + .align 3 + .globl __mpn_sub_n + .ent __mpn_sub_n +__mpn_sub_n: + .frame $30,0,$26,0 + + or $31,$31,$25 # clear cy + subq $19,4,$19 # decr loop cnt + blt $19,.Lend2 # if less than 4 limbs, goto 2nd loop + # Start software pipeline for 1st loop + ldq $0,0($18) + ldq $1,8($18) + ldq $4,0($17) + ldq $5,8($17) + addq $17,32,$17 # update s1_ptr + ldq $2,16($18) + subq $4,$0,$20 # 1st main sub + ldq $3,24($18) + subq $19,4,$19 # decr loop cnt + ldq $6,-16($17) + cmpult $4,$20,$25 # compute cy from last sub + ldq $7,-8($17) + addq $1,$25,$28 # cy add + addq $18,32,$18 # update s2_ptr + subq $5,$28,$21 # 2nd main sub + cmpult $28,$25,$8 # compute cy from last add + blt $19,.Lend1 # if less than 4 limbs remain, jump + # 1st loop handles groups of 4 limbs in a software pipeline + .align 4 +.Loop: cmpult $5,$21,$25 # compute cy from last add + ldq $0,0($18) + or $8,$25,$25 # combine cy from the two adds + ldq $1,8($18) + addq $2,$25,$28 # cy add + ldq $4,0($17) + subq $6,$28,$22 # 3rd main sub + ldq $5,8($17) + cmpult $28,$25,$8 # compute cy from last add + cmpult $6,$22,$25 # compute cy from last add + stq $20,0($16) + or $8,$25,$25 # combine cy from the two adds + stq $21,8($16) + addq $3,$25,$28 # cy add + subq $7,$28,$23 # 4th main sub + cmpult $28,$25,$8 # compute cy from last add + cmpult $7,$23,$25 # compute cy from last add + addq $17,32,$17 # update s1_ptr + or $8,$25,$25 # combine cy from the two adds + addq $16,32,$16 # update res_ptr + addq $0,$25,$28 # cy add + ldq $2,16($18) + subq $4,$28,$20 # 1st main sub + ldq $3,24($18) + cmpult $28,$25,$8 # compute cy from last add + ldq $6,-16($17) + cmpult $4,$20,$25 # compute cy from last add + ldq $7,-8($17) + or $8,$25,$25 # combine cy from the two adds + subq $19,4,$19 # decr loop cnt + stq $22,-16($16) + addq $1,$25,$28 # cy add + stq $23,-8($16) + subq $5,$28,$21 # 2nd main sub + addq $18,32,$18 # update s2_ptr + cmpult $28,$25,$8 # compute cy from last add + bge $19,.Loop + # Finish software pipeline for 1st loop +.Lend1: cmpult $5,$21,$25 # compute cy from last add + or $8,$25,$25 # combine cy from the two adds + addq $2,$25,$28 # cy add + subq $6,$28,$22 # 3rd main sub + cmpult $28,$25,$8 # compute cy from last add + cmpult $6,$22,$25 # compute cy from last add + stq $20,0($16) + or $8,$25,$25 # combine cy from the two adds + stq $21,8($16) + addq $3,$25,$28 # cy add + subq $7,$28,$23 # 4th main sub + cmpult $28,$25,$8 # compute cy from last add + cmpult $7,$23,$25 # compute cy from last add + or $8,$25,$25 # combine cy from the two adds + addq $16,32,$16 # update res_ptr + stq $22,-16($16) + stq $23,-8($16) +.Lend2: addq $19,4,$19 # restore loop cnt + beq $19,.Lret + # Start software pipeline for 2nd loop + ldq $0,0($18) + ldq $4,0($17) + subq $19,1,$19 + beq $19,.Lend0 + # 2nd loop handles remaining 1-3 limbs + .align 4 +.Loop0: addq $0,$25,$28 # cy add + ldq $0,8($18) + subq $4,$28,$20 # main sub + ldq $1,8($17) + addq $18,8,$18 + cmpult $28,$25,$8 # compute cy from last add + addq $17,8,$17 + stq $20,0($16) + cmpult $4,$20,$25 # compute cy from last add + subq $19,1,$19 # decr loop cnt + or $8,$25,$25 # combine cy from the two adds + addq $16,8,$16 + or $1,$31,$4 + bne $19,.Loop0 +.Lend0: addq $0,$25,$28 # cy add + subq $4,$28,$20 # main sub + cmpult $28,$25,$8 # compute cy from last add + cmpult $4,$20,$25 # compute cy from last add + stq $20,0($16) + or $8,$25,$25 # combine cy from the two adds + +.Lret: or $25,$31,$0 # return cy + ret $31,($26),1 + .end __mpn_sub_n diff --git a/sysdeps/alpha/lshift.s b/sysdeps/alpha/lshift.s index c28434926b..aa8417bb6a 100644 --- a/sysdeps/alpha/lshift.s +++ b/sysdeps/alpha/lshift.s @@ -53,11 +53,11 @@ __mpn_lshift: and $18,4-1,$20 # number of limbs in first loop srl $4,$7,$0 # compute function result - beq $20,L0 + beq $20,.L0 subq $18,$20,$18 .align 3 -Loop0: +.Loop0: ldq $3,-8($17) subq $16,8,$16 subq $17,8,$17 @@ -67,12 +67,12 @@ Loop0: bis $3,$3,$4 bis $5,$6,$8 stq $8,0($16) - bne $20,Loop0 + bne $20,.Loop0 -L0: beq $18,Lend +.L0: beq $18,.Lend .align 3 -Loop: ldq $3,-8($17) +.Loop: ldq $3,-8($17) subq $16,32,$16 subq $18,4,$18 sll $4,$19,$5 @@ -100,9 +100,9 @@ Loop: ldq $3,-8($17) bis $1,$2,$8 stq $8,0($16) - bgt $18,Loop + bgt $18,.Loop -Lend: sll $4,$19,$8 +.Lend: sll $4,$19,$8 stq $8,-8($16) ret $31,($26),1 .end __mpn_lshift diff --git a/sysdeps/alpha/mul_1.s b/sysdeps/alpha/mul_1.s index 3ef194d7e6..58a63dfa5d 100644 --- a/sysdeps/alpha/mul_1.s +++ b/sysdeps/alpha/mul_1.s @@ -1,7 +1,7 @@ # Alpha 21064 __mpn_mul_1 -- Multiply a limb vector with a limb and store # the result in a second limb vector. - # Copyright (C) 1992, 1994 Free Software Foundation, Inc. + # Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc. # This file is part of the GNU MP Library. diff --git a/sysdeps/alpha/rshift.s b/sysdeps/alpha/rshift.s index 74eab0434a..037b776017 100644 --- a/sysdeps/alpha/rshift.s +++ b/sysdeps/alpha/rshift.s @@ -34,7 +34,7 @@ # 1. ldq has a 3 cycle delay, srl and sll have a 2 cycle delay. # 2. Only aligned instruction pairs can be paired. # 3. The store buffer or silo might not be able to deal with the bandwidth. - + .set noreorder .set noat .text @@ -51,11 +51,11 @@ __mpn_rshift: and $18,4-1,$20 # number of limbs in first loop sll $4,$7,$0 # compute function result - beq $20,L0 + beq $20,.L0 subq $18,$20,$18 .align 3 -Loop0: +.Loop0: ldq $3,0($17) addq $16,8,$16 addq $17,8,$17 @@ -65,12 +65,12 @@ Loop0: bis $3,$3,$4 bis $5,$6,$8 stq $8,-8($16) - bne $20,Loop0 + bne $20,.Loop0 -L0: beq $18,Lend +.L0: beq $18,.Lend .align 3 -Loop: ldq $3,0($17) +.Loop: ldq $3,0($17) addq $16,32,$16 subq $18,4,$18 srl $4,$19,$5 @@ -98,9 +98,9 @@ Loop: ldq $3,0($17) bis $1,$2,$8 stq $8,-8($16) - bgt $18,Loop + bgt $18,.Loop -Lend: srl $4,$19,$8 +.Lend: srl $4,$19,$8 stq $8,0($16) ret $31,($26),1 .end __mpn_rshift diff --git a/sysdeps/alpha/submul_1.s b/sysdeps/alpha/submul_1.s index acaa11c545..292b2c18b6 100644 --- a/sysdeps/alpha/submul_1.s +++ b/sysdeps/alpha/submul_1.s @@ -26,16 +26,7 @@ # size r18 # s2_limb r19 - # This code runs at 42 cycles/limb on the 21064. - - # To improve performance for long multiplications, we would use - # 'fetch' for S1 and 'fetch_m' for RES. It's not obvious how to use - # these instructions without slowing down the general code: 1. We can - # only have two prefetches in operation at any time in the Alpha - # architecture. 2. There will seldom be any special alignment - # between RES_PTR and S1_PTR. Maybe we can simply divide the current - # loop into an inner and outer loop, having the inner loop handle - # exactly one prefetch block? + # This code runs at 42 cycles/limb on EV4 and 18 cycles/limb on EV5. .set noreorder .set noat @@ -52,7 +43,7 @@ __mpn_submul_1: mulq $2,$19,$3 # $3 = prod_low ldq $5,0($16) # $5 = *res_ptr umulh $2,$19,$0 # $0 = prod_high - beq $18,Lend1 # jump if size was == 1 + beq $18,.Lend1 # jump if size was == 1 ldq $2,0($17) # $2 = s1_limb addq $17,8,$17 # s1_ptr++ subq $18,1,$18 # size-- @@ -60,10 +51,10 @@ __mpn_submul_1: cmpult $5,$3,$4 stq $3,0($16) addq $16,8,$16 # res_ptr++ - beq $18,Lend2 # jump if size was == 2 + beq $18,.Lend2 # jump if size was == 2 .align 3 -Loop: mulq $2,$19,$3 # $3 = prod_low +.Loop: mulq $2,$19,$3 # $3 = prod_low ldq $5,0($16) # $5 = *res_ptr addq $4,$0,$0 # cy_limb = cy_limb + 'cy' subq $18,1,$18 # size-- @@ -77,9 +68,9 @@ Loop: mulq $2,$19,$3 # $3 = prod_low stq $3,0($16) addq $16,8,$16 # res_ptr++ addq $5,$0,$0 # combine carries - bne $18,Loop + bne $18,.Loop -Lend2: mulq $2,$19,$3 # $3 = prod_low +.Lend2: mulq $2,$19,$3 # $3 = prod_low ldq $5,0($16) # $5 = *res_ptr addq $4,$0,$0 # cy_limb = cy_limb + 'cy' umulh $2,$19,$4 # $4 = cy_limb @@ -91,7 +82,7 @@ Lend2: mulq $2,$19,$3 # $3 = prod_low addq $5,$0,$0 # combine carries addq $4,$0,$0 # cy_limb = prod_high + cy ret $31,($26),1 -Lend1: subq $5,$3,$3 +.Lend1: subq $5,$3,$3 cmpult $5,$3,$5 stq $3,0($16) addq $0,$5,$0 diff --git a/sysdeps/alpha/udiv_qrnnd.S b/sysdeps/alpha/udiv_qrnnd.S index bafafd672e..ce590ede6c 100644 --- a/sysdeps/alpha/udiv_qrnnd.S +++ b/sysdeps/alpha/udiv_qrnnd.S @@ -1,6 +1,6 @@ # Alpha 21064 __udiv_qrnnd - # Copyright (C) 1992, 1994 Free Software Foundation, Inc. + # Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc. # This file is part of the GNU MP Library. @@ -21,13 +21,11 @@ .set noreorder .set noat - .text - .align 3 - .globl __udiv_qrnnd - .ent __udiv_qrnnd 0 + .align 3 + .globl __udiv_qrnnd + .ent __udiv_qrnnd __udiv_qrnnd: -__udiv_qrnnd..ng: .frame $30,0,$26,0 .prologue 0 #define cnt $2 @@ -39,9 +37,9 @@ __udiv_qrnnd..ng: #define qb $20 ldiq cnt,16 - blt d,Largedivisor + blt d,.Largedivisor -Loop1: cmplt n0,0,tmp +.Loop1: cmplt n0,0,tmp addq n1,n1,n1 bis n1,tmp,n1 addq n0,n0,n0 @@ -74,12 +72,12 @@ Loop1: cmplt n0,0,tmp cmovne qb,tmp,n1 bis n0,qb,n0 subq cnt,1,cnt - bgt cnt,Loop1 + bgt cnt,.Loop1 stq n1,0(rem_ptr) bis $31,n0,$0 ret $31,($26),1 -Largedivisor: +.Largedivisor: and n0,1,$4 srl n0,1,n0 @@ -91,7 +89,7 @@ Largedivisor: srl d,1,$5 addq $5,$6,$5 -Loop2: cmplt n0,0,tmp +.Loop2: cmplt n0,0,tmp addq n1,n1,n1 bis n1,tmp,n1 addq n0,n0,n0 @@ -124,27 +122,27 @@ Loop2: cmplt n0,0,tmp cmovne qb,tmp,n1 bis n0,qb,n0 subq cnt,1,cnt - bgt cnt,Loop2 + bgt cnt,.Loop2 addq n1,n1,n1 addq $4,n1,n1 - bne $6,Odd + bne $6,.LOdd stq n1,0(rem_ptr) bis $31,n0,$0 ret $31,($26),1 -Odd: +.LOdd: /* q' in n0. r' in n1 */ addq n1,n0,n1 cmpult n1,n0,tmp # tmp := carry from addq - beq tmp,LLp6 + beq tmp,.LLp6 addq n0,1,n0 subq n1,d,n1 -LLp6: cmpult n1,d,tmp - bne tmp,LLp7 +.LLp6: cmpult n1,d,tmp + bne tmp,.LLp7 addq n0,1,n0 subq n1,d,n1 -LLp7: +.LLp7: stq n1,0(rem_ptr) bis $31,n0,$0 ret $31,($26),1 diff --git a/sysdeps/m68k/add_n.S b/sysdeps/m68k/add_n.S index ea7a4458ea..754af9f469 100644 --- a/sysdeps/m68k/add_n.S +++ b/sysdeps/m68k/add_n.S @@ -1,7 +1,7 @@ /* mc68020 __mpn_add_n -- Add two limb vectors of the same length > 0 and store sum in a third limb vector. -Copyright (C) 1992, 1994 Free Software Foundation, Inc. +Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -27,50 +27,53 @@ the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ size (sp + 12) */ +#include "sysdep.h" #include "asm-syntax.h" TEXT ALIGN - GLOBL ___mpn_add_n + GLOBL C_SYMBOL_NAME(__mpn_add_n) -LAB(___mpn_add_n) +C_SYMBOL_NAME(__mpn_add_n:) +PROLOG(__mpn_add_n) /* Save used registers on the stack. */ - INSN2(move,l ,MEM_PREDEC(sp),d2) - INSN2(move,l ,MEM_PREDEC(sp),a2) + movel R(d2),MEM_PREDEC(sp) + movel R(a2),MEM_PREDEC(sp) /* Copy the arguments to registers. Better use movem? */ - INSN2(move,l ,a2,MEM_DISP(sp,12)) - INSN2(move,l ,a0,MEM_DISP(sp,16)) - INSN2(move,l ,a1,MEM_DISP(sp,20)) - INSN2(move,l ,d2,MEM_DISP(sp,24)) - - INSN2(eor,w ,d2,#1) - INSN2(lsr,l ,d2,#1) - bcc L1 - INSN2(subq,l ,d2,#1) /* clears cy as side effect */ - -LAB(Loop) - INSN2(move,l ,d0,MEM_POSTINC(a0)) - INSN2(move,l ,d1,MEM_POSTINC(a1)) - INSN2(addx,l ,d0,d1) - INSN2(move,l ,MEM_POSTINC(a2),d0) -LAB(L1) INSN2(move,l ,d0,MEM_POSTINC(a0)) - INSN2(move,l ,d1,MEM_POSTINC(a1)) - INSN2(addx,l ,d0,d1) - INSN2(move,l ,MEM_POSTINC(a2),d0) - - dbf d2,Loop /* loop until 16 lsb of %4 == -1 */ - INSN2(subx,l ,d0,d0) /* d0 <= -cy; save cy as 0 or -1 in d0 */ - INSN2(sub,l ,d2,#0x10000) - bcs L2 - INSN2(add,l ,d0,d0) /* restore cy */ - bra Loop - -LAB(L2) - INSN1(neg,l ,d0) + movel MEM_DISP(sp,12),R(a2) + movel MEM_DISP(sp,16),R(a0) + movel MEM_DISP(sp,20),R(a1) + movel MEM_DISP(sp,24),R(d2) + + eorw #1,R(d2) + lsrl #1,R(d2) + bcc L(L1) + subql #1,R(d2) /* clears cy as side effect */ + +L(Loop:) + movel MEM_POSTINC(a0),R(d0) + movel MEM_POSTINC(a1),R(d1) + addxl R(d1),R(d0) + movel R(d0),MEM_POSTINC(a2) +L(L1:) movel MEM_POSTINC(a0),R(d0) + movel MEM_POSTINC(a1),R(d1) + addxl R(d1),R(d0) + movel R(d0),MEM_POSTINC(a2) + + dbf R(d2),L(Loop) /* loop until 16 lsb of %4 == -1 */ + subxl R(d0),R(d0) /* d0 <= -cy; save cy as 0 or -1 in d0 */ + subl #0x10000,R(d2) + bcs L(L2) + addl R(d0),R(d0) /* restore cy */ + bra L(Loop) + +L(L2:) + negl R(d0) /* Restore used registers from stack frame. */ - INSN2(move,l ,a2,MEM_POSTINC(sp)) - INSN2(move,l ,d2,MEM_POSTINC(sp)) + movel MEM_POSTINC(sp),R(a2) + movel MEM_POSTINC(sp),R(d2) rts +EPILOG(__mpn_add_n) diff --git a/sysdeps/m68k/lshift.S b/sysdeps/m68k/lshift.S new file mode 100644 index 0000000000..c58594a01b --- /dev/null +++ b/sysdeps/m68k/lshift.S @@ -0,0 +1,150 @@ +/* mc68020 __mpn_lshift -- Shift left a low-level natural-number integer. + +Copyright (C) 1996 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Library General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at your +option) any later version. + +The GNU MP 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 Library General Public +License for more details. + +You should have received a copy of the GNU Library General Public License +along with the GNU MP Library; see the file COPYING.LIB. If not, write to +the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +/* + INPUT PARAMETERS + res_ptr (sp + 4) + s_ptr (sp + 8) + s_size (sp + 16) + cnt (sp + 12) +*/ + +#include "sysdep.h" +#include "asm-syntax.h" + +#define res_ptr a1 +#define s_ptr a0 +#define s_size d6 +#define cnt d4 + + TEXT + ALIGN + GLOBL C_SYMBOL_NAME(__mpn_lshift) + +C_SYMBOL_NAME(__mpn_lshift:) +PROLOG(__mpn_lshift) + +/* Save used registers on the stack. */ + moveml R(d2)-R(d6)/R(a2),MEM_PREDEC(sp) + +/* Copy the arguments to registers. */ + movel MEM_DISP(sp,28),R(res_ptr) + movel MEM_DISP(sp,32),R(s_ptr) + movel MEM_DISP(sp,36),R(s_size) + movel MEM_DISP(sp,40),R(cnt) + + moveql #1,R(d5) + cmpl R(d5),R(cnt) + bne L(Lnormal) + cmpl R(s_ptr),R(res_ptr) + bls L(Lspecial) /* jump if s_ptr >= res_ptr */ +#if (defined (__mc68020__) || defined (__NeXT__) || defined(mc68020)) + lea MEM_INDX1(s_ptr,s_size,l,4),R(a2) +#else /* not mc68020 */ + movel R(s_size),R(d0) + asll #2,R(d0) + lea MEM_INDX(s_ptr,d0,l),R(a2) +#endif + cmpl R(res_ptr),R(a2) + bls L(Lspecial) /* jump if res_ptr >= s_ptr + s_size */ + +L(Lnormal:) + moveql #32,R(d5) + subl R(cnt),R(d5) + +#if (defined (__mc68020__) || defined (__NeXT__) || defined(mc68020)) + lea MEM_INDX1(s_ptr,s_size,l,4),R(s_ptr) + lea MEM_INDX1(res_ptr,s_size,l,4),R(res_ptr) +#else /* not mc68000 */ + movel R(s_size),R(d0) + asll #2,R(d0) + addl R(s_size),R(s_ptr) + addl R(s_size),R(res_ptr) +#endif + movel MEM_PREDEC(s_ptr),R(d2) + movel R(d2),R(d0) + lsrl R(d5),R(d0) /* compute carry limb */ + + lsll R(cnt),R(d2) + movel R(d2),R(d1) + subql #1,R(s_size) + beq L(Lend) + lsrl #1,R(s_size) + bcs L(L1) + subql #1,R(s_size) + +L(Loop:) + movel MEM_PREDEC(s_ptr),R(d2) + movel R(d2),R(d3) + lsrl R(d5),R(d3) + orl R(d3),R(d1) + movel R(d1),MEM_PREDEC(res_ptr) + lsll R(cnt),R(d2) +L(L1:) + movel MEM_PREDEC(s_ptr),R(d1) + movel R(d1),R(d3) + lsrl R(d5),R(d3) + orl R(d3),R(d2) + movel R(d2),MEM_PREDEC(res_ptr) + lsll R(cnt),R(d1) + + dbf R(s_size),L(Loop) + subl #0x10000,R(s_size) + bcc L(Loop) + +L(Lend:) + movel R(d1),MEM_PREDEC(res_ptr) /* store least significant limb */ + +/* Restore used registers from stack frame. */ + moveml MEM_POSTINC(sp),R(d2)-R(d6)/R(a2) + rts + +/* We loop from least significant end of the arrays, which is only + permissable if the source and destination don't overlap, since the + function is documented to work for overlapping source and destination. */ + +L(Lspecial:) + clrl R(d0) /* initialize carry */ + eorw #1,R(s_size) + lsrl #1,R(s_size) + bcc L(LL1) + subql #1,R(s_size) + +L(LLoop:) + movel MEM_POSTINC(s_ptr),R(d2) + addxl R(d2),R(d2) + movel R(d2),MEM_POSTINC(res_ptr) +L(LL1:) + movel MEM_POSTINC(s_ptr),R(d2) + addxl R(d2),R(d2) + movel R(d2),MEM_POSTINC(res_ptr) + + dbf R(s_size),L(LLoop) + addxl R(d0),R(d0) /* save cy in lsb */ + subl #0x10000,R(s_size) + bcs L(LLend) + lsrl #1,R(d0) /* restore cy */ + bra L(LLoop) + +L(LLend:) +/* Restore used registers from stack frame. */ + moveml MEM_POSTINC(sp),R(d2)-R(d6)/R(a2) + rts +EPILOG(__mpn_lshift) diff --git a/sysdeps/m68k/m68020/addmul_1.S b/sysdeps/m68k/m68020/addmul_1.S index 3f244c40b4..169f1135be 100644 --- a/sysdeps/m68k/m68020/addmul_1.S +++ b/sysdeps/m68k/m68020/addmul_1.S @@ -1,7 +1,7 @@ /* mc68020 __mpn_addmul_1 -- Multiply a limb vector with a limb and add the result to a second limb vector. -Copyright (C) 1992, 1994 Free Software Foundation, Inc. +Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -23,58 +23,61 @@ the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ INPUT PARAMETERS res_ptr (sp + 4) s1_ptr (sp + 8) - size (sp + 12) + s1_size (sp + 12) s2_limb (sp + 16) */ +#include "sysdep.h" #include "asm-syntax.h" TEXT ALIGN - GLOBL ___mpn_addmul_1 + GLOBL C_SYMBOL_NAME(__mpn_addmul_1) -LAB(___mpn_addmul_1) +C_SYMBOL_NAME(__mpn_addmul_1:) +PROLOG(__mpn_addmul_1) #define res_ptr a0 #define s1_ptr a1 -#define size d2 +#define s1_size d2 #define s2_limb d4 /* Save used registers on the stack. */ - INSN2(movem,l ,MEM_PREDEC(sp),d2-d5) + moveml R(d2)-R(d5),MEM_PREDEC(sp) /* Copy the arguments to registers. Better use movem? */ - INSN2(move,l ,res_ptr,MEM_DISP(sp,20)) - INSN2(move,l ,s1_ptr,MEM_DISP(sp,24)) - INSN2(move,l ,size,MEM_DISP(sp,28)) - INSN2(move,l ,s2_limb,MEM_DISP(sp,32)) - - INSN2(eor,w ,size,#1) - INSN1(clr,l ,d1) - INSN1(clr,l ,d5) - INSN2(lsr,l ,size,#1) - bcc L1 - INSN2(subq,l ,size,#1) - INSN2(sub,l ,d0,d0) /* (d0,cy) <= (0,0) */ - -LAB(Loop) - INSN2(move,l ,d3,MEM_POSTINC(s1_ptr)) - INSN2(mulu,l ,d1:d3,s2_limb) - INSN2(addx,l ,d3,d0) - INSN2(addx,l ,d1,d5) - INSN2(add,l ,MEM_POSTINC(res_ptr),d3) -LAB(L1) INSN2(move,l ,d3,MEM_POSTINC(s1_ptr)) - INSN2(mulu,l ,d0:d3,s2_limb) - INSN2(addx,l ,d3,d1) - INSN2(addx,l ,d0,d5) - INSN2(add,l ,MEM_POSTINC(res_ptr),d3) - - dbf size,Loop - INSN2(addx,l ,d0,d5) - INSN2(sub,l ,size,#0x10000) - bcc Loop + movel MEM_DISP(sp,20),R(res_ptr) + movel MEM_DISP(sp,24),R(s1_ptr) + movel MEM_DISP(sp,28),R(s1_size) + movel MEM_DISP(sp,32),R(s2_limb) + + eorw #1,R(s1_size) + clrl R(d1) + clrl R(d5) + lsrl #1,R(s1_size) + bcc L(L1) + subql #1,R(s1_size) + subl R(d0),R(d0) /* (d0,cy) <= (0,0) */ + +L(Loop:) + movel MEM_POSTINC(s1_ptr),R(d3) + mulul R(s2_limb),R(d1):R(d3) + addxl R(d0),R(d3) + addxl R(d5),R(d1) + addl R(d3),MEM_POSTINC(res_ptr) +L(L1:) movel MEM_POSTINC(s1_ptr),R(d3) + mulul R(s2_limb),R(d0):R(d3) + addxl R(d1),R(d3) + addxl R(d5),R(d0) + addl R(d3),MEM_POSTINC(res_ptr) + + dbf R(s1_size),L(Loop) + addxl R(d5),R(d0) + subl #0x10000,R(s1_size) + bcc L(Loop) /* Restore used registers from stack frame. */ - INSN2(movem,l ,d2-d5,MEM_POSTINC(sp)) + moveml MEM_POSTINC(sp),R(d2)-R(d5) rts +EPILOG(__mpn_addmul_1) diff --git a/sysdeps/m68k/m68020/mul_1.S b/sysdeps/m68k/m68020/mul_1.S index 548ca0091b..4db1ccac25 100644 --- a/sysdeps/m68k/m68020/mul_1.S +++ b/sysdeps/m68k/m68020/mul_1.S @@ -1,7 +1,7 @@ /* mc68020 __mpn_mul_1 -- Multiply a limb vector with a limb and store the result in a second limb vector. -Copyright (C) 1992, 1994 Free Software Foundation, Inc. +Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -23,65 +23,68 @@ the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ INPUT PARAMETERS res_ptr (sp + 4) s1_ptr (sp + 8) - size (sp + 12) + s1_size (sp + 12) s2_limb (sp + 16) */ +#include "sysdep.h" #include "asm-syntax.h" TEXT ALIGN - GLOBL ___mpn_mul_1 + GLOBL C_SYMBOL_NAME(__mpn_mul_1) -LAB(___mpn_mul_1) +C_SYMBOL_NAME(__mpn_mul_1:) +PROLOG(__mpn_mul_1) #define res_ptr a0 #define s1_ptr a1 -#define size d2 +#define s1_size d2 #define s2_limb d4 /* Save used registers on the stack. */ - INSN2(movem,l ,MEM_PREDEC(sp),d2-d4) + moveml R(d2)-R(d4),MEM_PREDEC(sp) #if 0 - INSN2(move,l ,MEM_PREDEC(sp),d2) - INSN2(move,l ,MEM_PREDEC(sp),d3) - INSN2(move,l ,MEM_PREDEC(sp),d4) + movel R(d2),MEM_PREDEC(sp) + movel R(d3),MEM_PREDEC(sp) + movel R(d4),MEM_PREDEC(sp) #endif /* Copy the arguments to registers. Better use movem? */ - INSN2(move,l ,res_ptr,MEM_DISP(sp,16)) - INSN2(move,l ,s1_ptr,MEM_DISP(sp,20)) - INSN2(move,l ,size,MEM_DISP(sp,24)) - INSN2(move,l ,s2_limb,MEM_DISP(sp,28)) - - INSN2(eor,w ,size,#1) - INSN1(clr,l ,d1) - INSN2(lsr,l ,size,#1) - bcc L1 - INSN2(subq,l ,size,#1) - INSN2(sub,l ,d0,d0) /* (d0,cy) <= (0,0) */ - -LAB(Loop) - INSN2(move,l ,d3,MEM_POSTINC(s1_ptr)) - INSN2(mulu,l ,d1:d3,s2_limb) - INSN2(addx,l ,d3,d0) - INSN2(move,l ,MEM_POSTINC(res_ptr),d3) -LAB(L1) INSN2(move,l ,d3,MEM_POSTINC(s1_ptr)) - INSN2(mulu,l ,d0:d3,s2_limb) - INSN2(addx,l ,d3,d1) - INSN2(move,l ,MEM_POSTINC(res_ptr),d3) - - dbf size,Loop - INSN1(clr,l ,d3) - INSN2(addx,l ,d0,d3) - INSN2(sub,l ,size,#0x10000) - bcc Loop + movel MEM_DISP(sp,16),R(res_ptr) + movel MEM_DISP(sp,20),R(s1_ptr) + movel MEM_DISP(sp,24),R(s1_size) + movel MEM_DISP(sp,28),R(s2_limb) + + eorw #1,R(s1_size) + clrl R(d1) + lsrl #1,R(s1_size) + bcc L(L1) + subql #1,R(s1_size) + subl R(d0),R(d0) /* (d0,cy) <= (0,0) */ + +L(Loop:) + movel MEM_POSTINC(s1_ptr),R(d3) + mulul R(s2_limb),R(d1):R(d3) + addxl R(d0),R(d3) + movel R(d3),MEM_POSTINC(res_ptr) +L(L1:) movel MEM_POSTINC(s1_ptr),R(d3) + mulul R(s2_limb),R(d0):R(d3) + addxl R(d1),R(d3) + movel R(d3),MEM_POSTINC(res_ptr) + + dbf R(s1_size),L(Loop) + clrl R(d3) + addxl R(d3),R(d0) + subl #0x10000,R(s1_size) + bcc L(Loop) /* Restore used registers from stack frame. */ - INSN2(movem,l ,d2-d4,MEM_POSTINC(sp)) + moveml MEM_POSTINC(sp),R(d2)-R(d4) #if 0 - INSN2(move,l ,d4,MEM_POSTINC(sp)) - INSN2(move,l ,d3,MEM_POSTINC(sp)) - INSN2(move,l ,d2,MEM_POSTINC(sp)) + movel MEM_POSTINC(sp),R(d4) + movel MEM_POSTINC(sp),R(d3) + movel MEM_POSTINC(sp),R(d2) #endif rts +EPILOG(__mpn_mul_1) diff --git a/sysdeps/m68k/m68020/submul_1.S b/sysdeps/m68k/m68020/submul_1.S index ef7f39de7a..cf30029b2f 100644 --- a/sysdeps/m68k/m68020/submul_1.S +++ b/sysdeps/m68k/m68020/submul_1.S @@ -1,7 +1,7 @@ /* mc68020 __mpn_submul_1 -- Multiply a limb vector with a limb and subtract the result from a second limb vector. -Copyright (C) 1992, 1994 Free Software Foundation, Inc. +Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -23,58 +23,61 @@ the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ INPUT PARAMETERS res_ptr (sp + 4) s1_ptr (sp + 8) - size (sp + 12) + s1_size (sp + 12) s2_limb (sp + 16) */ +#include "sysdep.h" #include "asm-syntax.h" TEXT ALIGN - GLOBL ___mpn_submul_1 + GLOBL C_SYMBOL_NAME(__mpn_submul_1) -LAB(___mpn_submul_1) +C_SYMBOL_NAME(__mpn_submul_1:) +PROLOG(__mpn_submul_1) #define res_ptr a0 #define s1_ptr a1 -#define size d2 +#define s1_size d2 #define s2_limb d4 /* Save used registers on the stack. */ - INSN2(movem,l ,MEM_PREDEC(sp),d2-d5) + moveml R(d2)-R(d5),MEM_PREDEC(sp) /* Copy the arguments to registers. Better use movem? */ - INSN2(move,l ,res_ptr,MEM_DISP(sp,20)) - INSN2(move,l ,s1_ptr,MEM_DISP(sp,24)) - INSN2(move,l ,size,MEM_DISP(sp,28)) - INSN2(move,l ,s2_limb,MEM_DISP(sp,32)) - - INSN2(eor,w ,size,#1) - INSN1(clr,l ,d1) - INSN1(clr,l ,d5) - INSN2(lsr,l ,size,#1) - bcc L1 - INSN2(subq,l ,size,#1) - INSN2(sub,l ,d0,d0) /* (d0,cy) <= (0,0) */ - -LAB(Loop) - INSN2(move,l ,d3,MEM_POSTINC(s1_ptr)) - INSN2(mulu,l ,d1:d3,s2_limb) - INSN2(addx,l ,d3,d0) - INSN2(addx,l ,d1,d5) - INSN2(sub,l ,MEM_POSTINC(res_ptr),d3) -LAB(L1) INSN2(move,l ,d3,MEM_POSTINC(s1_ptr)) - INSN2(mulu,l ,d0:d3,s2_limb) - INSN2(addx,l ,d3,d1) - INSN2(addx,l ,d0,d5) - INSN2(sub,l ,MEM_POSTINC(res_ptr),d3) - - dbf size,Loop - INSN2(addx,l ,d0,d5) - INSN2(sub,l ,size,#0x10000) - bcc Loop + movel MEM_DISP(sp,20),R(res_ptr) + movel MEM_DISP(sp,24),R(s1_ptr) + movel MEM_DISP(sp,28),R(s1_size) + movel MEM_DISP(sp,32),R(s2_limb) + + eorw #1,R(s1_size) + clrl R(d1) + clrl R(d5) + lsrl #1,R(s1_size) + bcc L(L1) + subql #1,R(s1_size) + subl R(d0),R(d0) /* (d0,cy) <= (0,0) */ + +L(Loop:) + movel MEM_POSTINC(s1_ptr),R(d3) + mulul R(s2_limb),R(d1):R(d3) + addxl R(d0),R(d3) + addxl R(d5),R(d1) + subl R(d3),MEM_POSTINC(res_ptr) +L(L1:) movel MEM_POSTINC(s1_ptr),R(d3) + mulul R(s2_limb),R(d0):R(d3) + addxl R(d1),R(d3) + addxl R(d5),R(d0) + subl R(d3),MEM_POSTINC(res_ptr) + + dbf R(s1_size),L(Loop) + addxl R(d5),R(d0) + subl #0x10000,R(s1_size) + bcc L(Loop) /* Restore used registers from stack frame. */ - INSN2(movem,l ,d2-d5,MEM_POSTINC(sp)) + moveml MEM_POSTINC(sp),R(d2)-R(d5) rts +EPILOG(__mpn_submul_1) diff --git a/sysdeps/m68k/rshift.S b/sysdeps/m68k/rshift.S new file mode 100644 index 0000000000..494dfcbeab --- /dev/null +++ b/sysdeps/m68k/rshift.S @@ -0,0 +1,149 @@ +/* mc68020 __mpn_rshift -- Shift right a low-level natural-number integer. + +Copyright (C) 1996 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Library General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at your +option) any later version. + +The GNU MP 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 Library General Public +License for more details. + +You should have received a copy of the GNU Library General Public License +along with the GNU MP Library; see the file COPYING.LIB. If not, write to +the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +/* + INPUT PARAMETERS + res_ptr (sp + 4) + s_ptr (sp + 8) + s_size (sp + 16) + cnt (sp + 12) +*/ + +#include "sysdep.h" +#include "asm-syntax.h" + +#define res_ptr a1 +#define s_ptr a0 +#define s_size d6 +#define cnt d4 + + TEXT + ALIGN + GLOBL C_SYMBOL_NAME(__mpn_rshift) + +C_SYMBOL_NAME(__mpn_rshift:) +PROLOG(__mpn_rshift) +/* Save used registers on the stack. */ + moveml R(d2)-R(d6)/R(a2),MEM_PREDEC(sp) + +/* Copy the arguments to registers. */ + movel MEM_DISP(sp,28),R(res_ptr) + movel MEM_DISP(sp,32),R(s_ptr) + movel MEM_DISP(sp,36),R(s_size) + movel MEM_DISP(sp,40),R(cnt) + + moveql #1,R(d5) + cmpl R(d5),R(cnt) + bne L(Lnormal) + cmpl R(res_ptr),R(s_ptr) + bls L(Lspecial) /* jump if res_ptr >= s_ptr */ +#if (defined (__mc68020__) || defined (__NeXT__) || defined(mc68020)) + lea MEM_INDX1(res_ptr,s_size,l,4),R(a2) +#else /* not mc68020 */ + movel R(s_size),R(d0) + asll #2,R(d0) + lea MEM_INDX(res_ptr,d0,l),R(a2) +#endif + cmpl R(s_ptr),R(a2) + bls L(Lspecial) /* jump if s_ptr >= res_ptr + s_size */ + +L(Lnormal:) + moveql #32,R(d5) + subl R(cnt),R(d5) + movel MEM_POSTINC(s_ptr),R(d2) + movel R(d2),R(d0) + lsll R(d5),R(d0) /* compute carry limb */ + + lsrl R(cnt),R(d2) + movel R(d2),R(d1) + subql #1,R(s_size) + beq L(Lend) + lsrl #1,R(s_size) + bcs L(L1) + subql #1,R(s_size) + +L(Loop:) + movel MEM_POSTINC(s_ptr),R(d2) + movel R(d2),R(d3) + lsll R(d5),R(d3) + orl R(d3),R(d1) + movel R(d1),MEM_POSTINC(res_ptr) + lsrl R(cnt),R(d2) +L(L1:) + movel MEM_POSTINC(s_ptr),R(d1) + movel R(d1),R(d3) + lsll R(d5),R(d3) + orl R(d3),R(d2) + movel R(d2),MEM_POSTINC(res_ptr) + lsrl R(cnt),R(d1) + + dbf R(s_size),L(Loop) + subl #0x10000,R(s_size) + bcc L(Loop) + +L(Lend:) + movel R(d1),MEM(res_ptr) /* store most significant limb */ + +/* Restore used registers from stack frame. */ + moveml MEM_POSTINC(sp),R(d2)-R(d6)/R(a2) + rts + +/* We loop from most significant end of the arrays, which is only + permissable if the source and destination don't overlap, since the + function is documented to work for overlapping source and destination. */ + +L(Lspecial:) +#if (defined (__mc68020__) || defined (__NeXT__) || defined(mc68020)) + lea MEM_INDX1(s_ptr,s_size,l,4),R(s_ptr) + lea MEM_INDX1(res_ptr,s_size,l,4),R(res_ptr) +#else /* not mc68000 */ + movel R(s_size),R(d0) + asll #2,R(d0) + addl R(s_size),R(s_ptr) + addl R(s_size),R(res_ptr) +#endif + + clrl R(d0) /* initialize carry */ + eorw #1,R(s_size) + lsrl #1,R(s_size) + bcc L(LL1) + subql #1,R(s_size) + +L(LLoop:) + movel MEM_PREDEC(s_ptr),R(d2) + roxrl #1,R(d2) + movel R(d2),MEM_PREDEC(res_ptr) +L(LL1:) + movel MEM_PREDEC(s_ptr),R(d2) + roxrl #1,R(d2) + movel R(d2),MEM_PREDEC(res_ptr) + + dbf R(s_size),L(LLoop) + roxrl #1,R(d0) /* save cy in msb */ + subl #0x10000,R(s_size) + bcs L(LLend) + addl R(d0),R(d0) /* restore cy */ + bra L(LLoop) + +L(LLend:) +/* Restore used registers from stack frame. */ + moveml MEM_POSTINC(sp),R(d2)-R(d6)/R(a2) + rts +EPILOG(__mpn_rshift) diff --git a/sysdeps/m68k/sub_n.S b/sysdeps/m68k/sub_n.S index 19f0ec1568..39f5161176 100644 --- a/sysdeps/m68k/sub_n.S +++ b/sysdeps/m68k/sub_n.S @@ -1,7 +1,7 @@ /* mc68020 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and store difference in a third limb vector. -Copyright (C) 1992, 1994 Free Software Foundation, Inc. +Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -27,50 +27,53 @@ the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ size (sp + 12) */ +#include "sysdep.h" #include "asm-syntax.h" TEXT ALIGN - GLOBL ___mpn_sub_n + GLOBL C_SYMBOL_NAME(__mpn_sub_n) -LAB(___mpn_sub_n) +C_SYMBOL_NAME(__mpn_sub_n:) +PROLOG(__mpn_sub_n) /* Save used registers on the stack. */ - INSN2(move,l ,MEM_PREDEC(sp),d2) - INSN2(move,l ,MEM_PREDEC(sp),a2) + movel R(d2),MEM_PREDEC(sp) + movel R(a2),MEM_PREDEC(sp) /* Copy the arguments to registers. Better use movem? */ - INSN2(move,l ,a2,MEM_DISP(sp,12)) - INSN2(move,l ,a0,MEM_DISP(sp,16)) - INSN2(move,l ,a1,MEM_DISP(sp,20)) - INSN2(move,l ,d2,MEM_DISP(sp,24)) - - INSN2(eor,w ,d2,#1) - INSN2(lsr,l ,d2,#1) - bcc L1 - INSN2(subq,l ,d2,#1) /* clears cy as side effect */ - -LAB(Loop) - INSN2(move,l ,d0,MEM_POSTINC(a0)) - INSN2(move,l ,d1,MEM_POSTINC(a1)) - INSN2(subx,l ,d0,d1) - INSN2(move,l ,MEM_POSTINC(a2),d0) -LAB(L1) INSN2(move,l ,d0,MEM_POSTINC(a0)) - INSN2(move,l ,d1,MEM_POSTINC(a1)) - INSN2(subx,l ,d0,d1) - INSN2(move,l ,MEM_POSTINC(a2),d0) - - dbf d2,Loop /* loop until 16 lsb of %4 == -1 */ - INSN2(subx,l ,d0,d0) /* d0 <= -cy; save cy as 0 or -1 in d0 */ - INSN2(sub,l ,d2,#0x10000) - bcs L2 - INSN2(add,l ,d0,d0) /* restore cy */ - bra Loop - -LAB(L2) - INSN1(neg,l ,d0) + movel MEM_DISP(sp,12),R(a2) + movel MEM_DISP(sp,16),R(a0) + movel MEM_DISP(sp,20),R(a1) + movel MEM_DISP(sp,24),R(d2) + + eorw #1,R(d2) + lsrl #1,R(d2) + bcc L(L1) + subql #1,R(d2) /* clears cy as side effect */ + +L(Loop:) + movel MEM_POSTINC(a0),R(d0) + movel MEM_POSTINC(a1),R(d1) + subxl R(d1),R(d0) + movel R(d0),MEM_POSTINC(a2) +L(L1:) movel MEM_POSTINC(a0),R(d0) + movel MEM_POSTINC(a1),R(d1) + subxl R(d1),R(d0) + movel R(d0),MEM_POSTINC(a2) + + dbf R(d2),L(Loop) /* loop until 16 lsb of %4 == -1 */ + subxl R(d0),R(d0) /* d0 <= -cy; save cy as 0 or -1 in d0 */ + subl #0x10000,R(d2) + bcs L(L2) + addl R(d0),R(d0) /* restore cy */ + bra L(Loop) + +L(L2:) + negl R(d0) /* Restore used registers from stack frame. */ - INSN2(move,l ,a2,MEM_POSTINC(sp)) - INSN2(move,l ,d2,MEM_POSTINC(sp)) + movel MEM_POSTINC(sp),R(a2) + movel MEM_POSTINC(sp),R(d2) rts +EPILOG(__mpn_sub_n) diff --git a/sysdeps/m88k/add_n.s b/sysdeps/m88k/add_n.s index 7e4ccccb90..d56447904e 100644 --- a/sysdeps/m88k/add_n.s +++ b/sysdeps/m88k/add_n.s @@ -1,7 +1,7 @@ ; mc88100 __mpn_add -- Add two limb vectors of the same length > 0 and store ; sum in a third limb vector. -; Copyright (C) 1992, 1994 Free Software Foundation, Inc. +; Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc. ; This file is part of the GNU MP Library. diff --git a/sysdeps/m88k/m88110/add_n.S b/sysdeps/m88k/m88110/add_n.S new file mode 100644 index 0000000000..ab20630a5e --- /dev/null +++ b/sysdeps/m88k/m88110/add_n.S @@ -0,0 +1,199 @@ +; mc88110 __mpn_add_n -- Add two limb vectors of the same length > 0 and store +; sum in a third limb vector. + +; Copyright (C) 1995, 1996 Free Software Foundation, Inc. + +; This file is part of the GNU MP Library. + +; The GNU MP Library is free software; you can redistribute it and/or modify +; it under the terms of the GNU Library General Public License as published by +; the Free Software Foundation; either version 2 of the License, or (at your +; option) any later version. + +; The GNU MP 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 Library General Public +; License for more details. + +; You should have received a copy of the GNU Library General Public License +; along with the GNU MP Library; see the file COPYING.LIB. If not, write to +; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + +; INPUT PARAMETERS +#define res_ptr r2 +#define s1_ptr r3 +#define s2_ptr r4 +#define size r5 + +#include "sysdep.h" + + text + align 16 + global C_SYMBOL_NAME(__mpn_add_n) +C_SYMBOL_NAME(__mpn_add_n): + addu.co r0,r0,r0 ; clear cy flag + xor r12,s2_ptr,res_ptr + bb1 2,r12,L1 +; ** V1a ** +L0: bb0 2,res_ptr,L_v1 ; branch if res_ptr is aligned? +/* Add least significant limb separately to align res_ptr and s2_ptr */ + ld r10,s1_ptr,0 + addu s1_ptr,s1_ptr,4 + ld r8,s2_ptr,0 + addu s2_ptr,s2_ptr,4 + subu size,size,1 + addu.co r6,r10,r8 + st r6,res_ptr,0 + addu res_ptr,res_ptr,4 +L_v1: cmp r12,size,2 + bb1 lt,r12,Lend2 + + ld r10,s1_ptr,0 + ld r12,s1_ptr,4 + ld.d r8,s2_ptr,0 + subu size,size,10 + bcnd lt0,size,Lfin1 +/* Add blocks of 8 limbs until less than 8 limbs remain */ + align 8 +Loop1: subu size,size,8 + addu.cio r6,r10,r8 + ld r10,s1_ptr,8 + addu.cio r7,r12,r9 + ld r12,s1_ptr,12 + ld.d r8,s2_ptr,8 + st.d r6,res_ptr,0 + addu.cio r6,r10,r8 + ld r10,s1_ptr,16 + addu.cio r7,r12,r9 + ld r12,s1_ptr,20 + ld.d r8,s2_ptr,16 + st.d r6,res_ptr,8 + addu.cio r6,r10,r8 + ld r10,s1_ptr,24 + addu.cio r7,r12,r9 + ld r12,s1_ptr,28 + ld.d r8,s2_ptr,24 + st.d r6,res_ptr,16 + addu.cio r6,r10,r8 + ld r10,s1_ptr,32 + addu.cio r7,r12,r9 + ld r12,s1_ptr,36 + addu s1_ptr,s1_ptr,32 + ld.d r8,s2_ptr,32 + addu s2_ptr,s2_ptr,32 + st.d r6,res_ptr,24 + addu res_ptr,res_ptr,32 + bcnd ge0,size,Loop1 + +Lfin1: addu size,size,8-2 + bcnd lt0,size,Lend1 +/* Add blocks of 2 limbs until less than 2 limbs remain */ +Loope1: addu.cio r6,r10,r8 + ld r10,s1_ptr,8 + addu.cio r7,r12,r9 + ld r12,s1_ptr,12 + ld.d r8,s2_ptr,8 + st.d r6,res_ptr,0 + subu size,size,2 + addu s1_ptr,s1_ptr,8 + addu s2_ptr,s2_ptr,8 + addu res_ptr,res_ptr,8 + bcnd ge0,size,Loope1 +Lend1: addu.cio r6,r10,r8 + addu.cio r7,r12,r9 + st.d r6,res_ptr,0 + + bb0 0,size,Lret1 +/* Add last limb */ + ld r10,s1_ptr,8 + ld r8,s2_ptr,8 + addu.cio r6,r10,r8 + st r6,res_ptr,8 + +Lret1: jmp.n r1 + addu.ci r2,r0,r0 ; return carry-out from most sign. limb + +L1: xor r12,s1_ptr,res_ptr + bb1 2,r12,L2 +; ** V1b ** + or r12,r0,s2_ptr + or s2_ptr,r0,s1_ptr + or s1_ptr,r0,r12 + br L0 + +; ** V2 ** +/* If we come here, the alignment of s1_ptr and res_ptr as well as the + alignment of s2_ptr and res_ptr differ. Since there are only two ways + things can be aligned (that we care about) we now know that the alignment + of s1_ptr and s2_ptr are the same. */ + +L2: cmp r12,size,1 + bb1 eq,r12,Ljone + bb0 2,s1_ptr,L_v2 ; branch if s1_ptr is aligned +/* Add least significant limb separately to align res_ptr and s2_ptr */ + ld r10,s1_ptr,0 + addu s1_ptr,s1_ptr,4 + ld r8,s2_ptr,0 + addu s2_ptr,s2_ptr,4 + subu size,size,1 + addu.co r6,r10,r8 + st r6,res_ptr,0 + addu res_ptr,res_ptr,4 + +L_v2: subu size,size,8 + bcnd lt0,size,Lfin2 +/* Add blocks of 8 limbs until less than 8 limbs remain */ + align 8 +Loop2: subu size,size,8 + ld.d r8,s1_ptr,0 + ld.d r6,s2_ptr,0 + addu.cio r8,r8,r6 + st r8,res_ptr,0 + addu.cio r9,r9,r7 + st r9,res_ptr,4 + ld.d r8,s1_ptr,8 + ld.d r6,s2_ptr,8 + addu.cio r8,r8,r6 + st r8,res_ptr,8 + addu.cio r9,r9,r7 + st r9,res_ptr,12 + ld.d r8,s1_ptr,16 + ld.d r6,s2_ptr,16 + addu.cio r8,r8,r6 + st r8,res_ptr,16 + addu.cio r9,r9,r7 + st r9,res_ptr,20 + ld.d r8,s1_ptr,24 + ld.d r6,s2_ptr,24 + addu.cio r8,r8,r6 + st r8,res_ptr,24 + addu.cio r9,r9,r7 + st r9,res_ptr,28 + addu s1_ptr,s1_ptr,32 + addu s2_ptr,s2_ptr,32 + addu res_ptr,res_ptr,32 + bcnd ge0,size,Loop2 + +Lfin2: addu size,size,8-2 + bcnd lt0,size,Lend2 +Loope2: ld.d r8,s1_ptr,0 + ld.d r6,s2_ptr,0 + addu.cio r8,r8,r6 + st r8,res_ptr,0 + addu.cio r9,r9,r7 + st r9,res_ptr,4 + subu size,size,2 + addu s1_ptr,s1_ptr,8 + addu s2_ptr,s2_ptr,8 + addu res_ptr,res_ptr,8 + bcnd ge0,size,Loope2 +Lend2: bb0 0,size,Lret2 +/* Add last limb */ +Ljone: ld r10,s1_ptr,0 + ld r8,s2_ptr,0 + addu.cio r6,r10,r8 + st r6,res_ptr,0 + +Lret2: jmp.n r1 + addu.ci r2,r0,r0 ; return carry-out from most sign. limb diff --git a/sysdeps/m88k/m88110/addmul_1.s b/sysdeps/m88k/m88110/addmul_1.s new file mode 100644 index 0000000000..1a4dfa11ea --- /dev/null +++ b/sysdeps/m88k/m88110/addmul_1.s @@ -0,0 +1,60 @@ +; mc88110 __mpn_addmul_1 -- Multiply a limb vector with a single limb and +; store the product in a second limb vector. + +; Copyright (C) 1996 Free Software Foundation, Inc. + +; This file is part of the GNU MP Library. + +; The GNU MP Library is free software; you can redistribute it and/or modify +; it under the terms of the GNU Library General Public License as published by +; the Free Software Foundation; either version 2 of the License, or (at your +; option) any later version. + +; The GNU MP 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 Library General Public +; License for more details. + +; You should have received a copy of the GNU Library General Public License +; along with the GNU MP Library; see the file COPYING.LIB. If not, write to +; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + +; INPUT PARAMETERS +; res_ptr r2 +; s1_ptr r3 +; size r4 +; s2_limb r5 + + text + align 16 + global ___mpn_addmul_1 +___mpn_addmul_1: + lda r3,r3[r4] + lda r8,r2[r4] ; RES_PTR in r8 since r2 is retval + subu r4,r0,r4 + addu.co r2,r0,r0 ; r2 = cy = 0 + + ld r6,r3[r4] + addu r4,r4,1 + subu r8,r8,4 + bcnd.n eq0,r4,Lend + mulu.d r10,r6,r5 + +Loop: ld r7,r8[r4] + ld r6,r3[r4] + addu.cio r9,r11,r2 + addu.ci r2,r10,r0 + addu.co r9,r9,r7 + st r9,r8[r4] + addu r4,r4,1 + mulu.d r10,r6,r5 + bcnd ne0,r4,Loop + +Lend: ld r7,r8,0 + addu.cio r9,r11,r2 + addu.ci r2,r10,r0 + addu.co r9,r9,r7 + st r9,r8,0 + jmp.n r1 + addu.ci r2,r2,r0 diff --git a/sysdeps/m88k/m88110/mul_1.s b/sysdeps/m88k/m88110/mul_1.s index 08c3ca07ee..b1352cea87 100644 --- a/sysdeps/m88k/m88110/mul_1.s +++ b/sysdeps/m88k/m88110/mul_1.s @@ -1,7 +1,7 @@ ; mc88110 __mpn_mul_1 -- Multiply a limb vector with a single limb and ; store the product in a second limb vector. -; Copyright (C) 1992, 1994 Free Software Foundation, Inc. +; Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc. ; This file is part of the GNU MP Library. @@ -56,29 +56,3 @@ Lend: addu.cio r9,r11,r2 st r9,r8,4 jmp.n r1 addu.ci r2,r10,r0 - -; This is the Right Way to do this on '110. 4 cycles / 64-bit limb. -; ld.d r10, -; mulu.d -; addu.cio -; addu.cio -; st.d -; mulu.d ,r11,r5 -; ld.d r12, -; mulu.d ,r10,r5 -; addu.cio -; addu.cio -; st.d -; mulu.d -; ld.d r10, -; mulu.d -; addu.cio -; addu.cio -; st.d -; mulu.d -; ld.d r10, -; mulu.d -; addu.cio -; addu.cio -; st.d -; mulu.d diff --git a/sysdeps/m88k/m88110/sub_n.S b/sysdeps/m88k/m88110/sub_n.S new file mode 100644 index 0000000000..74ee0ae605 --- /dev/null +++ b/sysdeps/m88k/m88110/sub_n.S @@ -0,0 +1,275 @@ +; mc88110 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and +; store difference in a third limb vector. + +; Copyright (C) 1995, 1996 Free Software Foundation, Inc. + +; This file is part of the GNU MP Library. + +; The GNU MP Library is free software; you can redistribute it and/or modify +; it under the terms of the GNU Library General Public License as published by +; the Free Software Foundation; either version 2 of the License, or (at your +; option) any later version. + +; The GNU MP 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 Library General Public +; License for more details. + +; You should have received a copy of the GNU Library General Public License +; along with the GNU MP Library; see the file COPYING.LIB. If not, write to +; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + +; INPUT PARAMETERS +#define res_ptr r2 +#define s1_ptr r3 +#define s2_ptr r4 +#define size r5 + +#include "sysdep.h" + + text + align 16 + global C_SYMBOL_NAME(__mpn_sub_n) +C_SYMBOL_NAME(__mpn_sub_n): + subu.co r0,r0,r0 ; set cy flag + xor r12,s2_ptr,res_ptr + bb1 2,r12,L1 +; ** V1a ** +L0: bb0 2,res_ptr,L_v1 ; branch if res_ptr is aligned +/* Add least significant limb separately to align res_ptr and s2_ptr */ + ld r10,s1_ptr,0 + addu s1_ptr,s1_ptr,4 + ld r8,s2_ptr,0 + addu s2_ptr,s2_ptr,4 + subu size,size,1 + subu.co r6,r10,r8 + st r6,res_ptr,0 + addu res_ptr,res_ptr,4 +L_v1: cmp r12,size,2 + bb1 lt,r12,Lend2 + + ld r10,s1_ptr,0 + ld r12,s1_ptr,4 + ld.d r8,s2_ptr,0 + subu size,size,10 + bcnd lt0,size,Lfin1 +/* Add blocks of 8 limbs until less than 8 limbs remain */ + align 8 +Loop1: subu size,size,8 + subu.cio r6,r10,r8 + ld r10,s1_ptr,8 + subu.cio r7,r12,r9 + ld r12,s1_ptr,12 + ld.d r8,s2_ptr,8 + st.d r6,res_ptr,0 + subu.cio r6,r10,r8 + ld r10,s1_ptr,16 + subu.cio r7,r12,r9 + ld r12,s1_ptr,20 + ld.d r8,s2_ptr,16 + st.d r6,res_ptr,8 + subu.cio r6,r10,r8 + ld r10,s1_ptr,24 + subu.cio r7,r12,r9 + ld r12,s1_ptr,28 + ld.d r8,s2_ptr,24 + st.d r6,res_ptr,16 + subu.cio r6,r10,r8 + ld r10,s1_ptr,32 + subu.cio r7,r12,r9 + ld r12,s1_ptr,36 + addu s1_ptr,s1_ptr,32 + ld.d r8,s2_ptr,32 + addu s2_ptr,s2_ptr,32 + st.d r6,res_ptr,24 + addu res_ptr,res_ptr,32 + bcnd ge0,size,Loop1 + +Lfin1: addu size,size,8-2 + bcnd lt0,size,Lend1 +/* Add blocks of 2 limbs until less than 2 limbs remain */ +Loope1: subu.cio r6,r10,r8 + ld r10,s1_ptr,8 + subu.cio r7,r12,r9 + ld r12,s1_ptr,12 + ld.d r8,s2_ptr,8 + st.d r6,res_ptr,0 + subu size,size,2 + addu s1_ptr,s1_ptr,8 + addu s2_ptr,s2_ptr,8 + addu res_ptr,res_ptr,8 + bcnd ge0,size,Loope1 +Lend1: subu.cio r6,r10,r8 + subu.cio r7,r12,r9 + st.d r6,res_ptr,0 + + bb0 0,size,Lret1 +/* Add last limb */ + ld r10,s1_ptr,8 + ld r8,s2_ptr,8 + subu.cio r6,r10,r8 + st r6,res_ptr,8 + +Lret1: addu.ci r2,r0,r0 ; return carry-out from most sign. limb + jmp.n r1 + xor r2,r2,1 + +L1: xor r12,s1_ptr,res_ptr + bb1 2,r12,L2 +; ** V1b ** + bb0 2,res_ptr,L_v1b ; branch if res_ptr is aligned +/* Add least significant limb separately to align res_ptr and s1_ptr */ + ld r10,s2_ptr,0 + addu s2_ptr,s2_ptr,4 + ld r8,s1_ptr,0 + addu s1_ptr,s1_ptr,4 + subu size,size,1 + subu.co r6,r8,r10 + st r6,res_ptr,0 + addu res_ptr,res_ptr,4 +L_v1b: cmp r12,size,2 + bb1 lt,r12,Lend2 + + ld r10,s2_ptr,0 + ld r12,s2_ptr,4 + ld.d r8,s1_ptr,0 + subu size,size,10 + bcnd lt0,size,Lfin1b +/* Add blocks of 8 limbs until less than 8 limbs remain */ + align 8 +Loop1b: subu size,size,8 + subu.cio r6,r8,r10 + ld r10,s2_ptr,8 + subu.cio r7,r9,r12 + ld r12,s2_ptr,12 + ld.d r8,s1_ptr,8 + st.d r6,res_ptr,0 + subu.cio r6,r8,r10 + ld r10,s2_ptr,16 + subu.cio r7,r9,r12 + ld r12,s2_ptr,20 + ld.d r8,s1_ptr,16 + st.d r6,res_ptr,8 + subu.cio r6,r8,r10 + ld r10,s2_ptr,24 + subu.cio r7,r9,r12 + ld r12,s2_ptr,28 + ld.d r8,s1_ptr,24 + st.d r6,res_ptr,16 + subu.cio r6,r8,r10 + ld r10,s2_ptr,32 + subu.cio r7,r9,r12 + ld r12,s2_ptr,36 + addu s2_ptr,s2_ptr,32 + ld.d r8,s1_ptr,32 + addu s1_ptr,s1_ptr,32 + st.d r6,res_ptr,24 + addu res_ptr,res_ptr,32 + bcnd ge0,size,Loop1b + +Lfin1b: addu size,size,8-2 + bcnd lt0,size,Lend1b +/* Add blocks of 2 limbs until less than 2 limbs remain */ +Loope1b:subu.cio r6,r8,r10 + ld r10,s2_ptr,8 + subu.cio r7,r9,r12 + ld r12,s2_ptr,12 + ld.d r8,s1_ptr,8 + st.d r6,res_ptr,0 + subu size,size,2 + addu s1_ptr,s1_ptr,8 + addu s2_ptr,s2_ptr,8 + addu res_ptr,res_ptr,8 + bcnd ge0,size,Loope1b +Lend1b: subu.cio r6,r8,r10 + subu.cio r7,r9,r12 + st.d r6,res_ptr,0 + + bb0 0,size,Lret1b +/* Add last limb */ + ld r10,s2_ptr,8 + ld r8,s1_ptr,8 + subu.cio r6,r8,r10 + st r6,res_ptr,8 + +Lret1b: addu.ci r2,r0,r0 ; return carry-out from most sign. limb + jmp.n r1 + xor r2,r2,1 + +; ** V2 ** +/* If we come here, the alignment of s1_ptr and res_ptr as well as the + alignment of s2_ptr and res_ptr differ. Since there are only two ways + things can be aligned (that we care about) we now know that the alignment + of s1_ptr and s2_ptr are the same. */ + +L2: cmp r12,size,1 + bb1 eq,r12,Ljone + bb0 2,s1_ptr,L_v2 ; branch if s1_ptr is aligned +/* Add least significant limb separately to align res_ptr and s2_ptr */ + ld r10,s1_ptr,0 + addu s1_ptr,s1_ptr,4 + ld r8,s2_ptr,0 + addu s2_ptr,s2_ptr,4 + subu size,size,1 + subu.co r6,r10,r8 + st r6,res_ptr,0 + addu res_ptr,res_ptr,4 + +L_v2: subu size,size,8 + bcnd lt0,size,Lfin2 +/* Add blocks of 8 limbs until less than 8 limbs remain */ + align 8 +Loop2: subu size,size,8 + ld.d r8,s1_ptr,0 + ld.d r6,s2_ptr,0 + subu.cio r8,r8,r6 + st r8,res_ptr,0 + subu.cio r9,r9,r7 + st r9,res_ptr,4 + ld.d r8,s1_ptr,8 + ld.d r6,s2_ptr,8 + subu.cio r8,r8,r6 + st r8,res_ptr,8 + subu.cio r9,r9,r7 + st r9,res_ptr,12 + ld.d r8,s1_ptr,16 + ld.d r6,s2_ptr,16 + subu.cio r8,r8,r6 + st r8,res_ptr,16 + subu.cio r9,r9,r7 + st r9,res_ptr,20 + ld.d r8,s1_ptr,24 + ld.d r6,s2_ptr,24 + subu.cio r8,r8,r6 + st r8,res_ptr,24 + subu.cio r9,r9,r7 + st r9,res_ptr,28 + addu s1_ptr,s1_ptr,32 + addu s2_ptr,s2_ptr,32 + addu res_ptr,res_ptr,32 + bcnd ge0,size,Loop2 + +Lfin2: addu size,size,8-2 + bcnd lt0,size,Lend2 +Loope2: ld.d r8,s1_ptr,0 + ld.d r6,s2_ptr,0 + subu.cio r8,r8,r6 + st r8,res_ptr,0 + subu.cio r9,r9,r7 + st r9,res_ptr,4 + subu size,size,2 + addu s1_ptr,s1_ptr,8 + addu s2_ptr,s2_ptr,8 + addu res_ptr,res_ptr,8 + bcnd ge0,size,Loope2 +Lend2: bb0 0,size,Lret2 +/* Add last limb */ +Ljone: ld r10,s1_ptr,0 + ld r8,s2_ptr,0 + subu.cio r6,r10,r8 + st r6,res_ptr,0 + +Lret2: addu.ci r2,r0,r0 ; return carry-out from most sign. limb + jmp.n r1 + xor r2,r2,1 diff --git a/sysdeps/m88k/mul_1.s b/sysdeps/m88k/mul_1.s index 35c238d570..6b8492c4c6 100644 --- a/sysdeps/m88k/mul_1.s +++ b/sysdeps/m88k/mul_1.s @@ -1,7 +1,7 @@ ; mc88100 __mpn_mul_1 -- Multiply a limb vector with a single limb and ; store the product in a second limb vector. -; Copyright (C) 1992, 1994 Free Software Foundation, Inc. +; Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc. ; This file is part of the GNU MP Library. @@ -55,14 +55,14 @@ ___mpn_mul_1: ; Make S1_PTR and RES_PTR point at the end of their blocks ; and negate SIZE. lda r3,r3[r4] - lda r6,r2[r4] ; RES_PTR in r6 since r2 is retval + lda r6,r2[r4] ; RES_PTR in r6 since r2 is retval subu r4,r0,r4 - addu.co r2,r0,r0 ; r2 = cy = 0 + addu.co r2,r0,r0 ; r2 = cy = 0 ld r9,r3[r4] - mask r7,r5,0xffff ; r7 = lo(S2_LIMB) - extu r8,r5,16 ; r8 = hi(S2_LIMB) - bcnd.n eq0,r8,Lsmall ; jump if (hi(S2_LIMB) == 0) + mask r7,r5,0xffff ; r7 = lo(S2_LIMB) + extu r8,r5,16 ; r8 = hi(S2_LIMB) + bcnd.n eq0,r8,Lsmall ; jump if (hi(S2_LIMB) == 0) subu r6,r6,4 ; General code for any value of S2_LIMB. @@ -75,28 +75,27 @@ ___mpn_mul_1: br.n L1 addu r4,r4,1 -Loop: - ld r9,r3[r4] +Loop: ld r9,r3[r4] st r26,r6[r4] -; bcnd ne0,r0,0 ; bubble +; bcnd ne0,r0,0 ; bubble addu r4,r4,1 -L1: mul r26,r9,r5 ; low word of product mul_1 WB ld - mask r12,r9,0xffff ; r12 = lo(s1_limb) mask_1 - mul r11,r12,r7 ; r11 = prod_0 mul_2 WB mask_1 - mul r10,r12,r8 ; r10 = prod_1a mul_3 - extu r13,r9,16 ; r13 = hi(s1_limb) extu_1 WB mul_1 - mul r12,r13,r7 ; r12 = prod_1b mul_4 WB extu_1 - mul r25,r13,r8 ; r25 = prod_2 mul_5 WB mul_2 - extu r11,r11,16 ; r11 = hi(prod_0) extu_2 WB mul_3 - addu r10,r10,r11 ; addu_1 WB extu_2 -; bcnd ne0,r0,0 ; bubble WB addu_1 - addu.co r10,r10,r12 ; WB mul_4 - mask.u r10,r10,0xffff ; move the 16 most significant bits... - addu.ci r10,r10,r0 ; ...to the low half of the word... - rot r10,r10,16 ; ...and put carry in pos 16. - addu.co r26,r26,r2 ; add old carry limb +L1: mul r26,r9,r5 ; low word of product mul_1 WB ld + mask r12,r9,0xffff ; r12 = lo(s1_limb) mask_1 + mul r11,r12,r7 ; r11 = prod_0 mul_2 WB mask_1 + mul r10,r12,r8 ; r10 = prod_1a mul_3 + extu r13,r9,16 ; r13 = hi(s1_limb) extu_1 WB mul_1 + mul r12,r13,r7 ; r12 = prod_1b mul_4 WB extu_1 + mul r25,r13,r8 ; r25 = prod_2 mul_5 WB mul_2 + extu r11,r11,16 ; r11 = hi(prod_0) extu_2 WB mul_3 + addu r10,r10,r11 ; addu_1 WB extu_2 +; bcnd ne0,r0,0 ; bubble WB addu_1 + addu.co r10,r10,r12 ; WB mul_4 + mask.u r10,r10,0xffff ; move the 16 most significant bits... + addu.ci r10,r10,r0 ; ...to the low half of the word... + rot r10,r10,16 ; ...and put carry in pos 16. + addu.co r26,r26,r2 ; add old carry limb bcnd.n ne0,r4,Loop - addu.ci r2,r25,r10 ; compute new carry limb + addu.ci r2,r25,r10 ; compute new carry limb st r26,r6[r4] ld.d r25,r31,8 @@ -109,20 +108,19 @@ Lsmall: br.n SL1 addu r4,r4,1 -SLoop: - ld r9,r3[r4] ; - st r8,r6[r4] ; - addu r4,r4,1 ; -SL1: mul r8,r9,r5 ; low word of product - mask r12,r9,0xffff ; r12 = lo(s1_limb) - extu r13,r9,16 ; r13 = hi(s1_limb) - mul r11,r12,r7 ; r11 = prod_0 - mul r12,r13,r7 ; r12 = prod_1b - addu.cio r8,r8,r2 ; add old carry limb - extu r10,r11,16 ; r11 = hi(prod_0) - addu r10,r10,r12 ; +SLoop: ld r9,r3[r4] ; + st r8,r6[r4] ; + addu r4,r4,1 ; +SL1: mul r8,r9,r5 ; low word of product + mask r12,r9,0xffff ; r12 = lo(s1_limb) + extu r13,r9,16 ; r13 = hi(s1_limb) + mul r11,r12,r7 ; r11 = prod_0 + mul r12,r13,r7 ; r12 = prod_1b + addu.cio r8,r8,r2 ; add old carry limb + extu r10,r11,16 ; r11 = hi(prod_0) + addu r10,r10,r12 ; bcnd.n ne0,r4,SLoop - extu r2,r10,16 ; r2 = new carry limb + extu r2,r10,16 ; r2 = new carry limb jmp.n r1 st r8,r6[r4] diff --git a/sysdeps/m88k/sub_n.s b/sysdeps/m88k/sub_n.s index 3963cd5479..cd0b791b79 100644 --- a/sysdeps/m88k/sub_n.s +++ b/sysdeps/m88k/sub_n.s @@ -1,7 +1,7 @@ ; mc88100 __mpn_sub -- Subtract two limb vectors of the same length > 0 and ; store difference in a third limb vector. -; Copyright (C) 1992, 1994 Free Software Foundation, Inc. +; Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc. ; This file is part of the GNU MP Library. @@ -41,9 +41,10 @@ ___mpn_sub_n: extu r10,r5,3 ld r7,r4,0 ; read first limb from s2_ptr - subu.co r5,r0,r5 ; (clear carry as side effect) + subu r5,r0,r5 mak r5,r5,3<4> - bcnd eq0,r5,Lzero + bcnd.n eq0,r5,Lzero + subu.co r0,r0,r0 ; initialize carry or r12,r0,lo16(Lbase) or.u r12,r12,hi16(Lbase) diff --git a/sysdeps/mips/addmul_1.s b/sysdeps/mips/addmul_1.s index abc2fb8dcf..917af1bac3 100644 --- a/sysdeps/mips/addmul_1.s +++ b/sysdeps/mips/addmul_1.s @@ -1,7 +1,7 @@ # MIPS __mpn_addmul_1 -- Multiply a limb vector with a single limb and # add the product to a second limb vector. - # Copyright (C) 1992, 1994 Free Software Foundation, Inc. + # Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc. # This file is part of the GNU MP Library. @@ -63,7 +63,7 @@ Loop: lw $10,0($4) addu $2,$2,$10 sw $3,0($4) addiu $4,$4,4 - bne $6,$0,Loop # should be "bnel" + bne $6,$0,Loop addu $2,$9,$2 # add high product limb and carry from addition # cool down phase 1 diff --git a/sysdeps/mips/mips3/addmul_1.s b/sysdeps/mips/mips3/addmul_1.s index 7af0172614..7dbc9ad41d 100644 --- a/sysdeps/mips/mips3/addmul_1.s +++ b/sysdeps/mips/mips3/addmul_1.s @@ -63,7 +63,7 @@ Loop: ld $10,0($4) daddu $2,$2,$10 sd $3,0($4) daddiu $4,$4,8 - bne $6,$0,Loop # should be "bnel" + bne $6,$0,Loop daddu $2,$9,$2 # add high product limb and carry from addition # cool down phase 1 diff --git a/sysdeps/mips/mips3/mul_1.s b/sysdeps/mips/mips3/mul_1.s index 87954e5bc3..8376a02546 100644 --- a/sysdeps/mips/mips3/mul_1.s +++ b/sysdeps/mips/mips3/mul_1.s @@ -59,7 +59,7 @@ Loop: mflo $10 sltu $2,$10,$2 # carry from previous addition -> $2 sd $10,0($4) daddiu $4,$4,8 - bne $6,$0,Loop # should be "bnel" + bne $6,$0,Loop daddu $2,$9,$2 # add high product limb and carry from addition # cool down phase 1 diff --git a/sysdeps/mips/mips3/submul_1.s b/sysdeps/mips/mips3/submul_1.s index f28c6a5167..f041f6c0b4 100644 --- a/sysdeps/mips/mips3/submul_1.s +++ b/sysdeps/mips/mips3/submul_1.s @@ -63,7 +63,7 @@ Loop: ld $10,0($4) daddu $2,$2,$10 sd $3,0($4) daddiu $4,$4,8 - bne $6,$0,Loop # should be "bnel" + bne $6,$0,Loop daddu $2,$9,$2 # add high product limb and carry from addition # cool down phase 1 diff --git a/sysdeps/mips/mul_1.s b/sysdeps/mips/mul_1.s index 01327e22d8..6f5324cef4 100644 --- a/sysdeps/mips/mul_1.s +++ b/sysdeps/mips/mul_1.s @@ -1,7 +1,7 @@ # MIPS __mpn_mul_1 -- Multiply a limb vector with a single limb and # store the product in a second limb vector. - # Copyright (C) 1992, 1994 Free Software Foundation, Inc. + # Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc. # This file is part of the GNU MP Library. @@ -59,7 +59,7 @@ Loop: mflo $10 sltu $2,$10,$2 # carry from previous addition -> $2 sw $10,0($4) addiu $4,$4,4 - bne $6,$0,Loop # should be "bnel" + bne $6,$0,Loop addu $2,$9,$2 # add high product limb and carry from addition # cool down phase 1 diff --git a/sysdeps/mips/submul_1.s b/sysdeps/mips/submul_1.s index 616dd1b47c..a78072a1e9 100644 --- a/sysdeps/mips/submul_1.s +++ b/sysdeps/mips/submul_1.s @@ -1,7 +1,7 @@ # MIPS __mpn_submul_1 -- Multiply a limb vector with a single limb and # subtract the product from a second limb vector. - # Copyright (C) 1992, 1994 Free Software Foundation, Inc. + # Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc. # This file is part of the GNU MP Library. @@ -63,7 +63,7 @@ Loop: lw $10,0($4) addu $2,$2,$10 sw $3,0($4) addiu $4,$4,4 - bne $6,$0,Loop # should be "bnel" + bne $6,$0,Loop addu $2,$9,$2 # add high product limb and carry from addition # cool down phase 1 diff --git a/sysdeps/rs6000/add_n.s b/sysdeps/rs6000/add_n.s index 7090cf1b00..e2536d5887 100644 --- a/sysdeps/rs6000/add_n.s +++ b/sysdeps/rs6000/add_n.s @@ -1,6 +1,6 @@ # IBM POWER __mpn_add_n -- Add two limb vectors of equal, non-zero length. -# Copyright (C) 1992, 1994 Free Software Foundation, Inc. +# Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc. # This file is part of the GNU MP Library. diff --git a/sysdeps/rs6000/sub_n.s b/sysdeps/rs6000/sub_n.s index 40fe7d68bd..c57675b106 100644 --- a/sysdeps/rs6000/sub_n.s +++ b/sysdeps/rs6000/sub_n.s @@ -1,7 +1,7 @@ # IBM POWER __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and # store difference in a third limb vector. -# Copyright (C) 1992, 1994 Free Software Foundation, Inc. +# Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc. # This file is part of the GNU MP Library. diff --git a/sysdeps/vax/gmp-mparam.h b/sysdeps/vax/gmp-mparam.h index 687f12aa35..ddc308ae20 100644 --- a/sysdeps/vax/gmp-mparam.h +++ b/sysdeps/vax/gmp-mparam.h @@ -1,6 +1,6 @@ /* gmp-mparam.h -- Compiler/machine parameter header file. -Copyright (C) 1991, 1993, 1994 Free Software Foundation, Inc. +Copyright (C) 1991, 1993, 1994, 1995 Free Software Foundation, Inc. This file is part of the GNU MP Library. diff --git a/sysdeps/z8000/mul_1.s b/sysdeps/z8000/mul_1.s index 2075225d11..0150e85e85 100644 --- a/sysdeps/z8000/mul_1.s +++ b/sysdeps/z8000/mul_1.s @@ -1,7 +1,7 @@ ! Z8000 __mpn_mul_1 -- Multiply a limb vector with a limb and store ! the result in a second limb vector. -! Copyright (C) 1993, 1994 Free Software Foundation, Inc. +! Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. ! This file is part of the GNU MP Library. From dbba6d57d0b553282cc0b7b6bcd2a9320c732d45 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Sat, 2 Mar 1996 01:34:50 +0000 Subject: [PATCH 0603/4487] * sysdeps/unix/sysv/sysv4/solaris2/sparc/sigcontext.h: New file, including . * sysdeps/unix/sysv/sysv4/solaris2/sparc/profil-counter.h: New file, same as linux/m68k/profil-counter.h except the comment. --- .../sysv4/solaris2/sparc/profil-counter.h | 24 +++++++++++++++++++ .../sysv/sysv4/solaris2/sparc/sigcontext.h | 1 + 2 files changed, 25 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/solaris2/sparc/profil-counter.h create mode 100644 sysdeps/unix/sysv/sysv4/solaris2/sparc/sigcontext.h diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/profil-counter.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/profil-counter.h new file mode 100644 index 0000000000..be1a9328d1 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/profil-counter.h @@ -0,0 +1,24 @@ +/* Machine-dependent SIGPROF signal handler. Solaris2/sparc version. +Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +static void +profil_counter (int signr, int code, struct sigcontext *scp) +{ + profil_count ((void *) scp->sc_pc); +} diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sigcontext.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sigcontext.h new file mode 100644 index 0000000000..532b3793ec --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sigcontext.h @@ -0,0 +1 @@ +#include From 855d4c52032f6723ddf9810a229ee566dc8d093d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 2 Mar 1996 21:37:50 +0000 Subject: [PATCH 0604/4487] Sat Mar 2 16:35:40 1996 Roland McGrath * sysdeps/unix/sysv/linux/m68k/profil-counter.h: File removed. * sysdeps/unix/sysv/sysv4/solaris2/sparc/profil-counter.h: File removed. * sysdeps/generic/profil-counter.h: New file. --- sysdeps/unix/sysv/linux/m68k/profil-counter.h | 24 ------------------- .../sysv4/solaris2/sparc/profil-counter.h | 24 ------------------- 2 files changed, 48 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/m68k/profil-counter.h delete mode 100644 sysdeps/unix/sysv/sysv4/solaris2/sparc/profil-counter.h diff --git a/sysdeps/unix/sysv/linux/m68k/profil-counter.h b/sysdeps/unix/sysv/linux/m68k/profil-counter.h deleted file mode 100644 index 4e7b132dc9..0000000000 --- a/sysdeps/unix/sysv/linux/m68k/profil-counter.h +++ /dev/null @@ -1,24 +0,0 @@ -/* Machine-dependent SIGPROF signal handler. Linux/m68k version. -Copyright (C) 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -static void -profil_counter (int signr, int code, struct sigcontext *scp) -{ - profil_count ((void *) scp->sc_pc); -} diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/profil-counter.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/profil-counter.h deleted file mode 100644 index be1a9328d1..0000000000 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/profil-counter.h +++ /dev/null @@ -1,24 +0,0 @@ -/* Machine-dependent SIGPROF signal handler. Solaris2/sparc version. -Copyright (C) 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -static void -profil_counter (int signr, int code, struct sigcontext *scp) -{ - profil_count ((void *) scp->sc_pc); -} From 5198eaa39a9c3a0bcc13b5015b95b953518372e5 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 12 Mar 1996 14:15:42 +0000 Subject: [PATCH 0605/4487] . --- sysdeps/m68k/m68020/add_n.S | 76 ---------------------- sysdeps/m68k/m68020/asm-syntax.h | 105 ------------------------------- sysdeps/m68k/m68020/sub_n.S | 76 ---------------------- 3 files changed, 257 deletions(-) delete mode 100644 sysdeps/m68k/m68020/add_n.S delete mode 100644 sysdeps/m68k/m68020/asm-syntax.h delete mode 100644 sysdeps/m68k/m68020/sub_n.S diff --git a/sysdeps/m68k/m68020/add_n.S b/sysdeps/m68k/m68020/add_n.S deleted file mode 100644 index ea7a4458ea..0000000000 --- a/sysdeps/m68k/m68020/add_n.S +++ /dev/null @@ -1,76 +0,0 @@ -/* mc68020 __mpn_add_n -- Add two limb vectors of the same length > 0 and store - sum in a third limb vector. - -Copyright (C) 1992, 1994 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Library General Public License as published by -the Free Software Foundation; either version 2 of the License, or (at your -option) any later version. - -The GNU MP 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 Library General Public -License for more details. - -You should have received a copy of the GNU Library General Public License -along with the GNU MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ - -/* - INPUT PARAMETERS - res_ptr (sp + 4) - s1_ptr (sp + 8) - s2_ptr (sp + 16) - size (sp + 12) -*/ - -#include "asm-syntax.h" - - TEXT - ALIGN - GLOBL ___mpn_add_n - -LAB(___mpn_add_n) -/* Save used registers on the stack. */ - INSN2(move,l ,MEM_PREDEC(sp),d2) - INSN2(move,l ,MEM_PREDEC(sp),a2) - -/* Copy the arguments to registers. Better use movem? */ - INSN2(move,l ,a2,MEM_DISP(sp,12)) - INSN2(move,l ,a0,MEM_DISP(sp,16)) - INSN2(move,l ,a1,MEM_DISP(sp,20)) - INSN2(move,l ,d2,MEM_DISP(sp,24)) - - INSN2(eor,w ,d2,#1) - INSN2(lsr,l ,d2,#1) - bcc L1 - INSN2(subq,l ,d2,#1) /* clears cy as side effect */ - -LAB(Loop) - INSN2(move,l ,d0,MEM_POSTINC(a0)) - INSN2(move,l ,d1,MEM_POSTINC(a1)) - INSN2(addx,l ,d0,d1) - INSN2(move,l ,MEM_POSTINC(a2),d0) -LAB(L1) INSN2(move,l ,d0,MEM_POSTINC(a0)) - INSN2(move,l ,d1,MEM_POSTINC(a1)) - INSN2(addx,l ,d0,d1) - INSN2(move,l ,MEM_POSTINC(a2),d0) - - dbf d2,Loop /* loop until 16 lsb of %4 == -1 */ - INSN2(subx,l ,d0,d0) /* d0 <= -cy; save cy as 0 or -1 in d0 */ - INSN2(sub,l ,d2,#0x10000) - bcs L2 - INSN2(add,l ,d0,d0) /* restore cy */ - bra Loop - -LAB(L2) - INSN1(neg,l ,d0) - -/* Restore used registers from stack frame. */ - INSN2(move,l ,a2,MEM_POSTINC(sp)) - INSN2(move,l ,d2,MEM_POSTINC(sp)) - - rts diff --git a/sysdeps/m68k/m68020/asm-syntax.h b/sysdeps/m68k/m68020/asm-syntax.h deleted file mode 100644 index 394b3ca739..0000000000 --- a/sysdeps/m68k/m68020/asm-syntax.h +++ /dev/null @@ -1,105 +0,0 @@ -/* asm.h -- Definitions for 68k syntax variations. - -Copyright (C) 1992, 1994 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Library General Public License as published by -the Free Software Foundation; either version 2 of the License, or (at your -option) any later version. - -The GNU MP 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 Library General Public -License for more details. - -You should have received a copy of the GNU Library General Public License -along with the GNU MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ - -#ifdef MIT_SYNTAX -#define MEM(base)base@ -#define MEM_DISP(base,displacement)base@(displacement) -#define MEM_PREDEC(memory_base)memory_base@- -#define MEM_POSTINC(memory_base)memory_base@+ -#ifdef __STDC__ -#define INSN1(mnemonic,size_suffix,dst)mnemonic##size_suffix dst -#define INSN2(mnemonic,size_suffix,dst,src)mnemonic##size_suffix src,dst -#else -#define INSN1(mnemonic,size_suffix,dst)mnemonic/**/size_suffix dst -#define INSN2(mnemonic,size_suffix,dst,src)mnemonic/**/size_suffix src,dst -#endif -#define LAB(label) label: -#define TEXT .text -#define ALIGN .even -#define GLOBL .globl -#endif - -#ifdef SONY_SYNTAX -#define MEM(base)(base) -#define MEM_DISP(base,displacement)(displacement,base) -#define MEM_PREDEC(memory_base)-(memory_base) -#define MEM_POSTINC(memory_base)(memory_base)+ -#define INSN1(mnemonic,size_suffix,dst)mnemonic.size_suffix dst -#ifdef __STDC__ -#define INSN2(mnemonic,size_suffix,dst,src)mnemonic.size_suffix src##,dst -#else -#define INSN2(mnemonic,size_suffix,dst,src)mnemonic.size_suffix src/**/,dst -#endif -#define LAB(label) label: -#define TEXT .text -#define ALIGN .even -#define GLOBL .globl -#endif - -#ifdef MOTOROLA_SYNTAX -#define MEM(base)(base) -#define MEM_DISP(base,displacement)(displacement,base) -#define MEM_PREDEC(memory_base)-(memory_base) -#define MEM_POSTINC(memory_base)(memory_base)+ -#define INSN1(mnemonic,size_suffix,dst)mnemonic.size_suffix dst -#ifdef __STDC__ -#define INSN2(mnemonic,size_suffix,dst,src)mnemonic.size_suffix src##,dst -#else -#define INSN2(mnemonic,size_suffix,dst,src)mnemonic.size_suffix src/**/,dst -#endif -#define LAB(label) label -#define TEXT -#define ALIGN -#define GLOBL XDEF -#define l L -#define w W -#define move MOVE -#define eor EOR -#define lsr LSR -#define add ADD -#define addx ADDX -#define addq ADDQ -#define sub SUB -#define subx SUBX -#define subq SUBQ -#define neg NEG -#define bcc BCC -#define bcs BCS -#define bra BRA -#define dbf DBF -#define rts RTS -#define d0 D0 -#define d1 D1 -#define d2 D2 -#define d3 D3 -#define d4 D4 -#define d5 D5 -#define d6 D6 -#define d7 D7 -#define a0 A0 -#define a1 A1 -#define a2 A2 -#define a3 A3 -#define a4 A4 -#define a5 A5 -#define a6 A6 -#define a7 A7 -#define sp SP -#endif diff --git a/sysdeps/m68k/m68020/sub_n.S b/sysdeps/m68k/m68020/sub_n.S deleted file mode 100644 index 19f0ec1568..0000000000 --- a/sysdeps/m68k/m68020/sub_n.S +++ /dev/null @@ -1,76 +0,0 @@ -/* mc68020 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and - store difference in a third limb vector. - -Copyright (C) 1992, 1994 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Library General Public License as published by -the Free Software Foundation; either version 2 of the License, or (at your -option) any later version. - -The GNU MP 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 Library General Public -License for more details. - -You should have received a copy of the GNU Library General Public License -along with the GNU MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ - -/* - INPUT PARAMETERS - res_ptr (sp + 4) - s1_ptr (sp + 8) - s2_ptr (sp + 16) - size (sp + 12) -*/ - -#include "asm-syntax.h" - - TEXT - ALIGN - GLOBL ___mpn_sub_n - -LAB(___mpn_sub_n) -/* Save used registers on the stack. */ - INSN2(move,l ,MEM_PREDEC(sp),d2) - INSN2(move,l ,MEM_PREDEC(sp),a2) - -/* Copy the arguments to registers. Better use movem? */ - INSN2(move,l ,a2,MEM_DISP(sp,12)) - INSN2(move,l ,a0,MEM_DISP(sp,16)) - INSN2(move,l ,a1,MEM_DISP(sp,20)) - INSN2(move,l ,d2,MEM_DISP(sp,24)) - - INSN2(eor,w ,d2,#1) - INSN2(lsr,l ,d2,#1) - bcc L1 - INSN2(subq,l ,d2,#1) /* clears cy as side effect */ - -LAB(Loop) - INSN2(move,l ,d0,MEM_POSTINC(a0)) - INSN2(move,l ,d1,MEM_POSTINC(a1)) - INSN2(subx,l ,d0,d1) - INSN2(move,l ,MEM_POSTINC(a2),d0) -LAB(L1) INSN2(move,l ,d0,MEM_POSTINC(a0)) - INSN2(move,l ,d1,MEM_POSTINC(a1)) - INSN2(subx,l ,d0,d1) - INSN2(move,l ,MEM_POSTINC(a2),d0) - - dbf d2,Loop /* loop until 16 lsb of %4 == -1 */ - INSN2(subx,l ,d0,d0) /* d0 <= -cy; save cy as 0 or -1 in d0 */ - INSN2(sub,l ,d2,#0x10000) - bcs L2 - INSN2(add,l ,d0,d0) /* restore cy */ - bra Loop - -LAB(L2) - INSN1(neg,l ,d0) - -/* Restore used registers from stack frame. */ - INSN2(move,l ,a2,MEM_POSTINC(sp)) - INSN2(move,l ,d2,MEM_POSTINC(sp)) - - rts From b2801ddac45fa1a3cc5e18b43df7ded9a9844257 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 14 Mar 1996 11:19:46 +0000 Subject: [PATCH 0606/4487] Mon Mar 4 21:57:14 1996 Andreas Schwab * sysdeps/unix/sysv/linux/m68k/sysdep.h (SYS_ify): Redefine. (CALL_MCOUNT): New macro, empty unless [PROF]. (ENTRY): Do CALL_MCOUNT just after the label. (JUMPTARGET): New macro. (SYSCALL_ERROR_HANDLER): Fix syntax. --- sysdeps/unix/sysv/linux/m68k/sysdep.h | 34 +++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h index 9b6c8e1975..ee481172d3 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -23,6 +23,17 @@ Cambridge, MA 02139, USA. */ #include +/* For Linux we can use the system call table in the header file + /usr/include/asm/unistd.h + of the kernel. But these symbols do not follow the SYS_* syntax + so we have to redefine the `SYS_ify' macro here. */ +#undef SYS_ify +#ifdef __STDC__ +# define SYS_ify(syscall_name) __NR_##syscall_name +#else +# define SYS_ify(syscall_name) __NR_/**/syscall_name +#endif + #ifdef ASSEMBLER #define POUND # @@ -32,7 +43,26 @@ Cambridge, MA 02139, USA. */ .globl name; \ .type name, @function; \ .align 4; \ - name##: + C_LABEL(name) \ + CALL_MCOUNT + +/* If compiled for profiling, call `_mcount' at the start of each function. */ +#ifdef PROF +/* The mcount code relies on a normal frame pointer being on the stack + to locate our caller, so push one just for its benefit. */ +#define CALL_MCOUNT \ + move.l %fp, -(%sp); move.l %sp, %fp; \ + jbsr JUMPTARGET (_mcount); \ + move.l (%sp)+, %fp; +#else +#define CALL_MCOUNT /* Do nothing. */ +#endif + +#ifdef PIC +#define JUMPTARGET(name) name##@PLTPC +#else +#define JUMPTARGET(name) name +#endif /* Since C identifiers are not normally prefixed with an underscore on this system, the asm identifier `syscall_error' intrudes on the @@ -53,7 +83,7 @@ Cambridge, MA 02139, USA. */ /* Store (- %d0) into errno through the GOT. */ #define SYSCALL_ERROR_HANDLER \ syscall_error: \ - move.l (errno@GOTPC.l, %pc), %a0; \ + move.l (errno@GOTPC, %pc), %a0; \ neg.l %d0; \ move.l %d0, (%a0); \ move.l POUND -1, %d0; \ From 61e73b405a8d55af80aa6a8e481839a7338eb73b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 14 Mar 1996 11:20:02 +0000 Subject: [PATCH 0607/4487] Mon Mar 4 21:57:14 1996 Andreas Schwab * sysdeps/unix/sysv/linux/m68k/Makefile: New file. --- sysdeps/unix/sysv/linux/m68k/Makefile | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/Makefile diff --git a/sysdeps/unix/sysv/linux/m68k/Makefile b/sysdeps/unix/sysv/linux/m68k/Makefile new file mode 100644 index 0000000000..bdbd1057c4 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/Makefile @@ -0,0 +1,3 @@ +# Linux/m68k uses Motorola asm syntax and the ELF format. + +m68k-syntax-flag = -DMOTOROLA_SYNTAX From 8849f1d2446f967a3c2c71ade45291f2424810c7 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 16 Mar 1996 21:30:15 +0000 Subject: [PATCH 0608/4487] Thu Mar 14 15:20:45 1996 Andreas Schwab * sysdeps/m68k/fpu/__math.h: Rewritten for fdlibm. --- sysdeps/m68k/fpu/__math.h | 364 +++++++++++++++++++++++++++++--------- 1 file changed, 280 insertions(+), 84 deletions(-) diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h index e357364fb7..f59c168e79 100644 --- a/sysdeps/m68k/fpu/__math.h +++ b/sysdeps/m68k/fpu/__math.h @@ -19,8 +19,6 @@ Cambridge, MA 02139, USA. */ #ifdef __GNUC__ #include -#define __need_Emath -#include #ifdef __NO_MATH_INLINES /* This is used when defining the functions themselves. Define them with @@ -34,59 +32,87 @@ Cambridge, MA 02139, USA. */ #define __MATH_INLINES 1 #endif -#define __inline_mathop2(func, op) \ - __m81_inline double \ - __m81_u(func)(double __mathop_x) __attribute__((__const__)); \ - __m81_inline double \ - __m81_u(func)(double __mathop_x) \ +/* Define a const math function. */ +#define __m81_defun(rettype, func, args) \ + __m81_inline rettype \ + __m81_u(func) args __attribute__((__const__)); \ + __m81_inline rettype \ + __m81_u(func) args + +#define __inline_mathop(func, op) \ + __m81_defun (double, func, (double __mathop_x)) \ { \ double __result; \ __asm("f" __STRING(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x));\ return __result; \ } -#define __inline_mathop(op) __inline_mathop2(op, op) - -__inline_mathop(acos) -__inline_mathop(asin) -__inline_mathop(atan) -__inline_mathop(cos) -__inline_mathop(sin) -__inline_mathop(tan) -__inline_mathop(cosh) -__inline_mathop(sinh) -__inline_mathop(tanh) -__inline_mathop2(exp, etox) -__inline_mathop2(fabs, abs) -__inline_mathop(log10) -__inline_mathop2(log, logn) -__inline_mathop(sqrt) - -__inline_mathop2(__rint, int) -__inline_mathop2(__expm1, etoxm1) - -#ifdef __USE_MISC -#ifndef __NO_MATH_INLINES -__inline_mathop2(rint, int) -__inline_mathop2(expm1, etoxm1) -#endif -__inline_mathop2(log1p, lognp1) -__inline_mathop(atanh) -#endif -__m81_inline double -__m81_u(__drem)(double __x, double __y) __attribute__ ((__const__)); -__m81_inline double -__m81_u(__drem)(double __x, double __y) +#define __inline_mathopf(func, op) \ + __m81_defun (float, func, (float __mathop_x)) \ + { \ + float __result; \ + __asm("f" __STRING(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x));\ + return __result; \ + } + +/* ieee style elementary functions */ +__inline_mathop(__ieee754_acos, acos) +__inline_mathop(__ieee754_asin, asin) +__inline_mathop(__ieee754_cosh, cosh) +__inline_mathop(__ieee754_sinh, sinh) +__inline_mathop(__ieee754_exp, etox) +__inline_mathop(__ieee754_log10, log10) +__inline_mathop(__ieee754_log, logn) +__inline_mathop(__ieee754_sqrt, sqrt) +__inline_mathop(__ieee754_atanh, atanh) + +/* ieee style elementary float functions */ +__inline_mathopf(__ieee754_acosf, acos) +__inline_mathopf(__ieee754_asinf, asin) +__inline_mathopf(__ieee754_coshf, cosh) +__inline_mathopf(__ieee754_sinhf, sinh) +__inline_mathopf(__ieee754_expf, etox) +__inline_mathopf(__ieee754_log10f, log10) +__inline_mathopf(__ieee754_logf, logn) +__inline_mathopf(__ieee754_sqrtf, sqrt) +__inline_mathopf(__ieee754_atanhf, atan) + +__inline_mathop(__atan, atan) +__inline_mathop(__cos, cos) +__inline_mathop(__sin, sin) +__inline_mathop(__tan, tan) +__inline_mathop(__tanh, tanh) +__inline_mathop(__fabs, abs) +__inline_mathop(__sqrt, sqrt) + +__inline_mathop(__rint, int) +__inline_mathop(__expm1, etoxm1) +__inline_mathop(__log1p, lognp1) +__inline_mathop(__logb, log2) +__inline_mathop(__significand, getman) + +__inline_mathopf(__atanf, atan) +__inline_mathopf(__cosf, cos) +__inline_mathopf(__sinf, sin) +__inline_mathopf(__tanf, tan) +__inline_mathopf(__tanhf, tanh) +__inline_mathopf(__fabsf, abs) +__inline_mathopf(__sqrtf, sqrt) + +__inline_mathopf(__rintf, int) +__inline_mathopf(__expm1f, etoxm1) +__inline_mathopf(__log1pf, lognp1) +__inline_mathopf(__logbf, log2) +__inline_mathopf(__significandf, getman) + +__m81_defun (double, __ieee754_remainder, (double __x, double __y)) { double __result; __asm("frem%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); return __result; } -__m81_inline double -__m81_u(ldexp)(double __x, int __e) __attribute__ ((__const__)); -__m81_inline double -__m81_u(ldexp)(double __x, int __e) +__m81_defun (double, __ldexp, (double __x, int __e)) { double __result; double __double_e = (double) __e; @@ -94,10 +120,7 @@ __m81_u(ldexp)(double __x, int __e) return __result; } -__m81_inline double -__m81_u(fmod)(double __x, double __y) __attribute__ ((__const__)); -__m81_inline double -__m81_u(fmod)(double __x, double __y) +__m81_defun (double, __ieee754_fmod, (double __x, double __y)) { double __result; __asm("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); @@ -105,7 +128,7 @@ __m81_u(fmod)(double __x, double __y) } __m81_inline double -__m81_u(frexp)(double __value, int *__expptr) +__m81_u(__frexp)(double __value, int *__expptr) { double __mantissa, __exponent; __asm("fgetexp%.x %1, %0" : "=f" (__exponent) : "f" (__value)); @@ -114,10 +137,7 @@ __m81_u(frexp)(double __value, int *__expptr) return __mantissa; } -__m81_inline double -__m81_u(floor)(double __x) __attribute__ ((__const__)); -__m81_inline double -__m81_u(floor)(double __x) +__m81_defun (double, __floor, (double __x)) { double __result; unsigned long int __ctrl_reg; @@ -133,16 +153,13 @@ __m81_u(floor)(double __x) return __result; } -__m81_inline double -__m81_u(pow)(double __x, double __y) __attribute__ ((__const__)); -__m81_inline double -__m81_u(pow)(double __x, double __y) +__m81_defun (double, __ieee754_pow, (double __x, double __y)) { double __result; if (__x == 0.0) { if (__y <= 0.0) - __result = __infnan (EDOM); + __result = 0.0 / 0.0; else __result = 0.0; } @@ -162,22 +179,19 @@ __m81_u(pow)(double __x, double __y) if (__y == __temp) { int i = (int) __y; - __result = __m81_u (exp) (__y * __m81_u (log) (-__x)); + __result = __m81_u(__ieee754_exp)(__y * __m81_u(__ieee754_log)(-__x)); if (i & 1) __result = -__result; } else - __result = __infnan (EDOM); + __result = 0.0 / 0.0; } else - __result = __m81_u(exp)(__y * __m81_u(log)(__x)); + __result = __m81_u(__ieee754_exp)(__y * __m81_u(__ieee754_log)(__x)); return __result; } -__m81_inline double -__m81_u(ceil)(double __x) __attribute__ ((__const__)); -__m81_inline double -__m81_u(ceil)(double __x) +__m81_defun (double, __ceil, (double __x)) { double __result; unsigned long int __ctrl_reg; @@ -194,30 +208,25 @@ __m81_u(ceil)(double __x) } __m81_inline double -__m81_u(modf)(double __value, double *__iptr) +__m81_u(__modf)(double __value, double *__iptr) { - double __modf_int = __m81_u(floor)(__value); + double __modf_int; + __asm ("fintrz%.x %1, %0" : "=f" (__modf_int) : "f" (__value)); *__iptr = __modf_int; return __value - __modf_int; } -__m81_inline int -__m81_u(__isinf)(double __value) __attribute__ ((__const__)); -__m81_inline int -__m81_u(__isinf)(double __value) +__m81_defun (int, __isinf, (double __value)) { /* There is no branch-condition for infinity, so we must extract and examine the condition codes manually. */ unsigned long int __fpsr; __asm("ftst%.x %1\n" "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); - return (__fpsr & (2 << (3 * 8))) ? (__value < 0 ? -1 : 1) : 0; + return (__fpsr & (2 << 24)) ? (__fpsr & (8 << 24) ? -1 : 1) : 0; } -__m81_inline int -__m81_u(__isnan)(double __value) __attribute__ ((__const__)); -__m81_inline int -__m81_u(__isnan)(double __value) +__m81_defun (int, __isnan, (double __value)) { char __result; __asm("ftst%.x %1\n" @@ -225,23 +234,210 @@ __m81_u(__isnan)(double __value) return __result; } -__m81_inline int -__m81_u(__isinfl)(long double __value) __attribute__ ((__const__)); -__m81_inline int -__m81_u(__isinfl)(long double __value) +__m81_defun (int, __finite, (double __value)) +{ + /* There is no branch-condition for infinity, so we must extract and + examine the condition codes manually. */ + unsigned long int __fpsr; + __asm ("ftst%.x %1\n" + "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); + return (__fpsr & (3 << 24)) == 0; +} + +__m81_defun (int, __ilogb, (double __x)) +{ + double __result; + __asm("fgetexp%.x %1, %0" : "=f" (__result) : "f" (__x)); + return (int) __result; +} + +__m81_defun (double, __ieee754_scalb, (double __x, double __n)) +{ + double __result; + __asm ("fscale%.x %1, %0" : "=f" (__result) : "f" (__n), "0" (__x)); + return __result; +} + +__m81_defun (double, __scalbn, (double __x, int __n)) +{ + double __result; + double __double_n = (double) __n; + __asm ("fscale%.x %1, %0" : "=f" (__result) : "f" (__double_n), "0" (__x)); + return __result; +} + +__m81_defun (float, __ieee754_remainderf, (float __x, float __y)) +{ + float __result; + __asm("frem%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); + return __result; +} + +__m81_defun (float, __ldexpf, (float __x, int __e)) +{ + float __result; + float __float_e = (float) __e; + __asm("fscale%.x %1, %0" : "=f" (__result) : "f" (__float_e), "0" (__x)); + return __result; +} + +__m81_defun (float, __ieee754_fmodf, (float __x, float __y)) +{ + float __result; + __asm("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); + return __result; +} + +__m81_inline float +__m81_u(__frexpf)(float __value, int *__expptr) +{ + float __mantissa, __exponent; + __asm("fgetexp%.x %1, %0" : "=f" (__exponent) : "f" (__value)); + __asm("fgetman%.x %1, %0" : "=f" (__mantissa) : "f" (__value)); + *__expptr = (int) __exponent; + return __mantissa; +} + +__m81_defun (float, __floorf, (float __x)) +{ + float __result; + unsigned long int __ctrl_reg; + __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); + /* Set rounding towards negative infinity. */ + __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ + : "dmi" ((__ctrl_reg & ~0x10) | 0x20)); + /* Convert X to an integer, using -Inf rounding. */ + __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); + /* Restore the previous rounding mode. */ + __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ + : "dmi" (__ctrl_reg)); + return __result; +} + +__m81_defun (float, __ieee754_powf, (float __x, float __y)) +{ + float __result; + if (__x == 0.0f) + { + if (__y <= 0.0f) + __result = 0.0f / 0.0f; + else + __result = 0.0f; + } + else if (__y == 0.0f || __x == 1.0f) + __result = 1.0; + else if (__y == 1.0f) + __result = __x; + else if (__y == 2.0f) + __result = __x * __x; + else if (__x == 10.0f) + __asm("ftentox%.x %1, %0" : "=f" (__result) : "f" (__y)); + else if (__x == 2.0f) + __asm("ftwotox%.x %1, %0" : "=f" (__result) : "f" (__y)); + else if (__x < 0.0f) + { + float __temp = __m81_u(__rintf)(__y); + if (__y == __temp) + { + int i = (int) __y; + __result = __m81_u(__ieee754_expf)(__y * __m81_u(__ieee754_logf)(-__x)); + if (i & 1) + __result = -__result; + } + else + __result = 0.0f / 0.0f; + } + else + __result = __m81_u(__ieee754_expf)(__y * __m81_u(__ieee754_logf)(__x)); + return __result; +} + +__m81_defun (float, __ceilf, (float __x)) +{ + float __result; + unsigned long int __ctrl_reg; + __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); + /* Set rounding towards positive infinity. */ + __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ + : "dmi" (__ctrl_reg | 0x30)); + /* Convert X to an integer, using +Inf rounding. */ + __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); + /* Restore the previous rounding mode. */ + __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ + : "dmi" (__ctrl_reg)); + return __result; +} + +__m81_inline float +__m81_u(__modff)(float __value, float *__iptr) +{ + float __modf_int; + __asm ("fintrz%.x %1, %0" : "=f" (__modf_int) : "f" (__value)); + *__iptr = __modf_int; + return __value - __modf_int; +} + +__m81_defun (int, __isinff, (float __value)) +{ + /* There is no branch-condition for infinity, + so we must extract and examine the condition codes manually. */ + unsigned long int __fpsr; + __asm("ftst%.x %1\n" + "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); + return (__fpsr & (2 << 24)) ? (__fpsr & (8 << 24) ? -1 : 1) : 0; +} + +__m81_defun (int, __isnanf, (float __value)) +{ + char __result; + __asm("ftst%.x %1\n" + "fsun %0" : "=dm" (__result) : "f" (__value)); + return __result; +} + +__m81_defun (int, __finitef, (float __value)) +{ + /* There is no branch-condition for infinity, so we must extract and + examine the condition codes manually. */ + unsigned long int __fpsr; + __asm ("ftst%.x %1\n" + "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); + return (__fpsr & (3 << 24)) == 0; +} + +__m81_defun (int, __ilogbf, (float __x)) +{ + float __result; + __asm("fgetexp%.x %1, %0" : "=f" (__result) : "f" (__x)); + return (int) __result; +} + +__m81_defun (float, __ieee754_scalbf, (float __x, float __n)) +{ + float __result; + __asm ("fscale%.x %1, %0" : "=f" (__result) : "f" (__n), "0" (__x)); + return __result; +} + +__m81_defun (float, __scalbnf, (float __x, int __n)) +{ + float __result; + float __float_n = (float) __n; + __asm ("fscale%.x %1, %0" : "=f" (__result) : "f" (__float_n), "0" (__x)); + return __result; +} + +__m81_defun (int, __isinfl, (long double __value)) { /* There is no branch-condition for infinity, so we must extract and examine the condition codes manually. */ unsigned long int __fpsr; __asm("ftst%.x %1\n" "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); - return (__fpsr & (2 << (3 * 8))) ? (__value < 0 ? -1 : 1) : 0; + return (__fpsr & (2 << 24)) ? (__fpsr & (8 << 24) ? -1 : 1) : 0; } -__m81_inline int -__m81_u(__isnanl)(long double __value) __attribute__ ((__const__)); -__m81_inline int -__m81_u(__isnanl)(long double __value) +__m81_defun (int, __isnanl, (long double __value)) { char __result; __asm("ftst%.x %1\n" From aee4d3a946512f19ed60f62ec99e0cc2437ccc0d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 16 Mar 1996 21:30:47 +0000 Subject: [PATCH 0609/4487] Thu Mar 14 15:20:45 1996 Andreas Schwab * sysdeps/m68k/fpu/isinfl.c: Rewritten to get argument type right. * sysdeps/m68k/fpu/isnanl.c: Likewise. --- sysdeps/m68k/fpu/isinfl.c | 29 +++++++++++++++++++++++++++-- sysdeps/m68k/fpu/isnanl.c | 29 +++++++++++++++++++++++++++-- 2 files changed, 54 insertions(+), 4 deletions(-) diff --git a/sysdeps/m68k/fpu/isinfl.c b/sysdeps/m68k/fpu/isinfl.c index f3eeaa2b30..77fd759182 100644 --- a/sysdeps/m68k/fpu/isinfl.c +++ b/sysdeps/m68k/fpu/isinfl.c @@ -1,4 +1,29 @@ -#define FUNC __isinfl -#include +/* Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#define __NO_MATH_INLINES +#include + +int +DEFUN(__isinfl, (x), long double x) +{ + return __m81_u(__isinfl)(x); +} weak_alias (__isinfl, isinfl) diff --git a/sysdeps/m68k/fpu/isnanl.c b/sysdeps/m68k/fpu/isnanl.c index 0f48a73fbc..1e58ea4ebd 100644 --- a/sysdeps/m68k/fpu/isnanl.c +++ b/sysdeps/m68k/fpu/isnanl.c @@ -1,4 +1,29 @@ -#define FUNC __isnanl -#include +/* Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#define __NO_MATH_INLINES +#include + +int +DEFUN(__isnanl, (x), long double x) +{ + return __m81_u(__isnanl)(x); +} weak_alias (__isnanl, isnanl) From 501ee116e7b8f9b89bf618c96acbe9baefe10fbc Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 16 Mar 1996 21:32:41 +0000 Subject: [PATCH 0610/4487] Thu Mar 14 15:20:45 1996 Andreas Schwab * sysdeps/m68k/fpu/e_acos.c, sysdeps/m68k/fpu/e_acosf.c, sysdeps/m68k/fpu/e_asin.c, sysdeps/m68k/fpu/e_asinf.c, sysdeps/m68k/fpu/e_atanh.c, sysdeps/m68k/fpu/e_atanhf.c, sysdeps/m68k/fpu/e_cosh.c, sysdeps/m68k/fpu/e_coshf.c, sysdeps/m68k/fpu/e_exp.c, sysdeps/m68k/fpu/e_expf.c, sysdeps/m68k/fpu/e_fmod.c, sysdeps/m68k/fpu/e_fmodf.c, sysdeps/m68k/fpu/e_log.c, sysdeps/m68k/fpu/e_log10.c, sysdeps/m68k/fpu/e_log10f.c, sysdeps/m68k/fpu/e_logf.c, sysdeps/m68k/fpu/e_pow.c, sysdeps/m68k/fpu/e_powf.c, sysdeps/m68k/fpu/e_remainder.c, sysdeps/m68k/fpu/e_remainderf.c, sysdeps/m68k/fpu/e_scalb.c, sysdeps/m68k/fpu/e_scalbf.c, sysdeps/m68k/fpu/e_sinh.c, sysdeps/m68k/fpu/e_sinhf.c, sysdeps/m68k/fpu/e_sqrt.c, sysdeps/m68k/fpu/e_sqrtf.c, sysdeps/m68k/fpu/k_cos.c, sysdeps/m68k/fpu/k_cosf.c, sysdeps/m68k/fpu/k_sin.c, sysdeps/m68k/fpu/k_sinf.c, sysdeps/m68k/fpu/k_tan.c, sysdeps/m68k/fpu/k_tanf.c, sysdeps/m68k/fpu/s_atan.c, sysdeps/m68k/fpu/s_atanf.c, sysdeps/m68k/fpu/s_ceil.c, sysdeps/m68k/fpu/s_ceilf.c, sysdeps/m68k/fpu/s_cos.c, sysdeps/m68k/fpu/s_cosf.c, sysdeps/m68k/fpu/s_expm1.c, sysdeps/m68k/fpu/s_expm1f.c, sysdeps/m68k/fpu/s_fabs.c, sysdeps/m68k/fpu/s_fabsf.c, sysdeps/m68k/fpu/s_finite.c, sysdeps/m68k/fpu/s_finitef.c, sysdeps/m68k/fpu/s_floor.c, sysdeps/m68k/fpu/s_floorf.c, sysdeps/m68k/fpu/s_frexp.c, sysdeps/m68k/fpu/s_frexpf.c, sysdeps/m68k/fpu/s_ilogb.c, sysdeps/m68k/fpu/s_ilogbf.c, sysdeps/m68k/fpu/s_isinf.c, sysdeps/m68k/fpu/s_isinff.c, sysdeps/m68k/fpu/s_isnan.c, sysdeps/m68k/fpu/s_isnanf.c, sysdeps/m68k/fpu/s_ldexp.c, sysdeps/m68k/fpu/s_ldexpf.c, sysdeps/m68k/fpu/s_log1p.c, sysdeps/m68k/fpu/s_log1pf.c, sysdeps/m68k/fpu/s_logb.c, sysdeps/m68k/fpu/s_logbf.c, sysdeps/m68k/fpu/s_modf.c, sysdeps/m68k/fpu/s_modff.c, sysdeps/m68k/fpu/s_rint.c, sysdeps/m68k/fpu/s_rintf.c, sysdeps/m68k/fpu/s_scalbn.c, sysdeps/m68k/fpu/s_scalbnf.c, sysdeps/m68k/fpu/s_significand.c, sysdeps/m68k/fpu/s_significandf.c, sysdeps/m68k/fpu/s_sin.c, sysdeps/m68k/fpu/s_sinf.c, sysdeps/m68k/fpu/s_tan.c, sysdeps/m68k/fpu/s_tanf.c, sysdeps/m68k/fpu/s_tanh.c, sysdeps/m68k/fpu/s_tanhf.c: New files, for m68881 port of fdlibm. --- sysdeps/m68k/fpu/e_acos.c | 31 ++++++++++++++++++++++++++ sysdeps/m68k/fpu/e_acosf.c | 31 ++++++++++++++++++++++++++ sysdeps/m68k/fpu/e_asin.c | 2 ++ sysdeps/m68k/fpu/e_asinf.c | 2 ++ sysdeps/m68k/fpu/e_atanh.c | 2 ++ sysdeps/m68k/fpu/e_atanhf.c | 2 ++ sysdeps/m68k/fpu/e_cosh.c | 2 ++ sysdeps/m68k/fpu/e_coshf.c | 2 ++ sysdeps/m68k/fpu/e_exp.c | 2 ++ sysdeps/m68k/fpu/e_expf.c | 2 ++ sysdeps/m68k/fpu/e_fmod.c | 31 ++++++++++++++++++++++++++ sysdeps/m68k/fpu/e_fmodf.c | 31 ++++++++++++++++++++++++++ sysdeps/m68k/fpu/e_log.c | 2 ++ sysdeps/m68k/fpu/e_log10.c | 2 ++ sysdeps/m68k/fpu/e_log10f.c | 2 ++ sysdeps/m68k/fpu/e_logf.c | 2 ++ sysdeps/m68k/fpu/e_pow.c | 2 ++ sysdeps/m68k/fpu/e_powf.c | 2 ++ sysdeps/m68k/fpu/e_remainder.c | 2 ++ sysdeps/m68k/fpu/e_remainderf.c | 2 ++ sysdeps/m68k/fpu/e_scalb.c | 2 ++ sysdeps/m68k/fpu/e_scalbf.c | 2 ++ sysdeps/m68k/fpu/e_sinh.c | 2 ++ sysdeps/m68k/fpu/e_sinhf.c | 2 ++ sysdeps/m68k/fpu/e_sqrt.c | 2 ++ sysdeps/m68k/fpu/e_sqrtf.c | 2 ++ sysdeps/m68k/fpu/k_cos.c | 26 ++++++++++++++++++++++ sysdeps/m68k/fpu/k_cosf.c | 26 ++++++++++++++++++++++ sysdeps/m68k/fpu/k_sin.c | 26 ++++++++++++++++++++++ sysdeps/m68k/fpu/k_sinf.c | 26 ++++++++++++++++++++++ sysdeps/m68k/fpu/k_tan.c | 29 +++++++++++++++++++++++++ sysdeps/m68k/fpu/k_tanf.c | 29 +++++++++++++++++++++++++ sysdeps/m68k/fpu/s_atan.c | 36 +++++++++++++++++++++++++++++++ sysdeps/m68k/fpu/s_atanf.c | 36 +++++++++++++++++++++++++++++++ sysdeps/m68k/fpu/s_ceil.c | 2 ++ sysdeps/m68k/fpu/s_ceilf.c | 2 ++ sysdeps/m68k/fpu/s_cos.c | 2 ++ sysdeps/m68k/fpu/s_cosf.c | 2 ++ sysdeps/m68k/fpu/s_expm1.c | 2 ++ sysdeps/m68k/fpu/s_expm1f.c | 2 ++ sysdeps/m68k/fpu/s_fabs.c | 2 ++ sysdeps/m68k/fpu/s_fabsf.c | 2 ++ sysdeps/m68k/fpu/s_finite.c | 2 ++ sysdeps/m68k/fpu/s_finitef.c | 2 ++ sysdeps/m68k/fpu/s_floor.c | 2 ++ sysdeps/m68k/fpu/s_floorf.c | 2 ++ sysdeps/m68k/fpu/s_frexp.c | 28 ++++++++++++++++++++++++ sysdeps/m68k/fpu/s_frexpf.c | 28 ++++++++++++++++++++++++ sysdeps/m68k/fpu/s_ilogb.c | 29 +++++++++++++++++++++++++ sysdeps/m68k/fpu/s_ilogbf.c | 29 +++++++++++++++++++++++++ sysdeps/m68k/fpu/s_isinf.c | 36 +++++++++++++++++++++++++++++++ sysdeps/m68k/fpu/s_isinff.c | 36 +++++++++++++++++++++++++++++++ sysdeps/m68k/fpu/s_isnan.c | 2 ++ sysdeps/m68k/fpu/s_isnanf.c | 2 ++ sysdeps/m68k/fpu/s_ldexp.c | 36 +++++++++++++++++++++++++++++++ sysdeps/m68k/fpu/s_ldexpf.c | 36 +++++++++++++++++++++++++++++++ sysdeps/m68k/fpu/s_log1p.c | 2 ++ sysdeps/m68k/fpu/s_log1pf.c | 2 ++ sysdeps/m68k/fpu/s_logb.c | 2 ++ sysdeps/m68k/fpu/s_logbf.c | 2 ++ sysdeps/m68k/fpu/s_modf.c | 28 ++++++++++++++++++++++++ sysdeps/m68k/fpu/s_modff.c | 28 ++++++++++++++++++++++++ sysdeps/m68k/fpu/s_rint.c | 2 ++ sysdeps/m68k/fpu/s_rintf.c | 2 ++ sysdeps/m68k/fpu/s_scalbn.c | 2 ++ sysdeps/m68k/fpu/s_scalbnf.c | 2 ++ sysdeps/m68k/fpu/s_significand.c | 2 ++ sysdeps/m68k/fpu/s_significandf.c | 2 ++ sysdeps/m68k/fpu/s_sin.c | 2 ++ sysdeps/m68k/fpu/s_sinf.c | 2 ++ sysdeps/m68k/fpu/s_tan.c | 2 ++ sysdeps/m68k/fpu/s_tanf.c | 2 ++ sysdeps/m68k/fpu/s_tanh.c | 2 ++ sysdeps/m68k/fpu/s_tanhf.c | 2 ++ 74 files changed, 776 insertions(+) create mode 100644 sysdeps/m68k/fpu/e_acos.c create mode 100644 sysdeps/m68k/fpu/e_acosf.c create mode 100644 sysdeps/m68k/fpu/e_asin.c create mode 100644 sysdeps/m68k/fpu/e_asinf.c create mode 100644 sysdeps/m68k/fpu/e_atanh.c create mode 100644 sysdeps/m68k/fpu/e_atanhf.c create mode 100644 sysdeps/m68k/fpu/e_cosh.c create mode 100644 sysdeps/m68k/fpu/e_coshf.c create mode 100644 sysdeps/m68k/fpu/e_exp.c create mode 100644 sysdeps/m68k/fpu/e_expf.c create mode 100644 sysdeps/m68k/fpu/e_fmod.c create mode 100644 sysdeps/m68k/fpu/e_fmodf.c create mode 100644 sysdeps/m68k/fpu/e_log.c create mode 100644 sysdeps/m68k/fpu/e_log10.c create mode 100644 sysdeps/m68k/fpu/e_log10f.c create mode 100644 sysdeps/m68k/fpu/e_logf.c create mode 100644 sysdeps/m68k/fpu/e_pow.c create mode 100644 sysdeps/m68k/fpu/e_powf.c create mode 100644 sysdeps/m68k/fpu/e_remainder.c create mode 100644 sysdeps/m68k/fpu/e_remainderf.c create mode 100644 sysdeps/m68k/fpu/e_scalb.c create mode 100644 sysdeps/m68k/fpu/e_scalbf.c create mode 100644 sysdeps/m68k/fpu/e_sinh.c create mode 100644 sysdeps/m68k/fpu/e_sinhf.c create mode 100644 sysdeps/m68k/fpu/e_sqrt.c create mode 100644 sysdeps/m68k/fpu/e_sqrtf.c create mode 100644 sysdeps/m68k/fpu/k_cos.c create mode 100644 sysdeps/m68k/fpu/k_cosf.c create mode 100644 sysdeps/m68k/fpu/k_sin.c create mode 100644 sysdeps/m68k/fpu/k_sinf.c create mode 100644 sysdeps/m68k/fpu/k_tan.c create mode 100644 sysdeps/m68k/fpu/k_tanf.c create mode 100644 sysdeps/m68k/fpu/s_atan.c create mode 100644 sysdeps/m68k/fpu/s_atanf.c create mode 100644 sysdeps/m68k/fpu/s_ceil.c create mode 100644 sysdeps/m68k/fpu/s_ceilf.c create mode 100644 sysdeps/m68k/fpu/s_cos.c create mode 100644 sysdeps/m68k/fpu/s_cosf.c create mode 100644 sysdeps/m68k/fpu/s_expm1.c create mode 100644 sysdeps/m68k/fpu/s_expm1f.c create mode 100644 sysdeps/m68k/fpu/s_fabs.c create mode 100644 sysdeps/m68k/fpu/s_fabsf.c create mode 100644 sysdeps/m68k/fpu/s_finite.c create mode 100644 sysdeps/m68k/fpu/s_finitef.c create mode 100644 sysdeps/m68k/fpu/s_floor.c create mode 100644 sysdeps/m68k/fpu/s_floorf.c create mode 100644 sysdeps/m68k/fpu/s_frexp.c create mode 100644 sysdeps/m68k/fpu/s_frexpf.c create mode 100644 sysdeps/m68k/fpu/s_ilogb.c create mode 100644 sysdeps/m68k/fpu/s_ilogbf.c create mode 100644 sysdeps/m68k/fpu/s_isinf.c create mode 100644 sysdeps/m68k/fpu/s_isinff.c create mode 100644 sysdeps/m68k/fpu/s_isnan.c create mode 100644 sysdeps/m68k/fpu/s_isnanf.c create mode 100644 sysdeps/m68k/fpu/s_ldexp.c create mode 100644 sysdeps/m68k/fpu/s_ldexpf.c create mode 100644 sysdeps/m68k/fpu/s_log1p.c create mode 100644 sysdeps/m68k/fpu/s_log1pf.c create mode 100644 sysdeps/m68k/fpu/s_logb.c create mode 100644 sysdeps/m68k/fpu/s_logbf.c create mode 100644 sysdeps/m68k/fpu/s_modf.c create mode 100644 sysdeps/m68k/fpu/s_modff.c create mode 100644 sysdeps/m68k/fpu/s_rint.c create mode 100644 sysdeps/m68k/fpu/s_rintf.c create mode 100644 sysdeps/m68k/fpu/s_scalbn.c create mode 100644 sysdeps/m68k/fpu/s_scalbnf.c create mode 100644 sysdeps/m68k/fpu/s_significand.c create mode 100644 sysdeps/m68k/fpu/s_significandf.c create mode 100644 sysdeps/m68k/fpu/s_sin.c create mode 100644 sysdeps/m68k/fpu/s_sinf.c create mode 100644 sysdeps/m68k/fpu/s_tan.c create mode 100644 sysdeps/m68k/fpu/s_tanf.c create mode 100644 sysdeps/m68k/fpu/s_tanh.c create mode 100644 sysdeps/m68k/fpu/s_tanhf.c diff --git a/sysdeps/m68k/fpu/e_acos.c b/sysdeps/m68k/fpu/e_acos.c new file mode 100644 index 0000000000..1a29222997 --- /dev/null +++ b/sysdeps/m68k/fpu/e_acos.c @@ -0,0 +1,31 @@ +/* Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#define __NO_MATH_INLINES +#include + +#ifndef FUNC +#define FUNC __ieee754_acos +#endif + +double +DEFUN(FUNC, (x), double x) +{ + return __m81_u(FUNC)(x); +} diff --git a/sysdeps/m68k/fpu/e_acosf.c b/sysdeps/m68k/fpu/e_acosf.c new file mode 100644 index 0000000000..51968156f5 --- /dev/null +++ b/sysdeps/m68k/fpu/e_acosf.c @@ -0,0 +1,31 @@ +/* Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#define __NO_MATH_INLINES +#include + +#ifndef FUNC +#define FUNC __ieee754_acosf +#endif + +float +DEFUN(FUNC, (x), float x) +{ + return __m81_u(FUNC)(x); +} diff --git a/sysdeps/m68k/fpu/e_asin.c b/sysdeps/m68k/fpu/e_asin.c new file mode 100644 index 0000000000..b6176c708a --- /dev/null +++ b/sysdeps/m68k/fpu/e_asin.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_asin +#include diff --git a/sysdeps/m68k/fpu/e_asinf.c b/sysdeps/m68k/fpu/e_asinf.c new file mode 100644 index 0000000000..05fb82670b --- /dev/null +++ b/sysdeps/m68k/fpu/e_asinf.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_asinf +#include diff --git a/sysdeps/m68k/fpu/e_atanh.c b/sysdeps/m68k/fpu/e_atanh.c new file mode 100644 index 0000000000..11bf430686 --- /dev/null +++ b/sysdeps/m68k/fpu/e_atanh.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_atanh +#include diff --git a/sysdeps/m68k/fpu/e_atanhf.c b/sysdeps/m68k/fpu/e_atanhf.c new file mode 100644 index 0000000000..7a8f92ecf3 --- /dev/null +++ b/sysdeps/m68k/fpu/e_atanhf.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_atanhf +#include diff --git a/sysdeps/m68k/fpu/e_cosh.c b/sysdeps/m68k/fpu/e_cosh.c new file mode 100644 index 0000000000..93d753c519 --- /dev/null +++ b/sysdeps/m68k/fpu/e_cosh.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_cosh +#include diff --git a/sysdeps/m68k/fpu/e_coshf.c b/sysdeps/m68k/fpu/e_coshf.c new file mode 100644 index 0000000000..433faf17b9 --- /dev/null +++ b/sysdeps/m68k/fpu/e_coshf.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_coshf +#include diff --git a/sysdeps/m68k/fpu/e_exp.c b/sysdeps/m68k/fpu/e_exp.c new file mode 100644 index 0000000000..1e95ac474d --- /dev/null +++ b/sysdeps/m68k/fpu/e_exp.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_exp +#include diff --git a/sysdeps/m68k/fpu/e_expf.c b/sysdeps/m68k/fpu/e_expf.c new file mode 100644 index 0000000000..2aeaacfab9 --- /dev/null +++ b/sysdeps/m68k/fpu/e_expf.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_expf +#include diff --git a/sysdeps/m68k/fpu/e_fmod.c b/sysdeps/m68k/fpu/e_fmod.c new file mode 100644 index 0000000000..310b1c41fa --- /dev/null +++ b/sysdeps/m68k/fpu/e_fmod.c @@ -0,0 +1,31 @@ +/* Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#define __NO_MATH_INLINES +#include + +#ifndef FUNC +#define FUNC __ieee754_fmod +#endif + +double +DEFUN(FUNC, (x, y), double x AND double y) +{ + return __m81_u(FUNC)(x, y); +} diff --git a/sysdeps/m68k/fpu/e_fmodf.c b/sysdeps/m68k/fpu/e_fmodf.c new file mode 100644 index 0000000000..1a74c3611b --- /dev/null +++ b/sysdeps/m68k/fpu/e_fmodf.c @@ -0,0 +1,31 @@ +/* Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#define __NO_MATH_INLINES +#include + +#ifndef FUNC +#define FUNC __ieee754_fmodf +#endif + +float +DEFUN(FUNC, (x, y), float x AND float y) +{ + return __m81_u(FUNC)(x, y); +} diff --git a/sysdeps/m68k/fpu/e_log.c b/sysdeps/m68k/fpu/e_log.c new file mode 100644 index 0000000000..146dc0c784 --- /dev/null +++ b/sysdeps/m68k/fpu/e_log.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_log +#include diff --git a/sysdeps/m68k/fpu/e_log10.c b/sysdeps/m68k/fpu/e_log10.c new file mode 100644 index 0000000000..06a9b87cb9 --- /dev/null +++ b/sysdeps/m68k/fpu/e_log10.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_log10 +#include diff --git a/sysdeps/m68k/fpu/e_log10f.c b/sysdeps/m68k/fpu/e_log10f.c new file mode 100644 index 0000000000..3896864ecb --- /dev/null +++ b/sysdeps/m68k/fpu/e_log10f.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_log10f +#include diff --git a/sysdeps/m68k/fpu/e_logf.c b/sysdeps/m68k/fpu/e_logf.c new file mode 100644 index 0000000000..bc23217c38 --- /dev/null +++ b/sysdeps/m68k/fpu/e_logf.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_logf +#include diff --git a/sysdeps/m68k/fpu/e_pow.c b/sysdeps/m68k/fpu/e_pow.c new file mode 100644 index 0000000000..29798a15ca --- /dev/null +++ b/sysdeps/m68k/fpu/e_pow.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_pow +#include diff --git a/sysdeps/m68k/fpu/e_powf.c b/sysdeps/m68k/fpu/e_powf.c new file mode 100644 index 0000000000..978d32eacc --- /dev/null +++ b/sysdeps/m68k/fpu/e_powf.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_powf +#include diff --git a/sysdeps/m68k/fpu/e_remainder.c b/sysdeps/m68k/fpu/e_remainder.c new file mode 100644 index 0000000000..aa31bc011e --- /dev/null +++ b/sysdeps/m68k/fpu/e_remainder.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_remainder +#include diff --git a/sysdeps/m68k/fpu/e_remainderf.c b/sysdeps/m68k/fpu/e_remainderf.c new file mode 100644 index 0000000000..b04f0c87c2 --- /dev/null +++ b/sysdeps/m68k/fpu/e_remainderf.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_remainderf +#include diff --git a/sysdeps/m68k/fpu/e_scalb.c b/sysdeps/m68k/fpu/e_scalb.c new file mode 100644 index 0000000000..51d9beefa6 --- /dev/null +++ b/sysdeps/m68k/fpu/e_scalb.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_scalb +#include diff --git a/sysdeps/m68k/fpu/e_scalbf.c b/sysdeps/m68k/fpu/e_scalbf.c new file mode 100644 index 0000000000..1d2beae9ee --- /dev/null +++ b/sysdeps/m68k/fpu/e_scalbf.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_scalbf +#include diff --git a/sysdeps/m68k/fpu/e_sinh.c b/sysdeps/m68k/fpu/e_sinh.c new file mode 100644 index 0000000000..c6fed7ff46 --- /dev/null +++ b/sysdeps/m68k/fpu/e_sinh.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_sinh +#include diff --git a/sysdeps/m68k/fpu/e_sinhf.c b/sysdeps/m68k/fpu/e_sinhf.c new file mode 100644 index 0000000000..b5034b7b0e --- /dev/null +++ b/sysdeps/m68k/fpu/e_sinhf.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_sinhf +#include diff --git a/sysdeps/m68k/fpu/e_sqrt.c b/sysdeps/m68k/fpu/e_sqrt.c new file mode 100644 index 0000000000..70f19710cc --- /dev/null +++ b/sysdeps/m68k/fpu/e_sqrt.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_sqrt +#include diff --git a/sysdeps/m68k/fpu/e_sqrtf.c b/sysdeps/m68k/fpu/e_sqrtf.c new file mode 100644 index 0000000000..5dc1904cb6 --- /dev/null +++ b/sysdeps/m68k/fpu/e_sqrtf.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_sqrtf +#include diff --git a/sysdeps/m68k/fpu/k_cos.c b/sysdeps/m68k/fpu/k_cos.c new file mode 100644 index 0000000000..1f508b4f40 --- /dev/null +++ b/sysdeps/m68k/fpu/k_cos.c @@ -0,0 +1,26 @@ +/* Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include + +double +DEFUN(__kernel_cos, (x, y), double x AND double y) +{ + return __cos (x + y); +} diff --git a/sysdeps/m68k/fpu/k_cosf.c b/sysdeps/m68k/fpu/k_cosf.c new file mode 100644 index 0000000000..a6f0a26645 --- /dev/null +++ b/sysdeps/m68k/fpu/k_cosf.c @@ -0,0 +1,26 @@ +/* Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include + +float +DEFUN(__kernel_cosf, (x, y), float x AND float y) +{ + return __cosf (x + y); +} diff --git a/sysdeps/m68k/fpu/k_sin.c b/sysdeps/m68k/fpu/k_sin.c new file mode 100644 index 0000000000..10cfbb4400 --- /dev/null +++ b/sysdeps/m68k/fpu/k_sin.c @@ -0,0 +1,26 @@ +/* Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include + +double +DEFUN(__kernel_sin, (x, y, iy), double x AND double y AND int iy) +{ + return __sin (x + y); +} diff --git a/sysdeps/m68k/fpu/k_sinf.c b/sysdeps/m68k/fpu/k_sinf.c new file mode 100644 index 0000000000..245e86bd44 --- /dev/null +++ b/sysdeps/m68k/fpu/k_sinf.c @@ -0,0 +1,26 @@ +/* Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include + +float +DEFUN(__kernel_sinf, (x, y, iy), float x AND float y AND int iy) +{ + return __sinf (x + y); +} diff --git a/sysdeps/m68k/fpu/k_tan.c b/sysdeps/m68k/fpu/k_tan.c new file mode 100644 index 0000000000..b18c9afbd8 --- /dev/null +++ b/sysdeps/m68k/fpu/k_tan.c @@ -0,0 +1,29 @@ +/* Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include + +double +DEFUN(__kernel_tan, (x, y, iy), double x AND double y AND int iy) +{ + if (iy == 1) + return __tan (x + y); + else + return -1.0 / __tan (x + y); +} diff --git a/sysdeps/m68k/fpu/k_tanf.c b/sysdeps/m68k/fpu/k_tanf.c new file mode 100644 index 0000000000..027a74a525 --- /dev/null +++ b/sysdeps/m68k/fpu/k_tanf.c @@ -0,0 +1,29 @@ +/* Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include + +float +DEFUN(__kernel_tanf, (x, y, iy), float x AND float y AND int iy) +{ + if (iy == 1) + return __tanf (x + y); + else + return -1.0 / __tanf (x + y); +} diff --git a/sysdeps/m68k/fpu/s_atan.c b/sysdeps/m68k/fpu/s_atan.c new file mode 100644 index 0000000000..f1cc9757b5 --- /dev/null +++ b/sysdeps/m68k/fpu/s_atan.c @@ -0,0 +1,36 @@ +/* Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#define __NO_MATH_INLINES +#include + +#ifndef FUNC +#define FUNC atan +#endif + +#define __CONCATX(a,b) __CONCAT(a,b) + +double +DEFUN(__CONCATX(__,FUNC), (x), double x) +{ + return __m81_u(__CONCATX(__,FUNC))(x); +} + +#define weak_aliasx(a,b) weak_alias(a,b) +weak_aliasx (__CONCATX(__,FUNC), FUNC) diff --git a/sysdeps/m68k/fpu/s_atanf.c b/sysdeps/m68k/fpu/s_atanf.c new file mode 100644 index 0000000000..5d1f337bee --- /dev/null +++ b/sysdeps/m68k/fpu/s_atanf.c @@ -0,0 +1,36 @@ +/* Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#define __NO_MATH_INLINES +#include + +#ifndef FUNC +#define FUNC atanf +#endif + +#define __CONCATX(a,b) __CONCAT(a,b) + +float +DEFUN(__CONCATX(__,FUNC), (x), float x) +{ + return __m81_u(__CONCATX(__,FUNC))(x); +} + +#define weak_aliasx(a,b) weak_alias(a,b) +weak_aliasx (__CONCATX(__,FUNC), FUNC) diff --git a/sysdeps/m68k/fpu/s_ceil.c b/sysdeps/m68k/fpu/s_ceil.c new file mode 100644 index 0000000000..93d5ad72e5 --- /dev/null +++ b/sysdeps/m68k/fpu/s_ceil.c @@ -0,0 +1,2 @@ +#define FUNC ceil +#include diff --git a/sysdeps/m68k/fpu/s_ceilf.c b/sysdeps/m68k/fpu/s_ceilf.c new file mode 100644 index 0000000000..b3ba6a5700 --- /dev/null +++ b/sysdeps/m68k/fpu/s_ceilf.c @@ -0,0 +1,2 @@ +#define FUNC ceilf +#include diff --git a/sysdeps/m68k/fpu/s_cos.c b/sysdeps/m68k/fpu/s_cos.c new file mode 100644 index 0000000000..9c96076316 --- /dev/null +++ b/sysdeps/m68k/fpu/s_cos.c @@ -0,0 +1,2 @@ +#define FUNC cos +#include diff --git a/sysdeps/m68k/fpu/s_cosf.c b/sysdeps/m68k/fpu/s_cosf.c new file mode 100644 index 0000000000..db965b8cc1 --- /dev/null +++ b/sysdeps/m68k/fpu/s_cosf.c @@ -0,0 +1,2 @@ +#define FUNC cosf +#include diff --git a/sysdeps/m68k/fpu/s_expm1.c b/sysdeps/m68k/fpu/s_expm1.c new file mode 100644 index 0000000000..1ef99e21c9 --- /dev/null +++ b/sysdeps/m68k/fpu/s_expm1.c @@ -0,0 +1,2 @@ +#define FUNC expm1 +#include diff --git a/sysdeps/m68k/fpu/s_expm1f.c b/sysdeps/m68k/fpu/s_expm1f.c new file mode 100644 index 0000000000..84935b1b4a --- /dev/null +++ b/sysdeps/m68k/fpu/s_expm1f.c @@ -0,0 +1,2 @@ +#define FUNC expm1f +#include diff --git a/sysdeps/m68k/fpu/s_fabs.c b/sysdeps/m68k/fpu/s_fabs.c new file mode 100644 index 0000000000..1f0631e2ff --- /dev/null +++ b/sysdeps/m68k/fpu/s_fabs.c @@ -0,0 +1,2 @@ +#define FUNC fabs +#include diff --git a/sysdeps/m68k/fpu/s_fabsf.c b/sysdeps/m68k/fpu/s_fabsf.c new file mode 100644 index 0000000000..8f9421998a --- /dev/null +++ b/sysdeps/m68k/fpu/s_fabsf.c @@ -0,0 +1,2 @@ +#define FUNC fabsf +#include diff --git a/sysdeps/m68k/fpu/s_finite.c b/sysdeps/m68k/fpu/s_finite.c new file mode 100644 index 0000000000..dafbd5901d --- /dev/null +++ b/sysdeps/m68k/fpu/s_finite.c @@ -0,0 +1,2 @@ +#define FUNC finite +#include diff --git a/sysdeps/m68k/fpu/s_finitef.c b/sysdeps/m68k/fpu/s_finitef.c new file mode 100644 index 0000000000..b81342e5c6 --- /dev/null +++ b/sysdeps/m68k/fpu/s_finitef.c @@ -0,0 +1,2 @@ +#define FUNC finitef +#include diff --git a/sysdeps/m68k/fpu/s_floor.c b/sysdeps/m68k/fpu/s_floor.c new file mode 100644 index 0000000000..e1219c602a --- /dev/null +++ b/sysdeps/m68k/fpu/s_floor.c @@ -0,0 +1,2 @@ +#define FUNC floor +#include diff --git a/sysdeps/m68k/fpu/s_floorf.c b/sysdeps/m68k/fpu/s_floorf.c new file mode 100644 index 0000000000..f4f9b9a1d8 --- /dev/null +++ b/sysdeps/m68k/fpu/s_floorf.c @@ -0,0 +1,2 @@ +#define FUNC floorf +#include diff --git a/sysdeps/m68k/fpu/s_frexp.c b/sysdeps/m68k/fpu/s_frexp.c new file mode 100644 index 0000000000..b24af74956 --- /dev/null +++ b/sysdeps/m68k/fpu/s_frexp.c @@ -0,0 +1,28 @@ +/* Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#define __NO_MATH_INLINES +#include + +double +DEFUN(__frexp, (value, expptr), double value AND int *expptr) +{ + return __m81_u(__frexp)(value, expptr); +} +weak_alias (__frexp, frexp) diff --git a/sysdeps/m68k/fpu/s_frexpf.c b/sysdeps/m68k/fpu/s_frexpf.c new file mode 100644 index 0000000000..c7cd98a684 --- /dev/null +++ b/sysdeps/m68k/fpu/s_frexpf.c @@ -0,0 +1,28 @@ +/* Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#define __NO_MATH_INLINES +#include + +float +DEFUN(__frexpf, (value, expptr), float value AND int *expptr) +{ + return __m81_u(__frexpf)(value, expptr); +} +weak_alias (__frexpf, frexpf) diff --git a/sysdeps/m68k/fpu/s_ilogb.c b/sysdeps/m68k/fpu/s_ilogb.c new file mode 100644 index 0000000000..2df00a656a --- /dev/null +++ b/sysdeps/m68k/fpu/s_ilogb.c @@ -0,0 +1,29 @@ +/* Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#define __NO_MATH_INLINES +#include + +int +DEFUN(__ilogb, (x), double x) +{ + return __m81_u(__ilogb)(x); +} + +weak_alias (__ilogb, ilogb) diff --git a/sysdeps/m68k/fpu/s_ilogbf.c b/sysdeps/m68k/fpu/s_ilogbf.c new file mode 100644 index 0000000000..05f1546a96 --- /dev/null +++ b/sysdeps/m68k/fpu/s_ilogbf.c @@ -0,0 +1,29 @@ +/* Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#define __NO_MATH_INLINES +#include + +int +DEFUN(__ilogbf, (x), float x) +{ + return __m81_u(__ilogbf)(x); +} + +weak_alias (__ilogbf, ilogbf) diff --git a/sysdeps/m68k/fpu/s_isinf.c b/sysdeps/m68k/fpu/s_isinf.c new file mode 100644 index 0000000000..96745337c9 --- /dev/null +++ b/sysdeps/m68k/fpu/s_isinf.c @@ -0,0 +1,36 @@ +/* Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#define __NO_MATH_INLINES +#include + +#ifndef FUNC +#define FUNC isinf +#endif + +#define __CONCATX(a,b) __CONCAT(a,b) + +int +DEFUN(__CONCATX(__,FUNC), (x), double x) +{ + return __m81_u(__CONCATX(__,FUNC))(x); +} + +#define weak_aliasx(a,b) weak_alias(a,b) +weak_aliasx (__CONCATX(__,FUNC), FUNC) diff --git a/sysdeps/m68k/fpu/s_isinff.c b/sysdeps/m68k/fpu/s_isinff.c new file mode 100644 index 0000000000..d9101a9fd9 --- /dev/null +++ b/sysdeps/m68k/fpu/s_isinff.c @@ -0,0 +1,36 @@ +/* Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#define __NO_MATH_INLINES +#include + +#ifndef FUNC +#define FUNC isinff +#endif + +#define __CONCATX(a,b) __CONCAT(a,b) + +int +DEFUN(__CONCATX(__,FUNC), (x), float x) +{ + return __m81_u(__CONCATX(__,FUNC))(x); +} + +#define weak_aliasx(a,b) weak_alias(a,b) +weak_aliasx (__CONCATX(__,FUNC), FUNC) diff --git a/sysdeps/m68k/fpu/s_isnan.c b/sysdeps/m68k/fpu/s_isnan.c new file mode 100644 index 0000000000..151d6dc6b4 --- /dev/null +++ b/sysdeps/m68k/fpu/s_isnan.c @@ -0,0 +1,2 @@ +#define FUNC isnan +#include diff --git a/sysdeps/m68k/fpu/s_isnanf.c b/sysdeps/m68k/fpu/s_isnanf.c new file mode 100644 index 0000000000..667bca7235 --- /dev/null +++ b/sysdeps/m68k/fpu/s_isnanf.c @@ -0,0 +1,2 @@ +#define FUNC isnanf +#include diff --git a/sysdeps/m68k/fpu/s_ldexp.c b/sysdeps/m68k/fpu/s_ldexp.c new file mode 100644 index 0000000000..ee7662e7d2 --- /dev/null +++ b/sysdeps/m68k/fpu/s_ldexp.c @@ -0,0 +1,36 @@ +/* Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#define __NO_MATH_INLINES +#include + +#ifndef FUNC +#define FUNC ldexp +#endif + +#define __CONCATX(a,b) __CONCAT(a,b) + +double +DEFUN(__CONCATX(__,FUNC), (x, exp), double x AND int exp) +{ + return __m81_u(__CONCATX(__,FUNC))(x, exp); +} + +#define weak_aliasx(a,b) weak_alias(a,b) +weak_aliasx (__CONCATX(__,FUNC), FUNC) diff --git a/sysdeps/m68k/fpu/s_ldexpf.c b/sysdeps/m68k/fpu/s_ldexpf.c new file mode 100644 index 0000000000..a9741732a6 --- /dev/null +++ b/sysdeps/m68k/fpu/s_ldexpf.c @@ -0,0 +1,36 @@ +/* Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#define __NO_MATH_INLINES +#include + +#ifndef FUNC +#define FUNC ldexpf +#endif + +#define __CONCATX(a,b) __CONCAT(a,b) + +float +DEFUN(__CONCATX(__,FUNC), (x, exp), float x AND int exp) +{ + return __m81_u(__CONCATX(__,FUNC))(x, exp); +} + +#define weak_aliasx(a,b) weak_alias(a,b) +weak_aliasx (__CONCATX(__,FUNC), FUNC) diff --git a/sysdeps/m68k/fpu/s_log1p.c b/sysdeps/m68k/fpu/s_log1p.c new file mode 100644 index 0000000000..1840ced137 --- /dev/null +++ b/sysdeps/m68k/fpu/s_log1p.c @@ -0,0 +1,2 @@ +#define FUNC log1p +#include diff --git a/sysdeps/m68k/fpu/s_log1pf.c b/sysdeps/m68k/fpu/s_log1pf.c new file mode 100644 index 0000000000..cb7235a071 --- /dev/null +++ b/sysdeps/m68k/fpu/s_log1pf.c @@ -0,0 +1,2 @@ +#define FUNC log1pf +#include diff --git a/sysdeps/m68k/fpu/s_logb.c b/sysdeps/m68k/fpu/s_logb.c new file mode 100644 index 0000000000..9903b3089a --- /dev/null +++ b/sysdeps/m68k/fpu/s_logb.c @@ -0,0 +1,2 @@ +#define FUNC logb +#include diff --git a/sysdeps/m68k/fpu/s_logbf.c b/sysdeps/m68k/fpu/s_logbf.c new file mode 100644 index 0000000000..6dcfee5807 --- /dev/null +++ b/sysdeps/m68k/fpu/s_logbf.c @@ -0,0 +1,2 @@ +#define FUNC logbf +#include diff --git a/sysdeps/m68k/fpu/s_modf.c b/sysdeps/m68k/fpu/s_modf.c new file mode 100644 index 0000000000..355df2fb19 --- /dev/null +++ b/sysdeps/m68k/fpu/s_modf.c @@ -0,0 +1,28 @@ +/* Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#define __NO_MATH_INLINES +#include + +double +DEFUN(__modf, (x, exp), double x AND double *iptr) +{ + return __m81_u(__modf)(x, iptr); +} +weak_alias(__modf, modf) diff --git a/sysdeps/m68k/fpu/s_modff.c b/sysdeps/m68k/fpu/s_modff.c new file mode 100644 index 0000000000..f56bcb45ef --- /dev/null +++ b/sysdeps/m68k/fpu/s_modff.c @@ -0,0 +1,28 @@ +/* Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#define __NO_MATH_INLINES +#include + +float +DEFUN(__modff, (x, exp), float x AND float *iptr) +{ + return __m81_u(__modff)(x, iptr); +} +weak_alias(__modff, modff) diff --git a/sysdeps/m68k/fpu/s_rint.c b/sysdeps/m68k/fpu/s_rint.c new file mode 100644 index 0000000000..f0f18c7346 --- /dev/null +++ b/sysdeps/m68k/fpu/s_rint.c @@ -0,0 +1,2 @@ +#define FUNC rint +#include diff --git a/sysdeps/m68k/fpu/s_rintf.c b/sysdeps/m68k/fpu/s_rintf.c new file mode 100644 index 0000000000..4e00cab0fb --- /dev/null +++ b/sysdeps/m68k/fpu/s_rintf.c @@ -0,0 +1,2 @@ +#define FUNC rintf +#include diff --git a/sysdeps/m68k/fpu/s_scalbn.c b/sysdeps/m68k/fpu/s_scalbn.c new file mode 100644 index 0000000000..433aa757d2 --- /dev/null +++ b/sysdeps/m68k/fpu/s_scalbn.c @@ -0,0 +1,2 @@ +#define FUNC scalbn +#include diff --git a/sysdeps/m68k/fpu/s_scalbnf.c b/sysdeps/m68k/fpu/s_scalbnf.c new file mode 100644 index 0000000000..00461dc30c --- /dev/null +++ b/sysdeps/m68k/fpu/s_scalbnf.c @@ -0,0 +1,2 @@ +#define FUNC scalbnf +#include diff --git a/sysdeps/m68k/fpu/s_significand.c b/sysdeps/m68k/fpu/s_significand.c new file mode 100644 index 0000000000..34d4ea3d14 --- /dev/null +++ b/sysdeps/m68k/fpu/s_significand.c @@ -0,0 +1,2 @@ +#define FUNC significand +#include diff --git a/sysdeps/m68k/fpu/s_significandf.c b/sysdeps/m68k/fpu/s_significandf.c new file mode 100644 index 0000000000..4e769ca317 --- /dev/null +++ b/sysdeps/m68k/fpu/s_significandf.c @@ -0,0 +1,2 @@ +#define FUNC significandf +#include diff --git a/sysdeps/m68k/fpu/s_sin.c b/sysdeps/m68k/fpu/s_sin.c new file mode 100644 index 0000000000..0d4abdbfe4 --- /dev/null +++ b/sysdeps/m68k/fpu/s_sin.c @@ -0,0 +1,2 @@ +#define FUNC sin +#include diff --git a/sysdeps/m68k/fpu/s_sinf.c b/sysdeps/m68k/fpu/s_sinf.c new file mode 100644 index 0000000000..9b23d4823f --- /dev/null +++ b/sysdeps/m68k/fpu/s_sinf.c @@ -0,0 +1,2 @@ +#define FUNC sinf +#include diff --git a/sysdeps/m68k/fpu/s_tan.c b/sysdeps/m68k/fpu/s_tan.c new file mode 100644 index 0000000000..ca7fb0e6dc --- /dev/null +++ b/sysdeps/m68k/fpu/s_tan.c @@ -0,0 +1,2 @@ +#define FUNC tan +#include diff --git a/sysdeps/m68k/fpu/s_tanf.c b/sysdeps/m68k/fpu/s_tanf.c new file mode 100644 index 0000000000..95fe9c71a5 --- /dev/null +++ b/sysdeps/m68k/fpu/s_tanf.c @@ -0,0 +1,2 @@ +#define FUNC tanf +#include diff --git a/sysdeps/m68k/fpu/s_tanh.c b/sysdeps/m68k/fpu/s_tanh.c new file mode 100644 index 0000000000..ac2e7dbb79 --- /dev/null +++ b/sysdeps/m68k/fpu/s_tanh.c @@ -0,0 +1,2 @@ +#define FUNC tanh +#include diff --git a/sysdeps/m68k/fpu/s_tanhf.c b/sysdeps/m68k/fpu/s_tanhf.c new file mode 100644 index 0000000000..1addaae4ff --- /dev/null +++ b/sysdeps/m68k/fpu/s_tanhf.c @@ -0,0 +1,2 @@ +#define FUNC tanhf +#include From 6e5a98bc449febc82dc3ce004fb775f1cb7551ad Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 17 Mar 1996 01:58:01 +0000 Subject: [PATCH 0611/4487] Sat Mar 16 20:08:22 1996 David Mosberger-Tang * sysdeps/alpha/memchr.S: new file. * sysdeps/alpha/memchr.c: obsolete file removed. --- sysdeps/alpha/memchr.S | 163 +++++++++++++++++++++++++++++++++++++++++ sysdeps/alpha/memchr.c | 86 ---------------------- 2 files changed, 163 insertions(+), 86 deletions(-) create mode 100644 sysdeps/alpha/memchr.S delete mode 100644 sysdeps/alpha/memchr.c diff --git a/sysdeps/alpha/memchr.S b/sysdeps/alpha/memchr.S new file mode 100644 index 0000000000..118a1f13d1 --- /dev/null +++ b/sysdeps/alpha/memchr.S @@ -0,0 +1,163 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. + Contributed by David Mosberger (davidm@cs.arizona.edu). + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Finds characters in a memory area. Optimized for the Alpha +architecture: + + - memory accessed as aligned quadwords only + - uses cmpbge to compare 8 bytes in parallel + - does binary search to find 0 byte in last + quadword (HAKMEM needed 12 instructions to + do this instead of the 9 instructions that + binary search needs). + +For correctness consider that: + + - only minimum number of quadwords may be accessed + - the third argument is an unsigned long +*/ + +#include +#ifdef __linux__ +# include +#else +#include +#endif + + .set noreorder + .set noat + +ENTRY(memchr) + beq a2, not_found + ldq_u t0, 0(a0) # load first quadword (a0 may be misaligned) + addq a0, a2, t4 + and a1, 0xff, a1 # a1 = 00000000000000ch + ldq_u t5, -1(t4) + sll a1, 8, t1 # t1 = 000000000000ch00 + cmpult a2, 9, t3 + or t1, a1, a1 # a1 = 000000000000chch + sll a1, 16, t1 # t1 = 00000000chch0000 + lda t2, -1(zero) + or t1, a1, a1 # a1 = 00000000chchchch + sll a1, 32, t1 # t1 = chchchch00000000 + extql t0, a0, t6 + or t1, a1, a1 # a1 = chchchchchchchch + + beq t3, first_quad + + extqh t5, a0, t5 + mov a0, v0 + or t6, t5, t0 # t0 = quadword starting at a0 + + # + # Deal with the case where at most 8 bytes remain to be searched + # in t0. E.g.: + # a2 = 6 + # t0 = ????c6c5c4c3c2c1 +last_quad: + negq a2, t5 + srl t2, t5, t5 # t5 = mask of a2 bits set + xor a1, t0, t0 + cmpbge zero, t0, t1 + and t1, t5, t1 + beq t1, not_found + +found_it: + # now, determine which byte matched: + negq t1, t2 + and t1, t2, t1 + + and t1, 0x0f, t0 + addq v0, 4, t2 + cmoveq t0, t2, v0 + + and t1, 0x33, t0 + addq v0, 2, t2 + cmoveq t0, t2, v0 + + and t1, 0x55, t0 + addq v0, 1, t2 + cmoveq t0, t2, v0 + +done: ret + + + # + # Deal with the case where a2 > 8 bytes remain to be + # searched. a0 may not be aligned. + # +first_quad: + andnot a0, 0x7, v0 + insqh t2, a0, t1 # t1 = 0000ffffffffffff (a0<0:2> ff bytes) + xor t0, a1, t0 + or t0, t1, t0 # t0 = ====ffffffffffff + cmpbge zero, t0, t1 + bne t1, found_it + + /* at least one byte left to process */ + + ldq t0, 8(v0) + addq v0, 8, v0 + /* + * Make a2 point to last quad to be accessed (the + * last quad may or may not be partial). + */ + subq t4, 1, a2 + andnot a2, 0x7, a2 + cmpult v0, a2, t1 + beq t1, final + + /* at least two quads remain to be accessed */ + + subq a2, v0, t3 # t3 <- number of quads to be processed in loop + and t3, 8, t3 # odd number of quads? + bne t3, odd_quad_count + + /* at least three quads remain to be accessed */ + + mov t0, t3 # move prefetched value into correct register + + .align 3 +unrolled_loop: + ldq t0, 8(v0) # prefetch t0 + xor a1, t3, t1 + cmpbge zero, t1, t1 + bne t1, found_it + + addq v0, 8, v0 +odd_quad_count: + xor a1, t0, t1 + ldq t3, 8(v0) # prefetch t3 + cmpbge zero, t1, t1 + bne t1, found_it + + addq v0, 8, v0 + cmpult v0, a2, t5 + bne t5, unrolled_loop + + mov t3, t0 # move prefetched value into t0 +final: subq t4, v0, a2 # a2 <- number of bytes left to do + bne a2, last_quad + +not_found: + mov zero, v0 + ret + + .end memchr diff --git a/sysdeps/alpha/memchr.c b/sysdeps/alpha/memchr.c deleted file mode 100644 index a911302ea6..0000000000 --- a/sysdeps/alpha/memchr.c +++ /dev/null @@ -1,86 +0,0 @@ -/* Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. - -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 -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -/* Search no more than N bytes of S for C. */ - -void * -memchr (const void *s, int c, size_t n) -{ - const char *char_ptr; - const unsigned long int *longword_ptr; - unsigned long int charmask; - size_t x; - - c = (unsigned char) c; - - /* Handle the first few characters by reading one character at a time. - Do this until STR is aligned on a 8-byte border. */ - for (char_ptr = s; n > 0 && ((unsigned long int) char_ptr & 7) != 0; - --n, ++char_ptr) - if (*char_ptr == c) - return (void *) char_ptr; - - if (n == (size_t)0) - return NULL; - - x = n; - - longword_ptr = (unsigned long int *) char_ptr; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); - charmask |= charmask << 16; - charmask |= charmask << 32; - - for (;;) - { - const unsigned long int longword = *longword_ptr++; - int ge, le; - - if (x < 4) - x = (size_t) 0; - else - x -= 4; - - /* Set bits in GE if bytes in CHARMASK are >= bytes in LONGWORD. */ - asm ("cmpbge %1, %2, %0" : "=r" (ge) : "r" (charmask), "r" (longword)); - - /* Set bits in LE if bytes in CHARMASK are <= bytes in LONGWORD. */ - asm ("cmpbge %2, %1, %0" : "=r" (le) : "r" (charmask), "r" (longword)); - - /* Bytes that are both <= and >= are == to C. */ - if (ge & le) - { - /* Which of the bytes was the C? */ - - unsigned char *cp = (unsigned char *) (longword_ptr - 1); - int i; - - for (i = 0; i < 7; i++) - if (cp[i] == c) - return &cp[i]; - return &cp[7]; - } - - if (x == (size_t)0) - break; - } - - return NULL; -} From 925c95c502e4a6c01e7d7bba5e75f64209c16b94 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 18 Mar 1996 19:38:16 +0000 Subject: [PATCH 0612/4487] Mon Mar 18 13:20:46 1996 Roland McGrath * posix/unistd.h (setpgrp): Declare no-arg version unless __FAVOR_BSD. * misc/bsd-compat.c (setpgrp): New function, two arg version. * sysdeps/stub/setpgid.c: Remove setpgrp alias. * sysdeps/mach/hurd/setpgid.c: Likewise. * sysdeps/unix/sysv/sysv4/setpgid.c: Likewise. * sysdeps/unix/common/syscalls.list (setpgid): Remove setpgrp alias. * sysdeps/unix/sysv/irix4/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/setpgrp.c: Obsolete file removed. * posix/setpgrp.c (setpgrp): New file. * posix/Makefile (routines): Add setpgrp. --- sysdeps/unix/sysv/irix4/syscalls.list | 2 +- sysdeps/unix/sysv/sysv4/setpgid.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/irix4/syscalls.list b/sysdeps/unix/sysv/irix4/syscalls.list index 47e1c48821..a57529e9ad 100644 --- a/sysdeps/unix/sysv/irix4/syscalls.list +++ b/sysdeps/unix/sysv/irix4/syscalls.list @@ -2,7 +2,7 @@ getpgid - bsdgetpgrp 1 __getpgid getpgid msync - msync 3 msync -setpgid - bsdsetpgrp 2 __setpgid setpgid setpgrp +setpgid - bsdsetpgrp 2 __setpgid setpgid signal - signal 3 __raw_signal sysmp - sysmp 4 __sysmp syssgi - syssgi 2 __syssgi diff --git a/sysdeps/unix/sysv/sysv4/setpgid.c b/sysdeps/unix/sysv/sysv4/setpgid.c index b9e06dc719..743b8ca374 100644 --- a/sysdeps/unix/sysv/sysv4/setpgid.c +++ b/sysdeps/unix/sysv/sysv4/setpgid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1996 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 @@ -32,4 +32,3 @@ DEFUN(__setpgid, (pid, pgid), int pid AND int pgid) } weak_alias (__setpgid, setpgid) -weak_alias (__setpgid, setpgrp) From 6932e4446116214695007f42a3426baf5333bc2f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 19 Mar 1996 19:51:23 +0000 Subject: [PATCH 0613/4487] Wed Feb 14 00:21:17 1996 David Mosberger-Tang * sysdeps/unix/sysv/linux/alpha/Makefile, sysdeps/unix/sysv/linux/alpha/brk.S, sysdeps/unix/sysv/linux/alpha/fpu_control.c, sysdeps/unix/sysv/linux/alpha/fpu_control.h, sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S, sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S, sysdeps/unix/sysv/linux/alpha/pipe.S, sysdeps/unix/sysv/linux/alpha/setfpucw.c, sysdeps/unix/sysv/linux/alpha/sigprocmask.c, sysdeps/unix/sysv/linux/alpha/speed.c, sysdeps/unix/sysv/linux/alpha/start.S, sysdeps/unix/sysv/linux/alpha/syscall.S, sysdeps/unix/sysv/linux/alpha/syscalls.list, sysdeps/unix/sysv/linux/alpha/sysdep.S, sysdeps/unix/sysv/linux/alpha/sysdep.h: New files. --- sysdeps/unix/sysv/linux/alpha/Makefile | 7 ++ sysdeps/unix/sysv/linux/alpha/brk.S | 60 ++++++++++ sysdeps/unix/sysv/linux/alpha/fpu_control.c | 21 ++++ sysdeps/unix/sysv/linux/alpha/fpu_control.h | 105 ++++++++++++++++++ .../sysv/linux/alpha/ieee_get_fp_control.S | 44 ++++++++ .../sysv/linux/alpha/ieee_set_fp_control.S | 44 ++++++++ sysdeps/unix/sysv/linux/alpha/pipe.S | 43 +++++++ sysdeps/unix/sysv/linux/alpha/setfpucw.c | 65 +++++++++++ sysdeps/unix/sysv/linux/alpha/sigprocmask.c | 49 ++++++++ sysdeps/unix/sysv/linux/alpha/speed.c | 102 +++++++++++++++++ sysdeps/unix/sysv/linux/alpha/start.S | 93 ++++++++++++++++ sysdeps/unix/sysv/linux/alpha/syscall.S | 61 ++++++++++ sysdeps/unix/sysv/linux/alpha/sysdep.S | 33 ++++++ sysdeps/unix/sysv/linux/alpha/sysdep.h | 60 ++++++++++ 14 files changed, 787 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/Makefile create mode 100644 sysdeps/unix/sysv/linux/alpha/brk.S create mode 100644 sysdeps/unix/sysv/linux/alpha/fpu_control.c create mode 100644 sysdeps/unix/sysv/linux/alpha/fpu_control.h create mode 100644 sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S create mode 100644 sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S create mode 100644 sysdeps/unix/sysv/linux/alpha/pipe.S create mode 100644 sysdeps/unix/sysv/linux/alpha/setfpucw.c create mode 100644 sysdeps/unix/sysv/linux/alpha/sigprocmask.c create mode 100644 sysdeps/unix/sysv/linux/alpha/speed.c create mode 100644 sysdeps/unix/sysv/linux/alpha/start.S create mode 100644 sysdeps/unix/sysv/linux/alpha/syscall.S create mode 100644 sysdeps/unix/sysv/linux/alpha/sysdep.S create mode 100644 sysdeps/unix/sysv/linux/alpha/sysdep.h diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile new file mode 100644 index 0000000000..9e12a0daa2 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/Makefile @@ -0,0 +1,7 @@ +ifeq ($(subdir), misc) +headers += alpha/regdef.h + +sysdep_routines := $(sysdep_routines) \ + ieee_get_fp_control ieee_set_fp_control fpu_control setfpucw \ + sethae ioperm osf_sigprocmask fstatfs statfs +endif diff --git a/sysdeps/unix/sysv/linux/alpha/brk.S b/sysdeps/unix/sysv/linux/alpha/brk.S new file mode 100644 index 0000000000..afd2e3203c --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/brk.S @@ -0,0 +1,60 @@ +/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* __brk is a special syscall under Linux since it never returns an +error. Instead, the error condition is indicated by returning the old +break value (instead of the new, requested one). */ + +#include +#include + +#ifndef HAVE_GNU_LD +#define _end end +#endif + + .extern _end,8 + + .data + + .globl __curbrk +__curbrk: + .quad _end + + .text +ENTRY(__brk) + ldgp gp, 0(t12) + .prologue 1 + + ldi v0, __NR_brk + call_pal PAL_callsys + subq a0, v0, t0 + bne t0, error + + /* Update __curbrk and return cleanly. */ + stl a0, __curbrk + mov zero, v0 + ret + + /* What a horrible way to die. */ +error: ldi v0, ENOMEM + lda pv, syscall_error + jmp zero,(pv) + + .end __brk + +weak_alias (__brk, brk) diff --git a/sysdeps/unix/sysv/linux/alpha/fpu_control.c b/sysdeps/unix/sysv/linux/alpha/fpu_control.c new file mode 100644 index 0000000000..20c032a03c --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/fpu_control.c @@ -0,0 +1,21 @@ +/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. + Contributed by David Mosberger (davidm@azstarnet.com). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +fpu_control_t __fpu_control = _FPU_DEFAULT; diff --git a/sysdeps/unix/sysv/linux/alpha/fpu_control.h b/sysdeps/unix/sysv/linux/alpha/fpu_control.h new file mode 100644 index 0000000000..782f33e040 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/fpu_control.h @@ -0,0 +1,105 @@ +/* Copyright (C) 1993 Olaf Flebbe +This file is part of the Linux C Library. + +The Linux C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The Linux 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 +Library General Public License for more details. */ + +#ifndef _ALPHA_FPU_CONTROL_H +#define _ALPHA_FPU_CONTROL_H + +/* + * Since many programs seem to hardcode the values passed to __setfpucw() + * (rather than using the manifest constants) we emulate the x87 interface + * here (at least where this makes sense). + * + * 15-13 12 11-10 9-8 7-6 5 4 3 2 1 0 + * | reserved | IC | RC | PC | reserved | PM | UM | OM | ZM | DM | IM + * + * IM: Invalid operation mask + * DM: Denormalized operand mask + * ZM: Zero-divide mask + * OM: Overflow mask + * UM: Underflow mask + * PM: Precision (inexact result) mask + * + * Mask bit is 1 means no interrupt. + * + * PC: Precision control + * 11 - round to extended precision + * 10 - round to double precision + * 00 - round to single precision + * + * RC: Rounding control + * 00 - rounding to nearest + * 01 - rounding down (toward - infinity) + * 10 - rounding up (toward + infinity) + * 11 - rounding toward zero + * + * IC: Infinity control + * That is for 8087 and 80287 only. + * + * The hardware default is 0x037f. I choose 0x1372. + */ + +#include + +/* masking of interrupts */ +#define _FPU_MASK_IM 0x01 +#define _FPU_MASK_DM 0x02 +#define _FPU_MASK_ZM 0x04 +#define _FPU_MASK_OM 0x08 +#define _FPU_MASK_UM 0x10 +#define _FPU_MASK_PM 0x20 + +/* precision control */ +#define _FPU_EXTENDED 0x300 /* RECOMMENDED */ +#define _FPU_DOUBLE 0x200 +#define _FPU_SINGLE 0x0 /* DO NOT USE */ + +/* + * rounding control---notice that on the Alpha this affects only + * instructions with the dynamic rounding mode qualifier (/d). + */ +#define _FPU_RC_NEAREST 0x000 /* RECOMMENDED */ +#define _FPU_RC_DOWN 0x400 +#define _FPU_RC_UP 0x800 +#define _FPU_RC_ZERO 0xC00 + +#define _FPU_RESERVED 0xF0C0 /* Reserved bits in cw */ + + +/* Now two recommended cw */ + +/* Linux default: + - extended precision + - rounding to positive infinity. There is no /p instruction + qualifier. By setting the dynamic rounding mode to +infinity, + one can use /d to get round to +infinity with no extra overhead + (so long as the default isn't changed, of course...) + - exceptions on overflow, zero divide and NaN */ +#define _FPU_DEFAULT 0x1f72 + +/* IEEE: same as above, but exceptions */ +#define _FPU_IEEE 0x1f7f + +/* Type of the control word. */ +typedef unsigned int fpu_control_t; + +/* Default control word set at startup. */ +extern fpu_control_t __fpu_control; + +__BEGIN_DECLS + +/* called by start.o. It can be used to manipulate fpu control word. */ +extern void __setfpucw __P ((unsigned short)); + +__END_DECLS + +#endif /* _ALPHA_FPU_CONTROL */ diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S new file mode 100644 index 0000000000..4c86e398d8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S @@ -0,0 +1,44 @@ +/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. + Contributed by David Mosberger (davidm@azstarnet.com). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#define GSI_IEEE_FP_CONTROL 45 + + .text +ENTRY(__ieee_get_fp_control) + lda sp, -8(sp) + .prologue 1 + + mov sp, a1 + ldi a0, GSI_IEEE_FP_CONTROL + ldi v0, __NR_osf_getsysinfo + call_pal PAL_callsys + bne a3, error + + ldq v0, 0(sp) + lda sp, 8(sp) + ret + +error: lda sp, 8(sp) + lda pv, syscall_error + jmp zero,(pv) + + .end __ieee_get_fp_control + +weak_alias (__ieee_get_fp_control, ieee_get_fp_control) diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S new file mode 100644 index 0000000000..d10e9bc24c --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S @@ -0,0 +1,44 @@ +/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. + Contributed by David Mosberger (davidm@azstarnet.com). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#define SSI_IEEE_FP_CONTROL 14 + + .text +ENTRY(__ieee_set_fp_control) + lda sp, -8(sp) + .prologue 1 + + stq a0, 0(sp) + mov sp, a1 + ldi a0, SSI_IEEE_FP_CONTROL + ldi v0, __NR_osf_setsysinfo + call_pal PAL_callsys + + lda sp, 8(sp) + + bne a3, error + ret + +error: lda pv, syscall_error + jmp zero,(pv) + + .end __ieee_set_fp_control + +weak_alias (__ieee_set_fp_control, ieee_set_fp_control) diff --git a/sysdeps/unix/sysv/linux/alpha/pipe.S b/sysdeps/unix/sysv/linux/alpha/pipe.S new file mode 100644 index 0000000000..f613b08fe0 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/pipe.S @@ -0,0 +1,43 @@ +/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. + Contributed by David Mosberger (davidm@cs.arizona.edu). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* __pipe is a special syscall since it returns two values. */ + +#include + + .text +ENTRY(__pipe) + .prologue 0 + + ldi v0, __NR_pipe + call_pal PAL_callsys + bne a3, error + + stl r0, 0(a0) + stl r1, 4(a0) + mov zero, v0 + ret + +error: br gp, 1f +1: ldgp gp, 0(gp) + lda pv, syscall_error + jmp zero, (pv) + + .end __pipe + +weak_alias (__pipe, pipe) diff --git a/sysdeps/unix/sysv/linux/alpha/setfpucw.c b/sysdeps/unix/sysv/linux/alpha/setfpucw.c new file mode 100644 index 0000000000..43e8536b20 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/setfpucw.c @@ -0,0 +1,65 @@ +#include + +#include + +extern void __ieee_set_fp_control (unsigned long); +extern unsigned long __ieee_get_fp_control (void); + + +static inline unsigned long +rdfpcr (void) +{ + unsigned long fpcr; + + asm ("trapb; mf_fpcr $f0; trapb; stt $f0,%0" : "m="(fpcr)); + return fpcr; +} + + +static inline void +wrfpcr (unsigned long fpcr) +{ + asm volatile ("ldt $f0,%0; trapb; mt_fpcr $f0; trapb" :: "m"(fpcr)); +} + + +void +__setfpucw (unsigned short fpu_control) +{ + unsigned long fpcr = 0, fpcw = 0; + + if (!fpu_control) + fpu_control = _FPU_DEFAULT; + + /* first, set dynamic rounding mode: */ + + fpcr = rdfpcr(); + fpcr &= ~FPCR_DYN_MASK; + switch (fpu_control & 0xc00) { + case _FPU_RC_NEAREST: fpcr |= FPCR_DYN_NORMAL; break; + case _FPU_RC_DOWN: fpcr |= FPCR_DYN_MINUS; break; + case _FPU_RC_UP: fpcr |= FPCR_DYN_PLUS; break; + case _FPU_RC_ZERO: fpcr |= FPCR_DYN_CHOPPED; break; + } + wrfpcr(fpcr); + + /* now tell kernel about traps that we like to hear about: */ + + fpcw = __ieee_get_fp_control(); + fpcw &= ~IEEE_TRAP_ENABLE_MASK; + + if (!(fpu_control & _FPU_MASK_IM)) + fpcw |= IEEE_TRAP_ENABLE_INV; + if (!(fpu_control & _FPU_MASK_DM)) + fpcw |= IEEE_TRAP_ENABLE_UNF; + if (!(fpu_control & _FPU_MASK_ZM)) + fpcw |= IEEE_TRAP_ENABLE_DZE; + if (!(fpu_control & _FPU_MASK_OM)) + fpcw |= IEEE_TRAP_ENABLE_OVF; + if (!(fpu_control & _FPU_MASK_PM)) + fpcw |= IEEE_TRAP_ENABLE_INE; + + __ieee_set_fp_control(fpcw); + + __fpu_control = fpu_control; /* update global copy */ +} diff --git a/sysdeps/unix/sysv/linux/alpha/sigprocmask.c b/sysdeps/unix/sysv/linux/alpha/sigprocmask.c new file mode 100644 index 0000000000..a1d5636fcb --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/sigprocmask.c @@ -0,0 +1,49 @@ +/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. + Contributed by David Mosberger (davidm@azstarnet.com). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include + +extern unsigned long __osf_sigprocmask (int how, unsigned long newmask); + +int +__sigprocmask (int how, const sigset_t *set, sigset_t *oset) +{ + sigset_t setval; + long result; + + if (set) { + setval = *set; + } else { + sigemptyset(&setval); + how = SIG_BLOCK; /* ensure blocked mask doesn't get changed */ + } + result = __osf_sigprocmask(how, setval); + if (result == -1) { + /* if there are ever more than 63 signals, we need to recode this + in assembler since we wouldn't be able to distinguish a mask of + all 1s from -1, but for now, we're doing just fine... */ + return result; + } + if (oset) { + *oset = result; + } + return 0; +} + +weak_alias (__sigprocmask, sigprocmask); diff --git a/sysdeps/unix/sysv/linux/alpha/speed.c b/sysdeps/unix/sysv/linux/alpha/speed.c new file mode 100644 index 0000000000..b61cfbbfe3 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/speed.c @@ -0,0 +1,102 @@ +/* `struct termios' speed frobnication functions. Linux version. +Copyright (C) 1991, 1992, 1993, 1995 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include + +static const speed_t speeds[] = + { + 0, + 50, + 75, + 110, + 134, + 150, + 200, + 300, + 600, + 1200, + 1800, + 2400, + 4800, + 9600, + 19200, + 38400, + 57600, + 115200, + 230400, + }; + + +/* Return the output baud rate stored in *TERMIOS_P. */ +speed_t +cfgetospeed (termios_p) + const struct termios *termios_p; +{ + speed_t retval = termios_p->c_cflag & (CBAUD | CBAUDEX); + + if (retval & CBAUDEX) + { + retval &= ~CBAUDEX; + retval |= CBAUD + 1; + } + + return retval; +} + +/* Return the input baud rate stored in *TERMIOS_P. + For Linux there is no difference between input and output speed. */ +strong_alias (cfgetospeed, cfgetispeed); + +/* Set the output baud rate stored in *TERMIOS_P to SPEED. */ +int +cfsetospeed (termios_p, speed) + struct termios *termios_p; + speed_t speed; +{ + register unsigned int i; + + if (termios_p == NULL) + { + errno = EINVAL; + return -1; + } + + /* This allows either B1200 or 1200 to work. XXX + Do we really want to try to support this, given that + fetching the speed must return one or the other? */ + + for (i = 0; i < sizeof (speeds) / sizeof (speeds[0]); ++i) + if (i == speed || speeds[i] == speed) + { + termios_p->c_cflag &= ~(CBAUD | CBAUDEX); + termios_p->c_cflag |= (i & CBAUD); + if (i & ~CBAUD) + termios_p->c_cflag |= CBAUDEX; + return 0; + } + + errno = EINVAL; + return -1; +} + +/* Set the input baud rate stored in *TERMIOS_P to SPEED. + For Linux there is no difference between input and output speed. */ +strong_alias (cfsetospeed, cfsetispeed); diff --git a/sysdeps/unix/sysv/linux/alpha/start.S b/sysdeps/unix/sysv/linux/alpha/start.S new file mode 100644 index 0000000000..d1966a82ba --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/start.S @@ -0,0 +1,93 @@ +/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +.comm errno, 4 + + .text +ENTRY(__start) + lda sp, -16(sp) + stq zero, 8(sp) /* terminate frame chain */ + + br t0, 1f +1: ldgp gp, 0(t0) + + mov zero, a0 /* establish __fpu_control w/kernel */ + jsr ra, __setfpucw + ldgp gp, 0(ra) + + /* clear out errno. */ + lda t0, errno + stl zero, 0(t0) + + ldl a0, 16(sp) /* get argc */ + lda a1, 24(sp) /* get argv */ + + /* initialize environ: */ + lda t0, environ + s8addq a0, a1, a2 + addq a2, 0x8, a2 + stq a2, 0(t0) + +#ifndef HAVE_INITFINI + mov a0, s0 + mov a1, s1 + mov a2, s2 + + jsr ra, __libc_init + ldgp gp, 0(ra) + + mov s0, a0 + mov s1, a1 + mov s2, a2 + + /* initialize constructors: */ + jsr ra, __main + ldgp gp, 0(ra) + + mov s0, a0 + mov s1, a1 + mov s2, a2 +#endif + + jsr ra, main + ldgp gp, 0(ra) + + mov v0, a0 + + lda pv, exit + jsr ra, (pv), 1 + ldgp gp, 0(ra) + + /* in case exit returns: */ + +1: ldi v0, __NR_exit + call_pal PAL_callsys + br 1b + + .end __start + + +/* Define a symbol for the first piece of initialized data. */ + .data + .globl __data_start +__data_start: + .long 0 + +weak_alias(__data_start, data_start) diff --git a/sysdeps/unix/sysv/linux/alpha/syscall.S b/sysdeps/unix/sysv/linux/alpha/syscall.S new file mode 100644 index 0000000000..54a8484c58 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/syscall.S @@ -0,0 +1,61 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. + Contributed by David Mosberger (davidm@azstarnet.com). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +/* + * This is for COMPATIBILITY with Linux/x86 only. Linux/Alpha system + * calls return an error indication in a3. This allows to return + * arbitrary 64bit values in v0 (because negative values are not + * mistaken as error numbers). However, C allows to return only one + * value so the interface below folds the error indication passed in + * a3 back into v0: it sets v0 to -errno if an error occurs. Thus, + * no negative 64bit numbers can be returned. To avoid this problem, + * use assembly stubs wherever possible/convenient. + * + * Usage: + * + * long syscall(syscall_number, arg1, arg2, arg3, arg4, arg5) + * + * syscall_number = the index of the system call we're invoking + * arg1-arg5 = up to 5 integer arguments to the system call + * + * We need to do some arg shifting: the kernel expects the + * syscall number in v0 and the first five args in a0-a4. + * + */ + + +1: br gp,2f +2: ldgp gp,0(gp) + jmp zero,syscall_error + + +ENTRY (__syscall) + bis a0,a0,v0 # Syscall number -> v0 + bis a1,a1,a0 # arg1-arg5 -> a0-a4 + bis a2,a2,a1 + bis a3,a3,a2 + bis a4,a4,a3 + bis a5,a5,a4 + + call_pal PAL_callsys # Invoke system call + bne a3,1b + ret + +weak_alias(__syscall, syscall) diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.S b/sysdeps/unix/sysv/linux/alpha/sysdep.S new file mode 100644 index 0000000000..74b153e7b9 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/sysdep.S @@ -0,0 +1,33 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#define _ERRNO_H +#include + +ENTRY(syscall_error) + /* Store return value in errno... */ + ldgp gp, 0(t12) + lda t0, errno + stl v0, 0(t0) + + /* And just kick back a -1. */ + ldi v0, -1 + ret + + .end syscall_error diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h new file mode 100644 index 0000000000..febfa3a4fb --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h @@ -0,0 +1,60 @@ +/* Copyright (C) 1992, 1993, 1995, 1996 Free Software Foundation, Inc. +This file is part of the GNU C Library. +Contributed by Ulrich Drepper, , August 1995. + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* In the Linux ELF and ECOFF worlds, C symbols are asm symbols. */ +#define NO_UNDERSCORES + +#ifdef ASSEMBLER + +#include +#include + +#endif + +/* There is some commonality. */ +#include + +/* For Linux we can use the system call table in the header file + /usr/include/asm/unistd.h + of the kernel. But these symbols do not follow the SYS_* syntax + so we have to redefine the `SYS_ify' macro here. */ +#undef SYS_ify +#ifdef __STDC__ +# define SYS_ify(syscall_name) __NR_##syscall_name +#else +# define SYS_ify(syscall_name) __NR_/**/syscall_name +#endif + +/* + * Define some aliases for syscalls that return two values (in r0 and r1): + */ +#define __NR_getpid __NR_getxpid +#define __NR_getppid __NR_getxpid +#define __NR_getuid __NR_getxuid +#define __NR_geteuid __NR_getxuid +#define __NR_getgid __NR_getxgid +#define __NR_getegid __NR_getxgid + +/* + * Some syscalls no Linux program should know about: + */ +#define __NR_osf_sigprocmask 48 +#define __NR_osf_shmat 209 +#define __NR_osf_getsysinfo 256 +#define __NR_osf_setsysinfo 257 From 56759be20aa7e309774b24bc388843f498740f1e Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 19 Mar 1996 19:51:34 +0000 Subject: [PATCH 0614/4487] Sat Feb 17 11:29:29 1996 David Mosberger-Tang * sysdeps/unix/sysv/linux/alpha/ioperm.c: new file. --- sysdeps/unix/sysv/linux/alpha/ioperm.c | 441 +++++++++++++++++++++++++ 1 file changed, 441 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/ioperm.c diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c new file mode 100644 index 0000000000..306c86b96a --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c @@ -0,0 +1,441 @@ +/* Copyright (C) 1992 Free Software Foundation, Inc. +This file is part of the GNU C Library. +Contributed by David Mosberger. + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* I/O access is restricted to ISA port space (ports 0..65535). +Modern devices hopefully are sane enough not to put any performance +critical registers in i/o space. + +On the first call to ioperm() or _sethae(), the entire (E)ISA port +space is mapped into the virtual address space at address io.base. +mprotect() calls are then used to enable/disable access to ports. Per +page, there are PAGE_SIZE>>IO_SHIFT I/O ports (e.g., 256 ports on a +Low Cost Alpha based system using 8KB pages). + +Keep in mind that this code should be able to run in a 32bit address +space. It is therefore unreasonable to expect mmap'ing the entire +sparse address space would work (e.g., the Low Cost Alpha chip has an +I/O address space that's 512MB large!). */ + +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#undef inb +#undef inw +#undef inl +#undef outb +#undef outw +#undef outl + +#define PATH_CPUINFO "/proc/cpuinfo" + +#define MAX_PORT 0x10000 +#define vuip volatile unsigned int * + +#define JENSEN_IO_BASE (IDENT_ADDR + 0x0300000000UL) +#define APECS_IO_BASE (IDENT_ADDR + 0x01c0000000UL) +#define ALCOR_IO_BASE (IDENT_ADDR + 0x8580000000UL) + +enum { + IOSYS_JENSEN = 0, IOSYS_APECS = 1, IOSYS_ALCOR = 2 +} iosys_t; + +struct ioswtch { + void (*sethae)(unsigned long addr); + void (*outb)(unsigned char b, unsigned long port); + void (*outw)(unsigned short b, unsigned long port); + void (*outl)(unsigned int b, unsigned long port); + unsigned int (*inb)(unsigned long port); + unsigned int (*inw)(unsigned long port); + unsigned int (*inl)(unsigned long port); +}; + +static struct platform { + const char *name; + int io_sys; +} platform[] = { + {"Alcor", IOSYS_ALCOR}, + {"Avanti", IOSYS_APECS}, + {"Cabriolet", IOSYS_APECS}, + {"EB64+", IOSYS_APECS}, + {"EB66", IOSYS_APECS}, + {"EB66P", IOSYS_APECS}, + {"Jensen", IOSYS_JENSEN}, + {"Mustang", IOSYS_APECS}, + {"Noname", IOSYS_APECS}, +}; + + +static struct { + struct hae hae; + unsigned long base; + struct ioswtch * swp; + int sys; +} io; + + +static inline unsigned long +port_to_cpu_addr (unsigned long port, int iosys, int size) +{ + if (iosys == IOSYS_JENSEN) { + return (port << 7) + ((size - 1) << 4) + io.base; + } else { + return (port << 5) + ((size - 1) << 3) + io.base; + } +} + + +static inline void +inline_sethae (unsigned long addr, int iosys) +{ + if (iosys == IOSYS_JENSEN) { + /* hae on the Jensen is bits 31:25 shifted right */ + addr >>= 25; + if (addr != io.hae.cache) { + __sethae (addr); + io.hae.cache = addr; + } + } else { + unsigned long msb; + + /* no need to set hae if msb is 0: */ + msb = addr & 0xf8000000; + if (msb && msb != io.hae.cache) { + __sethae (msb); + io.hae.cache = msb; + } + } +} + + +static inline void +inline_outb (unsigned char b, unsigned long port, int iosys) +{ + unsigned int w; + unsigned long addr = port_to_cpu_addr (port, iosys, 1); + + inline_sethae (0, iosys); + asm ("insbl %2,%1,%0" : "r=" (w) : "ri" (port & 0x3), "r" (b)); + *(vuip)addr = w; + mb (); +} + + +static inline void +inline_outw (unsigned short b, unsigned long port, int iosys) +{ + unsigned int w; + unsigned long addr = port_to_cpu_addr (port, iosys, 2); + + inline_sethae (0, iosys); + asm ("inswl %2,%1,%0" : "r=" (w) : "ri" (port & 0x3), "r" (b)); + *(vuip)addr = w; + mb (); +} + + +static inline void +inline_outl (unsigned int b, unsigned long port, int iosys) +{ + unsigned long addr = port_to_cpu_addr (port, iosys, 4); + + if (port >= MAX_PORT) + return; + + inline_sethae (0, iosys); + *(vuip)addr = b; + mb (); +} + + +static inline unsigned int +inline_inb (unsigned long port, int iosys) +{ + unsigned long result, addr = port_to_cpu_addr (port, iosys, 1); + + inline_sethae (0, iosys); + result = *(vuip) addr; + result >>= (port & 3) * 8; + return 0xffUL & result; +} + + +static inline unsigned int +inline_inw (unsigned long port, int iosys) +{ + unsigned long result, addr = port_to_cpu_addr (port, iosys, 2); + + inline_sethae (0, iosys); + result = *(vuip) addr; + result >>= (port & 3) * 8; + return 0xffffUL & result; +} + + +static inline unsigned int +inline_inl (unsigned long port, int iosys) +{ + unsigned long addr = port_to_cpu_addr (port, iosys, 4); + + inline_sethae (0, iosys); + return *(vuip) addr; +} + + +#define DCL_SETHAE(name, iosys) \ +static void \ +name##_sethae (unsigned long addr) \ +{ \ + inline_sethae (addr, IOSYS_##iosys); \ +} + +#define DCL_OUT(name, func, type, iosys) \ +static void \ +name##_##func (unsigned type b, unsigned long addr) \ +{ \ + inline_##func (b, addr, IOSYS_##iosys); \ +} + + +#define DCL_IN(name, func, iosys) \ +static unsigned int \ +name##_##func (unsigned long addr) \ +{ \ + return inline_##func (addr, IOSYS_##iosys); \ +} + + +DCL_SETHAE(jensen, JENSEN) +DCL_OUT(jensen, outb, char, JENSEN) +DCL_OUT(jensen, outw, short, JENSEN) +DCL_OUT(jensen, outl, int, JENSEN) +DCL_IN(jensen, inb, JENSEN) +DCL_IN(jensen, inw, JENSEN) +DCL_IN(jensen, inl, JENSEN) + +/* The APECS functions are also used for ALCOR since they are + identical. */ + +DCL_SETHAE(apecs, APECS) +DCL_OUT(apecs, outb, char, APECS) +DCL_OUT(apecs, outw, short, APECS) +DCL_OUT(apecs, outl, int, APECS) +DCL_IN(apecs, inb, APECS) +DCL_IN(apecs, inw, APECS) +DCL_IN(apecs, inl, APECS) + +struct ioswtch ioswtch[] = { + { + jensen_sethae, + jensen_outb, jensen_outw, jensen_outl, + jensen_inb, jensen_inw, jensen_inl + }, + { + apecs_sethae, + apecs_outb, apecs_outw, apecs_outl, + apecs_inb, apecs_inw, apecs_inl + } +}; + + +static int +init_iosys (void) +{ + char name[256], value[256]; + FILE * fp; + int i; + + fp = fopen (PATH_CPUINFO, "r"); + if (!fp) + return -1; + + while (fscanf (fp, "%256[^:]: %256[^\n]\n", name, value) == 2) { + if (strncmp (name, "system type", 11) == 0) { + for (i = 0; i < sizeof (platform) / sizeof (platform[0]); ++i) { + if (strcmp (platform[i].name, value) == 0) { + fclose (fp); + io.sys = platform[i].io_sys; + if (io.sys == IOSYS_JENSEN) + io.swp = &ioswtch[0]; + else + io.swp = &ioswtch[1]; + return 0; + } + } + } + } + fclose (fp); + errno = ENODEV; + return -1; +} + + +int +_ioperm (unsigned long from, unsigned long num, int turn_on) +{ + unsigned long addr, len; + int prot; + + if (!io.swp && init_iosys () < 0) + return -1; + + /* this test isn't as silly as it may look like; consider overflows! */ + if (from >= MAX_PORT || from + num > MAX_PORT) { + errno = EINVAL; + return -1; + } + + if (turn_on) { + if (!io.base) { + unsigned long base; + int fd; + + io.hae.reg = 0; /* not used in user-level */ + io.hae.cache = 0; + __sethae (io.hae.cache); /* synchronize with hw */ + + fd = open ("/dev/mem", O_RDWR); + if (fd < 0) + return fd; + + switch (io.sys) { + case IOSYS_JENSEN: base = JENSEN_IO_BASE; break; + case IOSYS_APECS: base = APECS_IO_BASE; break; + case IOSYS_ALCOR: base = ALCOR_IO_BASE; break; + default: + errno = ENODEV; + return -1; + } + addr = port_to_cpu_addr (from, io.sys, 1); + addr &= PAGE_MASK; + len = port_to_cpu_addr (MAX_PORT, io.sys, 1) - addr; + io.base = + (unsigned long) __mmap (0, len, PROT_NONE, MAP_SHARED, fd, base); + close (fd); + if ((long) io.base == -1) + return -1; + } + prot = PROT_READ | PROT_WRITE; + } else { + if (!io.base) + return 0; /* never was turned on... */ + + /* turnoff access to relevant pages: */ + prot = PROT_NONE; + } + addr = port_to_cpu_addr (from, io.sys, 1); + addr &= PAGE_MASK; + len = port_to_cpu_addr (from + num, io.sys, 1) - addr; + return mprotect ((void *) addr, len, prot); +} + + +int +_iopl (unsigned int level) +{ + if (level > 3) { + errno = EINVAL; + return -1; + } + if (level) { + return _ioperm (0, MAX_PORT, 1); + } + return 0; +} + + +void +_sethae (unsigned long addr) +{ + if (!io.swp && init_iosys () < 0) + return; + + io.swp->sethae (addr); +} + + +void +_outb (unsigned char b, unsigned long port) +{ + if (port >= MAX_PORT) + return; + + io.swp->outb (b, port); +} + + +void +_outw (unsigned short b, unsigned long port) +{ + if (port >= MAX_PORT) + return; + + io.swp->outw (b, port); +} + + +void +_outl (unsigned int b, unsigned long port) +{ + if (port >= MAX_PORT) + return; + + io.swp->outl (b, port); +} + + +unsigned int +_inb (unsigned long port) +{ + return io.swp->inb (port); +} + + +unsigned int +_inw (unsigned long port) +{ + return io.swp->inw (port); +} + + +unsigned int +_inl (unsigned long port) +{ + return io.swp->inl (port); +} + + +weak_alias (_sethae, sethae); +weak_alias (_ioperm, ioperm); +weak_alias (_iopl, iopl); +weak_alias (_inb, inb); +weak_alias (_inw, inw); +weak_alias (_inl, inl); +weak_alias (_outb, outb); +weak_alias (_outw, outw); +weak_alias (_outl, outl); From d153ca687cf4bd97bc3458ec001ca4fe1bc611fe Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 19 Mar 1996 19:51:41 +0000 Subject: [PATCH 0615/4487] Wed Feb 14 00:21:17 1996 David Mosberger-Tang * sysdeps/alpha/__longjmp.c (__longjmp): moved dummy while loop to end of function to avoid a jump across NOPs. --- sysdeps/alpha/__longjmp.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/sysdeps/alpha/__longjmp.c b/sysdeps/alpha/__longjmp.c index f3f35eec9c..65b6804bd3 100644 --- a/sysdeps/alpha/__longjmp.c +++ b/sysdeps/alpha/__longjmp.c @@ -38,6 +38,8 @@ register double void __longjmp (__jmp_buf env, int val) { + register long int retval asm ("$0"); + /* Restore the integer registers. */ r9 = env[0].__9; r10 = env[0].__10; @@ -73,18 +75,18 @@ __longjmp (__jmp_buf env, int val) precisely the FP and SP the desired environment needs, we must avoid the compiler doing anything with the stack. */ + + asm volatile + ("cmoveq %1, 1, %0\n\t" /* $0 = val ?: 1; */ + "ret $31, (%2), 1" /* return $0 */ + : "=r" (retval) + /* The "0" constraint should force VAL into $0. */ + : "0" (val), "r" (retpc)); + while (1) { /* The loop is just to avoid `volatile function does return' warnings. The instruction will only be executed once. */ - - register long int retval asm ("$0"); - - asm volatile - ("cmoveq %1, 1, %0\n\t" /* $0 = val ?: 1; */ - "ret $31, (%2), 1" /* return $0 */ - : "=r" (retval) - /* The "0" constraint should force VAL into $0. */ - : "0" (val), "r" (retpc)); + asm volatile (""); } } From e75790a4d27ed5231f966050bd972a6dd098bea1 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 19 Mar 1996 19:52:11 +0000 Subject: [PATCH 0616/4487] Wed Feb 21 23:56:41 1996 David Mosberger-Tang * sysdeps/alpha/setjmp.S: switched order in which sp and fp are passed to match what __sigsetjmp_aux() expects. --- sysdeps/alpha/setjmp.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S index 08932ccd1a..8ea2b50f87 100644 --- a/sysdeps/alpha/setjmp.S +++ b/sysdeps/alpha/setjmp.S @@ -23,7 +23,7 @@ Cambridge, MA 02139, USA. */ extra arguments. */ ENTRY (__sigsetjmp) lda $27, __sigsetjmp_aux/* Load address to jump to. */ - bis $15, $15, $18 /* Pass FP as 3rd arg. */ - bis $30, $30, $19 /* Pass SP as 4th arg. */ + bis $30, $30, $18 /* Pass SP as 3rd arg. */ + bis $15, $15, $19 /* Pass FP as 4th arg. */ jmp $31, ($27), __sigsetjmp_aux /* Call __sigsetjmp_aux. */ .end __sigsetjmp From b434211b7d48bd5b61585797004ec813948798b0 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 19 Mar 1996 19:52:17 +0000 Subject: [PATCH 0617/4487] Wed Feb 14 00:21:17 1996 David Mosberger-Tang * sysdeps/alpha/Makefile (sysdep_routines): Removed all rules pertaining to integer division/remainder routines since new code doesn't require them. --- sysdeps/alpha/Makefile | 75 ++++-------------------------------------- 1 file changed, 6 insertions(+), 69 deletions(-) diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile index 8573ca811c..4bb1f299e1 100644 --- a/sysdeps/alpha/Makefile +++ b/sysdeps/alpha/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. +# Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc. # Contributed by Brendan Kehoe (brendan@zen.org). # The GNU C Library is free software; you can redistribute it and/or @@ -16,79 +16,16 @@ # not, write to the Free Software Foundation, Inc., 675 Mass Ave, # Cambridge, MA 02139, USA. +ifeq ($(subdir),gmon) +sysdep_routines := bb_init_func _mcount +endif + ifeq ($(subdir),setjmp) sysdep_routines := $(sysdep_routines) setjmp_aux endif ifeq ($(subdir),gnulib) -routines = $(divrem) +routines = $(divrem) endif # gnulib -# We distribute these files, even though they are generated, -# so as to avoid the need for a functioning m4 to build the library. divrem := divl divlu divq divqu reml remlu remq remqu - -+divrem-NAME-divl := divl -+divrem-NAME-divlu := divlu -+divrem-NAME-divq := divq -+divrem-NAME-divqu := divqu -+divrem-NAME-reml := reml -+divrem-NAME-remlu := remlu -+divrem-NAME-remq := remq -+divrem-NAME-remqu := remqu -+divrem-NAME = $(+divrem-NAME-$(basename $(notdir $@))) - -+divrem-OP-divl := divl -+divrem-OP-divlu := divlu -+divrem-OP-divq := divq -+divrem-OP-divqu := divqu -+divrem-OP-reml := reml -+divrem-OP-remlu := remlu -+divrem-OP-remq := remq -+divrem-OP-remqu := remqu -+divrem-BASEOP-divl := div -+divrem-BASEOP-divlu := div -+divrem-BASEOP-divq := div -+divrem-BASEOP-divqu := div -+divrem-BASEOP-reml := rem -+divrem-BASEOP-remlu := rem -+divrem-BASEOP-remq := rem -+divrem-BASEOP-remqu := rem -+divrem-S-divl := true -+divrem-S-divlu := false -+divrem-S-divq := true -+divrem-S-divqu := false -+divrem-S-reml := true -+divrem-S-remlu := false -+divrem-S-remq := true -+divrem-S-remqu := false -+divrem-SIZE-divl := l -+divrem-SIZE-divlu := l -+divrem-SIZE-divq := q -+divrem-SIZE-divqu := q -+divrem-SIZE-reml := l -+divrem-SIZE-remlu := l -+divrem-SIZE-remq := q -+divrem-SIZE-remqu := q -+divrem-MODE-divl := l -+divrem-MODE-divlu := lu -+divrem-MODE-divq := q -+divrem-MODE-divqu := qu -+divrem-MODE-reml := l -+divrem-MODE-remlu := lu -+divrem-MODE-remq := q -+divrem-MODE-remqu := qu - -$(divrem:%=$(sysdep_dir)/alpha/%.S): $(sysdep_dir)/alpha/divrem.m4 $(sysdep_dir)/alpha/DEFS.h $(sysdep_dir)/alpha/macros.m4 - (echo "define(OP,\`$(+divrem-NAME)')\ - define(BASEOP,\`$(+divrem-BASEOP-$(+divrem-NAME))')\ - define(MODE,\`$(+divrem-MODE-$(+divrem-NAME))')\ - define(SIZE,\`$(+divrem-SIZE-$(+divrem-NAME))')\ - define(SIGNED,\`$(+divrem-S-$(+divrem-NAME))')\ - define(SYSDEP_DIR, \`$(sysdep_dir)/alpha')\ - /* This file is generated from divrem.m4; DO NOT EDIT! */"; \ - cat $<) | $(M4) > $@-tmp -# Make it unwritable so noone will edit it by mistake. - -chmod a-w $@-tmp - mv -f $@-tmp $@ - test ! -d CVS || cvs commit -m'Regenerated from $<' $@ From c56fbe7e02b7b5002038efee0d28a808a290819a Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 19 Mar 1996 19:52:25 +0000 Subject: [PATCH 0618/4487] Tue Feb 20 11:33:46 1996 David Mosberger-Tang * sysdeps/unix/sysv/linux/alpha/syscalls.list (select, bind, connect, getpeername, getsockname, listen, recv, recvfrom, recvmsg, send, sendmsg, sendto, setsockopt, shutdown, socketpair): added to override same-name assembly file in the parent directory. Wed Feb 14 00:21:17 1996 David Mosberger-Tang * sysdeps/unix/sysv/linux/alpha/Makefile, sysdeps/unix/sysv/linux/alpha/brk.S, sysdeps/unix/sysv/linux/alpha/fpu_control.c, sysdeps/unix/sysv/linux/alpha/fpu_control.h, sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S, sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S, sysdeps/unix/sysv/linux/alpha/pipe.S, sysdeps/unix/sysv/linux/alpha/setfpucw.c, sysdeps/unix/sysv/linux/alpha/sigprocmask.c, sysdeps/unix/sysv/linux/alpha/speed.c, sysdeps/unix/sysv/linux/alpha/start.S, sysdeps/unix/sysv/linux/alpha/syscall.S, sysdeps/unix/sysv/linux/alpha/syscalls.list, sysdeps/unix/sysv/linux/alpha/sysdep.S, sysdeps/unix/sysv/linux/alpha/sysdep.h: New files. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 45 +++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/syscalls.list diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list new file mode 100644 index 0000000000..a842908901 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -0,0 +1,45 @@ +# File name Caller Syscall name # args Strong name Weak names + +# used to implement inb()/outb() etc. +sethae - sethae 1 __sethae + +msgctl - msgctl 3 __msgctl msgctl +msgget - msgget 2 __msgget msgget +msgrcv - msgrcv 5 __msgrcv msgrcv +msgsnd - msgsnd 4 __msgsnd msgsnd +shmat - osf_shmat 3 __shmat shmat +shmctl - shmctl 3 __shmctl shmctl +shmdt - shmdt 1 __shmdt shmdt +shmget - shmget 3 __shmget shmget +semop - semop 3 __semop semop +semget - semget 3 __semget semget +semctl - semctl 4 __semctl semctl + +osf_sigprocmask - osf_sigprocmask 2 __osf_sigprocmask + +getdents - getdents 3 __getdirentries getdirentries +getpeername - getpeername 3 __getpeername getpeername +getpriority - getpriority 2 __getpriority getpriority +mmap - mmap 6 __mmap mmap + +# these are actually common with the x86: +fstatfs - fstatfs 2 __fstatfs fstatfs +statfs - statfs 2 __statfs statfs + +# override select.S in parent directory: +select - select 5 __select select +accept - accept 3 __accept accept +bind - bind 3 __bind bind +connect - connect 3 __connect connect +getpeername - getpeername 3 __getpeername getpeername +getsockname - getsockname 3 __getsockname getsockname +listen - listen 2 __listen listen +recv - recv 4 __recv recv +recvfrom - recvfrom 6 __recvfrom recvfrom +recvmsg - recvmsg 3 __recvmsg recvmsg +send - send 4 __send send +sendmsg - sendmsg 3 __sendmsg sendmsg +sendto - sendto 6 __sendto sendto +setsockopt - setsockopt 5 __setsockopt setsockopt +shutdown - shutdown 2 __shutdown shutdown +socketpair - socketpair 4 __socketpair socketpair From 0a4dc0f10b46da9de549c5354e7516948b8e9ec5 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 19 Mar 1996 19:52:29 +0000 Subject: [PATCH 0619/4487] Mon Mar 4 20:17:28 1996 David Mosberger-Tang * sysdeps/unix/sysv/linux/alpha/sigsuspend.S: new file (syscall expects set-value, not pointer to it). --- sysdeps/unix/sysv/linux/alpha/sigsuspend.S | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/sigsuspend.S diff --git a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S new file mode 100644 index 0000000000..29cba8d312 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S @@ -0,0 +1,39 @@ +/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. + Contributed by David Mosberger (davidm@cs.arizona.edu). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* sigsuspend is a special syscall since it needs to dereference the +sigset. */ + +#include + + .text +ENTRY(sigsuspend) + .prologue 0 + + ldq a0, 0(a0) + ldi v0, __NR_sigsuspend + call_pal PAL_callsys + bne a3, error + ret + +error: br gp, 1f +1: ldgp gp, 0(gp) + lda pv, syscall_error + jmp zero, (pv) + + .end sigsuspend From 69ff466c6655ae494075836ca58a7eba0ab0d49c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 19 Mar 1996 19:52:32 +0000 Subject: [PATCH 0620/4487] Wed Feb 14 00:21:17 1996 David Mosberger-Tang * sysdeps/alpha/setjmp_aux.c (__sigsetjmp_aux): restore return address register before returning (gcc 2.7.1 doesn't do it, presumably because $26 is declared as a global variable). --- sysdeps/alpha/setjmp_aux.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/alpha/setjmp_aux.c b/sysdeps/alpha/setjmp_aux.c index f92517be92..0f05f8b043 100644 --- a/sysdeps/alpha/setjmp_aux.c +++ b/sysdeps/alpha/setjmp_aux.c @@ -69,6 +69,8 @@ __sigsetjmp_aux (sigjmp_buf env, int savemask, long int *sp, long int *fp) /* Save the signal mask if requested. */ __sigjmp_save (env, savemask); + retpc = env[0].__jmpbuf[0].__pc; /* restore ra, ugly... */ + /* Return to the original caller of __sigsetjmp. */ return 0; } From 4e4e7fca8e8b2c68665b6864d1757fca20fbacf3 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 19 Mar 1996 19:52:39 +0000 Subject: [PATCH 0621/4487] Wed Feb 14 00:21:17 1996 David Mosberger-Tang * sysdeps/unix/bsd/osf/alpha/sysdep.h: include sysdeps/unix/alpha/sysdep.h and removed definitions now in that file. --- sysdeps/unix/bsd/osf/alpha/sysdep.h | 51 ++--------------------------- 1 file changed, 2 insertions(+), 49 deletions(-) diff --git a/sysdeps/unix/bsd/osf/alpha/sysdep.h b/sysdeps/unix/bsd/osf/alpha/sysdep.h index fc661a6b86..7bd7192c20 100644 --- a/sysdeps/unix/bsd/osf/alpha/sysdep.h +++ b/sysdeps/unix/bsd/osf/alpha/sysdep.h @@ -19,58 +19,11 @@ Cambridge, MA 02139, USA. */ /* OSF/1 does not precede the asm names of C symbols with a `_'. */ #define NO_UNDERSCORES -#include +#include -#ifdef ASSEMBLER +#ifdef ASSEMBLER #include /* get PAL_callsys */ #include -#ifdef __STDC__ -#define ENTRY(name) \ - .globl name; \ - .ent name,0; \ - name##:; \ - .frame sp,0,ra -#else -#define ENTRY(name) \ - .globl name; \ - .ent name,0; \ - name/**/:; \ - .frame sp,0,ra #endif - -#ifdef __STDC__ -#define PSEUDO(name, syscall_name, args) \ - ENTRY(name); \ - ldiq v0, SYS_##syscall_name; \ - .set noat; \ - call_pal PAL_callsys; \ - .set at; \ - beq a3, 10f; \ - br gp, 20f; \ -20:; \ - ldgp gp, 0(gp); \ - jmp zero, syscall_error; \ -10: -#else -#define PSEUDO(name, syscall_name, args) \ - ENTRY(name); \ - ldiq v0, SYS_/**/syscall_name; \ - .set noat; \ - call_pal PAL_callsys; \ - .set at; \ - beq a3, 10f; \ - br gp, 20f; \ -20:; \ - ldgp gp, 0(gp); \ - jmp zero, syscall_error; \ -10: -#endif - -#define ret ret zero,(ra),1 -#define r0 v0 -#define r1 a4 -#define MOVE(x,y) mov x, y - -#endif /* ASSEMBLER */ From 95a89bf364c80593fcf146aeb5e0569b26c7f6b3 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 19 Mar 1996 19:52:47 +0000 Subject: [PATCH 0622/4487] Wed Feb 14 00:21:17 1996 David Mosberger-Tang * sysdeps/alpha/divrem.S, sysdeps/alpha/htonl.S, sysdeps/alpha/htons.S, sysdeps/alpha/machine-gmon.h, sysdeps/alpha/_mcount.S, sysdeps/alpha/ntohl.s, sysdeps/alpha/ntohs.s, sysdeps/alpha/strlen.S: New files. --- sysdeps/alpha/_mcount.S | 112 +++++++++++++++++++++++ sysdeps/alpha/divrem.S | 169 +++++++++++++++++++++++++++++++++++ sysdeps/alpha/htonl.S | 42 +++++++++ sysdeps/alpha/htons.S | 36 ++++++++ sysdeps/alpha/machine-gmon.h | 25 ++++++ sysdeps/alpha/ntohl.s | 2 + sysdeps/alpha/ntohs.s | 2 + sysdeps/alpha/strlen.S | 75 ++++++++++++++++ 8 files changed, 463 insertions(+) create mode 100644 sysdeps/alpha/_mcount.S create mode 100644 sysdeps/alpha/divrem.S create mode 100644 sysdeps/alpha/htonl.S create mode 100644 sysdeps/alpha/htons.S create mode 100644 sysdeps/alpha/machine-gmon.h create mode 100644 sysdeps/alpha/ntohl.s create mode 100644 sysdeps/alpha/ntohs.s create mode 100644 sysdeps/alpha/strlen.S diff --git a/sysdeps/alpha/_mcount.S b/sysdeps/alpha/_mcount.S new file mode 100644 index 0000000000..2d6e2ed532 --- /dev/null +++ b/sysdeps/alpha/_mcount.S @@ -0,0 +1,112 @@ +/* Machine-specific calling sequence for `mcount' profiling function. alpha +Copyright (C) 1995 Free Software Foundation, Inc. +Contributed by David Mosberger (davidm@cs.arizona.edu). +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Assembly stub to invoke _mcount(). Compiler generated code calls +this stub after executing a function's prologue and without saving any +registers. It is therefore necessary to preserve a0..a5 as they may +contain function arguments. To work correctly with frame- less +functions, it is also necessary to preserve ra. Finally, division +routines are invoked with a special calling convention and the +compiler treats those calls as if they were instructions. In +particular, it doesn't save any of the temporary registers (caller +saved registers). It is therefore necessary to preserve all +caller-saved registers as well + +Upon entering _mcount, register $at holds the return address and ra +holds the return address of the function's caller (selfpc and frompc, +respectively in gmon.c language...). */ + +#include +#ifdef __linux__ +# include +#else +# include +#endif + +#undef ret /* discard `ret' as defined in sysdep.h */ + + .set noat + .set noreorder + +ENTRY(_mcount) + subq sp, 0xb0, sp + stq a0, 0x00(sp) + mov ra, a0 # a0 = caller-pc + stq a1, 0x08(sp) + mov $at, a1 # a1 = self-pc + stq $at, 0x10(sp) + + stq a2, 0x18(sp) + stq a3, 0x20(sp) + stq a4, 0x28(sp) + stq a5, 0x30(sp) + stq ra, 0x38(sp) + stq gp, 0x40(sp) + + br gp, 1f +1: ldgp gp, 0(gp) + + stq t0, 0x48(sp) + stq t1, 0x50(sp) + stq t2, 0x58(sp) + stq t3, 0x60(sp) + stq t4, 0x68(sp) + stq t5, 0x70(sp) + stq t6, 0x78(sp) + + lda pv, __mcount + + stq t7, 0x80(sp) + stq t8, 0x88(sp) + stq t9, 0x90(sp) + stq t10, 0x98(sp) + stq t11, 0xa0(sp) + stq v0, 0xa8(sp) + + jsr ra, (pv), __mcount + + ldq a0, 0x00(sp) + ldq a1, 0x08(sp) + ldq $at, 0x10(sp) # restore self-pc + ldq a2, 0x18(sp) + ldq a3, 0x20(sp) + ldq a4, 0x28(sp) + ldq a5, 0x30(sp) + ldq ra, 0x38(sp) + ldq gp, 0x40(sp) + mov $at, pv # make pv point to return address + ldq t0, 0x48(sp) # this is important under OSF/1 to + ldq t1, 0x50(sp) # ensure that the code that we return + ldq t2, 0x58(sp) # can correctly compute its gp + ldq t3, 0x60(sp) + ldq t4, 0x68(sp) + ldq t5, 0x70(sp) + ldq t6, 0x78(sp) + ldq t7, 0x80(sp) + ldq t8, 0x88(sp) + ldq t9, 0x90(sp) + ldq t10, 0x98(sp) + ldq t11, 0xa0(sp) + ldq v0, 0xa8(sp) + + addq sp, 0xb0, sp + ret zero,($at),1 + + .end _mcount diff --git a/sysdeps/alpha/divrem.S b/sysdeps/alpha/divrem.S new file mode 100644 index 0000000000..e6293bf355 --- /dev/null +++ b/sysdeps/alpha/divrem.S @@ -0,0 +1,169 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. + Contributed by David Mosberger (davidm@cs.arizona.edu). + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* The current Alpha chips don't provide hardware for integer +division. The C compiler expects the functions + + __divqu: 64-bit unsigned long divide + __remqu: 64-bit unsigned long remainder + __divqs/__remqs: signed 64-bit + __divlu/__remlu: unsigned 32-bit + __divls/__remls: signed 32-bit + +These are not normal C functions: instead of the normal calling +sequence, these expect their arguments in registers t10 and t11, and +return the result in t12 (aka pv). Registers AT and v0 may be +clobbered (assembly temporary), anything else must be saved. */ + +#ifdef __linux__ +# include +# include +# include +#else +# include +# include +#endif + +#ifdef DEBUG +# define arg1 a0 +# define arg2 a1 +# define result v0 +# define mask t0 +# define tmp0 t1 +# define tmp1 t2 +# define sign t3 +# define retaddr ra +#else +# define arg1 t10 +# define arg2 t11 +# define result t12 +# define mask v0 +# define tmp0 t0 +# define tmp1 t1 +# define sign t2 +# define retaddr t9 +#endif + +# define divisor arg2 +#if IS_REM +# define dividend result +# define quotient arg1 +# define GETDIVIDEND bis arg1,zero,dividend +#else +# define dividend arg1 +# define quotient result +# define GETDIVIDEND +#endif + +#if SIZE == 8 +# define LONGIFYarg1 GETDIVIDEND +# define LONGIFYarg2 +#else +# if SIGNED +# define LONGIFYarg1 addl arg1,zero,dividend +# define LONGIFYarg2 addl arg2,zero,divisor +# else +# define LONGIFYarg1 zapnot arg1,0x0f,dividend +# define LONGIFYarg2 zapnot arg2,0x0f,divisor +# endif +#endif + +#if SIGNED +# define SETSIGN(sign,reg,tmp) subq zero,reg,tmp; cmovlt sign,tmp,reg +# if IS_REM +# define GETSIGN(x,y,s) bis x,zero,s +# else +# define GETSIGN(x,y,s) xor x,y,s +# endif +#else +# define SETSIGN(sign,reg,tmp) +# define GETSIGN(x,y,s) +#endif + + .set noreorder + .set noat + + .ent FUNC_NAME + .globl FUNC_NAME + + .align 5 +FUNC_NAME: +# define FRAME_SIZE 0x30 + .frame sp,FRAME_SIZE,ra,0 + lda sp,-FRAME_SIZE(sp) + .prologue 1 + stq arg1,0x00(sp) + LONGIFYarg1 + stq arg2,0x08(sp) + LONGIFYarg2 + stq mask,0x10(sp) + bis zero,1,mask + stq tmp0,0x18(sp) + bis zero,zero,quotient + stq tmp1,0x20(sp) + beq divisor,divbyzero + stq sign,0x28(sp) + GETSIGN(dividend,divisor,sign) +#if SIGNED + subq zero,dividend,tmp0 + subq zero,divisor,tmp1 + cmovlt dividend,tmp0,dividend + cmovlt divisor,tmp1,divisor +#endif + /* + * Shift divisor left until either bit 63 is set or until it + * is at least as big as the dividend: + */ + .align 3 +1: cmpule dividend,divisor,AT + blt divisor,2f + blbs AT,2f + addq mask,mask,mask + addq divisor,divisor,divisor + br 1b + + .align 3 +2: addq mask,quotient,tmp0 + cmpule divisor,dividend,AT + subq dividend,divisor,tmp1 + srl divisor,1,divisor + srl mask,1,mask + cmovlbs AT,tmp0,quotient + cmovlbs AT,tmp1,dividend + bne mask,2b + + ldq arg1,0x00(sp) + SETSIGN(sign,result,tmp0) +done: ldq arg2,0x08(sp) + ldq mask,0x10(sp) + ldq tmp0,0x18(sp) + ldq tmp1,0x20(sp) + ldq sign,0x28(sp) + lda sp,FRAME_SIZE(sp) + ret zero,(retaddr),0 + +divbyzero: + lda a0,GEN_INTDIV(zero) + call_pal PAL_gentrap + bis zero,zero,result /* if trap returns, return 0 */ + ldq arg1,0x00(sp) + br done + + .end FUNC_NAME diff --git a/sysdeps/alpha/htonl.S b/sysdeps/alpha/htonl.S new file mode 100644 index 0000000000..d0bf7e1718 --- /dev/null +++ b/sysdeps/alpha/htonl.S @@ -0,0 +1,42 @@ +/* Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#ifdef __linux__ +# include +#else +#include +#endif + +ENTRY(__htonl) + extlh a0,5,t1 # t1 = dd000000 + zap a0,0xfd,t2 # t2 = 0000cc00 + sll t2,5,t2 # t2 = 00198000 + s8addl t2,t1,t1 # t1 = ddcc0000 + zap a0,0xfb,t2 # t2 = 00bb0000 + srl t2,8,t2 # t2 = 0000bb00 + extbl a0,3,v0 # v0 = 000000aa + or t1,v0,v0 # v0 = ddcc00aa + or t2,v0,v0 # v0 = ddccbbaa + ret + + .end __htonl + +strong_alias_asm(__htonl, __ntohl) +weak_alias(__htonl, htonl) +weak_alias(__htonl, ntohl) diff --git a/sysdeps/alpha/htons.S b/sysdeps/alpha/htons.S new file mode 100644 index 0000000000..6e18c7c441 --- /dev/null +++ b/sysdeps/alpha/htons.S @@ -0,0 +1,36 @@ +/* Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#ifdef __linux__ +# include +#else +#include +#endif + +ENTRY(__htons) + extwh a0,7,t1 # t1 = bb00 + extbl a0,1,v0 # v0 = 00aa + bis v0,t1,v0 # v0 = bbaa + ret + + .end __htons + +strong_alias_asm(__htons, __ntohs) +weak_alias(__htons, htons) +weak_alias(__htons, ntohs) diff --git a/sysdeps/alpha/machine-gmon.h b/sysdeps/alpha/machine-gmon.h new file mode 100644 index 0000000000..a551e9f8b1 --- /dev/null +++ b/sysdeps/alpha/machine-gmon.h @@ -0,0 +1,25 @@ +/* Machine-specific calling sequence for `mcount' profiling function. alpha +Copyright (C) 1995 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#define _MCOUNT_DECL void __mcount + +/* Call __mcount with our the return PC for our caller, and the return + PC our caller will return to. Empty since we use an assembly stub + instead. */ +#define MCOUNT diff --git a/sysdeps/alpha/ntohl.s b/sysdeps/alpha/ntohl.s new file mode 100644 index 0000000000..6a99a01dc4 --- /dev/null +++ b/sysdeps/alpha/ntohl.s @@ -0,0 +1,2 @@ +/* This is a dummy to avoid including the generic version. htonl and +ntohl are identical and htonl.S defines appropriate aliases. */ diff --git a/sysdeps/alpha/ntohs.s b/sysdeps/alpha/ntohs.s new file mode 100644 index 0000000000..69992a894c --- /dev/null +++ b/sysdeps/alpha/ntohs.s @@ -0,0 +1,2 @@ +/* This is a dummy to avoid including the generic version. htons and +ntohs are identical and htons.S defines appropriate aliases. */ diff --git a/sysdeps/alpha/strlen.S b/sysdeps/alpha/strlen.S new file mode 100644 index 0000000000..7e6a61be8c --- /dev/null +++ b/sysdeps/alpha/strlen.S @@ -0,0 +1,75 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. + Contributed by David Mosberger (davidm@cs.arizona.edu). + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Finds length of a 0-terminated string. Optimized for the Alpha +architecture: + + - memory accessed as aligned quadwords only + - uses bcmpge to compare 8 bytes in parallel + - does binary search to find 0 byte in last + quadword (HAKMEM needed 12 instructions to + do this instead of the 9 instructions that + binary search needs). */ + +#include +#ifdef __linux__ +# include +#else +#include +#endif + + .set noreorder + .set noat + +ENTRY(strlen) + ldq_u t0, 0(a0) # load first quadword (a0 may be misaligned) + lda t1, -1(zero) + insqh t1, a0, t1 + andnot a0, 7, v0 + or t1, t0, t0 + cmpbge zero, t0, t1 # t1 <- bitmask: bit i == 1 <==> i-th byte == 0 + bne t1, found + +loop: ldq t0, 8(v0) + addq v0, 8, v0 # addr += 8 + nop # helps dual issue last two insns + cmpbge zero, t0, t1 + beq t1, loop + +found: blbs t1, done # make aligned case fast + negq t1, t2 + and t1, t2, t1 + + and t1, 0x0f, t0 + addq v0, 4, t2 + cmoveq t0, t2, v0 + + and t1, 0x33, t0 + addq v0, 2, t2 + cmoveq t0, t2, v0 + + and t1, 0x55, t0 + addq v0, 1, t2 + cmoveq t0, t2, v0 + +done: subq v0, a0, v0 + ret + + .end strlen From bd7d3fbe25bf70a89ebf91bbe68bc9826c1f706b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 19 Mar 1996 19:52:58 +0000 Subject: [PATCH 0623/4487] Wed Feb 14 00:21:17 1996 David Mosberger-Tang * sysdeps/alpha/divl.S, sysdeps/alpha/divlu.S, sysdeps/alpha/divq.S, sysdeps/alpha/divqu.S, sysdeps/alpha/divrem.m4, sysdeps/alpha/macros.m4, sysdeps/alpha/ reml.S, sysdeps/alpha/remlu.S, sysdeps/alpha/remq.S, sysdeps/alpha/remqu.S, sysdeps/alpha/strlen.c: Removed. --- sysdeps/alpha/divl.S | 61 +++---------------------------------- sysdeps/alpha/divlu.S | 61 +++---------------------------------- sysdeps/alpha/divq.S | 58 +++-------------------------------- sysdeps/alpha/divqu.S | 64 +++------------------------------------ sysdeps/alpha/divrem.m4 | 51 ------------------------------- sysdeps/alpha/macros.m4 | 34 --------------------- sysdeps/alpha/remlu.S | 64 +++------------------------------------ sysdeps/alpha/remq.S | 61 +++---------------------------------- sysdeps/alpha/remqu.S | 67 +++-------------------------------------- sysdeps/alpha/strlen.c | 55 --------------------------------- 10 files changed, 35 insertions(+), 541 deletions(-) delete mode 100644 sysdeps/alpha/divrem.m4 delete mode 100644 sysdeps/alpha/macros.m4 delete mode 100644 sysdeps/alpha/strlen.c diff --git a/sysdeps/alpha/divl.S b/sysdeps/alpha/divl.S index 5c94362cf5..7dbb5048c7 100644 --- a/sysdeps/alpha/divl.S +++ b/sysdeps/alpha/divl.S @@ -1,57 +1,6 @@ - /* This file is generated from divrem.m4; DO NOT EDIT! */ -/* For each N divided by D, we do: - result = (double) N / (double) D - Then, for each N mod D, we do: - result = N - (D * divMODE (N, D)) +#define IS_REM 0 +#define SIZE 4 +#define SIGNED 1 +#define FUNC_NAME __divl - FIXME: - The q and qu versions won't deal with operands > 50 bits. We also - don't check for divide by zero. */ - -#include "DEFS.h" -#if 0 -/* We do not handle div by zero yet. */ -#include -#endif -#include - -/* Avoid the definition of ret that we set in the alpha sysdep.h. */ -#undef ret - - - - - - -FUNC__(divl) - /* First set up the dividend. */ - sextl t10, t10 - - stq t10,0(sp) - ldt $f10,0(sp) - cvtqt $f10,$f10 - - - /* Then set up the divisor. */ - sextl t11, t11 - - stq t11,0(sp) - ldt $f1,0(sp) - cvtqt $f1,$f1 - - - /* Do the division. */ - divt $f10,$f1,$f10 - cvttqc $f10,$f10 - - /* Put the result in t12. */ - stt $f10,0(sp) - ldq t12,0(sp) - sextl t12, t12 - - - - - lda sp,16(sp) - ret zero,(t9),1 - .end NAME__(divl) +#include "divrem.S" diff --git a/sysdeps/alpha/divlu.S b/sysdeps/alpha/divlu.S index 3a7589d355..9cc71da308 100644 --- a/sysdeps/alpha/divlu.S +++ b/sysdeps/alpha/divlu.S @@ -1,57 +1,6 @@ - /* This file is generated from divrem.m4; DO NOT EDIT! */ -/* For each N divided by D, we do: - result = (double) N / (double) D - Then, for each N mod D, we do: - result = N - (D * divMODE (N, D)) +#define IS_REM 0 +#define SIZE 4 +#define SIGNED 0 +#define FUNC_NAME __divlu - FIXME: - The q and qu versions won't deal with operands > 50 bits. We also - don't check for divide by zero. */ - -#include "DEFS.h" -#if 0 -/* We do not handle div by zero yet. */ -#include -#endif -#include - -/* Avoid the definition of ret that we set in the alpha sysdep.h. */ -#undef ret - - - - - - -FUNC__(divlu) - /* First set up the dividend. */ - zapnot t10, 0xf, t10 - - stq t10,0(sp) - ldt $f10,0(sp) - cvtqt $f10,$f10 - - - /* Then set up the divisor. */ - zapnot t11, 0xf, t11 - - stq t11,0(sp) - ldt $f1,0(sp) - cvtqt $f1,$f1 - - - /* Do the division. */ - divt $f10,$f1,$f10 - cvttqc $f10,$f10 - - /* Put the result in t12. */ - stt $f10,0(sp) - ldq t12,0(sp) - sextl t12, t12 - - - - - lda sp,16(sp) - ret zero,(t9),1 - .end NAME__(divlu) +#include "divrem.S" diff --git a/sysdeps/alpha/divq.S b/sysdeps/alpha/divq.S index 730a338f63..f7af8d62a3 100644 --- a/sysdeps/alpha/divq.S +++ b/sysdeps/alpha/divq.S @@ -1,54 +1,6 @@ - /* This file is generated from divrem.m4; DO NOT EDIT! */ -/* For each N divided by D, we do: - result = (double) N / (double) D - Then, for each N mod D, we do: - result = N - (D * divMODE (N, D)) +#define IS_REM 0 +#define SIZE 8 +#define SIGNED 1 +#define FUNC_NAME __divq - FIXME: - The q and qu versions won't deal with operands > 50 bits. We also - don't check for divide by zero. */ - -#include "DEFS.h" -#if 0 -/* We do not handle div by zero yet. */ -#include -#endif -#include - -/* Avoid the definition of ret that we set in the alpha sysdep.h. */ -#undef ret - - - - - - -FUNC__(divq) - /* First set up the dividend. */ - - stq t10,0(sp) - ldt $f10,0(sp) - cvtqt $f10,$f10 - - - /* Then set up the divisor. */ - - stq t11,0(sp) - ldt $f1,0(sp) - cvtqt $f1,$f1 - - - /* Do the division. */ - divt $f10,$f1,$f10 - cvttqc $f10,$f10 - - /* Put the result in t12. */ - stt $f10,0(sp) - ldq t12,0(sp) - - - - - lda sp,16(sp) - ret zero,(t9),1 - .end NAME__(divq) +#include "divrem.S" diff --git a/sysdeps/alpha/divqu.S b/sysdeps/alpha/divqu.S index 7614742440..faf2932cb5 100644 --- a/sysdeps/alpha/divqu.S +++ b/sysdeps/alpha/divqu.S @@ -1,60 +1,6 @@ - /* This file is generated from divrem.m4; DO NOT EDIT! */ -/* For each N divided by D, we do: - result = (double) N / (double) D - Then, for each N mod D, we do: - result = N - (D * divMODE (N, D)) +#define IS_REM 0 +#define SIZE 8 +#define SIGNED 0 +#define FUNC_NAME __divqu - FIXME: - The q and qu versions won't deal with operands > 50 bits. We also - don't check for divide by zero. */ - -#include "DEFS.h" -#if 0 -/* We do not handle div by zero yet. */ -#include -#endif -#include - -/* Avoid the definition of ret that we set in the alpha sysdep.h. */ -#undef ret - - - - - - -FUNC__(divqu) - /* First set up the dividend. */ - - stq t10,0(sp) - ldt $f10,0(sp) - cvtqt $f10,$f10 - ldit $f26, 18446744073709551616.0 - addt $f26, $f10, $f26 - fcmovlt $f10, $f26, $f10 - - - /* Then set up the divisor. */ - - stq t11,0(sp) - ldt $f1,0(sp) - cvtqt $f1,$f1 - ldit $f26, 18446744073709551616.0 - addt $f26, $f1, $f26 - fcmovlt $f1, $f26, $f1 - - - /* Do the division. */ - divt $f10,$f1,$f10 - cvttqc $f10,$f10 - - /* Put the result in t12. */ - stt $f10,0(sp) - ldq t12,0(sp) - - - - - lda sp,16(sp) - ret zero,(t9),1 - .end NAME__(divqu) +#include "divrem.S" diff --git a/sysdeps/alpha/divrem.m4 b/sysdeps/alpha/divrem.m4 deleted file mode 100644 index d2f36383cb..0000000000 --- a/sysdeps/alpha/divrem.m4 +++ /dev/null @@ -1,51 +0,0 @@ -/* For each N divided by D, we do: - result = (double) N / (double) D - Then, for each N mod D, we do: - result = N - (D * divMODE (N, D)) - - FIXME: - The q and qu versions won't deal with operands > 50 bits. We also - don't check for divide by zero. */ - -#include "DEFS.h" -#if 0 -/* We do not handle div by zero yet. */ -#include -#endif -#include - -/* Avoid the definition of ret that we set in the alpha sysdep.h. */ -#undef ret - -define(path, `SYSDEP_DIR/macros.m4')dnl -include(path) - -FUNC__(OP) - /* First set up the dividend. */ - EXTEND(t10) - stq t10,0(sp) - ldt $f10,0(sp) - cvtqt $f10,$f10 - ADJQU($f10) - - /* Then set up the divisor. */ - EXTEND(t11) - stq t11,0(sp) - ldt $f1,0(sp) - cvtqt $f1,$f1 - ADJQU($f1) - - /* Do the division. */ - divt $f10,$f1,$f10 - cvttqc $f10,$f10 - - /* Put the result in t12. */ - stt $f10,0(sp) - ldq t12,0(sp) - FULLEXTEND(t12) - - DOREM - - lda sp,16(sp) - ret zero,(t9),1 - .end NAME__(OP) diff --git a/sysdeps/alpha/macros.m4 b/sysdeps/alpha/macros.m4 deleted file mode 100644 index f8c1fe9662..0000000000 --- a/sysdeps/alpha/macros.m4 +++ /dev/null @@ -1,34 +0,0 @@ -dnl NOTE: The $1 below is the argument to EXTEND, not register $1. -define(EXTEND, -`ifelse(SIZE, `l', -`ifelse(SIGNED, `true', -` sextl $1, $1 -',dnl -` zapnot $1, 0xf, $1 -')')')dnl - -dnl FULLEXTEND -- extend the register named in the first argument -define(FULLEXTEND, -`ifelse(SIZE, `l', -` sextl $1, $1 -')')dnl - -dnl This is used by divqu. -define(ADJQU, -`ifelse(MODE, `qu', -` ldit $f26, 18446744073709551616.0 - addt $f26, $1, $f26 - fcmovlt $1, $f26, $1 -')')dnl - -define(DOREM, -`ifelse(BASEOP, `rem', -` /* Compute the remainder. */ -ifelse(SIZE, `l', -` mull t11, t12, t11 - subl t10, t11, t12 -',dnl Note mulq/subq were only really used in remq, but we will find out -dnl if assuming they apply to remqu as well is wrong or not. -` mulq t11, t12, t11 - subq t10, t11, t12 -')')')dnl diff --git a/sysdeps/alpha/remlu.S b/sysdeps/alpha/remlu.S index 24e07cf327..3658d92bc1 100644 --- a/sysdeps/alpha/remlu.S +++ b/sysdeps/alpha/remlu.S @@ -1,60 +1,6 @@ - /* This file is generated from divrem.m4; DO NOT EDIT! */ -/* For each N divided by D, we do: - result = (double) N / (double) D - Then, for each N mod D, we do: - result = N - (D * divMODE (N, D)) +#define IS_REM 1 +#define SIZE 4 +#define SIGNED 0 +#define FUNC_NAME __remlu - FIXME: - The q and qu versions won't deal with operands > 50 bits. We also - don't check for divide by zero. */ - -#include "DEFS.h" -#if 0 -/* We do not handle div by zero yet. */ -#include -#endif -#include - -/* Avoid the definition of ret that we set in the alpha sysdep.h. */ -#undef ret - - - - - - -FUNC__(remlu) - /* First set up the dividend. */ - zapnot t10, 0xf, t10 - - stq t10,0(sp) - ldt $f10,0(sp) - cvtqt $f10,$f10 - - - /* Then set up the divisor. */ - zapnot t11, 0xf, t11 - - stq t11,0(sp) - ldt $f1,0(sp) - cvtqt $f1,$f1 - - - /* Do the division. */ - divt $f10,$f1,$f10 - cvttqc $f10,$f10 - - /* Put the result in t12. */ - stt $f10,0(sp) - ldq t12,0(sp) - sextl t12, t12 - - - /* Compute the remainder. */ - mull t11, t12, t11 - subl t10, t11, t12 - - - lda sp,16(sp) - ret zero,(t9),1 - .end NAME__(remlu) +#include "divrem.S" diff --git a/sysdeps/alpha/remq.S b/sysdeps/alpha/remq.S index ce38c2460a..61f2067383 100644 --- a/sysdeps/alpha/remq.S +++ b/sysdeps/alpha/remq.S @@ -1,57 +1,6 @@ - /* This file is generated from divrem.m4; DO NOT EDIT! */ -/* For each N divided by D, we do: - result = (double) N / (double) D - Then, for each N mod D, we do: - result = N - (D * divMODE (N, D)) +#define IS_REM 1 +#define SIZE 8 +#define SIGNED 1 +#define FUNC_NAME __remq - FIXME: - The q and qu versions won't deal with operands > 50 bits. We also - don't check for divide by zero. */ - -#include "DEFS.h" -#if 0 -/* We do not handle div by zero yet. */ -#include -#endif -#include - -/* Avoid the definition of ret that we set in the alpha sysdep.h. */ -#undef ret - - - - - - -FUNC__(remq) - /* First set up the dividend. */ - - stq t10,0(sp) - ldt $f10,0(sp) - cvtqt $f10,$f10 - - - /* Then set up the divisor. */ - - stq t11,0(sp) - ldt $f1,0(sp) - cvtqt $f1,$f1 - - - /* Do the division. */ - divt $f10,$f1,$f10 - cvttqc $f10,$f10 - - /* Put the result in t12. */ - stt $f10,0(sp) - ldq t12,0(sp) - - - /* Compute the remainder. */ - mulq t11, t12, t11 - subq t10, t11, t12 - - - lda sp,16(sp) - ret zero,(t9),1 - .end NAME__(remq) +#include "divrem.S" diff --git a/sysdeps/alpha/remqu.S b/sysdeps/alpha/remqu.S index 26bdd3b037..e22d5ac1c8 100644 --- a/sysdeps/alpha/remqu.S +++ b/sysdeps/alpha/remqu.S @@ -1,63 +1,6 @@ - /* This file is generated from divrem.m4; DO NOT EDIT! */ -/* For each N divided by D, we do: - result = (double) N / (double) D - Then, for each N mod D, we do: - result = N - (D * divMODE (N, D)) +#define IS_REM 1 +#define SIZE 8 +#define SIGNED 0 +#define FUNC_NAME __remqu - FIXME: - The q and qu versions won't deal with operands > 50 bits. We also - don't check for divide by zero. */ - -#include "DEFS.h" -#if 0 -/* We do not handle div by zero yet. */ -#include -#endif -#include - -/* Avoid the definition of ret that we set in the alpha sysdep.h. */ -#undef ret - - - - - - -FUNC__(remqu) - /* First set up the dividend. */ - - stq t10,0(sp) - ldt $f10,0(sp) - cvtqt $f10,$f10 - ldit $f26, 18446744073709551616.0 - addt $f26, $f10, $f26 - fcmovlt $f10, $f26, $f10 - - - /* Then set up the divisor. */ - - stq t11,0(sp) - ldt $f1,0(sp) - cvtqt $f1,$f1 - ldit $f26, 18446744073709551616.0 - addt $f26, $f1, $f26 - fcmovlt $f1, $f26, $f1 - - - /* Do the division. */ - divt $f10,$f1,$f10 - cvttqc $f10,$f10 - - /* Put the result in t12. */ - stt $f10,0(sp) - ldq t12,0(sp) - - - /* Compute the remainder. */ - mulq t11, t12, t11 - subq t10, t11, t12 - - - lda sp,16(sp) - ret zero,(t9),1 - .end NAME__(remqu) +#include "divrem.S" diff --git a/sysdeps/alpha/strlen.c b/sysdeps/alpha/strlen.c deleted file mode 100644 index 36f106c9c3..0000000000 --- a/sysdeps/alpha/strlen.c +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. - -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 -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -/* Return the length of the null-terminated string STR. Scan for - the null terminator quickly by testing eight bytes at a time. */ - -size_t -strlen (const char *str) -{ - const char *char_ptr; - const unsigned long int *longword_ptr; - - /* Handle the first few characters by reading one character at a time. - Do this until STR is aligned on a 8-byte border. */ - for (char_ptr = str; ((unsigned long int) char_ptr & 7) != 0; ++char_ptr) - if (*char_ptr == '\0') - return char_ptr - str; - - longword_ptr = (unsigned long int *) char_ptr; - - for (;;) - { - const unsigned long int longword = *longword_ptr++; - int mask; - - /* Set bits in MASK if bytes in LONGWORD are zero. */ - asm ("cmpbge $31, %1, %0" : "=r" (mask) : "r" (longword)); - if (mask) - { - /* Which of the bytes was the zero? */ - const char *cp = (const char *) (longword_ptr - 1); - int i; - - for (i = 0; i < 8; i++) - if (cp[i] == 0) - return cp - str + i; - } - } -} From 8a9cbf0d86622803e77af91071ff86e3148cfeb6 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 19 Mar 1996 19:53:15 +0000 Subject: [PATCH 0624/4487] Sun Feb 25 22:36:10 1996 David Mosberger-Tang * gmon/sys/gmon_out.h, gmon/bb_exit_func.c, sysdeps/generic/bb_init_func.c, sysdeps/alpha/bb_init_func.S: new files. --- sysdeps/alpha/bb_init_func.S | 85 ++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 sysdeps/alpha/bb_init_func.S diff --git a/sysdeps/alpha/bb_init_func.S b/sysdeps/alpha/bb_init_func.S new file mode 100644 index 0000000000..9bf985ccc0 --- /dev/null +++ b/sysdeps/alpha/bb_init_func.S @@ -0,0 +1,85 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. + Contributed by David Mosberger (davidm@cs.arizona.edu). + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* __bb_init_func is invoked at the beginning of each function, before +any registers have been saved. It is therefore safe to use any +caller-saved (call-used) registers (except for argument registers +a1-a5). */ + +#include +#ifdef __linux__ +# include +#else +# include +#endif + +/* + * These offsets should match with "struct bb" declared in gcc/libgcc2.c. + */ +#define ZERO_WORD 0x00 +#define NEXT 0x20 + + .set noat + .set noreorder + +ENTRY(__bb_init_func) + ldq t0, ZERO_WORD(a0) /* t0 <- blocks->zero_word */ + beq t0, init /* not initialized yet -> */ + ret + + +init: subq sp, 0x38, sp + stq pv, 0x30(sp) + br pv, 1f +1: ldgp gp, 0(pv) + + lda t1, __bb_head + lda t3, _gmonparam + ldq t2, 0(t1) + ldl t3, 0(t3) /* t3 = _gmonparam.state */ + ldi t0, 1 + stq t0, ZERO_WORD(a0) /* blocks->zero_word = 1 */ + stq t2, NEXT(a0) /* blocks->next = __bb_head */ + stq a0, 0(t1) + bne t2, leave + beq t3, leave /* t3 == GMON_PROF_ON? yes -> */ + + /* also need to initialize destructor: */ + stq ra, 0x00(sp) + lda a0, __bb_exit_func + stq a1, 0x08(sp) + lda pv, atexit + stq a2, 0x10(sp) + stq a3, 0x18(sp) + stq a4, 0x20(sp) + stq a5, 0x28(sp) + jsr ra, (pv), atexit + ldq ra, 0x00(sp) + ldq a1, 0x08(sp) + ldq a2, 0x10(sp) + ldq a3, 0x18(sp) + ldq a4, 0x20(sp) + ldq a5, 0x28(sp) + +leave: ldq pv, 0x30(sp) + addq sp, 0x38, sp + ret + + .end __bb_init_func From 0c9f45ab414294ecc11ada80829c6c47f175bd57 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 19 Mar 1996 19:53:56 +0000 Subject: [PATCH 0625/4487] Sat Feb 17 11:29:29 1996 David Mosberger-Tang * sysdeps/alpha/ffs.S: new file. --- sysdeps/alpha/ffs.S | 71 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 sysdeps/alpha/ffs.S diff --git a/sysdeps/alpha/ffs.S b/sysdeps/alpha/ffs.S new file mode 100644 index 0000000000..7676b85aaa --- /dev/null +++ b/sysdeps/alpha/ffs.S @@ -0,0 +1,71 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. + Contributed by David Mosberger (davidm@cs.arizona.edu). + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Finds the first bit set in an integer. Optimized for the Alpha +architecture. */ + +#include +#ifdef __linux__ +# include +#else +#include +#endif + + .set noreorder + .set noat + +ENTRY(ffs) + .prologue 0 + + ldq_u zero, 0(sp) # on the 21064, this helps dual-issuing + addl a0, zero, a0 # the last insn and reduces the stall + negq a0, t0 # due to the srl instruction + and a0, t0, t0 + clr v0 + beq a0, done + + # now do binary search for first non-zero bit + + zapnot t0, 0x03, t2 + addq v0, 16, t3 + cmoveq t2, t3, v0 + + zapnot t0, 0x05, t2 + addq v0, 8, t3 + cmoveq t2, t3, v0 + + srl t0, v0, t0 + addq v0, 1, v0 + + and t0, 0x0f, t2 + addq v0, 4, t3 + cmoveq t2, t3, v0 + + and t0, 0x33, t2 + addq v0, 2, t3 + cmoveq t2, t3, v0 + + and t0, 0x55, t2 + addq v0, 1, t3 + cmoveq t2, t3, v0 + +done: ret + + .end ffs From bd364076182aea8b2b8309fc7b02b91df565da13 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 19 Mar 1996 19:54:14 +0000 Subject: [PATCH 0626/4487] Sat Feb 17 11:29:29 1996 David Mosberger-Tang * sysdeps/alpha/fabs.c: File removed. --- sysdeps/alpha/fabs.c | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 sysdeps/alpha/fabs.c diff --git a/sysdeps/alpha/fabs.c b/sysdeps/alpha/fabs.c deleted file mode 100644 index 321df0d1e1..0000000000 --- a/sysdeps/alpha/fabs.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 1992 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#define __NO_MATH_INLINES - -#include - -__inline double -fabs (double __x) -{ - __asm ("cpys $f31, %1, %0" : "=f" (__x) : "f" (__x)); - return __x; -} From bf7a24fce291fc6496a4e4cb1a6a544e5dcf1391 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 19 Mar 1996 19:54:21 +0000 Subject: [PATCH 0627/4487] Wed Feb 14 00:21:17 1996 David Mosberger-Tang * sysdeps/unix/alpha/sysdep.h: new file (adapted from OSF/1 version). * sysdeps/unix/bsd/osf/alpha/sysdep.h: include sysdeps/unix/alpha/sysdep.h and removed definitions now in that file. --- sysdeps/unix/alpha/sysdep.h | 86 +++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 sysdeps/unix/alpha/sysdep.h diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h new file mode 100644 index 0000000000..9eb9032270 --- /dev/null +++ b/sysdeps/unix/alpha/sysdep.h @@ -0,0 +1,86 @@ +/* Copyright (C) 1992, 1995, 1996 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#ifdef ASSEMBLER + +#ifdef __STDC__ +#define ENTRY(name) \ + .globl name; \ + .align 3; \ + .ent name,0; \ + name##: \ + .frame sp,0,ra +#else +#define ENTRY(name) \ + .globl name; \ + .align 3; \ + .ent name,0; \ + name/**/: \ + .frame sp,0,ra +#endif + +/* Note that while it's better structurally, going back to set errno + can make things confusing if you're debugging---it looks like it's jumping + backwards into the previous fn. */ +#ifdef __STDC__ +#define PSEUDO(name, syscall_name, args) \ + .globl name; \ + .align 3; \ + .ent name,0; \ + \ +1: br gp,2f; \ +2: ldgp gp,0(gp); \ + lda pv,syscall_error; \ + jmp zero,(pv); \ + \ +name##: \ + ldi v0,SYS_ify(syscall_name); \ + .set noat; \ + call_pal PAL_callsys; \ + .set at; \ + bne a3,1b; \ +3: +#else +#define PSEUDO(name, syscall_name, args) \ + .globl name; \ + .align 3; \ + .ent name,0; \ + \ +1: br gp,2f; \ +2: ldgp gp,0(gp); \ + lda pv,syscall_error; \ + jmp zero,(pv); \ + \ +name/**/: \ + ldi v0,SYS_ify(syscall_name); \ + .set noat; \ + call_pal PAL_callsys; \ + .set at; \ + bne a3,1b; \ +3: +#endif + +#define ret ret zero,(ra),1 +#define r0 v0 +#define r1 a4 + +#define MOVE(x,y) mov x,y + +#endif From 437909194b3ec37ba0ad98d1adb44302495bf163 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 19 Mar 1996 20:13:37 +0000 Subject: [PATCH 0628/4487] Mon Mar 4 20:17:28 1996 David Mosberger-Tang * sysdeps/alpha/__math.h (atan, cabs): New functions. --- sysdeps/alpha/__math.h | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/sysdeps/alpha/__math.h b/sysdeps/alpha/__math.h index 5461fca2ac..9aea9d7097 100644 --- a/sysdeps/alpha/__math.h +++ b/sysdeps/alpha/__math.h @@ -1,5 +1,7 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Inline math functions for Alpha. +Copyright (C) 1996 Free Software Foundation, Inc. This file is part of the GNU C Library. +Contributed by David Mosberger-Tang. 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 @@ -32,4 +34,20 @@ fabs (double __x) return __x; } +extern __inline double +atan (double __x) +{ + extern double __atan2 (double, double); + return __atan2 (__x, 1.0); +} + +#ifdef __USE_MISC +extern __inline double +cabs (struct __cabs_complex __z) +{ + extern double __hypot (double, double); + return __hypot(__z.__x, __z.__y); +} +#endif + #endif From e952b53c52ca3dcc2d205a26115efdc7c96449ad Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 19 Mar 1996 20:14:38 +0000 Subject: [PATCH 0629/4487] Wed Feb 14 00:21:17 1996 David Mosberger-Tang * sysdeps/alpha/divl.S, sysdeps/alpha/divlu.S, sysdeps/alpha/divq.S, sysdeps/alpha/divqu.S, sysdeps/alpha/divrem.m4, sysdeps/alpha/macros.m4, sysdeps/alpha/reml.S, sysdeps/alpha/remlu.S, sysdeps/alpha/remq.S, sysdeps/alpha/remqu.S, sysdeps/alpha/strlen.c: Removed. --- sysdeps/alpha/reml.S | 64 ++++---------------------------------------- 1 file changed, 5 insertions(+), 59 deletions(-) diff --git a/sysdeps/alpha/reml.S b/sysdeps/alpha/reml.S index 95896fb831..cede136acd 100644 --- a/sysdeps/alpha/reml.S +++ b/sysdeps/alpha/reml.S @@ -1,60 +1,6 @@ - /* This file is generated from divrem.m4; DO NOT EDIT! */ -/* For each N divided by D, we do: - result = (double) N / (double) D - Then, for each N mod D, we do: - result = N - (D * divMODE (N, D)) +#define IS_REM 1 +#define SIZE 4 +#define SIGNED 1 +#define FUNC_NAME __reml - FIXME: - The q and qu versions won't deal with operands > 50 bits. We also - don't check for divide by zero. */ - -#include "DEFS.h" -#if 0 -/* We do not handle div by zero yet. */ -#include -#endif -#include - -/* Avoid the definition of ret that we set in the alpha sysdep.h. */ -#undef ret - - - - - - -FUNC__(reml) - /* First set up the dividend. */ - sextl t10, t10 - - stq t10,0(sp) - ldt $f10,0(sp) - cvtqt $f10,$f10 - - - /* Then set up the divisor. */ - sextl t11, t11 - - stq t11,0(sp) - ldt $f1,0(sp) - cvtqt $f1,$f1 - - - /* Do the division. */ - divt $f10,$f1,$f10 - cvttqc $f10,$f10 - - /* Put the result in t12. */ - stt $f10,0(sp) - ldq t12,0(sp) - sextl t12, t12 - - - /* Compute the remainder. */ - mull t11, t12, t11 - subl t10, t11, t12 - - - lda sp,16(sp) - ret zero,(t9),1 - .end NAME__(reml) +#include "divrem.S" From 62a6271405dc0c42f64284a5a9b258ab5c1f745c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 19 Mar 1996 20:18:07 +0000 Subject: [PATCH 0630/4487] Sun Feb 25 22:36:10 1996 David Mosberger-Tang * sysdeps/unix/sysv/linux/alpha/profil-counter.h: New file. --- .../unix/sysv/linux/alpha/profil-counter.h | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/profil-counter.h diff --git a/sysdeps/unix/sysv/linux/alpha/profil-counter.h b/sysdeps/unix/sysv/linux/alpha/profil-counter.h new file mode 100644 index 0000000000..6ab5a88c49 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/profil-counter.h @@ -0,0 +1,28 @@ +/* Low-level statistical profiling support function. Mostly POSIX.1 version. +Copyright (C) 1996 Free Software Foundation, Inc. +Contributed by David Mosberger +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +void +profil_counter (int signal, long a1, long a2, long a3, long a4, long a5, + struct sigcontext_struct sc) +{ + profil_count((void *) sc.sc_pc); +} From da9361f4ea30b57e56c936ec2131803cce7bc477 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 19 Mar 1996 20:18:59 +0000 Subject: [PATCH 0631/4487] Wed Feb 14 00:21:17 1996 David Mosberger-Tang * sysdeps/unix/sysv/linux/alpha/Makefile, sysdeps/unix/sysv/linux/alpha/brk.S, sysdeps/unix/sysv/linux/alpha/fpu_control.c, sysdeps/unix/sysv/linux/alpha/fpu_control.h, sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S, sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S, sysdeps/unix/sysv/linux/alpha/pipe.S, sysdeps/unix/sysv/linux/alpha/setfpucw.c, sysdeps/unix/sysv/linux/alpha/sigprocmask.c, sysdeps/unix/sysv/linux/alpha/speed.c, sysdeps/unix/sysv/linux/alpha/start.S, sysdeps/unix/sysv/linux/alpha/syscall.S, sysdeps/unix/sysv/linux/alpha/syscalls.list, sysdeps/unix/sysv/linux/alpha/alpha/regdef.h, sysdeps/unix/sysv/linux/alpha/sysdep.S, sysdeps/unix/sysv/linux/alpha/sysdep.h: New files. --- sysdeps/unix/sysv/linux/alpha/alpha/regdef.h | 44 ++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/alpha/regdef.h diff --git a/sysdeps/unix/sysv/linux/alpha/alpha/regdef.h b/sysdeps/unix/sysv/linux/alpha/alpha/regdef.h new file mode 100644 index 0000000000..142df9c4f8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/alpha/regdef.h @@ -0,0 +1,44 @@ +#ifndef __alpha_regdef_h__ +#define __alpha_regdef_h__ + +#define v0 $0 /* function return value */ + +#define t0 $1 /* temporary registers (caller-saved) */ +#define t1 $2 +#define t2 $3 +#define t3 $4 +#define t4 $5 +#define t5 $6 +#define t6 $7 +#define t7 $8 + +#define s0 $9 /* saved-registers (callee-saved registers) */ +#define s1 $10 +#define s2 $11 +#define s3 $12 +#define s4 $13 +#define s5 $14 +#define s6 $15 +#define fp s6 /* frame-pointer (s6 in frame-less procedures) */ + +#define a0 $16 /* argument registers (caller-saved) */ +#define a1 $17 +#define a2 $18 +#define a3 $19 +#define a4 $20 +#define a5 $21 + +#define t8 $22 /* more temps (caller-saved) */ +#define t9 $23 +#define t10 $24 +#define t11 $25 +#define ra $26 /* return address register */ +#define t12 $27 + +#define pv t12 /* procedure-variable register */ +#define AT $at /* assembler temporary */ +#define gp $29 /* global pointer */ +#define sp $30 /* stack pointer */ +#define zero $31 /* reads as zero, writes are noops */ + +#endif /* __alpha_regdef_h__ */ From 1bf8715604009306146921de4c53cb1dcde2a1c5 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 25 Mar 1996 09:56:36 +0000 Subject: [PATCH 0632/4487] Wed Mar 20 20:08:46 1996 Andreas Schwab * sysdeps/unix/sysv/linux/m68k/sysdep.h: Don't define NO_UNDERSCORES. --- sysdeps/unix/sysv/linux/m68k/sysdep.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h index ee481172d3..fe2c6aa823 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -18,9 +18,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* In the Linux/ELF world, C symbols are asm symbols. */ -#define NO_UNDERSCORES - #include /* For Linux we can use the system call table in the header file From e37ebecf0c73d9e601d729553161dd3fc386456f Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Wed, 27 Mar 1996 00:46:37 +0000 Subject: [PATCH 0633/4487] * sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h (NO_UNDERSCORES): Use wrapped with #ifndef, to avoid config.h defining it. --- sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h index edb98309e6..49eac9a3eb 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h @@ -17,7 +17,9 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Solaris 2 does not precede the asm names of C symbols with a `_'. */ +#ifndef NO_UNDERSCORES #define NO_UNDERSCORES +#endif #include From 2295f3f958478d95c312cd62d89623527e29de20 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 27 Mar 1996 20:31:14 +0000 Subject: [PATCH 0634/4487] Wed Mar 27 10:26:21 1996 David Mosberger-Tang * sysdeps/alpha/setjmp.S: Must establish global pointer before address of __sigsetjmp_aux can be loaded. --- sysdeps/alpha/setjmp.S | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S index 8ea2b50f87..04b8068eb9 100644 --- a/sysdeps/alpha/setjmp.S +++ b/sysdeps/alpha/setjmp.S @@ -22,6 +22,7 @@ Cambridge, MA 02139, USA. */ reliably access the stack or frame pointers, so we pass them in as extra arguments. */ ENTRY (__sigsetjmp) + ldgp $29, 0($27) lda $27, __sigsetjmp_aux/* Load address to jump to. */ bis $30, $30, $18 /* Pass SP as 3rd arg. */ bis $15, $15, $19 /* Pass FP as 4th arg. */ From 2597b8812aee44bcc70b418e5f747ae94cdbc388 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 20 Apr 1996 22:08:45 +0000 Subject: [PATCH 0635/4487] Sat Apr 20 17:07:17 1996 Ulrich Drepper * assert/assert.h, ctype/ctype.h, dirent/dirent.h, errno.h, grp/grp.h, io/fcntl.h, io/sys/stat.h, io/utime.h, locale/locale.h, math/math.h, misc/nlist.h, misc/sgtty.h, misc/sys/file.h, misc/sys/ioctl.h, misc/sys/uio.h, posix/sys/times.h, posix/sys/types.h, posix/sys/utsname.h, posix/sys/wait.h, posix/tar.h, posix/wordexp.h, pwd/pwd.h, resource/sys/vlimit.h, resource/sys/vtimes.h, setjmp/setjmp.h, signal/signal.h, stdio-common/printf.h, stdlib/alloca.h, stdlib/stdlib.h, string/string.h, sysdeps/generic/sigaction.h, sysdeps/generic/sigset.h, sysdeps/generic/sys/ptrace.h, sysdeps/generic/sys/ptrace.h, sysdeps/unix/bsd/osf/sigaction.h, sysdeps/unix/sysv/linux/sys/ptrace.h, sysdeps/unix/sysv/minix/sigaction.h, sysdeps/unix/sysv/sco3.2.4/sigaction.h, sysdeps/unix/sysv/sysv4/sigaction.h, sysdeps/unix/sysv/sysv4/sigset.h, termios/termios.h, time/sys/time.h, time/time.h: Fix copyright comment. --- sysdeps/unix/bsd/osf/sigaction.h | 4 ++-- sysdeps/unix/sysv/minix/sigaction.h | 4 ++-- sysdeps/unix/sysv/sco3.2.4/sigaction.h | 4 ++-- sysdeps/unix/sysv/sysv4/sigaction.h | 4 ++-- sysdeps/unix/sysv/sysv4/sigset.h | 5 ++--- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/sysdeps/unix/bsd/osf/sigaction.h b/sysdeps/unix/bsd/osf/sigaction.h index 8a4e2c5b84..d809b6bd74 100644 --- a/sysdeps/unix/bsd/osf/sigaction.h +++ b/sysdeps/unix/bsd/osf/sigaction.h @@ -1,5 +1,5 @@ /* Structure and constand definitions for sigaction et al. OSF/1 version. - Copyright (C) 1993 Free Software Foundation, Inc. + Copyright (C) 1993, 1996 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -14,7 +14,7 @@ Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave, +not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Structure describing the action to be taken when a signal arrives. */ diff --git a/sysdeps/unix/sysv/minix/sigaction.h b/sysdeps/unix/sysv/minix/sigaction.h index 9395206407..6b0c460914 100644 --- a/sysdeps/unix/sysv/minix/sigaction.h +++ b/sysdeps/unix/sysv/minix/sigaction.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1996 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 @@ -13,7 +13,7 @@ Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave, +not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Structure describing the action to be taken when a signal arrives. */ diff --git a/sysdeps/unix/sysv/sco3.2.4/sigaction.h b/sysdeps/unix/sysv/sco3.2.4/sigaction.h index c6344f0810..c21b928cdb 100644 --- a/sysdeps/unix/sysv/sco3.2.4/sigaction.h +++ b/sysdeps/unix/sysv/sco3.2.4/sigaction.h @@ -1,5 +1,5 @@ /* The proper definitions for SCO's sigaction. -Copyright (C) 1993, 1994 Free Software Foundation, Inc. +Copyright (C) 1993, 1994, 1996 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 @@ -14,7 +14,7 @@ Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave, +not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Structure describing the action to be taken when a signal arrives. */ diff --git a/sysdeps/unix/sysv/sysv4/sigaction.h b/sysdeps/unix/sysv/sysv4/sigaction.h index dbb31f1077..1305ba61e6 100644 --- a/sysdeps/unix/sysv/sysv4/sigaction.h +++ b/sysdeps/unix/sysv/sysv4/sigaction.h @@ -1,5 +1,5 @@ /* The proper definitions for SVR4's sigaction. -Copyright (C) 1993, 1994 Free Software Foundation, Inc. +Copyright (C) 1993, 1994, 1996 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 @@ -14,7 +14,7 @@ Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave, +not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Structure describing the action to be taken when a signal arrives. */ diff --git a/sysdeps/unix/sysv/sysv4/sigset.h b/sysdeps/unix/sysv/sysv4/sigset.h index b21b519fc9..57aff36ab7 100644 --- a/sysdeps/unix/sysv/sysv4/sigset.h +++ b/sysdeps/unix/sysv/sysv4/sigset.h @@ -1,5 +1,5 @@ /* __sig_atomic_t, __sigset_t, and related definitions. SVR4 version. -Copyright (C) 1994, 1995 Free Software Foundation, Inc. +Copyright (C) 1994, 1995, 1996 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 @@ -14,7 +14,7 @@ Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave, +not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _SIGSET_H_types @@ -94,4 +94,3 @@ __sigismember (__const __sigset_t *__set, int __sig) } #endif /* ! _SIGSET_H_fns */ - From 19d945c4b36d3a75ef348711c9eeeb587b572a82 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 1 May 1996 13:47:01 +0000 Subject: [PATCH 0636/4487] Mon Apr 29 02:48:26 1996 Ulrich Drepper * sysdeps/posix/sysconf.c: Add handling of _SC_REALTIME_SIGNALS, _SC_PRIORITY_SCHEDULING, _SC_TIMERS, _SC_ASYNCHRONOUS_IO, _SC_PRIORITIZED_IO, _SC_SYNCHRONIZED_IO, _SC_FSYNC, _SC_MAPPED_FILES, _SC_MEMLOCK, _SC_MEMLOCK_RANGE, _SC_MEMORY_PROTECTION, _SC_MESSAGE_PASSING, _SC_SEMAPHORES, _SC_SHARED_MEMORY_OBJECTS, and _SC_CHARCLASS_NAME_MAX. * sysdeps/stub/sysconf.c: Ditto. * sysdeps/unix/sysv/sysv4/sysconf.c: Ditto. --- sysdeps/unix/sysv/sysv4/sysconf.c | 108 +++++++++++++++++++++++++++++- 1 file changed, 107 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/sysv4/sysconf.c b/sysdeps/unix/sysv/sysv4/sysconf.c index 607cd05d14..9ed5cbcd20 100644 --- a/sysdeps/unix/sysv/sysv4/sysconf.c +++ b/sysdeps/unix/sysv/sysv4/sysconf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -74,12 +74,112 @@ DEFUN(__sysconf, (name), int name) #else return -1; #endif + case _SC_SAVED_IDS: #ifdef _POSIX_SAVED_IDS return 1; #else return -1; #endif + + case _SC_REALTIME_SIGNALS: +#ifdef _POSIX_REALTIME_SIGNALS + return 1; +#else + return -1; +#endif + + case _SC_PRIORITY_SCHEDULING: +#ifdef _POSIX_PRIORITY_SCHEDULING + return 1; +#else + return -1; +#endif + + case _SC_TIMERS: +#ifdef _POSIX_TIMERS + return 1; +#else + return -1; +#endif + + case _SC_ASYNCHRONOUS_IO: +#ifdef _POSIX_ASYNCHRONOUS_IO + return 1; +#else + return -1; +#endif + + case _SC_PRIORITIZED_IO: +#ifdef _POSIX_PRIORITIZED_IO + return 1; +#else + return -1; +#endif + + case _SC_SYNCHRONIZED_IO: +#ifdef _POSIX_SYNCHRONIZED_IO + return 1; +#else + return -1; +#endif + + case _SC_FSYNC: +#ifdef _POSIX_FSYNC + return 1; +#else + return -1; +#endif + + case _SC_MAPPED_FILES: +#ifdef _POSIX_MAPPED_FILES + return 1; +#else + return -1; +#endif + + case _SC_MEMLOCK: +#ifdef _POSIX_MEMLOCK + return 1; +#else + return -1; +#endif + + case _SC_MEMLOCK_RANGE: +#ifdef _POSIX_MEMLOCK_RANGE + return 1; +#else + return -1; +#endif + + case _SC_MEMORY_PROTECTION: +#ifdef _POSIX_MEMORY_PROTECTION + return 1; +#else + return -1; +#endif + + case _SC_MESSAGE_PASSING: +#ifdef _POSIX_MESSAGE_PASSING + return 1; +#else + return -1; +#endif + + case _SC_SEMAPHORES: +#ifdef _POSIX_SEMAPHORES + return 1; +#else + return -1; +#endif + + case _SC_SHARED_MEMORY_OBJECTS: +#ifdef _POSIX_SHARED_MEMORY_OBJECTS + return 1; +#else + return -1; +#endif + case _SC_VERSION: return _POSIX_VERSION; @@ -142,6 +242,12 @@ DEFUN(__sysconf, (name), int name) return -1; #endif + case _SC_CHARCLASS_NAME_MAX: +#ifdef CHARCLASS_NAME_MAX + return CHARCLASS_NAME_MAX; +#else + return -1; +#endif case _SC_2_VERSION: /* This is actually supposed to return the version From 3170dd85853ff4199c4766ba2b670739d3726180 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 3 May 1996 16:51:51 +0000 Subject: [PATCH 0637/4487] Thu May 2 22:33:14 1996 Andreas Schwab * sysdeps/m68k/fpu/e_acos.c, sysdeps/m68k/fpu/e_acosf.c, sysdeps/m68k/fpu/e_fmod.c, sysdeps/m68k/fpu/e_fmodf.c, sysdeps/m68k/fpu/isinfl.c, sysdeps/m68k/fpu/isnanl.c, sysdeps/m68k/fpu/s_atan.c, sysdeps/m68k/fpu/s_atanf.c, sysdeps/m68k/fpu/s_frexp.c, sysdeps/m68k/fpu/s_frexpf.c, sysdeps/m68k/fpu/s_ilogb.c, sysdeps/m68k/fpu/s_ilogbf.c, sysdeps/m68k/fpu/s_isinf.c, sysdeps/m68k/fpu/s_isinff.c, sysdeps/m68k/fpu/s_ldexp.c, sysdeps/m68k/fpu/s_ldexpf.c, sysdeps/m68k/fpu/s_modf.c, sysdeps/m68k/fpu/s_modff.c: Don't define __NO_MATH_INLINES, which is already defined on command line. --- sysdeps/m68k/fpu/e_acos.c | 1 - sysdeps/m68k/fpu/e_acosf.c | 1 - sysdeps/m68k/fpu/e_fmod.c | 1 - sysdeps/m68k/fpu/e_fmodf.c | 1 - sysdeps/m68k/fpu/isinfl.c | 1 - sysdeps/m68k/fpu/isnanl.c | 1 - sysdeps/m68k/fpu/s_atan.c | 1 - sysdeps/m68k/fpu/s_atanf.c | 1 - sysdeps/m68k/fpu/s_frexp.c | 1 - sysdeps/m68k/fpu/s_frexpf.c | 1 - sysdeps/m68k/fpu/s_ilogb.c | 1 - sysdeps/m68k/fpu/s_ilogbf.c | 1 - sysdeps/m68k/fpu/s_isinf.c | 1 - sysdeps/m68k/fpu/s_isinff.c | 1 - sysdeps/m68k/fpu/s_ldexp.c | 1 - sysdeps/m68k/fpu/s_ldexpf.c | 1 - sysdeps/m68k/fpu/s_modf.c | 1 - sysdeps/m68k/fpu/s_modff.c | 1 - 18 files changed, 18 deletions(-) diff --git a/sysdeps/m68k/fpu/e_acos.c b/sysdeps/m68k/fpu/e_acos.c index 1a29222997..34dfc82cff 100644 --- a/sysdeps/m68k/fpu/e_acos.c +++ b/sysdeps/m68k/fpu/e_acos.c @@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#define __NO_MATH_INLINES #include #ifndef FUNC diff --git a/sysdeps/m68k/fpu/e_acosf.c b/sysdeps/m68k/fpu/e_acosf.c index 51968156f5..34da7ee163 100644 --- a/sysdeps/m68k/fpu/e_acosf.c +++ b/sysdeps/m68k/fpu/e_acosf.c @@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#define __NO_MATH_INLINES #include #ifndef FUNC diff --git a/sysdeps/m68k/fpu/e_fmod.c b/sysdeps/m68k/fpu/e_fmod.c index 310b1c41fa..578fa3ce53 100644 --- a/sysdeps/m68k/fpu/e_fmod.c +++ b/sysdeps/m68k/fpu/e_fmod.c @@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#define __NO_MATH_INLINES #include #ifndef FUNC diff --git a/sysdeps/m68k/fpu/e_fmodf.c b/sysdeps/m68k/fpu/e_fmodf.c index 1a74c3611b..b3c3eadddf 100644 --- a/sysdeps/m68k/fpu/e_fmodf.c +++ b/sysdeps/m68k/fpu/e_fmodf.c @@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#define __NO_MATH_INLINES #include #ifndef FUNC diff --git a/sysdeps/m68k/fpu/isinfl.c b/sysdeps/m68k/fpu/isinfl.c index 77fd759182..97b5983d0f 100644 --- a/sysdeps/m68k/fpu/isinfl.c +++ b/sysdeps/m68k/fpu/isinfl.c @@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#define __NO_MATH_INLINES #include int diff --git a/sysdeps/m68k/fpu/isnanl.c b/sysdeps/m68k/fpu/isnanl.c index 1e58ea4ebd..e5e3db2171 100644 --- a/sysdeps/m68k/fpu/isnanl.c +++ b/sysdeps/m68k/fpu/isnanl.c @@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#define __NO_MATH_INLINES #include int diff --git a/sysdeps/m68k/fpu/s_atan.c b/sysdeps/m68k/fpu/s_atan.c index f1cc9757b5..51916e12ff 100644 --- a/sysdeps/m68k/fpu/s_atan.c +++ b/sysdeps/m68k/fpu/s_atan.c @@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#define __NO_MATH_INLINES #include #ifndef FUNC diff --git a/sysdeps/m68k/fpu/s_atanf.c b/sysdeps/m68k/fpu/s_atanf.c index 5d1f337bee..d26f83875b 100644 --- a/sysdeps/m68k/fpu/s_atanf.c +++ b/sysdeps/m68k/fpu/s_atanf.c @@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#define __NO_MATH_INLINES #include #ifndef FUNC diff --git a/sysdeps/m68k/fpu/s_frexp.c b/sysdeps/m68k/fpu/s_frexp.c index b24af74956..45c054016d 100644 --- a/sysdeps/m68k/fpu/s_frexp.c +++ b/sysdeps/m68k/fpu/s_frexp.c @@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#define __NO_MATH_INLINES #include double diff --git a/sysdeps/m68k/fpu/s_frexpf.c b/sysdeps/m68k/fpu/s_frexpf.c index c7cd98a684..dd30f6c39c 100644 --- a/sysdeps/m68k/fpu/s_frexpf.c +++ b/sysdeps/m68k/fpu/s_frexpf.c @@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#define __NO_MATH_INLINES #include float diff --git a/sysdeps/m68k/fpu/s_ilogb.c b/sysdeps/m68k/fpu/s_ilogb.c index 2df00a656a..4119df968a 100644 --- a/sysdeps/m68k/fpu/s_ilogb.c +++ b/sysdeps/m68k/fpu/s_ilogb.c @@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#define __NO_MATH_INLINES #include int diff --git a/sysdeps/m68k/fpu/s_ilogbf.c b/sysdeps/m68k/fpu/s_ilogbf.c index 05f1546a96..8d9a027f22 100644 --- a/sysdeps/m68k/fpu/s_ilogbf.c +++ b/sysdeps/m68k/fpu/s_ilogbf.c @@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#define __NO_MATH_INLINES #include int diff --git a/sysdeps/m68k/fpu/s_isinf.c b/sysdeps/m68k/fpu/s_isinf.c index 96745337c9..eec07c7d3a 100644 --- a/sysdeps/m68k/fpu/s_isinf.c +++ b/sysdeps/m68k/fpu/s_isinf.c @@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#define __NO_MATH_INLINES #include #ifndef FUNC diff --git a/sysdeps/m68k/fpu/s_isinff.c b/sysdeps/m68k/fpu/s_isinff.c index d9101a9fd9..8f18db5b08 100644 --- a/sysdeps/m68k/fpu/s_isinff.c +++ b/sysdeps/m68k/fpu/s_isinff.c @@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#define __NO_MATH_INLINES #include #ifndef FUNC diff --git a/sysdeps/m68k/fpu/s_ldexp.c b/sysdeps/m68k/fpu/s_ldexp.c index ee7662e7d2..67513d4875 100644 --- a/sysdeps/m68k/fpu/s_ldexp.c +++ b/sysdeps/m68k/fpu/s_ldexp.c @@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#define __NO_MATH_INLINES #include #ifndef FUNC diff --git a/sysdeps/m68k/fpu/s_ldexpf.c b/sysdeps/m68k/fpu/s_ldexpf.c index a9741732a6..94abf25ac1 100644 --- a/sysdeps/m68k/fpu/s_ldexpf.c +++ b/sysdeps/m68k/fpu/s_ldexpf.c @@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#define __NO_MATH_INLINES #include #ifndef FUNC diff --git a/sysdeps/m68k/fpu/s_modf.c b/sysdeps/m68k/fpu/s_modf.c index 355df2fb19..ce70be8168 100644 --- a/sysdeps/m68k/fpu/s_modf.c +++ b/sysdeps/m68k/fpu/s_modf.c @@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#define __NO_MATH_INLINES #include double diff --git a/sysdeps/m68k/fpu/s_modff.c b/sysdeps/m68k/fpu/s_modff.c index f56bcb45ef..04b51d5be1 100644 --- a/sysdeps/m68k/fpu/s_modff.c +++ b/sysdeps/m68k/fpu/s_modff.c @@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#define __NO_MATH_INLINES #include float From 8f202d4b835faa064c6e816d52bac03ef6ccc99a Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 3 May 1996 16:52:28 +0000 Subject: [PATCH 0638/4487] Thu May 2 22:41:31 1996 Andreas Schwab * sysdeps/unix/sysv/linux/m68k/fpu_control.h (_FPU_DEFAULT): Disable all exceptions. --- sysdeps/unix/sysv/linux/m68k/fpu_control.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sysdeps/unix/sysv/linux/m68k/fpu_control.h b/sysdeps/unix/sysv/linux/m68k/fpu_control.h index 0b3623d9a3..97bde853bc 100644 --- a/sysdeps/unix/sysv/linux/m68k/fpu_control.h +++ b/sysdeps/unix/sysv/linux/m68k/fpu_control.h @@ -80,11 +80,9 @@ Cambridge, MA 02139, USA. */ /* Now two recommended fpucr */ -/* Linux default: - - extended precision - - rounding to nearest - - exceptions on overflow, zero divide and NaN */ -#define _FPU_DEFAULT 0x00005400 +/* The fdlibm code requires no interrupts for exceptions. Don't + change the rounding mode, it would break long double I/O! */ +#define _FPU_DEFAULT 0x00000000 /* IEEE: same as above, but exceptions. We must make it non-zero so that __setfpucw works. This bit will be ignored. */ From 6c07070b0ce17b634b516b28f02d5a1815d4dd04 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 7 May 1996 21:04:45 +0000 Subject: [PATCH 0639/4487] Updated from /src/gmp-2.0 --- sysdeps/alpha/add_n.s | 3 +- sysdeps/alpha/addmul_1.s | 3 +- sysdeps/alpha/alphaev5/add_n.s | 3 +- sysdeps/alpha/alphaev5/lshift.s | 3 +- sysdeps/alpha/alphaev5/rshift.s | 3 +- sysdeps/alpha/alphaev5/sub_n.s | 3 +- sysdeps/alpha/gmp-mparam.h | 3 +- sysdeps/alpha/lshift.s | 3 +- sysdeps/alpha/mul_1.s | 3 +- sysdeps/alpha/rshift.s | 3 +- sysdeps/alpha/sub_n.s | 3 +- sysdeps/alpha/submul_1.s | 3 +- sysdeps/alpha/udiv_qrnnd.S | 3 +- sysdeps/hppa/add_n.s | 3 +- sysdeps/hppa/hppa1.1/addmul_1.s | 3 +- sysdeps/hppa/hppa1.1/mul_1.s | 3 +- sysdeps/hppa/hppa1.1/submul_1.s | 3 +- sysdeps/hppa/hppa1.1/udiv_qrnnd.s | 3 +- sysdeps/hppa/lshift.s | 3 +- sysdeps/hppa/rshift.s | 3 +- sysdeps/hppa/sub_n.s | 3 +- sysdeps/hppa/udiv_qrnnd.s | 3 +- sysdeps/m68k/add_n.S | 3 +- sysdeps/m68k/lshift.S | 3 +- sysdeps/m68k/m68020/addmul_1.S | 3 +- sysdeps/m68k/m68020/mul_1.S | 3 +- sysdeps/m68k/m68020/submul_1.S | 3 +- sysdeps/m68k/rshift.S | 3 +- sysdeps/m68k/sub_n.S | 3 +- sysdeps/m88k/add_n.s | 3 +- sysdeps/m88k/m88110/add_n.S | 3 +- sysdeps/m88k/m88110/addmul_1.s | 3 +- sysdeps/m88k/m88110/mul_1.s | 3 +- sysdeps/m88k/m88110/sub_n.S | 3 +- sysdeps/m88k/mul_1.s | 3 +- sysdeps/m88k/sub_n.s | 3 +- sysdeps/mips/add_n.s | 3 +- sysdeps/mips/addmul_1.s | 3 +- sysdeps/mips/lshift.s | 3 +- sysdeps/mips/mips3/add_n.s | 3 +- sysdeps/mips/mips3/addmul_1.s | 3 +- sysdeps/mips/mips3/gmp-mparam.h | 3 +- sysdeps/mips/mips3/lshift.s | 3 +- sysdeps/mips/mips3/mul_1.s | 3 +- sysdeps/mips/mips3/rshift.s | 3 +- sysdeps/mips/mips3/sub_n.s | 3 +- sysdeps/mips/mips3/submul_1.s | 3 +- sysdeps/mips/mul_1.s | 3 +- sysdeps/mips/rshift.s | 3 +- sysdeps/mips/sub_n.s | 3 +- sysdeps/mips/submul_1.s | 3 +- sysdeps/rs6000/add_n.s | 41 ++++++++++++++++++++++----- sysdeps/rs6000/addmul_1.s | 3 +- sysdeps/rs6000/lshift.s | 3 +- sysdeps/rs6000/mul_1.s | 3 +- sysdeps/rs6000/rshift.s | 3 +- sysdeps/rs6000/sub_n.s | 47 ++++++++++++++++++++++++------- sysdeps/rs6000/submul_1.s | 3 +- sysdeps/vax/add_n.s | 3 +- sysdeps/vax/addmul_1.s | 3 +- sysdeps/vax/gmp-mparam.h | 3 +- sysdeps/vax/mul_1.s | 3 +- sysdeps/vax/sub_n.s | 3 +- sysdeps/vax/submul_1.s | 3 +- sysdeps/z8000/add_n.s | 3 +- sysdeps/z8000/gmp-mparam.h | 3 +- sysdeps/z8000/mul_1.s | 3 +- sysdeps/z8000/sub_n.s | 3 +- 68 files changed, 203 insertions(+), 83 deletions(-) diff --git a/sysdeps/alpha/add_n.s b/sysdeps/alpha/add_n.s index e1ad4600f5..426556e398 100644 --- a/sysdeps/alpha/add_n.s +++ b/sysdeps/alpha/add_n.s @@ -17,7 +17,8 @@ # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + # MA 02111-1307, USA. # INPUT PARAMETERS diff --git a/sysdeps/alpha/addmul_1.s b/sysdeps/alpha/addmul_1.s index 8b168cb46d..048238ae9d 100644 --- a/sysdeps/alpha/addmul_1.s +++ b/sysdeps/alpha/addmul_1.s @@ -17,7 +17,8 @@ # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + # MA 02111-1307, USA. # INPUT PARAMETERS diff --git a/sysdeps/alpha/alphaev5/add_n.s b/sysdeps/alpha/alphaev5/add_n.s index 66cf82b3c3..1251a1fb71 100644 --- a/sysdeps/alpha/alphaev5/add_n.s +++ b/sysdeps/alpha/alphaev5/add_n.s @@ -17,7 +17,8 @@ # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + # MA 02111-1307, USA. # INPUT PARAMETERS diff --git a/sysdeps/alpha/alphaev5/lshift.s b/sysdeps/alpha/alphaev5/lshift.s index 392b4249b8..ced55b7203 100644 --- a/sysdeps/alpha/alphaev5/lshift.s +++ b/sysdeps/alpha/alphaev5/lshift.s @@ -16,7 +16,8 @@ # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + # MA 02111-1307, USA. # INPUT PARAMETERS diff --git a/sysdeps/alpha/alphaev5/rshift.s b/sysdeps/alpha/alphaev5/rshift.s index d20dde35b7..6e24fef965 100644 --- a/sysdeps/alpha/alphaev5/rshift.s +++ b/sysdeps/alpha/alphaev5/rshift.s @@ -16,7 +16,8 @@ # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + # MA 02111-1307, USA. # INPUT PARAMETERS diff --git a/sysdeps/alpha/alphaev5/sub_n.s b/sysdeps/alpha/alphaev5/sub_n.s index c9f3a4ec3a..6743af50b8 100644 --- a/sysdeps/alpha/alphaev5/sub_n.s +++ b/sysdeps/alpha/alphaev5/sub_n.s @@ -17,7 +17,8 @@ # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + # MA 02111-1307, USA. # INPUT PARAMETERS diff --git a/sysdeps/alpha/gmp-mparam.h b/sysdeps/alpha/gmp-mparam.h index 05c893f790..a3c66974de 100644 --- a/sysdeps/alpha/gmp-mparam.h +++ b/sysdeps/alpha/gmp-mparam.h @@ -16,7 +16,8 @@ License for more details. You should have received a copy of the GNU Library General Public License along with the GNU MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +MA 02111-1307, USA. */ #define BITS_PER_MP_LIMB 64 #define BYTES_PER_MP_LIMB 8 diff --git a/sysdeps/alpha/lshift.s b/sysdeps/alpha/lshift.s index aa8417bb6a..13bd24a427 100644 --- a/sysdeps/alpha/lshift.s +++ b/sysdeps/alpha/lshift.s @@ -16,7 +16,8 @@ # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + # MA 02111-1307, USA. # INPUT PARAMETERS diff --git a/sysdeps/alpha/mul_1.s b/sysdeps/alpha/mul_1.s index 58a63dfa5d..a1f5a94b9e 100644 --- a/sysdeps/alpha/mul_1.s +++ b/sysdeps/alpha/mul_1.s @@ -17,7 +17,8 @@ # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + # MA 02111-1307, USA. # INPUT PARAMETERS diff --git a/sysdeps/alpha/rshift.s b/sysdeps/alpha/rshift.s index 037b776017..389054ab0e 100644 --- a/sysdeps/alpha/rshift.s +++ b/sysdeps/alpha/rshift.s @@ -16,7 +16,8 @@ # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + # MA 02111-1307, USA. # INPUT PARAMETERS diff --git a/sysdeps/alpha/sub_n.s b/sysdeps/alpha/sub_n.s index 5200025b41..3c90c11697 100644 --- a/sysdeps/alpha/sub_n.s +++ b/sysdeps/alpha/sub_n.s @@ -17,7 +17,8 @@ # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + # MA 02111-1307, USA. # INPUT PARAMETERS diff --git a/sysdeps/alpha/submul_1.s b/sysdeps/alpha/submul_1.s index 292b2c18b6..1ed0c6a8d9 100644 --- a/sysdeps/alpha/submul_1.s +++ b/sysdeps/alpha/submul_1.s @@ -17,7 +17,8 @@ # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + # MA 02111-1307, USA. # INPUT PARAMETERS diff --git a/sysdeps/alpha/udiv_qrnnd.S b/sysdeps/alpha/udiv_qrnnd.S index ce590ede6c..d3d2cee93d 100644 --- a/sysdeps/alpha/udiv_qrnnd.S +++ b/sysdeps/alpha/udiv_qrnnd.S @@ -16,7 +16,8 @@ # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + # MA 02111-1307, USA. .set noreorder diff --git a/sysdeps/hppa/add_n.s b/sysdeps/hppa/add_n.s index 7f3e32342b..b4a1428362 100644 --- a/sysdeps/hppa/add_n.s +++ b/sysdeps/hppa/add_n.s @@ -17,7 +17,8 @@ ; You should have received a copy of the GNU Library General Public License ; along with the GNU MP Library; see the file COPYING.LIB. If not, write to -; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +; MA 02111-1307, USA. ; INPUT PARAMETERS diff --git a/sysdeps/hppa/hppa1.1/addmul_1.s b/sysdeps/hppa/hppa1.1/addmul_1.s index a9dfdd1c28..0fdcb3cb20 100644 --- a/sysdeps/hppa/hppa1.1/addmul_1.s +++ b/sysdeps/hppa/hppa1.1/addmul_1.s @@ -17,7 +17,8 @@ ; You should have received a copy of the GNU Library General Public License ; along with the GNU MP Library; see the file COPYING.LIB. If not, write to -; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +; MA 02111-1307, USA. ; INPUT PARAMETERS diff --git a/sysdeps/hppa/hppa1.1/mul_1.s b/sysdeps/hppa/hppa1.1/mul_1.s index ebf0778b90..cdd0c1d7fa 100644 --- a/sysdeps/hppa/hppa1.1/mul_1.s +++ b/sysdeps/hppa/hppa1.1/mul_1.s @@ -17,7 +17,8 @@ ; You should have received a copy of the GNU Library General Public License ; along with the GNU MP Library; see the file COPYING.LIB. If not, write to -; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +; MA 02111-1307, USA. ; INPUT PARAMETERS diff --git a/sysdeps/hppa/hppa1.1/submul_1.s b/sysdeps/hppa/hppa1.1/submul_1.s index 44cabf4690..a4a385467e 100644 --- a/sysdeps/hppa/hppa1.1/submul_1.s +++ b/sysdeps/hppa/hppa1.1/submul_1.s @@ -17,7 +17,8 @@ ; You should have received a copy of the GNU Library General Public License ; along with the GNU MP Library; see the file COPYING.LIB. If not, write to -; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +; MA 02111-1307, USA. ; INPUT PARAMETERS diff --git a/sysdeps/hppa/hppa1.1/udiv_qrnnd.s b/sysdeps/hppa/hppa1.1/udiv_qrnnd.s index 4ffef3a4fb..bf7dc70cd7 100644 --- a/sysdeps/hppa/hppa1.1/udiv_qrnnd.s +++ b/sysdeps/hppa/hppa1.1/udiv_qrnnd.s @@ -17,7 +17,8 @@ ; You should have received a copy of the GNU Library General Public License ; along with the GNU MP Library; see the file COPYING.LIB. If not, write to -; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +; MA 02111-1307, USA. ; INPUT PARAMETERS diff --git a/sysdeps/hppa/lshift.s b/sysdeps/hppa/lshift.s index 0479f4a281..abac6ec201 100644 --- a/sysdeps/hppa/lshift.s +++ b/sysdeps/hppa/lshift.s @@ -16,7 +16,8 @@ ; You should have received a copy of the GNU Library General Public License ; along with the GNU MP Library; see the file COPYING.LIB. If not, write to -; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +; MA 02111-1307, USA. ; INPUT PARAMETERS diff --git a/sysdeps/hppa/rshift.s b/sysdeps/hppa/rshift.s index 18d33f2f86..c1480e5abf 100644 --- a/sysdeps/hppa/rshift.s +++ b/sysdeps/hppa/rshift.s @@ -16,7 +16,8 @@ ; You should have received a copy of the GNU Library General Public License ; along with the GNU MP Library; see the file COPYING.LIB. If not, write to -; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +; MA 02111-1307, USA. ; INPUT PARAMETERS diff --git a/sysdeps/hppa/sub_n.s b/sysdeps/hppa/sub_n.s index daae46e61d..04fa3e1e33 100644 --- a/sysdeps/hppa/sub_n.s +++ b/sysdeps/hppa/sub_n.s @@ -17,7 +17,8 @@ ; You should have received a copy of the GNU Library General Public License ; along with the GNU MP Library; see the file COPYING.LIB. If not, write to -; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +; MA 02111-1307, USA. ; INPUT PARAMETERS diff --git a/sysdeps/hppa/udiv_qrnnd.s b/sysdeps/hppa/udiv_qrnnd.s index 0b069bf7f9..9b45eb40df 100644 --- a/sysdeps/hppa/udiv_qrnnd.s +++ b/sysdeps/hppa/udiv_qrnnd.s @@ -17,7 +17,8 @@ ; You should have received a copy of the GNU Library General Public License ; along with the GNU MP Library; see the file COPYING.LIB. If not, write to -; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +; MA 02111-1307, USA. ; INPUT PARAMETERS diff --git a/sysdeps/m68k/add_n.S b/sysdeps/m68k/add_n.S index 754af9f469..7ca5b95bcc 100644 --- a/sysdeps/m68k/add_n.S +++ b/sysdeps/m68k/add_n.S @@ -17,7 +17,8 @@ License for more details. You should have received a copy of the GNU Library General Public License along with the GNU MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +MA 02111-1307, USA. */ /* INPUT PARAMETERS diff --git a/sysdeps/m68k/lshift.S b/sysdeps/m68k/lshift.S index c58594a01b..77184d6ee5 100644 --- a/sysdeps/m68k/lshift.S +++ b/sysdeps/m68k/lshift.S @@ -16,7 +16,8 @@ License for more details. You should have received a copy of the GNU Library General Public License along with the GNU MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +MA 02111-1307, USA. */ /* INPUT PARAMETERS diff --git a/sysdeps/m68k/m68020/addmul_1.S b/sysdeps/m68k/m68020/addmul_1.S index 169f1135be..4b99c21f84 100644 --- a/sysdeps/m68k/m68020/addmul_1.S +++ b/sysdeps/m68k/m68020/addmul_1.S @@ -17,7 +17,8 @@ License for more details. You should have received a copy of the GNU Library General Public License along with the GNU MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +MA 02111-1307, USA. */ /* INPUT PARAMETERS diff --git a/sysdeps/m68k/m68020/mul_1.S b/sysdeps/m68k/m68020/mul_1.S index 4db1ccac25..ef7d93721f 100644 --- a/sysdeps/m68k/m68020/mul_1.S +++ b/sysdeps/m68k/m68020/mul_1.S @@ -17,7 +17,8 @@ License for more details. You should have received a copy of the GNU Library General Public License along with the GNU MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +MA 02111-1307, USA. */ /* INPUT PARAMETERS diff --git a/sysdeps/m68k/m68020/submul_1.S b/sysdeps/m68k/m68020/submul_1.S index cf30029b2f..9770c6cd6b 100644 --- a/sysdeps/m68k/m68020/submul_1.S +++ b/sysdeps/m68k/m68020/submul_1.S @@ -17,7 +17,8 @@ License for more details. You should have received a copy of the GNU Library General Public License along with the GNU MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +MA 02111-1307, USA. */ /* INPUT PARAMETERS diff --git a/sysdeps/m68k/rshift.S b/sysdeps/m68k/rshift.S index 494dfcbeab..01dde0ab50 100644 --- a/sysdeps/m68k/rshift.S +++ b/sysdeps/m68k/rshift.S @@ -16,7 +16,8 @@ License for more details. You should have received a copy of the GNU Library General Public License along with the GNU MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +MA 02111-1307, USA. */ /* INPUT PARAMETERS diff --git a/sysdeps/m68k/sub_n.S b/sysdeps/m68k/sub_n.S index 39f5161176..f94b0c7282 100644 --- a/sysdeps/m68k/sub_n.S +++ b/sysdeps/m68k/sub_n.S @@ -17,7 +17,8 @@ License for more details. You should have received a copy of the GNU Library General Public License along with the GNU MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +MA 02111-1307, USA. */ /* INPUT PARAMETERS diff --git a/sysdeps/m88k/add_n.s b/sysdeps/m88k/add_n.s index d56447904e..1b09ccef8f 100644 --- a/sysdeps/m88k/add_n.s +++ b/sysdeps/m88k/add_n.s @@ -17,7 +17,8 @@ ; You should have received a copy of the GNU Library General Public License ; along with the GNU MP Library; see the file COPYING.LIB. If not, write to -; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +; MA 02111-1307, USA. ; INPUT PARAMETERS diff --git a/sysdeps/m88k/m88110/add_n.S b/sysdeps/m88k/m88110/add_n.S index ab20630a5e..39a44e5579 100644 --- a/sysdeps/m88k/m88110/add_n.S +++ b/sysdeps/m88k/m88110/add_n.S @@ -17,7 +17,8 @@ ; You should have received a copy of the GNU Library General Public License ; along with the GNU MP Library; see the file COPYING.LIB. If not, write to -; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +; MA 02111-1307, USA. ; INPUT PARAMETERS diff --git a/sysdeps/m88k/m88110/addmul_1.s b/sysdeps/m88k/m88110/addmul_1.s index 1a4dfa11ea..2bd6f21aff 100644 --- a/sysdeps/m88k/m88110/addmul_1.s +++ b/sysdeps/m88k/m88110/addmul_1.s @@ -17,7 +17,8 @@ ; You should have received a copy of the GNU Library General Public License ; along with the GNU MP Library; see the file COPYING.LIB. If not, write to -; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +; MA 02111-1307, USA. ; INPUT PARAMETERS diff --git a/sysdeps/m88k/m88110/mul_1.s b/sysdeps/m88k/m88110/mul_1.s index b1352cea87..151890060d 100644 --- a/sysdeps/m88k/m88110/mul_1.s +++ b/sysdeps/m88k/m88110/mul_1.s @@ -17,7 +17,8 @@ ; You should have received a copy of the GNU Library General Public License ; along with the GNU MP Library; see the file COPYING.LIB. If not, write to -; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +; MA 02111-1307, USA. ; INPUT PARAMETERS diff --git a/sysdeps/m88k/m88110/sub_n.S b/sysdeps/m88k/m88110/sub_n.S index 74ee0ae605..685f024fd4 100644 --- a/sysdeps/m88k/m88110/sub_n.S +++ b/sysdeps/m88k/m88110/sub_n.S @@ -17,7 +17,8 @@ ; You should have received a copy of the GNU Library General Public License ; along with the GNU MP Library; see the file COPYING.LIB. If not, write to -; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +; MA 02111-1307, USA. ; INPUT PARAMETERS diff --git a/sysdeps/m88k/mul_1.s b/sysdeps/m88k/mul_1.s index 6b8492c4c6..26626bf959 100644 --- a/sysdeps/m88k/mul_1.s +++ b/sysdeps/m88k/mul_1.s @@ -17,7 +17,8 @@ ; You should have received a copy of the GNU Library General Public License ; along with the GNU MP Library; see the file COPYING.LIB. If not, write to -; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +; MA 02111-1307, USA. ; INPUT PARAMETERS diff --git a/sysdeps/m88k/sub_n.s b/sysdeps/m88k/sub_n.s index cd0b791b79..7dfffc980b 100644 --- a/sysdeps/m88k/sub_n.s +++ b/sysdeps/m88k/sub_n.s @@ -17,7 +17,8 @@ ; You should have received a copy of the GNU Library General Public License ; along with the GNU MP Library; see the file COPYING.LIB. If not, write to -; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +; MA 02111-1307, USA. ; INPUT PARAMETERS diff --git a/sysdeps/mips/add_n.s b/sysdeps/mips/add_n.s index c82910816e..f5525cec46 100644 --- a/sysdeps/mips/add_n.s +++ b/sysdeps/mips/add_n.s @@ -17,7 +17,8 @@ # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + # MA 02111-1307, USA. # INPUT PARAMETERS diff --git a/sysdeps/mips/addmul_1.s b/sysdeps/mips/addmul_1.s index 917af1bac3..6145771e39 100644 --- a/sysdeps/mips/addmul_1.s +++ b/sysdeps/mips/addmul_1.s @@ -17,7 +17,8 @@ # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + # MA 02111-1307, USA. # INPUT PARAMETERS diff --git a/sysdeps/mips/lshift.s b/sysdeps/mips/lshift.s index ce33e7c84c..ee92d7916f 100644 --- a/sysdeps/mips/lshift.s +++ b/sysdeps/mips/lshift.s @@ -16,7 +16,8 @@ # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + # MA 02111-1307, USA. # INPUT PARAMETERS diff --git a/sysdeps/mips/mips3/add_n.s b/sysdeps/mips/mips3/add_n.s index b5257804ad..996a449ebd 100644 --- a/sysdeps/mips/mips3/add_n.s +++ b/sysdeps/mips/mips3/add_n.s @@ -17,7 +17,8 @@ # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + # MA 02111-1307, USA. # INPUT PARAMETERS diff --git a/sysdeps/mips/mips3/addmul_1.s b/sysdeps/mips/mips3/addmul_1.s index 7dbc9ad41d..cd75c18013 100644 --- a/sysdeps/mips/mips3/addmul_1.s +++ b/sysdeps/mips/mips3/addmul_1.s @@ -17,7 +17,8 @@ # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + # MA 02111-1307, USA. # INPUT PARAMETERS diff --git a/sysdeps/mips/mips3/gmp-mparam.h b/sysdeps/mips/mips3/gmp-mparam.h index a801b35d7a..f3df7ff6e0 100644 --- a/sysdeps/mips/mips3/gmp-mparam.h +++ b/sysdeps/mips/mips3/gmp-mparam.h @@ -16,7 +16,8 @@ License for more details. You should have received a copy of the GNU Library General Public License along with the GNU MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +MA 02111-1307, USA. */ #define BITS_PER_MP_LIMB 64 #define BYTES_PER_MP_LIMB 8 diff --git a/sysdeps/mips/mips3/lshift.s b/sysdeps/mips/mips3/lshift.s index c05dcafffd..324a6020c8 100644 --- a/sysdeps/mips/mips3/lshift.s +++ b/sysdeps/mips/mips3/lshift.s @@ -16,7 +16,8 @@ # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + # MA 02111-1307, USA. # INPUT PARAMETERS diff --git a/sysdeps/mips/mips3/mul_1.s b/sysdeps/mips/mips3/mul_1.s index 8376a02546..281d0574aa 100644 --- a/sysdeps/mips/mips3/mul_1.s +++ b/sysdeps/mips/mips3/mul_1.s @@ -17,7 +17,8 @@ # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + # MA 02111-1307, USA. # INPUT PARAMETERS diff --git a/sysdeps/mips/mips3/rshift.s b/sysdeps/mips/mips3/rshift.s index e0e2ca2c5f..9920e1a9e3 100644 --- a/sysdeps/mips/mips3/rshift.s +++ b/sysdeps/mips/mips3/rshift.s @@ -16,7 +16,8 @@ # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + # MA 02111-1307, USA. # INPUT PARAMETERS diff --git a/sysdeps/mips/mips3/sub_n.s b/sysdeps/mips/mips3/sub_n.s index 9a45ffde5a..56c77d8bc4 100644 --- a/sysdeps/mips/mips3/sub_n.s +++ b/sysdeps/mips/mips3/sub_n.s @@ -17,7 +17,8 @@ # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + # MA 02111-1307, USA. # INPUT PARAMETERS diff --git a/sysdeps/mips/mips3/submul_1.s b/sysdeps/mips/mips3/submul_1.s index f041f6c0b4..a9c9fa2514 100644 --- a/sysdeps/mips/mips3/submul_1.s +++ b/sysdeps/mips/mips3/submul_1.s @@ -17,7 +17,8 @@ # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + # MA 02111-1307, USA. # INPUT PARAMETERS diff --git a/sysdeps/mips/mul_1.s b/sysdeps/mips/mul_1.s index 6f5324cef4..d006fa1221 100644 --- a/sysdeps/mips/mul_1.s +++ b/sysdeps/mips/mul_1.s @@ -17,7 +17,8 @@ # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + # MA 02111-1307, USA. # INPUT PARAMETERS diff --git a/sysdeps/mips/rshift.s b/sysdeps/mips/rshift.s index 6941691373..a8beb40577 100644 --- a/sysdeps/mips/rshift.s +++ b/sysdeps/mips/rshift.s @@ -16,7 +16,8 @@ # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + # MA 02111-1307, USA. # INPUT PARAMETERS diff --git a/sysdeps/mips/sub_n.s b/sysdeps/mips/sub_n.s index 63f3b55354..3368ef29d6 100644 --- a/sysdeps/mips/sub_n.s +++ b/sysdeps/mips/sub_n.s @@ -17,7 +17,8 @@ # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + # MA 02111-1307, USA. # INPUT PARAMETERS diff --git a/sysdeps/mips/submul_1.s b/sysdeps/mips/submul_1.s index a78072a1e9..1324b66090 100644 --- a/sysdeps/mips/submul_1.s +++ b/sysdeps/mips/submul_1.s @@ -17,7 +17,8 @@ # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + # MA 02111-1307, USA. # INPUT PARAMETERS diff --git a/sysdeps/rs6000/add_n.s b/sysdeps/rs6000/add_n.s index e2536d5887..9e1c948974 100644 --- a/sysdeps/rs6000/add_n.s +++ b/sysdeps/rs6000/add_n.s @@ -1,6 +1,6 @@ # IBM POWER __mpn_add_n -- Add two limb vectors of equal, non-zero length. -# Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc. +# Copyright (C) 1992, 1994, 1995, 1996 Free Software Foundation, Inc. # This file is part of the GNU MP Library. @@ -16,7 +16,8 @@ # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA. # INPUT PARAMETERS @@ -37,18 +38,44 @@ __mpn_add_n: .long .__mpn_add_n, TOC[tc0], 0 .csect [PR] .__mpn_add_n: - mtctr 6 # copy size into CTR + andil. 10,6,1 # odd or even number of limbs? l 8,0(4) # load least significant s1 limb l 0,0(5) # load least significant s2 limb - cal 3,-4(3) # offset res_ptr, it's updated before used + cal 3,-4(3) # offset res_ptr, it's updated before it's used + sri 10,6,1 # count for unrolled loop a 7,0,8 # add least significant limbs, set cy + mtctr 10 # copy count into CTR + beq 0,Leven # branch if even # of limbs (# of limbs >= 2) + +# We have an odd # of limbs. Add the first limbs separately. + cmpi 1,10,0 # is count for unrolled loop zero? + bne 1,L1 # branch if not + st 7,4(3) + aze 3,10 # use the fact that r10 is zero... + br # return + +# We added least significant limbs. Now reload the next limbs to enter loop. +L1: lu 8,4(4) # load s1 limb and update s1_ptr + lu 0,4(5) # load s2 limb and update s2_ptr + stu 7,4(3) + ae 7,0,8 # add limbs, set cy +Leven: lu 9,4(4) # load s1 limb and update s1_ptr + lu 10,4(5) # load s2 limb and update s2_ptr bdz Lend # If done, skip loop + Loop: lu 8,4(4) # load s1 limb and update s1_ptr lu 0,4(5) # load s2 limb and update s2_ptr - stu 7,4(3) # store previous limb in load latency slot - ae 7,0,8 # add new limbs with cy, set cy + ae 11,9,10 # add previous limbs with cy, set cy + stu 7,4(3) # + lu 9,4(4) # load s1 limb and update s1_ptr + lu 10,4(5) # load s2 limb and update s2_ptr + ae 7,0,8 # add previous limbs with cy, set cy + stu 11,4(3) # bdn Loop # decrement CTR and loop back -Lend: st 7,4(3) # store ultimate result limb + +Lend: ae 11,9,10 # add limbs with cy, set cy + st 7,4(3) # + st 11,8(3) # lil 3,0 # load cy into ... aze 3,3 # ... return value register br diff --git a/sysdeps/rs6000/addmul_1.s b/sysdeps/rs6000/addmul_1.s index 862b6139fe..2db69841c7 100644 --- a/sysdeps/rs6000/addmul_1.s +++ b/sysdeps/rs6000/addmul_1.s @@ -17,7 +17,8 @@ # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA. # INPUT PARAMETERS diff --git a/sysdeps/rs6000/lshift.s b/sysdeps/rs6000/lshift.s index 69c7502061..38169bf53f 100644 --- a/sysdeps/rs6000/lshift.s +++ b/sysdeps/rs6000/lshift.s @@ -16,7 +16,8 @@ # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA. # INPUT PARAMETERS diff --git a/sysdeps/rs6000/mul_1.s b/sysdeps/rs6000/mul_1.s index f4fa894339..a72bce660c 100644 --- a/sysdeps/rs6000/mul_1.s +++ b/sysdeps/rs6000/mul_1.s @@ -17,7 +17,8 @@ # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA. # INPUT PARAMETERS diff --git a/sysdeps/rs6000/rshift.s b/sysdeps/rs6000/rshift.s index 6056acc753..30d408a24b 100644 --- a/sysdeps/rs6000/rshift.s +++ b/sysdeps/rs6000/rshift.s @@ -16,7 +16,8 @@ # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA. # INPUT PARAMETERS diff --git a/sysdeps/rs6000/sub_n.s b/sysdeps/rs6000/sub_n.s index c57675b106..30d4fee861 100644 --- a/sysdeps/rs6000/sub_n.s +++ b/sysdeps/rs6000/sub_n.s @@ -1,7 +1,6 @@ -# IBM POWER __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and -# store difference in a third limb vector. +# IBM POWER __mpn_sub_n -- Subtract two limb vectors of equal, non-zero length. -# Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc. +# Copyright (C) 1992, 1994, 1995, 1996 Free Software Foundation, Inc. # This file is part of the GNU MP Library. @@ -17,7 +16,8 @@ # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA. # INPUT PARAMETERS @@ -38,18 +38,45 @@ __mpn_sub_n: .long .__mpn_sub_n, TOC[tc0], 0 .csect [PR] .__mpn_sub_n: - mtctr 6 # copy size into CTR + andil. 10,6,1 # odd or even number of limbs? l 8,0(4) # load least significant s1 limb l 0,0(5) # load least significant s2 limb - cal 3,-4(3) # offset res_ptr, it's updated before used - sf 7,0,8 # add least significant limbs, set cy + cal 3,-4(3) # offset res_ptr, it's updated before it's used + sri 10,6,1 # count for unrolled loop + sf 7,0,8 # subtract least significant limbs, set cy + mtctr 10 # copy count into CTR + beq 0,Leven # branch if even # of limbs (# of limbs >= 2) + +# We have an odd # of limbs. Add the first limbs separately. + cmpi 1,10,0 # is count for unrolled loop zero? + bne 1,L1 # branch if not + st 7,4(3) + sfe 3,0,0 # load !cy into ... + sfi 3,3,0 # ... return value register + br # return + +# We added least significant limbs. Now reload the next limbs to enter loop. +L1: lu 8,4(4) # load s1 limb and update s1_ptr + lu 0,4(5) # load s2 limb and update s2_ptr + stu 7,4(3) + sfe 7,0,8 # subtract limbs, set cy +Leven: lu 9,4(4) # load s1 limb and update s1_ptr + lu 10,4(5) # load s2 limb and update s2_ptr bdz Lend # If done, skip loop + Loop: lu 8,4(4) # load s1 limb and update s1_ptr lu 0,4(5) # load s2 limb and update s2_ptr - stu 7,4(3) # store previous limb in load latency slot - sfe 7,0,8 # add new limbs with cy, set cy + sfe 11,10,9 # subtract previous limbs with cy, set cy + stu 7,4(3) # + lu 9,4(4) # load s1 limb and update s1_ptr + lu 10,4(5) # load s2 limb and update s2_ptr + sfe 7,0,8 # subtract previous limbs with cy, set cy + stu 11,4(3) # bdn Loop # decrement CTR and loop back -Lend: st 7,4(3) # store ultimate result limb + +Lend: sfe 11,10,9 # subtract limbs with cy, set cy + st 7,4(3) # + st 11,8(3) # sfe 3,0,0 # load !cy into ... sfi 3,3,0 # ... return value register br diff --git a/sysdeps/rs6000/submul_1.s b/sysdeps/rs6000/submul_1.s index 252633261d..8e5946fe18 100644 --- a/sysdeps/rs6000/submul_1.s +++ b/sysdeps/rs6000/submul_1.s @@ -17,7 +17,8 @@ # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA. # INPUT PARAMETERS diff --git a/sysdeps/vax/add_n.s b/sysdeps/vax/add_n.s index c89b226051..d4764e23a2 100644 --- a/sysdeps/vax/add_n.s +++ b/sysdeps/vax/add_n.s @@ -17,7 +17,8 @@ # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA. # INPUT PARAMETERS diff --git a/sysdeps/vax/addmul_1.s b/sysdeps/vax/addmul_1.s index 8e83204b81..746d95ba7a 100644 --- a/sysdeps/vax/addmul_1.s +++ b/sysdeps/vax/addmul_1.s @@ -17,7 +17,8 @@ # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA. # INPUT PARAMETERS diff --git a/sysdeps/vax/gmp-mparam.h b/sysdeps/vax/gmp-mparam.h index ddc308ae20..d909cd2a54 100644 --- a/sysdeps/vax/gmp-mparam.h +++ b/sysdeps/vax/gmp-mparam.h @@ -16,7 +16,8 @@ License for more details. You should have received a copy of the GNU Library General Public License along with the GNU MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +MA 02111-1307, USA. */ #define BITS_PER_MP_LIMB 32 #define BYTES_PER_MP_LIMB 4 diff --git a/sysdeps/vax/mul_1.s b/sysdeps/vax/mul_1.s index 3fe375bacf..e2ff5a1bc1 100644 --- a/sysdeps/vax/mul_1.s +++ b/sysdeps/vax/mul_1.s @@ -17,7 +17,8 @@ # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA. # INPUT PARAMETERS diff --git a/sysdeps/vax/sub_n.s b/sysdeps/vax/sub_n.s index 300b4dee8f..a891c4425a 100644 --- a/sysdeps/vax/sub_n.s +++ b/sysdeps/vax/sub_n.s @@ -17,7 +17,8 @@ # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA. # INPUT PARAMETERS diff --git a/sysdeps/vax/submul_1.s b/sysdeps/vax/submul_1.s index 875cbfd651..c473937caf 100644 --- a/sysdeps/vax/submul_1.s +++ b/sysdeps/vax/submul_1.s @@ -17,7 +17,8 @@ # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA. # INPUT PARAMETERS diff --git a/sysdeps/z8000/add_n.s b/sysdeps/z8000/add_n.s index 21efaf5714..a50fc3ef5f 100644 --- a/sysdeps/z8000/add_n.s +++ b/sysdeps/z8000/add_n.s @@ -16,7 +16,8 @@ ! You should have received a copy of the GNU Library General Public License ! along with the GNU MP Library; see the file COPYING.LIB. If not, write to -! the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +! MA 02111-1307, USA. ! INPUT PARAMETERS diff --git a/sysdeps/z8000/gmp-mparam.h b/sysdeps/z8000/gmp-mparam.h index 73df5b9d4e..e0a303e979 100644 --- a/sysdeps/z8000/gmp-mparam.h +++ b/sysdeps/z8000/gmp-mparam.h @@ -16,7 +16,8 @@ License for more details. You should have received a copy of the GNU Library General Public License along with the GNU MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +MA 02111-1307, USA. */ #define BITS_PER_MP_LIMB 16 #define BYTES_PER_MP_LIMB 2 diff --git a/sysdeps/z8000/mul_1.s b/sysdeps/z8000/mul_1.s index 0150e85e85..f1126b5ab3 100644 --- a/sysdeps/z8000/mul_1.s +++ b/sysdeps/z8000/mul_1.s @@ -17,7 +17,8 @@ ! You should have received a copy of the GNU Library General Public License ! along with the GNU MP Library; see the file COPYING.LIB. If not, write to -! the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +! MA 02111-1307, USA. ! INPUT PARAMETERS diff --git a/sysdeps/z8000/sub_n.s b/sysdeps/z8000/sub_n.s index f75ef22d04..272c671bd1 100644 --- a/sysdeps/z8000/sub_n.s +++ b/sysdeps/z8000/sub_n.s @@ -17,7 +17,8 @@ ! You should have received a copy of the GNU Library General Public License ! along with the GNU MP Library; see the file COPYING.LIB. If not, write to -! the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +! MA 02111-1307, USA. ! INPUT PARAMETERS From a46ffddea5efb3ab064f8bca7c00729248abf3fe Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 8 May 1996 02:02:40 +0000 Subject: [PATCH 0640/4487] Sun May 5 03:10:44 1996 Ulrich Drepper * sysdeps/posix/sysconf.c: Add code to handle _SC_AIO_LISTIO_MAX, _SC_AIO_MAX, _SC_AIO_PRIO_DELTA_MAX, _SC_DELAYTIMER_MAX, _SC_MQ_OPEN_MAX, _SC_MQ_PRIO_MAX, _SC_RTSIG_MAX, _SC_SEM_NSEMS_MAX, _SC_SEM_VALUE_MAX, _SC_SIGQUEUE_MAX, and _SC_TIMER_MAX. * sysdeps/unix/sysv/sysv4/sysconf.c: Ditto. --- sysdeps/unix/sysv/sysv4/sysconf.c | 77 +++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/sysdeps/unix/sysv/sysv4/sysconf.c b/sysdeps/unix/sysv/sysv4/sysconf.c index 9ed5cbcd20..81d660fe64 100644 --- a/sysdeps/unix/sysv/sysv4/sysconf.c +++ b/sysdeps/unix/sysv/sysv4/sysconf.c @@ -186,6 +186,83 @@ DEFUN(__sysconf, (name), int name) case _SC_PAGESIZE: return __sysconfig (_CONFIG_PAGESIZE); + case _SC_AIO_LISTIO_MAX: +#ifdef AIO_LISTIO_MAX + return AIO_LISTIO_MAX; +#else + return -1; +#endif + + case _SC_AIO_MAX: +#ifdef AIO_MAX + return AIO_MAX; +#else + return -1; +#endif + + case _SC_AIO_PRIO_DELTA_MAX: +#ifdef AIO_PRIO_DELTA_MAX + return AIO_PRIO_DELTA_MAX; +#else + return -1; +#endif + + case _SC_DELAYTIMER_MAX: +#ifdef DELAYTIMER_MAX + return DELAYTIMER_MAX; +#else + return -1; +#endif + + case _SC_MQ_OPEN_MAX: +#ifdef MQ_OPEN_MAX + return MQ_OPEN_MAX; +#else + return -1; +#endif + + case _SC_MQ_PRIO_MAX: +#ifdef MQ_PRIO_MAX + return MQ_PRIO_MAX; +#else + return -1; +#endif + + case _SC_RTSIG_MAX: +#ifdef RTSIG_MAX + return RTSIG_MAX; +#else + return -1; +#endif + + case _SC_SEM_NSEMS_MAX: +#ifdef SEM_NSEMS_MAX + return SEM_NSEMS_MAX; +#else + return -1; +#endif + + case _SC_SEM_VALUE_MAX: +#ifdef SEM_VALUE_MAX + return SEM_VALUE_MAX; +#else + return -1; +#endif + + case _SC_SIGQUEUE_MAX: +#ifdef SIGQUEUE_MAX + return SIGQUEUE_MAX; +#else + return -1; +#endif + + case _SC_TIMER_MAX: +#ifdef TIMER_MAX + return TIMER_MAX; +#else + return -1; +#endif + case _SC_BC_BASE_MAX: #ifdef BC_BASE_MAX return BC_BASE_MAX; From ab076e0919e0b2b8e69f56c128fb1285dffaa3ee Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 13 May 1996 15:59:03 +0000 Subject: [PATCH 0641/4487] Fri May 10 19:59:50 1996 Andreas Schwab * sysdeps/m68k/Makefile (CFLAGS-setjmp.c): New variable. --- sysdeps/m68k/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile index 12e9b56787..3d35ac56ba 100644 --- a/sysdeps/m68k/Makefile +++ b/sysdeps/m68k/Makefile @@ -33,3 +33,6 @@ m68k-syntax-flag = -DMIT_SYNTAX endif asm-CPPFLAGS += $(m68k-syntax-flag) + +# Make sure setjmp.c is compiled with a frame pointer +CFLAGS-setjmp.c := -fno-omit-frame-pointer From 4776991f74b1c26353637a57c757c9ca032506ba Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 14 May 1996 18:13:42 +0000 Subject: [PATCH 0642/4487] . --- bare/.cvsignore | 1 + 1 file changed, 1 insertion(+) diff --git a/bare/.cvsignore b/bare/.cvsignore index c8367a7367..3fc9f4cdf1 100644 --- a/bare/.cvsignore +++ b/bare/.cvsignore @@ -1,3 +1,4 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps *.gz *.Z *.tar *.tgz =* TODO COPYING* AUTHORS copyr-* copying.* From 56110e09d48353effaa74ea98919eb65f74ec759 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 23 May 1996 05:31:47 +0000 Subject: [PATCH 0643/4487] Wed May 22 00:40:50 1996 David Mosberger-Tang * sysdeps/unix/sysv/linux/alpha/syscalls.list: Added getsockopt, ptrace, and sysctl. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index a842908901..4a52bf2818 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -33,13 +33,16 @@ bind - bind 3 __bind bind connect - connect 3 __connect connect getpeername - getpeername 3 __getpeername getpeername getsockname - getsockname 3 __getsockname getsockname +getsockopt - getsockopt 5 __getsockopt getsockopt listen - listen 2 __listen listen recv - recv 4 __recv recv recvfrom - recvfrom 6 __recvfrom recvfrom recvmsg - recvmsg 3 __recvmsg recvmsg +ptrace - ptrace 4 __ptrace ptrace send - send 4 __send send sendmsg - sendmsg 3 __sendmsg sendmsg sendto - sendto 6 __sendto sendto setsockopt - setsockopt 5 __setsockopt setsockopt shutdown - shutdown 2 __shutdown shutdown socketpair - socketpair 4 __socketpair socketpair +sysctl - _sysctl 6 sysctl From dbf23c0a2f3be5666d4347e06ec60a4412edaff7 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 23 May 1996 05:31:50 +0000 Subject: [PATCH 0644/4487] Wed May 22 00:40:50 1996 David Mosberger-Tang * sysdeps/unix/sysv/linux/alpha/statbuf.h: New file. --- sysdeps/unix/sysv/linux/alpha/statbuf.h | 75 +++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/statbuf.h diff --git a/sysdeps/unix/sysv/linux/alpha/statbuf.h b/sysdeps/unix/sysv/linux/alpha/statbuf.h new file mode 100644 index 0000000000..e0e7a8ae37 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/statbuf.h @@ -0,0 +1,75 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifndef _STATBUF_H +#define _STATBUF_H + +#include + +/* Structure describing file characteristics. */ +struct stat + { + int st_dev; /* Device. */ + unsigned int st_ino; /* File serial number. */ + unsigned int st_mode; /* File mode. */ + unsigned int st_nlink; /* Link count. */ + unsigned int st_uid; /* User ID of the file's owner. */ + unsigned int st_gid; /* Group ID of the file's group.*/ + int st_rdev; /* Device number, if device. */ + + long st_size; /* Size of file, in bytes. */ + + int st_atime; /* Time of last access. */ + int st_atime_usec; + int st_mtime; /* Time of last modification. */ + int st_mtime_usec; + int st_ctime; /* Time of last status change. */ + int st_ctime_usec; + + unsigned int st_blksize; /* Optimal block size for I/O. */ +#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ + + int st_blocks; /* Number of 512-byte blocks allocated. */ + unsigned int st_flags; + unsigned int st_gen; + }; + +/* Encoding of the file mode. */ + +#define __S_IFMT 0170000 /* These bits determine file type. */ + +/* File types. */ +#define __S_IFDIR 0040000 /* Directory. */ +#define __S_IFCHR 0020000 /* Character device. */ +#define __S_IFBLK 0060000 /* Block device. */ +#define __S_IFREG 0100000 /* Regular file. */ +#define __S_IFIFO 0010000 /* FIFO. */ + +#define __S_IFLNK 0120000 /* Symbolic link. */ +#define __S_IFSOCK 0140000 /* Socket. */ + +/* Protection bits. */ + +#define __S_ISUID 04000 /* Set user ID on execution. */ +#define __S_ISGID 02000 /* Set group ID on execution. */ +#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ +#define __S_IREAD 0400 /* Read by owner. */ +#define __S_IWRITE 0200 /* Write by owner. */ +#define __S_IEXEC 0100 /* Execute by owner. */ + +#endif /* statbuf.h */ From d964e721335343c50ee2dbe3f146c328de1e39cf Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 23 May 1996 05:31:53 +0000 Subject: [PATCH 0645/4487] Wed May 22 00:40:50 1996 David Mosberger-Tang * sysdeps/unix/sysv/linux/alpha/sysdep.h (NO_UNDERSCORES): Don't define. --- sysdeps/unix/sysv/linux/alpha/sysdep.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h index febfa3a4fb..627b37e4fb 100644 --- a/sysdeps/unix/sysv/linux/alpha/sysdep.h +++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h @@ -17,9 +17,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* In the Linux ELF and ECOFF worlds, C symbols are asm symbols. */ -#define NO_UNDERSCORES - #ifdef ASSEMBLER #include From 24c177a07995adcb0057ad3504ef997a246ee3a1 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 23 May 1996 05:32:12 +0000 Subject: [PATCH 0646/4487] Wed May 22 00:40:50 1996 David Mosberger-Tang * sysdeps/alpha/_mcount.S, sysdeps/alpha/bb_init_func.S, sysdeps/alpha/bsd-setjmp.S, sysdeps/alpha/ffs.S, sysdeps/alpha/htonl.S, sysdeps/alpha/htons.S, sysdeps/alpha/memchr.S, sysdeps/alpha/setjmp.S, sysdeps/alpha/strlen.S, sysdeps/alpha/udiv_qrnnd.S, sysdeps/unix/sysv/linux/alpha/brk.S, sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S, sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S, sysdeps/unix/sysv/linux/alpha/pipe.S, sysdeps/unix/sysv/linux/sigsuspend.S, sysdeps/unix/sysv/linux/alpha/syscall.S, sysdeps/unix/sysv/linux/alpha/sysdep.S: Remove include of regdef.h. sysdep.h includes it now. Replace ENTRY by LEAF with appropriate framesize declaration. Replace "lda pv,sym/jsr pv" by "jsr sym". --- sysdeps/alpha/_mcount.S | 9 +++---- sysdeps/alpha/bb_init_func.S | 18 +++++++------ sysdeps/alpha/bsd-setjmp.S | 8 +++--- sysdeps/alpha/ffs.S | 5 ---- sysdeps/alpha/htonl.S | 24 ++++++++---------- sysdeps/alpha/htons.S | 12 +++------ sysdeps/alpha/memchr.S | 7 ++---- sysdeps/alpha/strlen.S | 5 ---- sysdeps/alpha/udiv_qrnnd.S | 12 ++++----- sysdeps/unix/sysv/linux/alpha/brk.S | 11 ++++---- .../sysv/linux/alpha/ieee_get_fp_control.S | 10 +++++--- .../sysv/linux/alpha/ieee_set_fp_control.S | 10 ++++---- sysdeps/unix/sysv/linux/alpha/pipe.S | 5 ++-- sysdeps/unix/sysv/linux/alpha/syscall.S | 25 +++++++++---------- sysdeps/unix/sysv/linux/alpha/sysdep.S | 7 +++--- 15 files changed, 73 insertions(+), 95 deletions(-) diff --git a/sysdeps/alpha/_mcount.S b/sysdeps/alpha/_mcount.S index 2d6e2ed532..7944544e18 100644 --- a/sysdeps/alpha/_mcount.S +++ b/sysdeps/alpha/_mcount.S @@ -34,18 +34,15 @@ holds the return address of the function's caller (selfpc and frompc, respectively in gmon.c language...). */ #include -#ifdef __linux__ -# include -#else -# include -#endif #undef ret /* discard `ret' as defined in sysdep.h */ .set noat .set noreorder -ENTRY(_mcount) +LEAF(_mcount, 0xb0) + .prologue 0 + subq sp, 0xb0, sp stq a0, 0x00(sp) mov ra, a0 # a0 = caller-pc diff --git a/sysdeps/alpha/bb_init_func.S b/sysdeps/alpha/bb_init_func.S index 9bf985ccc0..cd860b8303 100644 --- a/sysdeps/alpha/bb_init_func.S +++ b/sysdeps/alpha/bb_init_func.S @@ -24,11 +24,6 @@ caller-saved (call-used) registers (except for argument registers a1-a5). */ #include -#ifdef __linux__ -# include -#else -# include -#endif /* * These offsets should match with "struct bb" declared in gcc/libgcc2.c. @@ -40,12 +35,19 @@ a1-a5). */ .set noreorder ENTRY(__bb_init_func) + .prologue 0 + ldq t0, ZERO_WORD(a0) /* t0 <- blocks->zero_word */ beq t0, init /* not initialized yet -> */ ret + + .end __bb_init_func + +LEAF(init, 0x38) + subq sp, 0x38, sp + .prologue 0 -init: subq sp, 0x38, sp stq pv, 0x30(sp) br pv, 1f 1: ldgp gp, 0(pv) @@ -81,5 +83,5 @@ init: subq sp, 0x38, sp leave: ldq pv, 0x30(sp) addq sp, 0x38, sp ret - - .end __bb_init_func + + .end init diff --git a/sysdeps/alpha/bsd-setjmp.S b/sysdeps/alpha/bsd-setjmp.S index 470f7bc47d..113bc47c88 100644 --- a/sysdeps/alpha/bsd-setjmp.S +++ b/sysdeps/alpha/bsd-setjmp.S @@ -23,8 +23,8 @@ Cambridge, MA 02139, USA. */ #include -ENTRY (setjmp) - lda $27, __sigsetjmp /* Load address to jump to. */ - bis $31, 1, $17 /* Pass a second argument of one. */ - jmp $31, ($27), __sigsetjmp /* Call __sigsetjmp. */ +ENTRY(setjmp) + lda $27, __sigsetjmp /* Load address to jump to. */ + bis $31, 1, $17 /* Pass a second argument of one. */ + jmp $31, ($27), __sigsetjmp /* Call __sigsetjmp. */ .end setjmp diff --git a/sysdeps/alpha/ffs.S b/sysdeps/alpha/ffs.S index 7676b85aaa..7cf6281682 100644 --- a/sysdeps/alpha/ffs.S +++ b/sysdeps/alpha/ffs.S @@ -22,11 +22,6 @@ Cambridge, MA 02139, USA. */ architecture. */ #include -#ifdef __linux__ -# include -#else -#include -#endif .set noreorder .set noat diff --git a/sysdeps/alpha/htonl.S b/sysdeps/alpha/htonl.S index d0bf7e1718..8c1c700212 100644 --- a/sysdeps/alpha/htonl.S +++ b/sysdeps/alpha/htonl.S @@ -17,22 +17,18 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#ifdef __linux__ -# include -#else -#include -#endif ENTRY(__htonl) - extlh a0,5,t1 # t1 = dd000000 - zap a0,0xfd,t2 # t2 = 0000cc00 - sll t2,5,t2 # t2 = 00198000 - s8addl t2,t1,t1 # t1 = ddcc0000 - zap a0,0xfb,t2 # t2 = 00bb0000 - srl t2,8,t2 # t2 = 0000bb00 - extbl a0,3,v0 # v0 = 000000aa - or t1,v0,v0 # v0 = ddcc00aa - or t2,v0,v0 # v0 = ddccbbaa + .prologue 0 + extlh a0, 5, t1 # t1 = dd000000 + zap a0, 0xfd, t2 # t2 = 0000cc00 + sll t2, 5, t2 # t2 = 00198000 + s8addl t2, t1, t1 # t1 = ddcc0000 + zap a0, 0xfb, t2 # t2 = 00bb0000 + srl t2, 8, t2 # t2 = 0000bb00 + extbl a0, 3, v0 # v0 = 000000aa + or t1, v0, v0 # v0 = ddcc00aa + or t2, v0, v0 # v0 = ddccbbaa ret .end __htonl diff --git a/sysdeps/alpha/htons.S b/sysdeps/alpha/htons.S index 6e18c7c441..cb22b21661 100644 --- a/sysdeps/alpha/htons.S +++ b/sysdeps/alpha/htons.S @@ -17,16 +17,12 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#ifdef __linux__ -# include -#else -#include -#endif ENTRY(__htons) - extwh a0,7,t1 # t1 = bb00 - extbl a0,1,v0 # v0 = 00aa - bis v0,t1,v0 # v0 = bbaa + .prologue 0 + extwh a0, 7, t1 # t1 = bb00 + extbl a0, 1, v0 # v0 = 00aa + bis v0, t1, v0 # v0 = bbaa ret .end __htons diff --git a/sysdeps/alpha/memchr.S b/sysdeps/alpha/memchr.S index 118a1f13d1..2f78697418 100644 --- a/sysdeps/alpha/memchr.S +++ b/sysdeps/alpha/memchr.S @@ -35,16 +35,13 @@ For correctness consider that: */ #include -#ifdef __linux__ -# include -#else -#include -#endif .set noreorder .set noat ENTRY(memchr) + .prologue 0 + beq a2, not_found ldq_u t0, 0(a0) # load first quadword (a0 may be misaligned) addq a0, a2, t4 diff --git a/sysdeps/alpha/strlen.S b/sysdeps/alpha/strlen.S index 7e6a61be8c..c64126164a 100644 --- a/sysdeps/alpha/strlen.S +++ b/sysdeps/alpha/strlen.S @@ -29,11 +29,6 @@ architecture: binary search needs). */ #include -#ifdef __linux__ -# include -#else -#include -#endif .set noreorder .set noat diff --git a/sysdeps/alpha/udiv_qrnnd.S b/sysdeps/alpha/udiv_qrnnd.S index d3d2cee93d..eb134f25c7 100644 --- a/sysdeps/alpha/udiv_qrnnd.S +++ b/sysdeps/alpha/udiv_qrnnd.S @@ -19,15 +19,15 @@ # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA. +#include .set noreorder .set noat -.text - .align 3 - .globl __udiv_qrnnd - .ent __udiv_qrnnd -__udiv_qrnnd: - .frame $30,0,$26,0 + + .text + +LEAF(__udiv_qrnnd, 0) + .prologue 0 #define cnt $2 #define tmp $3 diff --git a/sysdeps/unix/sysv/linux/alpha/brk.S b/sysdeps/unix/sysv/linux/alpha/brk.S index afd2e3203c..4582539bc1 100644 --- a/sysdeps/unix/sysv/linux/alpha/brk.S +++ b/sysdeps/unix/sysv/linux/alpha/brk.S @@ -36,24 +36,23 @@ __curbrk: .quad _end .text -ENTRY(__brk) +LEAF(__brk, 0) ldgp gp, 0(t12) .prologue 1 ldi v0, __NR_brk call_pal PAL_callsys subq a0, v0, t0 - bne t0, error + bne t0, error /* Update __curbrk and return cleanly. */ - stl a0, __curbrk - mov zero, v0 + stl a0, __curbrk + mov zero, v0 ret /* What a horrible way to die. */ error: ldi v0, ENOMEM - lda pv, syscall_error - jmp zero,(pv) + jmp zero, syscall_error .end __brk diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S index 4c86e398d8..c3486acc1a 100644 --- a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S +++ b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S @@ -21,9 +21,10 @@ Cambridge, MA 02139, USA. */ #define GSI_IEEE_FP_CONTROL 45 .text -ENTRY(__ieee_get_fp_control) + +LEAF(__ieee_get_fp_control, 8) lda sp, -8(sp) - .prologue 1 + .prologue 0 mov sp, a1 ldi a0, GSI_IEEE_FP_CONTROL @@ -36,8 +37,9 @@ ENTRY(__ieee_get_fp_control) ret error: lda sp, 8(sp) - lda pv, syscall_error - jmp zero,(pv) + br gp, 1f +1: ldgp gp, 0(gp) + jmp zero, syscall_error .end __ieee_get_fp_control diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S index d10e9bc24c..507b5d5cab 100644 --- a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S +++ b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S @@ -20,10 +20,9 @@ Cambridge, MA 02139, USA. */ #define SSI_IEEE_FP_CONTROL 14 - .text -ENTRY(__ieee_set_fp_control) +LEAF(__ieee_set_fp_control, 8) lda sp, -8(sp) - .prologue 1 + .prologue 0 stq a0, 0(sp) mov sp, a1 @@ -36,8 +35,9 @@ ENTRY(__ieee_set_fp_control) bne a3, error ret -error: lda pv, syscall_error - jmp zero,(pv) +error: br gp, 1f +1: ldgp gp, 0(gp) + jmp zero, syscall_error .end __ieee_set_fp_control diff --git a/sysdeps/unix/sysv/linux/alpha/pipe.S b/sysdeps/unix/sysv/linux/alpha/pipe.S index f613b08fe0..40958466a4 100644 --- a/sysdeps/unix/sysv/linux/alpha/pipe.S +++ b/sysdeps/unix/sysv/linux/alpha/pipe.S @@ -21,7 +21,7 @@ Cambridge, MA 02139, USA. */ #include .text -ENTRY(__pipe) +LEAF(__pipe, 0) .prologue 0 ldi v0, __NR_pipe @@ -35,8 +35,7 @@ ENTRY(__pipe) error: br gp, 1f 1: ldgp gp, 0(gp) - lda pv, syscall_error - jmp zero, (pv) + jmp zero, syscall_error .end __pipe diff --git a/sysdeps/unix/sysv/linux/alpha/syscall.S b/sysdeps/unix/sysv/linux/alpha/syscall.S index 54a8484c58..c80a523239 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscall.S +++ b/sysdeps/unix/sysv/linux/alpha/syscall.S @@ -41,21 +41,20 @@ Cambridge, MA 02139, USA. */ */ -1: br gp,2f -2: ldgp gp,0(gp) - jmp zero,syscall_error - - -ENTRY (__syscall) - bis a0,a0,v0 # Syscall number -> v0 - bis a1,a1,a0 # arg1-arg5 -> a0-a4 - bis a2,a2,a1 - bis a3,a3,a2 - bis a4,a4,a3 - bis a5,a5,a4 +LEAF(__syscall, 0) + bis a0, a0, v0 # Syscall number -> v0 + bis a1, a1, a0 # arg1-arg5 -> a0-a4 + bis a2, a2, a1 + bis a3, a3, a2 + bis a4, a4, a3 + bis a5, a5, a4 call_pal PAL_callsys # Invoke system call - bne a3,1b + bne a3, error ret +error: br gp, 2f +2: ldgp gp, 0(gp) + jmp zero, syscall_error + weak_alias(__syscall, syscall) diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.S b/sysdeps/unix/sysv/linux/alpha/sysdep.S index 74b153e7b9..84582f404e 100644 --- a/sysdeps/unix/sysv/linux/alpha/sysdep.S +++ b/sysdeps/unix/sysv/linux/alpha/sysdep.S @@ -20,11 +20,12 @@ Cambridge, MA 02139, USA. */ #define _ERRNO_H #include -ENTRY(syscall_error) +LEAF(syscall_error, 0) + .prologue 1 + /* Store return value in errno... */ ldgp gp, 0(t12) - lda t0, errno - stl v0, 0(t0) + stl v0, errno /* And just kick back a -1. */ ldi v0, -1 From 92172913d2bb19dfff219983899f03bc604c706e Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 23 May 1996 05:32:14 +0000 Subject: [PATCH 0647/4487] Wed May 22 00:40:50 1996 David Mosberger-Tang * sysdeps/unix/alpha/sysdep.h: Include regdef.h. Define LEAF macro to simplify declaration of leaf functions. --- sysdeps/unix/alpha/sysdep.h | 52 +++++++++++++++++++++++++------------ 1 file changed, 36 insertions(+), 16 deletions(-) diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h index 9eb9032270..8a52f201e1 100644 --- a/sysdeps/unix/alpha/sysdep.h +++ b/sysdeps/unix/alpha/sysdep.h @@ -20,20 +20,42 @@ Cambridge, MA 02139, USA. */ #ifdef ASSEMBLER +#ifdef __linux__ +# include +#else +# include +#endif + +#ifdef __STDC__ +#define LEAF(name, framesize) \ + .globl name; \ + .align 3; \ + .ent name, 0; \ + name##: \ + .frame sp, framesize, ra +#else +#define LEAF(name, framesize) \ + .globl name; \ + .align 3; \ + .ent name, 0; \ + name/**/: \ + .frame sp, framesize, ra +#endif + #ifdef __STDC__ #define ENTRY(name) \ .globl name; \ .align 3; \ - .ent name,0; \ + .ent name, 0; \ name##: \ - .frame sp,0,ra + .frame sp, 0, ra #else #define ENTRY(name) \ .globl name; \ .align 3; \ - .ent name,0; \ + .ent name, 0; \ name/**/: \ - .frame sp,0,ra + .frame sp, 0, ra #endif /* Note that while it's better structurally, going back to set errno @@ -45,17 +67,16 @@ Cambridge, MA 02139, USA. */ .align 3; \ .ent name,0; \ \ -1: br gp,2f; \ -2: ldgp gp,0(gp); \ - lda pv,syscall_error; \ - jmp zero,(pv); \ +1: br gp, 2f; \ +2: ldgp gp, 0(gp); \ + jmp zero, syscall_error; \ \ name##: \ - ldi v0,SYS_ify(syscall_name); \ + ldi v0, SYS_ify(syscall_name); \ .set noat; \ call_pal PAL_callsys; \ .set at; \ - bne a3,1b; \ + bne a3, 1b; \ 3: #else #define PSEUDO(name, syscall_name, args) \ @@ -63,17 +84,16 @@ name##: \ .align 3; \ .ent name,0; \ \ -1: br gp,2f; \ -2: ldgp gp,0(gp); \ - lda pv,syscall_error; \ - jmp zero,(pv); \ +1: br gp, 2f; \ +2: ldgp gp, 0(gp); \ + jmp zero, syscall_error; \ \ name/**/: \ - ldi v0,SYS_ify(syscall_name); \ + ldi v0, SYS_ify(syscall_name); \ .set noat; \ call_pal PAL_callsys; \ .set at; \ - bne a3,1b; \ + bne a3, 1b; \ 3: #endif From a391dca8fa3fc0533c98396ebbf232d21138befa Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 23 May 1996 05:32:18 +0000 Subject: [PATCH 0648/4487] Wed May 22 00:40:50 1996 David Mosberger-Tang * sysdeps/alpha/copysign.S, sysdeps/alpha/fabs.S: New files. --- sysdeps/alpha/copysign.S | 29 +++++++++++++++++++++++++++++ sysdeps/alpha/fabs.S | 27 +++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 sysdeps/alpha/copysign.S create mode 100644 sysdeps/alpha/fabs.S diff --git a/sysdeps/alpha/copysign.S b/sysdeps/alpha/copysign.S new file mode 100644 index 0000000000..9e9dff3ed0 --- /dev/null +++ b/sysdeps/alpha/copysign.S @@ -0,0 +1,29 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. +This file is part of the GNU C Library. +Contributed by David Mosberger + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +ENTRY(__copysign) + .prologue 0 + cpys $f17,$f16,$f0 + ret + + .end __copysign + +weak_alias(__copysign, copysign) diff --git a/sysdeps/alpha/fabs.S b/sysdeps/alpha/fabs.S new file mode 100644 index 0000000000..88e64b4718 --- /dev/null +++ b/sysdeps/alpha/fabs.S @@ -0,0 +1,27 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. +This file is part of the GNU C Library. +Contributed by David Mosberger + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +ENTRY(fabs) + .prologue 0 + cpys $f31,$f16,$f0 + ret + + .end fabs From 2810021b9b52f758594243a85826ee863048c0a0 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 23 May 1996 05:32:21 +0000 Subject: [PATCH 0649/4487] Wed May 22 00:40:50 1996 David Mosberger-Tang * sysdeps/alpha/divrem.h: Renamed from sysdeps/alpha/divrem.S to avoid name collision with math library. --- sysdeps/alpha/divrem.S | 169 ------------------------------------ sysdeps/alpha/divrem.h | 188 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 188 insertions(+), 169 deletions(-) create mode 100644 sysdeps/alpha/divrem.h diff --git a/sysdeps/alpha/divrem.S b/sysdeps/alpha/divrem.S index e6293bf355..e69de29bb2 100644 --- a/sysdeps/alpha/divrem.S +++ b/sysdeps/alpha/divrem.S @@ -1,169 +0,0 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. - Contributed by David Mosberger (davidm@cs.arizona.edu). - -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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -/* The current Alpha chips don't provide hardware for integer -division. The C compiler expects the functions - - __divqu: 64-bit unsigned long divide - __remqu: 64-bit unsigned long remainder - __divqs/__remqs: signed 64-bit - __divlu/__remlu: unsigned 32-bit - __divls/__remls: signed 32-bit - -These are not normal C functions: instead of the normal calling -sequence, these expect their arguments in registers t10 and t11, and -return the result in t12 (aka pv). Registers AT and v0 may be -clobbered (assembly temporary), anything else must be saved. */ - -#ifdef __linux__ -# include -# include -# include -#else -# include -# include -#endif - -#ifdef DEBUG -# define arg1 a0 -# define arg2 a1 -# define result v0 -# define mask t0 -# define tmp0 t1 -# define tmp1 t2 -# define sign t3 -# define retaddr ra -#else -# define arg1 t10 -# define arg2 t11 -# define result t12 -# define mask v0 -# define tmp0 t0 -# define tmp1 t1 -# define sign t2 -# define retaddr t9 -#endif - -# define divisor arg2 -#if IS_REM -# define dividend result -# define quotient arg1 -# define GETDIVIDEND bis arg1,zero,dividend -#else -# define dividend arg1 -# define quotient result -# define GETDIVIDEND -#endif - -#if SIZE == 8 -# define LONGIFYarg1 GETDIVIDEND -# define LONGIFYarg2 -#else -# if SIGNED -# define LONGIFYarg1 addl arg1,zero,dividend -# define LONGIFYarg2 addl arg2,zero,divisor -# else -# define LONGIFYarg1 zapnot arg1,0x0f,dividend -# define LONGIFYarg2 zapnot arg2,0x0f,divisor -# endif -#endif - -#if SIGNED -# define SETSIGN(sign,reg,tmp) subq zero,reg,tmp; cmovlt sign,tmp,reg -# if IS_REM -# define GETSIGN(x,y,s) bis x,zero,s -# else -# define GETSIGN(x,y,s) xor x,y,s -# endif -#else -# define SETSIGN(sign,reg,tmp) -# define GETSIGN(x,y,s) -#endif - - .set noreorder - .set noat - - .ent FUNC_NAME - .globl FUNC_NAME - - .align 5 -FUNC_NAME: -# define FRAME_SIZE 0x30 - .frame sp,FRAME_SIZE,ra,0 - lda sp,-FRAME_SIZE(sp) - .prologue 1 - stq arg1,0x00(sp) - LONGIFYarg1 - stq arg2,0x08(sp) - LONGIFYarg2 - stq mask,0x10(sp) - bis zero,1,mask - stq tmp0,0x18(sp) - bis zero,zero,quotient - stq tmp1,0x20(sp) - beq divisor,divbyzero - stq sign,0x28(sp) - GETSIGN(dividend,divisor,sign) -#if SIGNED - subq zero,dividend,tmp0 - subq zero,divisor,tmp1 - cmovlt dividend,tmp0,dividend - cmovlt divisor,tmp1,divisor -#endif - /* - * Shift divisor left until either bit 63 is set or until it - * is at least as big as the dividend: - */ - .align 3 -1: cmpule dividend,divisor,AT - blt divisor,2f - blbs AT,2f - addq mask,mask,mask - addq divisor,divisor,divisor - br 1b - - .align 3 -2: addq mask,quotient,tmp0 - cmpule divisor,dividend,AT - subq dividend,divisor,tmp1 - srl divisor,1,divisor - srl mask,1,mask - cmovlbs AT,tmp0,quotient - cmovlbs AT,tmp1,dividend - bne mask,2b - - ldq arg1,0x00(sp) - SETSIGN(sign,result,tmp0) -done: ldq arg2,0x08(sp) - ldq mask,0x10(sp) - ldq tmp0,0x18(sp) - ldq tmp1,0x20(sp) - ldq sign,0x28(sp) - lda sp,FRAME_SIZE(sp) - ret zero,(retaddr),0 - -divbyzero: - lda a0,GEN_INTDIV(zero) - call_pal PAL_gentrap - bis zero,zero,result /* if trap returns, return 0 */ - ldq arg1,0x00(sp) - br done - - .end FUNC_NAME diff --git a/sysdeps/alpha/divrem.h b/sysdeps/alpha/divrem.h new file mode 100644 index 0000000000..ee7f64ef1e --- /dev/null +++ b/sysdeps/alpha/divrem.h @@ -0,0 +1,188 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. + Contributed by David Mosberger (davidm@cs.arizona.edu). + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* The current Alpha chips don't provide hardware for integer +division. The C compiler expects the functions + + __divqu: 64-bit unsigned long divide + __remqu: 64-bit unsigned long remainder + __divqs/__remqs: signed 64-bit + __divlu/__remlu: unsigned 32-bit + __divls/__remls: signed 32-bit + +These are not normal C functions: instead of the normal calling +sequence, these expect their arguments in registers t10 and t11, and +return the result in t12 (aka pv). Registers AT and v0 may be +clobbered (assembly temporary), anything else must be saved. */ + +#ifdef __linux__ +# include +# include +# include +#else +# include +# include +#endif + +#ifdef DEBUG +# define arg1 a0 +# define arg2 a1 +# define result v0 +# define mask t0 +# define tmp0 t1 +# define tmp1 t2 +# define sign t3 +# define retaddr ra +#else +# define arg1 t10 +# define arg2 t11 +# define result t12 +# define mask v0 +# define tmp0 t0 +# define tmp1 t1 +# define sign t2 +# define retaddr t9 +#endif + +# define divisor arg2 +#if IS_REM +# define dividend result +# define quotient arg1 +# define GETDIVIDEND bis arg1,zero,dividend +#else +# define dividend arg1 +# define quotient result +# define GETDIVIDEND +#endif + +#if SIZE == 8 +# define LONGIFYarg1 GETDIVIDEND +# define LONGIFYarg2 +#else +# if SIGNED +# define LONGIFYarg1 addl arg1,zero,dividend +# define LONGIFYarg2 addl arg2,zero,divisor +# else +# define LONGIFYarg1 zapnot arg1,0x0f,dividend +# define LONGIFYarg2 zapnot arg2,0x0f,divisor +# endif +#endif + +#if SIGNED +# define SETSIGN(sign,reg,tmp) subq zero,reg,tmp; cmovlt sign,tmp,reg +# if IS_REM +# define GETSIGN(x,y,s) bis x,zero,s +# else +# define GETSIGN(x,y,s) xor x,y,s +# endif +#else +# define SETSIGN(sign,reg,tmp) +# define GETSIGN(x,y,s) +#endif + + .set noreorder + .set noat + + .ent FUNC_NAME + .globl FUNC_NAME + +#define FRAME_SIZE 0x30 + + .align 5 +FUNC_NAME: +#ifdef PROF + lda sp, -0x18(sp) + stq ra, 0x00(sp) + stq pv, 0x08(sp) + stq gp, 0x10(sp) + + br AT, 1f +1: ldgp gp, 0(AT) + lda AT, _mcount + + mov retaddr, ra + jsr AT, (AT), _mcount + + ldq ra, 0x00(sp) + ldq pv, 0x08(sp) + ldq gp, 0x10(sp) + lda sp, 0x18(sp) +#endif + .frame sp, FRAME_SIZE, ra, 0 + lda sp,-FRAME_SIZE(sp) + .prologue 1 + stq arg1,0x00(sp) + LONGIFYarg1 + stq arg2,0x08(sp) + LONGIFYarg2 + stq mask,0x10(sp) + bis zero,1,mask + stq tmp0,0x18(sp) + bis zero,zero,quotient + stq tmp1,0x20(sp) + beq divisor,divbyzero + stq sign,0x28(sp) + GETSIGN(dividend,divisor,sign) +#if SIGNED + subq zero,dividend,tmp0 + subq zero,divisor,tmp1 + cmovlt dividend,tmp0,dividend + cmovlt divisor,tmp1,divisor +#endif + /* + * Shift divisor left until either bit 63 is set or until it + * is at least as big as the dividend: + */ + .align 3 +1: cmpule dividend,divisor,AT + blt divisor,2f + blbs AT,2f + addq mask,mask,mask + addq divisor,divisor,divisor + br 1b + + .align 3 +2: addq mask,quotient,tmp0 + cmpule divisor,dividend,AT + subq dividend,divisor,tmp1 + srl divisor,1,divisor + srl mask,1,mask + cmovlbs AT,tmp0,quotient + cmovlbs AT,tmp1,dividend + bne mask,2b + + ldq arg1,0x00(sp) + SETSIGN(sign,result,tmp0) +done: ldq arg2,0x08(sp) + ldq mask,0x10(sp) + ldq tmp0,0x18(sp) + ldq tmp1,0x20(sp) + ldq sign,0x28(sp) + lda sp,FRAME_SIZE(sp) + ret zero,(retaddr),0 + +divbyzero: + lda a0,GEN_INTDIV(zero) + call_pal PAL_gentrap + bis zero,zero,result /* if trap returns, return 0 */ + ldq arg1,0x00(sp) + br done + + .end FUNC_NAME From d9264c4f76ab5e67a6bdf6d218462b60401fb4dd Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 23 May 1996 05:32:24 +0000 Subject: [PATCH 0650/4487] Wed May 22 00:40:50 1996 David Mosberger-Tang * sysdeps/unix/sysv/linux/Makefile (headers): Add alpha/ptrace.h. * sysdeps/unix/sysv/linux/alpha/alpha/ptrace.h: New file. --- sysdeps/unix/sysv/linux/alpha/alpha/ptrace.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/alpha/ptrace.h diff --git a/sysdeps/unix/sysv/linux/alpha/alpha/ptrace.h b/sysdeps/unix/sysv/linux/alpha/alpha/ptrace.h new file mode 100644 index 0000000000..57b96d64db --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/alpha/ptrace.h @@ -0,0 +1,18 @@ +#ifndef __alpha_ptrace_h__ +#define __alpha_ptrace_h__ + +/* + * Mostly for OSF/1 compatibility. + */ + +#define REG_BASE 0 +#define NGP_REGS 32 +#define NFP_REGS 32 + +#define GPR_BASE REG_BASE +#define FPR_BASE (GPR_BASE+NGP_REGS) +#define PC (FPR_BASE+NFP_REGS) +#define SPR_PS (PC+1) +#define NPTRC_REGS (SPR_PS+1) + +#endif /* __alpha_ptrace_h__ */ From 15999cfb4c6927d99def37f41ed26cecfb1d2663 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 23 May 1996 05:32:27 +0000 Subject: [PATCH 0651/4487] Wed May 22 00:40:50 1996 David Mosberger-Tang * sysdeps/unix/sysv/linux/alpha/ioperm.c: Modify to support dynamic recognition of platform type. (_bus_base): New function. --- sysdeps/unix/sysv/linux/alpha/ioperm.c | 275 ++++++++++++++++--------- 1 file changed, 173 insertions(+), 102 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c index 306c86b96a..b9630a8273 100644 --- a/sysdeps/unix/sysv/linux/alpha/ioperm.c +++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c @@ -35,31 +35,35 @@ I/O address space that's 512MB large!). */ #include #include #include -#include +#include #include +#include #include #include -#include #include #include -#undef inb -#undef inw -#undef inl -#undef outb -#undef outw -#undef outl - -#define PATH_CPUINFO "/proc/cpuinfo" +#define PATH_ALPHA_SYSTYPE "/etc/alpha_systype" +#define PATH_CPUINFO "/proc/cpuinfo" #define MAX_PORT 0x10000 #define vuip volatile unsigned int * -#define JENSEN_IO_BASE (IDENT_ADDR + 0x0300000000UL) -#define APECS_IO_BASE (IDENT_ADDR + 0x01c0000000UL) -#define ALCOR_IO_BASE (IDENT_ADDR + 0x8580000000UL) +#define JENSEN_IO_BASE (0xfffffc0300000000UL) +#define JENSEN_MEM (0xfffffc0200000000UL) /* sparse!! */ + +/* + * With respect to the I/O architecture, APECS and LCA are identical, + * so the following defines apply to LCA as well. + */ +#define APECS_IO_BASE (0xfffffc01c0000000UL) +#define APECS_DENSE_MEM (0xfffffc0300000000UL) + +#define ALCOR_IO_BASE (0xfffffc8580000000UL) +#define ALCOR_DENSE_MEM (0xfffffc8600000000UL) + enum { IOSYS_JENSEN = 0, IOSYS_APECS = 1, IOSYS_ALCOR = 2 @@ -78,58 +82,75 @@ struct ioswtch { static struct platform { const char *name; int io_sys; + unsigned long bus_memory_base; } platform[] = { - {"Alcor", IOSYS_ALCOR}, - {"Avanti", IOSYS_APECS}, - {"Cabriolet", IOSYS_APECS}, - {"EB64+", IOSYS_APECS}, - {"EB66", IOSYS_APECS}, - {"EB66P", IOSYS_APECS}, - {"Jensen", IOSYS_JENSEN}, - {"Mustang", IOSYS_APECS}, - {"Noname", IOSYS_APECS}, + {"Alcor", IOSYS_ALCOR, ALCOR_DENSE_MEM}, + {"Avanti", IOSYS_APECS, APECS_DENSE_MEM}, + {"Cabriolet", IOSYS_APECS, APECS_DENSE_MEM}, + {"EB164", IOSYS_ALCOR, ALCOR_DENSE_MEM}, + {"EB64+", IOSYS_APECS, APECS_DENSE_MEM}, + {"EB66", IOSYS_APECS, APECS_DENSE_MEM}, /* LCA same as APECS */ + {"EB66P", IOSYS_APECS, APECS_DENSE_MEM}, /* LCA same as APECS */ + {"Jensen", IOSYS_JENSEN, JENSEN_MEM}, + {"Mustang", IOSYS_APECS, APECS_DENSE_MEM}, + {"Noname", IOSYS_APECS, APECS_DENSE_MEM}, /* LCA same as APECS */ }; static struct { - struct hae hae; + struct hae { + unsigned long cache; + unsigned long * reg; + } hae; unsigned long base; struct ioswtch * swp; int sys; } io; +static unsigned long bus_memory_base = -1; + +extern void __sethae (unsigned long); /* we can't use asm/io.h */ + static inline unsigned long port_to_cpu_addr (unsigned long port, int iosys, int size) { - if (iosys == IOSYS_JENSEN) { - return (port << 7) + ((size - 1) << 4) + io.base; - } else { - return (port << 5) + ((size - 1) << 3) + io.base; - } + if (iosys == IOSYS_JENSEN) + { + return (port << 7) + ((size - 1) << 4) + io.base; + } + else + { + return (port << 5) + ((size - 1) << 3) + io.base; + } } static inline void inline_sethae (unsigned long addr, int iosys) { - if (iosys == IOSYS_JENSEN) { - /* hae on the Jensen is bits 31:25 shifted right */ - addr >>= 25; - if (addr != io.hae.cache) { - __sethae (addr); - io.hae.cache = addr; + if (iosys == IOSYS_JENSEN) + { + /* hae on the Jensen is bits 31:25 shifted right */ + addr >>= 25; + if (addr != io.hae.cache) + { + __sethae (addr); + io.hae.cache = addr; + } } - } else { - unsigned long msb; - - /* no need to set hae if msb is 0: */ - msb = addr & 0xf8000000; - if (msb && msb != io.hae.cache) { - __sethae (msb); - io.hae.cache = msb; + else + { + unsigned long msb; + + /* no need to set hae if msb is 0: */ + msb = addr & 0xf8000000; + if (msb && msb != io.hae.cache) + { + __sethae (msb); + io.hae.cache = msb; + } } - } } @@ -263,22 +284,56 @@ struct ioswtch ioswtch[] = { }; +/* + * Initialize I/O system. To determine what I/O system we're dealing + * with, we first try to read the value of symlink PATH_ALPHA_SYSTYPE, + * if that fails, we lookup the "system type" field in /proc/cpuinfo. + * If that fails as well, we give up. + */ static int init_iosys (void) { - char name[256], value[256]; - FILE * fp; - int i; + char systype[256]; + int i, n; - fp = fopen (PATH_CPUINFO, "r"); - if (!fp) - return -1; + n = readlink(PATH_ALPHA_SYSTYPE, systype, sizeof(systype) - 1); + if (n > 0) + { + systype[n] = '\0'; + } + else + { + char name[256]; + FILE * fp; + + fp = fopen (PATH_CPUINFO, "r"); + if (!fp) + return -1; + while ((n = fscanf (fp, "%256[^:]: %256[^\n]\n", name, systype)) != EOF) + { + if (n == 2 && strncmp (name, "system type", 11) == 0) { + break; + } + } + fclose(fp); + + if (n == EOF) + { + /* this can happen if the format of /proc/cpuinfo changes... */ + fprintf(stderr, + "ioperm.init_iosys(): Unable to determine system type.\n" + "\t(May need " PATH_ALPHA_SYSTYPE " symlink?)\n"); + errno = ENODEV; + return -1; + } + } - while (fscanf (fp, "%256[^:]: %256[^\n]\n", name, value) == 2) { - if (strncmp (name, "system type", 11) == 0) { - for (i = 0; i < sizeof (platform) / sizeof (platform[0]); ++i) { - if (strcmp (platform[i].name, value) == 0) { - fclose (fp); + /* translate systype name into i/o system: */ + for (i = 0; i < sizeof (platform) / sizeof (platform[0]); ++i) + { + if (strcmp (platform[i].name, systype) == 0) + { + bus_memory_base = platform[i].bus_memory_base; io.sys = platform[i].io_sys; if (io.sys == IOSYS_JENSEN) io.swp = &ioswtch[0]; @@ -286,11 +341,10 @@ init_iosys (void) io.swp = &ioswtch[1]; return 0; } - } } - } - fclose (fp); - errno = ENODEV; + + /* systype is not a know platform name... */ + errno = EINVAL; return -1; } @@ -305,49 +359,55 @@ _ioperm (unsigned long from, unsigned long num, int turn_on) return -1; /* this test isn't as silly as it may look like; consider overflows! */ - if (from >= MAX_PORT || from + num > MAX_PORT) { - errno = EINVAL; - return -1; - } + if (from >= MAX_PORT || from + num > MAX_PORT) + { + errno = EINVAL; + return -1; + } - if (turn_on) { - if (!io.base) { - unsigned long base; - int fd; - - io.hae.reg = 0; /* not used in user-level */ - io.hae.cache = 0; - __sethae (io.hae.cache); /* synchronize with hw */ - - fd = open ("/dev/mem", O_RDWR); - if (fd < 0) - return fd; - - switch (io.sys) { - case IOSYS_JENSEN: base = JENSEN_IO_BASE; break; - case IOSYS_APECS: base = APECS_IO_BASE; break; - case IOSYS_ALCOR: base = ALCOR_IO_BASE; break; - default: - errno = ENODEV; - return -1; - } - addr = port_to_cpu_addr (from, io.sys, 1); - addr &= PAGE_MASK; - len = port_to_cpu_addr (MAX_PORT, io.sys, 1) - addr; - io.base = - (unsigned long) __mmap (0, len, PROT_NONE, MAP_SHARED, fd, base); - close (fd); - if ((long) io.base == -1) - return -1; + if (turn_on) + { + if (!io.base) + { + unsigned long base; + int fd; + + io.hae.reg = 0; /* not used in user-level */ + io.hae.cache = 0; + __sethae (io.hae.cache); /* synchronize with hw */ + + fd = open ("/dev/mem", O_RDWR); + if (fd < 0) + return fd; + + switch (io.sys) + { + case IOSYS_JENSEN: base = JENSEN_IO_BASE; break; + case IOSYS_APECS: base = APECS_IO_BASE; break; + case IOSYS_ALCOR: base = ALCOR_IO_BASE; break; + default: + errno = ENODEV; + return -1; + } + addr = port_to_cpu_addr (from, io.sys, 1); + addr &= PAGE_MASK; + len = port_to_cpu_addr (MAX_PORT, io.sys, 1) - addr; + io.base = + (unsigned long) __mmap (0, len, PROT_NONE, MAP_SHARED, fd, base); + close (fd); + if ((long) io.base == -1) + return -1; + } + prot = PROT_READ | PROT_WRITE; } - prot = PROT_READ | PROT_WRITE; - } else { - if (!io.base) - return 0; /* never was turned on... */ + else + { + if (!io.base) + return 0; /* never was turned on... */ - /* turnoff access to relevant pages: */ - prot = PROT_NONE; - } + /* turnoff access to relevant pages: */ + prot = PROT_NONE; + } addr = port_to_cpu_addr (from, io.sys, 1); addr &= PAGE_MASK; len = port_to_cpu_addr (from + num, io.sys, 1) - addr; @@ -358,13 +418,15 @@ _ioperm (unsigned long from, unsigned long num, int turn_on) int _iopl (unsigned int level) { - if (level > 3) { + if (level > 3) + { errno = EINVAL; return -1; - } - if (level) { + } + if (level) + { return _ioperm (0, MAX_PORT, 1); - } + } return 0; } @@ -430,6 +492,14 @@ _inl (unsigned long port) } +unsigned long +_bus_base(void) +{ + if (!io.swp && init_iosys () < 0) + return -1; + return bus_memory_base; +} + weak_alias (_sethae, sethae); weak_alias (_ioperm, ioperm); weak_alias (_iopl, iopl); @@ -439,3 +509,4 @@ weak_alias (_inl, inl); weak_alias (_outb, outb); weak_alias (_outw, outw); weak_alias (_outl, outl); +weak_alias (_bus_base, bus_base); From 65e888acf5295693aa9150eeaae605b8d4a17a14 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 23 May 1996 05:32:30 +0000 Subject: [PATCH 0652/4487] Wed May 22 00:40:50 1996 David Mosberger-Tang * sysdeps/unix/sysv/linux/alpha/llseek.S: New file. --- sysdeps/unix/sysv/linux/alpha/llseek.S | 49 ++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/llseek.S diff --git a/sysdeps/unix/sysv/linux/alpha/llseek.S b/sysdeps/unix/sysv/linux/alpha/llseek.S new file mode 100644 index 0000000000..7f2a49172a --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/llseek.S @@ -0,0 +1,49 @@ +/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. + Contributed by David Mosberger (davidm@cs.arizona.edu). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* For compatibility only: a "long" is 64 bits on the Alpha, so + llseek() isn't really needed. But there are some programs out + there who may depend on it being around. +*/ + +#include + + .text +ENTRY(llseek) + .prologue 0 + + mov a3, t0 /* save result address */ + + sll a1, 32, a1 /* build a 64 bit ofs out of 32 bit operands */ + zap a2, 0xf0, a2 + bis a2, a1, a1 + + mov a4, a2 /* shift down whence */ + + ldi v0, __NR_lseek + call_pal PAL_callsys + bne a3, error + + stq v0, 0(t0) + ret + +error: br gp, 1f +1: ldgp gp, 0(gp) + jmp zero, syscall_error + + .end llseek From 0e6abf6bbce83c1242ea1184d63424025b908b14 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 23 May 1996 05:32:39 +0000 Subject: [PATCH 0653/4487] Wed May 22 00:40:50 1996 David Mosberger-Tang * sysdeps/unix/sysv/linux/alpha/profil-counter.h: File removed. --- .../unix/sysv/linux/alpha/profil-counter.h | 28 ------------------- 1 file changed, 28 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/alpha/profil-counter.h diff --git a/sysdeps/unix/sysv/linux/alpha/profil-counter.h b/sysdeps/unix/sysv/linux/alpha/profil-counter.h deleted file mode 100644 index 6ab5a88c49..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/profil-counter.h +++ /dev/null @@ -1,28 +0,0 @@ -/* Low-level statistical profiling support function. Mostly POSIX.1 version. -Copyright (C) 1996 Free Software Foundation, Inc. -Contributed by David Mosberger -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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -void -profil_counter (int signal, long a1, long a2, long a3, long a4, long a5, - struct sigcontext_struct sc) -{ - profil_count((void *) sc.sc_pc); -} From 94765f9edc4f1007142c4f873f193121a54e7bb7 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 23 May 1996 05:32:48 +0000 Subject: [PATCH 0654/4487] Wed May 22 00:40:50 1996 David Mosberger-Tang * sysdeps/alpha/divl.S, sysdeps/alpha/divlu.S, sysdeps/alpha/divq.S, sysdeps/alpha/divqu.S, sysdeps/alpha/reml.S, sysdeps/alpha/remlu.S, sysdeps/alpha/remq.S, sysdeps/alpha/remqu.S: Include divrem.h instead of divrem.S. --- sysdeps/alpha/divl.S | 2 +- sysdeps/alpha/divlu.S | 2 +- sysdeps/alpha/divq.S | 2 +- sysdeps/alpha/divqu.S | 2 +- sysdeps/alpha/reml.S | 2 +- sysdeps/alpha/remlu.S | 2 +- sysdeps/alpha/remq.S | 2 +- sysdeps/alpha/remqu.S | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sysdeps/alpha/divl.S b/sysdeps/alpha/divl.S index 7dbb5048c7..6990665937 100644 --- a/sysdeps/alpha/divl.S +++ b/sysdeps/alpha/divl.S @@ -3,4 +3,4 @@ #define SIGNED 1 #define FUNC_NAME __divl -#include "divrem.S" +#include "divrem.h" diff --git a/sysdeps/alpha/divlu.S b/sysdeps/alpha/divlu.S index 9cc71da308..ee96c95008 100644 --- a/sysdeps/alpha/divlu.S +++ b/sysdeps/alpha/divlu.S @@ -3,4 +3,4 @@ #define SIGNED 0 #define FUNC_NAME __divlu -#include "divrem.S" +#include "divrem.h" diff --git a/sysdeps/alpha/divq.S b/sysdeps/alpha/divq.S index f7af8d62a3..bde3425f37 100644 --- a/sysdeps/alpha/divq.S +++ b/sysdeps/alpha/divq.S @@ -3,4 +3,4 @@ #define SIGNED 1 #define FUNC_NAME __divq -#include "divrem.S" +#include "divrem.h" diff --git a/sysdeps/alpha/divqu.S b/sysdeps/alpha/divqu.S index faf2932cb5..72dcf971dd 100644 --- a/sysdeps/alpha/divqu.S +++ b/sysdeps/alpha/divqu.S @@ -3,4 +3,4 @@ #define SIGNED 0 #define FUNC_NAME __divqu -#include "divrem.S" +#include "divrem.h" diff --git a/sysdeps/alpha/reml.S b/sysdeps/alpha/reml.S index cede136acd..b631a02c31 100644 --- a/sysdeps/alpha/reml.S +++ b/sysdeps/alpha/reml.S @@ -3,4 +3,4 @@ #define SIGNED 1 #define FUNC_NAME __reml -#include "divrem.S" +#include "divrem.h" diff --git a/sysdeps/alpha/remlu.S b/sysdeps/alpha/remlu.S index 3658d92bc1..8d527e4678 100644 --- a/sysdeps/alpha/remlu.S +++ b/sysdeps/alpha/remlu.S @@ -3,4 +3,4 @@ #define SIGNED 0 #define FUNC_NAME __remlu -#include "divrem.S" +#include "divrem.h" diff --git a/sysdeps/alpha/remq.S b/sysdeps/alpha/remq.S index 61f2067383..8bd9f334f4 100644 --- a/sysdeps/alpha/remq.S +++ b/sysdeps/alpha/remq.S @@ -3,4 +3,4 @@ #define SIGNED 1 #define FUNC_NAME __remq -#include "divrem.S" +#include "divrem.h" diff --git a/sysdeps/alpha/remqu.S b/sysdeps/alpha/remqu.S index e22d5ac1c8..14a7486148 100644 --- a/sysdeps/alpha/remqu.S +++ b/sysdeps/alpha/remqu.S @@ -3,4 +3,4 @@ #define SIGNED 0 #define FUNC_NAME __remqu -#include "divrem.S" +#include "divrem.h" From a9dbc75c78c145cafc79e6b94b3227c3eab08db9 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 23 May 1996 05:32:55 +0000 Subject: [PATCH 0655/4487] Wed May 22 00:40:50 1996 David Mosberger-Tang * sysdeps/alpha/__math.h (cabs): Remove underscores from struct __cabs_complex member names in call to __hypot(). --- sysdeps/alpha/__math.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/alpha/__math.h b/sysdeps/alpha/__math.h index 9aea9d7097..50d8ac3b0a 100644 --- a/sysdeps/alpha/__math.h +++ b/sysdeps/alpha/__math.h @@ -46,7 +46,7 @@ extern __inline double cabs (struct __cabs_complex __z) { extern double __hypot (double, double); - return __hypot(__z.__x, __z.__y); + return __hypot(__z.x, __z.y); } #endif From 1ecceadd7a6d211bf0b65f38f6b7fe83def788f3 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 23 May 1996 05:32:58 +0000 Subject: [PATCH 0656/4487] Wed May 22 00:40:50 1996 David Mosberger-Tang * sysdeps/unix/sysv/linux/alpha/speed.c (speeds): Add entry for 460800 baud. --- sysdeps/unix/sysv/linux/alpha/speed.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/alpha/speed.c b/sysdeps/unix/sysv/linux/alpha/speed.c index b61cfbbfe3..40bf6c50bb 100644 --- a/sysdeps/unix/sysv/linux/alpha/speed.c +++ b/sysdeps/unix/sysv/linux/alpha/speed.c @@ -42,6 +42,7 @@ static const speed_t speeds[] = 57600, 115200, 230400, + 460800, }; From bccfffdbcb505b6c2965acee038cf0b73c49f6e4 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 23 May 1996 05:33:05 +0000 Subject: [PATCH 0657/4487] Wed May 22 00:40:50 1996 David Mosberger-Tang * sysdeps/alpha/_mcount.S, sysdeps/alpha/bb_init_func.S, sysdeps/alpha/bsd-setjmp.S, sysdeps/alpha/ffs.S, sysdeps/alpha/htonl.S, sysdeps/alpha/htons.S, sysdeps/alpha/memchr.S, sysdeps/alpha/setjmp.S, sysdeps/alpha/strlen.S, sysdeps/alpha/udiv_qrnnd.S, sysdeps/unix/sysv/linux/alpha/brk.S, sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S, sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S, sysdeps/unix/sysv/linux/alpha/pipe.S, sysdeps/unix/sysv/linux/sigsuspend.S, sysdeps/unix/sysv/linux/alpha/syscall.S, sysdeps/unix/sysv/linux/alpha/sysdep.S: Remove include of regdef.h. sysdep.h includes it now. Replace ENTRY by LEAF with appropriate framesize declaration. Replace "lda pv,sym/jsr pv" by "jsr sym". Wed Mar 27 10:26:21 1996 David Mosberger-Tang * sysdeps/alpha/setjmp.S: Must establish global pointer before address of __sigsetjmp_aux can be loaded. --- sysdeps/alpha/setjmp.S | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S index 04b8068eb9..b165d2c2c8 100644 --- a/sysdeps/alpha/setjmp.S +++ b/sysdeps/alpha/setjmp.S @@ -22,9 +22,12 @@ Cambridge, MA 02139, USA. */ reliably access the stack or frame pointers, so we pass them in as extra arguments. */ ENTRY (__sigsetjmp) - ldgp $29, 0($27) - lda $27, __sigsetjmp_aux/* Load address to jump to. */ - bis $30, $30, $18 /* Pass SP as 3rd arg. */ - bis $15, $15, $19 /* Pass FP as 4th arg. */ - jmp $31, ($27), __sigsetjmp_aux /* Call __sigsetjmp_aux. */ + ldgp $29, 0($27) + .prologue 1 + + lda $27, __sigsetjmp_aux /* Load address to jump to. */ + bis $30, $30, $18 /* Pass SP as 3rd arg. */ + bis $15, $15, $19 /* Pass FP as 4th arg. */ + jmp $31, ($27), __sigsetjmp_aux /* Call __sigsetjmp_aux. */ + .end __sigsetjmp From 49c79fe5c62d97dfd4ea2e0a4697264f68b48c39 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 23 May 1996 05:33:38 +0000 Subject: [PATCH 0658/4487] . --- sysdeps/alpha/divrem.S | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 sysdeps/alpha/divrem.S diff --git a/sysdeps/alpha/divrem.S b/sysdeps/alpha/divrem.S deleted file mode 100644 index e69de29bb2..0000000000 From 598022c144c1de42a41e7ba1fdf855dc31d1f5e6 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 24 May 1996 05:55:29 +0000 Subject: [PATCH 0659/4487] Wed May 22 00:40:50 1996 David Mosberger-Tang * sysdeps/alpha/_mcount.S, sysdeps/alpha/bb_init_func.S, sysdeps/alpha/bsd-_setjmp.S, sysdeps/alpha/ffs.S, sysdeps/alpha/htonl.S, sysdeps/alpha/htons.S, sysdeps/alpha/memchr.S, sysdeps/alpha/setjmp.S, sysdeps/alpha/strlen.S, sysdeps/alpha/udiv_qrnnd.S, sysdeps/unix/sysv/linux/alpha/brk.S, sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S, sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S, sysdeps/unix/sysv/linux/alpha/pipe.S, sysdeps/unix/sysv/linux/sigsuspend.S, sysdeps/unix/sysv/linux/alpha/syscall.S, sysdeps/unix/sysv/linux/alpha/sysdep.S: Remove include of regdef.h. sysdep.h includes it now. Replace ENTRY by LEAF with appropriate framesize declaration. Replace "lda pv,sym/jsr pv" by "jsr sym". --- sysdeps/alpha/bsd-_setjmp.S | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/alpha/bsd-_setjmp.S b/sysdeps/alpha/bsd-_setjmp.S index 9947d8f45a..16709dfc09 100644 --- a/sysdeps/alpha/bsd-_setjmp.S +++ b/sysdeps/alpha/bsd-_setjmp.S @@ -23,8 +23,8 @@ Cambridge, MA 02139, USA. */ #include -ENTRY (setjmp) - lda $27, __sigsetjmp /* Load address to jump to. */ - bis $31, $31, $17 /* Pass a second argument of zero. */ - jmp $31, ($27), __sigsetjmp /* Call __sigsetjmp. */ +ENTRY(setjmp) + lda $27, __sigsetjmp /* Load address to jump to. */ + bis $31, $31, $17 /* Pass a second argument of zero. */ + jmp $31, ($27), __sigsetjmp /* Call __sigsetjmp. */ .end setjmp From 4da911871d7f32de5a71dc7c9bba47ee7ec88590 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 24 May 1996 05:58:22 +0000 Subject: [PATCH 0660/4487] Wed May 22 00:40:50 1996 David Mosberger-Tang * sysdeps/unix/sysv/linux/alpha/Makefile (headers): Add alpha/ptrace.h. * sysdeps/unix/sysv/linux/alpha/alpha/ptrace.h: New file. --- sysdeps/unix/sysv/linux/alpha/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile index 9e12a0daa2..beb8441b46 100644 --- a/sysdeps/unix/sysv/linux/alpha/Makefile +++ b/sysdeps/unix/sysv/linux/alpha/Makefile @@ -1,5 +1,5 @@ ifeq ($(subdir), misc) -headers += alpha/regdef.h +headers += alpha/ptrace.h alpha/regdef.h sysdep_routines := $(sysdep_routines) \ ieee_get_fp_control ieee_set_fp_control fpu_control setfpucw \ From ccdaa27f97442822753099e30acfa714c942ee79 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 24 May 1996 05:59:19 +0000 Subject: [PATCH 0661/4487] Wed May 22 00:40:50 1996 David Mosberger-Tang * sysdeps/alpha/_mcount.S, sysdeps/alpha/bb_init_func.S, sysdeps/alpha/bsd-_setjmp.S, sysdeps/alpha/ffs.S, sysdeps/alpha/htonl.S, sysdeps/alpha/htons.S, sysdeps/alpha/memchr.S, sysdeps/alpha/setjmp.S, sysdeps/alpha/strlen.S, sysdeps/alpha/udiv_qrnnd.S, sysdeps/unix/sysv/linux/alpha/brk.S, sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S, sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S, sysdeps/unix/sysv/linux/alpha/pipe.S, sysdeps/unix/sysv/linux/alpha/sigsuspend.S, sysdeps/unix/sysv/linux/alpha/syscall.S, sysdeps/unix/sysv/linux/alpha/sysdep.S: Remove include of regdef.h. sysdep.h includes it now. Replace ENTRY by LEAF with appropriate framesize declaration. Replace "lda pv,sym/jsr pv" by "jsr sym". --- sysdeps/unix/sysv/linux/alpha/sigsuspend.S | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S index 29cba8d312..00c02de72b 100644 --- a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S +++ b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S @@ -17,12 +17,13 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* sigsuspend is a special syscall since it needs to dereference the -sigset. */ + sigset. */ #include .text -ENTRY(sigsuspend) + +LEAF(sigsuspend, 0) .prologue 0 ldq a0, 0(a0) @@ -33,7 +34,6 @@ ENTRY(sigsuspend) error: br gp, 1f 1: ldgp gp, 0(gp) - lda pv, syscall_error - jmp zero, (pv) + jmp zero, syscall_error .end sigsuspend From 284eb9ee9a4a44eb811e9692248e315fe73f551d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 24 May 1996 06:00:28 +0000 Subject: [PATCH 0662/4487] Wed May 22 00:40:50 1996 David Mosberger-Tang * sysdeps/alpha/_mcount.S, sysdeps/alpha/bb_init_func.S, sysdeps/alpha/bsd-_setjmp.S, sysdeps/alpha/ffs.S, sysdeps/alpha/htonl.S, sysdeps/alpha/htons.S, sysdeps/alpha/memchr.S, sysdeps/alpha/setjmp.S, sysdeps/alpha/strlen.S, sysdeps/alpha/udiv_qrnnd.S, sysdeps/unix/sysv/linux/alpha/brk.S, sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S, sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S, sysdeps/unix/sysv/linux/alpha/pipe.S, sysdeps/unix/sysv/linux/alpha/sigsuspend.S, sysdeps/unix/sysv/linux/alpha/syscall.S, sysdeps/unix/sysv/linux/alpha/start.S, sysdeps/unix/sysv/linux/alpha/sysdep.S: Remove include of regdef.h. sysdep.h includes it now. Replace ENTRY by LEAF with appropriate framesize declaration. Replace "lda pv,sym/jsr pv" by "jsr sym". --- sysdeps/unix/sysv/linux/alpha/start.S | 35 +++++++++++++++++++-------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/start.S b/sysdeps/unix/sysv/linux/alpha/start.S index d1966a82ba..a7099f6840 100644 --- a/sysdeps/unix/sysv/linux/alpha/start.S +++ b/sysdeps/unix/sysv/linux/alpha/start.S @@ -18,11 +18,16 @@ Cambridge, MA 02139, USA. */ #include -.comm errno, 4 + .comm errno, 4 +#ifdef __ELF__ + .type errno, @object +#endif .text -ENTRY(__start) +LEAF(__start, 16) lda sp, -16(sp) + .prologue 0 + stq zero, 8(sp) /* terminate frame chain */ br t0, 1f @@ -33,8 +38,7 @@ ENTRY(__start) ldgp gp, 0(ra) /* clear out errno. */ - lda t0, errno - stl zero, 0(t0) + stl zero, (errno) ldl a0, 16(sp) /* get argc */ lda a1, 24(sp) /* get argv */ @@ -45,26 +49,32 @@ ENTRY(__start) addq a2, 0x8, a2 stq a2, 0(t0) -#ifndef HAVE_INITFINI mov a0, s0 mov a1, s1 mov a2, s2 - jsr ra, __libc_init +#ifdef HAVE_INITFINI + /* register the _fini sections to ensure destructors get run: */ + lda a0, _fini + jsr ra, atexit ldgp gp, 0(ra) - mov s0, a0 - mov s1, a1 - mov s2, a2 + /* Now run the _init section of the program itself. The _init + sections of shared libraries will be run by the dynamic linker. */ + jsr ra, _init + ldgp gp, 0(ra) /* initialize constructors: */ jsr ra, __main ldgp gp, 0(ra) +#else + jsr ra, __libc_init + ldgp gp, 0(ra) +#endif mov s0, a0 mov s1, a1 mov s2, a2 -#endif jsr ra, main ldgp gp, 0(ra) @@ -90,4 +100,9 @@ ENTRY(__start) __data_start: .long 0 +#ifdef __ELF__ + .size __data_start, 4 + .type __data_start, @object +#endif + weak_alias(__data_start, data_start) From 39573b269d2c3a60bdab8e64c866cf102c328d03 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 2 Jun 1996 18:48:18 +0000 Subject: [PATCH 0663/4487] Wed May 29 00:57:37 1996 David Mosberger-Tang * sysdeps/alpha/divrem.h: Include instead of <*/regdef.h>. * sysdeps/alpha/_mcount.S, sysdeps/alpha/bb_init_func.S, sysdeps/alpha/bsd-_setjmp.S, sysdeps/alpha/bsd-setjmp.S, sysdeps/alpha/copysign.S, sysdeps/alpha/divrem.h, sysdeps/alpha/fabs.S, sysdeps/alpha/ffs.S, sysdeps/alpha/htonl.S, sysdeps/alpha/htons.S, sysdeps/alpha/memchr.S, sysdeps/alpha/setjmp.S, sysdeps/alpha/strlen.S, sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S, sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S, sysdeps/unix/sysv/linux/alpha/llseek.S, sysdeps/unix/sysv/linux/alpha/pipe.S, sysdeps/unix/sysv/linux/alpha/sigsuspend.S, sysdeps/unix/sysv/linux/alpha/sysdep.S: Use END macro instead of .end directive. --- sysdeps/alpha/divrem.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/alpha/divrem.h b/sysdeps/alpha/divrem.h index ee7f64ef1e..f296179e99 100644 --- a/sysdeps/alpha/divrem.h +++ b/sysdeps/alpha/divrem.h @@ -32,12 +32,12 @@ sequence, these expect their arguments in registers t10 and t11, and return the result in t12 (aka pv). Registers AT and v0 may be clobbered (assembly temporary), anything else must be saved. */ +#include + #ifdef __linux__ -# include # include # include #else -# include # include #endif @@ -185,4 +185,4 @@ done: ldq arg2,0x08(sp) ldq arg1,0x00(sp) br done - .end FUNC_NAME + END(FUNC_NAME) From dd8dd50fb3b004876e1ebec7fad452a0e116ff2b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 2 Jun 1996 18:48:30 +0000 Subject: [PATCH 0664/4487] Wed May 29 00:57:37 1996 David Mosberger-Tang * sysdeps/alpha/_mcount.S, sysdeps/alpha/bb_init_func.S, sysdeps/alpha/bsd-_setjmp.S, sysdeps/alpha/bsd-setjmp.S, sysdeps/alpha/copysign.S, sysdeps/alpha/divrem.h, sysdeps/alpha/fabs.S, sysdeps/alpha/ffs.S, sysdeps/alpha/htonl.S, sysdeps/alpha/htons.S, sysdeps/alpha/memchr.S, sysdeps/alpha/setjmp.S, sysdeps/alpha/strlen.S, sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S, sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S, sysdeps/unix/sysv/linux/alpha/llseek.S, sysdeps/unix/sysv/linux/alpha/pipe.S, sysdeps/unix/sysv/linux/alpha/sigsuspend.S, sysdeps/unix/sysv/linux/alpha/sysdep.S: Use END macro instead of .end directive. Tue May 28 10:46:04 1996 Richard Henderson * sysdeps/alpha/bb_init_func.S: Don't make `init' an external symbol. --- sysdeps/alpha/bb_init_func.S | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sysdeps/alpha/bb_init_func.S b/sysdeps/alpha/bb_init_func.S index cd860b8303..dfa8c1d07b 100644 --- a/sysdeps/alpha/bb_init_func.S +++ b/sysdeps/alpha/bb_init_func.S @@ -41,10 +41,11 @@ ENTRY(__bb_init_func) beq t0, init /* not initialized yet -> */ ret - .end __bb_init_func +END(__bb_init_func) - -LEAF(init, 0x38) +.ent init +init: + .frame sp, 0x38, ra, 0 subq sp, 0x38, sp .prologue 0 @@ -84,4 +85,4 @@ leave: ldq pv, 0x30(sp) addq sp, 0x38, sp ret - .end init +.end init From e872219f508230565ee19f2024b5eb83ff6c31e7 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 2 Jun 1996 18:48:32 +0000 Subject: [PATCH 0665/4487] Wed May 29 00:57:37 1996 David Mosberger-Tang * sysdeps/alpha/bsd-_setjmp.S (setjmp): Renamed entry point to _setjmp. * sysdeps/alpha/_mcount.S, sysdeps/alpha/bb_init_func.S, sysdeps/alpha/bsd-_setjmp.S, sysdeps/alpha/bsd-setjmp.S, sysdeps/alpha/copysign.S, sysdeps/alpha/divrem.h, sysdeps/alpha/fabs.S, sysdeps/alpha/ffs.S, sysdeps/alpha/htonl.S, sysdeps/alpha/htons.S, sysdeps/alpha/memchr.S, sysdeps/alpha/setjmp.S, sysdeps/alpha/strlen.S, sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S, sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S, sysdeps/unix/sysv/linux/alpha/llseek.S, sysdeps/unix/sysv/linux/alpha/pipe.S, sysdeps/unix/sysv/linux/alpha/sigsuspend.S, sysdeps/unix/sysv/linux/alpha/sysdep.S: Use END macro instead of .end directive. Tue May 28 10:46:04 1996 Richard Henderson * sysdeps/alpha/bsd-_setjmp.S: The function is _setjmp not setjmp. --- sysdeps/alpha/bsd-_setjmp.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/bsd-_setjmp.S b/sysdeps/alpha/bsd-_setjmp.S index 16709dfc09..da60442c23 100644 --- a/sysdeps/alpha/bsd-_setjmp.S +++ b/sysdeps/alpha/bsd-_setjmp.S @@ -23,8 +23,8 @@ Cambridge, MA 02139, USA. */ #include -ENTRY(setjmp) +ENTRY(_setjmp) lda $27, __sigsetjmp /* Load address to jump to. */ bis $31, $31, $17 /* Pass a second argument of zero. */ jmp $31, ($27), __sigsetjmp /* Call __sigsetjmp. */ - .end setjmp + END(_setjmp) From d663482017d73707e4f9181a1dad1557b596e2a4 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 2 Jun 1996 18:48:36 +0000 Subject: [PATCH 0666/4487] Wed May 29 00:57:37 1996 David Mosberger-Tang * sysdeps/unix/bsd/osf/alpha/brk.S, sysdeps/unix/sysv/linux/alpha/brk.S (__curbrk): Store the entire break value, not just the low 32 bits to accomodate large memories. Tue May 28 10:46:04 1996 Richard Henderson * sysdeps/unix/sysv/linux/alpha/brk.S: Rather than attempt to dynamically resolve _end for initializing __curbrk, support the brk(0) query idiom. --- sysdeps/unix/sysv/linux/alpha/brk.S | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/brk.S b/sysdeps/unix/sysv/linux/alpha/brk.S index 4582539bc1..1c4a4f9217 100644 --- a/sysdeps/unix/sysv/linux/alpha/brk.S +++ b/sysdeps/unix/sysv/linux/alpha/brk.S @@ -23,17 +23,7 @@ break value (instead of the new, requested one). */ #include #include -#ifndef HAVE_GNU_LD -#define _end end -#endif - - .extern _end,8 - - .data - - .globl __curbrk -__curbrk: - .quad _end +.comm __curbrk, 8 .text LEAF(__brk, 0) @@ -42,11 +32,15 @@ LEAF(__brk, 0) ldi v0, __NR_brk call_pal PAL_callsys + + /* Correctly handle the brk(0) query case. */ + cmoveq a0, v0, a0 + subq a0, v0, t0 bne t0, error /* Update __curbrk and return cleanly. */ - stl a0, __curbrk + stq a0, __curbrk mov zero, v0 ret @@ -54,6 +48,6 @@ LEAF(__brk, 0) error: ldi v0, ENOMEM jmp zero, syscall_error - .end __brk + END(__brk) weak_alias (__brk, brk) From 56e70371a665b84fb51b73964d99f55f3a982869 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 2 Jun 1996 18:49:21 +0000 Subject: [PATCH 0667/4487] Wed May 29 00:57:37 1996 David Mosberger-Tang * sysdeps/alpha/_mcount.S, sysdeps/alpha/bb_init_func.S, sysdeps/alpha/bsd-_setjmp.S, sysdeps/alpha/bsd-setjmp.S, sysdeps/alpha/copysign.S, sysdeps/alpha/divrem.h, sysdeps/alpha/fabs.S, sysdeps/alpha/ffs.S, sysdeps/alpha/htonl.S, sysdeps/alpha/htons.S, sysdeps/alpha/memchr.S, sysdeps/alpha/setjmp.S, sysdeps/alpha/strlen.S, sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S, sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S, sysdeps/unix/sysv/linux/alpha/llseek.S, sysdeps/unix/sysv/linux/alpha/pipe.S, sysdeps/unix/sysv/linux/alpha/sigsuspend.S, sysdeps/unix/sysv/linux/alpha/sysdep.S: Use END macro instead of .end directive. --- sysdeps/alpha/_mcount.S | 2 +- sysdeps/alpha/bsd-setjmp.S | 2 +- sysdeps/alpha/copysign.S | 2 +- sysdeps/alpha/fabs.S | 2 +- sysdeps/alpha/ffs.S | 2 +- sysdeps/alpha/htonl.S | 2 +- sysdeps/alpha/htons.S | 2 +- sysdeps/alpha/memchr.S | 2 +- sysdeps/alpha/setjmp.S | 2 +- sysdeps/alpha/strlen.S | 2 +- sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S | 2 +- sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S | 2 +- sysdeps/unix/sysv/linux/alpha/llseek.S | 2 +- sysdeps/unix/sysv/linux/alpha/pipe.S | 2 +- sysdeps/unix/sysv/linux/alpha/sigsuspend.S | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/sysdeps/alpha/_mcount.S b/sysdeps/alpha/_mcount.S index 7944544e18..1730760316 100644 --- a/sysdeps/alpha/_mcount.S +++ b/sysdeps/alpha/_mcount.S @@ -106,4 +106,4 @@ LEAF(_mcount, 0xb0) addq sp, 0xb0, sp ret zero,($at),1 - .end _mcount + END(_mcount) diff --git a/sysdeps/alpha/bsd-setjmp.S b/sysdeps/alpha/bsd-setjmp.S index 113bc47c88..fc73815a84 100644 --- a/sysdeps/alpha/bsd-setjmp.S +++ b/sysdeps/alpha/bsd-setjmp.S @@ -27,4 +27,4 @@ ENTRY(setjmp) lda $27, __sigsetjmp /* Load address to jump to. */ bis $31, 1, $17 /* Pass a second argument of one. */ jmp $31, ($27), __sigsetjmp /* Call __sigsetjmp. */ - .end setjmp + END(setjmp) diff --git a/sysdeps/alpha/copysign.S b/sysdeps/alpha/copysign.S index 9e9dff3ed0..95eb608666 100644 --- a/sysdeps/alpha/copysign.S +++ b/sysdeps/alpha/copysign.S @@ -24,6 +24,6 @@ ENTRY(__copysign) cpys $f17,$f16,$f0 ret - .end __copysign + END(__copysign) weak_alias(__copysign, copysign) diff --git a/sysdeps/alpha/fabs.S b/sysdeps/alpha/fabs.S index 88e64b4718..dff8390b5a 100644 --- a/sysdeps/alpha/fabs.S +++ b/sysdeps/alpha/fabs.S @@ -24,4 +24,4 @@ ENTRY(fabs) cpys $f31,$f16,$f0 ret - .end fabs + END(fabs) diff --git a/sysdeps/alpha/ffs.S b/sysdeps/alpha/ffs.S index 7cf6281682..e4dd87c9f1 100644 --- a/sysdeps/alpha/ffs.S +++ b/sysdeps/alpha/ffs.S @@ -63,4 +63,4 @@ ENTRY(ffs) done: ret - .end ffs + END(ffs) diff --git a/sysdeps/alpha/htonl.S b/sysdeps/alpha/htonl.S index 8c1c700212..9777e461cc 100644 --- a/sysdeps/alpha/htonl.S +++ b/sysdeps/alpha/htonl.S @@ -31,7 +31,7 @@ ENTRY(__htonl) or t2, v0, v0 # v0 = ddccbbaa ret - .end __htonl + END(__htonl) strong_alias_asm(__htonl, __ntohl) weak_alias(__htonl, htonl) diff --git a/sysdeps/alpha/htons.S b/sysdeps/alpha/htons.S index cb22b21661..7717636782 100644 --- a/sysdeps/alpha/htons.S +++ b/sysdeps/alpha/htons.S @@ -25,7 +25,7 @@ ENTRY(__htons) bis v0, t1, v0 # v0 = bbaa ret - .end __htons + END(__htons) strong_alias_asm(__htons, __ntohs) weak_alias(__htons, htons) diff --git a/sysdeps/alpha/memchr.S b/sysdeps/alpha/memchr.S index 2f78697418..2d21247174 100644 --- a/sysdeps/alpha/memchr.S +++ b/sysdeps/alpha/memchr.S @@ -157,4 +157,4 @@ not_found: mov zero, v0 ret - .end memchr + END(memchr) diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S index b165d2c2c8..da71a3292a 100644 --- a/sysdeps/alpha/setjmp.S +++ b/sysdeps/alpha/setjmp.S @@ -30,4 +30,4 @@ ENTRY (__sigsetjmp) bis $15, $15, $19 /* Pass FP as 4th arg. */ jmp $31, ($27), __sigsetjmp_aux /* Call __sigsetjmp_aux. */ - .end __sigsetjmp + END(__sigsetjmp) diff --git a/sysdeps/alpha/strlen.S b/sysdeps/alpha/strlen.S index c64126164a..15c78cde64 100644 --- a/sysdeps/alpha/strlen.S +++ b/sysdeps/alpha/strlen.S @@ -67,4 +67,4 @@ found: blbs t1, done # make aligned case fast done: subq v0, a0, v0 ret - .end strlen + END(strlen) diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S index c3486acc1a..52c945aec2 100644 --- a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S +++ b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S @@ -41,6 +41,6 @@ error: lda sp, 8(sp) 1: ldgp gp, 0(gp) jmp zero, syscall_error - .end __ieee_get_fp_control + END(__ieee_get_fp_control) weak_alias (__ieee_get_fp_control, ieee_get_fp_control) diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S index 507b5d5cab..d72585daf1 100644 --- a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S +++ b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S @@ -39,6 +39,6 @@ error: br gp, 1f 1: ldgp gp, 0(gp) jmp zero, syscall_error - .end __ieee_set_fp_control + END(__ieee_set_fp_control) weak_alias (__ieee_set_fp_control, ieee_set_fp_control) diff --git a/sysdeps/unix/sysv/linux/alpha/llseek.S b/sysdeps/unix/sysv/linux/alpha/llseek.S index 7f2a49172a..bd8c6595c9 100644 --- a/sysdeps/unix/sysv/linux/alpha/llseek.S +++ b/sysdeps/unix/sysv/linux/alpha/llseek.S @@ -46,4 +46,4 @@ error: br gp, 1f 1: ldgp gp, 0(gp) jmp zero, syscall_error - .end llseek + END(llseek) diff --git a/sysdeps/unix/sysv/linux/alpha/pipe.S b/sysdeps/unix/sysv/linux/alpha/pipe.S index 40958466a4..b23803cecd 100644 --- a/sysdeps/unix/sysv/linux/alpha/pipe.S +++ b/sysdeps/unix/sysv/linux/alpha/pipe.S @@ -37,6 +37,6 @@ error: br gp, 1f 1: ldgp gp, 0(gp) jmp zero, syscall_error - .end __pipe + END(__pipe) weak_alias (__pipe, pipe) diff --git a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S index 00c02de72b..26a1869783 100644 --- a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S +++ b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S @@ -36,4 +36,4 @@ error: br gp, 1f 1: ldgp gp, 0(gp) jmp zero, syscall_error - .end sigsuspend + END(sigsuspend) From a3bb81d201fdea6fd8922760972854e80513e68e Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 2 Jun 1996 18:49:27 +0000 Subject: [PATCH 0668/4487] Wed May 29 00:57:37 1996 David Mosberger-Tang * sysdeps/unix/bsd/osf/alpha/brk.S, sysdeps/unix/sysv/linux/alpha/brk.S (__curbrk): Store the entire break value, not just the low 32 bits to accomodate large memories. --- sysdeps/unix/bsd/osf/alpha/brk.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/bsd/osf/alpha/brk.S b/sysdeps/unix/bsd/osf/alpha/brk.S index 6e4bd2cc71..105e40100b 100644 --- a/sysdeps/unix/bsd/osf/alpha/brk.S +++ b/sysdeps/unix/bsd/osf/alpha/brk.S @@ -41,7 +41,7 @@ ENTRY(__brk) /* Update __curbrk and exit cleanly. */ /* ldgp gp, 0(t12) */ - stl a0, __curbrk + stq a0, __curbrk mov zero, v0 ret From 53f64cf452e92caee23e3bb49ed145b10bf49190 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 2 Jun 1996 18:49:29 +0000 Subject: [PATCH 0669/4487] Wed May 29 00:57:37 1996 David Mosberger-Tang * sysdeps/unix/sysv/linux/alpha/speed.c: Remove. --- sysdeps/unix/sysv/linux/alpha/speed.c | 103 -------------------------- 1 file changed, 103 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/alpha/speed.c diff --git a/sysdeps/unix/sysv/linux/alpha/speed.c b/sysdeps/unix/sysv/linux/alpha/speed.c deleted file mode 100644 index 40bf6c50bb..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/speed.c +++ /dev/null @@ -1,103 +0,0 @@ -/* `struct termios' speed frobnication functions. Linux version. -Copyright (C) 1991, 1992, 1993, 1995 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include -#include - -static const speed_t speeds[] = - { - 0, - 50, - 75, - 110, - 134, - 150, - 200, - 300, - 600, - 1200, - 1800, - 2400, - 4800, - 9600, - 19200, - 38400, - 57600, - 115200, - 230400, - 460800, - }; - - -/* Return the output baud rate stored in *TERMIOS_P. */ -speed_t -cfgetospeed (termios_p) - const struct termios *termios_p; -{ - speed_t retval = termios_p->c_cflag & (CBAUD | CBAUDEX); - - if (retval & CBAUDEX) - { - retval &= ~CBAUDEX; - retval |= CBAUD + 1; - } - - return retval; -} - -/* Return the input baud rate stored in *TERMIOS_P. - For Linux there is no difference between input and output speed. */ -strong_alias (cfgetospeed, cfgetispeed); - -/* Set the output baud rate stored in *TERMIOS_P to SPEED. */ -int -cfsetospeed (termios_p, speed) - struct termios *termios_p; - speed_t speed; -{ - register unsigned int i; - - if (termios_p == NULL) - { - errno = EINVAL; - return -1; - } - - /* This allows either B1200 or 1200 to work. XXX - Do we really want to try to support this, given that - fetching the speed must return one or the other? */ - - for (i = 0; i < sizeof (speeds) / sizeof (speeds[0]); ++i) - if (i == speed || speeds[i] == speed) - { - termios_p->c_cflag &= ~(CBAUD | CBAUDEX); - termios_p->c_cflag |= (i & CBAUD); - if (i & ~CBAUD) - termios_p->c_cflag |= CBAUDEX; - return 0; - } - - errno = EINVAL; - return -1; -} - -/* Set the input baud rate stored in *TERMIOS_P to SPEED. - For Linux there is no difference between input and output speed. */ -strong_alias (cfsetospeed, cfsetispeed); From 18a403782d3a58b6f0928021d78a54594bfd0b9d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 2 Jun 1996 18:49:31 +0000 Subject: [PATCH 0670/4487] Wed May 29 00:57:37 1996 David Mosberger-Tang * sysdeps/unix/alpha/sysdep.h (END): Redefine to use .end directive for both ELF and ECOFF. (ret): Delete macro. It was a dangerous macro and unnecessary since the Alpha assemblers recognizes "ret" as a macro themselves. Thu May 23 02:15:56 1996 David Mosberger-Tang * sysdeps/unix/alpha/sysdep.h (ret): Remove macro. It is dangerous and unnecessary since both OSF/1 as and gas define "ret" as a pseudo-instruction. --- sysdeps/unix/alpha/sysdep.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h index 8a52f201e1..6fed4a6adf 100644 --- a/sysdeps/unix/alpha/sysdep.h +++ b/sysdeps/unix/alpha/sysdep.h @@ -97,7 +97,9 @@ name/**/: \ 3: #endif -#define ret ret zero,(ra),1 +#undef END +#define END(sym) .end sym + #define r0 v0 #define r1 a4 From 03e81891af6e73dbeddabab27ec54004f3f31529 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 2 Jun 1996 21:35:13 +0000 Subject: [PATCH 0671/4487] Sun Jun 2 14:56:49 1996 Roland McGrath * elf/dl-lookup.c (_dl_lookup_symbol): Arg NOSELF renamed to NOPLT. Reject SHN_UNDEF defns iff NOPLT is nonzero. * elf/link.h (_dl_lookup_symbol): Update prototype and comment. * elf/dl-runtime.c (fixup): Pass 1 to _dl_lookup_symbol for NOPLT. * elf/dlsym.c (dlsym): Pass 0. * elf/rtld.c (dl_main): Likewise. * elf/dl-reloc.c (_dl_relocate_object: resolve): Second arg R_OFFSET replaced with NOPLT flag. Pass it through to _dl_lookup_symbol. * elf/do-rel.h (elf_dynamic_do_rel): Update prototype of RESOLVE arg. Pass `elf_machine_pltrel_p (R->r_type)' result as NOPLT flag value. * sysdeps/i386/dl-machine.h (elf_machine_pltrel_p): New macro. * sysdeps/m68k/dl-machine.h (elf_machine_pltrel_p): Likewise. * sysdeps/stub/dl-machine.h (elf_machine_pltrel_p): Likewise. --- sysdeps/m68k/dl-machine.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index 8cbb97787c..aa1f19eacb 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -136,6 +136,10 @@ elf_machine_lazy_rel (struct link_map *map, const Elf32_Rela *reloc) } } +/* Nonzero iff TYPE describes relocation of a PLT entry, so + PLT entries should not be allowed to define the value. */ +#define elf_machine_pltrel_p(type) ((type) == R_68K_JMP_SLOT) + /* The m68k never uses Elf32_Rel relocations. */ #define ELF_MACHINE_NO_REL 1 From 43e2c3421f515e9a97e2a2420dda167d4b0d0f57 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 3 Jun 1996 04:24:14 +0000 Subject: [PATCH 0672/4487] Mon Jun 3 03:06:34 1996 Roland McGrath * elf/dl-lookup.c (_dl_lookup_symbol): Take new arg RELOC_ADDR and don't allow a defn resolving to that address. * elf/link.h: Update prototype and comment. * elf/dl-runtime.c (fixup): Define local `resolve' function and pass it to elf_machine_relplt. * elf/dl-reloc.c (_dl_relocate_object: resolve): Take new arg RELOC_ADDR and pass it through to _dl_lookup_symbol. * elf/do-rel.h (elf_dynamic_do_rel): Pass RESOLVE to elf_machine_rel instead of calling it ourselves and passing its results. (elf_dynamic_do_rel): RESOLVE fn takes new arg RELOC_ADDR. * elf/rtld.c (dl_main): Pass 0 for RELOC_ADDR to _dl_lookup_symbol. * sysdeps/i386/dl-machine.h (elf_machine_rel): Remove SYM_LOADADDR arg. Add RESOLVE function ptr arg. Call *RESOLVE as necessary. * sysdeps/m68k/dl-machine.h (elf_machine_rela): Likewise. * sysdeps/stub/dl-machine.h: Likewise. Sun Jun 2 14:56:49 1996 Roland McGrath * elf/dl-lookup.c (_dl_lookup_symbol): Arg NOSELF renamed to NOPLT. Reject SHN_UNDEF defns iff NOPLT is nonzero. * elf/link.h (_dl_lookup_symbol): Update prototype and comment. * elf/dl-runtime.c (fixup): Pass 1 to _dl_lookup_symbol for NOPLT. * elf/dlsym.c (dlsym): Pass 0. * elf/rtld.c (dl_main): Likewise. * elf/dl-reloc.c (_dl_relocate_object: resolve): Second arg R_OFFSET replaced with NOPLT flag. Pass it through to _dl_lookup_symbol. * elf/do-rel.h (elf_dynamic_do_rel): Update prototype of RESOLVE arg. Pass `elf_machine_pltrel_p (R->r_type)' result as NOPLT flag value. * sysdeps/i386/dl-machine.h (elf_machine_pltrel_p): New macro. * sysdeps/m68k/dl-machine.h (elf_machine_pltrel_p): Likewise. * sysdeps/stub/dl-machine.h (elf_machine_pltrel_p): Likewise. --- sysdeps/m68k/dl-machine.h | 46 +++++++++++++++++++++++++++++---------- 1 file changed, 35 insertions(+), 11 deletions(-) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index aa1f19eacb..760bf9662d 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -73,43 +73,67 @@ elf_machine_load_address (void) static inline void elf_machine_rela (struct link_map *map, - const Elf32_Rela *reloc, - Elf32_Addr sym_loadaddr, const Elf32_Sym *sym) + const Elf32_Rel *reloc, const Elf32_Sym *sym, + Elf32_Addr (*resolve) (const Elf32_Sym **ref, + Elf32_Addr reloc_addr, + int noplt)) { Elf32_Addr *const reloc_addr = (void *) (map->l_addr + reloc->r_offset); - const Elf32_Addr sym_value = sym ? sym_loadaddr + sym->st_value : 0; + Elf32_Addr loadbase; switch (ELF32_R_TYPE (reloc->r_info)) { case R_68K_COPY: - memcpy (reloc_addr, (void *) sym_value, sym->st_size); + loadbase = (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0); + memcpy (reloc_addr, (void *) (loadbase + sym->st_value), sym->st_size); break; case R_68K_GLOB_DAT: + loadbase = (resolve ? (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0) : + /* RESOLVE is null during bootstrap relocation. */ + map->l_addr); + *reloc_addr = sym ? (loadbase + sym->st_value) : 0; + break; case R_68K_JMP_SLOT: - *reloc_addr = sym_value; + loadbase = (resolve ? (*resolve) (&sym, (Elf32_Addr) reloc_addr, 1) : + /* RESOLVE is null during bootstrap relocation. */ + map->l_addr); + *reloc_addr = sym ? (loadbase + sym->st_value) : 0; break; case R_68K_8: - *(char *) reloc_addr = sym_value + reloc->r_addend; + loadbase = (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0); + *(char *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) + + reloc->r_addend); break; case R_68K_16: - *(short *) reloc_addr = sym_value + reloc->r_addend; + loadbase = (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0); + *(short *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) + + reloc->r_addend); break; case R_68K_32: - *reloc_addr = sym_value + reloc->r_addend; + loadbase = (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0); + *reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) + + reloc->r_addend); break; case R_68K_RELATIVE: *reloc_addr = map->l_addr + reloc->r_addend; break; case R_68K_PC8: - *(char *) reloc_addr = (sym_value + reloc->r_addend + loadbase = (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0); + *(char *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) + + reloc->r_addend - (Elf32_Addr) reloc_addr); break; case R_68K_PC16: - *(short *) reloc_addr = (sym_value + reloc->r_addend + loadbase = (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0); + *(short *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) + + reloc->r_addend - (Elf32_Addr) reloc_addr); break; case R_68K_PC32: - *reloc_addr = sym_value + reloc->r_addend - (Elf32_Addr) reloc_addr; + loadbase = (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0); + *reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) + + reloc->r_addend + - (Elf32_Addr) reloc_addr); break; case R_68K_NONE: /* Alright, Wilbur. */ break; From 7c366516bbb032fa870e195a129cb54ff1e803b1 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 4 Jun 1996 22:59:11 +0000 Subject: [PATCH 0673/4487] Tue Jun 4 18:57:57 1996 Roland McGrath * elf/dl-init.c (_dl_init_next): Take argument, link_map whose searchlist describes the piece of the DT_NEEDED graph to be initialized. * elf/link.h: Update prototype. * sysdeps/i386/dl-machine.h (RTLD_START): Pass _dl_loaded as argument to _dl_init_next. * sysdeps/m68k/dl-machine.h: Likewise. * elf/dl-deps.c (_dl_open): Pass new object as arg to _dl_init_next. --- sysdeps/m68k/dl-machine.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index 760bf9662d..6c6b01de2b 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -250,14 +250,18 @@ elf_machine_runtime_setup (struct link_map *l, int lazy) lea (%sp, %d0*4), %sp | Push back the modified argument count. move.l %d1, -(%sp) + | Push _dl_loaded as argument in _dl_init_next call below. + move.l ([_dl_loaded@GOT, %a5]), %d2 +0: move.l %d2, -(%sp) | Call _dl_init_next to return the address of an initializer | function to run. -0: bsr.l _dl_init_next@PLTPC + bsr.l _dl_init_next@PLTPC + add.l #4, %sp | Pop argument. | Check for zero return, when out of initializers. tst.l %d0 jeq 1f | Call the shared object initializer function. - | NOTE: We depend only on the registers (%a4 and %a5) + | NOTE: We depend only on the registers (%d2, %a4 and %a5) | and the return address pushed by this call; | the initializer is called with the stack just | as it appears on entry, and it is free to move From 6a284f153f8f07ccecb06b007e6fa35a413c67fd Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 5 Jun 1996 03:29:08 +0000 Subject: [PATCH 0674/4487] Tue Jun 4 21:01:20 1996 Roland McGrath * sysdeps/i386/Makefile (long-double-fcts): New variable, set to yes. * sysdeps/m68k/Makefile: Likewise. --- sysdeps/m68k/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile index 3d35ac56ba..ffdc68274e 100644 --- a/sysdeps/m68k/Makefile +++ b/sysdeps/m68k/Makefile @@ -36,3 +36,6 @@ asm-CPPFLAGS += $(m68k-syntax-flag) # Make sure setjmp.c is compiled with a frame pointer CFLAGS-setjmp.c := -fno-omit-frame-pointer + +# The 68k `long double' is a distinct type we support. +long-double-fcts = yes From 173c291195fa4fd580be701c73db56a9cee6bc5f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 5 Jun 1996 19:04:42 +0000 Subject: [PATCH 0675/4487] Wed Jun 5 00:01:19 1996 Roland McGrath * sysdeps/unix/bsd/ultrix4/mips/Dist: Updated. * sysdeps/unix/bsd/ultrix4/Dist: Removed. * sysdeps/unix/sysv/sysv4/Dist: Updated. * sysdeps/unix/sysv/sco3.2.4/Dist: Removed. * sysdeps/unix/sysv/irix4/Dist: Updated. * sysdeps/unix/sysv/linux/i386/Dist: Removed. * sysdeps/unix/sysv/Dist: Updated. * sysdeps/unix/bsd/sun/sunos4/Dist: Removed. * sysdeps/unix/bsd/sony/newsos4/Dist: Removed. * sysdeps/gnu/Dist: New file. * sysdeps/alpha/Dist: Updated. * sysdeps/mach/hurd/Dist: Updated. --- sysdeps/alpha/Dist | 2 +- sysdeps/unix/bsd/sony/newsos4/Dist | 1 - sysdeps/unix/bsd/sun/sunos4/Dist | 2 -- sysdeps/unix/bsd/ultrix4/Dist | 1 - sysdeps/unix/bsd/ultrix4/mips/Dist | 2 +- sysdeps/unix/sysv/irix4/Dist | 1 - sysdeps/unix/sysv/sco3.2.4/Dist | 2 -- sysdeps/unix/sysv/sysv4/Dist | 5 ----- 8 files changed, 2 insertions(+), 14 deletions(-) delete mode 100644 sysdeps/unix/bsd/sony/newsos4/Dist delete mode 100644 sysdeps/unix/bsd/sun/sunos4/Dist delete mode 100644 sysdeps/unix/bsd/ultrix4/Dist delete mode 100644 sysdeps/unix/sysv/sco3.2.4/Dist diff --git a/sysdeps/alpha/Dist b/sysdeps/alpha/Dist index c4ea856629..0b1e1b90f4 100644 --- a/sysdeps/alpha/Dist +++ b/sysdeps/alpha/Dist @@ -1,4 +1,4 @@ setjmp_aux.c DEFS.h -divrem.m4 macros.m4 +divrem.h divl.S divlu.S divq.S divqu.S reml.S remlu.S remq.S remqu.S diff --git a/sysdeps/unix/bsd/sony/newsos4/Dist b/sysdeps/unix/bsd/sony/newsos4/Dist deleted file mode 100644 index d7500fde41..0000000000 --- a/sysdeps/unix/bsd/sony/newsos4/Dist +++ /dev/null @@ -1 +0,0 @@ -sys_wait4.S diff --git a/sysdeps/unix/bsd/sun/sunos4/Dist b/sysdeps/unix/bsd/sun/sunos4/Dist deleted file mode 100644 index f1c9046516..0000000000 --- a/sysdeps/unix/bsd/sun/sunos4/Dist +++ /dev/null @@ -1,2 +0,0 @@ -sys_wait4.S -sys_mmap.S diff --git a/sysdeps/unix/bsd/ultrix4/Dist b/sysdeps/unix/bsd/ultrix4/Dist deleted file mode 100644 index 6745cd4b04..0000000000 --- a/sysdeps/unix/bsd/ultrix4/Dist +++ /dev/null @@ -1 +0,0 @@ -getsysinfo.S diff --git a/sysdeps/unix/bsd/ultrix4/mips/Dist b/sysdeps/unix/bsd/ultrix4/mips/Dist index c2e8abb84d..06cf9cc2de 100644 --- a/sysdeps/unix/bsd/ultrix4/mips/Dist +++ b/sysdeps/unix/bsd/ultrix4/mips/Dist @@ -1 +1 @@ -sigtramp.c __handler.S +__handler.S diff --git a/sysdeps/unix/sysv/irix4/Dist b/sysdeps/unix/sysv/irix4/Dist index c5dd106b55..cf0a898e53 100644 --- a/sysdeps/unix/sysv/irix4/Dist +++ b/sysdeps/unix/sysv/irix4/Dist @@ -1,2 +1 @@ -syssgi.S sysmp.S __handler.S sigtramp.c diff --git a/sysdeps/unix/sysv/sco3.2.4/Dist b/sysdeps/unix/sysv/sco3.2.4/Dist deleted file mode 100644 index 462b9fb1a6..0000000000 --- a/sysdeps/unix/sysv/sco3.2.4/Dist +++ /dev/null @@ -1,2 +0,0 @@ -pgrpsys.S -sco_getgrp.S diff --git a/sysdeps/unix/sysv/sysv4/Dist b/sysdeps/unix/sysv/sysv4/Dist index f603d8b8ff..da3d7e58e1 100644 --- a/sysdeps/unix/sysv/sysv4/Dist +++ b/sysdeps/unix/sysv/sysv4/Dist @@ -1,7 +1,2 @@ sysconfig.h -sysconfig.S -pgrpsys.S -__waitid.S siginfo.h -__getpgid.c __setpgid.c -sysinfo.S From adf91cfa8d8879c3c109009de52a7ae35b44587d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 5 Jun 1996 23:22:41 +0000 Subject: [PATCH 0676/4487] Wed Jun 5 15:57:28 1996 Roland McGrath * sysdeps/unix/sysv/sysv4/solaris2/sparc/Dist: Removed. --- sysdeps/unix/sysv/sysv4/solaris2/sparc/Dist | 1 - 1 file changed, 1 deletion(-) delete mode 100644 sysdeps/unix/sysv/sysv4/solaris2/sparc/Dist diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/Dist b/sysdeps/unix/sysv/sysv4/solaris2/sparc/Dist deleted file mode 100644 index 69d16ac6bf..0000000000 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/Dist +++ /dev/null @@ -1 +0,0 @@ -sys-sig.S From 0526c3be0eceae9a33610bf6aa5bc2e2ebe759e8 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 5 Jun 1996 23:23:03 +0000 Subject: [PATCH 0677/4487] Wed Jun 5 15:57:28 1996 Roland McGrath * Makerules (distinfo-vars): Add sysdep_headers. * sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Append to this instead of $(headers). * sysdeps/unix/sysv/linux/alpha/Makefile: Likewise. --- sysdeps/unix/sysv/linux/alpha/Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile index beb8441b46..e6e421da9d 100644 --- a/sysdeps/unix/sysv/linux/alpha/Makefile +++ b/sysdeps/unix/sysv/linux/alpha/Makefile @@ -1,7 +1,6 @@ ifeq ($(subdir), misc) -headers += alpha/ptrace.h alpha/regdef.h +sysdep_headers += alpha/ptrace.h alpha/regdef.h -sysdep_routines := $(sysdep_routines) \ - ieee_get_fp_control ieee_set_fp_control fpu_control setfpucw \ - sethae ioperm osf_sigprocmask fstatfs statfs +sysdep_routines += ieee_get_fp_control ieee_set_fp_control fpu_control \ + setfpucw sethae ioperm osf_sigprocmask fstatfs statfs endif From 75b683dffd777543d6d051e5990ae413d050bebf Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 6 Jun 1996 05:20:49 +0000 Subject: [PATCH 0678/4487] Tue Jun 4 22:03:02 1996 Andreas Schwab * sysdeps/m68k/fpu/e_acosf.c, sysdeps/m68k/fpu/e_fmodf.c, sysdeps/m68k/fpu/k_cosf.c, sysdeps/m68k/fpu/k_sinf.c, sysdeps/m68k/fpu/k_tanf.c, sysdeps/m68k/fpu/s_atanf.c, sysdeps/m68k/fpu/s_frexpf.c, sysdeps/m68k/fpu/s_ilogbf.c, sysdeps/m68k/fpu/s_isinff.c, sysdeps/m68k/fpu/s_ldexpf.c, sysdeps/m68k/fpu/s_modff.c: Include the corresponding double versions with appropriate definitions to get float functions, instead of defining them directly. --- sysdeps/m68k/fpu/e_acosf.c | 29 ++--------------------------- sysdeps/m68k/fpu/e_fmodf.c | 29 ++--------------------------- sysdeps/m68k/fpu/k_cosf.c | 29 +++-------------------------- sysdeps/m68k/fpu/k_sinf.c | 29 +++-------------------------- sysdeps/m68k/fpu/k_tanf.c | 32 +++----------------------------- sysdeps/m68k/fpu/s_atanf.c | 34 ++-------------------------------- sysdeps/m68k/fpu/s_frexpf.c | 30 +++--------------------------- sysdeps/m68k/fpu/s_ilogbf.c | 31 +++---------------------------- sysdeps/m68k/fpu/s_isinff.c | 34 ++-------------------------------- sysdeps/m68k/fpu/s_ldexpf.c | 34 ++-------------------------------- sysdeps/m68k/fpu/s_modff.c | 30 +++--------------------------- 11 files changed, 28 insertions(+), 313 deletions(-) diff --git a/sysdeps/m68k/fpu/e_acosf.c b/sysdeps/m68k/fpu/e_acosf.c index 34da7ee163..90665082d3 100644 --- a/sysdeps/m68k/fpu/e_acosf.c +++ b/sysdeps/m68k/fpu/e_acosf.c @@ -1,30 +1,5 @@ -/* Copyright (C) 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include - #ifndef FUNC #define FUNC __ieee754_acosf #endif - -float -DEFUN(FUNC, (x), float x) -{ - return __m81_u(FUNC)(x); -} +#define float_type float +#include diff --git a/sysdeps/m68k/fpu/e_fmodf.c b/sysdeps/m68k/fpu/e_fmodf.c index b3c3eadddf..88c350ce9e 100644 --- a/sysdeps/m68k/fpu/e_fmodf.c +++ b/sysdeps/m68k/fpu/e_fmodf.c @@ -1,30 +1,5 @@ -/* Copyright (C) 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include - #ifndef FUNC #define FUNC __ieee754_fmodf #endif - -float -DEFUN(FUNC, (x, y), float x AND float y) -{ - return __m81_u(FUNC)(x, y); -} +#define float_type float +#include diff --git a/sysdeps/m68k/fpu/k_cosf.c b/sysdeps/m68k/fpu/k_cosf.c index a6f0a26645..2a366d094b 100644 --- a/sysdeps/m68k/fpu/k_cosf.c +++ b/sysdeps/m68k/fpu/k_cosf.c @@ -1,26 +1,3 @@ -/* Copyright (C) 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include - -float -DEFUN(__kernel_cosf, (x, y), float x AND float y) -{ - return __cosf (x + y); -} +#define FUNC cosf +#define float_type float +#include diff --git a/sysdeps/m68k/fpu/k_sinf.c b/sysdeps/m68k/fpu/k_sinf.c index 245e86bd44..7050347c4b 100644 --- a/sysdeps/m68k/fpu/k_sinf.c +++ b/sysdeps/m68k/fpu/k_sinf.c @@ -1,26 +1,3 @@ -/* Copyright (C) 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include - -float -DEFUN(__kernel_sinf, (x, y, iy), float x AND float y AND int iy) -{ - return __sinf (x + y); -} +#define FUNC sinf +#define float_type float +#include diff --git a/sysdeps/m68k/fpu/k_tanf.c b/sysdeps/m68k/fpu/k_tanf.c index 027a74a525..777af1bf13 100644 --- a/sysdeps/m68k/fpu/k_tanf.c +++ b/sysdeps/m68k/fpu/k_tanf.c @@ -1,29 +1,3 @@ -/* Copyright (C) 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include - -float -DEFUN(__kernel_tanf, (x, y, iy), float x AND float y AND int iy) -{ - if (iy == 1) - return __tanf (x + y); - else - return -1.0 / __tanf (x + y); -} +#define FUNC tanf +#define float_type float +#include diff --git a/sysdeps/m68k/fpu/s_atanf.c b/sysdeps/m68k/fpu/s_atanf.c index d26f83875b..c98559a8ba 100644 --- a/sysdeps/m68k/fpu/s_atanf.c +++ b/sysdeps/m68k/fpu/s_atanf.c @@ -1,35 +1,5 @@ -/* Copyright (C) 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include - #ifndef FUNC #define FUNC atanf #endif - -#define __CONCATX(a,b) __CONCAT(a,b) - -float -DEFUN(__CONCATX(__,FUNC), (x), float x) -{ - return __m81_u(__CONCATX(__,FUNC))(x); -} - -#define weak_aliasx(a,b) weak_alias(a,b) -weak_aliasx (__CONCATX(__,FUNC), FUNC) +#define float_type float +#include diff --git a/sysdeps/m68k/fpu/s_frexpf.c b/sysdeps/m68k/fpu/s_frexpf.c index dd30f6c39c..893b6ad3cf 100644 --- a/sysdeps/m68k/fpu/s_frexpf.c +++ b/sysdeps/m68k/fpu/s_frexpf.c @@ -1,27 +1,3 @@ -/* Copyright (C) 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include - -float -DEFUN(__frexpf, (value, expptr), float value AND int *expptr) -{ - return __m81_u(__frexpf)(value, expptr); -} -weak_alias (__frexpf, frexpf) +#define FUNC frexpf +#define float_type float +#include diff --git a/sysdeps/m68k/fpu/s_ilogbf.c b/sysdeps/m68k/fpu/s_ilogbf.c index 8d9a027f22..c0c2ffd18d 100644 --- a/sysdeps/m68k/fpu/s_ilogbf.c +++ b/sysdeps/m68k/fpu/s_ilogbf.c @@ -1,28 +1,3 @@ -/* Copyright (C) 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include - -int -DEFUN(__ilogbf, (x), float x) -{ - return __m81_u(__ilogbf)(x); -} - -weak_alias (__ilogbf, ilogbf) +#define FUNC ilogbf +#define float_type float +#include diff --git a/sysdeps/m68k/fpu/s_isinff.c b/sysdeps/m68k/fpu/s_isinff.c index 8f18db5b08..ebf4f2ae96 100644 --- a/sysdeps/m68k/fpu/s_isinff.c +++ b/sysdeps/m68k/fpu/s_isinff.c @@ -1,35 +1,5 @@ -/* Copyright (C) 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include - #ifndef FUNC #define FUNC isinff #endif - -#define __CONCATX(a,b) __CONCAT(a,b) - -int -DEFUN(__CONCATX(__,FUNC), (x), float x) -{ - return __m81_u(__CONCATX(__,FUNC))(x); -} - -#define weak_aliasx(a,b) weak_alias(a,b) -weak_aliasx (__CONCATX(__,FUNC), FUNC) +#define float_type float +#include diff --git a/sysdeps/m68k/fpu/s_ldexpf.c b/sysdeps/m68k/fpu/s_ldexpf.c index 94abf25ac1..81a6b28acc 100644 --- a/sysdeps/m68k/fpu/s_ldexpf.c +++ b/sysdeps/m68k/fpu/s_ldexpf.c @@ -1,35 +1,5 @@ -/* Copyright (C) 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include - #ifndef FUNC #define FUNC ldexpf #endif - -#define __CONCATX(a,b) __CONCAT(a,b) - -float -DEFUN(__CONCATX(__,FUNC), (x, exp), float x AND int exp) -{ - return __m81_u(__CONCATX(__,FUNC))(x, exp); -} - -#define weak_aliasx(a,b) weak_alias(a,b) -weak_aliasx (__CONCATX(__,FUNC), FUNC) +#define float_type float +#include diff --git a/sysdeps/m68k/fpu/s_modff.c b/sysdeps/m68k/fpu/s_modff.c index 04b51d5be1..37bff0022f 100644 --- a/sysdeps/m68k/fpu/s_modff.c +++ b/sysdeps/m68k/fpu/s_modff.c @@ -1,27 +1,3 @@ -/* Copyright (C) 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include - -float -DEFUN(__modff, (x, exp), float x AND float *iptr) -{ - return __m81_u(__modff)(x, iptr); -} -weak_alias(__modff, modff) +#define FUNC modff +#define float_type float +#include From 3ba647e7a4126f6ac67b12fa68041675318194c8 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 6 Jun 1996 05:21:45 +0000 Subject: [PATCH 0679/4487] Tue Jun 4 22:03:02 1996 Andreas Schwab * sysdeps/m68k/fpu/acos.c: File removed. * sysdeps/m68k/fpu/asin.c: File removed. * sysdeps/m68k/fpu/atan.c: File removed. * sysdeps/m68k/fpu/atan2.c: File removed. * sysdeps/m68k/fpu/atanh.c: File removed. * sysdeps/m68k/fpu/ceil.c: File removed. * sysdeps/m68k/fpu/cos.c: File removed. * sysdeps/m68k/fpu/cosh.c: File removed. * sysdeps/m68k/fpu/drem.c: File removed. * sysdeps/m68k/fpu/exp.c: File removed. * sysdeps/m68k/fpu/expm1.c: File removed. * sysdeps/m68k/fpu/fabs.c: File removed. * sysdeps/m68k/fpu/fl.h: File removed. * sysdeps/m68k/fpu/floor.c: File removed. * sysdeps/m68k/fpu/fmod.c: File removed. * sysdeps/m68k/fpu/frexp.c: File removed. * sysdeps/m68k/fpu/isinf.c: File removed. * sysdeps/m68k/fpu/isinfl.c: File removed. * sysdeps/m68k/fpu/isnan.c: File removed. * sysdeps/m68k/fpu/isnanl.c: File removed. * sysdeps/m68k/fpu/ldexp.c: File removed. * sysdeps/m68k/fpu/log.c: File removed. * sysdeps/m68k/fpu/log10.c: File removed. * sysdeps/m68k/fpu/log1p.c: File removed. * sysdeps/m68k/fpu/logb.c: File removed. * sysdeps/m68k/fpu/pow.c: File removed. * sysdeps/m68k/fpu/rint.c: File removed. * sysdeps/m68k/fpu/sin.c: File removed. * sysdeps/m68k/fpu/sinh.c: File removed. * sysdeps/m68k/fpu/sqrt.c: File removed. * sysdeps/m68k/fpu/tan.c: File removed. * sysdeps/m68k/fpu/tanh.c: File removed. --- sysdeps/m68k/fpu/acos.c | 32 ------------------ sysdeps/m68k/fpu/asin.c | 2 -- sysdeps/m68k/fpu/atan.c | 2 -- sysdeps/m68k/fpu/atan2.c | 71 --------------------------------------- sysdeps/m68k/fpu/atanh.c | 2 -- sysdeps/m68k/fpu/ceil.c | 4 --- sysdeps/m68k/fpu/cos.c | 2 -- sysdeps/m68k/fpu/cosh.c | 2 -- sysdeps/m68k/fpu/drem.c | 31 ----------------- sysdeps/m68k/fpu/exp.c | 3 -- sysdeps/m68k/fpu/expm1.c | 3 -- sysdeps/m68k/fpu/fabs.c | 3 -- sysdeps/m68k/fpu/fl.h | 41 ---------------------- sysdeps/m68k/fpu/floor.c | 3 -- sysdeps/m68k/fpu/fmod.c | 27 --------------- sysdeps/m68k/fpu/frexp.c | 27 --------------- sysdeps/m68k/fpu/isinf.c | 34 ------------------- sysdeps/m68k/fpu/isinfl.c | 28 --------------- sysdeps/m68k/fpu/isnan.c | 4 --- sysdeps/m68k/fpu/isnanl.c | 28 --------------- sysdeps/m68k/fpu/ldexp.c | 27 --------------- sysdeps/m68k/fpu/log.c | 3 -- sysdeps/m68k/fpu/log10.c | 2 -- sysdeps/m68k/fpu/log1p.c | 2 -- sysdeps/m68k/fpu/logb.c | 46 ------------------------- sysdeps/m68k/fpu/pow.c | 27 --------------- sysdeps/m68k/fpu/rint.c | 5 --- sysdeps/m68k/fpu/sin.c | 2 -- sysdeps/m68k/fpu/sinh.c | 2 -- sysdeps/m68k/fpu/sqrt.c | 2 -- sysdeps/m68k/fpu/tan.c | 2 -- sysdeps/m68k/fpu/tanh.c | 2 -- 32 files changed, 471 deletions(-) delete mode 100644 sysdeps/m68k/fpu/acos.c delete mode 100644 sysdeps/m68k/fpu/asin.c delete mode 100644 sysdeps/m68k/fpu/atan.c delete mode 100644 sysdeps/m68k/fpu/atan2.c delete mode 100644 sysdeps/m68k/fpu/atanh.c delete mode 100644 sysdeps/m68k/fpu/ceil.c delete mode 100644 sysdeps/m68k/fpu/cos.c delete mode 100644 sysdeps/m68k/fpu/cosh.c delete mode 100644 sysdeps/m68k/fpu/drem.c delete mode 100644 sysdeps/m68k/fpu/exp.c delete mode 100644 sysdeps/m68k/fpu/expm1.c delete mode 100644 sysdeps/m68k/fpu/fabs.c delete mode 100644 sysdeps/m68k/fpu/fl.h delete mode 100644 sysdeps/m68k/fpu/floor.c delete mode 100644 sysdeps/m68k/fpu/fmod.c delete mode 100644 sysdeps/m68k/fpu/frexp.c delete mode 100644 sysdeps/m68k/fpu/isinf.c delete mode 100644 sysdeps/m68k/fpu/isinfl.c delete mode 100644 sysdeps/m68k/fpu/isnan.c delete mode 100644 sysdeps/m68k/fpu/isnanl.c delete mode 100644 sysdeps/m68k/fpu/ldexp.c delete mode 100644 sysdeps/m68k/fpu/log.c delete mode 100644 sysdeps/m68k/fpu/log10.c delete mode 100644 sysdeps/m68k/fpu/log1p.c delete mode 100644 sysdeps/m68k/fpu/logb.c delete mode 100644 sysdeps/m68k/fpu/pow.c delete mode 100644 sysdeps/m68k/fpu/rint.c delete mode 100644 sysdeps/m68k/fpu/sin.c delete mode 100644 sysdeps/m68k/fpu/sinh.c delete mode 100644 sysdeps/m68k/fpu/sqrt.c delete mode 100644 sysdeps/m68k/fpu/tan.c delete mode 100644 sysdeps/m68k/fpu/tanh.c diff --git a/sysdeps/m68k/fpu/acos.c b/sysdeps/m68k/fpu/acos.c deleted file mode 100644 index 1481ce2cd9..0000000000 --- a/sysdeps/m68k/fpu/acos.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright (C) 1991, 1994 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#define __NO_MATH_INLINES -#include - -#ifndef FUNC -#define FUNC acos -#endif - - -double -DEFUN(FUNC, (x), double x) -{ - return __m81_u(FUNC)(x); -} diff --git a/sysdeps/m68k/fpu/asin.c b/sysdeps/m68k/fpu/asin.c deleted file mode 100644 index 0e3e58f697..0000000000 --- a/sysdeps/m68k/fpu/asin.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC asin -#include diff --git a/sysdeps/m68k/fpu/atan.c b/sysdeps/m68k/fpu/atan.c deleted file mode 100644 index b9d428e170..0000000000 --- a/sysdeps/m68k/fpu/atan.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC atan -#include diff --git a/sysdeps/m68k/fpu/atan2.c b/sysdeps/m68k/fpu/atan2.c deleted file mode 100644 index 753b7f04af..0000000000 --- a/sysdeps/m68k/fpu/atan2.c +++ /dev/null @@ -1,71 +0,0 @@ -/* Copyright (C) 1991, 1992, 1994 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include - -#ifdef __GNUC__ - -double -DEFUN(atan2, (y, x), double y AND double x) -{ - static CONST double one = 1.0, zero = 0.0; - double signx, signy; - double pi, PIo4, PIo2; - - if (__isnan(x)) - return x; - if (__isnan(y)) - return y; - - signy = __copysign(one, y); - signx = __copysign(one, x); - - asm("fmovecr%.x %1, %0" : "=f" (pi) : "i" (0)); - PIo2 = pi / 2; - PIo4 = pi / 4; - - if (y == zero) - return signx == one ? y : __copysign(pi, signy); - - if (x == zero) - return __copysign(PIo2, signy); - - if (__isinf(x)) - { - if (__isinf(y)) - return __copysign(signx == one ? PIo4 : 3 * PIo4, signy); - else - return __copysign(signx == one ? zero : pi, signy); - } - - if (__isinf(y)) - return __copysign(PIo2, signy); - - y = fabs(y); - - if (x < 0.0) - /* X is negative. */ - return __copysign(pi - atan(y / -x), signy); - - return __copysign(atan(y / x), signy); -} - -#else -#include -#endif diff --git a/sysdeps/m68k/fpu/atanh.c b/sysdeps/m68k/fpu/atanh.c deleted file mode 100644 index d4636ec035..0000000000 --- a/sysdeps/m68k/fpu/atanh.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC atanh -#include diff --git a/sysdeps/m68k/fpu/ceil.c b/sysdeps/m68k/fpu/ceil.c deleted file mode 100644 index b4605e1b29..0000000000 --- a/sysdeps/m68k/fpu/ceil.c +++ /dev/null @@ -1,4 +0,0 @@ - -#define FUNC ceil - -#include diff --git a/sysdeps/m68k/fpu/cos.c b/sysdeps/m68k/fpu/cos.c deleted file mode 100644 index fa50130af7..0000000000 --- a/sysdeps/m68k/fpu/cos.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC cos -#include diff --git a/sysdeps/m68k/fpu/cosh.c b/sysdeps/m68k/fpu/cosh.c deleted file mode 100644 index 78a81943c6..0000000000 --- a/sysdeps/m68k/fpu/cosh.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC cosh -#include diff --git a/sysdeps/m68k/fpu/drem.c b/sysdeps/m68k/fpu/drem.c deleted file mode 100644 index 16caacfd81..0000000000 --- a/sysdeps/m68k/fpu/drem.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (C) 1991, 1992, 1994, 1995 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#define __NO_MATH_INLINES -#include - -#undef drem - -double -DEFUN(__drem, (x, y), double x AND double y) -{ - return ____drem(x, y); -} - -weak_alias (__drem, drem) diff --git a/sysdeps/m68k/fpu/exp.c b/sysdeps/m68k/fpu/exp.c deleted file mode 100644 index 2649d72143..0000000000 --- a/sysdeps/m68k/fpu/exp.c +++ /dev/null @@ -1,3 +0,0 @@ -#define FUNC exp -#define OP etox -#include diff --git a/sysdeps/m68k/fpu/expm1.c b/sysdeps/m68k/fpu/expm1.c deleted file mode 100644 index 19f1802e56..0000000000 --- a/sysdeps/m68k/fpu/expm1.c +++ /dev/null @@ -1,3 +0,0 @@ -#define FUNC __expm1 -#define OP expm1 -#include diff --git a/sysdeps/m68k/fpu/fabs.c b/sysdeps/m68k/fpu/fabs.c deleted file mode 100644 index f9538a599c..0000000000 --- a/sysdeps/m68k/fpu/fabs.c +++ /dev/null @@ -1,3 +0,0 @@ -#define FUNC fabs -#define OP abs -#include diff --git a/sysdeps/m68k/fpu/fl.h b/sysdeps/m68k/fpu/fl.h deleted file mode 100644 index 098e880601..0000000000 --- a/sysdeps/m68k/fpu/fl.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Floating-point constants for the 68881. - Copyright (C) 1992 Free Software Foundation, Inc. */ - -/* IGNORE($ This is used internally in the library. */ -#include -/* ansidecl.m4 here inserts the ieee file. Kludge o rama. - $) ENDCOMMENT INCLUDE($sysdeps/ieee754/fl.h$) STARTCOMMENT */ - -#ifndef __need_HUGE_VAL - -#ifdef __GNUC__ - -#undef FLT_ROUNDS - -/* Interrogate the 68881 to find the current rounding mode. */ - -static __const __inline int -DEFUN_VOID(__flt_rounds) -{ - unsigned long int __fpcr; - __asm("fmove%.l fpcr, %0" : "=g" (__fpcr)); - switch (__fpcr & (1 | 2)) - { - case 0: - return _FLT_ROUNDS_TONEAREST; - case 1: - return _FLT_ROUNDS_TOZERO; - case 2: - return _FLT_ROUNDS_TONEGINF; - case 3: - return _FLT_ROUNDS_TOPOSINF; - default: - return _FLT_ROUNDS_INDETERMINATE; - } -} - -#define FLT_ROUNDS (__flt_rounds()) - -#endif /* GCC. */ - -#endif /* Don't need HUGE_VAL. */ diff --git a/sysdeps/m68k/fpu/floor.c b/sysdeps/m68k/fpu/floor.c deleted file mode 100644 index 92a2ca68bb..0000000000 --- a/sysdeps/m68k/fpu/floor.c +++ /dev/null @@ -1,3 +0,0 @@ -#define FUNC floor -#define OP intrz -#include diff --git a/sysdeps/m68k/fpu/fmod.c b/sysdeps/m68k/fpu/fmod.c deleted file mode 100644 index e3a2de0689..0000000000 --- a/sysdeps/m68k/fpu/fmod.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 1991, 1994 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#define __NO_MATH_INLINES -#include - -double -DEFUN(fmod, (x, y), double x AND double y) -{ - return __fmod(x, y); -} diff --git a/sysdeps/m68k/fpu/frexp.c b/sysdeps/m68k/fpu/frexp.c deleted file mode 100644 index de74851de9..0000000000 --- a/sysdeps/m68k/fpu/frexp.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 1991 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#define __NO_MATH_INLINES -#include - -double -DEFUN(frexp, (value, expptr), double value AND int *expptr) -{ - return __frexp(value, expptr); -} diff --git a/sysdeps/m68k/fpu/isinf.c b/sysdeps/m68k/fpu/isinf.c deleted file mode 100644 index ab2cf0bb03..0000000000 --- a/sysdeps/m68k/fpu/isinf.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (C) 1991, 1994, 1995 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#define __NO_MATH_INLINES -#include - -#ifndef FUNC -#define FUNC __isinf -#endif - - -int -DEFUN(FUNC, (x), double x) -{ - return __m81_u(FUNC)(x); -} - -weak_alias (__isinf, isinf) diff --git a/sysdeps/m68k/fpu/isinfl.c b/sysdeps/m68k/fpu/isinfl.c deleted file mode 100644 index 97b5983d0f..0000000000 --- a/sysdeps/m68k/fpu/isinfl.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include - -int -DEFUN(__isinfl, (x), long double x) -{ - return __m81_u(__isinfl)(x); -} - -weak_alias (__isinfl, isinfl) diff --git a/sysdeps/m68k/fpu/isnan.c b/sysdeps/m68k/fpu/isnan.c deleted file mode 100644 index d0984911d2..0000000000 --- a/sysdeps/m68k/fpu/isnan.c +++ /dev/null @@ -1,4 +0,0 @@ -#define FUNC __isnan -#include - -weak_alias (__isnan, isnan) diff --git a/sysdeps/m68k/fpu/isnanl.c b/sysdeps/m68k/fpu/isnanl.c deleted file mode 100644 index e5e3db2171..0000000000 --- a/sysdeps/m68k/fpu/isnanl.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include - -int -DEFUN(__isnanl, (x), long double x) -{ - return __m81_u(__isnanl)(x); -} - -weak_alias (__isnanl, isnanl) diff --git a/sysdeps/m68k/fpu/ldexp.c b/sysdeps/m68k/fpu/ldexp.c deleted file mode 100644 index 7e34882282..0000000000 --- a/sysdeps/m68k/fpu/ldexp.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 1991, 1994 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#define __NO_MATH_INLINES -#include - -double -DEFUN(ldexp, (x, exp), double x AND int exp) -{ - return __ldexp(x, exp); -} diff --git a/sysdeps/m68k/fpu/log.c b/sysdeps/m68k/fpu/log.c deleted file mode 100644 index 4de3346545..0000000000 --- a/sysdeps/m68k/fpu/log.c +++ /dev/null @@ -1,3 +0,0 @@ -#define FUNC log -#define OP logn -#include diff --git a/sysdeps/m68k/fpu/log10.c b/sysdeps/m68k/fpu/log10.c deleted file mode 100644 index 246b69a364..0000000000 --- a/sysdeps/m68k/fpu/log10.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC log10 -#include diff --git a/sysdeps/m68k/fpu/log1p.c b/sysdeps/m68k/fpu/log1p.c deleted file mode 100644 index 028783819b..0000000000 --- a/sysdeps/m68k/fpu/log1p.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC log1p -#include diff --git a/sysdeps/m68k/fpu/logb.c b/sysdeps/m68k/fpu/logb.c deleted file mode 100644 index 8619c908c8..0000000000 --- a/sysdeps/m68k/fpu/logb.c +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (C) 1991, 1992, 1993, 1994, 1995 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include - -#ifdef __GNUC__ - -/* Return the base 2 signed integral exponent of X. */ - -double -DEFUN(__logb, (x), double x) -{ - if (__isnan (x)) - return x; - if (__isinf (x)) - return fabs (x); - - if (x == 0.0) - asm ("flog2%.x %0, %0" : "=f" (x) : "0" (x)); - else - asm ("fgetexp%.x %0, %0" : "=f" (x) : "0" (x)); - - return x; -} - -weak_alias (__logb, logb) - -#else -#include -#endif diff --git a/sysdeps/m68k/fpu/pow.c b/sysdeps/m68k/fpu/pow.c deleted file mode 100644 index 5ace4dad2f..0000000000 --- a/sysdeps/m68k/fpu/pow.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 1991, 1994 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#define __NO_MATH_INLINES -#include - -double -DEFUN(pow, (x, y), double x AND double y) -{ - return __pow(x, y); -} diff --git a/sysdeps/m68k/fpu/rint.c b/sysdeps/m68k/fpu/rint.c deleted file mode 100644 index f83a4e4c3f..0000000000 --- a/sysdeps/m68k/fpu/rint.c +++ /dev/null @@ -1,5 +0,0 @@ -#define FUNC __rint -#define OP intr -#include - -weak_alias (__rint, rint) diff --git a/sysdeps/m68k/fpu/sin.c b/sysdeps/m68k/fpu/sin.c deleted file mode 100644 index 28ac9e50c3..0000000000 --- a/sysdeps/m68k/fpu/sin.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC sin -#include diff --git a/sysdeps/m68k/fpu/sinh.c b/sysdeps/m68k/fpu/sinh.c deleted file mode 100644 index fae7c71459..0000000000 --- a/sysdeps/m68k/fpu/sinh.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC sinh -#include diff --git a/sysdeps/m68k/fpu/sqrt.c b/sysdeps/m68k/fpu/sqrt.c deleted file mode 100644 index 2365b61780..0000000000 --- a/sysdeps/m68k/fpu/sqrt.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC sqrt -#include diff --git a/sysdeps/m68k/fpu/tan.c b/sysdeps/m68k/fpu/tan.c deleted file mode 100644 index 53b3b5342e..0000000000 --- a/sysdeps/m68k/fpu/tan.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC tan -#include diff --git a/sysdeps/m68k/fpu/tanh.c b/sysdeps/m68k/fpu/tanh.c deleted file mode 100644 index cc6739539a..0000000000 --- a/sysdeps/m68k/fpu/tanh.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC tanh -#include From 2dd2ea9e483321adced69cd68dc563a76a01a298 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 6 Jun 1996 05:22:27 +0000 Subject: [PATCH 0680/4487] Tue Jun 4 22:03:02 1996 Andreas Schwab * sysdeps/m68k/fpu/e_asinl.c, sysdeps/m68k/fpu/e_atanl.c, sysdeps/m68k/fpu/e_acosl.c, sysdeps/m68k/fpu/e_expl.c, sysdeps/m68k/fpu/e_fmodl.c, sysdeps/m68k/fpu/e_log10l.c, sysdeps/m68k/fpu/e_logl.c, sysdeps/m68k/fpu/e_powl.c, sysdeps/m68k/fpu/e_remainderl.c, sysdeps/m68k/fpu/e_scalbl.c, sysdeps/m68k/fpu/e_sinhl.c, sysdeps/m68k/fpu/e_sqrtl.c, sysdeps/m68k/fpu/k_cosl.c, sysdeps/m68k/fpu/k_sinl.c, sysdeps/m68k/fpu/k_tanl.c, sysdeps/m68k/fpu/s_atanl.c, sysdeps/m68k/fpu/s_ceill.c, sysdeps/m68k/fpu/s_cosl.c, sysdeps/m68k/fpu/s_expm1l.c, sysdeps/m68k/fpu/s_fabsl.c, sysdeps/m68k/fpu/s_finitel.c, sysdeps/m68k/fpu/s_floorl.c, sysdeps/m68k/fpu/s_frexpl.c, sysdeps/m68k/fpu/s_ilogbl.c, sysdeps/m68k/fpu/s_isinfl.c, sysdeps/m68k/fpu/s_isnanl.c, sysdeps/m68k/fpu/s_ldexpl.c, sysdeps/m68k/fpu/s_log1pl.c, sysdeps/m68k/fpu/s_logbl.c, sysdeps/m68k/fpu/s_modfl.c, sysdeps/m68k/fpu/s_rintl.c, sysdeps/m68k/fpu/s_scalbnl.c, sysdeps/m68k/fpu/s_significandl.c, sysdeps/m68k/fpu/s_sinl.c, sysdeps/m68k/fpu/s_tanhl.c, sysdeps/m68k/fpu/s_tanl.c: New files. --- sysdeps/m68k/fpu/e_asinl.c | 2 ++ sysdeps/m68k/fpu/e_expl.c | 2 ++ sysdeps/m68k/fpu/e_fmodl.c | 5 +++++ sysdeps/m68k/fpu/e_log10l.c | 2 ++ sysdeps/m68k/fpu/e_logl.c | 2 ++ sysdeps/m68k/fpu/e_powl.c | 2 ++ sysdeps/m68k/fpu/e_remainderl.c | 2 ++ sysdeps/m68k/fpu/e_scalbl.c | 2 ++ sysdeps/m68k/fpu/e_sinhl.c | 2 ++ sysdeps/m68k/fpu/e_sqrtl.c | 2 ++ sysdeps/m68k/fpu/k_cosl.c | 3 +++ sysdeps/m68k/fpu/k_sinl.c | 3 +++ sysdeps/m68k/fpu/k_tanl.c | 3 +++ sysdeps/m68k/fpu/s_atanl.c | 5 +++++ sysdeps/m68k/fpu/s_ceill.c | 2 ++ sysdeps/m68k/fpu/s_cosl.c | 2 ++ sysdeps/m68k/fpu/s_expm1l.c | 2 ++ sysdeps/m68k/fpu/s_fabsl.c | 2 ++ sysdeps/m68k/fpu/s_finitel.c | 2 ++ sysdeps/m68k/fpu/s_floorl.c | 2 ++ sysdeps/m68k/fpu/s_frexpl.c | 3 +++ sysdeps/m68k/fpu/s_ilogbl.c | 3 +++ sysdeps/m68k/fpu/s_isinfl.c | 5 +++++ sysdeps/m68k/fpu/s_isnanl.c | 2 ++ sysdeps/m68k/fpu/s_ldexpl.c | 5 +++++ sysdeps/m68k/fpu/s_log1pl.c | 2 ++ sysdeps/m68k/fpu/s_logbl.c | 2 ++ sysdeps/m68k/fpu/s_modfl.c | 3 +++ sysdeps/m68k/fpu/s_rintl.c | 2 ++ sysdeps/m68k/fpu/s_scalbnl.c | 2 ++ sysdeps/m68k/fpu/s_significandl.c | 2 ++ sysdeps/m68k/fpu/s_sinl.c | 2 ++ sysdeps/m68k/fpu/s_tanhl.c | 2 ++ sysdeps/m68k/fpu/s_tanl.c | 2 ++ 34 files changed, 86 insertions(+) create mode 100644 sysdeps/m68k/fpu/e_asinl.c create mode 100644 sysdeps/m68k/fpu/e_expl.c create mode 100644 sysdeps/m68k/fpu/e_fmodl.c create mode 100644 sysdeps/m68k/fpu/e_log10l.c create mode 100644 sysdeps/m68k/fpu/e_logl.c create mode 100644 sysdeps/m68k/fpu/e_powl.c create mode 100644 sysdeps/m68k/fpu/e_remainderl.c create mode 100644 sysdeps/m68k/fpu/e_scalbl.c create mode 100644 sysdeps/m68k/fpu/e_sinhl.c create mode 100644 sysdeps/m68k/fpu/e_sqrtl.c create mode 100644 sysdeps/m68k/fpu/k_cosl.c create mode 100644 sysdeps/m68k/fpu/k_sinl.c create mode 100644 sysdeps/m68k/fpu/k_tanl.c create mode 100644 sysdeps/m68k/fpu/s_atanl.c create mode 100644 sysdeps/m68k/fpu/s_ceill.c create mode 100644 sysdeps/m68k/fpu/s_cosl.c create mode 100644 sysdeps/m68k/fpu/s_expm1l.c create mode 100644 sysdeps/m68k/fpu/s_fabsl.c create mode 100644 sysdeps/m68k/fpu/s_finitel.c create mode 100644 sysdeps/m68k/fpu/s_floorl.c create mode 100644 sysdeps/m68k/fpu/s_frexpl.c create mode 100644 sysdeps/m68k/fpu/s_ilogbl.c create mode 100644 sysdeps/m68k/fpu/s_isinfl.c create mode 100644 sysdeps/m68k/fpu/s_isnanl.c create mode 100644 sysdeps/m68k/fpu/s_ldexpl.c create mode 100644 sysdeps/m68k/fpu/s_log1pl.c create mode 100644 sysdeps/m68k/fpu/s_logbl.c create mode 100644 sysdeps/m68k/fpu/s_modfl.c create mode 100644 sysdeps/m68k/fpu/s_rintl.c create mode 100644 sysdeps/m68k/fpu/s_scalbnl.c create mode 100644 sysdeps/m68k/fpu/s_significandl.c create mode 100644 sysdeps/m68k/fpu/s_sinl.c create mode 100644 sysdeps/m68k/fpu/s_tanhl.c create mode 100644 sysdeps/m68k/fpu/s_tanl.c diff --git a/sysdeps/m68k/fpu/e_asinl.c b/sysdeps/m68k/fpu/e_asinl.c new file mode 100644 index 0000000000..0dd89fb9da --- /dev/null +++ b/sysdeps/m68k/fpu/e_asinl.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_asinl +#include diff --git a/sysdeps/m68k/fpu/e_expl.c b/sysdeps/m68k/fpu/e_expl.c new file mode 100644 index 0000000000..8805a1b83a --- /dev/null +++ b/sysdeps/m68k/fpu/e_expl.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_expl +#include diff --git a/sysdeps/m68k/fpu/e_fmodl.c b/sysdeps/m68k/fpu/e_fmodl.c new file mode 100644 index 0000000000..a46f19ea9d --- /dev/null +++ b/sysdeps/m68k/fpu/e_fmodl.c @@ -0,0 +1,5 @@ +#ifndef FUNC +#define FUNC __ieee754_fmodl +#endif +#define float_type long double +#include diff --git a/sysdeps/m68k/fpu/e_log10l.c b/sysdeps/m68k/fpu/e_log10l.c new file mode 100644 index 0000000000..6dcfc5a101 --- /dev/null +++ b/sysdeps/m68k/fpu/e_log10l.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_log10l +#include diff --git a/sysdeps/m68k/fpu/e_logl.c b/sysdeps/m68k/fpu/e_logl.c new file mode 100644 index 0000000000..03b1830759 --- /dev/null +++ b/sysdeps/m68k/fpu/e_logl.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_logl +#include diff --git a/sysdeps/m68k/fpu/e_powl.c b/sysdeps/m68k/fpu/e_powl.c new file mode 100644 index 0000000000..0feec54fec --- /dev/null +++ b/sysdeps/m68k/fpu/e_powl.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_powl +#include diff --git a/sysdeps/m68k/fpu/e_remainderl.c b/sysdeps/m68k/fpu/e_remainderl.c new file mode 100644 index 0000000000..b9dc540cc5 --- /dev/null +++ b/sysdeps/m68k/fpu/e_remainderl.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_remainderl +#include diff --git a/sysdeps/m68k/fpu/e_scalbl.c b/sysdeps/m68k/fpu/e_scalbl.c new file mode 100644 index 0000000000..92ab7a4ad1 --- /dev/null +++ b/sysdeps/m68k/fpu/e_scalbl.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_scalbl +#include diff --git a/sysdeps/m68k/fpu/e_sinhl.c b/sysdeps/m68k/fpu/e_sinhl.c new file mode 100644 index 0000000000..2f42d96a38 --- /dev/null +++ b/sysdeps/m68k/fpu/e_sinhl.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_sinhl +#include diff --git a/sysdeps/m68k/fpu/e_sqrtl.c b/sysdeps/m68k/fpu/e_sqrtl.c new file mode 100644 index 0000000000..fede1024a2 --- /dev/null +++ b/sysdeps/m68k/fpu/e_sqrtl.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_sqrtl +#include diff --git a/sysdeps/m68k/fpu/k_cosl.c b/sysdeps/m68k/fpu/k_cosl.c new file mode 100644 index 0000000000..983b66544c --- /dev/null +++ b/sysdeps/m68k/fpu/k_cosl.c @@ -0,0 +1,3 @@ +#define FUNC cosl +#define float_type long double +#include diff --git a/sysdeps/m68k/fpu/k_sinl.c b/sysdeps/m68k/fpu/k_sinl.c new file mode 100644 index 0000000000..5a647cafd7 --- /dev/null +++ b/sysdeps/m68k/fpu/k_sinl.c @@ -0,0 +1,3 @@ +#define FUNC sinl +#define float_type long double +#include diff --git a/sysdeps/m68k/fpu/k_tanl.c b/sysdeps/m68k/fpu/k_tanl.c new file mode 100644 index 0000000000..f2570e681f --- /dev/null +++ b/sysdeps/m68k/fpu/k_tanl.c @@ -0,0 +1,3 @@ +#define FUNC tanl +#define float_type long double +#include diff --git a/sysdeps/m68k/fpu/s_atanl.c b/sysdeps/m68k/fpu/s_atanl.c new file mode 100644 index 0000000000..b7e608addd --- /dev/null +++ b/sysdeps/m68k/fpu/s_atanl.c @@ -0,0 +1,5 @@ +#ifndef FUNC +#define FUNC atanl +#endif +#define float_type long double +#include diff --git a/sysdeps/m68k/fpu/s_ceill.c b/sysdeps/m68k/fpu/s_ceill.c new file mode 100644 index 0000000000..2bf95b00c6 --- /dev/null +++ b/sysdeps/m68k/fpu/s_ceill.c @@ -0,0 +1,2 @@ +#define FUNC ceill +#include diff --git a/sysdeps/m68k/fpu/s_cosl.c b/sysdeps/m68k/fpu/s_cosl.c new file mode 100644 index 0000000000..4198feef18 --- /dev/null +++ b/sysdeps/m68k/fpu/s_cosl.c @@ -0,0 +1,2 @@ +#define FUNC cosl +#include diff --git a/sysdeps/m68k/fpu/s_expm1l.c b/sysdeps/m68k/fpu/s_expm1l.c new file mode 100644 index 0000000000..cd62cb3b21 --- /dev/null +++ b/sysdeps/m68k/fpu/s_expm1l.c @@ -0,0 +1,2 @@ +#define FUNC expm1l +#include diff --git a/sysdeps/m68k/fpu/s_fabsl.c b/sysdeps/m68k/fpu/s_fabsl.c new file mode 100644 index 0000000000..8ac14d5b8c --- /dev/null +++ b/sysdeps/m68k/fpu/s_fabsl.c @@ -0,0 +1,2 @@ +#define FUNC fabsl +#include diff --git a/sysdeps/m68k/fpu/s_finitel.c b/sysdeps/m68k/fpu/s_finitel.c new file mode 100644 index 0000000000..bd346a220c --- /dev/null +++ b/sysdeps/m68k/fpu/s_finitel.c @@ -0,0 +1,2 @@ +#define FUNC finitel +#include diff --git a/sysdeps/m68k/fpu/s_floorl.c b/sysdeps/m68k/fpu/s_floorl.c new file mode 100644 index 0000000000..2c1ffd7d2c --- /dev/null +++ b/sysdeps/m68k/fpu/s_floorl.c @@ -0,0 +1,2 @@ +#define FUNC floorl +#include diff --git a/sysdeps/m68k/fpu/s_frexpl.c b/sysdeps/m68k/fpu/s_frexpl.c new file mode 100644 index 0000000000..fe9466f3be --- /dev/null +++ b/sysdeps/m68k/fpu/s_frexpl.c @@ -0,0 +1,3 @@ +#define FUNC frexpl +#define float_type long double +#include diff --git a/sysdeps/m68k/fpu/s_ilogbl.c b/sysdeps/m68k/fpu/s_ilogbl.c new file mode 100644 index 0000000000..c3554d5c58 --- /dev/null +++ b/sysdeps/m68k/fpu/s_ilogbl.c @@ -0,0 +1,3 @@ +#define FUNC ilogbl +#define float_type long double +#include diff --git a/sysdeps/m68k/fpu/s_isinfl.c b/sysdeps/m68k/fpu/s_isinfl.c new file mode 100644 index 0000000000..963725ad77 --- /dev/null +++ b/sysdeps/m68k/fpu/s_isinfl.c @@ -0,0 +1,5 @@ +#ifndef FUNC +#define FUNC isinfl +#endif +#define float_type long double +#include diff --git a/sysdeps/m68k/fpu/s_isnanl.c b/sysdeps/m68k/fpu/s_isnanl.c new file mode 100644 index 0000000000..bbacb64f11 --- /dev/null +++ b/sysdeps/m68k/fpu/s_isnanl.c @@ -0,0 +1,2 @@ +#define FUNC isnanl +#include diff --git a/sysdeps/m68k/fpu/s_ldexpl.c b/sysdeps/m68k/fpu/s_ldexpl.c new file mode 100644 index 0000000000..25796b75f4 --- /dev/null +++ b/sysdeps/m68k/fpu/s_ldexpl.c @@ -0,0 +1,5 @@ +#ifndef FUNC +#define FUNC ldexpl +#endif +#define float_type long double +#include diff --git a/sysdeps/m68k/fpu/s_log1pl.c b/sysdeps/m68k/fpu/s_log1pl.c new file mode 100644 index 0000000000..8dbef89095 --- /dev/null +++ b/sysdeps/m68k/fpu/s_log1pl.c @@ -0,0 +1,2 @@ +#define FUNC log1pl +#include diff --git a/sysdeps/m68k/fpu/s_logbl.c b/sysdeps/m68k/fpu/s_logbl.c new file mode 100644 index 0000000000..7d06ac13c4 --- /dev/null +++ b/sysdeps/m68k/fpu/s_logbl.c @@ -0,0 +1,2 @@ +#define FUNC logbl +#include diff --git a/sysdeps/m68k/fpu/s_modfl.c b/sysdeps/m68k/fpu/s_modfl.c new file mode 100644 index 0000000000..51327dd1aa --- /dev/null +++ b/sysdeps/m68k/fpu/s_modfl.c @@ -0,0 +1,3 @@ +#define FUNC modfl +#define float_type long double +#include diff --git a/sysdeps/m68k/fpu/s_rintl.c b/sysdeps/m68k/fpu/s_rintl.c new file mode 100644 index 0000000000..305667b3a1 --- /dev/null +++ b/sysdeps/m68k/fpu/s_rintl.c @@ -0,0 +1,2 @@ +#define FUNC rintl +#include diff --git a/sysdeps/m68k/fpu/s_scalbnl.c b/sysdeps/m68k/fpu/s_scalbnl.c new file mode 100644 index 0000000000..83e8bfefc1 --- /dev/null +++ b/sysdeps/m68k/fpu/s_scalbnl.c @@ -0,0 +1,2 @@ +#define FUNC scalbnl +#include diff --git a/sysdeps/m68k/fpu/s_significandl.c b/sysdeps/m68k/fpu/s_significandl.c new file mode 100644 index 0000000000..8c6fc7e610 --- /dev/null +++ b/sysdeps/m68k/fpu/s_significandl.c @@ -0,0 +1,2 @@ +#define FUNC significandl +#include diff --git a/sysdeps/m68k/fpu/s_sinl.c b/sysdeps/m68k/fpu/s_sinl.c new file mode 100644 index 0000000000..9ac532cb47 --- /dev/null +++ b/sysdeps/m68k/fpu/s_sinl.c @@ -0,0 +1,2 @@ +#define FUNC sinl +#include diff --git a/sysdeps/m68k/fpu/s_tanhl.c b/sysdeps/m68k/fpu/s_tanhl.c new file mode 100644 index 0000000000..6e997911f2 --- /dev/null +++ b/sysdeps/m68k/fpu/s_tanhl.c @@ -0,0 +1,2 @@ +#define FUNC tanhl +#include diff --git a/sysdeps/m68k/fpu/s_tanl.c b/sysdeps/m68k/fpu/s_tanl.c new file mode 100644 index 0000000000..64fcb54406 --- /dev/null +++ b/sysdeps/m68k/fpu/s_tanl.c @@ -0,0 +1,2 @@ +#define FUNC tanl +#include From 7c2f9239ec49e4525275aa0d83c6e46855ecd9ce Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 6 Jun 1996 05:22:31 +0000 Subject: [PATCH 0681/4487] Tue Jun 4 22:03:02 1996 Andreas Schwab * sysdeps/m68k/fpu/__math.h: Define long double versions of the inline functions. --- sysdeps/m68k/fpu/__math.h | 178 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 178 insertions(+) diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h index f59c168e79..2cbb4ca388 100644 --- a/sysdeps/m68k/fpu/__math.h +++ b/sysdeps/m68k/fpu/__math.h @@ -54,6 +54,14 @@ Cambridge, MA 02139, USA. */ __asm("f" __STRING(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x));\ return __result; \ } + +#define __inline_mathopl(func, op) \ + __m81_defun (long double, func, (long double __mathop_x)) \ + { \ + long double __result; \ + __asm("f" __STRING(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x));\ + return __result; \ + } /* ieee style elementary functions */ __inline_mathop(__ieee754_acos, acos) @@ -77,6 +85,17 @@ __inline_mathopf(__ieee754_logf, logn) __inline_mathopf(__ieee754_sqrtf, sqrt) __inline_mathopf(__ieee754_atanhf, atan) +/* ieee style elementary long double functions */ +__inline_mathopl(__ieee754_acosl, acos) +__inline_mathopl(__ieee754_asinl, asin) +__inline_mathopl(__ieee754_coshl, cosh) +__inline_mathopl(__ieee754_sinhl, sinh) +__inline_mathopl(__ieee754_expl, etox) +__inline_mathopl(__ieee754_log10l, log10) +__inline_mathopl(__ieee754_logl, logn) +__inline_mathopl(__ieee754_sqrtl, sqrt) +__inline_mathopl(__ieee754_atanhl, atan) + __inline_mathop(__atan, atan) __inline_mathop(__cos, cos) __inline_mathop(__sin, sin) @@ -105,6 +124,20 @@ __inline_mathopf(__log1pf, lognp1) __inline_mathopf(__logbf, log2) __inline_mathopf(__significandf, getman) +__inline_mathopl(__atanl, atan) +__inline_mathopl(__cosl, cos) +__inline_mathopl(__sinl, sin) +__inline_mathopl(__tanl, tan) +__inline_mathopl(__tanhl, tanh) +__inline_mathopl(__fabsl, abs) +__inline_mathopl(__sqrtl, sqrt) + +__inline_mathopl(__rintl, int) +__inline_mathopl(__expm1l, etoxm1) +__inline_mathopl(__log1pl, lognp1) +__inline_mathopl(__logbl, log2) +__inline_mathopl(__significandl, getman) + __m81_defun (double, __ieee754_remainder, (double __x, double __y)) { double __result; @@ -427,6 +460,119 @@ __m81_defun (float, __scalbnf, (float __x, int __n)) return __result; } +__m81_defun (long double, __ieee754_remainderl, (long double __x, + long double __y)) +{ + long double __result; + __asm ("frem%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); + return __result; +} + +__m81_defun (long double, __ldexpl, (long double __x, int __e)) +{ + long double __result; + long double __float_e = (long double) __e; + __asm ("fscale%.x %1, %0" : "=f" (__result) : "f" (__float_e), "0" (__x)); + return __result; +} + +__m81_defun (long double, __ieee754_fmodl, (long double __x, long double __y)) +{ + long double __result; + __asm("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); + return __result; +} + +__m81_inline long double +__m81_u(__frexpl)(long double __value, int *__expptr) +{ + long double __mantissa, __exponent; + __asm("fgetexp%.x %1, %0" : "=f" (__exponent) : "f" (__value)); + __asm("fgetman%.x %1, %0" : "=f" (__mantissa) : "f" (__value)); + *__expptr = (int) __exponent; + return __mantissa; +} + +__m81_defun (long double, __floorl, (long double __x)) +{ + long double __result; + unsigned long int __ctrl_reg; + __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); + /* Set rounding towards negative infinity. */ + __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ + : "dmi" ((__ctrl_reg & ~0x10) | 0x20)); + /* Convert X to an integer, using -Inf rounding. */ + __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); + /* Restore the previous rounding mode. */ + __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ + : "dmi" (__ctrl_reg)); + return __result; +} + +__m81_defun (long double, __ieee754_powl, (long double __x, long double __y)) +{ + long double __result; + if (__x == 0.0l) + { + if (__y <= 0.0l) + __result = 0.0l / 0.0l; + else + __result = 0.0l; + } + else if (__y == 0.0l || __x == 1.0l) + __result = 1.0; + else if (__y == 1.0l) + __result = __x; + else if (__y == 2.0l) + __result = __x * __x; + else if (__x == 10.0l) + __asm("ftentox%.x %1, %0" : "=f" (__result) : "f" (__y)); + else if (__x == 2.0l) + __asm("ftwotox%.x %1, %0" : "=f" (__result) : "f" (__y)); + else if (__x < 0.0l) + { + long double __temp = __m81_u(__rintl)(__y); + if (__y == __temp) + { + int i = (int) __y; + __result + = __m81_u(__ieee754_expl)(__y * __m81_u(__ieee754_logl)(-__x)); + if (i & 1) + __result = -__result; + } + else + __result = 0.0l / 0.0l; + } + else + __result = __m81_u(__ieee754_expl)(__y * __m81_u(__ieee754_logl)(__x)); + return __result; +} + +__m81_defun (long double, __ceill, (long double __x)) +{ + long double __result; + unsigned long int __ctrl_reg; + __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); + /* Set rounding towards positive infinity. */ + __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ + : "dmi" (__ctrl_reg | 0x30)); + /* Convert X to an integer, using +Inf rounding. */ + __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); + /* Restore the previous rounding mode. */ + __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ + : "dmi" (__ctrl_reg)); + return __result; +} + +__m81_inline long double +__m81_u(__modfl)(long double __value, long double *__iptr) +{ + long double __modf_int; + __asm ("fintrz%.x %1, %0" : "=f" (__modf_int) : "f" (__value)); + *__iptr = __modf_int; + return __value - __modf_int; +} + __m81_defun (int, __isinfl, (long double __value)) { /* There is no branch-condition for infinity, @@ -445,4 +591,36 @@ __m81_defun (int, __isnanl, (long double __value)) return __result; } +__m81_defun (int, __finitel, (long double __value)) +{ + /* There is no branch-condition for infinity, so we must extract and + examine the condition codes manually. */ + unsigned long int __fpsr; + __asm ("ftst%.x %1\n" + "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); + return (__fpsr & (3 << 24)) == 0; +} + +__m81_defun (int, __ilogbl, (long double __x)) +{ + long double __result; + __asm("fgetexp%.x %1, %0" : "=f" (__result) : "f" (__x)); + return (int) __result; +} + +__m81_defun (long double, __ieee754_scalbl, (long double __x, long double __n)) +{ + long double __result; + __asm ("fscale%.x %1, %0" : "=f" (__result) : "f" (__n), "0" (__x)); + return __result; +} + +__m81_defun (long double, __scalbnl, (long double __x, int __n)) +{ + long double __result; + long double __float_n = (long double) __n; + __asm ("fscale%.x %1, %0" : "=f" (__result) : "f" (__float_n), "0" (__x)); + return __result; +} + #endif /* GCC. */ From 863a5d82907483924627e74ece18fc27d4f337b3 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 6 Jun 1996 05:22:44 +0000 Subject: [PATCH 0682/4487] Tue Jun 4 22:03:02 1996 Andreas Schwab * sysdeps/m68k/fpu/e_acos.c, sysdeps/m68k/fpu/e_fmod.c, sysdeps/m68k/fpu/k_cos.c, sysdeps/m68k/fpu/k_sin.c, sysdeps/m68k/fpu/k_tan.c, sysdeps/m68k/fpu/s_atan.c, sysdeps/m68k/fpu/s_frexp.c, sysdeps/m68k/fpu/s_ilogb.c, sysdeps/m68k/fpu/s_isinf.c, sysdeps/m68k/fpu/s_ldexp.c, sysdeps/m68k/fpu/s_modf.c: Define generic functions using FUNC and float_type with appropriate defaults. --- sysdeps/m68k/fpu/e_acos.c | 7 +++++-- sysdeps/m68k/fpu/e_fmod.c | 7 +++++-- sysdeps/m68k/fpu/k_cos.c | 15 ++++++++++++--- sysdeps/m68k/fpu/k_sin.c | 16 +++++++++++++--- sysdeps/m68k/fpu/k_tan.c | 18 ++++++++++++++---- sysdeps/m68k/fpu/s_atan.c | 7 +++++-- sysdeps/m68k/fpu/s_frexp.c | 18 ++++++++++++++---- sysdeps/m68k/fpu/s_ilogb.c | 16 +++++++++++++--- sysdeps/m68k/fpu/s_isinf.c | 5 ++++- sysdeps/m68k/fpu/s_ldexp.c | 7 +++++-- sysdeps/m68k/fpu/s_modf.c | 18 ++++++++++++++---- 11 files changed, 104 insertions(+), 30 deletions(-) diff --git a/sysdeps/m68k/fpu/e_acos.c b/sysdeps/m68k/fpu/e_acos.c index 34dfc82cff..ae77dabf98 100644 --- a/sysdeps/m68k/fpu/e_acos.c +++ b/sysdeps/m68k/fpu/e_acos.c @@ -22,9 +22,12 @@ Cambridge, MA 02139, USA. */ #ifndef FUNC #define FUNC __ieee754_acos #endif +#ifndef float_type +#define float_type double +#endif -double -DEFUN(FUNC, (x), double x) +float_type +DEFUN(FUNC, (x), float_type x) { return __m81_u(FUNC)(x); } diff --git a/sysdeps/m68k/fpu/e_fmod.c b/sysdeps/m68k/fpu/e_fmod.c index 578fa3ce53..0b2468c06d 100644 --- a/sysdeps/m68k/fpu/e_fmod.c +++ b/sysdeps/m68k/fpu/e_fmod.c @@ -22,9 +22,12 @@ Cambridge, MA 02139, USA. */ #ifndef FUNC #define FUNC __ieee754_fmod #endif +#ifndef float_type +#define float_type double +#endif -double -DEFUN(FUNC, (x, y), double x AND double y) +float_type +DEFUN(FUNC, (x, y), float_type x AND float_type y) { return __m81_u(FUNC)(x, y); } diff --git a/sysdeps/m68k/fpu/k_cos.c b/sysdeps/m68k/fpu/k_cos.c index 1f508b4f40..28406e8cba 100644 --- a/sysdeps/m68k/fpu/k_cos.c +++ b/sysdeps/m68k/fpu/k_cos.c @@ -19,8 +19,17 @@ Cambridge, MA 02139, USA. */ #include #include -double -DEFUN(__kernel_cos, (x, y), double x AND double y) +#ifndef FUNC +#define FUNC cos +#endif +#ifndef float_type +#define float_type double +#endif + +#define __CONCATX(a,b) __CONCAT(a,b) + +float_type +DEFUN(__CONCATX(__kernel_,FUNC), (x, y), float_type x AND float_type y) { - return __cos (x + y); + return __CONCATX(__,FUNC) (x + y); } diff --git a/sysdeps/m68k/fpu/k_sin.c b/sysdeps/m68k/fpu/k_sin.c index 10cfbb4400..8c6dfef720 100644 --- a/sysdeps/m68k/fpu/k_sin.c +++ b/sysdeps/m68k/fpu/k_sin.c @@ -19,8 +19,18 @@ Cambridge, MA 02139, USA. */ #include #include -double -DEFUN(__kernel_sin, (x, y, iy), double x AND double y AND int iy) +#ifndef FUNC +#define FUNC sin +#endif +#ifndef float_type +#define float_type double +#endif + +#define __CONCATX(a,b) __CONCAT(a,b) + +float_type +DEFUN(__CONCATX(__kernel_,FUNC), (x, y, iy), + float_type x AND float_type y AND int iy) { - return __sin (x + y); + return __CONCATX(__,FUNC) (x + y); } diff --git a/sysdeps/m68k/fpu/k_tan.c b/sysdeps/m68k/fpu/k_tan.c index b18c9afbd8..c8fa9b780e 100644 --- a/sysdeps/m68k/fpu/k_tan.c +++ b/sysdeps/m68k/fpu/k_tan.c @@ -19,11 +19,21 @@ Cambridge, MA 02139, USA. */ #include #include -double -DEFUN(__kernel_tan, (x, y, iy), double x AND double y AND int iy) +#ifndef FUNC +#define FUNC tan +#endif +#ifndef float_type +#define float_type double +#endif + +#define __CONCATX(a,b) __CONCAT(a,b) + +float_type +DEFUN(__CONCATX(__kernel_,FUNC), (x, y, iy), + float_type x AND float_type y AND int iy) { if (iy == 1) - return __tan (x + y); + return __CONCATX(__,FUNC) (x + y); else - return -1.0 / __tan (x + y); + return ((float_type) -1.0) / __CONCATX(__,FUNC) (x + y); } diff --git a/sysdeps/m68k/fpu/s_atan.c b/sysdeps/m68k/fpu/s_atan.c index 51916e12ff..29717d4395 100644 --- a/sysdeps/m68k/fpu/s_atan.c +++ b/sysdeps/m68k/fpu/s_atan.c @@ -22,11 +22,14 @@ Cambridge, MA 02139, USA. */ #ifndef FUNC #define FUNC atan #endif +#ifndef float_type +#define float_type double +#endif #define __CONCATX(a,b) __CONCAT(a,b) -double -DEFUN(__CONCATX(__,FUNC), (x), double x) +float_type +DEFUN(__CONCATX(__,FUNC), (x), float_type x) { return __m81_u(__CONCATX(__,FUNC))(x); } diff --git a/sysdeps/m68k/fpu/s_frexp.c b/sysdeps/m68k/fpu/s_frexp.c index 45c054016d..16f30394b2 100644 --- a/sysdeps/m68k/fpu/s_frexp.c +++ b/sysdeps/m68k/fpu/s_frexp.c @@ -19,9 +19,19 @@ Cambridge, MA 02139, USA. */ #include #include -double -DEFUN(__frexp, (value, expptr), double value AND int *expptr) +#ifndef FUNC +#define FUNC frexp +#endif +#ifndef float_type +#define float_type double +#endif + +#define __CONCATX(a,b) __CONCAT(a,b) + +float_type +DEFUN(__CONCATX(__,FUNC), (value, expptr), float_type value AND int *expptr) { - return __m81_u(__frexp)(value, expptr); + return __m81_u(__CONCATX(__,FUNC))(value, expptr); } -weak_alias (__frexp, frexp) +#define weak_aliasx(a,b) weak_alias(a,b) +weak_aliasx (__CONCATX(__,FUNC), FUNC) diff --git a/sysdeps/m68k/fpu/s_ilogb.c b/sysdeps/m68k/fpu/s_ilogb.c index 4119df968a..c80a288949 100644 --- a/sysdeps/m68k/fpu/s_ilogb.c +++ b/sysdeps/m68k/fpu/s_ilogb.c @@ -19,10 +19,20 @@ Cambridge, MA 02139, USA. */ #include #include +#ifndef FUNC +#define FUNC ilogb +#endif +#ifndef float_type +#define float_type double +#endif + +#define __CONCATX(a,b) __CONCAT(a,b) + int -DEFUN(__ilogb, (x), double x) +DEFUN(__CONCATX(__,FUNC), (x), float_type x) { - return __m81_u(__ilogb)(x); + return __m81_u(__CONCATX(__,FUNC))(x); } -weak_alias (__ilogb, ilogb) +#define weak_aliasx(a,b) weak_alias(a,b) +weak_aliasx (__CONCATX(__,FUNC), FUNC) diff --git a/sysdeps/m68k/fpu/s_isinf.c b/sysdeps/m68k/fpu/s_isinf.c index eec07c7d3a..570a7ba7bb 100644 --- a/sysdeps/m68k/fpu/s_isinf.c +++ b/sysdeps/m68k/fpu/s_isinf.c @@ -22,11 +22,14 @@ Cambridge, MA 02139, USA. */ #ifndef FUNC #define FUNC isinf #endif +#ifndef float_type +#define float_type double +#endif #define __CONCATX(a,b) __CONCAT(a,b) int -DEFUN(__CONCATX(__,FUNC), (x), double x) +DEFUN(__CONCATX(__,FUNC), (x), float_type x) { return __m81_u(__CONCATX(__,FUNC))(x); } diff --git a/sysdeps/m68k/fpu/s_ldexp.c b/sysdeps/m68k/fpu/s_ldexp.c index 67513d4875..ea8bfbab88 100644 --- a/sysdeps/m68k/fpu/s_ldexp.c +++ b/sysdeps/m68k/fpu/s_ldexp.c @@ -22,11 +22,14 @@ Cambridge, MA 02139, USA. */ #ifndef FUNC #define FUNC ldexp #endif +#ifndef float_type +#define float_type double +#endif #define __CONCATX(a,b) __CONCAT(a,b) -double -DEFUN(__CONCATX(__,FUNC), (x, exp), double x AND int exp) +float_type +DEFUN(__CONCATX(__,FUNC), (x, exp), float_type x AND int exp) { return __m81_u(__CONCATX(__,FUNC))(x, exp); } diff --git a/sysdeps/m68k/fpu/s_modf.c b/sysdeps/m68k/fpu/s_modf.c index ce70be8168..f704260e21 100644 --- a/sysdeps/m68k/fpu/s_modf.c +++ b/sysdeps/m68k/fpu/s_modf.c @@ -19,9 +19,19 @@ Cambridge, MA 02139, USA. */ #include #include -double -DEFUN(__modf, (x, exp), double x AND double *iptr) +#ifndef FUNC +#define FUNC modf +#endif +#ifndef float_type +#define float_type double +#endif + +#define __CONCATX(a,b) __CONCAT(a,b) + +float_type +DEFUN(__CONCATX(__,FUNC), (x, iptr), float_type x AND float_type *iptr) { - return __m81_u(__modf)(x, iptr); + return __m81_u(__CONCATX(__,FUNC))(x, iptr); } -weak_alias(__modf, modf) +#define weak_aliasx(a,b) weak_alias(a,b) +weak_aliasx(__CONCATX(__,FUNC), FUNC) From e1f73ff7c9fa24dcbbc5776e98f449c71711424a Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 6 Jun 1996 05:22:48 +0000 Subject: [PATCH 0683/4487] Thu Jun 6 00:02:15 1996 Roland McGrath * sysdeps/unix/sysv/linux/m68k/select.S: File removed; obsolete with current kernels, generic linux version is fine. --- sysdeps/unix/sysv/linux/m68k/select.S | 53 --------------------------- 1 file changed, 53 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/m68k/select.S diff --git a/sysdeps/unix/sysv/linux/m68k/select.S b/sysdeps/unix/sysv/linux/m68k/select.S deleted file mode 100644 index 2770df82d1..0000000000 --- a/sysdeps/unix/sysv/linux/m68k/select.S +++ /dev/null @@ -1,53 +0,0 @@ -/* Copyright (C) 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -#include -#define _ERRNO_H -#include - -/* Linux has two versions of the select system call. The old one expected - one argument which must be a pointer to a struct which contains the - five values. The new version expects the five arguments be given in the - registers. First try the new version, if it's not available fall back - to the old version. */ - - .text - SYSCALL_ERROR_HANDLER -ENTRY (__select) - -#if 0 /* For now only use the old version. */ - DO_CALL (#SYS_ify (_newselect), 5) - tst.l %d0 - jmi 1f - rts - -1: move.l #-ENOSYS, %d1 - cmp.l %d1, %d0 - jne syscall_error /* Real error */ - - /* Try again using the old syscall interface. */ -#endif - lea 4(%sp), %a0 - move.l %a0, %d1 - move.l #SYS_ify (select), %d0 - trap #0 - tst.l %d0 - jmi syscall_error - ret - -weak_alias (__select, select) From 79a2e5125016ffcab265445ccc23dbec6ba3b333 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 7 Jun 1996 13:06:41 +0000 Subject: [PATCH 0684/4487] Wed Jun 5 22:06:21 1996 Andreas Schwab * sysdeps/m68k/dl-machine.h (elf_machine_rela): Fix type of reloc argument. [case R_68K_32]: Check for resolve being null. (RTLD_START): Add missing label. --- sysdeps/m68k/dl-machine.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index 6c6b01de2b..74e88749e6 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -73,7 +73,7 @@ elf_machine_load_address (void) static inline void elf_machine_rela (struct link_map *map, - const Elf32_Rel *reloc, const Elf32_Sym *sym, + const Elf32_Rela *reloc, const Elf32_Sym *sym, Elf32_Addr (*resolve) (const Elf32_Sym **ref, Elf32_Addr reloc_addr, int noplt)) @@ -110,7 +110,9 @@ elf_machine_rela (struct link_map *map, + reloc->r_addend); break; case R_68K_32: - loadbase = (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0); + loadbase = (resolve ? (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0) : + /* RESOLVE is null during bootstrap relocation. */ + map->l_addr); *reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) + reloc->r_addend); break; @@ -250,7 +252,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy) lea (%sp, %d0*4), %sp | Push back the modified argument count. move.l %d1, -(%sp) - | Push _dl_loaded as argument in _dl_init_next call below. +0: | Push _dl_loaded as argument in _dl_init_next call below. move.l ([_dl_loaded@GOT, %a5]), %d2 0: move.l %d2, -(%sp) | Call _dl_init_next to return the address of an initializer From 0137a397120dea26389f718d21d8ce96b718cf28 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 7 Jun 1996 20:36:36 +0000 Subject: [PATCH 0685/4487] Fri Jun 7 09:11:17 1996 Roland McGrath * sysdeps/alpha/Makefile (sysdep_routines): Append instead of resetting; don't add bb_init_func. --- sysdeps/alpha/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile index 4bb1f299e1..996c589c85 100644 --- a/sysdeps/alpha/Makefile +++ b/sysdeps/alpha/Makefile @@ -17,7 +17,7 @@ # Cambridge, MA 02139, USA. ifeq ($(subdir),gmon) -sysdep_routines := bb_init_func _mcount +sysdep_routines += _mcount endif ifeq ($(subdir),setjmp) From e62e0ed33c1c3d4e2af6a580fefe6c8e4d6252fe Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 7 Jun 1996 20:36:40 +0000 Subject: [PATCH 0686/4487] Fri Jun 7 09:11:17 1996 Roland McGrath * sysdeps/alpha/Dist: Add _mcount.S. --- sysdeps/alpha/Dist | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/alpha/Dist b/sysdeps/alpha/Dist index 0b1e1b90f4..c9419e6ef3 100644 --- a/sysdeps/alpha/Dist +++ b/sysdeps/alpha/Dist @@ -2,3 +2,4 @@ setjmp_aux.c DEFS.h divrem.h divl.S divlu.S divq.S divqu.S reml.S remlu.S remq.S remqu.S +_mcount.S From 7a41b578d9c70fb181a093c5ac02523f8b11007b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 7 Jun 1996 20:37:18 +0000 Subject: [PATCH 0687/4487] Fri Jun 7 09:11:17 1996 Roland McGrath * sysdeps/unix/sysv/linux/alpha/Dist: New file. --- sysdeps/unix/sysv/linux/alpha/Dist | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/Dist diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist new file mode 100644 index 0000000000..235a443104 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/Dist @@ -0,0 +1,3 @@ +alpha/ptrace.h alpha/regdef.h +ieee_get_fp_control.S ieee_set_fp_control.S +ioperm.c From 40baa3096b0097555e1b54fa1f3decff32c7d032 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 7 Jun 1996 21:00:20 +0000 Subject: [PATCH 0688/4487] Tue Jun 4 22:03:02 1996 Andreas Schwab * sysdeps/m68k/fpu/__math.h: Define long double versions of the inline functions. * sysdeps/m68k/fpu/e_asinl.c, sysdeps/m68k/fpu/e_atanl.c, sysdeps/m68k/fpu/e_acosl.c, sysdeps/m68k/fpu/e_expl.c, sysdeps/m68k/fpu/e_fmodl.c, sysdeps/m68k/fpu/e_log10l.c, sysdeps/m68k/fpu/e_logl.c, sysdeps/m68k/fpu/e_powl.c, sysdeps/m68k/fpu/e_remainderl.c, sysdeps/m68k/fpu/e_scalbl.c, sysdeps/m68k/fpu/e_sinhl.c, sysdeps/m68k/fpu/e_sqrtl.c, sysdeps/m68k/fpu/k_cosl.c, sysdeps/m68k/fpu/k_sinl.c, sysdeps/m68k/fpu/k_tanl.c, sysdeps/m68k/fpu/s_atanl.c, sysdeps/m68k/fpu/s_ceill.c, sysdeps/m68k/fpu/s_cosl.c, sysdeps/m68k/fpu/s_expm1l.c, sysdeps/m68k/fpu/s_fabsl.c, sysdeps/m68k/fpu/s_finitel.c, sysdeps/m68k/fpu/s_floorl.c, sysdeps/m68k/fpu/s_frexpl.c, sysdeps/m68k/fpu/s_ilogbl.c, sysdeps/m68k/fpu/s_isinfl.c, sysdeps/m68k/fpu/s_isnanl.c, sysdeps/m68k/fpu/s_ldexpl.c, sysdeps/m68k/fpu/s_log1pl.c, sysdeps/m68k/fpu/s_logbl.c, sysdeps/m68k/fpu/s_modfl.c, sysdeps/m68k/fpu/s_rintl.c, sysdeps/m68k/fpu/s_scalbnl.c, sysdeps/m68k/fpu/s_significandl.c, sysdeps/m68k/fpu/s_sinl.c, sysdeps/m68k/fpu/e_atanhl.c, sysdeps/m68k/fpu/e_coshl.c: New files. --- sysdeps/m68k/fpu/e_atanhl.c | 2 ++ sysdeps/m68k/fpu/e_coshl.c | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 sysdeps/m68k/fpu/e_atanhl.c create mode 100644 sysdeps/m68k/fpu/e_coshl.c diff --git a/sysdeps/m68k/fpu/e_atanhl.c b/sysdeps/m68k/fpu/e_atanhl.c new file mode 100644 index 0000000000..d8975d6782 --- /dev/null +++ b/sysdeps/m68k/fpu/e_atanhl.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_atanhl +#include diff --git a/sysdeps/m68k/fpu/e_coshl.c b/sysdeps/m68k/fpu/e_coshl.c new file mode 100644 index 0000000000..39144fd202 --- /dev/null +++ b/sysdeps/m68k/fpu/e_coshl.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_coshl +#include From f0f6efdf89bbbeb4d1191b1012510ceffa1ba986 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 9 Jun 1996 22:00:41 +0000 Subject: [PATCH 0689/4487] Sun Jun 9 01:11:49 1996 Roland McGrath * sysdeps/mach/mprotect.c: Define with __ name and weak alias. * sysdeps/stub/mprotect.c: Likewise. * sysdeps/unix/mman/syscalls.list (mprotect): Likewise. * sysdeps/generic/sys/mman.h: Declare __mprotect. * sysdeps/unix/sysv/irix4/sys/mman.h: Likewise. * sysdeps/unix/sysv/linux/sys/mman.h: Likewise. * sysdeps/unix/bsd/sun/sunos4/sys/mman.h: Likewise. * sysdeps/unix/bsd/osf/sys/mman.h: Likewise. --- sysdeps/unix/bsd/osf/sys/mman.h | 3 ++- sysdeps/unix/bsd/sun/sunos4/sys/mman.h | 3 ++- sysdeps/unix/sysv/irix4/sys/mman.h | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/bsd/osf/sys/mman.h b/sysdeps/unix/bsd/osf/sys/mman.h index 397ad28535..fc148a6e65 100644 --- a/sysdeps/unix/bsd/osf/sys/mman.h +++ b/sysdeps/unix/bsd/osf/sys/mman.h @@ -1,5 +1,5 @@ /* Definitions for BSD-style memory management. OSF/1 version. -Copyright (C) 1994, 1995 Free Software Foundation, Inc. +Copyright (C) 1994, 1995, 1996 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 @@ -96,6 +96,7 @@ int munmap __P ((__caddr_t __addr, size_t __len)); /* Change the memory protection of the region starting at ADDR and extending LEN bytes to PROT. Returns 0 if successful, -1 for errors (and sets errno). */ +int __mprotect __P ((__caddr_t __addr, size_t __len, int __prot)); int mprotect __P ((__caddr_t __addr, size_t __len, int __prot)); /* Synchronize the region starting at ADDR and extending LEN bytes with the diff --git a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h index 10f31a898e..c952fc4fda 100644 --- a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h +++ b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h @@ -1,5 +1,5 @@ /* Definitions for BSD-style memory management. SunOS 4 version. -Copyright (C) 1994, 1995 Free Software Foundation, Inc. +Copyright (C) 1994, 1995, 1996 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 @@ -93,6 +93,7 @@ int munmap __P ((__caddr_t __addr, size_t __len)); /* Change the memory protection of the region starting at ADDR and extending LEN bytes to PROT. Returns 0 if successful, -1 for errors (and sets errno). */ +int __mprotect __P ((__caddr_t __addr, size_t __len, int __prot)); int mprotect __P ((__caddr_t __addr, size_t __len, int __prot)); /* Synchronize the region starting at ADDR and extending LEN bytes with the diff --git a/sysdeps/unix/sysv/irix4/sys/mman.h b/sysdeps/unix/sysv/irix4/sys/mman.h index 543ce552f3..c96bcc0751 100644 --- a/sysdeps/unix/sysv/irix4/sys/mman.h +++ b/sysdeps/unix/sysv/irix4/sys/mman.h @@ -1,5 +1,5 @@ /* Definitions for BSD-style memory management. Irix 4 version. -Copyright (C) 1994, 1995 Free Software Foundation, Inc. +Copyright (C) 1994, 1995, 1996 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 @@ -87,6 +87,7 @@ int munmap __P ((__caddr_t __addr, size_t __len)); /* Change the memory protection of the region starting at ADDR and extending LEN bytes to PROT. Returns 0 if successful, -1 for errors (and sets errno). */ +int __mprotect __P ((__caddr_t __addr, size_t __len, int __prot)); int mprotect __P ((__caddr_t __addr, size_t __len, int __prot)); /* Synchronize the region starting at ADDR and extending LEN bytes with the From 74802a54699a8e89691dba71ad7c7bac4285a374 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 10 Jun 1996 09:23:00 +0000 Subject: [PATCH 0690/4487] Sun Jun 9 20:40:00 1996 Andreas Schwab * sysdeps/m68k/fpu/e_acosl.c: New file. --- sysdeps/m68k/fpu/e_acosl.c | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 sysdeps/m68k/fpu/e_acosl.c diff --git a/sysdeps/m68k/fpu/e_acosl.c b/sysdeps/m68k/fpu/e_acosl.c new file mode 100644 index 0000000000..e3dcd170f3 --- /dev/null +++ b/sysdeps/m68k/fpu/e_acosl.c @@ -0,0 +1,5 @@ +#ifndef FUNC +#define FUNC __ieee754_acosl +#endif +#define float_type long double +#include From 625ba68c01e3908972be158678f2a9cb8acc1cd9 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 10 Jun 1996 09:40:37 +0000 Subject: [PATCH 0691/4487] Sun Jun 9 01:11:49 1996 Roland McGrath * sysdeps/mach/mprotect.c: Define with __ name and weak alias. * sysdeps/stub/mprotect.c: Likewise. * sysdeps/unix/mman/syscalls.list (mprotect): Likewise. * sysdeps/generic/sys/mman.h: Declare __mprotect. * sysdeps/unix/sysv/irix4/sys/mman.h: Likewise. * sysdeps/unix/sysv/linux/sys/mman.h: Likewise. * sysdeps/unix/bsd/sun/sunos4/sys/mman.h: Likewise. * sysdeps/unix/bsd/osf/sys/mman.h: Likewise. * sysdeps/unix/bsd/ultrix4/sys/mman.h: Likewise. --- sysdeps/unix/bsd/ultrix4/sys/mman.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/bsd/ultrix4/sys/mman.h b/sysdeps/unix/bsd/ultrix4/sys/mman.h index d49da02c32..d929ca9e84 100644 --- a/sysdeps/unix/bsd/ultrix4/sys/mman.h +++ b/sysdeps/unix/bsd/ultrix4/sys/mman.h @@ -1,5 +1,5 @@ /* Definitions for BSD-style memory management. Ultrix 4 version. -Copyright (C) 1994, 1995 Free Software Foundation, Inc. +Copyright (C) 1994, 1995, 1996 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 @@ -79,6 +79,7 @@ int munmap __P ((__caddr_t __addr, size_t __len)); /* Change the memory protection of the region starting at ADDR and extending LEN bytes to PROT. Returns 0 if successful, -1 for errors (and sets errno). */ +int __mprotect __P ((__caddr_t __addr, size_t __len, int __prot)); int mprotect __P ((__caddr_t __addr, size_t __len, int __prot)); /* Ultrix 4 does not implement `msync' or `madvise'. */ From 9424ed18f080504ed4121375942686226c0c15dd Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 10 Jun 1996 12:55:52 +0000 Subject: [PATCH 0692/4487] Mon Jun 10 06:14:03 1996 Roland McGrath * elf/link.h: Include elfclass.h to define __ELF_NATIVE_CLASS. (ElfW, ELFW): Use it. * elf/Makefile (headers): Add elfclass.h. * sysdeps/wordsize-32/elfclass.h: New file. * sysdeps/wordsize-64/elfclass.h: New file. * sysdeps/alpha/Implies: Add wordsize-64. * sysdeps/i386/Implies: Add wordsize-32. * sysdeps/m68k/Implies: Add wordsize-32. * sysdeps/mips/Implies: Add wordsize-32. * sysdeps/sparc/Implies: Add wordsize-32. --- sysdeps/alpha/Implies | 1 + sysdeps/m68k/Implies | 1 + sysdeps/mips/Implies | 1 + 3 files changed, 3 insertions(+) diff --git a/sysdeps/alpha/Implies b/sysdeps/alpha/Implies index 93234096f0..37fee79d97 100644 --- a/sysdeps/alpha/Implies +++ b/sysdeps/alpha/Implies @@ -1,2 +1,3 @@ +wordsize-64 # Alpha uses IEEE 754 floating point. ieee754 diff --git a/sysdeps/m68k/Implies b/sysdeps/m68k/Implies index a67e1c2741..09dd873973 100644 --- a/sysdeps/m68k/Implies +++ b/sysdeps/m68k/Implies @@ -1,2 +1,3 @@ +wordsize-32 # 68k uses IEEE 754 floating point. ieee754 diff --git a/sysdeps/mips/Implies b/sysdeps/mips/Implies index 60732cef94..5aeb9ae460 100644 --- a/sysdeps/mips/Implies +++ b/sysdeps/mips/Implies @@ -1,2 +1,3 @@ +wordsize-32 # MIPS uses IEEE 754 floating point. ieee754 From 9f9cd8224e0cba2cfefad66b3f2341c9fb3ea041 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 10 Jun 1996 20:11:28 +0000 Subject: [PATCH 0693/4487] Mon Jun 10 06:14:03 1996 Roland McGrath * elf/dl-object.c (_dl_loaded): Variable removed. (_dl_default_scope): New variable replaces it. * elf/link.h (_dl_loaded): Remove variable decl; instead define as macro for _dl_default_scope[2]. (_dl_default_scope): Declare it. * sysdeps/i386/dl-machine.h (RTLD_START): Use _dl_default_scope[2] instead of _dl_loaded. * sysdeps/m68k/dl-machine.h (RTLD_START): Likewise. * elf/rtld.c (dl_main): Use _dl_default_scope for symbol lookups. --- sysdeps/m68k/dl-machine.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index 74e88749e6..415216b14a 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -252,9 +252,9 @@ elf_machine_runtime_setup (struct link_map *l, int lazy) lea (%sp, %d0*4), %sp | Push back the modified argument count. move.l %d1, -(%sp) -0: | Push _dl_loaded as argument in _dl_init_next call below. - move.l ([_dl_loaded@GOT, %a5]), %d2 -0: move.l %d2, -(%sp) +0: | Push _dl_default_scope[2] as argument in _dl_init_next call below. + move.l ([_dl_default_scope@GOT, %a5]), %d2 +0: move.l (%d2, 8), -(%sp) | Call _dl_init_next to return the address of an initializer | function to run. bsr.l _dl_init_next@PLTPC From d7cf1621790751ae7aa69a29ba83efb8d086ed39 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 12 Jun 1996 01:41:59 +0000 Subject: [PATCH 0694/4487] Tue Jun 11 19:13:04 1996 Richard Henderson * sysdeps/alpha/Makefile [subdir elf]: Add -mno-fp-regs to sysdep-CFLAGS so that _dl_runtime_resolve doesn't have to save them. Add -mbuild-constants to CFLAGS-rtld.c to that we can bootstrap without using literal data. --- sysdeps/alpha/Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile index 996c589c85..a9f12d1396 100644 --- a/sysdeps/alpha/Makefile +++ b/sysdeps/alpha/Makefile @@ -28,4 +28,12 @@ ifeq ($(subdir),gnulib) routines = $(divrem) endif # gnulib +ifeq ($(subdir),elf) +# The ld.so code cannot use literals until it self-relocates. +CFLAGS-rtld.c = -mbuild-constants +# The rest of ld.so shouldn't use FP regs for block moves so +# that the lazy link trampoline doesn't have to save them. +sysdep-CFLAGS += -mno-fp-regs +endif + divrem := divl divlu divq divqu reml remlu remq remqu From 50f1932bda5560e95a863812257b404402afa01d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 12 Jun 1996 01:42:09 +0000 Subject: [PATCH 0695/4487] Tue Jun 11 19:13:04 1996 Richard Henderson * elf/rtld.c (_dl_start): Don't rely on pointer-to-first-arg hack for getting the argc/argv/envp block. Instead, make it the argument. sysdeps/i386/dl-machine.h (RTLD_START): Do that. sysdeps/m68k/dl-machine.h (RTLD_START): Same. --- sysdeps/m68k/dl-machine.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index 415216b14a..ad3b6c3590 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -234,7 +234,9 @@ elf_machine_runtime_setup (struct link_map *l, int lazy) .globl _start .globl _dl_start_user _start: + move.l %sp, -(%sp) jbsr _dl_start + addq.l #4, %sp _dl_start_user: | Save the user entry point address in %a4. move.l %d0, %a4 From d5e4222a33673872b145a1e88ebc2c3b4d9eef8f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 12 Jun 1996 04:51:27 +0000 Subject: [PATCH 0696/4487] Tue Jun 11 19:13:04 1996 Richard Henderson * sysdeps/alpha/dl-machine.h: New file. --- sysdeps/alpha/dl-machine.h | 373 +++++++++++++++++++++++++++++++++++++ 1 file changed, 373 insertions(+) create mode 100644 sysdeps/alpha/dl-machine.h diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h new file mode 100644 index 0000000000..a92c319fc3 --- /dev/null +++ b/sysdeps/alpha/dl-machine.h @@ -0,0 +1,373 @@ +/* Machine-dependent ELF dynamic relocation inline functions. Alpha version. +Copyright (C) 1996 Free Software Foundation, Inc. +This file is part of the GNU C Library. +Contributed by Richard Henderson . + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* This was written in the absense of an ABI -- don't expect + it to remain unchanged. */ + +#define ELF_MACHINE_NAME "alpha" + +#include +#include +#include + + +/* Return nonzero iff E_MACHINE is compatible with the running host. */ +static inline int +elf_machine_matches_host (Elf64_Word e_machine) +{ + return e_machine == EM_ALPHA; +} + + +/* Return the run-time address of the _GLOBAL_OFFSET_TABLE_. + Must be inlined in a function which uses global data. */ +static inline Elf64_Addr * +elf_machine_got (void) +{ + register Elf64_Addr gp __asm__("$29"); + return (Elf64_Addr *)(gp - 0x8000); +} + + +/* Return the run-time load address of the shared object. */ +static inline Elf64_Addr +elf_machine_load_address (void) +{ + /* NOTE: While it is generally unfriendly to put data in the text + segment, it is only slightly less so when the "data" is an + instruction. While we don't have to worry about GLD just yet, an + optimizing linker might decide that our "data" is an unreachable + instruction and throw it away -- with the right switches, DEC's + linker will do this. What ought to happen is we should add + something to GAS to allow us access to the new GPREL_HI32/LO32 + relocation types stolen from OSF/1 3.0. */ + /* This code relies on the fact that BRADDR relocations do not + appear in dynamic relocation tables. Not that that would be very + useful anyway -- br/bsr has a 4MB range and the shared libraries + are usually many many terabytes away. */ + + Elf64_Addr dot; + long zero_disp; + + asm("br %0, 1f\n\t" + ".weak __load_address_undefined\n\t" + "br $0, __load_address_undefined\n" + "1:" + : "=r"(dot)); + + zero_disp = *(int *)dot; + zero_disp = (zero_disp << 43) >> 41; + + return dot + 4 + zero_disp; +} + + +/* Fix up the instructions of a PLT entry to invoke the function + rather than the dynamic linker. */ +static inline void +elf_alpha_fix_plt(struct link_map *l, + const Elf64_Rela *reloc, + Elf64_Addr value) +{ + const Elf64_Rela *rela_plt; + Elf64_Word *plte; + long disp; + + /* Recover the PLT entry address by calculating reloc's index into the + .rela.plt, and finding that entry in the .plt. */ + + rela_plt = (void *)(l->l_addr + l->l_info[DT_JMPREL]->d_un.d_ptr); + + plte = (void *)(l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr); + plte += 2*(reloc - rela_plt) + 8; + + /* Find the displacement from the plt entry to the function. */ + + disp = value - (Elf64_Addr)&plte[2]; + + /* Change "lda $27, ofs($31)" to "ldq $27, ofs($gp)" */ + plte[0] = 0xa77d0000 | (plte[0] & 0xffff); + + if (disp >= -0x100000 && disp < 0x100000) + { + /* If we are in range, use br to perfect branch prediction and + elide the dependancy on the address load. This case happens, + e.g., when a shared library call is resolved to the same library. */ + /* Change "br $0, plt0" to "br $31,function" */ + plte[1] = 0xc3e00000 | (disp & 0x1fffff); + } + else + { + /* Don't bother with the hint since we already know the hint is + wrong. Eliding it prevents the wrong page from getting pulled + into the cache. */ + /* Change "br $0, plt0" to "jmp $31,($27)" */ + plte[1] = 0x6bfb0000; + } + + /* Flush the instruction cache now that we've diddled. Tag it as + modifying memory to checkpoint memory writes during optimization. */ + asm volatile("call_pal 0x86" : : : "memory"); +} + +/* Perform the relocation specified by RELOC and SYM (which is fully resolved). + MAP is the object containing the reloc. */ +static inline void +elf_machine_rela (struct link_map *map, + const Elf64_Rela *reloc, + const Elf64_Sym *sym, + Elf64_Addr (*resolve) (const Elf64_Sym **ref, + Elf64_Addr reloc_addr, + int noplt)) +{ + Elf64_Addr *const reloc_addr = (void *)(map->l_addr + reloc->r_offset); + unsigned long r_info = ELF64_R_TYPE (reloc->r_info); + + /* We cannot use a switch here because we cannot locate the switch + jump table until we've self-relocated. */ + + if (r_info == R_ALPHA_RELATIVE) + { + /* Already done in dynamic linker. */ + if (!resolve || map != &_dl_rtld_map) + *reloc_addr += map->l_addr; + } + else if (r_info == R_ALPHA_NONE) + ; + else + { + Elf64_Addr loadbase, sym_value; + + if (resolve) + { + loadbase = (*resolve)(&sym, (Elf64_Addr)reloc_addr, + r_info == R_ALPHA_JMP_SLOT); + } + else + loadbase = map->l_addr; + + sym_value = sym ? loadbase + sym->st_value : 0; + + if (r_info == R_ALPHA_GLOB_DAT) + { + *reloc_addr = sym_value; + } + else if (r_info == R_ALPHA_JMP_SLOT) + { + *reloc_addr = sym_value; + elf_alpha_fix_plt(map, reloc, sym_value); + } + else if (r_info == R_ALPHA_REFQUAD) + { + sym_value += *reloc_addr; + if (resolve && map == &_dl_rtld_map) + { + /* Undo the relocation done here during bootstrapping. + Now we will relocate anew, possibly using a binding + found in the user program or a loaded library rather + than the dynamic linker's built-in definitions used + while loading those libraries. */ + const Elf64_Sym *const dlsymtab + = (void *)(map->l_addr + map->l_info[DT_SYMTAB]->d_un.d_ptr); + sym_value -= map->l_addr; + sym_value -= dlsymtab[ELF64_R_SYM(reloc->r_info)].st_value; + } + else + sym_value += reloc->r_addend; + *reloc_addr = sym_value; + } + else if (r_info == R_ALPHA_COPY) + memcpy (reloc_addr, (void *) sym_value, sym->st_size); + else + assert (! "unexpected dynamic reloc type"); + } +} + +static inline void +elf_machine_lazy_rel (struct link_map *map, const Elf64_Rela *reloc) +{ + Elf64_Addr *const reloc_addr = (void *)(map->l_addr + reloc->r_offset); + unsigned long r_info = ELF64_R_TYPE (reloc->r_info); + + if (r_info == R_ALPHA_JMP_SLOT) + { + /* Perform a RELATIVE reloc on the .got entry that transfers + to the .plt. */ + *reloc_addr += map->l_addr; + } + else if (r_info == R_ALPHA_NONE) + ; + else + assert (! "unexpected PLT reloc type"); +} + +/* The alpha never uses Elf_Rel relocations. */ +#define ELF_MACHINE_NO_REL 1 + + +/* Set up the loaded object described by L so its unrelocated PLT + entries will jump to the on-demand fixup code in dl-runtime.c. */ + +static inline void +elf_machine_runtime_setup (struct link_map *l, int lazy) +{ + Elf64_Addr plt; + extern void _dl_runtime_resolve (void); + + if (l->l_info[DT_JMPREL] && lazy) + { + /* The GOT entries for the functions in the PLT have not been + filled in yet. Their initial contents are directed to the + PLT which arranges for the dynamic linker to be called. */ + plt = l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr; + + /* This function will be called to perform the relocation. */ + *(Elf64_Addr *)(plt + 16) = (Elf64_Addr) &_dl_runtime_resolve; + + /* Identify this shared object */ + *(Elf64_Addr *)(plt + 24) = (Elf64_Addr) l; + } +} + +/* This code is used in dl-runtime.c to call the `fixup' function + and then redirect to the address it returns. */ +#define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ( \ +"/* Trampoline for _dl_runtime_resolver */ + .globl _dl_runtime_resolve + .ent _dl_runtime_resolve +_dl_runtime_resolve: + lda $sp, -168($sp) + .frame $sp, 168, $26 + /* Preserve all registers that C normally doesn't. */ + stq $26, 0($sp) + stq $0, 8($sp) + stq $1, 16($sp) + stq $2, 24($sp) + stq $3, 32($sp) + stq $4, 40($sp) + stq $5, 48($sp) + stq $6, 56($sp) + stq $7, 64($sp) + stq $8, 72($sp) + stq $16, 80($sp) + stq $17, 88($sp) + stq $18, 96($sp) + stq $19, 104($sp) + stq $20, 112($sp) + stq $21, 120($sp) + stq $22, 128($sp) + stq $23, 136($sp) + stq $24, 144($sp) + stq $25, 152($sp) + stq $29, 160($sp) + .mask 0x27ff01ff, -168 + /* Set up our $gp */ + br $gp, .+4 + ldgp $gp, 0($gp) + .prologue 1 + /* Set up the arguments for _dl_runtime_resolve. */ + /* $16 = link_map out of plt0 */ + ldq $16, 8($27) + /* $17 = (($0 - 8) - ($1 + 16)) / 8 * sizeof(Elf_Rela) */ + subq $28, $27, $28 + subq $28, 24, $28 + addq $28, $28, $17 + addq $28, $17, $17 + /* Do the fixup */ + bsr $26, fixup..ng + /* Move the destination address to a safe place. */ + mov $0, $27 + /* Restore program registers. */ + ldq $26, 0($sp) + ldq $0, 8($sp) + ldq $1, 16($sp) + ldq $2, 24($sp) + ldq $3, 32($sp) + ldq $4, 40($sp) + ldq $5, 48($sp) + ldq $6, 56($sp) + ldq $7, 64($sp) + ldq $8, 72($sp) + ldq $16, 80($sp) + ldq $17, 88($sp) + ldq $18, 96($sp) + ldq $19, 104($sp) + ldq $20, 112($sp) + ldq $21, 120($sp) + ldq $22, 128($sp) + ldq $23, 136($sp) + ldq $24, 144($sp) + ldq $25, 152($sp) + ldq $29, 160($sp) + /* Clean up and turn control to the destination */ + lda $sp, 168($sp) + jmp $31, ($27) + .end _dl_runtime_resolve"); + +/* The PLT uses Elf_Rel relocs. */ +#define elf_machine_relplt elf_machine_rela + +/* Mask identifying addresses reserved for the user program, + where the dynamic linker should not map anything. */ +/* FIXME */ +#define ELF_MACHINE_USER_ADDRESS_MASK (~0x1FFFFFFFFUL) + +/* Initial entry point code for the dynamic linker. + The C function `_dl_start' is the real entry point; + its return value is the user program's entry point. */ + +#define RTLD_START asm ("\ +.text + .globl _start + .globl _dl_start_user +_start: + br $gp,.+4 + ldgp $gp, 0($gp) + /* Pass pointer to argument block to _dl_start. */ + mov $sp, $16 + bsr $26, _dl_start..ng +_dl_start_user: + /* Save the user entry point address in s0. */ + mov $0, $9 + /* See if we were run as a command with the executable file + name as an extra leading argument. If so, adjust the stack + pointer to skip _dl_skip_args words. */ + ldl $1, _dl_skip_args + beq $1, 0f + ldq $2, 0($sp) + subq $2, $1, $2 + s8addq $1, $sp, $sp + stq $2, 0($sp) + /* Load _dl_default_scope[2] into s1 to pass to _dl_init_next. */ +0: ldq $10, _dl_default_scope+16 + /* Call _dl_init_next to return the address of an initalizer + function to run. */ +1: mov $10, $16 + jsr $26, _dl_init_next + ldgp $gp, 0($26) + beq $0, 2f + mov $0, $27 + jsr $26, ($0) + ldgp $gp, 0($26) + br 1b +2: /* Pass our finalizer function to the user in $0. */ + lda $0, _dl_fini + /* Jump to the user's entry point. */ + jmp ($9)"); From 26e00f7e6104f4d636a04f01a4d3eb267c04127c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 13 Jun 1996 22:49:33 +0000 Subject: [PATCH 0697/4487] Thu Jun 13 00:02:25 1996 Roland McGrath * sysdeps/generic/machine-gmon.h [NO_UNDERSCORES]: Define mcount as weak alias for _mcount. * sysdeps/alpha/_mcount.S (mcount): Define as weak alias. --- sysdeps/alpha/_mcount.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/alpha/_mcount.S b/sysdeps/alpha/_mcount.S index 1730760316..e813ebdd58 100644 --- a/sysdeps/alpha/_mcount.S +++ b/sysdeps/alpha/_mcount.S @@ -1,5 +1,5 @@ /* Machine-specific calling sequence for `mcount' profiling function. alpha -Copyright (C) 1995 Free Software Foundation, Inc. +Copyright (C) 1995, 1996 Free Software Foundation, Inc. Contributed by David Mosberger (davidm@cs.arizona.edu). This file is part of the GNU C Library. @@ -41,6 +41,7 @@ respectively in gmon.c language...). */ .set noreorder LEAF(_mcount, 0xb0) +weak_alias (_mcount, mcount) .prologue 0 subq sp, 0xb0, sp From f04e87f28a3e6a3dd025ccf5a76b836870f3a07b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 16 Jun 1996 03:49:08 +0000 Subject: [PATCH 0698/4487] Sat Jun 15 18:13:43 1996 Roland McGrath * math/Makefile (headers): Add fpu_control.h. (aux): New variable, list fpu_control and setfpucw. * sysdeps/generic/fpu_control.c: New file. * sysdeps/stub/fpu_control.h: New file. * sysdeps/unix/sysv/linux/m68k/fpu_control.h: Moved to ... * sysdeps/m68k/fpu_control.h: here. * sysdeps/unix/sysv/linux/i386/fpu_control.h: Moved to ... * sysdeps/i386/fpu_control.h: here. * sysdeps/unix/sysv/linux/alpha/fpu_control.h: Moved to ... * sysdeps/alpha/fpu/fpu_control.h: here. Fixed copyright. * sysdeps/unix/sysv/linux/alpha/Makefile (sysdep_routines): Remove setfpucw, fpu_control. * sysdeps/unix/sysv/linux/alpha/fpu_control.c: File removed. * sysdeps/unix/sysv/linux/setfpucw.c: Moved to ... * sysdeps/generic/setfpucw.c: here. (__fpu_control): Variable removed. (__setfpucw): Use SET even if zero. --- .../linux/alpha => alpha/fpu}/fpu_control.h | 24 ++++++++++++------- .../{unix/sysv/linux => }/m68k/fpu_control.h | 0 sysdeps/unix/sysv/linux/alpha/Makefile | 4 ++-- sysdeps/unix/sysv/linux/alpha/fpu_control.c | 21 ---------------- 4 files changed, 18 insertions(+), 31 deletions(-) rename sysdeps/{unix/sysv/linux/alpha => alpha/fpu}/fpu_control.h (81%) rename sysdeps/{unix/sysv/linux => }/m68k/fpu_control.h (100%) delete mode 100644 sysdeps/unix/sysv/linux/alpha/fpu_control.c diff --git a/sysdeps/unix/sysv/linux/alpha/fpu_control.h b/sysdeps/alpha/fpu/fpu_control.h similarity index 81% rename from sysdeps/unix/sysv/linux/alpha/fpu_control.h rename to sysdeps/alpha/fpu/fpu_control.h index 782f33e040..219ea55f24 100644 --- a/sysdeps/unix/sysv/linux/alpha/fpu_control.h +++ b/sysdeps/alpha/fpu/fpu_control.h @@ -1,15 +1,23 @@ -/* Copyright (C) 1993 Olaf Flebbe -This file is part of the Linux C Library. +/* FPU control word bits. Alpha version. +Copyright (C) 1996 Free Software Foundation, Inc. +Contributed by Olaf Flebbe. -The Linux C Library is free software; you can redistribute it and/or +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 Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. -The Linux C Library is distributed in the hope that it will be useful, +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 -Library General Public License for more details. */ +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ #ifndef _ALPHA_FPU_CONTROL_H #define _ALPHA_FPU_CONTROL_H @@ -28,7 +36,7 @@ Library General Public License for more details. */ * OM: Overflow mask * UM: Underflow mask * PM: Precision (inexact result) mask - * + * * Mask bit is 1 means no interrupt. * * PC: Precision control @@ -51,7 +59,7 @@ Library General Public License for more details. */ #include /* masking of interrupts */ -#define _FPU_MASK_IM 0x01 +#define _FPU_MASK_IM 0x01 #define _FPU_MASK_DM 0x02 #define _FPU_MASK_ZM 0x04 #define _FPU_MASK_OM 0x08 @@ -84,7 +92,7 @@ Library General Public License for more details. */ one can use /d to get round to +infinity with no extra overhead (so long as the default isn't changed, of course...) - exceptions on overflow, zero divide and NaN */ -#define _FPU_DEFAULT 0x1f72 +#define _FPU_DEFAULT 0x1f72 /* IEEE: same as above, but exceptions */ #define _FPU_IEEE 0x1f7f diff --git a/sysdeps/unix/sysv/linux/m68k/fpu_control.h b/sysdeps/m68k/fpu_control.h similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/fpu_control.h rename to sysdeps/m68k/fpu_control.h diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile index e6e421da9d..9d596719da 100644 --- a/sysdeps/unix/sysv/linux/alpha/Makefile +++ b/sysdeps/unix/sysv/linux/alpha/Makefile @@ -1,6 +1,6 @@ ifeq ($(subdir), misc) sysdep_headers += alpha/ptrace.h alpha/regdef.h -sysdep_routines += ieee_get_fp_control ieee_set_fp_control fpu_control \ - setfpucw sethae ioperm osf_sigprocmask fstatfs statfs +sysdep_routines += ieee_get_fp_control ieee_set_fp_control \ + sethae ioperm osf_sigprocmask fstatfs statfs endif diff --git a/sysdeps/unix/sysv/linux/alpha/fpu_control.c b/sysdeps/unix/sysv/linux/alpha/fpu_control.c deleted file mode 100644 index 20c032a03c..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/fpu_control.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. - Contributed by David Mosberger (davidm@azstarnet.com). - -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 -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -fpu_control_t __fpu_control = _FPU_DEFAULT; From 7d610b3a3d5e598be3d11e0add556fd1b94c871f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 17 Jun 1996 21:49:10 +0000 Subject: [PATCH 0699/4487] Wed Jun 12 20:40:51 1996 Andreas Schwab * sysdeps/m68k/dl-machine.h (RTLD_START): Fix access to _dl_default_scope. --- sysdeps/m68k/dl-machine.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index ad3b6c3590..0f64d686ed 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -255,8 +255,8 @@ elf_machine_runtime_setup (struct link_map *l, int lazy) | Push back the modified argument count. move.l %d1, -(%sp) 0: | Push _dl_default_scope[2] as argument in _dl_init_next call below. - move.l ([_dl_default_scope@GOT, %a5]), %d2 -0: move.l (%d2, 8), -(%sp) + move.l ([_dl_default_scope@GOT, %a5], 8), %d2 +0: move.l %d2, -(%sp) | Call _dl_init_next to return the address of an initializer | function to run. bsr.l _dl_init_next@PLTPC From 88b7c7257cf67e3bd185a93e28465f79b5c7c3ac Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 19 Jun 1996 06:37:43 +0000 Subject: [PATCH 0700/4487] Thu Jun 6 21:39:38 1996 David Mosberger-Tang * sysdeps/unix/bsd/sun/sunos4/tcsetattr.c (tcsetattr): Declare cmd as unsigned long, not as int (to avoid incorrect int->long promotion). --- sysdeps/unix/bsd/sun/sunos4/tcsetattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c b/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c index 4ae139a1f8..f88951ff9d 100644 --- a/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c +++ b/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c @@ -27,7 +27,7 @@ int DEFUN(tcsetattr, (fd, optional_actions, termios_p), int fd AND int optional_actions AND CONST struct termios *termios_p) { - int cmd; + unsigned long cmd; switch (optional_actions) { From e3829e904a26c167fca1e2e23c7c7d7304e0a57c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 19 Jun 1996 06:37:47 +0000 Subject: [PATCH 0701/4487] Mon Jun 10 17:50:31 1996 David Mosberger-Tang * sysdeps/unix/alpha/sysdep.S: Renamed from sysdeps/unix/sysv/linux/alpha/sysdep.S. This file works for OSF/1 as well. * sysdeps/unix/bsd/osf/alpha/sysdep.S: Remove (note that the EWOULDBLOCK -> EAGAIN mapping was unnecessary since EWOULDBLOCK==EAGAIN under DEC Unix and Linux/Alpha). --- sysdeps/unix/{bsd/osf => }/alpha/sysdep.S | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) rename sysdeps/unix/{bsd/osf => }/alpha/sysdep.S (72%) diff --git a/sysdeps/unix/bsd/osf/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S similarity index 72% rename from sysdeps/unix/bsd/osf/alpha/sysdep.S rename to sysdeps/unix/alpha/sysdep.S index bc4865cef2..3e7666ff61 100644 --- a/sysdeps/unix/bsd/osf/alpha/sysdep.S +++ b/sysdeps/unix/alpha/sysdep.S @@ -20,21 +20,20 @@ Cambridge, MA 02139, USA. */ #define _ERRNO_H #include -ENTRY(syscall_error) -#ifdef EWOULDBLOCK_sys - /* We translate the system's EWOULDBLOCK error into EAGAIN. - The GNU C library always defines EWOULDBLOCK==EAGAIN. - EWOULDBLOCK_sys is the original number. */ - subq v0, EWOULDBLOCK_sys, t0 - cmoveq t0, EAGAIN, v0 + .comm errno, 4 +#ifdef __ELF__ + .type errno, @object #endif - /* Store it in errno... */ -! ldgp gp, 0(t12) - stl v0, errno +LEAF(__syscall_error, 0) + .prologue 1 + + /* Store return value in errno... */ + ldgp gp, 0(t12) + stl v0, errno /* And just kick back a -1. */ - ldil v0, -1 + ldi v0, -1 ret - .end syscall_error + END(__syscall_error) From bb486e187eb2d4905c88871b2169f45c339ae078 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 19 Jun 1996 06:37:57 +0000 Subject: [PATCH 0702/4487] Mon Jun 10 17:50:31 1996 David Mosberger-Tang * sysdeps/unix/alpha/sysdep.h: Move error-handling code in PSEUDO to PSEUDO_END to improve branch-prediction. Include .frame directive to make syscalls debugabble. (PSEUDO_END): New macro. * sysdeps/unix/alpha/sysdep.h, sysdeps/alpha/bb_init_func.S, sysdeps/unix/sysv/linux/alpha/brk.S: Use ldiq instead of ldi since latter is illegal under DEC Unix. --- sysdeps/unix/alpha/sysdep.h | 50 ++++++++++++++++++++++++------------- 1 file changed, 33 insertions(+), 17 deletions(-) diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h index 6fed4a6adf..4b3f9aa5d8 100644 --- a/sysdeps/unix/alpha/sysdep.h +++ b/sysdeps/unix/alpha/sysdep.h @@ -58,25 +58,27 @@ Cambridge, MA 02139, USA. */ .frame sp, 0, ra #endif -/* Note that while it's better structurally, going back to set errno - can make things confusing if you're debugging---it looks like it's jumping - backwards into the previous fn. */ +/* Mark the end of function SYM. */ +#undef END +#define END(sym) .end sym + +/* Note that PSEUDO/PSEUDO_END use label number 1996---do not use a + label of that number between those two macros! */ + #ifdef __STDC__ #define PSEUDO(name, syscall_name, args) \ .globl name; \ .align 3; \ .ent name,0; \ \ -1: br gp, 2f; \ -2: ldgp gp, 0(gp); \ - jmp zero, syscall_error; \ - \ name##: \ - ldi v0, SYS_ify(syscall_name); \ + .frame sp, 0, ra \ + .prologue 1; /* yes, we do use gp */ \ + ldiq v0, SYS_ify(syscall_name); \ .set noat; \ call_pal PAL_callsys; \ .set at; \ - bne a3, 1b; \ + bne a3, 1996f; \ 3: #else #define PSEUDO(name, syscall_name, args) \ @@ -84,21 +86,35 @@ name##: \ .align 3; \ .ent name,0; \ \ -1: br gp, 2f; \ -2: ldgp gp, 0(gp); \ - jmp zero, syscall_error; \ - \ name/**/: \ - ldi v0, SYS_ify(syscall_name); \ + .frame sp, 0, ra \ + .prologue 1; /* yes, we do use gp */ \ + ldiq v0, SYS_ify(syscall_name); \ .set noat; \ call_pal PAL_callsys; \ .set at; \ - bne a3, 1b; \ + bne a3, 1996f; \ 3: #endif -#undef END -#define END(sym) .end sym +#undef PSEUDO_END + +#ifdef PIC +/* When building a shared library, we can use a branch since the text + section of the library is much smaller than 4MB. If we ever break + this assumption, the linker will tell us. */ +# define PSEUDO_END(sym) \ +1996: \ + br zero, __syscall_error; \ + END(sym) +#else +# define PSEUDO_END(sym) \ +1996: \ + br gp, 2f; \ +2: ldgp gp, 0(gp); \ + jmp zero, __syscall_error; \ + END(sym) +#endif #define r0 v0 #define r1 a4 From 3dbefc478a9b9dc9535804fb4b5d7656a970eee9 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 19 Jun 1996 06:37:59 +0000 Subject: [PATCH 0703/4487] Mon Jun 10 17:50:31 1996 David Mosberger-Tang * sysdeps/unix/sysv/linux/alpha/sysdep.h: Rename __NR_get?id to SYS_get?id so that syscall stubs in sysdeps/unix define these syscalls in terms of getxpid/getxuid/getxgid. --- sysdeps/unix/sysv/linux/alpha/sysdep.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h index 627b37e4fb..8f5f5dde61 100644 --- a/sysdeps/unix/sysv/linux/alpha/sysdep.h +++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h @@ -38,15 +38,15 @@ Cambridge, MA 02139, USA. */ # define SYS_ify(syscall_name) __NR_/**/syscall_name #endif -/* - * Define some aliases for syscalls that return two values (in r0 and r1): - */ +/* Define some aliases to make automatic syscall generation work + properly. The SYS_* variants are for the benefit of the files in + sysdeps/unix. */ #define __NR_getpid __NR_getxpid -#define __NR_getppid __NR_getxpid #define __NR_getuid __NR_getxuid -#define __NR_geteuid __NR_getxuid #define __NR_getgid __NR_getxgid -#define __NR_getegid __NR_getxgid +#define SYS_getpid __NR_getxpid +#define SYS_getuid __NR_getxuid +#define SYS_getgid __NR_getxgid /* * Some syscalls no Linux program should know about: From 939caadf20f895a2c9a514f9187b2e3e9437e464 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 19 Jun 1996 06:38:04 +0000 Subject: [PATCH 0704/4487] Mon Jun 10 17:50:31 1996 David Mosberger-Tang * sysdeps/unix/sysv/linux/alpha/sysdep.S, sysdeps/unix/sysv/linux/alpha/brk.S, sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S, sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S, sysdeps/unix/sysv/linux/alpha/llseek.S, sysdeps/unix/sysv/linux/alpha/sigsuspend.S, sysdeps/unix/sysv/linux/alpha/syscall.S: Rename syscall_error to __syscall_error to avoid intruding application name space. * sysdeps/unix/alpha/sysdep.h, sysdeps/alpha/bb_init_func.S, sysdeps/unix/sysv/linux/alpha/brk.S: Use ldiq instead of ldi since latter is illegal under DEC Unix. --- sysdeps/unix/sysv/linux/alpha/brk.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/brk.S b/sysdeps/unix/sysv/linux/alpha/brk.S index 1c4a4f9217..26bf97f2bd 100644 --- a/sysdeps/unix/sysv/linux/alpha/brk.S +++ b/sysdeps/unix/sysv/linux/alpha/brk.S @@ -30,7 +30,7 @@ LEAF(__brk, 0) ldgp gp, 0(t12) .prologue 1 - ldi v0, __NR_brk + ldiq v0, __NR_brk call_pal PAL_callsys /* Correctly handle the brk(0) query case. */ @@ -46,7 +46,7 @@ LEAF(__brk, 0) /* What a horrible way to die. */ error: ldi v0, ENOMEM - jmp zero, syscall_error + jmp zero, __syscall_error END(__brk) From 07f03a4d3850f65108cee6e305b430bbf51d50eb Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 19 Jun 1996 06:38:13 +0000 Subject: [PATCH 0705/4487] Mon Jun 10 17:50:31 1996 David Mosberger-Tang * sysdeps/unix/sysv/linux/alpha/sysdep.S, sysdeps/unix/sysv/linux/alpha/brk.S, sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S, sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S, sysdeps/unix/sysv/linux/alpha/llseek.S, sysdeps/unix/sysv/linux/alpha/sigsuspend.S, sysdeps/unix/sysv/linux/alpha/syscall.S: Rename syscall_error to __syscall_error to avoid intruding application name space. --- .../sysv/linux/alpha/ieee_get_fp_control.S | 4 ++-- .../sysv/linux/alpha/ieee_set_fp_control.S | 4 ++-- sysdeps/unix/sysv/linux/alpha/llseek.S | 10 ++++------ sysdeps/unix/sysv/linux/alpha/sigsuspend.S | 4 ++-- sysdeps/unix/sysv/linux/alpha/syscall.S | 18 +++++++++--------- 5 files changed, 19 insertions(+), 21 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S index 52c945aec2..e09fa738e2 100644 --- a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S +++ b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S @@ -24,7 +24,7 @@ Cambridge, MA 02139, USA. */ LEAF(__ieee_get_fp_control, 8) lda sp, -8(sp) - .prologue 0 + .prologue 1 mov sp, a1 ldi a0, GSI_IEEE_FP_CONTROL @@ -39,7 +39,7 @@ LEAF(__ieee_get_fp_control, 8) error: lda sp, 8(sp) br gp, 1f 1: ldgp gp, 0(gp) - jmp zero, syscall_error + jmp zero, __syscall_error END(__ieee_get_fp_control) diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S index d72585daf1..d748c81142 100644 --- a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S +++ b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S @@ -22,7 +22,7 @@ Cambridge, MA 02139, USA. */ LEAF(__ieee_set_fp_control, 8) lda sp, -8(sp) - .prologue 0 + .prologue 1 stq a0, 0(sp) mov sp, a1 @@ -37,7 +37,7 @@ LEAF(__ieee_set_fp_control, 8) error: br gp, 1f 1: ldgp gp, 0(gp) - jmp zero, syscall_error + jmp zero, __syscall_error END(__ieee_set_fp_control) diff --git a/sysdeps/unix/sysv/linux/alpha/llseek.S b/sysdeps/unix/sysv/linux/alpha/llseek.S index bd8c6595c9..6020f263cd 100644 --- a/sysdeps/unix/sysv/linux/alpha/llseek.S +++ b/sysdeps/unix/sysv/linux/alpha/llseek.S @@ -18,19 +18,17 @@ Cambridge, MA 02139, USA. */ /* For compatibility only: a "long" is 64 bits on the Alpha, so llseek() isn't really needed. But there are some programs out - there who may depend on it being around. -*/ + there who may depend on it being around. */ #include .text ENTRY(llseek) - .prologue 0 - - mov a3, t0 /* save result address */ + .prologue 1 sll a1, 32, a1 /* build a 64 bit ofs out of 32 bit operands */ zap a2, 0xf0, a2 + mov a3, t0 /* save result address */ bis a2, a1, a1 mov a4, a2 /* shift down whence */ @@ -44,6 +42,6 @@ ENTRY(llseek) error: br gp, 1f 1: ldgp gp, 0(gp) - jmp zero, syscall_error + jmp zero, __syscall_error END(llseek) diff --git a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S index 26a1869783..aaae9a308a 100644 --- a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S +++ b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S @@ -24,7 +24,7 @@ Cambridge, MA 02139, USA. */ .text LEAF(sigsuspend, 0) - .prologue 0 + .prologue 1 ldq a0, 0(a0) ldi v0, __NR_sigsuspend @@ -34,6 +34,6 @@ LEAF(sigsuspend, 0) error: br gp, 1f 1: ldgp gp, 0(gp) - jmp zero, syscall_error + jmp zero, __syscall_error END(sigsuspend) diff --git a/sysdeps/unix/sysv/linux/alpha/syscall.S b/sysdeps/unix/sysv/linux/alpha/syscall.S index c80a523239..f1b36e9312 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscall.S +++ b/sysdeps/unix/sysv/linux/alpha/syscall.S @@ -42,19 +42,19 @@ Cambridge, MA 02139, USA. */ LEAF(__syscall, 0) - bis a0, a0, v0 # Syscall number -> v0 - bis a1, a1, a0 # arg1-arg5 -> a0-a4 - bis a2, a2, a1 - bis a3, a3, a2 - bis a4, a4, a3 - bis a5, a5, a4 - - call_pal PAL_callsys # Invoke system call + mov a0, v0 /* Syscall number -> v0 */ + mov a1, a0 /* arg1-arg5 -> a0-a4 */ + mov a2, a1 + mov a3, a2 + mov a4, a3 + mov a5, a4 + + call_pal PAL_callsys /* Invoke system call */ bne a3, error ret error: br gp, 2f 2: ldgp gp, 0(gp) - jmp zero, syscall_error + jmp zero, __syscall_error weak_alias(__syscall, syscall) From 93b781dd8c3968c7ef73cab244889a85d1e09f9f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 19 Jun 1996 06:38:28 +0000 Subject: [PATCH 0706/4487] Thu Jun 13 17:25:11 1996 David Mosberger-Tang * sysdeps/unix/bsd/osf/alpha/start.S (errno): Removed. * sysdeps/unix/sysv/linux/alpha/start.S: Ditto. --- sysdeps/unix/bsd/osf/alpha/start.S | 2 - sysdeps/unix/sysv/linux/alpha/start.S | 95 +++++++++++++-------------- 2 files changed, 45 insertions(+), 52 deletions(-) diff --git a/sysdeps/unix/bsd/osf/alpha/start.S b/sysdeps/unix/bsd/osf/alpha/start.S index f3995a2fd6..d5ff14055b 100644 --- a/sysdeps/unix/bsd/osf/alpha/start.S +++ b/sysdeps/unix/bsd/osf/alpha/start.S @@ -18,8 +18,6 @@ Cambridge, MA 02139, USA. */ #include -.comm errno, 4 - #if 0 .sdata .globl STARTFRM diff --git a/sysdeps/unix/sysv/linux/alpha/start.S b/sysdeps/unix/sysv/linux/alpha/start.S index a7099f6840..bffa913538 100644 --- a/sysdeps/unix/sysv/linux/alpha/start.S +++ b/sysdeps/unix/sysv/linux/alpha/start.S @@ -1,5 +1,5 @@ /* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@zen.org). + Contributed by Richard Henderson 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 @@ -18,81 +18,76 @@ Cambridge, MA 02139, USA. */ #include - .comm errno, 4 -#ifdef __ELF__ - .type errno, @object -#endif - .text -LEAF(__start, 16) - lda sp, -16(sp) - .prologue 0 - - stq zero, 8(sp) /* terminate frame chain */ - - br t0, 1f -1: ldgp gp, 0(t0) - - mov zero, a0 /* establish __fpu_control w/kernel */ - jsr ra, __setfpucw + .globl __start + .align 3 + .ent __start, 0 +__start: + .frame fp, 0, zero + mov zero, fp + br gp, 1f +1: ldgp gp, 0(gp) + .prologue 1 + + /* Save v0. When starting a binary via the dynamic linker, s0 + contains the address of the shared library termination function, + which we will register below with atexit() to be called by exit(). + If we are statically linked, this will be NULL. */ + mov v0, s0 + + /* Do essential libc initialization (sp points to argc, argv, and envp) */ + jsr ra, __libc_init_first ldgp gp, 0(ra) - /* clear out errno. */ - stl zero, (errno) + /* Now that we have the proper stack frame, register library termination + function, if there is any: */ - ldl a0, 16(sp) /* get argc */ - lda a1, 24(sp) /* get argv */ + beq s0, 1f + mov s0, a0 + jsr ra, atexit + ldgp gp, 0(ra) +1: - /* initialize environ: */ - lda t0, environ - s8addq a0, a1, a2 - addq a2, 0x8, a2 - stq a2, 0(t0) + /* Extract the arguments and environment as encoded on the stack. */ + ldl a0, 0(sp) /* get argc */ + lda a1, 8(sp) /* get argv */ + s8addq a0, a1, a2 /* get envp */ + addq a2, 8, a2 + stq a2, _environ - mov a0, s0 + mov a0, s0 /* tuck them away */ mov a1, s1 mov a2, s2 #ifdef HAVE_INITFINI - /* register the _fini sections to ensure destructors get run: */ - lda a0, _fini - jsr ra, atexit - ldgp gp, 0(ra) - - /* Now run the _init section of the program itself. The _init - sections of shared libraries will be run by the dynamic linker. */ + /* Call _init, the entry point to our own .init section. */ jsr ra, _init ldgp gp, 0(ra) - /* initialize constructors: */ - jsr ra, __main + /* Register our .fini section with atexit. */ + lda a0, _fini + jsr ra, atexit ldgp gp, 0(ra) #else - jsr ra, __libc_init + /* initialize constructors: */ + jsr ra, __main ldgp gp, 0(ra) #endif - mov s0, a0 mov s1, a1 mov s2, a2 + /* Call the user's main and exit with its return value. */ jsr ra, main ldgp gp, 0(ra) mov v0, a0 + jsr ra, exit - lda pv, exit - jsr ra, (pv), 1 - ldgp gp, 0(ra) - - /* in case exit returns: */ - -1: ldi v0, __NR_exit - call_pal PAL_callsys - br 1b - - .end __start - + /* Die very horribly if exit returns. Call_pal hlt is callable from + kernel mode only; this will result in an illegal instruction trap. */ + call_pal 0 +END(__start) /* Define a symbol for the first piece of initialized data. */ .data From 2e0bd6649ffc6c3aa4adb896396573e85df31ce1 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 19 Jun 1996 06:38:30 +0000 Subject: [PATCH 0707/4487] Mon Jun 10 17:50:31 1996 David Mosberger-Tang * sysdeps/unix/sysv/linux/alpha/sysdep.S, sysdeps/unix/sysv/linux/alpha/brk.S, sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S, sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S, sysdeps/unix/sysv/linux/alpha/llseek.S, sysdeps/unix/sysv/linux/alpha/sigsuspend.S, sysdeps/unix/sysv/linux/alpha/syscall.S: Rename syscall_error to __syscall_error to avoid intruding application name space. * sysdeps/unix/alpha/sysdep.S: Renamed from sysdeps/unix/sysv/linux/alpha/sysdep.S. This file works for OSF/1 as well. * sysdeps/unix/bsd/osf/alpha/sysdep.S: Remove (note that the EWOULDBLOCK -> EAGAIN mapping was unnecessary since EWOULDBLOCK==EAGAIN under DEC Unix and Linux/Alpha). --- sysdeps/unix/sysv/linux/alpha/sysdep.S | 34 -------------------------- 1 file changed, 34 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/alpha/sysdep.S diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.S b/sysdeps/unix/sysv/linux/alpha/sysdep.S deleted file mode 100644 index 84582f404e..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/sysdep.S +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@zen.org). - -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 -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#define _ERRNO_H -#include - -LEAF(syscall_error, 0) - .prologue 1 - - /* Store return value in errno... */ - ldgp gp, 0(t12) - stl v0, errno - - /* And just kick back a -1. */ - ldi v0, -1 - ret - - .end syscall_error From 73f53f0368d8f63326f79c39e4c223825deebe96 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 19 Jun 1996 06:38:32 +0000 Subject: [PATCH 0708/4487] Mon Jun 10 17:50:31 1996 David Mosberger-Tang * sysdeps/alpha/copysign.c: Remove. --- sysdeps/alpha/copysign.c | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 sysdeps/alpha/copysign.c diff --git a/sysdeps/alpha/copysign.c b/sysdeps/alpha/copysign.c deleted file mode 100644 index 69544b01fb..0000000000 --- a/sysdeps/alpha/copysign.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (C) 1992, 1993, 1995 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#define __NO_MATH_INLINES - -#include - -/* Return X with its sign changed to Y's. */ -__inline double -__copysign (double __x, double __y) -{ - __asm ("cpys %1, %2, %0" : "=f" (__x) : "f" (__y), "f" (__x)); - return __x; -} - -weak_alias (__copysign, copysign) From 645f6bf6249ace1f3037e64ffcd369ec6c071dcf Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 19 Jun 1996 06:38:38 +0000 Subject: [PATCH 0709/4487] Mon Jun 10 17:50:31 1996 David Mosberger-Tang * sysdeps/alpha/divrem.h: Use retaddr instead of ra as the return address register in the .frame directive. --- sysdeps/alpha/divrem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/alpha/divrem.h b/sysdeps/alpha/divrem.h index f296179e99..2951335c49 100644 --- a/sysdeps/alpha/divrem.h +++ b/sysdeps/alpha/divrem.h @@ -125,7 +125,7 @@ clobbered (assembly temporary), anything else must be saved. */ ldq gp, 0x10(sp) lda sp, 0x18(sp) #endif - .frame sp, FRAME_SIZE, ra, 0 + .frame sp, FRAME_SIZE, retaddr, 0 lda sp,-FRAME_SIZE(sp) .prologue 1 stq arg1,0x00(sp) From 49aebbc610041a157d1b4e041e0d8de4927f457f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 19 Jun 1996 06:38:49 +0000 Subject: [PATCH 0710/4487] Mon Jun 10 17:50:31 1996 David Mosberger-Tang * sysdeps/unix/alpha/sysdep.h, sysdeps/alpha/bb_init_func.S, sysdeps/unix/sysv/linux/alpha/brk.S: Use ldiq instead of ldi since latter is illegal under DEC Unix. --- sysdeps/alpha/bb_init_func.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/bb_init_func.S b/sysdeps/alpha/bb_init_func.S index dfa8c1d07b..49be0b2bfe 100644 --- a/sysdeps/alpha/bb_init_func.S +++ b/sysdeps/alpha/bb_init_func.S @@ -53,11 +53,11 @@ init: br pv, 1f 1: ldgp gp, 0(pv) - lda t1, __bb_head + ldiq t1, __bb_head lda t3, _gmonparam ldq t2, 0(t1) ldl t3, 0(t3) /* t3 = _gmonparam.state */ - ldi t0, 1 + lda t0, 1 stq t0, ZERO_WORD(a0) /* blocks->zero_word = 1 */ stq t2, NEXT(a0) /* blocks->next = __bb_head */ stq a0, 0(t1) From 1d47acf2ca8d79683ad2135a57fde892dd9bb24c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 19 Jun 1996 06:47:39 +0000 Subject: [PATCH 0711/4487] Mon Jun 10 17:50:31 1996 David Mosberger-Tang * sysdeps/unix/sysv/linux/alpha/pipe.S: Use PSEUDO. --- sysdeps/unix/sysv/linux/alpha/pipe.S | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/pipe.S b/sysdeps/unix/sysv/linux/alpha/pipe.S index b23803cecd..60334adb45 100644 --- a/sysdeps/unix/sysv/linux/alpha/pipe.S +++ b/sysdeps/unix/sysv/linux/alpha/pipe.S @@ -20,23 +20,11 @@ Cambridge, MA 02139, USA. */ #include - .text -LEAF(__pipe, 0) - .prologue 0 - - ldi v0, __NR_pipe - call_pal PAL_callsys - bne a3, error - +PSEUDO (__pipe, pipe, 0) stl r0, 0(a0) stl r1, 4(a0) mov zero, v0 ret - -error: br gp, 1f -1: ldgp gp, 0(gp) - jmp zero, syscall_error - - END(__pipe) +PSEUDO_END(__pipe) weak_alias (__pipe, pipe) From 91149d1367ebf30dc25fc9ebb556c72b0d2b95cd Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 21 Jun 1996 04:30:50 +0000 Subject: [PATCH 0712/4487] Thu Jun 20 21:19:07 1996 Richard Henderson * sysdeps/alpha/dl-machine.h (elf_alpha_fix_plt): Changed to a 12-byte PLT entry to remove dependency on $gp. Take a new got_addr parameter. (elf_machine_rela): Pass the new parameter. (ELF_MACHINE_RUNTIME_TRAMPOLINE): Do arithmetic for 12-byte PLT. (RTLD_START): Do normal linkage with program entry. --- sysdeps/alpha/dl-machine.h | 56 ++++++++++++++++++++++++++------------ 1 file changed, 39 insertions(+), 17 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index a92c319fc3..29c9a1dd12 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -1,7 +1,7 @@ /* Machine-dependent ELF dynamic relocation inline functions. Alpha version. Copyright (C) 1996 Free Software Foundation, Inc. This file is part of the GNU C Library. -Contributed by Richard Henderson . +Contributed by Richard Henderson . 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 @@ -84,42 +84,64 @@ elf_machine_load_address (void) static inline void elf_alpha_fix_plt(struct link_map *l, const Elf64_Rela *reloc, + Elf64_Addr got_addr, Elf64_Addr value) { const Elf64_Rela *rela_plt; Elf64_Word *plte; - long disp; + long edisp; /* Recover the PLT entry address by calculating reloc's index into the .rela.plt, and finding that entry in the .plt. */ rela_plt = (void *)(l->l_addr + l->l_info[DT_JMPREL]->d_un.d_ptr); - plte = (void *)(l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr); - plte += 2*(reloc - rela_plt) + 8; + plte = (void *)(l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr + 32); + plte += 3 * (reloc - rela_plt); /* Find the displacement from the plt entry to the function. */ - disp = value - (Elf64_Addr)&plte[2]; + edisp = (long)(value - (Elf64_Addr)&plte[3]) / 4; - /* Change "lda $27, ofs($31)" to "ldq $27, ofs($gp)" */ - plte[0] = 0xa77d0000 | (plte[0] & 0xffff); - - if (disp >= -0x100000 && disp < 0x100000) + if (edisp >= -0x100000 && edisp < 0x100000) { /* If we are in range, use br to perfect branch prediction and elide the dependancy on the address load. This case happens, e.g., when a shared library call is resolved to the same library. */ - /* Change "br $0, plt0" to "br $31,function" */ - plte[1] = 0xc3e00000 | (disp & 0x1fffff); + + int hi, lo; + hi = value - (Elf64_Addr)&plte[0]; + lo = (short)hi; + hi = (hi - lo) >> 16; + + /* Emit "ldah $27,H($27)" */ + plte[0] = 0x277b0000 | (hi & 0xffff); + + /* Emit "lda $27,L($27)" */ + plte[1] = 0x237b0000 | (lo & 0xffff); + + /* Emit "br $31,function" */ + plte[2] = 0xc3e00000 | (edisp & 0x1fffff); } else { /* Don't bother with the hint since we already know the hint is wrong. Eliding it prevents the wrong page from getting pulled into the cache. */ - /* Change "br $0, plt0" to "jmp $31,($27)" */ - plte[1] = 0x6bfb0000; + + int hi, lo; + hi = got_addr - (Elf64_Addr)&plte[0]; + lo = (short)hi; + hi = (hi - lo) >> 16; + + /* Emit "ldah $27,H($27)" */ + plte[0] = 0x277b0000 | (hi & 0xffff); + + /* Emit "ldq $27,L($27)" */ + plte[1] = 0xa77b0000 | (lo & 0xffff); + + /* Emit "jmp $31,($27)" */ + plte[2] = 0x6bfb0000; } /* Flush the instruction cache now that we've diddled. Tag it as @@ -172,7 +194,7 @@ elf_machine_rela (struct link_map *map, else if (r_info == R_ALPHA_JMP_SLOT) { *reloc_addr = sym_value; - elf_alpha_fix_plt(map, reloc, sym_value); + elf_alpha_fix_plt(map, reloc, (Elf64_Addr)reloc_addr, sym_value); } else if (r_info == R_ALPHA_REFQUAD) { @@ -285,11 +307,10 @@ elf_machine_runtime_setup (struct link_map *l, int lazy) /* Set up the arguments for _dl_runtime_resolve. */ /* $16 = link_map out of plt0 */ ldq $16, 8($27) - /* $17 = (($0 - 8) - ($1 + 16)) / 8 * sizeof(Elf_Rela) */ + /* $17 = (($28 - 4) - ($27 + 16)) / 12 * sizeof(Elf_Rela) */ subq $28, $27, $28 - subq $28, 24, $28 + subq $28, 20, $28 addq $28, $28, $17 - addq $28, $17, $17 /* Do the fixup */ bsr $26, fixup..ng /* Move the destination address to a safe place. */ @@ -370,4 +391,5 @@ elf_machine_runtime_setup (struct link_map *l, int lazy) 2: /* Pass our finalizer function to the user in $0. */ lda $0, _dl_fini /* Jump to the user's entry point. */ + mov $9, $27 jmp ($9)"); From ae9bd6f8f7abd7ea46b0181999ac26a195e53051 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 23 Jun 1996 01:30:10 +0000 Subject: [PATCH 0713/4487] Sat Jun 22 23:30:07 1996 David Mosberger-Tang * sysdeps/alpha/Makefile (CFLAGS-rtld.c): Add -mbuild-constants only when building ELF version of library. --- sysdeps/alpha/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile index a9f12d1396..6aaedea6fb 100644 --- a/sysdeps/alpha/Makefile +++ b/sysdeps/alpha/Makefile @@ -30,7 +30,9 @@ endif # gnulib ifeq ($(subdir),elf) # The ld.so code cannot use literals until it self-relocates. + ifeq ($(elf),yes) CFLAGS-rtld.c = -mbuild-constants + endif # The rest of ld.so shouldn't use FP regs for block moves so # that the lazy link trampoline doesn't have to save them. sysdep-CFLAGS += -mno-fp-regs From a4c90a421a573d2b7ca88896a851deeaa0cac447 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 25 Jun 1996 03:59:46 +0000 Subject: [PATCH 0714/4487] Mon Jun 24 22:39:12 1996 Richard Henderson * sysdeps/alpha/dl-machine.h (ELF_MACHINE_RUNTIME_TRAMPOLINE): A .plt entry now loads the .rela.plt offset directly rather than making us calculate it. --- sysdeps/alpha/dl-machine.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 29c9a1dd12..f23efe7fcb 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -307,10 +307,8 @@ elf_machine_runtime_setup (struct link_map *l, int lazy) /* Set up the arguments for _dl_runtime_resolve. */ /* $16 = link_map out of plt0 */ ldq $16, 8($27) - /* $17 = (($28 - 4) - ($27 + 16)) / 12 * sizeof(Elf_Rela) */ - subq $28, $27, $28 - subq $28, 20, $28 - addq $28, $28, $17 + /* $17 = offset of reloc entry */ + mov $28, $17 /* Do the fixup */ bsr $26, fixup..ng /* Move the destination address to a safe place. */ From cac963cdc02b3abdad1bee60ac535b9dc599fdfb Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 28 Jun 1996 06:39:22 +0000 Subject: [PATCH 0715/4487] Thu Jun 27 23:43:22 1996 Richard Henderson * sysdeps/alpha/dl-machine.h (elf_machine_rela): The Alpha's address-of operation and plt format conspire to require all dynamic relocs to be resolved to actual symbols not plt entries. --- sysdeps/alpha/dl-machine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index f23efe7fcb..c751936776 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -179,7 +179,7 @@ elf_machine_rela (struct link_map *map, if (resolve) { - loadbase = (*resolve)(&sym, (Elf64_Addr)reloc_addr, + loadbase = (*resolve)(&sym, (Elf64_Addr)reloc_addr, r_info == R_ALPHA_JMP_SLOT); } else From 4a5db9e9b558aa7aae3cc1c5101d1fb518809658 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 28 Jun 1996 08:56:24 +0000 Subject: [PATCH 0716/4487] Thu Jun 27 23:43:22 1996 Richard Henderson * sysdeps/alpha/dl-machine.h (elf_machine_rela): The Alpha's address-of operation and plt format conspire to require all dynamic relocs to be resolved to actual symbols not plt entries. --- sysdeps/alpha/dl-machine.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index c751936776..bc80b5985d 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -179,8 +179,8 @@ elf_machine_rela (struct link_map *map, if (resolve) { - loadbase = (*resolve)(&sym, (Elf64_Addr)reloc_addr, - r_info == R_ALPHA_JMP_SLOT); + loadbase = (*resolve)(&sym, (Elf64_Addr)reloc_addr, + r_info == R_ALPHA_JMP_SLOT); } else loadbase = map->l_addr; From 51ac76881fb0d43afab6e7b178bb7f42f37a150b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 1 Jul 1996 22:16:11 +0000 Subject: [PATCH 0717/4487] Fri Jun 28 16:53:01 1996 David Mosberger-Tang * sysdeps/unix/alpha/sysdep.S: Make ldgp part of the prologue. Fix by Richard Henderson. --- sysdeps/unix/alpha/sysdep.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S index 3e7666ff61..6540b80af6 100644 --- a/sysdeps/unix/alpha/sysdep.S +++ b/sysdeps/unix/alpha/sysdep.S @@ -26,10 +26,10 @@ Cambridge, MA 02139, USA. */ #endif LEAF(__syscall_error, 0) + ldgp gp, 0(t12) .prologue 1 /* Store return value in errno... */ - ldgp gp, 0(t12) stl v0, errno /* And just kick back a -1. */ From 6f0a2dad9f8b1a019e39444e7e0a2202c947c48a Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 1 Jul 1996 22:16:20 +0000 Subject: [PATCH 0718/4487] Fri Jun 28 16:53:01 1996 David Mosberger-Tang * sysdeps/unix/sysv/linux/alpha/init-first.h, sysdeps/unix/sysv/linux/m68k/init-first.h, sysdeps/unix/sysv/linux/i386/init-first.h: New files. * sysdeps/unix/sysv/linux/init-first.c: Use platform-dependent init-first.h to make abstract machine dependent parts of initialization. --- sysdeps/unix/sysv/linux/alpha/init-first.h | 12 ++++++++++++ sysdeps/unix/sysv/linux/m68k/init-first.h | 12 ++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/init-first.h create mode 100644 sysdeps/unix/sysv/linux/m68k/init-first.h diff --git a/sysdeps/unix/sysv/linux/alpha/init-first.h b/sysdeps/unix/sysv/linux/alpha/init-first.h new file mode 100644 index 0000000000..c27c589a28 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/init-first.h @@ -0,0 +1,12 @@ +/* This fragment is invoked in the stack context of program start. + Its job is to set up a pointer to argc as an argument, pass + control to `INIT', and, if necessary, clean up after the call + to leave the stack in the same condition it was found in. */ + +#define SYSDEP_CALL_INIT(NAME, INIT) \ + asm(".globl " #NAME "\n" \ + #NAME ":\n\t" \ + "ldgp $29, 0($27)\n\t" \ + ".prologue 1\n\t" \ + "mov $30, $16\n\t" \ + "br $31, " #INIT "..ng"); diff --git a/sysdeps/unix/sysv/linux/m68k/init-first.h b/sysdeps/unix/sysv/linux/m68k/init-first.h new file mode 100644 index 0000000000..7d8c320b0a --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/init-first.h @@ -0,0 +1,12 @@ +/* This fragment is invoked in the stack context of program start. + Its job is to set up a pointer to argc as an argument, pass + control to `INIT', and, if necessary, clean up after the call + to leave the stack in the same condition it was found in. */ + +#define SYSDEP_CALL_INIT(NAME, INIT) \ + asm(".globl " #NAME "\n\t" \ + #NAME ":\n\t" \ + "pea %sp@(4)\n\t" \ + "jbsr " #INIT "\n\t" \ + "addq #4,%sp\n\t" \ + "rts"); From e23ecc5f378328331fd2018094c096af1095ab88 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 1 Jul 1996 22:16:22 +0000 Subject: [PATCH 0719/4487] Fri Jun 28 16:53:01 1996 David Mosberger-Tang * sysdeps/alpha/dl-machine.h (elf_alpha_fix_plt): Fix typo/extraneous whitespace. --- sysdeps/alpha/dl-machine.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index bc80b5985d..a276551b00 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -106,7 +106,7 @@ elf_alpha_fix_plt(struct link_map *l, if (edisp >= -0x100000 && edisp < 0x100000) { /* If we are in range, use br to perfect branch prediction and - elide the dependancy on the address load. This case happens, + elide the dependency on the address load. This case happens, e.g., when a shared library call is resolved to the same library. */ int hi, lo; @@ -179,7 +179,7 @@ elf_machine_rela (struct link_map *map, if (resolve) { - loadbase = (*resolve)(&sym, (Elf64_Addr)reloc_addr, + loadbase = (*resolve)(&sym, (Elf64_Addr)reloc_addr, r_info == R_ALPHA_JMP_SLOT); } else From 8653138520fce6bac6f18348e4c5655b18394d9b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 1 Jul 1996 22:16:32 +0000 Subject: [PATCH 0720/4487] Fri Jun 28 16:53:01 1996 David Mosberger-Tang * sysdeps/unix/alpha/sysdep.h: Undo PIC-optimization of syscall error handling. It's safer that way. --- sysdeps/unix/alpha/sysdep.h | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h index 4b3f9aa5d8..72d84047c2 100644 --- a/sysdeps/unix/alpha/sysdep.h +++ b/sysdeps/unix/alpha/sysdep.h @@ -99,22 +99,12 @@ name/**/: \ #undef PSEUDO_END -#ifdef PIC -/* When building a shared library, we can use a branch since the text - section of the library is much smaller than 4MB. If we ever break - this assumption, the linker will tell us. */ -# define PSEUDO_END(sym) \ -1996: \ - br zero, __syscall_error; \ - END(sym) -#else -# define PSEUDO_END(sym) \ +#define PSEUDO_END(sym) \ 1996: \ br gp, 2f; \ 2: ldgp gp, 0(gp); \ jmp zero, __syscall_error; \ END(sym) -#endif #define r0 v0 #define r1 a4 From e3e719a49865f939ccf16502db092ee504500629 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 1 Jul 1996 23:04:49 +0000 Subject: [PATCH 0721/4487] . --- sysdeps/unix/sysv/linux/alpha/Dist | 1 + sysdeps/unix/sysv/linux/m68k/Dist | 1 + 2 files changed, 2 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/Dist diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist index 235a443104..5c0e8d1c7e 100644 --- a/sysdeps/unix/sysv/linux/alpha/Dist +++ b/sysdeps/unix/sysv/linux/alpha/Dist @@ -1,3 +1,4 @@ alpha/ptrace.h alpha/regdef.h ieee_get_fp_control.S ieee_set_fp_control.S ioperm.c +init-first.h diff --git a/sysdeps/unix/sysv/linux/m68k/Dist b/sysdeps/unix/sysv/linux/m68k/Dist new file mode 100644 index 0000000000..2c6d09e88f --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/Dist @@ -0,0 +1 @@ +init-first.h From 3ab191fa032d91def77613099bb9fca43e7a3f68 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 3 Jul 1996 18:50:48 +0000 Subject: [PATCH 0722/4487] Wed Jul 3 11:26:28 1996 Roland McGrath * sysdeps/i386/dl-machine.h (elf_machine_rel): Declare _dl_rtld_map as weak. * sysdeps/alpha/dl-machine.h (elf_machine_rela): Likewise. --- sysdeps/alpha/dl-machine.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index a276551b00..bfde6662bf 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -161,6 +161,7 @@ elf_machine_rela (struct link_map *map, { Elf64_Addr *const reloc_addr = (void *)(map->l_addr + reloc->r_offset); unsigned long r_info = ELF64_R_TYPE (reloc->r_info); + weak_symbol (_dl_rtld_map); /* Defined in rtld.c, but not in libc.a. */ /* We cannot use a switch here because we cannot locate the switch jump table until we've self-relocated. */ From 2c73b45b63d1598b87b531f13c28c8e5146bbdbd Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 8 Jul 1996 06:17:19 +0000 Subject: [PATCH 0723/4487] Mon Jul 8 00:11:15 1996 Roland McGrath * sysdeps/alpha/dl-machine.h (elf_machine_rela) [RTLD_BOOTSTRAP]: If this is defined, don't declare _dl_rtld_map as weak, and don't check for MAP pointing to it. RESOLVE is always null in this case, so test with #ifdef instead of if. * libc-symbols.h (symbol_set_declare): Use weak_extern instead of weak_symbol. * csu/initfini.c (_init): Likewise. * locale/setlocale.c (DEFINE_CATEGORY): Likewise. * misc/efgcvt_r.c: Likewise. * sysdeps/alpha/dl-machine.h (elf_machine_rela): Likewise. * sysdeps/i386/dl-machine.h (elf_machine_rel): Likewise. --- sysdeps/alpha/dl-machine.h | 39 ++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index bfde6662bf..8986ed7d58 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -161,7 +161,14 @@ elf_machine_rela (struct link_map *map, { Elf64_Addr *const reloc_addr = (void *)(map->l_addr + reloc->r_offset); unsigned long r_info = ELF64_R_TYPE (reloc->r_info); - weak_symbol (_dl_rtld_map); /* Defined in rtld.c, but not in libc.a. */ +#ifndef RTLD_BOOTSTRAP + /* This is defined in rtld.c, but nowhere in the static libc.a; make the + reference weak so static programs can still link. This declaration + cannot be done when compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP) + because rtld.c contains the common defn for _dl_rtld_map, which is + incompatible with a weak decl in the same file. */ + weak_extern (_dl_rtld_map); +#endif /* We cannot use a switch here because we cannot locate the switch jump table until we've self-relocated. */ @@ -169,38 +176,37 @@ elf_machine_rela (struct link_map *map, if (r_info == R_ALPHA_RELATIVE) { /* Already done in dynamic linker. */ - if (!resolve || map != &_dl_rtld_map) +#ifndef RTLD_BOOTSTRAP + if (map != &_dl_rtld_map) +#endif *reloc_addr += map->l_addr; } else if (r_info == R_ALPHA_NONE) - ; + return; else { Elf64_Addr loadbase, sym_value; - if (resolve) - { - loadbase = (*resolve)(&sym, (Elf64_Addr)reloc_addr, - r_info == R_ALPHA_JMP_SLOT); - } - else - loadbase = map->l_addr; - +#ifndef RTLD_BOOTSTRAP + loadbase = (*resolve)(&sym, (Elf64_Addr)reloc_addr, + r_info == R_ALPHA_JMP_SLOT); +#else + loadbase = map->l_addr; +#endif sym_value = sym ? loadbase + sym->st_value : 0; if (r_info == R_ALPHA_GLOB_DAT) - { - *reloc_addr = sym_value; - } + *reloc_addr = sym_value; else if (r_info == R_ALPHA_JMP_SLOT) { *reloc_addr = sym_value; - elf_alpha_fix_plt(map, reloc, (Elf64_Addr)reloc_addr, sym_value); + elf_alpha_fix_plt (map, reloc, (Elf64_Addr) reloc_addr, sym_value); } else if (r_info == R_ALPHA_REFQUAD) { sym_value += *reloc_addr; - if (resolve && map == &_dl_rtld_map) +#ifndef RTLD_BOOTSTRAP + if (map == &_dl_rtld_map) { /* Undo the relocation done here during bootstrapping. Now we will relocate anew, possibly using a binding @@ -213,6 +219,7 @@ elf_machine_rela (struct link_map *map, sym_value -= dlsymtab[ELF64_R_SYM(reloc->r_info)].st_value; } else +#endif sym_value += reloc->r_addend; *reloc_addr = sym_value; } From 4be08629d9a2179e560450ec19e108d4d15d15f8 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 10 Jul 1996 14:42:15 +0000 Subject: [PATCH 0724/4487] Mon Jul 8 21:18:40 1996 Andreas Schwab * sysdeps/m68k/dl-machine.h (RESOLVE): New macro, defined differently based on [RTLD_BOOTSTRAP]. (elf_machine_rela): Use it instead of the fn ptr arg directly. --- sysdeps/m68k/dl-machine.h | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index 0f64d686ed..a11ff237ad 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -81,38 +81,38 @@ elf_machine_rela (struct link_map *map, Elf32_Addr *const reloc_addr = (void *) (map->l_addr + reloc->r_offset); Elf32_Addr loadbase; +#ifdef RTLD_BOOTSTRAP +#define RESOLVE(noplt) map->l_addr +#else +#define RESOLVE(noplt) (*resolve) (&sym, (Elf32_Addr) reloc_addr, noplt) +#endif + switch (ELF32_R_TYPE (reloc->r_info)) { case R_68K_COPY: - loadbase = (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0); + loadbase = RESOLVE (0); memcpy (reloc_addr, (void *) (loadbase + sym->st_value), sym->st_size); break; case R_68K_GLOB_DAT: - loadbase = (resolve ? (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0) : - /* RESOLVE is null during bootstrap relocation. */ - map->l_addr); + loadbase = RESOLVE (0); *reloc_addr = sym ? (loadbase + sym->st_value) : 0; break; case R_68K_JMP_SLOT: - loadbase = (resolve ? (*resolve) (&sym, (Elf32_Addr) reloc_addr, 1) : - /* RESOLVE is null during bootstrap relocation. */ - map->l_addr); + loadbase = RESOLVE (1); *reloc_addr = sym ? (loadbase + sym->st_value) : 0; break; case R_68K_8: - loadbase = (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0); + loadbase = RESOLVE (0); *(char *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) + reloc->r_addend); break; case R_68K_16: - loadbase = (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0); + loadbase = RESOLVE (0); *(short *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) + reloc->r_addend); break; case R_68K_32: - loadbase = (resolve ? (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0) : - /* RESOLVE is null during bootstrap relocation. */ - map->l_addr); + loadbase = RESOLVE (0); *reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) + reloc->r_addend); break; @@ -120,19 +120,19 @@ elf_machine_rela (struct link_map *map, *reloc_addr = map->l_addr + reloc->r_addend; break; case R_68K_PC8: - loadbase = (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0); + loadbase = RESOLVE (0); *(char *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) + reloc->r_addend - (Elf32_Addr) reloc_addr); break; case R_68K_PC16: - loadbase = (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0); + loadbase = RESOLVE (0); *(short *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) + reloc->r_addend - (Elf32_Addr) reloc_addr); break; case R_68K_PC32: - loadbase = (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0); + loadbase = RESOLVE (0); *reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) + reloc->r_addend - (Elf32_Addr) reloc_addr); @@ -143,6 +143,8 @@ elf_machine_rela (struct link_map *map, assert (! "unexpected dynamic reloc type"); break; } + +#undef RESOLVE } static inline void From adc7a4e678dbf44c983325c15ddb8b7082d9db26 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 14 Jul 1996 05:28:09 +0000 Subject: [PATCH 0725/4487] Fri Jul 5 18:44:55 1996 David Mosberger-Tang * sysdeps/unix/sysv/linux/alpha/ioperm.c (port_to_cpu_addr): Size shift amount for Jensen must be 5 not 4. --- sysdeps/unix/sysv/linux/alpha/ioperm.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c index b9630a8273..cee5f482bb 100644 --- a/sysdeps/unix/sysv/linux/alpha/ioperm.c +++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c @@ -116,13 +116,9 @@ static inline unsigned long port_to_cpu_addr (unsigned long port, int iosys, int size) { if (iosys == IOSYS_JENSEN) - { - return (port << 7) + ((size - 1) << 4) + io.base; - } + return (port << 7) + ((size - 1) << 5) + io.base; else - { - return (port << 5) + ((size - 1) << 3) + io.base; - } + return (port << 5) + ((size - 1) << 3) + io.base; } @@ -303,17 +299,18 @@ init_iosys (void) } else { - char name[256]; FILE * fp; fp = fopen (PATH_CPUINFO, "r"); if (!fp) return -1; - while ((n = fscanf (fp, "%256[^:]: %256[^\n]\n", name, systype)) != EOF) + while ((n = fscanf (fp, "system type : %256[^\n]\n", systype)) + != EOF) { - if (n == 2 && strncmp (name, "system type", 11) == 0) { + if (n == 1) break; - } + else + fgets (systype, 256, fp); } fclose(fp); From de4931d1d7e6b5f07728f378b24259565b06e556 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 16 Jul 1996 06:12:11 +0000 Subject: [PATCH 0726/4487] Tue Jul 16 00:31:31 1996 Richard Henderson * sysdeps/alpha/dl-machine.h: Mirror Roland's changes to i386/dl-machine.h of 960713. --- sysdeps/alpha/dl-machine.h | 344 +++++++++++++++++++------------------ 1 file changed, 173 insertions(+), 171 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 8986ed7d58..b900b769ee 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -18,14 +18,16 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* This was written in the absense of an ABI -- don't expect +/* This was written in the absence of an ABI -- don't expect it to remain unchanged. */ +#ifndef dl_machine_h +#define dl_machine_h 1 + #define ELF_MACHINE_NAME "alpha" #include #include -#include /* Return nonzero iff E_MACHINE is compatible with the running host. */ @@ -35,7 +37,6 @@ elf_machine_matches_host (Elf64_Word e_machine) return e_machine == EM_ALPHA; } - /* Return the run-time address of the _GLOBAL_OFFSET_TABLE_. Must be inlined in a function which uses global data. */ static inline Elf64_Addr * @@ -45,7 +46,6 @@ elf_machine_got (void) return (Elf64_Addr *)(gp - 0x8000); } - /* Return the run-time load address of the shared object. */ static inline Elf64_Addr elf_machine_load_address (void) @@ -78,6 +78,164 @@ elf_machine_load_address (void) return dot + 4 + zero_disp; } +/* Set up the loaded object described by L so its unrelocated PLT + entries will jump to the on-demand fixup code in dl-runtime.c. */ + +static inline void +elf_machine_runtime_setup (struct link_map *l, int lazy) +{ + Elf64_Addr plt; + extern void _dl_runtime_resolve (void); + + if (l->l_info[DT_JMPREL] && lazy) + { + /* The GOT entries for the functions in the PLT have not been + filled in yet. Their initial contents are directed to the + PLT which arranges for the dynamic linker to be called. */ + plt = l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr; + + /* This function will be called to perform the relocation. */ + *(Elf64_Addr *)(plt + 16) = (Elf64_Addr) &_dl_runtime_resolve; + + /* Identify this shared object */ + *(Elf64_Addr *)(plt + 24) = (Elf64_Addr) l; + } +} + +/* This code is used in dl-runtime.c to call the `fixup' function + and then redirect to the address it returns. */ +#define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ( \ +"/* Trampoline for _dl_runtime_resolver */ + .globl _dl_runtime_resolve + .ent _dl_runtime_resolve +_dl_runtime_resolve: + lda $sp, -168($sp) + .frame $sp, 168, $26 + /* Preserve all registers that C normally doesn't. */ + stq $26, 0($sp) + stq $0, 8($sp) + stq $1, 16($sp) + stq $2, 24($sp) + stq $3, 32($sp) + stq $4, 40($sp) + stq $5, 48($sp) + stq $6, 56($sp) + stq $7, 64($sp) + stq $8, 72($sp) + stq $16, 80($sp) + stq $17, 88($sp) + stq $18, 96($sp) + stq $19, 104($sp) + stq $20, 112($sp) + stq $21, 120($sp) + stq $22, 128($sp) + stq $23, 136($sp) + stq $24, 144($sp) + stq $25, 152($sp) + stq $29, 160($sp) + .mask 0x27ff01ff, -168 + /* Set up our $gp */ + br $gp, .+4 + ldgp $gp, 0($gp) + .prologue 1 + /* Set up the arguments for _dl_runtime_resolve. */ + /* $16 = link_map out of plt0 */ + ldq $16, 8($27) + /* $17 = offset of reloc entry */ + mov $28, $17 + /* Do the fixup */ + bsr $26, fixup..ng + /* Move the destination address to a safe place. */ + mov $0, $27 + /* Restore program registers. */ + ldq $26, 0($sp) + ldq $0, 8($sp) + ldq $1, 16($sp) + ldq $2, 24($sp) + ldq $3, 32($sp) + ldq $4, 40($sp) + ldq $5, 48($sp) + ldq $6, 56($sp) + ldq $7, 64($sp) + ldq $8, 72($sp) + ldq $16, 80($sp) + ldq $17, 88($sp) + ldq $18, 96($sp) + ldq $19, 104($sp) + ldq $20, 112($sp) + ldq $21, 120($sp) + ldq $22, 128($sp) + ldq $23, 136($sp) + ldq $24, 144($sp) + ldq $25, 152($sp) + ldq $29, 160($sp) + /* Clean up and turn control to the destination */ + lda $sp, 168($sp) + jmp $31, ($27) + .end _dl_runtime_resolve"); + +/* The PLT uses Elf_Rel relocs. */ +#define elf_machine_relplt elf_machine_rela + +/* Mask identifying addresses reserved for the user program, + where the dynamic linker should not map anything. */ +/* FIXME */ +#define ELF_MACHINE_USER_ADDRESS_MASK (~0x1FFFFFFFFUL) + +/* Initial entry point code for the dynamic linker. + The C function `_dl_start' is the real entry point; + its return value is the user program's entry point. */ + +#define RTLD_START asm ("\ +.text + .globl _start + .globl _dl_start_user +_start: + br $gp,.+4 + ldgp $gp, 0($gp) + /* Pass pointer to argument block to _dl_start. */ + mov $sp, $16 + bsr $26, _dl_start..ng +_dl_start_user: + /* Save the user entry point address in s0. */ + mov $0, $9 + /* See if we were run as a command with the executable file + name as an extra leading argument. If so, adjust the stack + pointer to skip _dl_skip_args words. */ + ldl $1, _dl_skip_args + beq $1, 0f + ldq $2, 0($sp) + subq $2, $1, $2 + s8addq $1, $sp, $sp + stq $2, 0($sp) + /* Load _dl_default_scope[2] into s1 to pass to _dl_init_next. */ +0: ldq $10, _dl_default_scope+16 + /* Call _dl_init_next to return the address of an initalizer + function to run. */ +1: mov $10, $16 + jsr $26, _dl_init_next + ldgp $gp, 0($26) + beq $0, 2f + mov $0, $27 + jsr $26, ($0) + ldgp $gp, 0($26) + br 1b +2: /* Pass our finalizer function to the user in $0. */ + lda $0, _dl_fini + /* Jump to the user's entry point. */ + mov $9, $27 + jmp ($9)"); + +/* Nonzero iff TYPE describes relocation of a PLT entry, so + PLT entries should not be allowed to define the value. */ +#define elf_machine_pltrel_p(type) ((type) == R_ALPHA_JMP_SLOT) + +/* The alpha never uses Elf64_Rel relocations. */ +#define ELF_MACHINE_NO_REL 1 + +#endif /* !dl_machine_h */ + +#ifdef RESOLVE /* Fix up the instructions of a PLT entry to invoke the function rather than the dynamic linker. */ @@ -154,13 +312,11 @@ elf_alpha_fix_plt(struct link_map *l, static inline void elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc, - const Elf64_Sym *sym, - Elf64_Addr (*resolve) (const Elf64_Sym **ref, - Elf64_Addr reloc_addr, - int noplt)) + const Elf64_Sym *sym) { - Elf64_Addr *const reloc_addr = (void *)(map->l_addr + reloc->r_offset); - unsigned long r_info = ELF64_R_TYPE (reloc->r_info); + Elf64_Addr * const reloc_addr = (void *)(map->l_addr + reloc->r_offset); + unsigned long const r_info = ELF64_R_TYPE (reloc->r_info); + #ifndef RTLD_BOOTSTRAP /* This is defined in rtld.c, but nowhere in the static libc.a; make the reference weak so static programs can still link. This declaration @@ -175,8 +331,8 @@ elf_machine_rela (struct link_map *map, if (r_info == R_ALPHA_RELATIVE) { - /* Already done in dynamic linker. */ #ifndef RTLD_BOOTSTRAP + /* Already done in dynamic linker. */ if (map != &_dl_rtld_map) #endif *reloc_addr += map->l_addr; @@ -187,12 +343,8 @@ elf_machine_rela (struct link_map *map, { Elf64_Addr loadbase, sym_value; -#ifndef RTLD_BOOTSTRAP - loadbase = (*resolve)(&sym, (Elf64_Addr)reloc_addr, - r_info == R_ALPHA_JMP_SLOT); -#else - loadbase = map->l_addr; -#endif + loadbase = RESOLVE (&sym, (Elf64_Addr)reloc_addr, + r_info == R_ALPHA_JMP_SLOT); sym_value = sym ? loadbase + sym->st_value : 0; if (r_info == R_ALPHA_GLOB_DAT) @@ -233,8 +385,8 @@ elf_machine_rela (struct link_map *map, static inline void elf_machine_lazy_rel (struct link_map *map, const Elf64_Rela *reloc) { - Elf64_Addr *const reloc_addr = (void *)(map->l_addr + reloc->r_offset); - unsigned long r_info = ELF64_R_TYPE (reloc->r_info); + Elf64_Addr * const reloc_addr = (void *)(map->l_addr + reloc->r_offset); + unsigned long const r_info = ELF64_R_TYPE (reloc->r_info); if (r_info == R_ALPHA_JMP_SLOT) { @@ -243,159 +395,9 @@ elf_machine_lazy_rel (struct link_map *map, const Elf64_Rela *reloc) *reloc_addr += map->l_addr; } else if (r_info == R_ALPHA_NONE) - ; + return; else assert (! "unexpected PLT reloc type"); } -/* The alpha never uses Elf_Rel relocations. */ -#define ELF_MACHINE_NO_REL 1 - - -/* Set up the loaded object described by L so its unrelocated PLT - entries will jump to the on-demand fixup code in dl-runtime.c. */ - -static inline void -elf_machine_runtime_setup (struct link_map *l, int lazy) -{ - Elf64_Addr plt; - extern void _dl_runtime_resolve (void); - - if (l->l_info[DT_JMPREL] && lazy) - { - /* The GOT entries for the functions in the PLT have not been - filled in yet. Their initial contents are directed to the - PLT which arranges for the dynamic linker to be called. */ - plt = l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr; - - /* This function will be called to perform the relocation. */ - *(Elf64_Addr *)(plt + 16) = (Elf64_Addr) &_dl_runtime_resolve; - - /* Identify this shared object */ - *(Elf64_Addr *)(plt + 24) = (Elf64_Addr) l; - } -} - -/* This code is used in dl-runtime.c to call the `fixup' function - and then redirect to the address it returns. */ -#define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ( \ -"/* Trampoline for _dl_runtime_resolver */ - .globl _dl_runtime_resolve - .ent _dl_runtime_resolve -_dl_runtime_resolve: - lda $sp, -168($sp) - .frame $sp, 168, $26 - /* Preserve all registers that C normally doesn't. */ - stq $26, 0($sp) - stq $0, 8($sp) - stq $1, 16($sp) - stq $2, 24($sp) - stq $3, 32($sp) - stq $4, 40($sp) - stq $5, 48($sp) - stq $6, 56($sp) - stq $7, 64($sp) - stq $8, 72($sp) - stq $16, 80($sp) - stq $17, 88($sp) - stq $18, 96($sp) - stq $19, 104($sp) - stq $20, 112($sp) - stq $21, 120($sp) - stq $22, 128($sp) - stq $23, 136($sp) - stq $24, 144($sp) - stq $25, 152($sp) - stq $29, 160($sp) - .mask 0x27ff01ff, -168 - /* Set up our $gp */ - br $gp, .+4 - ldgp $gp, 0($gp) - .prologue 1 - /* Set up the arguments for _dl_runtime_resolve. */ - /* $16 = link_map out of plt0 */ - ldq $16, 8($27) - /* $17 = offset of reloc entry */ - mov $28, $17 - /* Do the fixup */ - bsr $26, fixup..ng - /* Move the destination address to a safe place. */ - mov $0, $27 - /* Restore program registers. */ - ldq $26, 0($sp) - ldq $0, 8($sp) - ldq $1, 16($sp) - ldq $2, 24($sp) - ldq $3, 32($sp) - ldq $4, 40($sp) - ldq $5, 48($sp) - ldq $6, 56($sp) - ldq $7, 64($sp) - ldq $8, 72($sp) - ldq $16, 80($sp) - ldq $17, 88($sp) - ldq $18, 96($sp) - ldq $19, 104($sp) - ldq $20, 112($sp) - ldq $21, 120($sp) - ldq $22, 128($sp) - ldq $23, 136($sp) - ldq $24, 144($sp) - ldq $25, 152($sp) - ldq $29, 160($sp) - /* Clean up and turn control to the destination */ - lda $sp, 168($sp) - jmp $31, ($27) - .end _dl_runtime_resolve"); - -/* The PLT uses Elf_Rel relocs. */ -#define elf_machine_relplt elf_machine_rela - -/* Mask identifying addresses reserved for the user program, - where the dynamic linker should not map anything. */ -/* FIXME */ -#define ELF_MACHINE_USER_ADDRESS_MASK (~0x1FFFFFFFFUL) - -/* Initial entry point code for the dynamic linker. - The C function `_dl_start' is the real entry point; - its return value is the user program's entry point. */ - -#define RTLD_START asm ("\ -.text - .globl _start - .globl _dl_start_user -_start: - br $gp,.+4 - ldgp $gp, 0($gp) - /* Pass pointer to argument block to _dl_start. */ - mov $sp, $16 - bsr $26, _dl_start..ng -_dl_start_user: - /* Save the user entry point address in s0. */ - mov $0, $9 - /* See if we were run as a command with the executable file - name as an extra leading argument. If so, adjust the stack - pointer to skip _dl_skip_args words. */ - ldl $1, _dl_skip_args - beq $1, 0f - ldq $2, 0($sp) - subq $2, $1, $2 - s8addq $1, $sp, $sp - stq $2, 0($sp) - /* Load _dl_default_scope[2] into s1 to pass to _dl_init_next. */ -0: ldq $10, _dl_default_scope+16 - /* Call _dl_init_next to return the address of an initalizer - function to run. */ -1: mov $10, $16 - jsr $26, _dl_init_next - ldgp $gp, 0($26) - beq $0, 2f - mov $0, $27 - jsr $26, ($0) - ldgp $gp, 0($26) - br 1b -2: /* Pass our finalizer function to the user in $0. */ - lda $0, _dl_fini - /* Jump to the user's entry point. */ - mov $9, $27 - jmp ($9)"); +#endif /* RESOLVE */ From c6195ef6326e2691b89635cf8f14813b123b7d9f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 17 Jul 1996 16:14:42 +0000 Subject: [PATCH 0727/4487] Tue Jul 16 01:52:42 1996 Andreas Schwab * sysdeps/m68k/dl-machine.h: Follow Jul 14 change in sysdeps/i386/dl-machine.h. --- sysdeps/m68k/dl-machine.h | 204 ++++++++++++++++++-------------------- 1 file changed, 98 insertions(+), 106 deletions(-) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index a11ff237ad..0cb0b34f35 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -17,12 +17,12 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#ifndef dl_machine_h +#define dl_machine_h + #define ELF_MACHINE_NAME "m68k" #include -#include -#include - /* Return nonzero iff E_MACHINE is compatible with the running host. */ static inline int @@ -68,109 +68,6 @@ elf_machine_load_address (void) ((dynamic_info)[DT_RELA]->d_un.d_ptr += sizeof (Elf32_Rela), \ (dynamic_info)[DT_RELASZ]->d_un.d_val -= sizeof (Elf32_Rela)) -/* Perform the relocation specified by RELOC and SYM (which is fully resolved). - MAP is the object containing the reloc. */ - -static inline void -elf_machine_rela (struct link_map *map, - const Elf32_Rela *reloc, const Elf32_Sym *sym, - Elf32_Addr (*resolve) (const Elf32_Sym **ref, - Elf32_Addr reloc_addr, - int noplt)) -{ - Elf32_Addr *const reloc_addr = (void *) (map->l_addr + reloc->r_offset); - Elf32_Addr loadbase; - -#ifdef RTLD_BOOTSTRAP -#define RESOLVE(noplt) map->l_addr -#else -#define RESOLVE(noplt) (*resolve) (&sym, (Elf32_Addr) reloc_addr, noplt) -#endif - - switch (ELF32_R_TYPE (reloc->r_info)) - { - case R_68K_COPY: - loadbase = RESOLVE (0); - memcpy (reloc_addr, (void *) (loadbase + sym->st_value), sym->st_size); - break; - case R_68K_GLOB_DAT: - loadbase = RESOLVE (0); - *reloc_addr = sym ? (loadbase + sym->st_value) : 0; - break; - case R_68K_JMP_SLOT: - loadbase = RESOLVE (1); - *reloc_addr = sym ? (loadbase + sym->st_value) : 0; - break; - case R_68K_8: - loadbase = RESOLVE (0); - *(char *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) - + reloc->r_addend); - break; - case R_68K_16: - loadbase = RESOLVE (0); - *(short *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) - + reloc->r_addend); - break; - case R_68K_32: - loadbase = RESOLVE (0); - *reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) - + reloc->r_addend); - break; - case R_68K_RELATIVE: - *reloc_addr = map->l_addr + reloc->r_addend; - break; - case R_68K_PC8: - loadbase = RESOLVE (0); - *(char *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) - + reloc->r_addend - - (Elf32_Addr) reloc_addr); - break; - case R_68K_PC16: - loadbase = RESOLVE (0); - *(short *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) - + reloc->r_addend - - (Elf32_Addr) reloc_addr); - break; - case R_68K_PC32: - loadbase = RESOLVE (0); - *reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) - + reloc->r_addend - - (Elf32_Addr) reloc_addr); - break; - case R_68K_NONE: /* Alright, Wilbur. */ - break; - default: - assert (! "unexpected dynamic reloc type"); - break; - } - -#undef RESOLVE -} - -static inline void -elf_machine_lazy_rel (struct link_map *map, const Elf32_Rela *reloc) -{ - Elf32_Addr *const reloc_addr = (void *) (map->l_addr + reloc->r_offset); - switch (ELF32_R_TYPE (reloc->r_info)) - { - case R_68K_NONE: - break; - case R_68K_JMP_SLOT: - *reloc_addr += map->l_addr; - break; - default: - assert (! "unexpected PLT reloc type"); - break; - } -} - -/* Nonzero iff TYPE describes relocation of a PLT entry, so - PLT entries should not be allowed to define the value. */ -#define elf_machine_pltrel_p(type) ((type) == R_68K_JMP_SLOT) - -/* The m68k never uses Elf32_Rel relocations. */ -#define ELF_MACHINE_NO_REL 1 - /* Set up the loaded object described by L so its unrelocated PLT entries will jump to the on-demand fixup code in dl-runtime.c. */ @@ -283,3 +180,98 @@ elf_machine_runtime_setup (struct link_map *l, int lazy) move.l %sp, %fp | Jump to the user's entry point. jmp (%a4)"); + +/* Nonzero iff TYPE describes relocation of a PLT entry, so + PLT entries should not be allowed to define the value. */ +#define elf_machine_pltrel_p(type) ((type) == R_68K_JMP_SLOT) + +/* The m68k never uses Elf32_Rel relocations. */ +#define ELF_MACHINE_NO_REL 1 + +#endif /* !dl_machine_h */ + +#ifdef RESOLVE + +/* Perform the relocation specified by RELOC and SYM (which is fully resolved). + MAP is the object containing the reloc. */ + +static inline void +elf_machine_rela (struct link_map *map, + const Elf32_Rela *reloc, const Elf32_Sym *sym) +{ + Elf32_Addr *const reloc_addr = (void *) (map->l_addr + reloc->r_offset); + Elf32_Addr loadbase; + + switch (ELF32_R_TYPE (reloc->r_info)) + { + case R_68K_COPY: + loadbase = RESOLVE (&sym, (Elf32_Addr) reloc_addr, 0); + memcpy (reloc_addr, (void *) (loadbase + sym->st_value), sym->st_size); + break; + case R_68K_GLOB_DAT: + loadbase = RESOLVE (&sym, (Elf32_Addr) reloc_addr, 0); + *reloc_addr = sym ? (loadbase + sym->st_value) : 0; + break; + case R_68K_JMP_SLOT: + loadbase = RESOLVE (&sym, (Elf32_Addr) reloc_addr, 1); + *reloc_addr = sym ? (loadbase + sym->st_value) : 0; + break; + case R_68K_8: + loadbase = RESOLVE (&sym, (Elf32_Addr) reloc_addr, 0); + *(char *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) + + reloc->r_addend); + break; + case R_68K_16: + loadbase = RESOLVE (&sym, (Elf32_Addr) reloc_addr, 0); + *(short *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) + + reloc->r_addend); + break; + case R_68K_32: + loadbase = RESOLVE (&sym, (Elf32_Addr) reloc_addr, 0); + *reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) + + reloc->r_addend); + break; + case R_68K_RELATIVE: + *reloc_addr = map->l_addr + reloc->r_addend; + break; + case R_68K_PC8: + loadbase = RESOLVE (&sym, (Elf32_Addr) reloc_addr, 0); + *(char *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) + + reloc->r_addend - (Elf32_Addr) reloc_addr); + break; + case R_68K_PC16: + loadbase = RESOLVE (&sym, (Elf32_Addr) reloc_addr, 0); + *(short *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) + + reloc->r_addend - (Elf32_Addr) reloc_addr); + break; + case R_68K_PC32: + loadbase = RESOLVE (&sym, (Elf32_Addr) reloc_addr, 0); + *reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) + + reloc->r_addend - (Elf32_Addr) reloc_addr); + break; + case R_68K_NONE: /* Alright, Wilbur. */ + break; + default: + assert (! "unexpected dynamic reloc type"); + break; + } + +#undef RESOLVE +} + +static inline void +elf_machine_lazy_rel (struct link_map *map, const Elf32_Rela *reloc) +{ + Elf32_Addr *const reloc_addr = (void *) (map->l_addr + reloc->r_offset); + switch (ELF32_R_TYPE (reloc->r_info)) + { + case R_68K_JMP_SLOT: + *reloc_addr += map->l_addr; + break; + default: + assert (! "unexpected PLT reloc type"); + break; + } +} + +#endif /* RESOLVE */ From 490915ed85ba98ee4ca7711323e9f5fdedd3dd46 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 17 Jul 1996 19:31:44 +0000 Subject: [PATCH 0728/4487] Wed Jul 17 17:08:48 1996 Roland McGrath * sysdeps/m68k/Makefile (crypt): Variable removed. * sysdeps/sparc/Makefile: Likewise. --- sysdeps/m68k/Makefile | 9 --------- 1 file changed, 9 deletions(-) diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile index ffdc68274e..a5e9064767 100644 --- a/sysdeps/m68k/Makefile +++ b/sysdeps/m68k/Makefile @@ -16,15 +16,6 @@ # not, write to the Free Software Foundation, Inc., 675 Mass Ave, # Cambridge, MA 02139, USA. -# This uses MIT assembler syntax. We have no convenient -# way to choose a sysdep file based on MIT vs Motorola syntax. -# No existing m68k ports use Motorola syntax. - -# Don't use crypt/crypt.sun3.S. It's not pic-clean. -ifneq (yes,$(build-shared)) -crypt := crypt.sun3 -endif - # The mpn functions need this. All existing 68k ports use MIT syntax. If # a new port wants to use Motorola or Sony syntax, it can redefine this # variable. From aa6ab54663aa7bda5648633d291e14e5ca300f77 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 18 Jul 1996 08:41:17 +0000 Subject: [PATCH 0729/4487] Wed Jul 17 10:54:20 1996 David Mosberger-Tang * sysdeps/unix/sysv/linux/alpha/start.S: Move to ... * sysdeps/alpha/elf/start.S: here. --- sysdeps/{unix/sysv/linux/alpha => alpha/elf}/start.S | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) rename sysdeps/{unix/sysv/linux/alpha => alpha/elf}/start.S (94%) diff --git a/sysdeps/unix/sysv/linux/alpha/start.S b/sysdeps/alpha/elf/start.S similarity index 94% rename from sysdeps/unix/sysv/linux/alpha/start.S rename to sysdeps/alpha/elf/start.S index bffa913538..c534d6987b 100644 --- a/sysdeps/unix/sysv/linux/alpha/start.S +++ b/sysdeps/alpha/elf/start.S @@ -1,5 +1,6 @@ -/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc. - Contributed by Richard Henderson +/* Startup code for Alpha/ELF. +Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc. +Contributed by Richard Henderson 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 From 7cc46c197625caabaa012dc6c48ae86a98e92510 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 18 Jul 1996 08:41:25 +0000 Subject: [PATCH 0730/4487] Wed Jul 17 10:54:20 1996 David Mosberger-Tang * sysdeps/unix/alpha/sysdep.S: Make errno a bss symbol, not a common symbol (makes errno accessible from gdb). --- sysdeps/unix/alpha/sysdep.S | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S index 6540b80af6..2d05305ce0 100644 --- a/sysdeps/unix/alpha/sysdep.S +++ b/sysdeps/unix/alpha/sysdep.S @@ -20,11 +20,15 @@ Cambridge, MA 02139, USA. */ #define _ERRNO_H #include - .comm errno, 4 + .section .bss + .globl errno +errno: .space 4 #ifdef __ELF__ - .type errno, @object + .type errno, @object + .size errno, 4 #endif + .text LEAF(__syscall_error, 0) ldgp gp, 0(t12) .prologue 1 From 4f895a140a73247f4f62be2103e1eca2784f7f70 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 22 Jul 1996 13:43:16 +0000 Subject: [PATCH 0731/4487] Sat Jul 20 14:03:45 1996 Andreas Schwab * sysdeps/m68k/dl-machine.h (elf_machine_rela): Remove bogus #undef RESOLVE. --- sysdeps/m68k/dl-machine.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index 0cb0b34f35..4642f00c63 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -255,8 +255,6 @@ elf_machine_rela (struct link_map *map, assert (! "unexpected dynamic reloc type"); break; } - -#undef RESOLVE } static inline void From 8db38e6c0f1bfbaae3bba20c16a915556a58d8fa Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 26 Jul 1996 04:37:17 +0000 Subject: [PATCH 0732/4487] Fri Jul 26 00:36:50 1996 Roland McGrath * sysdeps/mips/dl-machine.h: New file, contributed by Kazumoto Kojima . --- sysdeps/mips/dl-machine.h | 466 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 466 insertions(+) create mode 100644 sysdeps/mips/dl-machine.h diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h new file mode 100644 index 0000000000..822d9ab504 --- /dev/null +++ b/sysdeps/mips/dl-machine.h @@ -0,0 +1,466 @@ +/* Machine-dependent ELF dynamic relocation inline functions. mips version. +Copyright (C) 1996 Free Software Foundation, Inc. +This file is part of the GNU C Library. +Contributed by Kazumoto Kojima . + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#define ELF_MACHINE_NAME "MIPS" + +#include +#include +#include +#include +#include +#include + +/* DT_MIPS macro ranslate a processor specific dynamic tag to the index + in l_info array. */ +#define DT_MIPS(x) (DT_MIPS_##x - DT_LOPROC + DT_NUM) + +#if 1 +/* XXX If FLAGS has the MAP_ALIGN bit, we need 64k alignement. */ +#ifndef MAP_ALIGN +#define MAP_ALIGN 0x1000 +#endif +#define ELF_MACHINE_ALIGN_MASK(flags) ((flags & MAP_ALIGN) ? 0xffff : 0) +#endif + +/* If there is a DT_MIPS_RLD_MAP entry in the dynamic section, fill it in + with the run-time address of the r_debug structure */ +#define ELF_MACHINE_SET_DEBUG(l,r) \ +do { if ((l)->l_info[DT_MIPS (RLD_MAP)]) \ + *(ElfW(Addr) *)((l)->l_info[DT_MIPS (RLD_MAP)]->d_un.d_ptr) = \ + (ElfW(Addr)) (r); \ + } while (0) + +/* Return nonzero iff E_MACHINE is compatible with the running host. */ +static inline int +elf_machine_matches_host (ElfW(Half) e_machine) +{ + switch (e_machine) + { + case EM_MIPS: + case EM_MIPS_RS4_BE: + return 1; + default: + return 0; + } +} + +static inline ElfW(Addr) * +elf_mips_got_from_gpreg (ElfW(Addr) gpreg) +{ + /* FIXME: the offset of gp from GOT may be system-dependent. */ + return (ElfW(Addr) *) (gpreg - 0x7ff0); +} + +/* Return the run-time address of the _GLOBAL_OFFSET_TABLE_. + Must be inlined in a function which uses global data. */ +static inline ElfW(Addr) * +elf_machine_got (void) +{ + register ElfW(Addr) gpreg asm ("$28"); + return elf_mips_got_from_gpreg (gpreg); +} + + +/* Return the run-time load address of the shared object. */ +static inline ElfW(Addr) +elf_machine_load_address (void) +{ + ElfW(Addr) addr; + asm (" .set noreorder\n" + " la %0, here\n" + " bltzal $0, here\n" + " nop\n" + "here: subu %0, $31, %0\n" + " .set reorder\n" + : "=r" (addr)); + return addr; +} + +/* Perform the relocation specified by RELOC and SYM (which is fully resolved). + MAP is the object containing the reloc. */ + +static inline void +elf_machine_rel (struct link_map *map, + const ElfW(Rel) *reloc, const ElfW(Sym) *sym, + ElfW(Addr) (*resolve) (const ElfW(Sym) **ref, + ElfW(Addr) reloc_addr, + int noplt)) +{ + ElfW(Addr) *const reloc_addr = (void *) (map->l_addr + reloc->r_offset); + ElfW(Addr) loadbase, undo; + + switch (ELFW(R_TYPE) (reloc->r_info)) + { + case R_MIPS_REL32: + if (ELFW(ST_BIND) (sym->st_info) == STB_LOCAL + && (ELFW(ST_TYPE) (sym->st_info) == STT_SECTION + || ELFW(ST_TYPE) (sym->st_info) == STT_NOTYPE)) + *reloc_addr += map->l_addr; + else + { + if (resolve && map == &_dl_rtld_map) + /* Undo the relocation done here during bootstrapping. Now we will + relocate it anew, possibly using a binding found in the user + program or a loaded library rather than the dynamic linker's + built-in definitions used while loading those libraries. */ + undo = map->l_addr + sym->st_value; + else + undo = 0; + loadbase = (resolve ? (*resolve) (&sym, (ElfW(Addr)) reloc_addr, 0) : + /* RESOLVE is null during bootstrap relocation. */ + map->l_addr); + *reloc_addr += (sym ? (loadbase + sym->st_value) : 0) - undo; + } + break; + case R_MIPS_NONE: /* Alright, Wilbur. */ + break; + default: + assert (! "unexpected dynamic reloc type"); + break; + } +} + +static inline void +elf_machine_lazy_rel (struct link_map *map, const ElfW(Rel) *reloc) +{ + /* Do nothing. */ +} + +/* The MSB of got[1] of a gnu object is set to identify gnu objects. */ +#define ELF_MIPS_GNU_GOT1_MASK 0x80000000 + +/* Relocate GOT. */ +static void +elf_machine_got_rel (struct link_map *map) +{ + ElfW(Addr) *got; + ElfW(Sym) *sym; + int i, n; + struct link_map **scope; + const char *strtab + = ((void *) map->l_addr + map->l_info[DT_STRTAB]->d_un.d_ptr); + + ElfW(Addr) resolve (const ElfW(Sym) *sym) + { + ElfW(Sym) *ref = sym; + ElfW(Addr) sym_loadaddr; + sym_loadaddr = _dl_lookup_symbol (strtab + sym->st_name, &ref, scope, + map->l_name, 0, 1); + return (ref)? sym_loadaddr + ref->st_value: 0; + } + + got = (ElfW(Addr) *) ((void *) map->l_addr + + map->l_info[DT_PLTGOT]->d_un.d_ptr); + + /* got[0] is reserved. got[1] is also reserved for the dynamic object + generated by gnu ld. Skip these reserved entries from relocation. */ + i = (got[1] & ELF_MIPS_GNU_GOT1_MASK)? 2: 1; + n = map->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; + /* Add the run-time display to all local got entries. */ + while (i < n) + got[i++] += map->l_addr; + + /* Set scope. */ + scope = _dl_object_relocation_scope (map); + + /* Handle global got entries. */ + got += n; + sym = (ElfW(Sym) *) ((void *) map->l_addr + + map->l_info[DT_SYMTAB]->d_un.d_ptr); + sym += map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val; + i = (map->l_info[DT_MIPS (SYMTABNO)]->d_un.d_val + - map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val); + + while (i--) + { + if (sym->st_shndx == SHN_UNDEF) + { + if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC) + { + if (sym->st_value /* && maybe_stub (sym->st_value) */) + *got = sym->st_value + map->l_addr; + else + *got = resolve (sym); + } + else /* if (*got == 0 || *got == QS) */ + *got = resolve (sym); + } + else if (sym->st_shndx == SHN_COMMON) + *got = resolve (sym); + else if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC + && *got != sym->st_value + /* && maybe_stub (*got) */) + *got += map->l_addr; + else if (ELFW(ST_TYPE) (sym->st_info) == STT_SECTION + && ELFW(ST_BIND) (sym->st_info) == STB_GLOBAL) + { + if (sym->st_other == 0 && sym->st_shndx == SHN_ABS) + *got = sym->st_value + map->l_addr; /* only for _gp_disp */ + /* else SGI stuff ignored */ + } + else + *got = resolve (sym); + + got++; + sym++; + } + + *_dl_global_scope_end = NULL; + + return; +} + +/* The MIPS never uses Elfxx_Rela relocations. */ +#define ELF_MACHINE_NO_RELA 1 + +/* Set up the loaded object described by L so its stub function + will jump to the on-demand fixup code in dl-runtime.c. */ + +static inline void +elf_machine_runtime_setup (struct link_map *l, int lazy) +{ + ElfW(Addr) *got; + extern void _dl_runtime_resolve (ElfW(Word)); + + if (lazy) + { + /* The GOT entries for functions have not yet been filled in. + Their initial contents will arrange when called to put an + offset into the .dynsym section in t8, the return address + in t7 and then jump to _GLOBAL_OFFSET_TABLE[0]. */ + got = (ElfW(Addr) *) ((void *) l->l_addr + + l->l_info[DT_PLTGOT]->d_un.d_ptr); + + /* This function will get called to fix up the GOT entry indicated by + the register t8, and then jump to the resolved address. */ + got[0] = (ElfW(Addr)) &_dl_runtime_resolve; + + /* Store l to _GLOBAL_OFFSET_TABLE[1] for gnu object. The MSB + of got[1] of a gnu object is set to identify gnu objects. + Where we can store l for non gnu objects? XXX */ + if ((got[1] & ELF_MIPS_GNU_GOT1_MASK) != 0) + got[1] = (ElfW(Addr)) ((unsigned) l | ELF_MIPS_GNU_GOT1_MASK); + else + ; /* Do nothing. */ + } + + /* Relocate global offset table. */ + elf_machine_got_rel (l); +} + +/* Get link_map for this object. */ +static inline struct link_map * +elf_machine_runtime_link_map (ElfW(Addr) gpreg) +{ + ElfW(Addr) *got = elf_mips_got_from_gpreg (gpreg); + ElfW(Word) g1; + + g1 = ((ElfW(Word) *) got)[1]; + + /* got[1] is reserved to keep its link map address for the shared + object generated by gnu linker. If not so, we must search GOT + in object list slowly. XXX */ + if ((g1 & ELF_MIPS_GNU_GOT1_MASK) != 0) + return (struct link_map *) (g1 & ~ELF_MIPS_GNU_GOT1_MASK); + else + { + struct link_map *l = _dl_loaded; + while (l) + { + if (got == (ElfW(Addr) *) ((void *) l->l_addr + + l->l_info[DT_PLTGOT]->d_un.d_ptr)) + return l; + l = l->l_next; + } + } + _dl_signal_error (0, NULL, "cannot find runtime link map"); +} + +/* Mips has no PLT but define elf_machine_relplt to be elf_machine_rel. */ +#define elf_machine_relplt elf_machine_rel + +/* Define mips specific runtime resolver. The function __dl_runtime_resolve + is called from assembler function _dl_runtime_resolve which converts + special argument registers t7 ($15) and t8 ($24): + t7 address to return to the caller of the function + t8 index for this function symbol in .dynsym + to usual c arguments. */ + +#define ELF_MACHINE_RUNTIME_TRAMPOLINE \ +static ElfW(Addr) \ +__dl_runtime_resolve (ElfW(Word) sym_index,\ + ElfW(Word) return_address,\ + ElfW(Addr) old_gpreg)\ +{\ + struct link_map *l = elf_machine_runtime_link_map (old_gpreg);\ + const ElfW(Sym) *const symtab\ + = (const ElfW(Sym) *) (l->l_addr + l->l_info[DT_SYMTAB]->d_un.d_ptr);\ + const char *strtab\ + = (void *) (l->l_addr + l->l_info[DT_STRTAB]->d_un.d_ptr);\ + const ElfW(Addr) *got\ + = (const ElfW(Addr) *) (l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr);\ + const ElfW(Word) local_gotno\ + = (const ElfW(Word)) l->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val;\ + const ElfW(Word) gotsym\ + = (const ElfW(Word)) l->l_info[DT_MIPS (GOTSYM)]->d_un.d_val;\ + const ElfW(Sym) *definer;\ + ElfW(Addr) loadbase;\ + ElfW(Addr) funcaddr;\ + struct link_map **scope;\ +\ + /* Look up the symbol's run-time value. */\ + scope = _dl_object_relocation_scope (l);\ + definer = &symtab[sym_index];\ +\ + loadbase = _dl_lookup_symbol (strtab + definer->st_name, &definer,\ + scope, l->l_name, 0, 1);\ +\ + *_dl_global_scope_end = NULL;\ +\ + /* Apply the relocation with that value. */\ + funcaddr = loadbase + definer->st_value;\ + *(got + local_gotno + sym_index - gotsym) = funcaddr;\ +\ + return funcaddr;\ +}\ +\ +asm ("\n\ + .text\n\ + .align 2\n\ + .globl _dl_runtime_resolve\n\ + .type _dl_runtime_resolve,@function\n\ + .ent _dl_runtime_resolve\n\ +_dl_runtime_resolve:\n\ + .set noreorder\n\ + # Save old GP to $3.\n\ + move $3,$28\n\ + # Modify t9 ($25) so as to point .cpload instruction.\n\ + addu $25,8\n\ + # Compute GP.\n\ + .cpload $25\n\ + .set reorder\n\ + # Save arguments and sp value in stack.\n\ + subu $29, 40\n\ + .cprestore 32\n\ + sw $15, 36($29)\n\ + sw $4, 12($29)\n\ + sw $5, 16($29)\n\ + sw $6, 20($29)\n\ + sw $7, 24($29)\n\ + sw $16, 28($29)\n\ + move $16, $29\n\ + move $4, $24\n\ + move $5, $15\n\ + move $6, $3\n\ + jal __dl_runtime_resolve\n\ + move $29, $16\n\ + lw $31, 36($29)\n\ + lw $4, 12($29)\n\ + lw $5, 16($29)\n\ + lw $6, 20($29)\n\ + lw $7, 24($29)\n\ + lw $16, 28($29)\n\ + addu $29, 40\n\ + move $25, $2\n\ + jr $25\n\ + .end _dl_runtime_resolve\n\ +"); + +/* Mask identifying addresses reserved for the user program, + where the dynamic linker should not map anything. */ +#define ELF_MACHINE_USER_ADDRESS_MASK 0x00000000UL + + + +/* Initial entry point code for the dynamic linker. + The C function `_dl_start' is the real entry point; + its return value is the user program's entry point. */ + +#define RTLD_START asm ("\ + .text\n\ + .globl _start\n\ + .globl _dl_start_user\n\ + .ent _start\n\ +_start:\n\ + .set noreorder\n\ + bltzal $0, 0f\n\ + nop\n\ +0: .cpload $31\n\ + .set reorder\n\ + # i386 ABI book says that the first entry of GOT holds\n\ + # the address of the dynamic structure. Though MIPS ABI\n\ + # doesn't say nothing about this, I emulate this here.\n\ + la $4, _DYNAMIC\n\ + sw $4, -0x7ff0($28)\n\ + move $4, $29\n\ + jal _dl_start\n\ + # Get the value of label '_dl_start_user' in t9 ($25).\n\ + la $25, _dl_start_user\n\ +_dl_start_user:\n\ + .set noreorder\n\ + .cpload $25\n\ + .set reorder\n\ + move $16, $28\n\ + # Save the user entry point address in saved register.\n\ + move $17, $2\n\ + # See if we were run as a command with the executable file\n\ + # name as an extra leading argument.\n\ + lw $2, _dl_skip_args\n\ + beq $2, $0, 1f\n\ + # Load the original argument count.\n\ + lw $4, 0($29)\n\ + # Subtract _dl_skip_args from it.\n\ + subu $4, $2\n\ + # Adjust the stack pointer to skip _dl_skip_args words.\n\ + sll $2,2\n\ + addu $29, $2\n\ + # Save back the modified argument count.\n\ + sw $4, 0($29)\n\ + # Get _dl_default_scope[2] as argument in _dl_init_next call below.\n\ +1: la $2, _dl_default_scope\n\ + lw $4, 8($2)\n\ + # Call _dl_init_next to return the address of an initializer\n\ + # function to run.\n\ + jal _dl_init_next\n\ + move $28, $16\n\ + # Check for zero return, when out of initializers.\n\ + beq $2, $0, 2f\n\ + # Call the shared object initializer function.\n\ + move $25, $2\n\ + lw $4, 0($29)\n\ + lw $5, 4($29)\n\ + lw $6, 8($29)\n\ + lw $7, 12($29)\n\ + jalr $25\n\ + move $28, $16\n\ + # Loop to call _dl_init_next for the next initializer.\n\ + b 1b\n\ + # Pass our finalizer function to the user in ra.\n\ +2: la $31, _dl_fini\n\ + # Jump to the user entry point.\n\ + move $25, $17\n\ + lw $4, 0($29)\n\ + lw $5, 4($29)\n\ + lw $6, 8($29)\n\ + lw $7, 12($29)\n\ + jr $25\n\ + .end _start\n\ +"); + From 3887a8dca9937f602c27150b4483d03ee8353eac Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 28 Jul 1996 23:43:36 +0000 Subject: [PATCH 0733/4487] Sun Jul 28 19:26:40 1996 David S. Miller * sysdeps/mips/dl-machine.h (ELF_MACHINE_RUNTIME_TRAMPOLINE): Declare _dl_runtime_resolve with __attribute__ ((unused)) so the compiler doesn't elide it. (elf_machine_rel): Follow Jul 14 change in sysdeps/i386/dl-machine.h. --- sysdeps/mips/dl-machine.h | 120 ++++++++++++++++++++------------------ 1 file changed, 64 insertions(+), 56 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 822d9ab504..50e9f64665 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -67,14 +67,13 @@ elf_mips_got_from_gpreg (ElfW(Addr) gpreg) /* FIXME: the offset of gp from GOT may be system-dependent. */ return (ElfW(Addr) *) (gpreg - 0x7ff0); } - /* Return the run-time address of the _GLOBAL_OFFSET_TABLE_. Must be inlined in a function which uses global data. */ static inline ElfW(Addr) * elf_machine_got (void) { - register ElfW(Addr) gpreg asm ("$28"); - return elf_mips_got_from_gpreg (gpreg); + register ElfW(Addr) gp asm ("$28"); + return (ElfW(Addr) *) (gp - 0x7ff0); } @@ -93,56 +92,6 @@ elf_machine_load_address (void) return addr; } -/* Perform the relocation specified by RELOC and SYM (which is fully resolved). - MAP is the object containing the reloc. */ - -static inline void -elf_machine_rel (struct link_map *map, - const ElfW(Rel) *reloc, const ElfW(Sym) *sym, - ElfW(Addr) (*resolve) (const ElfW(Sym) **ref, - ElfW(Addr) reloc_addr, - int noplt)) -{ - ElfW(Addr) *const reloc_addr = (void *) (map->l_addr + reloc->r_offset); - ElfW(Addr) loadbase, undo; - - switch (ELFW(R_TYPE) (reloc->r_info)) - { - case R_MIPS_REL32: - if (ELFW(ST_BIND) (sym->st_info) == STB_LOCAL - && (ELFW(ST_TYPE) (sym->st_info) == STT_SECTION - || ELFW(ST_TYPE) (sym->st_info) == STT_NOTYPE)) - *reloc_addr += map->l_addr; - else - { - if (resolve && map == &_dl_rtld_map) - /* Undo the relocation done here during bootstrapping. Now we will - relocate it anew, possibly using a binding found in the user - program or a loaded library rather than the dynamic linker's - built-in definitions used while loading those libraries. */ - undo = map->l_addr + sym->st_value; - else - undo = 0; - loadbase = (resolve ? (*resolve) (&sym, (ElfW(Addr)) reloc_addr, 0) : - /* RESOLVE is null during bootstrap relocation. */ - map->l_addr); - *reloc_addr += (sym ? (loadbase + sym->st_value) : 0) - undo; - } - break; - case R_MIPS_NONE: /* Alright, Wilbur. */ - break; - default: - assert (! "unexpected dynamic reloc type"); - break; - } -} - -static inline void -elf_machine_lazy_rel (struct link_map *map, const ElfW(Rel) *reloc) -{ - /* Do nothing. */ -} - /* The MSB of got[1] of a gnu object is set to identify gnu objects. */ #define ELF_MIPS_GNU_GOT1_MASK 0x80000000 @@ -159,7 +108,7 @@ elf_machine_got_rel (struct link_map *map) ElfW(Addr) resolve (const ElfW(Sym) *sym) { - ElfW(Sym) *ref = sym; + const ElfW(Sym) *ref = sym; ElfW(Addr) sym_loadaddr; sym_loadaddr = _dl_lookup_symbol (strtab + sym->st_name, &ref, scope, map->l_name, 0, 1); @@ -304,6 +253,10 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg) to usual c arguments. */ #define ELF_MACHINE_RUNTIME_TRAMPOLINE \ +/* This is called from assembly stubs below which the compiler can't see. */ \ +static ElfW(Addr) __dl_runtime_resolve (ElfW(Word), ElfW(Word), ElfW(Addr)) \ + __attribute__ ((unused)); \ +\ static ElfW(Addr) \ __dl_runtime_resolve (ElfW(Word) sym_index,\ ElfW(Word) return_address,\ @@ -387,8 +340,6 @@ _dl_runtime_resolve:\n\ where the dynamic linker should not map anything. */ #define ELF_MACHINE_USER_ADDRESS_MASK 0x00000000UL - - /* Initial entry point code for the dynamic linker. The C function `_dl_start' is the real entry point; its return value is the user program's entry point. */ @@ -464,3 +415,60 @@ _dl_start_user:\n\ .end _start\n\ "); +#ifdef RESOLVE + +/* Perform the relocation specified by RELOC and SYM (which is fully resolved). + MAP is the object containing the reloc. */ + +static inline void +elf_machine_rel (struct link_map *map, + const ElfW(Rel) *reloc, const ElfW(Sym) *sym) +{ + ElfW(Addr) *const reloc_addr = (void *) (map->l_addr + reloc->r_offset); + ElfW(Addr) loadbase, undo; + + switch (ELFW(R_TYPE) (reloc->r_info)) + { + case R_MIPS_REL32: + if (ELFW(ST_BIND) (sym->st_info) == STB_LOCAL + && (ELFW(ST_TYPE) (sym->st_info) == STT_SECTION + || ELFW(ST_TYPE) (sym->st_info) == STT_NOTYPE)) + *reloc_addr += map->l_addr; + else + { +#ifndef RTLD_BOOTSTRAP + /* This is defined in rtld.c, but nowhere in the static libc.a; + make the reference weak so static programs can still link. This + declaration cannot be done when compiling rtld.c (i.e. #ifdef + RTLD_BOOTSTRAP) because rtld.c contains the common defn for + _dl_rtld_map, which is incompatible with a weak decl in the same + file. */ + weak_extern (_dl_rtld_map); + if (map == &_dl_rtld_map) + /* Undo the relocation done here during bootstrapping. Now we will + relocate it anew, possibly using a binding found in the user + program or a loaded library rather than the dynamic linker's + built-in definitions used while loading those libraries. */ + undo = map->l_addr + sym->st_value; + else +#endif + undo = 0; + loadbase = RESOLVE (&sym, (ElfW(Addr)) reloc_addr, 0); + *reloc_addr += (sym ? (loadbase + sym->st_value) : 0) - undo; + } + break; + case R_MIPS_NONE: /* Alright, Wilbur. */ + break; + default: + assert (! "unexpected dynamic reloc type"); + break; + } +} + +static inline void +elf_machine_lazy_rel (struct link_map *map, const ElfW(Rel) *reloc) +{ + /* Do nothing. */ +} + +#endif /* RESOLVE */ From ad1a0a0a648eac6ea60d65d0bb2f0e433c43ff3f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 6 Aug 1996 01:19:53 +0000 Subject: [PATCH 0734/4487] Update UD main archive 960805 --- sysdeps/unix/bsd/sun/sunos4/resourcebits.h | 10 ++- sysdeps/unix/sysv/linux/alpha/resourcebits.h | 63 +++++++++++++++++++ sysdeps/unix/sysv/linux/m68k/resourcebits.h | 60 ++++++++++++++++++ sysdeps/unix/sysv/linux/mips/resourcebits.h | 65 ++++++++++++++++++++ sysdeps/unix/sysv/sysv4/getdtsz.c | 2 - 5 files changed, 197 insertions(+), 3 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/alpha/resourcebits.h create mode 100644 sysdeps/unix/sysv/linux/m68k/resourcebits.h create mode 100644 sysdeps/unix/sysv/linux/mips/resourcebits.h delete mode 100644 sysdeps/unix/sysv/sysv4/getdtsz.c diff --git a/sysdeps/unix/bsd/sun/sunos4/resourcebits.h b/sysdeps/unix/bsd/sun/sunos4/resourcebits.h index b5d3704e6c..485dec9b81 100644 --- a/sysdeps/unix/bsd/sun/sunos4/resourcebits.h +++ b/sysdeps/unix/bsd/sun/sunos4/resourcebits.h @@ -1,5 +1,5 @@ /* Bit values for resource limits. SunOS 4 version. -Copyright (C) 1994 Free Software Foundation, Inc. +Copyright (C) 1994, 1996 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 @@ -27,22 +27,30 @@ enum __rlimit_resource { /* Per-process CPU limit, in seconds. */ RLIMIT_CPU, +#define RLIMIT_CPU RLIMIT_CPU /* Largest file that can be created, in bytes. */ RLIMIT_FSIZE, +#define RLIMIT_FSIZE RLIMIT_FSIZE /* Maximum size of data segment, in bytes. */ RLIMIT_DATA, +#define RLIMIT_DATA RLIMIT_DATA /* Maximum size of stack segment, in bytes. */ RLIMIT_STACK, +#define RLIMIT_STACK RLIMIT_STACK /* Largest core file that can be created, in bytes. */ RLIMIT_CORE, +#define RLIMIT_CORE RLIMIT_CORE /* Largest resident set size, in bytes. This affects swapping; processes that are exceeding their resident set size will be more likely to have physical memory taken from them. */ RLIMIT_RSS, +#define RLIMIT_RSS RLIMIT_RSS /* Number of open files. */ RLIMIT_NOFILE, RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */ +#defin RLIMIT_NOFILE RLIMIT_NOFILE +#defin RLIMIT_OFILE RLIMIT_OFILE RLIM_NLIMITS }; diff --git a/sysdeps/unix/sysv/linux/alpha/resourcebits.h b/sysdeps/unix/sysv/linux/alpha/resourcebits.h new file mode 100644 index 0000000000..a53d523a1e --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/resourcebits.h @@ -0,0 +1,63 @@ +/* Bit values for resource limits. Linux/Alpha version. +Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* These are the values for Linux/Alpha. */ + +/* Kinds of resource limit. */ +enum __rlimit_resource + { + /* Per-process CPU limit, in seconds. */ + RLIMIT_CPU, +#define RLIMIT_CPU RLIMIT_CPU + /* Largest file that can be created, in bytes. */ + RLIMIT_FSIZE, +#define RLIMIT_FSIZE RLIMIT_FSIZE + /* Maximum size of data segment, in bytes. */ + RLIMIT_DATA, +#define RLIMIT_DATA RLIMIT_DATA + /* Maximum size of stack segment, in bytes. */ + RLIMIT_STACK, +#define RLIMIT_STACK RLIMIT_STACK + /* Largest core file that can be created, in bytes. */ + RLIMIT_CORE, +#define RLIMIT_CORE RLIMIT_CORE + /* Largest resident set size, in bytes. + This affects swapping; processes that are exceeding their + resident set size will be more likely to have physical memory + taken from them. */ + RLIMIT_RSS, +#define RLIMIT_RSS RLIMIT_RSS + /* Number of open files. */ + RLIMIT_OFILE, +#define RLIMIT_OFILE RLIMIT_OFILE + RLIMIT_NOFILE = RLIMIT_OFILE, /* Another name for the same thing. */ +#define RLIMIT_NOFILE RLIMIT_NOFILE + /* Address space limit. */ + RLIMIT_AS, +#define RLIMIT_AS RLIMIT_AS + /* Number of processes. */ + RLIMIT_NPROC, +#define RLIMIT_NPROC RLIMIT_NPROC + /* Locked-in-memory address space. */ + RLIMIT_MEMLOCK, +#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK + + RLIMIT_NLIMITS, /* Number of limit flavors. */ + RLIM_NLIMITS = RLIMIT_NLIMITS /* Traditional name for same. */ + }; diff --git a/sysdeps/unix/sysv/linux/m68k/resourcebits.h b/sysdeps/unix/sysv/linux/m68k/resourcebits.h new file mode 100644 index 0000000000..65cc6e550a --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/resourcebits.h @@ -0,0 +1,60 @@ +/* Bit values for resource limits. Linux/m68k version. +Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* These are the values for Linux/m68k. */ + +/* Kinds of resource limit. */ +enum __rlimit_resource + { + /* Per-process CPU limit, in seconds. */ + RLIMIT_CPU, +#define RLIMIT_CPU RLIMIT_CPU + /* Largest file that can be created, in bytes. */ + RLIMIT_FSIZE, +#define RLIMIT_FSIZE RLIMIT_FSIZE + /* Maximum size of data segment, in bytes. */ + RLIMIT_DATA, +#define RLIMIT_DATA RLIMIT_DATA + /* Maximum size of stack segment, in bytes. */ + RLIMIT_STACK, +#define RLIMIT_STACK RLIMIT_STACK + /* Largest core file that can be created, in bytes. */ + RLIMIT_CORE, +#define RLIMIT_CORE RLIMIT_CORE + /* Largest resident set size, in bytes. + This affects swapping; processes that are exceeding their + resident set size will be more likely to have physical memory + taken from them. */ + RLIMIT_RSS, +#define RLIMIT_RSS RLIMIT_RSS + /* Number of processes. */ + RLIMIT_NPROC, +#define RLIMIT_NPROC RLIMIT_NPROC + /* Number of open files. */ + RLIMIT_OFILE, +#define RLIMIT_OFILE RLIMIT_OFILE + RLIMIT_NOFILE = RLIMIT_OFILE, /* Another name for the same thing. */ +#define RLIMIT_NOFILE RLIMIT_NOFILE + /* Locked-in-memory address space. */ + RLIMIT_MEMLOCK, +#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK + + RLIMIT_NLIMITS, /* Number of limit flavors. */ + RLIM_NLIMITS = RLIMIT_NLIMITS /* Traditional name for same. */ + }; diff --git a/sysdeps/unix/sysv/linux/mips/resourcebits.h b/sysdeps/unix/sysv/linux/mips/resourcebits.h new file mode 100644 index 0000000000..095f40b09c --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/resourcebits.h @@ -0,0 +1,65 @@ +/* Bit values for resource limits. Linux/MIPS version. +Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* These are the values for Linux/MIPS. */ + +/* Kinds of resource limit. */ +enum __rlimit_resource + { + /* Per-process CPU limit, in seconds. */ + RLIMIT_CPU, +#define RLIMIT_CPU RLIMIT_CPU + /* Largest file that can be created, in bytes. */ + RLIMIT_FSIZE, +#define RLIMIT_FSIZE RLIMIT_FSIZE + /* Maximum size of data segment, in bytes. */ + RLIMIT_DATA, +#define RLIMIT_DATA RLIMIT_DATA + /* Maximum size of stack segment, in bytes. */ + RLIMIT_STACK, +#define RLIMIT_STACK RLIMIT_STACK + /* Largest core file that can be created, in bytes. */ + RLIMIT_CORE, +#define RLIMIT_CORE RLIMIT_CORE + /* Number of open files. */ + RLIMIT_OFILE, +#define RLIMIT_OFILE RLIMIT_OFILE + RLIMIT_NOFILE = RLIMIT_OFILE, /* Another name for the same thing. */ +#define RLIMIT_NOFILE RLIMIT_NOFILE + /* Address space limit. */ + RLIMIT_AS, +#define RLIMIT_AS RLIMIT_AS + RLIMIT_VMEM = RLIMIT_AS, +#define RLIMIT_VMEM RLIMIT_VMEM + /* Largest resident set size, in bytes. + This affects swapping; processes that are exceeding their + resident set size will be more likely to have physical memory + taken from them. */ + RLIMIT_RSS, +#define RLIMIT_RSS RLIMIT_RSS + /* Number of processes. */ + RLIMIT_NPROC, +#define RLIMIT_NPROC RLIMIT_NPROC + /* Locked-in-memory address space. */ + RLIMIT_MEMLOCK, +#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK + + RLIMIT_NLIMITS, /* Number of limit flavors. */ + RLIM_NLIMITS = RLIMIT_NLIMITS /* Traditional name for same. */ + }; diff --git a/sysdeps/unix/sysv/sysv4/getdtsz.c b/sysdeps/unix/sysv/sysv4/getdtsz.c deleted file mode 100644 index c1ae6108fb..0000000000 --- a/sysdeps/unix/sysv/sysv4/getdtsz.c +++ /dev/null @@ -1,2 +0,0 @@ -/* Solaris uses sysconf ala POSIX.1. */ -#include From b870eeda1d1292ae2c803d74d274f6a290a30978 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 8 Aug 1996 00:35:28 +0000 Subject: [PATCH 0735/4487] update from main archive 960807 --- sysdeps/alpha/_mcount.S | 11 ++-- sysdeps/alpha/bb_init_func.S | 12 ++-- sysdeps/alpha/bsd-_setjmp.S | 7 ++- sysdeps/alpha/bsd-setjmp.S | 7 ++- sysdeps/alpha/divrem.h | 11 ++-- sysdeps/alpha/ffs.S | 4 +- sysdeps/alpha/memchr.S | 36 +++++------ sysdeps/alpha/setjmp.S | 5 +- sysdeps/alpha/strlen.S | 82 +++++++++++++------------- sysdeps/unix/sysv/linux/alpha/brk.S | 11 +++- sysdeps/unix/sysv/linux/alpha/ioperm.c | 3 +- 11 files changed, 97 insertions(+), 92 deletions(-) diff --git a/sysdeps/alpha/_mcount.S b/sysdeps/alpha/_mcount.S index e813ebdd58..6c4af3f233 100644 --- a/sysdeps/alpha/_mcount.S +++ b/sysdeps/alpha/_mcount.S @@ -28,20 +28,17 @@ compiler treats those calls as if they were instructions. In particular, it doesn't save any of the temporary registers (caller saved registers). It is therefore necessary to preserve all caller-saved registers as well - + Upon entering _mcount, register $at holds the return address and ra holds the return address of the function's caller (selfpc and frompc, respectively in gmon.c language...). */ #include -#undef ret /* discard `ret' as defined in sysdep.h */ - .set noat .set noreorder LEAF(_mcount, 0xb0) -weak_alias (_mcount, mcount) .prologue 0 subq sp, 0xb0, sp @@ -69,8 +66,6 @@ weak_alias (_mcount, mcount) stq t5, 0x70(sp) stq t6, 0x78(sp) - lda pv, __mcount - stq t7, 0x80(sp) stq t8, 0x88(sp) stq t9, 0x90(sp) @@ -78,7 +73,7 @@ weak_alias (_mcount, mcount) stq t11, 0xa0(sp) stq v0, 0xa8(sp) - jsr ra, (pv), __mcount + jsr ra, __mcount ldq a0, 0x00(sp) ldq a1, 0x08(sp) @@ -108,3 +103,5 @@ weak_alias (_mcount, mcount) ret zero,($at),1 END(_mcount) + +weak_alias (_mcount, mcount) diff --git a/sysdeps/alpha/bb_init_func.S b/sysdeps/alpha/bb_init_func.S index 49be0b2bfe..dcd4eac231 100644 --- a/sysdeps/alpha/bb_init_func.S +++ b/sysdeps/alpha/bb_init_func.S @@ -40,10 +40,10 @@ ENTRY(__bb_init_func) ldq t0, ZERO_WORD(a0) /* t0 <- blocks->zero_word */ beq t0, init /* not initialized yet -> */ ret - + END(__bb_init_func) -.ent init + .ent init init: .frame sp, 0x38, ra, 0 subq sp, 0x38, sp @@ -61,8 +61,8 @@ init: stq t0, ZERO_WORD(a0) /* blocks->zero_word = 1 */ stq t2, NEXT(a0) /* blocks->next = __bb_head */ stq a0, 0(t1) - bne t2, leave - beq t3, leave /* t3 == GMON_PROF_ON? yes -> */ + bne t2, $leave + beq t3, $leave /* t3 == GMON_PROF_ON? yes -> */ /* also need to initialize destructor: */ stq ra, 0x00(sp) @@ -81,8 +81,8 @@ init: ldq a4, 0x20(sp) ldq a5, 0x28(sp) -leave: ldq pv, 0x30(sp) +$leave: ldq pv, 0x30(sp) addq sp, 0x38, sp ret -.end init + .end init diff --git a/sysdeps/alpha/bsd-_setjmp.S b/sysdeps/alpha/bsd-_setjmp.S index da60442c23..a7bdbb5a61 100644 --- a/sysdeps/alpha/bsd-_setjmp.S +++ b/sysdeps/alpha/bsd-_setjmp.S @@ -1,5 +1,5 @@ /* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. Alpha version. -Copyright (C) 1994 Free Software Foundation, Inc. +Copyright (C) 1994, 1996 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 @@ -24,7 +24,8 @@ Cambridge, MA 02139, USA. */ #include ENTRY(_setjmp) - lda $27, __sigsetjmp /* Load address to jump to. */ + ldgp $29,0($27) + .prologue 1 bis $31, $31, $17 /* Pass a second argument of zero. */ - jmp $31, ($27), __sigsetjmp /* Call __sigsetjmp. */ + jmp $31, __sigsetjmp /* Call __sigsetjmp. */ END(_setjmp) diff --git a/sysdeps/alpha/bsd-setjmp.S b/sysdeps/alpha/bsd-setjmp.S index fc73815a84..c0ed691f40 100644 --- a/sysdeps/alpha/bsd-setjmp.S +++ b/sysdeps/alpha/bsd-setjmp.S @@ -1,5 +1,5 @@ /* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. Alpha version. -Copyright (C) 1994 Free Software Foundation, Inc. +Copyright (C) 1994, 1996 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 @@ -24,7 +24,8 @@ Cambridge, MA 02139, USA. */ #include ENTRY(setjmp) - lda $27, __sigsetjmp /* Load address to jump to. */ + ldgp $29, 0($27) + .prologue 1 bis $31, 1, $17 /* Pass a second argument of one. */ - jmp $31, ($27), __sigsetjmp /* Call __sigsetjmp. */ + jmp $31, __sigsetjmp /* Call __sigsetjmp. */ END(setjmp) diff --git a/sysdeps/alpha/divrem.h b/sysdeps/alpha/divrem.h index 2951335c49..b5b66ae10b 100644 --- a/sysdeps/alpha/divrem.h +++ b/sysdeps/alpha/divrem.h @@ -115,10 +115,9 @@ clobbered (assembly temporary), anything else must be saved. */ br AT, 1f 1: ldgp gp, 0(AT) - lda AT, _mcount mov retaddr, ra - jsr AT, (AT), _mcount + jsr AT, _mcount ldq ra, 0x00(sp) ldq pv, 0x08(sp) @@ -137,7 +136,7 @@ clobbered (assembly temporary), anything else must be saved. */ stq tmp0,0x18(sp) bis zero,zero,quotient stq tmp1,0x20(sp) - beq divisor,divbyzero + beq divisor,$divbyzero stq sign,0x28(sp) GETSIGN(dividend,divisor,sign) #if SIGNED @@ -170,7 +169,7 @@ clobbered (assembly temporary), anything else must be saved. */ ldq arg1,0x00(sp) SETSIGN(sign,result,tmp0) -done: ldq arg2,0x08(sp) +$done: ldq arg2,0x08(sp) ldq mask,0x10(sp) ldq tmp0,0x18(sp) ldq tmp1,0x20(sp) @@ -178,11 +177,11 @@ done: ldq arg2,0x08(sp) lda sp,FRAME_SIZE(sp) ret zero,(retaddr),0 -divbyzero: +$divbyzero: lda a0,GEN_INTDIV(zero) call_pal PAL_gentrap bis zero,zero,result /* if trap returns, return 0 */ ldq arg1,0x00(sp) - br done + br $done END(FUNC_NAME) diff --git a/sysdeps/alpha/ffs.S b/sysdeps/alpha/ffs.S index e4dd87c9f1..b84a51d326 100644 --- a/sysdeps/alpha/ffs.S +++ b/sysdeps/alpha/ffs.S @@ -34,7 +34,7 @@ ENTRY(ffs) negq a0, t0 # due to the srl instruction and a0, t0, t0 clr v0 - beq a0, done + beq a0, $done # now do binary search for first non-zero bit @@ -61,6 +61,6 @@ ENTRY(ffs) addq v0, 1, t3 cmoveq t2, t3, v0 -done: ret +$done: ret END(ffs) diff --git a/sysdeps/alpha/memchr.S b/sysdeps/alpha/memchr.S index 2d21247174..a47ac96e01 100644 --- a/sysdeps/alpha/memchr.S +++ b/sysdeps/alpha/memchr.S @@ -42,7 +42,7 @@ For correctness consider that: ENTRY(memchr) .prologue 0 - beq a2, not_found + beq a2, $not_found ldq_u t0, 0(a0) # load first quadword (a0 may be misaligned) addq a0, a2, t4 and a1, 0xff, a1 # a1 = 00000000000000ch @@ -57,7 +57,7 @@ ENTRY(memchr) extql t0, a0, t6 or t1, a1, a1 # a1 = chchchchchchchch - beq t3, first_quad + beq t3, $first_quad extqh t5, a0, t5 mov a0, v0 @@ -68,15 +68,15 @@ ENTRY(memchr) # in t0. E.g.: # a2 = 6 # t0 = ????c6c5c4c3c2c1 -last_quad: +$last_quad: negq a2, t5 srl t2, t5, t5 # t5 = mask of a2 bits set xor a1, t0, t0 cmpbge zero, t0, t1 and t1, t5, t1 - beq t1, not_found + beq t1, $not_found -found_it: +$found_it: # now, determine which byte matched: negq t1, t2 and t1, t2, t1 @@ -93,20 +93,20 @@ found_it: addq v0, 1, t2 cmoveq t0, t2, v0 -done: ret +$done: ret # # Deal with the case where a2 > 8 bytes remain to be # searched. a0 may not be aligned. # -first_quad: +$first_quad: andnot a0, 0x7, v0 insqh t2, a0, t1 # t1 = 0000ffffffffffff (a0<0:2> ff bytes) xor t0, a1, t0 or t0, t1, t0 # t0 = ====ffffffffffff cmpbge zero, t0, t1 - bne t1, found_it + bne t1, $found_it /* at least one byte left to process */ @@ -119,41 +119,41 @@ first_quad: subq t4, 1, a2 andnot a2, 0x7, a2 cmpult v0, a2, t1 - beq t1, final + beq t1, $final /* at least two quads remain to be accessed */ subq a2, v0, t3 # t3 <- number of quads to be processed in loop and t3, 8, t3 # odd number of quads? - bne t3, odd_quad_count + bne t3, $odd_quad_count /* at least three quads remain to be accessed */ mov t0, t3 # move prefetched value into correct register .align 3 -unrolled_loop: +$unrolled_loop: ldq t0, 8(v0) # prefetch t0 xor a1, t3, t1 cmpbge zero, t1, t1 - bne t1, found_it + bne t1, $found_it addq v0, 8, v0 -odd_quad_count: +$odd_quad_count: xor a1, t0, t1 ldq t3, 8(v0) # prefetch t3 cmpbge zero, t1, t1 - bne t1, found_it + bne t1, $found_it addq v0, 8, v0 cmpult v0, a2, t5 - bne t5, unrolled_loop + bne t5, $unrolled_loop mov t3, t0 # move prefetched value into t0 -final: subq t4, v0, a2 # a2 <- number of bytes left to do - bne a2, last_quad +$final: subq t4, v0, a2 # a2 <- number of bytes left to do + bne a2, $last_quad -not_found: +$not_found: mov zero, v0 ret diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S index da71a3292a..59929a0234 100644 --- a/sysdeps/alpha/setjmp.S +++ b/sysdeps/alpha/setjmp.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1994 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1994, 1996 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,9 +25,8 @@ ENTRY (__sigsetjmp) ldgp $29, 0($27) .prologue 1 - lda $27, __sigsetjmp_aux /* Load address to jump to. */ bis $30, $30, $18 /* Pass SP as 3rd arg. */ bis $15, $15, $19 /* Pass FP as 4th arg. */ - jmp $31, ($27), __sigsetjmp_aux /* Call __sigsetjmp_aux. */ + jmp $31, __sigsetjmp_aux /* Call __sigsetjmp_aux. */ END(__sigsetjmp) diff --git a/sysdeps/alpha/strlen.S b/sysdeps/alpha/strlen.S index 15c78cde64..9eab707388 100644 --- a/sysdeps/alpha/strlen.S +++ b/sysdeps/alpha/strlen.S @@ -19,52 +19,50 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Finds length of a 0-terminated string. Optimized for the Alpha -architecture: + architecture: - memory accessed as aligned quadwords only - - uses bcmpge to compare 8 bytes in parallel - - does binary search to find 0 byte in last - quadword (HAKMEM needed 12 instructions to - do this instead of the 9 instructions that - binary search needs). */ + - uses cmpbge to compare 8 bytes in parallel + - does binary search to find 0 byte in last quadword (HAKMEM + needed 12 instructions to do this instead of the 8 instructions + that the binary search needs). +*/ #include - .set noreorder - .set noat + .set noreorder + .set noat ENTRY(strlen) - ldq_u t0, 0(a0) # load first quadword (a0 may be misaligned) - lda t1, -1(zero) - insqh t1, a0, t1 - andnot a0, 7, v0 - or t1, t0, t0 - cmpbge zero, t0, t1 # t1 <- bitmask: bit i == 1 <==> i-th byte == 0 - bne t1, found - -loop: ldq t0, 8(v0) - addq v0, 8, v0 # addr += 8 - nop # helps dual issue last two insns - cmpbge zero, t0, t1 - beq t1, loop - -found: blbs t1, done # make aligned case fast - negq t1, t2 - and t1, t2, t1 - - and t1, 0x0f, t0 - addq v0, 4, t2 - cmoveq t0, t2, v0 - - and t1, 0x33, t0 - addq v0, 2, t2 - cmoveq t0, t2, v0 - - and t1, 0x55, t0 - addq v0, 1, t2 - cmoveq t0, t2, v0 - -done: subq v0, a0, v0 - ret - - END(strlen) + ldq_u t0, 0(a0) # load first quadword (a0 may be misaligned) + lda t1, -1(zero) + insqh t1, a0, t1 + andnot a0, 7, v0 + or t1, t0, t0 + nop # dual issue the next two on ev5 + cmpbge zero, t0, t1 # t1 <- bitmask: bit i == 1 <==> i-th byte == 0 + bne t1, $found + +$loop: ldq t0, 8(v0) + addq v0, 8, v0 # addr += 8 + cmpbge zero, t0, t1 + beq t1, $loop + +$found: negq t1, t2 # clear all but least set bit + and t1, t2, t1 + + and t1, 0xf0, t2 # binary search for that set bit + and t1, 0xcc, t3 + and t1, 0xaa, t4 + cmovne t2, 4, t2 + cmovne t3, 2, t3 + cmovne t4, 1, t4 + addq t2, t3, t2 + addq v0, t4, v0 + addq v0, t2, v0 + nop # dual issue next two on ev4 and ev5 + + subq v0, a0, v0 + ret + + END(strlen) diff --git a/sysdeps/unix/sysv/linux/alpha/brk.S b/sysdeps/unix/sysv/linux/alpha/brk.S index 26bf97f2bd..ad5f021e99 100644 --- a/sysdeps/unix/sysv/linux/alpha/brk.S +++ b/sysdeps/unix/sysv/linux/alpha/brk.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -23,7 +23,16 @@ break value (instead of the new, requested one). */ #include #include +#ifdef PIC +.section .bss + .align 3 + .globl __curbrk +__curbrk: .skip 8 + .type __curbrk,@object + .size __curbrk,8 +#else .comm __curbrk, 8 +#endif .text LEAF(__brk, 0) diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c index cee5f482bb..56331cb596 100644 --- a/sysdeps/unix/sysv/linux/alpha/ioperm.c +++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1996 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger. @@ -92,6 +92,7 @@ static struct platform { {"EB66", IOSYS_APECS, APECS_DENSE_MEM}, /* LCA same as APECS */ {"EB66P", IOSYS_APECS, APECS_DENSE_MEM}, /* LCA same as APECS */ {"Jensen", IOSYS_JENSEN, JENSEN_MEM}, + {"Mikasa", IOSYS_APECS, APECS_DENSE_MEM}, {"Mustang", IOSYS_APECS, APECS_DENSE_MEM}, {"Noname", IOSYS_APECS, APECS_DENSE_MEM}, /* LCA same as APECS */ }; From 3b0174d08faaa95a20e5ea412255523713d302dd Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 10 Aug 1996 00:47:07 +0000 Subject: [PATCH 0736/4487] Update from main archive 960809 --- sysdeps/unix/sysv/linux/alpha/clone.S | 118 ++++++++++++++++++++ sysdeps/unix/sysv/linux/m68k/resourcebits.h | 3 + 2 files changed, 121 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/clone.S diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S new file mode 100644 index 0000000000..a1ef324956 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/clone.S @@ -0,0 +1,118 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. + Contributed by Richard Henderson (rth@tamu.edu) + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* clone() is even more special than fork() as it mucks with stacks + and invokes a function in the right context after its all over. */ + +#include +#include + +/* int clone(int (*fn)(), void *child_stack, int flags, int nargs, ...) */ + + .text +ENTRY(__clone) + lda sp,-16(sp) + .frame sp,16,$26,0 + /* Save rest of argument registers for varargs-type work. */ + stq a4,0(sp) + stq a5,8(sp) + .prologue 1 + + /* Sanity check arguments. */ + sextl a3,a3 + ldiq v0,EINVAL + beq a0,$error /* no NULL function pointers */ + beq a1,$error /* no NULL stack pointers */ + blt a3,$error /* no negative argument counts */ + + /* Allocate space on the new stack and copy args over */ + mov a3,t0 /* save nargs for thread_start */ + s8addq a3,sp,t1 +1: ldq t2,-8(t1) + subq t1,8,t1 + stq t2,-8(a1) + subq a3,1,a3 + subq a1,8,a1 + bne a3,1b + + /* Do the system call */ + mov a0,pv /* get fn ptr out of the way */ + mov a2,a0 + ldiq v0,__NR_clone + call_pal PAL_callsys + + bne a3,$error + beq v0,thread_start + + /* Successful return from the parent */ + lda sp,16(sp) + ret + + /* Something bad happened -- no child created */ +$error: + br gp,1f +1: ldgp gp,0(gp) + lda sp,16(sp) + jmp zero,__syscall_error + + END(__clone) + +/* Load up the arguments to the function. Put this block of code in + its own function so that we can terminate the stack trace with our + debug info. + + At this point we have $t0=nargs, $pv=fn, $sp=&arg[0]. */ + + .ent thread_start +thread_start: + .frame fp,0,zero,0 + mov zero,fp + .prologue 0 + + /* Calculate address of jump into argument loading code */ + cmple t0,6,t2 /* no more than 6 args in registers */ + cmoveq t2,6,t0 + br v0,1f /* find address of arg0 */ +1: lda v0,$arg0-1b(v0) + s4addq t0,zero,t1 + subq v0,t1,v0 + jmp (v0) + + /* Load the integer register arguments */ + ldq a5,40(sp) + ldq a4,32(sp) + ldq a3,24(sp) + ldq a2,16(sp) + ldq a1,8(sp) + ldq a0,0(sp) +$arg0: + + /* Adjust stack to remove the arguments we just loaded */ + s8addq t0,sp,sp + + /* Call the user's function */ + jsr ra,(pv) + ldgp gp,0(ra) + + /* Call _exit rather than doing it inline for breakpoint purposes */ + mov v0,a0 + jsr ra,_exit + + .end thread_start + +weak_alias(__clone, clone) diff --git a/sysdeps/unix/sysv/linux/m68k/resourcebits.h b/sysdeps/unix/sysv/linux/m68k/resourcebits.h index 65cc6e550a..d2f2daef91 100644 --- a/sysdeps/unix/sysv/linux/m68k/resourcebits.h +++ b/sysdeps/unix/sysv/linux/m68k/resourcebits.h @@ -54,6 +54,9 @@ enum __rlimit_resource /* Locked-in-memory address space. */ RLIMIT_MEMLOCK, #define RLIMIT_MEMLOCK RLIMIT_MEMLOCK + /* Address space limit. */ + RLIMIT_AS, +#define RLIMIT_AS RLIMIT_AS RLIMIT_NLIMITS, /* Number of limit flavors. */ RLIM_NLIMITS = RLIMIT_NLIMITS /* Traditional name for same. */ From dca26bcb0ca0c5578a70532a67dbab4424fee256 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 11 Aug 1996 01:30:23 +0000 Subject: [PATCH 0737/4487] Update from main archive 960810 --- sysdeps/alpha/elf/start.S | 4 ++- sysdeps/unix/sysv/linux/alpha/ioperm.c | 46 +++++++++++++++++--------- 2 files changed, 33 insertions(+), 17 deletions(-) diff --git a/sysdeps/alpha/elf/start.S b/sysdeps/alpha/elf/start.S index c534d6987b..596cea6265 100644 --- a/sysdeps/alpha/elf/start.S +++ b/sysdeps/alpha/elf/start.S @@ -20,9 +20,11 @@ Cambridge, MA 02139, USA. */ #include .text - .globl __start + .globl _start /* what ELF wants */ + .globl __start /* for backwards (ECOFF) comatibility */ .align 3 .ent __start, 0 +_start: __start: .frame fp, 0, zero mov zero, fp diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c index 56331cb596..d24eabe473 100644 --- a/sysdeps/unix/sysv/linux/alpha/ioperm.c +++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c @@ -59,14 +59,16 @@ I/O address space that's 512MB large!). */ * so the following defines apply to LCA as well. */ #define APECS_IO_BASE (0xfffffc01c0000000UL) +#define APECS_SPARSE_MEM (0xfffffc0200000000UL) #define APECS_DENSE_MEM (0xfffffc0300000000UL) -#define ALCOR_IO_BASE (0xfffffc8580000000UL) -#define ALCOR_DENSE_MEM (0xfffffc8600000000UL) +#define CIA_IO_BASE (0xfffffc8580000000UL) +#define CIA_SPARSE_MEM (0xfffffc8000000000UL) +#define CIA_DENSE_MEM (0xfffffc8600000000UL) enum { - IOSYS_JENSEN = 0, IOSYS_APECS = 1, IOSYS_ALCOR = 2 + IOSYS_JENSEN = 0, IOSYS_APECS = 1, IOSYS_CIA = 2 } iosys_t; struct ioswtch { @@ -83,18 +85,19 @@ static struct platform { const char *name; int io_sys; unsigned long bus_memory_base; + unsigned long sparse_bus_memory_base; } platform[] = { - {"Alcor", IOSYS_ALCOR, ALCOR_DENSE_MEM}, - {"Avanti", IOSYS_APECS, APECS_DENSE_MEM}, - {"Cabriolet", IOSYS_APECS, APECS_DENSE_MEM}, - {"EB164", IOSYS_ALCOR, ALCOR_DENSE_MEM}, - {"EB64+", IOSYS_APECS, APECS_DENSE_MEM}, - {"EB66", IOSYS_APECS, APECS_DENSE_MEM}, /* LCA same as APECS */ - {"EB66P", IOSYS_APECS, APECS_DENSE_MEM}, /* LCA same as APECS */ - {"Jensen", IOSYS_JENSEN, JENSEN_MEM}, - {"Mikasa", IOSYS_APECS, APECS_DENSE_MEM}, - {"Mustang", IOSYS_APECS, APECS_DENSE_MEM}, - {"Noname", IOSYS_APECS, APECS_DENSE_MEM}, /* LCA same as APECS */ + {"Alcor", IOSYS_CIA, CIA_DENSE_MEM, CIA_SPARSE_MEM}, + {"Avanti", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM}, + {"Cabriolet", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM}, + {"EB164", IOSYS_CIA, CIA_DENSE_MEM, CIA_SPARSE_MEM}, + {"EB64+", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM}, + {"EB66", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM}, + {"EB66P", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM}, + {"Jensen", IOSYS_JENSEN, JENSEN_MEM, JENSEN_MEM}, + {"Mikasa", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM}, + {"Mustang", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM}, + {"Noname", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM}, }; @@ -109,6 +112,7 @@ static struct { } io; static unsigned long bus_memory_base = -1; +static unsigned long sparse_bus_memory_base = -1; extern void __sethae (unsigned long); /* we can't use asm/io.h */ @@ -256,7 +260,7 @@ DCL_IN(jensen, inb, JENSEN) DCL_IN(jensen, inw, JENSEN) DCL_IN(jensen, inl, JENSEN) -/* The APECS functions are also used for ALCOR since they are +/* The APECS functions are also used for CIA since they are identical. */ DCL_SETHAE(apecs, APECS) @@ -332,6 +336,7 @@ init_iosys (void) if (strcmp (platform[i].name, systype) == 0) { bus_memory_base = platform[i].bus_memory_base; + sparse_bus_memory_base = platform[i].sparse_bus_memory_base; io.sys = platform[i].io_sys; if (io.sys == IOSYS_JENSEN) io.swp = &ioswtch[0]; @@ -382,7 +387,7 @@ _ioperm (unsigned long from, unsigned long num, int turn_on) { case IOSYS_JENSEN: base = JENSEN_IO_BASE; break; case IOSYS_APECS: base = APECS_IO_BASE; break; - case IOSYS_ALCOR: base = ALCOR_IO_BASE; break; + case IOSYS_CIA: base = CIA_IO_BASE; break; default: errno = ENODEV; return -1; @@ -498,6 +503,14 @@ _bus_base(void) return bus_memory_base; } +unsigned long +_bus_base_sparse(void) +{ + if (!io.swp && init_iosys () < 0) + return -1; + return sparse_bus_memory_base; +} + weak_alias (_sethae, sethae); weak_alias (_ioperm, ioperm); weak_alias (_iopl, iopl); @@ -508,3 +521,4 @@ weak_alias (_outb, outb); weak_alias (_outw, outw); weak_alias (_outl, outl); weak_alias (_bus_base, bus_base); +weak_alias (_bus_base_sparse, bus_base_sparse); From f526ac60c54c04dca84259d28afa545ed955a3a2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 12 Aug 1996 02:04:57 +0000 Subject: [PATCH 0738/4487] Update from main archive 960811 --- sysdeps/alpha/divrem.h | 4 ++-- sysdeps/alpha/dl-machine.h | 28 +++++++++++++--------------- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/sysdeps/alpha/divrem.h b/sysdeps/alpha/divrem.h index b5b66ae10b..eaf892b3c6 100644 --- a/sysdeps/alpha/divrem.h +++ b/sysdeps/alpha/divrem.h @@ -29,8 +29,8 @@ division. The C compiler expects the functions These are not normal C functions: instead of the normal calling sequence, these expect their arguments in registers t10 and t11, and -return the result in t12 (aka pv). Registers AT and v0 may be -clobbered (assembly temporary), anything else must be saved. */ +return the result in t12 (aka pv). Register AT may be clobbered +(assembly temporary), anything else must be saved. */ #include diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index b900b769ee..a75011fccb 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -135,8 +135,8 @@ elf_machine_runtime_setup (struct link_map *l, int lazy) stq $29, 160($sp) .mask 0x27ff01ff, -168 /* Set up our $gp */ - br $gp, .+4 - ldgp $gp, 0($gp) + br $gp, 0f +0: ldgp $gp, 0($gp) .prologue 1 /* Set up the arguments for _dl_runtime_resolve. */ /* $16 = link_map out of plt0 */ @@ -145,7 +145,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy) mov $28, $17 /* Do the fixup */ bsr $26, fixup..ng - /* Move the destination address to a safe place. */ + /* Move the destination address into position. */ mov $0, $27 /* Restore program registers. */ ldq $26, 0($sp) @@ -169,19 +169,16 @@ elf_machine_runtime_setup (struct link_map *l, int lazy) ldq $24, 144($sp) ldq $25, 152($sp) ldq $29, 160($sp) + /* Flush the Icache after having modified the .plt code. */ + imb /* Clean up and turn control to the destination */ lda $sp, 168($sp) jmp $31, ($27) .end _dl_runtime_resolve"); -/* The PLT uses Elf_Rel relocs. */ +/* The PLT uses Elf64_Rela relocs. */ #define elf_machine_relplt elf_machine_rela -/* Mask identifying addresses reserved for the user program, - where the dynamic linker should not map anything. */ -/* FIXME */ -#define ELF_MACHINE_USER_ADDRESS_MASK (~0x1FFFFFFFFUL) - /* Initial entry point code for the dynamic linker. The C function `_dl_start' is the real entry point; its return value is the user program's entry point. */ @@ -191,8 +188,8 @@ elf_machine_runtime_setup (struct link_map *l, int lazy) .globl _start .globl _dl_start_user _start: - br $gp,.+4 - ldgp $gp, 0($gp) + br $gp,0f +0: ldgp $gp, 0($gp) /* Pass pointer to argument block to _dl_start. */ mov $sp, $16 bsr $26, _dl_start..ng @@ -226,7 +223,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy) mov $9, $27 jmp ($9)"); -/* Nonzero iff TYPE describes relocation of a PLT entry, so +/* Nonzero iff TYPE describes relocation of a PLT entry, so PLT entries should not be allowed to define the value. */ #define elf_machine_pltrel_p(type) ((type) == R_ALPHA_JMP_SLOT) @@ -302,9 +299,10 @@ elf_alpha_fix_plt(struct link_map *l, plte[2] = 0x6bfb0000; } - /* Flush the instruction cache now that we've diddled. Tag it as - modifying memory to checkpoint memory writes during optimization. */ - asm volatile("call_pal 0x86" : : : "memory"); + /* At this point, if we've been doing runtime resolution, Icache is dirty. + This will be taken care of in _dl_runtime_resolve. If instead we are + doing this as part of non-lazy startup relocation, that bit of code + hasn't made it into Icache yet, so there's nothing to clean up. */ } /* Perform the relocation specified by RELOC and SYM (which is fully resolved). From 404e62168877ec7f33aa039c78e4fc26798d556a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 15 Aug 1996 01:23:29 +0000 Subject: [PATCH 0739/4487] update from main archive 960814 --- sysdeps/alpha/dl-machine.h | 4 +- sysdeps/m68k/dl-machine.h | 18 +++---- sysdeps/mips/dl-machine.h | 2 +- sysdeps/unix/sysv/linux/m68k/clone.S | 75 ++++++++++++++++++++++++++++ 4 files changed, 87 insertions(+), 12 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/m68k/clone.S diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index a75011fccb..2bf8f9b7ec 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -341,8 +341,8 @@ elf_machine_rela (struct link_map *map, { Elf64_Addr loadbase, sym_value; - loadbase = RESOLVE (&sym, (Elf64_Addr)reloc_addr, - r_info == R_ALPHA_JMP_SLOT); + loadbase = RESOLVE (&sym, + r_info == R_ALPHA_JMP_SLOT ? DL_LOOKUP_NOPLT : 0); sym_value = sym ? loadbase + sym->st_value : 0; if (r_info == R_ALPHA_GLOB_DAT) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index 4642f00c63..15aa5325fc 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -205,29 +205,29 @@ elf_machine_rela (struct link_map *map, switch (ELF32_R_TYPE (reloc->r_info)) { case R_68K_COPY: - loadbase = RESOLVE (&sym, (Elf32_Addr) reloc_addr, 0); + loadbase = RESOLVE (&sym, DL_LOOKUP_NOEXEC); memcpy (reloc_addr, (void *) (loadbase + sym->st_value), sym->st_size); break; case R_68K_GLOB_DAT: - loadbase = RESOLVE (&sym, (Elf32_Addr) reloc_addr, 0); + loadbase = RESOLVE (&sym, 0); *reloc_addr = sym ? (loadbase + sym->st_value) : 0; break; case R_68K_JMP_SLOT: - loadbase = RESOLVE (&sym, (Elf32_Addr) reloc_addr, 1); + loadbase = RESOLVE (&sym, DL_LOOKUP_NOPLT); *reloc_addr = sym ? (loadbase + sym->st_value) : 0; break; case R_68K_8: - loadbase = RESOLVE (&sym, (Elf32_Addr) reloc_addr, 0); + loadbase = RESOLVE (&sym, 0); *(char *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) + reloc->r_addend); break; case R_68K_16: - loadbase = RESOLVE (&sym, (Elf32_Addr) reloc_addr, 0); + loadbase = RESOLVE (&sym, 0); *(short *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) + reloc->r_addend); break; case R_68K_32: - loadbase = RESOLVE (&sym, (Elf32_Addr) reloc_addr, 0); + loadbase = RESOLVE (&sym, 0); *reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) + reloc->r_addend); break; @@ -235,17 +235,17 @@ elf_machine_rela (struct link_map *map, *reloc_addr = map->l_addr + reloc->r_addend; break; case R_68K_PC8: - loadbase = RESOLVE (&sym, (Elf32_Addr) reloc_addr, 0); + loadbase = RESOLVE (&sym, 0); *(char *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) + reloc->r_addend - (Elf32_Addr) reloc_addr); break; case R_68K_PC16: - loadbase = RESOLVE (&sym, (Elf32_Addr) reloc_addr, 0); + loadbase = RESOLVE (&sym, 0); *(short *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) + reloc->r_addend - (Elf32_Addr) reloc_addr); break; case R_68K_PC32: - loadbase = RESOLVE (&sym, (Elf32_Addr) reloc_addr, 0); + loadbase = RESOLVE (&sym, 0); *reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) + reloc->r_addend - (Elf32_Addr) reloc_addr); break; diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 50e9f64665..c0ac649144 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -453,7 +453,7 @@ elf_machine_rel (struct link_map *map, else #endif undo = 0; - loadbase = RESOLVE (&sym, (ElfW(Addr)) reloc_addr, 0); + loadbase = RESOLVE (&sym, 0); *reloc_addr += (sym ? (loadbase + sym->st_value) : 0) - undo; } break; diff --git a/sysdeps/unix/sysv/linux/m68k/clone.S b/sysdeps/unix/sysv/linux/m68k/clone.S new file mode 100644 index 0000000000..64077e00de --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/clone.S @@ -0,0 +1,75 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. + Contributed by Andreas Schwab (schwab@issan.informatik.uni-dortmund.de) + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* clone is even more special than fork as it mucks with stacks + and invokes a function in the right context after its all over. */ + +#include +#include + +/* int clone (int (*fn) (), void *child_stack, int flags, int nargs, ...) */ + + .text +ENTRY (__clone) + /* Sanity check arguments. */ + movel #-EINVAL, %d0 + movel 4(%sp), %a0 /* no NULL function pointers */ + tstl %a0 + jeq syscall_error + movel 8(%sp), %a1 /* no NULL stack pointers */ + tstl %a1 + jeq syscall_error + movel 16(%sp), %d1 /* no negative argument counts */ + jmi syscall_error + + /* Allocate space on the new stack and copy args over */ + movel %d1, %d0 + negl %d0 + lea (%a1,%d0.l*4), %a1 + jeq 2f +1: movel 16(%sp,%d1.l*4), -4(%a1,%d1.l*4) + subql #1, %d1 + jne 1b +2: + + /* Do the system call */ + exg %d2, %a1 /* save %d2 and get stack pointer */ + movel 12(%sp), %d1 /* get flags */ + movel #SYS_ify (clone), %d0 + trap #0 + exg %d2, %a1 /* restore %d2 */ + + tstl %d0 + jmi syscall_error + jeq thread_start + + rts + + SYSCALL_ERROR_HANDLER + +thread_start: + subl %fp, %fp /* terminate the stack frame */ + jsr (%a0) + movel %d0, -(%sp) +#ifdef PIC + bsrl _exit@PLTPC +#else + jbsr _exit +#endif + +weak_alias (__clone, clone) From 141ce15d9754cb8b29b0dfa345ab37fc04b2ab68 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 19 Aug 1996 01:07:37 +0000 Subject: [PATCH 0740/4487] update from main archive 960818 --- sysdeps/m68k/dl-machine.h | 4 +++- sysdeps/unix/sysv/linux/alpha/Makefile | 2 +- sysdeps/unix/sysv/linux/alpha/ioperm.c | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index 15aa5325fc..f36b9ce2f4 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -174,7 +174,9 @@ elf_machine_runtime_setup (struct link_map *l, int lazy) jsr (%a0) | Loop to call _dl_init_next for the next initializer. jra 0b -1: | Pass our finalizer function to the user in %a1. +1: | Clear the startup flag. + move.l #0, _dl_starting_up@GOT(%a5) + | Pass our finalizer function to the user in %a1. move.l _dl_fini@GOT(%a5), %a1 | Initialize %fp with the stack pointer. move.l %sp, %fp diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile index 9d596719da..3908b5703c 100644 --- a/sysdeps/unix/sysv/linux/alpha/Makefile +++ b/sysdeps/unix/sysv/linux/alpha/Makefile @@ -2,5 +2,5 @@ ifeq ($(subdir), misc) sysdep_headers += alpha/ptrace.h alpha/regdef.h sysdep_routines += ieee_get_fp_control ieee_set_fp_control \ - sethae ioperm osf_sigprocmask fstatfs statfs + sethae ioperm osf_sigprocmask fstatfs statfs llseek endif diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c index d24eabe473..a91608ff24 100644 --- a/sysdeps/unix/sysv/linux/alpha/ioperm.c +++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c @@ -52,7 +52,7 @@ I/O address space that's 512MB large!). */ #define vuip volatile unsigned int * #define JENSEN_IO_BASE (0xfffffc0300000000UL) -#define JENSEN_MEM (0xfffffc0200000000UL) /* sparse!! */ +#define JENSEN_SPARSE_MEM (0xfffffc0200000000UL) /* * With respect to the I/O architecture, APECS and LCA are identical, @@ -94,7 +94,7 @@ static struct platform { {"EB64+", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM}, {"EB66", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM}, {"EB66P", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM}, - {"Jensen", IOSYS_JENSEN, JENSEN_MEM, JENSEN_MEM}, + {"Jensen", IOSYS_JENSEN, 0, JENSEN_SPARSE_MEM}, {"Mikasa", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM}, {"Mustang", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM}, {"Noname", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM}, From c080e5ff92c48de8870009d9d56ddad42039792e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 26 Aug 1996 00:42:04 +0000 Subject: [PATCH 0741/4487] update from main archive 960825 --- sysdeps/m68k/dl-machine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index f36b9ce2f4..8b9872c15a 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -175,7 +175,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy) | Loop to call _dl_init_next for the next initializer. jra 0b 1: | Clear the startup flag. - move.l #0, _dl_starting_up@GOT(%a5) + clr.l _dl_starting_up@GOT(%a5) | Pass our finalizer function to the user in %a1. move.l _dl_fini@GOT(%a5), %a1 | Initialize %fp with the stack pointer. From 8a7ad1005c77f77910045dd281d342a6e07a8e6e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 27 Aug 1996 02:22:22 +0000 Subject: [PATCH 0742/4487] update from main archive 960826 --- sysdeps/alpha/dl-machine.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 2bf8f9b7ec..3704c25c3c 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -217,7 +217,11 @@ elf_machine_runtime_setup (struct link_map *l, int lazy) jsr $26, ($0) ldgp $gp, 0($26) br 1b -2: /* Pass our finalizer function to the user in $0. */ +2: /* Clear the startup flag. */ + .set at + stl $31, _dl_starting_up + .set noat + /* Pass our finalizer function to the user in $0. */ lda $0, _dl_fini /* Jump to the user's entry point. */ mov $9, $27 From 1713bc849fa0f75399f6e4b2b9590879e0e3eda2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 30 Aug 1996 00:58:28 +0000 Subject: [PATCH 0743/4487] update from main archive 960829 --- bare/Makefile | 2 +- sysdeps/unix/sysv/linux/alpha/Dist | 3 ++- sysdeps/unix/sysv/linux/m68k/Dist | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bare/Makefile b/bare/Makefile index 588a713c83..573515347c 100644 --- a/bare/Makefile +++ b/bare/Makefile @@ -48,7 +48,7 @@ $(objpfx)lib$(config-vendor).a: $(bare-routines:%=$(objpfx)%.o) # from scratch each time. rm -f $@ ifdef objdir - cd $(objdir); $(AR) cq$(verbose) $@ $(^:$(objpfx)%=%) + cd $(objpfx); $(AR) cq$(verbose) $(@:$(objpfx)%=%) $(^:$(objpfx)%=%) else $(AR) cq$(verbose) $@ $^ endif diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist index 5c0e8d1c7e..79ac03ff90 100644 --- a/sysdeps/unix/sysv/linux/alpha/Dist +++ b/sysdeps/unix/sysv/linux/alpha/Dist @@ -1,4 +1,5 @@ -alpha/ptrace.h alpha/regdef.h +alpha/ptrace.halpha/regdef.h ieee_get_fp_control.S ieee_set_fp_control.S ioperm.c init-first.h +clone.S diff --git a/sysdeps/unix/sysv/linux/m68k/Dist b/sysdeps/unix/sysv/linux/m68k/Dist index 2c6d09e88f..a281cba3f9 100644 --- a/sysdeps/unix/sysv/linux/m68k/Dist +++ b/sysdeps/unix/sysv/linux/m68k/Dist @@ -1 +1,2 @@ init-first.h +clone.S From 11309adfcea3f996cd18e7f083c1d3cb816121ea Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 5 Sep 1996 02:48:53 +0000 Subject: [PATCH 0744/4487] update from main archive 960904 --- sysdeps/alpha/dl-machine.h | 13 +++-- sysdeps/alpha/elf/start.S | 19 +++---- sysdeps/m68k/fpu/k_cos.c | 12 +++-- sysdeps/m68k/fpu/k_sin.c | 16 ++++-- sysdeps/m68k/fpu/k_tan.c | 16 +++--- sysdeps/unix/alpha/sysdep.S | 3 +- sysdeps/unix/sysv/linux/alpha/Dist | 3 +- sysdeps/unix/sysv/linux/alpha/Makefile | 2 +- sysdeps/unix/sysv/linux/alpha/init-first.h | 39 ++++++++++---- sysdeps/unix/sysv/linux/alpha/ioperm.c | 47 ++++++++++------- sysdeps/unix/sysv/linux/alpha/sys/io.h | 59 ++++++++++++++++++++++ 11 files changed, 167 insertions(+), 62 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/alpha/sys/io.h diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 3704c25c3c..415549d205 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -186,13 +186,17 @@ elf_machine_runtime_setup (struct link_map *l, int lazy) #define RTLD_START asm ("\ .text .globl _start - .globl _dl_start_user + .ent _start _start: - br $gp,0f + br $gp, 0f 0: ldgp $gp, 0($gp) /* Pass pointer to argument block to _dl_start. */ mov $sp, $16 bsr $26, _dl_start..ng + .end _start + /* FALLTHRU */ + .globl _dl_start_user + .ent _dl_start_user _dl_start_user: /* Save the user entry point address in s0. */ mov $0, $9 @@ -225,7 +229,8 @@ elf_machine_runtime_setup (struct link_map *l, int lazy) lda $0, _dl_fini /* Jump to the user's entry point. */ mov $9, $27 - jmp ($9)"); + jmp ($9) + .end _dl_start_user"); /* Nonzero iff TYPE describes relocation of a PLT entry, so PLT entries should not be allowed to define the value. */ @@ -377,8 +382,6 @@ elf_machine_rela (struct link_map *map, sym_value += reloc->r_addend; *reloc_addr = sym_value; } - else if (r_info == R_ALPHA_COPY) - memcpy (reloc_addr, (void *) sym_value, sym->st_size); else assert (! "unexpected dynamic reloc type"); } diff --git a/sysdeps/alpha/elf/start.S b/sysdeps/alpha/elf/start.S index 596cea6265..d20a009aa4 100644 --- a/sysdeps/alpha/elf/start.S +++ b/sysdeps/alpha/elf/start.S @@ -20,12 +20,9 @@ Cambridge, MA 02139, USA. */ #include .text - .globl _start /* what ELF wants */ - .globl __start /* for backwards (ECOFF) comatibility */ .align 3 - .ent __start, 0 + .ent _start, 0 _start: -__start: .frame fp, 0, zero mov zero, fp br gp, 1f @@ -62,7 +59,6 @@ __start: mov a1, s1 mov a2, s2 -#ifdef HAVE_INITFINI /* Call _init, the entry point to our own .init section. */ jsr ra, _init ldgp gp, 0(ra) @@ -71,16 +67,12 @@ __start: lda a0, _fini jsr ra, atexit ldgp gp, 0(ra) -#else - /* initialize constructors: */ - jsr ra, __main - ldgp gp, 0(ra) -#endif + + /* Call the user's main and exit with its return value. */ mov s0, a0 mov s1, a1 mov s2, a2 - /* Call the user's main and exit with its return value. */ jsr ra, main ldgp gp, 0(ra) @@ -90,7 +82,10 @@ __start: /* Die very horribly if exit returns. Call_pal hlt is callable from kernel mode only; this will result in an illegal instruction trap. */ call_pal 0 -END(__start) + .end _start + +/* For ECOFF backwards compatibility. */ +weak_alias(_start, __start) /* Define a symbol for the first piece of initialized data. */ .data diff --git a/sysdeps/m68k/fpu/k_cos.c b/sysdeps/m68k/fpu/k_cos.c index 28406e8cba..61f566f6a1 100644 --- a/sysdeps/m68k/fpu/k_cos.c +++ b/sysdeps/m68k/fpu/k_cos.c @@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include #ifndef FUNC @@ -29,7 +28,14 @@ Cambridge, MA 02139, USA. */ #define __CONCATX(a,b) __CONCAT(a,b) float_type -DEFUN(__CONCATX(__kernel_,FUNC), (x, y), float_type x AND float_type y) +__CONCATX(__kernel_,FUNC) (x, y) + float_type x; + float_type y; { - return __CONCATX(__,FUNC) (x + y); + float_type sin_x, cos_x, sin_y, cos_y; + __asm__ __volatile__ ("fsincosx %2,%0:%1" : "=f" (cos_x), "=f" (sin_x) + : "f" (x)); + __asm__ __volatile__ ("fsincosx %2,%0:%1" : "=f" (cos_y), "=f" (sin_y) + : "f" (y)); + return cos_x * cos_y - sin_x * sin_y; } diff --git a/sysdeps/m68k/fpu/k_sin.c b/sysdeps/m68k/fpu/k_sin.c index 8c6dfef720..3eed1d466c 100644 --- a/sysdeps/m68k/fpu/k_sin.c +++ b/sysdeps/m68k/fpu/k_sin.c @@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include #ifndef FUNC @@ -29,8 +28,17 @@ Cambridge, MA 02139, USA. */ #define __CONCATX(a,b) __CONCAT(a,b) float_type -DEFUN(__CONCATX(__kernel_,FUNC), (x, y, iy), - float_type x AND float_type y AND int iy) +__CONCATX(__kernel_,FUNC) (x, y, iy) + float_type x; + float_type y; + int iy; { - return __CONCATX(__,FUNC) (x + y); + float_type sin_x, cos_x, sin_y, cos_y; + if (iy == 0) + return __m81_u_(__CONCATX(__,FUNC)) (x); + __asm__ __volatile__ ("fsincosx %2,%0:%1" : "=f" (cos_x), "=f" (sin_x) + : "f" (x)); + __asm__ __volatile__ ("fsincosx %2,%0:%1" : "=f" (cos_y), "=f" (sin_y) + : "f" (y)); + return sin_x * cos_y + cos_x * sin_y; } diff --git a/sysdeps/m68k/fpu/k_tan.c b/sysdeps/m68k/fpu/k_tan.c index c8fa9b780e..7f1b729b96 100644 --- a/sysdeps/m68k/fpu/k_tan.c +++ b/sysdeps/m68k/fpu/k_tan.c @@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include #ifndef FUNC @@ -29,11 +28,16 @@ Cambridge, MA 02139, USA. */ #define __CONCATX(a,b) __CONCAT(a,b) float_type -DEFUN(__CONCATX(__kernel_,FUNC), (x, y, iy), - float_type x AND float_type y AND int iy) +__CONCATX(__kernel_,FUNC) (x, y, iy) + float_type x; + float_type y; + int iy; { - if (iy == 1) - return __CONCATX(__,FUNC) (x + y); + float_type tan_x, tan_y; + tan_x = __m81_u_(__CONCATX(__,FUNC)) (x); + tan_y = __m81_u_(__CONCATX(__,FUNC)) (y); + if (iy > 0) + return (tan_x + tan_y) / (1 - tan_x * tan_y); else - return ((float_type) -1.0) / __CONCATX(__,FUNC) (x + y); + return (tan_x * tan_y - 1) / (tan_x + tan_y); } diff --git a/sysdeps/unix/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S index 2d05305ce0..336eb02029 100644 --- a/sysdeps/unix/alpha/sysdep.S +++ b/sysdeps/unix/alpha/sysdep.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1996 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -22,6 +22,7 @@ Cambridge, MA 02139, USA. */ .section .bss .globl errno + .align 2 errno: .space 4 #ifdef __ELF__ .type errno, @object diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist index 79ac03ff90..d898d041a2 100644 --- a/sysdeps/unix/sysv/linux/alpha/Dist +++ b/sysdeps/unix/sysv/linux/alpha/Dist @@ -1,5 +1,6 @@ -alpha/ptrace.halpha/regdef.h +alpha/ptrace.h alpha/regdef.h ieee_get_fp_control.S ieee_set_fp_control.S ioperm.c init-first.h clone.S +sys/io.h diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile index 3908b5703c..fa433e9d8b 100644 --- a/sysdeps/unix/sysv/linux/alpha/Makefile +++ b/sysdeps/unix/sysv/linux/alpha/Makefile @@ -1,5 +1,5 @@ ifeq ($(subdir), misc) -sysdep_headers += alpha/ptrace.h alpha/regdef.h +sysdep_headers += alpha/ptrace.h alpha/regdef.h sys/io.h sysdep_routines += ieee_get_fp_control ieee_set_fp_control \ sethae ioperm osf_sigprocmask fstatfs statfs llseek diff --git a/sysdeps/unix/sysv/linux/alpha/init-first.h b/sysdeps/unix/sysv/linux/alpha/init-first.h index c27c589a28..ffbcaf1521 100644 --- a/sysdeps/unix/sysv/linux/alpha/init-first.h +++ b/sysdeps/unix/sysv/linux/alpha/init-first.h @@ -1,12 +1,29 @@ -/* This fragment is invoked in the stack context of program start. - Its job is to set up a pointer to argc as an argument, pass - control to `INIT', and, if necessary, clean up after the call - to leave the stack in the same condition it was found in. */ +/* The job of this fragment it to find argc and friends for INIT. + This is done in one of two ways: either in the stack context + of program start, or having dlopen pass them in. */ -#define SYSDEP_CALL_INIT(NAME, INIT) \ - asm(".globl " #NAME "\n" \ - #NAME ":\n\t" \ - "ldgp $29, 0($27)\n\t" \ - ".prologue 1\n\t" \ - "mov $30, $16\n\t" \ - "br $31, " #INIT "..ng"); +#define SYSDEP_CALL_INIT(NAME, INIT) \ + asm(".weak _dl_starting_up\n\t" \ + ".globl " #NAME "\n\t" \ + ".ent " #NAME "\n" \ + #NAME ":\n\t" \ + "ldgp $29, 0($27)\n\t" \ + ".prologue 1\n\t" \ + ".set at\n\t" \ + /* Are we a dynamic libc being loaded into a static program? */ \ + "lda $0, _dl_starting_up\n\t" \ + "beq $0, 1f\n\t" \ + "ldl $0, 0($0)\n" \ + "cmpeq $31, $0, $0\n" \ + "1:\t" \ + "stl $0, __libc_multiple_libcs\n\t" \ + /* If so, argc et al are in a0-a2 already. Otherwise, load them. */ \ + "bne $0, 2f\n\t" \ + "ldl $16, 0($30)\n\t" \ + "lda $17, 8($30)\n\t" \ + "s8addq $16, $17, $18\n\t" \ + "addq $18, 8, $18\n" \ + "2:\t" \ + "br $31, " #INIT "..ng\n\t" \ + ".set noat\n\t" \ + ".end " #NAME); diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c index a91608ff24..731059e600 100644 --- a/sysdeps/unix/sysv/linux/alpha/ioperm.c +++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c @@ -84,20 +84,21 @@ struct ioswtch { static struct platform { const char *name; int io_sys; + int hae_shift; unsigned long bus_memory_base; unsigned long sparse_bus_memory_base; } platform[] = { - {"Alcor", IOSYS_CIA, CIA_DENSE_MEM, CIA_SPARSE_MEM}, - {"Avanti", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM}, - {"Cabriolet", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM}, - {"EB164", IOSYS_CIA, CIA_DENSE_MEM, CIA_SPARSE_MEM}, - {"EB64+", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM}, - {"EB66", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM}, - {"EB66P", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM}, - {"Jensen", IOSYS_JENSEN, 0, JENSEN_SPARSE_MEM}, - {"Mikasa", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM}, - {"Mustang", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM}, - {"Noname", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM}, + {"Alcor", IOSYS_CIA, 5, CIA_DENSE_MEM, CIA_SPARSE_MEM}, + {"Avanti", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM}, + {"Cabriolet", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM}, + {"EB164", IOSYS_CIA, 5, CIA_DENSE_MEM, CIA_SPARSE_MEM}, + {"EB64+", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM}, + {"EB66", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM}, + {"EB66P", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM}, + {"Jensen", IOSYS_JENSEN, 7, 0, JENSEN_SPARSE_MEM}, + {"Mikasa", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM}, + {"Mustang", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM}, + {"Noname", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM}, }; @@ -109,11 +110,11 @@ static struct { unsigned long base; struct ioswtch * swp; int sys; + int hae_shift; + unsigned long bus_memory_base; + unsigned long sparse_bus_memory_base; } io; -static unsigned long bus_memory_base = -1; -static unsigned long sparse_bus_memory_base = -1; - extern void __sethae (unsigned long); /* we can't use asm/io.h */ @@ -335,8 +336,9 @@ init_iosys (void) { if (strcmp (platform[i].name, systype) == 0) { - bus_memory_base = platform[i].bus_memory_base; - sparse_bus_memory_base = platform[i].sparse_bus_memory_base; + io.hae_shift = platform[i].hae_shift; + io.bus_memory_base = platform[i].bus_memory_base; + io.sparse_bus_memory_base = platform[i].sparse_bus_memory_base; io.sys = platform[i].io_sys; if (io.sys == IOSYS_JENSEN) io.swp = &ioswtch[0]; @@ -500,7 +502,7 @@ _bus_base(void) { if (!io.swp && init_iosys () < 0) return -1; - return bus_memory_base; + return io.bus_memory_base; } unsigned long @@ -508,7 +510,15 @@ _bus_base_sparse(void) { if (!io.swp && init_iosys () < 0) return -1; - return sparse_bus_memory_base; + return io.sparse_bus_memory_base; +} + +int +_hae_shift(void) +{ + if (!io.swp && init_iosys () < 0) + return -1; + return io.hae_shift; } weak_alias (_sethae, sethae); @@ -522,3 +532,4 @@ weak_alias (_outw, outw); weak_alias (_outl, outl); weak_alias (_bus_base, bus_base); weak_alias (_bus_base_sparse, bus_base_sparse); +weak_alias (_hae_shift, hae_shift); diff --git a/sysdeps/unix/sysv/linux/alpha/sys/io.h b/sysdeps/unix/sysv/linux/alpha/sys/io.h new file mode 100644 index 0000000000..a88073573c --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/sys/io.h @@ -0,0 +1,59 @@ +/* Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifndef _SYS_IO_H + +#define _SYS_IO_H 1 +#include + +__BEGIN_DECLS + +/* Get constants from kernel header files. */ +#include + +/* If TURN_ON is TRUE, request for permission to do direct i/o on the + port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O + permission off for that range. This call requires root privileges. + + Portability note: not all Linux platforms support this call. Most + platforms based on the PC I/O architecture probably will, however. + E.g., Linux/Alpha for Alpha PCs supports this. */ +extern int ioperm __P ((unsigned long int __from, unsigned long int __num, + int __turn_on)); + +/* Set the I/O privilege level to LEVEL. If LEVEL>3, permission to + access any I/O port is granted. This call requires root + privileges. */ +extern int iopl __P ((int __level)); + +/* Return the physical address of the DENSE I/O memory or NULL if none + is available (e.g. on a jensen). */ +extern unsigned long _bus_base __P ((void)) __attribute__ ((const)); +extern unsigned long bus_base __P ((void)) __attribute__ ((const)); + +/* Return the physical address of the SPARSE I/O memory. */ +extern unsigned long _bus_base_sparse __P ((void)) __attribute__ ((const)); +extern unsigned long bus_base_sparse __P ((void)) __attribute__ ((const)); + +/* Return the HAE shift used by the SPARSE I/O memory. */ +extern int _hae_shift __P ((void)) __attribute__ ((const)); +extern int hae_shift __P ((void)) __attribute__ ((const)); + +__END_DECLS + +#endif /* _SYS_IO_H */ From 44b8acdd3a2f181b415a43e3f7c7dad66b0e4556 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 7 Sep 1996 04:10:03 +0000 Subject: [PATCH 0745/4487] update from main archive 960906 --- sysdeps/alpha/elf/start.S | 1 + sysdeps/unix/alpha/sysdep.S | 56 +++++++++++++++++++++++++++++++++---- 2 files changed, 51 insertions(+), 6 deletions(-) diff --git a/sysdeps/alpha/elf/start.S b/sysdeps/alpha/elf/start.S index d20a009aa4..c8b374afe5 100644 --- a/sysdeps/alpha/elf/start.S +++ b/sysdeps/alpha/elf/start.S @@ -21,6 +21,7 @@ Cambridge, MA 02139, USA. */ .text .align 3 + .globl _start .ent _start, 0 _start: .frame fp, 0, zero diff --git a/sysdeps/unix/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S index 336eb02029..8d70bda21e 100644 --- a/sysdeps/unix/alpha/sysdep.S +++ b/sysdeps/unix/alpha/sysdep.S @@ -17,8 +17,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#define _ERRNO_H -#include +#include .section .bss .globl errno @@ -30,15 +29,60 @@ errno: .space 4 #endif .text -LEAF(__syscall_error, 0) + .align 2 + +#ifdef _LIBC_REENTRANT + + .globl __syscall_error + .ent __syscall_error +__syscall_error: ldgp gp, 0(t12) + lda sp, -16(sp) + .frame sp, 16, ra, 0 + stq ra, 0(sp) + stq v0, 8(sp) + .mask 0x4000001, -16 .prologue 1 - /* Store return value in errno... */ - stl v0, errno + /* Find our pre-thread errno address */ + jsr ra, __errno_location + + /* Store the error value. */ + ldl t0, 8(sp) + stl t0, 0(v0) - /* And just kick back a -1. */ + /* And kick back a -1. */ ldi v0, -1 + + ldq ra, 0(sp) + lda sp, 16(sp) ret + .end __syscall_error + +/* A default non-threaded version of __errno_location that just returns + the address of errno. */ + + .weak __errno_location + .ent __errno_location +__errno_location: + .frame sp, 0, ra + ldgp gp, 0(t12) + .mask 0, 0 + .prologue 1 + lda v0, errno + ret + .end __errno_location + +#else + +ENTRY(__syscall_error) + ldgp gp, 0(t12) + .prologue 1 + + stl v0, errno + lda v0, -1 + ret END(__syscall_error) + +#endif /* _LIBC_REENTRANT */ From 16d6b38e4db6f3b9e41508d8ab902208f0ab9b04 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 10 Sep 1996 01:59:36 +0000 Subject: [PATCH 0746/4487] update from main archive 960909 --- sysdeps/alpha/{copysign.S => s_copysign.S} | 0 sysdeps/alpha/{fabs.S => s_fabs.S} | 5 +- sysdeps/m68k/fpu/__math.h | 4 +- sysdeps/m68k/fpu/e_acos.c | 6 +- sysdeps/m68k/fpu/e_fmod.c | 7 +- sysdeps/m68k/fpu/k_cos.c | 2 + sysdeps/m68k/fpu/k_sin.c | 4 +- sysdeps/m68k/fpu/k_tan.c | 6 +- sysdeps/m68k/fpu/s_atan.c | 1 + sysdeps/m68k/fpu/s_frexp.c | 1 + sysdeps/m68k/fpu/s_ilogb.c | 1 + sysdeps/m68k/fpu/s_isinf.c | 1 + sysdeps/m68k/fpu/s_ldexp.c | 1 + sysdeps/m68k/fpu/s_modf.c | 1 + sysdeps/m68k/{isinfl.c => s_isinfl.c} | 0 sysdeps/m68k/{isnanl.c => s_isnanl.c} | 0 sysdeps/tahoe/log10.c | 22 ---- sysdeps/unix/sysv/linux/alpha/Dist | 1 + sysdeps/unix/sysv/linux/m68k/init-first.h | 12 --- sysdeps/vax/Dist | 1 + sysdeps/vax/bcmp.s | 57 ----------- sysdeps/vax/index.s | 99 ------------------ sysdeps/vax/infnan.c | 62 ----------- sysdeps/vax/log10.c | 28 ----- sysdeps/vax/memcmp.s | 2 + sysdeps/vax/rindex.s | 113 --------------------- sysdeps/vax/strchr.s | 2 + sysdeps/vax/strrchr.s | 2 + 28 files changed, 37 insertions(+), 404 deletions(-) rename sysdeps/alpha/{copysign.S => s_copysign.S} (100%) rename sysdeps/alpha/{fabs.S => s_fabs.S} (94%) rename sysdeps/m68k/{isinfl.c => s_isinfl.c} (100%) rename sysdeps/m68k/{isnanl.c => s_isnanl.c} (100%) delete mode 100644 sysdeps/tahoe/log10.c delete mode 100644 sysdeps/unix/sysv/linux/m68k/init-first.h delete mode 100644 sysdeps/vax/bcmp.s delete mode 100644 sysdeps/vax/index.s delete mode 100644 sysdeps/vax/infnan.c delete mode 100644 sysdeps/vax/log10.c delete mode 100644 sysdeps/vax/rindex.s diff --git a/sysdeps/alpha/copysign.S b/sysdeps/alpha/s_copysign.S similarity index 100% rename from sysdeps/alpha/copysign.S rename to sysdeps/alpha/s_copysign.S diff --git a/sysdeps/alpha/fabs.S b/sysdeps/alpha/s_fabs.S similarity index 94% rename from sysdeps/alpha/fabs.S rename to sysdeps/alpha/s_fabs.S index dff8390b5a..12c0abdf75 100644 --- a/sysdeps/alpha/fabs.S +++ b/sysdeps/alpha/s_fabs.S @@ -19,9 +19,10 @@ Cambridge, MA 02139, USA. */ #include -ENTRY(fabs) +ENTRY(__fabs) .prologue 0 cpys $f31,$f16,$f0 ret - END(fabs) + END(__fabs) +weak_alias (__fabs, fabs) diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h index 2cbb4ca388..4992aea561 100644 --- a/sysdeps/m68k/fpu/__math.h +++ b/sysdeps/m68k/fpu/__math.h @@ -20,7 +20,7 @@ Cambridge, MA 02139, USA. */ #include -#ifdef __NO_MATH_INLINES +#ifdef __NO_M81_MATH_INLINES /* This is used when defining the functions themselves. Define them with __ names, and with `static inline' instead of `extern inline' so the bodies will always be used, never an external function call. */ @@ -29,7 +29,7 @@ Cambridge, MA 02139, USA. */ #else #define __m81_u(x) x #define __m81_inline extern __inline -#define __MATH_INLINES 1 +#define __M81_MATH_INLINES 1 #endif /* Define a const math function. */ diff --git a/sysdeps/m68k/fpu/e_acos.c b/sysdeps/m68k/fpu/e_acos.c index ae77dabf98..61c374d917 100644 --- a/sysdeps/m68k/fpu/e_acos.c +++ b/sysdeps/m68k/fpu/e_acos.c @@ -16,8 +16,9 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include +#define __NO_M81_MATH_INLINES #include +#include "math_private.h" #ifndef FUNC #define FUNC __ieee754_acos @@ -27,7 +28,8 @@ Cambridge, MA 02139, USA. */ #endif float_type -DEFUN(FUNC, (x), float_type x) +FUNC (x) + float_type x; { return __m81_u(FUNC)(x); } diff --git a/sysdeps/m68k/fpu/e_fmod.c b/sysdeps/m68k/fpu/e_fmod.c index 0b2468c06d..bf2f7ed1bb 100644 --- a/sysdeps/m68k/fpu/e_fmod.c +++ b/sysdeps/m68k/fpu/e_fmod.c @@ -16,8 +16,9 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include +#define __NO_M81_MATH_INLINES #include +#include "math_private.h" #ifndef FUNC #define FUNC __ieee754_fmod @@ -27,7 +28,9 @@ Cambridge, MA 02139, USA. */ #endif float_type -DEFUN(FUNC, (x, y), float_type x AND float_type y) +FUNC (x, y) + float_type x; + float_type y; { return __m81_u(FUNC)(x, y); } diff --git a/sysdeps/m68k/fpu/k_cos.c b/sysdeps/m68k/fpu/k_cos.c index 61f566f6a1..6bb9090568 100644 --- a/sysdeps/m68k/fpu/k_cos.c +++ b/sysdeps/m68k/fpu/k_cos.c @@ -16,7 +16,9 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#define __NO_M81_MATH_INLINES #include +#include "math_private.h" #ifndef FUNC #define FUNC cos diff --git a/sysdeps/m68k/fpu/k_sin.c b/sysdeps/m68k/fpu/k_sin.c index 3eed1d466c..f10c7f9801 100644 --- a/sysdeps/m68k/fpu/k_sin.c +++ b/sysdeps/m68k/fpu/k_sin.c @@ -16,7 +16,9 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#define __NO_M81_MATH_INLINES #include +#include "math_private.h" #ifndef FUNC #define FUNC sin @@ -35,7 +37,7 @@ __CONCATX(__kernel_,FUNC) (x, y, iy) { float_type sin_x, cos_x, sin_y, cos_y; if (iy == 0) - return __m81_u_(__CONCATX(__,FUNC)) (x); + return __m81_u(__CONCATX(__,FUNC)) (x); __asm__ __volatile__ ("fsincosx %2,%0:%1" : "=f" (cos_x), "=f" (sin_x) : "f" (x)); __asm__ __volatile__ ("fsincosx %2,%0:%1" : "=f" (cos_y), "=f" (sin_y) diff --git a/sysdeps/m68k/fpu/k_tan.c b/sysdeps/m68k/fpu/k_tan.c index 7f1b729b96..9c222cd6e1 100644 --- a/sysdeps/m68k/fpu/k_tan.c +++ b/sysdeps/m68k/fpu/k_tan.c @@ -16,7 +16,9 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#define __NO_M81_MATH_INLINES #include +#include "math_private.h" #ifndef FUNC #define FUNC tan @@ -34,8 +36,8 @@ __CONCATX(__kernel_,FUNC) (x, y, iy) int iy; { float_type tan_x, tan_y; - tan_x = __m81_u_(__CONCATX(__,FUNC)) (x); - tan_y = __m81_u_(__CONCATX(__,FUNC)) (y); + tan_x = __m81_u(__CONCATX(__,FUNC)) (x); + tan_y = __m81_u(__CONCATX(__,FUNC)) (y); if (iy > 0) return (tan_x + tan_y) / (1 - tan_x * tan_y); else diff --git a/sysdeps/m68k/fpu/s_atan.c b/sysdeps/m68k/fpu/s_atan.c index 29717d4395..99b3024326 100644 --- a/sysdeps/m68k/fpu/s_atan.c +++ b/sysdeps/m68k/fpu/s_atan.c @@ -17,6 +17,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include +#define __NO_M81_MATH_INLINES #include #ifndef FUNC diff --git a/sysdeps/m68k/fpu/s_frexp.c b/sysdeps/m68k/fpu/s_frexp.c index 16f30394b2..8b38086e27 100644 --- a/sysdeps/m68k/fpu/s_frexp.c +++ b/sysdeps/m68k/fpu/s_frexp.c @@ -17,6 +17,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include +#define __NO_M81_MATH_INLINES #include #ifndef FUNC diff --git a/sysdeps/m68k/fpu/s_ilogb.c b/sysdeps/m68k/fpu/s_ilogb.c index c80a288949..39c871481d 100644 --- a/sysdeps/m68k/fpu/s_ilogb.c +++ b/sysdeps/m68k/fpu/s_ilogb.c @@ -17,6 +17,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include +#define __NO_M81_MATH_INLINES #include #ifndef FUNC diff --git a/sysdeps/m68k/fpu/s_isinf.c b/sysdeps/m68k/fpu/s_isinf.c index 570a7ba7bb..7d4b1c44a5 100644 --- a/sysdeps/m68k/fpu/s_isinf.c +++ b/sysdeps/m68k/fpu/s_isinf.c @@ -17,6 +17,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include +#define __NO_M81_MATH_INLINES #include #ifndef FUNC diff --git a/sysdeps/m68k/fpu/s_ldexp.c b/sysdeps/m68k/fpu/s_ldexp.c index ea8bfbab88..18f4d43c37 100644 --- a/sysdeps/m68k/fpu/s_ldexp.c +++ b/sysdeps/m68k/fpu/s_ldexp.c @@ -17,6 +17,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include +#define __NO_M81_MATH_INLINES #include #ifndef FUNC diff --git a/sysdeps/m68k/fpu/s_modf.c b/sysdeps/m68k/fpu/s_modf.c index f704260e21..426d847ebd 100644 --- a/sysdeps/m68k/fpu/s_modf.c +++ b/sysdeps/m68k/fpu/s_modf.c @@ -17,6 +17,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include +#define __NO_M81_MATH_INLINES #include #ifndef FUNC diff --git a/sysdeps/m68k/isinfl.c b/sysdeps/m68k/s_isinfl.c similarity index 100% rename from sysdeps/m68k/isinfl.c rename to sysdeps/m68k/s_isinfl.c diff --git a/sysdeps/m68k/isnanl.c b/sysdeps/m68k/s_isnanl.c similarity index 100% rename from sysdeps/m68k/isnanl.c rename to sysdeps/m68k/s_isnanl.c diff --git a/sysdeps/tahoe/log10.c b/sysdeps/tahoe/log10.c deleted file mode 100644 index 2cf2cee58b..0000000000 --- a/sysdeps/tahoe/log10.c +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright (C) 1991 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#define FPCONST(hi0, lo0, hi1, lo1) { (hi0), (lo0), (hi1), (lo1) } - -#include <../sysdeps/vax/log10.c> - diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist index d898d041a2..d79f1f2970 100644 --- a/sysdeps/unix/sysv/linux/alpha/Dist +++ b/sysdeps/unix/sysv/linux/alpha/Dist @@ -4,3 +4,4 @@ ioperm.c init-first.h clone.S sys/io.h +llseek.S diff --git a/sysdeps/unix/sysv/linux/m68k/init-first.h b/sysdeps/unix/sysv/linux/m68k/init-first.h deleted file mode 100644 index 7d8c320b0a..0000000000 --- a/sysdeps/unix/sysv/linux/m68k/init-first.h +++ /dev/null @@ -1,12 +0,0 @@ -/* This fragment is invoked in the stack context of program start. - Its job is to set up a pointer to argc as an argument, pass - control to `INIT', and, if necessary, clean up after the call - to leave the stack in the same condition it was found in. */ - -#define SYSDEP_CALL_INIT(NAME, INIT) \ - asm(".globl " #NAME "\n\t" \ - #NAME ":\n\t" \ - "pea %sp@(4)\n\t" \ - "jbsr " #INIT "\n\t" \ - "addq #4,%sp\n\t" \ - "rts"); diff --git a/sysdeps/vax/Dist b/sysdeps/vax/Dist index 9830be29a4..22a693094a 100644 --- a/sysdeps/vax/Dist +++ b/sysdeps/vax/Dist @@ -1 +1,2 @@ DEFS.h +fl.h diff --git a/sysdeps/vax/bcmp.s b/sysdeps/vax/bcmp.s deleted file mode 100644 index d980feb8e4..0000000000 --- a/sysdeps/vax/bcmp.s +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 1983 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#if defined(LIBC_SCCS) && !defined(lint) - .asciz "@(#)bcmp.s 5.6 (Berkeley) 6/1/90" -#endif /* LIBC_SCCS and not lint */ - -/* bcmp(s1, s2, n) */ - -#include "DEFS.h" - -ENTRY(bcmp, 0) - movl 4(ap),r1 - movl 8(ap),r3 - movl 12(ap),r4 -1: - movzwl $65535,r0 - cmpl r4,r0 - jleq 2f - subl2 r0,r4 - cmpc3 r0,(r1),(r3) - jeql 1b - addl2 r4,r0 - ret -2: - cmpc3 r4,(r1),(r3) - ret diff --git a/sysdeps/vax/index.s b/sysdeps/vax/index.s deleted file mode 100644 index e599b276f0..0000000000 --- a/sysdeps/vax/index.s +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#if defined(LIBC_SCCS) && !defined(lint) - .asciz "@(#)index.s 5.6 (Berkeley) 6/1/90" -#endif /* LIBC_SCCS and not lint */ - -/* - * Find the first occurence of c in the string cp. - * Return pointer to match or null pointer. - * - * char * - * index(cp, c) - * char *cp, c; - */ -#include "DEFS.h" - -ENTRY(index, 0) - movq 4(ap),r1 # r1 = cp; r2 = c - tstl r2 # check for special case c == '\0' - bneq 2f -1: - locc $0,$65535,(r1) # just find end of string - beql 1b # still looking - movl r1,r0 # found it - ret -2: - moval tbl,r3 # r3 = address of table - bbss $0,(r3),5f # insure not reentering - movab (r3)[r2],r5 # table entry for c - incb (r5) - movzwl $65535,r4 # fast access -3: - scanc r4,(r1),(r3),$1 # look for c or '\0' - beql 3b # still looking - movl r1,r0 # return pointer to char - tstb (r0) # if have found '\0' - bneq 4f - clrl r0 # else return 0 -4: - clrb (r5) # clean up table - clrb (r3) - ret - - .data -tbl: .space 256 - .text - -/* - * Reentrant, but slower version of index - */ -5: - movl r1,r3 -6: - locc $0,$65535,(r3) # look for '\0' - bneq 7f - locc r2,$65535,(r3) # look for c - bneq 8f - movl r1,r3 # reset pointer and ... - jbr 6b # ... try again -7: - subl3 r3,r1,r4 # length of short block - incl r4 # +1 for '\0' - locc r2,r4,(r3) # look for c - bneq 8f - ret -8: - movl r1,r0 # return pointer to char - ret diff --git a/sysdeps/vax/infnan.c b/sysdeps/vax/infnan.c deleted file mode 100644 index 62ec9dca0f..0000000000 --- a/sysdeps/vax/infnan.c +++ /dev/null @@ -1,62 +0,0 @@ -/* Copyright (C) 1991, 1992, 1995 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#ifndef __GNUC__ - #error This file uses GNU C extensions; you must compile with GCC. -#else - -#include -#include -#include - -/* Deal with an infinite or NaN result. - If ERROR is ERANGE, result is +Inf; - if ERROR is - ERANGE, result is -Inf; - otherwise result is NaN. - This will set `errno' to either ERANGE or EDOM, - and may return an infinity or NaN, or may do something else. */ -double -DEFUN(__infnan, (error), int error) -{ - switch (error) - { - case ERANGE: - errno = ERANGE; - break; - - case - ERANGE: - errno = ERANGE; - break; - - default: - errno = EDOM; - break; - } - - /* Trigger a reserved operand fault. */ - { - double result; - asm volatile("emodd %1, %1, %2, %0, %0" : "=r" (result) : - "i" (0), "i" (0x8000)); - return result; - } -} - -#endif - -weak_alias (__infnan, infnan) diff --git a/sysdeps/vax/log10.c b/sysdeps/vax/log10.c deleted file mode 100644 index 08741779eb..0000000000 --- a/sysdeps/vax/log10.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 1991 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -#ifndef FPCONST -#define FPCONST(hi0, lo0, hi1, lo1) { (lo0), (hi0), (lo1), (hi1) } -#endif - -static CONST short int ln10[] = FPCONST(0x4113, 0x5d8d, 0xddaa, 0xa8ac); -#define LN10 (*(CONST double *) ln10) - -#include <../sysdeps/generic/log10.c> diff --git a/sysdeps/vax/memcmp.s b/sysdeps/vax/memcmp.s index 3854fd8e4a..f7e47ded46 100644 --- a/sysdeps/vax/memcmp.s +++ b/sysdeps/vax/memcmp.s @@ -59,3 +59,5 @@ ENTRY(memcmp, 0) cmpc3 r5,(r1),(r3) jeql 0b /* loop if same */ jbr 1b + +weak_alias (memcmp, bcmp) diff --git a/sysdeps/vax/rindex.s b/sysdeps/vax/rindex.s deleted file mode 100644 index 76d7e29597..0000000000 --- a/sysdeps/vax/rindex.s +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (c) 1983 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#if defined(LIBC_SCCS) && !defined(lint) - .asciz "@(#)rindex.s 5.6 (Berkeley) 6/1/90" -#endif /* LIBC_SCCS and not lint */ - -/* - * Find the last occurence of c in the string cp. - * Return pointer to match or null pointer. - * - * char * - * rindex(cp, c) - * char *cp, c; - */ -#include "DEFS.h" - -ENTRY(rindex, 0) - movq 4(ap),r1 # r1 = cp; r2 = c - tstl r2 # check for special case c == '\0' - bneq 2f -1: - locc $0,$65535,(r1) # just find end of string - beql 1b # still looking - movl r1,r0 # found it - ret -2: - moval tbl,r3 # r3 = address of table - bbss $0,(r3),5f # insure not reentering - movab (r3)[r2],r5 # table entry for c - incb (r5) - clrl r4 # last found -3: - scanc $65535,(r1),(r3),$1 # look for c or '\0' - beql 3b # keep looking - tstb (r1) # if have found '\0' - beql 4f # we are done - movl r1,r4 # save most recently found - incl r1 # skip over character - jbr 3b # keep looking -4: - movl r4,r0 # return last found (if any) - clrb (r5) # clean up table - clrb (r3) - ret - - .data -tbl: .space 256 - .text - -/* - * Reentrant, but slower version of rindex - */ -5: - movl r1,r3 - clrl r4 # r4 = pointer to last match -6: - locc $0,$65535,(r3) # look for '\0' - bneq 8f - decw r0 # r0 = 65535 -1: - locc r2,r0,(r3) # look for c - bneq 7f - movl r1,r3 # reset pointer and ... - jbr 6b # ... try again -7: - movl r1,r4 # stash pointer ... - addl3 $1,r1,r3 # ... skip over match and ... - decl r0 # ... decrement count - jbr 6b # ... try again -8: - subl3 r3,r1,r0 # length of short block - incl r0 # +1 for '\0' -9: - locc r2,r0,(r3) # look for c - beql 0f - movl r1,r4 # stash pointer ... - addl3 $1,r1,r3 # ... skip over match ... - decl r0 # ... adjust count and ... - jbr 9b # ... try again -0: - movl r4,r0 # return stashed pointer - ret diff --git a/sysdeps/vax/strchr.s b/sysdeps/vax/strchr.s index 18b53838ec..1683f564e2 100644 --- a/sysdeps/vax/strchr.s +++ b/sysdeps/vax/strchr.s @@ -103,3 +103,5 @@ Lreent: beql 2f /* not found: return NULL */ movl r1,r0 2: ret + +weak_alias (strchr, index) diff --git a/sysdeps/vax/strrchr.s b/sysdeps/vax/strrchr.s index f292eaceab..dffcddaef0 100644 --- a/sysdeps/vax/strrchr.s +++ b/sysdeps/vax/strrchr.s @@ -112,3 +112,5 @@ Lreent: 3: movl r5,r0 /* return stashed pointer */ ret + +weak_alias (strrchr, rindex) From 862eb33e44f4d0ee3dd874f5f2a7e812d753cb01 Mon Sep 17 00:00:00 2001 From: "Thomas Bushnell, BSG" Date: Wed, 11 Sep 1996 02:47:56 +0000 Subject: [PATCH 0747/4487] *** empty log message *** --- sysdeps/mach/hurd/alpha/longjmp-ctx.c | 38 ------------------------- sysdeps/mach/hurd/mips/init-fault.c | 41 --------------------------- sysdeps/mach/hurd/mips/longjmp-ctx.c | 41 --------------------------- 3 files changed, 120 deletions(-) delete mode 100644 sysdeps/mach/hurd/alpha/longjmp-ctx.c delete mode 100644 sysdeps/mach/hurd/mips/init-fault.c delete mode 100644 sysdeps/mach/hurd/mips/longjmp-ctx.c diff --git a/sysdeps/mach/hurd/alpha/longjmp-ctx.c b/sysdeps/mach/hurd/alpha/longjmp-ctx.c deleted file mode 100644 index dfc16fdfe4..0000000000 --- a/sysdeps/mach/hurd/alpha/longjmp-ctx.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Perform a `longjmp' on a `struct sigcontext'. Alpha version. -Copyright (C) 1994 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include -#include - -void -_hurd_longjmp_sigcontext (struct sigcontext *scp, jmp_buf env, int retval) -{ - memset (scp, 0, sizeof (*scp)); - scp->sc_regs[9] = env[0].__9; - scp->sc_regs[11] = env[0].__11; - scp->sc_regs[12] = env[0].__12; - scp->sc_regs[13] = env[0].__13; - scp->sc_regs[14] = env[0].__14; - scp->sc_regs[15] = (long int) env[0].__fp; - scp->sc_regs[30] = (long int) env[0].__sp; - scp->sc_pc = (long int) env[0].__pc; - - memcpy (&scp->sc_fpregs[2], &env[0].__f2, sizeof (double)); -} diff --git a/sysdeps/mach/hurd/mips/init-fault.c b/sysdeps/mach/hurd/mips/init-fault.c deleted file mode 100644 index e6f8acf64d..0000000000 --- a/sysdeps/mach/hurd/mips/init-fault.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Set up a thread_state for proc_handle_exceptions. MIPS version. -Copyright (C) 1994 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include -#include -#include - -extern jmp_buf _hurd_sigthread_fault_env; - -static char fault_stack[32]; -static volatile void -faulted (void) -{ - __longjmp (_hurd_sigthread_fault_env, 1); -} - -void -_hurd_initialize_fault_recovery_state (void *state) -{ - struct mips_thread_state *ts = state; - memset (ts, 0, sizeof (*ts)); - ts->r29 = (int) &fault_stack[sizeof (fault_stack)]; - ts->pc = (int) &faulted; -} diff --git a/sysdeps/mach/hurd/mips/longjmp-ctx.c b/sysdeps/mach/hurd/mips/longjmp-ctx.c deleted file mode 100644 index 0c78f6b4d6..0000000000 --- a/sysdeps/mach/hurd/mips/longjmp-ctx.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Perform a `longjmp' on a `struct sigcontext'. MIPS version. -Copyright (C) 1994 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include -#include - -void -_hurd_longjmp_sigcontext (struct sigcontext *scp, jmp_buf env, int retval) -{ - scp->sc_gpr[16] = env[0].__regs[0]; - scp->sc_gpr[17] = env[0].__regs[1]; - scp->sc_gpr[18] = env[0].__regs[2]; - scp->sc_gpr[19] = env[0].__regs[3]; - scp->sc_gpr[20] = env[0].__regs[4]; - scp->sc_gpr[21] = env[0].__regs[5]; - scp->sc_gpr[22] = env[0].__regs[6]; - scp->sc_gpr[23] = env[0].__regs[7]; - - scp->sc_gpr[28] = (int) env[0].__gp; - scp->sc_fp = (int) env[0].__fp; - scp->sc_sp = (int) env[0].__sp; - scp->sc_pc = (int) env[0].__pc; - scp->sc_gpr[2] = retval ?: 1; -} From bf4b3107628855b3084c448615858f2e80ffaa3f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 12 Sep 1996 02:50:36 +0000 Subject: [PATCH 0748/4487] update from main archive 960911 --- sysdeps/unix/sysv/linux/m68k/Dist | 1 - sysdeps/unix/sysv/linux/m68k/sysdep.S | 39 +++++++++++++++------------ sysdeps/unix/sysv/linux/m68k/sysdep.h | 20 +++++++++++++- 3 files changed, 41 insertions(+), 19 deletions(-) diff --git a/sysdeps/unix/sysv/linux/m68k/Dist b/sysdeps/unix/sysv/linux/m68k/Dist index a281cba3f9..738b9cc542 100644 --- a/sysdeps/unix/sysv/linux/m68k/Dist +++ b/sysdeps/unix/sysv/linux/m68k/Dist @@ -1,2 +1 @@ -init-first.h clone.S diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.S b/sysdeps/unix/sysv/linux/m68k/sysdep.S index 895ea2770b..674715f824 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.S +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.S @@ -33,8 +33,9 @@ errno: .space 4 _errno = errno /* This name is expected by hj libc.so.5 startup code. */ .text -/* The following code is not used at all in the shared library. - The PIC system call stubs set errno themselves. */ +/* The following code is only used in the shared library when we + compile the reentrant version. Otherwise each system call defines + each own version. */ #ifndef PIC @@ -42,30 +43,34 @@ _errno = errno /* This name is expected by hj libc.so.5 startup code. */ #define _ERRNO_H #include -.globl errno -.globl __syscall_error - /* The syscall stubs jump here when they detect an error. */ .globl __syscall_error __syscall_error: neg.l %d0 - -#if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN - /* We translate the system's EWOULDBLOCK error into EAGAIN. - The GNU C library always defines EWOULDBLOCK==EAGAIN. - EWOULDBLOCK_sys is the original number. */ - move.l #EWOULDBLOCK_sys, %d1 - cmp.l %d0, %d1 - jne 1f - move.l #EAGAIN, %d0 -1: -#endif - move.l %d0, errno +#ifdef _LIBC_REENTRANT + move.l %d0, -(%sp) + jbsr __errno_location + move.l (%sp)+, (%a0) +#endif move.l #-1, %d0 /* Copy return value to %a0 for syscalls that are declared to return a pointer. */ move.l %d0, %a0 rts + .size __syscall_error, . - __syscall_error #endif /* PIC */ + +#ifdef _LIBC_REENTRANT + .globl __errno_location + .type __errno_location, @function +__errno_location: +#ifdef PIC + move.l (%pc, errno@GOTPC), %a0 +#else + lea errno, %a0 +#endif + rts + .size __errno_location, . - __errno_location +#endif diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h index fe2c6aa823..9de750c326 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -78,19 +78,37 @@ Cambridge, MA 02139, USA. */ #ifdef PIC /* Store (- %d0) into errno through the GOT. */ +#ifdef _LIBC_REENTRANT #define SYSCALL_ERROR_HANDLER \ + .type syscall_error, @function; \ syscall_error: \ move.l (errno@GOTPC, %pc), %a0; \ neg.l %d0; \ move.l %d0, (%a0); \ + move.l %d0, -(%sp); \ + jbsr __errno_location@PLTPC \ + move.l (%sp)+, (%a0); \ move.l POUND -1, %d0; \ /* Copy return value to %a0 for syscalls that are declared to return \ a pointer (e.g., mmap). */ \ move.l %d0, %a0; \ rts; #else +#define SYSCALL_ERROR_HANDLER \ + .type syscall_error, @function; \ +syscall_error: \ + move.l (errno@GOTPC, %pc), %a0; \ + neg.l %d0; \ + move.l %d0, (%a0); \ + move.l POUND -1, %d0; \ + /* Copy return value to %a0 for syscalls that are declared to return \ + a pointer (e.g., mmap). */ \ + move.l %d0, %a0; \ + rts; +#endif /* _LIBC_REENTRANT */ +#else #define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */ -#endif +#endif /* PIC */ /* Linux takes system call arguments in registers: From 22a45bf1a84e99417bffe52cfaf4b592ba205715 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 20 Sep 1996 01:57:51 +0000 Subject: [PATCH 0749/4487] update from main archive 960919 --- sysdeps/m68k/fpu/__math.h | 775 ++++++++------------------ sysdeps/m68k/fpu/s_ldexp.c | 39 -- sysdeps/m68k/fpu/s_ldexpf.c | 5 - sysdeps/m68k/fpu/s_ldexpl.c | 5 - sysdeps/m68k/fpu/s_scalbn.c | 38 ++ sysdeps/m68k/fpu/s_scalbnf.c | 4 + sysdeps/m68k/fpu/s_scalbnl.c | 4 + sysdeps/unix/sysv/linux/m68k/sysdep.S | 2 - 8 files changed, 277 insertions(+), 595 deletions(-) delete mode 100644 sysdeps/m68k/fpu/s_ldexp.c delete mode 100644 sysdeps/m68k/fpu/s_ldexpf.c delete mode 100644 sysdeps/m68k/fpu/s_ldexpl.c diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h index 4992aea561..0e3e2a3d8c 100644 --- a/sysdeps/m68k/fpu/__math.h +++ b/sysdeps/m68k/fpu/__math.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. +/* Copyright (C) 1991, 92, 93, 94, 96 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 @@ -39,30 +39,30 @@ Cambridge, MA 02139, USA. */ __m81_inline rettype \ __m81_u(func) args +/* Define the three variants of a math function that has a direct + implementation in the m68k fpu. FUNC is the name for C (which will be + suffixed with f and l for the float and long double version, resp). OP + is the name of the fpu operation (without leading f). */ #define __inline_mathop(func, op) \ __m81_defun (double, func, (double __mathop_x)) \ { \ double __result; \ __asm("f" __STRING(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x));\ return __result; \ - } - -#define __inline_mathopf(func, op) \ - __m81_defun (float, func, (float __mathop_x)) \ + } \ + __m81_defun (float, func##f, (float __mathop_x)) \ { \ float __result; \ __asm("f" __STRING(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x));\ return __result; \ - } - -#define __inline_mathopl(func, op) \ - __m81_defun (long double, func, (long double __mathop_x)) \ + } \ + __m81_defun (long double, func##l, (long double __mathop_x)) \ { \ long double __result; \ __asm("f" __STRING(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x));\ return __result; \ } - + /* ieee style elementary functions */ __inline_mathop(__ieee754_acos, acos) __inline_mathop(__ieee754_asin, asin) @@ -74,28 +74,6 @@ __inline_mathop(__ieee754_log, logn) __inline_mathop(__ieee754_sqrt, sqrt) __inline_mathop(__ieee754_atanh, atanh) -/* ieee style elementary float functions */ -__inline_mathopf(__ieee754_acosf, acos) -__inline_mathopf(__ieee754_asinf, asin) -__inline_mathopf(__ieee754_coshf, cosh) -__inline_mathopf(__ieee754_sinhf, sinh) -__inline_mathopf(__ieee754_expf, etox) -__inline_mathopf(__ieee754_log10f, log10) -__inline_mathopf(__ieee754_logf, logn) -__inline_mathopf(__ieee754_sqrtf, sqrt) -__inline_mathopf(__ieee754_atanhf, atan) - -/* ieee style elementary long double functions */ -__inline_mathopl(__ieee754_acosl, acos) -__inline_mathopl(__ieee754_asinl, asin) -__inline_mathopl(__ieee754_coshl, cosh) -__inline_mathopl(__ieee754_sinhl, sinh) -__inline_mathopl(__ieee754_expl, etox) -__inline_mathopl(__ieee754_log10l, log10) -__inline_mathopl(__ieee754_logl, logn) -__inline_mathopl(__ieee754_sqrtl, sqrt) -__inline_mathopl(__ieee754_atanhl, atan) - __inline_mathop(__atan, atan) __inline_mathop(__cos, cos) __inline_mathop(__sin, sin) @@ -110,517 +88,226 @@ __inline_mathop(__log1p, lognp1) __inline_mathop(__logb, log2) __inline_mathop(__significand, getman) -__inline_mathopf(__atanf, atan) -__inline_mathopf(__cosf, cos) -__inline_mathopf(__sinf, sin) -__inline_mathopf(__tanf, tan) -__inline_mathopf(__tanhf, tanh) -__inline_mathopf(__fabsf, abs) -__inline_mathopf(__sqrtf, sqrt) - -__inline_mathopf(__rintf, int) -__inline_mathopf(__expm1f, etoxm1) -__inline_mathopf(__log1pf, lognp1) -__inline_mathopf(__logbf, log2) -__inline_mathopf(__significandf, getman) - -__inline_mathopl(__atanl, atan) -__inline_mathopl(__cosl, cos) -__inline_mathopl(__sinl, sin) -__inline_mathopl(__tanl, tan) -__inline_mathopl(__tanhl, tanh) -__inline_mathopl(__fabsl, abs) -__inline_mathopl(__sqrtl, sqrt) - -__inline_mathopl(__rintl, int) -__inline_mathopl(__expm1l, etoxm1) -__inline_mathopl(__log1pl, lognp1) -__inline_mathopl(__logbl, log2) -__inline_mathopl(__significandl, getman) - -__m81_defun (double, __ieee754_remainder, (double __x, double __y)) -{ - double __result; - __asm("frem%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); - return __result; -} - -__m81_defun (double, __ldexp, (double __x, int __e)) -{ - double __result; - double __double_e = (double) __e; - __asm("fscale%.x %1, %0" : "=f" (__result) : "f" (__double_e), "0" (__x)); - return __result; -} - -__m81_defun (double, __ieee754_fmod, (double __x, double __y)) -{ - double __result; - __asm("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); - return __result; -} - -__m81_inline double -__m81_u(__frexp)(double __value, int *__expptr) -{ - double __mantissa, __exponent; - __asm("fgetexp%.x %1, %0" : "=f" (__exponent) : "f" (__value)); - __asm("fgetman%.x %1, %0" : "=f" (__mantissa) : "f" (__value)); - *__expptr = (int) __exponent; - return __mantissa; -} - -__m81_defun (double, __floor, (double __x)) -{ - double __result; - unsigned long int __ctrl_reg; - __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); - /* Set rounding towards negative infinity. */ - __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ - : "dmi" ((__ctrl_reg & ~0x10) | 0x20)); - /* Convert X to an integer, using -Inf rounding. */ - __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); - /* Restore the previous rounding mode. */ - __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ - : "dmi" (__ctrl_reg)); - return __result; -} - -__m81_defun (double, __ieee754_pow, (double __x, double __y)) -{ - double __result; - if (__x == 0.0) - { - if (__y <= 0.0) - __result = 0.0 / 0.0; - else - __result = 0.0; - } - else if (__y == 0.0 || __x == 1.0) - __result = 1.0; - else if (__y == 1.0) - __result = __x; - else if (__y == 2.0) - __result = __x * __x; - else if (__x == 10.0) - __asm("ftentox%.x %1, %0" : "=f" (__result) : "f" (__y)); - else if (__x == 2.0) - __asm("ftwotox%.x %1, %0" : "=f" (__result) : "f" (__y)); - else if (__x < 0.0) - { - double __temp = __m81_u (__rint) (__y); - if (__y == __temp) - { - int i = (int) __y; - __result = __m81_u(__ieee754_exp)(__y * __m81_u(__ieee754_log)(-__x)); - if (i & 1) - __result = -__result; - } - else - __result = 0.0 / 0.0; - } - else - __result = __m81_u(__ieee754_exp)(__y * __m81_u(__ieee754_log)(__x)); - return __result; -} - -__m81_defun (double, __ceil, (double __x)) -{ - double __result; - unsigned long int __ctrl_reg; - __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); - /* Set rounding towards positive infinity. */ - __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ - : "dmi" (__ctrl_reg | 0x30)); - /* Convert X to an integer, using +Inf rounding. */ - __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); - /* Restore the previous rounding mode. */ - __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ - : "dmi" (__ctrl_reg)); - return __result; -} - -__m81_inline double -__m81_u(__modf)(double __value, double *__iptr) -{ - double __modf_int; - __asm ("fintrz%.x %1, %0" : "=f" (__modf_int) : "f" (__value)); - *__iptr = __modf_int; - return __value - __modf_int; -} - -__m81_defun (int, __isinf, (double __value)) -{ - /* There is no branch-condition for infinity, - so we must extract and examine the condition codes manually. */ - unsigned long int __fpsr; - __asm("ftst%.x %1\n" - "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); - return (__fpsr & (2 << 24)) ? (__fpsr & (8 << 24) ? -1 : 1) : 0; -} - -__m81_defun (int, __isnan, (double __value)) -{ - char __result; - __asm("ftst%.x %1\n" - "fsun %0" : "=dm" (__result) : "f" (__value)); - return __result; -} - -__m81_defun (int, __finite, (double __value)) -{ - /* There is no branch-condition for infinity, so we must extract and - examine the condition codes manually. */ - unsigned long int __fpsr; - __asm ("ftst%.x %1\n" - "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); - return (__fpsr & (3 << 24)) == 0; -} - -__m81_defun (int, __ilogb, (double __x)) -{ - double __result; - __asm("fgetexp%.x %1, %0" : "=f" (__result) : "f" (__x)); - return (int) __result; -} - -__m81_defun (double, __ieee754_scalb, (double __x, double __n)) -{ - double __result; - __asm ("fscale%.x %1, %0" : "=f" (__result) : "f" (__n), "0" (__x)); - return __result; -} - -__m81_defun (double, __scalbn, (double __x, int __n)) -{ - double __result; - double __double_n = (double) __n; - __asm ("fscale%.x %1, %0" : "=f" (__result) : "f" (__double_n), "0" (__x)); - return __result; -} - -__m81_defun (float, __ieee754_remainderf, (float __x, float __y)) -{ - float __result; - __asm("frem%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); - return __result; -} - -__m81_defun (float, __ldexpf, (float __x, int __e)) -{ - float __result; - float __float_e = (float) __e; - __asm("fscale%.x %1, %0" : "=f" (__result) : "f" (__float_e), "0" (__x)); - return __result; -} - -__m81_defun (float, __ieee754_fmodf, (float __x, float __y)) -{ - float __result; - __asm("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); - return __result; -} - -__m81_inline float -__m81_u(__frexpf)(float __value, int *__expptr) -{ - float __mantissa, __exponent; - __asm("fgetexp%.x %1, %0" : "=f" (__exponent) : "f" (__value)); - __asm("fgetman%.x %1, %0" : "=f" (__mantissa) : "f" (__value)); - *__expptr = (int) __exponent; - return __mantissa; -} - -__m81_defun (float, __floorf, (float __x)) -{ - float __result; - unsigned long int __ctrl_reg; - __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); - /* Set rounding towards negative infinity. */ - __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ - : "dmi" ((__ctrl_reg & ~0x10) | 0x20)); - /* Convert X to an integer, using -Inf rounding. */ - __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); - /* Restore the previous rounding mode. */ - __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ - : "dmi" (__ctrl_reg)); - return __result; -} - -__m81_defun (float, __ieee754_powf, (float __x, float __y)) -{ - float __result; - if (__x == 0.0f) - { - if (__y <= 0.0f) - __result = 0.0f / 0.0f; - else - __result = 0.0f; - } - else if (__y == 0.0f || __x == 1.0f) - __result = 1.0; - else if (__y == 1.0f) - __result = __x; - else if (__y == 2.0f) - __result = __x * __x; - else if (__x == 10.0f) - __asm("ftentox%.x %1, %0" : "=f" (__result) : "f" (__y)); - else if (__x == 2.0f) - __asm("ftwotox%.x %1, %0" : "=f" (__result) : "f" (__y)); - else if (__x < 0.0f) - { - float __temp = __m81_u(__rintf)(__y); - if (__y == __temp) - { - int i = (int) __y; - __result = __m81_u(__ieee754_expf)(__y * __m81_u(__ieee754_logf)(-__x)); - if (i & 1) - __result = -__result; - } - else - __result = 0.0f / 0.0f; - } - else - __result = __m81_u(__ieee754_expf)(__y * __m81_u(__ieee754_logf)(__x)); - return __result; -} - -__m81_defun (float, __ceilf, (float __x)) -{ - float __result; - unsigned long int __ctrl_reg; - __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); - /* Set rounding towards positive infinity. */ - __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ - : "dmi" (__ctrl_reg | 0x30)); - /* Convert X to an integer, using +Inf rounding. */ - __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); - /* Restore the previous rounding mode. */ - __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ - : "dmi" (__ctrl_reg)); - return __result; -} - -__m81_inline float -__m81_u(__modff)(float __value, float *__iptr) -{ - float __modf_int; - __asm ("fintrz%.x %1, %0" : "=f" (__modf_int) : "f" (__value)); - *__iptr = __modf_int; - return __value - __modf_int; -} - -__m81_defun (int, __isinff, (float __value)) -{ - /* There is no branch-condition for infinity, - so we must extract and examine the condition codes manually. */ - unsigned long int __fpsr; - __asm("ftst%.x %1\n" - "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); - return (__fpsr & (2 << 24)) ? (__fpsr & (8 << 24) ? -1 : 1) : 0; -} - -__m81_defun (int, __isnanf, (float __value)) -{ - char __result; - __asm("ftst%.x %1\n" - "fsun %0" : "=dm" (__result) : "f" (__value)); - return __result; -} - -__m81_defun (int, __finitef, (float __value)) -{ - /* There is no branch-condition for infinity, so we must extract and - examine the condition codes manually. */ - unsigned long int __fpsr; - __asm ("ftst%.x %1\n" - "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); - return (__fpsr & (3 << 24)) == 0; -} - -__m81_defun (int, __ilogbf, (float __x)) -{ - float __result; - __asm("fgetexp%.x %1, %0" : "=f" (__result) : "f" (__x)); - return (int) __result; -} - -__m81_defun (float, __ieee754_scalbf, (float __x, float __n)) -{ - float __result; - __asm ("fscale%.x %1, %0" : "=f" (__result) : "f" (__n), "0" (__x)); - return __result; -} - -__m81_defun (float, __scalbnf, (float __x, int __n)) -{ - float __result; - float __float_n = (float) __n; - __asm ("fscale%.x %1, %0" : "=f" (__result) : "f" (__float_n), "0" (__x)); - return __result; -} - -__m81_defun (long double, __ieee754_remainderl, (long double __x, - long double __y)) -{ - long double __result; - __asm ("frem%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); - return __result; -} - -__m81_defun (long double, __ldexpl, (long double __x, int __e)) -{ - long double __result; - long double __float_e = (long double) __e; - __asm ("fscale%.x %1, %0" : "=f" (__result) : "f" (__float_e), "0" (__x)); - return __result; -} - -__m81_defun (long double, __ieee754_fmodl, (long double __x, long double __y)) -{ - long double __result; - __asm("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); - return __result; -} - -__m81_inline long double -__m81_u(__frexpl)(long double __value, int *__expptr) -{ - long double __mantissa, __exponent; - __asm("fgetexp%.x %1, %0" : "=f" (__exponent) : "f" (__value)); - __asm("fgetman%.x %1, %0" : "=f" (__mantissa) : "f" (__value)); - *__expptr = (int) __exponent; - return __mantissa; -} - -__m81_defun (long double, __floorl, (long double __x)) -{ - long double __result; - unsigned long int __ctrl_reg; - __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); - /* Set rounding towards negative infinity. */ - __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ - : "dmi" ((__ctrl_reg & ~0x10) | 0x20)); - /* Convert X to an integer, using -Inf rounding. */ - __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); - /* Restore the previous rounding mode. */ - __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ - : "dmi" (__ctrl_reg)); - return __result; -} - -__m81_defun (long double, __ieee754_powl, (long double __x, long double __y)) -{ - long double __result; - if (__x == 0.0l) - { - if (__y <= 0.0l) - __result = 0.0l / 0.0l; - else - __result = 0.0l; - } - else if (__y == 0.0l || __x == 1.0l) - __result = 1.0; - else if (__y == 1.0l) - __result = __x; - else if (__y == 2.0l) - __result = __x * __x; - else if (__x == 10.0l) - __asm("ftentox%.x %1, %0" : "=f" (__result) : "f" (__y)); - else if (__x == 2.0l) - __asm("ftwotox%.x %1, %0" : "=f" (__result) : "f" (__y)); - else if (__x < 0.0l) - { - long double __temp = __m81_u(__rintl)(__y); - if (__y == __temp) - { - int i = (int) __y; - __result - = __m81_u(__ieee754_expl)(__y * __m81_u(__ieee754_logl)(-__x)); - if (i & 1) - __result = -__result; - } - else - __result = 0.0l / 0.0l; - } - else - __result = __m81_u(__ieee754_expl)(__y * __m81_u(__ieee754_logl)(__x)); - return __result; -} - -__m81_defun (long double, __ceill, (long double __x)) -{ - long double __result; - unsigned long int __ctrl_reg; - __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); - /* Set rounding towards positive infinity. */ - __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ - : "dmi" (__ctrl_reg | 0x30)); - /* Convert X to an integer, using +Inf rounding. */ - __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); - /* Restore the previous rounding mode. */ - __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ - : "dmi" (__ctrl_reg)); - return __result; -} - -__m81_inline long double -__m81_u(__modfl)(long double __value, long double *__iptr) -{ - long double __modf_int; - __asm ("fintrz%.x %1, %0" : "=f" (__modf_int) : "f" (__value)); - *__iptr = __modf_int; - return __value - __modf_int; -} - -__m81_defun (int, __isinfl, (long double __value)) -{ - /* There is no branch-condition for infinity, - so we must extract and examine the condition codes manually. */ - unsigned long int __fpsr; - __asm("ftst%.x %1\n" - "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); - return (__fpsr & (2 << 24)) ? (__fpsr & (8 << 24) ? -1 : 1) : 0; -} - -__m81_defun (int, __isnanl, (long double __value)) -{ - char __result; - __asm("ftst%.x %1\n" - "fsun %0" : "=dm" (__result) : "f" (__value)); - return __result; -} - -__m81_defun (int, __finitel, (long double __value)) -{ - /* There is no branch-condition for infinity, so we must extract and - examine the condition codes manually. */ - unsigned long int __fpsr; - __asm ("ftst%.x %1\n" - "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); - return (__fpsr & (3 << 24)) == 0; -} - -__m81_defun (int, __ilogbl, (long double __x)) -{ - long double __result; - __asm("fgetexp%.x %1, %0" : "=f" (__result) : "f" (__x)); - return (int) __result; -} - -__m81_defun (long double, __ieee754_scalbl, (long double __x, long double __n)) -{ - long double __result; - __asm ("fscale%.x %1, %0" : "=f" (__result) : "f" (__n), "0" (__x)); - return __result; -} - -__m81_defun (long double, __scalbnl, (long double __x, int __n)) -{ - long double __result; - long double __float_n = (long double) __n; - __asm ("fscale%.x %1, %0" : "=f" (__result) : "f" (__float_n), "0" (__x)); - return __result; -} +/* This macro contains the definition for the rest of the inline + functions, using __FLOAT_TYPE as the domain type and __S as the suffix + for the function names. */ + +#define __inline_functions(__float_type, __s) \ +__m81_defun (__float_type, \ + __ieee754_remainder##__s, (__float_type __x, __float_type __y)) \ +{ \ + __float_type __result; \ + __asm("frem%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); \ + return __result; \ +} \ + \ +__m81_defun (__float_type, \ + __ieee754_fmod##__s, (__float_type __x, __float_type __y)) \ +{ \ + __float_type __result; \ + __asm("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); \ + return __result; \ +} \ + \ +__m81_defun (__float_type, \ + __ieee754_atan2##__s, (__float_type __y, __float_type __x)) \ +{ \ + __float_type __pi, __pi_2; \ + \ + __asm ("fmovecr%.x %#0, %0" : "=f" (__pi)); \ + __asm ("fscale%.w %#-1, %0" : "=f" (__pi_2) : "0" (__pi)); \ + if (__x > 0) \ + { \ + if (__y > 0) \ + { \ + if (__x > __y) \ + return __m81_u(__atan##__s) (__y / __x); \ + else \ + return __pi_2 - __m81_u(__atan##__s) (__x / __y); \ + } \ + else \ + { \ + if (__x > -__y) \ + return __m81_u(__atan##__s) (__y / __x); \ + else \ + return -__pi_2 - __m81_u(__atan##__s) (__x / __y); \ + } \ + } \ + else \ + { \ + if (__y > 0) \ + { \ + if (-__x < __y) \ + return __pi + __m81_u(__atan##__s) (__y / __x); \ + else \ + return __pi_2 - __m81_u(__atan##__s) (__x / __y); \ + } \ + else \ + { \ + if (-__x > -__y) \ + return -__pi + __m81_u(__atan##__s) (__y / __x); \ + else \ + return -__pi_2 - __m81_u(__atan##__s) (__x / __y); \ + } \ + } \ +} \ + \ +__m81_inline __float_type \ +__m81_u(__frexp##__s)(__float_type __value, int *__expptr) \ +{ \ + __float_type __mantissa, __exponent; \ + int __iexponent; \ + if (__value == 0.0) \ + { \ + *__expptr = 0; \ + return __value; \ + } \ + __asm("fgetexp%.x %1, %0" : "=f" (__exponent) : "f" (__value)); \ + __iexponent = (int) __exponent + 1; \ + *__expptr = __iexponent; \ + __asm("fscale%.l %2, %0" : "=f" (__mantissa) \ + : "0" (__value), "dmi" (-__iexponent)); \ + return __mantissa; \ +} \ + \ +__m81_defun (__float_type, __floor##__s, (__float_type __x)) \ +{ \ + __float_type __result; \ + unsigned long int __ctrl_reg; \ + __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); \ + /* Set rounding towards negative infinity. */ \ + __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ + : "dmi" ((__ctrl_reg & ~0x10) | 0x20)); \ + /* Convert X to an integer, using -Inf rounding. */ \ + __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); \ + /* Restore the previous rounding mode. */ \ + __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ + : "dmi" (__ctrl_reg)); \ + return __result; \ +} \ + \ +__m81_defun (__float_type, \ + __ieee754_pow##__s, (__float_type __x, __float_type __y)) \ +{ \ + __float_type __result; \ + if (__x == 0.0) \ + { \ + if (__y <= 0.0) \ + __result = 0.0 / 0.0; \ + else \ + __result = 0.0; \ + } \ + else if (__y == 0.0 || __x == 1.0) \ + __result = 1.0; \ + else if (__y == 1.0) \ + __result = __x; \ + else if (__y == 2.0) \ + __result = __x * __x; \ + else if (__x == 10.0) \ + __asm("ftentox%.x %1, %0" : "=f" (__result) : "f" (__y)); \ + else if (__x == 2.0) \ + __asm("ftwotox%.x %1, %0" : "=f" (__result) : "f" (__y)); \ + else if (__x < 0.0) \ + { \ + __float_type __temp = __m81_u (__rint##__s) (__y); \ + if (__y == __temp) \ + { \ + int __i = (int) __y; \ + __result = (__m81_u(__ieee754_exp##__s) \ + (__y * __m81_u(__ieee754_log##__s) (-__x))); \ + if (__i & 1) \ + __result = -__result; \ + } \ + else \ + __result = 0.0 / 0.0; \ + } \ + else \ + __result = (__m81_u(__ieee754_exp##__s) \ + (__y * __m81_u(__ieee754_log##__s) (__x))); \ + return __result; \ +} \ + \ +__m81_defun (__float_type, __ceil##__s, (__float_type __x)) \ +{ \ + __float_type __result; \ + unsigned long int __ctrl_reg; \ + __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); \ + /* Set rounding towards positive infinity. */ \ + __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ + : "dmi" (__ctrl_reg | 0x30)); \ + /* Convert X to an integer, using +Inf rounding. */ \ + __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); \ + /* Restore the previous rounding mode. */ \ + __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ + : "dmi" (__ctrl_reg)); \ + return __result; \ +} \ + \ +__m81_inline __float_type \ +__m81_u(__modf##__s)(__float_type __value, __float_type *__iptr) \ +{ \ + __float_type __modf_int; \ + __asm ("fintrz%.x %1, %0" : "=f" (__modf_int) : "f" (__value)); \ + *__iptr = __modf_int; \ + return __value - __modf_int; \ +} \ + \ +__m81_defun (int, __isinf##__s, (__float_type __value)) \ +{ \ + /* There is no branch-condition for infinity, \ + so we must extract and examine the condition codes manually. */ \ + unsigned long int __fpsr; \ + __asm("ftst%.x %1\n" \ + "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \ + return (__fpsr & (2 << 24)) ? (__fpsr & (8 << 24) ? -1 : 1) : 0; \ +} \ + \ +__m81_defun (int, __isnan##__s, (__float_type __value)) \ +{ \ + char __result; \ + __asm("ftst%.x %1\n" \ + "fsun %0" : "=dm" (__result) : "f" (__value)); \ + return __result; \ +} \ + \ +__m81_defun (int, __finite##__s, (__float_type __value)) \ +{ \ + /* There is no branch-condition for infinity, so we must extract and \ + examine the condition codes manually. */ \ + unsigned long int __fpsr; \ + __asm ("ftst%.x %1\n" \ + "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \ + return (__fpsr & (3 << 24)) == 0; \ +} \ + \ +__m81_defun (int, __ilogb##__s, (__float_type __x)) \ +{ \ + __float_type __result; \ + if (__x == 0.0) \ + return 0x80000001; \ + __asm("fgetexp%.x %1, %0" : "=f" (__result) : "f" (__x)); \ + return (int) __result; \ +} \ + \ +__m81_defun (__float_type, \ + __ieee754_scalb##__s, (__float_type __x, __float_type __n)) \ +{ \ + __float_type __result; \ + __asm ("fscale%.x %1, %0" : "=f" (__result) : "f" (__n), "0" (__x)); \ + return __result; \ +} \ + \ +__m81_defun (__float_type, __scalbn##__s, (__float_type __x, int __n)) \ +{ \ + __float_type __result; \ + __asm ("fscale%.l %1, %0" : "=f" (__result) : "dmi" (__n), "0" (__x)); \ + return __result; \ +} + +/* This defines the three variants of the inline functions. */ +__inline_functions (double, ) +__inline_functions (float, f) +__inline_functions (long double, l) +#undef __inline_functions #endif /* GCC. */ diff --git a/sysdeps/m68k/fpu/s_ldexp.c b/sysdeps/m68k/fpu/s_ldexp.c deleted file mode 100644 index 18f4d43c37..0000000000 --- a/sysdeps/m68k/fpu/s_ldexp.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright (C) 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#define __NO_M81_MATH_INLINES -#include - -#ifndef FUNC -#define FUNC ldexp -#endif -#ifndef float_type -#define float_type double -#endif - -#define __CONCATX(a,b) __CONCAT(a,b) - -float_type -DEFUN(__CONCATX(__,FUNC), (x, exp), float_type x AND int exp) -{ - return __m81_u(__CONCATX(__,FUNC))(x, exp); -} - -#define weak_aliasx(a,b) weak_alias(a,b) -weak_aliasx (__CONCATX(__,FUNC), FUNC) diff --git a/sysdeps/m68k/fpu/s_ldexpf.c b/sysdeps/m68k/fpu/s_ldexpf.c deleted file mode 100644 index 81a6b28acc..0000000000 --- a/sysdeps/m68k/fpu/s_ldexpf.c +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef FUNC -#define FUNC ldexpf -#endif -#define float_type float -#include diff --git a/sysdeps/m68k/fpu/s_ldexpl.c b/sysdeps/m68k/fpu/s_ldexpl.c deleted file mode 100644 index 25796b75f4..0000000000 --- a/sysdeps/m68k/fpu/s_ldexpl.c +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef FUNC -#define FUNC ldexpl -#endif -#define float_type long double -#include diff --git a/sysdeps/m68k/fpu/s_scalbn.c b/sysdeps/m68k/fpu/s_scalbn.c index 433aa757d2..4039bba652 100644 --- a/sysdeps/m68k/fpu/s_scalbn.c +++ b/sysdeps/m68k/fpu/s_scalbn.c @@ -1,2 +1,40 @@ +/* Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#define __NO_M81_MATH_INLINES +#include + +#ifndef FUNC #define FUNC scalbn #include +#endif +#ifndef float_type +#define float_type double +#endif + +#define __CONCATX(a,b) __CONCAT(a,b) + +float_type +DEFUN(__CONCATX(__,FUNC), (x, exp), float_type x AND int exp) +{ + return __m81_u(__CONCATX(__,FUNC))(x, exp); +} + +#define weak_aliasx(a,b) weak_alias(a,b) +weak_aliasx (__CONCATX(__,FUNC), FUNC) diff --git a/sysdeps/m68k/fpu/s_scalbnf.c b/sysdeps/m68k/fpu/s_scalbnf.c index 00461dc30c..55d64fd502 100644 --- a/sysdeps/m68k/fpu/s_scalbnf.c +++ b/sysdeps/m68k/fpu/s_scalbnf.c @@ -1,2 +1,6 @@ +#ifndef FUNC #define FUNC scalbnf #include +#endif +#define float_type float +#include diff --git a/sysdeps/m68k/fpu/s_scalbnl.c b/sysdeps/m68k/fpu/s_scalbnl.c index 83e8bfefc1..84849921dc 100644 --- a/sysdeps/m68k/fpu/s_scalbnl.c +++ b/sysdeps/m68k/fpu/s_scalbnl.c @@ -1,2 +1,6 @@ +#ifndef FUNC #define FUNC scalbnl #include +#endif +#define float_type long double +#include diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.S b/sysdeps/unix/sysv/linux/m68k/sysdep.S index 674715f824..b47e167159 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.S +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.S @@ -62,7 +62,6 @@ __syscall_error: .size __syscall_error, . - __syscall_error #endif /* PIC */ -#ifdef _LIBC_REENTRANT .globl __errno_location .type __errno_location, @function __errno_location: @@ -73,4 +72,3 @@ __errno_location: #endif rts .size __errno_location, . - __errno_location -#endif From 69e4430b4dbd01485a9c668dbcbb574a07accce1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Sep 1996 12:41:17 +0000 Subject: [PATCH 0750/4487] Why are these removed? --- sysdeps/m68k/fpu/e_atan2.c | 2 ++ sysdeps/m68k/fpu/e_atan2f.c | 2 ++ sysdeps/m68k/fpu/e_atan2l.c | 2 ++ 3 files changed, 6 insertions(+) create mode 100644 sysdeps/m68k/fpu/e_atan2.c create mode 100644 sysdeps/m68k/fpu/e_atan2f.c create mode 100644 sysdeps/m68k/fpu/e_atan2l.c diff --git a/sysdeps/m68k/fpu/e_atan2.c b/sysdeps/m68k/fpu/e_atan2.c new file mode 100644 index 0000000000..ae7a799ad1 --- /dev/null +++ b/sysdeps/m68k/fpu/e_atan2.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_atan2 +#include diff --git a/sysdeps/m68k/fpu/e_atan2f.c b/sysdeps/m68k/fpu/e_atan2f.c new file mode 100644 index 0000000000..a4c5ebdfd3 --- /dev/null +++ b/sysdeps/m68k/fpu/e_atan2f.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_atan2f +#include diff --git a/sysdeps/m68k/fpu/e_atan2l.c b/sysdeps/m68k/fpu/e_atan2l.c new file mode 100644 index 0000000000..0d43a77b9e --- /dev/null +++ b/sysdeps/m68k/fpu/e_atan2l.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_atan2l +#include From 1120c0ed1654defe3c5d9fcd5b21a68412ce5bfa Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 27 Sep 1996 03:44:39 +0000 Subject: [PATCH 0751/4487] update from main archive --- sysdeps/m68k/fpu/s_scalbn.c | 1 - sysdeps/m68k/fpu/s_scalbnf.c | 1 - sysdeps/m68k/fpu/s_scalbnl.c | 1 - sysdeps/standalone/close.c | 8 +++--- sysdeps/standalone/m68k/m68020/start.S | 37 +++++++++++++------------ sysdeps/standalone/open.c | 23 ++++++++------- sysdeps/standalone/read.c | 23 ++++++++------- sysdeps/standalone/write.c | 18 ++++++------ sysdeps/unix/bsd/sun/m68k/sigtramp.c | 25 +++++++++-------- sysdeps/unix/bsd/sun/sparc/sigtramp.c | 29 +++++++++---------- sysdeps/unix/bsd/sun/sunos4/speed.c | 29 ++++++++++--------- sysdeps/unix/bsd/sun/sunos4/tcsetattr.c | 11 ++++---- sysdeps/unix/bsd/ultrix4/mips/start.S | 3 +- sysdeps/unix/bsd/ultrix4/sysconf.c | 17 ++++++------ sysdeps/unix/sysv/irix4/getpriority.c | 10 +++---- sysdeps/unix/sysv/irix4/setpriority.c | 12 ++++---- sysdeps/unix/sysv/irix4/start.c | 5 ++-- sysdeps/unix/sysv/linux/alpha/ioperm.c | 10 +++---- sysdeps/unix/sysv/linux/m68k/brk.c | 3 +- sysdeps/unix/sysv/linux/m68k/sysdep.S | 16 +++++------ sysdeps/unix/sysv/linux/m68k/sysdep.h | 2 +- sysdeps/unix/sysv/sysv4/sigaction.c | 11 ++++---- sysdeps/unix/sysv/sysv4/sysconf.c | 8 +++--- sysdeps/unix/sysv/sysv4/waitpid.c | 9 +++--- 24 files changed, 158 insertions(+), 154 deletions(-) diff --git a/sysdeps/m68k/fpu/s_scalbn.c b/sysdeps/m68k/fpu/s_scalbn.c index 4039bba652..6d2b74a3d0 100644 --- a/sysdeps/m68k/fpu/s_scalbn.c +++ b/sysdeps/m68k/fpu/s_scalbn.c @@ -22,7 +22,6 @@ Cambridge, MA 02139, USA. */ #ifndef FUNC #define FUNC scalbn -#include #endif #ifndef float_type #define float_type double diff --git a/sysdeps/m68k/fpu/s_scalbnf.c b/sysdeps/m68k/fpu/s_scalbnf.c index 55d64fd502..33459718e9 100644 --- a/sysdeps/m68k/fpu/s_scalbnf.c +++ b/sysdeps/m68k/fpu/s_scalbnf.c @@ -1,6 +1,5 @@ #ifndef FUNC #define FUNC scalbnf -#include #endif #define float_type float #include diff --git a/sysdeps/m68k/fpu/s_scalbnl.c b/sysdeps/m68k/fpu/s_scalbnl.c index 84849921dc..c6ad95079c 100644 --- a/sysdeps/m68k/fpu/s_scalbnl.c +++ b/sysdeps/m68k/fpu/s_scalbnl.c @@ -1,6 +1,5 @@ #ifndef FUNC #define FUNC scalbnl -#include #endif #define float_type long double #include diff --git a/sysdeps/standalone/close.c b/sysdeps/standalone/close.c index 59b607305f..7ef1a5f878 100644 --- a/sysdeps/standalone/close.c +++ b/sysdeps/standalone/close.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc. Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil, On-Line Applications Research Corporation. @@ -19,7 +19,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include #include @@ -28,11 +27,12 @@ Cambridge, MA 02139, USA. */ /* Close the file descriptor FD. */ int -DEFUN(__close, (fd), int fd) +__close (fd) + int fd; { if ( !__FD_Is_valid( fd ) || !__FD_Table[ fd ].in_use ) { - errno = EBADF; + __set_errno (EBADF); return -1; } diff --git a/sysdeps/standalone/m68k/m68020/start.S b/sysdeps/standalone/m68k/m68020/start.S index cbabf5bf07..9d7d779e04 100644 --- a/sysdeps/standalone/m68k/m68020/start.S +++ b/sysdeps/standalone/m68k/m68020/start.S @@ -1,19 +1,19 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1996 Free Software Foundation, Inc. Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), On-Line Applications Research Corporation. - + 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 Library General Public License as published by the Free Software Foundation; either version 2 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 Library General Public License for more details. - + You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, @@ -43,7 +43,7 @@ _M68Kvec: | standard location for vectors .space 4088 | to avoid initial intr stack | from 135BUG on MVME13? as entry | and start code at 0x4000 -around: +around: move.w %sr,initial_sr | save initial values movec %isp,%a0 movel %a0,initial_isp @@ -53,19 +53,19 @@ around: movel %a0,initial_msp oriw #0x0700,%sr | INTERRUPTS OFF!!! - + | | zero out uninitialized data area | zerobss: - moveal #end,%a0 | find end of .bss - moveal #_bss_start,%a1 | find beginning of .bss + moveal #end,%a0 | find end of .bss + moveal #_bss_start,%a1 | find beginning of .bss movel #0,%d0 loop: movel #0,%a1@+ | to zero out uninitialized cmpal %a0,%a1 - jlt loop | loop until _end reached + jlt loop | loop until _end reached movel #heap_size,__C_heap_size | set ___C_heap_size movel #heap_memory,__C_heap_start | set ___C_heap_start @@ -77,14 +77,14 @@ loop: movel #0,%a1@+ | to zero out uninitialized movw #0x3000,%sr | SUPV MODE,INTERRUPTS ON!!! #ifdef NEED_UNDERSCORES - jsr __Board_Initialize | initialize the board + jsr __Board_Initialize | initialize the board #else - jsr _Board_Initialize | initialize the board + jsr _Board_Initialize | initialize the board #endif - move.l #0,%sp@- | envp = NULL - move.l #0,%sp@- | argv = NULL - move.l #0,%sp@- | argc = NULL + move.l #0,%sp@- | envp = NULL + move.l #0,%sp@- | argv = NULL + move.l #0,%sp@- | argc = NULL #ifdef NEED_UNDERSCORES jsr ___libc_init | initialize the library and | call main @@ -93,8 +93,8 @@ loop: movel #0,%a1@+ | to zero out uninitialized | call main #endif add.l #12,%sp - - move.l #0,%sp@- | argc = NULL + + move.l #0,%sp@- | argc = NULL jsr __exit | call the Board specific exit addq.l #4,%sp @@ -121,7 +121,7 @@ _name##: .space _space #define DECLARE_LABEL(_name) \ .globl _name ; \ -_name##: +_name##: #define DECLARE_PTR(_name) DECLARE_SPACE(_name,4,2) #define DECLARE_U32(_name) DECLARE_SPACE(_name,4,2) @@ -139,6 +139,7 @@ DECLARE_U16(initial_sr) DECLARE_LABEL(_environ) DECLARE_PTR(environ) +DECLARE_LABEL(__errno) DECLARE_LABEL(_errno) DECLARE_U32(errno) diff --git a/sysdeps/standalone/open.c b/sysdeps/standalone/open.c index 910e7933e7..87097d9cb0 100644 --- a/sysdeps/standalone/open.c +++ b/sysdeps/standalone/open.c @@ -1,7 +1,7 @@ -/* Copyright (C) 1994, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc. Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil, On-Line Applications Research Corporation. - + This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -19,7 +19,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include #include #include @@ -36,7 +35,9 @@ Cambridge, MA 02139, USA. */ /* Open FILE with access OFLAG. If OFLAG includes O_CREAT, a third argument is the file protection. */ int -DEFUN(__open, (file, oflag), CONST char *file AND int oflag DOTS) +__open (file, oflag) + const char *file; + int oflag; { int mode; int newfd; @@ -44,7 +45,7 @@ DEFUN(__open, (file, oflag), CONST char *file AND int oflag DOTS) if (file == NULL) { - errno = EINVAL; + __set_errno (EINVAL); return -1; } @@ -69,17 +70,17 @@ DEFUN(__open, (file, oflag), CONST char *file AND int oflag DOTS) } if ( newfd == -1 ) { - errno = ENFILE; + __set_errno (ENFILE); return -1; } - /* + /* * Initialize the open slot */ __FD_Table[ newfd ].in_use = 1; __FD_Table[ newfd ].flags = oflag; - + return newfd; } @@ -89,8 +90,10 @@ DEFUN(__open, (file, oflag), CONST char *file AND int oflag DOTS) static #endif void -DEFUN(__NONE_init_console_io, (argc, argv, envp), - int argc AND char **argv AND char **envp) +__NONE_init_console_io (argc, argv, envp) + int argc; + char **argv; + char **envp; { int index; diff --git a/sysdeps/standalone/read.c b/sysdeps/standalone/read.c index 284321d717..40322a5e71 100644 --- a/sysdeps/standalone/read.c +++ b/sysdeps/standalone/read.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc. Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil, On-Line Applications Research Corporation. @@ -19,7 +19,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include #include #include @@ -30,32 +29,31 @@ Cambridge, MA 02139, USA. */ /* Read NBYTES into BUF from FD. Return the number read or -1. */ ssize_t -DEFUN(__read, (fd, buf, nbytes), - int fd AND PTR buf AND size_t nbytes) +__libc_read (int fd, void *buf, size_t nbytes) { char *buffer = (char *) buf; int data; int poll; - errno = 0; + __set_errno (0); if (nbytes == 0) return 0; if ( !__FD_Is_valid( fd ) || !__FD_Table[ fd ].in_use ) { - errno = EBADF; + __set_errno (EBADF); return -1; } if (buf == NULL) { - errno = EINVAL; + __set_errno (EINVAL); return -1; } if ( __FD_Table[ fd ].flags & O_WRONLY ) /* is it write only? */ { - errno = EBADF; + __set_errno (EBADF); return -1; } @@ -63,11 +61,11 @@ DEFUN(__read, (fd, buf, nbytes), poll = ( __FD_Table[ fd ].flags & O_NONBLOCK ) ? 1 : 0; - /* Read a single character. This is a cheap way to insure that the - upper layers get every character because _Console_Getc can't timeout + /* Read a single character. This is a cheap way to insure that the + upper layers get every character because _Console_Getc can't timeout or otherwise know when to stop. */ - + data = _Console_Getc(poll); if ( data == -1 ) /* if no data return */ @@ -84,4 +82,5 @@ DEFUN(__read, (fd, buf, nbytes), return 1; } -weak_alias (__read, read) +weak_alias (__libc_read, __read) +weak_alias (__libc_read, read) diff --git a/sysdeps/standalone/write.c b/sysdeps/standalone/write.c index f0ae3888f6..d377dd5e5c 100644 --- a/sysdeps/standalone/write.c +++ b/sysdeps/standalone/write.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc. Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil, On-Line Applications Research Corporation. @@ -19,7 +19,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include #include #include @@ -31,28 +30,27 @@ Cambridge, MA 02139, USA. */ /* Write NBYTES of BUF to FD. Return the number written, or -1. */ ssize_t -DEFUN(__write, (fd, buf, nbytes), - int fd AND CONST PTR buf AND size_t nbytes) +__libc_write (int fd, const void *buf, size_t nbytes) { int count; - CONST char *data = buf; + const char *data = buf; if (nbytes == 0) return 0; if ( !__FD_Is_valid( fd ) || !__FD_Table[ fd ].in_use ) { - errno = EBADF; + __set_errno (EBADF); return -1; } if (buf == NULL) { - errno = EINVAL; + __set_errno (EINVAL); return -1; } if ( !(__FD_Table[ fd ].flags & (O_WRONLY|O_RDWR)) ) /* is it writeable? */ { - errno = EBADF; + __set_errno (EBADF); return -1; } @@ -70,5 +68,5 @@ DEFUN(__write, (fd, buf, nbytes), return count; } - -weak_alias (__write, write) +weak_alias (__libc_write, __write) +weak_alias (__libc_write, write) diff --git a/sysdeps/unix/bsd/sun/m68k/sigtramp.c b/sysdeps/unix/bsd/sun/m68k/sigtramp.c index 32a2c2047e..db9ffb5135 100644 --- a/sysdeps/unix/bsd/sun/m68k/sigtramp.c +++ b/sysdeps/unix/bsd/sun/m68k/sigtramp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1996 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 @@ -16,8 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include - #ifndef __GNUC__ #error This file uses GNU C extensions; you must compile with GCC. #endif @@ -52,8 +50,8 @@ Cambridge, MA 02139, USA. */ #include /* Defined in __sigvec.S. */ -extern int EXFUN(__raw_sigvec, (int sig, CONST struct sigvec *vec, - struct sigvec *ovec)); +extern int __raw_sigvec (int sig, const struct sigvec *vec, + struct sigvec *ovec); /* User-specified signal handlers. */ #define mytramp 1 @@ -70,8 +68,11 @@ extern __sighandler_t _sigfunc[]; Saves and restores the general regs %g2-%g7, the %y register, and all the FPU regs (including %fsr), around calling the user's handler. */ static void -DEFUN(trampoline, (sig, code, context, addr), - int sig AND int code AND struct sigcontext *context AND PTR addr) +trampoline (sig, code, context, addr) + int sig; + int code; + struct sigcontext *context; + void *addr; { int save[4]; @@ -81,7 +82,7 @@ DEFUN(trampoline, (sig, code, context, addr), /* XXX should save/restore FP regs */ /* Call the user's handler. */ - (*((void EXFUN((*), (int sig, int code, struct sigcontext *context, + (*((void (*) __P ((int sig, int code, struct sigcontext *context, PTR addr))) handlers[sig])) (sig, code, context, addr); @@ -95,8 +96,10 @@ DEFUN(trampoline, (sig, code, context, addr), #endif int -DEFUN(__sigvec, (sig, vec, ovec), - int sig AND CONST struct sigvec *vec AND struct sigvec *ovec) +__sigvec (sig, vec, ovec) + int sig; + const struct sigvec *vec; + struct sigvec *ovec; { #ifndef mytramp extern void _sigtramp (int); @@ -108,7 +111,7 @@ DEFUN(__sigvec, (sig, vec, ovec), if (sig <= 0 || sig >= NSIG) { - errno = EINVAL; + __set_errno (EINVAL); return -1; } diff --git a/sysdeps/unix/bsd/sun/sparc/sigtramp.c b/sysdeps/unix/bsd/sun/sparc/sigtramp.c index 54f62933a8..11ce1945ff 100644 --- a/sysdeps/unix/bsd/sun/sparc/sigtramp.c +++ b/sysdeps/unix/bsd/sun/sparc/sigtramp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1994, 1996 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 @@ -16,8 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include - #ifndef __GNUC__ #error This file uses GNU C extensions; you must compile with GCC. #endif @@ -52,8 +50,8 @@ Cambridge, MA 02139, USA. */ #include /* Defined in __sigvec.S. */ -extern int EXFUN(__raw_sigvec, (int sig, CONST struct sigvec *vec, - struct sigvec *ovec)); +extern int __raw_sigvec __P ((int sig, CONST struct sigvec *vec, + struct sigvec *ovec)); /* User-specified signal handlers. */ #define mytramp 1 @@ -70,7 +68,8 @@ extern __sighandler_t _sigfunc[]; Saves and restores the general regs %g2-%g7, the %y register, and all the FPU regs (including %fsr), around calling the user's handler. */ static void -DEFUN(trampoline, (sig), int sig) +trampoline (sig) + int sig; { /* We use `double' and `long long int' so `std' (store doubleword) insns, which might be faster than single-word stores, will be generated. */ @@ -97,7 +96,7 @@ DEFUN(trampoline, (sig), int sig) int code; register struct sigcontext *context asm("%i0"); /* See end of fn. */ - PTR addr; + void *addr; int y; double fpsave[16]; int fsr; @@ -147,8 +146,8 @@ DEFUN(trampoline, (sig), int sig) glsave[2] = g6; /* Call the user's handler. */ - (*((void EXFUN((*), (int sig, int code, struct sigcontext *context, - PTR addr))) handlers[sig])) + (*((void (*) __P ((int sig, int code, struct sigcontext *context, + void *addr))) handlers[sig])) (sig, code, context, addr); /* Restore the Y register. */ @@ -199,8 +198,10 @@ DEFUN(trampoline, (sig), int sig) #endif int -DEFUN(__sigvec, (sig, vec, ovec), - int sig AND CONST struct sigvec *vec AND struct sigvec *ovec) +__sigvec (sig, vec, ovec) + int sig; + const struct sigvec *vec; + struct sigvec *ovec; { #ifndef mytramp extern void _sigtramp (int); @@ -212,11 +213,11 @@ DEFUN(__sigvec, (sig, vec, ovec), if (sig <= 0 || sig >= NSIG) { - errno = EINVAL; + __set_errno (EINVAL); return -1; } - mask = __sigblock(sigmask(sig)); + mask = __sigblock (sigmask(sig)); ohandler = handlers[sig]; @@ -240,7 +241,7 @@ DEFUN(__sigvec, (sig, vec, ovec), if (ovec != NULL && ovec->sv_handler == trampoline) ovec->sv_handler = ohandler; - (void) __sigsetmask(mask); + (void) __sigsetmask (mask); return 0; } diff --git a/sysdeps/unix/bsd/sun/sunos4/speed.c b/sysdeps/unix/bsd/sun/sunos4/speed.c index 1c09d55dab..de6870a51d 100644 --- a/sysdeps/unix/bsd/sun/sunos4/speed.c +++ b/sysdeps/unix/bsd/sun/sunos4/speed.c @@ -1,5 +1,5 @@ /* `struct termios' speed frobnication functions. SunOS 4 version. -Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. +Copyright (C) 1991, 1992, 1993, 1996 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 @@ -17,12 +17,11 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include #include #include -static CONST speed_t speeds[] = +static const speed_t speeds[] = { 0, 50, @@ -45,28 +44,31 @@ static CONST speed_t speeds[] = /* Return the output baud rate stored in *TERMIOS_P. */ speed_t -DEFUN(cfgetospeed, (termios_p), CONST struct termios *termios_p) +cfgetospeed (termios_p) + const struct termios *termios_p; { return termios_p->c_cflag & CBAUD; } /* Return the input baud rate stored in *TERMIOS_P. */ speed_t -DEFUN(cfgetispeed, (termios_p), CONST struct termios *termios_p) +cfgetispeed (termios_p) + const struct termios *termios_p; { return (termios_p->c_cflag & CIBAUD) >> IBSHIFT; } /* Set the output baud rate stored in *TERMIOS_P to SPEED. */ int -DEFUN(cfsetospeed, (termios_p, speed), - struct termios *termios_p AND speed_t speed) +cfsetospeed (termios_p, speed) + struct termios *termios_p; + speed_t speed; { register unsigned int i; if (termios_p == NULL) { - errno = EINVAL; + __set_errno (EINVAL); return -1; } @@ -82,20 +84,21 @@ DEFUN(cfsetospeed, (termios_p, speed), return 0; } - errno = EINVAL; + __set_errno (EINVAL); return -1; } /* Set the input baud rate stored in *TERMIOS_P to SPEED. */ int -DEFUN(cfsetispeed, (termios_p, speed), - struct termios *termios_p AND speed_t speed) +cfsetispeed (termios_p, speed) + struct termios *termios_p; + speed_t speed; { register unsigned int i; if (termios_p == NULL) { - errno = EINVAL; + __set_errno (EINVAL); return -1; } @@ -108,6 +111,6 @@ DEFUN(cfsetispeed, (termios_p, speed), return 0; } - errno = EINVAL; + __set_errno (EINVAL); return -1; } diff --git a/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c b/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c index f88951ff9d..f825d41ab8 100644 --- a/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c +++ b/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1996 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 @@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include #include #include @@ -24,8 +23,10 @@ Cambridge, MA 02139, USA. */ /* Set the state of FD to *TERMIOS_P. */ int -DEFUN(tcsetattr, (fd, optional_actions, termios_p), - int fd AND int optional_actions AND CONST struct termios *termios_p) +tcsetattr (fd, optional_actions, termios_p) + int fd; + int optional_actions; + const struct termios *termios_p; { unsigned long cmd; @@ -41,7 +42,7 @@ DEFUN(tcsetattr, (fd, optional_actions, termios_p), cmd = TCSETSF; break; default: - errno = EINVAL; + __set_errno (EINVAL); return -1; } diff --git a/sysdeps/unix/bsd/ultrix4/mips/start.S b/sysdeps/unix/bsd/ultrix4/mips/start.S index 24bcbb4e00..aec5885252 100644 --- a/sysdeps/unix/bsd/ultrix4/mips/start.S +++ b/sysdeps/unix/bsd/ultrix4/mips/start.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -18,6 +18,7 @@ Cambridge, MA 02139, USA. */ #include +__errno: .comm errno, 4 ENTRY(__start) diff --git a/sysdeps/unix/bsd/ultrix4/sysconf.c b/sysdeps/unix/bsd/ultrix4/sysconf.c index a9f3c5bbbe..a24c1c5ce8 100644 --- a/sysdeps/unix/bsd/ultrix4/sysconf.c +++ b/sysdeps/unix/bsd/ultrix4/sysconf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995, 1996 Free Software Foundation, Inc. Contributed by Ian Lance Taylor (ian@airs.com). The GNU C Library is free software; you can redistribute it and/or @@ -20,20 +20,19 @@ Cambridge, MA 02139, USA. */ value for _SC_CHILD_MAX. Everything else is from , which the default sysconf already knows how to handle. */ -#include #include #include /* This is an Ultrix header file. */ #include -extern int EXFUN(__getsysinfo, (unsigned int op, void *buffer, - size_t nbytes, int *start, - void *arg)); -extern long int EXFUN(__default_sysconf, (int name)); +extern int __getsysinfo __P ((unsigned int op, void *buffer, + size_t nbytes, int *start, void *arg)); +extern long int __default_sysconf __P ((int name)); long int -DEFUN(__sysconf, (name), int name) +__sysconf (name) + int name; { if (name == _SC_CHILD_MAX) { @@ -46,11 +45,11 @@ DEFUN(__sysconf, (name), int name) if (__getsysinfo (GSI_MAX_UPROCS, &ret, sizeof (ret), &start, (void *) 0) > 0) { - errno = save; + __set_errno (save); return ret; } - errno = save; + __set_errno (save); } return __default_sysconf (name); diff --git a/sysdeps/unix/sysv/irix4/getpriority.c b/sysdeps/unix/sysv/irix4/getpriority.c index 70a9431890..6ba6219791 100644 --- a/sysdeps/unix/sysv/irix4/getpriority.c +++ b/sysdeps/unix/sysv/irix4/getpriority.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1996 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 @@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include #include #include @@ -28,8 +27,9 @@ extern int __sysmp __P ((int, ...)); or user (as specified by WHO) is used. A lower priority number means higher priority. Priorities range from PRIO_MIN to PRIO_MAX. */ int -DEFUN(getpriority, (which, who), - enum __priority_which which AND int who) +getpriority (which, who) + enum __priority_which which; + int who; { switch (which) { @@ -41,6 +41,6 @@ DEFUN(getpriority, (which, who), return __sysmp (MP_SCHED, MPTS_GTNICE_USER, who); } - errno = EINVAL; + __set_errno (EINVAL); return -1; } diff --git a/sysdeps/unix/sysv/irix4/setpriority.c b/sysdeps/unix/sysv/irix4/setpriority.c index a632953423..322813a7dd 100644 --- a/sysdeps/unix/sysv/irix4/setpriority.c +++ b/sysdeps/unix/sysv/irix4/setpriority.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1996 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 @@ -16,14 +16,15 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include #include #include int -DEFUN(setpriority, (which, who, prio), - enum __priority_which which AND int who AND int prio) +setpriority (which, who, prio) + enum __priority_which which; + int who; + int prio; { switch (which) { @@ -35,7 +36,6 @@ DEFUN(setpriority, (which, who, prio), return __sysmp (MP_SCHED, MPTS_RENICE_USER, who, prio); } - errno = EINVAL; + __set_errno (EINVAL); return -1; } - diff --git a/sysdeps/unix/sysv/irix4/start.c b/sysdeps/unix/sysv/irix4/start.c index cd86f85244..b11d27b6ed 100644 --- a/sysdeps/unix/sysv/irix4/start.c +++ b/sysdeps/unix/sysv/irix4/start.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1995, 1996 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,8 @@ Cambridge, MA 02139, USA. */ /* The first piece of initialized data. */ int __data_start = 0; -VOLATILE int errno = 0; +VOLATILE int __errno = 0; +strong_alias (__errno, errno) extern void EXFUN(__libc_init, (int argc, char **argv, char **envp)); extern int EXFUN(main, (int argc, char **argv, char **envp)); diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c index 731059e600..924fc473b2 100644 --- a/sysdeps/unix/sysv/linux/alpha/ioperm.c +++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c @@ -326,7 +326,7 @@ init_iosys (void) fprintf(stderr, "ioperm.init_iosys(): Unable to determine system type.\n" "\t(May need " PATH_ALPHA_SYSTYPE " symlink?)\n"); - errno = ENODEV; + __set_errno (ENODEV); return -1; } } @@ -349,7 +349,7 @@ init_iosys (void) } /* systype is not a know platform name... */ - errno = EINVAL; + __set_errno (EINVAL); return -1; } @@ -366,7 +366,7 @@ _ioperm (unsigned long from, unsigned long num, int turn_on) /* this test isn't as silly as it may look like; consider overflows! */ if (from >= MAX_PORT || from + num > MAX_PORT) { - errno = EINVAL; + __set_errno (EINVAL); return -1; } @@ -391,7 +391,7 @@ _ioperm (unsigned long from, unsigned long num, int turn_on) case IOSYS_APECS: base = APECS_IO_BASE; break; case IOSYS_CIA: base = CIA_IO_BASE; break; default: - errno = ENODEV; + __set_errno (ENODEV); return -1; } addr = port_to_cpu_addr (from, io.sys, 1); @@ -425,7 +425,7 @@ _iopl (unsigned int level) { if (level > 3) { - errno = EINVAL; + __set_errno (EINVAL); return -1; } if (level) diff --git a/sysdeps/unix/sysv/linux/m68k/brk.c b/sysdeps/unix/sysv/linux/m68k/brk.c index 3fd547545e..402dfc56f7 100644 --- a/sysdeps/unix/sysv/linux/m68k/brk.c +++ b/sysdeps/unix/sysv/linux/m68k/brk.c @@ -42,11 +42,10 @@ __brk (void *addr) if (newbrk < addr) { - errno = ENOMEM; + __set_errno (ENOMEM); return -1; } return 0; } weak_alias (__brk, brk) - diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.S b/sysdeps/unix/sysv/linux/m68k/sysdep.S index b47e167159..407c2d393c 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.S +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.S @@ -16,6 +16,8 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include + /* Because the Linux version is in fact m68k/ELF and the start.? file for this system (sysdeps/m68k/elf/start.S) is also used by The Hurd and therefore this files must not contain the definition of the @@ -31,6 +33,9 @@ errno: .space 4 .globl _errno .type _errno,@object _errno = errno /* This name is expected by hj libc.so.5 startup code. */ + .globl __errno + .type __errno,@object +__errno = errno /* This name is expected by the MT code. */ .text /* The following code is only used in the shared library when we @@ -39,14 +44,9 @@ _errno = errno /* This name is expected by hj libc.so.5 startup code. */ #ifndef PIC -#include -#define _ERRNO_H -#include - /* The syscall stubs jump here when they detect an error. */ -.globl __syscall_error -__syscall_error: +ENTRY(__syscall_error) neg.l %d0 move.l %d0, errno #ifdef _LIBC_REENTRANT @@ -62,9 +62,7 @@ __syscall_error: .size __syscall_error, . - __syscall_error #endif /* PIC */ - .globl __errno_location - .type __errno_location, @function -__errno_location: +ERRNO(__errno_location) #ifdef PIC move.l (%pc, errno@GOTPC), %a0 #else diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h index 9de750c326..cfc9b04af0 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -86,7 +86,7 @@ syscall_error: \ neg.l %d0; \ move.l %d0, (%a0); \ move.l %d0, -(%sp); \ - jbsr __errno_location@PLTPC \ + jbsr __errno_location@PLTPC; \ move.l (%sp)+, (%a0); \ move.l POUND -1, %d0; \ /* Copy return value to %a0 for syscalls that are declared to return \ diff --git a/sysdeps/unix/sysv/sysv4/sigaction.c b/sysdeps/unix/sysv/sysv4/sigaction.c index 68fd7a1846..37893fa649 100644 --- a/sysdeps/unix/sysv/sysv4/sigaction.c +++ b/sysdeps/unix/sysv/sysv4/sigaction.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995, 1996 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 @@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include #include #include @@ -38,15 +37,17 @@ trampoline (int sig, int code, struct sigcontext *context) /* If ACT is not NULL, change the action for SIG to *ACT. If OACT is not NULL, put the old action for SIG in *OACT. */ int -DEFUN(__sigaction, (sig, act, oact), - int sig AND CONST struct sigaction *act AND struct sigaction *oact) +__sigaction (sig, act, oact) + int sig; + const struct sigaction *act; + struct sigaction *oact; { struct sigaction myact; __sighandler_t ohandler; if (sig <= 0 || sig >= NSIG) { - errno = EINVAL; + __set_errno (EINVAL); return -1; } diff --git a/sysdeps/unix/sysv/sysv4/sysconf.c b/sysdeps/unix/sysv/sysv4/sysconf.c index 81d660fe64..cd0e84480f 100644 --- a/sysdeps/unix/sysv/sysv4/sysconf.c +++ b/sysdeps/unix/sysv/sysv4/sysconf.c @@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include #include #include @@ -24,16 +23,17 @@ Cambridge, MA 02139, USA. */ #include #include -extern int EXFUN(__sysconfig, (int)); +extern int __sysconfig __P ((int)); /* Get the value of the system variable NAME. */ long int -DEFUN(__sysconf, (name), int name) +__sysconf (name) + int name; { switch (name) { default: - errno = EINVAL; + __set_errno (EINVAL); return -1; case _SC_ARG_MAX: diff --git a/sysdeps/unix/sysv/sysv4/waitpid.c b/sysdeps/unix/sysv/sysv4/waitpid.c index f54df4bf6b..586a374ce9 100644 --- a/sysdeps/unix/sysv/sysv4/waitpid.c +++ b/sysdeps/unix/sysv/sysv4/waitpid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include #include #include @@ -53,8 +52,7 @@ extern int __waitid __P ((__idtype_t idtype, __pid_t id, return status for stopped children; otherwise don't. */ __pid_t -DEFUN(__waitpid, (pid, stat_loc, options), - __pid_t pid AND int *stat_loc AND int options) +__libc_waitpid (__pid_t pid, int *stat_loc, int options) { __idtype_t idtype; __pid_t tmp_pid = pid; @@ -117,4 +115,5 @@ DEFUN(__waitpid, (pid, stat_loc, options), return infop.__pid; } -weak_alias (__waitpid, waitpid) +weak_alias (__libc_waitpid, __waitpid) +weak_alias (__libc_waitpid, waitpid) From b1691e6dce9f29bf24838fd089ea8272b5d8451e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 2 Oct 1996 01:39:48 +0000 Subject: [PATCH 0752/4487] update from main archive 961001 --- sysdeps/alpha/machine-gmon.h | 5 +++-- sysdeps/unix/alpha/sysdep.S | 7 ++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/sysdeps/alpha/machine-gmon.h b/sysdeps/alpha/machine-gmon.h index a551e9f8b1..e902537dd6 100644 --- a/sysdeps/alpha/machine-gmon.h +++ b/sysdeps/alpha/machine-gmon.h @@ -1,5 +1,5 @@ /* Machine-specific calling sequence for `mcount' profiling function. alpha -Copyright (C) 1995 Free Software Foundation, Inc. +Copyright (C) 1995, 1996 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 @@ -17,7 +17,8 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#define _MCOUNT_DECL void __mcount +#define _MCOUNT_DECL(from, self) \ + void __mcount (u_long from, u_long self) /* Call __mcount with our the return PC for our caller, and the return PC our caller will return to. Empty since we use an assembly stub diff --git a/sysdeps/unix/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S index 8d70bda21e..08dc3b4851 100644 --- a/sysdeps/unix/alpha/sysdep.S +++ b/sysdeps/unix/alpha/sysdep.S @@ -27,6 +27,8 @@ errno: .space 4 .type errno, @object .size errno, 4 #endif + .globl __errno +__errno = errno .text .align 2 @@ -44,7 +46,10 @@ __syscall_error: .mask 0x4000001, -16 .prologue 1 - /* Find our pre-thread errno address */ + /* Store into the "real" variable. */ + stl v0, errno + + /* Find our per-thread errno address */ jsr ra, __errno_location /* Store the error value. */ From cf182b5888c59a0fc8b1d4b3d815fe856c2dcf77 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 6 Oct 1996 02:02:37 +0000 Subject: [PATCH 0753/4487] update from main archive 961005 --- sysdeps/alpha/Makefile | 14 +- sysdeps/alpha/bzero.S | 113 +++++++++++++ sysdeps/alpha/memset.S | 130 +++++++++++++++ sysdeps/alpha/stpcpy.S | 49 ++++++ sysdeps/alpha/stpncpy.S | 103 ++++++++++++ sysdeps/alpha/strcat.S | 66 ++++++++ sysdeps/alpha/strchr.S | 88 ++++++++++ sysdeps/alpha/strcpy.S | 36 +++++ sysdeps/alpha/strncat.S | 90 +++++++++++ sysdeps/alpha/strncpy.S | 85 ++++++++++ sysdeps/alpha/strrchr.S | 104 ++++++++++++ sysdeps/alpha/stxcpy.S | 307 +++++++++++++++++++++++++++++++++++ sysdeps/alpha/stxncpy.S | 350 ++++++++++++++++++++++++++++++++++++++++ 13 files changed, 1530 insertions(+), 5 deletions(-) create mode 100644 sysdeps/alpha/bzero.S create mode 100644 sysdeps/alpha/memset.S create mode 100644 sysdeps/alpha/stpcpy.S create mode 100644 sysdeps/alpha/stpncpy.S create mode 100644 sysdeps/alpha/strcat.S create mode 100644 sysdeps/alpha/strchr.S create mode 100644 sysdeps/alpha/strcpy.S create mode 100644 sysdeps/alpha/strncat.S create mode 100644 sysdeps/alpha/strncpy.S create mode 100644 sysdeps/alpha/strrchr.S create mode 100644 sysdeps/alpha/stxcpy.S create mode 100644 sysdeps/alpha/stxncpy.S diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile index 6aaedea6fb..45babb6c1c 100644 --- a/sysdeps/alpha/Makefile +++ b/sysdeps/alpha/Makefile @@ -21,17 +21,21 @@ sysdep_routines += _mcount endif ifeq ($(subdir),setjmp) -sysdep_routines := $(sysdep_routines) setjmp_aux +sysdep_routines += setjmp_aux endif ifeq ($(subdir),gnulib) -routines = $(divrem) -endif # gnulib +sysdep_routines += $(divrem) +endif + +ifeq ($(subdir),string) +sysdep_routines += stxcpy stxncpy +endif ifeq ($(subdir),elf) -# The ld.so code cannot use literals until it self-relocates. +# The ld.so startup code cannot use literals until it self-relocates. ifeq ($(elf),yes) -CFLAGS-rtld.c = -mbuild-constants + CFLAGS-rtld.c = -mbuild-constants endif # The rest of ld.so shouldn't use FP regs for block moves so # that the lazy link trampoline doesn't have to save them. diff --git a/sysdeps/alpha/bzero.S b/sysdeps/alpha/bzero.S new file mode 100644 index 0000000000..fffa53d7f1 --- /dev/null +++ b/sysdeps/alpha/bzero.S @@ -0,0 +1,113 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. + Contributed by Richard Henderson (rth@tamu.edu) + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Fill a block of memory with zeros. Optimized for the Alpha architecture: + + - memory accessed as aligned quadwords only + - destination memory not read unless needed for good cache behaviour + - basic blocks arranged to optimize branch prediction for full-quadword + aligned memory blocks. + - partial head and tail quadwords constructed with byte-mask instructions + + This is generally scheduled for the EV5 (got to look out for my own + interests :-), but with EV4 needs in mind. There *should* be no more + stalls for the EV4 than there are for the EV5. +*/ + + +#include + + .set noat + .set noreorder + + .text + +/* There is a problem with either gdb (as of 4.16) or gas (as of 2.7) that + doesn't like putting the entry point for a procedure somewhere in the + middle of the procedure descriptor. Work around this by putting the main + loop in its own procedure descriptor. */ + + /* On entry to this basic block: + t3 == loop counter + t4 == bytes in partial final word + a0 == possibly misaligned destination pointer */ + + .ent bzero_loop + .align 3 +bzero_loop: + .frame sp, 0, ra, 0 + .prologue 0 + + beq t3, $tail # + blbc t3, 0f # skip single store if count even + + stq_u zero, 0(a0) # e0 : store one word + subq t3, 1, t3 # .. e1 : + addq a0, 8, a0 # e0 : + beq t3, $tail # .. e1 : + +0: stq_u zero, 0(a0) # e0 : store two words + subq t3, 2, t3 # .. e1 : + stq_u zero, 8(a0) # e0 : + addq a0, 16, a0 # .. e1 : + bne t3, 0b # e1 : + +$tail: bne t4, 1f # is there a tail to do? + ret # no + +1: ldq_u t0, 0(a0) # yes, load original data + mskqh t0, t4, t0 # + stq_u t0, 0(a0) # + ret # + + .end bzero_loop + +ENTRY(bzero) + .prologue 0 + + mov a0, v0 # e0 : move return value in place + beq a1, $done # .. e1 : early exit for zero-length store + and a0, 7, t1 # e0 : + addq a1, t1, a1 # e1 : add dest misalignment to count + srl a1, 3, t3 # e0 : loop = count >> 3 + and a1, 7, t4 # .. e1 : find number of bytes in tail + unop # : + beq t1, bzero_loop # e1 : aligned head, jump right in + + ldq_u t0, 0(a0) # e0 : load original data to mask into + cmpult a1, 8, t2 # .. e1 : is this a sub-word set? + bne t2, $oneq # e1 : + + mskql t0, a0, t0 # e0 : we span words. finish this partial + subq t3, 1, t3 # e0 : + addq a0, 8, a0 # .. e1 : + stq_u t0, -8(a0) # e0 : + br bzero_loop # .. e1 : + + .align 3 +$oneq: + mskql t0, a0, t2 # e0 : + mskqh t0, a1, t3 # e0 : + or t2, t3, t0 # e1 : + stq_u t0, 0(a0) # e0 : + +$done: ret + + END(bzero) diff --git a/sysdeps/alpha/memset.S b/sysdeps/alpha/memset.S new file mode 100644 index 0000000000..55271f00ea --- /dev/null +++ b/sysdeps/alpha/memset.S @@ -0,0 +1,130 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. + Contributed by Richard Henderson (rth@tamu.edu) + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Fill a block of memory with a character. Optimized for the Alpha + architecture: + + - memory accessed as aligned quadwords only + - destination memory not read unless needed for good cache behaviour + - basic blocks arranged to optimize branch prediction for full-quadword + aligned memory blocks. + - partial head and tail quadwords constructed with byte-mask instructions + + This is generally scheduled for the EV5 (got to look out for my own + interests :-), but with EV4 needs in mind. There *should* be no more + stalls for the EV4 than there are for the EV5. +*/ + + +#include + + .set noat + .set noreorder + + .text + +/* There is a problem with either gdb (as of 4.16) or gas (as of 2.7) that + doesn't like putting the entry point for a procedure somewhere in the + middle of the procedure descriptor. Work around this by putting the main + loop in its own procedure descriptor. */ + + /* On entry to this basic block: + t3 == loop counter + t4 == bytes in partial final word + a0 == possibly misaligned destination pointer + a1 == replicated source character */ + + .ent memset_loop + .align 3 +memset_loop: + .frame sp, 0, ra, 0 + .prologue 0 + + beq t3, $tail + blbc t3, 0f # skip single store if count even + + stq_u a1, 0(a0) # e0 : store one word + subq t3, 1, t3 # .. e1 : + addq a0, 8, a0 # e0 : + beq t3, $tail # .. e1 : + +0: stq_u a1, 0(a0) # e0 : store two words + subq t3, 2, t3 # .. e1 : + stq_u a1, 8(a0) # e0 : + addq a0, 16, a0 # .. e1 : + bne t3, 0b # e1 : + +$tail: bne t4, 1f # is there a tail to do? + ret # no + + .align 3 +1: ldq_u t0, 0(a0) # e1 : yes, load original data + mskql a1, t4, t1 # .. e0 : + mskqh t0, t4, t0 # e0 : + or t0, t1, t0 # e1 (stall) + stq_u t0, 0(a0) # e0 : + ret # .. e1 : + + .end memset_loop + +ENTRY(memset) + .prologue 0 + + zapnot a1, 1, a1 # e0 : zero extend input character + mov a0, v0 # .. e1 : move return value in place + sll a1, 8, t0 # e0 : begin replicating the char + beq a2, $done # .. e1 : early exit for zero-length store + or t0, a1, a1 # e0 : + and a0, 7, t1 # .. e1 : dest misalignment + sll a1, 16, t0 # e0 : + addq a2, t1, a2 # .. e1 : add dest misalignment to count + or t0, a1, a1 # e0 : + srl a2, 3, t3 # .. e1 : loop = count >> 3 + sll a1, 32, t0 # e0 : + and a2, 7, t4 # .. e1 : find number of bytes in tail + or t0, a1, a1 # e0 : character replication done + + beq t1, memset_loop # .. e1 : aligned head, jump right in + + ldq_u t0, 0(a0) # e1 : load original data to mask into + mskqh a1, a0, t1 # .. e0 : + + cmpult a2, 8, t2 # e0 : is this a sub-word set? + bne t2, $oneq # .. e1 (zdb) + + mskql t0, a0, t0 # e0 : we span words. finish this partial + subq t3, 1, t3 # .. e1 : + addq a0, 8, a0 # e0 : + or t0, t1, t0 # .. e1 : + stq_u t0, -8(a0) # e0 : + br memset_loop # .. e1 : + + .align 3 +$oneq: + mskql t1, a2, t1 # e0 : entire operation within one word + mskql t0, a0, t2 # e0 : + mskqh t0, a2, t3 # e0 : + or t1, t2, t0 # .. e1 : + or t0, t3, t0 # e1 : + stq_u t0, 0(a0) # e0 (stall) + +$done: ret + + END(memset) diff --git a/sysdeps/alpha/stpcpy.S b/sysdeps/alpha/stpcpy.S new file mode 100644 index 0000000000..0dc44d353a --- /dev/null +++ b/sysdeps/alpha/stpcpy.S @@ -0,0 +1,49 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. + Contributed by Richard Henderson (rth@tamu.edu) + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Copy a null-terminated string from SRC to DST. Return a pointer + to the null-terminator in the source. */ + +#include + + .text + +ENTRY(__stpcpy) + ldgp gp, 0(pv) + .prologue 1 + + jsr t9, __stxcpy # do the work of the copy + + and t8, 0xf0, t2 # binary search for byte offset of the + and t8, 0xcc, t1 # last byte written. + and t8, 0xaa, t0 + andnot a0, 7, a0 + cmovne t2, 4, t2 + cmovne t1, 2, t1 + cmovne t0, 1, t0 + addq a0, t2, v0 + addq t0, t1, t0 + addq v0, t0, v0 + + ret + + END(__stpcpy) + +weak_alias (__stpcpy, stpcpy) diff --git a/sysdeps/alpha/stpncpy.S b/sysdeps/alpha/stpncpy.S new file mode 100644 index 0000000000..50cda2672e --- /dev/null +++ b/sysdeps/alpha/stpncpy.S @@ -0,0 +1,103 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. + Contributed by Richard Henderson (rth@tamu.edu) + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Copy no more than COUNT bytes of the null-terminated string from + SRC to DST. If SRC does not cover all of COUNT, the balance is + zeroed. Return the address of the terminating null in DEST, if + any, else DEST + COUNT. */ + +#include + + .set noat + .set noreorder + + .text + +ENTRY(__stpncpy) + ldgp gp, 0(pv) + .prologue 1 + + beq a2, $zerocount + jsr t9, __stxncpy # do the work of the copy + + and t8, 0xf0, t3 # binary search for byte offset of the + and t8, 0xcc, t2 # last byte written. + and t8, 0xaa, t1 + andnot a0, 7, v0 + cmovne t3, 4, t3 + cmovne t2, 2, t2 + cmovne t1, 1, t1 + addq v0, t3, v0 + addq t1, t2, t1 + addq v0, t1, v0 + + bne a2, $multiword # do we have full words left? + + .align 3 + zapnot t0, t8, t4 # e0 : was last byte a null? + subq t8, 1, t2 # .. e1 : + addq v0, 1, t5 # e0 : + subq t10, 1, t3 # .. e1 : + or t2, t8, t2 # e0 : clear the bits between the last + or t3, t10, t3 # .. e1 : written byte and the last byte in + andnot t3, t2, t3 # e0 : COUNT + cmovne t4, t5, v0 # .. e1 : if last written wasnt null, inc v0 + zap t0, t3, t0 # e0 : + stq_u t0, 0(a0) # e1 : + ret # .. e1 : + + .align 3 +$multiword: + subq t8, 1, t7 # e0 : clear the final bits in the prev + or t7, t8, t7 # e1 : word + zapnot t0, t7, t0 # e0 : + subq a2, 1, a2 # .. e1 : + stq_u t0, 0(a0) # e0 : + addq a0, 8, a0 # .. e1 : + + beq a2, 1f # e1 : + blbc a2, 0f # e1 : + + stq_u zero, 0(a0) # e0 : zero one word + subq a2, 1, a2 # .. e1 : + addq a0, 8, a0 # e0 : + beq a2, 1f # .. e1 : + +0: stq_u zero, 0(a0) # e0 : zero two words + subq a2, 2, a2 # .. e1 : + stq_u zero, 8(a0) # e0 : + addq a0, 16, a0 # .. e1 : + bne a2, 0b # e1 : + unop + +1: ldq_u t0, 0(a0) # e0 : clear the leading bits in the final + subq t10, 1, t7 # .. e1 : word + or t7, t10, t7 # e0 : + zap t0, t7, t0 # e1 (stall) + stq_u t0, 0(a0) # e0 : + ret # .. e1 : + +$zerocount: + mov a0, v0 + ret + + END(__stpncpy) + +weak_alias (__stpncpy, stpncpy) diff --git a/sysdeps/alpha/strcat.S b/sysdeps/alpha/strcat.S new file mode 100644 index 0000000000..d3afff3c5f --- /dev/null +++ b/sysdeps/alpha/strcat.S @@ -0,0 +1,66 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. + Contributed by Richard Henderson (rth@tamu.edu) + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Append a null-terminated string from SRC to DST. */ + +#include + + .text + +ENTRY(strcat) + ldgp gp, 0(pv) + .prologue 1 + + mov a0, v0 # set up return value + + /* Find the end of the string. */ + + ldq_u t0, 0(a0) # load first quadword (a0 may be misaligned) + lda t1, -1(zero) + insqh t1, a0, t1 + andnot a0, 7, a0 + or t1, t0, t0 + cmpbge zero, t0, t1 # t1 <- bitmask: bit i == 1 <==> i-th byte == 0 + bne t1, $found + +$loop: ldq t0, 8(a0) + addq a0, 8, a0 # addr += 8 + cmpbge zero, t0, t1 + beq t1, $loop + +$found: negq t1, t2 # clear all but least set bit + and t1, t2, t1 + + and t1, 0xf0, t2 # binary search for that set bit + and t1, 0xcc, t3 + and t1, 0xaa, t4 + cmovne t2, 4, t2 + cmovne t3, 2, t3 + cmovne t4, 1, t4 + addq t2, t3, t2 + addq a0, t4, a0 + addq a0, t2, a0 + + /* Now do the append. */ + + jsr t9, __stxcpy + ret + + END(strcat) diff --git a/sysdeps/alpha/strchr.S b/sysdeps/alpha/strchr.S new file mode 100644 index 0000000000..c26a8431d2 --- /dev/null +++ b/sysdeps/alpha/strchr.S @@ -0,0 +1,88 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. + Contributed by Richard Henderson (rth@tamu.edu) + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Return the address of a given character within a null-terminated + string, or null if it is not found. + + This is generally scheduled for the EV5 (got to look out for my own + interests :-), but with EV4 needs in mind. There *should* be no more + stalls for the EV4 than there are for the EV5. +*/ + +#include + + .set noreorder + .set noat + +ENTRY(strchr) + .prologue 0 + + zapnot a1, 1, a1 # e0 : zero extend the search character + ldq_u t0, 0(a0) # .. e1 : load first quadword + sll a1, 8, t5 # e0 : replicate the search character + andnot a0, 7, v0 # .. e1 : align our loop pointer + or t5, a1, a1 # e0 : + lda t4, -1 # .. e1 : build garbage mask + sll a1, 16, t5 # e0 : + cmpbge zero, t0, t2 # .. e1 : bits set iff byte == zero + mskqh t4, a0, t4 # e0 : + or t5, a1, a1 # .. e1 : + sll a1, 32, t5 # e0 : + cmpbge zero, t4, t4 # .. e1 : bits set iff byte is garbage + or t5, a1, a1 # e0 : + xor t0, a1, t1 # .. e1 : make bytes == c zero + cmpbge zero, t1, t3 # e0 : bits set iff byte == c + or t2, t3, t0 # e1 : bits set iff char match or zero match + andnot t0, t4, t0 # e0 : clear garbage bits + bne t0, $found # .. e1 (zdb) + +$loop: ldq t0, 8(v0) # e0 : + addq v0, 8, v0 # .. e1 : + nop # e0 : + xor t0, a1, t1 # .. e1 (ev5 data stall) + cmpbge zero, t0, t2 # e0 : bits set iff byte == 0 + cmpbge zero, t1, t3 # .. e1 : bits set iff byte == c + or t2, t3, t0 # e0 : + beq t0, $loop # .. e1 (zdb) + +$found: negq t0, t1 # e0 : clear all but least set bit + and t0, t1, t0 # e1 (stall) + + and t0, t3, t1 # e0 : bit set iff byte was the char + beq t1, $retnull # .. e1 (zdb) + + and t0, 0xf0, t2 # e0 : binary search for that set bit + and t0, 0xcc, t3 # .. e1 : + and t0, 0xaa, t4 # e0 : + cmovne t2, 4, t2 # .. e1 : + cmovne t3, 2, t3 # e0 : + cmovne t4, 1, t4 # .. e1 : + addq t2, t3, t2 # e0 : + addq v0, t4, v0 # .. e1 : + addq v0, t2, v0 # e0 : + ret # .. e1 : + +$retnull: + mov zero, v0 # e0 : + ret # .. e1 : + + END(strchr) + +weak_alias (strchr, index) diff --git a/sysdeps/alpha/strcpy.S b/sysdeps/alpha/strcpy.S new file mode 100644 index 0000000000..2975181919 --- /dev/null +++ b/sysdeps/alpha/strcpy.S @@ -0,0 +1,36 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. + Contributed by Richard Henderson (rth@tamu.edu) + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Copy a null-terminated string from SRC to DST. Return a pointer + to the null-terminator in the source. */ + +#include + + .text + +ENTRY(strcpy) + ldgp gp, 0(pv) + .prologue 1 + + mov a0, v0 # set up return value + jsr t9, __stxcpy # do the copy + ret + + END(strcpy) diff --git a/sysdeps/alpha/strncat.S b/sysdeps/alpha/strncat.S new file mode 100644 index 0000000000..d502037ace --- /dev/null +++ b/sysdeps/alpha/strncat.S @@ -0,0 +1,90 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. + Contributed by Richard Henderson (rth@tamu.edu) + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Append no more than COUNT characters from the null-terminated string SRC + to the null-terminated string DST. Always null-terminate the new DST. */ + +#include + + .text + +ENTRY(strncat) + ldgp gp, 0(pv) + .prologue 1 + + mov a0, v0 # set up return value + beq a2, $zerocount + + /* Find the end of the string. */ + + ldq_u t0, 0(a0) # load first quadword (a0 may be misaligned) + lda t1, -1(zero) + insqh t1, a0, t1 + andnot a0, 7, a0 + or t1, t0, t0 + cmpbge zero, t0, t1 # t1 <- bitmask: bit i == 1 <==> i-th byte == 0 + bne t1, $found + +$loop: ldq t0, 8(a0) + addq a0, 8, a0 # addr += 8 + cmpbge zero, t0, t1 + beq t1, $loop + +$found: negq t1, t2 # clear all but least set bit + and t1, t2, t1 + + and t1, 0xf0, t2 # binary search for that set bit + and t1, 0xcc, t3 + and t1, 0xaa, t4 + cmovne t2, 4, t2 + cmovne t3, 2, t3 + cmovne t4, 1, t4 + addq t2, t3, t2 + addq a0, t4, a0 + addq a0, t2, a0 + + /* Now do the append. */ + + jsr t9, __stxncpy + + /* Worry about the null termination. */ + + zapnot t0, t8, t1 # was last byte a null? + bne t1, 0f + ret + +0: and t10, 0x80, t1 + bne t1, 1f + + /* Here there are bytes left in the current word. Clear one. */ + addq t10, t10, t10 # end-of-count bit <<= 1 + zap t0, t10, t0 + stq_u t0, 0(a0) + ret + +1: /* Here we must read the next DST word and clear the first byte. */ + ldq_u t0, 8(a0) + zap t0, 1, t0 + stq_u t0, 8(a0) + +$zerocount: + ret + + END(strncat) diff --git a/sysdeps/alpha/strncpy.S b/sysdeps/alpha/strncpy.S new file mode 100644 index 0000000000..e13769c5c3 --- /dev/null +++ b/sysdeps/alpha/strncpy.S @@ -0,0 +1,85 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. + Contributed by Richard Henderson (rth@tamu.edu) + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Copy no more than COUNT bytes of the null-terminated string from + SRC to DST. If SRC does not cover all of COUNT, the balance is + zeroed. */ + +#include + + .set noat + .set noreorder + + .text + +ENTRY(strncpy) + ldgp gp, 0(pv) + .prologue 1 + + mov a0, v0 # set return value now + beq a2, $zerocount + jsr t9, __stxncpy # do the work of the copy + + bne a2, $multiword # do we have full words left? + + .align 3 + subq t8, 1, t2 # e0 : guess not + subq t10, 1, t3 # .. e1 : + or t2, t8, t2 # e0 : clear the bits between the last + or t3, t10, t3 # .. e1 : written byte and the last byte in + andnot t3, t2, t3 # e0 : COUNT + zap t0, t3, t0 # e1 : + stq_u t0, 0(a0) # e0 : + ret # .. e1 : + +$multiword: + + subq t8, 1, t7 # e0 : clear the final bits in the prev + or t7, t8, t7 # e1 : word + zapnot t0, t7, t0 # e0 : + subq a2, 1, a2 # .. e1 : + stq_u t0, 0(a0) # e0 : + addq a0, 8, a0 # .. e1 : + + beq a2, 1f # e1 : + blbc a2, 0f # e1 : + + stq_u zero, 0(a0) # e0 : zero one word + subq a2, 1, a2 # .. e1 : + addq a0, 8, a0 # e0 : + beq a2, 1f # .. e1 : + +0: stq_u zero, 0(a0) # e0 : zero two words + subq a2, 2, a2 # .. e1 : + stq_u zero, 8(a0) # e0 : + addq a0, 16, a0 # .. e1 : + bne a2, 0b # e1 : + unop + +1: ldq_u t0, 0(a0) # e0 : clear the leading bits in the final + subq t10, 1, t7 # .. e1 : word + or t7, t10, t7 # e0 : + zap t0, t7, t0 # e1 (stall) + stq_u t0, 0(a0) # e0 : + +$zerocount: + ret # .. e1 : + + END(strncpy) diff --git a/sysdeps/alpha/strrchr.S b/sysdeps/alpha/strrchr.S new file mode 100644 index 0000000000..464f754b20 --- /dev/null +++ b/sysdeps/alpha/strrchr.S @@ -0,0 +1,104 @@ +/* Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Return the address of the last occurrance of a given character + within a null-terminated string, or null if it is not found. + + This is generally scheduled for the EV5 (got to look out for my own + interests :-), but with EV4 needs in mind. There are, in fact, fewer + stalls on the EV4 than there are on the EV5. +*/ + +#include + + .set noreorder + .set noat + +ENTRY(strrchr) + .prologue 0 + + zapnot a1, 1, a1 # e0 : zero extend our test character + mov zero, t6 # .. e1 : t6 is last match aligned addr + sll a1, 8, t5 # e0 : replicate our test character + mov zero, t7 # .. e1 : t7 is last match byte compare mask + or t5, a1, a1 # e0 : + ldq_u t0, 0(a0) # .. e1 : load first quadword + sll a1, 16, t5 # e0 : + andnot a0, 7, v0 # .. e1 : align source addr + or t5, a1, a1 # e0 : + lda t4, -1 # .. e1 : build garbage mask + sll a1, 32, t5 # e0 : + cmpbge zero, t0, t1 # .. e1 : bits set iff byte == zero + mskqh t4, a0, t4 # e0 : + or t5, a1, a1 # .. e1 : character replication complete + xor t0, a1, t2 # e0 : make bytes == c zero + cmpbge zero, t4, t4 # .. e1 : bits set iff byte is garbage + cmpbge zero, t2, t3 # e0 : bits set iff byte == c + andnot t1, t4, t1 # .. e1 : clear garbage from null test + andnot t3, t4, t3 # e0 : clear garbage from char test + bne t1, $eos # .. e1 : did we already hit the terminator? + + /* Character search main loop */ +$loop: + ldq t0, 8(v0) # e0 : load next quadword + cmovne t3, v0, t6 # .. e1 : save previous comparisons match + cmovne t3, t3, t7 # e0 : + addq v0, 8, v0 # .. e1 : + xor t0, a1, t2 # e0 : + cmpbge zero, t0, t1 # .. e1 : bits set iff byte == zero + cmpbge zero, t2, t3 # e0 : bits set iff byte == c + beq t1, $loop # .. e1 : if we havnt seen a null, loop + + /* Mask out character matches after terminator */ +$eos: + negq t1, t4 # e0 : isolate first null byte match + and t1, t4, t4 # e1 : + subq t4, 1, t5 # e0 : build a mask of the bytes upto... + or t4, t5, t4 # e1 : ... and including the null + + and t3, t4, t3 # e0 : mask out char matches after null + cmovne t3, t3, t7 # .. e1 : save it, if match found + cmovne t3, v0, t6 # e0 : + + /* Locate the address of the last matched character */ + + /* Retain the early exit for the ev4 -- the ev5 mispredict penalty + is 5 cycles -- the same as just falling through. */ + beq t7, $retnull # .. e1 : + + and t7, 0xf0, t2 # e0 : binary search for the high bit set + cmovne t2, t2, t7 # .. e1 (zdb) + cmovne t2, 4, t2 # e0 : + and t7, 0xcc, t1 # .. e1 : + cmovne t1, t1, t7 # e0 : + cmovne t1, 2, t1 # .. e1 : + and t7, 0xaa, t0 # e0 : + cmovne t0, 1, t0 # .. e1 (zdb) + addq t2, t1, t1 # e0 : + addq t6, t0, v0 # .. e1 : add our aligned base ptr to the mix + addq v0, t1, v0 # e0 : + ret # .. e1 : + +$retnull: + mov zero, v0 # e0 : + ret # .. e1 : + + END(strrchr) + +weak_alias (strrchr, rindex) diff --git a/sysdeps/alpha/stxcpy.S b/sysdeps/alpha/stxcpy.S new file mode 100644 index 0000000000..e381b704cd --- /dev/null +++ b/sysdeps/alpha/stxcpy.S @@ -0,0 +1,307 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. + Contributed by Richard Henderson (rth@tamu.edu) + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Copy a null-terminated string from SRC to DST. + + This is an internal routine used by strcpy, stpcpy, and strcat. + As such, it uses special linkage conventions to make implementation + of these public functions more efficient. + + On input: + t9 = return address + a0 = DST + a1 = SRC + + On output: + t8 = bitmask (with one bit set) indicating the last byte written + a0 = unaligned address of the last *word* written + + Furthermore, v0, a3-a5, t11, and t12 are untouched. +*/ + +/* This is generally scheduled for the EV5, but should still be pretty + good for the EV4 too. */ + +#include + + .set noat + .set noreorder + + .text + +/* There is a problem with either gdb (as of 4.16) or gas (as of 2.7) that + doesn't like putting the entry point for a procedure somewhere in the + middle of the procedure descriptor. Work around this by putting the + aligned copy in its own procedure descriptor */ + + .ent stxcpy_aligned + .align 3 +stxcpy_aligned: + .frame sp, 0, t9 + .prologue 0 + + /* On entry to this basic block: + t0 == the first destination word for masking back in + t1 == the first source word. */ + + /* Create the 1st output word and detect 0's in the 1st input word. */ + lda t2, -1 # e1 : build a mask against false zero + mskqh t2, a1, t2 # e0 : detection in the src word + mskqh t1, a1, t3 # e0 : + ornot t1, t2, t2 # .. e1 : + mskql t0, a1, t0 # e0 : assemble the first output word + cmpbge zero, t2, t7 # .. e1 : bits set iff null found + or t0, t3, t1 # e0 : + bne t7, $a_eos # .. e1 : + + /* On entry to this basic block: + t0 == the first destination word for masking back in + t1 == a source word not containing a null. */ + +$a_loop: + stq_u t1, 0(a0) # e0 : + addq a0, 8, a0 # .. e1 : + ldq_u t1, 0(a1) # e0 : + addq a1, 8, a1 # .. e1 : + cmpbge zero, t1, t7 # e0 (stall) + beq t7, $a_loop # .. e1 (zdb) + + /* Take care of the final (partial) word store. + On entry to this basic block we have: + t1 == the source word containing the null + t7 == the cmpbge mask that found it. */ +$a_eos: + negq t7, t6 # e0 : find low bit set + and t7, t6, t8 # e1 (stall) + + /* For the sake of the cache, don't read a destination word + if we're not going to need it. */ + and t8, 0x80, t6 # e0 : + bne t6, 1f # .. e1 (zdb) + + /* We're doing a partial word store and so need to combine + our source and original destination words. */ + ldq_u t0, 0(a0) # e0 : + subq t8, 1, t6 # .. e1 : + zapnot t1, t6, t1 # e0 : clear src bytes >= null + or t8, t6, t7 # .. e1 : + zap t0, t7, t0 # e0 : clear dst bytes <= null + or t0, t1, t1 # e1 : + +1: stq_u t1, 0(a0) # e0 : + ret (t9) # .. e1 : + + .end stxcpy_aligned + + .align 3 + .ent __stxcpy + .globl __stxcpy +__stxcpy: + .frame sp, 0, t9 + .prologue 0 + + /* Are source and destination co-aligned? */ + xor a0, a1, t0 # e0 : + unop # : + and t0, 7, t0 # e0 : + bne t0, $unaligned # .. e1 : + + /* We are co-aligned; take care of a partial first word. */ + ldq_u t1, 0(a1) # e0 : load first src word + and a0, 7, t0 # .. e1 : take care not to load a word ... + addq a1, 8, a1 # e0 : + beq t0, stxcpy_aligned # .. e1 : ... if we wont need it + ldq_u t0, 0(a0) # e0 : + br stxcpy_aligned # .. e1 : + + +/* The source and destination are not co-aligned. Align the destination + and cope. We have to be very careful about not reading too much and + causing a SEGV. */ + + .align 3 +$u_head: + /* We know just enough now to be able to assemble the first + full source word. We can still find a zero at the end of it + that prevents us from outputting the whole thing. + + On entry to this basic block: + t0 == the first dest word, for masking back in, if needed else 0 + t1 == the low bits of the first source word + t6 == bytemask that is -1 in dest word bytes */ + + ldq_u t2, 8(a1) # e0 : + addq a1, 8, a1 # .. e1 : + + extql t1, a1, t1 # e0 : + extqh t2, a1, t4 # e0 : + mskql t0, a0, t0 # e0 : + or t1, t4, t1 # .. e1 : + mskqh t1, a0, t1 # e0 : + or t0, t1, t1 # e1 : + + or t1, t6, t6 # e0 : + cmpbge zero, t6, t7 # .. e1 : + lda t6, -1 # e0 : for masking just below + bne t7, $u_final # .. e1 : + + mskql t6, a1, t6 # e0 : mask out the bits we have + or t6, t2, t2 # e1 : already extracted before + cmpbge zero, t2, t7 # e0 : testing eos + bne t7, $u_late_head_exit # .. e1 (zdb) + + /* Finally, we've got all the stupid leading edge cases taken care + of and we can set up to enter the main loop. */ + + stq_u t1, 0(a0) # e0 : store first output word + addq a0, 8, a0 # .. e1 : + extql t2, a1, t0 # e0 : position ho-bits of lo word + ldq_u t2, 8(a1) # .. e1 : read next high-order source word + addq a1, 8, a1 # e0 : + cmpbge zero, t2, t7 # .. e1 : + nop # e0 : + bne t7, $u_eos # .. e1 : + + /* Unaligned copy main loop. In order to avoid reading too much, + the loop is structured to detect zeros in aligned source words. + This has, unfortunately, effectively pulled half of a loop + iteration out into the head and half into the tail, but it does + prevent nastiness from accumulating in the very thing we want + to run as fast as possible. + + On entry to this basic block: + t0 == the shifted high-order bits from the previous source word + t2 == the unshifted current source word + + We further know that t2 does not contain a null terminator. */ + + .align 3 +$u_loop: + extqh t2, a1, t1 # e0 : extract high bits for current word + addq a1, 8, a1 # .. e1 : + extql t2, a1, t3 # e0 : extract low bits for next time + addq a0, 8, a0 # .. e1 : + or t0, t1, t1 # e0 : current dst word now complete + ldq_u t2, 0(a1) # .. e1 : load high word for next time + stq_u t1, -8(a0) # e0 : save the current word + mov t3, t0 # .. e1 : + cmpbge zero, t2, t7 # e0 : test new word for eos + beq t7, $u_loop # .. e1 : + + /* We've found a zero somewhere in the source word we just read. + If it resides in the lower half, we have one (probably partial) + word to write out, and if it resides in the upper half, we + have one full and one partial word left to write out. + + On entry to this basic block: + t0 == the shifted high-order bits from the previous source word + t2 == the unshifted current source word. */ +$u_eos: + extqh t2, a1, t1 # e0 : + or t0, t1, t1 # e1 : first (partial) source word complete + + cmpbge zero, t1, t7 # e0 : is the null in this first bit? + bne t7, $u_final # .. e1 (zdb) + +$u_late_head_exit: + stq_u t1, 0(a0) # e0 : the null was in the high-order bits + addq a0, 8, a0 # .. e1 : + extql t2, a1, t1 # e0 : + cmpbge zero, t1, t7 # .. e1 : + + /* Take care of a final (probably partial) result word. + On entry to this basic block: + t1 == assembled source word + t7 == cmpbge mask that found the null. */ +$u_final: + negq t7, t6 # e0 : isolate low bit set + and t6, t7, t8 # e1 : + + and t8, 0x80, t6 # e0 : avoid dest word load if we can + bne t6, 1f # .. e1 (zdb) + + ldq_u t0, 0(a0) # e0 : + subq t8, 1, t6 # .. e1 : + or t6, t8, t7 # e0 : + zapnot t1, t6, t1 # .. e1 : kill source bytes >= null + zap t0, t7, t0 # e0 : kill dest bytes <= null + or t0, t1, t1 # e1 : + +1: stq_u t1, 0(a0) # e0 : + ret (t9) # .. e1 : + + /* Unaligned copy entry point. */ + .align 3 +$unaligned: + + ldq_u t1, 0(a1) # e0 : load first source word + + and a0, 7, t4 # .. e1 : find dest misalignment + and a1, 7, t5 # e0 : find src misalignment + + /* Conditionally load the first destination word and a bytemask + with 0xff indicating that the destination byte is sacrosanct. */ + + mov zero, t0 # .. e1 : + mov zero, t6 # e0 : + beq t4, 1f # .. e1 : + ldq_u t0, 0(a0) # e0 : + lda t6, -1 # .. e1 : + mskql t6, a0, t6 # e0 : +1: + subq a1, t4, a1 # .. e1 : sub dest misalignment from src addr + + /* If source misalignment is larger than dest misalignment, we need + extra startup checks to avoid SEGV. */ + + cmplt t4, t5, t8 # e0 : + beq t8, $u_head # .. e1 (zdb) + + lda t2, -1 # e1 : mask out leading garbage in source + mskqh t2, t5, t2 # e0 : + nop # e0 : + ornot t1, t2, t3 # .. e1 : + cmpbge zero, t3, t7 # e0 : is there a zero? + beq t7, $u_head # .. e1 (zdb) + + /* At this point we've found a zero in the first partial word of + the source. We need to isolate the valid source data and mask + it into the original destination data. (Incidentally, we know + that we'll need at least one byte of that original dest word.) */ + + ldq_u t0, 0(a0) # e0 : + + negq t7, t6 # .. e1 : build bitmask of bytes <= zero + and t6, t7, t8 # e0 : + nop # .. e1 : + subq t8, 1, t6 # e0 : + or t6, t8, t7 # e1 : + + zapnot t2, t7, t2 # e0 : prepare source word; mirror changes + and t1, t2, t1 # e1 : to source validity mask + extql t2, a1, t2 # e0 : + extql t1, a1, t1 # e0 : + + andnot t0, t2, t0 # e0 : zero place for source to reside + or t0, t1, t1 # e1 : and put it there + stq_u t1, 0(a0) # e0 : + ret (t9) # .. e1 : + + .end __stxcpy diff --git a/sysdeps/alpha/stxncpy.S b/sysdeps/alpha/stxncpy.S new file mode 100644 index 0000000000..8c5fcf6e67 --- /dev/null +++ b/sysdeps/alpha/stxncpy.S @@ -0,0 +1,350 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. + Contributed by Richard Henderson (rth@tamu.edu) + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Copy no more than COUNT bytes of the null-terminated string from + SRC to DST. + + This is an internal routine used by strncpy, stpncpy, and strncat. + As such, it uses special linkage conventions to make implementation + of these public functions more efficient. + + On input: + t9 = return address + a0 = DST + a1 = SRC + a2 = COUNT + + Furthermore, COUNT may not be zero. + + On output: + t0 = last word written + t8 = bitmask (with one bit set) indicating the last byte written + t10 = bitmask (with one bit set) indicating the byte position of + the end of the range specified by COUNT + a0 = unaligned address of the last *word* written + a2 = the number of full words left in COUNT + + Furthermore, v0, a3-a5, t11, and t12 are untouched. +*/ + + +/* This is generally scheduled for the EV5, but should still be pretty + good for the EV4 too. */ + +#include + + .set noat + .set noreorder + + .text + +/* There is a problem with either gdb (as of 4.16) or gas (as of 2.7) that + doesn't like putting the entry point for a procedure somewhere in the + middle of the procedure descriptor. Work around this by putting the + aligned copy in its own procedure descriptor */ + + .ent stxncpy_aligned + .align 3 +stxncpy_aligned: + .frame sp, 0, t9, 0 + .prologue 0 + + /* On entry to this basic block: + t0 == the first destination word for masking back in + t1 == the first source word. */ + + /* Create the 1st output word and detect 0's in the 1st input word. */ + lda t2, -1 # e1 : build a mask against false zero + mskqh t2, a1, t2 # e0 : detection in the src word + mskqh t1, a1, t3 # e0 : + ornot t1, t2, t2 # .. e1 : + mskql t0, a1, t0 # e0 : assemble the first output word + cmpbge zero, t2, t7 # .. e1 : bits set iff null found + or t0, t3, t0 # e0 : + beq a2, $a_eoc # .. e1 : + bne t7, $a_eos # .. e1 : + + /* On entry to this basic block: + t0 == a source word not containing a null. */ + +$a_loop: + stq_u t0, 0(a0) # e0 : + addq a0, 8, a0 # .. e1 : + ldq_u t0, 0(a1) # e0 : + addq a1, 8, a1 # .. e1 : + subq a2, 1, a2 # e0 : + cmpbge zero, t0, t7 # .. e1 (stall) + beq a2, $a_eoc # e1 : + beq t7, $a_loop # e1 : + + /* Take care of the final (partial) word store. At this point + the end-of-count bit is set in t7 iff it applies. + + On entry to this basic block we have: + t0 == the source word containing the null + t7 == the cmpbge mask that found it. */ + +$a_eos: + negq t7, t8 # e0 : find low bit set + and t7, t8, t8 # e1 (stall) + + /* For the sake of the cache, don't read a destination word + if we're not going to need it. */ + and t8, 0x80, t6 # e0 : + bne t6, 1f # .. e1 (zdb) + + /* We're doing a partial word store and so need to combine + our source and original destination words. */ + ldq_u t1, 0(a0) # e0 : + subq t8, 1, t6 # .. e1 : + or t8, t6, t7 # e0 : + unop # + zapnot t0, t7, t0 # e0 : clear src bytes > null + zap t1, t7, t1 # .. e1 : clear dst bytes <= null + or t0, t1, t0 # e1 : + +1: stq_u t0, 0(a0) # e0 : + ret (t9) # e1 : + + /* Add the end-of-count bit to the eos detection bitmask. */ +$a_eoc: + or t10, t7, t7 + br $a_eos + + .end stxncpy_aligned + + .align 3 + .ent __stxncpy + .globl __stxncpy +__stxncpy: + .frame sp, 0, t9, 0 + .prologue 0 + + /* Are source and destination co-aligned? */ + xor a0, a1, t1 # e0 : + and a0, 7, t0 # .. e1 : find dest misalignment + and t1, 7, t1 # e0 : + addq a2, t0, a2 # .. e1 : bias count by dest misalignment + subq a2, 1, a2 # e0 : + and a2, 7, t2 # e1 : + srl a2, 3, a2 # e0 : a2 = loop counter = (count - 1)/8 + addq zero, 1, t10 # .. e1 : + sll t10, t2, t10 # e0 : t10 = bitmask of last count byte + bne t1, $unaligned # .. e1 : + + /* We are co-aligned; take care of a partial first word. */ + + ldq_u t1, 0(a1) # e0 : load first src word + addq a1, 8, a1 # .. e1 : + + beq t0, stxncpy_aligned # avoid loading dest word if not needed + ldq_u t0, 0(a0) # e0 : + br stxncpy_aligned # .. e1 : + + +/* The source and destination are not co-aligned. Align the destination + and cope. We have to be very careful about not reading too much and + causing a SEGV. */ + + .align 3 +$u_head: + /* We know just enough now to be able to assemble the first + full source word. We can still find a zero at the end of it + that prevents us from outputting the whole thing. + + On entry to this basic block: + t0 == the first dest word, unmasked + t1 == the shifted low bits of the first source word + t6 == bytemask that is -1 in dest word bytes */ + + ldq_u t2, 8(a1) # e0 : load second src word + addq a1, 8, a1 # .. e1 : + mskql t0, a0, t0 # e0 : mask trailing garbage in dst + extqh t2, a1, t4 # e0 : + or t1, t4, t1 # e1 : first aligned src word complete + mskqh t1, a0, t1 # e0 : mask leading garbage in src + or t0, t1, t0 # e0 : first output word complete + or t0, t6, t6 # e1 : mask original data for zero test + cmpbge zero, t6, t7 # e0 : + beq a2, $u_eocfin # .. e1 : + bne t7, $u_final # e1 : + + lda t6, -1 # e1 : mask out the bits we have + mskql t6, a1, t6 # e0 : already seen + stq_u t0, 0(a0) # e0 : store first output word + or t6, t2, t2 # .. e1 : + cmpbge zero, t2, t7 # e0 : find nulls in second partial + addq a0, 8, a0 # .. e1 : + subq a2, 1, a2 # e0 : + bne t7, $u_late_head_exit # .. e1 : + + /* Finally, we've got all the stupid leading edge cases taken care + of and we can set up to enter the main loop. */ + + extql t2, a1, t1 # e0 : position hi-bits of lo word + ldq_u t2, 8(a1) # .. e1 : read next high-order source word + addq a1, 8, a1 # e0 : + cmpbge zero, t2, t7 # e1 (stall) + beq a2, $u_eoc # e1 : + bne t7, $u_eos # e1 : + + /* Unaligned copy main loop. In order to avoid reading too much, + the loop is structured to detect zeros in aligned source words. + This has, unfortunately, effectively pulled half of a loop + iteration out into the head and half into the tail, but it does + prevent nastiness from accumulating in the very thing we want + to run as fast as possible. + + On entry to this basic block: + t1 == the shifted high-order bits from the previous source word + t2 == the unshifted current source word + + We further know that t2 does not contain a null terminator. */ + + .align 3 +$u_loop: + extqh t2, a1, t0 # e0 : extract high bits for current word + addq a1, 8, a1 # .. e1 : + extql t2, a1, t3 # e0 : extract low bits for next time + addq a0, 8, a0 # .. e1 : + or t0, t1, t0 # e0 : current dst word now complete + ldq_u t2, 0(a1) # .. e1 : load high word for next time + stq_u t0, -8(a0) # e0 : save the current word + mov t3, t1 # .. e1 : + subq a2, 1, a2 # e0 : + cmpbge zero, t2, t7 # .. e1 : test new word for eos + beq a2, $u_eoc # e1 : + beq t7, $u_loop # e1 : + + /* We've found a zero somewhere in the source word we just read. + If it resides in the lower half, we have one (probably partial) + word to write out, and if it resides in the upper half, we + have one full and one partial word left to write out. + + On entry to this basic block: + t1 == the shifted high-order bits from the previous source word + t2 == the unshifted current source word. */ +$u_eos: + extqh t2, a1, t0 # e0 : + or t0, t1, t0 # e1 : first (partial) source word complete + + cmpbge zero, t0, t7 # e0 : is the null in this first bit? + bne t7, $u_final # .. e1 (zdb) + + stq_u t0, 0(a0) # e0 : the null was in the high-order bits + addq a0, 8, a0 # .. e1 : + subq a2, 1, a2 # e1 : + +$u_late_head_exit: + extql t2, a1, t0 # .. e0 : + cmpbge zero, t0, t7 # e0 : + or t7, t10, t6 # e1 : + cmoveq a2, t6, t7 # e0 : + nop # .. e1 : + + /* Take care of a final (probably partial) result word. + On entry to this basic block: + t0 == assembled source word + t7 == cmpbge mask that found the null. */ +$u_final: + negq t7, t6 # e0 : isolate low bit set + and t6, t7, t8 # e1 : + + and t8, 0x80, t6 # e0 : avoid dest word load if we can + bne t6, 1f # .. e1 (zdb) + + ldq_u t1, 0(a0) # e0 : + subq t8, 1, t6 # .. e1 : + or t6, t8, t7 # e0 : + zapnot t0, t7, t0 # .. e1 : kill source bytes > null + zap t1, t7, t1 # e0 : kill dest bytes <= null + or t0, t1, t0 # e1 : + +1: stq_u t0, 0(a0) # e0 : + ret (t9) # .. e1 : + +$u_eoc: # end-of-count + extqh t2, a1, t0 + or t0, t1, t0 + cmpbge zero, t0, t7 + +$u_eocfin: # end-of-count, final word + or t10, t7, t7 + br $u_final + + /* Unaligned copy entry point. */ + .align 3 +$unaligned: + + ldq_u t1, 0(a1) # e0 : load first source word + + and a0, 7, t4 # .. e1 : find dest misalignment + and a1, 7, t5 # e0 : find src misalignment + + /* Conditionally load the first destination word and a bytemask + with 0xff indicating that the destination byte is sacrosanct. */ + + mov zero, t0 # .. e1 : + mov zero, t6 # e0 : + beq t4, 1f # .. e1 : + ldq_u t0, 0(a0) # e0 : + lda t6, -1 # .. e1 : + mskql t6, a0, t6 # e0 : +1: + subq a1, t4, a1 # .. e1 : sub dest misalignment from src addr + + /* If source misalignment is larger than dest misalignment, we need + extra startup checks to avoid SEGV. */ + + cmplt t4, t5, t8 # e1 : + extql t1, a1, t1 # .. e0 : shift src into place + lda t2, -1 # e0 : for creating masks later + beq t8, $u_head # e1 : + + mskqh t2, t5, t2 # e0 : begin src byte validity mask + cmpbge zero, t1, t7 # .. e1 : is there a zero? + extql t2, a1, t2 # e0 : + or t7, t10, t6 # .. e1 : test for end-of-count too + cmpbge zero, t2, t3 # e0 : + cmoveq a2, t6, t7 # .. e1 : + andnot t7, t3, t7 # e0 : + beq t7, $u_head # .. e1 (zdb) + + /* At this point we've found a zero in the first partial word of + the source. We need to isolate the valid source data and mask + it into the original destination data. (Incidentally, we know + that we'll need at least one byte of that original dest word.) */ + + ldq_u t0, 0(a0) # e0 : + negq t7, t6 # .. e1 : build bitmask of bytes <= zero + mskqh t1, t4, t1 # e0 : + and t6, t7, t8 # .. e1 : + subq t8, 1, t6 # e0 : + or t6, t8, t7 # e1 : + + zapnot t2, t7, t2 # e0 : prepare source word; mirror changes + zapnot t1, t7, t1 # .. e1 : to source validity mask + + andnot t0, t2, t0 # e0 : zero place for source to reside + or t0, t1, t0 # e1 : and put it there + stq_u t0, 0(a0) # e0 : + ret (t9) # .. e1 : + + .end __stxncpy From 81e25b608df040adda0b7111ccb272962782dc88 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 8 Oct 1996 23:39:13 +0000 Subject: [PATCH 0754/4487] update from main archive 961008 --- sysdeps/unix/sysv/linux/alpha/clone.S | 1 + sysdeps/unix/sysv/linux/m68k/clone.S | 1 + 2 files changed, 2 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S index a1ef324956..71d8053b12 100644 --- a/sysdeps/unix/sysv/linux/alpha/clone.S +++ b/sysdeps/unix/sysv/linux/alpha/clone.S @@ -20,6 +20,7 @@ Cambridge, MA 02139, USA. */ and invokes a function in the right context after its all over. */ #include +#define _ERRNO_H 1 #include /* int clone(int (*fn)(), void *child_stack, int flags, int nargs, ...) */ diff --git a/sysdeps/unix/sysv/linux/m68k/clone.S b/sysdeps/unix/sysv/linux/m68k/clone.S index 64077e00de..07280031a5 100644 --- a/sysdeps/unix/sysv/linux/m68k/clone.S +++ b/sysdeps/unix/sysv/linux/m68k/clone.S @@ -20,6 +20,7 @@ Cambridge, MA 02139, USA. */ and invokes a function in the right context after its all over. */ #include +#define _ERRNO_H 1 #include /* int clone (int (*fn) (), void *child_stack, int flags, int nargs, ...) */ From 05e860710ac19d20edd0c214c2ee83ae2bc7de2a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 11 Oct 1996 03:12:39 +0000 Subject: [PATCH 0755/4487] update from main archive 961010 --- sysdeps/alpha/strchr.c | 84 ----------------------------- sysdeps/alpha/stxcpy.S | 33 ++++++------ sysdeps/unix/sysv/linux/alpha/brk.S | 1 + 3 files changed, 18 insertions(+), 100 deletions(-) delete mode 100644 sysdeps/alpha/strchr.c diff --git a/sysdeps/alpha/strchr.c b/sysdeps/alpha/strchr.c deleted file mode 100644 index 69afa4b87f..0000000000 --- a/sysdeps/alpha/strchr.c +++ /dev/null @@ -1,84 +0,0 @@ -/* Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. - -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 -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -/* Return the length of the null-terminated string STR. Scan for - the null terminator quickly by testing eight bytes at a time. */ - -char * -strchr (const char *str, int c) -{ - const char *char_ptr; - const unsigned long int *longword_ptr; - unsigned long int charmask; - - c = (unsigned char) c; - - /* Handle the first few characters by reading one character at a time. - Do this until STR is aligned on a 8-byte border. */ - for (char_ptr = str; ((unsigned long int) char_ptr & 7) != 0; ++char_ptr) - if (*char_ptr == c) - return (char *) char_ptr; - else if (*char_ptr == '\0') - return NULL; - - longword_ptr = (unsigned long int *) char_ptr; - - /* Set up a longword, each of whose bytes is C. */ - charmask = c | (c << 8); - charmask |= charmask << 16; - charmask |= charmask << 32; - - for (;;) - { - const unsigned long int longword = *longword_ptr++; - int ge, le, zero; - - /* Set bits in ZERO if bytes in LONGWORD are zero. */ - asm ("cmpbge $31, %1, %0" : "=r" (zero) : "r" (longword)); - - /* Set bits in GE if bytes in CHARMASK are >= bytes in LONGWORD. */ - asm ("cmpbge %1, %2, %0" : "=r" (ge) : "r" (charmask), "r" (longword)); - - /* Set bits in LE if bytes in CHARMASK are <= bytes in LONGWORD. */ - asm ("cmpbge %2, %1, %0" : "=r" (le) : "r" (charmask), "r" (longword)); - - /* Bytes that are both <= and >= are == to C. */ - if (zero || (ge & le)) - { - /* Which of the bytes was the C? */ - - char *cp = (char *) (longword_ptr - 1); - int i; - - for (i = 0; i < 8; i++) - { - if (cp[i] == c) - return &cp[i]; - if (cp[i] == 0) - return NULL; - } - return NULL; - } - } -} - -#ifdef weak_alias -#undef index -weak_alias (strchr, index) -#endif diff --git a/sysdeps/alpha/stxcpy.S b/sysdeps/alpha/stxcpy.S index e381b704cd..49dd8e5c64 100644 --- a/sysdeps/alpha/stxcpy.S +++ b/sysdeps/alpha/stxcpy.S @@ -36,7 +36,7 @@ Cambridge, MA 02139, USA. */ Furthermore, v0, a3-a5, t11, and t12 are untouched. */ -/* This is generally scheduled for the EV5, but should still be pretty +/* This is generally scheduled for the EV5, but should still be pretty good for the EV4 too. */ #include @@ -65,7 +65,7 @@ stxcpy_aligned: lda t2, -1 # e1 : build a mask against false zero mskqh t2, a1, t2 # e0 : detection in the src word mskqh t1, a1, t3 # e0 : - ornot t1, t2, t2 # .. e1 : + ornot t1, t2, t2 # .. e1 : mskql t0, a1, t0 # e0 : assemble the first output word cmpbge zero, t2, t7 # .. e1 : bits set iff null found or t0, t3, t1 # e0 : @@ -99,9 +99,9 @@ $a_eos: /* We're doing a partial word store and so need to combine our source and original destination words. */ ldq_u t0, 0(a0) # e0 : - subq t8, 1, t6 # .. e1 : + subq t8, 1, t6 # .. e1 : zapnot t1, t6, t1 # e0 : clear src bytes >= null - or t8, t6, t7 # .. e1 : + or t8, t6, t7 # .. e1 : zap t0, t7, t0 # e0 : clear dst bytes <= null or t0, t1, t1 # e1 : @@ -156,13 +156,13 @@ $u_head: or t1, t4, t1 # .. e1 : mskqh t1, a0, t1 # e0 : or t0, t1, t1 # e1 : - + or t1, t6, t6 # e0 : cmpbge zero, t6, t7 # .. e1 : lda t6, -1 # e0 : for masking just below bne t7, $u_final # .. e1 : - mskql t6, a1, t6 # e0 : mask out the bits we have + mskql t6, a1, t6 # e0 : mask out the bits we have or t6, t2, t2 # e1 : already extracted before cmpbge zero, t2, t7 # e0 : testing eos bne t7, $u_late_head_exit # .. e1 (zdb) @@ -181,7 +181,7 @@ $u_head: /* Unaligned copy main loop. In order to avoid reading too much, the loop is structured to detect zeros in aligned source words. - This has, unfortunately, effectively pulled half of a loop + This has, unfortunately, effectively pulled half of a loop iteration out into the head and half into the tail, but it does prevent nastiness from accumulating in the very thing we want to run as fast as possible. @@ -207,7 +207,7 @@ $u_loop: /* We've found a zero somewhere in the source word we just read. If it resides in the lower half, we have one (probably partial) - word to write out, and if it resides in the upper half, we + word to write out, and if it resides in the upper half, we have one full and one partial word left to write out. On entry to this basic block: @@ -234,7 +234,7 @@ $u_final: negq t7, t6 # e0 : isolate low bit set and t6, t7, t8 # e1 : - and t8, 0x80, t6 # e0 : avoid dest word load if we can + and t8, 0x80, t6 # e0 : avoid dest word load if we can bne t6, 1f # .. e1 (zdb) ldq_u t0, 0(a0) # e0 : @@ -256,7 +256,7 @@ $unaligned: and a0, 7, t4 # .. e1 : find dest misalignment and a1, 7, t5 # e0 : find src misalignment - /* Conditionally load the first destination word and a bytemask + /* Conditionally load the first destination word and a bytemask with 0xff indicating that the destination byte is sacrosanct. */ mov zero, t0 # .. e1 : @@ -290,18 +290,19 @@ $unaligned: negq t7, t6 # .. e1 : build bitmask of bytes <= zero and t6, t7, t8 # e0 : - nop # .. e1 : + and a1, 7, t5 # .. e1 : subq t8, 1, t6 # e0 : or t6, t8, t7 # e1 : + srl t8, t5, t8 # e0 : adjust final null return value - zapnot t2, t7, t2 # e0 : prepare source word; mirror changes + zapnot t2, t7, t2 # .. e1 : prepare source word; mirror changes and t1, t2, t1 # e1 : to source validity mask - extql t2, a1, t2 # e0 : + extql t2, a1, t2 # .. e0 : extql t1, a1, t1 # e0 : - andnot t0, t2, t0 # e0 : zero place for source to reside + andnot t0, t2, t0 # .. e1 : zero place for source to reside or t0, t1, t1 # e1 : and put it there - stq_u t1, 0(a0) # e0 : - ret (t9) # .. e1 : + stq_u t1, 0(a0) # .. e0 : + ret (t9) .end __stxcpy diff --git a/sysdeps/unix/sysv/linux/alpha/brk.S b/sysdeps/unix/sysv/linux/alpha/brk.S index ad5f021e99..75be949aff 100644 --- a/sysdeps/unix/sysv/linux/alpha/brk.S +++ b/sysdeps/unix/sysv/linux/alpha/brk.S @@ -21,6 +21,7 @@ error. Instead, the error condition is indicated by returning the old break value (instead of the new, requested one). */ #include +#define _ERRNO_H #include #ifdef PIC From 85e960f70685f1b7cdc5888f56d81b7ea4fa9408 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 12 Oct 1996 00:55:37 +0000 Subject: [PATCH 0756/4487] update from main archive 961011 --- sysdeps/alpha/Dist | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/alpha/Dist b/sysdeps/alpha/Dist index c9419e6ef3..3cc9595dfb 100644 --- a/sysdeps/alpha/Dist +++ b/sysdeps/alpha/Dist @@ -3,3 +3,5 @@ DEFS.h divrem.h divl.S divlu.S divq.S divqu.S reml.S remlu.S remq.S remqu.S _mcount.S +stxcpy.S +stxncpy.S From 5415516c876dfe06a8543a48a21034f206e93cbc Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 17 Oct 1996 01:51:33 +0000 Subject: [PATCH 0757/4487] update from main archive 961016 --- sysdeps/m68k/bsd-_setjmp.S | 1 + sysdeps/m68k/bsd-setjmp.S | 1 + sysdeps/unix/sysv/linux/m68k/clone.S | 3 +++ sysdeps/unix/sysv/linux/m68k/mmap.S | 2 ++ sysdeps/unix/sysv/linux/m68k/sigcontext.h | 31 ----------------------- sysdeps/unix/sysv/linux/m68k/sigreturn.S | 3 +++ sysdeps/unix/sysv/linux/m68k/socket.S | 2 ++ sysdeps/unix/sysv/linux/m68k/syscall.S | 20 ++++++++++----- sysdeps/unix/sysv/linux/m68k/sysdep.S | 9 ++++--- sysdeps/unix/sysv/linux/m68k/sysdep.h | 28 +++++++++++++------- 10 files changed, 49 insertions(+), 51 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/m68k/sigcontext.h diff --git a/sysdeps/m68k/bsd-_setjmp.S b/sysdeps/m68k/bsd-_setjmp.S index 69aa7de04c..32d25e426a 100644 --- a/sysdeps/m68k/bsd-_setjmp.S +++ b/sysdeps/m68k/bsd-_setjmp.S @@ -46,3 +46,4 @@ ENTRY (_setjmp) #else jmp C_SYMBOL_NAME (__sigsetjmp) #endif +PSEUDO_END (_setjmp) diff --git a/sysdeps/m68k/bsd-setjmp.S b/sysdeps/m68k/bsd-setjmp.S index c853516824..a4053bd1bc 100644 --- a/sysdeps/m68k/bsd-setjmp.S +++ b/sysdeps/m68k/bsd-setjmp.S @@ -44,3 +44,4 @@ ENTRY (setjmp) #else jmp C_SYMBOL_NAME (__sigsetjmp) #endif +PSEUDO_END (setjmp) diff --git a/sysdeps/unix/sysv/linux/m68k/clone.S b/sysdeps/unix/sysv/linux/m68k/clone.S index 07280031a5..4dcd90e96c 100644 --- a/sysdeps/unix/sysv/linux/m68k/clone.S +++ b/sysdeps/unix/sysv/linux/m68k/clone.S @@ -27,6 +27,8 @@ Cambridge, MA 02139, USA. */ .text ENTRY (__clone) + CALL_MCOUNT + /* Sanity check arguments. */ movel #-EINVAL, %d0 movel 4(%sp), %a0 /* no NULL function pointers */ @@ -72,5 +74,6 @@ thread_start: #else jbsr _exit #endif +PSEUDO_END (__clone) weak_alias (__clone, clone) diff --git a/sysdeps/unix/sysv/linux/m68k/mmap.S b/sysdeps/unix/sysv/linux/m68k/mmap.S index ed0480dfd7..9bac533d44 100644 --- a/sysdeps/unix/sysv/linux/m68k/mmap.S +++ b/sysdeps/unix/sysv/linux/m68k/mmap.S @@ -22,6 +22,7 @@ Cambridge, MA 02139, USA. */ SYSCALL_ERROR_HANDLER ENTRY (__mmap) + CALL_MCOUNT move.l #SYS_ify (mmap), %d0 /* System call number in %d0. */ @@ -40,5 +41,6 @@ ENTRY (__mmap) mmap is declared to return a pointer. */ move.l %d0, %a0 rts +PSEUDO_END (__mmap) weak_alias (__mmap, mmap) diff --git a/sysdeps/unix/sysv/linux/m68k/sigcontext.h b/sysdeps/unix/sysv/linux/m68k/sigcontext.h deleted file mode 100644 index 585b47993a..0000000000 --- a/sysdeps/unix/sysv/linux/m68k/sigcontext.h +++ /dev/null @@ -1,31 +0,0 @@ -/* Structure describing state saved while handling a signal. Linux/m68k version. -Copyright (C) 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -/* State of this thread when the signal was taken. */ -struct sigcontext -{ - __sigset_t sc_mask; - unsigned long sc_usp; - unsigned long sc_d0; - unsigned long sc_d1; - unsigned long sc_a0; - unsigned long sc_a1; - unsigned short sc_sr; - unsigned long sc_pc; -}; diff --git a/sysdeps/unix/sysv/linux/m68k/sigreturn.S b/sysdeps/unix/sysv/linux/m68k/sigreturn.S index 7f6d643cb9..04f0db553c 100644 --- a/sysdeps/unix/sysv/linux/m68k/sigreturn.S +++ b/sysdeps/unix/sysv/linux/m68k/sigreturn.S @@ -20,9 +20,12 @@ Cambridge, MA 02139, USA. */ .text ENTRY (__sigreturn) + CALL_MCOUNT + addq.l #4, %sp /* Pop the return PC. */ DO_CALL (#SYS_ify (sigreturn), 0) /* Do the system call; it never returns. */ /* NOTREACHED */ +PSEUDO_END (__sigreturn) weak_alias (__sigreturn, sigreturn) diff --git a/sysdeps/unix/sysv/linux/m68k/socket.S b/sysdeps/unix/sysv/linux/m68k/socket.S index a85f41c334..1294287cce 100644 --- a/sysdeps/unix/sysv/linux/m68k/socket.S +++ b/sysdeps/unix/sysv/linux/m68k/socket.S @@ -35,6 +35,7 @@ Cambridge, MA 02139, USA. */ .globl P(__,socket) ENTRY (P(__,socket)) + CALL_MCOUNT /* Save registers. */ move.l %d2, %a0 @@ -58,5 +59,6 @@ ENTRY (P(__,socket)) /* Successful; return the syscall's value. */ rts +PSEUDO_END (P(__,socket)) weak_alias (P(__,socket), socket) diff --git a/sysdeps/unix/sysv/linux/m68k/syscall.S b/sysdeps/unix/sysv/linux/m68k/syscall.S index 2cc451c58b..1c7bd6bbd1 100644 --- a/sysdeps/unix/sysv/linux/m68k/syscall.S +++ b/sysdeps/unix/sysv/linux/m68k/syscall.S @@ -18,14 +18,20 @@ Cambridge, MA 02139, USA. */ #include +/* Please consult the file sysdeps/unix/sysv/linux/m68k/sysdep.h for + more information about the value -128 used below.*/ + .text SYSCALL_ERROR_HANDLER ENTRY (syscall) - move.l (%sp)+, %a0 /* Pop return address. */ - DO_CALL ((%sp), 5) /* Frob the args and do the system call. */ - tst.l %d0 /* Check %d0 for error. */ - jmi error /* Jump to error handler if negative. */ - jmp (%a0) /* Return to caller. */ + CALL_MCOUNT -error: pea (%a0) - jra syscall_error + move.l 4(%sp), %d0 /* Load syscall number. */ + _DOARGS_5 (24) /* Frob arguments. */ + trap &0 /* Do the system call. */ + UNDOARGS_5 /* Unfrob arguments. */ + moveq.l &-128, %d1 + cmp.l %d1, %d0 /* Check %d0 for error. */ + jcc syscall_error /* Jump to error handler if negative. */ + rts /* Return to caller. */ +PSEUDO_END (syscall) diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.S b/sysdeps/unix/sysv/linux/m68k/sysdep.S index 407c2d393c..31fa20f55d 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.S +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.S @@ -46,7 +46,7 @@ __errno = errno /* This name is expected by the MT code. */ /* The syscall stubs jump here when they detect an error. */ -ENTRY(__syscall_error) +ENTRY (__syscall_error) neg.l %d0 move.l %d0, errno #ifdef _LIBC_REENTRANT @@ -59,14 +59,15 @@ ENTRY(__syscall_error) return a pointer. */ move.l %d0, %a0 rts - .size __syscall_error, . - __syscall_error +PSEUDO_END (__syscall_error) #endif /* PIC */ -ERRNO(__errno_location) +ENTRY (__errno_location) + CALL_MCOUNT #ifdef PIC move.l (%pc, errno@GOTPC), %a0 #else lea errno, %a0 #endif rts - .size __errno_location, . - __errno_location +PSEUDO_END (__errno_location) diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h index cfc9b04af0..9cddd20552 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -33,8 +33,6 @@ Cambridge, MA 02139, USA. */ #ifdef ASSEMBLER -#define POUND # - /* Define an entry point visible from C. */ #define ENTRY(name) \ .globl name; \ @@ -67,14 +65,26 @@ Cambridge, MA 02139, USA. */ #define syscall_error __syscall_error /* Linux uses a negative return value to indicate syscall errors, unlike - most Unices, which use the condition codes' carry flag. */ + most Unices, which use the condition codes' carry flag. + + Since version 2.1 the return value of a system call might be negative + even if the call succeeded. E.g., the `lseek' system call might return + a large offset. Therefore we must not anymore test for < 0, but test + for a real error by making sure the value in %d0 is a real error + number. For now (as of 2.1.1) 122 is the largest defined error number. + We allow for a bit of room for development and treat -128 to -1 as + error values. */ #define PSEUDO(name, syscall_name, args) \ .text; \ SYSCALL_ERROR_HANDLER \ ENTRY (name) \ - DO_CALL (POUND SYS_ify (syscall_name), args); \ - tst.l %d0; \ - jmi syscall_error; + DO_CALL (&SYS_ify (syscall_name), args); \ + moveq.l &-128, %d1; \ + cmp.l %d1, %d0; \ + jcc syscall_error + +#undef PSEUDO_END +#define PSEUDO_END(name) .size name, . - name #ifdef PIC /* Store (- %d0) into errno through the GOT. */ @@ -88,7 +98,7 @@ syscall_error: \ move.l %d0, -(%sp); \ jbsr __errno_location@PLTPC; \ move.l (%sp)+, (%a0); \ - move.l POUND -1, %d0; \ + move.l &-1, %d0; \ /* Copy return value to %a0 for syscalls that are declared to return \ a pointer (e.g., mmap). */ \ move.l %d0, %a0; \ @@ -100,7 +110,7 @@ syscall_error: \ move.l (errno@GOTPC, %pc), %a0; \ neg.l %d0; \ move.l %d0, (%a0); \ - move.l POUND -1, %d0; \ + move.l &-1, %d0; \ /* Copy return value to %a0 for syscalls that are declared to return \ a pointer (e.g., mmap). */ \ move.l %d0, %a0; \ @@ -138,7 +148,7 @@ syscall_error: \ #define DO_CALL(syscall, args) \ move.l syscall, %d0; \ DOARGS_##args \ - trap POUND 0; \ + trap &0; \ UNDOARGS_##args #define DOARGS_0 /* No arguments to frob. */ From 97250b8f6a2c7c6887898546010110a6ef801979 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 21 Oct 1996 01:26:31 +0000 Subject: [PATCH 0758/4487] update from main archive 961020 --- sysdeps/unix/sysv/linux/alpha/Makefile | 2 +- sysdeps/unix/sysv/linux/alpha/sigaction.h | 51 +++++++++++++++++ sysdeps/unix/sysv/linux/alpha/signum.h | 69 +++++++++++++++++++++++ sysdeps/unix/sysv/linux/alpha/statbuf.h | 49 ++++++++-------- 4 files changed, 145 insertions(+), 26 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/alpha/sigaction.h create mode 100644 sysdeps/unix/sysv/linux/alpha/signum.h diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile index fa433e9d8b..3908b5703c 100644 --- a/sysdeps/unix/sysv/linux/alpha/Makefile +++ b/sysdeps/unix/sysv/linux/alpha/Makefile @@ -1,5 +1,5 @@ ifeq ($(subdir), misc) -sysdep_headers += alpha/ptrace.h alpha/regdef.h sys/io.h +sysdep_headers += alpha/ptrace.h alpha/regdef.h sysdep_routines += ieee_get_fp_control ieee_set_fp_control \ sethae ioperm osf_sigprocmask fstatfs statfs llseek diff --git a/sysdeps/unix/sysv/linux/alpha/sigaction.h b/sysdeps/unix/sysv/linux/alpha/sigaction.h new file mode 100644 index 0000000000..57ce5e6ded --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/sigaction.h @@ -0,0 +1,51 @@ +/* The proper definitions for Linux/Alpha sigaction. +Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +/* Structure describing the action to be taken when a signal arrives. */ +struct sigaction + { + /* Signal handler. */ + __sighandler_t sa_handler; + + /* Additional set of signals to be blocked. */ + __sigset_t sa_mask; + + /* Special flags. */ + unsigned int sa_flags; + }; + +/* Bits in `sa_flags'. */ +#define SA_NOCLDSTOP 0x00000004 /* Don't send SIGCHLD when children stop. */ +#ifdef __USE_MISC +#define SA_STACK 0x00000001 /* Use signal stack by using `sa_restorer'. */ +#define SA_RESTART 0x00000002 /* Don't restart syscall on signal return. */ +#define SA_INTERRUPT 0x20000000 /* Historical no-op. */ +#define SA_NOMASK 0x00000008 /* Don't automatically block the signal when + its handler is being executed. */ +#define SA_ONESHOT 0x00000010 /* Reset to SIG_DFL on entry to handler. */ + +/* Some aliases for the SA_ constants. */ +#define SA_NODEFER SA_NOMASK +#define SA_RESETHAND SA_ONESHOT +#endif + +/* Values for the HOW argument to `sigprocmask'. */ +#define SIG_BLOCK 1 /* Block signals. */ +#define SIG_UNBLOCK 2 /* Unblock signals. */ +#define SIG_SETMASK 3 /* Set the set of blocked signals. */ diff --git a/sysdeps/unix/sysv/linux/alpha/signum.h b/sysdeps/unix/sysv/linux/alpha/signum.h new file mode 100644 index 0000000000..be6132d42f --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/signum.h @@ -0,0 +1,69 @@ +/* Signal number definitions. Linux/Alpha version. +Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifdef _SIGNAL_H + +/* Fake signal functions. */ +#define SIG_ERR ((__sighandler_t) -1) /* Error return. */ +#define SIG_DFL ((__sighandler_t) 0) /* Default action. */ +#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */ + +/* + * Linux/AXP has different signal numbers that Linux/i386: I'm trying + * to make it OSF/1 binary compatible, at least for normal binaries. + */ +#define SIGHUP 1 +#define SIGINT 2 +#define SIGQUIT 3 +#define SIGILL 4 +#define SIGTRAP 5 +#define SIGABRT 6 +#define SIGEMT 7 +#define SIGFPE 8 +#define SIGKILL 9 +#define SIGBUS 10 +#define SIGSEGV 11 +#define SIGSYS 12 +#define SIGPIPE 13 +#define SIGALRM 14 +#define SIGTERM 15 +#define SIGURG 16 +#define SIGSTOP 17 +#define SIGTSTP 18 +#define SIGCONT 19 +#define SIGCHLD 20 +#define SIGTTIN 21 +#define SIGTTOU 22 +#define SIGIO 23 +#define SIGXCPU 24 +#define SIGXFSZ 25 +#define SIGVTALRM 26 +#define SIGPROF 27 +#define SIGWINCH 28 +#define SIGINFO 29 +#define SIGUSR1 30 +#define SIGUSR2 31 + +#define SIGPOLL SIGIO +#define SIGPWR SIGINFO +#define SIGIOT SIGABRT + +#define _NSIG 32 /* Biggest signal number + 1. */ + +#endif /* included. */ diff --git a/sysdeps/unix/sysv/linux/alpha/statbuf.h b/sysdeps/unix/sysv/linux/alpha/statbuf.h index e0e7a8ae37..5b59155d10 100644 --- a/sysdeps/unix/sysv/linux/alpha/statbuf.h +++ b/sysdeps/unix/sysv/linux/alpha/statbuf.h @@ -1,5 +1,5 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@zen.org). +/* Copyright (C) 1996 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 Library General Public License as @@ -19,32 +19,30 @@ Cambridge, MA 02139, USA. */ #ifndef _STATBUF_H #define _STATBUF_H -#include +/* The Alpha has no additional syscall versions. */ -/* Structure describing file characteristics. */ -struct stat - { - int st_dev; /* Device. */ - unsigned int st_ino; /* File serial number. */ - unsigned int st_mode; /* File mode. */ - unsigned int st_nlink; /* Link count. */ - unsigned int st_uid; /* User ID of the file's owner. */ - unsigned int st_gid; /* Group ID of the file's group.*/ - int st_rdev; /* Device number, if device. */ - - long st_size; /* Size of file, in bytes. */ +/* Versions of the `struct stat' data structure. */ +#define _STAT_VER 0 - int st_atime; /* Time of last access. */ - int st_atime_usec; - int st_mtime; /* Time of last modification. */ - int st_mtime_usec; - int st_ctime; /* Time of last status change. */ - int st_ctime_usec; +/* Versions of the `xmknod' interface. */ +#define _MKNOD_VER_LINUX 0 - unsigned int st_blksize; /* Optimal block size for I/O. */ -#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ - - int st_blocks; /* Number of 512-byte blocks allocated. */ +struct stat + { + unsigned int st_dev; /* Device. */ + unsigned int st_ino; /* File serial number. */ + unsigned int st_mode; /* File mode. */ + unsigned int st_nlink; /* Link count. */ + unsigned int st_uid; /* User ID of the file's owner. */ + unsigned int st_gid; /* Group ID of the file's group.*/ + unsigned int st_rdev; /* Device number, if device. */ + long int st_size; /* Size of file, in bytes. */ + unsigned long int st_atime; /* Time of last access. */ + unsigned long int st_mtime; /* Time of last modification. */ + unsigned long int st_ctime; /* Time of last status change. */ + unsigned int st_blksize; /* Optimal block size for I/O. */ +#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ + int st_blocks; /* Nr. of 512-byte blocks allocated. */ unsigned int st_flags; unsigned int st_gen; }; @@ -60,6 +58,7 @@ struct stat #define __S_IFREG 0100000 /* Regular file. */ #define __S_IFIFO 0010000 /* FIFO. */ +/* These don't actually exist on System V, but having them doesn't hurt. */ #define __S_IFLNK 0120000 /* Symbolic link. */ #define __S_IFSOCK 0140000 /* Socket. */ From b8bd7edd266d5942125549b7485a750f38bbb02b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 22 Oct 1996 23:29:26 +0000 Subject: [PATCH 0759/4487] update from main archvie 961022 --- sysdeps/m68k/bsd-_setjmp.S | 2 +- sysdeps/m68k/bsd-setjmp.S | 2 +- sysdeps/unix/sysv/linux/m68k/clone.S | 10 ++-------- sysdeps/unix/sysv/linux/m68k/mmap.S | 3 --- sysdeps/unix/sysv/linux/m68k/sigreturn.S | 4 +--- sysdeps/unix/sysv/linux/m68k/socket.S | 3 --- sysdeps/unix/sysv/linux/m68k/syscall.S | 3 --- sysdeps/unix/sysv/linux/m68k/sysdep.S | 10 ++++++---- sysdeps/unix/sysv/linux/m68k/sysdep.h | 10 ++++++---- 9 files changed, 17 insertions(+), 30 deletions(-) diff --git a/sysdeps/m68k/bsd-_setjmp.S b/sysdeps/m68k/bsd-_setjmp.S index 32d25e426a..dc1f52c6aa 100644 --- a/sysdeps/m68k/bsd-_setjmp.S +++ b/sysdeps/m68k/bsd-_setjmp.S @@ -46,4 +46,4 @@ ENTRY (_setjmp) #else jmp C_SYMBOL_NAME (__sigsetjmp) #endif -PSEUDO_END (_setjmp) +END (_setjmp) diff --git a/sysdeps/m68k/bsd-setjmp.S b/sysdeps/m68k/bsd-setjmp.S index a4053bd1bc..7158907cfe 100644 --- a/sysdeps/m68k/bsd-setjmp.S +++ b/sysdeps/m68k/bsd-setjmp.S @@ -44,4 +44,4 @@ ENTRY (setjmp) #else jmp C_SYMBOL_NAME (__sigsetjmp) #endif -PSEUDO_END (setjmp) +END (setjmp) diff --git a/sysdeps/unix/sysv/linux/m68k/clone.S b/sysdeps/unix/sysv/linux/m68k/clone.S index 4dcd90e96c..4465dd8f68 100644 --- a/sysdeps/unix/sysv/linux/m68k/clone.S +++ b/sysdeps/unix/sysv/linux/m68k/clone.S @@ -27,7 +27,6 @@ Cambridge, MA 02139, USA. */ .text ENTRY (__clone) - CALL_MCOUNT /* Sanity check arguments. */ movel #-EINVAL, %d0 @@ -63,17 +62,12 @@ ENTRY (__clone) rts - SYSCALL_ERROR_HANDLER - thread_start: subl %fp, %fp /* terminate the stack frame */ jsr (%a0) movel %d0, -(%sp) -#ifdef PIC - bsrl _exit@PLTPC -#else - jbsr _exit -#endif + jbsr JUMPTARGET (_exit) + PSEUDO_END (__clone) weak_alias (__clone, clone) diff --git a/sysdeps/unix/sysv/linux/m68k/mmap.S b/sysdeps/unix/sysv/linux/m68k/mmap.S index 9bac533d44..257ff4da28 100644 --- a/sysdeps/unix/sysv/linux/m68k/mmap.S +++ b/sysdeps/unix/sysv/linux/m68k/mmap.S @@ -19,10 +19,7 @@ Cambridge, MA 02139, USA. */ #include .text - SYSCALL_ERROR_HANDLER - ENTRY (__mmap) - CALL_MCOUNT move.l #SYS_ify (mmap), %d0 /* System call number in %d0. */ diff --git a/sysdeps/unix/sysv/linux/m68k/sigreturn.S b/sysdeps/unix/sysv/linux/m68k/sigreturn.S index 04f0db553c..0971acd20e 100644 --- a/sysdeps/unix/sysv/linux/m68k/sigreturn.S +++ b/sysdeps/unix/sysv/linux/m68k/sigreturn.S @@ -20,12 +20,10 @@ Cambridge, MA 02139, USA. */ .text ENTRY (__sigreturn) - CALL_MCOUNT - addq.l #4, %sp /* Pop the return PC. */ DO_CALL (#SYS_ify (sigreturn), 0) /* Do the system call; it never returns. */ /* NOTREACHED */ -PSEUDO_END (__sigreturn) +END (__sigreturn) weak_alias (__sigreturn, sigreturn) diff --git a/sysdeps/unix/sysv/linux/m68k/socket.S b/sysdeps/unix/sysv/linux/m68k/socket.S index 1294287cce..d0741afeb1 100644 --- a/sysdeps/unix/sysv/linux/m68k/socket.S +++ b/sysdeps/unix/sysv/linux/m68k/socket.S @@ -23,8 +23,6 @@ Cambridge, MA 02139, USA. */ #define P2(a, b) a##b .text - SYSCALL_ERROR_HANDLER - /* The socket-oriented system calls are handled unusally in Linux. They are all gated through the single `socketcall' system call number. `socketcall' takes two arguments: the first is the subcode, specifying @@ -35,7 +33,6 @@ Cambridge, MA 02139, USA. */ .globl P(__,socket) ENTRY (P(__,socket)) - CALL_MCOUNT /* Save registers. */ move.l %d2, %a0 diff --git a/sysdeps/unix/sysv/linux/m68k/syscall.S b/sysdeps/unix/sysv/linux/m68k/syscall.S index 1c7bd6bbd1..b7417aa911 100644 --- a/sysdeps/unix/sysv/linux/m68k/syscall.S +++ b/sysdeps/unix/sysv/linux/m68k/syscall.S @@ -22,10 +22,7 @@ Cambridge, MA 02139, USA. */ more information about the value -128 used below.*/ .text - SYSCALL_ERROR_HANDLER ENTRY (syscall) - CALL_MCOUNT - move.l 4(%sp), %d0 /* Load syscall number. */ _DOARGS_5 (24) /* Frob arguments. */ trap &0 /* Do the system call. */ diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.S b/sysdeps/unix/sysv/linux/m68k/sysdep.S index 31fa20f55d..848ece58e8 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.S +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.S @@ -46,7 +46,10 @@ __errno = errno /* This name is expected by the MT code. */ /* The syscall stubs jump here when they detect an error. */ -ENTRY (__syscall_error) + .globl __syscall_error + .type __syscall_error, @function + .align 4 +__syscall_error: neg.l %d0 move.l %d0, errno #ifdef _LIBC_REENTRANT @@ -59,15 +62,14 @@ ENTRY (__syscall_error) return a pointer. */ move.l %d0, %a0 rts -PSEUDO_END (__syscall_error) +END (__syscall_error) #endif /* PIC */ ENTRY (__errno_location) - CALL_MCOUNT #ifdef PIC move.l (%pc, errno@GOTPC), %a0 #else lea errno, %a0 #endif rts -PSEUDO_END (__errno_location) +END (__errno_location) diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h index 9cddd20552..3366caab45 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -41,6 +41,9 @@ Cambridge, MA 02139, USA. */ C_LABEL(name) \ CALL_MCOUNT +#undef END +#define END(name) .size name, . - name + /* If compiled for profiling, call `_mcount' at the start of each function. */ #ifdef PROF /* The mcount code relies on a normal frame pointer being on the stack @@ -76,7 +79,6 @@ Cambridge, MA 02139, USA. */ error values. */ #define PSEUDO(name, syscall_name, args) \ .text; \ - SYSCALL_ERROR_HANDLER \ ENTRY (name) \ DO_CALL (&SYS_ify (syscall_name), args); \ moveq.l &-128, %d1; \ @@ -84,13 +86,14 @@ Cambridge, MA 02139, USA. */ jcc syscall_error #undef PSEUDO_END -#define PSEUDO_END(name) .size name, . - name +#define PSEUDO_END(name) \ + SYSCALL_ERROR_HANDLER; \ + END (name) #ifdef PIC /* Store (- %d0) into errno through the GOT. */ #ifdef _LIBC_REENTRANT #define SYSCALL_ERROR_HANDLER \ - .type syscall_error, @function; \ syscall_error: \ move.l (errno@GOTPC, %pc), %a0; \ neg.l %d0; \ @@ -105,7 +108,6 @@ syscall_error: \ rts; #else #define SYSCALL_ERROR_HANDLER \ - .type syscall_error, @function; \ syscall_error: \ move.l (errno@GOTPC, %pc), %a0; \ neg.l %d0; \ From a5f8d8b5810ba9b15dab5fd9ad013ef3d7e7ba10 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 31 Oct 1996 02:56:57 +0000 Subject: [PATCH 0760/4487] update from main archive 961030 --- sysdeps/unix/bsd/sun/sunos4/resourcebits.h | 85 +++++++++++++++++++++- sysdeps/unix/sysv/linux/m68k/sysdep.S | 5 +- 2 files changed, 85 insertions(+), 5 deletions(-) diff --git a/sysdeps/unix/bsd/sun/sunos4/resourcebits.h b/sysdeps/unix/bsd/sun/sunos4/resourcebits.h index 485dec9b81..8f515db330 100644 --- a/sysdeps/unix/bsd/sun/sunos4/resourcebits.h +++ b/sysdeps/unix/bsd/sun/sunos4/resourcebits.h @@ -52,5 +52,88 @@ enum __rlimit_resource #defin RLIMIT_NOFILE RLIMIT_NOFILE #defin RLIMIT_OFILE RLIMIT_OFILE - RLIM_NLIMITS + RLIM_NLIMITS, + + RLIM_INFINITY = 0x7fffffff /* Value to indicate that there is no limit. */ +#define RLIM_INFINITY RLIM_INFINITY + }; + +struct rlimit + { + /* The current (soft) limit. */ + int rlim_cur; + /* The hard limit. */ + int rlim_max; + }; + +/* Whose usage statistics do you want? */ +enum __rusage_who +/* The macro definitions are necessary because some programs want + to test for operating system features with #ifdef RUSAGE_SELF. + In ISO C the reflexive definition is a no-op. */ + { + /* The calling process. */ + RUSAGE_SELF = 0, +#define RUSAGE_SELF RUSAGE_SELF + /* All of its terminated child processes. */ + RUSAGE_CHILDREN = -1 +#define RUSAGE_CHILDREN RUSAGE_CHILDREN + }; + +#include /* For `struct timeval'. */ + +/* Structure which says how much of each resource has been used. */ +struct rusage + { + /* Total amount of user time used. */ + struct timeval ru_utime; + /* Total amount of system time used. */ + struct timeval ru_stime; + /* Maximum resident set size (in kilobytes). */ + long int ru_maxrss; + /* Amount of sharing of text segment memory + with other processes (kilobyte-seconds). */ + long int ru_ixrss; + /* Amount of data segment memory used (kilobyte-seconds). */ + long int ru_idrss; + /* Amount of stack memory used (kilobyte-seconds). */ + long int ru_isrss; + /* Number of soft page faults (i.e. those serviced by reclaiming + a page from the list of pages awaiting reallocation. */ + long int ru_minflt; + /* Number of hard page faults (i.e. those that required I/O). */ + long int ru_majflt; + /* Number of times a process was swapped out of physical memory. */ + long int ru_nswap; + /* Number of input operations via the file system. Note: This + and `ru_oublock' do not include operations with the cache. */ + long int ru_inblock; + /* Number of output operations via the file system. */ + long int ru_oublock; + /* Number of IPC messages sent. */ + long int ru_msgsnd; + /* Number of IPC messages received. */ + long int ru_msgrcv; + /* Number of signals delivered. */ + long int ru_nsignals; + /* Number of voluntary context switches, i.e. because the process + gave up the process before it had to (usually to wait for some + resource to be available). */ + long int ru_nvcsw; + /* Number of involuntary context switches, i.e. a higher priority process + became runnable or the current process used up its time slice. */ + long int ru_nivcsw; + }; + +/* Priority limits. */ +#define PRIO_MIN -20 /* Minimum priority a process can have. */ +#define PRIO_MAX 20 /* Maximum priority a process can have. */ + +/* The type of the WHICH argument to `getpriority' and `setpriority', + indicating what flavor of entity the WHO argument specifies. */ +enum __priority_which + { + PRIO_PROCESS = 0, /* WHO is a process ID. */ + PRIO_PGRP = 1, /* WHO is a process group ID. */ + PRIO_USER = 2 /* WHO is a user ID. */ }; diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.S b/sysdeps/unix/sysv/linux/m68k/sysdep.S index 848ece58e8..7016a26a60 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.S +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.S @@ -32,10 +32,7 @@ errno: .space 4 .size errno,4 .globl _errno .type _errno,@object -_errno = errno /* This name is expected by hj libc.so.5 startup code. */ - .globl __errno - .type __errno,@object -__errno = errno /* This name is expected by the MT code. */ +_errno = errno /* This name is expected by hj's libc.so.5 startup code. */ .text /* The following code is only used in the shared library when we From a42778ef73fa72f352f5401218eb60637bb5630b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 31 Oct 1996 03:00:56 +0000 Subject: [PATCH 0761/4487] Linux specific version is enough --- sysdeps/unix/sysv/linux/alpha/resourcebits.h | 63 ------------------- sysdeps/unix/sysv/linux/m68k/resourcebits.h | 63 ------------------- sysdeps/unix/sysv/linux/mips/resourcebits.h | 65 -------------------- 3 files changed, 191 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/alpha/resourcebits.h delete mode 100644 sysdeps/unix/sysv/linux/m68k/resourcebits.h delete mode 100644 sysdeps/unix/sysv/linux/mips/resourcebits.h diff --git a/sysdeps/unix/sysv/linux/alpha/resourcebits.h b/sysdeps/unix/sysv/linux/alpha/resourcebits.h deleted file mode 100644 index a53d523a1e..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/resourcebits.h +++ /dev/null @@ -1,63 +0,0 @@ -/* Bit values for resource limits. Linux/Alpha version. -Copyright (C) 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -/* These are the values for Linux/Alpha. */ - -/* Kinds of resource limit. */ -enum __rlimit_resource - { - /* Per-process CPU limit, in seconds. */ - RLIMIT_CPU, -#define RLIMIT_CPU RLIMIT_CPU - /* Largest file that can be created, in bytes. */ - RLIMIT_FSIZE, -#define RLIMIT_FSIZE RLIMIT_FSIZE - /* Maximum size of data segment, in bytes. */ - RLIMIT_DATA, -#define RLIMIT_DATA RLIMIT_DATA - /* Maximum size of stack segment, in bytes. */ - RLIMIT_STACK, -#define RLIMIT_STACK RLIMIT_STACK - /* Largest core file that can be created, in bytes. */ - RLIMIT_CORE, -#define RLIMIT_CORE RLIMIT_CORE - /* Largest resident set size, in bytes. - This affects swapping; processes that are exceeding their - resident set size will be more likely to have physical memory - taken from them. */ - RLIMIT_RSS, -#define RLIMIT_RSS RLIMIT_RSS - /* Number of open files. */ - RLIMIT_OFILE, -#define RLIMIT_OFILE RLIMIT_OFILE - RLIMIT_NOFILE = RLIMIT_OFILE, /* Another name for the same thing. */ -#define RLIMIT_NOFILE RLIMIT_NOFILE - /* Address space limit. */ - RLIMIT_AS, -#define RLIMIT_AS RLIMIT_AS - /* Number of processes. */ - RLIMIT_NPROC, -#define RLIMIT_NPROC RLIMIT_NPROC - /* Locked-in-memory address space. */ - RLIMIT_MEMLOCK, -#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK - - RLIMIT_NLIMITS, /* Number of limit flavors. */ - RLIM_NLIMITS = RLIMIT_NLIMITS /* Traditional name for same. */ - }; diff --git a/sysdeps/unix/sysv/linux/m68k/resourcebits.h b/sysdeps/unix/sysv/linux/m68k/resourcebits.h deleted file mode 100644 index d2f2daef91..0000000000 --- a/sysdeps/unix/sysv/linux/m68k/resourcebits.h +++ /dev/null @@ -1,63 +0,0 @@ -/* Bit values for resource limits. Linux/m68k version. -Copyright (C) 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -/* These are the values for Linux/m68k. */ - -/* Kinds of resource limit. */ -enum __rlimit_resource - { - /* Per-process CPU limit, in seconds. */ - RLIMIT_CPU, -#define RLIMIT_CPU RLIMIT_CPU - /* Largest file that can be created, in bytes. */ - RLIMIT_FSIZE, -#define RLIMIT_FSIZE RLIMIT_FSIZE - /* Maximum size of data segment, in bytes. */ - RLIMIT_DATA, -#define RLIMIT_DATA RLIMIT_DATA - /* Maximum size of stack segment, in bytes. */ - RLIMIT_STACK, -#define RLIMIT_STACK RLIMIT_STACK - /* Largest core file that can be created, in bytes. */ - RLIMIT_CORE, -#define RLIMIT_CORE RLIMIT_CORE - /* Largest resident set size, in bytes. - This affects swapping; processes that are exceeding their - resident set size will be more likely to have physical memory - taken from them. */ - RLIMIT_RSS, -#define RLIMIT_RSS RLIMIT_RSS - /* Number of processes. */ - RLIMIT_NPROC, -#define RLIMIT_NPROC RLIMIT_NPROC - /* Number of open files. */ - RLIMIT_OFILE, -#define RLIMIT_OFILE RLIMIT_OFILE - RLIMIT_NOFILE = RLIMIT_OFILE, /* Another name for the same thing. */ -#define RLIMIT_NOFILE RLIMIT_NOFILE - /* Locked-in-memory address space. */ - RLIMIT_MEMLOCK, -#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK - /* Address space limit. */ - RLIMIT_AS, -#define RLIMIT_AS RLIMIT_AS - - RLIMIT_NLIMITS, /* Number of limit flavors. */ - RLIM_NLIMITS = RLIMIT_NLIMITS /* Traditional name for same. */ - }; diff --git a/sysdeps/unix/sysv/linux/mips/resourcebits.h b/sysdeps/unix/sysv/linux/mips/resourcebits.h deleted file mode 100644 index 095f40b09c..0000000000 --- a/sysdeps/unix/sysv/linux/mips/resourcebits.h +++ /dev/null @@ -1,65 +0,0 @@ -/* Bit values for resource limits. Linux/MIPS version. -Copyright (C) 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -/* These are the values for Linux/MIPS. */ - -/* Kinds of resource limit. */ -enum __rlimit_resource - { - /* Per-process CPU limit, in seconds. */ - RLIMIT_CPU, -#define RLIMIT_CPU RLIMIT_CPU - /* Largest file that can be created, in bytes. */ - RLIMIT_FSIZE, -#define RLIMIT_FSIZE RLIMIT_FSIZE - /* Maximum size of data segment, in bytes. */ - RLIMIT_DATA, -#define RLIMIT_DATA RLIMIT_DATA - /* Maximum size of stack segment, in bytes. */ - RLIMIT_STACK, -#define RLIMIT_STACK RLIMIT_STACK - /* Largest core file that can be created, in bytes. */ - RLIMIT_CORE, -#define RLIMIT_CORE RLIMIT_CORE - /* Number of open files. */ - RLIMIT_OFILE, -#define RLIMIT_OFILE RLIMIT_OFILE - RLIMIT_NOFILE = RLIMIT_OFILE, /* Another name for the same thing. */ -#define RLIMIT_NOFILE RLIMIT_NOFILE - /* Address space limit. */ - RLIMIT_AS, -#define RLIMIT_AS RLIMIT_AS - RLIMIT_VMEM = RLIMIT_AS, -#define RLIMIT_VMEM RLIMIT_VMEM - /* Largest resident set size, in bytes. - This affects swapping; processes that are exceeding their - resident set size will be more likely to have physical memory - taken from them. */ - RLIMIT_RSS, -#define RLIMIT_RSS RLIMIT_RSS - /* Number of processes. */ - RLIMIT_NPROC, -#define RLIMIT_NPROC RLIMIT_NPROC - /* Locked-in-memory address space. */ - RLIMIT_MEMLOCK, -#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK - - RLIMIT_NLIMITS, /* Number of limit flavors. */ - RLIM_NLIMITS = RLIMIT_NLIMITS /* Traditional name for same. */ - }; From cbb7824d085626bf901805035ce5170f16147a96 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 2 Nov 1996 01:27:41 +0000 Subject: [PATCH 0762/4487] update from main archive 961101 --- sysdeps/unix/sysv/linux/alpha/timebits.h | 41 ++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/timebits.h diff --git a/sysdeps/unix/sysv/linux/alpha/timebits.h b/sysdeps/unix/sysv/linux/alpha/timebits.h new file mode 100644 index 0000000000..f777dc2aa8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/timebits.h @@ -0,0 +1,41 @@ +/* System-dependent timing definitions. Linux/Alpha version. + Copyright (C) 1996 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifdef __need_timeval +# undef __need_timeval +# ifndef _STRUCT_TIMEVAL +# define _STRUCT_TIMEVAL 1 +/* A time value that is accurate to the nearest + microsecond but also has a range of years. */ +struct timeval + { + int tv_sec; /* Seconds. */ + int tv_usec; /* Microseconds. */ + }; +# endif /* struct timeval */ +#endif /* need timeval */ + + +#ifndef _TIMEBITS_H +#define _TIMEBITS_H 1 + +#include +#define CLOCKS_PER_SEC HZ /* XXX names not kosher */ + +#endif /* timebits.h */ From 60c74cf07a65a55e8937392f269bdb895b2e6f8d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 6 Nov 1996 04:24:11 +0000 Subject: [PATCH 0763/4487] update from main archive 961105 --- sysdeps/alpha/Makefile | 2 +- sysdeps/alpha/bsd-_setjmp.S | 4 + sysdeps/alpha/bsd-setjmp.S | 4 + sysdeps/alpha/bzero.S | 7 + sysdeps/alpha/div.S | 110 +++++++++++++ sysdeps/alpha/divl.S | 4 +- sysdeps/alpha/divlu.S | 6 - sysdeps/alpha/divq.S | 4 +- sysdeps/alpha/divqu.S | 6 - sysdeps/alpha/divrem.h | 308 ++++++++++++++++++++---------------- sysdeps/alpha/ffs.S | 7 + sysdeps/alpha/htonl.S | 8 + sysdeps/alpha/htons.S | 8 + sysdeps/alpha/ldiv.S | 109 +++++++++++++ sysdeps/alpha/lldiv.S | 1 + sysdeps/alpha/memchr.S | 7 + sysdeps/alpha/memcpy.S | 276 ++++++++++++++++++++++++++++++++ sysdeps/alpha/memset.S | 7 + sysdeps/alpha/reml.S | 4 +- sysdeps/alpha/remlu.S | 6 - sysdeps/alpha/remq.S | 4 +- sysdeps/alpha/remqu.S | 6 - sysdeps/alpha/s_copysign.S | 8 + sysdeps/alpha/s_fabs.S | 8 + sysdeps/alpha/setjmp.S | 4 + sysdeps/alpha/stpcpy.S | 4 + sysdeps/alpha/stpncpy.S | 35 ++-- sysdeps/alpha/strcat.S | 33 ++-- sysdeps/alpha/strchr.S | 36 +++-- sysdeps/alpha/strcmp.S | 195 +++++++++++++++++++++++ sysdeps/alpha/strcpy.S | 4 + sysdeps/alpha/strlen.S | 9 ++ sysdeps/alpha/strncat.S | 4 + sysdeps/alpha/strncmp.S | 224 ++++++++++++++++++++++++++ sysdeps/alpha/strncpy.S | 4 + sysdeps/alpha/strrchr.S | 7 + sysdeps/alpha/udiv_qrnnd.S | 44 ++++-- sysdeps/alpha/w_sqrt.S | 161 +++++++++++++++++++ 38 files changed, 1447 insertions(+), 231 deletions(-) create mode 100644 sysdeps/alpha/div.S delete mode 100644 sysdeps/alpha/divlu.S delete mode 100644 sysdeps/alpha/divqu.S create mode 100644 sysdeps/alpha/ldiv.S create mode 100644 sysdeps/alpha/lldiv.S create mode 100644 sysdeps/alpha/memcpy.S delete mode 100644 sysdeps/alpha/remlu.S delete mode 100644 sysdeps/alpha/remqu.S create mode 100644 sysdeps/alpha/strcmp.S create mode 100644 sysdeps/alpha/strncmp.S create mode 100644 sysdeps/alpha/w_sqrt.S diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile index 45babb6c1c..6d4fbbb18b 100644 --- a/sysdeps/alpha/Makefile +++ b/sysdeps/alpha/Makefile @@ -42,4 +42,4 @@ ifeq ($(subdir),elf) sysdep-CFLAGS += -mno-fp-regs endif -divrem := divl divlu divq divqu reml remlu remq remqu +divrem := divl divq reml remq diff --git a/sysdeps/alpha/bsd-_setjmp.S b/sysdeps/alpha/bsd-_setjmp.S index a7bdbb5a61..be7f6dd05f 100644 --- a/sysdeps/alpha/bsd-_setjmp.S +++ b/sysdeps/alpha/bsd-_setjmp.S @@ -25,6 +25,10 @@ Cambridge, MA 02139, USA. */ ENTRY(_setjmp) ldgp $29,0($27) +#ifdef PROF + lda AT, _mcount + jsr AT, (AT), _mcount +#endif .prologue 1 bis $31, $31, $17 /* Pass a second argument of zero. */ jmp $31, __sigsetjmp /* Call __sigsetjmp. */ diff --git a/sysdeps/alpha/bsd-setjmp.S b/sysdeps/alpha/bsd-setjmp.S index c0ed691f40..2b799613d7 100644 --- a/sysdeps/alpha/bsd-setjmp.S +++ b/sysdeps/alpha/bsd-setjmp.S @@ -25,6 +25,10 @@ Cambridge, MA 02139, USA. */ ENTRY(setjmp) ldgp $29, 0($27) +#ifdef PROF + lda AT, _mcount + jsr AT, (AT), _mcount +#endif .prologue 1 bis $31, 1, $17 /* Pass a second argument of one. */ jmp $31, __sigsetjmp /* Call __sigsetjmp. */ diff --git a/sysdeps/alpha/bzero.S b/sysdeps/alpha/bzero.S index fffa53d7f1..c614fc1a6e 100644 --- a/sysdeps/alpha/bzero.S +++ b/sysdeps/alpha/bzero.S @@ -80,7 +80,14 @@ $tail: bne t4, 1f # is there a tail to do? .end bzero_loop ENTRY(bzero) +#ifdef PROF + ldgp gp, 0(pv) + lda AT, _mcount + jsr AT, (AT), _mcount + .prologue 1 +#else .prologue 0 +#endif mov a0, v0 # e0 : move return value in place beq a1, $done # .. e1 : early exit for zero-length store diff --git a/sysdeps/alpha/div.S b/sysdeps/alpha/div.S new file mode 100644 index 0000000000..6c461c40d4 --- /dev/null +++ b/sysdeps/alpha/div.S @@ -0,0 +1,110 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. + Contributed by Richard Henderson (rth@tamu.edu) + + 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If + not, write to the Free Software Foundation, Inc., 675 Mass Ave, + Cambridge, MA 02139, USA. */ + + +#include + +#ifdef __linux__ +# include +# include +#else +# include +#endif + + .set noat + + .align 4 + .globl div + .ent div +div: + .frame sp, 0, ra +#ifdef PROF + ldgp gp, 0(pv) + lda AT, _mcount + jsr AT, (AT), _mcount + .prologue 1 +#else + .prologue 0 +#endif + +#define dividend t0 +#define divisor t1 +#define mask t2 +#define quotient t3 +#define modulus t4 +#define tmp1 t5 +#define tmp2 t6 +#define compare t7 + + /* find correct sign for input to unsigned divide loop. */ + sextl a1, a1 # e0 : + sextl a2, a2 # .. e1 : + negl a1, dividend # e0 : + negl a2, divisor # .. e1 : + cmovge a1, a1, dividend # e0 : + cmovge a2, a2, divisor # .. e1 : + beq a2, $divbyzero # e1 : + unop # : + + /* shift divisor left, using 3-bit shifts for 32-bit divides as we + can't overflow. Three-bit shifts will result in looping three + times less here, but can result in two loops more later. Thus + using a large shift isn't worth it (and s8addq pairs better than + a shift). */ + +1: cmpult divisor, modulus, compare # e0 : + s8addq divisor, zero, divisor # .. e1 : + s8addq mask, zero, mask # e0 : + bne compare, 1b # .. e1 : + + /* start to go right again. */ +2: addq quotient, mask, tmp2 # e1 : + srl mask, 1, mask # .. e0 : + cmpule divisor, modulus, compare # e0 : + subq modulus, divisor, tmp1 # .. e1 : + cmovne compare, tmp2, quotient # e1 : + srl divisor, 1, divisor # .. e0 : + cmovne compare, tmp1, modulus # e0 : + bne mask, 2b # .. e1 : + + /* find correct sign for result. */ + xor a1, a2, compare # e0 : + negl quotient, tmp1 # .. e1 : + negl modulus, tmp2 # e0 : + cmovlt compare, tmp1, quotient # .. e1 : + cmovlt a1, tmp2, modulus # e1 : + + /* and store it away in the structure. */ + stl quotient, 0(a0) # .. e0 : + mov a0, v0 # e1 : + stl modulus, 4(a0) # .. e0 : + ret # e1 : + +$divbyzero: + mov a0, v0 + ldiq a0, GEN_INTDIV + call_pal PAL_gentrap + + /* if trap returns, return zero. */ + stl zero, 0(v0) + stl zero, 4(v0) + ret + + .end div diff --git a/sysdeps/alpha/divl.S b/sysdeps/alpha/divl.S index 6990665937..fdf053fc25 100644 --- a/sysdeps/alpha/divl.S +++ b/sysdeps/alpha/divl.S @@ -1,6 +1,6 @@ #define IS_REM 0 #define SIZE 4 -#define SIGNED 1 -#define FUNC_NAME __divl +#define UFUNC_NAME __divlu +#define SFUNC_NAME __divl #include "divrem.h" diff --git a/sysdeps/alpha/divlu.S b/sysdeps/alpha/divlu.S deleted file mode 100644 index ee96c95008..0000000000 --- a/sysdeps/alpha/divlu.S +++ /dev/null @@ -1,6 +0,0 @@ -#define IS_REM 0 -#define SIZE 4 -#define SIGNED 0 -#define FUNC_NAME __divlu - -#include "divrem.h" diff --git a/sysdeps/alpha/divq.S b/sysdeps/alpha/divq.S index bde3425f37..8c88af9736 100644 --- a/sysdeps/alpha/divq.S +++ b/sysdeps/alpha/divq.S @@ -1,6 +1,6 @@ #define IS_REM 0 #define SIZE 8 -#define SIGNED 1 -#define FUNC_NAME __divq +#define UFUNC_NAME __divqu +#define SFUNC_NAME __divq #include "divrem.h" diff --git a/sysdeps/alpha/divqu.S b/sysdeps/alpha/divqu.S deleted file mode 100644 index 72dcf971dd..0000000000 --- a/sysdeps/alpha/divqu.S +++ /dev/null @@ -1,6 +0,0 @@ -#define IS_REM 0 -#define SIZE 8 -#define SIGNED 0 -#define FUNC_NAME __divqu - -#include "divrem.h" diff --git a/sysdeps/alpha/divrem.h b/sysdeps/alpha/divrem.h index eaf892b3c6..b83908dc9f 100644 --- a/sysdeps/alpha/divrem.h +++ b/sysdeps/alpha/divrem.h @@ -1,25 +1,25 @@ /* Copyright (C) 1996 Free Software Foundation, Inc. Contributed by David Mosberger (davidm@cs.arizona.edu). -This file is part of the GNU C Library. + 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If + not, write to the Free Software Foundation, Inc., 675 Mass Ave, + Cambridge, MA 02139, USA. */ /* The current Alpha chips don't provide hardware for integer -division. The C compiler expects the functions + division. The C compiler expects the functions __divqu: 64-bit unsigned long divide __remqu: 64-bit unsigned long remainder @@ -27,10 +27,10 @@ division. The C compiler expects the functions __divlu/__remlu: unsigned 32-bit __divls/__remls: signed 32-bit -These are not normal C functions: instead of the normal calling -sequence, these expect their arguments in registers t10 and t11, and -return the result in t12 (aka pv). Register AT may be clobbered -(assembly temporary), anything else must be saved. */ + These are not normal C functions: instead of the normal calling + sequence, these expect their arguments in registers t10 and t11, and + return the result in t12 (aka pv). Register AT may be clobbered + (assembly temporary), anything else must be saved. */ #include @@ -41,147 +41,185 @@ return the result in t12 (aka pv). Register AT may be clobbered # include #endif -#ifdef DEBUG -# define arg1 a0 -# define arg2 a1 -# define result v0 -# define mask t0 -# define tmp0 t1 -# define tmp1 t2 -# define sign t3 -# define retaddr ra -#else -# define arg1 t10 -# define arg2 t11 -# define result t12 -# define mask v0 -# define tmp0 t0 -# define tmp1 t1 -# define sign t2 -# define retaddr t9 -#endif +#define mask v0 +#define divisor t0 +#define compare AT +#define tmp1 t2 +#define tmp2 t3 +#define retaddr t9 +#define arg1 t10 +#define arg2 t11 +#define result t12 -# define divisor arg2 #if IS_REM -# define dividend result -# define quotient arg1 -# define GETDIVIDEND bis arg1,zero,dividend +# define DIV_ONLY(x,y...) +# define REM_ONLY(x,y...) x,##y +# define modulus result +# define quotient t1 +# define GETSIGN(x) mov arg1, x +# define STACK 32 #else -# define dividend arg1 -# define quotient result -# define GETDIVIDEND +# define DIV_ONLY(x,y...) x,##y +# define REM_ONLY(x,y...) +# define modulus t1 +# define quotient result +# define GETSIGN(x) xor arg1, arg2, x +# define STACK 48 #endif #if SIZE == 8 -# define LONGIFYarg1 GETDIVIDEND -# define LONGIFYarg2 -#else -# if SIGNED -# define LONGIFYarg1 addl arg1,zero,dividend -# define LONGIFYarg2 addl arg2,zero,divisor -# else -# define LONGIFYarg1 zapnot arg1,0x0f,dividend -# define LONGIFYarg2 zapnot arg2,0x0f,divisor -# endif -#endif - -#if SIGNED -# define SETSIGN(sign,reg,tmp) subq zero,reg,tmp; cmovlt sign,tmp,reg -# if IS_REM -# define GETSIGN(x,y,s) bis x,zero,s -# else -# define GETSIGN(x,y,s) xor x,y,s -# endif +# define LONGIFY(x,y) mov x,y +# define SLONGIFY(x,y) mov x,y +# define _SLONGIFY(x) +# define NEG(x,y) negq x,y #else -# define SETSIGN(sign,reg,tmp) -# define GETSIGN(x,y,s) +# define LONGIFY(x,y) zapnot x,15,y +# define SLONGIFY(x,y) sextl x,y +# define _SLONGIFY(x) sextl x,x +# define NEG(x,y) negl x,y #endif .set noreorder .set noat - .ent FUNC_NAME - .globl FUNC_NAME - -#define FRAME_SIZE 0x30 + .ent UFUNC_NAME + .globl UFUNC_NAME - .align 5 -FUNC_NAME: + .align 3 +UFUNC_NAME: + lda sp, -STACK(sp) + .frame sp, STACK, retaddr, 0 #ifdef PROF - lda sp, -0x18(sp) - stq ra, 0x00(sp) - stq pv, 0x08(sp) - stq gp, 0x10(sp) + stq ra, 0(sp) + stq pv, 8(sp) + stq gp, 16(sp) br AT, 1f 1: ldgp gp, 0(AT) mov retaddr, ra - jsr AT, _mcount + lda AT, _mcount + jsr AT, (AT), _mcount - ldq ra, 0x00(sp) - ldq pv, 0x08(sp) - ldq gp, 0x10(sp) - lda sp, 0x18(sp) + ldq ra, 0(sp) + ldq pv, 8(sp) + ldq gp, 16(sp) #endif - .frame sp, FRAME_SIZE, retaddr, 0 - lda sp,-FRAME_SIZE(sp) - .prologue 1 - stq arg1,0x00(sp) - LONGIFYarg1 - stq arg2,0x08(sp) - LONGIFYarg2 - stq mask,0x10(sp) - bis zero,1,mask - stq tmp0,0x18(sp) - bis zero,zero,quotient - stq tmp1,0x20(sp) - beq divisor,$divbyzero - stq sign,0x28(sp) - GETSIGN(dividend,divisor,sign) -#if SIGNED - subq zero,dividend,tmp0 - subq zero,divisor,tmp1 - cmovlt dividend,tmp0,dividend - cmovlt divisor,tmp1,divisor + .prologue 0 + +$udiv: + stq t0, 0(sp) + LONGIFY (arg2, divisor) + stq t1, 8(sp) + LONGIFY (arg1, modulus) + stq v0, 16(sp) + clr quotient + stq tmp1, 24(sp) + ldiq mask, 1 + DIV_ONLY(stq tmp2,32(sp)) + + beq divisor, $divbyzero + + .align 3 +#if SIZE == 8 + /* Shift divisor left. */ +1: cmpult divisor, modulus, compare + blt divisor, 2f + addq divisor, divisor, divisor + addq mask, mask, mask + bne compare, 1b + unop +2: +#else + /* Shift divisor left using 3-bit shifts as we can't overflow. + This results in looping three times less here, but up to + two more times later. Thus using a large shift isn't worth it. */ +1: cmpult divisor, modulus, compare + s8addq divisor, zero, divisor + s8addq mask, zero, mask + bne compare, 1b #endif - /* - * Shift divisor left until either bit 63 is set or until it - * is at least as big as the dividend: - */ - .align 3 -1: cmpule dividend,divisor,AT - blt divisor,2f - blbs AT,2f - addq mask,mask,mask - addq divisor,divisor,divisor - br 1b - - .align 3 -2: addq mask,quotient,tmp0 - cmpule divisor,dividend,AT - subq dividend,divisor,tmp1 - srl divisor,1,divisor - srl mask,1,mask - cmovlbs AT,tmp0,quotient - cmovlbs AT,tmp1,dividend - bne mask,2b - - ldq arg1,0x00(sp) - SETSIGN(sign,result,tmp0) -$done: ldq arg2,0x08(sp) - ldq mask,0x10(sp) - ldq tmp0,0x18(sp) - ldq tmp1,0x20(sp) - ldq sign,0x28(sp) - lda sp,FRAME_SIZE(sp) - ret zero,(retaddr),0 + + /* Now go back to the right. */ +3: DIV_ONLY(addq quotient, mask, tmp2) + srl mask, 1, mask + cmpule divisor, modulus, compare + subq modulus, divisor, tmp1 + DIV_ONLY(cmovne compare, tmp2, quotient) + srl divisor, 1, divisor + cmovne compare, tmp1, modulus + bne mask, 3b + +$done: ldq t0, 0(sp) + ldq t1, 8(sp) + ldq v0, 16(sp) + ldq tmp1, 24(sp) + DIV_ONLY(ldq tmp2, 32(sp)) + lda sp, STACK(sp) + ret zero, (retaddr), 1 $divbyzero: - lda a0,GEN_INTDIV(zero) + mov a0, tmp1 + ldiq a0, GEN_INTDIV call_pal PAL_gentrap - bis zero,zero,result /* if trap returns, return 0 */ - ldq arg1,0x00(sp) + mov tmp1, a0 + clr result /* If trap returns, return zero. */ br $done - END(FUNC_NAME) + .end UFUNC_NAME + + .ent SFUNC_NAME + .globl SFUNC_NAME + + .align 3 +SFUNC_NAME: + lda sp, -STACK(sp) + .frame sp, STACK, retaddr, 0 +#ifdef PROF + stq ra, 0(sp) + stq pv, 8(sp) + stq gp, 16(sp) + + br AT, 1f +1: ldgp gp, 0(AT) + + mov retaddr, ra + jsr AT, _mcount + + ldq ra, 0(sp) + ldq pv, 8(sp) + ldq gp, 16(sp) +#endif + .prologue 0 + + or arg1, arg2, AT + _SLONGIFY(AT) + bge AT, $udiv /* don't need to mess with signs */ + + /* Save originals and find absolute values. */ + stq arg1, 0(sp) + NEG (arg1, AT) + stq arg2, 8(sp) + cmovge AT, AT, arg1 + stq retaddr, 16(sp) + NEG (arg2, AT) + stq tmp1, 24(sp) + cmovge AT, AT, arg2 + + /* Do the unsigned division. */ + bsr retaddr, UFUNC_NAME + + /* Restore originals and adjust the sign of the result. */ + ldq arg1, 0(sp) + ldq arg2, 8(sp) + GETSIGN (AT) + NEG (result, tmp1) + _SLONGIFY(AT) + ldq retaddr, 16(sp) + cmovlt AT, tmp1, result + ldq tmp1, 24(sp) + + lda sp, STACK(sp) + ret zero, (retaddr), 1 + + .end SFUNC_NAME diff --git a/sysdeps/alpha/ffs.S b/sysdeps/alpha/ffs.S index b84a51d326..959d1046d4 100644 --- a/sysdeps/alpha/ffs.S +++ b/sysdeps/alpha/ffs.S @@ -27,7 +27,14 @@ architecture. */ .set noat ENTRY(ffs) +#ifdef PROF + ldgp gp, 0(pv) + lda AT, _mcount + jsr AT, (AT), _mcount + .prologue 1 +#else .prologue 0 +#endif ldq_u zero, 0(sp) # on the 21064, this helps dual-issuing addl a0, zero, a0 # the last insn and reduces the stall diff --git a/sysdeps/alpha/htonl.S b/sysdeps/alpha/htonl.S index 9777e461cc..55d4f62bc7 100644 --- a/sysdeps/alpha/htonl.S +++ b/sysdeps/alpha/htonl.S @@ -19,7 +19,15 @@ Cambridge, MA 02139, USA. */ #include ENTRY(__htonl) +#ifdef PROF + ldgp gp, 0(pv) + lda AT, _mcount + jsr AT, (AT), _mcount + .prologue 1 +#else .prologue 0 +#endif + extlh a0, 5, t1 # t1 = dd000000 zap a0, 0xfd, t2 # t2 = 0000cc00 sll t2, 5, t2 # t2 = 00198000 diff --git a/sysdeps/alpha/htons.S b/sysdeps/alpha/htons.S index 7717636782..743d3e2474 100644 --- a/sysdeps/alpha/htons.S +++ b/sysdeps/alpha/htons.S @@ -19,7 +19,15 @@ Cambridge, MA 02139, USA. */ #include ENTRY(__htons) +#ifdef PROF + ldgp gp, 0(pv) + lda AT, _mcount + jsr AT, (AT), _mcount + .prologue 1 +#else .prologue 0 +#endif + extwh a0, 7, t1 # t1 = bb00 extbl a0, 1, v0 # v0 = 00aa bis v0, t1, v0 # v0 = bbaa diff --git a/sysdeps/alpha/ldiv.S b/sysdeps/alpha/ldiv.S new file mode 100644 index 0000000000..ebbe055870 --- /dev/null +++ b/sysdeps/alpha/ldiv.S @@ -0,0 +1,109 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. + Contributed by Richard Henderson (rth@tamu.edu) + + 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If + not, write to the Free Software Foundation, Inc., 675 Mass Ave, + Cambridge, MA 02139, USA. */ + + +#include + +#ifdef __linux__ +# include +# include +#else +# include +#endif + + .set noat + + .align 4 + .globl ldiv + .ent ldiv +ldiv: + .frame sp, 0, ra +#ifdef PROF + ldgp gp, 0(pv) + lda AT, _mcount + jsr AT, (AT), _mcount + .prologue 1 +#else + .prologue 0 +#endif + +#define dividend t0 +#define divisor t1 +#define mask t2 +#define quotient t3 +#define modulus t4 +#define tmp1 t5 +#define tmp2 t6 +#define compare t7 + + /* find correct sign for input to unsigned divide loop. */ + mov a1, dividend # e0 : + mov a2, divisor # .. e1 : + negq a1, tmp1 # e0 : + negq a2, tmp2 # .. e1 : + cmovlt a1, tmp1, dividend # e0 : + cmovlt a2, tmp2, divisor # .. e1 : + beq a2, $divbyzero # e1 : + unop # : + + /* shift divisor left. */ +1: cmpult divisor, modulus, compare # e0 : + blt divisor, 2f # .. e1 : + addq divisor, divisor, divisor # e0 : + addq mask, mask, mask # .. e1 : + bne compare, 1b # e1 : + unop # : + + /* start to go right again. */ +2: addq quotient, mask, tmp2 # e1 : + srl mask, 1, mask # .. e0 : + cmpule divisor, modulus, compare # e0 : + subq modulus, divisor, tmp1 # .. e1 : + cmovne compare, tmp2, quotient # e1 : + srl divisor, 1, divisor # .. e0 : + cmovne compare, tmp1, modulus # e0 : + bne mask, 2b # .. e1 : + + /* find correct sign for result. */ + xor a1, a2, compare # e0 : + negq quotient, tmp1 # .. e1 : + negq modulus, tmp2 # e0 : + cmovlt compare, tmp1, quotient # .. e1 : + cmovlt a1, tmp2, modulus # e1 : + + /* and store it away in the structure. */ +9: stq quotient, 0(a0) # .. e0 : + mov a0, v0 # e1 : + stq modulus, 8(a0) # .. e0 : + ret # e1 : + +$divbyzero: + mov a0, v0 + lda a0, GEN_INTDIV + call_pal PAL_gentrap + + /* if trap returns, return zero. */ + stq zero, 0(v0) + stq zero, 8(v0) + ret + + .end ldiv + +weak_alias(ldiv, lldiv) diff --git a/sysdeps/alpha/lldiv.S b/sysdeps/alpha/lldiv.S new file mode 100644 index 0000000000..80c450a3fc --- /dev/null +++ b/sysdeps/alpha/lldiv.S @@ -0,0 +1 @@ +/* lldiv is the same as ldiv on the Alpha. */ diff --git a/sysdeps/alpha/memchr.S b/sysdeps/alpha/memchr.S index a47ac96e01..ecd26e8d6f 100644 --- a/sysdeps/alpha/memchr.S +++ b/sysdeps/alpha/memchr.S @@ -40,7 +40,14 @@ For correctness consider that: .set noat ENTRY(memchr) +#ifdef PROF + ldgp gp, 0(pv) + lda AT, _mcount + jsr AT, (AT), _mcount + .prologue 1 +#else .prologue 0 +#endif beq a2, $not_found ldq_u t0, 0(a0) # load first quadword (a0 may be misaligned) diff --git a/sysdeps/alpha/memcpy.S b/sysdeps/alpha/memcpy.S new file mode 100644 index 0000000000..4ee9c115db --- /dev/null +++ b/sysdeps/alpha/memcpy.S @@ -0,0 +1,276 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. + Contributed by Richard Henderson (rth@tamu.edu) + + 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If + not, write to the Free Software Foundation, Inc., 675 Mass Ave, + Cambridge, MA 02139, USA. */ + + +/* This is the child of the C-with-inline-assembly memcpy posted by + Martin Ostermann (ost@comnets.rwth-aachen.de). + + This is generally scheduled for the EV5, but whenever necessary and + possible, the autoswap slotting feature of the EV5 is used so that the + code lays out nicely for the EV4 as well. */ + +#include + + .set noreorder + + .text + + .ent copy_fwd_aligned +copy_fwd_aligned: + .frame sp, 0, ra, 0 + .prologue 0 + + /* Aligned forward copy main loop. On entry to this basic block: + t0 == source word waiting to be stored + t2 == loop counter + a0 == destination pointer + a1 == source pointer + a2 mod 8 == byte count in final word */ + .align 4 +$fa_loop: + and t2, 7, t1 # e0 : + beq t1, 1f # .. e1 : + +0: stq_u t0, 0(a0) # e0 : + subq t1, 1, t1 # .. e1 : + ldq_u t0, 8(a1) # e0 : copy up to seven words + addq a0, 8, a0 # .. e1 : + addq a1, 8, a1 # e0 : + bne t1, 0b # .. e1 : + +1: bic t2, 7, t2 # e0 : + beq t2, $fa_tail # .. e1 : + +2: stq_u t0, 0(a0) # e0 : + addq a0, 64, a0 # .. e1 : + ldq_u t3, 8(a1) # e0 : copy eight words as fast as we can + ldq_u t4, 16(a1) # .. e1 : + ldq_u t5, 24(a1) # e0 : + ldq_u t6, 32(a1) # .. e1 : + ldq_u t7, 40(a1) # e0 : + ldq_u t8, 48(a1) # .. e1 : + ldq_u t9, 56(a1) # e0 : + ldq_u t0, 64(a1) # .. e1 : + stq_u t3, -56(a0) # e0 : + subq t2, 8, t2 # .. e1 : + stq_u t4, -48(a0) # e0 : + addq a1, 64, a1 # .. e1 : + stq_u t5, -40(a0) # e0 : + stq_u t6, -32(a0) # e0 : + stq_u t7, -24(a0) # e0 : + stq_u t8, -16(a0) # e0 : + stq_u t9, -8(a0) # e0 : + bne t2, 2b # .. e1 : + + /* Take care of a partial word tail. */ +$fa_tail: + and a2, 7, t3 # e0 : + bne t3, 1f # .. e1 (zdb) + + /* Aligned copy, aligned tail, final store. */ + stq_u t0, 0(a0) + ret + +1: ldq_u t1, 0(a0) # e1 : + mskql t0, a2, t0 # .. e1 : + mskqh t1, a2, t1 # e0 (stall) + bis t0, t1, t0 # e1 : + stq_u t0, 0(a0) # e0 : + ret # .. e1 : + + /* This is the actual entry point to this function. */ + .align 3 +$fwd_aligned: + ldq_u t0, 0(a1) # e0 : + and a0, 7, t3 # .. e1 : + addq a2, t3, a2 # e0 : + subq a2, 1, t2 # e1 : + sra t2, 3, t2 # e0 : + beq t3, $fa_loop # .. e1 : + + ldq_u t1, 0(a0) # e0 : + beq t2, $fa_small # .. e1 : + mskqh t0, a0, t0 # e0 : + mskql t1, a0, t3 # e0 : + bis t0, t3, t0 # e0 : + br $fa_loop # .. e1 : + + /* The move affects exactly one destination word. */ +$fa_small: + mskqh t0, a0, t0 # e0 : + and a2, 7, t4 # .. e1 : + mskql t1, a0, t3 # e0 : + bne t4, 1f # .. e1 : + + or t0, t3, t0 # e0 : + unop # : + stq_u t0, 0(a0) # e0 : + ret # .. e1 : + +1: mskql t0, a2, t0 # e0 : + mskqh t1, a2, t1 # e0 : + or t0, t3, t0 # e0 : + or t0, t1, t0 # e1 : + stq_u t0, 0(a0) # e0 : + ret # .. e1 : + + .end copy_fwd_aligned + + .ent memcpy + .globl memcpy + .align 3 +memcpy: + .frame sp, 0, ra, 0 +#ifdef PROF + ldgp gp, 0(ra) + lda AT, _mcount + jsr AT, (AT), _mcount + .prologue 1 +#else + .prologue 0 +#endif + + mov a0, v0 + beq a2, $zero_length + + /* Are source and destination co-aligned? */ + xor a0, a1, t0 + unop + and t0, 7, t0 + beq t0, $fwd_aligned + br $fwd_unaligned + + .end memcpy + + .ent copy_fwd_unaligned +copy_fwd_unaligned: + .frame sp, 0, ra, 0 + .prologue 0 + + /* Unaligned forward copy main loop. On entry to this basic block: + t0 == source low word, unshifted + t2 == loop counter + t7 == last source byte + 1 + a0 == destination pointer + a1 == source pointer + a2 mod 8 == byte count in final word */ + .align 4 +$fu_loop: + beq t2, $fu_tail # e1 : + blbc t2, 0f # e1 : + + ldq_u t1, 8(a1) # e1 : copy one unaligned word + extql t0, a1, t3 # .. e0 : + addq a1, 8, a1 # e0 : + addq a0, 8, a0 # .. e1 : + extqh t1, a1, t4 # e0 : + subq t2, 1, t2 # .. e1 : + mov t1, t0 # e0 : + or t3, t4, t3 # .. e1 : + stq_u t3, -8(a0) # e0 : + beq t2, $fu_tail # .. e1 : + +0: ldq_u t1, 8(a1) # e1 : copy two unaligned words + extql t0, a1, t3 # .. e0 : + ldq_u t0, 16(a1) # e0 : + subq t2, 2, t2 # .. e1 : + extqh t1, a1, t4 # e0 : + addq a0, 16, a0 # .. e1 : + extql t1, a1, t5 # e0 : + or t3, t4, t3 # .. e1 : + extqh t0, a1, t6 # e0 : + addq a1, 16, a1 # .. e1 : + stq_u t3, -16(a0) # e0 : + or t5, t6, t5 # .. e1 : + stq_u t5, -8(a0) # e0 : + bne t2, 0b # .. e1 : + + /* Take care of a partial words tail. */ +$fu_tail: + ldq_u t4, -1(t7) # e1 : + extql t0, a1, t3 # .. e0 : + extqh t4, a1, t4 # e0 (stall) + and a2, 7, t5 # .. e1 : + or t3, t4, t3 # e0 : + beq t5, 1f # .. e1 : + + ldq_u t1, 0(a0) # e1 : + mskql t3, a2, t3 # .. e0 : + mskqh t1, a2, t1 # e0 (stall) + or t1, t3, t3 # e1 : + +1: stq_u t3, 0(a0) # e0 : + ret # .. e1 : + + /* The entry point to the unaligned forward copy. */ + .align 3 +$fwd_unaligned: + ldq_u t0, 0(a1) # e0 : load initial bits of src + addq a1, a2, t7 # .. e1 : record last byte + 1 of src + and a0, 7, t3 # e0 : find dst misalignment + addq a2, t3, a2 # e1 : find number of words affected + subq a2, 1, t2 # e0 : + cmple a2, 8, t4 # .. e1 : are we dealing with a small block? + subq a1, t3, a1 # e0 : + bne t4, $fu_small # .. e1 : + srl t2, 3, t2 # e0 : + beq t3, $fu_loop # .. e1 : + + /* Take care of an unaligned dst head. */ + ldq_u t5, 0(a0) # e0 : + ldq_u t1, 8(a1) # .. e1 : + extql t0, a1, t3 # e0 : + addq a0, 8, a0 # .. e1 : + extqh t1, a1, t4 # e0 : + addq a1, 8, a1 # .. e1 : + mskql t5, a0, t5 # e0 : + or t3, t4, t3 # .. e1 : + mskqh t3, a0, t3 # e0 : + subq t2, 1, t2 # .. e1 : + or t3, t5, t3 # e0 : + mov t1, t0 # .. e1 : + stq_u t3, -8(a0) # e0 : + br $fu_loop # .. e1 : + + /* The move affects exactly one destination word. */ + .align 3 +$fu_small: + ldq_u t2, 0(a0) # e1 : + extql t0, a1, t3 # .. e0 : + ldq_u t1, -1(t7) # e0 : + and a2, 7, t8 # .. e1 : + mskqh t2, a2, t6 # e0 : + mskql t2, a0, t5 # e0 : + extqh t1, a1, t4 # e0 : + cmovne t8, t6, t8 # .. e1 : + or t3, t4, t3 # e0 : + or t5, t8, t5 # .. e1 : + mskqh t3, a0, t3 # e0 : + and a2, 7, t8 # .. e1 : + mskql t3, a2, t6 # e0 : + cmovne t8, t6, t8 # e1 : + or t3, t5, t3 # e0 : + unop # : + stq_u t3, 0(a0) # e0 : + +$zero_length: + ret # .. e1 : + + .end copy_fwd_unaligned diff --git a/sysdeps/alpha/memset.S b/sysdeps/alpha/memset.S index 55271f00ea..2b29357c6e 100644 --- a/sysdeps/alpha/memset.S +++ b/sysdeps/alpha/memset.S @@ -85,7 +85,14 @@ $tail: bne t4, 1f # is there a tail to do? .end memset_loop ENTRY(memset) +#ifdef PROF + ldgp gp, 0(pv) + lda AT, _mcount + jsr AT, (AT), _mcount + .prologue 1 +#else .prologue 0 +#endif zapnot a1, 1, a1 # e0 : zero extend input character mov a0, v0 # .. e1 : move return value in place diff --git a/sysdeps/alpha/reml.S b/sysdeps/alpha/reml.S index b631a02c31..8c00365ee3 100644 --- a/sysdeps/alpha/reml.S +++ b/sysdeps/alpha/reml.S @@ -1,6 +1,6 @@ #define IS_REM 1 #define SIZE 4 -#define SIGNED 1 -#define FUNC_NAME __reml +#define UFUNC_NAME __remlu +#define SFUNC_NAME __reml #include "divrem.h" diff --git a/sysdeps/alpha/remlu.S b/sysdeps/alpha/remlu.S deleted file mode 100644 index 8d527e4678..0000000000 --- a/sysdeps/alpha/remlu.S +++ /dev/null @@ -1,6 +0,0 @@ -#define IS_REM 1 -#define SIZE 4 -#define SIGNED 0 -#define FUNC_NAME __remlu - -#include "divrem.h" diff --git a/sysdeps/alpha/remq.S b/sysdeps/alpha/remq.S index 8bd9f334f4..cd1064af4e 100644 --- a/sysdeps/alpha/remq.S +++ b/sysdeps/alpha/remq.S @@ -1,6 +1,6 @@ #define IS_REM 1 #define SIZE 8 -#define SIGNED 1 -#define FUNC_NAME __remq +#define UFUNC_NAME __remqu +#define SFUNC_NAME __remq #include "divrem.h" diff --git a/sysdeps/alpha/remqu.S b/sysdeps/alpha/remqu.S deleted file mode 100644 index 14a7486148..0000000000 --- a/sysdeps/alpha/remqu.S +++ /dev/null @@ -1,6 +0,0 @@ -#define IS_REM 1 -#define SIZE 8 -#define SIGNED 0 -#define FUNC_NAME __remqu - -#include "divrem.h" diff --git a/sysdeps/alpha/s_copysign.S b/sysdeps/alpha/s_copysign.S index 95eb608666..739d3deb79 100644 --- a/sysdeps/alpha/s_copysign.S +++ b/sysdeps/alpha/s_copysign.S @@ -20,7 +20,15 @@ Cambridge, MA 02139, USA. */ #include ENTRY(__copysign) +#ifdef PROF + ldgp gp, 0(pv) + lda AT, _mcount + jsr AT, (AT), _mcount + .prologue 1 +#else .prologue 0 +#endif + cpys $f17,$f16,$f0 ret diff --git a/sysdeps/alpha/s_fabs.S b/sysdeps/alpha/s_fabs.S index 12c0abdf75..75976333f9 100644 --- a/sysdeps/alpha/s_fabs.S +++ b/sysdeps/alpha/s_fabs.S @@ -20,7 +20,15 @@ Cambridge, MA 02139, USA. */ #include ENTRY(__fabs) +#ifdef PROF + ldgp gp, 0(pv) + lda AT, _mcount + jsr AT, (AT), _mcount + .prologue 1 +#else .prologue 0 +#endif + cpys $f31,$f16,$f0 ret diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S index 59929a0234..f57d49017e 100644 --- a/sysdeps/alpha/setjmp.S +++ b/sysdeps/alpha/setjmp.S @@ -23,6 +23,10 @@ Cambridge, MA 02139, USA. */ extra arguments. */ ENTRY (__sigsetjmp) ldgp $29, 0($27) +#ifdef PROF + lda AT, _mcount + jsr AT, (AT), _mcount +#endif .prologue 1 bis $30, $30, $18 /* Pass SP as 3rd arg. */ diff --git a/sysdeps/alpha/stpcpy.S b/sysdeps/alpha/stpcpy.S index 0dc44d353a..9c2668b535 100644 --- a/sysdeps/alpha/stpcpy.S +++ b/sysdeps/alpha/stpcpy.S @@ -27,6 +27,10 @@ Cambridge, MA 02139, USA. */ ENTRY(__stpcpy) ldgp gp, 0(pv) +#ifdef PROF + lda AT, _mcount + jsr AT, (AT), _mcount +#endif .prologue 1 jsr t9, __stxcpy # do the work of the copy diff --git a/sysdeps/alpha/stpncpy.S b/sysdeps/alpha/stpncpy.S index 50cda2672e..90470cf95c 100644 --- a/sysdeps/alpha/stpncpy.S +++ b/sysdeps/alpha/stpncpy.S @@ -1,24 +1,23 @@ /* Copyright (C) 1996 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Richard Henderson (rth@tamu.edu) -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 Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -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 -published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. -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 -Library General Public License for more details. + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -/* Copy no more than COUNT bytes of the null-terminated string from +/* Copy no more than COUNT bytes of the null-terminated string from SRC to DST. If SRC does not cover all of COUNT, the balance is zeroed. Return the address of the terminating null in DEST, if any, else DEST + COUNT. */ @@ -32,8 +31,12 @@ Cambridge, MA 02139, USA. */ ENTRY(__stpncpy) ldgp gp, 0(pv) +#ifdef PROF + lda AT, _mcount + jsr AT, (AT), _mcount +#endif .prologue 1 - + beq a2, $zerocount jsr t9, __stxncpy # do the work of the copy diff --git a/sysdeps/alpha/strcat.S b/sysdeps/alpha/strcat.S index d3afff3c5f..e57259f51d 100644 --- a/sysdeps/alpha/strcat.S +++ b/sysdeps/alpha/strcat.S @@ -1,22 +1,21 @@ /* Copyright (C) 1996 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Richard Henderson (rth@tamu.edu) -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 Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -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 -published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. -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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* Append a null-terminated string from SRC to DST. */ @@ -26,6 +25,10 @@ Cambridge, MA 02139, USA. */ ENTRY(strcat) ldgp gp, 0(pv) +#ifdef PROF + lda AT, _mcount + jsr AT, (AT), _mcount +#endif .prologue 1 mov a0, v0 # set up return value @@ -59,7 +62,7 @@ $found: negq t1, t2 # clear all but least set bit addq a0, t2, a0 /* Now do the append. */ - + jsr t9, __stxcpy ret diff --git a/sysdeps/alpha/strchr.S b/sysdeps/alpha/strchr.S index c26a8431d2..e35b44ad6c 100644 --- a/sysdeps/alpha/strchr.S +++ b/sysdeps/alpha/strchr.S @@ -1,25 +1,24 @@ /* Copyright (C) 1996 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Richard Henderson (rth@tamu.edu) -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 Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -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 -published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. -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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* Return the address of a given character within a null-terminated - string, or null if it is not found. + string, or null if it is not found. This is generally scheduled for the EV5 (got to look out for my own interests :-), but with EV4 needs in mind. There *should* be no more @@ -32,7 +31,14 @@ Cambridge, MA 02139, USA. */ .set noat ENTRY(strchr) +#ifdef PROF + ldgp gp, 0(pv) + lda AT, _mcount + jsr AT, (AT), _mcount + .prologue 1 +#else .prologue 0 +#endif zapnot a1, 1, a1 # e0 : zero extend the search character ldq_u t0, 0(a0) # .. e1 : load first quadword diff --git a/sysdeps/alpha/strcmp.S b/sysdeps/alpha/strcmp.S new file mode 100644 index 0000000000..7dcae04ea4 --- /dev/null +++ b/sysdeps/alpha/strcmp.S @@ -0,0 +1,195 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. + Contributed by Richard Henderson (rth@tamu.edu) + + 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If + not, write to the Free Software Foundation, Inc., 675 Mass Ave, + Cambridge, MA 02139, USA. */ + +/* Bytewise compare two null-terminated strings. */ + +#include + + .set noat + .set noreorder + + .text + +ENTRY(strcmp) +#ifdef PROF + ldgp gp, 0(pv) + lda AT, _mcount + jmp AT, (AT), _mcount + .prologue 1 +#else + .prologue 0 +#endif + + ldq_u t0, 0(a0) # e0 : give cache time to catch up + xor a0, a1, t2 # .. e1 : are s1 and s2 co-aligned? + ldq_u t1, 0(a1) # e0 : + and t2, 7, t2 # .. e1 : + lda t3, -1 # e0 : + bne t2, $unaligned # .. e1 : + + /* On entry to this basic block: + t0 == the first destination word for masking back in + t1 == the first source word. + t3 == -1. */ + +$aligned: + mskqh t3, a0, t3 # e0 : + nop # .. e1 : + ornot t1, t3, t1 # e0 : + ornot t0, t3, t0 # .. e1 : + cmpbge zero, t1, t7 # e0 : bits set iff null found + bne t7, $eos # e1 (zdb) + + /* Aligned compare main loop. + On entry to this basic block: + t0 == an s1 word. + t1 == an s2 word not containing a null. */ + +$a_loop: + xor t0, t1, t2 # e0 : + bne t2, $wordcmp # .. e1 (zdb) + ldq_u t1, 8(a1) # e0 : + ldq_u t0, 8(a0) # .. e1 : + addq a1, 8, a1 # e0 : + addq a0, 8, a0 # .. e1 : + cmpbge zero, t1, t7 # e0 : + beq t7, $a_loop # .. e1 (zdb) + br $eos # e1 : + + /* The two strings are not co-aligned. Align s1 and cope. */ + +$unaligned: + and a0, 7, t4 # e0 : find s1 misalignment + and a1, 7, t5 # .. e1 : find s2 misalignment + subq a1, t4, a1 # e0 : + + /* If s2 misalignment is larger than s2 misalignment, we need + extra startup checks to avoid SEGV. */ + + cmplt t4, t5, t8 # .. e1 : + beq t8, $u_head # e1 : + + mskqh t3, t5, t3 # e0 : + ornot t1, t3, t3 # e0 : + cmpbge zero, t3, t7 # e1 : is there a zero? + beq t7, $u_head # e1 : + + /* We've found a zero in the first partial word of s2. Align + our current s1 and s2 words and compare what we've got. */ + + extql t1, t5, t1 # e0 : + extql t0, a0, t0 # e0 : + cmpbge zero, t1, t7 # .. e1 : find that zero again + br $eos # e1 : and finish up + + .align 3 +$u_head: + /* We know just enough now to be able to assemble the first + full word of s2. We can still find a zero at the end of it. + + On entry to this basic block: + t0 == first word of s1 + t1 == first partial word of s2. */ + + ldq_u t2, 8(a1) # e0 : load second partial s2 word + lda t3, -1 # .. e1 : create leading garbage mask + extql t1, a1, t1 # e0 : create first s2 word + mskqh t3, a0, t3 # e0 : + extqh t2, a1, t4 # e0 : + ornot t0, t3, t0 # .. e1 : kill s1 garbage + or t1, t4, t1 # e0 : s2 word now complete + cmpbge zero, t0, t7 # .. e1 : find zero in first s1 word + ornot t1, t3, t1 # e0 : kill s2 garbage + lda t3, -1 # .. e1 : + mskql t3, a1, t3 # e0 : mask for s2[1] bits we have seen + bne t7, $eos # .. e1 : + xor t0, t1, t4 # e0 : compare aligned words + bne t4, $wordcmp # .. e1 (zdb) + or t2, t3, t3 # e0 : + cmpbge zero, t3, t7 # e1 : + bne t7, $u_final # e1 : + + /* Unaligned copy main loop. In order to avoid reading too much, + the loop is structured to detect zeros in aligned words from s2. + This has, unfortunately, effectively pulled half of a loop + iteration out into the head and half into the tail, but it does + prevent nastiness from accumulating in the very thing we want + to run as fast as possible. + + On entry to this basic block: + t2 == the unshifted low-bits from the next s2 word. */ + + .align 3 +$u_loop: + extql t2, a1, t3 # e0 : + ldq_u t2, 16(a1) # .. e1 : load next s2 high bits + ldq_u t0, 8(a0) # e0 : load next s1 word + addq a1, 8, a1 # .. e1 : + addq a0, 8, a0 # e0 : + nop # .. e1 : + extqh t2, a1, t1 # e0 : + cmpbge zero, t0, t7 # .. e1 : find zero in current s1 word + or t1, t3, t1 # e0 : + bne t7, $eos # .. e1 : + xor t0, t1, t4 # e0 : compare the words + bne t4, $wordcmp # .. e1 (zdb) + cmpbge zero, t2, t4 # e0 : find zero in next low bits + beq t4, $u_loop # .. e1 (zdb) + + /* We've found a zero in the low bits of the last s2 word. Get + the next s1 word and align them. */ +$u_final: + ldq_u t0, 8(a0) # e1 : + extql t2, a1, t1 # .. e0 : + cmpbge zero, t1, t7 # e0 : + + /* We've found a zero somewhere in a word we just read. + On entry to this basic block: + t0 == s1 word + t1 == s2 word + t7 == cmpbge mask containing the zero. */ + + .align 3 +$eos: + negq t7, t6 # e0 : create bytemask of valid data + and t6, t7, t8 # e1 : + subq t8, 1, t6 # e0 : + or t6, t8, t7 # e1 : + zapnot t0, t7, t0 # e0 : kill the garbage + zapnot t1, t7, t1 # .. e1 : + xor t0, t1, v0 # e0 : and compare + beq v0, $done # .. e1 : + + /* Here we have two differing co-aligned words in t0 & t1. + Bytewise compare them and return (t0 > t1 ? 1 : -1). */ +$wordcmp: + cmpbge t0, t1, t2 # e0 : comparison yields bit mask of ge + cmpbge t1, t0, t3 # .. e1 : + xor t2, t3, t0 # e0 : bits set iff t0/t1 bytes differ + negq t0, t1 # e1 : clear all but least bit + and t0, t1, t0 # e0 : + lda v0, -1 # .. e1 : + and t0, t2, t1 # e0 : was bit set in t0 > t1? + cmovne t1, 1, v0 # .. e1 (zdb) + +$done: + ret # e1 : + + END(strcmp) diff --git a/sysdeps/alpha/strcpy.S b/sysdeps/alpha/strcpy.S index 2975181919..823476f750 100644 --- a/sysdeps/alpha/strcpy.S +++ b/sysdeps/alpha/strcpy.S @@ -27,6 +27,10 @@ Cambridge, MA 02139, USA. */ ENTRY(strcpy) ldgp gp, 0(pv) +#ifdef PROF + lda AT, _mcount + jsr AT, (AT), _mcount +#endif .prologue 1 mov a0, v0 # set up return value diff --git a/sysdeps/alpha/strlen.S b/sysdeps/alpha/strlen.S index 9eab707388..026c8addc2 100644 --- a/sysdeps/alpha/strlen.S +++ b/sysdeps/alpha/strlen.S @@ -34,6 +34,15 @@ Cambridge, MA 02139, USA. */ .set noat ENTRY(strlen) +#ifdef PROF + ldgp gp, 0(pv) + lda AT, _mcount + jsr AT, (AT), _mcount + .prologue 1 +#else + .prologue 0 +#endif + ldq_u t0, 0(a0) # load first quadword (a0 may be misaligned) lda t1, -1(zero) insqh t1, a0, t1 diff --git a/sysdeps/alpha/strncat.S b/sysdeps/alpha/strncat.S index d502037ace..089fba34d9 100644 --- a/sysdeps/alpha/strncat.S +++ b/sysdeps/alpha/strncat.S @@ -27,6 +27,10 @@ Cambridge, MA 02139, USA. */ ENTRY(strncat) ldgp gp, 0(pv) +#ifdef PROF + lda AT, _mcount + jsr AT, (AT), _mcount +#endif .prologue 1 mov a0, v0 # set up return value diff --git a/sysdeps/alpha/strncmp.S b/sysdeps/alpha/strncmp.S new file mode 100644 index 0000000000..682759042f --- /dev/null +++ b/sysdeps/alpha/strncmp.S @@ -0,0 +1,224 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. + Contributed by Richard Henderson (rth@tamu.edu) + + 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If + not, write to the Free Software Foundation, Inc., 675 Mass Ave, + Cambridge, MA 02139, USA. */ + +/* Bytewise compare two null-terminated strings of length no longer than N. */ + +#include + + .set noat + .set noreorder + + .text + +ENTRY(strncmp) +#ifdef PROF + ldgp gp, 0(pv) + lda AT, _mcount + jsr AT, (AT), _mcount + .prologue 1 +#else + .prologue 0 +#endif + + xor a0, a1, t2 # e0 : are s1 and s2 co-aligned? + beq a2, $zerolength # .. e1 : + ldq_u t0, 0(a0) # e0 : give cache time to catch up + ldq_u t1, 0(a1) # .. e1 : + and t2, 7, t2 # e0 : + and a0, 7, t4 # .. e1 : find s1 misalignment + lda t3, -1 # e0 : + addq a2, t4, a2 # .. e1 : bias count by s1 misalignment + and a2, 7, t10 # e1 : ofs of last byte in last word + srl a2, 3, a2 # .. e0 : remaining full words in count + and a1, 7, t5 # e0 : find s2 misalignment + bne t2, $unaligned # .. e1 : + + /* On entry to this basic block: + t0 == the first word of s1. + t1 == the first word of s2. + t3 == -1. */ + +$aligned: + mskqh t3, a1, t3 # e0 : mask off leading garbage + nop # .. e1 : + ornot t1, t3, t1 # e0 : + ornot t0, t3, t0 # .. e1 : + cmpbge zero, t1, t7 # e0 : bits set iff null found + beq a2, $eoc # .. e1 : check end of count + unop # : + bne t7, $eos # e1 : + + /* Aligned compare main loop. + On entry to this basic block: + t0 == an s1 word. + t1 == an s2 word not containing a null. */ + +$a_loop: + xor t0, t1, t2 # e0 : + bne t2, $wordcmp # .. e1 (zdb) + ldq_u t1, 0(a1) # e0 : + ldq_u t0, 0(a0) # .. e1 : + addq a1, 8, a1 # e0 : + addq a0, 8, a0 # .. e1 : + cmpbge zero, t1, t7 # e0 : + beq a2, $eoc # .. e1 : + subq a2, 1, a2 # e0 : + beq t7, $a_loop # .. e1 : + br $eos # e1 : + + /* The two strings are not co-aligned. Align s1 and cope. */ +$unaligned: + subq a1, t4, a1 # e0 : + unop # : + + /* If s2 misalignment is larger than s2 misalignment, we need + extra startup checks to avoid SEGV. */ + + cmplt t4, t5, t8 # .. e1 : + beq t8, $u_head # e1 : + + mskqh t3, t5, t3 # e0 : + ornot t1, t3, t3 # e0 : + cmpbge zero, t3, t7 # e1 : is there a zero? + beq t7, $u_head # e1 : + + /* We've found a zero in the first partial word of s2. Align + our current s1 and s2 words and compare what we've got. */ + + extql t1, t5, t1 # e0 : + lda t3, -1 # .. e1 : + insql t1, a0, t1 # e0 : + mskqh t3, a0, t3 # e0 : + ornot t1, t3, t1 # e0 : + ornot t0, t3, t0 # .. e1 : + cmpbge zero, t1, t7 # e0 : find that zero again + beq a2, $eoc # .. e1 : and finish up + br $eos # e1 : + + .align 3 +$u_head: + /* We know just enough now to be able to assemble the first + full word of s2. We can still find a zero at the end of it. + + On entry to this basic block: + t0 == first word of s1 + t1 == first partial word of s2. */ + + ldq_u t2, 8(a1) # e0 : load second partial s2 word + lda t3, -1 # .. e1 : create leading garbage mask + extql t1, a1, t1 # e0 : create first s2 word + mskqh t3, a0, t3 # e0 : + extqh t2, a1, t4 # e0 : + ornot t0, t3, t0 # .. e1 : kill s1 garbage + or t1, t4, t1 # e0 : s2 word now complete + ornot t1, t3, t1 # e1 : kill s2 garbage + cmpbge zero, t0, t7 # e0 : find zero in first s1 word + beq a2, $eoc # .. e1 : + lda t3, -1 # e0 : + bne t7, $eos # .. e1 : + subq a2, 1, a2 # e0 : + xor t0, t1, t4 # .. e1 : compare aligned words + mskql t3, a1, t3 # e0 : mask out s2[1] bits we have seen + bne t4, $wordcmp # .. e1 : + or t2, t3, t3 # e0 : + cmpbge zero, t3, t7 # e1 : find zero in high bits of s2[1] + bne t7, $u_final # e1 : + + /* Unaligned copy main loop. In order to avoid reading too much, + the loop is structured to detect zeros in aligned words from s2. + This has, unfortunately, effectively pulled half of a loop + iteration out into the head and half into the tail, but it does + prevent nastiness from accumulating in the very thing we want + to run as fast as possible. + + On entry to this basic block: + t2 == the unshifted low-bits from the next s2 word. */ + + .align 3 +$u_loop: + extql t2, a1, t3 # e0 : + ldq_u t2, 16(a1) # .. e1 : load next s2 high bits + ldq_u t0, 8(a0) # e0 : load next s1 word + addq a1, 8, a1 # .. e1 : + addq a0, 8, a0 # e0 : + nop # .. e1 : + extqh t2, a1, t1 # e0 : + cmpbge zero, t0, t7 # .. e1 : find zero in current s1 word + or t1, t3, t1 # e0 : + beq a2, $eoc # .. e1 : check for end of count + subq a2, 1, a2 # e0 : + bne t7, $eos # .. e1 : + xor t0, t1, t4 # e0 : compare the words + bne t4, $wordcmp # .. e1 (zdb) + cmpbge zero, t2, t4 # e0 : find zero in next low bits + beq t4, $u_loop # .. e1 (zdb) + + /* We've found a zero in the low bits of the last s2 word. Get + the next s1 word and align them. */ +$u_final: + ldq_u t0, 8(a0) # e1 : + extql t2, a1, t1 # .. e0 : + cmpbge zero, t1, t7 # e0 : + bne a2, $eos # .. e1 : + + /* We've hit end of count. Zero everything after the count + and compare whats left. */ + + .align 3 +$eoc: + mskql t0, t10, t0 + mskql t1, t10, t1 + + /* We've found a zero somewhere in a word we just read. + On entry to this basic block: + t0 == s1 word + t1 == s2 word + t7 == cmpbge mask containing the zero. */ + +$eos: + negq t7, t6 # e0 : create bytemask of valid data + and t6, t7, t8 # e1 : + subq t8, 1, t6 # e0 : + or t6, t8, t7 # e1 : + zapnot t0, t7, t0 # e0 : kill the garbage + zapnot t1, t7, t1 # .. e1 : + xor t0, t1, v0 # e0 : and compare + beq v0, $done # .. e1 : + + /* Here we have two differing co-aligned words in t0 & t1. + Bytewise compare them and return (t0 > t1 ? 1 : -1). */ +$wordcmp: + cmpbge t0, t1, t2 # e0 : comparison yields bit mask of ge + cmpbge t1, t0, t3 # .. e1 : + xor t2, t3, t0 # e0 : bits set iff t0/t1 bytes differ + negq t0, t1 # e1 : clear all but least bit + and t0, t1, t0 # e0 : + lda v0, -1 # .. e1 : + and t0, t2, t1 # e0 : was bit set in t0 > t1? + cmovne t1, 1, v0 # .. e1 (zdb) + +$done: + ret # e1 : + +$zerolength: + clr v0 + ret + + END(strncmp) diff --git a/sysdeps/alpha/strncpy.S b/sysdeps/alpha/strncpy.S index e13769c5c3..c077ab35b7 100644 --- a/sysdeps/alpha/strncpy.S +++ b/sysdeps/alpha/strncpy.S @@ -31,6 +31,10 @@ Cambridge, MA 02139, USA. */ ENTRY(strncpy) ldgp gp, 0(pv) +#ifdef PROF + lda AT, _mcount + jsr AT, (AT), _mcount +#endif .prologue 1 mov a0, v0 # set return value now diff --git a/sysdeps/alpha/strrchr.S b/sysdeps/alpha/strrchr.S index 464f754b20..02f37f50be 100644 --- a/sysdeps/alpha/strrchr.S +++ b/sysdeps/alpha/strrchr.S @@ -31,7 +31,14 @@ Cambridge, MA 02139, USA. */ .set noat ENTRY(strrchr) +#ifdef PROF + ldgp gp, 0(pv) + lda AT, _mcount + jsr AT, (AT), _mcount + .prologue 1 +#else .prologue 0 +#endif zapnot a1, 1, a1 # e0 : zero extend our test character mov zero, t6 # .. e1 : t6 is last match aligned addr diff --git a/sysdeps/alpha/udiv_qrnnd.S b/sysdeps/alpha/udiv_qrnnd.S index eb134f25c7..75d11827f9 100644 --- a/sysdeps/alpha/udiv_qrnnd.S +++ b/sysdeps/alpha/udiv_qrnnd.S @@ -27,8 +27,15 @@ .text LEAF(__udiv_qrnnd, 0) - +#ifdef PROF + ldgp gp, 0(pv) + lda AT, _mcount + jsr AT, (AT), _mcount + .prologue 1 +#else .prologue 0 +#endif + #define cnt $2 #define tmp $3 #define rem_ptr $16 @@ -38,9 +45,9 @@ LEAF(__udiv_qrnnd, 0) #define qb $20 ldiq cnt,16 - blt d,.Largedivisor + blt d,$largedivisor -.Loop1: cmplt n0,0,tmp +$loop1: cmplt n0,0,tmp addq n1,n1,n1 bis n1,tmp,n1 addq n0,n0,n0 @@ -73,12 +80,12 @@ LEAF(__udiv_qrnnd, 0) cmovne qb,tmp,n1 bis n0,qb,n0 subq cnt,1,cnt - bgt cnt,.Loop1 + bgt cnt,$loop1 stq n1,0(rem_ptr) bis $31,n0,$0 ret $31,($26),1 -.Largedivisor: +$largedivisor: and n0,1,$4 srl n0,1,n0 @@ -90,7 +97,7 @@ LEAF(__udiv_qrnnd, 0) srl d,1,$5 addq $5,$6,$5 -.Loop2: cmplt n0,0,tmp +$loop2: cmplt n0,0,tmp addq n1,n1,n1 bis n1,tmp,n1 addq n0,n0,n0 @@ -123,27 +130,30 @@ LEAF(__udiv_qrnnd, 0) cmovne qb,tmp,n1 bis n0,qb,n0 subq cnt,1,cnt - bgt cnt,.Loop2 + bgt cnt,$loop2 addq n1,n1,n1 addq $4,n1,n1 - bne $6,.LOdd + bne $6,$Odd stq n1,0(rem_ptr) bis $31,n0,$0 ret $31,($26),1 -.LOdd: +$Odd: /* q' in n0. r' in n1 */ addq n1,n0,n1 + cmpult n1,n0,tmp # tmp := carry from addq - beq tmp,.LLp6 - addq n0,1,n0 - subq n1,d,n1 -.LLp6: cmpult n1,d,tmp - bne tmp,.LLp7 - addq n0,1,n0 - subq n1,d,n1 -.LLp7: + subq n1,d,AT + addq n0,tmp,n0 + cmovne tmp,AT,n1 + + cmpult n1,d,tmp + addq n0,1,AT + cmoveq tmp,AT,n0 + subq n1,d,AT + cmoveq tmp,AT,n1 + stq n1,0(rem_ptr) bis $31,n0,$0 ret $31,($26),1 diff --git a/sysdeps/alpha/w_sqrt.S b/sysdeps/alpha/w_sqrt.S new file mode 100644 index 0000000000..b5c980e557 --- /dev/null +++ b/sysdeps/alpha/w_sqrt.S @@ -0,0 +1,161 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. + Contributed by David Mosberger (davidm@cs.arizona.edu). + Based on public-domain C source by Linus Torvalds. + + 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If + not, write to the Free Software Foundation, Inc., 675 Mass Ave, + Cambridge, MA 02139, USA. */ + +/* This version is much faster than generic sqrt implementation, but + it doesn't handle exceptional values or the inexact flag. Don't use + this if _IEEE_FP or _IEEE_FP_INEXACT is in effect. */ + +#ifndef _IEEE_FP + +#include +#include + + .set noreorder + +#ifdef __ELF__ + .section .rodata +#else + .rdata +#endif + .align 5 # align to cache line + + /* Do all memory accesses relative to sqrtdata. */ +sqrtdata: + +#define DN 0x00 +#define UP 0x08 +#define HALF 0x10 +#define ALMOST_THREE_HALF 0x18 +#define T2 0x20 + + .quad 0x3fefffffffffffff /* DN = next(1.0) */ + .quad 0x3ff0000000000001 /* UP = prev(1.0) */ + .quad 0x3fe0000000000000 /* HALF = 0.5 */ + .quad 0x3ff7ffffffc00000 /* ALMOST_THREE_HALF = 1.5-2^-30 */ + +/* table T2: */ +.long 0x1500, 0x2ef8, 0x4d67, 0x6b02, 0x87be, 0xa395, 0xbe7a, 0xd866 +.long 0xf14a, 0x1091b, 0x11fcd, 0x13552, 0x14999, 0x15c98, 0x16e34, 0x17e5f +.long 0x18d03, 0x19a01, 0x1a545, 0x1ae8a, 0x1b5c4, 0x1bb01, 0x1bfde, 0x1c28d +.long 0x1c2de, 0x1c0db, 0x1ba73, 0x1b11c, 0x1a4b5, 0x1953d, 0x18266, 0x16be0 +.long 0x1683e, 0x179d8, 0x18a4d, 0x19992, 0x1a789, 0x1b445, 0x1bf61, 0x1c989 +.long 0x1d16d, 0x1d77b, 0x1dddf, 0x1e2ad, 0x1e5bf, 0x1e6e8, 0x1e654, 0x1e3cd +.long 0x1df2a, 0x1d635, 0x1cb16, 0x1be2c, 0x1ae4e, 0x19bde, 0x1868e, 0x16e2e +.long 0x1527f, 0x1334a, 0x11051, 0xe951, 0xbe01, 0x8e0d, 0x5924, 0x1edd + +/* + * Stack variables: + */ +#define K 16(sp) +#define Y 24(sp) +#define FSIZE 32 + + .text + +LEAF(__sqrt, FSIZE) + lda sp, -FSIZE(sp) + ldgp gp, .-__sqrt(pv) + stq ra, 0(sp) +#ifdef PROF + lda AT, _mcount + jsr AT, (AT), _mcount +#endif + .prologue 1 + + stt $f16, K + lda t3, sqrtdata # load base address into t3 + + fblt $f16, $negative + + /* Compute initial guess. */ + + .align 3 + + ldah t1, 0x5fe8 # e0 : + ldq t2, K # .. e1 : + ldt $f12, HALF(t3) # e0 : + ldt $f18, ALMOST_THREE_HALF(t3) # .. e1 : + srl t2, 33, t0 # e0 : + mult $f16, $f12, $f11 # .. fm : $f11 = x * 0.5 + subl t1, t0, t1 # e0 : + addt $f12, $f12, $f17 # .. fa : $f17 = 1.0 + srl t1, 12, t0 # e0 : + and t0, 0xfc, t0 # .. e1 : + addq t0, t3, t0 # e0 : + ldl t0, T2(t0) # .. e1 : + addt $f12, $f17, $f15 # fa : $f15 = 1.5 + subl t1, t0, t1 # .. e1 : + sll t1, 32, t1 # e0 : + ldt $f14, DN(t3) # .. e1 : + stq t1, Y # e0 : + ldt $f13, Y # e1 : + addq sp, FSIZE, sp # e0 : + + mult $f11, $f13, $f10 # fm : $f10 = (x * 0.5) * y + mult $f10, $f13, $f10 # fm : $f10 = ((x * 0.5) * y) * y + subt $f15, $f10, $f1 # fa : $f1 = (1.5 - 0.5*x*y*y) + mult $f13, $f1, $f13 # fm : yp = y*(1.5 - 0.5*x*y*y) + mult $f11, $f13, $f11 # fm : $f11 = x * 0.5 * yp + mult $f11, $f13, $f11 # fm : $f11 = (x * 0.5 * yp) * yp + subt $f18, $f11, $f1 # fa : $f1= (1.5-2^-30) - 0.5*x*yp*yp + mult $f13, $f1, $f13 # fm : ypp = $f13 = yp*$f1 + subt $f15, $f12, $f1 # fa : $f1 = (1.5 - 0.5) + ldt $f15, UP(t3) # .. e1 : + mult $f16, $f13, $f10 # fm : z = $f10 = x * ypp + mult $f10, $f13, $f11 # fm : $f11 = z*ypp + mult $f10, $f12, $f12 # fm : $f12 = z*0.5 + subt $f1, $f11, $f1 # .. fa : $f1 = 1 - z*ypp + mult $f12, $f1, $f12 # fm : $f12 = z*0.5*(1 - z*ypp) + addt $f10, $f12, $f0 # fa : zp=res=$f0= z + z*0.5*(1 - z*ypp) + + mult/c $f0, $f14, $f12 # fm : zmi = zp * DN + mult/c $f0, $f15, $f11 # fm : zpl = zp * UP + mult/c $f0, $f12, $f1 # fm : $f1 = zp * zmi + mult/c $f0, $f11, $f15 # fm : $f15 = zp * zpl + + subt $f1, $f16, $f13 # fa : y1 = zp*zmi - x + subt $f15, $f16, $f15 # fa : y2 = zp*zpl - x + + fcmovge $f13, $f12, $f0 # res = (y1 >= 0) ? zmi : res + fcmovlt $f15, $f11, $f0 # res = (y2 < 0) ? zpl : res + + ret + +$negative: + lda t1, -1 + stq t1, K + lda t1, EDOM + stl t1, errno +#ifdef _LIBC_REENTRANT + jsr ra, __errno_location + lda t1, -1 + ldq ra, 0(sp) + stl t1, 0(v0) +#endif + ldt $f0, K # res = (double) 0xffffffffffffffff + addq sp, FSIZE, sp + ret + + END(__sqrt) + +weak_alias(__sqrt, sqrt) + +#endif /* !_IEEE_FP */ From dd4b8913cd97d9f5c3852171189d05ecd925986e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 7 Nov 1996 01:34:35 +0000 Subject: [PATCH 0764/4487] update from 961105, second try --- sysdeps/unix/alpha/sysdep.h | 78 +++++++++---------- sysdeps/unix/sysv/linux/alpha/brk.S | 4 + sysdeps/unix/sysv/linux/alpha/clone.S | 4 + .../sysv/linux/alpha/ieee_get_fp_control.S | 18 ++++- .../sysv/linux/alpha/ieee_set_fp_control.S | 19 ++++- sysdeps/unix/sysv/linux/alpha/llseek.S | 12 ++- sysdeps/unix/sysv/linux/alpha/sigsuspend.S | 12 ++- sysdeps/unix/sysv/linux/alpha/syscall.S | 14 +++- sysdeps/unix/sysv/linux/m68k/syscall.S | 30 +++---- sysdeps/unix/sysv/linux/m68k/sysdep.S | 32 ++++---- sysdeps/unix/sysv/linux/m68k/sysdep.h | 7 +- 11 files changed, 146 insertions(+), 84 deletions(-) diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h index 72d84047c2..e27909ad9b 100644 --- a/sysdeps/unix/alpha/sysdep.h +++ b/sysdeps/unix/alpha/sysdep.h @@ -1,20 +1,21 @@ /* Copyright (C) 1992, 1995, 1996 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include @@ -27,36 +28,24 @@ Cambridge, MA 02139, USA. */ #endif #ifdef __STDC__ -#define LEAF(name, framesize) \ - .globl name; \ - .align 3; \ - .ent name, 0; \ - name##: \ - .frame sp, framesize, ra +#define __LABEL(x) x##: #else +#define __LABEL(x) x/**/: +#endif + #define LEAF(name, framesize) \ .globl name; \ .align 3; \ .ent name, 0; \ - name/**/: \ + __LABEL(name) \ .frame sp, framesize, ra -#endif -#ifdef __STDC__ -#define ENTRY(name) \ - .globl name; \ - .align 3; \ - .ent name, 0; \ - name##: \ - .frame sp, 0, ra -#else #define ENTRY(name) \ .globl name; \ .align 3; \ .ent name, 0; \ - name/**/: \ + __LABEL(name) \ .frame sp, 0, ra -#endif /* Mark the end of function SYM. */ #undef END @@ -64,16 +53,20 @@ Cambridge, MA 02139, USA. */ /* Note that PSEUDO/PSEUDO_END use label number 1996---do not use a label of that number between those two macros! */ - -#ifdef __STDC__ + +#ifdef PROF #define PSEUDO(name, syscall_name, args) \ .globl name; \ .align 3; \ .ent name,0; \ - \ -name##: \ - .frame sp, 0, ra \ - .prologue 1; /* yes, we do use gp */ \ +__LABEL(name) \ + .frame sp, 0, ra; \ + ldgp gp,0(pv); \ + .set noat; \ + lda AT,_mcount; \ + jsr AT,(AT),_mcount; \ + .set at; \ + .prologue 1; \ ldiq v0, SYS_ify(syscall_name); \ .set noat; \ call_pal PAL_callsys; \ @@ -85,10 +78,9 @@ name##: \ .globl name; \ .align 3; \ .ent name,0; \ - \ -name/**/: \ +__LABEL(name) \ .frame sp, 0, ra \ - .prologue 1; /* yes, we do use gp */ \ + .prologue 0; \ ldiq v0, SYS_ify(syscall_name); \ .set noat; \ call_pal PAL_callsys; \ @@ -98,13 +90,19 @@ name/**/: \ #endif #undef PSEUDO_END - +#ifdef PROF +#define PSEUDO_END(sym) \ +1996: \ + jmp zero, __syscall_error; \ + END(sym) +#else #define PSEUDO_END(sym) \ 1996: \ br gp, 2f; \ 2: ldgp gp, 0(gp); \ jmp zero, __syscall_error; \ END(sym) +#endif #define r0 v0 #define r1 a4 diff --git a/sysdeps/unix/sysv/linux/alpha/brk.S b/sysdeps/unix/sysv/linux/alpha/brk.S index 75be949aff..d31d9e9b4d 100644 --- a/sysdeps/unix/sysv/linux/alpha/brk.S +++ b/sysdeps/unix/sysv/linux/alpha/brk.S @@ -38,6 +38,10 @@ __curbrk: .skip 8 .text LEAF(__brk, 0) ldgp gp, 0(t12) +#ifdef PROF + lda AT, _mcount + jsr AT, (AT), _mcount +#endif .prologue 1 ldiq v0, __NR_brk diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S index 71d8053b12..9dbf3034c9 100644 --- a/sysdeps/unix/sysv/linux/alpha/clone.S +++ b/sysdeps/unix/sysv/linux/alpha/clone.S @@ -32,6 +32,10 @@ ENTRY(__clone) /* Save rest of argument registers for varargs-type work. */ stq a4,0(sp) stq a5,8(sp) +#ifdef PROF + lda AT, _mcount + jsr AT, (AT), _mcount +#endif .prologue 1 /* Sanity check arguments. */ diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S index e09fa738e2..1176a2730f 100644 --- a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S +++ b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S @@ -22,9 +22,17 @@ Cambridge, MA 02139, USA. */ .text -LEAF(__ieee_get_fp_control, 8) - lda sp, -8(sp) +LEAF(__ieee_get_fp_control, 16) +#ifdef PROF + ldgp gp, 0(pv) + lda sp, -16(sp) + lda AT, _mcount + jsr AT, (AT), _mcount .prologue 1 +#else + lda sp, -16(sp) + .prologue 0 +#endif mov sp, a1 ldi a0, GSI_IEEE_FP_CONTROL @@ -33,12 +41,14 @@ LEAF(__ieee_get_fp_control, 8) bne a3, error ldq v0, 0(sp) - lda sp, 8(sp) + lda sp, 16(sp) ret -error: lda sp, 8(sp) +error: lda sp, 16(sp) +#ifndef PROF br gp, 1f 1: ldgp gp, 0(gp) +#endif jmp zero, __syscall_error END(__ieee_get_fp_control) diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S index d748c81142..aa761ecaca 100644 --- a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S +++ b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S @@ -20,9 +20,17 @@ Cambridge, MA 02139, USA. */ #define SSI_IEEE_FP_CONTROL 14 -LEAF(__ieee_set_fp_control, 8) - lda sp, -8(sp) +LEAF(__ieee_set_fp_control, 16) +#ifdef PROF + ldgp gp, 0(sp) + lda sp, -16(sp) + lda AT, _mcount + jsr AT, (AT), _mcount .prologue 1 +#else + lda sp, -16(sp) + .prologue 0 +#endif stq a0, 0(sp) mov sp, a1 @@ -30,13 +38,16 @@ LEAF(__ieee_set_fp_control, 8) ldi v0, __NR_osf_setsysinfo call_pal PAL_callsys - lda sp, 8(sp) + lda sp, 16(sp) bne a3, error ret -error: br gp, 1f +error: +#ifndef PROF + br gp, 1f 1: ldgp gp, 0(gp) +#endif jmp zero, __syscall_error END(__ieee_set_fp_control) diff --git a/sysdeps/unix/sysv/linux/alpha/llseek.S b/sysdeps/unix/sysv/linux/alpha/llseek.S index 6020f263cd..45fb349236 100644 --- a/sysdeps/unix/sysv/linux/alpha/llseek.S +++ b/sysdeps/unix/sysv/linux/alpha/llseek.S @@ -24,7 +24,14 @@ Cambridge, MA 02139, USA. */ .text ENTRY(llseek) +#ifdef PROF + ldgp gp, 0(pv) + lda AT, _mcount + jsr AT, (AT), _mcount .prologue 1 +#else + .prologue 0 +#endif sll a1, 32, a1 /* build a 64 bit ofs out of 32 bit operands */ zap a2, 0xf0, a2 @@ -40,8 +47,11 @@ ENTRY(llseek) stq v0, 0(t0) ret -error: br gp, 1f +error: +#ifndef PROF + br gp, 1f 1: ldgp gp, 0(gp) +#endif jmp zero, __syscall_error END(llseek) diff --git a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S index aaae9a308a..83d331fef0 100644 --- a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S +++ b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S @@ -24,7 +24,14 @@ Cambridge, MA 02139, USA. */ .text LEAF(sigsuspend, 0) +#ifdef PROF + ldgp gp, 0(pv) + lda AT, _mcount + jsr AT, (AT), _mcount .prologue 1 +#else + .prologue 0 +#endif ldq a0, 0(a0) ldi v0, __NR_sigsuspend @@ -32,8 +39,11 @@ LEAF(sigsuspend, 0) bne a3, error ret -error: br gp, 1f +error: +#ifndef PROF + br gp, 1f 1: ldgp gp, 0(gp) +#endif jmp zero, __syscall_error END(sigsuspend) diff --git a/sysdeps/unix/sysv/linux/alpha/syscall.S b/sysdeps/unix/sysv/linux/alpha/syscall.S index f1b36e9312..81043c2cdb 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscall.S +++ b/sysdeps/unix/sysv/linux/alpha/syscall.S @@ -42,6 +42,15 @@ Cambridge, MA 02139, USA. */ LEAF(__syscall, 0) +#ifdef PROF + ldgp gp, 0(pv) + lda AT, _mcount + jsr AT, (AT), _mcount + .prologue 1 +#else + .prologue 0 +#endif + mov a0, v0 /* Syscall number -> v0 */ mov a1, a0 /* arg1-arg5 -> a0-a4 */ mov a2, a1 @@ -53,8 +62,11 @@ LEAF(__syscall, 0) bne a3, error ret -error: br gp, 2f +error: +#ifndef PROF + br gp, 2f 2: ldgp gp, 0(gp) +#endif jmp zero, __syscall_error weak_alias(__syscall, syscall) diff --git a/sysdeps/unix/sysv/linux/m68k/syscall.S b/sysdeps/unix/sysv/linux/m68k/syscall.S index b7417aa911..d2328dc545 100644 --- a/sysdeps/unix/sysv/linux/m68k/syscall.S +++ b/sysdeps/unix/sysv/linux/m68k/syscall.S @@ -1,25 +1,25 @@ /* Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. + 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include /* Please consult the file sysdeps/unix/sysv/linux/m68k/sysdep.h for - more information about the value -128 used below.*/ + more information about the value -4096 used below.*/ .text ENTRY (syscall) @@ -27,7 +27,7 @@ ENTRY (syscall) _DOARGS_5 (24) /* Frob arguments. */ trap &0 /* Do the system call. */ UNDOARGS_5 /* Unfrob arguments. */ - moveq.l &-128, %d1 + moveq.l &-4096, %d1 cmp.l %d1, %d0 /* Check %d0 for error. */ jcc syscall_error /* Jump to error handler if negative. */ rts /* Return to caller. */ diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.S b/sysdeps/unix/sysv/linux/m68k/sysdep.S index 7016a26a60..95e63542ee 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.S +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.S @@ -1,20 +1,20 @@ /* Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. + 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include @@ -62,7 +62,11 @@ __syscall_error: END (__syscall_error) #endif /* PIC */ -ENTRY (__errno_location) + .weak __errno_location + .type __errno_location,@function + .align 4 +__errno_location: + CALL_MCOUNT #ifdef PIC move.l (%pc, errno@GOTPC), %a0 #else diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h index 3366caab45..46d5a7e48f 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -74,14 +74,13 @@ Cambridge, MA 02139, USA. */ even if the call succeeded. E.g., the `lseek' system call might return a large offset. Therefore we must not anymore test for < 0, but test for a real error by making sure the value in %d0 is a real error - number. For now (as of 2.1.1) 122 is the largest defined error number. - We allow for a bit of room for development and treat -128 to -1 as - error values. */ + number. Linus said he will make sure the no syscall returns a value + in -1 .. -4095 as a valid result so we can savely test with -4096. */ #define PSEUDO(name, syscall_name, args) \ .text; \ ENTRY (name) \ DO_CALL (&SYS_ify (syscall_name), args); \ - moveq.l &-128, %d1; \ + moveq.l &-4096, %d1; \ cmp.l %d1, %d0; \ jcc syscall_error From 6acf09f471bbc5ef13d736678475dcef18fc6241 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 14 Nov 1996 02:04:01 +0000 Subject: [PATCH 0765/4487] update from main archive 961113 --- sysdeps/unix/sysv/linux/m68k/syscall.S | 5 ++--- sysdeps/unix/sysv/linux/m68k/sysdep.h | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/sysdeps/unix/sysv/linux/m68k/syscall.S b/sysdeps/unix/sysv/linux/m68k/syscall.S index d2328dc545..f392b751fc 100644 --- a/sysdeps/unix/sysv/linux/m68k/syscall.S +++ b/sysdeps/unix/sysv/linux/m68k/syscall.S @@ -19,7 +19,7 @@ #include /* Please consult the file sysdeps/unix/sysv/linux/m68k/sysdep.h for - more information about the value -4096 used below.*/ + more information about the value -4095 used below.*/ .text ENTRY (syscall) @@ -27,8 +27,7 @@ ENTRY (syscall) _DOARGS_5 (24) /* Frob arguments. */ trap &0 /* Do the system call. */ UNDOARGS_5 /* Unfrob arguments. */ - moveq.l &-4096, %d1 - cmp.l %d1, %d0 /* Check %d0 for error. */ + cmp.l &-4095, %d0 /* Check %d0 for error. */ jcc syscall_error /* Jump to error handler if negative. */ rts /* Return to caller. */ PSEUDO_END (syscall) diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h index 46d5a7e48f..557f10cb9c 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -75,13 +75,12 @@ Cambridge, MA 02139, USA. */ a large offset. Therefore we must not anymore test for < 0, but test for a real error by making sure the value in %d0 is a real error number. Linus said he will make sure the no syscall returns a value - in -1 .. -4095 as a valid result so we can savely test with -4096. */ + in -1 .. -4095 as a valid result so we can savely test with -4095. */ #define PSEUDO(name, syscall_name, args) \ .text; \ ENTRY (name) \ DO_CALL (&SYS_ify (syscall_name), args); \ - moveq.l &-4096, %d1; \ - cmp.l %d1, %d0; \ + cmp.l &-4095, %d0; \ jcc syscall_error #undef PSEUDO_END From 7ef923d95816a8fda1023ff99efaaacfd1976a56 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 15 Nov 1996 04:08:00 +0000 Subject: [PATCH 0766/4487] update from main archive 961114 --- sysdeps/unix/bsd/osf/alpha/statbuf.h | 27 ++++++++--------- sysdeps/unix/bsd/osf/sys/mman.h | 34 +++++++++++----------- sysdeps/unix/bsd/sun/signum.h | 28 +++++++++--------- sysdeps/unix/bsd/sun/sunos4/resourcebits.h | 28 +++++++++--------- sysdeps/unix/bsd/sun/sunos4/sys/mman.h | 34 +++++++++++----------- sysdeps/unix/bsd/sun/sunos4/termbits.h | 34 +++++++++++----------- sysdeps/unix/bsd/ultrix4/sys/mman.h | 34 +++++++++++----------- sysdeps/unix/sysv/irix4/signum.h | 27 ++++++++--------- sysdeps/unix/sysv/irix4/statbuf.h | 30 +++++++++---------- sysdeps/unix/sysv/irix4/sys/mman.h | 34 +++++++++++----------- sysdeps/unix/sysv/linux/alpha/statbuf.h | 28 +++++++++--------- sysdeps/unix/sysv/linux/alpha/sys/io.h | 32 ++++++++++---------- sysdeps/unix/sysv/sco3.2.4/syscall.h | 18 ++++++++++++ sysdeps/unix/sysv/sco3.2/local_lim.h | 34 +++++++++++----------- sysdeps/unix/sysv/sysv4/i386/statbuf.h | 27 ++++++++--------- sysdeps/unix/sysv/sysv4/signum.h | 28 +++++++++--------- sysdeps/unix/sysv/sysv4/sigset.h | 34 +++++++++++----------- sysdeps/unix/sysv/sysv4/solaris2/signum.h | 28 +++++++++--------- sysdeps/unix/sysv/sysv4/solaris2/statbuf.h | 31 ++++++++++---------- sysdeps/unix/sysv/sysv4/waitflags.h | 27 ++++++++--------- sysdeps/vax/huge_val.h | 29 +++++++++--------- 21 files changed, 324 insertions(+), 302 deletions(-) diff --git a/sysdeps/unix/bsd/osf/alpha/statbuf.h b/sysdeps/unix/bsd/osf/alpha/statbuf.h index 9cadfaefd3..8541922b37 100644 --- a/sysdeps/unix/bsd/osf/alpha/statbuf.h +++ b/sysdeps/unix/bsd/osf/alpha/statbuf.h @@ -1,20 +1,21 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1996 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _STATBUF_H #define _STATBUF_H diff --git a/sysdeps/unix/bsd/osf/sys/mman.h b/sysdeps/unix/bsd/osf/sys/mman.h index fc148a6e65..6dc3e4e0cf 100644 --- a/sysdeps/unix/bsd/osf/sys/mman.h +++ b/sysdeps/unix/bsd/osf/sys/mman.h @@ -1,21 +1,21 @@ /* Definitions for BSD-style memory management. OSF/1 version. -Copyright (C) 1994, 1995, 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + Copyright (C) 1994, 1995, 1996 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _SYS_MMAN_H diff --git a/sysdeps/unix/bsd/sun/signum.h b/sysdeps/unix/bsd/sun/signum.h index ea83d710f6..a327401d0b 100644 --- a/sysdeps/unix/bsd/sun/signum.h +++ b/sysdeps/unix/bsd/sun/signum.h @@ -1,21 +1,21 @@ /* Signal number definitions. SunOS version. -Copyright (C) 1994 Free Software Foundation, Inc. -This file is part of the GNU C Library. + Copyright (C) 1994, 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifdef _SIGNAL_H diff --git a/sysdeps/unix/bsd/sun/sunos4/resourcebits.h b/sysdeps/unix/bsd/sun/sunos4/resourcebits.h index 8f515db330..d0d177c6ff 100644 --- a/sysdeps/unix/bsd/sun/sunos4/resourcebits.h +++ b/sysdeps/unix/bsd/sun/sunos4/resourcebits.h @@ -1,21 +1,21 @@ /* Bit values for resource limits. SunOS 4 version. -Copyright (C) 1994, 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. + Copyright (C) 1994, 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* These are the values for 4.4 BSD and GNU. Earlier BSD systems have a subset of these kinds of resource limit. In systems where `getrlimit' diff --git a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h index c952fc4fda..fb38c34d90 100644 --- a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h +++ b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h @@ -1,21 +1,21 @@ /* Definitions for BSD-style memory management. SunOS 4 version. -Copyright (C) 1994, 1995, 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + Copyright (C) 1994, 1995, 1996 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _SYS_MMAN_H diff --git a/sysdeps/unix/bsd/sun/sunos4/termbits.h b/sysdeps/unix/bsd/sun/sunos4/termbits.h index b768deab6f..dc0a007208 100644 --- a/sysdeps/unix/bsd/sun/sunos4/termbits.h +++ b/sysdeps/unix/bsd/sun/sunos4/termbits.h @@ -1,21 +1,21 @@ /* termios type and macro definitions. SunOS 4 version. -Copyright (C) 1993, 1994 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + Copyright (C) 1993, 1994, 1996 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* Type of terminal control flag masks. */ typedef unsigned long int tcflag_t; diff --git a/sysdeps/unix/bsd/ultrix4/sys/mman.h b/sysdeps/unix/bsd/ultrix4/sys/mman.h index d929ca9e84..2d3c8fe2ef 100644 --- a/sysdeps/unix/bsd/ultrix4/sys/mman.h +++ b/sysdeps/unix/bsd/ultrix4/sys/mman.h @@ -1,21 +1,21 @@ /* Definitions for BSD-style memory management. Ultrix 4 version. -Copyright (C) 1994, 1995, 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + Copyright (C) 1994, 1995, 1996 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _SYS_MMAN_H diff --git a/sysdeps/unix/sysv/irix4/signum.h b/sysdeps/unix/sysv/irix4/signum.h index 5d30ebb875..13314cff42 100644 --- a/sysdeps/unix/sysv/irix4/signum.h +++ b/sysdeps/unix/sysv/irix4/signum.h @@ -1,19 +1,20 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Signal number definitions. Irix4 version. + Copyright (C) 1994, 1996 Free Software Foundation, Inc. -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifdef _SIGNAL_H diff --git a/sysdeps/unix/sysv/irix4/statbuf.h b/sysdeps/unix/sysv/irix4/statbuf.h index 8b327bae11..579ccec8a6 100644 --- a/sysdeps/unix/sysv/irix4/statbuf.h +++ b/sysdeps/unix/sysv/irix4/statbuf.h @@ -1,23 +1,23 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1992, 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _STATBUF_H -#define _STATBUF_H +#define _STATBUF_H 1 struct stat { diff --git a/sysdeps/unix/sysv/irix4/sys/mman.h b/sysdeps/unix/sysv/irix4/sys/mman.h index c96bcc0751..9ceca1fe96 100644 --- a/sysdeps/unix/sysv/irix4/sys/mman.h +++ b/sysdeps/unix/sysv/irix4/sys/mman.h @@ -1,21 +1,21 @@ /* Definitions for BSD-style memory management. Irix 4 version. -Copyright (C) 1994, 1995, 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + Copyright (C) 1994, 1995, 1996 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _SYS_MMAN_H diff --git a/sysdeps/unix/sysv/linux/alpha/statbuf.h b/sysdeps/unix/sysv/linux/alpha/statbuf.h index 5b59155d10..92c9df7404 100644 --- a/sysdeps/unix/sysv/linux/alpha/statbuf.h +++ b/sysdeps/unix/sysv/linux/alpha/statbuf.h @@ -1,23 +1,23 @@ /* Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. + 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _STATBUF_H -#define _STATBUF_H +#define _STATBUF_H 1 /* The Alpha has no additional syscall versions. */ diff --git a/sysdeps/unix/sysv/linux/alpha/sys/io.h b/sysdeps/unix/sysv/linux/alpha/sys/io.h index a88073573c..c4aa2c776c 100644 --- a/sysdeps/unix/sysv/linux/alpha/sys/io.h +++ b/sysdeps/unix/sysv/linux/alpha/sys/io.h @@ -1,20 +1,20 @@ /* Copyright (C) 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _SYS_IO_H diff --git a/sysdeps/unix/sysv/sco3.2.4/syscall.h b/sysdeps/unix/sysv/sco3.2.4/syscall.h index 316bd0d0ce..9c03f89759 100644 --- a/sysdeps/unix/sysv/sco3.2.4/syscall.h +++ b/sysdeps/unix/sysv/sco3.2.4/syscall.h @@ -1,3 +1,21 @@ +/* Copyright (C) 1994, 1996 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + /* From Scott Bartram. */ #ifndef _SYSCALL_H diff --git a/sysdeps/unix/sysv/sco3.2/local_lim.h b/sysdeps/unix/sysv/sco3.2/local_lim.h index 6d6c3b0ac8..e456816446 100644 --- a/sysdeps/unix/sysv/sco3.2/local_lim.h +++ b/sysdeps/unix/sysv/sco3.2/local_lim.h @@ -1,20 +1,20 @@ -/* Copyright (C) 1993 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ +/* Copyright (C) 1993, 1996 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _LOCAL_LIM_H #define _LOCAL_LIM_H 1 diff --git a/sysdeps/unix/sysv/sysv4/i386/statbuf.h b/sysdeps/unix/sysv/sysv4/i386/statbuf.h index ada49ce6d0..9354d6790c 100644 --- a/sysdeps/unix/sysv/sysv4/i386/statbuf.h +++ b/sysdeps/unix/sysv/sysv4/i386/statbuf.h @@ -1,23 +1,24 @@ /* Copyright (C) 1993, 1996 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _STATBUF_H -#define _STATBUF_H +#define _STATBUF_H 1 #include diff --git a/sysdeps/unix/sysv/sysv4/signum.h b/sysdeps/unix/sysv/sysv4/signum.h index aa3dc7fa25..f11c731a42 100644 --- a/sysdeps/unix/sysv/sysv4/signum.h +++ b/sysdeps/unix/sysv/sysv4/signum.h @@ -1,21 +1,21 @@ /* Signal number definitions. SVR4 version. -Copyright (C) 1994 Free Software Foundation, Inc. -This file is part of the GNU C Library. + Copyright (C) 1994, 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifdef _SIGNAL_H diff --git a/sysdeps/unix/sysv/sysv4/sigset.h b/sysdeps/unix/sysv/sysv4/sigset.h index 57aff36ab7..1461c93b3d 100644 --- a/sysdeps/unix/sysv/sysv4/sigset.h +++ b/sysdeps/unix/sysv/sysv4/sigset.h @@ -1,21 +1,21 @@ /* __sig_atomic_t, __sigset_t, and related definitions. SVR4 version. -Copyright (C) 1994, 1995, 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + Copyright (C) 1994, 1995, 1996 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _SIGSET_H_types #define _SIGSET_H_types 1 diff --git a/sysdeps/unix/sysv/sysv4/solaris2/signum.h b/sysdeps/unix/sysv/sysv4/solaris2/signum.h index 8219626c3e..4e5576425b 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/signum.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/signum.h @@ -1,21 +1,21 @@ /* Signal number definitions. Solaris 2 version. -Copyright (C) 1994 Free Software Foundation, Inc. -This file is part of the GNU C Library. + Copyright (C) 1994, 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifdef _SIGNAL_H diff --git a/sysdeps/unix/sysv/sysv4/solaris2/statbuf.h b/sysdeps/unix/sysv/sysv4/solaris2/statbuf.h index ac74cdffa7..e4e2ab8bcf 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/statbuf.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/statbuf.h @@ -1,23 +1,24 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1996 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _STATBUF_H -#define _STATBUF_H +#define _STATBUF_H 1 #include @@ -37,7 +38,7 @@ struct stat long st_filler2[2]; __off_t st_size; /* Size of file, in bytes. */ - /* SVR4 added this extra long to allow for expansion of off_t. */ + /* SVR4 added this extra long to allow for expansion of off_t. */ long st_filler3; __time_t st_atime; /* Time of last access. */ diff --git a/sysdeps/unix/sysv/sysv4/waitflags.h b/sysdeps/unix/sysv/sysv4/waitflags.h index cdb6f29e1d..f5613c1327 100644 --- a/sysdeps/unix/sysv/sysv4/waitflags.h +++ b/sysdeps/unix/sysv/sysv4/waitflags.h @@ -1,21 +1,22 @@ /* Definitions of flag bits for `waitpid' et al. - Copyright (C) 1993 Free Software Foundation, Inc. + Copyright (C) 1993, 1996 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _WAITFLAGS_H diff --git a/sysdeps/vax/huge_val.h b/sysdeps/vax/huge_val.h index 58f5415446..02cafb0141 100644 --- a/sysdeps/vax/huge_val.h +++ b/sysdeps/vax/huge_val.h @@ -1,23 +1,22 @@ /* `HUGE_VAL' constant for Vaxen. Used by and functions for overflow. + Copyright (C) 1992, 1996 Free Software Foundation, Inc. + This file is part of the GNU C Library. -Copyright (C) 1992 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 Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -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 -published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. -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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _HUGE_VAL_H #define _HUGE_VAL_H 1 From c2a6bc19ec6e81fa023d298254ffc0cef99e77e9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 17 Nov 1996 03:15:22 +0000 Subject: [PATCH 0767/4487] update from main archive 961116 --- sysdeps/alpha/Dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/alpha/Dist b/sysdeps/alpha/Dist index 3cc9595dfb..022fa0379f 100644 --- a/sysdeps/alpha/Dist +++ b/sysdeps/alpha/Dist @@ -1,7 +1,7 @@ setjmp_aux.c DEFS.h divrem.h -divl.S divlu.S divq.S divqu.S reml.S remlu.S remq.S remqu.S +divl.S divq.S reml.S remq.S _mcount.S stxcpy.S stxncpy.S From 3c7b25873ae72cdb280c8da52815e6e83a1179c5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 20 Nov 1996 03:45:46 +0000 Subject: [PATCH 0768/4487] update from main archive 961119 --- sysdeps/alpha/bsd-_setjmp.S | 30 +- sysdeps/alpha/bsd-setjmp.S | 30 +- sysdeps/alpha/htonl.S | 28 +- sysdeps/alpha/htons.S | 28 +- sysdeps/alpha/memcpy.S | 276 ------------------ sysdeps/alpha/s_copysign.S | 30 +- sysdeps/alpha/setjmp.S | 28 +- sysdeps/alpha/stpcpy.S | 31 +- sysdeps/alpha/strcat.S | 4 +- sysdeps/alpha/strcpy.S | 31 +- sysdeps/alpha/strncat.S | 31 +- sysdeps/alpha/w_sqrt.S | 12 +- sysdeps/unix/sysv/linux/alpha/brk.S | 33 ++- sysdeps/unix/sysv/linux/alpha/clone.S | 29 +- .../sysv/linux/alpha/ieee_get_fp_control.S | 31 +- .../sysv/linux/alpha/ieee_set_fp_control.S | 31 +- sysdeps/unix/sysv/linux/alpha/llseek.S | 31 +- sysdeps/unix/sysv/linux/alpha/sigsuspend.S | 37 ++- sysdeps/unix/sysv/linux/alpha/syscall.S | 31 +- 19 files changed, 274 insertions(+), 508 deletions(-) delete mode 100644 sysdeps/alpha/memcpy.S diff --git a/sysdeps/alpha/bsd-_setjmp.S b/sysdeps/alpha/bsd-_setjmp.S index be7f6dd05f..1bb3e4ab37 100644 --- a/sysdeps/alpha/bsd-_setjmp.S +++ b/sysdeps/alpha/bsd-_setjmp.S @@ -1,21 +1,21 @@ /* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. Alpha version. -Copyright (C) 1994, 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. + Copyright (C) 1994, 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* This just does a tail-call to `__sigsetjmp (ARG, 0)'. We cannot do it in C because it must be a tail-call, so frame-unwinding @@ -26,8 +26,10 @@ Cambridge, MA 02139, USA. */ ENTRY(_setjmp) ldgp $29,0($27) #ifdef PROF + .set noat lda AT, _mcount jsr AT, (AT), _mcount + .set at #endif .prologue 1 bis $31, $31, $17 /* Pass a second argument of zero. */ diff --git a/sysdeps/alpha/bsd-setjmp.S b/sysdeps/alpha/bsd-setjmp.S index 2b799613d7..cf5bf189de 100644 --- a/sysdeps/alpha/bsd-setjmp.S +++ b/sysdeps/alpha/bsd-setjmp.S @@ -1,21 +1,21 @@ /* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. Alpha version. -Copyright (C) 1994, 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. + Copyright (C) 1994, 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* This just does a tail-call to `__sigsetjmp (ARG, 1)'. We cannot do it in C because it must be a tail-call, so frame-unwinding @@ -26,8 +26,10 @@ Cambridge, MA 02139, USA. */ ENTRY(setjmp) ldgp $29, 0($27) #ifdef PROF + .set noat lda AT, _mcount jsr AT, (AT), _mcount + .set at #endif .prologue 1 bis $31, 1, $17 /* Pass a second argument of one. */ diff --git a/sysdeps/alpha/htonl.S b/sysdeps/alpha/htonl.S index 55d4f62bc7..c6e09f134f 100644 --- a/sysdeps/alpha/htonl.S +++ b/sysdeps/alpha/htonl.S @@ -1,28 +1,30 @@ /* Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. + 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include ENTRY(__htonl) #ifdef PROF ldgp gp, 0(pv) + .set noat lda AT, _mcount jsr AT, (AT), _mcount + .set at .prologue 1 #else .prologue 0 diff --git a/sysdeps/alpha/htons.S b/sysdeps/alpha/htons.S index 743d3e2474..8d3aefe149 100644 --- a/sysdeps/alpha/htons.S +++ b/sysdeps/alpha/htons.S @@ -1,28 +1,30 @@ /* Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. + 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include ENTRY(__htons) #ifdef PROF ldgp gp, 0(pv) + .set noat lda AT, _mcount jsr AT, (AT), _mcount + .set at .prologue 1 #else .prologue 0 diff --git a/sysdeps/alpha/memcpy.S b/sysdeps/alpha/memcpy.S deleted file mode 100644 index 4ee9c115db..0000000000 --- a/sysdeps/alpha/memcpy.S +++ /dev/null @@ -1,276 +0,0 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. - Contributed by Richard Henderson (rth@tamu.edu) - - 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If - not, write to the Free Software Foundation, Inc., 675 Mass Ave, - Cambridge, MA 02139, USA. */ - - -/* This is the child of the C-with-inline-assembly memcpy posted by - Martin Ostermann (ost@comnets.rwth-aachen.de). - - This is generally scheduled for the EV5, but whenever necessary and - possible, the autoswap slotting feature of the EV5 is used so that the - code lays out nicely for the EV4 as well. */ - -#include - - .set noreorder - - .text - - .ent copy_fwd_aligned -copy_fwd_aligned: - .frame sp, 0, ra, 0 - .prologue 0 - - /* Aligned forward copy main loop. On entry to this basic block: - t0 == source word waiting to be stored - t2 == loop counter - a0 == destination pointer - a1 == source pointer - a2 mod 8 == byte count in final word */ - .align 4 -$fa_loop: - and t2, 7, t1 # e0 : - beq t1, 1f # .. e1 : - -0: stq_u t0, 0(a0) # e0 : - subq t1, 1, t1 # .. e1 : - ldq_u t0, 8(a1) # e0 : copy up to seven words - addq a0, 8, a0 # .. e1 : - addq a1, 8, a1 # e0 : - bne t1, 0b # .. e1 : - -1: bic t2, 7, t2 # e0 : - beq t2, $fa_tail # .. e1 : - -2: stq_u t0, 0(a0) # e0 : - addq a0, 64, a0 # .. e1 : - ldq_u t3, 8(a1) # e0 : copy eight words as fast as we can - ldq_u t4, 16(a1) # .. e1 : - ldq_u t5, 24(a1) # e0 : - ldq_u t6, 32(a1) # .. e1 : - ldq_u t7, 40(a1) # e0 : - ldq_u t8, 48(a1) # .. e1 : - ldq_u t9, 56(a1) # e0 : - ldq_u t0, 64(a1) # .. e1 : - stq_u t3, -56(a0) # e0 : - subq t2, 8, t2 # .. e1 : - stq_u t4, -48(a0) # e0 : - addq a1, 64, a1 # .. e1 : - stq_u t5, -40(a0) # e0 : - stq_u t6, -32(a0) # e0 : - stq_u t7, -24(a0) # e0 : - stq_u t8, -16(a0) # e0 : - stq_u t9, -8(a0) # e0 : - bne t2, 2b # .. e1 : - - /* Take care of a partial word tail. */ -$fa_tail: - and a2, 7, t3 # e0 : - bne t3, 1f # .. e1 (zdb) - - /* Aligned copy, aligned tail, final store. */ - stq_u t0, 0(a0) - ret - -1: ldq_u t1, 0(a0) # e1 : - mskql t0, a2, t0 # .. e1 : - mskqh t1, a2, t1 # e0 (stall) - bis t0, t1, t0 # e1 : - stq_u t0, 0(a0) # e0 : - ret # .. e1 : - - /* This is the actual entry point to this function. */ - .align 3 -$fwd_aligned: - ldq_u t0, 0(a1) # e0 : - and a0, 7, t3 # .. e1 : - addq a2, t3, a2 # e0 : - subq a2, 1, t2 # e1 : - sra t2, 3, t2 # e0 : - beq t3, $fa_loop # .. e1 : - - ldq_u t1, 0(a0) # e0 : - beq t2, $fa_small # .. e1 : - mskqh t0, a0, t0 # e0 : - mskql t1, a0, t3 # e0 : - bis t0, t3, t0 # e0 : - br $fa_loop # .. e1 : - - /* The move affects exactly one destination word. */ -$fa_small: - mskqh t0, a0, t0 # e0 : - and a2, 7, t4 # .. e1 : - mskql t1, a0, t3 # e0 : - bne t4, 1f # .. e1 : - - or t0, t3, t0 # e0 : - unop # : - stq_u t0, 0(a0) # e0 : - ret # .. e1 : - -1: mskql t0, a2, t0 # e0 : - mskqh t1, a2, t1 # e0 : - or t0, t3, t0 # e0 : - or t0, t1, t0 # e1 : - stq_u t0, 0(a0) # e0 : - ret # .. e1 : - - .end copy_fwd_aligned - - .ent memcpy - .globl memcpy - .align 3 -memcpy: - .frame sp, 0, ra, 0 -#ifdef PROF - ldgp gp, 0(ra) - lda AT, _mcount - jsr AT, (AT), _mcount - .prologue 1 -#else - .prologue 0 -#endif - - mov a0, v0 - beq a2, $zero_length - - /* Are source and destination co-aligned? */ - xor a0, a1, t0 - unop - and t0, 7, t0 - beq t0, $fwd_aligned - br $fwd_unaligned - - .end memcpy - - .ent copy_fwd_unaligned -copy_fwd_unaligned: - .frame sp, 0, ra, 0 - .prologue 0 - - /* Unaligned forward copy main loop. On entry to this basic block: - t0 == source low word, unshifted - t2 == loop counter - t7 == last source byte + 1 - a0 == destination pointer - a1 == source pointer - a2 mod 8 == byte count in final word */ - .align 4 -$fu_loop: - beq t2, $fu_tail # e1 : - blbc t2, 0f # e1 : - - ldq_u t1, 8(a1) # e1 : copy one unaligned word - extql t0, a1, t3 # .. e0 : - addq a1, 8, a1 # e0 : - addq a0, 8, a0 # .. e1 : - extqh t1, a1, t4 # e0 : - subq t2, 1, t2 # .. e1 : - mov t1, t0 # e0 : - or t3, t4, t3 # .. e1 : - stq_u t3, -8(a0) # e0 : - beq t2, $fu_tail # .. e1 : - -0: ldq_u t1, 8(a1) # e1 : copy two unaligned words - extql t0, a1, t3 # .. e0 : - ldq_u t0, 16(a1) # e0 : - subq t2, 2, t2 # .. e1 : - extqh t1, a1, t4 # e0 : - addq a0, 16, a0 # .. e1 : - extql t1, a1, t5 # e0 : - or t3, t4, t3 # .. e1 : - extqh t0, a1, t6 # e0 : - addq a1, 16, a1 # .. e1 : - stq_u t3, -16(a0) # e0 : - or t5, t6, t5 # .. e1 : - stq_u t5, -8(a0) # e0 : - bne t2, 0b # .. e1 : - - /* Take care of a partial words tail. */ -$fu_tail: - ldq_u t4, -1(t7) # e1 : - extql t0, a1, t3 # .. e0 : - extqh t4, a1, t4 # e0 (stall) - and a2, 7, t5 # .. e1 : - or t3, t4, t3 # e0 : - beq t5, 1f # .. e1 : - - ldq_u t1, 0(a0) # e1 : - mskql t3, a2, t3 # .. e0 : - mskqh t1, a2, t1 # e0 (stall) - or t1, t3, t3 # e1 : - -1: stq_u t3, 0(a0) # e0 : - ret # .. e1 : - - /* The entry point to the unaligned forward copy. */ - .align 3 -$fwd_unaligned: - ldq_u t0, 0(a1) # e0 : load initial bits of src - addq a1, a2, t7 # .. e1 : record last byte + 1 of src - and a0, 7, t3 # e0 : find dst misalignment - addq a2, t3, a2 # e1 : find number of words affected - subq a2, 1, t2 # e0 : - cmple a2, 8, t4 # .. e1 : are we dealing with a small block? - subq a1, t3, a1 # e0 : - bne t4, $fu_small # .. e1 : - srl t2, 3, t2 # e0 : - beq t3, $fu_loop # .. e1 : - - /* Take care of an unaligned dst head. */ - ldq_u t5, 0(a0) # e0 : - ldq_u t1, 8(a1) # .. e1 : - extql t0, a1, t3 # e0 : - addq a0, 8, a0 # .. e1 : - extqh t1, a1, t4 # e0 : - addq a1, 8, a1 # .. e1 : - mskql t5, a0, t5 # e0 : - or t3, t4, t3 # .. e1 : - mskqh t3, a0, t3 # e0 : - subq t2, 1, t2 # .. e1 : - or t3, t5, t3 # e0 : - mov t1, t0 # .. e1 : - stq_u t3, -8(a0) # e0 : - br $fu_loop # .. e1 : - - /* The move affects exactly one destination word. */ - .align 3 -$fu_small: - ldq_u t2, 0(a0) # e1 : - extql t0, a1, t3 # .. e0 : - ldq_u t1, -1(t7) # e0 : - and a2, 7, t8 # .. e1 : - mskqh t2, a2, t6 # e0 : - mskql t2, a0, t5 # e0 : - extqh t1, a1, t4 # e0 : - cmovne t8, t6, t8 # .. e1 : - or t3, t4, t3 # e0 : - or t5, t8, t5 # .. e1 : - mskqh t3, a0, t3 # e0 : - and a2, 7, t8 # .. e1 : - mskql t3, a2, t6 # e0 : - cmovne t8, t6, t8 # e1 : - or t3, t5, t3 # e0 : - unop # : - stq_u t3, 0(a0) # e0 : - -$zero_length: - ret # .. e1 : - - .end copy_fwd_unaligned diff --git a/sysdeps/alpha/s_copysign.S b/sysdeps/alpha/s_copysign.S index 739d3deb79..be5b1d07ac 100644 --- a/sysdeps/alpha/s_copysign.S +++ b/sysdeps/alpha/s_copysign.S @@ -1,29 +1,31 @@ /* Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. -Contributed by David Mosberger + This file is part of the GNU C Library. + Contributed by David Mosberger , 1996. -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include ENTRY(__copysign) #ifdef PROF ldgp gp, 0(pv) + .set noat lda AT, _mcount jsr AT, (AT), _mcount + .set at .prologue 1 #else .prologue 0 diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S index f57d49017e..4b2e147b15 100644 --- a/sysdeps/alpha/setjmp.S +++ b/sysdeps/alpha/setjmp.S @@ -1,20 +1,20 @@ /* Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. + 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include @@ -24,8 +24,10 @@ Cambridge, MA 02139, USA. */ ENTRY (__sigsetjmp) ldgp $29, 0($27) #ifdef PROF + .set noat lda AT, _mcount jsr AT, (AT), _mcount + .set at #endif .prologue 1 diff --git a/sysdeps/alpha/stpcpy.S b/sysdeps/alpha/stpcpy.S index 9c2668b535..46b09d5ac5 100644 --- a/sysdeps/alpha/stpcpy.S +++ b/sysdeps/alpha/stpcpy.S @@ -1,22 +1,21 @@ /* Copyright (C) 1996 Free Software Foundation, Inc. - Contributed by Richard Henderson (rth@tamu.edu) + This file is part of the GNU C Library. + Contributed by Richard Henderson , 1996. -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 Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -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 -published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. -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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* Copy a null-terminated string from SRC to DST. Return a pointer to the null-terminator in the source. */ @@ -28,8 +27,10 @@ Cambridge, MA 02139, USA. */ ENTRY(__stpcpy) ldgp gp, 0(pv) #ifdef PROF + .set noat lda AT, _mcount jsr AT, (AT), _mcount + .set at #endif .prologue 1 diff --git a/sysdeps/alpha/strcat.S b/sysdeps/alpha/strcat.S index e57259f51d..ddc15d9ca6 100644 --- a/sysdeps/alpha/strcat.S +++ b/sysdeps/alpha/strcat.S @@ -1,6 +1,6 @@ /* Copyright (C) 1996 Free Software Foundation, Inc. This file is part of the GNU C Library. - Contributed by Richard Henderson (rth@tamu.edu) + Contributed by Richard Henderson , 1996. 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 @@ -26,8 +26,10 @@ ENTRY(strcat) ldgp gp, 0(pv) #ifdef PROF + .set noat lda AT, _mcount jsr AT, (AT), _mcount + .set at #endif .prologue 1 diff --git a/sysdeps/alpha/strcpy.S b/sysdeps/alpha/strcpy.S index 823476f750..24c827b10f 100644 --- a/sysdeps/alpha/strcpy.S +++ b/sysdeps/alpha/strcpy.S @@ -1,22 +1,21 @@ /* Copyright (C) 1996 Free Software Foundation, Inc. - Contributed by Richard Henderson (rth@tamu.edu) + This file is part of the GNU C Library. + Contributed by Richard Henderson , 1996. -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 Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -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 -published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. -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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* Copy a null-terminated string from SRC to DST. Return a pointer to the null-terminator in the source. */ @@ -28,8 +27,10 @@ Cambridge, MA 02139, USA. */ ENTRY(strcpy) ldgp gp, 0(pv) #ifdef PROF + .set noat lda AT, _mcount jsr AT, (AT), _mcount + .set at #endif .prologue 1 diff --git a/sysdeps/alpha/strncat.S b/sysdeps/alpha/strncat.S index 089fba34d9..2c39cc0232 100644 --- a/sysdeps/alpha/strncat.S +++ b/sysdeps/alpha/strncat.S @@ -1,22 +1,21 @@ /* Copyright (C) 1996 Free Software Foundation, Inc. - Contributed by Richard Henderson (rth@tamu.edu) + This file is part of the GNU C Library. + Contributed by Richard Henderson , 1996. -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 Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -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 -published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. -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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* Append no more than COUNT characters from the null-terminated string SRC to the null-terminated string DST. Always null-terminate the new DST. */ @@ -28,8 +27,10 @@ Cambridge, MA 02139, USA. */ ENTRY(strncat) ldgp gp, 0(pv) #ifdef PROF + .set noat lda AT, _mcount jsr AT, (AT), _mcount + .set at #endif .prologue 1 diff --git a/sysdeps/alpha/w_sqrt.S b/sysdeps/alpha/w_sqrt.S index b5c980e557..cf5ae097fd 100644 --- a/sysdeps/alpha/w_sqrt.S +++ b/sysdeps/alpha/w_sqrt.S @@ -1,8 +1,7 @@ /* Copyright (C) 1996 Free Software Foundation, Inc. - Contributed by David Mosberger (davidm@cs.arizona.edu). - Based on public-domain C source by Linus Torvalds. - This file is part of the GNU C Library. + Contributed by David Mosberger , 1996. + Based on public-domain C source by Linus Torvalds. 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 @@ -15,9 +14,9 @@ Library General Public License for more details. You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If - not, write to the Free Software Foundation, Inc., 675 Mass Ave, - Cambridge, MA 02139, USA. */ + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* This version is much faster than generic sqrt implementation, but it doesn't handle exceptional values or the inexact flag. Don't use @@ -25,6 +24,7 @@ #ifndef _IEEE_FP +#define _ERRNO_H #include #include diff --git a/sysdeps/unix/sysv/linux/alpha/brk.S b/sysdeps/unix/sysv/linux/alpha/brk.S index d31d9e9b4d..3d9f6dca5f 100644 --- a/sysdeps/unix/sysv/linux/alpha/brk.S +++ b/sysdeps/unix/sysv/linux/alpha/brk.S @@ -1,24 +1,25 @@ /* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@zen.org). + This file is part of the GNU C Library. + Contributed by Brendan Kehoe , 1993. -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* __brk is a special syscall under Linux since it never returns an -error. Instead, the error condition is indicated by returning the old -break value (instead of the new, requested one). */ + error. Instead, the error condition is indicated by returning the old + break value (instead of the new, requested one). */ #include #define _ERRNO_H @@ -39,8 +40,10 @@ __curbrk: .skip 8 LEAF(__brk, 0) ldgp gp, 0(t12) #ifdef PROF + .set noat lda AT, _mcount jsr AT, (AT), _mcount + .set at #endif .prologue 1 diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S index 9dbf3034c9..03ecddc727 100644 --- a/sysdeps/unix/sysv/linux/alpha/clone.S +++ b/sysdeps/unix/sysv/linux/alpha/clone.S @@ -1,20 +1,21 @@ /* Copyright (C) 1996 Free Software Foundation, Inc. - Contributed by Richard Henderson (rth@tamu.edu) + This file is part of the GNU C Library. + Contributed by Richard Henderson , 1996. -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* clone() is even more special than fork() as it mucks with stacks and invokes a function in the right context after its all over. */ @@ -33,8 +34,10 @@ ENTRY(__clone) stq a4,0(sp) stq a5,8(sp) #ifdef PROF + .set noat lda AT, _mcount jsr AT, (AT), _mcount + .set at #endif .prologue 1 diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S index 1176a2730f..dbc25bcbf3 100644 --- a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S +++ b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S @@ -1,20 +1,21 @@ -/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. - Contributed by David Mosberger (davidm@azstarnet.com). +/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Mosberger , 1995. -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include @@ -26,8 +27,10 @@ LEAF(__ieee_get_fp_control, 16) #ifdef PROF ldgp gp, 0(pv) lda sp, -16(sp) + .set noat lda AT, _mcount jsr AT, (AT), _mcount + .set at .prologue 1 #else lda sp, -16(sp) diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S index aa761ecaca..8486cfaa3a 100644 --- a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S +++ b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S @@ -1,20 +1,21 @@ -/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. - Contributed by David Mosberger (davidm@azstarnet.com). +/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Mosberger , 1995. -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include @@ -24,8 +25,10 @@ LEAF(__ieee_set_fp_control, 16) #ifdef PROF ldgp gp, 0(sp) lda sp, -16(sp) + .set noat lda AT, _mcount jsr AT, (AT), _mcount + .set at .prologue 1 #else lda sp, -16(sp) diff --git a/sysdeps/unix/sysv/linux/alpha/llseek.S b/sysdeps/unix/sysv/linux/alpha/llseek.S index 45fb349236..a2e644c161 100644 --- a/sysdeps/unix/sysv/linux/alpha/llseek.S +++ b/sysdeps/unix/sysv/linux/alpha/llseek.S @@ -1,20 +1,21 @@ -/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. - Contributed by David Mosberger (davidm@cs.arizona.edu). +/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Mosberger , 1995. -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* For compatibility only: a "long" is 64 bits on the Alpha, so llseek() isn't really needed. But there are some programs out @@ -26,8 +27,10 @@ Cambridge, MA 02139, USA. */ ENTRY(llseek) #ifdef PROF ldgp gp, 0(pv) + .set noat lda AT, _mcount jsr AT, (AT), _mcount + .set at .prologue 1 #else .prologue 0 diff --git a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S index 83d331fef0..f476ed595f 100644 --- a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S +++ b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S @@ -1,20 +1,21 @@ -/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. - Contributed by David Mosberger (davidm@cs.arizona.edu). +/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Mosberger , 1995. -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* sigsuspend is a special syscall since it needs to dereference the sigset. */ @@ -23,11 +24,13 @@ Cambridge, MA 02139, USA. */ .text -LEAF(sigsuspend, 0) +LEAF(__sigsuspend, 0) #ifdef PROF ldgp gp, 0(pv) + .set noat lda AT, _mcount jsr AT, (AT), _mcount + .set at .prologue 1 #else .prologue 0 @@ -46,4 +49,6 @@ error: #endif jmp zero, __syscall_error - END(sigsuspend) + END(__sigsuspend) + +weak_alias(__sigsuspend, sigsuspend) diff --git a/sysdeps/unix/sysv/linux/alpha/syscall.S b/sysdeps/unix/sysv/linux/alpha/syscall.S index 81043c2cdb..75e1260aea 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscall.S +++ b/sysdeps/unix/sysv/linux/alpha/syscall.S @@ -1,20 +1,21 @@ /* Copyright (C) 1996 Free Software Foundation, Inc. - Contributed by David Mosberger (davidm@azstarnet.com). + This file is part of the GNU C Library. + Contributed by David Mosberger , 1996. -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include @@ -44,8 +45,10 @@ Cambridge, MA 02139, USA. */ LEAF(__syscall, 0) #ifdef PROF ldgp gp, 0(pv) + .set noat lda AT, _mcount jsr AT, (AT), _mcount + .set at .prologue 1 #else .prologue 0 @@ -69,4 +72,6 @@ error: #endif jmp zero, __syscall_error +END(__syscall) + weak_alias(__syscall, syscall) From eaff3663c5d184da855592ff950f0e85488dcf58 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 27 Nov 1996 06:09:14 +0000 Subject: [PATCH 0769/4487] update from main archive 961126 --- sysdeps/alpha/elf/Dist | 2 + sysdeps/alpha/elf/crtbegin.S | 91 +++++++++++++++++++++++++++++++++++ sysdeps/alpha/elf/crtend.S | 92 ++++++++++++++++++++++++++++++++++++ 3 files changed, 185 insertions(+) create mode 100644 sysdeps/alpha/elf/Dist create mode 100644 sysdeps/alpha/elf/crtbegin.S create mode 100644 sysdeps/alpha/elf/crtend.S diff --git a/sysdeps/alpha/elf/Dist b/sysdeps/alpha/elf/Dist new file mode 100644 index 0000000000..3e7010182b --- /dev/null +++ b/sysdeps/alpha/elf/Dist @@ -0,0 +1,2 @@ +crtbegin.S +crtend.S diff --git a/sysdeps/alpha/elf/crtbegin.S b/sysdeps/alpha/elf/crtbegin.S new file mode 100644 index 0000000000..f75673e35f --- /dev/null +++ b/sysdeps/alpha/elf/crtbegin.S @@ -0,0 +1,91 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. + Contributed by Richard Henderson (rth@tamu.edu) + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If + not, write to the Free Software Foundation, Inc., + 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + + +/* + * Heads of the constructor/destructor lists. + */ + +/* The __*TOR_LIST__ symbols are not global because when this file is used + in a shared library, we do not want the symbol to fall over to the + application's lists. */ + +.section .ctors,"aw" + + .align 3 +__CTOR_LIST__: + .quad -1 + +.section .dtors,"aw" + + .align 3 +__DTOR_LIST__: + .quad -1 + + +/* + * Fragment of the ELF _fini routine that invokes our dtor cleanup. + */ + +.section .fini,"ax" + + /* Since the bits of the _fini function are spread across many + object files, each potentially with its own GP, we must + assume we need to load ours. Further, our .fini section + can easily be more than 4MB away from our .text bits so we + can't use bsr. */ + + br $gp,1f +1: ldgp $gp,0($gp) + jsr $26,__do_global_dtors_aux + + /* Must match the alignment we got from crti.o else we get + zero-filled holes in our _fini function and thense SIGILL. */ + .align 3 + +/* + * Invoke our destructors in order. + */ + +.text + + .align 3 + .ent __do_global_dtors_aux + +__do_global_dtors_aux: + .frame $sp,16,$26,0 + /* GP already loaded in .fini */ + lda $sp,-16($sp) + stq $9,8($sp) + stq $26,0($sp) + .mask (1<<26)|(1<<9), -16 + .prologue 1 + + lda $9,__DTOR_LIST__ + br 1f +0: jsr $26,($27) +1: ldq $27,8($9) + addq $9,8,$9 + bne $27,0b + + ldq $26,0($sp) + ldq $9,8($sp) + lda $sp,16($sp) + ret + + .end __do_global_dtors_aux diff --git a/sysdeps/alpha/elf/crtend.S b/sysdeps/alpha/elf/crtend.S new file mode 100644 index 0000000000..7f51d81da1 --- /dev/null +++ b/sysdeps/alpha/elf/crtend.S @@ -0,0 +1,92 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. + Contributed by Richard Henderson (rth@tamu.edu) + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If + not, write to the Free Software Foundation, Inc., + 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + + +/* + * Tails of the constructor/destructor lists. + */ + +/* The __*TOR_END__ symbols are not global because when this file is used + in a shared library, we do not want the symbol to fall over to the + application's lists. */ + +.section .ctors,"aw" + + .align 3 +__CTOR_END__: + .quad 0 + +.section .dtors,"aw" + + .align 3 +__DTOR_END__: + .quad 0 + + +/* + * Fragment of the ELF _init routine that invokes our ctor startup + */ + +.section .init,"ax" + + /* Since the bits of the _init function are spread across many + object files, each potentially with its own GP, we must + assume we need to load ours. Further, our .init section + can easily be more than 4MB away from our .text bits so we + can't use bsr. */ + + br $gp,1f +1: ldgp $gp,0($gp) + jsr $26,__do_global_ctors_aux + + /* Must match the alignment we got from crti.o else we get + zero-filled holes in our _init function and thense SIGILL. */ + .align 3 + +/* + * Invoke our destructors in order. + */ + +.text + + .align 3 + .ent __do_global_ctors_aux + +__do_global_ctors_aux: + .frame $sp,16,$26,0 + /* GP already loaded in .init. */ + lda $sp,-16($sp) + stq $9,8($sp) + stq $26,0($sp) + .mask (1<<26)|(1<<9), -16 + .prologue 1 + + lda $9,__CTOR_END__ + br 1f +0: jsr $26,($27) +1: ldq $27,-8($9) + subq $9,8,$9 + not $27,$0 + bne $0,0b + + ldq $26,0($sp) + ldq $9,8($sp) + lda $sp,16($sp) + ret + + .end __do_global_ctors_aux From b120ade020c2d637165bee9131244250b89c77eb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 28 Nov 1996 04:16:09 +0000 Subject: [PATCH 0770/4487] update from main archive 961127 --- sysdeps/alpha/elf/Makefile | 4 ++++ sysdeps/unix/sysv/linux/alpha/sys/io.h | 13 +++++++++++++ sysdeps/unix/sysv/linux/alpha/syscalls.list | 5 +++++ sysdeps/unix/sysv/linux/m68k/sysdep.S | 13 ------------- 4 files changed, 22 insertions(+), 13 deletions(-) create mode 100644 sysdeps/alpha/elf/Makefile diff --git a/sysdeps/alpha/elf/Makefile b/sysdeps/alpha/elf/Makefile new file mode 100644 index 0000000000..db849bd9bf --- /dev/null +++ b/sysdeps/alpha/elf/Makefile @@ -0,0 +1,4 @@ +ifeq ($(subdir), csu) +extra-objs += crtbegin.o crtend.o +install-lib += crtbegin.o crtend.o +endif diff --git a/sysdeps/unix/sysv/linux/alpha/sys/io.h b/sysdeps/unix/sysv/linux/alpha/sys/io.h index c4aa2c776c..208e793119 100644 --- a/sysdeps/unix/sysv/linux/alpha/sys/io.h +++ b/sysdeps/unix/sysv/linux/alpha/sys/io.h @@ -54,6 +54,19 @@ extern unsigned long bus_base_sparse __P ((void)) __attribute__ ((const)); extern int _hae_shift __P ((void)) __attribute__ ((const)); extern int hae_shift __P ((void)) __attribute__ ((const)); +/* Access PCI space protected from machine checks. */ +extern int pciconfig_read __P ((unsigned long int __bus, + unsigned long int __dfn, + unsigned long int __off, + unsigned long int __len, + unsigned char *__buf)); + +extern int pciconfig_write __P ((unsigned long int __bus, + unsigned long int __dfn, + unsigned long int __off, + unsigned long int __len, + unsigned char *__buf)); + __END_DECLS #endif /* _SYS_IO_H */ diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 4a52bf2818..49cc697489 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -21,6 +21,7 @@ getdents - getdents 3 __getdirentries getdirentries getpeername - getpeername 3 __getpeername getpeername getpriority - getpriority 2 __getpriority getpriority mmap - mmap 6 __mmap mmap +llseek EXTRA lseek 3 llseek # these are actually common with the x86: fstatfs - fstatfs 2 __fstatfs fstatfs @@ -46,3 +47,7 @@ setsockopt - setsockopt 5 __setsockopt setsockopt shutdown - shutdown 2 __shutdown shutdown socketpair - socketpair 4 __socketpair socketpair sysctl - _sysctl 6 sysctl + +# access pci space protected from machine checks: +pciconfig_read EXTRA pciconfig_read 5 pciconfig_read +pciconfig_write EXTRA pciconfig_write 5 pciconfig_write diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.S b/sysdeps/unix/sysv/linux/m68k/sysdep.S index 95e63542ee..5533be2c1b 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.S +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.S @@ -61,16 +61,3 @@ __syscall_error: rts END (__syscall_error) #endif /* PIC */ - - .weak __errno_location - .type __errno_location,@function - .align 4 -__errno_location: - CALL_MCOUNT -#ifdef PIC - move.l (%pc, errno@GOTPC), %a0 -#else - lea errno, %a0 -#endif - rts -END (__errno_location) From d57e8fd52663472e8c698d370e578615e05914f0 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 29 Nov 1996 02:21:14 +0000 Subject: [PATCH 0771/4487] update from main archive 961127 --- sysdeps/unix/sysv/linux/m68k/syscalls.list | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/syscalls.list diff --git a/sysdeps/unix/sysv/linux/m68k/syscalls.list b/sysdeps/unix/sysv/linux/m68k/syscalls.list new file mode 100644 index 0000000000..7883d70719 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/syscalls.list @@ -0,0 +1,3 @@ +# File name Caller Syscall name # args Strong name Weak names + +s_llseek llseek _llseek 5 __sys_llseek From f1fc182396bd179e3c8faa3efe2372af32f745f6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 4 Dec 1996 01:41:27 +0000 Subject: [PATCH 0772/4487] update from main archive 961203 --- sysdeps/alpha/dl-machine.h | 42 +++++++++++++++---------------- sysdeps/m68k/dl-machine.h | 39 +++++++++++++++-------------- sysdeps/mips/dl-machine.h | 49 +++++++++++++++++++------------------ sysdeps/unix/alpha/sysdep.S | 40 +++++++++--------------------- 4 files changed, 78 insertions(+), 92 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 415549d205..1c71ec8ab2 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -1,22 +1,22 @@ /* Machine-dependent ELF dynamic relocation inline functions. Alpha version. -Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. -Contributed by Richard Henderson . + Copyright (C) 1996 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson . -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If + not, write to the Free Software Foundation, Inc., + 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* This was written in the absence of an ABI -- don't expect it to remain unchanged. */ @@ -37,13 +37,13 @@ elf_machine_matches_host (Elf64_Word e_machine) return e_machine == EM_ALPHA; } -/* Return the run-time address of the _GLOBAL_OFFSET_TABLE_. - Must be inlined in a function which uses global data. */ -static inline Elf64_Addr * -elf_machine_got (void) +/* Return the link-time address of _DYNAMIC. The multiple-got-capable + linker no longer allocates the first .got entry for this. But not to + worry, no special tricks are needed. */ +static inline Elf64_Addr +elf_machine_dynamic (void) { - register Elf64_Addr gp __asm__("$29"); - return (Elf64_Addr *)(gp - 0x8000); + return (Elf64_Addr) &_DYNAMIC; } /* Return the run-time load address of the shared object. */ diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index 8b9872c15a..a4b1edcdd9 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -1,21 +1,21 @@ /* Machine-dependent ELF dynamic relocation inline functions. m68k version. -Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. + Copyright (C) 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If + not, write to the Free Software Foundation, Inc., + 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef dl_machine_h #define dl_machine_h @@ -38,13 +38,14 @@ elf_machine_matches_host (Elf32_Half e_machine) } -/* Return the run-time address of the _GLOBAL_OFFSET_TABLE_. - Must be inlined in a function which uses global data. */ -static inline Elf32_Addr * -elf_machine_got (void) +/* Return the link-time address of _DYNAMIC. Conveniently, this is the + first element of the GOT. This must be inlined in a function which + uses global data. */ +static inline Elf32_Addr +elf_machine_dynamic (void) { register Elf32_Addr *got asm ("%a5"); - return got; + return *got; } diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index c0ac649144..c00afbe549 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -1,22 +1,22 @@ -/* Machine-dependent ELF dynamic relocation inline functions. mips version. -Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. -Contributed by Kazumoto Kojima . - -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 -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ +/* Machine-dependent ELF dynamic relocation inline functions. MIPS version. + Copyright (C) 1996 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Kazumoto Kojima . + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If + not, write to the Free Software Foundation, Inc., + 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define ELF_MACHINE_NAME "MIPS" @@ -67,13 +67,14 @@ elf_mips_got_from_gpreg (ElfW(Addr) gpreg) /* FIXME: the offset of gp from GOT may be system-dependent. */ return (ElfW(Addr) *) (gpreg - 0x7ff0); } -/* Return the run-time address of the _GLOBAL_OFFSET_TABLE_. - Must be inlined in a function which uses global data. */ -static inline ElfW(Addr) * -elf_machine_got (void) +/* Return the link-time address of _DYNAMIC. Conveniently, this is the + first element of the GOT. This must be inlined in a function which + uses global data. */ +static inline ElfW(Addr) +elf_machine_dynamic (void) { register ElfW(Addr) gp asm ("$28"); - return (ElfW(Addr) *) (gp - 0x7ff0); + return * (ElfW(Addr) *) (gp - 0x7ff0); } diff --git a/sysdeps/unix/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S index 08dc3b4851..9df313422c 100644 --- a/sysdeps/unix/alpha/sysdep.S +++ b/sysdeps/unix/alpha/sysdep.S @@ -1,20 +1,20 @@ /* Copyright (C) 1993, 1996 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If + not, write to the Free Software Foundation, Inc., + 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include @@ -63,22 +63,6 @@ __syscall_error: lda sp, 16(sp) ret .end __syscall_error - -/* A default non-threaded version of __errno_location that just returns - the address of errno. */ - - .weak __errno_location - .ent __errno_location -__errno_location: - .frame sp, 0, ra - ldgp gp, 0(t12) - .mask 0, 0 - .prologue 1 - - lda v0, errno - ret - .end __errno_location - #else ENTRY(__syscall_error) From e14797885d53737b04e72b5f94508791d7026207 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 7 Dec 1996 03:30:23 +0000 Subject: [PATCH 0773/4487] update from main archive 961206 --- sysdeps/unix/sysv/linux/alpha/llseek.S | 60 -------------------------- 1 file changed, 60 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/alpha/llseek.S diff --git a/sysdeps/unix/sysv/linux/alpha/llseek.S b/sysdeps/unix/sysv/linux/alpha/llseek.S deleted file mode 100644 index a2e644c161..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/llseek.S +++ /dev/null @@ -1,60 +0,0 @@ -/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David Mosberger , 1995. - - 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 - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* For compatibility only: a "long" is 64 bits on the Alpha, so - llseek() isn't really needed. But there are some programs out - there who may depend on it being around. */ - -#include - - .text -ENTRY(llseek) -#ifdef PROF - ldgp gp, 0(pv) - .set noat - lda AT, _mcount - jsr AT, (AT), _mcount - .set at - .prologue 1 -#else - .prologue 0 -#endif - - sll a1, 32, a1 /* build a 64 bit ofs out of 32 bit operands */ - zap a2, 0xf0, a2 - mov a3, t0 /* save result address */ - bis a2, a1, a1 - - mov a4, a2 /* shift down whence */ - - ldi v0, __NR_lseek - call_pal PAL_callsys - bne a3, error - - stq v0, 0(t0) - ret - -error: -#ifndef PROF - br gp, 1f -1: ldgp gp, 0(gp) -#endif - jmp zero, __syscall_error - - END(llseek) From 7b2ab4933a3966343c3d10c3d69643c739b107dc Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 8 Dec 1996 08:00:59 +0000 Subject: [PATCH 0774/4487] update from main archive 961207 --- sysdeps/unix/sysv/linux/alpha/Dist | 1 - 1 file changed, 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist index d79f1f2970..d898d041a2 100644 --- a/sysdeps/unix/sysv/linux/alpha/Dist +++ b/sysdeps/unix/sysv/linux/alpha/Dist @@ -4,4 +4,3 @@ ioperm.c init-first.h clone.S sys/io.h -llseek.S From c8593c8b664fe77bf3a3e525cfd2ae3a9591dc0b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 11 Dec 1996 01:40:18 +0000 Subject: [PATCH 0775/4487] update from main arcive 961210 --- sysdeps/alpha/memchr.S | 29 ++++++++++++++--------------- sysdeps/alpha/strncmp.S | 8 ++++---- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/sysdeps/alpha/memchr.S b/sysdeps/alpha/memchr.S index ecd26e8d6f..7456735aad 100644 --- a/sysdeps/alpha/memchr.S +++ b/sysdeps/alpha/memchr.S @@ -1,22 +1,21 @@ /* Copyright (C) 1996 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by David Mosberger (davidm@cs.arizona.edu). -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 Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -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 -published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. -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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* Finds characters in a memory area. Optimized for the Alpha architecture: @@ -53,7 +52,6 @@ ENTRY(memchr) ldq_u t0, 0(a0) # load first quadword (a0 may be misaligned) addq a0, a2, t4 and a1, 0xff, a1 # a1 = 00000000000000ch - ldq_u t5, -1(t4) sll a1, 8, t1 # t1 = 000000000000ch00 cmpult a2, 9, t3 or t1, a1, a1 # a1 = 000000000000chch @@ -66,6 +64,7 @@ ENTRY(memchr) beq t3, $first_quad + ldq_u t5, -1(t4) extqh t5, a0, t5 mov a0, v0 or t6, t5, t0 # t0 = quadword starting at a0 diff --git a/sysdeps/alpha/strncmp.S b/sysdeps/alpha/strncmp.S index 682759042f..a6c6c61213 100644 --- a/sysdeps/alpha/strncmp.S +++ b/sysdeps/alpha/strncmp.S @@ -62,8 +62,8 @@ $aligned: ornot t0, t3, t0 # .. e1 : cmpbge zero, t1, t7 # e0 : bits set iff null found beq a2, $eoc # .. e1 : check end of count - unop # : - bne t7, $eos # e1 : + subq a2, 1, a2 # e0 : + bne t7, $eos # .. e1 : /* Aligned compare main loop. On entry to this basic block: @@ -73,8 +73,8 @@ $aligned: $a_loop: xor t0, t1, t2 # e0 : bne t2, $wordcmp # .. e1 (zdb) - ldq_u t1, 0(a1) # e0 : - ldq_u t0, 0(a0) # .. e1 : + ldq_u t1, 8(a1) # e0 : + ldq_u t0, 8(a0) # .. e1 : addq a1, 8, a1 # e0 : addq a0, 8, a0 # .. e1 : cmpbge zero, t1, t7 # e0 : From 1003a96da98a7aca8d6a93bf85e16af66a3d5596 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 18 Dec 1996 03:23:36 +0000 Subject: [PATCH 0776/4487] update from main archive 961217 --- sysdeps/unix/sysv/linux/m68k/Dist | 1 + sysdeps/unix/sysv/linux/m68k/Makefile | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/sysdeps/unix/sysv/linux/m68k/Dist b/sysdeps/unix/sysv/linux/m68k/Dist index 738b9cc542..e7d5949d51 100644 --- a/sysdeps/unix/sysv/linux/m68k/Dist +++ b/sysdeps/unix/sysv/linux/m68k/Dist @@ -1 +1,2 @@ clone.S +mremap.S diff --git a/sysdeps/unix/sysv/linux/m68k/Makefile b/sysdeps/unix/sysv/linux/m68k/Makefile index bdbd1057c4..12e95f11bf 100644 --- a/sysdeps/unix/sysv/linux/m68k/Makefile +++ b/sysdeps/unix/sysv/linux/m68k/Makefile @@ -1,3 +1,7 @@ # Linux/m68k uses Motorola asm syntax and the ELF format. m68k-syntax-flag = -DMOTOROLA_SYNTAX + +ifeq ($(subdir),misc) +sysdep_routines += mremap +endif From 910e2e14fc7b04dab343ce2d9b43c4f275925fbb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 20 Dec 1996 01:35:29 +0000 Subject: [PATCH 0777/4487] Update from main archive 961219 --- sysdeps/alpha/dl-machine.h | 2 +- sysdeps/alpha/elf/crtbegin.S | 2 +- sysdeps/alpha/strrchr.S | 2 +- sysdeps/m68k/lshift.S | 2 +- sysdeps/m68k/rshift.S | 4 +- sysdeps/mips/dl-machine.h | 10 +-- sysdeps/standalone/i960/i960ca.h | 85 +++++++++---------- .../standalone/m68k/m68020/mvme136/console.c | 56 ++++++------ sysdeps/unix/bsd/osf/sigaction.h | 27 +++--- sysdeps/unix/sysv/linux/m68k/mremap.S | 29 +++++++ sysdeps/vax/memchr.s | 2 +- sysdeps/vax/strchr.s | 4 +- sysdeps/vax/strncmp.s | 4 +- sysdeps/vax/strrchr.s | 2 +- 14 files changed, 130 insertions(+), 101 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/m68k/mremap.S diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 1c71ec8ab2..78c5071b4e 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -211,7 +211,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy) stq $2, 0($sp) /* Load _dl_default_scope[2] into s1 to pass to _dl_init_next. */ 0: ldq $10, _dl_default_scope+16 - /* Call _dl_init_next to return the address of an initalizer + /* Call _dl_init_next to return the address of an initializer function to run. */ 1: mov $10, $16 jsr $26, _dl_init_next diff --git a/sysdeps/alpha/elf/crtbegin.S b/sysdeps/alpha/elf/crtbegin.S index f75673e35f..e6147c2ec3 100644 --- a/sysdeps/alpha/elf/crtbegin.S +++ b/sysdeps/alpha/elf/crtbegin.S @@ -55,7 +55,7 @@ __DTOR_LIST__: jsr $26,__do_global_dtors_aux /* Must match the alignment we got from crti.o else we get - zero-filled holes in our _fini function and thense SIGILL. */ + zero-filled holes in our _fini function and then SIGILL. */ .align 3 /* diff --git a/sysdeps/alpha/strrchr.S b/sysdeps/alpha/strrchr.S index 02f37f50be..d3099cc599 100644 --- a/sysdeps/alpha/strrchr.S +++ b/sysdeps/alpha/strrchr.S @@ -17,7 +17,7 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* Return the address of the last occurrance of a given character +/* Return the address of the last occurrence of a given character within a null-terminated string, or null if it is not found. This is generally scheduled for the EV5 (got to look out for my own diff --git a/sysdeps/m68k/lshift.S b/sysdeps/m68k/lshift.S index 77184d6ee5..dc2da206d1 100644 --- a/sysdeps/m68k/lshift.S +++ b/sysdeps/m68k/lshift.S @@ -118,7 +118,7 @@ L(Lend:) rts /* We loop from least significant end of the arrays, which is only - permissable if the source and destination don't overlap, since the + permissible if the source and destination don't overlap, since the function is documented to work for overlapping source and destination. */ L(Lspecial:) diff --git a/sysdeps/m68k/rshift.S b/sysdeps/m68k/rshift.S index 01dde0ab50..f529390cf8 100644 --- a/sysdeps/m68k/rshift.S +++ b/sysdeps/m68k/rshift.S @@ -71,7 +71,7 @@ L(Lnormal:) movel MEM_POSTINC(s_ptr),R(d2) movel R(d2),R(d0) lsll R(d5),R(d0) /* compute carry limb */ - + lsrl R(cnt),R(d2) movel R(d2),R(d1) subql #1,R(s_size) @@ -107,7 +107,7 @@ L(Lend:) rts /* We loop from most significant end of the arrays, which is only - permissable if the source and destination don't overlap, since the + permissible if the source and destination don't overlap, since the function is documented to work for overlapping source and destination. */ L(Lspecial:) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index c00afbe549..9e80426ee3 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -14,9 +14,9 @@ Library General Public License for more details. You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If - not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #define ELF_MACHINE_NAME "MIPS" @@ -27,12 +27,12 @@ #include #include -/* DT_MIPS macro ranslate a processor specific dynamic tag to the index +/* Translate a processor specific dynamic tag to the index in l_info array. */ #define DT_MIPS(x) (DT_MIPS_##x - DT_LOPROC + DT_NUM) #if 1 -/* XXX If FLAGS has the MAP_ALIGN bit, we need 64k alignement. */ +/* XXX If FLAGS has the MAP_ALIGN bit, we need 64k alignment. */ #ifndef MAP_ALIGN #define MAP_ALIGN 0x1000 #endif diff --git a/sysdeps/standalone/i960/i960ca.h b/sysdeps/standalone/i960/i960ca.h index 21012b4ccc..ba8db2b985 100644 --- a/sysdeps/standalone/i960/i960ca.h +++ b/sysdeps/standalone/i960/i960ca.h @@ -1,29 +1,28 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1996 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), - On-Line Applications Research Corporation. - -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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + On-Line Applications Research Corporation. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* i960ca.h * - * This file contains macros which are used to access i80960CA + * This file contains macros which are used to access i80960CA * registers which are not addressable by C. The functions - * in this file sould be useful to the developer of target + * in this file should be useful to the developer of target * specific code. */ @@ -37,22 +36,22 @@ typedef unsigned int unsigned32; /* * Intel i80960CA Processor Control Block */ - + struct i80960ca_prcb { - unsigned32 *fault_tbl; /* fault table base address */ + unsigned32 *fault_tbl; /* fault table base address */ struct i80960ca_ctltbl *control_tbl; /* control table base address */ unsigned32 initial_ac; /* AC register initial value */ - unsigned32 fault_config; /* fault configuration word */ + unsigned32 fault_config; /* fault configuration word */ void *intr_tbl; /* interrupt table base address */ - void *sys_proc_tbl; /* system procedure table */ - /* base address */ - unsigned32 reserved; /* reserved */ - unsigned32 *intr_stack; /* interrupt stack pointer */ - unsigned32 ins_cache_cfg; /* instruction cache */ - /* configuration word */ - unsigned32 reg_cache_cfg; /* register cache */ - /* configuration word */ + void *sys_proc_tbl; /* system procedure table */ + /* base address */ + unsigned32 reserved; /* reserved */ + unsigned32 *intr_stack; /* interrupt stack pointer */ + unsigned32 ins_cache_cfg; /* instruction cache */ + /* configuration word */ + unsigned32 reg_cache_cfg; /* register cache */ + /* configuration word */ }; /* @@ -128,7 +127,7 @@ struct i80960ca_ctltbl { : "0" (_addr), "1" (_mask) ); \ (prev) = _mask; \ } - + #define delay( microseconds ) \ { register unsigned32 _delay=(microseconds); \ register unsigned32 _tmp; \ @@ -185,22 +184,22 @@ struct i80960ca_ctltbl { : "0" (_cmd), "1" (_next), "2" (_prcb) ); \ } -static inline unsigned32 pend_intrs() -{ register unsigned32 _intr=0; - asm volatile( "mov sf0,%0" : "=d" (_intr) : "0" (_intr) ); - return ( _intr ); +static inline unsigned32 pend_intrs() +{ register unsigned32 _intr=0; + asm volatile( "mov sf0,%0" : "=d" (_intr) : "0" (_intr) ); + return ( _intr ); } -static inline unsigned32 mask_intrs() +static inline unsigned32 mask_intrs() { register unsigned32 _intr=0; - asm volatile( "mov sf1,%0" : "=d" (_intr) : "0" (_intr) ); + asm volatile( "mov sf1,%0" : "=d" (_intr) : "0" (_intr) ); return( _intr ); } -static inline unsigned32 get_fp() -{ register unsigned32 _fp=0; - asm volatile( "mov fp,%0" : "=d" (_fp) : "0" (_fp) ); - return ( _fp ); +static inline unsigned32 get_fp() +{ register unsigned32 _fp=0; + asm volatile( "mov fp,%0" : "=d" (_fp) : "0" (_fp) ); + return ( _fp ); } #endif diff --git a/sysdeps/standalone/m68k/m68020/mvme136/console.c b/sysdeps/standalone/m68k/m68020/mvme136/console.c index 159070bab9..cafb1abfe7 100644 --- a/sysdeps/standalone/m68k/m68020/mvme136/console.c +++ b/sysdeps/standalone/m68k/m68020/mvme136/console.c @@ -1,34 +1,32 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1996 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), - On-Line Applications Research Corporation. - -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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include + On-Line Applications Research Corporation. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + #include #include "m68020.h" /* Console IO routines for a Motorola MVME135/MVME136 board. - + They currently use the B port. It should be possible to use the A port by filling in the reset of the chip structure, adding an ifdef for PORTA/PORTB, and switching the addresses, -and maybe the macroes based on the macro. */ +and maybe the macros based on the macro. */ /* M68681 DUART chip register structures and constants */ @@ -69,14 +67,15 @@ XON/XOFF flow control. */ #define XOFF 0x13 /* control-S */ int -DEFUN( _Console_Putc, (ch), char ch ) +_Console_Putc (ch) + char ch; { while ( ! (RD_M68681->srb & TXRDYB) ) ; while ( RD_M68681->srb & RXRDYB ) /* must be an XOFF */ - if ( RD_M68681->rbb == XOFF ) + if ( RD_M68681->rbb == XOFF ) do { while ( ! (RD_M68681->srb & RXRDYB) ) ; - } while ( RD_M68681->rbb != XON ); + } while ( RD_M68681->rbb != XON ); WR_M68681->tbb = ch; return( 0 ); @@ -87,10 +86,11 @@ DEFUN( _Console_Putc, (ch), char ch ) This routine reads a character from the UART and returns it. */ int -DEFUN( _Console_Getc, (poll), int poll ) +_Console_Getc (poll) + int poll; { if ( poll ) { - if ( !(RD_M68681->srb & RXRDYB) ) + if ( !(RD_M68681->srb & RXRDYB) ) return -1; else return RD_M68681->rbb; diff --git a/sysdeps/unix/bsd/osf/sigaction.h b/sysdeps/unix/bsd/osf/sigaction.h index d809b6bd74..df400d4aaa 100644 --- a/sysdeps/unix/bsd/osf/sigaction.h +++ b/sysdeps/unix/bsd/osf/sigaction.h @@ -1,21 +1,22 @@ -/* Structure and constand definitions for sigaction et al. OSF/1 version. +/* Structure and constant definitions for sigaction et al. OSF/1 version. Copyright (C) 1993, 1996 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* Structure describing the action to be taken when a signal arrives. */ struct sigaction diff --git a/sysdeps/unix/sysv/linux/m68k/mremap.S b/sysdeps/unix/sysv/linux/m68k/mremap.S new file mode 100644 index 0000000000..2fec9aab7b --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/mremap.S @@ -0,0 +1,29 @@ +/* Copyright (C) 1996 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +/* The mremap system call is special because it needs to return + its value in register %a0. */ + + .text +PSEUDO (__mremap, mremap, 4) + move.l %d0, %a0 + rts +PSEUDO_END (__mremap) +weak_alias (__mremap, mremap) diff --git a/sysdeps/vax/memchr.s b/sysdeps/vax/memchr.s index c7793fb5f8..b81c2bcf87 100644 --- a/sysdeps/vax/memchr.s +++ b/sysdeps/vax/memchr.s @@ -36,7 +36,7 @@ #endif /* LIBC_SCCS and not lint */ /* - * Find the first occurence of c in the memory at cp (length n). + * Find the first occurrence of c in the memory at cp (length n). * Return pointer to match or null pointer. * * This code optimises the usual case (0 < n < 65535). diff --git a/sysdeps/vax/strchr.s b/sysdeps/vax/strchr.s index 1683f564e2..70025cce6e 100644 --- a/sysdeps/vax/strchr.s +++ b/sysdeps/vax/strchr.s @@ -36,7 +36,7 @@ #endif /* LIBC_SCCS and not lint */ /* - * Find the first occurence of c in the string cp. + * Find the first occurrence of c in the string cp. * Return pointer to match or null pointer. * * char * @@ -58,7 +58,7 @@ ENTRY(strchr, 0) */ movab tbl,r3 /* r3 = base of table */ bbss $0,(r3),Lreent /* ensure not reentering */ - movab (r3)[r2],r5 + movab (r3)[r2],r5 incb (r5) /* mark both '\0' and c */ 0: scanc r4,(r1),(r3),$1 /* look for c or '\0' */ diff --git a/sysdeps/vax/strncmp.s b/sysdeps/vax/strncmp.s index e5bfcf2a73..0758bd8729 100644 --- a/sysdeps/vax/strncmp.s +++ b/sysdeps/vax/strncmp.s @@ -53,14 +53,14 @@ ENTRY(strncmp, 0) movl 4(ap),r1 # r1 = s1 movq 8(ap),r3 # r3 = s2; r4 = n 1: - clrl r5 # calculate min bytes to next page boundry + clrl r5 # calculate min bytes to next page boundary subb3 r1,$255,r5 # r5 = (bytes - 1) to end of page for s1 subb3 r3,$255,r0 # r0 = (bytes - 1) to end of page for s2 cmpb r0,r5 # r5 = min(r0, r5); bgtru 2f movb r0,r5 2: - incl r5 # r5 = min bytes to next page boundry + incl r5 # r5 = min bytes to next page boundary cmpl r4,r5 # r5 = min(n, r5); bgeq 3f movl r4,r5 diff --git a/sysdeps/vax/strrchr.s b/sysdeps/vax/strrchr.s index dffcddaef0..87313445c9 100644 --- a/sysdeps/vax/strrchr.s +++ b/sysdeps/vax/strrchr.s @@ -36,7 +36,7 @@ #endif /* LIBC_SCCS and not lint */ /* - * Find the last occurence of c in the string cp. + * Find the last occurrence of c in the string cp. * Return pointer to match or null pointer. * * char * From e7cc1b16ba56463b8d738ecf0e201f72af9b82d8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Dec 1996 04:13:47 +0000 Subject: [PATCH 0778/4487] update from main archive 961220 --- sysdeps/unix/sysv/linux/alpha/timebits.h | 17 +++-- sysdeps/unix/sysv/linux/m68k/setjmp.c | 83 ++++++++++++++++++++++++ 2 files changed, 96 insertions(+), 4 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/m68k/setjmp.c diff --git a/sysdeps/unix/sysv/linux/alpha/timebits.h b/sysdeps/unix/sysv/linux/alpha/timebits.h index f777dc2aa8..1ad0df8c5b 100644 --- a/sysdeps/unix/sysv/linux/alpha/timebits.h +++ b/sysdeps/unix/sysv/linux/alpha/timebits.h @@ -33,9 +33,18 @@ struct timeval #ifndef _TIMEBITS_H -#define _TIMEBITS_H 1 - -#include -#define CLOCKS_PER_SEC HZ /* XXX names not kosher */ +# define _TIMEBITS_H 1 + +/* ISO/IEC 9899:1990 7.12.1: + The macro `CLOCKS_PER_SEC' is the number per second of the value + returned by the `clock' function. */ +/* CAE XSH, Issue 4, Version 2: + The value of CLOCKS_PER_SEC is required to be 1 million on all + XSI-conformant systems. */ +# define CLOCKS_PER_SEC 1000000 + +/* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK + presents the real value for clock ticks per second for the system. */ +# define CLK_TCK 1024 #endif /* timebits.h */ diff --git a/sysdeps/unix/sysv/linux/m68k/setjmp.c b/sysdeps/unix/sysv/linux/m68k/setjmp.c new file mode 100644 index 0000000000..ef609cc7ab --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/setjmp.c @@ -0,0 +1,83 @@ +/* Copyright (C) 1991, 1992, 1994, 1996 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +/* Save the current program position in ENV and return 0. */ +int +__sigsetjmp (jmp_buf env, int savemask) +{ + /* Save data registers D1 through D7. */ + asm volatile ("movem%.l %/d1-%/d7, %0" + : : "m" (env[0].__jmpbuf[0].__dregs[0])); + + /* Save return address in place of register A0. */ + env[0].__jmpbuf[0].__aregs[0] = ((void **) &env)[-1]; + + /* Save address registers A1 through A5. */ + asm volatile ("movem%.l %/a1-%/a5, %0" + : : "m" (env[0].__jmpbuf[0].__aregs[1])); + + /* Save caller's FP, not our own. */ + env[0].__jmpbuf[0].__fp = ((void **) &env)[-2]; + + /* Save caller's SP, not our own. */ + env[0].__jmpbuf[0].__sp = (void *) &env; + +#if defined (__HAVE_68881__) || defined (__HAVE_FPU__) + /* Save floating-point (68881) registers FP0 through FP7. */ + asm volatile ("fmovem%.x %/fp0-%/fp7, %0" + : : "m" (env[0].__jmpbuf[0].__fpregs[0])); +#endif + + /* Save the signal mask if requested. */ + return __sigjmp_save (env, savemask); +} + +/* Binary compatibility entry point. */ +int +__setjmp (jmp_buf env) +{ + /* Save data registers D1 through D7. */ + asm volatile ("movem%.l %/d1-%/d7, %0" + : : "m" (env[0].__jmpbuf[0].__dregs[0])); + + /* Save return address in place of register A0. */ + env[0].__jmpbuf[0].__aregs[0] = ((void **) &env)[-1]; + + /* Save address registers A1 through A5. */ + asm volatile ("movem%.l %/a1-%/a5, %0" + : : "m" (env[0].__jmpbuf[0].__aregs[1])); + + /* Save caller's FP, not our own. */ + env[0].__jmpbuf[0].__fp = ((void **) &env)[-2]; + + /* Save caller's SP, not our own. */ + env[0].__jmpbuf[0].__sp = (void *) &env; + +#if defined (__HAVE_68881__) || defined (__HAVE_FPU__) + /* Save floating-point (68881) registers FP0 through FP7. */ + asm volatile ("fmovem%.x %/fp0-%/fp7, %0" + : : "m" (env[0].__jmpbuf[0].__fpregs[0])); +#endif + + /* Don't save the signal mask. */ + env[0].__mask_was_saved = 0; + + return 0; +} From a53dd14b978f645abf689cd21f67c83c0c91560a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 30 Dec 1996 01:47:43 +0000 Subject: [PATCH 0779/4487] update from main archive 961229 --- sysdeps/unix/sysv/linux/m68k/setjmp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/m68k/setjmp.c b/sysdeps/unix/sysv/linux/m68k/setjmp.c index ef609cc7ab..477e8960c6 100644 --- a/sysdeps/unix/sysv/linux/m68k/setjmp.c +++ b/sysdeps/unix/sysv/linux/m68k/setjmp.c @@ -76,8 +76,6 @@ __setjmp (jmp_buf env) : : "m" (env[0].__jmpbuf[0].__fpregs[0])); #endif - /* Don't save the signal mask. */ - env[0].__mask_was_saved = 0; - + /* The signal mask has already been dealt with. */ return 0; } From 2c85dda1da06510af3992ca7511c3b03a4f5a2ec Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 1 Jan 1997 15:27:53 +0000 Subject: [PATCH 0780/4487] update from main archive 970101 --- sysdeps/m68k/Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile index a5e9064767..dc502912bf 100644 --- a/sysdeps/m68k/Makefile +++ b/sysdeps/m68k/Makefile @@ -12,9 +12,9 @@ # Library General Public License for more details. # You should have received a copy of the GNU Library General Public -# License along with the GNU C Library; see the file COPYING.LIB. If -# not, write to the Free Software Foundation, Inc., 675 Mass Ave, -# Cambridge, MA 02139, USA. +# License along with the GNU C Library; see the file COPYING.LIB. If not, +# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. # The mpn functions need this. All existing 68k ports use MIT syntax. If # a new port wants to use Motorola or Sony syntax, it can redefine this @@ -30,3 +30,7 @@ CFLAGS-setjmp.c := -fno-omit-frame-pointer # The 68k `long double' is a distinct type we support. long-double-fcts = yes + +ifeq ($(subdir),elf) +CFLAGS-rtld.c += -Wno-uninitialized +endif From d5726ef319be923e8bc851ca137cd03309f29072 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 2 Jan 1997 18:38:59 +0000 Subject: [PATCH 0781/4487] Instruction to abort any process --- sysdeps/m68k/abort-instr.h | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sysdeps/m68k/abort-instr.h diff --git a/sysdeps/m68k/abort-instr.h b/sysdeps/m68k/abort-instr.h new file mode 100644 index 0000000000..b43c9efe1d --- /dev/null +++ b/sysdeps/m68k/abort-instr.h @@ -0,0 +1,2 @@ +/* An instruction which should crash any program is `illegal'. */ +#define ABORT_INSTRUCTION asm ("illegal") From a91492b86e028dfb38fab3caff3d81f86ae245c2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 6 Jan 1997 22:07:18 +0000 Subject: [PATCH 0782/4487] update from main archive 960105 --- sysdeps/alpha/dl-machine.h | 13 +- sysdeps/unix/bsd/sun/sunos4/tcsetattr.c | 29 ++- sysdeps/unix/sysv/i386/sigreturn.S | 28 +-- sysdeps/unix/sysv/linux/alpha/Dist | 2 + sysdeps/unix/sysv/linux/alpha/gnu/types.h | 89 +++++++++ sysdeps/unix/sysv/linux/alpha/ioctl-types.h | 123 ++++++++++++ .../unix/sysv/linux/alpha/kernel_termios.h | 18 ++ sysdeps/unix/sysv/linux/alpha/sys/acct.h | 66 ++++++ sysdeps/unix/sysv/linux/alpha/termbits.h | 188 ++++++++++++++++++ sysdeps/unix/sysv/linux/alpha/ustat.c | 32 +++ sysdeps/unix/sysv/linux/alpha/xmknod.c | 46 +++++ .../unix/sysv/sco3.2.4/{ => sys}/syscall.h | 0 12 files changed, 601 insertions(+), 33 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/alpha/gnu/types.h create mode 100644 sysdeps/unix/sysv/linux/alpha/ioctl-types.h create mode 100644 sysdeps/unix/sysv/linux/alpha/kernel_termios.h create mode 100644 sysdeps/unix/sysv/linux/alpha/sys/acct.h create mode 100644 sysdeps/unix/sysv/linux/alpha/termbits.h create mode 100644 sysdeps/unix/sysv/linux/alpha/ustat.c create mode 100644 sysdeps/unix/sysv/linux/alpha/xmknod.c rename sysdeps/unix/sysv/sco3.2.4/{ => sys}/syscall.h (100%) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 78c5071b4e..1d01f035ea 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. Alpha version. - Copyright (C) 1996 Free Software Foundation, Inc. + Copyright (C) 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson . @@ -14,9 +14,9 @@ Library General Public License for more details. You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If - not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* This was written in the absence of an ABI -- don't expect it to remain unchanged. */ @@ -43,7 +43,12 @@ elf_machine_matches_host (Elf64_Word e_machine) static inline Elf64_Addr elf_machine_dynamic (void) { +#ifdef AXP_MULTI_GOT_LD return (Elf64_Addr) &_DYNAMIC; +#else + register Elf64_Addr *gp __asm__ ("$29"); + return gp[-4096]; +#endif } /* Return the run-time load address of the shared object. */ diff --git a/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c b/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c index f825d41ab8..da30f7b4c2 100644 --- a/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c +++ b/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c @@ -1,23 +1,22 @@ -/* Copyright (C) 1993, 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1993, 1996, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include -#include #include #include diff --git a/sysdeps/unix/sysv/i386/sigreturn.S b/sysdeps/unix/sysv/i386/sigreturn.S index be1c6b89bf..8477bbd075 100644 --- a/sysdeps/unix/sysv/i386/sigreturn.S +++ b/sysdeps/unix/sysv/i386/sigreturn.S @@ -1,20 +1,20 @@ -/* Copyright (C) 1994, 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1994, 1995, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist index d898d041a2..a15f181ff6 100644 --- a/sysdeps/unix/sysv/linux/alpha/Dist +++ b/sysdeps/unix/sysv/linux/alpha/Dist @@ -4,3 +4,5 @@ ioperm.c init-first.h clone.S sys/io.h +kernel_termios.h +sys/acct.h diff --git a/sysdeps/unix/sysv/linux/alpha/gnu/types.h b/sysdeps/unix/sysv/linux/alpha/gnu/types.h new file mode 100644 index 0000000000..5c1e407423 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/gnu/types.h @@ -0,0 +1,89 @@ +/* Copyright (C) 1991, 92, 94, 95, 96, 97 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _GNU_TYPES_H +#define _GNU_TYPES_H 1 + +#include + +/* Convenience types. */ +typedef unsigned char __u_char; +typedef unsigned short __u_short; +typedef unsigned int __u_int; +typedef unsigned long __u_long; +#ifdef __GNUC__ +typedef unsigned long long int __u_quad_t; +typedef long long int __quad_t; +#else +typedef struct + { + long int __val[2]; + } __quad_t; +typedef struct + { + __u_long __val[2]; + } __u_quad_t; +#endif +typedef __quad_t *__qaddr_t; + +typedef __u_long __dev_t; /* Type of device numbers. */ +typedef __u_int __uid_t; /* Type of user identifications. */ +typedef __u_int __gid_t; /* Type of group identifications. */ +typedef __u_int __ino_t; /* Type of file serial numbers. */ +typedef __u_int __mode_t; /* Type of file attribute bitmasks. */ +typedef __u_int __nlink_t; /* Type of file link counts. */ +typedef long int __off_t; /* Type of file sizes and offsets. */ +typedef __quad_t __loff_t; /* Type of file sizes and offsets. */ +typedef int __pid_t; /* Type of process identifications. */ +typedef long int __ssize_t; /* Type of a byte count, or error. */ + +typedef struct + { + int __val[2]; + } __fsid_t; /* Type of file system IDs. */ + +/* Everythin' else. */ +typedef int __daddr_t; /* The type of a disk address. */ +typedef char *__caddr_t; +typedef long int __time_t; +typedef long int __swblk_t; /* Type of a swap block maybe? */ + +typedef long int __clock_t; + +/* One element in the file descriptor mask array. */ +typedef unsigned int __fd_mask; + +/* Number of descriptors that can fit in an `fd_set'. */ +#define __FD_SETSIZE 1024 + +/* It's easier to assume 8-bit bytes than to get CHAR_BIT. */ +#define __NFDBITS (8 * sizeof (__fd_mask)) +#define __FDELT(d) ((d) / __NFDBITS) +#define __FDMASK(d) (1 << ((d) % __NFDBITS)) + +/* fd_set for select and pselect. */ +typedef struct + { + /* XPG4.2 requires this member name. */ + __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS]; + } __fd_set; + + +typedef int __key_t; + +#endif /* gnu/types.h */ diff --git a/sysdeps/unix/sysv/linux/alpha/ioctl-types.h b/sysdeps/unix/sysv/linux/alpha/ioctl-types.h new file mode 100644 index 0000000000..c51310f4cd --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/ioctl-types.h @@ -0,0 +1,123 @@ +/* Structure types for pre-termios terminal ioctls. Linux version. + Copyright (C) 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _IOCTL_TYPES_H +#define _IOCTL_TYPES_H 1 + +/* Get definition of constants for use with `ioctl'. */ +#include + + +#define FIOCLEX _IO('f', 1) +#define FIONCLEX _IO('f', 2) +#define FIOASYNC _IOW('f', 125, int) +#define FIONBIO _IOW('f', 126, int) +#define FIONREAD _IOR('f', 127, int) +#define TIOCINQ FIONREAD + +#define TIOCGETP _IOR('t', 8, struct sgttyb) +#define TIOCSETP _IOW('t', 9, struct sgttyb) +#define TIOCSETN _IOW('t', 10, struct sgttyb) /* TIOCSETP wo flush */ + +#define TIOCSETC _IOW('t', 17, struct tchars) +#define TIOCGETC _IOR('t', 18, struct tchars) +#define TCGETS _IOR('t', 19, struct termios) +#define TCSETS _IOW('t', 20, struct termios) +#define TCSETSW _IOW('t', 21, struct termios) +#define TCSETSF _IOW('t', 22, struct termios) + +#define TCGETA _IOR('t', 23, struct termio) +#define TCSETA _IOW('t', 24, struct termio) +#define TCSETAW _IOW('t', 25, struct termio) +#define TCSETAF _IOW('t', 28, struct termio) + +#define TCSBRK _IO('t', 29) +#define TCXONC _IO('t', 30) +#define TCFLSH _IO('t', 31) + +#define TIOCSWINSZ _IOW('t', 103, struct winsize) +#define TIOCGWINSZ _IOR('t', 104, struct winsize) +#define TIOCSTART _IO('t', 110) /* start output, like ^Q */ +#define TIOCSTOP _IO('t', 111) /* stop output, like ^S */ +#define TIOCOUTQ _IOR('t', 115, int) /* output queue size */ + +#define TIOCGLTC _IOR('t', 116, struct ltchars) +#define TIOCSLTC _IOW('t', 117, struct ltchars) +#define TIOCSPGRP _IOW('t', 118, int) +#define TIOCGPGRP _IOR('t', 119, int) + +#define TIOCEXCL 0x540C +#define TIOCNXCL 0x540D +#define TIOCSCTTY 0x540E + +#define TIOCSTI 0x5412 +#define TIOCMGET 0x5415 +#define TIOCMBIS 0x5416 +#define TIOCMBIC 0x5417 +#define TIOCMSET 0x5418 +# define TIOCM_LE 0x001 +# define TIOCM_DTR 0x002 +# define TIOCM_RTS 0x004 +# define TIOCM_ST 0x008 +# define TIOCM_SR 0x010 +# define TIOCM_CTS 0x020 +# define TIOCM_CAR 0x040 +# define TIOCM_RNG 0x080 +# define TIOCM_DSR 0x100 +# define TIOCM_CD TIOCM_CAR +# define TIOCM_RI TIOCM_RNG + +#define TIOCGSOFTCAR 0x5419 +#define TIOCSSOFTCAR 0x541A +#define TIOCLINUX 0x541C +#define TIOCCONS 0x541D +#define TIOCGSERIAL 0x541E +#define TIOCSSERIAL 0x541F +#define TIOCPKT 0x5420 +# define TIOCPKT_DATA 0 +# define TIOCPKT_FLUSHREAD 1 +# define TIOCPKT_FLUSHWRITE 2 +# define TIOCPKT_STOP 4 +# define TIOCPKT_START 8 +# define TIOCPKT_NOSTOP 16 +# define TIOCPKT_DOSTOP 32 + + +#define TIOCNOTTY 0x5422 +#define TIOCSETD 0x5423 +#define TIOCGETD 0x5424 +#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ +#define TIOCTTYGSTRUCT 0x5426 /* For debugging only */ + +#define TIOCSERCONFIG 0x5453 +#define TIOCSERGWILD 0x5454 +#define TIOCSERSWILD 0x5455 +#define TIOCGLCKTRMIOS 0x5456 +#define TIOCSLCKTRMIOS 0x5457 +#define TIOCSERGSTRUCT 0x5458 /* For debugging only */ +#define TIOCSERGETLSR 0x5459 /* Get line status register */ + /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ +# define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ +#define TIOCSERGETMULTI 0x545A /* Get multiport config */ +#define TIOCSERSETMULTI 0x545B /* Set multiport config */ + +#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */ +#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ + +#endif /* ioctl-types.h */ diff --git a/sysdeps/unix/sysv/linux/alpha/kernel_termios.h b/sysdeps/unix/sysv/linux/alpha/kernel_termios.h new file mode 100644 index 0000000000..cb030e4de4 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/kernel_termios.h @@ -0,0 +1,18 @@ +/* The following corresponds to the values from the Linux 2.1.20 kernel. */ + +#define KERNEL_NCCS 19 + +struct kernel_termios + { + tcflag_t c_iflag; /* input mode flags */ + tcflag_t c_oflag; /* output mode flags */ + tcflag_t c_cflag; /* control mode flags */ + tcflag_t c_lflag; /* local mode flags */ + cc_t c_cc[KERNEL_NCCS]; /* control characters */ + cc_t c_line; /* line discipline */ + speed_t c_ispeed; /* input speed */ + speed_t c_ospeed; /* output speed */ + }; + +#define _HAVE_C_ISPEED 1 +#define _HAVE_C_OSPEED 1 diff --git a/sysdeps/unix/sysv/linux/alpha/sys/acct.h b/sysdeps/unix/sysv/linux/alpha/sys/acct.h new file mode 100644 index 0000000000..6dda5f4922 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/sys/acct.h @@ -0,0 +1,66 @@ +/* Copyright (C) 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_ACCT_H + +#define _SYS_ACCT_H 1 +#include + +#define __need_time_t +#include + + +__BEGIN_DECLS + +#define ACCT_COMM 16 + +struct acct + { + char ac_comm[ACCT_COMM]; /* Accounting command name. */ + time_t ac_utime; /* Accounting user time. */ + time_t ac_stime; /* Accounting system time. */ + time_t ac_etime; /* Accounting elapsed time. */ + time_t ac_btime; /* Beginning time. */ + unsigned int ac_uid; /* Accounting user ID. */ + unsigned int ac_gid; /* Accounting group ID. */ + unsigned int ac_tty; /* Controlling tty. */ + /* Please note that the value of the `ac_tty' field, a device number, + is encoded differently in the kernel and for the libc dev_t type. */ + char ac_flag; /* Accounting flag. */ + long int ac_minflt; /* Accounting minor pagefaults. */ + long int ac_majflt; /* Accounting major pagefaults. */ + long int ac_exitcode; /* Accounting process exitcode. */ + }; + +enum + { + AFORK = 0001, /* Has executed fork, but no exec. */ + ASU = 0002, /* Used super-user privileges. */ + ACORE = 0004, /* Dumped core. */ + AXSIG = 0010 /* Killed by a signal. */ + }; + +#define AHZ 100 + + +/* Switch process accounting on and off. */ +extern int acct __P ((__const char *__filename)); + +__END_DECLS + +#endif /* sys/acct.h */ diff --git a/sysdeps/unix/sysv/linux/alpha/termbits.h b/sysdeps/unix/sysv/linux/alpha/termbits.h new file mode 100644 index 0000000000..6cb729f7f8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/termbits.h @@ -0,0 +1,188 @@ +/* termios type and macro definitions. Linux version. + Copyright (C) 1993, 1994, 1995, 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +typedef unsigned char cc_t; +typedef unsigned int speed_t; +typedef unsigned int tcflag_t; + +#define NCCS 32 +struct termios + { + tcflag_t c_iflag; /* input mode flags */ + tcflag_t c_oflag; /* output mode flags */ + tcflag_t c_cflag; /* control mode flags */ + tcflag_t c_lflag; /* local mode flags */ + cc_t c_cc[NCCS]; /* control characters */ + cc_t c_line; /* line discipline (== c_cc[19]) */ + speed_t c_ispeed; /* input speed */ + speed_t c_ospeed; /* output speed */ + }; + +/* c_cc characters */ +#define VEOF 0 +#define VEOL 1 +#define VEOL2 2 +#define VERASE 3 +#define VWERASE 4 +#define VKILL 5 +#define VREPRINT 6 +#define VSWTC 7 +#define VINTR 8 +#define VQUIT 9 +#define VSUSP 10 +#define VSTART 12 +#define VSTOP 13 +#define VLNEXT 14 +#define VDISCARD 15 +#define VMIN 16 +#define VTIME 17 + +/* c_iflag bits */ +#define IGNBRK 0000001 +#define BRKINT 0000002 +#define IGNPAR 0000004 +#define PARMRK 0000010 +#define INPCK 0000020 +#define ISTRIP 0000040 +#define INLCR 0000100 +#define IGNCR 0000200 +#define ICRNL 0000400 +#define IXON 0001000 +#define IXOFF 0002000 +#ifdef __USE_BSD + /* POSIX.1 doesn't want these... */ +# define IXANY 0004000 +# define IUCLC 0010000 +# define IMAXBEL 0020000 +#endif + +/* c_oflag bits */ +#define OPOST 0000001 +#define ONLCR 0000002 +#define OLCUC 0000004 + +#define OCRNL 0000010 +#define ONOCR 0000020 +#define ONLRET 0000040 + +#define OFILL 00000100 +#define OFDEL 00000200 +#define NLDLY 00001400 +#define NL0 00000000 +#define NL1 00000400 +#define NL2 00001000 +#define NL3 00001400 +#define TABDLY 00006000 +#define TAB0 00000000 +#define TAB1 00002000 +#define TAB2 00004000 +#define TAB3 00006000 +#define CRDLY 00030000 +#define CR0 00000000 +#define CR1 00010000 +#define CR2 00020000 +#define CR3 00030000 +#define FFDLY 00040000 +#define FF0 00000000 +#define FF1 00040000 +#define BSDLY 00100000 +#define BS0 00000000 +#define BS1 00100000 +#define VTDLY 00200000 +#define VT0 00000000 +#define VT1 00200000 +#define XTABS 01000000 /* Hmm.. Linux/i386 considers this part of TABDLY.. */ + +/* c_cflag bit meaning */ +#define CBAUD 0000037 +#define B0 0000000 /* hang up */ +#define B50 0000001 +#define B75 0000002 +#define B110 0000003 +#define B134 0000004 +#define B150 0000005 +#define B200 0000006 +#define B300 0000007 +#define B600 0000010 +#define B1200 0000011 +#define B1800 0000012 +#define B2400 0000013 +#define B4800 0000014 +#define B9600 0000015 +#define B19200 0000016 +#define B38400 0000017 +#define EXTA B19200 +#define EXTB B38400 +#define CBAUDEX 0000000 +#define B57600 00020 +#define B115200 00021 +#define B230400 00022 +#define B460800 00023 + +#define CSIZE 00001400 +#define CS5 00000000 +#define CS6 00000400 +#define CS7 00001000 +#define CS8 00001400 + +#define CSTOPB 00002000 +#define CREAD 00004000 +#define PARENB 00010000 +#define PARODD 00020000 +#define HUPCL 00040000 + +#define CLOCAL 00100000 +#define CRTSCTS 020000000000 /* flow control */ + +/* c_lflag bits */ +#define ISIG 0x00000080 +#define ICANON 0x00000100 +#define XCASE 0x00004000 +#define ECHO 0x00000008 +#define ECHOE 0x00000002 +#define ECHOK 0x00000004 +#define ECHONL 0x00000010 +#define NOFLSH 0x80000000 +#define TOSTOP 0x00400000 +#define ECHOCTL 0x00000040 +#define ECHOPRT 0x00000020 +#define ECHOKE 0x00000001 +#define FLUSHO 0x00800000 +#define PENDIN 0x20000000 +#define IEXTEN 0x00000400 + +/* Values for the ACTION argument to `tcflow'. */ +#define TCOOFF 0 +#define TCOON 1 +#define TCIOFF 2 +#define TCION 3 + +/* Values for the QUEUE_SELECTOR argument to `tcflush'. */ +#define TCIFLUSH 0 +#define TCOFLUSH 1 +#define TCIOFLUSH 2 + +/* Values for the OPTIONAL_ACTIONS argument to `tcsetattr'. */ +#define TCSANOW 0 +#define TCSADRAIN 1 +#define TCSAFLUSH 2 + + +#define _IOT_termios /* Hurd ioctl type field. */ \ + _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2) diff --git a/sysdeps/unix/sysv/linux/alpha/ustat.c b/sysdeps/unix/sysv/linux/alpha/ustat.c new file mode 100644 index 0000000000..c09b4fd84e --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/ustat.c @@ -0,0 +1,32 @@ +/* Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1997. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +int +ustat (dev_t dev, struct ustat *ubuf) +{ + unsigned int k_dev; + + /* We must convert the value to dev_t type used by the kernel. */ + k_dev = ((major (dev) & 0xff) << 8) | (minor (dev) & 0xff); + + return __syscall_ustat (k_dev, ubuf); +} diff --git a/sysdeps/unix/sysv/linux/alpha/xmknod.c b/sysdeps/unix/sysv/linux/alpha/xmknod.c new file mode 100644 index 0000000000..f4cdd7135a --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/xmknod.c @@ -0,0 +1,46 @@ +/* xmknod call using old-style Unix mknod system call. + Copyright (C) 1991, 1993, 1995, 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include + +extern int __syscall_mknod (const char *, unsigned int, unsigned int); + +/* Create a device file named PATH, with permission and special bits MODE + and device number DEV (which can be constructed from major and minor + device numbers with the `makedev' macro above). */ +int +__xmknod (int vers, const char *path, mode_t mode, dev_t *dev) +{ + unsigned int k_dev; + + if (vers != _MKNOD_VER) + { + __set_errno (EINVAL); + return -1; + } + + /* We must convert the value to dev_t type used by the kernel. */ + k_dev = ((major (*dev) & 0xff) << 8) | (minor (*dev) & 0xff); + + return __syscall_mknod (path, mode, k_dev); +} + +weak_alias (__xmknod, _xmknod) diff --git a/sysdeps/unix/sysv/sco3.2.4/syscall.h b/sysdeps/unix/sysv/sco3.2.4/sys/syscall.h similarity index 100% rename from sysdeps/unix/sysv/sco3.2.4/syscall.h rename to sysdeps/unix/sysv/sco3.2.4/sys/syscall.h From 50d1b4888d0f44a0cb2fe13acba7195df64d5a52 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 7 Jan 1997 23:29:44 +0000 Subject: [PATCH 0783/4487] update from main archive 960107 --- sysdeps/unix/sysv/linux/alpha/fcntlbits.h | 93 +++++++++++++++++++++++ sysdeps/unix/sysv/linux/alpha/ustat.c | 3 + 2 files changed, 96 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/fcntlbits.h diff --git a/sysdeps/unix/sysv/linux/alpha/fcntlbits.h b/sysdeps/unix/sysv/linux/alpha/fcntlbits.h new file mode 100644 index 0000000000..e8697d9898 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/fcntlbits.h @@ -0,0 +1,93 @@ +/* O_*, F_*, FD_* bit values for Linux. + Copyright (C) 1995, 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _FCNTLBITS_H +#define _FCNTLBITS_H 1 + +#include + + +/* open/fcntl - O_SYNC is only implemented on blocks devices and on files + located on an ext2 file system */ +#define O_ACCMODE 0003 +#define O_RDONLY 00 +#define O_WRONLY 01 +#define O_RDWR 02 +#define O_CREAT 01000 /* not fcntl */ +#define O_TRUNC 02000 /* not fcntl */ +#define O_EXCL 04000 /* not fcntl */ +#define O_NOCTTY 010000 /* not fcntl */ + +#define O_NONBLOCK 00004 +#define O_APPEND 00010 +#define O_NDELAY O_NONBLOCK +#define O_SYNC 040000 +#define FASYNC 020000 /* fcntl, for BSD compatibility */ + +#define F_DUPFD 0 /* dup */ +#define F_GETFD 1 /* get f_flags */ +#define F_SETFD 2 /* set f_flags */ +#define F_GETFL 3 /* more flags (cloexec) */ +#define F_SETFL 4 +#define F_GETLK 7 +#define F_SETLK 8 +#define F_SETLKW 9 + +#define F_SETOWN 5 /* for sockets. */ +#define F_GETOWN 6 /* for sockets. */ + +/* for F_[GET|SET]FL */ +#define FD_CLOEXEC 1 /* actually anything with low bit set goes */ + +/* for posix fcntl() and lockf() */ +#define F_RDLCK 1 +#define F_WRLCK 2 +#define F_UNLCK 8 + +/* for old implementation of bsd flock () */ +#define F_EXLCK 16 /* or 3 */ +#define F_SHLCK 32 /* or 4 */ + +/* operations for bsd flock(), also used by the kernel implementation */ +#define LOCK_SH 1 /* shared lock */ +#define LOCK_EX 2 /* exclusive lock */ +#define LOCK_NB 4 /* or'd with one of the above to prevent + blocking */ +#define LOCK_UN 8 /* remove lock */ + +struct flock + { + short int l_type; + short int l_whence; + __off_t l_start; + __off_t l_len; + __pid_t l_pid; + }; + + +/* Define some more compatibility macros to be backward compatible with + BSD systems which did not managed to hide these kernel macros. */ +#ifdef __USE_BSD +#define FAPPEND O_APPEND +#define FFSYNC O_FSYNC +#define FNONBLOCK O_NONBLOCK +#define FNDELAY O_NDELAY +#endif /* Use BSD. */ + +#endif /* fcntlbits.h */ diff --git a/sysdeps/unix/sysv/linux/alpha/ustat.c b/sysdeps/unix/sysv/linux/alpha/ustat.c index c09b4fd84e..6c64d31edc 100644 --- a/sysdeps/unix/sysv/linux/alpha/ustat.c +++ b/sysdeps/unix/sysv/linux/alpha/ustat.c @@ -20,6 +20,9 @@ #include #include + +extern int __syscall_ustat (unsigned int dev, struct ustat *ubuf); + int ustat (dev_t dev, struct ustat *ubuf) { From df5a92fd38d7ee34021a9bbb911f6751ccfc8079 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 19 Jan 1997 04:54:14 +0000 Subject: [PATCH 0784/4487] update from main archive 970118 --- .../unix/sysv/linux/alpha/kernel_sigaction.h | 7 ++ sysdeps/unix/sysv/linux/alpha/sys/ipc_buf.h | 85 ++++++++++++++ sysdeps/unix/sysv/linux/alpha/sys/procfs.h | 109 ++++++++++++++++++ sysdeps/unix/sysv/linux/m68k/getgroups.c | 2 + sysdeps/unix/sysv/linux/m68k/setgroups.c | 2 + sysdeps/unix/sysv/linux/m68k/syscalls.list | 2 + 6 files changed, 207 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h create mode 100644 sysdeps/unix/sysv/linux/alpha/sys/ipc_buf.h create mode 100644 sysdeps/unix/sysv/linux/alpha/sys/procfs.h create mode 100644 sysdeps/unix/sysv/linux/m68k/getgroups.c create mode 100644 sysdeps/unix/sysv/linux/m68k/setgroups.c diff --git a/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h b/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h new file mode 100644 index 0000000000..900bff4aab --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h @@ -0,0 +1,7 @@ +/* This is the sigaction struction from the Linux 2.1.20 kernel. */ + +struct kernel_sigaction { + __sighandler_t sa_handler; + unsigned long sa_mask; + unsigned int sa_flags; +}; diff --git a/sysdeps/unix/sysv/linux/alpha/sys/ipc_buf.h b/sysdeps/unix/sysv/linux/alpha/sys/ipc_buf.h new file mode 100644 index 0000000000..57830daae1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/sys/ipc_buf.h @@ -0,0 +1,85 @@ +/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , August 1995. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_IPC_BUF_H + +#define _SYS_IPC_BUF_H 1 +#include + +#include + +/* Mode bits for `msgget', `semget', and `shmget'. */ +#define IPC_CREAT 01000 /* Create key if key does not exist. */ +#define IPC_EXCL 02000 /* Fail if key exists. */ +#define IPC_NOWAIT 04000 /* Return error on wait. */ + +/* Control commands for `msgctl', `semctl', and `shmctl'. */ +#define IPC_RMID 0 /* Remove identifier. */ +#define IPC_SET 1 /* Set `ipc_perm' options. */ +#define IPC_STAT 2 /* Get `ipc_perm' options. */ +#define IPC_INFO 3 /* See ipcs. */ + + +__BEGIN_DECLS + +/* Special key values. */ +#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ + + +/* Data structure used to pass permission information to IPC operations. */ +struct ipc_perm + { + __key_t __key; /* Key. */ + unsigned int uid; /* Owner's user ID. */ + unsigned int gid; /* Owner's group ID. */ + unsigned int cuid; /* Creator's user ID. */ + unsigned int cgid; /* Creator's group ID. */ + unsigned int mode; /* Read/write permission. */ + unsigned short int __seq; /* Sequence number. */ + }; + + +/* Kludge to work around Linux' restriction of only up to five + arguments to a system call. */ +struct ipc_kludge + { + void *msgp; + long int msgtyp; + }; + +/* The actual system call: all functions are multiplexed by this. */ +extern int __ipc __P ((int __call, int __first, int __second, int __third, + void *__ptr)); + +/* The codes for the functions to use the multiplexer `__ipc'. */ +#define IPCOP_semop 1 +#define IPCOP_semget 2 +#define IPCOP_semctl 3 +#define IPCOP_msgsnd 11 +#define IPCOP_msgrcv 12 +#define IPCOP_msgget 13 +#define IPCOP_msgctl 14 +#define IPCOP_shmat 21 +#define IPCOP_shmdt 22 +#define IPCOP_shmget 23 +#define IPCOP_shmctl 24 + +__END_DECLS + +#endif /* _SYS_IPC_BUF_H */ diff --git a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h new file mode 100644 index 0000000000..03af029254 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h @@ -0,0 +1,109 @@ +/* Copyright (C) 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_PROCFS_H + +#define _SYS_PROCFS_H 1 +#include + +/* This is somehow modelled after the file of the same name on SysVr4 + systems. It provides a definition of the core file format for ELF + used on Linux. */ + +#include +#include +#include +#include +#include + +__BEGIN_DECLS + +struct elf_siginfo + { + int si_signo; /* Signal number. */ + int si_code; /* Extra code. */ + int si_errno; /* Errno. */ + }; + +typedef elf_greg_t greg_t; +typedef elf_gregset_t gregset_t; +typedef elf_fpregset_t fpregset_t; +#define NGREG ELF_NGREG + +/* Definitions to generate Intel SVR4-like core files. These mostly + have the same names as the SVR4 types with "elf_" tacked on the + front to prevent clashes with linux definitions, and the typedef + forms have been avoided. This is mostly like the SVR4 structure, + but more Linuxy, with things that Linux does not support and which + gdb doesn't really use excluded. Fields present but not used are + marked with "XXX". */ +struct elf_prstatus + { +#if 0 + long int pr_flags; /* XXX Process flags. */ + short int pr_why; /* XXX Reason for process halt. */ + short int pr_what; /* XXX More detailed reason. */ +#endif + struct elf_siginfo pr_info; /* Info associated with signal. */ + short int pr_cursig; /* Current signal. */ + unsigned long int pr_sigpend; /* Set of pending signals. */ + unsigned long int pr_sighold; /* Set of held signals. */ +#if 0 + struct sigaltstack pr_altstack; /* Alternate stack info. */ + struct sigaction pr_action; /* Signal action for current sig. */ +#endif + __pid_t pr_pid; + __pid_t pr_ppid; + __pid_t pr_pgrp; + __pid_t pr_sid; + struct timeval pr_utime; /* User time. */ + struct timeval pr_stime; /* System time. */ + struct timeval pr_cutime; /* Cumulative user time. */ + struct timeval pr_cstime; /* Cumulative system time. */ +#if 0 + long int pr_instr; /* Current instruction. */ +#endif + elf_gregset_t pr_reg; /* GP registers. */ + int pr_fpvalid; /* True if math copro being used. */ + }; + + +#define ELF_PRARGSZ (80) /* Number of chars for args */ + +struct elf_prpsinfo + { + char pr_state; /* Numeric process state. */ + char pr_sname; /* Char for pr_state. */ + char pr_zomb; /* Zombie. */ + char pr_nice; /* Nice val. */ + unsigned long int pr_flag; /* Flags. */ + unsigned int pr_uid; + unsigned int pr_gid; + unsigned int pr_pid, pr_ppid, pr_pgrp, pr_sid; + /* Lots missing */ + char pr_fname[16]; /* Filename of executable. */ + char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ + }; + + +typedef struct elf_prstatus prstatus_t; +typedef struct elf_prpsinfo prpsinfo_t; + +__END_DECLS + +#endif /* sys/procfs.h */ diff --git a/sysdeps/unix/sysv/linux/m68k/getgroups.c b/sysdeps/unix/sysv/linux/m68k/getgroups.c new file mode 100644 index 0000000000..102ea24e14 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/getgroups.c @@ -0,0 +1,2 @@ +/* We also have to rewrite the kernel gid_t to the user land type. */ +#include diff --git a/sysdeps/unix/sysv/linux/m68k/setgroups.c b/sysdeps/unix/sysv/linux/m68k/setgroups.c new file mode 100644 index 0000000000..0e7086278f --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/setgroups.c @@ -0,0 +1,2 @@ +/* We also have to rewrite the kernel gid_t to the user land type. */ +#include diff --git a/sysdeps/unix/sysv/linux/m68k/syscalls.list b/sysdeps/unix/sysv/linux/m68k/syscalls.list index 7883d70719..9a3e4d0e58 100644 --- a/sysdeps/unix/sysv/linux/m68k/syscalls.list +++ b/sysdeps/unix/sysv/linux/m68k/syscalls.list @@ -1,3 +1,5 @@ # File name Caller Syscall name # args Strong name Weak names +s_getgroups getgroups getgroups 2 __syscall_getgroups s_llseek llseek _llseek 5 __sys_llseek +s_setgroups setgroups setgroups 2 __syscall_setgroups From b5ce64efa4eac7b1cb62d22f6b8cf666a10378d8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 20 Jan 1997 02:49:42 +0000 Subject: [PATCH 0785/4487] update from main arhive 970119 --- bare/Makefile | 25 ++-- sysdeps/alpha/Makefile | 9 +- sysdeps/m68k/fpu/switch/68881-sw.h | 30 ++--- sysdeps/m68k/fpu/switch/Makefile | 11 +- sysdeps/m68k/fpu/switch/switch.c | 39 +++--- sysdeps/standalone/i386/force_cpu386/Makefile | 9 +- sysdeps/standalone/i960/nindy960/Makefile | 11 +- .../standalone/m68k/m68020/mvme136/Makefile | 9 +- sysdeps/unix/sysv/irix4/Makefile | 8 +- sysdeps/unix/sysv/linux/alpha/clone.S | 54 ++------ sysdeps/unix/sysv/linux/alpha/ioctl-types.h | 123 ------------------ sysdeps/unix/sysv/linux/alpha/sigprocmask.c | 65 +++++---- sysdeps/unix/sysv/linux/alpha/sigsuspend.S | 4 +- sysdeps/unix/sysv/linux/alpha/syscalls.list | 2 + sysdeps/unix/sysv/linux/alpha/termbits.h | 2 +- sysdeps/unix/sysv/linux/alpha/xmknod.c | 1 + sysdeps/unix/sysv/linux/m68k/clone.S | 41 +++--- sysdeps/unix/sysv/sco3.2/Makefile | 10 +- sysdeps/unix/sysv/sysv4/Makefile | 8 +- sysdeps/vax/Makefile | 8 +- 20 files changed, 159 insertions(+), 310 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/alpha/ioctl-types.h diff --git a/bare/Makefile b/bare/Makefile index 573515347c..0407c230de 100644 --- a/bare/Makefile +++ b/bare/Makefile @@ -1,23 +1,22 @@ -# Copyright (C) 1994 Free Software Foundation, Inc. -# Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), -# On-Line Applications Research Corporation. -# +# Copyright (C) 1994, 1997 Free Software Foundation, Inc. # This file is part of the GNU C Library. -# +# Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), +# On-Line Applications Research Corporation. +# # 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 # published by the Free Software Foundation; either version 2 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 # Library General Public License for more details. -# +# # You should have received a copy of the GNU Library General Public -# License along with the GNU C Library; see the file COPYING.LIB. If -# not, write to the Free Software Foundation, Inc., 675 Mass Ave, -# Cambridge, MA 02139, USA. +# License along with the GNU C Library; see the file COPYING.LIB. If not, +# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. subdir := bare @@ -33,11 +32,11 @@ include ../Rules # # For bare targets, the $(config-vendor) is the name of the board. # We will place the board dependent code ONLY in a library which -# is board dependent. This way many target boards can share a +# is board dependent. This way many target boards can share a # single libc.a. To resolve all symbols and successfully link # a program, the application must link against libc.a and libMY_TARGET.a. -# For example, the target specific library for the Motorola MVME135 -# board will be named libmvme135.a. To link a program for the +# For example, the target specific library for the Motorola MVME135 +# board will be named libmvme135.a. To link a program for the # MVME135, one must link against -lc and -lmvme135. # diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile index 6d4fbbb18b..841dc980a8 100644 --- a/sysdeps/alpha/Makefile +++ b/sysdeps/alpha/Makefile @@ -1,4 +1,5 @@ -# Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc. +# Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc. +# This file is part of the GNU C Library. # Contributed by Brendan Kehoe (brendan@zen.org). # The GNU C Library is free software; you can redistribute it and/or @@ -12,9 +13,9 @@ # Library General Public License for more details. # You should have received a copy of the GNU Library General Public -# License along with the GNU C Library; see the file COPYING.LIB. If -# not, write to the Free Software Foundation, Inc., 675 Mass Ave, -# Cambridge, MA 02139, USA. +# License along with the GNU C Library; see the file COPYING.LIB. If not, +# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. ifeq ($(subdir),gmon) sysdep_routines += _mcount diff --git a/sysdeps/m68k/fpu/switch/68881-sw.h b/sysdeps/m68k/fpu/switch/68881-sw.h index 3d7a3927f5..89bf65cb69 100644 --- a/sysdeps/m68k/fpu/switch/68881-sw.h +++ b/sysdeps/m68k/fpu/switch/68881-sw.h @@ -1,20 +1,20 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1991, 1992, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _68881_SWITCH_H @@ -47,7 +47,7 @@ struct switch_caller /* Function to determine whether or not a 68881 is available, and modify its caller (which must be a `struct switch_caller', above, in data space) to use the appropriate version. */ -extern void EXFUN(__68881_switch, (int __dummy)); +extern void __68881_switch __P ((int __dummy)); /* Define FUNCTION as a `struct switch_caller' which will call diff --git a/sysdeps/m68k/fpu/switch/Makefile b/sysdeps/m68k/fpu/switch/Makefile index fd8d7c11f4..67218e7681 100644 --- a/sysdeps/m68k/fpu/switch/Makefile +++ b/sysdeps/m68k/fpu/switch/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1991, 1992 Free Software Foundation, Inc. +# Copyright (C) 1991, 1992, 1997 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 @@ -12,9 +12,9 @@ # Library General Public License for more details. # You should have received a copy of the GNU Library General Public -# License along with the GNU C Library; see the file COPYING.LIB. If -# not, write to the Free Software Foundation, Inc., 675 Mass Ave, -# Cambridge, MA 02139, USA. +# License along with the GNU C Library; see the file COPYING.LIB. If not, +# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. ifeq ($(subdir),math) @@ -38,8 +38,7 @@ sysdep_routines := $(sysdep_routines) switch # 68881 and soft versions. $(addprefix $(objpfx), \ $(filter-out $(wildcard $(+68881-sources)),$(+68881-sources))): - (echo '#include ' ;\ - echo '#include <68881-sw.h>' ;\ + (echo '#include <68881-sw.h>' ;\ echo '#define $* __$*_68881' ;\ echo '#include <$(+68881-dir)/$@>' ;\ echo '#undef $*' ;\ diff --git a/sysdeps/m68k/fpu/switch/switch.c b/sysdeps/m68k/fpu/switch/switch.c index 057bd1509a..44e2b4d2d9 100644 --- a/sysdeps/m68k/fpu/switch/switch.c +++ b/sysdeps/m68k/fpu/switch/switch.c @@ -1,22 +1,21 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1991, 1992, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -#include #include #include <68881-sw.h> @@ -33,7 +32,8 @@ static int have_fpu = -1; /* Signal handler for the trap that happens if we don't have a 68881. */ static void -DEFUN(trap, (sig), int sig) +trap (sig) + int sig; { have_fpu = 0; } @@ -44,10 +44,11 @@ DEFUN(trap, (sig), int sig) to be a static jump to either the 68881 version or the soft version. It then returns into the function it has chosen to do the work. */ void -DEFUN(__68881_switch, (dummy), int dummy) +__68881_switch (dummy) + int dummy; { - PTR *return_address_location = &((PTR *) &dummy)[-1]; - struct switch_caller *CONST caller + void **return_address_location = &((void **) &dummy)[-1]; + struct switch_caller *const caller = (struct switch_caller *) (((short int *) *return_address_location) - 1); if (have_fpu < 0) diff --git a/sysdeps/standalone/i386/force_cpu386/Makefile b/sysdeps/standalone/i386/force_cpu386/Makefile index 8483724ee3..6381fdc62f 100644 --- a/sysdeps/standalone/i386/force_cpu386/Makefile +++ b/sysdeps/standalone/i386/force_cpu386/Makefile @@ -1,4 +1,5 @@ -# Copyright (C) 1994 Free Software Foundation, Inc. +# Copyright (C) 1994, 1997 Free Software Foundation, Inc. +# This file is part of the GNU C Library. # Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), # On-Line Applications Research Corporation. @@ -13,9 +14,9 @@ # Library General Public License for more details. # You should have received a copy of the GNU Library General Public -# License along with the GNU C Library; see the file COPYING.LIB. If -# not, write to the Free Software Foundation, Inc., 675 Mass Ave, -# Cambridge, MA 02139, USA. +# License along with the GNU C Library; see the file COPYING.LIB. If not, +# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. ifeq (bare,$(subdir)) install-others += $(libdir)/force_cpu386.ld diff --git a/sysdeps/standalone/i960/nindy960/Makefile b/sysdeps/standalone/i960/nindy960/Makefile index e6e65ea064..aab52dcb76 100644 --- a/sysdeps/standalone/i960/nindy960/Makefile +++ b/sysdeps/standalone/i960/nindy960/Makefile @@ -1,4 +1,5 @@ -# Copyright (C) 1993 Free Software Foundation, Inc. +# Copyright (C) 1993, 1997 Free Software Foundation, Inc. +# This file is part of the GNU C Library. # Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), # On-Line Applications Research Corporation. @@ -13,11 +14,11 @@ # Library General Public License for more details. # You should have received a copy of the GNU Library General Public -# License along with the GNU C Library; see the file COPYING.LIB. If -# not, write to the Free Software Foundation, Inc., 675 Mass Ave, -# Cambridge, MA 02139, USA. +# License along with the GNU C Library; see the file COPYING.LIB. If not, +# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. # The nindy960 support has only been tested on the following boards: -# +# # + Cyclone CVME961 VMEbus single board computer. diff --git a/sysdeps/standalone/m68k/m68020/mvme136/Makefile b/sysdeps/standalone/m68k/m68020/mvme136/Makefile index 33f049c58c..11c0620123 100644 --- a/sysdeps/standalone/m68k/m68020/mvme136/Makefile +++ b/sysdeps/standalone/m68k/m68020/mvme136/Makefile @@ -1,4 +1,5 @@ -# Copyright (C) 1993 Free Software Foundation, Inc. +# Copyright (C) 1993, 1997 Free Software Foundation, Inc. +# This file is part of the GNU C Library. # Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), # On-Line Applications Research Corporation. @@ -13,9 +14,9 @@ # Library General Public License for more details. # You should have received a copy of the GNU Library General Public -# License along with the GNU C Library; see the file COPYING.LIB. If -# not, write to the Free Software Foundation, Inc., 675 Mass Ave, -# Cambridge, MA 02139, USA. +# License along with the GNU C Library; see the file COPYING.LIB. If not, +# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. ifeq (bare,$(subdir)) install-lib += mvme136.ld diff --git a/sysdeps/unix/sysv/irix4/Makefile b/sysdeps/unix/sysv/irix4/Makefile index a7f3ea8ce5..b24278a34e 100644 --- a/sysdeps/unix/sysv/irix4/Makefile +++ b/sysdeps/unix/sysv/irix4/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1993 Free Software Foundation, Inc. +# Copyright (C) 1993, 1997 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 @@ -12,9 +12,9 @@ # Library General Public License for more details. # You should have received a copy of the GNU Library General Public -# License along with the GNU C Library; see the file COPYING.LIB. If -# not, write to the Free Software Foundation, Inc., 675 Mass Ave, -# Cambridge, MA 02139, USA. +# License along with the GNU C Library; see the file COPYING.LIB. If not, +# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. ifeq ($(subdir),signal) sysdep_routines := $(sysdep_routines) sigtramp __handler diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S index 03ecddc727..261bd81e57 100644 --- a/sysdeps/unix/sysv/linux/alpha/clone.S +++ b/sysdeps/unix/sysv/linux/alpha/clone.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1996. @@ -24,15 +24,11 @@ #define _ERRNO_H 1 #include -/* int clone(int (*fn)(), void *child_stack, int flags, int nargs, ...) */ +/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg) */ .text ENTRY(__clone) - lda sp,-16(sp) - .frame sp,16,$26,0 - /* Save rest of argument registers for varargs-type work. */ - stq a4,0(sp) - stq a5,8(sp) + .frame sp,0,ra,0 #ifdef PROF .set noat lda AT, _mcount @@ -42,24 +38,13 @@ ENTRY(__clone) .prologue 1 /* Sanity check arguments. */ - sextl a3,a3 ldiq v0,EINVAL beq a0,$error /* no NULL function pointers */ beq a1,$error /* no NULL stack pointers */ - blt a3,$error /* no negative argument counts */ - - /* Allocate space on the new stack and copy args over */ - mov a3,t0 /* save nargs for thread_start */ - s8addq a3,sp,t1 -1: ldq t2,-8(t1) - subq t1,8,t1 - stq t2,-8(a1) - subq a3,1,a3 - subq a1,8,a1 - bne a3,1b /* Do the system call */ mov a0,pv /* get fn ptr out of the way */ + mov a3,a4 /* get fn arg out of the way */ mov a2,a0 ldiq v0,__NR_clone call_pal PAL_callsys @@ -68,23 +53,19 @@ ENTRY(__clone) beq v0,thread_start /* Successful return from the parent */ - lda sp,16(sp) ret /* Something bad happened -- no child created */ $error: br gp,1f 1: ldgp gp,0(gp) - lda sp,16(sp) jmp zero,__syscall_error END(__clone) /* Load up the arguments to the function. Put this block of code in its own function so that we can terminate the stack trace with our - debug info. - - At this point we have $t0=nargs, $pv=fn, $sp=&arg[0]. */ + debug info. */ .ent thread_start thread_start: @@ -92,28 +73,8 @@ thread_start: mov zero,fp .prologue 0 - /* Calculate address of jump into argument loading code */ - cmple t0,6,t2 /* no more than 6 args in registers */ - cmoveq t2,6,t0 - br v0,1f /* find address of arg0 */ -1: lda v0,$arg0-1b(v0) - s4addq t0,zero,t1 - subq v0,t1,v0 - jmp (v0) - - /* Load the integer register arguments */ - ldq a5,40(sp) - ldq a4,32(sp) - ldq a3,24(sp) - ldq a2,16(sp) - ldq a1,8(sp) - ldq a0,0(sp) -$arg0: - - /* Adjust stack to remove the arguments we just loaded */ - s8addq t0,sp,sp - /* Call the user's function */ + mov a4,a0 jsr ra,(pv) ldgp gp,0(ra) @@ -121,6 +82,9 @@ $arg0: mov v0,a0 jsr ra,_exit + /* Die horribly. */ + halt + .end thread_start weak_alias(__clone, clone) diff --git a/sysdeps/unix/sysv/linux/alpha/ioctl-types.h b/sysdeps/unix/sysv/linux/alpha/ioctl-types.h deleted file mode 100644 index c51310f4cd..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/ioctl-types.h +++ /dev/null @@ -1,123 +0,0 @@ -/* Structure types for pre-termios terminal ioctls. Linux version. - Copyright (C) 1996, 1997 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _IOCTL_TYPES_H -#define _IOCTL_TYPES_H 1 - -/* Get definition of constants for use with `ioctl'. */ -#include - - -#define FIOCLEX _IO('f', 1) -#define FIONCLEX _IO('f', 2) -#define FIOASYNC _IOW('f', 125, int) -#define FIONBIO _IOW('f', 126, int) -#define FIONREAD _IOR('f', 127, int) -#define TIOCINQ FIONREAD - -#define TIOCGETP _IOR('t', 8, struct sgttyb) -#define TIOCSETP _IOW('t', 9, struct sgttyb) -#define TIOCSETN _IOW('t', 10, struct sgttyb) /* TIOCSETP wo flush */ - -#define TIOCSETC _IOW('t', 17, struct tchars) -#define TIOCGETC _IOR('t', 18, struct tchars) -#define TCGETS _IOR('t', 19, struct termios) -#define TCSETS _IOW('t', 20, struct termios) -#define TCSETSW _IOW('t', 21, struct termios) -#define TCSETSF _IOW('t', 22, struct termios) - -#define TCGETA _IOR('t', 23, struct termio) -#define TCSETA _IOW('t', 24, struct termio) -#define TCSETAW _IOW('t', 25, struct termio) -#define TCSETAF _IOW('t', 28, struct termio) - -#define TCSBRK _IO('t', 29) -#define TCXONC _IO('t', 30) -#define TCFLSH _IO('t', 31) - -#define TIOCSWINSZ _IOW('t', 103, struct winsize) -#define TIOCGWINSZ _IOR('t', 104, struct winsize) -#define TIOCSTART _IO('t', 110) /* start output, like ^Q */ -#define TIOCSTOP _IO('t', 111) /* stop output, like ^S */ -#define TIOCOUTQ _IOR('t', 115, int) /* output queue size */ - -#define TIOCGLTC _IOR('t', 116, struct ltchars) -#define TIOCSLTC _IOW('t', 117, struct ltchars) -#define TIOCSPGRP _IOW('t', 118, int) -#define TIOCGPGRP _IOR('t', 119, int) - -#define TIOCEXCL 0x540C -#define TIOCNXCL 0x540D -#define TIOCSCTTY 0x540E - -#define TIOCSTI 0x5412 -#define TIOCMGET 0x5415 -#define TIOCMBIS 0x5416 -#define TIOCMBIC 0x5417 -#define TIOCMSET 0x5418 -# define TIOCM_LE 0x001 -# define TIOCM_DTR 0x002 -# define TIOCM_RTS 0x004 -# define TIOCM_ST 0x008 -# define TIOCM_SR 0x010 -# define TIOCM_CTS 0x020 -# define TIOCM_CAR 0x040 -# define TIOCM_RNG 0x080 -# define TIOCM_DSR 0x100 -# define TIOCM_CD TIOCM_CAR -# define TIOCM_RI TIOCM_RNG - -#define TIOCGSOFTCAR 0x5419 -#define TIOCSSOFTCAR 0x541A -#define TIOCLINUX 0x541C -#define TIOCCONS 0x541D -#define TIOCGSERIAL 0x541E -#define TIOCSSERIAL 0x541F -#define TIOCPKT 0x5420 -# define TIOCPKT_DATA 0 -# define TIOCPKT_FLUSHREAD 1 -# define TIOCPKT_FLUSHWRITE 2 -# define TIOCPKT_STOP 4 -# define TIOCPKT_START 8 -# define TIOCPKT_NOSTOP 16 -# define TIOCPKT_DOSTOP 32 - - -#define TIOCNOTTY 0x5422 -#define TIOCSETD 0x5423 -#define TIOCGETD 0x5424 -#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ -#define TIOCTTYGSTRUCT 0x5426 /* For debugging only */ - -#define TIOCSERCONFIG 0x5453 -#define TIOCSERGWILD 0x5454 -#define TIOCSERSWILD 0x5455 -#define TIOCGLCKTRMIOS 0x5456 -#define TIOCSLCKTRMIOS 0x5457 -#define TIOCSERGSTRUCT 0x5458 /* For debugging only */ -#define TIOCSERGETLSR 0x5459 /* Get line status register */ - /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ -# define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ -#define TIOCSERGETMULTI 0x545A /* Get multiport config */ -#define TIOCSERSETMULTI 0x545B /* Set multiport config */ - -#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */ -#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ - -#endif /* ioctl-types.h */ diff --git a/sysdeps/unix/sysv/linux/alpha/sigprocmask.c b/sysdeps/unix/sysv/linux/alpha/sigprocmask.c index a1d5636fcb..7fb58f1d80 100644 --- a/sysdeps/unix/sysv/linux/alpha/sigprocmask.c +++ b/sysdeps/unix/sysv/linux/alpha/sigprocmask.c @@ -1,48 +1,59 @@ -/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by David Mosberger (davidm@azstarnet.com). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include #include +/* When there is kernel support for more than 64 signals, we'll have to + switch to a new system call convention here. */ + extern unsigned long __osf_sigprocmask (int how, unsigned long newmask); int __sigprocmask (int how, const sigset_t *set, sigset_t *oset) { - sigset_t setval; + unsigned long int setval; long result; - if (set) { - setval = *set; - } else { - sigemptyset(&setval); - how = SIG_BLOCK; /* ensure blocked mask doesn't get changed */ - } - result = __osf_sigprocmask(how, setval); - if (result == -1) { - /* if there are ever more than 63 signals, we need to recode this + if (set) + { + setval = set->__val[0]; + } + else + { + setval = 0; + how = SIG_BLOCK; /* ensure blocked mask doesn't get changed */ + } + result = __osf_sigprocmask (how, setval); + if (result == -1) + /* If there are ever more than 63 signals, we need to recode this in assembler since we wouldn't be able to distinguish a mask of all 1s from -1, but for now, we're doing just fine... */ return result; - } - if (oset) { - *oset = result; - } + + if (oset) + { + oset->__val[0] = result; + result = _SIGSET_NWORDS; + while (--result > 0) + oset->__val[result] = 0; + } return 0; } diff --git a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S index f476ed595f..3036b2f8ed 100644 --- a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S +++ b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger , 1995. @@ -18,7 +18,7 @@ Boston, MA 02111-1307, USA. */ /* sigsuspend is a special syscall since it needs to dereference the - sigset. */ + sigset. This will have to change when we have more than 64 signals. */ #include diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 49cc697489..cf5f439bc4 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -26,6 +26,8 @@ llseek EXTRA lseek 3 llseek # these are actually common with the x86: fstatfs - fstatfs 2 __fstatfs fstatfs statfs - statfs 2 __statfs statfs +sys_ustat ustat ustat 2 __syscall_ustat +sys_mknod xmknod mknod 3 __syscall_mknod # override select.S in parent directory: select - select 5 __select select diff --git a/sysdeps/unix/sysv/linux/alpha/termbits.h b/sysdeps/unix/sysv/linux/alpha/termbits.h index 6cb729f7f8..bcd3ff5d63 100644 --- a/sysdeps/unix/sysv/linux/alpha/termbits.h +++ b/sysdeps/unix/sysv/linux/alpha/termbits.h @@ -29,7 +29,7 @@ struct termios tcflag_t c_cflag; /* control mode flags */ tcflag_t c_lflag; /* local mode flags */ cc_t c_cc[NCCS]; /* control characters */ - cc_t c_line; /* line discipline (== c_cc[19]) */ + cc_t c_line; /* line discipline (== c_cc[33]) */ speed_t c_ispeed; /* input speed */ speed_t c_ospeed; /* output speed */ }; diff --git a/sysdeps/unix/sysv/linux/alpha/xmknod.c b/sysdeps/unix/sysv/linux/alpha/xmknod.c index f4cdd7135a..25de60ce63 100644 --- a/sysdeps/unix/sysv/linux/alpha/xmknod.c +++ b/sysdeps/unix/sysv/linux/alpha/xmknod.c @@ -20,6 +20,7 @@ #include #include #include +#include extern int __syscall_mknod (const char *, unsigned int, unsigned int); diff --git a/sysdeps/unix/sysv/linux/m68k/clone.S b/sysdeps/unix/sysv/linux/m68k/clone.S index 4465dd8f68..ef9716d979 100644 --- a/sysdeps/unix/sysv/linux/m68k/clone.S +++ b/sysdeps/unix/sysv/linux/m68k/clone.S @@ -1,20 +1,20 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. Contributed by Andreas Schwab (schwab@issan.informatik.uni-dortmund.de) -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* clone is even more special than fork as it mucks with stacks and invokes a function in the right context after its all over. */ @@ -23,7 +23,7 @@ Cambridge, MA 02139, USA. */ #define _ERRNO_H 1 #include -/* int clone (int (*fn) (), void *child_stack, int flags, int nargs, ...) */ +/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg); */ .text ENTRY (__clone) @@ -36,18 +36,9 @@ ENTRY (__clone) movel 8(%sp), %a1 /* no NULL stack pointers */ tstl %a1 jeq syscall_error - movel 16(%sp), %d1 /* no negative argument counts */ - jmi syscall_error - /* Allocate space on the new stack and copy args over */ - movel %d1, %d0 - negl %d0 - lea (%a1,%d0.l*4), %a1 - jeq 2f -1: movel 16(%sp,%d1.l*4), -4(%a1,%d1.l*4) - subql #1, %d1 - jne 1b -2: + /* Allocate space and copy the argument onto the new stack. */ + movel 16(%sp), -(%a1) /* Do the system call */ exg %d2, %a1 /* save %d2 and get stack pointer */ diff --git a/sysdeps/unix/sysv/sco3.2/Makefile b/sysdeps/unix/sysv/sco3.2/Makefile index 1be24e85e3..ff3a6fb4f1 100644 --- a/sysdeps/unix/sysv/sco3.2/Makefile +++ b/sysdeps/unix/sysv/sco3.2/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1993 Free Software Foundation, Inc. +# Copyright (C) 1993, 1997 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 @@ -12,12 +12,12 @@ # Library General Public License for more details. # You should have received a copy of the GNU Library General Public -# License along with the GNU C Library; see the file COPYING.LIB. If -# not, write to the Free Software Foundation, Inc., 675 Mass Ave, -# Cambridge, MA 02139, USA. +# License along with the GNU C Library; see the file COPYING.LIB. If not, +# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. ifeq ($(subdir),misc) - + sysdep_routines := $(sysdep_routines) __fltused endif diff --git a/sysdeps/unix/sysv/sysv4/Makefile b/sysdeps/unix/sysv/sysv4/Makefile index 320e99bcf4..7507fbfc1c 100644 --- a/sysdeps/unix/sysv/sysv4/Makefile +++ b/sysdeps/unix/sysv/sysv4/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1992, 1993, 1995, 1996 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1995, 1996, 1997 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 @@ -12,9 +12,9 @@ # Library General Public License for more details. # You should have received a copy of the GNU Library General Public -# License along with the GNU C Library; see the file COPYING.LIB. If -# not, write to the Free Software Foundation, Inc., 675 Mass Ave, -# Cambridge, MA 02139, USA. +# License along with the GNU C Library; see the file COPYING.LIB. If not, +# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. ifeq ($(subdir),posix) diff --git a/sysdeps/vax/Makefile b/sysdeps/vax/Makefile index a6149a9524..b27d65d10c 100644 --- a/sysdeps/vax/Makefile +++ b/sysdeps/vax/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1991, 1994 Free Software Foundation, Inc. +# Copyright (C) 1991, 1994, 1997 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 @@ -12,9 +12,9 @@ # Library General Public License for more details. # You should have received a copy of the GNU Library General Public -# License along with the GNU C Library; see the file COPYING.LIB. If -# not, write to the Free Software Foundation, Inc., 675 Mass Ave, -# Cambridge, MA 02139, USA. +# License along with the GNU C Library; see the file COPYING.LIB. If not, +# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. ifeq ($(subdir),math) ifndef math-twiddled From 7a155da841db96f375edbbc2afd277d29eb06e26 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Jan 1997 06:10:09 +0000 Subject: [PATCH 0786/4487] update from main archive 970120 --- sysdeps/unix/sysv/linux/alpha/Dist | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist index a15f181ff6..368b49066d 100644 --- a/sysdeps/unix/sysv/linux/alpha/Dist +++ b/sysdeps/unix/sysv/linux/alpha/Dist @@ -6,3 +6,4 @@ clone.S sys/io.h kernel_termios.h sys/acct.h +sys/procfs.h From 9a82d002aa4453ec0e42fc0fd61a9c93e3556659 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 22 Jan 1997 05:25:54 +0000 Subject: [PATCH 0787/4487] update from main archive 970121 --- sysdeps/unix/sysv/linux/alpha/Dist | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist index 368b49066d..cdb11e98d0 100644 --- a/sysdeps/unix/sysv/linux/alpha/Dist +++ b/sysdeps/unix/sysv/linux/alpha/Dist @@ -4,6 +4,7 @@ ioperm.c init-first.h clone.S sys/io.h +kernel_sigaction.h kernel_termios.h sys/acct.h sys/procfs.h From dc37f3e59db1b24245117f14fe634677ed13fdb2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 23 Jan 1997 04:24:10 +0000 Subject: [PATCH 0788/4487] update from main archive 970121 --- sysdeps/standalone/i386/force_cpu386/Makefile | 4 +- sysdeps/unix/bsd/sony/newsos4/Makefile | 2 +- sysdeps/unix/bsd/sun/sunos4/Makefile | 4 +- sysdeps/unix/sysv/linux/alpha/Dist | 2 +- sysdeps/unix/sysv/linux/alpha/Makefile | 2 +- sysdeps/unix/sysv/linux/alpha/ioctls.h | 39 ++++ sysdeps/unix/sysv/linux/alpha/ioperm.c | 194 ++++++++++-------- .../linux/alpha/{ => sys}/kernel_termios.h | 6 +- sysdeps/unix/sysv/linux/alpha/sys/procfs.h | 2 +- sysdeps/unix/sysv/linux/alpha/syscalls.list | 1 - 10 files changed, 158 insertions(+), 98 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/alpha/ioctls.h rename sysdeps/unix/sysv/linux/alpha/{ => sys}/kernel_termios.h (81%) diff --git a/sysdeps/standalone/i386/force_cpu386/Makefile b/sysdeps/standalone/i386/force_cpu386/Makefile index 6381fdc62f..a51ed7f429 100644 --- a/sysdeps/standalone/i386/force_cpu386/Makefile +++ b/sysdeps/standalone/i386/force_cpu386/Makefile @@ -19,7 +19,7 @@ # Boston, MA 02111-1307, USA. ifeq (bare,$(subdir)) -install-others += $(libdir)/force_cpu386.ld -$(libdir)/force_cpu386.ld: $(sysdep_dir)/standalone/i386/target.ld +install-others += $(inst_libdir)/force_cpu386.ld +$(inst_libdir)/force_cpu386.ld: $(sysdep_dir)/standalone/i386/target.ld $(do-install) endif diff --git a/sysdeps/unix/bsd/sony/newsos4/Makefile b/sysdeps/unix/bsd/sony/newsos4/Makefile index 7cfecf2e18..053da568d8 100644 --- a/sysdeps/unix/bsd/sony/newsos4/Makefile +++ b/sysdeps/unix/bsd/sony/newsos4/Makefile @@ -1,3 +1,3 @@ -ifeq ($(subdir), posix) +ifeq ($(subdir),posix) sysdep_routines := $(sysdep_routines) sys_wait4 endif diff --git a/sysdeps/unix/bsd/sun/sunos4/Makefile b/sysdeps/unix/bsd/sun/sunos4/Makefile index 96b88e1b72..d17654a30f 100644 --- a/sysdeps/unix/bsd/sun/sunos4/Makefile +++ b/sysdeps/unix/bsd/sun/sunos4/Makefile @@ -1,7 +1,7 @@ -ifeq ($(subdir), posix) +ifeq ($(subdir),posix) sysdep_routines := $(sysdep_routines) sys_wait4 endif -ifeq ($(subdir), misc) +ifeq ($(subdir),misc) sysdep_routines := $(sysdep_routines) sys_mmap endif diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist index cdb11e98d0..f3c4cb92d6 100644 --- a/sysdeps/unix/sysv/linux/alpha/Dist +++ b/sysdeps/unix/sysv/linux/alpha/Dist @@ -4,7 +4,7 @@ ioperm.c init-first.h clone.S sys/io.h -kernel_sigaction.h kernel_termios.h sys/acct.h +sys/kernel_sigaction.h sys/procfs.h diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile index 3908b5703c..fa2c078664 100644 --- a/sysdeps/unix/sysv/linux/alpha/Makefile +++ b/sysdeps/unix/sysv/linux/alpha/Makefile @@ -1,4 +1,4 @@ -ifeq ($(subdir), misc) +ifeq ($(subdir),misc) sysdep_headers += alpha/ptrace.h alpha/regdef.h sysdep_routines += ieee_get_fp_control ieee_set_fp_control \ diff --git a/sysdeps/unix/sysv/linux/alpha/ioctls.h b/sysdeps/unix/sysv/linux/alpha/ioctls.h new file mode 100644 index 0000000000..80b2e62e77 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/ioctls.h @@ -0,0 +1,39 @@ +/* Copyright (C) 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _IOCTLS_H +#define _IOCTLS_H 1 + +/* Use the definitions from the kernel header files. */ +#include +#include + +/* Oh well, this is necessary since the kernel data structure is + different from the user-level version. */ +#undef TCGETS +#undef TCSETS +#undef TCSETSW +#undef TCSETSF +#define TCGETS _IOR ('t', 19, struct __kernel_termios) +#define TCSETS _IOW ('t', 20, struct __kernel_termios) +#define TCSETSW _IOW ('t', 21, struct __kernel_termios) +#define TCSETSF _IOW ('t', 22, struct __kernel_termios) + +#include + +#endif /* ioctls.h */ diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c index 924fc473b2..488265a069 100644 --- a/sysdeps/unix/sysv/linux/alpha/ioperm.c +++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c @@ -1,36 +1,36 @@ -/* Copyright (C) 1992, 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. -Contributed by David Mosberger. +/* Copyright (C) 1992, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Mosberger. -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* I/O access is restricted to ISA port space (ports 0..65535). -Modern devices hopefully are sane enough not to put any performance -critical registers in i/o space. + Modern devices hopefully are sane enough not to put any performance + critical registers in i/o space. -On the first call to ioperm() or _sethae(), the entire (E)ISA port -space is mapped into the virtual address space at address io.base. -mprotect() calls are then used to enable/disable access to ports. Per -page, there are PAGE_SIZE>>IO_SHIFT I/O ports (e.g., 256 ports on a -Low Cost Alpha based system using 8KB pages). + On the first call to ioperm() or _sethae(), the entire (E)ISA port + space is mapped into the virtual address space at address io.base. + mprotect() calls are then used to enable/disable access to ports. Per + page, there are PAGE_SIZE>>IO_SHIFT I/O ports (e.g., 256 ports on a + Low Cost Alpha based system using 8KB pages). -Keep in mind that this code should be able to run in a 32bit address -space. It is therefore unreasonable to expect mmap'ing the entire -sparse address space would work (e.g., the Low Cost Alpha chip has an -I/O address space that's 512MB large!). */ + Keep in mind that this code should be able to run in a 32bit address + space. It is therefore unreasonable to expect mmap'ing the entire + sparse address space would work (e.g., the Low Cost Alpha chip has an + I/O address space that's 512MB large!). */ #include #include @@ -66,27 +66,30 @@ I/O address space that's 512MB large!). */ #define CIA_SPARSE_MEM (0xfffffc8000000000UL) #define CIA_DENSE_MEM (0xfffffc8600000000UL) +#define T2_IO_BASE (0xfffffc03a0000000UL) +#define T2_SPARSE_BASE (0xfffffc0200000000UL) +#define T2_DENSE_BASE (0xfffffc03c0000000UL) -enum { - IOSYS_JENSEN = 0, IOSYS_APECS = 1, IOSYS_CIA = 2 +typedef enum { + IOSYS_UNKNOWN, IOSYS_JENSEN, IOSYS_APECS, IOSYS_CIA, IOSYS_T2 } iosys_t; struct ioswtch { - void (*sethae)(unsigned long addr); - void (*outb)(unsigned char b, unsigned long port); - void (*outw)(unsigned short b, unsigned long port); - void (*outl)(unsigned int b, unsigned long port); - unsigned int (*inb)(unsigned long port); - unsigned int (*inw)(unsigned long port); - unsigned int (*inl)(unsigned long port); + void (*sethae)(unsigned long int addr); + void (*outb)(unsigned char b, unsigned long int port); + void (*outw)(unsigned short b, unsigned long int port); + void (*outl)(unsigned int b, unsigned long int port); + unsigned int (*inb)(unsigned long int port); + unsigned int (*inw)(unsigned long int port); + unsigned int (*inl)(unsigned long int port); }; static struct platform { - const char *name; - int io_sys; - int hae_shift; - unsigned long bus_memory_base; - unsigned long sparse_bus_memory_base; + const char *name; + int io_sys; + iosys_t hae_shift; + unsigned long int bus_memory_base; + unsigned long int sparse_bus_memory_base; } platform[] = { {"Alcor", IOSYS_CIA, 5, CIA_DENSE_MEM, CIA_SPARSE_MEM}, {"Avanti", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM}, @@ -99,27 +102,29 @@ static struct platform { {"Mikasa", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM}, {"Mustang", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM}, {"Noname", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM}, + {"Sable", IOSYS_T2, 5, T2_DENSE_MEM, T2_SPARSE_MEM}, }; static struct { struct hae { - unsigned long cache; - unsigned long * reg; + unsigned long int cache; + unsigned long int * reg; } hae; - unsigned long base; + unsigned long int base; struct ioswtch * swp; - int sys; + unsigned long int bus_memory_base; + unsigned long int sparse_bus_memory_base; + unsigned long int io_base; + iosys_t sys; int hae_shift; - unsigned long bus_memory_base; - unsigned long sparse_bus_memory_base; } io; -extern void __sethae (unsigned long); /* we can't use asm/io.h */ +extern void __sethae (unsigned long int); /* we can't use asm/io.h */ -static inline unsigned long -port_to_cpu_addr (unsigned long port, int iosys, int size) +static inline unsigned long int +port_to_cpu_addr (unsigned long int port, iosys_t iosys, int size) { if (iosys == IOSYS_JENSEN) return (port << 7) + ((size - 1) << 5) + io.base; @@ -129,7 +134,7 @@ port_to_cpu_addr (unsigned long port, int iosys, int size) static inline void -inline_sethae (unsigned long addr, int iosys) +inline_sethae (unsigned long int addr, iosys_t iosys) { if (iosys == IOSYS_JENSEN) { @@ -143,7 +148,7 @@ inline_sethae (unsigned long addr, int iosys) } else { - unsigned long msb; + unsigned long int msb; /* no need to set hae if msb is 0: */ msb = addr & 0xf8000000; @@ -157,10 +162,10 @@ inline_sethae (unsigned long addr, int iosys) static inline void -inline_outb (unsigned char b, unsigned long port, int iosys) +inline_outb (unsigned char b, unsigned long int port, iosys_t iosys) { unsigned int w; - unsigned long addr = port_to_cpu_addr (port, iosys, 1); + unsigned long int addr = port_to_cpu_addr (port, iosys, 1); inline_sethae (0, iosys); asm ("insbl %2,%1,%0" : "r=" (w) : "ri" (port & 0x3), "r" (b)); @@ -170,10 +175,10 @@ inline_outb (unsigned char b, unsigned long port, int iosys) static inline void -inline_outw (unsigned short b, unsigned long port, int iosys) +inline_outw (unsigned short int b, unsigned long int port, iosys_t iosys) { unsigned int w; - unsigned long addr = port_to_cpu_addr (port, iosys, 2); + unsigned long int addr = port_to_cpu_addr (port, iosys, 2); inline_sethae (0, iosys); asm ("inswl %2,%1,%0" : "r=" (w) : "ri" (port & 0x3), "r" (b)); @@ -183,9 +188,9 @@ inline_outw (unsigned short b, unsigned long port, int iosys) static inline void -inline_outl (unsigned int b, unsigned long port, int iosys) +inline_outl (unsigned int b, unsigned long int port, iosys_t iosys) { - unsigned long addr = port_to_cpu_addr (port, iosys, 4); + unsigned long int addr = port_to_cpu_addr (port, iosys, 4); if (port >= MAX_PORT) return; @@ -197,9 +202,9 @@ inline_outl (unsigned int b, unsigned long port, int iosys) static inline unsigned int -inline_inb (unsigned long port, int iosys) +inline_inb (unsigned long int port, iosys_t iosys) { - unsigned long result, addr = port_to_cpu_addr (port, iosys, 1); + unsigned long int result, addr = port_to_cpu_addr (port, iosys, 1); inline_sethae (0, iosys); result = *(vuip) addr; @@ -209,9 +214,9 @@ inline_inb (unsigned long port, int iosys) static inline unsigned int -inline_inw (unsigned long port, int iosys) +inline_inw (unsigned long int port, iosys_t iosys) { - unsigned long result, addr = port_to_cpu_addr (port, iosys, 2); + unsigned long int result, addr = port_to_cpu_addr (port, iosys, 2); inline_sethae (0, iosys); result = *(vuip) addr; @@ -221,9 +226,9 @@ inline_inw (unsigned long port, int iosys) static inline unsigned int -inline_inl (unsigned long port, int iosys) +inline_inl (unsigned long int port, iosys_t iosys) { - unsigned long addr = port_to_cpu_addr (port, iosys, 4); + unsigned long int addr = port_to_cpu_addr (port, iosys, 4); inline_sethae (0, iosys); return *(vuip) addr; @@ -232,14 +237,14 @@ inline_inl (unsigned long port, int iosys) #define DCL_SETHAE(name, iosys) \ static void \ -name##_sethae (unsigned long addr) \ +name##_sethae (unsigned long int addr) \ { \ inline_sethae (addr, IOSYS_##iosys); \ } #define DCL_OUT(name, func, type, iosys) \ static void \ -name##_##func (unsigned type b, unsigned long addr) \ +name##_##func (unsigned type b, unsigned long int addr) \ { \ inline_##func (b, addr, IOSYS_##iosys); \ } @@ -247,7 +252,7 @@ name##_##func (unsigned type b, unsigned long addr) \ #define DCL_IN(name, func, iosys) \ static unsigned int \ -name##_##func (unsigned long addr) \ +name##_##func (unsigned long int addr) \ { \ return inline_##func (addr, IOSYS_##iosys); \ } @@ -255,7 +260,7 @@ name##_##func (unsigned long addr) \ DCL_SETHAE(jensen, JENSEN) DCL_OUT(jensen, outb, char, JENSEN) -DCL_OUT(jensen, outw, short, JENSEN) +DCL_OUT(jensen, outw, short int, JENSEN) DCL_OUT(jensen, outl, int, JENSEN) DCL_IN(jensen, inb, JENSEN) DCL_IN(jensen, inw, JENSEN) @@ -266,7 +271,7 @@ DCL_IN(jensen, inl, JENSEN) DCL_SETHAE(apecs, APECS) DCL_OUT(apecs, outb, char, APECS) -DCL_OUT(apecs, outw, short, APECS) +DCL_OUT(apecs, outw, short int, APECS) DCL_OUT(apecs, outl, int, APECS) DCL_IN(apecs, inb, APECS) DCL_IN(apecs, inw, APECS) @@ -291,6 +296,10 @@ struct ioswtch ioswtch[] = { * with, we first try to read the value of symlink PATH_ALPHA_SYSTYPE, * if that fails, we lookup the "system type" field in /proc/cpuinfo. * If that fails as well, we give up. + * + * If the value received from PATH_ALPHA_SYSTYPE begins with a number, + * assume this is a previously unsupported system and the values encode, + * in order, ",,,". */ static int init_iosys (void) @@ -298,10 +307,21 @@ init_iosys (void) char systype[256]; int i, n; - n = readlink(PATH_ALPHA_SYSTYPE, systype, sizeof(systype) - 1); + n = readlink (PATH_ALPHA_SYSTYPE, systype, sizeof (systype) - 1); if (n > 0) { systype[n] = '\0'; + if (isdigit (systype[0])) + { + if (sscanf (systype, "%li,%i,%li,%li", &io.io_base, &io.hae_shift, + &io.bus_memory_base, &io.sparse_bus_memory_base) == 4) + { + io.sys = IOSYS_UNKNOWN; + io.swp = &ioswtch[1]; + return 0; + } + /* else we're likely going to fail with the system match below */ + } } else { @@ -318,14 +338,14 @@ init_iosys (void) else fgets (systype, 256, fp); } - fclose(fp); + fclose (fp); if (n == EOF) { /* this can happen if the format of /proc/cpuinfo changes... */ - fprintf(stderr, - "ioperm.init_iosys(): Unable to determine system type.\n" - "\t(May need " PATH_ALPHA_SYSTYPE " symlink?)\n"); + fprintf (stderr, + "ioperm.init_iosys(): Unable to determine system type.\n" + "\t(May need " PATH_ALPHA_SYSTYPE " symlink?)\n"); __set_errno (ENODEV); return -1; } @@ -355,9 +375,9 @@ init_iosys (void) int -_ioperm (unsigned long from, unsigned long num, int turn_on) +_ioperm (unsigned long int from, unsigned long int num, int turn_on) { - unsigned long addr, len; + unsigned long int addr, len; int prot; if (!io.swp && init_iosys () < 0) @@ -374,7 +394,7 @@ _ioperm (unsigned long from, unsigned long num, int turn_on) { if (!io.base) { - unsigned long base; + unsigned long int base; int fd; io.hae.reg = 0; /* not used in user-level */ @@ -387,6 +407,7 @@ _ioperm (unsigned long from, unsigned long num, int turn_on) switch (io.sys) { + case IOSYS_UNKNOWN: base = io.io_base; break; case IOSYS_JENSEN: base = JENSEN_IO_BASE; break; case IOSYS_APECS: base = APECS_IO_BASE; break; case IOSYS_CIA: base = CIA_IO_BASE; break; @@ -398,7 +419,8 @@ _ioperm (unsigned long from, unsigned long num, int turn_on) addr &= PAGE_MASK; len = port_to_cpu_addr (MAX_PORT, io.sys, 1) - addr; io.base = - (unsigned long) __mmap (0, len, PROT_NONE, MAP_SHARED, fd, base); + (unsigned long int) __mmap (0, len, PROT_NONE, MAP_SHARED, + fd, base); close (fd); if ((long) io.base == -1) return -1; @@ -437,7 +459,7 @@ _iopl (unsigned int level) void -_sethae (unsigned long addr) +_sethae (unsigned long int addr) { if (!io.swp && init_iosys () < 0) return; @@ -447,7 +469,7 @@ _sethae (unsigned long addr) void -_outb (unsigned char b, unsigned long port) +_outb (unsigned char b, unsigned long int port) { if (port >= MAX_PORT) return; @@ -457,7 +479,7 @@ _outb (unsigned char b, unsigned long port) void -_outw (unsigned short b, unsigned long port) +_outw (unsigned short b, unsigned long int port) { if (port >= MAX_PORT) return; @@ -467,7 +489,7 @@ _outw (unsigned short b, unsigned long port) void -_outl (unsigned int b, unsigned long port) +_outl (unsigned int b, unsigned long int port) { if (port >= MAX_PORT) return; @@ -477,27 +499,27 @@ _outl (unsigned int b, unsigned long port) unsigned int -_inb (unsigned long port) +_inb (unsigned long int port) { return io.swp->inb (port); } unsigned int -_inw (unsigned long port) +_inw (unsigned long int port) { return io.swp->inw (port); } unsigned int -_inl (unsigned long port) +_inl (unsigned long int port) { return io.swp->inl (port); } -unsigned long +unsigned long int _bus_base(void) { if (!io.swp && init_iosys () < 0) @@ -505,7 +527,7 @@ _bus_base(void) return io.bus_memory_base; } -unsigned long +unsigned long int _bus_base_sparse(void) { if (!io.swp && init_iosys () < 0) diff --git a/sysdeps/unix/sysv/linux/alpha/kernel_termios.h b/sysdeps/unix/sysv/linux/alpha/sys/kernel_termios.h similarity index 81% rename from sysdeps/unix/sysv/linux/alpha/kernel_termios.h rename to sysdeps/unix/sysv/linux/alpha/sys/kernel_termios.h index cb030e4de4..eebe976ce1 100644 --- a/sysdeps/unix/sysv/linux/alpha/kernel_termios.h +++ b/sysdeps/unix/sysv/linux/alpha/sys/kernel_termios.h @@ -1,14 +1,14 @@ /* The following corresponds to the values from the Linux 2.1.20 kernel. */ -#define KERNEL_NCCS 19 +#define __KERNEL_NCCS 19 -struct kernel_termios +struct __kernel_termios { tcflag_t c_iflag; /* input mode flags */ tcflag_t c_oflag; /* output mode flags */ tcflag_t c_cflag; /* control mode flags */ tcflag_t c_lflag; /* local mode flags */ - cc_t c_cc[KERNEL_NCCS]; /* control characters */ + cc_t c_cc[__KERNEL_NCCS]; /* control characters */ cc_t c_line; /* line discipline */ speed_t c_ispeed; /* input speed */ speed_t c_ospeed; /* output speed */ diff --git a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h index 03af029254..7bd6e6958d 100644 --- a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h @@ -94,7 +94,7 @@ struct elf_prpsinfo unsigned long int pr_flag; /* Flags. */ unsigned int pr_uid; unsigned int pr_gid; - unsigned int pr_pid, pr_ppid, pr_pgrp, pr_sid; + int pr_pid, pr_ppid, pr_pgrp, pr_sid; /* Lots missing */ char pr_fname[16]; /* Filename of executable. */ char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index cf5f439bc4..71407062fb 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -17,7 +17,6 @@ semctl - semctl 4 __semctl semctl osf_sigprocmask - osf_sigprocmask 2 __osf_sigprocmask -getdents - getdents 3 __getdirentries getdirentries getpeername - getpeername 3 __getpeername getpeername getpriority - getpriority 2 __getpriority getpriority mmap - mmap 6 __mmap mmap From b568adc31d6ce9e4506d4b3f078a2aa8211db90e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 24 Jan 1997 02:23:43 +0000 Subject: [PATCH 0789/4487] update from main archive 970122 --- sysdeps/unix/sysv/linux/alpha/sys/kernel_termios.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/sys/kernel_termios.h b/sysdeps/unix/sysv/linux/alpha/sys/kernel_termios.h index eebe976ce1..4be759a51f 100644 --- a/sysdeps/unix/sysv/linux/alpha/sys/kernel_termios.h +++ b/sysdeps/unix/sysv/linux/alpha/sys/kernel_termios.h @@ -1,5 +1,10 @@ +#ifndef _SYS_KERNEL_TERMIOS_H +#define _SYS_KERNEL_TERMIOS_H 1 /* The following corresponds to the values from the Linux 2.1.20 kernel. */ +/* We need the definition of tcflag_t, cc_t, and speed_t. */ +#include + #define __KERNEL_NCCS 19 struct __kernel_termios @@ -16,3 +21,5 @@ struct __kernel_termios #define _HAVE_C_ISPEED 1 #define _HAVE_C_OSPEED 1 + +#endif /* sys/kernel_termios.h */ From 48e698a89c11f9793b8e0748b6e97261843e0f95 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 25 Jan 1997 02:36:30 +0000 Subject: [PATCH 0790/4487] update from main archive 970124 --- sysdeps/unix/sysv/linux/alpha/ioperm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c index 488265a069..b39f39a0d7 100644 --- a/sysdeps/unix/sysv/linux/alpha/ioperm.c +++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c @@ -67,8 +67,8 @@ #define CIA_DENSE_MEM (0xfffffc8600000000UL) #define T2_IO_BASE (0xfffffc03a0000000UL) -#define T2_SPARSE_BASE (0xfffffc0200000000UL) -#define T2_DENSE_BASE (0xfffffc03c0000000UL) +#define T2_SPARSE_MEM (0xfffffc0200000000UL) +#define T2_DENSE_MEM (0xfffffc03c0000000UL) typedef enum { IOSYS_UNKNOWN, IOSYS_JENSEN, IOSYS_APECS, IOSYS_CIA, IOSYS_T2 From 4cc93c083b65d86c69aa096aa90478892aee4a1e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 27 Jan 1997 06:02:00 +0000 Subject: [PATCH 0791/4487] update from main archive 970126 --- sysdeps/unix/sysv/linux/alpha/Dist | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist index f3c4cb92d6..344ffa55fb 100644 --- a/sysdeps/unix/sysv/linux/alpha/Dist +++ b/sysdeps/unix/sysv/linux/alpha/Dist @@ -3,8 +3,8 @@ ieee_get_fp_control.S ieee_set_fp_control.S ioperm.c init-first.h clone.S +kernel_sigaction.h sys/io.h -kernel_termios.h sys/acct.h -sys/kernel_sigaction.h +sys/kernel_termios.h sys/procfs.h From 2afcaa902696b4f2fb28c010265e2113456e28eb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 28 Jan 1997 03:59:28 +0000 Subject: [PATCH 0792/4487] update from main archive 970127 --- sysdeps/unix/sysv/linux/alpha/termbits.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/termbits.h b/sysdeps/unix/sysv/linux/alpha/termbits.h index bcd3ff5d63..d0932c1cd7 100644 --- a/sysdeps/unix/sysv/linux/alpha/termbits.h +++ b/sysdeps/unix/sysv/linux/alpha/termbits.h @@ -17,6 +17,9 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef _TERMBITS_H +#define _TERMBITS_H 1 + typedef unsigned char cc_t; typedef unsigned int speed_t; typedef unsigned int tcflag_t; @@ -186,3 +189,5 @@ struct termios #define _IOT_termios /* Hurd ioctl type field. */ \ _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2) + +#endif /* _TERMBITS_H */ From 058af9f0a626b54248eabbc7fcd1f7080f4a6531 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 29 Jan 1997 03:50:12 +0000 Subject: [PATCH 0793/4487] update from main archive 970128 --- sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S index 8486cfaa3a..d2d2add56c 100644 --- a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S +++ b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger , 1995. @@ -23,7 +23,7 @@ LEAF(__ieee_set_fp_control, 16) #ifdef PROF - ldgp gp, 0(sp) + ldgp gp, 0(pv) lda sp, -16(sp) .set noat lda AT, _mcount From 19e7f5a66437bcb678d3234e9570535aec6e2017 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 2 Feb 1997 01:49:47 +0000 Subject: [PATCH 0794/4487] update from main archive 970201 --- sysdeps/alpha/dl-machine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 1d01f035ea..b735e15ae3 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -43,7 +43,7 @@ elf_machine_matches_host (Elf64_Word e_machine) static inline Elf64_Addr elf_machine_dynamic (void) { -#ifdef AXP_MULTI_GOT_LD +#ifndef NO_AXP_MULTI_GOT_LD return (Elf64_Addr) &_DYNAMIC; #else register Elf64_Addr *gp __asm__ ("$29"); From f316a01110a84804a92403da72c92b60e389e62c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 3 Feb 1997 03:18:05 +0000 Subject: [PATCH 0795/4487] update from main archive 970202 --- sysdeps/alpha/stxncpy.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/alpha/stxncpy.S b/sysdeps/alpha/stxncpy.S index 8c5fcf6e67..f47348e3fc 100644 --- a/sysdeps/alpha/stxncpy.S +++ b/sysdeps/alpha/stxncpy.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. Contributed by Richard Henderson (rth@tamu.edu) This file is part of the GNU C Library. @@ -321,9 +321,9 @@ $unaligned: mskqh t2, t5, t2 # e0 : begin src byte validity mask cmpbge zero, t1, t7 # .. e1 : is there a zero? extql t2, a1, t2 # e0 : - or t7, t10, t6 # .. e1 : test for end-of-count too + or t7, t10, t5 # .. e1 : test for end-of-count too cmpbge zero, t2, t3 # e0 : - cmoveq a2, t6, t7 # .. e1 : + cmoveq a2, t5, t7 # .. e1 : andnot t7, t3, t7 # e0 : beq t7, $u_head # .. e1 (zdb) From 362edefbd8ecea2292c893794aa1712c2abfcada Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 4 Feb 1997 02:00:49 +0000 Subject: [PATCH 0796/4487] update from main archive 970203 --- sysdeps/m68k/asm-syntax.h | 110 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 sysdeps/m68k/asm-syntax.h diff --git a/sysdeps/m68k/asm-syntax.h b/sysdeps/m68k/asm-syntax.h new file mode 100644 index 0000000000..fbb0e2f5d2 --- /dev/null +++ b/sysdeps/m68k/asm-syntax.h @@ -0,0 +1,110 @@ +/* Definitions for 68k syntax variations. + Copyright (C) 1992, 1994, 1996, 1997 Free Software Foundation, Inc. + + This file is part of the GNU C Library. Its master source is NOT part of + the C library, however. The master source lives in the GNU MP Library. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_ELF + +/* ELF uses byte-counts for .align, most others use log2 of count of bytes. */ +#define ALIGNARG(log2) 1< Date: Mon, 10 Feb 1997 03:19:47 +0000 Subject: [PATCH 0797/4487] update from main archive 970209 --- sysdeps/unix/sysv/linux/m68k/brk.c | 35 +++++++++++++++++------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/sysdeps/unix/sysv/linux/m68k/brk.c b/sysdeps/unix/sysv/linux/m68k/brk.c index 402dfc56f7..bbbcf84188 100644 --- a/sysdeps/unix/sysv/linux/m68k/brk.c +++ b/sysdeps/unix/sysv/linux/m68k/brk.c @@ -1,27 +1,32 @@ /* brk system call for Linux/m68k. -Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. + Copyright (C) 1996, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include #include #include -void *__curbrk; +void *__curbrk = 0; + +/* Old braindamage in GCC's crtstuff.c requires this symbol in an attempt + to work around different old braindamage in the old Linux/x86 ELF + dynamic linker. Sigh. */ +weak_alias (__curbrk, ___brk_addr) int __brk (void *addr) From 4ead5e716303c75031bfcabd288f8e448e2b6146 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 15 Feb 1997 04:31:01 +0000 Subject: [PATCH 0798/4487] Update to 2.1.x development version --- sysdeps/alpha/dl-machine.h | 5 +++-- sysdeps/m68k/dl-machine.h | 24 ++++++++++++------------ sysdeps/mips/dl-machine.h | 8 ++++---- 3 files changed, 19 insertions(+), 18 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index b735e15ae3..316f717e01 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -324,7 +324,8 @@ elf_alpha_fix_plt(struct link_map *l, static inline void elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc, - const Elf64_Sym *sym) + const Elf64_Sym *sym, + const hash_name_pair *version) { Elf64_Addr * const reloc_addr = (void *)(map->l_addr + reloc->r_offset); unsigned long const r_info = ELF64_R_TYPE (reloc->r_info); @@ -355,7 +356,7 @@ elf_machine_rela (struct link_map *map, { Elf64_Addr loadbase, sym_value; - loadbase = RESOLVE (&sym, + loadbase = RESOLVE (&sym, version, r_info == R_ALPHA_JMP_SLOT ? DL_LOOKUP_NOPLT : 0); sym_value = sym ? loadbase + sym->st_value : 0; diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index a4b1edcdd9..95a8342574 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. m68k version. - Copyright (C) 1996 Free Software Foundation, Inc. + Copyright (C) 1996, 1997 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 @@ -199,8 +199,8 @@ elf_machine_runtime_setup (struct link_map *l, int lazy) MAP is the object containing the reloc. */ static inline void -elf_machine_rela (struct link_map *map, - const Elf32_Rela *reloc, const Elf32_Sym *sym) +elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, + const Elf32_Sym *sym, const hash_name_pair *version) { Elf32_Addr *const reloc_addr = (void *) (map->l_addr + reloc->r_offset); Elf32_Addr loadbase; @@ -208,29 +208,29 @@ elf_machine_rela (struct link_map *map, switch (ELF32_R_TYPE (reloc->r_info)) { case R_68K_COPY: - loadbase = RESOLVE (&sym, DL_LOOKUP_NOEXEC); + loadbase = RESOLVE (&sym, version, DL_LOOKUP_NOEXEC); memcpy (reloc_addr, (void *) (loadbase + sym->st_value), sym->st_size); break; case R_68K_GLOB_DAT: - loadbase = RESOLVE (&sym, 0); + loadbase = RESOLVE (&sym, version, 0); *reloc_addr = sym ? (loadbase + sym->st_value) : 0; break; case R_68K_JMP_SLOT: - loadbase = RESOLVE (&sym, DL_LOOKUP_NOPLT); + loadbase = RESOLVE (&sym, version, DL_LOOKUP_NOPLT); *reloc_addr = sym ? (loadbase + sym->st_value) : 0; break; case R_68K_8: - loadbase = RESOLVE (&sym, 0); + loadbase = RESOLVE (&sym, version, 0); *(char *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) + reloc->r_addend); break; case R_68K_16: - loadbase = RESOLVE (&sym, 0); + loadbase = RESOLVE (&sym, version, 0); *(short *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) + reloc->r_addend); break; case R_68K_32: - loadbase = RESOLVE (&sym, 0); + loadbase = RESOLVE (&sym, version, 0); *reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) + reloc->r_addend); break; @@ -238,17 +238,17 @@ elf_machine_rela (struct link_map *map, *reloc_addr = map->l_addr + reloc->r_addend; break; case R_68K_PC8: - loadbase = RESOLVE (&sym, 0); + loadbase = RESOLVE (&sym, version, 0); *(char *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) + reloc->r_addend - (Elf32_Addr) reloc_addr); break; case R_68K_PC16: - loadbase = RESOLVE (&sym, 0); + loadbase = RESOLVE (&sym, version, 0); *(short *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) + reloc->r_addend - (Elf32_Addr) reloc_addr); break; case R_68K_PC32: - loadbase = RESOLVE (&sym, 0); + loadbase = RESOLVE (&sym, version, 0); *reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) + reloc->r_addend - (Elf32_Addr) reloc_addr); break; diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 9e80426ee3..a4a02bfd97 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. MIPS version. - Copyright (C) 1996 Free Software Foundation, Inc. + Copyright (C) 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Kazumoto Kojima . @@ -422,8 +422,8 @@ _dl_start_user:\n\ MAP is the object containing the reloc. */ static inline void -elf_machine_rel (struct link_map *map, - const ElfW(Rel) *reloc, const ElfW(Sym) *sym) +elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, + const ElfW(Sym) *sym, const hash_name_pair *version) { ElfW(Addr) *const reloc_addr = (void *) (map->l_addr + reloc->r_offset); ElfW(Addr) loadbase, undo; @@ -454,7 +454,7 @@ elf_machine_rel (struct link_map *map, else #endif undo = 0; - loadbase = RESOLVE (&sym, 0); + loadbase = RESOLVE (&sym, version, 0); *reloc_addr += (sym ? (loadbase + sym->st_value) : 0) - undo; } break; From d6abe77e92825e8933565881ed6a231e9aa4a3f5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 19 Feb 1997 04:43:26 +0000 Subject: [PATCH 0799/4487] update from main archive 970218 --- sysdeps/alpha/dl-machine.h | 2 +- sysdeps/m68k/dl-machine.h | 2 +- sysdeps/mips/dl-machine.h | 2 +- sysdeps/unix/bsd/sun/sunos4/resourcebits.h | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 316f717e01..fc9f9712cb 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -325,7 +325,7 @@ static inline void elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc, const Elf64_Sym *sym, - const hash_name_pair *version) + const struct r_found_version *version) { Elf64_Addr * const reloc_addr = (void *)(map->l_addr + reloc->r_offset); unsigned long const r_info = ELF64_R_TYPE (reloc->r_info); diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index 95a8342574..0c9b6acb6d 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -200,7 +200,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy) static inline void elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, - const Elf32_Sym *sym, const hash_name_pair *version) + const Elf32_Sym *sym, const struct r_found_version *version) { Elf32_Addr *const reloc_addr = (void *) (map->l_addr + reloc->r_offset); Elf32_Addr loadbase; diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index a4a02bfd97..39a1cc8be6 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -423,7 +423,7 @@ _dl_start_user:\n\ static inline void elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, - const ElfW(Sym) *sym, const hash_name_pair *version) + const ElfW(Sym) *sym, const struct r_found_version *version) { ElfW(Addr) *const reloc_addr = (void *) (map->l_addr + reloc->r_offset); ElfW(Addr) loadbase, undo; diff --git a/sysdeps/unix/bsd/sun/sunos4/resourcebits.h b/sysdeps/unix/bsd/sun/sunos4/resourcebits.h index d0d177c6ff..ff55773e69 100644 --- a/sysdeps/unix/bsd/sun/sunos4/resourcebits.h +++ b/sysdeps/unix/bsd/sun/sunos4/resourcebits.h @@ -1,5 +1,5 @@ /* Bit values for resource limits. SunOS 4 version. - Copyright (C) 1994, 1996 Free Software Foundation, Inc. + Copyright (C) 1994, 1996, 1997 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 @@ -49,8 +49,8 @@ enum __rlimit_resource /* Number of open files. */ RLIMIT_NOFILE, RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */ -#defin RLIMIT_NOFILE RLIMIT_NOFILE -#defin RLIMIT_OFILE RLIMIT_OFILE +#define RLIMIT_NOFILE RLIMIT_NOFILE +#define RLIMIT_OFILE RLIMIT_OFILE RLIM_NLIMITS, From 28c50ce97ff57d2c8ac834f5d2e46abf6d56ed0e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 4 Mar 1997 05:53:20 +0000 Subject: [PATCH 0800/4487] update from main archive 970304 --- sysdeps/m68k/fpu/__math.h | 336 ++++++++++++++-------- sysdeps/m68k/fpu/e_acos.c | 30 +- sysdeps/m68k/fpu/e_fmod.c | 30 +- sysdeps/m68k/fpu/k_cos.c | 30 +- sysdeps/m68k/fpu/k_sin.c | 30 +- sysdeps/m68k/fpu/k_tan.c | 30 +- sysdeps/m68k/fpu/s_atan.c | 42 +-- sysdeps/m68k/fpu/s_frexp.c | 44 +-- sysdeps/m68k/fpu/s_ilogb.c | 42 +-- sysdeps/m68k/fpu/s_isinf.c | 42 +-- sysdeps/m68k/fpu/s_modf.c | 44 +-- sysdeps/m68k/fpu/s_scalbn.c | 43 +-- sysdeps/unix/sysv/linux/alpha/brk.S | 17 +- sysdeps/unix/sysv/sysv4/solaris2/Makefile | 2 +- 14 files changed, 437 insertions(+), 325 deletions(-) diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h index 0e3e2a3d8c..1a29a56d92 100644 --- a/sysdeps/m68k/fpu/__math.h +++ b/sysdeps/m68k/fpu/__math.h @@ -1,26 +1,27 @@ -/* Copyright (C) 1991, 92, 93, 94, 96 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Definitions of inline math functions implemented by the m68881/2. + Copyright (C) 1991, 92, 93, 94, 96, 97 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifdef __GNUC__ #include -#ifdef __NO_M81_MATH_INLINES +#ifdef __LIBC_M81_MATH_INLINES /* This is used when defining the functions themselves. Define them with __ names, and with `static inline' instead of `extern inline' so the bodies will always be used, never an external function call. */ @@ -34,36 +35,35 @@ Cambridge, MA 02139, USA. */ /* Define a const math function. */ #define __m81_defun(rettype, func, args) \ - __m81_inline rettype \ - __m81_u(func) args __attribute__((__const__)); \ - __m81_inline rettype \ + __m81_inline rettype __attribute__((__const__)) \ __m81_u(func) args /* Define the three variants of a math function that has a direct implementation in the m68k fpu. FUNC is the name for C (which will be suffixed with f and l for the float and long double version, resp). OP is the name of the fpu operation (without leading f). */ -#define __inline_mathop(func, op) \ - __m81_defun (double, func, (double __mathop_x)) \ - { \ - double __result; \ - __asm("f" __STRING(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x));\ - return __result; \ - } \ - __m81_defun (float, func##f, (float __mathop_x)) \ - { \ - float __result; \ - __asm("f" __STRING(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x));\ - return __result; \ - } \ - __m81_defun (long double, func##l, (long double __mathop_x)) \ + +#ifdef __USE_MISC +#define __inline_mathop(func, op) \ + __inline_mathop1(double, func, op) \ + __inline_mathop1(float, __CONCAT(func,f), op) \ + __inline_mathop1(long double, __CONCAT(func,l), op) +#else +#define __inline_mathop(func, op) \ + __inline_mathop1(double, func, op) +#endif + +#define __inline_mathop1(float_type,func, op) \ + __m81_defun (float_type, func, (float_type __mathop_x)) \ { \ - long double __result; \ + float_type __result; \ __asm("f" __STRING(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x));\ return __result; \ } +#ifdef __LIBC_M81_MATH_INLINES /* ieee style elementary functions */ +/* These are internal to the implementation of libm. */ __inline_mathop(__ieee754_acos, acos) __inline_mathop(__ieee754_asin, asin) __inline_mathop(__ieee754_cosh, cosh) @@ -73,6 +73,7 @@ __inline_mathop(__ieee754_log10, log10) __inline_mathop(__ieee754_log, logn) __inline_mathop(__ieee754_sqrt, sqrt) __inline_mathop(__ieee754_atanh, atanh) +#endif __inline_mathop(__atan, atan) __inline_mathop(__cos, cos) @@ -88,31 +89,56 @@ __inline_mathop(__log1p, lognp1) __inline_mathop(__logb, log2) __inline_mathop(__significand, getman) +#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__ + +__inline_mathop(atan, atan) +__inline_mathop(cos, cos) +__inline_mathop(sin, sin) +__inline_mathop(tan, tan) +__inline_mathop(tanh, tanh) +__inline_mathop(fabs, abs) +__inline_mathop(sqrt, sqrt) + +#if defined(__USE_MISC) || defined(__USE_XOPEN_EXTENDED) +__inline_mathop(rint, int) +__inline_mathop(expm1, etoxm1) +__inline_mathop(log1p, lognp1) +__inline_mathop(logb, log2) +#endif + +#ifdef __USE_MISC +__inline_mathop(significand, getman) +#endif + +#endif /* !__NO_MATH_INLINES && __OPTIMIZE__ */ + /* This macro contains the definition for the rest of the inline functions, using __FLOAT_TYPE as the domain type and __S as the suffix for the function names. */ -#define __inline_functions(__float_type, __s) \ -__m81_defun (__float_type, \ - __ieee754_remainder##__s, (__float_type __x, __float_type __y)) \ +#ifdef __LIBC_M81_MATH_INLINES +/* Internally used functions. */ +#define __internal_inline_functions(float_type, s) \ +__m81_defun (float_type, __CONCAT(__ieee754_remainder,s), \ + (float_type __x, float_type __y)) \ { \ - __float_type __result; \ + float_type __result; \ __asm("frem%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); \ return __result; \ } \ \ -__m81_defun (__float_type, \ - __ieee754_fmod##__s, (__float_type __x, __float_type __y)) \ +__m81_defun (float_type, __CONCAT(__ieee754_fmod,s), \ + (float_type __x, float_type __y)) \ { \ - __float_type __result; \ + float_type __result; \ __asm("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); \ return __result; \ } \ \ -__m81_defun (__float_type, \ - __ieee754_atan2##__s, (__float_type __y, __float_type __x)) \ +__m81_defun (float_type, __CONCAT(__ieee754_atan2,s), \ + (float_type __y, float_type __x)) \ { \ - __float_type __pi, __pi_2; \ + float_type __pi, __pi_2; \ \ __asm ("fmovecr%.x %#0, %0" : "=f" (__pi)); \ __asm ("fscale%.w %#-1, %0" : "=f" (__pi_2) : "0" (__pi)); \ @@ -121,16 +147,16 @@ __m81_defun (__float_type, \ if (__y > 0) \ { \ if (__x > __y) \ - return __m81_u(__atan##__s) (__y / __x); \ + return __m81_u(__CONCAT(__atan,s)) (__y / __x); \ else \ - return __pi_2 - __m81_u(__atan##__s) (__x / __y); \ + return __pi_2 - __m81_u(__CONCAT(__atan,s)) (__x / __y); \ } \ else \ { \ if (__x > -__y) \ - return __m81_u(__atan##__s) (__y / __x); \ + return __m81_u(__CONCAT(__atan,s)) (__y / __x); \ else \ - return -__pi_2 - __m81_u(__atan##__s) (__x / __y); \ + return -__pi_2 - __m81_u(__CONCAT(__atan,s)) (__x / __y); \ } \ } \ else \ @@ -138,58 +164,24 @@ __m81_defun (__float_type, \ if (__y > 0) \ { \ if (-__x < __y) \ - return __pi + __m81_u(__atan##__s) (__y / __x); \ + return __pi + __m81_u(__CONCAT(__atan,s)) (__y / __x); \ else \ - return __pi_2 - __m81_u(__atan##__s) (__x / __y); \ + return __pi_2 - __m81_u(__CONCAT(__atan,s)) (__x / __y); \ } \ else \ { \ if (-__x > -__y) \ - return -__pi + __m81_u(__atan##__s) (__y / __x); \ + return -__pi + __m81_u(__CONCAT(__atan,s)) (__y / __x); \ else \ - return -__pi_2 - __m81_u(__atan##__s) (__x / __y); \ + return -__pi_2 - __m81_u(__CONCAT(__atan,s)) (__x / __y); \ } \ } \ } \ \ -__m81_inline __float_type \ -__m81_u(__frexp##__s)(__float_type __value, int *__expptr) \ -{ \ - __float_type __mantissa, __exponent; \ - int __iexponent; \ - if (__value == 0.0) \ - { \ - *__expptr = 0; \ - return __value; \ - } \ - __asm("fgetexp%.x %1, %0" : "=f" (__exponent) : "f" (__value)); \ - __iexponent = (int) __exponent + 1; \ - *__expptr = __iexponent; \ - __asm("fscale%.l %2, %0" : "=f" (__mantissa) \ - : "0" (__value), "dmi" (-__iexponent)); \ - return __mantissa; \ -} \ - \ -__m81_defun (__float_type, __floor##__s, (__float_type __x)) \ -{ \ - __float_type __result; \ - unsigned long int __ctrl_reg; \ - __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); \ - /* Set rounding towards negative infinity. */ \ - __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ - : "dmi" ((__ctrl_reg & ~0x10) | 0x20)); \ - /* Convert X to an integer, using -Inf rounding. */ \ - __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); \ - /* Restore the previous rounding mode. */ \ - __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ - : "dmi" (__ctrl_reg)); \ - return __result; \ -} \ - \ -__m81_defun (__float_type, \ - __ieee754_pow##__s, (__float_type __x, __float_type __y)) \ +__m81_defun (float_type, __CONCAT(__ieee754_pow,s), \ + (float_type __x, float_type __y)) \ { \ - __float_type __result; \ + float_type __result; \ if (__x == 0.0) \ { \ if (__y <= 0.0) \ @@ -209,12 +201,12 @@ __m81_defun (__float_type, \ __asm("ftwotox%.x %1, %0" : "=f" (__result) : "f" (__y)); \ else if (__x < 0.0) \ { \ - __float_type __temp = __m81_u (__rint##__s) (__y); \ + float_type __temp = __m81_u (__CONCAT(__rint,s)) (__y); \ if (__y == __temp) \ { \ int __i = (int) __y; \ - __result = (__m81_u(__ieee754_exp##__s) \ - (__y * __m81_u(__ieee754_log##__s) (-__x))); \ + __result = (__m81_u(__CONCAT(__ieee754_exp,s)) \ + (__y * __m81_u(__CONCAT(__ieee754_log,s)) (-__x))); \ if (__i & 1) \ __result = -__result; \ } \ @@ -222,14 +214,66 @@ __m81_defun (__float_type, \ __result = 0.0 / 0.0; \ } \ else \ - __result = (__m81_u(__ieee754_exp##__s) \ - (__y * __m81_u(__ieee754_log##__s) (__x))); \ + __result = (__m81_u(__CONCAT(__ieee754_exp,s)) \ + (__y * __m81_u(__CONCAT(__ieee754_log,s)) (__x))); \ return __result; \ } \ \ -__m81_defun (__float_type, __ceil##__s, (__float_type __x)) \ +__m81_defun (float_type, __CONCAT(__ieee754_scalb,s), \ + (float_type __x, float_type __n)) \ { \ - __float_type __result; \ + float_type __result; \ + __asm ("fscale%.x %1, %0" : "=f" (__result) : "f" (__n), "0" (__x)); \ + return __result; \ +} + +__internal_inline_functions (double,) +__internal_inline_functions (float,f) +__internal_inline_functions (long double,l) +#undef __internal_inline_functions + +#endif /* __LIBC_M81_MATH_INLINES */ + +/* The rest of the functions are available to the user. */ + +#define __inline_functions(float_type, s) \ +__m81_inline float_type \ +__m81_u(__CONCAT(__frexp,s))(float_type __value, int *__expptr) \ +{ \ + float_type __mantissa, __exponent; \ + int __iexponent; \ + if (__value == 0.0) \ + { \ + *__expptr = 0; \ + return __value; \ + } \ + __asm("fgetexp%.x %1, %0" : "=f" (__exponent) : "f" (__value)); \ + __iexponent = (int) __exponent + 1; \ + *__expptr = __iexponent; \ + __asm("fscale%.l %2, %0" : "=f" (__mantissa) \ + : "0" (__value), "dmi" (-__iexponent)); \ + return __mantissa; \ +} \ + \ +__m81_defun (float_type, __CONCAT(__floor,s), (float_type __x)) \ +{ \ + float_type __result; \ + unsigned long int __ctrl_reg; \ + __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); \ + /* Set rounding towards negative infinity. */ \ + __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ + : "dmi" ((__ctrl_reg & ~0x10) | 0x20)); \ + /* Convert X to an integer, using -Inf rounding. */ \ + __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); \ + /* Restore the previous rounding mode. */ \ + __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ + : "dmi" (__ctrl_reg)); \ + return __result; \ +} \ + \ +__m81_defun (float_type, __CONCAT(__ceil,s), (float_type __x)) \ +{ \ + float_type __result; \ unsigned long int __ctrl_reg; \ __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); \ /* Set rounding towards positive infinity. */ \ @@ -243,16 +287,16 @@ __m81_defun (__float_type, __ceil##__s, (__float_type __x)) \ return __result; \ } \ \ -__m81_inline __float_type \ -__m81_u(__modf##__s)(__float_type __value, __float_type *__iptr) \ +__m81_inline float_type \ +__m81_u(__CONCAT(__modf,s))(float_type __value, float_type *__iptr) \ { \ - __float_type __modf_int; \ + float_type __modf_int; \ __asm ("fintrz%.x %1, %0" : "=f" (__modf_int) : "f" (__value)); \ *__iptr = __modf_int; \ return __value - __modf_int; \ } \ \ -__m81_defun (int, __isinf##__s, (__float_type __value)) \ +__m81_defun (int, __CONCAT(__isinf,s), (float_type __value)) \ { \ /* There is no branch-condition for infinity, \ so we must extract and examine the condition codes manually. */ \ @@ -262,7 +306,7 @@ __m81_defun (int, __isinf##__s, (__float_type __value)) \ return (__fpsr & (2 << 24)) ? (__fpsr & (8 << 24) ? -1 : 1) : 0; \ } \ \ -__m81_defun (int, __isnan##__s, (__float_type __value)) \ +__m81_defun (int, __CONCAT(__isnan,s), (float_type __value)) \ { \ char __result; \ __asm("ftst%.x %1\n" \ @@ -270,7 +314,7 @@ __m81_defun (int, __isnan##__s, (__float_type __value)) \ return __result; \ } \ \ -__m81_defun (int, __finite##__s, (__float_type __value)) \ +__m81_defun (int, __CONCAT(__finite,s), (float_type __value)) \ { \ /* There is no branch-condition for infinity, so we must extract and \ examine the condition codes manually. */ \ @@ -280,34 +324,94 @@ __m81_defun (int, __finite##__s, (__float_type __value)) \ return (__fpsr & (3 << 24)) == 0; \ } \ \ -__m81_defun (int, __ilogb##__s, (__float_type __x)) \ +__m81_defun (int, __CONCAT(__ilogb,s), (float_type __x)) \ { \ - __float_type __result; \ + float_type __result; \ if (__x == 0.0) \ return 0x80000001; \ __asm("fgetexp%.x %1, %0" : "=f" (__result) : "f" (__x)); \ return (int) __result; \ } \ \ -__m81_defun (__float_type, \ - __ieee754_scalb##__s, (__float_type __x, __float_type __n)) \ +__m81_defun (float_type, __CONCAT(__scalbn,s), (float_type __x, int __n)) \ { \ - __float_type __result; \ - __asm ("fscale%.x %1, %0" : "=f" (__result) : "f" (__n), "0" (__x)); \ - return __result; \ -} \ - \ -__m81_defun (__float_type, __scalbn##__s, (__float_type __x, int __n)) \ -{ \ - __float_type __result; \ + float_type __result; \ __asm ("fscale%.l %1, %0" : "=f" (__result) : "dmi" (__n), "0" (__x)); \ return __result; \ } /* This defines the three variants of the inline functions. */ -__inline_functions (double, ) -__inline_functions (float, f) -__inline_functions (long double, l) +__inline_functions (double,) +__inline_functions (float,f) +__inline_functions (long double,l) #undef __inline_functions +#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__ + +/* Define inline versions of the user visible functions. */ + +#define __inline_forward_c(rettype, name, args1, args2) \ +extern __inline rettype __attribute__((__const__)) \ +name args1 \ +{ \ + return __CONCAT(__,name) args2; \ +} + +#define __inline_forward(rettype, name, args1, args2) \ +extern __inline rettype name args1 \ +{ \ + return __CONCAT(__,name) args2; \ +} + +__inline_forward(double,frexp, (double __value, int *__expptr), + (__value, __expptr)) +__inline_forward_c(double,floor, (double __x), (__x)) +__inline_forward_c(double,ceil, (double __x), (__x)) +__inline_forward(double,modf, (double __value, double *__iptr), + (__value, __iptr)) +#ifdef __USE_MISC +__inline_forward_c(int,isinf, (double __value), (__value)) +__inline_forward_c(int,finite, (double __value), (__value)) +__inline_forward_c(double,scalbn, (double __x, int __n), (__x, __n)) +#endif +#if defined __USE_MISC || defined __USE_XOPEN +__inline_forward_c(int,isnan, (double __value), (__value)) +__inline_forward_c(int,ilogb, (double __value), (__value)) +#endif + +#ifdef __USE_MISC + +__inline_forward(float,frexpf, (float __value, int *__expptr), + (__value, __expptr)) +__inline_forward_c(float,floorf, (float __x), (__x)) +__inline_forward_c(float,ceilf, (float __x), (__x)) +__inline_forward(float,modff, (float __value, float *__iptr), + (__value, __iptr)) +__inline_forward_c(int,isinff, (float __value), (__value)) +__inline_forward_c(int,finitef, (float __value), (__value)) +__inline_forward_c(float,scalbnf, (float __x, int __n), (__x, __n)) +__inline_forward_c(int,isnanf, (float __value), (__value)) +__inline_forward_c(int,ilogbf, (float __value), (__value)) + +__inline_forward(long double,frexpl, (long double __value, int *__expptr), + (__value, __expptr)) +__inline_forward_c(long double,floorl, (long double __x), (__x)) +__inline_forward_c(long double,ceill, (long double __x), (__x)) +__inline_forward(long double,modfl, + (long double __value, long double *__iptr), + (__value, __iptr)) +__inline_forward_c(int,isinfl, (long double __value), (__value)) +__inline_forward_c(int,finitel, (long double __value), (__value)) +__inline_forward_c(long double,scalbnl, (long double __x, int __n), + (__x, __n)) +__inline_forward_c(int,isnanl, (long double __value), (__value)) +__inline_forward_c(int,ilogbl, (long double __value), (__value)) + +#endif /* __USE_MISC */ + +#undef __inline_forward +#undef __inline_forward_c + +#endif /* !__NO_MATH_INLINES && __OPTIMIZE__ */ + #endif /* GCC. */ diff --git a/sysdeps/m68k/fpu/e_acos.c b/sysdeps/m68k/fpu/e_acos.c index 61c374d917..7ea9fb014b 100644 --- a/sysdeps/m68k/fpu/e_acos.c +++ b/sysdeps/m68k/fpu/e_acos.c @@ -1,22 +1,22 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1996, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -#define __NO_M81_MATH_INLINES +#define __LIBC_M81_MATH_INLINES #include #include "math_private.h" diff --git a/sysdeps/m68k/fpu/e_fmod.c b/sysdeps/m68k/fpu/e_fmod.c index bf2f7ed1bb..1daa453618 100644 --- a/sysdeps/m68k/fpu/e_fmod.c +++ b/sysdeps/m68k/fpu/e_fmod.c @@ -1,22 +1,22 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1996, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -#define __NO_M81_MATH_INLINES +#define __LIBC_M81_MATH_INLINES #include #include "math_private.h" diff --git a/sysdeps/m68k/fpu/k_cos.c b/sysdeps/m68k/fpu/k_cos.c index 6bb9090568..516d45904e 100644 --- a/sysdeps/m68k/fpu/k_cos.c +++ b/sysdeps/m68k/fpu/k_cos.c @@ -1,22 +1,22 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1996, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -#define __NO_M81_MATH_INLINES +#define __LIBC_M81_MATH_INLINES #include #include "math_private.h" diff --git a/sysdeps/m68k/fpu/k_sin.c b/sysdeps/m68k/fpu/k_sin.c index f10c7f9801..348bc8fd9d 100644 --- a/sysdeps/m68k/fpu/k_sin.c +++ b/sysdeps/m68k/fpu/k_sin.c @@ -1,22 +1,22 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1996, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -#define __NO_M81_MATH_INLINES +#define __LIBC_M81_MATH_INLINES #include #include "math_private.h" diff --git a/sysdeps/m68k/fpu/k_tan.c b/sysdeps/m68k/fpu/k_tan.c index 9c222cd6e1..c38327e571 100644 --- a/sysdeps/m68k/fpu/k_tan.c +++ b/sysdeps/m68k/fpu/k_tan.c @@ -1,22 +1,22 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1996, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -#define __NO_M81_MATH_INLINES +#define __LIBC_M81_MATH_INLINES #include #include "math_private.h" diff --git a/sysdeps/m68k/fpu/s_atan.c b/sysdeps/m68k/fpu/s_atan.c index 99b3024326..f3d6960dc1 100644 --- a/sysdeps/m68k/fpu/s_atan.c +++ b/sysdeps/m68k/fpu/s_atan.c @@ -1,23 +1,22 @@ -/* Copyright (C) 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#define __NO_M81_MATH_INLINES +/* Copyright (C) 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#define __LIBC_M81_MATH_INLINES #include #ifndef FUNC @@ -30,7 +29,8 @@ Cambridge, MA 02139, USA. */ #define __CONCATX(a,b) __CONCAT(a,b) float_type -DEFUN(__CONCATX(__,FUNC), (x), float_type x) +__CONCATX(__,FUNC) (x) + float_type x; { return __m81_u(__CONCATX(__,FUNC))(x); } diff --git a/sysdeps/m68k/fpu/s_frexp.c b/sysdeps/m68k/fpu/s_frexp.c index 8b38086e27..84a9a0b45d 100644 --- a/sysdeps/m68k/fpu/s_frexp.c +++ b/sysdeps/m68k/fpu/s_frexp.c @@ -1,23 +1,22 @@ -/* Copyright (C) 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#define __NO_M81_MATH_INLINES +/* Copyright (C) 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#define __LIBC_M81_MATH_INLINES #include #ifndef FUNC @@ -30,9 +29,12 @@ Cambridge, MA 02139, USA. */ #define __CONCATX(a,b) __CONCAT(a,b) float_type -DEFUN(__CONCATX(__,FUNC), (value, expptr), float_type value AND int *expptr) +__CONCATX(__,FUNC) (value, expptr) + float_type value; + int *expptr; { return __m81_u(__CONCATX(__,FUNC))(value, expptr); } + #define weak_aliasx(a,b) weak_alias(a,b) weak_aliasx (__CONCATX(__,FUNC), FUNC) diff --git a/sysdeps/m68k/fpu/s_ilogb.c b/sysdeps/m68k/fpu/s_ilogb.c index 39c871481d..a081a884d4 100644 --- a/sysdeps/m68k/fpu/s_ilogb.c +++ b/sysdeps/m68k/fpu/s_ilogb.c @@ -1,23 +1,22 @@ -/* Copyright (C) 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#define __NO_M81_MATH_INLINES +/* Copyright (C) 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#define __LIBC_M81_MATH_INLINES #include #ifndef FUNC @@ -30,7 +29,8 @@ Cambridge, MA 02139, USA. */ #define __CONCATX(a,b) __CONCAT(a,b) int -DEFUN(__CONCATX(__,FUNC), (x), float_type x) +__CONCATX(__,FUNC) (x) + float_type x; { return __m81_u(__CONCATX(__,FUNC))(x); } diff --git a/sysdeps/m68k/fpu/s_isinf.c b/sysdeps/m68k/fpu/s_isinf.c index 7d4b1c44a5..fa0d1d56db 100644 --- a/sysdeps/m68k/fpu/s_isinf.c +++ b/sysdeps/m68k/fpu/s_isinf.c @@ -1,23 +1,22 @@ -/* Copyright (C) 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#define __NO_M81_MATH_INLINES +/* Copyright (C) 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#define __LIBC_M81_MATH_INLINES #include #ifndef FUNC @@ -30,7 +29,8 @@ Cambridge, MA 02139, USA. */ #define __CONCATX(a,b) __CONCAT(a,b) int -DEFUN(__CONCATX(__,FUNC), (x), float_type x) +__CONCATX(__,FUNC) (x) + float_type x; { return __m81_u(__CONCATX(__,FUNC))(x); } diff --git a/sysdeps/m68k/fpu/s_modf.c b/sysdeps/m68k/fpu/s_modf.c index 426d847ebd..6428afc3be 100644 --- a/sysdeps/m68k/fpu/s_modf.c +++ b/sysdeps/m68k/fpu/s_modf.c @@ -1,23 +1,22 @@ -/* Copyright (C) 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#define __NO_M81_MATH_INLINES +/* Copyright (C) 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#define __LIBC_M81_MATH_INLINES #include #ifndef FUNC @@ -30,9 +29,12 @@ Cambridge, MA 02139, USA. */ #define __CONCATX(a,b) __CONCAT(a,b) float_type -DEFUN(__CONCATX(__,FUNC), (x, iptr), float_type x AND float_type *iptr) +__CONCATX(__,FUNC) (x, iptr) + float_type x; + float_type *iptr; { return __m81_u(__CONCATX(__,FUNC))(x, iptr); } + #define weak_aliasx(a,b) weak_alias(a,b) weak_aliasx(__CONCATX(__,FUNC), FUNC) diff --git a/sysdeps/m68k/fpu/s_scalbn.c b/sysdeps/m68k/fpu/s_scalbn.c index 6d2b74a3d0..1d43a75de0 100644 --- a/sysdeps/m68k/fpu/s_scalbn.c +++ b/sysdeps/m68k/fpu/s_scalbn.c @@ -1,23 +1,22 @@ -/* Copyright (C) 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#define __NO_M81_MATH_INLINES +/* Copyright (C) 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#define __LIBC_M81_MATH_INLINES #include #ifndef FUNC @@ -30,7 +29,9 @@ Cambridge, MA 02139, USA. */ #define __CONCATX(a,b) __CONCAT(a,b) float_type -DEFUN(__CONCATX(__,FUNC), (x, exp), float_type x AND int exp) +__CONCATX(__,FUNC) (x, exp) + float_type x; + int exp; { return __m81_u(__CONCATX(__,FUNC))(x, exp); } diff --git a/sysdeps/unix/sysv/linux/alpha/brk.S b/sysdeps/unix/sysv/linux/alpha/brk.S index 3d9f6dca5f..f44686b9a4 100644 --- a/sysdeps/unix/sysv/linux/alpha/brk.S +++ b/sysdeps/unix/sysv/linux/alpha/brk.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe , 1993. @@ -50,20 +50,23 @@ LEAF(__brk, 0) ldiq v0, __NR_brk call_pal PAL_callsys + /* Be prepared for an OSF-style brk. */ + bne a3, $err1 + beq v0, $ok + /* Correctly handle the brk(0) query case. */ cmoveq a0, v0, a0 - - subq a0, v0, t0 - bne t0, error + xor a0, v0, t0 + bne t0, $err0 /* Update __curbrk and return cleanly. */ - stq a0, __curbrk mov zero, v0 +$ok: stq a0, __curbrk ret /* What a horrible way to die. */ -error: ldi v0, ENOMEM - jmp zero, __syscall_error +$err0: ldi v0, ENOMEM +$err1: jmp zero, __syscall_error END(__brk) diff --git a/sysdeps/unix/sysv/sysv4/solaris2/Makefile b/sysdeps/unix/sysv/sysv4/solaris2/Makefile index 3f86c46cc8..3ad90f748a 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/Makefile +++ b/sysdeps/unix/sysv/sysv4/solaris2/Makefile @@ -3,4 +3,4 @@ # along the way (e.g., glue-ctype) will fail because it'll try to link # with the libc.a being *constructed* in $(objdir). As a work-around, # we add this to each native-compile. -BUILD_CFLAGS := $(BUILD_CFLAGS) -L/lib +ALL_BUILD_CFLAGS += -L/lib From 3b117ce72c440875b5fe2df8a41dba58e415cdf9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 8 Mar 1997 05:08:06 +0000 Subject: [PATCH 0801/4487] Update feature tests to use __USE_ISOC9X. [__USE_ISOC9X]: Define __log2 and __exp2 inlines. (fabs): Remove defininition, it is a gcc builtin. (sqrt, __sqrt): Remove definition, they have wrappers in libm. --- sysdeps/m68k/fpu/__math.h | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h index 1a29a56d92..fe01c254d7 100644 --- a/sysdeps/m68k/fpu/__math.h +++ b/sysdeps/m68k/fpu/__math.h @@ -43,7 +43,7 @@ suffixed with f and l for the float and long double version, resp). OP is the name of the fpu operation (without leading f). */ -#ifdef __USE_MISC +#if defined __USE_MISC || defined __USE_ISOC9X #define __inline_mathop(func, op) \ __inline_mathop1(double, func, op) \ __inline_mathop1(float, __CONCAT(func,f), op) \ @@ -81,7 +81,6 @@ __inline_mathop(__sin, sin) __inline_mathop(__tan, tan) __inline_mathop(__tanh, tanh) __inline_mathop(__fabs, abs) -__inline_mathop(__sqrt, sqrt) __inline_mathop(__rint, int) __inline_mathop(__expm1, etoxm1) @@ -89,6 +88,9 @@ __inline_mathop(__log1p, lognp1) __inline_mathop(__logb, log2) __inline_mathop(__significand, getman) +__inline_mathop(__log2, log2) +__inline_mathop(__exp2, twotox) + #if !defined __NO_MATH_INLINES && defined __OPTIMIZE__ __inline_mathop(atan, atan) @@ -96,10 +98,8 @@ __inline_mathop(cos, cos) __inline_mathop(sin, sin) __inline_mathop(tan, tan) __inline_mathop(tanh, tanh) -__inline_mathop(fabs, abs) -__inline_mathop(sqrt, sqrt) -#if defined(__USE_MISC) || defined(__USE_XOPEN_EXTENDED) +#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC9X __inline_mathop(rint, int) __inline_mathop(expm1, etoxm1) __inline_mathop(log1p, lognp1) @@ -110,6 +110,11 @@ __inline_mathop(logb, log2) __inline_mathop(significand, getman) #endif +#ifdef __USE_ISOC9X +__inline_mathop(log2, log2) +__inline_mathop(exp2, twotox) +#endif + #endif /* !__NO_MATH_INLINES && __OPTIMIZE__ */ /* This macro contains the definition for the rest of the inline @@ -375,11 +380,13 @@ __inline_forward_c(int,finite, (double __value), (__value)) __inline_forward_c(double,scalbn, (double __x, int __n), (__x, __n)) #endif #if defined __USE_MISC || defined __USE_XOPEN +#ifndef __USE_ISOC9X /* Conflict with macro of same name. */ __inline_forward_c(int,isnan, (double __value), (__value)) +#endif __inline_forward_c(int,ilogb, (double __value), (__value)) #endif -#ifdef __USE_MISC +#if defined __USE_MISC || defined __USE_ISOC9X __inline_forward(float,frexpf, (float __value, int *__expptr), (__value, __expptr)) @@ -387,11 +394,13 @@ __inline_forward_c(float,floorf, (float __x), (__x)) __inline_forward_c(float,ceilf, (float __x), (__x)) __inline_forward(float,modff, (float __value, float *__iptr), (__value, __iptr)) +#ifdef __USE_MISC __inline_forward_c(int,isinff, (float __value), (__value)) __inline_forward_c(int,finitef, (float __value), (__value)) __inline_forward_c(float,scalbnf, (float __x, int __n), (__x, __n)) __inline_forward_c(int,isnanf, (float __value), (__value)) __inline_forward_c(int,ilogbf, (float __value), (__value)) +#endif __inline_forward(long double,frexpl, (long double __value, int *__expptr), (__value, __expptr)) @@ -400,14 +409,16 @@ __inline_forward_c(long double,ceill, (long double __x), (__x)) __inline_forward(long double,modfl, (long double __value, long double *__iptr), (__value, __iptr)) +#ifdef __USE_MISC __inline_forward_c(int,isinfl, (long double __value), (__value)) __inline_forward_c(int,finitel, (long double __value), (__value)) __inline_forward_c(long double,scalbnl, (long double __x, int __n), (__x, __n)) __inline_forward_c(int,isnanl, (long double __value), (__value)) __inline_forward_c(int,ilogbl, (long double __value), (__value)) +#endif -#endif /* __USE_MISC */ +#endif /* Use misc or ISO C9X */ #undef __inline_forward #undef __inline_forward_c From e79446f41d20c161c71ddda5c6576993dd019292 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 8 Mar 1997 17:55:27 +0000 Subject: [PATCH 0802/4487] Remove cabs inline definition. --- sysdeps/alpha/__math.h | 39 +++++++++++++++------------------------ 1 file changed, 15 insertions(+), 24 deletions(-) diff --git a/sysdeps/alpha/__math.h b/sysdeps/alpha/__math.h index 50d8ac3b0a..0f76027317 100644 --- a/sysdeps/alpha/__math.h +++ b/sysdeps/alpha/__math.h @@ -1,22 +1,22 @@ /* Inline math functions for Alpha. -Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. -Contributed by David Mosberger-Tang. + Copyright (C) 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Mosberger-Tang. -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #if defined (__GNUC__) && !defined (__NO_MATH_INLINES) @@ -41,13 +41,4 @@ atan (double __x) return __atan2 (__x, 1.0); } -#ifdef __USE_MISC -extern __inline double -cabs (struct __cabs_complex __z) -{ - extern double __hypot (double, double); - return __hypot(__z.x, __z.y); -} -#endif - #endif From 0e126f4bac922d867ec138fad4845c7b7ee2a455 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 16 Mar 1997 18:33:39 +0000 Subject: [PATCH 0803/4487] m68k specific infinity values. --- sysdeps/m68k/huge_val.h | 92 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 sysdeps/m68k/huge_val.h diff --git a/sysdeps/m68k/huge_val.h b/sysdeps/m68k/huge_val.h new file mode 100644 index 0000000000..c2139580e8 --- /dev/null +++ b/sysdeps/m68k/huge_val.h @@ -0,0 +1,92 @@ +/* `HUGE_VAL' constants for m68k (where it is infinity). + Used by and functions for overflow. + Copyright (C) 1992, 1995, 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _HUGE_VAL_H +#define _HUGE_VAL_H 1 + +#include +#include +#include + +/* IEEE positive infinity (-HUGE_VAL is negative infinity). */ + +#if __BYTE_ORDER == __BIG_ENDIAN +#define __HUGE_VAL_bytes { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 } +#endif +#if __BYTE_ORDER == __LITTLE_ENDIAN +#define __HUGE_VAL_bytes { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f } +#endif + +#define __huge_val_t union { unsigned char __c[8]; double __d; } +#ifdef __GNUC__ +#define HUGE_VAL (__extension__ \ + ((__huge_val_t) { __c: __HUGE_VAL_bytes }).__d) +#else /* Not GCC. */ +static __huge_val_t __huge_val = { __HUGE_VAL_bytes }; +#define HUGE_VAL (__huge_val.__d) +#endif /* GCC. */ + + +/* ISO C 9X extensions: (float) HUGE_VALF and (long double) HUGE_VALL. */ + +#ifdef __USE_ISOC9X + +#if __BYTE_ORDER == __BIG_ENDIAN +#define __HUGE_VALF_bytes { 0x7f, 0x80, 0, 0 } +#endif +#if __BYTE_ORDER == __LITTLE_ENDIAN +#define __HUGE_VALF_bytes { 0, 0, 0x80, 0x7f } +#endif + +#define __huge_valf_t union { unsigned char __c[4]; float __f; } +#ifdef __GNUC__ +#define HUGE_VALF (__extension__ \ + ((__huge_valf_t) { __c: __HUGE_VALF_bytes }).__f) +#else /* Not GCC. */ +static __huge_valf_t __huge_valf = { __HUGE_VALF_bytes }; +#define HUGE_VALF (__huge_valf.__f) +#endif /* GCC. */ + + +#if __BYTE_ORDER == __BIG_ENDIAN +#define __HUGE_VALL_bytes { 0x7f, 0xff, 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0 } +#endif +#if __BYTE_ORDER == __LITTLE_ENDIAN +#define __HUGE_VALL_bytes { 0, 0, 0, 0, 0, 0, 0, 0x80, 0xff, 0x7f, 0, 0 } +#endif + +#define __huge_vall_t union { unsigned char __c[12]; long double __ld; } +#ifdef __GNUC__ +#define HUGE_VALL (__extension__ \ + ((__huge_vall_t) { __c: __HUGE_VALL_bytes }).__ld) +#else /* Not GCC. */ +static __huge_vall_t __huge_vall = { __HUGE_VALL_bytes }; +#define HUGE_VALL (__huge_vall.__ld) +#endif /* GCC. */ + + +/* Expression representing positive infinity. Here it is the same as + HUGE_VALF. */ +#define INFINITY HUGE_VALF + +#endif /* __USE_ISOC9X. */ + + +#endif /* huge_val.h */ From 6b05d409ee791c60d0c3e4ef51d69ad393dc4764 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 16 Mar 1997 19:28:40 +0000 Subject: [PATCH 0804/4487] Update copyright. --- sysdeps/unix/bsd/sun/sunos4/fcntlbits.h | 30 +++++++++++----------- sysdeps/unix/bsd/ultrix4/fcntlbits.h | 34 ++++++++++++------------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/sysdeps/unix/bsd/sun/sunos4/fcntlbits.h b/sysdeps/unix/bsd/sun/sunos4/fcntlbits.h index 210072222c..a9f66c47a3 100644 --- a/sysdeps/unix/bsd/sun/sunos4/fcntlbits.h +++ b/sysdeps/unix/bsd/sun/sunos4/fcntlbits.h @@ -1,21 +1,21 @@ /* O_*, F_*, FD_* bit values for SunOS 4. -Copyright (C) 1991, 1992 Free Software Foundation, Inc. -This file is part of the GNU C Library. + Copyright (C) 1991, 1992, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _FCNTLBITS_H @@ -33,7 +33,7 @@ Cambridge, MA 02139, USA. */ #define O_EXCL 0x0800 /* Fail if file already exists. */ #define O_TRUNC 0x0400 /* Truncate file to zero length. */ #define O_NOCTTY 0x8000 /* Don't assign a controlling terminal. */ -#if defined (__USE_BSD) || defined (__USE_SVID) +#if defined __USE_BSD || defined __USE_SVID #define O_ASYNC 0x0040 /* Send SIGIO to owner when data is ready. */ #define O_FSYNC 0x2000 /* Synchronous writes. */ #define O_SYNC O_FSYNC diff --git a/sysdeps/unix/bsd/ultrix4/fcntlbits.h b/sysdeps/unix/bsd/ultrix4/fcntlbits.h index bf8e7b2a35..ba736e428e 100644 --- a/sysdeps/unix/bsd/ultrix4/fcntlbits.h +++ b/sysdeps/unix/bsd/ultrix4/fcntlbits.h @@ -1,21 +1,21 @@ /* O_*, F_*, FD_* bit values for Ultrix 4. -Copyright (C) 1991, 1992 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + Copyright (C) 1991, 1992, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _FCNTLBITS_H From c6f4ab1a9cd563e13a2933022454da44789e0c09 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 16 Mar 1997 19:31:13 +0000 Subject: [PATCH 0805/4487] Update copyright. Define O_FSYNC as alias of O_SYNC. Add BSD compatibility macros FAPPEND, FFSYNC, FNONBLOCK, and FNDELAY. --- sysdeps/unix/sysv/irix4/fcntlbits.h | 40 +++++++++++++++++++---------- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/sysdeps/unix/sysv/irix4/fcntlbits.h b/sysdeps/unix/sysv/irix4/fcntlbits.h index a8bb776cf4..318e483279 100644 --- a/sysdeps/unix/sysv/irix4/fcntlbits.h +++ b/sysdeps/unix/sysv/irix4/fcntlbits.h @@ -1,21 +1,21 @@ /* O_*, F_*, FD_* bit values for SGI Irix 4. -Copyright (C) 1994 Free Software Foundation, Inc. -This file is part of the GNU C Library. + Copyright (C) 1994, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _FCNTLBITS_H @@ -34,6 +34,7 @@ Cambridge, MA 02139, USA. */ #define O_TRUNC 01000 /* Truncate file to zero length. */ #ifdef __USE_MISC #define O_SYNC 00020 /* Synchronous writes. */ +#define O_FSYNC O_SYNC #define O_ASYNC 00100 /* Send SIGIO to owner when data is ready. */ #endif @@ -95,4 +96,15 @@ struct flock #define F_UNLCK 3 /* Remove lock. */ +/* Define some more compatibility macros to be backward compatible with + BSD systems which did not managed to hide these kernel macros. */ +#ifdef __USE_BSD +#define FAPPEND O_APPEND +#define FFSYNC O_FSYNC +#define FASYNC O_ASYNC +#define FNONBLOCK O_NONBLOCK +#define FNDELAY O_NDELAY +#endif /* Use BSD. */ + + #endif /* fcntlbits.h */ From ca22c3b98a613ebefee035a9fbd6eebd6e5e7245 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 16 Mar 1997 19:39:48 +0000 Subject: [PATCH 0806/4487] Add kernel_stat.h --- sysdeps/unix/sysv/linux/alpha/Dist | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist index 344ffa55fb..80fca49a9b 100644 --- a/sysdeps/unix/sysv/linux/alpha/Dist +++ b/sysdeps/unix/sysv/linux/alpha/Dist @@ -4,6 +4,7 @@ ioperm.c init-first.h clone.S kernel_sigaction.h +kernel_stat.h sys/io.h sys/acct.h sys/kernel_termios.h From bd0059411fd28556c922de613dc6037a106c6d45 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 16 Mar 1997 20:11:57 +0000 Subject: [PATCH 0807/4487] (struct stat): Change definition to use prescribed types for elements. (_STAT_VER): Change to value 2. --- sysdeps/unix/sysv/linux/alpha/kernel_stat.h | 19 +++++++++++ sysdeps/unix/sysv/linux/alpha/statbuf.h | 36 ++++++++++----------- 2 files changed, 37 insertions(+), 18 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/alpha/kernel_stat.h diff --git a/sysdeps/unix/sysv/linux/alpha/kernel_stat.h b/sysdeps/unix/sysv/linux/alpha/kernel_stat.h new file mode 100644 index 0000000000..7109677269 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/kernel_stat.h @@ -0,0 +1,19 @@ +/* Definition of `struct stat' used in the kernel.. */ +struct kernel_stat + { + unsigned int st_dev; + unsigned int st_ino; + unsigned int st_mode; + unsigned int st_nlink; + unsigned int st_uid; + unsigned int st_gid; + unsigned int st_rdev; + long int st_size; + unsigned long int st_atime; + unsigned long int st_mtime; + unsigned long int st_ctime; + unsigned int st_blksize; + int st_blocks; + unsigned int st_flags; + unsigned int st_gen; + }; diff --git a/sysdeps/unix/sysv/linux/alpha/statbuf.h b/sysdeps/unix/sysv/linux/alpha/statbuf.h index 92c9df7404..207fa0ca1c 100644 --- a/sysdeps/unix/sysv/linux/alpha/statbuf.h +++ b/sysdeps/unix/sysv/linux/alpha/statbuf.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997 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 @@ -19,30 +19,30 @@ #ifndef _STATBUF_H #define _STATBUF_H 1 -/* The Alpha has no additional syscall versions. */ - /* Versions of the `struct stat' data structure. */ -#define _STAT_VER 0 +#define _STAT_VER_LINUX_OLD 0 +#define _STAT_VER_LINUX 1 +#define _STAT_VER _STAT_VER_LINUX /* Versions of the `xmknod' interface. */ #define _MKNOD_VER_LINUX 0 struct stat { - unsigned int st_dev; /* Device. */ - unsigned int st_ino; /* File serial number. */ - unsigned int st_mode; /* File mode. */ - unsigned int st_nlink; /* Link count. */ - unsigned int st_uid; /* User ID of the file's owner. */ - unsigned int st_gid; /* Group ID of the file's group.*/ - unsigned int st_rdev; /* Device number, if device. */ - long int st_size; /* Size of file, in bytes. */ - unsigned long int st_atime; /* Time of last access. */ - unsigned long int st_mtime; /* Time of last modification. */ - unsigned long int st_ctime; /* Time of last status change. */ - unsigned int st_blksize; /* Optimal block size for I/O. */ -#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ - int st_blocks; /* Nr. of 512-byte blocks allocated. */ + __dev_t st_dev; /* Device. */ + __ino_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. */ + __off_t st_size; /* Size of file, in bytes. */ + __time_t st_atime; /* Time of last access. */ + __time_t st_mtime; /* Time of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned int st_blksize; /* Optimal block size for I/O. */ +#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ + int st_blocks; /* Nr. of 512-byte blocks allocated. */ unsigned int st_flags; unsigned int st_gen; }; From de806c59bb7a38dc0cbf28e318dbaafe945bce29 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 16 Mar 1997 20:12:24 +0000 Subject: [PATCH 0808/4487] [__USE_GNU]: Add O_READ, O_WRITE and O_NORW. --- sysdeps/unix/sysv/linux/alpha/fcntlbits.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/fcntlbits.h b/sysdeps/unix/sysv/linux/alpha/fcntlbits.h index e8697d9898..faf198393f 100644 --- a/sysdeps/unix/sysv/linux/alpha/fcntlbits.h +++ b/sysdeps/unix/sysv/linux/alpha/fcntlbits.h @@ -23,6 +23,12 @@ #include +/* In GNU, read and write are bits (unlike BSD). */ +#ifdef __USE_GNU +#define O_READ O_RDONLY /* Open for reading. */ +#define O_WRITE O_WRONLY /* Open for writing. */ +#define O_NORW 0 /* Open without R/W access. */ +#endif /* open/fcntl - O_SYNC is only implemented on blocks devices and on files located on an ext2 file system */ #define O_ACCMODE 0003 @@ -38,7 +44,8 @@ #define O_APPEND 00010 #define O_NDELAY O_NONBLOCK #define O_SYNC 040000 -#define FASYNC 020000 /* fcntl, for BSD compatibility */ +#define O_FSYNC O_SYNC +#define O_ASYNC 020000 /* fcntl, for BSD compatibility */ #define F_DUPFD 0 /* dup */ #define F_GETFD 1 /* get f_flags */ @@ -86,6 +93,7 @@ struct flock #ifdef __USE_BSD #define FAPPEND O_APPEND #define FFSYNC O_FSYNC +#define FASYNC O_ASYNC #define FNONBLOCK O_NONBLOCK #define FNDELAY O_NDELAY #endif /* Use BSD. */ From 465b53087d4cee3987d76970f15e67f775666f4c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Mar 1997 04:17:55 +0000 Subject: [PATCH 0809/4487] Don't define O_NORW. --- sysdeps/unix/sysv/linux/alpha/fcntlbits.h | 1 - 1 file changed, 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/fcntlbits.h b/sysdeps/unix/sysv/linux/alpha/fcntlbits.h index faf198393f..6e1c843ccb 100644 --- a/sysdeps/unix/sysv/linux/alpha/fcntlbits.h +++ b/sysdeps/unix/sysv/linux/alpha/fcntlbits.h @@ -27,7 +27,6 @@ #ifdef __USE_GNU #define O_READ O_RDONLY /* Open for reading. */ #define O_WRITE O_WRONLY /* Open for writing. */ -#define O_NORW 0 /* Open without R/W access. */ #endif /* open/fcntl - O_SYNC is only implemented on blocks devices and on files located on an ext2 file system */ From e90fcf920bd8b223cc927f7d11a7ad9caa31b3cc Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 19 Mar 1997 05:44:31 +0000 Subject: [PATCH 0810/4487] SCO 3.2.4 specific files to distribute. --- sysdeps/unix/sysv/sco3.2.4/Dist | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/sco3.2.4/Dist diff --git a/sysdeps/unix/sysv/sco3.2.4/Dist b/sysdeps/unix/sysv/sco3.2.4/Dist new file mode 100644 index 0000000000..984b473349 --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/Dist @@ -0,0 +1 @@ +__setpgid.c From 17f51151d247c83ce6f195a1830ba4b421705f54 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 19 Mar 1997 05:45:44 +0000 Subject: [PATCH 0811/4487] Add __getpgid.c and __setpgid.c. --- sysdeps/unix/sysv/sysv4/Dist | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/unix/sysv/sysv4/Dist b/sysdeps/unix/sysv/sysv4/Dist index da3d7e58e1..6395064504 100644 --- a/sysdeps/unix/sysv/sysv4/Dist +++ b/sysdeps/unix/sysv/sysv4/Dist @@ -1,2 +1,4 @@ +__getpgid.c +__setpgid.c sysconfig.h siginfo.h From 1059fb7661e754277cd318c82ae40b23d7f1c189 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 19 Mar 1997 12:48:14 +0000 Subject: [PATCH 0812/4487] Prune list of processed files. --- sysdeps/unix/bsd/osf/.cvsignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/bsd/osf/.cvsignore diff --git a/sysdeps/unix/bsd/osf/.cvsignore b/sysdeps/unix/bsd/osf/.cvsignore new file mode 100644 index 0000000000..c9147fd335 --- /dev/null +++ b/sysdeps/unix/bsd/osf/.cvsignore @@ -0,0 +1 @@ +=* From cb23ff1f5761e5a8db34ebabd185357f07af37ec Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 20 Mar 1997 19:33:28 +0000 Subject: [PATCH 0813/4487] Initialize `quotient' and `mask'. --- sysdeps/alpha/div.S | 21 ++++++++++----------- sysdeps/alpha/ldiv.S | 19 +++++++++---------- 2 files changed, 19 insertions(+), 21 deletions(-) diff --git a/sysdeps/alpha/div.S b/sysdeps/alpha/div.S index 6c461c40d4..6a5c4429e8 100644 --- a/sysdeps/alpha/div.S +++ b/sysdeps/alpha/div.S @@ -1,7 +1,6 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. - Contributed by Richard Henderson (rth@tamu.edu) - +/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. + Contributed by Richard Henderson . 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 @@ -14,10 +13,9 @@ Library General Public License for more details. You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If - not, write to the Free Software Foundation, Inc., 675 Mass Ave, - Cambridge, MA 02139, USA. */ - + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include @@ -44,7 +42,6 @@ div: .prologue 0 #endif -#define dividend t0 #define divisor t1 #define mask t2 #define quotient t3 @@ -54,11 +51,13 @@ div: #define compare t7 /* find correct sign for input to unsigned divide loop. */ + negl a1, modulus # e0 : + negl a2, divisor # .. e1 : sextl a1, a1 # e0 : sextl a2, a2 # .. e1 : - negl a1, dividend # e0 : - negl a2, divisor # .. e1 : - cmovge a1, a1, dividend # e0 : + mov zero, quotient # e0 : + mov 1, mask # .. e1 : + cmovge a1, a1, modulus # e0 : cmovge a2, a2, divisor # .. e1 : beq a2, $divbyzero # e1 : unop # : diff --git a/sysdeps/alpha/ldiv.S b/sysdeps/alpha/ldiv.S index ebbe055870..08bf8eb08d 100644 --- a/sysdeps/alpha/ldiv.S +++ b/sysdeps/alpha/ldiv.S @@ -1,7 +1,6 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. - Contributed by Richard Henderson (rth@tamu.edu) - +/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. + Contributed by Richard Henderson . 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 @@ -14,10 +13,9 @@ Library General Public License for more details. You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If - not, write to the Free Software Foundation, Inc., 675 Mass Ave, - Cambridge, MA 02139, USA. */ - + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include @@ -44,7 +42,6 @@ ldiv: .prologue 0 #endif -#define dividend t0 #define divisor t1 #define mask t2 #define quotient t3 @@ -54,11 +51,13 @@ ldiv: #define compare t7 /* find correct sign for input to unsigned divide loop. */ - mov a1, dividend # e0 : + mov a1, modulus # e0 : mov a2, divisor # .. e1 : negq a1, tmp1 # e0 : negq a2, tmp2 # .. e1 : - cmovlt a1, tmp1, dividend # e0 : + mov zero, quotient # e0 : + mov 1, mask # .. e1 : + cmovlt a1, tmp1, modulus # e0 : cmovlt a2, tmp2, divisor # .. e1 : beq a2, $divbyzero # e1 : unop # : From d44e56748387c9d08aa4421351195a8821f2e2a2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 20 Mar 1997 19:35:32 +0000 Subject: [PATCH 0814/4487] Include ctype.h for isdigit. --- sysdeps/unix/sysv/linux/alpha/ioperm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c index b39f39a0d7..63bf17588a 100644 --- a/sysdeps/unix/sysv/linux/alpha/ioperm.c +++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include From ccc92968689f29df1e6b74ed3840231cec6b2a2b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 22 Mar 1997 04:09:37 +0000 Subject: [PATCH 0815/4487] (OXTABS): Define as alias for XTABS. --- sysdeps/unix/sysv/linux/alpha/termbits.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/termbits.h b/sysdeps/unix/sysv/linux/alpha/termbits.h index d0932c1cd7..743bb3d283 100644 --- a/sysdeps/unix/sysv/linux/alpha/termbits.h +++ b/sysdeps/unix/sysv/linux/alpha/termbits.h @@ -112,6 +112,10 @@ struct termios #define VT1 00200000 #define XTABS 01000000 /* Hmm.. Linux/i386 considers this part of TABDLY.. */ +/* On Linux there is no OXTABS bit defined. Take it as an alias for + XTABS. */ +#define OXTABS XTABS + /* c_cflag bit meaning */ #define CBAUD 0000037 #define B0 0000000 /* hang up */ From 885775487a356724c71415dfa900cdf766f73b29 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 24 Mar 1997 22:12:52 +0000 Subject: [PATCH 0816/4487] Remove references to byte order macros. Don't include . --- sysdeps/m68k/huge_val.h | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/sysdeps/m68k/huge_val.h b/sysdeps/m68k/huge_val.h index c2139580e8..79e87dc2db 100644 --- a/sysdeps/m68k/huge_val.h +++ b/sysdeps/m68k/huge_val.h @@ -23,16 +23,10 @@ #include #include -#include /* IEEE positive infinity (-HUGE_VAL is negative infinity). */ -#if __BYTE_ORDER == __BIG_ENDIAN #define __HUGE_VAL_bytes { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 } -#endif -#if __BYTE_ORDER == __LITTLE_ENDIAN -#define __HUGE_VAL_bytes { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f } -#endif #define __huge_val_t union { unsigned char __c[8]; double __d; } #ifdef __GNUC__ @@ -48,12 +42,7 @@ static __huge_val_t __huge_val = { __HUGE_VAL_bytes }; #ifdef __USE_ISOC9X -#if __BYTE_ORDER == __BIG_ENDIAN #define __HUGE_VALF_bytes { 0x7f, 0x80, 0, 0 } -#endif -#if __BYTE_ORDER == __LITTLE_ENDIAN -#define __HUGE_VALF_bytes { 0, 0, 0x80, 0x7f } -#endif #define __huge_valf_t union { unsigned char __c[4]; float __f; } #ifdef __GNUC__ @@ -65,12 +54,7 @@ static __huge_valf_t __huge_valf = { __HUGE_VALF_bytes }; #endif /* GCC. */ -#if __BYTE_ORDER == __BIG_ENDIAN #define __HUGE_VALL_bytes { 0x7f, 0xff, 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0 } -#endif -#if __BYTE_ORDER == __LITTLE_ENDIAN -#define __HUGE_VALL_bytes { 0, 0, 0, 0, 0, 0, 0, 0x80, 0xff, 0x7f, 0, 0 } -#endif #define __huge_vall_t union { unsigned char __c[12]; long double __ld; } #ifdef __GNUC__ From 647de4a8f9991461ba8b478145227db9975429af Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 25 Mar 1997 01:30:32 +0000 Subject: [PATCH 0817/4487] (__logb, logb): Don't define. (__ieee754_atan2, __ieee754_pow): Don't define here. --- sysdeps/m68k/fpu/__math.h | 86 --------------------------------------- 1 file changed, 86 deletions(-) diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h index fe01c254d7..d6187015ea 100644 --- a/sysdeps/m68k/fpu/__math.h +++ b/sysdeps/m68k/fpu/__math.h @@ -85,7 +85,6 @@ __inline_mathop(__fabs, abs) __inline_mathop(__rint, int) __inline_mathop(__expm1, etoxm1) __inline_mathop(__log1p, lognp1) -__inline_mathop(__logb, log2) __inline_mathop(__significand, getman) __inline_mathop(__log2, log2) @@ -103,7 +102,6 @@ __inline_mathop(tanh, tanh) __inline_mathop(rint, int) __inline_mathop(expm1, etoxm1) __inline_mathop(log1p, lognp1) -__inline_mathop(logb, log2) #endif #ifdef __USE_MISC @@ -140,90 +138,6 @@ __m81_defun (float_type, __CONCAT(__ieee754_fmod,s), \ return __result; \ } \ \ -__m81_defun (float_type, __CONCAT(__ieee754_atan2,s), \ - (float_type __y, float_type __x)) \ -{ \ - float_type __pi, __pi_2; \ - \ - __asm ("fmovecr%.x %#0, %0" : "=f" (__pi)); \ - __asm ("fscale%.w %#-1, %0" : "=f" (__pi_2) : "0" (__pi)); \ - if (__x > 0) \ - { \ - if (__y > 0) \ - { \ - if (__x > __y) \ - return __m81_u(__CONCAT(__atan,s)) (__y / __x); \ - else \ - return __pi_2 - __m81_u(__CONCAT(__atan,s)) (__x / __y); \ - } \ - else \ - { \ - if (__x > -__y) \ - return __m81_u(__CONCAT(__atan,s)) (__y / __x); \ - else \ - return -__pi_2 - __m81_u(__CONCAT(__atan,s)) (__x / __y); \ - } \ - } \ - else \ - { \ - if (__y > 0) \ - { \ - if (-__x < __y) \ - return __pi + __m81_u(__CONCAT(__atan,s)) (__y / __x); \ - else \ - return __pi_2 - __m81_u(__CONCAT(__atan,s)) (__x / __y); \ - } \ - else \ - { \ - if (-__x > -__y) \ - return -__pi + __m81_u(__CONCAT(__atan,s)) (__y / __x); \ - else \ - return -__pi_2 - __m81_u(__CONCAT(__atan,s)) (__x / __y); \ - } \ - } \ -} \ - \ -__m81_defun (float_type, __CONCAT(__ieee754_pow,s), \ - (float_type __x, float_type __y)) \ -{ \ - float_type __result; \ - if (__x == 0.0) \ - { \ - if (__y <= 0.0) \ - __result = 0.0 / 0.0; \ - else \ - __result = 0.0; \ - } \ - else if (__y == 0.0 || __x == 1.0) \ - __result = 1.0; \ - else if (__y == 1.0) \ - __result = __x; \ - else if (__y == 2.0) \ - __result = __x * __x; \ - else if (__x == 10.0) \ - __asm("ftentox%.x %1, %0" : "=f" (__result) : "f" (__y)); \ - else if (__x == 2.0) \ - __asm("ftwotox%.x %1, %0" : "=f" (__result) : "f" (__y)); \ - else if (__x < 0.0) \ - { \ - float_type __temp = __m81_u (__CONCAT(__rint,s)) (__y); \ - if (__y == __temp) \ - { \ - int __i = (int) __y; \ - __result = (__m81_u(__CONCAT(__ieee754_exp,s)) \ - (__y * __m81_u(__CONCAT(__ieee754_log,s)) (-__x))); \ - if (__i & 1) \ - __result = -__result; \ - } \ - else \ - __result = 0.0 / 0.0; \ - } \ - else \ - __result = (__m81_u(__CONCAT(__ieee754_exp,s)) \ - (__y * __m81_u(__CONCAT(__ieee754_log,s)) (__x))); \ - return __result; \ -} \ - \ __m81_defun (float_type, __CONCAT(__ieee754_scalb,s), \ (float_type __x, float_type __n)) \ { \ From 57a52ec851efbd87b6c85955fc96e350eda64e48 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 25 Mar 1997 01:31:06 +0000 Subject: [PATCH 0818/4487] Rewritten. --- sysdeps/m68k/fpu/e_atan2.c | 100 +++++++++++++++++++++++++- sysdeps/m68k/fpu/e_atan2f.c | 5 +- sysdeps/m68k/fpu/e_atan2l.c | 5 +- sysdeps/m68k/fpu/e_pow.c | 137 +++++++++++++++++++++++++++++++++++- sysdeps/m68k/fpu/e_powf.c | 5 +- sysdeps/m68k/fpu/e_powl.c | 5 +- 6 files changed, 245 insertions(+), 12 deletions(-) diff --git a/sysdeps/m68k/fpu/e_atan2.c b/sysdeps/m68k/fpu/e_atan2.c index ae7a799ad1..58d7555f41 100644 --- a/sysdeps/m68k/fpu/e_atan2.c +++ b/sysdeps/m68k/fpu/e_atan2.c @@ -1,2 +1,98 @@ -#define FUNC __ieee754_atan2 -#include +/* Copyright (C) 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#define __LIBC_M81_MATH_INLINES +#include +#include "math_private.h" + +#ifndef SUFF +#define SUFF +#endif +#ifndef float_type +#define float_type double +#endif + +#define __CONCATX(a,b) __CONCAT(a,b) + +float_type +__CONCATX(__ieee754_atan2,SUFF) (float_type y, float_type x) +{ + float_type pi, pi_2, z; + + __asm ("fmovecr%.x %#0, %0" : "=f" (pi)); + __asm ("fscale%.w %#-1, %0" : "=f" (pi_2) : "0" (pi)); + if (x != x || y != y) + z = x + y; + else if (y == 0) + { + if (signbit (x)) + z = signbit (y) ? -pi : pi; + else + z = y; + } + else if (__m81_u(__CONCATX(__isinf,SUFF)) (x)) + { + if (__m81_u(__CONCATX(__isinf,SUFF)) (y)) + { + float_type pi_4; + __asm ("fscale%.w %#-1, %0" : "=f" (pi_4) : "0" (pi_2)); + z = x > 0 ? pi_4 : 3 * pi_4; + } + else + z = x > 0 ? 0 : pi; + if (signbit (y)) + z = -z; + } + else if (__m81_u(__CONCATX(__isinf,SUFF)) (y)) + z = y > 0 ? pi_2 : -pi_2; + else if (x > 0) + { + if (y > 0) + { + if (x > y) + z = __m81_u(__CONCATX(__atan,SUFF)) (y / x); + else + z = pi_2 - __m81_u(__CONCATX(__atan,SUFF)) (x / y); + } + else + { + if (x > -y) + z = __m81_u(__CONCATX(__atan,SUFF)) (y / x); + else + z = -pi_2 - __m81_u(__CONCATX(__atan,SUFF)) (x / y); + } + } + else + { + if (y < 0) + { + if (-x > y) + z = -pi + __m81_u(__CONCATX(__atan,SUFF)) (y / x); + else + z = -pi_2 - __m81_u(__CONCATX(__atan,SUFF)) (x / y); + } + else + { + if (-x > y) + z = pi + __m81_u(__CONCATX(__atan,SUFF)) (y / x); + else + z = pi_2 - __m81_u(__CONCATX(__atan,SUFF)) (x / y); + } + } + return z; +} diff --git a/sysdeps/m68k/fpu/e_atan2f.c b/sysdeps/m68k/fpu/e_atan2f.c index a4c5ebdfd3..a0c750a759 100644 --- a/sysdeps/m68k/fpu/e_atan2f.c +++ b/sysdeps/m68k/fpu/e_atan2f.c @@ -1,2 +1,3 @@ -#define FUNC __ieee754_atan2f -#include +#define SUFF f +#define float_type float +#include diff --git a/sysdeps/m68k/fpu/e_atan2l.c b/sysdeps/m68k/fpu/e_atan2l.c index 0d43a77b9e..426ca94baa 100644 --- a/sysdeps/m68k/fpu/e_atan2l.c +++ b/sysdeps/m68k/fpu/e_atan2l.c @@ -1,2 +1,3 @@ -#define FUNC __ieee754_atan2l -#include +#define SUFF l +#define float_type long double +#include diff --git a/sysdeps/m68k/fpu/e_pow.c b/sysdeps/m68k/fpu/e_pow.c index 29798a15ca..970e8b821b 100644 --- a/sysdeps/m68k/fpu/e_pow.c +++ b/sysdeps/m68k/fpu/e_pow.c @@ -1,2 +1,135 @@ -#define FUNC __ieee754_pow -#include +/* Copyright (C) 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#define __LIBC_M81_MATH_INLINES +#include +#include "math_private.h" + +#ifndef SUFF +#define SUFF +#endif +#ifndef float_type +#define float_type double +#endif + +#define __CONCATX(a,b) __CONCAT(a,b) + +float_type +__CONCATX(__ieee754_pow,SUFF) (float_type x, float_type y) +{ + float_type z; + float_type ax; + + if (y == 0.0) + return 1.0; + if (x != x || y != y) + return x + y; + + if (__m81_u(__CONCATX(__isinf,SUFF)) (y)) + { + ax = __CONCATX(fabs,SUFF) (x); + if (ax == 1) + return y - y; + if (ax > 1) + return y > 0 ? y : 0; + else + return y < 0 ? -y : 0; + } + + if (__CONCATX(fabs,SUFF) (y) == 1) + return y > 0 ? x : 1 / x; + + if (y == 2) + return x * x; + if (y == 0 && x >= 0) + return __m81_u(__CONCATX(__ieee754_sqrt,SUFF)) (x); + + if (x == 10.0) + { + __asm ("ftentox%.x %1, %0" : "=f" (z) : "f" (y)); + return z; + } + if (x == 2.0) + { + __asm ("ftwotox%.x %1, %0" : "=f" (z) : "f" (y)); + return z; + } + + ax = __CONCATX(fabs,SUFF) (x); + if (__m81_u(__CONCATX(__isinf,SUFF)) (x) || x == 0 || ax == 1) + { + z = ax; + if (y < 0) + z = 1 / z; + if (signbit (x)) + { + float_type temp = __m81_u (__CONCATX(__rint,SUFF)) (y); + if (y != temp) + { + if (x == -1) + z = (z - z) / (z - z); + } + else + { + if (sizeof (float_type) == sizeof (float)) + { + long i = (long) y; + if (i & 1) + z = -z; + } + else + { + long long i = (long long) y; + if ((float_type) i == y && i & 1) + z = -z; + } + } + } + return z; + } + + if (x < 0.0) + { + float_type temp = __m81_u (__CONCATX(__rint,SUFF)) (y); + if (y == temp) + { + long long i = (long long) y; + z = (__m81_u(__CONCATX(__ieee754_exp,SUFF)) + (y * __m81_u(__CONCATX(__ieee754_log,SUFF)) (-x))); + if (sizeof (float_type) == sizeof (float)) + { + long i = (long) y; + if (i & 1) + z = -z; + } + else + { + /* If the conversion to long long was inexact assume that y + is an even integer. */ + if ((float_type) i == y && i & 1) + z = -z; + } + } + else + z = (x - x) / (x - x); + } + else + z = (__m81_u(__CONCATX(__ieee754_exp,SUFF)) + (y * __m81_u(__CONCATX(__ieee754_log,SUFF)) (x))); + return z; +} diff --git a/sysdeps/m68k/fpu/e_powf.c b/sysdeps/m68k/fpu/e_powf.c index 978d32eacc..379014355a 100644 --- a/sysdeps/m68k/fpu/e_powf.c +++ b/sysdeps/m68k/fpu/e_powf.c @@ -1,2 +1,3 @@ -#define FUNC __ieee754_powf -#include +#define SUFF f +#define float_type float +#include diff --git a/sysdeps/m68k/fpu/e_powl.c b/sysdeps/m68k/fpu/e_powl.c index 0feec54fec..f71fa34a26 100644 --- a/sysdeps/m68k/fpu/e_powl.c +++ b/sysdeps/m68k/fpu/e_powl.c @@ -1,2 +1,3 @@ -#define FUNC __ieee754_powl -#include +#define SUFF l +#define float_type long double +#include From 3eb7704ced06f87b61ea9b11e7a8376223afd21d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 25 Mar 1997 01:33:22 +0000 Subject: [PATCH 0819/4487] Implementation of exp2 function in m68k assembler --- sysdeps/m68k/fpu/s_exp2.c | 2 ++ sysdeps/m68k/fpu/s_exp2f.c | 2 ++ sysdeps/m68k/fpu/s_exp2l.c | 2 ++ 3 files changed, 6 insertions(+) create mode 100644 sysdeps/m68k/fpu/s_exp2.c create mode 100644 sysdeps/m68k/fpu/s_exp2f.c create mode 100644 sysdeps/m68k/fpu/s_exp2l.c diff --git a/sysdeps/m68k/fpu/s_exp2.c b/sysdeps/m68k/fpu/s_exp2.c new file mode 100644 index 0000000000..389528092a --- /dev/null +++ b/sysdeps/m68k/fpu/s_exp2.c @@ -0,0 +1,2 @@ +#define FUNC exp2 +#include diff --git a/sysdeps/m68k/fpu/s_exp2f.c b/sysdeps/m68k/fpu/s_exp2f.c new file mode 100644 index 0000000000..20ac916d1a --- /dev/null +++ b/sysdeps/m68k/fpu/s_exp2f.c @@ -0,0 +1,2 @@ +#define FUNC exp2f +#include diff --git a/sysdeps/m68k/fpu/s_exp2l.c b/sysdeps/m68k/fpu/s_exp2l.c new file mode 100644 index 0000000000..19121b929d --- /dev/null +++ b/sysdeps/m68k/fpu/s_exp2l.c @@ -0,0 +1,2 @@ +#define FUNC exp2l +#include From 4a900bdbcaf85c41085a443e895694ed528583c1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 25 Mar 1997 01:33:30 +0000 Subject: [PATCH 0820/4487] Implementation of log2 function in m68k assembler --- sysdeps/m68k/fpu/s_log2.c | 2 ++ sysdeps/m68k/fpu/s_log2f.c | 2 ++ sysdeps/m68k/fpu/s_log2l.c | 2 ++ 3 files changed, 6 insertions(+) create mode 100644 sysdeps/m68k/fpu/s_log2.c create mode 100644 sysdeps/m68k/fpu/s_log2f.c create mode 100644 sysdeps/m68k/fpu/s_log2l.c diff --git a/sysdeps/m68k/fpu/s_log2.c b/sysdeps/m68k/fpu/s_log2.c new file mode 100644 index 0000000000..26e26bae95 --- /dev/null +++ b/sysdeps/m68k/fpu/s_log2.c @@ -0,0 +1,2 @@ +#define FUNC log2 +#include diff --git a/sysdeps/m68k/fpu/s_log2f.c b/sysdeps/m68k/fpu/s_log2f.c new file mode 100644 index 0000000000..68494322b8 --- /dev/null +++ b/sysdeps/m68k/fpu/s_log2f.c @@ -0,0 +1,2 @@ +#define FUNC log2f +#include diff --git a/sysdeps/m68k/fpu/s_log2l.c b/sysdeps/m68k/fpu/s_log2l.c new file mode 100644 index 0000000000..c4eb06332b --- /dev/null +++ b/sysdeps/m68k/fpu/s_log2l.c @@ -0,0 +1,2 @@ +#define FUNC log2l +#include From c7b6ca33fd82c2b2934c6f5c537767ed69010ed8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 25 Mar 1997 01:33:52 +0000 Subject: [PATCH 0821/4487] Remove because of inaccuracy. --- sysdeps/m68k/fpu/s_logb.c | 2 -- sysdeps/m68k/fpu/s_logbf.c | 2 -- sysdeps/m68k/fpu/s_logbl.c | 2 -- 3 files changed, 6 deletions(-) delete mode 100644 sysdeps/m68k/fpu/s_logb.c delete mode 100644 sysdeps/m68k/fpu/s_logbf.c delete mode 100644 sysdeps/m68k/fpu/s_logbl.c diff --git a/sysdeps/m68k/fpu/s_logb.c b/sysdeps/m68k/fpu/s_logb.c deleted file mode 100644 index 9903b3089a..0000000000 --- a/sysdeps/m68k/fpu/s_logb.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC logb -#include diff --git a/sysdeps/m68k/fpu/s_logbf.c b/sysdeps/m68k/fpu/s_logbf.c deleted file mode 100644 index 6dcfee5807..0000000000 --- a/sysdeps/m68k/fpu/s_logbf.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC logbf -#include diff --git a/sysdeps/m68k/fpu/s_logbl.c b/sysdeps/m68k/fpu/s_logbl.c deleted file mode 100644 index 7d06ac13c4..0000000000 --- a/sysdeps/m68k/fpu/s_logbl.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC logbl -#include From 41b06962865a7215df05791217ad3f2625709306 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 25 Mar 1997 02:22:14 +0000 Subject: [PATCH 0822/4487] Alias _setjmp to __setjmp for change to tst-setjmp.c. --- sysdeps/alpha/bsd-_setjmp.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/alpha/bsd-_setjmp.S b/sysdeps/alpha/bsd-_setjmp.S index 1bb3e4ab37..07fb0c7637 100644 --- a/sysdeps/alpha/bsd-_setjmp.S +++ b/sysdeps/alpha/bsd-_setjmp.S @@ -35,3 +35,5 @@ ENTRY(_setjmp) bis $31, $31, $17 /* Pass a second argument of zero. */ jmp $31, __sigsetjmp /* Call __sigsetjmp. */ END(_setjmp) + +strong_alias_asm(_setjmp, __setjmp) From f2d725f3adb2d481a623aedecb06414404ff427a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 25 Mar 1997 02:22:23 +0000 Subject: [PATCH 0823/4487] Mirror Roland's recent changes. --- sysdeps/alpha/dl-machine.h | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index fc9f9712cb..7a51df5f00 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -239,7 +239,14 @@ elf_machine_runtime_setup (struct link_map *l, int lazy) /* Nonzero iff TYPE describes relocation of a PLT entry, so PLT entries should not be allowed to define the value. */ -#define elf_machine_pltrel_p(type) ((type) == R_ALPHA_JMP_SLOT) +#define elf_machine_lookup_noplt_p(type) ((type) == R_ALPHA_JMP_SLOT) + +/* Nonzero iff TYPE should not be allowed to resolve to one of + the main executable's symbols, as for a COPY reloc, which we don't use. */ +#define elf_machine_lookup_noexec_p(type) (0) + +/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */ +#define ELF_MACHINE_RELOC_NOPLT R_ALPHA_JMP_SLOT /* The alpha never uses Elf64_Rel relocations. */ #define ELF_MACHINE_NO_REL 1 @@ -328,7 +335,7 @@ elf_machine_rela (struct link_map *map, const struct r_found_version *version) { Elf64_Addr * const reloc_addr = (void *)(map->l_addr + reloc->r_offset); - unsigned long const r_info = ELF64_R_TYPE (reloc->r_info); + unsigned long const r_type = ELF64_R_TYPE (reloc->r_info); #ifndef RTLD_BOOTSTRAP /* This is defined in rtld.c, but nowhere in the static libc.a; make the @@ -342,7 +349,7 @@ elf_machine_rela (struct link_map *map, /* We cannot use a switch here because we cannot locate the switch jump table until we've self-relocated. */ - if (r_info == R_ALPHA_RELATIVE) + if (r_type == R_ALPHA_RELATIVE) { #ifndef RTLD_BOOTSTRAP /* Already done in dynamic linker. */ @@ -350,24 +357,23 @@ elf_machine_rela (struct link_map *map, #endif *reloc_addr += map->l_addr; } - else if (r_info == R_ALPHA_NONE) + else if (r_type == R_ALPHA_NONE) return; else { Elf64_Addr loadbase, sym_value; - loadbase = RESOLVE (&sym, version, - r_info == R_ALPHA_JMP_SLOT ? DL_LOOKUP_NOPLT : 0); + loadbase = RESOLVE (&sym, version, r_type); sym_value = sym ? loadbase + sym->st_value : 0; - if (r_info == R_ALPHA_GLOB_DAT) + if (r_type == R_ALPHA_GLOB_DAT) *reloc_addr = sym_value; - else if (r_info == R_ALPHA_JMP_SLOT) + else if (r_type == R_ALPHA_JMP_SLOT) { *reloc_addr = sym_value; elf_alpha_fix_plt (map, reloc, (Elf64_Addr) reloc_addr, sym_value); } - else if (r_info == R_ALPHA_REFQUAD) + else if (r_type == R_ALPHA_REFQUAD) { sym_value += *reloc_addr; #ifndef RTLD_BOOTSTRAP @@ -397,15 +403,15 @@ static inline void elf_machine_lazy_rel (struct link_map *map, const Elf64_Rela *reloc) { Elf64_Addr * const reloc_addr = (void *)(map->l_addr + reloc->r_offset); - unsigned long const r_info = ELF64_R_TYPE (reloc->r_info); + unsigned long const r_type = ELF64_R_TYPE (reloc->r_info); - if (r_info == R_ALPHA_JMP_SLOT) + if (r_type == R_ALPHA_JMP_SLOT) { /* Perform a RELATIVE reloc on the .got entry that transfers to the .plt. */ *reloc_addr += map->l_addr; } - else if (r_info == R_ALPHA_NONE) + else if (r_type == R_ALPHA_NONE) return; else assert (! "unexpected PLT reloc type"); From d42c91d9d2d9ef1d51a9c77c62c59113f474ee4e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 27 Mar 1997 01:56:58 +0000 Subject: [PATCH 0824/4487] (CFLAGS-rtld.c): Add -Wno-unused. --- sysdeps/m68k/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile index dc502912bf..fc79d36804 100644 --- a/sysdeps/m68k/Makefile +++ b/sysdeps/m68k/Makefile @@ -32,5 +32,5 @@ CFLAGS-setjmp.c := -fno-omit-frame-pointer long-double-fcts = yes ifeq ($(subdir),elf) -CFLAGS-rtld.c += -Wno-uninitialized +CFLAGS-rtld.c += -Wno-uninitialized -Wno-unused endif From fea9a86a67b315e8545ee64f24fd09e505449ef7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 27 Mar 1997 01:57:11 +0000 Subject: [PATCH 0825/4487] (elf_machine_rela): Rewritten as for i386. (elf_machine_lookup_noexec_p, elf_machine_lookup_noplt_p, ELF_MACHINE_RELOC_NOPLT): Define. --- sysdeps/m68k/dl-machine.h | 103 ++++++++++++++++++-------------------- 1 file changed, 50 insertions(+), 53 deletions(-) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index 0c9b6acb6d..d79ef25d81 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -184,9 +184,16 @@ elf_machine_runtime_setup (struct link_map *l, int lazy) | Jump to the user's entry point. jmp (%a4)"); +/* Nonzero iff TYPE describes a relocation that should + skip the executable when looking up the symbol value. */ +#define elf_machine_lookup_noexec_p(type) ((type) == R_68K_COPY) + /* Nonzero iff TYPE describes relocation of a PLT entry, so PLT entries should not be allowed to define the value. */ -#define elf_machine_pltrel_p(type) ((type) == R_68K_JMP_SLOT) +#define elf_machine_lookup_noplt_p(type) ((type) == R_68K_JMP_SLOT) + +/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */ +#define ELF_MACHINE_RELOC_NOPLT R_68K_JMP_SLOT /* The m68k never uses Elf32_Rel relocations. */ #define ELF_MACHINE_NO_REL 1 @@ -203,60 +210,50 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, const Elf32_Sym *sym, const struct r_found_version *version) { Elf32_Addr *const reloc_addr = (void *) (map->l_addr + reloc->r_offset); - Elf32_Addr loadbase; - switch (ELF32_R_TYPE (reloc->r_info)) + if (ELF32_R_TYPE (reloc->r_info) == R_68K_RELATIVE) + *reloc_addr = map->l_addr + reloc->r_addend; + else { - case R_68K_COPY: - loadbase = RESOLVE (&sym, version, DL_LOOKUP_NOEXEC); - memcpy (reloc_addr, (void *) (loadbase + sym->st_value), sym->st_size); - break; - case R_68K_GLOB_DAT: - loadbase = RESOLVE (&sym, version, 0); - *reloc_addr = sym ? (loadbase + sym->st_value) : 0; - break; - case R_68K_JMP_SLOT: - loadbase = RESOLVE (&sym, version, DL_LOOKUP_NOPLT); - *reloc_addr = sym ? (loadbase + sym->st_value) : 0; - break; - case R_68K_8: - loadbase = RESOLVE (&sym, version, 0); - *(char *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) - + reloc->r_addend); - break; - case R_68K_16: - loadbase = RESOLVE (&sym, version, 0); - *(short *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) - + reloc->r_addend); - break; - case R_68K_32: - loadbase = RESOLVE (&sym, version, 0); - *reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) - + reloc->r_addend); - break; - case R_68K_RELATIVE: - *reloc_addr = map->l_addr + reloc->r_addend; - break; - case R_68K_PC8: - loadbase = RESOLVE (&sym, version, 0); - *(char *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) - + reloc->r_addend - (Elf32_Addr) reloc_addr); - break; - case R_68K_PC16: - loadbase = RESOLVE (&sym, version, 0); - *(short *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) - + reloc->r_addend - (Elf32_Addr) reloc_addr); - break; - case R_68K_PC32: - loadbase = RESOLVE (&sym, version, 0); - *reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) - + reloc->r_addend - (Elf32_Addr) reloc_addr); - break; - case R_68K_NONE: /* Alright, Wilbur. */ - break; - default: - assert (! "unexpected dynamic reloc type"); - break; + Elf32_Addr value = RESOLVE (&sym, version, ELF32_R_TYPE (reloc->r_info)); + if (sym) + value += sym->st_value; + + switch (ELF32_R_TYPE (reloc->r_info)) + { + case R_68K_COPY: + memcpy (reloc_addr, (void *) value, sym->st_size); + break; + case R_68K_GLOB_DAT: + case R_68K_JMP_SLOT: + *reloc_addr = value; + break; + case R_68K_8: + *(char *) reloc_addr = value + reloc->r_addend; + break; + case R_68K_16: + *(short *) reloc_addr = value + reloc->r_addend; + break; + case R_68K_32: + *reloc_addr = value + reloc->r_addend; + break; + case R_68K_PC8: + *(char *) reloc_addr + = value + reloc->r_addend - (Elf32_Addr) reloc_addr; + break; + case R_68K_PC16: + *(short *) reloc_addr + = value + reloc->r_addend - (Elf32_Addr) reloc_addr; + break; + case R_68K_PC32: + *reloc_addr = value + reloc->r_addend - (Elf32_Addr) reloc_addr; + break; + case R_68K_NONE: /* Alright, Wilbur. */ + break; + default: + assert (! "unexpected dynamic reloc type"); + break; + } } } From 6383b7f583c9a373f82461127d38aad2f2977692 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 27 Mar 1997 01:58:32 +0000 Subject: [PATCH 0826/4487] (OXTABS): Don't define. --- sysdeps/unix/sysv/linux/alpha/termbits.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/termbits.h b/sysdeps/unix/sysv/linux/alpha/termbits.h index 743bb3d283..d0932c1cd7 100644 --- a/sysdeps/unix/sysv/linux/alpha/termbits.h +++ b/sysdeps/unix/sysv/linux/alpha/termbits.h @@ -112,10 +112,6 @@ struct termios #define VT1 00200000 #define XTABS 01000000 /* Hmm.. Linux/i386 considers this part of TABDLY.. */ -/* On Linux there is no OXTABS bit defined. Take it as an alias for - XTABS. */ -#define OXTABS XTABS - /* c_cflag bit meaning */ #define CBAUD 0000037 #define B0 0000000 /* hang up */ From 349d129b3a5612e8845a54ca4e9252b00af9456f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 2 Apr 1997 14:43:30 +0000 Subject: [PATCH 0827/4487] (CFLAGS-s_copysignl.c) [$(subdir)=math]: Define for gcc bug workaround. --- sysdeps/m68k/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile index fc79d36804..0f811bc62e 100644 --- a/sysdeps/m68k/Makefile +++ b/sysdeps/m68k/Makefile @@ -34,3 +34,8 @@ long-double-fcts = yes ifeq ($(subdir),elf) CFLAGS-rtld.c += -Wno-uninitialized -Wno-unused endif + +ifeq ($(subdir),math) +# Avoid a bug in gcc +CFLAGS-s_copysignl.c += -mnobitfield +endif From b9a0a7fbcdeb7727c595033290aaeee15180a164 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 2 Apr 1997 14:43:44 +0000 Subject: [PATCH 0828/4487] Define __trunc, __signbit, __nearbyint. Remove __modf. --- sysdeps/m68k/fpu/__math.h | 237 ++++++++++++++++++++------------------ 1 file changed, 128 insertions(+), 109 deletions(-) diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h index d6187015ea..9b52b32d0c 100644 --- a/sysdeps/m68k/fpu/__math.h +++ b/sysdeps/m68k/fpu/__math.h @@ -89,6 +89,7 @@ __inline_mathop(__significand, getman) __inline_mathop(__log2, log2) __inline_mathop(__exp2, twotox) +__inline_mathop(__trunc, intrz) #if !defined __NO_MATH_INLINES && defined __OPTIMIZE__ @@ -111,6 +112,7 @@ __inline_mathop(significand, getman) #ifdef __USE_ISOC9X __inline_mathop(log2, log2) __inline_mathop(exp2, twotox) +__inline_mathop(trunc, intrz) #endif #endif /* !__NO_MATH_INLINES && __OPTIMIZE__ */ @@ -155,108 +157,123 @@ __internal_inline_functions (long double,l) /* The rest of the functions are available to the user. */ -#define __inline_functions(float_type, s) \ -__m81_inline float_type \ -__m81_u(__CONCAT(__frexp,s))(float_type __value, int *__expptr) \ -{ \ - float_type __mantissa, __exponent; \ - int __iexponent; \ - if (__value == 0.0) \ - { \ - *__expptr = 0; \ - return __value; \ - } \ - __asm("fgetexp%.x %1, %0" : "=f" (__exponent) : "f" (__value)); \ - __iexponent = (int) __exponent + 1; \ - *__expptr = __iexponent; \ - __asm("fscale%.l %2, %0" : "=f" (__mantissa) \ - : "0" (__value), "dmi" (-__iexponent)); \ - return __mantissa; \ -} \ - \ -__m81_defun (float_type, __CONCAT(__floor,s), (float_type __x)) \ -{ \ - float_type __result; \ - unsigned long int __ctrl_reg; \ - __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); \ - /* Set rounding towards negative infinity. */ \ - __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ - : "dmi" ((__ctrl_reg & ~0x10) | 0x20)); \ - /* Convert X to an integer, using -Inf rounding. */ \ - __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); \ - /* Restore the previous rounding mode. */ \ - __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ - : "dmi" (__ctrl_reg)); \ - return __result; \ -} \ - \ -__m81_defun (float_type, __CONCAT(__ceil,s), (float_type __x)) \ -{ \ - float_type __result; \ - unsigned long int __ctrl_reg; \ - __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); \ - /* Set rounding towards positive infinity. */ \ - __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ - : "dmi" (__ctrl_reg | 0x30)); \ - /* Convert X to an integer, using +Inf rounding. */ \ - __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); \ - /* Restore the previous rounding mode. */ \ - __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ - : "dmi" (__ctrl_reg)); \ - return __result; \ -} \ - \ -__m81_inline float_type \ -__m81_u(__CONCAT(__modf,s))(float_type __value, float_type *__iptr) \ -{ \ - float_type __modf_int; \ - __asm ("fintrz%.x %1, %0" : "=f" (__modf_int) : "f" (__value)); \ - *__iptr = __modf_int; \ - return __value - __modf_int; \ -} \ - \ -__m81_defun (int, __CONCAT(__isinf,s), (float_type __value)) \ -{ \ - /* There is no branch-condition for infinity, \ - so we must extract and examine the condition codes manually. */ \ - unsigned long int __fpsr; \ - __asm("ftst%.x %1\n" \ - "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \ - return (__fpsr & (2 << 24)) ? (__fpsr & (8 << 24) ? -1 : 1) : 0; \ -} \ - \ -__m81_defun (int, __CONCAT(__isnan,s), (float_type __value)) \ -{ \ - char __result; \ - __asm("ftst%.x %1\n" \ - "fsun %0" : "=dm" (__result) : "f" (__value)); \ - return __result; \ -} \ - \ -__m81_defun (int, __CONCAT(__finite,s), (float_type __value)) \ -{ \ - /* There is no branch-condition for infinity, so we must extract and \ - examine the condition codes manually. */ \ - unsigned long int __fpsr; \ - __asm ("ftst%.x %1\n" \ - "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \ - return (__fpsr & (3 << 24)) == 0; \ -} \ - \ -__m81_defun (int, __CONCAT(__ilogb,s), (float_type __x)) \ -{ \ - float_type __result; \ - if (__x == 0.0) \ - return 0x80000001; \ - __asm("fgetexp%.x %1, %0" : "=f" (__result) : "f" (__x)); \ - return (int) __result; \ -} \ - \ -__m81_defun (float_type, __CONCAT(__scalbn,s), (float_type __x, int __n)) \ -{ \ - float_type __result; \ - __asm ("fscale%.l %1, %0" : "=f" (__result) : "dmi" (__n), "0" (__x)); \ - return __result; \ +#define __inline_functions(float_type, s) \ +__m81_inline float_type \ +__m81_u(__CONCAT(__frexp,s))(float_type __value, int *__expptr) \ +{ \ + float_type __mantissa, __exponent; \ + int __iexponent; \ + if (__value == 0.0) \ + { \ + *__expptr = 0; \ + return __value; \ + } \ + __asm("fgetexp%.x %1, %0" : "=f" (__exponent) : "f" (__value)); \ + __iexponent = (int) __exponent + 1; \ + *__expptr = __iexponent; \ + __asm("fscale%.l %2, %0" : "=f" (__mantissa) \ + : "0" (__value), "dmi" (-__iexponent)); \ + return __mantissa; \ +} \ + \ +__m81_defun (float_type, __CONCAT(__floor,s), (float_type __x)) \ +{ \ + float_type __result; \ + unsigned long int __ctrl_reg; \ + __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); \ + /* Set rounding towards negative infinity. */ \ + __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ + : "dmi" ((__ctrl_reg & ~0x10) | 0x20)); \ + /* Convert X to an integer, using -Inf rounding. */ \ + __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); \ + /* Restore the previous rounding mode. */ \ + __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ + : "dmi" (__ctrl_reg)); \ + return __result; \ +} \ + \ +__m81_defun (float_type, __CONCAT(__ceil,s), (float_type __x)) \ +{ \ + float_type __result; \ + unsigned long int __ctrl_reg; \ + __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); \ + /* Set rounding towards positive infinity. */ \ + __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ + : "dmi" (__ctrl_reg | 0x30)); \ + /* Convert X to an integer, using +Inf rounding. */ \ + __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); \ + /* Restore the previous rounding mode. */ \ + __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ + : "dmi" (__ctrl_reg)); \ + return __result; \ +} \ + \ +__m81_defun (int, __CONCAT(__isinf,s), (float_type __value)) \ +{ \ + /* There is no branch-condition for infinity, \ + so we must extract and examine the condition codes manually. */ \ + unsigned long int __fpsr; \ + __asm("ftst%.x %1\n" \ + "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \ + return (__fpsr & (2 << 24)) ? (__fpsr & (8 << 24) ? -1 : 1) : 0; \ +} \ + \ +__m81_defun (int, __CONCAT(__isnan,s), (float_type __value)) \ +{ \ + char __result; \ + __asm("ftst%.x %1\n" \ + "fsun %0" : "=dm" (__result) : "f" (__value)); \ + return __result; \ +} \ + \ +__m81_defun (int, __CONCAT(__finite,s), (float_type __value)) \ +{ \ + /* There is no branch-condition for infinity, so we must extract and \ + examine the condition codes manually. */ \ + unsigned long int __fpsr; \ + __asm ("ftst%.x %1\n" \ + "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \ + return (__fpsr & (3 << 24)) == 0; \ +} \ + \ +__m81_defun (int, __CONCAT(__signbit,s), (float_type __value)) \ +{ \ + /* There is no branch-condition for the sign bit, so we must extract \ + and examine the condition codes manually. */ \ + unsigned long int __fpsr; \ + __asm ("ftst%.x %1\n" \ + "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \ + return (__fpsr >> 27) & 1; \ +} \ + \ +__m81_defun (int, __CONCAT(__ilogb,s), (float_type __x)) \ +{ \ + float_type __result; \ + if (__x == 0.0) \ + return 0x80000001; \ + __asm("fgetexp%.x %1, %0" : "=f" (__result) : "f" (__x)); \ + return (int) __result; \ +} \ + \ +__m81_defun (float_type, __CONCAT(__scalbn,s), (float_type __x, int __n)) \ +{ \ + float_type __result; \ + __asm ("fscale%.l %1, %0" : "=f" (__result) : "dmi" (__n), "0" (__x)); \ + return __result; \ +} \ + \ +__m81_defun (float_type, __CONCAT(__nearbyint,s), (float_type __x)) \ +{ \ + float_type __result; \ + unsigned long int __ctrl_reg; \ + __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); \ + /* Temporarily disable the inexact exception. */ \ + __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ + : "dmi" (__ctrl_reg & ~0x200)); \ + __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); \ + __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ + : "dmi" (__ctrl_reg)); \ + return __result; \ } /* This defines the three variants of the inline functions. */ @@ -286,8 +303,6 @@ __inline_forward(double,frexp, (double __value, int *__expptr), (__value, __expptr)) __inline_forward_c(double,floor, (double __x), (__x)) __inline_forward_c(double,ceil, (double __x), (__x)) -__inline_forward(double,modf, (double __value, double *__iptr), - (__value, __iptr)) #ifdef __USE_MISC __inline_forward_c(int,isinf, (double __value), (__value)) __inline_forward_c(int,finite, (double __value), (__value)) @@ -299,6 +314,9 @@ __inline_forward_c(int,isnan, (double __value), (__value)) #endif __inline_forward_c(int,ilogb, (double __value), (__value)) #endif +#ifdef __USE_ISOC9X +__inline_forward_c(double,nearbyint, (double __value), (__value)) +#endif #if defined __USE_MISC || defined __USE_ISOC9X @@ -306,8 +324,6 @@ __inline_forward(float,frexpf, (float __value, int *__expptr), (__value, __expptr)) __inline_forward_c(float,floorf, (float __x), (__x)) __inline_forward_c(float,ceilf, (float __x), (__x)) -__inline_forward(float,modff, (float __value, float *__iptr), - (__value, __iptr)) #ifdef __USE_MISC __inline_forward_c(int,isinff, (float __value), (__value)) __inline_forward_c(int,finitef, (float __value), (__value)) @@ -315,14 +331,14 @@ __inline_forward_c(float,scalbnf, (float __x, int __n), (__x, __n)) __inline_forward_c(int,isnanf, (float __value), (__value)) __inline_forward_c(int,ilogbf, (float __value), (__value)) #endif +#ifdef __USE_ISOC9X +__inline_forward_c(float,nearbyintf, (float __value), (__value)) +#endif __inline_forward(long double,frexpl, (long double __value, int *__expptr), (__value, __expptr)) __inline_forward_c(long double,floorl, (long double __x), (__x)) __inline_forward_c(long double,ceill, (long double __x), (__x)) -__inline_forward(long double,modfl, - (long double __value, long double *__iptr), - (__value, __iptr)) #ifdef __USE_MISC __inline_forward_c(int,isinfl, (long double __value), (__value)) __inline_forward_c(int,finitel, (long double __value), (__value)) @@ -331,6 +347,9 @@ __inline_forward_c(long double,scalbnl, (long double __x, int __n), __inline_forward_c(int,isnanl, (long double __value), (__value)) __inline_forward_c(int,ilogbl, (long double __value), (__value)) #endif +#ifdef __USE_ISOC9X +__inline_forward_c(long double,nearbyintl, (long double __value), (__value)) +#endif #endif /* Use misc or ISO C9X */ From 231e25e2a3e515f556ca857fe6bd8ba8254e721b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 2 Apr 1997 14:43:52 +0000 Subject: [PATCH 0829/4487] Use __signbit inline. --- sysdeps/m68k/fpu/e_atan2.c | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/sysdeps/m68k/fpu/e_atan2.c b/sysdeps/m68k/fpu/e_atan2.c index 58d7555f41..c012070a93 100644 --- a/sysdeps/m68k/fpu/e_atan2.c +++ b/sysdeps/m68k/fpu/e_atan2.c @@ -27,10 +27,12 @@ #define float_type double #endif -#define __CONCATX(a,b) __CONCAT(a,b) +#define CONCATX(a,b) __CONCAT(a,b) +#define s(name) CONCATX(name,SUFF) +#define m81(func) __m81_u(s(func)) float_type -__CONCATX(__ieee754_atan2,SUFF) (float_type y, float_type x) +s(__ieee754_atan2) (float_type y, float_type x) { float_type pi, pi_2, z; @@ -40,41 +42,41 @@ __CONCATX(__ieee754_atan2,SUFF) (float_type y, float_type x) z = x + y; else if (y == 0) { - if (signbit (x)) - z = signbit (y) ? -pi : pi; + if (m81(__signbit) (x)) + z = m81(__signbit) (y) ? -pi : pi; else z = y; } - else if (__m81_u(__CONCATX(__isinf,SUFF)) (x)) + else if (m81(__isinf) (x)) { - if (__m81_u(__CONCATX(__isinf,SUFF)) (y)) + if (m81(__isinf) (y)) { float_type pi_4; - __asm ("fscale%.w %#-1, %0" : "=f" (pi_4) : "0" (pi_2)); + __asm ("fscale%.w %#-2, %0" : "=f" (pi_4) : "0" (pi)); z = x > 0 ? pi_4 : 3 * pi_4; } else z = x > 0 ? 0 : pi; - if (signbit (y)) + if (m81(__signbit) (y)) z = -z; } - else if (__m81_u(__CONCATX(__isinf,SUFF)) (y)) + else if (m81(__isinf) (y)) z = y > 0 ? pi_2 : -pi_2; else if (x > 0) { if (y > 0) { if (x > y) - z = __m81_u(__CONCATX(__atan,SUFF)) (y / x); + z = m81(__atan) (y / x); else - z = pi_2 - __m81_u(__CONCATX(__atan,SUFF)) (x / y); + z = pi_2 - m81(__atan) (x / y); } else { if (x > -y) - z = __m81_u(__CONCATX(__atan,SUFF)) (y / x); + z = m81(__atan) (y / x); else - z = -pi_2 - __m81_u(__CONCATX(__atan,SUFF)) (x / y); + z = -pi_2 - m81(__atan) (x / y); } } else @@ -82,16 +84,16 @@ __CONCATX(__ieee754_atan2,SUFF) (float_type y, float_type x) if (y < 0) { if (-x > y) - z = -pi + __m81_u(__CONCATX(__atan,SUFF)) (y / x); + z = -pi + m81(__atan) (y / x); else - z = -pi_2 - __m81_u(__CONCATX(__atan,SUFF)) (x / y); + z = -pi_2 - m81(__atan) (x / y); } else { if (-x > y) - z = pi + __m81_u(__CONCATX(__atan,SUFF)) (y / x); + z = pi + m81(__atan) (y / x); else - z = pi_2 - __m81_u(__CONCATX(__atan,SUFF)) (x / y); + z = pi_2 - m81(__atan) (x / y); } } return z; From 62f075cd3b92081bec9ebde3413dfc7017651c72 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 2 Apr 1997 14:44:10 +0000 Subject: [PATCH 0830/4487] Use __signbit inline. Write 0.0/0.0 for NaN. Fix typo in test for `y = 0.5'. --- sysdeps/m68k/fpu/e_pow.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/sysdeps/m68k/fpu/e_pow.c b/sysdeps/m68k/fpu/e_pow.c index 970e8b821b..284f1bf294 100644 --- a/sysdeps/m68k/fpu/e_pow.c +++ b/sysdeps/m68k/fpu/e_pow.c @@ -27,10 +27,12 @@ #define float_type double #endif -#define __CONCATX(a,b) __CONCAT(a,b) +#define CONCATX(a,b) __CONCAT(a,b) +#define s(name) CONCATX(name,SUFF) +#define m81(func) __m81_u(s(func)) float_type -__CONCATX(__ieee754_pow,SUFF) (float_type x, float_type y) +s(__ieee754_pow) (float_type x, float_type y) { float_type z; float_type ax; @@ -40,24 +42,24 @@ __CONCATX(__ieee754_pow,SUFF) (float_type x, float_type y) if (x != x || y != y) return x + y; - if (__m81_u(__CONCATX(__isinf,SUFF)) (y)) + if (m81(__isinf) (y)) { - ax = __CONCATX(fabs,SUFF) (x); + ax = s(fabs) (x); if (ax == 1) - return y - y; + return 0.0/0.0; if (ax > 1) return y > 0 ? y : 0; else return y < 0 ? -y : 0; } - if (__CONCATX(fabs,SUFF) (y) == 1) + if (s(fabs) (y) == 1) return y > 0 ? x : 1 / x; if (y == 2) return x * x; - if (y == 0 && x >= 0) - return __m81_u(__CONCATX(__ieee754_sqrt,SUFF)) (x); + if (y == 0.5 && x >= 0) + return m81(__ieee754_sqrt) (x); if (x == 10.0) { @@ -70,19 +72,19 @@ __CONCATX(__ieee754_pow,SUFF) (float_type x, float_type y) return z; } - ax = __CONCATX(fabs,SUFF) (x); - if (__m81_u(__CONCATX(__isinf,SUFF)) (x) || x == 0 || ax == 1) + ax = s(fabs) (x); + if (m81(__isinf) (x) || x == 0 || ax == 1) { z = ax; if (y < 0) z = 1 / z; - if (signbit (x)) + if (m81(__signbit) (x)) { - float_type temp = __m81_u (__CONCATX(__rint,SUFF)) (y); + float_type temp = m81(__rint) (y); if (y != temp) { if (x == -1) - z = (z - z) / (z - z); + z = 0.0/0.0; } else { @@ -105,12 +107,11 @@ __CONCATX(__ieee754_pow,SUFF) (float_type x, float_type y) if (x < 0.0) { - float_type temp = __m81_u (__CONCATX(__rint,SUFF)) (y); + float_type temp = m81(__rint) (y); if (y == temp) { long long i = (long long) y; - z = (__m81_u(__CONCATX(__ieee754_exp,SUFF)) - (y * __m81_u(__CONCATX(__ieee754_log,SUFF)) (-x))); + z = m81(__ieee754_exp) (y * m81(__ieee754_log) (-x)); if (sizeof (float_type) == sizeof (float)) { long i = (long) y; @@ -126,10 +127,9 @@ __CONCATX(__ieee754_pow,SUFF) (float_type x, float_type y) } } else - z = (x - x) / (x - x); + z = 0.0/0.0; } else - z = (__m81_u(__CONCATX(__ieee754_exp,SUFF)) - (y * __m81_u(__CONCATX(__ieee754_log,SUFF)) (x))); + z = m81(__ieee754_exp) (y * m81(__ieee754_log) (x)); return z; } From 344114d0495cefb492ac8d327b23d2d76e538603 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 2 Apr 1997 14:44:20 +0000 Subject: [PATCH 0831/4487] Rewritten. --- sysdeps/m68k/fpu/s_modf.c | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/sysdeps/m68k/fpu/s_modf.c b/sysdeps/m68k/fpu/s_modf.c index 6428afc3be..ad0334faaa 100644 --- a/sysdeps/m68k/fpu/s_modf.c +++ b/sysdeps/m68k/fpu/s_modf.c @@ -19,22 +19,35 @@ #define __LIBC_M81_MATH_INLINES #include -#ifndef FUNC -#define FUNC modf +#ifndef SUFF +#define SUFF #endif #ifndef float_type #define float_type double #endif -#define __CONCATX(a,b) __CONCAT(a,b) +#define CONCATX(a,b) __CONCAT(a,b) +#define s(name) CONCATX(name,SUFF) +#define m81(func) __m81_u(s(func)) float_type -__CONCATX(__,FUNC) (x, iptr) - float_type x; - float_type *iptr; +s(__modf) (float_type x, float_type *iptr) { - return __m81_u(__CONCATX(__,FUNC))(x, iptr); + float_type x_int, result; + __asm ("fintrz%.x %1, %0" : "=f" (x_int) : "f" (x)); + *iptr = x_int; + if (m81(__isinf) (x)) + { + result = 0; + if (x < 0) + result = -result; + } + else if (x == 0) + result = x; + else + result = x - x_int; + return result; } #define weak_aliasx(a,b) weak_alias(a,b) -weak_aliasx(__CONCATX(__,FUNC), FUNC) +weak_aliasx(s(__modf), s(modf)) From 57d377f1f953924254bc8644eb5f4a50c779802c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 2 Apr 1997 14:44:29 +0000 Subject: [PATCH 0832/4487] Adapted. --- sysdeps/m68k/fpu/s_modff.c | 2 +- sysdeps/m68k/fpu/s_modfl.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/m68k/fpu/s_modff.c b/sysdeps/m68k/fpu/s_modff.c index 37bff0022f..0c44d7c0ab 100644 --- a/sysdeps/m68k/fpu/s_modff.c +++ b/sysdeps/m68k/fpu/s_modff.c @@ -1,3 +1,3 @@ -#define FUNC modff +#define SUFF f #define float_type float #include diff --git a/sysdeps/m68k/fpu/s_modfl.c b/sysdeps/m68k/fpu/s_modfl.c index 51327dd1aa..c7075b3ba9 100644 --- a/sysdeps/m68k/fpu/s_modfl.c +++ b/sysdeps/m68k/fpu/s_modfl.c @@ -1,3 +1,3 @@ -#define FUNC modfl +#define SUFF l #define float_type long double #include From bc6dd76e408ede31db90c033b69a585000d00bd6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 2 Apr 1997 14:45:04 +0000 Subject: [PATCH 0833/4487] m68k specific implementation for cexp for double. --- sysdeps/m68k/fpu/s_cexp.c | 92 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 sysdeps/m68k/fpu/s_cexp.c diff --git a/sysdeps/m68k/fpu/s_cexp.c b/sysdeps/m68k/fpu/s_cexp.c new file mode 100644 index 0000000000..d5c76453e8 --- /dev/null +++ b/sysdeps/m68k/fpu/s_cexp.c @@ -0,0 +1,92 @@ +/* Complex exponential function. m68k fpu version + Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Schwab + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#define __LIBC_M81_MATH_INLINES +#include +#include + +#ifndef SUFF +#define SUFF +#endif +#ifndef huge_val +#define huge_val HUGE_VAL +#endif +#ifndef float_type +#define float_type double +#endif + +#define CONCATX(a,b) __CONCAT(a,b) +#define s(name) CONCATX(name,SUFF) +#define m81(func) __m81_u(s(func)) + +__complex__ float_type +s(__cexp) (__complex__ float_type x) +{ + __complex__ float_type retval; + float_type sin_ix, cos_ix; + + if (m81(__finite) (__real__ x)) + { + if (m81(__finite) (__imag__ x)) + { + float_type exp_val = s(__exp) (__real__ x); + + __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_ix), "=f" (cos_ix) + : "f" (__imag__ x)); + __real__ retval = exp_val * cos_ix; + __imag__ retval = exp_val * sin_ix; + } + else + /* If the imaginary part is +-inf or NaN and the real part is + not +-inf the result is NaN + iNaN. */ + __real__ retval = __imag__ retval = 0.0/0.0; + } + else if (m81(__isinf) (__real__ x)) + { + if (m81(__finite) (__imag__ x)) + { + if (m81(__signbit) (__real__ x) == 0 && __imag__ x == 0.0) + retval = huge_val; + else + { + float_type value = m81(__signbit) (__real__ x) ? 0.0 : huge_val; + + __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_ix), "=f" (cos_ix) + : "f" (__imag__ x)); + __real__ retval = value * cos_ix; + __imag__ retval = value * sin_ix; + } + } + else if (m81(__signbit) (__real__ x) == 0) + { + __real__ retval = huge_val; + __imag__ retval = 0.0/0.0; + } + else + retval = 0.0; + } + else + /* If the real part is NaN the result is NaN + iNaN. */ + __real__ retval = __imag__ retval = 0.0/0.0; + + return retval; +} +#define weak_aliasx(a,b) weak_alias(a,b) +weak_aliasx (s(__cexp), s(cexp)) From 4a3b70258eb9ecc5e101053058071fa2ac1340af Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 2 Apr 1997 14:45:13 +0000 Subject: [PATCH 0834/4487] m68k specific implementation for cexp for float. --- sysdeps/m68k/fpu/s_cexpf.c | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 sysdeps/m68k/fpu/s_cexpf.c diff --git a/sysdeps/m68k/fpu/s_cexpf.c b/sysdeps/m68k/fpu/s_cexpf.c new file mode 100644 index 0000000000..db9f174546 --- /dev/null +++ b/sysdeps/m68k/fpu/s_cexpf.c @@ -0,0 +1,4 @@ +#define SUFF f +#define huge_val HUGE_VALF +#define float_type float +#include From b2b29a263866bf1ce118041cee55569a8cae8877 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 2 Apr 1997 14:45:25 +0000 Subject: [PATCH 0835/4487] m68k specific implementation for cexp for long double. --- sysdeps/m68k/fpu/s_cexpl.c | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 sysdeps/m68k/fpu/s_cexpl.c diff --git a/sysdeps/m68k/fpu/s_cexpl.c b/sysdeps/m68k/fpu/s_cexpl.c new file mode 100644 index 0000000000..7367070548 --- /dev/null +++ b/sysdeps/m68k/fpu/s_cexpl.c @@ -0,0 +1,4 @@ +#define SUFF l +#define huge_val HUGE_VALL +#define float_type long double +#include From afaabacb82bef384f0ec3ef251c0c345b8656b85 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 2 Apr 1997 14:45:59 +0000 Subject: [PATCH 0836/4487] m68k specific implementation for nearbyint for double. --- sysdeps/m68k/fpu/s_nearbyint.c | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sysdeps/m68k/fpu/s_nearbyint.c diff --git a/sysdeps/m68k/fpu/s_nearbyint.c b/sysdeps/m68k/fpu/s_nearbyint.c new file mode 100644 index 0000000000..b87f5e2160 --- /dev/null +++ b/sysdeps/m68k/fpu/s_nearbyint.c @@ -0,0 +1,2 @@ +#define FUNC nearbyint +#include From c6686e56ac712e24ba42d3f58c04d350cb70ff01 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 2 Apr 1997 14:46:07 +0000 Subject: [PATCH 0837/4487] m68k specific implementation for nearbyint for float. --- sysdeps/m68k/fpu/s_nearbyintf.c | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sysdeps/m68k/fpu/s_nearbyintf.c diff --git a/sysdeps/m68k/fpu/s_nearbyintf.c b/sysdeps/m68k/fpu/s_nearbyintf.c new file mode 100644 index 0000000000..70d08ab44c --- /dev/null +++ b/sysdeps/m68k/fpu/s_nearbyintf.c @@ -0,0 +1,2 @@ +#define FUNC nearbyintf +#include From 74988c548947f5638b8ef9876a60fe71c48cd865 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 2 Apr 1997 14:46:18 +0000 Subject: [PATCH 0838/4487] m68k specific implementation for nearbyint for long double. --- sysdeps/m68k/fpu/s_nearbyintl.c | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sysdeps/m68k/fpu/s_nearbyintl.c diff --git a/sysdeps/m68k/fpu/s_nearbyintl.c b/sysdeps/m68k/fpu/s_nearbyintl.c new file mode 100644 index 0000000000..230cd7784c --- /dev/null +++ b/sysdeps/m68k/fpu/s_nearbyintl.c @@ -0,0 +1,2 @@ +#define FUNC nearbyintl +#include From a9007c976b097bbadd1f9e5406cf44f3d1a827fe Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 2 Apr 1997 14:46:33 +0000 Subject: [PATCH 0839/4487] m68k specific implementation for trunc for double. --- sysdeps/m68k/fpu/s_trunc.c | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sysdeps/m68k/fpu/s_trunc.c diff --git a/sysdeps/m68k/fpu/s_trunc.c b/sysdeps/m68k/fpu/s_trunc.c new file mode 100644 index 0000000000..96f29a776c --- /dev/null +++ b/sysdeps/m68k/fpu/s_trunc.c @@ -0,0 +1,2 @@ +#define FUNC trunc +#include From 557d7a96e4dd956c67d2fbd33ce0434dbbfd779b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 2 Apr 1997 14:46:42 +0000 Subject: [PATCH 0840/4487] m68k specific implementation for trunc for float. --- sysdeps/m68k/fpu/s_truncf.c | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sysdeps/m68k/fpu/s_truncf.c diff --git a/sysdeps/m68k/fpu/s_truncf.c b/sysdeps/m68k/fpu/s_truncf.c new file mode 100644 index 0000000000..44dca748ca --- /dev/null +++ b/sysdeps/m68k/fpu/s_truncf.c @@ -0,0 +1,2 @@ +#define FUNC truncf +#include From eb32bf34fe78c74ee3f7f561aa7d74cfdabf5a93 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 2 Apr 1997 14:46:54 +0000 Subject: [PATCH 0841/4487] m68k specific implementation for trunc for long double. --- sysdeps/m68k/fpu/s_truncl.c | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sysdeps/m68k/fpu/s_truncl.c diff --git a/sysdeps/m68k/fpu/s_truncl.c b/sysdeps/m68k/fpu/s_truncl.c new file mode 100644 index 0000000000..8d35777aed --- /dev/null +++ b/sysdeps/m68k/fpu/s_truncl.c @@ -0,0 +1,2 @@ +#define FUNC truncl +#include From 79aa2424918dee448bf12cfcd36d9911c5dfa85b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 11 Apr 1997 10:27:18 +0000 Subject: [PATCH 0842/4487] Complex cosh function for m68k. --- sysdeps/m68k/fpu/s_ccosh.c | 119 ++++++++++++++++++++++++++++++++++++ sysdeps/m68k/fpu/s_ccoshf.c | 4 ++ sysdeps/m68k/fpu/s_ccoshl.c | 4 ++ 3 files changed, 127 insertions(+) create mode 100644 sysdeps/m68k/fpu/s_ccosh.c create mode 100644 sysdeps/m68k/fpu/s_ccoshf.c create mode 100644 sysdeps/m68k/fpu/s_ccoshl.c diff --git a/sysdeps/m68k/fpu/s_ccosh.c b/sysdeps/m68k/fpu/s_ccosh.c new file mode 100644 index 0000000000..439eae131c --- /dev/null +++ b/sysdeps/m68k/fpu/s_ccosh.c @@ -0,0 +1,119 @@ +/* Complex cosine hyperbole function. m68k fpu version + Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Schwab . + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#define __LIBC_M81_MATH_INLINES +#include +#include + +#ifndef SUFF +#define SUFF +#endif +#ifndef huge_val +#define huge_val HUGE_VAL +#endif +#ifndef float_type +#define float_type double +#endif + +#define CONCATX(a,b) __CONCAT(a,b) +#define s(name) CONCATX(name,SUFF) +#define m81(func) __m81_u(s(func)) + +__complex__ float_type +s(__ccosh) (__complex__ float_type x) +{ + __complex__ float_type retval; + + __real__ x = s(fabs) (__real__ x); + + if (m81(__finite) (__real__ x)) + { + if (m81(__finite) (__imag__ x)) + { + float_type cosh_val; + float_type sin_ix, cos_ix; + + __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_ix), "=f" (cos_ix) + : "f" (__imag__ x)); + cosh_val = m81(__ieee754_cosh) (__real__ x); + __real__ retval = cos_ix * cosh_val; + __imag__ retval = sin_ix * cosh_val; + } + else if (__real__ x == 0) + { + __imag__ retval = 0.0; + __real__ retval = huge_val - huge_val; + } + else + __real__ retval = __imag__ retval = huge_val - huge_val; + } + else if (m81(__isinf) (__real__ x)) + { + if (__imag__ x == 0) + { + __real__ retval = huge_val; + __imag__ retval = __imag__ x; + } + else if (m81(__finite) (__imag__ x)) + { + float_type remainder, pi_2; + int quadrant; + __real__ retval = __imag__ retval = huge_val; + + __asm ("fmovecr %#0,%0\n\tfscale%.w %#-1,%0" : "=f" (pi_2)); + __asm ("fmod%.x %2,%0\n\tfmove%.l %/fpsr,%1" + : "=f" (remainder), "=dm" (quadrant) + : "f" (pi_2), "0" (__imag__ x)); + quadrant = (quadrant >> 16) & 0x83; + if (quadrant & 0x80) + quadrant ^= 0x83; + switch (quadrant) + { + default: + break; + case 1: + __real__ retval = -__real__ retval; + break; + case 2: + __real__ retval = -__real__ retval; + case 3: + __imag__ retval = -__imag__ retval; + break; + } + } + else + { + /* The subtraction raises the invalid exception. */ + __real__ retval = huge_val; + __imag__ retval = huge_val - huge_val; + } + } + else if (__imag__ x == 0) + { + __real__ retval = 0.0/0.0; + __imag__ retval = __imag__ x; + } + else + __real__ retval = __imag__ retval = 0.0/0.0; + + return retval; +} +#define weak_aliasx(a,b) weak_alias(a,b) +weak_aliasx (s(__ccosh), s(ccosh)) diff --git a/sysdeps/m68k/fpu/s_ccoshf.c b/sysdeps/m68k/fpu/s_ccoshf.c new file mode 100644 index 0000000000..7d0766851f --- /dev/null +++ b/sysdeps/m68k/fpu/s_ccoshf.c @@ -0,0 +1,4 @@ +#define SUFF f +#define float_type float +#define huge_val HUGE_VALF +#include diff --git a/sysdeps/m68k/fpu/s_ccoshl.c b/sysdeps/m68k/fpu/s_ccoshl.c new file mode 100644 index 0000000000..6f1d1e5f85 --- /dev/null +++ b/sysdeps/m68k/fpu/s_ccoshl.c @@ -0,0 +1,4 @@ +#define SUFF l +#define float_type long double +#define huge_val HUGE_VALL +#include From 45b0751eae9df477d883e1cae0b6d5ae93705dfc Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 11 Apr 1997 10:27:30 +0000 Subject: [PATCH 0843/4487] Use internal exp function instead of wrapper. --- sysdeps/m68k/fpu/s_cexp.c | 62 ++++++++++++++++++++++++++++++--------- 1 file changed, 48 insertions(+), 14 deletions(-) diff --git a/sysdeps/m68k/fpu/s_cexp.c b/sysdeps/m68k/fpu/s_cexp.c index d5c76453e8..4846ec10f3 100644 --- a/sysdeps/m68k/fpu/s_cexp.c +++ b/sysdeps/m68k/fpu/s_cexp.c @@ -40,18 +40,24 @@ __complex__ float_type s(__cexp) (__complex__ float_type x) { __complex__ float_type retval; - float_type sin_ix, cos_ix; if (m81(__finite) (__real__ x)) { if (m81(__finite) (__imag__ x)) { - float_type exp_val = s(__exp) (__real__ x); + float_type exp_val = m81(__ieee754_exp) (__real__ x); - __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_ix), "=f" (cos_ix) - : "f" (__imag__ x)); - __real__ retval = exp_val * cos_ix; - __imag__ retval = exp_val * sin_ix; + __real__ retval = __imag__ retval = exp_val; + if (m81(__finite) (exp_val)) + { + float_type sin_ix, cos_ix; + __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_ix), "=f" (cos_ix) + : "f" (__imag__ x)); + __real__ retval *= cos_ix; + __imag__ retval *= sin_ix; + } + else + goto fix_sign; } else /* If the imaginary part is +-inf or NaN and the real part is @@ -62,16 +68,41 @@ s(__cexp) (__complex__ float_type x) { if (m81(__finite) (__imag__ x)) { - if (m81(__signbit) (__real__ x) == 0 && __imag__ x == 0.0) - retval = huge_val; + float_type value = m81(__signbit) (__real__ x) ? 0.0 : huge_val; + + if (__imag__ x == 0.0) + { + __real__ retval = value; + __imag__ retval = __imag__ x; + } else { - float_type value = m81(__signbit) (__real__ x) ? 0.0 : huge_val; + float_type remainder, pi_2; + int quadrant; + __real__ retval = value; + __imag__ retval = value; - __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_ix), "=f" (cos_ix) - : "f" (__imag__ x)); - __real__ retval = value * cos_ix; - __imag__ retval = value * sin_ix; + fix_sign: + __asm ("fmovecr %#0,%0\n\tfscale%.w %#-1,%0" : "=f" (pi_2)); + __asm ("fmod%.x %2,%0\n\tfmove%.l %/fpsr,%1" + : "=f" (remainder), "=dm" (quadrant) + : "f" (pi_2), "0" (__imag__ x)); + quadrant = (quadrant >> 16) & 0x83; + if (quadrant & 0x80) + quadrant ^= 0x83; + switch (quadrant) + { + default: + break; + case 1: + __real__ retval = -__real__ retval; + break; + case 2: + __real__ retval = -__real__ retval; + case 3: + __imag__ retval = -__imag__ retval; + break; + } } } else if (m81(__signbit) (__real__ x) == 0) @@ -80,7 +111,10 @@ s(__cexp) (__complex__ float_type x) __imag__ retval = 0.0/0.0; } else - retval = 0.0; + { + __real__ retval = 0.0; + __imag__ retval = s(__copysign) (0.0, __imag__ x); + } } else /* If the real part is NaN the result is NaN + iNaN. */ From 5838780e11d1369857f2147d830d18f1c43efc82 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 11 Apr 1997 10:28:26 +0000 Subject: [PATCH 0844/4487] Complex sinh function for m68k. --- sysdeps/m68k/fpu/s_csinh.c | 128 ++++++++++++++++++++++++++++++++++++ sysdeps/m68k/fpu/s_csinhf.c | 4 ++ sysdeps/m68k/fpu/s_csinhl.c | 4 ++ 3 files changed, 136 insertions(+) create mode 100644 sysdeps/m68k/fpu/s_csinh.c create mode 100644 sysdeps/m68k/fpu/s_csinhf.c create mode 100644 sysdeps/m68k/fpu/s_csinhl.c diff --git a/sysdeps/m68k/fpu/s_csinh.c b/sysdeps/m68k/fpu/s_csinh.c new file mode 100644 index 0000000000..c409ed0d8f --- /dev/null +++ b/sysdeps/m68k/fpu/s_csinh.c @@ -0,0 +1,128 @@ +/* Complex sine hyperbole function. m68k fpu version + Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Schwab . + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#define __LIBC_M81_MATH_INLINES +#include +#include + +#ifndef SUFF +#define SUFF +#endif +#ifndef huge_val +#define huge_val HUGE_VAL +#endif +#ifndef float_type +#define float_type double +#endif + +#define CONCATX(a,b) __CONCAT(a,b) +#define s(name) CONCATX(name,SUFF) +#define m81(func) __m81_u(s(func)) + +__complex__ float_type +s(__csinh) (__complex__ float_type x) +{ + __complex__ float_type retval; + int negate = m81(__signbit) (__real__ x); + + __real__ x = s(fabs) (__real__ x); + + if (m81(__finite) (__real__ x)) + { + if (m81(__finite) (__imag__ x)) + { + float_type sinh_val; + float_type sin_ix, cos_ix; + + __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_ix), "=f" (cos_ix) + : "f" (__imag__ x)); + sinh_val = m81(__ieee754_sinh) (__real__ x); + __real__ retval = cos_ix * sinh_val; + __imag__ retval = sin_ix * sinh_val; + + if (negate) + __real__ retval = -__real__ retval; + } + else if (__real__ x == 0) + { + __real__ retval = 0.0; + __imag__ retval = 0.0/0.0; + + if (negate) + __real__ retval = -__real__ retval; + } + else + __real__ retval = __imag__ retval = 0.0/0.0; + } + else if (m81(__isinf) (__real__ x)) + { + if (__imag__ x == 0.0) + { + __real__ retval = negate ? -huge_val : huge_val; + __imag__ retval = __imag__ x; + } + else if (m81(__finite) (__imag__ x)) + { + float_type remainder, pi_2; + int quadrant; + __real__ retval = __imag__ retval = huge_val; + + __asm ("fmovecr %#0,%0\n\tfscale%.w %#-1,%0" : "=f" (pi_2)); + __asm ("fmod%.x %2,%0\n\tfmove%.l %/fpsr,%1" + : "=f" (remainder), "=dm" (quadrant) + : "f" (pi_2), "0" (__imag__ x)); + quadrant = (quadrant >> 16) & 0x83; + if (quadrant & 0x80) + quadrant ^= 0x83; + if (negate) + quadrant ^= 1; + switch (quadrant) + { + default: + break; + case 1: + __real__ retval = -__real__ retval; + break; + case 2: + __real__ retval = -__real__ retval; + case 3: + __imag__ retval = -__imag__ retval; + break; + } + } + else + { + /* The subtraction raises the invalid exception. */ + __real__ retval = huge_val; + __imag__ retval = huge_val - huge_val; + } + } + else if (__imag__ x == 0.0) + { + __real__ retval = 0.0/0.0; + __imag__ retval = __imag__ x; + } + else + __real__ retval = __imag__ retval = 0.0/0.0; + + return retval; +} +#define weak_aliasx(a,b) weak_alias(a,b) +weak_aliasx (s(__csinh), s(csinh)) diff --git a/sysdeps/m68k/fpu/s_csinhf.c b/sysdeps/m68k/fpu/s_csinhf.c new file mode 100644 index 0000000000..42c114b961 --- /dev/null +++ b/sysdeps/m68k/fpu/s_csinhf.c @@ -0,0 +1,4 @@ +#define SUFF f +#define float_type float +#define huge_val HUGE_VALF +#include diff --git a/sysdeps/m68k/fpu/s_csinhl.c b/sysdeps/m68k/fpu/s_csinhl.c new file mode 100644 index 0000000000..c8aa5c7d27 --- /dev/null +++ b/sysdeps/m68k/fpu/s_csinhl.c @@ -0,0 +1,4 @@ +#define SUFF l +#define float_type long double +#define huge_val HUGE_VALL +#include From d0a13f94e4dc17c0befb794c947c6f6c9039a190 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 12 Apr 1997 23:36:57 +0000 Subject: [PATCH 0845/4487] Don't define INFINITY. --- sysdeps/m68k/huge_val.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sysdeps/m68k/huge_val.h b/sysdeps/m68k/huge_val.h index 79e87dc2db..8d45aaec2b 100644 --- a/sysdeps/m68k/huge_val.h +++ b/sysdeps/m68k/huge_val.h @@ -65,12 +65,6 @@ static __huge_vall_t __huge_vall = { __HUGE_VALL_bytes }; #define HUGE_VALL (__huge_vall.__ld) #endif /* GCC. */ - -/* Expression representing positive infinity. Here it is the same as - HUGE_VALF. */ -#define INFINITY HUGE_VALF - #endif /* __USE_ISOC9X. */ - #endif /* huge_val.h */ From 90ad32dd7276f309c761fdee5549c80b609cb8c1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 12 Apr 1997 23:37:12 +0000 Subject: [PATCH 0846/4487] (__rinttol, rinttol): New inline. --- sysdeps/m68k/fpu/__math.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h index 9b52b32d0c..68a6d90e32 100644 --- a/sysdeps/m68k/fpu/__math.h +++ b/sysdeps/m68k/fpu/__math.h @@ -282,6 +282,13 @@ __inline_functions (float,f) __inline_functions (long double,l) #undef __inline_functions +__m81_defun (long int, __rinttol, (long double __x)) +{ + long int __result; + __asm ("fmove%.l %1, %0" : "=dm" (__result) : "f" (__x)); + return __result; +} + #if !defined __NO_MATH_INLINES && defined __OPTIMIZE__ /* Define inline versions of the user visible functions. */ @@ -349,6 +356,7 @@ __inline_forward_c(int,ilogbl, (long double __value), (__value)) #endif #ifdef __USE_ISOC9X __inline_forward_c(long double,nearbyintl, (long double __value), (__value)) +__inline_forward_c(long int,rinttol, (long double __value), (__value)) #endif #endif /* Use misc or ISO C9X */ From bc3bea7963685e1295dba2b549ac6939924ce817 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 12 Apr 1997 23:37:40 +0000 Subject: [PATCH 0847/4487] m68k specific round long double to long function. --- sysdeps/m68k/fpu/s_rinttol.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 sysdeps/m68k/fpu/s_rinttol.c diff --git a/sysdeps/m68k/fpu/s_rinttol.c b/sysdeps/m68k/fpu/s_rinttol.c new file mode 100644 index 0000000000..7476d785a6 --- /dev/null +++ b/sysdeps/m68k/fpu/s_rinttol.c @@ -0,0 +1,31 @@ +/* Round argument to nearest integral value according to current rounding + direction. + Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Schwab + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#define __LIBC_M81_MATH_INLINES +#include + +long int +__rinttol (long double x) +{ + return __m81_u(__rinttol) (x); +} + +weak_alias (__rinttol, rinttol) From cddfc83cf8851d202ff898eb87ea90ea77cc8a99 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 12 Apr 1997 23:37:52 +0000 Subject: [PATCH 0848/4487] m68k specific round long double to long long function. --- sysdeps/m68k/fpu/s_rinttoll.c | 62 +++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 sysdeps/m68k/fpu/s_rinttoll.c diff --git a/sysdeps/m68k/fpu/s_rinttoll.c b/sysdeps/m68k/fpu/s_rinttoll.c new file mode 100644 index 0000000000..bad8082bd1 --- /dev/null +++ b/sysdeps/m68k/fpu/s_rinttoll.c @@ -0,0 +1,62 @@ +/* Round argument to nearest integral value according to current rounding + direction. + Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Schwab + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#define __LIBC_M81_MATH_INLINES +#include +#include "math_private.h" + +long long int +__rinttoll (long double x) +{ + int32_t se, sx; + u_int32_t h, l; + long long int result; + + x = __m81_u(__rintl) (x); + + /* We could use __fixxfdi from libgcc, but here we can take advantage of + the known floating point format. */ + GET_LDOUBLE_WORDS (se, h, l, x); + + sx = se & (1 << 15); + se = (se ^ sx) - 0x3fff; + + if (se < 64) + { + if (se > 31) + result = (((long long int) (h >> (63 - se)) << 32) + | (l >> (63 - se)) | (h << (se - 31))); + else + result = h >> (31 - se); + if (sx) + result = -result; + } + else + /* Too large. The number is either +-inf or NaN or it is too + large to be effected by rounding. The standard leaves it + undefined what to return when the number is too large to fit in + a `long long int'. */ + result = -1LL; + + return result; +} + +weak_alias (__rinttoll, rinttoll) From d80b3f3c5b13f4652f50fce9984e989e8d5d04e3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 14 Apr 1997 02:11:12 +0000 Subject: [PATCH 0849/4487] Basic functionality for libc on ARM --- sysdeps/arm/Implies | 2 + sysdeps/arm/__longjmp.S | 37 ++++++++++++++++ sysdeps/arm/bsd-_setjmp.S | 29 ++++++++++++ sysdeps/arm/bsd-setjmp.S | 29 ++++++++++++ sysdeps/arm/bytesex.h | 3 ++ sysdeps/arm/fpu_control.h | 48 ++++++++++++++++++++ sysdeps/arm/jmp_buf.h | 10 +++++ sysdeps/arm/setjmp.S | 36 +++++++++++++++ sysdeps/arm/sysdep.h | 92 +++++++++++++++++++++++++++++++++++++++ sysdeps/unix/arm/sysdep.h | 21 +++++++++ 10 files changed, 307 insertions(+) create mode 100644 sysdeps/arm/Implies create mode 100644 sysdeps/arm/__longjmp.S create mode 100644 sysdeps/arm/bsd-_setjmp.S create mode 100644 sysdeps/arm/bsd-setjmp.S create mode 100644 sysdeps/arm/bytesex.h create mode 100644 sysdeps/arm/fpu_control.h create mode 100644 sysdeps/arm/jmp_buf.h create mode 100644 sysdeps/arm/setjmp.S create mode 100644 sysdeps/arm/sysdep.h create mode 100644 sysdeps/unix/arm/sysdep.h diff --git a/sysdeps/arm/Implies b/sysdeps/arm/Implies new file mode 100644 index 0000000000..d6acf04a82 --- /dev/null +++ b/sysdeps/arm/Implies @@ -0,0 +1,2 @@ +wordsize-32 +ieee754 diff --git a/sysdeps/arm/__longjmp.S b/sysdeps/arm/__longjmp.S new file mode 100644 index 0000000000..5443761f0a --- /dev/null +++ b/sysdeps/arm/__longjmp.S @@ -0,0 +1,37 @@ +/* longjmp for ARM. + Copyright (C) 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#define _ASM +#include + +/* __longjmp(jmpbuf, val) */ + +ENTRY (__longjmp) + movs r2, r0 + movs r0, r1 /* get the return value in place */ + moveq r1, #1 /* can't let setjmp() return zero! */ + +#if __ARM_USES_FP + add r2, r2, #48 + lfmfd f4, 4, [r2] +#endif + + LOADREGS(ia, r2, {v1-v6, sl, fp, sp, pc}) +END (__longjmp) diff --git a/sysdeps/arm/bsd-_setjmp.S b/sysdeps/arm/bsd-_setjmp.S new file mode 100644 index 0000000000..5643c50918 --- /dev/null +++ b/sysdeps/arm/bsd-_setjmp.S @@ -0,0 +1,29 @@ +/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. ARM version. + Copyright (C) 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* This just does a tail-call to `__sigsetjmp (ARG, 1)'. + We cannot do it in C because it must be a tail-call, so frame-unwinding + in setjmp doesn't clobber the state restored by longjmp. */ + +#include + +ENTRY (_setjmp) + mov r1, #0 + b __sigsetjmp +END (_setjmp) diff --git a/sysdeps/arm/bsd-setjmp.S b/sysdeps/arm/bsd-setjmp.S new file mode 100644 index 0000000000..ac7dd96821 --- /dev/null +++ b/sysdeps/arm/bsd-setjmp.S @@ -0,0 +1,29 @@ +/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. ARM version. + Copyright (C) 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* This just does a tail-call to `__sigsetjmp (ARG, 1)'. + We cannot do it in C because it must be a tail-call, so frame-unwinding + in setjmp doesn't clobber the state restored by longjmp. */ + +#include + +ENTRY (setjmp) + mov r1, #1 + b __sigsetjmp +END (setjmp) diff --git a/sysdeps/arm/bytesex.h b/sysdeps/arm/bytesex.h new file mode 100644 index 0000000000..32f8489df2 --- /dev/null +++ b/sysdeps/arm/bytesex.h @@ -0,0 +1,3 @@ +/* ARM is little-endian. */ + +#define __BYTE_ORDER __LITTLE_ENDIAN diff --git a/sysdeps/arm/fpu_control.h b/sysdeps/arm/fpu_control.h new file mode 100644 index 0000000000..6a4a4bb0f0 --- /dev/null +++ b/sysdeps/arm/fpu_control.h @@ -0,0 +1,48 @@ +/* FPU control word definitions. Stub version. +Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifndef _FPU_CONTROL_H +#define _FPU_CONTROL_H + +#define _FPU_RESERVED 0xffffffff /* These bits are reserved. */ + +/* The fdlibm code requires no interrupts for exceptions. Don't + change the rounding mode, it would break long double I/O! */ +#define _FPU_DEFAULT 0x00000000 /* Default value. */ + +/* Type of the control word. */ +typedef unsigned int fpu_control_t; + +/* Macros for accessing the hardware control word. + * On the ARM, we can't do this from user mode (it would trap). + */ +#define _FPU_GETCW(cw) __asm__ ("movnv r0,r0" : "=g" (cw)) +#define _FPU_SETCW(cw) __asm__ ("movnv r0,r0" : : "g" (cw)) + +/* Default control word set at startup. */ +extern fpu_control_t __fpu_control; + +__BEGIN_DECLS + +/* Called at startup. It can be used to manipulate fpu control register. */ +extern void __setfpucw __P ((fpu_control_t)); + +__END_DECLS + +#endif /* _FPU_CONTROL_H */ diff --git a/sysdeps/arm/jmp_buf.h b/sysdeps/arm/jmp_buf.h new file mode 100644 index 0000000000..93b0f5f916 --- /dev/null +++ b/sysdeps/arm/jmp_buf.h @@ -0,0 +1,10 @@ +/* Define the machine-dependent type `jmp_buf'. ARM version. */ + +#ifndef _ASM +/* Jump buffer contains v1-v6, sl, fp, sp, pc and (f4-f7) if we do FP. */ +#if __ARM_USES_FP +typedef int __jmp_buf[22]; +#else +typedef int __jmp_buf[10]; +#endif +#endif diff --git a/sysdeps/arm/setjmp.S b/sysdeps/arm/setjmp.S new file mode 100644 index 0000000000..5891cb9dec --- /dev/null +++ b/sysdeps/arm/setjmp.S @@ -0,0 +1,36 @@ +/* setjmp for ARM. + Copyright (C) 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#define _ASM +#include + + /* Binary compatibility entry point. */ +ENTRY (__setjmp) + mov r1, #0 +ENTRY (__sigsetjmp) + /* Save registers */ +#if __ARM_USES_FP + sfmea f4, 4, [r0]! +#endif + stmia r0, {v1-v6, sl, fp, sp, lr} + + /* Make a tail call to __sigjmp_save; it takes the same args. */ + B __sigjmp_save +END (__sigsetjmp) diff --git a/sysdeps/arm/sysdep.h b/sysdeps/arm/sysdep.h new file mode 100644 index 0000000000..b7964a35b1 --- /dev/null +++ b/sysdeps/arm/sysdep.h @@ -0,0 +1,92 @@ +/* Assembler macros for ARM. + Copyright (C) 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +#ifdef ASSEMBLER + +/* Syntactic details of assembler. */ + +#ifdef HAVE_ELF + +/* ELF uses byte-counts for .align, most others use log2 of count of bytes. */ +#define ALIGNARG(log2) 1< +#include + From 843682819d4eca3e59fe1ccc5682cd15f492604a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 17 Apr 1997 15:04:04 +0000 Subject: [PATCH 0850/4487] remquo implementation for double according to IEEE. --- sysdeps/m68k/fpu/s_remquo.c | 58 +++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 sysdeps/m68k/fpu/s_remquo.c diff --git a/sysdeps/m68k/fpu/s_remquo.c b/sysdeps/m68k/fpu/s_remquo.c new file mode 100644 index 0000000000..3682ba7896 --- /dev/null +++ b/sysdeps/m68k/fpu/s_remquo.c @@ -0,0 +1,58 @@ +/* Compute remainder and a congruent to the quotient. m68k fpu version + Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Schwab + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#define __LIBC_M81_MATH_INLINES +#include + +#ifndef SUFF +#define SUFF +#endif +#ifndef float_type +#define float_type double +#endif + +#define CONCATX(a,b) __CONCAT(a,b) +#define s(name) CONCATX(name,SUFF) + +float_type +s(__remquo) (float_type x, float_type y, int *quo) +{ + float_type result; + int cquo, fpsr; + + /* FIXME: Which of frem and fmod is correct? */ +#if 1 + __asm ("frem%.x %2,%0\n\tfmove%.l %/fpsr,%1" + : "=f" (result), "=dm" (fpsr) : "f" (y), "0" (x)); + cquo = (fpsr >> 16) & 0x7f; + if ((result > 0) != (x > 0)) + cquo--; +#else + __asm ("fmod%.x %2,%0\n\tfmove%.l %/fpsr,%1" + : "=f" (result), "=dm" (fpsr) : "f" (y), "0" (x)); + cquo = (fpsr >> 16) & 0x7f; +#endif + if (fpsr & (1 << 23)) + cquo = -cquo; + *quo = cquo; + return result; +} +#define weak_aliasx(a,b) weak_alias(a,b) +weak_aliasx (s(__remquo), s(remquo)) From 6f8f9b35864bba9e0b50daf20a80a4af1fbf91e6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 17 Apr 1997 15:04:17 +0000 Subject: [PATCH 0851/4487] remquo implementation for float according to IEEE. --- sysdeps/m68k/fpu/s_remquof.c | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sysdeps/m68k/fpu/s_remquof.c diff --git a/sysdeps/m68k/fpu/s_remquof.c b/sysdeps/m68k/fpu/s_remquof.c new file mode 100644 index 0000000000..8a292fc26c --- /dev/null +++ b/sysdeps/m68k/fpu/s_remquof.c @@ -0,0 +1,3 @@ +#define SUFF f +#define float_type float +#include From 27028e98181e0f1b0a9bd0e5b68eead25271713c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 17 Apr 1997 15:04:34 +0000 Subject: [PATCH 0852/4487] remquo implementation for long double according to IEEE. --- sysdeps/m68k/fpu/s_remquol.c | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sysdeps/m68k/fpu/s_remquol.c diff --git a/sysdeps/m68k/fpu/s_remquol.c b/sysdeps/m68k/fpu/s_remquol.c new file mode 100644 index 0000000000..d236cfd1f9 --- /dev/null +++ b/sysdeps/m68k/fpu/s_remquol.c @@ -0,0 +1,3 @@ +#define SUFF l +#define float_type long double +#include From b1fc9ae2894f2cf125f887c4866643471e866bca Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 17 Apr 1997 15:07:44 +0000 Subject: [PATCH 0853/4487] m68k specific math type and constant definitions. --- sysdeps/m68k/fpu/mathbits.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 sysdeps/m68k/fpu/mathbits.h diff --git a/sysdeps/m68k/fpu/mathbits.h b/sysdeps/m68k/fpu/mathbits.h new file mode 100644 index 0000000000..049662319a --- /dev/null +++ b/sysdeps/m68k/fpu/mathbits.h @@ -0,0 +1,36 @@ +/* Copyright (C) 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _MATHBITS_H +#define _MATHBITS_H 1 + +/* The m68k FPUs evaluate all values in the 96 bit floating-point format + which is also available for the user as `long double'. Therefore we + define: */ +typedef long double float_t; /* `float' expressions are evaluated as + `long double'. */ +typedef long double double_t; /* `double' expressions are evaluated as + `long double'. */ + +/* Signal that both types are `long double'. */ +#define FLT_EVAL_METHOD 2 + +/* Define `INFINITY' as value of type `float_t'. */ +#define INFINITY HUGE_VALL + +#endif /* mathbits.h */ From c72aa4a26aca9fd04fffb751b93aec59b2f1edc0 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 17 Apr 1997 15:09:43 +0000 Subject: [PATCH 0854/4487] m68k specific math exception handling code. --- sysdeps/m68k/fpu/fclrexcpt.c | 39 ++++++++++++++++ sysdeps/m68k/fpu/fegetenv.c | 27 +++++++++++ sysdeps/m68k/fpu/fegetround.c | 31 +++++++++++++ sysdeps/m68k/fpu/feholdexcpt.c | 39 ++++++++++++++++ sysdeps/m68k/fpu/fenvbits.h | 80 +++++++++++++++++++++++++++++++++ sysdeps/m68k/fpu/fesetenv.c | 48 ++++++++++++++++++++ sysdeps/m68k/fpu/fesetround.c | 38 ++++++++++++++++ sysdeps/m68k/fpu/feupdateenv.c | 39 ++++++++++++++++ sysdeps/m68k/fpu/fgetexcptflg.c | 32 +++++++++++++ sysdeps/m68k/fpu/fraiseexcpt.c | 74 ++++++++++++++++++++++++++++++ sysdeps/m68k/fpu/fsetexcptflg.c | 38 ++++++++++++++++ sysdeps/m68k/fpu/ftestexcept.c | 32 +++++++++++++ 12 files changed, 517 insertions(+) create mode 100644 sysdeps/m68k/fpu/fclrexcpt.c create mode 100644 sysdeps/m68k/fpu/fegetenv.c create mode 100644 sysdeps/m68k/fpu/fegetround.c create mode 100644 sysdeps/m68k/fpu/feholdexcpt.c create mode 100644 sysdeps/m68k/fpu/fenvbits.h create mode 100644 sysdeps/m68k/fpu/fesetenv.c create mode 100644 sysdeps/m68k/fpu/fesetround.c create mode 100644 sysdeps/m68k/fpu/feupdateenv.c create mode 100644 sysdeps/m68k/fpu/fgetexcptflg.c create mode 100644 sysdeps/m68k/fpu/fraiseexcpt.c create mode 100644 sysdeps/m68k/fpu/fsetexcptflg.c create mode 100644 sysdeps/m68k/fpu/ftestexcept.c diff --git a/sysdeps/m68k/fpu/fclrexcpt.c b/sysdeps/m68k/fpu/fclrexcpt.c new file mode 100644 index 0000000000..b914bac9f9 --- /dev/null +++ b/sysdeps/m68k/fpu/fclrexcpt.c @@ -0,0 +1,39 @@ +/* Clear given exceptions in current floating-point environment. + Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Schwab + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +void +feclearexcept (int excepts) +{ + fexcept_t fpsr; + + /* Mask out unsupported bits/exceptions. */ + excepts &= FE_ALL_EXCEPT; + + /* Fetch the fpu status register. */ + __asm__ ("fmove%.l %/fpsr,%0" : "=dm" (fpsr)); + + /* Clear the relevant bits. */ + fpsr &= ~excepts; + + /* Put the new data in effect. */ + __asm__ __volatile__ ("fmove%.l %0,%/fpsr" : : "dm" (fpsr)); +} diff --git a/sysdeps/m68k/fpu/fegetenv.c b/sysdeps/m68k/fpu/fegetenv.c new file mode 100644 index 0000000000..59f743aecf --- /dev/null +++ b/sysdeps/m68k/fpu/fegetenv.c @@ -0,0 +1,27 @@ +/* Store current floating-point environment. + Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Schwab + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +void +fegetenv (fenv_t *envp) +{ + __asm__ ("fmovem%.l %/fpcr/%/fpsr,%0" : "=m" (*envp)); +} diff --git a/sysdeps/m68k/fpu/fegetround.c b/sysdeps/m68k/fpu/fegetround.c new file mode 100644 index 0000000000..1837a84271 --- /dev/null +++ b/sysdeps/m68k/fpu/fegetround.c @@ -0,0 +1,31 @@ +/* Return current rounding direction. + Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Schwab + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +fegetround (void) +{ + int fpcr; + + __asm__ ("fmove%.l %!,%0" : "=dm" (fpcr)); + + return fpcr & FE_UPWARD; +} diff --git a/sysdeps/m68k/fpu/feholdexcpt.c b/sysdeps/m68k/fpu/feholdexcpt.c new file mode 100644 index 0000000000..351fa8ae75 --- /dev/null +++ b/sysdeps/m68k/fpu/feholdexcpt.c @@ -0,0 +1,39 @@ +/* Store current floating-point environment and clear exceptions. + Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Schwab + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +feholdexcept (fenv_t *envp) +{ + fexcept_t fpcr, fpsr; + + /* Store the environment. */ + __asm__ ("fmovem%.l %/fpcr/%/fpsr,%0" : "=m" (*envp)); + + /* Now clear all exceptions. */ + fpsr = envp->status_register & ~FE_ALL_EXCEPT; + __asm__ __volatile__ ("fmove%.l %0,%/fpsr" : : "dm" (fpsr)); + /* And set all exceptions to non-stop. */ + fpcr = envp->control_register & ~(FE_ALL_EXCEPT << 5); + __asm__ __volatile__ ("fmove%.l %0,%!" : : "dm" (fpcr)); + + return 1; +} diff --git a/sysdeps/m68k/fpu/fenvbits.h b/sysdeps/m68k/fpu/fenvbits.h new file mode 100644 index 0000000000..b653b1aafd --- /dev/null +++ b/sysdeps/m68k/fpu/fenvbits.h @@ -0,0 +1,80 @@ +/* Copyright (C) 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* This file should never be included directly. */ + +#ifndef _FENVBITS_H +#define _FENVBITS_H 1 + +/* Define bits representing the exception. We use the bit positions of + the appropriate bits in the FPSR Accrued Exception Byte. */ +enum + { + FE_INEXACT = 1 << 3, +#define FE_INEXACT FE_INEXACT + FE_DIVBYZERO = 1 << 4, +#define FE_DIVBYZERO FE_DIVBYZERO + FE_UNDERFLOW = 1 << 5, +#define FE_UNDERFLOW FE_UNDERFLOW + FE_OVERFLOW = 1 << 6, +#define FE_OVERFLOW FE_OVERFLOW + FE_INVALID = 1 << 7 +#define FE_INVALID FE_INVALID + }; + +#define FE_ALL_EXCEPT \ + (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID) + +/* The m68k FPU supports all of the four defined rounding modes. We use + the bit positions in the FPCR Mode Control Byte as the values for the + appropriate macros. */ +enum + { + FE_TONEAREST = 0, +#define FE_TONEAREST FE_TONEAREST + FE_TOWARDSZERO = 1 << 4, +#define FE_TOWARDSZERO FE_TOWARDSZERO + FE_DOWNWARD = 2 << 4, +#define FE_DOWNWARD FE_DOWNWARD + FE_UPWARD = 3 << 4 +#define FE_UPWARD FE_UPWARD + }; + + +/* Type representing exception flags. */ +typedef unsigned int fexcept_t; + + +/* Type representing floating-point environment. This structure + corresponds to the layout of the block written by `fmovem'. */ +typedef struct + { + fexcept_t control_register; + fexcept_t status_register; + } +fenv_t; + +/* If the default argument is used we use this value. */ +#define FE_DFL_ENV ((fenv_t *) -1) + +#ifdef __USE_GNU +/* Floating-point environment where none of the exceptions are masked. */ +# define FE_NOMASK_ENV ((fenv_t *) -2) +#endif + +#endif /* fenvbits.h */ diff --git a/sysdeps/m68k/fpu/fesetenv.c b/sysdeps/m68k/fpu/fesetenv.c new file mode 100644 index 0000000000..f6611a20e0 --- /dev/null +++ b/sysdeps/m68k/fpu/fesetenv.c @@ -0,0 +1,48 @@ +/* Install given floating-point environment. + Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Schwab + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +void +fesetenv (const fenv_t *envp) +{ + fenv_t temp; + + /* Install the environment specified by ENVP. But there are a few + values which we do not want to come from the saved environment. + Therefore, we get the current environment and replace the values + we want to use from the environment specified by the parameter. */ + __asm__ ("fmovem%.l %/fpcr/%/fpsr,%0" : "=m" (*&temp)); + + temp.status_register &= ~FE_ALL_EXCEPT; + temp.control_register &= ~((FE_ALL_EXCEPT << 5) | FE_UPWARD); + if (envp == FE_DFL_ENV) + ; + else if (envp == FE_NOMASK_ENV) + temp.control_register |= FE_ALL_EXCEPT << 5; + else + { + temp.control_register |= (envp->control_register + & ((FE_ALL_EXCEPT << 5) | FE_UPWARD)); + temp.status_register |= envp->status_register & FE_ALL_EXCEPT; + } + + __asm__ __volatile__ ("fmovem%.l %0,%/fpcr/%/fpsr" : : "m" (temp)); +} diff --git a/sysdeps/m68k/fpu/fesetround.c b/sysdeps/m68k/fpu/fesetround.c new file mode 100644 index 0000000000..8d5466c956 --- /dev/null +++ b/sysdeps/m68k/fpu/fesetround.c @@ -0,0 +1,38 @@ +/* Set current rounding direction. + Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Schwab + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +fesetround (int round) +{ + fexcept_t fpcr; + + if (round & ~FE_UPWARD) + /* ROUND is no valid rounding mode. */ + return 0; + + __asm__ ("fmove%.l %!,%0" : "=dm" (fpcr)); + fpcr &= ~FE_UPWARD; + fpcr |= round; + __asm__ __volatile__ ("fmove%.l %0,%!" : : "dm" (fpcr)); + + return 1; +} diff --git a/sysdeps/m68k/fpu/feupdateenv.c b/sysdeps/m68k/fpu/feupdateenv.c new file mode 100644 index 0000000000..f5922b4de4 --- /dev/null +++ b/sysdeps/m68k/fpu/feupdateenv.c @@ -0,0 +1,39 @@ +/* Install given floating-point environment and raise exceptions. + Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Schwab + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +void +feupdateenv (const fenv_t *envp) +{ + fexcept_t fpsr; + + /* Save current exceptions. */ + __asm__ ("fmove%.l %/fpsr,%0" : "=dm" (fpsr)); + fpsr &= FE_ALL_EXCEPT; + + /* Install new environment. */ + fesetenv (envp); + + /* Raise the saved exception. Incidently for us the implementation + defined format of the values in objects of type fexcept_t is the + same as the ones specified using the FE_* constants. */ + feraiseexcept ((int) fpsr); +} diff --git a/sysdeps/m68k/fpu/fgetexcptflg.c b/sysdeps/m68k/fpu/fgetexcptflg.c new file mode 100644 index 0000000000..4086e1a97f --- /dev/null +++ b/sysdeps/m68k/fpu/fgetexcptflg.c @@ -0,0 +1,32 @@ +/* Store current representation for exceptions. + Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Schwab + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +void +fegetexceptflag (fexcept_t *flagp, int excepts) +{ + fexcept_t fpsr; + + /* Get the current exceptions. */ + __asm__ ("fmove%.l %/fpsr,%0" : "=dm" (fpsr)); + + *flagp = fpsr & excepts & FE_ALL_EXCEPT; +} diff --git a/sysdeps/m68k/fpu/fraiseexcpt.c b/sysdeps/m68k/fpu/fraiseexcpt.c new file mode 100644 index 0000000000..b6ff82760d --- /dev/null +++ b/sysdeps/m68k/fpu/fraiseexcpt.c @@ -0,0 +1,74 @@ +/* Raise given exceptions. + Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Schwab + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +void +feraiseexcept (int excepts) +{ + /* Raise exceptions represented by EXCEPTS. But we must raise only one + signal at a time. It is important that if the overflow/underflow + exception and the divide by zero exception are given at the same + time, the overflow/underflow exception follows the divide by zero + exception. */ + + /* First: invalid exception. */ + if (excepts & FE_INVALID) + { + /* One example of a invalid operation is 0 * Infinity. */ + double d = 0.0 * HUGE_VAL; + /* Now force the exception. */ + __asm__ __volatile__ ("fnop" : : "f" (d)); + } + + /* Next: division by zero. */ + if (excepts & FE_DIVBYZERO) + { + double d = 1.0; + __asm__ __volatile__ ("fdiv%.s %#0r0,%0; fnop" : "=f" (d) : "0" (d)); + } + + /* Next: overflow. */ + if (excepts & FE_OVERFLOW) + { + long double d = LDBL_MAX * LDBL_MAX; + /* Now force the exception. */ + __asm__ __volatile__ ("fnop" : : "f" (d)); + } + + /* Next: underflow. */ + if (excepts & FE_UNDERFLOW) + { + long double d = LDBL_MIN / 16.0; + /* Now force the exception. */ + __asm__ __volatile__ ("fnop" : : "f" (d)); + } + + /* Last: inexact. */ + if (excepts & FE_INEXACT) + { + long double d1, d2 = 1.0; + __asm__ __volatile__ ("fmovecr %#0,%0\n\t" + "fdiv%.x %1,%0\n\t" + "fnop" + : "=&f" (d1) : "f" (d2)); + } +} diff --git a/sysdeps/m68k/fpu/fsetexcptflg.c b/sysdeps/m68k/fpu/fsetexcptflg.c new file mode 100644 index 0000000000..aa92ffd0c5 --- /dev/null +++ b/sysdeps/m68k/fpu/fsetexcptflg.c @@ -0,0 +1,38 @@ +/* Set floating-point environment exception handling. + Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Schwab + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +void +fesetexceptflag (const fexcept_t *flagp, int excepts) +{ + fexcept_t fpsr; + + /* Get the current status register. */ + __asm__ ("fmove%.l %/fpsr,%0" : "=dm" (fpsr)); + + /* Install the new exception bits in the Accrued Exception Byte. */ + fpsr &= ~(excepts & FE_ALL_EXCEPT); + fpsr |= *flagp & excepts & FE_ALL_EXCEPT; + + /* Store the new status register. */ + __asm__ __volatile__ ("fmove%.l %0,%/fpsr" : : "dm" (fpsr)); +} diff --git a/sysdeps/m68k/fpu/ftestexcept.c b/sysdeps/m68k/fpu/ftestexcept.c new file mode 100644 index 0000000000..c092ce18e3 --- /dev/null +++ b/sysdeps/m68k/fpu/ftestexcept.c @@ -0,0 +1,32 @@ +/* Test exception in current environment. + Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Schwab + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +fetestexcept (int excepts) +{ + fexcept_t fpsr; + + /* Get current exceptions. */ + __asm__ ("fmove%.l %/fpsr,%0" : "=dm" (fpsr)); + + return fpsr & excepts & FE_ALL_EXCEPT; +} From ecc1637a091abccb81884aff172f30a37b3d4fe1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 21 Apr 1997 11:36:45 +0000 Subject: [PATCH 0855/4487] Define optimized versions of isgreater, isgreaterequal, isless, islessequal, islessgreater, and isunordered. Add inlined sincos{,l,f}. --- sysdeps/m68k/fpu/__math.h | 76 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h index 68a6d90e32..92487f9b04 100644 --- a/sysdeps/m68k/fpu/__math.h +++ b/sysdeps/m68k/fpu/__math.h @@ -274,6 +274,14 @@ __m81_defun (float_type, __CONCAT(__nearbyint,s), (float_type __x)) \ __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ : "dmi" (__ctrl_reg)); \ return __result; \ +} \ + \ +__m81_inline void \ +__m81_u(__CONCAT(__sincos,s))(float_type __x, float_type *__sinx, \ + float_type *__cosx) \ +{ \ + __asm ("fsincos%.x %2,%1:%0" \ + : "=f" (*__sinx), "=f" (*__cosx) : "f" (__x)); \ } /* This defines the three variants of the inline functions. */ @@ -324,6 +332,10 @@ __inline_forward_c(int,ilogb, (double __value), (__value)) #ifdef __USE_ISOC9X __inline_forward_c(double,nearbyint, (double __value), (__value)) #endif +#ifdef __USE_GNU +__inline_forward(void,sincos, (double __x, double *__sinx, double *__cosx), + (__x, __sinx, __cosx)) +#endif #if defined __USE_MISC || defined __USE_ISOC9X @@ -341,6 +353,10 @@ __inline_forward_c(int,ilogbf, (float __value), (__value)) #ifdef __USE_ISOC9X __inline_forward_c(float,nearbyintf, (float __value), (__value)) #endif +#ifdef __USE_GNU +__inline_forward(void,sincosf, (float __x, float *__sinx, float *__cosx), + (__x, __sinx, __cosx)) +#endif __inline_forward(long double,frexpl, (long double __value, int *__expptr), (__value, __expptr)) @@ -358,12 +374,72 @@ __inline_forward_c(int,ilogbl, (long double __value), (__value)) __inline_forward_c(long double,nearbyintl, (long double __value), (__value)) __inline_forward_c(long int,rinttol, (long double __value), (__value)) #endif +#ifdef __USE_GNU +__inline_forward(void,sincosl, + (long double __x, long double *__sinx, long double *__cosx), + (__x, __sinx, __cosx)) +#endif #endif /* Use misc or ISO C9X */ #undef __inline_forward #undef __inline_forward_c +#ifdef __USE_ISOC9X + +/* ISO C 9X defines some macros to perform unordered comparisons. The + m68k FPU supports this with special opcodes and we should use them. + These must not be inline functions since we have to be able to handle + all floating-point types. */ +#undef isgreater +#define isgreater(x, y) \ + __extension__ \ + ({ char __result; \ + __asm__ ("fcmp %2,%1; fsogt %0" \ + : "=dm" (__result) : "f" (x), "f" (y)); \ + (int) __result; }) + +#undef isgreaterequal +#define isgreaterequal(x, y) \ + __extension__ \ + ({ char __result; \ + __asm__ ("fcmp %2,%1; fsoge %0" \ + : "=dm" (__result) : "f" (x), "f" (y)); \ + (int) __result; }) + +#undef isless +#define isless(x, y) \ + __extension__ \ + ({ char __result; \ + __asm__ ("fcmp %2,%1; fsolt %0" \ + : "=dm" (__result) : "f" (x), "f" (y)); \ + (int) __result; }) + +#undef islessequal +#define islessequal(x, y) \ + __extension__ \ + ({ char __result; \ + __asm__ ("fcmp %2,%1; fsole %0" \ + : "=dm" (__result) : "f" (x), "f" (y)); \ + (int) __result; }) + +#undef islessgreater +#define islessgreater(x, y) \ + __extension__ \ + ({ char __result; \ + __asm__ ("fcmp %2,%1; fsogl %0" \ + : "=dm" (__result) : "f" (x), "f" (y)); \ + (int) __result; }) + +#undef isunordered +#define isunordered(x, y) \ + __extension__ \ + ({ char __result; \ + __asm__ ("fcmp %2,%1; fsun %0" \ + : "=dm" (__result) : "f" (x), "f" (y)); \ + (int) __result; }) +#endif + #endif /* !__NO_MATH_INLINES && __OPTIMIZE__ */ #endif /* GCC. */ From 334ca6573bd4bcc070f984c11adb59762de6692a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 21 Apr 1997 11:36:58 +0000 Subject: [PATCH 0856/4487] Rewrite handling of integral exponent. --- sysdeps/m68k/fpu/e_pow.c | 49 ++++++++++++++-------------------------- 1 file changed, 17 insertions(+), 32 deletions(-) diff --git a/sysdeps/m68k/fpu/e_pow.c b/sysdeps/m68k/fpu/e_pow.c index 284f1bf294..a39b63d342 100644 --- a/sysdeps/m68k/fpu/e_pow.c +++ b/sysdeps/m68k/fpu/e_pow.c @@ -80,51 +80,36 @@ s(__ieee754_pow) (float_type x, float_type y) z = 1 / z; if (m81(__signbit) (x)) { - float_type temp = m81(__rint) (y); - if (y != temp) + if (y != m81(__rint) (y)) { if (x == -1) z = 0.0/0.0; } else - { - if (sizeof (float_type) == sizeof (float)) - { - long i = (long) y; - if (i & 1) - z = -z; - } - else - { - long long i = (long long) y; - if ((float_type) i == y && i & 1) - z = -z; - } - } + goto maybe_negate; } return z; } if (x < 0.0) { - float_type temp = m81(__rint) (y); - if (y == temp) + if (y == m81(__rint) (y)) { - long long i = (long long) y; z = m81(__ieee754_exp) (y * m81(__ieee754_log) (-x)); - if (sizeof (float_type) == sizeof (float)) - { - long i = (long) y; - if (i & 1) - z = -z; - } - else - { - /* If the conversion to long long was inexact assume that y - is an even integer. */ - if ((float_type) i == y && i & 1) - z = -z; - } + maybe_negate: + /* We always use the long double format, since y is already in + this format and rounding won't change the result. */ + { + int32_t exponent; + u_int32_t i0, i1; + GET_LDOUBLE_WORDS (exponent, i0, i1, y); + exponent = (exponent & 0x7fff) - 0x3fff; + if (exponent <= 31 + ? i0 & (1 << (31 - exponent)) + : (exponent <= 63 + && i1 & (1 << (63 - exponent)))) + z = -z; + } } else z = 0.0/0.0; From f119590d6c6f85894bd15293d29542cd38281eec Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 21 Apr 1997 11:37:37 +0000 Subject: [PATCH 0857/4487] m68k specific optimized version of sincos for double. --- sysdeps/m68k/fpu/s_sincos.c | 39 +++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 sysdeps/m68k/fpu/s_sincos.c diff --git a/sysdeps/m68k/fpu/s_sincos.c b/sysdeps/m68k/fpu/s_sincos.c new file mode 100644 index 0000000000..ada21d0fb1 --- /dev/null +++ b/sysdeps/m68k/fpu/s_sincos.c @@ -0,0 +1,39 @@ +/* Copyright (C) 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#define __LIBC_M81_MATH_INLINES +#include + +#ifndef FUNC +#define FUNC sincos +#endif +#ifndef float_type +#define float_type double +#endif + +#define CONCATX(a,b) __CONCAT(a,b) + +void +CONCATX(__,FUNC) (x, sinx, cosx) + float_type x, *sinx, *cosx; +{ + __m81_u(CONCATX(__,FUNC))(x, sinx, cosx); +} + +#define weak_aliasx(a,b) weak_alias(a,b) +weak_aliasx (CONCATX(__,FUNC), FUNC) From ffe33322dbf8ecfea8c61b68c1d1121cb166ec82 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 21 Apr 1997 11:37:48 +0000 Subject: [PATCH 0858/4487] m68k specific optimized version of sincos for float. --- sysdeps/m68k/fpu/s_sincosf.c | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sysdeps/m68k/fpu/s_sincosf.c diff --git a/sysdeps/m68k/fpu/s_sincosf.c b/sysdeps/m68k/fpu/s_sincosf.c new file mode 100644 index 0000000000..7ee2ec6600 --- /dev/null +++ b/sysdeps/m68k/fpu/s_sincosf.c @@ -0,0 +1,3 @@ +#define FUNC sincosf +#define float_type float +#include From 947a127d2b25baaee34162ebe29900fa2cdffda3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 21 Apr 1997 11:38:01 +0000 Subject: [PATCH 0859/4487] m68k specific optimized version of sincos for long double. --- sysdeps/m68k/fpu/s_sincosl.c | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sysdeps/m68k/fpu/s_sincosl.c diff --git a/sysdeps/m68k/fpu/s_sincosl.c b/sysdeps/m68k/fpu/s_sincosl.c new file mode 100644 index 0000000000..f998cc0977 --- /dev/null +++ b/sysdeps/m68k/fpu/s_sincosl.c @@ -0,0 +1,3 @@ +#define FUNC sincosl +#define float_type long double +#include From 75635b00de773d61a04d7a0217d8c8df70dfde9c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 30 Apr 1997 15:49:27 +0000 Subject: [PATCH 0860/4487] Save the function argument in t0 rather than a4 to avoid it being clobbered. --- sysdeps/unix/sysv/linux/alpha/clone.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S index 261bd81e57..5d36e2588d 100644 --- a/sysdeps/unix/sysv/linux/alpha/clone.S +++ b/sysdeps/unix/sysv/linux/alpha/clone.S @@ -44,7 +44,7 @@ ENTRY(__clone) /* Do the system call */ mov a0,pv /* get fn ptr out of the way */ - mov a3,a4 /* get fn arg out of the way */ + mov a3,t0 /* get fn arg out of the way */ mov a2,a0 ldiq v0,__NR_clone call_pal PAL_callsys @@ -74,7 +74,7 @@ thread_start: .prologue 0 /* Call the user's function */ - mov a4,a0 + mov t0,a0 jsr ra,(pv) ldgp gp,0(ra) From e9b08b8835394745ba31ec3ff4ca9e1fd14631b2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 7 May 1997 14:32:55 +0000 Subject: [PATCH 0861/4487] (elf_machine_rela): Check for mismatch in size for copy relocation. --- sysdeps/m68k/dl-machine.h | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index d79ef25d81..e6b8f9e362 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -22,6 +22,8 @@ #define ELF_MACHINE_NAME "m68k" +#include + #include /* Return nonzero iff E_MACHINE is compatible with the running host. */ @@ -54,14 +56,14 @@ static inline Elf32_Addr elf_machine_load_address (void) { Elf32_Addr addr; - asm ("here: lea here(%%pc), %0\n" - " sub.l %#here, %0" + asm (".Lhere: lea .Lhere(%%pc), %0\n" + " sub.l %#.Lhere, %0" : "=a" (addr)); return addr; } /* The `subl' insn above will contain an R_68K_RELATIVE relocation - entry intended to insert the run-time address of the label `here'. + entry intended to insert the run-time address of the label `.Lhere'. This will be the first relocation in the text of the dynamic linker; we skip it to avoid trying to modify read-only text in this early stage. */ @@ -215,6 +217,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, *reloc_addr = map->l_addr + reloc->r_addend; else { + const Elf32_Sym *const refsym = sym; Elf32_Addr value = RESOLVE (&sym, version, ELF32_R_TYPE (reloc->r_info)); if (sym) value += sym->st_value; @@ -222,7 +225,18 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, switch (ELF32_R_TYPE (reloc->r_info)) { case R_68K_COPY: - memcpy (reloc_addr, (void *) value, sym->st_size); + if (sym->st_size != refsym->st_size) + { + const char *strtab; + + strtab = ((void *) map->l_addr + + map->l_info[DT_STRTAB]->d_un.d_ptr); + _dl_sysdep_error ("Symbol `", strtab + refsym->st_name, + "' has different size in shared object, " + "consider re-linking\n", NULL); + } + memcpy (reloc_addr, (void *) value, MIN (sym->st_size, + refsym->st_size)); break; case R_68K_GLOB_DAT: case R_68K_JMP_SLOT: From 08c2dbb9a20fa10e3b596d5fbbed8d7a54a71f5d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 7 May 1997 15:26:19 +0000 Subject: [PATCH 0862/4487] (__frexp): Don't raise invalid exception on infinite value. (__m81_test, __M81_COND_NAN, __M81_COND_INF, __M81_COND_NEG, __M81_COND_ZERO): New definitions. --- sysdeps/m68k/fpu/__math.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h index 92487f9b04..5dc4d2e066 100644 --- a/sysdeps/m68k/fpu/__math.h +++ b/sysdeps/m68k/fpu/__math.h @@ -153,6 +153,21 @@ __internal_inline_functions (float,f) __internal_inline_functions (long double,l) #undef __internal_inline_functions +/* Get the m68881 condition codes, to quickly check multiple conditions. */ +static __inline__ unsigned long +__m81_test (long double __val) +{ + unsigned long __fpsr; + __asm ("ftst%.x %1; fmove%.l %/fpsr,%0" : "=dm" (__fpsr) : "f" (__val)); + return __fpsr; +} + +/* Bit values returned by __m81_test. */ +#define __M81_COND_NAN (1 << 24) +#define __M81_COND_INF (2 << 24) +#define __M81_COND_ZERO (4 << 24) +#define __M81_COND_NEG (8 << 24) + #endif /* __LIBC_M81_MATH_INLINES */ /* The rest of the functions are available to the user. */ @@ -163,8 +178,12 @@ __m81_u(__CONCAT(__frexp,s))(float_type __value, int *__expptr) \ { \ float_type __mantissa, __exponent; \ int __iexponent; \ - if (__value == 0.0) \ + unsigned long __fpsr; \ + __asm("ftst%.x %1\n" \ + "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \ + if (__fpsr & (7 << 24)) \ { \ + /* Not finite or zero. */ \ *__expptr = 0; \ return __value; \ } \ From 4291e757513ff4c788f435fed697b10c48108b0c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 7 May 1997 15:26:29 +0000 Subject: [PATCH 0863/4487] Raise invalid exception for NaN result. Use __m81_test. --- sysdeps/m68k/fpu/e_pow.c | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/sysdeps/m68k/fpu/e_pow.c b/sysdeps/m68k/fpu/e_pow.c index a39b63d342..b3d151fadc 100644 --- a/sysdeps/m68k/fpu/e_pow.c +++ b/sysdeps/m68k/fpu/e_pow.c @@ -36,29 +36,33 @@ s(__ieee754_pow) (float_type x, float_type y) { float_type z; float_type ax; + unsigned long x_cond, y_cond; - if (y == 0.0) + y_cond = __m81_test (y); + if (y_cond & __M81_COND_ZERO) return 1.0; - if (x != x || y != y) + + x_cond = __m81_test (x); + if ((x_cond | y_cond) & __M81_COND_NAN) return x + y; - if (m81(__isinf) (y)) + if (y_cond & __M81_COND_INF) { ax = s(fabs) (x); if (ax == 1) - return 0.0/0.0; + return y - y; if (ax > 1) - return y > 0 ? y : 0; + return y_cond & __M81_COND_NEG ? 0 : y; else - return y < 0 ? -y : 0; + return y_cond & __M81_COND_NEG ? -y : 0; } if (s(fabs) (y) == 1) - return y > 0 ? x : 1 / x; + return y_cond & __M81_COND_NEG ? 1 / x : x; if (y == 2) return x * x; - if (y == 0.5 && x >= 0) + if (y == 0.5 && !(x_cond & __M81_COND_NEG)) return m81(__ieee754_sqrt) (x); if (x == 10.0) @@ -73,17 +77,17 @@ s(__ieee754_pow) (float_type x, float_type y) } ax = s(fabs) (x); - if (m81(__isinf) (x) || x == 0 || ax == 1) + if (x_cond & (__M81_COND_INF | __M81_COND_ZERO) || ax == 1) { z = ax; - if (y < 0) + if (y_cond & __M81_COND_NEG) z = 1 / z; - if (m81(__signbit) (x)) + if (x_cond & __M81_COND_NEG) { if (y != m81(__rint) (y)) { if (x == -1) - z = 0.0/0.0; + z = (z - z) / (z - z); } else goto maybe_negate; @@ -91,7 +95,7 @@ s(__ieee754_pow) (float_type x, float_type y) return z; } - if (x < 0.0) + if (x_cond & __M81_COND_NEG) { if (y == m81(__rint) (y)) { @@ -112,7 +116,7 @@ s(__ieee754_pow) (float_type x, float_type y) } } else - z = 0.0/0.0; + z = (y - y) / (y - y); } else z = m81(__ieee754_exp) (y * m81(__ieee754_log) (x)); From bc993309203d0fd2fd1b4d47df5f49448afe9277 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 7 May 1997 15:27:03 +0000 Subject: [PATCH 0864/4487] m68k specific complex cosine implementation. --- sysdeps/m68k/fpu/s_ccos.c | 73 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 sysdeps/m68k/fpu/s_ccos.c diff --git a/sysdeps/m68k/fpu/s_ccos.c b/sysdeps/m68k/fpu/s_ccos.c new file mode 100644 index 0000000000..53f8286b14 --- /dev/null +++ b/sysdeps/m68k/fpu/s_ccos.c @@ -0,0 +1,73 @@ +/* Complex cosine function. m68k fpu version + Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Schwab . + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#define __LIBC_M81_MATH_INLINES +#include +#include + +#ifndef SUFF +#define SUFF +#endif +#ifndef float_type +#define float_type double +#endif + +#define CONCATX(a,b) __CONCAT(a,b) +#define s(name) CONCATX(name,SUFF) +#define m81(func) __m81_u(s(func)) + +__complex__ float_type +s(__ccos) (__complex__ float_type x) +{ + __complex__ float_type retval; + unsigned long rx_cond = __m81_test (__real__ x); + + if ((rx_cond & (__M81_COND_INF|__M81_COND_NAN)) == 0) + { + /* Real part is finite. */ + float_type sin_rx, cos_rx; + + __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_rx), "=f" (cos_rx) + : "f" (__real__ x)); + __real__ retval = cos_rx * m81(__ieee754_cosh) (__imag__ x); + if (rx_cond & __M81_COND_ZERO) + __imag__ retval = (m81(__signbit) (__imag__ x) + ? __real__ x : -__real__ x); + else + __imag__ retval = -sin_rx * m81(__ieee754_sinh) (__imag__ x); + } + else + { + unsigned long ix_cond = __m81_test (__imag__ x); + + if (ix_cond & __M81_COND_INF) + __real__ retval = s(fabs) (__imag__ x); + else + __real__ retval = __real__ x - __real__ x; + if (ix_cond & __M81_COND_ZERO) + __imag__ retval = __imag__ x; + else + __imag__ retval = __real__ x - __real__ x; + } + + return retval; +} +#define weak_aliasx(a,b) weak_alias(a,b) +weak_aliasx (s(__ccos), s(ccos)) From fc2cf9ae39684f70eeda160e6fa715475a7704f6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 7 May 1997 15:27:16 +0000 Subject: [PATCH 0865/4487] m68k specific complex cosine implementation for float. --- sysdeps/m68k/fpu/s_ccosf.c | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sysdeps/m68k/fpu/s_ccosf.c diff --git a/sysdeps/m68k/fpu/s_ccosf.c b/sysdeps/m68k/fpu/s_ccosf.c new file mode 100644 index 0000000000..f5e8a41faf --- /dev/null +++ b/sysdeps/m68k/fpu/s_ccosf.c @@ -0,0 +1,3 @@ +#define SUFF f +#define float_type float +#include From 46a66e25c6925f3476663e6baf882f6ee0bb49e8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 7 May 1997 15:27:27 +0000 Subject: [PATCH 0866/4487] m68k specific complex cosine implementation for long double. --- sysdeps/m68k/fpu/s_ccosl.c | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sysdeps/m68k/fpu/s_ccosl.c diff --git a/sysdeps/m68k/fpu/s_ccosl.c b/sysdeps/m68k/fpu/s_ccosl.c new file mode 100644 index 0000000000..aaff365208 --- /dev/null +++ b/sysdeps/m68k/fpu/s_ccosl.c @@ -0,0 +1,3 @@ +#define SUFF l +#define float_type long double +#include From 29b12174ee3d44a351974dee6c6394c05bd8b18e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 7 May 1997 15:27:44 +0000 Subject: [PATCH 0867/4487] m68k specific complex sine implementation for double. --- sysdeps/m68k/fpu/s_csin.c | 69 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 sysdeps/m68k/fpu/s_csin.c diff --git a/sysdeps/m68k/fpu/s_csin.c b/sysdeps/m68k/fpu/s_csin.c new file mode 100644 index 0000000000..8eecd961a6 --- /dev/null +++ b/sysdeps/m68k/fpu/s_csin.c @@ -0,0 +1,69 @@ +/* Complex sine function. m68k fpu version + Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Schwab . + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#define __LIBC_M81_MATH_INLINES +#include +#include + +#ifndef SUFF +#define SUFF +#endif +#ifndef float_type +#define float_type double +#endif + +#define CONCATX(a,b) __CONCAT(a,b) +#define s(name) CONCATX(name,SUFF) +#define m81(func) __m81_u(s(func)) + +__complex__ float_type +s(__csin) (__complex__ float_type x) +{ + __complex__ float_type retval; + unsigned long rx_cond = __m81_test (__real__ x); + + if ((rx_cond & (__M81_COND_INF|__M81_COND_NAN)) == 0) + { + /* Real part is finite. */ + float_type sin_rx, cos_rx; + + __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_rx), "=f" (cos_rx) + : "f" (__real__ x)); + if (rx_cond & __M81_COND_ZERO) + __real__ retval = __real__ x; + else + __real__ retval = sin_rx * m81(__ieee754_cosh) (__imag__ x); + __imag__ retval = cos_rx * m81(__ieee754_sinh) (__imag__ x); + } + else + { + unsigned long ix_cond = __m81_test (__imag__ x); + + __real__ retval = __real__ x - __real__ x; + if (ix_cond & (__M81_COND_ZERO|__M81_COND_INF|__M81_COND_NAN)) + __imag__ retval = __imag__ x; + else + __imag__ retval = __real__ retval; + } + + return retval; +} +#define weak_aliasx(a,b) weak_alias(a,b) +weak_aliasx (s(__csin), s(csin)) From 290960f75826a6d19078576f5904614f4c01aac4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 7 May 1997 15:27:51 +0000 Subject: [PATCH 0868/4487] m68k specific complex sine implementation for float. --- sysdeps/m68k/fpu/s_csinf.c | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sysdeps/m68k/fpu/s_csinf.c diff --git a/sysdeps/m68k/fpu/s_csinf.c b/sysdeps/m68k/fpu/s_csinf.c new file mode 100644 index 0000000000..b760e192c3 --- /dev/null +++ b/sysdeps/m68k/fpu/s_csinf.c @@ -0,0 +1,3 @@ +#define SUFF f +#define float_type float +#include From d607f9b1a45937ccf5e8cce94e96d1860a957105 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 7 May 1997 15:28:03 +0000 Subject: [PATCH 0869/4487] m68k specific complex sine implementation for long double. --- sysdeps/m68k/fpu/s_csinl.c | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sysdeps/m68k/fpu/s_csinl.c diff --git a/sysdeps/m68k/fpu/s_csinl.c b/sysdeps/m68k/fpu/s_csinl.c new file mode 100644 index 0000000000..ea2dad0556 --- /dev/null +++ b/sysdeps/m68k/fpu/s_csinl.c @@ -0,0 +1,3 @@ +#define SUFF l +#define float_type long double +#include From 761edbdece3f465469d5018186e166b8e0a23656 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 7 May 1997 15:29:22 +0000 Subject: [PATCH 0870/4487] Don't define huge_val. --- sysdeps/m68k/fpu/s_ccoshf.c | 1 - sysdeps/m68k/fpu/s_ccoshl.c | 1 - sysdeps/m68k/fpu/s_cexpf.c | 1 - sysdeps/m68k/fpu/s_cexpl.c | 1 - sysdeps/m68k/fpu/s_csinhf.c | 1 - sysdeps/m68k/fpu/s_csinhl.c | 1 - 6 files changed, 6 deletions(-) diff --git a/sysdeps/m68k/fpu/s_ccoshf.c b/sysdeps/m68k/fpu/s_ccoshf.c index 7d0766851f..3c8e7c7bb7 100644 --- a/sysdeps/m68k/fpu/s_ccoshf.c +++ b/sysdeps/m68k/fpu/s_ccoshf.c @@ -1,4 +1,3 @@ #define SUFF f #define float_type float -#define huge_val HUGE_VALF #include diff --git a/sysdeps/m68k/fpu/s_ccoshl.c b/sysdeps/m68k/fpu/s_ccoshl.c index 6f1d1e5f85..772d5786cf 100644 --- a/sysdeps/m68k/fpu/s_ccoshl.c +++ b/sysdeps/m68k/fpu/s_ccoshl.c @@ -1,4 +1,3 @@ #define SUFF l #define float_type long double -#define huge_val HUGE_VALL #include diff --git a/sysdeps/m68k/fpu/s_cexpf.c b/sysdeps/m68k/fpu/s_cexpf.c index db9f174546..177a360f9b 100644 --- a/sysdeps/m68k/fpu/s_cexpf.c +++ b/sysdeps/m68k/fpu/s_cexpf.c @@ -1,4 +1,3 @@ #define SUFF f -#define huge_val HUGE_VALF #define float_type float #include diff --git a/sysdeps/m68k/fpu/s_cexpl.c b/sysdeps/m68k/fpu/s_cexpl.c index 7367070548..bbda4ba990 100644 --- a/sysdeps/m68k/fpu/s_cexpl.c +++ b/sysdeps/m68k/fpu/s_cexpl.c @@ -1,4 +1,3 @@ #define SUFF l -#define huge_val HUGE_VALL #define float_type long double #include diff --git a/sysdeps/m68k/fpu/s_csinhf.c b/sysdeps/m68k/fpu/s_csinhf.c index 42c114b961..2f7a43e6a8 100644 --- a/sysdeps/m68k/fpu/s_csinhf.c +++ b/sysdeps/m68k/fpu/s_csinhf.c @@ -1,4 +1,3 @@ #define SUFF f #define float_type float -#define huge_val HUGE_VALF #include diff --git a/sysdeps/m68k/fpu/s_csinhl.c b/sysdeps/m68k/fpu/s_csinhl.c index c8aa5c7d27..026a20e7be 100644 --- a/sysdeps/m68k/fpu/s_csinhl.c +++ b/sysdeps/m68k/fpu/s_csinhl.c @@ -1,4 +1,3 @@ #define SUFF l #define float_type long double -#define huge_val HUGE_VALL #include From e7af313d349ac63239d2b2ef8ad7bffb2feec488 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 7 May 1997 15:29:27 +0000 Subject: [PATCH 0871/4487] Rewritten. --- sysdeps/m68k/fpu/s_ccosh.c | 85 +++++++------------------- sysdeps/m68k/fpu/s_cexp.c | 119 +++++++++++++++++-------------------- sysdeps/m68k/fpu/s_csinh.c | 91 ++++++---------------------- 3 files changed, 94 insertions(+), 201 deletions(-) diff --git a/sysdeps/m68k/fpu/s_ccosh.c b/sysdeps/m68k/fpu/s_ccosh.c index 439eae131c..85e73b87e3 100644 --- a/sysdeps/m68k/fpu/s_ccosh.c +++ b/sysdeps/m68k/fpu/s_ccosh.c @@ -25,9 +25,6 @@ #ifndef SUFF #define SUFF #endif -#ifndef huge_val -#define huge_val HUGE_VAL -#endif #ifndef float_type #define float_type double #endif @@ -40,78 +37,40 @@ __complex__ float_type s(__ccosh) (__complex__ float_type x) { __complex__ float_type retval; + unsigned long ix_cond = __m81_test (__imag__ x); - __real__ x = s(fabs) (__real__ x); - - if (m81(__finite) (__real__ x)) + if ((ix_cond & (__M81_COND_INF|__M81_COND_NAN)) == 0) { - if (m81(__finite) (__imag__ x)) - { - float_type cosh_val; - float_type sin_ix, cos_ix; + /* Imaginary part is finite. */ + float_type sin_ix, cos_ix; - __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_ix), "=f" (cos_ix) - : "f" (__imag__ x)); - cosh_val = m81(__ieee754_cosh) (__real__ x); - __real__ retval = cos_ix * cosh_val; - __imag__ retval = sin_ix * cosh_val; - } - else if (__real__ x == 0) - { - __imag__ retval = 0.0; - __real__ retval = huge_val - huge_val; - } + __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_ix), "=f" (cos_ix) + : "f" (__imag__ x)); + __real__ retval = cos_ix * m81(__ieee754_cosh) (__real__ x); + if (ix_cond & __M81_COND_ZERO) + __imag__ retval = (m81(__signbit) (__real__ x) + ? -__imag__ x : __imag__ x); else - __real__ retval = __imag__ retval = huge_val - huge_val; + __imag__ retval = sin_ix * m81(__ieee754_sinh) (__real__ x); } - else if (m81(__isinf) (__real__ x)) + else { - if (__imag__ x == 0) - { - __real__ retval = huge_val; - __imag__ retval = __imag__ x; - } - else if (m81(__finite) (__imag__ x)) - { - float_type remainder, pi_2; - int quadrant; - __real__ retval = __imag__ retval = huge_val; + unsigned long rx_cond = __m81_test (__real__ x); - __asm ("fmovecr %#0,%0\n\tfscale%.w %#-1,%0" : "=f" (pi_2)); - __asm ("fmod%.x %2,%0\n\tfmove%.l %/fpsr,%1" - : "=f" (remainder), "=dm" (quadrant) - : "f" (pi_2), "0" (__imag__ x)); - quadrant = (quadrant >> 16) & 0x83; - if (quadrant & 0x80) - quadrant ^= 0x83; - switch (quadrant) - { - default: - break; - case 1: - __real__ retval = -__real__ retval; - break; - case 2: - __real__ retval = -__real__ retval; - case 3: - __imag__ retval = -__imag__ retval; - break; - } + if (rx_cond & __M81_COND_ZERO) + { + __real__ retval = __imag__ x - __imag__ x; + __imag__ retval = __real__ x; } else { - /* The subtraction raises the invalid exception. */ - __real__ retval = huge_val; - __imag__ retval = huge_val - huge_val; + if (rx_cond & __M81_COND_INF) + __real__ retval = s(fabs) (__real__ x); + else + __real__ retval = 0.0/0.0; + __imag__ retval = __imag__ x - __imag__ x; } } - else if (__imag__ x == 0) - { - __real__ retval = 0.0/0.0; - __imag__ retval = __imag__ x; - } - else - __real__ retval = __imag__ retval = 0.0/0.0; return retval; } diff --git a/sysdeps/m68k/fpu/s_cexp.c b/sysdeps/m68k/fpu/s_cexp.c index 4846ec10f3..86cc894a7e 100644 --- a/sysdeps/m68k/fpu/s_cexp.c +++ b/sysdeps/m68k/fpu/s_cexp.c @@ -25,9 +25,6 @@ #ifndef SUFF #define SUFF #endif -#ifndef huge_val -#define huge_val HUGE_VAL -#endif #ifndef float_type #define float_type double #endif @@ -40,85 +37,79 @@ __complex__ float_type s(__cexp) (__complex__ float_type x) { __complex__ float_type retval; + unsigned long ix_cond; + + ix_cond = __m81_test (__imag__ x); - if (m81(__finite) (__real__ x)) + if ((ix_cond & (__M81_COND_NAN|__M81_COND_INF)) == 0) { - if (m81(__finite) (__imag__ x)) + /* Imaginary part is finite. */ + float_type exp_val = m81(__ieee754_exp) (__real__ x); + + __real__ retval = __imag__ retval = exp_val; + if (m81(__finite) (exp_val)) { - float_type exp_val = m81(__ieee754_exp) (__real__ x); + float_type sin_ix, cos_ix; + __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_ix), "=f" (cos_ix) + : "f" (__imag__ x)); + __real__ retval *= cos_ix; + if (ix_cond & __M81_COND_ZERO) + __imag__ retval = __imag__ x; + else + __imag__ retval *= sin_ix; + } + else + { + /* Compute the sign of the result. */ + float_type remainder, pi_2; + int quadrant; - __real__ retval = __imag__ retval = exp_val; - if (m81(__finite) (exp_val)) + __asm ("fmovecr %#0,%0\n\tfscale%.w %#-1,%0" : "=f" (pi_2)); + __asm ("fmod%.x %2,%0\n\tfmove%.l %/fpsr,%1" + : "=f" (remainder), "=dm" (quadrant) + : "f" (pi_2), "0" (__imag__ x)); + quadrant = (quadrant >> 16) & 0x83; + if (quadrant & 0x80) + quadrant ^= 0x83; + switch (quadrant) { - float_type sin_ix, cos_ix; - __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_ix), "=f" (cos_ix) - : "f" (__imag__ x)); - __real__ retval *= cos_ix; - __imag__ retval *= sin_ix; + default: + break; + case 1: + __real__ retval = -__real__ retval; + break; + case 2: + __real__ retval = -__real__ retval; + case 3: + __imag__ retval = -__imag__ retval; + break; } - else - goto fix_sign; + if (ix_cond & __M81_COND_ZERO && !m81(__isnan) (exp_val)) + __imag__ retval = __imag__ x; } - else - /* If the imaginary part is +-inf or NaN and the real part is - not +-inf the result is NaN + iNaN. */ - __real__ retval = __imag__ retval = 0.0/0.0; } - else if (m81(__isinf) (__real__ x)) + else { - if (m81(__finite) (__imag__ x)) - { - float_type value = m81(__signbit) (__real__ x) ? 0.0 : huge_val; + unsigned long rx_cond = __m81_test (__real__ x); - if (__imag__ x == 0.0) + if (rx_cond & __M81_COND_INF) + { + /* Real part is infinite. */ + if (rx_cond & __M81_COND_NEG) { - __real__ retval = value; - __imag__ retval = __imag__ x; + __real__ retval = __imag__ retval = 0.0; + if (ix_cond & __M81_COND_NEG) + __imag__ retval = -__imag__ retval; } else { - float_type remainder, pi_2; - int quadrant; - __real__ retval = value; - __imag__ retval = value; - - fix_sign: - __asm ("fmovecr %#0,%0\n\tfscale%.w %#-1,%0" : "=f" (pi_2)); - __asm ("fmod%.x %2,%0\n\tfmove%.l %/fpsr,%1" - : "=f" (remainder), "=dm" (quadrant) - : "f" (pi_2), "0" (__imag__ x)); - quadrant = (quadrant >> 16) & 0x83; - if (quadrant & 0x80) - quadrant ^= 0x83; - switch (quadrant) - { - default: - break; - case 1: - __real__ retval = -__real__ retval; - break; - case 2: - __real__ retval = -__real__ retval; - case 3: - __imag__ retval = -__imag__ retval; - break; - } + __real__ retval = __real__ x; + __imag__ retval = __imag__ x - __imag__ x; } } - else if (m81(__signbit) (__real__ x) == 0) - { - __real__ retval = huge_val; - __imag__ retval = 0.0/0.0; - } else - { - __real__ retval = 0.0; - __imag__ retval = s(__copysign) (0.0, __imag__ x); - } + __real__ retval = __imag__ retval = __imag__ x - __imag__ x; } - else - /* If the real part is NaN the result is NaN + iNaN. */ - __real__ retval = __imag__ retval = 0.0/0.0; return retval; } diff --git a/sysdeps/m68k/fpu/s_csinh.c b/sysdeps/m68k/fpu/s_csinh.c index c409ed0d8f..643a221b57 100644 --- a/sysdeps/m68k/fpu/s_csinh.c +++ b/sysdeps/m68k/fpu/s_csinh.c @@ -25,9 +25,6 @@ #ifndef SUFF #define SUFF #endif -#ifndef huge_val -#define huge_val HUGE_VAL -#endif #ifndef float_type #define float_type double #endif @@ -40,87 +37,33 @@ __complex__ float_type s(__csinh) (__complex__ float_type x) { __complex__ float_type retval; - int negate = m81(__signbit) (__real__ x); + unsigned long ix_cond; - __real__ x = s(fabs) (__real__ x); + ix_cond = __m81_test (__imag__ x); - if (m81(__finite) (__real__ x)) + if ((ix_cond & (__M81_COND_INF|__M81_COND_NAN)) == 0) { - if (m81(__finite) (__imag__ x)) - { - float_type sinh_val; - float_type sin_ix, cos_ix; - - __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_ix), "=f" (cos_ix) - : "f" (__imag__ x)); - sinh_val = m81(__ieee754_sinh) (__real__ x); - __real__ retval = cos_ix * sinh_val; - __imag__ retval = sin_ix * sinh_val; + /* Imaginary part is finite. */ + float_type sin_ix, cos_ix; - if (negate) - __real__ retval = -__real__ retval; - } - else if (__real__ x == 0) - { - __real__ retval = 0.0; - __imag__ retval = 0.0/0.0; - - if (negate) - __real__ retval = -__real__ retval; - } + __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_ix), "=f" (cos_ix) + : "f" (__imag__ x)); + __real__ retval = cos_ix * m81(__ieee754_sinh) (__real__ x); + if (ix_cond & __M81_COND_ZERO) + __imag__ retval = __imag__ x; else - __real__ retval = __imag__ retval = 0.0/0.0; + __imag__ retval = sin_ix * m81(__ieee754_cosh) (__real__ x); } - else if (m81(__isinf) (__real__ x)) + else { - if (__imag__ x == 0.0) - { - __real__ retval = negate ? -huge_val : huge_val; - __imag__ retval = __imag__ x; - } - else if (m81(__finite) (__imag__ x)) - { - float_type remainder, pi_2; - int quadrant; - __real__ retval = __imag__ retval = huge_val; + unsigned long rx_cond = __m81_test (__real__ x); - __asm ("fmovecr %#0,%0\n\tfscale%.w %#-1,%0" : "=f" (pi_2)); - __asm ("fmod%.x %2,%0\n\tfmove%.l %/fpsr,%1" - : "=f" (remainder), "=dm" (quadrant) - : "f" (pi_2), "0" (__imag__ x)); - quadrant = (quadrant >> 16) & 0x83; - if (quadrant & 0x80) - quadrant ^= 0x83; - if (negate) - quadrant ^= 1; - switch (quadrant) - { - default: - break; - case 1: - __real__ retval = -__real__ retval; - break; - case 2: - __real__ retval = -__real__ retval; - case 3: - __imag__ retval = -__imag__ retval; - break; - } - } + __imag__ retval = __imag__ x - __imag__ x; + if (rx_cond & (__M81_COND_ZERO|__M81_COND_INF|__M81_COND_NAN)) + __real__ retval = __real__ x; else - { - /* The subtraction raises the invalid exception. */ - __real__ retval = huge_val; - __imag__ retval = huge_val - huge_val; - } + __real__ retval = __imag__ retval; } - else if (__imag__ x == 0.0) - { - __real__ retval = 0.0/0.0; - __imag__ retval = __imag__ x; - } - else - __real__ retval = __imag__ retval = 0.0/0.0; return retval; } From c0fda13c3800dfca97266c49307419f923056b7e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 7 May 1997 15:30:58 +0000 Subject: [PATCH 0872/4487] Don't presume that the kernel will preserve non-call-saved registers; save and restore a0 across the system call. --- sysdeps/unix/sysv/linux/alpha/brk.S | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/brk.S b/sysdeps/unix/sysv/linux/alpha/brk.S index f44686b9a4..74fef64f64 100644 --- a/sysdeps/unix/sysv/linux/alpha/brk.S +++ b/sysdeps/unix/sysv/linux/alpha/brk.S @@ -37,8 +37,9 @@ __curbrk: .skip 8 #endif .text -LEAF(__brk, 0) +LEAF(__brk, 8) ldgp gp, 0(t12) + subq sp, 8, sp #ifdef PROF .set noat lda AT, _mcount @@ -47,9 +48,14 @@ LEAF(__brk, 0) #endif .prologue 1 + /* Save the requested brk across the system call. */ + stq a0, 0(sp) + ldiq v0, __NR_brk call_pal PAL_callsys + ldq a0, 0(sp) + /* Be prepared for an OSF-style brk. */ bne a3, $err1 beq v0, $ok @@ -62,11 +68,13 @@ LEAF(__brk, 0) /* Update __curbrk and return cleanly. */ mov zero, v0 $ok: stq a0, __curbrk + addq sp, 8, sp ret /* What a horrible way to die. */ $err0: ldi v0, ENOMEM -$err1: jmp zero, __syscall_error +$err1: addq sp, 8, sp + jmp zero, __syscall_error END(__brk) From 0f85544d18abb403d9f1d006090877070ff8773d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 7 May 1997 15:31:06 +0000 Subject: [PATCH 0873/4487] Likewise tuck the thread data onto the new thread's stack. --- sysdeps/unix/sysv/linux/alpha/clone.S | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S index 5d36e2588d..aab4e590a5 100644 --- a/sysdeps/unix/sysv/linux/alpha/clone.S +++ b/sysdeps/unix/sysv/linux/alpha/clone.S @@ -42,9 +42,12 @@ ENTRY(__clone) beq a0,$error /* no NULL function pointers */ beq a1,$error /* no NULL stack pointers */ + /* Save the fn ptr and arg on the new stack. */ + subq a1,16,a1 + stq a0,0(a1) + stq a3,8(a1) + /* Do the system call */ - mov a0,pv /* get fn ptr out of the way */ - mov a3,t0 /* get fn arg out of the way */ mov a2,a0 ldiq v0,__NR_clone call_pal PAL_callsys @@ -73,8 +76,12 @@ thread_start: mov zero,fp .prologue 0 + /* Load up the arguments. */ + ldq pv,0(sp) + ldq a0,8(sp) + addq sp,16,sp + /* Call the user's function */ - mov t0,a0 jsr ra,(pv) ldgp gp,0(ra) From e3f522176258857fc328909757f6f4da9f3d57d4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 10 May 1997 23:36:46 +0000 Subject: [PATCH 0874/4487] TTY definitions. --- sysdeps/unix/bsd/sun/sunos4/sys/ttydefaults.h | 104 ++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 sysdeps/unix/bsd/sun/sunos4/sys/ttydefaults.h diff --git a/sysdeps/unix/bsd/sun/sunos4/sys/ttydefaults.h b/sysdeps/unix/bsd/sun/sunos4/sys/ttydefaults.h new file mode 100644 index 0000000000..d4ee4ac451 --- /dev/null +++ b/sysdeps/unix/bsd/sun/sunos4/sys/ttydefaults.h @@ -0,0 +1,104 @@ +/*- + * Copyright (c) 1982, 1986, 1993 + * The Regents of the University of California. All rights reserved. + * (c) UNIX System Laboratories, Inc. + * All or some portions of this file are derived from material licensed + * to the University of California by American Telephone and Telegraph + * Co. or Unix System Laboratories, Inc. and are reproduced herein with + * the permission of UNIX System Laboratories, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)ttydefaults.h 8.4 (Berkeley) 1/21/94 + */ + +/* + * System wide defaults for terminal state. SunOS 4 version. + */ +#ifndef _SYS_TTYDEFAULTS_H_ +#define _SYS_TTYDEFAULTS_H_ + +/* + * Defaults on "first" open. + */ +#define TTYDEF_IFLAG (BRKINT | ISTRIP | ICRNL | IMAXBEL | IXON | IXANY) +#define TTYDEF_OFLAG (OPOST | ONLCR | XTABS) +#define TTYDEF_LFLAG (ECHO | ICANON | ISIG | IEXTEN | ECHOE|ECHOKE|ECHOCTL) +#define TTYDEF_CFLAG (CREAD | CS7 | PARENB | HUPCL) +#define TTYDEF_SPEED (B9600) + +/* + * Control Character Defaults + */ +#define CTRL(x) (x&037) +#define CEOF CTRL('d') +#ifdef _POSIX_VDISABLE +# define CEOL _POSIX_VDISABLE +#else +# define CEOL ((unsigned char)'\377') /* XXX avoid _POSIX_VDISABLE */ +#endif +#define CERASE 0177 +#define CINTR CTRL('c') +#ifdef _POSIX_VDISABLE +# define CSTATUS _POSIX_VDISABLE +#else +# define CSTATUS ((unsigned char)'\377') /* XXX avoid _POSIX_VDISABLE */ +#endif +#define CKILL CTRL('u') +#define CMIN 1 +#define CQUIT 034 /* FS, ^\ */ +#define CSUSP CTRL('z') +#define CTIME 0 +#define CDSUSP CTRL('y') +#define CSTART CTRL('q') +#define CSTOP CTRL('s') +#define CLNEXT CTRL('v') +#define CDISCARD CTRL('o') +#define CWERASE CTRL('w') +#define CREPRINT CTRL('r') +#define CEOT CEOF +/* compat */ +#define CBRK CEOL +#define CRPRNT CREPRINT +#define CFLUSH CDISCARD + +/* PROTECTED INCLUSION ENDS HERE */ +#endif /* !_SYS_TTYDEFAULTS_H_ */ + +/* + * #define TTYDEFCHARS to include an array of default control characters. + */ +#ifdef TTYDEFCHARS +cc_t ttydefchars[NCCS] = { + CEOF, CEOL, CEOL, CERASE, CWERASE, CKILL, CREPRINT, + _POSIX_VDISABLE, CINTR, CQUIT, CSUSP, CDSUSP, CSTART, CSTOP, CLNEXT, + CDISCARD, CMIN, CTIME, CSTATUS, _POSIX_VDISABLE +}; +#undef TTYDEFCHARS +#endif From 6c6c6ee3d3afade5ef2bfb124e9e7a3e4734540a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 21 May 1997 01:22:18 +0000 Subject: [PATCH 0875/4487] Don't include bstring.h, it doesn't exist. --- sysdeps/rs6000/ffs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/rs6000/ffs.c b/sysdeps/rs6000/ffs.c index 44e7a434d2..598c15c01a 100644 --- a/sysdeps/rs6000/ffs.c +++ b/sysdeps/rs6000/ffs.c @@ -19,7 +19,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#include +#include #undef ffs From f754f561dedce02e4b6a87005cb532af9a27164b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 21 May 1997 01:34:06 +0000 Subject: [PATCH 0876/4487] Don't define DIR, but __dirstream. --- sysdeps/standalone/dirstream.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/standalone/dirstream.h b/sysdeps/standalone/dirstream.h index 20c4922fb9..064513222e 100644 --- a/sysdeps/standalone/dirstream.h +++ b/sysdeps/standalone/dirstream.h @@ -28,7 +28,7 @@ Cambridge, MA 02139, USA. */ The miscellaneous Unix `readdir' implementations read directory data into a buffer and fill in a `struct dirent' copy in the `DIR' object. */ -typedef struct +struct __dirstream { int __fd; /* File descriptor. */ @@ -38,6 +38,6 @@ typedef struct size_t __size; /* Total valid data in the block. */ struct dirent __entry; /* Returned by `readdir'. */ - } DIR; + }; #endif /* dirstream.h */ From 84d2ebad2dba531fc49031901b2e0318de9c8965 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 21 May 1997 01:35:00 +0000 Subject: [PATCH 0877/4487] Basic error numbers for standalone ARM platform. --- sysdeps/standalone/arm/errnos.h | 49 +++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 sysdeps/standalone/arm/errnos.h diff --git a/sysdeps/standalone/arm/errnos.h b/sysdeps/standalone/arm/errnos.h new file mode 100644 index 0000000000..0b635e649d --- /dev/null +++ b/sysdeps/standalone/arm/errnos.h @@ -0,0 +1,49 @@ +/* Copyright (C) 1991, 1994, 1996, 1997 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* This file defines the `errno' constants for standalone ARM machines. + These constants are essentially arbitrary. */ + +#if !defined(__Emath_defined) && (defined(_ERRNO_H) || defined(__need_Emath)) +#undef __need_Emath +#define __Emath_defined 1 + +#define EDOM 1 +#define ERANGE 2 +#endif + +#ifdef _ERRNO_H +#define ENOSYS 3 +#define EINVAL 4 +#define ESPIPE 5 +#define EBADF 6 +#define ENOMEM 7 +#define EACCES 8 +#define ENFILE 9 +#define EMFILE 10 +#define ENAMETOOLONG 11 /* File name too long */ +#define ELOOP 12 /* Too many symbolic links encountered */ +#define ENOMSG 13 /* No message of desired type */ +#define E2BIG 14 /* Arg list too long */ +#define EINTR 15 +#define EILSEQ 16 +#define ENOEXEC 17 +#define ENOENT 18 +#endif + +#define __set_errno(val) errno = (val) From ecda085689903d3d7e452c86d8b88b374e33450b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 21 May 1997 01:39:40 +0000 Subject: [PATCH 0878/4487] Implementation of fork syscall for ARM. --- sysdeps/unix/arm/fork.S | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 sysdeps/unix/arm/fork.S diff --git a/sysdeps/unix/arm/fork.S b/sysdeps/unix/arm/fork.S new file mode 100644 index 0000000000..baa33e31b7 --- /dev/null +++ b/sysdeps/unix/arm/fork.S @@ -0,0 +1,33 @@ +/* Copyright (C) 1991, 1992, 1994, 1995, 1997 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +/* ARM version. */ + +SYSCALL__ (fork, 0) + /* R1 is now 0 for the parent and 1 for the child. Decrement it to + make it -1 (all bits set) for the parent, and 0 (no bits set) + for the child. Then AND it with R0, so the parent gets + R0&-1==R0, and the child gets R0&0==0. */ + sub r1, r1, $1 + and r0, r0, r1 + RETINSTR(mov, pc, r14) +PSEUDO_END(fork) + +weak_alias (__fork, fork) From bd85bd75004ca186a147a3cef8433108fdf444b1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 21 May 1997 01:40:24 +0000 Subject: [PATCH 0879/4487] Add definition for ret and MOVE. --- sysdeps/unix/arm/sysdep.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sysdeps/unix/arm/sysdep.h b/sysdeps/unix/arm/sysdep.h index 18e812b9f1..1c580731ba 100644 --- a/sysdeps/unix/arm/sysdep.h +++ b/sysdeps/unix/arm/sysdep.h @@ -19,3 +19,8 @@ Cambridge, MA 02139, USA. */ #include #include +/* Some definitions to allow the assembler in sysdeps/unix/*.S to build + without needing ARM-specific versions of all the files. */ + +#define ret RETINSTR(mov, pc, r14) +#define MOVE(a,b) mov b,a From 8d2485ed0b3f7696a5f8739ba7c405bdb926a353 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 21 May 1997 01:44:03 +0000 Subject: [PATCH 0880/4487] Linux/ARM specific implementation --- sysdeps/unix/sysv/linux/arm/clone.S | 33 ++++++++++++ sysdeps/unix/sysv/linux/arm/socket.S | 49 ++++++++++++++++++ sysdeps/unix/sysv/linux/arm/syscall.S | 47 +++++++++++++++++ sysdeps/unix/sysv/linux/arm/sysdep.h | 73 +++++++++++++++++++++++++++ 4 files changed, 202 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/clone.S create mode 100644 sysdeps/unix/sysv/linux/arm/socket.S create mode 100644 sysdeps/unix/sysv/linux/arm/syscall.S create mode 100644 sysdeps/unix/sysv/linux/arm/sysdep.h diff --git a/sysdeps/unix/sysv/linux/arm/clone.S b/sysdeps/unix/sysv/linux/arm/clone.S new file mode 100644 index 0000000000..c7e7aed9c8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/clone.S @@ -0,0 +1,33 @@ +/* Copyright (C) 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* clone() is even more special than fork() as it mucks with stacks + and invokes a function in the right context after its all over. */ + +#include +#define _ERRNO_H 1 +#include + +/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg); */ + + .text +ENTRY(__clone) + /* Somebody needs to write this. */ +PSEUDO_END (__clone) + +weak_alias (__clone, clone) diff --git a/sysdeps/unix/sysv/linux/arm/socket.S b/sysdeps/unix/sysv/linux/arm/socket.S new file mode 100644 index 0000000000..e8db072971 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/socket.S @@ -0,0 +1,49 @@ +/* Copyright (C) 1995, 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +#define P(a, b) P2(a, b) +#define P2(a, b) a##b + + .text +/* The socket-oriented system calls are handled unusally in Linux. + They are all gated through the single `socketcall' system call number. + `socketcall' takes two arguments: the first is the subcode, specifying + which socket function is being called; and the second is a pointer to + the arguments to the specific function. + + The .S files for the other calls just #define socket and #include this. */ + +.globl P(__,socket) +ENTRY (P(__,socket)) + + /* Do the system call trap. */ + swi SYS_ify(socketcall) + + /* %eax is < 0 if there was an error. */ + cmn r0, $124 + bge syscall_error + + /* Successful; return the syscall's value. */ + RETINSTR(mov,pc,r14) + +PSEUDO_END (P(__,socket)) + +weak_alias (P(__,socket), socket) diff --git a/sysdeps/unix/sysv/linux/arm/syscall.S b/sysdeps/unix/sysv/linux/arm/syscall.S new file mode 100644 index 0000000000..7a87278303 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/syscall.S @@ -0,0 +1,47 @@ +/* Copyright (C) 1995, 1996 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +/* Please consult the file sysdeps/unix/sysv/linux/arm/sysdep.h for + more information about the value -4095 used below.*/ + + .text +ENTRY (syscall) + + /* Normally encoding the system call number in the instruction is + good. But we pay the price here. */ + + sub sp, sp, $0xc @ get 3 words on the stack + orr r0, r0, $0xef000000 @ make up a SWI instruction + orr r0, r0, $SWI_BASE + str r0, [sp] + ldr r0, _reti + str r0, [sp, $4] + adr r0, _ret + str r0, [sp, $8] + mov r0, r1 + mov r1, r2 + mov r2, r3 + mov pc, sp +_ret: add sp, sp, $0xc + RETINSTR(mov, pc, r14) + +_reti: .word 0xe51ff004 @ ldr pc, [pc, $4] + +PSEUDO_END (syscall) diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h new file mode 100644 index 0000000000..6478a5d182 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -0,0 +1,73 @@ +/* Copyright (C) 1992, 93, 95, 96, 97 Free Software Foundation, Inc. +This file is part of the GNU C Library. +Contributed by Ulrich Drepper, , August 1995. +ARM changes by Philip Blundell, , May 1997. + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifndef _LINUX_ARM_SYSDEP_H +#define _LINUX_ARM_SYSDEP_H 1 + +/* There is some commonality. */ +#include + +/* For Linux we can use the system call table in the header file + /usr/include/asm/unistd.h + of the kernel. But these symbols do not follow the SYS_* syntax + so we have to redefine the `SYS_ify' macro here. */ +#undef SYS_ify +#define SWI_BASE (9 << 20) +#define SYS_ify(syscall_name) (SWI_BASE + __NR_##syscall_name) + + +#ifdef ASSEMBLER + +/* Linux uses a negative return value to indicate syscall errors, + unlike most Unices, which use the condition codes' carry flag. + + Since version 2.1 the return value of a system call might be + negative even if the call succeeded. E.g., the `lseek' system call + might return a large offset. Therefore we must not anymore test + for < 0, but test for a real error by making sure the value in %eax + is a real error number. Linus said he will make sure the no syscall + returns a value in -1 .. -4095 as a valid result so we can savely + test with -4095. */ +#undef PSEUDO +#define PSEUDO(name, syscall_name, args) \ + .text; \ + ENTRY (name) \ + DO_CALL (args, syscall_name); \ + cmn r0, $4096; \ + bge syscall_error; + +#undef PSEUDO_END +#define PSEUDO_END(name) \ + SYSCALL_ERROR_HANDLER \ + END (name) + +#ifndef PIC +#define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */ +#else +#error Aiee +#endif /* PIC */ + +#undef DO_CALL +#define DO_CALL(args, syscall_name) \ + swi SYS_ify (syscall_name); + +#endif /* ASSEMBLER */ + +#endif /* linux/arm/sysdep.h */ From da0e06ed823c35e865b77687ec336b29adff0d4c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 21 May 1997 01:44:24 +0000 Subject: [PATCH 0881/4487] Add cacheflush. --- sysdeps/unix/sysv/linux/m68k/syscalls.list | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/unix/sysv/linux/m68k/syscalls.list b/sysdeps/unix/sysv/linux/m68k/syscalls.list index 9a3e4d0e58..473c2ec5b2 100644 --- a/sysdeps/unix/sysv/linux/m68k/syscalls.list +++ b/sysdeps/unix/sysv/linux/m68k/syscalls.list @@ -1,5 +1,7 @@ # File name Caller Syscall name # args Strong name Weak names +cacheflush EXTRA cacheflush 4 __cacheflush cacheflush + s_getgroups getgroups getgroups 2 __syscall_getgroups s_llseek llseek _llseek 5 __sys_llseek s_setgroups setgroups setgroups 2 __syscall_setgroups From ae233369c7ba5ac5c84b7f3bb6cbe7ee0c9521af Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 22 May 1997 02:15:00 +0000 Subject: [PATCH 0882/4487] Add EPROTOTYPE, ESRCH. --- sysdeps/standalone/arm/errnos.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/standalone/arm/errnos.h b/sysdeps/standalone/arm/errnos.h index 0b635e649d..428fe9eb77 100644 --- a/sysdeps/standalone/arm/errnos.h +++ b/sysdeps/standalone/arm/errnos.h @@ -44,6 +44,8 @@ Cambridge, MA 02139, USA. */ #define EILSEQ 16 #define ENOEXEC 17 #define ENOENT 18 +#define EPROTOTYPE 19 +#define ESRCH 20 #endif #define __set_errno(val) errno = (val) From 7e42418a2d4477c4ab4ad246e82c63373be7d1f9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 22 May 1997 02:16:31 +0000 Subject: [PATCH 0883/4487] Avoid warning about nested comments. --- sysdeps/unix/arm/sysdep.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/arm/sysdep.h b/sysdeps/unix/arm/sysdep.h index 1c580731ba..b1860dd443 100644 --- a/sysdeps/unix/arm/sysdep.h +++ b/sysdeps/unix/arm/sysdep.h @@ -19,7 +19,7 @@ Cambridge, MA 02139, USA. */ #include #include -/* Some definitions to allow the assembler in sysdeps/unix/*.S to build +/* Some definitions to allow the assembler in sysdeps/unix/ to build without needing ARM-specific versions of all the files. */ #define ret RETINSTR(mov, pc, r14) From 1df6311982752b1d8090682168e083063a0a99c4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 22 May 1997 02:17:10 +0000 Subject: [PATCH 0884/4487] profiling interface for Linux/ARM. --- sysdeps/unix/sysv/linux/arm/profil-counter.h | 26 ++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/profil-counter.h diff --git a/sysdeps/unix/sysv/linux/arm/profil-counter.h b/sysdeps/unix/sysv/linux/arm/profil-counter.h new file mode 100644 index 0000000000..a915da7788 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/profil-counter.h @@ -0,0 +1,26 @@ +/* Low-level statistical profiling support function. Linux/ARM version. + Copyright (C) 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +void +profil_counter (int signo, struct sigcontext sc) +{ + profil_count ((void *) sc.eip); +} From c751295fb8e48917c88cdfa4dbd4597866f6fd81 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 22 May 1997 02:18:07 +0000 Subject: [PATCH 0885/4487] pretty printing. --- sysdeps/unix/sysv/linux/arm/syscall.S | 8 +++---- sysdeps/unix/sysv/linux/arm/sysdep.h | 34 +++++++++++++-------------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/syscall.S b/sysdeps/unix/sysv/linux/arm/syscall.S index 7a87278303..bc2bc7dbaa 100644 --- a/sysdeps/unix/sysv/linux/arm/syscall.S +++ b/sysdeps/unix/sysv/linux/arm/syscall.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997 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 @@ -26,10 +26,10 @@ ENTRY (syscall) /* Normally encoding the system call number in the instruction is good. But we pay the price here. */ - + sub sp, sp, $0xc @ get 3 words on the stack orr r0, r0, $0xef000000 @ make up a SWI instruction - orr r0, r0, $SWI_BASE + orr r0, r0, $SWI_BASE str r0, [sp] ldr r0, _reti str r0, [sp, $4] @@ -43,5 +43,5 @@ _ret: add sp, sp, $0xc RETINSTR(mov, pc, r14) _reti: .word 0xe51ff004 @ ldr pc, [pc, $4] - + PSEUDO_END (syscall) diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index 6478a5d182..0aa085d351 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -1,22 +1,22 @@ /* Copyright (C) 1992, 93, 95, 96, 97 Free Software Foundation, Inc. -This file is part of the GNU C Library. -Contributed by Ulrich Drepper, , August 1995. -ARM changes by Philip Blundell, , May 1997. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper, , August 1995. + ARM changes by Philip Blundell, , May 1997. -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _LINUX_ARM_SYSDEP_H #define _LINUX_ARM_SYSDEP_H 1 @@ -61,12 +61,12 @@ Cambridge, MA 02139, USA. */ #ifndef PIC #define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */ #else -#error Aiee +#error Aiee #endif /* PIC */ #undef DO_CALL #define DO_CALL(args, syscall_name) \ - swi SYS_ify (syscall_name); + swi SYS_ify (syscall_name); #endif /* ASSEMBLER */ From 76a2c2cb6a805e4040768af74abbcbb0b15d791e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 24 May 1997 02:10:36 +0000 Subject: [PATCH 0886/4487] (elf_machine_runtime_setup): If we are not looking at the new thread-safe .plt, don't be lazy about relocs. (_dl_runtime_resolve): Fix up arithmetic for new .plt layout. (elf_alpha_fix_plt): Insert wmb as appropriate to ensure safety. --- sysdeps/alpha/dl-machine.h | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 7a51df5f00..49d6830a65 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -86,7 +86,7 @@ elf_machine_load_address (void) /* Set up the loaded object described by L so its unrelocated PLT entries will jump to the on-demand fixup code in dl-runtime.c. */ -static inline void +static inline int elf_machine_runtime_setup (struct link_map *l, int lazy) { Elf64_Addr plt; @@ -104,7 +104,13 @@ elf_machine_runtime_setup (struct link_map *l, int lazy) /* Identify this shared object */ *(Elf64_Addr *)(plt + 24) = (Elf64_Addr) l; + + /* If the first instruction of the plt entry is not + "br $28, plt0", we cannot do lazy relocation. */ + lazy = (*(unsigned *)(plt + 32) == 0xc39ffff7); } + + return lazy; } /* This code is used in dl-runtime.c to call the `fixup' function @@ -145,9 +151,11 @@ elf_machine_runtime_setup (struct link_map *l, int lazy) .prologue 1 /* Set up the arguments for _dl_runtime_resolve. */ /* $16 = link_map out of plt0 */ + /* $17 = offset of reloc entry = ($28 - $27 - 20) /12 * 24 */ + subq $28, $27, $17 ldq $16, 8($27) - /* $17 = offset of reloc entry */ - mov $28, $17 + subq $17, 20, $17 + addq $17, $17, $17 /* Do the fixup */ bsr $26, fixup..ng /* Move the destination address into position. */ @@ -290,14 +298,18 @@ elf_alpha_fix_plt(struct link_map *l, lo = (short)hi; hi = (hi - lo) >> 16; - /* Emit "ldah $27,H($27)" */ - plte[0] = 0x277b0000 | (hi & 0xffff); - /* Emit "lda $27,L($27)" */ plte[1] = 0x237b0000 | (lo & 0xffff); /* Emit "br $31,function" */ plte[2] = 0xc3e00000 | (edisp & 0x1fffff); + + /* Think about thread-safety -- the previous instructions must be + committed to memory before the first is overwritten. */ + __asm__ __volatile__("wmb" : : : "memory"); + + /* Emit "ldah $27,H($27)" */ + plte[0] = 0x277b0000 | (hi & 0xffff); } else { @@ -310,14 +322,18 @@ elf_alpha_fix_plt(struct link_map *l, lo = (short)hi; hi = (hi - lo) >> 16; - /* Emit "ldah $27,H($27)" */ - plte[0] = 0x277b0000 | (hi & 0xffff); - /* Emit "ldq $27,L($27)" */ plte[1] = 0xa77b0000 | (lo & 0xffff); /* Emit "jmp $31,($27)" */ plte[2] = 0x6bfb0000; + + /* Think about thread-safety -- the previous instructions must be + committed to memory before the first is overwritten. */ + __asm__ __volatile__("wmb" : : : "memory"); + + /* Emit "ldah $27,H($27)" */ + plte[0] = 0x277b0000 | (hi & 0xffff); } /* At this point, if we've been doing runtime resolution, Icache is dirty. From e295f619934794a482ac2d00b0e23c8b0cfebc92 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 24 May 1997 02:15:43 +0000 Subject: [PATCH 0887/4487] (elf_machine_runtime_setup): Return lazy. --- sysdeps/m68k/dl-machine.h | 10 ++++++---- sysdeps/mips/dl-machine.h | 4 +++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index e6b8f9e362..dee2a4653b 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -75,7 +75,7 @@ elf_machine_load_address (void) /* Set up the loaded object described by L so its unrelocated PLT entries will jump to the on-demand fixup code in dl-runtime.c. */ -static inline void +static inline int elf_machine_runtime_setup (struct link_map *l, int lazy) { Elf32_Addr *got; @@ -96,8 +96,11 @@ elf_machine_runtime_setup (struct link_map *l, int lazy) got[2] = (Elf32_Addr) &_dl_runtime_resolve; } - /* This code is used in dl-runtime.c to call the `fixup' function - and then redirect to the address it returns. */ + return lazy; +} + +/* This code is used in dl-runtime.c to call the `fixup' function + and then redirect to the address it returns. */ #define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\ | Trampoline for _dl_runtime_resolver .globl _dl_runtime_resolve @@ -120,7 +123,6 @@ elf_machine_runtime_setup (struct link_map *l, int lazy) #define ELF_MACHINE_RUNTIME_FIXUP_ARGS long int save_a0, long int save_a1 /* The PLT uses Elf32_Rela relocs. */ #define elf_machine_relplt elf_machine_rela -} /* Mask identifying addresses reserved for the user program, diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 39a1cc8be6..422179c47d 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -183,7 +183,7 @@ elf_machine_got_rel (struct link_map *map) /* Set up the loaded object described by L so its stub function will jump to the on-demand fixup code in dl-runtime.c. */ -static inline void +static inline int elf_machine_runtime_setup (struct link_map *l, int lazy) { ElfW(Addr) *got; @@ -213,6 +213,8 @@ elf_machine_runtime_setup (struct link_map *l, int lazy) /* Relocate global offset table. */ elf_machine_got_rel (l); + + return lazy; } /* Get link_map for this object. */ From a10ff2ea76e2d1eea888c2c0402c710f41f6005a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 24 May 1997 20:22:52 +0000 Subject: [PATCH 0888/4487] Add EPERM. --- sysdeps/standalone/arm/errnos.h | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/sysdeps/standalone/arm/errnos.h b/sysdeps/standalone/arm/errnos.h index 428fe9eb77..8090a8074d 100644 --- a/sysdeps/standalone/arm/errnos.h +++ b/sysdeps/standalone/arm/errnos.h @@ -1,20 +1,20 @@ /* Copyright (C) 1991, 1994, 1996, 1997 Free Software Foundation, Inc. -This file is part of the GNU C Library. + 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* This file defines the `errno' constants for standalone ARM machines. These constants are essentially arbitrary. */ @@ -46,6 +46,7 @@ Cambridge, MA 02139, USA. */ #define ENOENT 18 #define EPROTOTYPE 19 #define ESRCH 20 +#define EPERM 21 #endif #define __set_errno(val) errno = (val) From b5fba1adf74a976d2d0151fca9f3250b7dc7f286 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 25 May 1997 01:07:16 +0000 Subject: [PATCH 0889/4487] (elf_machine_rel): Print warning about changed size in copy relocation only if symbol in shared object is larger or _dl_verbose is nonzero. --- sysdeps/m68k/dl-machine.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index dee2a4653b..1523ddb1c6 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -227,7 +227,8 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, switch (ELF32_R_TYPE (reloc->r_info)) { case R_68K_COPY: - if (sym->st_size != refsym->st_size) + if (sym->st_size > refsym->st_size + || (_dl_verbose && sym->st_size < refsym->st_size)) { const char *strtab; From 1bf0f668e67d376ffe04db565a1de3d4ff3057f3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 26 May 1997 22:28:25 +0000 Subject: [PATCH 0890/4487] De-ansidecl-fy. --- sysdeps/am29k/ffs.c | 31 ++++----- sysdeps/i960/ffs.c | 35 +++++----- sysdeps/m68k/ffs.c | 33 +++++----- sysdeps/m88k/ffs.c | 31 ++++----- sysdeps/mips/__longjmp.c | 36 +++++----- sysdeps/rs6000/ffs.c | 31 ++++----- sysdeps/standalone/brk.c | 57 ++++++++-------- sysdeps/standalone/i386/force_cpu386/_exit.c | 35 +++++----- .../standalone/i386/force_cpu386/brdinit.c | 52 +++++++-------- .../standalone/i386/force_cpu386/console.c | 66 +++++++++---------- sysdeps/standalone/i960/nindy960/_exit.c | 35 +++++----- sysdeps/standalone/i960/nindy960/brdinit.c | 48 +++++++------- sysdeps/standalone/i960/nindy960/console.c | 46 ++++++------- .../standalone/m68k/m68020/mvme136/_exit.c | 40 +++++------ .../standalone/m68k/m68020/mvme136/brdinit.c | 46 +++++++------ sysdeps/unix/bsd/sun/sunos4/tcflow.c | 33 +++++----- sysdeps/unix/bsd/sun/sunos4/tcflush.c | 33 +++++----- sysdeps/unix/bsd/sun/sunos4/tcgetattr.c | 34 +++++----- sysdeps/unix/bsd/sun/sunos4/tcsendbrk.c | 33 +++++----- sysdeps/unix/bsd/sun/sunos4/wait4.c | 38 +++++------ sysdeps/unix/bsd/ultrix4/mips/sigvec.c | 51 +++++++------- sysdeps/unix/sysv/irix4/fpathconf.c | 33 +++++----- sysdeps/unix/sysv/irix4/getgroups.c | 35 +++++----- sysdeps/unix/sysv/irix4/getrusage.c | 34 +++++----- sysdeps/unix/sysv/irix4/pathconf.c | 33 +++++----- sysdeps/unix/sysv/irix4/setgroups.c | 35 +++++----- sysdeps/unix/sysv/irix4/sigtramp.c | 48 +++++++------- sysdeps/unix/sysv/irix4/start.c | 37 +++++------ sysdeps/unix/sysv/irix4/sysconf.c | 32 ++++----- sysdeps/unix/sysv/sco3.2.4/__setpgid.c | 32 ++++----- sysdeps/unix/sysv/sco3.2.4/getgroups.c | 32 ++++----- sysdeps/unix/sysv/sysv4/__getpgid.c | 31 ++++----- sysdeps/unix/sysv/sysv4/__setpgid.c | 32 ++++----- sysdeps/unix/sysv/sysv4/ftruncate.c | 34 +++++----- sysdeps/unix/sysv/sysv4/gethostname.c | 32 ++++----- sysdeps/unix/sysv/sysv4/getpgid.c | 32 ++++----- sysdeps/unix/sysv/sysv4/sethostname.c | 32 ++++----- sysdeps/unix/sysv/sysv4/setpgid.c | 32 ++++----- sysdeps/unix/sysv/sysv4/setsid.c | 31 +++++---- sysdeps/vax/__longjmp.c | 31 ++++----- sysdeps/vax/memccpy.c | 41 ++++++------ 41 files changed, 769 insertions(+), 754 deletions(-) diff --git a/sysdeps/am29k/ffs.c b/sysdeps/am29k/ffs.c index 0f38f8795c..fe656e1697 100644 --- a/sysdeps/am29k/ffs.c +++ b/sysdeps/am29k/ffs.c @@ -1,24 +1,24 @@ /* ffs -- find first set bit in a word, counted from least significant end. For Amd 290x0. - Copyright (C) 1991, 1992 Free Software Foundation, Inc. + Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Torbjorn Granlund (tege@sics.se). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -#include #include #undef ffs @@ -26,7 +26,8 @@ Cambridge, MA 02139, USA. */ #ifdef __GNUC__ int -DEFUN(ffs, (x), int x) +ffs (x) + int x; { int cnt; diff --git a/sysdeps/i960/ffs.c b/sysdeps/i960/ffs.c index 62b8742da7..7846c4b1db 100644 --- a/sysdeps/i960/ffs.c +++ b/sysdeps/i960/ffs.c @@ -1,25 +1,25 @@ /* ffs -- find first set bit in a word, counted from least significant end. For i960 Core architecture - Copyright (C) 1994 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Copyright (C) 1994, 1997 Free Software Foundation, Inc. Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), - On-Line Applications Research Corporation. + On-Line Applications Research Corporation. -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -#include #include #undef ffs @@ -27,11 +27,12 @@ Cambridge, MA 02139, USA. */ #if defined (__GNUC__) && defined (__i960__) int -DEFUN(ffs, (x), int x) +ffs (x) + int x; { int cnt; - asm("scanbit %1,%0" : "=d" (cnt) : "rm" (x & -x)); + asm ("scanbit %1,%0" : "=d" (cnt) : "rm" (x & -x)); return cnt; } diff --git a/sysdeps/m68k/ffs.c b/sysdeps/m68k/ffs.c index 9de7cf3c41..26044b12ec 100644 --- a/sysdeps/m68k/ffs.c +++ b/sysdeps/m68k/ffs.c @@ -1,24 +1,24 @@ /* ffs -- find first set bit in a word, counted from least significant end. For mc68020, mc68030, mc68040. - Copyright (C) 1991, 1992 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc. Contributed by Torbjorn Granlund (tege@sics.se). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -#include #include #undef ffs @@ -26,11 +26,12 @@ Cambridge, MA 02139, USA. */ #if defined (__GNUC__) && defined (__mc68020__) int -DEFUN(ffs, (x), int x) +ffs (x) + int x; { int cnt; - asm("bfffo %1{#0:#0},%0" : "=d" (cnt) : "dm" (x & -x)); + asm ("bfffo %1{#0:#0},%0" : "=d" (cnt) : "dm" (x & -x)); return 32 - cnt; } diff --git a/sysdeps/m88k/ffs.c b/sysdeps/m88k/ffs.c index effca9a0d2..3658f0882d 100644 --- a/sysdeps/m88k/ffs.c +++ b/sysdeps/m88k/ffs.c @@ -1,24 +1,24 @@ /* ffs -- find first set bit in a word, counted from least significant end. For Motorola 88000. - Copyright (C) 1991, 1992 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc. Contributed by Torbjorn Granlund (tege@sics.se). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -#include #include #undef ffs @@ -26,7 +26,8 @@ Cambridge, MA 02139, USA. */ #ifdef __GNUC__ int -DEFUN(ffs, (x), int x) +ffs (x) + int x; { int cnt; diff --git a/sysdeps/mips/__longjmp.c b/sysdeps/mips/__longjmp.c index c54d8a9139..9b4c1e14e0 100644 --- a/sysdeps/mips/__longjmp.c +++ b/sysdeps/mips/__longjmp.c @@ -1,22 +1,22 @@ -/* Copyright (C) 1992, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -#include #include #include @@ -27,7 +27,9 @@ Cambridge, MA 02139, USA. */ #endif void -DEFUN(__longjmp, (env, val_arg), __jmp_buf env AND int val_arg) +__longjmp (env, val_arg) + __jmp_buf env; + int val_arg; { /* gcc 1.39.19 miscompiled the longjmp routine (as it did setjmp before the hack around it); force it to use $a1 for the longjmp value. @@ -42,7 +44,7 @@ DEFUN(__longjmp, (env, val_arg), __jmp_buf env AND int val_arg) asm volatile ("l.d $f26, %0" : : "m" (env[0].__fpregs[3])); asm volatile ("l.d $f28, %0" : : "m" (env[0].__fpregs[4])); asm volatile ("l.d $f30, %0" : : "m" (env[0].__fpregs[5])); - + /* Restore the stack pointer. */ asm volatile ("lw $29, %0" : : "m" (env[0].__sp)); @@ -68,7 +70,7 @@ DEFUN(__longjmp, (env, val_arg), __jmp_buf env AND int val_arg) /* Get the PC. */ asm volatile ("lw $31, %0" : : "m" (env[0].__pc)); - + /* Give setjmp 1 if given a 0, or what they gave us if non-zero. */ if (val == 0) asm volatile ("li $2, 1"); diff --git a/sysdeps/rs6000/ffs.c b/sysdeps/rs6000/ffs.c index 598c15c01a..f078c91e98 100644 --- a/sysdeps/rs6000/ffs.c +++ b/sysdeps/rs6000/ffs.c @@ -1,24 +1,24 @@ /* ffs -- find first set bit in a word, counted from least significant end. For IBM rs6000. - Copyright (C) 1991, 1992 Free Software Foundation, Inc. + Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Torbjorn Granlund (tege@sics.se). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -#include #include #undef ffs @@ -26,7 +26,8 @@ Cambridge, MA 02139, USA. */ #ifdef __GNUC__ int -DEFUN(ffs, (x), int x) +ffs (x) + int x; { int cnt; diff --git a/sysdeps/standalone/brk.c b/sysdeps/standalone/brk.c index 67fbf771a0..5985b3099e 100644 --- a/sysdeps/standalone/brk.c +++ b/sysdeps/standalone/brk.c @@ -1,37 +1,36 @@ -/* Copyright (C) 1991, 1994, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1994, 1995, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil, On-Line Applications Research Corporation. - -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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -#include #include -PTR __curbrk; -PTR __rorig; -PTR __rlimit; +void *__curbrk; +void *__rorig; +void *__rlimit; int -DEFUN(__brk, (inaddr), PTR inaddr) +__brk (inaddr) + void *inaddr; { - if ( ( (void *)inaddr > (void *)__rlimit ) || - ( (void *)inaddr < (void *)__rorig ) ) + if ( ( (void *)inaddr > (void *)__rlimit ) || + ( (void *)inaddr < (void *)__rorig ) ) return -1; __curbrk = inaddr; @@ -40,24 +39,24 @@ DEFUN(__brk, (inaddr), PTR inaddr) /* Initialization Code for Memory Allocation */ -PTR __C_heap_start; +void *__C_heap_start; int __C_heap_size; - + #ifdef HAVE_GNU_LD static #endif void -DEFUN(__NONE_set_memvals, (argc, argv, envp), - int argc AND char **argv AND char **envp) +__NONE_set_memvals (argc, argv, envp), + int argc; char **argv; char **envp; { - - __rorig = + + __rorig = __curbrk = __C_heap_start; __rlimit = __curbrk + __C_heap_size; (void) &__NONE_set_memvals; /* Avoid "defined but not used" warning. */ } - + #ifdef HAVE_GNU_LD text_set_element (__libc_subinit, __NONE_set_memvals); #endif diff --git a/sysdeps/standalone/i386/force_cpu386/_exit.c b/sysdeps/standalone/i386/force_cpu386/_exit.c index 011bb8bda9..455dc0e7b8 100644 --- a/sysdeps/standalone/i386/force_cpu386/_exit.c +++ b/sysdeps/standalone/i386/force_cpu386/_exit.c @@ -1,38 +1,37 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), On-Line Applications Research Corporation. - -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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -#include #include #include /* This returns control to FORCEbug. */ -void DEFUN_VOID(Bsp_cleanup); +void Bsp_cleanup __P ((void)); /* The function `_exit' should take a status argument and simply terminate program execution, using the low-order 8 bits of the given integer as status. */ __NORETURN void -DEFUN(_exit, (status), int status) +_exit (status) + int status; { /* status is ignored */ Bsp_cleanup(); diff --git a/sysdeps/standalone/i386/force_cpu386/brdinit.c b/sysdeps/standalone/i386/force_cpu386/brdinit.c index 0d27218121..c16aa6029a 100644 --- a/sysdeps/standalone/i386/force_cpu386/brdinit.c +++ b/sysdeps/standalone/i386/force_cpu386/brdinit.c @@ -1,25 +1,23 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), On-Line Applications Research Corporation. - -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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + #include #include "i386.h" @@ -27,18 +25,18 @@ Cambridge, MA 02139, USA. */ This routine initializes the FORCE CPU386 board. */ -void DEFUN_VOID(_Console_Initialize); +void _Console_Initialize __P ((void)); -void -DEFUN_VOID(_Board_Initialize) +void +_Board_Initialize () { /* * FORCE documentation incorrectly states that the bus request * level is initialized to 3. It is actually initialized by * FORCEbug to 0. */ - - outport_byte( 0x00, 0x3f ); /* resets VMEbus request level */ - - _Console_Initialize(); + + outport_byte (0x00, 0x3f); /* resets VMEbus request level */ + + _Console_Initialize (); } diff --git a/sysdeps/standalone/i386/force_cpu386/console.c b/sysdeps/standalone/i386/force_cpu386/console.c index 5d56f768ea..d0fd35fd06 100644 --- a/sysdeps/standalone/i386/force_cpu386/console.c +++ b/sysdeps/standalone/i386/force_cpu386/console.c @@ -1,25 +1,23 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), On-Line Applications Research Corporation. - -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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + #include #include "i386.h" @@ -30,7 +28,7 @@ Cambridge, MA 02139, USA. */ * The following determines whether Port B or the Console should * be used for console I/O. Setting ONE (and only ONE) of these to 1 * enables I/O on that port. - * + * * PORT A - DUSCC MC68562 Channel A (*** not supported here ***) * PORT B - DUSCC MC68562 Channel B * PORT C - MFP MC68901 Channel (*** FORCEbug console ***) @@ -47,7 +45,7 @@ Cambridge, MA 02139, USA. */ #define Is_tx_ready( _status ) ( (_status) & 0x20 ) #define Is_rx_ready( _status ) ( (_status) & 0x10 ) #endif - + #if ( PORTC == 1 ) #define TX_STATUS 0x12c /* MFP Transmit Status Register */ #define RX_STATUS 0x12a /* MFP Receive Status Register */ @@ -56,20 +54,20 @@ Cambridge, MA 02139, USA. */ #define Is_tx_ready( _status ) ( (_status) & 0x80 ) #define Is_rx_ready( _status ) ( (_status) & 0x80 ) #endif - + /* _Console_Initialize On the Force board the console require some initialization. */ void -DEFUN_VOID(_Console_Initialize) +_Console_Initialize () { register unsigned8 ignored; /* FORCE technical support mentioned that it may be necessary to read the DUSCC RX_BUFFER port four times to remove all junk. This code is a little more paranoid. */ - + inport_byte( RX_BUFFER, ignored ); inport_byte( RX_BUFFER, ignored ); inport_byte( RX_BUFFER, ignored ); @@ -79,7 +77,7 @@ DEFUN_VOID(_Console_Initialize) /* Miscellaneous support for console IO */ -static inline int _Force386_is_rx_ready() +static inline int _Force386_is_rx_ready () { register unsigned8 status; @@ -88,8 +86,8 @@ static inline int _Force386_is_rx_ready() if ( Is_rx_ready( status ) ) return 1; else return 0; } - -static inline int _Force386_is_tx_ready() + +static inline int _Force386_is_tx_ready () { register unsigned8 status; @@ -100,14 +98,14 @@ static inline int _Force386_is_tx_ready() } -static inline int _Force386_read_data() +static inline int _Force386_read_data () { register unsigned8 ch; #if ( PORTB == 1 ) /* Force example code resets the Channel B Receiver here. * It appears to cause XON's to be lost. - */ + */ /* outport_byte( RX_STATUS, 0x10 ); */ #endif @@ -125,7 +123,8 @@ This routine transmits a character. It supports XON/XOFF flow control. */ #define XOFF 0x13 /* control-S */ int -DEFUN( _Console_Putc, (ch), char ch ) +_Console_Putc (ch) + char ch; { register unsigned8 inch; @@ -139,7 +138,7 @@ DEFUN( _Console_Putc, (ch), char ch ) inch = _Force386_read_data(); } while ( inch != XON ); } - + outport_byte( TX_BUFFER, ch ); return( 0 ); } @@ -149,7 +148,8 @@ DEFUN( _Console_Putc, (ch), char ch ) This routine reads a character from the UART and returns it. */ int -DEFUN( _Console_Getc, (poll), int poll ) +_Console_Getc (poll) + int poll; { if ( poll ) { if ( !_Force386_is_rx_ready() ) diff --git a/sysdeps/standalone/i960/nindy960/_exit.c b/sysdeps/standalone/i960/nindy960/_exit.c index 33553a7a2c..e56dcc07a4 100644 --- a/sysdeps/standalone/i960/nindy960/_exit.c +++ b/sysdeps/standalone/i960/nindy960/_exit.c @@ -1,25 +1,23 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), On-Line Applications Research Corporation. -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 Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -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 -published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. -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 -Library General Public License for more details. + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include #include #include @@ -28,9 +26,10 @@ Cambridge, MA 02139, USA. */ given integer as status. */ /* This returns control to Nindy. */ - +/* XXX where is __NORETURN ? */ __NORETURN void -DEFUN(_exit, (status), int status) +_exit (status) + int status; { /* status is ignored */ diff --git a/sysdeps/standalone/i960/nindy960/brdinit.c b/sysdeps/standalone/i960/nindy960/brdinit.c index c16adcd390..9cc916882d 100644 --- a/sysdeps/standalone/i960/nindy960/brdinit.c +++ b/sysdeps/standalone/i960/nindy960/brdinit.c @@ -1,36 +1,34 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), On-Line Applications Research Corporation. - -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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ -#include + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + #include #include "i960ca.h" /* _Board_Initialize() -This routine initializes the board. +This routine initializes the board. NOTE: Only tested on a Cyclone CVME961 but should be OK on any i960ca board. */ -void -DEFUN_VOID(_Board_Initialize) +void +_Board_Initialize () { struct i80960ca_prcb *prcb; /* ptr to processor control block */ struct i80960ca_ctltbl *ctl_tbl; /* ptr to control table */ @@ -44,7 +42,7 @@ DEFUN_VOID(_Board_Initialize) return ( _prcb ); } - prcb = get_prcb(); + prcb = get_prcb (); ctl_tbl = prcb->control_tbl; /* The following configures the data breakpoint (which must be set @@ -52,7 +50,7 @@ DEFUN_VOID(_Board_Initialize) */ ctl_tbl->bpcon &= ~0x00cc0000; - reload_ctl_group( 6 ); + reload_ctl_group (6); /* bit 31 of the Register Cache Control can be set to * enable an alternative caching algorithm. It does @@ -62,5 +60,5 @@ DEFUN_VOID(_Board_Initialize) /* Configure Number of Register Caches */ prcb->reg_cache_cfg = 8; - soft_reset( prcb ); + soft_reset (prcb); } diff --git a/sysdeps/standalone/i960/nindy960/console.c b/sysdeps/standalone/i960/nindy960/console.c index 821514458a..cf52ec6035 100644 --- a/sysdeps/standalone/i960/nindy960/console.c +++ b/sysdeps/standalone/i960/nindy960/console.c @@ -1,30 +1,28 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), On-Line Applications Research Corporation. - -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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + #include #include "i960ca.h" /* Console IO routines for a NINDY960 board. */ - + /* * NINDY_IO( ... ) * @@ -51,7 +49,8 @@ void ___NINDY_IO_WRAPPER( void ) /* never called */ This routine transmits a character using NINDY. */ int -DEFUN( _Console_Putc, (ch), char ch ) +_Console_Putc (ch) + char ch; { NINDY_IO( NINDY_OUTPUT, ch ); return( 0 ); @@ -62,7 +61,8 @@ DEFUN( _Console_Putc, (ch), char ch ) This routine reads a character from NINDY and returns it. */ int -DEFUN( _Console_Getc, (poll), int poll ) +_Console_Getc (poll) + int poll; { char ch; diff --git a/sysdeps/standalone/m68k/m68020/mvme136/_exit.c b/sysdeps/standalone/m68k/m68020/mvme136/_exit.c index d13b4d9770..d45e52d41d 100644 --- a/sysdeps/standalone/m68k/m68020/mvme136/_exit.c +++ b/sysdeps/standalone/m68k/m68020/mvme136/_exit.c @@ -1,33 +1,31 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), On-Line Applications Research Corporation. -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 Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -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 -published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. -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 -Library General Public License for more details. + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include #include #include #include "m68020.h" /* Return control to 135Bug */ -void -DEFUN_VOID(__exit_trap) +void +__exit_trap () { set_vbr( 0 ); /* restore 135Bug vectors */ asm volatile( "trap #15" ); /* trap to 135Bug */ @@ -39,8 +37,10 @@ DEFUN_VOID(__exit_trap) terminate program execution, using the low-order 8 bits of the given integer as status. */ -__NORETURN void -DEFUN(_exit, (status), int status) +void +__attribute__ ((noreturn)) +_exit (status) + int status; { /* status is ignored */ diff --git a/sysdeps/standalone/m68k/m68020/mvme136/brdinit.c b/sysdeps/standalone/m68k/m68020/mvme136/brdinit.c index 0c4801a49b..c477441104 100644 --- a/sysdeps/standalone/m68k/m68020/mvme136/brdinit.c +++ b/sysdeps/standalone/m68k/m68020/mvme136/brdinit.c @@ -1,25 +1,23 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), On-Line Applications Research Corporation. - -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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + #include #include "m68020.h" @@ -27,12 +25,12 @@ Cambridge, MA 02139, USA. */ This routine initializes the Motorola MVME135/MVME136. */ -void -DEFUN_VOID(_Board_Initialize) +void +_Board_Initialize () { mc68020_isr *monitors_vector_table; int index; - + monitors_vector_table = (mc68020_isr *)0; /* 135Bug Vectors are at 0 */ set_vbr( monitors_vector_table ); @@ -48,6 +46,6 @@ DEFUN_VOID(_Board_Initialize) (*(unsigned char *)0xfffb0067) = 0x7f; /* make VME access round-robin */ - enable_caching(); + enable_caching (); } diff --git a/sysdeps/unix/bsd/sun/sunos4/tcflow.c b/sysdeps/unix/bsd/sun/sunos4/tcflow.c index bb9a7fc7a0..3e54c1e44b 100644 --- a/sysdeps/unix/bsd/sun/sunos4/tcflow.c +++ b/sysdeps/unix/bsd/sun/sunos4/tcflow.c @@ -1,29 +1,30 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1993, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -#include #include #include #include /* Suspend or restart transmission on FD. */ int -DEFUN(tcflow, (fd, action), int fd AND int action) +tcflow (fd, action) + int fd; + int action; { return __ioctl (fd, TCXONC, action); } diff --git a/sysdeps/unix/bsd/sun/sunos4/tcflush.c b/sysdeps/unix/bsd/sun/sunos4/tcflush.c index d76fc07cf0..8c8fdf897e 100644 --- a/sysdeps/unix/bsd/sun/sunos4/tcflush.c +++ b/sysdeps/unix/bsd/sun/sunos4/tcflush.c @@ -1,29 +1,30 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1993, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -#include #include #include #include /* Flush pending data on FD. */ int -DEFUN(tcflush, (fd, queue_selector), int fd AND int queue_selector) +tcflush (fd, queue_selector) + int fd; + int queue_selector; { return __ioctl (fd, TCFLSH, queue_selector); } diff --git a/sysdeps/unix/bsd/sun/sunos4/tcgetattr.c b/sysdeps/unix/bsd/sun/sunos4/tcgetattr.c index 5e45037bb2..69a8fb29a7 100644 --- a/sysdeps/unix/bsd/sun/sunos4/tcgetattr.c +++ b/sysdeps/unix/bsd/sun/sunos4/tcgetattr.c @@ -1,22 +1,21 @@ -/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1993, 1995, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -#include #include #include #include @@ -24,8 +23,9 @@ Cambridge, MA 02139, USA. */ /* Put the state of FD into *TERMIOS_P. */ int -DEFUN(__tcgetattr, (fd, termios_p), - int fd AND struct termios *termios_p) +__tcgetattr (fd, termios_p) + int fd; + struct termios *termios_p; { return __ioctl (fd, TCGETS, termios_p); } diff --git a/sysdeps/unix/bsd/sun/sunos4/tcsendbrk.c b/sysdeps/unix/bsd/sun/sunos4/tcsendbrk.c index 7a6d5cc05f..2953f45662 100644 --- a/sysdeps/unix/bsd/sun/sunos4/tcsendbrk.c +++ b/sysdeps/unix/bsd/sun/sunos4/tcsendbrk.c @@ -1,22 +1,21 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1993, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -#include #include #include #include @@ -24,7 +23,9 @@ Cambridge, MA 02139, USA. */ /* Send zero bits on FD. */ int -DEFUN(tcsendbreak, (fd, duration), int fd AND int duration) +tcsendbreak (fd, duration) + int fd; + int duration; { /* According to SunOS 4.1's termios(4), you can't specify a duration. */ return __ioctl (fd, TCSBRK, 0); diff --git a/sysdeps/unix/bsd/sun/sunos4/wait4.c b/sysdeps/unix/bsd/sun/sunos4/wait4.c index 919cd7c42c..ffffc7ad70 100644 --- a/sysdeps/unix/bsd/sun/sunos4/wait4.c +++ b/sysdeps/unix/bsd/sun/sunos4/wait4.c @@ -1,26 +1,24 @@ /* This implements wait4 with the 4.4 BSD semantics (also those documented in SunOS 4.1) on top of SunOS's wait4 system call, which has semantics different from those documented. Go Sun! + Copyright (C) 1991, 1992, 1993, 1995, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. -Copyright (C) 1991, 1992, 1993, 1995 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 Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -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 -published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. -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 -Library General Public License for more details. + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include #include #include #include @@ -29,9 +27,11 @@ extern pid_t __wait4_syscall __P ((pid_t pid, __WAIT_STATUS_DEFN stat_loc, int options, struct rusage *usage)); pid_t -DEFUN(__wait4, (pid, stat_loc, options, usage), - pid_t pid AND __WAIT_STATUS_DEFN stat_loc AND - int options AND struct rusage *usage) +__wait4 (pid, stat_loc, options, usage) + pid_t pid; + __WAIT_STATUS_DEFN stat_loc; + int options; + struct rusage *usage; { switch (pid) { diff --git a/sysdeps/unix/bsd/ultrix4/mips/sigvec.c b/sysdeps/unix/bsd/ultrix4/mips/sigvec.c index 6969594c32..4ecce54ae0 100644 --- a/sysdeps/unix/bsd/ultrix4/mips/sigvec.c +++ b/sysdeps/unix/bsd/ultrix4/mips/sigvec.c @@ -1,20 +1,20 @@ -/* Copyright (C) 1992, 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1992, 1996, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* The sigvec system call on MIPS Ultrix takes an additional parameter, which is the address that is actually called when the @@ -28,7 +28,6 @@ Cambridge, MA 02139, USA. */ different because since we get passed the user signal handler we don't actually need a trampoline. */ -#include #include #include #include @@ -36,19 +35,21 @@ Cambridge, MA 02139, USA. */ /* The user's signal handler is called with three arguments. */ typedef void (*handler_type) (int sig, int code, struct sigcontext *); -extern int EXFUN(__raw_sigvec, (int sig, CONST struct sigvec *vec, - struct sigvec *ovec, - void (*)(int sig, int code, - struct sigcontext *, - handler_type))); +extern int __raw_sigvec __P ((int sig, CONST struct sigvec *vec, + struct sigvec *ovec, + void (*)(int sig, int code, + struct sigcontext *, + handler_type))); -extern void EXFUN(__handler, (int sig, int code, - struct sigcontext *, - handler_type)); +extern void __handler __P ((int sig, int code, + struct sigcontext *, + handler_type)); int -DEFUN(__sigvec, (sig, vec, ovec), - int sig AND CONST struct sigvec *vec AND struct sigvec *ovec) +__sigvec (sig, vec, ovec) + int sig; + const struct sigvec *vec; + struct sigvec *ovec; { return __raw_sigvec (sig, vec, ovec, __handler); } diff --git a/sysdeps/unix/sysv/irix4/fpathconf.c b/sysdeps/unix/sysv/irix4/fpathconf.c index 3c9f1750ff..5d4d2c3bde 100644 --- a/sysdeps/unix/sysv/irix4/fpathconf.c +++ b/sysdeps/unix/sysv/irix4/fpathconf.c @@ -1,22 +1,21 @@ -/* Copyright (C) 1994, 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1994, 1995, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -#include #include #include #include @@ -26,7 +25,9 @@ extern int __syssgi __P ((int, ...)); /* Get file-specific information about descriptor FD. */ long int -DEFUN(__fpathconf, (fd, name), int fd AND int name) +__fpathconf (fd, name) + int fd; + int name; { return __syssgi (SGI_PATHCONF, FPATHCONF, fd, name); } diff --git a/sysdeps/unix/sysv/irix4/getgroups.c b/sysdeps/unix/sysv/irix4/getgroups.c index 714f66077f..b68fe28be7 100644 --- a/sysdeps/unix/sysv/irix4/getgroups.c +++ b/sysdeps/unix/sysv/irix4/getgroups.c @@ -1,23 +1,22 @@ -/* Copyright (C) 1994, 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1994, 1995, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include -#include #include #include @@ -25,9 +24,11 @@ extern int __syssgi __P ((int, ...)); /* Set the group set for the current user to GROUPS (N of them). */ int -DEFUN(__getgroups, (n, groups), size_t n AND gid_t *groups) +__getgroups (n, groups) + size_t n; + gid_t *groups; { return __syssgi (SGI_GETGROUPS, n, groups); -} +} weak_alias (__getgroups, getgroups) diff --git a/sysdeps/unix/sysv/irix4/getrusage.c b/sysdeps/unix/sysv/irix4/getrusage.c index fdd3a24042..95f4773b02 100644 --- a/sysdeps/unix/sysv/irix4/getrusage.c +++ b/sysdeps/unix/sysv/irix4/getrusage.c @@ -1,22 +1,21 @@ -/* Copyright (C) 1994, 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1994, 1995, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -#include #include #include #include @@ -26,8 +25,9 @@ extern int __syssgi __P ((int, ...)); /* Return resource usage information on process indicated by WHO and put it in *USAGE. Returns 0 for success, -1 for failure. */ int -DEFUN(__getrusage, (who, usage), - enum __rusage_who who AND struct rusage *usage) +__getrusage (who, usage) + enum __rusage_who who; + struct rusage *usage; { return __syssgi (SGI_RUSAGE, who, usage); } diff --git a/sysdeps/unix/sysv/irix4/pathconf.c b/sysdeps/unix/sysv/irix4/pathconf.c index 698e30aab7..12518ab296 100644 --- a/sysdeps/unix/sysv/irix4/pathconf.c +++ b/sysdeps/unix/sysv/irix4/pathconf.c @@ -1,22 +1,21 @@ -/* Copyright (C) 1994, 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1994, 1995, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -#include #include #include #include @@ -26,7 +25,9 @@ extern int __syssgi __P ((int, ...)); /* Get file-specific information about PATH. */ long int -DEFUN(__pathconf, (path, name), CONST char *path AND int name) +__pathconf (path, name) + const char *path; + int name; { return __syssgi (SGI_PATHCONF, PATHCONF, path, name); } diff --git a/sysdeps/unix/sysv/irix4/setgroups.c b/sysdeps/unix/sysv/irix4/setgroups.c index 052df0f830..69e668966e 100644 --- a/sysdeps/unix/sysv/irix4/setgroups.c +++ b/sysdeps/unix/sysv/irix4/setgroups.c @@ -1,23 +1,22 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1994, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include -#include #include #include @@ -25,7 +24,9 @@ extern int __syssgi __P ((int, ...)); /* Set the group set for the current user to GROUPS (N of them). */ int -DEFUN(setgroups, (n, groups), size_t n AND CONST gid_t *groups) +setgroups (n, groups) + size_t n; + const gid_t *groups; { return __syssgi (SGI_SETGROUPS, n, groups); -} +} diff --git a/sysdeps/unix/sysv/irix4/sigtramp.c b/sysdeps/unix/sysv/irix4/sigtramp.c index 85c2c3a9a9..5411595c41 100644 --- a/sysdeps/unix/sysv/irix4/sigtramp.c +++ b/sysdeps/unix/sysv/irix4/sigtramp.c @@ -1,20 +1,20 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1992, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* The sigvec system call on MIPS Ultrix takes an additional parameter, which is the address that is actually called when the @@ -28,7 +28,6 @@ Cambridge, MA 02139, USA. */ different because since we get passed the user signal handler we don't actually need a trampoline. */ -#include #include #include #include @@ -37,18 +36,19 @@ Cambridge, MA 02139, USA. */ typedef void (*handler_type) (int sig, int code, struct sigcontext *); /* Defined in signal.S. */ -extern __sighandler_t EXFUN(__raw_signal, (int sig, __sighandler_t func, - void (*)(int sig, int code, - struct sigcontext *, - handler_type))); +extern __sighandler_t __raw_signal __P((int sig, __sighandler_t func, + void (*)(int sig, int code, + struct sigcontext *, + handler_type))); -extern void EXFUN(__handler, (int sig, int code, - struct sigcontext *, - handler_type)); +extern void __handler __P((int sig, int code, + struct sigcontext *, + handler_type)); __sighandler_t -DEFUN(signal, (sig, func), - int sig AND __sighandler_t func) +signal (sig, func) + int sig; + __sighandler_t func; { return __raw_signal (sig, func, __handler); } diff --git a/sysdeps/unix/sysv/irix4/start.c b/sysdeps/unix/sysv/irix4/start.c index b11d27b6ed..0977642920 100644 --- a/sysdeps/unix/sysv/irix4/start.c +++ b/sysdeps/unix/sysv/irix4/start.c @@ -1,22 +1,21 @@ -/* Copyright (C) 1991, 1992, 1995, 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1991, 1992, 1995, 1996, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -#include #include #include #include @@ -28,11 +27,11 @@ Cambridge, MA 02139, USA. */ /* The first piece of initialized data. */ int __data_start = 0; -VOLATILE int __errno = 0; +__volatile int __errno = 0; strong_alias (__errno, errno) -extern void EXFUN(__libc_init, (int argc, char **argv, char **envp)); -extern int EXFUN(main, (int argc, char **argv, char **envp)); +extern void __libc_init __P ((int argc, char **argv, char **envp)); +extern int main __P ((int argc, char **argv, char **envp)); /* Use the stack pointer to access the arguments. This assumes that we can guess how big the frame will be. */ @@ -44,7 +43,7 @@ register long int sp asm("sp"); #endif void -DEFUN_VOID(__start) +__start () { int argc; char **argv, **envp; diff --git a/sysdeps/unix/sysv/irix4/sysconf.c b/sysdeps/unix/sysv/irix4/sysconf.c index a310362239..2e409eed20 100644 --- a/sysdeps/unix/sysv/irix4/sysconf.c +++ b/sysdeps/unix/sysv/irix4/sysconf.c @@ -1,22 +1,21 @@ -/* Copyright (C) 1994, 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1994, 1995, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -#include #include #include @@ -24,7 +23,8 @@ extern int __syssgi __P ((int, ...)); /* Get the value of the system variable NAME. */ long int -DEFUN(__sysconf, (name), int name) +__sysconf (name) + int name; { if (name == _SC_TZNAME_MAX) return __tzname_max (); diff --git a/sysdeps/unix/sysv/sco3.2.4/__setpgid.c b/sysdeps/unix/sysv/sco3.2.4/__setpgid.c index 3c4304c633..d8ad98f159 100644 --- a/sysdeps/unix/sysv/sco3.2.4/__setpgid.c +++ b/sysdeps/unix/sysv/sco3.2.4/__setpgid.c @@ -1,21 +1,21 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -#include #include #include #include @@ -24,7 +24,9 @@ extern int __pgrpsys __P ((int type, ...)); /* Get the process group ID of process PID. */ int -DEFUN(__setpgid, (pid, pgid), pid_t pid AND pid_t pgid) +__setpgid (pid, pgid) + pid_t pid; + pid_t pgid; { return __pgrpsys (2, pid, pgid); } diff --git a/sysdeps/unix/sysv/sco3.2.4/getgroups.c b/sysdeps/unix/sysv/sco3.2.4/getgroups.c index 68966bc5df..aaf0e63f8a 100644 --- a/sysdeps/unix/sysv/sco3.2.4/getgroups.c +++ b/sysdeps/unix/sysv/sco3.2.4/getgroups.c @@ -1,22 +1,21 @@ -/* Copyright (C) 1994, 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1994, 1995, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -#include #include #include #include @@ -25,7 +24,8 @@ Cambridge, MA 02139, USA. */ extern int __sco_getgroups __P ((int size, unsigned short int *list)); int -DEFUN(__getgroups, (size, list), int size AND gid_t *list) +__getgroups (size, list) + int size; gid_t *list; { int i; unsigned short int *shortlist; diff --git a/sysdeps/unix/sysv/sysv4/__getpgid.c b/sysdeps/unix/sysv/sysv4/__getpgid.c index 76a6e80f59..9fc221b259 100644 --- a/sysdeps/unix/sysv/sysv4/__getpgid.c +++ b/sysdeps/unix/sysv/sysv4/__getpgid.c @@ -1,22 +1,22 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -#include #include #include #include @@ -25,7 +25,8 @@ extern int __pgrpsys __P ((int type, ...)); /* Get the process group ID of process PID. */ int -DEFUN(__getpgid, (pid), pid_t pid) +__getpgid (pid) + pid_t pid; { return __pgrpsys (4, pid); } diff --git a/sysdeps/unix/sysv/sysv4/__setpgid.c b/sysdeps/unix/sysv/sysv4/__setpgid.c index 594e4e9fe6..3a034154ec 100644 --- a/sysdeps/unix/sysv/sysv4/__setpgid.c +++ b/sysdeps/unix/sysv/sysv4/__setpgid.c @@ -1,22 +1,22 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -#include #include #include #include @@ -25,7 +25,9 @@ extern int __pgrpsys __P ((int type, ...)); /* Get the process group ID of process PID. */ int -DEFUN(__setpgid, (pid, pgid), pid_t pid AND pid_t pgid) +__setpgid (pid, pgid) + pid_t pid; + pid_t pgid; { return __pgrpsys (5, pid, pgid); } diff --git a/sysdeps/unix/sysv/sysv4/ftruncate.c b/sysdeps/unix/sysv/sysv4/ftruncate.c index 45f2614257..5c9d87421a 100644 --- a/sysdeps/unix/sysv/sysv4/ftruncate.c +++ b/sysdeps/unix/sysv/sysv4/ftruncate.c @@ -1,23 +1,22 @@ /* ftruncate for SVR4 using the fcntl F_FREESP command. -Copyright (C) 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. + Copyright (C) 1995, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -#include #include #include #include @@ -25,8 +24,9 @@ Cambridge, MA 02139, USA. */ /* Truncate the file FD refers to to LENGTH bytes. */ int -DEFUN(ftruncate, (fd, length), - int fd AND off_t length) +ftruncate (fd, length) + int fd; + off_t length; { struct flock fl; diff --git a/sysdeps/unix/sysv/sysv4/gethostname.c b/sysdeps/unix/sysv/sysv4/gethostname.c index cce1149e7f..558d16e6f8 100644 --- a/sysdeps/unix/sysv/sysv4/gethostname.c +++ b/sysdeps/unix/sysv/sysv4/gethostname.c @@ -1,22 +1,22 @@ -/* Copyright (C) 1994, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -#include #include #include #include @@ -25,7 +25,9 @@ Cambridge, MA 02139, USA. */ extern int __sysinfo __P ((int command, char *buf, long count)); int -DEFUN(__gethostname, (name, namelen), char *name AND size_t namelen) +__gethostname (name, namelen) + char *name; + size_t namelen; { return __sysinfo (SI_HOSTNAME, name, namelen); } diff --git a/sysdeps/unix/sysv/sysv4/getpgid.c b/sysdeps/unix/sysv/sysv4/getpgid.c index 309e2f11e4..3195e6cddd 100644 --- a/sysdeps/unix/sysv/sysv4/getpgid.c +++ b/sysdeps/unix/sysv/sysv4/getpgid.c @@ -1,22 +1,21 @@ -/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1993, 1995, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -#include #include #include #include @@ -25,7 +24,8 @@ extern int __pgrpsys __P ((int type, ...)); /* Get the process group ID of process PID. */ int -DEFUN(__getpgid, (pid), pid_t pid) +__getpgid (pid) + pid_t pid; { return __pgrpsys (4, pid); } diff --git a/sysdeps/unix/sysv/sysv4/sethostname.c b/sysdeps/unix/sysv/sysv4/sethostname.c index 4cebc456e1..10fb5ffe81 100644 --- a/sysdeps/unix/sysv/sysv4/sethostname.c +++ b/sysdeps/unix/sysv/sysv4/sethostname.c @@ -1,22 +1,22 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -#include #include #include #include @@ -25,7 +25,9 @@ Cambridge, MA 02139, USA. */ extern int __sysinfo __P ((int command, const char *buf, long count)); int -DEFUN(sethostname, (name, namelen), const char *name AND size_t namelen) +sethostname (name, namelen) + const char *name; + size_t namelen; { return __sysinfo (SI_SET_HOSTNAME, name, namelen); } diff --git a/sysdeps/unix/sysv/sysv4/setpgid.c b/sysdeps/unix/sysv/sysv4/setpgid.c index 743b8ca374..46396322d2 100644 --- a/sysdeps/unix/sysv/sysv4/setpgid.c +++ b/sysdeps/unix/sysv/sysv4/setpgid.c @@ -1,22 +1,21 @@ -/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1993, 1995, 1996, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -#include #include #include @@ -26,7 +25,8 @@ extern int __pgrpsys __P ((int type, ...)); If PID is zero, the current process's process group ID is set. If PGID is zero, the process ID of the process is used. */ int -DEFUN(__setpgid, (pid, pgid), int pid AND int pgid) +__setpgid (pid, pgid) + int pid, pgid; /* XXX why not pid_t ? */ { return __pgrpsys (5, pid, pgid); } diff --git a/sysdeps/unix/sysv/sysv4/setsid.c b/sysdeps/unix/sysv/sysv4/setsid.c index f0d6c8a4cd..37998bfe03 100644 --- a/sysdeps/unix/sysv/sysv4/setsid.c +++ b/sysdeps/unix/sysv/sysv4/setsid.c @@ -1,22 +1,21 @@ -/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1993, 1995, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -#include #include #include @@ -26,7 +25,7 @@ extern int __pgrpsys __P ((int type, ...)); The process group IDs of the session and the calling process are set to the process ID of the calling process, which is returned. */ int -DEFUN_VOID(__setsid) +__setsid () { return __pgrpsys (3); } diff --git a/sysdeps/vax/__longjmp.c b/sysdeps/vax/__longjmp.c index 0ee040ab25..e795c42da9 100644 --- a/sysdeps/vax/__longjmp.c +++ b/sysdeps/vax/__longjmp.c @@ -1,23 +1,22 @@ -/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1994, 1997 Free Software Foundation, Inc. Derived from @(#)_setjmp.s 5.7 (Berkeley) 6/27/88, Copyright (c) 1980 Regents of the University of California. -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -#include #include #ifndef __GNUC__ @@ -31,7 +30,9 @@ Cambridge, MA 02139, USA. */ setjmp call there to return VAL, or 1 if VAL is 0. */ __NORETURN void -DEFUN(__longjmp, (env, val), CONST __jmp_buf env AND int val) +__longjmp (env, val) + const __jmp_buf env; + int val; { register long int *fp asm("fp"); long int *regsave; diff --git a/sysdeps/vax/memccpy.c b/sysdeps/vax/memccpy.c index 9849761f13..97fa3a0fe6 100644 --- a/sysdeps/vax/memccpy.c +++ b/sysdeps/vax/memccpy.c @@ -1,36 +1,37 @@ -/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1991, 1992, 1995, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -#include #include - /* Copy no more than N bytes of SRC to DEST, stopping when C is found. Return the position in DEST one byte past where C was copied, or NULL if C was not found in the first N bytes of SRC. */ -PTR -DEFUN(__memccpy, (dest, src, c, n), - PTR dest AND CONST PTR src AND int c AND size_t nbytes) +void * +__memccpy (dest, src, c, n) + void *dest; + const void *src; + int c; + size_t nbytes; { /* Except when N > 65535, this is what a hand-coded version would do anyway. */ - PTR found = memchr (src, c, n); + void *found = memchr (src, c, n); if (found == NULL) { From 08eeb8c0d3ac7399302489eb47d9d7fb21747655 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 29 May 1997 12:05:37 +0000 Subject: [PATCH 0891/4487] Fix missing negate. Use __m81_test instead of explicit comparisons. --- sysdeps/m68k/fpu/e_atan2.c | 52 ++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 24 deletions(-) diff --git a/sysdeps/m68k/fpu/e_atan2.c b/sysdeps/m68k/fpu/e_atan2.c index c012070a93..59bc990f5b 100644 --- a/sysdeps/m68k/fpu/e_atan2.c +++ b/sysdeps/m68k/fpu/e_atan2.c @@ -35,63 +35,67 @@ float_type s(__ieee754_atan2) (float_type y, float_type x) { float_type pi, pi_2, z; + unsigned long y_cond, x_cond; __asm ("fmovecr%.x %#0, %0" : "=f" (pi)); __asm ("fscale%.w %#-1, %0" : "=f" (pi_2) : "0" (pi)); - if (x != x || y != y) + y_cond = __m81_test (y); + x_cond = __m81_test (x); + + if ((x_cond | y_cond) & __M81_COND_NAN) z = x + y; - else if (y == 0) + else if (y_cond & __M81_COND_ZERO) { - if (m81(__signbit) (x)) - z = m81(__signbit) (y) ? -pi : pi; + if (x_cond & __M81_COND_NEG) + z = y_cond & __M81_COND_NEG ? -pi : pi; else z = y; } - else if (m81(__isinf) (x)) + else if (x_cond & __M81_COND_INF) { - if (m81(__isinf) (y)) + if (y_cond & __M81_COND_INF) { float_type pi_4; __asm ("fscale%.w %#-2, %0" : "=f" (pi_4) : "0" (pi)); - z = x > 0 ? pi_4 : 3 * pi_4; + z = x_cond & __M81_COND_NEG ? 3 * pi_4 : pi_4; } else - z = x > 0 ? 0 : pi; - if (m81(__signbit) (y)) + z = x_cond & __M81_COND_NEG ? pi : 0; + if (y_cond & __M81_COND_NEG) z = -z; } - else if (m81(__isinf) (y)) - z = y > 0 ? pi_2 : -pi_2; - else if (x > 0) + else if (y_cond & __M81_COND_INF) + z = y_cond & __M81_COND_NEG ? -pi_2 : pi_2; + else if (x_cond & __M81_COND_NEG) { - if (y > 0) + if (y_cond & __M81_COND_NEG) { - if (x > y) - z = m81(__atan) (y / x); + if (-x > -y) + z = -pi + m81(__atan) (y / x); else - z = pi_2 - m81(__atan) (x / y); + z = -pi_2 - m81(__atan) (x / y); } else { - if (x > -y) - z = m81(__atan) (y / x); + if (-x > y) + z = pi + m81(__atan) (y / x); else - z = -pi_2 - m81(__atan) (x / y); + z = pi_2 - m81(__atan) (x / y); } } else { - if (y < 0) + if (y_cond & __M81_COND_NEG) { - if (-x > y) - z = -pi + m81(__atan) (y / x); + if (x > -y) + z = m81(__atan) (y / x); else z = -pi_2 - m81(__atan) (x / y); } else { - if (-x > y) - z = pi + m81(__atan) (y / x); + if (x > y) + z = m81(__atan) (y / x); else z = pi_2 - m81(__atan) (x / y); } From f10d86ecba2641edc6d6116eebaed1eece32cf11 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 31 May 1997 00:42:09 +0000 Subject: [PATCH 0892/4487] Temporarily turn on -mieee globally. This will last until I figure out how to build a parallel libm_ieee. --- sysdeps/alpha/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile index 841dc980a8..5fe8e4ee7f 100644 --- a/sysdeps/alpha/Makefile +++ b/sysdeps/alpha/Makefile @@ -44,3 +44,7 @@ sysdep-CFLAGS += -mno-fp-regs endif divrem := divl divq reml remq + +# For now, build everything with full IEEE math support. +# TODO: build separate libm and libm-ieee. +sysdep-CFLAGS += -mieee From 91650f79e3de41c27dde1a62ab7157f697fab75f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 31 May 1997 00:43:46 +0000 Subject: [PATCH 0893/4487] Math exception and environment handling. --- sysdeps/alpha/fpu/fclrexcpt.c | 36 +++++++++++ sysdeps/alpha/fpu/fegetenv.c | 37 +++++++++++ sysdeps/alpha/fpu/fegetround.c | 31 +++++++++ sysdeps/alpha/fpu/feholdexcpt.c | 33 ++++++++++ sysdeps/alpha/fpu/fenvbits.h | 107 +++++++++++++++++++++++++++++++ sysdeps/alpha/fpu/fesetenv.c | 45 +++++++++++++ sysdeps/alpha/fpu/fesetround.c | 41 ++++++++++++ sysdeps/alpha/fpu/feupdateenv.c | 38 +++++++++++ sysdeps/alpha/fpu/fgetexcptflg.c | 33 ++++++++++ sysdeps/alpha/fpu/fraiseexcpt.c | 72 +++++++++++++++++++++ sysdeps/alpha/fpu/fsetexcptflg.c | 36 +++++++++++ sysdeps/alpha/fpu/ftestexcept.c | 32 +++++++++ 12 files changed, 541 insertions(+) create mode 100644 sysdeps/alpha/fpu/fclrexcpt.c create mode 100644 sysdeps/alpha/fpu/fegetenv.c create mode 100644 sysdeps/alpha/fpu/fegetround.c create mode 100644 sysdeps/alpha/fpu/feholdexcpt.c create mode 100644 sysdeps/alpha/fpu/fenvbits.h create mode 100644 sysdeps/alpha/fpu/fesetenv.c create mode 100644 sysdeps/alpha/fpu/fesetround.c create mode 100644 sysdeps/alpha/fpu/feupdateenv.c create mode 100644 sysdeps/alpha/fpu/fgetexcptflg.c create mode 100644 sysdeps/alpha/fpu/fraiseexcpt.c create mode 100644 sysdeps/alpha/fpu/fsetexcptflg.c create mode 100644 sysdeps/alpha/fpu/ftestexcept.c diff --git a/sysdeps/alpha/fpu/fclrexcpt.c b/sysdeps/alpha/fpu/fclrexcpt.c new file mode 100644 index 0000000000..7aa79af100 --- /dev/null +++ b/sysdeps/alpha/fpu/fclrexcpt.c @@ -0,0 +1,36 @@ +/* Clear given exceptions in current floating-point environment. + Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson , 1997. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +void +feclearexcept (int excepts) +{ + unsigned long swcr; + + /* Get the current state. */ + swcr = __ieee_get_fp_control(); + + /* Clear the relevant bits. */ + swcr &= ~((unsigned long)excepts & FE_ALL_EXCEPT); + + /* Put the new state in effect. */ + __ieee_set_fp_control(swcr); +} diff --git a/sysdeps/alpha/fpu/fegetenv.c b/sysdeps/alpha/fpu/fegetenv.c new file mode 100644 index 0000000000..c8b705d230 --- /dev/null +++ b/sysdeps/alpha/fpu/fegetenv.c @@ -0,0 +1,37 @@ +/* Store current floating-point environment. + Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson , 1997 + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +void +fegetenv (fenv_t *envp) +{ + unsigned long fpcr, swcr; + + /* Get status from software and hardware. Note that we don't need an + excb because the callsys is an implied trap barrier. */ + swcr = __ieee_get_fp_control(); + __asm__ __volatile__("mf_fpcr %0" : "=f"(fpcr)); + + /* Merge the two bits of information. The magic number at the end is + the exception enable mask. */ + + *envp = (fpcr & (3UL << 58)) | (swcr & (FE_ALL_EXCEPT | 0x3e)); +} diff --git a/sysdeps/alpha/fpu/fegetround.c b/sysdeps/alpha/fpu/fegetround.c new file mode 100644 index 0000000000..623e2ce358 --- /dev/null +++ b/sysdeps/alpha/fpu/fegetround.c @@ -0,0 +1,31 @@ +/* Return current rounding direction. + Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson , 1997 + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +fegetround (void) +{ + unsigned long fpcr; + + __asm__ __volatile__("excb; mf_fpcr %0" : "=f"(fpcr)); + + return (fpcr >> 58) & 3; +} diff --git a/sysdeps/alpha/fpu/feholdexcpt.c b/sysdeps/alpha/fpu/feholdexcpt.c new file mode 100644 index 0000000000..493d6a18eb --- /dev/null +++ b/sysdeps/alpha/fpu/feholdexcpt.c @@ -0,0 +1,33 @@ +/* Store current floating-point environment and clear exceptions. + Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson , 1997 + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +feholdexcept (fenv_t *envp) +{ + /* Save the current state. */ + fegetenv(envp); + + /* Clear all exception status bits and exception enable bits. */ + __ieee_set_fp_control(0); + + return 1; +} diff --git a/sysdeps/alpha/fpu/fenvbits.h b/sysdeps/alpha/fpu/fenvbits.h new file mode 100644 index 0000000000..02414e4c30 --- /dev/null +++ b/sysdeps/alpha/fpu/fenvbits.h @@ -0,0 +1,107 @@ +/* Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson , 1997 + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* This file should never be included directly. */ + +#ifndef _FENVBITS_H +#define _FENVBITS_H 1 + +/* Define the bits representing the exception. + + Note that these are the bit positions as defined by the OSF/1 + ieee_{get,set}_control_word interface and not by the hardware fpcr. + + See the Alpha Architecture Handbook section 4.7.7.3 for details, + but in summary, trap shadows mean the hardware register can acquire + extra exception bits so for proper IEEE support the tracking has to + be done in software -- in this case with kernel support. + + As to why the system call interface isn't in the same format as + the hardware register, only those crazy folks at DEC can tell you. */ + +enum + { + FE_INEXACT = 1UL << 21, +#define FE_INEXACT FE_INEXACT + + FE_UNDERFLOW = 1UL << 20, +#define FE_UNDERFLOW FE_UNDERFLOW + + FE_OVERFLOW = 1UL << 19, +#define FE_OVERFLOW FE_OVERFLOW + + FE_DIVBYZERO = 1UL << 18, +#define FE_DIVBYZERO FE_DIVBYZERO + + FE_INVALID = 1UL << 17, +#define FE_INVALID FE_INVALID + + FE_ALL_EXCEPT = + (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID) +#define FE_ALL_EXCEPT FE_ALL_EXCEPT + }; + + +/* Alpha chips support all four defined rouding modes. + + Note that code must be compiled to use dynamic rounding (/d) instructions + to see these changes. For gcc this is -mfp-rounding-mode=d; for DEC cc + this is -fprm d. The default for both is static rounding to nearest. + + These are shifted down 58 bits from the hardware fpcr because the + functions are declared to take integers. */ + +enum + { + FE_TOWARDSZERO = 0, +#define FE_TOWARDSZERO FE_TOWARDSZERO + + FE_DOWNWARD = 1, +#define FE_DOWNWARD FE_DOWNWARD + + FE_TONEAREST = 2, +#define FE_TONEAREST FE_TONEAREST + + FE_UPWARD = 3, +#define FE_UPWARD FE_UPWARD + }; + + +/* Type representing exception flags. */ +typedef unsigned long fexcept_t; + +/* Type representing floating-point environment. */ +typedef unsigned long fenv_t; + +/* If the default argument is used we use this value. Note that due to + architecture-specified page mappings, no user-space pointer will ever + have its two high bits set. Co-opt one. */ +#define FE_DFL_ENV ((fenv_t *) 0x8800000000000000UL) + +#ifdef __USE_GNU +/* Floating-point environment where none of the exceptions are masked. */ +# define FE_NOMASK_ENV ((fenv_t *) 0x880000000000003eUL) +#endif + +/* The system calls to talk to the kernel's FP code. */ +extern unsigned long __ieee_get_fp_control(void); +extern void __ieee_set_fp_control(unsigned long); + + +#endif /* fenvbits.h */ diff --git a/sysdeps/alpha/fpu/fesetenv.c b/sysdeps/alpha/fpu/fesetenv.c new file mode 100644 index 0000000000..3692967a5b --- /dev/null +++ b/sysdeps/alpha/fpu/fesetenv.c @@ -0,0 +1,45 @@ +/* Install given floating-point environment. + Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson , 1997 + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +void +fesetenv (const fenv_t *envp) +{ + unsigned long fpcr; + fenv_t env; + + /* Magic encoding of default values: high bit set (never possible for a + user-space address) is not indirect. And we don't even have to get + rid of it since we mask things around just below. */ + if ((long)envp >= 0) + env = *envp; + else + env = (unsigned long)envp; + + /* Reset the rounding mode with the hardware fpcr. Note that the following + system call is an implied trap barrier for our modification. */ + __asm__ __volatile__("excb; mf_fpcr %0" : "=f"(fpcr)); + fpcr = (fpcr & ~(3UL << 58)) | (env & (3UL << 58)); + __asm__ __volatile__("mt_fpcr %0" : : "f"(fpcr)); + + /* Reset the exception status and mask with the kernel's FP code. */ + __ieee_set_fp_control(env & (FE_ALL_EXCEPT | 0x3e)); +} diff --git a/sysdeps/alpha/fpu/fesetround.c b/sysdeps/alpha/fpu/fesetround.c new file mode 100644 index 0000000000..f49586cf8b --- /dev/null +++ b/sysdeps/alpha/fpu/fesetround.c @@ -0,0 +1,41 @@ +/* Set current rounding direction. + Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson , 1997 + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +fesetround (int round) +{ + unsigned long fpcr; + + if (round & ~3) + return 0; + + /* Get the current state. */ + __asm__ __volatile__("excb; mf_fpcr %0" : "=f"(fpcr)); + + /* Set the relevant bits. */ + fpcr = (fpcr & ~(3UL << 58)) | ((unsigned long)round << 58); + + /* Put the new state in effect. */ + __asm__ __volatile__("mt_fpcr %0; excb" : : "f"(fpcr)); + + return 1; +} diff --git a/sysdeps/alpha/fpu/feupdateenv.c b/sysdeps/alpha/fpu/feupdateenv.c new file mode 100644 index 0000000000..816575a134 --- /dev/null +++ b/sysdeps/alpha/fpu/feupdateenv.c @@ -0,0 +1,38 @@ +/* Install given floating-point environment and raise exceptions. + Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson , 1997. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +void +feupdateenv (const fenv_t *envp) +{ + unsigned long tmp; + + /* Get the current exception state. */ + tmp = __ieee_get_fp_control(); + + /* Install new environment. */ + fesetenv(envp); + + /* Raise the saved exception. Incidently for us the implementation + defined format of the values in objects of type fexcept_t is the + same as the ones specified using the FE_* constants. */ + feraiseexcept((int)tmp & FE_ALL_EXCEPT); +} diff --git a/sysdeps/alpha/fpu/fgetexcptflg.c b/sysdeps/alpha/fpu/fgetexcptflg.c new file mode 100644 index 0000000000..28d9e129b1 --- /dev/null +++ b/sysdeps/alpha/fpu/fgetexcptflg.c @@ -0,0 +1,33 @@ +/* Store current representation for exceptions. + Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson , 1997. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +void +fegetexceptflag (fexcept_t *flagp, int excepts) +{ + unsigned long tmp; + + /* Get the current state. */ + tmp = __ieee_get_fp_control(); + + /* Return that portion that corresponds to the requested exceptions. */ + *flagp = tmp & excepts & FE_ALL_EXCEPT; +} diff --git a/sysdeps/alpha/fpu/fraiseexcpt.c b/sysdeps/alpha/fpu/fraiseexcpt.c new file mode 100644 index 0000000000..6a53e55e7d --- /dev/null +++ b/sysdeps/alpha/fpu/fraiseexcpt.c @@ -0,0 +1,72 @@ +/* Raise given exceptions. + Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson , 1997. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +void +feraiseexcept (int excepts) +{ + double tmp; + + /* Raise exceptions represented by EXPECTS. But we must raise only + one signal at a time. It is important the if the overflow/underflow + exception and the inexact exception are given at the same time, + the overflow/underflow exception precedes the inexact exception. */ + + /* We do these bits in assembly to be certain GCC doesn't optimize + away something important. */ + + /* First: invalid exception. */ + if (FE_INVALID & excepts) + { + /* One example of a invalid operation is 0 * Infinity. */ + __asm__ __volatile__("mult/sui $f31,%1,%0; trapb" + : "=f"(tmp) : "f"(HUGE_VAL)); + } + + /* Next: division by zero. */ + if (FE_DIVBYZERO & excepts) + { + __asm__ __volatile__("cmpteq $f31,$f31,%0; divt/sui %0,$f31,%0; trapb" + : "=f"(tmp)); + } + + /* Next: overflow. */ + if (FE_OVERFLOW & excepts) + { + __asm__ __volatile__("mult/sui %1,%1,%0; trapb" + : "=f"(tmp) : "f"(DBL_MAX)); + } + + /* Next: underflow. */ + if (FE_UNDERFLOW & excepts) + { + __asm__ __volatile__("divt/sui %1,%2,%0; trapb" + : "=f"(tmp) : "f"(DBL_MIN), "f"(16.0)); + } + + /* Last: inexact. */ + if (FE_INEXACT & excepts) + { + __asm__ __volatile__("divt/sui %1,%2,%0; trapb" + : "=f"(tmp) : "f"(1.0), "f"(M_PI)); + } +} diff --git a/sysdeps/alpha/fpu/fsetexcptflg.c b/sysdeps/alpha/fpu/fsetexcptflg.c new file mode 100644 index 0000000000..7e373bea6f --- /dev/null +++ b/sysdeps/alpha/fpu/fsetexcptflg.c @@ -0,0 +1,36 @@ +/* Set floating-point environment exception handling. + Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson , 1997. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +void +fesetexceptflag (const fexcept_t *flagp, int excepts) +{ + unsigned long tmp; + + /* Get the current exception state. */ + tmp = __ieee_get_fp_control(); + + /* Set all the bits that were called for. */ + tmp = tmp & ~FE_ALL_EXCEPT | *flagp & excepts & FE_ALL_EXCEPT; + + /* And store it back. */ + __ieee_set_fp_control(tmp); +} diff --git a/sysdeps/alpha/fpu/ftestexcept.c b/sysdeps/alpha/fpu/ftestexcept.c new file mode 100644 index 0000000000..9ee9dc9c55 --- /dev/null +++ b/sysdeps/alpha/fpu/ftestexcept.c @@ -0,0 +1,32 @@ +/* Test exception in current environment. + Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson , 1997. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +fetestexcept (int excepts) +{ + unsigned long tmp; + + /* Get current exceptions. */ + tmp = __ieee_get_fp_control(); + + return tmp & excepts & FE_ALL_EXCEPT; +} From 9aa1421fe000276c53fb5826f27f417b5e141b5d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 31 May 1997 00:45:54 +0000 Subject: [PATCH 0894/4487] Don't use jmp macro to make sure the stack frame is released the very instruction before the real jump out. --- sysdeps/unix/sysv/linux/alpha/brk.S | 5 +++-- sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S | 8 +++++--- sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S | 10 ++++++---- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/brk.S b/sysdeps/unix/sysv/linux/alpha/brk.S index 74fef64f64..be0539b475 100644 --- a/sysdeps/unix/sysv/linux/alpha/brk.S +++ b/sysdeps/unix/sysv/linux/alpha/brk.S @@ -73,8 +73,9 @@ $ok: stq a0, __curbrk /* What a horrible way to die. */ $err0: ldi v0, ENOMEM -$err1: addq sp, 8, sp - jmp zero, __syscall_error +$err1: lda pv, __syscall_error + addq sp, 8, sp + jmp zero, (pv), __syscall_error END(__brk) diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S index dbc25bcbf3..e118ff19f5 100644 --- a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S +++ b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S @@ -41,18 +41,20 @@ LEAF(__ieee_get_fp_control, 16) ldi a0, GSI_IEEE_FP_CONTROL ldi v0, __NR_osf_getsysinfo call_pal PAL_callsys - bne a3, error + bne a3, $error ldq v0, 0(sp) lda sp, 16(sp) ret -error: lda sp, 16(sp) +$error: #ifndef PROF br gp, 1f 1: ldgp gp, 0(gp) #endif - jmp zero, __syscall_error + lda pv, __syscall_error + lda sp, 16(sp) + jmp zero, (pv), __syscall_error END(__ieee_get_fp_control) diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S index d2d2add56c..b38d67efac 100644 --- a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S +++ b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S @@ -41,17 +41,19 @@ LEAF(__ieee_set_fp_control, 16) ldi v0, __NR_osf_setsysinfo call_pal PAL_callsys - lda sp, 16(sp) + bne a3, $error - bne a3, error + lda sp, 16(sp) ret -error: +$error: #ifndef PROF br gp, 1f 1: ldgp gp, 0(gp) #endif - jmp zero, __syscall_error + lda pv, __syscall_error + lda sp, 16(sp) + jmp zero, (pv), __syscall_error END(__ieee_set_fp_control) From 2521516d3098f8f536b4833e8c8e4fc13492dfe8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 31 May 1997 00:46:01 +0000 Subject: [PATCH 0895/4487] Add definition for Miata. --- sysdeps/unix/sysv/linux/alpha/ioperm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c index 63bf17588a..76a744d167 100644 --- a/sysdeps/unix/sysv/linux/alpha/ioperm.c +++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c @@ -55,14 +55,13 @@ #define JENSEN_IO_BASE (0xfffffc0300000000UL) #define JENSEN_SPARSE_MEM (0xfffffc0200000000UL) -/* - * With respect to the I/O architecture, APECS and LCA are identical, - * so the following defines apply to LCA as well. - */ +/* With respect to the I/O architecture, APECS and LCA are identical, + so the following defines apply to LCA as well. */ #define APECS_IO_BASE (0xfffffc01c0000000UL) #define APECS_SPARSE_MEM (0xfffffc0200000000UL) #define APECS_DENSE_MEM (0xfffffc0300000000UL) +/* The same holds for CIA and PYXIS. */ #define CIA_IO_BASE (0xfffffc8580000000UL) #define CIA_SPARSE_MEM (0xfffffc8000000000UL) #define CIA_DENSE_MEM (0xfffffc8600000000UL) @@ -104,6 +103,7 @@ static struct platform { {"Mustang", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM}, {"Noname", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM}, {"Sable", IOSYS_T2, 5, T2_DENSE_MEM, T2_SPARSE_MEM}, + {"Miata", IOSYS_CIA, 5, CIA_DENSE_MEM, CIA_SPARSE_MEM}, }; From f97d5b5f4d76185f5ff52f29bab086c234492128 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 31 May 1997 00:46:15 +0000 Subject: [PATCH 0896/4487] Add copyright. (rdfpcr): Use excb rather than trapb. Be more efficient about getting at the fpcr. (wrfpcr): Likewise. (__setfpucw): Reformat. --- sysdeps/alpha/fpu/fpu_control.h | 46 +++++++------- sysdeps/unix/sysv/linux/alpha/setfpucw.c | 81 ++++++++++++++---------- 2 files changed, 70 insertions(+), 57 deletions(-) diff --git a/sysdeps/alpha/fpu/fpu_control.h b/sysdeps/alpha/fpu/fpu_control.h index 219ea55f24..bcf73e857e 100644 --- a/sysdeps/alpha/fpu/fpu_control.h +++ b/sysdeps/alpha/fpu/fpu_control.h @@ -1,23 +1,22 @@ -/* FPU control word bits. Alpha version. -Copyright (C) 1996 Free Software Foundation, Inc. -Contributed by Olaf Flebbe. - -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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ +/* FPU control word bits. Alpha-maped-to-Intel version. + Copyright (C) 1996 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Olaf Flebbe. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _ALPHA_FPU_CONTROL_H #define _ALPHA_FPU_CONTROL_H @@ -91,11 +90,12 @@ Cambridge, MA 02139, USA. */ qualifier. By setting the dynamic rounding mode to +infinity, one can use /d to get round to +infinity with no extra overhead (so long as the default isn't changed, of course...) - - exceptions on overflow, zero divide and NaN */ -#define _FPU_DEFAULT 0x1f72 + - no exceptions enabled. */ + +#define _FPU_DEFAULT 0x137f /* IEEE: same as above, but exceptions */ -#define _FPU_IEEE 0x1f7f +#define _FPU_IEEE 0x137f /* Type of the control word. */ typedef unsigned int fpu_control_t; diff --git a/sysdeps/unix/sysv/linux/alpha/setfpucw.c b/sysdeps/unix/sysv/linux/alpha/setfpucw.c index 43e8536b20..9133c81110 100644 --- a/sysdeps/unix/sysv/linux/alpha/setfpucw.c +++ b/sysdeps/unix/sysv/linux/alpha/setfpucw.c @@ -1,65 +1,78 @@ -#include +/* Set FP exception mask and rounding mode. + Copyright (C) 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ +#include #include + extern void __ieee_set_fp_control (unsigned long); extern unsigned long __ieee_get_fp_control (void); - static inline unsigned long rdfpcr (void) { - unsigned long fpcr; - - asm ("trapb; mf_fpcr $f0; trapb; stt $f0,%0" : "m="(fpcr)); - return fpcr; + unsigned long fpcr; + asm ("excb; mf_fpcr %0" : "=f"(fpcr)); + return fpcr; } static inline void wrfpcr (unsigned long fpcr) { - asm volatile ("ldt $f0,%0; trapb; mt_fpcr $f0; trapb" :: "m"(fpcr)); + asm volatile ("mt_fpcr %0; excb" : : "f"(fpcr)); } void __setfpucw (unsigned short fpu_control) { - unsigned long fpcr = 0, fpcw = 0; + unsigned long fpcr = 0, fpcw = 0; - if (!fpu_control) - fpu_control = _FPU_DEFAULT; + if (!fpu_control) + fpu_control = _FPU_DEFAULT; - /* first, set dynamic rounding mode: */ + /* first, set dynamic rounding mode: */ - fpcr = rdfpcr(); - fpcr &= ~FPCR_DYN_MASK; - switch (fpu_control & 0xc00) { - case _FPU_RC_NEAREST: fpcr |= FPCR_DYN_NORMAL; break; - case _FPU_RC_DOWN: fpcr |= FPCR_DYN_MINUS; break; - case _FPU_RC_UP: fpcr |= FPCR_DYN_PLUS; break; - case _FPU_RC_ZERO: fpcr |= FPCR_DYN_CHOPPED; break; + fpcr = rdfpcr(); + fpcr &= ~FPCR_DYN_MASK; + switch (fpu_control & 0xc00) + { + case _FPU_RC_NEAREST: fpcr |= FPCR_DYN_NORMAL; break; + case _FPU_RC_DOWN: fpcr |= FPCR_DYN_MINUS; break; + case _FPU_RC_UP: fpcr |= FPCR_DYN_PLUS; break; + case _FPU_RC_ZERO: fpcr |= FPCR_DYN_CHOPPED; break; } - wrfpcr(fpcr); + wrfpcr(fpcr); - /* now tell kernel about traps that we like to hear about: */ + /* now tell kernel about traps that we like to hear about: */ - fpcw = __ieee_get_fp_control(); - fpcw &= ~IEEE_TRAP_ENABLE_MASK; + fpcw = __ieee_get_fp_control(); + fpcw &= ~IEEE_TRAP_ENABLE_MASK; - if (!(fpu_control & _FPU_MASK_IM)) - fpcw |= IEEE_TRAP_ENABLE_INV; - if (!(fpu_control & _FPU_MASK_DM)) - fpcw |= IEEE_TRAP_ENABLE_UNF; - if (!(fpu_control & _FPU_MASK_ZM)) - fpcw |= IEEE_TRAP_ENABLE_DZE; - if (!(fpu_control & _FPU_MASK_OM)) - fpcw |= IEEE_TRAP_ENABLE_OVF; - if (!(fpu_control & _FPU_MASK_PM)) - fpcw |= IEEE_TRAP_ENABLE_INE; + if (!(fpu_control & _FPU_MASK_IM)) fpcw |= IEEE_TRAP_ENABLE_INV; + if (!(fpu_control & _FPU_MASK_DM)) fpcw |= IEEE_TRAP_ENABLE_UNF; + if (!(fpu_control & _FPU_MASK_ZM)) fpcw |= IEEE_TRAP_ENABLE_DZE; + if (!(fpu_control & _FPU_MASK_OM)) fpcw |= IEEE_TRAP_ENABLE_OVF; + if (!(fpu_control & _FPU_MASK_PM)) fpcw |= IEEE_TRAP_ENABLE_INE; - __ieee_set_fp_control(fpcw); + __fpu_control = fpu_control; /* update global copy */ - __fpu_control = fpu_control; /* update global copy */ + __ieee_set_fp_control(fpcw); } From 3acff87e5b4108a00f605f3d37edef3f7b37b976 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 31 May 1997 00:46:24 +0000 Subject: [PATCH 0897/4487] Tiny cleanups. --- sysdeps/unix/alpha/sysdep.S | 4 ++-- sysdeps/unix/sysv/linux/alpha/syscall.S | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S index 9df313422c..fc5cc0436b 100644 --- a/sysdeps/unix/alpha/sysdep.S +++ b/sysdeps/unix/alpha/sysdep.S @@ -38,7 +38,7 @@ __errno = errno .globl __syscall_error .ent __syscall_error __syscall_error: - ldgp gp, 0(t12) + ldgp gp, 0(pv) lda sp, -16(sp) .frame sp, 16, ra, 0 stq ra, 0(sp) @@ -53,7 +53,7 @@ __syscall_error: jsr ra, __errno_location /* Store the error value. */ - ldl t0, 8(sp) + ldq t0, 8(sp) stl t0, 0(v0) /* And kick back a -1. */ diff --git a/sysdeps/unix/sysv/linux/alpha/syscall.S b/sysdeps/unix/sysv/linux/alpha/syscall.S index 75e1260aea..d25dd6b51f 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscall.S +++ b/sysdeps/unix/sysv/linux/alpha/syscall.S @@ -62,10 +62,10 @@ LEAF(__syscall, 0) mov a5, a4 call_pal PAL_callsys /* Invoke system call */ - bne a3, error + bne a3, $error ret -error: +$error: #ifndef PROF br gp, 2f 2: ldgp gp, 0(gp) From ef490e68e82883fc6b0c2994a11cb88b74a130c3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 31 May 1997 00:46:33 +0000 Subject: [PATCH 0898/4487] Undef some bits we may have gotten from . --- sysdeps/unix/sysv/linux/alpha/gnu/types.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/gnu/types.h b/sysdeps/unix/sysv/linux/alpha/gnu/types.h index 5c1e407423..b23deb8aa4 100644 --- a/sysdeps/unix/sysv/linux/alpha/gnu/types.h +++ b/sysdeps/unix/sysv/linux/alpha/gnu/types.h @@ -68,6 +68,11 @@ typedef long int __clock_t; /* One element in the file descriptor mask array. */ typedef unsigned int __fd_mask; +/* Due to incaution, we may have gotten these from a kernel header file. */ +#undef __FD_SETSIZE +#undef __NFDBITS +#undef __FDMASK + /* Number of descriptors that can fit in an `fd_set'. */ #define __FD_SETSIZE 1024 From 68b8d6f1fd0a0a8227c556b9bea19e2dd1efa30d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 1 Jun 1997 10:48:17 +0000 Subject: [PATCH 0899/4487] (__fd_mask): Change type to `unsigned long int'. --- sysdeps/unix/sysv/linux/alpha/gnu/types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/gnu/types.h b/sysdeps/unix/sysv/linux/alpha/gnu/types.h index b23deb8aa4..2af77f70cf 100644 --- a/sysdeps/unix/sysv/linux/alpha/gnu/types.h +++ b/sysdeps/unix/sysv/linux/alpha/gnu/types.h @@ -66,7 +66,7 @@ typedef long int __swblk_t; /* Type of a swap block maybe? */ typedef long int __clock_t; /* One element in the file descriptor mask array. */ -typedef unsigned int __fd_mask; +typedef unsigned long int __fd_mask; /* Due to incaution, we may have gotten these from a kernel header file. */ #undef __FD_SETSIZE From d901ee0d08f38a6285eb2642c7df156a03b16072 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 4 Jun 1997 19:04:28 +0000 Subject: [PATCH 0900/4487] Change GCC's HUGE_VAL{,F,L} to use DI and SI mode integers instead of bytes. Fix value of HUGE_VALL. --- sysdeps/m68k/huge_val.h | 51 ++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 23 deletions(-) diff --git a/sysdeps/m68k/huge_val.h b/sysdeps/m68k/huge_val.h index 8d45aaec2b..c71454e9a8 100644 --- a/sysdeps/m68k/huge_val.h +++ b/sysdeps/m68k/huge_val.h @@ -26,15 +26,19 @@ /* IEEE positive infinity (-HUGE_VAL is negative infinity). */ -#define __HUGE_VAL_bytes { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 } - -#define __huge_val_t union { unsigned char __c[8]; double __d; } #ifdef __GNUC__ -#define HUGE_VAL (__extension__ \ - ((__huge_val_t) { __c: __HUGE_VAL_bytes }).__d) -#else /* Not GCC. */ -static __huge_val_t __huge_val = { __HUGE_VAL_bytes }; + +#define HUGE_VAL \ + (__extension__ \ + ((union { unsigned long long __l; double __d; }) \ + { __l: 0x7ff0000000000000ULL }).__d) + +#else /* not GCC */ + +static union { unsigned char __c[8]; double __d; } __huge_val = + { { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 } }; #define HUGE_VAL (__huge_val.__d) + #endif /* GCC. */ @@ -42,27 +46,28 @@ static __huge_val_t __huge_val = { __HUGE_VAL_bytes }; #ifdef __USE_ISOC9X -#define __HUGE_VALF_bytes { 0x7f, 0x80, 0, 0 } +#ifdef __GNUC__ -#define __huge_valf_t union { unsigned char __c[4]; float __f; } -#ifdef __GNUC__ -#define HUGE_VALF (__extension__ \ - ((__huge_valf_t) { __c: __HUGE_VALF_bytes }).__f) -#else /* Not GCC. */ -static __huge_valf_t __huge_valf = { __HUGE_VALF_bytes }; -#define HUGE_VALF (__huge_valf.__f) -#endif /* GCC. */ +#define HUGE_VALF \ + (__extension__ \ + ((union { unsigned long __l; float __f; }) \ + { __l: 0x7f800000UL }).__f) +#define HUGE_VALL \ + (__extension__ \ + ((union { unsigned long __l[3]; long double __ld; }) \ + { __l: { 0x7fff0000UL, 0x80000000UL, 0UL } }).__ld) -#define __HUGE_VALL_bytes { 0x7f, 0xff, 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0 } +#else /* not GCC */ -#define __huge_vall_t union { unsigned char __c[12]; long double __ld; } -#ifdef __GNUC__ -#define HUGE_VALL (__extension__ \ - ((__huge_vall_t) { __c: __HUGE_VALL_bytes }).__ld) -#else /* Not GCC. */ -static __huge_vall_t __huge_vall = { __HUGE_VALL_bytes }; +static union { unsigned char __c[4]; float __f; } __huge_valf = + { { 0x7f, 0x80, 0, 0 } }; +#define HUGE_VALF (__huge_valf.__f) + +static union { unsigned char __c[12]; long double __ld; } __huge_vall = + { { 0x7f, 0xff, 0, 0, 0x80, 0, 0, 0, 0, 0, 0, 0 } }; #define HUGE_VALL (__huge_vall.__ld) + #endif /* GCC. */ #endif /* __USE_ISOC9X. */ From 05a8f8e8c7f3ba9a98c6ac9c0823fa144e79d07e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 4 Jun 1997 19:05:00 +0000 Subject: [PATCH 0901/4487] m68k specific NaN value definitions. --- sysdeps/m68k/nan.h | 59 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 sysdeps/m68k/nan.h diff --git a/sysdeps/m68k/nan.h b/sysdeps/m68k/nan.h new file mode 100644 index 0000000000..b4efddfe91 --- /dev/null +++ b/sysdeps/m68k/nan.h @@ -0,0 +1,59 @@ +/* `NAN' constants for m68k. + Copyright (C) 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _NAN_H + +#define _NAN_H 1 + +/* IEEE Not A Number. */ + +#ifdef __GNUC__ + +#define NAN \ + (__extension__ \ + ((union { unsigned long long __l; double __d; }) \ + { __l: 0x7fffffffffffffffULL }).__d) + +#define NANF \ + (__extension__ \ + ((union { unsigned long __l; float __f; }) \ + { __l: 0x7fffffffUL }).__f) + +#define NANL \ + (__extension__ \ + ((union { unsigned long __l[3]; long double __ld; }) \ + { __l: { 0x7fff0000UL, 0xffffffffUL, 0xffffffffUL } }).__ld) + +#else + +static union { unsigned char __c[8]; double __d; } __nan = + { { 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } }; +#define NAN (__nan.__d) + +static union { unsigned char __c[4]; float __f; } __nanf = + { { 0x7f, 0xff, 0xff, 0xff } }; +#define NANF (__nanf.__f) + +static union { unsigned char __c[12]; long double __ld; } __nanl = + { { 0x7f, 0xff, 0, 0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } }; +#define NANL (__nanl.__ld) + +#endif /* GCC. */ + +#endif /* nan.h */ From c81b73ad0edaf89d659f53a3ac5ac3f7ab0d1f0b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 4 Jun 1997 19:05:10 +0000 Subject: [PATCH 0902/4487] (isgreater, isgreaterequal, isless, islessequal, islessgreater, isunordered): Fix assembler syntax. --- sysdeps/m68k/fpu/__math.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h index 5dc4d2e066..fd90a2de1b 100644 --- a/sysdeps/m68k/fpu/__math.h +++ b/sysdeps/m68k/fpu/__math.h @@ -414,7 +414,7 @@ __inline_forward(void,sincosl, #define isgreater(x, y) \ __extension__ \ ({ char __result; \ - __asm__ ("fcmp %2,%1; fsogt %0" \ + __asm__ ("fcmp%.x %2,%1; fsogt %0" \ : "=dm" (__result) : "f" (x), "f" (y)); \ (int) __result; }) @@ -422,7 +422,7 @@ __inline_forward(void,sincosl, #define isgreaterequal(x, y) \ __extension__ \ ({ char __result; \ - __asm__ ("fcmp %2,%1; fsoge %0" \ + __asm__ ("fcmp%.x %2,%1; fsoge %0" \ : "=dm" (__result) : "f" (x), "f" (y)); \ (int) __result; }) @@ -430,7 +430,7 @@ __inline_forward(void,sincosl, #define isless(x, y) \ __extension__ \ ({ char __result; \ - __asm__ ("fcmp %2,%1; fsolt %0" \ + __asm__ ("fcmp%.x %2,%1; fsolt %0" \ : "=dm" (__result) : "f" (x), "f" (y)); \ (int) __result; }) @@ -438,7 +438,7 @@ __inline_forward(void,sincosl, #define islessequal(x, y) \ __extension__ \ ({ char __result; \ - __asm__ ("fcmp %2,%1; fsole %0" \ + __asm__ ("fcmp%.x %2,%1; fsole %0" \ : "=dm" (__result) : "f" (x), "f" (y)); \ (int) __result; }) @@ -446,7 +446,7 @@ __inline_forward(void,sincosl, #define islessgreater(x, y) \ __extension__ \ ({ char __result; \ - __asm__ ("fcmp %2,%1; fsogl %0" \ + __asm__ ("fcmp%.x %2,%1; fsogl %0" \ : "=dm" (__result) : "f" (x), "f" (y)); \ (int) __result; }) @@ -454,7 +454,7 @@ __inline_forward(void,sincosl, #define isunordered(x, y) \ __extension__ \ ({ char __result; \ - __asm__ ("fcmp %2,%1; fsun %0" \ + __asm__ ("fcmp%.x %2,%1; fsun %0" \ : "=dm" (__result) : "f" (x), "f" (y)); \ (int) __result; }) #endif From d981488053a0093d9abee25b76f7484d4d0b4bed Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 4 Jun 1997 19:05:17 +0000 Subject: [PATCH 0903/4487] Do it right so that gcc doesn't optimize out the operations. --- sysdeps/m68k/fpu/fraiseexcpt.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/sysdeps/m68k/fpu/fraiseexcpt.c b/sysdeps/m68k/fpu/fraiseexcpt.c index b6ff82760d..51411dd292 100644 --- a/sysdeps/m68k/fpu/fraiseexcpt.c +++ b/sysdeps/m68k/fpu/fraiseexcpt.c @@ -34,9 +34,8 @@ feraiseexcept (int excepts) if (excepts & FE_INVALID) { /* One example of a invalid operation is 0 * Infinity. */ - double d = 0.0 * HUGE_VAL; - /* Now force the exception. */ - __asm__ __volatile__ ("fnop" : : "f" (d)); + double d = HUGE_VAL; + __asm__ __volatile__ ("fmul%.s %#0r0,%0; fnop" : "=f" (d) : "0" (d)); } /* Next: division by zero. */ @@ -49,26 +48,21 @@ feraiseexcept (int excepts) /* Next: overflow. */ if (excepts & FE_OVERFLOW) { - long double d = LDBL_MAX * LDBL_MAX; - /* Now force the exception. */ - __asm__ __volatile__ ("fnop" : : "f" (d)); + long double d = LDBL_MAX; + __asm__ __volatile__ ("fmul%.x %0,%0; fnop" : "=f" (d) : "0" (d)); } /* Next: underflow. */ if (excepts & FE_UNDERFLOW) { - long double d = LDBL_MIN / 16.0; - /* Now force the exception. */ - __asm__ __volatile__ ("fnop" : : "f" (d)); + long double d = LDBL_MIN; + __asm__ __volatile__ ("fdiv%.s %#0r16,%0; fnop" : "=f" (d) : "0" (d)); } /* Last: inexact. */ if (excepts & FE_INEXACT) { - long double d1, d2 = 1.0; - __asm__ __volatile__ ("fmovecr %#0,%0\n\t" - "fdiv%.x %1,%0\n\t" - "fnop" - : "=&f" (d1) : "f" (d2)); + long double d = 1.0; + __asm__ __volatile__ ("fdiv%.s %#0r3,%0; fnop" : "=f" (d) : "0" (d)); } } From 57771f202539444fcb51765443537c8d6c36a436 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 12 Jun 1997 21:22:18 +0000 Subject: [PATCH 0904/4487] brk implementation for ARM. --- sysdeps/unix/arm/brk.S | 43 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 sysdeps/unix/arm/brk.S diff --git a/sysdeps/unix/arm/brk.S b/sysdeps/unix/arm/brk.S new file mode 100644 index 0000000000..a801674283 --- /dev/null +++ b/sysdeps/unix/arm/brk.S @@ -0,0 +1,43 @@ +/* Copyright (C) 1991, 1992, 1993, 1995 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +#ifndef SYS_brk +#define SYS_brk 17 +#endif + +.data +.globl C_SYMBOL_NAME(__curbrk) +C_LABEL(__curbrk) +#ifdef HAVE_GNU_LD + .long C_SYMBOL_NAME(_end) +#else + .long C_SYMBOL_NAME(end) +#endif + +.text +SYSCALL__ (brk, 1) + ldr r1, _cb_addr + str r0, [r1] + mov r0, $0 + RETINSTR(mov, pc, r14) +_cb_addr: .long C_SYMBOL_NAME(__curbrk) + + +weak_alias (__brk, brk) From 7eff60903d26fe03739084f8f3baa816089f6d66 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 12 Jun 1997 21:23:19 +0000 Subject: [PATCH 0905/4487] ARM dependent assembler and low-level definitions. --- sysdeps/unix/arm/sysdep.S | 49 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 sysdeps/unix/arm/sysdep.S diff --git a/sysdeps/unix/arm/sysdep.S b/sysdeps/unix/arm/sysdep.S new file mode 100644 index 0000000000..5d3ad551c6 --- /dev/null +++ b/sysdeps/unix/arm/sysdep.S @@ -0,0 +1,49 @@ +/* Copyright (C) 1991, 92, 93, 94, 95, 96, 97 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#define _ERRNO_H +#include + +.globl C_SYMBOL_NAME(errno) +.globl syscall_error + +_errno_loc: .long C_SYMBOL_NAME(errno) + +#undef syscall_error +#ifdef NO_UNDERSCORES +__syscall_error: +#else +syscall_error: +#endif +#if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN + /* We translate the system's EWOULDBLOCK error into EAGAIN. + The GNU C library always defines EWOULDBLOCK==EAGAIN. + EWOULDBLOCK_sys is the original number. */ + cmp r0, $EWOULDBLOCK_sys /* Is it the old EWOULDBLOCK? */ + moveq r0, $EAGAIN /* Yes; translate it to EAGAIN. */ +#endif +#ifndef PIC + ldr r1, _errno_loc + str r0, [r1] +#endif + mvn r0, $0 + RETINSTR(mov, pc, r14) + +#undef __syscall_error +END (__syscall_error) From b357c75c05154cdc7092ebafb30c7dcdd7b93286 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 12 Jun 1997 21:24:27 +0000 Subject: [PATCH 0906/4487] ARM/Linux dependent assembler and low-level definitions. --- sysdeps/unix/sysv/linux/arm/sysdep.S | 51 ++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/sysdep.S diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.S b/sysdeps/unix/sysv/linux/arm/sysdep.S new file mode 100644 index 0000000000..a71181c911 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/sysdep.S @@ -0,0 +1,51 @@ +/* Copyright (C) 1995, 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +/* We define errno here, to be consistent with Linux/i386. */ + .bss + .globl errno + .type errno,@object + .size errno,4 +errno: .zero 4 + .globl _errno + .type _errno,@object +_errno = errno /* This name is expected by hj's libc.so.5 startup code. */ + .text + +/* The following code is only used in the shared library when we + compile the reentrant version. Otherwise each system call defines + each own version. */ + +#ifndef PIC + +/* The syscall stubs jump here when they detect an error. + The code for Linux is almost identical to the canonical Unix/i386 + code, except that the error number in %eax is negated. */ + +#undef CALL_MCOUNT +#define CALL_MCOUNT /* Don't insert the profiling call, it clobbers %eax. */ + +ENTRY (__syscall_error) + mvn r0, r0 + +#define __syscall_error __syscall_error_1 +#include + +#endif /* !PIC */ From 44d86bcbfbcf395253871de0ed3ad580a05021f6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 19 Jun 1997 19:03:16 +0000 Subject: [PATCH 0907/4487] Rename __rinttol to __lrint and rinttol to lrint. --- sysdeps/m68k/fpu/__math.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h index fd90a2de1b..bdeaa9efb0 100644 --- a/sysdeps/m68k/fpu/__math.h +++ b/sysdeps/m68k/fpu/__math.h @@ -309,7 +309,7 @@ __inline_functions (float,f) __inline_functions (long double,l) #undef __inline_functions -__m81_defun (long int, __rinttol, (long double __x)) +__m81_defun (long int, __lrint, (long double __x)) { long int __result; __asm ("fmove%.l %1, %0" : "=dm" (__result) : "f" (__x)); @@ -391,7 +391,7 @@ __inline_forward_c(int,ilogbl, (long double __value), (__value)) #endif #ifdef __USE_ISOC9X __inline_forward_c(long double,nearbyintl, (long double __value), (__value)) -__inline_forward_c(long int,rinttol, (long double __value), (__value)) +__inline_forward_c(long int,lrint, (long double __value), (__value)) #endif #ifdef __USE_GNU __inline_forward(void,sincosl, From 3f6db749348086451994ce50a6505f7bb91a0643 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 19 Jun 1997 19:04:35 +0000 Subject: [PATCH 0908/4487] Implementation of m68k specific llrint function. --- sysdeps/m68k/fpu/s_llrint.c | 62 +++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 sysdeps/m68k/fpu/s_llrint.c diff --git a/sysdeps/m68k/fpu/s_llrint.c b/sysdeps/m68k/fpu/s_llrint.c new file mode 100644 index 0000000000..f5d0d51122 --- /dev/null +++ b/sysdeps/m68k/fpu/s_llrint.c @@ -0,0 +1,62 @@ +/* Round argument to nearest integral value according to current rounding + direction. + Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Schwab + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#define __LIBC_M81_MATH_INLINES +#include +#include "math_private.h" + +long long int +__llrint (long double x) +{ + int32_t se, sx; + u_int32_t h, l; + long long int result; + + x = __m81_u(__rintl) (x); + + /* We could use __fixxfdi from libgcc, but here we can take advantage of + the known floating point format. */ + GET_LDOUBLE_WORDS (se, h, l, x); + + sx = se & (1 << 15); + se = (se ^ sx) - 0x3fff; + + if (se < 64) + { + if (se > 31) + result = (((long long int) (h >> (63 - se)) << 32) + | (l >> (63 - se)) | (h << (se - 31))); + else + result = h >> (31 - se); + if (sx) + result = -result; + } + else + /* Too large. The number is either +-inf or NaN or it is too + large to be effected by rounding. The standard leaves it + undefined what to return when the number is too large to fit in + a `long long int'. */ + result = -1LL; + + return result; +} + +weak_alias (__llrint, llrint) From fd945ccbb427eb64ad22fec98c68d5b9522054f9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 19 Jun 1997 19:04:45 +0000 Subject: [PATCH 0909/4487] Implementation of m68k specific lrint function. --- sysdeps/m68k/fpu/s_lrint.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 sysdeps/m68k/fpu/s_lrint.c diff --git a/sysdeps/m68k/fpu/s_lrint.c b/sysdeps/m68k/fpu/s_lrint.c new file mode 100644 index 0000000000..a7044113af --- /dev/null +++ b/sysdeps/m68k/fpu/s_lrint.c @@ -0,0 +1,31 @@ +/* Round argument to nearest integral value according to current rounding + direction. + Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Schwab + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#define __LIBC_M81_MATH_INLINES +#include + +long int +__lrint (long double x) +{ + return __m81_u(__lrint) (x); +} + +weak_alias (__lrint, lrint) From b09d8d6fc8b13ee9edd38eea1859c7e6ffb0a9ef Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 19 Jun 1997 19:04:54 +0000 Subject: [PATCH 0910/4487] Renamed to lrint. --- sysdeps/m68k/fpu/s_rinttol.c | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 sysdeps/m68k/fpu/s_rinttol.c diff --git a/sysdeps/m68k/fpu/s_rinttol.c b/sysdeps/m68k/fpu/s_rinttol.c deleted file mode 100644 index 7476d785a6..0000000000 --- a/sysdeps/m68k/fpu/s_rinttol.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Round argument to nearest integral value according to current rounding - direction. - Copyright (C) 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Schwab - - 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 - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#define __LIBC_M81_MATH_INLINES -#include - -long int -__rinttol (long double x) -{ - return __m81_u(__rinttol) (x); -} - -weak_alias (__rinttol, rinttol) From a3baa80ed703280692c04d489cf6f6af11558312 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 19 Jun 1997 19:04:58 +0000 Subject: [PATCH 0911/4487] Renamed to s_llrint. --- sysdeps/m68k/fpu/s_rinttoll.c | 62 ----------------------------------- 1 file changed, 62 deletions(-) delete mode 100644 sysdeps/m68k/fpu/s_rinttoll.c diff --git a/sysdeps/m68k/fpu/s_rinttoll.c b/sysdeps/m68k/fpu/s_rinttoll.c deleted file mode 100644 index bad8082bd1..0000000000 --- a/sysdeps/m68k/fpu/s_rinttoll.c +++ /dev/null @@ -1,62 +0,0 @@ -/* Round argument to nearest integral value according to current rounding - direction. - Copyright (C) 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Schwab - - 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 - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#define __LIBC_M81_MATH_INLINES -#include -#include "math_private.h" - -long long int -__rinttoll (long double x) -{ - int32_t se, sx; - u_int32_t h, l; - long long int result; - - x = __m81_u(__rintl) (x); - - /* We could use __fixxfdi from libgcc, but here we can take advantage of - the known floating point format. */ - GET_LDOUBLE_WORDS (se, h, l, x); - - sx = se & (1 << 15); - se = (se ^ sx) - 0x3fff; - - if (se < 64) - { - if (se > 31) - result = (((long long int) (h >> (63 - se)) << 32) - | (l >> (63 - se)) | (h << (se - 31))); - else - result = h >> (31 - se); - if (sx) - result = -result; - } - else - /* Too large. The number is either +-inf or NaN or it is too - large to be effected by rounding. The standard leaves it - undefined what to return when the number is too large to fit in - a `long long int'. */ - result = -1LL; - - return result; -} - -weak_alias (__rinttoll, rinttoll) From 0dab1d3494ebb5736752e3f51d1e8f602fa52565 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 19 Jun 1997 19:05:14 +0000 Subject: [PATCH 0912/4487] Remove FIXME and special case for quotient. --- sysdeps/m68k/fpu/s_remquo.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/sysdeps/m68k/fpu/s_remquo.c b/sysdeps/m68k/fpu/s_remquo.c index 3682ba7896..0332eccfd0 100644 --- a/sysdeps/m68k/fpu/s_remquo.c +++ b/sysdeps/m68k/fpu/s_remquo.c @@ -37,18 +37,9 @@ s(__remquo) (float_type x, float_type y, int *quo) float_type result; int cquo, fpsr; - /* FIXME: Which of frem and fmod is correct? */ -#if 1 __asm ("frem%.x %2,%0\n\tfmove%.l %/fpsr,%1" : "=f" (result), "=dm" (fpsr) : "f" (y), "0" (x)); cquo = (fpsr >> 16) & 0x7f; - if ((result > 0) != (x > 0)) - cquo--; -#else - __asm ("fmod%.x %2,%0\n\tfmove%.l %/fpsr,%1" - : "=f" (result), "=dm" (fpsr) : "f" (y), "0" (x)); - cquo = (fpsr >> 16) & 0x7f; -#endif if (fpsr & (1 << 23)) cquo = -cquo; *quo = cquo; From 980b25cae473ba2bcf352ff053f6e8e9d4f50665 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 19 Jun 1997 19:09:33 +0000 Subject: [PATCH 0913/4487] Describe Linux/ARM specific extra files. --- sysdeps/unix/sysv/linux/arm/Dist | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/arm/Dist diff --git a/sysdeps/unix/sysv/linux/arm/Dist b/sysdeps/unix/sysv/linux/arm/Dist new file mode 100644 index 0000000000..738b9cc542 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/Dist @@ -0,0 +1 @@ +clone.S From fdad844df43f564aff967e43a3c963b8ac241b1f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 01:13:01 +0000 Subject: [PATCH 0914/4487] Get sigcontext via instead. --- sysdeps/unix/sysv/linux/arm/profil-counter.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/arm/profil-counter.h b/sysdeps/unix/sysv/linux/arm/profil-counter.h index a915da7788..802cbd5d63 100644 --- a/sysdeps/unix/sysv/linux/arm/profil-counter.h +++ b/sysdeps/unix/sysv/linux/arm/profil-counter.h @@ -17,7 +17,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include +#include void profil_counter (int signo, struct sigcontext sc) From 405916ef4b982504fd1e32895bb85a7e914cffaa Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 01:37:20 +0000 Subject: [PATCH 0915/4487] -> . --- sysdeps/alpha/w_sqrt.S | 2 +- sysdeps/arm/__longjmp.S | 2 +- sysdeps/arm/setjmp.S | 2 +- sysdeps/standalone/close.c | 2 +- sysdeps/standalone/filedesc.h | 2 +- sysdeps/standalone/open.c | 2 +- sysdeps/unix/bsd/m68k/sysdep.S | 2 +- sysdeps/unix/bsd/osf/sys/mman.h | 2 +- sysdeps/unix/bsd/ultrix4/sys/mman.h | 2 +- sysdeps/unix/bsd/vax/sysdep.S | 2 +- sysdeps/unix/mips/sysdep.S | 2 +- sysdeps/unix/sysv/irix4/sys/mman.h | 2 +- sysdeps/unix/sysv/linux/alpha/brk.S | 2 +- sysdeps/unix/sysv/linux/alpha/clone.S | 2 +- sysdeps/unix/sysv/linux/arm/clone.S | 2 +- sysdeps/unix/sysv/linux/m68k/clone.S | 2 +- sysdeps/unix/sysv/sco3.2.4/sysconf.S | 2 +- sysdeps/unix/sysv/sysv4/i386/sysdep.h | 2 +- sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/sysdeps/alpha/w_sqrt.S b/sysdeps/alpha/w_sqrt.S index cf5ae097fd..32b06887d5 100644 --- a/sysdeps/alpha/w_sqrt.S +++ b/sysdeps/alpha/w_sqrt.S @@ -25,7 +25,7 @@ #ifndef _IEEE_FP #define _ERRNO_H -#include +#include #include .set noreorder diff --git a/sysdeps/arm/__longjmp.S b/sysdeps/arm/__longjmp.S index 5443761f0a..b027103d60 100644 --- a/sysdeps/arm/__longjmp.S +++ b/sysdeps/arm/__longjmp.S @@ -19,7 +19,7 @@ #include #define _ASM -#include +#include /* __longjmp(jmpbuf, val) */ diff --git a/sysdeps/arm/setjmp.S b/sysdeps/arm/setjmp.S index 5891cb9dec..8f99e4fcb4 100644 --- a/sysdeps/arm/setjmp.S +++ b/sysdeps/arm/setjmp.S @@ -19,7 +19,7 @@ #include #define _ASM -#include +#include /* Binary compatibility entry point. */ ENTRY (__setjmp) diff --git a/sysdeps/standalone/close.c b/sysdeps/standalone/close.c index 7ef1a5f878..2d92937ec1 100644 --- a/sysdeps/standalone/close.c +++ b/sysdeps/standalone/close.c @@ -22,7 +22,7 @@ Cambridge, MA 02139, USA. */ #include #include -#include +#include #include "filedesc.h" /* Close the file descriptor FD. */ diff --git a/sysdeps/standalone/filedesc.h b/sysdeps/standalone/filedesc.h index bf3b6a9f0c..e4b8d6545e 100644 --- a/sysdeps/standalone/filedesc.h +++ b/sysdeps/standalone/filedesc.h @@ -27,7 +27,7 @@ Cambridge, MA 02139, USA. */ #ifndef __FILEDESC_h #define __FILEDESC_h -#include +#include #ifndef __DECLARE_FILE_DESCRIPTORS__ #define FILEDESC_EXTERN extern diff --git a/sysdeps/standalone/open.c b/sysdeps/standalone/open.c index 87097d9cb0..b61b729ca6 100644 --- a/sysdeps/standalone/open.c +++ b/sysdeps/standalone/open.c @@ -25,7 +25,7 @@ Cambridge, MA 02139, USA. */ #include #include -#include +#include #include #define __DECLARE_FILE_DESCRIPTORS__ diff --git a/sysdeps/unix/bsd/m68k/sysdep.S b/sysdeps/unix/bsd/m68k/sysdep.S index cef8990eea..1be2d5a23f 100644 --- a/sysdeps/unix/bsd/m68k/sysdep.S +++ b/sysdeps/unix/bsd/m68k/sysdep.S @@ -17,7 +17,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #define _ERRNO_H -#include +#include .globl syscall_error syscall_error: diff --git a/sysdeps/unix/bsd/osf/sys/mman.h b/sysdeps/unix/bsd/osf/sys/mman.h index 6dc3e4e0cf..72846195d2 100644 --- a/sysdeps/unix/bsd/osf/sys/mman.h +++ b/sysdeps/unix/bsd/osf/sys/mman.h @@ -22,7 +22,7 @@ #define _SYS_MMAN_H 1 #include -#include +#include #define __need_size_t #include diff --git a/sysdeps/unix/bsd/ultrix4/sys/mman.h b/sysdeps/unix/bsd/ultrix4/sys/mman.h index 2d3c8fe2ef..989bf21754 100644 --- a/sysdeps/unix/bsd/ultrix4/sys/mman.h +++ b/sysdeps/unix/bsd/ultrix4/sys/mman.h @@ -22,7 +22,7 @@ #define _SYS_MMAN_H 1 #include -#include +#include #define __need_size_t #include diff --git a/sysdeps/unix/bsd/vax/sysdep.S b/sysdeps/unix/bsd/vax/sysdep.S index 618d889742..b5b76aaba5 100644 --- a/sysdeps/unix/bsd/vax/sysdep.S +++ b/sysdeps/unix/bsd/vax/sysdep.S @@ -17,7 +17,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #define _ERRNO_H -#include +#include .globl _errno .globl syscall_error diff --git a/sysdeps/unix/mips/sysdep.S b/sysdeps/unix/mips/sysdep.S index f17ba44341..1791801ec5 100644 --- a/sysdeps/unix/mips/sysdep.S +++ b/sysdeps/unix/mips/sysdep.S @@ -18,7 +18,7 @@ Cambridge, MA 02139, USA. */ #include #define _ERRNO_H -#include +#include /* .globl errno */ .set noreorder diff --git a/sysdeps/unix/sysv/irix4/sys/mman.h b/sysdeps/unix/sysv/irix4/sys/mman.h index 9ceca1fe96..f42a9f67aa 100644 --- a/sysdeps/unix/sysv/irix4/sys/mman.h +++ b/sysdeps/unix/sysv/irix4/sys/mman.h @@ -22,7 +22,7 @@ #define _SYS_MMAN_H 1 #include -#include +#include #define __need_size_t #include diff --git a/sysdeps/unix/sysv/linux/alpha/brk.S b/sysdeps/unix/sysv/linux/alpha/brk.S index be0539b475..6f994937d3 100644 --- a/sysdeps/unix/sysv/linux/alpha/brk.S +++ b/sysdeps/unix/sysv/linux/alpha/brk.S @@ -23,7 +23,7 @@ #include #define _ERRNO_H -#include +#include #ifdef PIC .section .bss diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S index aab4e590a5..3f097fe068 100644 --- a/sysdeps/unix/sysv/linux/alpha/clone.S +++ b/sysdeps/unix/sysv/linux/alpha/clone.S @@ -22,7 +22,7 @@ #include #define _ERRNO_H 1 -#include +#include /* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg) */ diff --git a/sysdeps/unix/sysv/linux/arm/clone.S b/sysdeps/unix/sysv/linux/arm/clone.S index c7e7aed9c8..8125ebff20 100644 --- a/sysdeps/unix/sysv/linux/arm/clone.S +++ b/sysdeps/unix/sysv/linux/arm/clone.S @@ -21,7 +21,7 @@ #include #define _ERRNO_H 1 -#include +#include /* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg); */ diff --git a/sysdeps/unix/sysv/linux/m68k/clone.S b/sysdeps/unix/sysv/linux/m68k/clone.S index ef9716d979..d553ab78c6 100644 --- a/sysdeps/unix/sysv/linux/m68k/clone.S +++ b/sysdeps/unix/sysv/linux/m68k/clone.S @@ -21,7 +21,7 @@ #include #define _ERRNO_H 1 -#include +#include /* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg); */ diff --git a/sysdeps/unix/sysv/sco3.2.4/sysconf.S b/sysdeps/unix/sysv/sco3.2.4/sysconf.S index 631e5e977a..44c89f2cf8 100644 --- a/sysdeps/unix/sysv/sco3.2.4/sysconf.S +++ b/sysdeps/unix/sysv/sco3.2.4/sysconf.S @@ -17,7 +17,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#include +#include .globl __tzname_max ENTRY (__sysconf) diff --git a/sysdeps/unix/sysv/sysv4/i386/sysdep.h b/sysdeps/unix/sysv/sysv4/i386/sysdep.h index 1e0cd69f74..ad262e23de 100644 --- a/sysdeps/unix/sysv/sysv4/i386/sysdep.h +++ b/sysdeps/unix/sysv/sysv4/i386/sysdep.h @@ -24,7 +24,7 @@ Cambridge, MA 02139, USA. */ #ifndef _ERRNO_H #define _ERRNO_H #endif -#include +#include #undef PSEUDO #define PSEUDO(name, syscall_name, args) \ diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S index da3cd6b8be..edefad0168 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S @@ -18,7 +18,7 @@ Cambridge, MA 02139, USA. */ #include #define _ERRNO_H -#include +#include ENTRY(syscall_error) /* If it was a syscall that got interrupted, but can From b836323e96b696480871374012f29f986979c1eb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 01:41:15 +0000 Subject: [PATCH 0916/4487] Dynamic loader for Hurd/MIPS. --- sysdeps/mach/hurd/mips/dl-machine.c | 131 ++++++++++++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 sysdeps/mach/hurd/mips/dl-machine.c diff --git a/sysdeps/mach/hurd/mips/dl-machine.c b/sysdeps/mach/hurd/mips/dl-machine.c new file mode 100644 index 0000000000..18261e1115 --- /dev/null +++ b/sysdeps/mach/hurd/mips/dl-machine.c @@ -0,0 +1,131 @@ +/* Operating system support for run-time dynamic linker. MIPS specific + stuffs on Hurd. + Copyright (C) 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "../stdio-common/_itoa.h" +#include +#include +#include + +void weak_function +abort (void) +{ + _exit (127); +} + + +#include +#include +#include + +#undef _ +#define _(x) x + +/* Return a string describing the errno code in ERRNUM. */ +char * weak_function +_strerror_internal (int errnum, char *buf, size_t buflen) +{ + int system; + int sub; + int code; + const struct error_system *es; + extern void __mach_error_map_compat (int *); + + __mach_error_map_compat (&errnum); + + system = err_get_system (errnum); + sub = err_get_sub (errnum); + code = err_get_code (errnum); + + if (system > err_max_system || ! __mach_error_systems[system].bad_sub) + { + const char *unk = _("Error in unknown error system: "); + const size_t unklen = strlen (unk); + char *p = buf + buflen; + *--p = '\0'; + p = _itoa (errnum, p, 16, 1); + return memcpy (p - unklen, unk, unklen); + } + + es = &__mach_error_systems[system]; + + if (sub >= es->max_sub) + return (char *) es->bad_sub; + + if (code >= es->subsystem[sub].max_code) + { + const char *unk = _("Unknown error "); + const size_t unklen = strlen (unk); + char *p = buf + buflen; + size_t len = strlen (es->subsystem[sub].subsys_name); + *--p = '\0'; + p = _itoa (errnum, p, 16, 1); + *p-- = ' '; + p = memcpy (p - len, es->subsystem[sub].subsys_name, len); + return memcpy (p - unklen, unk, unklen); + } + + return (char *) _(es->subsystem[sub].codes[code]); +} + +/* Read the whole contents of FILE into new mmap'd space with given + protections. The size of the file is returned in SIZE. */ +void * +_dl_sysdep_read_whole_file (const char *file, size_t *size, int prot) +{ + struct stat stat; + mach_port_t memobj_rd; + void *contents; + error_t err; + + memobj_rd = __open (file, O_RDONLY, 0); + if (memobj_rd) + { + err = __io_stat ((file_t) memobj_rd, &stat); + if (err) + { + __hurd_fail (err); + contents = 0; + } + else + { + /* Map a copy of the file contents. */ + contents = __mmap (0, stat.st_size, prot, MAP_COPY, memobj_rd, 0); + if (contents == (void *)-1) + contents = 0; + else + *size = stat.st_size; + } + + __mach_port_deallocate (__mach_task_self (), memobj_rd); + } + else + contents = 0; + + return contents; +} From 304f5963db3b40ad1ac20d15bdc0329d0a163710 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 01:41:58 +0000 Subject: [PATCH 0917/4487] Init code for Hurd/MIPS. --- sysdeps/mach/hurd/mips/init-fault.c | 41 +++ sysdeps/mach/hurd/mips/init-first.c | 407 ++++++++++++++++++++++++++++ 2 files changed, 448 insertions(+) create mode 100644 sysdeps/mach/hurd/mips/init-fault.c create mode 100644 sysdeps/mach/hurd/mips/init-first.c diff --git a/sysdeps/mach/hurd/mips/init-fault.c b/sysdeps/mach/hurd/mips/init-fault.c new file mode 100644 index 0000000000..619ef996a9 --- /dev/null +++ b/sysdeps/mach/hurd/mips/init-fault.c @@ -0,0 +1,41 @@ +/* Set up a thread_state for proc_handle_exceptions. MIPS version. + Copyright (C) 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include +#include + +extern jmp_buf _hurd_sigthread_fault_env; + +static char fault_stack[32]; +static volatile void +faulted (void) +{ + __longjmp (_hurd_sigthread_fault_env, 1); +} + +void +_hurd_initialize_fault_recovery_state (void *state) +{ + struct mips_thread_state *ts = state; + memset (ts, 0, sizeof (*ts)); + ts->r29 = (int) &fault_stack[sizeof (fault_stack)]; + ts->pc = (int) &faulted; +} diff --git a/sysdeps/mach/hurd/mips/init-first.c b/sysdeps/mach/hurd/mips/init-first.c new file mode 100644 index 0000000000..b057aeb097 --- /dev/null +++ b/sysdeps/mach/hurd/mips/init-first.c @@ -0,0 +1,407 @@ +/* Initialization code run first thing by the ELF startup code. For Mips/Hurd. + Copyright (C) 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include +#include +#include "hurdstartup.h" +#include "set-hooks.h" +#include "hurdmalloc.h" /* XXX */ + +extern void __mach_init (void); +extern void __libc_init (int, char **, char **); +extern void __getopt_clean_environment (void); +extern void __libc_global_ctors (void); + +unsigned int __hurd_threadvar_max; +unsigned long int __hurd_threadvar_stack_offset; +unsigned long int __hurd_threadvar_stack_mask; + +int __libc_multiple_libcs = 1; + +int __libc_argc; +char **__libc_argv; + +/* We often need the PID. Cache this value. */ +pid_t __libc_pid; + +void *(*_cthread_init_routine) (void); /* Returns new SP to use. */ +void (*_cthread_exit_routine) (int status) __attribute__ ((__noreturn__)); + + +/* Things that want to be run before _hurd_init or much anything else. + Importantly, these are called before anything tries to use malloc. */ +DEFINE_HOOK (_hurd_preinit_hook, (void)); + +static void +init1 (int argc, char *arg0, ...) +{ + char **argv = &arg0; + char **envp = &argv[argc + 1]; + struct hurd_startup_data *d; + + __libc_argc = argc; + __libc_argv = argv; + __environ = envp; + while (*envp) + ++envp; + d = (void *) ++envp; + + /* If we are the bootstrap task started by the kernel, + then after the environment pointers there is no Hurd + data block; the argument strings start there. */ + if ((void *) d != argv[0]) + { + _hurd_init_dtable = d->dtable; + _hurd_init_dtablesize = d->dtablesize; + + { + /* Check if the stack we are now on is different from + the one described by _hurd_stack_{base,size}. */ + + char dummy; + const vm_address_t newsp = (vm_address_t) &dummy; + + if (d->stack_size != 0 && (newsp < d->stack_base || + newsp - d->stack_base > d->stack_size)) + /* The new stack pointer does not intersect with the + stack the exec server set up for us, so free that stack. */ + __vm_deallocate (__mach_task_self (), d->stack_base, d->stack_size); + } + } + + if (__hurd_threadvar_stack_mask == 0) + { + /* We are not using cthreads, so we will have just a single allocated + area for the per-thread variables of the main user thread. */ + unsigned long int i; + __hurd_threadvar_stack_offset + = (unsigned long int) malloc (__hurd_threadvar_max * + sizeof (unsigned long int)); + if (__hurd_threadvar_stack_offset == 0) + __libc_fatal ("Can't allocate single-threaded per-thread variables."); + for (i = 0; i < __hurd_threadvar_max; ++i) + ((unsigned long int *) __hurd_threadvar_stack_offset)[i] = 0; + } + + if ((void *) d != argv[0] && (d->portarray || d->intarray)) + /* Initialize library data structures, start signal processing, etc. */ + _hurd_init (d->flags, argv, + d->portarray, d->portarraysize, + d->intarray, d->intarraysize); + + __libc_init (argc, argv, __environ); + + /* This is a hack to make the special getopt in GNU libc working. */ + __getopt_clean_environment (); + +#ifdef PIC + __libc_global_ctors (); +#endif + + (void) &init1; +} + +static void * +__init (int *data) +{ + int argc = *data; + char **argv = (void *) (data + 1); + char **envp = &argv[argc + 1]; + struct hurd_startup_data *d; + + __environ = envp; + while (*envp) + ++envp; + d = (void *) ++envp; + + /* The user might have defined a value for this, to get more variables. + Otherwise it will be zero on startup. We must make sure it is set + properly before before cthreads initialization, so cthreads can know + how much space to leave for thread variables. */ + if (__hurd_threadvar_max < _HURD_THREADVAR_MAX) + __hurd_threadvar_max = _HURD_THREADVAR_MAX; + + + /* After possibly switching stacks, call `init1' (above) with the user + code as the return address, and the argument data immediately above + that on the stack. */ + + if (_cthread_init_routine) + { + /* Initialize cthreads, which will allocate us a new stack to run on. */ + void *newsp = (*_cthread_init_routine) (); + struct hurd_startup_data *od; + + /* Copy the argdata from the old stack to the new one. */ + newsp = memcpy (newsp - ((char *) &d[1] - (char *) data), data, + (char *) d - (char *) data); + + /* Set up the Hurd startup data block immediately following + the argument and environment pointers on the new stack. */ + od = (newsp + ((char *) d - (char *) data)); + if ((void *) argv[0] == d) + /* We were started up by the kernel with arguments on the stack. + There is no Hurd startup data, so zero the block. */ + memset (od, 0, sizeof *od); + else + /* Copy the Hurd startup data block to the new stack. */ + *od = *d; + + /* Push the user code address on the top of the new stack. It will + be the return address for `init1'; we will jump there with NEWSP + as the stack pointer. */ + return newsp; + } + + /* The argument data is just above the stack frame we will unwind by + returning. */ + return (void *) data; + + (void) &__init; +} + +#ifdef PIC +/* This function is called to initialize the shared C library. + It is called just before the user _start code from mips/elf/start.S, + with the stack set up as that code gets it. */ + +/* NOTE! The linker notices the magical name `_init' and sets the DT_INIT + pointer in the dynamic section based solely on that. It is convention + for this function to be in the `.init' section, but the symbol name is + the only thing that really matters!! */ +/*void _init (int argc, ...) __attribute__ ((unused, section (".init")));*/ + +#if __mips64 +asm ("\ + .section .init,\"ax\",@progbits\n\ + .align 3\n\ + .globl _init\n\ + .type _init,@function\n\ + .ent _init\n\ +_init:\n\ + .set noreorder\n\ + .cpload $25\n\ + .set reorder\n\ + dsubu $29, 8*8\n\ + .cprestore 6*8\n\ + sd $16, 4*8($29)\n\ + sd $31, 5*8($29)\n\ + jal preinit\n\ + sd $28, 6*8($29)\n\ + move $16, $29 # Save the old stack pointer to s0 ($16)\n\ + daddu $4, $29, 4*8 + jal __init\n\ + # Restore saved registers from the old stack.\n\ + ld $28, 6*8($16)\n\ + ld $31, 5*8($16)\n\ + ld $16, 4*8($16)\n\ + move $29, $2 # set new sp to SP\n\ +call_init1:\n\ + ld $4, 0($29)\n\ + ld $5, 1*8($29)\n\ + ld $6, 2*8($29)\n\ + ld $7, 3*8($29)\n\ + dla $25, init1\n\ + jr $25\n\ + .end _init\n\ + .text\n\ +"); +#else +asm ("\ + .section .init,\"ax\",@progbits\n\ + .align 2\n\ + .globl _init\n\ + .type _init,@function\n\ + .ent _init\n\ +_init:\n\ + .set noreorder\n\ + .cpload $25\n\ + .set reorder\n\ + subu $29, 32\n\ + .cprestore 24\n\ + sw $16, 16($29)\n\ + sw $31, 20($29)\n\ + jal preinit\n\ + sw $28, 24($29)\n\ + move $16, $29 # Save the old stack pointer to s0 ($16)\n\ + addu $4, $29, 32 + jal __init\n\ + # Restore saved registers from the old stack.\n\ + lw $28, 24($16)\n\ + lw $31, 20($16)\n\ + lw $16, 16($16)\n\ + move $29, $2 # set new sp to SP\n\ +call_init1:\n\ + lw $4, 0($29)\n\ + lw $5, 4($29)\n\ + lw $6, 8($29)\n\ + lw $7, 12($29)\n\ + la $25, init1\n\ + jr $25\n\ + .end _init\n\ + .text\n\ +"); +#endif + +static void +preinit (void) +{ + /* Initialize data structures so we can do RPCs. */ + __mach_init (); + + RUN_HOOK (_hurd_preinit_hook, ()); + + (void) &preinit; +} + +void __libc_init_first (int argc, ...) +{ +} +#endif + +#ifndef PIC +/* An assembler code wrapping c function __init. */ +#ifdef __mips64 +asm ("\ + .text\n\ + .align 3\n\ +init:\n\ + dsubu $29, 8*8\n\ + sd $16, 4*8($29)\n\ + sd $31, 5*8($29)\n\ + move $16, $29\n\ + jal __init\n\ + ld $31, 5*8($16)\n\ + ld $16, 4*8($16)\n\ + move $29, $2 # set new sp to SP\n\ +call_init1:\n\ + ld $4, 0($29)\n\ + ld $5, 1*8($29)\n\ + ld $6, 2*8($29)\n\ + ld $7, 3*8($29)\n\ + dla $25, init1\n\ + jr $25\n\ +"); +#else +asm ("\ + .text\n\ + .align 2\n\ +init:\n\ + subu $29, 32\n\ + sw $16, 16($29)\n\ + sw $31, 20($29)\n\ + move $16, $29\n\ + jal __init\n\ + lw $31, 20($16)\n\ + lw $16, 16($16)\n\ + move $29, $2 # set new sp to SP\n\ +call_init1:\n\ + lw $4, 0($29)\n\ + lw $5, 4($29)\n\ + lw $6, 8($29)\n\ + lw $7, 12($29)\n\ + la $25, init1\n\ + jr $25\n\ +"); +#endif + +/* An assembler code wrapping c function ___libc_init_first. + ___libc_init_first does an RPC call to flush cache to put doinit + function on the stack, so we should call __mach_init first in + this wrap. */ +#ifdef __mips64 +asm ("\ + .text\n\ + .align 3\n\ + .globl __libc_init_first\n\ +__libc_init_first:\n\ + dsubu $29, 8\n\ + sd $31, 0($29) + jal __mach_init\n\ + ld $4, 0($29) + ld $5, 1*8($29) + ld $6, 2*8($29) + ld $7, 3*8($29) + j ___libc_init_first\n\ +"); +#else +asm ("\ + .text\n\ + .align 2\n\ + .globl __libc_init_first\n\ +__libc_init_first:\n\ + subu $29, 4\n\ + sw $31, 0($29) + jal __mach_init\n\ + lw $4, 0($29) + lw $5, 4($29) + lw $6, 8($29) + lw $7, 12($29) + j ___libc_init_first\n\ +"); +#endif + +static void +___libc_init_first (int return_addr, int argc, ...) +{ + void doinit (int *data) + { +#if 0 + /* This function gets called with the argument data at TOS. */ + void doinit1 (int argc, ...) + { + init (&argc); + } +#endif + extern void init (int *data); + + /* Push the user return address after the argument data, and then + jump to `doinit1' (above), so it is as if __libc_init_first's + caller had called `init' with the argument data already on the + stack. */ + *--data = return_addr; + +#ifdef __mips64 + asm volatile ("ld $31, 0(%0)\n" /* Load the original return address. */ + "daddu $29, %0, 8\n" /* Switch to new outermost stack. */ + "move $4, $29\n" + "jr %1" : : "r" (data), "r" (&init)); +#else + asm volatile ("lw $31, 0(%0)\n" /* Load the original return address. */ + "addu $29, %0, 4\n" /* Switch to new outermost stack. */ + "move $4, $29\n" + "jr %1" : : "r" (data), "r" (&init)); +#endif + /* NOTREACHED */ + } + +#if 0 + /* Initialize data structures so we can do RPCs. */ + __mach_init (); +#endif + + RUN_HOOK (_hurd_preinit_hook, ()); + + _hurd_startup ((void **) &argc, &doinit); + + (void) &___libc_init_first; +} +#endif From adc3f785dc461b2f5039ec92b41f954006708b01 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 01:42:17 +0000 Subject: [PATCH 0918/4487] Interrupt code for Hurd/MIPS. --- sysdeps/mach/hurd/mips/intr-msg.h | 127 ++++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 sysdeps/mach/hurd/mips/intr-msg.h diff --git a/sysdeps/mach/hurd/mips/intr-msg.h b/sysdeps/mach/hurd/mips/intr-msg.h new file mode 100644 index 0000000000..7d155f63f3 --- /dev/null +++ b/sysdeps/mach/hurd/mips/intr-msg.h @@ -0,0 +1,127 @@ +/* Machine-dependent details of interruptible RPC messaging. Mips version. + Copyright (C) 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + +#ifdef __mips64 +#define INTR_MSG_TRAP(msg, option, send_size, rcv_size, rcv_name, timeout, notify) \ +({ \ + error_t err; \ + mach_port_t __rcv_name = (rcv_name); \ + mach_msg_timeout_t __timeout = (timeout); \ + mach_port_t __notify = (notify); \ + asm (".globl _hurd_intr_rpc_msg_do_trap\n" \ + ".globl _hurd_intr_rpc_msg_in_trap\n" \ + " move $4, %1\n" \ + " move $5, %2\n" \ + " move $6, %3\n" \ + " move $7, %4\n" \ + " move $8, %5\n" \ + " move $9, %6\n" \ + " move $10, %7\n" \ + " dli $2, -25\n" \ + "_hurd_intr_rpc_msg_do_trap: syscall\n" \ + "_hurd_intr_rpc_msg_in_trap: move %0, $2\n" \ + : "=r" (err) \ + : "r" (msg), "r" (option), "r" (send_size), "r" (rcv_size), \ + "r" (__rcv_name), "r" (__timeout), "r" (__notify) \ + : "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8", "$9", "$10", \ + "$11", "$12", "$13", "$14", "$15", "$24", "$25", "$28"); \ + err; \ +}) +#else +#define INTR_MSG_TRAP(msg, option, send_size, rcv_size, rcv_name, timeout, notify) \ +({ \ + error_t err; \ + mach_port_t __rcv_name = (rcv_name); \ + mach_msg_timeout_t __timeout = (timeout); \ + mach_port_t __notify = (notify); \ + asm (".globl _hurd_intr_rpc_msg_do_trap\n" \ + ".globl _hurd_intr_rpc_msg_in_trap\n" \ + " move $4, %1\n" \ + " move $5, %2\n" \ + " move $6, %3\n" \ + " move $7, %4\n" \ + " move $8, %5\n" \ + " move $9, %6\n" \ + " move $10, %7\n" \ + " li $2, -25\n" \ + "_hurd_intr_rpc_msg_do_trap: syscall\n" \ + "_hurd_intr_rpc_msg_in_trap: move %0, $2\n" \ + : "=r" (err) \ + : "r" (msg), "r" (option), "r" (send_size), "r" (rcv_size), \ + "r" (__rcv_name), "r" (__timeout), "r" (__notify) \ + : "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8", "$9", "$10", \ + "$11", "$12", "$13", "$14", "$15", "$24", "$25", "$28"); \ + err; \ +}) +#endif + +static inline void +INTR_MSG_BACK_OUT (struct mips_thread_state *state) +{ + return; +} + +#include "hurdfault.h" + +static inline int +SYSCALL_EXAMINE (struct mips_thread_state *state, int *callno) +{ + u_int32_t *p = (void *) (state->pc - 4); + int result; + if (_hurdsig_catch_memory_fault (p)) + return 0; + if (result = (*p == 0x0000000c)) + /* The PC is just after a `syscall' instruction. + This is a system call in progress; v0($2) holds the call number. */ + *callno = state->r2; + _hurdsig_end_catch_fault (); + return result; +} + + +struct mach_msg_trap_args + { + /* This is the order of arguments to mach_msg_trap. */ + mach_msg_header_t *msg; + mach_msg_option_t option; + mach_msg_size_t send_size; + mach_msg_size_t rcv_size; + mach_port_t rcv_name; + mach_msg_timeout_t timeout; + mach_port_t notify; + }; + + +static inline mach_port_t +MSG_EXAMINE (struct mips_thread_state *state, int *msgid) +{ + mach_msg_header_t *msg; + mach_port_t send_port; + + msg = (mach_msg_header_t *) state->r4; + + if (_hurdsig_catch_memory_fault (msg)) + return MACH_PORT_NULL; + send_port = msg->msgh_remote_port; + *msgid = msg->msgh_id; + _hurdsig_end_catch_fault (); + + return send_port; +} From 10fa6c02adaa66f3ff21a9a70a046fda7ad8af36 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 01:42:52 +0000 Subject: [PATCH 0919/4487] longjmp support for Hurd/MIPS. --- sysdeps/mach/hurd/mips/longjmp-ctx.c | 41 ++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 sysdeps/mach/hurd/mips/longjmp-ctx.c diff --git a/sysdeps/mach/hurd/mips/longjmp-ctx.c b/sysdeps/mach/hurd/mips/longjmp-ctx.c new file mode 100644 index 0000000000..df04900e78 --- /dev/null +++ b/sysdeps/mach/hurd/mips/longjmp-ctx.c @@ -0,0 +1,41 @@ +/* Perform a `longjmp' on a `struct sigcontext'. MIPS version. + Copyright (C) 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include + +void +_hurd_longjmp_sigcontext (struct sigcontext *scp, jmp_buf env, int retval) +{ + scp->sc_gpr[16] = env[0].__regs[0]; + scp->sc_gpr[17] = env[0].__regs[1]; + scp->sc_gpr[18] = env[0].__regs[2]; + scp->sc_gpr[19] = env[0].__regs[3]; + scp->sc_gpr[20] = env[0].__regs[4]; + scp->sc_gpr[21] = env[0].__regs[5]; + scp->sc_gpr[22] = env[0].__regs[6]; + scp->sc_gpr[23] = env[0].__regs[7]; + + scp->sc_gpr[28] = (int) env[0].__gp; + scp->sc_fp = (int) env[0].__fp; + scp->sc_sp = (int) env[0].__sp; + scp->sc_pc = (int) env[0].__pc; + scp->sc_gpr[2] = retval ?: 1; +} From c20a529cc7d68fcdf432e41eed87c67a4d9826c1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 01:43:22 +0000 Subject: [PATCH 0920/4487] Moved from below. --- sysdeps/mach/hurd/mips/bits/sigcontext.h | 71 ++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 sysdeps/mach/hurd/mips/bits/sigcontext.h diff --git a/sysdeps/mach/hurd/mips/bits/sigcontext.h b/sysdeps/mach/hurd/mips/bits/sigcontext.h new file mode 100644 index 0000000000..81d1f25f25 --- /dev/null +++ b/sysdeps/mach/hurd/mips/bits/sigcontext.h @@ -0,0 +1,71 @@ +/* Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Signal handlers are actually called: + void handler (int sig, int code, struct sigcontext *scp); */ + +/* State of this thread when the signal was taken. */ +struct sigcontext + { + /* These first members are machine-independent. */ + + int sc_onstack; /* Nonzero if running on sigstack. */ + __sigset_t sc_mask; /* Blocked signals to restore. */ + + /* MiG reply port this thread is using. */ + unsigned int sc_reply_port; + + /* Port this thread is doing an interruptible RPC on. */ + unsigned int sc_intr_port; + + /* Error code associated with this signal (interpreted as `error_t'). */ + int sc_error; + + /* All following members are machine-dependent. The rest of this + structure is written to be laid out identically to: + { + struct mips_thread_state ts; + struct mips_exc_state es; + struct mips_float_state fs; + } + trampoline.c knows this, so it must be changed if this changes. */ +#define sc_mips_thread_state sc_gpr /* Beginning of correspondence. */ + int sc_gpr[31]; /* "General" registers; [0] is r1. */ + int sc_mdlo, sc_mdhi; /* Low and high multiplication results. */ + int sc_pc; /* Instruction pointer. */ + + /* struct mips_exc_state */ +#define sc_mips_exc_state sc_cause + unsigned int sc_cause; /* Machine-level trap code. */ +#define SC_CAUSE_SST 0x00000044 + unsigned int sc_badvaddr; + unsigned int sc_coproc_used; /* Which coprocessors the thread has used. */ +#define SC_COPROC_USE_COP0 1 /* (by definition) */ +#define SC_COPROC_USE_COP1 2 /* FPA */ +#define SC_COPROC_USE_FPU SC_COPROC_USE_COP1 +#define SC_COPROC_USE_COP2 4 +#define SC_COPROC_USE_COP3 8 + + /* struct mips_float_state + This is only filled in if the SC_COPROC_USE_FPU bit + is set in sc_coproc_used. */ +#define sc_mips_float_state sc_fpr + int sc_fpr[32]; /* FP registers. */ + int sc_fpcsr; /* FPU status register. */ + int sc_fpeir; /* FP exception instruction register. */ + }; From ede6d67ba21289507bed9d0bc4da087afc53d714 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 01:43:54 +0000 Subject: [PATCH 0921/4487] Hurd/MIPS64 patches. --- sysdeps/mach/hurd/mips/exc2signal.c | 65 ++++----- sysdeps/mach/hurd/mips/longjmp-ts.c | 34 ++--- sysdeps/mach/hurd/mips/sigreturn.c | 100 ++++++++++--- sysdeps/mach/hurd/mips/trampoline.c | 217 ++++++++++++++++++---------- sysdeps/mach/mips/cacheflush.c | 30 ++-- sysdeps/mach/mips/machine-lock.h | 63 +++++--- sysdeps/mach/mips/machine-sp.h | 34 ++--- sysdeps/mach/mips/syscall.S | 57 +++++--- sysdeps/mach/mips/sysdep.h | 58 +++++--- sysdeps/mach/mips/thread_state.h | 33 +++-- 10 files changed, 425 insertions(+), 266 deletions(-) diff --git a/sysdeps/mach/hurd/mips/exc2signal.c b/sysdeps/mach/hurd/mips/exc2signal.c index f907c89cf0..235b2e2947 100644 --- a/sysdeps/mach/hurd/mips/exc2signal.c +++ b/sysdeps/mach/hurd/mips/exc2signal.c @@ -1,21 +1,21 @@ /* Translate Mach exception codes into signal numbers. MIPS version. -Copyright (C) 1991, 1992, 1994, 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. + Copyright (C) 1996, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include #include @@ -25,56 +25,55 @@ Cambridge, MA 02139, USA. */ into a signal number and signal subcode. */ void -_hurd_exception2signal (int exception, int code, int subcode, - int *signo, long int *sigcode, int *error) +_hurd_exception2signal (struct hurd_signal_detail *detail, int *signo) { - *error = 0; + detail->error = 0; - switch (exception) + switch (detail->exc) { default: *signo = SIGIOT; - *sigcode = exception; + detail->code = detail->exc; break; case EXC_BAD_ACCESS: - if (code == KERN_PROTECTION_FAILURE) + if (detail->exc_code == KERN_PROTECTION_FAILURE) *signo = SIGSEGV; else *signo = SIGBUS; - *sigcode = subcode; - *error = code; + detail->code = detail->exc_subcode; + detail->error = detail->exc_code; break; case EXC_BAD_INSTRUCTION: *signo = SIGILL; - if (code == EXC_MIPS_II) - *sigcode = code; + if (detail->exc_code == EXC_MIPS_II) + detail->code = detail->exc_subcode; else - *sigcode = 0; + detail->code = 0; break; case EXC_ARITHMETIC: - switch (code) + switch (detail->exc_code) { case EXC_MIPS_OV: /* integer overflow */ *signo = SIGFPE; - *sigcode = EXC_MIPS_FLT_OVERFLOW; + detail->code = detail->exc_subcode; break; default: *signo = SIGFPE; - *sigcode = 0; + detail->code = 0; break; case EXC_MIPS_INT: /* Subcode is the fp_status word saved by the hardware. Give an error code corresponding to the first bit set. */ - if (subcode == EXC_MIPS_FLT_UNIMP) + if (detail->exc_subcode == EXC_MIPS_FLT_UNIMP) *signo = SIGILL; else *signo = SIGFPE; - *sigcode = subcode; + detail->code = detail->exc_subcode; break; } break; @@ -82,17 +81,17 @@ _hurd_exception2signal (int exception, int code, int subcode, case EXC_EMULATION: /* 3.0 doesn't give this one, why, I don't know. */ *signo = SIGEMT; - *sigcode = 0; + detail->code = 0; break; case EXC_SOFTWARE: *signo = SIGEMT; - *sigcode = 0; + detail->code = 0; break; case EXC_BREAKPOINT: *signo = SIGTRAP; - *sigcode = code; + detail->code = 0; break; } } diff --git a/sysdeps/mach/hurd/mips/longjmp-ts.c b/sysdeps/mach/hurd/mips/longjmp-ts.c index 980a2ceb94..ea62bb1bf3 100644 --- a/sysdeps/mach/hurd/mips/longjmp-ts.c +++ b/sysdeps/mach/hurd/mips/longjmp-ts.c @@ -1,21 +1,21 @@ /* Perform a `longjmp' on a Mach thread_state. MIPS version. -Copyright (C) 1991, 1994 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + Copyright (C) 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include #include diff --git a/sysdeps/mach/hurd/mips/sigreturn.c b/sysdeps/mach/hurd/mips/sigreturn.c index 7396a8bb22..fe38fac1df 100644 --- a/sysdeps/mach/hurd/mips/sigreturn.c +++ b/sysdeps/mach/hurd/mips/sigreturn.c @@ -1,30 +1,32 @@ -/* Copyright (C) 1991, 1992, 1994, 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1996, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include #include #include #include +#include int __sigreturn (struct sigcontext *scp) { struct hurd_sigstate *ss; + struct hurd_userlink *link = (void *) &scp[1]; mach_port_t *reply_port; if (scp == NULL || (scp->sc_mask & _SIG_CANT_MASK)) @@ -36,6 +38,11 @@ __sigreturn (struct sigcontext *scp) ss = _hurd_self_sigstate (); __spin_lock (&ss->lock); + /* Remove the link on the `active resources' chain added by + _hurd_setup_sighandler. Its purpose was to make sure + that we got called; now we have, it is done. */ + _hurd_userlink_unlink (link); + /* Restore the set of blocked signals, and the intr_port slot. */ ss->blocked = scp->sc_mask; ss->intr_port = scp->sc_intr_port; @@ -48,15 +55,11 @@ __sigreturn (struct sigcontext *scp) the signal thread will notice it if it runs another handler, and arrange to have us called over again in the new reality. */ ss->context = scp; - /* Clear the intr_port slot, since we are not in fact doing - an interruptible RPC right now. If SS->intr_port is not null, - the SCP context is doing an interruptible RPC, but the signal - thread will examine us while we are blocked in the sig_post RPC. */ - ss->intr_port = MACH_PORT_NULL; __spin_unlock (&ss->lock); - __msg_sig_post (_hurd_msgport, 0, __mach_task_self ()); + __msg_sig_post (_hurd_msgport, 0, 0, __mach_task_self ()); /* If a pending signal was handled, sig_post never returned. */ __spin_lock (&ss->lock); + ss->context = NULL; } if (scp->sc_onstack) @@ -73,7 +76,17 @@ __sigreturn (struct sigcontext *scp) reply_port = (mach_port_t *) __hurd_threadvar_location (_HURD_THREADVAR_MIG_REPLY); if (*reply_port) - __mach_port_destroy (__mach_task_self (), *reply_port); + { + mach_port_t port = *reply_port; + + /* Assigning MACH_PORT_DEAD here tells libc's mig_get_reply_port not to + get another reply port, but avoids mig_dealloc_reply_port trying to + deallocate it after the receive fails (which it will, because the + reply port will be bogus, whether we do this or not). */ + *reply_port = MACH_PORT_DEAD; + + __mach_port_destroy (__mach_task_self (), port); + } *reply_port = scp->sc_reply_port; if (scp->sc_coproc_used & SC_COPROC_USE_FPU) @@ -83,30 +96,70 @@ __sigreturn (struct sigcontext *scp) asm volatile ("l.d $f" #n ",%0" : : "m" (scp->sc_fpr[n])) /* Restore floating-point registers. */ +#ifdef __mips64 restore_fpr (0); + restore_fpr (1); restore_fpr (2); + restore_fpr (3); restore_fpr (4); + restore_fpr (5); restore_fpr (6); + restore_fpr (7); restore_fpr (8); + restore_fpr (9); restore_fpr (10); + restore_fpr (11); restore_fpr (12); + restore_fpr (13); restore_fpr (14); + restore_fpr (15); restore_fpr (16); + restore_fpr (17); restore_fpr (18); + restore_fpr (19); restore_fpr (20); + restore_fpr (21); restore_fpr (22); + restore_fpr (23); restore_fpr (24); + restore_fpr (25); restore_fpr (26); + restore_fpr (27); restore_fpr (28); + restore_fpr (29); restore_fpr (30); + restore_fpr (31); +#else + restore_fpr (0); + restore_fpr (2); + restore_fpr (4); + restore_fpr (6); + restore_fpr (8); + restore_fpr (10); + restore_fpr (12); + restore_fpr (14); + restore_fpr (16); + restore_fpr (18); + restore_fpr (20); + restore_fpr (22); + restore_fpr (24); + restore_fpr (26); + restore_fpr (28); + restore_fpr (30); +#endif /* Restore the floating-point control/status register ($f31). */ asm volatile ("ctc1 %0,$f31" : : "r" (scp->sc_fpcsr)); } /* Load all the registers from the sigcontext. */ +#ifdef __mips64 +#define restore_gpr(n) \ + asm volatile ("ld $" #n ",%0" : : "m" (scpreg->sc_gpr[n - 1])) +#else #define restore_gpr(n) \ asm volatile ("lw $" #n ",%0" : : "m" (scpreg->sc_gpr[n - 1])) +#endif { register const struct sigcontext *const scpreg asm ("$1") = scp; @@ -157,9 +210,10 @@ __sigreturn (struct sigcontext *scp) at = &scpreg->sc_pc; /* This is an emulated instruction that will find at the address in $1 two words: the PC value to restore, and the $1 value to restore. */ - asm volatile (".word op_sigreturn"); - + asm volatile (".word %0" : : "i" (op_sigreturn)); asm volatile (".set reorder; .set at;"); + /* NOTREACHED */ + return at; /* To prevent optimization. */ } /* NOTREACHED */ diff --git a/sysdeps/mach/hurd/mips/trampoline.c b/sysdeps/mach/hurd/mips/trampoline.c index 03e3d1da6f..fbb7df508f 100644 --- a/sysdeps/mach/hurd/mips/trampoline.c +++ b/sysdeps/mach/hurd/mips/trampoline.c @@ -1,56 +1,58 @@ /* Set thread_state for sighandler, and sigcontext to recover. MIPS version. -Copyright (C) 1994, 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. + Copyright (C) 1996, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include +#include #include "thread_state.h" - - -struct mach_msg_trap_args - { - /* This is the order of arguments to mach_msg_trap. */ - mach_msg_header_t *msg; - mach_msg_option_t option; - mach_msg_size_t send_size; - mach_msg_size_t rcv_size; - mach_port_t rcv_name; - mach_msg_timeout_t timeout; - mach_port_t notify; - }; +#include +#include +#include "hurdfault.h" +#include "intr-msg.h" struct sigcontext * _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, - int signo, long int sigcode, - int rpc_wait, + int signo, struct hurd_signal_detail *detail, + volatile int rpc_wait, struct machine_thread_all_state *state) { - - __label__ trampoline, rpc_wait_trampoline; - void *sigsp; + __label__ trampoline, rpc_wait_trampoline, firewall; + void *volatile sigsp; struct sigcontext *scp; + struct + { + int signo; + long int sigcode; + struct sigcontext *scp; /* Points to ctx, below. */ + void *sigreturn_addr; + void *sigreturn_returns_here; + struct sigcontext *return_scp; /* Same; arg to sigreturn. */ + struct sigcontext ctx; + struct hurd_userlink link; + } *stackframe; if (ss->context) { /* We have a previous sigcontext that sigreturn was about to restore when another signal arrived. We will just base our setup on that. */ - if (! setjmp (_hurd_sigthread_fault_env)) + if (! _hurdsig_catch_memory_fault (ss->context)) { memcpy (&state->basic, &ss->context->sc_mips_thread_state, sizeof (state->basic)); @@ -63,24 +65,17 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, sizeof (state->fpu)); state->set |= (1 << MIPS_FLOAT_STATE); } - assert (! rpc_wait); - /* The intr_port slot was cleared before sigreturn sent us the - sig_post that made us notice this pending signal, so - _hurd_internal_post_signal wouldn't do interrupt_operation. - After we return, our caller will set SCP->sc_intr_port (in the - new context) from SS->intr_port and clear SS->intr_port. Now - that we are restoring this old context recorded by sigreturn, - we want to restore its intr_port too; so store it in - SS->intr_port now, so it will end up in SCP->sc_intr_port - later. */ - ss->intr_port = ss->context->sc_intr_port; } - /* If the sigreturn context was bogus, just ignore it. */ - ss->context = NULL; } - else if (! machine_get_basic_state (ss->thread, state)) + + if (! machine_get_basic_state (ss->thread, state)) return NULL; + /* Save the original SP in the gratuitous s0 ($16) slot. + We may need to reset the SP (the `r29' slot) to avoid clobbering an + interrupted RPC frame. */ + state->basic.r16 = state->basic.r29; + if ((ss->actions[signo].sa_flags & SA_ONSTACK) && !(ss->sigaltstack.ss_flags & (SA_DISABLE|SA_ONSTACK))) { @@ -92,13 +87,46 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, else sigsp = (char *) state->basic.r29; - /* Set up the sigcontext structure on the stack. This is all the stack - needs, since the args are passed in registers (below). */ - sigsp -= sizeof (*scp); - scp = sigsp; + /* Push the arguments to call `trampoline' on the stack. */ + sigsp -= sizeof (*stackframe); + stackframe = sigsp; - if (! setjmp (_hurd_sigthread_fault_env)) + if (_hurdsig_catch_memory_fault (stackframe)) { + /* We got a fault trying to write the stack frame. + We cannot set up the signal handler. + Returning NULL tells our caller, who will nuke us with a SIGILL. */ + return NULL; + } + else + { + int ok; + + extern void _hurdsig_longjmp_from_handler (void *, jmp_buf, int); + + /* Add a link to the thread's active-resources list. We mark this as + the only user of the "resource", so the cleanup function will be + called by any longjmp which is unwinding past the signal frame. + The cleanup function (in sigunwind.c) will make sure that all the + appropriate cleanups done by sigreturn are taken care of. */ + stackframe->link.cleanup = &_hurdsig_longjmp_from_handler; + stackframe->link.cleanup_data = &stackframe->ctx; + stackframe->link.resource.next = NULL; + stackframe->link.resource.prevp = NULL; + stackframe->link.thread.next = ss->active_resources; + stackframe->link.thread.prevp = &ss->active_resources; + if (stackframe->link.thread.next) + stackframe->link.thread.next->thread.prevp + = &stackframe->link.thread.next; + ss->active_resources = &stackframe->link; + + /* Set up the arguments for the signal handler. */ + stackframe->signo = signo; + stackframe->sigcode = detail->code; + stackframe->scp = stackframe->return_scp = scp = &stackframe->ctx; + stackframe->sigreturn_addr = &__sigreturn; + stackframe->sigreturn_returns_here = &&firewall; /* Crash on return. */ + /* Set up the sigcontext from the current state of the thread. */ scp->sc_onstack = ss->sigaltstack.ss_flags & SA_ONSTACK ? 1 : 0; @@ -110,24 +138,23 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, /* struct sigcontext is laid out so that starting at sc_cause mimics a struct mips_exc_state. */ - if (! machine_get_state (ss->thread, state, MIPS_EXC_STATE, - &state->exc, &scp->sc_cause, - sizeof (state->exc))) - return NULL; - if ((scp->sc_coproc_used & SC_COPROC_USE_FPU) && - /* struct sigcontext is laid out so that starting at sc_fpr - mimics a struct mips_float_state. This state - is only meaningful if the coprocessor was used. */ - ! machine_get_state (ss->thread, state, MIPS_FLOAT_STATE, - &state->fpu, - &scp->sc_mips_float_state, sizeof (state->fpu))) + ok = machine_get_state (ss->thread, state, MIPS_EXC_STATE, + &state->exc, &scp->sc_cause, + sizeof (state->exc)); + + if (ok && (scp->sc_coproc_used & SC_COPROC_USE_FPU)) + /* struct sigcontext is laid out so that starting at sc_fpr + mimics a struct mips_float_state. This state + is only meaningful if the coprocessor was used. */ + ok = machine_get_state (ss->thread, state, MIPS_FLOAT_STATE, + &state->fpu, &scp->sc_mips_float_state, + sizeof (state->fpu)); + + _hurdsig_end_catch_fault (); + + if (! ok) return NULL; } - else - /* We got a fault trying to write the stack frame. - We cannot set up the signal handler. - Returning NULL tells our caller, who will nuke us with a SIGILL. */ - return NULL; /* Modify the thread state to call the trampoline code on the new stack. */ if (rpc_wait) @@ -145,6 +172,12 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, starting with a0 ($4). */ struct mach_msg_trap_args *args = (void *) &state->basic.r4; + if (_hurdsig_catch_memory_fault (args)) + { + /* Faulted accessing ARGS. Bomb. */ + return NULL; + } + assert (args->option & MACH_RCV_MSG); /* Disable the message-send, since it has already completed. The calls we retry need only wait to receive the reply message. */ @@ -156,17 +189,22 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, args->option |= MACH_RCV_TIMEOUT; args->timeout = _hurd_interrupted_rpc_timeout; + _hurdsig_end_catch_fault (); + state->basic.pc = (int) &&rpc_wait_trampoline; - state->basic.r29 = (int) sigsp; /* $29 is the stack pointer register. */ + /* The reply-receiving trampoline code runs initially on the original + user stack. We pass it the signal stack pointer in s4 ($20). */ + state->basic.r29 = state->basic.r16; /* Restore mach_msg syscall SP. */ + state->basic.r20 = (int) sigsp; /* After doing the message receive, the trampoline code will need to update the v0 ($2) value to be restored by sigreturn. To simplify the assembly code, we pass the address of its slot in SCP to the - trampoline code in v1 ($3). */ - state->basic.r3 = (int) &scp->sc_gpr[1]; + trampoline code in s5 ($21). */ + state->basic.r21 = (int) &scp->sc_gpr[1]; /* We must preserve the mach_msg_trap args in a0..t2 ($4..$10). Pass the handler args to the trampoline code in s1..s3 ($17..$19). */ state->basic.r17 = signo; - state->basic.r18 = sigcode; + state->basic.r18 = detail->code; state->basic.r19 = (int) scp; } else @@ -174,12 +212,12 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, state->basic.pc = (int) &&trampoline; state->basic.r29 = (int) sigsp; state->basic.r4 = signo; - state->basic.r5 = sigcode; + state->basic.r5 = detail->code; state->basic.r6 = (int) scp; } - /* We pass the handler function to the trampoline code in at ($1). */ - state->basic.r1 = (int) handler; + /* We pass the handler function to the trampoline code in s6 ($22). */ + state->basic.r22 = (int) handler; /* In the callee-saved register s0 ($16), we save the SCP value to pass to __sigreturn after the handler returns. */ state->basic.r16 = (int) scp; @@ -197,21 +235,31 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, asm volatile (".set noat; .set noreorder; .set nomacro\n" /* Retry the interrupted mach_msg system call. */ +#ifdef __mips64 + "dli $2, -25\n" /* mach_msg_trap */ +#else "li $2, -25\n" /* mach_msg_trap */ +#endif "syscall\n" /* When the sigcontext was saved, v0 was MACH_RCV_INTERRUPTED. But now the message receive has completed and the original caller of the RPC (i.e. the code running when the signal arrived) needs to see the final return value of the message receive in v0. So store the new v0 value into the sc_gpr[1] member of the sigcontext - (whose address is in v1 to make this code simpler). */ - "sw $2, ($3)\n" + (whose address is in s5 to make this code simpler). */ +#ifdef __mips64 + "sd $2, ($21)\n" +#else + "sw $2, ($21)\n" +#endif /* Since the argument registers needed to have the mach_msg_trap arguments, we've stored the arguments to the handler function in registers s1..s3 ($17..$19). */ "move $4, $17\n" "move $5, $18\n" - "move $6, $19\n"); + "move $6, $19\n" + /* Switch to the signal stack. */ + "move $29, $20\n"); trampoline: /* Entry point for running the handler normally. The arguments to the @@ -222,14 +270,23 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, a2 SCP */ asm volatile - ("jal $1; nop\n" /* Call the handler function. */ + ("move $25, $22\n" /* Copy s6 to t9 for MIPS ABI. */ + "jal $25; nop\n" /* Call the handler function. */ /* Call __sigreturn (SCP); this cannot return. */ - "j %0\n" +#ifdef __mips64 + "dla $1,%0\n" +#else + "la $1,%0\n" +#endif + "j $1\n" "move $4, $16" /* Set up arg from saved SCP in delay slot. */ : : "i" (&__sigreturn)); /* NOTREACHED */ asm volatile (".set reorder; .set at; .set macro"); + firewall: + asm volatile ("hlt: j hlt"); + return NULL; } diff --git a/sysdeps/mach/mips/cacheflush.c b/sysdeps/mach/mips/cacheflush.c index 5325e6fd1e..de2ec58bff 100644 --- a/sysdeps/mach/mips/cacheflush.c +++ b/sysdeps/mach/mips/cacheflush.c @@ -1,28 +1,28 @@ /* Flush the insn cache after GCC writes a closure on the stack. Mach/MIPS. -Copyright (C) 1994 Free Software Foundation, Inc. -This file is part of the GNU C Library. + Copyright (C) 1996, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include #include /* Stupid name, but this is what GCC generates (config/mips/mips.h). */ void -cacheflush (void *addr, size_t size, int flag) +cacheflush (void *addr, unsigned size, int flag) { vm_machine_attribute_val_t val; diff --git a/sysdeps/mach/mips/machine-lock.h b/sysdeps/mach/mips/machine-lock.h index 628aae41bb..91d39e3753 100644 --- a/sysdeps/mach/mips/machine-lock.h +++ b/sysdeps/mach/mips/machine-lock.h @@ -1,25 +1,28 @@ /* Machine-specific definition for spin locks. MIPS version. -Copyright (C) 1994 Free Software Foundation, Inc. -This file is part of the GNU C Library. + Copyright (C) 1996, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _MACHINE_LOCK_H #define _MACHINE_LOCK_H +/* To get the TAS pseudo-instruction. */ +#include + /* The type of a spin lock variable. */ typedef __volatile int __spin_lock_t; @@ -46,19 +49,35 @@ __spin_unlock (__spin_lock_t *__lock) _EXTERN_INLINE int __spin_try_lock (register __spin_lock_t *__lock) { - register int __rtn; +#if (__mips >= 2) + int __rtn; + __asm__ __volatile (".set noreorder"); -#if 0 - __asm__ __volatile ("lw %0,0(%1)": "=r" (__rtn) : "r" (__lock)); - __asm__ __volatile ("sw %0,0(%0)": : "r" (__lock)); - __asm__ __volatile ("xor %0,%1,%0": "=r" (__rtn) : "r" (__lock)); +#if (__mips64) + __asm__ __volatile ("lld %0,0(%1)" : "=r" (__rtn) : "r" (__lock)); #else - /* Use the Mach microkernel's emulated TAS pseudo-instruction. */ - register int __rtn __asm__ ("a0"); - __asm__ __volatile (".word 0xf ! %0 " : "=r" (__rtn) : "0" (__lock)); + __asm__ __volatile ("ll %0,0(%1)" : "=r" (__rtn) : "r" (__lock)); +#endif + if (__rtn) + return 0; + __asm__ __volatile ("move %0,%1" : "=r" (__rtn) : "r" (__lock)); +#if (__mips64) + __asm__ __volatile ("scd %0,0(%1)" : "=r" (__rtn) : "r" (__lock)); +#else + __asm__ __volatile ("sc %0,0(%1)" : "=r" (__rtn) : "r" (__lock)); #endif + __asm__ __volatile (".set reorder"); + return __rtn; +#else + register int __rtn __asm__ ("a0"); + + /* Use the Mach microkernel's emulated TAS pseudo-instruction. */ + __asm__ __volatile (".set noreorder"); + __asm__ __volatile (".word %1" : "=r" (__rtn) : "i" (op_tas), "0" (__lock)); + __asm__ __volatile ("nop"); __asm__ __volatile (".set reorder"); return __rtn ^ (int) __lock; +#endif } /* Return nonzero if LOCK is locked. */ diff --git a/sysdeps/mach/mips/machine-sp.h b/sysdeps/mach/mips/machine-sp.h index 7406658f53..e1217c31f3 100644 --- a/sysdeps/mach/mips/machine-sp.h +++ b/sysdeps/mach/mips/machine-sp.h @@ -1,21 +1,21 @@ /* Machine-specific function to return the stack pointer. MIPS version. -Copyright (C) 1994 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + Copyright (C) 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _MACHINE_SP_H #define _MACHINE_SP_H diff --git a/sysdeps/mach/mips/syscall.S b/sysdeps/mach/mips/syscall.S index bf56b401dd..9936772295 100644 --- a/sysdeps/mach/mips/syscall.S +++ b/sysdeps/mach/mips/syscall.S @@ -1,37 +1,48 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1996, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include +#ifdef PIC + .option pic2 +#endif ENTRY (syscall) - .frame sp,0,ra move v0, a0 /* Load system call number from first arg. */ move a0, a1 /* Move the next three args up a register. */ move a1, a2 move a2, a3 /* Load the remaining possible args (up to 11) from the stack. */ - lw t0,16(sp) - lw t1,20(sp) - lw t2,24(sp) - lw t3,28(sp) - lw t4,32(sp) - lw t5,36(sp) - lw t6,40(sp) +#ifdef __mips64 + ld t0,4*8(sp) + ld t1,5*8(sp) + ld t2,6*8(sp) + ld t3,7*8(sp) + ld t4,8*8(sp) + ld t5,9*8(sp) + ld t6,10*8(sp) +#else + lw t0,4*4(sp) + lw t1,5*4(sp) + lw t2,6*4(sp) + lw t3,7*4(sp) + lw t4,8*4(sp) + lw t5,9*4(sp) + lw t6,10*4(sp) +#endif syscall /* Do the system call. */ j ra /* Return to caller. */ - .end syscall diff --git a/sysdeps/mach/mips/sysdep.h b/sysdeps/mach/mips/sysdep.h index 7609be5931..a4e6dff148 100644 --- a/sysdeps/mach/mips/sysdep.h +++ b/sysdeps/mach/mips/sysdep.h @@ -1,35 +1,40 @@ -/* Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1996, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -#define MOVE(x,y) move y , x - -#if 0 #define LOSE asm volatile ("1: b 1b") -#endif +#define START_MACHDEP asm ("\ + .text\n\ + .globl _start\n\ + .ent _start\n\ +_start:\n\ + # Put initial SP in a0.\n\ + move $4, $29\n\ + # Jump to _start0; don't return.\n\ + j _start0\n\ + .end _start\n\ +"); +#define START_ARGS int *entry_sp #define SNARF_ARGS(argc, argv, envp) \ do \ { \ - int *entry_sp; \ register char **p; \ \ - asm ("addu %0,$30,4" : "=r" (entry_sp)); \ - \ argc = *entry_sp; \ argv = (char **) (entry_sp + 1); \ p = argv; \ @@ -44,11 +49,20 @@ Cambridge, MA 02139, USA. */ ({ register int __fn = fn, __sp = (int) sp; \ asm volatile ("move $sp,%0; j %1" : : "r" (__sp), "r" (__fn));}) +#define RETURN_TO(sp, pc, retval) \ + asm volatile ("move $29, %0; move $2, %2; move $25, %1; jr $25" \ + : : "r" (sp), "r" (pc), "r" (retval)) + #define STACK_GROWTH_DOWN -#ifdef P40 #include +#if defined (ASSEMBLER) + +#define ALIGN 2 + +#define MOVE(x,y) move y , x + #define SYSCALL(name, args) \ .globl syscall_error; \ kernel_trap(name,SYS_##name,args); \ diff --git a/sysdeps/mach/mips/thread_state.h b/sysdeps/mach/mips/thread_state.h index f4f4b429cf..a72848dfc0 100644 --- a/sysdeps/mach/mips/thread_state.h +++ b/sysdeps/mach/mips/thread_state.h @@ -1,25 +1,30 @@ /* Mach thread state definitions for machine-independent code. MIPS version. -Copyright (C) 1994 Free Software Foundation, Inc. -This file is part of the GNU C Library. + Copyright (C) 1996, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #define MACHINE_THREAD_STATE_FLAVOR MIPS_THREAD_STATE #define MACHINE_THREAD_STATE_COUNT MIPS_THREAD_STATE_COUNT +#ifdef PIC +#define MACHINE_THREAD_STATE_SET_PC(ts, pc) \ + ((ts)->PC = (ts)->r25 = (unsigned long int) (pc)) +#endif + #define machine_thread_state mips_thread_state #define PC pc From a473fb39828b1817aeeb19ac95c6adf88b0e4906 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 01:58:17 +0000 Subject: [PATCH 0922/4487] Removed. WE have a .S file now --- sysdeps/mips/add_n.s | 120 ---------------------------------------- sysdeps/mips/addmul_1.s | 97 -------------------------------- sysdeps/mips/lshift.s | 95 ------------------------------- sysdeps/mips/mul_1.s | 85 ---------------------------- sysdeps/mips/rshift.s | 92 ------------------------------ sysdeps/mips/sub_n.s | 120 ---------------------------------------- sysdeps/mips/submul_1.s | 97 -------------------------------- 7 files changed, 706 deletions(-) delete mode 100644 sysdeps/mips/add_n.s delete mode 100644 sysdeps/mips/addmul_1.s delete mode 100644 sysdeps/mips/lshift.s delete mode 100644 sysdeps/mips/mul_1.s delete mode 100644 sysdeps/mips/rshift.s delete mode 100644 sysdeps/mips/sub_n.s delete mode 100644 sysdeps/mips/submul_1.s diff --git a/sysdeps/mips/add_n.s b/sysdeps/mips/add_n.s deleted file mode 100644 index f5525cec46..0000000000 --- a/sysdeps/mips/add_n.s +++ /dev/null @@ -1,120 +0,0 @@ - # MIPS2 __mpn_add_n -- Add two limb vectors of the same length > 0 and - # store sum in a third limb vector. - - # Copyright (C) 1995 Free Software Foundation, Inc. - - # This file is part of the GNU MP Library. - - # The GNU MP Library is free software; you can redistribute it and/or modify - # it under the terms of the GNU Library General Public License as published by - # the Free Software Foundation; either version 2 of the License, or (at your - # option) any later version. - - # The GNU MP 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 Library General Public - # License for more details. - - # You should have received a copy of the GNU Library General Public License - # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - # MA 02111-1307, USA. - - - # INPUT PARAMETERS - # res_ptr $4 - # s1_ptr $5 - # s2_ptr $6 - # size $7 - - .text - .align 2 - .globl __mpn_add_n - .ent __mpn_add_n -__mpn_add_n: - .set noreorder - .set nomacro - - lw $10,0($5) - lw $11,0($6) - - addiu $7,$7,-1 - and $9,$7,4-1 # number of limbs in first loop - beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop - move $2,$0 - - subu $7,$7,$9 - -.Loop0: addiu $9,$9,-1 - lw $12,4($5) - addu $11,$11,$2 - lw $13,4($6) - sltu $8,$11,$2 - addu $11,$10,$11 - sltu $2,$11,$10 - sw $11,0($4) - or $2,$2,$8 - - addiu $5,$5,4 - addiu $6,$6,4 - move $10,$12 - move $11,$13 - bne $9,$0,.Loop0 - addiu $4,$4,4 - -.L0: beq $7,$0,.Lend - nop - -.Loop: addiu $7,$7,-4 - - lw $12,4($5) - addu $11,$11,$2 - lw $13,4($6) - sltu $8,$11,$2 - addu $11,$10,$11 - sltu $2,$11,$10 - sw $11,0($4) - or $2,$2,$8 - - lw $10,8($5) - addu $13,$13,$2 - lw $11,8($6) - sltu $8,$13,$2 - addu $13,$12,$13 - sltu $2,$13,$12 - sw $13,4($4) - or $2,$2,$8 - - lw $12,12($5) - addu $11,$11,$2 - lw $13,12($6) - sltu $8,$11,$2 - addu $11,$10,$11 - sltu $2,$11,$10 - sw $11,8($4) - or $2,$2,$8 - - lw $10,16($5) - addu $13,$13,$2 - lw $11,16($6) - sltu $8,$13,$2 - addu $13,$12,$13 - sltu $2,$13,$12 - sw $13,12($4) - or $2,$2,$8 - - addiu $5,$5,16 - addiu $6,$6,16 - - bne $7,$0,.Loop - addiu $4,$4,16 - -.Lend: addu $11,$11,$2 - sltu $8,$11,$2 - addu $11,$10,$11 - sltu $2,$11,$10 - sw $11,0($4) - j $31 - or $2,$2,$8 - - .end __mpn_add_n diff --git a/sysdeps/mips/addmul_1.s b/sysdeps/mips/addmul_1.s deleted file mode 100644 index 6145771e39..0000000000 --- a/sysdeps/mips/addmul_1.s +++ /dev/null @@ -1,97 +0,0 @@ - # MIPS __mpn_addmul_1 -- Multiply a limb vector with a single limb and - # add the product to a second limb vector. - - # Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc. - - # This file is part of the GNU MP Library. - - # The GNU MP Library is free software; you can redistribute it and/or modify - # it under the terms of the GNU Library General Public License as published by - # the Free Software Foundation; either version 2 of the License, or (at your - # option) any later version. - - # The GNU MP 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 Library General Public - # License for more details. - - # You should have received a copy of the GNU Library General Public License - # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - # MA 02111-1307, USA. - - - # INPUT PARAMETERS - # res_ptr $4 - # s1_ptr $5 - # size $6 - # s2_limb $7 - - .text - .align 4 - .globl __mpn_addmul_1 - .ent __mpn_addmul_1 -__mpn_addmul_1: - .set noreorder - .set nomacro - - # warm up phase 0 - lw $8,0($5) - - # warm up phase 1 - addiu $5,$5,4 - multu $8,$7 - - addiu $6,$6,-1 - beq $6,$0,$LC0 - move $2,$0 # zero cy2 - - addiu $6,$6,-1 - beq $6,$0,$LC1 - lw $8,0($5) # load new s1 limb as early as possible - -Loop: lw $10,0($4) - mflo $3 - mfhi $9 - addiu $5,$5,4 - addu $3,$3,$2 # add old carry limb to low product limb - multu $8,$7 - lw $8,0($5) # load new s1 limb as early as possible - addiu $6,$6,-1 # decrement loop counter - sltu $2,$3,$2 # carry from previous addition -> $2 - addu $3,$10,$3 - sltu $10,$3,$10 - addu $2,$2,$10 - sw $3,0($4) - addiu $4,$4,4 - bne $6,$0,Loop - addu $2,$9,$2 # add high product limb and carry from addition - - # cool down phase 1 -$LC1: lw $10,0($4) - mflo $3 - mfhi $9 - addu $3,$3,$2 - sltu $2,$3,$2 - multu $8,$7 - addu $3,$10,$3 - sltu $10,$3,$10 - addu $2,$2,$10 - sw $3,0($4) - addiu $4,$4,4 - addu $2,$9,$2 # add high product limb and carry from addition - - # cool down phase 0 -$LC0: lw $10,0($4) - mflo $3 - mfhi $9 - addu $3,$3,$2 - sltu $2,$3,$2 - addu $3,$10,$3 - sltu $10,$3,$10 - addu $2,$2,$10 - sw $3,0($4) - j $31 - addu $2,$9,$2 # add high product limb and carry from addition - - .end __mpn_addmul_1 diff --git a/sysdeps/mips/lshift.s b/sysdeps/mips/lshift.s deleted file mode 100644 index ee92d7916f..0000000000 --- a/sysdeps/mips/lshift.s +++ /dev/null @@ -1,95 +0,0 @@ - # MIPS2 __mpn_lshift -- - - # Copyright (C) 1995 Free Software Foundation, Inc. - - # This file is part of the GNU MP Library. - - # The GNU MP Library is free software; you can redistribute it and/or modify - # it under the terms of the GNU Library General Public License as published by - # the Free Software Foundation; either version 2 of the License, or (at your - # option) any later version. - - # The GNU MP 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 Library General Public - # License for more details. - - # You should have received a copy of the GNU Library General Public License - # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - # MA 02111-1307, USA. - - - # INPUT PARAMETERS - # res_ptr $4 - # src_ptr $5 - # size $6 - # cnt $7 - - .text - .align 2 - .globl __mpn_lshift - .ent __mpn_lshift -__mpn_lshift: - .set noreorder - .set nomacro - - sll $2,$6,2 - addu $5,$5,$2 # make r5 point at end of src - lw $10,-4($5) # load first limb - subu $13,$0,$7 - addu $4,$4,$2 # make r4 point at end of res - addiu $6,$6,-1 - and $9,$6,4-1 # number of limbs in first loop - beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop - srl $2,$10,$13 # compute function result - - subu $6,$6,$9 - -.Loop0: lw $3,-8($5) - addiu $4,$4,-4 - addiu $5,$5,-4 - addiu $9,$9,-1 - sll $11,$10,$7 - srl $12,$3,$13 - move $10,$3 - or $8,$11,$12 - bne $9,$0,.Loop0 - sw $8,0($4) - -.L0: beq $6,$0,.Lend - nop - -.Loop: lw $3,-8($5) - addiu $4,$4,-16 - addiu $6,$6,-4 - sll $11,$10,$7 - srl $12,$3,$13 - - lw $10,-12($5) - sll $14,$3,$7 - or $8,$11,$12 - sw $8,12($4) - srl $9,$10,$13 - - lw $3,-16($5) - sll $11,$10,$7 - or $8,$14,$9 - sw $8,8($4) - srl $12,$3,$13 - - lw $10,-20($5) - sll $14,$3,$7 - or $8,$11,$12 - sw $8,4($4) - srl $9,$10,$13 - - addiu $5,$5,-16 - or $8,$14,$9 - bgtz $6,.Loop - sw $8,0($4) - -.Lend: sll $8,$10,$7 - j $31 - sw $8,-4($4) - .end __mpn_lshift diff --git a/sysdeps/mips/mul_1.s b/sysdeps/mips/mul_1.s deleted file mode 100644 index d006fa1221..0000000000 --- a/sysdeps/mips/mul_1.s +++ /dev/null @@ -1,85 +0,0 @@ - # MIPS __mpn_mul_1 -- Multiply a limb vector with a single limb and - # store the product in a second limb vector. - - # Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc. - - # This file is part of the GNU MP Library. - - # The GNU MP Library is free software; you can redistribute it and/or modify - # it under the terms of the GNU Library General Public License as published by - # the Free Software Foundation; either version 2 of the License, or (at your - # option) any later version. - - # The GNU MP 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 Library General Public - # License for more details. - - # You should have received a copy of the GNU Library General Public License - # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - # MA 02111-1307, USA. - - - # INPUT PARAMETERS - # res_ptr $4 - # s1_ptr $5 - # size $6 - # s2_limb $7 - - .text - .align 4 - .globl __mpn_mul_1 - .ent __mpn_mul_1 -__mpn_mul_1: - .set noreorder - .set nomacro - - # warm up phase 0 - lw $8,0($5) - - # warm up phase 1 - addiu $5,$5,4 - multu $8,$7 - - addiu $6,$6,-1 - beq $6,$0,$LC0 - move $2,$0 # zero cy2 - - addiu $6,$6,-1 - beq $6,$0,$LC1 - lw $8,0($5) # load new s1 limb as early as possible - -Loop: mflo $10 - mfhi $9 - addiu $5,$5,4 - addu $10,$10,$2 # add old carry limb to low product limb - multu $8,$7 - lw $8,0($5) # load new s1 limb as early as possible - addiu $6,$6,-1 # decrement loop counter - sltu $2,$10,$2 # carry from previous addition -> $2 - sw $10,0($4) - addiu $4,$4,4 - bne $6,$0,Loop - addu $2,$9,$2 # add high product limb and carry from addition - - # cool down phase 1 -$LC1: mflo $10 - mfhi $9 - addu $10,$10,$2 - sltu $2,$10,$2 - multu $8,$7 - sw $10,0($4) - addiu $4,$4,4 - addu $2,$9,$2 # add high product limb and carry from addition - - # cool down phase 0 -$LC0: mflo $10 - mfhi $9 - addu $10,$10,$2 - sltu $2,$10,$2 - sw $10,0($4) - j $31 - addu $2,$9,$2 # add high product limb and carry from addition - - .end __mpn_mul_1 diff --git a/sysdeps/mips/rshift.s b/sysdeps/mips/rshift.s deleted file mode 100644 index a8beb40577..0000000000 --- a/sysdeps/mips/rshift.s +++ /dev/null @@ -1,92 +0,0 @@ - # MIPS2 __mpn_rshift -- - - # Copyright (C) 1995 Free Software Foundation, Inc. - - # This file is part of the GNU MP Library. - - # The GNU MP Library is free software; you can redistribute it and/or modify - # it under the terms of the GNU Library General Public License as published by - # the Free Software Foundation; either version 2 of the License, or (at your - # option) any later version. - - # The GNU MP 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 Library General Public - # License for more details. - - # You should have received a copy of the GNU Library General Public License - # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - # MA 02111-1307, USA. - - - # INPUT PARAMETERS - # res_ptr $4 - # src_ptr $5 - # size $6 - # cnt $7 - - .text - .align 2 - .globl __mpn_rshift - .ent __mpn_rshift -__mpn_rshift: - .set noreorder - .set nomacro - - lw $10,0($5) # load first limb - subu $13,$0,$7 - addiu $6,$6,-1 - and $9,$6,4-1 # number of limbs in first loop - beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop - sll $2,$10,$13 # compute function result - - subu $6,$6,$9 - -.Loop0: lw $3,4($5) - addiu $4,$4,4 - addiu $5,$5,4 - addiu $9,$9,-1 - srl $11,$10,$7 - sll $12,$3,$13 - move $10,$3 - or $8,$11,$12 - bne $9,$0,.Loop0 - sw $8,-4($4) - -.L0: beq $6,$0,.Lend - nop - -.Loop: lw $3,4($5) - addiu $4,$4,16 - addiu $6,$6,-4 - srl $11,$10,$7 - sll $12,$3,$13 - - lw $10,8($5) - srl $14,$3,$7 - or $8,$11,$12 - sw $8,-16($4) - sll $9,$10,$13 - - lw $3,12($5) - srl $11,$10,$7 - or $8,$14,$9 - sw $8,-12($4) - sll $12,$3,$13 - - lw $10,16($5) - srl $14,$3,$7 - or $8,$11,$12 - sw $8,-8($4) - sll $9,$10,$13 - - addiu $5,$5,16 - or $8,$14,$9 - bgtz $6,.Loop - sw $8,-4($4) - -.Lend: srl $8,$10,$7 - j $31 - sw $8,0($4) - .end __mpn_rshift diff --git a/sysdeps/mips/sub_n.s b/sysdeps/mips/sub_n.s deleted file mode 100644 index 3368ef29d6..0000000000 --- a/sysdeps/mips/sub_n.s +++ /dev/null @@ -1,120 +0,0 @@ - # MIPS2 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and - # store difference in a third limb vector. - - # Copyright (C) 1995 Free Software Foundation, Inc. - - # This file is part of the GNU MP Library. - - # The GNU MP Library is free software; you can redistribute it and/or modify - # it under the terms of the GNU Library General Public License as published by - # the Free Software Foundation; either version 2 of the License, or (at your - # option) any later version. - - # The GNU MP 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 Library General Public - # License for more details. - - # You should have received a copy of the GNU Library General Public License - # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - # MA 02111-1307, USA. - - - # INPUT PARAMETERS - # res_ptr $4 - # s1_ptr $5 - # s2_ptr $6 - # size $7 - - .text - .align 2 - .globl __mpn_sub_n - .ent __mpn_sub_n -__mpn_sub_n: - .set noreorder - .set nomacro - - lw $10,0($5) - lw $11,0($6) - - addiu $7,$7,-1 - and $9,$7,4-1 # number of limbs in first loop - beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop - move $2,$0 - - subu $7,$7,$9 - -.Loop0: addiu $9,$9,-1 - lw $12,4($5) - addu $11,$11,$2 - lw $13,4($6) - sltu $8,$11,$2 - subu $11,$10,$11 - sltu $2,$10,$11 - sw $11,0($4) - or $2,$2,$8 - - addiu $5,$5,4 - addiu $6,$6,4 - move $10,$12 - move $11,$13 - bne $9,$0,.Loop0 - addiu $4,$4,4 - -.L0: beq $7,$0,.Lend - nop - -.Loop: addiu $7,$7,-4 - - lw $12,4($5) - addu $11,$11,$2 - lw $13,4($6) - sltu $8,$11,$2 - subu $11,$10,$11 - sltu $2,$10,$11 - sw $11,0($4) - or $2,$2,$8 - - lw $10,8($5) - addu $13,$13,$2 - lw $11,8($6) - sltu $8,$13,$2 - subu $13,$12,$13 - sltu $2,$12,$13 - sw $13,4($4) - or $2,$2,$8 - - lw $12,12($5) - addu $11,$11,$2 - lw $13,12($6) - sltu $8,$11,$2 - subu $11,$10,$11 - sltu $2,$10,$11 - sw $11,8($4) - or $2,$2,$8 - - lw $10,16($5) - addu $13,$13,$2 - lw $11,16($6) - sltu $8,$13,$2 - subu $13,$12,$13 - sltu $2,$12,$13 - sw $13,12($4) - or $2,$2,$8 - - addiu $5,$5,16 - addiu $6,$6,16 - - bne $7,$0,.Loop - addiu $4,$4,16 - -.Lend: addu $11,$11,$2 - sltu $8,$11,$2 - subu $11,$10,$11 - sltu $2,$10,$11 - sw $11,0($4) - j $31 - or $2,$2,$8 - - .end __mpn_sub_n diff --git a/sysdeps/mips/submul_1.s b/sysdeps/mips/submul_1.s deleted file mode 100644 index 1324b66090..0000000000 --- a/sysdeps/mips/submul_1.s +++ /dev/null @@ -1,97 +0,0 @@ - # MIPS __mpn_submul_1 -- Multiply a limb vector with a single limb and - # subtract the product from a second limb vector. - - # Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc. - - # This file is part of the GNU MP Library. - - # The GNU MP Library is free software; you can redistribute it and/or modify - # it under the terms of the GNU Library General Public License as published by - # the Free Software Foundation; either version 2 of the License, or (at your - # option) any later version. - - # The GNU MP 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 Library General Public - # License for more details. - - # You should have received a copy of the GNU Library General Public License - # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - # MA 02111-1307, USA. - - - # INPUT PARAMETERS - # res_ptr $4 - # s1_ptr $5 - # size $6 - # s2_limb $7 - - .text - .align 4 - .globl __mpn_submul_1 - .ent __mpn_submul_1 -__mpn_submul_1: - .set noreorder - .set nomacro - - # warm up phase 0 - lw $8,0($5) - - # warm up phase 1 - addiu $5,$5,4 - multu $8,$7 - - addiu $6,$6,-1 - beq $6,$0,$LC0 - move $2,$0 # zero cy2 - - addiu $6,$6,-1 - beq $6,$0,$LC1 - lw $8,0($5) # load new s1 limb as early as possible - -Loop: lw $10,0($4) - mflo $3 - mfhi $9 - addiu $5,$5,4 - addu $3,$3,$2 # add old carry limb to low product limb - multu $8,$7 - lw $8,0($5) # load new s1 limb as early as possible - addiu $6,$6,-1 # decrement loop counter - sltu $2,$3,$2 # carry from previous addition -> $2 - subu $3,$10,$3 - sgtu $10,$3,$10 - addu $2,$2,$10 - sw $3,0($4) - addiu $4,$4,4 - bne $6,$0,Loop - addu $2,$9,$2 # add high product limb and carry from addition - - # cool down phase 1 -$LC1: lw $10,0($4) - mflo $3 - mfhi $9 - addu $3,$3,$2 - sltu $2,$3,$2 - multu $8,$7 - subu $3,$10,$3 - sgtu $10,$3,$10 - addu $2,$2,$10 - sw $3,0($4) - addiu $4,$4,4 - addu $2,$9,$2 # add high product limb and carry from addition - - # cool down phase 0 -$LC0: lw $10,0($4) - mflo $3 - mfhi $9 - addu $3,$3,$2 - sltu $2,$3,$2 - subu $3,$10,$3 - sgtu $10,$3,$10 - addu $2,$2,$10 - sw $3,0($4) - j $31 - addu $2,$9,$2 # add high product limb and carry from addition - - .end __mpn_submul_1 From bcb5cee069ee03215ab038f6755948b01af98f9e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 01:59:39 +0000 Subject: [PATCH 0923/4487] MIPS assembler version of GMP function. --- sysdeps/mips/add_n.S | 121 ++++++++++++++++++++++++++++++++++++++++ sysdeps/mips/addmul_1.S | 98 ++++++++++++++++++++++++++++++++ sysdeps/mips/lshift.S | 97 ++++++++++++++++++++++++++++++++ sysdeps/mips/mul_1.S | 86 ++++++++++++++++++++++++++++ sysdeps/mips/rshift.S | 94 +++++++++++++++++++++++++++++++ sysdeps/mips/sub_n.S | 121 ++++++++++++++++++++++++++++++++++++++++ sysdeps/mips/submul_1.S | 98 ++++++++++++++++++++++++++++++++ 7 files changed, 715 insertions(+) create mode 100644 sysdeps/mips/add_n.S create mode 100644 sysdeps/mips/addmul_1.S create mode 100644 sysdeps/mips/lshift.S create mode 100644 sysdeps/mips/mul_1.S create mode 100644 sysdeps/mips/rshift.S create mode 100644 sysdeps/mips/sub_n.S create mode 100644 sysdeps/mips/submul_1.S diff --git a/sysdeps/mips/add_n.S b/sysdeps/mips/add_n.S new file mode 100644 index 0000000000..df32eecfcf --- /dev/null +++ b/sysdeps/mips/add_n.S @@ -0,0 +1,121 @@ +/* MIPS2 __mpn_add_n -- Add two limb vectors of the same length > 0 and +store sum in a third limb vector. + +Copyright (C) 1995 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Library General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at your +option) any later version. + +The GNU MP 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 Library General Public +License for more details. + +You should have received a copy of the GNU Library General Public License +along with the GNU MP Library; see the file COPYING.LIB. If not, write to +the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +MA 02111-1307, USA. */ + +#include + +/* INPUT PARAMETERS + res_ptr $4 + s1_ptr $5 + s2_ptr $6 + size $7 +*/ +#ifdef PIC + .option pic2 +#endif +ENTRY (__mpn_add_n) + .set noreorder +#ifdef PIC + .cpload t9 +#endif + .set nomacro + + lw $10,0($5) + lw $11,0($6) + + addiu $7,$7,-1 + and $9,$7,4-1 /* number of limbs in first loop */ + beq $9,$0,.L0 /* if multiple of 4 limbs, skip first loop */ + move $2,$0 + + subu $7,$7,$9 + +.Loop0: addiu $9,$9,-1 + lw $12,4($5) + addu $11,$11,$2 + lw $13,4($6) + sltu $8,$11,$2 + addu $11,$10,$11 + sltu $2,$11,$10 + sw $11,0($4) + or $2,$2,$8 + + addiu $5,$5,4 + addiu $6,$6,4 + move $10,$12 + move $11,$13 + bne $9,$0,.Loop0 + addiu $4,$4,4 + +.L0: beq $7,$0,.Lend + nop + +.Loop: addiu $7,$7,-4 + + lw $12,4($5) + addu $11,$11,$2 + lw $13,4($6) + sltu $8,$11,$2 + addu $11,$10,$11 + sltu $2,$11,$10 + sw $11,0($4) + or $2,$2,$8 + + lw $10,8($5) + addu $13,$13,$2 + lw $11,8($6) + sltu $8,$13,$2 + addu $13,$12,$13 + sltu $2,$13,$12 + sw $13,4($4) + or $2,$2,$8 + + lw $12,12($5) + addu $11,$11,$2 + lw $13,12($6) + sltu $8,$11,$2 + addu $11,$10,$11 + sltu $2,$11,$10 + sw $11,8($4) + or $2,$2,$8 + + lw $10,16($5) + addu $13,$13,$2 + lw $11,16($6) + sltu $8,$13,$2 + addu $13,$12,$13 + sltu $2,$13,$12 + sw $13,12($4) + or $2,$2,$8 + + addiu $5,$5,16 + addiu $6,$6,16 + + bne $7,$0,.Loop + addiu $4,$4,16 + +.Lend: addu $11,$11,$2 + sltu $8,$11,$2 + addu $11,$10,$11 + sltu $2,$11,$10 + sw $11,0($4) + j $31 + or $2,$2,$8 diff --git a/sysdeps/mips/addmul_1.S b/sysdeps/mips/addmul_1.S new file mode 100644 index 0000000000..dc1dc1ba50 --- /dev/null +++ b/sysdeps/mips/addmul_1.S @@ -0,0 +1,98 @@ +/* MIPS __mpn_addmul_1 -- Multiply a limb vector with a single limb and +add the product to a second limb vector. + +Copyright (C) 1995 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Library General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at your +option) any later version. + +The GNU MP 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 Library General Public +License for more details. + +You should have received a copy of the GNU Library General Public License +along with the GNU MP Library; see the file COPYING.LIB. If not, write to +the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +MA 02111-1307, USA. */ + +#include + +/* INPUT PARAMETERS + res_ptr $4 + s1_ptr $5 + size $6 + s2_limb $7 +*/ +#ifdef PIC + .option pic2 +#endif +ENTRY (__mpn_addmul_1) + .set noreorder +#ifdef PIC + .cpload t9 +#endif + .set nomacro + + /* warm up phase 0 */ + lw $8,0($5) + + /* warm up phase 1 */ + addiu $5,$5,4 + multu $8,$7 + + addiu $6,$6,-1 + beq $6,$0,$LC0 + move $2,$0 /* zero cy2 */ + + addiu $6,$6,-1 + beq $6,$0,$LC1 + lw $8,0($5) /* load new s1 limb as early as possible */ + +Loop: lw $10,0($4) + mflo $3 + mfhi $9 + addiu $5,$5,4 + addu $3,$3,$2 /* add old carry limb to low product limb */ + multu $8,$7 + lw $8,0($5) /* load new s1 limb as early as possible */ + addiu $6,$6,-1 /* decrement loop counter */ + sltu $2,$3,$2 /* carry from previous addition -> $2 */ + addu $3,$10,$3 + sltu $10,$3,$10 + addu $2,$2,$10 + sw $3,0($4) + addiu $4,$4,4 + bne $6,$0,Loop /* should be "bnel" */ + addu $2,$9,$2 /* add high product limb and carry from addition */ + + /* cool down phase 1 */ +$LC1: lw $10,0($4) + mflo $3 + mfhi $9 + addu $3,$3,$2 + sltu $2,$3,$2 + multu $8,$7 + addu $3,$10,$3 + sltu $10,$3,$10 + addu $2,$2,$10 + sw $3,0($4) + addiu $4,$4,4 + addu $2,$9,$2 /* add high product limb and carry from addition */ + + /* cool down phase 0 */ +$LC0: lw $10,0($4) + mflo $3 + mfhi $9 + addu $3,$3,$2 + sltu $2,$3,$2 + addu $3,$10,$3 + sltu $10,$3,$10 + addu $2,$2,$10 + sw $3,0($4) + j $31 + addu $2,$9,$2 /* add high product limb and carry from addition */ diff --git a/sysdeps/mips/lshift.S b/sysdeps/mips/lshift.S new file mode 100644 index 0000000000..e76630310f --- /dev/null +++ b/sysdeps/mips/lshift.S @@ -0,0 +1,97 @@ +/* MIPS2 __mpn_lshift -- + +Copyright (C) 1995 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Library General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at your +option) any later version. + +The GNU MP 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 Library General Public +License for more details. + +You should have received a copy of the GNU Library General Public License +along with the GNU MP Library; see the file COPYING.LIB. If not, write to +the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +MA 02111-1307, USA. */ + +#include + +/* INPUT PARAMETERS + res_ptr $4 + src_ptr $5 + size $6 + cnt $7 +*/ +#ifdef PIC + .option pic2 +#endif +ENTRY (__mpn_lshift) + .set noreorder +#ifdef PIC + .cpload t9 +#endif + .set nomacro + + sll $2,$6,2 + addu $5,$5,$2 /* make r5 point at end of src */ + lw $10,-4($5) /* load first limb */ + subu $13,$0,$7 + addu $4,$4,$2 /* make r4 point at end of res */ + addiu $6,$6,-1 + and $9,$6,4-1 /* number of limbs in first loop */ + beq $9,$0,.L0 /* if multiple of 4 limbs, skip first loop */ + srl $2,$10,$13 /* compute function result */ + + subu $6,$6,$9 + +.Loop0: lw $3,-8($5) + addiu $4,$4,-4 + addiu $5,$5,-4 + addiu $9,$9,-1 + sll $11,$10,$7 + srl $12,$3,$13 + move $10,$3 + or $8,$11,$12 + bne $9,$0,.Loop0 + sw $8,0($4) + +.L0: beq $6,$0,.Lend + nop + +.Loop: lw $3,-8($5) + addiu $4,$4,-16 + addiu $6,$6,-4 + sll $11,$10,$7 + srl $12,$3,$13 + + lw $10,-12($5) + sll $14,$3,$7 + or $8,$11,$12 + sw $8,12($4) + srl $9,$10,$13 + + lw $3,-16($5) + sll $11,$10,$7 + or $8,$14,$9 + sw $8,8($4) + srl $12,$3,$13 + + lw $10,-20($5) + sll $14,$3,$7 + or $8,$11,$12 + sw $8,4($4) + srl $9,$10,$13 + + addiu $5,$5,-16 + or $8,$14,$9 + bgtz $6,.Loop + sw $8,0($4) + +.Lend: sll $8,$10,$7 + j $31 + sw $8,-4($4) diff --git a/sysdeps/mips/mul_1.S b/sysdeps/mips/mul_1.S new file mode 100644 index 0000000000..184aae6fa1 --- /dev/null +++ b/sysdeps/mips/mul_1.S @@ -0,0 +1,86 @@ +/* MIPS __mpn_mul_1 -- Multiply a limb vector with a single limb and +store the product in a second limb vector. + +Copyright (C) 1995 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Library General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at your +option) any later version. + +The GNU MP 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 Library General Public +License for more details. + +You should have received a copy of the GNU Library General Public License +along with the GNU MP Library; see the file COPYING.LIB. If not, write to +the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +MA 02111-1307, USA. */ + +#include + +/* INPUT PARAMETERS + res_ptr $4 + s1_ptr $5 + size $6 + s2_limb $7 +*/ +#ifdef PIC + .option pic2 +#endif +ENTRY (__mpn_mul_1) + .set noreorder +#ifdef PIC + .cpload t9 +#endif + .set nomacro + + /* warm up phase 0 */ + lw $8,0($5) + + /* warm up phase 1 */ + addiu $5,$5,4 + multu $8,$7 + + addiu $6,$6,-1 + beq $6,$0,$LC0 + move $2,$0 /* zero cy2 */ + + addiu $6,$6,-1 + beq $6,$0,$LC1 + lw $8,0($5) /* load new s1 limb as early as possible */ + +Loop: mflo $10 + mfhi $9 + addiu $5,$5,4 + addu $10,$10,$2 /* add old carry limb to low product limb */ + multu $8,$7 + lw $8,0($5) /* load new s1 limb as early as possible */ + addiu $6,$6,-1 /* decrement loop counter */ + sltu $2,$10,$2 /* carry from previous addition -> $2 */ + sw $10,0($4) + addiu $4,$4,4 + bne $6,$0,Loop /* should be "bnel" */ + addu $2,$9,$2 /* add high product limb and carry from addition */ + + /* cool down phase 1 */ +$LC1: mflo $10 + mfhi $9 + addu $10,$10,$2 + sltu $2,$10,$2 + multu $8,$7 + sw $10,0($4) + addiu $4,$4,4 + addu $2,$9,$2 /* add high product limb and carry from addition + + /* cool down phase 0 */ +$LC0: mflo $10 + mfhi $9 + addu $10,$10,$2 + sltu $2,$10,$2 + sw $10,0($4) + j $31 + addu $2,$9,$2 /* add high product limb and carry from addition */ diff --git a/sysdeps/mips/rshift.S b/sysdeps/mips/rshift.S new file mode 100644 index 0000000000..37bde2f7cd --- /dev/null +++ b/sysdeps/mips/rshift.S @@ -0,0 +1,94 @@ +/* MIPS2 __mpn_rshift -- + +Copyright (C) 1995 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Library General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at your +option) any later version. + +The GNU MP 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 Library General Public +License for more details. + +You should have received a copy of the GNU Library General Public License +along with the GNU MP Library; see the file COPYING.LIB. If not, write to +the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +MA 02111-1307, USA. */ + +#include + +/* INPUT PARAMETERS + res_ptr $4 + src_ptr $5 + size $6 + cnt $7 +*/ +#ifdef PIC + .option pic2 +#endif +ENTRY (__mpn_rshift) + .set noreorder +#ifdef PIC + .cpload t9 +#endif + .set nomacro + + lw $10,0($5) /* load first limb */ + subu $13,$0,$7 + addiu $6,$6,-1 + and $9,$6,4-1 /* number of limbs in first loop */ + beq $9,$0,.L0 /* if multiple of 4 limbs, skip first loop*/ + sll $2,$10,$13 /* compute function result */ + + subu $6,$6,$9 + +.Loop0: lw $3,4($5) + addiu $4,$4,4 + addiu $5,$5,4 + addiu $9,$9,-1 + srl $11,$10,$7 + sll $12,$3,$13 + move $10,$3 + or $8,$11,$12 + bne $9,$0,.Loop0 + sw $8,-4($4) + +.L0: beq $6,$0,.Lend + nop + +.Loop: lw $3,4($5) + addiu $4,$4,16 + addiu $6,$6,-4 + srl $11,$10,$7 + sll $12,$3,$13 + + lw $10,8($5) + srl $14,$3,$7 + or $8,$11,$12 + sw $8,-16($4) + sll $9,$10,$13 + + lw $3,12($5) + srl $11,$10,$7 + or $8,$14,$9 + sw $8,-12($4) + sll $12,$3,$13 + + lw $10,16($5) + srl $14,$3,$7 + or $8,$11,$12 + sw $8,-8($4) + sll $9,$10,$13 + + addiu $5,$5,16 + or $8,$14,$9 + bgtz $6,.Loop + sw $8,-4($4) + +.Lend: srl $8,$10,$7 + j $31 + sw $8,0($4) diff --git a/sysdeps/mips/sub_n.S b/sysdeps/mips/sub_n.S new file mode 100644 index 0000000000..09fbf7eeff --- /dev/null +++ b/sysdeps/mips/sub_n.S @@ -0,0 +1,121 @@ +/* MIPS2 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and +store difference in a third limb vector. + +Copyright (C) 1995 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Library General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at your +option) any later version. + +The GNU MP 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 Library General Public +License for more details. + +You should have received a copy of the GNU Library General Public License +along with the GNU MP Library; see the file COPYING.LIB. If not, write to +the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +MA 02111-1307, USA. */ + +#include + +/* INPUT PARAMETERS + res_ptr $4 + s1_ptr $5 + s2_ptr $6 + size $7 +*/ +#ifdef PIC + .option pic2 +#endif +ENTRY (__mpn_sub_n) + .set noreorder +#ifdef PIC + .cpload t9 +#endif + .set nomacro + + lw $10,0($5) + lw $11,0($6) + + addiu $7,$7,-1 + and $9,$7,4-1 /* number of limbs in first loop */ + beq $9,$0,.L0 /* if multiple of 4 limbs, skip first loop */ + move $2,$0 + + subu $7,$7,$9 + +.Loop0: addiu $9,$9,-1 + lw $12,4($5) + addu $11,$11,$2 + lw $13,4($6) + sltu $8,$11,$2 + subu $11,$10,$11 + sltu $2,$10,$11 + sw $11,0($4) + or $2,$2,$8 + + addiu $5,$5,4 + addiu $6,$6,4 + move $10,$12 + move $11,$13 + bne $9,$0,.Loop0 + addiu $4,$4,4 + +.L0: beq $7,$0,.Lend + nop + +.Loop: addiu $7,$7,-4 + + lw $12,4($5) + addu $11,$11,$2 + lw $13,4($6) + sltu $8,$11,$2 + subu $11,$10,$11 + sltu $2,$10,$11 + sw $11,0($4) + or $2,$2,$8 + + lw $10,8($5) + addu $13,$13,$2 + lw $11,8($6) + sltu $8,$13,$2 + subu $13,$12,$13 + sltu $2,$12,$13 + sw $13,4($4) + or $2,$2,$8 + + lw $12,12($5) + addu $11,$11,$2 + lw $13,12($6) + sltu $8,$11,$2 + subu $11,$10,$11 + sltu $2,$10,$11 + sw $11,8($4) + or $2,$2,$8 + + lw $10,16($5) + addu $13,$13,$2 + lw $11,16($6) + sltu $8,$13,$2 + subu $13,$12,$13 + sltu $2,$12,$13 + sw $13,12($4) + or $2,$2,$8 + + addiu $5,$5,16 + addiu $6,$6,16 + + bne $7,$0,.Loop + addiu $4,$4,16 + +.Lend: addu $11,$11,$2 + sltu $8,$11,$2 + subu $11,$10,$11 + sltu $2,$10,$11 + sw $11,0($4) + j $31 + or $2,$2,$8 diff --git a/sysdeps/mips/submul_1.S b/sysdeps/mips/submul_1.S new file mode 100644 index 0000000000..eae8ebbfaf --- /dev/null +++ b/sysdeps/mips/submul_1.S @@ -0,0 +1,98 @@ +/* MIPS __mpn_submul_1 -- Multiply a limb vector with a single limb and +subtract the product from a second limb vector. + +Copyright (C) 1995 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Library General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at your +option) any later version. + +The GNU MP 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 Library General Public +License for more details. + +You should have received a copy of the GNU Library General Public License +along with the GNU MP Library; see the file COPYING.LIB. If not, write to +the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +MA 02111-1307, USA. */ + +#include + +/* INPUT PARAMETERS + res_ptr $4 + s1_ptr $5 + size $6 + s2_limb $7 +*/ +#ifdef PIC + .option pic2 +#endif +ENTRY (__mpn_submul_1) + .set noreorder +#ifdef PIC + .cpload t9 +#endif + .set nomacro + + /* warm up phase 0 */ + lw $8,0($5) + + /* warm up phase 1 */ + addiu $5,$5,4 + multu $8,$7 + + addiu $6,$6,-1 + beq $6,$0,$LC0 + move $2,$0 /* zero cy2 */ + + addiu $6,$6,-1 + beq $6,$0,$LC1 + lw $8,0($5) /* load new s1 limb as early as possible */ + +Loop: lw $10,0($4) + mflo $3 + mfhi $9 + addiu $5,$5,4 + addu $3,$3,$2 /* add old carry limb to low product limb */ + multu $8,$7 + lw $8,0($5) /* load new s1 limb as early as possible */ + addiu $6,$6,-1 /* decrement loop counter */ + sltu $2,$3,$2 /* carry from previous addition -> $2 */ + subu $3,$10,$3 + sgtu $10,$3,$10 + addu $2,$2,$10 + sw $3,0($4) + addiu $4,$4,4 + bne $6,$0,Loop /* should be "bnel" */ + addu $2,$9,$2 /* add high product limb and carry from addition */ + + /* cool down phase 1 */ +$LC1: lw $10,0($4) + mflo $3 + mfhi $9 + addu $3,$3,$2 + sltu $2,$3,$2 + multu $8,$7 + subu $3,$10,$3 + sgtu $10,$3,$10 + addu $2,$2,$10 + sw $3,0($4) + addiu $4,$4,4 + addu $2,$9,$2 /* add high product limb and carry from addition */ + + /* cool down phase 0 */ +$LC0: lw $10,0($4) + mflo $3 + mfhi $9 + addu $3,$3,$2 + sltu $2,$3,$2 + subu $3,$10,$3 + sgtu $10,$3,$10 + addu $2,$2,$10 + sw $3,0($4) + j $31 + addu $2,$9,$2 /* add high product limb and carry from addition */ From 0134d025bc4eb9daa8ec84efc10281405b8f6047 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:00:23 +0000 Subject: [PATCH 0924/4487] MIPS changes. --- sysdeps/mips/bsd-_setjmp.S | 43 +++-- sysdeps/mips/bsd-setjmp.S | 39 ++-- sysdeps/mips/dl-machine.h | 387 +++++++++++++++++++++++++++++-------- sysdeps/mips/setjmp.S | 43 +++-- sysdeps/mips/setjmp_aux.c | 27 +-- 5 files changed, 392 insertions(+), 147 deletions(-) diff --git a/sysdeps/mips/bsd-_setjmp.S b/sysdeps/mips/bsd-_setjmp.S index 78776cd3e5..f519f19359 100644 --- a/sysdeps/mips/bsd-_setjmp.S +++ b/sysdeps/mips/bsd-_setjmp.S @@ -1,21 +1,21 @@ /* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. MIPS version. -Copyright (C) 1994, 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. + Copyright (C) 1996, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* This just does a tail-call to `__sigsetjmp (ARG, 0)'. We cannot do it in C because it must be a tail-call, so frame-unwinding @@ -23,7 +23,14 @@ Cambridge, MA 02139, USA. */ #include -ENTRY (setjmp) - j C_SYMBOL_NAME (__sigsetjmp) - li a1, $0 /* Pass a second argument of zero. */ - .end setjmp +#ifdef PIC + .option pic2 +#endif +ENTRY (_setjmp) +#ifdef PIC + .cpload t9 +#endif + la t9, C_SYMBOL_NAME (__sigsetjmp) + nop + jr t9 + li a1, 0 /* Pass a second argument of zero. */ diff --git a/sysdeps/mips/bsd-setjmp.S b/sysdeps/mips/bsd-setjmp.S index 4742462e88..9a22700718 100644 --- a/sysdeps/mips/bsd-setjmp.S +++ b/sysdeps/mips/bsd-setjmp.S @@ -1,21 +1,21 @@ /* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. MIPS version. -Copyright (C) 1994, 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. + Copyright (C) 1996, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* This just does a tail-call to `__sigsetjmp (ARG, 1)'. We cannot do it in C because it must be a tail-call, so frame-unwinding @@ -23,7 +23,14 @@ Cambridge, MA 02139, USA. */ #include +#ifdef PIC + .option pic2 +#endif ENTRY (setjmp) - j C_SYMBOL_NAME (__sigsetjmp) +#ifdef PIC + .cpload t9 +#endif + la t9, C_SYMBOL_NAME (__sigsetjmp) + nop + jr t9 li a1, 1 /* Pass a second argument of one. */ - .end setjmp diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 422179c47d..ff7d371025 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -18,30 +18,25 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef dl_machine_h +#define dl_machine_h + #define ELF_MACHINE_NAME "MIPS" #include -#include -#include -#include -#include -#include /* Translate a processor specific dynamic tag to the index in l_info array. */ #define DT_MIPS(x) (DT_MIPS_##x - DT_LOPROC + DT_NUM) -#if 1 -/* XXX If FLAGS has the MAP_ALIGN bit, we need 64k alignment. */ -#ifndef MAP_ALIGN -#define MAP_ALIGN 0x1000 -#endif -#define ELF_MACHINE_ALIGN_MASK(flags) ((flags & MAP_ALIGN) ? 0xffff : 0) +#if 0 +/* We may need 64k alignment. */ +#define ELF_MACHINE_ALIGN_MASK 0xffff #endif /* If there is a DT_MIPS_RLD_MAP entry in the dynamic section, fill it in with the run-time address of the r_debug structure */ -#define ELF_MACHINE_SET_DEBUG(l,r) \ +#define ELF_MACHINE_DEBUG_SETUP(l,r) \ do { if ((l)->l_info[DT_MIPS (RLD_MAP)]) \ *(ElfW(Addr) *)((l)->l_info[DT_MIPS (RLD_MAP)]->d_un.d_ptr) = \ (ElfW(Addr)) (r); \ @@ -67,14 +62,16 @@ elf_mips_got_from_gpreg (ElfW(Addr) gpreg) /* FIXME: the offset of gp from GOT may be system-dependent. */ return (ElfW(Addr) *) (gpreg - 0x7ff0); } -/* Return the link-time address of _DYNAMIC. Conveniently, this is the - first element of the GOT. This must be inlined in a function which - uses global data. */ -static inline ElfW(Addr) -elf_machine_dynamic (void) + +/* Return the run-time address of the _GLOBAL_OFFSET_TABLE_. + Must be inlined in a function which uses global data. */ +static inline ElfW(Addr) * +elf_machine_got (void) { - register ElfW(Addr) gp asm ("$28"); - return * (ElfW(Addr) *) (gp - 0x7ff0); + ElfW(Addr) gp; + + __asm__ __volatile__("move %0, $28\n\t" : "=r" (gp)); + return elf_mips_got_from_gpreg (gp); } @@ -83,6 +80,15 @@ static inline ElfW(Addr) elf_machine_load_address (void) { ElfW(Addr) addr; +#ifdef __mips64 + asm (" .set noreorder\n" + " dla %0, here\n" + " bltzal $0, here\n" + " nop\n" + "here: dsubu %0, $31, %0\n" + " .set reorder\n" + : "=r" (addr)); +#else asm (" .set noreorder\n" " la %0, here\n" " bltzal $0, here\n" @@ -90,6 +96,7 @@ elf_machine_load_address (void) "here: subu %0, $31, %0\n" " .set reorder\n" : "=r" (addr)); +#endif return addr; } @@ -97,7 +104,7 @@ elf_machine_load_address (void) #define ELF_MIPS_GNU_GOT1_MASK 0x80000000 /* Relocate GOT. */ -static void +static inline void elf_machine_got_rel (struct link_map *map) { ElfW(Addr) *got; @@ -107,14 +114,14 @@ elf_machine_got_rel (struct link_map *map) const char *strtab = ((void *) map->l_addr + map->l_info[DT_STRTAB]->d_un.d_ptr); - ElfW(Addr) resolve (const ElfW(Sym) *sym) - { - const ElfW(Sym) *ref = sym; - ElfW(Addr) sym_loadaddr; - sym_loadaddr = _dl_lookup_symbol (strtab + sym->st_name, &ref, scope, - map->l_name, 0, 1); - return (ref)? sym_loadaddr + ref->st_value: 0; - } +#define RESOLVE_GOTSYM(sym) \ + ({ \ + const ElfW(Sym) *ref = sym; \ + ElfW(Addr) sym_loadaddr; \ + sym_loadaddr = _dl_lookup_symbol (strtab + sym->st_name, &ref, scope, \ + map->l_name, DL_LOOKUP_NOPLT); \ + (ref)? sym_loadaddr + ref->st_value: 0; \ + }) got = (ElfW(Addr) *) ((void *) map->l_addr + map->l_info[DT_PLTGOT]->d_un.d_ptr); @@ -147,39 +154,35 @@ elf_machine_got_rel (struct link_map *map) if (sym->st_value /* && maybe_stub (sym->st_value) */) *got = sym->st_value + map->l_addr; else - *got = resolve (sym); + *got = RESOLVE_GOTSYM (sym); } else /* if (*got == 0 || *got == QS) */ - *got = resolve (sym); + *got = RESOLVE_GOTSYM (sym); } else if (sym->st_shndx == SHN_COMMON) - *got = resolve (sym); + *got = RESOLVE_GOTSYM (sym); else if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC && *got != sym->st_value /* && maybe_stub (*got) */) *got += map->l_addr; - else if (ELFW(ST_TYPE) (sym->st_info) == STT_SECTION - && ELFW(ST_BIND) (sym->st_info) == STB_GLOBAL) + else if (ELFW(ST_TYPE) (sym->st_info) == STT_SECTION) { - if (sym->st_other == 0 && sym->st_shndx == SHN_ABS) - *got = sym->st_value + map->l_addr; /* only for _gp_disp */ - /* else SGI stuff ignored */ + if (sym->st_other == 0) + *got += map->l_addr; } else - *got = resolve (sym); + *got = RESOLVE_GOTSYM (sym); got++; sym++; } +#undef RESOLVE_GOTSYM *_dl_global_scope_end = NULL; return; } -/* The MIPS never uses Elfxx_Rela relocations. */ -#define ELF_MACHINE_NO_RELA 1 - /* Set up the loaded object described by L so its stub function will jump to the on-demand fixup code in dl-runtime.c. */ @@ -188,6 +191,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy) { ElfW(Addr) *got; extern void _dl_runtime_resolve (ElfW(Word)); + extern int _dl_mips_gnu_objects; if (lazy) { @@ -208,7 +212,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy) if ((got[1] & ELF_MIPS_GNU_GOT1_MASK) != 0) got[1] = (ElfW(Addr)) ((unsigned) l | ELF_MIPS_GNU_GOT1_MASK); else - ; /* Do nothing. */ + _dl_mips_gnu_objects = 0; } /* Relocate global offset table. */ @@ -219,29 +223,64 @@ elf_machine_runtime_setup (struct link_map *l, int lazy) /* Get link_map for this object. */ static inline struct link_map * -elf_machine_runtime_link_map (ElfW(Addr) gpreg) +elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc) { - ElfW(Addr) *got = elf_mips_got_from_gpreg (gpreg); - ElfW(Word) g1; - - g1 = ((ElfW(Word) *) got)[1]; + extern int _dl_mips_gnu_objects; /* got[1] is reserved to keep its link map address for the shared - object generated by gnu linker. If not so, we must search GOT - in object list slowly. XXX */ - if ((g1 & ELF_MIPS_GNU_GOT1_MASK) != 0) - return (struct link_map *) (g1 & ~ELF_MIPS_GNU_GOT1_MASK); - else + object generated by gnu linker. If all are such object, we can + find link map from current GPREG simply. If not so, get link map + for callers object containing STUB_PC. */ + + if (_dl_mips_gnu_objects) + { + ElfW(Addr) *got = elf_mips_got_from_gpreg (gpreg); + ElfW(Word) g1; + + g1 = ((ElfW(Word) *) got)[1]; + + if ((g1 & ELF_MIPS_GNU_GOT1_MASK) != 0) + return (struct link_map *) (g1 & ~ELF_MIPS_GNU_GOT1_MASK); + } + { struct link_map *l = _dl_loaded; + struct link_map *ret = 0; + ElfW(Addr) candidate = 0; + while (l) { - if (got == (ElfW(Addr) *) ((void *) l->l_addr - + l->l_info[DT_PLTGOT]->d_un.d_ptr)) - return l; + ElfW(Addr) base = 0; + const ElfW(Phdr) *p = l->l_phdr; + ElfW(Half) this, nent = l->l_phnum; + + /* Get the base. */ + for (this = 0; this < nent; this++) + if (p[this].p_type == PT_LOAD) + { + base = p[this].p_vaddr + l->l_addr; + break; + } + if (! base) + { + l = l->l_next; + continue; + } + + /* Find closest link base addr. */ + if ((base < stub_pc) && (candidate < base)) + { + candidate = base; + ret = l; + } l = l->l_next; } + if (candidate && ret && (candidate < stub_pc)) + return ret; + else if (!candidate) + return _dl_loaded; } + _dl_signal_error (0, NULL, "cannot find runtime link map"); } @@ -255,17 +294,117 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg) t8 index for this function symbol in .dynsym to usual c arguments. */ +#ifdef __mips64 +#define ELF_MACHINE_RUNTIME_TRAMPOLINE \ +/* The flag _dl_mips_gnu_objects is set if all dynamic objects are \ + generated by the gnu linker. */\ +int _dl_mips_gnu_objects = 1;\ +\ +/* This is called from assembly stubs below which the compiler can't see. */ \ +static ElfW(Addr) \ +__dl_runtime_resolve (ElfW(Word), ElfW(Word), ElfW(Addr), ElfW(Addr)) \ + __attribute__ ((unused)); \ +\ +static ElfW(Addr) \ +__dl_runtime_resolve (ElfW(Word) sym_index,\ + ElfW(Word) return_address,\ + ElfW(Addr) old_gpreg,\ + ElfW(Addr) stub_pc)\ +{\ + struct link_map *l = elf_machine_runtime_link_map (old_gpreg, stub_pc);\ + const ElfW(Sym) *const symtab\ + = (const ElfW(Sym) *) (l->l_addr + l->l_info[DT_SYMTAB]->d_un.d_ptr);\ + const char *strtab\ + = (void *) (l->l_addr + l->l_info[DT_STRTAB]->d_un.d_ptr);\ + const ElfW(Addr) *got\ + = (const ElfW(Addr) *) (l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr);\ + const ElfW(Word) local_gotno\ + = (const ElfW(Word)) l->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val;\ + const ElfW(Word) gotsym\ + = (const ElfW(Word)) l->l_info[DT_MIPS (GOTSYM)]->d_un.d_val;\ + const ElfW(Sym) *definer;\ + ElfW(Addr) loadbase;\ + ElfW(Addr) funcaddr;\ + struct link_map **scope;\ +\ + /* Look up the symbol's run-time value. */\ + scope = _dl_object_relocation_scope (l);\ + definer = &symtab[sym_index];\ +\ + loadbase = _dl_lookup_symbol (strtab + definer->st_name, &definer,\ + scope, l->l_name, DL_LOOKUP_NOPLT);\ +\ + *_dl_global_scope_end = NULL;\ +\ + /* Apply the relocation with that value. */\ + funcaddr = loadbase + definer->st_value;\ + *(got + local_gotno + sym_index - gotsym) = funcaddr;\ +\ + return funcaddr;\ +}\ +\ +asm ("\n\ + .text\n\ + .align 3\n\ + .globl _dl_runtime_resolve\n\ + .type _dl_runtime_resolve,@function\n\ + .ent _dl_runtime_resolve\n\ +_dl_runtime_resolve:\n\ + .set noreorder\n\ + # Save old GP to $3.\n\ + move $3,$28\n\ + # Modify t9 ($25) so as to point .cpload instruction.\n\ + daddu $25,2*8\n\ + # Compute GP.\n\ + .cpload $25\n\ + .set reorder\n\ + # Save slot call pc.\n\ + move $2, $31\n\ + # Save arguments and sp value in stack.\n\ + dsubu $29, 10*8\n\ + .cprestore 8*8\n\ + sd $15, 9*8($29)\n\ + sd $4, 3*8($29)\n\ + sd $5, 4*8($29)\n\ + sd $6, 5*8($29)\n\ + sd $7, 6*8($29)\n\ + sd $16, 7*8($29)\n\ + move $16, $29\n\ + move $4, $24\n\ + move $5, $15\n\ + move $6, $3\n\ + move $7, $2\n\ + jal __dl_runtime_resolve\n\ + move $29, $16\n\ + ld $31, 9*8($29)\n\ + ld $4, 3*8($29)\n\ + ld $5, 4*8($29)\n\ + ld $6, 5*8($29)\n\ + ld $7, 6*8($29)\n\ + ld $16, 7*8($29)\n\ + daddu $29, 10*8\n\ + move $25, $2\n\ + jr $25\n\ + .end _dl_runtime_resolve\n\ +"); +#else #define ELF_MACHINE_RUNTIME_TRAMPOLINE \ +/* The flag _dl_mips_gnu_objects is set if all dynamic objects are \ + generated by the gnu linker. */\ +int _dl_mips_gnu_objects = 1;\ +\ /* This is called from assembly stubs below which the compiler can't see. */ \ -static ElfW(Addr) __dl_runtime_resolve (ElfW(Word), ElfW(Word), ElfW(Addr)) \ +static ElfW(Addr) \ +__dl_runtime_resolve (ElfW(Word), ElfW(Word), ElfW(Addr), ElfW(Addr)) \ __attribute__ ((unused)); \ \ static ElfW(Addr) \ __dl_runtime_resolve (ElfW(Word) sym_index,\ ElfW(Word) return_address,\ - ElfW(Addr) old_gpreg)\ + ElfW(Addr) old_gpreg,\ + ElfW(Addr) stub_pc)\ {\ - struct link_map *l = elf_machine_runtime_link_map (old_gpreg);\ + struct link_map *l = elf_machine_runtime_link_map (old_gpreg, stub_pc);\ const ElfW(Sym) *const symtab\ = (const ElfW(Sym) *) (l->l_addr + l->l_info[DT_SYMTAB]->d_un.d_ptr);\ const char *strtab\ @@ -286,7 +425,7 @@ __dl_runtime_resolve (ElfW(Word) sym_index,\ definer = &symtab[sym_index];\ \ loadbase = _dl_lookup_symbol (strtab + definer->st_name, &definer,\ - scope, l->l_name, 0, 1);\ + scope, l->l_name, DL_LOOKUP_NOPLT);\ \ *_dl_global_scope_end = NULL;\ \ @@ -312,6 +451,8 @@ _dl_runtime_resolve:\n\ # Compute GP.\n\ .cpload $25\n\ .set reorder\n\ + # Save slot call pc.\n\ + move $2, $31\n\ # Save arguments and sp value in stack.\n\ subu $29, 40\n\ .cprestore 32\n\ @@ -325,6 +466,7 @@ _dl_runtime_resolve:\n\ move $4, $24\n\ move $5, $15\n\ move $6, $3\n\ + move $7, $2\n\ jal __dl_runtime_resolve\n\ move $29, $16\n\ lw $31, 36($29)\n\ @@ -338,15 +480,91 @@ _dl_runtime_resolve:\n\ jr $25\n\ .end _dl_runtime_resolve\n\ "); +#endif /* Mask identifying addresses reserved for the user program, where the dynamic linker should not map anything. */ #define ELF_MACHINE_USER_ADDRESS_MASK 0x00000000UL + + /* Initial entry point code for the dynamic linker. The C function `_dl_start' is the real entry point; its return value is the user program's entry point. */ +#ifdef __mips64 +#define RTLD_START asm ("\ + .text\n\ + .align 3\n\ + .globl _start\n\ + .globl _dl_start_user\n\ + .ent _start\n\ +_start:\n\ + .set noreorder\n\ + bltzal $0, 0f\n\ + nop\n\ +0: .cpload $31\n\ + .set reorder\n\ + # i386 ABI book says that the first entry of GOT holds\n\ + # the address of the dynamic structure. Though MIPS ABI\n\ + # doesn't say nothing about this, I emulate this here.\n\ + dla $4, _DYNAMIC\n\ + sd $4, -0x7ff0($28)\n\ + move $4, $29\n\ + jal _dl_start\n\ + # Get the value of label '_dl_start_user' in t9 ($25).\n\ + dla $25, _dl_start_user\n\ +_dl_start_user:\n\ + .set noreorder\n\ + .cpload $25\n\ + .set reorder\n\ + move $16, $28\n\ + # Save the user entry point address in saved register.\n\ + move $17, $2\n\ + # See if we were run as a command with the executable file\n\ + # name as an extra leading argument.\n\ + ld $2, _dl_skip_args\n\ + beq $2, $0, 1f\n\ + # Load the original argument count.\n\ + ld $4, 0($29)\n\ + # Subtract _dl_skip_args from it.\n\ + dsubu $4, $2\n\ + # Adjust the stack pointer to skip _dl_skip_args words.\n\ + dsll $2,2\n\ + daddu $29, $2\n\ + # Save back the modified argument count.\n\ + sd $4, 0($29)\n\ + # Get _dl_default_scope[2] as argument in _dl_init_next call below.\n\ +1: dla $2, _dl_default_scope\n\ + ld $4, 2*8($2)\n\ + # Call _dl_init_next to return the address of an initializer\n\ + # function to run.\n\ + jal _dl_init_next\n\ + move $28, $16\n\ + # Check for zero return, when out of initializers.\n\ + beq $2, $0, 2f\n\ + # Call the shared object initializer function.\n\ + move $25, $2\n\ + ld $4, 0($29)\n\ + ld $5, 1*8($29)\n\ + ld $6, 2*8($29)\n\ + ld $7, 3*8($29)\n\ + jalr $25\n\ + move $28, $16\n\ + # Loop to call _dl_init_next for the next initializer.\n\ + b 1b\n\ + # Pass our finalizer function to the user in ra.\n\ +2: dla $31, _dl_fini\n\ + # Jump to the user entry point.\n\ + move $25, $17\n\ + ld $4, 0($29)\n\ + ld $5, 1*8($29)\n\ + ld $6, 2*8$29)\n\ + ld $7, 3*8($29)\n\ + jr $25\n\ + .end _start\n\ +"); +#else #define RTLD_START asm ("\ .text\n\ .globl _start\n\ @@ -417,6 +635,12 @@ _dl_start_user:\n\ jr $25\n\ .end _start\n\ "); +#endif + +/* The MIPS never uses Elfxx_Rela relocations. */ +#define ELF_MACHINE_NO_RELA 1 + +#endif /* !dl_machine_h */ #ifdef RESOLVE @@ -428,34 +652,37 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, const ElfW(Sym) *sym, const struct r_found_version *version) { ElfW(Addr) *const reloc_addr = (void *) (map->l_addr + reloc->r_offset); - ElfW(Addr) loadbase, undo; + ElfW(Addr) loadbase; + ElfW(Addr) undo __attribute__ ((unused)); switch (ELFW(R_TYPE) (reloc->r_info)) { case R_MIPS_REL32: - if (ELFW(ST_BIND) (sym->st_info) == STB_LOCAL - && (ELFW(ST_TYPE) (sym->st_info) == STT_SECTION - || ELFW(ST_TYPE) (sym->st_info) == STT_NOTYPE)) - *reloc_addr += map->l_addr; - else - { + { + ElfW(Addr) undo = 0; + + if (ELFW(ST_BIND) (sym->st_info) == STB_LOCAL + && (ELFW(ST_TYPE) (sym->st_info) == STT_SECTION + || ELFW(ST_TYPE) (sym->st_info) == STT_NOTYPE)) + { + *reloc_addr += map->l_addr; + break; + } #ifndef RTLD_BOOTSTRAP - /* This is defined in rtld.c, but nowhere in the static libc.a; - make the reference weak so static programs can still link. This - declaration cannot be done when compiling rtld.c (i.e. #ifdef - RTLD_BOOTSTRAP) because rtld.c contains the common defn for - _dl_rtld_map, which is incompatible with a weak decl in the same - file. */ - weak_extern (_dl_rtld_map); - if (map == &_dl_rtld_map) - /* Undo the relocation done here during bootstrapping. Now we will - relocate it anew, possibly using a binding found in the user - program or a loaded library rather than the dynamic linker's - built-in definitions used while loading those libraries. */ - undo = map->l_addr + sym->st_value; - else + /* This is defined in rtld.c, but nowhere in the static libc.a; + make the reference weak so static programs can still link. This + declaration cannot be done when compiling rtld.c (i.e. #ifdef + RTLD_BOOTSTRAP) because rtld.c contains the common defn for + _dl_rtld_map, which is incompatible with a weak decl in the same + file. */ + weak_extern (_dl_rtld_map); + if (map == &_dl_rtld_map) + /* Undo the relocation done here during bootstrapping. Now we will + relocate it anew, possibly using a binding found in the user + program or a loaded library rather than the dynamic linker's + built-in definitions used while loading those libraries. */ + undo = map->l_addr + sym->st_value; #endif - undo = 0; loadbase = RESOLVE (&sym, version, 0); *reloc_addr += (sym ? (loadbase + sym->st_value) : 0) - undo; } diff --git a/sysdeps/mips/setjmp.S b/sysdeps/mips/setjmp.S index 0f5dba3a60..bc42dcb03b 100644 --- a/sysdeps/mips/setjmp.S +++ b/sysdeps/mips/setjmp.S @@ -1,32 +1,35 @@ -/* Copyright (C) 1992, 1994 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1996, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include /* The function __sigsetjmp_aux saves all the registers, but it can't reliably access the stack or frame pointers, so we pass them in as extra arguments. */ +#ifdef PIC + .option pic2 +#endif ENTRY (__sigsetjmp) +#ifdef PIC + .cpload t9 +#endif move a2, sp -#ifdef __sgi__ move a3, fp -#else - move a3, $fp -#endif - j __sigsetjmp_aux - .end __sigsetjmp + la t9, __sigsetjmp_aux + nop + jr t9 diff --git a/sysdeps/mips/setjmp_aux.c b/sysdeps/mips/setjmp_aux.c index d478e3fdc9..d06732efc2 100644 --- a/sysdeps/mips/setjmp_aux.c +++ b/sysdeps/mips/setjmp_aux.c @@ -1,20 +1,21 @@ -/* Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include From dd139897314af873b1ae1fdccd7564f8b220273b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:01:37 +0000 Subject: [PATCH 0925/4487] MIPS specific ELF startup code --- sysdeps/mips/elf/start.S | 181 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 181 insertions(+) create mode 100644 sysdeps/mips/elf/start.S diff --git a/sysdeps/mips/elf/start.S b/sysdeps/mips/elf/start.S new file mode 100644 index 0000000000..0db3a04a7d --- /dev/null +++ b/sysdeps/mips/elf/start.S @@ -0,0 +1,181 @@ +/* Startup code compliant to the ELF Mips ABI. +Copyright (C) 1995 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* This is the canonical entry point, usually the first thing in the text + segment. The SVR4/Mips ABI (pages 3-31, 3-32) says that when the entry + point runs, most registers' values are unspecified, except for: + + v1 ($2) Contains a function pointer to be registered with `atexit'. + This is how the dynamic linker arranges to have DT_FINI + functions called for shared libraries that have been loaded + before this code runs. + + sp ($29) The stack contains the arguments and environment: + 0(%esp) argc + 4(%esp) argv[0] + ... + (4*argc)(%esp) NULL + (4*(argc+1))(%esp) envp[0] + ... + NULL + ra ($31) The return address register is set to zero so that programs + that search backword through stack frames recognize the last + stack frame. +*/ + +#ifdef PIC +/* A macro to (re)initialize gp. We can get the run time address of 0f in + ra ($31) by blezal instruction. In this early phase, we can't save gp + in stack and .cprestore doesn't work properly. So we set gp by using + this macro. */ +#define SET_GP \ + .set noreorder; \ + bltzal $0,0f; \ + nop; \ +0: .cpload $31; \ + .set reorder; +#endif + + .text + .globl _start +_start: +#ifdef PIC + SET_GP +#endif + move $31, $0 + + /* $2 contains the address of the shared library termination + function, which we will register with `atexit' to be called by + `exit'. I suspect that on some systems, and when statically + linked, this will not be set by anything to any function + pointer; hopefully it will be zero so we don't try to call + random pointers. */ + beq $2, $0, nofini + move $4, $2 + jal atexit +#ifdef PIC + SET_GP +#endif +nofini: + + /* Do essential libc initialization. In statically linked + programs under the GNU Hurd, this is what sets up the + arguments on the stack for the code below. Since the argument + registers (a0 - a3) saved to the first 4 stack entries by + the prologue of __libc_init_first, we preload them to + prevent clobbering the stack tops. In Hurd case, stack pointer + ($29) may be VM_MAX_ADDRESS here. If so, we must modify it. */ +#if (__mips64) + dli $4, 0x10000000000 + bne $29, $4, 1f + dsubu $29, 32 + sd $0, 0($29) + sd $0, 8($29) + sd $0, 16($29) + sd $0, 24($29) +1: + ld $4, 0($29) + ld $5, 8($29) + ld $6, 16($29) + ld $7, 24($29) +#else /* __mips64 */ + li $4, 0x80000000 + bne $29, $4, 1f + subu $29, 16 + sw $0, 0($29) + sw $0, 4($29) + sw $0, 8($29) + sw $0, 12($29) +1: + lw $4, 0($29) + lw $5, 4($29) + lw $6, 8($29) + lw $7, 12($29) +#endif /* __mips64 */ + + jal __libc_init_first +#ifdef PIC + SET_GP +#endif +#if (__mips64) + ld $4, 0($29) + ld $5, 8($29) + ld $6, 16($29) + ld $7, 24($29) +#else /* __mips64 */ + lw $4, 0($29) + lw $5, 4($29) + lw $6, 8($29) + lw $7, 12($29) +#endif /* __mips64 */ + + /* Call `_init', which is the entry point to our own `.init' + section; and register with `atexit' to have `exit' call + `_fini', which is the entry point to our own `.fini' section. */ + jal _init +#ifdef PIC + SET_GP +#endif +#if (__mips64) + dla $4, _fini +#else /* __mips64 */ + la $4, _fini +#endif /* __mips64 */ + + jal atexit +#ifdef PIC + SET_GP +#endif + + /* Extract the arguments and environment as encoded on the stack + and set up the arguments for `main': argc, argv, envp. */ +#if (__mips64) + ld $4, 0($29) /* argc */ + daddu $5, $29, 8 /* argv */ + dsll $6, $4, 3 + daddu $6, $6, 8 + daddu $6, $5, $6 /* envp = &argv[argc + 1] */ +#else /* __mips64 */ + lw $4, 0($29) /* argc */ + addu $5, $29, 4 /* argv */ + sll $6, $4, 2 + addu $6, $6, 4 + addu $6, $5, $6 /* envp = &argv[argc + 1] */ +#endif /* __mips64 */ + + /* Call the user's main function, and exit with its value. */ + jal main +#ifdef PIC + SET_GP +#endif + move $4, $2 + jal exit /* This should never return. */ +hlt: b hlt /* Crash if somehow it does return. */ + +/* Define a symbol for the first piece of initialized data. */ + .data + .globl __data_start +__data_start: +#if (__mips64) + .dword 0 +#else /* __mips64 */ + .word 0 +#endif /* __mips64 */ + .weak data_start + data_start = __data_start From 781b52c526d66f92f98e5fcc2c8b7f201f1bba8b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:02:21 +0000 Subject: [PATCH 0926/4487] MIPS support. --- sysdeps/mips/fpu_control.h | 96 +++++++++++++++++++++++++++++++++++++ sysdeps/mips/init-first.c | 64 +++++++++++++++++++++++++ sysdeps/mips/machine-gmon.h | 57 ++++++++++++++++++++++ 3 files changed, 217 insertions(+) create mode 100644 sysdeps/mips/fpu_control.h create mode 100644 sysdeps/mips/init-first.c create mode 100644 sysdeps/mips/machine-gmon.h diff --git a/sysdeps/mips/fpu_control.h b/sysdeps/mips/fpu_control.h new file mode 100644 index 0000000000..36e05a4f6e --- /dev/null +++ b/sysdeps/mips/fpu_control.h @@ -0,0 +1,96 @@ +/* FPU control word bits. Mips version. + Copyright (C) 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Olaf Flebbe. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _FPU_CONTROL_H +#define _FPU_CONTROL_H + +/* FP control/status register bit assignments. + * + * 31-25 24 23 22-18 17-12 11-7 6-2 1-0 + * (cause) (enables) (flags) + * | reserved | FS | C | reserved | E V Z O U I | V Z O U I | V Z O U I | RM + * + * FS: When set, denormalized results are flushed to zero instead of + * causing an unimplemented operation exception. + * C: Condition bit. + * E: Unimplemented Operation. + * V: Invalid Operation. + * Z: Division by zero. + * O: Overflow. + * U: Underflow. + * I: Inexact Operation + * RM: Rounding mode bits + * 00 (RN) - rounding to nearest + * 01 (RZ) - rounding toward zero + * 10 (RP) - rounding down (toward - infinity) + * 11 (RM) - rounding up (toward + infinity) + * + */ + +#include + +/* masking of interrupts */ +#define _FPU_MASK_IM (1 << 11) +#define _FPU_MASK_DM (1 << 24) /* XXX */ +#define _FPU_MASK_ZM (1 << 10) +#define _FPU_MASK_OM (1 << 9) +#define _FPU_MASK_UM (1 << 8) +#define _FPU_MASK_PM (1 << 7) + +/* precision control */ +#define _FPU_EXTENDED 0 +#define _FPU_DOUBLE 0 +#define _FPU_SINGLE 0 + +/* rounding control */ +#define _FPU_RC_NEAREST 0x0 /* RECOMMENDED */ +#define _FPU_RC_DOWN 0x2 +#define _FPU_RC_UP 0x3 +#define _FPU_RC_ZERO 0x1 + +#define _FPU_RESERVED 0xfe7c0000 /* Reserved bits */ + + +/* The fdlibm code requires strict IEEE double precision arithmetic, + and no interrupts for exceptions, rounding to nearest. */ + +#define _FPU_DEFAULT 0x0 + +/* IEEE: same as above, but exceptions */ +#define _FPU_IEEE (0x1f << 7) + +/* Type of the control word. */ +typedef unsigned int fpu_control_t; + +/* Macros for accessing the hardware control word. */ +#define _FPU_GETCW(cw) __asm__ ("cfc1 %0, $31; nop; nop" : "=r" (cw)) +#define _FPU_SETCW(cw) __asm__ ("ctc1 %0, $31; nop; nop" : : "r" (cw)) + +/* Default control word set at startup. */ +extern fpu_control_t __fpu_control; + +__BEGIN_DECLS + +/* Called at startup. It can be used to manipulate fpu control register. */ +extern void __setfpucw __P ((fpu_control_t)); + +__END_DECLS + +#endif /* fpu_control.h */ diff --git a/sysdeps/mips/init-first.c b/sysdeps/mips/init-first.c new file mode 100644 index 0000000000..3fc4b7bc04 --- /dev/null +++ b/sysdeps/mips/init-first.c @@ -0,0 +1,64 @@ +/* Initialization code run first thing by the ELF startup code. For mips/Unix. + Copyright (C) 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +extern void __libc_init (int, char **, char **); +extern void __libc_global_ctors (void); + + +static void +init (int *data) +{ + int argc = *data; + char **argv = (void *) (data + 1); + char **envp = &argv[argc + 1]; + + __environ = envp; + __libc_init (argc, argv, envp); +} + +#ifdef PIC +/* This function is called to initialize the shared C library. + It is called just before the user _start code from mips/elf/start.S, + with the stack set up as that code gets it. */ + +/* NOTE! The linker notices the magical name `_init' and sets the DT_INIT + pointer in the dynamic section based solely on that. It is convention + for this function to be in the `.init' section, but the symbol name is + the only thing that really matters!! */ +/*void _init (int argc, ...) __attribute__ ((unused, section (".init")));*/ + +void +_init (int argc, ...) +{ + init (&argc); + + __libc_global_ctors (); +} +#endif + + +void +__libc_init_first (int argc __attribute__ ((unused)), ...) +{ +#ifndef PIC + init (&argc); +#endif +} diff --git a/sysdeps/mips/machine-gmon.h b/sysdeps/mips/machine-gmon.h new file mode 100644 index 0000000000..a01b1746f4 --- /dev/null +++ b/sysdeps/mips/machine-gmon.h @@ -0,0 +1,57 @@ +/* Machine-specific calling sequence for `mcount' profiling function. MIPS + Copyright (C) 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#define _MCOUNT_DECL static void __mcount + +/* Call __mcount with our the return PC for our caller, + and the return PC our caller will return to. */ +#ifdef PIC +#define CPLOAD ".cpload $25;" +#else +#define CPLOAD +#endif + +#define MCOUNT asm(\ + ".globl _mcount;" \ + ".align 2;" \ + ".type _mcount,@function;" \ + "_mcount:;" \ + ".set noreorder;" \ + ".set noat;" \ + CPLOAD \ + "sw $4,8($29);" \ + "sw $5,12($29);" \ + "sw $6,16($29);" \ + "sw $7,20($29);" \ + "sw $1,0($29);" \ + "sw $31,4($29);" \ + "move $5,$31;" \ + "jal __mcount;" \ + "move $4,$1;" \ + "lw $4,8($29);" \ + "lw $5,12($29);" \ + "lw $6,16($29);" \ + "lw $7,20($29);" \ + "lw $31,4($29);" \ + "lw $1,0($29);" \ + "addu $29,$29,8;" \ + "j $31;" \ + "move $31,$1;" \ + ".set reorder;" \ + ".set at"); From 08fe606443f6ae41f3c42ad87a2a31ae6953d101 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:02:34 +0000 Subject: [PATCH 0927/4487] MIPS specific byte order definition. --- sysdeps/mips/bits/endian.h | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 sysdeps/mips/bits/endian.h diff --git a/sysdeps/mips/bits/endian.h b/sysdeps/mips/bits/endian.h new file mode 100644 index 0000000000..ba555cd76e --- /dev/null +++ b/sysdeps/mips/bits/endian.h @@ -0,0 +1,4 @@ +/* The MIPS architecture has selectable endianness. + This file is for a machine using big-endian mode. */ + +#define __BYTE_ORDER __BIG_ENDIAN From 4f389d4c51e8eccfaecb8d019e1d881da141625f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:02:43 +0000 Subject: [PATCH 0928/4487] MIPS specific setjmp buffer. --- sysdeps/mips/bits/setjmp.h | 53 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 sysdeps/mips/bits/setjmp.h diff --git a/sysdeps/mips/bits/setjmp.h b/sysdeps/mips/bits/setjmp.h new file mode 100644 index 0000000000..7e570c6bff --- /dev/null +++ b/sysdeps/mips/bits/setjmp.h @@ -0,0 +1,53 @@ +/* Define the machine-dependent type `jmp_buf'. MIPS version. + Copyright (C) 1992, 1993, 1995, 1997 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +typedef struct + { + /* Program counter. */ + __ptr_t __pc; + + /* Stack pointer. */ + __ptr_t __sp; + + /* Callee-saved registers s0 through s7. */ + int __regs[8]; + + /* The frame pointer. */ + __ptr_t __fp; + + /* The global pointer. */ + __ptr_t __gp; + + /* Floating point status register. */ + int __fpc_csr; + + /* Callee-saved floating point registers. */ + double __fpregs[6]; + } __jmp_buf[1]; + +#ifdef __USE_MISC +/* Offset to the program counter in `jmp_buf'. */ +# define JB_PC 0 +#endif + + +/* Test if longjmp to JMPBUF would unwind the frame + containing a local variable at ADDRESS. */ +#define _JMPBUF_UNWINDS(jmpbuf, address) \ + ((__ptr_t) (address) < (jmpbuf)[0].__sp) From 6e9524434b38bc60b7c37f6046c0cb9ca410e430 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:02:58 +0000 Subject: [PATCH 0929/4487] MISP/DEC byte order definition. --- sysdeps/mips/dec/{bytesex.h => bits/endian.h} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sysdeps/mips/dec/{bytesex.h => bits/endian.h} (100%) diff --git a/sysdeps/mips/dec/bytesex.h b/sysdeps/mips/dec/bits/endian.h similarity index 100% rename from sysdeps/mips/dec/bytesex.h rename to sysdeps/mips/dec/bits/endian.h From c8eeac3b7138aa534accb2cb255cc9ec06dfb72a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:03:54 +0000 Subject: [PATCH 0930/4487] Say it's a 6t4 bit machine. --- sysdeps/mips/mips64/Implies | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/mips/mips64/Implies diff --git a/sysdeps/mips/mips64/Implies b/sysdeps/mips/mips64/Implies new file mode 100644 index 0000000000..a8cae95f9d --- /dev/null +++ b/sysdeps/mips/mips64/Implies @@ -0,0 +1 @@ +wordsize-64 From 6a37465853baac2fffe0f18c384901c478677990 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:05:01 +0000 Subject: [PATCH 0931/4487] MIPS64 specific setjmp buffer --- sysdeps/mips/mips64/bits/setjmp.h | 54 +++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 sysdeps/mips/mips64/bits/setjmp.h diff --git a/sysdeps/mips/mips64/bits/setjmp.h b/sysdeps/mips/mips64/bits/setjmp.h new file mode 100644 index 0000000000..b108540505 --- /dev/null +++ b/sysdeps/mips/mips64/bits/setjmp.h @@ -0,0 +1,54 @@ +/* Define the machine-dependent type `jmp_buf'. MIPS version. + Copyright (C) 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Brendan Kehoe (brendan@zen.org). + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +typedef struct + { + /* Program counter. */ + __ptr_t __pc; + + /* Stack pointer. */ + __ptr_t __sp; + + /* Callee-saved registers s0 through s7. */ + int __regs[8]; + + /* The frame pointer. */ + __ptr_t __fp; + + /* The global pointer. */ + __ptr_t __gp; + + /* Floating point status register. */ + int __fpc_csr; + + /* Callee-saved floating point registers. */ + double __fpregs[8]; + } __jmp_buf[1]; + +#ifdef __USE_MISC +/* Offset to the program counter in `jmp_buf'. */ +# define JB_PC 0 +#endif + + +/* Test if longjmp to JMPBUF would unwind the frame + containing a local variable at ADDRESS. */ +#define _JMPBUF_UNWINDS(jmpbuf, address) \ + ((__ptr_t) (address) < (jmpbuf)[0].__sp) From d0c2d3b303a138c8df8f5a5a998bbdff6c879ab5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:06:13 +0000 Subject: [PATCH 0932/4487] MIPS64 support. --- sysdeps/mips/mips64/__longjmp.c | 85 ++++++++++++++++++++ sysdeps/mips/mips64/add_n.S | 129 ++++++++++++++++++++++++++++++ sysdeps/mips/mips64/addmul_1.S | 106 ++++++++++++++++++++++++ sysdeps/mips/mips64/bsd-_setjmp.S | 36 +++++++++ sysdeps/mips/mips64/bsd-setjmp.S | 36 +++++++++ sysdeps/mips/mips64/gmp-mparam.h | 4 +- sysdeps/mips/mips64/lshift.S | 104 ++++++++++++++++++++++++ sysdeps/mips/mips64/mul_1.S | 94 ++++++++++++++++++++++ sysdeps/mips/mips64/rshift.S | 101 +++++++++++++++++++++++ sysdeps/mips/mips64/setjmp.S | 35 ++++++++ sysdeps/mips/mips64/setjmp_aux.c | 67 ++++++++++++++++ sysdeps/mips/mips64/sub_n.S | 129 ++++++++++++++++++++++++++++++ sysdeps/mips/mips64/submul_1.S | 106 ++++++++++++++++++++++++ 13 files changed, 1030 insertions(+), 2 deletions(-) create mode 100644 sysdeps/mips/mips64/__longjmp.c create mode 100644 sysdeps/mips/mips64/add_n.S create mode 100644 sysdeps/mips/mips64/addmul_1.S create mode 100644 sysdeps/mips/mips64/bsd-_setjmp.S create mode 100644 sysdeps/mips/mips64/bsd-setjmp.S create mode 100644 sysdeps/mips/mips64/lshift.S create mode 100644 sysdeps/mips/mips64/mul_1.S create mode 100644 sysdeps/mips/mips64/rshift.S create mode 100644 sysdeps/mips/mips64/setjmp.S create mode 100644 sysdeps/mips/mips64/setjmp_aux.c create mode 100644 sysdeps/mips/mips64/sub_n.S create mode 100644 sysdeps/mips/mips64/submul_1.S diff --git a/sysdeps/mips/mips64/__longjmp.c b/sysdeps/mips/mips64/__longjmp.c new file mode 100644 index 0000000000..551daa4895 --- /dev/null +++ b/sysdeps/mips/mips64/__longjmp.c @@ -0,0 +1,85 @@ +/* Copyright (C) 1992, 1995, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Brendan Kehoe (brendan@zen.org). + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +#undef __longjmp + +#ifndef __GNUC__ + #error This file uses GNU C extensions; you must compile with GCC. +#endif + +void +__longjmp (env, val_arg) + __jmp_buf env; + int val_arg; +{ + /* gcc 1.39.19 miscompiled the longjmp routine (as it did setjmp before + the hack around it); force it to use $a1 for the longjmp value. + Without this it saves $a1 in a register which gets clobbered + along the way. */ + register int val asm ("a1"); + + /* Pull back the floating point callee-saved registers. */ + asm volatile ("l.d $f24, %0" : : "m" (env[0].__fpregs[0])); + asm volatile ("l.d $f25, %0" : : "m" (env[0].__fpregs[1])); + asm volatile ("l.d $f26, %0" : : "m" (env[0].__fpregs[2])); + asm volatile ("l.d $f27, %0" : : "m" (env[0].__fpregs[3])); + asm volatile ("l.d $f28, %0" : : "m" (env[0].__fpregs[4])); + asm volatile ("l.d $f29, %0" : : "m" (env[0].__fpregs[5])); + asm volatile ("l.d $f30, %0" : : "m" (env[0].__fpregs[6])); + asm volatile ("l.d $f31, %0" : : "m" (env[0].__fpregs[7])); + + /* Restore the stack pointer. */ + asm volatile ("ld $29, %0" : : "m" (env[0].__sp)); + + /* Get and reconstruct the floating point csr. */ + asm volatile ("lw $2, %0" : : "m" (env[0].__fpc_csr)); + asm volatile ("ctc1 $2, $31"); + + /* Get the FP. */ + asm volatile ("ld $30, %0" : : "m" (env[0].__fp)); + + /* Get the GP. */ + asm volatile ("ld $gp, %0" : : "m" (env[0].__gp)); + + /* Get the callee-saved registers. */ + asm volatile ("ld $16, %0" : : "m" (env[0].__regs[0])); + asm volatile ("ld $17, %0" : : "m" (env[0].__regs[1])); + asm volatile ("ld $18, %0" : : "m" (env[0].__regs[2])); + asm volatile ("ld $19, %0" : : "m" (env[0].__regs[3])); + asm volatile ("ld $20, %0" : : "m" (env[0].__regs[4])); + asm volatile ("ld $21, %0" : : "m" (env[0].__regs[5])); + asm volatile ("ld $22, %0" : : "m" (env[0].__regs[6])); + asm volatile ("ld $23, %0" : : "m" (env[0].__regs[7])); + + /* Get the PC. */ + asm volatile ("ld $31, %0" : : "m" (env[0].__pc)); + + /* Give setjmp 1 if given a 0, or what they gave us if non-zero. */ + if (val == 0) + asm volatile ("dli $2, 1"); + else + asm volatile ("move $2, %0" : : "r" (val)); + + asm volatile ("j $31"); + + abort (); +} diff --git a/sysdeps/mips/mips64/add_n.S b/sysdeps/mips/mips64/add_n.S new file mode 100644 index 0000000000..ad93d9d081 --- /dev/null +++ b/sysdeps/mips/mips64/add_n.S @@ -0,0 +1,129 @@ +/* MIPS3 __mpn_add_n -- Add two limb vectors of the same length > 0 and + * store sum in a third limb vector. + * + * Copyright (C) 1995 Free Software Foundation, Inc. + * + * This file is part of the GNU MP Library. + * + * The GNU MP Library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The GNU MP 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 Library General Public + * License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with the GNU MP Library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + * MA 02111-1307, USA. + */ + +#include + +/* + * INPUT PARAMETERS + * res_ptr $4 + * s1_ptr $5 + * s2_ptr $6 + * size $7 + */ +#ifdef PIC + .option pic2 +#endif + .text + .align 2 + .globl __mpn_add_n + .ent __mpn_add_n +__mpn_add_n: + .set noreorder +#ifdef PIC + .cpload t9 +#endif + .set nomacro + + ld $10,0($5) + ld $11,0($6) + + daddiu $7,$7,-1 + and $9,$7,4-1 # number of limbs in first loop + beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop + move $2,$0 + + dsubu $7,$7,$9 + +.Loop0: daddiu $9,$9,-1 + ld $12,8($5) + daddu $11,$11,$2 + ld $13,8($6) + sltu $8,$11,$2 + daddu $11,$10,$11 + sltu $2,$11,$10 + sd $11,0($4) + or $2,$2,$8 + + daddiu $5,$5,8 + daddiu $6,$6,8 + move $10,$12 + move $11,$13 + bne $9,$0,.Loop0 + daddiu $4,$4,8 + +.L0: beq $7,$0,.Lend + nop + +.Loop: daddiu $7,$7,-4 + + ld $12,8($5) + daddu $11,$11,$2 + ld $13,8($6) + sltu $8,$11,$2 + daddu $11,$10,$11 + sltu $2,$11,$10 + sd $11,0($4) + or $2,$2,$8 + + ld $10,16($5) + daddu $13,$13,$2 + ld $11,16($6) + sltu $8,$13,$2 + daddu $13,$12,$13 + sltu $2,$13,$12 + sd $13,8($4) + or $2,$2,$8 + + ld $12,24($5) + daddu $11,$11,$2 + ld $13,24($6) + sltu $8,$11,$2 + daddu $11,$10,$11 + sltu $2,$11,$10 + sd $11,16($4) + or $2,$2,$8 + + ld $10,32($5) + daddu $13,$13,$2 + ld $11,32($6) + sltu $8,$13,$2 + daddu $13,$12,$13 + sltu $2,$13,$12 + sd $13,24($4) + or $2,$2,$8 + + daddiu $5,$5,32 + daddiu $6,$6,32 + + bne $7,$0,.Loop + daddiu $4,$4,32 + +.Lend: daddu $11,$11,$2 + sltu $8,$11,$2 + daddu $11,$10,$11 + sltu $2,$11,$10 + sd $11,0($4) + j $31 + or $2,$2,$8 + + .end __mpn_add_n diff --git a/sysdeps/mips/mips64/addmul_1.S b/sysdeps/mips/mips64/addmul_1.S new file mode 100644 index 0000000000..58eff8c889 --- /dev/null +++ b/sysdeps/mips/mips64/addmul_1.S @@ -0,0 +1,106 @@ +/* MIPS3 __mpn_addmul_1 -- Multiply a limb vector with a single limb and + * add the product to a second limb vector. + * + * Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc. + * + * This file is part of the GNU MP Library. + * + * The GNU MP Library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The GNU MP 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 Library General Public + * License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with the GNU MP Library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + * MA 02111-1307, USA. + */ + +#include + +/* INPUT PARAMETERS + * res_ptr $4 + * s1_ptr $5 + * size $6 + * s2_limb $7 + */ + +#ifdef PIC + .option pic2 +#endif + .text + .align 4 + .globl __mpn_addmul_1 + .ent __mpn_addmul_1 +__mpn_addmul_1: + .set noreorder +#ifdef PIC + .cpload t9 +#endif + .set nomacro + + # warm up phase 0 + ld $8,0($5) + + # warm up phase 1 + daddiu $5,$5,8 + dmultu $8,$7 + + daddiu $6,$6,-1 + beq $6,$0,$LC0 + move $2,$0 # zero cy2 + + daddiu $6,$6,-1 + beq $6,$0,$LC1 + ld $8,0($5) # load new s1 limb as early as possible + +Loop: ld $10,0($4) + mflo $3 + mfhi $9 + daddiu $5,$5,8 + daddu $3,$3,$2 # add old carry limb to low product limb + dmultu $8,$7 + ld $8,0($5) # load new s1 limb as early as possible + daddiu $6,$6,-1 # decrement loop counter + sltu $2,$3,$2 # carry from previous addition -> $2 + daddu $3,$10,$3 + sltu $10,$3,$10 + daddu $2,$2,$10 + sd $3,0($4) + daddiu $4,$4,8 + bne $6,$0,Loop + daddu $2,$9,$2 # add high product limb and carry from addition + + # cool down phase 1 +$LC1: ld $10,0($4) + mflo $3 + mfhi $9 + daddu $3,$3,$2 + sltu $2,$3,$2 + dmultu $8,$7 + daddu $3,$10,$3 + sltu $10,$3,$10 + daddu $2,$2,$10 + sd $3,0($4) + daddiu $4,$4,8 + daddu $2,$9,$2 # add high product limb and carry from addition + + # cool down phase 0 +$LC0: ld $10,0($4) + mflo $3 + mfhi $9 + daddu $3,$3,$2 + sltu $2,$3,$2 + daddu $3,$10,$3 + sltu $10,$3,$10 + daddu $2,$2,$10 + sd $3,0($4) + j $31 + daddu $2,$9,$2 # add high product limb and carry from addition + + .end __mpn_addmul_1 diff --git a/sysdeps/mips/mips64/bsd-_setjmp.S b/sysdeps/mips/mips64/bsd-_setjmp.S new file mode 100644 index 0000000000..cd6ec3e196 --- /dev/null +++ b/sysdeps/mips/mips64/bsd-_setjmp.S @@ -0,0 +1,36 @@ +/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. MIPS64 version. + Copyright (C) 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* This just does a tail-call to `__sigsetjmp (ARG, 0)'. + We cannot do it in C because it must be a tail-call, so frame-unwinding + in setjmp doesn't clobber the state restored by longjmp. */ + +#include + +#ifdef PIC + .option pic2 +#endif +ENTRY (_setjmp) +#ifdef PIC + .cpload t9 +#endif + dla t9, C_SYMBOL_NAME (__sigsetjmp) + nop + jr t9 + dli a1, 0 /* Pass a second argument of zero. */ diff --git a/sysdeps/mips/mips64/bsd-setjmp.S b/sysdeps/mips/mips64/bsd-setjmp.S new file mode 100644 index 0000000000..b37031679d --- /dev/null +++ b/sysdeps/mips/mips64/bsd-setjmp.S @@ -0,0 +1,36 @@ +/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. MIPS64 version. + Copyright (C) 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* This just does a tail-call to `__sigsetjmp (ARG, 1)'. + We cannot do it in C because it must be a tail-call, so frame-unwinding + in setjmp doesn't clobber the state restored by longjmp. */ + +#include + +#ifdef PIC + .option pic2 +#endif +ENTRY (setjmp) +#ifdef PIC + .cpload t9 +#endif + dla t9, C_SYMBOL_NAME (__sigsetjmp) + nop + jr t9 + dli a1, 1 /* Pass a second argument of one. */ diff --git a/sysdeps/mips/mips64/gmp-mparam.h b/sysdeps/mips/mips64/gmp-mparam.h index a801b35d7a..38872ec5bc 100644 --- a/sysdeps/mips/mips64/gmp-mparam.h +++ b/sysdeps/mips/mips64/gmp-mparam.h @@ -20,7 +20,7 @@ the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #define BITS_PER_MP_LIMB 64 #define BYTES_PER_MP_LIMB 8 -#define BITS_PER_LONGINT 32 -#define BITS_PER_INT 32 +#define BITS_PER_LONGINT 64 +#define BITS_PER_INT 64 #define BITS_PER_SHORTINT 16 #define BITS_PER_CHAR 8 diff --git a/sysdeps/mips/mips64/lshift.S b/sysdeps/mips/mips64/lshift.S new file mode 100644 index 0000000000..ef403ec25f --- /dev/null +++ b/sysdeps/mips/mips64/lshift.S @@ -0,0 +1,104 @@ +/* MIPS3 __mpn_lshift -- + * + * Copyright (C) 1995 Free Software Foundation, Inc. + * + * This file is part of the GNU MP Library. + * + * The GNU MP Library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The GNU MP 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 Library General Public + * License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with the GNU MP Library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + * MA 02111-1307, USA. + */ + +#include + +/* INPUT PARAMETERS + * res_ptr $4 + * src_ptr $5 + * size $6 + * cnt $7 + */ + +#ifdef PIC + .option pic2 +#endif + .text + .align 2 + .globl __mpn_lshift + .ent __mpn_lshift +__mpn_lshift: + .set noreorder +#ifdef PIC + .cpload t9 +#endif + .set nomacro + + dsll $2,$6,3 + daddu $5,$5,$2 # make r5 point at end of src + ld $10,-8($5) # load first limb + dsubu $13,$0,$7 + daddu $4,$4,$2 # make r4 point at end of res + daddiu $6,$6,-1 + and $9,$6,4-1 # number of limbs in first loop + beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop + dsrl $2,$10,$13 # compute function result + + dsubu $6,$6,$9 + +.Loop0: ld $3,-16($5) + daddiu $4,$4,-8 + daddiu $5,$5,-8 + daddiu $9,$9,-1 + dsll $11,$10,$7 + dsrl $12,$3,$13 + move $10,$3 + or $8,$11,$12 + bne $9,$0,.Loop0 + sd $8,0($4) + +.L0: beq $6,$0,.Lend + nop + +.Loop: ld $3,-16($5) + daddiu $4,$4,-32 + daddiu $6,$6,-4 + dsll $11,$10,$7 + dsrl $12,$3,$13 + + ld $10,-24($5) + dsll $14,$3,$7 + or $8,$11,$12 + sd $8,24($4) + dsrl $9,$10,$13 + + ld $3,-32($5) + dsll $11,$10,$7 + or $8,$14,$9 + sd $8,16($4) + dsrl $12,$3,$13 + + ld $10,-40($5) + dsll $14,$3,$7 + or $8,$11,$12 + sd $8,8($4) + dsrl $9,$10,$13 + + daddiu $5,$5,-32 + or $8,$14,$9 + bgtz $6,.Loop + sd $8,0($4) + +.Lend: dsll $8,$10,$7 + j $31 + sd $8,-8($4) + .end __mpn_lshift diff --git a/sysdeps/mips/mips64/mul_1.S b/sysdeps/mips/mips64/mul_1.S new file mode 100644 index 0000000000..ef0cf36d75 --- /dev/null +++ b/sysdeps/mips/mips64/mul_1.S @@ -0,0 +1,94 @@ +/* MIPS3 __mpn_mul_1 -- Multiply a limb vector with a single limb and + * store the product in a second limb vector. + * + * Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc. + * + * This file is part of the GNU MP Library. + * + * The GNU MP Library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The GNU MP 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 Library General Public + * License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with the GNU MP Library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + * MA 02111-1307, USA. + */ + +#include + +/* INPUT PARAMETERS + * res_ptr $4 + * s1_ptr $5 + * size $6 + * s2_limb $7 + */ + +#ifdef PIC + .option pic2 +#endif + .text + .align 4 + .globl __mpn_mul_1 + .ent __mpn_mul_1 +__mpn_mul_1: + .set noreorder +#ifdef PIC + .cpload t9 +#endif + .set nomacro + + # warm up phase 0 + ld $8,0($5) + + # warm up phase 1 + daddiu $5,$5,8 + dmultu $8,$7 + + daddiu $6,$6,-1 + beq $6,$0,$LC0 + move $2,$0 # zero cy2 + + daddiu $6,$6,-1 + beq $6,$0,$LC1 + ld $8,0($5) # load new s1 limb as early as possible + +Loop: mflo $10 + mfhi $9 + daddiu $5,$5,8 + daddu $10,$10,$2 # add old carry limb to low product limb + dmultu $8,$7 + ld $8,0($5) # load new s1 limb as early as possible + daddiu $6,$6,-1 # decrement loop counter + sltu $2,$10,$2 # carry from previous addition -> $2 + sd $10,0($4) + daddiu $4,$4,8 + bne $6,$0,Loop + daddu $2,$9,$2 # add high product limb and carry from addition + + # cool down phase 1 +$LC1: mflo $10 + mfhi $9 + daddu $10,$10,$2 + sltu $2,$10,$2 + dmultu $8,$7 + sd $10,0($4) + daddiu $4,$4,8 + daddu $2,$9,$2 # add high product limb and carry from addition + + # cool down phase 0 +$LC0: mflo $10 + mfhi $9 + daddu $10,$10,$2 + sltu $2,$10,$2 + sd $10,0($4) + j $31 + daddu $2,$9,$2 # add high product limb and carry from addition + + .end __mpn_mul_1 diff --git a/sysdeps/mips/mips64/rshift.S b/sysdeps/mips/mips64/rshift.S new file mode 100644 index 0000000000..bc26f3f360 --- /dev/null +++ b/sysdeps/mips/mips64/rshift.S @@ -0,0 +1,101 @@ +/* MIPS3 __mpn_rshift -- + * + * Copyright (C) 1995 Free Software Foundation, Inc. + * + * This file is part of the GNU MP Library. + * + * The GNU MP Library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The GNU MP 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 Library General Public + * License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with the GNU MP Library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + * MA 02111-1307, USA. + */ + +#include + +/* INPUT PARAMETERS + * res_ptr $4 + * src_ptr $5 + * size $6 + * cnt $7 + */ + +#ifdef PIC + .option pic2 +#endif + .text + .align 2 + .globl __mpn_rshift + .ent __mpn_rshift +__mpn_rshift: + .set noreorder +#ifdef PIC + .cpload t9 +#endif + .set nomacro + + ld $10,0($5) # load first limb + dsubu $13,$0,$7 + daddiu $6,$6,-1 + and $9,$6,4-1 # number of limbs in first loop + beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop + dsll $2,$10,$13 # compute function result + + dsubu $6,$6,$9 + +.Loop0: ld $3,8($5) + daddiu $4,$4,8 + daddiu $5,$5,8 + daddiu $9,$9,-1 + dsrl $11,$10,$7 + dsll $12,$3,$13 + move $10,$3 + or $8,$11,$12 + bne $9,$0,.Loop0 + sd $8,-8($4) + +.L0: beq $6,$0,.Lend + nop + +.Loop: ld $3,8($5) + daddiu $4,$4,32 + daddiu $6,$6,-4 + dsrl $11,$10,$7 + dsll $12,$3,$13 + + ld $10,16($5) + dsrl $14,$3,$7 + or $8,$11,$12 + sd $8,-32($4) + dsll $9,$10,$13 + + ld $3,24($5) + dsrl $11,$10,$7 + or $8,$14,$9 + sd $8,-24($4) + dsll $12,$3,$13 + + ld $10,32($5) + dsrl $14,$3,$7 + or $8,$11,$12 + sd $8,-16($4) + dsll $9,$10,$13 + + daddiu $5,$5,32 + or $8,$14,$9 + bgtz $6,.Loop + sd $8,-8($4) + +.Lend: dsrl $8,$10,$7 + j $31 + sd $8,0($4) + .end __mpn_rshift diff --git a/sysdeps/mips/mips64/setjmp.S b/sysdeps/mips/mips64/setjmp.S new file mode 100644 index 0000000000..74214297b8 --- /dev/null +++ b/sysdeps/mips/mips64/setjmp.S @@ -0,0 +1,35 @@ +/* Copyright (C) 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +/* The function __sigsetjmp_aux saves all the registers, but it can't + reliably access the stack or frame pointers, so we pass them in as + extra arguments. */ +#ifdef PIC + .option pic2 +#endif +ENTRY (__sigsetjmp) +#ifdef PIC + .cpload t9 +#endif + move a2, sp + move a3, fp + dla t9, __sigsetjmp_aux + nop + jr t9 diff --git a/sysdeps/mips/mips64/setjmp_aux.c b/sysdeps/mips/mips64/setjmp_aux.c new file mode 100644 index 0000000000..19d06e9999 --- /dev/null +++ b/sysdeps/mips/mips64/setjmp_aux.c @@ -0,0 +1,67 @@ +/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Brendan Kehoe (brendan@zen.org). + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +/* This function is only called via the assembly language routine + __sigsetjmp, which arranges to pass in the stack pointer and the frame + pointer. We do things this way because it's difficult to reliably + access them in C. */ + +int +__sigsetjmp_aux (jmp_buf env, int savemask, int sp, int fp) +{ + /* Store the floating point callee-saved registers... */ + asm volatile ("s.d $f24, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[0])); + asm volatile ("s.d $f25, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[1])); + asm volatile ("s.d $f26, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[2])); + asm volatile ("s.d $f27, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[3])); + asm volatile ("s.d $f28, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[4])); + asm volatile ("s.d $f29, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[5])); + asm volatile ("s.d $f30, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[6])); + asm volatile ("s.d $f31, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[7])); + + /* .. and the PC; */ + asm volatile ("sd $31, %0" : : "m" (env[0].__jmpbuf[0].__pc)); + + /* .. and the stack pointer; */ + env[0].__jmpbuf[0].__sp = sp; + + /* .. and the FP; it'll be in s8. */ + env[0].__jmpbuf[0].__fp = fp; + + /* .. and the GP; */ + asm volatile ("sd $gp, %0" : : "m" (env[0].__jmpbuf[0].__gp)); + + /* .. and the callee-saved registers; */ + asm volatile ("sd $16, %0" : : "m" (env[0].__jmpbuf[0].__regs[0])); + asm volatile ("sd $17, %0" : : "m" (env[0].__jmpbuf[0].__regs[1])); + asm volatile ("sd $18, %0" : : "m" (env[0].__jmpbuf[0].__regs[2])); + asm volatile ("sd $19, %0" : : "m" (env[0].__jmpbuf[0].__regs[3])); + asm volatile ("sd $20, %0" : : "m" (env[0].__jmpbuf[0].__regs[4])); + asm volatile ("sd $21, %0" : : "m" (env[0].__jmpbuf[0].__regs[5])); + asm volatile ("sd $22, %0" : : "m" (env[0].__jmpbuf[0].__regs[6])); + asm volatile ("sd $23, %0" : : "m" (env[0].__jmpbuf[0].__regs[7])); + + /* .. and finally get and reconstruct the floating point csr. */ + asm ("cfc1 %0, $31" : "=r" (env[0].__jmpbuf[0].__fpc_csr)); + + /* Save the signal mask if requested. */ + return __sigjmp_save (env, savemask); +} diff --git a/sysdeps/mips/mips64/sub_n.S b/sysdeps/mips/mips64/sub_n.S new file mode 100644 index 0000000000..bfcba95afa --- /dev/null +++ b/sysdeps/mips/mips64/sub_n.S @@ -0,0 +1,129 @@ +/* MIPS3 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and + * store difference in a third limb vector. + * + * Copyright (C) 1995 Free Software Foundation, Inc. + * + * This file is part of the GNU MP Library. + * + * The GNU MP Library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The GNU MP 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 Library General Public + * License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with the GNU MP Library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + * MA 02111-1307, USA. + */ + +#include + +/* INPUT PARAMETERS + * res_ptr $4 + * s1_ptr $5 + * s2_ptr $6 + * size $7 + */ + +#ifdef PIC + .option pic2 +#endif + .text + .align 2 + .globl __mpn_sub_n + .ent __mpn_sub_n +__mpn_sub_n: + .set noreorder +#ifdef PIC + .cpload t9 +#endif + .set nomacro + + ld $10,0($5) + ld $11,0($6) + + daddiu $7,$7,-1 + and $9,$7,4-1 # number of limbs in first loop + beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop + move $2,$0 + + dsubu $7,$7,$9 + +.Loop0: daddiu $9,$9,-1 + ld $12,8($5) + daddu $11,$11,$2 + ld $13,8($6) + sltu $8,$11,$2 + dsubu $11,$10,$11 + sltu $2,$10,$11 + sd $11,0($4) + or $2,$2,$8 + + daddiu $5,$5,8 + daddiu $6,$6,8 + move $10,$12 + move $11,$13 + bne $9,$0,.Loop0 + daddiu $4,$4,8 + +.L0: beq $7,$0,.Lend + nop + +.Loop: daddiu $7,$7,-4 + + ld $12,8($5) + daddu $11,$11,$2 + ld $13,8($6) + sltu $8,$11,$2 + dsubu $11,$10,$11 + sltu $2,$10,$11 + sd $11,0($4) + or $2,$2,$8 + + ld $10,16($5) + daddu $13,$13,$2 + ld $11,16($6) + sltu $8,$13,$2 + dsubu $13,$12,$13 + sltu $2,$12,$13 + sd $13,8($4) + or $2,$2,$8 + + ld $12,24($5) + daddu $11,$11,$2 + ld $13,24($6) + sltu $8,$11,$2 + dsubu $11,$10,$11 + sltu $2,$10,$11 + sd $11,16($4) + or $2,$2,$8 + + ld $10,32($5) + daddu $13,$13,$2 + ld $11,32($6) + sltu $8,$13,$2 + dsubu $13,$12,$13 + sltu $2,$12,$13 + sd $13,24($4) + or $2,$2,$8 + + daddiu $5,$5,32 + daddiu $6,$6,32 + + bne $7,$0,.Loop + daddiu $4,$4,32 + +.Lend: daddu $11,$11,$2 + sltu $8,$11,$2 + dsubu $11,$10,$11 + sltu $2,$10,$11 + sd $11,0($4) + j $31 + or $2,$2,$8 + + .end __mpn_sub_n diff --git a/sysdeps/mips/mips64/submul_1.S b/sysdeps/mips/mips64/submul_1.S new file mode 100644 index 0000000000..66e634e102 --- /dev/null +++ b/sysdeps/mips/mips64/submul_1.S @@ -0,0 +1,106 @@ +/* MIPS3 __mpn_submul_1 -- Multiply a limb vector with a single limb and + * subtract the product from a second limb vector. + * + * Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc. + * + * This file is part of the GNU MP Library. + * + * The GNU MP Library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The GNU MP 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 Library General Public + * License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with the GNU MP Library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + * MA 02111-1307, USA. + */ + +#include + +/* INPUT PARAMETERS + * res_ptr $4 + * s1_ptr $5 + * size $6 + * s2_limb $7 + */ + +#ifdef PIC + .option pic2 +#endif + .text + .align 4 + .globl __mpn_submul_1 + .ent __mpn_submul_1 +__mpn_submul_1: + .set noreorder +#ifdef PIC + .cpload t9 +#endif + .set nomacro + + # warm up phase 0 + ld $8,0($5) + + # warm up phase 1 + daddiu $5,$5,8 + dmultu $8,$7 + + daddiu $6,$6,-1 + beq $6,$0,$LC0 + move $2,$0 # zero cy2 + + daddiu $6,$6,-1 + beq $6,$0,$LC1 + ld $8,0($5) # load new s1 limb as early as possible + +Loop: ld $10,0($4) + mflo $3 + mfhi $9 + daddiu $5,$5,8 + daddu $3,$3,$2 # add old carry limb to low product limb + dmultu $8,$7 + ld $8,0($5) # load new s1 limb as early as possible + daddiu $6,$6,-1 # decrement loop counter + sltu $2,$3,$2 # carry from previous addition -> $2 + dsubu $3,$10,$3 + sgtu $10,$3,$10 + daddu $2,$2,$10 + sd $3,0($4) + daddiu $4,$4,8 + bne $6,$0,Loop + daddu $2,$9,$2 # add high product limb and carry from addition + + # cool down phase 1 +$LC1: ld $10,0($4) + mflo $3 + mfhi $9 + daddu $3,$3,$2 + sltu $2,$3,$2 + dmultu $8,$7 + dsubu $3,$10,$3 + sgtu $10,$3,$10 + daddu $2,$2,$10 + sd $3,0($4) + daddiu $4,$4,8 + daddu $2,$9,$2 # add high product limb and carry from addition + + # cool down phase 0 +$LC0: ld $10,0($4) + mflo $3 + mfhi $9 + daddu $3,$3,$2 + sltu $2,$3,$2 + dsubu $3,$10,$3 + sgtu $10,$3,$10 + daddu $2,$2,$10 + sd $3,0($4) + j $31 + daddu $2,$9,$2 # add high product limb and carry from addition + + .end __mpn_submul_1 From 18e5142049b78c5890777b55a57c98daf524c28a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:06:57 +0000 Subject: [PATCH 0933/4487] moved to bits/. --- sysdeps/mips/mipsel/bytesex.h | 4 ---- sysdeps/mips/p40/bytesex.h | 4 ---- 2 files changed, 8 deletions(-) delete mode 100644 sysdeps/mips/mipsel/bytesex.h delete mode 100644 sysdeps/mips/p40/bytesex.h diff --git a/sysdeps/mips/mipsel/bytesex.h b/sysdeps/mips/mipsel/bytesex.h deleted file mode 100644 index 5da5965cb2..0000000000 --- a/sysdeps/mips/mipsel/bytesex.h +++ /dev/null @@ -1,4 +0,0 @@ -/* The MIPS architecture has selectable endianness. - This file is for a machine using little-endian mode. */ - -#define __BYTE_ORDER __LITTLE_ENDIAN diff --git a/sysdeps/mips/p40/bytesex.h b/sysdeps/mips/p40/bytesex.h deleted file mode 100644 index e4b0119433..0000000000 --- a/sysdeps/mips/p40/bytesex.h +++ /dev/null @@ -1,4 +0,0 @@ -/* The MIPS has selectable endianness. - The Japanese homebrew P40 architecture uses big-endian mode. */ - -#define __BYTE_ORDER __BIG_ENDIAN From 7fecd6222d614ea7087cf2990a84b87f63d2da3d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:07:17 +0000 Subject: [PATCH 0934/4487] Endian specification for MIPSEL. --- sysdeps/mips/mipsel/bits/endian.h | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 sysdeps/mips/mipsel/bits/endian.h diff --git a/sysdeps/mips/mipsel/bits/endian.h b/sysdeps/mips/mipsel/bits/endian.h new file mode 100644 index 0000000000..5da5965cb2 --- /dev/null +++ b/sysdeps/mips/mipsel/bits/endian.h @@ -0,0 +1,4 @@ +/* The MIPS architecture has selectable endianness. + This file is for a machine using little-endian mode. */ + +#define __BYTE_ORDER __LITTLE_ENDIAN From 6af245e27be691617dfc8d710b264ff20622d008 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:07:22 +0000 Subject: [PATCH 0935/4487] Endian specification for P40. --- sysdeps/mips/p40/bits/endian.h | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 sysdeps/mips/p40/bits/endian.h diff --git a/sysdeps/mips/p40/bits/endian.h b/sysdeps/mips/p40/bits/endian.h new file mode 100644 index 0000000000..e4b0119433 --- /dev/null +++ b/sysdeps/mips/p40/bits/endian.h @@ -0,0 +1,4 @@ +/* The MIPS has selectable endianness. + The Japanese homebrew P40 architecture uses big-endian mode. */ + +#define __BYTE_ORDER __BIG_ENDIAN From c96df8ef30ac69e857503a2c503dfe6fd3de788b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:08:10 +0000 Subject: [PATCH 0936/4487] (elf_machine_rela): Check that the symbol was found. --- sysdeps/m68k/dl-machine.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index 1523ddb1c6..e50f773614 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -227,6 +227,10 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, switch (ELF32_R_TYPE (reloc->r_info)) { case R_68K_COPY: + if (sym == NULL) + /* This can happen in trace mode if an object could not be + found. */ + break; if (sym->st_size > refsym->st_size || (_dl_verbose && sym->st_size < refsym->st_size)) { From 71810663386125a210ca83b465bad75b982485a9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:25:57 +0000 Subject: [PATCH 0937/4487] Alpha specific endianess specification. --- sysdeps/alpha/bits/endian.h | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sysdeps/alpha/bits/endian.h diff --git a/sysdeps/alpha/bits/endian.h b/sysdeps/alpha/bits/endian.h new file mode 100644 index 0000000000..e873d2123c --- /dev/null +++ b/sysdeps/alpha/bits/endian.h @@ -0,0 +1,3 @@ +/* Alpha is little-endian. */ + +#define __BYTE_ORDER __LITTLE_ENDIAN From d1c19e62fbd07890cb68ecf7ffe9c7d0fba5ffc8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:26:04 +0000 Subject: [PATCH 0938/4487] ARM specific endianess specification. --- sysdeps/arm/bits/endian.h | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sysdeps/arm/bits/endian.h diff --git a/sysdeps/arm/bits/endian.h b/sysdeps/arm/bits/endian.h new file mode 100644 index 0000000000..32f8489df2 --- /dev/null +++ b/sysdeps/arm/bits/endian.h @@ -0,0 +1,3 @@ +/* ARM is little-endian. */ + +#define __BYTE_ORDER __LITTLE_ENDIAN From 1f7005dfa10456c03d9dbc22daa545b570e0bb82 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:26:23 +0000 Subject: [PATCH 0939/4487] m68k specific endianess specification. --- sysdeps/m68k/bits/endian.h | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sysdeps/m68k/bits/endian.h diff --git a/sysdeps/m68k/bits/endian.h b/sysdeps/m68k/bits/endian.h new file mode 100644 index 0000000000..6f985293f2 --- /dev/null +++ b/sysdeps/m68k/bits/endian.h @@ -0,0 +1,3 @@ +/* m68k is big-endian. */ + +#define __BYTE_ORDER __BIG_ENDIAN From 1f83df4446f3400f89bf64808f221487fdeeeee2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:28:55 +0000 Subject: [PATCH 0940/4487] Alpha specific setjmp buffer. --- sysdeps/alpha/bits/setjmp.h | 46 +++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 sysdeps/alpha/bits/setjmp.h diff --git a/sysdeps/alpha/bits/setjmp.h b/sysdeps/alpha/bits/setjmp.h new file mode 100644 index 0000000000..6e6f6b4727 --- /dev/null +++ b/sysdeps/alpha/bits/setjmp.h @@ -0,0 +1,46 @@ +/* Define the machine-dependent type `jmp_buf'. Alpha version. +Copyright (C) 1992 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +typedef struct + { + /* Integer registers: + $0 is the return value; + $1-$8, $22-$25, $28 are call-used; + $9-$14 we save here; + $15 is the FP and we save it here; + $16-$21 are input arguments (call-used); + $26 is the return PC and we save it here; + $27 is the procedure value (i.e., the address of __setjmp); + $29 is the global pointer, which the caller will reconstruct + from the return address restored in $26; + $30 is the stack pointer and we save it here; + $31 is always zero. */ + long int __9, __10, __11, __12, __13, __14; + long int *__pc, *__fp, *__sp; + +#if 1 /* XXX need predefine for TARGET_FPREGS */ + /* Floating-point registers: + $f0 is the floating return value; + $f1, $f10-$f15, $f22-$f30 are call-used; + $f2-$f9 we save here; + $f16-$21 are input args (call-used); + $f31 is always zero. */ + double __f2, __f3, __f4, __f5, __f6, __f7, __f8, __f9; +#endif /* Have FP regs. */ + } __jmp_buf[1]; From 2b998aac446834adba4c2aedc88fbf3dfe31a9eb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:29:03 +0000 Subject: [PATCH 0941/4487] ARM specific setjmp buffer. --- sysdeps/arm/bits/setjmp.h | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 sysdeps/arm/bits/setjmp.h diff --git a/sysdeps/arm/bits/setjmp.h b/sysdeps/arm/bits/setjmp.h new file mode 100644 index 0000000000..93b0f5f916 --- /dev/null +++ b/sysdeps/arm/bits/setjmp.h @@ -0,0 +1,10 @@ +/* Define the machine-dependent type `jmp_buf'. ARM version. */ + +#ifndef _ASM +/* Jump buffer contains v1-v6, sl, fp, sp, pc and (f4-f7) if we do FP. */ +#if __ARM_USES_FP +typedef int __jmp_buf[22]; +#else +typedef int __jmp_buf[10]; +#endif +#endif From 0d70c1a887b46208bea7e8fee61d367780f04ba3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:29:18 +0000 Subject: [PATCH 0942/4487] m68k specific setjmp buffer. --- sysdeps/m68k/bits/setjmp.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 sysdeps/m68k/bits/setjmp.h diff --git a/sysdeps/m68k/bits/setjmp.h b/sysdeps/m68k/bits/setjmp.h new file mode 100644 index 0000000000..96240f0d8e --- /dev/null +++ b/sysdeps/m68k/bits/setjmp.h @@ -0,0 +1,19 @@ +/* Define the machine-dependent type `jmp_buf'. m68k version. */ + +typedef struct + { + /* There are eight 4-byte data registers, but D0 is not saved. */ + long int __dregs[7]; + + /* There are six 4-byte address registers, plus the FP and SP. */ + int *__aregs[6]; + int * __fp; + int * __sp; + +#if defined(__HAVE_68881__) || defined(__HAVE_FPU__) + /* There are eight floating point registers which + are saved in IEEE 96-bit extended format. */ + char __fpregs[8 * (96 / 8)]; +#endif + + } __jmp_buf[1]; From 1632e8a1b3631c40b19f2f868aa244948837be54 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:30:10 +0000 Subject: [PATCH 0943/4487] Vax specific setjmp buffer. --- sysdeps/vax/bits/setjmp.h | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 sysdeps/vax/bits/setjmp.h diff --git a/sysdeps/vax/bits/setjmp.h b/sysdeps/vax/bits/setjmp.h new file mode 100644 index 0000000000..7adecd9a17 --- /dev/null +++ b/sysdeps/vax/bits/setjmp.h @@ -0,0 +1,7 @@ +/* Define the machine-dependent type `jmp_buf'. Vax version. */ + +typedef struct + { + PTR __fp; + PTR __pc; + } __jmp_buf[1]; From dc75d9cbc371dbb750d95d78539b5e16539ec472 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:31:00 +0000 Subject: [PATCH 0944/4487] Alpha specific FP environment definitions. --- sysdeps/alpha/fpu/bits/fenv.h | 104 ++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 sysdeps/alpha/fpu/bits/fenv.h diff --git a/sysdeps/alpha/fpu/bits/fenv.h b/sysdeps/alpha/fpu/bits/fenv.h new file mode 100644 index 0000000000..7cb0e3e543 --- /dev/null +++ b/sysdeps/alpha/fpu/bits/fenv.h @@ -0,0 +1,104 @@ +/* Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson , 1997 + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _FENV_H +#error "Never use directly; include instead." +#endif + + +/* Define the bits representing the exception. + + Note that these are the bit positions as defined by the OSF/1 + ieee_{get,set}_control_word interface and not by the hardware fpcr. + + See the Alpha Architecture Handbook section 4.7.7.3 for details, + but in summary, trap shadows mean the hardware register can acquire + extra exception bits so for proper IEEE support the tracking has to + be done in software -- in this case with kernel support. + + As to why the system call interface isn't in the same format as + the hardware register, only those crazy folks at DEC can tell you. */ + +enum + { + FE_INEXACT = 1UL << 21, +#define FE_INEXACT FE_INEXACT + + FE_UNDERFLOW = 1UL << 20, +#define FE_UNDERFLOW FE_UNDERFLOW + + FE_OVERFLOW = 1UL << 19, +#define FE_OVERFLOW FE_OVERFLOW + + FE_DIVBYZERO = 1UL << 18, +#define FE_DIVBYZERO FE_DIVBYZERO + + FE_INVALID = 1UL << 17, +#define FE_INVALID FE_INVALID + + FE_ALL_EXCEPT = + (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID) +#define FE_ALL_EXCEPT FE_ALL_EXCEPT + }; + + +/* Alpha chips support all four defined rouding modes. + + Note that code must be compiled to use dynamic rounding (/d) instructions + to see these changes. For gcc this is -mfp-rounding-mode=d; for DEC cc + this is -fprm d. The default for both is static rounding to nearest. + + These are shifted down 58 bits from the hardware fpcr because the + functions are declared to take integers. */ + +enum + { + FE_TOWARDSZERO = 0, +#define FE_TOWARDSZERO FE_TOWARDSZERO + + FE_DOWNWARD = 1, +#define FE_DOWNWARD FE_DOWNWARD + + FE_TONEAREST = 2, +#define FE_TONEAREST FE_TONEAREST + + FE_UPWARD = 3, +#define FE_UPWARD FE_UPWARD + }; + + +/* Type representing exception flags. */ +typedef unsigned long fexcept_t; + +/* Type representing floating-point environment. */ +typedef unsigned long fenv_t; + +/* If the default argument is used we use this value. Note that due to + architecture-specified page mappings, no user-space pointer will ever + have its two high bits set. Co-opt one. */ +#define FE_DFL_ENV ((fenv_t *) 0x8800000000000000UL) + +#ifdef __USE_GNU +/* Floating-point environment where none of the exceptions are masked. */ +# define FE_NOMASK_ENV ((fenv_t *) 0x880000000000003eUL) +#endif + +/* The system calls to talk to the kernel's FP code. */ +extern unsigned long __ieee_get_fp_control(void); +extern void __ieee_set_fp_control(unsigned long); From 21bc60d2401587a87a81c7c087fb7ffda546b096 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:31:18 +0000 Subject: [PATCH 0945/4487] m68k specific FP environment definitions. --- sysdeps/m68k/fpu/bits/fenv.h | 78 ++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 sysdeps/m68k/fpu/bits/fenv.h diff --git a/sysdeps/m68k/fpu/bits/fenv.h b/sysdeps/m68k/fpu/bits/fenv.h new file mode 100644 index 0000000000..ce071b93ff --- /dev/null +++ b/sysdeps/m68k/fpu/bits/fenv.h @@ -0,0 +1,78 @@ +/* Copyright (C) 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _FENV_H +#error "Never use directly; include instead." +#endif + + +/* Define bits representing the exception. We use the bit positions of + the appropriate bits in the FPSR Accrued Exception Byte. */ +enum + { + FE_INEXACT = 1 << 3, +#define FE_INEXACT FE_INEXACT + FE_DIVBYZERO = 1 << 4, +#define FE_DIVBYZERO FE_DIVBYZERO + FE_UNDERFLOW = 1 << 5, +#define FE_UNDERFLOW FE_UNDERFLOW + FE_OVERFLOW = 1 << 6, +#define FE_OVERFLOW FE_OVERFLOW + FE_INVALID = 1 << 7 +#define FE_INVALID FE_INVALID + }; + +#define FE_ALL_EXCEPT \ + (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID) + +/* The m68k FPU supports all of the four defined rounding modes. We use + the bit positions in the FPCR Mode Control Byte as the values for the + appropriate macros. */ +enum + { + FE_TONEAREST = 0, +#define FE_TONEAREST FE_TONEAREST + FE_TOWARDSZERO = 1 << 4, +#define FE_TOWARDSZERO FE_TOWARDSZERO + FE_DOWNWARD = 2 << 4, +#define FE_DOWNWARD FE_DOWNWARD + FE_UPWARD = 3 << 4 +#define FE_UPWARD FE_UPWARD + }; + + +/* Type representing exception flags. */ +typedef unsigned int fexcept_t; + + +/* Type representing floating-point environment. This structure + corresponds to the layout of the block written by `fmovem'. */ +typedef struct + { + fexcept_t control_register; + fexcept_t status_register; + } +fenv_t; + +/* If the default argument is used we use this value. */ +#define FE_DFL_ENV ((fenv_t *) -1) + +#ifdef __USE_GNU +/* Floating-point environment where none of the exceptions are masked. */ +# define FE_NOMASK_ENV ((fenv_t *) -2) +#endif From 5d4b2fb95421774897c6aa80818296438ccd3dd4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:32:30 +0000 Subject: [PATCH 0946/4487] Alpha specific math definitions. --- sysdeps/alpha/fpu/bits/mathdef.h | 64 ++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 sysdeps/alpha/fpu/bits/mathdef.h diff --git a/sysdeps/alpha/fpu/bits/mathdef.h b/sysdeps/alpha/fpu/bits/mathdef.h new file mode 100644 index 0000000000..0bc9c94ecc --- /dev/null +++ b/sysdeps/alpha/fpu/bits/mathdef.h @@ -0,0 +1,64 @@ +/* Copyright (C) 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _MATH_H +#error "Never use directly; include instead" +#endif + +/* FIXME! This file describes properties of the compiler, not the machine; + it should not be part of libc! */ + +#ifdef __GNUC__ +#if __STDC__ == 1 + +/* In GNU or ANSI mode, gcc leaves `float' expressions as-is. */ +typedef float float_t; +typedef double double_t; + +/* Signal that types stay as they were declared. */ +#define FLT_EVAL_METHOD 0 + +/* Define `INFINITY' as value of type `float_t'. */ +#define INFINITY HUGE_VALF + +#else + +/* For `gcc -traditional', `float' expressions are evaluated as `double'. */ +typedef double float_t; +typedef double double_t; + +/* Signal that both types are `double'. */ +#define FLT_EVAL_METHOD 1 + +/* Define `INFINITY' as value of type `float_t'. */ +#define INFINITY HUGE_VAL + +#endif +#else + +/* Wild guess at types for float_t and double_t. */ +typedef double float_t; +typedef double double_t; + +/* Strange compiler, we don't know how it works. */ +#define FLT_EVAL_METHOD -1 + +/* Define `INFINITY' as value of type `float_t'. */ +#define INFINITY HUGE_VAL + +#endif From 19b95492523aa3305d33c3e614b98904f48f3273 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:33:02 +0000 Subject: [PATCH 0947/4487] m68k specific math definitions. --- sysdeps/m68k/fpu/bits/mathdef.h | 36 +++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 sysdeps/m68k/fpu/bits/mathdef.h diff --git a/sysdeps/m68k/fpu/bits/mathdef.h b/sysdeps/m68k/fpu/bits/mathdef.h new file mode 100644 index 0000000000..4d07176405 --- /dev/null +++ b/sysdeps/m68k/fpu/bits/mathdef.h @@ -0,0 +1,36 @@ +/* Copyright (C) 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _MATH_H +#error "Never use directly; include instead" +#endif + + +/* The m68k FPUs evaluate all values in the 96 bit floating-point format + which is also available for the user as `long double'. Therefore we + define: */ +typedef long double float_t; /* `float' expressions are evaluated as + `long double'. */ +typedef long double double_t; /* `double' expressions are evaluated as + `long double'. */ + +/* Signal that both types are `long double'. */ +#define FLT_EVAL_METHOD 2 + +/* Define `INFINITY' as value of type `float_t'. */ +#define INFINITY HUGE_VALL From b3539abf29880ce391718f5c826708c441e1f889 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:33:37 +0000 Subject: [PATCH 0948/4487] Alpha specific math inline functions. --- sysdeps/alpha/fpu/bits/mathinline.h | 44 +++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 sysdeps/alpha/fpu/bits/mathinline.h diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h new file mode 100644 index 0000000000..0f76027317 --- /dev/null +++ b/sysdeps/alpha/fpu/bits/mathinline.h @@ -0,0 +1,44 @@ +/* Inline math functions for Alpha. + Copyright (C) 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Mosberger-Tang. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#if defined (__GNUC__) && !defined (__NO_MATH_INLINES) + +extern __inline double +__copysign (double __x, double __y) +{ + __asm ("cpys %1, %2, %0" : "=f" (__x) : "f" (__y), "f" (__x)); + return __x; +} + +extern __inline double +fabs (double __x) +{ + __asm ("cpys $f31, %1, %0" : "=f" (__x) : "f" (__x)); + return __x; +} + +extern __inline double +atan (double __x) +{ + extern double __atan2 (double, double); + return __atan2 (__x, 1.0); +} + +#endif From ef8a52eeee0ac32ce8f7877ddabcf3c86dc86fee Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:34:00 +0000 Subject: [PATCH 0949/4487] m68k specific math inline functions. --- sysdeps/m68k/fpu/bits/mathinline.h | 464 +++++++++++++++++++++++++++++ 1 file changed, 464 insertions(+) create mode 100644 sysdeps/m68k/fpu/bits/mathinline.h diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/fpu/bits/mathinline.h new file mode 100644 index 0000000000..bdeaa9efb0 --- /dev/null +++ b/sysdeps/m68k/fpu/bits/mathinline.h @@ -0,0 +1,464 @@ +/* Definitions of inline math functions implemented by the m68881/2. + Copyright (C) 1991, 92, 93, 94, 96, 97 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifdef __GNUC__ + +#include + +#ifdef __LIBC_M81_MATH_INLINES +/* This is used when defining the functions themselves. Define them with + __ names, and with `static inline' instead of `extern inline' so the + bodies will always be used, never an external function call. */ +#define __m81_u(x) __CONCAT(__,x) +#define __m81_inline static __inline +#else +#define __m81_u(x) x +#define __m81_inline extern __inline +#define __M81_MATH_INLINES 1 +#endif + +/* Define a const math function. */ +#define __m81_defun(rettype, func, args) \ + __m81_inline rettype __attribute__((__const__)) \ + __m81_u(func) args + +/* Define the three variants of a math function that has a direct + implementation in the m68k fpu. FUNC is the name for C (which will be + suffixed with f and l for the float and long double version, resp). OP + is the name of the fpu operation (without leading f). */ + +#if defined __USE_MISC || defined __USE_ISOC9X +#define __inline_mathop(func, op) \ + __inline_mathop1(double, func, op) \ + __inline_mathop1(float, __CONCAT(func,f), op) \ + __inline_mathop1(long double, __CONCAT(func,l), op) +#else +#define __inline_mathop(func, op) \ + __inline_mathop1(double, func, op) +#endif + +#define __inline_mathop1(float_type,func, op) \ + __m81_defun (float_type, func, (float_type __mathop_x)) \ + { \ + float_type __result; \ + __asm("f" __STRING(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x));\ + return __result; \ + } + +#ifdef __LIBC_M81_MATH_INLINES +/* ieee style elementary functions */ +/* These are internal to the implementation of libm. */ +__inline_mathop(__ieee754_acos, acos) +__inline_mathop(__ieee754_asin, asin) +__inline_mathop(__ieee754_cosh, cosh) +__inline_mathop(__ieee754_sinh, sinh) +__inline_mathop(__ieee754_exp, etox) +__inline_mathop(__ieee754_log10, log10) +__inline_mathop(__ieee754_log, logn) +__inline_mathop(__ieee754_sqrt, sqrt) +__inline_mathop(__ieee754_atanh, atanh) +#endif + +__inline_mathop(__atan, atan) +__inline_mathop(__cos, cos) +__inline_mathop(__sin, sin) +__inline_mathop(__tan, tan) +__inline_mathop(__tanh, tanh) +__inline_mathop(__fabs, abs) + +__inline_mathop(__rint, int) +__inline_mathop(__expm1, etoxm1) +__inline_mathop(__log1p, lognp1) +__inline_mathop(__significand, getman) + +__inline_mathop(__log2, log2) +__inline_mathop(__exp2, twotox) +__inline_mathop(__trunc, intrz) + +#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__ + +__inline_mathop(atan, atan) +__inline_mathop(cos, cos) +__inline_mathop(sin, sin) +__inline_mathop(tan, tan) +__inline_mathop(tanh, tanh) + +#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC9X +__inline_mathop(rint, int) +__inline_mathop(expm1, etoxm1) +__inline_mathop(log1p, lognp1) +#endif + +#ifdef __USE_MISC +__inline_mathop(significand, getman) +#endif + +#ifdef __USE_ISOC9X +__inline_mathop(log2, log2) +__inline_mathop(exp2, twotox) +__inline_mathop(trunc, intrz) +#endif + +#endif /* !__NO_MATH_INLINES && __OPTIMIZE__ */ + +/* This macro contains the definition for the rest of the inline + functions, using __FLOAT_TYPE as the domain type and __S as the suffix + for the function names. */ + +#ifdef __LIBC_M81_MATH_INLINES +/* Internally used functions. */ +#define __internal_inline_functions(float_type, s) \ +__m81_defun (float_type, __CONCAT(__ieee754_remainder,s), \ + (float_type __x, float_type __y)) \ +{ \ + float_type __result; \ + __asm("frem%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); \ + return __result; \ +} \ + \ +__m81_defun (float_type, __CONCAT(__ieee754_fmod,s), \ + (float_type __x, float_type __y)) \ +{ \ + float_type __result; \ + __asm("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); \ + return __result; \ +} \ + \ +__m81_defun (float_type, __CONCAT(__ieee754_scalb,s), \ + (float_type __x, float_type __n)) \ +{ \ + float_type __result; \ + __asm ("fscale%.x %1, %0" : "=f" (__result) : "f" (__n), "0" (__x)); \ + return __result; \ +} + +__internal_inline_functions (double,) +__internal_inline_functions (float,f) +__internal_inline_functions (long double,l) +#undef __internal_inline_functions + +/* Get the m68881 condition codes, to quickly check multiple conditions. */ +static __inline__ unsigned long +__m81_test (long double __val) +{ + unsigned long __fpsr; + __asm ("ftst%.x %1; fmove%.l %/fpsr,%0" : "=dm" (__fpsr) : "f" (__val)); + return __fpsr; +} + +/* Bit values returned by __m81_test. */ +#define __M81_COND_NAN (1 << 24) +#define __M81_COND_INF (2 << 24) +#define __M81_COND_ZERO (4 << 24) +#define __M81_COND_NEG (8 << 24) + +#endif /* __LIBC_M81_MATH_INLINES */ + +/* The rest of the functions are available to the user. */ + +#define __inline_functions(float_type, s) \ +__m81_inline float_type \ +__m81_u(__CONCAT(__frexp,s))(float_type __value, int *__expptr) \ +{ \ + float_type __mantissa, __exponent; \ + int __iexponent; \ + unsigned long __fpsr; \ + __asm("ftst%.x %1\n" \ + "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \ + if (__fpsr & (7 << 24)) \ + { \ + /* Not finite or zero. */ \ + *__expptr = 0; \ + return __value; \ + } \ + __asm("fgetexp%.x %1, %0" : "=f" (__exponent) : "f" (__value)); \ + __iexponent = (int) __exponent + 1; \ + *__expptr = __iexponent; \ + __asm("fscale%.l %2, %0" : "=f" (__mantissa) \ + : "0" (__value), "dmi" (-__iexponent)); \ + return __mantissa; \ +} \ + \ +__m81_defun (float_type, __CONCAT(__floor,s), (float_type __x)) \ +{ \ + float_type __result; \ + unsigned long int __ctrl_reg; \ + __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); \ + /* Set rounding towards negative infinity. */ \ + __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ + : "dmi" ((__ctrl_reg & ~0x10) | 0x20)); \ + /* Convert X to an integer, using -Inf rounding. */ \ + __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); \ + /* Restore the previous rounding mode. */ \ + __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ + : "dmi" (__ctrl_reg)); \ + return __result; \ +} \ + \ +__m81_defun (float_type, __CONCAT(__ceil,s), (float_type __x)) \ +{ \ + float_type __result; \ + unsigned long int __ctrl_reg; \ + __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); \ + /* Set rounding towards positive infinity. */ \ + __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ + : "dmi" (__ctrl_reg | 0x30)); \ + /* Convert X to an integer, using +Inf rounding. */ \ + __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); \ + /* Restore the previous rounding mode. */ \ + __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ + : "dmi" (__ctrl_reg)); \ + return __result; \ +} \ + \ +__m81_defun (int, __CONCAT(__isinf,s), (float_type __value)) \ +{ \ + /* There is no branch-condition for infinity, \ + so we must extract and examine the condition codes manually. */ \ + unsigned long int __fpsr; \ + __asm("ftst%.x %1\n" \ + "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \ + return (__fpsr & (2 << 24)) ? (__fpsr & (8 << 24) ? -1 : 1) : 0; \ +} \ + \ +__m81_defun (int, __CONCAT(__isnan,s), (float_type __value)) \ +{ \ + char __result; \ + __asm("ftst%.x %1\n" \ + "fsun %0" : "=dm" (__result) : "f" (__value)); \ + return __result; \ +} \ + \ +__m81_defun (int, __CONCAT(__finite,s), (float_type __value)) \ +{ \ + /* There is no branch-condition for infinity, so we must extract and \ + examine the condition codes manually. */ \ + unsigned long int __fpsr; \ + __asm ("ftst%.x %1\n" \ + "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \ + return (__fpsr & (3 << 24)) == 0; \ +} \ + \ +__m81_defun (int, __CONCAT(__signbit,s), (float_type __value)) \ +{ \ + /* There is no branch-condition for the sign bit, so we must extract \ + and examine the condition codes manually. */ \ + unsigned long int __fpsr; \ + __asm ("ftst%.x %1\n" \ + "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \ + return (__fpsr >> 27) & 1; \ +} \ + \ +__m81_defun (int, __CONCAT(__ilogb,s), (float_type __x)) \ +{ \ + float_type __result; \ + if (__x == 0.0) \ + return 0x80000001; \ + __asm("fgetexp%.x %1, %0" : "=f" (__result) : "f" (__x)); \ + return (int) __result; \ +} \ + \ +__m81_defun (float_type, __CONCAT(__scalbn,s), (float_type __x, int __n)) \ +{ \ + float_type __result; \ + __asm ("fscale%.l %1, %0" : "=f" (__result) : "dmi" (__n), "0" (__x)); \ + return __result; \ +} \ + \ +__m81_defun (float_type, __CONCAT(__nearbyint,s), (float_type __x)) \ +{ \ + float_type __result; \ + unsigned long int __ctrl_reg; \ + __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); \ + /* Temporarily disable the inexact exception. */ \ + __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ + : "dmi" (__ctrl_reg & ~0x200)); \ + __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); \ + __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ + : "dmi" (__ctrl_reg)); \ + return __result; \ +} \ + \ +__m81_inline void \ +__m81_u(__CONCAT(__sincos,s))(float_type __x, float_type *__sinx, \ + float_type *__cosx) \ +{ \ + __asm ("fsincos%.x %2,%1:%0" \ + : "=f" (*__sinx), "=f" (*__cosx) : "f" (__x)); \ +} + +/* This defines the three variants of the inline functions. */ +__inline_functions (double,) +__inline_functions (float,f) +__inline_functions (long double,l) +#undef __inline_functions + +__m81_defun (long int, __lrint, (long double __x)) +{ + long int __result; + __asm ("fmove%.l %1, %0" : "=dm" (__result) : "f" (__x)); + return __result; +} + +#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__ + +/* Define inline versions of the user visible functions. */ + +#define __inline_forward_c(rettype, name, args1, args2) \ +extern __inline rettype __attribute__((__const__)) \ +name args1 \ +{ \ + return __CONCAT(__,name) args2; \ +} + +#define __inline_forward(rettype, name, args1, args2) \ +extern __inline rettype name args1 \ +{ \ + return __CONCAT(__,name) args2; \ +} + +__inline_forward(double,frexp, (double __value, int *__expptr), + (__value, __expptr)) +__inline_forward_c(double,floor, (double __x), (__x)) +__inline_forward_c(double,ceil, (double __x), (__x)) +#ifdef __USE_MISC +__inline_forward_c(int,isinf, (double __value), (__value)) +__inline_forward_c(int,finite, (double __value), (__value)) +__inline_forward_c(double,scalbn, (double __x, int __n), (__x, __n)) +#endif +#if defined __USE_MISC || defined __USE_XOPEN +#ifndef __USE_ISOC9X /* Conflict with macro of same name. */ +__inline_forward_c(int,isnan, (double __value), (__value)) +#endif +__inline_forward_c(int,ilogb, (double __value), (__value)) +#endif +#ifdef __USE_ISOC9X +__inline_forward_c(double,nearbyint, (double __value), (__value)) +#endif +#ifdef __USE_GNU +__inline_forward(void,sincos, (double __x, double *__sinx, double *__cosx), + (__x, __sinx, __cosx)) +#endif + +#if defined __USE_MISC || defined __USE_ISOC9X + +__inline_forward(float,frexpf, (float __value, int *__expptr), + (__value, __expptr)) +__inline_forward_c(float,floorf, (float __x), (__x)) +__inline_forward_c(float,ceilf, (float __x), (__x)) +#ifdef __USE_MISC +__inline_forward_c(int,isinff, (float __value), (__value)) +__inline_forward_c(int,finitef, (float __value), (__value)) +__inline_forward_c(float,scalbnf, (float __x, int __n), (__x, __n)) +__inline_forward_c(int,isnanf, (float __value), (__value)) +__inline_forward_c(int,ilogbf, (float __value), (__value)) +#endif +#ifdef __USE_ISOC9X +__inline_forward_c(float,nearbyintf, (float __value), (__value)) +#endif +#ifdef __USE_GNU +__inline_forward(void,sincosf, (float __x, float *__sinx, float *__cosx), + (__x, __sinx, __cosx)) +#endif + +__inline_forward(long double,frexpl, (long double __value, int *__expptr), + (__value, __expptr)) +__inline_forward_c(long double,floorl, (long double __x), (__x)) +__inline_forward_c(long double,ceill, (long double __x), (__x)) +#ifdef __USE_MISC +__inline_forward_c(int,isinfl, (long double __value), (__value)) +__inline_forward_c(int,finitel, (long double __value), (__value)) +__inline_forward_c(long double,scalbnl, (long double __x, int __n), + (__x, __n)) +__inline_forward_c(int,isnanl, (long double __value), (__value)) +__inline_forward_c(int,ilogbl, (long double __value), (__value)) +#endif +#ifdef __USE_ISOC9X +__inline_forward_c(long double,nearbyintl, (long double __value), (__value)) +__inline_forward_c(long int,lrint, (long double __value), (__value)) +#endif +#ifdef __USE_GNU +__inline_forward(void,sincosl, + (long double __x, long double *__sinx, long double *__cosx), + (__x, __sinx, __cosx)) +#endif + +#endif /* Use misc or ISO C9X */ + +#undef __inline_forward +#undef __inline_forward_c + +#ifdef __USE_ISOC9X + +/* ISO C 9X defines some macros to perform unordered comparisons. The + m68k FPU supports this with special opcodes and we should use them. + These must not be inline functions since we have to be able to handle + all floating-point types. */ +#undef isgreater +#define isgreater(x, y) \ + __extension__ \ + ({ char __result; \ + __asm__ ("fcmp%.x %2,%1; fsogt %0" \ + : "=dm" (__result) : "f" (x), "f" (y)); \ + (int) __result; }) + +#undef isgreaterequal +#define isgreaterequal(x, y) \ + __extension__ \ + ({ char __result; \ + __asm__ ("fcmp%.x %2,%1; fsoge %0" \ + : "=dm" (__result) : "f" (x), "f" (y)); \ + (int) __result; }) + +#undef isless +#define isless(x, y) \ + __extension__ \ + ({ char __result; \ + __asm__ ("fcmp%.x %2,%1; fsolt %0" \ + : "=dm" (__result) : "f" (x), "f" (y)); \ + (int) __result; }) + +#undef islessequal +#define islessequal(x, y) \ + __extension__ \ + ({ char __result; \ + __asm__ ("fcmp%.x %2,%1; fsole %0" \ + : "=dm" (__result) : "f" (x), "f" (y)); \ + (int) __result; }) + +#undef islessgreater +#define islessgreater(x, y) \ + __extension__ \ + ({ char __result; \ + __asm__ ("fcmp%.x %2,%1; fsogl %0" \ + : "=dm" (__result) : "f" (x), "f" (y)); \ + (int) __result; }) + +#undef isunordered +#define isunordered(x, y) \ + __extension__ \ + ({ char __result; \ + __asm__ ("fcmp%.x %2,%1; fsun %0" \ + : "=dm" (__result) : "f" (x), "f" (y)); \ + (int) __result; }) +#endif + +#endif /* !__NO_MATH_INLINES && __OPTIMIZE__ */ + +#endif /* GCC. */ From 15c12250939e8f5668e7e5711fa0dfe12c5b115e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:34:13 +0000 Subject: [PATCH 0950/4487] m68k w/out FPU specific math inline functions. --- sysdeps/m68k/fpu/switch/bits/mathinline.h | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/m68k/fpu/switch/bits/mathinline.h diff --git a/sysdeps/m68k/fpu/switch/bits/mathinline.h b/sysdeps/m68k/fpu/switch/bits/mathinline.h new file mode 100644 index 0000000000..c0f6966981 --- /dev/null +++ b/sysdeps/m68k/fpu/switch/bits/mathinline.h @@ -0,0 +1 @@ +/* We don't want any inlines when we might not have a 68881. */ From 85956635912be62477a7bd45247a10be77707c95 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:39:53 +0000 Subject: [PATCH 0951/4487] m68k specific math values. --- sysdeps/m68k/bits/huge_val.h | 75 ++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 sysdeps/m68k/bits/huge_val.h diff --git a/sysdeps/m68k/bits/huge_val.h b/sysdeps/m68k/bits/huge_val.h new file mode 100644 index 0000000000..822b82930b --- /dev/null +++ b/sysdeps/m68k/bits/huge_val.h @@ -0,0 +1,75 @@ +/* `HUGE_VAL' constants for m68k (where it is infinity). + Used by and functions for overflow. + Copyright (C) 1992, 1995, 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _MATH_H +# error "Never use directly; include instead." +#endif + + +#include +#include + +/* IEEE positive infinity (-HUGE_VAL is negative infinity). */ + +#ifdef __GNUC__ + +# define HUGE_VAL \ + (__extension__ \ + ((union { unsigned long long __l; double __d; }) \ + { __l: 0x7ff0000000000000ULL }).__d) + +#else /* not GCC */ + +static union { unsigned char __c[8]; double __d; } __huge_val = + { { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 } }; +# define HUGE_VAL (__huge_val.__d) + +#endif /* GCC. */ + + +/* ISO C 9X extensions: (float) HUGE_VALF and (long double) HUGE_VALL. */ + +#ifdef __USE_ISOC9X + +# ifdef __GNUC__ + +# define HUGE_VALF \ + (__extension__ \ + ((union { unsigned long __l; float __f; }) \ + { __l: 0x7f800000UL }).__f) + +# define HUGE_VALL \ + (__extension__ \ + ((union { unsigned long __l[3]; long double __ld; }) \ + { __l: { 0x7fff0000UL, 0x80000000UL, 0UL } }).__ld) + +# else /* not GCC */ + +static union { unsigned char __c[4]; float __f; } __huge_valf = + { { 0x7f, 0x80, 0, 0 } }; +# define HUGE_VALF (__huge_valf.__f) + +static union { unsigned char __c[12]; long double __ld; } __huge_vall = + { { 0x7f, 0xff, 0, 0, 0x80, 0, 0, 0, 0, 0, 0, 0 } }; +# define HUGE_VALL (__huge_vall.__ld) + +# endif /* GCC. */ + +#endif /* __USE_ISOC9X. */ From 788c7990ebcbf6d80d09edc2435f4ba76eea8c3d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:40:36 +0000 Subject: [PATCH 0952/4487] Moved to bits/. --- sysdeps/alpha/__math.h | 44 -- sysdeps/alpha/bytesex.h | 3 - sysdeps/alpha/fpu/fenvbits.h | 107 ---- sysdeps/alpha/jmp_buf.h | 46 -- sysdeps/arm/bytesex.h | 3 - sysdeps/arm/jmp_buf.h | 10 - sysdeps/m68k/bytesex.h | 3 - sysdeps/m68k/fpu/__math.h | 464 ------------------ sysdeps/m68k/fpu/fenvbits.h | 80 --- sysdeps/m68k/fpu/mathbits.h | 36 -- sysdeps/m68k/fpu/switch/__math.h | 1 - sysdeps/m68k/huge_val.h | 75 --- sysdeps/m68k/jmp_buf.h | 19 - sysdeps/mach/hurd/alpha/sigcontext.h | 65 --- sysdeps/mach/hurd/hppa/sigcontext.h | 86 ---- sysdeps/mach/hurd/mips/sigcontext.h | 71 --- sysdeps/mips/bytesex.h | 4 - sysdeps/mips/jmp_buf.h | 53 -- sysdeps/standalone/arm/errnos.h | 52 -- sysdeps/standalone/stdio_lim.h | 27 - sysdeps/unix/bsd/osf/alpha/statbuf.h | 76 --- sysdeps/unix/bsd/osf/sigaction.h | 46 -- sysdeps/unix/bsd/sun/m68k/sigcontext.h | 26 - sysdeps/unix/bsd/sun/signum.h | 69 --- sysdeps/unix/bsd/sun/sparc/sigcontext.h | 31 -- sysdeps/unix/bsd/sun/sunos4/fcntlbits.h | 145 ------ sysdeps/unix/bsd/sun/sunos4/resourcebits.h | 139 ------ sysdeps/unix/bsd/sun/sunos4/termbits.h | 208 -------- sysdeps/unix/bsd/sun/sunos4/utsnamelen.h | 2 - sysdeps/unix/bsd/ultrix4/fcntlbits.h | 125 ----- sysdeps/unix/bsd/ultrix4/mips/sigcontext.h | 60 --- sysdeps/unix/bsd/ultrix4/posix_opt.h | 23 - sysdeps/unix/bsd/ultrix4/utsnamelen.h | 1 - sysdeps/unix/sysv/irix4/confname.h | 80 --- sysdeps/unix/sysv/irix4/fcntlbits.h | 110 ----- sysdeps/unix/sysv/irix4/signum.h | 68 --- sysdeps/unix/sysv/irix4/statbuf.h | 61 --- sysdeps/unix/sysv/linux/alpha/fcntlbits.h | 100 ---- sysdeps/unix/sysv/linux/alpha/gnu/types.h | 94 ---- sysdeps/unix/sysv/linux/alpha/ioctls.h | 39 -- sysdeps/unix/sysv/linux/alpha/sigaction.h | 51 -- sysdeps/unix/sysv/linux/alpha/signum.h | 69 --- sysdeps/unix/sysv/linux/alpha/statbuf.h | 74 --- sysdeps/unix/sysv/linux/alpha/sys/ipc_buf.h | 85 ---- sysdeps/unix/sysv/linux/alpha/termbits.h | 193 -------- sysdeps/unix/sysv/linux/alpha/timebits.h | 50 -- sysdeps/unix/sysv/minix/sigaction.h | 49 -- sysdeps/unix/sysv/sco3.2.4/confname.h | 50 -- sysdeps/unix/sysv/sco3.2.4/sigaction.h | 39 -- sysdeps/unix/sysv/sco3.2/local_lim.h | 37 -- sysdeps/unix/sysv/sysv4/i386/statbuf.h | 90 ---- sysdeps/unix/sysv/sysv4/sigaction.h | 51 -- sysdeps/unix/sysv/sysv4/signum.h | 66 --- sysdeps/unix/sysv/sysv4/sigset.h | 96 ---- sysdeps/unix/sysv/sysv4/solaris2/signum.h | 73 --- .../sysv/sysv4/solaris2/sparc/sigcontext.h | 1 - sysdeps/unix/sysv/sysv4/solaris2/statbuf.h | 83 ---- sysdeps/unix/sysv/sysv4/utsnamelen.h | 1 - sysdeps/unix/sysv/sysv4/waitflags.h | 35 -- sysdeps/vax/huge_val.h | 26 - sysdeps/vax/jmp_buf.h | 7 - 61 files changed, 3978 deletions(-) delete mode 100644 sysdeps/alpha/__math.h delete mode 100644 sysdeps/alpha/bytesex.h delete mode 100644 sysdeps/alpha/fpu/fenvbits.h delete mode 100644 sysdeps/alpha/jmp_buf.h delete mode 100644 sysdeps/arm/bytesex.h delete mode 100644 sysdeps/arm/jmp_buf.h delete mode 100644 sysdeps/m68k/bytesex.h delete mode 100644 sysdeps/m68k/fpu/__math.h delete mode 100644 sysdeps/m68k/fpu/fenvbits.h delete mode 100644 sysdeps/m68k/fpu/mathbits.h delete mode 100644 sysdeps/m68k/fpu/switch/__math.h delete mode 100644 sysdeps/m68k/huge_val.h delete mode 100644 sysdeps/m68k/jmp_buf.h delete mode 100644 sysdeps/mach/hurd/alpha/sigcontext.h delete mode 100644 sysdeps/mach/hurd/hppa/sigcontext.h delete mode 100644 sysdeps/mach/hurd/mips/sigcontext.h delete mode 100644 sysdeps/mips/bytesex.h delete mode 100644 sysdeps/mips/jmp_buf.h delete mode 100644 sysdeps/standalone/arm/errnos.h delete mode 100644 sysdeps/standalone/stdio_lim.h delete mode 100644 sysdeps/unix/bsd/osf/alpha/statbuf.h delete mode 100644 sysdeps/unix/bsd/osf/sigaction.h delete mode 100644 sysdeps/unix/bsd/sun/m68k/sigcontext.h delete mode 100644 sysdeps/unix/bsd/sun/signum.h delete mode 100644 sysdeps/unix/bsd/sun/sparc/sigcontext.h delete mode 100644 sysdeps/unix/bsd/sun/sunos4/fcntlbits.h delete mode 100644 sysdeps/unix/bsd/sun/sunos4/resourcebits.h delete mode 100644 sysdeps/unix/bsd/sun/sunos4/termbits.h delete mode 100644 sysdeps/unix/bsd/sun/sunos4/utsnamelen.h delete mode 100644 sysdeps/unix/bsd/ultrix4/fcntlbits.h delete mode 100644 sysdeps/unix/bsd/ultrix4/mips/sigcontext.h delete mode 100644 sysdeps/unix/bsd/ultrix4/posix_opt.h delete mode 100644 sysdeps/unix/bsd/ultrix4/utsnamelen.h delete mode 100644 sysdeps/unix/sysv/irix4/confname.h delete mode 100644 sysdeps/unix/sysv/irix4/fcntlbits.h delete mode 100644 sysdeps/unix/sysv/irix4/signum.h delete mode 100644 sysdeps/unix/sysv/irix4/statbuf.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/fcntlbits.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/gnu/types.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/ioctls.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/sigaction.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/signum.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/statbuf.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/sys/ipc_buf.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/termbits.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/timebits.h delete mode 100644 sysdeps/unix/sysv/minix/sigaction.h delete mode 100644 sysdeps/unix/sysv/sco3.2.4/confname.h delete mode 100644 sysdeps/unix/sysv/sco3.2.4/sigaction.h delete mode 100644 sysdeps/unix/sysv/sco3.2/local_lim.h delete mode 100644 sysdeps/unix/sysv/sysv4/i386/statbuf.h delete mode 100644 sysdeps/unix/sysv/sysv4/sigaction.h delete mode 100644 sysdeps/unix/sysv/sysv4/signum.h delete mode 100644 sysdeps/unix/sysv/sysv4/sigset.h delete mode 100644 sysdeps/unix/sysv/sysv4/solaris2/signum.h delete mode 100644 sysdeps/unix/sysv/sysv4/solaris2/sparc/sigcontext.h delete mode 100644 sysdeps/unix/sysv/sysv4/solaris2/statbuf.h delete mode 100644 sysdeps/unix/sysv/sysv4/utsnamelen.h delete mode 100644 sysdeps/unix/sysv/sysv4/waitflags.h delete mode 100644 sysdeps/vax/huge_val.h delete mode 100644 sysdeps/vax/jmp_buf.h diff --git a/sysdeps/alpha/__math.h b/sysdeps/alpha/__math.h deleted file mode 100644 index 0f76027317..0000000000 --- a/sysdeps/alpha/__math.h +++ /dev/null @@ -1,44 +0,0 @@ -/* Inline math functions for Alpha. - Copyright (C) 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David Mosberger-Tang. - - 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 - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#if defined (__GNUC__) && !defined (__NO_MATH_INLINES) - -extern __inline double -__copysign (double __x, double __y) -{ - __asm ("cpys %1, %2, %0" : "=f" (__x) : "f" (__y), "f" (__x)); - return __x; -} - -extern __inline double -fabs (double __x) -{ - __asm ("cpys $f31, %1, %0" : "=f" (__x) : "f" (__x)); - return __x; -} - -extern __inline double -atan (double __x) -{ - extern double __atan2 (double, double); - return __atan2 (__x, 1.0); -} - -#endif diff --git a/sysdeps/alpha/bytesex.h b/sysdeps/alpha/bytesex.h deleted file mode 100644 index e873d2123c..0000000000 --- a/sysdeps/alpha/bytesex.h +++ /dev/null @@ -1,3 +0,0 @@ -/* Alpha is little-endian. */ - -#define __BYTE_ORDER __LITTLE_ENDIAN diff --git a/sysdeps/alpha/fpu/fenvbits.h b/sysdeps/alpha/fpu/fenvbits.h deleted file mode 100644 index 02414e4c30..0000000000 --- a/sysdeps/alpha/fpu/fenvbits.h +++ /dev/null @@ -1,107 +0,0 @@ -/* Copyright (C) 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Richard Henderson , 1997 - - 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 - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* This file should never be included directly. */ - -#ifndef _FENVBITS_H -#define _FENVBITS_H 1 - -/* Define the bits representing the exception. - - Note that these are the bit positions as defined by the OSF/1 - ieee_{get,set}_control_word interface and not by the hardware fpcr. - - See the Alpha Architecture Handbook section 4.7.7.3 for details, - but in summary, trap shadows mean the hardware register can acquire - extra exception bits so for proper IEEE support the tracking has to - be done in software -- in this case with kernel support. - - As to why the system call interface isn't in the same format as - the hardware register, only those crazy folks at DEC can tell you. */ - -enum - { - FE_INEXACT = 1UL << 21, -#define FE_INEXACT FE_INEXACT - - FE_UNDERFLOW = 1UL << 20, -#define FE_UNDERFLOW FE_UNDERFLOW - - FE_OVERFLOW = 1UL << 19, -#define FE_OVERFLOW FE_OVERFLOW - - FE_DIVBYZERO = 1UL << 18, -#define FE_DIVBYZERO FE_DIVBYZERO - - FE_INVALID = 1UL << 17, -#define FE_INVALID FE_INVALID - - FE_ALL_EXCEPT = - (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID) -#define FE_ALL_EXCEPT FE_ALL_EXCEPT - }; - - -/* Alpha chips support all four defined rouding modes. - - Note that code must be compiled to use dynamic rounding (/d) instructions - to see these changes. For gcc this is -mfp-rounding-mode=d; for DEC cc - this is -fprm d. The default for both is static rounding to nearest. - - These are shifted down 58 bits from the hardware fpcr because the - functions are declared to take integers. */ - -enum - { - FE_TOWARDSZERO = 0, -#define FE_TOWARDSZERO FE_TOWARDSZERO - - FE_DOWNWARD = 1, -#define FE_DOWNWARD FE_DOWNWARD - - FE_TONEAREST = 2, -#define FE_TONEAREST FE_TONEAREST - - FE_UPWARD = 3, -#define FE_UPWARD FE_UPWARD - }; - - -/* Type representing exception flags. */ -typedef unsigned long fexcept_t; - -/* Type representing floating-point environment. */ -typedef unsigned long fenv_t; - -/* If the default argument is used we use this value. Note that due to - architecture-specified page mappings, no user-space pointer will ever - have its two high bits set. Co-opt one. */ -#define FE_DFL_ENV ((fenv_t *) 0x8800000000000000UL) - -#ifdef __USE_GNU -/* Floating-point environment where none of the exceptions are masked. */ -# define FE_NOMASK_ENV ((fenv_t *) 0x880000000000003eUL) -#endif - -/* The system calls to talk to the kernel's FP code. */ -extern unsigned long __ieee_get_fp_control(void); -extern void __ieee_set_fp_control(unsigned long); - - -#endif /* fenvbits.h */ diff --git a/sysdeps/alpha/jmp_buf.h b/sysdeps/alpha/jmp_buf.h deleted file mode 100644 index 6e6f6b4727..0000000000 --- a/sysdeps/alpha/jmp_buf.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Define the machine-dependent type `jmp_buf'. Alpha version. -Copyright (C) 1992 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -typedef struct - { - /* Integer registers: - $0 is the return value; - $1-$8, $22-$25, $28 are call-used; - $9-$14 we save here; - $15 is the FP and we save it here; - $16-$21 are input arguments (call-used); - $26 is the return PC and we save it here; - $27 is the procedure value (i.e., the address of __setjmp); - $29 is the global pointer, which the caller will reconstruct - from the return address restored in $26; - $30 is the stack pointer and we save it here; - $31 is always zero. */ - long int __9, __10, __11, __12, __13, __14; - long int *__pc, *__fp, *__sp; - -#if 1 /* XXX need predefine for TARGET_FPREGS */ - /* Floating-point registers: - $f0 is the floating return value; - $f1, $f10-$f15, $f22-$f30 are call-used; - $f2-$f9 we save here; - $f16-$21 are input args (call-used); - $f31 is always zero. */ - double __f2, __f3, __f4, __f5, __f6, __f7, __f8, __f9; -#endif /* Have FP regs. */ - } __jmp_buf[1]; diff --git a/sysdeps/arm/bytesex.h b/sysdeps/arm/bytesex.h deleted file mode 100644 index 32f8489df2..0000000000 --- a/sysdeps/arm/bytesex.h +++ /dev/null @@ -1,3 +0,0 @@ -/* ARM is little-endian. */ - -#define __BYTE_ORDER __LITTLE_ENDIAN diff --git a/sysdeps/arm/jmp_buf.h b/sysdeps/arm/jmp_buf.h deleted file mode 100644 index 93b0f5f916..0000000000 --- a/sysdeps/arm/jmp_buf.h +++ /dev/null @@ -1,10 +0,0 @@ -/* Define the machine-dependent type `jmp_buf'. ARM version. */ - -#ifndef _ASM -/* Jump buffer contains v1-v6, sl, fp, sp, pc and (f4-f7) if we do FP. */ -#if __ARM_USES_FP -typedef int __jmp_buf[22]; -#else -typedef int __jmp_buf[10]; -#endif -#endif diff --git a/sysdeps/m68k/bytesex.h b/sysdeps/m68k/bytesex.h deleted file mode 100644 index 6f985293f2..0000000000 --- a/sysdeps/m68k/bytesex.h +++ /dev/null @@ -1,3 +0,0 @@ -/* m68k is big-endian. */ - -#define __BYTE_ORDER __BIG_ENDIAN diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h deleted file mode 100644 index bdeaa9efb0..0000000000 --- a/sysdeps/m68k/fpu/__math.h +++ /dev/null @@ -1,464 +0,0 @@ -/* Definitions of inline math functions implemented by the m68881/2. - Copyright (C) 1991, 92, 93, 94, 96, 97 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifdef __GNUC__ - -#include - -#ifdef __LIBC_M81_MATH_INLINES -/* This is used when defining the functions themselves. Define them with - __ names, and with `static inline' instead of `extern inline' so the - bodies will always be used, never an external function call. */ -#define __m81_u(x) __CONCAT(__,x) -#define __m81_inline static __inline -#else -#define __m81_u(x) x -#define __m81_inline extern __inline -#define __M81_MATH_INLINES 1 -#endif - -/* Define a const math function. */ -#define __m81_defun(rettype, func, args) \ - __m81_inline rettype __attribute__((__const__)) \ - __m81_u(func) args - -/* Define the three variants of a math function that has a direct - implementation in the m68k fpu. FUNC is the name for C (which will be - suffixed with f and l for the float and long double version, resp). OP - is the name of the fpu operation (without leading f). */ - -#if defined __USE_MISC || defined __USE_ISOC9X -#define __inline_mathop(func, op) \ - __inline_mathop1(double, func, op) \ - __inline_mathop1(float, __CONCAT(func,f), op) \ - __inline_mathop1(long double, __CONCAT(func,l), op) -#else -#define __inline_mathop(func, op) \ - __inline_mathop1(double, func, op) -#endif - -#define __inline_mathop1(float_type,func, op) \ - __m81_defun (float_type, func, (float_type __mathop_x)) \ - { \ - float_type __result; \ - __asm("f" __STRING(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x));\ - return __result; \ - } - -#ifdef __LIBC_M81_MATH_INLINES -/* ieee style elementary functions */ -/* These are internal to the implementation of libm. */ -__inline_mathop(__ieee754_acos, acos) -__inline_mathop(__ieee754_asin, asin) -__inline_mathop(__ieee754_cosh, cosh) -__inline_mathop(__ieee754_sinh, sinh) -__inline_mathop(__ieee754_exp, etox) -__inline_mathop(__ieee754_log10, log10) -__inline_mathop(__ieee754_log, logn) -__inline_mathop(__ieee754_sqrt, sqrt) -__inline_mathop(__ieee754_atanh, atanh) -#endif - -__inline_mathop(__atan, atan) -__inline_mathop(__cos, cos) -__inline_mathop(__sin, sin) -__inline_mathop(__tan, tan) -__inline_mathop(__tanh, tanh) -__inline_mathop(__fabs, abs) - -__inline_mathop(__rint, int) -__inline_mathop(__expm1, etoxm1) -__inline_mathop(__log1p, lognp1) -__inline_mathop(__significand, getman) - -__inline_mathop(__log2, log2) -__inline_mathop(__exp2, twotox) -__inline_mathop(__trunc, intrz) - -#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__ - -__inline_mathop(atan, atan) -__inline_mathop(cos, cos) -__inline_mathop(sin, sin) -__inline_mathop(tan, tan) -__inline_mathop(tanh, tanh) - -#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC9X -__inline_mathop(rint, int) -__inline_mathop(expm1, etoxm1) -__inline_mathop(log1p, lognp1) -#endif - -#ifdef __USE_MISC -__inline_mathop(significand, getman) -#endif - -#ifdef __USE_ISOC9X -__inline_mathop(log2, log2) -__inline_mathop(exp2, twotox) -__inline_mathop(trunc, intrz) -#endif - -#endif /* !__NO_MATH_INLINES && __OPTIMIZE__ */ - -/* This macro contains the definition for the rest of the inline - functions, using __FLOAT_TYPE as the domain type and __S as the suffix - for the function names. */ - -#ifdef __LIBC_M81_MATH_INLINES -/* Internally used functions. */ -#define __internal_inline_functions(float_type, s) \ -__m81_defun (float_type, __CONCAT(__ieee754_remainder,s), \ - (float_type __x, float_type __y)) \ -{ \ - float_type __result; \ - __asm("frem%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); \ - return __result; \ -} \ - \ -__m81_defun (float_type, __CONCAT(__ieee754_fmod,s), \ - (float_type __x, float_type __y)) \ -{ \ - float_type __result; \ - __asm("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); \ - return __result; \ -} \ - \ -__m81_defun (float_type, __CONCAT(__ieee754_scalb,s), \ - (float_type __x, float_type __n)) \ -{ \ - float_type __result; \ - __asm ("fscale%.x %1, %0" : "=f" (__result) : "f" (__n), "0" (__x)); \ - return __result; \ -} - -__internal_inline_functions (double,) -__internal_inline_functions (float,f) -__internal_inline_functions (long double,l) -#undef __internal_inline_functions - -/* Get the m68881 condition codes, to quickly check multiple conditions. */ -static __inline__ unsigned long -__m81_test (long double __val) -{ - unsigned long __fpsr; - __asm ("ftst%.x %1; fmove%.l %/fpsr,%0" : "=dm" (__fpsr) : "f" (__val)); - return __fpsr; -} - -/* Bit values returned by __m81_test. */ -#define __M81_COND_NAN (1 << 24) -#define __M81_COND_INF (2 << 24) -#define __M81_COND_ZERO (4 << 24) -#define __M81_COND_NEG (8 << 24) - -#endif /* __LIBC_M81_MATH_INLINES */ - -/* The rest of the functions are available to the user. */ - -#define __inline_functions(float_type, s) \ -__m81_inline float_type \ -__m81_u(__CONCAT(__frexp,s))(float_type __value, int *__expptr) \ -{ \ - float_type __mantissa, __exponent; \ - int __iexponent; \ - unsigned long __fpsr; \ - __asm("ftst%.x %1\n" \ - "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \ - if (__fpsr & (7 << 24)) \ - { \ - /* Not finite or zero. */ \ - *__expptr = 0; \ - return __value; \ - } \ - __asm("fgetexp%.x %1, %0" : "=f" (__exponent) : "f" (__value)); \ - __iexponent = (int) __exponent + 1; \ - *__expptr = __iexponent; \ - __asm("fscale%.l %2, %0" : "=f" (__mantissa) \ - : "0" (__value), "dmi" (-__iexponent)); \ - return __mantissa; \ -} \ - \ -__m81_defun (float_type, __CONCAT(__floor,s), (float_type __x)) \ -{ \ - float_type __result; \ - unsigned long int __ctrl_reg; \ - __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); \ - /* Set rounding towards negative infinity. */ \ - __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ - : "dmi" ((__ctrl_reg & ~0x10) | 0x20)); \ - /* Convert X to an integer, using -Inf rounding. */ \ - __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); \ - /* Restore the previous rounding mode. */ \ - __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ - : "dmi" (__ctrl_reg)); \ - return __result; \ -} \ - \ -__m81_defun (float_type, __CONCAT(__ceil,s), (float_type __x)) \ -{ \ - float_type __result; \ - unsigned long int __ctrl_reg; \ - __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); \ - /* Set rounding towards positive infinity. */ \ - __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ - : "dmi" (__ctrl_reg | 0x30)); \ - /* Convert X to an integer, using +Inf rounding. */ \ - __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); \ - /* Restore the previous rounding mode. */ \ - __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ - : "dmi" (__ctrl_reg)); \ - return __result; \ -} \ - \ -__m81_defun (int, __CONCAT(__isinf,s), (float_type __value)) \ -{ \ - /* There is no branch-condition for infinity, \ - so we must extract and examine the condition codes manually. */ \ - unsigned long int __fpsr; \ - __asm("ftst%.x %1\n" \ - "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \ - return (__fpsr & (2 << 24)) ? (__fpsr & (8 << 24) ? -1 : 1) : 0; \ -} \ - \ -__m81_defun (int, __CONCAT(__isnan,s), (float_type __value)) \ -{ \ - char __result; \ - __asm("ftst%.x %1\n" \ - "fsun %0" : "=dm" (__result) : "f" (__value)); \ - return __result; \ -} \ - \ -__m81_defun (int, __CONCAT(__finite,s), (float_type __value)) \ -{ \ - /* There is no branch-condition for infinity, so we must extract and \ - examine the condition codes manually. */ \ - unsigned long int __fpsr; \ - __asm ("ftst%.x %1\n" \ - "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \ - return (__fpsr & (3 << 24)) == 0; \ -} \ - \ -__m81_defun (int, __CONCAT(__signbit,s), (float_type __value)) \ -{ \ - /* There is no branch-condition for the sign bit, so we must extract \ - and examine the condition codes manually. */ \ - unsigned long int __fpsr; \ - __asm ("ftst%.x %1\n" \ - "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \ - return (__fpsr >> 27) & 1; \ -} \ - \ -__m81_defun (int, __CONCAT(__ilogb,s), (float_type __x)) \ -{ \ - float_type __result; \ - if (__x == 0.0) \ - return 0x80000001; \ - __asm("fgetexp%.x %1, %0" : "=f" (__result) : "f" (__x)); \ - return (int) __result; \ -} \ - \ -__m81_defun (float_type, __CONCAT(__scalbn,s), (float_type __x, int __n)) \ -{ \ - float_type __result; \ - __asm ("fscale%.l %1, %0" : "=f" (__result) : "dmi" (__n), "0" (__x)); \ - return __result; \ -} \ - \ -__m81_defun (float_type, __CONCAT(__nearbyint,s), (float_type __x)) \ -{ \ - float_type __result; \ - unsigned long int __ctrl_reg; \ - __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); \ - /* Temporarily disable the inexact exception. */ \ - __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ - : "dmi" (__ctrl_reg & ~0x200)); \ - __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); \ - __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ - : "dmi" (__ctrl_reg)); \ - return __result; \ -} \ - \ -__m81_inline void \ -__m81_u(__CONCAT(__sincos,s))(float_type __x, float_type *__sinx, \ - float_type *__cosx) \ -{ \ - __asm ("fsincos%.x %2,%1:%0" \ - : "=f" (*__sinx), "=f" (*__cosx) : "f" (__x)); \ -} - -/* This defines the three variants of the inline functions. */ -__inline_functions (double,) -__inline_functions (float,f) -__inline_functions (long double,l) -#undef __inline_functions - -__m81_defun (long int, __lrint, (long double __x)) -{ - long int __result; - __asm ("fmove%.l %1, %0" : "=dm" (__result) : "f" (__x)); - return __result; -} - -#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__ - -/* Define inline versions of the user visible functions. */ - -#define __inline_forward_c(rettype, name, args1, args2) \ -extern __inline rettype __attribute__((__const__)) \ -name args1 \ -{ \ - return __CONCAT(__,name) args2; \ -} - -#define __inline_forward(rettype, name, args1, args2) \ -extern __inline rettype name args1 \ -{ \ - return __CONCAT(__,name) args2; \ -} - -__inline_forward(double,frexp, (double __value, int *__expptr), - (__value, __expptr)) -__inline_forward_c(double,floor, (double __x), (__x)) -__inline_forward_c(double,ceil, (double __x), (__x)) -#ifdef __USE_MISC -__inline_forward_c(int,isinf, (double __value), (__value)) -__inline_forward_c(int,finite, (double __value), (__value)) -__inline_forward_c(double,scalbn, (double __x, int __n), (__x, __n)) -#endif -#if defined __USE_MISC || defined __USE_XOPEN -#ifndef __USE_ISOC9X /* Conflict with macro of same name. */ -__inline_forward_c(int,isnan, (double __value), (__value)) -#endif -__inline_forward_c(int,ilogb, (double __value), (__value)) -#endif -#ifdef __USE_ISOC9X -__inline_forward_c(double,nearbyint, (double __value), (__value)) -#endif -#ifdef __USE_GNU -__inline_forward(void,sincos, (double __x, double *__sinx, double *__cosx), - (__x, __sinx, __cosx)) -#endif - -#if defined __USE_MISC || defined __USE_ISOC9X - -__inline_forward(float,frexpf, (float __value, int *__expptr), - (__value, __expptr)) -__inline_forward_c(float,floorf, (float __x), (__x)) -__inline_forward_c(float,ceilf, (float __x), (__x)) -#ifdef __USE_MISC -__inline_forward_c(int,isinff, (float __value), (__value)) -__inline_forward_c(int,finitef, (float __value), (__value)) -__inline_forward_c(float,scalbnf, (float __x, int __n), (__x, __n)) -__inline_forward_c(int,isnanf, (float __value), (__value)) -__inline_forward_c(int,ilogbf, (float __value), (__value)) -#endif -#ifdef __USE_ISOC9X -__inline_forward_c(float,nearbyintf, (float __value), (__value)) -#endif -#ifdef __USE_GNU -__inline_forward(void,sincosf, (float __x, float *__sinx, float *__cosx), - (__x, __sinx, __cosx)) -#endif - -__inline_forward(long double,frexpl, (long double __value, int *__expptr), - (__value, __expptr)) -__inline_forward_c(long double,floorl, (long double __x), (__x)) -__inline_forward_c(long double,ceill, (long double __x), (__x)) -#ifdef __USE_MISC -__inline_forward_c(int,isinfl, (long double __value), (__value)) -__inline_forward_c(int,finitel, (long double __value), (__value)) -__inline_forward_c(long double,scalbnl, (long double __x, int __n), - (__x, __n)) -__inline_forward_c(int,isnanl, (long double __value), (__value)) -__inline_forward_c(int,ilogbl, (long double __value), (__value)) -#endif -#ifdef __USE_ISOC9X -__inline_forward_c(long double,nearbyintl, (long double __value), (__value)) -__inline_forward_c(long int,lrint, (long double __value), (__value)) -#endif -#ifdef __USE_GNU -__inline_forward(void,sincosl, - (long double __x, long double *__sinx, long double *__cosx), - (__x, __sinx, __cosx)) -#endif - -#endif /* Use misc or ISO C9X */ - -#undef __inline_forward -#undef __inline_forward_c - -#ifdef __USE_ISOC9X - -/* ISO C 9X defines some macros to perform unordered comparisons. The - m68k FPU supports this with special opcodes and we should use them. - These must not be inline functions since we have to be able to handle - all floating-point types. */ -#undef isgreater -#define isgreater(x, y) \ - __extension__ \ - ({ char __result; \ - __asm__ ("fcmp%.x %2,%1; fsogt %0" \ - : "=dm" (__result) : "f" (x), "f" (y)); \ - (int) __result; }) - -#undef isgreaterequal -#define isgreaterequal(x, y) \ - __extension__ \ - ({ char __result; \ - __asm__ ("fcmp%.x %2,%1; fsoge %0" \ - : "=dm" (__result) : "f" (x), "f" (y)); \ - (int) __result; }) - -#undef isless -#define isless(x, y) \ - __extension__ \ - ({ char __result; \ - __asm__ ("fcmp%.x %2,%1; fsolt %0" \ - : "=dm" (__result) : "f" (x), "f" (y)); \ - (int) __result; }) - -#undef islessequal -#define islessequal(x, y) \ - __extension__ \ - ({ char __result; \ - __asm__ ("fcmp%.x %2,%1; fsole %0" \ - : "=dm" (__result) : "f" (x), "f" (y)); \ - (int) __result; }) - -#undef islessgreater -#define islessgreater(x, y) \ - __extension__ \ - ({ char __result; \ - __asm__ ("fcmp%.x %2,%1; fsogl %0" \ - : "=dm" (__result) : "f" (x), "f" (y)); \ - (int) __result; }) - -#undef isunordered -#define isunordered(x, y) \ - __extension__ \ - ({ char __result; \ - __asm__ ("fcmp%.x %2,%1; fsun %0" \ - : "=dm" (__result) : "f" (x), "f" (y)); \ - (int) __result; }) -#endif - -#endif /* !__NO_MATH_INLINES && __OPTIMIZE__ */ - -#endif /* GCC. */ diff --git a/sysdeps/m68k/fpu/fenvbits.h b/sysdeps/m68k/fpu/fenvbits.h deleted file mode 100644 index b653b1aafd..0000000000 --- a/sysdeps/m68k/fpu/fenvbits.h +++ /dev/null @@ -1,80 +0,0 @@ -/* Copyright (C) 1997 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* This file should never be included directly. */ - -#ifndef _FENVBITS_H -#define _FENVBITS_H 1 - -/* Define bits representing the exception. We use the bit positions of - the appropriate bits in the FPSR Accrued Exception Byte. */ -enum - { - FE_INEXACT = 1 << 3, -#define FE_INEXACT FE_INEXACT - FE_DIVBYZERO = 1 << 4, -#define FE_DIVBYZERO FE_DIVBYZERO - FE_UNDERFLOW = 1 << 5, -#define FE_UNDERFLOW FE_UNDERFLOW - FE_OVERFLOW = 1 << 6, -#define FE_OVERFLOW FE_OVERFLOW - FE_INVALID = 1 << 7 -#define FE_INVALID FE_INVALID - }; - -#define FE_ALL_EXCEPT \ - (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID) - -/* The m68k FPU supports all of the four defined rounding modes. We use - the bit positions in the FPCR Mode Control Byte as the values for the - appropriate macros. */ -enum - { - FE_TONEAREST = 0, -#define FE_TONEAREST FE_TONEAREST - FE_TOWARDSZERO = 1 << 4, -#define FE_TOWARDSZERO FE_TOWARDSZERO - FE_DOWNWARD = 2 << 4, -#define FE_DOWNWARD FE_DOWNWARD - FE_UPWARD = 3 << 4 -#define FE_UPWARD FE_UPWARD - }; - - -/* Type representing exception flags. */ -typedef unsigned int fexcept_t; - - -/* Type representing floating-point environment. This structure - corresponds to the layout of the block written by `fmovem'. */ -typedef struct - { - fexcept_t control_register; - fexcept_t status_register; - } -fenv_t; - -/* If the default argument is used we use this value. */ -#define FE_DFL_ENV ((fenv_t *) -1) - -#ifdef __USE_GNU -/* Floating-point environment where none of the exceptions are masked. */ -# define FE_NOMASK_ENV ((fenv_t *) -2) -#endif - -#endif /* fenvbits.h */ diff --git a/sysdeps/m68k/fpu/mathbits.h b/sysdeps/m68k/fpu/mathbits.h deleted file mode 100644 index 049662319a..0000000000 --- a/sysdeps/m68k/fpu/mathbits.h +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright (C) 1997 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _MATHBITS_H -#define _MATHBITS_H 1 - -/* The m68k FPUs evaluate all values in the 96 bit floating-point format - which is also available for the user as `long double'. Therefore we - define: */ -typedef long double float_t; /* `float' expressions are evaluated as - `long double'. */ -typedef long double double_t; /* `double' expressions are evaluated as - `long double'. */ - -/* Signal that both types are `long double'. */ -#define FLT_EVAL_METHOD 2 - -/* Define `INFINITY' as value of type `float_t'. */ -#define INFINITY HUGE_VALL - -#endif /* mathbits.h */ diff --git a/sysdeps/m68k/fpu/switch/__math.h b/sysdeps/m68k/fpu/switch/__math.h deleted file mode 100644 index c0f6966981..0000000000 --- a/sysdeps/m68k/fpu/switch/__math.h +++ /dev/null @@ -1 +0,0 @@ -/* We don't want any inlines when we might not have a 68881. */ diff --git a/sysdeps/m68k/huge_val.h b/sysdeps/m68k/huge_val.h deleted file mode 100644 index c71454e9a8..0000000000 --- a/sysdeps/m68k/huge_val.h +++ /dev/null @@ -1,75 +0,0 @@ -/* `HUGE_VAL' constants for m68k (where it is infinity). - Used by and functions for overflow. - Copyright (C) 1992, 1995, 1996, 1997 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _HUGE_VAL_H -#define _HUGE_VAL_H 1 - -#include -#include - -/* IEEE positive infinity (-HUGE_VAL is negative infinity). */ - -#ifdef __GNUC__ - -#define HUGE_VAL \ - (__extension__ \ - ((union { unsigned long long __l; double __d; }) \ - { __l: 0x7ff0000000000000ULL }).__d) - -#else /* not GCC */ - -static union { unsigned char __c[8]; double __d; } __huge_val = - { { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 } }; -#define HUGE_VAL (__huge_val.__d) - -#endif /* GCC. */ - - -/* ISO C 9X extensions: (float) HUGE_VALF and (long double) HUGE_VALL. */ - -#ifdef __USE_ISOC9X - -#ifdef __GNUC__ - -#define HUGE_VALF \ - (__extension__ \ - ((union { unsigned long __l; float __f; }) \ - { __l: 0x7f800000UL }).__f) - -#define HUGE_VALL \ - (__extension__ \ - ((union { unsigned long __l[3]; long double __ld; }) \ - { __l: { 0x7fff0000UL, 0x80000000UL, 0UL } }).__ld) - -#else /* not GCC */ - -static union { unsigned char __c[4]; float __f; } __huge_valf = - { { 0x7f, 0x80, 0, 0 } }; -#define HUGE_VALF (__huge_valf.__f) - -static union { unsigned char __c[12]; long double __ld; } __huge_vall = - { { 0x7f, 0xff, 0, 0, 0x80, 0, 0, 0, 0, 0, 0, 0 } }; -#define HUGE_VALL (__huge_vall.__ld) - -#endif /* GCC. */ - -#endif /* __USE_ISOC9X. */ - -#endif /* huge_val.h */ diff --git a/sysdeps/m68k/jmp_buf.h b/sysdeps/m68k/jmp_buf.h deleted file mode 100644 index 96240f0d8e..0000000000 --- a/sysdeps/m68k/jmp_buf.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Define the machine-dependent type `jmp_buf'. m68k version. */ - -typedef struct - { - /* There are eight 4-byte data registers, but D0 is not saved. */ - long int __dregs[7]; - - /* There are six 4-byte address registers, plus the FP and SP. */ - int *__aregs[6]; - int * __fp; - int * __sp; - -#if defined(__HAVE_68881__) || defined(__HAVE_FPU__) - /* There are eight floating point registers which - are saved in IEEE 96-bit extended format. */ - char __fpregs[8 * (96 / 8)]; -#endif - - } __jmp_buf[1]; diff --git a/sysdeps/mach/hurd/alpha/sigcontext.h b/sysdeps/mach/hurd/alpha/sigcontext.h deleted file mode 100644 index 32e0c94f98..0000000000 --- a/sysdeps/mach/hurd/alpha/sigcontext.h +++ /dev/null @@ -1,65 +0,0 @@ -/* Machine-dependent signal context structure for GNU Hurd. Alpha version. -Copyright (C) 1994 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -/* Signal handlers are actually called: - void handler (int sig, int code, struct sigcontext *scp); */ - -/* State of this thread when the signal was taken. */ -struct sigcontext - { - /* These first members are machine-independent. */ - - long int sc_onstack; /* Nonzero if running on sigstack. */ - __sigset_t sc_mask; /* Blocked signals to restore. */ - - /* MiG reply port this thread is using. */ - unsigned long int sc_reply_port; - - /* Port this thread is doing an interruptible RPC on. */ - unsigned long int sc_intr_port; - - /* Error code associated with this signal (interpreted as `error_t'). */ - int sc_error; - - /* All following members are machine-dependent. The rest of this - structure is written to be laid out identically to: - { - struct alpha_thread_state basic; - struct alpha_exc_state exc; - struct alpha_float_state fpu; - } - trampoline.c knows this, so it must be changed if this changes. */ - -#define sc_alpha_thread_state sc_regs /* Beginning of correspondence. */ - long int sc_regs[31]; /* General registers $0..$30. */ - long int sc_pc; /* Program counter. */ - - /* struct alpha_exc_state */ -#define sc_alpha_exc_state sc_badvaddr - unsigned long int sc_badvaddr; - unsigned int sc_cause; /* Machine-level trap code. */ -#define SC_CAUSE_SET_SSTEP 1 - int sc_used_fpa; /* Nonzero if FPU was used. */ - - /* struct alpha_float_state - This is only filled in if sc_used_fpa is nonzero. */ -#define sc_alpha_float_state sc_fpregs - double sc_fpregs[31]; /* Floating point registers $f0..$f30. */ - long int sc_fpcsr; /* Floating point control/status register. */ - }; diff --git a/sysdeps/mach/hurd/hppa/sigcontext.h b/sysdeps/mach/hurd/hppa/sigcontext.h deleted file mode 100644 index b616469f21..0000000000 --- a/sysdeps/mach/hurd/hppa/sigcontext.h +++ /dev/null @@ -1,86 +0,0 @@ -/* Machine-dependent signal context structure for GNU Hurd. HPPA version. -Copyright (C) 1995 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -/* Signal handlers are actually called: - void handler (int sig, int code, struct sigcontext *scp); */ - -/* State of this thread when the signal was taken. */ -struct sigcontext - { - /* These first members are machine-independent. */ - - int sc_onstack; /* Nonzero if running on sigstack. */ - __sigset_t sc_mask; /* Blocked signals to restore. */ - - /* MiG reply port this thread is using. */ - unsigned int sc_reply_port; - - /* Port this thread is doing an interruptible RPC on. */ - unsigned int sc_intr_port; - - /* Error code associated with this signal (interpreted as `error_t'). */ - int sc_error; - - /* All following members are machine-dependent. The rest of this - structure is written to be laid out identically to a `struct - parisc_thread_state'. trampoline.c knows this, so it must be - changed if this changes. */ - -#define sc_parisc_thread_state sc_flags /* Beginning of correspondence. */ - /* "General" registers $1..$31. */ - unsigned int sc_regs[31]; - - /* Control registers. */ - unsigned int sc_cr11; /* sar */ - /* These four registers make up the PC. */ - unsigned int iioq_head; - unsigned int iisq_head; - unsigned int iioq_tail; - unsigned int iisq_tail; - unsigned int sc_cr15; - unsigned int sc_cr19; - unsigned int sc_cr20; - unsigned int sc_cr21; - unsigned int sc_cr22; /* ipsw */ - unsigned int sc_bsd_goto; /* unused */ - unsigned int sc_sr4; - unsigned int sc_sr0; - unsigned int sc_sr1; - unsigned int sc_sr2; - unsigned int sc_sr3; - unsigned int sc_sr5; - unsigned int sc_sr6; - unsigned int sc_sr7; - unsigned int sc_cr0; - unsigned int sc_cr8; - unsigned int sc_cr9; - unsigned int sc_cr10; /* unused */ - unsigned int sc_cr12; - unsigned int sc_cr13; - unsigned int sc_cr24; /* unused */ - unsigned int sc_cr25; /* unused */ - unsigned int sc_cr26; /* unused */ - unsigned sc_mpsfu_high; /* unused */ - unsigned sc_mpsfu_low; /* unused */ - unsigned sc_mpsfu_ovflo; /* unused */ - int sc_pad; - - /* Floating point registers $f0..$f31. */ - double sc_fpregs[32]; - }; diff --git a/sysdeps/mach/hurd/mips/sigcontext.h b/sysdeps/mach/hurd/mips/sigcontext.h deleted file mode 100644 index 81d1f25f25..0000000000 --- a/sysdeps/mach/hurd/mips/sigcontext.h +++ /dev/null @@ -1,71 +0,0 @@ -/* Copyright (C) 1994 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -/* Signal handlers are actually called: - void handler (int sig, int code, struct sigcontext *scp); */ - -/* State of this thread when the signal was taken. */ -struct sigcontext - { - /* These first members are machine-independent. */ - - int sc_onstack; /* Nonzero if running on sigstack. */ - __sigset_t sc_mask; /* Blocked signals to restore. */ - - /* MiG reply port this thread is using. */ - unsigned int sc_reply_port; - - /* Port this thread is doing an interruptible RPC on. */ - unsigned int sc_intr_port; - - /* Error code associated with this signal (interpreted as `error_t'). */ - int sc_error; - - /* All following members are machine-dependent. The rest of this - structure is written to be laid out identically to: - { - struct mips_thread_state ts; - struct mips_exc_state es; - struct mips_float_state fs; - } - trampoline.c knows this, so it must be changed if this changes. */ -#define sc_mips_thread_state sc_gpr /* Beginning of correspondence. */ - int sc_gpr[31]; /* "General" registers; [0] is r1. */ - int sc_mdlo, sc_mdhi; /* Low and high multiplication results. */ - int sc_pc; /* Instruction pointer. */ - - /* struct mips_exc_state */ -#define sc_mips_exc_state sc_cause - unsigned int sc_cause; /* Machine-level trap code. */ -#define SC_CAUSE_SST 0x00000044 - unsigned int sc_badvaddr; - unsigned int sc_coproc_used; /* Which coprocessors the thread has used. */ -#define SC_COPROC_USE_COP0 1 /* (by definition) */ -#define SC_COPROC_USE_COP1 2 /* FPA */ -#define SC_COPROC_USE_FPU SC_COPROC_USE_COP1 -#define SC_COPROC_USE_COP2 4 -#define SC_COPROC_USE_COP3 8 - - /* struct mips_float_state - This is only filled in if the SC_COPROC_USE_FPU bit - is set in sc_coproc_used. */ -#define sc_mips_float_state sc_fpr - int sc_fpr[32]; /* FP registers. */ - int sc_fpcsr; /* FPU status register. */ - int sc_fpeir; /* FP exception instruction register. */ - }; diff --git a/sysdeps/mips/bytesex.h b/sysdeps/mips/bytesex.h deleted file mode 100644 index ba555cd76e..0000000000 --- a/sysdeps/mips/bytesex.h +++ /dev/null @@ -1,4 +0,0 @@ -/* The MIPS architecture has selectable endianness. - This file is for a machine using big-endian mode. */ - -#define __BYTE_ORDER __BIG_ENDIAN diff --git a/sysdeps/mips/jmp_buf.h b/sysdeps/mips/jmp_buf.h deleted file mode 100644 index 102a0193d8..0000000000 --- a/sysdeps/mips/jmp_buf.h +++ /dev/null @@ -1,53 +0,0 @@ -/* Define the machine-dependent type `jmp_buf'. MIPS version. - Copyright (C) 1992, 1993, 1995 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@zen.org). - -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 -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -typedef struct - { - /* Program counter. */ - __ptr_t __pc; - - /* Stack pointer. */ - __ptr_t __sp; - - /* Callee-saved registers s0 through s7. */ - int __regs[8]; - - /* The frame pointer. */ - __ptr_t __fp; - - /* The global pointer. */ - __ptr_t __gp; - - /* Floating point status register. */ - int __fpc_csr; - - /* Callee-saved floating point registers. */ - double __fpregs[6]; - } __jmp_buf[1]; - -#ifdef __USE_MISC -/* Offset to the program counter in `jmp_buf'. */ -#define JB_PC 0 -#endif - - -/* Test if longjmp to JMPBUF would unwind the frame - containing a local variable at ADDRESS. */ -#define _JMPBUF_UNWINDS(jmpbuf, address) \ - ((__ptr_t) (address) < (jmpbuf)[0].__sp) diff --git a/sysdeps/standalone/arm/errnos.h b/sysdeps/standalone/arm/errnos.h deleted file mode 100644 index 8090a8074d..0000000000 --- a/sysdeps/standalone/arm/errnos.h +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright (C) 1991, 1994, 1996, 1997 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* This file defines the `errno' constants for standalone ARM machines. - These constants are essentially arbitrary. */ - -#if !defined(__Emath_defined) && (defined(_ERRNO_H) || defined(__need_Emath)) -#undef __need_Emath -#define __Emath_defined 1 - -#define EDOM 1 -#define ERANGE 2 -#endif - -#ifdef _ERRNO_H -#define ENOSYS 3 -#define EINVAL 4 -#define ESPIPE 5 -#define EBADF 6 -#define ENOMEM 7 -#define EACCES 8 -#define ENFILE 9 -#define EMFILE 10 -#define ENAMETOOLONG 11 /* File name too long */ -#define ELOOP 12 /* Too many symbolic links encountered */ -#define ENOMSG 13 /* No message of desired type */ -#define E2BIG 14 /* Arg list too long */ -#define EINTR 15 -#define EILSEQ 16 -#define ENOEXEC 17 -#define ENOENT 18 -#define EPROTOTYPE 19 -#define ESRCH 20 -#define EPERM 21 -#endif - -#define __set_errno(val) errno = (val) diff --git a/sysdeps/standalone/stdio_lim.h b/sysdeps/standalone/stdio_lim.h deleted file mode 100644 index 5552bc4325..0000000000 --- a/sysdeps/standalone/stdio_lim.h +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. - Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil, - On-Line Applications Research Corporation. - -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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#define L_tmpnam 1 -#define TMPMAX 0 -#define L_ctermid 1 -#define L_cuserid 1 -#define FOPEN_MAX 16 -#define FILENAME_MAX 14 diff --git a/sysdeps/unix/bsd/osf/alpha/statbuf.h b/sysdeps/unix/bsd/osf/alpha/statbuf.h deleted file mode 100644 index 8541922b37..0000000000 --- a/sysdeps/unix/bsd/osf/alpha/statbuf.h +++ /dev/null @@ -1,76 +0,0 @@ -/* Copyright (C) 1993, 1996 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@zen.org). - - 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 - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _STATBUF_H -#define _STATBUF_H - -#include - -/* Structure describing file characteristics. */ -struct stat - { - int st_dev; /* Device. */ - unsigned int st_ino; /* File serial number. */ - unsigned int st_mode; /* File mode. */ - unsigned short st_nlink; /* Link count. */ - unsigned int st_uid; /* User ID of the file's owner. */ - unsigned int st_gid; /* Group ID of the file's group.*/ - int st_rdev; /* Device number, if device. */ - - long st_size; /* Size of file, in bytes. */ - - int st_atime; /* Time of last access. */ - int st_atime_usec; - int st_mtime; /* Time of last modification. */ - int st_mtime_usec; - int st_ctime; /* Time of last status change. */ - int st_ctime_usec; - - unsigned int st_blksize; /* Optimal block size for I/O. */ -#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ - - int st_blocks; /* Number of 512-byte blocks allocated. */ - unsigned int st_flags; - unsigned int st_gen; - }; - -/* Encoding of the file mode. */ - -#define __S_IFMT 0170000 /* These bits determine file type. */ - -/* File types. */ -#define __S_IFDIR 0040000 /* Directory. */ -#define __S_IFCHR 0020000 /* Character device. */ -#define __S_IFBLK 0060000 /* Block device. */ -#define __S_IFREG 0100000 /* Regular file. */ -#define __S_IFIFO 0010000 /* FIFO. */ - -#define __S_IFLNK 0120000 /* Symbolic link. */ -#define __S_IFSOCK 0140000 /* Socket. */ - -/* Protection bits. */ - -#define __S_ISUID 04000 /* Set user ID on execution. */ -#define __S_ISGID 02000 /* Set group ID on execution. */ -#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ -#define __S_IREAD 0400 /* Read by owner. */ -#define __S_IWRITE 0200 /* Write by owner. */ -#define __S_IEXEC 0100 /* Execute by owner. */ - -#endif /* statbuf.h */ diff --git a/sysdeps/unix/bsd/osf/sigaction.h b/sysdeps/unix/bsd/osf/sigaction.h deleted file mode 100644 index df400d4aaa..0000000000 --- a/sysdeps/unix/bsd/osf/sigaction.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Structure and constant definitions for sigaction et al. OSF/1 version. - Copyright (C) 1993, 1996 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@zen.org). - - 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 - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* Structure describing the action to be taken when a signal arrives. */ -struct sigaction - { - /* Signal handler. */ - __sighandler_t sa_handler; - - /* Additional set of signals to be blocked. */ - __sigset_t sa_mask; - - /* Special flags. */ - int sa_flags; - }; - -/* Bits in `sa_flags'. */ -#ifdef __USE_BSD -#define SA_ONSTACK 0x1 /* Take signal on signal stack. */ -#define SA_RESTART 0x2 /* Don't restart syscall on signal return. */ -#define SA_DISABLE 0x4 /* Disable alternate signal stack. */ -#endif -#define SA_NOCLDSTOP 0x4 /* Don't send SIGCHLD when children stop. */ - - -/* Values for the HOW argument to `sigprocmask'. */ -#define SIG_BLOCK 1 /* Block signals. */ -#define SIG_UNBLOCK 2 /* Unblock signals. */ -#define SIG_SETMASK 3 /* Set the set of blocked signals. */ diff --git a/sysdeps/unix/bsd/sun/m68k/sigcontext.h b/sysdeps/unix/bsd/sun/m68k/sigcontext.h deleted file mode 100644 index 471b516bdc..0000000000 --- a/sysdeps/unix/bsd/sun/m68k/sigcontext.h +++ /dev/null @@ -1,26 +0,0 @@ -/* Structure describing state saved while handling a signal. Sun 3 version. -Copyright (C) 1993, 1994 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -struct sigcontext - { - int sc_onstack; - __sigset_t sc_mask; - - int sc_sp, sc_pc, sc_ps; - }; diff --git a/sysdeps/unix/bsd/sun/signum.h b/sysdeps/unix/bsd/sun/signum.h deleted file mode 100644 index a327401d0b..0000000000 --- a/sysdeps/unix/bsd/sun/signum.h +++ /dev/null @@ -1,69 +0,0 @@ -/* Signal number definitions. SunOS version. - Copyright (C) 1994, 1996 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifdef _SIGNAL_H - -/* This file defines the fake signal functions and signal - number constants for SunOS 3 and 4 Unix systems. */ - -/* Fake signal functions. */ -#define SIG_ERR ((__sighandler_t) -1) /* Error return. */ -#define SIG_DFL ((__sighandler_t) 0) /* Default action. */ -#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */ - - -/* Signals. */ -#define SIGHUP 1 /* Hangup (POSIX). */ -#define SIGINT 2 /* Interrupt (ANSI). */ -#define SIGQUIT 3 /* Quit (POSIX). */ -#define SIGILL 4 /* Illegal instruction (ANSI). */ -#define SIGABRT SIGIOT /* Abort (ANSI). */ -#define SIGTRAP 5 /* Trace trap (POSIX). */ -#define SIGIOT 6 /* IOT trap (4.2 BSD). */ -#define SIGEMT 7 /* EMT trap (4.2 BSD). */ -#define SIGFPE 8 /* Floating-point exception (ANSI). */ -#define SIGKILL 9 /* Kill, unblockable (POSIX). */ -#define SIGBUS 10 /* Bus error (4.2 BSD). */ -#define SIGSEGV 11 /* Segmentation violation (ANSI). */ -#define SIGSYS 12 /* Bad argument to system call (4.2 BSD). */ -#define SIGPIPE 13 /* Broken pipe (POSIX). */ -#define SIGALRM 14 /* Alarm clock (POSIX). */ -#define SIGTERM 15 /* Termination (ANSI). */ -#define SIGURG 16 /* Urgent condition on socket (4.2 BSD). */ -#define SIGSTOP 17 /* Stop, unblockable (POSIX). */ -#define SIGTSTP 18 /* Keyboard stop (POSIX). */ -#define SIGCONT 19 /* Continue (POSIX). */ -#define SIGCHLD 20 /* Child status has changed (POSIX). */ -#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */ -#define SIGTTIN 21 /* Background read from tty (POSIX). */ -#define SIGTTOU 22 /* Background write to tty (POSIX). */ -#define SIGIO 23 /* I/O now possible (4.2 BSD). */ -#define SIGPOLL SIGIO /* Same as SIGIO? (SVID). */ -#define SIGXCPU 24 /* CPU limit exceeded (4.2 BSD). */ -#define SIGXFSZ 25 /* File size limit exceeded (4.2 BSD). */ -#define SIGVTALRM 26 /* Virtual alarm clock (4.2 BSD). */ -#define SIGPROF 27 /* Profiling alarm clock (4.2 BSD). */ -#define SIGWINCH 28 /* Window size change (4.3 BSD, Sun). */ -#define SIGLOST 29 /* Resource lost (Sun). */ -#define SIGUSR1 30 /* User-defined signal 1 (POSIX). */ -#define SIGUSR2 31 /* User-defined signal 2 (POSIX). */ - -#endif /* included. */ - -#define _NSIG 32 /* Biggest signal number + 1. */ diff --git a/sysdeps/unix/bsd/sun/sparc/sigcontext.h b/sysdeps/unix/bsd/sun/sparc/sigcontext.h deleted file mode 100644 index 290bf817af..0000000000 --- a/sysdeps/unix/bsd/sun/sparc/sigcontext.h +++ /dev/null @@ -1,31 +0,0 @@ -/* Structure describing state saved while handling a signal. Sparc version. -Copyright (C) 1992, 1994 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -struct sigcontext - { - int sc_onstack; - __sigset_t sc_mask; - -#define SPARC_MAXREGWINDOW 31 /* Maximum usable register windows. */ - int sc_sp, sc_pc, sc_npc, sc_psr, sc_g1, sc_o0; - int sc_wbcnt; /* Number of outstanding windows. */ - __ptr_t sc_spbuf[SPARC_MAXREGWINDOW]; /* SP's for each window. */ - int sc_wbuf[SPARC_MAXREGWINDOW][16]; /* Saved register windows. */ - }; - diff --git a/sysdeps/unix/bsd/sun/sunos4/fcntlbits.h b/sysdeps/unix/bsd/sun/sunos4/fcntlbits.h deleted file mode 100644 index a9f66c47a3..0000000000 --- a/sysdeps/unix/bsd/sun/sunos4/fcntlbits.h +++ /dev/null @@ -1,145 +0,0 @@ -/* O_*, F_*, FD_* bit values for SunOS 4. - Copyright (C) 1991, 1992, 1997 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _FCNTLBITS_H - -#define _FCNTLBITS_H 1 - - -/* File access modes for `open' and `fcntl'. */ -#define O_RDONLY 0 /* Open read-only. */ -#define O_WRONLY 1 /* Open write-only. */ -#define O_RDWR 2 /* Open read/write. */ - - -/* Bits OR'd into the second argument to open. */ -#define O_CREAT 0x0200 /* Create file if it doesn't exist. */ -#define O_EXCL 0x0800 /* Fail if file already exists. */ -#define O_TRUNC 0x0400 /* Truncate file to zero length. */ -#define O_NOCTTY 0x8000 /* Don't assign a controlling terminal. */ -#if defined __USE_BSD || defined __USE_SVID -#define O_ASYNC 0x0040 /* Send SIGIO to owner when data is ready. */ -#define O_FSYNC 0x2000 /* Synchronous writes. */ -#define O_SYNC O_FSYNC -#endif - -/* File status flags for `open' and `fcntl'. */ -#define O_APPEND 0x0008 /* Writes append to the file. */ -#define O_NONBLOCK 0x4000 /* Non-blocking I/O. */ - -/* Sun defines O_NDELAY one way for BSD behavior and another for System V - behavior. In the GNU C library, you get the BSD behavior unless you - define _USG_SOURCE without also defining _BSD_SOURCE or _GNU_SOURCE. */ -#ifdef __USE_BSD -#define O_NDELAY 0x0004 -#endif -#if !defined (O_NDELAY) && defined (__USE_SVID) -#define O_NDELAY 0x1000 -#endif - -#ifdef __USE_BSD -/* Bits in the file status flags returned by F_GETFL. - These are all the O_* flags, plus FREAD and FWRITE, which are - independent bits set by which of O_RDONLY, O_WRONLY, and O_RDWR, was - given to `open'. */ -#define FREAD 1 -#define FWRITE 2 - -/* Traditional Unix names the O_* bits. */ -#define FASYNC O_ASYNC -#define FCREAT O_CREAT -#define FEXCL O_EXCL -#define FTRUNC O_TRUNC -#define FNOCTTY O_NOCTTY -#define FFSYNC O_FSYNC -#define FSYNC O_SYNC -#define FAPPEND O_APPEND -#define FNONBLOCK O_NONBLOCK -#define FNONBIO O_NONBLOCK -#define FNDELAY 0x0004 /* BSD O_NDELAY. */ -#define FNBIO 0x1000 /* System V O_NDELAY. */ -#endif - -/* Mask for file access modes. This is system-dependent in case - some system ever wants to define some other flavor of access. */ -#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR) - -/* Values for the second argument to `fcntl'. */ -#define F_DUPFD 0 /* Duplicate file descriptor. */ -#define F_GETFD 1 /* Get file descriptor flags. */ -#define F_SETFD 2 /* Set file descriptor flags. */ -#define F_GETFL 3 /* Get file status flags. */ -#define F_SETFL 4 /* Set file status flags. */ -#ifdef __USE_BSD -#define F_GETOWN 5 /* Get owner (receiver of SIGIO). */ -#define F_SETOWN 6 /* Set owner (receiver of SIGIO). */ -#endif -#define F_GETLK 7 /* Get record locking info. */ -#define F_SETLK 8 /* Set record locking info (non-blocking). */ -#define F_SETLKW 9 /* Set record locking info (blocking). */ -#ifdef __USE_BSD -#define F_RGETLK 10 /* Get remote record locking info. */ -#define F_RSETLK 11 /* Set remote locking info (non-blocking). */ -#define F_CNVT 12 /* Convert a fhandle to an open fd. */ -#define F_RSETLKW 13 /* Set remote locking info (blocking). */ -#endif - -/* File descriptor flags used with F_GETFD and F_SETFD. */ -#define FD_CLOEXEC 1 /* Close on exec. */ - - -#include - -/* The structure describing an advisory lock. This is the type of the third - argument to `fcntl' for the F_GETLK, F_SETLK, and F_SETLKW requests. */ -struct flock - { - short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ - short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ - __off_t l_start; /* Offset where the lock begins. */ - __off_t l_len; /* Size of the locked area; zero means until EOF. */ - short int l_pid; /* Process holding the lock. */ - short int l_xxx; /* Reserved for future use. */ - }; - -#ifdef __USE_BSD -/* The structure describing a remote advisory lock. This is the type of the - third arg to `fcntl' for the F_RGETLK, F_RSETLK, and F_RSETLKW requests. */ -struct eflock - { - short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ - short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ - __off_t l_start; /* Offset where the lock begins. */ - __off_t l_len; /* Size of the locked area; zero means until EOF. */ - short int l_pid; /* Process holding the lock. */ - short int l_xxx; /* Reserved for future use. */ - long int l_rpid; /* Remote process ID wanting this lock. */ - long int l_rsys; /* Remote system ID wanting this lock. */ - }; - -#endif - - -/* Values for the `l_type' field of a `struct flock'. */ -#define F_RDLCK 1 /* Read lock. */ -#define F_WRLCK 2 /* Write lock. */ -#define F_UNLCK 3 /* Remove lock. */ - - -#endif /* fcntlbits.h */ diff --git a/sysdeps/unix/bsd/sun/sunos4/resourcebits.h b/sysdeps/unix/bsd/sun/sunos4/resourcebits.h deleted file mode 100644 index ff55773e69..0000000000 --- a/sysdeps/unix/bsd/sun/sunos4/resourcebits.h +++ /dev/null @@ -1,139 +0,0 @@ -/* Bit values for resource limits. SunOS 4 version. - Copyright (C) 1994, 1996, 1997 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* These are the values for 4.4 BSD and GNU. Earlier BSD systems have a - subset of these kinds of resource limit. In systems where `getrlimit' - and `setrlimit' are not system calls, these are the values used by the C - library to emulate them. */ - -/* Kinds of resource limit. */ -enum __rlimit_resource - { - /* Per-process CPU limit, in seconds. */ - RLIMIT_CPU, -#define RLIMIT_CPU RLIMIT_CPU - /* Largest file that can be created, in bytes. */ - RLIMIT_FSIZE, -#define RLIMIT_FSIZE RLIMIT_FSIZE - /* Maximum size of data segment, in bytes. */ - RLIMIT_DATA, -#define RLIMIT_DATA RLIMIT_DATA - /* Maximum size of stack segment, in bytes. */ - RLIMIT_STACK, -#define RLIMIT_STACK RLIMIT_STACK - /* Largest core file that can be created, in bytes. */ - RLIMIT_CORE, -#define RLIMIT_CORE RLIMIT_CORE - /* Largest resident set size, in bytes. - This affects swapping; processes that are exceeding their - resident set size will be more likely to have physical memory - taken from them. */ - RLIMIT_RSS, -#define RLIMIT_RSS RLIMIT_RSS - /* Number of open files. */ - RLIMIT_NOFILE, - RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */ -#define RLIMIT_NOFILE RLIMIT_NOFILE -#define RLIMIT_OFILE RLIMIT_OFILE - - RLIM_NLIMITS, - - RLIM_INFINITY = 0x7fffffff /* Value to indicate that there is no limit. */ -#define RLIM_INFINITY RLIM_INFINITY - }; - -struct rlimit - { - /* The current (soft) limit. */ - int rlim_cur; - /* The hard limit. */ - int rlim_max; - }; - -/* Whose usage statistics do you want? */ -enum __rusage_who -/* The macro definitions are necessary because some programs want - to test for operating system features with #ifdef RUSAGE_SELF. - In ISO C the reflexive definition is a no-op. */ - { - /* The calling process. */ - RUSAGE_SELF = 0, -#define RUSAGE_SELF RUSAGE_SELF - /* All of its terminated child processes. */ - RUSAGE_CHILDREN = -1 -#define RUSAGE_CHILDREN RUSAGE_CHILDREN - }; - -#include /* For `struct timeval'. */ - -/* Structure which says how much of each resource has been used. */ -struct rusage - { - /* Total amount of user time used. */ - struct timeval ru_utime; - /* Total amount of system time used. */ - struct timeval ru_stime; - /* Maximum resident set size (in kilobytes). */ - long int ru_maxrss; - /* Amount of sharing of text segment memory - with other processes (kilobyte-seconds). */ - long int ru_ixrss; - /* Amount of data segment memory used (kilobyte-seconds). */ - long int ru_idrss; - /* Amount of stack memory used (kilobyte-seconds). */ - long int ru_isrss; - /* Number of soft page faults (i.e. those serviced by reclaiming - a page from the list of pages awaiting reallocation. */ - long int ru_minflt; - /* Number of hard page faults (i.e. those that required I/O). */ - long int ru_majflt; - /* Number of times a process was swapped out of physical memory. */ - long int ru_nswap; - /* Number of input operations via the file system. Note: This - and `ru_oublock' do not include operations with the cache. */ - long int ru_inblock; - /* Number of output operations via the file system. */ - long int ru_oublock; - /* Number of IPC messages sent. */ - long int ru_msgsnd; - /* Number of IPC messages received. */ - long int ru_msgrcv; - /* Number of signals delivered. */ - long int ru_nsignals; - /* Number of voluntary context switches, i.e. because the process - gave up the process before it had to (usually to wait for some - resource to be available). */ - long int ru_nvcsw; - /* Number of involuntary context switches, i.e. a higher priority process - became runnable or the current process used up its time slice. */ - long int ru_nivcsw; - }; - -/* Priority limits. */ -#define PRIO_MIN -20 /* Minimum priority a process can have. */ -#define PRIO_MAX 20 /* Maximum priority a process can have. */ - -/* The type of the WHICH argument to `getpriority' and `setpriority', - indicating what flavor of entity the WHO argument specifies. */ -enum __priority_which - { - PRIO_PROCESS = 0, /* WHO is a process ID. */ - PRIO_PGRP = 1, /* WHO is a process group ID. */ - PRIO_USER = 2 /* WHO is a user ID. */ - }; diff --git a/sysdeps/unix/bsd/sun/sunos4/termbits.h b/sysdeps/unix/bsd/sun/sunos4/termbits.h deleted file mode 100644 index dc0a007208..0000000000 --- a/sysdeps/unix/bsd/sun/sunos4/termbits.h +++ /dev/null @@ -1,208 +0,0 @@ -/* termios type and macro definitions. SunOS 4 version. - Copyright (C) 1993, 1994, 1996 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* Type of terminal control flag masks. */ -typedef unsigned long int tcflag_t; - -/* Type of control characters. */ -typedef unsigned char cc_t; - -/* Type of baud rate specifiers. */ -typedef unsigned int speed_t; - -/* Terminal control structure. */ -struct termios -{ - /* Input modes. */ - tcflag_t c_iflag; -#define IGNBRK 0x0001 /* Ignore break condition. */ -#define BRKINT 0x0002 /* Signal interrupt on break. */ -#define IGNPAR 0x0004 /* Ignore characters with parity errors. */ -#define PARMRK 0x0008 /* Mark parity and framing errors. */ -#define INPCK 0x0010 /* Enable input parity check. */ -#define ISTRIP 0x0020 /* Strip 8th bit off characters. */ -#define INLCR 0x0040 /* Map NL to CR on input. */ -#define IGNCR 0x0080 /* Ignore CR. */ -#define ICRNL 0x0100 /* Map CR to NL on input. */ -#ifdef __USE_BSD -#define IUCLC 0x0200 /* Map upper case to lower case on input. */ -#endif -#define IXON 0x0400 /* Enable start/stop output control. */ -#define IXOFF 0x1000 /* Enable start/stop input control. */ -#ifdef __USE_BSD -#define IXANY 0x0800 /* Any character will restart after stop. */ -#define IMAXBEL 0x2000 /* Ring bell when input queue is full. */ -#endif - - /* Output modes. */ - tcflag_t c_oflag; -#define OPOST 0x0001 /* Perform output processing. */ -#ifdef __USE_BSD -#define OLCUC 0x00000002 /* Map lower case to upper case on output. */ -#define ONLCR 0x00000004 /* Map NL to CR-NL on output. */ -#define OCRNL 0x00000008 -#define ONOCR 0x00000010 -#define ONLRET 0x00000020 -#define OFILL 0x00000040 -#define OFDEL 0x00000080 -#define NLDLY 0x00000100 -#define NL0 0 -#define NL1 0x00000100 -#define CRDLY 0x00000600 -#define CR0 0 -#define CR1 0x00000200 -#define CR2 0x00000400 -#define CR3 0x00000600 -#define TABDLY 0x00001800 -#define TAB0 0 -#define TAB1 0x00000800 -#define TAB2 0x00001000 -#define XTABS 0x00001800 -#define TAB3 XTABS -#define BSDLY 0x00002000 -#define BS0 0 -#define BS1 0x00002000 -#define VTDLY 0x00004000 -#define VT0 0 -#define VT1 0x00004000 -#define FFDLY 0x00008000 -#define FF0 0 -#define FF1 0x00008000 -#define PAGEOUT 0x00010000 -#define WRAP 0x00020000 -#endif - - /* Control modes. */ - tcflag_t c_cflag; -#define CSIZE (CS5|CS6|CS7|CS8) /* Number of bits per byte (mask). */ -#define CS5 0 /* 5 bits per byte. */ -#define CS6 0x00000010 /* 6 bits per byte. */ -#define CS7 0x00000020 /* 7 bits per byte. */ -#define CS8 0x00000030 /* 8 bits per byte. */ -#define CSTOPB 0x00000040 /* Two stop bits instead of one. */ -#define CREAD 0x00000080 /* Enable receiver. */ -#define PARENB 0x00000100 /* Parity enable. */ -#define PARODD 0x00000200 /* Odd parity instead of even. */ -#define HUPCL 0x00000400 /* Hang up on last close. */ -#define CLOCAL 0x00000800 /* Ignore modem status lines. */ -#ifdef __USE_BSD -#define LOBLK 0x00001000 -#define CRTSCTS 0x80000000 -#define CIBAUD 0x000f0000 /* Mask for input speed from c_cflag. */ -#define CBAUD 0x0000000f /* Mask for output speed from c_cflag. */ -#define IBSHIFT 16 /* Bits to shift for input speed. */ -#endif - - /* Input and output baud rates. These are encoded in c_cflag. */ -#define B0 0 -#define B50 1 -#define B75 2 -#define B110 3 -#define B134 4 -#define B150 5 -#define B200 6 -#define B300 7 -#define B600 8 -#define B1200 9 -#define B1800 10 -#define B2400 11 -#define B4800 12 -#define B9600 13 -#define B19200 14 -#define B38400 15 -#ifdef __USE_BSD -#define EXTA 14 -#define EXTB 15 -#endif - - /* Local modes. */ - tcflag_t c_lflag; -#ifdef __USE_BSD -#define ECHOKE 0x00000800 /* Visual erase for KILL. */ -#endif -#define ECHOE 0x00000010 /* Visual erase for ERASE. */ -#define ECHOK 0x00000020 /* Echo NL after KILL. */ -#define ECHO 0x00000008 /* Enable echo. */ -#define ECHONL 0x00000040 /* Echo NL even if ECHO is off. */ -#ifdef __USE_BSD -#define ECHOPRT 0x00000400 /* Hardcopy visual erase. */ -#define ECHOCTL 0x00000200 /* Echo control characters as ^X. */ -#endif -#define ISIG 0x00000001 /* Enable signals. */ -#define ICANON 0x00000002 /* Do erase and kill processing. */ -#define IEXTEN 0x00008000 /* Enable DISCARD and LNEXT. */ -#define TOSTOP 0x00000100 /* Send SIGTTOU for background output. */ -#ifdef __USE_BSD -#define PENDIN 0x00004000 /* Retype pending input (state). */ -#endif -#define NOFLSH 0x00000080 /* Disable flush after interrupt. */ - - char c_line; /* Line discipline (?) */ - - /* Control characters. */ -#define VEOF 4 /* End-of-file character [ICANON]. */ -#define VEOL 5 /* End-of-line character [ICANON]. */ -#ifdef __USE_BSD -#define VEOL2 6 /* Second EOL character [ICANON]. */ -#define VSWTCH 7 /* ??? */ -#endif -#define VERASE 2 /* Erase character [ICANON]. */ -#ifdef __USE_BSD -#define VWERASE 14 /* Word-erase character [ICANON]. */ -#endif -#define VKILL 3 /* Kill-line character [ICANON]. */ -#ifdef __USE_BSD -#define VREPRINT 12 /* Reprint-line character [ICANON]. */ -#endif -#define VINTR 0 /* Interrupt character [ISIG]. */ -#define VQUIT 1 /* Quit character [ISIG]. */ -#define VSUSP 10 /* Suspend character [ISIG]. */ -#ifdef __USE_BSD -#define VDSUSP 11 /* Delayed suspend character [ISIG]. */ -#endif -#define VSTART 8 /* Start (X-ON) character [IXON, IXOFF]. */ -#define VSTOP 9 /* Stop (X-OFF) character [IXON, IXOFF]. */ -#ifdef __USE_BSD -#define VLNEXT 15 /* Literal-next character [IEXTEN]. */ -#define VDISCARD 13 /* Discard character [IEXTEN]. */ -#endif -#define VMIN VEOF /* Minimum number of bytes read at once [!ICANON]. */ -#define VTIME VEOL /* Time-out value (tenths of a second) [!ICANON]. */ -#define NCCS 17 - cc_t c_cc[NCCS]; -}; - -#define _IOT_termios /* Hurd ioctl type field. */ \ - _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2) - -/* Values for the OPTIONAL_ACTIONS argument to `tcsetattr'. */ -#define TCSANOW 0 /* Change immediately. */ -#define TCSADRAIN 1 /* Change when pending output is written. */ -#define TCSAFLUSH 2 /* Flush pending input before changing. */ - -/* Values for the QUEUE_SELECTOR argument to `tcflush'. */ -#define TCIFLUSH 0 /* Discard data received but not yet read. */ -#define TCOFLUSH 1 /* Discard data written but not yet sent. */ -#define TCIOFLUSH 2 /* Discard all pending data. */ - -/* Values for the ACTION argument to `tcflow'. */ -#define TCOOFF 0 /* Suspend output. */ -#define TCOON 1 /* Restart suspended output. */ -#define TCIOFF 2 /* Send a STOP character. */ -#define TCION 3 /* Send a START character. */ diff --git a/sysdeps/unix/bsd/sun/sunos4/utsnamelen.h b/sysdeps/unix/bsd/sun/sunos4/utsnamelen.h deleted file mode 100644 index e9111b6504..0000000000 --- a/sysdeps/unix/bsd/sun/sunos4/utsnamelen.h +++ /dev/null @@ -1,2 +0,0 @@ -#define _UTSNAME_LENGTH 9 -#define _UTSNAME_NODENAME_LENGTH 65 diff --git a/sysdeps/unix/bsd/ultrix4/fcntlbits.h b/sysdeps/unix/bsd/ultrix4/fcntlbits.h deleted file mode 100644 index ba736e428e..0000000000 --- a/sysdeps/unix/bsd/ultrix4/fcntlbits.h +++ /dev/null @@ -1,125 +0,0 @@ -/* O_*, F_*, FD_* bit values for Ultrix 4. - Copyright (C) 1991, 1992, 1997 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _FCNTLBITS_H - -#define _FCNTLBITS_H 1 - - -/* File access modes for `open' and `fcntl'. */ -#define O_RDONLY 0 /* Open read-only. */ -#define O_WRONLY 1 /* Open write-only. */ -#define O_RDWR 2 /* Open read/write. */ - - -/* Bits OR'd into the second argument to open. */ -#define O_CREAT 0x0200 /* Create file if it doesn't exist. */ -#define O_EXCL 0x0800 /* Fail if file already exists. */ -#define O_TRUNC 0x0400 /* Truncate file to zero length. */ -#ifdef __USE_MISC -#define O_ASYNC 0x0040 /* Send SIGIO to owner when data is ready. */ -#define O_FSYNC 0x8000 /* Synchronous writes. */ -#define O_SYNC O_FSYNC -#define O_BLKINUSE 0x1000 /* Block if "in use". */ -#define O_BLKANDSET 0x3000 /* Block, test and set "in use" flag. */ -#define O_TERMIO 0x40000 /* "termio style program". */ -#endif -#define O_NOCTTY 0x80000 /* Don't assign a controlling terminal. */ - -/* File status flags for `open' and `fcntl'. */ -#define O_APPEND 0x0008 /* Writes append to the file. */ -#define O_NONBLOCK 0x20000 /* Non-blocking I/O. */ - -#ifdef __USE_BSD -#define O_NDELAY 0x0004 -#endif - -#ifdef __USE_BSD -/* Bits in the file status flags returned by F_GETFL. - These are all the O_* flags, plus FREAD and FWRITE, which are - independent bits set by which of O_RDONLY, O_WRONLY, and O_RDWR, was - given to `open'. */ -#define FREAD 1 -#define FWRITE 2 - -/* Traditional BSD names the O_* bits. */ -#define FASYNC O_ASYNC -#define FCREAT O_CREAT -#define FEXCL O_EXCL -#define FTRUNC O_TRUNC -#define FNOCTTY O_NOCTTY -#define FFSYNC O_FSYNC -#define FSYNC O_SYNC -#define FAPPEND O_APPEND -#define FNONBLOCK O_NONBLOCK -#define FNDELAY O_NDELAY -#define FNBLOCK O_NONBLOCK -#define FTERMIO O_TERMIO -#define FNOCTTY O_NOCTTY -#define FSYNCRON O_FSYNC -#define FBLKINUSE O_BLKINUSE -#define FBLKANDSET O_BLKANDSET -#endif - -/* Mask for file access modes. This is system-dependent in case - some system ever wants to define some other flavor of access. */ -#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR) - -/* Values for the second argument to `fcntl'. */ -#define F_DUPFD 0 /* Duplicate file descriptor. */ -#define F_GETFD 1 /* Get file descriptor flags. */ -#define F_SETFD 2 /* Set file descriptor flags. */ -#define F_GETFL 3 /* Get file status flags. */ -#define F_SETFL 4 /* Set file status flags. */ -#ifdef __USE_BSD -#define F_GETOWN 5 /* Get owner (receiver of SIGIO). */ -#define F_SETOWN 6 /* Set owner (receiver of SIGIO). */ -#endif -#define F_GETLK 7 /* Get record locking info. */ -#define F_SETLK 8 /* Set record locking info (non-blocking). */ -#define F_SETLKW 9 /* Set record locking info (blocking). */ -#ifdef __USE_MISC -#define F_SETSYN 10 /* Set synchronous writing. */ -#define F_CLRSYN 10 /* Clear synchronous writing. */ -#endif - -/* File descriptor flags used with F_GETFD and F_SETFD. */ -#define FD_CLOEXEC 1 /* Close on exec. */ - - -#include - -/* The structure describing an advisory lock. This is the type of the third - argument to `fcntl' for the F_GETLK, F_SETLK, and F_SETLKW requests. */ -struct flock - { - short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ - short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ - __off_t l_start; /* Offset where the lock begins. */ - __off_t l_len; /* Size of the locked area; zero means until EOF. */ - __pid_t l_pid; /* Process holding the lock. */ - }; - -/* Values for the `l_type' field of a `struct flock'. */ -#define F_RDLCK 1 /* Read lock. */ -#define F_WRLCK 2 /* Write lock. */ -#define F_UNLCK 3 /* Remove lock. */ - - -#endif /* fcntlbits.h */ diff --git a/sysdeps/unix/bsd/ultrix4/mips/sigcontext.h b/sysdeps/unix/bsd/ultrix4/mips/sigcontext.h deleted file mode 100644 index 4bddcf2f4b..0000000000 --- a/sysdeps/unix/bsd/ultrix4/mips/sigcontext.h +++ /dev/null @@ -1,60 +0,0 @@ -/* Copyright (C) 1992, 1994 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@zen.org). - -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 -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -/* Note that ANY change to this instantly implies a change to __handler.S. */ - -struct sigcontext - { - /* Nonzero if running on signal stack. */ - int sc_onstack; - - /* Signal mask to restore. */ - __sigset_t sc_mask; - - /* Program counter when the signal hit. */ - __ptr_t sc_pc; - - /* Registers 0 through 31. */ - int sc_regs[32]; - - /* mul/div low and hi; these aren't part of a jmp_buf, but are part of the - sigcontext and are referenced from the signal trampoline code. */ - int sc_mdlo; - int sc_mdhi; - - /* Flag to see if the FP's been used. */ - int sc_ownedfp; - - /* Floating point registers 0 to 31. */ - int sc_fpregs[32]; - /* Control & status register for FP. */ - int sc_fpc_csr; - - /* Exception instruction register for FP. */ - int sc_fpc_eir; - - /* The coprocessor's cause register. */ - int sc_cause; - - /* CPU bad virtual address. */ - __ptr_t sc_badvaddr; - - /* CPU board bad physical address. */ - __ptr_t sc_badpaddr; - }; - diff --git a/sysdeps/unix/bsd/ultrix4/posix_opt.h b/sysdeps/unix/bsd/ultrix4/posix_opt.h deleted file mode 100644 index ecd04d1f0e..0000000000 --- a/sysdeps/unix/bsd/ultrix4/posix_opt.h +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. - Contributed by Ian Lance Taylor (ian@airs.com). - -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 -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#define _POSIX_JOB_CONTROL 1 -#define _POSIX_SAVED_IDS 1 -#define _POSIX_CHOWN_RESTRICTED 1 -#define _POSIX_NO_TRUNC 1 -#define _POSIX_VDISABLE ((unsigned char) -1) diff --git a/sysdeps/unix/bsd/ultrix4/utsnamelen.h b/sysdeps/unix/bsd/ultrix4/utsnamelen.h deleted file mode 100644 index ad4389ab02..0000000000 --- a/sysdeps/unix/bsd/ultrix4/utsnamelen.h +++ /dev/null @@ -1 +0,0 @@ -#define _UTSNAME_LENGTH 32 diff --git a/sysdeps/unix/sysv/irix4/confname.h b/sysdeps/unix/sysv/irix4/confname.h deleted file mode 100644 index 49d2f9c989..0000000000 --- a/sysdeps/unix/sysv/irix4/confname.h +++ /dev/null @@ -1,80 +0,0 @@ -/* `sysconf', `pathconf', and `confstr' NAME values. Irix 4 version. -Copyright (C) 1994 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -/* Values for the NAME argument to `pathconf' and `fpathconf'. */ -enum - { - _PC_LINK_MAX = 1, - _PC_MAX_CANON, - _PC_MAX_INPUT, - _PC_NAME_MAX, - _PC_PATH_MAX, - _PC_PIPE_BUF, - _PC_CHOWN_RESTRICTED, - _PC_NO_TRUNC, - _PC_VDISABLE - }; - -/* Values for the argument to `sysconf'. */ -enum - { - _SC_ARG_MAX = 1, - _SC_CHILD_MAX, - _SC_CLK_TCK, - _SC_NGROUPS_MAX, - _SC_OPEN_MAX, - _SC_JOB_CONTROL, - _SC_SAVED_IDS, - _SC_VERSION, - - /* Above are done by the Irix system call. - The rest are done by the C library (or are not really implemented). */ - - _SC_STREAM_MAX, - _SC_TZNAME_MAX, - _SC_PAGESIZE, - - /* Values for the argument to `sysconf' - corresponding to _POSIX2_* symbols. */ - _SC_BC_BASE_MAX, - _SC_BC_DIM_MAX, - _SC_BC_SCALE_MAX, - _SC_BC_STRING_MAX, - _SC_COLL_WEIGHTS_MAX, - _SC_EQUIV_CLASS_MAX, - _SC_EXPR_NEST_MAX, - _SC_LINE_MAX, - _SC_RE_DUP_MAX, - - _SC_2_VERSION, - _SC_2_C_BIND, - _SC_2_C_DEV, - _SC_2_FORT_DEV, - _SC_2_FORT_RUN, - _SC_2_SW_DEV, - _SC_2_LOCALEDEF - }; - -#ifdef __USE_POSIX2 -/* Values for the NAME argument to `confstr'. */ -enum - { - _CS_PATH /* The default search path. */ - }; -#endif diff --git a/sysdeps/unix/sysv/irix4/fcntlbits.h b/sysdeps/unix/sysv/irix4/fcntlbits.h deleted file mode 100644 index 318e483279..0000000000 --- a/sysdeps/unix/sysv/irix4/fcntlbits.h +++ /dev/null @@ -1,110 +0,0 @@ -/* O_*, F_*, FD_* bit values for SGI Irix 4. - Copyright (C) 1994, 1997 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _FCNTLBITS_H - -#define _FCNTLBITS_H 1 - - -/* File access modes for `open' and `fcntl'. */ -#define O_RDONLY 0 /* Open read-only. */ -#define O_WRONLY 1 /* Open write-only. */ -#define O_RDWR 2 /* Open read/write. */ - - -/* Bits OR'd into the second argument to open. */ -#define O_CREAT 00400 /* Create file if it doesn't exist. */ -#define O_EXCL 02000 /* Fail if file already exists. */ -#define O_TRUNC 01000 /* Truncate file to zero length. */ -#ifdef __USE_MISC -#define O_SYNC 00020 /* Synchronous writes. */ -#define O_FSYNC O_SYNC -#define O_ASYNC 00100 /* Send SIGIO to owner when data is ready. */ -#endif - -/* File status flags for `open' and `fcntl'. */ -#define O_APPEND 000010 /* Writes append to the file. */ -#ifdef __USE_BSD -#define O_NDELAY 000004 /* Non-blocking I/O. */ -#endif -#define O_NONBLOCK 000200 /* POSIX.1 non-blocking I/O. */ - -/* Mask for file access modes. This is system-dependent in case - some system ever wants to define some other flavor of access. */ -#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR) - -/* Values for the second argument to `fcntl'. */ -#define F_DUPFD 0 /* Duplicate file descriptor. */ -#define F_GETFD 1 /* Get file descriptor flags. */ -#define F_SETFD 2 /* Set file descriptor flags. */ -#define F_GETFL 3 /* Get file status flags. */ -#define F_SETFL 4 /* Set file status flags. */ -#define F_GETLK 5 /* Get record locking info. */ -#define F_SETLK 6 /* Set record locking info. */ -#define F_SETLKW 7 /* Set record locking info, wait. */ -#ifdef __USE_MISC -#define F_CHKFL 8 /* Check legality of file flag changes. */ -#define F_ALLOCSP 10 -#define F_FREESP 11 -#define F_SETBSDLK 12 /* Set Berkeley record lock. */ -#define F_SETBSDLKW 13 /* Set Berkeley record lock and wait. */ -#define F_RGETLK 20 /* Get info on a remote lock. */ -#define F_RSETLK 21 /* Set or unlock a remote lock. */ -#define F_RSETLKW 22 /* Set or unlock a remote lock and wait. */ -#define F_GETOWN 10 /* Get owner; only works on sockets. */ -#define F_SETOWN 11 /* Set owner; only works on sockets. */ -#endif - - -/* File descriptor flags used with F_GETFD and F_SETFD. */ -#define FD_CLOEXEC 1 /* Close on exec. */ - - -#include - -/* The structure describing an advisory lock. This is the type of the third - argument to `fcntl' for the F_GETLK, F_SETLK, and F_SETLKW requests. */ -struct flock - { - short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ - short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ - __off_t l_start; /* Offset where the lock begins. */ - __off_t l_len; /* Size of the locked area; zero means until EOF. */ - short int l_sysid; /* System ID where locking process resides. */ - short int l_pid; /* Process holding the lock. */ - }; - -/* Values for the `l_type' field of a `struct flock'. */ -#define F_RDLCK 1 /* Read lock. */ -#define F_WRLCK 2 /* Write lock. */ -#define F_UNLCK 3 /* Remove lock. */ - - -/* Define some more compatibility macros to be backward compatible with - BSD systems which did not managed to hide these kernel macros. */ -#ifdef __USE_BSD -#define FAPPEND O_APPEND -#define FFSYNC O_FSYNC -#define FASYNC O_ASYNC -#define FNONBLOCK O_NONBLOCK -#define FNDELAY O_NDELAY -#endif /* Use BSD. */ - - -#endif /* fcntlbits.h */ diff --git a/sysdeps/unix/sysv/irix4/signum.h b/sysdeps/unix/sysv/irix4/signum.h deleted file mode 100644 index 13314cff42..0000000000 --- a/sysdeps/unix/sysv/irix4/signum.h +++ /dev/null @@ -1,68 +0,0 @@ -/* Signal number definitions. Irix4 version. - Copyright (C) 1994, 1996 Free Software Foundation, Inc. - - 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 - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifdef _SIGNAL_H - -/* This file defines the fake signal functions and signal - number constants for SGI Irix 4. */ - -/* Fake signal functions. */ -#define SIG_ERR ((__sighandler_t) -1) -#define SIG_DFL ((__sighandler_t) 0) -#define SIG_IGN ((__sighandler_t) 1) - - -/* Signals. */ -#define SIGHUP 1 /* Hangup (POSIX). */ -#define SIGINT 2 /* Interrupt (ANSI). */ -#define SIGQUIT 3 /* Quit (POSIX). */ -#define SIGILL 4 /* Illegal instruction (ANSI). */ -#define SIGABRT SIGIOT /* Abort (ANSI). */ -#define SIGTRAP 5 /* Trace trap (POSIX). */ -#define SIGIOT 6 /* IOT trap. */ -#define SIGEMT 7 /* EMT trap. */ -#define SIGFPE 8 /* Floating-point exception (ANSI). */ -#define SIGKILL 9 /* Kill, unblockable (POSIX). */ -#define SIGBUS 10 /* Bus error. */ -#define SIGSEGV 11 /* Segmentation violation (ANSI). */ -#define SIGSYS 12 /* Bad argument to system call*/ -#define SIGPIPE 13 /* Broken pipe (POSIX). */ -#define SIGALRM 14 /* Alarm clock (POSIX). */ -#define SIGTERM 15 /* Termination (ANSI). */ -#define SIGUSR1 16 /* User-defined signal 1 (POSIX). */ -#define SIGUSR2 17 /* User-defined signal 2 (POSIX). */ -#define SIGCHLD 18 /* Child status has changed (POSIX). */ -#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */ -#define SIGPWR 19 /* Power going down. */ -#define SIGSTOP 20 /* Stop, unblockable (POSIX). */ -#define SIGTSTP 21 /* Keyboard stop (POSIX). */ -#define SIGPOLL 22 /* Same as SIGIO? (SVID). */ -#define SIGIO 23 /* I/O now possible. */ -#define SIGURG 24 /* Urgent condition on socket.*/ -#define SIGWINCH 25 /* Window size change. */ -#define SIGVTALRM 26 /* Virtual alarm clock. */ -#define SIGPROF 27 /* Profiling alarm clock. */ -#define SIGCONT 28 /* Continue (POSIX). */ -#define SIGTTIN 29 /* Background read from tty (POSIX). */ -#define SIGTTOU 30 /* Background write to tty (POSIX). */ -#define SIGXCPU 31 /* CPU limit exceeded. */ -#define SIGXFSZ 32 /* File size limit exceeded. */ - -#endif /* included. */ - -#define _NSIG 33 /* Biggest signal number + 1. */ diff --git a/sysdeps/unix/sysv/irix4/statbuf.h b/sysdeps/unix/sysv/irix4/statbuf.h deleted file mode 100644 index 579ccec8a6..0000000000 --- a/sysdeps/unix/sysv/irix4/statbuf.h +++ /dev/null @@ -1,61 +0,0 @@ -/* Copyright (C) 1992, 1996 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _STATBUF_H -#define _STATBUF_H 1 - -struct stat - { - unsigned long st_ino; - short int st_dev; - unsigned short int st_mode; - short int st_nlink; - unsigned short int st_uid; - unsigned short int st_gid; - short int st_rdev; - long int st_size; - long int st_atime; - long int st_mtime; - long int st_ctime; - }; - -/* Encoding of the file mode. */ - -#define __S_IFMT 0170000 /* These bits determine file type. */ - -/* File types. */ -#define __S_IFDIR 0040000 /* Directory. */ -#define __S_IFCHR 0020000 /* Character device. */ -#define __S_IFBLK 0060000 /* Block device. */ -#define __S_IFREG 0100000 /* Regular file. */ -#define __S_IFIFO 0010000 /* FIFO. */ - -/* These don't actually exist on System V, but having them doesn't hurt. */ -#define __S_IFLNK 0120000 /* Symbolic link. */ -#define __S_IFSOCK 0140000 /* Socket. */ - -/* Protection bits. */ - -#define __S_ISUID 04000 /* Set user ID on execution. */ -#define __S_ISGID 02000 /* Set group ID on execution. */ -#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ -#define __S_IREAD 0400 /* Read by owner. */ -#define __S_IWRITE 0200 /* Write by owner. */ -#define __S_IEXEC 0100 /* Execute by owner. */ - -#endif /* statbuf.h */ diff --git a/sysdeps/unix/sysv/linux/alpha/fcntlbits.h b/sysdeps/unix/sysv/linux/alpha/fcntlbits.h deleted file mode 100644 index 6e1c843ccb..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/fcntlbits.h +++ /dev/null @@ -1,100 +0,0 @@ -/* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 1995, 1996, 1997 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _FCNTLBITS_H -#define _FCNTLBITS_H 1 - -#include - - -/* In GNU, read and write are bits (unlike BSD). */ -#ifdef __USE_GNU -#define O_READ O_RDONLY /* Open for reading. */ -#define O_WRITE O_WRONLY /* Open for writing. */ -#endif -/* open/fcntl - O_SYNC is only implemented on blocks devices and on files - located on an ext2 file system */ -#define O_ACCMODE 0003 -#define O_RDONLY 00 -#define O_WRONLY 01 -#define O_RDWR 02 -#define O_CREAT 01000 /* not fcntl */ -#define O_TRUNC 02000 /* not fcntl */ -#define O_EXCL 04000 /* not fcntl */ -#define O_NOCTTY 010000 /* not fcntl */ - -#define O_NONBLOCK 00004 -#define O_APPEND 00010 -#define O_NDELAY O_NONBLOCK -#define O_SYNC 040000 -#define O_FSYNC O_SYNC -#define O_ASYNC 020000 /* fcntl, for BSD compatibility */ - -#define F_DUPFD 0 /* dup */ -#define F_GETFD 1 /* get f_flags */ -#define F_SETFD 2 /* set f_flags */ -#define F_GETFL 3 /* more flags (cloexec) */ -#define F_SETFL 4 -#define F_GETLK 7 -#define F_SETLK 8 -#define F_SETLKW 9 - -#define F_SETOWN 5 /* for sockets. */ -#define F_GETOWN 6 /* for sockets. */ - -/* for F_[GET|SET]FL */ -#define FD_CLOEXEC 1 /* actually anything with low bit set goes */ - -/* for posix fcntl() and lockf() */ -#define F_RDLCK 1 -#define F_WRLCK 2 -#define F_UNLCK 8 - -/* for old implementation of bsd flock () */ -#define F_EXLCK 16 /* or 3 */ -#define F_SHLCK 32 /* or 4 */ - -/* operations for bsd flock(), also used by the kernel implementation */ -#define LOCK_SH 1 /* shared lock */ -#define LOCK_EX 2 /* exclusive lock */ -#define LOCK_NB 4 /* or'd with one of the above to prevent - blocking */ -#define LOCK_UN 8 /* remove lock */ - -struct flock - { - short int l_type; - short int l_whence; - __off_t l_start; - __off_t l_len; - __pid_t l_pid; - }; - - -/* Define some more compatibility macros to be backward compatible with - BSD systems which did not managed to hide these kernel macros. */ -#ifdef __USE_BSD -#define FAPPEND O_APPEND -#define FFSYNC O_FSYNC -#define FASYNC O_ASYNC -#define FNONBLOCK O_NONBLOCK -#define FNDELAY O_NDELAY -#endif /* Use BSD. */ - -#endif /* fcntlbits.h */ diff --git a/sysdeps/unix/sysv/linux/alpha/gnu/types.h b/sysdeps/unix/sysv/linux/alpha/gnu/types.h deleted file mode 100644 index 2af77f70cf..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/gnu/types.h +++ /dev/null @@ -1,94 +0,0 @@ -/* Copyright (C) 1991, 92, 94, 95, 96, 97 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _GNU_TYPES_H -#define _GNU_TYPES_H 1 - -#include - -/* Convenience types. */ -typedef unsigned char __u_char; -typedef unsigned short __u_short; -typedef unsigned int __u_int; -typedef unsigned long __u_long; -#ifdef __GNUC__ -typedef unsigned long long int __u_quad_t; -typedef long long int __quad_t; -#else -typedef struct - { - long int __val[2]; - } __quad_t; -typedef struct - { - __u_long __val[2]; - } __u_quad_t; -#endif -typedef __quad_t *__qaddr_t; - -typedef __u_long __dev_t; /* Type of device numbers. */ -typedef __u_int __uid_t; /* Type of user identifications. */ -typedef __u_int __gid_t; /* Type of group identifications. */ -typedef __u_int __ino_t; /* Type of file serial numbers. */ -typedef __u_int __mode_t; /* Type of file attribute bitmasks. */ -typedef __u_int __nlink_t; /* Type of file link counts. */ -typedef long int __off_t; /* Type of file sizes and offsets. */ -typedef __quad_t __loff_t; /* Type of file sizes and offsets. */ -typedef int __pid_t; /* Type of process identifications. */ -typedef long int __ssize_t; /* Type of a byte count, or error. */ - -typedef struct - { - int __val[2]; - } __fsid_t; /* Type of file system IDs. */ - -/* Everythin' else. */ -typedef int __daddr_t; /* The type of a disk address. */ -typedef char *__caddr_t; -typedef long int __time_t; -typedef long int __swblk_t; /* Type of a swap block maybe? */ - -typedef long int __clock_t; - -/* One element in the file descriptor mask array. */ -typedef unsigned long int __fd_mask; - -/* Due to incaution, we may have gotten these from a kernel header file. */ -#undef __FD_SETSIZE -#undef __NFDBITS -#undef __FDMASK - -/* Number of descriptors that can fit in an `fd_set'. */ -#define __FD_SETSIZE 1024 - -/* It's easier to assume 8-bit bytes than to get CHAR_BIT. */ -#define __NFDBITS (8 * sizeof (__fd_mask)) -#define __FDELT(d) ((d) / __NFDBITS) -#define __FDMASK(d) (1 << ((d) % __NFDBITS)) - -/* fd_set for select and pselect. */ -typedef struct - { - /* XPG4.2 requires this member name. */ - __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS]; - } __fd_set; - - -typedef int __key_t; - -#endif /* gnu/types.h */ diff --git a/sysdeps/unix/sysv/linux/alpha/ioctls.h b/sysdeps/unix/sysv/linux/alpha/ioctls.h deleted file mode 100644 index 80b2e62e77..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/ioctls.h +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright (C) 1996, 1997 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _IOCTLS_H -#define _IOCTLS_H 1 - -/* Use the definitions from the kernel header files. */ -#include -#include - -/* Oh well, this is necessary since the kernel data structure is - different from the user-level version. */ -#undef TCGETS -#undef TCSETS -#undef TCSETSW -#undef TCSETSF -#define TCGETS _IOR ('t', 19, struct __kernel_termios) -#define TCSETS _IOW ('t', 20, struct __kernel_termios) -#define TCSETSW _IOW ('t', 21, struct __kernel_termios) -#define TCSETSF _IOW ('t', 22, struct __kernel_termios) - -#include - -#endif /* ioctls.h */ diff --git a/sysdeps/unix/sysv/linux/alpha/sigaction.h b/sysdeps/unix/sysv/linux/alpha/sigaction.h deleted file mode 100644 index 57ce5e6ded..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/sigaction.h +++ /dev/null @@ -1,51 +0,0 @@ -/* The proper definitions for Linux/Alpha sigaction. -Copyright (C) 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -/* Structure describing the action to be taken when a signal arrives. */ -struct sigaction - { - /* Signal handler. */ - __sighandler_t sa_handler; - - /* Additional set of signals to be blocked. */ - __sigset_t sa_mask; - - /* Special flags. */ - unsigned int sa_flags; - }; - -/* Bits in `sa_flags'. */ -#define SA_NOCLDSTOP 0x00000004 /* Don't send SIGCHLD when children stop. */ -#ifdef __USE_MISC -#define SA_STACK 0x00000001 /* Use signal stack by using `sa_restorer'. */ -#define SA_RESTART 0x00000002 /* Don't restart syscall on signal return. */ -#define SA_INTERRUPT 0x20000000 /* Historical no-op. */ -#define SA_NOMASK 0x00000008 /* Don't automatically block the signal when - its handler is being executed. */ -#define SA_ONESHOT 0x00000010 /* Reset to SIG_DFL on entry to handler. */ - -/* Some aliases for the SA_ constants. */ -#define SA_NODEFER SA_NOMASK -#define SA_RESETHAND SA_ONESHOT -#endif - -/* Values for the HOW argument to `sigprocmask'. */ -#define SIG_BLOCK 1 /* Block signals. */ -#define SIG_UNBLOCK 2 /* Unblock signals. */ -#define SIG_SETMASK 3 /* Set the set of blocked signals. */ diff --git a/sysdeps/unix/sysv/linux/alpha/signum.h b/sysdeps/unix/sysv/linux/alpha/signum.h deleted file mode 100644 index be6132d42f..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/signum.h +++ /dev/null @@ -1,69 +0,0 @@ -/* Signal number definitions. Linux/Alpha version. -Copyright (C) 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#ifdef _SIGNAL_H - -/* Fake signal functions. */ -#define SIG_ERR ((__sighandler_t) -1) /* Error return. */ -#define SIG_DFL ((__sighandler_t) 0) /* Default action. */ -#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */ - -/* - * Linux/AXP has different signal numbers that Linux/i386: I'm trying - * to make it OSF/1 binary compatible, at least for normal binaries. - */ -#define SIGHUP 1 -#define SIGINT 2 -#define SIGQUIT 3 -#define SIGILL 4 -#define SIGTRAP 5 -#define SIGABRT 6 -#define SIGEMT 7 -#define SIGFPE 8 -#define SIGKILL 9 -#define SIGBUS 10 -#define SIGSEGV 11 -#define SIGSYS 12 -#define SIGPIPE 13 -#define SIGALRM 14 -#define SIGTERM 15 -#define SIGURG 16 -#define SIGSTOP 17 -#define SIGTSTP 18 -#define SIGCONT 19 -#define SIGCHLD 20 -#define SIGTTIN 21 -#define SIGTTOU 22 -#define SIGIO 23 -#define SIGXCPU 24 -#define SIGXFSZ 25 -#define SIGVTALRM 26 -#define SIGPROF 27 -#define SIGWINCH 28 -#define SIGINFO 29 -#define SIGUSR1 30 -#define SIGUSR2 31 - -#define SIGPOLL SIGIO -#define SIGPWR SIGINFO -#define SIGIOT SIGABRT - -#define _NSIG 32 /* Biggest signal number + 1. */ - -#endif /* included. */ diff --git a/sysdeps/unix/sysv/linux/alpha/statbuf.h b/sysdeps/unix/sysv/linux/alpha/statbuf.h deleted file mode 100644 index 207fa0ca1c..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/statbuf.h +++ /dev/null @@ -1,74 +0,0 @@ -/* Copyright (C) 1996, 1997 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _STATBUF_H -#define _STATBUF_H 1 - -/* Versions of the `struct stat' data structure. */ -#define _STAT_VER_LINUX_OLD 0 -#define _STAT_VER_LINUX 1 -#define _STAT_VER _STAT_VER_LINUX - -/* Versions of the `xmknod' interface. */ -#define _MKNOD_VER_LINUX 0 - -struct stat - { - __dev_t st_dev; /* Device. */ - __ino_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. */ - __off_t st_size; /* Size of file, in bytes. */ - __time_t st_atime; /* Time of last access. */ - __time_t st_mtime; /* Time of last modification. */ - __time_t st_ctime; /* Time of last status change. */ - unsigned int st_blksize; /* Optimal block size for I/O. */ -#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ - int st_blocks; /* Nr. of 512-byte blocks allocated. */ - unsigned int st_flags; - unsigned int st_gen; - }; - -/* Encoding of the file mode. */ - -#define __S_IFMT 0170000 /* These bits determine file type. */ - -/* File types. */ -#define __S_IFDIR 0040000 /* Directory. */ -#define __S_IFCHR 0020000 /* Character device. */ -#define __S_IFBLK 0060000 /* Block device. */ -#define __S_IFREG 0100000 /* Regular file. */ -#define __S_IFIFO 0010000 /* FIFO. */ - -/* These don't actually exist on System V, but having them doesn't hurt. */ -#define __S_IFLNK 0120000 /* Symbolic link. */ -#define __S_IFSOCK 0140000 /* Socket. */ - -/* Protection bits. */ - -#define __S_ISUID 04000 /* Set user ID on execution. */ -#define __S_ISGID 02000 /* Set group ID on execution. */ -#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ -#define __S_IREAD 0400 /* Read by owner. */ -#define __S_IWRITE 0200 /* Write by owner. */ -#define __S_IEXEC 0100 /* Execute by owner. */ - -#endif /* statbuf.h */ diff --git a/sysdeps/unix/sysv/linux/alpha/sys/ipc_buf.h b/sysdeps/unix/sysv/linux/alpha/sys/ipc_buf.h deleted file mode 100644 index 57830daae1..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/sys/ipc_buf.h +++ /dev/null @@ -1,85 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , August 1995. - - 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 - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _SYS_IPC_BUF_H - -#define _SYS_IPC_BUF_H 1 -#include - -#include - -/* Mode bits for `msgget', `semget', and `shmget'. */ -#define IPC_CREAT 01000 /* Create key if key does not exist. */ -#define IPC_EXCL 02000 /* Fail if key exists. */ -#define IPC_NOWAIT 04000 /* Return error on wait. */ - -/* Control commands for `msgctl', `semctl', and `shmctl'. */ -#define IPC_RMID 0 /* Remove identifier. */ -#define IPC_SET 1 /* Set `ipc_perm' options. */ -#define IPC_STAT 2 /* Get `ipc_perm' options. */ -#define IPC_INFO 3 /* See ipcs. */ - - -__BEGIN_DECLS - -/* Special key values. */ -#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ - - -/* Data structure used to pass permission information to IPC operations. */ -struct ipc_perm - { - __key_t __key; /* Key. */ - unsigned int uid; /* Owner's user ID. */ - unsigned int gid; /* Owner's group ID. */ - unsigned int cuid; /* Creator's user ID. */ - unsigned int cgid; /* Creator's group ID. */ - unsigned int mode; /* Read/write permission. */ - unsigned short int __seq; /* Sequence number. */ - }; - - -/* Kludge to work around Linux' restriction of only up to five - arguments to a system call. */ -struct ipc_kludge - { - void *msgp; - long int msgtyp; - }; - -/* The actual system call: all functions are multiplexed by this. */ -extern int __ipc __P ((int __call, int __first, int __second, int __third, - void *__ptr)); - -/* The codes for the functions to use the multiplexer `__ipc'. */ -#define IPCOP_semop 1 -#define IPCOP_semget 2 -#define IPCOP_semctl 3 -#define IPCOP_msgsnd 11 -#define IPCOP_msgrcv 12 -#define IPCOP_msgget 13 -#define IPCOP_msgctl 14 -#define IPCOP_shmat 21 -#define IPCOP_shmdt 22 -#define IPCOP_shmget 23 -#define IPCOP_shmctl 24 - -__END_DECLS - -#endif /* _SYS_IPC_BUF_H */ diff --git a/sysdeps/unix/sysv/linux/alpha/termbits.h b/sysdeps/unix/sysv/linux/alpha/termbits.h deleted file mode 100644 index d0932c1cd7..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/termbits.h +++ /dev/null @@ -1,193 +0,0 @@ -/* termios type and macro definitions. Linux version. - Copyright (C) 1993, 1994, 1995, 1996, 1997 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _TERMBITS_H -#define _TERMBITS_H 1 - -typedef unsigned char cc_t; -typedef unsigned int speed_t; -typedef unsigned int tcflag_t; - -#define NCCS 32 -struct termios - { - tcflag_t c_iflag; /* input mode flags */ - tcflag_t c_oflag; /* output mode flags */ - tcflag_t c_cflag; /* control mode flags */ - tcflag_t c_lflag; /* local mode flags */ - cc_t c_cc[NCCS]; /* control characters */ - cc_t c_line; /* line discipline (== c_cc[33]) */ - speed_t c_ispeed; /* input speed */ - speed_t c_ospeed; /* output speed */ - }; - -/* c_cc characters */ -#define VEOF 0 -#define VEOL 1 -#define VEOL2 2 -#define VERASE 3 -#define VWERASE 4 -#define VKILL 5 -#define VREPRINT 6 -#define VSWTC 7 -#define VINTR 8 -#define VQUIT 9 -#define VSUSP 10 -#define VSTART 12 -#define VSTOP 13 -#define VLNEXT 14 -#define VDISCARD 15 -#define VMIN 16 -#define VTIME 17 - -/* c_iflag bits */ -#define IGNBRK 0000001 -#define BRKINT 0000002 -#define IGNPAR 0000004 -#define PARMRK 0000010 -#define INPCK 0000020 -#define ISTRIP 0000040 -#define INLCR 0000100 -#define IGNCR 0000200 -#define ICRNL 0000400 -#define IXON 0001000 -#define IXOFF 0002000 -#ifdef __USE_BSD - /* POSIX.1 doesn't want these... */ -# define IXANY 0004000 -# define IUCLC 0010000 -# define IMAXBEL 0020000 -#endif - -/* c_oflag bits */ -#define OPOST 0000001 -#define ONLCR 0000002 -#define OLCUC 0000004 - -#define OCRNL 0000010 -#define ONOCR 0000020 -#define ONLRET 0000040 - -#define OFILL 00000100 -#define OFDEL 00000200 -#define NLDLY 00001400 -#define NL0 00000000 -#define NL1 00000400 -#define NL2 00001000 -#define NL3 00001400 -#define TABDLY 00006000 -#define TAB0 00000000 -#define TAB1 00002000 -#define TAB2 00004000 -#define TAB3 00006000 -#define CRDLY 00030000 -#define CR0 00000000 -#define CR1 00010000 -#define CR2 00020000 -#define CR3 00030000 -#define FFDLY 00040000 -#define FF0 00000000 -#define FF1 00040000 -#define BSDLY 00100000 -#define BS0 00000000 -#define BS1 00100000 -#define VTDLY 00200000 -#define VT0 00000000 -#define VT1 00200000 -#define XTABS 01000000 /* Hmm.. Linux/i386 considers this part of TABDLY.. */ - -/* c_cflag bit meaning */ -#define CBAUD 0000037 -#define B0 0000000 /* hang up */ -#define B50 0000001 -#define B75 0000002 -#define B110 0000003 -#define B134 0000004 -#define B150 0000005 -#define B200 0000006 -#define B300 0000007 -#define B600 0000010 -#define B1200 0000011 -#define B1800 0000012 -#define B2400 0000013 -#define B4800 0000014 -#define B9600 0000015 -#define B19200 0000016 -#define B38400 0000017 -#define EXTA B19200 -#define EXTB B38400 -#define CBAUDEX 0000000 -#define B57600 00020 -#define B115200 00021 -#define B230400 00022 -#define B460800 00023 - -#define CSIZE 00001400 -#define CS5 00000000 -#define CS6 00000400 -#define CS7 00001000 -#define CS8 00001400 - -#define CSTOPB 00002000 -#define CREAD 00004000 -#define PARENB 00010000 -#define PARODD 00020000 -#define HUPCL 00040000 - -#define CLOCAL 00100000 -#define CRTSCTS 020000000000 /* flow control */ - -/* c_lflag bits */ -#define ISIG 0x00000080 -#define ICANON 0x00000100 -#define XCASE 0x00004000 -#define ECHO 0x00000008 -#define ECHOE 0x00000002 -#define ECHOK 0x00000004 -#define ECHONL 0x00000010 -#define NOFLSH 0x80000000 -#define TOSTOP 0x00400000 -#define ECHOCTL 0x00000040 -#define ECHOPRT 0x00000020 -#define ECHOKE 0x00000001 -#define FLUSHO 0x00800000 -#define PENDIN 0x20000000 -#define IEXTEN 0x00000400 - -/* Values for the ACTION argument to `tcflow'. */ -#define TCOOFF 0 -#define TCOON 1 -#define TCIOFF 2 -#define TCION 3 - -/* Values for the QUEUE_SELECTOR argument to `tcflush'. */ -#define TCIFLUSH 0 -#define TCOFLUSH 1 -#define TCIOFLUSH 2 - -/* Values for the OPTIONAL_ACTIONS argument to `tcsetattr'. */ -#define TCSANOW 0 -#define TCSADRAIN 1 -#define TCSAFLUSH 2 - - -#define _IOT_termios /* Hurd ioctl type field. */ \ - _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2) - -#endif /* _TERMBITS_H */ diff --git a/sysdeps/unix/sysv/linux/alpha/timebits.h b/sysdeps/unix/sysv/linux/alpha/timebits.h deleted file mode 100644 index 1ad0df8c5b..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/timebits.h +++ /dev/null @@ -1,50 +0,0 @@ -/* System-dependent timing definitions. Linux/Alpha version. - Copyright (C) 1996 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifdef __need_timeval -# undef __need_timeval -# ifndef _STRUCT_TIMEVAL -# define _STRUCT_TIMEVAL 1 -/* A time value that is accurate to the nearest - microsecond but also has a range of years. */ -struct timeval - { - int tv_sec; /* Seconds. */ - int tv_usec; /* Microseconds. */ - }; -# endif /* struct timeval */ -#endif /* need timeval */ - - -#ifndef _TIMEBITS_H -# define _TIMEBITS_H 1 - -/* ISO/IEC 9899:1990 7.12.1: - The macro `CLOCKS_PER_SEC' is the number per second of the value - returned by the `clock' function. */ -/* CAE XSH, Issue 4, Version 2: - The value of CLOCKS_PER_SEC is required to be 1 million on all - XSI-conformant systems. */ -# define CLOCKS_PER_SEC 1000000 - -/* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK - presents the real value for clock ticks per second for the system. */ -# define CLK_TCK 1024 - -#endif /* timebits.h */ diff --git a/sysdeps/unix/sysv/minix/sigaction.h b/sysdeps/unix/sysv/minix/sigaction.h deleted file mode 100644 index 6b0c460914..0000000000 --- a/sysdeps/unix/sysv/minix/sigaction.h +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright (C) 1992, 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -/* Structure describing the action to be taken when a signal arrives. */ -struct sigaction - { - /* Signal handler. */ - __sighandler_t sa_handler; - - /* Additional set of signals to be blocked. */ - __sigset_t sa_mask; - - /* Special flags. */ - int sa_flags; - }; - -/* Bits in `sa_flags'. */ -#ifdef __USE_MISC -#define SA_ONSTACK 0x1 /* Take signal on signal stack. */ -#define SA_RESETHAND 0x2 /* Reset signal handler when signal caught. */ -#define SA_NODEFER 0x4 /* Don't block signal while catching it. */ -#define SA_RESTART 0x8 /* Don't restart syscall on signal return. */ -#define SA_SIGINFO 0x10 /* Extended signal handling. */ -#define SA_NOCLDWAIT 0x20 /* Don't create zombies. */ -#define SA_COMPAT 0x80 /* Internal flag for old signal catchers. */ -#define SA_DISABLE 0x100 /* Disable alternate signal stack. */ -#endif -#define SA_NOCLDSTOP 0x40 /* Don't send SIGCHLD when children stop. */ - - -/* Values for the HOW argument to `sigprocmask'. */ -#define SIG_BLOCK 0 /* Block signals. */ -#define SIG_UNBLOCK 1 /* Unblock signals. */ -#define SIG_SETMASK 2 /* Set the set of blocked signals. */ diff --git a/sysdeps/unix/sysv/sco3.2.4/confname.h b/sysdeps/unix/sysv/sco3.2.4/confname.h deleted file mode 100644 index 0408951863..0000000000 --- a/sysdeps/unix/sysv/sco3.2.4/confname.h +++ /dev/null @@ -1,50 +0,0 @@ -/* `sysconf', `pathconf', and `confstr' NAME values. Generic version. -Copyright (C) 1993 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -/* Values for the NAME argument to `pathconf' and `fpathconf'. */ -#define _PC_LINK_MAX 0 -#define _PC_MAX_CANON 1 -#define _PC_MAX_INPUT 2 -#define _PC_NAME_MAX 3 -#define _PC_PATH_MAX 4 -#define _PC_PIPE_BUF 5 -#define _PC_CHOWN_RESTRICTED 6 -#define _PC_NO_TRUNC 7 -#define _PC_VDISABLE 8 - -/* Values for the argument to `sysconf'. */ -#define _SC_ARG_MAX 0 -#define _SC_CHILD_MAX 1 -#define _SC_CLK_TCK 2 -#define _SC_NGROUPS_MAX 3 -#define _SC_OPEN_MAX 4 -#define _SC_JOB_CONTROL 5 -#define _SC_SAVED_IDS 6 -#define _SC_VERSION 7 -#define _SC_PASS_MAX 8 -#define _SC_XOPEN_VERSION 9 -#define _SC_TZNAME_MAX 666 /* Not handled by SCO's system call. */ - -#ifdef __USE_POSIX2 -/* Values for the NAME argument to `confstr'. */ -enum - { - _CS_PATH /* The default search path. */ - }; -#endif diff --git a/sysdeps/unix/sysv/sco3.2.4/sigaction.h b/sysdeps/unix/sysv/sco3.2.4/sigaction.h deleted file mode 100644 index c21b928cdb..0000000000 --- a/sysdeps/unix/sysv/sco3.2.4/sigaction.h +++ /dev/null @@ -1,39 +0,0 @@ -/* The proper definitions for SCO's sigaction. -Copyright (C) 1993, 1994, 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -/* Structure describing the action to be taken when a signal arrives. */ -struct sigaction - { - /* Signal handler. */ - __sighandler_t sa_handler; - - /* Additional set of signals to be blocked. */ - __sigset_t sa_mask; - - /* Special flags. */ - int sa_flags; - }; - -/* Bits in `sa_flags'. */ -#define SA_NOCLDSTOP 0x01 /* Don't send SIGCHLD when children stop. */ - -/* Values for the HOW argument to `sigprocmask'. */ -#define SIG_SETMASK 0 /* Set the set of blocked signals. */ -#define SIG_BLOCK 1 /* Block signals. */ -#define SIG_UNBLOCK 2 /* Unblock signals. */ diff --git a/sysdeps/unix/sysv/sco3.2/local_lim.h b/sysdeps/unix/sysv/sco3.2/local_lim.h deleted file mode 100644 index e456816446..0000000000 --- a/sysdeps/unix/sysv/sco3.2/local_lim.h +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (C) 1993, 1996 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _LOCAL_LIM_H -#define _LOCAL_LIM_H 1 - -#define NGROUPS_MAX 8 /* Maximum number of supplementary groups. */ -#define ARG_MAX 5120 -#define CHILD_MAX 25 -#define OPEN_MAX 60 -#define LINK_MAX 1000 -#define MAX_CANON 256 - -/* For SVR3, this is 14. For SVR4, it is 255, at least on ufs - file systems, even though the System V limits.h incorrectly - defines it as 14. Giving it a value which is too large - is harmless (it is a maximum). */ -#define NAME_MAX 255 - -#define PATH_MAX 1024 - -#endif /* local_lim.h */ diff --git a/sysdeps/unix/sysv/sysv4/i386/statbuf.h b/sysdeps/unix/sysv/sysv4/i386/statbuf.h deleted file mode 100644 index 9354d6790c..0000000000 --- a/sysdeps/unix/sysv/sysv4/i386/statbuf.h +++ /dev/null @@ -1,90 +0,0 @@ -/* Copyright (C) 1993, 1996 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@zen.org). - - 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 - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _STATBUF_H -#define _STATBUF_H 1 - -#include - -/* Versions of the `struct stat' data structure and - the bits of the `xmknod' interface. */ -#define _STAT_VER 2 -#define _MKNOD_VER 2 - -/* Structure describing file characteristics. */ -struct stat - { - unsigned long st_dev; /* Device. */ - long st_filler1[3]; - unsigned long st_ino; /* File serial number. */ - unsigned long st_mode; /* File mode. */ - unsigned long st_nlink; /* Link count. */ - long st_uid; /* User ID of the file's owner. */ - long st_gid; /* Group ID of the file's group.*/ - unsigned long st_rdev; /* Device number, if device. */ - long st_filler2[2]; - - long st_size; /* Size of file, in bytes. */ - /* SVR4 added this extra long to allow for expansion of off_t. */ - long st_filler3; - - long st_atime; /* Time of last access. */ - unsigned long st_atime_usec; - long st_mtime; /* Time of last modification. */ - unsigned long st_mtime_usec; - long st_ctime; /* Time of last status change. */ - unsigned long st_ctime_usec; - - long st_blksize; /* Optimal block size for I/O. */ -#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ - - long st_blocks; /* Number of 512-byte blocks allocated. */ - char st_fstype[16]; /* The type of this filesystem. */ - int st_aclcnt; - unsigned long st_level; - unsigned long st_flags; - unsigned long st_cmwlevel; - long st_filler4[4]; - }; - -/* Encoding of the file mode. */ - -#define __S_IFMT 0170000 /* These bits determine file type. */ - -/* File types. */ -#define __S_IFDIR 0040000 /* Directory. */ -#define __S_IFCHR 0020000 /* Character device. */ -#define __S_IFBLK 0060000 /* Block device. */ -#define __S_IFREG 0100000 /* Regular file. */ -#define __S_IFIFO 0010000 /* FIFO. */ - -/* These don't actually exist on System V, but having them doesn't hurt. */ -#define __S_IFLNK 0120000 /* Symbolic link. */ -#define __S_IFSOCK 0140000 /* Socket. */ - -/* Protection bits. */ - -#define __S_ISUID 04000 /* Set user ID on execution. */ -#define __S_ISGID 02000 /* Set group ID on execution. */ -#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ -#define __S_IREAD 0400 /* Read by owner. */ -#define __S_IWRITE 0200 /* Write by owner. */ -#define __S_IEXEC 0100 /* Execute by owner. */ - -#endif /* statbuf.h */ diff --git a/sysdeps/unix/sysv/sysv4/sigaction.h b/sysdeps/unix/sysv/sysv4/sigaction.h deleted file mode 100644 index 1305ba61e6..0000000000 --- a/sysdeps/unix/sysv/sysv4/sigaction.h +++ /dev/null @@ -1,51 +0,0 @@ -/* The proper definitions for SVR4's sigaction. -Copyright (C) 1993, 1994, 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -/* Structure describing the action to be taken when a signal arrives. */ -struct sigaction - { - /* Special flags. */ - int sa_flags; - - /* Signal handler. */ - __sighandler_t sa_handler; - - /* Additional set of signals to be blocked. */ - __sigset_t sa_mask; - - /* Padding. */ - int sa_resv[2]; - }; - -/* Bits in `sa_flags'. */ -#ifdef __USE_MISC -#define SA_ONSTACK 0x1 /* Take signal on signal stack. */ -#define SA_RESETHAND 0x2 /* Reset to SIG_DFL on entry to handler. */ -#define SA_RESTART 0x4 /* Don't restart syscall on signal return. */ -#define SA_SIGINFO 0x8 /* Provide additional info to the handler. */ -#define SA_NODEFER 0x10 /* Don't automatically block the signal when - its handler is being executed. */ -#define SA_NOCLDWAIT 0x10000 /* Don't save zombie processes. */ -#endif -#define SA_NOCLDSTOP 0x20000 /* Don't send SIGCHLD when children stop. */ - -/* Values for the HOW argument to `sigprocmask'. */ -#define SIG_BLOCK 1 /* Block signals. */ -#define SIG_UNBLOCK 2 /* Unblock signals. */ -#define SIG_SETMASK 3 /* Set the set of blocked signals. */ diff --git a/sysdeps/unix/sysv/sysv4/signum.h b/sysdeps/unix/sysv/sysv4/signum.h deleted file mode 100644 index f11c731a42..0000000000 --- a/sysdeps/unix/sysv/sysv4/signum.h +++ /dev/null @@ -1,66 +0,0 @@ -/* Signal number definitions. SVR4 version. - Copyright (C) 1994, 1996 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifdef _SIGNAL_H - -/* Fake signal functions. */ -#define SIG_ERR ((__sighandler_t) -1) /* Error return. */ -#define SIG_DFL ((__sighandler_t) 0) /* Default action. */ -#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */ - - -/* Signals. */ -#define SIGHUP 1 /* Hangup (POSIX). */ -#define SIGINT 2 /* Interrupt (ANSI). */ -#define SIGQUIT 3 /* Quit (POSIX). */ -#define SIGILL 4 /* Illegal instruction (ANSI). */ -#define SIGABRT SIGIOT /* Abort (ANSI). */ -#define SIGTRAP 5 /* Trace trap (POSIX). */ -#define SIGIOT 6 /* IOT trap (4.2 BSD). */ -#define SIGEMT 7 /* EMT trap (4.2 BSD). */ -#define SIGFPE 8 /* Floating-point exception (ANSI). */ -#define SIGKILL 9 /* Kill, unblockable (POSIX). */ -#define SIGBUS 10 /* Bus error (4.2 BSD). */ -#define SIGSEGV 11 /* Segmentation violation (ANSI). */ -#define SIGSYS 12 /* Bad argument to system call (4.2 BSD)*/ -#define SIGPIPE 13 /* Broken pipe (POSIX). */ -#define SIGALRM 14 /* Alarm clock (POSIX). */ -#define SIGTERM 15 /* Termination (ANSI). */ -#define SIGUSR1 16 /* User-defined signal 1 (POSIX). */ -#define SIGUSR2 17 /* User-defined signal 2 (POSIX). */ -#define SIGCHLD 18 /* Child status has changed (POSIX). */ -#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */ -#define SIGPWR 19 /* Power failure restart (System V). */ -#define SIGWINCH 20 /* Window size change (4.3 BSD, Sun). */ -#define SIGURG 21 /* Urgent condition on socket (4.2 BSD).*/ -#define SIGPOLL 22 /* Pollable event occurred (System V). */ -#define SIGIO SIGPOLL /* I/O now possible (4.2 BSD). */ -#define SIGSTOP 23 /* Stop, unblockable (POSIX). */ -#define SIGTSTP 24 /* Keyboard stop (POSIX). */ -#define SIGCONT 25 /* Continue (POSIX). */ -#define SIGTTIN 26 /* Background read from tty (POSIX). */ -#define SIGTTOU 27 /* Background write to tty (POSIX). */ -#define SIGVTALRM 28 /* Virtual alarm clock (4.2 BSD). */ -#define SIGPROF 29 /* Profiling alarm clock (4.2 BSD). */ -#define SIGXCPU 30 /* CPU limit exceeded (4.2 BSD). */ -#define SIGXFSZ 31 /* File size limit exceeded (4.2 BSD). */ - -#endif /* included. */ - -#define _NSIG 32 /* Biggest signal number + 1. */ diff --git a/sysdeps/unix/sysv/sysv4/sigset.h b/sysdeps/unix/sysv/sysv4/sigset.h deleted file mode 100644 index 1461c93b3d..0000000000 --- a/sysdeps/unix/sysv/sysv4/sigset.h +++ /dev/null @@ -1,96 +0,0 @@ -/* __sig_atomic_t, __sigset_t, and related definitions. SVR4 version. - Copyright (C) 1994, 1995, 1996 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _SIGSET_H_types -#define _SIGSET_H_types 1 - -typedef int __sig_atomic_t; - -/* A `sigset_t' has a bit for each signal. */ -typedef struct - { - unsigned long int __sigbits[4]; - } __sigset_t; - -#endif /* ! _SIGSET_H_types */ - -/* We only want to define these functions if was actually - included; otherwise we were included just to define the types. Since we - are namespace-clean, it wouldn't hurt to define extra macros. But - trouble can be caused by functions being defined (e.g., any global - register vars declared later will cause compilation errors). */ - -#if !defined (_SIGSET_H_fns) && defined (_SIGNAL_H) -#define _SIGSET_H_fns 1 - -/* Return a mask that includes SIG only. */ -#define __sigmask(sig) (1 << ((sig) - 1)) - - -/* It's easier to assume 8-bit bytes than to get CHAR_BIT. */ -#define __NSSBITS (sizeof (__sigset_t) * 8) -#define __SSELT(s) ((s) / __NSSBITS) -#define __SSMASK(s) (1 << ((s) % __NSSBITS)) - -#ifndef _EXTERN_INLINE -#define _EXTERN_INLINE extern __inline -#endif - -_EXTERN_INLINE int -__sigemptyset (__sigset_t *__set) -{ - __set->__sigbits[0] = __set->__sigbits[1] = - __set->__sigbits[2] = __set->__sigbits[3] = 0L; - return 0; -} - -_EXTERN_INLINE int -__sigfillset (__sigset_t *__set) -{ - /* SVR4 has a system call for `sigfillset' (!), and it only sets the bits - for signals [1,31]. Setting bits for unimplemented signals seems - harmless (and we will find out if it really is). */ - __set->__sigbits[0] = __set->__sigbits[1] = - __set->__sigbits[2] = __set->__sigbits[3] = ~0L; - return 0; -} - -_EXTERN_INLINE int -__sigaddset (__sigset_t *__set, int __sig) -{ - __set->__sigbits[__SSELT (__sig)] |= __SSMASK (__sig); - return 0; -} - -_EXTERN_INLINE int -__sigdelset (__sigset_t *__set, int __sig) -{ - __set->__sigbits[__SSELT (__sig)] &= ~__SSMASK (__sig); - return 0; -} - -_EXTERN_INLINE int -__sigismember (__const __sigset_t *__set, int __sig) -{ - if (__set->__sigbits[__SSELT (__sig)] & __SSMASK (__sig)) - return 1; - return 0; -} - -#endif /* ! _SIGSET_H_fns */ diff --git a/sysdeps/unix/sysv/sysv4/solaris2/signum.h b/sysdeps/unix/sysv/sysv4/solaris2/signum.h deleted file mode 100644 index 4e5576425b..0000000000 --- a/sysdeps/unix/sysv/sysv4/solaris2/signum.h +++ /dev/null @@ -1,73 +0,0 @@ -/* Signal number definitions. Solaris 2 version. - Copyright (C) 1994, 1996 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifdef _SIGNAL_H - -/* Fake signal functions. */ -#define SIG_ERR ((__sighandler_t) -1) /* Error return. */ -#define SIG_DFL ((__sighandler_t) 0) /* Default action. */ -#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */ - - -/* Signals. */ -#define SIGHUP 1 /* Hangup (POSIX). */ -#define SIGINT 2 /* Interrupt (ANSI). */ -#define SIGQUIT 3 /* Quit (POSIX). */ -#define SIGILL 4 /* Illegal instruction (ANSI). */ -#define SIGABRT SIGIOT /* Abort (ANSI). */ -#define SIGTRAP 5 /* Trace trap (POSIX). */ -#define SIGIOT 6 /* IOT trap (4.2 BSD). */ -#define SIGEMT 7 /* EMT trap (4.2 BSD). */ -#define SIGFPE 8 /* Floating-point exception (ANSI). */ -#define SIGKILL 9 /* Kill, unblockable (POSIX). */ -#define SIGBUS 10 /* Bus error (4.2 BSD). */ -#define SIGSEGV 11 /* Segmentation violation (ANSI). */ -#define SIGSYS 12 /* Bad argument to system call (4.2 BSD)*/ -#define SIGPIPE 13 /* Broken pipe (POSIX). */ -#define SIGALRM 14 /* Alarm clock (POSIX). */ -#define SIGTERM 15 /* Termination (ANSI). */ -#define SIGUSR1 16 /* User-defined signal 1 (POSIX). */ -#define SIGUSR2 17 /* User-defined signal 2 (POSIX). */ -#define SIGCHLD 18 /* Child status has changed (POSIX). */ -#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */ -#define SIGPWR 19 /* Power failure restart (System V). */ -#define SIGWINCH 20 /* Window size change (4.3 BSD, Sun). */ -#define SIGURG 21 /* Urgent condition on socket (4.2 BSD).*/ -#define SIGPOLL 22 /* Pollable event occurred (System V). */ -#define SIGIO SIGPOLL /* I/O now possible (4.2 BSD). */ -#define SIGSTOP 23 /* Stop, unblockable (POSIX). */ -#define SIGTSTP 24 /* Keyboard stop (POSIX). */ -#define SIGCONT 25 /* Continue (POSIX). */ -#define SIGTTIN 26 /* Background read from tty (POSIX). */ -#define SIGTTOU 27 /* Background write to tty (POSIX). */ -#define SIGVTALRM 28 /* Virtual alarm clock (4.2 BSD). */ -#define SIGPROF 29 /* Profiling alarm clock (4.2 BSD). */ -#define SIGXCPU 30 /* CPU limit exceeded (4.2 BSD). */ -#define SIGXFSZ 31 /* File size limit exceeded (4.2 BSD). */ -/* The following signals are new in Solaris 2. */ -#define SIGWAITING 32 /* Process's lwps are blocked. */ -#define SIGLWP 33 /* Special signal used by thread library. */ -#define SIGFREEZE 34 /* Special signal used by CPR. */ -#define SIGTHAW 35 /* Special signal used by CPR. */ -#define _SIGRTMIN 36 /* First (highest-priority) realtime signal. */ -#define _SIGRTMAX 43 /* Last (lowest-priority) realtime signal. */ - -#endif /* included. */ - -#define _NSIG 44 /* Biggest signal number + 1. */ diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sigcontext.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sigcontext.h deleted file mode 100644 index 532b3793ec..0000000000 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sigcontext.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/sysv4/solaris2/statbuf.h b/sysdeps/unix/sysv/sysv4/solaris2/statbuf.h deleted file mode 100644 index e4e2ab8bcf..0000000000 --- a/sysdeps/unix/sysv/sysv4/solaris2/statbuf.h +++ /dev/null @@ -1,83 +0,0 @@ -/* Copyright (C) 1993, 1996 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@zen.org). - - 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 - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _STATBUF_H -#define _STATBUF_H 1 - -#include - -/* Structure describing file characteristics. */ -struct stat - { - unsigned long int st_dev; - long st_filler1[3]; - __ino_t st_ino; /* File serial number. */ - unsigned long int st_mode; /* File mode. */ - /* This is unsigned long instead of __nlink_t, since SVR4 has - a long nlink_t, not a short one. */ - unsigned long int 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.*/ - unsigned long int st_rdev; /* Device number, if device. */ - long st_filler2[2]; - - __off_t st_size; /* Size of file, in bytes. */ - /* SVR4 added this extra long to allow for expansion of off_t. */ - long st_filler3; - - __time_t st_atime; /* Time of last access. */ - unsigned long int st_atime_usec; - __time_t st_mtime; /* Time of last modification. */ - unsigned long int st_mtime_usec; - __time_t st_ctime; /* Time of last status change. */ - unsigned long int st_ctime_usec; - - long st_blksize; /* Optimal block size for I/O. */ -#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ - - long st_blocks; /* Number of 512-byte blocks allocated. */ - char st_fstype[16]; - long st_filler4[8]; - }; - -/* Encoding of the file mode. */ - -#define __S_IFMT 0170000 /* These bits determine file type. */ - -/* File types. */ -#define __S_IFDIR 0040000 /* Directory. */ -#define __S_IFCHR 0020000 /* Character device. */ -#define __S_IFBLK 0060000 /* Block device. */ -#define __S_IFREG 0100000 /* Regular file. */ -#define __S_IFIFO 0010000 /* FIFO. */ - -/* These don't actually exist on System V, but having them doesn't hurt. */ -#define __S_IFLNK 0120000 /* Symbolic link. */ -#define __S_IFSOCK 0140000 /* Socket. */ - -/* Protection bits. */ - -#define __S_ISUID 04000 /* Set user ID on execution. */ -#define __S_ISGID 02000 /* Set group ID on execution. */ -#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ -#define __S_IREAD 0400 /* Read by owner. */ -#define __S_IWRITE 0200 /* Write by owner. */ -#define __S_IEXEC 0100 /* Execute by owner. */ - -#endif /* statbuf.h */ diff --git a/sysdeps/unix/sysv/sysv4/utsnamelen.h b/sysdeps/unix/sysv/sysv4/utsnamelen.h deleted file mode 100644 index 9dcc618068..0000000000 --- a/sysdeps/unix/sysv/sysv4/utsnamelen.h +++ /dev/null @@ -1 +0,0 @@ -#define _UTSNAME_LENGTH 257 diff --git a/sysdeps/unix/sysv/sysv4/waitflags.h b/sysdeps/unix/sysv/sysv4/waitflags.h deleted file mode 100644 index f5613c1327..0000000000 --- a/sysdeps/unix/sysv/sysv4/waitflags.h +++ /dev/null @@ -1,35 +0,0 @@ -/* Definitions of flag bits for `waitpid' et al. - Copyright (C) 1993, 1996 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@zen.org). - - 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 - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _WAITFLAGS_H - -#define _WAITFLAGS_H 1 - -/* Bits in the third argument to `waitpid'. */ -#define WNOHANG 64 /* Don't block waiting. */ -#define WUNTRACED 4 /* Report status of stopped children. */ - -#ifdef __USE_SVID -#define WEXITED 1 /* Look for children that have exited. */ -#define WTRAPPED 2 /* Look for processes that stopped - while tracing. */ -#endif - -#endif /* waitflags.h */ diff --git a/sysdeps/vax/huge_val.h b/sysdeps/vax/huge_val.h deleted file mode 100644 index 02cafb0141..0000000000 --- a/sysdeps/vax/huge_val.h +++ /dev/null @@ -1,26 +0,0 @@ -/* `HUGE_VAL' constant for Vaxen. - Used by and functions for overflow. - Copyright (C) 1992, 1996 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _HUGE_VAL_H -#define _HUGE_VAL_H 1 - -#define HUGE_VAL 1.70141182460469227e38 - -#endif /* huge_val.h */ diff --git a/sysdeps/vax/jmp_buf.h b/sysdeps/vax/jmp_buf.h deleted file mode 100644 index 7adecd9a17..0000000000 --- a/sysdeps/vax/jmp_buf.h +++ /dev/null @@ -1,7 +0,0 @@ -/* Define the machine-dependent type `jmp_buf'. Vax version. */ - -typedef struct - { - PTR __fp; - PTR __pc; - } __jmp_buf[1]; From 84d211c9c5f06c4c35904ef6c6338cf09f6fd0ca Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:41:16 +0000 Subject: [PATCH 0953/4487] Alpha specific signal context. --- sysdeps/mach/hurd/alpha/bits/sigcontext.h | 65 +++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 sysdeps/mach/hurd/alpha/bits/sigcontext.h diff --git a/sysdeps/mach/hurd/alpha/bits/sigcontext.h b/sysdeps/mach/hurd/alpha/bits/sigcontext.h new file mode 100644 index 0000000000..32e0c94f98 --- /dev/null +++ b/sysdeps/mach/hurd/alpha/bits/sigcontext.h @@ -0,0 +1,65 @@ +/* Machine-dependent signal context structure for GNU Hurd. Alpha version. +Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Signal handlers are actually called: + void handler (int sig, int code, struct sigcontext *scp); */ + +/* State of this thread when the signal was taken. */ +struct sigcontext + { + /* These first members are machine-independent. */ + + long int sc_onstack; /* Nonzero if running on sigstack. */ + __sigset_t sc_mask; /* Blocked signals to restore. */ + + /* MiG reply port this thread is using. */ + unsigned long int sc_reply_port; + + /* Port this thread is doing an interruptible RPC on. */ + unsigned long int sc_intr_port; + + /* Error code associated with this signal (interpreted as `error_t'). */ + int sc_error; + + /* All following members are machine-dependent. The rest of this + structure is written to be laid out identically to: + { + struct alpha_thread_state basic; + struct alpha_exc_state exc; + struct alpha_float_state fpu; + } + trampoline.c knows this, so it must be changed if this changes. */ + +#define sc_alpha_thread_state sc_regs /* Beginning of correspondence. */ + long int sc_regs[31]; /* General registers $0..$30. */ + long int sc_pc; /* Program counter. */ + + /* struct alpha_exc_state */ +#define sc_alpha_exc_state sc_badvaddr + unsigned long int sc_badvaddr; + unsigned int sc_cause; /* Machine-level trap code. */ +#define SC_CAUSE_SET_SSTEP 1 + int sc_used_fpa; /* Nonzero if FPU was used. */ + + /* struct alpha_float_state + This is only filled in if sc_used_fpa is nonzero. */ +#define sc_alpha_float_state sc_fpregs + double sc_fpregs[31]; /* Floating point registers $f0..$f30. */ + long int sc_fpcsr; /* Floating point control/status register. */ + }; From 436682519cbb992681ce9286401311c2144c046e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:41:59 +0000 Subject: [PATCH 0954/4487] HPPA specific signal context. --- sysdeps/mach/hurd/hppa/bits/sigcontext.h | 86 ++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 sysdeps/mach/hurd/hppa/bits/sigcontext.h diff --git a/sysdeps/mach/hurd/hppa/bits/sigcontext.h b/sysdeps/mach/hurd/hppa/bits/sigcontext.h new file mode 100644 index 0000000000..b616469f21 --- /dev/null +++ b/sysdeps/mach/hurd/hppa/bits/sigcontext.h @@ -0,0 +1,86 @@ +/* Machine-dependent signal context structure for GNU Hurd. HPPA version. +Copyright (C) 1995 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Signal handlers are actually called: + void handler (int sig, int code, struct sigcontext *scp); */ + +/* State of this thread when the signal was taken. */ +struct sigcontext + { + /* These first members are machine-independent. */ + + int sc_onstack; /* Nonzero if running on sigstack. */ + __sigset_t sc_mask; /* Blocked signals to restore. */ + + /* MiG reply port this thread is using. */ + unsigned int sc_reply_port; + + /* Port this thread is doing an interruptible RPC on. */ + unsigned int sc_intr_port; + + /* Error code associated with this signal (interpreted as `error_t'). */ + int sc_error; + + /* All following members are machine-dependent. The rest of this + structure is written to be laid out identically to a `struct + parisc_thread_state'. trampoline.c knows this, so it must be + changed if this changes. */ + +#define sc_parisc_thread_state sc_flags /* Beginning of correspondence. */ + /* "General" registers $1..$31. */ + unsigned int sc_regs[31]; + + /* Control registers. */ + unsigned int sc_cr11; /* sar */ + /* These four registers make up the PC. */ + unsigned int iioq_head; + unsigned int iisq_head; + unsigned int iioq_tail; + unsigned int iisq_tail; + unsigned int sc_cr15; + unsigned int sc_cr19; + unsigned int sc_cr20; + unsigned int sc_cr21; + unsigned int sc_cr22; /* ipsw */ + unsigned int sc_bsd_goto; /* unused */ + unsigned int sc_sr4; + unsigned int sc_sr0; + unsigned int sc_sr1; + unsigned int sc_sr2; + unsigned int sc_sr3; + unsigned int sc_sr5; + unsigned int sc_sr6; + unsigned int sc_sr7; + unsigned int sc_cr0; + unsigned int sc_cr8; + unsigned int sc_cr9; + unsigned int sc_cr10; /* unused */ + unsigned int sc_cr12; + unsigned int sc_cr13; + unsigned int sc_cr24; /* unused */ + unsigned int sc_cr25; /* unused */ + unsigned int sc_cr26; /* unused */ + unsigned sc_mpsfu_high; /* unused */ + unsigned sc_mpsfu_low; /* unused */ + unsigned sc_mpsfu_ovflo; /* unused */ + int sc_pad; + + /* Floating point registers $f0..$f31. */ + double sc_fpregs[32]; + }; From 9aebb73acdd3c1f9034046685e0477dedf0d183d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:42:38 +0000 Subject: [PATCH 0955/4487] ARM error numbers for standalone. --- sysdeps/standalone/arm/bits/errno.h | 52 +++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 sysdeps/standalone/arm/bits/errno.h diff --git a/sysdeps/standalone/arm/bits/errno.h b/sysdeps/standalone/arm/bits/errno.h new file mode 100644 index 0000000000..8090a8074d --- /dev/null +++ b/sysdeps/standalone/arm/bits/errno.h @@ -0,0 +1,52 @@ +/* Copyright (C) 1991, 1994, 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* This file defines the `errno' constants for standalone ARM machines. + These constants are essentially arbitrary. */ + +#if !defined(__Emath_defined) && (defined(_ERRNO_H) || defined(__need_Emath)) +#undef __need_Emath +#define __Emath_defined 1 + +#define EDOM 1 +#define ERANGE 2 +#endif + +#ifdef _ERRNO_H +#define ENOSYS 3 +#define EINVAL 4 +#define ESPIPE 5 +#define EBADF 6 +#define ENOMEM 7 +#define EACCES 8 +#define ENFILE 9 +#define EMFILE 10 +#define ENAMETOOLONG 11 /* File name too long */ +#define ELOOP 12 /* Too many symbolic links encountered */ +#define ENOMSG 13 /* No message of desired type */ +#define E2BIG 14 /* Arg list too long */ +#define EINTR 15 +#define EILSEQ 16 +#define ENOEXEC 17 +#define ENOENT 18 +#define EPROTOTYPE 19 +#define ESRCH 20 +#define EPERM 21 +#endif + +#define __set_errno(val) errno = (val) From a2cee7c01714d59d4562f6d283ffde59c86f8a84 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:42:53 +0000 Subject: [PATCH 0956/4487] stdio limits for standalone. --- sysdeps/standalone/bits/stdio_lim.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 sysdeps/standalone/bits/stdio_lim.h diff --git a/sysdeps/standalone/bits/stdio_lim.h b/sysdeps/standalone/bits/stdio_lim.h new file mode 100644 index 0000000000..5552bc4325 --- /dev/null +++ b/sysdeps/standalone/bits/stdio_lim.h @@ -0,0 +1,27 @@ +/* Copyright (C) 1994 Free Software Foundation, Inc. + Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil, + On-Line Applications Research Corporation. + +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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#define L_tmpnam 1 +#define TMPMAX 0 +#define L_ctermid 1 +#define L_cuserid 1 +#define FOPEN_MAX 16 +#define FILENAME_MAX 14 From 5c7efcee0a1c65f07b84bac3ebebf278a464c1ef Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:44:56 +0000 Subject: [PATCH 0957/4487] OSF/Alpha specific stat struct. --- sysdeps/unix/bsd/osf/alpha/bits/stat.h | 80 ++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 sysdeps/unix/bsd/osf/alpha/bits/stat.h diff --git a/sysdeps/unix/bsd/osf/alpha/bits/stat.h b/sysdeps/unix/bsd/osf/alpha/bits/stat.h new file mode 100644 index 0000000000..752d4eede1 --- /dev/null +++ b/sysdeps/unix/bsd/osf/alpha/bits/stat.h @@ -0,0 +1,80 @@ +/* Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Brendan Kehoe (brendan@zen.org). + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* + * Never include this file directly; use instead. + */ + +#ifndef _BITS_STAT_H +#define _BITS_STAT_H + +#include + +/* Structure describing file characteristics. */ +struct stat + { + int st_dev; /* Device. */ + unsigned int st_ino; /* File serial number. */ + unsigned int st_mode; /* File mode. */ + unsigned short st_nlink; /* Link count. */ + unsigned int st_uid; /* User ID of the file's owner. */ + unsigned int st_gid; /* Group ID of the file's group.*/ + int st_rdev; /* Device number, if device. */ + + long st_size; /* Size of file, in bytes. */ + + int st_atime; /* Time of last access. */ + int st_atime_usec; + int st_mtime; /* Time of last modification. */ + int st_mtime_usec; + int st_ctime; /* Time of last status change. */ + int st_ctime_usec; + + unsigned int st_blksize; /* Optimal block size for I/O. */ +#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ + + int st_blocks; /* Number of 512-byte blocks allocated. */ + unsigned int st_flags; + unsigned int st_gen; + }; + +/* Encoding of the file mode. */ + +#define __S_IFMT 0170000 /* These bits determine file type. */ + +/* File types. */ +#define __S_IFDIR 0040000 /* Directory. */ +#define __S_IFCHR 0020000 /* Character device. */ +#define __S_IFBLK 0060000 /* Block device. */ +#define __S_IFREG 0100000 /* Regular file. */ +#define __S_IFIFO 0010000 /* FIFO. */ + +#define __S_IFLNK 0120000 /* Symbolic link. */ +#define __S_IFSOCK 0140000 /* Socket. */ + +/* Protection bits. */ + +#define __S_ISUID 04000 /* Set user ID on execution. */ +#define __S_ISGID 02000 /* Set group ID on execution. */ +#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ +#define __S_IREAD 0400 /* Read by owner. */ +#define __S_IWRITE 0200 /* Write by owner. */ +#define __S_IEXEC 0100 /* Execute by owner. */ + +#endif /* bits/stat.h */ From 619d7796626ce21ddc759a85d9d8b62ece2ca91b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:45:03 +0000 Subject: [PATCH 0958/4487] OSF specific signal struct. --- sysdeps/unix/bsd/osf/bits/sigaction.h | 46 +++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 sysdeps/unix/bsd/osf/bits/sigaction.h diff --git a/sysdeps/unix/bsd/osf/bits/sigaction.h b/sysdeps/unix/bsd/osf/bits/sigaction.h new file mode 100644 index 0000000000..df400d4aaa --- /dev/null +++ b/sysdeps/unix/bsd/osf/bits/sigaction.h @@ -0,0 +1,46 @@ +/* Structure and constant definitions for sigaction et al. OSF/1 version. + Copyright (C) 1993, 1996 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Brendan Kehoe (brendan@zen.org). + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* Structure describing the action to be taken when a signal arrives. */ +struct sigaction + { + /* Signal handler. */ + __sighandler_t sa_handler; + + /* Additional set of signals to be blocked. */ + __sigset_t sa_mask; + + /* Special flags. */ + int sa_flags; + }; + +/* Bits in `sa_flags'. */ +#ifdef __USE_BSD +#define SA_ONSTACK 0x1 /* Take signal on signal stack. */ +#define SA_RESTART 0x2 /* Don't restart syscall on signal return. */ +#define SA_DISABLE 0x4 /* Disable alternate signal stack. */ +#endif +#define SA_NOCLDSTOP 0x4 /* Don't send SIGCHLD when children stop. */ + + +/* Values for the HOW argument to `sigprocmask'. */ +#define SIG_BLOCK 1 /* Block signals. */ +#define SIG_UNBLOCK 2 /* Unblock signals. */ +#define SIG_SETMASK 3 /* Set the set of blocked signals. */ From 08ed181c50a2cf83838ec7a41aec8fb77a3b638b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:45:26 +0000 Subject: [PATCH 0959/4487] SunOS specific signal numbers. --- sysdeps/unix/bsd/sun/bits/signum.h | 69 ++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 sysdeps/unix/bsd/sun/bits/signum.h diff --git a/sysdeps/unix/bsd/sun/bits/signum.h b/sysdeps/unix/bsd/sun/bits/signum.h new file mode 100644 index 0000000000..a327401d0b --- /dev/null +++ b/sysdeps/unix/bsd/sun/bits/signum.h @@ -0,0 +1,69 @@ +/* Signal number definitions. SunOS version. + Copyright (C) 1994, 1996 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifdef _SIGNAL_H + +/* This file defines the fake signal functions and signal + number constants for SunOS 3 and 4 Unix systems. */ + +/* Fake signal functions. */ +#define SIG_ERR ((__sighandler_t) -1) /* Error return. */ +#define SIG_DFL ((__sighandler_t) 0) /* Default action. */ +#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */ + + +/* Signals. */ +#define SIGHUP 1 /* Hangup (POSIX). */ +#define SIGINT 2 /* Interrupt (ANSI). */ +#define SIGQUIT 3 /* Quit (POSIX). */ +#define SIGILL 4 /* Illegal instruction (ANSI). */ +#define SIGABRT SIGIOT /* Abort (ANSI). */ +#define SIGTRAP 5 /* Trace trap (POSIX). */ +#define SIGIOT 6 /* IOT trap (4.2 BSD). */ +#define SIGEMT 7 /* EMT trap (4.2 BSD). */ +#define SIGFPE 8 /* Floating-point exception (ANSI). */ +#define SIGKILL 9 /* Kill, unblockable (POSIX). */ +#define SIGBUS 10 /* Bus error (4.2 BSD). */ +#define SIGSEGV 11 /* Segmentation violation (ANSI). */ +#define SIGSYS 12 /* Bad argument to system call (4.2 BSD). */ +#define SIGPIPE 13 /* Broken pipe (POSIX). */ +#define SIGALRM 14 /* Alarm clock (POSIX). */ +#define SIGTERM 15 /* Termination (ANSI). */ +#define SIGURG 16 /* Urgent condition on socket (4.2 BSD). */ +#define SIGSTOP 17 /* Stop, unblockable (POSIX). */ +#define SIGTSTP 18 /* Keyboard stop (POSIX). */ +#define SIGCONT 19 /* Continue (POSIX). */ +#define SIGCHLD 20 /* Child status has changed (POSIX). */ +#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */ +#define SIGTTIN 21 /* Background read from tty (POSIX). */ +#define SIGTTOU 22 /* Background write to tty (POSIX). */ +#define SIGIO 23 /* I/O now possible (4.2 BSD). */ +#define SIGPOLL SIGIO /* Same as SIGIO? (SVID). */ +#define SIGXCPU 24 /* CPU limit exceeded (4.2 BSD). */ +#define SIGXFSZ 25 /* File size limit exceeded (4.2 BSD). */ +#define SIGVTALRM 26 /* Virtual alarm clock (4.2 BSD). */ +#define SIGPROF 27 /* Profiling alarm clock (4.2 BSD). */ +#define SIGWINCH 28 /* Window size change (4.3 BSD, Sun). */ +#define SIGLOST 29 /* Resource lost (Sun). */ +#define SIGUSR1 30 /* User-defined signal 1 (POSIX). */ +#define SIGUSR2 31 /* User-defined signal 2 (POSIX). */ + +#endif /* included. */ + +#define _NSIG 32 /* Biggest signal number + 1. */ From 2fbc33a169801eeb43765469e5183f7eb99a7d28 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:45:56 +0000 Subject: [PATCH 0960/4487] SunOS/m68k signal context. --- sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h | 26 +++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h diff --git a/sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h b/sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h new file mode 100644 index 0000000000..471b516bdc --- /dev/null +++ b/sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h @@ -0,0 +1,26 @@ +/* Structure describing state saved while handling a signal. Sun 3 version. +Copyright (C) 1993, 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +struct sigcontext + { + int sc_onstack; + __sigset_t sc_mask; + + int sc_sp, sc_pc, sc_ps; + }; From 94d056b77295c2b4fab431343d8b460b121ecf74 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:46:02 +0000 Subject: [PATCH 0961/4487] SunOS/SPARC signal context. --- sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h | 31 ++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h diff --git a/sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h b/sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h new file mode 100644 index 0000000000..290bf817af --- /dev/null +++ b/sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h @@ -0,0 +1,31 @@ +/* Structure describing state saved while handling a signal. Sparc version. +Copyright (C) 1992, 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +struct sigcontext + { + int sc_onstack; + __sigset_t sc_mask; + +#define SPARC_MAXREGWINDOW 31 /* Maximum usable register windows. */ + int sc_sp, sc_pc, sc_npc, sc_psr, sc_g1, sc_o0; + int sc_wbcnt; /* Number of outstanding windows. */ + __ptr_t sc_spbuf[SPARC_MAXREGWINDOW]; /* SP's for each window. */ + int sc_wbuf[SPARC_MAXREGWINDOW][16]; /* Saved register windows. */ + }; + From c89e913d713f4bdfbf13e9c0812677781c9a0468 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:46:22 +0000 Subject: [PATCH 0962/4487] SunOS specific info header. --- sysdeps/unix/bsd/sun/sunos4/bits/fcntl.h | 142 +++++++++++++ sysdeps/unix/bsd/sun/sunos4/bits/resource.h | 139 +++++++++++++ sysdeps/unix/bsd/sun/sunos4/bits/termios.h | 208 ++++++++++++++++++++ sysdeps/unix/bsd/sun/sunos4/bits/utsname.h | 2 + 4 files changed, 491 insertions(+) create mode 100644 sysdeps/unix/bsd/sun/sunos4/bits/fcntl.h create mode 100644 sysdeps/unix/bsd/sun/sunos4/bits/resource.h create mode 100644 sysdeps/unix/bsd/sun/sunos4/bits/termios.h create mode 100644 sysdeps/unix/bsd/sun/sunos4/bits/utsname.h diff --git a/sysdeps/unix/bsd/sun/sunos4/bits/fcntl.h b/sysdeps/unix/bsd/sun/sunos4/bits/fcntl.h new file mode 100644 index 0000000000..b74c80e170 --- /dev/null +++ b/sysdeps/unix/bsd/sun/sunos4/bits/fcntl.h @@ -0,0 +1,142 @@ +/* O_*, F_*, FD_* bit values for SunOS 4. + Copyright (C) 1991, 1992, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _FCNTL_H +#error "Never use directly; include instead." +#endif + + +/* File access modes for `open' and `fcntl'. */ +#define O_RDONLY 0 /* Open read-only. */ +#define O_WRONLY 1 /* Open write-only. */ +#define O_RDWR 2 /* Open read/write. */ + + +/* Bits OR'd into the second argument to open. */ +#define O_CREAT 0x0200 /* Create file if it doesn't exist. */ +#define O_EXCL 0x0800 /* Fail if file already exists. */ +#define O_TRUNC 0x0400 /* Truncate file to zero length. */ +#define O_NOCTTY 0x8000 /* Don't assign a controlling terminal. */ +#if defined __USE_BSD || defined __USE_SVID +#define O_ASYNC 0x0040 /* Send SIGIO to owner when data is ready. */ +#define O_FSYNC 0x2000 /* Synchronous writes. */ +#define O_SYNC O_FSYNC +#endif + +/* File status flags for `open' and `fcntl'. */ +#define O_APPEND 0x0008 /* Writes append to the file. */ +#define O_NONBLOCK 0x4000 /* Non-blocking I/O. */ + +/* Sun defines O_NDELAY one way for BSD behavior and another for System V + behavior. In the GNU C library, you get the BSD behavior unless you + define _USG_SOURCE without also defining _BSD_SOURCE or _GNU_SOURCE. */ +#ifdef __USE_BSD +#define O_NDELAY 0x0004 +#endif +#if !defined (O_NDELAY) && defined (__USE_SVID) +#define O_NDELAY 0x1000 +#endif + +#ifdef __USE_BSD +/* Bits in the file status flags returned by F_GETFL. + These are all the O_* flags, plus FREAD and FWRITE, which are + independent bits set by which of O_RDONLY, O_WRONLY, and O_RDWR, was + given to `open'. */ +#define FREAD 1 +#define FWRITE 2 + +/* Traditional Unix names the O_* bits. */ +#define FASYNC O_ASYNC +#define FCREAT O_CREAT +#define FEXCL O_EXCL +#define FTRUNC O_TRUNC +#define FNOCTTY O_NOCTTY +#define FFSYNC O_FSYNC +#define FSYNC O_SYNC +#define FAPPEND O_APPEND +#define FNONBLOCK O_NONBLOCK +#define FNONBIO O_NONBLOCK +#define FNDELAY 0x0004 /* BSD O_NDELAY. */ +#define FNBIO 0x1000 /* System V O_NDELAY. */ +#endif + +/* Mask for file access modes. This is system-dependent in case + some system ever wants to define some other flavor of access. */ +#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR) + +/* Values for the second argument to `fcntl'. */ +#define F_DUPFD 0 /* Duplicate file descriptor. */ +#define F_GETFD 1 /* Get file descriptor flags. */ +#define F_SETFD 2 /* Set file descriptor flags. */ +#define F_GETFL 3 /* Get file status flags. */ +#define F_SETFL 4 /* Set file status flags. */ +#ifdef __USE_BSD +#define F_GETOWN 5 /* Get owner (receiver of SIGIO). */ +#define F_SETOWN 6 /* Set owner (receiver of SIGIO). */ +#endif +#define F_GETLK 7 /* Get record locking info. */ +#define F_SETLK 8 /* Set record locking info (non-blocking). */ +#define F_SETLKW 9 /* Set record locking info (blocking). */ +#ifdef __USE_BSD +#define F_RGETLK 10 /* Get remote record locking info. */ +#define F_RSETLK 11 /* Set remote locking info (non-blocking). */ +#define F_CNVT 12 /* Convert a fhandle to an open fd. */ +#define F_RSETLKW 13 /* Set remote locking info (blocking). */ +#endif + +/* File descriptor flags used with F_GETFD and F_SETFD. */ +#define FD_CLOEXEC 1 /* Close on exec. */ + + +#include + +/* The structure describing an advisory lock. This is the type of the third + argument to `fcntl' for the F_GETLK, F_SETLK, and F_SETLKW requests. */ +struct flock + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ + __off_t l_start; /* Offset where the lock begins. */ + __off_t l_len; /* Size of the locked area; zero means until EOF. */ + short int l_pid; /* Process holding the lock. */ + short int l_xxx; /* Reserved for future use. */ + }; + +#ifdef __USE_BSD +/* The structure describing a remote advisory lock. This is the type of the + third arg to `fcntl' for the F_RGETLK, F_RSETLK, and F_RSETLKW requests. */ +struct eflock + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ + __off_t l_start; /* Offset where the lock begins. */ + __off_t l_len; /* Size of the locked area; zero means until EOF. */ + short int l_pid; /* Process holding the lock. */ + short int l_xxx; /* Reserved for future use. */ + long int l_rpid; /* Remote process ID wanting this lock. */ + long int l_rsys; /* Remote system ID wanting this lock. */ + }; + +#endif + + +/* Values for the `l_type' field of a `struct flock'. */ +#define F_RDLCK 1 /* Read lock. */ +#define F_WRLCK 2 /* Write lock. */ +#define F_UNLCK 3 /* Remove lock. */ diff --git a/sysdeps/unix/bsd/sun/sunos4/bits/resource.h b/sysdeps/unix/bsd/sun/sunos4/bits/resource.h new file mode 100644 index 0000000000..ff55773e69 --- /dev/null +++ b/sysdeps/unix/bsd/sun/sunos4/bits/resource.h @@ -0,0 +1,139 @@ +/* Bit values for resource limits. SunOS 4 version. + Copyright (C) 1994, 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* These are the values for 4.4 BSD and GNU. Earlier BSD systems have a + subset of these kinds of resource limit. In systems where `getrlimit' + and `setrlimit' are not system calls, these are the values used by the C + library to emulate them. */ + +/* Kinds of resource limit. */ +enum __rlimit_resource + { + /* Per-process CPU limit, in seconds. */ + RLIMIT_CPU, +#define RLIMIT_CPU RLIMIT_CPU + /* Largest file that can be created, in bytes. */ + RLIMIT_FSIZE, +#define RLIMIT_FSIZE RLIMIT_FSIZE + /* Maximum size of data segment, in bytes. */ + RLIMIT_DATA, +#define RLIMIT_DATA RLIMIT_DATA + /* Maximum size of stack segment, in bytes. */ + RLIMIT_STACK, +#define RLIMIT_STACK RLIMIT_STACK + /* Largest core file that can be created, in bytes. */ + RLIMIT_CORE, +#define RLIMIT_CORE RLIMIT_CORE + /* Largest resident set size, in bytes. + This affects swapping; processes that are exceeding their + resident set size will be more likely to have physical memory + taken from them. */ + RLIMIT_RSS, +#define RLIMIT_RSS RLIMIT_RSS + /* Number of open files. */ + RLIMIT_NOFILE, + RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */ +#define RLIMIT_NOFILE RLIMIT_NOFILE +#define RLIMIT_OFILE RLIMIT_OFILE + + RLIM_NLIMITS, + + RLIM_INFINITY = 0x7fffffff /* Value to indicate that there is no limit. */ +#define RLIM_INFINITY RLIM_INFINITY + }; + +struct rlimit + { + /* The current (soft) limit. */ + int rlim_cur; + /* The hard limit. */ + int rlim_max; + }; + +/* Whose usage statistics do you want? */ +enum __rusage_who +/* The macro definitions are necessary because some programs want + to test for operating system features with #ifdef RUSAGE_SELF. + In ISO C the reflexive definition is a no-op. */ + { + /* The calling process. */ + RUSAGE_SELF = 0, +#define RUSAGE_SELF RUSAGE_SELF + /* All of its terminated child processes. */ + RUSAGE_CHILDREN = -1 +#define RUSAGE_CHILDREN RUSAGE_CHILDREN + }; + +#include /* For `struct timeval'. */ + +/* Structure which says how much of each resource has been used. */ +struct rusage + { + /* Total amount of user time used. */ + struct timeval ru_utime; + /* Total amount of system time used. */ + struct timeval ru_stime; + /* Maximum resident set size (in kilobytes). */ + long int ru_maxrss; + /* Amount of sharing of text segment memory + with other processes (kilobyte-seconds). */ + long int ru_ixrss; + /* Amount of data segment memory used (kilobyte-seconds). */ + long int ru_idrss; + /* Amount of stack memory used (kilobyte-seconds). */ + long int ru_isrss; + /* Number of soft page faults (i.e. those serviced by reclaiming + a page from the list of pages awaiting reallocation. */ + long int ru_minflt; + /* Number of hard page faults (i.e. those that required I/O). */ + long int ru_majflt; + /* Number of times a process was swapped out of physical memory. */ + long int ru_nswap; + /* Number of input operations via the file system. Note: This + and `ru_oublock' do not include operations with the cache. */ + long int ru_inblock; + /* Number of output operations via the file system. */ + long int ru_oublock; + /* Number of IPC messages sent. */ + long int ru_msgsnd; + /* Number of IPC messages received. */ + long int ru_msgrcv; + /* Number of signals delivered. */ + long int ru_nsignals; + /* Number of voluntary context switches, i.e. because the process + gave up the process before it had to (usually to wait for some + resource to be available). */ + long int ru_nvcsw; + /* Number of involuntary context switches, i.e. a higher priority process + became runnable or the current process used up its time slice. */ + long int ru_nivcsw; + }; + +/* Priority limits. */ +#define PRIO_MIN -20 /* Minimum priority a process can have. */ +#define PRIO_MAX 20 /* Maximum priority a process can have. */ + +/* The type of the WHICH argument to `getpriority' and `setpriority', + indicating what flavor of entity the WHO argument specifies. */ +enum __priority_which + { + PRIO_PROCESS = 0, /* WHO is a process ID. */ + PRIO_PGRP = 1, /* WHO is a process group ID. */ + PRIO_USER = 2 /* WHO is a user ID. */ + }; diff --git a/sysdeps/unix/bsd/sun/sunos4/bits/termios.h b/sysdeps/unix/bsd/sun/sunos4/bits/termios.h new file mode 100644 index 0000000000..dc0a007208 --- /dev/null +++ b/sysdeps/unix/bsd/sun/sunos4/bits/termios.h @@ -0,0 +1,208 @@ +/* termios type and macro definitions. SunOS 4 version. + Copyright (C) 1993, 1994, 1996 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* Type of terminal control flag masks. */ +typedef unsigned long int tcflag_t; + +/* Type of control characters. */ +typedef unsigned char cc_t; + +/* Type of baud rate specifiers. */ +typedef unsigned int speed_t; + +/* Terminal control structure. */ +struct termios +{ + /* Input modes. */ + tcflag_t c_iflag; +#define IGNBRK 0x0001 /* Ignore break condition. */ +#define BRKINT 0x0002 /* Signal interrupt on break. */ +#define IGNPAR 0x0004 /* Ignore characters with parity errors. */ +#define PARMRK 0x0008 /* Mark parity and framing errors. */ +#define INPCK 0x0010 /* Enable input parity check. */ +#define ISTRIP 0x0020 /* Strip 8th bit off characters. */ +#define INLCR 0x0040 /* Map NL to CR on input. */ +#define IGNCR 0x0080 /* Ignore CR. */ +#define ICRNL 0x0100 /* Map CR to NL on input. */ +#ifdef __USE_BSD +#define IUCLC 0x0200 /* Map upper case to lower case on input. */ +#endif +#define IXON 0x0400 /* Enable start/stop output control. */ +#define IXOFF 0x1000 /* Enable start/stop input control. */ +#ifdef __USE_BSD +#define IXANY 0x0800 /* Any character will restart after stop. */ +#define IMAXBEL 0x2000 /* Ring bell when input queue is full. */ +#endif + + /* Output modes. */ + tcflag_t c_oflag; +#define OPOST 0x0001 /* Perform output processing. */ +#ifdef __USE_BSD +#define OLCUC 0x00000002 /* Map lower case to upper case on output. */ +#define ONLCR 0x00000004 /* Map NL to CR-NL on output. */ +#define OCRNL 0x00000008 +#define ONOCR 0x00000010 +#define ONLRET 0x00000020 +#define OFILL 0x00000040 +#define OFDEL 0x00000080 +#define NLDLY 0x00000100 +#define NL0 0 +#define NL1 0x00000100 +#define CRDLY 0x00000600 +#define CR0 0 +#define CR1 0x00000200 +#define CR2 0x00000400 +#define CR3 0x00000600 +#define TABDLY 0x00001800 +#define TAB0 0 +#define TAB1 0x00000800 +#define TAB2 0x00001000 +#define XTABS 0x00001800 +#define TAB3 XTABS +#define BSDLY 0x00002000 +#define BS0 0 +#define BS1 0x00002000 +#define VTDLY 0x00004000 +#define VT0 0 +#define VT1 0x00004000 +#define FFDLY 0x00008000 +#define FF0 0 +#define FF1 0x00008000 +#define PAGEOUT 0x00010000 +#define WRAP 0x00020000 +#endif + + /* Control modes. */ + tcflag_t c_cflag; +#define CSIZE (CS5|CS6|CS7|CS8) /* Number of bits per byte (mask). */ +#define CS5 0 /* 5 bits per byte. */ +#define CS6 0x00000010 /* 6 bits per byte. */ +#define CS7 0x00000020 /* 7 bits per byte. */ +#define CS8 0x00000030 /* 8 bits per byte. */ +#define CSTOPB 0x00000040 /* Two stop bits instead of one. */ +#define CREAD 0x00000080 /* Enable receiver. */ +#define PARENB 0x00000100 /* Parity enable. */ +#define PARODD 0x00000200 /* Odd parity instead of even. */ +#define HUPCL 0x00000400 /* Hang up on last close. */ +#define CLOCAL 0x00000800 /* Ignore modem status lines. */ +#ifdef __USE_BSD +#define LOBLK 0x00001000 +#define CRTSCTS 0x80000000 +#define CIBAUD 0x000f0000 /* Mask for input speed from c_cflag. */ +#define CBAUD 0x0000000f /* Mask for output speed from c_cflag. */ +#define IBSHIFT 16 /* Bits to shift for input speed. */ +#endif + + /* Input and output baud rates. These are encoded in c_cflag. */ +#define B0 0 +#define B50 1 +#define B75 2 +#define B110 3 +#define B134 4 +#define B150 5 +#define B200 6 +#define B300 7 +#define B600 8 +#define B1200 9 +#define B1800 10 +#define B2400 11 +#define B4800 12 +#define B9600 13 +#define B19200 14 +#define B38400 15 +#ifdef __USE_BSD +#define EXTA 14 +#define EXTB 15 +#endif + + /* Local modes. */ + tcflag_t c_lflag; +#ifdef __USE_BSD +#define ECHOKE 0x00000800 /* Visual erase for KILL. */ +#endif +#define ECHOE 0x00000010 /* Visual erase for ERASE. */ +#define ECHOK 0x00000020 /* Echo NL after KILL. */ +#define ECHO 0x00000008 /* Enable echo. */ +#define ECHONL 0x00000040 /* Echo NL even if ECHO is off. */ +#ifdef __USE_BSD +#define ECHOPRT 0x00000400 /* Hardcopy visual erase. */ +#define ECHOCTL 0x00000200 /* Echo control characters as ^X. */ +#endif +#define ISIG 0x00000001 /* Enable signals. */ +#define ICANON 0x00000002 /* Do erase and kill processing. */ +#define IEXTEN 0x00008000 /* Enable DISCARD and LNEXT. */ +#define TOSTOP 0x00000100 /* Send SIGTTOU for background output. */ +#ifdef __USE_BSD +#define PENDIN 0x00004000 /* Retype pending input (state). */ +#endif +#define NOFLSH 0x00000080 /* Disable flush after interrupt. */ + + char c_line; /* Line discipline (?) */ + + /* Control characters. */ +#define VEOF 4 /* End-of-file character [ICANON]. */ +#define VEOL 5 /* End-of-line character [ICANON]. */ +#ifdef __USE_BSD +#define VEOL2 6 /* Second EOL character [ICANON]. */ +#define VSWTCH 7 /* ??? */ +#endif +#define VERASE 2 /* Erase character [ICANON]. */ +#ifdef __USE_BSD +#define VWERASE 14 /* Word-erase character [ICANON]. */ +#endif +#define VKILL 3 /* Kill-line character [ICANON]. */ +#ifdef __USE_BSD +#define VREPRINT 12 /* Reprint-line character [ICANON]. */ +#endif +#define VINTR 0 /* Interrupt character [ISIG]. */ +#define VQUIT 1 /* Quit character [ISIG]. */ +#define VSUSP 10 /* Suspend character [ISIG]. */ +#ifdef __USE_BSD +#define VDSUSP 11 /* Delayed suspend character [ISIG]. */ +#endif +#define VSTART 8 /* Start (X-ON) character [IXON, IXOFF]. */ +#define VSTOP 9 /* Stop (X-OFF) character [IXON, IXOFF]. */ +#ifdef __USE_BSD +#define VLNEXT 15 /* Literal-next character [IEXTEN]. */ +#define VDISCARD 13 /* Discard character [IEXTEN]. */ +#endif +#define VMIN VEOF /* Minimum number of bytes read at once [!ICANON]. */ +#define VTIME VEOL /* Time-out value (tenths of a second) [!ICANON]. */ +#define NCCS 17 + cc_t c_cc[NCCS]; +}; + +#define _IOT_termios /* Hurd ioctl type field. */ \ + _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2) + +/* Values for the OPTIONAL_ACTIONS argument to `tcsetattr'. */ +#define TCSANOW 0 /* Change immediately. */ +#define TCSADRAIN 1 /* Change when pending output is written. */ +#define TCSAFLUSH 2 /* Flush pending input before changing. */ + +/* Values for the QUEUE_SELECTOR argument to `tcflush'. */ +#define TCIFLUSH 0 /* Discard data received but not yet read. */ +#define TCOFLUSH 1 /* Discard data written but not yet sent. */ +#define TCIOFLUSH 2 /* Discard all pending data. */ + +/* Values for the ACTION argument to `tcflow'. */ +#define TCOOFF 0 /* Suspend output. */ +#define TCOON 1 /* Restart suspended output. */ +#define TCIOFF 2 /* Send a STOP character. */ +#define TCION 3 /* Send a START character. */ diff --git a/sysdeps/unix/bsd/sun/sunos4/bits/utsname.h b/sysdeps/unix/bsd/sun/sunos4/bits/utsname.h new file mode 100644 index 0000000000..e9111b6504 --- /dev/null +++ b/sysdeps/unix/bsd/sun/sunos4/bits/utsname.h @@ -0,0 +1,2 @@ +#define _UTSNAME_LENGTH 9 +#define _UTSNAME_NODENAME_LENGTH 65 From da366793e17337c0e6f9ff0cf13299700152697a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:46:36 +0000 Subject: [PATCH 0963/4487] Use bits/foo.h. --- sysdeps/unix/bsd/sun/m68k/sethostid.S | 2 +- sysdeps/unix/bsd/sun/sparc/sethostid.S | 4 ++-- sysdeps/unix/bsd/sun/sunos4/sys/mman.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/bsd/sun/m68k/sethostid.S b/sysdeps/unix/bsd/sun/m68k/sethostid.S index 8b30f3fe65..ab76d75f7b 100644 --- a/sysdeps/unix/bsd/sun/m68k/sethostid.S +++ b/sysdeps/unix/bsd/sun/m68k/sethostid.S @@ -25,7 +25,7 @@ SYSCALL (sethostid, 1) #else -#include +#include .globl _sethostid .even diff --git a/sysdeps/unix/bsd/sun/sparc/sethostid.S b/sysdeps/unix/bsd/sun/sparc/sethostid.S index fbafba5277..f8ee805c75 100644 --- a/sysdeps/unix/bsd/sun/sparc/sethostid.S +++ b/sysdeps/unix/bsd/sun/sparc/sethostid.S @@ -25,9 +25,9 @@ SYSCALL (sethostid, 1) #else -/* only defines E* #ifdef _ERRNO_H. */ +/* only defines E* #ifdef _ERRNO_H. */ #define _ERRNO_H -#include +#include ENTRY (sethostid) mov ENOSYS, %o0 diff --git a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h index fb38c34d90..65771a2aac 100644 --- a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h +++ b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h @@ -22,7 +22,7 @@ #define _SYS_MMAN_H 1 #include -#include +#include #define __need_size_t #include From 0d08481430db1aaddde5b349f6b7f03116f82334 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:46:56 +0000 Subject: [PATCH 0964/4487] Ultrix specific info header. --- sysdeps/unix/bsd/ultrix4/bits/fcntl.h | 122 ++++++++++++++++++++++ sysdeps/unix/bsd/ultrix4/bits/posix_opt.h | 23 ++++ sysdeps/unix/bsd/ultrix4/bits/utsname.h | 1 + 3 files changed, 146 insertions(+) create mode 100644 sysdeps/unix/bsd/ultrix4/bits/fcntl.h create mode 100644 sysdeps/unix/bsd/ultrix4/bits/posix_opt.h create mode 100644 sysdeps/unix/bsd/ultrix4/bits/utsname.h diff --git a/sysdeps/unix/bsd/ultrix4/bits/fcntl.h b/sysdeps/unix/bsd/ultrix4/bits/fcntl.h new file mode 100644 index 0000000000..1398b811ce --- /dev/null +++ b/sysdeps/unix/bsd/ultrix4/bits/fcntl.h @@ -0,0 +1,122 @@ +/* O_*, F_*, FD_* bit values for Ultrix 4. + Copyright (C) 1991, 1992, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _FCNTL_H +#error "Never use directly; include instead." +#endif + + +/* File access modes for `open' and `fcntl'. */ +#define O_RDONLY 0 /* Open read-only. */ +#define O_WRONLY 1 /* Open write-only. */ +#define O_RDWR 2 /* Open read/write. */ + + +/* Bits OR'd into the second argument to open. */ +#define O_CREAT 0x0200 /* Create file if it doesn't exist. */ +#define O_EXCL 0x0800 /* Fail if file already exists. */ +#define O_TRUNC 0x0400 /* Truncate file to zero length. */ +#ifdef __USE_MISC +#define O_ASYNC 0x0040 /* Send SIGIO to owner when data is ready. */ +#define O_FSYNC 0x8000 /* Synchronous writes. */ +#define O_SYNC O_FSYNC +#define O_BLKINUSE 0x1000 /* Block if "in use". */ +#define O_BLKANDSET 0x3000 /* Block, test and set "in use" flag. */ +#define O_TERMIO 0x40000 /* "termio style program". */ +#endif +#define O_NOCTTY 0x80000 /* Don't assign a controlling terminal. */ + +/* File status flags for `open' and `fcntl'. */ +#define O_APPEND 0x0008 /* Writes append to the file. */ +#define O_NONBLOCK 0x20000 /* Non-blocking I/O. */ + +#ifdef __USE_BSD +#define O_NDELAY 0x0004 +#endif + +#ifdef __USE_BSD +/* Bits in the file status flags returned by F_GETFL. + These are all the O_* flags, plus FREAD and FWRITE, which are + independent bits set by which of O_RDONLY, O_WRONLY, and O_RDWR, was + given to `open'. */ +#define FREAD 1 +#define FWRITE 2 + +/* Traditional BSD names the O_* bits. */ +#define FASYNC O_ASYNC +#define FCREAT O_CREAT +#define FEXCL O_EXCL +#define FTRUNC O_TRUNC +#define FNOCTTY O_NOCTTY +#define FFSYNC O_FSYNC +#define FSYNC O_SYNC +#define FAPPEND O_APPEND +#define FNONBLOCK O_NONBLOCK +#define FNDELAY O_NDELAY +#define FNBLOCK O_NONBLOCK +#define FTERMIO O_TERMIO +#define FNOCTTY O_NOCTTY +#define FSYNCRON O_FSYNC +#define FBLKINUSE O_BLKINUSE +#define FBLKANDSET O_BLKANDSET +#endif + +/* Mask for file access modes. This is system-dependent in case + some system ever wants to define some other flavor of access. */ +#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR) + +/* Values for the second argument to `fcntl'. */ +#define F_DUPFD 0 /* Duplicate file descriptor. */ +#define F_GETFD 1 /* Get file descriptor flags. */ +#define F_SETFD 2 /* Set file descriptor flags. */ +#define F_GETFL 3 /* Get file status flags. */ +#define F_SETFL 4 /* Set file status flags. */ +#ifdef __USE_BSD +#define F_GETOWN 5 /* Get owner (receiver of SIGIO). */ +#define F_SETOWN 6 /* Set owner (receiver of SIGIO). */ +#endif +#define F_GETLK 7 /* Get record locking info. */ +#define F_SETLK 8 /* Set record locking info (non-blocking). */ +#define F_SETLKW 9 /* Set record locking info (blocking). */ +#ifdef __USE_MISC +#define F_SETSYN 10 /* Set synchronous writing. */ +#define F_CLRSYN 10 /* Clear synchronous writing. */ +#endif + +/* File descriptor flags used with F_GETFD and F_SETFD. */ +#define FD_CLOEXEC 1 /* Close on exec. */ + + +#include + +/* The structure describing an advisory lock. This is the type of the third + argument to `fcntl' for the F_GETLK, F_SETLK, and F_SETLKW requests. */ +struct flock + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ + __off_t l_start; /* Offset where the lock begins. */ + __off_t l_len; /* Size of the locked area; zero means until EOF. */ + __pid_t l_pid; /* Process holding the lock. */ + }; + +/* Values for the `l_type' field of a `struct flock'. */ +#define F_RDLCK 1 /* Read lock. */ +#define F_WRLCK 2 /* Write lock. */ +#define F_UNLCK 3 /* Remove lock. */ diff --git a/sysdeps/unix/bsd/ultrix4/bits/posix_opt.h b/sysdeps/unix/bsd/ultrix4/bits/posix_opt.h new file mode 100644 index 0000000000..ecd04d1f0e --- /dev/null +++ b/sysdeps/unix/bsd/ultrix4/bits/posix_opt.h @@ -0,0 +1,23 @@ +/* Copyright (C) 1992 Free Software Foundation, Inc. + Contributed by Ian Lance Taylor (ian@airs.com). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#define _POSIX_JOB_CONTROL 1 +#define _POSIX_SAVED_IDS 1 +#define _POSIX_CHOWN_RESTRICTED 1 +#define _POSIX_NO_TRUNC 1 +#define _POSIX_VDISABLE ((unsigned char) -1) diff --git a/sysdeps/unix/bsd/ultrix4/bits/utsname.h b/sysdeps/unix/bsd/ultrix4/bits/utsname.h new file mode 100644 index 0000000000..ad4389ab02 --- /dev/null +++ b/sysdeps/unix/bsd/ultrix4/bits/utsname.h @@ -0,0 +1 @@ +#define _UTSNAME_LENGTH 32 From f7b32a330ab02e6b44516eb629ac72d4250a63c6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:47:13 +0000 Subject: [PATCH 0965/4487] Ultrix/MIPS specific signal context. --- .../unix/bsd/ultrix4/mips/bits/sigcontext.h | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 sysdeps/unix/bsd/ultrix4/mips/bits/sigcontext.h diff --git a/sysdeps/unix/bsd/ultrix4/mips/bits/sigcontext.h b/sysdeps/unix/bsd/ultrix4/mips/bits/sigcontext.h new file mode 100644 index 0000000000..4bddcf2f4b --- /dev/null +++ b/sysdeps/unix/bsd/ultrix4/mips/bits/sigcontext.h @@ -0,0 +1,60 @@ +/* Copyright (C) 1992, 1994 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Note that ANY change to this instantly implies a change to __handler.S. */ + +struct sigcontext + { + /* Nonzero if running on signal stack. */ + int sc_onstack; + + /* Signal mask to restore. */ + __sigset_t sc_mask; + + /* Program counter when the signal hit. */ + __ptr_t sc_pc; + + /* Registers 0 through 31. */ + int sc_regs[32]; + + /* mul/div low and hi; these aren't part of a jmp_buf, but are part of the + sigcontext and are referenced from the signal trampoline code. */ + int sc_mdlo; + int sc_mdhi; + + /* Flag to see if the FP's been used. */ + int sc_ownedfp; + + /* Floating point registers 0 to 31. */ + int sc_fpregs[32]; + /* Control & status register for FP. */ + int sc_fpc_csr; + + /* Exception instruction register for FP. */ + int sc_fpc_eir; + + /* The coprocessor's cause register. */ + int sc_cause; + + /* CPU bad virtual address. */ + __ptr_t sc_badvaddr; + + /* CPU board bad physical address. */ + __ptr_t sc_badpaddr; + }; + From e58babee4e4b7e25bdbca5c5eb3f0aa9f25626a9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:48:21 +0000 Subject: [PATCH 0966/4487] Irix4 specific info header. --- sysdeps/unix/sysv/irix4/bits/confname.h | 80 ++++++++++++++++++ sysdeps/unix/sysv/irix4/bits/fcntl.h | 107 ++++++++++++++++++++++++ sysdeps/unix/sysv/irix4/bits/signum.h | 68 +++++++++++++++ sysdeps/unix/sysv/irix4/bits/stat.h | 65 ++++++++++++++ 4 files changed, 320 insertions(+) create mode 100644 sysdeps/unix/sysv/irix4/bits/confname.h create mode 100644 sysdeps/unix/sysv/irix4/bits/fcntl.h create mode 100644 sysdeps/unix/sysv/irix4/bits/signum.h create mode 100644 sysdeps/unix/sysv/irix4/bits/stat.h diff --git a/sysdeps/unix/sysv/irix4/bits/confname.h b/sysdeps/unix/sysv/irix4/bits/confname.h new file mode 100644 index 0000000000..49d2f9c989 --- /dev/null +++ b/sysdeps/unix/sysv/irix4/bits/confname.h @@ -0,0 +1,80 @@ +/* `sysconf', `pathconf', and `confstr' NAME values. Irix 4 version. +Copyright (C) 1994 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Values for the NAME argument to `pathconf' and `fpathconf'. */ +enum + { + _PC_LINK_MAX = 1, + _PC_MAX_CANON, + _PC_MAX_INPUT, + _PC_NAME_MAX, + _PC_PATH_MAX, + _PC_PIPE_BUF, + _PC_CHOWN_RESTRICTED, + _PC_NO_TRUNC, + _PC_VDISABLE + }; + +/* Values for the argument to `sysconf'. */ +enum + { + _SC_ARG_MAX = 1, + _SC_CHILD_MAX, + _SC_CLK_TCK, + _SC_NGROUPS_MAX, + _SC_OPEN_MAX, + _SC_JOB_CONTROL, + _SC_SAVED_IDS, + _SC_VERSION, + + /* Above are done by the Irix system call. + The rest are done by the C library (or are not really implemented). */ + + _SC_STREAM_MAX, + _SC_TZNAME_MAX, + _SC_PAGESIZE, + + /* Values for the argument to `sysconf' + corresponding to _POSIX2_* symbols. */ + _SC_BC_BASE_MAX, + _SC_BC_DIM_MAX, + _SC_BC_SCALE_MAX, + _SC_BC_STRING_MAX, + _SC_COLL_WEIGHTS_MAX, + _SC_EQUIV_CLASS_MAX, + _SC_EXPR_NEST_MAX, + _SC_LINE_MAX, + _SC_RE_DUP_MAX, + + _SC_2_VERSION, + _SC_2_C_BIND, + _SC_2_C_DEV, + _SC_2_FORT_DEV, + _SC_2_FORT_RUN, + _SC_2_SW_DEV, + _SC_2_LOCALEDEF + }; + +#ifdef __USE_POSIX2 +/* Values for the NAME argument to `confstr'. */ +enum + { + _CS_PATH /* The default search path. */ + }; +#endif diff --git a/sysdeps/unix/sysv/irix4/bits/fcntl.h b/sysdeps/unix/sysv/irix4/bits/fcntl.h new file mode 100644 index 0000000000..a926d049ec --- /dev/null +++ b/sysdeps/unix/sysv/irix4/bits/fcntl.h @@ -0,0 +1,107 @@ +/* O_*, F_*, FD_* bit values for SGI Irix 4. + Copyright (C) 1994, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _FCNTL_H +#error "Never use directly; include instead." +#endif + + +/* File access modes for `open' and `fcntl'. */ +#define O_RDONLY 0 /* Open read-only. */ +#define O_WRONLY 1 /* Open write-only. */ +#define O_RDWR 2 /* Open read/write. */ + + +/* Bits OR'd into the second argument to open. */ +#define O_CREAT 00400 /* Create file if it doesn't exist. */ +#define O_EXCL 02000 /* Fail if file already exists. */ +#define O_TRUNC 01000 /* Truncate file to zero length. */ +#ifdef __USE_MISC +#define O_SYNC 00020 /* Synchronous writes. */ +#define O_FSYNC O_SYNC +#define O_ASYNC 00100 /* Send SIGIO to owner when data is ready. */ +#endif + +/* File status flags for `open' and `fcntl'. */ +#define O_APPEND 000010 /* Writes append to the file. */ +#ifdef __USE_BSD +#define O_NDELAY 000004 /* Non-blocking I/O. */ +#endif +#define O_NONBLOCK 000200 /* POSIX.1 non-blocking I/O. */ + +/* Mask for file access modes. This is system-dependent in case + some system ever wants to define some other flavor of access. */ +#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR) + +/* Values for the second argument to `fcntl'. */ +#define F_DUPFD 0 /* Duplicate file descriptor. */ +#define F_GETFD 1 /* Get file descriptor flags. */ +#define F_SETFD 2 /* Set file descriptor flags. */ +#define F_GETFL 3 /* Get file status flags. */ +#define F_SETFL 4 /* Set file status flags. */ +#define F_GETLK 5 /* Get record locking info. */ +#define F_SETLK 6 /* Set record locking info. */ +#define F_SETLKW 7 /* Set record locking info, wait. */ +#ifdef __USE_MISC +#define F_CHKFL 8 /* Check legality of file flag changes. */ +#define F_ALLOCSP 10 +#define F_FREESP 11 +#define F_SETBSDLK 12 /* Set Berkeley record lock. */ +#define F_SETBSDLKW 13 /* Set Berkeley record lock and wait. */ +#define F_RGETLK 20 /* Get info on a remote lock. */ +#define F_RSETLK 21 /* Set or unlock a remote lock. */ +#define F_RSETLKW 22 /* Set or unlock a remote lock and wait. */ +#define F_GETOWN 10 /* Get owner; only works on sockets. */ +#define F_SETOWN 11 /* Set owner; only works on sockets. */ +#endif + + +/* File descriptor flags used with F_GETFD and F_SETFD. */ +#define FD_CLOEXEC 1 /* Close on exec. */ + + +#include + +/* The structure describing an advisory lock. This is the type of the third + argument to `fcntl' for the F_GETLK, F_SETLK, and F_SETLKW requests. */ +struct flock + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ + __off_t l_start; /* Offset where the lock begins. */ + __off_t l_len; /* Size of the locked area; zero means until EOF. */ + short int l_sysid; /* System ID where locking process resides. */ + short int l_pid; /* Process holding the lock. */ + }; + +/* Values for the `l_type' field of a `struct flock'. */ +#define F_RDLCK 1 /* Read lock. */ +#define F_WRLCK 2 /* Write lock. */ +#define F_UNLCK 3 /* Remove lock. */ + + +/* Define some more compatibility macros to be backward compatible with + BSD systems which did not managed to hide these kernel macros. */ +#ifdef __USE_BSD +#define FAPPEND O_APPEND +#define FFSYNC O_FSYNC +#define FASYNC O_ASYNC +#define FNONBLOCK O_NONBLOCK +#define FNDELAY O_NDELAY +#endif /* Use BSD. */ diff --git a/sysdeps/unix/sysv/irix4/bits/signum.h b/sysdeps/unix/sysv/irix4/bits/signum.h new file mode 100644 index 0000000000..13314cff42 --- /dev/null +++ b/sysdeps/unix/sysv/irix4/bits/signum.h @@ -0,0 +1,68 @@ +/* Signal number definitions. Irix4 version. + Copyright (C) 1994, 1996 Free Software Foundation, Inc. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifdef _SIGNAL_H + +/* This file defines the fake signal functions and signal + number constants for SGI Irix 4. */ + +/* Fake signal functions. */ +#define SIG_ERR ((__sighandler_t) -1) +#define SIG_DFL ((__sighandler_t) 0) +#define SIG_IGN ((__sighandler_t) 1) + + +/* Signals. */ +#define SIGHUP 1 /* Hangup (POSIX). */ +#define SIGINT 2 /* Interrupt (ANSI). */ +#define SIGQUIT 3 /* Quit (POSIX). */ +#define SIGILL 4 /* Illegal instruction (ANSI). */ +#define SIGABRT SIGIOT /* Abort (ANSI). */ +#define SIGTRAP 5 /* Trace trap (POSIX). */ +#define SIGIOT 6 /* IOT trap. */ +#define SIGEMT 7 /* EMT trap. */ +#define SIGFPE 8 /* Floating-point exception (ANSI). */ +#define SIGKILL 9 /* Kill, unblockable (POSIX). */ +#define SIGBUS 10 /* Bus error. */ +#define SIGSEGV 11 /* Segmentation violation (ANSI). */ +#define SIGSYS 12 /* Bad argument to system call*/ +#define SIGPIPE 13 /* Broken pipe (POSIX). */ +#define SIGALRM 14 /* Alarm clock (POSIX). */ +#define SIGTERM 15 /* Termination (ANSI). */ +#define SIGUSR1 16 /* User-defined signal 1 (POSIX). */ +#define SIGUSR2 17 /* User-defined signal 2 (POSIX). */ +#define SIGCHLD 18 /* Child status has changed (POSIX). */ +#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */ +#define SIGPWR 19 /* Power going down. */ +#define SIGSTOP 20 /* Stop, unblockable (POSIX). */ +#define SIGTSTP 21 /* Keyboard stop (POSIX). */ +#define SIGPOLL 22 /* Same as SIGIO? (SVID). */ +#define SIGIO 23 /* I/O now possible. */ +#define SIGURG 24 /* Urgent condition on socket.*/ +#define SIGWINCH 25 /* Window size change. */ +#define SIGVTALRM 26 /* Virtual alarm clock. */ +#define SIGPROF 27 /* Profiling alarm clock. */ +#define SIGCONT 28 /* Continue (POSIX). */ +#define SIGTTIN 29 /* Background read from tty (POSIX). */ +#define SIGTTOU 30 /* Background write to tty (POSIX). */ +#define SIGXCPU 31 /* CPU limit exceeded. */ +#define SIGXFSZ 32 /* File size limit exceeded. */ + +#endif /* included. */ + +#define _NSIG 33 /* Biggest signal number + 1. */ diff --git a/sysdeps/unix/sysv/irix4/bits/stat.h b/sysdeps/unix/sysv/irix4/bits/stat.h new file mode 100644 index 0000000000..0dab45cfa0 --- /dev/null +++ b/sysdeps/unix/sysv/irix4/bits/stat.h @@ -0,0 +1,65 @@ +/* Copyright (C) 1992, 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* + * Never include this file directly; use instead. + */ + +#ifndef _BITS_STAT_H +#define _BITS_STAT_H 1 + +struct stat + { + unsigned long st_ino; + short int st_dev; + unsigned short int st_mode; + short int st_nlink; + unsigned short int st_uid; + unsigned short int st_gid; + short int st_rdev; + long int st_size; + long int st_atime; + long int st_mtime; + long int st_ctime; + }; + +/* Encoding of the file mode. */ + +#define __S_IFMT 0170000 /* These bits determine file type. */ + +/* File types. */ +#define __S_IFDIR 0040000 /* Directory. */ +#define __S_IFCHR 0020000 /* Character device. */ +#define __S_IFBLK 0060000 /* Block device. */ +#define __S_IFREG 0100000 /* Regular file. */ +#define __S_IFIFO 0010000 /* FIFO. */ + +/* These don't actually exist on System V, but having them doesn't hurt. */ +#define __S_IFLNK 0120000 /* Symbolic link. */ +#define __S_IFSOCK 0140000 /* Socket. */ + +/* Protection bits. */ + +#define __S_ISUID 04000 /* Set user ID on execution. */ +#define __S_ISGID 02000 /* Set group ID on execution. */ +#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ +#define __S_IREAD 0400 /* Read by owner. */ +#define __S_IWRITE 0200 /* Write by owner. */ +#define __S_IEXEC 0100 /* Execute by owner. */ + +#endif /* bits/stat.h */ From 761ac1b6d04e59a991074c13f3805155660550da Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:48:51 +0000 Subject: [PATCH 0967/4487] Kernel specific termios struct. --- .../unix/sysv/linux/alpha/kernel_termios.h | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/kernel_termios.h diff --git a/sysdeps/unix/sysv/linux/alpha/kernel_termios.h b/sysdeps/unix/sysv/linux/alpha/kernel_termios.h new file mode 100644 index 0000000000..093ac25096 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/kernel_termios.h @@ -0,0 +1,44 @@ +/* Copyright (C) 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _KERNEL_TERMIOS_H +#define _KERNEL_TERMIOS_H 1 + +/* The following corresponds to the values from the Linux 2.1.20 kernel. */ + +/* We need the definition of tcflag_t, cc_t, and speed_t. */ +#include + +#define __KERNEL_NCCS 19 + +struct __kernel_termios + { + tcflag_t c_iflag; /* input mode flags */ + tcflag_t c_oflag; /* output mode flags */ + tcflag_t c_cflag; /* control mode flags */ + tcflag_t c_lflag; /* local mode flags */ + cc_t c_cc[__KERNEL_NCCS]; /* control characters */ + cc_t c_line; /* line discipline */ + speed_t c_ispeed; /* input speed */ + speed_t c_ospeed; /* output speed */ + }; + +#define _HAVE_C_ISPEED 1 +#define _HAVE_C_OSPEED 1 + +#endif /* kernel_termios.h */ From f735960c20b85e8a73632c6ba6740f2cea9eeb53 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:49:27 +0000 Subject: [PATCH 0968/4487] moved up. --- .../sysv/linux/alpha/sys/kernel_termios.h | 25 ------------------- 1 file changed, 25 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/alpha/sys/kernel_termios.h diff --git a/sysdeps/unix/sysv/linux/alpha/sys/kernel_termios.h b/sysdeps/unix/sysv/linux/alpha/sys/kernel_termios.h deleted file mode 100644 index 4be759a51f..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/sys/kernel_termios.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef _SYS_KERNEL_TERMIOS_H -#define _SYS_KERNEL_TERMIOS_H 1 -/* The following corresponds to the values from the Linux 2.1.20 kernel. */ - -/* We need the definition of tcflag_t, cc_t, and speed_t. */ -#include - -#define __KERNEL_NCCS 19 - -struct __kernel_termios - { - tcflag_t c_iflag; /* input mode flags */ - tcflag_t c_oflag; /* output mode flags */ - tcflag_t c_cflag; /* control mode flags */ - tcflag_t c_lflag; /* local mode flags */ - cc_t c_cc[__KERNEL_NCCS]; /* control characters */ - cc_t c_line; /* line discipline */ - speed_t c_ispeed; /* input speed */ - speed_t c_ospeed; /* output speed */ - }; - -#define _HAVE_C_ISPEED 1 -#define _HAVE_C_OSPEED 1 - -#endif /* sys/kernel_termios.h */ From 775690148ed39b7a249287138cd978edc0693184 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:49:46 +0000 Subject: [PATCH 0969/4487] Linux/Alpha specific info header. --- sysdeps/unix/sysv/linux/alpha/bits/fcntl.h | 100 +++++++++ sysdeps/unix/sysv/linux/alpha/bits/ioctls.h | 43 ++++ sysdeps/unix/sysv/linux/alpha/bits/ipc.h | 85 ++++++++ .../unix/sysv/linux/alpha/bits/sigaction.h | 51 +++++ sysdeps/unix/sysv/linux/alpha/bits/signum.h | 69 +++++++ sysdeps/unix/sysv/linux/alpha/bits/stat.h | 78 +++++++ sysdeps/unix/sysv/linux/alpha/bits/termios.h | 193 ++++++++++++++++++ sysdeps/unix/sysv/linux/alpha/bits/time.h | 54 +++++ sysdeps/unix/sysv/linux/alpha/bits/types.h | 95 +++++++++ 9 files changed, 768 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/fcntl.h create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/ioctls.h create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/ipc.h create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/sigaction.h create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/signum.h create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/stat.h create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/termios.h create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/time.h create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/types.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h new file mode 100644 index 0000000000..b70502f21a --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h @@ -0,0 +1,100 @@ +/* O_*, F_*, FD_* bit values for Linux. + Copyright (C) 1995, 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _FCNTL_H +#error "Never use directly; include instead." +#endif + + +#include + + +/* In GNU, read and write are bits (unlike BSD). */ +#ifdef __USE_GNU +#define O_READ O_RDONLY /* Open for reading. */ +#define O_WRITE O_WRONLY /* Open for writing. */ +#endif +/* open/fcntl - O_SYNC is only implemented on blocks devices and on files + located on an ext2 file system */ +#define O_ACCMODE 0003 +#define O_RDONLY 00 +#define O_WRONLY 01 +#define O_RDWR 02 +#define O_CREAT 01000 /* not fcntl */ +#define O_TRUNC 02000 /* not fcntl */ +#define O_EXCL 04000 /* not fcntl */ +#define O_NOCTTY 010000 /* not fcntl */ + +#define O_NONBLOCK 00004 +#define O_APPEND 00010 +#define O_NDELAY O_NONBLOCK +#define O_SYNC 040000 +#define O_FSYNC O_SYNC +#define O_ASYNC 020000 /* fcntl, for BSD compatibility */ + +#define F_DUPFD 0 /* dup */ +#define F_GETFD 1 /* get f_flags */ +#define F_SETFD 2 /* set f_flags */ +#define F_GETFL 3 /* more flags (cloexec) */ +#define F_SETFL 4 +#define F_GETLK 7 +#define F_SETLK 8 +#define F_SETLKW 9 + +#define F_SETOWN 5 /* for sockets. */ +#define F_GETOWN 6 /* for sockets. */ + +/* for F_[GET|SET]FL */ +#define FD_CLOEXEC 1 /* actually anything with low bit set goes */ + +/* for posix fcntl() and lockf() */ +#define F_RDLCK 1 +#define F_WRLCK 2 +#define F_UNLCK 8 + +/* for old implementation of bsd flock () */ +#define F_EXLCK 16 /* or 3 */ +#define F_SHLCK 32 /* or 4 */ + +/* operations for bsd flock(), also used by the kernel implementation */ +#define LOCK_SH 1 /* shared lock */ +#define LOCK_EX 2 /* exclusive lock */ +#define LOCK_NB 4 /* or'd with one of the above to prevent + blocking */ +#define LOCK_UN 8 /* remove lock */ + +struct flock + { + short int l_type; + short int l_whence; + __off_t l_start; + __off_t l_len; + __pid_t l_pid; + }; + + +/* Define some more compatibility macros to be backward compatible with + BSD systems which did not managed to hide these kernel macros. */ +#ifdef __USE_BSD +#define FAPPEND O_APPEND +#define FFSYNC O_FSYNC +#define FASYNC O_ASYNC +#define FNONBLOCK O_NONBLOCK +#define FNDELAY O_NDELAY +#endif /* Use BSD. */ diff --git a/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h b/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h new file mode 100644 index 0000000000..8a14f99f43 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h @@ -0,0 +1,43 @@ +/* Copyright (C) 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* + * Never include this file directly; use instead. + */ + +#ifndef _BITS_IOCTLS_H +#define _BITS_IOCTLS_H 1 + +/* Use the definitions from the kernel header files. */ +#include +#include + +/* Oh well, this is necessary since the kernel data structure is + different from the user-level version. */ +#undef TCGETS +#undef TCSETS +#undef TCSETSW +#undef TCSETSF +#define TCGETS _IOR ('t', 19, struct __kernel_termios) +#define TCSETS _IOW ('t', 20, struct __kernel_termios) +#define TCSETSW _IOW ('t', 21, struct __kernel_termios) +#define TCSETSF _IOW ('t', 22, struct __kernel_termios) + +#include + +#endif /* bits/ioctls.h */ diff --git a/sysdeps/unix/sysv/linux/alpha/bits/ipc.h b/sysdeps/unix/sysv/linux/alpha/bits/ipc.h new file mode 100644 index 0000000000..57830daae1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/bits/ipc.h @@ -0,0 +1,85 @@ +/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , August 1995. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_IPC_BUF_H + +#define _SYS_IPC_BUF_H 1 +#include + +#include + +/* Mode bits for `msgget', `semget', and `shmget'. */ +#define IPC_CREAT 01000 /* Create key if key does not exist. */ +#define IPC_EXCL 02000 /* Fail if key exists. */ +#define IPC_NOWAIT 04000 /* Return error on wait. */ + +/* Control commands for `msgctl', `semctl', and `shmctl'. */ +#define IPC_RMID 0 /* Remove identifier. */ +#define IPC_SET 1 /* Set `ipc_perm' options. */ +#define IPC_STAT 2 /* Get `ipc_perm' options. */ +#define IPC_INFO 3 /* See ipcs. */ + + +__BEGIN_DECLS + +/* Special key values. */ +#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ + + +/* Data structure used to pass permission information to IPC operations. */ +struct ipc_perm + { + __key_t __key; /* Key. */ + unsigned int uid; /* Owner's user ID. */ + unsigned int gid; /* Owner's group ID. */ + unsigned int cuid; /* Creator's user ID. */ + unsigned int cgid; /* Creator's group ID. */ + unsigned int mode; /* Read/write permission. */ + unsigned short int __seq; /* Sequence number. */ + }; + + +/* Kludge to work around Linux' restriction of only up to five + arguments to a system call. */ +struct ipc_kludge + { + void *msgp; + long int msgtyp; + }; + +/* The actual system call: all functions are multiplexed by this. */ +extern int __ipc __P ((int __call, int __first, int __second, int __third, + void *__ptr)); + +/* The codes for the functions to use the multiplexer `__ipc'. */ +#define IPCOP_semop 1 +#define IPCOP_semget 2 +#define IPCOP_semctl 3 +#define IPCOP_msgsnd 11 +#define IPCOP_msgrcv 12 +#define IPCOP_msgget 13 +#define IPCOP_msgctl 14 +#define IPCOP_shmat 21 +#define IPCOP_shmdt 22 +#define IPCOP_shmget 23 +#define IPCOP_shmctl 24 + +__END_DECLS + +#endif /* _SYS_IPC_BUF_H */ diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h new file mode 100644 index 0000000000..57ce5e6ded --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h @@ -0,0 +1,51 @@ +/* The proper definitions for Linux/Alpha sigaction. +Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +/* Structure describing the action to be taken when a signal arrives. */ +struct sigaction + { + /* Signal handler. */ + __sighandler_t sa_handler; + + /* Additional set of signals to be blocked. */ + __sigset_t sa_mask; + + /* Special flags. */ + unsigned int sa_flags; + }; + +/* Bits in `sa_flags'. */ +#define SA_NOCLDSTOP 0x00000004 /* Don't send SIGCHLD when children stop. */ +#ifdef __USE_MISC +#define SA_STACK 0x00000001 /* Use signal stack by using `sa_restorer'. */ +#define SA_RESTART 0x00000002 /* Don't restart syscall on signal return. */ +#define SA_INTERRUPT 0x20000000 /* Historical no-op. */ +#define SA_NOMASK 0x00000008 /* Don't automatically block the signal when + its handler is being executed. */ +#define SA_ONESHOT 0x00000010 /* Reset to SIG_DFL on entry to handler. */ + +/* Some aliases for the SA_ constants. */ +#define SA_NODEFER SA_NOMASK +#define SA_RESETHAND SA_ONESHOT +#endif + +/* Values for the HOW argument to `sigprocmask'. */ +#define SIG_BLOCK 1 /* Block signals. */ +#define SIG_UNBLOCK 2 /* Unblock signals. */ +#define SIG_SETMASK 3 /* Set the set of blocked signals. */ diff --git a/sysdeps/unix/sysv/linux/alpha/bits/signum.h b/sysdeps/unix/sysv/linux/alpha/bits/signum.h new file mode 100644 index 0000000000..be6132d42f --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/bits/signum.h @@ -0,0 +1,69 @@ +/* Signal number definitions. Linux/Alpha version. +Copyright (C) 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifdef _SIGNAL_H + +/* Fake signal functions. */ +#define SIG_ERR ((__sighandler_t) -1) /* Error return. */ +#define SIG_DFL ((__sighandler_t) 0) /* Default action. */ +#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */ + +/* + * Linux/AXP has different signal numbers that Linux/i386: I'm trying + * to make it OSF/1 binary compatible, at least for normal binaries. + */ +#define SIGHUP 1 +#define SIGINT 2 +#define SIGQUIT 3 +#define SIGILL 4 +#define SIGTRAP 5 +#define SIGABRT 6 +#define SIGEMT 7 +#define SIGFPE 8 +#define SIGKILL 9 +#define SIGBUS 10 +#define SIGSEGV 11 +#define SIGSYS 12 +#define SIGPIPE 13 +#define SIGALRM 14 +#define SIGTERM 15 +#define SIGURG 16 +#define SIGSTOP 17 +#define SIGTSTP 18 +#define SIGCONT 19 +#define SIGCHLD 20 +#define SIGTTIN 21 +#define SIGTTOU 22 +#define SIGIO 23 +#define SIGXCPU 24 +#define SIGXFSZ 25 +#define SIGVTALRM 26 +#define SIGPROF 27 +#define SIGWINCH 28 +#define SIGINFO 29 +#define SIGUSR1 30 +#define SIGUSR2 31 + +#define SIGPOLL SIGIO +#define SIGPWR SIGINFO +#define SIGIOT SIGABRT + +#define _NSIG 32 /* Biggest signal number + 1. */ + +#endif /* included. */ diff --git a/sysdeps/unix/sysv/linux/alpha/bits/stat.h b/sysdeps/unix/sysv/linux/alpha/bits/stat.h new file mode 100644 index 0000000000..768b8192ff --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/bits/stat.h @@ -0,0 +1,78 @@ +/* Copyright (C) 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* + * Never include this file directly; use instead. + */ + +#ifndef _BITS_STAT_H +#define _BITS_STAT_H 1 + +/* Versions of the `struct stat' data structure. */ +#define _STAT_VER_LINUX_OLD 0 +#define _STAT_VER_LINUX 1 +#define _STAT_VER _STAT_VER_LINUX + +/* Versions of the `xmknod' interface. */ +#define _MKNOD_VER_LINUX 0 + +struct stat + { + __dev_t st_dev; /* Device. */ + __ino_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. */ + __off_t st_size; /* Size of file, in bytes. */ + __time_t st_atime; /* Time of last access. */ + __time_t st_mtime; /* Time of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned int st_blksize; /* Optimal block size for I/O. */ +#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ + int st_blocks; /* Nr. of 512-byte blocks allocated. */ + unsigned int st_flags; + unsigned int st_gen; + }; + +/* Encoding of the file mode. */ + +#define __S_IFMT 0170000 /* These bits determine file type. */ + +/* File types. */ +#define __S_IFDIR 0040000 /* Directory. */ +#define __S_IFCHR 0020000 /* Character device. */ +#define __S_IFBLK 0060000 /* Block device. */ +#define __S_IFREG 0100000 /* Regular file. */ +#define __S_IFIFO 0010000 /* FIFO. */ + +/* These don't actually exist on System V, but having them doesn't hurt. */ +#define __S_IFLNK 0120000 /* Symbolic link. */ +#define __S_IFSOCK 0140000 /* Socket. */ + +/* Protection bits. */ + +#define __S_ISUID 04000 /* Set user ID on execution. */ +#define __S_ISGID 02000 /* Set group ID on execution. */ +#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ +#define __S_IREAD 0400 /* Read by owner. */ +#define __S_IWRITE 0200 /* Write by owner. */ +#define __S_IEXEC 0100 /* Execute by owner. */ + +#endif /* bits/stat.h */ diff --git a/sysdeps/unix/sysv/linux/alpha/bits/termios.h b/sysdeps/unix/sysv/linux/alpha/bits/termios.h new file mode 100644 index 0000000000..d0932c1cd7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/bits/termios.h @@ -0,0 +1,193 @@ +/* termios type and macro definitions. Linux version. + Copyright (C) 1993, 1994, 1995, 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _TERMBITS_H +#define _TERMBITS_H 1 + +typedef unsigned char cc_t; +typedef unsigned int speed_t; +typedef unsigned int tcflag_t; + +#define NCCS 32 +struct termios + { + tcflag_t c_iflag; /* input mode flags */ + tcflag_t c_oflag; /* output mode flags */ + tcflag_t c_cflag; /* control mode flags */ + tcflag_t c_lflag; /* local mode flags */ + cc_t c_cc[NCCS]; /* control characters */ + cc_t c_line; /* line discipline (== c_cc[33]) */ + speed_t c_ispeed; /* input speed */ + speed_t c_ospeed; /* output speed */ + }; + +/* c_cc characters */ +#define VEOF 0 +#define VEOL 1 +#define VEOL2 2 +#define VERASE 3 +#define VWERASE 4 +#define VKILL 5 +#define VREPRINT 6 +#define VSWTC 7 +#define VINTR 8 +#define VQUIT 9 +#define VSUSP 10 +#define VSTART 12 +#define VSTOP 13 +#define VLNEXT 14 +#define VDISCARD 15 +#define VMIN 16 +#define VTIME 17 + +/* c_iflag bits */ +#define IGNBRK 0000001 +#define BRKINT 0000002 +#define IGNPAR 0000004 +#define PARMRK 0000010 +#define INPCK 0000020 +#define ISTRIP 0000040 +#define INLCR 0000100 +#define IGNCR 0000200 +#define ICRNL 0000400 +#define IXON 0001000 +#define IXOFF 0002000 +#ifdef __USE_BSD + /* POSIX.1 doesn't want these... */ +# define IXANY 0004000 +# define IUCLC 0010000 +# define IMAXBEL 0020000 +#endif + +/* c_oflag bits */ +#define OPOST 0000001 +#define ONLCR 0000002 +#define OLCUC 0000004 + +#define OCRNL 0000010 +#define ONOCR 0000020 +#define ONLRET 0000040 + +#define OFILL 00000100 +#define OFDEL 00000200 +#define NLDLY 00001400 +#define NL0 00000000 +#define NL1 00000400 +#define NL2 00001000 +#define NL3 00001400 +#define TABDLY 00006000 +#define TAB0 00000000 +#define TAB1 00002000 +#define TAB2 00004000 +#define TAB3 00006000 +#define CRDLY 00030000 +#define CR0 00000000 +#define CR1 00010000 +#define CR2 00020000 +#define CR3 00030000 +#define FFDLY 00040000 +#define FF0 00000000 +#define FF1 00040000 +#define BSDLY 00100000 +#define BS0 00000000 +#define BS1 00100000 +#define VTDLY 00200000 +#define VT0 00000000 +#define VT1 00200000 +#define XTABS 01000000 /* Hmm.. Linux/i386 considers this part of TABDLY.. */ + +/* c_cflag bit meaning */ +#define CBAUD 0000037 +#define B0 0000000 /* hang up */ +#define B50 0000001 +#define B75 0000002 +#define B110 0000003 +#define B134 0000004 +#define B150 0000005 +#define B200 0000006 +#define B300 0000007 +#define B600 0000010 +#define B1200 0000011 +#define B1800 0000012 +#define B2400 0000013 +#define B4800 0000014 +#define B9600 0000015 +#define B19200 0000016 +#define B38400 0000017 +#define EXTA B19200 +#define EXTB B38400 +#define CBAUDEX 0000000 +#define B57600 00020 +#define B115200 00021 +#define B230400 00022 +#define B460800 00023 + +#define CSIZE 00001400 +#define CS5 00000000 +#define CS6 00000400 +#define CS7 00001000 +#define CS8 00001400 + +#define CSTOPB 00002000 +#define CREAD 00004000 +#define PARENB 00010000 +#define PARODD 00020000 +#define HUPCL 00040000 + +#define CLOCAL 00100000 +#define CRTSCTS 020000000000 /* flow control */ + +/* c_lflag bits */ +#define ISIG 0x00000080 +#define ICANON 0x00000100 +#define XCASE 0x00004000 +#define ECHO 0x00000008 +#define ECHOE 0x00000002 +#define ECHOK 0x00000004 +#define ECHONL 0x00000010 +#define NOFLSH 0x80000000 +#define TOSTOP 0x00400000 +#define ECHOCTL 0x00000040 +#define ECHOPRT 0x00000020 +#define ECHOKE 0x00000001 +#define FLUSHO 0x00800000 +#define PENDIN 0x20000000 +#define IEXTEN 0x00000400 + +/* Values for the ACTION argument to `tcflow'. */ +#define TCOOFF 0 +#define TCOON 1 +#define TCIOFF 2 +#define TCION 3 + +/* Values for the QUEUE_SELECTOR argument to `tcflush'. */ +#define TCIFLUSH 0 +#define TCOFLUSH 1 +#define TCIOFLUSH 2 + +/* Values for the OPTIONAL_ACTIONS argument to `tcsetattr'. */ +#define TCSANOW 0 +#define TCSADRAIN 1 +#define TCSAFLUSH 2 + + +#define _IOT_termios /* Hurd ioctl type field. */ \ + _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2) + +#endif /* _TERMBITS_H */ diff --git a/sysdeps/unix/sysv/linux/alpha/bits/time.h b/sysdeps/unix/sysv/linux/alpha/bits/time.h new file mode 100644 index 0000000000..7475b68f5b --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/bits/time.h @@ -0,0 +1,54 @@ +/* System-dependent timing definitions. Linux/Alpha version. + Copyright (C) 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* + * Never include this file directly; use instead. + */ + +#ifdef __need_timeval +# undef __need_timeval +# ifndef _STRUCT_TIMEVAL +# define _STRUCT_TIMEVAL 1 +/* A time value that is accurate to the nearest + microsecond but also has a range of years. */ +struct timeval + { + int tv_sec; /* Seconds. */ + int tv_usec; /* Microseconds. */ + }; +# endif /* struct timeval */ +#endif /* need timeval */ + + +#ifndef _BITS_TIME_H +#define _BITS_TIME_H 1 + +/* ISO/IEC 9899:1990 7.12.1: + The macro `CLOCKS_PER_SEC' is the number per second of the value + returned by the `clock' function. */ +/* CAE XSH, Issue 4, Version 2: + The value of CLOCKS_PER_SEC is required to be 1 million on all + XSI-conformant systems. */ +# define CLOCKS_PER_SEC 1000000 + +/* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK + presents the real value for clock ticks per second for the system. */ +# define CLK_TCK 1024 + +#endif /* bits/time.h */ diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h new file mode 100644 index 0000000000..9a4666a508 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h @@ -0,0 +1,95 @@ +/* Copyright (C) 1991, 92, 94, 95, 96, 97 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* + * Never include this file directly; use instead. + */ + +#ifndef _BITS_TYPES_H +#define _BITS_TYPES_H 1 + +#include + +/* Convenience types. */ +typedef unsigned char __u_char; +typedef unsigned short __u_short; +typedef unsigned int __u_int; +typedef unsigned long __u_long; +typedef unsigned long int __u_quad_t; +typedef long int __quad_t; +typedef signed char __int8_t; +typedef unsigned char __uint8_t; +typedef signed short int __int16_t; +typedef unsigned short int __uint16_t; +typedef signed int __int32_t; +typedef unsigned int __uint32_t; +typedef signed long int __int64_t; +typedef unsigned long int __uint64_t; +typedef __quad_t *__qaddr_t; + +typedef __u_long __dev_t; /* Type of device numbers. */ +typedef __u_int __uid_t; /* Type of user identifications. */ +typedef __u_int __gid_t; /* Type of group identifications. */ +typedef __u_int __ino_t; /* Type of file serial numbers. */ +typedef __u_int __mode_t; /* Type of file attribute bitmasks. */ +typedef __u_int __nlink_t; /* Type of file link counts. */ +typedef long int __off_t; /* Type of file sizes and offsets. */ +typedef __quad_t __loff_t; /* Type of file sizes and offsets. */ +typedef int __pid_t; /* Type of process identifications. */ +typedef long int __ssize_t; /* Type of a byte count, or error. */ + +typedef struct + { + int __val[2]; + } __fsid_t; /* Type of file system IDs. */ + +/* Everythin' else. */ +typedef int __daddr_t; /* The type of a disk address. */ +typedef char *__caddr_t; +typedef long int __time_t; +typedef long int __swblk_t; /* Type of a swap block maybe? */ + +typedef long int __clock_t; + +/* One element in the file descriptor mask array. */ +typedef unsigned long int __fd_mask; + +/* Due to incaution, we may have gotten these from a kernel header file. */ +#undef __FD_SETSIZE +#undef __NFDBITS +#undef __FDMASK + +/* Number of descriptors that can fit in an `fd_set'. */ +#define __FD_SETSIZE 1024 + +/* It's easier to assume 8-bit bytes than to get CHAR_BIT. */ +#define __NFDBITS (8 * sizeof (__fd_mask)) +#define __FDELT(d) ((d) / __NFDBITS) +#define __FDMASK(d) (1 << ((d) % __NFDBITS)) + +/* fd_set for select and pselect. */ +typedef struct + { + /* XPG4.2 requires this member name. */ + __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS]; + } __fd_set; + + +typedef int __key_t; + +#endif /* bits/types.h */ From 2485f9c0e320765a9caf8f1b9df51d9f05f2b7e9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:50:53 +0000 Subject: [PATCH 0970/4487] Find socketcall.h. --- sysdeps/unix/sysv/linux/arm/socket.S | 2 +- sysdeps/unix/sysv/linux/m68k/socket.S | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/socket.S b/sysdeps/unix/sysv/linux/arm/socket.S index e8db072971..4d877e51d5 100644 --- a/sysdeps/unix/sysv/linux/arm/socket.S +++ b/sysdeps/unix/sysv/linux/arm/socket.S @@ -17,7 +17,7 @@ Boston, MA 02111-1307, USA. */ #include -#include +#include #define P(a, b) P2(a, b) #define P2(a, b) a##b diff --git a/sysdeps/unix/sysv/linux/m68k/socket.S b/sysdeps/unix/sysv/linux/m68k/socket.S index d0741afeb1..1508b879f6 100644 --- a/sysdeps/unix/sysv/linux/m68k/socket.S +++ b/sysdeps/unix/sysv/linux/m68k/socket.S @@ -17,7 +17,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#include +#include #define P(a, b) P2(a, b) #define P2(a, b) a##b From a3e014dfc6b15a0a392328989c3109c417fcb4e1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:52:56 +0000 Subject: [PATCH 0971/4487] Minix signal definitions. --- sysdeps/unix/sysv/minix/bits/sigaction.h | 49 ++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 sysdeps/unix/sysv/minix/bits/sigaction.h diff --git a/sysdeps/unix/sysv/minix/bits/sigaction.h b/sysdeps/unix/sysv/minix/bits/sigaction.h new file mode 100644 index 0000000000..6b0c460914 --- /dev/null +++ b/sysdeps/unix/sysv/minix/bits/sigaction.h @@ -0,0 +1,49 @@ +/* Copyright (C) 1992, 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Structure describing the action to be taken when a signal arrives. */ +struct sigaction + { + /* Signal handler. */ + __sighandler_t sa_handler; + + /* Additional set of signals to be blocked. */ + __sigset_t sa_mask; + + /* Special flags. */ + int sa_flags; + }; + +/* Bits in `sa_flags'. */ +#ifdef __USE_MISC +#define SA_ONSTACK 0x1 /* Take signal on signal stack. */ +#define SA_RESETHAND 0x2 /* Reset signal handler when signal caught. */ +#define SA_NODEFER 0x4 /* Don't block signal while catching it. */ +#define SA_RESTART 0x8 /* Don't restart syscall on signal return. */ +#define SA_SIGINFO 0x10 /* Extended signal handling. */ +#define SA_NOCLDWAIT 0x20 /* Don't create zombies. */ +#define SA_COMPAT 0x80 /* Internal flag for old signal catchers. */ +#define SA_DISABLE 0x100 /* Disable alternate signal stack. */ +#endif +#define SA_NOCLDSTOP 0x40 /* Don't send SIGCHLD when children stop. */ + + +/* Values for the HOW argument to `sigprocmask'. */ +#define SIG_BLOCK 0 /* Block signals. */ +#define SIG_UNBLOCK 1 /* Unblock signals. */ +#define SIG_SETMASK 2 /* Set the set of blocked signals. */ From 31bbd45e49271acee83d8561f78bf73516d2b0d4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:53:14 +0000 Subject: [PATCH 0972/4487] SCO3.2.4 info header. --- sysdeps/unix/sysv/sco3.2.4/bits/confname.h | 50 +++++++++++++++++++++ sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h | 39 ++++++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 sysdeps/unix/sysv/sco3.2.4/bits/confname.h create mode 100644 sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h diff --git a/sysdeps/unix/sysv/sco3.2.4/bits/confname.h b/sysdeps/unix/sysv/sco3.2.4/bits/confname.h new file mode 100644 index 0000000000..0408951863 --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/bits/confname.h @@ -0,0 +1,50 @@ +/* `sysconf', `pathconf', and `confstr' NAME values. Generic version. +Copyright (C) 1993 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Values for the NAME argument to `pathconf' and `fpathconf'. */ +#define _PC_LINK_MAX 0 +#define _PC_MAX_CANON 1 +#define _PC_MAX_INPUT 2 +#define _PC_NAME_MAX 3 +#define _PC_PATH_MAX 4 +#define _PC_PIPE_BUF 5 +#define _PC_CHOWN_RESTRICTED 6 +#define _PC_NO_TRUNC 7 +#define _PC_VDISABLE 8 + +/* Values for the argument to `sysconf'. */ +#define _SC_ARG_MAX 0 +#define _SC_CHILD_MAX 1 +#define _SC_CLK_TCK 2 +#define _SC_NGROUPS_MAX 3 +#define _SC_OPEN_MAX 4 +#define _SC_JOB_CONTROL 5 +#define _SC_SAVED_IDS 6 +#define _SC_VERSION 7 +#define _SC_PASS_MAX 8 +#define _SC_XOPEN_VERSION 9 +#define _SC_TZNAME_MAX 666 /* Not handled by SCO's system call. */ + +#ifdef __USE_POSIX2 +/* Values for the NAME argument to `confstr'. */ +enum + { + _CS_PATH /* The default search path. */ + }; +#endif diff --git a/sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h b/sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h new file mode 100644 index 0000000000..c21b928cdb --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h @@ -0,0 +1,39 @@ +/* The proper definitions for SCO's sigaction. +Copyright (C) 1993, 1994, 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Structure describing the action to be taken when a signal arrives. */ +struct sigaction + { + /* Signal handler. */ + __sighandler_t sa_handler; + + /* Additional set of signals to be blocked. */ + __sigset_t sa_mask; + + /* Special flags. */ + int sa_flags; + }; + +/* Bits in `sa_flags'. */ +#define SA_NOCLDSTOP 0x01 /* Don't send SIGCHLD when children stop. */ + +/* Values for the HOW argument to `sigprocmask'. */ +#define SIG_SETMASK 0 /* Set the set of blocked signals. */ +#define SIG_BLOCK 1 /* Block signals. */ +#define SIG_UNBLOCK 2 /* Unblock signals. */ From 0997fa96488c4dee3b15a3b2a9ceabbb170a9ecb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:53:24 +0000 Subject: [PATCH 0973/4487] SCO3.2.4 limits. --- sysdeps/unix/sysv/sco3.2/bits/local_lim.h | 37 +++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 sysdeps/unix/sysv/sco3.2/bits/local_lim.h diff --git a/sysdeps/unix/sysv/sco3.2/bits/local_lim.h b/sysdeps/unix/sysv/sco3.2/bits/local_lim.h new file mode 100644 index 0000000000..365858c6f8 --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2/bits/local_lim.h @@ -0,0 +1,37 @@ +/* Copyright (C) 1993, 1996 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _BITS_LOCAL_LIM_H +#define _BITS_LOCAL_LIM_H 1 + +#define NGROUPS_MAX 8 /* Maximum number of supplementary groups. */ +#define ARG_MAX 5120 +#define CHILD_MAX 25 +#define OPEN_MAX 60 +#define LINK_MAX 1000 +#define MAX_CANON 256 + +/* For SVR3, this is 14. For SVR4, it is 255, at least on ufs + file systems, even though the System V limits.h incorrectly + defines it as 14. Giving it a value which is too large + is harmless (it is a maximum). */ +#define NAME_MAX 255 + +#define PATH_MAX 1024 + +#endif /* bits/local_lim.h */ From fc961ebd7f305c6c5917b16102639cca887a8dca Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:53:38 +0000 Subject: [PATCH 0974/4487] SysVr4 info header. --- sysdeps/unix/sysv/sysv4/bits/sigaction.h | 51 +++++++++++++ sysdeps/unix/sysv/sysv4/bits/signum.h | 66 ++++++++++++++++ sysdeps/unix/sysv/sysv4/bits/sigset.h | 96 ++++++++++++++++++++++++ sysdeps/unix/sysv/sysv4/bits/utsname.h | 1 + sysdeps/unix/sysv/sysv4/bits/waitflags.h | 34 +++++++++ 5 files changed, 248 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/bits/sigaction.h create mode 100644 sysdeps/unix/sysv/sysv4/bits/signum.h create mode 100644 sysdeps/unix/sysv/sysv4/bits/sigset.h create mode 100644 sysdeps/unix/sysv/sysv4/bits/utsname.h create mode 100644 sysdeps/unix/sysv/sysv4/bits/waitflags.h diff --git a/sysdeps/unix/sysv/sysv4/bits/sigaction.h b/sysdeps/unix/sysv/sysv4/bits/sigaction.h new file mode 100644 index 0000000000..1305ba61e6 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/bits/sigaction.h @@ -0,0 +1,51 @@ +/* The proper definitions for SVR4's sigaction. +Copyright (C) 1993, 1994, 1996 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 Library General Public License as +published by the Free Software Foundation; either version 2 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Structure describing the action to be taken when a signal arrives. */ +struct sigaction + { + /* Special flags. */ + int sa_flags; + + /* Signal handler. */ + __sighandler_t sa_handler; + + /* Additional set of signals to be blocked. */ + __sigset_t sa_mask; + + /* Padding. */ + int sa_resv[2]; + }; + +/* Bits in `sa_flags'. */ +#ifdef __USE_MISC +#define SA_ONSTACK 0x1 /* Take signal on signal stack. */ +#define SA_RESETHAND 0x2 /* Reset to SIG_DFL on entry to handler. */ +#define SA_RESTART 0x4 /* Don't restart syscall on signal return. */ +#define SA_SIGINFO 0x8 /* Provide additional info to the handler. */ +#define SA_NODEFER 0x10 /* Don't automatically block the signal when + its handler is being executed. */ +#define SA_NOCLDWAIT 0x10000 /* Don't save zombie processes. */ +#endif +#define SA_NOCLDSTOP 0x20000 /* Don't send SIGCHLD when children stop. */ + +/* Values for the HOW argument to `sigprocmask'. */ +#define SIG_BLOCK 1 /* Block signals. */ +#define SIG_UNBLOCK 2 /* Unblock signals. */ +#define SIG_SETMASK 3 /* Set the set of blocked signals. */ diff --git a/sysdeps/unix/sysv/sysv4/bits/signum.h b/sysdeps/unix/sysv/sysv4/bits/signum.h new file mode 100644 index 0000000000..f11c731a42 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/bits/signum.h @@ -0,0 +1,66 @@ +/* Signal number definitions. SVR4 version. + Copyright (C) 1994, 1996 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifdef _SIGNAL_H + +/* Fake signal functions. */ +#define SIG_ERR ((__sighandler_t) -1) /* Error return. */ +#define SIG_DFL ((__sighandler_t) 0) /* Default action. */ +#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */ + + +/* Signals. */ +#define SIGHUP 1 /* Hangup (POSIX). */ +#define SIGINT 2 /* Interrupt (ANSI). */ +#define SIGQUIT 3 /* Quit (POSIX). */ +#define SIGILL 4 /* Illegal instruction (ANSI). */ +#define SIGABRT SIGIOT /* Abort (ANSI). */ +#define SIGTRAP 5 /* Trace trap (POSIX). */ +#define SIGIOT 6 /* IOT trap (4.2 BSD). */ +#define SIGEMT 7 /* EMT trap (4.2 BSD). */ +#define SIGFPE 8 /* Floating-point exception (ANSI). */ +#define SIGKILL 9 /* Kill, unblockable (POSIX). */ +#define SIGBUS 10 /* Bus error (4.2 BSD). */ +#define SIGSEGV 11 /* Segmentation violation (ANSI). */ +#define SIGSYS 12 /* Bad argument to system call (4.2 BSD)*/ +#define SIGPIPE 13 /* Broken pipe (POSIX). */ +#define SIGALRM 14 /* Alarm clock (POSIX). */ +#define SIGTERM 15 /* Termination (ANSI). */ +#define SIGUSR1 16 /* User-defined signal 1 (POSIX). */ +#define SIGUSR2 17 /* User-defined signal 2 (POSIX). */ +#define SIGCHLD 18 /* Child status has changed (POSIX). */ +#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */ +#define SIGPWR 19 /* Power failure restart (System V). */ +#define SIGWINCH 20 /* Window size change (4.3 BSD, Sun). */ +#define SIGURG 21 /* Urgent condition on socket (4.2 BSD).*/ +#define SIGPOLL 22 /* Pollable event occurred (System V). */ +#define SIGIO SIGPOLL /* I/O now possible (4.2 BSD). */ +#define SIGSTOP 23 /* Stop, unblockable (POSIX). */ +#define SIGTSTP 24 /* Keyboard stop (POSIX). */ +#define SIGCONT 25 /* Continue (POSIX). */ +#define SIGTTIN 26 /* Background read from tty (POSIX). */ +#define SIGTTOU 27 /* Background write to tty (POSIX). */ +#define SIGVTALRM 28 /* Virtual alarm clock (4.2 BSD). */ +#define SIGPROF 29 /* Profiling alarm clock (4.2 BSD). */ +#define SIGXCPU 30 /* CPU limit exceeded (4.2 BSD). */ +#define SIGXFSZ 31 /* File size limit exceeded (4.2 BSD). */ + +#endif /* included. */ + +#define _NSIG 32 /* Biggest signal number + 1. */ diff --git a/sysdeps/unix/sysv/sysv4/bits/sigset.h b/sysdeps/unix/sysv/sysv4/bits/sigset.h new file mode 100644 index 0000000000..1461c93b3d --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/bits/sigset.h @@ -0,0 +1,96 @@ +/* __sig_atomic_t, __sigset_t, and related definitions. SVR4 version. + Copyright (C) 1994, 1995, 1996 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SIGSET_H_types +#define _SIGSET_H_types 1 + +typedef int __sig_atomic_t; + +/* A `sigset_t' has a bit for each signal. */ +typedef struct + { + unsigned long int __sigbits[4]; + } __sigset_t; + +#endif /* ! _SIGSET_H_types */ + +/* We only want to define these functions if was actually + included; otherwise we were included just to define the types. Since we + are namespace-clean, it wouldn't hurt to define extra macros. But + trouble can be caused by functions being defined (e.g., any global + register vars declared later will cause compilation errors). */ + +#if !defined (_SIGSET_H_fns) && defined (_SIGNAL_H) +#define _SIGSET_H_fns 1 + +/* Return a mask that includes SIG only. */ +#define __sigmask(sig) (1 << ((sig) - 1)) + + +/* It's easier to assume 8-bit bytes than to get CHAR_BIT. */ +#define __NSSBITS (sizeof (__sigset_t) * 8) +#define __SSELT(s) ((s) / __NSSBITS) +#define __SSMASK(s) (1 << ((s) % __NSSBITS)) + +#ifndef _EXTERN_INLINE +#define _EXTERN_INLINE extern __inline +#endif + +_EXTERN_INLINE int +__sigemptyset (__sigset_t *__set) +{ + __set->__sigbits[0] = __set->__sigbits[1] = + __set->__sigbits[2] = __set->__sigbits[3] = 0L; + return 0; +} + +_EXTERN_INLINE int +__sigfillset (__sigset_t *__set) +{ + /* SVR4 has a system call for `sigfillset' (!), and it only sets the bits + for signals [1,31]. Setting bits for unimplemented signals seems + harmless (and we will find out if it really is). */ + __set->__sigbits[0] = __set->__sigbits[1] = + __set->__sigbits[2] = __set->__sigbits[3] = ~0L; + return 0; +} + +_EXTERN_INLINE int +__sigaddset (__sigset_t *__set, int __sig) +{ + __set->__sigbits[__SSELT (__sig)] |= __SSMASK (__sig); + return 0; +} + +_EXTERN_INLINE int +__sigdelset (__sigset_t *__set, int __sig) +{ + __set->__sigbits[__SSELT (__sig)] &= ~__SSMASK (__sig); + return 0; +} + +_EXTERN_INLINE int +__sigismember (__const __sigset_t *__set, int __sig) +{ + if (__set->__sigbits[__SSELT (__sig)] & __SSMASK (__sig)) + return 1; + return 0; +} + +#endif /* ! _SIGSET_H_fns */ diff --git a/sysdeps/unix/sysv/sysv4/bits/utsname.h b/sysdeps/unix/sysv/sysv4/bits/utsname.h new file mode 100644 index 0000000000..9dcc618068 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/bits/utsname.h @@ -0,0 +1 @@ +#define _UTSNAME_LENGTH 257 diff --git a/sysdeps/unix/sysv/sysv4/bits/waitflags.h b/sysdeps/unix/sysv/sysv4/bits/waitflags.h new file mode 100644 index 0000000000..29ff566342 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/bits/waitflags.h @@ -0,0 +1,34 @@ +/* Definitions of flag bits for `waitpid' et al. + Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Brendan Kehoe (brendan@zen.org). + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_WAIT_H +#error "Never use directly; include instead." +#endif + + +/* Bits in the third argument to `waitpid'. */ +#define WNOHANG 64 /* Don't block waiting. */ +#define WUNTRACED 4 /* Report status of stopped children. */ + +#ifdef __USE_SVID +#define WEXITED 1 /* Look for children that have exited. */ +#define WTRAPPED 2 /* Look for processes that stopped + while tracing. */ +#endif From 3b9f6f616e268960a99a06f0c2d71586c8de4c42 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:54:03 +0000 Subject: [PATCH 0975/4487] SysVr4/I386 strcut stat definition. --- sysdeps/unix/sysv/sysv4/i386/bits/stat.h | 94 ++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/i386/bits/stat.h diff --git a/sysdeps/unix/sysv/sysv4/i386/bits/stat.h b/sysdeps/unix/sysv/sysv4/i386/bits/stat.h new file mode 100644 index 0000000000..9b6fed083d --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/i386/bits/stat.h @@ -0,0 +1,94 @@ +/* Copyright (C) 1993, 1996 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Brendan Kehoe (brendan@zen.org). + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* + * Never include this file directly; use instead. + */ + +#ifndef _BITS_STAT_H +#define _BITS_STAT_H 1 + +#include + +/* Versions of the `struct stat' data structure and + the bits of the `xmknod' interface. */ +#define _STAT_VER 2 +#define _MKNOD_VER 2 + +/* Structure describing file characteristics. */ +struct stat + { + unsigned long st_dev; /* Device. */ + long st_filler1[3]; + unsigned long st_ino; /* File serial number. */ + unsigned long st_mode; /* File mode. */ + unsigned long st_nlink; /* Link count. */ + long st_uid; /* User ID of the file's owner. */ + long st_gid; /* Group ID of the file's group.*/ + unsigned long st_rdev; /* Device number, if device. */ + long st_filler2[2]; + + long st_size; /* Size of file, in bytes. */ + /* SVR4 added this extra long to allow for expansion of off_t. */ + long st_filler3; + + long st_atime; /* Time of last access. */ + unsigned long st_atime_usec; + long st_mtime; /* Time of last modification. */ + unsigned long st_mtime_usec; + long st_ctime; /* Time of last status change. */ + unsigned long st_ctime_usec; + + long st_blksize; /* Optimal block size for I/O. */ +#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ + + long st_blocks; /* Number of 512-byte blocks allocated. */ + char st_fstype[16]; /* The type of this filesystem. */ + int st_aclcnt; + unsigned long st_level; + unsigned long st_flags; + unsigned long st_cmwlevel; + long st_filler4[4]; + }; + +/* Encoding of the file mode. */ + +#define __S_IFMT 0170000 /* These bits determine file type. */ + +/* File types. */ +#define __S_IFDIR 0040000 /* Directory. */ +#define __S_IFCHR 0020000 /* Character device. */ +#define __S_IFBLK 0060000 /* Block device. */ +#define __S_IFREG 0100000 /* Regular file. */ +#define __S_IFIFO 0010000 /* FIFO. */ + +/* These don't actually exist on System V, but having them doesn't hurt. */ +#define __S_IFLNK 0120000 /* Symbolic link. */ +#define __S_IFSOCK 0140000 /* Socket. */ + +/* Protection bits. */ + +#define __S_ISUID 04000 /* Set user ID on execution. */ +#define __S_ISGID 02000 /* Set group ID on execution. */ +#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ +#define __S_IREAD 0400 /* Read by owner. */ +#define __S_IWRITE 0200 /* Write by owner. */ +#define __S_IEXEC 0100 /* Execute by owner. */ + +#endif /* bits/stat.h */ From f6cf500d90785a672cbd2ccb4a5873248770eeec Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:54:46 +0000 Subject: [PATCH 0976/4487] Solaris/SPARC struct stat definition. --- sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h | 87 ++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h new file mode 100644 index 0000000000..ea5f1f4279 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h @@ -0,0 +1,87 @@ +/* Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Brendan Kehoe (brendan@zen.org). + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* + * Never include this file directly; use instead. + */ + +#ifndef _BITS_STAT_H +#define _BITS_STAT_H 1 + +#include + +/* Structure describing file characteristics. */ +struct stat + { + unsigned long int st_dev; + long st_filler1[3]; + __ino_t st_ino; /* File serial number. */ + unsigned long int st_mode; /* File mode. */ + /* This is unsigned long instead of __nlink_t, since SVR4 has + a long nlink_t, not a short one. */ + unsigned long int 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.*/ + unsigned long int st_rdev; /* Device number, if device. */ + long st_filler2[2]; + + __off_t st_size; /* Size of file, in bytes. */ + /* SVR4 added this extra long to allow for expansion of off_t. */ + long st_filler3; + + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atime_usec; + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtime_usec; + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctime_usec; + + long st_blksize; /* Optimal block size for I/O. */ +#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ + + long st_blocks; /* Number of 512-byte blocks allocated. */ + char st_fstype[16]; + long st_filler4[8]; + }; + +/* Encoding of the file mode. */ + +#define __S_IFMT 0170000 /* These bits determine file type. */ + +/* File types. */ +#define __S_IFDIR 0040000 /* Directory. */ +#define __S_IFCHR 0020000 /* Character device. */ +#define __S_IFBLK 0060000 /* Block device. */ +#define __S_IFREG 0100000 /* Regular file. */ +#define __S_IFIFO 0010000 /* FIFO. */ + +/* These don't actually exist on System V, but having them doesn't hurt. */ +#define __S_IFLNK 0120000 /* Symbolic link. */ +#define __S_IFSOCK 0140000 /* Socket. */ + +/* Protection bits. */ + +#define __S_ISUID 04000 /* Set user ID on execution. */ +#define __S_ISGID 02000 /* Set group ID on execution. */ +#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ +#define __S_IREAD 0400 /* Read by owner. */ +#define __S_IWRITE 0200 /* Write by owner. */ +#define __S_IEXEC 0100 /* Execute by owner. */ + +#endif /* bits/stat.h */ From aed27181d3412572e566fe78d8c18a450fcb2d87 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:54:55 +0000 Subject: [PATCH 0977/4487] Solaris/SPARC signal number definitions. --- .../unix/sysv/sysv4/solaris2/bits/signum.h | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/solaris2/bits/signum.h diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/signum.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/signum.h new file mode 100644 index 0000000000..4e5576425b --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/signum.h @@ -0,0 +1,73 @@ +/* Signal number definitions. Solaris 2 version. + Copyright (C) 1994, 1996 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifdef _SIGNAL_H + +/* Fake signal functions. */ +#define SIG_ERR ((__sighandler_t) -1) /* Error return. */ +#define SIG_DFL ((__sighandler_t) 0) /* Default action. */ +#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */ + + +/* Signals. */ +#define SIGHUP 1 /* Hangup (POSIX). */ +#define SIGINT 2 /* Interrupt (ANSI). */ +#define SIGQUIT 3 /* Quit (POSIX). */ +#define SIGILL 4 /* Illegal instruction (ANSI). */ +#define SIGABRT SIGIOT /* Abort (ANSI). */ +#define SIGTRAP 5 /* Trace trap (POSIX). */ +#define SIGIOT 6 /* IOT trap (4.2 BSD). */ +#define SIGEMT 7 /* EMT trap (4.2 BSD). */ +#define SIGFPE 8 /* Floating-point exception (ANSI). */ +#define SIGKILL 9 /* Kill, unblockable (POSIX). */ +#define SIGBUS 10 /* Bus error (4.2 BSD). */ +#define SIGSEGV 11 /* Segmentation violation (ANSI). */ +#define SIGSYS 12 /* Bad argument to system call (4.2 BSD)*/ +#define SIGPIPE 13 /* Broken pipe (POSIX). */ +#define SIGALRM 14 /* Alarm clock (POSIX). */ +#define SIGTERM 15 /* Termination (ANSI). */ +#define SIGUSR1 16 /* User-defined signal 1 (POSIX). */ +#define SIGUSR2 17 /* User-defined signal 2 (POSIX). */ +#define SIGCHLD 18 /* Child status has changed (POSIX). */ +#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */ +#define SIGPWR 19 /* Power failure restart (System V). */ +#define SIGWINCH 20 /* Window size change (4.3 BSD, Sun). */ +#define SIGURG 21 /* Urgent condition on socket (4.2 BSD).*/ +#define SIGPOLL 22 /* Pollable event occurred (System V). */ +#define SIGIO SIGPOLL /* I/O now possible (4.2 BSD). */ +#define SIGSTOP 23 /* Stop, unblockable (POSIX). */ +#define SIGTSTP 24 /* Keyboard stop (POSIX). */ +#define SIGCONT 25 /* Continue (POSIX). */ +#define SIGTTIN 26 /* Background read from tty (POSIX). */ +#define SIGTTOU 27 /* Background write to tty (POSIX). */ +#define SIGVTALRM 28 /* Virtual alarm clock (4.2 BSD). */ +#define SIGPROF 29 /* Profiling alarm clock (4.2 BSD). */ +#define SIGXCPU 30 /* CPU limit exceeded (4.2 BSD). */ +#define SIGXFSZ 31 /* File size limit exceeded (4.2 BSD). */ +/* The following signals are new in Solaris 2. */ +#define SIGWAITING 32 /* Process's lwps are blocked. */ +#define SIGLWP 33 /* Special signal used by thread library. */ +#define SIGFREEZE 34 /* Special signal used by CPR. */ +#define SIGTHAW 35 /* Special signal used by CPR. */ +#define _SIGRTMIN 36 /* First (highest-priority) realtime signal. */ +#define _SIGRTMAX 43 /* Last (lowest-priority) realtime signal. */ + +#endif /* included. */ + +#define _NSIG 44 /* Biggest signal number + 1. */ From 82b5be52d74386afc0cf6d07096ca83883d01d53 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:55:07 +0000 Subject: [PATCH 0978/4487] Solaris/SPARC signal context definition. --- sysdeps/unix/sysv/sysv4/solaris2/sparc/bits/sigcontext.h | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/sysv4/solaris2/sparc/bits/sigcontext.h diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/bits/sigcontext.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/bits/sigcontext.h new file mode 100644 index 0000000000..7402704864 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/bits/sigcontext.h @@ -0,0 +1 @@ +#include From 6ca4b63aa00af1a47845e0935dfad8e262b8a290 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Jun 1997 02:55:17 +0000 Subject: [PATCH 0979/4487] Vax specific math values. --- sysdeps/vax/bits/huge_val.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 sysdeps/vax/bits/huge_val.h diff --git a/sysdeps/vax/bits/huge_val.h b/sysdeps/vax/bits/huge_val.h new file mode 100644 index 0000000000..f323049d83 --- /dev/null +++ b/sysdeps/vax/bits/huge_val.h @@ -0,0 +1,26 @@ +/* `HUGE_VAL' constant for Vaxen. + Used by and functions for overflow. + Copyright (C) 1992, 1996 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _MATH_H +#error "Never use directly; include instead." +#endif + + +#define HUGE_VAL 1.70141182460469227e38 From 1594e779baa44e4600d15eb2d4530194e80e0672 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 23 Jun 1997 21:43:40 +0000 Subject: [PATCH 0980/4487] (__scalbn): Fix type of second argument. (__ilogb): Remove special case for zero, add stupid special case for NaN. (__ieee754_scalb): Remove definition. --- sysdeps/m68k/fpu/bits/mathinline.h | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/fpu/bits/mathinline.h index bdeaa9efb0..8899b752ff 100644 --- a/sysdeps/m68k/fpu/bits/mathinline.h +++ b/sysdeps/m68k/fpu/bits/mathinline.h @@ -138,14 +138,6 @@ __m81_defun (float_type, __CONCAT(__ieee754_fmod,s), \ float_type __result; \ __asm("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); \ return __result; \ -} \ - \ -__m81_defun (float_type, __CONCAT(__ieee754_scalb,s), \ - (float_type __x, float_type __n)) \ -{ \ - float_type __result; \ - __asm ("fscale%.x %1, %0" : "=f" (__result) : "f" (__n), "0" (__x)); \ - return __result; \ } __internal_inline_functions (double,) @@ -268,13 +260,16 @@ __m81_defun (int, __CONCAT(__signbit,s), (float_type __value)) \ __m81_defun (int, __CONCAT(__ilogb,s), (float_type __x)) \ { \ float_type __result; \ - if (__x == 0.0) \ - return 0x80000001; \ + if (__m81_u(__CONCAT(__isnan,s)) (__x)) \ + /* The stupid standard requires us to return a specific value where \ + it would depend on the bitpattern of the NaN. */ \ + return 0x7fffffff; \ __asm("fgetexp%.x %1, %0" : "=f" (__result) : "f" (__x)); \ return (int) __result; \ } \ \ -__m81_defun (float_type, __CONCAT(__scalbn,s), (float_type __x, int __n)) \ +__m81_defun (float_type, __CONCAT(__scalbn,s), \ + (float_type __x, long int __n)) \ { \ float_type __result; \ __asm ("fscale%.l %1, %0" : "=f" (__result) : "dmi" (__n), "0" (__x)); \ @@ -340,7 +335,7 @@ __inline_forward_c(double,ceil, (double __x), (__x)) #ifdef __USE_MISC __inline_forward_c(int,isinf, (double __value), (__value)) __inline_forward_c(int,finite, (double __value), (__value)) -__inline_forward_c(double,scalbn, (double __x, int __n), (__x, __n)) +__inline_forward_c(double,scalbn, (double __x, long int __n), (__x, __n)) #endif #if defined __USE_MISC || defined __USE_XOPEN #ifndef __USE_ISOC9X /* Conflict with macro of same name. */ @@ -365,7 +360,7 @@ __inline_forward_c(float,ceilf, (float __x), (__x)) #ifdef __USE_MISC __inline_forward_c(int,isinff, (float __value), (__value)) __inline_forward_c(int,finitef, (float __value), (__value)) -__inline_forward_c(float,scalbnf, (float __x, int __n), (__x, __n)) +__inline_forward_c(float,scalbnf, (float __x, long int __n), (__x, __n)) __inline_forward_c(int,isnanf, (float __value), (__value)) __inline_forward_c(int,ilogbf, (float __value), (__value)) #endif @@ -384,7 +379,7 @@ __inline_forward_c(long double,ceill, (long double __x), (__x)) #ifdef __USE_MISC __inline_forward_c(int,isinfl, (long double __value), (__value)) __inline_forward_c(int,finitel, (long double __value), (__value)) -__inline_forward_c(long double,scalbnl, (long double __x, int __n), +__inline_forward_c(long double,scalbnl, (long double __x, long int __n), (__x, __n)) __inline_forward_c(int,isnanl, (long double __value), (__value)) __inline_forward_c(int,ilogbl, (long double __value), (__value)) From 622cae1af0111a9992452e2f0d8102d94db24ab7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 23 Jun 1997 21:43:50 +0000 Subject: [PATCH 0981/4487] (FP_ILOGB0, FP_ILOGBNAN): Define. --- sysdeps/m68k/fpu/bits/mathdef.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sysdeps/m68k/fpu/bits/mathdef.h b/sysdeps/m68k/fpu/bits/mathdef.h index 4d07176405..4eaa58a3a9 100644 --- a/sysdeps/m68k/fpu/bits/mathdef.h +++ b/sysdeps/m68k/fpu/bits/mathdef.h @@ -17,7 +17,7 @@ Boston, MA 02111-1307, USA. */ #ifndef _MATH_H -#error "Never use directly; include instead" +# error "Never use directly; include instead" #endif @@ -34,3 +34,7 @@ typedef long double double_t; /* `double' expressions are evaluated as /* Define `INFINITY' as value of type `float_t'. */ #define INFINITY HUGE_VALL + +/* The values returned by `ilogb' for 0 and NaN respectively. */ +#define FP_ILOGB0 0 +#define FP_ILOGBNAN 0x7fffffff From 79c6cc00ff501232c9d87b25360f64b848a1b91f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 23 Jun 1997 21:44:21 +0000 Subject: [PATCH 0982/4487] Rewritten. --- sysdeps/m68k/fpu/e_scalb.c | 63 +++++++++++++++++++++++++++++++++++-- sysdeps/m68k/fpu/e_scalbf.c | 5 +-- sysdeps/m68k/fpu/e_scalbl.c | 5 +-- 3 files changed, 67 insertions(+), 6 deletions(-) diff --git a/sysdeps/m68k/fpu/e_scalb.c b/sysdeps/m68k/fpu/e_scalb.c index 51d9beefa6..a5923ab450 100644 --- a/sysdeps/m68k/fpu/e_scalb.c +++ b/sysdeps/m68k/fpu/e_scalb.c @@ -1,2 +1,61 @@ -#define FUNC __ieee754_scalb -#include +/* Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Schwab . + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#define __LIBC_M81_MATH_INLINES +#include + +#ifndef SUFF +#define SUFF +#endif +#ifndef float_type +#define float_type double +#endif + +#define CONCATX(a,b) __CONCAT(a,b) +#define s(name) CONCATX(name,SUFF) +#define m81(func) __m81_u(s(func)) + +float_type +s(__ieee754_scalb) (float_type x, float_type fn) +{ + float_type retval; + unsigned long x_cond = __m81_test (x); + unsigned long fn_cond = __m81_test (fn); + + if ((x_cond | fn_cond) & __M81_COND_NAN) + return x * fn; + + if (fn_cond & __M81_COND_INF) + { + if (!(fn_cond & __M81_COND_NEG)) + return x * fn; + else if (x_cond & __M81_COND_ZERO) + return x; + else if (x_cond & __M81_COND_INF) + return 0.0/0.0; + else + return x / -fn; + } + + if (m81(__rint) (fn) != fn) + return 0.0/0.0; + + __asm ("fscale%.x %1, %0" : "=f" (retval) : "f" (fn), "0" (x)); + return retval; +} diff --git a/sysdeps/m68k/fpu/e_scalbf.c b/sysdeps/m68k/fpu/e_scalbf.c index 1d2beae9ee..7943571246 100644 --- a/sysdeps/m68k/fpu/e_scalbf.c +++ b/sysdeps/m68k/fpu/e_scalbf.c @@ -1,2 +1,3 @@ -#define FUNC __ieee754_scalbf -#include +#define SUFF f +#define float_type float +#include diff --git a/sysdeps/m68k/fpu/e_scalbl.c b/sysdeps/m68k/fpu/e_scalbl.c index 92ab7a4ad1..35fb2dc0ed 100644 --- a/sysdeps/m68k/fpu/e_scalbl.c +++ b/sysdeps/m68k/fpu/e_scalbl.c @@ -1,2 +1,3 @@ -#define FUNC __ieee754_scalbl -#include +#define SUFF l +#define float_type long double +#include From 5290f578122f110c2f89ff8e2b73db66064fbacf Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 23 Jun 1997 21:44:36 +0000 Subject: [PATCH 0983/4487] Fix type of second argument. --- sysdeps/m68k/fpu/s_scalbn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/m68k/fpu/s_scalbn.c b/sysdeps/m68k/fpu/s_scalbn.c index 1d43a75de0..d3ba27fa46 100644 --- a/sysdeps/m68k/fpu/s_scalbn.c +++ b/sysdeps/m68k/fpu/s_scalbn.c @@ -31,7 +31,7 @@ float_type __CONCATX(__,FUNC) (x, exp) float_type x; - int exp; + long int exp; { return __m81_u(__CONCATX(__,FUNC))(x, exp); } From 36e28152c9092ff2812956aef1d76da418c30d6b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 23 Jun 1997 21:54:51 +0000 Subject: [PATCH 0984/4487] Update and reformat copyright, remove trailing white spaces and send through unexpand. --- sysdeps/alpha/__longjmp.c | 34 ++-- sysdeps/alpha/bits/setjmp.h | 32 ++-- sysdeps/alpha/divrem.h | 9 +- sysdeps/alpha/machine-gmon.h | 28 +-- sysdeps/alpha/setjmp_aux.c | 34 ++-- sysdeps/arm/fpu_control.h | 30 ++-- sysdeps/i860/memcopy.h | 28 +-- sysdeps/m68k/__longjmp.c | 34 ++-- sysdeps/m68k/fpu_control.h | 34 ++-- sysdeps/m68k/memcopy.h | 27 +-- sysdeps/m68k/s_isinfl.c | 34 ++-- sysdeps/m68k/s_isnanl.c | 34 ++-- sysdeps/m68k/setjmp.c | 34 ++-- sysdeps/mach/alpha/machine-lock.h | 34 ++-- sysdeps/mach/alpha/machine-sp.h | 34 ++-- sysdeps/mach/alpha/sysdep.h | 34 ++-- sysdeps/mach/alpha/thread_state.h | 34 ++-- sysdeps/mach/hppa/machine-lock.h | 34 ++-- sysdeps/mach/hurd/alpha/bits/sigcontext.h | 34 ++-- sysdeps/mach/hurd/alpha/exc2signal.c | 36 ++-- sysdeps/mach/hurd/alpha/longjmp-ts.c | 34 ++-- sysdeps/mach/hurd/alpha/sigreturn.c | 34 ++-- sysdeps/mach/hurd/alpha/trampoline.c | 30 ++-- sysdeps/mach/hurd/hppa/bits/sigcontext.h | 28 +-- sysdeps/mach/hurd/hppa/trampoline.c | 32 ++-- sysdeps/mach/hurd/mips/bits/sigcontext.h | 30 ++-- sysdeps/rs6000/memcopy.h | 28 +-- sysdeps/standalone/bits/stdio_lim.h | 35 ++-- sysdeps/standalone/close.c | 35 ++-- sysdeps/standalone/dirstream.h | 34 ++-- sysdeps/standalone/filedesc.h | 37 ++-- sysdeps/standalone/i386/i386.h | 167 +++++++++--------- sysdeps/standalone/m68k/m68020/m68020.h | 69 ++++---- sysdeps/standalone/open.c | 35 ++-- sysdeps/standalone/read.c | 35 ++-- sysdeps/standalone/standalone.h | 35 ++-- sysdeps/standalone/write.c | 29 ++- sysdeps/unix/arm/sysdep.h | 26 +-- sysdeps/unix/bsd/hp/m68k/sysdep.h | 34 ++-- sysdeps/unix/bsd/osf/alpha/sysdep.h | 27 +-- sysdeps/unix/bsd/sequent/i386/sysdep.h | 32 ++-- sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h | 34 ++-- sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h | 28 +-- sysdeps/unix/bsd/sun/m68k/sigtramp.c | 34 ++-- sysdeps/unix/bsd/sun/m68k/sysdep.h | 34 ++-- sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h | 29 ++- sysdeps/unix/bsd/sun/sparc/sigtramp.c | 34 ++-- sysdeps/unix/bsd/sun/sunos4/mmap.c | 34 ++-- sysdeps/unix/bsd/sun/sunos4/speed.c | 34 ++-- sysdeps/unix/bsd/ultrix4/bits/posix_opt.h | 27 +-- .../unix/bsd/ultrix4/mips/bits/sigcontext.h | 48 ++--- sysdeps/unix/bsd/ultrix4/sysconf.c | 27 +-- sysdeps/unix/bsd/vax/sysdep.h | 34 ++-- sysdeps/unix/mips/sysdep.h | 27 +-- sysdeps/unix/sysv/irix4/bits/confname.h | 28 +-- sysdeps/unix/sysv/irix4/getpriority.c | 28 +-- sysdeps/unix/sysv/irix4/setpriority.c | 28 +-- .../unix/sysv/linux/alpha/bits/sigaction.h | 34 ++-- sysdeps/unix/sysv/linux/alpha/bits/signum.h | 28 +-- sysdeps/unix/sysv/linux/alpha/sysdep.h | 36 ++-- sysdeps/unix/sysv/linux/m68k/sysdep.h | 38 ++-- sysdeps/unix/sysv/minix/bits/sigaction.h | 34 ++-- sysdeps/unix/sysv/sco3.2.4/bits/confname.h | 28 +-- sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h | 34 ++-- sysdeps/unix/sysv/sysv4/bits/sigaction.h | 30 ++-- sysdeps/unix/sysv/sysv4/i386/sysdep.h | 28 +-- sysdeps/unix/sysv/sysv4/sigaction.c | 28 +-- sysdeps/unix/sysv/sysv4/siginfo.h | 27 +-- .../unix/sysv/sysv4/solaris2/sparc/sysdep.h | 27 +-- sysdeps/unix/sysv/sysv4/sysconf.c | 27 +-- sysdeps/unix/sysv/sysv4/sysconfig.h | 28 +-- sysdeps/unix/sysv/sysv4/waitpid.c | 27 +-- sysdeps/vax/fl.h | 34 ++-- 73 files changed, 1236 insertions(+), 1238 deletions(-) diff --git a/sysdeps/alpha/__longjmp.c b/sysdeps/alpha/__longjmp.c index 65b6804bd3..98eba7c513 100644 --- a/sysdeps/alpha/__longjmp.c +++ b/sysdeps/alpha/__longjmp.c @@ -1,20 +1,20 @@ -/* Copyright (C) 1992, 1994 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ +/* Copyright (C) 1992, 1994, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* Global register vars must come before any function defn. */ diff --git a/sysdeps/alpha/bits/setjmp.h b/sysdeps/alpha/bits/setjmp.h index 6e6f6b4727..d461205c06 100644 --- a/sysdeps/alpha/bits/setjmp.h +++ b/sysdeps/alpha/bits/setjmp.h @@ -1,26 +1,26 @@ /* Define the machine-dependent type `jmp_buf'. Alpha version. -Copyright (C) 1992 Free Software Foundation, Inc. -This file is part of the GNU C Library. + Copyright (C) 1992, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ typedef struct { /* Integer registers: - $0 is the return value; + $0 is the return value; $1-$8, $22-$25, $28 are call-used; $9-$14 we save here; $15 is the FP and we save it here; @@ -36,7 +36,7 @@ typedef struct #if 1 /* XXX need predefine for TARGET_FPREGS */ /* Floating-point registers: - $f0 is the floating return value; + $f0 is the floating return value; $f1, $f10-$f15, $f22-$f30 are call-used; $f2-$f9 we save here; $f16-$21 are input args (call-used); diff --git a/sysdeps/alpha/divrem.h b/sysdeps/alpha/divrem.h index b83908dc9f..881b324a61 100644 --- a/sysdeps/alpha/divrem.h +++ b/sysdeps/alpha/divrem.h @@ -1,6 +1,5 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. Contributed by David Mosberger (davidm@cs.arizona.edu). - This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -14,9 +13,9 @@ Library General Public License for more details. You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If - not, write to the Free Software Foundation, Inc., 675 Mass Ave, - Cambridge, MA 02139, USA. */ + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* The current Alpha chips don't provide hardware for integer division. The C compiler expects the functions diff --git a/sysdeps/alpha/machine-gmon.h b/sysdeps/alpha/machine-gmon.h index e902537dd6..5014acd69b 100644 --- a/sysdeps/alpha/machine-gmon.h +++ b/sysdeps/alpha/machine-gmon.h @@ -1,21 +1,21 @@ /* Machine-specific calling sequence for `mcount' profiling function. alpha -Copyright (C) 1995, 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. + Copyright (C) 1995, 1996, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #define _MCOUNT_DECL(from, self) \ void __mcount (u_long from, u_long self) diff --git a/sysdeps/alpha/setjmp_aux.c b/sysdeps/alpha/setjmp_aux.c index 0f05f8b043..fa26975295 100644 --- a/sysdeps/alpha/setjmp_aux.c +++ b/sysdeps/alpha/setjmp_aux.c @@ -1,20 +1,20 @@ -/* Copyright (C) 1992, 1994 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ +/* Copyright (C) 1992, 1994, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* Global register decls must come before any function defn. */ diff --git a/sysdeps/arm/fpu_control.h b/sysdeps/arm/fpu_control.h index 6a4a4bb0f0..054085d70a 100644 --- a/sysdeps/arm/fpu_control.h +++ b/sysdeps/arm/fpu_control.h @@ -1,21 +1,21 @@ /* FPU control word definitions. Stub version. -Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. + Copyright (C) 1996, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _FPU_CONTROL_H #define _FPU_CONTROL_H @@ -30,7 +30,7 @@ Cambridge, MA 02139, USA. */ typedef unsigned int fpu_control_t; /* Macros for accessing the hardware control word. - * On the ARM, we can't do this from user mode (it would trap). + * On the ARM, we can't do this from user mode (it would trap). */ #define _FPU_GETCW(cw) __asm__ ("movnv r0,r0" : "=g" (cw)) #define _FPU_SETCW(cw) __asm__ ("movnv r0,r0" : : "g" (cw)) diff --git a/sysdeps/i860/memcopy.h b/sysdeps/i860/memcopy.h index 9f81326c97..d381acdaaf 100644 --- a/sysdeps/i860/memcopy.h +++ b/sysdeps/i860/memcopy.h @@ -1,20 +1,20 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1991, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/m68k/__longjmp.c b/sysdeps/m68k/__longjmp.c index 92dd803c17..c3e400c4c5 100644 --- a/sysdeps/m68k/__longjmp.c +++ b/sysdeps/m68k/__longjmp.c @@ -1,20 +1,20 @@ -/* Copyright (C) 1991, 1992, 1993, 1994, 1995 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ +/* Copyright (C) 1991, 92, 93, 94, 95, 97 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include #include diff --git a/sysdeps/m68k/fpu_control.h b/sysdeps/m68k/fpu_control.h index 97bde853bc..12ea1336c3 100644 --- a/sysdeps/m68k/fpu_control.h +++ b/sysdeps/m68k/fpu_control.h @@ -1,21 +1,21 @@ /* 68k FPU control word definitions. -Copyright (C) 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + Copyright (C) 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _FPU_CONTROL_H #define _FPU_CONTROL_H diff --git a/sysdeps/m68k/memcopy.h b/sysdeps/m68k/memcopy.h index 862e1b8a7f..b4d4614381 100644 --- a/sysdeps/m68k/memcopy.h +++ b/sysdeps/m68k/memcopy.h @@ -1,21 +1,22 @@ /* memcopy.h -- definitions for memory copy functions. Motorola 68020 version. - Copyright (C) 1991 Free Software Foundation, Inc. + Copyright (C) 1991, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Torbjorn Granlund (tege@sics.se). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/m68k/s_isinfl.c b/sysdeps/m68k/s_isinfl.c index 1b06d47d52..c94104d6e0 100644 --- a/sysdeps/m68k/s_isinfl.c +++ b/sysdeps/m68k/s_isinfl.c @@ -1,20 +1,20 @@ -/* Copyright (C) 1991, 1992, 1995 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ +/* Copyright (C) 1991, 1992, 1995, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include #include "ieee754.h" diff --git a/sysdeps/m68k/s_isnanl.c b/sysdeps/m68k/s_isnanl.c index 38a9616593..a2858509b0 100644 --- a/sysdeps/m68k/s_isnanl.c +++ b/sysdeps/m68k/s_isnanl.c @@ -1,20 +1,20 @@ -/* Copyright (C) 1991, 1992, 1995 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ +/* Copyright (C) 1991, 1992, 1995, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include #include "ieee754.h" diff --git a/sysdeps/m68k/setjmp.c b/sysdeps/m68k/setjmp.c index 95c723c122..1de9f68579 100644 --- a/sysdeps/m68k/setjmp.c +++ b/sysdeps/m68k/setjmp.c @@ -1,20 +1,20 @@ -/* Copyright (C) 1991, 1992, 1994 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ +/* Copyright (C) 1991, 1992, 1994, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/mach/alpha/machine-lock.h b/sysdeps/mach/alpha/machine-lock.h index 42e21d8df2..1da8b25584 100644 --- a/sysdeps/mach/alpha/machine-lock.h +++ b/sysdeps/mach/alpha/machine-lock.h @@ -1,21 +1,21 @@ /* Machine-specific definition for spin locks. Alpha version. -Copyright (C) 1994 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + Copyright (C) 1994, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _MACHINE_LOCK_H #define _MACHINE_LOCK_H diff --git a/sysdeps/mach/alpha/machine-sp.h b/sysdeps/mach/alpha/machine-sp.h index 6a8a3c6d40..d12e734d25 100644 --- a/sysdeps/mach/alpha/machine-sp.h +++ b/sysdeps/mach/alpha/machine-sp.h @@ -1,21 +1,21 @@ /* Machine-specific function to return the stack pointer. Alpha version. -Copyright (C) 1994 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + Copyright (C) 1994, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _MACHINE_SP_H #define _MACHINE_SP_H diff --git a/sysdeps/mach/alpha/sysdep.h b/sysdeps/mach/alpha/sysdep.h index a32766270b..6c1035a5e3 100644 --- a/sysdeps/mach/alpha/sysdep.h +++ b/sysdeps/mach/alpha/sysdep.h @@ -1,20 +1,20 @@ -/* Copyright (C) 1994 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ +/* Copyright (C) 1994, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #define MOVE(x,y) mov x, y diff --git a/sysdeps/mach/alpha/thread_state.h b/sysdeps/mach/alpha/thread_state.h index 28b0a15758..ea9f944064 100644 --- a/sysdeps/mach/alpha/thread_state.h +++ b/sysdeps/mach/alpha/thread_state.h @@ -1,21 +1,21 @@ /* Mach thread state definitions for machine-independent code. Alpha version. -Copyright (C) 1994 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + Copyright (C) 1994, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/mach/hppa/machine-lock.h b/sysdeps/mach/hppa/machine-lock.h index 0a178357a3..8b425d2c6d 100644 --- a/sysdeps/mach/hppa/machine-lock.h +++ b/sysdeps/mach/hppa/machine-lock.h @@ -1,21 +1,21 @@ /* Machine-specific definition for spin locks. HPPA version. -Copyright (C) 1995 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + Copyright (C) 1995, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _MACHINE_LOCK_H #define _MACHINE_LOCK_H diff --git a/sysdeps/mach/hurd/alpha/bits/sigcontext.h b/sysdeps/mach/hurd/alpha/bits/sigcontext.h index 32e0c94f98..3b17a4ada8 100644 --- a/sysdeps/mach/hurd/alpha/bits/sigcontext.h +++ b/sysdeps/mach/hurd/alpha/bits/sigcontext.h @@ -1,21 +1,21 @@ /* Machine-dependent signal context structure for GNU Hurd. Alpha version. -Copyright (C) 1994 Free Software Foundation, Inc. -This file is part of the GNU C Library. + Copyright (C) 1994, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* Signal handlers are actually called: void handler (int sig, int code, struct sigcontext *scp); */ @@ -40,9 +40,9 @@ struct sigcontext /* All following members are machine-dependent. The rest of this structure is written to be laid out identically to: { - struct alpha_thread_state basic; - struct alpha_exc_state exc; - struct alpha_float_state fpu; + struct alpha_thread_state basic; + struct alpha_exc_state exc; + struct alpha_float_state fpu; } trampoline.c knows this, so it must be changed if this changes. */ diff --git a/sysdeps/mach/hurd/alpha/exc2signal.c b/sysdeps/mach/hurd/alpha/exc2signal.c index edac0aaa67..072db334e0 100644 --- a/sysdeps/mach/hurd/alpha/exc2signal.c +++ b/sysdeps/mach/hurd/alpha/exc2signal.c @@ -1,21 +1,21 @@ /* Translate Mach exception codes into signal numbers. Alpha version. -Copyright (C) 1994 Free Software Foundation, Inc. -This file is part of the GNU C Library. + Copyright (C) 1994, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include #include @@ -36,7 +36,7 @@ _hurd_exception2signal (int exception, int code, int subcode, *signo = SIGIOT; *sigcode = exception; break; - + case EXC_BAD_ACCESS: if (code == KERN_PROTECTION_FAILURE) *signo = SIGSEGV; @@ -50,14 +50,14 @@ _hurd_exception2signal (int exception, int code, int subcode, *signo = SIGILL; *sigcode = code; break; - + case EXC_ARITHMETIC: *signo = SIGFPE; *sigcode = code; break; break; - case EXC_EMULATION: + case EXC_EMULATION: /* 3.0 doesn't give this one, why, I don't know. */ *signo = SIGEMT; *sigcode = code; @@ -67,7 +67,7 @@ _hurd_exception2signal (int exception, int code, int subcode, *signo = SIGEMT; *sigcode = code; break; - + case EXC_BREAKPOINT: *signo = SIGTRAP; *sigcode = code; diff --git a/sysdeps/mach/hurd/alpha/longjmp-ts.c b/sysdeps/mach/hurd/alpha/longjmp-ts.c index ad6f80cdb0..07dff563fb 100644 --- a/sysdeps/mach/hurd/alpha/longjmp-ts.c +++ b/sysdeps/mach/hurd/alpha/longjmp-ts.c @@ -1,21 +1,21 @@ /* Perform a `longjmp' on a Mach thread_state. Alpha version. -Copyright (C) 1991, 1994 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + Copyright (C) 1991, 1994, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include #include diff --git a/sysdeps/mach/hurd/alpha/sigreturn.c b/sysdeps/mach/hurd/alpha/sigreturn.c index e5dc383a3a..ff6e4edcaf 100644 --- a/sysdeps/mach/hurd/alpha/sigreturn.c +++ b/sysdeps/mach/hurd/alpha/sigreturn.c @@ -1,21 +1,21 @@ /* Return from signal handler in GNU C library for Hurd. Alpha version. -Copyright (C) 1994, 1995 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + Copyright (C) 1994, 1995, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include #include diff --git a/sysdeps/mach/hurd/alpha/trampoline.c b/sysdeps/mach/hurd/alpha/trampoline.c index f3872fcfe6..b650478347 100644 --- a/sysdeps/mach/hurd/alpha/trampoline.c +++ b/sysdeps/mach/hurd/alpha/trampoline.c @@ -1,21 +1,21 @@ /* Set thread_state for sighandler, and sigcontext to recover. Alpha version. -Copyright (C) 1994, 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. + Copyright (C) 1994, 1995, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include #include "thread_state.h" @@ -146,7 +146,7 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, still waiting for a reply. We will have it run the special trampoline code which retries the message receive before running the signal handler. - + To do this we change the OPTION argument in its registers to enable only message reception, since the request message has already been sent. */ diff --git a/sysdeps/mach/hurd/hppa/bits/sigcontext.h b/sysdeps/mach/hurd/hppa/bits/sigcontext.h index b616469f21..f450125463 100644 --- a/sysdeps/mach/hurd/hppa/bits/sigcontext.h +++ b/sysdeps/mach/hurd/hppa/bits/sigcontext.h @@ -1,21 +1,21 @@ /* Machine-dependent signal context structure for GNU Hurd. HPPA version. -Copyright (C) 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. + Copyright (C) 1995, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* Signal handlers are actually called: void handler (int sig, int code, struct sigcontext *scp); */ diff --git a/sysdeps/mach/hurd/hppa/trampoline.c b/sysdeps/mach/hurd/hppa/trampoline.c index 1dbbe6dead..ceb16235fe 100644 --- a/sysdeps/mach/hurd/hppa/trampoline.c +++ b/sysdeps/mach/hurd/hppa/trampoline.c @@ -1,21 +1,21 @@ /* Set thread_state for sighandler, and sigcontext to recover. HPPA version. -Copyright (C) 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. + Copyright (C) 1995, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include #include "thread_state.h" @@ -23,7 +23,7 @@ Cambridge, MA 02139, USA. */ #include #include "hurdfault.h" - + struct mach_msg_trap_regargs { /* These first four arguments are in registers 26..23. */ @@ -124,7 +124,7 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, still waiting for a reply. We will have it run the special trampoline code which retries the message receive before running the signal handler. - + To do this we change the OPTION argument on its stack to enable only message reception, since the request message has already been sent. */ diff --git a/sysdeps/mach/hurd/mips/bits/sigcontext.h b/sysdeps/mach/hurd/mips/bits/sigcontext.h index 81d1f25f25..64a57ab086 100644 --- a/sysdeps/mach/hurd/mips/bits/sigcontext.h +++ b/sysdeps/mach/hurd/mips/bits/sigcontext.h @@ -1,20 +1,20 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1994, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* Signal handlers are actually called: void handler (int sig, int code, struct sigcontext *scp); */ @@ -38,7 +38,7 @@ struct sigcontext /* All following members are machine-dependent. The rest of this structure is written to be laid out identically to: - { + { struct mips_thread_state ts; struct mips_exc_state es; struct mips_float_state fs; diff --git a/sysdeps/rs6000/memcopy.h b/sysdeps/rs6000/memcopy.h index 873b31200b..7f84f8807d 100644 --- a/sysdeps/rs6000/memcopy.h +++ b/sysdeps/rs6000/memcopy.h @@ -1,20 +1,20 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1991, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/standalone/bits/stdio_lim.h b/sysdeps/standalone/bits/stdio_lim.h index 5552bc4325..f5a503471c 100644 --- a/sysdeps/standalone/bits/stdio_lim.h +++ b/sysdeps/standalone/bits/stdio_lim.h @@ -1,23 +1,22 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil, On-Line Applications Research Corporation. - -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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #define L_tmpnam 1 #define TMPMAX 0 diff --git a/sysdeps/standalone/close.c b/sysdeps/standalone/close.c index 2d92937ec1..2e33b3c2c6 100644 --- a/sysdeps/standalone/close.c +++ b/sysdeps/standalone/close.c @@ -1,23 +1,22 @@ -/* Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc. Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil, On-Line Applications Research Corporation. - -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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include #include diff --git a/sysdeps/standalone/dirstream.h b/sysdeps/standalone/dirstream.h index 064513222e..d7cb9bc471 100644 --- a/sysdeps/standalone/dirstream.h +++ b/sysdeps/standalone/dirstream.h @@ -1,20 +1,20 @@ -/* Copyright (C) 1993 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ +/* Copyright (C) 1993, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _DIRSTREAM_H diff --git a/sysdeps/standalone/filedesc.h b/sysdeps/standalone/filedesc.h index e4b8d6545e..a35d1cf043 100644 --- a/sysdeps/standalone/filedesc.h +++ b/sysdeps/standalone/filedesc.h @@ -1,23 +1,22 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil, On-Line Applications Research Corporation. - -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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* * This is the file descriptor used by the no OS implementation @@ -32,7 +31,7 @@ Cambridge, MA 02139, USA. */ #ifndef __DECLARE_FILE_DESCRIPTORS__ #define FILEDESC_EXTERN extern #else -#define FILEDESC_EXTERN +#define FILEDESC_EXTERN #endif typedef struct { diff --git a/sysdeps/standalone/i386/i386.h b/sysdeps/standalone/i386/i386.h index 8302773709..20d7f01fe3 100644 --- a/sysdeps/standalone/i386/i386.h +++ b/sysdeps/standalone/i386/i386.h @@ -1,29 +1,28 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), On-Line Applications Research Corporation. - -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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* i386.h * - * This file contains macros which are used to access i80386 + * This file contains macros which are used to access i80386 * registers which are not addressable by C. This file contains - * functions which are useful to those developing target + * functions which are useful to those developing target * specific support routines. */ @@ -37,16 +36,16 @@ typedef unsigned int unsigned32; #define disable_intr( isrlevel ) \ { (isrlevel) = 0; \ asm volatile ( "pushf ; \ - pop %0 ; \ - cli " \ - : "=r" ((isrlevel)) : "0" ((isrlevel)) ); \ + pop %0 ; \ + cli " \ + : "=r" ((isrlevel)) : "0" ((isrlevel)) ); \ } #define enable_intr( isrlevel ) \ { asm volatile ( "push %0 ; \ - popf " \ - : "=r" ((isrlevel)) : "0" ((isrlevel)) ); \ + popf " \ + : "=r" ((isrlevel)) : "0" ((isrlevel)) ); \ } #define delay( _microseconds ) \ @@ -56,10 +55,10 @@ typedef unsigned int unsigned32; _counter = (_microseconds); \ \ asm volatile ( "0: nop;" \ - " mov %0,%0 ;" \ - " loop 0" : "=c" (_counter) \ - : "0" (_counter) \ - ); \ + " mov %0,%0 ;" \ + " loop 0" : "=c" (_counter) \ + : "0" (_counter) \ + ); \ \ } @@ -69,7 +68,7 @@ static inline unsigned16 get_cs() { register unsigned16 segment = 0; - asm volatile ( "movw %%cs,%0" : "=r" (segment) : "0" (segment) ); + asm volatile ( "movw %%cs,%0" : "=r" (segment) : "0" (segment) ); return segment; } @@ -78,7 +77,7 @@ static inline unsigned16 get_ds() { register unsigned16 segment = 0; - asm volatile ( "movw %%ds,%0" : "=r" (segment) : "0" (segment) ); + asm volatile ( "movw %%ds,%0" : "=r" (segment) : "0" (segment) ); return segment; } @@ -87,7 +86,7 @@ static inline unsigned16 get_es() { register unsigned16 segment = 0; - asm volatile ( "movw %%es,%0" : "=r" (segment) : "0" (segment) ); + asm volatile ( "movw %%es,%0" : "=r" (segment) : "0" (segment) ); return segment; } @@ -96,7 +95,7 @@ static inline unsigned16 get_ss() { register unsigned16 segment = 0; - asm volatile ( "movw %%ss,%0" : "=r" (segment) : "0" (segment) ); + asm volatile ( "movw %%ss,%0" : "=r" (segment) : "0" (segment) ); return segment; } @@ -105,7 +104,7 @@ static inline unsigned16 get_fs() { register unsigned16 segment = 0; - asm volatile ( "movw %%fs,%0" : "=r" (segment) : "0" (segment) ); + asm volatile ( "movw %%fs,%0" : "=r" (segment) : "0" (segment) ); return segment; } @@ -114,7 +113,7 @@ static inline unsigned16 get_gs() { register unsigned16 segment = 0; - asm volatile ( "movw %%gs,%0" : "=r" (segment) : "0" (segment) ); + asm volatile ( "movw %%gs,%0" : "=r" (segment) : "0" (segment) ); return segment; } @@ -126,8 +125,8 @@ static inline unsigned16 get_gs() register unsigned8 __value = _value; \ \ asm volatile ( "outb %0,%1" : "=a" (__value), "=d" (__port) \ - : "0" (__value), "1" (__port) \ - ); \ + : "0" (__value), "1" (__port) \ + ); \ } #define outport_word( _port, _value ) \ @@ -135,8 +134,8 @@ static inline unsigned16 get_gs() register unsigned16 __value = _value; \ \ asm volatile ( "outw %0,%1" : "=a" (__value), "=d" (__port) \ - : "0" (__value), "1" (__port) \ - ); \ + : "0" (__value), "1" (__port) \ + ); \ } #define outport_long( _port, _value ) \ @@ -144,8 +143,8 @@ static inline unsigned16 get_gs() register unsigned32 __value = _value; \ \ asm volatile ( "outl %0,%1" : "=a" (__value), "=d" (__port) \ - : "0" (__value), "1" (__port) \ - ); \ + : "0" (__value), "1" (__port) \ + ); \ } #define inport_byte( _port, _value ) \ @@ -153,8 +152,8 @@ static inline unsigned16 get_gs() register unsigned8 __value = 0; \ \ asm volatile ( "inb %1,%0" : "=a" (__value), "=d" (__port) \ - : "0" (__value), "1" (__port) \ - ); \ + : "0" (__value), "1" (__port) \ + ); \ _value = __value; \ } @@ -163,8 +162,8 @@ static inline unsigned16 get_gs() register unsigned16 __value = 0; \ \ asm volatile ( "inw %1,%0" : "=a" (__value), "=d" (__port) \ - : "0" (__value), "1" (__port) \ - ); \ + : "0" (__value), "1" (__port) \ + ); \ _value = __value; \ } @@ -173,8 +172,8 @@ static inline unsigned16 get_gs() register unsigned32 __value = 0; \ \ asm volatile ( "inl %1,%0" : "=a" (__value), "=d" (__port) \ - : "0" (__value), "1" (__port) \ - ); \ + : "0" (__value), "1" (__port) \ + ); \ _value = __value; \ } @@ -191,7 +190,7 @@ struct GDT_slot { unsigned8 base_24_31; }; -/* See Chapter 9 - Exceptions and Interrupts in i386 manual +/* See Chapter 9 - Exceptions and Interrupts in i386 manual * * NOTE: This is the IDT entry for interrupt gates ONLY. */ @@ -249,12 +248,12 @@ void *Physical_to_logical( register unsigned32 _temporary = 0; \ \ asm volatile( "movl %%gs:(%0),%1 ; \ - movl %1,(%2) ; \ - movl %%gs:4(%0),%1 ; \ - movl %1,4(%2)" \ - : "=r" (_gdt_slot), "=r" (_temporary), "=r" (_slot) \ - : "0" (_gdt_slot), "1" (_temporary), "2" (_slot) \ - ); \ + movl %1,(%2) ; \ + movl %%gs:4(%0),%1 ; \ + movl %1,4(%2)" \ + : "=r" (_gdt_slot), "=r" (_temporary), "=r" (_slot) \ + : "0" (_gdt_slot), "1" (_temporary), "2" (_slot) \ + ); \ } #define set_GDT_slot( _gdtr_base, _segment, _slot_address ) \ @@ -264,63 +263,63 @@ void *Physical_to_logical( register unsigned32 _temporary = 0; \ \ asm volatile( "movl (%2),%1 ; \ - movl %1,%%gs:(%0) ; \ - movl 4(%2),%1 ; \ - movl %1,%%gs:4(%0) \ - " \ - : "=r" (_gdt_slot), "=r" (_temporary), "=r" (_slot) \ - : "0" (_gdt_slot), "1" (_temporary), "2" (_slot) \ - ); \ + movl %1,%%gs:(%0) ; \ + movl 4(%2),%1 ; \ + movl %1,%%gs:4(%0) \ + " \ + : "=r" (_gdt_slot), "=r" (_temporary), "=r" (_slot) \ + : "0" (_gdt_slot), "1" (_temporary), "2" (_slot) \ + ); \ } -static inline void set_segment( - unsigned16 segment, +static inline void set_segment( + unsigned16 segment, unsigned32 base, - unsigned32 limit -) -{ - struct DTR_load_save_format gdtr; + unsigned32 limit +) +{ + struct DTR_load_save_format gdtr; volatile struct GDT_slot Gdt_slot; volatile struct GDT_slot *gdt_slot = &Gdt_slot; unsigned16 tmp_segment = 0; unsigned32 limit_adjusted; - - + + /* load physical address of the GDT */ get_GDTR( &gdtr ); - + gdt_slot->type_dt_dpl_p = 0x92; /* present, dpl=0, */ - /* application=1, */ - /* type=data read/write */ + /* application=1, */ + /* type=data read/write */ gdt_slot->limit_16_19_granularity = 0x40; /* 32 bit segment */ limit_adjusted = limit; if ( limit > 4095 ) { gdt_slot->limit_16_19_granularity |= 0x80; /* set granularity bit */ limit_adjusted /= 4096; - } - + } + gdt_slot->limit_16_19_granularity |= (limit_adjusted >> 16) & 0xff; gdt_slot->limit_0_15 = limit_adjusted & 0xffff; - + gdt_slot->base_0_15 = base & 0xffff; gdt_slot->base_16_23 = (base >> 16) & 0xff; gdt_slot->base_24_31 = (base >> 24); - + set_GDT_slot( gdtr.physical_address, segment, gdt_slot ); /* Now, reload all segment registers so the limit takes effect. */ asm volatile( "movw %%ds,%0 ; movw %0,%%ds - movw %%es,%0 ; movw %0,%%es - movw %%fs,%0 ; movw %0,%%fs - movw %%gs,%0 ; movw %0,%%gs - movw %%ss,%0 ; movw %0,%%ss" - : "=r" (tmp_segment) - : "0" (tmp_segment) - ); - + movw %%es,%0 ; movw %0,%%es + movw %%fs,%0 ; movw %0,%%fs + movw %%gs,%0 ; movw %0,%%gs + movw %%ss,%0 ; movw %0,%%ss" + : "=r" (tmp_segment) + : "0" (tmp_segment) + ); + } #endif diff --git a/sysdeps/standalone/m68k/m68020/m68020.h b/sysdeps/standalone/m68k/m68020/m68020.h index e9e6f7d875..8fce423f96 100644 --- a/sysdeps/standalone/m68k/m68020/m68020.h +++ b/sysdeps/standalone/m68k/m68020/m68020.h @@ -1,27 +1,26 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), On-Line Applications Research Corporation. - -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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* m68020.h * - * This file contains macros which are used to access MC68020 + * This file contains macros which are used to access MC68020 * registers which are not addressable by C. These are * useful when developing the board specific support. */ @@ -34,53 +33,53 @@ typedef void ( *mc68020_isr )( void ); #define disable_intr( level ) \ { (level) = 0; \ asm volatile ( "movew %%sr,%0 ; \ - orw #0x0700,%%sr" \ - : "=d" ((level)) : "0" ((level)) ); \ + orw #0x0700,%%sr" \ + : "=d" ((level)) : "0" ((level)) ); \ } #define enable_intr( level ) \ { asm volatile ( "movew %0,%%sr " \ - : "=d" ((level)) : "0" ((level)) ); \ + : "=d" ((level)) : "0" ((level)) ); \ } #define flash_intr( level ) \ { asm volatile ( "movew %0,%%sr ; \ - orw #0x0700,%%sr" \ - : "=d" ((level)) : "0" ((level)) ); \ + orw #0x0700,%%sr" \ + : "=d" ((level)) : "0" ((level)) ); \ } #define get_vbr( vbr ) \ { (vbr) = 0; \ asm volatile ( "movec %%vbr,%0 " \ - : "=a" (vbr) : "0" (vbr) ); \ + : "=a" (vbr) : "0" (vbr) ); \ } #define set_vbr( vbr ) \ { register mc68020_isr *_vbr= (mc68020_isr *)(vbr); \ asm volatile ( "movec %0,%%vbr " \ - : "=a" (_vbr) : "0" (_vbr) ); \ + : "=a" (_vbr) : "0" (_vbr) ); \ } #define enable_caching() \ { register unsigned int _ctl=0x01; \ asm volatile ( "movec %0,%%cacr" \ - : "=d" (_ctl) : "0" (_ctl) ); \ + : "=d" (_ctl) : "0" (_ctl) ); \ } #define delay( microseconds ) \ { register unsigned int _delay=(microseconds); \ register unsigned int _tmp=123; \ asm volatile( "0: \ - nbcd %0 ; \ - nbcd %0 ; \ - dbf %1,0 " \ - : "=d" (_tmp), "=d" (_delay) \ - : "0" (_tmp), "1" (_delay) ); \ + nbcd %0 ; \ + nbcd %0 ; \ + dbf %1,0 " \ + : "=d" (_tmp), "=d" (_delay) \ + : "0" (_tmp), "1" (_delay) ); \ } -#define enable_tracing() -#define cause_intr( X ) -#define clear_intr( X ) +#define enable_tracing() +#define cause_intr( X ) +#define clear_intr( X ) extern mc68020_isr M68Kvec[]; /* vector table address */ diff --git a/sysdeps/standalone/open.c b/sysdeps/standalone/open.c index b61b729ca6..25e26104c6 100644 --- a/sysdeps/standalone/open.c +++ b/sysdeps/standalone/open.c @@ -1,23 +1,22 @@ -/* Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc. Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil, On-Line Applications Research Corporation. - -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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include #include diff --git a/sysdeps/standalone/read.c b/sysdeps/standalone/read.c index 40322a5e71..43bc0d6666 100644 --- a/sysdeps/standalone/read.c +++ b/sysdeps/standalone/read.c @@ -1,23 +1,22 @@ -/* Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc. Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil, On-Line Applications Research Corporation. - -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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include #include diff --git a/sysdeps/standalone/standalone.h b/sysdeps/standalone/standalone.h index 13d58f03e8..57687da0f4 100644 --- a/sysdeps/standalone/standalone.h +++ b/sysdeps/standalone/standalone.h @@ -1,23 +1,22 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), On-Line Applications Research Corporation. - -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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _STANDALONE_H #define _STANDALONE_H diff --git a/sysdeps/standalone/write.c b/sysdeps/standalone/write.c index d377dd5e5c..9226bccc62 100644 --- a/sysdeps/standalone/write.c +++ b/sysdeps/standalone/write.c @@ -1,23 +1,22 @@ -/* Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc. Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil, On-Line Applications Research Corporation. + This file is part of the GNU C Library. -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 Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -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 -published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. -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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include #include diff --git a/sysdeps/unix/arm/sysdep.h b/sysdeps/unix/arm/sysdep.h index b1860dd443..b823b5a17d 100644 --- a/sysdeps/unix/arm/sysdep.h +++ b/sysdeps/unix/arm/sysdep.h @@ -1,20 +1,20 @@ /* Copyright (C) 1997 Free Software Foundation, Inc. -This file is part of the GNU C Library. + 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include #include diff --git a/sysdeps/unix/bsd/hp/m68k/sysdep.h b/sysdeps/unix/bsd/hp/m68k/sysdep.h index 3487ab2027..b0a8daa318 100644 --- a/sysdeps/unix/bsd/hp/m68k/sysdep.h +++ b/sysdeps/unix/bsd/hp/m68k/sysdep.h @@ -1,20 +1,20 @@ -/* Copyright (C) 1991, 1992, 1993, 1994, 1995 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ +/* Copyright (C) 1991, 92, 93, 94, 95, 97 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* This code wants to be run through m4. */ diff --git a/sysdeps/unix/bsd/osf/alpha/sysdep.h b/sysdeps/unix/bsd/osf/alpha/sysdep.h index 7bd7192c20..e9ad4d5fac 100644 --- a/sysdeps/unix/bsd/osf/alpha/sysdep.h +++ b/sysdeps/unix/bsd/osf/alpha/sysdep.h @@ -1,20 +1,21 @@ -/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* OSF/1 does not precede the asm names of C symbols with a `_'. */ #define NO_UNDERSCORES diff --git a/sysdeps/unix/bsd/sequent/i386/sysdep.h b/sysdeps/unix/bsd/sequent/i386/sysdep.h index f1365e764e..c54193fec2 100644 --- a/sysdeps/unix/bsd/sequent/i386/sysdep.h +++ b/sysdeps/unix/bsd/sequent/i386/sysdep.h @@ -1,21 +1,21 @@ /* System call interface code for Sequent Symmetry running Dynix version 3. -Copyright (C) 1993, 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. + Copyright (C) 1993, 1995, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include @@ -23,7 +23,7 @@ Cambridge, MA 02139, USA. */ /* Get the symbols for system call interrupts. */ #include - + /* Use the BSD versions of system calls, by setting the high 16 bits of the syscall number (see /usr/include/syscall.h). */ #define SYS_HANDLER (SYS_bsd << 16) @@ -71,7 +71,7 @@ Cambridge, MA 02139, USA. */ #define ARGS_4 ARGS_3 #define ARGS_5 ARGS_3 #define ARGS_6 ARGS_3 - + /* Dynix reverses %ecx and %edx relative to most i386 Unices. */ #undef r1 diff --git a/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h b/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h index a62c17edbc..e459856ff9 100644 --- a/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h +++ b/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h @@ -1,20 +1,20 @@ -/* Copyright (C) 1993, 1994, 1995 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ +/* Copyright (C) 1993, 1994, 1995, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h b/sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h index 471b516bdc..61481cc6a2 100644 --- a/sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h +++ b/sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h @@ -1,21 +1,21 @@ /* Structure describing state saved while handling a signal. Sun 3 version. -Copyright (C) 1993, 1994 Free Software Foundation, Inc. -This file is part of the GNU C Library. + Copyright (C) 1993, 1994, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ struct sigcontext { diff --git a/sysdeps/unix/bsd/sun/m68k/sigtramp.c b/sysdeps/unix/bsd/sun/m68k/sigtramp.c index db9ffb5135..f5133dbdb3 100644 --- a/sysdeps/unix/bsd/sun/m68k/sigtramp.c +++ b/sysdeps/unix/bsd/sun/m68k/sigtramp.c @@ -1,20 +1,20 @@ -/* Copyright (C) 1993, 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ +/* Copyright (C) 1993, 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef __GNUC__ #error This file uses GNU C extensions; you must compile with GCC. diff --git a/sysdeps/unix/bsd/sun/m68k/sysdep.h b/sysdeps/unix/bsd/sun/m68k/sysdep.h index 80f6aba7b0..1c501bcb5a 100644 --- a/sysdeps/unix/bsd/sun/m68k/sysdep.h +++ b/sysdeps/unix/bsd/sun/m68k/sysdep.h @@ -1,20 +1,20 @@ -/* Copyright (C) 1991, 1992, 1994, 1995 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ +/* Copyright (C) 1991, 1992, 1994, 1995, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h b/sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h index 290bf817af..e1cdd416a1 100644 --- a/sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h +++ b/sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h @@ -1,21 +1,21 @@ /* Structure describing state saved while handling a signal. Sparc version. -Copyright (C) 1992, 1994 Free Software Foundation, Inc. -This file is part of the GNU C Library. + Copyright (C) 1992, 1994, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ struct sigcontext { @@ -28,4 +28,3 @@ struct sigcontext __ptr_t sc_spbuf[SPARC_MAXREGWINDOW]; /* SP's for each window. */ int sc_wbuf[SPARC_MAXREGWINDOW][16]; /* Saved register windows. */ }; - diff --git a/sysdeps/unix/bsd/sun/sparc/sigtramp.c b/sysdeps/unix/bsd/sun/sparc/sigtramp.c index 11ce1945ff..5c0dcf2ba6 100644 --- a/sysdeps/unix/bsd/sun/sparc/sigtramp.c +++ b/sysdeps/unix/bsd/sun/sparc/sigtramp.c @@ -1,20 +1,20 @@ -/* Copyright (C) 1991, 1992, 1994, 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ +/* Copyright (C) 1991, 1992, 1994, 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef __GNUC__ #error This file uses GNU C extensions; you must compile with GCC. diff --git a/sysdeps/unix/bsd/sun/sunos4/mmap.c b/sysdeps/unix/bsd/sun/sunos4/mmap.c index b71937381b..7c373c41af 100644 --- a/sysdeps/unix/bsd/sun/sunos4/mmap.c +++ b/sysdeps/unix/bsd/sun/sunos4/mmap.c @@ -1,20 +1,20 @@ -/* Copyright (C) 1994, 1995 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ +/* Copyright (C) 1994, 1995, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include #include diff --git a/sysdeps/unix/bsd/sun/sunos4/speed.c b/sysdeps/unix/bsd/sun/sunos4/speed.c index de6870a51d..8d929bc6dc 100644 --- a/sysdeps/unix/bsd/sun/sunos4/speed.c +++ b/sysdeps/unix/bsd/sun/sunos4/speed.c @@ -1,21 +1,21 @@ /* `struct termios' speed frobnication functions. SunOS 4 version. -Copyright (C) 1991, 1992, 1993, 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + Copyright (C) 1991, 1992, 1993, 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include #include diff --git a/sysdeps/unix/bsd/ultrix4/bits/posix_opt.h b/sysdeps/unix/bsd/ultrix4/bits/posix_opt.h index ecd04d1f0e..7736504e1c 100644 --- a/sysdeps/unix/bsd/ultrix4/bits/posix_opt.h +++ b/sysdeps/unix/bsd/ultrix4/bits/posix_opt.h @@ -1,20 +1,21 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Ian Lance Taylor (ian@airs.com). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #define _POSIX_JOB_CONTROL 1 #define _POSIX_SAVED_IDS 1 diff --git a/sysdeps/unix/bsd/ultrix4/mips/bits/sigcontext.h b/sysdeps/unix/bsd/ultrix4/mips/bits/sigcontext.h index 4bddcf2f4b..72b29e5649 100644 --- a/sysdeps/unix/bsd/ultrix4/mips/bits/sigcontext.h +++ b/sysdeps/unix/bsd/ultrix4/mips/bits/sigcontext.h @@ -1,20 +1,21 @@ -/* Copyright (C) 1992, 1994 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1994, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* Note that ANY change to this instantly implies a change to __handler.S. */ @@ -22,39 +23,38 @@ struct sigcontext { /* Nonzero if running on signal stack. */ int sc_onstack; - + /* Signal mask to restore. */ __sigset_t sc_mask; - + /* Program counter when the signal hit. */ __ptr_t sc_pc; - + /* Registers 0 through 31. */ int sc_regs[32]; - + /* mul/div low and hi; these aren't part of a jmp_buf, but are part of the sigcontext and are referenced from the signal trampoline code. */ int sc_mdlo; int sc_mdhi; - + /* Flag to see if the FP's been used. */ int sc_ownedfp; - + /* Floating point registers 0 to 31. */ int sc_fpregs[32]; /* Control & status register for FP. */ int sc_fpc_csr; - + /* Exception instruction register for FP. */ int sc_fpc_eir; - + /* The coprocessor's cause register. */ int sc_cause; - + /* CPU bad virtual address. */ __ptr_t sc_badvaddr; - + /* CPU board bad physical address. */ __ptr_t sc_badpaddr; }; - diff --git a/sysdeps/unix/bsd/ultrix4/sysconf.c b/sysdeps/unix/bsd/ultrix4/sysconf.c index a24c1c5ce8..6bf8ca4cb3 100644 --- a/sysdeps/unix/bsd/ultrix4/sysconf.c +++ b/sysdeps/unix/bsd/ultrix4/sysconf.c @@ -1,20 +1,21 @@ -/* Copyright (C) 1992, 1995, 1996 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Ian Lance Taylor (ian@airs.com). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* On Ultrix we can use the getsysinfo call to get the right return value for _SC_CHILD_MAX. Everything else is from , diff --git a/sysdeps/unix/bsd/vax/sysdep.h b/sysdeps/unix/bsd/vax/sysdep.h index aeddad99ae..a2cf00750f 100644 --- a/sysdeps/unix/bsd/vax/sysdep.h +++ b/sysdeps/unix/bsd/vax/sysdep.h @@ -1,20 +1,20 @@ -/* Copyright (C) 1991, 1992, 1995 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ +/* Copyright (C) 1991, 1992, 1995, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/mips/sysdep.h b/sysdeps/unix/mips/sysdep.h index c09c5af7d2..2f148d0938 100644 --- a/sysdeps/unix/mips/sysdep.h +++ b/sysdeps/unix/mips/sysdep.h @@ -1,20 +1,21 @@ -/* Copyright (C) 1992, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/sysv/irix4/bits/confname.h b/sysdeps/unix/sysv/irix4/bits/confname.h index 49d2f9c989..c185f22adf 100644 --- a/sysdeps/unix/sysv/irix4/bits/confname.h +++ b/sysdeps/unix/sysv/irix4/bits/confname.h @@ -1,21 +1,21 @@ /* `sysconf', `pathconf', and `confstr' NAME values. Irix 4 version. -Copyright (C) 1994 Free Software Foundation, Inc. -This file is part of the GNU C Library. + Copyright (C) 1994, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* Values for the NAME argument to `pathconf' and `fpathconf'. */ enum diff --git a/sysdeps/unix/sysv/irix4/getpriority.c b/sysdeps/unix/sysv/irix4/getpriority.c index 6ba6219791..290573a65c 100644 --- a/sysdeps/unix/sysv/irix4/getpriority.c +++ b/sysdeps/unix/sysv/irix4/getpriority.c @@ -1,20 +1,20 @@ -/* Copyright (C) 1994, 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1994, 1996, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include #include diff --git a/sysdeps/unix/sysv/irix4/setpriority.c b/sysdeps/unix/sysv/irix4/setpriority.c index 322813a7dd..5d6313ae1c 100644 --- a/sysdeps/unix/sysv/irix4/setpriority.c +++ b/sysdeps/unix/sysv/irix4/setpriority.c @@ -1,20 +1,20 @@ -/* Copyright (C) 1994, 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1994, 1996, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include #include diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h index 57ce5e6ded..e2e97bd70c 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h @@ -1,21 +1,21 @@ /* The proper definitions for Linux/Alpha sigaction. -Copyright (C) 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ + Copyright (C) 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* Structure describing the action to be taken when a signal arrives. */ struct sigaction diff --git a/sysdeps/unix/sysv/linux/alpha/bits/signum.h b/sysdeps/unix/sysv/linux/alpha/bits/signum.h index be6132d42f..ac5c34cd1a 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/signum.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/signum.h @@ -1,21 +1,21 @@ /* Signal number definitions. Linux/Alpha version. -Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. + Copyright (C) 1996, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifdef _SIGNAL_H diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h index 8f5f5dde61..6c88f76eaf 100644 --- a/sysdeps/unix/sysv/linux/alpha/sysdep.h +++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h @@ -1,21 +1,21 @@ -/* Copyright (C) 1992, 1993, 1995, 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. -Contributed by Ulrich Drepper, , August 1995. - -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 -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ +/* Copyright (C) 1992, 1993, 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper, , August 1995. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifdef ASSEMBLER diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h index 557f10cb9c..5263c71ecf 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -1,22 +1,22 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. -Written by Andreas Schwab, , -December 1995. - -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 -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ +/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Written by Andreas Schwab, , + December 1995. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/sysv/minix/bits/sigaction.h b/sysdeps/unix/sysv/minix/bits/sigaction.h index 6b0c460914..5bf5985c51 100644 --- a/sysdeps/unix/sysv/minix/bits/sigaction.h +++ b/sysdeps/unix/sysv/minix/bits/sigaction.h @@ -1,20 +1,20 @@ -/* Copyright (C) 1992, 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ +/* Copyright (C) 1992, 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* Structure describing the action to be taken when a signal arrives. */ struct sigaction diff --git a/sysdeps/unix/sysv/sco3.2.4/bits/confname.h b/sysdeps/unix/sysv/sco3.2.4/bits/confname.h index 0408951863..3af9377ded 100644 --- a/sysdeps/unix/sysv/sco3.2.4/bits/confname.h +++ b/sysdeps/unix/sysv/sco3.2.4/bits/confname.h @@ -1,21 +1,21 @@ /* `sysconf', `pathconf', and `confstr' NAME values. Generic version. -Copyright (C) 1993 Free Software Foundation, Inc. -This file is part of the GNU C Library. + Copyright (C) 1993, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* Values for the NAME argument to `pathconf' and `fpathconf'. */ #define _PC_LINK_MAX 0 diff --git a/sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h b/sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h index c21b928cdb..f66877da0b 100644 --- a/sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h +++ b/sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h @@ -1,21 +1,21 @@ /* The proper definitions for SCO's sigaction. -Copyright (C) 1993, 1994, 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + Copyright (C) 1993, 1994, 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* Structure describing the action to be taken when a signal arrives. */ struct sigaction diff --git a/sysdeps/unix/sysv/sysv4/bits/sigaction.h b/sysdeps/unix/sysv/sysv4/bits/sigaction.h index 1305ba61e6..3a2ffb2e10 100644 --- a/sysdeps/unix/sysv/sysv4/bits/sigaction.h +++ b/sysdeps/unix/sysv/sysv4/bits/sigaction.h @@ -1,21 +1,21 @@ /* The proper definitions for SVR4's sigaction. -Copyright (C) 1993, 1994, 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. + Copyright (C) 1993, 1994, 1996, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* Structure describing the action to be taken when a signal arrives. */ struct sigaction @@ -40,7 +40,7 @@ struct sigaction #define SA_RESTART 0x4 /* Don't restart syscall on signal return. */ #define SA_SIGINFO 0x8 /* Provide additional info to the handler. */ #define SA_NODEFER 0x10 /* Don't automatically block the signal when - its handler is being executed. */ + its handler is being executed. */ #define SA_NOCLDWAIT 0x10000 /* Don't save zombie processes. */ #endif #define SA_NOCLDSTOP 0x20000 /* Don't send SIGCHLD when children stop. */ diff --git a/sysdeps/unix/sysv/sysv4/i386/sysdep.h b/sysdeps/unix/sysv/sysv4/i386/sysdep.h index ad262e23de..77ee6a02ed 100644 --- a/sysdeps/unix/sysv/sysv4/i386/sysdep.h +++ b/sysdeps/unix/sysv/sysv4/i386/sysdep.h @@ -1,20 +1,20 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1994, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/sysv/sysv4/sigaction.c b/sysdeps/unix/sysv/sysv4/sigaction.c index 37893fa649..4cd4150855 100644 --- a/sysdeps/unix/sysv/sysv4/sigaction.c +++ b/sysdeps/unix/sysv/sysv4/sigaction.c @@ -1,20 +1,20 @@ -/* Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1994, 1995, 1996, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include #include diff --git a/sysdeps/unix/sysv/sysv4/siginfo.h b/sysdeps/unix/sysv/sysv4/siginfo.h index ce8dd35bf1..316cd4734b 100644 --- a/sysdeps/unix/sysv/sysv4/siginfo.h +++ b/sysdeps/unix/sysv/sysv4/siginfo.h @@ -1,21 +1,22 @@ /* Definitions of the siginfo structure. - Copyright (C) 1993, 1994 Free Software Foundation, Inc. + Copyright (C) 1993, 1994, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _SIGINFO_H #define _SIGINFO_H 1 diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h index 49eac9a3eb..7cc10fd44f 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h @@ -1,20 +1,21 @@ -/* Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1994, 1995, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* Solaris 2 does not precede the asm names of C symbols with a `_'. */ #ifndef NO_UNDERSCORES diff --git a/sysdeps/unix/sysv/sysv4/sysconf.c b/sysdeps/unix/sysv/sysv4/sysconf.c index cd0e84480f..98fdbb125a 100644 --- a/sysdeps/unix/sysv/sysv4/sysconf.c +++ b/sysdeps/unix/sysv/sysv4/sysconf.c @@ -1,20 +1,21 @@ -/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include #include diff --git a/sysdeps/unix/sysv/sysv4/sysconfig.h b/sysdeps/unix/sysv/sysv4/sysconfig.h index 77c84c7af6..6af9cb8fb4 100644 --- a/sysdeps/unix/sysv/sysv4/sysconfig.h +++ b/sysdeps/unix/sysv/sysv4/sysconfig.h @@ -1,21 +1,22 @@ /* `__sysconfig' NAME values. - Copyright (C) 1993 Free Software Foundation, Inc. + Copyright (C) 1993, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef __SYSCONFIG_H #define __SYSCONFIG_H @@ -25,4 +26,3 @@ Cambridge, MA 02139, USA. */ #define _CONFIG_CLK_TCK 7 /* all times are in CLK_TCKths of a second */ #endif - diff --git a/sysdeps/unix/sysv/sysv4/waitpid.c b/sysdeps/unix/sysv/sysv4/waitpid.c index 586a374ce9..4f43527f67 100644 --- a/sysdeps/unix/sysv/sysv4/waitpid.c +++ b/sysdeps/unix/sysv/sysv4/waitpid.c @@ -1,20 +1,21 @@ -/* Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include #include diff --git a/sysdeps/vax/fl.h b/sysdeps/vax/fl.h index 49e745697a..abf6662c67 100644 --- a/sysdeps/vax/fl.h +++ b/sysdeps/vax/fl.h @@ -1,20 +1,20 @@ -/* Copyright (C) 1991 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ +/* Copyright (C) 1991, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef __need_HUGE_VAL From 922ac64192bb698ce17af725bbbbc892215edb93 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 26 Jun 1997 22:12:06 +0000 Subject: [PATCH 0985/4487] Update and reformat copyright, remove trailing white spaces and send through unexpand. --- sysdeps/alpha/strlen.S | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/sysdeps/alpha/strlen.S b/sysdeps/alpha/strlen.S index 026c8addc2..60be29cf8b 100644 --- a/sysdeps/alpha/strlen.S +++ b/sysdeps/alpha/strlen.S @@ -1,22 +1,21 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. Contributed by David Mosberger (davidm@cs.arizona.edu). + This file is part of the GNU C Library. -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 Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -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 -published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. -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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* Finds length of a 0-terminated string. Optimized for the Alpha architecture: From db31c8639508fb94dcc207ede4e593e12e81576f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 26 Jun 1997 22:16:52 +0000 Subject: [PATCH 0986/4487] Update and reformat copyright, remove trailing white spaces and send through unexpand. --- sysdeps/alpha/_mcount.S | 56 ++-- sysdeps/alpha/bb_init_func.S | 35 +- sysdeps/alpha/bzero.S | 35 +- sysdeps/alpha/elf/start.S | 35 +- sysdeps/alpha/ffs.S | 67 ++-- sysdeps/alpha/memset.S | 35 +- sysdeps/alpha/s_fabs.S | 30 +- sysdeps/alpha/strcmp.S | 11 +- sysdeps/alpha/strncmp.S | 11 +- sysdeps/alpha/strncpy.S | 35 +- sysdeps/alpha/strrchr.S | 35 +- sysdeps/alpha/stxcpy.S | 31 +- sysdeps/alpha/stxncpy.S | 33 +- sysdeps/m68k/bsd-_setjmp.S | 28 +- sysdeps/m68k/bsd-setjmp.S | 28 +- sysdeps/mach/alpha/syscall.S | 30 +- sysdeps/mips/elf/start.S | 36 +-- .../standalone/i386/force_cpu386/strtsupp.S | 92 +++--- sysdeps/standalone/i386/start.S | 302 +++++++++--------- sysdeps/standalone/i960/start.S | 148 +++++---- sysdeps/standalone/m68k/m68020/start.S | 145 +++++---- sysdeps/unix/arm/brk.S | 32 +- sysdeps/unix/arm/fork.S | 26 +- sysdeps/unix/bsd/hp/m68k/brk.S | 34 +- sysdeps/unix/bsd/hp/m68k/vfork.S | 34 +- sysdeps/unix/bsd/hp/m68k/wait3.S | 34 +- sysdeps/unix/bsd/m68k/pipe.S | 28 +- sysdeps/unix/bsd/m68k/syscall.S | 28 +- sysdeps/unix/bsd/m68k/sysdep.S | 28 +- sysdeps/unix/bsd/m68k/wait.S | 28 +- sysdeps/unix/bsd/osf/alpha/brk.S | 27 +- sysdeps/unix/bsd/osf/alpha/fork.S | 27 +- sysdeps/unix/bsd/osf/alpha/killpg.S | 27 +- sysdeps/unix/bsd/osf/alpha/pipe.S | 27 +- sysdeps/unix/bsd/osf/alpha/recv.S | 28 +- sysdeps/unix/bsd/osf/alpha/send.S | 28 +- sysdeps/unix/bsd/osf/alpha/sigblock.S | 27 +- sysdeps/unix/bsd/osf/alpha/sigpause.S | 27 +- sysdeps/unix/bsd/osf/alpha/sigsetmask.S | 27 +- sysdeps/unix/bsd/osf/alpha/sigvec.S | 27 +- sysdeps/unix/bsd/osf/alpha/start.S | 27 +- sysdeps/unix/bsd/osf/alpha/vhangup.S | 28 +- sysdeps/unix/bsd/sequent/i386/getgroups.S | 28 +- sysdeps/unix/bsd/sequent/i386/sigvec.S | 34 +- sysdeps/unix/bsd/sequent/i386/syscall.S | 28 +- sysdeps/unix/bsd/sun/m68k/brk.S | 34 +- sysdeps/unix/bsd/sun/m68k/sethostid.S | 34 +- sysdeps/unix/bsd/sun/m68k/syscall.S | 28 +- sysdeps/unix/bsd/sun/m68k/vfork.S | 34 +- sysdeps/unix/bsd/sun/sigreturn.S | 28 +- sysdeps/unix/bsd/sun/sparc/sethostid.S | 34 +- sysdeps/unix/bsd/ultrix4/mips/__handler.S | 27 +- sysdeps/unix/bsd/ultrix4/mips/start.S | 27 +- sysdeps/unix/bsd/ultrix4/mips/vfork.S | 27 +- sysdeps/unix/bsd/ultrix4/wait3.S | 27 +- sysdeps/unix/bsd/vax/brk.S | 34 +- sysdeps/unix/bsd/vax/pipe.S | 28 +- sysdeps/unix/bsd/vax/sysdep.S | 28 +- sysdeps/unix/bsd/vax/vfork.S | 34 +- sysdeps/unix/bsd/vax/wait.S | 28 +- sysdeps/unix/bsd/vax/wait3.S | 34 +- sysdeps/unix/mips/brk.S | 27 +- sysdeps/unix/mips/fork.S | 27 +- sysdeps/unix/mips/pipe.S | 27 +- sysdeps/unix/mips/sigreturn.S | 27 +- sysdeps/unix/mips/sysdep.S | 27 +- sysdeps/unix/mips/wait.S | 27 +- sysdeps/unix/sysv/i386/signal.S | 28 +- sysdeps/unix/sysv/irix4/__handler.S | 27 +- sysdeps/unix/sysv/irix4/sigreturn.S | 27 +- sysdeps/unix/sysv/irix4/uname.S | 28 +- sysdeps/unix/sysv/irix4/wait.S | 27 +- sysdeps/unix/sysv/linux/alpha/pipe.S | 27 +- sysdeps/unix/sysv/linux/m68k/mmap.S | 30 +- sysdeps/unix/sysv/linux/m68k/sigreturn.S | 28 +- sysdeps/unix/sysv/linux/m68k/socket.S | 30 +- sysdeps/unix/sysv/sco3.2.4/sigaction.S | 28 +- sysdeps/unix/sysv/sco3.2.4/sysconf.S | 28 +- sysdeps/unix/sysv/sco3.2.4/uname.S | 31 +- sysdeps/unix/sysv/sco3.2.4/waitpid.S | 28 +- sysdeps/unix/sysv/sysv4/i386/sys-sig.S | 28 +- sysdeps/unix/sysv/sysv4/solaris2/fsync.S | 27 +- .../unix/sysv/sysv4/solaris2/sparc/sysdep.S | 27 +- sysdeps/vax/bsd-_setjmp.S | 28 +- sysdeps/vax/bsd-setjmp.S | 28 +- 85 files changed, 1554 insertions(+), 1546 deletions(-) diff --git a/sysdeps/alpha/_mcount.S b/sysdeps/alpha/_mcount.S index 6c4af3f233..f4c234db38 100644 --- a/sysdeps/alpha/_mcount.S +++ b/sysdeps/alpha/_mcount.S @@ -1,37 +1,37 @@ /* Machine-specific calling sequence for `mcount' profiling function. alpha -Copyright (C) 1995, 1996 Free Software Foundation, Inc. -Contributed by David Mosberger (davidm@cs.arizona.edu). -This file is part of the GNU C Library. + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + Contributed by David Mosberger (davidm@cs.arizona.edu). + 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* Assembly stub to invoke _mcount(). Compiler generated code calls -this stub after executing a function's prologue and without saving any -registers. It is therefore necessary to preserve a0..a5 as they may -contain function arguments. To work correctly with frame- less -functions, it is also necessary to preserve ra. Finally, division -routines are invoked with a special calling convention and the -compiler treats those calls as if they were instructions. In -particular, it doesn't save any of the temporary registers (caller -saved registers). It is therefore necessary to preserve all -caller-saved registers as well - -Upon entering _mcount, register $at holds the return address and ra -holds the return address of the function's caller (selfpc and frompc, -respectively in gmon.c language...). */ + this stub after executing a function's prologue and without saving any + registers. It is therefore necessary to preserve a0..a5 as they may + contain function arguments. To work correctly with frame- less + functions, it is also necessary to preserve ra. Finally, division + routines are invoked with a special calling convention and the + compiler treats those calls as if they were instructions. In + particular, it doesn't save any of the temporary registers (caller + saved registers). It is therefore necessary to preserve all + caller-saved registers as well + + Upon entering _mcount, register $at holds the return address and ra + holds the return address of the function's caller (selfpc and frompc, + respectively in gmon.c language...). */ #include diff --git a/sysdeps/alpha/bb_init_func.S b/sysdeps/alpha/bb_init_func.S index dcd4eac231..779cd25a16 100644 --- a/sysdeps/alpha/bb_init_func.S +++ b/sysdeps/alpha/bb_init_func.S @@ -1,27 +1,26 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. Contributed by David Mosberger (davidm@cs.arizona.edu). + This file is part of the GNU C Library. -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 Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -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 -published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. -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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* __bb_init_func is invoked at the beginning of each function, before -any registers have been saved. It is therefore safe to use any -caller-saved (call-used) registers (except for argument registers -a1-a5). */ + any registers have been saved. It is therefore safe to use any + caller-saved (call-used) registers (except for argument registers + a1-a5). */ #include diff --git a/sysdeps/alpha/bzero.S b/sysdeps/alpha/bzero.S index c614fc1a6e..b70ade6a6d 100644 --- a/sysdeps/alpha/bzero.S +++ b/sysdeps/alpha/bzero.S @@ -1,22 +1,21 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. Contributed by Richard Henderson (rth@tamu.edu) - -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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* Fill a block of memory with zeros. Optimized for the Alpha architecture: diff --git a/sysdeps/alpha/elf/start.S b/sysdeps/alpha/elf/start.S index c8b374afe5..a67a39a49f 100644 --- a/sysdeps/alpha/elf/start.S +++ b/sysdeps/alpha/elf/start.S @@ -1,21 +1,22 @@ /* Startup code for Alpha/ELF. -Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc. -Contributed by Richard Henderson - -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 -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/alpha/ffs.S b/sysdeps/alpha/ffs.S index 959d1046d4..23dff6e06b 100644 --- a/sysdeps/alpha/ffs.S +++ b/sysdeps/alpha/ffs.S @@ -1,30 +1,29 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. Contributed by David Mosberger (davidm@cs.arizona.edu). + This file is part of the GNU C Library. -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 Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -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 -published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. -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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* Finds the first bit set in an integer. Optimized for the Alpha -architecture. */ + architecture. */ #include - .set noreorder - .set noat + .set noreorder + .set noat ENTRY(ffs) #ifdef PROF @@ -38,36 +37,36 @@ ENTRY(ffs) ldq_u zero, 0(sp) # on the 21064, this helps dual-issuing addl a0, zero, a0 # the last insn and reduces the stall - negq a0, t0 # due to the srl instruction - and a0, t0, t0 + negq a0, t0 # due to the srl instruction + and a0, t0, t0 clr v0 beq a0, $done # now do binary search for first non-zero bit zapnot t0, 0x03, t2 - addq v0, 16, t3 - cmoveq t2, t3, v0 + addq v0, 16, t3 + cmoveq t2, t3, v0 zapnot t0, 0x05, t2 - addq v0, 8, t3 - cmoveq t2, t3, v0 + addq v0, 8, t3 + cmoveq t2, t3, v0 srl t0, v0, t0 addq v0, 1, v0 - and t0, 0x0f, t2 - addq v0, 4, t3 - cmoveq t2, t3, v0 + and t0, 0x0f, t2 + addq v0, 4, t3 + cmoveq t2, t3, v0 - and t0, 0x33, t2 - addq v0, 2, t3 - cmoveq t2, t3, v0 + and t0, 0x33, t2 + addq v0, 2, t3 + cmoveq t2, t3, v0 - and t0, 0x55, t2 - addq v0, 1, t3 - cmoveq t2, t3, v0 + and t0, 0x55, t2 + addq v0, 1, t3 + cmoveq t2, t3, v0 $done: ret - END(ffs) + END(ffs) diff --git a/sysdeps/alpha/memset.S b/sysdeps/alpha/memset.S index 2b29357c6e..6ee99c204d 100644 --- a/sysdeps/alpha/memset.S +++ b/sysdeps/alpha/memset.S @@ -1,22 +1,21 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. Contributed by Richard Henderson (rth@tamu.edu) - -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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* Fill a block of memory with a character. Optimized for the Alpha architecture: diff --git a/sysdeps/alpha/s_fabs.S b/sysdeps/alpha/s_fabs.S index 75976333f9..e5992ad90c 100644 --- a/sysdeps/alpha/s_fabs.S +++ b/sysdeps/alpha/s_fabs.S @@ -1,21 +1,21 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. -Contributed by David Mosberger +/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Mosberger -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/alpha/strcmp.S b/sysdeps/alpha/strcmp.S index 7dcae04ea4..8633a6cb56 100644 --- a/sysdeps/alpha/strcmp.S +++ b/sysdeps/alpha/strcmp.S @@ -1,6 +1,5 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. Contributed by Richard Henderson (rth@tamu.edu) - This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -14,9 +13,9 @@ Library General Public License for more details. You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If - not, write to the Free Software Foundation, Inc., 675 Mass Ave, - Cambridge, MA 02139, USA. */ + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* Bytewise compare two null-terminated strings. */ @@ -178,7 +177,7 @@ $eos: beq v0, $done # .. e1 : /* Here we have two differing co-aligned words in t0 & t1. - Bytewise compare them and return (t0 > t1 ? 1 : -1). */ + Bytewise compare them and return (t0 > t1 ? 1 : -1). */ $wordcmp: cmpbge t0, t1, t2 # e0 : comparison yields bit mask of ge cmpbge t1, t0, t3 # .. e1 : diff --git a/sysdeps/alpha/strncmp.S b/sysdeps/alpha/strncmp.S index a6c6c61213..12e44e4405 100644 --- a/sysdeps/alpha/strncmp.S +++ b/sysdeps/alpha/strncmp.S @@ -1,6 +1,5 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. Contributed by Richard Henderson (rth@tamu.edu) - This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -14,9 +13,9 @@ Library General Public License for more details. You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If - not, write to the Free Software Foundation, Inc., 675 Mass Ave, - Cambridge, MA 02139, USA. */ + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* Bytewise compare two null-terminated strings of length no longer than N. */ @@ -203,7 +202,7 @@ $eos: beq v0, $done # .. e1 : /* Here we have two differing co-aligned words in t0 & t1. - Bytewise compare them and return (t0 > t1 ? 1 : -1). */ + Bytewise compare them and return (t0 > t1 ? 1 : -1). */ $wordcmp: cmpbge t0, t1, t2 # e0 : comparison yields bit mask of ge cmpbge t1, t0, t3 # .. e1 : diff --git a/sysdeps/alpha/strncpy.S b/sysdeps/alpha/strncpy.S index c077ab35b7..91bf928542 100644 --- a/sysdeps/alpha/strncpy.S +++ b/sysdeps/alpha/strncpy.S @@ -1,22 +1,21 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. Contributed by Richard Henderson (rth@tamu.edu) - -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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* Copy no more than COUNT bytes of the null-terminated string from SRC to DST. If SRC does not cover all of COUNT, the balance is diff --git a/sysdeps/alpha/strrchr.S b/sysdeps/alpha/strrchr.S index d3099cc599..9997961c60 100644 --- a/sysdeps/alpha/strrchr.S +++ b/sysdeps/alpha/strrchr.S @@ -1,21 +1,20 @@ -/* Copyright (C) 1996 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ +/* Copyright (C) 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* Return the address of the last occurrence of a given character within a null-terminated string, or null if it is not found. diff --git a/sysdeps/alpha/stxcpy.S b/sysdeps/alpha/stxcpy.S index 49dd8e5c64..dd5ea806bf 100644 --- a/sysdeps/alpha/stxcpy.S +++ b/sysdeps/alpha/stxcpy.S @@ -1,22 +1,21 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. Contributed by Richard Henderson (rth@tamu.edu) + This file is part of the GNU C Library. -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 Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -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 -published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. -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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* Copy a null-terminated string from SRC to DST. @@ -300,7 +299,7 @@ $unaligned: extql t2, a1, t2 # .. e0 : extql t1, a1, t1 # e0 : - andnot t0, t2, t0 # .. e1 : zero place for source to reside + andnot t0, t2, t0 # .. e1 : zero place for source to reside or t0, t1, t1 # e1 : and put it there stq_u t1, 0(a0) # .. e0 : ret (t9) diff --git a/sysdeps/alpha/stxncpy.S b/sysdeps/alpha/stxncpy.S index f47348e3fc..b1be778f45 100644 --- a/sysdeps/alpha/stxncpy.S +++ b/sysdeps/alpha/stxncpy.S @@ -1,22 +1,21 @@ /* Copyright (C) 1996, 1997 Free Software Foundation, Inc. Contributed by Richard Henderson (rth@tamu.edu) - -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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* Copy no more than COUNT bytes of the null-terminated string from SRC to DST. diff --git a/sysdeps/m68k/bsd-_setjmp.S b/sysdeps/m68k/bsd-_setjmp.S index dc1f52c6aa..f1551521d3 100644 --- a/sysdeps/m68k/bsd-_setjmp.S +++ b/sysdeps/m68k/bsd-_setjmp.S @@ -1,21 +1,21 @@ /* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. m68k version. -Copyright (C) 1994 Free Software Foundation, Inc. -This file is part of the GNU C Library. + Copyright (C) 1994, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* This just does a tail-call to `__sigsetjmp (ARG, 0)'. We cannot do it in C because it must be a tail-call, so frame-unwinding diff --git a/sysdeps/m68k/bsd-setjmp.S b/sysdeps/m68k/bsd-setjmp.S index 7158907cfe..8074719639 100644 --- a/sysdeps/m68k/bsd-setjmp.S +++ b/sysdeps/m68k/bsd-setjmp.S @@ -1,21 +1,21 @@ /* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. m68k version. -Copyright (C) 1994 Free Software Foundation, Inc. -This file is part of the GNU C Library. + Copyright (C) 1994, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* This just does a tail-call to `__sigsetjmp (ARG, 1)'. We cannot do it in C because it must be a tail-call, so frame-unwinding diff --git a/sysdeps/mach/alpha/syscall.S b/sysdeps/mach/alpha/syscall.S index 31ccb5fc30..615357d3f6 100644 --- a/sysdeps/mach/alpha/syscall.S +++ b/sysdeps/mach/alpha/syscall.S @@ -1,20 +1,20 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1994, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include #include @@ -27,7 +27,7 @@ ENTRY (syscall) mov a3, a2 mov a4, a3 mov a5, a4 - /* Load the remaining possible args (up to 11) from the stack. */ + /* Load the remaining possible args (up to 11) from the stack. */ ldq a5,0(sp) ldq t0,8(sp) ldq t1,16(sp) diff --git a/sysdeps/mips/elf/start.S b/sysdeps/mips/elf/start.S index 0db3a04a7d..355a4a905c 100644 --- a/sysdeps/mips/elf/start.S +++ b/sysdeps/mips/elf/start.S @@ -1,33 +1,33 @@ /* Startup code compliant to the ELF Mips ABI. -Copyright (C) 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. + Copyright (C) 1995, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* This is the canonical entry point, usually the first thing in the text segment. The SVR4/Mips ABI (pages 3-31, 3-32) says that when the entry point runs, most registers' values are unspecified, except for: v1 ($2) Contains a function pointer to be registered with `atexit'. - This is how the dynamic linker arranges to have DT_FINI + This is how the dynamic linker arranges to have DT_FINI functions called for shared libraries that have been loaded before this code runs. sp ($29) The stack contains the arguments and environment: - 0(%esp) argc + 0(%esp) argc 4(%esp) argv[0] ... (4*argc)(%esp) NULL @@ -52,7 +52,7 @@ Cambridge, MA 02139, USA. */ .set reorder; #endif - .text + .text .globl _start _start: #ifdef PIC @@ -124,7 +124,7 @@ nofini: lw $6, 8($29) lw $7, 12($29) #endif /* __mips64 */ - + /* Call `_init', which is the entry point to our own `.init' section; and register with `atexit' to have `exit' call `_fini', which is the entry point to our own `.fini' section. */ diff --git a/sysdeps/standalone/i386/force_cpu386/strtsupp.S b/sysdeps/standalone/i386/force_cpu386/strtsupp.S index 6b78a8c343..4016c81c90 100644 --- a/sysdeps/standalone/i386/force_cpu386/strtsupp.S +++ b/sysdeps/standalone/i386/force_cpu386/strtsupp.S @@ -1,27 +1,26 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), On-Line Applications Research Corporation. - -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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* This file assists the board independent startup code by * loading the proper segment register values. The values - * loaded are dependent on the FORCEBUG. + * loaded are dependent on the FORCEBUG. * * NOTE: No stack has been established when this routine * is invoked. It returns by jumping back to the start code. @@ -29,20 +28,20 @@ Cambridge, MA 02139, USA. */ */ /* - * FORCEBUG loads us into a virtual address space which - * really starts at PHYSICAL_ADDRESS_BASE. - * + * FORCEBUG loads us into a virtual address space which + * really starts at PHYSICAL_ADDRESS_BASE. + * */ .set PHYSICAL_ADDRESS_BASE, 0x00002000 /* - * At reset time, FORCEBUG normally has the segment selectors preloaded. + * At reset time, FORCEBUG normally has the segment selectors preloaded. * If a human resets the instruction pointer, this will not have occurred. - * However, no guarantee can be made of the other registers if cs:ip was - * modified to restart the program. Because of this, the BSP reloads all - * segment registers (except cs) with the values they have following - * a reset. + * However, no guarantee can be made of the other registers if cs:ip was + * modified to restart the program. Because of this, the BSP reloads all + * segment registers (except cs) with the values they have following + * a reset. */ @@ -50,40 +49,39 @@ Cambridge, MA 02139, USA. */ .set RESET_DS, 0x40 # initial value of data segment register .set RESET_ES, 0x40 # initial value of extra segment register .set RESET_FS, 0x40 # initial value of "f" segment register -.set RESET_GS, 0x30 # initial value of "g" segment register +.set RESET_GS, 0x30 # initial value of "g" segment register #define LOAD_SEGMENTS(_value,_segreg) \ - movw $_value##,%ax ; \ - movw %ax,##_segreg + movw $_value##,%ax ; \ + movw %ax,##_segreg + - - .global _load_segments + .global _load_segments - .global _establish_stack + .global _establish_stack _load_segments: - LOAD_SEGMENTS( RESET_SS, %ss ) - LOAD_SEGMENTS( RESET_DS, %ds ) - LOAD_SEGMENTS( RESET_ES, %es ) - LOAD_SEGMENTS( RESET_FS, %fs ) - LOAD_SEGMENTS( RESET_GS, %gs ) + LOAD_SEGMENTS( RESET_SS, %ss ) + LOAD_SEGMENTS( RESET_DS, %ds ) + LOAD_SEGMENTS( RESET_ES, %es ) + LOAD_SEGMENTS( RESET_FS, %fs ) + LOAD_SEGMENTS( RESET_GS, %gs ) - jmp _establish_stack # return to the bsp entry code + jmp _establish_stack # return to the bsp entry code - .global _return_to_monitor + .global _return_to_monitor _return_to_monitor: - movb $0,%al - int $0x20 # restart FORCEbug - jmp start # FORCEbug does not reset PC + movb $0,%al + int $0x20 # restart FORCEbug + jmp start # FORCEbug does not reset PC - .data + .data - .global _Do_Load_IDT + .global _Do_Load_IDT _Do_Load_IDT: .byte 1 - .global _Do_Load_GDT + .global _Do_Load_GDT _Do_Load_GDT: .byte 0 - diff --git a/sysdeps/standalone/i386/start.S b/sysdeps/standalone/i386/start.S index 8331a331c1..41e0bfb135 100644 --- a/sysdeps/standalone/i386/start.S +++ b/sysdeps/standalone/i386/start.S @@ -1,23 +1,22 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), On-Line Applications Research Corporation. - -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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* entry.s * @@ -28,28 +27,28 @@ Cambridge, MA 02139, USA. */ * */ - .data - .global _Do_Load_IDT - .global _Do_Load_GDT + .data + .global _Do_Load_IDT + .global _Do_Load_GDT - .text + .text .global start # GNU default entry point - .global _establish_stack + .global _establish_stack - .global _bsp_start - .global _load_segments - .global __exit + .global _bsp_start + .global _load_segments + .global __exit start: - nop - cli # DISABLE INTERRUPTS!!! + nop + cli # DISABLE INTERRUPTS!!! # # Load the segment registers # # NOTE: Upon return, gs will contain the segment descriptor for # a segment which maps directly to all of physical memory. # - jmp _load_segments # load board dependent segments + jmp _load_segments # load board dependent segments # # Set up the stack @@ -57,102 +56,102 @@ start: _establish_stack: - movl $stack_end,%esp # set stack pointer - movl $stack_end,%ebp # set base pointer + movl $stack_end,%esp # set stack pointer + movl $stack_end,%ebp # set base pointer # # Zero out the BSS segment # zero_bss: - cld # make direction flag count up - movl $_end,%ecx # find end of .bss - movl $_bss_start,%edi # edi = beginning of .bss - subl %edi,%ecx # ecx = size of .bss in bytes - shrl $2,%ecx # size of .bss in longs - xorl %eax,%eax # value to clear out memory - repne # while ecx != 0 - stosl # clear a long in the bss + cld # make direction flag count up + movl $_end,%ecx # find end of .bss + movl $_bss_start,%edi # edi = beginning of .bss + subl %edi,%ecx # ecx = size of .bss in bytes + shrl $2,%ecx # size of .bss in longs + xorl %eax,%eax # value to clear out memory + repne # while ecx != 0 + stosl # clear a long in the bss # # Set the C heap information for malloc # - movl $heap_size,___C_heap_size # set ___C_heap_size - movl $heap_memory,___C_heap_start # set ___C_heap_start + movl $heap_size,___C_heap_size # set ___C_heap_size + movl $heap_memory,___C_heap_start # set ___C_heap_start # # Copy the Global Descriptor Table to our space # - sgdt _Original_GDTR # save original GDT - movzwl _Original_GDTR_limit,%ecx # size of GDT in bytes; limit - # is 8192 entries * 8 bytes per + sgdt _Original_GDTR # save original GDT + movzwl _Original_GDTR_limit,%ecx # size of GDT in bytes; limit + # is 8192 entries * 8 bytes per - # make ds:esi point to the original GDT + # make ds:esi point to the original GDT - movl _Original_GDTR_base,%esi - push %ds # save ds - movw %gs,%ax - movw %ax,%ds + movl _Original_GDTR_base,%esi + push %ds # save ds + movw %gs,%ax + movw %ax,%ds - # make es:edi point to the new (our copy) GDT - movl $_Global_descriptor_table,%edi + # make es:edi point to the new (our copy) GDT + movl $_Global_descriptor_table,%edi - rep - movsb # copy the GDT (ds:esi -> es:edi) + rep + movsb # copy the GDT (ds:esi -> es:edi) - pop %ds # restore ds - - # Build and load new contents of GDTR - movw _Original_GDTR_limit,%ecx # set new limit - movw %cx,_New_GDTR_limit + pop %ds # restore ds - push $_Global_descriptor_table - push %es - call _Logical_to_physical - addl $6,%esp - movl %eax,_New_GDTR_base # set new base + # Build and load new contents of GDTR + movw _Original_GDTR_limit,%ecx # set new limit + movw %cx,_New_GDTR_limit - cmpb $0,_Do_Load_GDT # Should the new GDT be loaded? - je no_gdt_load # NO, then branch - lgdt _New_GDTR # load the new GDT + push $_Global_descriptor_table + push %es + call _Logical_to_physical + addl $6,%esp + movl %eax,_New_GDTR_base # set new base + + cmpb $0,_Do_Load_GDT # Should the new GDT be loaded? + je no_gdt_load # NO, then branch + lgdt _New_GDTR # load the new GDT no_gdt_load: # # Copy the Interrupt Descriptor Table to our space # - sidt _Original_IDTR # save original IDT - movzwl _Original_IDTR_limit,%ecx # size of IDT in bytes; limit - # is 256 entries * 8 bytes per - + sidt _Original_IDTR # save original IDT + movzwl _Original_IDTR_limit,%ecx # size of IDT in bytes; limit + # is 256 entries * 8 bytes per + - # make ds:esi point to the original IDT - movl _Original_IDTR_base,%esi + # make ds:esi point to the original IDT + movl _Original_IDTR_base,%esi - push %ds # save ds - movw %gs,%ax - movw %ax,%ds + push %ds # save ds + movw %gs,%ax + movw %ax,%ds - # make es:edi point to the new (our copy) IDT - movl $_Interrupt_descriptor_table,%edi + # make es:edi point to the new (our copy) IDT + movl $_Interrupt_descriptor_table,%edi - rep - movsb # copy the IDT (ds:esi -> es:edi) - pop %ds # restore ds + rep + movsb # copy the IDT (ds:esi -> es:edi) + pop %ds # restore ds - # Build and load new contents of IDTR - movw _Original_IDTR_limit,%ecx # set new limit - movw %cx,_New_IDTR_limit + # Build and load new contents of IDTR + movw _Original_IDTR_limit,%ecx # set new limit + movw %cx,_New_IDTR_limit - push $_Interrupt_descriptor_table - push %es - call _Logical_to_physical - addl $6,%esp - movl %eax,_New_IDTR_base # set new base + push $_Interrupt_descriptor_table + push %es + call _Logical_to_physical + addl $6,%esp + movl %eax,_New_IDTR_base # set new base - cmpb $0,_Do_Load_IDT # Should the new IDT be loaded? - je no_idt_load # NO, then branch - lidt _New_IDTR # load the new IDT + cmpb $0,_Do_Load_IDT # Should the new IDT be loaded? + je no_idt_load # NO, then branch + lidt _New_IDTR # load the new IDT no_idt_load: # @@ -163,44 +162,44 @@ no_idt_load: # exception. # - fninit # MUST USE NO-WAIT FORM + fninit # MUST USE NO-WAIT FORM - call __Board_Initialize # initialize the board + call __Board_Initialize # initialize the board - pushl $0 # envp = NULL - pushl $0 # argv = NULL - pushl $0 # argc = NULL - call ___libc_init # initialize the library and - # call main - addl $12,%esp - - pushl $0 # argc = NULL - call __exit # call the Board specific exit - addl $4,%esp + pushl $0 # envp = NULL + pushl $0 # argv = NULL + pushl $0 # argc = NULL + call ___libc_init # initialize the library and + # call main + addl $12,%esp + + pushl $0 # argc = NULL + call __exit # call the Board specific exit + addl $4,%esp # # Clean up # - .global _Bsp_cleanup + .global _Bsp_cleanup - .global _return_to_monitor + .global _return_to_monitor _Bsp_cleanup: - cmpb $0,_Do_Load_IDT # Was the new IDT loaded? - je no_idt_restore # NO, then branch - lidt _Original_IDTR # restore the new IDT + cmpb $0,_Do_Load_IDT # Was the new IDT loaded? + je no_idt_restore # NO, then branch + lidt _Original_IDTR # restore the new IDT no_idt_restore: - cmpb $0,_Do_Load_GDT # Was the new GDT loaded? - je no_gdt_restore # NO, then branch - lgdt _Original_GDTR # restore the new GDT + cmpb $0,_Do_Load_GDT # Was the new GDT loaded? + je no_gdt_restore # NO, then branch + lgdt _Original_GDTR # restore the new GDT no_gdt_restore: - jmp _return_to_monitor + jmp _return_to_monitor # -# void *Logical_to_physical( +# void *Logical_to_physical( # rtems_unsigned16 segment, # void *address # ); @@ -208,28 +207,28 @@ no_gdt_restore: # Returns thirty-two bit physical address for segment:address. # - .global _Logical_to_physical + .global _Logical_to_physical .set SEGMENT_ARG, 4 .set ADDRESS_ARG, 8 _Logical_to_physical: - xorl %eax,%eax # clear eax - movzwl SEGMENT_ARG(%esp),%ecx # ecx = segment value - movl $_Global_descriptor_table,%edx # edx = address of our GDT - addl %ecx,%edx # edx = address of desired entry - movb 7(%edx),%ah # ah = base 31:24 - movb 4(%edx),%al # al = base 23:16 - shll $16,%eax # move ax into correct bits - movw 2(%edx),%ax # ax = base 0:15 - movl ADDRESS_ARG(%esp),%ecx # ecx = address to convert - addl %eax,%ecx # ecx = physical address equivalent - movl %ecx,%eax # eax = ecx - ret - + xorl %eax,%eax # clear eax + movzwl SEGMENT_ARG(%esp),%ecx # ecx = segment value + movl $_Global_descriptor_table,%edx # edx = address of our GDT + addl %ecx,%edx # edx = address of desired entry + movb 7(%edx),%ah # ah = base 31:24 + movb 4(%edx),%al # al = base 23:16 + shll $16,%eax # move ax into correct bits + movw 2(%edx),%ax # ax = base 0:15 + movl ADDRESS_ARG(%esp),%ecx # ecx = address to convert + addl %eax,%ecx # ecx = physical address equivalent + movl %ecx,%eax # eax = ecx + ret + # -# void *Physical_to_logical( +# void *Physical_to_logical( # rtems_unsigned16 segment, # void *address # ); @@ -237,41 +236,41 @@ _Logical_to_physical: # Returns thirty-two bit physical address for segment:address. # - .global _Physical_to_logical + .global _Physical_to_logical #.set SEGMENT_ARG, 4 #.set ADDRESS_ARG, 8 -- use sets from above _Physical_to_logical: - xorl %eax,%eax # clear eax - movzwl SEGMENT_ARG(%esp),%ecx # ecx = segment value - movl $_Global_descriptor_table,%edx # edx = address of our GDT - addl %ecx,%edx # edx = address of desired entry - movb 7(%edx),%ah # ah = base 31:24 - movb 4(%edx),%al # al = base 23:16 - shll $16,%eax # move ax into correct bits - movw 2(%edx),%ax # ax = base 0:15 - movl ADDRESS_ARG(%esp),%ecx # ecx = address to convert - subl %eax,%ecx # ecx = logical address equivalent - movl %ecx,%eax # eax = ecx - ret - + xorl %eax,%eax # clear eax + movzwl SEGMENT_ARG(%esp),%ecx # ecx = segment value + movl $_Global_descriptor_table,%edx # edx = address of our GDT + addl %ecx,%edx # edx = address of desired entry + movb 7(%edx),%ah # ah = base 31:24 + movb 4(%edx),%al # al = base 23:16 + shll $16,%eax # move ax into correct bits + movw 2(%edx),%ax # ax = base 0:15 + movl ADDRESS_ARG(%esp),%ecx # ecx = address to convert + subl %eax,%ecx # ecx = logical address equivalent + movl %ecx,%eax # eax = ecx + ret + /* * Data Declarations. Start with a macro which helps declare space. */ - .bss + .bss #define DECLARE_SPACE(_name,_space,_align) \ - .globl _name ; \ - .align _align ; \ + .globl _name ; \ + .align _align ; \ _name##: .space _space #define DECLARE_LABEL(_name) \ - .globl _name ; \ -_name##: + .globl _name ; \ +_name##: #define DECLARE_PTR(_name) DECLARE_SPACE(_name,4,2) #define DECLARE_U32(_name) DECLARE_SPACE(_name,4,2) @@ -287,7 +286,7 @@ DECLARE_PTR(environ) DECLARE_LABEL(_errno) DECLARE_U32(errno) -/* +/* * Miscellaneous Variables used to restore the CPU state. * * Start with a macro to declare the space for the contents of @@ -295,8 +294,8 @@ DECLARE_U32(errno) */ #define DECLARE_DTR_SPACE(_name) \ - .global _name ; \ - .align 4 ; \ + .global _name ; \ + .align 4 ; \ _name##: ; \ _name##_limit: .space 2 ; \ _name##_base: .space 4 @@ -316,8 +315,7 @@ DECLARE_SPACE(_Physical_base_of_cs,4,4) * Stack Size and Space */ - .set stack_size, 0x20000 + .set stack_size, 0x20000 DECLARE_SPACE(stack_memory,stack_size,4) DECLARE_LABEL(stack_end) - diff --git a/sysdeps/standalone/i960/start.S b/sysdeps/standalone/i960/start.S index c14449d3ff..d86fb1440f 100644 --- a/sysdeps/standalone/i960/start.S +++ b/sysdeps/standalone/i960/start.S @@ -1,23 +1,22 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), On-Line Applications Research Corporation. - -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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* entry.s * @@ -28,66 +27,66 @@ Cambridge, MA 02139, USA. */ * */ - .text - .globl start # GNU960 default entry point + .text + .globl start # GNU960 default entry point start: - mov 3, r12 - modpc r12, r12, r12 # enable tracing/trace faults - mov g5, g5 # NOP - mov 0, g14 # initialize constant for C - - /* - * zero out uninitialized data area - */ + mov 3, r12 + modpc r12, r12, r12 # enable tracing/trace faults + mov g5, g5 # NOP + mov 0, g14 # initialize constant for C + + /* + * zero out uninitialized data area + */ zerobss: - lda _end, r4 /* find end of .bss */ - lda _bss_start, r5 /* find beginning of .bss */ - ldconst 0, r6 + lda _end, r4 /* find end of .bss */ + lda _bss_start, r5 /* find beginning of .bss */ + ldconst 0, r6 loop: st r6, (r5) /* to zero out uninitialized */ - addo 4, r5, r5 /* data area */ - cmpobl r5, r4, loop /* loop until _end reached */ + addo 4, r5, r5 /* data area */ + cmpobl r5, r4, loop /* loop until _end reached */ - lda heap_memory, r12 /* tell C lib where heap is */ - st r12,___C_heap_start - lda heap_size, r12 /* tell C lib how big heap is */ - st r12,___C_heap_size - lda stack_memory,r12 /* set up stack pointer: */ - mov r12, sp - mov 0, g14 /* initialize constant for C */ + lda heap_memory, r12 /* tell C lib where heap is */ + st r12,___C_heap_start + lda heap_size, r12 /* tell C lib how big heap is */ + st r12,___C_heap_size + lda stack_memory,r12 /* set up stack pointer: */ + mov r12, sp + mov 0, g14 /* initialize constant for C */ - call init_frames - ret /* return to monitor */ + call init_frames + ret /* return to monitor */ init_frames: - ldconst 0x3b001000, g0 - ldconst 0x00009107, g1 - modac g1, g0, g0 /* set AC controls */ - - /* - * Call application mainline. - * Someday, real values of argc and argv will be set up. - * For now, they are set to 0. - */ - - callx __Board_Initialize /* Initialize the board */ - - ldconst 0,g0 - ldconst 0,g1 - ldconst 0,g2 - callx ___libc_init /* initialize the library and */ - /* call main */ - /* - * if we return from main, we have "fallen" off the end - * of the program, therefore status is 0 - * so move 0 to g0 (exit parameter) - */ - - mov 0, g0 - callx __exit - ret + ldconst 0x3b001000, g0 + ldconst 0x00009107, g1 + modac g1, g0, g0 /* set AC controls */ + + /* + * Call application mainline. + * Someday, real values of argc and argv will be set up. + * For now, they are set to 0. + */ + + callx __Board_Initialize /* Initialize the board */ + + ldconst 0,g0 + ldconst 0,g1 + ldconst 0,g2 + callx ___libc_init /* initialize the library and */ + /* call main */ + /* + * if we return from main, we have "fallen" off the end + * of the program, therefore status is 0 + * so move 0 to g0 (exit parameter) + */ + + mov 0, g0 + callx __exit + ret /* @@ -95,13 +94,13 @@ init_frames: */ #define DECLARE_SPACE(_name,_space,_align) \ - .globl _name ; \ - .align _align ; \ + .globl _name ; \ + .align _align ; \ .comm _name##,_space #define DECLARE_LABEL(_name) \ - .globl _name ; \ -_name##: + .globl _name ; \ +_name##: #define DECLARE_PTR(_name) DECLARE_SPACE(_name,4,2) #define DECLARE_U32(_name) DECLARE_SPACE(_name,4,2) @@ -121,7 +120,7 @@ DECLARE_U32(errno) * Stack Size and Space */ - .set stack_size, 0x20000 + .set stack_size, 0x20000 DECLARE_SPACE(stack_memory,stack_size,4) DECLARE_LABEL(stack_end) @@ -130,8 +129,7 @@ DECLARE_LABEL(stack_end) * Heap Size and Space */ - .set heap_size, 0x20000 + .set heap_size, 0x20000 DECLARE_SPACE(heap_memory,heap_size,4) DECLARE_LABEL(heap_end) - diff --git a/sysdeps/standalone/m68k/m68020/start.S b/sysdeps/standalone/m68k/m68020/start.S index 9d7d779e04..fb6fd3eb1a 100644 --- a/sysdeps/standalone/m68k/m68020/start.S +++ b/sysdeps/standalone/m68k/m68020/start.S @@ -1,23 +1,22 @@ -/* Copyright (C) 1994, 1996 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc. Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), On-Line Applications Research Corporation. + This file is part of the GNU C Library. -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 Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -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 -published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. -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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* entry.s * @@ -27,7 +26,7 @@ Cambridge, MA 02139, USA. */ * all initialization. */ - .text + .text .globl start | Default entry point .globl _start | Default entry point .globl M68Kvec | Vector Table @@ -37,90 +36,90 @@ start: _start: M68Kvec: | standard location for vectors _M68Kvec: | standard location for vectors - nop | for linkers with problem - | using location zero as entry - jmp around - .space 4088 | to avoid initial intr stack - | from 135BUG on MVME13? as entry - | and start code at 0x4000 + nop | for linkers with problem + | using location zero as entry + jmp around + .space 4088 | to avoid initial intr stack + | from 135BUG on MVME13? as entry + | and start code at 0x4000 around: - move.w %sr,initial_sr | save initial values - movec %isp,%a0 - movel %a0,initial_isp - movec %usp,%a0 - movel %a0,initial_usp - movec %msp,%a0 - movel %a0,initial_msp - oriw #0x0700,%sr | INTERRUPTS OFF!!! + move.w %sr,initial_sr | save initial values + movec %isp,%a0 + movel %a0,initial_isp + movec %usp,%a0 + movel %a0,initial_usp + movec %msp,%a0 + movel %a0,initial_msp + oriw #0x0700,%sr | INTERRUPTS OFF!!! - | - | zero out uninitialized data area - | + | + | zero out uninitialized data area + | zerobss: - moveal #end,%a0 | find end of .bss - moveal #_bss_start,%a1 | find beginning of .bss - movel #0,%d0 + moveal #end,%a0 | find end of .bss + moveal #_bss_start,%a1 | find beginning of .bss + movel #0,%d0 loop: movel #0,%a1@+ | to zero out uninitialized - cmpal %a0,%a1 - jlt loop | loop until _end reached - - movel #heap_size,__C_heap_size | set ___C_heap_size - movel #heap_memory,__C_heap_start | set ___C_heap_start - moveal #interrupt_stack_end,%a0 | set interrupt stack pointer - movec %a0,%isp - moveal #stack_end,%a0 | set master stack pointer - movec %a0,%msp - moveal #stack_end,%a6 | set base pointer - movw #0x3000,%sr | SUPV MODE,INTERRUPTS ON!!! + cmpal %a0,%a1 + jlt loop | loop until _end reached + + movel #heap_size,__C_heap_size | set ___C_heap_size + movel #heap_memory,__C_heap_start | set ___C_heap_start + moveal #interrupt_stack_end,%a0 | set interrupt stack pointer + movec %a0,%isp + moveal #stack_end,%a0 | set master stack pointer + movec %a0,%msp + moveal #stack_end,%a6 | set base pointer + movw #0x3000,%sr | SUPV MODE,INTERRUPTS ON!!! #ifdef NEED_UNDERSCORES - jsr __Board_Initialize | initialize the board + jsr __Board_Initialize | initialize the board #else - jsr _Board_Initialize | initialize the board + jsr _Board_Initialize | initialize the board #endif - move.l #0,%sp@- | envp = NULL - move.l #0,%sp@- | argv = NULL - move.l #0,%sp@- | argc = NULL + move.l #0,%sp@- | envp = NULL + move.l #0,%sp@- | argv = NULL + move.l #0,%sp@- | argc = NULL #ifdef NEED_UNDERSCORES - jsr ___libc_init | initialize the library and - | call main + jsr ___libc_init | initialize the library and + | call main #else - jsr __libc_init | initialize the library and - | call main + jsr __libc_init | initialize the library and + | call main #endif - add.l #12,%sp + add.l #12,%sp - move.l #0,%sp@- | argc = NULL - jsr __exit | call the Board specific exit - addq.l #4,%sp + move.l #0,%sp@- | argc = NULL + jsr __exit | call the Board specific exit + addq.l #4,%sp - move.l initial_isp,%a0 | if __exit returns then we can - movec %a0,%isp | restore the initial values - move.l initial_usp,%a0 - movec %a0,%usp - move.l initial_msp,%a0 - movec %a0,%msp - move.w initial_sr,%sr - rts + move.l initial_isp,%a0 | if __exit returns then we can + movec %a0,%isp | restore the initial values + move.l initial_usp,%a0 + movec %a0,%usp + move.l initial_msp,%a0 + movec %a0,%msp + move.w initial_sr,%sr + rts - .bss + .bss /* * So initial stack registers and status register can be saved. */ #define DECLARE_SPACE(_name,_space,_align) \ - .globl _name ; \ - .align _align ; \ + .globl _name ; \ + .align _align ; \ _name##: .space _space #define DECLARE_LABEL(_name) \ - .globl _name ; \ + .globl _name ; \ _name##: #define DECLARE_PTR(_name) DECLARE_SPACE(_name,4,2) @@ -147,7 +146,7 @@ DECLARE_U32(errno) * Stack Size and Space */ - .set stack_size, 0x20000 + .set stack_size, 0x20000 DECLARE_SPACE(stack_memory,stack_size,4) DECLARE_LABEL(stack_end) diff --git a/sysdeps/unix/arm/brk.S b/sysdeps/unix/arm/brk.S index a801674283..0150bcde80 100644 --- a/sysdeps/unix/arm/brk.S +++ b/sysdeps/unix/arm/brk.S @@ -1,20 +1,20 @@ -/* Copyright (C) 1991, 1992, 1993, 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1991, 1992, 1993, 1995, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include @@ -38,6 +38,6 @@ SYSCALL__ (brk, 1) mov r0, $0 RETINSTR(mov, pc, r14) _cb_addr: .long C_SYMBOL_NAME(__curbrk) - - + + weak_alias (__brk, brk) diff --git a/sysdeps/unix/arm/fork.S b/sysdeps/unix/arm/fork.S index baa33e31b7..b70d15747b 100644 --- a/sysdeps/unix/arm/fork.S +++ b/sysdeps/unix/arm/fork.S @@ -1,20 +1,20 @@ /* Copyright (C) 1991, 1992, 1994, 1995, 1997 Free Software Foundation, Inc. -This file is part of the GNU C Library. + 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/bsd/hp/m68k/brk.S b/sysdeps/unix/bsd/hp/m68k/brk.S index cf46b4d902..a474eb5be6 100644 --- a/sysdeps/unix/bsd/hp/m68k/brk.S +++ b/sysdeps/unix/bsd/hp/m68k/brk.S @@ -1,20 +1,20 @@ -/* Copyright (C) 1991, 1993, 1994, 1995 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ +/* Copyright (C) 1991, 1993, 1994, 1995, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/bsd/hp/m68k/vfork.S b/sysdeps/unix/bsd/hp/m68k/vfork.S index b70c122838..dc1137379d 100644 --- a/sysdeps/unix/bsd/hp/m68k/vfork.S +++ b/sysdeps/unix/bsd/hp/m68k/vfork.S @@ -1,20 +1,20 @@ -/* Copyright (C) 1991, 1994, 1995 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ +/* Copyright (C) 1991, 1994, 1995, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/bsd/hp/m68k/wait3.S b/sysdeps/unix/bsd/hp/m68k/wait3.S index d0e758595a..d106feafe4 100644 --- a/sysdeps/unix/bsd/hp/m68k/wait3.S +++ b/sysdeps/unix/bsd/hp/m68k/wait3.S @@ -1,20 +1,20 @@ -/* Copyright (C) 1991, 1992, 1995 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ +/* Copyright (C) 1991, 1992, 1995, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/bsd/m68k/pipe.S b/sysdeps/unix/bsd/m68k/pipe.S index 633d18fe2c..2a4134a338 100644 --- a/sysdeps/unix/bsd/m68k/pipe.S +++ b/sysdeps/unix/bsd/m68k/pipe.S @@ -1,20 +1,20 @@ -/* Copyright (C) 1991, 1992, 1993, 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1991, 1992, 1993, 1995, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/bsd/m68k/syscall.S b/sysdeps/unix/bsd/m68k/syscall.S index 18ef815559..a85a898f2c 100644 --- a/sysdeps/unix/bsd/m68k/syscall.S +++ b/sysdeps/unix/bsd/m68k/syscall.S @@ -1,20 +1,20 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1993, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/bsd/m68k/sysdep.S b/sysdeps/unix/bsd/m68k/sysdep.S index 1be2d5a23f..f43240cf44 100644 --- a/sysdeps/unix/bsd/m68k/sysdep.S +++ b/sysdeps/unix/bsd/m68k/sysdep.S @@ -1,20 +1,20 @@ -/* Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1991, 1992, 1993, 1994, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #define _ERRNO_H #include diff --git a/sysdeps/unix/bsd/m68k/wait.S b/sysdeps/unix/bsd/m68k/wait.S index c7685b72aa..0b502c4742 100644 --- a/sysdeps/unix/bsd/m68k/wait.S +++ b/sysdeps/unix/bsd/m68k/wait.S @@ -1,20 +1,20 @@ -/* Copyright (C) 1991, 1992, 1993, 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1991, 1992, 1993, 1995, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/bsd/osf/alpha/brk.S b/sysdeps/unix/bsd/osf/alpha/brk.S index 105e40100b..394cd3a74e 100644 --- a/sysdeps/unix/bsd/osf/alpha/brk.S +++ b/sysdeps/unix/bsd/osf/alpha/brk.S @@ -1,20 +1,21 @@ -/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/bsd/osf/alpha/fork.S b/sysdeps/unix/bsd/osf/alpha/fork.S index be6f015e52..139676104a 100644 --- a/sysdeps/unix/bsd/osf/alpha/fork.S +++ b/sysdeps/unix/bsd/osf/alpha/fork.S @@ -1,20 +1,21 @@ -/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/bsd/osf/alpha/killpg.S b/sysdeps/unix/bsd/osf/alpha/killpg.S index 831c3fda4b..92ba1beffe 100644 --- a/sysdeps/unix/bsd/osf/alpha/killpg.S +++ b/sysdeps/unix/bsd/osf/alpha/killpg.S @@ -1,20 +1,21 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/bsd/osf/alpha/pipe.S b/sysdeps/unix/bsd/osf/alpha/pipe.S index eada33b226..05736a8dd5 100644 --- a/sysdeps/unix/bsd/osf/alpha/pipe.S +++ b/sysdeps/unix/bsd/osf/alpha/pipe.S @@ -1,20 +1,21 @@ -/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/bsd/osf/alpha/recv.S b/sysdeps/unix/bsd/osf/alpha/recv.S index a68bfe8fba..914b6ebb0e 100644 --- a/sysdeps/unix/bsd/osf/alpha/recv.S +++ b/sysdeps/unix/bsd/osf/alpha/recv.S @@ -1,20 +1,20 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1991, 1992, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/bsd/osf/alpha/send.S b/sysdeps/unix/bsd/osf/alpha/send.S index 526f4c8a01..8a56d8284f 100644 --- a/sysdeps/unix/bsd/osf/alpha/send.S +++ b/sysdeps/unix/bsd/osf/alpha/send.S @@ -1,20 +1,20 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1991, 1992, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/bsd/osf/alpha/sigblock.S b/sysdeps/unix/bsd/osf/alpha/sigblock.S index 402ed8d1e0..cdb3788127 100644 --- a/sysdeps/unix/bsd/osf/alpha/sigblock.S +++ b/sysdeps/unix/bsd/osf/alpha/sigblock.S @@ -1,20 +1,21 @@ -/* Copyright (C) 1994, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/bsd/osf/alpha/sigpause.S b/sysdeps/unix/bsd/osf/alpha/sigpause.S index 6136cfcab6..59d048dee7 100644 --- a/sysdeps/unix/bsd/osf/alpha/sigpause.S +++ b/sysdeps/unix/bsd/osf/alpha/sigpause.S @@ -1,20 +1,21 @@ -/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/bsd/osf/alpha/sigsetmask.S b/sysdeps/unix/bsd/osf/alpha/sigsetmask.S index 71aea92e1f..04bf694770 100644 --- a/sysdeps/unix/bsd/osf/alpha/sigsetmask.S +++ b/sysdeps/unix/bsd/osf/alpha/sigsetmask.S @@ -1,20 +1,21 @@ -/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/bsd/osf/alpha/sigvec.S b/sysdeps/unix/bsd/osf/alpha/sigvec.S index f199f35334..1090cdc687 100644 --- a/sysdeps/unix/bsd/osf/alpha/sigvec.S +++ b/sysdeps/unix/bsd/osf/alpha/sigvec.S @@ -1,20 +1,21 @@ -/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/bsd/osf/alpha/start.S b/sysdeps/unix/bsd/osf/alpha/start.S index d5ff14055b..0321f56c1d 100644 --- a/sysdeps/unix/bsd/osf/alpha/start.S +++ b/sysdeps/unix/bsd/osf/alpha/start.S @@ -1,20 +1,21 @@ -/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/bsd/osf/alpha/vhangup.S b/sysdeps/unix/bsd/osf/alpha/vhangup.S index 8759f023b3..2fc4094fee 100644 --- a/sysdeps/unix/bsd/osf/alpha/vhangup.S +++ b/sysdeps/unix/bsd/osf/alpha/vhangup.S @@ -1,20 +1,20 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1991, 1992, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/bsd/sequent/i386/getgroups.S b/sysdeps/unix/bsd/sequent/i386/getgroups.S index b68bcbdbaa..fe8f58d8e1 100644 --- a/sysdeps/unix/bsd/sequent/i386/getgroups.S +++ b/sysdeps/unix/bsd/sequent/i386/getgroups.S @@ -1,20 +1,20 @@ -/* Copyright (C) 1994, 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1994, 1995, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include #include diff --git a/sysdeps/unix/bsd/sequent/i386/sigvec.S b/sysdeps/unix/bsd/sequent/i386/sigvec.S index 1bb57c2074..9647849509 100644 --- a/sysdeps/unix/bsd/sequent/i386/sigvec.S +++ b/sysdeps/unix/bsd/sequent/i386/sigvec.S @@ -1,20 +1,20 @@ -/* Copyright (C) 1993, 1995 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ +/* Copyright (C) 1993, 1995, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/bsd/sequent/i386/syscall.S b/sysdeps/unix/bsd/sequent/i386/syscall.S index bebab8ee51..45c920c1f1 100644 --- a/sysdeps/unix/bsd/sequent/i386/syscall.S +++ b/sysdeps/unix/bsd/sequent/i386/syscall.S @@ -1,21 +1,21 @@ /* `syscall' function for Sequent Symmetry running Dynix version 3. -Copyright (C) 1994 Free Software Foundation, Inc. -This file is part of the GNU C Library. + Copyright (C) 1994, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/bsd/sun/m68k/brk.S b/sysdeps/unix/bsd/sun/m68k/brk.S index 462910ad30..4c460174fe 100644 --- a/sysdeps/unix/bsd/sun/m68k/brk.S +++ b/sysdeps/unix/bsd/sun/m68k/brk.S @@ -1,20 +1,20 @@ -/* Copyright (C) 1991, 1992, 1994, 1995 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ +/* Copyright (C) 1991, 1992, 1994, 1995, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/bsd/sun/m68k/sethostid.S b/sysdeps/unix/bsd/sun/m68k/sethostid.S index ab76d75f7b..a3654bfcc3 100644 --- a/sysdeps/unix/bsd/sun/m68k/sethostid.S +++ b/sysdeps/unix/bsd/sun/m68k/sethostid.S @@ -1,20 +1,20 @@ -/* Copyright (C) 1991, 1992 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ +/* Copyright (C) 1991, 1992, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/bsd/sun/m68k/syscall.S b/sysdeps/unix/bsd/sun/m68k/syscall.S index 0a98da7c67..76bac4d905 100644 --- a/sysdeps/unix/bsd/sun/m68k/syscall.S +++ b/sysdeps/unix/bsd/sun/m68k/syscall.S @@ -1,20 +1,20 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1993, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/bsd/sun/m68k/vfork.S b/sysdeps/unix/bsd/sun/m68k/vfork.S index 63d2a09903..4de48b7920 100644 --- a/sysdeps/unix/bsd/sun/m68k/vfork.S +++ b/sysdeps/unix/bsd/sun/m68k/vfork.S @@ -1,20 +1,20 @@ -/* Copyright (C) 1991, 1992, 1993, 1994, 1995 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ +/* Copyright (C) 1991, 92, 93, 94, 95, 97 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/bsd/sun/sigreturn.S b/sysdeps/unix/bsd/sun/sigreturn.S index d0a3f3a56b..7a3f8dbada 100644 --- a/sysdeps/unix/bsd/sun/sigreturn.S +++ b/sysdeps/unix/bsd/sun/sigreturn.S @@ -1,20 +1,20 @@ -/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1993, 1995, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/bsd/sun/sparc/sethostid.S b/sysdeps/unix/bsd/sun/sparc/sethostid.S index f8ee805c75..fc3fc04917 100644 --- a/sysdeps/unix/bsd/sun/sparc/sethostid.S +++ b/sysdeps/unix/bsd/sun/sparc/sethostid.S @@ -1,20 +1,20 @@ -/* Copyright (C) 1991, 1992 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ +/* Copyright (C) 1991, 1992, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/bsd/ultrix4/mips/__handler.S b/sysdeps/unix/bsd/ultrix4/mips/__handler.S index ca9c3fe858..19d795a6b4 100644 --- a/sysdeps/unix/bsd/ultrix4/mips/__handler.S +++ b/sysdeps/unix/bsd/ultrix4/mips/__handler.S @@ -1,21 +1,22 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). Also hacked by Ian Lance Taylor (ian@airs.com). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/bsd/ultrix4/mips/start.S b/sysdeps/unix/bsd/ultrix4/mips/start.S index aec5885252..dfb06c22b5 100644 --- a/sysdeps/unix/bsd/ultrix4/mips/start.S +++ b/sysdeps/unix/bsd/ultrix4/mips/start.S @@ -1,20 +1,21 @@ -/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/bsd/ultrix4/mips/vfork.S b/sysdeps/unix/bsd/ultrix4/mips/vfork.S index 05e4b87f2e..84a2fde160 100644 --- a/sysdeps/unix/bsd/ultrix4/mips/vfork.S +++ b/sysdeps/unix/bsd/ultrix4/mips/vfork.S @@ -1,20 +1,21 @@ -/* Copyright (C) 1992, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/bsd/ultrix4/wait3.S b/sysdeps/unix/bsd/ultrix4/wait3.S index 930c67e825..5659872d69 100644 --- a/sysdeps/unix/bsd/ultrix4/wait3.S +++ b/sysdeps/unix/bsd/ultrix4/wait3.S @@ -1,20 +1,21 @@ -/* Copyright (C) 1992, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/bsd/vax/brk.S b/sysdeps/unix/bsd/vax/brk.S index b3e8e10307..c9590737bf 100644 --- a/sysdeps/unix/bsd/vax/brk.S +++ b/sysdeps/unix/bsd/vax/brk.S @@ -1,20 +1,20 @@ -/* Copyright (C) 1991, 1995 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ +/* Copyright (C) 1991, 1995, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/bsd/vax/pipe.S b/sysdeps/unix/bsd/vax/pipe.S index 10c681aac6..8a83e0cf91 100644 --- a/sysdeps/unix/bsd/vax/pipe.S +++ b/sysdeps/unix/bsd/vax/pipe.S @@ -1,20 +1,20 @@ -/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1991, 1992, 1995, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/bsd/vax/sysdep.S b/sysdeps/unix/bsd/vax/sysdep.S index b5b76aaba5..6809b6edea 100644 --- a/sysdeps/unix/bsd/vax/sysdep.S +++ b/sysdeps/unix/bsd/vax/sysdep.S @@ -1,20 +1,20 @@ -/* Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1991, 1992, 1993, 1994, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #define _ERRNO_H #include diff --git a/sysdeps/unix/bsd/vax/vfork.S b/sysdeps/unix/bsd/vax/vfork.S index 96f27ea098..ba670ac2a2 100644 --- a/sysdeps/unix/bsd/vax/vfork.S +++ b/sysdeps/unix/bsd/vax/vfork.S @@ -1,20 +1,20 @@ -/* Copyright (C) 1991, 1992, 1995 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ +/* Copyright (C) 1991, 1992, 1995, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/bsd/vax/wait.S b/sysdeps/unix/bsd/vax/wait.S index 77311b49bf..9effe92b62 100644 --- a/sysdeps/unix/bsd/vax/wait.S +++ b/sysdeps/unix/bsd/vax/wait.S @@ -1,20 +1,20 @@ -/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1991, 1992, 1995, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/bsd/vax/wait3.S b/sysdeps/unix/bsd/vax/wait3.S index 2d8dba8297..52b8694859 100644 --- a/sysdeps/unix/bsd/vax/wait3.S +++ b/sysdeps/unix/bsd/vax/wait3.S @@ -1,20 +1,20 @@ -/* Copyright (C) 1991, 1992, 1995 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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ +/* Copyright (C) 1991, 1992, 1995, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/mips/brk.S b/sysdeps/unix/mips/brk.S index 9c4ee26edc..197672669b 100644 --- a/sysdeps/unix/mips/brk.S +++ b/sysdeps/unix/mips/brk.S @@ -1,20 +1,21 @@ -/* Copyright (C) 1992, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/mips/fork.S b/sysdeps/unix/mips/fork.S index 17efcc92a8..ffaf40ba6a 100644 --- a/sysdeps/unix/mips/fork.S +++ b/sysdeps/unix/mips/fork.S @@ -1,20 +1,21 @@ -/* Copyright (C) 1992, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/mips/pipe.S b/sysdeps/unix/mips/pipe.S index b9f376d365..dac617461d 100644 --- a/sysdeps/unix/mips/pipe.S +++ b/sysdeps/unix/mips/pipe.S @@ -1,20 +1,21 @@ -/* Copyright (C) 1992, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/mips/sigreturn.S b/sysdeps/unix/mips/sigreturn.S index 70ae0c2749..ddb6c70d51 100644 --- a/sysdeps/unix/mips/sigreturn.S +++ b/sysdeps/unix/mips/sigreturn.S @@ -1,20 +1,21 @@ -/* Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1994, 1995, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/mips/sysdep.S b/sysdeps/unix/mips/sysdep.S index 1791801ec5..0cfc302770 100644 --- a/sysdeps/unix/mips/sysdep.S +++ b/sysdeps/unix/mips/sysdep.S @@ -1,20 +1,21 @@ -/* Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1993, 1994, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include #define _ERRNO_H diff --git a/sysdeps/unix/mips/wait.S b/sysdeps/unix/mips/wait.S index f1f4f9b42c..a544156c4e 100644 --- a/sysdeps/unix/mips/wait.S +++ b/sysdeps/unix/mips/wait.S @@ -1,20 +1,21 @@ -/* Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1994, 1995, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/sysv/i386/signal.S b/sysdeps/unix/sysv/i386/signal.S index 14ef77bdc5..1ccd9d39a9 100644 --- a/sysdeps/unix/sysv/i386/signal.S +++ b/sysdeps/unix/sysv/i386/signal.S @@ -1,20 +1,20 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1992, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/sysv/irix4/__handler.S b/sysdeps/unix/sysv/irix4/__handler.S index bd756a4278..5d0e16947a 100644 --- a/sysdeps/unix/sysv/irix4/__handler.S +++ b/sysdeps/unix/sysv/irix4/__handler.S @@ -1,21 +1,22 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@cs.widener.edu). Also hacked by Ian Lance Taylor (ian@airs.com). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/sysv/irix4/sigreturn.S b/sysdeps/unix/sysv/irix4/sigreturn.S index ebb5c1ae44..c56738ce79 100644 --- a/sysdeps/unix/sysv/irix4/sigreturn.S +++ b/sysdeps/unix/sysv/irix4/sigreturn.S @@ -1,20 +1,21 @@ -/* Copyright (C) 1992, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@cs.widener.edu). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/sysv/irix4/uname.S b/sysdeps/unix/sysv/irix4/uname.S index fe912403b1..f0464d3d88 100644 --- a/sysdeps/unix/sysv/irix4/uname.S +++ b/sysdeps/unix/sysv/irix4/uname.S @@ -1,20 +1,20 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1994, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/sysv/irix4/wait.S b/sysdeps/unix/sysv/irix4/wait.S index 9f2afa7997..82fdee5098 100644 --- a/sysdeps/unix/sysv/irix4/wait.S +++ b/sysdeps/unix/sysv/irix4/wait.S @@ -1,20 +1,21 @@ -/* Copyright (C) 1992, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@cs.widener.edu). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/sysv/linux/alpha/pipe.S b/sysdeps/unix/sysv/linux/alpha/pipe.S index 60334adb45..6a2bcf31ce 100644 --- a/sysdeps/unix/sysv/linux/alpha/pipe.S +++ b/sysdeps/unix/sysv/linux/alpha/pipe.S @@ -1,20 +1,21 @@ -/* Copyright (C) 1993, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by David Mosberger (davidm@cs.arizona.edu). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* __pipe is a special syscall since it returns two values. */ diff --git a/sysdeps/unix/sysv/linux/m68k/mmap.S b/sysdeps/unix/sysv/linux/m68k/mmap.S index 257ff4da28..9563204977 100644 --- a/sysdeps/unix/sysv/linux/m68k/mmap.S +++ b/sysdeps/unix/sysv/linux/m68k/mmap.S @@ -1,20 +1,20 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1996, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include @@ -26,7 +26,7 @@ ENTRY (__mmap) lea 4(%sp), %a0 /* Address of args is 1st arg. */ move.l %a0, %d1 - /* Do the system call trap. */ + /* Do the system call trap. */ trap #0 /* Kludge: negative numbers are among the legal return values. diff --git a/sysdeps/unix/sysv/linux/m68k/sigreturn.S b/sysdeps/unix/sysv/linux/m68k/sigreturn.S index 0971acd20e..34c0a91952 100644 --- a/sysdeps/unix/sysv/linux/m68k/sigreturn.S +++ b/sysdeps/unix/sysv/linux/m68k/sigreturn.S @@ -1,20 +1,20 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1996, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/sysv/linux/m68k/socket.S b/sysdeps/unix/sysv/linux/m68k/socket.S index 1508b879f6..51aaa4b6f9 100644 --- a/sysdeps/unix/sysv/linux/m68k/socket.S +++ b/sysdeps/unix/sysv/linux/m68k/socket.S @@ -1,20 +1,20 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1996, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include #include @@ -44,7 +44,7 @@ ENTRY (P(__,socket)) lea 4(%sp), %a1 /* Address of args is 2nd arg. */ move.l %a1, %d2 - /* Do the system call trap. */ + /* Do the system call trap. */ trap #0 /* Restore registers. */ diff --git a/sysdeps/unix/sysv/sco3.2.4/sigaction.S b/sysdeps/unix/sysv/sco3.2.4/sigaction.S index dc1bb418d6..3367ec7a9a 100644 --- a/sysdeps/unix/sysv/sco3.2.4/sigaction.S +++ b/sysdeps/unix/sysv/sco3.2.4/sigaction.S @@ -1,20 +1,20 @@ -/* Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1993, 1994, 1995, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/sysv/sco3.2.4/sysconf.S b/sysdeps/unix/sysv/sco3.2.4/sysconf.S index 44c89f2cf8..55db86be8a 100644 --- a/sysdeps/unix/sysv/sco3.2.4/sysconf.S +++ b/sysdeps/unix/sysv/sco3.2.4/sysconf.S @@ -1,20 +1,20 @@ -/* Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1993, 1994, 1995, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include #include diff --git a/sysdeps/unix/sysv/sco3.2.4/uname.S b/sysdeps/unix/sysv/sco3.2.4/uname.S index a22d18a3e6..c56dd4dc08 100644 --- a/sysdeps/unix/sysv/sco3.2.4/uname.S +++ b/sysdeps/unix/sysv/sco3.2.4/uname.S @@ -1,26 +1,25 @@ -/* Copyright (C) 1993, 1994 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1994, 1997 Free Software Foundation, Inc. Contributed by Scott Bartram. + This file is part of the GNU C Library. -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 Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -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 -published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. -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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include -/* +/* before lcall, stack contents should be: 4(%esp) -> name diff --git a/sysdeps/unix/sysv/sco3.2.4/waitpid.S b/sysdeps/unix/sysv/sco3.2.4/waitpid.S index 523ef37e53..ae1e9a1783 100644 --- a/sysdeps/unix/sysv/sco3.2.4/waitpid.S +++ b/sysdeps/unix/sysv/sco3.2.4/waitpid.S @@ -1,20 +1,20 @@ -/* Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1993, 1994, 1995, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/sysv/sysv4/i386/sys-sig.S b/sysdeps/unix/sysv/sysv4/i386/sys-sig.S index 58430e494f..35cd16ad91 100644 --- a/sysdeps/unix/sysv/sysv4/i386/sys-sig.S +++ b/sysdeps/unix/sysv/sysv4/i386/sys-sig.S @@ -1,20 +1,20 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1994, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/sysv/sysv4/solaris2/fsync.S b/sysdeps/unix/sysv/sysv4/solaris2/fsync.S index aefa3e3af7..3f4d7d69a4 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/fsync.S +++ b/sysdeps/unix/sysv/sysv4/solaris2/fsync.S @@ -1,20 +1,21 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S index edefad0168..de3735b289 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S @@ -1,20 +1,21 @@ -/* Copyright (C) 1993, 1994 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1994, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include #define _ERRNO_H diff --git a/sysdeps/vax/bsd-_setjmp.S b/sysdeps/vax/bsd-_setjmp.S index 039fd71fdb..ce324e486d 100644 --- a/sysdeps/vax/bsd-_setjmp.S +++ b/sysdeps/vax/bsd-_setjmp.S @@ -1,21 +1,21 @@ /* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. Vax version. -Copyright (C) 1994 Free Software Foundation, Inc. -This file is part of the GNU C Library. + Copyright (C) 1994, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* This just does a tail-call to `__sigsetjmp (ARG, 0)'. We cannot do it in C because it must be a tail-call, so frame-unwinding diff --git a/sysdeps/vax/bsd-setjmp.S b/sysdeps/vax/bsd-setjmp.S index 379a65c0e5..b6eadb77c0 100644 --- a/sysdeps/vax/bsd-setjmp.S +++ b/sysdeps/vax/bsd-setjmp.S @@ -1,21 +1,21 @@ /* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. Vax version. -Copyright (C) 1994 Free Software Foundation, Inc. -This file is part of the GNU C Library. + Copyright (C) 1994, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* This just does a tail-call to `__sigsetjmp (ARG, 1)'. We cannot do it in C because it must be a tail-call, so frame-unwinding From e775757079a333e50ec0aa1e38bea9caae241f6e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 26 Jun 1997 22:19:04 +0000 Subject: [PATCH 0987/4487] Don't undef macros for unordered comparison before definition. Don't define __ilogb. --- sysdeps/m68k/fpu/bits/mathinline.h | 36 +++++++----------------------- 1 file changed, 8 insertions(+), 28 deletions(-) diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/fpu/bits/mathinline.h index 8899b752ff..79245c07a1 100644 --- a/sysdeps/m68k/fpu/bits/mathinline.h +++ b/sysdeps/m68k/fpu/bits/mathinline.h @@ -44,12 +44,12 @@ is the name of the fpu operation (without leading f). */ #if defined __USE_MISC || defined __USE_ISOC9X -#define __inline_mathop(func, op) \ +# define __inline_mathop(func, op) \ __inline_mathop1(double, func, op) \ __inline_mathop1(float, __CONCAT(func,f), op) \ __inline_mathop1(long double, __CONCAT(func,l), op) #else -#define __inline_mathop(func, op) \ +# define __inline_mathop(func, op) \ __inline_mathop1(double, func, op) #endif @@ -257,17 +257,6 @@ __m81_defun (int, __CONCAT(__signbit,s), (float_type __value)) \ return (__fpsr >> 27) & 1; \ } \ \ -__m81_defun (int, __CONCAT(__ilogb,s), (float_type __x)) \ -{ \ - float_type __result; \ - if (__m81_u(__CONCAT(__isnan,s)) (__x)) \ - /* The stupid standard requires us to return a specific value where \ - it would depend on the bitpattern of the NaN. */ \ - return 0x7fffffff; \ - __asm("fgetexp%.x %1, %0" : "=f" (__result) : "f" (__x)); \ - return (int) __result; \ -} \ - \ __m81_defun (float_type, __CONCAT(__scalbn,s), \ (float_type __x, long int __n)) \ { \ @@ -341,7 +330,6 @@ __inline_forward_c(double,scalbn, (double __x, long int __n), (__x, __n)) #ifndef __USE_ISOC9X /* Conflict with macro of same name. */ __inline_forward_c(int,isnan, (double __value), (__value)) #endif -__inline_forward_c(int,ilogb, (double __value), (__value)) #endif #ifdef __USE_ISOC9X __inline_forward_c(double,nearbyint, (double __value), (__value)) @@ -362,7 +350,6 @@ __inline_forward_c(int,isinff, (float __value), (__value)) __inline_forward_c(int,finitef, (float __value), (__value)) __inline_forward_c(float,scalbnf, (float __x, long int __n), (__x, __n)) __inline_forward_c(int,isnanf, (float __value), (__value)) -__inline_forward_c(int,ilogbf, (float __value), (__value)) #endif #ifdef __USE_ISOC9X __inline_forward_c(float,nearbyintf, (float __value), (__value)) @@ -382,7 +369,6 @@ __inline_forward_c(int,finitel, (long double __value), (__value)) __inline_forward_c(long double,scalbnl, (long double __x, long int __n), (__x, __n)) __inline_forward_c(int,isnanl, (long double __value), (__value)) -__inline_forward_c(int,ilogbl, (long double __value), (__value)) #endif #ifdef __USE_ISOC9X __inline_forward_c(long double,nearbyintl, (long double __value), (__value)) @@ -405,48 +391,42 @@ __inline_forward(void,sincosl, m68k FPU supports this with special opcodes and we should use them. These must not be inline functions since we have to be able to handle all floating-point types. */ -#undef isgreater -#define isgreater(x, y) \ +# define isgreater(x, y) \ __extension__ \ ({ char __result; \ __asm__ ("fcmp%.x %2,%1; fsogt %0" \ : "=dm" (__result) : "f" (x), "f" (y)); \ (int) __result; }) -#undef isgreaterequal -#define isgreaterequal(x, y) \ +# define isgreaterequal(x, y) \ __extension__ \ ({ char __result; \ __asm__ ("fcmp%.x %2,%1; fsoge %0" \ : "=dm" (__result) : "f" (x), "f" (y)); \ (int) __result; }) -#undef isless -#define isless(x, y) \ +# define isless(x, y) \ __extension__ \ ({ char __result; \ __asm__ ("fcmp%.x %2,%1; fsolt %0" \ : "=dm" (__result) : "f" (x), "f" (y)); \ (int) __result; }) -#undef islessequal -#define islessequal(x, y) \ +# define islessequal(x, y) \ __extension__ \ ({ char __result; \ __asm__ ("fcmp%.x %2,%1; fsole %0" \ : "=dm" (__result) : "f" (x), "f" (y)); \ (int) __result; }) -#undef islessgreater -#define islessgreater(x, y) \ +# define islessgreater(x, y) \ __extension__ \ ({ char __result; \ __asm__ ("fcmp%.x %2,%1; fsogl %0" \ : "=dm" (__result) : "f" (x), "f" (y)); \ (int) __result; }) -#undef isunordered -#define isunordered(x, y) \ +# define isunordered(x, y) \ __extension__ \ ({ char __result; \ __asm__ ("fcmp%.x %2,%1; fsun %0" \ From 8be9676b252f34544b2c21b7bb691832255da139 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 26 Jun 1997 22:19:12 +0000 Subject: [PATCH 0988/4487] (FP_ILOGB0): Correct value. --- sysdeps/m68k/fpu/bits/mathdef.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/m68k/fpu/bits/mathdef.h b/sysdeps/m68k/fpu/bits/mathdef.h index 4eaa58a3a9..c2b4eff920 100644 --- a/sysdeps/m68k/fpu/bits/mathdef.h +++ b/sysdeps/m68k/fpu/bits/mathdef.h @@ -36,5 +36,5 @@ typedef long double double_t; /* `double' expressions are evaluated as #define INFINITY HUGE_VALL /* The values returned by `ilogb' for 0 and NaN respectively. */ -#define FP_ILOGB0 0 +#define FP_ILOGB0 0x80000000 #define FP_ILOGBNAN 0x7fffffff From fb1efdeaa7f7b71c11d87bd08d6bb93ef4ebdb84 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 26 Jun 1997 22:19:23 +0000 Subject: [PATCH 0989/4487] Update copyright. --- sysdeps/m68k/elf/start.S | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/sysdeps/m68k/elf/start.S b/sysdeps/m68k/elf/start.S index 1b622d6e08..6c7cd4b99d 100644 --- a/sysdeps/m68k/elf/start.S +++ b/sysdeps/m68k/elf/start.S @@ -1,33 +1,33 @@ /* Startup code compliant to the ELF m68k ABI. -Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. + Copyright (C) 1996, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* This is the canonical entry point, usually the first thing in the text segment. The SVR4/m68k ABI says that when the entry point runs, most registers' values are unspecified, except for: %a1 Contains a function pointer to be registered with `atexit'. - This is how the dynamic linker arranges to have DT_FINI + This is how the dynamic linker arranges to have DT_FINI functions called for shared libraries that have been loaded before this code runs. %sp The stack contains the arguments and environment: - 0(%sp) argc + 0(%sp) argc 4(%sp) argv[0] ... (4*argc)(%sp) NULL @@ -36,7 +36,7 @@ Cambridge, MA 02139, USA. */ NULL */ - .text + .text .globl _start _start: /* Clear the frame pointer. The ABI suggests this be done, to mark From 3fe409285e0f90cbe5a8e7e64c5239bdc4305ec8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 26 Jun 1997 22:19:45 +0000 Subject: [PATCH 0990/4487] Define it here. Handle zero, NaN and infinity specially. --- sysdeps/m68k/fpu/s_ilogb.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/sysdeps/m68k/fpu/s_ilogb.c b/sysdeps/m68k/fpu/s_ilogb.c index a081a884d4..2d8f7d5082 100644 --- a/sysdeps/m68k/fpu/s_ilogb.c +++ b/sysdeps/m68k/fpu/s_ilogb.c @@ -19,21 +19,33 @@ #define __LIBC_M81_MATH_INLINES #include -#ifndef FUNC -#define FUNC ilogb +#ifndef SUFF +#define SUFF #endif #ifndef float_type #define float_type double #endif -#define __CONCATX(a,b) __CONCAT(a,b) +#define CONCATX(a,b) __CONCAT(a,b) +#define s(name) CONCATX(name,SUFF) +#define m81(func) __m81_u(s(func)) int -__CONCATX(__,FUNC) (x) - float_type x; +s(__ilogb) (float_type x) { - return __m81_u(__CONCATX(__,FUNC))(x); + float_type result; + unsigned long x_cond; + + x_cond = __m81_test (x); + /* We must return consistent values for zero and NaN. */ + if (x_cond & __M81_COND_ZERO) + return FP_ILOGB0; + if (x_cond & (__M81_COND_NAN | __M81_COND_INF)) + return FP_ILOGBNAN; + + __asm ("fgetexp%.x %1, %0" : "=f" (result) : "f" (x)); + return (int) result; } #define weak_aliasx(a,b) weak_alias(a,b) -weak_aliasx (__CONCATX(__,FUNC), FUNC) +weak_aliasx (s(__ilogb), s(ilogb)) From ca50e0187a6e0018af1264e481c5f2b7791dd020 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 26 Jun 1997 22:19:58 +0000 Subject: [PATCH 0991/4487] Adapated for change of s_ilogb.c. --- sysdeps/m68k/fpu/s_ilogbf.c | 2 +- sysdeps/m68k/fpu/s_ilogbl.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/m68k/fpu/s_ilogbf.c b/sysdeps/m68k/fpu/s_ilogbf.c index c0c2ffd18d..4031c42ff7 100644 --- a/sysdeps/m68k/fpu/s_ilogbf.c +++ b/sysdeps/m68k/fpu/s_ilogbf.c @@ -1,3 +1,3 @@ -#define FUNC ilogbf +#define SUFF f #define float_type float #include diff --git a/sysdeps/m68k/fpu/s_ilogbl.c b/sysdeps/m68k/fpu/s_ilogbl.c index c3554d5c58..9c55a115e0 100644 --- a/sysdeps/m68k/fpu/s_ilogbl.c +++ b/sysdeps/m68k/fpu/s_ilogbl.c @@ -1,3 +1,3 @@ -#define FUNC ilogbl +#define SUFF l #define float_type long double #include From fc83bd9d03f43c2d19697cc3cd4fe687e78fcf30 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 27 Jun 1997 23:07:23 +0000 Subject: [PATCH 0992/4487] Moved to bits/. --- sysdeps/m68k/nan.h | 59 ---------------------------------------------- 1 file changed, 59 deletions(-) delete mode 100644 sysdeps/m68k/nan.h diff --git a/sysdeps/m68k/nan.h b/sysdeps/m68k/nan.h deleted file mode 100644 index b4efddfe91..0000000000 --- a/sysdeps/m68k/nan.h +++ /dev/null @@ -1,59 +0,0 @@ -/* `NAN' constants for m68k. - Copyright (C) 1997 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _NAN_H - -#define _NAN_H 1 - -/* IEEE Not A Number. */ - -#ifdef __GNUC__ - -#define NAN \ - (__extension__ \ - ((union { unsigned long long __l; double __d; }) \ - { __l: 0x7fffffffffffffffULL }).__d) - -#define NANF \ - (__extension__ \ - ((union { unsigned long __l; float __f; }) \ - { __l: 0x7fffffffUL }).__f) - -#define NANL \ - (__extension__ \ - ((union { unsigned long __l[3]; long double __ld; }) \ - { __l: { 0x7fff0000UL, 0xffffffffUL, 0xffffffffUL } }).__ld) - -#else - -static union { unsigned char __c[8]; double __d; } __nan = - { { 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } }; -#define NAN (__nan.__d) - -static union { unsigned char __c[4]; float __f; } __nanf = - { { 0x7f, 0xff, 0xff, 0xff } }; -#define NANF (__nanf.__f) - -static union { unsigned char __c[12]; long double __ld; } __nanl = - { { 0x7f, 0xff, 0, 0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } }; -#define NANL (__nanl.__ld) - -#endif /* GCC. */ - -#endif /* nan.h */ From 3bbe33611e9a92ab416cb62d0bf0bf6d31c2b1f6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 27 Jun 1997 23:07:33 +0000 Subject: [PATCH 0993/4487] m68k specific NaN definitions. --- sysdeps/m68k/bits/nan.h | 59 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 sysdeps/m68k/bits/nan.h diff --git a/sysdeps/m68k/bits/nan.h b/sysdeps/m68k/bits/nan.h new file mode 100644 index 0000000000..b4efddfe91 --- /dev/null +++ b/sysdeps/m68k/bits/nan.h @@ -0,0 +1,59 @@ +/* `NAN' constants for m68k. + Copyright (C) 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _NAN_H + +#define _NAN_H 1 + +/* IEEE Not A Number. */ + +#ifdef __GNUC__ + +#define NAN \ + (__extension__ \ + ((union { unsigned long long __l; double __d; }) \ + { __l: 0x7fffffffffffffffULL }).__d) + +#define NANF \ + (__extension__ \ + ((union { unsigned long __l; float __f; }) \ + { __l: 0x7fffffffUL }).__f) + +#define NANL \ + (__extension__ \ + ((union { unsigned long __l[3]; long double __ld; }) \ + { __l: { 0x7fff0000UL, 0xffffffffUL, 0xffffffffUL } }).__ld) + +#else + +static union { unsigned char __c[8]; double __d; } __nan = + { { 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } }; +#define NAN (__nan.__d) + +static union { unsigned char __c[4]; float __f; } __nanf = + { { 0x7f, 0xff, 0xff, 0xff } }; +#define NANF (__nanf.__f) + +static union { unsigned char __c[12]; long double __ld; } __nanl = + { { 0x7f, 0xff, 0, 0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } }; +#define NANL (__nanl.__ld) + +#endif /* GCC. */ + +#endif /* nan.h */ From 82f936a4101662484b52a4650a2c68e627c4c871 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 27 Jun 1997 23:09:04 +0000 Subject: [PATCH 0994/4487] (__NONE_set_memvals): Correct typo. --- sysdeps/standalone/brk.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sysdeps/standalone/brk.c b/sysdeps/standalone/brk.c index 5985b3099e..6ee9935092 100644 --- a/sysdeps/standalone/brk.c +++ b/sysdeps/standalone/brk.c @@ -46,8 +46,10 @@ int __C_heap_size; static #endif void -__NONE_set_memvals (argc, argv, envp), - int argc; char **argv; char **envp; +__NONE_set_memvals (argc, argv, envp) + int argc; + char **argv; + char **envp; { __rorig = From 184e1d450b9589e4a41e08cea0d2bd2bb9f03133 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 27 Jun 1997 23:09:10 +0000 Subject: [PATCH 0995/4487] Add ENOTDIR. --- sysdeps/standalone/arm/bits/errno.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/standalone/arm/bits/errno.h b/sysdeps/standalone/arm/bits/errno.h index 8090a8074d..49a4998cf8 100644 --- a/sysdeps/standalone/arm/bits/errno.h +++ b/sysdeps/standalone/arm/bits/errno.h @@ -47,6 +47,7 @@ #define EPROTOTYPE 19 #define ESRCH 20 #define EPERM 21 +#define ENOTDIR 22 #endif #define __set_errno(val) errno = (val) From c49416b519d6bf2a2236b038fd7c571a811e0382 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 6 Jul 1997 21:45:05 +0000 Subject: [PATCH 0996/4487] Correct the FE_INEXACT and FE_UNDERFLOW cases. --- sysdeps/m68k/fpu/fraiseexcpt.c | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/sysdeps/m68k/fpu/fraiseexcpt.c b/sysdeps/m68k/fpu/fraiseexcpt.c index 51411dd292..d509604e28 100644 --- a/sysdeps/m68k/fpu/fraiseexcpt.c +++ b/sysdeps/m68k/fpu/fraiseexcpt.c @@ -48,15 +48,43 @@ feraiseexcept (int excepts) /* Next: overflow. */ if (excepts & FE_OVERFLOW) { + /* We cannot raise the overflow exception without also setting the + inexact flag. Restore it after the operation, unless it should + be set anyway. */ long double d = LDBL_MAX; - __asm__ __volatile__ ("fmul%.x %0,%0; fnop" : "=f" (d) : "0" (d)); + fexcept_t fpsr; + + __asm__ ("fmove%.l %/fpsr,%0" : "=dm" (fpsr)); + __asm__ __volatile__ ("fmul%.x %0,%0" : "=f" (d) : "0" (d)); + if (!((excepts | fpsr) & FE_INEXACT)) + { + __asm__ ("fmove%.l %/fpsr,%0" : "=dm" (fpsr)); + fpsr &= ~FE_INEXACT; + __asm__ __volatile__ ("fmove%.l %0,%/fpsr" : : "dm" (fpsr)); + } + else + __asm__ ("fnop"); } /* Next: underflow. */ if (excepts & FE_UNDERFLOW) { - long double d = LDBL_MIN; - __asm__ __volatile__ ("fdiv%.s %#0r16,%0; fnop" : "=f" (d) : "0" (d)); + /* We cannot raise the underflow exception without also setting the + inexact flag. Restore it after the operation, unless it should + be set anyway. */ + long double d = -LDBL_MAX; + fexcept_t fpsr; + + __asm__ ("fmove%.l %/fpsr,%0" : "=dm" (fpsr)); + __asm__ __volatile__ ("fetox%.x %0" : "=f" (d) : "0" (d)); + if (!((excepts | fpsr) & FE_INEXACT)) + { + __asm__ ("fmove%.l %/fpsr,%0" : "=dm" (fpsr)); + fpsr &= ~FE_INEXACT; + __asm__ __volatile__ ("fmove%.l %0,%/fpsr" : : "dm" (fpsr)); + } + else + __asm__ ("fnop"); } /* Last: inexact. */ From a906f96b30146e99d3fd27994c9cc61673c70628 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 6 Jul 1997 21:50:34 +0000 Subject: [PATCH 0997/4487] Additional MIPS64 related files to distribute. --- sysdeps/mips/mips64/Dist | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/mips/mips64/Dist diff --git a/sysdeps/mips/mips64/Dist b/sysdeps/mips/mips64/Dist new file mode 100644 index 0000000000..ad6ea0313a --- /dev/null +++ b/sysdeps/mips/mips64/Dist @@ -0,0 +1 @@ +setjmp_aux.c From 25fd8251b34ff6dfba2450fe1452738bfb188404 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 6 Jul 1997 21:52:07 +0000 Subject: [PATCH 0998/4487] Rename sys/kernel_termios.h to kernel_termios.h. --- sysdeps/unix/sysv/linux/alpha/Dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist index 80fca49a9b..1b1f771853 100644 --- a/sysdeps/unix/sysv/linux/alpha/Dist +++ b/sysdeps/unix/sysv/linux/alpha/Dist @@ -5,7 +5,7 @@ init-first.h clone.S kernel_sigaction.h kernel_stat.h +kernel_termios.h sys/io.h sys/acct.h -sys/kernel_termios.h sys/procfs.h From ed178b7ac8e6b6b76f7eeafa9c7ff18bed0ddc12 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 6 Jul 1997 21:52:39 +0000 Subject: [PATCH 0999/4487] Update copyright. --- .../standalone/i386/force_cpu386/target.ld | 43 +++++++++-------- .../standalone/m68k/m68020/mvme136/mvme136.ld | 47 +++++++++---------- sysdeps/vax/setjmp.c | 27 ++++++----- 3 files changed, 58 insertions(+), 59 deletions(-) diff --git a/sysdeps/standalone/i386/force_cpu386/target.ld b/sysdeps/standalone/i386/force_cpu386/target.ld index 056da10d55..09252cc783 100644 --- a/sysdeps/standalone/i386/force_cpu386/target.ld +++ b/sysdeps/standalone/i386/force_cpu386/target.ld @@ -1,28 +1,27 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), On-Line Applications Research Corporation. - -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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* This file contains directives for the GNU linker which are specific to the FORCE CPU386 board. */ -MEMORY +MEMORY { ram : org = 0x0, l = 1M } @@ -34,19 +33,19 @@ heap_size = 0x20000; SECTIONS { - .text 0x0 : + .text 0x0 : { _text_start = ABSOLUTE(.) ; *(.text) _etext = ALIGN( 0x10 ) ; } - .data ADDR( .text ) + SIZEOF( .text ): + .data ADDR( .text ) + SIZEOF( .text ): { _data_start = . ; *(.data) _edata = ALIGN( 0x10 ) ; } - .bss ADDR( .data ) + SIZEOF( .data ): + .bss ADDR( .data ) + SIZEOF( .data ): { _bss_start = . ; *(.bss) diff --git a/sysdeps/standalone/m68k/m68020/mvme136/mvme136.ld b/sysdeps/standalone/m68k/m68020/mvme136/mvme136.ld index 0f68330241..e25492a235 100644 --- a/sysdeps/standalone/m68k/m68020/mvme136/mvme136.ld +++ b/sysdeps/standalone/m68k/m68020/mvme136/mvme136.ld @@ -1,28 +1,27 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), On-Line Applications Research Corporation. - -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 Library General Public License as -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* This file contains directives for the GNU linker which are specific to the Motorola MVME136/MVME135 boards. */ -MEMORY +MEMORY { ram : org = 0x3000, l = 1M } @@ -34,21 +33,21 @@ heap_size = 0x20000; SECTIONS { - .text 0x3000 : + .text 0x3000 : { text_start = ABSOLUTE(.) ; *(.text) etext = ALIGN( 0x10 ) ; - } + } - .data ADDR( .text ) + SIZEOF( .text ): + .data ADDR( .text ) + SIZEOF( .text ): { data_start = . ; *(.data) edata = ALIGN( 0x10 ) ; } - .bss ADDR( .data ) + SIZEOF( .data ): + .bss ADDR( .data ) + SIZEOF( .data ): { bss_start = . ; _bss_start = . ; @@ -58,5 +57,5 @@ SECTIONS . += 0x20000; end = . ; _end = . ; - } + } } diff --git a/sysdeps/vax/setjmp.c b/sysdeps/vax/setjmp.c index 9d711cbfda..43a80c1887 100644 --- a/sysdeps/vax/setjmp.c +++ b/sysdeps/vax/setjmp.c @@ -1,21 +1,22 @@ -/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1994, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Derived from @(#)_setjmp.s 5.7 (Berkeley) 6/27/88, Copyright (c) 1980 Regents of the University of California. -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 -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + 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 + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include From 44efbfff52550afeffc69a0022adb2f8942a2ddd Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 11 Jul 1997 01:12:37 +0000 Subject: [PATCH 1000/4487] Not needed anymore. --- sysdeps/alpha/DEFS.h | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 sysdeps/alpha/DEFS.h diff --git a/sysdeps/alpha/DEFS.h b/sysdeps/alpha/DEFS.h deleted file mode 100644 index c2a4fc88ae..0000000000 --- a/sysdeps/alpha/DEFS.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifdef __STDC__ -#define FUNC__(name) \ - .align 3; \ - .globl __##name; \ - .ent __##name; \ - __##name: \ - lda sp, -16(sp); \ - .frame sp, 16, t9, 0; \ - .prologue 0 -#else -#define FUNC__(name) \ - .align 3; \ - .globl __/**/name; \ - .ent __/**/name,0; \ - __/**/name: \ - lda sp, -16(sp); \ - .frame sp, 16, t9, 0; \ - .prologue 0 -#endif - -#ifdef __STDC__ -#define NAME__(name) \ - __##name -#else -#define NAME__(name) \ - __/**/name -#endif From 26a96aaeb4bf4bd83de303caae65a9bd63d35b6e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 11 Jul 1997 01:12:46 +0000 Subject: [PATCH 1001/4487] Remove DEFS.h. --- sysdeps/alpha/Dist | 1 - 1 file changed, 1 deletion(-) diff --git a/sysdeps/alpha/Dist b/sysdeps/alpha/Dist index 022fa0379f..581022f6c0 100644 --- a/sysdeps/alpha/Dist +++ b/sysdeps/alpha/Dist @@ -1,5 +1,4 @@ setjmp_aux.c -DEFS.h divrem.h divl.S divq.S reml.S remq.S _mcount.S From 07ce00df82813cf2410f30f816a71aa497f688bf Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 11 Jul 1997 01:13:11 +0000 Subject: [PATCH 1002/4487] Shift the exception mask in the right position. --- sysdeps/m68k/fpu/feholdexcpt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/m68k/fpu/feholdexcpt.c b/sysdeps/m68k/fpu/feholdexcpt.c index 351fa8ae75..d8e2d8a8a1 100644 --- a/sysdeps/m68k/fpu/feholdexcpt.c +++ b/sysdeps/m68k/fpu/feholdexcpt.c @@ -32,7 +32,7 @@ feholdexcept (fenv_t *envp) fpsr = envp->status_register & ~FE_ALL_EXCEPT; __asm__ __volatile__ ("fmove%.l %0,%/fpsr" : : "dm" (fpsr)); /* And set all exceptions to non-stop. */ - fpcr = envp->control_register & ~(FE_ALL_EXCEPT << 5); + fpcr = envp->control_register & ~(FE_ALL_EXCEPT << 6); __asm__ __volatile__ ("fmove%.l %0,%!" : : "dm" (fpcr)); return 1; From 6cabe500f345f45b30e8ea04976954d689280b05 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 11 Jul 1997 01:13:24 +0000 Subject: [PATCH 1003/4487] (fesetenv): Shift the exception mask in the right position. --- sysdeps/m68k/fpu/fesetenv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/m68k/fpu/fesetenv.c b/sysdeps/m68k/fpu/fesetenv.c index f6611a20e0..8b4d6b0f88 100644 --- a/sysdeps/m68k/fpu/fesetenv.c +++ b/sysdeps/m68k/fpu/fesetenv.c @@ -32,15 +32,15 @@ fesetenv (const fenv_t *envp) __asm__ ("fmovem%.l %/fpcr/%/fpsr,%0" : "=m" (*&temp)); temp.status_register &= ~FE_ALL_EXCEPT; - temp.control_register &= ~((FE_ALL_EXCEPT << 5) | FE_UPWARD); + temp.control_register &= ~((FE_ALL_EXCEPT << 6) | FE_UPWARD); if (envp == FE_DFL_ENV) ; else if (envp == FE_NOMASK_ENV) - temp.control_register |= FE_ALL_EXCEPT << 5; + temp.control_register |= FE_ALL_EXCEPT << 6; else { temp.control_register |= (envp->control_register - & ((FE_ALL_EXCEPT << 5) | FE_UPWARD)); + & ((FE_ALL_EXCEPT << 6) | FE_UPWARD)); temp.status_register |= envp->status_register & FE_ALL_EXCEPT; } From bd4c4968c85a7123529145298f83adc5376d5ae3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 12 Jul 1997 23:22:49 +0000 Subject: [PATCH 1004/4487] Update for Linux/MIPS. --- sysdeps/mips/dl-machine.h | 496 ++++++++++++++++++++++--------------- sysdeps/mips/fpu_control.h | 90 ++++--- 2 files changed, 340 insertions(+), 246 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index ff7d371025..cc7198b60e 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -24,6 +24,34 @@ #define ELF_MACHINE_NAME "MIPS" #include +#include + +#ifndef ENTRY_POINT +#error ENTRY_POINT needs to be defined for MIPS. +#endif + +#ifndef _RTLD_PROLOGUE +#ifdef __STDC__ +#define _RTLD_PROLOGUE(entry) "\n\t.globl " #entry \ + "\n\t.ent " #entry \ + "\n\t" #entry ":\n\t" +#else +#define _RTLD_PROLOGUE(entry) "\n\t.globl entry\n\t.ent entry\n\t entry:\n\t" +#endif +#endif + +#ifndef _RTLD_EPILOGUE +#ifdef __STDC__ +#define _RTLD_EPILOGUE(entry) "\t.end " #entry "\n" +#else +#define _RTLD_EPILOGUE(entry) "\t.end entry\n" +#endif +#endif + +/* I have no idea what I am doing. */ +#define ELF_MACHINE_RELOC_NOPLT -1 +#define elf_machine_lookup_noplt_p(type) (1) +#define elf_machine_lookup_noexec_p(type) (0) /* Translate a processor specific dynamic tag to the index in l_info array. */ @@ -34,6 +62,18 @@ #define ELF_MACHINE_ALIGN_MASK 0xffff #endif +/* + * MIPS libraries are usually linked to a non-zero base address. We + * subtrace the base address from the address where we map the object + * to. This results in more efficient address space usage. + */ +#if 0 +#define MAP_BASE_ADDR(l) ((l)->l_info[DT_MIPS(BASE_ADDRESS)] ? \ + (l)->l_info[DT_MIPS(BASE_ADDRESS)]->d_un.d_ptr : 0) +#else +#define MAP_BASE_ADDR(l) 0x5ffe0000 +#endif + /* If there is a DT_MIPS_RLD_MAP entry in the dynamic section, fill it in with the run-time address of the r_debug structure */ #define ELF_MACHINE_DEBUG_SETUP(l,r) \ @@ -43,7 +83,7 @@ do { if ((l)->l_info[DT_MIPS (RLD_MAP)]) \ } while (0) /* Return nonzero iff E_MACHINE is compatible with the running host. */ -static inline int +static inline int __attribute__ ((unused)) elf_machine_matches_host (ElfW(Half) e_machine) { switch (e_machine) @@ -56,6 +96,16 @@ elf_machine_matches_host (ElfW(Half) e_machine) } } +/* Return the link-time address of _DYNAMIC. Conveniently, this is the ++ first element of the GOT. This must be inlined in a function which ++ uses global data. */ ++static inline ElfW(Addr) ++elf_machine_dynamic (void) ++{ ++ register ElfW(Addr) gp asm ("$28"); ++ return * (ElfW(Addr) *) (gp - 0x7ff0); ++} ++ static inline ElfW(Addr) * elf_mips_got_from_gpreg (ElfW(Addr) gpreg) { @@ -75,6 +125,16 @@ elf_machine_got (void) } +/* Return the link-time address of _DYNAMIC. Conveniently, this is the + first element of the GOT. This must be inlined in a function which + uses global data. */ +static inline ElfW(Addr) +elf_machine_dynamic (void) +{ + register ElfW(Addr) gp asm ("$28"); + return * (ElfW(Addr) *) (gp - 0x7ff0); +} + /* Return the run-time load address of the shared object. */ static inline ElfW(Addr) elf_machine_load_address (void) @@ -87,7 +147,9 @@ elf_machine_load_address (void) " nop\n" "here: dsubu %0, $31, %0\n" " .set reorder\n" - : "=r" (addr)); + : "=r" (addr) + : /* No inputs */ + : "$31"); #else asm (" .set noreorder\n" " la %0, here\n" @@ -95,7 +157,9 @@ elf_machine_load_address (void) " nop\n" "here: subu %0, $31, %0\n" " .set reorder\n" - : "=r" (addr)); + : "=r" (addr) + : /* No inputs */ + : "$31"); #endif return addr; } @@ -105,7 +169,7 @@ elf_machine_load_address (void) /* Relocate GOT. */ static inline void -elf_machine_got_rel (struct link_map *map) +elf_machine_got_rel (struct link_map *map, int lazy) { ElfW(Addr) *got; ElfW(Sym) *sym; @@ -119,7 +183,7 @@ elf_machine_got_rel (struct link_map *map) const ElfW(Sym) *ref = sym; \ ElfW(Addr) sym_loadaddr; \ sym_loadaddr = _dl_lookup_symbol (strtab + sym->st_name, &ref, scope, \ - map->l_name, DL_LOOKUP_NOPLT); \ + map->l_name, ELF_MACHINE_RELOC_NOPLT);\ (ref)? sym_loadaddr + ref->st_value: 0; \ }) @@ -151,7 +215,7 @@ elf_machine_got_rel (struct link_map *map) { if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC) { - if (sym->st_value /* && maybe_stub (sym->st_value) */) + if (sym->st_value && lazy) *got = sym->st_value + map->l_addr; else *got = RESOLVE_GOTSYM (sym); @@ -163,7 +227,7 @@ elf_machine_got_rel (struct link_map *map) *got = RESOLVE_GOTSYM (sym); else if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC && *got != sym->st_value - /* && maybe_stub (*got) */) + && lazy) *got += map->l_addr; else if (ELFW(ST_TYPE) (sym->st_info) == STT_SECTION) { @@ -193,6 +257,11 @@ elf_machine_runtime_setup (struct link_map *l, int lazy) extern void _dl_runtime_resolve (ElfW(Word)); extern int _dl_mips_gnu_objects; +#ifdef RTLD_BOOTSTRAP + { + return lazy; + } +#endif if (lazy) { /* The GOT entries for functions have not yet been filled in. @@ -216,7 +285,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy) } /* Relocate global offset table. */ - elf_machine_got_rel (l); + elf_machine_got_rel (l, lazy); return lazy; } @@ -282,6 +351,7 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc) } _dl_signal_error (0, NULL, "cannot find runtime link map"); + return NULL; } /* Mips has no PLT but define elf_machine_relplt to be elf_machine_rel. */ @@ -295,211 +365,220 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc) to usual c arguments. */ #ifdef __mips64 -#define ELF_MACHINE_RUNTIME_TRAMPOLINE \ -/* The flag _dl_mips_gnu_objects is set if all dynamic objects are \ - generated by the gnu linker. */\ -int _dl_mips_gnu_objects = 1;\ -\ +#define ELF_MACHINE_RUNTIME_TRAMPOLINE \ +/* The flag _dl_mips_gnu_objects is set if all dynamic objects are \ + generated by the gnu linker. */ \ +int _dl_mips_gnu_objects = 1; \ + \ /* This is called from assembly stubs below which the compiler can't see. */ \ -static ElfW(Addr) \ -__dl_runtime_resolve (ElfW(Word), ElfW(Word), ElfW(Addr), ElfW(Addr)) \ - __attribute__ ((unused)); \ -\ -static ElfW(Addr) \ -__dl_runtime_resolve (ElfW(Word) sym_index,\ - ElfW(Word) return_address,\ - ElfW(Addr) old_gpreg,\ - ElfW(Addr) stub_pc)\ -{\ - struct link_map *l = elf_machine_runtime_link_map (old_gpreg, stub_pc);\ - const ElfW(Sym) *const symtab\ - = (const ElfW(Sym) *) (l->l_addr + l->l_info[DT_SYMTAB]->d_un.d_ptr);\ - const char *strtab\ - = (void *) (l->l_addr + l->l_info[DT_STRTAB]->d_un.d_ptr);\ - const ElfW(Addr) *got\ - = (const ElfW(Addr) *) (l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr);\ - const ElfW(Word) local_gotno\ - = (const ElfW(Word)) l->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val;\ - const ElfW(Word) gotsym\ - = (const ElfW(Word)) l->l_info[DT_MIPS (GOTSYM)]->d_un.d_val;\ - const ElfW(Sym) *definer;\ - ElfW(Addr) loadbase;\ - ElfW(Addr) funcaddr;\ - struct link_map **scope;\ -\ - /* Look up the symbol's run-time value. */\ - scope = _dl_object_relocation_scope (l);\ - definer = &symtab[sym_index];\ -\ - loadbase = _dl_lookup_symbol (strtab + definer->st_name, &definer,\ - scope, l->l_name, DL_LOOKUP_NOPLT);\ -\ - *_dl_global_scope_end = NULL;\ -\ - /* Apply the relocation with that value. */\ - funcaddr = loadbase + definer->st_value;\ - *(got + local_gotno + sym_index - gotsym) = funcaddr;\ -\ - return funcaddr;\ -}\ -\ -asm ("\n\ - .text\n\ - .align 3\n\ - .globl _dl_runtime_resolve\n\ - .type _dl_runtime_resolve,@function\n\ - .ent _dl_runtime_resolve\n\ -_dl_runtime_resolve:\n\ - .set noreorder\n\ - # Save old GP to $3.\n\ - move $3,$28\n\ - # Modify t9 ($25) so as to point .cpload instruction.\n\ - daddu $25,2*8\n\ - # Compute GP.\n\ - .cpload $25\n\ - .set reorder\n\ - # Save slot call pc.\n\ - move $2, $31\n\ - # Save arguments and sp value in stack.\n\ - dsubu $29, 10*8\n\ - .cprestore 8*8\n\ - sd $15, 9*8($29)\n\ - sd $4, 3*8($29)\n\ - sd $5, 4*8($29)\n\ - sd $6, 5*8($29)\n\ - sd $7, 6*8($29)\n\ - sd $16, 7*8($29)\n\ - move $16, $29\n\ - move $4, $24\n\ - move $5, $15\n\ - move $6, $3\n\ - move $7, $2\n\ - jal __dl_runtime_resolve\n\ - move $29, $16\n\ - ld $31, 9*8($29)\n\ - ld $4, 3*8($29)\n\ - ld $5, 4*8($29)\n\ - ld $6, 5*8($29)\n\ - ld $7, 6*8($29)\n\ - ld $16, 7*8($29)\n\ - daddu $29, 10*8\n\ - move $25, $2\n\ - jr $25\n\ - .end _dl_runtime_resolve\n\ +static ElfW(Addr) \ +__dl_runtime_resolve (ElfW(Word), ElfW(Word), ElfW(Addr), ElfW(Addr)) \ + __attribute__ ((unused)); \ + \ +static ElfW(Addr) \ +__dl_runtime_resolve (ElfW(Word) sym_index, \ + ElfW(Word) return_address, \ + ElfW(Addr) old_gpreg, \ + ElfW(Addr) stub_pc) \ +{ \ + struct link_map *l = elf_machine_runtime_link_map (old_gpreg, stub_pc); \ + const ElfW(Sym) *const symtab \ + = (const ElfW(Sym) *) (l->l_addr + l->l_info[DT_SYMTAB]->d_un.d_ptr); \ + const char *strtab \ + = (void *) (l->l_addr + l->l_info[DT_STRTAB]->d_un.d_ptr); \ + const ElfW(Addr) *got \ + = (const ElfW(Addr) *) (l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr); \ + const ElfW(Word) local_gotno \ + = (const ElfW(Word)) l->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; \ + const ElfW(Word) gotsym \ + = (const ElfW(Word)) l->l_info[DT_MIPS (GOTSYM)]->d_un.d_val; \ + const ElfW(Sym) *definer; \ + ElfW(Addr) loadbase; \ + ElfW(Addr) funcaddr; \ + struct link_map **scope; \ + \ + /* Look up the symbol's run-time value. */ \ + scope = _dl_object_relocation_scope (l); \ + definer = &symtab[sym_index]; \ + \ + loadbase = _dl_lookup_symbol (strtab + definer->st_name, &definer, \ + scope, l->l_name, ELF_MACHINE_RELOC_NOPLT); \ + \ + *_dl_global_scope_end = NULL; \ + \ + /* Apply the relocation with that value. */ \ + funcaddr = loadbase + definer->st_value; \ + *(got + local_gotno + sym_index - gotsym) = funcaddr; \ + \ + return funcaddr; \ +} \ + \ +asm ("\n \ + .text\n \ + .align 3\n \ + .globl _dl_runtime_resolve\n \ + .type _dl_runtime_resolve,@function\n \ + .ent _dl_runtime_resolve\n \ +_dl_runtime_resolve:\n \ + .set noreorder\n \ + # Save old GP to $3.\n \ + move $3,$28\n \ + # Modify t9 ($25) so as to point .cpload instruction.\n \ + daddu $25,2*8\n \ + # Compute GP.\n \ + .cpload $25\n \ + .set reorder\n \ + # Save slot call pc.\n \ + move $2, $31\n \ + # Save arguments and sp value in stack.\n \ + dsubu $29, 10*8\n \ + .cprestore 8*8\n \ + sd $15, 9*8($29)\n \ + sd $4, 3*8($29)\n \ + sd $5, 4*8($29)\n \ + sd $6, 5*8($29)\n \ + sd $7, 6*8($29)\n \ + sd $16, 7*8($29)\n \ + move $16, $29\n \ + move $4, $24\n \ + move $5, $15\n \ + move $6, $3\n \ + move $7, $2\n \ + jal __dl_runtime_resolve\n \ + move $29, $16\n \ + ld $31, 9*8($29)\n \ + ld $4, 3*8($29)\n \ + ld $5, 4*8($29)\n \ + ld $6, 5*8($29)\n \ + ld $7, 6*8($29)\n \ + ld $16, 7*8($29)\n \ + daddu $29, 10*8\n \ + move $25, $2\n \ + jr $25\n \ + .end _dl_runtime_resolve\n \ "); #else -#define ELF_MACHINE_RUNTIME_TRAMPOLINE \ -/* The flag _dl_mips_gnu_objects is set if all dynamic objects are \ - generated by the gnu linker. */\ -int _dl_mips_gnu_objects = 1;\ -\ +#define ELF_MACHINE_RUNTIME_TRAMPOLINE \ +/* The flag _dl_mips_gnu_objects is set if all dynamic objects are \ + generated by the gnu linker. */ \ +int _dl_mips_gnu_objects = 1; \ + \ /* This is called from assembly stubs below which the compiler can't see. */ \ -static ElfW(Addr) \ -__dl_runtime_resolve (ElfW(Word), ElfW(Word), ElfW(Addr), ElfW(Addr)) \ - __attribute__ ((unused)); \ -\ -static ElfW(Addr) \ -__dl_runtime_resolve (ElfW(Word) sym_index,\ - ElfW(Word) return_address,\ - ElfW(Addr) old_gpreg,\ - ElfW(Addr) stub_pc)\ -{\ - struct link_map *l = elf_machine_runtime_link_map (old_gpreg, stub_pc);\ - const ElfW(Sym) *const symtab\ - = (const ElfW(Sym) *) (l->l_addr + l->l_info[DT_SYMTAB]->d_un.d_ptr);\ - const char *strtab\ - = (void *) (l->l_addr + l->l_info[DT_STRTAB]->d_un.d_ptr);\ - const ElfW(Addr) *got\ - = (const ElfW(Addr) *) (l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr);\ - const ElfW(Word) local_gotno\ - = (const ElfW(Word)) l->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val;\ - const ElfW(Word) gotsym\ - = (const ElfW(Word)) l->l_info[DT_MIPS (GOTSYM)]->d_un.d_val;\ - const ElfW(Sym) *definer;\ - ElfW(Addr) loadbase;\ - ElfW(Addr) funcaddr;\ - struct link_map **scope;\ -\ - /* Look up the symbol's run-time value. */\ - scope = _dl_object_relocation_scope (l);\ - definer = &symtab[sym_index];\ -\ - loadbase = _dl_lookup_symbol (strtab + definer->st_name, &definer,\ - scope, l->l_name, DL_LOOKUP_NOPLT);\ -\ - *_dl_global_scope_end = NULL;\ -\ - /* Apply the relocation with that value. */\ - funcaddr = loadbase + definer->st_value;\ - *(got + local_gotno + sym_index - gotsym) = funcaddr;\ -\ - return funcaddr;\ -}\ -\ -asm ("\n\ - .text\n\ - .align 2\n\ - .globl _dl_runtime_resolve\n\ - .type _dl_runtime_resolve,@function\n\ - .ent _dl_runtime_resolve\n\ -_dl_runtime_resolve:\n\ - .set noreorder\n\ - # Save old GP to $3.\n\ - move $3,$28\n\ - # Modify t9 ($25) so as to point .cpload instruction.\n\ - addu $25,8\n\ - # Compute GP.\n\ - .cpload $25\n\ - .set reorder\n\ - # Save slot call pc.\n\ - move $2, $31\n\ - # Save arguments and sp value in stack.\n\ - subu $29, 40\n\ - .cprestore 32\n\ - sw $15, 36($29)\n\ - sw $4, 12($29)\n\ - sw $5, 16($29)\n\ - sw $6, 20($29)\n\ - sw $7, 24($29)\n\ - sw $16, 28($29)\n\ - move $16, $29\n\ - move $4, $24\n\ - move $5, $15\n\ - move $6, $3\n\ - move $7, $2\n\ - jal __dl_runtime_resolve\n\ - move $29, $16\n\ - lw $31, 36($29)\n\ - lw $4, 12($29)\n\ - lw $5, 16($29)\n\ - lw $6, 20($29)\n\ - lw $7, 24($29)\n\ - lw $16, 28($29)\n\ - addu $29, 40\n\ - move $25, $2\n\ - jr $25\n\ - .end _dl_runtime_resolve\n\ +static ElfW(Addr) \ +__dl_runtime_resolve (ElfW(Word), ElfW(Word), ElfW(Addr), ElfW(Addr)) \ + __attribute__ ((unused)); \ + \ +static ElfW(Addr) \ +__dl_runtime_resolve (ElfW(Word) sym_index, \ + ElfW(Word) return_address, \ + ElfW(Addr) old_gpreg, \ + ElfW(Addr) stub_pc) \ +{ \ + struct link_map *l = elf_machine_runtime_link_map (old_gpreg, stub_pc); \ + const ElfW(Sym) *const symtab \ + = (const ElfW(Sym) *) (l->l_addr + l->l_info[DT_SYMTAB]->d_un.d_ptr); \ + const char *strtab \ + = (void *) (l->l_addr + l->l_info[DT_STRTAB]->d_un.d_ptr); \ + const ElfW(Addr) *got \ + = (const ElfW(Addr) *) (l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr); \ + const ElfW(Word) local_gotno \ + = (const ElfW(Word)) l->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; \ + const ElfW(Word) gotsym \ + = (const ElfW(Word)) l->l_info[DT_MIPS (GOTSYM)]->d_un.d_val; \ + const ElfW(Sym) *definer; \ + ElfW(Addr) loadbase; \ + ElfW(Addr) funcaddr; \ + struct link_map **scope; \ + \ + /* Look up the symbol's run-time value. */ \ + scope = _dl_object_relocation_scope (l); \ + definer = &symtab[sym_index]; \ + \ + loadbase = _dl_lookup_symbol (strtab + definer->st_name, &definer, \ + scope, l->l_name, ELF_MACHINE_RELOC_NOPLT); \ + \ + *_dl_global_scope_end = NULL; \ + \ + /* Apply the relocation with that value. */ \ + funcaddr = loadbase + definer->st_value; \ + *(got + local_gotno + sym_index - gotsym) = funcaddr; \ + \ + return funcaddr; \ +} \ + \ +asm ("\n \ + .text\n \ + .align 2\n \ + .globl _dl_runtime_resolve\n \ + .type _dl_runtime_resolve,@function\n \ + .ent _dl_runtime_resolve\n \ +_dl_runtime_resolve:\n \ + .set noreorder\n \ + # Save slot call pc.\n \ + move $3, $31\n \ + # Modify t9 ($25) so as to point .cpload instruction.\n \ + addu $25,8\n \ + # Compute GP.\n \ + .cpload $25\n \ + .set reorder\n \ + # Save slot call pc.\n \ + move $2, $31\n \ + # Save arguments and sp value in stack.\n \ + subu $29, 40\n \ + .cprestore 32\n \ + sw $15, 36($29)\n \ + sw $4, 12($29)\n \ + sw $5, 16($29)\n \ + sw $6, 20($29)\n \ + sw $7, 24($29)\n \ + sw $16, 28($29)\n \ + move $16, $29\n \ + move $4, $24\n \ + move $5, $15\n \ + move $6, $3\n \ + move $7, $2\n \ + jal __dl_runtime_resolve\n \ + move $29, $16\n \ + lw $31, 36($29)\n \ + lw $4, 12($29)\n \ + lw $5, 16($29)\n \ + lw $6, 20($29)\n \ + lw $7, 24($29)\n \ + lw $16, 28($29)\n \ + addu $29, 40\n \ + move $25, $2\n \ + jr $25\n \ + .end _dl_runtime_resolve\n \ "); #endif /* Mask identifying addresses reserved for the user program, where the dynamic linker should not map anything. */ -#define ELF_MACHINE_USER_ADDRESS_MASK 0x00000000UL +#define ELF_MACHINE_USER_ADDRESS_MASK 0x80000000UL /* Initial entry point code for the dynamic linker. The C function `_dl_start' is the real entry point; - its return value is the user program's entry point. */ + its return value is the user program's entry point. + Note how we have to be careful about two things: + + 1) That we allocate a minimal stack of 24 bytes for + every function call, the MIPS ABI states that even + if all arguments are passed in registers the procedure + called can use the 16 byte area pointed to by $sp + when it is called to store away the arguments passed + to it. + + 2) That under Linux the entry is named __start + and not just plain _start. */ #ifdef __mips64 #define RTLD_START asm ("\ .text\n\ - .align 3\n\ - .globl _start\n\ - .globl _dl_start_user\n\ - .ent _start\n\ -_start:\n\ + .align 3\n"\ +_RTLD_PROLOGUE (ENTRY_POINT)\ +" .globl _dl_start_user\n\ .set noreorder\n\ bltzal $0, 0f\n\ nop\n\ @@ -561,16 +640,15 @@ _dl_start_user:\n\ ld $5, 1*8($29)\n\ ld $6, 2*8$29)\n\ ld $7, 3*8($29)\n\ - jr $25\n\ - .end _start\n\ -"); + jr $25\n"\ +_RTLD_EPILOGUE(ENTRY_POINT) \ +); + #else #define RTLD_START asm ("\ - .text\n\ - .globl _start\n\ - .globl _dl_start_user\n\ - .ent _start\n\ -_start:\n\ + .text\n"\ +_RTLD_PROLOGUE(ENTRY_POINT)\ +" .globl _dl_start_user\n\ .set noreorder\n\ bltzal $0, 0f\n\ nop\n\ @@ -582,7 +660,9 @@ _start:\n\ la $4, _DYNAMIC\n\ sw $4, -0x7ff0($28)\n\ move $4, $29\n\ + subu $29, 16\n\ jal _dl_start\n\ + addiu $29, 16\n\ # Get the value of label '_dl_start_user' in t9 ($25).\n\ la $25, _dl_start_user\n\ _dl_start_user:\n\ @@ -610,7 +690,9 @@ _dl_start_user:\n\ lw $4, 8($2)\n\ # Call _dl_init_next to return the address of an initializer\n\ # function to run.\n\ + subu $29, 16\n\ jal _dl_init_next\n\ + addiu $29, 16\n\ move $28, $16\n\ # Check for zero return, when out of initializers.\n\ beq $2, $0, 2f\n\ @@ -624,16 +706,18 @@ _dl_start_user:\n\ move $28, $16\n\ # Loop to call _dl_init_next for the next initializer.\n\ b 1b\n\ +2: # Clear the startup flag. Assumes 32 bit ints.\n\ + sw $0, _dl_starting_up\n\ # Pass our finalizer function to the user in ra.\n\ -2: la $31, _dl_fini\n\ + la $31, _dl_fini\n\ # Jump to the user entry point.\n\ move $25, $17\n\ lw $4, 0($29)\n\ lw $5, 4($29)\n\ lw $6, 8($29)\n\ lw $7, 12($29)\n\ - jr $25\n\ - .end _start\n\ + jr $25\n"\ +_RTLD_EPILOGUE(ENTRY_POINT)\ "); #endif diff --git a/sysdeps/mips/fpu_control.h b/sysdeps/mips/fpu_control.h index 36e05a4f6e..e271ae1fcc 100644 --- a/sysdeps/mips/fpu_control.h +++ b/sysdeps/mips/fpu_control.h @@ -1,7 +1,7 @@ /* FPU control word bits. Mips version. Copyright (C) 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. - Contributed by Olaf Flebbe. + Contributed by Olaf Flebbe and Ralf Baechle. 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,74 +21,84 @@ #ifndef _FPU_CONTROL_H #define _FPU_CONTROL_H -/* FP control/status register bit assignments. +/* MIPS FPU floating point control register bits. * - * 31-25 24 23 22-18 17-12 11-7 6-2 1-0 - * (cause) (enables) (flags) - * | reserved | FS | C | reserved | E V Z O U I | V Z O U I | V Z O U I | RM + * 31-25 -> floating point conditions code bits 7-1. These bits are only + * available in MIPS IV. + * 24 -> flush denormalized results to zero instead of + * causing unimplemented operation exception. This bit is only + * available for MIPS III and newer. + * 23 -> Condition bit + * 22-18 -> reserved (read as 0, write with 0) + * 17 -> cause bit for unimplemented operation + * 16 -> cause bit for invalid exception + * 15 -> cause bit for division by zero exception + * 14 -> cause bit for overflow exception + * 13 -> cause bit for underflow exception + * 12 -> cause bit for inexact exception + * 11 -> enable exception for invalid exception + * 10 -> enable exception for division by zero exception + * 9 -> enable exception for overflow exception + * 8 -> enable exception for underflow exception + * 7 -> enable exception for inexact exception + * 6 -> flag invalid exception + * 5 -> flag division by zero exception + * 4 -> flag overflow exception + * 3 -> flag underflow exception + * 2 -> flag inexact exception + * 1-0 -> rounding control * - * FS: When set, denormalized results are flushed to zero instead of - * causing an unimplemented operation exception. - * C: Condition bit. - * E: Unimplemented Operation. - * V: Invalid Operation. - * Z: Division by zero. - * O: Overflow. - * U: Underflow. - * I: Inexact Operation - * RM: Rounding mode bits - * 00 (RN) - rounding to nearest - * 01 (RZ) - rounding toward zero - * 10 (RP) - rounding down (toward - infinity) - * 11 (RM) - rounding up (toward + infinity) * + * Rounding Control: + * 00 - rounding to nearest (RN) + * 01 - rounding toward zero (RZ) + * 01 - rounding (up) toward plus infinity (RP) + * 11 - rounding (down)toward minus infinity (RM) */ #include /* masking of interrupts */ -#define _FPU_MASK_IM (1 << 11) -#define _FPU_MASK_DM (1 << 24) /* XXX */ -#define _FPU_MASK_ZM (1 << 10) -#define _FPU_MASK_OM (1 << 9) -#define _FPU_MASK_UM (1 << 8) -#define _FPU_MASK_PM (1 << 7) - -/* precision control */ -#define _FPU_EXTENDED 0 -#define _FPU_DOUBLE 0 -#define _FPU_SINGLE 0 +#define _FPU_MASK_V 0x0800 /* Invalid operation */ +#define _FPU_MASK_Z 0x0400 /* Division by zero */ +#define _FPU_MASK_O 0x0200 /* Overflow */ +#define _FPU_MASK_U 0x0100 /* Underflow */ +#define _FPU_MASK_I 0x0080 /* Inexact operation */ + +/* flush denormalized numbers to zero */ +#define _FPU_FLUSH_TZ 0x1000000 /* rounding control */ -#define _FPU_RC_NEAREST 0x0 /* RECOMMENDED */ -#define _FPU_RC_DOWN 0x2 -#define _FPU_RC_UP 0x3 +#define _FPU_RC_NEAREST 0x0 /* RECOMMENDED */ #define _FPU_RC_ZERO 0x1 +#define _FPU_RC_UP 0x2 +#define _FPU_RC_DOWN 0x3 -#define _FPU_RESERVED 0xfe7c0000 /* Reserved bits */ +#define _FPU_RESERVED 0xfe3c0000 /* Reserved bits in cw */ /* The fdlibm code requires strict IEEE double precision arithmetic, and no interrupts for exceptions, rounding to nearest. */ -#define _FPU_DEFAULT 0x0 +#define _FPU_DEFAULT 0x00000600 /* IEEE: same as above, but exceptions */ -#define _FPU_IEEE (0x1f << 7) +#define _FPU_IEEE 0x00000F80 /* Type of the control word. */ -typedef unsigned int fpu_control_t; +typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__HI__))); /* Macros for accessing the hardware control word. */ -#define _FPU_GETCW(cw) __asm__ ("cfc1 %0, $31; nop; nop" : "=r" (cw)) -#define _FPU_SETCW(cw) __asm__ ("ctc1 %0, $31; nop; nop" : : "r" (cw)) +#define _FPU_GETCW(cw) __asm__ ("cfc1 %0,$31" : "=r" (cw) : ) +#define _FPU_SETCW(cw) __asm__ ("ctc1 %0,$31" : : "r" (cw)) /* Default control word set at startup. */ extern fpu_control_t __fpu_control; __BEGIN_DECLS -/* Called at startup. It can be used to manipulate fpu control register. */ +/* Called at startup. It can be used to manipulate the fpu control + register. */ extern void __setfpucw __P ((fpu_control_t)); __END_DECLS From f095c0f3bb53285091fd6d6f1dad4659c24fbfb0 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 12 Jul 1997 23:23:14 +0000 Subject: [PATCH 1005/4487] Linker script for building glibc itself. --- sysdeps/mips/rtld-ldscript.in | 106 ++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 sysdeps/mips/rtld-ldscript.in diff --git a/sysdeps/mips/rtld-ldscript.in b/sysdeps/mips/rtld-ldscript.in new file mode 100644 index 0000000000..7c9f65f3e7 --- /dev/null +++ b/sysdeps/mips/rtld-ldscript.in @@ -0,0 +1,106 @@ +OUTPUT_FORMAT("@@rtld-oformat@@") +OUTPUT_ARCH(@@rtld-arch@@) +ENTRY(@@rtld-entry@@) +SECTIONS +{ + /* Read-only sections, merged into text segment: */ + . = @@rtld-base@@; + .reginfo : { *(.reginfo) } + .dynamic : { *(.dynamic) } + .dynstr : { *(.dynstr) } + .dynsym : { *(.dynsym) } + .hash : { *(.hash) } + .rel.text : { *(.rel.text) } + .rela.text : { *(.rela.text) } + .rel.data : { *(.rel.data) } + .rela.data : { *(.rela.data) } + .rel.rodata : { *(.rel.rodata) } + .rela.rodata : { *(.rela.rodata) } + .rel.got : { *(.rel.got) } + .rela.got : { *(.rela.got) } + .rel.ctors : { *(.rel.ctors) } + .rela.ctors : { *(.rela.ctors) } + .rel.dtors : { *(.rel.dtors) } + .rela.dtors : { *(.rela.dtors) } + .rel.init : { *(.rel.init) } + .rela.init : { *(.rela.init) } + .rel.fini : { *(.rel.fini) } + .rela.fini : { *(.rela.fini) } + .rel.bss : { *(.rel.bss) } + .rela.bss : { *(.rela.bss) } + .rel.plt : { *(.rel.plt) } + .rela.plt : { *(.rela.plt) } + .rodata : { *(.rodata) } + .rodata1 : { *(.rodata1) } + .init : { *(.init) } =0 + .text : + { + *(.text) + *(.stub) + /* .gnu.warning sections are handled specially by elf32.em. */ + *(.gnu.warning) + } =0 + .fini : { *(.fini) } =0 + /* Adjust the address for the data segment. We want to adjust up to + the same address within the page on the next page up. It would + be more correct to do this: + . = 0x10000000; + The current expression does not correctly handle the case of a + text segment ending precisely at the end of a page; it causes the + data segment to skip a page. The above expression does not have + this problem, but it will currently (2/95) cause BFD to allocate + a single segment, combining both text and data, for this case. + This will prevent the text segment from being shared among + multiple executions of the program; I think that is more + important than losing a page of the virtual address space (note + that no actual memory is lost; the page which is skipped can not + be referenced). */ + . += 0x10000; + .data : + { + *(.data) + CONSTRUCTORS + } + .data1 : { *(.data1) } + .ctors : { *(.ctors) } + .dtors : { *(.dtors) } + _gp = ALIGN(16) + 0x7ff0; + .got : + { + *(.got.plt) *(.got) + } + /* We want the small data sections together, so single-instruction offsets + can access them all, and initialized data all before uninitialized, so + we can shorten the on-disk segment size. */ + .sdata : { *(.sdata) } + .lit8 : { *(.lit8) } + .lit4 : { *(.lit4) } + .sbss : { *(.sbss) *(.scommon) } + .bss : + { + *(.dynbss) + *(.bss) + *(COMMON) + } + /* The normal linker scripts created by the binutils doesn't have the + symbols end and _end which breaks ld.so's dl-minimal.c. */ + _end = . ; + PROVIDE (end = .); + /* These are needed for ELF backends which have not yet been + converted to the new style linker. */ + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + /* DWARF debug sections. + Symbols in the .debug DWARF section are relative to the beginning of the + section so we begin .debug at 0. It's not clear yet what needs to happen + for the others. */ + .debug 0 : { *(.debug) } + .debug_srcinfo 0 : { *(.debug_srcinfo) } + .debug_aranges 0 : { *(.debug_aranges) } + .debug_pubnames 0 : { *(.debug_pubnames) } + .debug_sfnames 0 : { *(.debug_sfnames) } + .line 0 : { *(.line) } + /* These must appear regardless of . */ + .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) } + .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) } +} From 8c0c6f59b4ed8434d7c31bbaadaec077cc1703fe Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 12 Jul 1997 23:25:19 +0000 Subject: [PATCH 1006/4487] MIPS specific DL interface bits. --- sysdeps/mips/bits/dlfcn.h | 42 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 sysdeps/mips/bits/dlfcn.h diff --git a/sysdeps/mips/bits/dlfcn.h b/sysdeps/mips/bits/dlfcn.h new file mode 100644 index 0000000000..636da5662d --- /dev/null +++ b/sysdeps/mips/bits/dlfcn.h @@ -0,0 +1,42 @@ +/* System dependand definitions for run-time dynamic loading. + Copyright (C) 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _BITS_DLFCN_H +#define _BITS_DLFCN_H 1 + +/* The MODE argument to `dlopen' contains one of the following: */ +#define RTLD_LAZY 0x001 /* Lazy function call binding. */ +#define RTLD_NOW 0x002 /* Immediate function call binding. */ +#define RTLD_BINDING_MASK 0x3 /* Mask of binding time value. */ + +/* If the following bit is set in the MODE argument to `dlopen', + the symbols of the loaded object and its dependencies are made + visible as if the object were linked directly into the program. */ +#define RTLD_GLOBAL 0x004 + +__BEGIN_DECLS + +/* Some SGI specific calls that aren't implemented yet. */ +extern void *sgidladd __P ((const char *, int)); +extern void *sgidlopen_version __P ((const char *, int, const char *, int)); +extern char *sgigetdsoversion __P ((const char *)); + +__END_DECLS + +#endif /* bits/dlfcn.h */ From 6a2c06dc40a6844641a23373d3005a46b0fa1a97 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 12 Jul 1997 23:26:15 +0000 Subject: [PATCH 1007/4487] Special control bits for RTLD. --- sysdeps/mips/mips64/rtld-parms | 3 +++ sysdeps/mips/mipsel/rtld-parms | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 sysdeps/mips/mips64/rtld-parms create mode 100644 sysdeps/mips/mipsel/rtld-parms diff --git a/sysdeps/mips/mips64/rtld-parms b/sysdeps/mips/mips64/rtld-parms new file mode 100644 index 0000000000..77dfc39ef4 --- /dev/null +++ b/sysdeps/mips/mips64/rtld-parms @@ -0,0 +1,3 @@ +ifndef rtld-wordsize +rtld-wordsize = 64 +endif diff --git a/sysdeps/mips/mipsel/rtld-parms b/sysdeps/mips/mipsel/rtld-parms new file mode 100644 index 0000000000..07fac51647 --- /dev/null +++ b/sysdeps/mips/mipsel/rtld-parms @@ -0,0 +1,3 @@ +ifndef rtld-oformat +rtld-oformat = elf32-littlemips +endif From 5a50d6f575cb6db690b8455adfd85d4a5a90d09c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 12 Jul 1997 23:28:11 +0000 Subject: [PATCH 1008/4487] Fix PIC case. --- sysdeps/mips/bsd-_setjmp.S | 13 ++++++--- sysdeps/mips/bsd-setjmp.S | 13 ++++++--- sysdeps/mips/elf/start.S | 55 ++++++++++++-------------------------- sysdeps/mips/setjmp.S | 22 ++++++++++----- sysdeps/unix/mips/brk.S | 44 ++++++++---------------------- sysdeps/unix/mips/sysdep.S | 25 ++++++++++++++--- sysdeps/unix/mips/sysdep.h | 26 ++++++++++++++++-- sysdeps/unix/mips/wait.S | 6 ++--- 8 files changed, 110 insertions(+), 94 deletions(-) diff --git a/sysdeps/mips/bsd-_setjmp.S b/sysdeps/mips/bsd-_setjmp.S index f519f19359..819a7018c4 100644 --- a/sysdeps/mips/bsd-_setjmp.S +++ b/sysdeps/mips/bsd-_setjmp.S @@ -23,14 +23,19 @@ #include +/* XXX Must this be __PIC__ ? --drepper */ #ifdef PIC .option pic2 #endif ENTRY (_setjmp) + .set noreorder #ifdef PIC .cpload t9 + la t9, C_SYMBOL_NAME (__sigsetjmp) + jr t9 +#else + j C_SYMBOL_NAME (__sigsetjmp) #endif - la t9, C_SYMBOL_NAME (__sigsetjmp) - nop - jr t9 - li a1, 0 /* Pass a second argument of zero. */ + move a1,zero /* Pass a second argument of zero. */ + .set reorder + .end _setjmp diff --git a/sysdeps/mips/bsd-setjmp.S b/sysdeps/mips/bsd-setjmp.S index 9a22700718..f220404c2c 100644 --- a/sysdeps/mips/bsd-setjmp.S +++ b/sysdeps/mips/bsd-setjmp.S @@ -23,14 +23,19 @@ #include +/* XXX Must this be __PIC__ ? --drepper */ #ifdef PIC .option pic2 #endif ENTRY (setjmp) + .set noreorder #ifdef PIC .cpload t9 + la t9, C_SYMBOL_NAME (__sigsetjmp) + jr t9 +#else + j C_SYMBOL_NAME (__sigsetjmp) #endif - la t9, C_SYMBOL_NAME (__sigsetjmp) - nop - jr t9 - li a1, 1 /* Pass a second argument of one. */ + li a1, 1 /* Pass a second argument of one. */ + .set reorder + .end setjmp diff --git a/sysdeps/mips/elf/start.S b/sysdeps/mips/elf/start.S index 355a4a905c..ce9ad9c7ec 100644 --- a/sysdeps/mips/elf/start.S +++ b/sysdeps/mips/elf/start.S @@ -17,6 +17,12 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include + +#ifndef ENTRY_POINT +#error ENTRY_POINT needs to be defined for start.S on MIPS/ELF. +#endif + /* This is the canonical entry point, usually the first thing in the text segment. The SVR4/Mips ABI (pages 3-31, 3-32) says that when the entry point runs, most registers' values are unspecified, except for: @@ -53,8 +59,8 @@ #endif .text - .globl _start -_start: + .globl ENTRY_POINT +ENTRY_POINT: #ifdef PIC SET_GP #endif @@ -81,20 +87,9 @@ nofini: the prologue of __libc_init_first, we preload them to prevent clobbering the stack tops. In Hurd case, stack pointer ($29) may be VM_MAX_ADDRESS here. If so, we must modify it. */ -#if (__mips64) - dli $4, 0x10000000000 - bne $29, $4, 1f - dsubu $29, 32 - sd $0, 0($29) - sd $0, 8($29) - sd $0, 16($29) - sd $0, 24($29) -1: - ld $4, 0($29) - ld $5, 8($29) - ld $6, 16($29) - ld $7, 24($29) -#else /* __mips64 */ +#if 0 + jal mach_host_self +#endif li $4, 0x80000000 bne $29, $4, 1f subu $29, 16 @@ -107,23 +102,14 @@ nofini: lw $5, 4($29) lw $6, 8($29) lw $7, 12($29) -#endif /* __mips64 */ - jal __libc_init_first #ifdef PIC SET_GP #endif -#if (__mips64) - ld $4, 0($29) - ld $5, 8($29) - ld $6, 16($29) - ld $7, 24($29) -#else /* __mips64 */ lw $4, 0($29) lw $5, 4($29) lw $6, 8($29) lw $7, 12($29) -#endif /* __mips64 */ /* Call `_init', which is the entry point to our own `.init' section; and register with `atexit' to have `exit' call @@ -145,19 +131,11 @@ nofini: /* Extract the arguments and environment as encoded on the stack and set up the arguments for `main': argc, argv, envp. */ -#if (__mips64) - ld $4, 0($29) /* argc */ - daddu $5, $29, 8 /* argv */ - dsll $6, $4, 3 - daddu $6, $6, 8 - daddu $6, $5, $6 /* envp = &argv[argc + 1] */ -#else /* __mips64 */ lw $4, 0($29) /* argc */ addu $5, $29, 4 /* argv */ sll $6, $4, 2 addu $6, $6, 4 addu $6, $5, $6 /* envp = &argv[argc + 1] */ -#endif /* __mips64 */ /* Call the user's main function, and exit with its value. */ jal main @@ -172,10 +150,11 @@ hlt: b hlt /* Crash if somehow it does return. */ .data .globl __data_start __data_start: -#if (__mips64) - .dword 0 -#else /* __mips64 */ - .word 0 -#endif /* __mips64 */ + .long 0 .weak data_start data_start = __data_start + + .comm errno, 4, 4 +#ifdef __ELF__ + .type errno, @object +#endif diff --git a/sysdeps/mips/setjmp.S b/sysdeps/mips/setjmp.S index bc42dcb03b..607b5f268d 100644 --- a/sysdeps/mips/setjmp.S +++ b/sysdeps/mips/setjmp.S @@ -26,10 +26,20 @@ #endif ENTRY (__sigsetjmp) #ifdef PIC - .cpload t9 + .set noreorder + .cpload t9 + .set reorder #endif - move a2, sp - move a3, fp - la t9, __sigsetjmp_aux - nop - jr t9 + move a2, sp +#ifdef fp + move a3, fp +#else + move a3, $fp +#endif +#ifdef PIC + la t9, __sigsetjmp_aux + jr t9 +#else + j __sigsetjmp_aux +#endif + .end __sigsetjmp diff --git a/sysdeps/unix/mips/brk.S b/sysdeps/unix/mips/brk.S index 197672669b..e38f735b92 100644 --- a/sysdeps/unix/mips/brk.S +++ b/sysdeps/unix/mips/brk.S @@ -24,46 +24,24 @@ #endif #ifndef HAVE_GNU_LD -#define __end end +#define _end end #endif -.data -.sdata + .data ENTRY(__curbrk) - .word __end + .word 0 .end __curbrk -.text -.set noreorder -.set noat -ENTRY(__brk) - /* Minimum is one page. */ - lui v0, 4096 - lw v0, __end - nop - - /* If they ask for less than a page, givvem the whole - thing anyway. */ - sltu AT, a0, v0 - beq AT, zero, down1 - nop - move a0, v0 -down1: - li v0, SYS_brk - syscall - bne a3, zero, error - - /* Update __curbrk and exit cleanly. */ - lui AT, 4096 + .text +SYSCALL__(brk, 1) + .set reorder + /* Handle the query case. */ + bnez a0, 1f + move a0,v0 +1: /* Update __curbrk and exit cleanly. */ sw a0, __curbrk - j ra move v0, zero - - /* What a horrible way to die. */ -error: j syscall_error - nop - nop - nop + jr ra .end __brk weak_alias (__brk, brk) diff --git a/sysdeps/unix/mips/sysdep.S b/sysdeps/unix/mips/sysdep.S index 0cfc302770..ac8335fe5b 100644 --- a/sysdeps/unix/mips/sysdep.S +++ b/sysdeps/unix/mips/sysdep.S @@ -21,10 +21,23 @@ #define _ERRNO_H #include -/* .globl errno */ -.set noreorder + .comm errno, 4 +#ifdef __ELF__ + .type errno, @object +#endif + + .set noreorder -ENTRY(syscall_error) +ENTRY(__syscall_error) +#ifdef __PIC__ + .set noat + move $1, $31 + bltzal $0, 0f + nop +0: .cpload $31 + move $31, $1 + .set at +#endif #if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN /* We translate the system's EWOULDBLOCK error into EAGAIN. The GNU C library always defines EWOULDBLOCK==EAGAIN. @@ -40,4 +53,8 @@ skip: /* And just kick back a -1. */ j ra li v0, -1 - .end syscall_error + END(__syscall_error) + +/* We provide this alias for compatilility with other Unices + like IRIX 5 */ +weak_alias (__syscall_error, syscall_error) diff --git a/sysdeps/unix/mips/sysdep.h b/sysdeps/unix/mips/sysdep.h index 2f148d0938..cbafbdcd9a 100644 --- a/sysdeps/unix/mips/sysdep.h +++ b/sysdeps/unix/mips/sysdep.h @@ -32,19 +32,41 @@ /* Note that while it's better structurally, going back to call syscall_error can make things confusing if you're debugging---it looks like it's jumping backwards into the previous fn. */ +#ifdef __PIC__ + #define PSEUDO(name, syscall_name, args) \ + .align 2; \ + 99: la t9,syscall_error; \ + jr t9; \ + ENTRY(name) \ + .set noreorder; \ + .cpload t9; \ + li v0, SYS_##syscall_name; \ + syscall; \ + .set reorder; \ + bne a3, zero, 99b; \ +syse1: +#else #define PSEUDO(name, syscall_name, args) \ .set noreorder; \ .align 2; \ 99: j syscall_error; \ - nop; \ ENTRY(name) \ + .set noreorder; \ li v0, SYS_##syscall_name; \ syscall; \ + .set reorder; \ bne a3, zero, 99b; \ - nop; \ syse1: +#endif + +#undef PSEUDO_END +#define PSEUDO_END(sym) .end sym #define ret j ra ; nop + +#undef END +#define END(sym) .end sym + #define r0 v0 #define r1 v1 /* The mips move insn is d,s. */ diff --git a/sysdeps/unix/mips/wait.S b/sysdeps/unix/mips/wait.S index a544156c4e..9ea55bc7d0 100644 --- a/sysdeps/unix/mips/wait.S +++ b/sysdeps/unix/mips/wait.S @@ -28,14 +28,14 @@ ENTRY(__wait) li v0, SYS_wait syscall - beq a3, zero, noerror + beqz a3, noerror nop - j syscall_error + j __syscall_error nop noerror: /* If the arg is not NULL, store v1 there. */ - beq a0, zero, noarg + beqz a0, noarg nop sw v1, 0(a0) nop From eec226c3baffaf0d628374a8de6385116e4da261 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 12 Jul 1997 23:32:57 +0000 Subject: [PATCH 1009/4487] New for Linux/MIPS port. --- sysdeps/unix/sysv/linux/mips/Dist | 3 + sysdeps/unix/sysv/linux/mips/Makefile | 10 + sysdeps/unix/sysv/linux/mips/bits/endian.h | 12 + sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 100 ++ .../unix/sysv/linux/mips/bits/ioctl-types.h | 71 + sysdeps/unix/sysv/linux/mips/bits/ipc.h | 85 ++ sysdeps/unix/sysv/linux/mips/bits/shm.h | 92 ++ sysdeps/unix/sysv/linux/mips/bits/sigaction.h | 62 + sysdeps/unix/sysv/linux/mips/bits/signum.h | 30 + sysdeps/unix/sysv/linux/mips/bits/socket.h | 178 +++ sysdeps/unix/sysv/linux/mips/bits/stat.h | 97 ++ sysdeps/unix/sysv/linux/mips/bits/statfs.h | 44 + sysdeps/unix/sysv/linux/mips/bits/termios.h | 260 ++++ sysdeps/unix/sysv/linux/mips/bits/time.h | 54 + sysdeps/unix/sysv/linux/mips/clone.S | 125 ++ sysdeps/unix/sysv/linux/mips/entry.h | 1 + sysdeps/unix/sysv/linux/mips/fpregdef.h | 1 + sysdeps/unix/sysv/linux/mips/fxstat.c | 80 ++ .../unix/sysv/linux/mips/kernel_sigaction.h | 22 + sysdeps/unix/sysv/linux/mips/kernel_stat.h | 28 + sysdeps/unix/sysv/linux/mips/kernel_termios.h | 20 + sysdeps/unix/sysv/linux/mips/lxstat.h | 80 ++ sysdeps/unix/sysv/linux/mips/regdef.h | 1 + sysdeps/unix/sysv/linux/mips/sgidef.h | 28 + sysdeps/unix/sysv/linux/mips/sys/acct.h | 66 + sysdeps/unix/sysv/linux/mips/sys/asm.h | 28 + sysdeps/unix/sysv/linux/mips/sys/cachectl.h | 42 + sysdeps/unix/sysv/linux/mips/sys/fpregdef.h | 27 + sysdeps/unix/sysv/linux/mips/sys/procfs.h | 109 ++ sysdeps/unix/sysv/linux/mips/sys/regdef.h | 29 + sysdeps/unix/sysv/linux/mips/sys/syscall.h | 1187 +++++++++++++++++ sysdeps/unix/sysv/linux/mips/sys/sysmips.h | 36 + sysdeps/unix/sysv/linux/mips/syscalls.list | 46 + sysdeps/unix/sysv/linux/mips/ustat.c | 35 + sysdeps/unix/sysv/linux/mips/xmknod.c | 47 + sysdeps/unix/sysv/linux/mips/xstat.c | 80 ++ 36 files changed, 3216 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/mips/Dist create mode 100644 sysdeps/unix/sysv/linux/mips/Makefile create mode 100644 sysdeps/unix/sysv/linux/mips/bits/endian.h create mode 100644 sysdeps/unix/sysv/linux/mips/bits/fcntl.h create mode 100644 sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h create mode 100644 sysdeps/unix/sysv/linux/mips/bits/ipc.h create mode 100644 sysdeps/unix/sysv/linux/mips/bits/shm.h create mode 100644 sysdeps/unix/sysv/linux/mips/bits/sigaction.h create mode 100644 sysdeps/unix/sysv/linux/mips/bits/signum.h create mode 100644 sysdeps/unix/sysv/linux/mips/bits/socket.h create mode 100644 sysdeps/unix/sysv/linux/mips/bits/stat.h create mode 100644 sysdeps/unix/sysv/linux/mips/bits/statfs.h create mode 100644 sysdeps/unix/sysv/linux/mips/bits/termios.h create mode 100644 sysdeps/unix/sysv/linux/mips/bits/time.h create mode 100644 sysdeps/unix/sysv/linux/mips/clone.S create mode 100644 sysdeps/unix/sysv/linux/mips/entry.h create mode 100644 sysdeps/unix/sysv/linux/mips/fpregdef.h create mode 100644 sysdeps/unix/sysv/linux/mips/fxstat.c create mode 100644 sysdeps/unix/sysv/linux/mips/kernel_sigaction.h create mode 100644 sysdeps/unix/sysv/linux/mips/kernel_stat.h create mode 100644 sysdeps/unix/sysv/linux/mips/kernel_termios.h create mode 100644 sysdeps/unix/sysv/linux/mips/lxstat.h create mode 100644 sysdeps/unix/sysv/linux/mips/regdef.h create mode 100644 sysdeps/unix/sysv/linux/mips/sgidef.h create mode 100644 sysdeps/unix/sysv/linux/mips/sys/acct.h create mode 100644 sysdeps/unix/sysv/linux/mips/sys/asm.h create mode 100644 sysdeps/unix/sysv/linux/mips/sys/cachectl.h create mode 100644 sysdeps/unix/sysv/linux/mips/sys/fpregdef.h create mode 100644 sysdeps/unix/sysv/linux/mips/sys/procfs.h create mode 100644 sysdeps/unix/sysv/linux/mips/sys/regdef.h create mode 100644 sysdeps/unix/sysv/linux/mips/sys/syscall.h create mode 100644 sysdeps/unix/sysv/linux/mips/sys/sysmips.h create mode 100644 sysdeps/unix/sysv/linux/mips/syscalls.list create mode 100644 sysdeps/unix/sysv/linux/mips/ustat.c create mode 100644 sysdeps/unix/sysv/linux/mips/xmknod.c create mode 100644 sysdeps/unix/sysv/linux/mips/xstat.c diff --git a/sysdeps/unix/sysv/linux/mips/Dist b/sysdeps/unix/sysv/linux/mips/Dist new file mode 100644 index 0000000000..a205c94f95 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/Dist @@ -0,0 +1,3 @@ +clone.S +kernel_sigaction.h +kernel_stat.h diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile new file mode 100644 index 0000000000..e6240ea9a4 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/Makefile @@ -0,0 +1,10 @@ +ifeq ($(subdir),signal) +#sysdep_routines += sigsuspend +endif + +ifeq ($(subdir),misc) +sysdep_routines += cachectl cacheflush sysmips + +headers += regdef.h fpregdef.h sys/asm.h sys/cachectl.h sys/fpregdef.h \ + sys/regdef.h sys/sysmips.h +endif diff --git a/sysdeps/unix/sysv/linux/mips/bits/endian.h b/sysdeps/unix/sysv/linux/mips/bits/endian.h new file mode 100644 index 0000000000..9f60758f36 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/bits/endian.h @@ -0,0 +1,12 @@ +/* The MIPS architecture has selectable endianness. + Linux/MIPS exists in two both little and big endian flavours and we + want to be able to share the installed headerfiles between both, + so we define __BYTE_ORDER based on GCC's predefines. */ + +#ifdef __MIPSEB__ +#define __BYTE_ORDER __BIG_ENDIAN +#else +#ifdef __MIPSEL__ +#define __BYTE_ORDER __LITTLE_ENDIAN +#endif +#endif diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h new file mode 100644 index 0000000000..2586140fdc --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -0,0 +1,100 @@ +/* O_*, F_*, FD_* bit values for Linux. + Copyright (C) 1995, 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _FCNTL_H +#error "Never use directly; include instead." +#endif + +#include + + +/* In GNU, read and write are bits (unlike BSD). */ +#ifdef __USE_GNU +#define O_READ O_RDONLY /* Open for reading. */ +#define O_WRITE O_WRONLY /* Open for writing. */ +#endif +/* open/fcntl - O_SYNC is only implemented on blocks devices and on files + located on an ext2 file system */ +#define O_ACCMODE 0x0003 +#define O_RDONLY 0x0000 +#define O_WRONLY 0x0001 +#define O_RDWR 0x0002 +#define O_APPEND 0x0008 +#define O_SYNC 0x0010 +#define O_NONBLOCK 0x0080 +#define O_CREAT 0x0100 /* not fcntl */ +#define O_TRUNC 0x0200 /* not fcntl */ +#define O_EXCL 0x0400 /* not fcntl */ +#define O_NOCTTY 0x0800 /* not fcntl */ +#define O_FSYNC O_SYNC +#define O_ASYNC 020000 + +#define O_NDELAY O_NONBLOCK + +#define F_DUPFD 0 /* dup */ +#define F_GETFD 1 /* get f_flags */ +#define F_SETFD 2 /* set f_flags */ +#define F_GETFL 3 /* more flags (cloexec) */ +#define F_SETFL 4 +#define F_GETLK 14 +#define F_SETLK 6 +#define F_SETLKW 7 + +#define F_SETOWN 24 /* for sockets. */ +#define F_GETOWN 23 /* for sockets. */ + +/* for F_[GET|SET]FL */ +#define FD_CLOEXEC 1 /* actually anything with low bit set goes */ + +/* for posix fcntl() and lockf() */ +#define F_RDLCK 0 +#define F_WRLCK 1 +#define F_UNLCK 2 + +/* for old implementation of bsd flock () */ +#define F_EXLCK 4 /* or 3 */ +#define F_SHLCK 8 /* or 4 */ + +/* operations for bsd flock(), also used by the kernel implementation */ +#define LOCK_SH 1 /* shared lock */ +#define LOCK_EX 2 /* exclusive lock */ +#define LOCK_NB 4 /* or'd with one of the above to prevent XXXXXXXXXXXXXXXXXX + blocking */ +#define LOCK_UN 8 /* remove lock */ + +typedef struct flock { + short l_type; + short l_whence; + __off_t l_start; + __off_t l_len; + long l_sysid; /* XXX */ + __pid_t l_pid; + long pad[4]; /* XXX */ +} flock_t; + + +/* Define some more compatibility macros to be backward compatible with + BSD systems which did not managed to hide these kernel macros. */ +#ifdef __USE_BSD +#define FAPPEND O_APPEND +#define FFSYNC O_FSYNC +#define FASYNC O_ASYNC +#define FNONBLOCK O_NONBLOCK +#define FNDELAY O_NDELAY +#endif /* Use BSD. */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h b/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h new file mode 100644 index 0000000000..486022e6d9 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h @@ -0,0 +1,71 @@ +/* Structure types for pre-termios terminal ioctls. Linux/MIPS version. + Copyright (C) 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* + * Never include this file directly; use instead. + */ + +#ifndef _BITS_IOCTL_TYPES_H +#define _BITS_IOCTL_TYPES_H 1 + +/* Get definition of constants for use with `ioctl'. */ +#include + +struct winsize + { + unsigned short ws_row; + unsigned short ws_col; + unsigned short ws_xpixel; + unsigned short ws_ypixel; + }; + +#define NCC 8 +struct termio + { + unsigned short c_iflag; /* input mode flags */ + unsigned short c_oflag; /* output mode flags */ + unsigned short c_cflag; /* control mode flags */ + unsigned short c_lflag; /* local mode flags */ + char c_line; /* line discipline */ + /* Yes, this is really NCCS. */ + unsigned char c_cc[32 /* NCCS */]; /* control characters */ + }; + +/* modem lines */ +#define TIOCM_LE 0x001 /* line enable */ +#define TIOCM_DTR 0x002 /* data terminal ready */ +#define TIOCM_RTS 0x004 /* request to send */ +#define TIOCM_ST 0x010 /* secondary transmit */ +#define TIOCM_SR 0x020 /* secondary receive */ +#define TIOCM_CTS 0x040 /* clear to send */ +#define TIOCM_CAR 0x100 /* carrier detect */ +#define TIOCM_CD TIOCM_CAR +#define TIOCM_RNG 0x200 /* ring */ +#define TIOCM_RI TIOCM_RNG +#define TIOCM_DSR 0x400 /* data set ready */ + +/* line disciplines */ +#define N_TTY 0 +#define N_SLIP 1 +#define N_MOUSE 2 +#define N_PPP 3 +#define N_STRIP 4 +#define N_AX25 5 + +#endif /* bits/ioctl-types.h */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/ipc.h b/sysdeps/unix/sysv/linux/mips/bits/ipc.h new file mode 100644 index 0000000000..c5a3cd0049 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/bits/ipc.h @@ -0,0 +1,85 @@ +/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , August 1995. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_IPC_BUF_H + +#define _SYS_IPC_BUF_H 1 +#include + +#include + +/* Mode bits for `msgget', `semget', and `shmget'. */ +#define IPC_CREAT 01000 /* Create key if key does not exist. */ +#define IPC_EXCL 02000 /* Fail if key exists. */ +#define IPC_NOWAIT 04000 /* Return error on wait. */ + +/* Control commands for `msgctl', `semctl', and `shmctl'. */ +#define IPC_RMID 0 /* Remove identifier. */ +#define IPC_SET 1 /* Set `ipc_perm' options. */ +#define IPC_STAT 2 /* Get `ipc_perm' options. */ +#define IPC_INFO 3 /* See ipcs. */ + + +__BEGIN_DECLS + +/* Special key values. */ +#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ + + +/* Data structure used to pass permission information to IPC operations. */ +struct ipc_perm + { + __key_t __key; /* Key. */ + long uid; /* Owner's user ID. */ + long gid; /* Owner's group ID. */ + long cuid; /* Creator's user ID. */ + long cgid; /* Creator's group ID. */ + unsigned long mode; /* Read/write permission. */ + unsigned short int __seq; /* Sequence number. */ + }; + + +/* Kludge to work around Linux' restriction of only up to five + arguments to a system call. */ +struct ipc_kludge + { + void *msgp; + long int msgtyp; + }; + +/* The actual system call: all functions are multiplexed by this. */ +extern int __ipc __P ((int __call, int __first, int __second, int __third, + void *__ptr)); + +/* The codes for the functions to use the multiplexer `__ipc'. */ +#define IPCOP_semop 1 +#define IPCOP_semget 2 +#define IPCOP_semctl 3 +#define IPCOP_msgsnd 11 +#define IPCOP_msgrcv 12 +#define IPCOP_msgget 13 +#define IPCOP_msgctl 14 +#define IPCOP_shmat 21 +#define IPCOP_shmdt 22 +#define IPCOP_shmget 23 +#define IPCOP_shmctl 24 + +__END_DECLS + +#endif /* bits/ipc_buf.h */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/shm.h b/sysdeps/unix/sysv/linux/mips/bits/shm.h new file mode 100644 index 0000000000..9d4b20bb53 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/bits/shm.h @@ -0,0 +1,92 @@ +/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , August 1995. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_SHM_BUF_H + +#define _SYS_SHM_BUF_H 1 +#include + +#include + +/* Permission flag for shmget. */ +#define SHM_R 0400 /* or S_IRUGO from */ +#define SHM_W 0200 /* or S_IWUGO from */ + +/* Flags for `shmat'. */ +#define SHM_RDONLY 010000 /* attach read-only else read-write */ +#define SHM_RND 020000 /* round attach address to SHMLBA */ +#define SHM_REMAP 040000 /* take-over region on attach */ + +/* Commands for `shmctl'. */ +#define SHM_LOCK 11 /* lock segment (root only) */ +#define SHM_UNLOCK 12 /* unlock segment (root only) */ + + +__BEGIN_DECLS + +/* Data structure describing a set of semaphores. */ +struct shmid_ds +{ + struct ipc_perm shm_perm; /* operation permission struct */ + int shm_segsz; /* size of segment in bytes */ + __time_t shm_atime; /* time of last shmat() */ + __time_t shm_dtime; /* time of last shmdt() */ + __time_t shm_ctime; /* time of last change by shmctl() */ + long shm_cpid; /* pid of creator */ + long shm_lpid; /* pid of last shmop */ + unsigned short int shm_nattch; /* number of current attaches */ + unsigned short int __shm_npages; /* size of segment (pages) */ + unsigned long int *__shm_pages; /* array of ptrs to frames -> SHMMAX */ + struct vm_area_struct *__attaches; /* descriptors for attaches */ +}; + +#ifdef __USE_MISC + +/* ipcs ctl commands */ +#define SHM_STAT 13 +#define SHM_INFO 14 + +/* shm_mode upper byte flags */ +#define SHM_DEST 01000 /* segment will be destroyed on last detach */ +#define SHM_LOCKED 02000 /* segment will not be swapped */ + +struct shminfo +{ + int shmmax; + int shmmin; + int shmmni; + int shmseg; + int shmall; +}; + +struct shm_info +{ + int used_ids; + ulong shm_tot; /* total allocated shm */ + ulong shm_rss; /* total resident shm */ + ulong shm_swp; /* total swapped shm */ + ulong swap_attempts; + ulong swap_successes; +}; + +#endif /* __USE_MISC */ + +__END_DECLS + +#endif /* bits/shm_buf.h */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h new file mode 100644 index 0000000000..66c58cc540 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h @@ -0,0 +1,62 @@ +/* The proper definitions for Linux/MIPS's sigaction. + Copyright (C) 1993, 1994, 1995, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* Structure describing the action to be taken when a signal arrives. */ +struct sigaction + { + /* Special flags. */ + unsigned int sa_flags; + + /* Signal handler. */ + __sighandler_t sa_handler; + + /* Additional set of signals to be blocked. */ + __sigset_t sa_mask; + + /* The ABI says here are two unused ints following. */ + /* Restore handler. */ + void (*sa_restorer) __P ((void)); + +#if (_MIPS_ISA == _MIPS_ISA_MIPS1) || (_MIPS_ISA == _MIPS_ISA_MIPS2) + int sa_resv[1]; +#endif + }; + +/* Bits in `sa_flags'. */ +#define SA_NOCLDSTOP 1 /* Don't send SIGCHLD when children stop. */ +#ifdef __USE_MISC +#define SA_STACK 0x08000000 /* Use signal stack by using `sa_restorer'. */ +#define SA_RESTART 0x10000000 /* Don't restart syscall on signal return. */ +#define SA_INTERRUPT 0x20000000 /* Historical no-op. */ +#define SA_NODEFER 0x40000000 /* Don't automatically block the signal when + its handler is being executed. */ +#define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler. */ + +/* Some aliases for the SA_ constants. */ +#define SA_NOMASK SA_NODEFER +#define SA_ONESHOT SA_RESETHAND +#endif + +/* Values for the HOW argument to `sigprocmask'. */ +#define SIG_NOP 0 /* 0 is unused to catch errors */ +#define SIG_BLOCK 1 /* Block signals. */ +#define SIG_UNBLOCK 2 /* Unblock signals. */ +#define SIG_SETMASK 3 /* Set the set of blocked signals. */ +#define SIG_SETMASK32 256 /* Goodie from SGI for BSD compatibility: + set only the low 32 bit of the sigset. */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/signum.h b/sysdeps/unix/sysv/linux/mips/bits/signum.h new file mode 100644 index 0000000000..5254a2b420 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/bits/signum.h @@ -0,0 +1,30 @@ +/* Signal number definitions. Linux version. + Copyright (C) 1995, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifdef _SIGNAL_H + +/* Take these architecture specific stuff from the kernel header files. */ +#define __need_fake_sigfuns +#define __need_signums +#include + +#endif /* included. */ + +#define __need__nsig +#include diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h new file mode 100644 index 0000000000..15f420fc9c --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h @@ -0,0 +1,178 @@ +/* System-specific socket constants and types. Linux version. + Copyright (C) 1991, 92, 94, 95, 96, 97 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_SOCKET_H +#error "Never include directly; use instead." +#endif + + +#include + +#define __need_size_t +#define __need_NULL +#include + + +__BEGIN_DECLS + +/* Supported address families. */ +#define PF_UNSPEC 0 +#define PF_UNIX 1 /* Unix domain sockets */ +#define PF_LOCAL 1 /* POSIX name for AF_UNIX */ +#define PF_FILE PF_LOCAL /* POSIX name for PF_LOCAL. */ +#define PF_INET 2 /* Internet IP Protocol */ +#define PF_AX25 3 /* Amateur Radio AX.25 */ +#define PF_IPX 4 /* Novell IPX */ +#define PF_APPLETALK 5 /* Appletalk DDP */ +#define PF_NETROM 6 /* Amateur Radio NET/ROM */ +#define PF_BRIDGE 7 /* Multiprotocol bridge */ +#define PF_AAL5 8 /* Reserved for Werner's ATM */ +#define PF_X25 9 /* Reserved for X.25 project */ +#define PF_INET6 10 /* IP version 6 */ +#define PF_ROSE 11 /* Amateur Radio X.25 PLP */ +#define PF_DECNET 12 /* Reserved for DECnet project */ +#define PF_NETBEUI 13 /* Reserved for 802.2LLC project*/ +#define PF_MAX 32 /* For now.. */ + +/* Protocol families, same as address families. */ +#define AF_UNSPEC PF_UNSPEC +#define AF_UNIX PF_UNIX +#define AF_LOCAL PF_LOCAL +#define AF_FILE PF_FILE +#define AF_INET PF_INET +#define AF_AX25 PF_AX25 +#define AF_IPX PF_IPX +#define AF_APPLETALK PF_APPLETALK +#define AF_NETROM PF_NETROM +#define AF_BRIDGE PF_BRIDGE +#define AF_AAL5 PF_AAL5 +#define AF_X25 PF_X25 +#define AF_INET6 PF_INET6 +#define AF_ROSE PF_ROSE +#define AF_DECNET PF_DECNET +#define AF_NETBEUI PF_NETBEUI + +#define AF_MAX PF_MAX + +/* Raw IP packet level. */ +#define SOL_RAW 255 + +/* Maximum queue length specifiable by listen. */ +#define SOMAXCONN 128 + +/* Get the definition of the macro to define the common sockaddr members. */ +#include + +/* Structure describing a generic socket address. */ +struct sockaddr + { + __SOCKADDR_COMMON (sa_); /* Common data: address family and length. */ + char sa_data[14]; /* Address data. */ + }; + + +/* Bits in the FLAGS argument to `send', `recv', et al. */ +enum + { + MSG_OOB = 0x01, /* Process out-of-band data. */ + MSG_PEEK = 0x02, /* Peek at incoming messages. */ + MSG_DONTROUTE = 0x04, /* Don't use local routing. */ + MSG_CTRUNC = 0x08, /* Control data lost before delivery. */ + MSG_PROXY = 0x10 /* Supply or ask second address. */ + }; + + +/* Structure describing messages sent by + `sendmsg' and received by `recvmsg'. */ +struct msghdr + { + __ptr_t msg_name; /* Address to send to/receive from. */ + int msg_namelen; /* Length of address data. */ + /* XXX Should be type `size_t' according to POSIX.1g. */ + + struct iovec *msg_iov; /* Vector of data to send/receive into. */ + int msg_iovlen; /* Number of elements in the vector. */ + /* XXX Should be type `size_t' according to POSIX.1g. */ + + __ptr_t msg_control; /* Ancillary data (eg BSD filedesc passing). */ + int msg_controllen; /* Ancillary data buffer length. */ + /* XXX Should be type `size_t' according to POSIX.1g. */ + int msg_flags; /* Flags on received message. */ + }; + +/* Structure used for storage of ancillary data object information. */ +struct cmsghdr + { + int cmsg_len; /* Length of data in cmsg_data plus length + of cmsghdr structure. */ + /* XXX Should be type `size_t' according to POSIX.1g. */ + int cmsg_level; /* Originating protocol. */ + int cmsg_type; /* Protocol specific type. */ +#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2 + unsigned char __cmsg_data[0]; /* Ancillary data. */ +#endif + }; + +/* Ancillary data object manipulation macros. */ +#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2 +# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data) +#else +# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1)) +#endif +#define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg) +#define CMSG_FIRSTHDR(mhdr) \ + ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \ + ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL) + + +#ifndef _EXTERN_INLINE +# define _EXTERN_INLINE extern __inline +#endif +extern struct cmsghdr *__cmsg_nxthdr __P ((struct msghdr *__mhdr, + struct cmsghdr *__cmsg)); +_EXTERN_INLINE struct cmsghdr * +__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) +{ + unsigned char *__p; + + if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr)) + /* The kernel header does this so there may be a reason. */ + return NULL; + + __p = (((unsigned char *) __cmsg) + + ((__cmsg->cmsg_len + sizeof (long int) - 1) & ~sizeof (long int))); + if (__p >= (unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen) + /* No more entries. */ + return NULL; + return (struct cmsghdr *) __p; +} + + +/* Get socket manipulation related informations from kernel headers. */ +#include + + +/* Structure used to manipulate the SO_LINGER option. */ +struct linger + { + int l_onoff; /* Nonzero to linger on close. */ + int l_linger; /* Time to linger. */ + }; + +__END_DECLS diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h new file mode 100644 index 0000000000..a797b34c38 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/bits/stat.h @@ -0,0 +1,97 @@ +/* Copyright (C) 1992, 1995, 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* + * Never include this file directly; use instead. + */ + +#ifndef _BITS_STAT_H +#define _BITS_STAT_H 1 + +/* Versions of the `struct stat' data structure. */ +#define _STAT_VER_LINUX_OLD 1 +#define _STAT_VER_SVR4 2 +#define _STAT_VER_LINUX 3 +#define _STAT_VER _STAT_VER_LINUX /* The one defined below. */ + +/* Versions of the `xmknod' interface. */ +#define _MKNOD_VER_LINUX 1 +#define _MKNOD_VER_SVR4 2 +#define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */ + +/* Structure describing file characteristics. */ +struct stat + { + unsigned long int st_dev; + long int st_pad1[3]; + __ino_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.*/ + unsigned long int st_rdev; /* Device number, if device. */ + long int st_pad2[2]; + __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; + /* + * Actually this should be timestruc_t st_atime, st_mtime and + * st_ctime but we don't have it under Linux. + */ + __time_t st_atime; /* Time of last access. */ + long int __reserved0; + __time_t st_mtime; /* Time of last modification. */ + long int __reserved1; + __time_t st_ctime; /* Time of last status change. */ + long int __reserved2; + long int st_blksize; /* Optimal block size for I/O. */ +#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ + long int st_blocks; /* Number of 512-byte blocks allocated. */ + char st_fstype[16]; /* Filesystem type name */ + long int st_pad4[8]; + /* Linux specific fields */ + unsigned int st_flags; + unsigned int st_gen; + }; + + +/* Encoding of the file mode. */ + +#define __S_IFMT 0170000 /* These bits determine file type. */ + +/* File types. */ +#define __S_IFDIR 0040000 /* Directory. */ +#define __S_IFCHR 0020000 /* Character device. */ +#define __S_IFBLK 0060000 /* Block device. */ +#define __S_IFREG 0100000 /* Regular file. */ +#define __S_IFIFO 0010000 /* FIFO. */ + +/* These don't actually exist on System V, but having them doesn't hurt. */ +#define __S_IFLNK 0120000 /* Symbolic link. */ +#define __S_IFSOCK 0140000 /* Socket. */ + +/* Protection bits. */ + +#define __S_ISUID 04000 /* Set user ID on execution. */ +#define __S_ISGID 02000 /* Set group ID on execution. */ +#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ +#define __S_IREAD 0400 /* Read by owner. */ +#define __S_IWRITE 0200 /* Write by owner. */ +#define __S_IEXEC 0100 /* Execute by owner. */ + +#endif /* bits/stat.h */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/statfs.h b/sysdeps/unix/sysv/linux/mips/bits/statfs.h new file mode 100644 index 0000000000..3b2306147c --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/bits/statfs.h @@ -0,0 +1,44 @@ +/* Copyright (C) 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* + * Never include this file directly; use instead. + */ + +#ifndef _BITS_STATFS_H +#define _BITS_STATFS_H + +struct statfs + { + long int f_type; +#define f_fstyp f_type + long int f_bsize; + long int f_frsize; /* Fragment size - unsupported */ + long int f_blocks; + long int f_bfree; + long int f_files; + long int f_ffree; + + /* Linux specials */ + long int f_bavail; + __fsid_t f_fsid; + long int f_namelen; + long int f_spare[6]; + }; + +#endif /* bits/statfs.h */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/termios.h b/sysdeps/unix/sysv/linux/mips/bits/termios.h new file mode 100644 index 0000000000..c8a24694d9 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/bits/termios.h @@ -0,0 +1,260 @@ +/* termios type and macro definitions. Linux/MIPS version. + Copyright (C) 1993, 1994, 1995, 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* + * Never include this file directly; use instead. + */ + + +#ifndef _BITS_TERMIOS_H +#define _BITS_TERMIOS_H 1 + +typedef unsigned char cc_t; +typedef unsigned int speed_t; +typedef unsigned int tcflag_t; + + +#if defined __USE_BSD + +struct sgttyb + { + char sg_ispeed; + char sg_ospeed; + char sg_erase; + char sg_kill; + int sg_flags; /* SGI special - int, not short */ + }; + +struct tchars + { + char t_intrc; + char t_quitc; + char t_startc; + char t_stopc; + char t_eofc; + char t_brkc; + }; + +struct ltchars + { + char t_suspc; /* stop process signal */ + char t_dsuspc; /* delayed stop process signal */ + char t_rprntc; /* reprint line */ + char t_flushc; /* flush output (toggles) */ + char t_werasc; /* word erase */ + char t_lnextc; /* literal next character */ + }; + +#endif /* defined(__BSD) */ + +#define NCCS 32 +struct termios + { + tcflag_t c_iflag; /* input mode flags */ + tcflag_t c_oflag; /* output mode flags */ + tcflag_t c_cflag; /* control mode flags */ + tcflag_t c_lflag; /* local mode flags */ + cc_t c_line; /* line discipline */ + cc_t c_cc[NCCS]; /* control characters */ + speed_t c_ispeed; /* input speed */ + speed_t c_ospeed; /* output speed */ + }; + +/* c_cc characters */ +#define VINTR 0 /* Interrupt character [ISIG]. */ +#define VQUIT 1 /* Quit character [ISIG]. */ +#define VERASE 2 /* Erase character [ICANON]. */ +#define VKILL 3 /* Kill-line character [ICANON]. */ +#define VMIN 4 /* Minimum number of bytes read at once [!ICANON]. */ +#define VTIME 5 /* Time-out value (tenths of a second) [!ICANON]. */ +#if defined (__USE_BSD) +#define VEOL2 6 /* Second EOL character [ICANON]. */ +/* The next two are guesses ... */ +#define VSWTC 7 /* ??? */ +#endif +#define VSWTCH VSWTC +#define VSTART 8 /* Start (X-ON) character [IXON, IXOFF]. */ +#define VSTOP 9 /* Stop (X-OFF) character [IXON, IXOFF]. */ +#define VSUSP 10 /* Suspend character [ISIG]. */ +#if 0 +/* + * VDSUSP is not supported + */ +#if defined (__USE_BSD) +#define VDSUSP 11 /* Delayed suspend character [ISIG]. */ +#endif +#endif +#if defined (__USE_BSD) +#define VREPRINT 12 /* Reprint-line character [ICANON]. */ +#endif +#if defined (__USE_BSD) +#define VDISCARD 13 /* Discard character [IEXTEN]. */ +#define VWERASE 14 /* Word-erase character [ICANON]. */ +#define VLNEXT 15 /* Literal-next character [IEXTEN]. */ +#endif +#define VEOF 16 /* End-of-file character [ICANON]. */ +#define VEOL 17 /* End-of-line character [ICANON]. */ + +/* c_iflag bits */ +#define IGNBRK 0000001 /* Ignore break condition. */ +#define BRKINT 0000002 /* Signal interrupt on break. */ +#define IGNPAR 0000004 /* Ignore characters with parity errors. */ +#define PARMRK 0000010 /* Mark parity and framing errors. */ +#define INPCK 0000020 /* Enable input parity check. */ +#define ISTRIP 0000040 /* Strip 8th bit off characters. */ +#define INLCR 0000100 /* Map NL to CR on input. */ +#define IGNCR 0000200 /* Ignore CR. */ +#define ICRNL 0000400 /* Map CR to NL on input. */ +#if defined (__USE_BSD) +#define IUCLC 0001000 /* Map upper case to lower case on input. */ +#endif +#define IXON 0002000 /* Enable start/stop output control. */ +#if defined (__USE_BSD) +#define IXANY 0004000 /* Any character will restart after stop. */ +#endif +#define IXOFF 0010000 /* Enable start/stop input control. */ +#if defined (__USE_BSD) +#define IMAXBEL 0020000 /* Ring bell when input queue is full. */ +#endif + +/* c_oflag bits */ +#define OPOST 0000001 /* Perform output processing. */ +#if defined (__USE_BSD) +#define OLCUC 0000002 /* Map lower case to upper case on output. */ +#define ONLCR 0000004 /* Map NL to CR-NL on output. */ +#define OCRNL 0000010 +#define ONOCR 0000020 +#define ONLRET 0000040 +#define OFILL 0000100 +#define OFDEL 0000200 +#define NLDLY 0000400 +#define NL0 0000000 +#define NL1 0000400 +#define CRDLY 0003000 +#define CR0 0000000 +#define CR1 0001000 +#define CR2 0002000 +#define CR3 0003000 +#define TABDLY 0014000 +#define TAB0 0000000 +#define TAB1 0004000 +#define TAB2 0010000 +#define TAB3 0014000 +#define XTABS 0014000 +#define BSDLY 0020000 +#define BS0 0000000 +#define BS1 0020000 +#define VTDLY 0040000 +#define VT0 0000000 +#define VT1 0040000 +#define FFDLY 0100000 +#define FF0 0000000 +#define FF1 0100000 +/* +#define PAGEOUT ??? +#define WRAP ??? + */ +#endif + +/* c_cflag bit meaning */ +#define CBAUD 0010017 +#define B0 0000000 /* hang up */ +#define B50 0000001 +#define B75 0000002 +#define B110 0000003 +#define B134 0000004 +#define B150 0000005 +#define B200 0000006 +#define B300 0000007 +#define B600 0000010 +#define B1200 0000011 +#define B1800 0000012 +#define B2400 0000013 +#define B4800 0000014 +#define B9600 0000015 +#define B19200 0000016 +#define B38400 0000017 +#define EXTA B19200 +#define EXTB B38400 +#define CSIZE 0000060 /* Number of bits per byte (mask). */ +#define CS5 0000000 /* 5 bits per byte. */ +#define CS6 0000020 /* 6 bits per byte. */ +#define CS7 0000040 /* 7 bits per byte. */ +#define CS8 0000060 /* 8 bits per byte. */ +#define CSTOPB 0000100 /* Two stop bits instead of one. */ +#define CREAD 0000200 /* Enable receiver. */ +#define PARENB 0000400 /* Parity enable. */ +#define PARODD 0001000 /* Odd parity instead of even. */ +#define HUPCL 0002000 /* Hang up on last close. */ +#define CLOCAL 0004000 /* Ignore modem status lines. */ +#if defined (__USE_BSD) +#define CBAUDEX 0010000 +#define B57600 0010001 +#define B115200 0010002 +#define B230400 0010003 +#define B460800 0010004 +#define CIBAUD 002003600000 /* input baud rate (not used) */ +#define CRTSCTS 020000000000 /* flow control */ +#endif + +/* c_lflag bits */ +#define ISIG 0000001 /* Enable signals. */ +#define ICANON 0000002 /* Do erase and kill processing. */ +#define XCASE 0000004 +#define ECHO 0000010 /* Enable echo. */ +#define ECHOE 0000020 /* Visual erase for ERASE. */ +#define ECHOK 0000040 /* Echo NL after KILL. */ +#define ECHONL 0000100 /* Echo NL even if ECHO is off. */ +#define NOFLSH 0000200 /* Disable flush after interrupt. */ +#define IEXTEN 0000400 /* Enable DISCARD and LNEXT. */ +#if defined (__USE_BSD) +#define ECHOCTL 0001000 /* Echo control characters as ^X. */ +#define ECHOPRT 0002000 /* Hardcopy visual erase. */ +#define ECHOKE 0004000 /* Visual erase for KILL. */ +#endif +#define FLUSHO 0020000 +#if defined (__USE_BSD) +#define PENDIN 0040000 /* Retype pending input (state). */ +#endif +#define TOSTOP 0100000 /* Send SIGTTOU for background output. */ +#define ITOSTOP TOSTOP + +/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ +#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ + +/* tcflow() and TCXONC use these */ +#define TCOOFF 0 /* Suspend output. */ +#define TCOON 1 /* Restart suspended output. */ +#define TCIOFF 2 /* Send a STOP character. */ +#define TCION 3 /* Send a START character. */ + +/* tcflush() and TCFLSH use these */ +#define TCIFLUSH 0 /* Discard data received but not yet read. */ +#define TCOFLUSH 1 /* Discard data written but not yet sent. */ +#define TCIOFLUSH 2 /* Discard all pending data. */ + +/* tcsetattr uses these */ +#define TCSANOW 0x540e /* Same as TCSETS; change immediately. */ +#define TCSADRAIN 0x540f /* Same as TCSETSW; change when pending output is written. */ +#define TCSAFLUSH 0x5410 /* Same as TCSETSF; flush pending input before changing. */ + +#define _IOT_termios /* Hurd ioctl type field. */ \ + _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2) + +#endif /* bits/termios.h */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/time.h b/sysdeps/unix/sysv/linux/mips/bits/time.h new file mode 100644 index 0000000000..5fcef0fb8c --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/bits/time.h @@ -0,0 +1,54 @@ +/* System-dependent timing definitions. Linux/MIPS version. + Copyright (C) 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* + * Never include this file directly; use instead. + */ + +#ifdef __need_timeval +# undef __need_timeval +# ifndef _STRUCT_TIMEVAL +# define _STRUCT_TIMEVAL 1 +/* A time value that is accurate to the nearest + microsecond but also has a range of years. */ +struct timeval + { + long tv_sec; /* Seconds. */ + long tv_usec; /* Microseconds. */ + }; +# endif /* struct timeval */ +#endif /* need timeval */ + + +#ifndef _BITS_TIME_H +#define _BITS_TIME_H 1 + +/* ISO/IEC 9899:1990 7.12.1: + The macro `CLOCKS_PER_SEC' is the number per second of the value + returned by the `clock' function. */ +/* CAE XSH, Issue 4, Version 2: + The value of CLOCKS_PER_SEC is required to be 1 million on all + XSI-conformant systems. */ +# define CLOCKS_PER_SEC 1000000 + +/* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK + presents the real value for clock ticks per second for the system. */ +# define CLK_TCK 100 /* XXX not correct for all systems. */ + +#endif /* bits/time.h */ diff --git a/sysdeps/unix/sysv/linux/mips/clone.S b/sysdeps/unix/sysv/linux/mips/clone.S new file mode 100644 index 0000000000..357f70e47f --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/clone.S @@ -0,0 +1,125 @@ +/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ralf Baechle , 1996. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* clone() is even more special than fork() as it mucks with stacks + and invokes a function in the right context after its all over. */ + +#include +#include +#include +#define _ERRNO_H 1 +#include + +/* int clone(int (*fn)(), void *child_stack, int flags, int nargs, ...) */ + +#define FRAMESZ 4*SZREG +#if _MIPS_SIM == _MIPS_SIM_ABI32 +#define MAX_REG_ARGS 4 +#else +#define MAX_REG_ARGS 6 +#endif + + .text +NESTED(__clone,4*SZREG,sp) +#ifdef __PIC__ + .set noreorder + .cpload $25 + .set reorder + .cprestore 16 +#endif + PTR_SUBIU sp,FRAMESZ +#ifdef PROF + .set noat + move $1,ra + jal _mcount + .set at +#endif + + /* Sanity check arguments. */ + li v0,EINVAL + beqz a0,error /* no NULL function pointers */ + beqz a1,error /* no NULL stack pointers */ + bltz a3,error /* no negative argument counts */ + + /* Allocate space on the new stack and copy args over */ + move t0,a3 # save nargs for __thread_start + PTR_SLL t1,a3,PTR_SCALESHIFT + PTR_ADDU t1,a3,sp +1: REG_L t2,-SZREG(t1) + PTR_SUBIU t1,SZREG + REG_S t2,-SZREG(a1) + PTR_SUBIU a3,1 + PTR_SUBIU a1,SZREG + bnez a3,1b + + /* Do the system call */ + move t9,a0 # get fn ptr out of the way + move a0,a2 + li v0,__NR_clone + syscall + + bnez a3,error + beqz v0,__thread_start + + /* Successful return from the parent */ + PTR_ADDIU sp,FRAMESZ + ret + + /* Something bad happened -- no child created */ +error: + PTR_ADDIU sp,FRAMESZ +#ifdef PIC + la t9,__syscall_error + jr t9 +#else + j __syscall_error +#endif + END(__clone) + +/* Load up the arguments to the function. Put this block of code in + its own function so that we can terminate the stack trace with our + debug info. + + At this point we have t0=nargs, t9=fn, sp=&arg[0]. */ + +NESTED(__thread_start,32,sp) + /* Stackframe has been created on entry of clone() */ + /* Calculate address of jump into argument loading code */ + li t1,MAX_REG_ARGS + slt t0,t1,t2 /* max MAX_REG_ARGS args in registers */ + MOVN (t2,t1,t0) + la v0,arg0 + PTR_SLL t1,t0,PTR_SCALESHIFT + PTR_SUBU v0,t1 + jr v0 + + /* Load the integer register arguments */ + REG_L a0,SZREG(sp) +arg0: + + /* Call the user's function */ + jalr t9 + + /* Call _exit rather than doing it inline for breakpoint purposes */ + move a0,v0 + jal _exit + + END(__thread_start) + +weak_alias(__clone, clone) diff --git a/sysdeps/unix/sysv/linux/mips/entry.h b/sysdeps/unix/sysv/linux/mips/entry.h new file mode 100644 index 0000000000..3db6d93636 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/entry.h @@ -0,0 +1 @@ +#define ENTRY_POINT __start diff --git a/sysdeps/unix/sysv/linux/mips/fpregdef.h b/sysdeps/unix/sysv/linux/mips/fpregdef.h new file mode 100644 index 0000000000..a963d5f588 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/fpregdef.h @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/mips/fxstat.c b/sysdeps/unix/sysv/linux/mips/fxstat.c new file mode 100644 index 0000000000..4a3c486a4a --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/fxstat.c @@ -0,0 +1,80 @@ +/* fxstat using old-style Unix fstat system call. + Copyright (C) 1991, 1995, 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include + +#include + +extern int __syscall_fstat (int, struct kernel_stat *); + +/* Get information about the file descriptor FD in BUF. */ +int +__fxstat (int vers, int fd, struct stat *buf) +{ + struct kernel_stat kbuf; + int result; + + switch (vers) + { + case _STAT_VER_LINUX_OLD: + /* Nothing to do. The struct is in the form the kernel expects + it to be. */ + result = __syscall_fstat (fd, (struct kernel_stat *) buf); + break; + + case _STAT_VER_LINUX: + /* Do the system call. */ + result = __syscall_fstat (fd, &kbuf); + + /* Convert to current kernel version of `struct stat'. */ + buf->st_dev = kbuf.st_dev; + buf->st_pad1[0] = 0; buf->st_pad1[1] = 0; buf->st_pad1[2] = 0; + buf->st_ino = kbuf.st_ino; + buf->st_mode = kbuf.st_mode; + buf->st_nlink = kbuf.st_nlink; + buf->st_uid = kbuf.st_uid; + buf->st_gid = kbuf.st_gid; + buf->st_rdev = kbuf.st_rdev; + buf->st_pad2[0] = 0; buf->st_pad2[1] = 0; + buf->st_pad3 = 0; + buf->st_size = kbuf.st_size; + buf->st_blksize = kbuf.st_blksize; + buf->st_blocks = kbuf.st_blocks; + + buf->st_atime = kbuf.st_atime; buf->__reserved0 = 0; + buf->st_mtime = kbuf.st_mtime; buf->__reserved1 = 0; + buf->st_ctime = kbuf.st_ctime; buf->__reserved2 = 0; + + buf->st_pad4[0] = 0; buf->st_pad4[1] = 0; + buf->st_pad4[2] = 0; buf->st_pad4[3] = 0; + buf->st_pad4[4] = 0; buf->st_pad4[5] = 0; + buf->st_pad4[6] = 0; buf->st_pad4[7] = 0; + break; + + default: + __set_errno (EINVAL); + result = -1; + break; + } + + return result; +} +weak_alias (__fxstat, _fxstat) diff --git a/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h b/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h new file mode 100644 index 0000000000..bb7fe6bece --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h @@ -0,0 +1,22 @@ +/* This is the sigaction structure from the Linux 2.1.24 kernel. */ + +#include + +#define HAVE_SA_RESTORER + +struct kernel_sigaction { + unsigned int sa_flags; + __sighandler_t sa_handler; + unsigned long sa_mask; + unsigned int __pad0[3]; /* reserved, keep size constant */ + + /* Abi says here follows reserved int[2] */ + void (*sa_restorer)(void); +#if (_MIPS_ISA == _MIPS_ISA_MIPS1) || (_MIPS_ISA == _MIPS_ISA_MIPS2) + /* + * For 32 bit code we have to pad struct sigaction to get + * constant size for the ABI + */ + int pad1[1]; /* reserved */ +#endif +}; diff --git a/sysdeps/unix/sysv/linux/mips/kernel_stat.h b/sysdeps/unix/sysv/linux/mips/kernel_stat.h new file mode 100644 index 0000000000..c6419baf37 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/kernel_stat.h @@ -0,0 +1,28 @@ +/* Definition of `struct stat' used in the kernel.. */ +struct kernel_stat + { + unsigned long int st_dev; + long int __pad1[3]; /* Reserved for network id */ + unsigned long int st_ino; + unsigned long int st_mode; + unsigned long int st_nlink; + long int st_uid; + long int st_gid; + unsigned long int st_rdev; + long int __pad2[2]; + long int st_size; + long int __pad3; + unsigned int st_atime; + unsigned int __unused1; + unsigned int st_mtime; + unsigned int __unused2; + unsigned int st_ctime; + unsigned int __unused3; + long int st_blksize; + long int st_blocks; + char st_fstype[16]; /* Filesystem type name, unsupported */ + long st_pad4[8]; + /* Linux specific fields */ + unsigned int st_flags; + unsigned int st_gen; + }; diff --git a/sysdeps/unix/sysv/linux/mips/kernel_termios.h b/sysdeps/unix/sysv/linux/mips/kernel_termios.h new file mode 100644 index 0000000000..35be1bb290 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/kernel_termios.h @@ -0,0 +1,20 @@ +#ifndef _SYS_KERNEL_TERMIOS_H +#define _SYS_KERNEL_TERMIOS_H 1 +/* The following corresponds to the values from the Linux 2.1.24 kernel. */ + +/* We need the definition of tcflag_t, cc_t, and speed_t. */ +#include + +#define __KERNEL_NCCS 23 + +struct __kernel_termios + { + tcflag_t c_iflag; /* input mode flags */ + tcflag_t c_oflag; /* output mode flags */ + tcflag_t c_cflag; /* control mode flags */ + tcflag_t c_lflag; /* local mode flags */ + cc_t c_line; /* line discipline */ + cc_t c_cc[__KERNEL_NCCS]; /* control characters */ + }; + +#endif /* kernel_termios.h */ diff --git a/sysdeps/unix/sysv/linux/mips/lxstat.h b/sysdeps/unix/sysv/linux/mips/lxstat.h new file mode 100644 index 0000000000..7907b2f2d2 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/lxstat.h @@ -0,0 +1,80 @@ +/* lxstat using old-style Unix lstat system call. + Copyright (C) 1991, 1995, 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include + +#include + +extern int __syscall_lstat (const char *, struct kernel_stat *); + +/* Get information about the file NAME in BUF. */ +int +__lxstat (int vers, const char *name, struct stat *buf) +{ + struct kernel_stat kbuf; + int result; + + switch (vers) + { + case _STAT_VER_LINUX_OLD: + /* Nothing to do. The struct is in the form the kernel expects + it to be. */ + result = __syscall_lstat (name, (struct kernel_stat *) buf); + break; + + case _STAT_VER_LINUX: + /* Do the system call. */ + result = __syscall_lstat (name, &kbuf); + + /* Convert to current kernel version of `struct stat'. */ + buf->st_dev = kbuf.st_dev; + buf->st_pad1[0] = 0; buf->st_pad1[1] = 0; buf->st_pad1[2] = 0; + buf->st_ino = kbuf.st_ino; + buf->st_mode = kbuf.st_mode; + buf->st_nlink = kbuf.st_nlink; + buf->st_uid = kbuf.st_uid; + buf->st_gid = kbuf.st_gid; + buf->st_rdev = kbuf.st_rdev; + buf->st_pad2[0] = 0; buf->st_pad2[1] = 0; + buf->st_pad3 = 0; + buf->st_size = kbuf.st_size; + buf->st_blksize = kbuf.st_blksize; + buf->st_blocks = kbuf.st_blocks; + + buf->st_atime = kbuf.st_atime; buf->__reserved0 = 0; + buf->st_mtime = kbuf.st_mtime; buf->__reserved1 = 0; + buf->st_ctime = kbuf.st_ctime; buf->__reserved2 = 0; + + buf->st_pad4[0] = 0; buf->st_pad4[1] = 0; + buf->st_pad4[2] = 0; buf->st_pad4[3] = 0; + buf->st_pad4[4] = 0; buf->st_pad4[5] = 0; + buf->st_pad4[6] = 0; buf->st_pad4[7] = 0; + break; + + default: + __set_errno (EINVAL); + result = -1; + break; + } + + return result; +} +weak_alias (__lxstat, _lxstat) diff --git a/sysdeps/unix/sysv/linux/mips/regdef.h b/sysdeps/unix/sysv/linux/mips/regdef.h new file mode 100644 index 0000000000..b613c8b250 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/regdef.h @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/mips/sgidef.h b/sysdeps/unix/sysv/linux/mips/sgidef.h new file mode 100644 index 0000000000..a36ece0175 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/sgidef.h @@ -0,0 +1,28 @@ +/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ralf Baechle . + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SGIDEFS_H +#define _SGIDEFS_H 1 + +/* + * The real definitions come from the Linux kernel sources + */ +#include + +#endif /* sgidefs.h */ diff --git a/sysdeps/unix/sysv/linux/mips/sys/acct.h b/sysdeps/unix/sysv/linux/mips/sys/acct.h new file mode 100644 index 0000000000..ee596db82b --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/sys/acct.h @@ -0,0 +1,66 @@ +/* Copyright (C) 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_ACCT_H + +#define _SYS_ACCT_H 1 +#include + +#define __need_time_t +#include + + +__BEGIN_DECLS + +#define ACCT_COMM 16 + +struct acct + { + char ac_comm[ACCT_COMM]; /* Accounting command name. */ + time_t ac_utime; /* Accounting user time. */ + time_t ac_stime; /* Accounting system time. */ + time_t ac_etime; /* Accounting elapsed time. */ + time_t ac_btime; /* Beginning time. */ + long ac_uid; /* Accounting user ID. */ + long ac_gid; /* Accounting group ID. */ + unsigned long int ac_tty; /* Controlling tty. */ + /* Please note that the value of the `ac_tty' field, a device number, + is encoded differently in the kernel and for the libc dev_t type. */ + char ac_flag; /* Accounting flag. */ + long int ac_minflt; /* Accounting minor pagefaults. */ + long int ac_majflt; /* Accounting major pagefaults. */ + long int ac_exitcode; /* Accounting process exitcode. */ + }; + +enum + { + AFORK = 0001, /* Has executed fork, but no exec. */ + ASU = 0002, /* Used super-user privileges. */ + ACORE = 0004, /* Dumped core. */ + AXSIG = 0010 /* Killed by a signal. */ + }; + +#define AHZ 100 + + +/* Switch process accounting on and off. */ +extern int acct __P ((__const char *__filename)); + +__END_DECLS + +#endif /* sys/acct.h */ diff --git a/sysdeps/unix/sysv/linux/mips/sys/asm.h b/sysdeps/unix/sysv/linux/mips/sys/asm.h new file mode 100644 index 0000000000..346a9c4ec2 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/sys/asm.h @@ -0,0 +1,28 @@ +/* Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ralf Baechle . + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_ASM_H +#define _SYS_ASM_H + +/* + * The real definitions come from the Linux kernel sources + */ +#include + +#endif /* sys/asm.h */ diff --git a/sysdeps/unix/sysv/linux/mips/sys/cachectl.h b/sysdeps/unix/sysv/linux/mips/sys/cachectl.h new file mode 100644 index 0000000000..740c24d6a8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/sys/cachectl.h @@ -0,0 +1,42 @@ +/* Copyright (C) 1995, 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_CACHECTL_H +#define _SYS_CACHECTL_H 1 + +#include + +/* + * Get the kernel definition for the op bits. + */ +#include + +__BEGIN_DECLS + +#ifdef __USE_MISC +extern int cachectl __P ((void *addr, __const int nbytes, __const int op)); +#endif +extern int __cachectl __P ((void *addr, __const int nbytes, __const int op)); +#ifdef __USE_MISC +extern int cacheflush __P ((void *addr, __const int nbytes, __const int op)); +#endif +extern int _flush_cache __P ((char *addr, __const int nbytes, __const int op)); + +__END_DECLS + +#endif /* sys/cachectl.h */ diff --git a/sysdeps/unix/sysv/linux/mips/sys/fpregdef.h b/sysdeps/unix/sysv/linux/mips/sys/fpregdef.h new file mode 100644 index 0000000000..48d8f7513e --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/sys/fpregdef.h @@ -0,0 +1,27 @@ +/* Copyright (C) 1991, 92, 94, 95, 96, 97 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_FPREGDEF_H +#define _SYS_FPREGDEF_H + +/* + * The real definitions come from the Linux kernel sources + */ +#include + +#endif /* sys/fpregdef.h */ diff --git a/sysdeps/unix/sysv/linux/mips/sys/procfs.h b/sysdeps/unix/sysv/linux/mips/sys/procfs.h new file mode 100644 index 0000000000..d740954a8d --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/sys/procfs.h @@ -0,0 +1,109 @@ +/* Copyright (C) 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_PROCFS_H + +#define _SYS_PROCFS_H 1 +#include + +/* This is somehow modelled after the file of the same name on SysVr4 + systems. It provides a definition of the core file format for ELF + used on Linux. */ + +#include +#include +#include +#include +#include + +__BEGIN_DECLS + +struct elf_siginfo + { + int si_signo; /* Signal number. */ + int si_code; /* Extra code. */ + int si_errno; /* Errno. */ + }; + +typedef elf_greg_t greg_t; +typedef elf_gregset_t gregset_t; +typedef elf_fpregset_t fpregset_t; +#define NGREG ELF_NGREG + +/* Definitions to generate Intel SVR4-like core files. These mostly + have the same names as the SVR4 types with "elf_" tacked on the + front to prevent clashes with linux definitions, and the typedef + forms have been avoided. This is mostly like the SVR4 structure, + but more Linuxy, with things that Linux does not support and which + gdb doesn't really use excluded. Fields present but not used are + marked with "XXX". */ +struct elf_prstatus + { +#if 0 + long int pr_flags; /* XXX Process flags. */ + short int pr_why; /* XXX Reason for process halt. */ + short int pr_what; /* XXX More detailed reason. */ +#endif + struct elf_siginfo pr_info; /* Info associated with signal. */ + short int pr_cursig; /* Current signal. */ + unsigned long int pr_sigpend; /* Set of pending signals. */ + unsigned long int pr_sighold; /* Set of held signals. */ +#if 0 + struct sigaltstack pr_altstack; /* Alternate stack info. */ + struct sigaction pr_action; /* Signal action for current sig. */ +#endif + __pid_t pr_pid; + __pid_t pr_ppid; + __pid_t pr_pgrp; + __pid_t pr_sid; + struct timeval pr_utime; /* User time. */ + struct timeval pr_stime; /* System time. */ + struct timeval pr_cutime; /* Cumulative user time. */ + struct timeval pr_cstime; /* Cumulative system time. */ +#if 0 + long int pr_instr; /* Current instruction. */ +#endif + elf_gregset_t pr_reg; /* GP registers. */ + int pr_fpvalid; /* True if math copro being used. */ + }; + + +#define ELF_PRARGSZ (80) /* Number of chars for args */ + +struct elf_prpsinfo + { + char pr_state; /* Numeric process state. */ + char pr_sname; /* Char for pr_state. */ + char pr_zomb; /* Zombie. */ + char pr_nice; /* Nice val. */ + unsigned long int pr_flag; /* Flags. */ + long pr_uid; + long pr_gid; + int pr_pid, pr_ppid, pr_pgrp, pr_sid; + /* Lots missing */ + char pr_fname[16]; /* Filename of executable. */ + char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ + }; + + +typedef struct elf_prstatus prstatus_t; +typedef struct elf_prpsinfo prpsinfo_t; + +__END_DECLS + +#endif /* sys/procfs.h */ diff --git a/sysdeps/unix/sysv/linux/mips/sys/regdef.h b/sysdeps/unix/sysv/linux/mips/sys/regdef.h new file mode 100644 index 0000000000..700fd66f0b --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/sys/regdef.h @@ -0,0 +1,29 @@ +/* Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ralf Baechle . + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _REGDEF_H +#define _REGDEF_H 1 + +/* + * The real definitions come from the Linux kernel sources + */ +#include +#include + +#endif /* regdef.h */ diff --git a/sysdeps/unix/sysv/linux/mips/sys/syscall.h b/sysdeps/unix/sysv/linux/mips/sys/syscall.h new file mode 100644 index 0000000000..82f8427aa0 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/sys/syscall.h @@ -0,0 +1,1187 @@ +/* Copyright (C) 1995, 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYSCALL_H +#define _SYSCALL_H 1 + +/* This file should list the numbers of the system the system knows. + But instead of duplicating this we use the information available + from the kernel sources. */ +#include + +/* + * SVR4 syscalls are in the range from 1 to 999 + */ +#define SYS_SVR4 0 +#define SYS_SVR4_syscall (SYS_SVR4 + 0) +#define SYS_SVR4_exit (SYS_SVR4 + 1) +#define SYS_SVR4_fork (SYS_SVR4 + 2) +#define SYS_SVR4_read (SYS_SVR4 + 3) +#define SYS_SVR4_write (SYS_SVR4 + 4) +#define SYS_SVR4_open (SYS_SVR4 + 5) +#define SYS_SVR4_close (SYS_SVR4 + 6) +#define SYS_SVR4_wait (SYS_SVR4 + 7) +#define SYS_SVR4_creat (SYS_SVR4 + 8) +#define SYS_SVR4_link (SYS_SVR4 + 9) +#define SYS_SVR4_unlink (SYS_SVR4 + 10) +#define SYS_SVR4_exec (SYS_SVR4 + 11) +#define SYS_SVR4_chdir (SYS_SVR4 + 12) +#define SYS_SVR4_gtime (SYS_SVR4 + 13) +#define SYS_SVR4_mknod (SYS_SVR4 + 14) +#define SYS_SVR4_chmod (SYS_SVR4 + 15) +#define SYS_SVR4_chown (SYS_SVR4 + 16) +#define SYS_SVR4_sbreak (SYS_SVR4 + 17) +#define SYS_SVR4_stat (SYS_SVR4 + 18) +#define SYS_SVR4_lseek (SYS_SVR4 + 19) +#define SYS_SVR4_getpid (SYS_SVR4 + 20) +#define SYS_SVR4_mount (SYS_SVR4 + 21) +#define SYS_SVR4_umount (SYS_SVR4 + 22) +#define SYS_SVR4_setuid (SYS_SVR4 + 23) +#define SYS_SVR4_getuid (SYS_SVR4 + 24) +#define SYS_SVR4_stime (SYS_SVR4 + 25) +#define SYS_SVR4_ptrace (SYS_SVR4 + 26) +#define SYS_SVR4_alarm (SYS_SVR4 + 27) +#define SYS_SVR4_fstat (SYS_SVR4 + 28) +#define SYS_SVR4_pause (SYS_SVR4 + 29) +#define SYS_SVR4_utime (SYS_SVR4 + 30) +#define SYS_SVR4_stty (SYS_SVR4 + 31) +#define SYS_SVR4_gtty (SYS_SVR4 + 32) +#define SYS_SVR4_access (SYS_SVR4 + 33) +#define SYS_SVR4_nice (SYS_SVR4 + 34) +#define SYS_SVR4_statfs (SYS_SVR4 + 35) +#define SYS_SVR4_sync (SYS_SVR4 + 36) +#define SYS_SVR4_kill (SYS_SVR4 + 37) +#define SYS_SVR4_fstatfs (SYS_SVR4 + 38) +#define SYS_SVR4_setpgrp (SYS_SVR4 + 39) +#define SYS_SVR4_cxenix (SYS_SVR4 + 40) +#define SYS_SVR4_dup (SYS_SVR4 + 41) +#define SYS_SVR4_pipe (SYS_SVR4 + 42) +#define SYS_SVR4_times (SYS_SVR4 + 43) +#define SYS_SVR4_profil (SYS_SVR4 + 44) +#define SYS_SVR4_plock (SYS_SVR4 + 45) +#define SYS_SVR4_setgid (SYS_SVR4 + 46) +#define SYS_SVR4_getgid (SYS_SVR4 + 47) +#define SYS_SVR4_sig (SYS_SVR4 + 48) +#define SYS_SVR4_msgsys (SYS_SVR4 + 49) +#define SYS_SVR4_sysmips (SYS_SVR4 + 50) +#define SYS_SVR4_sysacct (SYS_SVR4 + 51) +#define SYS_SVR4_shmsys (SYS_SVR4 + 52) +#define SYS_SVR4_semsys (SYS_SVR4 + 53) +#define SYS_SVR4_ioctl (SYS_SVR4 + 54) +#define SYS_SVR4_uadmin (SYS_SVR4 + 55) +#define SYS_SVR4_exch (SYS_SVR4 + 56) +#define SYS_SVR4_utssys (SYS_SVR4 + 57) +#define SYS_SVR4_fsync (SYS_SVR4 + 58) +#define SYS_SVR4_exece (SYS_SVR4 + 59) +#define SYS_SVR4_umask (SYS_SVR4 + 60) +#define SYS_SVR4_chroot (SYS_SVR4 + 61) +#define SYS_SVR4_fcntl (SYS_SVR4 + 62) +#define SYS_SVR4_ulimit (SYS_SVR4 + 63) +#define SYS_SVR4_reserved1 (SYS_SVR4 + 64) +#define SYS_SVR4_reserved2 (SYS_SVR4 + 65) +#define SYS_SVR4_reserved3 (SYS_SVR4 + 66) +#define SYS_SVR4_reserved4 (SYS_SVR4 + 67) +#define SYS_SVR4_reserved5 (SYS_SVR4 + 68) +#define SYS_SVR4_reserved6 (SYS_SVR4 + 69) +#define SYS_SVR4_advfs (SYS_SVR4 + 70) +#define SYS_SVR4_unadvfs (SYS_SVR4 + 71) +#define SYS_SVR4_unused1 (SYS_SVR4 + 72) +#define SYS_SVR4_unused2 (SYS_SVR4 + 73) +#define SYS_SVR4_rfstart (SYS_SVR4 + 74) +#define SYS_SVR4_unused3 (SYS_SVR4 + 75) +#define SYS_SVR4_rdebug (SYS_SVR4 + 76) +#define SYS_SVR4_rfstop (SYS_SVR4 + 77) +#define SYS_SVR4_rfsys (SYS_SVR4 + 78) +#define SYS_SVR4_rmdir (SYS_SVR4 + 79) +#define SYS_SVR4_mkdir (SYS_SVR4 + 80) +#define SYS_SVR4_getdents (SYS_SVR4 + 81) +#define SYS_SVR4_libattach (SYS_SVR4 + 82) +#define SYS_SVR4_libdetach (SYS_SVR4 + 83) +#define SYS_SVR4_sysfs (SYS_SVR4 + 84) +#define SYS_SVR4_getmsg (SYS_SVR4 + 85) +#define SYS_SVR4_putmsg (SYS_SVR4 + 86) +#define SYS_SVR4_poll (SYS_SVR4 + 87) +#define SYS_SVR4_lstat (SYS_SVR4 + 88) +#define SYS_SVR4_symlink (SYS_SVR4 + 89) +#define SYS_SVR4_readlink (SYS_SVR4 + 90) +#define SYS_SVR4_setgroups (SYS_SVR4 + 91) +#define SYS_SVR4_getgroups (SYS_SVR4 + 92) +#define SYS_SVR4_fchmod (SYS_SVR4 + 93) +#define SYS_SVR4_fchown (SYS_SVR4 + 94) +#define SYS_SVR4_sigprocmask (SYS_SVR4 + 95) +#define SYS_SVR4_sigsuspend (SYS_SVR4 + 96) +#define SYS_SVR4_sigaltstack (SYS_SVR4 + 97) +#define SYS_SVR4_sigaction (SYS_SVR4 + 98) +#define SYS_SVR4_sigpending (SYS_SVR4 + 99) +#define SYS_SVR4_setcontext (SYS_SVR4 + 100) +#define SYS_SVR4_evsys (SYS_SVR4 + 101) +#define SYS_SVR4_evtrapret (SYS_SVR4 + 102) +#define SYS_SVR4_statvfs (SYS_SVR4 + 103) +#define SYS_SVR4_fstatvfs (SYS_SVR4 + 104) +#define SYS_SVR4_reserved7 (SYS_SVR4 + 105) +#define SYS_SVR4_nfssys (SYS_SVR4 + 106) +#define SYS_SVR4_waitid (SYS_SVR4 + 107) +#define SYS_SVR4_sigsendset (SYS_SVR4 + 108) +#define SYS_SVR4_hrtsys (SYS_SVR4 + 109) +#define SYS_SVR4_acancel (SYS_SVR4 + 110) +#define SYS_SVR4_async (SYS_SVR4 + 111) +#define SYS_SVR4_priocntlset (SYS_SVR4 + 112) +#define SYS_SVR4_pathconf (SYS_SVR4 + 113) +#define SYS_SVR4_mincore (SYS_SVR4 + 114) +#define SYS_SVR4_mmap (SYS_SVR4 + 115) +#define SYS_SVR4_mprotect (SYS_SVR4 + 116) +#define SYS_SVR4_munmap (SYS_SVR4 + 117) +#define SYS_SVR4_fpathconf (SYS_SVR4 + 118) +#define SYS_SVR4_vfork (SYS_SVR4 + 119) +#define SYS_SVR4_fchdir (SYS_SVR4 + 120) +#define SYS_SVR4_readv (SYS_SVR4 + 121) +#define SYS_SVR4_writev (SYS_SVR4 + 122) +#define SYS_SVR4_xstat (SYS_SVR4 + 123) +#define SYS_SVR4_lxstat (SYS_SVR4 + 124) +#define SYS_SVR4_fxstat (SYS_SVR4 + 125) +#define SYS_SVR4_xmknod (SYS_SVR4 + 126) +#define SYS_SVR4_clocal (SYS_SVR4 + 127) +#define SYS_SVR4_setrlimit (SYS_SVR4 + 128) +#define SYS_SVR4_getrlimit (SYS_SVR4 + 129) +#define SYS_SVR4_lchown (SYS_SVR4 + 130) +#define SYS_SVR4_memcntl (SYS_SVR4 + 131) +#define SYS_SVR4_getpmsg (SYS_SVR4 + 132) +#define SYS_SVR4_putpmsg (SYS_SVR4 + 133) +#define SYS_SVR4_rename (SYS_SVR4 + 134) +#define SYS_SVR4_nuname (SYS_SVR4 + 135) +#define SYS_SVR4_setegid (SYS_SVR4 + 136) +#define SYS_SVR4_sysconf (SYS_SVR4 + 137) +#define SYS_SVR4_adjtime (SYS_SVR4 + 138) +#define SYS_SVR4_sysinfo (SYS_SVR4 + 139) +#define SYS_SVR4_reserved8 (SYS_SVR4 + 140) +#define SYS_SVR4_seteuid (SYS_SVR4 + 141) +#define SYS_SVR4_PYRAMID_statis (SYS_SVR4 + 142) +#define SYS_SVR4_PYRAMID_tuning (SYS_SVR4 + 143) +#define SYS_SVR4_PYRAMID_forcerr (SYS_SVR4 + 144) +#define SYS_SVR4_PYRAMID_mpcntl (SYS_SVR4 + 145) +#define SYS_SVR4_reserved9 (SYS_SVR4 + 146) +#define SYS_SVR4_reserved10 (SYS_SVR4 + 147) +#define SYS_SVR4_reserved11 (SYS_SVR4 + 148) +#define SYS_SVR4_reserved12 (SYS_SVR4 + 149) +#define SYS_SVR4_reserved13 (SYS_SVR4 + 150) +#define SYS_SVR4_reserved14 (SYS_SVR4 + 151) +#define SYS_SVR4_reserved15 (SYS_SVR4 + 152) +#define SYS_SVR4_reserved16 (SYS_SVR4 + 153) +#define SYS_SVR4_reserved17 (SYS_SVR4 + 154) +#define SYS_SVR4_reserved18 (SYS_SVR4 + 155) +#define SYS_SVR4_reserved19 (SYS_SVR4 + 156) +#define SYS_SVR4_reserved20 (SYS_SVR4 + 157) +#define SYS_SVR4_reserved21 (SYS_SVR4 + 158) +#define SYS_SVR4_reserved22 (SYS_SVR4 + 159) +#define SYS_SVR4_reserved23 (SYS_SVR4 + 160) +#define SYS_SVR4_reserved24 (SYS_SVR4 + 161) +#define SYS_SVR4_reserved25 (SYS_SVR4 + 162) +#define SYS_SVR4_reserved26 (SYS_SVR4 + 163) +#define SYS_SVR4_reserved27 (SYS_SVR4 + 164) +#define SYS_SVR4_reserved28 (SYS_SVR4 + 165) +#define SYS_SVR4_reserved29 (SYS_SVR4 + 166) +#define SYS_SVR4_reserved30 (SYS_SVR4 + 167) +#define SYS_SVR4_reserved31 (SYS_SVR4 + 168) +#define SYS_SVR4_reserved32 (SYS_SVR4 + 169) +#define SYS_SVR4_reserved33 (SYS_SVR4 + 170) +#define SYS_SVR4_reserved34 (SYS_SVR4 + 171) +#define SYS_SVR4_reserved35 (SYS_SVR4 + 172) +#define SYS_SVR4_reserved36 (SYS_SVR4 + 173) +#define SYS_SVR4_reserved37 (SYS_SVR4 + 174) +#define SYS_SVR4_reserved38 (SYS_SVR4 + 175) +#define SYS_SVR4_reserved39 (SYS_SVR4 + 176) +#define SYS_SVR4_reserved40 (SYS_SVR4 + 177) +#define SYS_SVR4_reserved41 (SYS_SVR4 + 178) +#define SYS_SVR4_reserved42 (SYS_SVR4 + 179) +#define SYS_SVR4_reserved43 (SYS_SVR4 + 180) +#define SYS_SVR4_reserved44 (SYS_SVR4 + 181) +#define SYS_SVR4_reserved45 (SYS_SVR4 + 182) +#define SYS_SVR4_reserved46 (SYS_SVR4 + 183) +#define SYS_SVR4_reserved47 (SYS_SVR4 + 184) +#define SYS_SVR4_reserved48 (SYS_SVR4 + 185) +#define SYS_SVR4_reserved49 (SYS_SVR4 + 186) +#define SYS_SVR4_reserved50 (SYS_SVR4 + 187) +#define SYS_SVR4_reserved51 (SYS_SVR4 + 188) +#define SYS_SVR4_reserved52 (SYS_SVR4 + 189) +#define SYS_SVR4_reserved53 (SYS_SVR4 + 190) +#define SYS_SVR4_reserved54 (SYS_SVR4 + 191) +#define SYS_SVR4_reserved55 (SYS_SVR4 + 192) +#define SYS_SVR4_reserved56 (SYS_SVR4 + 193) +#define SYS_SVR4_reserved57 (SYS_SVR4 + 194) +#define SYS_SVR4_reserved58 (SYS_SVR4 + 195) +#define SYS_SVR4_reserved59 (SYS_SVR4 + 196) +#define SYS_SVR4_reserved60 (SYS_SVR4 + 197) +#define SYS_SVR4_reserved61 (SYS_SVR4 + 198) +#define SYS_SVR4_reserved62 (SYS_SVR4 + 199) +#define SYS_SVR4_reserved63 (SYS_SVR4 + 200) +#define SYS_SVR4_aread (SYS_SVR4 + 201) +#define SYS_SVR4_awrite (SYS_SVR4 + 202) +#define SYS_SVR4_listio (SYS_SVR4 + 203) +#define SYS_SVR4_mips_acancel (SYS_SVR4 + 204) +#define SYS_SVR4_astatus (SYS_SVR4 + 205) +#define SYS_SVR4_await (SYS_SVR4 + 206) +#define SYS_SVR4_areadv (SYS_SVR4 + 207) +#define SYS_SVR4_awritev (SYS_SVR4 + 208) +#define SYS_SVR4_MIPS_reserved1 (SYS_SVR4 + 209) +#define SYS_SVR4_MIPS_reserved2 (SYS_SVR4 + 210) +#define SYS_SVR4_MIPS_reserved3 (SYS_SVR4 + 211) +#define SYS_SVR4_MIPS_reserved4 (SYS_SVR4 + 212) +#define SYS_SVR4_MIPS_reserved5 (SYS_SVR4 + 213) +#define SYS_SVR4_MIPS_reserved6 (SYS_SVR4 + 214) +#define SYS_SVR4_MIPS_reserved7 (SYS_SVR4 + 215) +#define SYS_SVR4_MIPS_reserved8 (SYS_SVR4 + 216) +#define SYS_SVR4_MIPS_reserved9 (SYS_SVR4 + 217) +#define SYS_SVR4_MIPS_reserved10 (SYS_SVR4 + 218) +#define SYS_SVR4_MIPS_reserved11 (SYS_SVR4 + 219) +#define SYS_SVR4_MIPS_reserved12 (SYS_SVR4 + 220) +#define SYS_SVR4_CDC_reserved1 (SYS_SVR4 + 221) +#define SYS_SVR4_CDC_reserved2 (SYS_SVR4 + 222) +#define SYS_SVR4_CDC_reserved3 (SYS_SVR4 + 223) +#define SYS_SVR4_CDC_reserved4 (SYS_SVR4 + 224) +#define SYS_SVR4_CDC_reserved5 (SYS_SVR4 + 225) +#define SYS_SVR4_CDC_reserved6 (SYS_SVR4 + 226) +#define SYS_SVR4_CDC_reserved7 (SYS_SVR4 + 227) +#define SYS_SVR4_CDC_reserved8 (SYS_SVR4 + 228) +#define SYS_SVR4_CDC_reserved9 (SYS_SVR4 + 229) +#define SYS_SVR4_CDC_reserved10 (SYS_SVR4 + 230) +#define SYS_SVR4_CDC_reserved11 (SYS_SVR4 + 231) +#define SYS_SVR4_CDC_reserved12 (SYS_SVR4 + 232) +#define SYS_SVR4_CDC_reserved13 (SYS_SVR4 + 233) +#define SYS_SVR4_CDC_reserved14 (SYS_SVR4 + 234) +#define SYS_SVR4_CDC_reserved15 (SYS_SVR4 + 235) +#define SYS_SVR4_CDC_reserved16 (SYS_SVR4 + 236) +#define SYS_SVR4_CDC_reserved17 (SYS_SVR4 + 237) +#define SYS_SVR4_CDC_reserved18 (SYS_SVR4 + 238) +#define SYS_SVR4_CDC_reserved19 (SYS_SVR4 + 239) +#define SYS_SVR4_CDC_reserved20 (SYS_SVR4 + 240) + +/* + * SYS V syscalls are in the range from 1000 to 1999 + */ +#define SYS_SYSV 1000 +#define SYS_SYSV_syscall (SYS_SYSV + 0) +#define SYS_SYSV_exit (SYS_SYSV + 1) +#define SYS_SYSV_fork (SYS_SYSV + 2) +#define SYS_SYSV_read (SYS_SYSV + 3) +#define SYS_SYSV_write (SYS_SYSV + 4) +#define SYS_SYSV_open (SYS_SYSV + 5) +#define SYS_SYSV_close (SYS_SYSV + 6) +#define SYS_SYSV_wait (SYS_SYSV + 7) +#define SYS_SYSV_creat (SYS_SYSV + 8) +#define SYS_SYSV_link (SYS_SYSV + 9) +#define SYS_SYSV_unlink (SYS_SYSV + 10) +#define SYS_SYSV_execv (SYS_SYSV + 11) +#define SYS_SYSV_chdir (SYS_SYSV + 12) +#define SYS_SYSV_time (SYS_SYSV + 13) +#define SYS_SYSV_mknod (SYS_SYSV + 14) +#define SYS_SYSV_chmod (SYS_SYSV + 15) +#define SYS_SYSV_chown (SYS_SYSV + 16) +#define SYS_SYSV_brk (SYS_SYSV + 17) +#define SYS_SYSV_stat (SYS_SYSV + 18) +#define SYS_SYSV_lseek (SYS_SYSV + 19) +#define SYS_SYSV_getpid (SYS_SYSV + 20) +#define SYS_SYSV_mount (SYS_SYSV + 21) +#define SYS_SYSV_umount (SYS_SYSV + 22) +#define SYS_SYSV_setuid (SYS_SYSV + 23) +#define SYS_SYSV_getuid (SYS_SYSV + 24) +#define SYS_SYSV_stime (SYS_SYSV + 25) +#define SYS_SYSV_ptrace (SYS_SYSV + 26) +#define SYS_SYSV_alarm (SYS_SYSV + 27) +#define SYS_SYSV_fstat (SYS_SYSV + 28) +#define SYS_SYSV_pause (SYS_SYSV + 29) +#define SYS_SYSV_utime (SYS_SYSV + 30) +#define SYS_SYSV_stty (SYS_SYSV + 31) +#define SYS_SYSV_gtty (SYS_SYSV + 32) +#define SYS_SYSV_access (SYS_SYSV + 33) +#define SYS_SYSV_nice (SYS_SYSV + 34) +#define SYS_SYSV_statfs (SYS_SYSV + 35) +#define SYS_SYSV_sync (SYS_SYSV + 36) +#define SYS_SYSV_kill (SYS_SYSV + 37) +#define SYS_SYSV_fstatfs (SYS_SYSV + 38) +#define SYS_SYSV_setpgrp (SYS_SYSV + 39) +#define SYS_SYSV_syssgi (SYS_SYSV + 40) +#define SYS_SYSV_dup (SYS_SYSV + 41) +#define SYS_SYSV_pipe (SYS_SYSV + 42) +#define SYS_SYSV_times (SYS_SYSV + 43) +#define SYS_SYSV_profil (SYS_SYSV + 44) +#define SYS_SYSV_plock (SYS_SYSV + 45) +#define SYS_SYSV_setgid (SYS_SYSV + 46) +#define SYS_SYSV_getgid (SYS_SYSV + 47) +#define SYS_SYSV_sig (SYS_SYSV + 48) +#define SYS_SYSV_msgsys (SYS_SYSV + 49) +#define SYS_SYSV_sysmips (SYS_SYSV + 50) +#define SYS_SYSV_acct (SYS_SYSV + 51) +#define SYS_SYSV_shmsys (SYS_SYSV + 52) +#define SYS_SYSV_semsys (SYS_SYSV + 53) +#define SYS_SYSV_ioctl (SYS_SYSV + 54) +#define SYS_SYSV_uadmin (SYS_SYSV + 55) +#define SYS_SYSV_sysmp (SYS_SYSV + 56) +#define SYS_SYSV_utssys (SYS_SYSV + 57) +#define SYS_SYSV_USG_reserved1 (SYS_SYSV + 58) +#define SYS_SYSV_execve (SYS_SYSV + 59) +#define SYS_SYSV_umask (SYS_SYSV + 60) +#define SYS_SYSV_chroot (SYS_SYSV + 61) +#define SYS_SYSV_fcntl (SYS_SYSV + 62) +#define SYS_SYSV_ulimit (SYS_SYSV + 63) +#define SYS_SYSV_SAFARI4_reserved1 (SYS_SYSV + 64) +#define SYS_SYSV_SAFARI4_reserved2 (SYS_SYSV + 65) +#define SYS_SYSV_SAFARI4_reserved3 (SYS_SYSV + 66) +#define SYS_SYSV_SAFARI4_reserved4 (SYS_SYSV + 67) +#define SYS_SYSV_SAFARI4_reserved5 (SYS_SYSV + 68) +#define SYS_SYSV_SAFARI4_reserved6 (SYS_SYSV + 69) +#define SYS_SYSV_advfs (SYS_SYSV + 70) +#define SYS_SYSV_unadvfs (SYS_SYSV + 71) +#define SYS_SYSV_rmount (SYS_SYSV + 72) +#define SYS_SYSV_rumount (SYS_SYSV + 73) +#define SYS_SYSV_rfstart (SYS_SYSV + 74) +#define SYS_SYSV_getrlimit64 (SYS_SYSV + 75) +#define SYS_SYSV_setrlimit64 (SYS_SYSV + 76) +#define SYS_SYSV_nanosleep (SYS_SYSV + 77) +#define SYS_SYSV_lseek64 (SYS_SYSV + 78) +#define SYS_SYSV_rmdir (SYS_SYSV + 79) +#define SYS_SYSV_mkdir (SYS_SYSV + 80) +#define SYS_SYSV_getdents (SYS_SYSV + 81) +#define SYS_SYSV_sginap (SYS_SYSV + 82) +#define SYS_SYSV_sgikopt (SYS_SYSV + 83) +#define SYS_SYSV_sysfs (SYS_SYSV + 84) +#define SYS_SYSV_getmsg (SYS_SYSV + 85) +#define SYS_SYSV_putmsg (SYS_SYSV + 86) +#define SYS_SYSV_poll (SYS_SYSV + 87) +#define SYS_SYSV_sigreturn (SYS_SYSV + 88) +#define SYS_SYSV_accept (SYS_SYSV + 89) +#define SYS_SYSV_bind (SYS_SYSV + 90) +#define SYS_SYSV_connect (SYS_SYSV + 91) +#define SYS_SYSV_gethostid (SYS_SYSV + 92) +#define SYS_SYSV_getpeername (SYS_SYSV + 93) +#define SYS_SYSV_getsockname (SYS_SYSV + 94) +#define SYS_SYSV_getsockopt (SYS_SYSV + 95) +#define SYS_SYSV_listen (SYS_SYSV + 96) +#define SYS_SYSV_recv (SYS_SYSV + 97) +#define SYS_SYSV_recvfrom (SYS_SYSV + 98) +#define SYS_SYSV_recvmsg (SYS_SYSV + 99) +#define SYS_SYSV_select (SYS_SYSV + 100) +#define SYS_SYSV_send (SYS_SYSV + 101) +#define SYS_SYSV_sendmsg (SYS_SYSV + 102) +#define SYS_SYSV_sendto (SYS_SYSV + 103) +#define SYS_SYSV_sethostid (SYS_SYSV + 104) +#define SYS_SYSV_setsockopt (SYS_SYSV + 105) +#define SYS_SYSV_shutdown (SYS_SYSV + 106) +#define SYS_SYSV_socket (SYS_SYSV + 107) +#define SYS_SYSV_gethostname (SYS_SYSV + 108) +#define SYS_SYSV_sethostname (SYS_SYSV + 109) +#define SYS_SYSV_getdomainname (SYS_SYSV + 110) +#define SYS_SYSV_setdomainname (SYS_SYSV + 111) +#define SYS_SYSV_truncate (SYS_SYSV + 112) +#define SYS_SYSV_ftruncate (SYS_SYSV + 113) +#define SYS_SYSV_rename (SYS_SYSV + 114) +#define SYS_SYSV_symlink (SYS_SYSV + 115) +#define SYS_SYSV_readlink (SYS_SYSV + 116) +#define SYS_SYSV_lstat (SYS_SYSV + 117) +#define SYS_SYSV_nfsmount (SYS_SYSV + 118) +#define SYS_SYSV_nfssvc (SYS_SYSV + 119) +#define SYS_SYSV_getfh (SYS_SYSV + 120) +#define SYS_SYSV_async_daemon (SYS_SYSV + 121) +#define SYS_SYSV_exportfs (SYS_SYSV + 122) +#define SYS_SYSV_setregid (SYS_SYSV + 123) +#define SYS_SYSV_setreuid (SYS_SYSV + 124) +#define SYS_SYSV_getitimer (SYS_SYSV + 125) +#define SYS_SYSV_setitimer (SYS_SYSV + 126) +#define SYS_SYSV_adjtime (SYS_SYSV + 127) +#define SYS_SYSV_BSD_getime (SYS_SYSV + 128) +#define SYS_SYSV_sproc (SYS_SYSV + 129) +#define SYS_SYSV_prctl (SYS_SYSV + 130) +#define SYS_SYSV_procblk (SYS_SYSV + 131) +#define SYS_SYSV_sprocsp (SYS_SYSV + 132) +#define SYS_SYSV_sgigsc (SYS_SYSV + 133) +#define SYS_SYSV_mmap (SYS_SYSV + 134) +#define SYS_SYSV_munmap (SYS_SYSV + 135) +#define SYS_SYSV_mprotect (SYS_SYSV + 136) +#define SYS_SYSV_msync (SYS_SYSV + 137) +#define SYS_SYSV_madvise (SYS_SYSV + 138) +#define SYS_SYSV_pagelock (SYS_SYSV + 139) +#define SYS_SYSV_getpagesize (SYS_SYSV + 140) +#define SYS_SYSV_quotactl (SYS_SYSV + 141) +#define SYS_SYSV_libdetach (SYS_SYSV + 142) +#define SYS_SYSV_BSDgetpgrp (SYS_SYSV + 143) +#define SYS_SYSV_BSDsetpgrp (SYS_SYSV + 144) +#define SYS_SYSV_vhangup (SYS_SYSV + 145) +#define SYS_SYSV_fsync (SYS_SYSV + 146) +#define SYS_SYSV_fchdir (SYS_SYSV + 147) +#define SYS_SYSV_getrlimit (SYS_SYSV + 148) +#define SYS_SYSV_setrlimit (SYS_SYSV + 149) +#define SYS_SYSV_cacheflush (SYS_SYSV + 150) +#define SYS_SYSV_cachectl (SYS_SYSV + 151) +#define SYS_SYSV_fchown (SYS_SYSV + 152) +#define SYS_SYSV_fchmod (SYS_SYSV + 153) +#define SYS_SYSV_wait3 (SYS_SYSV + 154) +#define SYS_SYSV_socketpair (SYS_SYSV + 155) +#define SYS_SYSV_sysinfo (SYS_SYSV + 156) +#define SYS_SYSV_nuname (SYS_SYSV + 157) +#define SYS_SYSV_xstat (SYS_SYSV + 158) +#define SYS_SYSV_lxstat (SYS_SYSV + 159) +#define SYS_SYSV_fxstat (SYS_SYSV + 160) +#define SYS_SYSV_xmknod (SYS_SYSV + 161) +#define SYS_SYSV_ksigaction (SYS_SYSV + 162) +#define SYS_SYSV_sigpending (SYS_SYSV + 163) +#define SYS_SYSV_sigprocmask (SYS_SYSV + 164) +#define SYS_SYSV_sigsuspend (SYS_SYSV + 165) +#define SYS_SYSV_sigpoll (SYS_SYSV + 166) +#define SYS_SYSV_swapctl (SYS_SYSV + 167) +#define SYS_SYSV_getcontext (SYS_SYSV + 168) +#define SYS_SYSV_setcontext (SYS_SYSV + 169) +#define SYS_SYSV_waitsys (SYS_SYSV + 170) +#define SYS_SYSV_sigstack (SYS_SYSV + 171) +#define SYS_SYSV_sigaltstack (SYS_SYSV + 172) +#define SYS_SYSV_sigsendset (SYS_SYSV + 173) +#define SYS_SYSV_statvfs (SYS_SYSV + 174) +#define SYS_SYSV_fstatvfs (SYS_SYSV + 175) +#define SYS_SYSV_getpmsg (SYS_SYSV + 176) +#define SYS_SYSV_putpmsg (SYS_SYSV + 177) +#define SYS_SYSV_lchown (SYS_SYSV + 178) +#define SYS_SYSV_priocntl (SYS_SYSV + 179) +#define SYS_SYSV_ksigqueue (SYS_SYSV + 180) +#define SYS_SYSV_readv (SYS_SYSV + 181) +#define SYS_SYSV_writev (SYS_SYSV + 182) +#define SYS_SYSV_truncate64 (SYS_SYSV + 183) +#define SYS_SYSV_ftruncate64 (SYS_SYSV + 184) +#define SYS_SYSV_mmap64 (SYS_SYSV + 185) +#define SYS_SYSV_dmi (SYS_SYSV + 186) +#define SYS_SYSV_pread (SYS_SYSV + 187) +#define SYS_SYSV_pwrite (SYS_SYSV + 188) + +/* + * BSD 4.3 syscalls are in the range from 2000 to 2999 + */ +#define SYS_BSD43 2000 +#define SYS_BSD43_syscall (SYS_BSD43 + 0) +#define SYS_BSD43_exit (SYS_BSD43 + 1) +#define SYS_BSD43_fork (SYS_BSD43 + 2) +#define SYS_BSD43_read (SYS_BSD43 + 3) +#define SYS_BSD43_write (SYS_BSD43 + 4) +#define SYS_BSD43_open (SYS_BSD43 + 5) +#define SYS_BSD43_close (SYS_BSD43 + 6) +#define SYS_BSD43_wait (SYS_BSD43 + 7) +#define SYS_BSD43_creat (SYS_BSD43 + 8) +#define SYS_BSD43_link (SYS_BSD43 + 9) +#define SYS_BSD43_unlink (SYS_BSD43 + 10) +#define SYS_BSD43_exec (SYS_BSD43 + 11) +#define SYS_BSD43_chdir (SYS_BSD43 + 12) +#define SYS_BSD43_time (SYS_BSD43 + 13) +#define SYS_BSD43_mknod (SYS_BSD43 + 14) +#define SYS_BSD43_chmod (SYS_BSD43 + 15) +#define SYS_BSD43_chown (SYS_BSD43 + 16) +#define SYS_BSD43_sbreak (SYS_BSD43 + 17) +#define SYS_BSD43_oldstat (SYS_BSD43 + 18) +#define SYS_BSD43_lseek (SYS_BSD43 + 19) +#define SYS_BSD43_getpid (SYS_BSD43 + 20) +#define SYS_BSD43_oldmount (SYS_BSD43 + 21) +#define SYS_BSD43_umount (SYS_BSD43 + 22) +#define SYS_BSD43_setuid (SYS_BSD43 + 23) +#define SYS_BSD43_getuid (SYS_BSD43 + 24) +#define SYS_BSD43_stime (SYS_BSD43 + 25) +#define SYS_BSD43_ptrace (SYS_BSD43 + 26) +#define SYS_BSD43_alarm (SYS_BSD43 + 27) +#define SYS_BSD43_oldfstat (SYS_BSD43 + 28) +#define SYS_BSD43_pause (SYS_BSD43 + 29) +#define SYS_BSD43_utime (SYS_BSD43 + 30) +#define SYS_BSD43_stty (SYS_BSD43 + 31) +#define SYS_BSD43_gtty (SYS_BSD43 + 32) +#define SYS_BSD43_access (SYS_BSD43 + 33) +#define SYS_BSD43_nice (SYS_BSD43 + 34) +#define SYS_BSD43_ftime (SYS_BSD43 + 35) +#define SYS_BSD43_sync (SYS_BSD43 + 36) +#define SYS_BSD43_kill (SYS_BSD43 + 37) +#define SYS_BSD43_stat (SYS_BSD43 + 38) +#define SYS_BSD43_oldsetpgrp (SYS_BSD43 + 39) +#define SYS_BSD43_lstat (SYS_BSD43 + 40) +#define SYS_BSD43_dup (SYS_BSD43 + 41) +#define SYS_BSD43_pipe (SYS_BSD43 + 42) +#define SYS_BSD43_times (SYS_BSD43 + 43) +#define SYS_BSD43_profil (SYS_BSD43 + 44) +#define SYS_BSD43_msgsys (SYS_BSD43 + 45) +#define SYS_BSD43_setgid (SYS_BSD43 + 46) +#define SYS_BSD43_getgid (SYS_BSD43 + 47) +#define SYS_BSD43_ssig (SYS_BSD43 + 48) +#define SYS_BSD43_reserved1 (SYS_BSD43 + 49) +#define SYS_BSD43_reserved2 (SYS_BSD43 + 50) +#define SYS_BSD43_sysacct (SYS_BSD43 + 51) +#define SYS_BSD43_phys (SYS_BSD43 + 52) +#define SYS_BSD43_lock (SYS_BSD43 + 53) +#define SYS_BSD43_ioctl (SYS_BSD43 + 54) +#define SYS_BSD43_reboot (SYS_BSD43 + 55) +#define SYS_BSD43_mpxchan (SYS_BSD43 + 56) +#define SYS_BSD43_symlink (SYS_BSD43 + 57) +#define SYS_BSD43_readlink (SYS_BSD43 + 58) +#define SYS_BSD43_execve (SYS_BSD43 + 59) +#define SYS_BSD43_umask (SYS_BSD43 + 60) +#define SYS_BSD43_chroot (SYS_BSD43 + 61) +#define SYS_BSD43_fstat (SYS_BSD43 + 62) +#define SYS_BSD43_reserved3 (SYS_BSD43 + 63) +#define SYS_BSD43_getpagesize (SYS_BSD43 + 64) +#define SYS_BSD43_mremap (SYS_BSD43 + 65) +#define SYS_BSD43_vfork (SYS_BSD43 + 66) +#define SYS_BSD43_vread (SYS_BSD43 + 67) +#define SYS_BSD43_vwrite (SYS_BSD43 + 68) +#define SYS_BSD43_sbrk (SYS_BSD43 + 69) +#define SYS_BSD43_sstk (SYS_BSD43 + 70) +#define SYS_BSD43_mmap (SYS_BSD43 + 71) +#define SYS_BSD43_vadvise (SYS_BSD43 + 72) +#define SYS_BSD43_munmap (SYS_BSD43 + 73) +#define SYS_BSD43_mprotect (SYS_BSD43 + 74) +#define SYS_BSD43_madvise (SYS_BSD43 + 75) +#define SYS_BSD43_vhangup (SYS_BSD43 + 76) +#define SYS_BSD43_vlimit (SYS_BSD43 + 77) +#define SYS_BSD43_mincore (SYS_BSD43 + 78) +#define SYS_BSD43_getgroups (SYS_BSD43 + 79) +#define SYS_BSD43_setgroups (SYS_BSD43 + 80) +#define SYS_BSD43_getpgrp (SYS_BSD43 + 81) +#define SYS_BSD43_setpgrp (SYS_BSD43 + 82) +#define SYS_BSD43_setitimer (SYS_BSD43 + 83) +#define SYS_BSD43_wait3 (SYS_BSD43 + 84) +#define SYS_BSD43_swapon (SYS_BSD43 + 85) +#define SYS_BSD43_getitimer (SYS_BSD43 + 86) +#define SYS_BSD43_gethostname (SYS_BSD43 + 87) +#define SYS_BSD43_sethostname (SYS_BSD43 + 88) +#define SYS_BSD43_getdtablesize (SYS_BSD43 + 89) +#define SYS_BSD43_dup2 (SYS_BSD43 + 90) +#define SYS_BSD43_getdopt (SYS_BSD43 + 91) +#define SYS_BSD43_fcntl (SYS_BSD43 + 92) +#define SYS_BSD43_select (SYS_BSD43 + 93) +#define SYS_BSD43_setdopt (SYS_BSD43 + 94) +#define SYS_BSD43_fsync (SYS_BSD43 + 95) +#define SYS_BSD43_setpriority (SYS_BSD43 + 96) +#define SYS_BSD43_socket (SYS_BSD43 + 97) +#define SYS_BSD43_connect (SYS_BSD43 + 98) +#define SYS_BSD43_oldaccept (SYS_BSD43 + 99) +#define SYS_BSD43_getpriority (SYS_BSD43 + 100) +#define SYS_BSD43_send (SYS_BSD43 + 101) +#define SYS_BSD43_recv (SYS_BSD43 + 102) +#define SYS_BSD43_sigreturn (SYS_BSD43 + 103) +#define SYS_BSD43_bind (SYS_BSD43 + 104) +#define SYS_BSD43_setsockopt (SYS_BSD43 + 105) +#define SYS_BSD43_listen (SYS_BSD43 + 106) +#define SYS_BSD43_vtimes (SYS_BSD43 + 107) +#define SYS_BSD43_sigvec (SYS_BSD43 + 108) +#define SYS_BSD43_sigblock (SYS_BSD43 + 109) +#define SYS_BSD43_sigsetmask (SYS_BSD43 + 110) +#define SYS_BSD43_sigpause (SYS_BSD43 + 111) +#define SYS_BSD43_sigstack (SYS_BSD43 + 112) +#define SYS_BSD43_oldrecvmsg (SYS_BSD43 + 113) +#define SYS_BSD43_oldsendmsg (SYS_BSD43 + 114) +#define SYS_BSD43_vtrace (SYS_BSD43 + 115) +#define SYS_BSD43_gettimeofday (SYS_BSD43 + 116) +#define SYS_BSD43_getrusage (SYS_BSD43 + 117) +#define SYS_BSD43_getsockopt (SYS_BSD43 + 118) +#define SYS_BSD43_reserved4 (SYS_BSD43 + 119) +#define SYS_BSD43_readv (SYS_BSD43 + 120) +#define SYS_BSD43_writev (SYS_BSD43 + 121) +#define SYS_BSD43_settimeofday (SYS_BSD43 + 122) +#define SYS_BSD43_fchown (SYS_BSD43 + 123) +#define SYS_BSD43_fchmod (SYS_BSD43 + 124) +#define SYS_BSD43_oldrecvfrom (SYS_BSD43 + 125) +#define SYS_BSD43_setreuid (SYS_BSD43 + 126) +#define SYS_BSD43_setregid (SYS_BSD43 + 127) +#define SYS_BSD43_rename (SYS_BSD43 + 128) +#define SYS_BSD43_truncate (SYS_BSD43 + 129) +#define SYS_BSD43_ftruncate (SYS_BSD43 + 130) +#define SYS_BSD43_flock (SYS_BSD43 + 131) +#define SYS_BSD43_semsys (SYS_BSD43 + 132) +#define SYS_BSD43_sendto (SYS_BSD43 + 133) +#define SYS_BSD43_shutdown (SYS_BSD43 + 134) +#define SYS_BSD43_socketpair (SYS_BSD43 + 135) +#define SYS_BSD43_mkdir (SYS_BSD43 + 136) +#define SYS_BSD43_rmdir (SYS_BSD43 + 137) +#define SYS_BSD43_utimes (SYS_BSD43 + 138) +#define SYS_BSD43_sigcleanup (SYS_BSD43 + 139) +#define SYS_BSD43_adjtime (SYS_BSD43 + 140) +#define SYS_BSD43_oldgetpeername (SYS_BSD43 + 141) +#define SYS_BSD43_gethostid (SYS_BSD43 + 142) +#define SYS_BSD43_sethostid (SYS_BSD43 + 143) +#define SYS_BSD43_getrlimit (SYS_BSD43 + 144) +#define SYS_BSD43_setrlimit (SYS_BSD43 + 145) +#define SYS_BSD43_killpg (SYS_BSD43 + 146) +#define SYS_BSD43_shmsys (SYS_BSD43 + 147) +#define SYS_BSD43_quota (SYS_BSD43 + 148) +#define SYS_BSD43_qquota (SYS_BSD43 + 149) +#define SYS_BSD43_oldgetsockname (SYS_BSD43 + 150) +#define SYS_BSD43_sysmips (SYS_BSD43 + 151) +#define SYS_BSD43_cacheflush (SYS_BSD43 + 152) +#define SYS_BSD43_cachectl (SYS_BSD43 + 153) +#define SYS_BSD43_debug (SYS_BSD43 + 154) +#define SYS_BSD43_reserved5 (SYS_BSD43 + 155) +#define SYS_BSD43_reserved6 (SYS_BSD43 + 156) +#define SYS_BSD43_nfs_mount (SYS_BSD43 + 157) +#define SYS_BSD43_nfs_svc (SYS_BSD43 + 158) +#define SYS_BSD43_getdirentries (SYS_BSD43 + 159) +#define SYS_BSD43_statfs (SYS_BSD43 + 160) +#define SYS_BSD43_fstatfs (SYS_BSD43 + 161) +#define SYS_BSD43_unmount (SYS_BSD43 + 162) +#define SYS_BSD43_async_daemon (SYS_BSD43 + 163) +#define SYS_BSD43_nfs_getfh (SYS_BSD43 + 164) +#define SYS_BSD43_getdomainname (SYS_BSD43 + 165) +#define SYS_BSD43_setdomainname (SYS_BSD43 + 166) +#define SYS_BSD43_pcfs_mount (SYS_BSD43 + 167) +#define SYS_BSD43_quotactl (SYS_BSD43 + 168) +#define SYS_BSD43_oldexportfs (SYS_BSD43 + 169) +#define SYS_BSD43_smount (SYS_BSD43 + 170) +#define SYS_BSD43_mipshwconf (SYS_BSD43 + 171) +#define SYS_BSD43_exportfs (SYS_BSD43 + 172) +#define SYS_BSD43_nfsfh_open (SYS_BSD43 + 173) +#define SYS_BSD43_libattach (SYS_BSD43 + 174) +#define SYS_BSD43_libdetach (SYS_BSD43 + 175) +#define SYS_BSD43_accept (SYS_BSD43 + 176) +#define SYS_BSD43_reserved7 (SYS_BSD43 + 177) +#define SYS_BSD43_reserved8 (SYS_BSD43 + 178) +#define SYS_BSD43_recvmsg (SYS_BSD43 + 179) +#define SYS_BSD43_recvfrom (SYS_BSD43 + 180) +#define SYS_BSD43_sendmsg (SYS_BSD43 + 181) +#define SYS_BSD43_getpeername (SYS_BSD43 + 182) +#define SYS_BSD43_getsockname (SYS_BSD43 + 183) +#define SYS_BSD43_aread (SYS_BSD43 + 184) +#define SYS_BSD43_awrite (SYS_BSD43 + 185) +#define SYS_BSD43_listio (SYS_BSD43 + 186) +#define SYS_BSD43_acancel (SYS_BSD43 + 187) +#define SYS_BSD43_astatus (SYS_BSD43 + 188) +#define SYS_BSD43_await (SYS_BSD43 + 189) +#define SYS_BSD43_areadv (SYS_BSD43 + 190) +#define SYS_BSD43_awritev (SYS_BSD43 + 191) + +/* + * POSIX syscalls are in the range from 3000 to 3999 + */ +#define SYS_POSIX 3000 +#define SYS_POSIX_syscall (SYS_POSIX + 0) +#define SYS_POSIX_exit (SYS_POSIX + 1) +#define SYS_POSIX_fork (SYS_POSIX + 2) +#define SYS_POSIX_read (SYS_POSIX + 3) +#define SYS_POSIX_write (SYS_POSIX + 4) +#define SYS_POSIX_open (SYS_POSIX + 5) +#define SYS_POSIX_close (SYS_POSIX + 6) +#define SYS_POSIX_wait (SYS_POSIX + 7) +#define SYS_POSIX_creat (SYS_POSIX + 8) +#define SYS_POSIX_link (SYS_POSIX + 9) +#define SYS_POSIX_unlink (SYS_POSIX + 10) +#define SYS_POSIX_exec (SYS_POSIX + 11) +#define SYS_POSIX_chdir (SYS_POSIX + 12) +#define SYS_POSIX_gtime (SYS_POSIX + 13) +#define SYS_POSIX_mknod (SYS_POSIX + 14) +#define SYS_POSIX_chmod (SYS_POSIX + 15) +#define SYS_POSIX_chown (SYS_POSIX + 16) +#define SYS_POSIX_sbreak (SYS_POSIX + 17) +#define SYS_POSIX_stat (SYS_POSIX + 18) +#define SYS_POSIX_lseek (SYS_POSIX + 19) +#define SYS_POSIX_getpid (SYS_POSIX + 20) +#define SYS_POSIX_mount (SYS_POSIX + 21) +#define SYS_POSIX_umount (SYS_POSIX + 22) +#define SYS_POSIX_setuid (SYS_POSIX + 23) +#define SYS_POSIX_getuid (SYS_POSIX + 24) +#define SYS_POSIX_stime (SYS_POSIX + 25) +#define SYS_POSIX_ptrace (SYS_POSIX + 26) +#define SYS_POSIX_alarm (SYS_POSIX + 27) +#define SYS_POSIX_fstat (SYS_POSIX + 28) +#define SYS_POSIX_pause (SYS_POSIX + 29) +#define SYS_POSIX_utime (SYS_POSIX + 30) +#define SYS_POSIX_stty (SYS_POSIX + 31) +#define SYS_POSIX_gtty (SYS_POSIX + 32) +#define SYS_POSIX_access (SYS_POSIX + 33) +#define SYS_POSIX_nice (SYS_POSIX + 34) +#define SYS_POSIX_statfs (SYS_POSIX + 35) +#define SYS_POSIX_sync (SYS_POSIX + 36) +#define SYS_POSIX_kill (SYS_POSIX + 37) +#define SYS_POSIX_fstatfs (SYS_POSIX + 38) +#define SYS_POSIX_getpgrp (SYS_POSIX + 39) +#define SYS_POSIX_syssgi (SYS_POSIX + 40) +#define SYS_POSIX_dup (SYS_POSIX + 41) +#define SYS_POSIX_pipe (SYS_POSIX + 42) +#define SYS_POSIX_times (SYS_POSIX + 43) +#define SYS_POSIX_profil (SYS_POSIX + 44) +#define SYS_POSIX_lock (SYS_POSIX + 45) +#define SYS_POSIX_setgid (SYS_POSIX + 46) +#define SYS_POSIX_getgid (SYS_POSIX + 47) +#define SYS_POSIX_sig (SYS_POSIX + 48) +#define SYS_POSIX_msgsys (SYS_POSIX + 49) +#define SYS_POSIX_sysmips (SYS_POSIX + 50) +#define SYS_POSIX_sysacct (SYS_POSIX + 51) +#define SYS_POSIX_shmsys (SYS_POSIX + 52) +#define SYS_POSIX_semsys (SYS_POSIX + 53) +#define SYS_POSIX_ioctl (SYS_POSIX + 54) +#define SYS_POSIX_uadmin (SYS_POSIX + 55) +#define SYS_POSIX_exch (SYS_POSIX + 56) +#define SYS_POSIX_utssys (SYS_POSIX + 57) +#define SYS_POSIX_USG_reserved1 (SYS_POSIX + 58) +#define SYS_POSIX_exece (SYS_POSIX + 59) +#define SYS_POSIX_umask (SYS_POSIX + 60) +#define SYS_POSIX_chroot (SYS_POSIX + 61) +#define SYS_POSIX_fcntl (SYS_POSIX + 62) +#define SYS_POSIX_ulimit (SYS_POSIX + 63) +#define SYS_POSIX_SAFARI4_reserved1 (SYS_POSIX + 64) +#define SYS_POSIX_SAFARI4_reserved2 (SYS_POSIX + 65) +#define SYS_POSIX_SAFARI4_reserved3 (SYS_POSIX + 66) +#define SYS_POSIX_SAFARI4_reserved4 (SYS_POSIX + 67) +#define SYS_POSIX_SAFARI4_reserved5 (SYS_POSIX + 68) +#define SYS_POSIX_SAFARI4_reserved6 (SYS_POSIX + 69) +#define SYS_POSIX_advfs (SYS_POSIX + 70) +#define SYS_POSIX_unadvfs (SYS_POSIX + 71) +#define SYS_POSIX_rmount (SYS_POSIX + 72) +#define SYS_POSIX_rumount (SYS_POSIX + 73) +#define SYS_POSIX_rfstart (SYS_POSIX + 74) +#define SYS_POSIX_reserved1 (SYS_POSIX + 75) +#define SYS_POSIX_rdebug (SYS_POSIX + 76) +#define SYS_POSIX_rfstop (SYS_POSIX + 77) +#define SYS_POSIX_rfsys (SYS_POSIX + 78) +#define SYS_POSIX_rmdir (SYS_POSIX + 79) +#define SYS_POSIX_mkdir (SYS_POSIX + 80) +#define SYS_POSIX_getdents (SYS_POSIX + 81) +#define SYS_POSIX_sginap (SYS_POSIX + 82) +#define SYS_POSIX_sgikopt (SYS_POSIX + 83) +#define SYS_POSIX_sysfs (SYS_POSIX + 84) +#define SYS_POSIX_getmsg (SYS_POSIX + 85) +#define SYS_POSIX_putmsg (SYS_POSIX + 86) +#define SYS_POSIX_poll (SYS_POSIX + 87) +#define SYS_POSIX_sigreturn (SYS_POSIX + 88) +#define SYS_POSIX_accept (SYS_POSIX + 89) +#define SYS_POSIX_bind (SYS_POSIX + 90) +#define SYS_POSIX_connect (SYS_POSIX + 91) +#define SYS_POSIX_gethostid (SYS_POSIX + 92) +#define SYS_POSIX_getpeername (SYS_POSIX + 93) +#define SYS_POSIX_getsockname (SYS_POSIX + 94) +#define SYS_POSIX_getsockopt (SYS_POSIX + 95) +#define SYS_POSIX_listen (SYS_POSIX + 96) +#define SYS_POSIX_recv (SYS_POSIX + 97) +#define SYS_POSIX_recvfrom (SYS_POSIX + 98) +#define SYS_POSIX_recvmsg (SYS_POSIX + 99) +#define SYS_POSIX_select (SYS_POSIX + 100) +#define SYS_POSIX_send (SYS_POSIX + 101) +#define SYS_POSIX_sendmsg (SYS_POSIX + 102) +#define SYS_POSIX_sendto (SYS_POSIX + 103) +#define SYS_POSIX_sethostid (SYS_POSIX + 104) +#define SYS_POSIX_setsockopt (SYS_POSIX + 105) +#define SYS_POSIX_shutdown (SYS_POSIX + 106) +#define SYS_POSIX_socket (SYS_POSIX + 107) +#define SYS_POSIX_gethostname (SYS_POSIX + 108) +#define SYS_POSIX_sethostname (SYS_POSIX + 109) +#define SYS_POSIX_getdomainname (SYS_POSIX + 110) +#define SYS_POSIX_setdomainname (SYS_POSIX + 111) +#define SYS_POSIX_truncate (SYS_POSIX + 112) +#define SYS_POSIX_ftruncate (SYS_POSIX + 113) +#define SYS_POSIX_rename (SYS_POSIX + 114) +#define SYS_POSIX_symlink (SYS_POSIX + 115) +#define SYS_POSIX_readlink (SYS_POSIX + 116) +#define SYS_POSIX_lstat (SYS_POSIX + 117) +#define SYS_POSIX_nfs_mount (SYS_POSIX + 118) +#define SYS_POSIX_nfs_svc (SYS_POSIX + 119) +#define SYS_POSIX_nfs_getfh (SYS_POSIX + 120) +#define SYS_POSIX_async_daemon (SYS_POSIX + 121) +#define SYS_POSIX_exportfs (SYS_POSIX + 122) +#define SYS_POSIX_SGI_setregid (SYS_POSIX + 123) +#define SYS_POSIX_SGI_setreuid (SYS_POSIX + 124) +#define SYS_POSIX_getitimer (SYS_POSIX + 125) +#define SYS_POSIX_setitimer (SYS_POSIX + 126) +#define SYS_POSIX_adjtime (SYS_POSIX + 127) +#define SYS_POSIX_SGI_bsdgettime (SYS_POSIX + 128) +#define SYS_POSIX_SGI_sproc (SYS_POSIX + 129) +#define SYS_POSIX_SGI_prctl (SYS_POSIX + 130) +#define SYS_POSIX_SGI_blkproc (SYS_POSIX + 131) +#define SYS_POSIX_SGI_reserved1 (SYS_POSIX + 132) +#define SYS_POSIX_SGI_sgigsc (SYS_POSIX + 133) +#define SYS_POSIX_SGI_mmap (SYS_POSIX + 134) +#define SYS_POSIX_SGI_munmap (SYS_POSIX + 135) +#define SYS_POSIX_SGI_mprotect (SYS_POSIX + 136) +#define SYS_POSIX_SGI_msync (SYS_POSIX + 137) +#define SYS_POSIX_SGI_madvise (SYS_POSIX + 138) +#define SYS_POSIX_SGI_mpin (SYS_POSIX + 139) +#define SYS_POSIX_SGI_getpagesize (SYS_POSIX + 140) +#define SYS_POSIX_SGI_libattach (SYS_POSIX + 141) +#define SYS_POSIX_SGI_libdetach (SYS_POSIX + 142) +#define SYS_POSIX_SGI_getpgrp (SYS_POSIX + 143) +#define SYS_POSIX_SGI_setpgrp (SYS_POSIX + 144) +#define SYS_POSIX_SGI_reserved2 (SYS_POSIX + 145) +#define SYS_POSIX_SGI_reserved3 (SYS_POSIX + 146) +#define SYS_POSIX_SGI_reserved4 (SYS_POSIX + 147) +#define SYS_POSIX_SGI_reserved5 (SYS_POSIX + 148) +#define SYS_POSIX_SGI_reserved6 (SYS_POSIX + 149) +#define SYS_POSIX_cacheflush (SYS_POSIX + 150) +#define SYS_POSIX_cachectl (SYS_POSIX + 151) +#define SYS_POSIX_fchown (SYS_POSIX + 152) +#define SYS_POSIX_fchmod (SYS_POSIX + 153) +#define SYS_POSIX_wait3 (SYS_POSIX + 154) +#define SYS_POSIX_mmap (SYS_POSIX + 155) +#define SYS_POSIX_munmap (SYS_POSIX + 156) +#define SYS_POSIX_madvise (SYS_POSIX + 157) +#define SYS_POSIX_BSD_getpagesize (SYS_POSIX + 158) +#define SYS_POSIX_setreuid (SYS_POSIX + 159) +#define SYS_POSIX_setregid (SYS_POSIX + 160) +#define SYS_POSIX_setpgid (SYS_POSIX + 161) +#define SYS_POSIX_getgroups (SYS_POSIX + 162) +#define SYS_POSIX_setgroups (SYS_POSIX + 163) +#define SYS_POSIX_gettimeofday (SYS_POSIX + 164) +#define SYS_POSIX_getrusage (SYS_POSIX + 165) +#define SYS_POSIX_getrlimit (SYS_POSIX + 166) +#define SYS_POSIX_setrlimit (SYS_POSIX + 167) +#define SYS_POSIX_waitpid (SYS_POSIX + 168) +#define SYS_POSIX_dup2 (SYS_POSIX + 169) +#define SYS_POSIX_reserved2 (SYS_POSIX + 170) +#define SYS_POSIX_reserved3 (SYS_POSIX + 171) +#define SYS_POSIX_reserved4 (SYS_POSIX + 172) +#define SYS_POSIX_reserved5 (SYS_POSIX + 173) +#define SYS_POSIX_reserved6 (SYS_POSIX + 174) +#define SYS_POSIX_reserved7 (SYS_POSIX + 175) +#define SYS_POSIX_reserved8 (SYS_POSIX + 176) +#define SYS_POSIX_reserved9 (SYS_POSIX + 177) +#define SYS_POSIX_reserved10 (SYS_POSIX + 178) +#define SYS_POSIX_reserved11 (SYS_POSIX + 179) +#define SYS_POSIX_reserved12 (SYS_POSIX + 180) +#define SYS_POSIX_reserved13 (SYS_POSIX + 181) +#define SYS_POSIX_reserved14 (SYS_POSIX + 182) +#define SYS_POSIX_reserved15 (SYS_POSIX + 183) +#define SYS_POSIX_reserved16 (SYS_POSIX + 184) +#define SYS_POSIX_reserved17 (SYS_POSIX + 185) +#define SYS_POSIX_reserved18 (SYS_POSIX + 186) +#define SYS_POSIX_reserved19 (SYS_POSIX + 187) +#define SYS_POSIX_reserved20 (SYS_POSIX + 188) +#define SYS_POSIX_reserved21 (SYS_POSIX + 189) +#define SYS_POSIX_reserved22 (SYS_POSIX + 190) +#define SYS_POSIX_reserved23 (SYS_POSIX + 191) +#define SYS_POSIX_reserved24 (SYS_POSIX + 192) +#define SYS_POSIX_reserved25 (SYS_POSIX + 193) +#define SYS_POSIX_reserved26 (SYS_POSIX + 194) +#define SYS_POSIX_reserved27 (SYS_POSIX + 195) +#define SYS_POSIX_reserved28 (SYS_POSIX + 196) +#define SYS_POSIX_reserved29 (SYS_POSIX + 197) +#define SYS_POSIX_reserved30 (SYS_POSIX + 198) +#define SYS_POSIX_reserved31 (SYS_POSIX + 199) +#define SYS_POSIX_reserved32 (SYS_POSIX + 200) +#define SYS_POSIX_reserved33 (SYS_POSIX + 201) +#define SYS_POSIX_reserved34 (SYS_POSIX + 202) +#define SYS_POSIX_reserved35 (SYS_POSIX + 203) +#define SYS_POSIX_reserved36 (SYS_POSIX + 204) +#define SYS_POSIX_reserved37 (SYS_POSIX + 205) +#define SYS_POSIX_reserved38 (SYS_POSIX + 206) +#define SYS_POSIX_reserved39 (SYS_POSIX + 207) +#define SYS_POSIX_reserved40 (SYS_POSIX + 208) +#define SYS_POSIX_reserved41 (SYS_POSIX + 209) +#define SYS_POSIX_reserved42 (SYS_POSIX + 210) +#define SYS_POSIX_reserved43 (SYS_POSIX + 211) +#define SYS_POSIX_reserved44 (SYS_POSIX + 212) +#define SYS_POSIX_reserved45 (SYS_POSIX + 213) +#define SYS_POSIX_reserved46 (SYS_POSIX + 214) +#define SYS_POSIX_reserved47 (SYS_POSIX + 215) +#define SYS_POSIX_reserved48 (SYS_POSIX + 216) +#define SYS_POSIX_reserved49 (SYS_POSIX + 217) +#define SYS_POSIX_reserved50 (SYS_POSIX + 218) +#define SYS_POSIX_reserved51 (SYS_POSIX + 219) +#define SYS_POSIX_reserved52 (SYS_POSIX + 220) +#define SYS_POSIX_reserved53 (SYS_POSIX + 221) +#define SYS_POSIX_reserved54 (SYS_POSIX + 222) +#define SYS_POSIX_reserved55 (SYS_POSIX + 223) +#define SYS_POSIX_reserved56 (SYS_POSIX + 224) +#define SYS_POSIX_reserved57 (SYS_POSIX + 225) +#define SYS_POSIX_reserved58 (SYS_POSIX + 226) +#define SYS_POSIX_reserved59 (SYS_POSIX + 227) +#define SYS_POSIX_reserved60 (SYS_POSIX + 228) +#define SYS_POSIX_reserved61 (SYS_POSIX + 229) +#define SYS_POSIX_reserved62 (SYS_POSIX + 230) +#define SYS_POSIX_reserved63 (SYS_POSIX + 231) +#define SYS_POSIX_reserved64 (SYS_POSIX + 232) +#define SYS_POSIX_reserved65 (SYS_POSIX + 233) +#define SYS_POSIX_reserved66 (SYS_POSIX + 234) +#define SYS_POSIX_reserved67 (SYS_POSIX + 235) +#define SYS_POSIX_reserved68 (SYS_POSIX + 236) +#define SYS_POSIX_reserved69 (SYS_POSIX + 237) +#define SYS_POSIX_reserved70 (SYS_POSIX + 238) +#define SYS_POSIX_reserved71 (SYS_POSIX + 239) +#define SYS_POSIX_reserved72 (SYS_POSIX + 240) +#define SYS_POSIX_reserved73 (SYS_POSIX + 241) +#define SYS_POSIX_reserved74 (SYS_POSIX + 242) +#define SYS_POSIX_reserved75 (SYS_POSIX + 243) +#define SYS_POSIX_reserved76 (SYS_POSIX + 244) +#define SYS_POSIX_reserved77 (SYS_POSIX + 245) +#define SYS_POSIX_reserved78 (SYS_POSIX + 246) +#define SYS_POSIX_reserved79 (SYS_POSIX + 247) +#define SYS_POSIX_reserved80 (SYS_POSIX + 248) +#define SYS_POSIX_reserved81 (SYS_POSIX + 249) +#define SYS_POSIX_reserved82 (SYS_POSIX + 250) +#define SYS_POSIX_reserved83 (SYS_POSIX + 251) +#define SYS_POSIX_reserved84 (SYS_POSIX + 252) +#define SYS_POSIX_reserved85 (SYS_POSIX + 253) +#define SYS_POSIX_reserved86 (SYS_POSIX + 254) +#define SYS_POSIX_reserved87 (SYS_POSIX + 255) +#define SYS_POSIX_reserved88 (SYS_POSIX + 256) +#define SYS_POSIX_reserved89 (SYS_POSIX + 257) +#define SYS_POSIX_reserved90 (SYS_POSIX + 258) +#define SYS_POSIX_reserved91 (SYS_POSIX + 259) +#define SYS_POSIX_netboot (SYS_POSIX + 260) +#define SYS_POSIX_netunboot (SYS_POSIX + 261) +#define SYS_POSIX_rdump (SYS_POSIX + 262) +#define SYS_POSIX_setsid (SYS_POSIX + 263) +#define SYS_POSIX_getmaxsig (SYS_POSIX + 264) +#define SYS_POSIX_sigpending (SYS_POSIX + 265) +#define SYS_POSIX_sigprocmask (SYS_POSIX + 266) +#define SYS_POSIX_sigsuspend (SYS_POSIX + 267) +#define SYS_POSIX_sigaction (SYS_POSIX + 268) +#define SYS_POSIX_MIPS_reserved1 (SYS_POSIX + 269) +#define SYS_POSIX_MIPS_reserved2 (SYS_POSIX + 270) +#define SYS_POSIX_MIPS_reserved3 (SYS_POSIX + 271) +#define SYS_POSIX_MIPS_reserved4 (SYS_POSIX + 272) +#define SYS_POSIX_MIPS_reserved5 (SYS_POSIX + 273) +#define SYS_POSIX_MIPS_reserved6 (SYS_POSIX + 274) +#define SYS_POSIX_MIPS_reserved7 (SYS_POSIX + 275) +#define SYS_POSIX_MIPS_reserved8 (SYS_POSIX + 276) +#define SYS_POSIX_MIPS_reserved9 (SYS_POSIX + 277) +#define SYS_POSIX_MIPS_reserved10 (SYS_POSIX + 278) +#define SYS_POSIX_MIPS_reserved11 (SYS_POSIX + 279) +#define SYS_POSIX_TANDEM_reserved1 (SYS_POSIX + 280) +#define SYS_POSIX_TANDEM_reserved2 (SYS_POSIX + 281) +#define SYS_POSIX_TANDEM_reserved3 (SYS_POSIX + 282) +#define SYS_POSIX_TANDEM_reserved4 (SYS_POSIX + 283) +#define SYS_POSIX_TANDEM_reserved5 (SYS_POSIX + 284) +#define SYS_POSIX_TANDEM_reserved6 (SYS_POSIX + 285) +#define SYS_POSIX_TANDEM_reserved7 (SYS_POSIX + 286) +#define SYS_POSIX_TANDEM_reserved8 (SYS_POSIX + 287) +#define SYS_POSIX_TANDEM_reserved9 (SYS_POSIX + 288) +#define SYS_POSIX_TANDEM_reserved10 (SYS_POSIX + 289) +#define SYS_POSIX_TANDEM_reserved11 (SYS_POSIX + 290) +#define SYS_POSIX_TANDEM_reserved12 (SYS_POSIX + 291) +#define SYS_POSIX_TANDEM_reserved13 (SYS_POSIX + 292) +#define SYS_POSIX_TANDEM_reserved14 (SYS_POSIX + 293) +#define SYS_POSIX_TANDEM_reserved15 (SYS_POSIX + 294) +#define SYS_POSIX_TANDEM_reserved16 (SYS_POSIX + 295) +#define SYS_POSIX_TANDEM_reserved17 (SYS_POSIX + 296) +#define SYS_POSIX_TANDEM_reserved18 (SYS_POSIX + 297) +#define SYS_POSIX_TANDEM_reserved19 (SYS_POSIX + 298) +#define SYS_POSIX_TANDEM_reserved20 (SYS_POSIX + 299) +#define SYS_POSIX_SGI_reserved7 (SYS_POSIX + 300) +#define SYS_POSIX_SGI_reserved8 (SYS_POSIX + 301) +#define SYS_POSIX_SGI_reserved9 (SYS_POSIX + 302) +#define SYS_POSIX_SGI_reserved10 (SYS_POSIX + 303) +#define SYS_POSIX_SGI_reserved11 (SYS_POSIX + 304) +#define SYS_POSIX_SGI_reserved12 (SYS_POSIX + 305) +#define SYS_POSIX_SGI_reserved13 (SYS_POSIX + 306) +#define SYS_POSIX_SGI_reserved14 (SYS_POSIX + 307) +#define SYS_POSIX_SGI_reserved15 (SYS_POSIX + 308) +#define SYS_POSIX_SGI_reserved16 (SYS_POSIX + 309) +#define SYS_POSIX_SGI_reserved17 (SYS_POSIX + 310) +#define SYS_POSIX_SGI_reserved18 (SYS_POSIX + 311) +#define SYS_POSIX_SGI_reserved19 (SYS_POSIX + 312) +#define SYS_POSIX_SGI_reserved20 (SYS_POSIX + 313) +#define SYS_POSIX_SGI_reserved21 (SYS_POSIX + 314) +#define SYS_POSIX_SGI_reserved22 (SYS_POSIX + 315) +#define SYS_POSIX_SGI_reserved23 (SYS_POSIX + 316) +#define SYS_POSIX_SGI_reserved24 (SYS_POSIX + 317) +#define SYS_POSIX_SGI_reserved25 (SYS_POSIX + 318) +#define SYS_POSIX_SGI_reserved26 (SYS_POSIX + 319) + +/* + * Linux syscalls are in the range from 4000 to 4999 + * Hopefully these syscall numbers are unused ... If not everyone using + * statically linked binaries is pretty . You've + * been warned. + */ +#define SYS_Linux 4000 +#define SYS_syscall (SYS_Linux + 0) +#define SYS_exit (SYS_Linux + 1) +#define SYS_fork (SYS_Linux + 2) +#define SYS_read (SYS_Linux + 3) +#define SYS_write (SYS_Linux + 4) +#define SYS_open (SYS_Linux + 5) +#define SYS_close (SYS_Linux + 6) +#define SYS_waitpid (SYS_Linux + 7) +#define SYS_creat (SYS_Linux + 8) +#define SYS_link (SYS_Linux + 9) +#define SYS_unlink (SYS_Linux + 10) +#define SYS_execve (SYS_Linux + 11) +#define SYS_chdir (SYS_Linux + 12) +#define SYS_time (SYS_Linux + 13) +#define SYS_mknod (SYS_Linux + 14) +#define SYS_chmod (SYS_Linux + 15) +#define SYS_chown (SYS_Linux + 16) +#define SYS_break (SYS_Linux + 17) +#define SYS_oldstat (SYS_Linux + 18) +#define SYS_lseek (SYS_Linux + 19) +#define SYS_getpid (SYS_Linux + 20) +#define SYS_mount (SYS_Linux + 21) +#define SYS_umount (SYS_Linux + 22) +#define SYS_setuid (SYS_Linux + 23) +#define SYS_getuid (SYS_Linux + 24) +#define SYS_stime (SYS_Linux + 25) +#define SYS_ptrace (SYS_Linux + 26) +#define SYS_alarm (SYS_Linux + 27) +#define SYS_oldfstat (SYS_Linux + 28) +#define SYS_pause (SYS_Linux + 29) +#define SYS_utime (SYS_Linux + 30) +#define SYS_stty (SYS_Linux + 31) +#define SYS_gtty (SYS_Linux + 32) +#define SYS_access (SYS_Linux + 33) +#define SYS_nice (SYS_Linux + 34) +#define SYS_ftime (SYS_Linux + 35) +#define SYS_sync (SYS_Linux + 36) +#define SYS_kill (SYS_Linux + 37) +#define SYS_rename (SYS_Linux + 38) +#define SYS_mkdir (SYS_Linux + 39) +#define SYS_rmdir (SYS_Linux + 40) +#define SYS_dup (SYS_Linux + 41) +#define SYS_pipe (SYS_Linux + 42) +#define SYS_times (SYS_Linux + 43) +#define SYS_prof (SYS_Linux + 44) +#define SYS_brk (SYS_Linux + 45) +#define SYS_setgid (SYS_Linux + 46) +#define SYS_getgid (SYS_Linux + 47) +#define SYS_signal (SYS_Linux + 48) +#define SYS_geteuid (SYS_Linux + 49) +#define SYS_getegid (SYS_Linux + 50) +#define SYS_acct (SYS_Linux + 51) +#define SYS_phys (SYS_Linux + 52) +#define SYS_lock (SYS_Linux + 53) +#define SYS_ioctl (SYS_Linux + 54) +#define SYS_fcntl (SYS_Linux + 55) +#define SYS_mpx (SYS_Linux + 56) +#define SYS_setpgid (SYS_Linux + 57) +#define SYS_ulimit (SYS_Linux + 58) +#define SYS_oldolduname (SYS_Linux + 59) +#define SYS_umask (SYS_Linux + 60) +#define SYS_chroot (SYS_Linux + 61) +#define SYS_ustat (SYS_Linux + 62) +#define SYS_dup2 (SYS_Linux + 63) +#define SYS_getppid (SYS_Linux + 64) +#define SYS_getpgrp (SYS_Linux + 65) +#define SYS_setsid (SYS_Linux + 66) +#define SYS_sigaction (SYS_Linux + 67) +#define SYS_sgetmask (SYS_Linux + 68) +#define SYS_ssetmask (SYS_Linux + 69) +#define SYS_setreuid (SYS_Linux + 70) +#define SYS_setregid (SYS_Linux + 71) +#define SYS_sigsuspend (SYS_Linux + 72) +#define SYS_sigpending (SYS_Linux + 73) +#define SYS_sethostname (SYS_Linux + 74) +#define SYS_setrlimit (SYS_Linux + 75) +#define SYS_getrlimit (SYS_Linux + 76) +#define SYS_getrusage (SYS_Linux + 77) +#define SYS_gettimeofday (SYS_Linux + 78) +#define SYS_settimeofday (SYS_Linux + 79) +#define SYS_getgroups (SYS_Linux + 80) +#define SYS_setgroups (SYS_Linux + 81) +#define SYS_reserved82 (SYS_Linux + 82) +#define SYS_symlink (SYS_Linux + 83) +#define SYS_oldlstat (SYS_Linux + 84) +#define SYS_readlink (SYS_Linux + 85) +#define SYS_uselib (SYS_Linux + 86) +#define SYS_swapon (SYS_Linux + 87) +#define SYS_reboot (SYS_Linux + 88) +#define SYS_readdir (SYS_Linux + 89) +#define SYS_mmap (SYS_Linux + 90) +#define SYS_munmap (SYS_Linux + 91) +#define SYS_truncate (SYS_Linux + 92) +#define SYS_ftruncate (SYS_Linux + 93) +#define SYS_fchmod (SYS_Linux + 94) +#define SYS_fchown (SYS_Linux + 95) +#define SYS_getpriority (SYS_Linux + 96) +#define SYS_setpriority (SYS_Linux + 97) +#define SYS_profil (SYS_Linux + 98) +#define SYS_statfs (SYS_Linux + 99) +#define SYS_fstatfs (SYS_Linux + 100) +#define SYS_ioperm (SYS_Linux + 101) +#define SYS_socketcall (SYS_Linux + 102) +#define SYS_syslog (SYS_Linux + 103) +#define SYS_setitimer (SYS_Linux + 104) +#define SYS_getitimer (SYS_Linux + 105) +#define SYS_stat (SYS_Linux + 106) +#define SYS_lstat (SYS_Linux + 107) +#define SYS_fstat (SYS_Linux + 108) +#define SYS_olduname (SYS_Linux + 109) +#define SYS_iopl (SYS_Linux + 110) +#define SYS_vhangup (SYS_Linux + 111) +#define SYS_idle (SYS_Linux + 112) +#define SYS_vm86 (SYS_Linux + 113) +#define SYS_wait4 (SYS_Linux + 114) +#define SYS_swapoff (SYS_Linux + 115) +#define SYS_sysinfo (SYS_Linux + 116) +#define SYS_ipc (SYS_Linux + 117) +#define SYS_fsync (SYS_Linux + 118) +#define SYS_sigreturn (SYS_Linux + 119) +#define SYS_clone (SYS_Linux + 120) +#define SYS_setdomainname (SYS_Linux + 121) +#define SYS_uname (SYS_Linux + 122) +#define SYS_modify_ldt (SYS_Linux + 123) +#define SYS_adjtimex (SYS_Linux + 124) +#define SYS_mprotect (SYS_Linux + 125) +#define SYS_sigprocmask (SYS_Linux + 126) +#define SYS_create_module (SYS_Linux + 127) +#define SYS_init_module (SYS_Linux + 128) +#define SYS_delete_module (SYS_Linux + 129) +#define SYS_get_kernel_syms (SYS_Linux + 130) +#define SYS_quotactl (SYS_Linux + 131) +#define SYS_getpgid (SYS_Linux + 132) +#define SYS_fchdir (SYS_Linux + 133) +#define SYS_bdflush (SYS_Linux + 134) +#define SYS_sysfs (SYS_Linux + 135) +#define SYS_personality (SYS_Linux + 136) +#define SYS_afs_syscall (SYS_Linux + 137) /* Syscall for Andrew File System */ +#define SYS_setfsuid (SYS_Linux + 138) +#define SYS_setfsgid (SYS_Linux + 139) +#define SYS__llseek (SYS_Linux + 140) +#define SYS_getdents (SYS_Linux + 141) +#define SYS__newselect (SYS_Linux + 142) +#define SYS_syscall_flock (SYS_Linux + 143) +#define SYS_msync (SYS_Linux + 144) +#define SYS_readv (SYS_Linux + 145) +#define SYS_writev (SYS_Linux + 146) +#define SYS_cacheflush (SYS_Linux + 147) +#define SYS_cachectl (SYS_Linux + 148) +#define SYS_sysmips (SYS_Linux + 149) +#define SYS_setup (SYS_Linux + 150) /* used only by init, to get system going */ +#define SYS_getsid (SYS_Linux + 151) +#define SYS_fdatasync (SYS_Linux + 152) +#define SYS__sysctl (SYS_Linux + 153) +#define SYS_mlock (SYS_Linux + 154) +#define SYS_munlock (SYS_Linux + 155) +#define SYS_mlockall (SYS_Linux + 156) +#define SYS_munlockall (SYS_Linux + 157) +#define SYS_sched_setparam (SYS_Linux + 158) +#define SYS_sched_getparam (SYS_Linux + 159) +#define SYS_sched_setscheduler (SYS_Linux + 160) +#define SYS_sched_getscheduler (SYS_Linux + 161) +#define SYS_sched_yield (SYS_Linux + 162) +#define SYS_sched_get_priority_max (SYS_Linux + 163) +#define SYS_sched_get_priority_min (SYS_Linux + 164) +#define SYS_sched_rr_get_interval (SYS_Linux + 165) +#define SYS_nanosleep (SYS_Linux + 166) +#define SYS_mremap (SYS_Linux + 167) +#define SYS_accept (SYS_Linux + 168) +#define SYS_bind (SYS_Linux + 169) +#define SYS_connect (SYS_Linux + 170) +#define SYS_getpeername (SYS_Linux + 171) +#define SYS_getsockname (SYS_Linux + 172) +#define SYS_getsockopt (SYS_Linux + 173) +#define SYS_listen (SYS_Linux + 174) +#define SYS_recv (SYS_Linux + 175) +#define SYS_recvfrom (SYS_Linux + 176) +#define SYS_recvmsg (SYS_Linux + 177) +#define SYS_send (SYS_Linux + 178) +#define SYS_sendmsg (SYS_Linux + 179) +#define SYS_sendto (SYS_Linux + 180) +#define SYS_setsockopt (SYS_Linux + 181) +#define SYS_shutdown (SYS_Linux + 182) +#define SYS_socket (SYS_Linux + 183) +#define SYS_socketpair (SYS_Linux + 184) +#define SYS_setresuid (SYS_Linux + 185) +#define SYS_getresuid (SYS_Linux + 186) +#define SYS_query_module (SYS_Linux + 187) +#define SYS_poll (SYS_Linux + 188) +#define SYS_nfsservctl (SYS_Linux + 189) + +#endif /* sys/syscall.h */ diff --git a/sysdeps/unix/sysv/linux/mips/sys/sysmips.h b/sysdeps/unix/sysv/linux/mips/sys/sysmips.h new file mode 100644 index 0000000000..cbb7eba2b4 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/sys/sysmips.h @@ -0,0 +1,36 @@ +/* Copyright (C) 1991, 92, 94, 95, 96, 97 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_SYSMIPS_H +#define _SYS_SYSMIPS_H 1 + +#include + +/* + * Get the kernel definition for sysmips(2) + */ +#include + +__BEGIN_DECLS + +extern int sysmips __P ((__const int cmd, __const int arg1, + __const int arg2, __const int arg3)); + +__END_DECLS + +#endif /* sys/sysmips.h */ diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list new file mode 100644 index 0000000000..6dd9cd81c5 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -0,0 +1,46 @@ +# File name Caller Syscall name # args Strong name Weak names + +# +# Calls for compatibility with existing MIPS OS implementations and +# compilers. +# +cachectl - cachectl 3 __cachectl cachectl +cacheflush - cacheflush 3 _flush_cache cacheflush +sysmips - sysmips 4 __sysmips sysmips + +# override select.S in parent directory: +select - select 5 __select select +sigsuspend - sigsuspend 1 __sigsuspend sigsuspend + +# +# Socket functions; Linux/MIPS doesn't use the socketcall(2) wrapper; +# it's provided for compatibility, though. +# +accept - accept 3 __accept accept +bind - bind 3 __bind bind +connect - connect 3 __connect connect +getpeername - getpeername 3 __getpeername getpeername +getsockname - getsockname 3 __getsockname getsockname +getsockopt - getsockopt 5 __getsockopt getsockopt +listen - listen 2 __listen listen +recv - recv 4 __recv recv +recvfrom - recvfrom 6 __recvfrom recvfrom +recvmsg - recvmsg 3 __recvmsg recvmsg +send - send 4 __send send +sendmsg - sendmsg 3 __sendmsg sendmsg +sendto - sendto 6 __sendto sendto +setsockopt - setsockopt 5 __setsockopt setsockopt +shutdown - shutdown 2 __shutdown shutdown +socket - socket 3 __socket socket +socketpair - socketpair 4 __socketpair socketpair + +# +# There are defined locally because the caller is also defined in this dir. +# +s_llseek llseek _llseek 5 __sys_llseek +s_sigaction sigaction sigaction 3 __syscall_sigaction +s_ustat ustat ustat 2 __syscall_ustat +sys_mknod xmknod mknod 3 __syscall_mknod +sys_fstat fxstat fstat 2 __syscall_fstat +sys_lstat lxstat lstat 2 __syscall_lstat +sys_stat xstat stat 2 __syscall_stat diff --git a/sysdeps/unix/sysv/linux/mips/ustat.c b/sysdeps/unix/sysv/linux/mips/ustat.c new file mode 100644 index 0000000000..447ab2947e --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/ustat.c @@ -0,0 +1,35 @@ +/* Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1997. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + + +extern int __syscall_ustat (unsigned long dev, struct ustat *ubuf); + +int +ustat (dev_t dev, struct ustat *ubuf) +{ + unsigned long k_dev; + + /* We must convert the value to dev_t type used by the kernel. */ + k_dev = ((major (dev) & 0xff) << 8) | (minor (dev) & 0xff); + + return __syscall_ustat (k_dev, ubuf); +} diff --git a/sysdeps/unix/sysv/linux/mips/xmknod.c b/sysdeps/unix/sysv/linux/mips/xmknod.c new file mode 100644 index 0000000000..c7ff64fecb --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/xmknod.c @@ -0,0 +1,47 @@ +/* xmknod call using old-style Unix mknod system call. + Copyright (C) 1991, 1993, 1995, 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include +#include + +extern int __syscall_mknod (const char *, unsigned long, unsigned int); + +/* Create a device file named PATH, with permission and special bits MODE + and device number DEV (which can be constructed from major and minor + device numbers with the `makedev' macro above). */ +int +__xmknod (int vers, const char *path, mode_t mode, dev_t *dev) +{ + unsigned long k_dev; + + if (vers != _MKNOD_VER) + { + __set_errno (EINVAL); + return -1; + } + + /* We must convert the value to dev_t type used by the kernel. */ + k_dev = ((major (*dev) & 0xff) << 8) | (minor (*dev) & 0xff); + + return __syscall_mknod (path, mode, k_dev); +} + +weak_alias (__xmknod, _xmknod) diff --git a/sysdeps/unix/sysv/linux/mips/xstat.c b/sysdeps/unix/sysv/linux/mips/xstat.c new file mode 100644 index 0000000000..9f7eb58e0a --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/xstat.c @@ -0,0 +1,80 @@ +/* xstat using old-style Unix stat system call. + Copyright (C) 1991, 1995, 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include + +#include + +extern int __syscall_stat (const char *, struct kernel_stat *); + +/* Get information about the file NAME in BUF. */ +int +__xstat (int vers, const char *name, struct stat *buf) +{ + struct kernel_stat kbuf; + int result; + + switch (vers) + { + case _STAT_VER_LINUX_OLD: + /* Nothing to do. The struct is in the form the kernel expects + it to be. */ + result = __syscall_stat (name, (struct kernel_stat *) buf); + break; + + case _STAT_VER_LINUX: + /* Do the system call. */ + result = __syscall_stat (name, &kbuf); + + /* Convert to current kernel version of `struct stat'. */ + buf->st_dev = kbuf.st_dev; + buf->st_pad1[0] = 0; buf->st_pad1[1] = 0; buf->st_pad1[2] = 0; + buf->st_ino = kbuf.st_ino; + buf->st_mode = kbuf.st_mode; + buf->st_nlink = kbuf.st_nlink; + buf->st_uid = kbuf.st_uid; + buf->st_gid = kbuf.st_gid; + buf->st_rdev = kbuf.st_rdev; + buf->st_pad2[0] = 0; buf->st_pad2[1] = 0; + buf->st_pad3 = 0; + buf->st_size = kbuf.st_size; + buf->st_blksize = kbuf.st_blksize; + buf->st_blocks = kbuf.st_blocks; + + buf->st_atime = kbuf.st_atime; buf->__reserved0 = 0; + buf->st_mtime = kbuf.st_mtime; buf->__reserved1 = 0; + buf->st_ctime = kbuf.st_ctime; buf->__reserved2 = 0; + + buf->st_pad4[0] = 0; buf->st_pad4[1] = 0; + buf->st_pad4[2] = 0; buf->st_pad4[3] = 0; + buf->st_pad4[4] = 0; buf->st_pad4[5] = 0; + buf->st_pad4[6] = 0; buf->st_pad4[7] = 0; + break; + + default: + __set_errno (EINVAL); + result = -1; + break; + } + + return result; +} +weak_alias (__xstat, _xstat) From eca7f2724208f2cb0f03411f52af8ce85e1b4109 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 14 Jul 1997 21:41:49 +0000 Subject: [PATCH 1010/4487] Only define functions if __OPTIMIZE__. --- sysdeps/alpha/fpu/bits/mathinline.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h index 0f76027317..22703120b1 100644 --- a/sysdeps/alpha/fpu/bits/mathinline.h +++ b/sysdeps/alpha/fpu/bits/mathinline.h @@ -18,7 +18,8 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#if defined (__GNUC__) && !defined (__NO_MATH_INLINES) +#ifdef __GNUC__ +#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__ extern __inline double __copysign (double __x, double __y) @@ -42,3 +43,4 @@ atan (double __x) } #endif +#endif From 216f1b7f7c687722eb1f0a81cbdc527722037719 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 14 Jul 1997 21:44:57 +0000 Subject: [PATCH 1011/4487] Define ISO C9x comparison function always. --- sysdeps/m68k/fpu/bits/mathinline.h | 113 +++++++++++++++-------------- 1 file changed, 58 insertions(+), 55 deletions(-) diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/fpu/bits/mathinline.h index 79245c07a1..2ab570fba5 100644 --- a/sysdeps/m68k/fpu/bits/mathinline.h +++ b/sysdeps/m68k/fpu/bits/mathinline.h @@ -19,18 +19,69 @@ #ifdef __GNUC__ -#include +#ifdef __USE_ISOC9X + +/* ISO C 9X defines some macros to perform unordered comparisons. The + m68k FPU supports this with special opcodes and we should use them. + These must not be inline functions since we have to be able to handle + all floating-point types. */ +# define isgreater(x, y) \ + __extension__ \ + ({ char __result; \ + __asm__ ("fcmp%.x %2,%1; fsogt %0" \ + : "=dm" (__result) : "f" (x), "f" (y)); \ + (int) __result; }) + +# define isgreaterequal(x, y) \ + __extension__ \ + ({ char __result; \ + __asm__ ("fcmp%.x %2,%1; fsoge %0" \ + : "=dm" (__result) : "f" (x), "f" (y)); \ + (int) __result; }) + +# define isless(x, y) \ + __extension__ \ + ({ char __result; \ + __asm__ ("fcmp%.x %2,%1; fsolt %0" \ + : "=dm" (__result) : "f" (x), "f" (y)); \ + (int) __result; }) + +# define islessequal(x, y) \ + __extension__ \ + ({ char __result; \ + __asm__ ("fcmp%.x %2,%1; fsole %0" \ + : "=dm" (__result) : "f" (x), "f" (y)); \ + (int) __result; }) + +# define islessgreater(x, y) \ + __extension__ \ + ({ char __result; \ + __asm__ ("fcmp%.x %2,%1; fsogl %0" \ + : "=dm" (__result) : "f" (x), "f" (y)); \ + (int) __result; }) + +# define isunordered(x, y) \ + __extension__ \ + ({ char __result; \ + __asm__ ("fcmp%.x %2,%1; fsun %0" \ + : "=dm" (__result) : "f" (x), "f" (y)); \ + (int) __result; }) +#endif + + +#if (!defined __NO_MATH_INLINES && defined __OPTIMIZE__) \ + || defined __LIBC_M81_MATH_INLINES #ifdef __LIBC_M81_MATH_INLINES /* This is used when defining the functions themselves. Define them with __ names, and with `static inline' instead of `extern inline' so the bodies will always be used, never an external function call. */ -#define __m81_u(x) __CONCAT(__,x) -#define __m81_inline static __inline +# define __m81_u(x) __CONCAT(__,x) +# define __m81_inline static __inline #else -#define __m81_u(x) x -#define __m81_inline extern __inline -#define __M81_MATH_INLINES 1 +# define __m81_u(x) x +# define __m81_inline extern __inline +# define __M81_MATH_INLINES 1 #endif /* Define a const math function. */ @@ -385,55 +436,7 @@ __inline_forward(void,sincosl, #undef __inline_forward #undef __inline_forward_c -#ifdef __USE_ISOC9X - -/* ISO C 9X defines some macros to perform unordered comparisons. The - m68k FPU supports this with special opcodes and we should use them. - These must not be inline functions since we have to be able to handle - all floating-point types. */ -# define isgreater(x, y) \ - __extension__ \ - ({ char __result; \ - __asm__ ("fcmp%.x %2,%1; fsogt %0" \ - : "=dm" (__result) : "f" (x), "f" (y)); \ - (int) __result; }) - -# define isgreaterequal(x, y) \ - __extension__ \ - ({ char __result; \ - __asm__ ("fcmp%.x %2,%1; fsoge %0" \ - : "=dm" (__result) : "f" (x), "f" (y)); \ - (int) __result; }) - -# define isless(x, y) \ - __extension__ \ - ({ char __result; \ - __asm__ ("fcmp%.x %2,%1; fsolt %0" \ - : "=dm" (__result) : "f" (x), "f" (y)); \ - (int) __result; }) - -# define islessequal(x, y) \ - __extension__ \ - ({ char __result; \ - __asm__ ("fcmp%.x %2,%1; fsole %0" \ - : "=dm" (__result) : "f" (x), "f" (y)); \ - (int) __result; }) - -# define islessgreater(x, y) \ - __extension__ \ - ({ char __result; \ - __asm__ ("fcmp%.x %2,%1; fsogl %0" \ - : "=dm" (__result) : "f" (x), "f" (y)); \ - (int) __result; }) - -# define isunordered(x, y) \ - __extension__ \ - ({ char __result; \ - __asm__ ("fcmp%.x %2,%1; fsun %0" \ - : "=dm" (__result) : "f" (x), "f" (y)); \ - (int) __result; }) -#endif - #endif /* !__NO_MATH_INLINES && __OPTIMIZE__ */ +#endif #endif /* GCC. */ From ecbc158398f651207076dbae9e9d358d4ed3a4a0 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 14 Jul 1997 21:45:31 +0000 Subject: [PATCH 1012/4487] Imply ieee754. --- sysdeps/mips/mips64/Implies | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/mips/mips64/Implies b/sysdeps/mips/mips64/Implies index a8cae95f9d..06b9091f3b 100644 --- a/sysdeps/mips/mips64/Implies +++ b/sysdeps/mips/mips64/Implies @@ -1 +1,3 @@ wordsize-64 +# MIPS uses IEEE 754 floating point. +ieee754 From db45cbee79b1d013acb283d343543354192da7d3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 14 Jul 1997 21:46:28 +0000 Subject: [PATCH 1013/4487] Removed since the generic version is sufficent. --- sysdeps/standalone/bits/stdio_lim.h | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 sysdeps/standalone/bits/stdio_lim.h diff --git a/sysdeps/standalone/bits/stdio_lim.h b/sysdeps/standalone/bits/stdio_lim.h deleted file mode 100644 index f5a503471c..0000000000 --- a/sysdeps/standalone/bits/stdio_lim.h +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. - Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil, - On-Line Applications Research Corporation. - 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#define L_tmpnam 1 -#define TMPMAX 0 -#define L_ctermid 1 -#define L_cuserid 1 -#define FOPEN_MAX 16 -#define FILENAME_MAX 14 From 09d24ad4771c7c00beceaad12084df2b1c09253f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 22 Jul 1997 00:03:10 +0000 Subject: [PATCH 1014/4487] (elf_machine_rela): Mention program name in warning message. --- sysdeps/m68k/dl-machine.h | 4 +- sysdeps/mips/dl-machine.h | 192 +------------------------------------- 2 files changed, 4 insertions(+), 192 deletions(-) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index e50f773614..c0a17c73c2 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -234,11 +234,13 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, if (sym->st_size > refsym->st_size || (_dl_verbose && sym->st_size < refsym->st_size)) { + extern char **_dl_argv; const char *strtab; strtab = ((void *) map->l_addr + map->l_info[DT_STRTAB]->d_un.d_ptr); - _dl_sysdep_error ("Symbol `", strtab + refsym->st_name, + _dl_sysdep_error (_dl_argv[0] ?: "", + ": Symbol `", strtab + refsym->st_name, "' has different size in shared object, " "consider re-linking\n", NULL); } diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index cc7198b60e..7456ae0b7a 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -125,32 +125,11 @@ elf_machine_got (void) } -/* Return the link-time address of _DYNAMIC. Conveniently, this is the - first element of the GOT. This must be inlined in a function which - uses global data. */ -static inline ElfW(Addr) -elf_machine_dynamic (void) -{ - register ElfW(Addr) gp asm ("$28"); - return * (ElfW(Addr) *) (gp - 0x7ff0); -} - /* Return the run-time load address of the shared object. */ static inline ElfW(Addr) elf_machine_load_address (void) { ElfW(Addr) addr; -#ifdef __mips64 - asm (" .set noreorder\n" - " dla %0, here\n" - " bltzal $0, here\n" - " nop\n" - "here: dsubu %0, $31, %0\n" - " .set reorder\n" - : "=r" (addr) - : /* No inputs */ - : "$31"); -#else asm (" .set noreorder\n" " la %0, here\n" " bltzal $0, here\n" @@ -160,7 +139,6 @@ elf_machine_load_address (void) : "=r" (addr) : /* No inputs */ : "$31"); -#endif return addr; } @@ -364,100 +342,6 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc) t8 index for this function symbol in .dynsym to usual c arguments. */ -#ifdef __mips64 -#define ELF_MACHINE_RUNTIME_TRAMPOLINE \ -/* The flag _dl_mips_gnu_objects is set if all dynamic objects are \ - generated by the gnu linker. */ \ -int _dl_mips_gnu_objects = 1; \ - \ -/* This is called from assembly stubs below which the compiler can't see. */ \ -static ElfW(Addr) \ -__dl_runtime_resolve (ElfW(Word), ElfW(Word), ElfW(Addr), ElfW(Addr)) \ - __attribute__ ((unused)); \ - \ -static ElfW(Addr) \ -__dl_runtime_resolve (ElfW(Word) sym_index, \ - ElfW(Word) return_address, \ - ElfW(Addr) old_gpreg, \ - ElfW(Addr) stub_pc) \ -{ \ - struct link_map *l = elf_machine_runtime_link_map (old_gpreg, stub_pc); \ - const ElfW(Sym) *const symtab \ - = (const ElfW(Sym) *) (l->l_addr + l->l_info[DT_SYMTAB]->d_un.d_ptr); \ - const char *strtab \ - = (void *) (l->l_addr + l->l_info[DT_STRTAB]->d_un.d_ptr); \ - const ElfW(Addr) *got \ - = (const ElfW(Addr) *) (l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr); \ - const ElfW(Word) local_gotno \ - = (const ElfW(Word)) l->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; \ - const ElfW(Word) gotsym \ - = (const ElfW(Word)) l->l_info[DT_MIPS (GOTSYM)]->d_un.d_val; \ - const ElfW(Sym) *definer; \ - ElfW(Addr) loadbase; \ - ElfW(Addr) funcaddr; \ - struct link_map **scope; \ - \ - /* Look up the symbol's run-time value. */ \ - scope = _dl_object_relocation_scope (l); \ - definer = &symtab[sym_index]; \ - \ - loadbase = _dl_lookup_symbol (strtab + definer->st_name, &definer, \ - scope, l->l_name, ELF_MACHINE_RELOC_NOPLT); \ - \ - *_dl_global_scope_end = NULL; \ - \ - /* Apply the relocation with that value. */ \ - funcaddr = loadbase + definer->st_value; \ - *(got + local_gotno + sym_index - gotsym) = funcaddr; \ - \ - return funcaddr; \ -} \ - \ -asm ("\n \ - .text\n \ - .align 3\n \ - .globl _dl_runtime_resolve\n \ - .type _dl_runtime_resolve,@function\n \ - .ent _dl_runtime_resolve\n \ -_dl_runtime_resolve:\n \ - .set noreorder\n \ - # Save old GP to $3.\n \ - move $3,$28\n \ - # Modify t9 ($25) so as to point .cpload instruction.\n \ - daddu $25,2*8\n \ - # Compute GP.\n \ - .cpload $25\n \ - .set reorder\n \ - # Save slot call pc.\n \ - move $2, $31\n \ - # Save arguments and sp value in stack.\n \ - dsubu $29, 10*8\n \ - .cprestore 8*8\n \ - sd $15, 9*8($29)\n \ - sd $4, 3*8($29)\n \ - sd $5, 4*8($29)\n \ - sd $6, 5*8($29)\n \ - sd $7, 6*8($29)\n \ - sd $16, 7*8($29)\n \ - move $16, $29\n \ - move $4, $24\n \ - move $5, $15\n \ - move $6, $3\n \ - move $7, $2\n \ - jal __dl_runtime_resolve\n \ - move $29, $16\n \ - ld $31, 9*8($29)\n \ - ld $4, 3*8($29)\n \ - ld $5, 4*8($29)\n \ - ld $6, 5*8($29)\n \ - ld $7, 6*8($29)\n \ - ld $16, 7*8($29)\n \ - daddu $29, 10*8\n \ - move $25, $2\n \ - jr $25\n \ - .end _dl_runtime_resolve\n \ -"); -#else #define ELF_MACHINE_RUNTIME_TRAMPOLINE \ /* The flag _dl_mips_gnu_objects is set if all dynamic objects are \ generated by the gnu linker. */ \ @@ -550,7 +434,6 @@ _dl_runtime_resolve:\n \ jr $25\n \ .end _dl_runtime_resolve\n \ "); -#endif /* Mask identifying addresses reserved for the user program, where the dynamic linker should not map anything. */ @@ -573,78 +456,6 @@ _dl_runtime_resolve:\n \ 2) That under Linux the entry is named __start and not just plain _start. */ -#ifdef __mips64 -#define RTLD_START asm ("\ - .text\n\ - .align 3\n"\ -_RTLD_PROLOGUE (ENTRY_POINT)\ -" .globl _dl_start_user\n\ - .set noreorder\n\ - bltzal $0, 0f\n\ - nop\n\ -0: .cpload $31\n\ - .set reorder\n\ - # i386 ABI book says that the first entry of GOT holds\n\ - # the address of the dynamic structure. Though MIPS ABI\n\ - # doesn't say nothing about this, I emulate this here.\n\ - dla $4, _DYNAMIC\n\ - sd $4, -0x7ff0($28)\n\ - move $4, $29\n\ - jal _dl_start\n\ - # Get the value of label '_dl_start_user' in t9 ($25).\n\ - dla $25, _dl_start_user\n\ -_dl_start_user:\n\ - .set noreorder\n\ - .cpload $25\n\ - .set reorder\n\ - move $16, $28\n\ - # Save the user entry point address in saved register.\n\ - move $17, $2\n\ - # See if we were run as a command with the executable file\n\ - # name as an extra leading argument.\n\ - ld $2, _dl_skip_args\n\ - beq $2, $0, 1f\n\ - # Load the original argument count.\n\ - ld $4, 0($29)\n\ - # Subtract _dl_skip_args from it.\n\ - dsubu $4, $2\n\ - # Adjust the stack pointer to skip _dl_skip_args words.\n\ - dsll $2,2\n\ - daddu $29, $2\n\ - # Save back the modified argument count.\n\ - sd $4, 0($29)\n\ - # Get _dl_default_scope[2] as argument in _dl_init_next call below.\n\ -1: dla $2, _dl_default_scope\n\ - ld $4, 2*8($2)\n\ - # Call _dl_init_next to return the address of an initializer\n\ - # function to run.\n\ - jal _dl_init_next\n\ - move $28, $16\n\ - # Check for zero return, when out of initializers.\n\ - beq $2, $0, 2f\n\ - # Call the shared object initializer function.\n\ - move $25, $2\n\ - ld $4, 0($29)\n\ - ld $5, 1*8($29)\n\ - ld $6, 2*8($29)\n\ - ld $7, 3*8($29)\n\ - jalr $25\n\ - move $28, $16\n\ - # Loop to call _dl_init_next for the next initializer.\n\ - b 1b\n\ - # Pass our finalizer function to the user in ra.\n\ -2: dla $31, _dl_fini\n\ - # Jump to the user entry point.\n\ - move $25, $17\n\ - ld $4, 0($29)\n\ - ld $5, 1*8($29)\n\ - ld $6, 2*8$29)\n\ - ld $7, 3*8($29)\n\ - jr $25\n"\ -_RTLD_EPILOGUE(ENTRY_POINT) \ -); - -#else #define RTLD_START asm ("\ .text\n"\ _RTLD_PROLOGUE(ENTRY_POINT)\ @@ -718,8 +529,7 @@ _dl_start_user:\n\ lw $7, 12($29)\n\ jr $25\n"\ _RTLD_EPILOGUE(ENTRY_POINT)\ -"); -#endif +); /* The MIPS never uses Elfxx_Rela relocations. */ #define ELF_MACHINE_NO_RELA 1 From abd048b1c0a41b8cc63c969958eeda11e4912af8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 22 Jul 1997 00:04:07 +0000 Subject: [PATCH 1015/4487] Special parameters for rtld generation. --- sysdeps/mips/rtld-parms | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 sysdeps/mips/rtld-parms diff --git a/sysdeps/mips/rtld-parms b/sysdeps/mips/rtld-parms new file mode 100644 index 0000000000..72f09e7341 --- /dev/null +++ b/sysdeps/mips/rtld-parms @@ -0,0 +1,15 @@ +ifndef rtld-wordsize +rtld-wordsize = 32 +endif +ifndef rtld-oformat +rtld-oformat = elf$(rtld-wordsize)-bigmips +endif +ifndef rtld-arch +rtld-arch = mips +endif +ifndef rtld-entry +rtld-entry = __start +endif +ifndef rtld-base +rtld-base = 0x0fb60000 + SIZEOF_HEADERS +endif From 75b69faebc02acaefc3a7b2eaafe1213e44ad807 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 22 Jul 1997 00:05:40 +0000 Subject: [PATCH 1016/4487] MIPS64 dependent RTLD. --- sysdeps/mips/mips64/dl-machine.h | 594 +++++++++++++++++++++++++++++++ 1 file changed, 594 insertions(+) create mode 100644 sysdeps/mips/mips64/dl-machine.h diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h new file mode 100644 index 0000000000..3277b109d9 --- /dev/null +++ b/sysdeps/mips/mips64/dl-machine.h @@ -0,0 +1,594 @@ +/* Machine-dependent ELF dynamic relocation inline functions. MIPS version. + Copyright (C) 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Kazumoto Kojima . + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef dl_machine_h +#define dl_machine_h + +#define ELF_MACHINE_NAME "MIPS" + +#include +#include + +#ifndef ENTRY_POINT +#error ENTRY_POINT needs to be defined for MIPS. +#endif + +#ifndef _RTLD_PROLOGUE +#ifdef __STDC__ +#define _RTLD_PROLOGUE(entry) "\n\t.globl " #entry \ + "\n\t.ent " #entry \ + "\n\t" #entry ":\n\t" +#else +#define _RTLD_PROLOGUE(entry) "\n\t.globl entry\n\t.ent entry\n\t entry:\n\t" +#endif +#endif + +#ifndef _RTLD_EPILOGUE +#ifdef __STDC__ +#define _RTLD_EPILOGUE(entry) "\t.end " #entry "\n" +#else +#define _RTLD_EPILOGUE(entry) "\t.end entry\n" +#endif +#endif + +/* I have no idea what I am doing. */ +#define ELF_MACHINE_RELOC_NOPLT -1 +#define elf_machine_lookup_noplt_p(type) (1) +#define elf_machine_lookup_noexec_p(type) (0) + +/* Translate a processor specific dynamic tag to the index + in l_info array. */ +#define DT_MIPS(x) (DT_MIPS_##x - DT_LOPROC + DT_NUM) + +#if 0 +/* We may need 64k alignment. */ +#define ELF_MACHINE_ALIGN_MASK 0xffff +#endif + +/* + * MIPS libraries are usually linked to a non-zero base address. We + * subtrace the base address from the address where we map the object + * to. This results in more efficient address space usage. + */ +#if 0 +#define MAP_BASE_ADDR(l) ((l)->l_info[DT_MIPS(BASE_ADDRESS)] ? \ + (l)->l_info[DT_MIPS(BASE_ADDRESS)]->d_un.d_ptr : 0) +#else +#define MAP_BASE_ADDR(l) 0x5ffe0000 +#endif + +/* If there is a DT_MIPS_RLD_MAP entry in the dynamic section, fill it in + with the run-time address of the r_debug structure */ +#define ELF_MACHINE_DEBUG_SETUP(l,r) \ +do { if ((l)->l_info[DT_MIPS (RLD_MAP)]) \ + *(ElfW(Addr) *)((l)->l_info[DT_MIPS (RLD_MAP)]->d_un.d_ptr) = \ + (ElfW(Addr)) (r); \ + } while (0) + +/* Return nonzero iff E_MACHINE is compatible with the running host. */ +static inline int __attribute__ ((unused)) +elf_machine_matches_host (ElfW(Half) e_machine) +{ + switch (e_machine) + { + case EM_MIPS: + case EM_MIPS_RS4_BE: + return 1; + default: + return 0; + } +} + +/* Return the link-time address of _DYNAMIC. Conveniently, this is the ++ first element of the GOT. This must be inlined in a function which ++ uses global data. */ ++static inline ElfW(Addr) ++elf_machine_dynamic (void) ++{ ++ register ElfW(Addr) gp asm ("$28"); ++ return * (ElfW(Addr) *) (gp - 0x7ff0); ++} ++ +static inline ElfW(Addr) * +elf_mips_got_from_gpreg (ElfW(Addr) gpreg) +{ + /* FIXME: the offset of gp from GOT may be system-dependent. */ + return (ElfW(Addr) *) (gpreg - 0x7ff0); +} + +/* Return the run-time address of the _GLOBAL_OFFSET_TABLE_. + Must be inlined in a function which uses global data. */ +static inline ElfW(Addr) * +elf_machine_got (void) +{ + ElfW(Addr) gp; + + __asm__ __volatile__("move %0, $28\n\t" : "=r" (gp)); + return elf_mips_got_from_gpreg (gp); +} + + +/* Return the run-time load address of the shared object. */ +static inline ElfW(Addr) +elf_machine_load_address (void) +{ + ElfW(Addr) addr; + asm (" .set noreorder\n" + " dla %0, here\n" + " bltzal $0, here\n" + " nop\n" + "here: dsubu %0, $31, %0\n" + " .set reorder\n" + : "=r" (addr) + : /* No inputs */ + : "$31"); + return addr; +} + +/* The MSB of got[1] of a gnu object is set to identify gnu objects. */ +#define ELF_MIPS_GNU_GOT1_MASK 0x80000000 + +/* Relocate GOT. */ +static inline void +elf_machine_got_rel (struct link_map *map, int lazy) +{ + ElfW(Addr) *got; + ElfW(Sym) *sym; + int i, n; + struct link_map **scope; + const char *strtab + = ((void *) map->l_addr + map->l_info[DT_STRTAB]->d_un.d_ptr); + +#define RESOLVE_GOTSYM(sym) \ + ({ \ + const ElfW(Sym) *ref = sym; \ + ElfW(Addr) sym_loadaddr; \ + sym_loadaddr = _dl_lookup_symbol (strtab + sym->st_name, &ref, scope, \ + map->l_name, ELF_MACHINE_RELOC_NOPLT);\ + (ref)? sym_loadaddr + ref->st_value: 0; \ + }) + + got = (ElfW(Addr) *) ((void *) map->l_addr + + map->l_info[DT_PLTGOT]->d_un.d_ptr); + + /* got[0] is reserved. got[1] is also reserved for the dynamic object + generated by gnu ld. Skip these reserved entries from relocation. */ + i = (got[1] & ELF_MIPS_GNU_GOT1_MASK)? 2: 1; + n = map->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; + /* Add the run-time display to all local got entries. */ + while (i < n) + got[i++] += map->l_addr; + + /* Set scope. */ + scope = _dl_object_relocation_scope (map); + + /* Handle global got entries. */ + got += n; + sym = (ElfW(Sym) *) ((void *) map->l_addr + + map->l_info[DT_SYMTAB]->d_un.d_ptr); + sym += map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val; + i = (map->l_info[DT_MIPS (SYMTABNO)]->d_un.d_val + - map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val); + + while (i--) + { + if (sym->st_shndx == SHN_UNDEF) + { + if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC) + { + if (sym->st_value && lazy) + *got = sym->st_value + map->l_addr; + else + *got = RESOLVE_GOTSYM (sym); + } + else /* if (*got == 0 || *got == QS) */ + *got = RESOLVE_GOTSYM (sym); + } + else if (sym->st_shndx == SHN_COMMON) + *got = RESOLVE_GOTSYM (sym); + else if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC + && *got != sym->st_value + && lazy) + *got += map->l_addr; + else if (ELFW(ST_TYPE) (sym->st_info) == STT_SECTION) + { + if (sym->st_other == 0) + *got += map->l_addr; + } + else + *got = RESOLVE_GOTSYM (sym); + + got++; + sym++; + } + +#undef RESOLVE_GOTSYM + *_dl_global_scope_end = NULL; + + return; +} + +/* Set up the loaded object described by L so its stub function + will jump to the on-demand fixup code in dl-runtime.c. */ + +static inline int +elf_machine_runtime_setup (struct link_map *l, int lazy) +{ + ElfW(Addr) *got; + extern void _dl_runtime_resolve (ElfW(Word)); + extern int _dl_mips_gnu_objects; + +#ifdef RTLD_BOOTSTRAP + { + return lazy; + } +#endif + if (lazy) + { + /* The GOT entries for functions have not yet been filled in. + Their initial contents will arrange when called to put an + offset into the .dynsym section in t8, the return address + in t7 and then jump to _GLOBAL_OFFSET_TABLE[0]. */ + got = (ElfW(Addr) *) ((void *) l->l_addr + + l->l_info[DT_PLTGOT]->d_un.d_ptr); + + /* This function will get called to fix up the GOT entry indicated by + the register t8, and then jump to the resolved address. */ + got[0] = (ElfW(Addr)) &_dl_runtime_resolve; + + /* Store l to _GLOBAL_OFFSET_TABLE[1] for gnu object. The MSB + of got[1] of a gnu object is set to identify gnu objects. + Where we can store l for non gnu objects? XXX */ + if ((got[1] & ELF_MIPS_GNU_GOT1_MASK) != 0) + got[1] = (ElfW(Addr)) ((unsigned) l | ELF_MIPS_GNU_GOT1_MASK); + else + _dl_mips_gnu_objects = 0; + } + + /* Relocate global offset table. */ + elf_machine_got_rel (l, lazy); + + return lazy; +} + +/* Get link_map for this object. */ +static inline struct link_map * +elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc) +{ + extern int _dl_mips_gnu_objects; + + /* got[1] is reserved to keep its link map address for the shared + object generated by gnu linker. If all are such object, we can + find link map from current GPREG simply. If not so, get link map + for callers object containing STUB_PC. */ + + if (_dl_mips_gnu_objects) + { + ElfW(Addr) *got = elf_mips_got_from_gpreg (gpreg); + ElfW(Word) g1; + + g1 = ((ElfW(Word) *) got)[1]; + + if ((g1 & ELF_MIPS_GNU_GOT1_MASK) != 0) + return (struct link_map *) (g1 & ~ELF_MIPS_GNU_GOT1_MASK); + } + + { + struct link_map *l = _dl_loaded; + struct link_map *ret = 0; + ElfW(Addr) candidate = 0; + + while (l) + { + ElfW(Addr) base = 0; + const ElfW(Phdr) *p = l->l_phdr; + ElfW(Half) this, nent = l->l_phnum; + + /* Get the base. */ + for (this = 0; this < nent; this++) + if (p[this].p_type == PT_LOAD) + { + base = p[this].p_vaddr + l->l_addr; + break; + } + if (! base) + { + l = l->l_next; + continue; + } + + /* Find closest link base addr. */ + if ((base < stub_pc) && (candidate < base)) + { + candidate = base; + ret = l; + } + l = l->l_next; + } + if (candidate && ret && (candidate < stub_pc)) + return ret; + else if (!candidate) + return _dl_loaded; + } + + _dl_signal_error (0, NULL, "cannot find runtime link map"); + return NULL; +} + +/* Mips has no PLT but define elf_machine_relplt to be elf_machine_rel. */ +#define elf_machine_relplt elf_machine_rel + +/* Define mips specific runtime resolver. The function __dl_runtime_resolve + is called from assembler function _dl_runtime_resolve which converts + special argument registers t7 ($15) and t8 ($24): + t7 address to return to the caller of the function + t8 index for this function symbol in .dynsym + to usual c arguments. */ + +#define ELF_MACHINE_RUNTIME_TRAMPOLINE \ +/* The flag _dl_mips_gnu_objects is set if all dynamic objects are \ + generated by the gnu linker. */ \ +int _dl_mips_gnu_objects = 1; \ + \ +/* This is called from assembly stubs below which the compiler can't see. */ \ +static ElfW(Addr) \ +__dl_runtime_resolve (ElfW(Word), ElfW(Word), ElfW(Addr), ElfW(Addr)) \ + __attribute__ ((unused)); \ + \ +static ElfW(Addr) \ +__dl_runtime_resolve (ElfW(Word) sym_index, \ + ElfW(Word) return_address, \ + ElfW(Addr) old_gpreg, \ + ElfW(Addr) stub_pc) \ +{ \ + struct link_map *l = elf_machine_runtime_link_map (old_gpreg, stub_pc); \ + const ElfW(Sym) *const symtab \ + = (const ElfW(Sym) *) (l->l_addr + l->l_info[DT_SYMTAB]->d_un.d_ptr); \ + const char *strtab \ + = (void *) (l->l_addr + l->l_info[DT_STRTAB]->d_un.d_ptr); \ + const ElfW(Addr) *got \ + = (const ElfW(Addr) *) (l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr); \ + const ElfW(Word) local_gotno \ + = (const ElfW(Word)) l->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; \ + const ElfW(Word) gotsym \ + = (const ElfW(Word)) l->l_info[DT_MIPS (GOTSYM)]->d_un.d_val; \ + const ElfW(Sym) *definer; \ + ElfW(Addr) loadbase; \ + ElfW(Addr) funcaddr; \ + struct link_map **scope; \ + \ + /* Look up the symbol's run-time value. */ \ + scope = _dl_object_relocation_scope (l); \ + definer = &symtab[sym_index]; \ + \ + loadbase = _dl_lookup_symbol (strtab + definer->st_name, &definer, \ + scope, l->l_name, ELF_MACHINE_RELOC_NOPLT); \ + \ + *_dl_global_scope_end = NULL; \ + \ + /* Apply the relocation with that value. */ \ + funcaddr = loadbase + definer->st_value; \ + *(got + local_gotno + sym_index - gotsym) = funcaddr; \ + \ + return funcaddr; \ +} \ + \ +asm ("\n \ + .text\n \ + .align 3\n \ + .globl _dl_runtime_resolve\n \ + .type _dl_runtime_resolve,@function\n \ + .ent _dl_runtime_resolve\n \ +_dl_runtime_resolve:\n \ + .set noreorder\n \ + # Save old GP to $3.\n \ + move $3,$28\n \ + # Modify t9 ($25) so as to point .cpload instruction.\n \ + daddu $25,2*8\n \ + # Compute GP.\n \ + .cpload $25\n \ + .set reorder\n \ + # Save slot call pc.\n \ + move $2, $31\n \ + # Save arguments and sp value in stack.\n \ + dsubu $29, 10*8\n \ + .cprestore 8*8\n \ + sd $15, 9*8($29)\n \ + sd $4, 3*8($29)\n \ + sd $5, 4*8($29)\n \ + sd $6, 5*8($29)\n \ + sd $7, 6*8($29)\n \ + sd $16, 7*8($29)\n \ + move $16, $29\n \ + move $4, $24\n \ + move $5, $15\n \ + move $6, $3\n \ + move $7, $2\n \ + jal __dl_runtime_resolve\n \ + move $29, $16\n \ + ld $31, 9*8($29)\n \ + ld $4, 3*8($29)\n \ + ld $5, 4*8($29)\n \ + ld $6, 5*8($29)\n \ + ld $7, 6*8($29)\n \ + ld $16, 7*8($29)\n \ + daddu $29, 10*8\n \ + move $25, $2\n \ + jr $25\n \ + .end _dl_runtime_resolve\n \ +"); + +/* Mask identifying addresses reserved for the user program, + where the dynamic linker should not map anything. */ +#define ELF_MACHINE_USER_ADDRESS_MASK 0x80000000UL + + + +/* Initial entry point code for the dynamic linker. + The C function `_dl_start' is the real entry point; + its return value is the user program's entry point. + Note how we have to be careful about two things: + + 1) That we allocate a minimal stack of 24 bytes for + every function call, the MIPS ABI states that even + if all arguments are passed in registers the procedure + called can use the 16 byte area pointed to by $sp + when it is called to store away the arguments passed + to it. + + 2) That under Linux the entry is named __start + and not just plain _start. */ + +#define RTLD_START asm ("\ + .text\n\ + .align 3\n"\ +_RTLD_PROLOGUE (ENTRY_POINT)\ +" .globl _dl_start_user\n\ + .set noreorder\n\ + bltzal $0, 0f\n\ + nop\n\ +0: .cpload $31\n\ + .set reorder\n\ + # i386 ABI book says that the first entry of GOT holds\n\ + # the address of the dynamic structure. Though MIPS ABI\n\ + # doesn't say nothing about this, I emulate this here.\n\ + dla $4, _DYNAMIC\n\ + sd $4, -0x7ff0($28)\n\ + move $4, $29\n\ + jal _dl_start\n\ + # Get the value of label '_dl_start_user' in t9 ($25).\n\ + dla $25, _dl_start_user\n\ +_dl_start_user:\n\ + .set noreorder\n\ + .cpload $25\n\ + .set reorder\n\ + move $16, $28\n\ + # Save the user entry point address in saved register.\n\ + move $17, $2\n\ + # See if we were run as a command with the executable file\n\ + # name as an extra leading argument.\n\ + ld $2, _dl_skip_args\n\ + beq $2, $0, 1f\n\ + # Load the original argument count.\n\ + ld $4, 0($29)\n\ + # Subtract _dl_skip_args from it.\n\ + dsubu $4, $2\n\ + # Adjust the stack pointer to skip _dl_skip_args words.\n\ + dsll $2,2\n\ + daddu $29, $2\n\ + # Save back the modified argument count.\n\ + sd $4, 0($29)\n\ + # Get _dl_default_scope[2] as argument in _dl_init_next call below.\n\ +1: dla $2, _dl_default_scope\n\ + ld $4, 2*8($2)\n\ + # Call _dl_init_next to return the address of an initializer\n\ + # function to run.\n\ + jal _dl_init_next\n\ + move $28, $16\n\ + # Check for zero return, when out of initializers.\n\ + beq $2, $0, 2f\n\ + # Call the shared object initializer function.\n\ + move $25, $2\n\ + ld $4, 0($29)\n\ + ld $5, 1*8($29)\n\ + ld $6, 2*8($29)\n\ + ld $7, 3*8($29)\n\ + jalr $25\n\ + move $28, $16\n\ + # Loop to call _dl_init_next for the next initializer.\n\ + b 1b\n\ + # Pass our finalizer function to the user in ra.\n\ +2: dla $31, _dl_fini\n\ + # Jump to the user entry point.\n\ + move $25, $17\n\ + ld $4, 0($29)\n\ + ld $5, 1*8($29)\n\ + ld $6, 2*8$29)\n\ + ld $7, 3*8($29)\n\ + jr $25\n"\ +_RTLD_EPILOGUE(ENTRY_POINT) \ +); + + +/* The MIPS never uses Elfxx_Rela relocations. */ +#define ELF_MACHINE_NO_RELA 1 + +#endif /* !dl_machine_h */ + +#ifdef RESOLVE + +/* Perform the relocation specified by RELOC and SYM (which is fully resolved). + MAP is the object containing the reloc. */ + +static inline void +elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, + const ElfW(Sym) *sym, const struct r_found_version *version) +{ + ElfW(Addr) *const reloc_addr = (void *) (map->l_addr + reloc->r_offset); + ElfW(Addr) loadbase; + ElfW(Addr) undo __attribute__ ((unused)); + + switch (ELFW(R_TYPE) (reloc->r_info)) + { + case R_MIPS_REL32: + { + ElfW(Addr) undo = 0; + + if (ELFW(ST_BIND) (sym->st_info) == STB_LOCAL + && (ELFW(ST_TYPE) (sym->st_info) == STT_SECTION + || ELFW(ST_TYPE) (sym->st_info) == STT_NOTYPE)) + { + *reloc_addr += map->l_addr; + break; + } +#ifndef RTLD_BOOTSTRAP + /* This is defined in rtld.c, but nowhere in the static libc.a; + make the reference weak so static programs can still link. This + declaration cannot be done when compiling rtld.c (i.e. #ifdef + RTLD_BOOTSTRAP) because rtld.c contains the common defn for + _dl_rtld_map, which is incompatible with a weak decl in the same + file. */ + weak_extern (_dl_rtld_map); + if (map == &_dl_rtld_map) + /* Undo the relocation done here during bootstrapping. Now we will + relocate it anew, possibly using a binding found in the user + program or a loaded library rather than the dynamic linker's + built-in definitions used while loading those libraries. */ + undo = map->l_addr + sym->st_value; +#endif + loadbase = RESOLVE (&sym, version, 0); + *reloc_addr += (sym ? (loadbase + sym->st_value) : 0) - undo; + } + break; + case R_MIPS_NONE: /* Alright, Wilbur. */ + break; + default: + assert (! "unexpected dynamic reloc type"); + break; + } +} + +static inline void +elf_machine_lazy_rel (struct link_map *map, const ElfW(Rel) *reloc) +{ + /* Do nothing. */ +} + +#endif /* RESOLVE */ From 7d899ae6f779f75b3d270cfa7349746eab518c17 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 22 Jul 1997 00:07:34 +0000 Subject: [PATCH 1017/4487] Linux/MIPS specific lxstat implementation. --- sysdeps/unix/sysv/linux/mips/lxstat.c | 80 +++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/mips/lxstat.c diff --git a/sysdeps/unix/sysv/linux/mips/lxstat.c b/sysdeps/unix/sysv/linux/mips/lxstat.c new file mode 100644 index 0000000000..7907b2f2d2 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/lxstat.c @@ -0,0 +1,80 @@ +/* lxstat using old-style Unix lstat system call. + Copyright (C) 1991, 1995, 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include + +#include + +extern int __syscall_lstat (const char *, struct kernel_stat *); + +/* Get information about the file NAME in BUF. */ +int +__lxstat (int vers, const char *name, struct stat *buf) +{ + struct kernel_stat kbuf; + int result; + + switch (vers) + { + case _STAT_VER_LINUX_OLD: + /* Nothing to do. The struct is in the form the kernel expects + it to be. */ + result = __syscall_lstat (name, (struct kernel_stat *) buf); + break; + + case _STAT_VER_LINUX: + /* Do the system call. */ + result = __syscall_lstat (name, &kbuf); + + /* Convert to current kernel version of `struct stat'. */ + buf->st_dev = kbuf.st_dev; + buf->st_pad1[0] = 0; buf->st_pad1[1] = 0; buf->st_pad1[2] = 0; + buf->st_ino = kbuf.st_ino; + buf->st_mode = kbuf.st_mode; + buf->st_nlink = kbuf.st_nlink; + buf->st_uid = kbuf.st_uid; + buf->st_gid = kbuf.st_gid; + buf->st_rdev = kbuf.st_rdev; + buf->st_pad2[0] = 0; buf->st_pad2[1] = 0; + buf->st_pad3 = 0; + buf->st_size = kbuf.st_size; + buf->st_blksize = kbuf.st_blksize; + buf->st_blocks = kbuf.st_blocks; + + buf->st_atime = kbuf.st_atime; buf->__reserved0 = 0; + buf->st_mtime = kbuf.st_mtime; buf->__reserved1 = 0; + buf->st_ctime = kbuf.st_ctime; buf->__reserved2 = 0; + + buf->st_pad4[0] = 0; buf->st_pad4[1] = 0; + buf->st_pad4[2] = 0; buf->st_pad4[3] = 0; + buf->st_pad4[4] = 0; buf->st_pad4[5] = 0; + buf->st_pad4[6] = 0; buf->st_pad4[7] = 0; + break; + + default: + __set_errno (EINVAL); + result = -1; + break; + } + + return result; +} +weak_alias (__lxstat, _lxstat) From 7679a4757cff6c0569643a1793fb1672e4fe0f0b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 22 Jul 1997 00:07:43 +0000 Subject: [PATCH 1018/4487] Renamed to lxstat.c. --- sysdeps/unix/sysv/linux/mips/lxstat.h | 80 --------------------------- 1 file changed, 80 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/mips/lxstat.h diff --git a/sysdeps/unix/sysv/linux/mips/lxstat.h b/sysdeps/unix/sysv/linux/mips/lxstat.h deleted file mode 100644 index 7907b2f2d2..0000000000 --- a/sysdeps/unix/sysv/linux/mips/lxstat.h +++ /dev/null @@ -1,80 +0,0 @@ -/* lxstat using old-style Unix lstat system call. - Copyright (C) 1991, 1995, 1996, 1997 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include -#include -#include - -#include - -extern int __syscall_lstat (const char *, struct kernel_stat *); - -/* Get information about the file NAME in BUF. */ -int -__lxstat (int vers, const char *name, struct stat *buf) -{ - struct kernel_stat kbuf; - int result; - - switch (vers) - { - case _STAT_VER_LINUX_OLD: - /* Nothing to do. The struct is in the form the kernel expects - it to be. */ - result = __syscall_lstat (name, (struct kernel_stat *) buf); - break; - - case _STAT_VER_LINUX: - /* Do the system call. */ - result = __syscall_lstat (name, &kbuf); - - /* Convert to current kernel version of `struct stat'. */ - buf->st_dev = kbuf.st_dev; - buf->st_pad1[0] = 0; buf->st_pad1[1] = 0; buf->st_pad1[2] = 0; - buf->st_ino = kbuf.st_ino; - buf->st_mode = kbuf.st_mode; - buf->st_nlink = kbuf.st_nlink; - buf->st_uid = kbuf.st_uid; - buf->st_gid = kbuf.st_gid; - buf->st_rdev = kbuf.st_rdev; - buf->st_pad2[0] = 0; buf->st_pad2[1] = 0; - buf->st_pad3 = 0; - buf->st_size = kbuf.st_size; - buf->st_blksize = kbuf.st_blksize; - buf->st_blocks = kbuf.st_blocks; - - buf->st_atime = kbuf.st_atime; buf->__reserved0 = 0; - buf->st_mtime = kbuf.st_mtime; buf->__reserved1 = 0; - buf->st_ctime = kbuf.st_ctime; buf->__reserved2 = 0; - - buf->st_pad4[0] = 0; buf->st_pad4[1] = 0; - buf->st_pad4[2] = 0; buf->st_pad4[3] = 0; - buf->st_pad4[4] = 0; buf->st_pad4[5] = 0; - buf->st_pad4[6] = 0; buf->st_pad4[7] = 0; - break; - - default: - __set_errno (EINVAL); - result = -1; - break; - } - - return result; -} -weak_alias (__lxstat, _lxstat) From a3d81156f7915d5dfc907fa3e559db94b19c2964 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 22 Jul 1997 00:07:51 +0000 Subject: [PATCH 1019/4487] Renamed to sgidefs.h. --- sysdeps/unix/sysv/linux/mips/sgidef.h | 28 --------------------------- 1 file changed, 28 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/mips/sgidef.h diff --git a/sysdeps/unix/sysv/linux/mips/sgidef.h b/sysdeps/unix/sysv/linux/mips/sgidef.h deleted file mode 100644 index a36ece0175..0000000000 --- a/sysdeps/unix/sysv/linux/mips/sgidef.h +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ralf Baechle . - - 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 - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _SGIDEFS_H -#define _SGIDEFS_H 1 - -/* - * The real definitions come from the Linux kernel sources - */ -#include - -#endif /* sgidefs.h */ From 426445603474f59d272e3b21541ec629ecb233af Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 22 Jul 1997 00:08:44 +0000 Subject: [PATCH 1020/4487] General MIPS header. --- sysdeps/unix/sysv/linux/mips/sgidefs.h | 28 ++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/mips/sgidefs.h diff --git a/sysdeps/unix/sysv/linux/mips/sgidefs.h b/sysdeps/unix/sysv/linux/mips/sgidefs.h new file mode 100644 index 0000000000..a36ece0175 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/sgidefs.h @@ -0,0 +1,28 @@ +/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ralf Baechle . + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SGIDEFS_H +#define _SGIDEFS_H 1 + +/* + * The real definitions come from the Linux kernel sources + */ +#include + +#endif /* sgidefs.h */ From 36968baa4091d1e1b78cc2439e0732b8c0ede065 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 22 Jul 1997 00:09:25 +0000 Subject: [PATCH 1021/4487] Add aliases for ntohl. --- sysdeps/vax/htonl.s | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sysdeps/vax/htonl.s b/sysdeps/vax/htonl.s index af5b96c22f..93e13ea9a1 100644 --- a/sysdeps/vax/htonl.s +++ b/sysdeps/vax/htonl.s @@ -23,8 +23,11 @@ #include "DEFS.h" -ENTRY(htonl, 0) +ENTRY(__htonl, 0) rotl $-8,4(ap),r0 insv r0,$16,$8,r0 movb 7(ap),r0 ret +strong_alias (__htonl, __ntohl) +weak_alias (__htonl, htonl) +weak_alias (__ntohl, ntohl) From e392c0f030e5584c11bd7d0357ef9caaf238a391 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 22 Jul 1997 00:09:30 +0000 Subject: [PATCH 1022/4487] Add aliases for ntohs. --- sysdeps/vax/htons.s | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysdeps/vax/htons.s b/sysdeps/vax/htons.s index c500e84506..16964c2861 100644 --- a/sysdeps/vax/htons.s +++ b/sysdeps/vax/htons.s @@ -28,3 +28,6 @@ ENTRY(htons, 0) movb 5(ap),r0 movzwl r0,r0 ret +strong_alias (__htons, __ntohs) +weak_alias (__htons, htons) +weak_alias (__ntohs, ntohs) From 284d16781d2d9566e83200e26f87a1e128de7ae3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 22 Jul 1997 00:09:47 +0000 Subject: [PATCH 1023/4487] We use aliases now. --- sysdeps/alpha/ntohl.s | 2 -- sysdeps/alpha/ntohs.s | 2 -- sysdeps/vax/ntohl.s | 30 ------------------------------ sysdeps/vax/ntohs.s | 30 ------------------------------ 4 files changed, 64 deletions(-) delete mode 100644 sysdeps/alpha/ntohl.s delete mode 100644 sysdeps/alpha/ntohs.s delete mode 100644 sysdeps/vax/ntohl.s delete mode 100644 sysdeps/vax/ntohs.s diff --git a/sysdeps/alpha/ntohl.s b/sysdeps/alpha/ntohl.s deleted file mode 100644 index 6a99a01dc4..0000000000 --- a/sysdeps/alpha/ntohl.s +++ /dev/null @@ -1,2 +0,0 @@ -/* This is a dummy to avoid including the generic version. htonl and -ntohl are identical and htonl.S defines appropriate aliases. */ diff --git a/sysdeps/alpha/ntohs.s b/sysdeps/alpha/ntohs.s deleted file mode 100644 index 69992a894c..0000000000 --- a/sysdeps/alpha/ntohs.s +++ /dev/null @@ -1,2 +0,0 @@ -/* This is a dummy to avoid including the generic version. htons and -ntohs are identical and htons.S defines appropriate aliases. */ diff --git a/sysdeps/vax/ntohl.s b/sysdeps/vax/ntohl.s deleted file mode 100644 index 0fcaa2f8e4..0000000000 --- a/sysdeps/vax/ntohl.s +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 1983 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -#if defined(LIBC_SCCS) && !defined(lint) - .asciz "@(#)ntohl.s 5.5 (Berkeley) 6/27/88" -#endif /* LIBC_SCCS and not lint */ - -/* hostorder = ntohl(netorder) */ - -#include "DEFS.h" - -ENTRY(ntohl, 0) - rotl $-8,4(ap),r0 - insv r0,$16,$8,r0 - movb 7(ap),r0 - ret diff --git a/sysdeps/vax/ntohs.s b/sysdeps/vax/ntohs.s deleted file mode 100644 index 626a37bf09..0000000000 --- a/sysdeps/vax/ntohs.s +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 1983 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -#if defined(LIBC_SCCS) && !defined(lint) - .asciz "@(#)ntohs.s 5.5 (Berkeley) 6/27/88" -#endif /* LIBC_SCCS and not lint */ - -/* hostorder = ntohs(netorder) */ - -#include "DEFS.h" - -ENTRY(ntohs, 0) - rotl $8,4(ap),r0 - movb 5(ap),r0 - movzwl r0,r0 - ret From 75dc7e89eb86594198deca639a96ea82181d0177 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 24 Jul 1997 01:32:45 +0000 Subject: [PATCH 1024/4487] Don't handle FE_INEXACT specially, the standard doesn't require it. --- sysdeps/m68k/fpu/fraiseexcpt.c | 30 ++---------------------------- 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/sysdeps/m68k/fpu/fraiseexcpt.c b/sysdeps/m68k/fpu/fraiseexcpt.c index d509604e28..bc49c9c71f 100644 --- a/sysdeps/m68k/fpu/fraiseexcpt.c +++ b/sysdeps/m68k/fpu/fraiseexcpt.c @@ -48,43 +48,17 @@ feraiseexcept (int excepts) /* Next: overflow. */ if (excepts & FE_OVERFLOW) { - /* We cannot raise the overflow exception without also setting the - inexact flag. Restore it after the operation, unless it should - be set anyway. */ long double d = LDBL_MAX; - fexcept_t fpsr; - __asm__ ("fmove%.l %/fpsr,%0" : "=dm" (fpsr)); - __asm__ __volatile__ ("fmul%.x %0,%0" : "=f" (d) : "0" (d)); - if (!((excepts | fpsr) & FE_INEXACT)) - { - __asm__ ("fmove%.l %/fpsr,%0" : "=dm" (fpsr)); - fpsr &= ~FE_INEXACT; - __asm__ __volatile__ ("fmove%.l %0,%/fpsr" : : "dm" (fpsr)); - } - else - __asm__ ("fnop"); + __asm__ __volatile__ ("fmul%.x %0,%0; fnop" : "=f" (d) : "0" (d)); } /* Next: underflow. */ if (excepts & FE_UNDERFLOW) { - /* We cannot raise the underflow exception without also setting the - inexact flag. Restore it after the operation, unless it should - be set anyway. */ long double d = -LDBL_MAX; - fexcept_t fpsr; - __asm__ ("fmove%.l %/fpsr,%0" : "=dm" (fpsr)); - __asm__ __volatile__ ("fetox%.x %0" : "=f" (d) : "0" (d)); - if (!((excepts | fpsr) & FE_INEXACT)) - { - __asm__ ("fmove%.l %/fpsr,%0" : "=dm" (fpsr)); - fpsr &= ~FE_INEXACT; - __asm__ __volatile__ ("fmove%.l %0,%/fpsr" : : "dm" (fpsr)); - } - else - __asm__ ("fnop"); + __asm__ __volatile__ ("fetox%.x %0; fnop" : "=f" (d) : "0" (d)); } /* Last: inexact. */ From 409871bc7595edd49df4072a15f47f89b68706e9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 24 Jul 1997 01:35:45 +0000 Subject: [PATCH 1025/4487] Don't define __ protected names. --- sysdeps/alpha/htonl.S | 8 +++----- sysdeps/alpha/htons.S | 8 +++----- sysdeps/vax/htonl.s | 6 ++---- sysdeps/vax/htons.s | 4 +--- 4 files changed, 9 insertions(+), 17 deletions(-) diff --git a/sysdeps/alpha/htonl.S b/sysdeps/alpha/htonl.S index c6e09f134f..4308192cbf 100644 --- a/sysdeps/alpha/htonl.S +++ b/sysdeps/alpha/htonl.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997 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 @@ -18,7 +18,7 @@ #include -ENTRY(__htonl) +ENTRY(htonl) #ifdef PROF ldgp gp, 0(pv) .set noat @@ -43,6 +43,4 @@ ENTRY(__htonl) END(__htonl) -strong_alias_asm(__htonl, __ntohl) -weak_alias(__htonl, htonl) -weak_alias(__htonl, ntohl) +weak_alias(htonl, ntohl) diff --git a/sysdeps/alpha/htons.S b/sysdeps/alpha/htons.S index 8d3aefe149..f65f0e0826 100644 --- a/sysdeps/alpha/htons.S +++ b/sysdeps/alpha/htons.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997 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 @@ -18,7 +18,7 @@ #include -ENTRY(__htons) +ENTRY(htons) #ifdef PROF ldgp gp, 0(pv) .set noat @@ -37,6 +37,4 @@ ENTRY(__htons) END(__htons) -strong_alias_asm(__htons, __ntohs) -weak_alias(__htons, htons) -weak_alias(__htons, ntohs) +weak_alias(htons, ntohs) diff --git a/sysdeps/vax/htonl.s b/sysdeps/vax/htonl.s index 93e13ea9a1..ba399865ec 100644 --- a/sysdeps/vax/htonl.s +++ b/sysdeps/vax/htonl.s @@ -23,11 +23,9 @@ #include "DEFS.h" -ENTRY(__htonl, 0) +ENTRY(htonl, 0) rotl $-8,4(ap),r0 insv r0,$16,$8,r0 movb 7(ap),r0 ret -strong_alias (__htonl, __ntohl) -weak_alias (__htonl, htonl) -weak_alias (__ntohl, ntohl) +weak_alias (htonl, ntohl) diff --git a/sysdeps/vax/htons.s b/sysdeps/vax/htons.s index 16964c2861..1e781a17c9 100644 --- a/sysdeps/vax/htons.s +++ b/sysdeps/vax/htons.s @@ -28,6 +28,4 @@ ENTRY(htons, 0) movb 5(ap),r0 movzwl r0,r0 ret -strong_alias (__htons, __ntohs) -weak_alias (__htons, htons) -weak_alias (__ntohs, ntohs) +weak_alias (htons, ntohs) From 40731e73fda6400072a55fc51bdd310905e8878a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 26 Jul 1997 02:25:44 +0000 Subject: [PATCH 1026/4487] Assembler version of gmon handling. --- sysdeps/arm/machine-gmon.h | 55 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 sysdeps/arm/machine-gmon.h diff --git a/sysdeps/arm/machine-gmon.h b/sysdeps/arm/machine-gmon.h new file mode 100644 index 0000000000..27643df884 --- /dev/null +++ b/sysdeps/arm/machine-gmon.h @@ -0,0 +1,55 @@ +/* Machine-dependent definitions for profiling support. ARM version. + Copyright (C) 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* GCC for the ARM cannot compile __builtin_return_address(N) for N != 0, + so we must use an assembly stub. */ + +#include +#ifndef NO_UNDERSCORES +/* The asm symbols for C functions are `_function'. + The canonical name for the counter function is `mcount', no _. */ +void _mcount (void) asm ("mcount"); +#else +/* The canonical name for the function is `_mcount' in both C and asm, + but some old asm code might assume it's `mcount'. */ +void _mcount (void); +weak_alias (_mcount, mcount) +#endif + +static void mcount_internal (u_long frompc, u_long selfpc); + +#define _MCOUNT_DECL(frompc, selfpc) \ +static void mcount_internal (u_long frompc, u_long selfpc) + +#define MCOUNT \ +void _mcount (void) \ +{ \ + register unsigned long int frompc, selfpc; \ + __asm__("movs fp, fp; " \ + "moveq %0, $0; " \ + "ldrne %0, [fp, $-4]; " \ + "ldrne %1, [fp, $-12]; " \ + "movnes %1, %1; " \ + "ldrne %1, [%1, $-4]; " \ + : "=g" (selfpc), "=g" (frompc) \ + : : "cc" \ + ); \ + if (selfpc) \ + mcount_internal(frompc, selfpc); \ +} From fdbb0d4a45f82eb920d120205f9d9680d3185a97 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 26 Jul 1997 02:30:58 +0000 Subject: [PATCH 1027/4487] Remove __PIC__ comment. --- sysdeps/mips/bsd-_setjmp.S | 1 - sysdeps/mips/bsd-setjmp.S | 1 - 2 files changed, 2 deletions(-) diff --git a/sysdeps/mips/bsd-_setjmp.S b/sysdeps/mips/bsd-_setjmp.S index 819a7018c4..6d841fc237 100644 --- a/sysdeps/mips/bsd-_setjmp.S +++ b/sysdeps/mips/bsd-_setjmp.S @@ -23,7 +23,6 @@ #include -/* XXX Must this be __PIC__ ? --drepper */ #ifdef PIC .option pic2 #endif diff --git a/sysdeps/mips/bsd-setjmp.S b/sysdeps/mips/bsd-setjmp.S index f220404c2c..000aee436a 100644 --- a/sysdeps/mips/bsd-setjmp.S +++ b/sysdeps/mips/bsd-setjmp.S @@ -23,7 +23,6 @@ #include -/* XXX Must this be __PIC__ ? --drepper */ #ifdef PIC .option pic2 #endif From dca3aa22294f7419418b6baa01ae7cefd79cfbe3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 26 Jul 1997 02:31:10 +0000 Subject: [PATCH 1028/4487] Remove extra stuff. --- sysdeps/mips/dl-machine.h | 10 ---------- sysdeps/mips/mips64/dl-machine.h | 10 ---------- 2 files changed, 20 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 7456ae0b7a..fce7cffb4a 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -96,16 +96,6 @@ elf_machine_matches_host (ElfW(Half) e_machine) } } -/* Return the link-time address of _DYNAMIC. Conveniently, this is the -+ first element of the GOT. This must be inlined in a function which -+ uses global data. */ -+static inline ElfW(Addr) -+elf_machine_dynamic (void) -+{ -+ register ElfW(Addr) gp asm ("$28"); -+ return * (ElfW(Addr) *) (gp - 0x7ff0); -+} -+ static inline ElfW(Addr) * elf_mips_got_from_gpreg (ElfW(Addr) gpreg) { diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h index 3277b109d9..a20835af35 100644 --- a/sysdeps/mips/mips64/dl-machine.h +++ b/sysdeps/mips/mips64/dl-machine.h @@ -96,16 +96,6 @@ elf_machine_matches_host (ElfW(Half) e_machine) } } -/* Return the link-time address of _DYNAMIC. Conveniently, this is the -+ first element of the GOT. This must be inlined in a function which -+ uses global data. */ -+static inline ElfW(Addr) -+elf_machine_dynamic (void) -+{ -+ register ElfW(Addr) gp asm ("$28"); -+ return * (ElfW(Addr) *) (gp - 0x7ff0); -+} -+ static inline ElfW(Addr) * elf_mips_got_from_gpreg (ElfW(Addr) gpreg) { From c7928d2e8f8fc7b38fd7960afd37f97e21c91ff9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 26 Jul 1997 02:31:50 +0000 Subject: [PATCH 1029/4487] basic definitions for ARM standalone. --- sysdeps/standalone/arm/sysdep.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 sysdeps/standalone/arm/sysdep.c diff --git a/sysdeps/standalone/arm/sysdep.c b/sysdeps/standalone/arm/sysdep.c new file mode 100644 index 0000000000..d2564204ea --- /dev/null +++ b/sysdeps/standalone/arm/sysdep.c @@ -0,0 +1,32 @@ +/* Copyright (C) 1995, 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +/* errno has to be defined somewhere, and it might as well be here. */ +int errno = 0; + +/* The same goes for these magic signal functions. This is a standalone + environment so we do nothing. */ +void _sig_dfl(int sig) +{ +} + +void _sig_ign(int sig) +{ +} From 4ce95ed21a8465410412ec7cf0973dbf1fc8f5e5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 26 Jul 1997 02:31:58 +0000 Subject: [PATCH 1030/4487] Add ESTALE. --- sysdeps/standalone/arm/bits/errno.h | 51 +++++++++++++++-------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/sysdeps/standalone/arm/bits/errno.h b/sysdeps/standalone/arm/bits/errno.h index 49a4998cf8..362b43dacf 100644 --- a/sysdeps/standalone/arm/bits/errno.h +++ b/sysdeps/standalone/arm/bits/errno.h @@ -19,35 +19,36 @@ /* This file defines the `errno' constants for standalone ARM machines. These constants are essentially arbitrary. */ -#if !defined(__Emath_defined) && (defined(_ERRNO_H) || defined(__need_Emath)) -#undef __need_Emath -#define __Emath_defined 1 +#if !defined __Emath_defined && (defined _ERRNO_H || defined __need_Emath) +# undef __need_Emath +# define __Emath_defined 1 -#define EDOM 1 -#define ERANGE 2 +# define EDOM 1 +# define ERANGE 2 #endif #ifdef _ERRNO_H -#define ENOSYS 3 -#define EINVAL 4 -#define ESPIPE 5 -#define EBADF 6 -#define ENOMEM 7 -#define EACCES 8 -#define ENFILE 9 -#define EMFILE 10 -#define ENAMETOOLONG 11 /* File name too long */ -#define ELOOP 12 /* Too many symbolic links encountered */ -#define ENOMSG 13 /* No message of desired type */ -#define E2BIG 14 /* Arg list too long */ -#define EINTR 15 -#define EILSEQ 16 -#define ENOEXEC 17 -#define ENOENT 18 -#define EPROTOTYPE 19 -#define ESRCH 20 -#define EPERM 21 -#define ENOTDIR 22 +# define ENOSYS 3 +# define EINVAL 4 +# define ESPIPE 5 +# define EBADF 6 +# define ENOMEM 7 +# define EACCES 8 +# define ENFILE 9 +# define EMFILE 10 +# define ENAMETOOLONG 11 /* File name too long */ +# define ELOOP 12 /* Too many symbolic links encountered */ +# define ENOMSG 13 /* No message of desired type */ +# define E2BIG 14 /* Arg list too long */ +# define EINTR 15 +# define EILSEQ 16 +# define ENOEXEC 17 +# define ENOENT 18 +# define EPROTOTYPE 19 +# define ESRCH 20 +# define EPERM 21 +# define ENOTDIR 22 +# define ESTALE 23 #endif #define __set_errno(val) errno = (val) From 2cf49ef8cd042dacb8cc760c15356db42e3bdbb3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 26 Jul 1997 02:33:13 +0000 Subject: [PATCH 1031/4487] Check PIC instead of __PIC__. --- sysdeps/unix/mips/sysdep.S | 2 +- sysdeps/unix/sysv/linux/mips/clone.S | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/mips/sysdep.S b/sysdeps/unix/mips/sysdep.S index ac8335fe5b..4275d664ec 100644 --- a/sysdeps/unix/mips/sysdep.S +++ b/sysdeps/unix/mips/sysdep.S @@ -29,7 +29,7 @@ .set noreorder ENTRY(__syscall_error) -#ifdef __PIC__ +#ifdef PIC .set noat move $1, $31 bltzal $0, 0f diff --git a/sysdeps/unix/sysv/linux/mips/clone.S b/sysdeps/unix/sysv/linux/mips/clone.S index 357f70e47f..4d6408dc97 100644 --- a/sysdeps/unix/sysv/linux/mips/clone.S +++ b/sysdeps/unix/sysv/linux/mips/clone.S @@ -37,7 +37,7 @@ .text NESTED(__clone,4*SZREG,sp) -#ifdef __PIC__ +#ifdef PIC .set noreorder .cpload $25 .set reorder From 2ed7206696078b71c82ed318ef28d585d89d3259 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 28 Jul 1997 22:06:27 +0000 Subject: [PATCH 1032/4487] (elf_machine_runtime_setup): Add new parameter to enable profiling. (elf_machine_rela): Add new parameter to --- sysdeps/alpha/dl-machine.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 49d6830a65..746cdd236b 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -87,7 +87,7 @@ elf_machine_load_address (void) entries will jump to the on-demand fixup code in dl-runtime.c. */ static inline int -elf_machine_runtime_setup (struct link_map *l, int lazy) +elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) { Elf64_Addr plt; extern void _dl_runtime_resolve (void); @@ -348,9 +348,9 @@ static inline void elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc, const Elf64_Sym *sym, - const struct r_found_version *version) + const struct r_found_version *version, + Elf64_Addr *const reloc_addr) { - Elf64_Addr * const reloc_addr = (void *)(map->l_addr + reloc->r_offset); unsigned long const r_type = ELF64_R_TYPE (reloc->r_info); #ifndef RTLD_BOOTSTRAP From 482bd6c6e4ab0d1a4b611b8bd939c9e441d8e71f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 28 Jul 1997 22:31:42 +0000 Subject: [PATCH 1033/4487] (elf_machine_runtime_setup): Add new parameter to enable profiling. (elf_machine_rela): Add new parameter to specify place to store result in. --- sysdeps/m68k/dl-machine.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index c0a17c73c2..7c62aa2aad 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -76,7 +76,7 @@ elf_machine_load_address (void) entries will jump to the on-demand fixup code in dl-runtime.c. */ static inline int -elf_machine_runtime_setup (struct link_map *l, int lazy) +elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) { Elf32_Addr *got; extern void _dl_runtime_resolve (Elf32_Word); @@ -211,10 +211,9 @@ elf_machine_runtime_setup (struct link_map *l, int lazy) static inline void elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, - const Elf32_Sym *sym, const struct r_found_version *version) + const Elf32_Sym *sym, const struct r_found_version *version, + Elf32_Addr *const reloc_addr) { - Elf32_Addr *const reloc_addr = (void *) (map->l_addr + reloc->r_offset); - if (ELF32_R_TYPE (reloc->r_info) == R_68K_RELATIVE) *reloc_addr = map->l_addr + reloc->r_addend; else From c093785fe99db496cec7028a9de85604663d7266 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 28 Jul 1997 22:32:03 +0000 Subject: [PATCH 1034/4487] M68k optimized functions for swapping byte order. --- sysdeps/m68k/bits/byteswap.h | 63 ++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 sysdeps/m68k/bits/byteswap.h diff --git a/sysdeps/m68k/bits/byteswap.h b/sysdeps/m68k/bits/byteswap.h new file mode 100644 index 0000000000..54ec0d1920 --- /dev/null +++ b/sysdeps/m68k/bits/byteswap.h @@ -0,0 +1,63 @@ +/* Macros to swap the order of bytes in integer values. m68k version. + Copyright (C) 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _BITS_BYTESWAP_H +#define _BITS_BYTESWAP_H 1 + +/* Swap bytes in 16 bit value. We don't provide an assembler version + because GCC is smart enough to generate optimal assembler output, and + this allows for better cse. */ +#define __bswap_16(x) \ + ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)) + +/* Swap bytes in 32 bit value. */ +#define __bswap_constant_32(x) \ + ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \ + (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24)) + +#if defined __GNUC__ && __GNUC__ >= 2 +#define __bswap_32(x) \ + __extension__ \ + ({ unsigned int __v; \ + if (__builtin_constant_p (x)) \ + __v = __bswap_constant_32 (x); \ + else \ + __asm__ __volatile__ ("ror%.w %#8, %0;" \ + "swap %0;" \ + "ror%.w %#8, %0" \ + : "=d" (__v) \ + : "0" (x)); \ + __v; }) +#else +#define __bswap_32(x) __bswap_constant_32 (x) +#endif + +#if defined __GNUC__ && __GNUC__ >= 2 +/* Swap bytes in 64 bit value. */ +#define __bswap_64(x) \ + __extension__ \ + ({ union { unsigned long long int __ll; \ + unsigned long int __l[2]; } __v, __r; \ + __v.__ll = (x); \ + __r.__l[0] = __bswap_32 (__v.__l[1]); \ + __r.__l[1] = __bswap_32 (__v.__l[0]); \ + __r.__ll; }) +#endif + +#endif /* bits/byteswap.h */ From 1d928c6a5c3df9388caeeedfd0f90a7effb6f9f3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 28 Jul 1997 22:32:21 +0000 Subject: [PATCH 1035/4487] (elf_machine_runtime_setup): Add new parameter to enable profiling. (elf_machine_rela): Add new parameter to specify place to store result in. --- sysdeps/mips/dl-machine.h | 6 +++--- sysdeps/mips/mips64/dl-machine.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index fce7cffb4a..6973f7612a 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -219,7 +219,7 @@ elf_machine_got_rel (struct link_map *map, int lazy) will jump to the on-demand fixup code in dl-runtime.c. */ static inline int -elf_machine_runtime_setup (struct link_map *l, int lazy) +elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) { ElfW(Addr) *got; extern void _dl_runtime_resolve (ElfW(Word)); @@ -533,9 +533,9 @@ _RTLD_EPILOGUE(ENTRY_POINT)\ static inline void elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, - const ElfW(Sym) *sym, const struct r_found_version *version) + const ElfW(Sym) *sym, const struct r_found_version *version, + ElfW(Addr) *const reloc_addr) { - ElfW(Addr) *const reloc_addr = (void *) (map->l_addr + reloc->r_offset); ElfW(Addr) loadbase; ElfW(Addr) undo __attribute__ ((unused)); diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h index a20835af35..e501a2520e 100644 --- a/sysdeps/mips/mips64/dl-machine.h +++ b/sysdeps/mips/mips64/dl-machine.h @@ -219,7 +219,7 @@ elf_machine_got_rel (struct link_map *map, int lazy) will jump to the on-demand fixup code in dl-runtime.c. */ static inline int -elf_machine_runtime_setup (struct link_map *l, int lazy) +elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) { ElfW(Addr) *got; extern void _dl_runtime_resolve (ElfW(Word)); @@ -529,9 +529,9 @@ _RTLD_EPILOGUE(ENTRY_POINT) \ static inline void elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, - const ElfW(Sym) *sym, const struct r_found_version *version) + const ElfW(Sym) *sym, const struct r_found_version *version, + ElfW(Addr) *const reloc_addr) { - ElfW(Addr) *const reloc_addr = (void *) (map->l_addr + reloc->r_offset); ElfW(Addr) loadbase; ElfW(Addr) undo __attribute__ ((unused)); From 6e8e1d85e0e261b2115cc54e70eed22cb7f731d4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 2 Aug 1997 20:56:48 +0000 Subject: [PATCH 1036/4487] Add support for shared library profiling. --- sysdeps/m68k/dl-machine.h | 47 +++++++++++++++++++++++++++++---------- 1 file changed, 35 insertions(+), 12 deletions(-) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index 7c62aa2aad..01fc339928 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -80,6 +80,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) { Elf32_Addr *got; extern void _dl_runtime_resolve (Elf32_Word); + extern void _dl_runtime_profile (Elf32_Word); if (l->l_info[DT_JMPREL] && lazy) { @@ -90,10 +91,23 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) _GLOBAL_OFFSET_TABLE_[2]. */ got = (Elf32_Addr *) (l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr); got[1] = (Elf32_Addr) l; /* Identify this shared object. */ - /* This function will get called to fix up the GOT entry - indicated by the offset on the stack, and then jump to the - resolved address. */ - got[2] = (Elf32_Addr) &_dl_runtime_resolve; + + /* The got[2] entry contains the address of a function which gets + called to get the address of a so far unresolved function and + jump to it. The profiling extension of the dynamic linker allows + to intercept the calls to collect information. In this case we + don't store the address in the GOT so that all future calls also + end in this function. */ + if (profile) + { + got[2] = (Elf32_Addr) &_dl_runtime_profile; + /* Say that we really want profiling and the timers are started. */ + _dl_profile_map = l; + } + else + /* This function will get called to fix up the GOT entry indicated by + the offset on the stack, and then jump to the resolved address. */ + got[2] = (Elf32_Addr) &_dl_runtime_resolve; } return lazy; @@ -101,16 +115,16 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) /* This code is used in dl-runtime.c to call the `fixup' function and then redirect to the address it returns. */ -#define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\ -| Trampoline for _dl_runtime_resolver - .globl _dl_runtime_resolve - .type _dl_runtime_resolve, @function -_dl_runtime_resolve: +#define TRAMPOLINE_TEMPLATE(tramp_name, fixup_name) \ +"| Trampoline for " #fixup_name " + .globl " #tramp_name " + .type " #tramp_name ", @function +" #tramp_name ": | Save %a0 (struct return address) and %a1. move.l %a0, -(%sp) move.l %a1, -(%sp) | Call the real address resolver. - jbsr fixup + jbsr " #fixup_name " | Restore register %a0 and %a1. move.l (%sp)+, %a1 move.l (%sp)+, %a0 @@ -118,8 +132,17 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) addq.l #8, %sp | Call real function. jmp (%d0) - .size _dl_runtime_resolve, . - _dl_runtime_resolve -"); + .size " #tramp_name ", . - " #tramp_name "\n" +#ifndef PROF +#define ELF_MACHINE_RUNTIME_TRAMPOLINE \ +asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \ + TRAMPOLINE_TEMPLATE (_dl_runtime_profile, profile_fixup)); +#else +#define ELF_MACHINE_RUNTIME_TRAMPOLINE \ +asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \ + ".globl _dl_runtime_profile\n" \ + ".set _dl_runtime_profile, _dl_runtime_resolve"); +#endif #define ELF_MACHINE_RUNTIME_FIXUP_ARGS long int save_a0, long int save_a1 /* The PLT uses Elf32_Rela relocs. */ #define elf_machine_relplt elf_machine_rela From e1da12893a2966dfc9ee4981c5a98c8b3afe70c1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 4 Aug 1997 14:26:01 +0000 Subject: [PATCH 1037/4487] Replace call to abort by infinite loop, to avoid dragging stdio into the dynamic linker. --- sysdeps/m68k/__longjmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/m68k/__longjmp.c b/sysdeps/m68k/__longjmp.c index c3e400c4c5..e6ec43c465 100644 --- a/sysdeps/m68k/__longjmp.c +++ b/sysdeps/m68k/__longjmp.c @@ -50,6 +50,6 @@ __longjmp (__jmp_buf env, int val) because this code always jumps out anyway. */ ); - /* This call avoids `volatile function does return' warnings. */ - abort (); + /* Avoid `volatile function does return' warnings. */ + for (;;); } From 95cb9068ca1f3376b897969daf6eb65179353f2b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 4 Aug 1997 14:29:00 +0000 Subject: [PATCH 1038/4487] Define socklen_t. (struct msghdr): Correct types to use socklen_t. --- sysdeps/unix/sysv/linux/mips/bits/socket.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h index 15f420fc9c..02f1d22a6c 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/socket.h +++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h @@ -28,9 +28,11 @@ #define __need_NULL #include - __BEGIN_DECLS +/* Type for length arguments in socket calls. */ +typedef unsigned int socklen_t; + /* Supported address families. */ #define PF_UNSPEC 0 #define PF_UNIX 1 /* Unix domain sockets */ @@ -103,25 +105,22 @@ enum struct msghdr { __ptr_t msg_name; /* Address to send to/receive from. */ - int msg_namelen; /* Length of address data. */ - /* XXX Should be type `size_t' according to POSIX.1g. */ + socklen_t msg_namelen; /* Length of address data. */ struct iovec *msg_iov; /* Vector of data to send/receive into. */ int msg_iovlen; /* Number of elements in the vector. */ - /* XXX Should be type `size_t' according to POSIX.1g. */ __ptr_t msg_control; /* Ancillary data (eg BSD filedesc passing). */ - int msg_controllen; /* Ancillary data buffer length. */ - /* XXX Should be type `size_t' according to POSIX.1g. */ + socklen_t msg_controllen; /* Ancillary data buffer length. */ + int msg_flags; /* Flags on received message. */ }; /* Structure used for storage of ancillary data object information. */ struct cmsghdr { - int cmsg_len; /* Length of data in cmsg_data plus length + socklen_t cmsg_len; /* Length of data in cmsg_data plus length of cmsghdr structure. */ - /* XXX Should be type `size_t' according to POSIX.1g. */ int cmsg_level; /* Originating protocol. */ int cmsg_type; /* Protocol specific type. */ #if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2 From 80bf28e227b80e9839d4dcec0d52342eb7b281fe Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 10 Aug 1997 17:34:46 +0000 Subject: [PATCH 1039/4487] Add empty file to prevent the version from libm-ieee754 be compiled since the later is not needed. --- sysdeps/m68k/fpu/e_rem_pio2.c | 3 +++ sysdeps/m68k/fpu/e_rem_pio2f.c | 3 +++ sysdeps/m68k/fpu/e_rem_pio2l.c | 3 +++ sysdeps/m68k/fpu/k_rem_pio2.c | 3 +++ sysdeps/m68k/fpu/k_rem_pio2f.c | 3 +++ sysdeps/m68k/fpu/k_rem_pio2l.c | 3 +++ 6 files changed, 18 insertions(+) create mode 100644 sysdeps/m68k/fpu/e_rem_pio2.c create mode 100644 sysdeps/m68k/fpu/e_rem_pio2f.c create mode 100644 sysdeps/m68k/fpu/e_rem_pio2l.c create mode 100644 sysdeps/m68k/fpu/k_rem_pio2.c create mode 100644 sysdeps/m68k/fpu/k_rem_pio2f.c create mode 100644 sysdeps/m68k/fpu/k_rem_pio2l.c diff --git a/sysdeps/m68k/fpu/e_rem_pio2.c b/sysdeps/m68k/fpu/e_rem_pio2.c new file mode 100644 index 0000000000..1347b0468c --- /dev/null +++ b/sysdeps/m68k/fpu/e_rem_pio2.c @@ -0,0 +1,3 @@ +/* Empty. This file is only meant to avoid compiling the file with the + same name in the libm-ieee754 directory. The code is not used since + there is an assembler version for all users of this file. */ diff --git a/sysdeps/m68k/fpu/e_rem_pio2f.c b/sysdeps/m68k/fpu/e_rem_pio2f.c new file mode 100644 index 0000000000..1347b0468c --- /dev/null +++ b/sysdeps/m68k/fpu/e_rem_pio2f.c @@ -0,0 +1,3 @@ +/* Empty. This file is only meant to avoid compiling the file with the + same name in the libm-ieee754 directory. The code is not used since + there is an assembler version for all users of this file. */ diff --git a/sysdeps/m68k/fpu/e_rem_pio2l.c b/sysdeps/m68k/fpu/e_rem_pio2l.c new file mode 100644 index 0000000000..1347b0468c --- /dev/null +++ b/sysdeps/m68k/fpu/e_rem_pio2l.c @@ -0,0 +1,3 @@ +/* Empty. This file is only meant to avoid compiling the file with the + same name in the libm-ieee754 directory. The code is not used since + there is an assembler version for all users of this file. */ diff --git a/sysdeps/m68k/fpu/k_rem_pio2.c b/sysdeps/m68k/fpu/k_rem_pio2.c new file mode 100644 index 0000000000..1347b0468c --- /dev/null +++ b/sysdeps/m68k/fpu/k_rem_pio2.c @@ -0,0 +1,3 @@ +/* Empty. This file is only meant to avoid compiling the file with the + same name in the libm-ieee754 directory. The code is not used since + there is an assembler version for all users of this file. */ diff --git a/sysdeps/m68k/fpu/k_rem_pio2f.c b/sysdeps/m68k/fpu/k_rem_pio2f.c new file mode 100644 index 0000000000..1347b0468c --- /dev/null +++ b/sysdeps/m68k/fpu/k_rem_pio2f.c @@ -0,0 +1,3 @@ +/* Empty. This file is only meant to avoid compiling the file with the + same name in the libm-ieee754 directory. The code is not used since + there is an assembler version for all users of this file. */ diff --git a/sysdeps/m68k/fpu/k_rem_pio2l.c b/sysdeps/m68k/fpu/k_rem_pio2l.c new file mode 100644 index 0000000000..1347b0468c --- /dev/null +++ b/sysdeps/m68k/fpu/k_rem_pio2l.c @@ -0,0 +1,3 @@ +/* Empty. This file is only meant to avoid compiling the file with the + same name in the libm-ieee754 directory. The code is not used since + there is an assembler version for all users of this file. */ From 5cd503e5c1b85958a59d94ca284468bdf14d98f5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 10 Aug 1997 17:39:01 +0000 Subject: [PATCH 1040/4487] Additional files to istribute for mips/mipsel. --- sysdeps/mips/mipsel/Dist | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/mips/mipsel/Dist diff --git a/sysdeps/mips/mipsel/Dist b/sysdeps/mips/mipsel/Dist new file mode 100644 index 0000000000..98a10ec269 --- /dev/null +++ b/sysdeps/mips/mipsel/Dist @@ -0,0 +1 @@ +rtld-parms From b50d0b3659feb7b7994928910d1ffcc19531ed29 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 10 Aug 1997 17:51:30 +0000 Subject: [PATCH 1041/4487] Add EISDIR, EOPNOTSUPP; tidy up formatting. --- sysdeps/standalone/arm/bits/errno.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sysdeps/standalone/arm/bits/errno.h b/sysdeps/standalone/arm/bits/errno.h index 362b43dacf..f5020dcb7e 100644 --- a/sysdeps/standalone/arm/bits/errno.h +++ b/sysdeps/standalone/arm/bits/errno.h @@ -38,17 +38,19 @@ # define EMFILE 10 # define ENAMETOOLONG 11 /* File name too long */ # define ELOOP 12 /* Too many symbolic links encountered */ -# define ENOMSG 13 /* No message of desired type */ +# define ENOMSG 13 /* No message of desired type */ # define E2BIG 14 /* Arg list too long */ # define EINTR 15 # define EILSEQ 16 -# define ENOEXEC 17 +# define ENOEXEC 17 # define ENOENT 18 # define EPROTOTYPE 19 # define ESRCH 20 # define EPERM 21 -# define ENOTDIR 22 -# define ESTALE 23 +# define ENOTDIR 22 +# define ESTALE 23 +# define EISDIR 24 +# define EOPNOTSUPP 25 /* Operation not supported. */ #endif #define __set_errno(val) errno = (val) From c69e79f1da075354a964f546522be6f9b40cd986 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 10 Aug 1997 17:56:16 +0000 Subject: [PATCH 1042/4487] Test feature macros before defining non-POSIX things. Add MAP_FAILED. --- sysdeps/unix/bsd/osf/sys/mman.h | 77 ++++++++++++++------------ sysdeps/unix/bsd/sun/sunos4/sys/mman.h | 53 ++++++++++-------- sysdeps/unix/bsd/ultrix4/sys/mman.h | 45 ++++++++------- sysdeps/unix/sysv/irix4/sys/mman.h | 77 ++++++++++++++------------ 4 files changed, 143 insertions(+), 109 deletions(-) diff --git a/sysdeps/unix/bsd/osf/sys/mman.h b/sysdeps/unix/bsd/osf/sys/mman.h index 72846195d2..816f271e30 100644 --- a/sysdeps/unix/bsd/osf/sys/mman.h +++ b/sysdeps/unix/bsd/osf/sys/mman.h @@ -1,5 +1,5 @@ /* Definitions for BSD-style memory management. OSF/1 version. - Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc. + Copyright (C) 1994, 1995, 1996, 1997 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 @@ -32,46 +32,53 @@ without PROT_READ. The only guarantees are that no writing will be allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ -#define PROT_NONE 0x00 /* No access. */ -#define PROT_READ 0x01 /* Pages can be read. */ -#define PROT_WRITE 0x02 /* Pages can be written. */ -#define PROT_EXEC 0x04 /* Pages can be executed. */ +#define PROT_NONE 0x00 /* No access. */ +#define PROT_READ 0x01 /* Pages can be read. */ +#define PROT_WRITE 0x02 /* Pages can be written. */ +#define PROT_EXEC 0x04 /* Pages can be executed. */ /* Flags contain mapping type, sharing type and options. */ /* Mapping type (must choose one and only one of these). */ -#define MAP_FILE 0x00 /* Mapped from a file or device. */ -#define MAP_ANON 0x10 /* Allocated from anonymous virtual memory. */ -#define MAP_ANONYMOUS MAP_ANON -#define MAP_TYPE 0xf0 /* Mask for type field. */ +#ifdef __USE_BSD +# define MAP_FILE 0x00 /* Mapped from a file or device. */ +# define MAP_ANON 0x10 /* Allocated from anonymous virtual memory. */ +# define MAP_ANONYMOUS MAP_ANON +# define MAP_TYPE 0xf0 /* Mask for type field. */ +#endif /* Sharing types (must choose one and only one of these). */ -#define MAP_SHARED 0x01 /* Share changes. */ -#define MAP_PRIVATE 0x02 /* Changes private; copy pages on write. */ +#define MAP_SHARED 0x01 /* Share changes. */ +#define MAP_PRIVATE 0x02 /* Changes private; copy pages on write. */ /* Other flags. */ -#define MAP_FIXED 0x0100 /* Map address must be exactly as requested. */ -#define MAP_VARIABLE 0 /* Absence of MAP_FIXED. */ -#define MAP_HASSEMPHORE 0x0200 /* Region may contain semaphores. */ -#define MAP_INHERIT 0x0400 /* Region is retained after exec. */ -#define MAP_UNALIGNED 0x0800 /* File offset need not be page-aligned. */ +#define MAP_FIXED 0x0100 /* Map address must be exactly as requested. */ +#ifdef __USE_BSD +# define MAP_VARIABLE 0 /* Absence of MAP_FIXED. */ +# define MAP_HASSEMPHORE 0x0200 /* Region may contain semaphores. */ +# define MAP_INHERIT 0x0400 /* Region is retained after exec. */ +# define MAP_UNALIGNED 0x0800 /* File offset need not be page-aligned. */ +#endif /* Advice to `madvise'. */ -#define MADV_NORMAL 0 /* No further special treatment. */ -#define MADV_RANDOM 1 /* Expect random page references. */ -#define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -#define MADV_WILLNEED 3 /* Will need these pages. */ -#define MADV_DONTNEED 4 /* Don't need these pages. */ -#define MADV_SPACEAVAIL 5 /* Ensure that resources are available. */ +#ifdef __USE_BSD +# define MADV_NORMAL 0 /* No further special treatment. */ +# define MADV_RANDOM 1 /* Expect random page references. */ +# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define MADV_WILLNEED 3 /* Will need these pages. */ +# define MADV_DONTNEED 4 /* Don't need these pages. */ +# define MADV_SPACEAVAIL 5 /* Ensure that resources are available. */ +#endif /* Flags to `msync'. */ #define MS_ASYNC 1 /* Asynchronous cache flush. */ #define MS_SYNC 3 /* Synchronous cache flush. */ #define MS_INVALIDATE 4 /* Invalidate cached pages. */ +/* Return value of `mmap' in case of an error. */ +#define MAP_FAILED ((__caddr_t) -1) -#include __BEGIN_DECLS /* Map addresses starting near ADDR and extending for LEN bytes. from @@ -79,34 +86,36 @@ __BEGIN_DECLS is nonzero, it is the desired mapping address. If the MAP_FIXED bit is set in FLAGS, the mapping will be at ADDR exactly (which must be page-aligned); otherwise the system chooses a convenient nearby address. - The return value is the actual mapping address chosen or (caddr_t) -1 + The return value is the actual mapping address chosen or MAP_FAILED for errors (in which case `errno' is set). A successful `mmap' call deallocates any previous mapping for the affected region. */ -__caddr_t __mmap __P ((__caddr_t __addr, size_t __len, - int __prot, int __flags, int __fd, off_t __offset)); -__caddr_t mmap __P ((__caddr_t __addr, size_t __len, - int __prot, int __flags, int __fd, off_t __offset)); +extern __caddr_t __mmap __P ((__caddr_t __addr, size_t __len, int __prot, + int __flags, int __fd, off_t __offset)); +extern __caddr_t mmap __P ((__caddr_t __addr, size_t __len, int __prot, + int __flags, int __fd, off_t __offset)); /* Deallocate any mapping for the region starting at ADDR and extending LEN bytes. Returns 0 if successful, -1 for errors (and sets errno). */ -int __munmap __P ((__caddr_t __addr, size_t __len)); -int munmap __P ((__caddr_t __addr, size_t __len)); +extern int __munmap __P ((__caddr_t __addr, size_t __len)); +extern int munmap __P ((__caddr_t __addr, size_t __len)); /* Change the memory protection of the region starting at ADDR and extending LEN bytes to PROT. Returns 0 if successful, -1 for errors (and sets errno). */ -int __mprotect __P ((__caddr_t __addr, size_t __len, int __prot)); -int mprotect __P ((__caddr_t __addr, size_t __len, int __prot)); +extern int __mprotect __P ((__caddr_t __addr, size_t __len, int __prot)); +extern int mprotect __P ((__caddr_t __addr, size_t __len, int __prot)); /* Synchronize the region starting at ADDR and extending LEN bytes with the file it maps. Filesystem operations on a file being mapped are unpredictable before this is done. */ -int msync __P ((__caddr_t __addr, size_t __len, int __flags)); +extern int msync __P ((__caddr_t __addr, size_t __len, int __flags)); +#ifdef __USE_BSD /* Advise the system about particular usage patterns the program follows for the region starting at ADDR and extending LEN bytes. */ -int madvise __P ((__caddr_t __addr, size_t __len, int __advice)); +extern int madvise __P ((__caddr_t __addr, size_t __len, int __advice)); +#endif __END_DECLS diff --git a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h index 65771a2aac..d2a8998d9a 100644 --- a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h +++ b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h @@ -1,5 +1,5 @@ /* Definitions for BSD-style memory management. SunOS 4 version. - Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc. + Copyright (C) 1994, 1995, 1996, 1997 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 @@ -41,14 +41,18 @@ /* Sharing types (must choose one and only one of these). */ #define MAP_SHARED 0x01 /* Share changes. */ #define MAP_PRIVATE 0x02 /* Changes private; copy pages on write. */ -#define MAP_TYPE 0x0f /* Mask for sharing type. */ +#ifdef __USE_BSD +# define MAP_TYPE 0x0f /* Mask for sharing type. */ +#endif /* Other flags. */ #define MAP_FIXED 0x10 /* Map address must be exactly as requested. */ /* The following three flags are not actually implemented in SunOS 4.1. */ -#define MAP_RENAME 0x20 /* Rename private pages to file. */ -#define MAP_NORESERVE 0x40 /* Don't reserve needed swap area. */ -#define MAP_INHERIT 0x80 /* Region is retained after exec. */ +#ifdef __USE_BSD +# define MAP_RENAME 0x20 /* Rename private pages to file. */ +# define MAP_NORESERVE 0x40 /* Don't reserve needed swap area. */ +# define MAP_INHERIT 0x80 /* Region is retained after exec. */ +#endif /* This is an internal flag that is always set in `mmap' system calls. In older versions of SunOS 4 `mmap' did not return the actual mapping @@ -57,18 +61,21 @@ #define _MAP_NEW 0x80000000 /* Advice to `madvise'. */ -#define MADV_NORMAL 0 /* No further special treatment. */ -#define MADV_RANDOM 1 /* Expect random page references. */ -#define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -#define MADV_WILLNEED 3 /* Will need these pages. */ -#define MADV_DONTNEED 4 /* Don't need these pages. */ +#ifdef __USE_BSD +# define MADV_NORMAL 0 /* No further special treatment. */ +# define MADV_RANDOM 1 /* Expect random page references. */ +# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define MADV_WILLNEED 3 /* Will need these pages. */ +# define MADV_DONTNEED 4 /* Don't need these pages. */ +#endif /* Flags to `msync'. */ #define MS_ASYNC 0x1 /* Return immediately, don't fsync. */ #define MS_INVALIDATE 0x2 /* Invalidate caches. */ +/* Return value of `mmap' in case of an error. */ +#define MAP_FAILED ((__caddr_t) -1) -#include __BEGIN_DECLS /* Map addresses starting near ADDR and extending for LEN bytes. from @@ -76,34 +83,36 @@ __BEGIN_DECLS is nonzero, it is the desired mapping address. If the MAP_FIXED bit is set in FLAGS, the mapping will be at ADDR exactly (which must be page-aligned); otherwise the system chooses a convenient nearby address. - The return value is the actual mapping address chosen or (caddr_t) -1 + The return value is the actual mapping address chosen or MAP_FAILED for errors (in which case `errno' is set). A successful `mmap' call deallocates any previous mapping for the affected region. */ -__caddr_t __mmap __P ((__caddr_t __addr, size_t __len, - int __prot, int __flags, int __fd, __off_t __offset)); -__caddr_t mmap __P ((__caddr_t __addr, size_t __len, - int __prot, int __flags, int __fd, __off_t __offset)); +extern __caddr_t __mmap __P ((__caddr_t __addr, size_t __len, int __prot, + int __flags, int __fd, __off_t __offset)); +extern __caddr_t mmap __P ((__caddr_t __addr, size_t __len, int __prot, + int __flags, int __fd, __off_t __offset)); /* Deallocate any mapping for the region starting at ADDR and extending LEN bytes. Returns 0 if successful, -1 for errors (and sets errno). */ -int __munmap __P ((__caddr_t __addr, size_t __len)); -int munmap __P ((__caddr_t __addr, size_t __len)); +extern int __munmap __P ((__caddr_t __addr, size_t __len)); +extern int munmap __P ((__caddr_t __addr, size_t __len)); /* Change the memory protection of the region starting at ADDR and extending LEN bytes to PROT. Returns 0 if successful, -1 for errors (and sets errno). */ -int __mprotect __P ((__caddr_t __addr, size_t __len, int __prot)); -int mprotect __P ((__caddr_t __addr, size_t __len, int __prot)); +extern int __mprotect __P ((__caddr_t __addr, size_t __len, int __prot)); +extern int mprotect __P ((__caddr_t __addr, size_t __len, int __prot)); /* Synchronize the region starting at ADDR and extending LEN bytes with the file it maps. Filesystem operations on a file being mapped are unpredictable before this is done. */ -int msync __P ((__caddr_t __addr, size_t __len, int __flags)); +extern int msync __P ((__caddr_t __addr, size_t __len, int __flags)); +#ifdef __USE_BSD /* Advise the system about particular usage patterns the program follows for the region starting at ADDR and extending LEN bytes. */ -int madvise __P ((__caddr_t __addr, size_t __len, int __advice)); +extern int madvise __P ((__caddr_t __addr, size_t __len, int __advice)); +#endif __END_DECLS diff --git a/sysdeps/unix/bsd/ultrix4/sys/mman.h b/sysdeps/unix/bsd/ultrix4/sys/mman.h index 989bf21754..4262fce438 100644 --- a/sysdeps/unix/bsd/ultrix4/sys/mman.h +++ b/sysdeps/unix/bsd/ultrix4/sys/mman.h @@ -1,5 +1,5 @@ /* Definitions for BSD-style memory management. Ultrix 4 version. - Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc. + Copyright (C) 1994, 1995, 1996, 1997 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 @@ -41,20 +41,25 @@ /* Sharing types (must choose one and only one of these). */ #define MAP_SHARED 0x01 /* Share changes. */ #define MAP_PRIVATE 0x02 /* Changes private; copy pages on write. */ -#define MAP_TYPE 0x0f /* Mask for sharing type. */ +#ifdef __USE_BSD +# define MAP_TYPE 0x0f /* Mask for sharing type. */ +#endif /* Other flags. */ #define MAP_FIXED 0x10 /* Map address must be exactly as requested. */ /* Advice to `madvise'. */ -#define MADV_NORMAL 0 /* No further special treatment. */ -#define MADV_RANDOM 1 /* Expect random page references. */ -#define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -#define MADV_WILLNEED 3 /* Will need these pages. */ -#define MADV_DONTNEED 4 /* Don't need these pages. */ +#ifdef __USE_BSD +# define MADV_NORMAL 0 /* No further special treatment. */ +# define MADV_RANDOM 1 /* Expect random page references. */ +# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define MADV_WILLNEED 3 /* Will need these pages. */ +# define MADV_DONTNEED 4 /* Don't need these pages. */ +#endif +/* Return value of `mmap' in case of an error. */ +#define MAP_FAILED ((__caddr_t) -1) -#include __BEGIN_DECLS /* Map addresses starting near ADDR and extending for LEN bytes. from @@ -62,36 +67,38 @@ __BEGIN_DECLS is nonzero, it is the desired mapping address. If the MAP_FIXED bit is set in FLAGS, the mapping will be at ADDR exactly (which must be page-aligned); otherwise the system chooses a convenient nearby address. - The return value is the actual mapping address chosen or (caddr_t) -1 + The return value is the actual mapping address chosen or MAP_FAILED for errors (in which case `errno' is set). A successful `mmap' call deallocates any previous mapping for the affected region. */ -__caddr_t __mmap __P ((__caddr_t __addr, size_t __len, - int __prot, int __flags, int __fd, off_t __offset)); -__caddr_t mmap __P ((__caddr_t __addr, size_t __len, - int __prot, int __flags, int __fd, off_t __offset)); +extern __caddr_t __mmap __P ((__caddr_t __addr, size_t __len, int __prot, + int __flags, int __fd, off_t __offset)); +extern __caddr_t mmap __P ((__caddr_t __addr, size_t __len, int __prot, + int __flags, int __fd, off_t __offset)); /* Deallocate any mapping for the region starting at ADDR and extending LEN bytes. Returns 0 if successful, -1 for errors (and sets errno). */ -int __munmap __P ((__caddr_t __addr, size_t __len)); -int munmap __P ((__caddr_t __addr, size_t __len)); +extern int __munmap __P ((__caddr_t __addr, size_t __len)); +extern int munmap __P ((__caddr_t __addr, size_t __len)); /* Change the memory protection of the region starting at ADDR and extending LEN bytes to PROT. Returns 0 if successful, -1 for errors (and sets errno). */ -int __mprotect __P ((__caddr_t __addr, size_t __len, int __prot)); -int mprotect __P ((__caddr_t __addr, size_t __len, int __prot)); +extern int __mprotect __P ((__caddr_t __addr, size_t __len, int __prot)); +extern int mprotect __P ((__caddr_t __addr, size_t __len, int __prot)); /* Ultrix 4 does not implement `msync' or `madvise'. */ /* Synchronize the region starting at ADDR and extending LEN bytes with the file it maps. Filesystem operations on a file being mapped are unpredictable before this is done. */ -int msync __P ((caddr_t __addr, size_t __len)); +extern int msync __P ((caddr_t __addr, size_t __len)); +#ifdef __USE_BSD /* Advise the system about particular usage patterns the program follows for the region starting at ADDR and extending LEN bytes. */ -int madvise __P ((__caddr_t __addr, size_t __len, int __advice)); +extern int madvise __P ((__caddr_t __addr, size_t __len, int __advice)); +#endif __END_DECLS diff --git a/sysdeps/unix/sysv/irix4/sys/mman.h b/sysdeps/unix/sysv/irix4/sys/mman.h index f42a9f67aa..c3a923832a 100644 --- a/sysdeps/unix/sysv/irix4/sys/mman.h +++ b/sysdeps/unix/sysv/irix4/sys/mman.h @@ -1,5 +1,5 @@ /* Definitions for BSD-style memory management. Irix 4 version. - Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc. + Copyright (C) 1994, 1995, 1996, 1997 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,8 +23,6 @@ #include #include -#define __need_size_t -#include /* Protections are chosen from these bits, OR'd together. The @@ -32,37 +30,46 @@ without PROT_READ. The only guarantees are that no writing will be allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ -#define PROT_NONE 0x00 /* No access. */ -#define PROT_READ 0x04 /* Pages can be read. */ -#define PROT_WRITE 0x02 /* Pages can be written. */ -#define PROT_EXEC 0x01 /* Pages can be executed. */ -#define PROT_EXECUTE PROT_EXEC +#define PROT_NONE 0x00 /* No access. */ +#define PROT_READ 0x04 /* Pages can be read. */ +#define PROT_WRITE 0x02 /* Pages can be written. */ +#define PROT_EXEC 0x01 /* Pages can be executed. */ +#ifdef __USE_MISC +# define PROT_EXECUTE PROT_EXEC +#endif /* Sharing types (must choose one and only one of these). */ -#define MAP_SHARED 0x01 /* Share changes. */ -#define MAP_PRIVATE 0x02 /* Changes private; copy pages on write. */ -#define MAP_TYPE 0x0f /* Mask for sharing type. */ +#define MAP_SHARED 0x01 /* Share changes. */ +#define MAP_PRIVATE 0x02 /* Changes private; copy pages on write. */ +#ifdef __USE_BSD +# define MAP_TYPE 0x0f /* Mask for sharing type. */ +#endif /* Other flags. */ -#define MAP_FIXED 0x10 /* Map address must be exactly as requested. */ -#define MAP_RENAME 0x20 /* Rename private pages to file. */ -#define MAP_AUTOGROW 0x40 /* Grow file as pages are written. */ -#define MAP_LOCAL 0x80 /* Copy the mapped region on fork. */ +#define MAP_FIXED 0x10 /* Map address must be exactly as requested. */ +#ifdef __USE_MISC +# define MAP_RENAME 0x20 /* Rename private pages to file. */ +# define MAP_AUTOGROW 0x40 /* Grow file as pages are written. */ +# define MAP_LOCAL 0x80 /* Copy the mapped region on fork. */ +#endif /* Advice to `madvise'. */ -#define MADV_NORMAL 0 /* No further special treatment. */ -#define MADV_RANDOM 1 /* Expect random page references. */ -#define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -#define MADV_WILLNEED 3 /* Will need these pages. */ -#define MADV_DONTNEED 4 /* Don't need these pages. */ +#ifdef __USE_BSD +# define MADV_NORMAL 0 /* No further special treatment. */ +# define MADV_RANDOM 1 /* Expect random page references. */ +# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define MADV_WILLNEED 3 /* Will need these pages. */ +# define MADV_DONTNEED 4 /* Don't need these pages. */ +#endif /* Flags to `msync'. */ -#define MS_ASYNC 0x1 /* Return immediately, don't fsync. */ -#define MS_INVALIDATE 0x2 /* Invalidate caches. */ +#define MS_ASYNC 0x1 /* Return immediately, don't fsync. */ +#define MS_INVALIDATE 0x2 /* Invalidate caches. */ +/* Return value of `mmap' in case of an error. */ +#define MAP_FAILED ((__caddr_t) -1) -#include __BEGIN_DECLS /* Map addresses starting near ADDR and extending for LEN bytes. from @@ -70,34 +77,36 @@ __BEGIN_DECLS is nonzero, it is the desired mapping address. If the MAP_FIXED bit is set in FLAGS, the mapping will be at ADDR exactly (which must be page-aligned); otherwise the system chooses a convenient nearby address. - The return value is the actual mapping address chosen or (caddr_t) -1 + The return value is the actual mapping address chosen or MAP_FAILED for errors (in which case `errno' is set). A successful `mmap' call deallocates any previous mapping for the affected region. */ -__caddr_t __mmap __P ((__caddr_t __addr, size_t __len, - int __prot, int __flags, int __fd, __off_t __offset)); -__caddr_t mmap __P ((__caddr_t __addr, size_t __len, - int __prot, int __flags, int __fd, __off_t __offset)); +extern __caddr_t __mmap __P ((__caddr_t __addr, size_t __len, int __prot, + int __flags, int __fd, __off_t __offset)); +extern __caddr_t mmap __P ((__caddr_t __addr, size_t __len, int __prot, + int __flags, int __fd, __off_t __offset)); /* Deallocate any mapping for the region starting at ADDR and extending LEN bytes. Returns 0 if successful, -1 for errors (and sets errno). */ -int __munmap __P ((__caddr_t __addr, size_t __len)); -int munmap __P ((__caddr_t __addr, size_t __len)); +extern int __munmap __P ((__caddr_t __addr, size_t __len)); +extern int munmap __P ((__caddr_t __addr, size_t __len)); /* Change the memory protection of the region starting at ADDR and extending LEN bytes to PROT. Returns 0 if successful, -1 for errors (and sets errno). */ -int __mprotect __P ((__caddr_t __addr, size_t __len, int __prot)); -int mprotect __P ((__caddr_t __addr, size_t __len, int __prot)); +extern int __mprotect __P ((__caddr_t __addr, size_t __len, int __prot)); +extern int mprotect __P ((__caddr_t __addr, size_t __len, int __prot)); /* Synchronize the region starting at ADDR and extending LEN bytes with the file it maps. Filesystem operations on a file being mapped are unpredictable before this is done. */ -int msync __P ((caddr_t __addr, size_t __len, int __flags)); +extern int msync __P ((caddr_t __addr, size_t __len, int __flags)); +#ifdef __USE_BSD /* Advise the system about particular usage patterns the program follows for the region starting at ADDR and extending LEN bytes. */ -int madvise __P ((__caddr_t __addr, size_t __len, int __advice)); +extern int madvise __P ((__caddr_t __addr, size_t __len, int __advice)); +#endif __END_DECLS From 177c2e9a312d853d4a1e8bbb884d517aea075cf7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 10 Aug 1997 17:58:48 +0000 Subject: [PATCH 1043/4487] New file. Prevent using kernel header. --- sysdeps/unix/sysv/linux/alpha/bits/mman.h | 83 +++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/mman.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/mman.h b/sysdeps/unix/sysv/linux/alpha/bits/mman.h new file mode 100644 index 0000000000..1bef0cb525 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/bits/mman.h @@ -0,0 +1,83 @@ +/* Definitions for POSIX memory map inerface. Linux/Alpha version. + Copyright (C) 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_MMAN_H +# error "Never include this file directly. Use instead" +#endif + +/* The following definitions basically come from the kernel headers. + But the kernel header is not namespace clean. */ + + +/* Protections are chosen from these bits, OR'd together. The + implementation does not necessarily support PROT_EXEC or PROT_WRITE + without PROT_READ. The only guarantees are that no writing will be + allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ + +#define PROT_READ 0x1 /* Page can be read. */ +#define PROT_WRITE 0x2 /* Page can be written. */ +#define PROT_EXEC 0x4 /* Page can be executed. */ +#define PROT_NONE 0x0 /* Page can not be accessed. */ + +/* Sharing types (must choose one and only one of these). */ +#define MAP_SHARED 0x01 /* Share changes. */ +#define MAP_PRIVATE 0x02 /* Changes are private. */ +#ifdef __USE_MISC +# define MAP_TYPE 0x0f /* Mask for type of mapping. */ +#endif + +/* Other flags. */ +#define MAP_FIXED 0x100 /* Interpret addr exactly. */ +#ifdef __USE_MISC +# define MAP_FILE 0 +# define MAP_ANONYMOUS 0x10 /* Don't use a file. */ +# define MAP_ANON MAP_ANONYMOUS +#endif + +/* Not used by Linux, but here to make sure we don't clash with OSF/1 + defines. */ +#ifdef __USE_BSD +# define MAP_HASSEMAPHORE 0x0200 +# define MAP_INHERIT 0x0400 +# define MAP_UNALIGNED 0x0800 +#endif + +/* These are Linux-specific. */ +#ifdef __USE_MISC +# define MAP_GROWSDOWN 0x1000 /* Stack-like segment. */ +# define MAP_DENYWRITE 0x2000 /* ETXTBSY */ +# define MAP_EXECUTABLE 0x4000 /* Mark it as an executable. */ +# define MAP_LOCKED 0x8000 /* Lock the mapping. */ +# define MAP_NORESERVE 0x10000 /* Don't check for reservations. */ +#endif + +/* Flags to `msync'. */ +#define MS_ASYNC 1 /* Sync memory asynchronously. */ +#define MS_SYNC 2 /* Synchronous memory sync. */ +#define MS_INVALIDATE 4 /* Invalidate the caches. */ + +/* Flags for `mlockall'. */ +#define MCL_CURRENT 8192 /* Lock all currently mapped pages. */ +#define MCL_FUTURE 16384 /* Lock all additions to address + space. */ + +/* Flags for `mremap'. */ +#ifdef __USE_GNU +# define MREMAP_MAYMOVE 1 +#endif From c1dcd33f6362de88723d22f2a1360e9b09b25580 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 10 Aug 1997 18:29:45 +0000 Subject: [PATCH 1044/4487] Add some files. --- sysdeps/mips/Dist | 2 ++ sysdeps/mips/mips64/Dist | 1 + sysdeps/unix/sysv/linux/alpha/Dist | 13 ++++++++----- sysdeps/unix/sysv/linux/m68k/Dist | 1 + sysdeps/unix/sysv/linux/mips/Dist | 12 ++++++++++++ 5 files changed, 24 insertions(+), 5 deletions(-) diff --git a/sysdeps/mips/Dist b/sysdeps/mips/Dist index ad6ea0313a..9b6fd71f01 100644 --- a/sysdeps/mips/Dist +++ b/sysdeps/mips/Dist @@ -1 +1,3 @@ setjmp_aux.c +rtld-ldscript.in +rtld-parms diff --git a/sysdeps/mips/mips64/Dist b/sysdeps/mips/mips64/Dist index ad6ea0313a..4cde3d0e5d 100644 --- a/sysdeps/mips/mips64/Dist +++ b/sysdeps/mips/mips64/Dist @@ -1 +1,2 @@ setjmp_aux.c +rtld-parms diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist index 1b1f771853..ae71c2feb3 100644 --- a/sysdeps/unix/sysv/linux/alpha/Dist +++ b/sysdeps/unix/sysv/linux/alpha/Dist @@ -1,11 +1,14 @@ -alpha/ptrace.h alpha/regdef.h -ieee_get_fp_control.S ieee_set_fp_control.S -ioperm.c -init-first.h +alpha/ptrace.h +alpha/regdef.h +bits/mman.h clone.S +ieee_get_fp_control.S +ieee_set_fp_control.S +init-first.h +ioperm.c kernel_sigaction.h kernel_stat.h kernel_termios.h -sys/io.h sys/acct.h +sys/io.h sys/procfs.h diff --git a/sysdeps/unix/sysv/linux/m68k/Dist b/sysdeps/unix/sysv/linux/m68k/Dist index e7d5949d51..25aa20bcfa 100644 --- a/sysdeps/unix/sysv/linux/m68k/Dist +++ b/sysdeps/unix/sysv/linux/m68k/Dist @@ -1,2 +1,3 @@ +bits/mman.h clone.S mremap.S diff --git a/sysdeps/unix/sysv/linux/mips/Dist b/sysdeps/unix/sysv/linux/mips/Dist index a205c94f95..6be6876fe7 100644 --- a/sysdeps/unix/sysv/linux/mips/Dist +++ b/sysdeps/unix/sysv/linux/mips/Dist @@ -1,3 +1,15 @@ +bits/mman.h clone.S kernel_sigaction.h kernel_stat.h +kernel_termios.h +entry.h +regdef.h +fpregdef.h +sys/acct.h +sys/asm.h +sys/cachectl.h +sys/fpregdef.h +sys/procfs.h +sys/regdef.h +sys/sysmips.h From 52b963b08f8157e425ef05798f1047659710b3bc Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 10 Aug 1997 18:30:12 +0000 Subject: [PATCH 1045/4487] Linux/MIPS specific mman.h definitions. --- sysdeps/unix/sysv/linux/mips/bits/mman.h | 75 ++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/mips/bits/mman.h diff --git a/sysdeps/unix/sysv/linux/mips/bits/mman.h b/sysdeps/unix/sysv/linux/mips/bits/mman.h new file mode 100644 index 0000000000..15a343ff76 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/bits/mman.h @@ -0,0 +1,75 @@ +/* Definitions for POSIX memory map inerface. Linux/PowerPC version. + Copyright (C) 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_MMAN_H +# error "Never include this file directly. Use instead" +#endif + +/* The following definitions basically come from the kernel headers. + But the kernel header is not namespace clean. */ + + +/* Protections are chosen from these bits, OR'd together. The + implementation does not necessarily support PROT_EXEC or PROT_WRITE + without PROT_READ. The only guarantees are that no writing will be + allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ + +#define PROT_READ 0x1 /* Page can be read. */ +#define PROT_WRITE 0x2 /* Page can be written. */ +#define PROT_EXEC 0x4 /* Page can be executed. */ +#define PROT_NONE 0x0 /* Page can not be accessed. */ + +/* Sharing types (must choose one and only one of these). */ +#define MAP_SHARED 0x01 /* Share changes. */ +#define MAP_PRIVATE 0x02 /* Changes are private. */ +#ifdef __USE_MISC +# define MAP_TYPE 0x0f /* Mask for type of mapping. */ +#endif + +/* Other flags. */ +#define MAP_FIXED 0x10 /* Interpret addr exactly. */ +#ifdef __USE_MISC +# define MAP_FILE 0x00 +# define MAP_ANONYMOUS 0x20 /* Don't use a file. */ +# define MAP_ANON MAP_ANONYMOUS +# define MAP_RENAME MAP_ANONYMOUS +#endif + +/* These are Linux-specific. */ +#ifdef __USE_MISC +# define MAP_GROWSDOWN 0x0100 /* Stack-like segment. */ +# define MAP_DENYWRITE 0x0800 /* ETXTBSY */ +# define MAP_EXECUTABLE 0x1000 /* Mark it as an executable. */ +# define MAP_NORESERVE 0x0040 /* Don't check for reservations. */ +#endif + +/* Flags to `msync'. */ +#define MS_ASYNC 1 /* Sync memory asynchronously. */ +#define MS_SYNC 4 /* Synchronous memory sync. */ +#define MS_INVALIDATE 2 /* Invalidate the caches. */ + +/* Flags for `mlockall'. */ +#define MCL_CURRENT 0x2000 /* Lock all currently mapped pages. */ +#define MCL_FUTURE 0x4000 /* Lock all additions to address + space. */ + +/* Flags for `mremap'. */ +#ifdef __USE_GNU +# define MREMAP_MAYMOVE 1 +#endif From 135eda531279fd9d75b516fb3b13399076e7dfa4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 14 Aug 1997 01:49:40 +0000 Subject: [PATCH 1046/4487] Linux/M68k specific mman.h definitions. --- sysdeps/unix/sysv/linux/m68k/bits/mman.h | 75 ++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/bits/mman.h diff --git a/sysdeps/unix/sysv/linux/m68k/bits/mman.h b/sysdeps/unix/sysv/linux/m68k/bits/mman.h new file mode 100644 index 0000000000..d6c29d2176 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/bits/mman.h @@ -0,0 +1,75 @@ +/* Definitions for POSIX memory map inerface. Linux/m68k version. + Copyright (C) 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_MMAN_H +# error "Never include this file directly. Use instead" +#endif + +/* The following definitions basically come from the kernel headers. + But the kernel header is not namespace clean. */ + + +/* Protections are chosen from these bits, OR'd together. The + implementation does not necessarily support PROT_EXEC or PROT_WRITE + without PROT_READ. The only guarantees are that no writing will be + allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ + +#define PROT_READ 0x1 /* Page can be read. */ +#define PROT_WRITE 0x2 /* Page can be written. */ +#define PROT_EXEC 0x4 /* Page can be executed. */ +#define PROT_NONE 0x0 /* Page can not be accessed. */ + +/* Sharing types (must choose one and only one of these). */ +#define MAP_SHARED 0x01 /* Share changes. */ +#define MAP_PRIVATE 0x02 /* Changes are private. */ +#ifdef __USE_MISC +# define MAP_TYPE 0x0f /* Mask for type of mapping. */ +#endif + +/* Other flags. */ +#define MAP_FIXED 0x10 /* Interpret addr exactly. */ +#ifdef __USE_MISC +# define MAP_FILE 0 +# define MAP_ANONYMOUS 0x20 /* Don't use a file. */ +# define MAP_ANON MAP_ANONYMOUS +#endif + +/* These are Linux-specific. */ +#ifdef __USE_MISC +# define MAP_GROWSDOWN 0x0100 /* Stack-like segment. */ +# define MAP_DENYWRITE 0x0800 /* ETXTBSY */ +# define MAP_EXECUTABLE 0x1000 /* Mark it as an executable. */ +# define MAP_LOCKED 0x2000 /* Lock the mapping. */ +# define MAP_NORESERVE 0x4000 /* Don't check for reservations. */ +#endif + +/* Flags to `msync'. */ +#define MS_ASYNC 1 /* Sync memory asynchronously. */ +#define MS_SYNC 4 /* Synchronous memory sync. */ +#define MS_INVALIDATE 2 /* Invalidate the caches. */ + +/* Flags for `mlockall'. */ +#define MCL_CURRENT 1 /* Lock all currently mapped pages. */ +#define MCL_FUTURE 2 /* Lock all additions to address + space. */ + +/* Flags for `mremap'. */ +#ifdef __USE_GNU +# define MREMAP_MAYMOVE 1 +#endif From 17cf8c5c98e71d1f6397db27b7e5da8834a90536 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 14 Aug 1997 01:53:36 +0000 Subject: [PATCH 1047/4487] Correct comment for SA_RESTART. --- sysdeps/unix/bsd/osf/bits/sigaction.h | 8 +++--- .../unix/sysv/linux/alpha/bits/sigaction.h | 24 ++++++++-------- sysdeps/unix/sysv/linux/mips/bits/sigaction.h | 28 +++++++++---------- sysdeps/unix/sysv/minix/bits/sigaction.h | 16 +++++------ sysdeps/unix/sysv/sysv4/bits/sigaction.h | 12 ++++---- 5 files changed, 44 insertions(+), 44 deletions(-) diff --git a/sysdeps/unix/bsd/osf/bits/sigaction.h b/sysdeps/unix/bsd/osf/bits/sigaction.h index df400d4aaa..56e28a04fb 100644 --- a/sysdeps/unix/bsd/osf/bits/sigaction.h +++ b/sysdeps/unix/bsd/osf/bits/sigaction.h @@ -1,5 +1,5 @@ /* Structure and constant definitions for sigaction et al. OSF/1 version. - Copyright (C) 1993, 1996 Free Software Foundation, Inc. + Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -33,9 +33,9 @@ struct sigaction /* Bits in `sa_flags'. */ #ifdef __USE_BSD -#define SA_ONSTACK 0x1 /* Take signal on signal stack. */ -#define SA_RESTART 0x2 /* Don't restart syscall on signal return. */ -#define SA_DISABLE 0x4 /* Disable alternate signal stack. */ +# define SA_ONSTACK 0x1 /* Take signal on signal stack. */ +# define SA_RESTART 0x2 /* Restart syscall on signal return. */ +# define SA_DISABLE 0x4 /* Disable alternate signal stack. */ #endif #define SA_NOCLDSTOP 0x4 /* Don't send SIGCHLD when children stop. */ diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h index e2e97bd70c..f28b6f256c 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h @@ -31,21 +31,21 @@ struct sigaction }; /* Bits in `sa_flags'. */ -#define SA_NOCLDSTOP 0x00000004 /* Don't send SIGCHLD when children stop. */ +#define SA_NOCLDSTOP 0x00000004 /* Don't send SIGCHLD when children stop. */ #ifdef __USE_MISC -#define SA_STACK 0x00000001 /* Use signal stack by using `sa_restorer'. */ -#define SA_RESTART 0x00000002 /* Don't restart syscall on signal return. */ -#define SA_INTERRUPT 0x20000000 /* Historical no-op. */ -#define SA_NOMASK 0x00000008 /* Don't automatically block the signal when - its handler is being executed. */ -#define SA_ONESHOT 0x00000010 /* Reset to SIG_DFL on entry to handler. */ +# define SA_STACK 0x00000001 /* Use signal stack by using `sa_restorer'. */ +# define SA_RESTART 0x00000002 /* Restart syscall on signal return. */ +# define SA_INTERRUPT 0x20000000 /* Historical no-op. */ +# define SA_NOMASK 0x00000008 /* Don't automatically block the signal + when its handler is being executed. */ +# define SA_ONESHOT 0x00000010 /* Reset to SIG_DFL on entry to handler. */ /* Some aliases for the SA_ constants. */ -#define SA_NODEFER SA_NOMASK -#define SA_RESETHAND SA_ONESHOT +# define SA_NODEFER SA_NOMASK +# define SA_RESETHAND SA_ONESHOT #endif /* Values for the HOW argument to `sigprocmask'. */ -#define SIG_BLOCK 1 /* Block signals. */ -#define SIG_UNBLOCK 2 /* Unblock signals. */ -#define SIG_SETMASK 3 /* Set the set of blocked signals. */ +#define SIG_BLOCK 1 /* Block signals. */ +#define SIG_UNBLOCK 2 /* Unblock signals. */ +#define SIG_SETMASK 3 /* Set the set of blocked signals. */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h index 66c58cc540..d6f70f2a2e 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h +++ b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h @@ -39,24 +39,24 @@ struct sigaction }; /* Bits in `sa_flags'. */ -#define SA_NOCLDSTOP 1 /* Don't send SIGCHLD when children stop. */ +#define SA_NOCLDSTOP 1 /* Don't send SIGCHLD when children stop. */ #ifdef __USE_MISC -#define SA_STACK 0x08000000 /* Use signal stack by using `sa_restorer'. */ -#define SA_RESTART 0x10000000 /* Don't restart syscall on signal return. */ -#define SA_INTERRUPT 0x20000000 /* Historical no-op. */ -#define SA_NODEFER 0x40000000 /* Don't automatically block the signal when - its handler is being executed. */ -#define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler. */ +# define SA_STACK 0x08000000 /* Use signal stack by using `sa_restorer'. */ +# define SA_RESTART 0x10000000 /* Restart syscall on signal return. */ +# define SA_INTERRUPT 0x20000000 /* Historical no-op. */ +# define SA_NODEFER 0x40000000 /* Don't automatically block the signal when + its handler is being executed. */ +# define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler. */ /* Some aliases for the SA_ constants. */ -#define SA_NOMASK SA_NODEFER -#define SA_ONESHOT SA_RESETHAND +# define SA_NOMASK SA_NODEFER +# define SA_ONESHOT SA_RESETHAND #endif /* Values for the HOW argument to `sigprocmask'. */ -#define SIG_NOP 0 /* 0 is unused to catch errors */ -#define SIG_BLOCK 1 /* Block signals. */ -#define SIG_UNBLOCK 2 /* Unblock signals. */ -#define SIG_SETMASK 3 /* Set the set of blocked signals. */ -#define SIG_SETMASK32 256 /* Goodie from SGI for BSD compatibility: +#define SIG_NOP 0 /* 0 is unused to catch errors */ +#define SIG_BLOCK 1 /* Block signals. */ +#define SIG_UNBLOCK 2 /* Unblock signals. */ +#define SIG_SETMASK 3 /* Set the set of blocked signals. */ +#define SIG_SETMASK32 256 /* Goodie from SGI for BSD compatibility: set only the low 32 bit of the sigset. */ diff --git a/sysdeps/unix/sysv/minix/bits/sigaction.h b/sysdeps/unix/sysv/minix/bits/sigaction.h index 5bf5985c51..732befc630 100644 --- a/sysdeps/unix/sysv/minix/bits/sigaction.h +++ b/sysdeps/unix/sysv/minix/bits/sigaction.h @@ -31,14 +31,14 @@ struct sigaction /* Bits in `sa_flags'. */ #ifdef __USE_MISC -#define SA_ONSTACK 0x1 /* Take signal on signal stack. */ -#define SA_RESETHAND 0x2 /* Reset signal handler when signal caught. */ -#define SA_NODEFER 0x4 /* Don't block signal while catching it. */ -#define SA_RESTART 0x8 /* Don't restart syscall on signal return. */ -#define SA_SIGINFO 0x10 /* Extended signal handling. */ -#define SA_NOCLDWAIT 0x20 /* Don't create zombies. */ -#define SA_COMPAT 0x80 /* Internal flag for old signal catchers. */ -#define SA_DISABLE 0x100 /* Disable alternate signal stack. */ +# define SA_ONSTACK 0x1 /* Take signal on signal stack. */ +# define SA_RESETHAND 0x2 /* Reset signal handler when signal caught. */ +# define SA_NODEFER 0x4 /* Don't block signal while catching it. */ +# define SA_RESTART 0x8 /* Restart syscall on signal return. */ +# define SA_SIGINFO 0x10 /* Extended signal handling. */ +# define SA_NOCLDWAIT 0x20 /* Don't create zombies. */ +# define SA_COMPAT 0x80 /* Internal flag for old signal catchers. */ +# define SA_DISABLE 0x100 /* Disable alternate signal stack. */ #endif #define SA_NOCLDSTOP 0x40 /* Don't send SIGCHLD when children stop. */ diff --git a/sysdeps/unix/sysv/sysv4/bits/sigaction.h b/sysdeps/unix/sysv/sysv4/bits/sigaction.h index 3a2ffb2e10..ce3ab5e60c 100644 --- a/sysdeps/unix/sysv/sysv4/bits/sigaction.h +++ b/sysdeps/unix/sysv/sysv4/bits/sigaction.h @@ -35,13 +35,13 @@ struct sigaction /* Bits in `sa_flags'. */ #ifdef __USE_MISC -#define SA_ONSTACK 0x1 /* Take signal on signal stack. */ -#define SA_RESETHAND 0x2 /* Reset to SIG_DFL on entry to handler. */ -#define SA_RESTART 0x4 /* Don't restart syscall on signal return. */ -#define SA_SIGINFO 0x8 /* Provide additional info to the handler. */ -#define SA_NODEFER 0x10 /* Don't automatically block the signal when +# define SA_ONSTACK 0x1 /* Take signal on signal stack. */ +# define SA_RESETHAND 0x2 /* Reset to SIG_DFL on entry to handler. */ +# define SA_RESTART 0x4 /* Restart syscall on signal return. */ +# define SA_SIGINFO 0x8 /* Provide additional info to the handler. */ +# define SA_NODEFER 0x10 /* Don't automatically block the signal when its handler is being executed. */ -#define SA_NOCLDWAIT 0x10000 /* Don't save zombie processes. */ +# define SA_NOCLDWAIT 0x10000 /* Don't save zombie processes. */ #endif #define SA_NOCLDSTOP 0x20000 /* Don't send SIGCHLD when children stop. */ From 02af0aee5e5f172514da621665e3bb9777f5d6f5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 24 Aug 1997 10:52:09 +0000 Subject: [PATCH 1048/4487] Clean up asm statements a bit. --- sysdeps/standalone/i386/i386.h | 10 +++++----- sysdeps/standalone/i960/i960ca.h | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sysdeps/standalone/i386/i386.h b/sysdeps/standalone/i386/i386.h index 20d7f01fe3..d76f4815cc 100644 --- a/sysdeps/standalone/i386/i386.h +++ b/sysdeps/standalone/i386/i386.h @@ -311,11 +311,11 @@ static inline void set_segment( /* Now, reload all segment registers so the limit takes effect. */ - asm volatile( "movw %%ds,%0 ; movw %0,%%ds - movw %%es,%0 ; movw %0,%%es - movw %%fs,%0 ; movw %0,%%fs - movw %%gs,%0 ; movw %0,%%gs - movw %%ss,%0 ; movw %0,%%ss" + asm volatile( "movw %%ds,%0 ; movw %0,%%ds\n" + "movw %%es,%0 ; movw %0,%%es\n" + "movw %%fs,%0 ; movw %0,%%fs\n" + "movw %%gs,%0 ; movw %0,%%gs\n" + "movw %%ss,%0 ; movw %0,%%ss" : "=r" (tmp_segment) : "0" (tmp_segment) ); diff --git a/sysdeps/standalone/i960/i960ca.h b/sysdeps/standalone/i960/i960ca.h index ba8db2b985..253d5d932f 100644 --- a/sysdeps/standalone/i960/i960ca.h +++ b/sysdeps/standalone/i960/i960ca.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1996 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), On-Line Applications Research Corporation. @@ -157,10 +157,10 @@ struct i80960ca_ctltbl { #define clear_intr( xint ) \ { register unsigned32 _xint=(xint); \ - asm volatile( "loop_til_cleared: - clrbit %0,sf0,sf0 ; \ - bbs %0,sf0,loop_til_cleared" \ - : "=d" (_xint) : "0" (_xint) ); \ + asm volatile( "loop_til_cleared:" \ + " clrbit %0,sf0,sf0 ;" \ + " bbs %0,sf0,loop_til_cleared" \ + : "=d" (_xint) : "0" (_xint) ); \ } #define reload_ctl_group( group ) \ From c0d5b73e055f817d78f2093c1cf302df486881fe Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 27 Aug 1997 19:58:41 +0000 Subject: [PATCH 1049/4487] (RTLD_START): Switch back to previous section to avoid confusing the compiler. --- sysdeps/alpha/dl-machine.h | 3 ++- sysdeps/m68k/dl-machine.h | 26 +++++++++++--------------- sysdeps/mips/dl-machine.h | 2 ++ sysdeps/mips/mips64/dl-machine.h | 2 ++ 4 files changed, 17 insertions(+), 16 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 746cdd236b..e0ba67b48b 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -243,7 +243,8 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) /* Jump to the user's entry point. */ mov $9, $27 jmp ($9) - .end _dl_start_user"); + .end _dl_start_user +.previous"); /* Nonzero iff TYPE describes relocation of a PLT entry, so PLT entries should not be allowed to define the value. */ diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index 01fc339928..75434cd750 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -56,21 +56,12 @@ static inline Elf32_Addr elf_machine_load_address (void) { Elf32_Addr addr; - asm (".Lhere: lea .Lhere(%%pc), %0\n" - " sub.l %#.Lhere, %0" + asm ("1: lea 1b(%%pc), %0\n" + " sub.l 1b@GOTPC(%%pc), %0" : "=a" (addr)); return addr; } -/* The `subl' insn above will contain an R_68K_RELATIVE relocation - entry intended to insert the run-time address of the label `.Lhere'. - This will be the first relocation in the text of the dynamic - linker; we skip it to avoid trying to modify read-only text in this - early stage. */ -#define ELF_MACHINE_BEFORE_RTLD_RELOC(dynamic_info) \ - ((dynamic_info)[DT_RELA]->d_un.d_ptr += sizeof (Elf32_Rela), \ - (dynamic_info)[DT_RELASZ]->d_un.d_val -= sizeof (Elf32_Rela)) - /* Set up the loaded object described by L so its unrelocated PLT entries will jump to the on-demand fixup code in dl-runtime.c. */ @@ -157,13 +148,16 @@ asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \ its return value is the user program's entry point. */ #define RTLD_START asm ("\ -.text -.globl _start -.globl _dl_start_user + .text + .globl _start + .type _start,@function _start: move.l %sp, -(%sp) jbsr _dl_start addq.l #4, %sp + + .globl _dl_start_user + .type _dl_start_user,@function _dl_start_user: | Save the user entry point address in %a4. move.l %d0, %a4 @@ -209,7 +203,9 @@ asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \ | Initialize %fp with the stack pointer. move.l %sp, %fp | Jump to the user's entry point. - jmp (%a4)"); + jmp (%a4) + .size _dl_start_user, . - _dl_start_user + .previous"); /* Nonzero iff TYPE describes a relocation that should skip the executable when looking up the symbol value. */ diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 6973f7612a..7ee2e20343 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -423,6 +423,7 @@ _dl_runtime_resolve:\n \ move $25, $2\n \ jr $25\n \ .end _dl_runtime_resolve\n \ + .previous\n \ "); /* Mask identifying addresses reserved for the user program, @@ -519,6 +520,7 @@ _dl_start_user:\n\ lw $7, 12($29)\n\ jr $25\n"\ _RTLD_EPILOGUE(ENTRY_POINT)\ + "\n.previous"\ ); /* The MIPS never uses Elfxx_Rela relocations. */ diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h index e501a2520e..76981a6a9b 100644 --- a/sysdeps/mips/mips64/dl-machine.h +++ b/sysdeps/mips/mips64/dl-machine.h @@ -423,6 +423,7 @@ _dl_runtime_resolve:\n \ move $25, $2\n \ jr $25\n \ .end _dl_runtime_resolve\n \ + .previous\n \ "); /* Mask identifying addresses reserved for the user program, @@ -514,6 +515,7 @@ _dl_start_user:\n\ ld $7, 3*8($29)\n\ jr $25\n"\ _RTLD_EPILOGUE(ENTRY_POINT) \ + "\n.previous"\ ); From e0b82fb753cbb4efbf66588808fbd95061204aaa Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 27 Aug 1997 20:03:43 +0000 Subject: [PATCH 1050/4487] [$(subdirs)=db2] (CPPFLAGS): Add macros to provide spinlock information for db2. --- sysdeps/m68k/m68020/Makefile | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sysdeps/m68k/m68020/Makefile diff --git a/sysdeps/m68k/m68020/Makefile b/sysdeps/m68k/m68020/Makefile new file mode 100644 index 0000000000..b17635467d --- /dev/null +++ b/sysdeps/m68k/m68020/Makefile @@ -0,0 +1,3 @@ +ifeq ($(subdir),db2) +CPPFLAGS += -DHAVE_SPINLOCKS=1 -DHAVE_ASSEM_MC68020_GCC=1 +endif From 8b10c19e06892662dcc9ed1c764398059df61cbe Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 29 Aug 1997 00:52:03 +0000 Subject: [PATCH 1051/4487] POLL* bits for Linux. --- sysdeps/unix/sysv/linux/m68k/bits/poll.h | 43 +++++++++++++++++++++ sysdeps/unix/sysv/linux/mips/bits/poll.h | 48 ++++++++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/bits/poll.h create mode 100644 sysdeps/unix/sysv/linux/mips/bits/poll.h diff --git a/sysdeps/unix/sysv/linux/m68k/bits/poll.h b/sysdeps/unix/sysv/linux/m68k/bits/poll.h new file mode 100644 index 0000000000..8fea43924a --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/bits/poll.h @@ -0,0 +1,43 @@ +/* Copyright (C) 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + +/* Event types that can be polled for. These bits may be set in `events' + to indicate the interesting event types; they will appear in `revents' + to indicate the status of the file descriptor. */ +#define POLLIN 0x001 /* There is data to read. */ +#define POLLPRI 0x002 /* There is urgent data to read. */ +#define POLLOUT 0x004 /* Writing now will not block. */ + +#ifdef __USE_XOPEN +/* These values are defined in XPG4.2. */ +# define POLLRDNORM 0x040 /* Normal data may be read. */ +# define POLLRDBAND 0x080 /* Priority data may be read. */ +# define POLLWRNORM POLLOUT /* Writing now will not block. */ +# define POLLWRBAND 0x100 /* Priority data may be written. */ +#endif + +/* Event types always implicitly polled for. These bits need not be set in + `events', but they will appear in `revents' to indicate the status of + the file descriptor. */ +#define POLLERR 0x008 /* Error condition. */ +#define POLLHUP 0x010 /* Hung up. */ +#define POLLNVAL 0x020 /* Invalid polling request. */ + +/* Canonical number of polling requests to read in at a time in poll. */ +#define NPOLLFILE 30 diff --git a/sysdeps/unix/sysv/linux/mips/bits/poll.h b/sysdeps/unix/sysv/linux/mips/bits/poll.h new file mode 100644 index 0000000000..c1c9a6b392 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/bits/poll.h @@ -0,0 +1,48 @@ +/* Copyright (C) 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + +/* Event types that can be polled for. These bits may be set in `events' + to indicate the interesting event types; they will appear in `revents' + to indicate the status of the file descriptor. */ +#define POLLIN 0x001 /* There is data to read. */ +#define POLLPRI 0x002 /* There is urgent data to read. */ +#define POLLOUT 0x004 /* Writing now will not block. */ + +#ifdef __USE_XOPEN +/* These values are defined in XPG4.2. */ +# define POLLRDNORM 0x040 /* Normal data may be read. */ +# define POLLRDBAND 0x080 /* Priority data may be read. */ +# define POLLWRNORM POLLOUT /* Writing now will not block. */ +# define POLLWRBAND 0x100 /* Priority data may be written. */ +#endif + +#ifdef __USE_GNU +/* This is an extension for Linux. */ +# define POLLMSG 0x400 +#endif + +/* Event types always implicitly polled for. These bits need not be set in + `events', but they will appear in `revents' to indicate the status of + the file descriptor. */ +#define POLLERR 0x008 /* Error condition. */ +#define POLLHUP 0x010 /* Hung up. */ +#define POLLNVAL 0x020 /* Invalid polling request. */ + +/* Canonical number of polling requests to read in at a time in poll. */ +#define NPOLLFILE 30 From 606bb553c3c6a557347a5f2fbff0117777beff69 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 29 Aug 1997 20:37:37 +0000 Subject: [PATCH 1052/4487] Extra files to distribute for mach/hurd/mips. --- sysdeps/mach/hurd/mips/Dist | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sysdeps/mach/hurd/mips/Dist diff --git a/sysdeps/mach/hurd/mips/Dist b/sysdeps/mach/hurd/mips/Dist new file mode 100644 index 0000000000..b6f3ffa4c3 --- /dev/null +++ b/sysdeps/mach/hurd/mips/Dist @@ -0,0 +1,3 @@ +longjmp-ctx.c +init-fault.c +dl-machine.c From 892732283bcb7dc49d3491a5635cce7dcd3f9056 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 29 Aug 1997 20:39:52 +0000 Subject: [PATCH 1053/4487] Add sgidefs.h. --- sysdeps/unix/sysv/linux/mips/Dist | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/mips/Dist b/sysdeps/unix/sysv/linux/mips/Dist index 6be6876fe7..0f106cf8fa 100644 --- a/sysdeps/unix/sysv/linux/mips/Dist +++ b/sysdeps/unix/sysv/linux/mips/Dist @@ -6,6 +6,7 @@ kernel_termios.h entry.h regdef.h fpregdef.h +sgidefs.h sys/acct.h sys/asm.h sys/cachectl.h From 87967acd393b6ce2ed729f42256bc498270fe67a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 5 Sep 1997 01:38:37 +0000 Subject: [PATCH 1054/4487] Removed. --- sysdeps/alpha/w_sqrt.S | 161 ----------------------------------------- 1 file changed, 161 deletions(-) delete mode 100644 sysdeps/alpha/w_sqrt.S diff --git a/sysdeps/alpha/w_sqrt.S b/sysdeps/alpha/w_sqrt.S deleted file mode 100644 index 32b06887d5..0000000000 --- a/sysdeps/alpha/w_sqrt.S +++ /dev/null @@ -1,161 +0,0 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David Mosberger , 1996. - Based on public-domain C source by Linus Torvalds. - - 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 - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* This version is much faster than generic sqrt implementation, but - it doesn't handle exceptional values or the inexact flag. Don't use - this if _IEEE_FP or _IEEE_FP_INEXACT is in effect. */ - -#ifndef _IEEE_FP - -#define _ERRNO_H -#include -#include - - .set noreorder - -#ifdef __ELF__ - .section .rodata -#else - .rdata -#endif - .align 5 # align to cache line - - /* Do all memory accesses relative to sqrtdata. */ -sqrtdata: - -#define DN 0x00 -#define UP 0x08 -#define HALF 0x10 -#define ALMOST_THREE_HALF 0x18 -#define T2 0x20 - - .quad 0x3fefffffffffffff /* DN = next(1.0) */ - .quad 0x3ff0000000000001 /* UP = prev(1.0) */ - .quad 0x3fe0000000000000 /* HALF = 0.5 */ - .quad 0x3ff7ffffffc00000 /* ALMOST_THREE_HALF = 1.5-2^-30 */ - -/* table T2: */ -.long 0x1500, 0x2ef8, 0x4d67, 0x6b02, 0x87be, 0xa395, 0xbe7a, 0xd866 -.long 0xf14a, 0x1091b, 0x11fcd, 0x13552, 0x14999, 0x15c98, 0x16e34, 0x17e5f -.long 0x18d03, 0x19a01, 0x1a545, 0x1ae8a, 0x1b5c4, 0x1bb01, 0x1bfde, 0x1c28d -.long 0x1c2de, 0x1c0db, 0x1ba73, 0x1b11c, 0x1a4b5, 0x1953d, 0x18266, 0x16be0 -.long 0x1683e, 0x179d8, 0x18a4d, 0x19992, 0x1a789, 0x1b445, 0x1bf61, 0x1c989 -.long 0x1d16d, 0x1d77b, 0x1dddf, 0x1e2ad, 0x1e5bf, 0x1e6e8, 0x1e654, 0x1e3cd -.long 0x1df2a, 0x1d635, 0x1cb16, 0x1be2c, 0x1ae4e, 0x19bde, 0x1868e, 0x16e2e -.long 0x1527f, 0x1334a, 0x11051, 0xe951, 0xbe01, 0x8e0d, 0x5924, 0x1edd - -/* - * Stack variables: - */ -#define K 16(sp) -#define Y 24(sp) -#define FSIZE 32 - - .text - -LEAF(__sqrt, FSIZE) - lda sp, -FSIZE(sp) - ldgp gp, .-__sqrt(pv) - stq ra, 0(sp) -#ifdef PROF - lda AT, _mcount - jsr AT, (AT), _mcount -#endif - .prologue 1 - - stt $f16, K - lda t3, sqrtdata # load base address into t3 - - fblt $f16, $negative - - /* Compute initial guess. */ - - .align 3 - - ldah t1, 0x5fe8 # e0 : - ldq t2, K # .. e1 : - ldt $f12, HALF(t3) # e0 : - ldt $f18, ALMOST_THREE_HALF(t3) # .. e1 : - srl t2, 33, t0 # e0 : - mult $f16, $f12, $f11 # .. fm : $f11 = x * 0.5 - subl t1, t0, t1 # e0 : - addt $f12, $f12, $f17 # .. fa : $f17 = 1.0 - srl t1, 12, t0 # e0 : - and t0, 0xfc, t0 # .. e1 : - addq t0, t3, t0 # e0 : - ldl t0, T2(t0) # .. e1 : - addt $f12, $f17, $f15 # fa : $f15 = 1.5 - subl t1, t0, t1 # .. e1 : - sll t1, 32, t1 # e0 : - ldt $f14, DN(t3) # .. e1 : - stq t1, Y # e0 : - ldt $f13, Y # e1 : - addq sp, FSIZE, sp # e0 : - - mult $f11, $f13, $f10 # fm : $f10 = (x * 0.5) * y - mult $f10, $f13, $f10 # fm : $f10 = ((x * 0.5) * y) * y - subt $f15, $f10, $f1 # fa : $f1 = (1.5 - 0.5*x*y*y) - mult $f13, $f1, $f13 # fm : yp = y*(1.5 - 0.5*x*y*y) - mult $f11, $f13, $f11 # fm : $f11 = x * 0.5 * yp - mult $f11, $f13, $f11 # fm : $f11 = (x * 0.5 * yp) * yp - subt $f18, $f11, $f1 # fa : $f1= (1.5-2^-30) - 0.5*x*yp*yp - mult $f13, $f1, $f13 # fm : ypp = $f13 = yp*$f1 - subt $f15, $f12, $f1 # fa : $f1 = (1.5 - 0.5) - ldt $f15, UP(t3) # .. e1 : - mult $f16, $f13, $f10 # fm : z = $f10 = x * ypp - mult $f10, $f13, $f11 # fm : $f11 = z*ypp - mult $f10, $f12, $f12 # fm : $f12 = z*0.5 - subt $f1, $f11, $f1 # .. fa : $f1 = 1 - z*ypp - mult $f12, $f1, $f12 # fm : $f12 = z*0.5*(1 - z*ypp) - addt $f10, $f12, $f0 # fa : zp=res=$f0= z + z*0.5*(1 - z*ypp) - - mult/c $f0, $f14, $f12 # fm : zmi = zp * DN - mult/c $f0, $f15, $f11 # fm : zpl = zp * UP - mult/c $f0, $f12, $f1 # fm : $f1 = zp * zmi - mult/c $f0, $f11, $f15 # fm : $f15 = zp * zpl - - subt $f1, $f16, $f13 # fa : y1 = zp*zmi - x - subt $f15, $f16, $f15 # fa : y2 = zp*zpl - x - - fcmovge $f13, $f12, $f0 # res = (y1 >= 0) ? zmi : res - fcmovlt $f15, $f11, $f0 # res = (y2 < 0) ? zpl : res - - ret - -$negative: - lda t1, -1 - stq t1, K - lda t1, EDOM - stl t1, errno -#ifdef _LIBC_REENTRANT - jsr ra, __errno_location - lda t1, -1 - ldq ra, 0(sp) - stl t1, 0(v0) -#endif - ldt $f0, K # res = (double) 0xffffffffffffffff - addq sp, FSIZE, sp - ret - - END(__sqrt) - -weak_alias(__sqrt, sqrt) - -#endif /* !_IEEE_FP */ From d930b435a999517e594afd65faa5f1d534dc6c4f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 5 Sep 1997 01:38:54 +0000 Subject: [PATCH 1055/4487] High-quality sqrt implementation for Alpha. --- sysdeps/alpha/fpu/e_sqrt.c | 256 +++++++++++++++++++++++++++++++++++++ 1 file changed, 256 insertions(+) create mode 100644 sysdeps/alpha/fpu/e_sqrt.c diff --git a/sysdeps/alpha/fpu/e_sqrt.c b/sysdeps/alpha/fpu/e_sqrt.c new file mode 100644 index 0000000000..76fa015622 --- /dev/null +++ b/sysdeps/alpha/fpu/e_sqrt.c @@ -0,0 +1,256 @@ +/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Contributed by David Mosberger (davidm@cs.arizona.edu). + + 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* + * We have three versions, depending on how exact we need the results. + */ + +#if defined(_IEEE_FP) && defined(_IEEE_FP_INEXACT) + +/* Most demanding: go to the original source. */ +#include + +#else + +/* Careful with rearranging this without consulting the assembly below. */ +const static struct sqrt_data_struct { + unsigned long dn, up, half, almost_three_half; + unsigned long one_and_a_half, two_to_minus_30, one, nan; + const int T2[64]; +} sqrt_data = { + 0x3fefffffffffffff, /* __dn = nextafter(1,-Inf) */ + 0x3ff0000000000001, /* __up = nextafter(1,+Inf) */ + 0x3fe0000000000000, /* half */ + 0x3ff7ffffffc00000, /* almost_three_half = 1.5-2^-30 */ + 0x3ff8000000000000, /* one_and_a_half */ + 0x3e10000000000000, /* two_to_minus_30 */ + 0x3ff0000000000000, /* one */ + 0xffffffffffffffff, /* nan */ + + { 0x1500, 0x2ef8, 0x4d67, 0x6b02, 0x87be, 0xa395, 0xbe7a, 0xd866, + 0xf14a, 0x1091b,0x11fcd,0x13552,0x14999,0x15c98,0x16e34,0x17e5f, + 0x18d03,0x19a01,0x1a545,0x1ae8a,0x1b5c4,0x1bb01,0x1bfde,0x1c28d, + 0x1c2de,0x1c0db,0x1ba73,0x1b11c,0x1a4b5,0x1953d,0x18266,0x16be0, + 0x1683e,0x179d8,0x18a4d,0x19992,0x1a789,0x1b445,0x1bf61,0x1c989, + 0x1d16d,0x1d77b,0x1dddf,0x1e2ad,0x1e5bf,0x1e6e8,0x1e654,0x1e3cd, + 0x1df2a,0x1d635,0x1cb16,0x1be2c,0x1ae4e,0x19bde,0x1868e,0x16e2e, + 0x1527f,0x1334a,0x11051,0xe951, 0xbe01, 0x8e0d, 0x5924, 0x1edd } +}; + +#ifdef _IEEE_FP +/* + * This version is much faster than the standard one included above, + * but it doesn't maintain the inexact flag. + */ + +#define lobits(x) (((unsigned int *)&x)[0]) +#define hibits(x) (((unsigned int *)&x)[1]) + +static inline double initial_guess(double x, unsigned int k, + const struct sqrt_data_struct * const ptr) +{ + double ret = 0.0; + + k = 0x5fe80000 - (k >> 1); + k = k - ptr->T2[63&(k>>14)]; + hibits(ret) = k; + return ret; +} + +/* up = nextafter(1,+Inf), dn = nextafter(1,-Inf) */ + +#define __half (ptr->half) +#define __one_and_a_half (ptr->one_and_a_half) +#define __two_to_minus_30 (ptr->two_to_minus_30) +#define __one (ptr->one) +#define __up (ptr->up) +#define __dn (ptr->dn) +#define __Nan (ptr->nan) + +#define Double(x) (*(double *)&x) + +/* Multiply with chopping rounding.. */ +#define choppedmul(a,b,c) \ + __asm__("multc %1,%2,%0":"=&f" (c):"f" (a), "f" (b)) + +double +__ieee754_sqrt(double x) +{ + const struct sqrt_data_struct * const ptr = &sqrt_data; + unsigned long k, bits; + double y, z, zp, zn; + double dn, up, low, high; + double half, one_and_a_half, one, two_to_minus_30; + + *(double *)&bits = x; + k = bits; + + /* Negative or NaN or Inf */ + if ((k >> 52) >= 0x7ff) + goto special; + y = initial_guess(x, k >> 32, ptr); + half = Double(__half); + one_and_a_half = Double(__one_and_a_half); + y = y*(one_and_a_half - half*x*y*y); + dn = Double(__dn); + two_to_minus_30 = Double(__two_to_minus_30); + y = y*((one_and_a_half - two_to_minus_30) - half*x*y*y); + up = Double(__up); + z = x*y; + one = Double(__one); + z = z + half*z*(one-z*y); + + choppedmul(z,dn,zp); + choppedmul(z,up,zn); + + choppedmul(z,zp,low); + low = low - x; + choppedmul(z,zn,high); + high = high - x; + + /* I can't get gcc to use fcmov's.. */ + __asm__("fcmovge %2,%3,%0" + :"=f" (z) + :"0" (z), "f" (low), "f" (zp)); + __asm__("fcmovlt %2,%3,%0" + :"=f" (z) + :"0" (z), "f" (high), "f" (zn)); + return z; /* Argh! gcc jumps to end here */ + +special: + /* throw away sign bit */ + k <<= 1; + /* -0 */ + if (!k) + return x; + /* special? */ + if ((k >> 53) == 0x7ff) { + /* NaN? */ + if (k << 11) + return x; + /* sqrt(+Inf) = +Inf */ + if (x > 0) + return x; + } + + x = Double(__Nan); + return x; +} + +#else +/* + * This version is much faster than generic sqrt implementation, but + * it doesn't handle exceptional values or the inexact flag. + */ + +asm ("\ + /* Define offsets into the structure defined in C above. */ + $DN = 0*8 + $UP = 1*8 + $HALF = 2*8 + $ALMOST_THREE_HALF = 3*8 + $NAN = 7*8 + $T2 = 8*8 + + /* Stack variables. */ + $K = 0 + $Y = 8 + + .text + .align 3 + .globl __ieee754_sqrt + .ent __ieee754_sqrt +__ieee754_sqrt: + ldgp $29, 0($27) + subq $sp, 16, $sp + .frame $sp, 16, $26, 0\n" +#ifdef PROF +" lda $28, _mcount + jsr $28, ($28), _mcount\n" +#endif +" .prologue 1 + + stt $f16, $K($sp) + lda $4, sqrt_data # load base address into t3 + fblt $f16, $negative + + /* Compute initial guess. */ + + .align 3 + + ldah $2, 0x5fe8 # e0 : + ldq $3, $K($sp) # .. e1 : + ldt $f12, $HALF($4) # e0 : + ldt $f18, $ALMOST_THREE_HALF($4) # .. e1 : + srl $3, 33, $1 # e0 : + mult $f16, $f12, $f11 # .. fm : $f11 = x * 0.5 + subl $2, $1, $2 # e0 : + addt $f12, $f12, $f17 # .. fa : $f17 = 1.0 + srl $2, 12, $1 # e0 : + and $1, 0xfc, $1 # .. e1 : + addq $1, $4, $1 # e0 : + ldl $1, $T2($1) # .. e1 : + addt $f12, $f17, $f15 # fa : $f15 = 1.5 + subl $2, $1, $2 # .. e1 : + sll $2, 32, $2 # e0 : + ldt $f14, $DN($4) # .. e1 : + stq $2, $Y($sp) # e0 : + ldt $f13, $Y($sp) # e1 : + + mult $f11, $f13, $f10 # fm : $f10 = (x * 0.5) * y + mult $f10, $f13, $f10 # fm : $f10 = ((x * 0.5) * y) * y + subt $f15, $f10, $f1 # fa : $f1 = (1.5 - 0.5*x*y*y) + mult $f13, $f1, $f13 # fm : yp = y*(1.5 - 0.5*x*y*y) + mult $f11, $f13, $f11 # fm : $f11 = x * 0.5 * yp + mult $f11, $f13, $f11 # fm : $f11 = (x * 0.5 * yp) * yp + subt $f18, $f11, $f1 # fa : $f1= (1.5-2^-30) - 0.5*x*yp*yp + mult $f13, $f1, $f13 # fm : ypp = $f13 = yp*$f1 + subt $f15, $f12, $f1 # fa : $f1 = (1.5 - 0.5) + ldt $f15, $UP($4) # .. e1 : + mult $f16, $f13, $f10 # fm : z = $f10 = x * ypp + mult $f10, $f13, $f11 # fm : $f11 = z*ypp + mult $f10, $f12, $f12 # fm : $f12 = z*0.5 + subt $f1, $f11, $f1 # .. fa : $f1 = 1 - z*ypp + mult $f12, $f1, $f12 # fm : $f12 = z*0.5*(1 - z*ypp) + addt $f10, $f12, $f0 # fa : zp=res=$f0= z + z*0.5*(1 - z*ypp) + + mult/c $f0, $f14, $f12 # fm : zmi = zp * DN + mult/c $f0, $f15, $f11 # fm : zpl = zp * UP + mult/c $f0, $f12, $f1 # fm : $f1 = zp * zmi + mult/c $f0, $f11, $f15 # fm : $f15 = zp * zpl + + subt $f1, $f16, $f13 # fa : y1 = zp*zmi - x + subt $f15, $f16, $f15 # fa : y2 = zp*zpl - x + + fcmovge $f13, $f12, $f0 # res = (y1 >= 0) ? zmi : res + fcmovlt $f15, $f11, $f0 # res = (y2 < 0) ? zpl : res + + addq $sp, 16, $sp # e0 : + ret # .. e1 : + +$negative: + ldt $f0, $NAN($4) + addq $sp, 16, $sp + ret + + .end __ieee754_sqrt"); + +#endif /* _IEEE_FP */ +#endif /* _IEEE_FP && _IEEE_FP_INEXACT */ From a698457a19725f2a265ef648fecedcbd938c7ab5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 5 Sep 1997 01:40:38 +0000 Subject: [PATCH 1056/4487] (pic-ccflag): Override it for more efficient code (together with a change in gcc). --- sysdeps/m68k/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile index 0f811bc62e..a056360ac6 100644 --- a/sysdeps/m68k/Makefile +++ b/sysdeps/m68k/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1993, 1994, 1996 Free Software Foundation, Inc. +# Copyright (C) 1993, 1994, 1996, 1997 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,6 +25,8 @@ endif asm-CPPFLAGS += $(m68k-syntax-flag) +pic-ccflag = -fpic + # Make sure setjmp.c is compiled with a frame pointer CFLAGS-setjmp.c := -fno-omit-frame-pointer From ea420deaef3710c200208ed24a9fdedf8210a77d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 5 Sep 1997 01:40:47 +0000 Subject: [PATCH 1057/4487] (elf_machine_load_address): Use _dl_start instead of a local label, to avoid getting an unreadable label name. --- sysdeps/m68k/dl-machine.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index 75434cd750..44eefb20f5 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -56,8 +56,8 @@ static inline Elf32_Addr elf_machine_load_address (void) { Elf32_Addr addr; - asm ("1: lea 1b(%%pc), %0\n" - " sub.l 1b@GOTPC(%%pc), %0" + asm ("lea _dl_start(%%pc), %0\n\t" + "sub.l _dl_start@GOTPC(%%pc), %0" : "=a" (addr)); return addr; } From c48cc591fae2fd166309f32bc3d0b55df7c413a4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 5 Sep 1997 02:21:22 +0000 Subject: [PATCH 1058/4487] add missing file --- sysdeps/vax/strcmp.s | 85 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 sysdeps/vax/strcmp.s diff --git a/sysdeps/vax/strcmp.s b/sysdeps/vax/strcmp.s new file mode 100644 index 0000000000..c9c5b479ae --- /dev/null +++ b/sysdeps/vax/strcmp.s @@ -0,0 +1,85 @@ +/* + * Copyright (c) 1983 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)strcmp.s 5.6 (Berkeley) 6/1/90" +#endif /* LIBC_SCCS and not lint */ + +/* + * Compare string s1 lexicographically to string s2. + * Return: + * 0 s1 == s2 + * > 0 s1 > s2 + * < 0 s2 < s2 + * + * strcmp(s1, s2) + * char *s1, *s2; + */ +#include "DEFS.h" + +ENTRY(strcmp, 0) + movl 4(ap),r1 # r1 = s1 + movl 8(ap),r3 # r3 = s2 + subb3 (r3),(r1),r0 # quick check for first char different + beql 1f # have to keep checking + cvtbl r0,r0 + ret +1: + clrl r5 # calculate min bytes to next page boundary + subb3 r1,$255,r5 # r5 = (bytes - 1) to end of page for s1 + subb3 r3,$255,r0 # r0 = (bytes - 1) to end of page for s2 + cmpb r0,r5 # r5 = min(r0, r5); + bgtru 2f + movb r0,r5 +2: + incl r5 # r5 = min bytes to next page boundary + cmpc3 r5,(r1),(r3) # compare strings + bneq 3f + subl2 r5,r1 # check if found null yet + locc $0,r5,(r1) + beql 1b # not yet done, continue checking + subl2 r0,r3 + mnegb (r3),r0 # r0 = '\0' - *s2 + cvtbl r0,r0 + ret +3: + subl2 r0,r5 # check for null in matching string + subl2 r5,r1 + locc $0,r5,(r1) + bneq 4f + subb3 (r3),(r1),r0 # r0 = *s1 - *s2 + cvtbl r0,r0 + ret +4: + clrl r0 # both the same to null + ret From 1f9be5843e31f2c07f8f8e12bdbe5a62023adf6d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 11 Sep 1997 03:13:30 +0000 Subject: [PATCH 1059/4487] Kill setjmp_aux. --- sysdeps/alpha/Makefile | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile index 5fe8e4ee7f..6cf4a173a6 100644 --- a/sysdeps/alpha/Makefile +++ b/sysdeps/alpha/Makefile @@ -21,10 +21,6 @@ ifeq ($(subdir),gmon) sysdep_routines += _mcount endif -ifeq ($(subdir),setjmp) -sysdep_routines += setjmp_aux -endif - ifeq ($(subdir),gnulib) sysdep_routines += $(divrem) endif @@ -45,6 +41,6 @@ endif divrem := divl divq reml remq -# For now, build everything with full IEEE math support. +# For now, build everything with full IEEE math support. # TODO: build separate libm and libm-ieee. sysdep-CFLAGS += -mieee From 3b14ec3ad7271c667ea658ed6d0d68199f93a878 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 11 Sep 1997 03:13:56 +0000 Subject: [PATCH 1060/4487] longjmp implementation using array. --- sysdeps/alpha/__longjmp.S | 59 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 sysdeps/alpha/__longjmp.S diff --git a/sysdeps/alpha/__longjmp.S b/sysdeps/alpha/__longjmp.S new file mode 100644 index 0000000000..34731172e1 --- /dev/null +++ b/sysdeps/alpha/__longjmp.S @@ -0,0 +1,59 @@ +/* Copyright (C) 1992, 1994, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#define __ASSEMBLY__ + +#include +#include + + +ENTRY(__longjmp) +#ifdef PROF + ldgp gp, 0(pv) + .set noat + lda AT, _mcount + jsr AT, (AT), _mcount + .set at + .prologue 1 +#else + .prologue 0 +#endif + + mov a1, v0 + ldq s0, JB_S0*8(a0) + ldq s1, JB_S1*8(a0) + ldq s2, JB_S2*8(a0) + ldq s3, JB_S3*8(a0) + ldq s4, JB_S4*8(a0) + ldq s5, JB_S5*8(a0) + ldq ra, JB_PC*8(a0) + ldq fp, JB_FP*8(a0) + ldq t0, JB_SP*8(a0) + ldt $f2, JB_F2*8(a0) + ldt $f3, JB_F3*8(a0) + ldt $f4, JB_F4*8(a0) + ldt $f5, JB_F5*8(a0) + ldt $f6, JB_F6*8(a0) + ldt $f7, JB_F7*8(a0) + ldt $f8, JB_F8*8(a0) + ldt $f9, JB_F9*8(a0) + cmoveq v0, 1, v0 + mov t0, sp + ret + +END(__longjmp) From 7e79246283688d42e5c45b1920374a63f1d4d839 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 11 Sep 1997 03:14:07 +0000 Subject: [PATCH 1061/4487] We have an assembler versin now. --- sysdeps/alpha/__longjmp.c | 92 --------------------------------------- 1 file changed, 92 deletions(-) delete mode 100644 sysdeps/alpha/__longjmp.c diff --git a/sysdeps/alpha/__longjmp.c b/sysdeps/alpha/__longjmp.c deleted file mode 100644 index 98eba7c513..0000000000 --- a/sysdeps/alpha/__longjmp.c +++ /dev/null @@ -1,92 +0,0 @@ -/* Copyright (C) 1992, 1994, 1997 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* Global register vars must come before any function defn. */ - -register long int - r9 asm ("$9"), r10 asm ("$10"), r11 asm ("$11"), r12 asm ("$12"), - r13 asm ("$13"), r14 asm ("$14"); - -register long int *fp asm ("$15"), *sp asm ("$30"), *retpc asm ("$26"); - -#if 1 /* XXX */ -register double - f2 asm ("$f2"), f3 asm ("$f3"), f4 asm ("$f4"), f5 asm ("$f5"), - f6 asm ("$f6"), f7 asm ("$f7"), f8 asm ("$f8"), f9 asm ("$f9"); -#endif - -#include - - -/* Jump to the position specified by ENV, causing the - setjmp call there to return VAL, or 1 if VAL is 0. */ -void -__longjmp (__jmp_buf env, int val) -{ - register long int retval asm ("$0"); - - /* Restore the integer registers. */ - r9 = env[0].__9; - r10 = env[0].__10; - r11 = env[0].__11; - r12 = env[0].__12; - r13 = env[0].__13; - r14 = env[0].__14; - -#if 1 /* XXX */ - /* Restore the floating point registers. */ - f2 = env[0].__f2; - f3 = env[0].__f3; - f4 = env[0].__f4; - f5 = env[0].__f5; - f6 = env[0].__f6; - f7 = env[0].__f7; - f8 = env[0].__f8; - f9 = env[0].__f9; -#endif - - /* Set the return PC to that of setjmp's caller. */ - retpc = env[0].__pc; - - /* Restore the FP and SP of setjmp's caller. */ - fp = env[0].__fp; - sp = env[0].__sp; - - /* Return VAL (or 1 if VAL is zero) to setjmp's caller. - - We use an asm here rather than a normal C return statement - just in case the compiler wanted to do some stack frobnication - in the function epilogue. Since we have already restored - precisely the FP and SP the desired environment needs, - we must avoid the compiler doing anything with the stack. */ - - - asm volatile - ("cmoveq %1, 1, %0\n\t" /* $0 = val ?: 1; */ - "ret $31, (%2), 1" /* return $0 */ - : "=r" (retval) - /* The "0" constraint should force VAL into $0. */ - : "0" (val), "r" (retpc)); - - while (1) - { - /* The loop is just to avoid `volatile function does return' warnings. - The instruction will only be executed once. */ - asm volatile (""); - } -} From 33ec2a1c5eb7399406a929593c5c8ec07df0a1a0 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 11 Sep 1997 03:14:24 +0000 Subject: [PATCH 1062/4487] Stub out. --- sysdeps/alpha/bsd-_setjmp.S | 40 +------------------------------------ sysdeps/alpha/bsd-setjmp.S | 38 +---------------------------------- 2 files changed, 2 insertions(+), 76 deletions(-) diff --git a/sysdeps/alpha/bsd-_setjmp.S b/sysdeps/alpha/bsd-_setjmp.S index 07fb0c7637..4e6a2da560 100644 --- a/sysdeps/alpha/bsd-_setjmp.S +++ b/sysdeps/alpha/bsd-_setjmp.S @@ -1,39 +1 @@ -/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. Alpha version. - Copyright (C) 1994, 1996 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* This just does a tail-call to `__sigsetjmp (ARG, 0)'. - We cannot do it in C because it must be a tail-call, so frame-unwinding - in setjmp doesn't clobber the state restored by longjmp. */ - -#include - -ENTRY(_setjmp) - ldgp $29,0($27) -#ifdef PROF - .set noat - lda AT, _mcount - jsr AT, (AT), _mcount - .set at -#endif - .prologue 1 - bis $31, $31, $17 /* Pass a second argument of zero. */ - jmp $31, __sigsetjmp /* Call __sigsetjmp. */ - END(_setjmp) - -strong_alias_asm(_setjmp, __setjmp) +/* _setjmp is in setjmp.S */ diff --git a/sysdeps/alpha/bsd-setjmp.S b/sysdeps/alpha/bsd-setjmp.S index cf5bf189de..1da848d2f1 100644 --- a/sysdeps/alpha/bsd-setjmp.S +++ b/sysdeps/alpha/bsd-setjmp.S @@ -1,37 +1 @@ -/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. Alpha version. - Copyright (C) 1994, 1996 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* This just does a tail-call to `__sigsetjmp (ARG, 1)'. - We cannot do it in C because it must be a tail-call, so frame-unwinding - in setjmp doesn't clobber the state restored by longjmp. */ - -#include - -ENTRY(setjmp) - ldgp $29, 0($27) -#ifdef PROF - .set noat - lda AT, _mcount - jsr AT, (AT), _mcount - .set at -#endif - .prologue 1 - bis $31, 1, $17 /* Pass a second argument of one. */ - jmp $31, __sigsetjmp /* Call __sigsetjmp. */ - END(setjmp) +/* setjmp is in setjmp.S */ From 38a2fc1c5161d90dfe6f418e3715ba4059128edf Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 11 Sep 1997 03:14:40 +0000 Subject: [PATCH 1063/4487] Do the work; don't call __setjmp_aux. Move _setjmp and setjmp from bsd-*.S. --- sysdeps/alpha/setjmp.S | 68 +++++++++++++++++++++++++++++++++++------- 1 file changed, 58 insertions(+), 10 deletions(-) diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S index 4b2e147b15..48fe33b3ec 100644 --- a/sysdeps/alpha/setjmp.S +++ b/sysdeps/alpha/setjmp.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1994, 1996, 1997 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 @@ -16,13 +16,21 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#define __ASSEMBLY__ + #include +#include + + .ent __sigsetjmp + .global __sigsetjmp +__sigsetjmp: + ldgp gp, 0(pv) -/* The function __sigsetjmp_aux saves all the registers, but it can't - reliably access the stack or frame pointers, so we pass them in as - extra arguments. */ -ENTRY (__sigsetjmp) - ldgp $29, 0($27) +$sigsetjmp_local: + subq sp, 16, sp + .frame sp, 16, ra, 0 + stq ra, 0(sp) + .mask 0x04000000, -16 #ifdef PROF .set noat lda AT, _mcount @@ -31,8 +39,48 @@ ENTRY (__sigsetjmp) #endif .prologue 1 - bis $30, $30, $18 /* Pass SP as 3rd arg. */ - bis $15, $15, $19 /* Pass FP as 4th arg. */ - jmp $31, __sigsetjmp_aux /* Call __sigsetjmp_aux. */ + stq s0, JB_S0*8(a0) + stq s1, JB_S1*8(a0) + stq s2, JB_S2*8(a0) + stq s3, JB_S3*8(a0) + stq s4, JB_S4*8(a0) + stq s5, JB_S5*8(a0) + stq ra, JB_PC*8(a0) + addq sp, 16, t0 + stq fp, JB_FP*8(a0) + stq t0, JB_SP*8(a0) + stt $f2, JB_F2*8(a0) + stt $f3, JB_F3*8(a0) + stt $f4, JB_F4*8(a0) + stt $f5, JB_F5*8(a0) + stt $f6, JB_F6*8(a0) + stt $f7, JB_F7*8(a0) + stt $f8, JB_F8*8(a0) + stt $f9, JB_F9*8(a0) + + /* Call to C to (potentially) save our signal mask. */ + jsr ra, __sigjmp_save + + ldq ra, 0(sp) + addq sp, 16, sp + ret + +END(__sigsetjmp) + +/* Put these traditional entry points in the same file so that we can + elide much of the nonsense in trying to jmp to the real function. */ + +ENTRY(_setjmp) + ldgp gp, 0(pv) + mov 0, a1 + br $sigsetjmp_local +END(_setjmp) + +ENTRY(setjmp) + ldgp gp, 0(pv) + mov 1, a1 + br $sigsetjmp_local +END(setjmp) - END(__sigsetjmp) +weak_extern(_setjmp) +weak_extern(setjmp) From aaf05db5791af5054be6fb66e72051d52c9d872e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 11 Sep 1997 03:14:53 +0000 Subject: [PATCH 1064/4487] Not needed anymore. --- sysdeps/alpha/setjmp_aux.c | 76 -------------------------------------- 1 file changed, 76 deletions(-) delete mode 100644 sysdeps/alpha/setjmp_aux.c diff --git a/sysdeps/alpha/setjmp_aux.c b/sysdeps/alpha/setjmp_aux.c deleted file mode 100644 index fa26975295..0000000000 --- a/sysdeps/alpha/setjmp_aux.c +++ /dev/null @@ -1,76 +0,0 @@ -/* Copyright (C) 1992, 1994, 1997 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* Global register decls must come before any function defn. */ - -register long int - r9 asm ("$9"), r10 asm ("$10"), r11 asm ("$11"), r12 asm ("$12"), - r13 asm ("$13"), r14 asm ("$14"); - -register long int *fp asm ("$15"), *sp asm ("$30"), *retpc asm ("$26"); - -#if 1 /* XXX */ -register double - f2 asm ("$f2"), f3 asm ("$f3"), f4 asm ("$f4"), f5 asm ("$f5"), - f6 asm ("$f6"), f7 asm ("$f7"), f8 asm ("$f8"), f9 asm ("$f9"); -#endif - - -#include - - -/* Save the current program position in ENV and return 0. */ -int -__sigsetjmp_aux (sigjmp_buf env, int savemask, long int *sp, long int *fp) -{ - /* Save the integer registers. */ - env[0].__jmpbuf[0].__9 = r9; - env[0].__jmpbuf[0].__10 = r10; - env[0].__jmpbuf[0].__11 = r11; - env[0].__jmpbuf[0].__12 = r12; - env[0].__jmpbuf[0].__13 = r13; - env[0].__jmpbuf[0].__14 = r14; - -#if 1 /* XXX */ - /* Save the floating point registers. */ - env[0].__jmpbuf[0].__f2 = f2; - env[0].__jmpbuf[0].__f3 = f3; - env[0].__jmpbuf[0].__f4 = f4; - env[0].__jmpbuf[0].__f5 = f5; - env[0].__jmpbuf[0].__f6 = f6; - env[0].__jmpbuf[0].__f7 = f7; - env[0].__jmpbuf[0].__f8 = f8; - env[0].__jmpbuf[0].__f9 = f9; -#endif - - /* Save the return address of our caller, where longjmp will jump to. */ - env[0].__jmpbuf[0].__pc = retpc; - - /* Save the FP and SP of our caller. The __sigsetjmp entry point - simply puts these in the argument registers for us to fetch. */ - env[0].__jmpbuf[0].__fp = fp; - env[0].__jmpbuf[0].__sp = sp; - - /* Save the signal mask if requested. */ - __sigjmp_save (env, savemask); - - retpc = env[0].__jmpbuf[0].__pc; /* restore ra, ugly... */ - - /* Return to the original caller of __sigsetjmp. */ - return 0; -} From 06fa7473dc5ea57dc0d5e0987e8ba859fb40fdcb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 11 Sep 1997 03:15:02 +0000 Subject: [PATCH 1065/4487] Rewrite in terms of an array. --- sysdeps/alpha/bits/setjmp.h | 79 +++++++++++++++++++++++++------------ 1 file changed, 53 insertions(+), 26 deletions(-) diff --git a/sysdeps/alpha/bits/setjmp.h b/sysdeps/alpha/bits/setjmp.h index d461205c06..9aa30463d6 100644 --- a/sysdeps/alpha/bits/setjmp.h +++ b/sysdeps/alpha/bits/setjmp.h @@ -17,30 +17,57 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -typedef struct - { - /* Integer registers: - $0 is the return value; - $1-$8, $22-$25, $28 are call-used; - $9-$14 we save here; - $15 is the FP and we save it here; - $16-$21 are input arguments (call-used); - $26 is the return PC and we save it here; - $27 is the procedure value (i.e., the address of __setjmp); - $29 is the global pointer, which the caller will reconstruct - from the return address restored in $26; - $30 is the stack pointer and we save it here; - $31 is always zero. */ - long int __9, __10, __11, __12, __13, __14; - long int *__pc, *__fp, *__sp; +/* The previous bits/setjmp.h had __jmp_buf defined as a structure. + We use an array of 'long int' instead, to make writing the + assembler easier. Naturally, user code should not depend on + either representation. */ -#if 1 /* XXX need predefine for TARGET_FPREGS */ - /* Floating-point registers: - $f0 is the floating return value; - $f1, $f10-$f15, $f22-$f30 are call-used; - $f2-$f9 we save here; - $f16-$21 are input args (call-used); - $f31 is always zero. */ - double __f2, __f3, __f4, __f5, __f6, __f7, __f8, __f9; -#endif /* Have FP regs. */ - } __jmp_buf[1]; +/* + * Integer registers: + * $0 is the return value (va); + * $1-$8, $22-$25, $28 are call-used (t0-t7, t8-t11, at); + * $9-$14 we save here (s0-s5); + * $15 is the FP and we save it here (fp or s6); + * $16-$21 are input arguments (call-used) (a0-a5); + * $26 is the return PC and we save it here (ra); + * $27 is the procedure value (i.e., the address of __setjmp) (pv or t12); + * $29 is the global pointer, which the caller will reconstruct + * from the return address restored in $26 (gp); + * $30 is the stack pointer and we save it here (sp); + * $31 is always zero (zero). + * + * Floating-point registers: + * $f0 is the floating return value; + * $f1, $f10-$f15, $f22-$f30 are call-used; + * $f2-$f9 we save here; + * $f16-$21 are input args (call-used); + * $f31 is always zero. + * + * Note that even on Alpha hardware that does not have an FPU (there + * isn't such a thing currently) it is required to implement the FP + * registers. + */ + +#if defined(__USE_MISC) || defined(__ASSEMBLY__) +#define JB_S0 0 +#define JB_S1 1 +#define JB_S2 2 +#define JB_S3 3 +#define JB_S4 4 +#define JB_S5 5 +#define JB_PC 6 +#define JB_FP 7 +#define JB_SP 8 +#define JB_F2 9 +#define JB_F3 10 +#define JB_F4 11 +#define JB_F5 12 +#define JB_F6 13 +#define JB_F7 14 +#define JB_F8 15 +#define JB_F9 16 +#endif + +#ifndef __ASSEMBLY__ +typedef long int __jmp_buf[17]; +#endif From 90864a576a12672ccb9b35c7a09ccad40c109b37 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 16 Sep 1997 00:40:22 +0000 Subject: [PATCH 1066/4487] Low-level atomicity functions for m68k. --- sysdeps/m68k/m68020/atomicity.h | 65 +++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 sysdeps/m68k/m68020/atomicity.h diff --git a/sysdeps/m68k/m68020/atomicity.h b/sysdeps/m68k/m68020/atomicity.h new file mode 100644 index 0000000000..d74b8194ad --- /dev/null +++ b/sysdeps/m68k/m68020/atomicity.h @@ -0,0 +1,65 @@ +/* Low-level functions for atomic operations. m680x0 version, x >= 2. + Copyright (C) 1997 Free Software Foundation, Inc. + Contributed by Andreas Schwab . + + 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _ATOMICITY_H +#define _ATOMICITY_H 1 + +#include + + +static inline int +__attribute__ ((unused)) +exchange_and_add (volatile uint32_t *mem, int val) +{ + register int result = *mem; + register int temp; + __asm__ __volatile__ ("1: move%.l %0,%1;" + " add%.l %2,%1;" + " cas%.l %0,%1,%3;" + " jbne 1b" + : "=d" (result), "=&d" (temp) + : "d" (val), "m" (*mem), "0" (result) : "memory"); + return result; +} + +static inline void +__attribute__ ((unused)) +atomic_add (volatile uint32_t *mem, int val) +{ + /* XXX Use cas here as well? */ + __asm__ __volatile__ ("add%.l %0,%1" + : : "ir" (val), "m" (*mem) : "memory"); +} + +static inline int +__attribute__ ((unused)) +compare_and_swap (volatile long int *p, long int oldval, long int newval) +{ + char ret; + long int readval; + + __asm__ __volatile__ ("cas%.l %2,%3,%1; seq %0" + : "=dm" (ret), "=m" (*p), "=d" (readval) + : "d" (newval), "m" (*p), "2" (oldval)); + return ret; +} + +#endif /* atomicity.h */ From 384cd03a585b37d76bf52bee27e2f1e3926795e1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 16 Sep 1997 00:41:55 +0000 Subject: [PATCH 1067/4487] Define bzero as weak alias of __bzero. --- sysdeps/alpha/bzero.S | 3 ++- sysdeps/vax/bzero.s | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/bzero.S b/sysdeps/alpha/bzero.S index b70ade6a6d..1e0792395b 100644 --- a/sysdeps/alpha/bzero.S +++ b/sysdeps/alpha/bzero.S @@ -78,7 +78,7 @@ $tail: bne t4, 1f # is there a tail to do? .end bzero_loop -ENTRY(bzero) +ENTRY(__bzero) #ifdef PROF ldgp gp, 0(pv) lda AT, _mcount @@ -117,3 +117,4 @@ $oneq: $done: ret END(bzero) +weak_alias (__bzero, bzero) diff --git a/sysdeps/vax/bzero.s b/sysdeps/vax/bzero.s index 5f90763d41..dff59ba667 100644 --- a/sysdeps/vax/bzero.s +++ b/sysdeps/vax/bzero.s @@ -39,7 +39,7 @@ #include "DEFS.h" -ENTRY(bzero, 0) +ENTRY(__bzero, 0) movl 4(ap),r3 jbr 2f 1: @@ -51,3 +51,4 @@ ENTRY(bzero, 0) jgtr 1b movc5 $0,(r3),$0,8(ap),(r3) ret +weak_alias (__bzero, bzero) From 127f2c3b834a016becb8532a4edc44810c1cc8ef Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 21 Sep 1997 01:23:55 +0000 Subject: [PATCH 1068/4487] Call __getopt_clean_environment with additional argument. --- sysdeps/mach/hurd/mips/init-first.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sysdeps/mach/hurd/mips/init-first.c b/sysdeps/mach/hurd/mips/init-first.c index b057aeb097..a411a1b0e9 100644 --- a/sysdeps/mach/hurd/mips/init-first.c +++ b/sysdeps/mach/hurd/mips/init-first.c @@ -27,7 +27,7 @@ extern void __mach_init (void); extern void __libc_init (int, char **, char **); -extern void __getopt_clean_environment (void); +extern void __getopt_clean_environment (char **); extern void __libc_global_ctors (void); unsigned int __hurd_threadvar_max; @@ -110,7 +110,7 @@ init1 (int argc, char *arg0, ...) __libc_init (argc, argv, __environ); /* This is a hack to make the special getopt in GNU libc working. */ - __getopt_clean_environment (); + __getopt_clean_environment (envp); #ifdef PIC __libc_global_ctors (); @@ -169,14 +169,14 @@ __init (int *data) be the return address for `init1'; we will jump there with NEWSP as the stack pointer. */ return newsp; - } + } /* The argument data is just above the stack frame we will unwind by returning. */ return (void *) data; (void) &__init; -} +} #ifdef PIC /* This function is called to initialize the shared C library. @@ -399,7 +399,7 @@ ___libc_init_first (int return_addr, int argc, ...) #endif RUN_HOOK (_hurd_preinit_hook, ()); - + _hurd_startup ((void **) &argc, &doinit); (void) &___libc_init_first; From a8e5f5a44cf1d096a7f0142db6514571b86e0808 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 27 Sep 1997 00:19:38 +0000 Subject: [PATCH 1069/4487] (ELF_MACHINE_RELOC_NOPLT): Renamed. (elf_alpha_fix_plt): Renamed elf_machine_fixup_plt. --- sysdeps/alpha/dl-machine.h | 85 +++++++++++++++++++++----------------- 1 file changed, 48 insertions(+), 37 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index e0ba67b48b..d3eb242c04 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -91,6 +91,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) { Elf64_Addr plt; extern void _dl_runtime_resolve (void); + extern void _dl_runtime_profile (void); if (l->l_info[DT_JMPREL] && lazy) { @@ -100,7 +101,14 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) plt = l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr; /* This function will be called to perform the relocation. */ - *(Elf64_Addr *)(plt + 16) = (Elf64_Addr) &_dl_runtime_resolve; + if (!profile) + *(Elf64_Addr *)(plt + 16) = (Elf64_Addr) &_dl_runtime_resolve; + else + { + *(Elf64_Addr *)(plt + 16) = (Elf64_Addr) &_dl_runtime_profile; + /* Say that we really want profiling and the timers are started. */ + _dl_profile_map = l; + } /* Identify this shared object */ *(Elf64_Addr *)(plt + 24) = (Elf64_Addr) l; @@ -115,11 +123,10 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) /* This code is used in dl-runtime.c to call the `fixup' function and then redirect to the address it returns. */ -#define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ( \ -"/* Trampoline for _dl_runtime_resolver */ - .globl _dl_runtime_resolve - .ent _dl_runtime_resolve -_dl_runtime_resolve: +#define TRAMPOLINE_TEMPLATE(tramp_name, fixup_name, IMB) asm ( "\ + .globl " #tramp_name " + .ent " #tramp_name " +" #tramp_name ": lda $sp, -168($sp) .frame $sp, 168, $26 /* Preserve all registers that C normally doesn't. */ @@ -146,18 +153,20 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) stq $29, 160($sp) .mask 0x27ff01ff, -168 /* Set up our $gp */ - br $gp, 0f -0: ldgp $gp, 0($gp) + br $gp, .+4 + ldgp $gp, 0($gp) .prologue 1 - /* Set up the arguments for _dl_runtime_resolve. */ + /* Set up the arguments for fixup: */ /* $16 = link_map out of plt0 */ /* $17 = offset of reloc entry = ($28 - $27 - 20) /12 * 24 */ + /* $18 = return address */ subq $28, $27, $17 ldq $16, 8($27) subq $17, 20, $17 + mov $26, $18 addq $17, $17, $17 /* Do the fixup */ - bsr $26, fixup..ng + bsr $26, " #fixup_name "..ng /* Move the destination address into position. */ mov $0, $27 /* Restore program registers. */ @@ -183,14 +192,21 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) ldq $25, 152($sp) ldq $29, 160($sp) /* Flush the Icache after having modified the .plt code. */ - imb + " #IMB " /* Clean up and turn control to the destination */ lda $sp, 168($sp) jmp $31, ($27) - .end _dl_runtime_resolve"); + .end " #tramp_name) -/* The PLT uses Elf64_Rela relocs. */ -#define elf_machine_relplt elf_machine_rela +#ifndef PROF +#define ELF_MACHINE_RUNTIME_TRAMPOLINE \ + TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup, imb); \ + TRAMPOLINE_TEMPLATE (_dl_runtime_profile, profile_fixup, #nop); +#else +#define ELF_MACHINE_RUNTIME_TRAMPOLINE \ + TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup); \ + strong_alias (_dl_runtime_resolve, _dl_runtime_profile); +#endif /* Initial entry point code for the dynamic linker. The C function `_dl_start' is the real entry point; @@ -255,37 +271,31 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) #define elf_machine_lookup_noexec_p(type) (0) /* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */ -#define ELF_MACHINE_RELOC_NOPLT R_ALPHA_JMP_SLOT +#define ELF_MACHINE_JMP_SLOT R_ALPHA_JMP_SLOT /* The alpha never uses Elf64_Rel relocations. */ #define ELF_MACHINE_NO_REL 1 -#endif /* !dl_machine_h */ - -#ifdef RESOLVE - /* Fix up the instructions of a PLT entry to invoke the function rather than the dynamic linker. */ static inline void -elf_alpha_fix_plt(struct link_map *l, - const Elf64_Rela *reloc, - Elf64_Addr got_addr, - Elf64_Addr value) +elf_machine_fixup_plt(struct link_map *l, const Elf64_Rela *reloc, + Elf64_Addr *got_addr, Elf64_Addr value) { const Elf64_Rela *rela_plt; Elf64_Word *plte; long edisp; + /* Store the value we are going to load. */ + *got_addr = value; + /* Recover the PLT entry address by calculating reloc's index into the .rela.plt, and finding that entry in the .plt. */ - rela_plt = (void *)(l->l_addr + l->l_info[DT_JMPREL]->d_un.d_ptr); - plte = (void *)(l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr + 32); plte += 3 * (reloc - rela_plt); /* Find the displacement from the plt entry to the function. */ - edisp = (long)(value - (Elf64_Addr)&plte[3]) / 4; if (edisp >= -0x100000 && edisp < 0x100000) @@ -299,7 +309,7 @@ elf_alpha_fix_plt(struct link_map *l, lo = (short)hi; hi = (hi - lo) >> 16; - /* Emit "lda $27,L($27)" */ + /* Emit "lda $27,lo($27)" */ plte[1] = 0x237b0000 | (lo & 0xffff); /* Emit "br $31,function" */ @@ -309,7 +319,7 @@ elf_alpha_fix_plt(struct link_map *l, committed to memory before the first is overwritten. */ __asm__ __volatile__("wmb" : : : "memory"); - /* Emit "ldah $27,H($27)" */ + /* Emit "ldah $27,hi($27)" */ plte[0] = 0x277b0000 | (hi & 0xffff); } else @@ -319,11 +329,11 @@ elf_alpha_fix_plt(struct link_map *l, into the cache. */ int hi, lo; - hi = got_addr - (Elf64_Addr)&plte[0]; + hi = (Elf64_Addr)got_addr - (Elf64_Addr)&plte[0]; lo = (short)hi; hi = (hi - lo) >> 16; - /* Emit "ldq $27,L($27)" */ + /* Emit "ldq $27,lo($27)" */ plte[1] = 0xa77b0000 | (lo & 0xffff); /* Emit "jmp $31,($27)" */ @@ -333,7 +343,7 @@ elf_alpha_fix_plt(struct link_map *l, committed to memory before the first is overwritten. */ __asm__ __volatile__("wmb" : : : "memory"); - /* Emit "ldah $27,H($27)" */ + /* Emit "ldah $27,hi($27)" */ plte[0] = 0x277b0000 | (hi & 0xffff); } @@ -343,6 +353,10 @@ elf_alpha_fix_plt(struct link_map *l, hasn't made it into Icache yet, so there's nothing to clean up. */ } +#endif /* !dl_machine_h */ + +#ifdef RESOLVE + /* Perform the relocation specified by RELOC and SYM (which is fully resolved). MAP is the object containing the reloc. */ static inline void @@ -382,14 +396,12 @@ elf_machine_rela (struct link_map *map, loadbase = RESOLVE (&sym, version, r_type); sym_value = sym ? loadbase + sym->st_value : 0; + sym_value += reloc->r_addend; if (r_type == R_ALPHA_GLOB_DAT) *reloc_addr = sym_value; else if (r_type == R_ALPHA_JMP_SLOT) - { - *reloc_addr = sym_value; - elf_alpha_fix_plt (map, reloc, (Elf64_Addr) reloc_addr, sym_value); - } + elf_machine_fixup_plt (map, reloc, reloc_addr, sym_value); else if (r_type == R_ALPHA_REFQUAD) { sym_value += *reloc_addr; @@ -405,10 +417,9 @@ elf_machine_rela (struct link_map *map, = (void *)(map->l_addr + map->l_info[DT_SYMTAB]->d_un.d_ptr); sym_value -= map->l_addr; sym_value -= dlsymtab[ELF64_R_SYM(reloc->r_info)].st_value; + sym_value -= reloc->r_addend; } - else #endif - sym_value += reloc->r_addend; *reloc_addr = sym_value; } else From ff91cf3056981090bfc1a999e10267d11bca1c0f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 27 Sep 1997 00:20:13 +0000 Subject: [PATCH 1070/4487] (elf_machine_relplt): Killed. (ELF_MACHINE_JMP_SLOT): Renamed. (elf_machine_fixup_plt): New function. --- sysdeps/m68k/dl-machine.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index 44eefb20f5..cc0fb56189 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -135,8 +135,6 @@ asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \ ".set _dl_runtime_profile, _dl_runtime_resolve"); #endif #define ELF_MACHINE_RUNTIME_FIXUP_ARGS long int save_a0, long int save_a1 -/* The PLT uses Elf32_Rela relocs. */ -#define elf_machine_relplt elf_machine_rela /* Mask identifying addresses reserved for the user program, @@ -216,11 +214,18 @@ asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \ #define elf_machine_lookup_noplt_p(type) ((type) == R_68K_JMP_SLOT) /* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */ -#define ELF_MACHINE_RELOC_NOPLT R_68K_JMP_SLOT +#define ELF_MACHINE_JMP_SLOT R_68K_JMP_SLOT /* The m68k never uses Elf32_Rel relocations. */ #define ELF_MACHINE_NO_REL 1 +static inline void +elf_machine_fixup_plt (struct link_map *map, const Elf32_Rela *reloc, + Elf32_Addr *reloc_addr, Elf32_Addr value) +{ + *reloc_addr = value + reloc->r_addend; +} + #endif /* !dl_machine_h */ #ifdef RESOLVE @@ -267,7 +272,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, break; case R_68K_GLOB_DAT: case R_68K_JMP_SLOT: - *reloc_addr = value; + *reloc_addr = value + reloc->r_addend; break; case R_68K_8: *(char *) reloc_addr = value + reloc->r_addend; From d0b9a80c6e21d931be7176b4bee3fb20eaf91900 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 30 Sep 1997 16:58:36 +0000 Subject: [PATCH 1071/4487] Rename exp2{,l,f} to __ieee754_exp2{,l,f}. --- sysdeps/m68k/fpu/bits/mathinline.h | 2 +- sysdeps/m68k/fpu/s_exp2.c | 4 ++-- sysdeps/m68k/fpu/s_exp2f.c | 4 ++-- sysdeps/m68k/fpu/s_exp2l.c | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/fpu/bits/mathinline.h index 2ab570fba5..1e68ea00c0 100644 --- a/sysdeps/m68k/fpu/bits/mathinline.h +++ b/sysdeps/m68k/fpu/bits/mathinline.h @@ -120,6 +120,7 @@ __inline_mathop(__ieee754_asin, asin) __inline_mathop(__ieee754_cosh, cosh) __inline_mathop(__ieee754_sinh, sinh) __inline_mathop(__ieee754_exp, etox) +__inline_mathop(__ieee754_exp2, twotox) __inline_mathop(__ieee754_log10, log10) __inline_mathop(__ieee754_log, logn) __inline_mathop(__ieee754_sqrt, sqrt) @@ -139,7 +140,6 @@ __inline_mathop(__log1p, lognp1) __inline_mathop(__significand, getman) __inline_mathop(__log2, log2) -__inline_mathop(__exp2, twotox) __inline_mathop(__trunc, intrz) #if !defined __NO_MATH_INLINES && defined __OPTIMIZE__ diff --git a/sysdeps/m68k/fpu/s_exp2.c b/sysdeps/m68k/fpu/s_exp2.c index 389528092a..24fac4fce6 100644 --- a/sysdeps/m68k/fpu/s_exp2.c +++ b/sysdeps/m68k/fpu/s_exp2.c @@ -1,2 +1,2 @@ -#define FUNC exp2 -#include +#define FUNC __ieee754_exp2 +#include diff --git a/sysdeps/m68k/fpu/s_exp2f.c b/sysdeps/m68k/fpu/s_exp2f.c index 20ac916d1a..593842e4e5 100644 --- a/sysdeps/m68k/fpu/s_exp2f.c +++ b/sysdeps/m68k/fpu/s_exp2f.c @@ -1,2 +1,2 @@ -#define FUNC exp2f -#include +#define FUNC __ieee754_exp2f +#include diff --git a/sysdeps/m68k/fpu/s_exp2l.c b/sysdeps/m68k/fpu/s_exp2l.c index 19121b929d..0ab2a428c0 100644 --- a/sysdeps/m68k/fpu/s_exp2l.c +++ b/sysdeps/m68k/fpu/s_exp2l.c @@ -1,2 +1,2 @@ -#define FUNC exp2l -#include +#define FUNC __ieee754_exp2l +#include From 5a6db5ab69f840e3d990ebec98023762585eb898 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 6 Oct 1997 02:03:17 +0000 Subject: [PATCH 1072/4487] Add LFS definitions. --- sysdeps/unix/bsd/sun/sunos4/bits/resource.h | 42 ++++++++++++++++++--- 1 file changed, 36 insertions(+), 6 deletions(-) diff --git a/sysdeps/unix/bsd/sun/sunos4/bits/resource.h b/sysdeps/unix/bsd/sun/sunos4/bits/resource.h index ff55773e69..f51262d92d 100644 --- a/sysdeps/unix/bsd/sun/sunos4/bits/resource.h +++ b/sysdeps/unix/bsd/sun/sunos4/bits/resource.h @@ -22,6 +22,8 @@ and `setrlimit' are not system calls, these are the values used by the C library to emulate them. */ +#include + /* Kinds of resource limit. */ enum __rlimit_resource { @@ -52,19 +54,47 @@ enum __rlimit_resource #define RLIMIT_NOFILE RLIMIT_NOFILE #define RLIMIT_OFILE RLIMIT_OFILE - RLIM_NLIMITS, - - RLIM_INFINITY = 0x7fffffff /* Value to indicate that there is no limit. */ -#define RLIM_INFINITY RLIM_INFINITY + RLIM_NLIMITS }; +/* Value to indicate that there is no limit. */ +#ifndef __USE_FILE_OFFSET64 +# define RLIM_INFINITY 0x7fffffff +#else +# define RLIM_INFINITY 0x7fffffffffffffffL +#endif + +#ifdef __USE_LARGEFILE64 +# define RLIM64_INFINITY 0x7fffffffffffffffL +#endif + + +/* Type to represent quantities in resource limits. */ +#ifndef __USE_FILE_OFFSET64 +typedef __rlim_t rlim_t; +#else +typedef __rlim64_t rlim_t; +#endif + struct rlimit { /* The current (soft) limit. */ - int rlim_cur; + rlim_t rlim_cur; + /* The hard limit. */ + rlim_t rlim_max; + }; + +#ifdef __USE_LARGEFILE64 +typedef __rlim64_t rlim64_t; + +struct rlimit64 + { + /* The current (soft) limit. */ + rlim64_t rlim_cur; /* The hard limit. */ - int rlim_max; + rlim64_t rlim_max; }; +#endif /* Whose usage statistics do you want? */ enum __rusage_who From cfe3af132cdabab97733722c3a5323b6f231d5b6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 6 Oct 1997 02:12:31 +0000 Subject: [PATCH 1073/4487] Linux/Alpha specific dirent definitions. --- sysdeps/unix/sysv/linux/alpha/bits/dirent.h | 50 +++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/dirent.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/dirent.h b/sysdeps/unix/sysv/linux/alpha/bits/dirent.h new file mode 100644 index 0000000000..4d717e4194 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/bits/dirent.h @@ -0,0 +1,50 @@ +/* Copyright (C) 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _BITS_DIRENT_H +#define _BITS_DIRENT_H 1 + +/* We don't have to make a difference for __USE_FILE_OFFSET64. */ +struct dirent + { + long int d_ino; + __off_t d_off; + unsigned short int d_reclen; + unsigned char d_type; + char d_name[256]; /* We must not include limits.h! */ + }; + +#ifdef __USE_LARGEFILE64 +struct dirent64 + { + __ino64_t d_ino; + __off64_t d_off; + unsigned short int d_reclen; + unsigned char d_type; + char d_name[256]; /* We must not include limits.h! */ + }; +#endif + +#define d_fileno d_ino /* Backwards compatibility. */ + +#undef _DIRENT_HAVE_D_NAMLEN +#define _DIRENT_HAVE_D_RECLEN +#define _DIRENT_HAVE_D_OFF +#define _DIRENT_HAVE_D_TYPE + +#endif /* bits/dirent.h */ From f059549514acfde89f636849b808de2451aaf745 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 6 Oct 1997 02:15:04 +0000 Subject: [PATCH 1074/4487] Define LFS types. --- sysdeps/unix/sysv/linux/alpha/bits/types.h | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h index 9a4666a508..cf2668a0e6 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/types.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h @@ -27,9 +27,9 @@ /* Convenience types. */ typedef unsigned char __u_char; -typedef unsigned short __u_short; +typedef unsigned short int __u_short; typedef unsigned int __u_int; -typedef unsigned long __u_long; +typedef unsigned long int __u_long; typedef unsigned long int __u_quad_t; typedef long int __quad_t; typedef signed char __int8_t; @@ -52,6 +52,8 @@ typedef long int __off_t; /* Type of file sizes and offsets. */ typedef __quad_t __loff_t; /* Type of file sizes and offsets. */ typedef int __pid_t; /* Type of process identifications. */ typedef long int __ssize_t; /* Type of a byte count, or error. */ +typedef long int __rlim_t; /* Type of resource counts. */ +typedef long int __rlim64_t; /* Type of resource counts (LFS). */ typedef struct { @@ -92,4 +94,19 @@ typedef struct typedef int __key_t; + +/* Types from the Large File Support interface. */ + +/* Type to count number os disk blocks. */ +typedef int __blkcnt_t; +typedef __quad_t __blkcnt64_t; + +/* Type to count file system blocks. */ +typedef unsigned int __fsblkcnt_t; +typedef __u_quad_t __fsblkcnt64_t; + +/* Type to count file system inodes. */ +typedef unsigned long int __fsfilcnt_t; +typedef __u_quad_t __fsfilcnt64_t; + #endif /* bits/types.h */ From b64c790011a6714e982fd66f0d1fab2c596b5ac5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 6 Oct 1997 02:19:29 +0000 Subject: [PATCH 1075/4487] Add flock LFS extensions. --- sysdeps/unix/sysv/linux/alpha/bits/fcntl.h | 79 +++++++++++------- sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 94 ++++++++++++++-------- 2 files changed, 113 insertions(+), 60 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h index b70502f21a..14840649ea 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h @@ -18,7 +18,7 @@ Boston, MA 02111-1307, USA. */ #ifndef _FCNTL_H -#error "Never use directly; include instead." +# error "Never use directly; include instead." #endif @@ -27,8 +27,8 @@ /* In GNU, read and write are bits (unlike BSD). */ #ifdef __USE_GNU -#define O_READ O_RDONLY /* Open for reading. */ -#define O_WRITE O_WRONLY /* Open for writing. */ +# define O_READ O_RDONLY /* Open for reading. */ +# define O_WRITE O_WRONLY /* Open for writing. */ #endif /* open/fcntl - O_SYNC is only implemented on blocks devices and on files located on an ext2 file system */ @@ -48,25 +48,36 @@ #define O_FSYNC O_SYNC #define O_ASYNC 020000 /* fcntl, for BSD compatibility */ -#define F_DUPFD 0 /* dup */ -#define F_GETFD 1 /* get f_flags */ -#define F_SETFD 2 /* set f_flags */ -#define F_GETFL 3 /* more flags (cloexec) */ -#define F_SETFL 4 -#define F_GETLK 7 -#define F_SETLK 8 -#define F_SETLKW 9 - -#define F_SETOWN 5 /* for sockets. */ -#define F_GETOWN 6 /* for sockets. */ +/* XXX missing */ +#define O_LARGEFILE 0 + +/* Values for the second argument to `fcntl'. */ +#define F_DUPFD 0 /* Duplicate file descriptor. */ +#define F_GETFD 1 /* Get file descriptor flags. */ +#define F_SETFD 2 /* Set file descriptor flags. */ +#define F_GETFL 3 /* Get file status flags. */ +#define F_SETFL 4 /* Set file status flags. */ +#define F_GETLK 7 /* Get record locking info. */ +#define F_SETLK 8 /* Set record locking info (non-blocking). */ +#define F_SETLKW 9 /* Set record locking info (blocking). */ + +/* XXX missing */ +#define F_GETLK64 7 /* Get record locking info. */ +#define F_SETLK64 8 /* Set record locking info (non-blocking). */ +#define F_SETLKW64 9 /* Set record locking info (blocking). */ + +#ifdef __USE_BSD +# define F_SETOWN 5 /* Get owner of socket (receiver of SIGIO). */ +# define F_GETOWN 6 /* Set owner of socket (receiver of SIGIO). */ +#endif /* for F_[GET|SET]FL */ #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ -/* for posix fcntl() and lockf() */ -#define F_RDLCK 1 -#define F_WRLCK 2 -#define F_UNLCK 8 +/* For posix fcntl() and `l_type' field of a `struct flock' for lockf() */ +#define F_RDLCK 1 /* Read lock. */ +#define F_WRLCK 2 /* Write lock. */ +#define F_UNLCK 8 /* Remove lock. */ /* for old implementation of bsd flock () */ #define F_EXLCK 16 /* or 3 */ @@ -79,22 +90,34 @@ blocking */ #define LOCK_UN 8 /* remove lock */ +/* We don't need to support __USE_FILE_OFFSET64. */ struct flock { - short int l_type; - short int l_whence; - __off_t l_start; - __off_t l_len; - __pid_t l_pid; + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ + __off_t l_start; /* Offset where the lock begins. */ + __off_t l_len; /* Size of the locked area; zero means until EOF. */ + __pid_t l_pid; /* Process holding the lock. */ + }; + +#ifdef __USE_LARGEFILE64 +struct flock64 + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ + __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. */ }; +#endif /* Define some more compatibility macros to be backward compatible with BSD systems which did not managed to hide these kernel macros. */ #ifdef __USE_BSD -#define FAPPEND O_APPEND -#define FFSYNC O_FSYNC -#define FASYNC O_ASYNC -#define FNONBLOCK O_NONBLOCK -#define FNDELAY O_NDELAY +# define FAPPEND O_APPEND +# define FFSYNC O_FSYNC +# define FASYNC O_ASYNC +# define FNONBLOCK O_NONBLOCK +# define FNDELAY O_NDELAY #endif /* Use BSD. */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index 2586140fdc..09d6fb6d4c 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -18,7 +18,7 @@ Boston, MA 02111-1307, USA. */ #ifndef _FCNTL_H -#error "Never use directly; include instead." +# error "Never use directly; include instead." #endif #include @@ -26,8 +26,8 @@ /* In GNU, read and write are bits (unlike BSD). */ #ifdef __USE_GNU -#define O_READ O_RDONLY /* Open for reading. */ -#define O_WRITE O_WRONLY /* Open for writing. */ +# define O_READ O_RDONLY /* Open for reading. */ +# define O_WRITE O_WRONLY /* Open for writing. */ #endif /* open/fcntl - O_SYNC is only implemented on blocks devices and on files located on an ext2 file system */ @@ -47,25 +47,36 @@ #define O_NDELAY O_NONBLOCK -#define F_DUPFD 0 /* dup */ -#define F_GETFD 1 /* get f_flags */ -#define F_SETFD 2 /* set f_flags */ -#define F_GETFL 3 /* more flags (cloexec) */ -#define F_SETFL 4 -#define F_GETLK 14 -#define F_SETLK 6 -#define F_SETLKW 7 - -#define F_SETOWN 24 /* for sockets. */ -#define F_GETOWN 23 /* for sockets. */ +/* XXX missing */ +#define O_LARGEFILE 0 + +/* Values for the second argument to `fcntl'. */ +#define F_DUPFD 0 /* Duplicate file descriptor. */ +#define F_GETFD 1 /* Get file descriptor flags. */ +#define F_SETFD 2 /* Set file descriptor flags. */ +#define F_GETFL 3 /* Get file status flags. */ +#define F_SETFL 4 /* Set file status flags. */ +#define F_GETLK 14 /* Get record locking info. */ +#define F_SETLK 6 /* Set record locking info (non-blocking). */ +#define F_SETLKW 7 /* Set record locking info (blocking). */ + +/* XXX missing */ +#define F_GETLK64 14 /* Get record locking info. */ +#define F_SETLK64 6 /* Set record locking info (non-blocking). */ +#define F_SETLKW64 7 /* Set record locking info (blocking). */ + +#ifdef __USE_BSD +# define F_SETOWN 5 /* Get owner of socket (receiver of SIGIO). */ +# define F_GETOWN 6 /* Set owner of socket (receiver of SIGIO). */ +#endif /* for F_[GET|SET]FL */ #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ -/* for posix fcntl() and lockf() */ -#define F_RDLCK 0 -#define F_WRLCK 1 -#define F_UNLCK 2 +/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */ +#define F_RDLCK 0 /* Read lock. */ +#define F_WRLCK 1 /* Write lock. */ +#define F_UNLCK 2 /* Remove lock. */ /* for old implementation of bsd flock () */ #define F_EXLCK 4 /* or 3 */ @@ -78,23 +89,42 @@ blocking */ #define LOCK_UN 8 /* remove lock */ -typedef struct flock { - short l_type; - short l_whence; - __off_t l_start; - __off_t l_len; - long l_sysid; /* XXX */ - __pid_t l_pid; - long pad[4]; /* XXX */ -} flock_t; +typedef struct flock + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ +#ifndef __USE_FILE_OFFSET64 + __off_t l_start; /* Offset where the lock begins. */ + __off_t l_len; /* Size of the locked area; zero means until EOF. */ +#else + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ +#endif + long int l_sysid; /* XXX */ + __pid_t l_pid; /* Process holding the lock. */ + long int pad[4]; /* XXX */ + } flock_t; + +#ifdef __USE_LARGEFILE64 +struct flock64 + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ + long int l_sysid; /* XXX */ + __pid_t l_pid; /* Process holding the lock. */ + long int pad[4]; /* XXX */ + }; +#endif /* Define some more compatibility macros to be backward compatible with BSD systems which did not managed to hide these kernel macros. */ #ifdef __USE_BSD -#define FAPPEND O_APPEND -#define FFSYNC O_FSYNC -#define FASYNC O_ASYNC -#define FNONBLOCK O_NONBLOCK -#define FNDELAY O_NDELAY +# define FAPPEND O_APPEND +# define FFSYNC O_FSYNC +# define FASYNC O_ASYNC +# define FNONBLOCK O_NONBLOCK +# define FNDELAY O_NDELAY #endif /* Use BSD. */ From eebf2c4a79b341de4f67eb3b1428a3f2dadf8143 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 6 Oct 1997 02:20:13 +0000 Subject: [PATCH 1076/4487] Use __fsblkcnt_t for some of the fields. --- sysdeps/unix/sysv/linux/mips/bits/statfs.h | 40 +++++++++++++++++++--- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/statfs.h b/sysdeps/unix/sysv/linux/mips/bits/statfs.h index 3b2306147c..2727b27257 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/statfs.h +++ b/sysdeps/unix/sysv/linux/mips/bits/statfs.h @@ -23,22 +23,52 @@ #ifndef _BITS_STATFS_H #define _BITS_STATFS_H +#include /* for __fsid_t and __fsblkcnt_t*/ + struct statfs { long int f_type; #define f_fstyp f_type long int f_bsize; long int f_frsize; /* Fragment size - unsupported */ - long int f_blocks; - long int f_bfree; - long int f_files; - long int f_ffree; +#ifndef __USE_FILE_OFFSET64 + __fsblkcnt_t f_blocks; + __fsblkcnt_t f_bfree; + __fsblkcnt_t f_files; + __fsblkcnt_t f_ffree; + __fsblkcnt_t f_bavail; +#else + __fsblkcnt64_t f_blocks; + __fsblkcnt64_t f_bfree; + __fsblkcnt64_t f_files; + __fsblkcnt64_t f_ffree; + __fsblkcnt64_t f_bavail; +#endif + + /* Linux specials */ + __fsid_t f_fsid; + long int f_namelen; + long int f_spare[6]; + }; + +#ifdef __USE_LARGEFILE64 +struct statfs64 + { + long int f_type; +#define f_fstyp f_type + long int f_bsize; + long int f_frsize; /* Fragment size - unsupported */ + __fsblkcnt64_t f_blocks; + __fsblkcnt64_t f_bfree; + __fsblkcnt64_t f_files; + __fsblkcnt64_t f_ffree; + __fsblkcnt64_t f_bavail; /* Linux specials */ - long int f_bavail; __fsid_t f_fsid; long int f_namelen; long int f_spare[6]; }; +#endif #endif /* bits/statfs.h */ From 3abeec50c62f34a60793d3780c08aa162480e6d5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 6 Oct 1997 02:24:05 +0000 Subject: [PATCH 1077/4487] Add stat LFS extensions. --- sysdeps/unix/bsd/osf/alpha/bits/stat.h | 2 +- sysdeps/unix/sysv/linux/alpha/bits/stat.h | 2 +- sysdeps/unix/sysv/linux/mips/bits/stat.h | 51 +++++++++++++++++++- sysdeps/unix/sysv/sysv4/i386/bits/stat.h | 4 +- sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h | 2 +- 5 files changed, 54 insertions(+), 7 deletions(-) diff --git a/sysdeps/unix/bsd/osf/alpha/bits/stat.h b/sysdeps/unix/bsd/osf/alpha/bits/stat.h index 752d4eede1..ab0fa48f68 100644 --- a/sysdeps/unix/bsd/osf/alpha/bits/stat.h +++ b/sysdeps/unix/bsd/osf/alpha/bits/stat.h @@ -49,7 +49,7 @@ struct stat unsigned int st_blksize; /* Optimal block size for I/O. */ #define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ - int st_blocks; /* Number of 512-byte blocks allocated. */ + __blkcnt_t st_blocks; /* Number of 512-byte blocks allocated. */ unsigned int st_flags; unsigned int st_gen; }; diff --git a/sysdeps/unix/sysv/linux/alpha/bits/stat.h b/sysdeps/unix/sysv/linux/alpha/bits/stat.h index 768b8192ff..cc2a2eac90 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/stat.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/stat.h @@ -46,7 +46,7 @@ struct stat __time_t st_ctime; /* Time of last status change. */ unsigned int st_blksize; /* Optimal block size for I/O. */ #define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ - int st_blocks; /* Nr. of 512-byte blocks allocated. */ + __blkcnt_t st_blocks; /* Nr. of 512-byte blocks allocated. */ unsigned int st_flags; unsigned int st_gen; }; diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h index a797b34c38..f27a75eb9a 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/stat.h +++ b/sysdeps/unix/sysv/linux/mips/bits/stat.h @@ -39,14 +39,22 @@ struct stat { unsigned long int st_dev; long int st_pad1[3]; +#ifndef __USE_FILE_OFFSET64 __ino_t st_ino; /* File serial number. */ +#else + __ino64_t st_ino; /* File serial number. */ +#endif __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.*/ unsigned long int st_rdev; /* Device number, if device. */ long int st_pad2[2]; +#ifndef __USE_FILE_OFFSET64 __off_t st_size; /* Size of file, in bytes. */ +#else + __off64_t st_size; /* Size of file, in bytes. */ +#endif /* SVR4 added this extra long to allow for expansion of off_t. */ long int st_pad3; /* @@ -60,8 +68,11 @@ struct stat __time_t st_ctime; /* Time of last status change. */ long int __reserved2; long int st_blksize; /* Optimal block size for I/O. */ -#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ - long int st_blocks; /* Number of 512-byte blocks allocated. */ +#ifndef __USE_FILE_OFFSET64 + __blkcnt_t st_blocks; /* Number of 512-byte blocks allocated. */ +#else + __blkcnt64_t st_blocks; /* Number of 512-byte blocks allocated. */ +#endif char st_fstype[16]; /* Filesystem type name */ long int st_pad4[8]; /* Linux specific fields */ @@ -69,6 +80,42 @@ struct stat unsigned int st_gen; }; +#ifdef __USE_LARGEFILE64 +struct stat64 + { + unsigned long int st_dev; + long int st_pad1[3]; + __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.*/ + unsigned long int st_rdev; /* Device number, if device. */ + long int st_pad2[2]; + __off64_t st_size; /* Size of file, in bytes. */ + /* SVR4 added this extra long to allow for expansion of off_t. */ + long int st_pad3; + /* + * Actually this should be timestruc_t st_atime, st_mtime and + * st_ctime but we don't have it under Linux. + */ + __time_t st_atime; /* Time of last access. */ + long int __reserved0; + __time_t st_mtime; /* Time of last modification. */ + long int __reserved1; + __time_t st_ctime; /* Time of last status change. */ + long int __reserved2; + long int st_blksize; /* Optimal block size for I/O. */ + __blkcnt64_t st_blocks; /* Number of 512-byte blocks allocated. */ + char st_fstype[16]; /* Filesystem type name */ + long int st_pad4[8]; + /* Linux specific fields */ + unsigned int st_flags; + unsigned int st_gen; + }; +#endif + +#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ /* Encoding of the file mode. */ diff --git a/sysdeps/unix/sysv/sysv4/i386/bits/stat.h b/sysdeps/unix/sysv/sysv4/i386/bits/stat.h index 9b6fed083d..f3f4473032 100644 --- a/sysdeps/unix/sysv/sysv4/i386/bits/stat.h +++ b/sysdeps/unix/sysv/sysv4/i386/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1996 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -58,7 +58,7 @@ struct stat long st_blksize; /* Optimal block size for I/O. */ #define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ - long st_blocks; /* Number of 512-byte blocks allocated. */ + __blkcnt_t st_blocks; /* Number of 512-byte blocks allocated. */ char st_fstype[16]; /* The type of this filesystem. */ int st_aclcnt; unsigned long st_level; diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h index ea5f1f4279..82ab37fd93 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h @@ -52,7 +52,7 @@ struct stat __time_t st_ctime; /* Time of last status change. */ unsigned long int st_ctime_usec; - long st_blksize; /* Optimal block size for I/O. */ + __blkcnt_t st_blksize; /* Optimal block size for I/O. */ #define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ long st_blocks; /* Number of 512-byte blocks allocated. */ From 0fc15eae49ed1339cc9195e7fc13e04c7962fcf5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 12 Oct 1997 03:40:09 +0000 Subject: [PATCH 1078/4487] (elf_machine_plt_value): New function. --- sysdeps/alpha/dl-machine.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index d3eb242c04..3f65ae99a3 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -353,6 +353,14 @@ elf_machine_fixup_plt(struct link_map *l, const Elf64_Rela *reloc, hasn't made it into Icache yet, so there's nothing to clean up. */ } +/* Return the final value of a plt relocation. */ +static inline Elf64_Addr +elf_machine_plt_value (struct link_map *map, const Elf64_Rela *reloc, + Elf64_Addr value) +{ + return value + reloc->r_addend; +} + #endif /* !dl_machine_h */ #ifdef RESOLVE From a325c2c023972dcfbda4fa62891d81e5637b422d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 12 Oct 1997 03:40:26 +0000 Subject: [PATCH 1079/4487] __setjmp is the same as _setjmp. Make the former a strong symbol and the later a weak alias. --- sysdeps/alpha/setjmp.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S index 48fe33b3ec..ae3ceb517d 100644 --- a/sysdeps/alpha/setjmp.S +++ b/sysdeps/alpha/setjmp.S @@ -70,11 +70,11 @@ END(__sigsetjmp) /* Put these traditional entry points in the same file so that we can elide much of the nonsense in trying to jmp to the real function. */ -ENTRY(_setjmp) +ENTRY(__setjmp) ldgp gp, 0(pv) mov 0, a1 br $sigsetjmp_local -END(_setjmp) +END(__setjmp) ENTRY(setjmp) ldgp gp, 0(pv) @@ -82,5 +82,5 @@ ENTRY(setjmp) br $sigsetjmp_local END(setjmp) -weak_extern(_setjmp) +weak_alias(__setjmp, _setjmp) weak_extern(setjmp) From 989166429cd61139380236fcc053e18b6fd64f4f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 12 Oct 1997 03:41:56 +0000 Subject: [PATCH 1080/4487] (elf_machine_rela): Fix last change. The R_68K_GLOB_DAT and R_68K_JMP_SLOT relocations really ignore the addend, Richard. (elf_machine_fixup_plt): Don't add the addend. (elf_machine_plt_value): New function. --- sysdeps/m68k/dl-machine.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index cc0fb56189..1d2045dd87 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -223,7 +223,16 @@ static inline void elf_machine_fixup_plt (struct link_map *map, const Elf32_Rela *reloc, Elf32_Addr *reloc_addr, Elf32_Addr value) { - *reloc_addr = value + reloc->r_addend; + *reloc_addr = value; +} + +/* Return the final value of a plt relocation. On the m68k the JMP_SLOT + relocation ignores the addend. */ +static inline Elf32_Addr +elf_machine_plt_value (struct link_map *map, const Elf32_Rela *reloc, + Elf32_Addr value) +{ + return value; } #endif /* !dl_machine_h */ @@ -272,7 +281,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, break; case R_68K_GLOB_DAT: case R_68K_JMP_SLOT: - *reloc_addr = value + reloc->r_addend; + *reloc_addr = value; break; case R_68K_8: *(char *) reloc_addr = value + reloc->r_addend; From a893b0866808320e97f75e0e3def584f894d01ae Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 12 Oct 1997 03:42:19 +0000 Subject: [PATCH 1081/4487] m68k specific optimizations for string functions. --- sysdeps/m68k/m68020/bits/string.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 sysdeps/m68k/m68020/bits/string.h diff --git a/sysdeps/m68k/m68020/bits/string.h b/sysdeps/m68k/m68020/bits/string.h new file mode 100644 index 0000000000..6462ef0d83 --- /dev/null +++ b/sysdeps/m68k/m68020/bits/string.h @@ -0,0 +1,26 @@ +/* Optimized, inlined string functions. m680x0 version, x >= 2. + Copyright (C) 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _STRING_H +# error "Never use directly; include instead." +#endif + +/* Currently the only purpose of this file is to tell the generic inline + macros that unaligned memory access is possible. */ +#define _STRING_ARCH_unaligned 1 From 7b5e4b7fe2e3179d0fb7bf442cc687d4ae7db365 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 15 Oct 1997 05:31:59 +0000 Subject: [PATCH 1082/4487] Use __ptr_t instead of __caddr_t. --- sysdeps/unix/bsd/osf/sys/mman.h | 22 +++++++++++----------- sysdeps/unix/bsd/sun/sunos4/mmap.c | 8 ++++---- sysdeps/unix/bsd/sun/sunos4/sys/mman.h | 22 +++++++++++----------- sysdeps/unix/bsd/ultrix4/sys/mman.h | 22 +++++++++++----------- sysdeps/unix/sysv/irix4/sys/mman.h | 22 +++++++++++----------- 5 files changed, 48 insertions(+), 48 deletions(-) diff --git a/sysdeps/unix/bsd/osf/sys/mman.h b/sysdeps/unix/bsd/osf/sys/mman.h index 816f271e30..cf0bf45673 100644 --- a/sysdeps/unix/bsd/osf/sys/mman.h +++ b/sysdeps/unix/bsd/osf/sys/mman.h @@ -77,7 +77,7 @@ #define MS_INVALIDATE 4 /* Invalidate cached pages. */ /* Return value of `mmap' in case of an error. */ -#define MAP_FAILED ((__caddr_t) -1) +#define MAP_FAILED ((__ptr_t) -1) __BEGIN_DECLS @@ -90,31 +90,31 @@ __BEGIN_DECLS for errors (in which case `errno' is set). A successful `mmap' call deallocates any previous mapping for the affected region. */ -extern __caddr_t __mmap __P ((__caddr_t __addr, size_t __len, int __prot, - int __flags, int __fd, off_t __offset)); -extern __caddr_t mmap __P ((__caddr_t __addr, size_t __len, int __prot, - int __flags, int __fd, off_t __offset)); +extern __ptr_t __mmap __P ((__ptr_t __addr, size_t __len, int __prot, + int __flags, int __fd, off_t __offset)); +extern __ptr_t mmap __P ((__ptr_t __addr, size_t __len, int __prot, + int __flags, int __fd, off_t __offset)); /* Deallocate any mapping for the region starting at ADDR and extending LEN bytes. Returns 0 if successful, -1 for errors (and sets errno). */ -extern int __munmap __P ((__caddr_t __addr, size_t __len)); -extern int munmap __P ((__caddr_t __addr, size_t __len)); +extern int __munmap __P ((__ptr_t __addr, size_t __len)); +extern int munmap __P ((__ptr_t __addr, size_t __len)); /* Change the memory protection of the region starting at ADDR and extending LEN bytes to PROT. Returns 0 if successful, -1 for errors (and sets errno). */ -extern int __mprotect __P ((__caddr_t __addr, size_t __len, int __prot)); -extern int mprotect __P ((__caddr_t __addr, size_t __len, int __prot)); +extern int __mprotect __P ((__ptr_t __addr, size_t __len, int __prot)); +extern int mprotect __P ((__ptr_t __addr, size_t __len, int __prot)); /* Synchronize the region starting at ADDR and extending LEN bytes with the file it maps. Filesystem operations on a file being mapped are unpredictable before this is done. */ -extern int msync __P ((__caddr_t __addr, size_t __len, int __flags)); +extern int msync __P ((__ptr_t __addr, size_t __len, int __flags)); #ifdef __USE_BSD /* Advise the system about particular usage patterns the program follows for the region starting at ADDR and extending LEN bytes. */ -extern int madvise __P ((__caddr_t __addr, size_t __len, int __advice)); +extern int madvise __P ((__ptr_t __addr, size_t __len, int __advice)); #endif __END_DECLS diff --git a/sysdeps/unix/bsd/sun/sunos4/mmap.c b/sysdeps/unix/bsd/sun/sunos4/mmap.c index 7c373c41af..8400aaa1db 100644 --- a/sysdeps/unix/bsd/sun/sunos4/mmap.c +++ b/sysdeps/unix/bsd/sun/sunos4/mmap.c @@ -25,16 +25,16 @@ is nonzero, it is the desired mapping address. If the MAP_FIXED bit is set in FLAGS, the mapping will be at ADDR exactly (which must be page-aligned); otherwise the system chooses a convenient nearby address. - The return value is the actual mapping address chosen or (caddr_t) -1 + The return value is the actual mapping address chosen or MAP_FAILED for errors (in which case `errno' is set). A successful `mmap' call deallocates any previous mapping for the affected region. */ -extern caddr_t __mmap_syscall (caddr_t addr, size_t len, +extern __ptr_t __mmap_syscall (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset); -caddr_t -__mmap (caddr_t addr, size_t len, int prot, int flags, int fd, off_t offset) +__ptr_t +__mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset) { return __mmap_syscall (addr, len, prot, flags | _MAP_NEW, fd, offset); } diff --git a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h index d2a8998d9a..420aed9296 100644 --- a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h +++ b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h @@ -74,7 +74,7 @@ #define MS_INVALIDATE 0x2 /* Invalidate caches. */ /* Return value of `mmap' in case of an error. */ -#define MAP_FAILED ((__caddr_t) -1) +#define MAP_FAILED ((__ptr_t) -1) __BEGIN_DECLS @@ -87,31 +87,31 @@ __BEGIN_DECLS for errors (in which case `errno' is set). A successful `mmap' call deallocates any previous mapping for the affected region. */ -extern __caddr_t __mmap __P ((__caddr_t __addr, size_t __len, int __prot, - int __flags, int __fd, __off_t __offset)); -extern __caddr_t mmap __P ((__caddr_t __addr, size_t __len, int __prot, - int __flags, int __fd, __off_t __offset)); +extern __ptr_t __mmap __P ((__ptr_t __addr, size_t __len, int __prot, + int __flags, int __fd, __off_t __offset)); +extern __ptr_t mmap __P ((__ptr_t __addr, size_t __len, int __prot, + int __flags, int __fd, __off_t __offset)); /* Deallocate any mapping for the region starting at ADDR and extending LEN bytes. Returns 0 if successful, -1 for errors (and sets errno). */ -extern int __munmap __P ((__caddr_t __addr, size_t __len)); -extern int munmap __P ((__caddr_t __addr, size_t __len)); +extern int __munmap __P ((__ptr_t __addr, size_t __len)); +extern int munmap __P ((__ptr_t __addr, size_t __len)); /* Change the memory protection of the region starting at ADDR and extending LEN bytes to PROT. Returns 0 if successful, -1 for errors (and sets errno). */ -extern int __mprotect __P ((__caddr_t __addr, size_t __len, int __prot)); -extern int mprotect __P ((__caddr_t __addr, size_t __len, int __prot)); +extern int __mprotect __P ((__ptr_t __addr, size_t __len, int __prot)); +extern int mprotect __P ((__ptr_t __addr, size_t __len, int __prot)); /* Synchronize the region starting at ADDR and extending LEN bytes with the file it maps. Filesystem operations on a file being mapped are unpredictable before this is done. */ -extern int msync __P ((__caddr_t __addr, size_t __len, int __flags)); +extern int msync __P ((__ptr_t __addr, size_t __len, int __flags)); #ifdef __USE_BSD /* Advise the system about particular usage patterns the program follows for the region starting at ADDR and extending LEN bytes. */ -extern int madvise __P ((__caddr_t __addr, size_t __len, int __advice)); +extern int madvise __P ((__ptr_t __addr, size_t __len, int __advice)); #endif __END_DECLS diff --git a/sysdeps/unix/bsd/ultrix4/sys/mman.h b/sysdeps/unix/bsd/ultrix4/sys/mman.h index 4262fce438..b884ba51ac 100644 --- a/sysdeps/unix/bsd/ultrix4/sys/mman.h +++ b/sysdeps/unix/bsd/ultrix4/sys/mman.h @@ -58,7 +58,7 @@ #endif /* Return value of `mmap' in case of an error. */ -#define MAP_FAILED ((__caddr_t) -1) +#define MAP_FAILED ((__ptr_t) -1) __BEGIN_DECLS @@ -71,33 +71,33 @@ __BEGIN_DECLS for errors (in which case `errno' is set). A successful `mmap' call deallocates any previous mapping for the affected region. */ -extern __caddr_t __mmap __P ((__caddr_t __addr, size_t __len, int __prot, - int __flags, int __fd, off_t __offset)); -extern __caddr_t mmap __P ((__caddr_t __addr, size_t __len, int __prot, - int __flags, int __fd, off_t __offset)); +extern __ptr_t __mmap __P ((__ptr_t __addr, size_t __len, int __prot, + int __flags, int __fd, off_t __offset)); +extern __ptr_t mmap __P ((__ptr_t __addr, size_t __len, int __prot, + int __flags, int __fd, off_t __offset)); /* Deallocate any mapping for the region starting at ADDR and extending LEN bytes. Returns 0 if successful, -1 for errors (and sets errno). */ -extern int __munmap __P ((__caddr_t __addr, size_t __len)); -extern int munmap __P ((__caddr_t __addr, size_t __len)); +extern int __munmap __P ((__ptr_t __addr, size_t __len)); +extern int munmap __P ((__ptr_t __addr, size_t __len)); /* Change the memory protection of the region starting at ADDR and extending LEN bytes to PROT. Returns 0 if successful, -1 for errors (and sets errno). */ -extern int __mprotect __P ((__caddr_t __addr, size_t __len, int __prot)); -extern int mprotect __P ((__caddr_t __addr, size_t __len, int __prot)); +extern int __mprotect __P ((__ptr_t __addr, size_t __len, int __prot)); +extern int mprotect __P ((__ptr_t __addr, size_t __len, int __prot)); /* Ultrix 4 does not implement `msync' or `madvise'. */ /* Synchronize the region starting at ADDR and extending LEN bytes with the file it maps. Filesystem operations on a file being mapped are unpredictable before this is done. */ -extern int msync __P ((caddr_t __addr, size_t __len)); +extern int msync __P ((__ptr_t __addr, size_t __len)); #ifdef __USE_BSD /* Advise the system about particular usage patterns the program follows for the region starting at ADDR and extending LEN bytes. */ -extern int madvise __P ((__caddr_t __addr, size_t __len, int __advice)); +extern int madvise __P ((__ptr_t __addr, size_t __len, int __advice)); #endif __END_DECLS diff --git a/sysdeps/unix/sysv/irix4/sys/mman.h b/sysdeps/unix/sysv/irix4/sys/mman.h index c3a923832a..ff1918ec88 100644 --- a/sysdeps/unix/sysv/irix4/sys/mman.h +++ b/sysdeps/unix/sysv/irix4/sys/mman.h @@ -68,7 +68,7 @@ #define MS_INVALIDATE 0x2 /* Invalidate caches. */ /* Return value of `mmap' in case of an error. */ -#define MAP_FAILED ((__caddr_t) -1) +#define MAP_FAILED ((__ptr_t) -1) __BEGIN_DECLS @@ -81,31 +81,31 @@ __BEGIN_DECLS for errors (in which case `errno' is set). A successful `mmap' call deallocates any previous mapping for the affected region. */ -extern __caddr_t __mmap __P ((__caddr_t __addr, size_t __len, int __prot, - int __flags, int __fd, __off_t __offset)); -extern __caddr_t mmap __P ((__caddr_t __addr, size_t __len, int __prot, - int __flags, int __fd, __off_t __offset)); +extern __ptr_t __mmap __P ((__ptr_t __addr, size_t __len, int __prot, + int __flags, int __fd, __off_t __offset)); +extern __ptr_t mmap __P ((__ptr_t __addr, size_t __len, int __prot, + int __flags, int __fd, __off_t __offset)); /* Deallocate any mapping for the region starting at ADDR and extending LEN bytes. Returns 0 if successful, -1 for errors (and sets errno). */ -extern int __munmap __P ((__caddr_t __addr, size_t __len)); -extern int munmap __P ((__caddr_t __addr, size_t __len)); +extern int __munmap __P ((__ptr_t __addr, size_t __len)); +extern int munmap __P ((__ptr_t __addr, size_t __len)); /* Change the memory protection of the region starting at ADDR and extending LEN bytes to PROT. Returns 0 if successful, -1 for errors (and sets errno). */ -extern int __mprotect __P ((__caddr_t __addr, size_t __len, int __prot)); -extern int mprotect __P ((__caddr_t __addr, size_t __len, int __prot)); +extern int __mprotect __P ((__ptr_t __addr, size_t __len, int __prot)); +extern int mprotect __P ((__ptr_t __addr, size_t __len, int __prot)); /* Synchronize the region starting at ADDR and extending LEN bytes with the file it maps. Filesystem operations on a file being mapped are unpredictable before this is done. */ -extern int msync __P ((caddr_t __addr, size_t __len, int __flags)); +extern int msync __P ((__ptr_t __addr, size_t __len, int __flags)); #ifdef __USE_BSD /* Advise the system about particular usage patterns the program follows for the region starting at ADDR and extending LEN bytes. */ -extern int madvise __P ((__caddr_t __addr, size_t __len, int __advice)); +extern int madvise __P ((__ptr_t __addr, size_t __len, int __advice)); #endif __END_DECLS From f6672b01b5a631046d3e6577d363ed2ba3c116be Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 26 Oct 1997 19:58:40 +0000 Subject: [PATCH 1083/4487] Add standard skeleton stuff. --- sysdeps/m68k/fpu/s_lrint.c | 16 +++++++++++++--- sysdeps/m68k/fpu/s_lrintf.c | 3 +++ sysdeps/m68k/fpu/s_lrintl.c | 3 +++ 3 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 sysdeps/m68k/fpu/s_lrintf.c create mode 100644 sysdeps/m68k/fpu/s_lrintl.c diff --git a/sysdeps/m68k/fpu/s_lrint.c b/sysdeps/m68k/fpu/s_lrint.c index a7044113af..511d28880c 100644 --- a/sysdeps/m68k/fpu/s_lrint.c +++ b/sysdeps/m68k/fpu/s_lrint.c @@ -22,10 +22,20 @@ #define __LIBC_M81_MATH_INLINES #include +#ifndef suffix +#define suffix /*empty*/ +#endif +#ifndef float_type +#define float_type double +#endif + +#define CONCATX(a,b) __CONCAT(a,b) + long int -__lrint (long double x) +CONCATX(__lrint,suffix) (float_type x) { - return __m81_u(__lrint) (x); + return __m81_u(CONCATX(__lrint,suffix)) (x); } -weak_alias (__lrint, lrint) +#define weak_aliasx(a,b) weak_alias(a,b) +weak_aliasx (CONCATX(__lrint,suffix), CONCATX(lrint,suffix)) diff --git a/sysdeps/m68k/fpu/s_lrintf.c b/sysdeps/m68k/fpu/s_lrintf.c new file mode 100644 index 0000000000..44924cb82f --- /dev/null +++ b/sysdeps/m68k/fpu/s_lrintf.c @@ -0,0 +1,3 @@ +#define suffix f +#define float_type float +#include diff --git a/sysdeps/m68k/fpu/s_lrintl.c b/sysdeps/m68k/fpu/s_lrintl.c new file mode 100644 index 0000000000..cd0bd23b8a --- /dev/null +++ b/sysdeps/m68k/fpu/s_lrintl.c @@ -0,0 +1,3 @@ +#define suffix l +#define float_type long double +#include From 95d16178a8ab47658183cc5eb3c88dcf0f938b18 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 26 Oct 1997 19:58:56 +0000 Subject: [PATCH 1084/4487] New (empty) file. --- sysdeps/m68k/fpu/s_scalbln.c | 2 ++ sysdeps/m68k/fpu/s_scalblnf.c | 2 ++ sysdeps/m68k/fpu/s_scalblnl.c | 2 ++ 3 files changed, 6 insertions(+) create mode 100644 sysdeps/m68k/fpu/s_scalbln.c create mode 100644 sysdeps/m68k/fpu/s_scalblnf.c create mode 100644 sysdeps/m68k/fpu/s_scalblnl.c diff --git a/sysdeps/m68k/fpu/s_scalbln.c b/sysdeps/m68k/fpu/s_scalbln.c new file mode 100644 index 0000000000..1009713fbc --- /dev/null +++ b/sysdeps/m68k/fpu/s_scalbln.c @@ -0,0 +1,2 @@ +/* Nothing to do. This function is the same as scalbn. So we define an + alias. */ diff --git a/sysdeps/m68k/fpu/s_scalblnf.c b/sysdeps/m68k/fpu/s_scalblnf.c new file mode 100644 index 0000000000..5e558c3540 --- /dev/null +++ b/sysdeps/m68k/fpu/s_scalblnf.c @@ -0,0 +1,2 @@ +/* Nothing to do. This function is the same as scalbnf. So we define an + alias. */ diff --git a/sysdeps/m68k/fpu/s_scalblnl.c b/sysdeps/m68k/fpu/s_scalblnl.c new file mode 100644 index 0000000000..cda2ec11c8 --- /dev/null +++ b/sysdeps/m68k/fpu/s_scalblnl.c @@ -0,0 +1,2 @@ +/* Nothing to do. This function is the same as scalbnl. So we define an + alias. */ From c43ee646ddbe8bb953f782927147163cc033a2b9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 26 Oct 1997 19:59:09 +0000 Subject: [PATCH 1085/4487] Add scalbln alias. --- sysdeps/m68k/fpu/s_scalbn.c | 29 ++++++++++++++++++++++------- sysdeps/m68k/fpu/s_scalbnf.c | 4 +--- sysdeps/m68k/fpu/s_scalbnl.c | 4 +--- 3 files changed, 24 insertions(+), 13 deletions(-) diff --git a/sysdeps/m68k/fpu/s_scalbn.c b/sysdeps/m68k/fpu/s_scalbn.c index d3ba27fa46..1b219ec108 100644 --- a/sysdeps/m68k/fpu/s_scalbn.c +++ b/sysdeps/m68k/fpu/s_scalbn.c @@ -17,10 +17,22 @@ Boston, MA 02111-1307, USA. */ #define __LIBC_M81_MATH_INLINES +#define scalbln __no_scalbln_decl +#define scalblnf __no_scalblnf_decl +#define scalblnl __no_scalblnl_decl +#define __scalbln __no__scalbln_decl +#define __scalblnf __no__scalblnf_decl +#define __scalblnl __no__scalblnl_decl #include - -#ifndef FUNC -#define FUNC scalbn +#undef scalbln +#undef scalblnf +#undef scalblnl +#undef __scalbln +#undef __scalblnf +#undef __scalblnl + +#ifndef suffix +#define suffix /*empty*/ #endif #ifndef float_type #define float_type double @@ -29,12 +41,15 @@ #define __CONCATX(a,b) __CONCAT(a,b) float_type -__CONCATX(__,FUNC) (x, exp) +__CONCATX(__scalbn,suffix) (x, exp) float_type x; - long int exp; + int exp; { - return __m81_u(__CONCATX(__,FUNC))(x, exp); + return __m81_u(__CONCATX(__scalbn,suffix))(x, exp); } #define weak_aliasx(a,b) weak_alias(a,b) -weak_aliasx (__CONCATX(__,FUNC), FUNC) +#define strong_aliasx(a,b) strong_alias(a,b) +weak_aliasx (__CONCATX(__scalbn,suffix), __CONCATX(scalbn,suffix)) +strong_aliasx (__CONCATX(__scalbn,suffix), __CONCATX(__scalbln,suffix)) +weak_aliasx (__CONCATX(__scalbn,suffix), __CONCATX(scalbln,suffix)) diff --git a/sysdeps/m68k/fpu/s_scalbnf.c b/sysdeps/m68k/fpu/s_scalbnf.c index 33459718e9..547971836a 100644 --- a/sysdeps/m68k/fpu/s_scalbnf.c +++ b/sysdeps/m68k/fpu/s_scalbnf.c @@ -1,5 +1,3 @@ -#ifndef FUNC -#define FUNC scalbnf -#endif +#define suffix f #define float_type float #include diff --git a/sysdeps/m68k/fpu/s_scalbnl.c b/sysdeps/m68k/fpu/s_scalbnl.c index c6ad95079c..874bafb04b 100644 --- a/sysdeps/m68k/fpu/s_scalbnl.c +++ b/sysdeps/m68k/fpu/s_scalbnl.c @@ -1,5 +1,3 @@ -#ifndef FUNC -#define FUNC scalbnl -#endif +#define suffix l #define float_type long double #include From b6d0dce1cc0ef19d06c263a6211f4dfecba5adfa Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 26 Oct 1997 19:59:32 +0000 Subject: [PATCH 1086/4487] Add fma and scalbln. Update lrint and scalbn. (__m81_inline) [__cplusplus]: Define to __inline. --- sysdeps/m68k/fpu/bits/mathinline.h | 69 ++++++++++++++++++++++-------- 1 file changed, 50 insertions(+), 19 deletions(-) diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/fpu/bits/mathinline.h index 1e68ea00c0..c3ed76c0de 100644 --- a/sysdeps/m68k/fpu/bits/mathinline.h +++ b/sysdeps/m68k/fpu/bits/mathinline.h @@ -76,12 +76,16 @@ /* This is used when defining the functions themselves. Define them with __ names, and with `static inline' instead of `extern inline' so the bodies will always be used, never an external function call. */ -# define __m81_u(x) __CONCAT(__,x) -# define __m81_inline static __inline +#define __m81_u(x) __CONCAT(__,x) +#define __m81_inline static __inline #else -# define __m81_u(x) x -# define __m81_inline extern __inline -# define __M81_MATH_INLINES 1 +#define __m81_u(x) x +#ifdef __cplusplus +#define __m81_inline __inline +#else +#define __m81_inline extern __inline +#endif +#define __M81_MATH_INLINES 1 #endif /* Define a const math function. */ @@ -95,12 +99,12 @@ is the name of the fpu operation (without leading f). */ #if defined __USE_MISC || defined __USE_ISOC9X -# define __inline_mathop(func, op) \ +#define __inline_mathop(func, op) \ __inline_mathop1(double, func, op) \ __inline_mathop1(float, __CONCAT(func,f), op) \ __inline_mathop1(long double, __CONCAT(func,l), op) #else -# define __inline_mathop(func, op) \ +#define __inline_mathop(func, op) \ __inline_mathop1(double, func, op) #endif @@ -309,13 +313,19 @@ __m81_defun (int, __CONCAT(__signbit,s), (float_type __value)) \ } \ \ __m81_defun (float_type, __CONCAT(__scalbn,s), \ - (float_type __x, long int __n)) \ + (float_type __x, int __n)) \ { \ float_type __result; \ __asm ("fscale%.l %1, %0" : "=f" (__result) : "dmi" (__n), "0" (__x)); \ return __result; \ } \ \ +__m81_defun (float_type, __CONCAT(__scalbln,s), \ + (float_type __x, long int __n)) \ +{ \ + return __CONCAT(__scalbn,s) (__x, __n); \ +} \ + \ __m81_defun (float_type, __CONCAT(__nearbyint,s), (float_type __x)) \ { \ float_type __result; \ @@ -330,12 +340,26 @@ __m81_defun (float_type, __CONCAT(__nearbyint,s), (float_type __x)) \ return __result; \ } \ \ +__m81_defun (long int, __CONCAT(__lrint,s), (float_type __x)) \ +{ \ + long int __result; \ + __asm ("fmove%.l %1, %0" : "=dm" (__result) : "f" (__x)); \ + return __result; \ +} \ + \ __m81_inline void \ __m81_u(__CONCAT(__sincos,s))(float_type __x, float_type *__sinx, \ float_type *__cosx) \ { \ __asm ("fsincos%.x %2,%1:%0" \ : "=f" (*__sinx), "=f" (*__cosx) : "f" (__x)); \ +} \ + \ +__m81_inline float_type \ +__m81_u(__CONCAT(__fma,s))(float_type __x, float_type __y, \ + float_type __z) \ +{ \ + return (__x * __y) + __z; \ } /* This defines the three variants of the inline functions. */ @@ -344,17 +368,12 @@ __inline_functions (float,f) __inline_functions (long double,l) #undef __inline_functions -__m81_defun (long int, __lrint, (long double __x)) -{ - long int __result; - __asm ("fmove%.l %1, %0" : "=dm" (__result) : "f" (__x)); - return __result; -} - #if !defined __NO_MATH_INLINES && defined __OPTIMIZE__ /* Define inline versions of the user visible functions. */ +/* Note that there must be no whitespace before the argument passed for + NAME, to make token pasting work correctly with -traditional. */ #define __inline_forward_c(rettype, name, args1, args2) \ extern __inline rettype __attribute__((__const__)) \ name args1 \ @@ -375,7 +394,8 @@ __inline_forward_c(double,ceil, (double __x), (__x)) #ifdef __USE_MISC __inline_forward_c(int,isinf, (double __value), (__value)) __inline_forward_c(int,finite, (double __value), (__value)) -__inline_forward_c(double,scalbn, (double __x, long int __n), (__x, __n)) +__inline_forward_c(double,scalbn, (double __x, int __n), (__x, __n)) +__inline_forward_c(double,scalbln, (double __x, long int __n), (__x, __n)) #endif #if defined __USE_MISC || defined __USE_XOPEN #ifndef __USE_ISOC9X /* Conflict with macro of same name. */ @@ -384,6 +404,9 @@ __inline_forward_c(int,isnan, (double __value), (__value)) #endif #ifdef __USE_ISOC9X __inline_forward_c(double,nearbyint, (double __value), (__value)) +__inline_forward_c(long int,lrint, (double __value), (__value)) +__inline_forward_c(double,fma, (double __x, double __y, double __z), + (__x, __y, __z)) #endif #ifdef __USE_GNU __inline_forward(void,sincos, (double __x, double *__sinx, double *__cosx), @@ -399,11 +422,15 @@ __inline_forward_c(float,ceilf, (float __x), (__x)) #ifdef __USE_MISC __inline_forward_c(int,isinff, (float __value), (__value)) __inline_forward_c(int,finitef, (float __value), (__value)) -__inline_forward_c(float,scalbnf, (float __x, long int __n), (__x, __n)) +__inline_forward_c(float,scalbnf, (float __x, int __n), (__x, __n)) +__inline_forward_c(float,scalblnf, (float __x, long int __n), (__x, __n)) __inline_forward_c(int,isnanf, (float __value), (__value)) #endif #ifdef __USE_ISOC9X __inline_forward_c(float,nearbyintf, (float __value), (__value)) +__inline_forward_c(long int,lrintf, (float __value), (__value)) +__inline_forward_c(float,fmaf, (float __x, float __y, float __z), + (__x, __y, __z)) #endif #ifdef __USE_GNU __inline_forward(void,sincosf, (float __x, float *__sinx, float *__cosx), @@ -417,13 +444,17 @@ __inline_forward_c(long double,ceill, (long double __x), (__x)) #ifdef __USE_MISC __inline_forward_c(int,isinfl, (long double __value), (__value)) __inline_forward_c(int,finitel, (long double __value), (__value)) -__inline_forward_c(long double,scalbnl, (long double __x, long int __n), +__inline_forward_c(long double,scalbnl, (long double __x, int __n), (__x, __n)) +__inline_forward_c(long double,scalblnl, (long double __x, long int __n), (__x, __n)) __inline_forward_c(int,isnanl, (long double __value), (__value)) #endif #ifdef __USE_ISOC9X __inline_forward_c(long double,nearbyintl, (long double __value), (__value)) -__inline_forward_c(long int,lrint, (long double __value), (__value)) +__inline_forward_c(long int,lrintl, (long double __value), (__value)) +__inline_forward_c(long double,fmal, + (long double __x, long double __y, long double __z), + (__x, __y, __z)) #endif #ifdef __USE_GNU __inline_forward(void,sincosl, From 6874bbcb7ce6da79ff6dbe3930d486a2e776e864 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 26 Oct 1997 19:59:49 +0000 Subject: [PATCH 1087/4487] User level process context for m68k. --- sysdeps/m68k/sys/ucontext.h | 108 ++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 sysdeps/m68k/sys/ucontext.h diff --git a/sysdeps/m68k/sys/ucontext.h b/sysdeps/m68k/sys/ucontext.h new file mode 100644 index 0000000000..4776e7d821 --- /dev/null +++ b/sysdeps/m68k/sys/ucontext.h @@ -0,0 +1,108 @@ +/* Copyright (C) 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* System V/m68k ABI compliant context switching support. */ + +#ifndef _SYS_UCONTEXT_H +#define _SYS_UCONTEXT_H 1 + +#include +#include + +/* Type for general register. */ +typedef int greg_t; + +/* Number of general registers. */ +#define NGREG 18 + +/* Container for all general registers. */ +typedef greg_t gregset_t[NGREG]; + +/* Number of each register is the `gregset_t' array. */ +enum +{ + R_D0 = 0, +#define R_D0 R_D0 + R_D1 = 1, +#define R_D1 R_D1 + R_D2 = 2, +#define R_D2 R_D2 + R_D3 = 3, +#define R_D3 R_D3 + R_D4 = 4, +#define R_D4 R_D4 + R_D5 = 5, +#define R_D5 R_D5 + R_D6 = 6, +#define R_D6 R_D6 + R_D7 = 7, +#define R_D7 R_D7 + R_A0 = 8, +#define R_A0 R_A0 + R_A1 = 9, +#define R_A1 R_A1 + R_A2 = 10, +#define R_A2 R_A2 + R_A3 = 11, +#define R_A3 R_A3 + R_A4 = 12, +#define R_A4 R_A4 + R_A5 = 13, +#define R_A5 R_A5 + R_A6 = 14, +#define R_A6 R_A6 + R_A7 = 15, +#define R_A7 R_A7 + R_SP = 15, +#define R_SP R_SP + R_PC = 16, +#define R_PC R_PC + R_PS = 17 +#define R_PS R_PS +}; + +/* Structure to describe FPU registers. */ +typedef struct fpregset +{ + int f_pcr; + int f_psr; + int f_fpiaddr; + int f_fpregs[8][3]; +} fpregset_t; + +/* Context to describe whole processor state. */ +typedef struct +{ + int version; + gregset_t gregs; +} mcontext_t; + +#define MCONTEXT_VERSION 1 + +/* Userlevel context. */ +typedef struct ucontext +{ + unsigned long int uc_flags; + struct ucontext *uc_links; + __sigset_t uc_sigmask; + stack_t uc_stack; + mcontext_t uc_mcontext; + long int uc_filler[201]; +} ucontext_t; + +#endif /* sys/ucontext.h */ From 9cf9670ffba6e9c078f7452418fab296533de1bf Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 26 Oct 1997 20:06:09 +0000 Subject: [PATCH 1088/4487] New empty file. --- sysdeps/unix/sysv/linux/alpha/pread64.c | 1 + sysdeps/unix/sysv/linux/alpha/pwrite64.c | 1 + 2 files changed, 2 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/pread64.c create mode 100644 sysdeps/unix/sysv/linux/alpha/pwrite64.c diff --git a/sysdeps/unix/sysv/linux/alpha/pread64.c b/sysdeps/unix/sysv/linux/alpha/pread64.c new file mode 100644 index 0000000000..b7f298dea8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/pread64.c @@ -0,0 +1 @@ +/* Empty since the pread syscall is equivalent. */ diff --git a/sysdeps/unix/sysv/linux/alpha/pwrite64.c b/sysdeps/unix/sysv/linux/alpha/pwrite64.c new file mode 100644 index 0000000000..b7f298dea8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/pwrite64.c @@ -0,0 +1 @@ +/* Empty since the pread syscall is equivalent. */ From a1bee79921d4788a622d128624d7cff005e3cb72 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 26 Oct 1997 20:06:34 +0000 Subject: [PATCH 1089/4487] Add pread and pwrite with weak aliases for *64 functions. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 71407062fb..9e4cd39a8f 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -21,6 +21,8 @@ getpeername - getpeername 3 __getpeername getpeername getpriority - getpriority 2 __getpriority getpriority mmap - mmap 6 __mmap mmap llseek EXTRA lseek 3 llseek +pread EXTRA pread 4 __pread pread __pread64 pread64 +pwrite EXTRA pwrite 4 __pwrite pwrite __pwrite64 pwrite64 # these are actually common with the x86: fstatfs - fstatfs 2 __fstatfs fstatfs From 475a3ad9f293cb8fb86b6d07fff61d4a502bd933 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 29 Oct 1997 20:32:26 +0000 Subject: [PATCH 1090/4487] Include stub version from generic subdir. --- sysdeps/unix/bsd/sun/sethostid.c | 2 +- sysdeps/unix/sysv/irix4/reboot.c | 2 +- sysdeps/unix/sysv/irix4/swapon.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/bsd/sun/sethostid.c b/sysdeps/unix/bsd/sun/sethostid.c index a8951fa7d5..aeb2940f42 100644 --- a/sysdeps/unix/bsd/sun/sethostid.c +++ b/sysdeps/unix/bsd/sun/sethostid.c @@ -1 +1 @@ -#include +#include diff --git a/sysdeps/unix/sysv/irix4/reboot.c b/sysdeps/unix/sysv/irix4/reboot.c index d7a3659d2b..4d90e6fc56 100644 --- a/sysdeps/unix/sysv/irix4/reboot.c +++ b/sysdeps/unix/sysv/irix4/reboot.c @@ -1 +1 @@ -#include +#include diff --git a/sysdeps/unix/sysv/irix4/swapon.c b/sysdeps/unix/sysv/irix4/swapon.c index 86a638fdc5..54885a883e 100644 --- a/sysdeps/unix/sysv/irix4/swapon.c +++ b/sysdeps/unix/sysv/irix4/swapon.c @@ -1 +1 @@ -#include +#include From 05da9c9f2e95209453c7a483244c8a78c577add2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 31 Oct 1997 22:51:10 +0000 Subject: [PATCH 1091/4487] Convert between kernel_stat and the userland version indicated. --- sysdeps/unix/sysv/linux/alpha/xstatconv.c | 90 +++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/xstatconv.c diff --git a/sysdeps/unix/sysv/linux/alpha/xstatconv.c b/sysdeps/unix/sysv/linux/alpha/xstatconv.c new file mode 100644 index 0000000000..d1005e7302 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/xstatconv.c @@ -0,0 +1,90 @@ +/* Convert between the kernel's `struct stat' format, and libc's. + Copyright (C) 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + + +static inline int +xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf) +{ + switch (vers) + { + case _STAT_VER_KERNEL: + /* Nothing to do. The struct is in the form the kernel expects. + We should have short-circuted before we got here, but for + completeness... */ + memcpy ((struct kernel_stat *) ubuf, kbuf, sizeof (*kbuf)); + break; + + case _STAT_VER_GLIBC2: + { + struct glibc2_stat *buf = ubuf; + + buf->st_dev = kbuf->st_dev; + buf->st_ino = kbuf->st_ino; + buf->st_mode = kbuf->st_mode; + buf->st_nlink = kbuf->st_nlink; + buf->st_uid = kbuf->st_uid; + buf->st_gid = kbuf->st_gid; + buf->st_rdev = kbuf->st_rdev; + buf->st_size = kbuf->st_size; + buf->st_atime = kbuf->st_atime; + buf->st_mtime = kbuf->st_mtime; + buf->st_ctime = kbuf->st_ctime; + buf->st_blksize = kbuf->st_blksize; + buf->st_blocks = kbuf->st_blocks; + buf->st_flags = kbuf->st_flags; + buf->st_gen = kbuf->st_gen; + } + break; + + case _STAT_VER_GLIBC2_1: + { + struct stat64 *buf = ubuf; + + buf->st_dev = kbuf->st_dev; + buf->st_ino = kbuf->st_ino; + buf->st_mode = kbuf->st_mode; + buf->st_nlink = kbuf->st_nlink; + buf->st_uid = kbuf->st_uid; + buf->st_gid = kbuf->st_gid; + buf->st_rdev = kbuf->st_rdev; + buf->st_size = kbuf->st_size; + buf->st_atime = kbuf->st_atime; + buf->st_mtime = kbuf->st_mtime; + buf->st_ctime = kbuf->st_ctime; + buf->st_blocks = kbuf->st_blocks; + buf->st_blksize = kbuf->st_blksize; + buf->st_flags = kbuf->st_flags; + buf->st_gen = kbuf->st_gen; + buf->__pad3 = 0; + buf->__unused[0] = 0; + buf->__unused[1] = 0; + buf->__unused[2] = 0; + buf->__unused[3] = 0; + } + break; + + default: + __set_errno (EINVAL); + return -1; + } + + return 0; +} From 0d230eb77ca59cb494f3d782fa3402eeb1385a09 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 31 Oct 1997 22:51:31 +0000 Subject: [PATCH 1092/4487] Add xstatconv.c. --- sysdeps/unix/sysv/linux/alpha/Dist | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist index ae71c2feb3..ebbf300eac 100644 --- a/sysdeps/unix/sysv/linux/alpha/Dist +++ b/sysdeps/unix/sysv/linux/alpha/Dist @@ -12,3 +12,4 @@ kernel_termios.h sys/acct.h sys/io.h sys/procfs.h +xstatconv.c \ No newline at end of file From 52765681588c7c19fcba32cec21317f1149e69dc Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 31 Oct 1997 22:51:57 +0000 Subject: [PATCH 1093/4487] Empty file. --- sysdeps/unix/sysv/linux/alpha/fxstat64.c | 1 + sysdeps/unix/sysv/linux/alpha/lxstat64.c | 1 + sysdeps/unix/sysv/linux/alpha/xstat64.c | 1 + 3 files changed, 3 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/fxstat64.c create mode 100644 sysdeps/unix/sysv/linux/alpha/lxstat64.c create mode 100644 sysdeps/unix/sysv/linux/alpha/xstat64.c diff --git a/sysdeps/unix/sysv/linux/alpha/fxstat64.c b/sysdeps/unix/sysv/linux/alpha/fxstat64.c new file mode 100644 index 0000000000..9eff9ebeb7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/fxstat64.c @@ -0,0 +1 @@ +/* fxstat64 is in fxstat.c */ diff --git a/sysdeps/unix/sysv/linux/alpha/lxstat64.c b/sysdeps/unix/sysv/linux/alpha/lxstat64.c new file mode 100644 index 0000000000..bb5dbd0fff --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/lxstat64.c @@ -0,0 +1 @@ +/* lxstat64 is in lxstat.c */ diff --git a/sysdeps/unix/sysv/linux/alpha/xstat64.c b/sysdeps/unix/sysv/linux/alpha/xstat64.c new file mode 100644 index 0000000000..e7acd3b45e --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/xstat64.c @@ -0,0 +1 @@ +/* xstat64 is in xstat.c */ From ee6f798644f396968b30bb9edc065a5543442f80 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 31 Oct 1997 22:52:16 +0000 Subject: [PATCH 1094/4487] Add struct glibc2_stat for backward compatibility. Define XSTAT_IS_XSTAT64. --- sysdeps/unix/sysv/linux/alpha/kernel_stat.h | 26 ++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/kernel_stat.h b/sysdeps/unix/sysv/linux/alpha/kernel_stat.h index 7109677269..2633b42525 100644 --- a/sysdeps/unix/sysv/linux/alpha/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/alpha/kernel_stat.h @@ -1,4 +1,4 @@ -/* Definition of `struct stat' used in the kernel.. */ +/* Definition of `struct stat' used in the kernel. */ struct kernel_stat { unsigned int st_dev; @@ -17,3 +17,27 @@ struct kernel_stat unsigned int st_flags; unsigned int st_gen; }; + +/* Definition of `struct stat' used by glibc 2.0. */ +struct glibc2_stat + { + __dev_t st_dev; + __ino_t st_ino; + __mode_t st_mode; + __nlink_t st_nlink; + __uid_t st_uid; + __gid_t st_gid; + __dev_t st_rdev; + __off_t st_size; + __time_t st_atime; + __time_t st_mtime; + __time_t st_ctime; + unsigned int st_blksize; + int st_blocks; + unsigned int st_flags; + unsigned int st_gen; + }; + +extern int __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf); + +#define XSTAT_IS_XSTAT64 1 From c573a9c69cfecfd79ba3063a516fb275d541372e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 31 Oct 1997 22:52:34 +0000 Subject: [PATCH 1095/4487] (struct dirent): For consistency, force d_ino to use ino_t and supply padding. --- sysdeps/unix/sysv/linux/alpha/bits/dirent.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/dirent.h b/sysdeps/unix/sysv/linux/alpha/bits/dirent.h index 4d717e4194..a371a552ff 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/dirent.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/dirent.h @@ -19,10 +19,14 @@ #ifndef _BITS_DIRENT_H #define _BITS_DIRENT_H 1 -/* We don't have to make a difference for __USE_FILE_OFFSET64. */ struct dirent { - long int d_ino; +#ifdef __USE_FILE_OFFSET64 + __ino64_t d_ino; +#else + __ino_t d_ino; + int __pad; +#endif __off_t d_off; unsigned short int d_reclen; unsigned char d_type; @@ -30,6 +34,7 @@ struct dirent }; #ifdef __USE_LARGEFILE64 +/* Note dirent64 is the same as dirent. */ struct dirent64 { __ino64_t d_ino; From def4a5f0c33f33e53d2b80b3b5cedc7b6aee47b1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 31 Oct 1997 22:52:42 +0000 Subject: [PATCH 1096/4487] Define _STAT_VER_KERNEL. --- sysdeps/unix/sysv/linux/alpha/bits/stat.h | 48 ++++++++++++++++++++--- 1 file changed, 43 insertions(+), 5 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/stat.h b/sysdeps/unix/sysv/linux/alpha/bits/stat.h index cc2a2eac90..de8752ea8b 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/stat.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/stat.h @@ -24,9 +24,10 @@ #define _BITS_STAT_H 1 /* Versions of the `struct stat' data structure. */ -#define _STAT_VER_LINUX_OLD 0 -#define _STAT_VER_LINUX 1 -#define _STAT_VER _STAT_VER_LINUX +#define _STAT_VER_KERNEL 0 +#define _STAT_VER_GLIBC2 1 +#define _STAT_VER_GLIBC2_1 2 +#define _STAT_VER _STAT_VER_GLIBC2_1 /* Versions of the `xmknod' interface. */ #define _MKNOD_VER_LINUX 0 @@ -34,7 +35,12 @@ struct stat { __dev_t st_dev; /* Device. */ +#ifdef __USE_FILE_OFFSET64 + __ino64_t st_ino; /* File serial number. */ +#else __ino_t st_ino; /* File serial number. */ + int __pad1; +#endif __mode_t st_mode; /* File mode. */ __nlink_t st_nlink; /* Link count. */ __uid_t st_uid; /* User ID of the file's owner. */ @@ -44,13 +50,45 @@ struct stat __time_t st_atime; /* Time of last access. */ __time_t st_mtime; /* Time of last modification. */ __time_t st_ctime; /* Time of last status change. */ +#ifdef __USE_FILE_OFFSET64 + __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */ +#else + __blkcnt_t st_blocks; /* Nr. 512-byte blocks allocated. */ + int __pad2; +#endif unsigned int st_blksize; /* Optimal block size for I/O. */ -#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ - __blkcnt_t st_blocks; /* Nr. of 512-byte blocks allocated. */ unsigned int st_flags; unsigned int st_gen; + int __pad3; + long __unused[4]; }; +#ifdef __USE_LARGEFILE64 +/* Note stat64 is the same shape as stat. */ +struct stat64 + { + __dev_t st_dev; /* Device. */ + __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. */ + __off_t st_size; /* Size of file, in bytes. */ + __time_t st_atime; /* Time of last access. */ + __time_t st_mtime; /* Time of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */ + unsigned int st_blksize; /* Optimal block size for I/O. */ + unsigned int st_flags; + unsigned int st_gen; + int __pad3; + long __unused[4]; + }; +#endif + +#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ + /* Encoding of the file mode. */ #define __S_IFMT 0170000 /* These bits determine file type. */ From 6c43790ef6e5dc02cc0c7f85beebedf0803bafc5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 31 Oct 1997 22:52:56 +0000 Subject: [PATCH 1097/4487] Add __ino64_t, and __off64_t. Reorganize. --- sysdeps/unix/sysv/linux/alpha/bits/types.h | 56 +++++++++------------- 1 file changed, 23 insertions(+), 33 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h index cf2668a0e6..b9e6dd779a 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/types.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h @@ -42,18 +42,26 @@ typedef signed long int __int64_t; typedef unsigned long int __uint64_t; typedef __quad_t *__qaddr_t; -typedef __u_long __dev_t; /* Type of device numbers. */ -typedef __u_int __uid_t; /* Type of user identifications. */ -typedef __u_int __gid_t; /* Type of group identifications. */ -typedef __u_int __ino_t; /* Type of file serial numbers. */ -typedef __u_int __mode_t; /* Type of file attribute bitmasks. */ -typedef __u_int __nlink_t; /* Type of file link counts. */ -typedef long int __off_t; /* Type of file sizes and offsets. */ -typedef __quad_t __loff_t; /* Type of file sizes and offsets. */ -typedef int __pid_t; /* Type of process identifications. */ -typedef long int __ssize_t; /* Type of a byte count, or error. */ -typedef long int __rlim_t; /* Type of resource counts. */ -typedef long int __rlim64_t; /* Type of resource counts (LFS). */ +typedef __uint64_t __dev_t; /* Type of device numbers. */ +typedef __uint32_t __uid_t; /* Type of user identifications. */ +typedef __uint32_t __gid_t; /* Type of group identifications. */ +typedef __uint32_t __ino_t; /* Type of file serial numbers. */ +typedef __uint64_t __ino64_t; /* "" (LFS) */ +typedef __uint32_t __mode_t; /* Type of file attribute bitmasks. */ +typedef __uint32_t __nlink_t; /* Type of file link counts. */ +typedef __int64_t __off_t; /* Type of file sizes and offsets. */ +typedef __int64_t __off64_t; /* "" (LFS) */ +typedef __int64_t __loff_t; /* Type of file sizes and offsets. */ +typedef __int32_t __pid_t; /* Type of process identifications. */ +typedef __int64_t __ssize_t; /* Type of a byte count, or error. */ +typedef __int64_t __rlim_t; /* Type of resource counts. */ +typedef __int64_t __rlim64_t; /* "" (LFS) */ +typedef __int32_t __blkcnt_t; /* Type to count nr disk blocks. */ +typedef __int64_t __blkcnt64_t; /* "" (LFS) */ +typedef __uint32_t __fsblkcnt_t; /* Type to count file system blocks. */ +typedef __uint64_t __fsblkcnt64_t; /* "" (LFS) */ +typedef __uint64_t __fsfilcnt_t; /* Type to count file system inodes. */ +typedef __uint64_t __fsfilcnt64_t; /* "" (LFS) */ typedef struct { @@ -61,12 +69,12 @@ typedef struct } __fsid_t; /* Type of file system IDs. */ /* Everythin' else. */ -typedef int __daddr_t; /* The type of a disk address. */ -typedef char *__caddr_t; +typedef int __daddr_t; /* Type of a disk address. */ +typedef char *__caddr_t; /* Type of a core address. */ typedef long int __time_t; typedef long int __swblk_t; /* Type of a swap block maybe? */ - typedef long int __clock_t; +typedef int __key_t; /* Type of a SYSV IPC key. */ /* One element in the file descriptor mask array. */ typedef unsigned long int __fd_mask; @@ -91,22 +99,4 @@ typedef struct __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS]; } __fd_set; - -typedef int __key_t; - - -/* Types from the Large File Support interface. */ - -/* Type to count number os disk blocks. */ -typedef int __blkcnt_t; -typedef __quad_t __blkcnt64_t; - -/* Type to count file system blocks. */ -typedef unsigned int __fsblkcnt_t; -typedef __u_quad_t __fsblkcnt64_t; - -/* Type to count file system inodes. */ -typedef unsigned long int __fsfilcnt_t; -typedef __u_quad_t __fsfilcnt64_t; - #endif /* bits/types.h */ From 575e2908df8849434d26c130bffb0188930924f4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 31 Oct 1997 23:13:26 +0000 Subject: [PATCH 1098/4487] Add newline --- sysdeps/unix/sysv/linux/alpha/Dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist index ebbf300eac..715fda7bd3 100644 --- a/sysdeps/unix/sysv/linux/alpha/Dist +++ b/sysdeps/unix/sysv/linux/alpha/Dist @@ -12,4 +12,4 @@ kernel_termios.h sys/acct.h sys/io.h sys/procfs.h -xstatconv.c \ No newline at end of file +xstatconv.c From 27157fb6a099cd0c36d660b06efeabc35540c511 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 4 Nov 1997 02:16:52 +0000 Subject: [PATCH 1099/4487] Definition of all needed error numbers. --- sysdeps/standalone/bits/errno.h | 62 +++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 sysdeps/standalone/bits/errno.h diff --git a/sysdeps/standalone/bits/errno.h b/sysdeps/standalone/bits/errno.h new file mode 100644 index 0000000000..30eec4308d --- /dev/null +++ b/sysdeps/standalone/bits/errno.h @@ -0,0 +1,62 @@ +/* Copyright (C) 1991, 1994, 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* This file defines the `errno' constants. */ + +#if !defined __Emath_defined && (defined _ERRNO_H || defined __need_Emath) +#undef __need_Emath +#define __Emath_defined 1 + +# define EDOM 1 +# define ERANGE 2 +#endif + +#ifdef _ERRNO_H +# define ENOSYS 3 +# define EINVAL 4 +# define ESPIPE 5 +# define EBADF 6 +# define ENOMEM 7 +# define EACCES 8 +# define ENFILE 9 +# define EMFILE 10 +# define ENOMSG 11 +# define ENAMETOOLONG 12 +# define ELOOP 13 +# define ENOMSG 14 +# define E2BIG 15 +# define EINTR 16 +# define EILSEQ 17 +# define ENOEXEC 18 +# define ENOENT 19 +# define EPROTOTYPE 20 +# define ESRCH 21 +# define EPERM 22 +# define EEXIST 23 +# define ENOTDIR 24 +# define ESTALE 25 +# define ENOTTY 26 +# define EISDIR 27 +# define EOPNOTSUPP 28 +# define EAGAIN 29 +# define EIO 30 +# define ENOSPC 31 +# define EBUSY 32 +#endif + +#define __set_errno(val) errno = (val) From d391bc58dded32eaa2609a8a5b060cc84b07fa6c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 11 Nov 1997 23:47:20 +0000 Subject: [PATCH 1100/4487] Make compilable and fix overflow condition. --- sysdeps/m68k/fpu/s_llrint.c | 48 ++++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 17 deletions(-) diff --git a/sysdeps/m68k/fpu/s_llrint.c b/sysdeps/m68k/fpu/s_llrint.c index f5d0d51122..9dfee644ed 100644 --- a/sysdeps/m68k/fpu/s_llrint.c +++ b/sysdeps/m68k/fpu/s_llrint.c @@ -24,36 +24,50 @@ #include "math_private.h" long long int -__llrint (long double x) +__llrint (double x) { - int32_t se, sx; - u_int32_t h, l; + int32_t e; + u_int32_t h, l, s; long long int result; - x = __m81_u(__rintl) (x); + x = __m81_u(__rint) (x); /* We could use __fixxfdi from libgcc, but here we can take advantage of the known floating point format. */ - GET_LDOUBLE_WORDS (se, h, l, x); + EXTRACT_WORDS (h, l, x); - sx = se & (1 << 15); - se = (se ^ sx) - 0x3fff; + e = ((h >> 20) & 0x7ff) - 0x3ff; + if (e < 0) + return 0; + s = h; + h &= 0xfffff; + h |= 0x100000; - if (se < 64) + if (e < 63) { - if (se > 31) - result = (((long long int) (h >> (63 - se)) << 32) - | (l >> (63 - se)) | (h << (se - 31))); + if (e > 52) + { + h <<= e - 52; + h |= l >> (84 - e); + l <<= e - 52; + result = ((long long int) h << 32) | l; + } + else if (e > 20) + { + l >>= 52 - e; + l |= h << (e - 20); + h >>= 52 - e; + result = ((long long int) h << 32) | l; + } else - result = h >> (31 - se); - if (sx) + result = h >> (20 - e); + if (s & 0x80000000) result = -result; } else - /* Too large. The number is either +-inf or NaN or it is too - large to be effected by rounding. The standard leaves it - undefined what to return when the number is too large to fit in - a `long long int'. */ + /* The number is too large or not finite. The standard leaves it + undefined what to return when the number is too large to fit in a + `long long int'. */ result = -1LL; return result; From d2d2125ecd3e1758e6fea9e50efc5f2009ed599f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 11 Nov 1997 23:48:16 +0000 Subject: [PATCH 1101/4487] m68k specific llrint implementation. --- sysdeps/m68k/fpu/s_llrintf.c | 66 ++++++++++++++++++++++++++++++++++++ sysdeps/m68k/fpu/s_llrintl.c | 65 +++++++++++++++++++++++++++++++++++ 2 files changed, 131 insertions(+) create mode 100644 sysdeps/m68k/fpu/s_llrintf.c create mode 100644 sysdeps/m68k/fpu/s_llrintl.c diff --git a/sysdeps/m68k/fpu/s_llrintf.c b/sysdeps/m68k/fpu/s_llrintf.c new file mode 100644 index 0000000000..3c8528c4e8 --- /dev/null +++ b/sysdeps/m68k/fpu/s_llrintf.c @@ -0,0 +1,66 @@ +/* Round argument to nearest integral value according to current rounding + direction. + Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Schwab + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#define __LIBC_M81_MATH_INLINES +#include +#include "math_private.h" + +long long int +__llrintf (float x) +{ + int32_t e; + u_int32_t i, s; + long long int result; + + x = __m81_u(__rintf) (x); + + GET_FLOAT_WORD (i, x); + + e = ((i >> 23) & 0xff) - 0x7f; + if (e < 0) + return 0; + s = i; + i &= 0x7fffff; + i |= 0x800000; + + if (e < 63) + { + if (e > 55) + result = (long long int) (i << (e - 55)) << 32; + else if (e > 31) + result = (((long long int) (i >> (55 - e)) << 32) | (i << (e - 23))); + else if (e > 23) + result = i << (e - 23); + else + result = i >> (23 - e); + if (s & 0x80000000) + result = -result; + } + else + /* The number is too large or not finite. The standard leaves it + undefined what to return when the number is too large to fit in a + `long long int'. */ + result = -1LL; + + return result; +} + +weak_alias (__llrintf, llrintf) diff --git a/sysdeps/m68k/fpu/s_llrintl.c b/sysdeps/m68k/fpu/s_llrintl.c new file mode 100644 index 0000000000..55190b9eb3 --- /dev/null +++ b/sysdeps/m68k/fpu/s_llrintl.c @@ -0,0 +1,65 @@ +/* Round argument to nearest integral value according to current rounding + direction. + Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Schwab + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#define __LIBC_M81_MATH_INLINES +#include +#include "math_private.h" + +long long int +__llrintl (long double x) +{ + int32_t e, s; + u_int32_t h, l; + long long int result; + + x = __m81_u(__rintl) (x); + + GET_LDOUBLE_WORDS (e, h, l, x); + + s = e; + e = (e & 0x7fff) - 0x3fff; + if (e < 0) + return 0; + + if (e < 63) + { + if (e > 31) + { + l >>= 63 - e; + l |= h << (e - 31); + h >>= 63 - e; + result = ((long long int) h << 32) | l; + } + else + result = h >> (31 - e); + if (s & 0x8000) + result = -result; + } + else + /* The number is too large or not finite. The standard leaves it + undefined what to return when the number is too large to fit in a + `long long int'. */ + result = -1LL; + + return result; +} + +weak_alias (__llrintl, llrintl) From fa94f8a58a4903eb566d1f9ad9a5fbae6e017a9f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 11 Nov 1997 23:52:34 +0000 Subject: [PATCH 1102/4487] EILSEQ is an ISO C error number. --- sysdeps/standalone/bits/errno.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/standalone/bits/errno.h b/sysdeps/standalone/bits/errno.h index 30eec4308d..d4030b7f44 100644 --- a/sysdeps/standalone/bits/errno.h +++ b/sysdeps/standalone/bits/errno.h @@ -23,6 +23,7 @@ #define __Emath_defined 1 # define EDOM 1 +# define EILSEQ 17 # define ERANGE 2 #endif @@ -41,7 +42,6 @@ # define ENOMSG 14 # define E2BIG 15 # define EINTR 16 -# define EILSEQ 17 # define ENOEXEC 18 # define ENOENT 19 # define EPROTOTYPE 20 From 2645f7aaad48d904f2efb503aeaabf0afa50fa01 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 11 Nov 1997 23:54:33 +0000 Subject: [PATCH 1103/4487] Use struct assignment instead of memcpy to let the compiler use whatever it regards as optimal. --- sysdeps/unix/sysv/linux/alpha/xstatconv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/xstatconv.c b/sysdeps/unix/sysv/linux/alpha/xstatconv.c index d1005e7302..cb0269b8af 100644 --- a/sysdeps/unix/sysv/linux/alpha/xstatconv.c +++ b/sysdeps/unix/sysv/linux/alpha/xstatconv.c @@ -29,7 +29,7 @@ xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf) /* Nothing to do. The struct is in the form the kernel expects. We should have short-circuted before we got here, but for completeness... */ - memcpy ((struct kernel_stat *) ubuf, kbuf, sizeof (*kbuf)); + *(struct kernel_stat *) ubuf = *kbuf; break; case _STAT_VER_GLIBC2: From 04f48607a08ee502ed7593f3d6d2daa88b97d9fb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 13 Nov 1997 00:15:34 +0000 Subject: [PATCH 1104/4487] Define NAN as of type float. --- sysdeps/m68k/bits/nan.h | 59 ----------------------------------------- 1 file changed, 59 deletions(-) delete mode 100644 sysdeps/m68k/bits/nan.h diff --git a/sysdeps/m68k/bits/nan.h b/sysdeps/m68k/bits/nan.h deleted file mode 100644 index b4efddfe91..0000000000 --- a/sysdeps/m68k/bits/nan.h +++ /dev/null @@ -1,59 +0,0 @@ -/* `NAN' constants for m68k. - Copyright (C) 1997 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _NAN_H - -#define _NAN_H 1 - -/* IEEE Not A Number. */ - -#ifdef __GNUC__ - -#define NAN \ - (__extension__ \ - ((union { unsigned long long __l; double __d; }) \ - { __l: 0x7fffffffffffffffULL }).__d) - -#define NANF \ - (__extension__ \ - ((union { unsigned long __l; float __f; }) \ - { __l: 0x7fffffffUL }).__f) - -#define NANL \ - (__extension__ \ - ((union { unsigned long __l[3]; long double __ld; }) \ - { __l: { 0x7fff0000UL, 0xffffffffUL, 0xffffffffUL } }).__ld) - -#else - -static union { unsigned char __c[8]; double __d; } __nan = - { { 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } }; -#define NAN (__nan.__d) - -static union { unsigned char __c[4]; float __f; } __nanf = - { { 0x7f, 0xff, 0xff, 0xff } }; -#define NANF (__nanf.__f) - -static union { unsigned char __c[12]; long double __ld; } __nanl = - { { 0x7f, 0xff, 0, 0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } }; -#define NANL (__nanl.__ld) - -#endif /* GCC. */ - -#endif /* nan.h */ From 2ecd6b510faac53c5b8f181c14f278e99f5e04b5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 13 Nov 1997 00:15:53 +0000 Subject: [PATCH 1105/4487] Define INFINITY as of type float. Define DECIMAL_DIG. --- sysdeps/alpha/fpu/bits/mathdef.h | 29 ++++++++++++++++------------- sysdeps/m68k/fpu/bits/mathdef.h | 7 +++++-- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/sysdeps/alpha/fpu/bits/mathdef.h b/sysdeps/alpha/fpu/bits/mathdef.h index 0bc9c94ecc..1c259403f5 100644 --- a/sysdeps/alpha/fpu/bits/mathdef.h +++ b/sysdeps/alpha/fpu/bits/mathdef.h @@ -17,38 +17,38 @@ Boston, MA 02111-1307, USA. */ #ifndef _MATH_H -#error "Never use directly; include instead" +# error "Never use directly; include instead" #endif /* FIXME! This file describes properties of the compiler, not the machine; it should not be part of libc! */ #ifdef __GNUC__ -#if __STDC__ == 1 +# if __STDC__ == 1 /* In GNU or ANSI mode, gcc leaves `float' expressions as-is. */ typedef float float_t; typedef double double_t; /* Signal that types stay as they were declared. */ -#define FLT_EVAL_METHOD 0 +# define FLT_EVAL_METHOD 0 -/* Define `INFINITY' as value of type `float_t'. */ -#define INFINITY HUGE_VALF +/* Define `INFINITY' as value of type `float'. */ +# define INFINITY HUGE_VALF -#else +# else /* For `gcc -traditional', `float' expressions are evaluated as `double'. */ typedef double float_t; typedef double double_t; /* Signal that both types are `double'. */ -#define FLT_EVAL_METHOD 1 +# define FLT_EVAL_METHOD 1 -/* Define `INFINITY' as value of type `float_t'. */ -#define INFINITY HUGE_VAL +/* Define `INFINITY' as value of type `float'. */ +# define INFINITY HUGE_VALF -#endif +# endif #else /* Wild guess at types for float_t and double_t. */ @@ -56,9 +56,12 @@ typedef double float_t; typedef double double_t; /* Strange compiler, we don't know how it works. */ -#define FLT_EVAL_METHOD -1 +# define FLT_EVAL_METHOD -1 -/* Define `INFINITY' as value of type `float_t'. */ -#define INFINITY HUGE_VAL +/* Define `INFINITY' as value of type `float'. */ +# define INFINITY HUGE_VALF #endif + +/* Number of decimal digits for the `double' type. */ +#define DECIMAL_DIG 15 diff --git a/sysdeps/m68k/fpu/bits/mathdef.h b/sysdeps/m68k/fpu/bits/mathdef.h index c2b4eff920..e3d33a53a2 100644 --- a/sysdeps/m68k/fpu/bits/mathdef.h +++ b/sysdeps/m68k/fpu/bits/mathdef.h @@ -32,9 +32,12 @@ typedef long double double_t; /* `double' expressions are evaluated as /* Signal that both types are `long double'. */ #define FLT_EVAL_METHOD 2 -/* Define `INFINITY' as value of type `float_t'. */ -#define INFINITY HUGE_VALL +/* Define `INFINITY' as value of type `float'. */ +#define INFINITY HUGE_VALF /* The values returned by `ilogb' for 0 and NaN respectively. */ #define FP_ILOGB0 0x80000000 #define FP_ILOGBNAN 0x7fffffff + +/* Number of decimal digits for the `long double' type. */ +#define DECIMAL_DIG 18 From 0fe3c9c4df28d934193af09773e1ff0729159976 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 13 Nov 1997 00:18:09 +0000 Subject: [PATCH 1106/4487] Include not . --- sysdeps/unix/arm/sysdep.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/arm/sysdep.S b/sysdeps/unix/arm/sysdep.S index 5d3ad551c6..d59500e47a 100644 --- a/sysdeps/unix/arm/sysdep.S +++ b/sysdeps/unix/arm/sysdep.S @@ -18,13 +18,13 @@ #include #define _ERRNO_H -#include +#include .globl C_SYMBOL_NAME(errno) .globl syscall_error _errno_loc: .long C_SYMBOL_NAME(errno) - + #undef syscall_error #ifdef NO_UNDERSCORES __syscall_error: @@ -39,7 +39,7 @@ syscall_error: moveq r0, $EAGAIN /* Yes; translate it to EAGAIN. */ #endif #ifndef PIC - ldr r1, _errno_loc + ldr r1, _errno_loc str r0, [r1] #endif mvn r0, $0 From c4b0b9530e75ae13e9fc4ace7d0e9f70fdb0b7cc Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 13 Nov 1997 00:19:12 +0000 Subject: [PATCH 1107/4487] (profil_counter): Use correct name to access PC. --- sysdeps/unix/sysv/linux/arm/profil-counter.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/arm/profil-counter.h b/sysdeps/unix/sysv/linux/arm/profil-counter.h index 802cbd5d63..d84e70e7ff 100644 --- a/sysdeps/unix/sysv/linux/arm/profil-counter.h +++ b/sysdeps/unix/sysv/linux/arm/profil-counter.h @@ -22,5 +22,5 @@ void profil_counter (int signo, struct sigcontext sc) { - profil_count ((void *) sc.eip); + profil_count ((void *) sc.reg.ARM_pc); } From d2099b0d6de5c85822297761fd353a17871121c5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 13 Nov 1997 00:19:24 +0000 Subject: [PATCH 1108/4487] (SYS_ify): Don't add SWI_BASE in twice. --- sysdeps/unix/sysv/linux/arm/sysdep.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index 0aa085d351..af08277a63 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -29,8 +29,8 @@ of the kernel. But these symbols do not follow the SYS_* syntax so we have to redefine the `SYS_ify' macro here. */ #undef SYS_ify -#define SWI_BASE (9 << 20) -#define SYS_ify(syscall_name) (SWI_BASE + __NR_##syscall_name) +#define SWI_BASE (0x900000) +#define SYS_ify(syscall_name) (__NR_##syscall_name) #ifdef ASSEMBLER From a5343fec83a8c293417544ff58a26ef8d1db7c4d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Nov 1997 02:39:11 +0000 Subject: [PATCH 1109/4487] Remove setjmp_aux.c. --- sysdeps/alpha/Dist | 1 - 1 file changed, 1 deletion(-) diff --git a/sysdeps/alpha/Dist b/sysdeps/alpha/Dist index 581022f6c0..0807ce1e69 100644 --- a/sysdeps/alpha/Dist +++ b/sysdeps/alpha/Dist @@ -1,4 +1,3 @@ -setjmp_aux.c divrem.h divl.S divq.S reml.S remq.S _mcount.S From c48d19d0d5cdd38636e701fdd74e72edbc8b5c7b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Nov 1997 02:39:35 +0000 Subject: [PATCH 1110/4487] Use __APCS_32__ to decide whether or not to preserve condition codes on function call. --- sysdeps/arm/sysdep.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/arm/sysdep.h b/sysdeps/arm/sysdep.h index b7964a35b1..8d1e2972df 100644 --- a/sysdeps/arm/sysdep.h +++ b/sysdeps/arm/sysdep.h @@ -43,13 +43,13 @@ #endif -/* ARM 6 needs slightly different handling */ -#ifdef __arm6__ +/* APCS-32 doesn't preserve the condition codes across function call. */ +#ifdef __APCS_32__ #define LOADREGS(cond, base, reglist...)\ ldm##cond base,reglist #define RETINSTR(instr, regs...)\ instr regs -#else /* arm 3 */ +#else /* APCS-26 */ #define LOADREGS(cond, base, reglist...)\ ldm##cond base,reglist^ #define RETINSTR(instr, regs...)\ From e729bad58bfbda44b17745763789ca01c663206d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 22 Nov 1997 18:45:43 +0000 Subject: [PATCH 1111/4487] Define __LIBC_INTERNAL_MATH_INLINES instead of __LIBC_M81_MATH_INLINES. --- sysdeps/m68k/fpu/e_acos.c | 2 +- sysdeps/m68k/fpu/e_atan2.c | 2 +- sysdeps/m68k/fpu/e_fmod.c | 2 +- sysdeps/m68k/fpu/e_pow.c | 2 +- sysdeps/m68k/fpu/e_scalb.c | 2 +- sysdeps/m68k/fpu/k_cos.c | 2 +- sysdeps/m68k/fpu/k_sin.c | 2 +- sysdeps/m68k/fpu/k_tan.c | 2 +- sysdeps/m68k/fpu/s_atan.c | 2 +- sysdeps/m68k/fpu/s_ccos.c | 2 +- sysdeps/m68k/fpu/s_ccosh.c | 2 +- sysdeps/m68k/fpu/s_cexp.c | 2 +- sysdeps/m68k/fpu/s_csin.c | 2 +- sysdeps/m68k/fpu/s_csinh.c | 2 +- sysdeps/m68k/fpu/s_frexp.c | 2 +- sysdeps/m68k/fpu/s_ilogb.c | 2 +- sysdeps/m68k/fpu/s_isinf.c | 2 +- sysdeps/m68k/fpu/s_llrint.c | 2 +- sysdeps/m68k/fpu/s_llrintf.c | 2 +- sysdeps/m68k/fpu/s_llrintl.c | 2 +- sysdeps/m68k/fpu/s_lrint.c | 2 +- sysdeps/m68k/fpu/s_modf.c | 2 +- sysdeps/m68k/fpu/s_remquo.c | 2 +- sysdeps/m68k/fpu/s_scalbn.c | 2 +- sysdeps/m68k/fpu/s_sincos.c | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/sysdeps/m68k/fpu/e_acos.c b/sysdeps/m68k/fpu/e_acos.c index 7ea9fb014b..9c2d91f271 100644 --- a/sysdeps/m68k/fpu/e_acos.c +++ b/sysdeps/m68k/fpu/e_acos.c @@ -16,7 +16,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_M81_MATH_INLINES +#define __LIBC_INTERNAL_MATH_INLINES #include #include "math_private.h" diff --git a/sysdeps/m68k/fpu/e_atan2.c b/sysdeps/m68k/fpu/e_atan2.c index 59bc990f5b..d23d4f90d1 100644 --- a/sysdeps/m68k/fpu/e_atan2.c +++ b/sysdeps/m68k/fpu/e_atan2.c @@ -16,7 +16,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_M81_MATH_INLINES +#define __LIBC_INTERNAL_MATH_INLINES #include #include "math_private.h" diff --git a/sysdeps/m68k/fpu/e_fmod.c b/sysdeps/m68k/fpu/e_fmod.c index 1daa453618..505650a531 100644 --- a/sysdeps/m68k/fpu/e_fmod.c +++ b/sysdeps/m68k/fpu/e_fmod.c @@ -16,7 +16,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_M81_MATH_INLINES +#define __LIBC_INTERNAL_MATH_INLINES #include #include "math_private.h" diff --git a/sysdeps/m68k/fpu/e_pow.c b/sysdeps/m68k/fpu/e_pow.c index b3d151fadc..c36b64316e 100644 --- a/sysdeps/m68k/fpu/e_pow.c +++ b/sysdeps/m68k/fpu/e_pow.c @@ -16,7 +16,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_M81_MATH_INLINES +#define __LIBC_INTERNAL_MATH_INLINES #include #include "math_private.h" diff --git a/sysdeps/m68k/fpu/e_scalb.c b/sysdeps/m68k/fpu/e_scalb.c index a5923ab450..93b44ff130 100644 --- a/sysdeps/m68k/fpu/e_scalb.c +++ b/sysdeps/m68k/fpu/e_scalb.c @@ -17,7 +17,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_M81_MATH_INLINES +#define __LIBC_INTERNAL_MATH_INLINES #include #ifndef SUFF diff --git a/sysdeps/m68k/fpu/k_cos.c b/sysdeps/m68k/fpu/k_cos.c index 516d45904e..5b263ec6ae 100644 --- a/sysdeps/m68k/fpu/k_cos.c +++ b/sysdeps/m68k/fpu/k_cos.c @@ -16,7 +16,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_M81_MATH_INLINES +#define __LIBC_INTERNAL_MATH_INLINES #include #include "math_private.h" diff --git a/sysdeps/m68k/fpu/k_sin.c b/sysdeps/m68k/fpu/k_sin.c index 348bc8fd9d..41de73fde7 100644 --- a/sysdeps/m68k/fpu/k_sin.c +++ b/sysdeps/m68k/fpu/k_sin.c @@ -16,7 +16,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_M81_MATH_INLINES +#define __LIBC_INTERNAL_MATH_INLINES #include #include "math_private.h" diff --git a/sysdeps/m68k/fpu/k_tan.c b/sysdeps/m68k/fpu/k_tan.c index c38327e571..7f87e09e00 100644 --- a/sysdeps/m68k/fpu/k_tan.c +++ b/sysdeps/m68k/fpu/k_tan.c @@ -16,7 +16,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_M81_MATH_INLINES +#define __LIBC_INTERNAL_MATH_INLINES #include #include "math_private.h" diff --git a/sysdeps/m68k/fpu/s_atan.c b/sysdeps/m68k/fpu/s_atan.c index f3d6960dc1..e6b676ba58 100644 --- a/sysdeps/m68k/fpu/s_atan.c +++ b/sysdeps/m68k/fpu/s_atan.c @@ -16,7 +16,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_M81_MATH_INLINES +#define __LIBC_INTERNAL_MATH_INLINES #include #ifndef FUNC diff --git a/sysdeps/m68k/fpu/s_ccos.c b/sysdeps/m68k/fpu/s_ccos.c index 53f8286b14..095aa9803f 100644 --- a/sysdeps/m68k/fpu/s_ccos.c +++ b/sysdeps/m68k/fpu/s_ccos.c @@ -18,7 +18,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_M81_MATH_INLINES +#define __LIBC_INTERNAL_MATH_INLINES #include #include diff --git a/sysdeps/m68k/fpu/s_ccosh.c b/sysdeps/m68k/fpu/s_ccosh.c index 85e73b87e3..3d560b3093 100644 --- a/sysdeps/m68k/fpu/s_ccosh.c +++ b/sysdeps/m68k/fpu/s_ccosh.c @@ -18,7 +18,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_M81_MATH_INLINES +#define __LIBC_INTERNAL_MATH_INLINES #include #include diff --git a/sysdeps/m68k/fpu/s_cexp.c b/sysdeps/m68k/fpu/s_cexp.c index 86cc894a7e..da28ebb4d3 100644 --- a/sysdeps/m68k/fpu/s_cexp.c +++ b/sysdeps/m68k/fpu/s_cexp.c @@ -18,7 +18,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_M81_MATH_INLINES +#define __LIBC_INTERNAL_MATH_INLINES #include #include diff --git a/sysdeps/m68k/fpu/s_csin.c b/sysdeps/m68k/fpu/s_csin.c index 8eecd961a6..ae456d3b91 100644 --- a/sysdeps/m68k/fpu/s_csin.c +++ b/sysdeps/m68k/fpu/s_csin.c @@ -18,7 +18,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_M81_MATH_INLINES +#define __LIBC_INTERNAL_MATH_INLINES #include #include diff --git a/sysdeps/m68k/fpu/s_csinh.c b/sysdeps/m68k/fpu/s_csinh.c index 643a221b57..c95f9dc523 100644 --- a/sysdeps/m68k/fpu/s_csinh.c +++ b/sysdeps/m68k/fpu/s_csinh.c @@ -18,7 +18,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_M81_MATH_INLINES +#define __LIBC_INTERNAL_MATH_INLINES #include #include diff --git a/sysdeps/m68k/fpu/s_frexp.c b/sysdeps/m68k/fpu/s_frexp.c index 84a9a0b45d..4280fcc50b 100644 --- a/sysdeps/m68k/fpu/s_frexp.c +++ b/sysdeps/m68k/fpu/s_frexp.c @@ -16,7 +16,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_M81_MATH_INLINES +#define __LIBC_INTERNAL_MATH_INLINES #include #ifndef FUNC diff --git a/sysdeps/m68k/fpu/s_ilogb.c b/sysdeps/m68k/fpu/s_ilogb.c index 2d8f7d5082..aebcaa16ba 100644 --- a/sysdeps/m68k/fpu/s_ilogb.c +++ b/sysdeps/m68k/fpu/s_ilogb.c @@ -16,7 +16,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_M81_MATH_INLINES +#define __LIBC_INTERNAL_MATH_INLINES #include #ifndef SUFF diff --git a/sysdeps/m68k/fpu/s_isinf.c b/sysdeps/m68k/fpu/s_isinf.c index fa0d1d56db..d8cafdbb0c 100644 --- a/sysdeps/m68k/fpu/s_isinf.c +++ b/sysdeps/m68k/fpu/s_isinf.c @@ -16,7 +16,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_M81_MATH_INLINES +#define __LIBC_INTERNAL_MATH_INLINES #include #ifndef FUNC diff --git a/sysdeps/m68k/fpu/s_llrint.c b/sysdeps/m68k/fpu/s_llrint.c index 9dfee644ed..37b6f63278 100644 --- a/sysdeps/m68k/fpu/s_llrint.c +++ b/sysdeps/m68k/fpu/s_llrint.c @@ -19,7 +19,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_M81_MATH_INLINES +#define __LIBC_INTERNAL_MATH_INLINES #include #include "math_private.h" diff --git a/sysdeps/m68k/fpu/s_llrintf.c b/sysdeps/m68k/fpu/s_llrintf.c index 3c8528c4e8..4d06ae2651 100644 --- a/sysdeps/m68k/fpu/s_llrintf.c +++ b/sysdeps/m68k/fpu/s_llrintf.c @@ -19,7 +19,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_M81_MATH_INLINES +#define __LIBC_INTERNAL_MATH_INLINES #include #include "math_private.h" diff --git a/sysdeps/m68k/fpu/s_llrintl.c b/sysdeps/m68k/fpu/s_llrintl.c index 55190b9eb3..14a815fd1a 100644 --- a/sysdeps/m68k/fpu/s_llrintl.c +++ b/sysdeps/m68k/fpu/s_llrintl.c @@ -19,7 +19,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_M81_MATH_INLINES +#define __LIBC_INTERNAL_MATH_INLINES #include #include "math_private.h" diff --git a/sysdeps/m68k/fpu/s_lrint.c b/sysdeps/m68k/fpu/s_lrint.c index 511d28880c..7747057f1a 100644 --- a/sysdeps/m68k/fpu/s_lrint.c +++ b/sysdeps/m68k/fpu/s_lrint.c @@ -19,7 +19,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_M81_MATH_INLINES +#define __LIBC_INTERNAL_MATH_INLINES #include #ifndef suffix diff --git a/sysdeps/m68k/fpu/s_modf.c b/sysdeps/m68k/fpu/s_modf.c index ad0334faaa..b9867df475 100644 --- a/sysdeps/m68k/fpu/s_modf.c +++ b/sysdeps/m68k/fpu/s_modf.c @@ -16,7 +16,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_M81_MATH_INLINES +#define __LIBC_INTERNAL_MATH_INLINES #include #ifndef SUFF diff --git a/sysdeps/m68k/fpu/s_remquo.c b/sysdeps/m68k/fpu/s_remquo.c index 0332eccfd0..7607fee782 100644 --- a/sysdeps/m68k/fpu/s_remquo.c +++ b/sysdeps/m68k/fpu/s_remquo.c @@ -18,7 +18,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_M81_MATH_INLINES +#define __LIBC_INTERNAL_MATH_INLINES #include #ifndef SUFF diff --git a/sysdeps/m68k/fpu/s_scalbn.c b/sysdeps/m68k/fpu/s_scalbn.c index 1b219ec108..12b737a5e9 100644 --- a/sysdeps/m68k/fpu/s_scalbn.c +++ b/sysdeps/m68k/fpu/s_scalbn.c @@ -16,7 +16,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_M81_MATH_INLINES +#define __LIBC_INTERNAL_MATH_INLINES #define scalbln __no_scalbln_decl #define scalblnf __no_scalblnf_decl #define scalblnl __no_scalblnl_decl diff --git a/sysdeps/m68k/fpu/s_sincos.c b/sysdeps/m68k/fpu/s_sincos.c index ada21d0fb1..dda42e2775 100644 --- a/sysdeps/m68k/fpu/s_sincos.c +++ b/sysdeps/m68k/fpu/s_sincos.c @@ -16,7 +16,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_M81_MATH_INLINES +#define __LIBC_INTERNAL_MATH_INLINES #include #ifndef FUNC From e00fbfc6aaa694a5a5aad59801779b161b556cf3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 22 Nov 1997 18:47:44 +0000 Subject: [PATCH 1112/4487] Define optimizations if __LIBC_INTERNAL_MATH_INLINES is defined. --- sysdeps/m68k/fpu/bits/mathinline.h | 106 ++++++++++++++--------------- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/fpu/bits/mathinline.h index c3ed76c0de..827a8d603d 100644 --- a/sysdeps/m68k/fpu/bits/mathinline.h +++ b/sysdeps/m68k/fpu/bits/mathinline.h @@ -70,22 +70,22 @@ #if (!defined __NO_MATH_INLINES && defined __OPTIMIZE__) \ - || defined __LIBC_M81_MATH_INLINES + || defined __LIBC_INTERNAL_MATH_INLINES -#ifdef __LIBC_M81_MATH_INLINES +#ifdef __LIBC_INTERNAL_MATH_INLINES /* This is used when defining the functions themselves. Define them with __ names, and with `static inline' instead of `extern inline' so the bodies will always be used, never an external function call. */ -#define __m81_u(x) __CONCAT(__,x) -#define __m81_inline static __inline +# define __m81_u(x) __CONCAT(__,x) +# define __m81_inline static __inline #else -#define __m81_u(x) x -#ifdef __cplusplus -#define __m81_inline __inline -#else -#define __m81_inline extern __inline -#endif -#define __M81_MATH_INLINES 1 +# define __m81_u(x) x +# ifdef __cplusplus +# define __m81_inline __inline +# else +# define __m81_inline extern __inline +# endif +# define __M81_MATH_INLINES 1 #endif /* Define a const math function. */ @@ -99,12 +99,12 @@ is the name of the fpu operation (without leading f). */ #if defined __USE_MISC || defined __USE_ISOC9X -#define __inline_mathop(func, op) \ +# define __inline_mathop(func, op) \ __inline_mathop1(double, func, op) \ __inline_mathop1(float, __CONCAT(func,f), op) \ __inline_mathop1(long double, __CONCAT(func,l), op) #else -#define __inline_mathop(func, op) \ +# define __inline_mathop(func, op) \ __inline_mathop1(double, func, op) #endif @@ -116,7 +116,7 @@ return __result; \ } -#ifdef __LIBC_M81_MATH_INLINES +#ifdef __LIBC_INTERNAL_MATH_INLINES /* ieee style elementary functions */ /* These are internal to the implementation of libm. */ __inline_mathop(__ieee754_acos, acos) @@ -154,21 +154,21 @@ __inline_mathop(sin, sin) __inline_mathop(tan, tan) __inline_mathop(tanh, tanh) -#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC9X +# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC9X __inline_mathop(rint, int) __inline_mathop(expm1, etoxm1) __inline_mathop(log1p, lognp1) -#endif +# endif -#ifdef __USE_MISC +# ifdef __USE_MISC __inline_mathop(significand, getman) -#endif +# endif -#ifdef __USE_ISOC9X +# ifdef __USE_ISOC9X __inline_mathop(log2, log2) __inline_mathop(exp2, twotox) __inline_mathop(trunc, intrz) -#endif +# endif #endif /* !__NO_MATH_INLINES && __OPTIMIZE__ */ @@ -176,9 +176,9 @@ __inline_mathop(trunc, intrz) functions, using __FLOAT_TYPE as the domain type and __S as the suffix for the function names. */ -#ifdef __LIBC_M81_MATH_INLINES +#ifdef __LIBC_INTERNAL_MATH_INLINES /* Internally used functions. */ -#define __internal_inline_functions(float_type, s) \ +# define __internal_inline_functions(float_type, s) \ __m81_defun (float_type, __CONCAT(__ieee754_remainder,s), \ (float_type __x, float_type __y)) \ { \ @@ -198,7 +198,7 @@ __m81_defun (float_type, __CONCAT(__ieee754_fmod,s), \ __internal_inline_functions (double,) __internal_inline_functions (float,f) __internal_inline_functions (long double,l) -#undef __internal_inline_functions +# undef __internal_inline_functions /* Get the m68881 condition codes, to quickly check multiple conditions. */ static __inline__ unsigned long @@ -210,12 +210,12 @@ __m81_test (long double __val) } /* Bit values returned by __m81_test. */ -#define __M81_COND_NAN (1 << 24) -#define __M81_COND_INF (2 << 24) -#define __M81_COND_ZERO (4 << 24) -#define __M81_COND_NEG (8 << 24) +# define __M81_COND_NAN (1 << 24) +# define __M81_COND_INF (2 << 24) +# define __M81_COND_ZERO (4 << 24) +# define __M81_COND_NEG (8 << 24) -#endif /* __LIBC_M81_MATH_INLINES */ +#endif /* __LIBC_INTENRAL_MATH_INLINES */ /* The rest of the functions are available to the user. */ @@ -374,14 +374,14 @@ __inline_functions (long double,l) /* Note that there must be no whitespace before the argument passed for NAME, to make token pasting work correctly with -traditional. */ -#define __inline_forward_c(rettype, name, args1, args2) \ +# define __inline_forward_c(rettype, name, args1, args2) \ extern __inline rettype __attribute__((__const__)) \ name args1 \ { \ return __CONCAT(__,name) args2; \ } -#define __inline_forward(rettype, name, args1, args2) \ +# define __inline_forward(rettype, name, args1, args2) \ extern __inline rettype name args1 \ { \ return __CONCAT(__,name) args2; \ @@ -391,76 +391,76 @@ __inline_forward(double,frexp, (double __value, int *__expptr), (__value, __expptr)) __inline_forward_c(double,floor, (double __x), (__x)) __inline_forward_c(double,ceil, (double __x), (__x)) -#ifdef __USE_MISC +# ifdef __USE_MISC __inline_forward_c(int,isinf, (double __value), (__value)) __inline_forward_c(int,finite, (double __value), (__value)) __inline_forward_c(double,scalbn, (double __x, int __n), (__x, __n)) __inline_forward_c(double,scalbln, (double __x, long int __n), (__x, __n)) -#endif -#if defined __USE_MISC || defined __USE_XOPEN -#ifndef __USE_ISOC9X /* Conflict with macro of same name. */ +# endif +# if defined __USE_MISC || defined __USE_XOPEN +# ifndef __USE_ISOC9X /* Conflict with macro of same name. */ __inline_forward_c(int,isnan, (double __value), (__value)) -#endif -#endif -#ifdef __USE_ISOC9X +# endif +# endif +# ifdef __USE_ISOC9X __inline_forward_c(double,nearbyint, (double __value), (__value)) __inline_forward_c(long int,lrint, (double __value), (__value)) __inline_forward_c(double,fma, (double __x, double __y, double __z), (__x, __y, __z)) -#endif -#ifdef __USE_GNU +# endif +# ifdef __USE_GNU __inline_forward(void,sincos, (double __x, double *__sinx, double *__cosx), (__x, __sinx, __cosx)) -#endif +# endif -#if defined __USE_MISC || defined __USE_ISOC9X +# if defined __USE_MISC || defined __USE_ISOC9X __inline_forward(float,frexpf, (float __value, int *__expptr), (__value, __expptr)) __inline_forward_c(float,floorf, (float __x), (__x)) __inline_forward_c(float,ceilf, (float __x), (__x)) -#ifdef __USE_MISC +# ifdef __USE_MISC __inline_forward_c(int,isinff, (float __value), (__value)) __inline_forward_c(int,finitef, (float __value), (__value)) __inline_forward_c(float,scalbnf, (float __x, int __n), (__x, __n)) __inline_forward_c(float,scalblnf, (float __x, long int __n), (__x, __n)) __inline_forward_c(int,isnanf, (float __value), (__value)) -#endif -#ifdef __USE_ISOC9X +# endif +# ifdef __USE_ISOC9X __inline_forward_c(float,nearbyintf, (float __value), (__value)) __inline_forward_c(long int,lrintf, (float __value), (__value)) __inline_forward_c(float,fmaf, (float __x, float __y, float __z), (__x, __y, __z)) -#endif -#ifdef __USE_GNU +# endif +# ifdef __USE_GNU __inline_forward(void,sincosf, (float __x, float *__sinx, float *__cosx), (__x, __sinx, __cosx)) -#endif +# endif __inline_forward(long double,frexpl, (long double __value, int *__expptr), (__value, __expptr)) __inline_forward_c(long double,floorl, (long double __x), (__x)) __inline_forward_c(long double,ceill, (long double __x), (__x)) -#ifdef __USE_MISC +# ifdef __USE_MISC __inline_forward_c(int,isinfl, (long double __value), (__value)) __inline_forward_c(int,finitel, (long double __value), (__value)) __inline_forward_c(long double,scalbnl, (long double __x, int __n), (__x, __n)) __inline_forward_c(long double,scalblnl, (long double __x, long int __n), (__x, __n)) __inline_forward_c(int,isnanl, (long double __value), (__value)) -#endif -#ifdef __USE_ISOC9X +# endif +# ifdef __USE_ISOC9X __inline_forward_c(long double,nearbyintl, (long double __value), (__value)) __inline_forward_c(long int,lrintl, (long double __value), (__value)) __inline_forward_c(long double,fmal, (long double __x, long double __y, long double __z), (__x, __y, __z)) -#endif -#ifdef __USE_GNU +# endif +# ifdef __USE_GNU __inline_forward(void,sincosl, (long double __x, long double *__sinx, long double *__cosx), (__x, __sinx, __cosx)) -#endif +# endif #endif /* Use misc or ISO C9X */ From 905714080fcea01e677a0723cbae0b4e23cf1262 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 26 Nov 1997 04:14:44 +0000 Subject: [PATCH 1113/4487] Issue error message if the header is used directly. --- sysdeps/alpha/bits/endian.h | 4 + sysdeps/alpha/bits/setjmp.h | 40 +++--- sysdeps/alpha/fpu/bits/fenv.h | 17 ++- sysdeps/arm/bits/endian.h | 4 + sysdeps/arm/bits/setjmp.h | 10 +- sysdeps/m68k/bits/byteswap.h | 13 +- sysdeps/m68k/bits/endian.h | 4 + sysdeps/m68k/bits/setjmp.h | 10 +- sysdeps/m68k/fpu/bits/fenv.h | 2 +- sysdeps/mach/hurd/alpha/bits/sigcontext.h | 4 + sysdeps/mach/hurd/hppa/bits/sigcontext.h | 4 + sysdeps/mach/hurd/mips/bits/sigcontext.h | 4 + sysdeps/mips/bits/dlfcn.h | 14 +- sysdeps/mips/bits/endian.h | 4 + sysdeps/mips/bits/setjmp.h | 5 +- sysdeps/mips/dec/bits/endian.h | 4 + sysdeps/mips/mips64/bits/setjmp.h | 5 +- sysdeps/mips/mipsel/bits/endian.h | 4 + sysdeps/mips/p40/bits/endian.h | 4 + sysdeps/unix/bsd/osf/alpha/bits/stat.h | 12 +- sysdeps/unix/bsd/osf/bits/sigaction.h | 4 + sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h | 4 + sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h | 4 + sysdeps/unix/bsd/sun/sunos4/bits/resource.h | 7 +- sysdeps/unix/bsd/sun/sunos4/bits/termios.h | 112 ++++++++------- sysdeps/unix/bsd/sun/sunos4/bits/utsname.h | 22 +++ sysdeps/unix/bsd/ultrix4/bits/utsname.h | 22 +++ .../unix/bsd/ultrix4/mips/bits/sigcontext.h | 5 +- sysdeps/unix/sysv/irix4/bits/confname.h | 4 + sysdeps/unix/sysv/irix4/bits/stat.h | 11 +- sysdeps/unix/sysv/linux/alpha/bits/ioctls.h | 11 +- sysdeps/unix/sysv/linux/alpha/bits/ipc.h | 19 +-- sysdeps/unix/sysv/linux/alpha/bits/mman.h | 4 +- .../unix/sysv/linux/alpha/bits/sigaction.h | 4 + sysdeps/unix/sysv/linux/alpha/bits/stat.h | 11 +- sysdeps/unix/sysv/linux/alpha/bits/termios.h | 7 +- sysdeps/unix/sysv/linux/alpha/bits/time.h | 39 +++-- sysdeps/unix/sysv/linux/m68k/bits/mman.h | 4 +- sysdeps/unix/sysv/linux/m68k/bits/poll.h | 3 + sysdeps/unix/sysv/linux/mips/bits/endian.h | 12 +- .../unix/sysv/linux/mips/bits/ioctl-types.h | 11 +- sysdeps/unix/sysv/linux/mips/bits/ipc.h | 28 ++-- sysdeps/unix/sysv/linux/mips/bits/mman.h | 4 +- sysdeps/unix/sysv/linux/mips/bits/poll.h | 3 + sysdeps/unix/sysv/linux/mips/bits/shm.h | 78 +++++----- sysdeps/unix/sysv/linux/mips/bits/sigaction.h | 6 +- sysdeps/unix/sysv/linux/mips/bits/socket.h | 11 +- sysdeps/unix/sysv/linux/mips/bits/stat.h | 11 +- sysdeps/unix/sysv/linux/mips/bits/statfs.h | 11 +- sysdeps/unix/sysv/linux/mips/bits/termios.h | 136 +++++++++--------- sysdeps/unix/sysv/linux/mips/bits/time.h | 38 +++-- sysdeps/unix/sysv/minix/bits/sigaction.h | 4 + sysdeps/unix/sysv/sco3.2.4/bits/confname.h | 4 + sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h | 4 + sysdeps/unix/sysv/sysv4/bits/sigaction.h | 4 + sysdeps/unix/sysv/sysv4/bits/utsname.h | 22 +++ sysdeps/unix/sysv/sysv4/bits/waitflags.h | 6 +- sysdeps/unix/sysv/sysv4/i386/bits/stat.h | 58 ++++---- sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h | 22 ++- .../sysv4/solaris2/sparc/bits/sigcontext.h | 35 ++++- sysdeps/vax/bits/huge_val.h | 4 +- sysdeps/vax/bits/setjmp.h | 4 + 62 files changed, 560 insertions(+), 421 deletions(-) diff --git a/sysdeps/alpha/bits/endian.h b/sysdeps/alpha/bits/endian.h index e873d2123c..8a16e14e24 100644 --- a/sysdeps/alpha/bits/endian.h +++ b/sysdeps/alpha/bits/endian.h @@ -1,3 +1,7 @@ /* Alpha is little-endian. */ +#ifndef _ENDIAN_H +# error "Never use directly; include instead." +#endif + #define __BYTE_ORDER __LITTLE_ENDIAN diff --git a/sysdeps/alpha/bits/setjmp.h b/sysdeps/alpha/bits/setjmp.h index 9aa30463d6..de37019218 100644 --- a/sysdeps/alpha/bits/setjmp.h +++ b/sysdeps/alpha/bits/setjmp.h @@ -17,6 +17,10 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef _SETJMP_H +# error "Never include directly; use instead." +#endif + /* The previous bits/setjmp.h had __jmp_buf defined as a structure. We use an array of 'long int' instead, to make writing the assembler easier. Naturally, user code should not depend on @@ -48,24 +52,24 @@ * registers. */ -#if defined(__USE_MISC) || defined(__ASSEMBLY__) -#define JB_S0 0 -#define JB_S1 1 -#define JB_S2 2 -#define JB_S3 3 -#define JB_S4 4 -#define JB_S5 5 -#define JB_PC 6 -#define JB_FP 7 -#define JB_SP 8 -#define JB_F2 9 -#define JB_F3 10 -#define JB_F4 11 -#define JB_F5 12 -#define JB_F6 13 -#define JB_F7 14 -#define JB_F8 15 -#define JB_F9 16 +#if defined __USE_MISC || defined __ASSEMBLY__ +# define JB_S0 0 +# define JB_S1 1 +# define JB_S2 2 +# define JB_S3 3 +# define JB_S4 4 +# define JB_S5 5 +# define JB_PC 6 +# define JB_FP 7 +# define JB_SP 8 +# define JB_F2 9 +# define JB_F3 10 +# define JB_F4 11 +# define JB_F5 12 +# define JB_F6 13 +# define JB_F7 14 +# define JB_F8 15 +# define JB_F9 16 #endif #ifndef __ASSEMBLY__ diff --git a/sysdeps/alpha/fpu/bits/fenv.h b/sysdeps/alpha/fpu/bits/fenv.h index 7cb0e3e543..4482f0a2dd 100644 --- a/sysdeps/alpha/fpu/bits/fenv.h +++ b/sysdeps/alpha/fpu/bits/fenv.h @@ -1,6 +1,5 @@ /* Copyright (C) 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. - Contributed by Richard Henderson , 1997 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 @@ -18,7 +17,7 @@ Boston, MA 02111-1307, USA. */ #ifndef _FENV_H -#error "Never use directly; include instead." +# error "Never use directly; include instead." #endif @@ -51,20 +50,20 @@ enum FE_INVALID = 1UL << 17, #define FE_INVALID FE_INVALID - + FE_ALL_EXCEPT = (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID) -#define FE_ALL_EXCEPT FE_ALL_EXCEPT +#define FE_ALL_EXCEPT FE_ALL_EXCEPT }; -/* Alpha chips support all four defined rouding modes. +/* Alpha chips support all four defined rouding modes. Note that code must be compiled to use dynamic rounding (/d) instructions to see these changes. For gcc this is -mfp-rounding-mode=d; for DEC cc - this is -fprm d. The default for both is static rounding to nearest. + this is -fprm d. The default for both is static rounding to nearest. - These are shifted down 58 bits from the hardware fpcr because the + These are shifted down 58 bits from the hardware fpcr because the functions are declared to take integers. */ enum @@ -100,5 +99,5 @@ typedef unsigned long fenv_t; #endif /* The system calls to talk to the kernel's FP code. */ -extern unsigned long __ieee_get_fp_control(void); -extern void __ieee_set_fp_control(unsigned long); +extern unsigned long int __ieee_get_fp_control __P ((void)); +extern void __ieee_set_fp_control __P ((unsigned long int __value)); diff --git a/sysdeps/arm/bits/endian.h b/sysdeps/arm/bits/endian.h index 32f8489df2..ad3b5393bc 100644 --- a/sysdeps/arm/bits/endian.h +++ b/sysdeps/arm/bits/endian.h @@ -1,3 +1,7 @@ /* ARM is little-endian. */ +#ifndef _ENDIAN_H +# error "Never use directly; include instead." +#endif + #define __BYTE_ORDER __LITTLE_ENDIAN diff --git a/sysdeps/arm/bits/setjmp.h b/sysdeps/arm/bits/setjmp.h index 93b0f5f916..5cf9cd75c7 100644 --- a/sysdeps/arm/bits/setjmp.h +++ b/sysdeps/arm/bits/setjmp.h @@ -1,10 +1,14 @@ /* Define the machine-dependent type `jmp_buf'. ARM version. */ +#ifndef _SETJMP_H +# error "Never include directly; use instead." +#endif + #ifndef _ASM /* Jump buffer contains v1-v6, sl, fp, sp, pc and (f4-f7) if we do FP. */ -#if __ARM_USES_FP +# if __ARM_USES_FP typedef int __jmp_buf[22]; -#else +# else typedef int __jmp_buf[10]; -#endif +# endif #endif diff --git a/sysdeps/m68k/bits/byteswap.h b/sysdeps/m68k/bits/byteswap.h index 54ec0d1920..41bbe59782 100644 --- a/sysdeps/m68k/bits/byteswap.h +++ b/sysdeps/m68k/bits/byteswap.h @@ -17,8 +17,9 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef _BITS_BYTESWAP_H -#define _BITS_BYTESWAP_H 1 +#if !defined _BYTESWAP_H && !defined _NETINET_IN_H +# error "Never use directly; include instead." +#endif /* Swap bytes in 16 bit value. We don't provide an assembler version because GCC is smart enough to generate optimal assembler output, and @@ -32,7 +33,7 @@ (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24)) #if defined __GNUC__ && __GNUC__ >= 2 -#define __bswap_32(x) \ +# define __bswap_32(x) \ __extension__ \ ({ unsigned int __v; \ if (__builtin_constant_p (x)) \ @@ -45,12 +46,12 @@ : "0" (x)); \ __v; }) #else -#define __bswap_32(x) __bswap_constant_32 (x) +# define __bswap_32(x) __bswap_constant_32 (x) #endif #if defined __GNUC__ && __GNUC__ >= 2 /* Swap bytes in 64 bit value. */ -#define __bswap_64(x) \ +# define __bswap_64(x) \ __extension__ \ ({ union { unsigned long long int __ll; \ unsigned long int __l[2]; } __v, __r; \ @@ -59,5 +60,3 @@ __r.__l[1] = __bswap_32 (__v.__l[0]); \ __r.__ll; }) #endif - -#endif /* bits/byteswap.h */ diff --git a/sysdeps/m68k/bits/endian.h b/sysdeps/m68k/bits/endian.h index 6f985293f2..bf4ecb60a4 100644 --- a/sysdeps/m68k/bits/endian.h +++ b/sysdeps/m68k/bits/endian.h @@ -1,3 +1,7 @@ /* m68k is big-endian. */ +#ifndef _ENDIAN_H +# error "Never use directly; include instead." +#endif + #define __BYTE_ORDER __BIG_ENDIAN diff --git a/sysdeps/m68k/bits/setjmp.h b/sysdeps/m68k/bits/setjmp.h index 96240f0d8e..2991232915 100644 --- a/sysdeps/m68k/bits/setjmp.h +++ b/sysdeps/m68k/bits/setjmp.h @@ -1,5 +1,9 @@ /* Define the machine-dependent type `jmp_buf'. m68k version. */ +#ifndef _SETJMP_H +# error "Never include directly; use instead." +#endif + typedef struct { /* There are eight 4-byte data registers, but D0 is not saved. */ @@ -7,10 +11,10 @@ typedef struct /* There are six 4-byte address registers, plus the FP and SP. */ int *__aregs[6]; - int * __fp; - int * __sp; + int *__fp; + int *__sp; -#if defined(__HAVE_68881__) || defined(__HAVE_FPU__) +#if defined __HAVE_68881__ || defined __HAVE_FPU__ /* There are eight floating point registers which are saved in IEEE 96-bit extended format. */ char __fpregs[8 * (96 / 8)]; diff --git a/sysdeps/m68k/fpu/bits/fenv.h b/sysdeps/m68k/fpu/bits/fenv.h index ce071b93ff..a11e0724f1 100644 --- a/sysdeps/m68k/fpu/bits/fenv.h +++ b/sysdeps/m68k/fpu/bits/fenv.h @@ -17,7 +17,7 @@ Boston, MA 02111-1307, USA. */ #ifndef _FENV_H -#error "Never use directly; include instead." +# error "Never use directly; include instead." #endif diff --git a/sysdeps/mach/hurd/alpha/bits/sigcontext.h b/sysdeps/mach/hurd/alpha/bits/sigcontext.h index 3b17a4ada8..a2c8163599 100644 --- a/sysdeps/mach/hurd/alpha/bits/sigcontext.h +++ b/sysdeps/mach/hurd/alpha/bits/sigcontext.h @@ -17,6 +17,10 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef _SIGNAL_H +# error "Never use directly; include instead." +#endif + /* Signal handlers are actually called: void handler (int sig, int code, struct sigcontext *scp); */ diff --git a/sysdeps/mach/hurd/hppa/bits/sigcontext.h b/sysdeps/mach/hurd/hppa/bits/sigcontext.h index f450125463..f0b4ff7a9b 100644 --- a/sysdeps/mach/hurd/hppa/bits/sigcontext.h +++ b/sysdeps/mach/hurd/hppa/bits/sigcontext.h @@ -17,6 +17,10 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef _SIGNAL_H +# error "Never use directly; include instead." +#endif + /* Signal handlers are actually called: void handler (int sig, int code, struct sigcontext *scp); */ diff --git a/sysdeps/mach/hurd/mips/bits/sigcontext.h b/sysdeps/mach/hurd/mips/bits/sigcontext.h index 64a57ab086..910618e32a 100644 --- a/sysdeps/mach/hurd/mips/bits/sigcontext.h +++ b/sysdeps/mach/hurd/mips/bits/sigcontext.h @@ -16,6 +16,10 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef _SIGNAL_H +# error "Never use directly; include instead." +#endif + /* Signal handlers are actually called: void handler (int sig, int code, struct sigcontext *scp); */ diff --git a/sysdeps/mips/bits/dlfcn.h b/sysdeps/mips/bits/dlfcn.h index 636da5662d..c105537dfd 100644 --- a/sysdeps/mips/bits/dlfcn.h +++ b/sysdeps/mips/bits/dlfcn.h @@ -17,8 +17,9 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef _BITS_DLFCN_H -#define _BITS_DLFCN_H 1 +#ifndef _DLFCN_H +# error "Never use directly; include instead." +#endif /* The MODE argument to `dlopen' contains one of the following: */ #define RTLD_LAZY 0x001 /* Lazy function call binding. */ @@ -33,10 +34,9 @@ __BEGIN_DECLS /* Some SGI specific calls that aren't implemented yet. */ -extern void *sgidladd __P ((const char *, int)); -extern void *sgidlopen_version __P ((const char *, int, const char *, int)); -extern char *sgigetdsoversion __P ((const char *)); +extern void *sgidladd __P ((__const char *, int)); +extern void *sgidlopen_version __P ((__const char *, int, __const char *, + int)); +extern char *sgigetdsoversion __P ((__const char *)); __END_DECLS - -#endif /* bits/dlfcn.h */ diff --git a/sysdeps/mips/bits/endian.h b/sysdeps/mips/bits/endian.h index ba555cd76e..40321a2866 100644 --- a/sysdeps/mips/bits/endian.h +++ b/sysdeps/mips/bits/endian.h @@ -1,4 +1,8 @@ /* The MIPS architecture has selectable endianness. This file is for a machine using big-endian mode. */ +#ifndef _ENDIAN_H +# error "Never use directly; include instead." +#endif + #define __BYTE_ORDER __BIG_ENDIAN diff --git a/sysdeps/mips/bits/setjmp.h b/sysdeps/mips/bits/setjmp.h index 7e570c6bff..ff3d75f821 100644 --- a/sysdeps/mips/bits/setjmp.h +++ b/sysdeps/mips/bits/setjmp.h @@ -1,6 +1,5 @@ /* Define the machine-dependent type `jmp_buf'. MIPS version. Copyright (C) 1992, 1993, 1995, 1997 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@zen.org). 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 @@ -17,6 +16,10 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef _SETJMP_H +# error "Never include directly; use instead." +#endif + typedef struct { /* Program counter. */ diff --git a/sysdeps/mips/dec/bits/endian.h b/sysdeps/mips/dec/bits/endian.h index 157bc44d06..0bdb378944 100644 --- a/sysdeps/mips/dec/bits/endian.h +++ b/sysdeps/mips/dec/bits/endian.h @@ -1,4 +1,8 @@ /* The MIPS architecture has selectable endianness. The DECstation uses little-endian mode. */ +#ifndef _ENDIAN_H +# error "Never use directly; include instead." +#endif + #define __BYTE_ORDER __LITTLE_ENDIAN diff --git a/sysdeps/mips/mips64/bits/setjmp.h b/sysdeps/mips/mips64/bits/setjmp.h index b108540505..9f08f4e1af 100644 --- a/sysdeps/mips/mips64/bits/setjmp.h +++ b/sysdeps/mips/mips64/bits/setjmp.h @@ -1,7 +1,6 @@ /* Define the machine-dependent type `jmp_buf'. MIPS version. Copyright (C) 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@zen.org). 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 @@ -18,6 +17,10 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef _SETJMP_H +# error "Never include directly; use instead." +#endif + typedef struct { /* Program counter. */ diff --git a/sysdeps/mips/mipsel/bits/endian.h b/sysdeps/mips/mipsel/bits/endian.h index 5da5965cb2..2241190a70 100644 --- a/sysdeps/mips/mipsel/bits/endian.h +++ b/sysdeps/mips/mipsel/bits/endian.h @@ -1,4 +1,8 @@ /* The MIPS architecture has selectable endianness. This file is for a machine using little-endian mode. */ +#ifndef _ENDIAN_H +# error "Never use directly; include instead." +#endif + #define __BYTE_ORDER __LITTLE_ENDIAN diff --git a/sysdeps/mips/p40/bits/endian.h b/sysdeps/mips/p40/bits/endian.h index e4b0119433..f6cdde2cb3 100644 --- a/sysdeps/mips/p40/bits/endian.h +++ b/sysdeps/mips/p40/bits/endian.h @@ -1,4 +1,8 @@ /* The MIPS has selectable endianness. The Japanese homebrew P40 architecture uses big-endian mode. */ +#ifndef _ENDIAN_H +# error "Never use directly; include instead." +#endif + #define __BYTE_ORDER __BIG_ENDIAN diff --git a/sysdeps/unix/bsd/osf/alpha/bits/stat.h b/sysdeps/unix/bsd/osf/alpha/bits/stat.h index ab0fa48f68..7084b4e534 100644 --- a/sysdeps/unix/bsd/osf/alpha/bits/stat.h +++ b/sysdeps/unix/bsd/osf/alpha/bits/stat.h @@ -1,6 +1,5 @@ /* Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@zen.org). 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 @@ -17,12 +16,9 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* - * Never include this file directly; use instead. - */ - -#ifndef _BITS_STAT_H -#define _BITS_STAT_H +#ifndef _SYS_STAT_H +# error "Never include directly; use instead." +#endif #include @@ -76,5 +72,3 @@ struct stat #define __S_IREAD 0400 /* Read by owner. */ #define __S_IWRITE 0200 /* Write by owner. */ #define __S_IEXEC 0100 /* Execute by owner. */ - -#endif /* bits/stat.h */ diff --git a/sysdeps/unix/bsd/osf/bits/sigaction.h b/sysdeps/unix/bsd/osf/bits/sigaction.h index 56e28a04fb..6bf030793e 100644 --- a/sysdeps/unix/bsd/osf/bits/sigaction.h +++ b/sysdeps/unix/bsd/osf/bits/sigaction.h @@ -18,6 +18,10 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef _SIGNAL_H +# error "Never include directly; use instead." +#endif + /* Structure describing the action to be taken when a signal arrives. */ struct sigaction { diff --git a/sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h b/sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h index 61481cc6a2..f637efa6cd 100644 --- a/sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h +++ b/sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h @@ -17,6 +17,10 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef _SIGNAL_H +# error "Never use directly; include instead." +#endif + struct sigcontext { int sc_onstack; diff --git a/sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h b/sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h index e1cdd416a1..29d2d87b26 100644 --- a/sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h +++ b/sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h @@ -17,6 +17,10 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef _SIGNAL_H +# error "Never use directly; include instead." +#endif + struct sigcontext { int sc_onstack; diff --git a/sysdeps/unix/bsd/sun/sunos4/bits/resource.h b/sysdeps/unix/bsd/sun/sunos4/bits/resource.h index f51262d92d..6978c87dd2 100644 --- a/sysdeps/unix/bsd/sun/sunos4/bits/resource.h +++ b/sysdeps/unix/bsd/sun/sunos4/bits/resource.h @@ -17,6 +17,10 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef _SYS_RESOURCE_H +# error "Never use directly; include instead." +#endif + /* These are the values for 4.4 BSD and GNU. Earlier BSD systems have a subset of these kinds of resource limit. In systems where `getrlimit' and `setrlimit' are not system calls, these are the values used by the C @@ -110,7 +114,8 @@ enum __rusage_who #define RUSAGE_CHILDREN RUSAGE_CHILDREN }; -#include /* For `struct timeval'. */ +#define __need_timeval +#include /* For `struct timeval'. */ /* Structure which says how much of each resource has been used. */ struct rusage diff --git a/sysdeps/unix/bsd/sun/sunos4/bits/termios.h b/sysdeps/unix/bsd/sun/sunos4/bits/termios.h index dc0a007208..15aaab795a 100644 --- a/sysdeps/unix/bsd/sun/sunos4/bits/termios.h +++ b/sysdeps/unix/bsd/sun/sunos4/bits/termios.h @@ -1,5 +1,5 @@ /* termios type and macro definitions. SunOS 4 version. - Copyright (C) 1993, 1994, 1996 Free Software Foundation, Inc. + Copyright (C) 1993, 1994, 1996, 1997 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 @@ -17,6 +17,10 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef _TERMIOS_H +# error "Never include directly; use instead." +#endif + /* Type of terminal control flag masks. */ typedef unsigned long int tcflag_t; @@ -41,51 +45,51 @@ struct termios #define IGNCR 0x0080 /* Ignore CR. */ #define ICRNL 0x0100 /* Map CR to NL on input. */ #ifdef __USE_BSD -#define IUCLC 0x0200 /* Map upper case to lower case on input. */ +# define IUCLC 0x0200 /* Map upper case to lower case on input. */ #endif #define IXON 0x0400 /* Enable start/stop output control. */ #define IXOFF 0x1000 /* Enable start/stop input control. */ #ifdef __USE_BSD -#define IXANY 0x0800 /* Any character will restart after stop. */ -#define IMAXBEL 0x2000 /* Ring bell when input queue is full. */ +# define IXANY 0x0800 /* Any character will restart after stop. */ +# define IMAXBEL 0x2000 /* Ring bell when input queue is full. */ #endif /* Output modes. */ tcflag_t c_oflag; #define OPOST 0x0001 /* Perform output processing. */ #ifdef __USE_BSD -#define OLCUC 0x00000002 /* Map lower case to upper case on output. */ -#define ONLCR 0x00000004 /* Map NL to CR-NL on output. */ -#define OCRNL 0x00000008 -#define ONOCR 0x00000010 -#define ONLRET 0x00000020 -#define OFILL 0x00000040 -#define OFDEL 0x00000080 -#define NLDLY 0x00000100 -#define NL0 0 -#define NL1 0x00000100 -#define CRDLY 0x00000600 -#define CR0 0 -#define CR1 0x00000200 -#define CR2 0x00000400 -#define CR3 0x00000600 -#define TABDLY 0x00001800 -#define TAB0 0 -#define TAB1 0x00000800 -#define TAB2 0x00001000 -#define XTABS 0x00001800 -#define TAB3 XTABS -#define BSDLY 0x00002000 -#define BS0 0 -#define BS1 0x00002000 -#define VTDLY 0x00004000 -#define VT0 0 -#define VT1 0x00004000 -#define FFDLY 0x00008000 -#define FF0 0 -#define FF1 0x00008000 -#define PAGEOUT 0x00010000 -#define WRAP 0x00020000 +# define OLCUC 0x00000002 /* Map lower case to upper case on output. */ +# define ONLCR 0x00000004 /* Map NL to CR-NL on output. */ +# define OCRNL 0x00000008 +# define ONOCR 0x00000010 +# define ONLRET 0x00000020 +# define OFILL 0x00000040 +# define OFDEL 0x00000080 +# define NLDLY 0x00000100 +# define NL0 0 +# define NL1 0x00000100 +# define CRDLY 0x00000600 +# define CR0 0 +# define CR1 0x00000200 +# define CR2 0x00000400 +# define CR3 0x00000600 +# define TABDLY 0x00001800 +# define TAB0 0 +# define TAB1 0x00000800 +# define TAB2 0x00001000 +# define XTABS 0x00001800 +# define TAB3 XTABS +# define BSDLY 0x00002000 +# define BS0 0 +# define BS1 0x00002000 +# define VTDLY 0x00004000 +# define VT0 0 +# define VT1 0x00004000 +# define FFDLY 0x00008000 +# define FF0 0 +# define FF1 0x00008000 +# define PAGEOUT 0x00010000 +# define WRAP 0x00020000 #endif /* Control modes. */ @@ -102,11 +106,11 @@ struct termios #define HUPCL 0x00000400 /* Hang up on last close. */ #define CLOCAL 0x00000800 /* Ignore modem status lines. */ #ifdef __USE_BSD -#define LOBLK 0x00001000 -#define CRTSCTS 0x80000000 -#define CIBAUD 0x000f0000 /* Mask for input speed from c_cflag. */ -#define CBAUD 0x0000000f /* Mask for output speed from c_cflag. */ -#define IBSHIFT 16 /* Bits to shift for input speed. */ +# define LOBLK 0x00001000 +# define CRTSCTS 0x80000000 +# define CIBAUD 0x000f0000 /* Mask for input speed from c_cflag. */ +# define CBAUD 0x0000000f /* Mask for output speed from c_cflag. */ +# define IBSHIFT 16 /* Bits to shift for input speed. */ #endif /* Input and output baud rates. These are encoded in c_cflag. */ @@ -127,29 +131,29 @@ struct termios #define B19200 14 #define B38400 15 #ifdef __USE_BSD -#define EXTA 14 -#define EXTB 15 +# define EXTA 14 +# define EXTB 15 #endif /* Local modes. */ tcflag_t c_lflag; #ifdef __USE_BSD -#define ECHOKE 0x00000800 /* Visual erase for KILL. */ +# define ECHOKE 0x00000800 /* Visual erase for KILL. */ #endif #define ECHOE 0x00000010 /* Visual erase for ERASE. */ #define ECHOK 0x00000020 /* Echo NL after KILL. */ #define ECHO 0x00000008 /* Enable echo. */ #define ECHONL 0x00000040 /* Echo NL even if ECHO is off. */ #ifdef __USE_BSD -#define ECHOPRT 0x00000400 /* Hardcopy visual erase. */ -#define ECHOCTL 0x00000200 /* Echo control characters as ^X. */ +# define ECHOPRT 0x00000400 /* Hardcopy visual erase. */ +# define ECHOCTL 0x00000200 /* Echo control characters as ^X. */ #endif #define ISIG 0x00000001 /* Enable signals. */ #define ICANON 0x00000002 /* Do erase and kill processing. */ #define IEXTEN 0x00008000 /* Enable DISCARD and LNEXT. */ #define TOSTOP 0x00000100 /* Send SIGTTOU for background output. */ #ifdef __USE_BSD -#define PENDIN 0x00004000 /* Retype pending input (state). */ +# define PENDIN 0x00004000 /* Retype pending input (state). */ #endif #define NOFLSH 0x00000080 /* Disable flush after interrupt. */ @@ -159,28 +163,28 @@ struct termios #define VEOF 4 /* End-of-file character [ICANON]. */ #define VEOL 5 /* End-of-line character [ICANON]. */ #ifdef __USE_BSD -#define VEOL2 6 /* Second EOL character [ICANON]. */ -#define VSWTCH 7 /* ??? */ +# define VEOL2 6 /* Second EOL character [ICANON]. */ +# define VSWTCH 7 /* ??? */ #endif #define VERASE 2 /* Erase character [ICANON]. */ #ifdef __USE_BSD -#define VWERASE 14 /* Word-erase character [ICANON]. */ +# define VWERASE 14 /* Word-erase character [ICANON]. */ #endif #define VKILL 3 /* Kill-line character [ICANON]. */ #ifdef __USE_BSD -#define VREPRINT 12 /* Reprint-line character [ICANON]. */ +# define VREPRINT 12 /* Reprint-line character [ICANON]. */ #endif #define VINTR 0 /* Interrupt character [ISIG]. */ #define VQUIT 1 /* Quit character [ISIG]. */ #define VSUSP 10 /* Suspend character [ISIG]. */ #ifdef __USE_BSD -#define VDSUSP 11 /* Delayed suspend character [ISIG]. */ +# define VDSUSP 11 /* Delayed suspend character [ISIG]. */ #endif #define VSTART 8 /* Start (X-ON) character [IXON, IXOFF]. */ #define VSTOP 9 /* Stop (X-OFF) character [IXON, IXOFF]. */ #ifdef __USE_BSD -#define VLNEXT 15 /* Literal-next character [IEXTEN]. */ -#define VDISCARD 13 /* Discard character [IEXTEN]. */ +# define VLNEXT 15 /* Literal-next character [IEXTEN]. */ +# define VDISCARD 13 /* Discard character [IEXTEN]. */ #endif #define VMIN VEOF /* Minimum number of bytes read at once [!ICANON]. */ #define VTIME VEOL /* Time-out value (tenths of a second) [!ICANON]. */ diff --git a/sysdeps/unix/bsd/sun/sunos4/bits/utsname.h b/sysdeps/unix/bsd/sun/sunos4/bits/utsname.h index e9111b6504..5a03bab0c2 100644 --- a/sysdeps/unix/bsd/sun/sunos4/bits/utsname.h +++ b/sysdeps/unix/bsd/sun/sunos4/bits/utsname.h @@ -1,2 +1,24 @@ +/* Copyright (C) 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _UTSNAME_H +# error "Never include directly; use instead." +#endif + #define _UTSNAME_LENGTH 9 #define _UTSNAME_NODENAME_LENGTH 65 diff --git a/sysdeps/unix/bsd/ultrix4/bits/utsname.h b/sysdeps/unix/bsd/ultrix4/bits/utsname.h index ad4389ab02..a9f36ab3d1 100644 --- a/sysdeps/unix/bsd/ultrix4/bits/utsname.h +++ b/sysdeps/unix/bsd/ultrix4/bits/utsname.h @@ -1 +1,23 @@ +/* Copyright (C) 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _UTSNAME_H +# error "Never include directly; use instead." +#endif + #define _UTSNAME_LENGTH 32 diff --git a/sysdeps/unix/bsd/ultrix4/mips/bits/sigcontext.h b/sysdeps/unix/bsd/ultrix4/mips/bits/sigcontext.h index 72b29e5649..cb66517eef 100644 --- a/sysdeps/unix/bsd/ultrix4/mips/bits/sigcontext.h +++ b/sysdeps/unix/bsd/ultrix4/mips/bits/sigcontext.h @@ -1,6 +1,5 @@ /* Copyright (C) 1992, 1994, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@zen.org). 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 @@ -17,6 +16,10 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef _SIGNAL_H +# error "Never use directly; include instead." +#endif + /* Note that ANY change to this instantly implies a change to __handler.S. */ struct sigcontext diff --git a/sysdeps/unix/sysv/irix4/bits/confname.h b/sysdeps/unix/sysv/irix4/bits/confname.h index c185f22adf..89fca07fe5 100644 --- a/sysdeps/unix/sysv/irix4/bits/confname.h +++ b/sysdeps/unix/sysv/irix4/bits/confname.h @@ -17,6 +17,10 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef _UNISTD_H +# error "Never use directly; include instead." +#endif + /* Values for the NAME argument to `pathconf' and `fpathconf'. */ enum { diff --git a/sysdeps/unix/sysv/irix4/bits/stat.h b/sysdeps/unix/sysv/irix4/bits/stat.h index 0dab45cfa0..633f2618ec 100644 --- a/sysdeps/unix/sysv/irix4/bits/stat.h +++ b/sysdeps/unix/sysv/irix4/bits/stat.h @@ -16,12 +16,9 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* - * Never include this file directly; use instead. - */ - -#ifndef _BITS_STAT_H -#define _BITS_STAT_H 1 +#ifndef _SYS_STAT_H +# error "Never include directly; use instead." +#endif struct stat { @@ -61,5 +58,3 @@ struct stat #define __S_IREAD 0400 /* Read by owner. */ #define __S_IWRITE 0200 /* Write by owner. */ #define __S_IEXEC 0100 /* Execute by owner. */ - -#endif /* bits/stat.h */ diff --git a/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h b/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h index 8a14f99f43..dcbf9f4402 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h @@ -16,12 +16,9 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* - * Never include this file directly; use instead. - */ - -#ifndef _BITS_IOCTLS_H -#define _BITS_IOCTLS_H 1 +#ifndef _SYS_IOCTL_H +# error "Never use directly; include instead." +#endif /* Use the definitions from the kernel header files. */ #include @@ -39,5 +36,3 @@ #define TCSETSF _IOW ('t', 22, struct __kernel_termios) #include - -#endif /* bits/ioctls.h */ diff --git a/sysdeps/unix/sysv/linux/alpha/bits/ipc.h b/sysdeps/unix/sysv/linux/alpha/bits/ipc.h index 57830daae1..ec116f6114 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/ipc.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/ipc.h @@ -1,6 +1,5 @@ /* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. - Contributed by Ulrich Drepper , August 1995. 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 @@ -17,10 +16,9 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef _SYS_IPC_BUF_H - -#define _SYS_IPC_BUF_H 1 -#include +#ifndef _SYS_IPC_H +# error "Never use directly; include instead." +#endif #include @@ -35,9 +33,6 @@ #define IPC_STAT 2 /* Get `ipc_perm' options. */ #define IPC_INFO 3 /* See ipcs. */ - -__BEGIN_DECLS - /* Special key values. */ #define IPC_PRIVATE ((__key_t) 0) /* Private key. */ @@ -63,10 +58,14 @@ struct ipc_kludge long int msgtyp; }; +__BEGIN_DECLS + /* The actual system call: all functions are multiplexed by this. */ extern int __ipc __P ((int __call, int __first, int __second, int __third, void *__ptr)); +__END_DECLS + /* The codes for the functions to use the multiplexer `__ipc'. */ #define IPCOP_semop 1 #define IPCOP_semget 2 @@ -79,7 +78,3 @@ extern int __ipc __P ((int __call, int __first, int __second, int __third, #define IPCOP_shmdt 22 #define IPCOP_shmget 23 #define IPCOP_shmctl 24 - -__END_DECLS - -#endif /* _SYS_IPC_BUF_H */ diff --git a/sysdeps/unix/sysv/linux/alpha/bits/mman.h b/sysdeps/unix/sysv/linux/alpha/bits/mman.h index 1bef0cb525..081a00441e 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/mman.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/mman.h @@ -1,4 +1,4 @@ -/* Definitions for POSIX memory map inerface. Linux/Alpha version. +/* Definitions for POSIX memory map interface. Linux/Alpha version. Copyright (C) 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -18,7 +18,7 @@ Boston, MA 02111-1307, USA. */ #ifndef _SYS_MMAN_H -# error "Never include this file directly. Use instead" +# error "Never use directly; include instead." #endif /* The following definitions basically come from the kernel headers. diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h index f28b6f256c..274531f270 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h @@ -17,6 +17,10 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef _SIGNAL_H +# error "Never include directly; use instead." +#endif + /* Structure describing the action to be taken when a signal arrives. */ struct sigaction { diff --git a/sysdeps/unix/sysv/linux/alpha/bits/stat.h b/sysdeps/unix/sysv/linux/alpha/bits/stat.h index de8752ea8b..319ff96c51 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/stat.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/stat.h @@ -16,12 +16,9 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* - * Never include this file directly; use instead. - */ - -#ifndef _BITS_STAT_H -#define _BITS_STAT_H 1 +#ifndef _SYS_STAT_H +# error "Never include directly; use instead." +#endif /* Versions of the `struct stat' data structure. */ #define _STAT_VER_KERNEL 0 @@ -112,5 +109,3 @@ struct stat64 #define __S_IREAD 0400 /* Read by owner. */ #define __S_IWRITE 0200 /* Write by owner. */ #define __S_IEXEC 0100 /* Execute by owner. */ - -#endif /* bits/stat.h */ diff --git a/sysdeps/unix/sysv/linux/alpha/bits/termios.h b/sysdeps/unix/sysv/linux/alpha/bits/termios.h index d0932c1cd7..0d57c489d9 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/termios.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/termios.h @@ -17,8 +17,9 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef _TERMBITS_H -#define _TERMBITS_H 1 +#ifndef _TERMIOS_H +# error "Never include directly; use instead." +#endif typedef unsigned char cc_t; typedef unsigned int speed_t; @@ -189,5 +190,3 @@ struct termios #define _IOT_termios /* Hurd ioctl type field. */ \ _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2) - -#endif /* _TERMBITS_H */ diff --git a/sysdeps/unix/sysv/linux/alpha/bits/time.h b/sysdeps/unix/sysv/linux/alpha/bits/time.h index 7475b68f5b..d32f4d30e9 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/time.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/time.h @@ -21,23 +21,9 @@ * Never include this file directly; use instead. */ -#ifdef __need_timeval -# undef __need_timeval -# ifndef _STRUCT_TIMEVAL -# define _STRUCT_TIMEVAL 1 -/* A time value that is accurate to the nearest - microsecond but also has a range of years. */ -struct timeval - { - int tv_sec; /* Seconds. */ - int tv_usec; /* Microseconds. */ - }; -# endif /* struct timeval */ -#endif /* need timeval */ - - -#ifndef _BITS_TIME_H -#define _BITS_TIME_H 1 +#ifndef __need_timeval +# ifndef _BITS_TIME_H +# define _BITS_TIME_H 1 /* ISO/IEC 9899:1990 7.12.1: The macro `CLOCKS_PER_SEC' is the number per second of the value @@ -45,10 +31,23 @@ struct timeval /* CAE XSH, Issue 4, Version 2: The value of CLOCKS_PER_SEC is required to be 1 million on all XSI-conformant systems. */ -# define CLOCKS_PER_SEC 1000000 +# define CLOCKS_PER_SEC 1000000 /* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK presents the real value for clock ticks per second for the system. */ -# define CLK_TCK 1024 +# define CLK_TCK 1024 -#endif /* bits/time.h */ +# endif /* bits/time.h */ +#endif /* !__need_timeval */ + + +#ifndef _STRUCT_TIMEVAL +# define _STRUCT_TIMEVAL 1 +/* A time value that is accurate to the nearest + microsecond but also has a range of years. */ +struct timeval + { + int tv_sec; /* Seconds. */ + int tv_usec; /* Microseconds. */ + }; +#endif /* struct timeval */ diff --git a/sysdeps/unix/sysv/linux/m68k/bits/mman.h b/sysdeps/unix/sysv/linux/m68k/bits/mman.h index d6c29d2176..bca1dae960 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/mman.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/mman.h @@ -1,4 +1,4 @@ -/* Definitions for POSIX memory map inerface. Linux/m68k version. +/* Definitions for POSIX memory map interface. Linux/m68k version. Copyright (C) 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -18,7 +18,7 @@ Boston, MA 02111-1307, USA. */ #ifndef _SYS_MMAN_H -# error "Never include this file directly. Use instead" +# error "Never use directly; include instead." #endif /* The following definitions basically come from the kernel headers. diff --git a/sysdeps/unix/sysv/linux/m68k/bits/poll.h b/sysdeps/unix/sysv/linux/m68k/bits/poll.h index 8fea43924a..2d4e6f6f01 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/poll.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/poll.h @@ -16,6 +16,9 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef _SYS_POLL_H +# error "Never use directly; include instead." +#endif /* Event types that can be polled for. These bits may be set in `events' to indicate the interesting event types; they will appear in `revents' diff --git a/sysdeps/unix/sysv/linux/mips/bits/endian.h b/sysdeps/unix/sysv/linux/mips/bits/endian.h index 9f60758f36..0a3d2fabe3 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/endian.h +++ b/sysdeps/unix/sysv/linux/mips/bits/endian.h @@ -3,10 +3,14 @@ want to be able to share the installed headerfiles between both, so we define __BYTE_ORDER based on GCC's predefines. */ +#ifndef _ENDIAN_H +# error "Never use directly; include instead." +#endif + #ifdef __MIPSEB__ -#define __BYTE_ORDER __BIG_ENDIAN +# define __BYTE_ORDER __BIG_ENDIAN #else -#ifdef __MIPSEL__ -#define __BYTE_ORDER __LITTLE_ENDIAN -#endif +# ifdef __MIPSEL__ +# define __BYTE_ORDER __LITTLE_ENDIAN +# endif #endif diff --git a/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h b/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h index 486022e6d9..4f5c2b0d3e 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h +++ b/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h @@ -17,12 +17,9 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* - * Never include this file directly; use instead. - */ - -#ifndef _BITS_IOCTL_TYPES_H -#define _BITS_IOCTL_TYPES_H 1 +#ifndef _SYS_IOCTL_H +# error "Never use directly; include instead." +#endif /* Get definition of constants for use with `ioctl'. */ #include @@ -67,5 +64,3 @@ struct termio #define N_PPP 3 #define N_STRIP 4 #define N_AX25 5 - -#endif /* bits/ioctl-types.h */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/ipc.h b/sysdeps/unix/sysv/linux/mips/bits/ipc.h index c5a3cd0049..2841e6a5e2 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/ipc.h +++ b/sysdeps/unix/sysv/linux/mips/bits/ipc.h @@ -1,6 +1,5 @@ /* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. - Contributed by Ulrich Drepper , August 1995. 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 @@ -17,10 +16,9 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef _SYS_IPC_BUF_H - -#define _SYS_IPC_BUF_H 1 -#include +#ifndef _SYS_IPC_H +# error "Never use directly; include instead." +#endif #include @@ -36,8 +34,6 @@ #define IPC_INFO 3 /* See ipcs. */ -__BEGIN_DECLS - /* Special key values. */ #define IPC_PRIVATE ((__key_t) 0) /* Private key. */ @@ -46,11 +42,11 @@ __BEGIN_DECLS struct ipc_perm { __key_t __key; /* Key. */ - long uid; /* Owner's user ID. */ - long gid; /* Owner's group ID. */ - long cuid; /* Creator's user ID. */ - long cgid; /* Creator's group ID. */ - unsigned long mode; /* Read/write permission. */ + long int uid; /* Owner's user ID. */ + long int gid; /* Owner's group ID. */ + long int cuid; /* Creator's user ID. */ + long int cgid; /* Creator's group ID. */ + unsigned long int mode; /* Read/write permission. */ unsigned short int __seq; /* Sequence number. */ }; @@ -63,10 +59,14 @@ struct ipc_kludge long int msgtyp; }; +__BEGIN_DECLS + /* The actual system call: all functions are multiplexed by this. */ extern int __ipc __P ((int __call, int __first, int __second, int __third, void *__ptr)); +__END_DECLS + /* The codes for the functions to use the multiplexer `__ipc'. */ #define IPCOP_semop 1 #define IPCOP_semget 2 @@ -79,7 +79,3 @@ extern int __ipc __P ((int __call, int __first, int __second, int __third, #define IPCOP_shmdt 22 #define IPCOP_shmget 23 #define IPCOP_shmctl 24 - -__END_DECLS - -#endif /* bits/ipc_buf.h */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/mman.h b/sysdeps/unix/sysv/linux/mips/bits/mman.h index 15a343ff76..be460ab6c6 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/mman.h +++ b/sysdeps/unix/sysv/linux/mips/bits/mman.h @@ -1,4 +1,4 @@ -/* Definitions for POSIX memory map inerface. Linux/PowerPC version. +/* Definitions for POSIX memory map interface. Linux/PowerPC version. Copyright (C) 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -18,7 +18,7 @@ Boston, MA 02111-1307, USA. */ #ifndef _SYS_MMAN_H -# error "Never include this file directly. Use instead" +# error "Never use directly; include instead." #endif /* The following definitions basically come from the kernel headers. diff --git a/sysdeps/unix/sysv/linux/mips/bits/poll.h b/sysdeps/unix/sysv/linux/mips/bits/poll.h index c1c9a6b392..9b7826af6c 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/poll.h +++ b/sysdeps/unix/sysv/linux/mips/bits/poll.h @@ -16,6 +16,9 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef _SYS_POLL_H +# error "Never use directly; include instead." +#endif /* Event types that can be polled for. These bits may be set in `events' to indicate the interesting event types; they will appear in `revents' diff --git a/sysdeps/unix/sysv/linux/mips/bits/shm.h b/sysdeps/unix/sysv/linux/mips/bits/shm.h index 9d4b20bb53..20e75e009b 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/shm.h +++ b/sysdeps/unix/sysv/linux/mips/bits/shm.h @@ -1,6 +1,5 @@ /* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. - Contributed by Ulrich Drepper , August 1995. 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 @@ -17,10 +16,9 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef _SYS_SHM_BUF_H - -#define _SYS_SHM_BUF_H 1 -#include +#ifndef _SYS_SHM_H +# error "Never include directly; use instead." +#endif #include @@ -38,55 +36,49 @@ #define SHM_UNLOCK 12 /* unlock segment (root only) */ -__BEGIN_DECLS - /* Data structure describing a set of semaphores. */ struct shmid_ds -{ - struct ipc_perm shm_perm; /* operation permission struct */ - int shm_segsz; /* size of segment in bytes */ - __time_t shm_atime; /* time of last shmat() */ - __time_t shm_dtime; /* time of last shmdt() */ - __time_t shm_ctime; /* time of last change by shmctl() */ - long shm_cpid; /* pid of creator */ - long shm_lpid; /* pid of last shmop */ - unsigned short int shm_nattch; /* number of current attaches */ - unsigned short int __shm_npages; /* size of segment (pages) */ - unsigned long int *__shm_pages; /* array of ptrs to frames -> SHMMAX */ - struct vm_area_struct *__attaches; /* descriptors for attaches */ -}; + { + struct ipc_perm shm_perm; /* operation permission struct */ + int shm_segsz; /* size of segment in bytes */ + __time_t shm_atime; /* time of last shmat() */ + __time_t shm_dtime; /* time of last shmdt() */ + __time_t shm_ctime; /* time of last change by shmctl() */ + long int shm_cpid; /* pid of creator */ + long int shm_lpid; /* pid of last shmop */ + unsigned short int shm_nattch; /* number of current attaches */ + unsigned short int __shm_npages; /* size of segment (pages) */ + unsigned long int *__shm_pages; /* array of ptrs to frames -> SHMMAX */ + struct vm_area_struct *__attaches; /* descriptors for attaches */ + }; #ifdef __USE_MISC /* ipcs ctl commands */ -#define SHM_STAT 13 -#define SHM_INFO 14 +# define SHM_STAT 13 +# define SHM_INFO 14 /* shm_mode upper byte flags */ -#define SHM_DEST 01000 /* segment will be destroyed on last detach */ -#define SHM_LOCKED 02000 /* segment will not be swapped */ +# define SHM_DEST 01000 /* segment will be destroyed on last detach */ +# define SHM_LOCKED 02000 /* segment will not be swapped */ struct shminfo -{ - int shmmax; - int shmmin; - int shmmni; - int shmseg; - int shmall; -}; + { + int shmmax; + int shmmin; + int shmmni; + int shmseg; + int shmall; + }; struct shm_info -{ - int used_ids; - ulong shm_tot; /* total allocated shm */ - ulong shm_rss; /* total resident shm */ - ulong shm_swp; /* total swapped shm */ - ulong swap_attempts; - ulong swap_successes; -}; + { + int used_ids; + ulong shm_tot; /* total allocated shm */ + ulong shm_rss; /* total resident shm */ + ulong shm_swp; /* total swapped shm */ + ulong swap_attempts; + ulong swap_successes; + }; #endif /* __USE_MISC */ - -__END_DECLS - -#endif /* bits/shm_buf.h */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h index d6f70f2a2e..71ca8846eb 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h +++ b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h @@ -17,6 +17,10 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef _SIGNAL_H +# error "Never include directly; use instead." +#endif + /* Structure describing the action to be taken when a signal arrives. */ struct sigaction { @@ -33,7 +37,7 @@ struct sigaction /* Restore handler. */ void (*sa_restorer) __P ((void)); -#if (_MIPS_ISA == _MIPS_ISA_MIPS1) || (_MIPS_ISA == _MIPS_ISA_MIPS2) +#if _MIPS_ISA == _MIPS_ISA_MIPS1 || _MIPS_ISA == _MIPS_ISA_MIPS2 int sa_resv[1]; #endif }; diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h index 02f1d22a6c..f56f6269db 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/socket.h +++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h @@ -17,19 +17,14 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef _SYS_SOCKET_H -#error "Never include directly; use instead." +#ifndef _SYS_STAT_H +# error "Never include directly; use instead." #endif - -#include - #define __need_size_t #define __need_NULL #include -__BEGIN_DECLS - /* Type for length arguments in socket calls. */ typedef unsigned int socklen_t; @@ -173,5 +168,3 @@ struct linger int l_onoff; /* Nonzero to linger on close. */ int l_linger; /* Time to linger. */ }; - -__END_DECLS diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h index f27a75eb9a..cd586d4433 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/stat.h +++ b/sysdeps/unix/sysv/linux/mips/bits/stat.h @@ -16,12 +16,9 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* - * Never include this file directly; use instead. - */ - -#ifndef _BITS_STAT_H -#define _BITS_STAT_H 1 +#ifndef _SYS_STAT_H +# error "Never include directly; use instead." +#endif /* Versions of the `struct stat' data structure. */ #define _STAT_VER_LINUX_OLD 1 @@ -140,5 +137,3 @@ struct stat64 #define __S_IREAD 0400 /* Read by owner. */ #define __S_IWRITE 0200 /* Write by owner. */ #define __S_IEXEC 0100 /* Execute by owner. */ - -#endif /* bits/stat.h */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/statfs.h b/sysdeps/unix/sysv/linux/mips/bits/statfs.h index 2727b27257..36d9996a69 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/statfs.h +++ b/sysdeps/unix/sysv/linux/mips/bits/statfs.h @@ -16,12 +16,9 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* - * Never include this file directly; use instead. - */ - -#ifndef _BITS_STATFS_H -#define _BITS_STATFS_H +#ifndef _SYS_STATFS_H +# error "Never include directly; use instead." +#endif #include /* for __fsid_t and __fsblkcnt_t*/ @@ -70,5 +67,3 @@ struct statfs64 long int f_spare[6]; }; #endif - -#endif /* bits/statfs.h */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/termios.h b/sysdeps/unix/sysv/linux/mips/bits/termios.h index c8a24694d9..de21ee1775 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/termios.h +++ b/sysdeps/unix/sysv/linux/mips/bits/termios.h @@ -17,20 +17,16 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* - * Never include this file directly; use instead. - */ - - -#ifndef _BITS_TERMIOS_H -#define _BITS_TERMIOS_H 1 +#ifndef _TERMIOS_H +# error "Never include directly; use instead." +#endif typedef unsigned char cc_t; typedef unsigned int speed_t; typedef unsigned int tcflag_t; -#if defined __USE_BSD +#ifdef __USE_BSD struct sgttyb { @@ -83,10 +79,10 @@ struct termios #define VKILL 3 /* Kill-line character [ICANON]. */ #define VMIN 4 /* Minimum number of bytes read at once [!ICANON]. */ #define VTIME 5 /* Time-out value (tenths of a second) [!ICANON]. */ -#if defined (__USE_BSD) -#define VEOL2 6 /* Second EOL character [ICANON]. */ +#ifdef __USE_BSD +# define VEOL2 6 /* Second EOL character [ICANON]. */ /* The next two are guesses ... */ -#define VSWTC 7 /* ??? */ +# define VSWTC 7 /* ??? */ #endif #define VSWTCH VSWTC #define VSTART 8 /* Start (X-ON) character [IXON, IXOFF]. */ @@ -96,17 +92,17 @@ struct termios /* * VDSUSP is not supported */ -#if defined (__USE_BSD) +#if defined __USE_BSD #define VDSUSP 11 /* Delayed suspend character [ISIG]. */ #endif #endif -#if defined (__USE_BSD) -#define VREPRINT 12 /* Reprint-line character [ICANON]. */ +#ifdef __USE_BSD +# define VREPRINT 12 /* Reprint-line character [ICANON]. */ #endif -#if defined (__USE_BSD) -#define VDISCARD 13 /* Discard character [IEXTEN]. */ -#define VWERASE 14 /* Word-erase character [ICANON]. */ -#define VLNEXT 15 /* Literal-next character [IEXTEN]. */ +#ifdef __USE_BSD +# define VDISCARD 13 /* Discard character [IEXTEN]. */ +# define VWERASE 14 /* Word-erase character [ICANON]. */ +# define VLNEXT 15 /* Literal-next character [IEXTEN]. */ #endif #define VEOF 16 /* End-of-file character [ICANON]. */ #define VEOL 17 /* End-of-line character [ICANON]. */ @@ -121,51 +117,51 @@ struct termios #define INLCR 0000100 /* Map NL to CR on input. */ #define IGNCR 0000200 /* Ignore CR. */ #define ICRNL 0000400 /* Map CR to NL on input. */ -#if defined (__USE_BSD) -#define IUCLC 0001000 /* Map upper case to lower case on input. */ +#ifdef __USE_BSD +# define IUCLC 0001000 /* Map upper case to lower case on input. */ #endif #define IXON 0002000 /* Enable start/stop output control. */ -#if defined (__USE_BSD) -#define IXANY 0004000 /* Any character will restart after stop. */ +#ifdef __USE_BSD +# define IXANY 0004000 /* Any character will restart after stop. */ #endif #define IXOFF 0010000 /* Enable start/stop input control. */ -#if defined (__USE_BSD) -#define IMAXBEL 0020000 /* Ring bell when input queue is full. */ +#ifdef __USE_BSD +# define IMAXBEL 0020000 /* Ring bell when input queue is full. */ #endif /* c_oflag bits */ #define OPOST 0000001 /* Perform output processing. */ -#if defined (__USE_BSD) -#define OLCUC 0000002 /* Map lower case to upper case on output. */ -#define ONLCR 0000004 /* Map NL to CR-NL on output. */ -#define OCRNL 0000010 -#define ONOCR 0000020 -#define ONLRET 0000040 -#define OFILL 0000100 -#define OFDEL 0000200 -#define NLDLY 0000400 -#define NL0 0000000 -#define NL1 0000400 -#define CRDLY 0003000 -#define CR0 0000000 -#define CR1 0001000 -#define CR2 0002000 -#define CR3 0003000 -#define TABDLY 0014000 -#define TAB0 0000000 -#define TAB1 0004000 -#define TAB2 0010000 -#define TAB3 0014000 -#define XTABS 0014000 -#define BSDLY 0020000 -#define BS0 0000000 -#define BS1 0020000 -#define VTDLY 0040000 -#define VT0 0000000 -#define VT1 0040000 -#define FFDLY 0100000 -#define FF0 0000000 -#define FF1 0100000 +#ifdef __USE_BSD +# define OLCUC 0000002 /* Map lower case to upper case on output. */ +# define ONLCR 0000004 /* Map NL to CR-NL on output. */ +# define OCRNL 0000010 +# define ONOCR 0000020 +# define ONLRET 0000040 +# define OFILL 0000100 +# define OFDEL 0000200 +# define NLDLY 0000400 +# define NL0 0000000 +# define NL1 0000400 +# define CRDLY 0003000 +# define CR0 0000000 +# define CR1 0001000 +# define CR2 0002000 +# define CR3 0003000 +# define TABDLY 0014000 +# define TAB0 0000000 +# define TAB1 0004000 +# define TAB2 0010000 +# define TAB3 0014000 +# define XTABS 0014000 +# define BSDLY 0020000 +# define BS0 0000000 +# define BS1 0020000 +# define VTDLY 0040000 +# define VT0 0000000 +# define VT1 0040000 +# define FFDLY 0100000 +# define FF0 0000000 +# define FF1 0100000 /* #define PAGEOUT ??? #define WRAP ??? @@ -203,14 +199,14 @@ struct termios #define PARODD 0001000 /* Odd parity instead of even. */ #define HUPCL 0002000 /* Hang up on last close. */ #define CLOCAL 0004000 /* Ignore modem status lines. */ -#if defined (__USE_BSD) -#define CBAUDEX 0010000 -#define B57600 0010001 -#define B115200 0010002 -#define B230400 0010003 -#define B460800 0010004 -#define CIBAUD 002003600000 /* input baud rate (not used) */ -#define CRTSCTS 020000000000 /* flow control */ +#ifdef __USE_BSD +# define CBAUDEX 0010000 +# define B57600 0010001 +# define B115200 0010002 +# define B230400 0010003 +# define B460800 0010004 +# define CIBAUD 002003600000 /* input baud rate (not used) */ +# define CRTSCTS 020000000000 /* flow control */ #endif /* c_lflag bits */ @@ -223,14 +219,14 @@ struct termios #define ECHONL 0000100 /* Echo NL even if ECHO is off. */ #define NOFLSH 0000200 /* Disable flush after interrupt. */ #define IEXTEN 0000400 /* Enable DISCARD and LNEXT. */ -#if defined (__USE_BSD) -#define ECHOCTL 0001000 /* Echo control characters as ^X. */ -#define ECHOPRT 0002000 /* Hardcopy visual erase. */ -#define ECHOKE 0004000 /* Visual erase for KILL. */ +#ifdef __USE_BSD +# define ECHOCTL 0001000 /* Echo control characters as ^X. */ +# define ECHOPRT 0002000 /* Hardcopy visual erase. */ +# define ECHOKE 0004000 /* Visual erase for KILL. */ #endif #define FLUSHO 0020000 -#if defined (__USE_BSD) -#define PENDIN 0040000 /* Retype pending input (state). */ +#ifdef __USE_BSD +# define PENDIN 0040000 /* Retype pending input (state). */ #endif #define TOSTOP 0100000 /* Send SIGTTOU for background output. */ #define ITOSTOP TOSTOP @@ -256,5 +252,3 @@ struct termios #define _IOT_termios /* Hurd ioctl type field. */ \ _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2) - -#endif /* bits/termios.h */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/time.h b/sysdeps/unix/sysv/linux/mips/bits/time.h index 5fcef0fb8c..a7b268d0f8 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/time.h +++ b/sysdeps/unix/sysv/linux/mips/bits/time.h @@ -21,23 +21,9 @@ * Never include this file directly; use instead. */ -#ifdef __need_timeval -# undef __need_timeval -# ifndef _STRUCT_TIMEVAL -# define _STRUCT_TIMEVAL 1 -/* A time value that is accurate to the nearest - microsecond but also has a range of years. */ -struct timeval - { - long tv_sec; /* Seconds. */ - long tv_usec; /* Microseconds. */ - }; -# endif /* struct timeval */ -#endif /* need timeval */ - - -#ifndef _BITS_TIME_H -#define _BITS_TIME_H 1 +#ifndef __need_timeval +# ifndef _BITS_TIME_H +# define _BITS_TIME_H 1 /* ISO/IEC 9899:1990 7.12.1: The macro `CLOCKS_PER_SEC' is the number per second of the value @@ -45,10 +31,22 @@ struct timeval /* CAE XSH, Issue 4, Version 2: The value of CLOCKS_PER_SEC is required to be 1 million on all XSI-conformant systems. */ -# define CLOCKS_PER_SEC 1000000 +# define CLOCKS_PER_SEC 1000000 /* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK presents the real value for clock ticks per second for the system. */ -# define CLK_TCK 100 /* XXX not correct for all systems. */ +# define CLK_TCK 100 /* XXX not correct for all systems. */ -#endif /* bits/time.h */ +# endif /* bits/time.h */ +#endif + +#ifndef _STRUCT_TIMEVAL +# define _STRUCT_TIMEVAL 1 +/* A time value that is accurate to the nearest + microsecond but also has a range of years. */ +struct timeval + { + long int tv_sec; /* Seconds. */ + long int tv_usec; /* Microseconds. */ + }; +#endif /* struct timeval */ diff --git a/sysdeps/unix/sysv/minix/bits/sigaction.h b/sysdeps/unix/sysv/minix/bits/sigaction.h index 732befc630..96f14d17af 100644 --- a/sysdeps/unix/sysv/minix/bits/sigaction.h +++ b/sysdeps/unix/sysv/minix/bits/sigaction.h @@ -16,6 +16,10 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef _SIGNAL_H +# error "Never include directly; use instead." +#endif + /* Structure describing the action to be taken when a signal arrives. */ struct sigaction { diff --git a/sysdeps/unix/sysv/sco3.2.4/bits/confname.h b/sysdeps/unix/sysv/sco3.2.4/bits/confname.h index 3af9377ded..3c549dd4b3 100644 --- a/sysdeps/unix/sysv/sco3.2.4/bits/confname.h +++ b/sysdeps/unix/sysv/sco3.2.4/bits/confname.h @@ -17,6 +17,10 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef _UNISTD_H +# error "Never use directly; include instead." +#endif + /* Values for the NAME argument to `pathconf' and `fpathconf'. */ #define _PC_LINK_MAX 0 #define _PC_MAX_CANON 1 diff --git a/sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h b/sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h index f66877da0b..eaa52bee2f 100644 --- a/sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h +++ b/sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h @@ -17,6 +17,10 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef _SIGNAL_H +# error "Never include directly; use instead." +#endif + /* Structure describing the action to be taken when a signal arrives. */ struct sigaction { diff --git a/sysdeps/unix/sysv/sysv4/bits/sigaction.h b/sysdeps/unix/sysv/sysv4/bits/sigaction.h index ce3ab5e60c..07d5554921 100644 --- a/sysdeps/unix/sysv/sysv4/bits/sigaction.h +++ b/sysdeps/unix/sysv/sysv4/bits/sigaction.h @@ -17,6 +17,10 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef _SIGNAL_H +# error "Never include directly; use instead." +#endif + /* Structure describing the action to be taken when a signal arrives. */ struct sigaction { diff --git a/sysdeps/unix/sysv/sysv4/bits/utsname.h b/sysdeps/unix/sysv/sysv4/bits/utsname.h index 9dcc618068..bf2c0a8da5 100644 --- a/sysdeps/unix/sysv/sysv4/bits/utsname.h +++ b/sysdeps/unix/sysv/sysv4/bits/utsname.h @@ -1 +1,23 @@ +/* Copyright (C) 1995, 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _UTSNAME_H +# error "Never include directly; use instead." +#endif + #define _UTSNAME_LENGTH 257 diff --git a/sysdeps/unix/sysv/sysv4/bits/waitflags.h b/sysdeps/unix/sysv/sysv4/bits/waitflags.h index 29ff566342..e99dc00511 100644 --- a/sysdeps/unix/sysv/sysv4/bits/waitflags.h +++ b/sysdeps/unix/sysv/sysv4/bits/waitflags.h @@ -19,7 +19,7 @@ Boston, MA 02111-1307, USA. */ #ifndef _SYS_WAIT_H -#error "Never use directly; include instead." +# error "Never include directly; use instead." #endif @@ -28,7 +28,7 @@ #define WUNTRACED 4 /* Report status of stopped children. */ #ifdef __USE_SVID -#define WEXITED 1 /* Look for children that have exited. */ -#define WTRAPPED 2 /* Look for processes that stopped +# define WEXITED 1 /* Look for children that have exited. */ +# define WTRAPPED 2 /* Look for processes that stopped while tracing. */ #endif diff --git a/sysdeps/unix/sysv/sysv4/i386/bits/stat.h b/sysdeps/unix/sysv/sysv4/i386/bits/stat.h index f3f4473032..104ad2f247 100644 --- a/sysdeps/unix/sysv/sysv4/i386/bits/stat.h +++ b/sysdeps/unix/sysv/sysv4/i386/bits/stat.h @@ -1,6 +1,5 @@ /* Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@zen.org). 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 @@ -17,12 +16,9 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* - * Never include this file directly; use instead. - */ - -#ifndef _BITS_STAT_H -#define _BITS_STAT_H 1 +#ifndef _SYS_STAT_H +# error "Never include directly; use instead." +#endif #include @@ -34,37 +30,37 @@ /* Structure describing file characteristics. */ struct stat { - unsigned long st_dev; /* Device. */ - long st_filler1[3]; - unsigned long st_ino; /* File serial number. */ - unsigned long st_mode; /* File mode. */ - unsigned long st_nlink; /* Link count. */ - long st_uid; /* User ID of the file's owner. */ - long st_gid; /* Group ID of the file's group.*/ - unsigned long st_rdev; /* Device number, if device. */ - long st_filler2[2]; - - long st_size; /* Size of file, in bytes. */ + unsigned long itn st_dev; /* Device. */ + long int st_filler1[3]; + unsigned long int st_ino; /* File serial number. */ + unsigned long int st_mode; /* File mode. */ + unsigned long int st_nlink; /* Link count. */ + long int st_uid; /* User ID of the file's owner. */ + long int st_gid; /* Group ID of the file's group.*/ + unsigned long int st_rdev; /* Device number, if device. */ + long int st_filler2[2]; + + long int st_size; /* Size of file, in bytes. */ /* SVR4 added this extra long to allow for expansion of off_t. */ - long st_filler3; + long int st_filler3; - long st_atime; /* Time of last access. */ - unsigned long st_atime_usec; - long st_mtime; /* Time of last modification. */ - unsigned long st_mtime_usec; - long st_ctime; /* Time of last status change. */ - unsigned long st_ctime_usec; + long int st_atime; /* Time of last access. */ + unsigned long int st_atime_usec; + long int st_mtime; /* Time of last modification. */ + unsigned long int st_mtime_usec; + long int st_ctime; /* Time of last status change. */ + unsigned long int st_ctime_usec; - long st_blksize; /* Optimal block size for I/O. */ + long int st_blksize; /* Optimal block size for I/O. */ #define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ __blkcnt_t st_blocks; /* Number of 512-byte blocks allocated. */ char st_fstype[16]; /* The type of this filesystem. */ int st_aclcnt; - unsigned long st_level; - unsigned long st_flags; - unsigned long st_cmwlevel; - long st_filler4[4]; + unsigned long int st_level; + unsigned long int st_flags; + unsigned long int st_cmwlevel; + long int st_filler4[4]; }; /* Encoding of the file mode. */ @@ -90,5 +86,3 @@ struct stat #define __S_IREAD 0400 /* Read by owner. */ #define __S_IWRITE 0200 /* Write by owner. */ #define __S_IEXEC 0100 /* Execute by owner. */ - -#endif /* bits/stat.h */ diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h index 82ab37fd93..c6048a9277 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h @@ -1,6 +1,5 @@ /* Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@zen.org). 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 @@ -17,12 +16,9 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* - * Never include this file directly; use instead. - */ - -#ifndef _BITS_STAT_H -#define _BITS_STAT_H 1 +#ifndef _SYS_STAT_H +# error "Never include directly; use instead." +#endif #include @@ -30,7 +26,7 @@ struct stat { unsigned long int st_dev; - long st_filler1[3]; + long int st_filler1[3]; __ino_t st_ino; /* File serial number. */ unsigned long int st_mode; /* File mode. */ /* This is unsigned long instead of __nlink_t, since SVR4 has @@ -39,11 +35,11 @@ struct stat __uid_t st_uid; /* User ID of the file's owner. */ __gid_t st_gid; /* Group ID of the file's group.*/ unsigned long int st_rdev; /* Device number, if device. */ - long st_filler2[2]; + long int st_filler2[2]; __off_t st_size; /* Size of file, in bytes. */ /* SVR4 added this extra long to allow for expansion of off_t. */ - long st_filler3; + long int st_filler3; __time_t st_atime; /* Time of last access. */ unsigned long int st_atime_usec; @@ -55,9 +51,9 @@ struct stat __blkcnt_t st_blksize; /* Optimal block size for I/O. */ #define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ - long st_blocks; /* Number of 512-byte blocks allocated. */ + long int st_blocks; /* Number of 512-byte blocks allocated. */ char st_fstype[16]; - long st_filler4[8]; + long int st_filler4[8]; }; /* Encoding of the file mode. */ @@ -83,5 +79,3 @@ struct stat #define __S_IREAD 0400 /* Read by owner. */ #define __S_IWRITE 0200 /* Write by owner. */ #define __S_IEXEC 0100 /* Execute by owner. */ - -#endif /* bits/stat.h */ diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/bits/sigcontext.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/bits/sigcontext.h index 7402704864..29d2d87b26 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/bits/sigcontext.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/bits/sigcontext.h @@ -1 +1,34 @@ -#include +/* Structure describing state saved while handling a signal. Sparc version. + Copyright (C) 1992, 1994, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SIGNAL_H +# error "Never use directly; include instead." +#endif + +struct sigcontext + { + int sc_onstack; + __sigset_t sc_mask; + +#define SPARC_MAXREGWINDOW 31 /* Maximum usable register windows. */ + int sc_sp, sc_pc, sc_npc, sc_psr, sc_g1, sc_o0; + int sc_wbcnt; /* Number of outstanding windows. */ + __ptr_t sc_spbuf[SPARC_MAXREGWINDOW]; /* SP's for each window. */ + int sc_wbuf[SPARC_MAXREGWINDOW][16]; /* Saved register windows. */ + }; diff --git a/sysdeps/vax/bits/huge_val.h b/sysdeps/vax/bits/huge_val.h index f323049d83..74930be56a 100644 --- a/sysdeps/vax/bits/huge_val.h +++ b/sysdeps/vax/bits/huge_val.h @@ -1,6 +1,6 @@ /* `HUGE_VAL' constant for Vaxen. Used by and functions for overflow. - Copyright (C) 1992, 1996 Free Software Foundation, Inc. + Copyright (C) 1992, 1996, 1997 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 @@ -19,7 +19,7 @@ Boston, MA 02111-1307, USA. */ #ifndef _MATH_H -#error "Never use directly; include instead." +# error "Never use directly; include instead." #endif diff --git a/sysdeps/vax/bits/setjmp.h b/sysdeps/vax/bits/setjmp.h index 7adecd9a17..10ca170a2a 100644 --- a/sysdeps/vax/bits/setjmp.h +++ b/sysdeps/vax/bits/setjmp.h @@ -1,5 +1,9 @@ /* Define the machine-dependent type `jmp_buf'. Vax version. */ +#ifndef _SETJMP_H +# error "Never include directly; use instead." +#endif + typedef struct { PTR __fp; From d5cd798ccbb17680545c512ede397498c8987df2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 1 Dec 1997 17:09:25 +0000 Subject: [PATCH 1114/4487] Define _ASM and _SETJMP_H to get definitions. --- sysdeps/alpha/__longjmp.S | 2 ++ sysdeps/alpha/setjmp.S | 2 ++ 2 files changed, 4 insertions(+) diff --git a/sysdeps/alpha/__longjmp.S b/sysdeps/alpha/__longjmp.S index 34731172e1..7b639f5155 100644 --- a/sysdeps/alpha/__longjmp.S +++ b/sysdeps/alpha/__longjmp.S @@ -19,6 +19,8 @@ #define __ASSEMBLY__ #include +#define _ASM +#define _SETJMP_H #include diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S index ae3ceb517d..894bb9ecf0 100644 --- a/sysdeps/alpha/setjmp.S +++ b/sysdeps/alpha/setjmp.S @@ -19,6 +19,8 @@ #define __ASSEMBLY__ #include +#define _ASM +#define _SETJMP_H #include .ent __sigsetjmp From d2d68a74d0846a56ca1406996926b02446902d6a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 1 Dec 1997 17:12:09 +0000 Subject: [PATCH 1115/4487] Include not . --- sysdeps/unix/sysv/linux/alpha/kernel_termios.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/kernel_termios.h b/sysdeps/unix/sysv/linux/alpha/kernel_termios.h index 093ac25096..6a99146b5a 100644 --- a/sysdeps/unix/sysv/linux/alpha/kernel_termios.h +++ b/sysdeps/unix/sysv/linux/alpha/kernel_termios.h @@ -22,7 +22,7 @@ /* The following corresponds to the values from the Linux 2.1.20 kernel. */ /* We need the definition of tcflag_t, cc_t, and speed_t. */ -#include +#include #define __KERNEL_NCCS 19 From 7e89694bc01b720846d291cd129ed5857109fd4d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 1 Dec 1997 17:12:23 +0000 Subject: [PATCH 1116/4487] Define syscall as __llseek and make llseek and lseek64 weak aliases. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 9e4cd39a8f..d3bc033b3d 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -20,7 +20,7 @@ osf_sigprocmask - osf_sigprocmask 2 __osf_sigprocmask getpeername - getpeername 3 __getpeername getpeername getpriority - getpriority 2 __getpriority getpriority mmap - mmap 6 __mmap mmap -llseek EXTRA lseek 3 llseek +llseek EXTRA lseek 3 __llseek llseek lseek64 pread EXTRA pread 4 __pread pread __pread64 pread64 pwrite EXTRA pwrite 4 __pwrite pwrite __pwrite64 pwrite64 From 4ff61542a8d637d7f488d561fadcf6776caad2c1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 3 Dec 1997 23:20:36 +0000 Subject: [PATCH 1117/4487] Define _SETJMP_H before including . --- sysdeps/arm/__longjmp.S | 3 ++- sysdeps/arm/setjmp.S | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sysdeps/arm/__longjmp.S b/sysdeps/arm/__longjmp.S index b027103d60..a2042f5543 100644 --- a/sysdeps/arm/__longjmp.S +++ b/sysdeps/arm/__longjmp.S @@ -18,6 +18,7 @@ Boston, MA 02111-1307, USA. */ #include +#define _SETJMP_H #define _ASM #include @@ -32,6 +33,6 @@ ENTRY (__longjmp) add r2, r2, #48 lfmfd f4, 4, [r2] #endif - + LOADREGS(ia, r2, {v1-v6, sl, fp, sp, pc}) END (__longjmp) diff --git a/sysdeps/arm/setjmp.S b/sysdeps/arm/setjmp.S index 8f99e4fcb4..08cd0d254e 100644 --- a/sysdeps/arm/setjmp.S +++ b/sysdeps/arm/setjmp.S @@ -18,6 +18,7 @@ Boston, MA 02111-1307, USA. */ #include +#define _SETJMP_H #define _ASM #include @@ -28,7 +29,7 @@ ENTRY (__sigsetjmp) /* Save registers */ #if __ARM_USES_FP sfmea f4, 4, [r0]! -#endif +#endif stmia r0, {v1-v6, sl, fp, sp, lr} /* Make a tail call to __sigjmp_save; it takes the same args. */ From fc1eaef3e8eae583bf161663bce5fc80db4226ba Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 3 Dec 1997 23:31:37 +0000 Subject: [PATCH 1118/4487] Don't define ___LIBC_INTERNAL_MATH_INLINES here. --- sysdeps/m68k/fpu/e_acos.c | 1 - sysdeps/m68k/fpu/e_atan2.c | 1 - sysdeps/m68k/fpu/e_fmod.c | 1 - sysdeps/m68k/fpu/e_pow.c | 1 - sysdeps/m68k/fpu/e_scalb.c | 1 - sysdeps/m68k/fpu/k_cos.c | 1 - sysdeps/m68k/fpu/k_sin.c | 1 - sysdeps/m68k/fpu/k_tan.c | 1 - sysdeps/m68k/fpu/s_atan.c | 1 - sysdeps/m68k/fpu/s_ccos.c | 1 - sysdeps/m68k/fpu/s_ccosh.c | 1 - sysdeps/m68k/fpu/s_cexp.c | 1 - sysdeps/m68k/fpu/s_csin.c | 1 - sysdeps/m68k/fpu/s_csinh.c | 1 - sysdeps/m68k/fpu/s_frexp.c | 1 - sysdeps/m68k/fpu/s_ilogb.c | 1 - sysdeps/m68k/fpu/s_isinf.c | 1 - sysdeps/m68k/fpu/s_llrint.c | 1 - sysdeps/m68k/fpu/s_llrintf.c | 1 - sysdeps/m68k/fpu/s_llrintl.c | 1 - sysdeps/m68k/fpu/s_lrint.c | 1 - sysdeps/m68k/fpu/s_modf.c | 1 - sysdeps/m68k/fpu/s_remquo.c | 1 - sysdeps/m68k/fpu/s_scalbn.c | 1 - sysdeps/m68k/fpu/s_sincos.c | 1 - 25 files changed, 25 deletions(-) diff --git a/sysdeps/m68k/fpu/e_acos.c b/sysdeps/m68k/fpu/e_acos.c index 9c2d91f271..80803ff80f 100644 --- a/sysdeps/m68k/fpu/e_acos.c +++ b/sysdeps/m68k/fpu/e_acos.c @@ -16,7 +16,6 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_INTERNAL_MATH_INLINES #include #include "math_private.h" diff --git a/sysdeps/m68k/fpu/e_atan2.c b/sysdeps/m68k/fpu/e_atan2.c index d23d4f90d1..7b275b4048 100644 --- a/sysdeps/m68k/fpu/e_atan2.c +++ b/sysdeps/m68k/fpu/e_atan2.c @@ -16,7 +16,6 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_INTERNAL_MATH_INLINES #include #include "math_private.h" diff --git a/sysdeps/m68k/fpu/e_fmod.c b/sysdeps/m68k/fpu/e_fmod.c index 505650a531..9e59a43302 100644 --- a/sysdeps/m68k/fpu/e_fmod.c +++ b/sysdeps/m68k/fpu/e_fmod.c @@ -16,7 +16,6 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_INTERNAL_MATH_INLINES #include #include "math_private.h" diff --git a/sysdeps/m68k/fpu/e_pow.c b/sysdeps/m68k/fpu/e_pow.c index c36b64316e..ee95a39395 100644 --- a/sysdeps/m68k/fpu/e_pow.c +++ b/sysdeps/m68k/fpu/e_pow.c @@ -16,7 +16,6 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_INTERNAL_MATH_INLINES #include #include "math_private.h" diff --git a/sysdeps/m68k/fpu/e_scalb.c b/sysdeps/m68k/fpu/e_scalb.c index 93b44ff130..ef1724b036 100644 --- a/sysdeps/m68k/fpu/e_scalb.c +++ b/sysdeps/m68k/fpu/e_scalb.c @@ -17,7 +17,6 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_INTERNAL_MATH_INLINES #include #ifndef SUFF diff --git a/sysdeps/m68k/fpu/k_cos.c b/sysdeps/m68k/fpu/k_cos.c index 5b263ec6ae..85f744f984 100644 --- a/sysdeps/m68k/fpu/k_cos.c +++ b/sysdeps/m68k/fpu/k_cos.c @@ -16,7 +16,6 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_INTERNAL_MATH_INLINES #include #include "math_private.h" diff --git a/sysdeps/m68k/fpu/k_sin.c b/sysdeps/m68k/fpu/k_sin.c index 41de73fde7..05cdceedc8 100644 --- a/sysdeps/m68k/fpu/k_sin.c +++ b/sysdeps/m68k/fpu/k_sin.c @@ -16,7 +16,6 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_INTERNAL_MATH_INLINES #include #include "math_private.h" diff --git a/sysdeps/m68k/fpu/k_tan.c b/sysdeps/m68k/fpu/k_tan.c index 7f87e09e00..09e5ac83bc 100644 --- a/sysdeps/m68k/fpu/k_tan.c +++ b/sysdeps/m68k/fpu/k_tan.c @@ -16,7 +16,6 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_INTERNAL_MATH_INLINES #include #include "math_private.h" diff --git a/sysdeps/m68k/fpu/s_atan.c b/sysdeps/m68k/fpu/s_atan.c index e6b676ba58..29f2eca77d 100644 --- a/sysdeps/m68k/fpu/s_atan.c +++ b/sysdeps/m68k/fpu/s_atan.c @@ -16,7 +16,6 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_INTERNAL_MATH_INLINES #include #ifndef FUNC diff --git a/sysdeps/m68k/fpu/s_ccos.c b/sysdeps/m68k/fpu/s_ccos.c index 095aa9803f..fbd5ef5388 100644 --- a/sysdeps/m68k/fpu/s_ccos.c +++ b/sysdeps/m68k/fpu/s_ccos.c @@ -18,7 +18,6 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_INTERNAL_MATH_INLINES #include #include diff --git a/sysdeps/m68k/fpu/s_ccosh.c b/sysdeps/m68k/fpu/s_ccosh.c index 3d560b3093..af751430de 100644 --- a/sysdeps/m68k/fpu/s_ccosh.c +++ b/sysdeps/m68k/fpu/s_ccosh.c @@ -18,7 +18,6 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_INTERNAL_MATH_INLINES #include #include diff --git a/sysdeps/m68k/fpu/s_cexp.c b/sysdeps/m68k/fpu/s_cexp.c index da28ebb4d3..fcf87ed687 100644 --- a/sysdeps/m68k/fpu/s_cexp.c +++ b/sysdeps/m68k/fpu/s_cexp.c @@ -18,7 +18,6 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_INTERNAL_MATH_INLINES #include #include diff --git a/sysdeps/m68k/fpu/s_csin.c b/sysdeps/m68k/fpu/s_csin.c index ae456d3b91..72214c4cff 100644 --- a/sysdeps/m68k/fpu/s_csin.c +++ b/sysdeps/m68k/fpu/s_csin.c @@ -18,7 +18,6 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_INTERNAL_MATH_INLINES #include #include diff --git a/sysdeps/m68k/fpu/s_csinh.c b/sysdeps/m68k/fpu/s_csinh.c index c95f9dc523..e829f4d3ae 100644 --- a/sysdeps/m68k/fpu/s_csinh.c +++ b/sysdeps/m68k/fpu/s_csinh.c @@ -18,7 +18,6 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_INTERNAL_MATH_INLINES #include #include diff --git a/sysdeps/m68k/fpu/s_frexp.c b/sysdeps/m68k/fpu/s_frexp.c index 4280fcc50b..61e3298e97 100644 --- a/sysdeps/m68k/fpu/s_frexp.c +++ b/sysdeps/m68k/fpu/s_frexp.c @@ -16,7 +16,6 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_INTERNAL_MATH_INLINES #include #ifndef FUNC diff --git a/sysdeps/m68k/fpu/s_ilogb.c b/sysdeps/m68k/fpu/s_ilogb.c index aebcaa16ba..ef90946f59 100644 --- a/sysdeps/m68k/fpu/s_ilogb.c +++ b/sysdeps/m68k/fpu/s_ilogb.c @@ -16,7 +16,6 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_INTERNAL_MATH_INLINES #include #ifndef SUFF diff --git a/sysdeps/m68k/fpu/s_isinf.c b/sysdeps/m68k/fpu/s_isinf.c index d8cafdbb0c..03dc26dc60 100644 --- a/sysdeps/m68k/fpu/s_isinf.c +++ b/sysdeps/m68k/fpu/s_isinf.c @@ -16,7 +16,6 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_INTERNAL_MATH_INLINES #include #ifndef FUNC diff --git a/sysdeps/m68k/fpu/s_llrint.c b/sysdeps/m68k/fpu/s_llrint.c index 37b6f63278..423939aa0b 100644 --- a/sysdeps/m68k/fpu/s_llrint.c +++ b/sysdeps/m68k/fpu/s_llrint.c @@ -19,7 +19,6 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_INTERNAL_MATH_INLINES #include #include "math_private.h" diff --git a/sysdeps/m68k/fpu/s_llrintf.c b/sysdeps/m68k/fpu/s_llrintf.c index 4d06ae2651..0cd12c9920 100644 --- a/sysdeps/m68k/fpu/s_llrintf.c +++ b/sysdeps/m68k/fpu/s_llrintf.c @@ -19,7 +19,6 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_INTERNAL_MATH_INLINES #include #include "math_private.h" diff --git a/sysdeps/m68k/fpu/s_llrintl.c b/sysdeps/m68k/fpu/s_llrintl.c index 14a815fd1a..6f63e0bcd1 100644 --- a/sysdeps/m68k/fpu/s_llrintl.c +++ b/sysdeps/m68k/fpu/s_llrintl.c @@ -19,7 +19,6 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_INTERNAL_MATH_INLINES #include #include "math_private.h" diff --git a/sysdeps/m68k/fpu/s_lrint.c b/sysdeps/m68k/fpu/s_lrint.c index 7747057f1a..89e9dba9cf 100644 --- a/sysdeps/m68k/fpu/s_lrint.c +++ b/sysdeps/m68k/fpu/s_lrint.c @@ -19,7 +19,6 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_INTERNAL_MATH_INLINES #include #ifndef suffix diff --git a/sysdeps/m68k/fpu/s_modf.c b/sysdeps/m68k/fpu/s_modf.c index b9867df475..6c2449aa56 100644 --- a/sysdeps/m68k/fpu/s_modf.c +++ b/sysdeps/m68k/fpu/s_modf.c @@ -16,7 +16,6 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_INTERNAL_MATH_INLINES #include #ifndef SUFF diff --git a/sysdeps/m68k/fpu/s_remquo.c b/sysdeps/m68k/fpu/s_remquo.c index 7607fee782..10be1aec6d 100644 --- a/sysdeps/m68k/fpu/s_remquo.c +++ b/sysdeps/m68k/fpu/s_remquo.c @@ -18,7 +18,6 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_INTERNAL_MATH_INLINES #include #ifndef SUFF diff --git a/sysdeps/m68k/fpu/s_scalbn.c b/sysdeps/m68k/fpu/s_scalbn.c index 12b737a5e9..c151b2a0ef 100644 --- a/sysdeps/m68k/fpu/s_scalbn.c +++ b/sysdeps/m68k/fpu/s_scalbn.c @@ -16,7 +16,6 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_INTERNAL_MATH_INLINES #define scalbln __no_scalbln_decl #define scalblnf __no_scalblnf_decl #define scalblnl __no_scalblnl_decl diff --git a/sysdeps/m68k/fpu/s_sincos.c b/sysdeps/m68k/fpu/s_sincos.c index dda42e2775..8d84ece380 100644 --- a/sysdeps/m68k/fpu/s_sincos.c +++ b/sysdeps/m68k/fpu/s_sincos.c @@ -16,7 +16,6 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define __LIBC_INTERNAL_MATH_INLINES #include #ifndef FUNC From f873ad64beaf42149f18f573a0e1a0ba94d98983 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 4 Dec 1997 00:02:58 +0000 Subject: [PATCH 1119/4487] Linux/ARM implementation. --- sysdeps/unix/sysv/linux/arm/bits/mman.h | 75 +++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/bits/mman.h diff --git a/sysdeps/unix/sysv/linux/arm/bits/mman.h b/sysdeps/unix/sysv/linux/arm/bits/mman.h new file mode 100644 index 0000000000..fcc0643290 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/bits/mman.h @@ -0,0 +1,75 @@ +/* Definitions for POSIX memory map interface. Linux/ARM version. + Copyright (C) 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_MMAN_H +# error "Never include this file directly. Use instead" +#endif + +/* The following definitions basically come from the kernel headers. + But the kernel header is not namespace clean. */ + + +/* Protections are chosen from these bits, OR'd together. The + implementation does not necessarily support PROT_EXEC or PROT_WRITE + without PROT_READ. The only guarantees are that no writing will be + allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ + +#define PROT_READ 0x1 /* Page can be read. */ +#define PROT_WRITE 0x2 /* Page can be written. */ +#define PROT_EXEC 0x4 /* Page can be executed. */ +#define PROT_NONE 0x0 /* Page can not be accessed. */ + +/* Sharing types (must choose one and only one of these). */ +#define MAP_SHARED 0x01 /* Share changes. */ +#define MAP_PRIVATE 0x02 /* Changes are private. */ +#ifdef __USE_MISC +# define MAP_TYPE 0x0f /* Mask for type of mapping. */ +#endif + +/* Other flags. */ +#define MAP_FIXED 0x10 /* Interpret addr exactly. */ +#ifdef __USE_MISC +# define MAP_FILE 0 +# define MAP_ANONYMOUS 0x20 /* Don't use a file. */ +# define MAP_ANON MAP_ANONYMOUS +#endif + +/* These are Linux-specific. */ +#ifdef __USE_MISC +# define MAP_GROWSDOWN 0x0100 /* Stack-like segment. */ +# define MAP_DENYWRITE 0x0800 /* ETXTBSY */ +# define MAP_EXECUTABLE 0x1000 /* Mark it as an executable. */ +# define MAP_LOCKED 0x2000 /* Lock the mapping. */ +# define MAP_NORESERVE 0x4000 /* Don't check for reservations. */ +#endif + +/* Flags to `msync'. */ +#define MS_ASYNC 1 /* Sync memory asynchronously. */ +#define MS_SYNC 4 /* Synchronous memory sync. */ +#define MS_INVALIDATE 2 /* Invalidate the caches. */ + +/* Flags for `mlockall'. */ +#define MCL_CURRENT 1 /* Lock all currently mapped pages. */ +#define MCL_FUTURE 2 /* Lock all additions to address + space. */ + +/* Flags for `mremap'. */ +#ifdef __USE_GNU +# define MREMAP_MAYMOVE 1 +#endif From 2e67c045f29d685845757f990fe0628b11548b6f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 8 Dec 1997 02:50:09 +0000 Subject: [PATCH 1120/4487] (_dl_runtime_resolve): Care for prefix. (_start): Likewise. --- sysdeps/alpha/dl-machine.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 3f65ae99a3..bc93087066 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -166,7 +166,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) mov $26, $18 addq $17, $17, $17 /* Do the fixup */ - bsr $26, " #fixup_name "..ng + bsr $26, " ASM_ALPHA_NG_SYMBOL_PREFIX #fixup_name "..ng /* Move the destination address into position. */ mov $0, $27 /* Restore program registers. */ @@ -221,7 +221,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) 0: ldgp $gp, 0($gp) /* Pass pointer to argument block to _dl_start. */ mov $sp, $16 - bsr $26, _dl_start..ng + bsr $26, "ASM_ALPHA_NG_SYMBOL_PREFIX"_dl_start..ng .end _start /* FALLTHRU */ .globl _dl_start_user From 53b18c667bcce9f81790af2ec0454a6ac6536549 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 8 Dec 1997 02:55:00 +0000 Subject: [PATCH 1121/4487] (_STDIO_H): Define before including --- sysdeps/standalone/close.c | 1 + sysdeps/standalone/filedesc.h | 1 + 2 files changed, 2 insertions(+) diff --git a/sysdeps/standalone/close.c b/sysdeps/standalone/close.c index 2e33b3c2c6..114d726c6d 100644 --- a/sysdeps/standalone/close.c +++ b/sysdeps/standalone/close.c @@ -21,6 +21,7 @@ #include #include +#define _STDIO_H #include #include "filedesc.h" diff --git a/sysdeps/standalone/filedesc.h b/sysdeps/standalone/filedesc.h index a35d1cf043..d6a12a606a 100644 --- a/sysdeps/standalone/filedesc.h +++ b/sysdeps/standalone/filedesc.h @@ -26,6 +26,7 @@ #ifndef __FILEDESC_h #define __FILEDESC_h +#define _STDIO_H #include #ifndef __DECLARE_FILE_DESCRIPTORS__ From 17bba157e3f2bdadef9762cc951801269cec72a2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 8 Dec 1997 02:55:11 +0000 Subject: [PATCH 1122/4487] (ENOTTY): Added. --- sysdeps/standalone/arm/bits/errno.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/standalone/arm/bits/errno.h b/sysdeps/standalone/arm/bits/errno.h index f5020dcb7e..97dbbd9ce3 100644 --- a/sysdeps/standalone/arm/bits/errno.h +++ b/sysdeps/standalone/arm/bits/errno.h @@ -51,6 +51,7 @@ # define ESTALE 23 # define EISDIR 24 # define EOPNOTSUPP 25 /* Operation not supported. */ +# define ENOTTY 26 #endif #define __set_errno(val) errno = (val) From 1a5bb722c3fce80432207ca9f41be692e38a337a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 8 Dec 1997 03:01:53 +0000 Subject: [PATCH 1123/4487] Syscalls for Linux/ARM. --- sysdeps/unix/sysv/linux/arm/syscalls.list | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/syscalls.list diff --git a/sysdeps/unix/sysv/linux/arm/syscalls.list b/sysdeps/unix/sysv/linux/arm/syscalls.list new file mode 100644 index 0000000000..392a257194 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/syscalls.list @@ -0,0 +1,6 @@ +# File name Caller Syscall name # args Strong name Weak names + +s_getgroups getgroups getgroups 2 __syscall_getgroups +s_llseek llseek _llseek 5 __sys_llseek +s_setgroups setgroups setgroups 2 __syscall_setgroups +vm86 - vm86 1 __vm86 vm86 From 49f3765caf61c732accdd87c4ab11e2cece3ff95 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 14 Dec 1997 21:53:11 +0000 Subject: [PATCH 1124/4487] (ELF_MACHINE_RUNTIME_TRAMPOLINE): Add missing parameters. --- sysdeps/alpha/dl-machine.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index bc93087066..cd4f86a69c 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -204,8 +204,8 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) TRAMPOLINE_TEMPLATE (_dl_runtime_profile, profile_fixup, #nop); #else #define ELF_MACHINE_RUNTIME_TRAMPOLINE \ - TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup); \ - strong_alias (_dl_runtime_resolve, _dl_runtime_profile); + TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup, imb); \ + strong_alias (_dl_runtime_resolve, _dl_runtime_profile, #nop); #endif /* Initial entry point code for the dynamic linker. From 053ed29047d2ac3b58865cc4181f76ceacd2468d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 14 Dec 1997 22:09:13 +0000 Subject: [PATCH 1125/4487] Save/restore fpiar. --- sysdeps/m68k/fpu/fegetenv.c | 2 +- sysdeps/m68k/fpu/feholdexcpt.c | 2 +- sysdeps/m68k/fpu/fesetenv.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/m68k/fpu/fegetenv.c b/sysdeps/m68k/fpu/fegetenv.c index 59f743aecf..b437b7ef8a 100644 --- a/sysdeps/m68k/fpu/fegetenv.c +++ b/sysdeps/m68k/fpu/fegetenv.c @@ -23,5 +23,5 @@ void fegetenv (fenv_t *envp) { - __asm__ ("fmovem%.l %/fpcr/%/fpsr,%0" : "=m" (*envp)); + __asm__ ("fmovem%.l %/fpcr/%/fpsr/%/fpiar,%0" : "=m" (*envp)); } diff --git a/sysdeps/m68k/fpu/feholdexcpt.c b/sysdeps/m68k/fpu/feholdexcpt.c index d8e2d8a8a1..e36617d962 100644 --- a/sysdeps/m68k/fpu/feholdexcpt.c +++ b/sysdeps/m68k/fpu/feholdexcpt.c @@ -26,7 +26,7 @@ feholdexcept (fenv_t *envp) fexcept_t fpcr, fpsr; /* Store the environment. */ - __asm__ ("fmovem%.l %/fpcr/%/fpsr,%0" : "=m" (*envp)); + __asm__ ("fmovem%.l %/fpcr/%/fpsr/%/fpiar,%0" : "=m" (*envp)); /* Now clear all exceptions. */ fpsr = envp->status_register & ~FE_ALL_EXCEPT; diff --git a/sysdeps/m68k/fpu/fesetenv.c b/sysdeps/m68k/fpu/fesetenv.c index 8b4d6b0f88..6dd131b888 100644 --- a/sysdeps/m68k/fpu/fesetenv.c +++ b/sysdeps/m68k/fpu/fesetenv.c @@ -29,7 +29,7 @@ fesetenv (const fenv_t *envp) values which we do not want to come from the saved environment. Therefore, we get the current environment and replace the values we want to use from the environment specified by the parameter. */ - __asm__ ("fmovem%.l %/fpcr/%/fpsr,%0" : "=m" (*&temp)); + __asm__ ("fmovem%.l %/fpcr/%/fpsr/%/fpiar,%0" : "=m" (*&temp)); temp.status_register &= ~FE_ALL_EXCEPT; temp.control_register &= ~((FE_ALL_EXCEPT << 6) | FE_UPWARD); @@ -44,5 +44,5 @@ fesetenv (const fenv_t *envp) temp.status_register |= envp->status_register & FE_ALL_EXCEPT; } - __asm__ __volatile__ ("fmovem%.l %0,%/fpcr/%/fpsr" : : "m" (temp)); + __asm__ __volatile__ ("fmovem%.l %0,%/fpcr/%/fpsr/%/fpiar" : : "m" (*&temp)); } From ac442bf7a988d87ea989c7b332627073dac01053 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 14 Dec 1997 22:09:29 +0000 Subject: [PATCH 1126/4487] (fenv_t): Add member to hold fpiar value, to match spirit of the standard. --- sysdeps/m68k/fpu/bits/fenv.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sysdeps/m68k/fpu/bits/fenv.h b/sysdeps/m68k/fpu/bits/fenv.h index a11e0724f1..b1608b9ddc 100644 --- a/sysdeps/m68k/fpu/bits/fenv.h +++ b/sysdeps/m68k/fpu/bits/fenv.h @@ -64,8 +64,9 @@ typedef unsigned int fexcept_t; corresponds to the layout of the block written by `fmovem'. */ typedef struct { - fexcept_t control_register; - fexcept_t status_register; + unsigned int control_register; + unsigned int status_register; + unsigned int instruction_address; } fenv_t; From 3632b95d0ac243b2a4351958a69c7d1762a85ff5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 14 Dec 1997 22:09:47 +0000 Subject: [PATCH 1127/4487] Protect declarations of inline functions by feature tests to avoid warning about missing prototype declarations. --- sysdeps/m68k/fpu/bits/mathinline.h | 106 +++++++++++++++++++++-------- 1 file changed, 78 insertions(+), 28 deletions(-) diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/fpu/bits/mathinline.h index 827a8d603d..034b6f8294 100644 --- a/sysdeps/m68k/fpu/bits/mathinline.h +++ b/sysdeps/m68k/fpu/bits/mathinline.h @@ -138,13 +138,20 @@ __inline_mathop(__tan, tan) __inline_mathop(__tanh, tanh) __inline_mathop(__fabs, abs) +#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC9X __inline_mathop(__rint, int) __inline_mathop(__expm1, etoxm1) __inline_mathop(__log1p, lognp1) +#endif + +#ifdef __USE_MISC __inline_mathop(__significand, getman) +#endif +#ifdef __USE_ISOC9X __inline_mathop(__log2, log2) __inline_mathop(__trunc, intrz) +#endif #if !defined __NO_MATH_INLINES && defined __OPTIMIZE__ @@ -272,8 +279,18 @@ __m81_defun (float_type, __CONCAT(__ceil,s), (float_type __x)) \ __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ : "dmi" (__ctrl_reg)); \ return __result; \ -} \ - \ +} + +__inline_functions(double,) +#if defined __USE_MISC || defined __USE_ISOC9X +__inline_functions(float,f) +__inline_functions(long double,l) +#endif +#undef __inline_functions + +#ifdef __USE_MISC + +# define __inline_functions(float_type, s) \ __m81_defun (int, __CONCAT(__isinf,s), (float_type __value)) \ { \ /* There is no branch-condition for infinity, \ @@ -284,14 +301,6 @@ __m81_defun (int, __CONCAT(__isinf,s), (float_type __value)) \ return (__fpsr & (2 << 24)) ? (__fpsr & (8 << 24) ? -1 : 1) : 0; \ } \ \ -__m81_defun (int, __CONCAT(__isnan,s), (float_type __value)) \ -{ \ - char __result; \ - __asm("ftst%.x %1\n" \ - "fsun %0" : "=dm" (__result) : "f" (__value)); \ - return __result; \ -} \ - \ __m81_defun (int, __CONCAT(__finite,s), (float_type __value)) \ { \ /* There is no branch-condition for infinity, so we must extract and \ @@ -302,6 +311,44 @@ __m81_defun (int, __CONCAT(__finite,s), (float_type __value)) \ return (__fpsr & (3 << 24)) == 0; \ } \ \ +__m81_defun (float_type, __CONCAT(__scalbn,s), \ + (float_type __x, int __n)) \ +{ \ + float_type __result; \ + __asm ("fscale%.l %1, %0" : "=f" (__result) : "dmi" (__n), "0" (__x)); \ + return __result; \ +} + +__inline_functions(double,) +__inline_functions(float,f) +__inline_functions(long double,l) +# undef __inline_functions + +#endif /* Use misc. */ + +#if defined __USE_MISC || defined __USE_XOPEN + +# define __inline_functions(float_type, s) \ +__m81_defun (int, __CONCAT(__isnan,s), (float_type __value)) \ +{ \ + char __result; \ + __asm("ftst%.x %1\n" \ + "fsun %0" : "=dm" (__result) : "f" (__value)); \ + return __result; \ +} + +__inline_functions(double,) +# ifdef __USE_MISC +__inline_functions(float,f) +__inline_functions(long double,l) +# endif +# undef __inline_functions + +#endif + +#ifdef __USE_ISOC9X + +# define __inline_functions(float_type, s) \ __m81_defun (int, __CONCAT(__signbit,s), (float_type __value)) \ { \ /* There is no branch-condition for the sign bit, so we must extract \ @@ -312,14 +359,6 @@ __m81_defun (int, __CONCAT(__signbit,s), (float_type __value)) \ return (__fpsr >> 27) & 1; \ } \ \ -__m81_defun (float_type, __CONCAT(__scalbn,s), \ - (float_type __x, int __n)) \ -{ \ - float_type __result; \ - __asm ("fscale%.l %1, %0" : "=f" (__result) : "dmi" (__n), "0" (__x)); \ - return __result; \ -} \ - \ __m81_defun (float_type, __CONCAT(__scalbln,s), \ (float_type __x, long int __n)) \ { \ @@ -347,14 +386,6 @@ __m81_defun (long int, __CONCAT(__lrint,s), (float_type __x)) \ return __result; \ } \ \ -__m81_inline void \ -__m81_u(__CONCAT(__sincos,s))(float_type __x, float_type *__sinx, \ - float_type *__cosx) \ -{ \ - __asm ("fsincos%.x %2,%1:%0" \ - : "=f" (*__sinx), "=f" (*__cosx) : "f" (__x)); \ -} \ - \ __m81_inline float_type \ __m81_u(__CONCAT(__fma,s))(float_type __x, float_type __y, \ float_type __z) \ @@ -362,11 +393,30 @@ __m81_u(__CONCAT(__fma,s))(float_type __x, float_type __y, \ return (__x * __y) + __z; \ } -/* This defines the three variants of the inline functions. */ __inline_functions (double,) __inline_functions (float,f) __inline_functions (long double,l) -#undef __inline_functions +# undef __inline_functions + +#endif /* Use ISO C9x */ + +#ifdef __USE_GNU + +# define __inline_functions(float_type, s) \ +__m81_inline void \ +__m81_u(__CONCAT(__sincos,s))(float_type __x, float_type *__sinx, \ + float_type *__cosx) \ +{ \ + __asm ("fsincos%.x %2,%1:%0" \ + : "=f" (*__sinx), "=f" (*__cosx) : "f" (__x)); \ +} + +__inline_functions (double,) +__inline_functions (float,f) +__inline_functions (long double,l) +# undef __inline_functions + +#endif #if !defined __NO_MATH_INLINES && defined __OPTIMIZE__ From c96aeaa4e39ebd25ed174c79d6b0bd874ff87b35 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 14 Dec 1997 22:10:59 +0000 Subject: [PATCH 1128/4487] (EAGAIN): Added. (EIO): Likewise. (ENOSPC): Likewise. (EEXIST): Likewise. (__errno_location): Likewise. --- sysdeps/standalone/arm/bits/errno.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sysdeps/standalone/arm/bits/errno.h b/sysdeps/standalone/arm/bits/errno.h index 97dbbd9ce3..391f92548f 100644 --- a/sysdeps/standalone/arm/bits/errno.h +++ b/sysdeps/standalone/arm/bits/errno.h @@ -52,6 +52,13 @@ # define EISDIR 24 # define EOPNOTSUPP 25 /* Operation not supported. */ # define ENOTTY 26 +# define EAGAIN 27 +# define EIO 28 +# define ENOSPC 29 +# define EEXIST 30 #endif #define __set_errno(val) errno = (val) + +/* Function to get address of global `errno' variable. */ +extern int *__errno_location __P ((void)) __attribute__ ((__const__)); From 94b8f616432fd1f9658f7801e1a5ec653784d2fa Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 14 Dec 1997 22:19:05 +0000 Subject: [PATCH 1129/4487] Define as old_kernel_sigaction. --- sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h b/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h index 900bff4aab..6f8bc9bcd4 100644 --- a/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h +++ b/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h @@ -1,6 +1,6 @@ /* This is the sigaction struction from the Linux 2.1.20 kernel. */ -struct kernel_sigaction { +struct old_kernel_sigaction { __sighandler_t sa_handler; unsigned long sa_mask; unsigned int sa_flags; From 8dd9b4bddd191eee61088906202aff8d67196954 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 14 Dec 1997 22:19:40 +0000 Subject: [PATCH 1130/4487] Define __id_t. Correct definition of __FDMASK. --- sysdeps/unix/sysv/linux/alpha/bits/types.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h index b9e6dd779a..9acdf0c490 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/types.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h @@ -62,6 +62,7 @@ typedef __uint32_t __fsblkcnt_t; /* Type to count file system blocks. */ typedef __uint64_t __fsblkcnt64_t; /* "" (LFS) */ typedef __uint64_t __fsfilcnt_t; /* Type to count file system inodes. */ typedef __uint64_t __fsfilcnt64_t; /* "" (LFS) */ +typedef __uint32_t __id_t; /* General type for IDs. */ typedef struct { @@ -90,7 +91,7 @@ typedef unsigned long int __fd_mask; /* It's easier to assume 8-bit bytes than to get CHAR_BIT. */ #define __NFDBITS (8 * sizeof (__fd_mask)) #define __FDELT(d) ((d) / __NFDBITS) -#define __FDMASK(d) (1 << ((d) % __NFDBITS)) +#define __FDMASK(d) ((__fd_mask) 1 << ((d) % __NFDBITS)) /* fd_set for select and pselect. */ typedef struct From 7eaf35c740a4938ef2492a8fc65579a1df3f73cc Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 22 Dec 1997 18:53:56 +0000 Subject: [PATCH 1131/4487] Don't define exp2 inline. Define scalbln{,f,l} under __USE_ISOC9X, not __USE_MISC. --- sysdeps/m68k/fpu/bits/mathinline.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/fpu/bits/mathinline.h index 034b6f8294..569e5a06c4 100644 --- a/sysdeps/m68k/fpu/bits/mathinline.h +++ b/sysdeps/m68k/fpu/bits/mathinline.h @@ -173,7 +173,6 @@ __inline_mathop(significand, getman) # ifdef __USE_ISOC9X __inline_mathop(log2, log2) -__inline_mathop(exp2, twotox) __inline_mathop(trunc, intrz) # endif @@ -445,7 +444,6 @@ __inline_forward_c(double,ceil, (double __x), (__x)) __inline_forward_c(int,isinf, (double __value), (__value)) __inline_forward_c(int,finite, (double __value), (__value)) __inline_forward_c(double,scalbn, (double __x, int __n), (__x, __n)) -__inline_forward_c(double,scalbln, (double __x, long int __n), (__x, __n)) # endif # if defined __USE_MISC || defined __USE_XOPEN # ifndef __USE_ISOC9X /* Conflict with macro of same name. */ @@ -453,6 +451,7 @@ __inline_forward_c(int,isnan, (double __value), (__value)) # endif # endif # ifdef __USE_ISOC9X +__inline_forward_c(double,scalbln, (double __x, long int __n), (__x, __n)) __inline_forward_c(double,nearbyint, (double __value), (__value)) __inline_forward_c(long int,lrint, (double __value), (__value)) __inline_forward_c(double,fma, (double __x, double __y, double __z), @@ -473,10 +472,10 @@ __inline_forward_c(float,ceilf, (float __x), (__x)) __inline_forward_c(int,isinff, (float __value), (__value)) __inline_forward_c(int,finitef, (float __value), (__value)) __inline_forward_c(float,scalbnf, (float __x, int __n), (__x, __n)) -__inline_forward_c(float,scalblnf, (float __x, long int __n), (__x, __n)) __inline_forward_c(int,isnanf, (float __value), (__value)) # endif # ifdef __USE_ISOC9X +__inline_forward_c(float,scalblnf, (float __x, long int __n), (__x, __n)) __inline_forward_c(float,nearbyintf, (float __value), (__value)) __inline_forward_c(long int,lrintf, (float __value), (__value)) __inline_forward_c(float,fmaf, (float __x, float __y, float __z), @@ -495,11 +494,11 @@ __inline_forward_c(long double,ceill, (long double __x), (__x)) __inline_forward_c(int,isinfl, (long double __value), (__value)) __inline_forward_c(int,finitel, (long double __value), (__value)) __inline_forward_c(long double,scalbnl, (long double __x, int __n), (__x, __n)) -__inline_forward_c(long double,scalblnl, (long double __x, long int __n), - (__x, __n)) __inline_forward_c(int,isnanl, (long double __value), (__value)) # endif # ifdef __USE_ISOC9X +__inline_forward_c(long double,scalblnl, (long double __x, long int __n), + (__x, __n)) __inline_forward_c(long double,nearbyintl, (long double __value), (__value)) __inline_forward_c(long int,lrintl, (long double __value), (__value)) __inline_forward_c(long double,fmal, From 60688571b0d4b8c68049360f4feb0b784828fbaa Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 22 Dec 1997 18:56:55 +0000 Subject: [PATCH 1132/4487] (EBUSY): Added. --- sysdeps/standalone/arm/bits/errno.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/standalone/arm/bits/errno.h b/sysdeps/standalone/arm/bits/errno.h index 391f92548f..373d701bc3 100644 --- a/sysdeps/standalone/arm/bits/errno.h +++ b/sysdeps/standalone/arm/bits/errno.h @@ -56,6 +56,7 @@ # define EIO 28 # define ENOSPC 29 # define EEXIST 30 +# define EBUSY 31 #endif #define __set_errno(val) errno = (val) From 48a0be27051f551452346713af12671883358221 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 22 Dec 1997 18:58:39 +0000 Subject: [PATCH 1133/4487] (RLIM_INFINITY) [__USE_FILE_OFFSET64]: Make long long constant. (RLIM64_INFINITY): Likewise. --- sysdeps/unix/bsd/sun/sunos4/bits/resource.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/bsd/sun/sunos4/bits/resource.h b/sysdeps/unix/bsd/sun/sunos4/bits/resource.h index 6978c87dd2..c0b40ba0d1 100644 --- a/sysdeps/unix/bsd/sun/sunos4/bits/resource.h +++ b/sysdeps/unix/bsd/sun/sunos4/bits/resource.h @@ -65,11 +65,11 @@ enum __rlimit_resource #ifndef __USE_FILE_OFFSET64 # define RLIM_INFINITY 0x7fffffff #else -# define RLIM_INFINITY 0x7fffffffffffffffL +# define RLIM_INFINITY 0x7fffffffffffffffLL #endif #ifdef __USE_LARGEFILE64 -# define RLIM64_INFINITY 0x7fffffffffffffffL +# define RLIM64_INFINITY 0x7fffffffffffffffLL #endif From 2988b6bbfbb1348729310c344b9f4221ad5587fd Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 22 Dec 1997 20:19:45 +0000 Subject: [PATCH 1134/4487] Really make egcs support. --- sysdeps/unix/sysv/linux/alpha/init-first.h | 48 +++++++++++----------- 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/init-first.h b/sysdeps/unix/sysv/linux/alpha/init-first.h index ffbcaf1521..a3f5d8f0c4 100644 --- a/sysdeps/unix/sysv/linux/alpha/init-first.h +++ b/sysdeps/unix/sysv/linux/alpha/init-first.h @@ -2,28 +2,26 @@ This is done in one of two ways: either in the stack context of program start, or having dlopen pass them in. */ -#define SYSDEP_CALL_INIT(NAME, INIT) \ - asm(".weak _dl_starting_up\n\t" \ - ".globl " #NAME "\n\t" \ - ".ent " #NAME "\n" \ - #NAME ":\n\t" \ - "ldgp $29, 0($27)\n\t" \ - ".prologue 1\n\t" \ - ".set at\n\t" \ - /* Are we a dynamic libc being loaded into a static program? */ \ - "lda $0, _dl_starting_up\n\t" \ - "beq $0, 1f\n\t" \ - "ldl $0, 0($0)\n" \ - "cmpeq $31, $0, $0\n" \ - "1:\t" \ - "stl $0, __libc_multiple_libcs\n\t" \ - /* If so, argc et al are in a0-a2 already. Otherwise, load them. */ \ - "bne $0, 2f\n\t" \ - "ldl $16, 0($30)\n\t" \ - "lda $17, 8($30)\n\t" \ - "s8addq $16, $17, $18\n\t" \ - "addq $18, 8, $18\n" \ - "2:\t" \ - "br $31, " #INIT "..ng\n\t" \ - ".set noat\n\t" \ - ".end " #NAME); +#define SYSDEP_CALL_INIT(NAME, INIT) asm("\ + .weak _dl_starting_up + .globl " #NAME " + .ent " #NAME " +" #NAME ": + ldgp $29, 0($27) + .prologue 1 + .set at + /* Are we a dynamic libc being loaded into a static program? */ + lda $0, _dl_starting_up + beq $0, 1f + ldl $0, 0($0) + cmpeq $31, $0, $0 +1: stl $0, __libc_multiple_libcs + /* If so, argc et al are in a0-a2 already. Otherwise, load them. */ + bne $0, 2f + ldl $16, 0($30) + lda $17, 8($30) + s8addq $16, $17, $18 + addq $18, 8, $18 +2: br $31, " ASM_ALPHA_NG_SYMBOL_PREFIX #INIT "..ng + .set noat + .end " #NAME); From 77d5a2df47367de3731dc97c0d71346f6e76b03a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 22 Dec 1997 20:20:09 +0000 Subject: [PATCH 1135/4487] Add xxx64 alias for fstatfs, statfs, getrlimit, setrlimit, ftruncate and truncate. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index d3bc033b3d..af964718bc 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -23,10 +23,14 @@ mmap - mmap 6 __mmap mmap llseek EXTRA lseek 3 __llseek llseek lseek64 pread EXTRA pread 4 __pread pread __pread64 pread64 pwrite EXTRA pwrite 4 __pwrite pwrite __pwrite64 pwrite64 +fstatfs - fstatfs 2 __fstatfs fstatfs fstatfs64 +statfs - statfs 2 __statfs statfs statfs64 +getrlimit - getrlimit 2 getrlimit getrlimit64 +setrlimit - setrlimit 2 setrlimit setrlimit64 +ftruncate - ftruncate 2 ftruncate ftruncate64 +truncate - truncate 2 truncate truncate64 # these are actually common with the x86: -fstatfs - fstatfs 2 __fstatfs fstatfs -statfs - statfs 2 __statfs statfs sys_ustat ustat ustat 2 __syscall_ustat sys_mknod xmknod mknod 3 __syscall_mknod From 14bb1c1b08b03f07254bfc19bed967595b157157 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 22 Dec 1997 20:20:47 +0000 Subject: [PATCH 1136/4487] LFS support. --- sysdeps/unix/sysv/linux/alpha/fstatfs64.c | 1 + sysdeps/unix/sysv/linux/alpha/ftruncate64.c | 1 + sysdeps/unix/sysv/linux/alpha/getrlimit64.c | 1 + sysdeps/unix/sysv/linux/alpha/readdir.c | 4 ++++ sysdeps/unix/sysv/linux/alpha/readdir64.c | 1 + sysdeps/unix/sysv/linux/alpha/readdir64_r.c | 1 + sysdeps/unix/sysv/linux/alpha/readdir_r.c | 4 ++++ sysdeps/unix/sysv/linux/alpha/setrlimit64.c | 1 + sysdeps/unix/sysv/linux/alpha/statfs64.c | 1 + sysdeps/unix/sysv/linux/alpha/truncate64.c | 1 + 10 files changed, 16 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/fstatfs64.c create mode 100644 sysdeps/unix/sysv/linux/alpha/ftruncate64.c create mode 100644 sysdeps/unix/sysv/linux/alpha/getrlimit64.c create mode 100644 sysdeps/unix/sysv/linux/alpha/readdir.c create mode 100644 sysdeps/unix/sysv/linux/alpha/readdir64.c create mode 100644 sysdeps/unix/sysv/linux/alpha/readdir64_r.c create mode 100644 sysdeps/unix/sysv/linux/alpha/readdir_r.c create mode 100644 sysdeps/unix/sysv/linux/alpha/setrlimit64.c create mode 100644 sysdeps/unix/sysv/linux/alpha/statfs64.c create mode 100644 sysdeps/unix/sysv/linux/alpha/truncate64.c diff --git a/sysdeps/unix/sysv/linux/alpha/fstatfs64.c b/sysdeps/unix/sysv/linux/alpha/fstatfs64.c new file mode 100644 index 0000000000..2be4e59ba4 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/fstatfs64.c @@ -0,0 +1 @@ +/* fstatfs64 is the same as fstatfs. */ diff --git a/sysdeps/unix/sysv/linux/alpha/ftruncate64.c b/sysdeps/unix/sysv/linux/alpha/ftruncate64.c new file mode 100644 index 0000000000..673a8b525a --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/ftruncate64.c @@ -0,0 +1 @@ +/* ftruncate64 is the same as ftruncate. */ diff --git a/sysdeps/unix/sysv/linux/alpha/getrlimit64.c b/sysdeps/unix/sysv/linux/alpha/getrlimit64.c new file mode 100644 index 0000000000..9feab0e6b8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/getrlimit64.c @@ -0,0 +1 @@ +/* getrlimit64 is the same as getrlimit. */ diff --git a/sysdeps/unix/sysv/linux/alpha/readdir.c b/sysdeps/unix/sysv/linux/alpha/readdir.c new file mode 100644 index 0000000000..96a6a76945 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/readdir.c @@ -0,0 +1,4 @@ +#define readdir64 __no_readdir64_decl +#include +#undef readdir64 +weak_alias (__readdir, readdir64) diff --git a/sysdeps/unix/sysv/linux/alpha/readdir64.c b/sysdeps/unix/sysv/linux/alpha/readdir64.c new file mode 100644 index 0000000000..9796431dc4 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/readdir64.c @@ -0,0 +1 @@ +/* readdir64 is in readdir.c */ diff --git a/sysdeps/unix/sysv/linux/alpha/readdir64_r.c b/sysdeps/unix/sysv/linux/alpha/readdir64_r.c new file mode 100644 index 0000000000..b8fe9a31b4 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/readdir64_r.c @@ -0,0 +1 @@ +/* readdir64_r is in readdir_r.c */ diff --git a/sysdeps/unix/sysv/linux/alpha/readdir_r.c b/sysdeps/unix/sysv/linux/alpha/readdir_r.c new file mode 100644 index 0000000000..adb92db6af --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/readdir_r.c @@ -0,0 +1,4 @@ +#define readdir64_r __no_readdir64_r_decl +#include +#undef readdir64_r +weak_alias (__readdir_r, readdir64_r) diff --git a/sysdeps/unix/sysv/linux/alpha/setrlimit64.c b/sysdeps/unix/sysv/linux/alpha/setrlimit64.c new file mode 100644 index 0000000000..8edcff0086 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/setrlimit64.c @@ -0,0 +1 @@ +/* setrlimit64 is the same as setrlimit. */ diff --git a/sysdeps/unix/sysv/linux/alpha/statfs64.c b/sysdeps/unix/sysv/linux/alpha/statfs64.c new file mode 100644 index 0000000000..06bc68826f --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/statfs64.c @@ -0,0 +1 @@ +/* statfs64 is the same as statfs. */ diff --git a/sysdeps/unix/sysv/linux/alpha/truncate64.c b/sysdeps/unix/sysv/linux/alpha/truncate64.c new file mode 100644 index 0000000000..8999768874 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/truncate64.c @@ -0,0 +1 @@ +/* truncate64 is the same as truncate. */ From ceb64ad89a9214af548e90bf5f521c10a9cd52ba Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 22 Dec 1997 20:21:44 +0000 Subject: [PATCH 1137/4487] Define __ipc_pid_t. --- sysdeps/unix/sysv/linux/alpha/bits/types.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h index 9acdf0c490..9033fdb362 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/types.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h @@ -77,6 +77,9 @@ typedef long int __swblk_t; /* Type of a swap block maybe? */ typedef long int __clock_t; typedef int __key_t; /* Type of a SYSV IPC key. */ +/* Used in `struct shmid_ds'. */ +typedef int __ipc_pid_t; + /* One element in the file descriptor mask array. */ typedef unsigned long int __fd_mask; From 5eb1fd786472bd91e50c2afa02fc5a2d16a7ed8b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 22 Dec 1997 20:42:51 +0000 Subject: [PATCH 1138/4487] Types for Linux MIPS. --- sysdeps/unix/sysv/linux/mips/bits/types.h | 130 ++++++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/mips/bits/types.h diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h new file mode 100644 index 0000000000..56075d13c2 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/bits/types.h @@ -0,0 +1,130 @@ +/* Copyright (C) 1991, 92, 94, 95, 96, 97 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* + * Never include this file directly; use instead. + */ + +#ifndef _BITS_TYPES_H +#define _BITS_TYPES_H 1 + +#include + +/* Convenience types. */ +typedef unsigned char __u_char; +typedef unsigned short __u_short; +typedef unsigned int __u_int; +typedef unsigned long __u_long; +#ifdef __GNUC__ +typedef unsigned long long int __u_quad_t; +typedef long long int __quad_t; +#else +typedef struct + { + long int __val[2]; + } __quad_t; +typedef struct + { + __u_long __val[2]; + } __u_quad_t; +#endif +typedef signed char __int8_t; +typedef unsigned char __uint8_t; +typedef signed short int __int16_t; +typedef unsigned short int __uint16_t; +typedef signed int __int32_t; +typedef unsigned int __uint32_t; +#ifdef __GNUC__ +typedef signed long long int __int64_t; +typedef unsigned long long int __uint64_t; +#endif +typedef __quad_t *__qaddr_t; + +typedef __u_quad_t __dev_t; /* Type of device numbers. */ +typedef __u_int __uid_t; /* Type of user identifications. */ +typedef __u_int __gid_t; /* Type of group identifications. */ +typedef __u_long __ino_t; /* Type of file serial numbers. */ +typedef __u_int __mode_t; /* Type of file attribute bitmasks. */ +typedef __u_int __nlink_t; /* Type of file link counts. */ +typedef long int __off_t; /* Type of file sizes and offsets. */ +typedef __quad_t __loff_t; /* Type of file sizes and offsets. */ +typedef int __pid_t; /* Type of process identifications. */ +typedef int __ssize_t; /* Type of a byte count, or error. */ +typedef long int __rlim_t; /* Type of resource counts. */ +typedef __quad_t __rlim64_t; /* Type of resource counts (LFS). */ +typedef __u_int __id_t; /* General type for ID. */ + +typedef struct + { + int __val[2]; + } __fsid_t; /* Type of file system IDs. */ + +/* Everythin' else. */ +typedef int __daddr_t; /* The type of a disk address. */ +typedef char *__caddr_t; +typedef long int __time_t; +typedef long int __swblk_t; /* Type of a swap block maybe? */ + +typedef long int __clock_t; + +/* One element in the file descriptor mask array. */ +typedef unsigned long int __fd_mask; + +/* Number of descriptors that can fit in an `fd_set'. */ +#define __FD_SETSIZE 1024 + +/* It's easier to assume 8-bit bytes than to get CHAR_BIT. */ +#define __NFDBITS (8 * sizeof (__fd_mask)) +#define __FDELT(d) ((d) / __NFDBITS) +#define __FDMASK(d) ((__fd_mask) 1 << ((d) % __NFDBITS)) + +/* fd_set for select and pselect. */ +typedef struct + { + /* XPG4.2 requires this member name. */ + __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS]; + } __fd_set; + + +typedef int __key_t; + +/* Used in `struct shmid_ds'. */ +typedef long int __ipc_pid_t; + + +/* Types from the Large File Support interface. */ + +/* Type to count number os disk blocks. */ +typedef __u_long __blkcnt_t; +typedef __u_quad_t __blkcnt64_t; + +/* Type to count file system blocks. */ +typedef long int __fsblkcnt_t; +typedef __quad_t __fsblkcnt64_t; + +/* Type to count file system inodes. */ +typedef __u_long __fsfilcnt_t; +typedef __u_quad_t __fsfilcnt64_t; + +/* Type of file serial numbers. */ +typedef __u_long __ino64_t; + +/* Type of file sizes and offsets. */ +typedef __loff_t __off64_t; + +#endif /* bits/types.h */ From fa6e5ab44cb558293b6aea58e93f36b5d0b6cad2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 25 Dec 1997 12:14:08 +0000 Subject: [PATCH 1139/4487] Linux/Alpha specific route.h --- sysdeps/unix/sysv/linux/alpha/net/route.h | 140 ++++++++++++++++++++++ 1 file changed, 140 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/net/route.h diff --git a/sysdeps/unix/sysv/linux/alpha/net/route.h b/sysdeps/unix/sysv/linux/alpha/net/route.h new file mode 100644 index 0000000000..6c7d8dd015 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/net/route.h @@ -0,0 +1,140 @@ +/* Copyright (C) 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* Based on the 4.4BSD and Linux version of this file. */ + +#ifndef _NET_ROUTE_H +#define _NET_ROUTE_H 1 + +#include +#include +#include +#include + + +/* This structure gets passed by the SIOCADDRT and SIOCDELRT calls. */ +struct rtentry + { + unsigned long int rt_pad1; + struct sockaddr rt_dst; /* Target address. */ + struct sockaddr rt_gateway; /* Gateway addr (RTF_GATEWAY). */ + struct sockaddr rt_genmask; /* Target network mask (IP). */ + unsigned short int rt_flags; + short int rt_pad2; + unsigned long int rt_pad3; + unsigned char rt_tos; + unsigned char rt_class; + short int rt_pad4[3]; + short int rt_metric; /* +1 for binary compatibility! */ + char *rt_dev; /* Forcing the device at add. */ + unsigned long int rt_mtu; /* Per route MTU/Window. */ + unsigned long int rt_window; /* Window clamping. */ + unsigned short int rt_irtt; /* Initial RTT. */ + }; +/* Compatibility hack. */ +#define rt_mss rt_mtu + + +struct in6_rtmsg + { + struct in6_addr rtmsg_dst; + struct in6_addr rtmsg_src; + struct in6_addr rtmsg_gateway; + u_int32_t rtmsg_type; + u_int16_t rtmsg_dst_len; + u_int16_t rtmsg_src_len; + u_int32_t rtmsg_metric; + unsigned long int rtmsg_info; + u_int32_t rtmsg_flags; + int rtmsg_ifindex; + }; + + +#define RTF_UP 0x0001 /* Route usable. */ +#define RTF_GATEWAY 0x0002 /* Destination is a gateway. */ + +#define RTF_HOST 0x0004 /* Host entry (net otherwise). */ +#define RTF_REINSTATE 0x0008 /* Reinstate route after timeout. */ +#define RTF_DYNAMIC 0x0010 /* Created dyn. (by redirect). */ +#define RTF_MODIFIED 0x0020 /* Modified dyn. (by redirect). */ +#define RTF_MTU 0x0040 /* Specific MTU for this route. */ +#define RTF_MSS RTF_MTU /* Compatibility. */ +#define RTF_WINDOW 0x0080 /* Per route window clamping. */ +#define RTF_IRTT 0x0100 /* Initial round trip time. */ +#define RTF_REJECT 0x0200 /* Reject route. */ +#define RTF_STATIC 0x0400 /* Manually injected route. */ +#define RTF_XRESOLVE 0x0800 /* External resolver. */ +#define RTF_NOFORWARD 0x1000 /* Forwarding inhibited. */ +#define RTF_THROW 0x2000 /* Go to next class. */ +#define RTF_NOPMTUDISC 0x4000 /* Do not send packets with DF. */ + +/* for IPv6 */ +#define RTF_DEFAULT 0x00010000 /* default - learned via ND */ +#define RTF_ALLONLINK 0x00020000 /* fallback, no routers on link */ +#define RTF_ADDRCONF 0x00040000 /* addrconf route - RA */ + +#define RTF_LINKRT 0x00100000 /* link specific - device match */ +#define RTF_NONEXTHOP 0x00200000 /* route with no nexthop */ + +#define RTF_CACHE 0x01000000 /* cache entry */ +#define RTF_FLOW 0x02000000 /* flow significant route */ +#define RTF_POLICY 0x04000000 /* policy route */ + +#define RTCF_VALVE 0x00200000 +#define RTCF_MASQ 0x00400000 +#define RTCF_NAT 0x00800000 +#define RTCF_DOREDIRECT 0x01000000 +#define RTCF_LOG 0x02000000 +#define RTCF_DIRECTSRC 0x04000000 + +#define RTF_LOCAL 0x80000000 +#define RTF_INTERFACE 0x40000000 +#define RTF_MULTICAST 0x20000000 +#define RTF_BROADCAST 0x10000000 +#define RTF_NAT 0x08000000 + +#define RTF_ADDRCLASSMASK 0xF8000000 +#define RT_ADDRCLASS(flags) ((__u_int32_t) flags >> 23) + +#define RT_TOS(tos) ((tos) & IPTOS_TOS_MASK) + +#define RT_LOCALADDR(flags) ((flags & RTF_ADDRCLASSMASK) \ + == (RTF_LOCAL|RTF_INTERFACE)) + +#define RT_CLASS_UNSPEC 0 +#define RT_CLASS_DEFAULT 253 + +#define RT_CLASS_MAIN 254 +#define RT_CLASS_LOCAL 255 +#define RT_CLASS_MAX 255 + + +#define RTMSG_ACK NLMSG_ACK +#define RTMSG_OVERRUN NLMSG_OVERRUN + +#define RTMSG_NEWDEVICE 0x11 +#define RTMSG_DELDEVICE 0x12 +#define RTMSG_NEWROUTE 0x21 +#define RTMSG_DELROUTE 0x22 +#define RTMSG_NEWRULE 0x31 +#define RTMSG_DELRULE 0x32 +#define RTMSG_CONTROL 0x40 + +#define RTMSG_AR_FAILED 0x51 /* Address Resolution failed. */ + +#endif /* net/route.h */ From 91c6e1837b001af4dd9466b7cf05d8b99eac2360 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 28 Dec 1997 15:22:52 +0000 Subject: [PATCH 1140/4487] Replace sa_handler with k_sa_handler. --- sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h b/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h index 6f8bc9bcd4..f8c42e0a1e 100644 --- a/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h +++ b/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h @@ -1,7 +1,7 @@ /* This is the sigaction struction from the Linux 2.1.20 kernel. */ struct old_kernel_sigaction { - __sighandler_t sa_handler; + __sighandler_t k_sa_handler; unsigned long sa_mask; unsigned int sa_flags; }; From 7a114d161c2a00b84d4d50e22c116dacf48f9e33 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 28 Dec 1997 15:23:32 +0000 Subject: [PATCH 1141/4487] Empty file since mmap == mmap64. --- sysdeps/unix/sysv/linux/alpha/mmap64.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/mmap64.c diff --git a/sysdeps/unix/sysv/linux/alpha/mmap64.c b/sysdeps/unix/sysv/linux/alpha/mmap64.c new file mode 100644 index 0000000000..0dbd384a6a --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/mmap64.c @@ -0,0 +1 @@ +/* mmap64 is the same as mmap. */ From 18199b1e506888fb47b4b59e2a70755020e9e83e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 28 Dec 1997 15:24:24 +0000 Subject: [PATCH 1142/4487] Add __mmap64 and mmap64 aliases to mmap. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index af964718bc..9406892124 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -19,13 +19,13 @@ osf_sigprocmask - osf_sigprocmask 2 __osf_sigprocmask getpeername - getpeername 3 __getpeername getpeername getpriority - getpriority 2 __getpriority getpriority -mmap - mmap 6 __mmap mmap +mmap - mmap 6 __mmap mmap __mmap64 mmap64 llseek EXTRA lseek 3 __llseek llseek lseek64 pread EXTRA pread 4 __pread pread __pread64 pread64 pwrite EXTRA pwrite 4 __pwrite pwrite __pwrite64 pwrite64 fstatfs - fstatfs 2 __fstatfs fstatfs fstatfs64 statfs - statfs 2 __statfs statfs statfs64 -getrlimit - getrlimit 2 getrlimit getrlimit64 +getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64 setrlimit - setrlimit 2 setrlimit setrlimit64 ftruncate - ftruncate 2 ftruncate ftruncate64 truncate - truncate 2 truncate truncate64 From 5faf38aeabb90364bc83b2b8ccd96c20157ef058 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 21 Jan 1998 17:00:32 +0000 Subject: [PATCH 1143/4487] Add definition of FP_ILOGB0 and FP_ILOGNAN. --- sysdeps/alpha/fpu/bits/mathdef.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysdeps/alpha/fpu/bits/mathdef.h b/sysdeps/alpha/fpu/bits/mathdef.h index 1c259403f5..2ff626d089 100644 --- a/sysdeps/alpha/fpu/bits/mathdef.h +++ b/sysdeps/alpha/fpu/bits/mathdef.h @@ -63,5 +63,9 @@ typedef double double_t; #endif +/* The values returned by `ilogb' for 0 and NaN respectively. */ +#define FP_ILOGB0 0x80000001 +#define FP_ILOGBNAN 0x7fffffff + /* Number of decimal digits for the `double' type. */ #define DECIMAL_DIG 15 From 41fe80e1bc518e530e860721120a80acd8d67f4b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 21 Jan 1998 17:03:20 +0000 Subject: [PATCH 1144/4487] Allow __socket to be redefined. --- sysdeps/unix/sysv/linux/arm/socket.S | 12 ++++++++---- sysdeps/unix/sysv/linux/m68k/socket.S | 12 ++++++++---- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/socket.S b/sysdeps/unix/sysv/linux/arm/socket.S index 4d877e51d5..1940061dda 100644 --- a/sysdeps/unix/sysv/linux/arm/socket.S +++ b/sysdeps/unix/sysv/linux/arm/socket.S @@ -31,8 +31,12 @@ The .S files for the other calls just #define socket and #include this. */ -.globl P(__,socket) -ENTRY (P(__,socket)) +#ifndef __socket +#define __socket P(__,socket) +#endif + +.globl __socket +ENTRY (__socket) /* Do the system call trap. */ swi SYS_ify(socketcall) @@ -44,6 +48,6 @@ ENTRY (P(__,socket)) /* Successful; return the syscall's value. */ RETINSTR(mov,pc,r14) -PSEUDO_END (P(__,socket)) +PSEUDO_END (__socket) -weak_alias (P(__,socket), socket) +weak_alias (__socket, socket) diff --git a/sysdeps/unix/sysv/linux/m68k/socket.S b/sysdeps/unix/sysv/linux/m68k/socket.S index 51aaa4b6f9..81e5a213dd 100644 --- a/sysdeps/unix/sysv/linux/m68k/socket.S +++ b/sysdeps/unix/sysv/linux/m68k/socket.S @@ -31,8 +31,12 @@ The .S files for the other calls just #define socket and #include this. */ -.globl P(__,socket) -ENTRY (P(__,socket)) +#ifndef __socket +#define __socket P(__,socket) +#endif + +.globl __socket +ENTRY (__socket) /* Save registers. */ move.l %d2, %a0 @@ -56,6 +60,6 @@ ENTRY (P(__,socket)) /* Successful; return the syscall's value. */ rts -PSEUDO_END (P(__,socket)) +PSEUDO_END (__socket) -weak_alias (P(__,socket), socket) +weak_alias (__socket, socket) From 909a2333c71dfe76e5f2a60c085ae2cb545a4312 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 21 Jan 1998 17:03:32 +0000 Subject: [PATCH 1145/4487] Define the cancelable socket functions as __libc_xxx with __xxx as weak alias. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 16 ++++++++-------- sysdeps/unix/sysv/linux/mips/syscalls.list | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 9406892124..17c55f0991 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -36,20 +36,20 @@ sys_mknod xmknod mknod 3 __syscall_mknod # override select.S in parent directory: select - select 5 __select select -accept - accept 3 __accept accept +accept - accept 3 __libc_accept __accept accept bind - bind 3 __bind bind -connect - connect 3 __connect connect +connect - connect 3 __libc_connect __connect connect getpeername - getpeername 3 __getpeername getpeername getsockname - getsockname 3 __getsockname getsockname getsockopt - getsockopt 5 __getsockopt getsockopt listen - listen 2 __listen listen -recv - recv 4 __recv recv -recvfrom - recvfrom 6 __recvfrom recvfrom -recvmsg - recvmsg 3 __recvmsg recvmsg +recv - recv 4 __libc_recv __recv recv +recvfrom - recvfrom 6 __libc_recvfrom __recvfrom recvfrom +recvmsg - recvmsg 3 __libc_recvmsg __recvmsg recvmsg ptrace - ptrace 4 __ptrace ptrace -send - send 4 __send send -sendmsg - sendmsg 3 __sendmsg sendmsg -sendto - sendto 6 __sendto sendto +send - send 4 __libc_send __send send +sendmsg - sendmsg 3 __libc_sendmsg __sendmsg sendmsg +sendto - sendto 6 __libc_sendto __sendto sendto setsockopt - setsockopt 5 __setsockopt setsockopt shutdown - shutdown 2 __shutdown shutdown socketpair - socketpair 4 __socketpair socketpair diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index 6dd9cd81c5..1c9c095ed3 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -16,19 +16,19 @@ sigsuspend - sigsuspend 1 __sigsuspend sigsuspend # Socket functions; Linux/MIPS doesn't use the socketcall(2) wrapper; # it's provided for compatibility, though. # -accept - accept 3 __accept accept +ccept - accept 3 __libc_accept __accept accept bind - bind 3 __bind bind -connect - connect 3 __connect connect +connect - connect 3 __libc_connect __connect connect getpeername - getpeername 3 __getpeername getpeername getsockname - getsockname 3 __getsockname getsockname getsockopt - getsockopt 5 __getsockopt getsockopt listen - listen 2 __listen listen -recv - recv 4 __recv recv -recvfrom - recvfrom 6 __recvfrom recvfrom -recvmsg - recvmsg 3 __recvmsg recvmsg -send - send 4 __send send -sendmsg - sendmsg 3 __sendmsg sendmsg -sendto - sendto 6 __sendto sendto +recv - recv 4 __libc_recv __recv recv +recvfrom - recvfrom 6 __libc_recvfrom __recvfrom recvfrom +recvmsg - recvmsg 3 __libc_recvmsg __recvmsg recvmsg +send - send 4 __libc_send __send send +sendmsg - sendmsg 3 __libc_sendmsg __sendmsg sendmsg +sendto - sendto 6 __libc_sendto __sendto sendto setsockopt - setsockopt 5 __setsockopt setsockopt shutdown - shutdown 2 __shutdown shutdown socket - socket 3 __socket socket From 9ba537d289465d5ff57eaf2106ef61605359ddb6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 25 Jan 1998 03:51:19 +0000 Subject: [PATCH 1146/4487] (ELF_MACHINE_RUNTIME_TRAMPOLINE): Remove the 3rd arg and add declaration for _dl_runtime_resolve and _dl_runtime_profile. --- sysdeps/alpha/dl-machine.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index cd4f86a69c..e42ed3db68 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. Alpha version. - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson . @@ -205,7 +205,9 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) #else #define ELF_MACHINE_RUNTIME_TRAMPOLINE \ TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup, imb); \ - strong_alias (_dl_runtime_resolve, _dl_runtime_profile, #nop); + extern void _dl_runtime_resolve (void); \ + extern void _dl_runtime_profile (void); \ + strong_alias (_dl_runtime_resolve, _dl_runtime_profile); #endif /* Initial entry point code for the dynamic linker. From 92ce4393c99760b7365615361019013eb42715c9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 25 Jan 1998 16:49:50 +0000 Subject: [PATCH 1147/4487] Add definition of __t_scalar_t and __t_uscalar_t. --- sysdeps/unix/sysv/linux/alpha/bits/types.h | 6 +++++- sysdeps/unix/sysv/linux/mips/bits/types.h | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h index 9033fdb362..70b7d7294f 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/types.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 92, 94, 95, 96, 97 Free Software Foundation, Inc. +/* Copyright (C) 1991, 92, 94, 95, 96, 97, 98 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 @@ -103,4 +103,8 @@ typedef struct __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS]; } __fd_set; +/* Used in XTI. */ +typedef int __t_scalar_t; +typedef unsigned int __t_uscalar_t; + #endif /* bits/types.h */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h index 56075d13c2..1d72de0321 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/types.h +++ b/sysdeps/unix/sysv/linux/mips/bits/types.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 92, 94, 95, 96, 97 Free Software Foundation, Inc. +/* Copyright (C) 1991, 92, 94, 95, 96, 97, 98 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 @@ -127,4 +127,8 @@ typedef __u_long __ino64_t; /* Type of file sizes and offsets. */ typedef __loff_t __off64_t; +/* Used in XTI. */ +typedef int __t_scalar_t; +typedef unsigned int __t_uscalar_t; + #endif /* bits/types.h */ From cdf0977855fcef0a094d473c5f66080197efcf61 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 25 Jan 1998 16:55:24 +0000 Subject: [PATCH 1148/4487] Define SIG_HOLD. --- sysdeps/unix/sysv/linux/alpha/bits/signum.h | 6 +++++- sysdeps/unix/sysv/linux/mips/bits/signum.h | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/signum.h b/sysdeps/unix/sysv/linux/alpha/bits/signum.h index ac5c34cd1a..6b1399eb12 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/signum.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/signum.h @@ -1,5 +1,5 @@ /* Signal number definitions. Linux/Alpha version. - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998 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 @@ -24,6 +24,10 @@ #define SIG_DFL ((__sighandler_t) 0) /* Default action. */ #define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */ +#ifdef __USE_UNIX98 +# define SIG_HOLD ((__sighandler_t) 2) /* Add signal to hold mask. */ +#endif + /* * Linux/AXP has different signal numbers that Linux/i386: I'm trying * to make it OSF/1 binary compatible, at least for normal binaries. diff --git a/sysdeps/unix/sysv/linux/mips/bits/signum.h b/sysdeps/unix/sysv/linux/mips/bits/signum.h index 5254a2b420..c30abe3841 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/signum.h +++ b/sysdeps/unix/sysv/linux/mips/bits/signum.h @@ -1,5 +1,5 @@ /* Signal number definitions. Linux version. - Copyright (C) 1995, 1997 Free Software Foundation, Inc. + Copyright (C) 1995, 1997, 1998 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 @@ -24,6 +24,10 @@ #define __need_signums #include +#ifdef __USE_UNIX98 +# define SIG_HOLD ((__sighandler_t) 2) /* Add signal to hold mask. */ +#endif + #endif /* included. */ #define __need__nsig From 649d6c334b725b588e1cbb2bfa9c333a6f882115 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 25 Jan 1998 17:00:01 +0000 Subject: [PATCH 1149/4487] Define _STATBUF_ST_RDEV. --- sysdeps/unix/sysv/linux/alpha/bits/stat.h | 6 ++++-- sysdeps/unix/sysv/linux/mips/bits/stat.h | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/stat.h b/sysdeps/unix/sysv/linux/alpha/bits/stat.h index 319ff96c51..cb4ab78268 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/stat.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998 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 @@ -84,7 +84,9 @@ struct stat64 }; #endif -#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ +/* Tell code we have these members. */ +#define _STATBUF_ST_BLKSIZE +#define _STATBUF_ST_RDEV /* Encoding of the file mode. */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h index cd586d4433..3bcf1a9299 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/stat.h +++ b/sysdeps/unix/sysv/linux/mips/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995, 1996, 1997, 1998 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 @@ -112,7 +112,9 @@ struct stat64 }; #endif -#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ +/* Tell code we have these members. */ +#define _STATBUF_ST_BLKSIZE +#define _STATBUF_ST_RDEV /* Encoding of the file mode. */ From 3b56dfe148b3aa5e2c5a4dc2ff448cc21e642be3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 25 Jan 1998 19:12:46 +0000 Subject: [PATCH 1150/4487] Add change to support sigaction on kernels > 2.1.7x. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 17c55f0991..9b676185e2 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -16,6 +16,7 @@ semget - semget 3 __semget semget semctl - semctl 4 __semctl semctl osf_sigprocmask - osf_sigprocmask 2 __osf_sigprocmask +s_sigaction sigaction osf_sigaction 3 __syscall_sigaction getpeername - getpeername 3 __getpeername getpeername getpriority - getpriority 2 __getpriority getpriority From 18a702a8a33814281e7eac841b58df84244a0d51 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 26 Jan 1998 22:04:53 +0000 Subject: [PATCH 1151/4487] * sysdeps/alpha/dl-machine.h (TRAMPOLINE_TEMPLATE): Move declaration of the trampoline function into the macro. * sysdeps/unix/sysv/linux/alpha/clone.S: Fix ldgp for PROF. * sysdeps/unix/sysv/linux/alpha/syscalls.list: Revert last change; kernel 2.1.82 has this fixed. * sysdeps/unix/sysv/linux/alpha/rt_sigaction.S: New file. * sysdeps/unix/sysv/linux/alpha/sys/ucontext.h: New file. --- sysdeps/alpha/dl-machine.h | 6 +- sysdeps/unix/sysv/linux/alpha/clone.S | 6 +- sysdeps/unix/sysv/linux/alpha/rt_sigaction.S | 75 ++++++++++++++++++++ sysdeps/unix/sysv/linux/alpha/sys/ucontext.h | 41 +++++++++++ sysdeps/unix/sysv/linux/alpha/syscalls.list | 1 - 5 files changed, 123 insertions(+), 6 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/alpha/rt_sigaction.S create mode 100644 sysdeps/unix/sysv/linux/alpha/sys/ucontext.h diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index e42ed3db68..455fd7b695 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -123,7 +123,9 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) /* This code is used in dl-runtime.c to call the `fixup' function and then redirect to the address it returns. */ -#define TRAMPOLINE_TEMPLATE(tramp_name, fixup_name, IMB) asm ( "\ +#define TRAMPOLINE_TEMPLATE(tramp_name, fixup_name, IMB) \ + extern void tramp_name (void); \ + asm ( "\ .globl " #tramp_name " .ent " #tramp_name " " #tramp_name ": @@ -205,8 +207,6 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) #else #define ELF_MACHINE_RUNTIME_TRAMPOLINE \ TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup, imb); \ - extern void _dl_runtime_resolve (void); \ - extern void _dl_runtime_profile (void); \ strong_alias (_dl_runtime_resolve, _dl_runtime_profile); #endif diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S index 3f097fe068..930e379296 100644 --- a/sysdeps/unix/sysv/linux/alpha/clone.S +++ b/sysdeps/unix/sysv/linux/alpha/clone.S @@ -28,14 +28,16 @@ .text ENTRY(__clone) - .frame sp,0,ra,0 #ifdef PROF + ldgp gp,0(pv) .set noat lda AT, _mcount jsr AT, (AT), _mcount .set at -#endif .prologue 1 +#else + .prologue 0 +#endif /* Sanity check arguments. */ ldiq v0,EINVAL diff --git a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S new file mode 100644 index 0000000000..bcb2be0e28 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S @@ -0,0 +1,75 @@ +/* Copyright (C) 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson , 1998 + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +/* On Alpha we desparately want to avoid having to issue an imb. Ordinarily + the kernel would have to issue one after setting up the signal return + stack, but the Linux rt_sigaction syscall is prepared to accept a pointer + to the sigreturn syscall, instead of inlining it on the stack. + + This just about halves signal delivery time. */ + + + .text +ENTRY(__syscall_rt_sigaction) + .frame sp,0,ra,0 +#ifdef PROF + ldgp gp,0(pv) + .set noat + lda AT, _mcount + jsr AT, (AT), _mcount + .set at +#endif + .prologue 1 + + beq a1, 0f + ldl t0, 8(a1) + lda a4, sigreturn-__syscall_rt_sigaction(pv) + lda t1, rt_sigreturn-__syscall_rt_sigaction(pv) + and t0, 0x00000040, t0 # SA_SIGINFO + cmovne t0, t1, a4 +0: ldi v0,__NR_sigaction + callsys + bne a3,1f + ret + +1: br gp,2f +2: ldgp gp,0(gp) + jmp __syscall_error + +END(__syscall_rt_sigaction) + + .align 5 + .ent sigreturn +sigreturn: + .prologue 0 + mov sp,a0 + ldi v0,__NR_sigreturn + callsys + .end sigreturn + + .align 4 + .ent rt_sigreturn +rt_sigreturn: + .prologue 0 + mov sp,a0 + ldi v0,__NR_rt_sigreturn + callsys + .end rt_sigreturn diff --git a/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h b/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h new file mode 100644 index 0000000000..349dd1e2a2 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h @@ -0,0 +1,41 @@ +/* Copyright (C) 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_UCONTEXT_H +#define _SYS_UCONTEXT_H 1 + +#include +#include + +#include + +/* A machine context is exactly a sigcontext. */ +typedef struct sigcontext mcontext_t; + +/* Userlevel context. */ +typedef struct ucontext + { + unsigned long int uc_flags; + struct ucontext *uc_links; + unsigned long __uc_osf_sigmask; + stack_t uc_stack; + mcontext_t uc_mcontext; + __sigset_t uc_sigmask; + } ucontext_t; + +#endif /* sys/ucontext.h */ diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 9b676185e2..17c55f0991 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -16,7 +16,6 @@ semget - semget 3 __semget semget semctl - semctl 4 __semctl semctl osf_sigprocmask - osf_sigprocmask 2 __osf_sigprocmask -s_sigaction sigaction osf_sigaction 3 __syscall_sigaction getpeername - getpeername 3 __getpeername getpeername getpriority - getpriority 2 __getpriority getpriority From 651f8ea8fc0638956e444795eb6d8612e1910aed Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 26 Jan 1998 22:52:51 +0000 Subject: [PATCH 1152/4487] * sysdeps/unix/sysv/linux/alpha/bits/mman.h: Dyke out the unimplemented OSF/1 definitions so that they are not accidentally seen. --- sysdeps/unix/sysv/linux/alpha/bits/mman.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/mman.h b/sysdeps/unix/sysv/linux/alpha/bits/mman.h index 081a00441e..1411c85831 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/mman.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/Alpha version. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 1998 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 @@ -50,9 +50,9 @@ # define MAP_ANON MAP_ANONYMOUS #endif -/* Not used by Linux, but here to make sure we don't clash with OSF/1 - defines. */ -#ifdef __USE_BSD +/* Not used by Linux, but here to make sure we don't clash with + OSF/1 defines. */ +#if 0 && defined(__USE_BSD) # define MAP_HASSEMAPHORE 0x0200 # define MAP_INHERIT 0x0400 # define MAP_UNALIGNED 0x0800 From cbb1b7f55cb833462a745b93cdd54892f83262ab Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 30 Jan 1998 11:37:34 +0000 Subject: [PATCH 1153/4487] Add net/route.h. --- sysdeps/unix/sysv/linux/alpha/Dist | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist index 715fda7bd3..5b5dca44da 100644 --- a/sysdeps/unix/sysv/linux/alpha/Dist +++ b/sysdeps/unix/sysv/linux/alpha/Dist @@ -9,6 +9,7 @@ ioperm.c kernel_sigaction.h kernel_stat.h kernel_termios.h +net/route.h sys/acct.h sys/io.h sys/procfs.h From caec183cea067d87c031a02b35f01cc5df4b3f3e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 30 Jan 1998 11:38:04 +0000 Subject: [PATCH 1154/4487] Add bits/mman.h. --- sysdeps/unix/sysv/linux/arm/Dist | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/arm/Dist b/sysdeps/unix/sysv/linux/arm/Dist index 738b9cc542..d987285445 100644 --- a/sysdeps/unix/sysv/linux/arm/Dist +++ b/sysdeps/unix/sysv/linux/arm/Dist @@ -1 +1,2 @@ +bits/mman.h clone.S From c44a108279a950191fe171f5026e82bce432ea12 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 30 Jan 1998 11:39:21 +0000 Subject: [PATCH 1155/4487] Not to be used. --- sysdeps/unix/sysv/linux/m68k/sigreturn.S | 29 ------------------------ 1 file changed, 29 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/m68k/sigreturn.S diff --git a/sysdeps/unix/sysv/linux/m68k/sigreturn.S b/sysdeps/unix/sysv/linux/m68k/sigreturn.S deleted file mode 100644 index 34c0a91952..0000000000 --- a/sysdeps/unix/sysv/linux/m68k/sigreturn.S +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 1996, 1997 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include - -.text -ENTRY (__sigreturn) - addq.l #4, %sp /* Pop the return PC. */ - DO_CALL (#SYS_ify (sigreturn), 0) - /* Do the system call; it never returns. */ - /* NOTREACHED */ -END (__sigreturn) - -weak_alias (__sigreturn, sigreturn) From de0268b44e3fd3c772e8249409be99b9bb13dd1b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 30 Jan 1998 11:39:44 +0000 Subject: [PATCH 1156/4487] Correct typo (ccept->accept). --- sysdeps/unix/sysv/linux/mips/syscalls.list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index 1c9c095ed3..d026910ee2 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -16,7 +16,7 @@ sigsuspend - sigsuspend 1 __sigsuspend sigsuspend # Socket functions; Linux/MIPS doesn't use the socketcall(2) wrapper; # it's provided for compatibility, though. # -ccept - accept 3 __libc_accept __accept accept +accept - accept 3 __libc_accept __accept accept bind - bind 3 __bind bind connect - connect 3 __libc_connect __connect connect getpeername - getpeername 3 __getpeername getpeername From 401a9d9e66320a1e2ee8a24a3cd7788f3659816a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 30 Jan 1998 12:24:41 +0000 Subject: [PATCH 1157/4487] Fix a typo. --- sysdeps/alpha/bzero.S | 4 ++-- sysdeps/alpha/htonl.S | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/alpha/bzero.S b/sysdeps/alpha/bzero.S index 1e0792395b..a2aa3a5213 100644 --- a/sysdeps/alpha/bzero.S +++ b/sysdeps/alpha/bzero.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. Contributed by Richard Henderson (rth@tamu.edu) This file is part of the GNU C Library. @@ -116,5 +116,5 @@ $oneq: $done: ret - END(bzero) + END(__bzero) weak_alias (__bzero, bzero) diff --git a/sysdeps/alpha/htonl.S b/sysdeps/alpha/htonl.S index 4308192cbf..a4e39cee1b 100644 --- a/sysdeps/alpha/htonl.S +++ b/sysdeps/alpha/htonl.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998 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 @@ -41,6 +41,6 @@ ENTRY(htonl) or t2, v0, v0 # v0 = ddccbbaa ret - END(__htonl) + END(htonl) weak_alias(htonl, ntohl) From e85e76352cc1bd311b1051fe5eaf8d000ab0a45d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 30 Jan 1998 12:26:36 +0000 Subject: [PATCH 1158/4487] Fix typo. --- sysdeps/alpha/htons.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/htons.S b/sysdeps/alpha/htons.S index f65f0e0826..d5d4467359 100644 --- a/sysdeps/alpha/htons.S +++ b/sysdeps/alpha/htons.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998 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 @@ -35,6 +35,6 @@ ENTRY(htons) bis v0, t1, v0 # v0 = bbaa ret - END(__htons) + END(htons) weak_alias(htons, ntohs) From 6534c4544ba7dc2acdc898daf23f8e40d63e8e5c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 1 Feb 1998 13:13:23 +0000 Subject: [PATCH 1159/4487] Add rt_sigaction.S. --- sysdeps/unix/sysv/linux/alpha/Dist | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist index 5b5dca44da..c8149ca0de 100644 --- a/sysdeps/unix/sysv/linux/alpha/Dist +++ b/sysdeps/unix/sysv/linux/alpha/Dist @@ -10,6 +10,7 @@ kernel_sigaction.h kernel_stat.h kernel_termios.h net/route.h +rt_sigaction.S sys/acct.h sys/io.h sys/procfs.h From 73bc81179e34f48978f8cb4a0b3501a47394a14d Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 4 Feb 1998 10:17:52 +0000 Subject: [PATCH 1160/4487] * sysdeps/unix/sysv/linux/alpha/clone.S: Elide terminal ldgp for PROF. * sysdeps/unix/sysv/linux/alpha/rt_sigaction.S: Fix typos. * sysdeps/unix/sysv/linux/alpha/bits/time.h (struct timeval): Follow POSIX and make tv_sec a time_t. * sysdeps/unix/sysv/linux/alpha/getitimer.S: New file to handle new tv64 syscall as well as fall back to tv32. * sysdeps/unix/sysv/linux/alpha/getrusage.S: Likewise. * sysdeps/unix/sysv/linux/alpha/gettimeofday.S: Likewise. * sysdeps/unix/sysv/linux/alpha/select.S: Likewise. * sysdeps/unix/sysv/linux/alpha/setitimer.S: Likewise. * sysdeps/unix/sysv/linux/alpha/settimeofday.S: Likewise. * sysdeps/unix/sysv/linux/alpha/utimes.S: Likewise. * sysdeps/unix/sysv/linux/alpha/wait4.S: Likewise. * sysdeps/unix/sysv/linux/alpha/syscalls.list: Add tv32 entries. --- sysdeps/unix/sysv/linux/alpha/Makefile | 6 + sysdeps/unix/sysv/linux/alpha/bits/time.h | 6 +- sysdeps/unix/sysv/linux/alpha/clone.S | 2 + sysdeps/unix/sysv/linux/alpha/getitimer.S | 99 +++++++++++++ sysdeps/unix/sysv/linux/alpha/getrusage.S | 127 +++++++++++++++++ sysdeps/unix/sysv/linux/alpha/gettimeofday.S | 102 ++++++++++++++ sysdeps/unix/sysv/linux/alpha/rt_sigaction.S | 9 +- sysdeps/unix/sysv/linux/alpha/select.S | 116 ++++++++++++++++ sysdeps/unix/sysv/linux/alpha/setitimer.S | 121 ++++++++++++++++ sysdeps/unix/sysv/linux/alpha/settimeofday.S | 102 ++++++++++++++ sysdeps/unix/sysv/linux/alpha/syscalls.list | 13 +- sysdeps/unix/sysv/linux/alpha/utimes.S | 107 ++++++++++++++ sysdeps/unix/sysv/linux/alpha/wait4.S | 138 +++++++++++++++++++ 13 files changed, 941 insertions(+), 7 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/alpha/getitimer.S create mode 100644 sysdeps/unix/sysv/linux/alpha/getrusage.S create mode 100644 sysdeps/unix/sysv/linux/alpha/gettimeofday.S create mode 100644 sysdeps/unix/sysv/linux/alpha/select.S create mode 100644 sysdeps/unix/sysv/linux/alpha/setitimer.S create mode 100644 sysdeps/unix/sysv/linux/alpha/settimeofday.S create mode 100644 sysdeps/unix/sysv/linux/alpha/utimes.S create mode 100644 sysdeps/unix/sysv/linux/alpha/wait4.S diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile index fa2c078664..48f5562d29 100644 --- a/sysdeps/unix/sysv/linux/alpha/Makefile +++ b/sysdeps/unix/sysv/linux/alpha/Makefile @@ -3,4 +3,10 @@ sysdep_headers += alpha/ptrace.h alpha/regdef.h sysdep_routines += ieee_get_fp_control ieee_set_fp_control \ sethae ioperm osf_sigprocmask fstatfs statfs llseek + +# Support old timeval32 entry points +sysdep_routines += osf_select osf_gettimeofday osf_settimeofday \ + osf_getitimer osf_setitimer osf_utimes \ + osf_getrusage osf_wait4 + endif diff --git a/sysdeps/unix/sysv/linux/alpha/bits/time.h b/sysdeps/unix/sysv/linux/alpha/bits/time.h index d32f4d30e9..7f26efd031 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/time.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/time.h @@ -43,11 +43,13 @@ #ifndef _STRUCT_TIMEVAL # define _STRUCT_TIMEVAL 1 +# include + /* A time value that is accurate to the nearest microsecond but also has a range of years. */ struct timeval { - int tv_sec; /* Seconds. */ - int tv_usec; /* Microseconds. */ + __time_t tv_sec; /* Seconds. */ + __time_t tv_usec; /* Microseconds. */ }; #endif /* struct timeval */ diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S index 930e379296..a8bd7f1b33 100644 --- a/sysdeps/unix/sysv/linux/alpha/clone.S +++ b/sysdeps/unix/sysv/linux/alpha/clone.S @@ -62,8 +62,10 @@ ENTRY(__clone) /* Something bad happened -- no child created */ $error: +#ifndef PROF br gp,1f 1: ldgp gp,0(gp) +#endif jmp zero,__syscall_error END(__clone) diff --git a/sysdeps/unix/sysv/linux/alpha/getitimer.S b/sysdeps/unix/sysv/linux/alpha/getitimer.S new file mode 100644 index 0000000000..03ae6ea491 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/getitimer.S @@ -0,0 +1,99 @@ +/* Copyright (C) 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#define _ERRNO_H 1 +#include + +/* The problem here is that initially we made struct timeval compatible with + OSF/1, using int32. But we defined time_t with uint64, and later found + that POSIX requires tv_sec to be time_t. + + So now we have to do compatibility stuff. */ + +/* The variable is shared between all wrappers around signal handling + functions which have RT equivalents. */ +.comm __libc_missing_axp_tv64, 4 + +.text + +LEAF(__getitimer_tv64, 16) + ldgp gp, 0(pv) + subq sp, 16, sp +#ifdef PROF + .set noat + lda AT, _mcount + jsr AT, (AT), _mcount + .set at +#endif + .prologue 1 + + ldl t0, __libc_missing_axp_tv64 + + /* Save arguments in case we do need to fall back. */ + stq a0, 0(sp) + stq a1, 8(sp) + + bne t0, $do32 + + ldi v0, SYS_ify(getitimer) + callsys + bne a3, $err64 + + /* Everything ok. */ + addq sp, 16, sp + ret + + /* If we didn't get ENOSYS, it is a real error. */ + .align 3 +$err64: cmpeq v0, ENOSYS, t0 + bne t0, $error + stl t0, __libc_missing_axp_tv64 + + /* Recover the saved arguments. */ + ldq a1, 8(sp) + ldq a0, 0(sp) + + .align 3 +$do32: ldi v0, SYS_ify(osf_getitimer) + callsys + bne a3, $error + + /* Copy back to proper format. */ + ldq a1, 8(sp) + ldl t0, 0(a1) + ldl t1, 4(a1) + ldl t2, 8(a1) + ldl t3, 12(a1) + stq t0, 0(a1) + stq t1, 8(a1) + stq t2, 16(a1) + stq t3, 24(a1) + + addq sp, 16, sp + ret + + .align 3 +$error: + lda pv, __syscall_error + addq sp, 16, sp + jmp zero, (pv), __syscall_error + +END(__getitimer_tv64) + +default_symbol_version (__getitimer_tv64, getitimer, GLIBC_2.1) diff --git a/sysdeps/unix/sysv/linux/alpha/getrusage.S b/sysdeps/unix/sysv/linux/alpha/getrusage.S new file mode 100644 index 0000000000..d875c83771 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/getrusage.S @@ -0,0 +1,127 @@ +/* Copyright (C) 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#define _ERRNO_H 1 +#include + +/* The problem here is that initially we made struct timeval compatible with + OSF/1, using int32. But we defined time_t with uint64, and later found + that POSIX requires tv_sec to be time_t. + + So now we have to do compatibility stuff. */ + +/* The variable is shared between all wrappers around signal handling + functions which have RT equivalents. */ +.comm __libc_missing_axp_tv64, 4 + +.text + +LEAF(__getrusage_tv64, 16) + ldgp gp, 0(pv) + subq sp, 16, sp +#ifdef PROF + .set noat + lda AT, _mcount + jsr AT, (AT), _mcount + .set at +#endif + .prologue 1 + + ldl t0, __libc_missing_axp_tv64 + + /* Save arguments in case we do need to fall back. */ + stq a0, 0(sp) + stq a1, 8(sp) + + bne t0, $do32 + + ldi v0, SYS_ify(getrusage) + callsys + bne a3, $err64 + + /* Everything ok. */ + addq sp, 16, sp + ret + + /* If we didn't get ENOSYS, it is a real error. */ + .align 3 +$err64: cmpeq v0, ENOSYS, t0 + bne t0, $error + stl t0, __libc_missing_axp_tv64 + + /* Recover the saved arguments. */ + ldq a1, 8(sp) + ldq a0, 0(sp) + + .align 3 +$do32: ldi v0, SYS_ify(osf_getrusage) + callsys + bne a3, $error + + /* Copy back to proper format. */ + ldq a1, 8(sp) + ldl t0, 0(a1) # ru_utime.tv_sec + ldl t1, 4(a1) # ru_utime.tv_usec + ldl t2, 8(a1) # ru_stime.tv_sec + ldl t3, 12(a1) # ru_stime.tv_usec + ldt $f15, 16(a1) # ru_maxrss + ldt $f16, 24(a1) # ru_ixrss + ldt $f17, 32(a1) # ru_idrss + ldt $f18, 40(a1) # ru_isrss + ldt $f19, 48(a1) # ru_minflt + ldt $f20, 56(a1) # ru_majflt + ldt $f21, 64(a1) # ru_nswap + ldt $f22, 72(a1) # ru_inblock + ldt $f23, 80(a1) # ru_oublock + ldt $f24, 88(a1) # ru_msgsend + ldt $f25, 96(a1) # ru_msgrcv + ldt $f26, 104(a1) # ru_nsignals + ldt $f27, 112(a1) # ru_nvcsw + ldt $f28, 120(a1) # ru_nivcsw + stq t0, 0(a1) + stq t1, 8(a1) + stq t2, 16(a1) + stq t3, 24(a1) + stt $f15, 32(a1) + stt $f16, 40(a1) + stt $f17, 48(a1) + stt $f18, 56(a1) + stt $f19, 64(a1) + stt $f20, 72(a1) + stt $f21, 80(a1) + stt $f22, 88(a1) + stt $f23, 96(a1) + stt $f24, 104(a1) + stt $f25, 112(a1) + stt $f26, 120(a1) + stt $f27, 128(a1) + stt $f28, 136(a1) + + addq sp, 16, sp + ret + + .align 3 +$error: + lda pv, __syscall_error + addq sp, 16, sp + jmp zero, (pv), __syscall_error + +END(__getrusage_tv64) + +default_symbol_version (__getrusage_tv64, getrusage, GLIBC_2.1) diff --git a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S new file mode 100644 index 0000000000..bceeefc0a7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S @@ -0,0 +1,102 @@ +/* Copyright (C) 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#define _ERRNO_H 1 +#include + +/* The problem here is that initially we made struct timeval compatible with + OSF/1, using int32. But we defined time_t with uint64, and later found + that POSIX requires tv_sec to be time_t. + + So now we have to do compatibility stuff. */ + +/* The variable is shared between all wrappers around signal handling + functions which have RT equivalents. */ +.comm __libc_missing_axp_tv64, 4 + +.text + +LEAF(__gettimeofday_tv64, 16) + ldgp gp, 0(pv) + subq sp, 16, sp +#ifdef PROF + .set noat + lda AT, _mcount + jsr AT, (AT), _mcount + .set at +#endif + .prologue 1 + + ldl t0, __libc_missing_axp_tv64 + + /* Save arguments in case we do need to fall back. */ + stq a0, 0(sp) + stq a1, 8(sp) + + bne t0, $do32 + + ldi v0, SYS_ify(gettimeofday) + callsys + bne a3, $err64 + + /* Everything ok. */ + addq sp, 16, sp + ret + + /* If we didn't get ENOSYS, it is a real error. */ + .align 3 +$err64: cmpeq v0, ENOSYS, t0 + bne t0, $error + stl t0, __libc_missing_axp_tv64 + + /* Recover the saved arguments. */ + ldq a1, 8(sp) + ldq a0, 0(sp) + + .align 3 +$do32: ldi v0, SYS_ify(osf_gettimeofday) + callsys + bne a3, $error + + /* Copy back to proper format. */ + ldq a0, 0(sp) + beq a0, 2f + ldl t0, 0(a0) + ldl t1, 4(a0) + stq t0, 0(a0) + stq t1, 0(a0) + +2: addq sp, 16, sp + ret + + .align 3 +$error: + lda pv, __syscall_error + addq sp, 16, sp + jmp zero, (pv), __syscall_error + +END(__gettimeofday_tv64) + +default_symbol_version (__gettimeofday_tv64, __gettimeofday, GLIBC_2.1) + +/* It seems to me to be a misfeature of the assembler that we can only + have one version-alias per symbol. So create an alias ourselves. + The 'p' is for 'public'. *Shrug* */ +strong_alias (__gettimeofday_tv64, __gettimeofday_tv64p) +default_symbol_version (__gettimeofday_tv64p, gettimeofday, GLIBC_2.1) diff --git a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S index bcb2be0e28..1d98de9695 100644 --- a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S +++ b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S @@ -40,18 +40,21 @@ ENTRY(__syscall_rt_sigaction) .prologue 1 beq a1, 0f - ldl t0, 8(a1) + ldl t0, 8(a1) # sa_flags lda a4, sigreturn-__syscall_rt_sigaction(pv) lda t1, rt_sigreturn-__syscall_rt_sigaction(pv) and t0, 0x00000040, t0 # SA_SIGINFO cmovne t0, t1, a4 -0: ldi v0,__NR_sigaction +0: ldi v0,__NR_rt_sigaction callsys bne a3,1f ret -1: br gp,2f +1: +#ifndef PROF + br gp,2f 2: ldgp gp,0(gp) +#endif jmp __syscall_error END(__syscall_rt_sigaction) diff --git a/sysdeps/unix/sysv/linux/alpha/select.S b/sysdeps/unix/sysv/linux/alpha/select.S new file mode 100644 index 0000000000..73076b9158 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/select.S @@ -0,0 +1,116 @@ +/* Copyright (C) 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#define _ERRNO_H 1 +#include + +/* The problem here is that initially we made struct timeval compatible with + OSF/1, using int32. But we defined time_t with uint64, and later found + that POSIX requires tv_sec to be time_t. + + So now we have to do compatibility stuff. */ + +/* The variable is shared between all wrappers around signal handling + functions which have RT equivalents. */ +.comm __libc_missing_axp_tv64, 4 + +.text + +LEAF(__select_tv64, 64) + ldgp gp, 0(pv) + subq sp, 64, sp +#ifdef PROF + .set noat + lda AT, _mcount + jsr AT, (AT), _mcount + .set at +#endif + .prologue 1 + + ldl t0, __libc_missing_axp_tv64 + bne t0, $do32 + + /* Save arguments in case we do need to fall back. */ + stq a0, 8(sp) + stq a1, 16(sp) + stq a2, 24(sp) + stq a3, 32(sp) + stq a4, 48(sp) + + ldi v0, SYS_ify(select) + callsys + bne a3, $err64 + + /* Everything ok. */ + addq sp, 64, sp + ret + + /* If we didn't get ENOSYS, it is a real error. */ + .align 3 +$err64: cmpeq v0, ENOSYS, t0 + bne t0, $error + stl t0, __libc_missing_axp_tv64 + + /* Recover the saved arguments. */ + ldq a4, 48(sp) + ldq a3, 32(sp) + ldq a2, 24(sp) + ldq a1, 16(sp) + ldq a0, 8(sp) + + .align 3 +$do32: + /* If the timeout argument is present bounce to the smaller fmt. */ + beq a4, 1f + ldq t0, 0(a4) + ldq t1, 8(a4) + stl t0, 0(sp) + stl t1, 4(sp) + mov sp, a4 + +1: ldi v0, SYS_ify(osf_select) + callsys + bne a3, $error + + /* ... and bounce the remaining timeout back. */ + ldq a4, 48(sp) + beq a4, 2f + ldl t0, 0(sp) + ldl t1, 4(sp) + stq t0, 0(a4) + stq t1, 8(a4) + +2: addq sp, 64, sp + ret + + .align 3 +$error: + lda pv, __syscall_error + addq sp, 64, sp + jmp zero, (pv), __syscall_error + +END(__select_tv64) + +default_symbol_version (__select_tv64, __select, GLIBC_2.1) + +/* It seems to me to be a misfeature of the assembler that we can only + have one version-alias per symbol. So create an alias ourselves. + The 'p' is for 'public'. *Shrug* */ +strong_alias (__select_tv64, __select_tv64p) +default_symbol_version (__select_tv64p, select, GLIBC_2.1) diff --git a/sysdeps/unix/sysv/linux/alpha/setitimer.S b/sysdeps/unix/sysv/linux/alpha/setitimer.S new file mode 100644 index 0000000000..a2085cc29e --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/setitimer.S @@ -0,0 +1,121 @@ +/* Copyright (C) 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#define _ERRNO_H 1 +#include + +/* The problem here is that initially we made struct timeval compatible with + OSF/1, using int32. But we defined time_t with uint64, and later found + that POSIX requires tv_sec to be time_t. + + So now we have to do compatibility stuff. */ + +/* The variable is shared between all wrappers around signal handling + functions which have RT equivalents. */ +.comm __libc_missing_axp_tv64, 4 + +.text + +LEAF(__setitimer_tv64, 48) + ldgp gp, 0(pv) + subq sp, 48, sp +#ifdef PROF + .set noat + lda AT, _mcount + jsr AT, (AT), _mcount + .set at +#endif + .prologue 1 + + ldl t0, __libc_missing_axp_tv64 + + /* Save arguments in case we do need to fall back. */ + stq a0, 0(sp) + stq a1, 8(sp) + stq a2, 16(sp) + + bne t0, $do32 + + ldi v0, SYS_ify(setitimer) + callsys + bne a3, $err64 + + /* Everything ok. */ + addq sp, 48, sp + ret + + /* If we didn't get ENOSYS, it is a real error. */ + .align 3 +$err64: cmpeq v0, ENOSYS, t0 + bne t0, $error + stl t0, __libc_missing_axp_tv64 + + /* Recover the saved arguments. */ + ldq a2, 16(sp) + ldq a1, 8(sp) + ldq a0, 0(sp) + + .align 3 +$do32: + /* Conditionally bounce new value down. */ + beq a1, 1f + ldq t0, 0(a1) + ldq t1, 8(a1) + ldq t2, 16(a1) + ldq t3, 24(a1) + stl t0, 32(sp) + stl t1, 36(sp) + stl t2, 40(sp) + stl t3, 44(sp) + addq sp, 32, a1 + +1: ldi v0, SYS_ify(osf_setitimer) + callsys + bne a3, $error + + /* Conditionaly bounce old value up. */ + ldq a2, 16(sp) + bne a2, 2f + ldl t0, 0(a2) + ldl t1, 4(a2) + ldl t2, 8(a2) + ldl t3, 12(a2) + stq t0, 0(a2) + stq t1, 8(a2) + stq t2, 48(a2) + stq t3, 24(a2) + +2: addq sp, 48, sp + ret + + .align 3 +$error: + lda pv, __syscall_error + addq sp, 48, sp + jmp zero, (pv), __syscall_error + +END(__setitimer_tv64) + +default_symbol_version (__setitimer_tv64, __setitimer, GLIBC_2.1) + +/* It seems to me to be a misfeature of the assembler that we can only + have one version-alias per symbol. So create an alias ourselves. + The 'p' is for 'public'. *Shrug* */ +strong_alias (__setitimer_tv64, __setitimer_tv64p) +default_symbol_version (__setitimer_tv64p, setitimer, GLIBC_2.1) diff --git a/sysdeps/unix/sysv/linux/alpha/settimeofday.S b/sysdeps/unix/sysv/linux/alpha/settimeofday.S new file mode 100644 index 0000000000..b730df7136 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/settimeofday.S @@ -0,0 +1,102 @@ +/* Copyright (C) 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#define _ERRNO_H 1 +#include + +/* The problem here is that initially we made struct timeval compatible with + OSF/1, using int32. But we defined time_t with uint64, and later found + that POSIX requires tv_sec to be time_t. + + So now we have to do compatibility stuff. */ + +/* The variable is shared between all wrappers around signal handling + functions which have RT equivalents. */ +.comm __libc_missing_axp_tv64, 4 + +.text + +LEAF(__settimeofday_tv64, 16) + ldgp gp, 0(pv) + subq sp, 16, sp +#ifdef PROF + .set noat + lda AT, _mcount + jsr AT, (AT), _mcount + .set at +#endif + .prologue 1 + + ldl t0, __libc_missing_axp_tv64 + bne t0, $do32 + + /* Save arguments in case we do need to fall back. */ + stq a0, 0(sp) + stq a1, 8(sp) + + ldi v0, SYS_ify(settimeofday) + callsys + bne a3, $err64 + + /* Everything ok. */ + addq sp, 16, sp + ret + + /* If we didn't get ENOSYS, it is a real error. */ + .align 3 +$err64: cmpeq v0, ENOSYS, t0 + bne t0, $error + stl t0, __libc_missing_axp_tv64 + + /* Recover the saved arguments. */ + ldq a1, 8(sp) + ldq a0, 0(sp) + + .align 3 +$do32: + /* Conditionally bounce the timeval down. */ + beq a0, 1f + ldq t0, 0(a0) + ldq t1, 8(a0) + stl t0, 0(sp) + stl t1, 4(sp) + mov sp, a0 + +1: ldi v0, SYS_ify(osf_settimeofday) + callsys + bne a3, $error + + addq sp, 16, sp + ret + + .align 3 +$error: + lda pv, __syscall_error + addq sp, 16, sp + jmp zero, (pv), __syscall_error + +END(__settimeofday_tv64) + +default_symbol_version (__settimeofday_tv64, __settimeofday, GLIBC_2.1) + +/* It seems to me to be a misfeature of the assembler that we can only + have one version-alias per symbol. So create an alias ourselves. + The 'p' is for 'public'. *Shrug* */ +strong_alias (__settimeofday_tv64, __settimeofday_tv64p) +default_symbol_version (__settimeofday_tv64p, settimeofday, GLIBC_2.1) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 17c55f0991..3166531d2b 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -34,8 +34,7 @@ truncate - truncate 2 truncate truncate64 sys_ustat ustat ustat 2 __syscall_ustat sys_mknod xmknod mknod 3 __syscall_mknod -# override select.S in parent directory: -select - select 5 __select select +# proper socket implementations: accept - accept 3 __libc_accept __accept accept bind - bind 3 __bind bind connect - connect 3 __libc_connect __connect connect @@ -58,3 +57,13 @@ sysctl - _sysctl 6 sysctl # access pci space protected from machine checks: pciconfig_read EXTRA pciconfig_read 5 pciconfig_read pciconfig_write EXTRA pciconfig_write 5 pciconfig_write + +# support old timeval32 entry points +osf_select - osf_select 5 __select_tv32 __select@GLIBC_2.0 select@GLIBC_2.0 +osf_gettimeofday - osf_gettimeofday 2 __gettimeofday_tv32 __gettimeofday@GLIBC_2.0 gettimeofday@GLIBC_2.0 +osf_settimeofday - osf_settimeofday 2 __settimeofday_tv32 settimeofday@GLIBC_2.0 +osf_getitimer - osf_getitimer 2 __getitimer_tv32 getitimer@GLIBC_2.0 +osf_setitimer - osf_setitimer 3 __setitimer_tv32 setitimer@GLIBC_2.0 +osf_utimes - osf_utimes 2 __utimes_tv32 utimes@GLIBC_2.0 +osf_getrusage - osf_getrusage 2 __getrusage_tv32 getrusage@GLIBC_2.0 +osf_wait4 - osf_wait4 2 __wait4_tv32 wait4@GLIBC_2.0 diff --git a/sysdeps/unix/sysv/linux/alpha/utimes.S b/sysdeps/unix/sysv/linux/alpha/utimes.S new file mode 100644 index 0000000000..2b4c71e410 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/utimes.S @@ -0,0 +1,107 @@ +/* Copyright (C) 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#define _ERRNO_H 1 +#include + +/* The problem here is that initially we made struct timeval compatible with + OSF/1, using int32. But we defined time_t with uint64, and later found + that POSIX requires tv_sec to be time_t. + + So now we have to do compatibility stuff. */ + +/* The variable is shared between all wrappers around signal handling + functions which have RT equivalents. */ +.comm __libc_missing_axp_tv64, 4 + +.text + +LEAF(__utimes_tv64, 16) + ldgp gp, 0(pv) + subq sp, 16, sp +#ifdef PROF + .set noat + lda AT, _mcount + jsr AT, (AT), _mcount + .set at +#endif + .prologue 1 + + ldl t0, __libc_missing_axp_tv64 + + /* Save arguments in case we do need to fall back. */ + stq a0, 0(sp) + stq a1, 8(sp) + + bne t0, $do32 + + ldi v0, SYS_ify(utimes) + callsys + bne a3, $err64 + + /* Everything ok. */ + addq sp, 16, sp + ret + + /* If we didn't get ENOSYS, it is a real error. */ + .align 3 +$err64: cmpeq v0, ENOSYS, t0 + bne t0, $error + stl t0, __libc_missing_axp_tv64 + + /* Recover the saved arguments. */ + ldq a1, 8(sp) + ldq a0, 0(sp) + + .align 3 +$do32: + /* Conditionally bounce values down. */ + beq a1, 1f + ldq t0, 0(a1) + ldq t1, 8(a1) + ldq t2, 16(a1) + ldq t3, 24(a1) + stl t0, 0(sp) + stl t1, 4(sp) + stl t2, 8(sp) + stl t3, 12(sp) + mov sp, a1 + +1: ldi v0, SYS_ify(osf_utimes) + callsys + bne a3, $error + + addq sp, 16, sp + ret + + .align 3 +$error: + lda pv, __syscall_error + addq sp, 16, sp + jmp zero, (pv), __syscall_error + +END(__utimes_tv64) + +default_symbol_version (__utimes_tv64, __utimes, GLIBC_2.1) + +/* It seems to me to be a misfeature of the assembler that we can only + have one version-alias per symbol. So create an alias ourselves. + The 'p' is for 'public'. *Shrug* */ +strong_alias (__utimes_tv64, __utimes_tv64p) +default_symbol_version (__utimes_tv64p, utimes, GLIBC_2.1) diff --git a/sysdeps/unix/sysv/linux/alpha/wait4.S b/sysdeps/unix/sysv/linux/alpha/wait4.S new file mode 100644 index 0000000000..5ab86077c8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/wait4.S @@ -0,0 +1,138 @@ +/* Copyright (C) 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#define _ERRNO_H 1 +#include + +/* The problem here is that initially we made struct timeval compatible with + OSF/1, using int32. But we defined time_t with uint64, and later found + that POSIX requires tv_sec to be time_t. + + So now we have to do compatibility stuff. */ + +/* The variable is shared between all wrappers around signal handling + functions which have RT equivalents. */ +.comm __libc_missing_axp_tv64, 4 + +.text + +LEAF(__wait4_tv64, 32) + ldgp gp, 0(pv) + subq sp, 32, sp +#ifdef PROF + .set noat + lda AT, _mcount + jsr AT, (AT), _mcount + .set at +#endif + .prologue 1 + + ldl t0, __libc_missing_axp_tv64 + + /* Save arguments in case we do need to fall back. */ + stq a0, 0(sp) + stq a1, 8(sp) + stq a2, 16(sp) + stq a3, 24(sp) + + bne t0, $do32 + + ldi v0, SYS_ify(wait4) + callsys + bne a3, $err64 + + /* Everything ok. */ + addq sp, 32, sp + ret + + /* If we didn't get ENOSYS, it is a real error. */ + .align 3 +$err64: cmpeq v0, ENOSYS, t0 + bne t0, $error + stl t0, __libc_missing_axp_tv64 + + /* Recover the saved arguments. */ + ldq a3, 24(sp) + ldq a2, 16(sp) + ldq a1, 8(sp) + ldq a0, 0(sp) + + .align 3 +$do32: ldi v0, SYS_ify(osf_wait4) + callsys + bne a3, $error + + /* Copy back to proper format. */ + ldq a3, 8(sp) + beq a3, 2f + ldl t0, 0(a3) # ru_utime.tv_sec + ldl t1, 4(a3) # ru_utime.tv_usec + ldl t2, 8(a3) # ru_stime.tv_sec + ldl t3, 12(a3) # ru_stime.tv_usec + ldt $f15, 16(a3) # ru_maxrss + ldt $f16, 24(a3) # ru_ixrss + ldt $f17, 32(a3) # ru_idrss + ldt $f18, 40(a3) # ru_isrss + ldt $f19, 48(a3) # ru_minflt + ldt $f20, 56(a3) # ru_majflt + ldt $f21, 64(a3) # ru_nswap + ldt $f22, 72(a3) # ru_inblock + ldt $f23, 80(a3) # ru_oublock + ldt $f24, 88(a3) # ru_msgsend + ldt $f25, 96(a3) # ru_msgrcv + ldt $f26, 104(a3) # ru_nsignals + ldt $f27, 112(a3) # ru_nvcsw + ldt $f28, 120(a3) # ru_nivcsw + stq t0, 0(a3) + stq t1, 8(a3) + stq t2, 16(a3) + stq t3, 24(a3) + stt $f15, 32(a3) + stt $f16, 40(a3) + stt $f17, 48(a3) + stt $f18, 56(a3) + stt $f19, 64(a3) + stt $f20, 72(a3) + stt $f21, 80(a3) + stt $f22, 88(a3) + stt $f23, 96(a3) + stt $f24, 104(a3) + stt $f25, 112(a3) + stt $f26, 120(a3) + stt $f27, 128(a3) + stt $f28, 136(a3) + +2: addq sp, 32, sp + ret + + .align 3 +$error: + lda pv, __syscall_error + addq sp, 32, sp + jmp zero, (pv), __syscall_error + +END(__wait4_tv64) + +default_symbol_version (__wait4_tv64, __wait4, GLIBC_2.1) + +/* It seems to me to be a misfeature of the assembler that we can only + have one version-alias per symbol. So create an alias ourselves. + The 'p' is for 'public'. *Shrug* */ +strong_alias (__wait4_tv64, __wait4_tv64p) +default_symbol_version (__wait4_tv64p, wait4, GLIBC_2.1) From 028502bf1eec304f7cfab1dc0a208ab227745afc Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 10 Feb 1998 19:59:41 +0000 Subject: [PATCH 1161/4487] SysV compliant context switch interface. --- sysdeps/arm/sys/ucontext.h | 95 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 sysdeps/arm/sys/ucontext.h diff --git a/sysdeps/arm/sys/ucontext.h b/sysdeps/arm/sys/ucontext.h new file mode 100644 index 0000000000..70af80fa47 --- /dev/null +++ b/sysdeps/arm/sys/ucontext.h @@ -0,0 +1,95 @@ +/* Copyright (C) 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* System V/ARM ABI compliant context switching support. */ + +#ifndef _SYS_UCONTEXT_H +#define _SYS_UCONTEXT_H 1 + +#include +#include + +typedef int greg_t; + +/* Number of general registers. */ +#define NGREG 16 + +/* Container for all general registers. */ +typedef greg_t gregset_t[NGREG]; + +/* Number of each register is the `gregset_t' array. */ +enum +{ + R0 = 0, +#define R0 R0 + R1 = 1, +#define R1 R1 + R2 = 2, +#define R2 R2 + R3 = 3, +#define R3 R3 + R4 = 4, +#define R4 R4 + R5 = 5, +#define R5 R5 + R6 = 6, +#define R6 R6 + R7 = 7, +#define R7 R7 + R8 = 8, +#define R8 R8 + R9 = 9, +#define R9 R9 + R10 = 10, +#define R10 R10 + R11 = 11, +#define R11 R11 + R12 = 12, +#define R12 R12 + R13 = 13, +#define R13 R13 + R14 = 14, +#define R14 R14 + R15 = 15, +#define R15 R15 +}; + +/* Structure to describe FPU registers. */ +typedef struct fpregset + { + } fpregset_t; + +/* Context to describe whole processor state. */ +typedef struct + { + gregset_t gregs; + fpregset_t fpregs; + } mcontext_t; + +/* Userlevel context. */ +typedef struct ucontext + { + unsigned long int uc_flags; + struct ucontext *uc_links; + __sigset_t uc_sigmask; + stack_t uc_stack; + mcontext_t uc_mcontext; + long int uc_filler[5]; + } ucontext_t; + +#endif /* sys/ucontext.h */ From 9ab963e5ef45e26360d25cace9dbb65e5b115870 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 10 Feb 1998 20:01:12 +0000 Subject: [PATCH 1162/4487] Define __need_FOPEN_MAX, not _STDIO_H, before including . --- sysdeps/standalone/filedesc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/standalone/filedesc.h b/sysdeps/standalone/filedesc.h index d6a12a606a..088c3bbacb 100644 --- a/sysdeps/standalone/filedesc.h +++ b/sysdeps/standalone/filedesc.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1997, 1998 Free Software Foundation, Inc. Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil, On-Line Applications Research Corporation. This file is part of the GNU C Library. @@ -26,7 +26,7 @@ #ifndef __FILEDESC_h #define __FILEDESC_h -#define _STDIO_H +#define __need_FOPEN_MAX #include #ifndef __DECLARE_FILE_DESCRIPTORS__ From e0e16dbb5b52c88ba5cd208721969a4d7459080d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 10 Feb 1998 20:01:29 +0000 Subject: [PATCH 1163/4487] (EOVERFLOW): Added. --- sysdeps/standalone/arm/bits/errno.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/standalone/arm/bits/errno.h b/sysdeps/standalone/arm/bits/errno.h index 373d701bc3..7d628b1a2d 100644 --- a/sysdeps/standalone/arm/bits/errno.h +++ b/sysdeps/standalone/arm/bits/errno.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1994, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1994, 1996, 1997, 1998 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 @@ -57,6 +57,7 @@ # define ENOSPC 29 # define EEXIST 30 # define EBUSY 31 +# define EOVERFLOW 32 #endif #define __set_errno(val) errno = (val) From e1f251a3ae8c6fbaccf6a7723df2e28fc6418072 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 10 Feb 1998 20:05:38 +0000 Subject: [PATCH 1164/4487] Add getres[ug]id. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 3 +++ sysdeps/unix/sysv/linux/mips/syscalls.list | 3 +++ 2 files changed, 6 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 3166531d2b..59c0cb8a09 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -54,6 +54,9 @@ shutdown - shutdown 2 __shutdown shutdown socketpair - socketpair 4 __socketpair socketpair sysctl - _sysctl 6 sysctl +getresuid - getresuid 3 getresuid +getresgid - getresgid 3 getresuid + # access pci space protected from machine checks: pciconfig_read EXTRA pciconfig_read 5 pciconfig_read pciconfig_write EXTRA pciconfig_write 5 pciconfig_write diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index d026910ee2..c00ee6bed4 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -34,6 +34,9 @@ shutdown - shutdown 2 __shutdown shutdown socket - socket 3 __socket socket socketpair - socketpair 4 __socketpair socketpair +getresuid - getresuid 3 getresuid +getresgid - getresgid 3 getresuid + # # There are defined locally because the caller is also defined in this dir. # From 4fba2352f8afa2eccb6c4f81b55e30dff5fde0c0 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 12 Feb 1998 18:22:18 +0000 Subject: [PATCH 1165/4487] Pointer sizes. --- sysdeps/unix/sysv/linux/alpha/sizes.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/sizes.h diff --git a/sysdeps/unix/sysv/linux/alpha/sizes.h b/sysdeps/unix/sysv/linux/alpha/sizes.h new file mode 100644 index 0000000000..a1335868a2 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/sizes.h @@ -0,0 +1,24 @@ +/* Copyright (C) 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SIZES_H +#define _SIZES_H 1 + +#define PTR_SIZE_STR "8" + +#endif /* sizes.h */ From d7d1f4baddee50c8629458a84a0d0a28865708f8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 16 Feb 1998 18:13:11 +0000 Subject: [PATCH 1166/4487] (_ioperm): Map all ports starting from 0 not only from `from'. --- sysdeps/unix/sysv/linux/alpha/ioperm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c index 76a744d167..cf263f762c 100644 --- a/sysdeps/unix/sysv/linux/alpha/ioperm.c +++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1996, 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger. @@ -416,8 +416,7 @@ _ioperm (unsigned long int from, unsigned long int num, int turn_on) __set_errno (ENODEV); return -1; } - addr = port_to_cpu_addr (from, io.sys, 1); - addr &= PAGE_MASK; + addr = port_to_cpu_addr (0, io.sys, 1); len = port_to_cpu_addr (MAX_PORT, io.sys, 1) - addr; io.base = (unsigned long int) __mmap (0, len, PROT_NONE, MAP_SHARED, From 09e8bdd3cddb18bbe36dcf7031cac4e931a1c91c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 17 Feb 1998 15:26:57 +0000 Subject: [PATCH 1167/4487] (rt_sigreturn): Make compatible with older kernels. --- sysdeps/unix/sysv/linux/alpha/rt_sigaction.S | 27 ++++++++++++-------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S index 1d98de9695..3959e5d7df 100644 --- a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S +++ b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 1998 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1998 @@ -16,17 +16,17 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - + #include - + /* On Alpha we desparately want to avoid having to issue an imb. Ordinarily the kernel would have to issue one after setting up the signal return stack, but the Linux rt_sigaction syscall is prepared to accept a pointer - to the sigreturn syscall, instead of inlining it on the stack. - + to the sigreturn syscall, instead of inlining it on the stack. + This just about halves signal delivery time. */ - - + +#ifdef __NR_rt_sigaction .text ENTRY(__syscall_rt_sigaction) .frame sp,0,ra,0 @@ -38,7 +38,7 @@ ENTRY(__syscall_rt_sigaction) .set at #endif .prologue 1 - + beq a1, 0f ldl t0, 8(a1) # sa_flags lda a4, sigreturn-__syscall_rt_sigaction(pv) @@ -46,10 +46,10 @@ ENTRY(__syscall_rt_sigaction) and t0, 0x00000040, t0 # SA_SIGINFO cmovne t0, t1, a4 0: ldi v0,__NR_rt_sigaction - callsys + callsys bne a3,1f ret - + 1: #ifndef PROF br gp,2f @@ -76,3 +76,10 @@ rt_sigreturn: ldi v0,__NR_rt_sigreturn callsys .end rt_sigreturn +#else +ENTRY(__syscall_rt_sigaction) + ldgp $29,0($27) + ldi $0,ENOSYS + jmp __syscall_error +END(__syscall_rt_sigaction) +#endif From ef5e0ac67bd4753bbc0bb2b1e93f8f1fdd27f237 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 18 Feb 1998 01:32:32 +0000 Subject: [PATCH 1168/4487] Stub file --- sysdeps/m68k/fpu/t_exp.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/m68k/fpu/t_exp.c diff --git a/sysdeps/m68k/fpu/t_exp.c b/sysdeps/m68k/fpu/t_exp.c new file mode 100644 index 0000000000..fd37963b05 --- /dev/null +++ b/sysdeps/m68k/fpu/t_exp.c @@ -0,0 +1 @@ +/* Empty. Not needed. */ From 0c70eb4af396e990dcb5a7ca47f234fb521a1f58 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 24 Feb 1998 15:22:07 +0000 Subject: [PATCH 1169/4487] (struct kernel_sigaction): Define. --- sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h b/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h index f8c42e0a1e..4c35d969cf 100644 --- a/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h +++ b/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h @@ -5,3 +5,11 @@ struct old_kernel_sigaction { unsigned long sa_mask; unsigned int sa_flags; }; + +/* This is the sigaction structure from the Linux 2.1.68 kernel. */ + +struct kernel_sigaction { + __sighandler_t k_sa_handler; + unsigned int sa_flags; + sigset_t sa_mask; +}; From d424955575ad2bd2a70c2b85fbee6c4103b802d1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 26 Feb 1998 08:38:37 +0000 Subject: [PATCH 1170/4487] (FE_TOWARDZERO): Correct typo. --- sysdeps/alpha/fpu/bits/fenv.h | 6 +++--- sysdeps/m68k/fpu/bits/fenv.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sysdeps/alpha/fpu/bits/fenv.h b/sysdeps/alpha/fpu/bits/fenv.h index 4482f0a2dd..2ccf149f0a 100644 --- a/sysdeps/alpha/fpu/bits/fenv.h +++ b/sysdeps/alpha/fpu/bits/fenv.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998 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 @@ -68,8 +68,8 @@ enum enum { - FE_TOWARDSZERO = 0, -#define FE_TOWARDSZERO FE_TOWARDSZERO + FE_TOWARDZERO = 0, +#define FE_TOWARDZERO FE_TOWARDZERO FE_DOWNWARD = 1, #define FE_DOWNWARD FE_DOWNWARD diff --git a/sysdeps/m68k/fpu/bits/fenv.h b/sysdeps/m68k/fpu/bits/fenv.h index b1608b9ddc..e1a278d333 100644 --- a/sysdeps/m68k/fpu/bits/fenv.h +++ b/sysdeps/m68k/fpu/bits/fenv.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998 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 @@ -47,8 +47,8 @@ enum { FE_TONEAREST = 0, #define FE_TONEAREST FE_TONEAREST - FE_TOWARDSZERO = 1 << 4, -#define FE_TOWARDSZERO FE_TOWARDSZERO + FE_TOWARDZERO = 1 << 4, +#define FE_TOWARDZERO FE_TOWARDZERO FE_DOWNWARD = 2 << 4, #define FE_DOWNWARD FE_DOWNWARD FE_UPWARD = 3 << 4 From f635bc2865c9d5b90896bb8345d14cc8426a25c2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 26 Feb 1998 16:29:41 +0000 Subject: [PATCH 1171/4487] (feraiseexcept): Use a dummy for FE_DIVBYZERO. Kludge for FE_UNDERFLOW. --- sysdeps/alpha/fpu/fraiseexcpt.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sysdeps/alpha/fpu/fraiseexcpt.c b/sysdeps/alpha/fpu/fraiseexcpt.c index 6a53e55e7d..c2a96e3f87 100644 --- a/sysdeps/alpha/fpu/fraiseexcpt.c +++ b/sysdeps/alpha/fpu/fraiseexcpt.c @@ -1,5 +1,5 @@ /* Raise given exceptions. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1997. @@ -24,7 +24,7 @@ void feraiseexcept (int excepts) { - double tmp; + double tmp, dummy; /* Raise exceptions represented by EXPECTS. But we must raise only one signal at a time. It is important the if the overflow/underflow @@ -45,8 +45,8 @@ feraiseexcept (int excepts) /* Next: division by zero. */ if (FE_DIVBYZERO & excepts) { - __asm__ __volatile__("cmpteq $f31,$f31,%0; divt/sui %0,$f31,%0; trapb" - : "=f"(tmp)); + __asm__ __volatile__("cmpteq $f31,$f31,%1; divt/sui %1,$f31,%0; trapb" + : "=f"(tmp), "=f"(dummy)); } /* Next: overflow. */ @@ -60,7 +60,8 @@ feraiseexcept (int excepts) if (FE_UNDERFLOW & excepts) { __asm__ __volatile__("divt/sui %1,%2,%0; trapb" - : "=f"(tmp) : "f"(DBL_MIN), "f"(16.0)); + : "=f"(tmp) : "f"(DBL_MIN), + "f"((double) (1UL << 60))); } /* Last: inexact. */ From 265bcb263dfbb9258ed09ed3f4541822e170270b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 26 Feb 1998 17:13:29 +0000 Subject: [PATCH 1172/4487] Added ".set noat"/".set at". --- sysdeps/alpha/s_fabs.S | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysdeps/alpha/s_fabs.S b/sysdeps/alpha/s_fabs.S index e5992ad90c..00698d6bd5 100644 --- a/sysdeps/alpha/s_fabs.S +++ b/sysdeps/alpha/s_fabs.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger @@ -21,9 +21,11 @@ ENTRY(__fabs) #ifdef PROF + .set noat ldgp gp, 0(pv) lda AT, _mcount jsr AT, (AT), _mcount + .set at .prologue 1 #else .prologue 0 From 3616c197cdb5b2a8a5ebf716c9691cb67373aaa3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 26 Feb 1998 17:14:15 +0000 Subject: [PATCH 1173/4487] Add _errno definition. --- sysdeps/unix/alpha/sysdep.S | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S index fc5cc0436b..d79c48a9bf 100644 --- a/sysdeps/unix/alpha/sysdep.S +++ b/sysdeps/unix/alpha/sysdep.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1996 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1996, 1998 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -29,6 +29,8 @@ errno: .space 4 #endif .globl __errno __errno = errno + .globl _errno +_errno = errno .text .align 2 From 0f04509d000af79cc32614e385e1196915e03269 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 26 Feb 1998 17:14:58 +0000 Subject: [PATCH 1174/4487] (sysdep_routines): Added adjtimex and old_adjtimex. --- sysdeps/unix/sysv/linux/alpha/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile index 48f5562d29..7821e46deb 100644 --- a/sysdeps/unix/sysv/linux/alpha/Makefile +++ b/sysdeps/unix/sysv/linux/alpha/Makefile @@ -7,6 +7,5 @@ sysdep_routines += ieee_get_fp_control ieee_set_fp_control \ # Support old timeval32 entry points sysdep_routines += osf_select osf_gettimeofday osf_settimeofday \ osf_getitimer osf_setitimer osf_utimes \ - osf_getrusage osf_wait4 - + osf_getrusage osf_wait4 old_adjtimex endif From d958c1216762f2e6eaeb77d18a301da61bf2b378 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 26 Feb 1998 17:15:38 +0000 Subject: [PATCH 1175/4487] Code to handle compatibility of syscall for adjtime interface. --- sysdeps/unix/sysv/linux/alpha/adjtime.c | 202 ++++++++++++++++++++++++ 1 file changed, 202 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/adjtime.c diff --git a/sysdeps/unix/sysv/linux/alpha/adjtime.c b/sysdeps/unix/sysv/linux/alpha/adjtime.c new file mode 100644 index 0000000000..f7df5fcc80 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/adjtime.c @@ -0,0 +1,202 @@ +/* Copyright (C) 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +struct timeval32 +{ + int tv_sec, tv_usec; +}; + +struct timex32 { + unsigned int modes; /* mode selector */ + long offset; /* time offset (usec) */ + long freq; /* frequency offset (scaled ppm) */ + long maxerror; /* maximum error (usec) */ + long esterror; /* estimated error (usec) */ + int status; /* clock command/status */ + long constant; /* pll time constant */ + long precision; /* clock precision (usec) (read only) */ + long tolerance; /* clock frequency tolerance (ppm) + * (read only) + */ + struct timeval32 time; /* (read only) */ + long tick; /* (modified) usecs between clock ticks */ + + long ppsfreq; /* pps frequency (scaled ppm) (ro) */ + long jitter; /* pps jitter (us) (ro) */ + int shift; /* interval duration (s) (shift) (ro) */ + long stabil; /* pps stability (scaled ppm) (ro) */ + long jitcnt; /* jitter limit exceeded (ro) */ + long calcnt; /* calibration intervals (ro) */ + long errcnt; /* calibration errors (ro) */ + long stbcnt; /* stability limit exceeded (ro) */ + + int :32; int :32; int :32; int :32; + int :32; int :32; int :32; int :32; + int :32; int :32; int :32; int :32; +}; + +#define TIMEVAL timeval32 +#define TIMEX timex32 +#define ADJTIME __adjtime_tv32 +#define ADJTIMEX(x) __adjtimex_tv32 (x) +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +#define LINKAGE +#else +#define LINKAGE static +#endif + +LINKAGE int ADJTIME (const struct TIMEVAL *itv, struct TIMEVAL *otv); +extern int ADJTIMEX (struct TIMEX *); + +#include + +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +symbol_version (__adjtime_tv32, adjtime, GLIBC_2.0); +#endif + +#undef TIMEVAL +#define TIMEVAL timeval +#undef TIMEX +#define TIMEX timex +#undef ADJTIME +#define ADJTIME __adjtime_tv64 +#undef ADJTIMEX +#define ADJTIMEX(x) __syscall_adjtimex_tv64 (x) +#undef LINKAGE +#define LINKAGE static + +LINKAGE int ADJTIME (const struct TIMEVAL *itv, struct TIMEVAL *otv); +extern int ADJTIMEX (struct TIMEX *); + +#include +static int missing_adjtimex = 0; + +int +__adjtime (itv, otv) + const struct timeval *itv; + struct timeval *otv; +{ + int ret; + + if (!missing_adjtimex) + { + ret = __adjtime_tv64 (itv, otv); + if (ret && errno == ENOSYS) + missing_adjtimex = 1; + } + + if (missing_adjtimex) + { + struct timeval32 itv32, otv32; + + itv32.tv_sec = itv->tv_sec; + itv32.tv_usec = itv->tv_usec; + ret = __adjtime_tv32 (&itv32, &otv32); + if (ret == 0) + { + otv->tv_sec = otv32.tv_sec; + otv->tv_usec = otv32.tv_usec; + } + } + + return ret; +} + +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +default_symbol_version (__adjtime, adjtime, GLIBC_2.1); +#else +weak_alias (__adjtime, adjtime); +#endif + +extern int __syscall_adjtimex_tv64 (struct timex *tx); + +int +__adjtimex_tv64 (tx) + struct timex *tx; +{ + int ret; + + if (!missing_adjtimex) + { + ret = __syscall_adjtimex_tv64 (tx); + if (ret && errno == ENOSYS) + missing_adjtimex = 1; + } + + if (missing_adjtimex) + { + struct timex32 tx32; + + tx32.modes = tx->modes; + tx32.offset = tx->offset; + tx32.freq = tx->freq; + tx32.maxerror = tx->maxerror; + tx32.esterror = tx->esterror; + tx32.status = tx->status; + tx32.constant = tx->constant; + tx32.precision = tx->precision; + tx32.tolerance = tx->tolerance; + tx32.time.tv_sec = tx->time.tv_sec; + tx32.time.tv_sec = tx->time.tv_usec; + tx32.tick = tx->tick; + tx32.ppsfreq = tx->ppsfreq; + tx32.jitter = tx->jitter; + tx32.shift = tx->shift; + tx32.stabil = tx->stabil; + tx32.jitcnt = tx->jitcnt; + tx32.calcnt = tx->calcnt; + tx32.errcnt = tx->errcnt; + tx32.stbcnt = tx->stbcnt; + + ret = __adjtimex_tv32 (&tx32); + if (ret == 0) + { + tx->modes = tx32.modes; + tx->offset = tx32.offset; + tx->freq = tx32.freq; + tx->maxerror = tx32.maxerror; + tx->esterror = tx32.esterror; + tx->status = tx32.status; + tx->constant = tx32.constant; + tx->precision = tx32.precision; + tx->tolerance = tx32.tolerance; + tx->time.tv_sec = tx32.time.tv_sec; + tx->time.tv_usec = tx32.time.tv_sec; + tx->tick = tx32.tick; + tx->ppsfreq = tx32.ppsfreq; + tx->jitter = tx32.jitter; + tx->shift = tx32.shift; + tx->stabil = tx32.stabil; + tx->jitcnt = tx32.jitcnt; + tx->calcnt = tx32.calcnt; + tx->errcnt = tx32.errcnt; + tx->stbcnt = tx32.stbcnt; + } + } + + return ret; +} + +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +strong_alias (__adjtimex_tv64, __adjtimex_tv64p); +default_symbol_version (__adjtimex_tv64, __adjtimex, GLIBC_2.1); +default_symbol_version (__adjtimex_tv64p, adjtimex, GLIBC_2.1); +#else +weak_alias (__adjtimex_tv64, __adjtimex); +weak_alias (__adjtimex_tv64, adjtimex); +#endif From 23713ff9db2d28ab4e3ee071d5afdcaa2e2b0498 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 26 Feb 1998 17:15:43 +0000 Subject: [PATCH 1176/4487] Code to handle compatibility of syscall for adjtimex interface. --- sysdeps/unix/sysv/linux/alpha/adjtimex.S | 59 ++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/adjtimex.S diff --git a/sysdeps/unix/sysv/linux/alpha/adjtimex.S b/sysdeps/unix/sysv/linux/alpha/adjtimex.S new file mode 100644 index 0000000000..367b7358e6 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/adjtimex.S @@ -0,0 +1,59 @@ +/* Copyright (C) 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#define _ERRNO_H 1 +#include + +/* The problem here is that initially we made struct timeval compatible with + OSF/1, using int32. But we defined time_t with uint64, and later found + that POSIX requires tv_sec to be time_t. + + So now we have to do compatibility stuff. */ + +.text + +LEAF(__syscall_adjtimex_tv64, 0) + ldgp gp, 0(pv) +#ifdef PROF + .set noat + lda AT, _mcount + jsr AT, (AT), _mcount + .set at +#endif + .prologue 1 + +#ifdef __NR_adjtimex + ldi v0, SYS_ify(adjtimex) + callsys + bne a3, $err64 + + /* Everything ok. */ + ret + + /* If we didn't get ENOSYS, it is a real error. */ + .align 3 +$err64: +#else + /* ENOSYS. */ + ldi v0, ENOSYS +#endif + lda pv, __syscall_error + jmp zero, (pv), __syscall_error + +END(__syscall_adjtimex_tv64) From edc43054d48e2e6cd580a620955cb3b76f588a4d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 26 Feb 1998 17:16:26 +0000 Subject: [PATCH 1177/4487] Make versioned symbols only for shared library. Fix ENOSYS branch. --- sysdeps/unix/sysv/linux/alpha/getitimer.S | 14 +++++++++++--- sysdeps/unix/sysv/linux/alpha/getrusage.S | 14 +++++++++++--- sysdeps/unix/sysv/linux/alpha/gettimeofday.S | 16 +++++++++++++--- sysdeps/unix/sysv/linux/alpha/select.S | 16 +++++++++++++--- sysdeps/unix/sysv/linux/alpha/setitimer.S | 16 +++++++++++++--- sysdeps/unix/sysv/linux/alpha/settimeofday.S | 16 +++++++++++++--- sysdeps/unix/sysv/linux/alpha/syscalls.list | 13 +++++++------ sysdeps/unix/sysv/linux/alpha/utimes.S | 16 +++++++++++++--- sysdeps/unix/sysv/linux/alpha/wait4.S | 20 ++++++++++++++++---- 9 files changed, 110 insertions(+), 31 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/getitimer.S b/sysdeps/unix/sysv/linux/alpha/getitimer.S index 03ae6ea491..9ba849fcac 100644 --- a/sysdeps/unix/sysv/linux/alpha/getitimer.S +++ b/sysdeps/unix/sysv/linux/alpha/getitimer.S @@ -32,7 +32,13 @@ .text -LEAF(__getitimer_tv64, 16) +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +#define GETITIMER __getitimer_tv64 +#else +#define GETITIMER getitimer +#endif + +LEAF(GETITIMER, 16) ldgp gp, 0(pv) subq sp, 16, sp #ifdef PROF @@ -62,7 +68,7 @@ LEAF(__getitimer_tv64, 16) /* If we didn't get ENOSYS, it is a real error. */ .align 3 $err64: cmpeq v0, ENOSYS, t0 - bne t0, $error + beq t0, $error stl t0, __libc_missing_axp_tv64 /* Recover the saved arguments. */ @@ -94,6 +100,8 @@ $error: addq sp, 16, sp jmp zero, (pv), __syscall_error -END(__getitimer_tv64) +END(GETITIMER) +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING default_symbol_version (__getitimer_tv64, getitimer, GLIBC_2.1) +#endif diff --git a/sysdeps/unix/sysv/linux/alpha/getrusage.S b/sysdeps/unix/sysv/linux/alpha/getrusage.S index d875c83771..fbbe6f7931 100644 --- a/sysdeps/unix/sysv/linux/alpha/getrusage.S +++ b/sysdeps/unix/sysv/linux/alpha/getrusage.S @@ -32,7 +32,13 @@ .text -LEAF(__getrusage_tv64, 16) +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +#define GETRUSAGE __getrusage_tv64 +#else +#define GETRUSAGE getrusage +#endif + +LEAF(GETRUSAGE, 16) ldgp gp, 0(pv) subq sp, 16, sp #ifdef PROF @@ -62,7 +68,7 @@ LEAF(__getrusage_tv64, 16) /* If we didn't get ENOSYS, it is a real error. */ .align 3 $err64: cmpeq v0, ENOSYS, t0 - bne t0, $error + beq t0, $error stl t0, __libc_missing_axp_tv64 /* Recover the saved arguments. */ @@ -122,6 +128,8 @@ $error: addq sp, 16, sp jmp zero, (pv), __syscall_error -END(__getrusage_tv64) +END(GETRUSAGE) +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING default_symbol_version (__getrusage_tv64, getrusage, GLIBC_2.1) +#endif diff --git a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S index bceeefc0a7..6f7082f1b0 100644 --- a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S +++ b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S @@ -32,7 +32,13 @@ .text -LEAF(__gettimeofday_tv64, 16) +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +#define GETTIMEOFDAY __gettimeofday_tv64 +#else +#define GETTIMEOFDAY __gettimeofday +#endif + +LEAF(GETTIMEOFDAY, 16) ldgp gp, 0(pv) subq sp, 16, sp #ifdef PROF @@ -62,7 +68,7 @@ LEAF(__gettimeofday_tv64, 16) /* If we didn't get ENOSYS, it is a real error. */ .align 3 $err64: cmpeq v0, ENOSYS, t0 - bne t0, $error + beq t0, $error stl t0, __libc_missing_axp_tv64 /* Recover the saved arguments. */ @@ -91,8 +97,9 @@ $error: addq sp, 16, sp jmp zero, (pv), __syscall_error -END(__gettimeofday_tv64) +END(GETTIMEOFDAY) +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING default_symbol_version (__gettimeofday_tv64, __gettimeofday, GLIBC_2.1) /* It seems to me to be a misfeature of the assembler that we can only @@ -100,3 +107,6 @@ default_symbol_version (__gettimeofday_tv64, __gettimeofday, GLIBC_2.1) The 'p' is for 'public'. *Shrug* */ strong_alias (__gettimeofday_tv64, __gettimeofday_tv64p) default_symbol_version (__gettimeofday_tv64p, gettimeofday, GLIBC_2.1) +#else +weak_alias (__gettimeofday, gettimeofday) +#endif diff --git a/sysdeps/unix/sysv/linux/alpha/select.S b/sysdeps/unix/sysv/linux/alpha/select.S index 73076b9158..c854f7fd30 100644 --- a/sysdeps/unix/sysv/linux/alpha/select.S +++ b/sysdeps/unix/sysv/linux/alpha/select.S @@ -32,7 +32,13 @@ .text -LEAF(__select_tv64, 64) +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +#define SELECT __select_tv64 +#else +#define SELECT __select +#endif + +LEAF(SELECT, 64) ldgp gp, 0(pv) subq sp, 64, sp #ifdef PROF @@ -64,7 +70,7 @@ LEAF(__select_tv64, 64) /* If we didn't get ENOSYS, it is a real error. */ .align 3 $err64: cmpeq v0, ENOSYS, t0 - bne t0, $error + beq t0, $error stl t0, __libc_missing_axp_tv64 /* Recover the saved arguments. */ @@ -105,8 +111,9 @@ $error: addq sp, 64, sp jmp zero, (pv), __syscall_error -END(__select_tv64) +END(SELECT) +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING default_symbol_version (__select_tv64, __select, GLIBC_2.1) /* It seems to me to be a misfeature of the assembler that we can only @@ -114,3 +121,6 @@ default_symbol_version (__select_tv64, __select, GLIBC_2.1) The 'p' is for 'public'. *Shrug* */ strong_alias (__select_tv64, __select_tv64p) default_symbol_version (__select_tv64p, select, GLIBC_2.1) +#else +weak_alias (__select, select) +#endif diff --git a/sysdeps/unix/sysv/linux/alpha/setitimer.S b/sysdeps/unix/sysv/linux/alpha/setitimer.S index a2085cc29e..e57acc2020 100644 --- a/sysdeps/unix/sysv/linux/alpha/setitimer.S +++ b/sysdeps/unix/sysv/linux/alpha/setitimer.S @@ -32,7 +32,13 @@ .text -LEAF(__setitimer_tv64, 48) +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +#define SETITIMER __setitimer_tv64 +#else +#define SETITIMER __setitimer +#endif + +LEAF(SETITIMER, 48) ldgp gp, 0(pv) subq sp, 48, sp #ifdef PROF @@ -63,7 +69,7 @@ LEAF(__setitimer_tv64, 48) /* If we didn't get ENOSYS, it is a real error. */ .align 3 $err64: cmpeq v0, ENOSYS, t0 - bne t0, $error + beq t0, $error stl t0, __libc_missing_axp_tv64 /* Recover the saved arguments. */ @@ -110,8 +116,9 @@ $error: addq sp, 48, sp jmp zero, (pv), __syscall_error -END(__setitimer_tv64) +END(SETITIMER) +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING default_symbol_version (__setitimer_tv64, __setitimer, GLIBC_2.1) /* It seems to me to be a misfeature of the assembler that we can only @@ -119,3 +126,6 @@ default_symbol_version (__setitimer_tv64, __setitimer, GLIBC_2.1) The 'p' is for 'public'. *Shrug* */ strong_alias (__setitimer_tv64, __setitimer_tv64p) default_symbol_version (__setitimer_tv64p, setitimer, GLIBC_2.1) +#else +weak_alias (__setitimer, setitimer) +#endif diff --git a/sysdeps/unix/sysv/linux/alpha/settimeofday.S b/sysdeps/unix/sysv/linux/alpha/settimeofday.S index b730df7136..ae129ecc1c 100644 --- a/sysdeps/unix/sysv/linux/alpha/settimeofday.S +++ b/sysdeps/unix/sysv/linux/alpha/settimeofday.S @@ -32,7 +32,13 @@ .text -LEAF(__settimeofday_tv64, 16) +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +#define SETTIMEOFDAY __settimeofday_tv64 +#else +#define SETTIMEOFDAY __settimeofday +#endif + +LEAF(SETTIMEOFDAY, 16) ldgp gp, 0(pv) subq sp, 16, sp #ifdef PROF @@ -61,7 +67,7 @@ LEAF(__settimeofday_tv64, 16) /* If we didn't get ENOSYS, it is a real error. */ .align 3 $err64: cmpeq v0, ENOSYS, t0 - bne t0, $error + beq t0, $error stl t0, __libc_missing_axp_tv64 /* Recover the saved arguments. */ @@ -91,8 +97,9 @@ $error: addq sp, 16, sp jmp zero, (pv), __syscall_error -END(__settimeofday_tv64) +END(SETTIMEOFDAY) +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING default_symbol_version (__settimeofday_tv64, __settimeofday, GLIBC_2.1) /* It seems to me to be a misfeature of the assembler that we can only @@ -100,3 +107,6 @@ default_symbol_version (__settimeofday_tv64, __settimeofday, GLIBC_2.1) The 'p' is for 'public'. *Shrug* */ strong_alias (__settimeofday_tv64, __settimeofday_tv64p) default_symbol_version (__settimeofday_tv64p, settimeofday, GLIBC_2.1) +#else +weak_alias (__settimeofday, settimeofday) +#endif diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 59c0cb8a09..26d4f15258 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -64,9 +64,10 @@ pciconfig_write EXTRA pciconfig_write 5 pciconfig_write # support old timeval32 entry points osf_select - osf_select 5 __select_tv32 __select@GLIBC_2.0 select@GLIBC_2.0 osf_gettimeofday - osf_gettimeofday 2 __gettimeofday_tv32 __gettimeofday@GLIBC_2.0 gettimeofday@GLIBC_2.0 -osf_settimeofday - osf_settimeofday 2 __settimeofday_tv32 settimeofday@GLIBC_2.0 -osf_getitimer - osf_getitimer 2 __getitimer_tv32 getitimer@GLIBC_2.0 -osf_setitimer - osf_setitimer 3 __setitimer_tv32 setitimer@GLIBC_2.0 -osf_utimes - osf_utimes 2 __utimes_tv32 utimes@GLIBC_2.0 -osf_getrusage - osf_getrusage 2 __getrusage_tv32 getrusage@GLIBC_2.0 -osf_wait4 - osf_wait4 2 __wait4_tv32 wait4@GLIBC_2.0 +osf_settimeofday - osf_settimeofday 2 __settimeofday_tv32 __settimeofday@GLIBC_2.0 settimeofday@GLIBC_2.0 +osf_getitimer - osf_getitimer 2 __getitimer_tv32 __getitimer@GLIBC_2.0 getitimer@GLIBC_2.0 +osf_setitimer - osf_setitimer 3 __setitimer_tv32 __setitimer@GLIBC_2.0 setitimer@GLIBC_2.0 +osf_utimes - osf_utimes 2 __utimes_tv32 __utimes@GLIBC_2.0 utimes@GLIBC_2.0 +osf_getrusage - osf_getrusage 2 __getrusage_tv32 __getrusage@GLIBC_2.0 getrusage@GLIBC_2.0 +osf_wait4 - osf_wait4 2 __wait4_tv32 __wait4@GLIBC_2.0 wait4@GLIBC_2.0 +old_adjtimex - old_adjtimex 1 __adjtimex_tv32 __adjtimex@GLIBC_2.0 adjtimex@GLIBC_2.0 diff --git a/sysdeps/unix/sysv/linux/alpha/utimes.S b/sysdeps/unix/sysv/linux/alpha/utimes.S index 2b4c71e410..a1d2b1513c 100644 --- a/sysdeps/unix/sysv/linux/alpha/utimes.S +++ b/sysdeps/unix/sysv/linux/alpha/utimes.S @@ -32,7 +32,13 @@ .text -LEAF(__utimes_tv64, 16) +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +#define UTIMES __utimes_tv64 +#else +#define UTIMES __utimes +#endif + +LEAF(UTIMES, 16) ldgp gp, 0(pv) subq sp, 16, sp #ifdef PROF @@ -62,7 +68,7 @@ LEAF(__utimes_tv64, 16) /* If we didn't get ENOSYS, it is a real error. */ .align 3 $err64: cmpeq v0, ENOSYS, t0 - bne t0, $error + beq t0, $error stl t0, __libc_missing_axp_tv64 /* Recover the saved arguments. */ @@ -96,8 +102,9 @@ $error: addq sp, 16, sp jmp zero, (pv), __syscall_error -END(__utimes_tv64) +END(UTIMES) +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING default_symbol_version (__utimes_tv64, __utimes, GLIBC_2.1) /* It seems to me to be a misfeature of the assembler that we can only @@ -105,3 +112,6 @@ default_symbol_version (__utimes_tv64, __utimes, GLIBC_2.1) The 'p' is for 'public'. *Shrug* */ strong_alias (__utimes_tv64, __utimes_tv64p) default_symbol_version (__utimes_tv64p, utimes, GLIBC_2.1) +#else +weak_alias (__utimes, utimes) +#endif diff --git a/sysdeps/unix/sysv/linux/alpha/wait4.S b/sysdeps/unix/sysv/linux/alpha/wait4.S index 5ab86077c8..334836f5aa 100644 --- a/sysdeps/unix/sysv/linux/alpha/wait4.S +++ b/sysdeps/unix/sysv/linux/alpha/wait4.S @@ -32,7 +32,13 @@ .text -LEAF(__wait4_tv64, 32) +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +#define WAIT4 __wait4_tv64 +#else +#define WAIT4 __wait4 +#endif + +LEAF(WAIT4, 32) ldgp gp, 0(pv) subq sp, 32, sp #ifdef PROF @@ -64,7 +70,7 @@ LEAF(__wait4_tv64, 32) /* If we didn't get ENOSYS, it is a real error. */ .align 3 $err64: cmpeq v0, ENOSYS, t0 - bne t0, $error + beq t0, $error stl t0, __libc_missing_axp_tv64 /* Recover the saved arguments. */ @@ -79,7 +85,7 @@ $do32: ldi v0, SYS_ify(osf_wait4) bne a3, $error /* Copy back to proper format. */ - ldq a3, 8(sp) + ldq a3, 24(sp) beq a3, 2f ldl t0, 0(a3) # ru_utime.tv_sec ldl t1, 4(a3) # ru_utime.tv_usec @@ -98,6 +104,7 @@ $do32: ldi v0, SYS_ify(osf_wait4) ldt $f25, 96(a3) # ru_msgrcv ldt $f26, 104(a3) # ru_nsignals ldt $f27, 112(a3) # ru_nvcsw + .set noat ldt $f28, 120(a3) # ru_nivcsw stq t0, 0(a3) stq t1, 8(a3) @@ -117,6 +124,7 @@ $do32: ldi v0, SYS_ify(osf_wait4) stt $f26, 120(a3) stt $f27, 128(a3) stt $f28, 136(a3) + .set at 2: addq sp, 32, sp ret @@ -127,8 +135,9 @@ $error: addq sp, 32, sp jmp zero, (pv), __syscall_error -END(__wait4_tv64) +END(WAIT4) +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING default_symbol_version (__wait4_tv64, __wait4, GLIBC_2.1) /* It seems to me to be a misfeature of the assembler that we can only @@ -136,3 +145,6 @@ default_symbol_version (__wait4_tv64, __wait4, GLIBC_2.1) The 'p' is for 'public'. *Shrug* */ strong_alias (__wait4_tv64, __wait4_tv64p) default_symbol_version (__wait4_tv64p, wait4, GLIBC_2.1) +#else +weak_alias (__wait4, wait4) +#endif From f0b71999ee8b462100acae6317bbe76eb7da4ec1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 26 Feb 1998 17:16:51 +0000 Subject: [PATCH 1178/4487] (_NSIG): Changed to 64. --- sysdeps/unix/sysv/linux/alpha/bits/signum.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/signum.h b/sysdeps/unix/sysv/linux/alpha/bits/signum.h index 6b1399eb12..05ffbae550 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/signum.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/signum.h @@ -68,6 +68,6 @@ #define SIGPWR SIGINFO #define SIGIOT SIGABRT -#define _NSIG 32 /* Biggest signal number + 1. */ +#define _NSIG 64 /* Biggest signal number + 1. */ #endif /* included. */ From 9ba8164eb6006be1684c519311adfd9c90aa9fa9 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sun, 1 Mar 1998 00:56:41 +0000 Subject: [PATCH 1179/4487] * shlib-versions: Match alpha*. * sysdeps/unix/sysv/linux/alpha/syscalls.list: Add adjtimex. * sysdeps/unix/sysv/linux/alpha/adjtimex.S: Remove. * sysdeps/alpha/fpu/bits/mathinline.h (isunordered et al): New. Implement copysign* with and without __ prefix. Likewise for fabs; use builtin for gcc 2.8. (floor*): New. (fdim*): New. * elf/elf.h (EF_SPARC*, EF_ALPHA*, SHT_ALPHA*, SHF_ALPHA*): New. (R_SPARC*): Match current v9 ABI. * sysdeps/wordsize-64/stdint.h (intptr_t): Is a long. * sunrpc/clnt_udp.c (clntudp_call): Use socklen_t. * sunrpc/pmap_rmt.c (clnt_broadcast): Likewise. * sunrpc/svc_tcp.c (svctcp_create, rendezvous_request): Likewise. * sysdeps/generic/getresgid.c: Use prototype form because of warning. * sysdeps/unix/sysv/linux/getdents.c: Likewise. * sysdeps/unix/sysv/linux/alpha/adjtime.c: Likewise. * sysdeps/unix/grantpt.c (argv): Fix consts. * sysdeps/unix/sysv/linux/getpt.c: Include * sysdeps/unix/sysv/linux/sigaction.c: Likewise. --- sysdeps/alpha/fpu/bits/mathinline.h | 147 ++++++++++++++++++-- sysdeps/unix/sysv/linux/alpha/adjtime.c | 3 +- sysdeps/unix/sysv/linux/alpha/adjtimex.S | 59 -------- sysdeps/unix/sysv/linux/alpha/syscalls.list | 3 + 4 files changed, 137 insertions(+), 75 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/alpha/adjtimex.S diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h index 22703120b1..492d9f18a7 100644 --- a/sysdeps/alpha/fpu/bits/mathinline.h +++ b/sysdeps/alpha/fpu/bits/mathinline.h @@ -18,29 +18,148 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifdef __GNUC__ -#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__ +#ifndef _MATH_H +# error "Never use directly; include instead." +#endif + +#ifdef __cplusplus +# define __MATH_INLINE __inline +#else +# define __MATH_INLINE extern __inline +#endif + +#ifdef __USE_ISOC9X +# define isunordered(x, y) \ + (__extension__ \ + ({ double __r; \ + __asm ("cmptun/su %1,%2,%0\n\ttrapb" \ + : "=&f" (__r) : "f" (x), "f"(y)); \ + __r != 0; })) + +# define isgreater(x, y) \ + (__extension__ \ + ({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \ + !isunordered(__x, __y) && __x > __y; })) +# define isgreaterequal(x, y) \ + (__extension__ \ + ({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \ + !isunordered(__x, __y) && __x >= __y; })) +# define isless(x, y) \ + (__extension__ \ + ({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \ + !isunordered(__x, __y) && __x < __y; })) +# define islessequal(x, y) \ + (__extension__ \ + ({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \ + !isunordered(__x, __y) && __x <= __y; })) +# define islessgreater(x, y) \ + (__extension__ \ + ({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \ + !isunordered(__x, __y) && __x != __y; })) +#endif /* ISOC9X */ + +#define __inline_copysign(NAME, TYPE) \ +__MATH_INLINE TYPE \ +NAME (TYPE __x, TYPE __y) \ +{ \ + TYPE __z; \ + __asm ("cpys %1, %2, %0" : "=f" (__z) : "f" (__y), "f" (__x)); \ + return __z; \ +} + +__inline_copysign(__copysignf, float) +__inline_copysign(copysignf, float) +__inline_copysign(__copysign, double) +__inline_copysign(copysign, double) + +#undef __MATH_INLINE_copysign + + +#if defined __GNUC__ && (__GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ >= 8) +__MATH_INLINE float __fabsf (float __x) { return __builtin_fabsf (__x); } +__MATH_INLINE float fabsf (float __x) { return __builtin_fabsf (__x); } +__MATH_INLINE double __fabs (double __x) { return __builtin_fabs (__x); } +__MATH_INLINE double fabs (double __x) { return __builtin_fabs (__x); } +#else +#define __inline_fabs(NAME, TYPE) \ +__MATH_INLINE TYPE \ +NAME (TYPE __x) \ +{ \ + TYPE __z; \ + __asm ("cpys $f31, %1, %0" : "=f" (__z) : "f" (__x)); \ + return __z; \ +} + +__inline_fabs(__fabsf, float) +__inline_fabs(fabsf, float) +__inline_fabs(__fabs, double) +__inline_fabs(fabs, double) + +#undef __inline_fabs +#endif + -extern __inline double -__copysign (double __x, double __y) +/* Use the -inf rounding mode conversion instructions to implement + floor. We note when the exponent is large enough that the value + must be integral, as this avoids unpleasant integer overflows. */ + +__MATH_INLINE float +__floorf (float __x) { - __asm ("cpys %1, %2, %0" : "=f" (__x) : "f" (__y), "f" (__x)); + if (fabsf (__x) < 16777216.0f) /* 1 << FLT_MANT_DIG */ + { + /* Note that Alpha S_Floating is stored in registers in a + restricted T_Floating format, so we don't even need to + convert back to S_Floating in the end. The initial + conversion to T_Floating is needed to handle denormals. */ + + float __tmp1, __tmp2; + + __asm ("cvtst/s %3,%2\n\t" + "cvttq/svim %2,%1\n\t" + "cvtqt/suim %1,%0\n\t" + "trapb" + : "=&f"(__x), "=&f"(__tmp1), "=&f"(__tmp2) + : "f"(__x)); + } return __x; } -extern __inline double -fabs (double __x) +__MATH_INLINE double +__floor (double __x) { - __asm ("cpys $f31, %1, %0" : "=f" (__x) : "f" (__x)); + if (fabs (__x) < 9007199254740992.0) /* 1 << DBL_MANT_DIG */ + { + double __tmp1; + __asm ("cvttq/svim %2,%1\n\t" + "cvtqt/suim %1,%0\n\t" + "trapb" + : "=&f"(__x), "=&f"(__tmp1) + : "f"(__x)); + } return __x; } -extern __inline double -atan (double __x) +__MATH_INLINE float floorf (float __x) { return __floorf(__x); } +__MATH_INLINE double floor (double __x) { return __floor(__x); } + + +__MATH_INLINE float __fdimf (float __x, float __y) { - extern double __atan2 (double, double); - return __atan2 (__x, 1.0); + return __x < __y ? 0.0f : __x - __y; } -#endif -#endif +__MATH_INLINE float fdimf (float __x, float __y) +{ + return __x < __y ? 0.0f : __x - __y; +} + +__MATH_INLINE double __fdim (double __x, double __y) +{ + return __x < __y ? 0.0 : __x - __y; +} + +__MATH_INLINE double fdim (double __x, double __y) +{ + return __x < __y ? 0.0 : __x - __y; +} diff --git a/sysdeps/unix/sysv/linux/alpha/adjtime.c b/sysdeps/unix/sysv/linux/alpha/adjtime.c index f7df5fcc80..b695ece380 100644 --- a/sysdeps/unix/sysv/linux/alpha/adjtime.c +++ b/sysdeps/unix/sysv/linux/alpha/adjtime.c @@ -126,8 +126,7 @@ weak_alias (__adjtime, adjtime); extern int __syscall_adjtimex_tv64 (struct timex *tx); int -__adjtimex_tv64 (tx) - struct timex *tx; +__adjtimex_tv64 (struct timex *tx) { int ret; diff --git a/sysdeps/unix/sysv/linux/alpha/adjtimex.S b/sysdeps/unix/sysv/linux/alpha/adjtimex.S deleted file mode 100644 index 367b7358e6..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/adjtimex.S +++ /dev/null @@ -1,59 +0,0 @@ -/* Copyright (C) 1998 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include -#define _ERRNO_H 1 -#include - -/* The problem here is that initially we made struct timeval compatible with - OSF/1, using int32. But we defined time_t with uint64, and later found - that POSIX requires tv_sec to be time_t. - - So now we have to do compatibility stuff. */ - -.text - -LEAF(__syscall_adjtimex_tv64, 0) - ldgp gp, 0(pv) -#ifdef PROF - .set noat - lda AT, _mcount - jsr AT, (AT), _mcount - .set at -#endif - .prologue 1 - -#ifdef __NR_adjtimex - ldi v0, SYS_ify(adjtimex) - callsys - bne a3, $err64 - - /* Everything ok. */ - ret - - /* If we didn't get ENOSYS, it is a real error. */ - .align 3 -$err64: -#else - /* ENOSYS. */ - ldi v0, ENOSYS -#endif - lda pv, __syscall_error - jmp zero, (pv), __syscall_error - -END(__syscall_adjtimex_tv64) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 26d4f15258..96fbc0c323 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -71,3 +71,6 @@ osf_utimes - osf_utimes 2 __utimes_tv32 __utimes@GLIBC_2.0 utimes@GLIBC_2.0 osf_getrusage - osf_getrusage 2 __getrusage_tv32 __getrusage@GLIBC_2.0 getrusage@GLIBC_2.0 osf_wait4 - osf_wait4 2 __wait4_tv32 __wait4@GLIBC_2.0 wait4@GLIBC_2.0 old_adjtimex - old_adjtimex 1 __adjtimex_tv32 __adjtimex@GLIBC_2.0 adjtimex@GLIBC_2.0 + +# and one for timeval64 entry points +adjtimex adjtime adjtimex 1 __syscall_adjtimex_tv64 From ee0671d1a10db3df71840ee275486c8ceaa2c3ef Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sun, 1 Mar 1998 10:53:22 +0000 Subject: [PATCH 1180/4487] 1998-03-01 18:52 H.J. Lu (hjl@gnu.org) * sysdeps/unix/sysv/linux/alpha/syscalls.list (osf_settimeofday, osf_getitimer, osf_setitimer, osf_utimes, osf_getrusage, osf_wait4): Removed __xxxx symbol for GLIBC_2.0. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 96fbc0c323..fb15ea9bae 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -64,12 +64,12 @@ pciconfig_write EXTRA pciconfig_write 5 pciconfig_write # support old timeval32 entry points osf_select - osf_select 5 __select_tv32 __select@GLIBC_2.0 select@GLIBC_2.0 osf_gettimeofday - osf_gettimeofday 2 __gettimeofday_tv32 __gettimeofday@GLIBC_2.0 gettimeofday@GLIBC_2.0 -osf_settimeofday - osf_settimeofday 2 __settimeofday_tv32 __settimeofday@GLIBC_2.0 settimeofday@GLIBC_2.0 -osf_getitimer - osf_getitimer 2 __getitimer_tv32 __getitimer@GLIBC_2.0 getitimer@GLIBC_2.0 -osf_setitimer - osf_setitimer 3 __setitimer_tv32 __setitimer@GLIBC_2.0 setitimer@GLIBC_2.0 -osf_utimes - osf_utimes 2 __utimes_tv32 __utimes@GLIBC_2.0 utimes@GLIBC_2.0 -osf_getrusage - osf_getrusage 2 __getrusage_tv32 __getrusage@GLIBC_2.0 getrusage@GLIBC_2.0 -osf_wait4 - osf_wait4 2 __wait4_tv32 __wait4@GLIBC_2.0 wait4@GLIBC_2.0 +osf_settimeofday - osf_settimeofday 2 __settimeofday_tv32 settimeofday@GLIBC_2.0 +osf_getitimer - osf_getitimer 2 __getitimer_tv32 getitimer@GLIBC_2.0 +osf_setitimer - osf_setitimer 3 __setitimer_tv32 setitimer@GLIBC_2.0 +osf_utimes - osf_utimes 2 __utimes_tv32 utimes@GLIBC_2.0 +osf_getrusage - osf_getrusage 2 __getrusage_tv32 getrusage@GLIBC_2.0 +osf_wait4 - osf_wait4 2 __wait4_tv32 wait4@GLIBC_2.0 old_adjtimex - old_adjtimex 1 __adjtimex_tv32 __adjtimex@GLIBC_2.0 adjtimex@GLIBC_2.0 # and one for timeval64 entry points From 1e0c166557efb349ca50339ed85c5c6110877f40 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 4 Mar 1998 02:36:01 +0000 Subject: [PATCH 1181/4487] * sysdeps/m68k/dl-machine.h: (elf_machine_load_address): Use word offsets into the GOT. (RTLD_START): Likewise. --- sysdeps/m68k/dl-machine.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index 1d2045dd87..fb32ce215a 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -57,7 +57,7 @@ elf_machine_load_address (void) { Elf32_Addr addr; asm ("lea _dl_start(%%pc), %0\n\t" - "sub.l _dl_start@GOTPC(%%pc), %0" + "sub.l _dl_start@GOT.w(%%a5), %0" : "=a" (addr)); return addr; } @@ -163,7 +163,7 @@ asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \ lea _GLOBAL_OFFSET_TABLE_@GOTPC(%pc), %a5 | See if we were run as a command with the executable file | name as an extra leading argument. - move.l ([_dl_skip_args@GOT, %a5]), %d0 + move.l ([_dl_skip_args@GOT.w, %a5]), %d0 jeq 0f | Pop the original argument count move.l (%sp)+, %d1 @@ -174,7 +174,7 @@ asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \ | Push back the modified argument count. move.l %d1, -(%sp) 0: | Push _dl_default_scope[2] as argument in _dl_init_next call below. - move.l ([_dl_default_scope@GOT, %a5], 8), %d2 + move.l ([_dl_default_scope@GOT.w, %a5], 8), %d2 0: move.l %d2, -(%sp) | Call _dl_init_next to return the address of an initializer | function to run. @@ -195,9 +195,9 @@ asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \ | Loop to call _dl_init_next for the next initializer. jra 0b 1: | Clear the startup flag. - clr.l _dl_starting_up@GOT(%a5) + clr.l _dl_starting_up@GOT.w(%a5) | Pass our finalizer function to the user in %a1. - move.l _dl_fini@GOT(%a5), %a1 + move.l _dl_fini@GOT.w(%a5), %a1 | Initialize %fp with the stack pointer. move.l %sp, %fp | Jump to the user's entry point. From 56d7f029316d535c4118a606fce8394fd7fa8a97 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 6 Mar 1998 01:48:50 +0000 Subject: [PATCH 1182/4487] * sysdeps/m68k/add_n.S: Use ENTRY and END macros. * sysdeps/m68k/lshift.S: Likewise. * sysdeps/m68k/rshift.S: Likewise. * sysdeps/m68k/sub_n.S: Likewise. * sysdeps/m68k/m68020/addmul_1.S: Likewise. * sysdeps/m68k/m68020/mul_1.S: Likewise. * sysdeps/m68k/m68020/submul_1.S: Likewise. * sysdeps/unix/sysv/linux/m68k/sysdep.S: Use ENTRY macro. [_LIBC_REENTRANT]: Don't store into global errno. * sysdeps/m68k/sysdep.h: New file. * sysdeps/unix/sysv/linux/m68k/sysdep.h: Use it. Use the macros ENTRY, CALL_MCOUNT, JUMPTARGET and syscall_error from there. (DO_CALL): Change to expect syscall name as argument. (PSEUDO): Pass syscall_name to DO_CALL. (SYSCALL_ERROR_HANDLER) [_LIBC_REENTRANT]: Don't store into global errno. --- sysdeps/m68k/add_n.S | 10 +-- sysdeps/m68k/lshift.S | 10 +-- sysdeps/m68k/m68020/addmul_1.S | 10 +-- sysdeps/m68k/m68020/mul_1.S | 10 +-- sysdeps/m68k/m68020/submul_1.S | 10 +-- sysdeps/m68k/rshift.S | 10 +-- sysdeps/m68k/sub_n.S | 10 +-- sysdeps/m68k/sysdep.h | 118 ++++++++++++++++++++++++++ sysdeps/unix/sysv/linux/m68k/sysdep.S | 12 +-- sysdeps/unix/sysv/linux/m68k/sysdep.h | 47 ++-------- 10 files changed, 152 insertions(+), 95 deletions(-) create mode 100644 sysdeps/m68k/sysdep.h diff --git a/sysdeps/m68k/add_n.S b/sysdeps/m68k/add_n.S index 7ca5b95bcc..c993c2aeb8 100644 --- a/sysdeps/m68k/add_n.S +++ b/sysdeps/m68k/add_n.S @@ -1,7 +1,7 @@ /* mc68020 __mpn_add_n -- Add two limb vectors of the same length > 0 and store sum in a third limb vector. -Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc. +Copyright (C) 1992, 1994, 1996, 1998 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -32,11 +32,7 @@ MA 02111-1307, USA. */ #include "asm-syntax.h" TEXT - ALIGN - GLOBL C_SYMBOL_NAME(__mpn_add_n) - -C_SYMBOL_NAME(__mpn_add_n:) -PROLOG(__mpn_add_n) +ENTRY(__mpn_add_n) /* Save used registers on the stack. */ movel R(d2),MEM_PREDEC(sp) movel R(a2),MEM_PREDEC(sp) @@ -77,4 +73,4 @@ L(L2:) movel MEM_POSTINC(sp),R(d2) rts -EPILOG(__mpn_add_n) +END(__mpn_add_n) diff --git a/sysdeps/m68k/lshift.S b/sysdeps/m68k/lshift.S index dc2da206d1..a1d6690bd5 100644 --- a/sysdeps/m68k/lshift.S +++ b/sysdeps/m68k/lshift.S @@ -1,6 +1,6 @@ /* mc68020 __mpn_lshift -- Shift left a low-level natural-number integer. -Copyright (C) 1996 Free Software Foundation, Inc. +Copyright (C) 1996, 1998 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -36,11 +36,7 @@ MA 02111-1307, USA. */ #define cnt d4 TEXT - ALIGN - GLOBL C_SYMBOL_NAME(__mpn_lshift) - -C_SYMBOL_NAME(__mpn_lshift:) -PROLOG(__mpn_lshift) +ENTRY(__mpn_lshift) /* Save used registers on the stack. */ moveml R(d2)-R(d6)/R(a2),MEM_PREDEC(sp) @@ -148,4 +144,4 @@ L(LLend:) /* Restore used registers from stack frame. */ moveml MEM_POSTINC(sp),R(d2)-R(d6)/R(a2) rts -EPILOG(__mpn_lshift) +END(__mpn_lshift) diff --git a/sysdeps/m68k/m68020/addmul_1.S b/sysdeps/m68k/m68020/addmul_1.S index 4b99c21f84..7f885575c8 100644 --- a/sysdeps/m68k/m68020/addmul_1.S +++ b/sysdeps/m68k/m68020/addmul_1.S @@ -1,7 +1,7 @@ /* mc68020 __mpn_addmul_1 -- Multiply a limb vector with a limb and add the result to a second limb vector. -Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc. +Copyright (C) 1992, 1994, 1996, 1998 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -32,11 +32,7 @@ MA 02111-1307, USA. */ #include "asm-syntax.h" TEXT - ALIGN - GLOBL C_SYMBOL_NAME(__mpn_addmul_1) - -C_SYMBOL_NAME(__mpn_addmul_1:) -PROLOG(__mpn_addmul_1) +ENTRY(__mpn_addmul_1) #define res_ptr a0 #define s1_ptr a1 @@ -81,4 +77,4 @@ L(L1:) movel MEM_POSTINC(s1_ptr),R(d3) moveml MEM_POSTINC(sp),R(d2)-R(d5) rts -EPILOG(__mpn_addmul_1) +END(__mpn_addmul_1) diff --git a/sysdeps/m68k/m68020/mul_1.S b/sysdeps/m68k/m68020/mul_1.S index ef7d93721f..367f77faf9 100644 --- a/sysdeps/m68k/m68020/mul_1.S +++ b/sysdeps/m68k/m68020/mul_1.S @@ -1,7 +1,7 @@ /* mc68020 __mpn_mul_1 -- Multiply a limb vector with a limb and store the result in a second limb vector. -Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc. +Copyright (C) 1992, 1994, 1996, 1998 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -32,11 +32,7 @@ MA 02111-1307, USA. */ #include "asm-syntax.h" TEXT - ALIGN - GLOBL C_SYMBOL_NAME(__mpn_mul_1) - -C_SYMBOL_NAME(__mpn_mul_1:) -PROLOG(__mpn_mul_1) +ENTRY(__mpn_mul_1) #define res_ptr a0 #define s1_ptr a1 @@ -88,4 +84,4 @@ L(L1:) movel MEM_POSTINC(s1_ptr),R(d3) movel MEM_POSTINC(sp),R(d2) #endif rts -EPILOG(__mpn_mul_1) +END(__mpn_mul_1) diff --git a/sysdeps/m68k/m68020/submul_1.S b/sysdeps/m68k/m68020/submul_1.S index 9770c6cd6b..2710045c13 100644 --- a/sysdeps/m68k/m68020/submul_1.S +++ b/sysdeps/m68k/m68020/submul_1.S @@ -1,7 +1,7 @@ /* mc68020 __mpn_submul_1 -- Multiply a limb vector with a limb and subtract the result from a second limb vector. -Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc. +Copyright (C) 1992, 1994, 1996, 1998 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -32,11 +32,7 @@ MA 02111-1307, USA. */ #include "asm-syntax.h" TEXT - ALIGN - GLOBL C_SYMBOL_NAME(__mpn_submul_1) - -C_SYMBOL_NAME(__mpn_submul_1:) -PROLOG(__mpn_submul_1) +ENTRY(__mpn_submul_1) #define res_ptr a0 #define s1_ptr a1 @@ -81,4 +77,4 @@ L(L1:) movel MEM_POSTINC(s1_ptr),R(d3) moveml MEM_POSTINC(sp),R(d2)-R(d5) rts -EPILOG(__mpn_submul_1) +END(__mpn_submul_1) diff --git a/sysdeps/m68k/rshift.S b/sysdeps/m68k/rshift.S index f529390cf8..3b7a24b363 100644 --- a/sysdeps/m68k/rshift.S +++ b/sysdeps/m68k/rshift.S @@ -1,6 +1,6 @@ /* mc68020 __mpn_rshift -- Shift right a low-level natural-number integer. -Copyright (C) 1996 Free Software Foundation, Inc. +Copyright (C) 1996, 1998 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -36,11 +36,7 @@ MA 02111-1307, USA. */ #define cnt d4 TEXT - ALIGN - GLOBL C_SYMBOL_NAME(__mpn_rshift) - -C_SYMBOL_NAME(__mpn_rshift:) -PROLOG(__mpn_rshift) +ENTRY(__mpn_rshift) /* Save used registers on the stack. */ moveml R(d2)-R(d6)/R(a2),MEM_PREDEC(sp) @@ -147,4 +143,4 @@ L(LLend:) /* Restore used registers from stack frame. */ moveml MEM_POSTINC(sp),R(d2)-R(d6)/R(a2) rts -EPILOG(__mpn_rshift) +END(__mpn_rshift) diff --git a/sysdeps/m68k/sub_n.S b/sysdeps/m68k/sub_n.S index f94b0c7282..92fb47a4c3 100644 --- a/sysdeps/m68k/sub_n.S +++ b/sysdeps/m68k/sub_n.S @@ -1,7 +1,7 @@ /* mc68020 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and store difference in a third limb vector. -Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc. +Copyright (C) 1992, 1994, 1996, 1998 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -32,11 +32,7 @@ MA 02111-1307, USA. */ #include "asm-syntax.h" TEXT - ALIGN - GLOBL C_SYMBOL_NAME(__mpn_sub_n) - -C_SYMBOL_NAME(__mpn_sub_n:) -PROLOG(__mpn_sub_n) +ENTRY(__mpn_sub_n) /* Save used registers on the stack. */ movel R(d2),MEM_PREDEC(sp) movel R(a2),MEM_PREDEC(sp) @@ -77,4 +73,4 @@ L(L2:) movel MEM_POSTINC(sp),R(d2) rts -EPILOG(__mpn_sub_n) +END(__mpn_sub_n) diff --git a/sysdeps/m68k/sysdep.h b/sysdeps/m68k/sysdep.h new file mode 100644 index 0000000000..5998f4218b --- /dev/null +++ b/sysdeps/m68k/sysdep.h @@ -0,0 +1,118 @@ +/* Assembler macros for m68k. + Copyright (C) 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +#ifdef ASSEMBLER + +/* Syntactic details of assembler. */ + +#ifdef HAVE_ELF + +/* ELF uses byte-counts for .align, most others use log2 of count of bytes. */ +#define ALIGNARG(log2) 1<, December 1995. @@ -19,6 +19,7 @@ Boston, MA 02111-1307, USA. */ #include +#include /* For Linux we can use the system call table in the header file /usr/include/asm/unistd.h @@ -33,40 +34,6 @@ #ifdef ASSEMBLER -/* Define an entry point visible from C. */ -#define ENTRY(name) \ - .globl name; \ - .type name, @function; \ - .align 4; \ - C_LABEL(name) \ - CALL_MCOUNT - -#undef END -#define END(name) .size name, . - name - -/* If compiled for profiling, call `_mcount' at the start of each function. */ -#ifdef PROF -/* The mcount code relies on a normal frame pointer being on the stack - to locate our caller, so push one just for its benefit. */ -#define CALL_MCOUNT \ - move.l %fp, -(%sp); move.l %sp, %fp; \ - jbsr JUMPTARGET (_mcount); \ - move.l (%sp)+, %fp; -#else -#define CALL_MCOUNT /* Do nothing. */ -#endif - -#ifdef PIC -#define JUMPTARGET(name) name##@PLTPC -#else -#define JUMPTARGET(name) name -#endif - -/* Since C identifiers are not normally prefixed with an underscore - on this system, the asm identifier `syscall_error' intrudes on the - C name space. Make sure we use an innocuous name. */ -#define syscall_error __syscall_error - /* Linux uses a negative return value to indicate syscall errors, unlike most Unices, which use the condition codes' carry flag. @@ -76,10 +43,11 @@ for a real error by making sure the value in %d0 is a real error number. Linus said he will make sure the no syscall returns a value in -1 .. -4095 as a valid result so we can savely test with -4095. */ +#undef PSEUDO #define PSEUDO(name, syscall_name, args) \ .text; \ ENTRY (name) \ - DO_CALL (&SYS_ify (syscall_name), args); \ + DO_CALL (syscall_name, args); \ cmp.l &-4095, %d0; \ jcc syscall_error @@ -93,9 +61,6 @@ #ifdef _LIBC_REENTRANT #define SYSCALL_ERROR_HANDLER \ syscall_error: \ - move.l (errno@GOTPC, %pc), %a0; \ - neg.l %d0; \ - move.l %d0, (%a0); \ move.l %d0, -(%sp); \ jbsr __errno_location@PLTPC; \ move.l (%sp)+, (%a0); \ @@ -145,8 +110,8 @@ syscall_error: \ speed is more important, we don't use movem. Since %a0 and %a1 are scratch registers, we can use them for saving as well. */ -#define DO_CALL(syscall, args) \ - move.l syscall, %d0; \ +#define DO_CALL(syscall_name, args) \ + move.l &SYS_ify(syscall_name), %d0; \ DOARGS_##args \ trap &0; \ UNDOARGS_##args From 48a686308ed85f7dc4c1742fcd5e8d2e5cf6ac3c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 6 Mar 1998 11:38:58 +0000 Subject: [PATCH 1183/4487] (SYSCALL_ERROR_HANDLER): Don't store into global errno if we already store through __errno_location. --- sysdeps/unix/alpha/sysdep.S | 3 --- 1 file changed, 3 deletions(-) diff --git a/sysdeps/unix/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S index d79c48a9bf..53fc454eb6 100644 --- a/sysdeps/unix/alpha/sysdep.S +++ b/sysdeps/unix/alpha/sysdep.S @@ -48,9 +48,6 @@ __syscall_error: .mask 0x4000001, -16 .prologue 1 - /* Store into the "real" variable. */ - stl v0, errno - /* Find our per-thread errno address */ jsr ra, __errno_location From 1c03144cf789d890a516493f2981ab14193ce5eb Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 9 Mar 1998 03:20:41 +0000 Subject: [PATCH 1184/4487] * sysdeps/unix/sysv/linux/m68k/sysdep.h (SYSCALL_ERROR_HANDLER): Readd lost negate. * sysdeps/m68k/sysdep.h: Remove the stabs stuff again. --- sysdeps/m68k/sysdep.h | 21 +-------------------- sysdeps/unix/sysv/linux/m68k/sysdep.h | 1 + 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/sysdeps/m68k/sysdep.h b/sysdeps/m68k/sysdep.h index 5998f4218b..58789f77b5 100644 --- a/sysdeps/m68k/sysdep.h +++ b/sysdeps/m68k/sysdep.h @@ -50,33 +50,14 @@ incomplete stabs information. Fake some entries here which specify the current source file. */ #define ENTRY(name) \ - STABS_CURRENT_FILE1(""); \ - STABS_CURRENT_FILE(name); \ .globl C_SYMBOL_NAME(name); \ ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function); \ .align ALIGNARG(2); \ - STABS_FUN(name); \ C_LABEL(name) \ CALL_MCOUNT #undef END -#define END(name) \ - ASM_SIZE_DIRECTIVE(name); \ - STABS_FUN_END(name) - -/* Remove the following two lines once the gdb bug is fixed. */ -#define STABS_CURRENT_FILE(name) \ - STABS_CURRENT_FILE1 (#name) -#define STABS_CURRENT_FILE1(name) \ - 1: .stabs name,100,0,0,1b -/* Emit stabs definition lines. We use F(0,1) and define t(0,1) as `int', - the same way gcc does it. */ -#define STABS_FUN(name) STABS_FUN1(name, name##:F(0,1)) -#define STABS_FUN1(name, namestr) \ - .stabs "int:t(0,1)=r(0,1);-2147483648;2147483647;",128,0,0,0; \ - .stabs #namestr,36,0,0,name -#define STABS_FUN_END(name) \ - 1: .stabs "",36,0,0,1b-name +#define END(name) ASM_SIZE_DIRECTIVE(name) /* If compiled for profiling, call `_mcount' at the start of each function. */ diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h index 03360b84f9..4d9249d34d 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -61,6 +61,7 @@ #ifdef _LIBC_REENTRANT #define SYSCALL_ERROR_HANDLER \ syscall_error: \ + neg.l %d0; \ move.l %d0, -(%sp); \ jbsr __errno_location@PLTPC; \ move.l (%sp)+, (%a0); \ From b8b84ae26ce60049b742642aa15535f87d5d8ec3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Mar 1998 09:09:46 +0000 Subject: [PATCH 1185/4487] Rename function to __ffs and make ffs a weak alias. --- sysdeps/alpha/ffs.S | 5 +++-- sysdeps/am29k/ffs.c | 3 ++- sysdeps/i960/ffs.c | 3 ++- sysdeps/m68k/ffs.c | 3 ++- sysdeps/m88k/ffs.c | 3 ++- sysdeps/rs6000/ffs.c | 3 ++- sysdeps/vax/ffs.s | 3 ++- 7 files changed, 15 insertions(+), 8 deletions(-) diff --git a/sysdeps/alpha/ffs.S b/sysdeps/alpha/ffs.S index 23dff6e06b..6eb3afdff7 100644 --- a/sysdeps/alpha/ffs.S +++ b/sysdeps/alpha/ffs.S @@ -25,7 +25,7 @@ .set noreorder .set noat -ENTRY(ffs) +ENTRY(__ffs) #ifdef PROF ldgp gp, 0(pv) lda AT, _mcount @@ -69,4 +69,5 @@ ENTRY(ffs) $done: ret - END(ffs) + END(__ffs) +weak_alias (__ffs, ffs) diff --git a/sysdeps/am29k/ffs.c b/sysdeps/am29k/ffs.c index fe656e1697..bccec883df 100644 --- a/sysdeps/am29k/ffs.c +++ b/sysdeps/am29k/ffs.c @@ -26,7 +26,7 @@ #ifdef __GNUC__ int -ffs (x) +__ffs (x) int x; { int cnt; @@ -35,6 +35,7 @@ ffs (x) return 32 - cnt; } +weak_alias (__ffs, ffs) #else #include diff --git a/sysdeps/i960/ffs.c b/sysdeps/i960/ffs.c index 7846c4b1db..dc09ba90e8 100644 --- a/sysdeps/i960/ffs.c +++ b/sysdeps/i960/ffs.c @@ -27,7 +27,7 @@ #if defined (__GNUC__) && defined (__i960__) int -ffs (x) +__ffs (x) int x; { int cnt; @@ -36,6 +36,7 @@ ffs (x) return cnt; } +weak_alias (__ffs, ffs) #else diff --git a/sysdeps/m68k/ffs.c b/sysdeps/m68k/ffs.c index 26044b12ec..d30bd9d6ff 100644 --- a/sysdeps/m68k/ffs.c +++ b/sysdeps/m68k/ffs.c @@ -26,7 +26,7 @@ #if defined (__GNUC__) && defined (__mc68020__) int -ffs (x) +__ffs (x) int x; { int cnt; @@ -35,6 +35,7 @@ ffs (x) return 32 - cnt; } +weak_alias (__ffs, ffs) #else diff --git a/sysdeps/m88k/ffs.c b/sysdeps/m88k/ffs.c index 3658f0882d..7aac897735 100644 --- a/sysdeps/m88k/ffs.c +++ b/sysdeps/m88k/ffs.c @@ -26,7 +26,7 @@ #ifdef __GNUC__ int -ffs (x) +__ffs (x) int x; { int cnt; @@ -37,6 +37,7 @@ ffs (x) asm ("ff1 %0,%1" : "=r" (cnt) : "r" (x & -x)); return cnt + 1; } +weak_alias (__ffs, ffs) #else #include diff --git a/sysdeps/rs6000/ffs.c b/sysdeps/rs6000/ffs.c index f078c91e98..2cf2302605 100644 --- a/sysdeps/rs6000/ffs.c +++ b/sysdeps/rs6000/ffs.c @@ -26,7 +26,7 @@ #ifdef __GNUC__ int -ffs (x) +__ffs (x) int x; { int cnt; @@ -34,6 +34,7 @@ ffs (x) asm ("cntlz %0,%1" : "=r" (cnt) : "r" (x & -x)); return 32 - cnt; } +weak_alias (__ffs, ffs) #else #include diff --git a/sysdeps/vax/ffs.s b/sysdeps/vax/ffs.s index 49faffb060..9f7ebc95fe 100644 --- a/sysdeps/vax/ffs.s +++ b/sysdeps/vax/ffs.s @@ -39,10 +39,11 @@ #include "DEFS.h" -ENTRY(ffs, 0) +ENTRY(__ffs, 0) ffs $0,$32,4(ap),r0 bneq 1f mnegl $1,r0 1: incl r0 ret +weak_alias (__ffs, ffs) From 1ad3a6fb0f35e1e741bc038d5750e1c7d3f67bb2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 10 Mar 1998 22:33:58 +0000 Subject: [PATCH 1186/4487] Adds lots of missing AF_* and PF_* constants. --- sysdeps/unix/sysv/linux/mips/bits/socket.h | 47 +++++++++++++--------- 1 file changed, 29 insertions(+), 18 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h index f56f6269db..8379f88f7b 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/socket.h +++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h @@ -1,5 +1,5 @@ /* System-specific socket constants and types. Linux version. - Copyright (C) 1991, 92, 94, 95, 96, 97 Free Software Foundation, Inc. + Copyright (C) 1991, 92, 94, 95, 96, 97, 98 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 @@ -30,21 +30,27 @@ typedef unsigned int socklen_t; /* Supported address families. */ #define PF_UNSPEC 0 -#define PF_UNIX 1 /* Unix domain sockets */ -#define PF_LOCAL 1 /* POSIX name for AF_UNIX */ -#define PF_FILE PF_LOCAL /* POSIX name for PF_LOCAL. */ -#define PF_INET 2 /* Internet IP Protocol */ -#define PF_AX25 3 /* Amateur Radio AX.25 */ -#define PF_IPX 4 /* Novell IPX */ -#define PF_APPLETALK 5 /* Appletalk DDP */ -#define PF_NETROM 6 /* Amateur Radio NET/ROM */ -#define PF_BRIDGE 7 /* Multiprotocol bridge */ -#define PF_AAL5 8 /* Reserved for Werner's ATM */ -#define PF_X25 9 /* Reserved for X.25 project */ -#define PF_INET6 10 /* IP version 6 */ -#define PF_ROSE 11 /* Amateur Radio X.25 PLP */ -#define PF_DECNET 12 /* Reserved for DECnet project */ -#define PF_NETBEUI 13 /* Reserved for 802.2LLC project*/ +#define PF_LOCAL 1 /* Local to host (pipes and file-domain). */ +#define PF_UNIX PF_LOCAL /* Old BSD name for PF_LOCAL. */ +#define PF_FILE PF_LOCAL /* POSIX name for PF_LOCAL. */ +#define PF_INET 2 /* IP protocol family. */ +#define PF_AX25 3 /* Amateur Radio AX.25. */ +#define PF_IPX 4 /* Novell Internet Protocol. */ +#define PF_APPLETALK 5 /* Don't use this. */ +#define PF_NETROM 6 /* Amateur radio NetROM. */ +#define PF_BRIDGE 7 /* Multiprotocol bridge. */ +#define PF_AAL5 8 /* Reserved for Werner's ATM. */ +#define PF_X25 9 /* Reserved for X.25 project. */ +#define PF_INET6 10 /* IP version 6. */ +#define PF_ROSE 11 /* Amateur Radio X.25 PLP */ +#define PF_DECnet 12 /* Reserved for DECnet project */ +#define PF_NETBEUI 13 /* Reserved for 802.2LLC project*/ +#define PF_SECURITY 14 /* Security callback pseudo AF */ +#define PF_KEY 15 /* PF_KEY key management API */ +#define PF_NETLINK 16 +#define PF_ROUTE PF_NETLINK /* Alias to emulate 4.4BSD */ +#define PF_PACKET 17 /* Packet family */ +#define PF_ASH 18 /* Ash */ #define PF_MAX 32 /* For now.. */ /* Protocol families, same as address families. */ @@ -52,7 +58,7 @@ typedef unsigned int socklen_t; #define AF_UNIX PF_UNIX #define AF_LOCAL PF_LOCAL #define AF_FILE PF_FILE -#define AF_INET PF_INET + #define AF_AX25 PF_AX25 #define AF_IPX PF_IPX #define AF_APPLETALK PF_APPLETALK @@ -64,7 +70,12 @@ typedef unsigned int socklen_t; #define AF_ROSE PF_ROSE #define AF_DECNET PF_DECNET #define AF_NETBEUI PF_NETBEUI - +#define AF_SECURITY PF_SECURITY +#define pseudo_AF_KEY PF_KEY +#define AF_NETLINK PF_NETLINK +#define AF_ROUTE PF_ROUTE +#define AF_PACKET PF_PACKET +#define AF_ASH PF_ASH #define AF_MAX PF_MAX /* Raw IP packet level. */ From 2d4c61a66746f6f697baa8b6b92280301e502266 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 10 Mar 1998 22:42:23 +0000 Subject: [PATCH 1187/4487] Add various SOL_* constants. --- sysdeps/unix/sysv/linux/mips/bits/socket.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h index 8379f88f7b..f481a478b2 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/socket.h +++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h @@ -78,8 +78,15 @@ typedef unsigned int socklen_t; #define AF_ASH PF_ASH #define AF_MAX PF_MAX -/* Raw IP packet level. */ +/* Socket level values. Others are defined in the appropriate headers. + + XXX These definitions also should go into the appropriate headers as + far as they are available. */ +#define SOL_IPV6 41 +#define SOL_ICMPV6 58 #define SOL_RAW 255 +#define SOL_DECNET 261 +#define SOL_X25 262 /* Maximum queue length specifiable by listen. */ #define SOMAXCONN 128 From 69235f764bfa662a35640fcd7e0bcc307d58214d Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 11 Mar 1998 01:32:12 +0000 Subject: [PATCH 1188/4487] * sysdeps/m68k/elf/start.S: Let __libc_start_main do most of the init stuff. --- sysdeps/m68k/elf/start.S | 54 ++++++++++++++++------------------------ 1 file changed, 21 insertions(+), 33 deletions(-) diff --git a/sysdeps/m68k/elf/start.S b/sysdeps/m68k/elf/start.S index 6c7cd4b99d..c1a5c2e48f 100644 --- a/sysdeps/m68k/elf/start.S +++ b/sysdeps/m68k/elf/start.S @@ -1,5 +1,5 @@ /* Startup code compliant to the ELF m68k ABI. - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998 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 @@ -43,43 +43,31 @@ _start: the outermost frame obviously. */ sub.l %fp, %fp - /* %a1 contains the address of the shared library termination - function, which we will register with `atexit' to be called by - `exit'. */ - tstl %a1 - jbeq 1f - move.l %a1, -(%sp) - jbsr atexit - addql #4, %sp -1: + /* Extract the arguments as encoded on the stack and set up the + arguments for `main': argc, argv. envp will be determined + later in __libc_start_main. */ + move.l (%sp)+, %d0 /* Pop the argument count. */ + move.l %sp, %a0 /* The argument vector starts just at the + current stack top. */ - /* Do essential libc initialization. In statically linked - programs under the GNU Hurd, this is what sets up the - arguments on the stack for the code below. */ - jbsr __libc_init_first + pea (%a1) /* Push address of the shared library + termination function. */ - /* Extract the arguments and environment as encoded on the stack - and set up the arguments for `main': argc, argv, envp. */ - move.l (%sp)+, %d0 /* Pop the argument count. */ - lea (4,%sp,%d0*4), %a0 /* envp = &argv[argc + 1] */ - move.l %a0, _environ /* Store it in the global variable. */ - pea (%a0) /* Push third argument: envp. */ - pea 4(%sp) /* Push second argument: argv. */ + /* Push the address of our own entry points to `.fini' and + `.init'. */ + pea _fini + pea _init + + pea (%a0) /* Push second argument: argv. */ move.l %d0, -(%sp) /* Push first argument: argc. */ - /* Call `_init', which is the entry point to our own `.init' - section; and register with `atexit' to have `exit' call - `_fini', which is the entry point to our own `.fini' section. */ - jbsr _init - move.l #_fini, -(%sp) - jbsr atexit - addq.l #4, %sp + pea main + + /* Call the user's main function, and exit with its value. But + let the libc call main. */ + jbsr __libc_start_main - /* Call the user's main function, and exit with its value. */ - jbsr main - move.l %d0, (%sp) -1: jbsr exit /* This should never return. */ - jbra 1b /* Try again if somehow it does return. */ + illegal /* Crash if somehow `exit' does return. */ /* Define a symbol for the first piece of initialized data. */ .data From caa27d8e149e40b6bbbe59b76e1aca54ecf2c358 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 11 Mar 1998 12:42:24 +0000 Subject: [PATCH 1189/4487] LinuxThreads library. --- sysdeps/arm/linuxthreads/Implies | 1 + sysdeps/arm/linuxthreads/pt-machine.h | 44 +++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 sysdeps/arm/linuxthreads/Implies create mode 100644 sysdeps/arm/linuxthreads/pt-machine.h diff --git a/sysdeps/arm/linuxthreads/Implies b/sysdeps/arm/linuxthreads/Implies new file mode 100644 index 0000000000..7edcd7e757 --- /dev/null +++ b/sysdeps/arm/linuxthreads/Implies @@ -0,0 +1 @@ +pthread/no-cmpxchg diff --git a/sysdeps/arm/linuxthreads/pt-machine.h b/sysdeps/arm/linuxthreads/pt-machine.h new file mode 100644 index 0000000000..0b9bc01fc1 --- /dev/null +++ b/sysdeps/arm/linuxthreads/pt-machine.h @@ -0,0 +1,44 @@ +/* Machine-dependent pthreads configuration and inline functions. + ARM version. + Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Philip Blundell . + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + +/* This will not work on ARM1 or ARM2 because SWP is lacking on those + machines. Unfortunately we have no way to detect this at compile + time; let's hope nobody tries to use one. */ + +/* Spinlock implementation; required. */ +extern inline int +testandset (int *spinlock) +{ + register unsigned int ret; + + __asm__ __volatile__("swp %0, %1, [%2]" + : "=r"(ret) + : "0"(1), "r"(spinlock)); + + return ret; +} + + +/* Get some notion of the current stack. Need not be exactly the top + of the stack, just something somewhere in the current frame. */ +#define CURRENT_STACK_FRAME stack_pointer +register char * stack_pointer __asm__ ("sp"); From be07ac90bc338bf6b4fe10e8efd7f6833b0d9abf Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 12 Mar 1998 09:18:49 +0000 Subject: [PATCH 1190/4487] Correct typo. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 2 +- sysdeps/unix/sysv/linux/mips/syscalls.list | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index fb15ea9bae..8b593a0162 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -55,7 +55,7 @@ socketpair - socketpair 4 __socketpair socketpair sysctl - _sysctl 6 sysctl getresuid - getresuid 3 getresuid -getresgid - getresgid 3 getresuid +getresgid - getresgid 3 getresgid # access pci space protected from machine checks: pciconfig_read EXTRA pciconfig_read 5 pciconfig_read diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index c00ee6bed4..b9392001e4 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -35,7 +35,7 @@ socket - socket 3 __socket socket socketpair - socketpair 4 __socketpair socketpair getresuid - getresuid 3 getresuid -getresgid - getresgid 3 getresuid +getresgid - getresgid 3 getresgid # # There are defined locally because the caller is also defined in this dir. From 4f558ff150edf587ca8bc7a511a3c77c6db55a95 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 13 Mar 1998 01:27:51 +0000 Subject: [PATCH 1191/4487] * sysdeps/m68k/fpu/bits/mathinline.h (isgreater, isgreaterequal, isless, islessequal, islessgreater, isunordered): Return zero or one. --- sysdeps/m68k/fpu/bits/mathinline.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/fpu/bits/mathinline.h index 569e5a06c4..7ddf6aec2a 100644 --- a/sysdeps/m68k/fpu/bits/mathinline.h +++ b/sysdeps/m68k/fpu/bits/mathinline.h @@ -1,5 +1,5 @@ /* Definitions of inline math functions implemented by the m68881/2. - Copyright (C) 1991, 92, 93, 94, 96, 97 Free Software Foundation, Inc. + Copyright (C) 1991, 92, 93, 94, 96, 97, 98 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 @@ -30,42 +30,42 @@ ({ char __result; \ __asm__ ("fcmp%.x %2,%1; fsogt %0" \ : "=dm" (__result) : "f" (x), "f" (y)); \ - (int) __result; }) + __result != 0; }) # define isgreaterequal(x, y) \ __extension__ \ ({ char __result; \ __asm__ ("fcmp%.x %2,%1; fsoge %0" \ : "=dm" (__result) : "f" (x), "f" (y)); \ - (int) __result; }) + __result != 0; }) # define isless(x, y) \ __extension__ \ ({ char __result; \ __asm__ ("fcmp%.x %2,%1; fsolt %0" \ : "=dm" (__result) : "f" (x), "f" (y)); \ - (int) __result; }) + __result != 0; }) # define islessequal(x, y) \ __extension__ \ ({ char __result; \ __asm__ ("fcmp%.x %2,%1; fsole %0" \ : "=dm" (__result) : "f" (x), "f" (y)); \ - (int) __result; }) + __result != 0; }) # define islessgreater(x, y) \ __extension__ \ ({ char __result; \ __asm__ ("fcmp%.x %2,%1; fsogl %0" \ : "=dm" (__result) : "f" (x), "f" (y)); \ - (int) __result; }) + __result != 0; }) # define isunordered(x, y) \ __extension__ \ ({ char __result; \ __asm__ ("fcmp%.x %2,%1; fsun %0" \ : "=dm" (__result) : "f" (x), "f" (y)); \ - (int) __result; }) + __result != 0; }) #endif From 120b2b39d6bd4393a225fb7d040395600d83832d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 18 Mar 1998 14:27:40 +0000 Subject: [PATCH 1192/4487] Remove floating point code. --- sysdeps/arm/__longjmp.S | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sysdeps/arm/__longjmp.S b/sysdeps/arm/__longjmp.S index a2042f5543..239b0cfc85 100644 --- a/sysdeps/arm/__longjmp.S +++ b/sysdeps/arm/__longjmp.S @@ -1,5 +1,5 @@ /* longjmp for ARM. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 1998 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 @@ -29,10 +29,5 @@ ENTRY (__longjmp) movs r0, r1 /* get the return value in place */ moveq r1, #1 /* can't let setjmp() return zero! */ -#if __ARM_USES_FP - add r2, r2, #48 - lfmfd f4, 4, [r2] -#endif - LOADREGS(ia, r2, {v1-v6, sl, fp, sp, pc}) END (__longjmp) From 0bee7da30dcbb23b2fa3b2bfec4a199a38dc7dc9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 18 Mar 1998 14:27:59 +0000 Subject: [PATCH 1193/4487] Call __sigsetjmp by correct name. --- sysdeps/arm/bsd-_setjmp.S | 4 ++-- sysdeps/arm/bsd-setjmp.S | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/arm/bsd-_setjmp.S b/sysdeps/arm/bsd-_setjmp.S index 5643c50918..6ae6da6457 100644 --- a/sysdeps/arm/bsd-_setjmp.S +++ b/sysdeps/arm/bsd-_setjmp.S @@ -1,5 +1,5 @@ /* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. ARM version. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 1998 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,5 +25,5 @@ ENTRY (_setjmp) mov r1, #0 - b __sigsetjmp + b C_SYMBOL_NAME(__sigsetjmp) END (_setjmp) diff --git a/sysdeps/arm/bsd-setjmp.S b/sysdeps/arm/bsd-setjmp.S index ac7dd96821..52622e2155 100644 --- a/sysdeps/arm/bsd-setjmp.S +++ b/sysdeps/arm/bsd-setjmp.S @@ -1,5 +1,5 @@ /* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. ARM version. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 1998 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,5 +25,5 @@ ENTRY (setjmp) mov r1, #1 - b __sigsetjmp + b C_SYMBOL_NAME(__sigsetjmp) END (setjmp) From 046378657ff4f76837c6bb9bd4fbbfc848f7bdbe Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 18 Mar 1998 14:28:36 +0000 Subject: [PATCH 1194/4487] Arm/ELF definitions. --- sysdeps/arm/dl-machine.h | 478 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 478 insertions(+) create mode 100644 sysdeps/arm/dl-machine.h diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h new file mode 100644 index 0000000000..66b69d02db --- /dev/null +++ b/sysdeps/arm/dl-machine.h @@ -0,0 +1,478 @@ +/* Machine-dependent ELF dynamic relocation inline functions. ARM version. + Copyright (C) 1995, 1996, 1997, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef dl_machine_h +#define dl_machine_h + +#define ELF_MACHINE_NAME "ARM" + +#include + +#include + +/* Return nonzero iff E_MACHINE is compatible with the running host. */ +static inline int __attribute__ ((unused)) +elf_machine_matches_host (Elf32_Half e_machine) +{ + switch (e_machine) + { + case EM_ARM: + return 1; + default: + return 0; + } +} + + +/* Return the link-time address of _DYNAMIC. Conveniently, this is the + first element of the GOT. This must be inlined in a function which + uses global data. */ +static inline Elf32_Addr __attribute__ ((unused)) +elf_machine_dynamic (void) +{ + register Elf32_Addr *got asm ("r10"); + return *got; +} + + +/* Return the run-time load address of the shared object. */ +// patb +static inline Elf32_Addr __attribute__ ((unused)) +elf_machine_load_address (void) +{ + Elf32_Addr addr; + asm (" ldr ip,.L1 + ldr r3,.L3 + add r3, r3, sl + ldr ip,[sl, ip] + sub ip, r3, ip + b .L2 + .L1: .word _dl_start(GOT) + .L3: .word _dl_start(GOTOFF) + .L2: mov %0, ip" + : "=r" (addr) : : "ip", "r3"); + return addr; +} + + +/* Set up the loaded object described by L so its unrelocated PLT + entries will jump to the on-demand fixup code in dl-runtime.c. */ + +static inline int __attribute__ ((unused)) +elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) +{ + Elf32_Addr *got; + extern void _dl_runtime_resolve (Elf32_Word); + extern void _dl_runtime_profile (Elf32_Word); + + if (l->l_info[DT_JMPREL] && lazy) + { + /* patb: this is different than i386 */ + /* The GOT entries for functions in the PLT have not yet been filled + in. Their initial contents will arrange when called to push an + index into the .got section, load ip with &_GLOBAL_OFFSET_TABLE_[3], + and then jump to _GLOBAL_OFFSET_TABLE[2]. */ + got = (Elf32_Addr *) (l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr); + got[1] = (Elf32_Addr) l; /* Identify this shared object. */ + + /* The got[2] entry contains the address of a function which gets + called to get the address of a so far unresolved function and + jump to it. The profiling extension of the dynamic linker allows + to intercept the calls to collect information. In this case we + don't store the address in the GOT so that all future calls also + end in this function. */ + if (profile) + { + got[2] = (Elf32_Addr) &_dl_runtime_profile; + /* Say that we really want profiling and the timers are started. */ + _dl_profile_map = l; + } + else + /* This function will get called to fix up the GOT entry indicated by + the offset on the stack, and then jump to the resolved address. */ + got[2] = (Elf32_Addr) &_dl_runtime_resolve; + } + return lazy; +} + +/* This code is used in dl-runtime.c to call the `fixup' function + and then redirect to the address it returns. */ + // macro for handling PIC situation.... +#ifdef PIC +#define CALL_ROUTINE(x) " ldr sl,0f + add sl, pc, sl +1: ldr r2, 2f + mov lr, pc + add pc, sl, r2 + b 3f +0: .word _GLOBAL_OFFSET_TABLE_ - 1b - 4 +2: .word " #x "(GOTOFF) +3: " +#else +#define CALL_ROUTINE(x) " bl " #x +#endif + +#ifndef PROF +# define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\ + .text + .globl _dl_runtime_resolve + .type _dl_runtime_resolve, #function + .align 2 +_dl_runtime_resolve: + @ we get called with + @ stack[0] contains the return address from this call + @ ip contains &GOT[n+3] (pointer to function) + @ lr points to &GOT[2] + + @ save almost everything; lr is already on the stack + stmdb sp!,{r0-r3,sl,fp} + + @ prepare to call fixup() + + @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each + sub r1, ip, lr + sub r1, r1, #4 + add r1, r1, r1 + + @ get pointer to linker struct + ldr r0, [lr, #-4] + + " CALL_ROUTINE(fixup) " + + @ save the return + mov ip, r0 + + @ restore the stack + ldmia sp!,{r0-r3,sl,fp,lr} + + @ jump to the newly found address + mov pc, ip + + .size _dl_runtime_resolve, .-_dl_runtime_resolve + + .globl _dl_runtime_profile + .type _dl_runtime_profile, #function + .align 2 +_dl_runtime_profile: + @ we get caled with + @ stack[0] contains the return address from this call + @ ip contains &GOT[n+3] (pointer to function) + @ lr points to &GOT[2] + + @ save almost everything; return add is already on the stack + stmdb sp!,{r0-r3,fp} + + @ prepare to call fixup() + + @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each + sub r1, ip, lr + sub r1, r1, #4 + add r1, r1, r1 + + @ get pointer to linker struct + ldr r0, [lr, #-4] + + " CALL_ROUTINE(profile_fixup) " + + @ save the return + mov ip, r0 + + @ restore the stack + ldmia sp!,{r0-r3,fp,lr} + + @ jump to the newly found address + mov pc, ip + + .size _dl_runtime_profile, .-_dl_runtime_profile + .previous +"); +#else // PROF +# define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\ + .text + .globl _dl_runtime_resolve + .globl _dl_runtime_profile + .type _dl_runtime_resolve, #function + .type _dl_runtime_profile, #function + .align 2 +_dl_runtime_resolve: +_dl_runtime_profile: + stmdb sp!,{r0-r3,fp} + ldr r1,[sp,#0x34] + sub r1, ip, lr + sub r1, r1, #4 + add r1, r1, r1 + ldr r0, [lr, #-4] + " CALL_ROUTINE(fixup) " + mov ip, r0 + ldmia sp!,{r0-r3,fp,lr} + mov pc, ip + + .size _dl_runtime_profile, .-_dl_runtime_profile + .previous +"); +#endif //PROF + +/* Mask identifying addresses reserved for the user program, + where the dynamic linker should not map anything. */ +#define ELF_MACHINE_USER_ADDRESS_MASK 0xf8000000UL + +/* Initial entry point code for the dynamic linker. + The C function `_dl_start' is the real entry point; + its return value is the user program's entry point. */ + +#define RTLD_START asm ("\ +.text +.globl _start +.globl _dl_start_user +_start: + @ at start time, all the args are on the stack + mov r0, sp + bl _dl_start + @ returns user entry point in r0 +_dl_start_user: + mov r6, r0 + @ we are PIC code, so get global offset table + ldr sl, .L_GET_GOT + add sl, pc, sl +.L_GOT_GOT: + @ See if we were run as a command with the executable file + @ name as an extra leading argument. + ldr r1, .L_SKIP_ARGS + ldr r1, [sl, r1] + @ get the original arg count + ldr r0, [sp] + @ subtract _dl_skip_args from it + sub r0, r0, r1 + @ adjust the stack pointer to skip them + add sp, sp, r1, lsl #2 + @ store the new argc in the new stack location + str r0, [sp] + + @ now we enter a _dl_init_next loop + ldr r2, .L_DEF_SCOPE + ldr r2, [sl, r2] + ldr r4, [r2, #8] + @ call _dl_init_next to get the address of an initalizer +0: mov r0, r4 + bl _dl_init_next(PLT) + cmp r0, #0 + beq 1f + @ call the shared-object initializer + @ during this call, the stack may get moved around + mov lr, pc + mov pc, r0 + @ go back and look for another initializer + b 0b +1: @ clear the startup flag + ldr r2, .L_STARTUP_FLAG + ldr r1, [sl, r2] + @ we know r0==0 at this point + str r0, [r1] + @ load the finalizer function + ldr r0, .L_FINI_PROC + ldr r0, [sl, r0] + @ jump to the user_s entry point + mov pc, r6 +.L_GET_GOT: + .word _GLOBAL_OFFSET_TABLE_ - .L_GOT_GOT - 4 \n\ +.L_SKIP_ARGS: \n\ + .word _dl_skip_args(GOTOFF) \n\ +.L_DEF_SCOPE: \n\ + .word _dl_default_scope(GOT) \n\ +.L_STARTUP_FLAG: + .word _dl_starting_up(GOT) +.L_FINI_PROC: + .word _dl_fini(GOT) +.previous\n\ +"); + +/* Nonzero iff TYPE should not be allowed to resolve to one of + the main executable's symbols, as for a COPY reloc. */ +#define elf_machine_lookup_noexec_p(type) ((type) == R_ARM_COPY) + +/* Nonzero iff TYPE describes relocation of a PLT entry, so + PLT entries should not be allowed to define the value. */ +#define elf_machine_lookup_noplt_p(type) ((type) == R_ARM_JMP_SLOT) + +/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */ +#define ELF_MACHINE_JMP_SLOT R_ARM_JMP_SLOT + +/* The i386 never uses Elf32_Rela relocations. */ +#define ELF_MACHINE_NO_RELA 1 + +/* We define an initialization functions. This is called very early in + _dl_sysdep_start. */ +#define DL_PLATFORM_INIT dl_platform_init () + +extern const char *_dl_platform; + +static inline void __attribute__ ((unused)) +dl_platform_init (void) +{ + if (_dl_platform == NULL) + /* We default to ARM + This is where processors could be distinguished arm2, arm6, sa110, etc */ + _dl_platform = "ARM"; +} + +static inline void +elf_machine_fixup_plt (struct link_map *map, const Elf32_Rel *reloc, + Elf32_Addr *reloc_addr, Elf32_Addr value) +{ + *reloc_addr = value; +} + +/* Return the final value of a plt relocation. */ +static inline Elf32_Addr +elf_machine_plt_value (struct link_map *map, const Elf32_Rel *reloc, + Elf32_Addr value) +{ + return value; +} + +#endif /* !dl_machine_h */ + +#ifdef RESOLVE + +extern char **_dl_argv; + +/* Perform the relocation specified by RELOC and SYM (which is fully resolved). + MAP is the object containing the reloc. */ + +static inline void +elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, + const Elf32_Sym *sym, const struct r_found_version *version, + Elf32_Addr *const reloc_addr) +{ + if (ELF32_R_TYPE (reloc->r_info) == R_ARM_RELATIVE) + { +#ifndef RTLD_BOOTSTRAP + if (map != &_dl_rtld_map) /* Already done in rtld itself. */ +#endif + *reloc_addr += map->l_addr; + } + else if (ELF32_R_TYPE (reloc->r_info) != R_ARM_NONE) + { + const Elf32_Sym *const refsym = sym; + Elf32_Addr value = RESOLVE (&sym, version, ELF32_R_TYPE (reloc->r_info)); + if (sym) + value += sym->st_value; + + switch (ELF32_R_TYPE (reloc->r_info)) + { + case R_ARM_COPY: + if (sym == NULL) + /* This can happen in trace mode if an object could not be + found. */ + break; + if (sym->st_size > refsym->st_size + || (_dl_verbose && sym->st_size < refsym->st_size)) + { + const char *strtab; + + strtab = ((const char *) map->l_addr + + map->l_info[DT_STRTAB]->d_un.d_ptr); + _dl_sysdep_error (_dl_argv[0] ?: "", + ": Symbol `", strtab + refsym->st_name, + "' has different size in shared object, " + "consider re-linking\n", NULL); + } + memcpy (reloc_addr, (void *) value, MIN (sym->st_size, + refsym->st_size)); + break; + case R_ARM_GLOB_DAT: + case R_ARM_JMP_SLOT: + +#if 0 +#define _HEX(i) for (j=28; j>=0; j-=4) b[7-j/4]="0123456789abcdef"[((int)i>>j)&15]; +{ +char b[10]; +int j; +_HEX(map->l_addr); +__asm__ (" mov r0, #2; mov r1, %0; mov r2, #9; swi 0x00900004; " + : : "r"(b) : "r0", "r1", "r2" ); +_HEX(sym->st_size); +__asm__ (" mov r0, #2; mov r1, %0; mov r2, #9; swi 0x00900004; " + : : "r"(b) : "r0", "r1", "r2" ); +_HEX(&sym->st_value); +__asm__ (" mov r0, #2; mov r1, %0; mov r2, #9; swi 0x00900004; " + : : "r"(b) : "r0", "r1", "r2" ); +_HEX(sym->st_value); +__asm__ (" mov r0, #2; mov r1, %0; mov r2, #9; swi 0x00900004; " + : : "r"(b) : "r0", "r1", "r2" ); +_HEX(sym); +__asm__ (" mov r0, #2; mov r1, %0; mov r2, #9; swi 0x00900004; " + : : "r"(b) : "r0", "r1", "r2" ); +_HEX(reloc_addr); +__asm__ (" mov r0, #2; mov r1, %0; mov r2, #9; swi 0x00900004; " + : : "r"(b) : "r0", "r1", "r2" ); +b[0]=' '; b[1]='\n'; +__asm__ (" mov r0, #2; mov r1, %0; mov r2, #2; swi 0x00900004; " + : : "r"(b) : "r0", "r1", "r2" ); +} +#endif + *reloc_addr = value; + break; + case R_ARM_32: + { +#ifndef RTLD_BOOTSTRAP + /* This is defined in rtld.c, but nowhere in the static + libc.a; make the reference weak so static programs can + still link. This declaration cannot be done when + compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP) because + rtld.c contains the common defn for _dl_rtld_map, which + is incompatible with a weak decl in the same file. */ + weak_extern (_dl_rtld_map); + if (map == &_dl_rtld_map) + /* Undo the relocation done here during bootstrapping. + Now we will relocate it anew, possibly using a + binding found in the user program or a loaded library + rather than the dynamic linker's built-in definitions + used while loading those libraries. */ + value -= map->l_addr + refsym->st_value; +#endif + *reloc_addr += value; + break; + } + case R_ARM_PC26: + *reloc_addr += (value - (Elf32_Addr) reloc_addr); + break; + default: + assert (! "unexpected dynamic reloc type"); + break; + } + } +} + +static inline void +elf_machine_lazy_rel (struct link_map *map, const Elf32_Rel *reloc) +{ + Elf32_Addr *const reloc_addr = (void *) (map->l_addr + reloc->r_offset); + switch (ELF32_R_TYPE (reloc->r_info)) + { + case R_ARM_JMP_SLOT: + *reloc_addr += map->l_addr; + break; + default: + assert (! "unexpected PLT reloc type"); + break; + } +} + +#endif /* RESOLVE */ From 2c2c129dd4a7e3892ddb3742bc87581db50f22a1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 18 Mar 1998 14:29:01 +0000 Subject: [PATCH 1195/4487] Startup code for Arm. --- sysdeps/arm/init-first.c | 71 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 sysdeps/arm/init-first.c diff --git a/sysdeps/arm/init-first.c b/sysdeps/arm/init-first.c new file mode 100644 index 0000000000..7e6bcf79ff --- /dev/null +++ b/sysdeps/arm/init-first.c @@ -0,0 +1,71 @@ +/* Initialization code run first thing by the ELF startup code. For ARM. + Copyright (C) 1995, 1996, 1997, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +extern void __libc_init (int, char **, char **); +extern void __getopt_clean_environment (char **); +extern void __libc_global_ctors (void); + +int __libc_multiple_libcs = 1; + +pid_t __libc_pid; + +static void +init (int *data) +{ + int argc = *data; + char **argv = (void *) (data + 1); + char **envp = &argv[argc + 1]; + + __environ = envp; + __libc_init (argc, argv, envp); + + /* This is a hack to make the special getopt in GNU libc working. */ + __getopt_clean_environment (envp); +} + +#ifdef PIC +/* This function is called to initialize the shared C library. + It is called just before the user _start code from i386/elf/start.S, + with the stack set up as that code gets it. */ + +/* NOTE! The linker notices the magical name `_init' and sets the DT_INIT + pointer in the dynamic section based solely on that. It is convention + for this function to be in the `.init' section, but the symbol name is + the only thing that really matters!! */ +/*void _init (int argc, ...) __attribute__ ((unused, section (".init")));*/ + +void +_init (int argc, ...) +{ + init (&argc); + + __libc_global_ctors (); +} +#endif + + +void +__libc_init_first (int argc __attribute__ ((unused)), ...) +{ +#ifndef PIC + init (&argc); +#endif +} From d024bf59e6521498207b8afa2d78bb0a937840bb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 18 Mar 1998 14:29:09 +0000 Subject: [PATCH 1196/4487] Optimized memset version. --- sysdeps/arm/memset.S | 68 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 sysdeps/arm/memset.S diff --git a/sysdeps/arm/memset.S b/sysdeps/arm/memset.S new file mode 100644 index 0000000000..a986d687da --- /dev/null +++ b/sysdeps/arm/memset.S @@ -0,0 +1,68 @@ +/* Copyright (C) 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Philip Blundell + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +/* void *memset (dstpp, c, len) */ + +ENTRY(memset) + mov a4, a1 + cmp a3, $8 @ at least 8 bytes to do? + blt 2f + orr a2, a2, a2, lsl $8 + orr a2, a2, a2, lsl $16 +1: + tst a4, $3 @ aligned yet? + strneb a2, [a4], $1 + subne a3, a3, $1 + bne 1b + mov ip, a2 +1: + cmp a3, $8 @ 8 bytes still to do? + blt 2f + stmia a4!, {a2, ip} + sub a3, a3, $8 + cmp a3, $8 @ 8 bytes still to do? + blt 2f + stmia a4!, {a2, ip} + sub a3, a3, $8 + cmp a3, $8 @ 8 bytes still to do? + blt 2f + stmia a4!, {a2, ip} + sub a3, a3, $8 + cmp a3, $8 @ 8 bytes still to do? + stmgeia a4!, {a2, ip} + subge a3, a3, $8 + bge 1b +2: + movs a3, a3 @ anything left? + RETINSTR(moveq,pc,lr) @ nope + rsb a3, a3, $7 + add pc, pc, a3, lsl $2 + mov r0, r0 + strb a2, [a4], $1 + strb a2, [a4], $1 + strb a2, [a4], $1 + strb a2, [a4], $1 + strb a2, [a4], $1 + strb a2, [a4], $1 + strb a2, [a4], $1 + strb a2, [a4], $1 + RETINSTR(mov,pc,lr) +END(memset) From 2e4ed6f1f873607aa1ccfed22f82465db9226747 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 18 Mar 1998 14:29:20 +0000 Subject: [PATCH 1197/4487] Call __sigjmp_save through PLT --- sysdeps/arm/setjmp.S | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/sysdeps/arm/setjmp.S b/sysdeps/arm/setjmp.S index 08cd0d254e..237cc0addd 100644 --- a/sysdeps/arm/setjmp.S +++ b/sysdeps/arm/setjmp.S @@ -1,5 +1,5 @@ /* setjmp for ARM. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 1998 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 @@ -27,11 +27,8 @@ ENTRY (__setjmp) mov r1, #0 ENTRY (__sigsetjmp) /* Save registers */ -#if __ARM_USES_FP - sfmea f4, 4, [r0]! -#endif stmia r0, {v1-v6, sl, fp, sp, lr} /* Make a tail call to __sigjmp_save; it takes the same args. */ - B __sigjmp_save -END (__sigsetjmp) + B PLTJMP(C_SYMBOL_NAME(__sigjmp_save)) +END (__setjmp) From fe0955cdc4dbc6ff51876fb9dc438c5a79d62c42 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 18 Mar 1998 14:29:30 +0000 Subject: [PATCH 1198/4487] Change format of .type directive. Correct comment about floating point to reflect current reality. --- sysdeps/arm/sysdep.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/sysdeps/arm/sysdep.h b/sysdeps/arm/sysdep.h index 8d1e2972df..28dd402ced 100644 --- a/sysdeps/arm/sysdep.h +++ b/sysdeps/arm/sysdep.h @@ -1,5 +1,5 @@ /* Assembler macros for ARM. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 1998 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,19 +28,23 @@ /* ELF uses byte-counts for .align, most others use log2 of count of bytes. */ #define ALIGNARG(log2) 1< Date: Wed, 18 Mar 1998 14:29:48 +0000 Subject: [PATCH 1199/4487] Floating point exception definitions. --- sysdeps/arm/bits/fenv.h | 90 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 sysdeps/arm/bits/fenv.h diff --git a/sysdeps/arm/bits/fenv.h b/sysdeps/arm/bits/fenv.h new file mode 100644 index 0000000000..3e4cdd3f3b --- /dev/null +++ b/sysdeps/arm/bits/fenv.h @@ -0,0 +1,90 @@ +/* Copyright (C) 1997, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _FENV_H +# error "Never use directly; include instead." +#endif + + +/* Define bits representing the exception. We use the bit positions + of the appropriate bits in the FPU control word. */ +enum + { + FE_INVALID = 0x01, +#define FE_INVALID FE_INVALID + __FE_DENORM = 0x02, + FE_DIVBYZERO = 0x04, +#define FE_DIVBYZERO FE_DIVBYZERO + FE_OVERFLOW = 0x08, +#define FE_OVERFLOW FE_OVERFLOW + FE_UNDERFLOW = 0x10, +#define FE_UNDERFLOW FE_UNDERFLOW + FE_INEXACT = 0x20 +#define FE_INEXACT FE_INEXACT + }; + +#define FE_ALL_EXCEPT \ + (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID) + +/* The ARM FPU supports all of the four defined rounding modes. We + use again the bit positions in the FPU control word as the values + for the appropriate macros. */ +enum + { + FE_TONEAREST = 0, +#define FE_TONEAREST FE_TONEAREST + FE_DOWNWARD = 0x400, +#define FE_DOWNWARD FE_DOWNWARD + FE_UPWARD = 0x800, +#define FE_UPWARD FE_UPWARD + FE_TOWARDSZERO = 0xc00 +#define FE_TOWARDSZERO FE_TOWARDSZERO + }; + + +/* Type representing exception flags. */ +typedef unsigned short int fexcept_t; + + +/* Type representing floating-point environment. This function corresponds + to the layout of the block written by the `fstenv'. */ +typedef struct + { + unsigned short int control_word; + unsigned short int __unused1; + unsigned short int status_word; + unsigned short int __unused2; + unsigned short int tags; + unsigned short int __unused3; + unsigned int eip; + unsigned short int cs_selector; + unsigned int opcode:11; + unsigned int __unused4:5; + unsigned int data_offset; + unsigned short int data_selector; + unsigned short int __unused5; + } +fenv_t; + +/* If the default argument is used we use this value. */ +#define FE_DFL_ENV ((fenv_t *) -1) + +#ifdef __USE_GNU +/* Floating-point environment where none of the exception is masked. */ +# define FE_NOMASK_ENV ((fenv_t *) -2) +#endif From 7733906da7af00a9b55639c8781e6f7a0e89f059 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 18 Mar 1998 14:31:22 +0000 Subject: [PATCH 1200/4487] Support PIC. --- sysdeps/unix/arm/brk.S | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/arm/brk.S b/sysdeps/unix/arm/brk.S index 0150bcde80..b3924a3d6d 100644 --- a/sysdeps/unix/arm/brk.S +++ b/sysdeps/unix/arm/brk.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1993, 1995, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991, 92, 93, 95, 97, 98 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 @@ -33,11 +33,24 @@ C_LABEL(__curbrk) .text SYSCALL__ (brk, 1) +#ifdef PIC + ldr r1, 1f + add r1, r1, pc +2: ldr r2, _cb_addr + add r1, r1, r2 +#else ldr r1, _cb_addr +#endif str r0, [r1] mov r0, $0 RETINSTR(mov, pc, r14) -_cb_addr: .long C_SYMBOL_NAME(__curbrk) - +#ifdef PIC +1: .long _GLOBAL_OFFSET_TABLE_ - 2b - 4 +_cb_addr: + .long C_SYMBOL_NAME(__curbrk)(GOTOFF) +#else +_cb_addr: + .long C_SYMBOL_NAME(__curbrk) +#endif weak_alias (__brk, brk) From 3500923da8d9612478c11a648cb3852ddfdb9e45 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 18 Mar 1998 14:31:30 +0000 Subject: [PATCH 1201/4487] (syscall_error): Support PIC and re-entrant code. --- sysdeps/unix/arm/sysdep.S | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/arm/sysdep.S b/sysdeps/unix/arm/sysdep.S index d59500e47a..c1da5255b0 100644 --- a/sysdeps/unix/arm/sysdep.S +++ b/sysdeps/unix/arm/sysdep.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,93,94,95,96,97,98 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,8 +23,6 @@ .globl C_SYMBOL_NAME(errno) .globl syscall_error -_errno_loc: .long C_SYMBOL_NAME(errno) - #undef syscall_error #ifdef NO_UNDERSCORES __syscall_error: @@ -38,12 +36,44 @@ syscall_error: cmp r0, $EWOULDBLOCK_sys /* Is it the old EWOULDBLOCK? */ moveq r0, $EAGAIN /* Yes; translate it to EAGAIN. */ #endif + #ifndef PIC ldr r1, _errno_loc str r0, [r1] +#ifdef _LIBC_REENTRANT + stmdb sp!, {r0, lr} + /* put another copy of r0 at a specific errno location */ + bl __errno_location + ldmia sp!, {r1, lr} + str r1, [r0] +#endif +#else + stmdb sp!,{r10, lr} + @ we have to establish our PIC register + ldr r10, 1f + add r10, pc, r10 +0: ldr r1, 2f + ldr r1, [r10, r1] + @ store a copy in _errno_loc + str r0, [r1] +#ifdef _LIBC_REENTRANT + @ and another copy in thread copy of _errno_loc + mov r10, r0 + bl __errno_location(PLT) + str r10, [r0] +#endif + ldmia sp!, {r10, lr} + b 4f +1: .word _GLOBAL_OFFSET_TABLE_ - 0b - 4 +2: .word C_SYMBOL_NAME(errno)(GOT) +4: #endif mvn r0, $0 RETINSTR(mov, pc, r14) +#ifndef PIC +_errno_loc: .long C_SYMBOL_NAME(errno) +#endif + #undef __syscall_error END (__syscall_error) From ff259c29e8a446b17bf8f6307a49fc841f7aceeb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 18 Mar 1998 14:33:53 +0000 Subject: [PATCH 1202/4487] Check correctly for error return; call syscall_error through PLT. --- sysdeps/unix/sysv/linux/arm/socket.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/socket.S b/sysdeps/unix/sysv/linux/arm/socket.S index 1940061dda..0ff6dd0164 100644 --- a/sysdeps/unix/sysv/linux/arm/socket.S +++ b/sysdeps/unix/sysv/linux/arm/socket.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 1998 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 @@ -41,9 +41,9 @@ ENTRY (__socket) /* Do the system call trap. */ swi SYS_ify(socketcall) - /* %eax is < 0 if there was an error. */ + /* r0 is < 0 if there was an error. */ cmn r0, $124 - bge syscall_error + bge syscall_error(PLT) /* Successful; return the syscall's value. */ RETINSTR(mov,pc,r14) From 0f2a261a38106184a3466d6a13d7d29cc80f7f68 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 18 Mar 1998 14:34:49 +0000 Subject: [PATCH 1203/4487] (ENTRY): Correct error jump. --- sysdeps/unix/sysv/linux/arm/sysdep.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index af08277a63..3b7ffe08d9 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 93, 95, 96, 97 Free Software Foundation, Inc. +/* Copyright (C) 1992, 93, 95, 96, 97, 98 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, , August 1995. ARM changes by Philip Blundell, , May 1997. @@ -41,7 +41,7 @@ Since version 2.1 the return value of a system call might be negative even if the call succeeded. E.g., the `lseek' system call might return a large offset. Therefore we must not anymore test - for < 0, but test for a real error by making sure the value in %eax + for < 0, but test for a real error by making sure the value in R0 is a real error number. Linus said he will make sure the no syscall returns a value in -1 .. -4095 as a valid result so we can savely test with -4095. */ @@ -51,7 +51,7 @@ ENTRY (name) \ DO_CALL (args, syscall_name); \ cmn r0, $4096; \ - bge syscall_error; + bgt syscall_error; #undef PSEUDO_END #define PSEUDO_END(name) \ From 6f7638eb9dd870889e99ae61f40147b0d496cfee Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 18 Mar 1998 14:40:58 +0000 Subject: [PATCH 1204/4487] ELF setjmp for Arm. --- sysdeps/arm/elf/setjmp.S | 76 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 sysdeps/arm/elf/setjmp.S diff --git a/sysdeps/arm/elf/setjmp.S b/sysdeps/arm/elf/setjmp.S new file mode 100644 index 0000000000..51572ca515 --- /dev/null +++ b/sysdeps/arm/elf/setjmp.S @@ -0,0 +1,76 @@ +/* setjmp for arm, ELF version. + Copyright (C) 1995, 1996, 1997, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#define _ASM +#define _SETJMP_H +#include + + /* We include the BSD entry points here as well but we make + them weak. */ +ENTRY (setjmp) + .weak C_SYMBOL_NAME (setjmp) + @ call comes here with + @ lr = return pc + @ r0 = &jump_buf + + @ add a second argument into the fray + mov r1, #1 + @ call the common code + b __sigsetjmp(PLT) +END (setjmp) + + /* Binary compatibility entry point. */ +ENTRY (_setjmp) + .weak C_SYMBOL_NAME (_setjmp) +ENTRY (__setjmp) + @ call comes here with + @ lr = return pc + @ r0 = &jump_buf + + @ add a second argument into the fray + mov r1, #1 + @ fall through to the common code.... + +ENTRY (__sigsetjmp) + @ save the registers into the jmp_buf.... + stmia r0, {r1-r6, sl, fp, sp, lr} + + /* Make a tail call to __sigjmp_save; it takes the same args. */ +#ifdef PIC + /* We cannot use the PLT, because it requires that sl==r10 be set, but + we can't save and restore our caller's value. Instead, we do an + indirect jump through the GOT, using for the temporary register + ip, which is call-clobbered. */ + ldr ip, 1f + add ip, ip, pc +2: @ get the address of __sigjmp_save + ldr r1, 3f + ldr ip, [ip, r1] + @ restore r1 + ldr r1, [r0] + @ jump to *__sigjmp_save + mov pc, ip +1: .word _GLOBAL_OFFSET_TABLE_ - 2b - 4 +3: .word __sigjmp_save(GOT) + +#else + b __sigjmp_save +#endif +END (__sigsetjmp) From 4acc1d4299ec59e5d8736ede60120574875f7102 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 18 Mar 1998 14:41:05 +0000 Subject: [PATCH 1205/4487] setjmp for Arm. --- sysdeps/arm/fpu/setjmp.S | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 sysdeps/arm/fpu/setjmp.S diff --git a/sysdeps/arm/fpu/setjmp.S b/sysdeps/arm/fpu/setjmp.S new file mode 100644 index 0000000000..790e7566d4 --- /dev/null +++ b/sysdeps/arm/fpu/setjmp.S @@ -0,0 +1,35 @@ +/* setjmp for ARM. + Copyright (C) 1997, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#define _SETJMP_H +#define _ASM +#include + + /* Binary compatibility entry point. */ +ENTRY (__setjmp) + mov r1, #0 +ENTRY (__sigsetjmp) + /* Save registers */ + sfmea f4, 4, [r0]! + stmia r0, {v1-v6, sl, fp, sp, lr} + + /* Make a tail call to __sigjmp_save; it takes the same args. */ + B PLTJMP(C_SYMBOL_NAME(__sigjmp_save)) +END (__setjmp) From df27fae1e84892d89e543d962dd28e95a7c83bc5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 18 Mar 1998 14:41:15 +0000 Subject: [PATCH 1206/4487] ELF startup code for Arm. --- sysdeps/arm/elf/start.S | 109 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 sysdeps/arm/elf/start.S diff --git a/sysdeps/arm/elf/start.S b/sysdeps/arm/elf/start.S new file mode 100644 index 0000000000..e0964a1e38 --- /dev/null +++ b/sysdeps/arm/elf/start.S @@ -0,0 +1,109 @@ +/* Startup code for ARM & ELF + Copyright (C) 1995, 1996, 1997, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* This is the canonical entry point, usually the first thing in the text + segment. + + Note that the code in the .init section has already been run. + This includes _init and _libc_init + + + At this entry point, most registers' values are unspecified, except for: + + r0 Contains a function pointer to be registered with `atexit'. + This is how the dynamic linker arranges to have DT_FINI + functions called for shared libraries that have been loaded + before this code runs. + + sp The stack contains the arguments and environment: + 0(%esp) argc + 4(%esp) argv[0] + ... + (4*argc)(%esp) NULL + (4*(argc+1))(%esp) envp[0] + ... + NULL +*/ + + .text + .globl _start +_start: + /* Clear the frame pointer. The Intel ABI suggests this be done, + to mark the outermost frame obviously. This seems like a + sensible thing to do */ + mov fp, #0 + + /* r0 contains the address of the shared library termination + function, which we will register with `atexit' to be called by + `exit'. I suspect that on some systems, and when statically + linked, this will not be set by anything to any function + pointer; hopefully it will be zero so we don't try to call + random pointers. */ + cmp r0,#0 + blne atexit(PLT) + + /* Do essential libc initialization. In statically linked + programs under the GNU Hurd, this is what sets up the + arguments on the stack for the code below. For dyn-link + programs, this has been run already, in the .init code. */ +#ifndef PIC + bl __libc_init_first + + /* Extract the arguments and environment as encoded on the stack + and set up the arguments for `main': argc, argv, envp. */ + ldr r0,[sp] + add r1,sp,#4 + add r2,r1,r0,lsl #2 + add r2,r2,#4 + /* save a copy of envp while we have it */ + ldr r3,L_environ + str r2,[r3] + + /* Call `_init', which is the entry point to our own `.init' + section; and register with `atexit' to have `exit' call + `_fini', which is the entry point to our own `.fini' section. */ + bl _init + ldr r0,L_fini + bl atexit + b L_pfini + +L_fini: .word _fini +L_environ: .word _environ +L_pfini: +#endif + /* rebuild the arg list for main() */ + ldr r0,[sp] + add r1,sp,#4 + add r2,r1,r0,lsl #2 + add r2,r2,#4 + + /* Call the user's main function, and exit with its value. */ + bl main + bl exit + /* should never get here....*/ + bl abort + + +/* Define a symbol for the first piece of initialized data. */ + .data + .globl __data_start +__data_start: + .long 0 + .weak data_start + data_start = __data_start From 28756a4b21b6f38e633169c1197662a95d9184f7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 18 Mar 1998 14:41:31 +0000 Subject: [PATCH 1207/4487] longjmp for ARM with FPU. --- sysdeps/arm/fpu/__longjmp.S | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 sysdeps/arm/fpu/__longjmp.S diff --git a/sysdeps/arm/fpu/__longjmp.S b/sysdeps/arm/fpu/__longjmp.S new file mode 100644 index 0000000000..8afa177b20 --- /dev/null +++ b/sysdeps/arm/fpu/__longjmp.S @@ -0,0 +1,36 @@ +/* longjmp for ARM. + Copyright (C) 1997, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#define _SETJMP_H +#define _ASM +#include + +/* __longjmp(jmpbuf, val) */ + +ENTRY (__longjmp) + movs r2, r0 + movs r0, r1 /* get the return value in place */ + moveq r1, #1 /* can't let setjmp() return zero! */ + + add r2, r2, #48 + lfmfd f4, 4, [r2] + + LOADREGS(ia, r2, {v1-v6, sl, fp, sp, pc}) +END (__longjmp) From 72f42bf5d3f34ffeff39b51d35329199e3a9ca43 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 23 Mar 1998 02:18:31 +0000 Subject: [PATCH 1208/4487] * sysdeps/m68k/m68020/wordcopy.S: New file. --- sysdeps/m68k/m68020/wordcopy.S | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/m68k/m68020/wordcopy.S diff --git a/sysdeps/m68k/m68020/wordcopy.S b/sysdeps/m68k/m68020/wordcopy.S new file mode 100644 index 0000000000..4fb1a4518f --- /dev/null +++ b/sysdeps/m68k/m68020/wordcopy.S @@ -0,0 +1 @@ +/* Empty, not needed. */ From 4c0a65f62fc0dff5ac5c559e1a1c90f0e3c094d5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 25 Mar 1998 15:53:22 +0000 Subject: [PATCH 1209/4487] Add sizes.h. --- sysdeps/unix/sysv/linux/alpha/Dist | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist index c8149ca0de..6ced71e65d 100644 --- a/sysdeps/unix/sysv/linux/alpha/Dist +++ b/sysdeps/unix/sysv/linux/alpha/Dist @@ -11,6 +11,7 @@ kernel_stat.h kernel_termios.h net/route.h rt_sigaction.S +sizes.h sys/acct.h sys/io.h sys/procfs.h From 59ff3eca16c423a7fd1ecd8851ec6bc7c01817b2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 29 Mar 1998 17:01:42 +0000 Subject: [PATCH 1210/4487] (__readdir64): New strong alias. --- sysdeps/unix/sysv/linux/alpha/readdir.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/readdir.c b/sysdeps/unix/sysv/linux/alpha/readdir.c index 96a6a76945..300ebb2629 100644 --- a/sysdeps/unix/sysv/linux/alpha/readdir.c +++ b/sysdeps/unix/sysv/linux/alpha/readdir.c @@ -1,4 +1,7 @@ #define readdir64 __no_readdir64_decl +#define __readdir64 __no___readdir64_decl #include +#undef __readdir64 +strong_alias (__readdir, __readdir64) #undef readdir64 weak_alias (__readdir, readdir64) From c4f60035d51c8cf5277de450c1c593c74823db8c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 29 Mar 1998 17:01:51 +0000 Subject: [PATCH 1211/4487] (socket): Added. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 8b593a0162..ea3c9452d2 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -51,6 +51,7 @@ sendmsg - sendmsg 3 __libc_sendmsg __sendmsg sendmsg sendto - sendto 6 __libc_sendto __sendto sendto setsockopt - setsockopt 5 __setsockopt setsockopt shutdown - shutdown 2 __shutdown shutdown +socket - socket 3 __socket socket socketpair - socketpair 4 __socketpair socketpair sysctl - _sysctl 6 sysctl From 3117030c12108bf26d769ad004d9e63563109d42 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 31 Mar 1998 23:11:52 +0000 Subject: [PATCH 1212/4487] (sysdep_routines): Add adjtimex. --- sysdeps/unix/sysv/linux/alpha/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile index 7821e46deb..f830303578 100644 --- a/sysdeps/unix/sysv/linux/alpha/Makefile +++ b/sysdeps/unix/sysv/linux/alpha/Makefile @@ -2,7 +2,8 @@ ifeq ($(subdir),misc) sysdep_headers += alpha/ptrace.h alpha/regdef.h sysdep_routines += ieee_get_fp_control ieee_set_fp_control \ - sethae ioperm osf_sigprocmask fstatfs statfs llseek + sethae ioperm osf_sigprocmask fstatfs statfs llseek \ + adjtimex # Support old timeval32 entry points sysdep_routines += osf_select osf_gettimeofday osf_settimeofday \ From 161756fe4fc94e5af68bda5162abc4b32a65cf58 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 31 Mar 1998 23:12:58 +0000 Subject: [PATCH 1213/4487] Wrapper for adjtimex syscall. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index ea3c9452d2..b380996865 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -62,6 +62,9 @@ getresgid - getresgid 3 getresgid pciconfig_read EXTRA pciconfig_read 5 pciconfig_read pciconfig_write EXTRA pciconfig_write 5 pciconfig_write +# Wrapper for adjtimex. +adjtimex - syscall_adjtimex 1 __syscall_adjtimex syscall_adjtimex + # support old timeval32 entry points osf_select - osf_select 5 __select_tv32 __select@GLIBC_2.0 select@GLIBC_2.0 osf_gettimeofday - osf_gettimeofday 2 __gettimeofday_tv32 __gettimeofday@GLIBC_2.0 gettimeofday@GLIBC_2.0 From f709e93784a0314a77b7a71fa44a5368fb54d88d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 31 Mar 1998 23:18:03 +0000 Subject: [PATCH 1214/4487] (_start): Let __libc_start_main do most of the init stuff. --- sysdeps/alpha/elf/start.S | 58 +++++++++------------------------------ 1 file changed, 13 insertions(+), 45 deletions(-) diff --git a/sysdeps/alpha/elf/start.S b/sysdeps/alpha/elf/start.S index a67a39a49f..1330d1fda2 100644 --- a/sysdeps/alpha/elf/start.S +++ b/sysdeps/alpha/elf/start.S @@ -1,5 +1,5 @@ /* Startup code for Alpha/ELF. - Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1993, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson @@ -31,56 +31,24 @@ _start: 1: ldgp gp, 0(gp) .prologue 1 - /* Save v0. When starting a binary via the dynamic linker, s0 - contains the address of the shared library termination function, - which we will register below with atexit() to be called by exit(). - If we are statically linked, this will be NULL. */ - mov v0, s0 + /* Load address of the user's main function. */ + lda a0, main - /* Do essential libc initialization (sp points to argc, argv, and envp) */ - jsr ra, __libc_init_first - ldgp gp, 0(ra) - - /* Now that we have the proper stack frame, register library termination - function, if there is any: */ - - beq s0, 1f - mov s0, a0 - jsr ra, atexit - ldgp gp, 0(ra) -1: - - /* Extract the arguments and environment as encoded on the stack. */ - ldl a0, 0(sp) /* get argc */ - lda a1, 8(sp) /* get argv */ - s8addq a0, a1, a2 /* get envp */ - addq a2, 8, a2 - stq a2, _environ + ldl a1, 0(sp) /* get argc */ + lda a2, 8(sp) /* get argv */ - mov a0, s0 /* tuck them away */ - mov a1, s1 - mov a2, s2 + /* Load address of our own entry points to .fini and .init. */ + lda a3, _init + lda a4, _fini - /* Call _init, the entry point to our own .init section. */ - jsr ra, _init - ldgp gp, 0(ra) + /* Store address of the shared library termination function. */ + mov v0, a5 - /* Register our .fini section with atexit. */ - lda a0, _fini - jsr ra, atexit + /* Call the user's main function, and exit with its value. + But let the libc call main. */ + jsr ra, __libc_start_main ldgp gp, 0(ra) - /* Call the user's main and exit with its return value. */ - mov s0, a0 - mov s1, a1 - mov s2, a2 - - jsr ra, main - ldgp gp, 0(ra) - - mov v0, a0 - jsr ra, exit - /* Die very horribly if exit returns. Call_pal hlt is callable from kernel mode only; this will result in an illegal instruction trap. */ call_pal 0 From c4dc6c456e4cc37c0d7b761677495ce3865983f8 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 1 Apr 1998 00:53:13 +0000 Subject: [PATCH 1215/4487] * sysdeps/unix/sysv/linux/m68k/dl-librecon.h: New file. * sysdeps/unix/sysv/linux/m68k/Makefile [$(subdir)=elf]: Build and install lddlibc4. --- sysdeps/unix/sysv/linux/m68k/Makefile | 5 +++++ sysdeps/unix/sysv/linux/m68k/dl-librecon.h | 1 + 2 files changed, 6 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/dl-librecon.h diff --git a/sysdeps/unix/sysv/linux/m68k/Makefile b/sysdeps/unix/sysv/linux/m68k/Makefile index 12e95f11bf..eb0921d9be 100644 --- a/sysdeps/unix/sysv/linux/m68k/Makefile +++ b/sysdeps/unix/sysv/linux/m68k/Makefile @@ -5,3 +5,8 @@ m68k-syntax-flag = -DMOTOROLA_SYNTAX ifeq ($(subdir),misc) sysdep_routines += mremap endif + +ifeq ($(subdir),elf) +others += lddlibc4 +install-bin += lddlibc4 +endif diff --git a/sysdeps/unix/sysv/linux/m68k/dl-librecon.h b/sysdeps/unix/sysv/linux/m68k/dl-librecon.h new file mode 100644 index 0000000000..dbb4e75712 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/dl-librecon.h @@ -0,0 +1 @@ +#include From e7304fce4e1456c9de9f31ad4f8d46a7749a2568 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 1 Apr 1998 09:09:05 +0000 Subject: [PATCH 1216/4487] (_start): Leave most of the initialisation for __libc_start_main(). --- sysdeps/arm/elf/start.S | 81 ++++++++++++----------------------------- 1 file changed, 24 insertions(+), 57 deletions(-) diff --git a/sysdeps/arm/elf/start.S b/sysdeps/arm/elf/start.S index e0964a1e38..13b9c780ef 100644 --- a/sysdeps/arm/elf/start.S +++ b/sysdeps/arm/elf/start.S @@ -24,19 +24,19 @@ This includes _init and _libc_init - At this entry point, most registers' values are unspecified, except for: + At this entry point, most registers' values are unspecified, except: - r0 Contains a function pointer to be registered with `atexit'. + a1 Contains a function pointer to be registered with `atexit'. This is how the dynamic linker arranges to have DT_FINI functions called for shared libraries that have been loaded before this code runs. sp The stack contains the arguments and environment: - 0(%esp) argc - 4(%esp) argv[0] + 0(sp) argc + 4(sp) argv[0] ... - (4*argc)(%esp) NULL - (4*(argc+1))(%esp) envp[0] + (4*argc)(sp) NULL + (4*(argc+1))(sp) envp[0] ... NULL */ @@ -44,62 +44,29 @@ .text .globl _start _start: - /* Clear the frame pointer. The Intel ABI suggests this be done, - to mark the outermost frame obviously. This seems like a - sensible thing to do */ + /* Clear the frame pointer since this is the outermost frame. */ mov fp, #0 - /* r0 contains the address of the shared library termination - function, which we will register with `atexit' to be called by - `exit'. I suspect that on some systems, and when statically - linked, this will not be set by anything to any function - pointer; hopefully it will be zero so we don't try to call - random pointers. */ - cmp r0,#0 - blne atexit(PLT) - - /* Do essential libc initialization. In statically linked - programs under the GNU Hurd, this is what sets up the - arguments on the stack for the code below. For dyn-link - programs, this has been run already, in the .init code. */ -#ifndef PIC - bl __libc_init_first - - /* Extract the arguments and environment as encoded on the stack - and set up the arguments for `main': argc, argv, envp. */ - ldr r0,[sp] - add r1,sp,#4 - add r2,r1,r0,lsl #2 - add r2,r2,#4 - /* save a copy of envp while we have it */ - ldr r3,L_environ - str r2,[r3] - - /* Call `_init', which is the entry point to our own `.init' - section; and register with `atexit' to have `exit' call - `_fini', which is the entry point to our own `.fini' section. */ - bl _init - ldr r0,L_fini - bl atexit - b L_pfini - -L_fini: .word _fini -L_environ: .word _environ -L_pfini: -#endif - /* rebuild the arg list for main() */ - ldr r0,[sp] - add r1,sp,#4 - add r2,r1,r0,lsl #2 - add r2,r2,#4 - - /* Call the user's main function, and exit with its value. */ - bl main - bl exit + /* Pop argc off the stack and save a pointer to argv */ + ldmfd sp!, {a2} + mov a3, sp + + /* Push the last arguments to main() onto the stack */ + stmfd sp!, {a1} + ldr a1, =_fini + stmfd sp!, {a1} + + /* Set up the other arguments for main() that go in registers */ + ldr a1, =main + ldr a4, =_init + + /* __libc_start_main (main, argc, argv, init, fini, rtld_fini) */ + + /* Let the libc call main and exit with its return code. */ + bl __libc_start_main /* should never get here....*/ bl abort - /* Define a symbol for the first piece of initialized data. */ .data .globl __data_start From ff550b1f27910041f737bb6306345d55bf612f9a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 1 Apr 1998 09:11:44 +0000 Subject: [PATCH 1217/4487] (SYSCALL_ERROR_HANDLER): Always define, not only #ifndef PIC. (DO_CALL): Pass fifth argument correctly in R4. (PSEUDO): Correct test for error, call syscall_error through PLT if PIC. --- sysdeps/unix/sysv/linux/arm/sysdep.h | 50 ++++++++++++++++++++++++---- 1 file changed, 43 insertions(+), 7 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index 3b7ffe08d9..dd1b6f4115 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -45,28 +45,64 @@ is a real error number. Linus said he will make sure the no syscall returns a value in -1 .. -4095 as a valid result so we can savely test with -4095. */ + #undef PSEUDO #define PSEUDO(name, syscall_name, args) \ .text; \ + .type syscall_error,%function \ ENTRY (name) \ DO_CALL (args, syscall_name); \ cmn r0, $4096; \ - bgt syscall_error; + bhs PLTJMP(syscall_error); #undef PSEUDO_END #define PSEUDO_END(name) \ SYSCALL_ERROR_HANDLER \ END (name) -#ifndef PIC #define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */ -#else -#error Aiee -#endif /* PIC */ + +/* Linux takes system call args in registers: + syscall number in the SWI instruction + arg 1 r0 + arg 2 r1 + arg 3 r2 + arg 4 r3 + arg 5 r4 (this is different from the APCS convention) + + The compiler is going to form a call by coming here, through PSEUDO, with + arguments + syscall number in the DO_CALL macro + arg 1 r0 + arg 2 r1 + arg 3 r2 + arg 4 r3 + arg 5 [sp] + + We need to shuffle values between R4 and the stack so that the caller's + R4 is not corrupted, and the kernel sees the right argument there. + +*/ #undef DO_CALL -#define DO_CALL(args, syscall_name) \ - swi SYS_ify (syscall_name); +#define DO_CALL(args, syscall_name) \ + DOARGS_##args \ + swi SYS_ify (syscall_name); \ + UNDOARGS_##args + +#define DOARGS_0 /* nothing */ +#define DOARGS_1 /* nothing */ +#define DOARGS_2 /* nothing */ +#define DOARGS_3 /* nothing */ +#define DOARGS_4 /* nothing */ +#define DOARGS_5 ldr ip, [sp]; str r4, [sp]; mov r4, ip; + +#define UNDOARGS_0 /* nothing */ +#define UNDOARGS_1 /* nothing */ +#define UNDOARGS_2 /* nothing */ +#define UNDOARGS_3 /* nothing */ +#define UNDOARGS_4 /* nothing */ +#define UNDOARGS_5 ldr r4, [sp]; #endif /* ASSEMBLER */ From 2284fbe2ac25901e27ce4eadf3b8d06cd76f8e83 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 1 Apr 1998 09:14:55 +0000 Subject: [PATCH 1218/4487] Correct test for error and use PLTJMP() rather than explicit (PLT). --- sysdeps/unix/sysv/linux/arm/socket.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/arm/socket.S b/sysdeps/unix/sysv/linux/arm/socket.S index 0ff6dd0164..1ebec9ca26 100644 --- a/sysdeps/unix/sysv/linux/arm/socket.S +++ b/sysdeps/unix/sysv/linux/arm/socket.S @@ -43,7 +43,7 @@ ENTRY (__socket) /* r0 is < 0 if there was an error. */ cmn r0, $124 - bge syscall_error(PLT) + bhs PLTJMP(syscall_error) /* Successful; return the syscall's value. */ RETINSTR(mov,pc,r14) From 24e022cf828deb3058fd4ddc87791830f6988b29 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 3 Apr 1998 08:23:11 +0000 Subject: [PATCH 1219/4487] (PSEUDO): Fix typo introduced in last change. --- sysdeps/unix/sysv/linux/arm/sysdep.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index dd1b6f4115..8a5111f082 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -49,7 +49,7 @@ #undef PSEUDO #define PSEUDO(name, syscall_name, args) \ .text; \ - .type syscall_error,%function \ + .type syscall_error,%function ; \ ENTRY (name) \ DO_CALL (args, syscall_name); \ cmn r0, $4096; \ From 80509c667fae7277be76d3cf448c1290283f4358 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 3 Apr 1998 12:06:51 +0000 Subject: [PATCH 1220/4487] (__syscall_error): Same for PIC and non-PIC now. Correctly negate error number. (errno): Use `%' not `@' in .type directives. --- sysdeps/unix/sysv/linux/arm/sysdep.S | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.S b/sysdeps/unix/sysv/linux/arm/sysdep.S index a71181c911..482535bea5 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.S +++ b/sysdeps/unix/sysv/linux/arm/sysdep.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 1998 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 @@ -21,31 +21,23 @@ /* We define errno here, to be consistent with Linux/i386. */ .bss .globl errno - .type errno,@object + .type errno,%object .size errno,4 errno: .zero 4 .globl _errno - .type _errno,@object + .type _errno,%object _errno = errno /* This name is expected by hj's libc.so.5 startup code. */ .text -/* The following code is only used in the shared library when we - compile the reentrant version. Otherwise each system call defines - each own version. */ - -#ifndef PIC - /* The syscall stubs jump here when they detect an error. - The code for Linux is almost identical to the canonical Unix/i386 - code, except that the error number in %eax is negated. */ + The code for Linux is almost identical to the canonical Unix + code, except that the error number in R0 is negated. */ #undef CALL_MCOUNT -#define CALL_MCOUNT /* Don't insert the profiling call, it clobbers %eax. */ +#define CALL_MCOUNT /* Don't insert the profiling call, it clobbers R0. */ ENTRY (__syscall_error) - mvn r0, r0 + rsb r0, r0, $0 #define __syscall_error __syscall_error_1 #include - -#endif /* !PIC */ From 859d74afa9542fd0c53e5dc0ef9befe62c9ac964 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 7 Apr 1998 09:11:50 +0000 Subject: [PATCH 1221/4487] 2.0 kernel support. --- sysdeps/unix/sysv/linux/arm/profil-counter.h | 51 ++++++++++++++++++-- 1 file changed, 48 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/profil-counter.h b/sysdeps/unix/sysv/linux/arm/profil-counter.h index d84e70e7ff..0d5024fa47 100644 --- a/sysdeps/unix/sysv/linux/arm/profil-counter.h +++ b/sysdeps/unix/sysv/linux/arm/profil-counter.h @@ -1,5 +1,5 @@ /* Low-level statistical profiling support function. Linux/ARM version. - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998 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 @@ -18,9 +18,54 @@ Boston, MA 02111-1307, USA. */ #include +#include + +union k_sigcontext + { + struct + { + unsigned long int trap_no; + unsigned long int error_code; + unsigned long int oldmask; + unsigned long int arm_r0; + unsigned long int arm_r1; + unsigned long int arm_r2; + unsigned long int arm_r3; + unsigned long int arm_r4; + unsigned long int arm_r5; + unsigned long int arm_r6; + unsigned long int arm_r7; + unsigned long int arm_r8; + unsigned long int arm_r9; + unsigned long int arm_r10; + unsigned long int arm_fp; + unsigned long int arm_ip; + unsigned long int arm_sp; + unsigned long int arm_lr; + unsigned long int arm_pc; + unsigned long int arm_cpsr; + } v21; + struct + { + unsigned long int magic; + struct pt_regs reg; + unsigned long int trap_no; + unsigned long int error_code; + unsigned long int oldmask; + } v20; +}; void -profil_counter (int signo, struct sigcontext sc) +profil_counter (int signo, int _a2, int _a3, int _a4, union k_sigcontext sc) { - profil_count ((void *) sc.reg.ARM_pc); + /* The format of struct sigcontext changed between 2.0 and 2.1 kernels. + Fortunately 2.0 puts a magic number in the first word and this is not + a legal value for `trap_no', so we can tell them apart. */ + + void *pc; + if (sc.v20.magic == 0x4B534154) + pc = (void *) sc.v20.reg.ARM_pc; + else + pc = (void *) sc.v21.arm_pc; + profil_count (pc); } From ec39d34aed92c66efdc2b250c6b31d75819fc13a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 7 Apr 1998 09:12:51 +0000 Subject: [PATCH 1222/4487] Allow inclusion from netinet.in.h. --- sysdeps/unix/sysv/linux/mips/bits/socket.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h index f481a478b2..75ed54fc56 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/socket.h +++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h @@ -17,7 +17,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef _SYS_STAT_H +#if !defined _SYS_STAT_H && !defined _NETINET_IN_H # error "Never include directly; use instead." #endif From c79c90357e233a6201a40a4e0699f0d87e0236aa Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 8 Apr 1998 07:10:11 +0000 Subject: [PATCH 1223/4487] Add __lseek64 alias for __llseek. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index b380996865..71cfbaabc4 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -20,7 +20,7 @@ osf_sigprocmask - osf_sigprocmask 2 __osf_sigprocmask getpeername - getpeername 3 __getpeername getpeername getpriority - getpriority 2 __getpriority getpriority mmap - mmap 6 __mmap mmap __mmap64 mmap64 -llseek EXTRA lseek 3 __llseek llseek lseek64 +llseek EXTRA lseek 3 __llseek llseek __lseek64 lseek64 pread EXTRA pread 4 __pread pread __pread64 pread64 pwrite EXTRA pwrite 4 __pwrite pwrite __pwrite64 pwrite64 fstatfs - fstatfs 2 __fstatfs fstatfs fstatfs64 From 69b51432792e80457fef3d79b26a26532e55d41b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 9 Apr 1998 10:12:51 +0000 Subject: [PATCH 1224/4487] Use +force in dependency list of installation targets. --- sysdeps/standalone/i386/force_cpu386/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/standalone/i386/force_cpu386/Makefile b/sysdeps/standalone/i386/force_cpu386/Makefile index a51ed7f429..3ed09643b2 100644 --- a/sysdeps/standalone/i386/force_cpu386/Makefile +++ b/sysdeps/standalone/i386/force_cpu386/Makefile @@ -20,6 +20,7 @@ ifeq (bare,$(subdir)) install-others += $(inst_libdir)/force_cpu386.ld -$(inst_libdir)/force_cpu386.ld: $(sysdep_dir)/standalone/i386/target.ld +$(inst_libdir)/force_cpu386.ld: $(sysdep_dir)/standalone/i386/target.ld \ + $(+force) $(do-install) endif From 42d5b2810fde09dec18db1e42d2042ee3db53162 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 17 Apr 1998 08:52:51 +0000 Subject: [PATCH 1225/4487] Optimized ARM version of strlen. --- sysdeps/arm/strlen.S | 55 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 sysdeps/arm/strlen.S diff --git a/sysdeps/arm/strlen.S b/sysdeps/arm/strlen.S new file mode 100644 index 0000000000..9acef4f935 --- /dev/null +++ b/sysdeps/arm/strlen.S @@ -0,0 +1,55 @@ +/* Copyright (C) 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Code contributed by Matthew Wilcox + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +/* size_t strlen(const char *S) + * entry: r0 -> string + * exit: r0 = len + */ + +ENTRY(strlen) + bic r1, r0, $3 @ addr of word containing first byte + ldr r2, [r1], $4 @ get the first word + ands r3, r0, $3 @ how many bytes are duff? + rsb r0, r3, $0 @ get - that number into counter. + beq Laligned @ skip into main check routine if no + @ more + orr r2, r2, $0xff000000 @ set this byte to non-zero + subs r3, r3, $1 @ any more to do? + orrgt r2, r2, $0x00ff0000 @ if so, set this byte + subs r3, r3, $1 @ more? + orrgt r2, r2, $0x0000ff00 @ then set. +Laligned: @ here, we have a word in r2. Does it + tst r2, $0x000000ff @ contain any zeroes? + tstne r2, $0x0000ff00 @ + tstne r2, $0x00ff0000 @ + tstne r2, $0xff000000 @ + addne r0, r0, $4 @ if not, the string is 4 bytes longer + ldrne r2, [r1], $4 @ and we continue to the next word + bne Laligned @ +Llastword: @ drop through to here once we find a + tst r2, $0x000000ff @ word that has a zero byte in it + addne r0, r0, $1 @ + tstne r2, $0x0000ff00 @ and add up to 3 bytes on to it + addne r0, r0, $1 @ + tstne r2, $0x00ff0000 @ (if first three all non-zero, 4th + addne r0, r0, $1 @ must be zero) + RETINSTR(mov,pc,lr) +END(strlen) From 4ec52ed6cfa481e373d3faf7497518b90a0dbbd2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 20 Apr 1998 18:34:25 +0000 Subject: [PATCH 1226/4487] Add copyright text. --- sysdeps/arm/bits/setjmp.h | 18 ++++++++++++++++++ sysdeps/m68k/bits/setjmp.h | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/sysdeps/arm/bits/setjmp.h b/sysdeps/arm/bits/setjmp.h index 5cf9cd75c7..ea25a9ba87 100644 --- a/sysdeps/arm/bits/setjmp.h +++ b/sysdeps/arm/bits/setjmp.h @@ -1,3 +1,21 @@ +/* Copyright (C) 1997, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + /* Define the machine-dependent type `jmp_buf'. ARM version. */ #ifndef _SETJMP_H diff --git a/sysdeps/m68k/bits/setjmp.h b/sysdeps/m68k/bits/setjmp.h index 2991232915..a302b72393 100644 --- a/sysdeps/m68k/bits/setjmp.h +++ b/sysdeps/m68k/bits/setjmp.h @@ -1,3 +1,21 @@ +/* Copyright (C) 1997, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + /* Define the machine-dependent type `jmp_buf'. m68k version. */ #ifndef _SETJMP_H From 91e4b2f65e3441d57503d2f80f510074a93860b7 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 22 Apr 1998 02:07:41 +0000 Subject: [PATCH 1227/4487] * sysdeps/m68k/bits/setjmp.h (_JMPBUF_UNWINDS): Added. --- sysdeps/m68k/bits/setjmp.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sysdeps/m68k/bits/setjmp.h b/sysdeps/m68k/bits/setjmp.h index a302b72393..aa376a0925 100644 --- a/sysdeps/m68k/bits/setjmp.h +++ b/sysdeps/m68k/bits/setjmp.h @@ -39,3 +39,8 @@ typedef struct #endif } __jmp_buf[1]; + +/* Test if longjmp to JMPBUF would unwind the frame + containing a local variable at ADDRESS. */ +#define _JMPBUF_UNWINDS(jmpbuf, address) \ + ((void *) (address) < (void *) (jmpbuf)->__sp) From 4af6e4ade676d122e1cad3a8e68400907d615a91 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Thu, 23 Apr 1998 22:46:39 +0000 Subject: [PATCH 1228/4487] (_JMPBUF_UNWINDS): Added. --- sysdeps/alpha/bits/setjmp.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sysdeps/alpha/bits/setjmp.h b/sysdeps/alpha/bits/setjmp.h index de37019218..af0b5ae577 100644 --- a/sysdeps/alpha/bits/setjmp.h +++ b/sysdeps/alpha/bits/setjmp.h @@ -74,4 +74,10 @@ #ifndef __ASSEMBLY__ typedef long int __jmp_buf[17]; + +/* Test if longjmp to JMPBUF would unwind the frame containing a local + variable at ADDRESS. */ +#define _JMPBUF_UNWINDS(_jmpbuf, _address) \ + ({ register void *_sp __asm__("$30"); void *_addr = (_address); \ + _sp <= _addr && _addr < (void *)((_jmpbuf)[JB_SP]); }) #endif From d6ce92cdf1b1640532c64bc432641c13cd29d5b8 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 24 Apr 1998 14:43:00 +0000 Subject: [PATCH 1229/4487] Don't check against SP. --- sysdeps/alpha/bits/setjmp.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sysdeps/alpha/bits/setjmp.h b/sysdeps/alpha/bits/setjmp.h index af0b5ae577..a15ab31b47 100644 --- a/sysdeps/alpha/bits/setjmp.h +++ b/sysdeps/alpha/bits/setjmp.h @@ -78,6 +78,5 @@ typedef long int __jmp_buf[17]; /* Test if longjmp to JMPBUF would unwind the frame containing a local variable at ADDRESS. */ #define _JMPBUF_UNWINDS(_jmpbuf, _address) \ - ({ register void *_sp __asm__("$30"); void *_addr = (_address); \ - _sp <= _addr && _addr < (void *)((_jmpbuf)[JB_SP]); }) + ((void *)(_address) < (void *)((_jmpbuf)[JB_SP])) #endif From 68f722de86b5e20bb9f12c93d1d812be193f9564 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 24 Apr 1998 15:29:55 +0000 Subject: [PATCH 1230/4487] (ftruncate): Make __ftruncate the strong symbol, and add weak alias. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 71cfbaabc4..ed81a2c0b3 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -27,7 +27,7 @@ fstatfs - fstatfs 2 __fstatfs fstatfs fstatfs64 statfs - statfs 2 __statfs statfs statfs64 getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64 setrlimit - setrlimit 2 setrlimit setrlimit64 -ftruncate - ftruncate 2 ftruncate ftruncate64 +ftruncate - ftruncate 2 __ftruncate ftruncate ftruncate64 truncate - truncate 2 truncate truncate64 # these are actually common with the x86: From b13ae75e55221ae59ebd225eb594d4b8fbdd8fb4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 29 Apr 1998 16:05:50 +0000 Subject: [PATCH 1231/4487] Add SIGCLD definition. --- sysdeps/unix/sysv/linux/alpha/bits/signum.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/signum.h b/sysdeps/unix/sysv/linux/alpha/bits/signum.h index 05ffbae550..44c3374e6c 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/signum.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/signum.h @@ -52,6 +52,7 @@ #define SIGTSTP 18 #define SIGCONT 19 #define SIGCHLD 20 +#define SIGCLD SIGCHLD #define SIGTTIN 21 #define SIGTTOU 22 #define SIGIO 23 From 3642cfd2b4ba88a906d2694d07cd1eca53d53dc4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 30 Apr 1998 16:56:27 +0000 Subject: [PATCH 1232/4487] Fix off by one error. --- sysdeps/arm/memset.S | 1 - 1 file changed, 1 deletion(-) diff --git a/sysdeps/arm/memset.S b/sysdeps/arm/memset.S index a986d687da..567cc39c23 100644 --- a/sysdeps/arm/memset.S +++ b/sysdeps/arm/memset.S @@ -63,6 +63,5 @@ ENTRY(memset) strb a2, [a4], $1 strb a2, [a4], $1 strb a2, [a4], $1 - strb a2, [a4], $1 RETINSTR(mov,pc,lr) END(memset) From 87161c8c887d83474187ec13a40a0658b6a15e14 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 30 Apr 1998 16:56:45 +0000 Subject: [PATCH 1233/4487] Startup file for ARM. --- sysdeps/unix/arm/start.c | 85 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 sysdeps/unix/arm/start.c diff --git a/sysdeps/unix/arm/start.c b/sysdeps/unix/arm/start.c new file mode 100644 index 0000000000..772384727a --- /dev/null +++ b/sysdeps/unix/arm/start.c @@ -0,0 +1,85 @@ +/* Special startup code for ARM a.out binaries. + Copyright (C) 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include +#include + +/* The first piece of initialized data. */ +int __data_start = 0; +#ifdef HAVE_WEAK_SYMBOLS +weak_alias (__data_start, data_start) +#endif + +#ifndef errno +volatile int __errno; +strong_alias (__errno, errno) +#endif + +extern void __libc_init __P ((int argc, char **argv, char **envp)); +extern int main __P ((int argc, char **argv, char **envp)); + +/* N.B.: It is important that this be the first function. + This file is the first thing in the text section. */ + +/* If this was in C it might create its own stack frame and + screw up the arguments. */ +#ifdef NO_UNDERSCORES +asm (".text; .globl _start; _start: B start1"); +#else +asm (".text; .globl __start; __start: B _start1"); + +/* Make an alias called `start' (no leading underscore, so it can't + conflict with C symbols) for `_start'. This is the name vendor crt0.o's + tend to use, and thus the name most linkers expect. */ +asm (".set start, __start"); +#endif + +/* Fool gcc into thinking that more args are passed. This makes it look + on the stack (correctly) for the real arguments. It causes somewhat + strange register usage in start1(), but we aren't too bothered about + that at the moment. */ +#define DUMMIES a1, a2, a3, a4 + +#ifdef DUMMIES +#define ARG_DUMMIES DUMMIES, +#define DECL_DUMMIES int DUMMIES; +#else +#define ARG_DUMMIES +#define DECL_DUMMIES +#endif + +/* ARGSUSED */ +static void +start1 (ARG_DUMMIES argc, argv, envp) + DECL_DUMMIES + int argc; + char **argv; + char **envp; +{ + /* Store a pointer to the environment. */ + __environ = envp; + + /* Do C library initializations. */ + __libc_init (argc, argv, __environ); + + /* Call the user program. */ + exit (main (argc, argv, __environ)); +} From a62da3689a794d4154b16d3d7742fd1515723bb5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 30 Apr 1998 16:57:14 +0000 Subject: [PATCH 1234/4487] mmap syscall interface for Linux/ARM. --- sysdeps/unix/sysv/linux/arm/mmap.S | 39 ++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/mmap.S diff --git a/sysdeps/unix/sysv/linux/arm/mmap.S b/sysdeps/unix/sysv/linux/arm/mmap.S new file mode 100644 index 0000000000..905303e8e3 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/mmap.S @@ -0,0 +1,39 @@ +/* Copyright (C) 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + + .text + +ENTRY (__mmap) + + /* Because we can only get five args through the syscall interface, and + mmap() takes six, we need to build a parameter block and pass its + address instead. The 386 port does a similar trick. */ + + mov ip, sp + stmdb ip!, {a1-a4} + mov a1, ip + swi SYS_ify (mmap) + cmn r0, $4096 + bhs PLTJMP(syscall_error); + ret + +PSEUDO_END (__mmap) + +weak_alias (__mmap, mmap) From 096031e14c93b10a3419e26200a8ad2a38ffa59c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 30 Apr 1998 16:57:25 +0000 Subject: [PATCH 1235/4487] (PSEUDO): On error, call __syscall_error rather than syscall_error directly. --- sysdeps/unix/sysv/linux/arm/sysdep.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index 8a5111f082..14dd17c02a 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -53,7 +53,7 @@ ENTRY (name) \ DO_CALL (args, syscall_name); \ cmn r0, $4096; \ - bhs PLTJMP(syscall_error); + bhs PLTJMP(C_SYMBOL_NAME(__syscall_error)); #undef PSEUDO_END #define PSEUDO_END(name) \ From a6d2806b8ff4363342c33aabd781f6d21adc97b9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 6 May 1998 09:50:30 +0000 Subject: [PATCH 1236/4487] Add LFS support and use correct types overall. --- sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h | 53 ++++++++++++++++---- 1 file changed, 43 insertions(+), 10 deletions(-) diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h index c6048a9277..ef93b7be27 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1996, 1997, 1998 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 @@ -22,19 +22,21 @@ #include +/* Length of array allocated for file system type name. */ +#define _ST_FSTYPSZ 16 + + /* Structure describing file characteristics. */ struct stat { - unsigned long int st_dev; + __dev_t st_dev; long int st_filler1[3]; __ino_t st_ino; /* File serial number. */ - unsigned long int st_mode; /* File mode. */ - /* This is unsigned long instead of __nlink_t, since SVR4 has - a long nlink_t, not a short one. */ - unsigned long int st_nlink; /* Link count. */ + __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.*/ - unsigned long int st_rdev; /* Device number, if device. */ + __dev_t st_rdev; /* Device number, if device. */ long int st_filler2[2]; __off_t st_size; /* Size of file, in bytes. */ @@ -48,14 +50,45 @@ struct stat __time_t st_ctime; /* Time of last status change. */ unsigned long int st_ctime_usec; - __blkcnt_t st_blksize; /* Optimal block size for I/O. */ + long int st_blksize; /* Optimal block size for I/O. */ #define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ - long int st_blocks; /* Number of 512-byte blocks allocated. */ - char st_fstype[16]; + __blkcnt_t st_blocks; /* Number of 512-byte blocks allocated. */ + char st_fstype[_ST_FSTYPSZ]; long int st_filler4[8]; }; +#ifdef __USE_LARGEFILE64 +/* struct stat64 has the shape as stat */ +struct stat64 + { + __dev_t st_dev; /* Device */ + long int st_filler1[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_filler2; + + __off64_t st_size; /* Size of file, in bytes. */ + + __time_t st_atime; /* Time of last access */ + unsigned long int st_atime_usec; + __time_t st_mtime; /* Time of last modification */ + unsigned long int st_mtime_usec; + __time_t st_ctime; /* Time of last status change */ + unsigned long int st_ctime_usec; + + long int st_blksize; + __blkcnt64_t st_blocks; + char st_fstype[_ST_FSTYPSZ]; + long int st_filler3[8]; +}; +#endif + + /* Encoding of the file mode. */ #define __S_IFMT 0170000 /* These bits determine file type. */ From 42362b90d61d4cf8a1193c87d54fa1b077af5b56 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 6 May 1998 09:51:36 +0000 Subject: [PATCH 1237/4487] Solaris2 specific type definitions. --- sysdeps/unix/sysv/sysv4/solaris2/bits/types.h | 118 ++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/solaris2/bits/types.h diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h new file mode 100644 index 0000000000..44e343ab1c --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h @@ -0,0 +1,118 @@ +/* Copyright (C) 1991, 92, 94, 95, 96, 97, 98 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* + * Never include this file directly; use instead. + */ + +#ifndef _BITS_TYPES_H +#define _BITS_TYPES_H 1 + + +/* Convenience types. */ +typedef unsigned char __u_char; +typedef unsigned short __u_short; +typedef unsigned int __u_int; +typedef unsigned long __u_long; +#ifdef __GNUC__ +typedef unsigned long long int __u_quad_t; +typedef long long int __quad_t; +#else +typedef struct +{ + long __val[2]; +} __quad_t; +typedef struct +{ + __u_long __val[2]; +} __u_quad_t; +#endif +typedef signed char __int8_t; +typedef unsigned char __uint8_t; +typedef signed short int __int16_t; +typedef unsigned short int __uint16_t; +typedef signed int __int32_t; +typedef unsigned int __uint32_t; +#ifdef __GNUC__ +typedef signed long long int __int64_t; +typedef unsigned long long int __uint64_t; +#endif +typedef __quad_t *__qaddr_t; +typedef unsigned long int __dev_t; /* Type of device numbers. */ +typedef long int __uid_t; /* Type of user identifications. */ +typedef long int __gid_t; /* Type of group identifications. */ +typedef unsigned long int __ino_t; /* Type of file serial numbers. */ +typedef unsigned long int __mode_t; /* Type of file attribute bitmasks. */ +typedef unsigned long int __nlink_t; /* Type of file link counts. */ +typedef long int __off_t; /* Type of file sizes and offsets. */ +typedef __quad_t __loff_t; /* Type of file sizes and offsets. */ +typedef long int __pid_t; /* Type of process identifications. */ +typedef int __ssize_t; /* Type of a byte count, or error. */ +typedef __u_quad_t __fsid_t; /* Type of file system IDs. */ +typedef long int __clock_t; /* Type of CPU usage counts. */ +typedef long int __rlim_t; /* Type for resource measurement. */ +typedef __quad_t __rlim64_t; /* Type for resource measurement (LFS). */ +typedef __quad_t __ino64_t; /* Type for file serial numbers. */ +typedef __loff_t __off64_t; /* Type of file izes and offsets. */ +typedef unsigned int __id_t; /* General type for IDs. */ + +/* Everythin' else. */ +typedef long int __daddr_t; /* The type of a disk address. */ +typedef char *__caddr_t; +typedef long int __time_t; +typedef long int __swblk_t; /* Type of a swap block maybe? */ +typedef int __key_t; /* Type of an IPC key */ + +/* fd_set for select. */ + +/* Number of descriptors that can fit in an `fd_set'. */ +#define __FD_SETSIZE 1024 + +/* It's easier to assume 8-bit bytes than to get CHAR_BIT. */ +#define __NFDBITS (sizeof (unsigned long int) * 8) +#define __FDELT(d) ((d) / __NFDBITS) +#define __FDMASK(d) ((unsigned long int) 1 << ((d) % __NFDBITS)) + +typedef struct + { + /* XPG4.2 requires this member name. */ + unsigned long int fds_bits[(__FD_SETSIZE + (__NFDBITS - 1)) / __NFDBITS]; + } __fd_set; + +typedef unsigned long int __fd_mask; + + +/* Types from the Large File Support interface. */ + +/* Type to count number os disk blocks. */ +typedef long int __blkcnt_t; +typedef __quad_t __blkcnt64_t; + +/* Type to count file system blocks. */ +typedef unsigned int __fsblkcnt_t; +typedef __u_quad_t __fsblkcnt64_t; + +/* Type to count file system inodes. */ +typedef unsigned long int __fsfilcnt_t; +typedef __u_quad_t __fsfilcnt64_t; + +/* Used in XTI. */ +typedef int __t_scalar_t; +typedef unsigned int __t_uscalar_t; + +#endif /* bits/types.h */ From 0f123e3c339c6c561d1ca4b23e8418e0b448aed3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 6 May 1998 10:22:08 +0000 Subject: [PATCH 1238/4487] Solaris specific error numbers. --- sysdeps/unix/sysv/sysv4/solaris2/bits/errno.h | 170 ++++++++++++++++++ 1 file changed, 170 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/solaris2/bits/errno.h diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/errno.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/errno.h new file mode 100644 index 0000000000..4065bfbfac --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/errno.h @@ -0,0 +1,170 @@ +/* Copyright (C) 1991, 1994, 1996, 1997, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* This file defines the `errno' constants. */ + +#if !defined __Emath_defined && (defined _ERRNO_H || defined __need_Emath) +#undef __need_Emath +#define __Emath_defined 1 + +# define EDOM 33 /* Math argument out of domain of function. */ +# define EILSEQ 88 /* Illegal byte sequence. */ +# define ERANGE 34 /* Math result not representable. */ +#endif + +#ifdef _ERRNO_H +/* All error codes the system knows about. */ + +# define EPERM 1 /* Not super-user. */ +# define ENOENT 2 /* No such file or directory. */ +# define ESRCH 3 /* No such process. */ +# define EINTR 4 /* Interrupted system call. */ +# define EIO 5 /* I/O error. */ +# define ENXIO 6 /* No such device or address. */ +# define E2BIG 7 /* Arg list too long. */ +# define ENOEXEC 8 /* Exec format error. */ +# define EBADF 9 /* Bad file number. */ +# define ECHILD 10 /* No children. */ +# define EAGAIN 11 /* Resource temporarily unavailable. */ +# define EWOULDBLOCK EAGAIN +# define ENOMEM 12 /* Not enough core. */ +# define EACCES 13 /* Permission denied. */ +# define EFAULT 14 /* Bad address. */ +# define ENOTBLK 15 /* Block device required. */ +# define EBUSY 16 /* Mount device busy. */ +# define EEXIST 17 /* File exists. */ +# define EXDEV 18 /* Cross-device link. */ +# define ENODEV 19 /* No such device. */ +# define ENOTDIR 20 /* Not a directory. */ +# define EISDIR 21 /* Is a directory. */ +# define EINVAL 22 /* Invalid argument. */ +# define ENFILE 23 /* File table overflow. */ +# define EMFILE 24 /* Too many open files. */ +# define ENOTTY 25 /* Inappropriate ioctl for device. */ +# define ETXTBSY 26 /* Text file busy. */ +# define EFBIG 27 /* File too large. */ +# define ENOSPC 28 /* No space left on device. */ +# define ESPIPE 29 /* Illegal seek. */ +# define EROFS 30 /* Read only file system. */ +# define EMLINK 31 /* Too many links. */ +# define EPIPE 32 /* Broken pipe. */ +# define ENOMSG 35 /* No message of desired type. */ +# define EIDRM 36 /* Identifier removed. */ +# define ECHRNG 37 /* Channel number out of range. */ +# define EL2NSYNC 38 /* Level 2 not synchronized. */ +# define EL3HLT 39 /* Level 3 halted. */ +# define EL3RST 40 /* Level 3 reset. */ +# define ELNRNG 41 /* Link number out of range. */ +# define EUNATCH 42 /* Protocol driver not attached. */ +# define ENOCSI 43 /* No CSI structure available. */ +# define EL2HLT 44 /* Level 2 halted. */ +# define EDEADLK 45 /* Deadlock condition. */ +# define ENOLCK 46 /* No record locks available. */ +# define ECANCELED 47 /* Operation canceled. */ +# define ENOTSUP 48 /* Operation not supported. */ + +/* Filesystem Quotas. */ +# define EDQUOT 49 /* Disc quota exceeded. */ + +/* Convergent Error Returns. */ +# define EBADE 50 /* Invalid exchange. */ +# define EBADR 51 /* Invalid request descriptor. */ +# define EXFULL 52 /* Exchange full. */ +# define ENOANO 53 /* No anode. */ +# define EBADRQC 54 /* Invalid request code. */ +# define EBADSLT 55 /* Invalid slot. */ +# define EDEADLOCK 56 /* File locking deadlock error. */ + +# define EBFONT 57 /* Bad font file fmt. */ + +/* STREAM problems. */ +# define ENOSTR 60 /* Device not a stream. */ +# define ENODATA 61 /* No data (for no delay io). */ +# define ETIME 62 /* Timer expired. */ +# define ENOSR 63 /* Out of streams resources. */ + +# define ENONET 64 /* Machine is not on the network. */ +# define ENOPKG 65 /* Package not installed. */ +# define EREMOTE 66 /* The object is remote. */ +# define ENOLINK 67 /* The link has been severed. */ +# define EADV 68 /* Advertise error. */ +# define ESRMNT 69 /* Srmount error. */ + +# define ECOMM 70 /* Communication error on send. */ +# define EPROTO 71 /* Protocol error. */ +# define EMULTIHOP 74 /* Multihop attempted. */ +# define EBADMSG 77 /* Trying to read unreadable message. */ +# define ENAMETOOLONG 78 /* Path name is too long. */ +# define EOVERFLOW 79 /* Value too large to be stored in data type.*/ +# define ENOTUNIQ 80 /* Given log. name not unique. */ +# define EBADFD 81 /* F.d. invalid for this operation. */ +# define EREMCHG 82 /* Remote address changed. */ + +/* Shared library problems. */ +# define ELIBACC 83 /* Can't access a needed shared lib. */ +# define ELIBBAD 84 /* Accessing a corrupted shared lib. */ +# define ELIBSCN 85 /* .lib section in a.out corrupted. */ +# define ELIBMAX 86 /* Attempting to link in too many libs. */ +# define ELIBEXEC 87 /* Attempting to exec a shared library. */ +# define ENOSYS 89 /* Unsupported file system operation. */ +# define ELOOP 90 /* Symbolic link loop. */ +# define ERESTART 91 /* Restartable system call. */ +# define ESTRPIPE 92 /* If pipe/FIFO, don't sleep in stream head. */ +# define ENOTEMPTY 93 /* Directory not empty. */ +# define EUSERS 94 /* Too many users (for UFS). */ + +/* BSD Networking Software: argument errors. */ +# define ENOTSOCK 95 /* Socket operation on non-socket. */ +# define EDESTADDRREQ 96 /* Destination address required. */ +# define EMSGSIZE 97 /* Message too long. */ +# define EPROTOTYPE 98 /* Protocol wrong type for socket. */ +# define ENOPROTOOPT 99 /* Protocol not available. */ +# define EPROTONOSUPPORT 120 /* Protocol not supported. */ +# define ESOCKTNOSUPPORT 121 /* Socket type not supported. */ +# define EOPNOTSUPP 122 /* Operation not supported on socket. */ +# define EPFNOSUPPORT 123 /* Protocol family not supported. */ +# define EAFNOSUPPORT 124 /* Address family not supported by + protocol family. */ +# define EADDRINUSE 125 /* Address already in use. */ +# define EADDRNOTAVAIL 126 /* Can't assign requested address. */ +/* BSD Networking Software: operational errors. */ +# define ENETDOWN 127 /* Network is down. */ +# define ENETUNREACH 128 /* Network is unreachable. */ +# define ENETRESET 129 /* Network dropped connection because + of reset. */ +# define ECONNABORTED 130 /* Software caused connection abort. */ +# define ECONNRESET 131 /* Connection reset by peer. */ +# define ENOBUFS 132 /* No buffer space available. */ +# define EISCONN 133 /* Socket is already connected. */ +# define ENOTCONN 134 /* Socket is not connected. */ +/* XENIX has 135 - 142. */ +# define ESHUTDOWN 143 /* Can't send after socket shutdown. */ +# define ETOOMANYREFS 144 /* Too many references: can't splice. */ +# define ETIMEDOUT 145 /* Connection timed out. */ +# define ECONNREFUSED 146 /* Connection refused. */ +# define EHOSTDOWN 147 /* Host is down. */ +# define EHOSTUNREACH 148 /* No route to host. */ +# define EALREADY 149 /* operation already in progress. */ +# define EINPROGRESS 150 /* operation now in progress. */ + +/* SUN Network File System. */ +# define ESTALE 151 /* Stale NFS file handle. */ + +#endif + +#define __set_errno(val) errno = (val) From 7829f6c432d20ef60528e62d13551a5b382c73ba Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 8 May 1998 15:02:44 +0000 Subject: [PATCH 1239/4487] [subdir=elf]: Define sysdep-others, not others. --- sysdeps/unix/sysv/linux/m68k/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/m68k/Makefile b/sysdeps/unix/sysv/linux/m68k/Makefile index eb0921d9be..3cedf6322e 100644 --- a/sysdeps/unix/sysv/linux/m68k/Makefile +++ b/sysdeps/unix/sysv/linux/m68k/Makefile @@ -7,6 +7,6 @@ sysdep_routines += mremap endif ifeq ($(subdir),elf) -others += lddlibc4 +sysdep-others += lddlibc4 install-bin += lddlibc4 endif From 423363a17236e6e227f5ad485e8e8f9e13f1ae41 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 11 May 1998 11:04:27 +0000 Subject: [PATCH 1240/4487] (sysdep_routines): Remove statfs and fstatfs. --- sysdeps/unix/sysv/linux/alpha/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile index f830303578..15ba1c7316 100644 --- a/sysdeps/unix/sysv/linux/alpha/Makefile +++ b/sysdeps/unix/sysv/linux/alpha/Makefile @@ -2,8 +2,7 @@ ifeq ($(subdir),misc) sysdep_headers += alpha/ptrace.h alpha/regdef.h sysdep_routines += ieee_get_fp_control ieee_set_fp_control \ - sethae ioperm osf_sigprocmask fstatfs statfs llseek \ - adjtimex + sethae ioperm osf_sigprocmask llseek adjtimex # Support old timeval32 entry points sysdep_routines += osf_select osf_gettimeofday osf_settimeofday \ From 50a430afa2446a2be7b12eb1a7712d3fc348726e Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 11 May 1998 11:05:13 +0000 Subject: [PATCH 1241/4487] Don't mark pread and pwrite as EXTRA. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index ed81a2c0b3..0b38038d46 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -21,8 +21,8 @@ getpeername - getpeername 3 __getpeername getpeername getpriority - getpriority 2 __getpriority getpriority mmap - mmap 6 __mmap mmap __mmap64 mmap64 llseek EXTRA lseek 3 __llseek llseek __lseek64 lseek64 -pread EXTRA pread 4 __pread pread __pread64 pread64 -pwrite EXTRA pwrite 4 __pwrite pwrite __pwrite64 pwrite64 +pread - pread 4 __pread pread __pread64 pread64 +pwrite - pwrite 4 __pwrite pwrite __pwrite64 pwrite64 fstatfs - fstatfs 2 __fstatfs fstatfs fstatfs64 statfs - statfs 2 __statfs statfs statfs64 getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64 From 7214b180b39dfdd05edba7079e9362b10dc73158 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 12 May 1998 12:19:53 +0000 Subject: [PATCH 1242/4487] Add oldglob.c. --- sysdeps/unix/sysv/linux/alpha/Dist | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist index 6ced71e65d..d20860445c 100644 --- a/sysdeps/unix/sysv/linux/alpha/Dist +++ b/sysdeps/unix/sysv/linux/alpha/Dist @@ -10,6 +10,7 @@ kernel_sigaction.h kernel_stat.h kernel_termios.h net/route.h +oldglob.c rt_sigaction.S sizes.h sys/acct.h From 5df1e78b29d237958b04193b7af2cba136cc443a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 12 May 1998 12:20:06 +0000 Subject: [PATCH 1243/4487] Compile oldglob in posix subdir. --- sysdeps/unix/sysv/linux/alpha/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile index 15ba1c7316..fbbc56ecd3 100644 --- a/sysdeps/unix/sysv/linux/alpha/Makefile +++ b/sysdeps/unix/sysv/linux/alpha/Makefile @@ -1,3 +1,7 @@ +ifeq ($(subdir),posix) +sysdep_routines += oldglob +endif + ifeq ($(subdir),misc) sysdep_headers += alpha/ptrace.h alpha/regdef.h From cab5b83e4d0919792c976d7dbfd447f278fd355e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 12 May 1998 12:20:27 +0000 Subject: [PATCH 1244/4487] Wrapper around generic code to add version information. --- sysdeps/unix/sysv/linux/alpha/glob.c | 30 ++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/glob.c diff --git a/sysdeps/unix/sysv/linux/alpha/glob.c b/sysdeps/unix/sysv/linux/alpha/glob.c new file mode 100644 index 0000000000..7bd516191d --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/glob.c @@ -0,0 +1,30 @@ +/* Copyright (C) 1998 Free Software Foundation, Inc. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* For Linux/Alpha we have to make the glob symbols versioned. */ +#define glob(pattern, flags, errfunc, pglob) \ + __new_glob (pattern, flags, errfunc, pglob) \ +#define globfree(pglob) \ + __new_globfree (pglob) + +#include_next + +#undef glob +#undef globfree + +default_symbol_version(__new_glob, glob, GLIBC_2.1) +default_symbol_version(__new_globfree, globfree, GLIBC_2.1) From 59f4b0c86c0d1bc6074f8475213e44ddadb18427 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 12 May 1998 12:20:54 +0000 Subject: [PATCH 1245/4487] Wrapper around current code to convert from and back to old glob_t format. --- sysdeps/unix/sysv/linux/alpha/oldglob.c | 94 +++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/oldglob.c diff --git a/sysdeps/unix/sysv/linux/alpha/oldglob.c b/sysdeps/unix/sysv/linux/alpha/oldglob.c new file mode 100644 index 0000000000..97284ab3e9 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/oldglob.c @@ -0,0 +1,94 @@ +/* Copyright (C) 1998 Free Software Foundation, Inc. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* This file contains only wrappers around the real glob functions. It + became necessary since the glob_t structure changed. */ +#include + +#if defined PIC && DO_VERSIONING + +/* This is the old structure. The difference is that the gl_pathc and + gl_offs elements have type `int'. */ +typedef struct + { + int gl_pathc; /* Count of paths matched by the pattern. */ + char **gl_pathv; /* List of matched pathnames. */ + int gl_offs; /* Slots to reserve in `gl_pathv'. */ + int gl_flags; /* Set to FLAGS, maybe | GLOB_MAGCHAR. */ + + /* If the GLOB_ALTDIRFUNC flag is set, the following functions + are used instead of the normal file access functions. */ + void (*gl_closedir) __P ((void *)); + struct dirent *(*gl_readdir) __P ((void *)); + __ptr_t (*gl_opendir) __P ((__const char *)); + int (*gl_lstat) __P ((__const char *, struct stat *)); + int (*gl_stat) __P ((__const char *, struct stat *)); + } old_glob_t; + + +int +__old_glob (const char *pattern, int flags, + int (*errfunc) __P ((const char *, int)), + old_glob_t *pglob) +{ + glob_t correct; + int result; + + /* Construct an object of correct type. */ + correct.gl_pathc = pglob->gl_pathc; + correct.gl_pathv = pglob->gl_pathv; + correct.gl_offs = pglob->gl_offs; + correct.gl_flags = pglob->gl_flags; + correct.gl_closedir = pglob->gl_closedir; + correct.gl_readdir = pglob->gl_readdir; + correct.gl_opendir = pglob->gl_opendir; + correct.gl_lstat = pglob->gl_lstat; + correct.gl_stat = pglob->gl_stat; + + result = glob (pattern, flags, errfunc, &correct); + + /* And convert it back. */ + pglob->gl_pathc = correct.gl_pathc; + pglob->gl_pathv = correct.gl_pathv; + pglob->gl_offs = correct.gl_offs; + pglob->gl_flags = correct.gl_flags; + pglob->gl_closedir = correct.gl_closedir; + pglob->gl_readdir = correct.gl_readdir; + pglob->gl_opendir = correct.gl_opendir; + pglob->gl_lstat = correct.gl_lstat; + pglob->gl_stat = correct.gl_stat; + + return result; +} +symbol_version(__old_glob, glob, GLIBC_2.0) + + +/* Free storage allocated in PGLOB by a previous `glob' call. */ +void +__old_globfree (old_glob_t *pglob) +{ + glob_t correct; + + /* We only need these two symbols. */ + correct.gl_pathc = pglob->gl_pathc; + correct.gl_pathv = pglob->gl_pathv; + + globfree (&correct); +} +symbol_version(__old_globfree, globfree, GLIBC_2.0) + +#endif From 69069c4a577fe37cfae5aec38eee85ed55c5f5d3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 19 May 1998 16:11:41 +0000 Subject: [PATCH 1246/4487] Support both big and little endian processors. --- sysdeps/arm/strlen.S | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sysdeps/arm/strlen.S b/sysdeps/arm/strlen.S index 9acef4f935..0e360e2653 100644 --- a/sysdeps/arm/strlen.S +++ b/sysdeps/arm/strlen.S @@ -31,11 +31,19 @@ ENTRY(strlen) rsb r0, r3, $0 @ get - that number into counter. beq Laligned @ skip into main check routine if no @ more +#ifdef __ARMEB__ orr r2, r2, $0xff000000 @ set this byte to non-zero subs r3, r3, $1 @ any more to do? orrgt r2, r2, $0x00ff0000 @ if so, set this byte subs r3, r3, $1 @ more? orrgt r2, r2, $0x0000ff00 @ then set. +#else + orr r2, r2, $0x000000ff @ set this byte to non-zero + subs r3, r3, $1 @ any more to do? + orrgt r2, r2, $0x0000ff00 @ if so, set this byte + subs r3, r3, $1 @ more? + orrgt r2, r2, $0x00ff0000 @ then set. +#endif Laligned: @ here, we have a word in r2. Does it tst r2, $0x000000ff @ contain any zeroes? tstne r2, $0x0000ff00 @ From 0c56aa6338e8dfd4abb545b42c8fcff98b8e6163 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 19 May 1998 16:11:52 +0000 Subject: [PATCH 1247/4487] (ALIGNARG): ELF .align directive uses a log, not a byte-count. --- sysdeps/arm/sysdep.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sysdeps/arm/sysdep.h b/sysdeps/arm/sysdep.h index 28dd402ced..eeef7aaded 100644 --- a/sysdeps/arm/sysdep.h +++ b/sysdeps/arm/sysdep.h @@ -25,8 +25,7 @@ #ifdef HAVE_ELF -/* ELF uses byte-counts for .align, most others use log2 of count of bytes. */ -#define ALIGNARG(log2) 1< Date: Tue, 19 May 1998 16:12:07 +0000 Subject: [PATCH 1248/4487] (syscall_error): Use C_SYMBOL_NAME for a.out compatibility. --- sysdeps/unix/arm/sysdep.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/arm/sysdep.S b/sysdeps/unix/arm/sysdep.S index c1da5255b0..5795f5e5d3 100644 --- a/sysdeps/unix/arm/sysdep.S +++ b/sysdeps/unix/arm/sysdep.S @@ -43,7 +43,7 @@ syscall_error: #ifdef _LIBC_REENTRANT stmdb sp!, {r0, lr} /* put another copy of r0 at a specific errno location */ - bl __errno_location + bl C_SYMBOL_NAME(__errno_location) ldmia sp!, {r1, lr} str r1, [r0] #endif From dd5c62b1b390cc46b26f2f9a375a535adf9cd451 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 19 May 1998 16:12:29 +0000 Subject: [PATCH 1249/4487] Fix the "the the" problems. --- sysdeps/unix/bsd/hp/m68k/vfork.S | 2 +- sysdeps/unix/bsd/sun/m68k/vfork.S | 2 +- sysdeps/unix/bsd/vax/vfork.S | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/bsd/hp/m68k/vfork.S b/sysdeps/unix/bsd/hp/m68k/vfork.S index dc1137379d..18519ab6a0 100644 --- a/sysdeps/unix/bsd/hp/m68k/vfork.S +++ b/sysdeps/unix/bsd/hp/m68k/vfork.S @@ -23,7 +23,7 @@ #endif /* Clone the calling process, but without copying the whole address space. - The the calling process is suspended until the the new process exits or is + The calling process is suspended until the the new process exits or is replaced by a call to `execve'. Return -1 for errors, 0 to the new process, and the process ID of the new process to the old process. */ .globl ___vfork diff --git a/sysdeps/unix/bsd/sun/m68k/vfork.S b/sysdeps/unix/bsd/sun/m68k/vfork.S index 4de48b7920..e26466b075 100644 --- a/sysdeps/unix/bsd/sun/m68k/vfork.S +++ b/sysdeps/unix/bsd/sun/m68k/vfork.S @@ -23,7 +23,7 @@ #endif /* Clone the calling process, but without copying the whole address space. - The the calling process is suspended until the the new process exits or is + The calling process is suspended until the the new process exits or is replaced by a call to `execve'. Return -1 for errors, 0 to the new process, and the process ID of the new process to the old process. */ .globl ___vfork diff --git a/sysdeps/unix/bsd/vax/vfork.S b/sysdeps/unix/bsd/vax/vfork.S index ba670ac2a2..b132a67e9c 100644 --- a/sysdeps/unix/bsd/vax/vfork.S +++ b/sysdeps/unix/bsd/vax/vfork.S @@ -23,7 +23,7 @@ #endif /* Clone the calling process, but without copying the whole address space. - The the calling process is suspended until the the new process exits or is + The calling process is suspended until the the new process exits or is replaced by a call to `execve'. Return -1 for errors, 0 to the new process, and the process ID of the new process to the old process. */ .globl ___vfork From 7500ff18c7a2653429ea6428c5373e2b458a81ba Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 19 May 1998 16:12:40 +0000 Subject: [PATCH 1250/4487] Correct handling of arguments. --- sysdeps/unix/sysv/linux/arm/socket.S | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/arm/socket.S b/sysdeps/unix/sysv/linux/arm/socket.S index 1ebec9ca26..b51d887a7f 100644 --- a/sysdeps/unix/sysv/linux/arm/socket.S +++ b/sysdeps/unix/sysv/linux/arm/socket.S @@ -35,10 +35,26 @@ #define __socket P(__,socket) #endif +#define PUSHARGS_1 stmfd ip!, {a1} +#define PUSHARGS_2 stmfd ip!, {a1, a2} +#define PUSHARGS_3 stmfd ip!, {a1, a2, a3} +#define PUSHARGS_4 stmfd ip!, {a1, a2, a3, a4} +#define PUSHARGS_5 stmfd ip!, {a1, a2, a3, a4} /* Caller has already pushed arg 5 */ +#define PUSHARGS_6 stmfd ip!, {a1, a2, a3, a4} + +#ifndef NARGS +#define NARGS 3 /* If we were called with no wrapper, this is really socket() */ +#endif + .globl __socket ENTRY (__socket) + /* Push args onto the stack. */ + mov ip, sp + P(PUSHARGS_,NARGS) /* Do the system call trap. */ + mov a1, $P(SOCKOP_,socket) + mov a2, ip swi SYS_ify(socketcall) /* r0 is < 0 if there was an error. */ @@ -46,7 +62,7 @@ ENTRY (__socket) bhs PLTJMP(syscall_error) /* Successful; return the syscall's value. */ - RETINSTR(mov,pc,r14) + ret PSEUDO_END (__socket) From 06c1390edef0e63664fdd13437a817a9b09dc324 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 20 May 1998 14:34:42 +0000 Subject: [PATCH 1251/4487] Missed double occurences of "the the" in one line - fixed it. --- sysdeps/unix/bsd/hp/m68k/vfork.S | 2 +- sysdeps/unix/bsd/sun/m68k/vfork.S | 2 +- sysdeps/unix/bsd/vax/vfork.S | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/bsd/hp/m68k/vfork.S b/sysdeps/unix/bsd/hp/m68k/vfork.S index 18519ab6a0..33af14e06a 100644 --- a/sysdeps/unix/bsd/hp/m68k/vfork.S +++ b/sysdeps/unix/bsd/hp/m68k/vfork.S @@ -23,7 +23,7 @@ #endif /* Clone the calling process, but without copying the whole address space. - The calling process is suspended until the the new process exits or is + The calling process is suspended until the new process exits or is replaced by a call to `execve'. Return -1 for errors, 0 to the new process, and the process ID of the new process to the old process. */ .globl ___vfork diff --git a/sysdeps/unix/bsd/sun/m68k/vfork.S b/sysdeps/unix/bsd/sun/m68k/vfork.S index e26466b075..5b15db66c7 100644 --- a/sysdeps/unix/bsd/sun/m68k/vfork.S +++ b/sysdeps/unix/bsd/sun/m68k/vfork.S @@ -23,7 +23,7 @@ #endif /* Clone the calling process, but without copying the whole address space. - The calling process is suspended until the the new process exits or is + The calling process is suspended until the new process exits or is replaced by a call to `execve'. Return -1 for errors, 0 to the new process, and the process ID of the new process to the old process. */ .globl ___vfork diff --git a/sysdeps/unix/bsd/vax/vfork.S b/sysdeps/unix/bsd/vax/vfork.S index b132a67e9c..b2458cb3df 100644 --- a/sysdeps/unix/bsd/vax/vfork.S +++ b/sysdeps/unix/bsd/vax/vfork.S @@ -23,7 +23,7 @@ #endif /* Clone the calling process, but without copying the whole address space. - The calling process is suspended until the the new process exits or is + The calling process is suspended until the new process exits or is replaced by a call to `execve'. Return -1 for errors, 0 to the new process, and the process ID of the new process to the old process. */ .globl ___vfork From bde3fab6eeacba63c106df56e8f4b7ad5c8a4239 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Thu, 21 May 1998 01:18:56 +0000 Subject: [PATCH 1252/4487] * sysdeps/unix/sysv/linux/alpha/glob.c: Include sysdeps/generic/glob.c directly instead of include_next. Add missing semicolons. * sysdeps/unix/sysv/linux/alpha/oldglob.c: Include sys/types.h. Add missing semicolons. --- sysdeps/unix/sysv/linux/alpha/glob.c | 8 ++++---- sysdeps/unix/sysv/linux/alpha/oldglob.c | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/glob.c b/sysdeps/unix/sysv/linux/alpha/glob.c index 7bd516191d..59c42ae5fc 100644 --- a/sysdeps/unix/sysv/linux/alpha/glob.c +++ b/sysdeps/unix/sysv/linux/alpha/glob.c @@ -17,14 +17,14 @@ /* For Linux/Alpha we have to make the glob symbols versioned. */ #define glob(pattern, flags, errfunc, pglob) \ - __new_glob (pattern, flags, errfunc, pglob) \ + __new_glob (pattern, flags, errfunc, pglob) #define globfree(pglob) \ __new_globfree (pglob) -#include_next +#include #undef glob #undef globfree -default_symbol_version(__new_glob, glob, GLIBC_2.1) -default_symbol_version(__new_globfree, globfree, GLIBC_2.1) +default_symbol_version(__new_glob, glob, GLIBC_2.1); +default_symbol_version(__new_globfree, globfree, GLIBC_2.1); diff --git a/sysdeps/unix/sysv/linux/alpha/oldglob.c b/sysdeps/unix/sysv/linux/alpha/oldglob.c index 97284ab3e9..f405fbf2bc 100644 --- a/sysdeps/unix/sysv/linux/alpha/oldglob.c +++ b/sysdeps/unix/sysv/linux/alpha/oldglob.c @@ -17,6 +17,7 @@ /* This file contains only wrappers around the real glob functions. It became necessary since the glob_t structure changed. */ +#include #include #if defined PIC && DO_VERSIONING @@ -74,7 +75,7 @@ __old_glob (const char *pattern, int flags, return result; } -symbol_version(__old_glob, glob, GLIBC_2.0) +symbol_version(__old_glob, glob, GLIBC_2.0); /* Free storage allocated in PGLOB by a previous `glob' call. */ @@ -89,6 +90,6 @@ __old_globfree (old_glob_t *pglob) globfree (&correct); } -symbol_version(__old_globfree, globfree, GLIBC_2.0) +symbol_version(__old_globfree, globfree, GLIBC_2.0); #endif From 2e45c3aadd519be936a26f2b4248691a15bdd2c8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 21 May 1998 15:33:23 +0000 Subject: [PATCH 1253/4487] Replace stub file with real implementation. --- sysdeps/arm/fpu_control.h | 61 ++++++++++++++++++++++++++++++++++----- 1 file changed, 53 insertions(+), 8 deletions(-) diff --git a/sysdeps/arm/fpu_control.h b/sysdeps/arm/fpu_control.h index 054085d70a..8a2d338c49 100644 --- a/sysdeps/arm/fpu_control.h +++ b/sysdeps/arm/fpu_control.h @@ -1,5 +1,5 @@ -/* FPU control word definitions. Stub version. - Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* FPU control word definitions. ARM version. + Copyright (C) 1996, 1997, 1998 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,7 +20,54 @@ #ifndef _FPU_CONTROL_H #define _FPU_CONTROL_H -#define _FPU_RESERVED 0xffffffff /* These bits are reserved. */ +/* We have a slight terminology confusion here. On the ARM, the register + * we're interested in is actually the FPU status word - the FPU control + * word is something different (which is implementation-defined and only + * accessible from supervisor mode.) + * + * The FPSR looks like this: + * + * 31-24 23-16 15-8 7-0 + * | system ID | trap enable | system control | exception flags | + * + * We ignore the system ID bits; for interest's sake they are: + * + * 0000 "old" FPE + * 1000 FPPC hardware + * 0001 FPE 400 + * 1001 FPA hardware + * + * The trap enable and exception flags are both structured like this: + * + * 7 - 5 4 3 2 1 0 + * | reserved | INX | UFL | OFL | DVZ | IVO | + * + * where a `1' bit in the enable byte means that the trap can occur, and + * a `1' bit in the flags byte means the exception has occurred. + * + * The exceptions are: + * + * IVO - invalid operation + * DVZ - divide by zero + * OFL - overflow + * UFL - underflow + * INX - inexact (do not use; implementations differ) + * + * The system control byte looks like this: + * + * 7-5 4 3 2 1 0 + * | reserved | AC | EP | SO | NE | ND | + * + * where the bits mean + * + * ND - no denormalised numbers (force them all to zero) + * NE - enable NaN exceptions + * SO - synchronous operation + * EP - use expanded packed-decimal format + * AC - use alternate definition for C flag on compare operations + */ + +#define _FPU_RESERVED 0xfff0e0f0 /* These bits are reserved. */ /* The fdlibm code requires no interrupts for exceptions. Don't change the rounding mode, it would break long double I/O! */ @@ -29,11 +76,9 @@ /* Type of the control word. */ typedef unsigned int fpu_control_t; -/* Macros for accessing the hardware control word. - * On the ARM, we can't do this from user mode (it would trap). - */ -#define _FPU_GETCW(cw) __asm__ ("movnv r0,r0" : "=g" (cw)) -#define _FPU_SETCW(cw) __asm__ ("movnv r0,r0" : : "g" (cw)) +/* Macros for accessing the hardware control word. */ +#define _FPU_GETCW(cw) __asm__ ("rfs %0" : "=r" (cw)) +#define _FPU_SETCW(cw) __asm__ ("wfs %0" : : "r" (cw)) /* Default control word set at startup. */ extern fpu_control_t __fpu_control; From c34d3ba41f6f5c6370673917fed56dbf2a16e12b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 21 May 1998 15:39:28 +0000 Subject: [PATCH 1254/4487] FP CW and SW handling for Arm. --- sysdeps/arm/fpu/fclrexcpt.c | 39 +++++++++++++++++++++++++++++++++ sysdeps/arm/fpu/fegetenv.c | 29 ++++++++++++++++++++++++ sysdeps/arm/fpu/fegetround.c | 26 ++++++++++++++++++++++ sysdeps/arm/fpu/fesetenv.c | 33 ++++++++++++++++++++++++++++ sysdeps/arm/fpu/fesetround.c | 27 +++++++++++++++++++++++ sysdeps/arm/fpu/fraiseexcpt.c | 32 +++++++++++++++++++++++++++ sysdeps/arm/fpu/fsetexcptflag.c | 38 ++++++++++++++++++++++++++++++++ sysdeps/arm/fpu/ftestexcept.c | 32 +++++++++++++++++++++++++++ 8 files changed, 256 insertions(+) create mode 100644 sysdeps/arm/fpu/fclrexcpt.c create mode 100644 sysdeps/arm/fpu/fegetenv.c create mode 100644 sysdeps/arm/fpu/fegetround.c create mode 100644 sysdeps/arm/fpu/fesetenv.c create mode 100644 sysdeps/arm/fpu/fesetround.c create mode 100644 sysdeps/arm/fpu/fraiseexcpt.c create mode 100644 sysdeps/arm/fpu/fsetexcptflag.c create mode 100644 sysdeps/arm/fpu/ftestexcept.c diff --git a/sysdeps/arm/fpu/fclrexcpt.c b/sysdeps/arm/fpu/fclrexcpt.c new file mode 100644 index 0000000000..34ad36dfa8 --- /dev/null +++ b/sysdeps/arm/fpu/fclrexcpt.c @@ -0,0 +1,39 @@ +/* Clear given exceptions in current floating-point environment. + Copyright (C) 1997, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +void +feclearexcept (int excepts) +{ + unsigned long int temp; + + /* Mask out unsupported bits/exceptions. */ + excepts &= FE_ALL_EXCEPT; + + /* Get the current floating point status. */ + _FPU_GETCW(temp); + + /* Clear the relevant bits. */ + temp &= excepts ^ FE_ALL_EXCEPT; + + /* Put the new data in effect. */ + _FPU_SETCW(temp); +} diff --git a/sysdeps/arm/fpu/fegetenv.c b/sysdeps/arm/fpu/fegetenv.c new file mode 100644 index 0000000000..5b31c5e644 --- /dev/null +++ b/sysdeps/arm/fpu/fegetenv.c @@ -0,0 +1,29 @@ +/* Store current floating-point environment. + Copyright (C) 1997, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +void +fegetenv (fenv_t *envp) +{ + unsigned long int temp; + _FPU_GETCW(temp); + envp->cw = temp; +} diff --git a/sysdeps/arm/fpu/fegetround.c b/sysdeps/arm/fpu/fegetround.c new file mode 100644 index 0000000000..5f354bb4bb --- /dev/null +++ b/sysdeps/arm/fpu/fegetround.c @@ -0,0 +1,26 @@ +/* Return current rounding direction. + Copyright (C) 1997, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +fegetround (void) +{ + return FE_TONEAREST; /* Easy. :-) */ +} diff --git a/sysdeps/arm/fpu/fesetenv.c b/sysdeps/arm/fpu/fesetenv.c new file mode 100644 index 0000000000..b2d3ec5e9f --- /dev/null +++ b/sysdeps/arm/fpu/fesetenv.c @@ -0,0 +1,33 @@ +/* Install given floating-point environment. + Copyright (C) 1997, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +void +fesetenv (const fenv_t *envp) +{ + if (envp == FE_DFL_ENV) + _FPU_SETCW(_FPU_DEFAULT); + else + { + unsigned long temp = envp->cw; + _FPU_SETCW(temp); + } +} diff --git a/sysdeps/arm/fpu/fesetround.c b/sysdeps/arm/fpu/fesetround.c new file mode 100644 index 0000000000..7591b397e1 --- /dev/null +++ b/sysdeps/arm/fpu/fesetround.c @@ -0,0 +1,27 @@ +/* Set current rounding direction. + Copyright (C) 1997, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +fesetround (int round) +{ + /* We only support FE_TONEAREST, so there is no need for any work. */ + return (round == FE_TONEAREST)?1:0; +} diff --git a/sysdeps/arm/fpu/fraiseexcpt.c b/sysdeps/arm/fpu/fraiseexcpt.c new file mode 100644 index 0000000000..0fbfb16c94 --- /dev/null +++ b/sysdeps/arm/fpu/fraiseexcpt.c @@ -0,0 +1,32 @@ +/* Raise given exceptions. + Copyright (C) 1997, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include + +void +feraiseexcept (int excepts) +{ + /* Raise exceptions represented by EXPECTS. */ + fexcept_t temp; + _FPU_GETCW(temp); + temp |= (excepts & FE_ALL_EXCEPT); + _FPU_SETCW(temp); +} diff --git a/sysdeps/arm/fpu/fsetexcptflag.c b/sysdeps/arm/fpu/fsetexcptflag.c new file mode 100644 index 0000000000..f5c06a6f6c --- /dev/null +++ b/sysdeps/arm/fpu/fsetexcptflag.c @@ -0,0 +1,38 @@ +/* Set floating-point environment exception handling. + Copyright (C) 1997, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include + +void +fesetexceptflag (const fexcept_t *flagp, int excepts) +{ + fexcept_t temp; + + /* Get the current environment. */ + _FPU_GETCW(temp); + + /* Set the desired exception mask. */ + temp &= ~((excepts & FE_ALL_EXCEPT) << FE_EXCEPT_SHIFT); + temp |= (*flagp & excepts & FE_ALL_EXCEPT) << FE_EXCEPT_SHIFT; + + /* Save state back to the FPU. */ + _FPU_SETCW(temp); +} diff --git a/sysdeps/arm/fpu/ftestexcept.c b/sysdeps/arm/fpu/ftestexcept.c new file mode 100644 index 0000000000..691d3e1c8e --- /dev/null +++ b/sysdeps/arm/fpu/ftestexcept.c @@ -0,0 +1,32 @@ +/* Test exception in current environment. + Copyright (C) 1997, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +int +fetestexcept (int excepts) +{ + fexcept_t temp; + + /* Get current exceptions. */ + _FPU_GETCW(temp); + + return temp & excepts & FE_ALL_EXCEPT; +} From 3a5ade59c9e89b85cba4502578850847adb58e0e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 21 May 1998 15:39:52 +0000 Subject: [PATCH 1255/4487] Definitions for FPU handling header. --- sysdeps/arm/fpu/bits/fenv.h | 58 +++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 sysdeps/arm/fpu/bits/fenv.h diff --git a/sysdeps/arm/fpu/bits/fenv.h b/sysdeps/arm/fpu/bits/fenv.h new file mode 100644 index 0000000000..17b9702751 --- /dev/null +++ b/sysdeps/arm/fpu/bits/fenv.h @@ -0,0 +1,58 @@ +/* Copyright (C) 1997, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _FENV_H +# error "Never use directly; include instead." +#endif + +/* Define bits representing exceptions in the FPU status word. */ +enum + { + FE_INVALID = 1, +#define FE_INVALID FE_INVALID + FE_DIVBYZERO = 2, +#define FE_DIVBYZERO FE_DIVBYZERO + FE_OVERFLOW = 4, +#define FE_OVERFLOW FE_OVERFLOW + FE_UNDERFLOW = 8, +#define FE_UNDERFLOW FE_UNDERFLOW + }; + +/* Amount to shift by to convert an exception to a mask bit. */ +#define FE_EXCEPTION_SHIFT 16 + +/* All supported exceptions. */ +#define FE_ALL_EXCEPT \ + (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW) + +/* The ARM FPU basically only supports round-to-nearest. Other rounding + modes exist, but you have to encode them in the actual instruction. */ +#define FE_TONEAREST 0 + +/* Type representing exception flags. */ +typedef unsigned long fexcept_t; + +/* Type representing floating-point environment. */ +typedef struct + { + unsigned long cw; + } +fenv_t; + +/* If the default argument is used we use this value. */ +#define FE_DFL_ENV ((fenv_t *) -1l) From cad0799e9278e2c1a8141a0696b278e5ed3084a7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 24 May 1998 18:41:41 +0000 Subject: [PATCH 1256/4487] Set exception bits in Arm FPU. --- sysdeps/arm/fpu/fsetexcptflg.c | 38 ++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 sysdeps/arm/fpu/fsetexcptflg.c diff --git a/sysdeps/arm/fpu/fsetexcptflg.c b/sysdeps/arm/fpu/fsetexcptflg.c new file mode 100644 index 0000000000..f5c06a6f6c --- /dev/null +++ b/sysdeps/arm/fpu/fsetexcptflg.c @@ -0,0 +1,38 @@ +/* Set floating-point environment exception handling. + Copyright (C) 1997, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include + +void +fesetexceptflag (const fexcept_t *flagp, int excepts) +{ + fexcept_t temp; + + /* Get the current environment. */ + _FPU_GETCW(temp); + + /* Set the desired exception mask. */ + temp &= ~((excepts & FE_ALL_EXCEPT) << FE_EXCEPT_SHIFT); + temp |= (*flagp & excepts & FE_ALL_EXCEPT) << FE_EXCEPT_SHIFT; + + /* Save state back to the FPU. */ + _FPU_SETCW(temp); +} From 38843cb976d94a4351632bc7d89557fa3004da45 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 25 May 1998 11:27:09 +0000 Subject: [PATCH 1257/4487] Correctly renamed. --- sysdeps/arm/fpu/fsetexcptflag.c | 38 --------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 sysdeps/arm/fpu/fsetexcptflag.c diff --git a/sysdeps/arm/fpu/fsetexcptflag.c b/sysdeps/arm/fpu/fsetexcptflag.c deleted file mode 100644 index f5c06a6f6c..0000000000 --- a/sysdeps/arm/fpu/fsetexcptflag.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Set floating-point environment exception handling. - Copyright (C) 1997, 1998 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include -#include -#include - -void -fesetexceptflag (const fexcept_t *flagp, int excepts) -{ - fexcept_t temp; - - /* Get the current environment. */ - _FPU_GETCW(temp); - - /* Set the desired exception mask. */ - temp &= ~((excepts & FE_ALL_EXCEPT) << FE_EXCEPT_SHIFT); - temp |= (*flagp & excepts & FE_ALL_EXCEPT) << FE_EXCEPT_SHIFT; - - /* Save state back to the FPU. */ - _FPU_SETCW(temp); -} From e0ebc3b2efdd8ed600598fa589a151c7b74bfd03 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 29 May 1998 10:20:59 +0000 Subject: [PATCH 1258/4487] Use __ASSEMBLER__ test macro not ASSEMBLER. --- sysdeps/arm/sysdep.h | 4 ++-- sysdeps/m68k/sysdep.h | 4 ++-- sysdeps/mach/mips/sysdep.h | 2 +- sysdeps/unix/alpha/sysdep.h | 2 +- sysdeps/unix/bsd/hp/m68k/sysdep.h | 4 ++-- sysdeps/unix/bsd/osf/alpha/sysdep.h | 2 +- sysdeps/unix/bsd/sequent/i386/sysdep.h | 4 ++-- sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h | 2 +- sysdeps/unix/bsd/sun/m68k/sysdep.h | 4 ++-- sysdeps/unix/bsd/vax/sysdep.h | 4 ++-- sysdeps/unix/mips/sysdep.h | 2 +- sysdeps/unix/sysv/linux/alpha/sysdep.h | 2 +- sysdeps/unix/sysv/linux/arm/sysdep.h | 4 ++-- sysdeps/unix/sysv/linux/m68k/sysdep.h | 4 ++-- sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h | 4 ++-- 15 files changed, 24 insertions(+), 24 deletions(-) diff --git a/sysdeps/arm/sysdep.h b/sysdeps/arm/sysdep.h index eeef7aaded..4fc90aeed0 100644 --- a/sysdeps/arm/sysdep.h +++ b/sysdeps/arm/sysdep.h @@ -19,7 +19,7 @@ #include -#ifdef ASSEMBLER +#ifdef __ASSEMBLER__ /* Syntactic details of assembler. */ @@ -89,4 +89,4 @@ #define mcount _mcount #endif -#endif /* ASSEMBLER */ +#endif /* __ASSEMBLER__ */ diff --git a/sysdeps/m68k/sysdep.h b/sysdeps/m68k/sysdep.h index 58789f77b5..1770a09410 100644 --- a/sysdeps/m68k/sysdep.h +++ b/sysdeps/m68k/sysdep.h @@ -19,7 +19,7 @@ #include -#ifdef ASSEMBLER +#ifdef __ASSEMBLER__ /* Syntactic details of assembler. */ @@ -96,4 +96,4 @@ #define JUMPTARGET(name) name #endif -#endif /* ASSEMBLER */ +#endif /* __ASSEMBLER__ */ diff --git a/sysdeps/mach/mips/sysdep.h b/sysdeps/mach/mips/sysdep.h index a4e6dff148..7bacb02cf4 100644 --- a/sysdeps/mach/mips/sysdep.h +++ b/sysdeps/mach/mips/sysdep.h @@ -57,7 +57,7 @@ _start:\n\ #include -#if defined (ASSEMBLER) +#if defined (__ASSEMBLER__) #define ALIGN 2 diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h index e27909ad9b..f43c7f8edf 100644 --- a/sysdeps/unix/alpha/sysdep.h +++ b/sysdeps/unix/alpha/sysdep.h @@ -19,7 +19,7 @@ #include -#ifdef ASSEMBLER +#ifdef __ASSEMBLER__ #ifdef __linux__ # include diff --git a/sysdeps/unix/bsd/hp/m68k/sysdep.h b/sysdeps/unix/bsd/hp/m68k/sysdep.h index b0a8daa318..f173ce4d0d 100644 --- a/sysdeps/unix/bsd/hp/m68k/sysdep.h +++ b/sysdeps/unix/bsd/hp/m68k/sysdep.h @@ -20,7 +20,7 @@ #include -#ifdef ASSEMBLER +#ifdef __ASSEMBLER__ #define POUND # @@ -53,4 +53,4 @@ #define r1 d1 #define MOVE(x,y) movel x , y -#endif /* ASSEMBLER */ +#endif /* __ASSEMBLER__ */ diff --git a/sysdeps/unix/bsd/osf/alpha/sysdep.h b/sysdeps/unix/bsd/osf/alpha/sysdep.h index e9ad4d5fac..929dfc4013 100644 --- a/sysdeps/unix/bsd/osf/alpha/sysdep.h +++ b/sysdeps/unix/bsd/osf/alpha/sysdep.h @@ -22,7 +22,7 @@ #include -#ifdef ASSEMBLER +#ifdef __ASSEMBLER__ #include /* get PAL_callsys */ #include diff --git a/sysdeps/unix/bsd/sequent/i386/sysdep.h b/sysdeps/unix/bsd/sequent/i386/sysdep.h index c54193fec2..90f2ed09d4 100644 --- a/sysdeps/unix/bsd/sequent/i386/sysdep.h +++ b/sysdeps/unix/bsd/sequent/i386/sysdep.h @@ -19,7 +19,7 @@ #include -#ifdef ASSEMBLER +#ifdef __ASSEMBLER__ /* Get the symbols for system call interrupts. */ #include @@ -79,4 +79,4 @@ #undef scratch #define scratch %edx /* Call-clobbered register for random use. */ -#endif /* ASSEMBLER */ +#endif /* __ASSEMBLER__ */ diff --git a/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h b/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h index e459856ff9..28cf9e22d1 100644 --- a/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h +++ b/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h @@ -18,7 +18,7 @@ #include -#ifdef ASSEMBLER +#ifdef __ASSEMBLER__ #define POUND # diff --git a/sysdeps/unix/bsd/sun/m68k/sysdep.h b/sysdeps/unix/bsd/sun/m68k/sysdep.h index 1c501bcb5a..8bd3861e91 100644 --- a/sysdeps/unix/bsd/sun/m68k/sysdep.h +++ b/sysdeps/unix/bsd/sun/m68k/sysdep.h @@ -18,7 +18,7 @@ #include -#ifdef ASSEMBLER +#ifdef __ASSEMBLER__ #define POUND # @@ -59,4 +59,4 @@ #define r1 d1 #define MOVE(x,y) movel x , y -#endif /* ASSEMBLER */ +#endif /* __ASSEMBLER__ */ diff --git a/sysdeps/unix/bsd/vax/sysdep.h b/sysdeps/unix/bsd/vax/sysdep.h index a2cf00750f..19ab59b615 100644 --- a/sysdeps/unix/bsd/vax/sysdep.h +++ b/sysdeps/unix/bsd/vax/sysdep.h @@ -18,7 +18,7 @@ #include -#ifdef ASSEMBLER +#ifdef __ASSEMBLER__ #ifdef __STDC__ #define ENTRY(name) \ @@ -52,4 +52,4 @@ #define MOVE(x,y) movl x , y -#endif /* ASSEMBLER */ +#endif /* __ASSEMBLER__ */ diff --git a/sysdeps/unix/mips/sysdep.h b/sysdeps/unix/mips/sysdep.h index cbafbdcd9a..4514d07c66 100644 --- a/sysdeps/unix/mips/sysdep.h +++ b/sysdeps/unix/mips/sysdep.h @@ -19,7 +19,7 @@ #include -#ifdef ASSEMBLER +#ifdef __ASSEMBLER__ #include diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h index 6c88f76eaf..29d973f5b9 100644 --- a/sysdeps/unix/sysv/linux/alpha/sysdep.h +++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h @@ -17,7 +17,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifdef ASSEMBLER +#ifdef __ASSEMBLER__ #include #include diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index 14dd17c02a..381ce26979 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -33,7 +33,7 @@ #define SYS_ify(syscall_name) (__NR_##syscall_name) -#ifdef ASSEMBLER +#ifdef __ASSEMBLER__ /* Linux uses a negative return value to indicate syscall errors, unlike most Unices, which use the condition codes' carry flag. @@ -104,6 +104,6 @@ #define UNDOARGS_4 /* nothing */ #define UNDOARGS_5 ldr r4, [sp]; -#endif /* ASSEMBLER */ +#endif /* __ASSEMBLER__ */ #endif /* linux/arm/sysdep.h */ diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h index 4d9249d34d..8fdd26f52f 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -32,7 +32,7 @@ # define SYS_ify(syscall_name) __NR_/**/syscall_name #endif -#ifdef ASSEMBLER +#ifdef __ASSEMBLER__ /* Linux uses a negative return value to indicate syscall errors, unlike most Unices, which use the condition codes' carry flag. @@ -149,4 +149,4 @@ syscall_error: \ #define MOVE(x,y) movel x , y #endif -#endif /* ASSEMBLER */ +#endif /* __ASSEMBLER__ */ diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h index 7cc10fd44f..1530ff64d5 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h @@ -24,7 +24,7 @@ #include -#ifdef ASSEMBLER +#ifdef __ASSEMBLER__ /* As of gcc-2.6.0, it complains about pound signs in front of things that aren't arguments to the macro. So we use this to pull it off @@ -51,4 +51,4 @@ #define r1 %o1 #define MOVE(x,y) mov x, y -#endif /* ASSEMBLER */ +#endif /* __ASSEMBLER__ */ From c61de13d2c39df8cfd82e832fbaf2dda8c317e64 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 1 Jun 1998 13:37:18 +0000 Subject: [PATCH 1259/4487] Use C_SYMBOL_NAME when referring to errno and _errno. --- sysdeps/unix/sysv/linux/arm/sysdep.S | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.S b/sysdeps/unix/sysv/linux/arm/sysdep.S index 482535bea5..f6cb3e4648 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.S +++ b/sysdeps/unix/sysv/linux/arm/sysdep.S @@ -20,13 +20,15 @@ /* We define errno here, to be consistent with Linux/i386. */ .bss - .globl errno - .type errno,%object - .size errno,4 -errno: .zero 4 - .globl _errno - .type _errno,%object -_errno = errno /* This name is expected by hj's libc.so.5 startup code. */ + .globl C_SYMBOL_NAME(errno) + .type C_SYMBOL_NAME(errno),%object + .size C_SYMBOL_NAME(errno),4 +C_SYMBOL_NAME(errno): .zero 4 + .globl C_SYMBOL_NAME(_errno) + .type C_SYMBOL_NAME(_errno),%object +/* This name is expected by hj's libc.so.5 startup code. It seems to be needed + by pthreads as well. */ +C_SYMBOL_NAME(_errno) = C_SYMBOL_NAME(errno) .text /* The syscall stubs jump here when they detect an error. From 58e6626f7e4c3516ea36300764dfc6b2ef48d8bc Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 1 Jun 1998 13:38:03 +0000 Subject: [PATCH 1260/4487] ARM implementation of feholdexcept. --- sysdeps/arm/fpu/feholdexcpt.c | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 sysdeps/arm/fpu/feholdexcpt.c diff --git a/sysdeps/arm/fpu/feholdexcpt.c b/sysdeps/arm/fpu/feholdexcpt.c new file mode 100644 index 0000000000..5679ccc243 --- /dev/null +++ b/sysdeps/arm/fpu/feholdexcpt.c @@ -0,0 +1,37 @@ +/* Store current floating-point environment and clear exceptions. + Copyright (C) 1997, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +int +feholdexcept (fenv_t *envp) +{ + unsigned long int temp; + + /* Store the environment. */ + _FPU_GETCW(temp); + envp->cw = temp; + + /* Now set all exceptions to non-stop. */ + temp &= ~(FE_ALL_EXCEPT << FE_EXCEPT_SHIFT); + _FPU_SETCW(temp); + + return 1; +} From 6298404e7d58edd152b78e50c325c48076c94d53 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 1 Jun 1998 13:38:56 +0000 Subject: [PATCH 1261/4487] jmpbuf definition for ARM with FPU. --- sysdeps/arm/fpu/bits/setjmp.h | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 sysdeps/arm/fpu/bits/setjmp.h diff --git a/sysdeps/arm/fpu/bits/setjmp.h b/sysdeps/arm/fpu/bits/setjmp.h new file mode 100644 index 0000000000..895356fe0a --- /dev/null +++ b/sysdeps/arm/fpu/bits/setjmp.h @@ -0,0 +1,36 @@ +/* Copyright (C) 1997, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* Define the machine-dependent type `jmp_buf'. ARM version. */ + +#ifndef _SETJMP_H +# error "Never include directly; use instead." +#endif + +#ifndef _ASM +/* Jump buffer contains v1-v6, sl, fp, sp and pc. Other registers are not + saved. */ +typedef int __jmp_buf[22]; +#endif + +#define __JMP_BUF_SP 8 + +/* Test if longjmp to JMPBUF would unwind the frame + containing a local variable at ADDRESS. */ +#define _JMPBUF_UNWINDS(jmpbuf, address) \ + ((void *) (address) < (void *) (jmpbuf[__JMP_BUF_SP])) From 6f43b7998943291465d222ec4e64ba1983282375 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 1 Jun 1998 13:39:22 +0000 Subject: [PATCH 1262/4487] (__jmp_buf): Remove floating-point support. (_JMPBUF_UNWINDS): Added. --- sysdeps/arm/bits/setjmp.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/sysdeps/arm/bits/setjmp.h b/sysdeps/arm/bits/setjmp.h index ea25a9ba87..6d8737970b 100644 --- a/sysdeps/arm/bits/setjmp.h +++ b/sysdeps/arm/bits/setjmp.h @@ -23,10 +23,14 @@ #endif #ifndef _ASM -/* Jump buffer contains v1-v6, sl, fp, sp, pc and (f4-f7) if we do FP. */ -# if __ARM_USES_FP -typedef int __jmp_buf[22]; -# else +/* Jump buffer contains v1-v6, sl, fp, sp and pc. Other registers are not + saved. */ typedef int __jmp_buf[10]; -# endif #endif + +#define __JMP_BUF_SP 8 + +/* Test if longjmp to JMPBUF would unwind the frame + containing a local variable at ADDRESS. */ +#define _JMPBUF_UNWINDS(jmpbuf, address) \ + ((void *) (address) < (void *) (jmpbuf[__JMP_BUF_SP])) From 87386bad90da1952b3858d35d3daa24ba90d2bea Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 1 Jun 1998 14:23:26 +0000 Subject: [PATCH 1263/4487] (FE_EXCEPTION_SHIFT): Rename to FE_EXCEPT_SHIFT. --- sysdeps/arm/fpu/bits/fenv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/arm/fpu/bits/fenv.h b/sysdeps/arm/fpu/bits/fenv.h index 17b9702751..ca06196dda 100644 --- a/sysdeps/arm/fpu/bits/fenv.h +++ b/sysdeps/arm/fpu/bits/fenv.h @@ -34,7 +34,7 @@ enum }; /* Amount to shift by to convert an exception to a mask bit. */ -#define FE_EXCEPTION_SHIFT 16 +#define FE_EXCEPT_SHIFT 16 /* All supported exceptions. */ #define FE_ALL_EXCEPT \ From 5d3912ddbc0004ef6172e1de2d1c2a0ed04e5a20 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 1 Jun 1998 14:23:55 +0000 Subject: [PATCH 1264/4487] Not needed anymore. --- sysdeps/arm/bits/fenv.h | 90 ----------------------------------------- 1 file changed, 90 deletions(-) delete mode 100644 sysdeps/arm/bits/fenv.h diff --git a/sysdeps/arm/bits/fenv.h b/sysdeps/arm/bits/fenv.h deleted file mode 100644 index 3e4cdd3f3b..0000000000 --- a/sysdeps/arm/bits/fenv.h +++ /dev/null @@ -1,90 +0,0 @@ -/* Copyright (C) 1997, 1998 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _FENV_H -# error "Never use directly; include instead." -#endif - - -/* Define bits representing the exception. We use the bit positions - of the appropriate bits in the FPU control word. */ -enum - { - FE_INVALID = 0x01, -#define FE_INVALID FE_INVALID - __FE_DENORM = 0x02, - FE_DIVBYZERO = 0x04, -#define FE_DIVBYZERO FE_DIVBYZERO - FE_OVERFLOW = 0x08, -#define FE_OVERFLOW FE_OVERFLOW - FE_UNDERFLOW = 0x10, -#define FE_UNDERFLOW FE_UNDERFLOW - FE_INEXACT = 0x20 -#define FE_INEXACT FE_INEXACT - }; - -#define FE_ALL_EXCEPT \ - (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID) - -/* The ARM FPU supports all of the four defined rounding modes. We - use again the bit positions in the FPU control word as the values - for the appropriate macros. */ -enum - { - FE_TONEAREST = 0, -#define FE_TONEAREST FE_TONEAREST - FE_DOWNWARD = 0x400, -#define FE_DOWNWARD FE_DOWNWARD - FE_UPWARD = 0x800, -#define FE_UPWARD FE_UPWARD - FE_TOWARDSZERO = 0xc00 -#define FE_TOWARDSZERO FE_TOWARDSZERO - }; - - -/* Type representing exception flags. */ -typedef unsigned short int fexcept_t; - - -/* Type representing floating-point environment. This function corresponds - to the layout of the block written by the `fstenv'. */ -typedef struct - { - unsigned short int control_word; - unsigned short int __unused1; - unsigned short int status_word; - unsigned short int __unused2; - unsigned short int tags; - unsigned short int __unused3; - unsigned int eip; - unsigned short int cs_selector; - unsigned int opcode:11; - unsigned int __unused4:5; - unsigned int data_offset; - unsigned short int data_selector; - unsigned short int __unused5; - } -fenv_t; - -/* If the default argument is used we use this value. */ -#define FE_DFL_ENV ((fenv_t *) -1) - -#ifdef __USE_GNU -/* Floating-point environment where none of the exception is masked. */ -# define FE_NOMASK_ENV ((fenv_t *) -2) -#endif From 43ce7f2e75ba31af1167a6d1faf58588d9bb25ea Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 1 Jun 1998 14:24:49 +0000 Subject: [PATCH 1265/4487] IEEE 754 float support for strange ARMs. --- sysdeps/arm/fpu/ieee754.h | 115 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 sysdeps/arm/fpu/ieee754.h diff --git a/sysdeps/arm/fpu/ieee754.h b/sysdeps/arm/fpu/ieee754.h new file mode 100644 index 0000000000..73f7d6a376 --- /dev/null +++ b/sysdeps/arm/fpu/ieee754.h @@ -0,0 +1,115 @@ +/* Copyright (C) 1992, 1995, 1996, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _IEEE754_H + +#define _IEEE754_H 1 +#include + +#include + +__BEGIN_DECLS + +union ieee754_float + { + float f; + + /* This is the IEEE 754 single-precision format. */ + struct + { + unsigned int mantissa:23; + unsigned int exponent:8; + unsigned int negative:1; + } ieee; + + /* This format makes it easier to see if a NaN is a signalling NaN. */ + struct + { + unsigned int mantissa:22; + unsigned int quiet_nan:1; + unsigned int exponent:8; + unsigned int negative:1; + } ieee_nan; + }; + +#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */ + + +union ieee754_double + { + double d; + + /* This is the IEEE 754 double-precision format. */ + struct + { + unsigned int mantissa0:20; + unsigned int exponent:11; + unsigned int negative:1; + unsigned int mantissa1:32; + } ieee; + + /* This format makes it easier to see if a NaN is a signalling NaN. */ + struct + { + unsigned int mantissa0:19; + unsigned int quiet_nan:1; + unsigned int exponent:11; + unsigned int negative:1; + unsigned int mantissa1:32; + } ieee_nan; + }; + +#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */ + + +/* The following two structures are correct for `new' floating point systems but + wrong for the old FPPC. The only solution seems to be to avoid their use on + old hardware. */ + +union ieee854_long_double + { + long double d; + + /* This is the IEEE 854 double-extended-precision format. */ + struct + { + unsigned int exponent:15; + unsigned int empty:16; + unsigned int negative:1; + unsigned int mantissa1:32; + unsigned int mantissa0:32; + } ieee; + + /* This is for NaNs in the IEEE 854 double-extended-precision format. */ + struct + { + unsigned int exponent:15; + unsigned int empty:16; + unsigned int negative:1; + unsigned int mantissa1:32; + unsigned int mantissa0:30; + unsigned int quiet_nan:1; + unsigned int one:1; + } ieee_nan; + }; + +#define IEEE854_LONG_DOUBLE_BIAS 0x3fff + +__END_DECLS + +#endif /* ieee754.h */ From 54f119d17122398faccf7c9b19e48bcbc433edc7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 1 Jun 1998 14:25:31 +0000 Subject: [PATCH 1266/4487] GMP support for ARMs. --- sysdeps/arm/gmp-mparam.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 sysdeps/arm/gmp-mparam.h diff --git a/sysdeps/arm/gmp-mparam.h b/sysdeps/arm/gmp-mparam.h new file mode 100644 index 0000000000..e57f39cc1a --- /dev/null +++ b/sysdeps/arm/gmp-mparam.h @@ -0,0 +1,30 @@ +/* gmp-mparam.h -- Compiler/machine parameter header file. + +Copyright (C) 1991, 1993, 1994, 1995 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Library General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at your +option) any later version. + +The GNU MP 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 Library General Public +License for more details. + +You should have received a copy of the GNU Library General Public License +along with the GNU MP Library; see the file COPYING.LIB. If not, write to +the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +MA 02111-1307, USA. */ + +#define BITS_PER_MP_LIMB 32 +#define BYTES_PER_MP_LIMB 4 +#define BITS_PER_LONGINT 32 +#define BITS_PER_INT 32 +#define BITS_PER_SHORTINT 16 +#define BITS_PER_CHAR 8 + +#define IEEE_DOUBLE_BIG_ENDIAN 0 +#define IEEE_DOUBLE_MIXED_ENDIAN 1 From 6ff8d4938e3618e72fa3a477a9a249114d6cac59 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 7 Jun 1998 14:06:19 +0000 Subject: [PATCH 1267/4487] SysVr4 specific macros to convert from and to sigmask. --- sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h | 33 +++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h diff --git a/sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h b/sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h new file mode 100644 index 0000000000..4daab22bc5 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h @@ -0,0 +1,33 @@ +/* Convert between lowlevel sigmask and libc representation of sigset_t. + SysVr4 version. + Copyright (C) 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Joe Keane . + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#define sigset_set_old_mask(set, mask) \ + do { \ + unsigned long int *__ptr; \ + __ptr = &(set)->__sigbits[0]; \ + __ptr[0] = (mask); \ + __ptr[1] = 0ul; \ + __ptr[2] = 0ul; \ + __ptr[3] = 0ul; \ + } while (0) + +#define sigset_get_old_mask(set, mask) \ + ((mask) = (unsigned int) (set)->__sigbits[0]) From 7021745518b3d26170ba9718f8de8252a6b6b84f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 9 Jun 1998 15:13:18 +0000 Subject: [PATCH 1268/4487] Update for new draft ARM ELF ABI. --- sysdeps/arm/dl-machine.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 66b69d02db..e6a686e626 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -308,10 +308,10 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) /* Nonzero iff TYPE describes relocation of a PLT entry, so PLT entries should not be allowed to define the value. */ -#define elf_machine_lookup_noplt_p(type) ((type) == R_ARM_JMP_SLOT) +#define elf_machine_lookup_noplt_p(type) ((type) == R_ARM_JUMP_SLOT) /* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */ -#define ELF_MACHINE_JMP_SLOT R_ARM_JMP_SLOT +#define ELF_MACHINE_JMP_SLOT R_ARM_JUMP_SLOT /* The i386 never uses Elf32_Rela relocations. */ #define ELF_MACHINE_NO_RELA 1 @@ -397,7 +397,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, refsym->st_size)); break; case R_ARM_GLOB_DAT: - case R_ARM_JMP_SLOT: + case R_ARM_JUMP_SLOT: #if 0 #define _HEX(i) for (j=28; j>=0; j-=4) b[7-j/4]="0123456789abcdef"[((int)i>>j)&15]; @@ -429,7 +429,7 @@ __asm__ (" mov r0, #2; mov r1, %0; mov r2, #2; swi 0x00900004; " #endif *reloc_addr = value; break; - case R_ARM_32: + case R_ARM_ABS32: { #ifndef RTLD_BOOTSTRAP /* This is defined in rtld.c, but nowhere in the static @@ -450,7 +450,7 @@ __asm__ (" mov r0, #2; mov r1, %0; mov r2, #2; swi 0x00900004; " *reloc_addr += value; break; } - case R_ARM_PC26: + case R_ARM_PC24: *reloc_addr += (value - (Elf32_Addr) reloc_addr); break; default: @@ -466,7 +466,7 @@ elf_machine_lazy_rel (struct link_map *map, const Elf32_Rel *reloc) Elf32_Addr *const reloc_addr = (void *) (map->l_addr + reloc->r_offset); switch (ELF32_R_TYPE (reloc->r_info)) { - case R_ARM_JMP_SLOT: + case R_ARM_JUMP_SLOT: *reloc_addr += map->l_addr; break; default: From 08016d928b9ee7e595c3b99c5c899ddce1dc0261 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 10 Jun 1998 01:35:06 +0000 Subject: [PATCH 1269/4487] * sysdeps/m68k/dl-machine.h (elf_machine_runtime_setup): Set _dl_profile_map only if the name matches. (_dl_start_user): Remember stack address. * sysdeps/m68k/elf/start.S: Pass new argument to __libc_start_user. --- sysdeps/m68k/dl-machine.h | 13 ++++++++++--- sysdeps/m68k/elf/start.S | 4 ++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index fb32ce215a..3e574802c4 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. m68k version. - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998 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 @@ -92,8 +92,13 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) if (profile) { got[2] = (Elf32_Addr) &_dl_runtime_profile; - /* Say that we really want profiling and the timers are started. */ - _dl_profile_map = l; + + if (_dl_name_match_p (_dl_profile, l)) + { + /* This is the object we are looking for. Say that we really + want profiling and the timers are started. */ + _dl_profile_map = l; + } } else /* This function will get called to fix up the GOT entry indicated by @@ -161,6 +166,8 @@ asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \ move.l %d0, %a4 | Point %a5 at the GOT. lea _GLOBAL_OFFSET_TABLE_@GOTPC(%pc), %a5 + | Remember the highest stack address. + move.l %sp, ([__libc_stack_end@GOT.w, %a5]) | See if we were run as a command with the executable file | name as an extra leading argument. move.l ([_dl_skip_args@GOT.w, %a5]), %d0 diff --git a/sysdeps/m68k/elf/start.S b/sysdeps/m68k/elf/start.S index c1a5c2e48f..eefe75286e 100644 --- a/sysdeps/m68k/elf/start.S +++ b/sysdeps/m68k/elf/start.S @@ -50,6 +50,10 @@ _start: move.l %sp, %a0 /* The argument vector starts just at the current stack top. */ + /* Provide the highest stack address to the user code (for stacks + which grow downward). */ + pea (%sp) + pea (%a1) /* Push address of the shared library termination function. */ From 2cd493384a521ec39f953be4de1d3db511792857 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 10 Jun 1998 01:37:21 +0000 Subject: [PATCH 1270/4487] * sysdeps/unix/sysv/linux/m68k/sysdep.h (SYSCALL_ERROR_LABEL): New definition. (PSEUDO, SYSCALL_ERROR_HANDLER): Use it instead of syscall_error. * sysdeps/unix/sysv/linux/m68k/clone.S: Likewise. * sysdeps/unix/sysv/linux/m68k/mmap.S: Likewise. * sysdeps/unix/sysv/linux/m68k/socket.S: Likewise. * sysdeps/unix/sysv/linux/m68k/syscall.S: Likewise. --- sysdeps/unix/sysv/linux/m68k/clone.S | 8 ++++---- sysdeps/unix/sysv/linux/m68k/mmap.S | 4 ++-- sysdeps/unix/sysv/linux/m68k/socket.S | 4 ++-- sysdeps/unix/sysv/linux/m68k/syscall.S | 4 ++-- sysdeps/unix/sysv/linux/m68k/sysdep.h | 17 +++++++++++++---- 5 files changed, 23 insertions(+), 14 deletions(-) diff --git a/sysdeps/unix/sysv/linux/m68k/clone.S b/sysdeps/unix/sysv/linux/m68k/clone.S index d553ab78c6..622f8117ac 100644 --- a/sysdeps/unix/sysv/linux/m68k/clone.S +++ b/sysdeps/unix/sysv/linux/m68k/clone.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. Contributed by Andreas Schwab (schwab@issan.informatik.uni-dortmund.de) The GNU C Library is free software; you can redistribute it and/or @@ -32,10 +32,10 @@ ENTRY (__clone) movel #-EINVAL, %d0 movel 4(%sp), %a0 /* no NULL function pointers */ tstl %a0 - jeq syscall_error + jeq SYSCALL_ERROR_LABEL movel 8(%sp), %a1 /* no NULL stack pointers */ tstl %a1 - jeq syscall_error + jeq SYSCALL_ERROR_LABEL /* Allocate space and copy the argument onto the new stack. */ movel 16(%sp), -(%a1) @@ -48,7 +48,7 @@ ENTRY (__clone) exg %d2, %a1 /* restore %d2 */ tstl %d0 - jmi syscall_error + jmi SYSCALL_ERROR_LABEL jeq thread_start rts diff --git a/sysdeps/unix/sysv/linux/m68k/mmap.S b/sysdeps/unix/sysv/linux/m68k/mmap.S index 9563204977..94578311b3 100644 --- a/sysdeps/unix/sysv/linux/m68k/mmap.S +++ b/sysdeps/unix/sysv/linux/m68k/mmap.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998 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 @@ -32,7 +32,7 @@ ENTRY (__mmap) /* Kludge: negative numbers are among the legal return values. If %d0 is between -4096 and 0 then there was an error. */ cmp.l #-4096, %d0 - jhi syscall_error + jhi SYSCALL_ERROR_LABEL /* Successful; return the syscall's value. Copy it to %a0 because mmap is declared to return a pointer. */ diff --git a/sysdeps/unix/sysv/linux/m68k/socket.S b/sysdeps/unix/sysv/linux/m68k/socket.S index 81e5a213dd..f25a55b187 100644 --- a/sysdeps/unix/sysv/linux/m68k/socket.S +++ b/sysdeps/unix/sysv/linux/m68k/socket.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998 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 @@ -56,7 +56,7 @@ ENTRY (__socket) /* %d0 is < 0 if there was an error. */ tst.l %d0 - jmi syscall_error + jmi SYSCALL_ERROR_LABEL /* Successful; return the syscall's value. */ rts diff --git a/sysdeps/unix/sysv/linux/m68k/syscall.S b/sysdeps/unix/sysv/linux/m68k/syscall.S index f392b751fc..f34c07600f 100644 --- a/sysdeps/unix/sysv/linux/m68k/syscall.S +++ b/sysdeps/unix/sysv/linux/m68k/syscall.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1998 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,6 +28,6 @@ ENTRY (syscall) trap &0 /* Do the system call. */ UNDOARGS_5 /* Unfrob arguments. */ cmp.l &-4095, %d0 /* Check %d0 for error. */ - jcc syscall_error /* Jump to error handler if negative. */ + jcc SYSCALL_ERROR_LABEL /* Jump to error handler if negative. */ rts /* Return to caller. */ PSEUDO_END (syscall) diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h index 8fdd26f52f..4094172587 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -43,13 +43,22 @@ for a real error by making sure the value in %d0 is a real error number. Linus said he will make sure the no syscall returns a value in -1 .. -4095 as a valid result so we can savely test with -4095. */ + +/* We don't want the label for the error handler to be visible in the symbol + table when we define it here. */ +#ifdef PIC +#define SYSCALL_ERROR_LABEL .Lsyscall_error +#else +#define SYSCALL_ERROR_LABEL __syscall_error +#endif + #undef PSEUDO #define PSEUDO(name, syscall_name, args) \ .text; \ ENTRY (name) \ DO_CALL (syscall_name, args); \ cmp.l &-4095, %d0; \ - jcc syscall_error + jcc SYSCALL_ERROR_LABEL #undef PSEUDO_END #define PSEUDO_END(name) \ @@ -60,7 +69,7 @@ /* Store (- %d0) into errno through the GOT. */ #ifdef _LIBC_REENTRANT #define SYSCALL_ERROR_HANDLER \ -syscall_error: \ +SYSCALL_ERROR_LABEL: \ neg.l %d0; \ move.l %d0, -(%sp); \ jbsr __errno_location@PLTPC; \ @@ -70,9 +79,9 @@ syscall_error: \ a pointer (e.g., mmap). */ \ move.l %d0, %a0; \ rts; -#else +#else /* !_LIBC_REENTRANT */ #define SYSCALL_ERROR_HANDLER \ -syscall_error: \ +SYSCALL_ERROR_LABEL: \ move.l (errno@GOTPC, %pc), %a0; \ neg.l %d0; \ move.l %d0, (%a0); \ From c21b35ecda81666f8486bf8863bf47b4fc1bc14b Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 10 Jun 1998 05:27:41 +0000 Subject: [PATCH 1271/4487] * sysdeps/m68k/fpu/bits/mathinline.h: Define __ieee754_exp10 as inline. * sysdeps/m68k/fpu/e_exp10.c: New file. * sysdeps/m68k/fpu/e_exp10f.c: New file. * sysdeps/m68k/fpu/e_exp10l.c: New file. --- sysdeps/m68k/fpu/bits/mathinline.h | 1 + sysdeps/m68k/fpu/e_exp10.c | 2 ++ sysdeps/m68k/fpu/e_exp10f.c | 2 ++ sysdeps/m68k/fpu/e_exp10l.c | 2 ++ 4 files changed, 7 insertions(+) create mode 100644 sysdeps/m68k/fpu/e_exp10.c create mode 100644 sysdeps/m68k/fpu/e_exp10f.c create mode 100644 sysdeps/m68k/fpu/e_exp10l.c diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/fpu/bits/mathinline.h index 7ddf6aec2a..e5eb591e30 100644 --- a/sysdeps/m68k/fpu/bits/mathinline.h +++ b/sysdeps/m68k/fpu/bits/mathinline.h @@ -125,6 +125,7 @@ __inline_mathop(__ieee754_cosh, cosh) __inline_mathop(__ieee754_sinh, sinh) __inline_mathop(__ieee754_exp, etox) __inline_mathop(__ieee754_exp2, twotox) +__inline_mathop(__ieee754_exp10, tentox) __inline_mathop(__ieee754_log10, log10) __inline_mathop(__ieee754_log, logn) __inline_mathop(__ieee754_sqrt, sqrt) diff --git a/sysdeps/m68k/fpu/e_exp10.c b/sysdeps/m68k/fpu/e_exp10.c new file mode 100644 index 0000000000..a1dd224470 --- /dev/null +++ b/sysdeps/m68k/fpu/e_exp10.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_exp10 +#include diff --git a/sysdeps/m68k/fpu/e_exp10f.c b/sysdeps/m68k/fpu/e_exp10f.c new file mode 100644 index 0000000000..1b78bc3723 --- /dev/null +++ b/sysdeps/m68k/fpu/e_exp10f.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_exp10f +#include diff --git a/sysdeps/m68k/fpu/e_exp10l.c b/sysdeps/m68k/fpu/e_exp10l.c new file mode 100644 index 0000000000..5e901999fa --- /dev/null +++ b/sysdeps/m68k/fpu/e_exp10l.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_exp10l +#include From 7d3d725cc6bc9598290bdae0d311c29d9a509265 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 10 Jun 1998 10:58:58 +0000 Subject: [PATCH 1272/4487] Definitions for sigstack functions. --- sysdeps/unix/sysv/linux/alpha/bits/sigstack.h | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/sigstack.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sigstack.h b/sysdeps/unix/sysv/linux/alpha/bits/sigstack.h new file mode 100644 index 0000000000..bc993d130a --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/bits/sigstack.h @@ -0,0 +1,55 @@ +/* sigstack, sigaltstack definitions. + Copyright (C) 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SIGNAL_H +# error "Never include this file directly. Use instead" +#endif + + +/* Structure describing a signal stack (obsolete). */ +struct sigstack + { + __ptr_t ss_sp; /* Signal stack pointer. */ + int ss_onstack; /* Nonzero if executing on this stack. */ + }; + + +/* Possible values for `ss_flags.'. */ +enum +{ + SS_ONSTACK = 1, +#define SS_ONSTACK SS_ONSTACK + SS_DISABLE +#define SS_DISABLE SS_DISABLE +}; + +/* Minimum stack size for a signal handler. */ +#define MINSIGSTKSZ 4096 + +/* System default stack size. */ +#define SIGSTKSZ 16384 + + +/* Alternate, preferred interface. */ +typedef struct sigaltstack + { + __ptr_t ss_sp; + int ss_flags; + size_t ss_size; + } stack_t; From bb71df5f5f0aa99b085af18f1e52d438e2a32b89 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 15 Jun 1998 11:03:50 +0000 Subject: [PATCH 1273/4487] Add prototypes for the __new_* functions. --- sysdeps/unix/sysv/linux/alpha/glob.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/glob.c b/sysdeps/unix/sysv/linux/alpha/glob.c index 59c42ae5fc..69da879c20 100644 --- a/sysdeps/unix/sysv/linux/alpha/glob.c +++ b/sysdeps/unix/sysv/linux/alpha/glob.c @@ -21,6 +21,12 @@ #define globfree(pglob) \ __new_globfree (pglob) +/* We need prototypes for these new names. */ +extern int __new_glob (const char *__pattern, int __flags, + int (*__errfunc) (const char *, int), + glob_t *__pglob); +extern void __new_globfree (glob_t *__pglob); + #include #undef glob From a3a2cb21bea2b79e31a0dbbc735746f7b5f02156 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 17 Jun 1998 10:17:53 +0000 Subject: [PATCH 1274/4487] Include glob.h before defining prototypes. --- sysdeps/unix/sysv/linux/alpha/glob.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/glob.c b/sysdeps/unix/sysv/linux/alpha/glob.c index 69da879c20..02cb0a8706 100644 --- a/sysdeps/unix/sysv/linux/alpha/glob.c +++ b/sysdeps/unix/sysv/linux/alpha/glob.c @@ -15,6 +15,8 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include + /* For Linux/Alpha we have to make the glob symbols versioned. */ #define glob(pattern, flags, errfunc, pglob) \ __new_glob (pattern, flags, errfunc, pglob) From 1037e1f40a0e63aeddedf267326b76088f82be45 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 17 Jun 1998 17:59:03 +0000 Subject: [PATCH 1275/4487] Include sys/types.h before glob.h. --- sysdeps/unix/sysv/linux/alpha/glob.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/alpha/glob.c b/sysdeps/unix/sysv/linux/alpha/glob.c index 02cb0a8706..5baa0aea78 100644 --- a/sysdeps/unix/sysv/linux/alpha/glob.c +++ b/sysdeps/unix/sysv/linux/alpha/glob.c @@ -15,6 +15,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include #include /* For Linux/Alpha we have to make the glob symbols versioned. */ From 11c1d87fd25e30da3e7c9829c41c2e7a555c17d5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 18 Jun 1998 21:49:26 +0000 Subject: [PATCH 1276/4487] Add sigstack here. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 0b38038d46..ff73a6dc9f 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -16,6 +16,7 @@ semget - semget 3 __semget semget semctl - semctl 4 __semctl semctl osf_sigprocmask - osf_sigprocmask 2 __osf_sigprocmask +sigstack - sigstack 2 sigstack getpeername - getpeername 3 __getpeername getpeername getpriority - getpriority 2 __getpriority getpriority From b136e08ec044e1b1fe18504ba6ee277cf20d5120 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 27 Jun 1998 09:50:41 +0000 Subject: [PATCH 1277/4487] (elf): Kill -mno-fp-regs. --- sysdeps/alpha/Makefile | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile index 6cf4a173a6..250a31779c 100644 --- a/sysdeps/alpha/Makefile +++ b/sysdeps/alpha/Makefile @@ -31,12 +31,7 @@ endif ifeq ($(subdir),elf) # The ld.so startup code cannot use literals until it self-relocates. - ifeq ($(elf),yes) - CFLAGS-rtld.c = -mbuild-constants - endif -# The rest of ld.so shouldn't use FP regs for block moves so -# that the lazy link trampoline doesn't have to save them. -sysdep-CFLAGS += -mno-fp-regs +CFLAGS-rtld.c = -mbuild-constants endif divrem := divl divq reml remq From ca246d7eef9f78bf226abf3545a411054a659bef Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 27 Jun 1998 09:50:59 +0000 Subject: [PATCH 1278/4487] (elf_machine_runtime_setup): Only set _dl_profile_map if _dl_name_match_p. (RTLD_START): Fix .prologue. Set __libc_stack_end. --- sysdeps/alpha/dl-machine.h | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 455fd7b695..8f639a94b9 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -106,8 +106,13 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) else { *(Elf64_Addr *)(plt + 16) = (Elf64_Addr) &_dl_runtime_profile; - /* Say that we really want profiling and the timers are started. */ - _dl_profile_map = l; + + if (_dl_name_match_p (_dl_profile, l)) + { + /* This is the object we are looking for. Say that we really + want profiling and the timers are started. */ + _dl_profile_map = l; + } } /* Identify this shared object */ @@ -131,7 +136,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) " #tramp_name ": lda $sp, -168($sp) .frame $sp, 168, $26 - /* Preserve all registers that C normally doesn't. */ + /* Preserve all integer registers that C normally doesn't. */ stq $26, 0($sp) stq $0, 8($sp) stq $1, 16($sp) @@ -157,7 +162,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) /* Set up our $gp */ br $gp, .+4 ldgp $gp, 0($gp) - .prologue 1 + .prologue 0 /* Set up the arguments for fixup: */ /* $16 = link_map out of plt0 */ /* $17 = offset of reloc entry = ($28 - $27 - 20) /12 * 24 */ @@ -216,11 +221,13 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) #define RTLD_START asm ("\ .text + .set at .globl _start .ent _start _start: br $gp, 0f 0: ldgp $gp, 0($gp) + .prologue 0 /* Pass pointer to argument block to _dl_start. */ mov $sp, $16 bsr $26, "ASM_ALPHA_NG_SYMBOL_PREFIX"_dl_start..ng @@ -229,8 +236,12 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) .globl _dl_start_user .ent _dl_start_user _dl_start_user: + .frame $30,0,$31,0 + .prologue 0 /* Save the user entry point address in s0. */ mov $0, $9 + /* Store the highest stack address. */ + stq $30, __libc_stack_end /* See if we were run as a command with the executable file name as an extra leading argument. If so, adjust the stack pointer to skip _dl_skip_args words. */ @@ -253,15 +264,14 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) ldgp $gp, 0($26) br 1b 2: /* Clear the startup flag. */ - .set at stl $31, _dl_starting_up - .set noat /* Pass our finalizer function to the user in $0. */ lda $0, _dl_fini /* Jump to the user's entry point. */ mov $9, $27 jmp ($9) .end _dl_start_user + .set noat .previous"); /* Nonzero iff TYPE describes relocation of a PLT entry, so From 94cd6191cd790c4405bb1db18130534b7e44bcb3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 27 Jun 1998 09:51:18 +0000 Subject: [PATCH 1279/4487] Pass sp as arg 7. Kill __data_start. --- sysdeps/alpha/elf/start.S | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/sysdeps/alpha/elf/start.S b/sysdeps/alpha/elf/start.S index 1330d1fda2..ecb8174152 100644 --- a/sysdeps/alpha/elf/start.S +++ b/sysdeps/alpha/elf/start.S @@ -29,13 +29,14 @@ _start: mov zero, fp br gp, 1f 1: ldgp gp, 0(gp) + subq sp, 16, sp .prologue 1 /* Load address of the user's main function. */ lda a0, main - ldl a1, 0(sp) /* get argc */ - lda a2, 8(sp) /* get argv */ + ldl a1, 16(sp) /* get argc */ + lda a2, 24(sp) /* get argv */ /* Load address of our own entry points to .fini and .init. */ lda a3, _init @@ -44,10 +45,12 @@ _start: /* Store address of the shared library termination function. */ mov v0, a5 + /* Provide the highest stack address to the user code. */ + stq sp, 0(sp) + /* Call the user's main function, and exit with its value. - But let the libc call main. */ + But let the libc call main. */ jsr ra, __libc_start_main - ldgp gp, 0(ra) /* Die very horribly if exit returns. Call_pal hlt is callable from kernel mode only; this will result in an illegal instruction trap. */ @@ -56,16 +59,3 @@ _start: /* For ECOFF backwards compatibility. */ weak_alias(_start, __start) - -/* Define a symbol for the first piece of initialized data. */ - .data - .globl __data_start -__data_start: - .long 0 - -#ifdef __ELF__ - .size __data_start, 4 - .type __data_start, @object -#endif - -weak_alias(__data_start, data_start) From 035d42d2a0dc0c04000323721e9a474e776382ca Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 27 Jun 1998 09:51:32 +0000 Subject: [PATCH 1280/4487] (feraiseexcept): Mark tmp as early-clobber. --- sysdeps/alpha/fpu/fraiseexcpt.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sysdeps/alpha/fpu/fraiseexcpt.c b/sysdeps/alpha/fpu/fraiseexcpt.c index c2a96e3f87..9b61ddb843 100644 --- a/sysdeps/alpha/fpu/fraiseexcpt.c +++ b/sysdeps/alpha/fpu/fraiseexcpt.c @@ -39,28 +39,28 @@ feraiseexcept (int excepts) { /* One example of a invalid operation is 0 * Infinity. */ __asm__ __volatile__("mult/sui $f31,%1,%0; trapb" - : "=f"(tmp) : "f"(HUGE_VAL)); + : "=&f"(tmp) : "f"(HUGE_VAL)); } /* Next: division by zero. */ if (FE_DIVBYZERO & excepts) { __asm__ __volatile__("cmpteq $f31,$f31,%1; divt/sui %1,$f31,%0; trapb" - : "=f"(tmp), "=f"(dummy)); + : "=&f"(tmp), "=f"(dummy)); } /* Next: overflow. */ if (FE_OVERFLOW & excepts) { __asm__ __volatile__("mult/sui %1,%1,%0; trapb" - : "=f"(tmp) : "f"(DBL_MAX)); + : "=&f"(tmp) : "f"(DBL_MAX)); } /* Next: underflow. */ if (FE_UNDERFLOW & excepts) { __asm__ __volatile__("divt/sui %1,%2,%0; trapb" - : "=f"(tmp) : "f"(DBL_MIN), + : "=&f"(tmp) : "f"(DBL_MIN), "f"((double) (1UL << 60))); } @@ -68,6 +68,6 @@ feraiseexcept (int excepts) if (FE_INEXACT & excepts) { __asm__ __volatile__("divt/sui %1,%2,%0; trapb" - : "=f"(tmp) : "f"(1.0), "f"(M_PI)); + : "=&f"(tmp) : "f"(1.0), "f"(M_PI)); } } From 030d182c9349514aca3db9da9e151d04b0050e4d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 29 Jun 1998 12:43:07 +0000 Subject: [PATCH 1281/4487] Don't define __libc_pid. --- sysdeps/arm/init-first.c | 2 -- sysdeps/mach/hurd/mips/init-first.c | 5 +---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/sysdeps/arm/init-first.c b/sysdeps/arm/init-first.c index 7e6bcf79ff..87f9f0a749 100644 --- a/sysdeps/arm/init-first.c +++ b/sysdeps/arm/init-first.c @@ -25,8 +25,6 @@ extern void __libc_global_ctors (void); int __libc_multiple_libcs = 1; -pid_t __libc_pid; - static void init (int *data) { diff --git a/sysdeps/mach/hurd/mips/init-first.c b/sysdeps/mach/hurd/mips/init-first.c index a411a1b0e9..825b063c62 100644 --- a/sysdeps/mach/hurd/mips/init-first.c +++ b/sysdeps/mach/hurd/mips/init-first.c @@ -1,5 +1,5 @@ /* Initialization code run first thing by the ELF startup code. For Mips/Hurd. - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998 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 @@ -39,9 +39,6 @@ int __libc_multiple_libcs = 1; int __libc_argc; char **__libc_argv; -/* We often need the PID. Cache this value. */ -pid_t __libc_pid; - void *(*_cthread_init_routine) (void); /* Returns new SP to use. */ void (*_cthread_exit_routine) (int status) __attribute__ ((__noreturn__)); From 6cc7c3b3c00d869c85c41e9f50f8ae1736488789 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 30 Jun 1998 12:02:24 +0000 Subject: [PATCH 1282/4487] Include pthreadtypes.h. --- sysdeps/unix/sysv/linux/alpha/bits/types.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h index 70b7d7294f..699f14c8a2 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/types.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h @@ -107,4 +107,8 @@ typedef struct typedef int __t_scalar_t; typedef unsigned int __t_uscalar_t; + +/* Now add the thread types. */ +#include + #endif /* bits/types.h */ From 2e28d2fb791af0a1c9cfd145e768c4f433062690 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 30 Jun 1998 12:07:42 +0000 Subject: [PATCH 1283/4487] Define size_t. --- sysdeps/unix/sysv/linux/alpha/bits/types.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h index 699f14c8a2..276236d4f5 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/types.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h @@ -25,6 +25,9 @@ #include +#define __need_size_t +#include + /* Convenience types. */ typedef unsigned char __u_char; typedef unsigned short int __u_short; From ea8df133ccbba695c3ec06e6228099fb36e6ad35 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 30 Jun 1998 12:08:40 +0000 Subject: [PATCH 1284/4487] Include pthreadtypes.h. Define size_t. --- sysdeps/unix/sysv/linux/mips/bits/types.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h index 1d72de0321..313e96b480 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/types.h +++ b/sysdeps/unix/sysv/linux/mips/bits/types.h @@ -25,6 +25,9 @@ #include +#define __need_size_t +#include + /* Convenience types. */ typedef unsigned char __u_char; typedef unsigned short __u_short; @@ -131,4 +134,8 @@ typedef __loff_t __off64_t; typedef int __t_scalar_t; typedef unsigned int __t_uscalar_t; + +/* Now add the thread types. */ +#include + #endif /* bits/types.h */ From fd202ea4b7eac4b8f8fc151876e05802a9897304 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 1 Jul 1998 01:42:09 +0000 Subject: [PATCH 1285/4487] * sysdeps/unix/sysv/linux/m68k/sysdep.S: Make _errno a weak alias, not a strong alias. --- sysdeps/unix/sysv/linux/m68k/sysdep.S | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.S b/sysdeps/unix/sysv/linux/m68k/sysdep.S index 6008b23aa5..717122ca01 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.S +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.S @@ -30,9 +30,7 @@ .type errno,@object errno: .space 4 .size errno,4 - .globl _errno - .type _errno,@object -_errno = errno /* This name is expected by hj's libc.so.5 startup code. */ +weak_alias (errno, _errno) .text /* The following code is only used in the shared library when we From 4c01c1dcf2a424ba5dd592f4f5faf913e14038eb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 1 Jul 1998 09:33:01 +0000 Subject: [PATCH 1286/4487] Make _errno a weak alias, not a strong alias. --- sysdeps/unix/sysv/linux/arm/sysdep.S | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.S b/sysdeps/unix/sysv/linux/arm/sysdep.S index f6cb3e4648..872ed4b555 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.S +++ b/sysdeps/unix/sysv/linux/arm/sysdep.S @@ -24,11 +24,7 @@ .type C_SYMBOL_NAME(errno),%object .size C_SYMBOL_NAME(errno),4 C_SYMBOL_NAME(errno): .zero 4 - .globl C_SYMBOL_NAME(_errno) - .type C_SYMBOL_NAME(_errno),%object -/* This name is expected by hj's libc.so.5 startup code. It seems to be needed - by pthreads as well. */ -C_SYMBOL_NAME(_errno) = C_SYMBOL_NAME(errno) +weak_alias (C_SYMBOL_NAME(errno), C_SYMBOL_NAME(_errno)) .text /* The syscall stubs jump here when they detect an error. From 1b1f0c36e3d9a8a9e260d7a11ecda3eb4c1d9c61 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 2 Jul 1998 22:33:35 +0000 Subject: [PATCH 1287/4487] Version definitions. --- sysdeps/alpha/Versions | 7 ++++ sysdeps/alpha/fpu/Versions | 6 ++++ sysdeps/unix/sysv/linux/alpha/Versions | 49 ++++++++++++++++++++++++++ sysdeps/unix/sysv/linux/mips/Versions | 9 +++++ 4 files changed, 71 insertions(+) create mode 100644 sysdeps/alpha/Versions create mode 100644 sysdeps/alpha/fpu/Versions create mode 100644 sysdeps/unix/sysv/linux/alpha/Versions create mode 100644 sysdeps/unix/sysv/linux/mips/Versions diff --git a/sysdeps/alpha/Versions b/sysdeps/alpha/Versions new file mode 100644 index 0000000000..c7c1f047f6 --- /dev/null +++ b/sysdeps/alpha/Versions @@ -0,0 +1,7 @@ +libc { + GLIBC_2.0 { + # functions with special/multiple interfaces + __divqu; __remqu; __divqs; __remqs; __divlu; __remlu; __divls; + __remls; __divl; __reml; __divq; __remq; __divqu; __remqu; + } +} diff --git a/sysdeps/alpha/fpu/Versions b/sysdeps/alpha/fpu/Versions new file mode 100644 index 0000000000..fa3d810c74 --- /dev/null +++ b/sysdeps/alpha/fpu/Versions @@ -0,0 +1,6 @@ +libc { + GLIBC_2.0 { + # functions used in other libraries + __ieee_get_fp_control; __ieee_set_fp_control; + } +} diff --git a/sysdeps/unix/sysv/linux/alpha/Versions b/sysdeps/unix/sysv/linux/alpha/Versions new file mode 100644 index 0000000000..ad490400fb --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/Versions @@ -0,0 +1,49 @@ +libc { + GLIBC_2.0 { + # Unfortunately in wider use. + _inb; _inw; _inl; _outb; _outw; _outl; _bus_base; _bus_base_sparse; + _hae_shift; + + # b* + bus_base; bus_base_sparse; + + # h* + hae_shift; + + # i* + inb; inl; inw; ioperm; iopl; + + # o* + outb; outl; outw; + + # p* + pciconfig_read; pciconfig_write; sethae; + } + GLIBC_2.1 { + # Linux/Alpha 64-bit timeval functions. + __select; select; + adjtime; adjtimex; __adjtimex; + __gettimeofday; + + # glob interface change + glob; globfree; + + # limit type change + getrusage; + + # time type change + gettimeofday; + + # i* + ieee_get_fp_control; ieee_set_fp_control; + + # s* + setitimer; settimeofday; + + # u* + utimes; + + # w* + wait4; + } +} diff --git a/sysdeps/unix/sysv/linux/mips/Versions b/sysdeps/unix/sysv/linux/mips/Versions new file mode 100644 index 0000000000..11614a4cd5 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/Versions @@ -0,0 +1,9 @@ +libc { + GLIBC_2.0 { + # c* + cachectl; cacheflush; + + # s* + sysmips; + } +} From 468c277aafa5a814c47073e7d521a52f09496727 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 3 Jul 1998 05:37:32 +0000 Subject: [PATCH 1288/4487] * sysdeps/unix/sysv/linux/m68k/Versions: New file. --- sysdeps/unix/sysv/linux/m68k/Versions | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/Versions diff --git a/sysdeps/unix/sysv/linux/m68k/Versions b/sysdeps/unix/sysv/linux/m68k/Versions new file mode 100644 index 0000000000..d996b2478e --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/Versions @@ -0,0 +1,6 @@ +libc { + GLIBC_2.0 { + # c* + cacheflush; + } +} From 5fc184edcc9d4d1c36066356e9b1695bc668ea0f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 4 Jul 1998 14:37:17 +0000 Subject: [PATCH 1289/4487] List only one file per line. --- sysdeps/alpha/Dist | 5 ++++- sysdeps/m68k/fpu/switch/Dist | 3 ++- sysdeps/unix/sysv/irix4/Dist | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/sysdeps/alpha/Dist b/sysdeps/alpha/Dist index 0807ce1e69..46cf351e82 100644 --- a/sysdeps/alpha/Dist +++ b/sysdeps/alpha/Dist @@ -1,5 +1,8 @@ divrem.h -divl.S divq.S reml.S remq.S +divl.S +divq.S +reml.S +remq.S _mcount.S stxcpy.S stxncpy.S diff --git a/sysdeps/m68k/fpu/switch/Dist b/sysdeps/m68k/fpu/switch/Dist index 1e00e4cd07..9288bddaa5 100644 --- a/sysdeps/m68k/fpu/switch/Dist +++ b/sysdeps/m68k/fpu/switch/Dist @@ -1 +1,2 @@ -68881-sw.h switch.c +68881-sw.h +switch.c diff --git a/sysdeps/unix/sysv/irix4/Dist b/sysdeps/unix/sysv/irix4/Dist index cf0a898e53..09026af264 100644 --- a/sysdeps/unix/sysv/irix4/Dist +++ b/sysdeps/unix/sysv/irix4/Dist @@ -1 +1,2 @@ -__handler.S sigtramp.c +__handler.S +sigtramp.c From 51d02d34a552e4fb405e339ff902624e87341dbd Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 5 Jul 1998 08:22:32 +0000 Subject: [PATCH 1290/4487] Not needed anymore. --- sysdeps/unix/sysv/linux/arm/syscall.S | 47 --------------------------- 1 file changed, 47 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/arm/syscall.S diff --git a/sysdeps/unix/sysv/linux/arm/syscall.S b/sysdeps/unix/sysv/linux/arm/syscall.S deleted file mode 100644 index bc2bc7dbaa..0000000000 --- a/sysdeps/unix/sysv/linux/arm/syscall.S +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include - -/* Please consult the file sysdeps/unix/sysv/linux/arm/sysdep.h for - more information about the value -4095 used below.*/ - - .text -ENTRY (syscall) - - /* Normally encoding the system call number in the instruction is - good. But we pay the price here. */ - - sub sp, sp, $0xc @ get 3 words on the stack - orr r0, r0, $0xef000000 @ make up a SWI instruction - orr r0, r0, $SWI_BASE - str r0, [sp] - ldr r0, _reti - str r0, [sp, $4] - adr r0, _ret - str r0, [sp, $8] - mov r0, r1 - mov r1, r2 - mov r2, r3 - mov pc, sp -_ret: add sp, sp, $0xc - RETINSTR(mov, pc, r14) - -_reti: .word 0xe51ff004 @ ldr pc, [pc, $4] - -PSEUDO_END (syscall) From d0b4f6bb0b448400addd061527e3fa763579a955 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 5 Jul 1998 08:23:19 +0000 Subject: [PATCH 1291/4487] Add `syscall'. --- sysdeps/unix/sysv/linux/arm/syscalls.list | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/arm/syscalls.list b/sysdeps/unix/sysv/linux/arm/syscalls.list index 392a257194..a3ecdd7d73 100644 --- a/sysdeps/unix/sysv/linux/arm/syscalls.list +++ b/sysdeps/unix/sysv/linux/arm/syscalls.list @@ -4,3 +4,4 @@ s_getgroups getgroups getgroups 2 __syscall_getgroups s_llseek llseek _llseek 5 __sys_llseek s_setgroups setgroups setgroups 2 __syscall_setgroups vm86 - vm86 1 __vm86 vm86 +syscall - syscall 5 syscall From 22bf6f34489b35e750857e72b035f1dddec0632e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 5 Jul 1998 14:45:16 +0000 Subject: [PATCH 1292/4487] File name for sendmsg and recvmsg syscalls is __ protected. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index ff73a6dc9f..c7a80f9ec9 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -45,10 +45,10 @@ getsockopt - getsockopt 5 __getsockopt getsockopt listen - listen 2 __listen listen recv - recv 4 __libc_recv __recv recv recvfrom - recvfrom 6 __libc_recvfrom __recvfrom recvfrom -recvmsg - recvmsg 3 __libc_recvmsg __recvmsg recvmsg +__recvmsg - recvmsg 3 __libc_recvmsg __recvmsg recvmsg ptrace - ptrace 4 __ptrace ptrace send - send 4 __libc_send __send send -sendmsg - sendmsg 3 __libc_sendmsg __sendmsg sendmsg +__sendmsg - sendmsg 3 __libc_sendmsg __sendmsg sendmsg sendto - sendto 6 __libc_sendto __sendto sendto setsockopt - setsockopt 5 __setsockopt setsockopt shutdown - shutdown 2 __shutdown shutdown From 1b99d03e6a9aa82dab306c98c09c8b3fb15a1cdf Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 5 Jul 1998 15:22:20 +0000 Subject: [PATCH 1293/4487] Define __syscall_recvmsg and __syscall_sendmsg. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index c7a80f9ec9..ef14984cc2 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -45,10 +45,10 @@ getsockopt - getsockopt 5 __getsockopt getsockopt listen - listen 2 __listen listen recv - recv 4 __libc_recv __recv recv recvfrom - recvfrom 6 __libc_recvfrom __recvfrom recvfrom -__recvmsg - recvmsg 3 __libc_recvmsg __recvmsg recvmsg +__recvmsg - recvmsg 3 __syscall_recvmsg ptrace - ptrace 4 __ptrace ptrace send - send 4 __libc_send __send send -__sendmsg - sendmsg 3 __libc_sendmsg __sendmsg sendmsg +__sendmsg - sendmsg 3 __syscall_sendmsg sendto - sendto 6 __libc_sendto __sendto sendto setsockopt - setsockopt 5 __setsockopt setsockopt shutdown - shutdown 2 __shutdown shutdown From 668a0ed59b670db8fb4125717acd10007ae340f8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 8 Jul 1998 22:45:07 +0000 Subject: [PATCH 1294/4487] Handle Linux/Alpha specific cases. --- sysdeps/unix/sysv/linux/alpha/fpathconf.c | 64 +++++++++++++++++++++++ sysdeps/unix/sysv/linux/alpha/pathconf.c | 57 ++++++++++++++++++++ 2 files changed, 121 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/fpathconf.c create mode 100644 sysdeps/unix/sysv/linux/alpha/pathconf.c diff --git a/sysdeps/unix/sysv/linux/alpha/fpathconf.c b/sysdeps/unix/sysv/linux/alpha/fpathconf.c new file mode 100644 index 0000000000..d8c428dcda --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/fpathconf.c @@ -0,0 +1,64 @@ +/* Copyright (C) 1991, 1995, 1996, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include +#include +#include + +#define EXT2_SUPER_MAGIC 0xef53 +#define UFS_MAGIC 0x00011954 +#define UFS_CIGAM 0x54190100 /* byteswapped MAGIC */ + +static long int default_fpathconf (int fd, int name); + +/* Get file-specific information about descriptor FD. */ +long int +__fpathconf (fd, name) + int fd; + int name; +{ + if (fd < 0) + { + __set_errno (EBADF); + return -1; + } + + if (name == _PC_FILESIZEBITS) + { + /* Test whether this is on a ext2 filesystem which supports large + files. */ + struct statfs fs; + + if (__fstatfs (fd, &fs) < 0 + || (fs.f_type != EXT2_SUPER_MAGIC + && fs.f_type != UFS_MAGIC + && fs.f_type != UFS_CIGAM)) + return 32; + + /* This filesystem supported files >2GB. */ + return 64; + } + + /* Fallback to the generic version. */ + return default_fpathconf (fd, name); +} + +#define __fpathconf static default_fpathconf +#include diff --git a/sysdeps/unix/sysv/linux/alpha/pathconf.c b/sysdeps/unix/sysv/linux/alpha/pathconf.c new file mode 100644 index 0000000000..91ca0942fb --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/pathconf.c @@ -0,0 +1,57 @@ +/* Copyright (C) 1991, 1995, 1996, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include +#include +#include +#include + +#define EXT2_SUPER_MAGIC 0xef53 +#define UFS_MAGIC 0x00011954 +#define UFS_CIGAM 0x54190100 /* byteswapped MAGIC */ + +static long int default_pathconf (const char *path, int name); + +/* Get file-specific information about PATH. */ +long int +__pathconf (const char *path, int name) +{ + if (name == _PC_FILESIZEBITS) + { + /* Test whether this is on a ext2 or UFS filesystem which + support large files. */ + struct statfs fs; + + if (__statfs (path, &fs) < 0 + || (fs.f_type != EXT2_SUPER_MAGIC + && fs.f_type != UFS_MAGIC + && fs.f_type != UFS_CIGAM)) + return 32; + + /* This filesystem supported files >2GB. */ + return 64; + } + + /* Fallback to the generic version. */ + return default_pathconf (path, name); +} + +#define __pathconf static default_pathconf +#include From bb3ebfdb47bc88c9b2a6a6e043140dabc24086f6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 8 Jul 1998 22:52:22 +0000 Subject: [PATCH 1295/4487] Define __intptr_t. --- sysdeps/unix/sysv/linux/alpha/bits/types.h | 3 +++ sysdeps/unix/sysv/linux/mips/bits/types.h | 3 +++ sysdeps/unix/sysv/sysv4/solaris2/bits/types.h | 3 +++ 3 files changed, 9 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h index 276236d4f5..d4f2217f05 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/types.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h @@ -110,6 +110,9 @@ typedef struct typedef int __t_scalar_t; typedef unsigned int __t_uscalar_t; +/* Duplicates info from stdint.h but this is used in unistd.h. */ +typedef long int __intptr_t; + /* Now add the thread types. */ #include diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h index 313e96b480..2bb8a2a9c6 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/types.h +++ b/sysdeps/unix/sysv/linux/mips/bits/types.h @@ -134,6 +134,9 @@ typedef __loff_t __off64_t; typedef int __t_scalar_t; typedef unsigned int __t_uscalar_t; +/* Duplicates info from stdint.h but this is used in unistd.h. */ +typedef int __intptr_t; + /* Now add the thread types. */ #include diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h index 44e343ab1c..e25dec98fb 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h @@ -115,4 +115,7 @@ typedef __u_quad_t __fsfilcnt64_t; typedef int __t_scalar_t; typedef unsigned int __t_uscalar_t; +/* Duplicates info from stdint.h but this is used in unistd.h. */ +typedef long int __intptr_t; + #endif /* bits/types.h */ From b814210938cf77056463972f67b4b055d44526d3 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 13 Jul 1998 01:30:40 +0000 Subject: [PATCH 1296/4487] * sysdeps/unix/sysv/linux/m68k/dl-envvars.h: New file. --- sysdeps/unix/sysv/linux/m68k/dl-envvars.h | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/dl-envvars.h diff --git a/sysdeps/unix/sysv/linux/m68k/dl-envvars.h b/sysdeps/unix/sysv/linux/m68k/dl-envvars.h new file mode 100644 index 0000000000..1e8b870c6a --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/dl-envvars.h @@ -0,0 +1 @@ +#include From 30437816c1e1f7353598471cb5dd16d9dfbc7ebc Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 15 Jul 1998 09:20:20 +0000 Subject: [PATCH 1297/4487] Define LOC. --- sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h index 1530ff64d5..a21672b115 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1994, 1995, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1994, 1995, 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -51,4 +51,6 @@ #define r1 %o1 #define MOVE(x,y) mov x, y +#define LOC(name) .##L##name + #endif /* __ASSEMBLER__ */ From c7a8ebca130caccbe8e85fbf3e64fe947a22438f Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 17 Jul 1998 04:26:22 +0000 Subject: [PATCH 1298/4487] This belongs to the 2.0 branch. --- sysdeps/unix/sysv/linux/m68k/dl-envvars.h | 1 - 1 file changed, 1 deletion(-) delete mode 100644 sysdeps/unix/sysv/linux/m68k/dl-envvars.h diff --git a/sysdeps/unix/sysv/linux/m68k/dl-envvars.h b/sysdeps/unix/sysv/linux/m68k/dl-envvars.h deleted file mode 100644 index 1e8b870c6a..0000000000 --- a/sysdeps/unix/sysv/linux/m68k/dl-envvars.h +++ /dev/null @@ -1 +0,0 @@ -#include From 08bd971f1511a33867b7ff24c57fa16ea4d3589c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 17 Jul 1998 12:35:52 +0000 Subject: [PATCH 1299/4487] Define SIG_HOLD. --- sysdeps/unix/sysv/sysv4/solaris2/bits/signum.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/signum.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/signum.h index 4e5576425b..33a040b529 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/bits/signum.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/signum.h @@ -1,5 +1,5 @@ /* Signal number definitions. Solaris 2 version. - Copyright (C) 1994, 1996 Free Software Foundation, Inc. + Copyright (C) 1994, 1996, 1998 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,6 +23,9 @@ #define SIG_ERR ((__sighandler_t) -1) /* Error return. */ #define SIG_DFL ((__sighandler_t) 0) /* Default action. */ #define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */ +#ifdef __USE_UNIX98 +# define SIG_HOLD ((__sighandler_t) 2) /* Add signal to hold mask. */ +#endif /* Signals. */ From 5044b71144fedebeba179c2e330aa9d2470ea30c Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 20 Jul 1998 04:59:31 +0000 Subject: [PATCH 1300/4487] New file. --- sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h diff --git a/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h b/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h new file mode 100644 index 0000000000..6b6f711aa7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h @@ -0,0 +1,23 @@ +/* Copyright (C) 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1998. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#define SIGCONTEXT int code, struct sigcontext * +#define GET_PC(ctx) ((void *) (ctx)->sc_pc) +#define GET_FRAME(ctx) ((void *) __builtin_frame_address (1)) +#define GET_STACK(ctx) ((void *) (ctx)->sc_usp) From 67aeaca9ac4e232fda3b6089094315d28724130c Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 20 Jul 1998 05:01:08 +0000 Subject: [PATCH 1301/4487] Support NO_WEAK_ALIAS. --- sysdeps/unix/sysv/linux/m68k/socket.S | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sysdeps/unix/sysv/linux/m68k/socket.S b/sysdeps/unix/sysv/linux/m68k/socket.S index f25a55b187..767665cac7 100644 --- a/sysdeps/unix/sysv/linux/m68k/socket.S +++ b/sysdeps/unix/sysv/linux/m68k/socket.S @@ -32,7 +32,11 @@ The .S files for the other calls just #define socket and #include this. */ #ifndef __socket +#ifndef NO_WEAK_ALIAS #define __socket P(__,socket) +#else +#define __socket socket +#endif #endif .globl __socket @@ -62,4 +66,6 @@ ENTRY (__socket) rts PSEUDO_END (__socket) +#ifndef NO_WEAK_ALIAS weak_alias (__socket, socket) +#endif From 56984f464836c76eb6e71b327f3dc5341e8d604d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 20 Jul 1998 17:18:32 +0000 Subject: [PATCH 1302/4487] Fix typo. --- sysdeps/arm/dl-machine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index e6a686e626..7612285907 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -313,7 +313,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) /* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */ #define ELF_MACHINE_JMP_SLOT R_ARM_JUMP_SLOT -/* The i386 never uses Elf32_Rela relocations. */ +/* The ARM never uses Elf32_Rela relocations. */ #define ELF_MACHINE_NO_RELA 1 /* We define an initialization functions. This is called very early in From 9a7807b9e64cbc88052beba4114c9dca9a9cc631 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 20 Jul 1998 17:22:34 +0000 Subject: [PATCH 1303/4487] sigpending implemtation for Solaris. --- sysdeps/unix/sysv/sysv4/solaris2/sigpending.c | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/solaris2/sigpending.c diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sigpending.c b/sysdeps/unix/sysv/sysv4/solaris2/sigpending.c new file mode 100644 index 0000000000..4e1ce0eb58 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/solaris2/sigpending.c @@ -0,0 +1,37 @@ +/* Copyright (C) 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include + +extern int __syscall_sigpending (int subcode, sigset_t *set); + + +/* Store in SET all signals that are blocked and pending. */ +int +sigpending (sigset_t *set) +{ + if (set == NULL) + { + __set_errno (EINVAL); + return -1; + } + + return __syscall_sigpending (1, set); +} From ea30d3fea7bd6f999f2d3a5f355209584ac62bbb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 20 Jul 1998 17:22:38 +0000 Subject: [PATCH 1304/4487] sigstack implemtation for Solaris. --- sysdeps/unix/sysv/sysv4/solaris2/sigstack.c | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/solaris2/sigstack.c diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sigstack.c b/sysdeps/unix/sysv/sysv4/solaris2/sigstack.c new file mode 100644 index 0000000000..5aa73c8dcb --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/solaris2/sigstack.c @@ -0,0 +1,3 @@ +/* We can reuse the Linux implementation with some tricks. */ +#define __NR_sigaltstack 1 +#include From e67612f82e167fe890e120d9faaa0288ef16869f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 20 Jul 1998 17:22:44 +0000 Subject: [PATCH 1305/4487] sigwaitinfo implemtation for Solaris. --- sysdeps/unix/sysv/sysv4/solaris2/sigwaitinfo.c | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/solaris2/sigwaitinfo.c diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sigwaitinfo.c b/sysdeps/unix/sysv/sysv4/solaris2/sigwaitinfo.c new file mode 100644 index 0000000000..026e61102e --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/solaris2/sigwaitinfo.c @@ -0,0 +1,2 @@ +/* We can reuse the Linux implementation. */ +#include From 4d437a84f7f09d25e1423614f43937cdd9b39740 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 20 Jul 1998 17:23:28 +0000 Subject: [PATCH 1306/4487] Add sigaltstack, sigpending, sigqueue, and sigtimedwait. --- sysdeps/unix/sysv/sysv4/solaris2/syscalls.list | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysdeps/unix/sysv/sysv4/solaris2/syscalls.list b/sysdeps/unix/sysv/sysv4/solaris2/syscalls.list index 52063630dc..092d869efc 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/syscalls.list +++ b/sysdeps/unix/sysv/sysv4/solaris2/syscalls.list @@ -1,3 +1,7 @@ # File name Caller Syscall name # args Strong name Weak names sigaction - sigaction 3 __sigaction sigaction +sigaltstack - sigaltstack 2 sigaltstack +sigpending - sigpending 2 __syscall_sigpending +sigqueue - sigqueue 3 __sigqueue sigqueue +sigtimedwait - sigtimedwait 3 __sigtimedwait sigtime From 1965e0a488bae0cfb394c0374d17353ca4443117 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 20 Jul 1998 17:25:27 +0000 Subject: [PATCH 1307/4487] syscall function implementation for Solaris/SPARC32. --- sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/syscall.S | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/syscall.S diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/syscall.S b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/syscall.S new file mode 100644 index 0000000000..b9f2996e31 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/syscall.S @@ -0,0 +1,2 @@ +/* Bets are that the Linux code works... */ +#include From 4aae520265470f046ac4078cb136dd06463d5583 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 22 Jul 1998 01:37:56 +0000 Subject: [PATCH 1308/4487] * sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h: Fix typo. --- sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h b/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h index 6b6f711aa7..bdef810a23 100644 --- a/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h +++ b/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h @@ -1,6 +1,6 @@ /* Copyright (C) 1998 Free Software Foundation, Inc. This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 1998. + Contributed by Andreas Schwab , 1998. 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 From 54cdfc81d536033ed705a7fe1f8f4eb9db9fac35 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 22 Jul 1998 16:53:40 +0000 Subject: [PATCH 1309/4487] Also define __getrusage. --- sysdeps/unix/sysv/linux/alpha/getrusage.S | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/getrusage.S b/sysdeps/unix/sysv/linux/alpha/getrusage.S index fbbe6f7931..83cfc9e4e3 100644 --- a/sysdeps/unix/sysv/linux/alpha/getrusage.S +++ b/sysdeps/unix/sysv/linux/alpha/getrusage.S @@ -35,7 +35,7 @@ #if defined HAVE_ELF && defined PIC && defined DO_VERSIONING #define GETRUSAGE __getrusage_tv64 #else -#define GETRUSAGE getrusage +#define GETRUSAGE __getrusage #endif LEAF(GETRUSAGE, 16) @@ -131,5 +131,9 @@ $error: END(GETRUSAGE) #if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +strong_alias(__getrusage_tv64, ____getrusage_tv64) +default_symbol_version (____getrusage_tv64, __getrusage, GLIBC_2.1) default_symbol_version (__getrusage_tv64, getrusage, GLIBC_2.1) +#else +weak_alias(__getrusage, getrusage) #endif From fd2791ba88b17fcd65075efc664e9c05fa4c1d29 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 27 Jul 1998 17:51:42 +0000 Subject: [PATCH 1310/4487] (elf_machine_rel): Delete redundant debugging code. Correct handling of PC24 relocs. --- sysdeps/arm/dl-machine.h | 36 ++++++------------------------------ 1 file changed, 6 insertions(+), 30 deletions(-) diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 7612285907..912f7863fb 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -398,35 +398,6 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, break; case R_ARM_GLOB_DAT: case R_ARM_JUMP_SLOT: - -#if 0 -#define _HEX(i) for (j=28; j>=0; j-=4) b[7-j/4]="0123456789abcdef"[((int)i>>j)&15]; -{ -char b[10]; -int j; -_HEX(map->l_addr); -__asm__ (" mov r0, #2; mov r1, %0; mov r2, #9; swi 0x00900004; " - : : "r"(b) : "r0", "r1", "r2" ); -_HEX(sym->st_size); -__asm__ (" mov r0, #2; mov r1, %0; mov r2, #9; swi 0x00900004; " - : : "r"(b) : "r0", "r1", "r2" ); -_HEX(&sym->st_value); -__asm__ (" mov r0, #2; mov r1, %0; mov r2, #9; swi 0x00900004; " - : : "r"(b) : "r0", "r1", "r2" ); -_HEX(sym->st_value); -__asm__ (" mov r0, #2; mov r1, %0; mov r2, #9; swi 0x00900004; " - : : "r"(b) : "r0", "r1", "r2" ); -_HEX(sym); -__asm__ (" mov r0, #2; mov r1, %0; mov r2, #9; swi 0x00900004; " - : : "r"(b) : "r0", "r1", "r2" ); -_HEX(reloc_addr); -__asm__ (" mov r0, #2; mov r1, %0; mov r2, #9; swi 0x00900004; " - : : "r"(b) : "r0", "r1", "r2" ); -b[0]=' '; b[1]='\n'; -__asm__ (" mov r0, #2; mov r1, %0; mov r2, #2; swi 0x00900004; " - : : "r"(b) : "r0", "r1", "r2" ); -} -#endif *reloc_addr = value; break; case R_ARM_ABS32: @@ -451,7 +422,12 @@ __asm__ (" mov r0, #2; mov r1, %0; mov r2, #2; swi 0x00900004; " break; } case R_ARM_PC24: - *reloc_addr += (value - (Elf32_Addr) reloc_addr); + { + long int disp = (value - (Elf32_Addr) reloc_addr) / 4; + if ((disp >= (1<<24)) || (disp <= -(1<<24))) + assert (! "address out of range for PC24 reloc"); + *reloc_addr += disp; + } break; default: assert (! "unexpected dynamic reloc type"); From 67950c312ef1db84e050a17d4ffbc3fbf4c34e16 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 27 Jul 1998 17:51:54 +0000 Subject: [PATCH 1311/4487] Move to fpu/ subdir. --- sysdeps/arm/fpu_control.h | 93 --------------------------------------- 1 file changed, 93 deletions(-) delete mode 100644 sysdeps/arm/fpu_control.h diff --git a/sysdeps/arm/fpu_control.h b/sysdeps/arm/fpu_control.h deleted file mode 100644 index 8a2d338c49..0000000000 --- a/sysdeps/arm/fpu_control.h +++ /dev/null @@ -1,93 +0,0 @@ -/* FPU control word definitions. ARM version. - Copyright (C) 1996, 1997, 1998 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _FPU_CONTROL_H -#define _FPU_CONTROL_H - -/* We have a slight terminology confusion here. On the ARM, the register - * we're interested in is actually the FPU status word - the FPU control - * word is something different (which is implementation-defined and only - * accessible from supervisor mode.) - * - * The FPSR looks like this: - * - * 31-24 23-16 15-8 7-0 - * | system ID | trap enable | system control | exception flags | - * - * We ignore the system ID bits; for interest's sake they are: - * - * 0000 "old" FPE - * 1000 FPPC hardware - * 0001 FPE 400 - * 1001 FPA hardware - * - * The trap enable and exception flags are both structured like this: - * - * 7 - 5 4 3 2 1 0 - * | reserved | INX | UFL | OFL | DVZ | IVO | - * - * where a `1' bit in the enable byte means that the trap can occur, and - * a `1' bit in the flags byte means the exception has occurred. - * - * The exceptions are: - * - * IVO - invalid operation - * DVZ - divide by zero - * OFL - overflow - * UFL - underflow - * INX - inexact (do not use; implementations differ) - * - * The system control byte looks like this: - * - * 7-5 4 3 2 1 0 - * | reserved | AC | EP | SO | NE | ND | - * - * where the bits mean - * - * ND - no denormalised numbers (force them all to zero) - * NE - enable NaN exceptions - * SO - synchronous operation - * EP - use expanded packed-decimal format - * AC - use alternate definition for C flag on compare operations - */ - -#define _FPU_RESERVED 0xfff0e0f0 /* These bits are reserved. */ - -/* The fdlibm code requires no interrupts for exceptions. Don't - change the rounding mode, it would break long double I/O! */ -#define _FPU_DEFAULT 0x00000000 /* Default value. */ - -/* Type of the control word. */ -typedef unsigned int fpu_control_t; - -/* Macros for accessing the hardware control word. */ -#define _FPU_GETCW(cw) __asm__ ("rfs %0" : "=r" (cw)) -#define _FPU_SETCW(cw) __asm__ ("wfs %0" : : "r" (cw)) - -/* Default control word set at startup. */ -extern fpu_control_t __fpu_control; - -__BEGIN_DECLS - -/* Called at startup. It can be used to manipulate fpu control register. */ -extern void __setfpucw __P ((fpu_control_t)); - -__END_DECLS - -#endif /* _FPU_CONTROL_H */ From 7d39ca8849e77c1215279214acfdaf48f003f8f6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 27 Jul 1998 17:52:05 +0000 Subject: [PATCH 1312/4487] Improved profiling for ARM. --- sysdeps/arm/machine-gmon.h | 42 +++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/sysdeps/arm/machine-gmon.h b/sysdeps/arm/machine-gmon.h index 27643df884..96b4c13c72 100644 --- a/sysdeps/arm/machine-gmon.h +++ b/sysdeps/arm/machine-gmon.h @@ -1,5 +1,5 @@ /* Machine-dependent definitions for profiling support. ARM version. - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998 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,19 +37,29 @@ static void mcount_internal (u_long frompc, u_long selfpc); #define _MCOUNT_DECL(frompc, selfpc) \ static void mcount_internal (u_long frompc, u_long selfpc) -#define MCOUNT \ -void _mcount (void) \ -{ \ - register unsigned long int frompc, selfpc; \ - __asm__("movs fp, fp; " \ - "moveq %0, $0; " \ - "ldrne %0, [fp, $-4]; " \ - "ldrne %1, [fp, $-12]; " \ - "movnes %1, %1; " \ - "ldrne %1, [%1, $-4]; " \ - : "=g" (selfpc), "=g" (frompc) \ - : : "cc" \ - ); \ - if (selfpc) \ - mcount_internal(frompc, selfpc); \ +/* This macro/func MUST save r0, r1 because the compiler inserts + blind calls to _mount(), ignoring the fact that _mcount may + clobber registers; therefore, _mcount may NOT clobber registers */ +/* if (this_fp!=0) { + r0 = this_lr + r1 = this_fp + r1 = [r1-4] which is caller's fp + if (r1!=0) + r1 = caller's lr + call mcount_internal(this_lr, caller's_lr) + } +*/ +#define MCOUNT \ +void _mcount (void) \ +{ \ + __asm__("stmdb sp!, {r0, r1, r2, r3};" \ + "movs fp, fp;" \ + "moveq r0, #0;" \ + "ldrne r0, [fp, $-4];" \ + "ldrne r1, [fp, $-12];" \ + "movnes r1, r1;" \ + "ldrne r1, [r1, $-4];" \ + "movs r1, r1;" \ + "blne mcount_internal;" \ + "ldmia sp!, {r0, r1, r2, r3}"); \ } From 22a7aa47a3f5c735a7c88e3fcf9c681b681ac10f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 27 Jul 1998 17:52:15 +0000 Subject: [PATCH 1313/4487] (CALL_MCOUNT): Replace stub with real implementation. --- sysdeps/arm/sysdep.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/arm/sysdep.h b/sysdeps/arm/sysdep.h index 4fc90aeed0..13d34c741b 100644 --- a/sysdeps/arm/sysdep.h +++ b/sysdeps/arm/sysdep.h @@ -73,10 +73,10 @@ /* If compiled for profiling, call `mcount' at the start of each function. */ #ifdef PROF -/* The mcount code relies on a normal frame pointer being on the stack - to locate our caller, so push one just for its benefit. */ -#define CALL_MCOUNT \ -#error Profiling not supported. +#define CALL_MCOUNT \ + str lr,[sp, #-4]! \ + bl PLTJMP(mcount) \ + ldr lr, [sp], #4 #else #define CALL_MCOUNT /* Do nothing. */ #endif From 2f601732bd5d394bbb1f1805fef381c38a73f134 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 27 Jul 1998 17:52:34 +0000 Subject: [PATCH 1314/4487] Definitions for FPU control. --- sysdeps/arm/fpu/fpu_control.h | 93 +++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 sysdeps/arm/fpu/fpu_control.h diff --git a/sysdeps/arm/fpu/fpu_control.h b/sysdeps/arm/fpu/fpu_control.h new file mode 100644 index 0000000000..8a2d338c49 --- /dev/null +++ b/sysdeps/arm/fpu/fpu_control.h @@ -0,0 +1,93 @@ +/* FPU control word definitions. ARM version. + Copyright (C) 1996, 1997, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _FPU_CONTROL_H +#define _FPU_CONTROL_H + +/* We have a slight terminology confusion here. On the ARM, the register + * we're interested in is actually the FPU status word - the FPU control + * word is something different (which is implementation-defined and only + * accessible from supervisor mode.) + * + * The FPSR looks like this: + * + * 31-24 23-16 15-8 7-0 + * | system ID | trap enable | system control | exception flags | + * + * We ignore the system ID bits; for interest's sake they are: + * + * 0000 "old" FPE + * 1000 FPPC hardware + * 0001 FPE 400 + * 1001 FPA hardware + * + * The trap enable and exception flags are both structured like this: + * + * 7 - 5 4 3 2 1 0 + * | reserved | INX | UFL | OFL | DVZ | IVO | + * + * where a `1' bit in the enable byte means that the trap can occur, and + * a `1' bit in the flags byte means the exception has occurred. + * + * The exceptions are: + * + * IVO - invalid operation + * DVZ - divide by zero + * OFL - overflow + * UFL - underflow + * INX - inexact (do not use; implementations differ) + * + * The system control byte looks like this: + * + * 7-5 4 3 2 1 0 + * | reserved | AC | EP | SO | NE | ND | + * + * where the bits mean + * + * ND - no denormalised numbers (force them all to zero) + * NE - enable NaN exceptions + * SO - synchronous operation + * EP - use expanded packed-decimal format + * AC - use alternate definition for C flag on compare operations + */ + +#define _FPU_RESERVED 0xfff0e0f0 /* These bits are reserved. */ + +/* The fdlibm code requires no interrupts for exceptions. Don't + change the rounding mode, it would break long double I/O! */ +#define _FPU_DEFAULT 0x00000000 /* Default value. */ + +/* Type of the control word. */ +typedef unsigned int fpu_control_t; + +/* Macros for accessing the hardware control word. */ +#define _FPU_GETCW(cw) __asm__ ("rfs %0" : "=r" (cw)) +#define _FPU_SETCW(cw) __asm__ ("wfs %0" : : "r" (cw)) + +/* Default control word set at startup. */ +extern fpu_control_t __fpu_control; + +__BEGIN_DECLS + +/* Called at startup. It can be used to manipulate fpu control register. */ +extern void __setfpucw __P ((fpu_control_t)); + +__END_DECLS + +#endif /* _FPU_CONTROL_H */ From f69a3b40ff134a8e5d7a522f7e9d58a04d6a2fd8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 27 Jul 1998 17:54:08 +0000 Subject: [PATCH 1315/4487] brk implementation for Linux/Arm. --- sysdeps/unix/sysv/linux/arm/brk.c | 49 +++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/brk.c diff --git a/sysdeps/unix/sysv/linux/arm/brk.c b/sysdeps/unix/sysv/linux/arm/brk.c new file mode 100644 index 0000000000..560e5a8337 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/brk.c @@ -0,0 +1,49 @@ +/* brk system call for Linux/ARM. + Copyright (C) 1995, 1996 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include + +/* This must be initialized data because commons can't have aliases. */ +void *__curbrk = 0; + +int +__brk (void *addr) +{ + void *newbrk; + + asm ("mov a1, %1\n" /* save the argment in r0 */ + "swi %2\n" /* do the system call */ + "mov %0, a1;" /* keep the return value */ + : "=r"(newbrk) + : "r"(addr), "i" (SYS_ify (brk)) + : "a1"); + + __curbrk = newbrk; + + if (newbrk < addr) + { + __set_errno (ENOMEM); + return -1; + } + + return 0; +} +weak_alias (__brk, brk) From e3ec78f5a3d69b3a5ba3d4e3a3b9b1e50312cabf Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 27 Jul 1998 17:54:21 +0000 Subject: [PATCH 1316/4487] Replace stub with real implementation. --- sysdeps/unix/sysv/linux/arm/clone.S | 36 +++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/clone.S b/sysdeps/unix/sysv/linux/arm/clone.S index 8125ebff20..728d62f3e3 100644 --- a/sysdeps/unix/sysv/linux/arm/clone.S +++ b/sysdeps/unix/sysv/linux/arm/clone.S @@ -1,5 +1,6 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU C Library. + Contributed by Pat Beirne 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 @@ -27,7 +28,38 @@ .text ENTRY(__clone) - /* Somebody needs to write this. */ + @ sanity check args + cmp r0, #0 + cmpne r1, #0 + moveq r0, #-EINVAL + beq PLTJMP(syscall_error) + + @ insert the args onto the new stack + sub r1, r1, #8 + str r3, [r1, #4] + @ save the function pointer as the 0th element + str r0, [r1] + + @ do the system call + @ get flags + mov r0, r2 + @ new sp is already in r1 + swi SYS_ify(clone) + cmp r0, #0 + blt PLTJMP(syscall_error) + beq thread_start + @ else, thread was launched... + mov pc, lr + +thread_start: + @ pick the function arg and call address off the stack and execute + ldr r0, [sp, #4] + mov lr, pc + ldr pc, [sp] + + @ and we are done, passing the return value through r0 + bl PLTJMP(_exit) + PSEUDO_END (__clone) weak_alias (__clone, clone) From 60839328e827635bb5638d76e38cdb0666c81742 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 27 Jul 1998 17:54:43 +0000 Subject: [PATCH 1317/4487] siglist for Linux/Arm. --- sysdeps/unix/sysv/linux/arm/siglist.c | 75 +++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/siglist.c diff --git a/sysdeps/unix/sysv/linux/arm/siglist.c b/sysdeps/unix/sysv/linux/arm/siglist.c new file mode 100644 index 0000000000..9a539604ff --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/siglist.c @@ -0,0 +1,75 @@ +/* Copyright (C) 1997, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include + +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +# define SYS_SIGLIST __new_sys_siglist +# define SYS_SIGABBREV __new_sys_sigabbrev +#else +# define SYS_SIGLIST _sys_siglist +# define SYS_SIGABBREV _sys_sigabbrev +#endif + +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +asm (".data; .globl __old_sys_siglist; __old_sys_siglist:"); +#endif + +const char *const SYS_SIGLIST[NSIG] = +{ +#define init_sig(sig, abbrev, desc) [sig] desc, +#include "siglist.h" +#undef init_sig +}; + +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +asm (".type __old_sys_siglist,%object;.size __old_sys_siglist," + OLD_SIGLIST_SIZE_STR "*" PTR_SIZE_STR); + +asm (".data; .globl __old_sys_sigabbrev; __old_sys_sigabbrev:"); +#endif + +const char *const SYS_SIGABBREV[NSIG] = +{ +#define init_sig(sig, abbrev, desc) [sig] abbrev, +#include "siglist.h" +#undef init_sig +}; + +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +asm (".type __old_sys_sigabbrev,%object;.size __old_sys_sigabbrev," + OLD_SIGLIST_SIZE_STR "*" PTR_SIZE_STR); + +extern const char *const *__old_sys_siglist; +extern const char *const *__old_sys_sigabbrev; + +strong_alias (__old_sys_siglist, _old_sys_siglist) +symbol_version (__old_sys_siglist, _sys_siglist, GLIBC_2.0); +symbol_version (_old_sys_siglist, sys_siglist, GLIBC_2.0); +symbol_version (__old_sys_sigabbrev, sys_sigabbrev, GLIBC_2.0); + +strong_alias (__new_sys_siglist, _new_sys_siglist) +default_symbol_version (__new_sys_siglist, _sys_siglist, GLIBC_2.1); +default_symbol_version (_new_sys_siglist, sys_siglist, GLIBC_2.1); +default_symbol_version (__new_sys_sigabbrev, sys_sigabbrev, GLIBC_2.1); +#else +weak_alias (_sys_siglist, sys_siglist) +weak_alias (_sys_sigabbrev, sys_sigabbrev) +#endif From 9e6a624f76e081c4bce106135d157aa11312a7a3 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 28 Jul 1998 23:41:26 +0000 Subject: [PATCH 1318/4487] * sysdeps/alpha/fpu/e_sqrt.c [!_IEEE_FP]: Correctly handle inputs near DBL_MIN. --- sysdeps/alpha/fpu/e_sqrt.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/sysdeps/alpha/fpu/e_sqrt.c b/sysdeps/alpha/fpu/e_sqrt.c index 76fa015622..58de39f392 100644 --- a/sysdeps/alpha/fpu/e_sqrt.c +++ b/sysdeps/alpha/fpu/e_sqrt.c @@ -212,19 +212,21 @@ asm ("\ sll $2, 32, $2 # e0 : ldt $f14, $DN($4) # .. e1 : stq $2, $Y($sp) # e0 : - ldt $f13, $Y($sp) # e1 : + nop # .. e1 : avoid pipe flash + nop # e0 : + ldt $f13, $Y($sp) # .. e1 : - mult $f11, $f13, $f10 # fm : $f10 = (x * 0.5) * y + mult/su $f11, $f13, $f10 # fm : $f10 = (x * 0.5) * y mult $f10, $f13, $f10 # fm : $f10 = ((x * 0.5) * y) * y subt $f15, $f10, $f1 # fa : $f1 = (1.5 - 0.5*x*y*y) mult $f13, $f1, $f13 # fm : yp = y*(1.5 - 0.5*x*y*y) - mult $f11, $f13, $f11 # fm : $f11 = x * 0.5 * yp - mult $f11, $f13, $f11 # fm : $f11 = (x * 0.5 * yp) * yp + mult/su $f11, $f13, $f1 # fm : $f11 = x * 0.5 * yp + mult $f1, $f13, $f11 # fm : $f11 = (x * 0.5 * yp) * yp subt $f18, $f11, $f1 # fa : $f1= (1.5-2^-30) - 0.5*x*yp*yp mult $f13, $f1, $f13 # fm : ypp = $f13 = yp*$f1 subt $f15, $f12, $f1 # fa : $f1 = (1.5 - 0.5) ldt $f15, $UP($4) # .. e1 : - mult $f16, $f13, $f10 # fm : z = $f10 = x * ypp + mult/su $f16, $f13, $f10 # fm : z = $f10 = x * ypp mult $f10, $f13, $f11 # fm : $f11 = z*ypp mult $f10, $f12, $f12 # fm : $f12 = z*0.5 subt $f1, $f11, $f1 # .. fa : $f1 = 1 - z*ypp @@ -236,11 +238,11 @@ asm ("\ mult/c $f0, $f12, $f1 # fm : $f1 = zp * zmi mult/c $f0, $f11, $f15 # fm : $f15 = zp * zpl - subt $f1, $f16, $f13 # fa : y1 = zp*zmi - x - subt $f15, $f16, $f15 # fa : y2 = zp*zpl - x + subt/su $f1, $f16, $f13 # fa : y1 = zp*zmi - x + subt/su $f15, $f16, $f14 # fa : y2 = zp*zpl - x fcmovge $f13, $f12, $f0 # res = (y1 >= 0) ? zmi : res - fcmovlt $f15, $f11, $f0 # res = (y2 < 0) ? zpl : res + fcmovlt $f14, $f11, $f0 # res = (y2 < 0) ? zpl : res addq $sp, 16, $sp # e0 : ret # .. e1 : From 230ba858b40d68216b85b71f3519d0074eeba396 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 29 Jul 1998 15:14:10 +0000 Subject: [PATCH 1319/4487] Arm with FPU specific files to distribute. --- sysdeps/arm/fpu/Dist | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/arm/fpu/Dist diff --git a/sysdeps/arm/fpu/Dist b/sysdeps/arm/fpu/Dist new file mode 100644 index 0000000000..d78de40205 --- /dev/null +++ b/sysdeps/arm/fpu/Dist @@ -0,0 +1 @@ +ieee754.h From e0c9758ca4fcbde7d8047c16786c4fbce4abd495 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 30 Jul 1998 12:38:08 +0000 Subject: [PATCH 1320/4487] Schedule for EV5. Add ffsl and ffsll entry points. --- sysdeps/alpha/ffs.S | 87 +++++++++++++++++++++++++++------------------ 1 file changed, 52 insertions(+), 35 deletions(-) diff --git a/sysdeps/alpha/ffs.S b/sysdeps/alpha/ffs.S index 6eb3afdff7..91cce4182b 100644 --- a/sysdeps/alpha/ffs.S +++ b/sysdeps/alpha/ffs.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. Contributed by David Mosberger (davidm@cs.arizona.edu). This file is part of the GNU C Library. @@ -25,49 +25,66 @@ .set noreorder .set noat + ENTRY(__ffs) #ifdef PROF ldgp gp, 0(pv) lda AT, _mcount jsr AT, (AT), _mcount .prologue 1 + zap $16, 0xF0, $16 + br $ffsl..ng #else .prologue 0 + zap $16, 0xF0, $16 + # FALLTHRU #endif +END(__ffs) - ldq_u zero, 0(sp) # on the 21064, this helps dual-issuing - addl a0, zero, a0 # the last insn and reduces the stall - negq a0, t0 # due to the srl instruction - and a0, t0, t0 - clr v0 - beq a0, $done - - # now do binary search for first non-zero bit - - zapnot t0, 0x03, t2 - addq v0, 16, t3 - cmoveq t2, t3, v0 - - zapnot t0, 0x05, t2 - addq v0, 8, t3 - cmoveq t2, t3, v0 - - srl t0, v0, t0 - addq v0, 1, v0 - - and t0, 0x0f, t2 - addq v0, 4, t3 - cmoveq t2, t3, v0 - - and t0, 0x33, t2 - addq v0, 2, t3 - cmoveq t2, t3, v0 - - and t0, 0x55, t2 - addq v0, 1, t3 - cmoveq t2, t3, v0 - -$done: ret + .align 4 +ENTRY(ffsl) +#ifdef PROF + ldgp gp, 0(pv) + lda AT, _mcount + jsr AT, (AT), _mcount + .prologue 1 +$ffsl..ng: +#else + .prologue 0 +#endif + not $16, $1 # e0 : + ldi $2, -1 # .. e1 : + cmpbge $1, $2, $3 # e0 : bit N == 1 for byte N == 0 + clr $0 # .. e1 : + addq $3, 1, $4 # e0 : + bic $4, $3, $3 # e1 : bit N == 1 for first byte N != 0 + and $3, 0xF0, $4 # e0 : + and $3, 0xCC, $5 # .. e1 : + and $3, 0xAA, $6 # e0 : + cmovne $4, 4, $0 # .. e1 : + cmovne $5, 2, $5 # e0 : + cmovne $6, 1, $6 # .. e1 : + addl $0, $5, $0 # e0 : + addl $0, $6, $0 # e1 : $0 == N + extbl $16, $0, $1 # e0 : $1 == byte N + ldi $2, 1 # .. e1 : + negq $1, $3 # e0 : + and $3, $1, $3 # e1 : bit N == least bit set of byte N + and $3, 0xF0, $4 # e0 : + and $3, 0xCC, $5 # .. e1 : + and $3, 0xAA, $6 # e0 : + cmovne $4, 5, $2 # .. e1 : + cmovne $5, 2, $5 # e0 : + cmovne $6, 1, $6 # .. e1 : + s8addl $0, $2, $0 # e0 : mult byte ofs by 8 and sum + addl $5, $6, $5 # .. e1 : + addl $0, $5, $0 # e0 : + nop # .. e1 : + cmoveq $16, 0, $0 # e0 : trap input == 0 case. + ret # .. e1 : 18 + +END(ffsl) - END(__ffs) weak_alias (__ffs, ffs) +weak_extern (ffsl) +weak_alias (ffsl, ffsll) From 15602adec09aaac9d38143914e10d4f88388abda Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 30 Jul 1998 12:38:22 +0000 Subject: [PATCH 1321/4487] Dummy file to satisfy Makefiles. --- sysdeps/alpha/ffsll.S | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/alpha/ffsll.S diff --git a/sysdeps/alpha/ffsll.S b/sysdeps/alpha/ffsll.S new file mode 100644 index 0000000000..b2f46d899c --- /dev/null +++ b/sysdeps/alpha/ffsll.S @@ -0,0 +1 @@ +/* This function is defined in ffs.S. */ From f2e7413870a5c21b396edc142a81eb23ea04db16 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 30 Jul 1998 12:44:22 +0000 Subject: [PATCH 1322/4487] Add ffsl entry point. --- sysdeps/m68k/ffs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sysdeps/m68k/ffs.c b/sysdeps/m68k/ffs.c index d30bd9d6ff..bed3f46866 100644 --- a/sysdeps/m68k/ffs.c +++ b/sysdeps/m68k/ffs.c @@ -1,7 +1,7 @@ /* ffs -- find first set bit in a word, counted from least significant end. For mc68020, mc68030, mc68040. This file is part of the GNU C Library. - Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc. + Copyright (C) 1991, 1992, 1997, 1998 Free Software Foundation, Inc. Contributed by Torbjorn Granlund (tege@sics.se). The GNU C Library is free software; you can redistribute it and/or @@ -19,6 +19,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#define ffsl __something_else #include #undef ffs @@ -36,6 +37,8 @@ __ffs (x) return 32 - cnt; } weak_alias (__ffs, ffs) +#undef ffsl +weak_alias (__ffs, ffsl) #else From 197b1bfd0381b0567fc6a3562dadda57dc89fe80 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 30 Jul 1998 12:45:33 +0000 Subject: [PATCH 1323/4487] Don't define CLK_TCK for strictly ISO C compliant programs. --- sysdeps/unix/sysv/linux/alpha/bits/time.h | 6 ++++-- sysdeps/unix/sysv/linux/mips/bits/time.h | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/time.h b/sysdeps/unix/sysv/linux/alpha/bits/time.h index 7f26efd031..acb2b41f97 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/time.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/time.h @@ -1,5 +1,5 @@ /* System-dependent timing definitions. Linux/Alpha version. - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998 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 @@ -33,9 +33,11 @@ XSI-conformant systems. */ # define CLOCKS_PER_SEC 1000000 +# ifndef __STRICT_ANSI__ /* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK presents the real value for clock ticks per second for the system. */ -# define CLK_TCK 1024 +# define CLK_TCK 1024 +# endif # endif /* bits/time.h */ #endif /* !__need_timeval */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/time.h b/sysdeps/unix/sysv/linux/mips/bits/time.h index a7b268d0f8..91dc65c910 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/time.h +++ b/sysdeps/unix/sysv/linux/mips/bits/time.h @@ -1,5 +1,5 @@ /* System-dependent timing definitions. Linux/MIPS version. - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998 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 @@ -33,9 +33,11 @@ XSI-conformant systems. */ # define CLOCKS_PER_SEC 1000000 +# ifndef __STRICT_ANSI__ /* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK presents the real value for clock ticks per second for the system. */ -# define CLK_TCK 100 /* XXX not correct for all systems. */ +# define CLK_TCK 100 /* XXX not correct for all systems. */ +# endif # endif /* bits/time.h */ #endif From e66186b39d642076df666844eeb12cc1f680a045 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 8 Aug 1998 19:55:32 +0000 Subject: [PATCH 1324/4487] (__sigreturn): Use SS_ONSTACK instead of SA_ONSTACK. --- sysdeps/mach/hurd/alpha/sigreturn.c | 4 ++-- sysdeps/mach/hurd/mips/sigreturn.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/mach/hurd/alpha/sigreturn.c b/sysdeps/mach/hurd/alpha/sigreturn.c index ff6e4edcaf..102b0231d8 100644 --- a/sysdeps/mach/hurd/alpha/sigreturn.c +++ b/sysdeps/mach/hurd/alpha/sigreturn.c @@ -1,5 +1,5 @@ /* Return from signal handler in GNU C library for Hurd. Alpha version. - Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc. + Copyright (C) 1994, 1995, 1997, 1998 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 @@ -65,7 +65,7 @@ __sigreturn (struct sigcontext *scp) if (scp->sc_onstack) { - ss->sigaltstack.ss_flags &= ~SA_ONSTACK; /* XXX threadvars */ + ss->sigaltstack.ss_flags &= ~SS_ONSTACK; /* XXX threadvars */ /* XXX cannot unlock until off sigstack */ abort (); } diff --git a/sysdeps/mach/hurd/mips/sigreturn.c b/sysdeps/mach/hurd/mips/sigreturn.c index fe38fac1df..0e775736bd 100644 --- a/sysdeps/mach/hurd/mips/sigreturn.c +++ b/sysdeps/mach/hurd/mips/sigreturn.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998 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 @@ -64,7 +64,7 @@ __sigreturn (struct sigcontext *scp) if (scp->sc_onstack) { - ss->sigaltstack.ss_flags &= ~SA_ONSTACK; /* XXX threadvars */ + ss->sigaltstack.ss_flags &= ~SS_ONSTACK; /* XXX threadvars */ /* XXX cannot unlock until off sigstack */ abort (); } From 600e633ff62190178d016979c0447ab865c6bdfb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 8 Aug 1998 19:56:26 +0000 Subject: [PATCH 1325/4487] (_hurd_setup_sighandler): Use SS_DISABLE instead of SA_DISABLE. Use SS_ONSTACK instead of SA_ONSTACK where appropriate. --- sysdeps/mach/hurd/alpha/trampoline.c | 8 ++++---- sysdeps/mach/hurd/hppa/trampoline.c | 8 ++++---- sysdeps/mach/hurd/mips/trampoline.c | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/sysdeps/mach/hurd/alpha/trampoline.c b/sysdeps/mach/hurd/alpha/trampoline.c index b650478347..a1d0dfb5a7 100644 --- a/sysdeps/mach/hurd/alpha/trampoline.c +++ b/sysdeps/mach/hurd/alpha/trampoline.c @@ -1,5 +1,5 @@ /* Set thread_state for sighandler, and sigcontext to recover. Alpha version. - Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc. + Copyright (C) 1994, 1995, 1997, 1998 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 @@ -86,10 +86,10 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, return NULL; if ((ss->actions[signo].sa_flags & SA_ONSTACK) && - !(ss->sigaltstack.ss_flags & (SA_DISABLE|SA_ONSTACK))) + !(ss->sigaltstack.ss_flags & (SS_DISABLE|SS_ONSTACK))) { sigsp = ss->sigaltstack.ss_sp + ss->sigaltstack.ss_size; - ss->sigaltstack.ss_flags |= SA_ONSTACK; + ss->sigaltstack.ss_flags |= SS_ONSTACK; /* XXX need to set up base of new stack for per-thread variables, cthreads. */ } @@ -114,7 +114,7 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, { /* Set up the sigcontext from the current state of the thread. */ - scp->sc_onstack = ss->sigaltstack.ss_flags & SA_ONSTACK ? 1 : 0; + scp->sc_onstack = ss->sigaltstack.ss_flags & SS_ONSTACK ? 1 : 0; /* struct sigcontext is laid out so that starting at sc_regs mimics a struct alpha_thread_state. */ diff --git a/sysdeps/mach/hurd/hppa/trampoline.c b/sysdeps/mach/hurd/hppa/trampoline.c index ceb16235fe..b046b945a4 100644 --- a/sysdeps/mach/hurd/hppa/trampoline.c +++ b/sysdeps/mach/hurd/hppa/trampoline.c @@ -1,5 +1,5 @@ /* Set thread_state for sighandler, and sigcontext to recover. HPPA version. - Copyright (C) 1995, 1997 Free Software Foundation, Inc. + Copyright (C) 1995, 1997, 1998 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 @@ -75,10 +75,10 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, return NULL; if ((ss->actions[signo].sa_flags & SA_ONSTACK) && - !(ss->sigaltstack.ss_flags & (SA_DISABLE|SA_ONSTACK))) + !(ss->sigaltstack.ss_flags & (SS_DISABLE|SS_ONSTACK))) { sigsp = ss->sigaltstack.ss_sp + ss->sigaltstack.ss_size; - ss->sigaltstack.ss_flags |= SA_ONSTACK; + ss->sigaltstack.ss_flags |= SS_ONSTACK; /* XXX need to set up base of new stack for per-thread variables, cthreads. */ } @@ -104,7 +104,7 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, /* Set up the sigcontext from the current state of the thread. */ - scp->sc_onstack = ss->sigaltstack.ss_flags & SA_ONSTACK ? 1 : 0; + scp->sc_onstack = ss->sigaltstack.ss_flags & SS_ONSTACK ? 1 : 0; /* struct sigcontext is laid out so that starting at sc_regs mimics a struct parisc_thread_state. */ diff --git a/sysdeps/mach/hurd/mips/trampoline.c b/sysdeps/mach/hurd/mips/trampoline.c index fbb7df508f..284b95c330 100644 --- a/sysdeps/mach/hurd/mips/trampoline.c +++ b/sysdeps/mach/hurd/mips/trampoline.c @@ -1,5 +1,5 @@ /* Set thread_state for sighandler, and sigcontext to recover. MIPS version. - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998 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 @@ -77,10 +77,10 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, state->basic.r16 = state->basic.r29; if ((ss->actions[signo].sa_flags & SA_ONSTACK) && - !(ss->sigaltstack.ss_flags & (SA_DISABLE|SA_ONSTACK))) + !(ss->sigaltstack.ss_flags & (SS_DISABLE|SS_ONSTACK))) { sigsp = ss->sigaltstack.ss_sp + ss->sigaltstack.ss_size; - ss->sigaltstack.ss_flags |= SA_ONSTACK; + ss->sigaltstack.ss_flags |= SS_ONSTACK; /* XXX need to set up base of new stack for per-thread variables, cthreads. */ } @@ -129,7 +129,7 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, /* Set up the sigcontext from the current state of the thread. */ - scp->sc_onstack = ss->sigaltstack.ss_flags & SA_ONSTACK ? 1 : 0; + scp->sc_onstack = ss->sigaltstack.ss_flags & SS_ONSTACK ? 1 : 0; /* struct sigcontext is laid out so that starting at sc_gpr mimics a struct mips_thread_state. */ From fc42798dc36b009dd694c991ed3999a4e91977c9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 9 Aug 1998 17:29:46 +0000 Subject: [PATCH 1326/4487] Move __ prototypes into include/* header. --- sysdeps/unix/bsd/osf/sys/mman.h | 6 +----- sysdeps/unix/bsd/sun/sunos4/sys/mman.h | 6 +----- sysdeps/unix/bsd/ultrix4/sys/mman.h | 6 +----- sysdeps/unix/sysv/irix4/sys/mman.h | 6 +----- 4 files changed, 4 insertions(+), 20 deletions(-) diff --git a/sysdeps/unix/bsd/osf/sys/mman.h b/sysdeps/unix/bsd/osf/sys/mman.h index cf0bf45673..6ada4e6497 100644 --- a/sysdeps/unix/bsd/osf/sys/mman.h +++ b/sysdeps/unix/bsd/osf/sys/mman.h @@ -1,5 +1,5 @@ /* Definitions for BSD-style memory management. OSF/1 version. - Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1994, 1995, 1996, 1997, 1998 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 @@ -90,20 +90,16 @@ __BEGIN_DECLS for errors (in which case `errno' is set). A successful `mmap' call deallocates any previous mapping for the affected region. */ -extern __ptr_t __mmap __P ((__ptr_t __addr, size_t __len, int __prot, - int __flags, int __fd, off_t __offset)); extern __ptr_t mmap __P ((__ptr_t __addr, size_t __len, int __prot, int __flags, int __fd, off_t __offset)); /* Deallocate any mapping for the region starting at ADDR and extending LEN bytes. Returns 0 if successful, -1 for errors (and sets errno). */ -extern int __munmap __P ((__ptr_t __addr, size_t __len)); extern int munmap __P ((__ptr_t __addr, size_t __len)); /* Change the memory protection of the region starting at ADDR and extending LEN bytes to PROT. Returns 0 if successful, -1 for errors (and sets errno). */ -extern int __mprotect __P ((__ptr_t __addr, size_t __len, int __prot)); extern int mprotect __P ((__ptr_t __addr, size_t __len, int __prot)); /* Synchronize the region starting at ADDR and extending LEN bytes with the diff --git a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h index 420aed9296..15608e5f24 100644 --- a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h +++ b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h @@ -1,5 +1,5 @@ /* Definitions for BSD-style memory management. SunOS 4 version. - Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1994, 1995, 1996, 1997, 1998 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 @@ -87,20 +87,16 @@ __BEGIN_DECLS for errors (in which case `errno' is set). A successful `mmap' call deallocates any previous mapping for the affected region. */ -extern __ptr_t __mmap __P ((__ptr_t __addr, size_t __len, int __prot, - int __flags, int __fd, __off_t __offset)); extern __ptr_t mmap __P ((__ptr_t __addr, size_t __len, int __prot, int __flags, int __fd, __off_t __offset)); /* Deallocate any mapping for the region starting at ADDR and extending LEN bytes. Returns 0 if successful, -1 for errors (and sets errno). */ -extern int __munmap __P ((__ptr_t __addr, size_t __len)); extern int munmap __P ((__ptr_t __addr, size_t __len)); /* Change the memory protection of the region starting at ADDR and extending LEN bytes to PROT. Returns 0 if successful, -1 for errors (and sets errno). */ -extern int __mprotect __P ((__ptr_t __addr, size_t __len, int __prot)); extern int mprotect __P ((__ptr_t __addr, size_t __len, int __prot)); /* Synchronize the region starting at ADDR and extending LEN bytes with the diff --git a/sysdeps/unix/bsd/ultrix4/sys/mman.h b/sysdeps/unix/bsd/ultrix4/sys/mman.h index b884ba51ac..142509455c 100644 --- a/sysdeps/unix/bsd/ultrix4/sys/mman.h +++ b/sysdeps/unix/bsd/ultrix4/sys/mman.h @@ -1,5 +1,5 @@ /* Definitions for BSD-style memory management. Ultrix 4 version. - Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1994, 1995, 1996, 1997, 1998 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 @@ -71,20 +71,16 @@ __BEGIN_DECLS for errors (in which case `errno' is set). A successful `mmap' call deallocates any previous mapping for the affected region. */ -extern __ptr_t __mmap __P ((__ptr_t __addr, size_t __len, int __prot, - int __flags, int __fd, off_t __offset)); extern __ptr_t mmap __P ((__ptr_t __addr, size_t __len, int __prot, int __flags, int __fd, off_t __offset)); /* Deallocate any mapping for the region starting at ADDR and extending LEN bytes. Returns 0 if successful, -1 for errors (and sets errno). */ -extern int __munmap __P ((__ptr_t __addr, size_t __len)); extern int munmap __P ((__ptr_t __addr, size_t __len)); /* Change the memory protection of the region starting at ADDR and extending LEN bytes to PROT. Returns 0 if successful, -1 for errors (and sets errno). */ -extern int __mprotect __P ((__ptr_t __addr, size_t __len, int __prot)); extern int mprotect __P ((__ptr_t __addr, size_t __len, int __prot)); /* Ultrix 4 does not implement `msync' or `madvise'. */ diff --git a/sysdeps/unix/sysv/irix4/sys/mman.h b/sysdeps/unix/sysv/irix4/sys/mman.h index ff1918ec88..9147aa7e58 100644 --- a/sysdeps/unix/sysv/irix4/sys/mman.h +++ b/sysdeps/unix/sysv/irix4/sys/mman.h @@ -1,5 +1,5 @@ /* Definitions for BSD-style memory management. Irix 4 version. - Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1994, 1995, 1996, 1997, 1998 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 @@ -81,20 +81,16 @@ __BEGIN_DECLS for errors (in which case `errno' is set). A successful `mmap' call deallocates any previous mapping for the affected region. */ -extern __ptr_t __mmap __P ((__ptr_t __addr, size_t __len, int __prot, - int __flags, int __fd, __off_t __offset)); extern __ptr_t mmap __P ((__ptr_t __addr, size_t __len, int __prot, int __flags, int __fd, __off_t __offset)); /* Deallocate any mapping for the region starting at ADDR and extending LEN bytes. Returns 0 if successful, -1 for errors (and sets errno). */ -extern int __munmap __P ((__ptr_t __addr, size_t __len)); extern int munmap __P ((__ptr_t __addr, size_t __len)); /* Change the memory protection of the region starting at ADDR and extending LEN bytes to PROT. Returns 0 if successful, -1 for errors (and sets errno). */ -extern int __mprotect __P ((__ptr_t __addr, size_t __len, int __prot)); extern int mprotect __P ((__ptr_t __addr, size_t __len, int __prot)); /* Synchronize the region starting at ADDR and extending LEN bytes with the From 8ef5e9065c1565a3212a12fb6d66153f877d3fad Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 10 Aug 1998 15:53:42 +0000 Subject: [PATCH 1327/4487] Add glob64 as a weak alias for __new_glob. Likewise for globfree64. --- sysdeps/unix/sysv/linux/alpha/glob.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/glob.c b/sysdeps/unix/sysv/linux/alpha/glob.c index 5baa0aea78..311a923026 100644 --- a/sysdeps/unix/sysv/linux/alpha/glob.c +++ b/sysdeps/unix/sysv/linux/alpha/glob.c @@ -15,6 +15,9 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#define glob64 __no_glob64_decl +#define globfree64 __no_globfree64_decl + #include #include @@ -37,3 +40,6 @@ extern void __new_globfree (glob_t *__pglob); default_symbol_version(__new_glob, glob, GLIBC_2.1); default_symbol_version(__new_globfree, globfree, GLIBC_2.1); + +weak_alias (__new_glob, glob64) +weak_alias (__new_globfree, globfree64) From b9fd2790b9ac35e3fb4dd5de07b57cb017b04c9e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 10 Aug 1998 15:54:05 +0000 Subject: [PATCH 1328/4487] Empty file. We already have a glob64 implementation. --- sysdeps/unix/sysv/linux/alpha/glob64.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/glob64.c diff --git a/sysdeps/unix/sysv/linux/alpha/glob64.c b/sysdeps/unix/sysv/linux/alpha/glob64.c new file mode 100644 index 0000000000..33918ea6a5 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/glob64.c @@ -0,0 +1 @@ +/* glob64 is in glob.c */ From 708e91e6e268251edd8f2caba839b4ff6cc278c8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 12 Aug 1998 17:06:03 +0000 Subject: [PATCH 1329/4487] Undef glob*64 before playing with symbol versions. --- sysdeps/unix/sysv/linux/alpha/glob.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/glob.c b/sysdeps/unix/sysv/linux/alpha/glob.c index 311a923026..0ce8d535be 100644 --- a/sysdeps/unix/sysv/linux/alpha/glob.c +++ b/sysdeps/unix/sysv/linux/alpha/glob.c @@ -37,6 +37,8 @@ extern void __new_globfree (glob_t *__pglob); #undef glob #undef globfree +#undef glob64 +#undef globfree64 default_symbol_version(__new_glob, glob, GLIBC_2.1); default_symbol_version(__new_globfree, globfree, GLIBC_2.1); From 8e7410c350e6e7f093639b90cd6bddb0956d5c1b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 12 Aug 1998 17:06:17 +0000 Subject: [PATCH 1330/4487] (recvmsg, sendmsg): Update aliases for cancelation. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index ef14984cc2..9f002b2ad1 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -45,10 +45,10 @@ getsockopt - getsockopt 5 __getsockopt getsockopt listen - listen 2 __listen listen recv - recv 4 __libc_recv __recv recv recvfrom - recvfrom 6 __libc_recvfrom __recvfrom recvfrom -__recvmsg - recvmsg 3 __syscall_recvmsg +recvmsg - recvmsg 3 __libc_recvmsg recvmsg ptrace - ptrace 4 __ptrace ptrace send - send 4 __libc_send __send send -__sendmsg - sendmsg 3 __syscall_sendmsg +sendmsg - sendmsg 3 __libc_sendmsg sendmsg sendto - sendto 6 __libc_sendto __sendto sendto setsockopt - setsockopt 5 __setsockopt setsockopt shutdown - shutdown 2 __shutdown shutdown From 2ea19c152e105649560d449c5b2585d7004b074f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 15 Aug 1998 02:38:53 +0000 Subject: [PATCH 1331/4487] Not needed anymore. --- sysdeps/arm/elf/setjmp.S | 76 ---------------------------------------- 1 file changed, 76 deletions(-) delete mode 100644 sysdeps/arm/elf/setjmp.S diff --git a/sysdeps/arm/elf/setjmp.S b/sysdeps/arm/elf/setjmp.S deleted file mode 100644 index 51572ca515..0000000000 --- a/sysdeps/arm/elf/setjmp.S +++ /dev/null @@ -1,76 +0,0 @@ -/* setjmp for arm, ELF version. - Copyright (C) 1995, 1996, 1997, 1998 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include -#define _ASM -#define _SETJMP_H -#include - - /* We include the BSD entry points here as well but we make - them weak. */ -ENTRY (setjmp) - .weak C_SYMBOL_NAME (setjmp) - @ call comes here with - @ lr = return pc - @ r0 = &jump_buf - - @ add a second argument into the fray - mov r1, #1 - @ call the common code - b __sigsetjmp(PLT) -END (setjmp) - - /* Binary compatibility entry point. */ -ENTRY (_setjmp) - .weak C_SYMBOL_NAME (_setjmp) -ENTRY (__setjmp) - @ call comes here with - @ lr = return pc - @ r0 = &jump_buf - - @ add a second argument into the fray - mov r1, #1 - @ fall through to the common code.... - -ENTRY (__sigsetjmp) - @ save the registers into the jmp_buf.... - stmia r0, {r1-r6, sl, fp, sp, lr} - - /* Make a tail call to __sigjmp_save; it takes the same args. */ -#ifdef PIC - /* We cannot use the PLT, because it requires that sl==r10 be set, but - we can't save and restore our caller's value. Instead, we do an - indirect jump through the GOT, using for the temporary register - ip, which is call-clobbered. */ - ldr ip, 1f - add ip, ip, pc -2: @ get the address of __sigjmp_save - ldr r1, 3f - ldr ip, [ip, r1] - @ restore r1 - ldr r1, [r0] - @ jump to *__sigjmp_save - mov pc, ip -1: .word _GLOBAL_OFFSET_TABLE_ - 2b - 4 -3: .word __sigjmp_save(GOT) - -#else - b __sigjmp_save -#endif -END (__sigsetjmp) From 55e0df36d56ef802b989f5fd14df64436f0fd760 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 15 Aug 1998 02:39:03 +0000 Subject: [PATCH 1332/4487] Correct value of R0 before calling sigjmp_save. --- sysdeps/arm/fpu/setjmp.S | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysdeps/arm/fpu/setjmp.S b/sysdeps/arm/fpu/setjmp.S index 790e7566d4..6ee53c57b0 100644 --- a/sysdeps/arm/fpu/setjmp.S +++ b/sysdeps/arm/fpu/setjmp.S @@ -30,6 +30,9 @@ ENTRY (__sigsetjmp) sfmea f4, 4, [r0]! stmia r0, {v1-v6, sl, fp, sp, lr} + /* Restore pointer to jmp_buf */ + sub r0, r0, #48 + /* Make a tail call to __sigjmp_save; it takes the same args. */ B PLTJMP(C_SYMBOL_NAME(__sigjmp_save)) END (__setjmp) From 89f1caf5eec2b6ae37b529b980358bedaa869a9d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Aug 1998 23:21:05 +0000 Subject: [PATCH 1333/4487] Define extern inline functions only if __USE_EXTERN_INLINES is defined. --- sysdeps/unix/sysv/sysv4/bits/sigset.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/sysv4/bits/sigset.h b/sysdeps/unix/sysv/sysv4/bits/sigset.h index 1461c93b3d..c5d596dad8 100644 --- a/sysdeps/unix/sysv/sysv4/bits/sigset.h +++ b/sysdeps/unix/sysv/sysv4/bits/sigset.h @@ -48,9 +48,10 @@ typedef struct #define __SSELT(s) ((s) / __NSSBITS) #define __SSMASK(s) (1 << ((s) % __NSSBITS)) -#ifndef _EXTERN_INLINE -#define _EXTERN_INLINE extern __inline -#endif +#ifdef __USE_EXTERN_INLINES +# ifndef _EXTERN_INLINE +# define _EXTERN_INLINE extern __inline +# endif _EXTERN_INLINE int __sigemptyset (__sigset_t *__set) @@ -92,5 +93,6 @@ __sigismember (__const __sigset_t *__set, int __sig) return 1; return 0; } +#endif /* use extern inlines. */ #endif /* ! _SIGSET_H_fns */ From 397e58bca857fb98b204a1336e4566292ecc2667 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 20 Aug 1998 17:33:18 +0000 Subject: [PATCH 1334/4487] Put return value in correct register. Don't set the condition flags unnecessarily. --- sysdeps/arm/__longjmp.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/arm/__longjmp.S b/sysdeps/arm/__longjmp.S index 239b0cfc85..742e0baa16 100644 --- a/sysdeps/arm/__longjmp.S +++ b/sysdeps/arm/__longjmp.S @@ -25,9 +25,9 @@ /* __longjmp(jmpbuf, val) */ ENTRY (__longjmp) - movs r2, r0 + mov ip, r0 movs r0, r1 /* get the return value in place */ - moveq r1, #1 /* can't let setjmp() return zero! */ + moveq r0, #1 /* can't let setjmp() return zero! */ - LOADREGS(ia, r2, {v1-v6, sl, fp, sp, pc}) + LOADREGS(ia, ip, {v1-v6, sl, fp, sp, pc}) END (__longjmp) From f176c9ee034cef475e857a005d2c142073960d0d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 20 Aug 1998 17:33:32 +0000 Subject: [PATCH 1335/4487] Put return value in correct register. Don't set the condition flags unnecessarily. Restore floating point registers correctly. --- sysdeps/arm/fpu/__longjmp.S | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sysdeps/arm/fpu/__longjmp.S b/sysdeps/arm/fpu/__longjmp.S index 8afa177b20..25ba6b39fa 100644 --- a/sysdeps/arm/fpu/__longjmp.S +++ b/sysdeps/arm/fpu/__longjmp.S @@ -25,12 +25,12 @@ /* __longjmp(jmpbuf, val) */ ENTRY (__longjmp) - movs r2, r0 + mov ip, r0 /* save jmp_buf pointer */ + movs r0, r1 /* get the return value in place */ - moveq r1, #1 /* can't let setjmp() return zero! */ + moveq r0, #1 /* can't let setjmp() return zero! */ - add r2, r2, #48 - lfmfd f4, 4, [r2] + lfmia f4, 4, [ip] ! /* load the floating point regs */ - LOADREGS(ia, r2, {v1-v6, sl, fp, sp, pc}) + LOADREGS(ia, ip, {v1-v6, sl, fp, sp, pc}) END (__longjmp) From 60438273e5fc1aaf86c9e254465325892a5916cd Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 20 Aug 1998 17:33:57 +0000 Subject: [PATCH 1336/4487] Use PLT for procedure call. --- sysdeps/arm/bsd-_setjmp.S | 2 +- sysdeps/arm/bsd-setjmp.S | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/arm/bsd-_setjmp.S b/sysdeps/arm/bsd-_setjmp.S index 6ae6da6457..5cecc2a0be 100644 --- a/sysdeps/arm/bsd-_setjmp.S +++ b/sysdeps/arm/bsd-_setjmp.S @@ -25,5 +25,5 @@ ENTRY (_setjmp) mov r1, #0 - b C_SYMBOL_NAME(__sigsetjmp) + b PLTJMP(C_SYMBOL_NAME(__sigsetjmp)) END (_setjmp) diff --git a/sysdeps/arm/bsd-setjmp.S b/sysdeps/arm/bsd-setjmp.S index 52622e2155..bfa9552afb 100644 --- a/sysdeps/arm/bsd-setjmp.S +++ b/sysdeps/arm/bsd-setjmp.S @@ -25,5 +25,5 @@ ENTRY (setjmp) mov r1, #1 - b C_SYMBOL_NAME(__sigsetjmp) + b PLTJMP(C_SYMBOL_NAME(__sigsetjmp)) END (setjmp) From 333014b835d5478156274045c400954c03afe3f2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 20 Aug 1998 17:34:16 +0000 Subject: [PATCH 1337/4487] Set __libc_stack_end. Fix problems with profiling code. --- sysdeps/arm/dl-machine.h | 60 ++++++++++++++++++++++++---------------- 1 file changed, 36 insertions(+), 24 deletions(-) diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 912f7863fb..c40f9d7260 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -99,7 +99,8 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) end in this function. */ if (profile) { - got[2] = (Elf32_Addr) &_dl_runtime_profile; + //got[2] = (Elf32_Addr) &_dl_runtime_profile; + got[2] = (Elf32_Addr) &_dl_runtime_resolve; /* Say that we really want profiling and the timers are started. */ _dl_profile_map = l; } @@ -144,7 +145,6 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) stmdb sp!,{r0-r3,sl,fp} @ prepare to call fixup() - @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each sub r1, ip, lr sub r1, r1, #4 @@ -153,6 +153,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) @ get pointer to linker struct ldr r0, [lr, #-4] + @ call fixup routine " CALL_ROUTINE(fixup) " @ save the return @@ -165,21 +166,15 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) mov pc, ip .size _dl_runtime_resolve, .-_dl_runtime_resolve - + .globl _dl_runtime_profile .type _dl_runtime_profile, #function .align 2 _dl_runtime_profile: - @ we get caled with - @ stack[0] contains the return address from this call - @ ip contains &GOT[n+3] (pointer to function) - @ lr points to &GOT[2] - - @ save almost everything; return add is already on the stack - stmdb sp!,{r0-r3,fp} + @ save almost everything; lr is already on the stack + stmdb sp!,{r0-r3,sl,fp} @ prepare to call fixup() - @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each sub r1, ip, lr sub r1, r1, #4 @@ -188,18 +183,19 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) @ get pointer to linker struct ldr r0, [lr, #-4] + @ call profiling fixup routine " CALL_ROUTINE(profile_fixup) " @ save the return mov ip, r0 @ restore the stack - ldmia sp!,{r0-r3,fp,lr} + ldmia sp!,{r0-r3,sl,fp,lr} @ jump to the newly found address mov pc, ip - .size _dl_runtime_profile, .-_dl_runtime_profile + .size _dl_runtime_resolve, .-_dl_runtime_resolve .previous "); #else // PROF @@ -212,15 +208,33 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) .align 2 _dl_runtime_resolve: _dl_runtime_profile: - stmdb sp!,{r0-r3,fp} - ldr r1,[sp,#0x34] + @ we get called with + @ stack[0] contains the return address from this call + @ ip contains &GOT[n+3] (pointer to function) + @ lr points to &GOT[2] + + @ save almost everything; return add is already on the stack + stmdb sp!,{r0-r3,sl,fp} + + @ prepare to call fixup() + @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each sub r1, ip, lr sub r1, r1, #4 add r1, r1, r1 + + @ get pointer to linker struct ldr r0, [lr, #-4] + + @ call profiling fixup routine " CALL_ROUTINE(fixup) " + + @ save the return mov ip, r0 - ldmia sp!,{r0-r3,fp,lr} + + @ restore the stack + ldmia sp!,{r0-r3,sl,fp,lr} + + @ jump to the newly found address mov pc, ip .size _dl_runtime_profile, .-_dl_runtime_profile @@ -251,6 +265,10 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) ldr sl, .L_GET_GOT add sl, pc, sl .L_GOT_GOT: + @ Store the highest stack address + ldr r1, .L_STACK_END + ldr r1, [sl, r1] + str sp, [r1] @ See if we were run as a command with the executable file @ name as an extra leading argument. ldr r1, .L_SKIP_ARGS @@ -299,6 +317,8 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) .word _dl_starting_up(GOT) .L_FINI_PROC: .word _dl_fini(GOT) +.L_STACK_END: + .word __libc_stack_end(GOT) .previous\n\ "); @@ -421,14 +441,6 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, *reloc_addr += value; break; } - case R_ARM_PC24: - { - long int disp = (value - (Elf32_Addr) reloc_addr) / 4; - if ((disp >= (1<<24)) || (disp <= -(1<<24))) - assert (! "address out of range for PC24 reloc"); - *reloc_addr += disp; - } - break; default: assert (! "unexpected dynamic reloc type"); break; From b292f4b3acc1c11950e6e3ec5c850935c63bd47e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 20 Aug 1998 17:35:22 +0000 Subject: [PATCH 1338/4487] IEEE754 definitions for ARM. --- sysdeps/arm/ieee754.h | 115 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 sysdeps/arm/ieee754.h diff --git a/sysdeps/arm/ieee754.h b/sysdeps/arm/ieee754.h new file mode 100644 index 0000000000..73f7d6a376 --- /dev/null +++ b/sysdeps/arm/ieee754.h @@ -0,0 +1,115 @@ +/* Copyright (C) 1992, 1995, 1996, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _IEEE754_H + +#define _IEEE754_H 1 +#include + +#include + +__BEGIN_DECLS + +union ieee754_float + { + float f; + + /* This is the IEEE 754 single-precision format. */ + struct + { + unsigned int mantissa:23; + unsigned int exponent:8; + unsigned int negative:1; + } ieee; + + /* This format makes it easier to see if a NaN is a signalling NaN. */ + struct + { + unsigned int mantissa:22; + unsigned int quiet_nan:1; + unsigned int exponent:8; + unsigned int negative:1; + } ieee_nan; + }; + +#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */ + + +union ieee754_double + { + double d; + + /* This is the IEEE 754 double-precision format. */ + struct + { + unsigned int mantissa0:20; + unsigned int exponent:11; + unsigned int negative:1; + unsigned int mantissa1:32; + } ieee; + + /* This format makes it easier to see if a NaN is a signalling NaN. */ + struct + { + unsigned int mantissa0:19; + unsigned int quiet_nan:1; + unsigned int exponent:11; + unsigned int negative:1; + unsigned int mantissa1:32; + } ieee_nan; + }; + +#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */ + + +/* The following two structures are correct for `new' floating point systems but + wrong for the old FPPC. The only solution seems to be to avoid their use on + old hardware. */ + +union ieee854_long_double + { + long double d; + + /* This is the IEEE 854 double-extended-precision format. */ + struct + { + unsigned int exponent:15; + unsigned int empty:16; + unsigned int negative:1; + unsigned int mantissa1:32; + unsigned int mantissa0:32; + } ieee; + + /* This is for NaNs in the IEEE 854 double-extended-precision format. */ + struct + { + unsigned int exponent:15; + unsigned int empty:16; + unsigned int negative:1; + unsigned int mantissa1:32; + unsigned int mantissa0:30; + unsigned int quiet_nan:1; + unsigned int one:1; + } ieee_nan; + }; + +#define IEEE854_LONG_DOUBLE_BIAS 0x3fff + +__END_DECLS + +#endif /* ieee754.h */ From a35276bee25f95125258f60be89670d2b0ca6833 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 20 Aug 1998 17:35:29 +0000 Subject: [PATCH 1339/4487] (CALL_MCOUNT): Add missing semicolons. --- sysdeps/arm/sysdep.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/arm/sysdep.h b/sysdeps/arm/sysdep.h index 13d34c741b..6247f9c94b 100644 --- a/sysdeps/arm/sysdep.h +++ b/sysdeps/arm/sysdep.h @@ -74,8 +74,8 @@ /* If compiled for profiling, call `mcount' at the start of each function. */ #ifdef PROF #define CALL_MCOUNT \ - str lr,[sp, #-4]! \ - bl PLTJMP(mcount) \ + str lr,[sp, #-4]! ; \ + bl PLTJMP(mcount) ; \ ldr lr, [sp], #4 #else #define CALL_MCOUNT /* Do nothing. */ From c94b4338b581a10fb3556eb8977817d2e238bf1b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 20 Aug 1998 17:35:44 +0000 Subject: [PATCH 1340/4487] Moved one directory up. --- sysdeps/arm/fpu/ieee754.h | 115 -------------------------------------- 1 file changed, 115 deletions(-) delete mode 100644 sysdeps/arm/fpu/ieee754.h diff --git a/sysdeps/arm/fpu/ieee754.h b/sysdeps/arm/fpu/ieee754.h deleted file mode 100644 index 73f7d6a376..0000000000 --- a/sysdeps/arm/fpu/ieee754.h +++ /dev/null @@ -1,115 +0,0 @@ -/* Copyright (C) 1992, 1995, 1996, 1998 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _IEEE754_H - -#define _IEEE754_H 1 -#include - -#include - -__BEGIN_DECLS - -union ieee754_float - { - float f; - - /* This is the IEEE 754 single-precision format. */ - struct - { - unsigned int mantissa:23; - unsigned int exponent:8; - unsigned int negative:1; - } ieee; - - /* This format makes it easier to see if a NaN is a signalling NaN. */ - struct - { - unsigned int mantissa:22; - unsigned int quiet_nan:1; - unsigned int exponent:8; - unsigned int negative:1; - } ieee_nan; - }; - -#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */ - - -union ieee754_double - { - double d; - - /* This is the IEEE 754 double-precision format. */ - struct - { - unsigned int mantissa0:20; - unsigned int exponent:11; - unsigned int negative:1; - unsigned int mantissa1:32; - } ieee; - - /* This format makes it easier to see if a NaN is a signalling NaN. */ - struct - { - unsigned int mantissa0:19; - unsigned int quiet_nan:1; - unsigned int exponent:11; - unsigned int negative:1; - unsigned int mantissa1:32; - } ieee_nan; - }; - -#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */ - - -/* The following two structures are correct for `new' floating point systems but - wrong for the old FPPC. The only solution seems to be to avoid their use on - old hardware. */ - -union ieee854_long_double - { - long double d; - - /* This is the IEEE 854 double-extended-precision format. */ - struct - { - unsigned int exponent:15; - unsigned int empty:16; - unsigned int negative:1; - unsigned int mantissa1:32; - unsigned int mantissa0:32; - } ieee; - - /* This is for NaNs in the IEEE 854 double-extended-precision format. */ - struct - { - unsigned int exponent:15; - unsigned int empty:16; - unsigned int negative:1; - unsigned int mantissa1:32; - unsigned int mantissa0:30; - unsigned int quiet_nan:1; - unsigned int one:1; - } ieee_nan; - }; - -#define IEEE854_LONG_DOUBLE_BIAS 0x3fff - -__END_DECLS - -#endif /* ieee754.h */ From 29f4d62f4723582988ab75435a6def659a41d25c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 20 Aug 1998 17:36:51 +0000 Subject: [PATCH 1341/4487] Remove O_READ and O_WRITE. --- sysdeps/unix/sysv/linux/alpha/bits/fcntl.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h index 14840649ea..0dc0c47b1a 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997, 1998 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,11 +25,6 @@ #include -/* In GNU, read and write are bits (unlike BSD). */ -#ifdef __USE_GNU -# define O_READ O_RDONLY /* Open for reading. */ -# define O_WRITE O_WRONLY /* Open for writing. */ -#endif /* open/fcntl - O_SYNC is only implemented on blocks devices and on files located on an ext2 file system */ #define O_ACCMODE 0003 @@ -71,6 +66,11 @@ # define F_GETOWN 6 /* Set owner of socket (receiver of SIGIO). */ #endif +#ifdef __USE_GNU +# define F_SETSIG 10 /* Set number of signal to be sent. */ +# define F_GETSIG 11 /* Get number of signal to be sent. */ +#endif + /* for F_[GET|SET]FL */ #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ From e77c56e8f5461ebeac5052dffeddd30ead548f9f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 20 Aug 1998 17:37:26 +0000 Subject: [PATCH 1342/4487] ARM specific errlist definition. --- sysdeps/unix/sysv/linux/arm/errlist.c | 55 +++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/errlist.c diff --git a/sysdeps/unix/sysv/linux/arm/errlist.c b/sysdeps/unix/sysv/linux/arm/errlist.c new file mode 100644 index 0000000000..e249522514 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/errlist.c @@ -0,0 +1,55 @@ +/* Copyright (C) 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING + +# define SYS_ERRLIST __new_sys_errlist +# define SYS_NERR __new_sys_nerr + +asm (".data; .globl __old_sys_errlist; __old_sys_errlist:"); +#endif + +#include + +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +asm (".type __old_sys_errlist,%object;.size __old_sys_errlist," + OLD_ERRLIST_SIZE_STR "*" PTR_SIZE_STR); + +extern const char *const *__old_sys_errlist; + +const int __old_sys_nerr = OLD_ERRLIST_SIZE; + +strong_alias (__old_sys_nerr, _old_sys_nerr); +weak_alias (__old_sys_nerr, _old_sys_nerr) +symbol_version (__old_sys_nerr, _sys_nerr, GLIBC_2.0); +symbol_version (_old_sys_nerr, sys_nerr, GLIBC_2.0); +weak_alias (__old_sys_errlist, _old_sys_errlist); +symbol_version (__old_sys_errlist, _sys_errlist, GLIBC_2.0); +symbol_version (_old_sys_errlist, sys_errlist, GLIBC_2.0); + +weak_alias (__new_sys_nerr, _new_sys_nerr) +default_symbol_version (__new_sys_nerr, _sys_nerr, GLIBC_2.1); +default_symbol_version (_new_sys_nerr, sys_nerr, GLIBC_2.1); +weak_alias (__new_sys_errlist, _new_sys_errlist) +default_symbol_version (__new_sys_errlist, _sys_errlist, GLIBC_2.1); +default_symbol_version (_new_sys_errlist, sys_errlist, GLIBC_2.1); + +#endif From cb759cab5a7248e65306a89eb2702b4b045974b5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 20 Aug 1998 17:37:44 +0000 Subject: [PATCH 1343/4487] Initialization stuff for Linux/ARM. --- sysdeps/unix/sysv/linux/arm/init-first.h | 55 ++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/init-first.h diff --git a/sysdeps/unix/sysv/linux/arm/init-first.h b/sysdeps/unix/sysv/linux/arm/init-first.h new file mode 100644 index 0000000000..d68c368cc2 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/init-first.h @@ -0,0 +1,55 @@ +/* Prepare arguments for library initialization function. + Copyright (C) 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* The job of this fragment it to find argc and friends for INIT. + This is done in one of two ways: either in the stack context + of program start, or having dlopen pass them in. + + */ + +#define SYSDEP_CALL_INIT(NAME, INIT) \ +void NAME (void* arg, ...) \ +{ \ + int argc; \ + char** argv; \ + char** envp; \ + /* The next variable is only here to work around a bug in gcc <= 2.7.2.2. \ + If the address would be taken inside the expression the optimizer \ + would try to be too smart and throws it away. Grrr. */ \ + int *dummy_addr = &_dl_starting_up; \ + \ + __libc_multiple_libcs = dummy_addr && !_dl_starting_up; \ + \ + if (!__libc_multiple_libcs) \ + { \ + /* The ... in the arg list above forces the gnu ARM compiler to \ + push r0, r1, r2, r3 onto the stack. This way we can get the address */ \ + argc = *(int*) (&arg+4); \ + argv = (char **) &arg + 5; \ + envp = &argv[argc+1]; \ + } \ + else /* the three were passed as arguments */ \ + { \ + argc = (int)arg; \ + argv = (char**)*(&arg + 1); \ + envp = (char**)*(&arg + 2); \ + } \ + \ + INIT (argc, argv, envp); \ +} From 072901a1098e2de00d852a85d8c53025a3fb9073 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 20 Aug 1998 17:39:48 +0000 Subject: [PATCH 1344/4487] Remove O_READ and O_WRITE. Add F_SETSIG and F_GETSIG. --- sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index 09d6fb6d4c..0a0d9c9d00 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997, 1998 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 @@ -24,11 +24,6 @@ #include -/* In GNU, read and write are bits (unlike BSD). */ -#ifdef __USE_GNU -# define O_READ O_RDONLY /* Open for reading. */ -# define O_WRITE O_WRONLY /* Open for writing. */ -#endif /* open/fcntl - O_SYNC is only implemented on blocks devices and on files located on an ext2 file system */ #define O_ACCMODE 0x0003 @@ -66,8 +61,13 @@ #define F_SETLKW64 7 /* Set record locking info (blocking). */ #ifdef __USE_BSD -# define F_SETOWN 5 /* Get owner of socket (receiver of SIGIO). */ -# define F_GETOWN 6 /* Set owner of socket (receiver of SIGIO). */ +# define F_SETOWN 24 /* Get owner of socket (receiver of SIGIO). */ +# define F_GETOWN 23 /* Set owner of socket (receiver of SIGIO). */ +#endif + +#ifdef __USE_GNU +# define F_SETSIG 10 /* Set number of signal to be sent. */ +# define F_GETSIG 11 /* Get number of signal to be sent. */ #endif /* for F_[GET|SET]FL */ From 619385e2325885d6603b204f82af0ffbac397ed6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 21 Aug 1998 22:29:33 +0000 Subject: [PATCH 1345/4487] New file, contains test for recent Linux 2.1.100+ headers. --- sysdeps/unix/sysv/linux/alpha/configure.in | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/configure.in diff --git a/sysdeps/unix/sysv/linux/alpha/configure.in b/sysdeps/unix/sysv/linux/alpha/configure.in new file mode 100644 index 0000000000..690defa98b --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/configure.in @@ -0,0 +1,36 @@ +sinclude(./aclocal.m4)dnl Autoconf lossage +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/unix/sysv/linux/alpha. + +# Don't bother trying to generate any glue code to be compatible with the +# existing system library, because we are the only system library. +inhibit_glue=yes + +define([LIBC_LINUX_VERSION],[2.1.100])dnl +if test -n "$sysheaders"; then + OLD_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS $SYSINCLUDES" +fi +define([libc_cv_linuxVER], [libc_cv_linux]patsubst(LIBC_LINUX_VERSION,[\.]))dnl +AC_CACHE_CHECK(installed Linux kernel header files, libc_cv_linuxVER, [dnl +AC_TRY_COMPILE([#include ], +[#if LINUX_VERSION_CODE < ]dnl +patsubst(LIBC_LINUX_VERSION,[^\([^.]*\)\.\([^.]*\)\.\([^.]*\)$],dnl +[ (\1 *65536+ \2 *256+ \3) /* \1.\2.\3 */])[ +eat flaming death +#endif], + libc_cv_linuxVER='LIBC_LINUX_VERSION or later', + libc_cv_linuxVER='TOO OLD!')]) +if test "$libc_cv_linuxVER" != 'LIBC_LINUX_VERSION or later'; then + AC_MSG_ERROR([GNU libc requires kernel header files from +Linux LIBC_LINUX_VERSION or later to be installed before configuring. +The kernel header files are found usually in /usr/include/asm and +/usr/include/linux; make sure these directories use files from +Linux LIBC_LINUX_VERSION or later. This check uses , so +make sure that file was built correctly when installing the kernel header +files. To use kernel headers not from /usr/include/linux, use the +configure option --with-headers.]) +fi +if test -n "$sysheaders"; then + CFLAGS=$OLD_CFLAGS +fi From 33a6c3dded34702cb77025bb1fa34a2d4f91ed44 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 21 Aug 1998 22:29:47 +0000 Subject: [PATCH 1346/4487] Generated from configure.in. --- sysdeps/unix/sysv/linux/alpha/configure | 51 +++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/configure diff --git a/sysdeps/unix/sysv/linux/alpha/configure b/sysdeps/unix/sysv/linux/alpha/configure new file mode 100644 index 0000000000..5b36e71719 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/configure @@ -0,0 +1,51 @@ + # Local configure fragment for sysdeps/unix/sysv/linux/alpha. + +# Don't bother trying to generate any glue code to be compatible with the +# existing system library, because we are the only system library. +inhibit_glue=yes + +if test -n "$sysheaders"; then + OLD_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS $SYSINCLUDES" +fi +echo $ac_n "checking installed Linux kernel header files""... $ac_c" 1>&6 +echo "configure:13: checking installed Linux kernel header files" >&5 +if eval "test \"`echo '$''{'libc_cv_linux21100'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +#if LINUX_VERSION_CODE < (2 *65536+ 1 *256+ 100) /* 2.1.100 */ +eat flaming death +#endif +; return 0; } +EOF +if { (eval echo configure:27: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + libc_cv_linux21100='2.1.100 or later' +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + libc_cv_linux21100='TOO OLD!' +fi +rm -f conftest* +fi + +echo "$ac_t""$libc_cv_linux21100" 1>&6 +if test "$libc_cv_linux21100" != '2.1.100 or later'; then + { echo "configure: error: GNU libc requires kernel header files from +Linux 2.1.100 or later to be installed before configuring. +The kernel header files are found usually in /usr/include/asm and +/usr/include/linux; make sure these directories use files from +Linux 2.1.100 or later. This check uses , so +make sure that file was built correctly when installing the kernel header +files. To use kernel headers not from /usr/include/linux, use the +configure option --with-headers." 1>&2; exit 1; } +fi +if test -n "$sysheaders"; then + CFLAGS=$OLD_CFLAGS +fi From 64082f3e9c0b5d5c8ce802902edba462b102bfa0 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 22 Aug 1998 07:54:18 +0000 Subject: [PATCH 1347/4487] ARM specific optimized string functions. --- sysdeps/arm/bits/string.h | 150 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 sysdeps/arm/bits/string.h diff --git a/sysdeps/arm/bits/string.h b/sysdeps/arm/bits/string.h new file mode 100644 index 0000000000..8dce456f39 --- /dev/null +++ b/sysdeps/arm/bits/string.h @@ -0,0 +1,150 @@ +/* Optimized, inlined string functions. ARM version. + Copyright (C) 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _STRING_H +# error "Never use directly; include instead." +#endif + +/* We must defeat the generic optimized versions of these functions in + since they don't work on the ARM. */ +#define _HAVE_STRING_ARCH_strcpy 1 +#define _HAVE_STRING_ARCH_stpcpy 1 + +/* We only provide optimizations if GNU CC is used and this is a little + endian system (the code below does not work on big endian machines). + With current versions of GCC these optimi\ations produce quite a large + amount of code so we only enable them if the user specifically asked + for it. */ +#if !defined __NO_STRING_INLINES && defined __GNUC__ && __GNUC__ >= 2 \ + && !defined __ARMEB__ && defined __USE_STRING_INLINES + +/* Copy SRC to DEST. */ +#define strcpy(dest, src) \ + (__extension__ (__builtin_constant_p (src) \ + ? (__string2_1bptr_p (src) && strlen (src) + 1 <= 8 \ + ? __strcpy_small (dest, src, strlen (src) + 1) \ + : (char *) memcpy (dest, src, strlen (src) + 1)) \ + : strcpy (dest, src))) + +#define __strcpy_small(dest, src, srclen) \ + (__extension__ ({ char *__dest = (char *) (dest); \ + const char *__src = (const char *) (src); \ + size_t __srclen = (srclen); \ + switch (__srclen) \ + { \ + case 5: \ + *((unsigned long int *) __dest) = \ + *((const unsigned long int *) (__src)); \ + __dest += 4; \ + __src += 4; \ + case 1: \ + *__dest++ = '\0'; \ + break; \ + case 6: \ + *((unsigned long int *) __dest) = \ + *((const unsigned long int *) (__src)); \ + __dest += 4; \ + __src += 4; \ + case 2: \ + *((unsigned short int *) __dest) = \ + __src[0]; \ + __dest += 2; \ + break; \ + case 7: \ + *((unsigned long int *) __dest) = \ + *((const unsigned long int *) (__src)); \ + __dest += 4; \ + __src += 4; \ + case 3: \ + *((unsigned short int *) __dest) = \ + *((const unsigned short int *) (__src)); \ + __dest[2] = '\0'; \ + __dest += 3; \ + break; \ + case 8: \ + *((unsigned long int *) __dest) = \ + *((const unsigned long int *) (__src)); \ + __dest += 4; \ + __src += 4; \ + case 4: \ + *((unsigned long int *) __dest) = \ + *((const unsigned short int *) (__src)) | \ + (__src[2] << 16); \ + __dest += 4; \ + break; \ + } \ + (__dest - __srclen) ; })) + +/* Copy SRC to DEST, returning pointer to final NUL byte. */ +#define __stpcpy(dest, src) \ + (__extension__ (__builtin_constant_p (src) \ + ? (__string2_1bptr_p (src) && strlen (src) + 1 <= 8 \ + ? __stpcpy_small (dest, src, strlen (src) + 1) \ + : ((char *) __mempcpy (dest, src, strlen (src) + 1) - 1))\ + : __stpcpy (dest, src))) + +#define __stpcpy_small(dest, src, srclen) \ + (__extension__ ({ char *__dest = (char *) (dest); \ + const char *__src = (const char *) (src); \ + switch (srclen) \ + { \ + case 5: \ + *((unsigned long int *) __dest) = \ + *((const unsigned long int *) (__src)); \ + __dest += 4; \ + __src += 4; \ + case 1: \ + *__dest++ = '\0'; \ + break; \ + case 6: \ + *((unsigned long int *) __dest) = \ + *((const unsigned long int *) (__src)); \ + __dest += 4; \ + __src += 4; \ + case 2: \ + *((unsigned short int *) __dest) = \ + __src[0]; \ + __dest += 2; \ + break; \ + case 7: \ + *((unsigned long int *) __dest) = \ + *((const unsigned long int *) (__src)); \ + __dest += 4; \ + __src += 4; \ + case 3: \ + *((unsigned short int *) __dest) = \ + *((const unsigned short int *) (__src)); \ + __dest[2] = '\0'; \ + __dest += 3; \ + break; \ + case 8: \ + *((unsigned long int *) __dest) = \ + *((const unsigned long int *) (__src)); \ + __dest += 4; \ + __src += 4; \ + case 4: \ + *((unsigned long int *) __dest) = \ + *((const unsigned short int *) (__src)) | \ + (__src[2] << 16); \ + __dest += 4; \ + break; \ + } \ + __dest; })) + +#endif From 06f351fa6145c20445e7be4ed376ae72bc49b756 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sun, 23 Aug 1998 04:07:48 +0000 Subject: [PATCH 1348/4487] * sysdeps/unix/sysv/linux/alpha/rt_sigaction.S: Fix .prologue; non-standard pv usage. --- sysdeps/unix/sysv/linux/alpha/rt_sigaction.S | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S index 3959e5d7df..5697584914 100644 --- a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S +++ b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S @@ -37,7 +37,8 @@ ENTRY(__syscall_rt_sigaction) jsr AT, (AT), _mcount .set at #endif - .prologue 1 + /* Indicate non-standard use of our PV. */ + .prologue 2 beq a1, 0f ldl t0, 8(a1) # sa_flags @@ -79,6 +80,7 @@ rt_sigreturn: #else ENTRY(__syscall_rt_sigaction) ldgp $29,0($27) + .prologue 1 ldi $0,ENOSYS jmp __syscall_error END(__syscall_rt_sigaction) From 4bb0cd806b955b588f65eeb8f41aff6ce68f6455 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sun, 23 Aug 1998 04:08:17 +0000 Subject: [PATCH 1349/4487] * sysdeps/alpha/elf/crtbegin.S: Fix .prologue; no pv used. * sysdeps/alpha/elf/crtend.S: Likewise. * sysdeps/alpha/elf/start.S: Likewise. --- sysdeps/alpha/elf/crtbegin.S | 2 +- sysdeps/alpha/elf/crtend.S | 2 +- sysdeps/alpha/elf/start.S | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/alpha/elf/crtbegin.S b/sysdeps/alpha/elf/crtbegin.S index e6147c2ec3..25ddaafd6e 100644 --- a/sysdeps/alpha/elf/crtbegin.S +++ b/sysdeps/alpha/elf/crtbegin.S @@ -74,7 +74,7 @@ __do_global_dtors_aux: stq $9,8($sp) stq $26,0($sp) .mask (1<<26)|(1<<9), -16 - .prologue 1 + .prologue 0 lda $9,__DTOR_LIST__ br 1f diff --git a/sysdeps/alpha/elf/crtend.S b/sysdeps/alpha/elf/crtend.S index 7f51d81da1..198aba8a5b 100644 --- a/sysdeps/alpha/elf/crtend.S +++ b/sysdeps/alpha/elf/crtend.S @@ -74,7 +74,7 @@ __do_global_ctors_aux: stq $9,8($sp) stq $26,0($sp) .mask (1<<26)|(1<<9), -16 - .prologue 1 + .prologue 0 lda $9,__CTOR_END__ br 1f diff --git a/sysdeps/alpha/elf/start.S b/sysdeps/alpha/elf/start.S index ecb8174152..b5e5df102a 100644 --- a/sysdeps/alpha/elf/start.S +++ b/sysdeps/alpha/elf/start.S @@ -30,7 +30,7 @@ _start: br gp, 1f 1: ldgp gp, 0(gp) subq sp, 16, sp - .prologue 1 + .prologue 0 /* Load address of the user's main function. */ lda a0, main From d0c425dbc5835b23a77225b02abf892ab0321ee9 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sun, 23 Aug 1998 04:08:55 +0000 Subject: [PATCH 1350/4487] * sysdeps/unix/sysv/linux/alpha/brk.S: Use jmp macro for relaxation. * sysdeps/unix/sysv/linux/alpha/getitimer.S: Likewise. * sysdeps/unix/sysv/linux/alpha/getrusage.S: Likewise. * sysdeps/unix/sysv/linux/alpha/gettimeofday.S: Likewise. * sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S: Likewise. * sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S: Likewise. * sysdeps/unix/sysv/linux/alpha/select.S: Likewise. * sysdeps/unix/sysv/linux/alpha/setitimer.S: Likewise. * sysdeps/unix/sysv/linux/alpha/settimeofday.S: Likewise. * sysdeps/unix/sysv/linux/alpha/utimes.S: Likewise. * sysdeps/unix/sysv/linux/alpha/wait4.S: Likewise. --- sysdeps/unix/sysv/linux/alpha/brk.S | 5 ++--- sysdeps/unix/sysv/linux/alpha/getitimer.S | 3 +-- sysdeps/unix/sysv/linux/alpha/getrusage.S | 3 +-- sysdeps/unix/sysv/linux/alpha/gettimeofday.S | 3 +-- sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S | 3 +-- sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S | 3 +-- sysdeps/unix/sysv/linux/alpha/select.S | 3 +-- sysdeps/unix/sysv/linux/alpha/setitimer.S | 3 +-- sysdeps/unix/sysv/linux/alpha/settimeofday.S | 3 +-- sysdeps/unix/sysv/linux/alpha/utimes.S | 3 +-- sysdeps/unix/sysv/linux/alpha/wait4.S | 3 +-- 11 files changed, 12 insertions(+), 23 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/brk.S b/sysdeps/unix/sysv/linux/alpha/brk.S index 6f994937d3..9ecd0d47a1 100644 --- a/sysdeps/unix/sysv/linux/alpha/brk.S +++ b/sysdeps/unix/sysv/linux/alpha/brk.S @@ -73,9 +73,8 @@ $ok: stq a0, __curbrk /* What a horrible way to die. */ $err0: ldi v0, ENOMEM -$err1: lda pv, __syscall_error - addq sp, 8, sp - jmp zero, (pv), __syscall_error +$err1: addq sp, 8, sp + jmp zero, __syscall_error END(__brk) diff --git a/sysdeps/unix/sysv/linux/alpha/getitimer.S b/sysdeps/unix/sysv/linux/alpha/getitimer.S index 9ba849fcac..08a3e1c94b 100644 --- a/sysdeps/unix/sysv/linux/alpha/getitimer.S +++ b/sysdeps/unix/sysv/linux/alpha/getitimer.S @@ -96,9 +96,8 @@ $do32: ldi v0, SYS_ify(osf_getitimer) .align 3 $error: - lda pv, __syscall_error addq sp, 16, sp - jmp zero, (pv), __syscall_error + jmp zero, __syscall_error END(GETITIMER) diff --git a/sysdeps/unix/sysv/linux/alpha/getrusage.S b/sysdeps/unix/sysv/linux/alpha/getrusage.S index 83cfc9e4e3..0c7fb1abbd 100644 --- a/sysdeps/unix/sysv/linux/alpha/getrusage.S +++ b/sysdeps/unix/sysv/linux/alpha/getrusage.S @@ -124,9 +124,8 @@ $do32: ldi v0, SYS_ify(osf_getrusage) .align 3 $error: - lda pv, __syscall_error addq sp, 16, sp - jmp zero, (pv), __syscall_error + jmp zero, __syscall_error END(GETRUSAGE) diff --git a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S index 6f7082f1b0..e56893b121 100644 --- a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S +++ b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S @@ -93,9 +93,8 @@ $do32: ldi v0, SYS_ify(osf_gettimeofday) .align 3 $error: - lda pv, __syscall_error addq sp, 16, sp - jmp zero, (pv), __syscall_error + jmp zero, __syscall_error END(GETTIMEOFDAY) diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S index e118ff19f5..ae559d9851 100644 --- a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S +++ b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S @@ -52,9 +52,8 @@ $error: br gp, 1f 1: ldgp gp, 0(gp) #endif - lda pv, __syscall_error lda sp, 16(sp) - jmp zero, (pv), __syscall_error + jmp zero, __syscall_error END(__ieee_get_fp_control) diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S index b38d67efac..779dc0b203 100644 --- a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S +++ b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S @@ -51,9 +51,8 @@ $error: br gp, 1f 1: ldgp gp, 0(gp) #endif - lda pv, __syscall_error lda sp, 16(sp) - jmp zero, (pv), __syscall_error + jmp zero, __syscall_error END(__ieee_set_fp_control) diff --git a/sysdeps/unix/sysv/linux/alpha/select.S b/sysdeps/unix/sysv/linux/alpha/select.S index c854f7fd30..704e71d753 100644 --- a/sysdeps/unix/sysv/linux/alpha/select.S +++ b/sysdeps/unix/sysv/linux/alpha/select.S @@ -107,9 +107,8 @@ $do32: .align 3 $error: - lda pv, __syscall_error addq sp, 64, sp - jmp zero, (pv), __syscall_error + jmp zero, __syscall_error END(SELECT) diff --git a/sysdeps/unix/sysv/linux/alpha/setitimer.S b/sysdeps/unix/sysv/linux/alpha/setitimer.S index e57acc2020..0fc5fe7f8a 100644 --- a/sysdeps/unix/sysv/linux/alpha/setitimer.S +++ b/sysdeps/unix/sysv/linux/alpha/setitimer.S @@ -112,9 +112,8 @@ $do32: .align 3 $error: - lda pv, __syscall_error addq sp, 48, sp - jmp zero, (pv), __syscall_error + jmp zero, __syscall_error END(SETITIMER) diff --git a/sysdeps/unix/sysv/linux/alpha/settimeofday.S b/sysdeps/unix/sysv/linux/alpha/settimeofday.S index ae129ecc1c..35c56020be 100644 --- a/sysdeps/unix/sysv/linux/alpha/settimeofday.S +++ b/sysdeps/unix/sysv/linux/alpha/settimeofday.S @@ -93,9 +93,8 @@ $do32: .align 3 $error: - lda pv, __syscall_error addq sp, 16, sp - jmp zero, (pv), __syscall_error + jmp zero, __syscall_error END(SETTIMEOFDAY) diff --git a/sysdeps/unix/sysv/linux/alpha/utimes.S b/sysdeps/unix/sysv/linux/alpha/utimes.S index a1d2b1513c..959ec859c5 100644 --- a/sysdeps/unix/sysv/linux/alpha/utimes.S +++ b/sysdeps/unix/sysv/linux/alpha/utimes.S @@ -98,9 +98,8 @@ $do32: .align 3 $error: - lda pv, __syscall_error addq sp, 16, sp - jmp zero, (pv), __syscall_error + jmp zero, __syscall_error END(UTIMES) diff --git a/sysdeps/unix/sysv/linux/alpha/wait4.S b/sysdeps/unix/sysv/linux/alpha/wait4.S index 334836f5aa..08b3a09b53 100644 --- a/sysdeps/unix/sysv/linux/alpha/wait4.S +++ b/sysdeps/unix/sysv/linux/alpha/wait4.S @@ -131,9 +131,8 @@ $do32: ldi v0, SYS_ify(osf_wait4) .align 3 $error: - lda pv, __syscall_error addq sp, 32, sp - jmp zero, (pv), __syscall_error + jmp zero, __syscall_error END(WAIT4) From 9b1370b85767bc5ff8c71865bcadbf68fda3487a Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sun, 23 Aug 1998 04:09:25 +0000 Subject: [PATCH 1351/4487] * sysdeps/alpha/fpu/e_sqrt.c: Use the asm version when the input is a finite non-denormal, deferring to the full IEEE version otherwise. --- sysdeps/alpha/fpu/e_sqrt.c | 247 ++++++++++++------------------------- 1 file changed, 77 insertions(+), 170 deletions(-) diff --git a/sysdeps/alpha/fpu/e_sqrt.c b/sysdeps/alpha/fpu/e_sqrt.c index 58de39f392..7b4e596664 100644 --- a/sysdeps/alpha/fpu/e_sqrt.c +++ b/sysdeps/alpha/fpu/e_sqrt.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. Contributed by David Mosberger (davidm@cs.arizona.edu). This file is part of the GNU C Library. @@ -18,16 +18,15 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* - * We have three versions, depending on how exact we need the results. - */ - -#if defined(_IEEE_FP) && defined(_IEEE_FP_INEXACT) -/* Most demanding: go to the original source. */ -#include +#if !defined(_IEEE_FP_INEXACT) -#else +/* + * This version is much faster than generic sqrt implementation, but + * it doesn't handle the inexact flag. It doesn't handle exceptional + * values either, but will defer to the full ieee754_sqrt routine which + * can. + */ /* Careful with rearranging this without consulting the assembly below. */ const static struct sqrt_data_struct { @@ -54,112 +53,6 @@ const static struct sqrt_data_struct { 0x1527f,0x1334a,0x11051,0xe951, 0xbe01, 0x8e0d, 0x5924, 0x1edd } }; -#ifdef _IEEE_FP -/* - * This version is much faster than the standard one included above, - * but it doesn't maintain the inexact flag. - */ - -#define lobits(x) (((unsigned int *)&x)[0]) -#define hibits(x) (((unsigned int *)&x)[1]) - -static inline double initial_guess(double x, unsigned int k, - const struct sqrt_data_struct * const ptr) -{ - double ret = 0.0; - - k = 0x5fe80000 - (k >> 1); - k = k - ptr->T2[63&(k>>14)]; - hibits(ret) = k; - return ret; -} - -/* up = nextafter(1,+Inf), dn = nextafter(1,-Inf) */ - -#define __half (ptr->half) -#define __one_and_a_half (ptr->one_and_a_half) -#define __two_to_minus_30 (ptr->two_to_minus_30) -#define __one (ptr->one) -#define __up (ptr->up) -#define __dn (ptr->dn) -#define __Nan (ptr->nan) - -#define Double(x) (*(double *)&x) - -/* Multiply with chopping rounding.. */ -#define choppedmul(a,b,c) \ - __asm__("multc %1,%2,%0":"=&f" (c):"f" (a), "f" (b)) - -double -__ieee754_sqrt(double x) -{ - const struct sqrt_data_struct * const ptr = &sqrt_data; - unsigned long k, bits; - double y, z, zp, zn; - double dn, up, low, high; - double half, one_and_a_half, one, two_to_minus_30; - - *(double *)&bits = x; - k = bits; - - /* Negative or NaN or Inf */ - if ((k >> 52) >= 0x7ff) - goto special; - y = initial_guess(x, k >> 32, ptr); - half = Double(__half); - one_and_a_half = Double(__one_and_a_half); - y = y*(one_and_a_half - half*x*y*y); - dn = Double(__dn); - two_to_minus_30 = Double(__two_to_minus_30); - y = y*((one_and_a_half - two_to_minus_30) - half*x*y*y); - up = Double(__up); - z = x*y; - one = Double(__one); - z = z + half*z*(one-z*y); - - choppedmul(z,dn,zp); - choppedmul(z,up,zn); - - choppedmul(z,zp,low); - low = low - x; - choppedmul(z,zn,high); - high = high - x; - - /* I can't get gcc to use fcmov's.. */ - __asm__("fcmovge %2,%3,%0" - :"=f" (z) - :"0" (z), "f" (low), "f" (zp)); - __asm__("fcmovlt %2,%3,%0" - :"=f" (z) - :"0" (z), "f" (high), "f" (zn)); - return z; /* Argh! gcc jumps to end here */ - -special: - /* throw away sign bit */ - k <<= 1; - /* -0 */ - if (!k) - return x; - /* special? */ - if ((k >> 53) == 0x7ff) { - /* NaN? */ - if (k << 11) - return x; - /* sqrt(+Inf) = +Inf */ - if (x > 0) - return x; - } - - x = Double(__Nan); - return x; -} - -#else -/* - * This version is much faster than generic sqrt implementation, but - * it doesn't handle exceptional values or the inexact flag. - */ - asm ("\ /* Define offsets into the structure defined in C above. */ $DN = 0*8 @@ -174,7 +67,7 @@ asm ("\ $Y = 8 .text - .align 3 + .align 5 .globl __ieee754_sqrt .ent __ieee754_sqrt __ieee754_sqrt: @@ -187,72 +80,86 @@ asm ("\ #endif " .prologue 1 - stt $f16, $K($sp) - lda $4, sqrt_data # load base address into t3 - fblt $f16, $negative - - /* Compute initial guess. */ + .align 4 + stt $f16, $K($sp) # e0 : + mult $f31, $f31, $f31 # .. fm : + lda $4, sqrt_data # e0 : + fblt $f16, $fixup # .. fa : - .align 3 - - ldah $2, 0x5fe8 # e0 : - ldq $3, $K($sp) # .. e1 : - ldt $f12, $HALF($4) # e0 : + ldah $2, 0x5fe8 # e0 : + ldq $3, $K($sp) # .. e1 : + ldt $f12, $HALF($4) # e0 : ldt $f18, $ALMOST_THREE_HALF($4) # .. e1 : - srl $3, 33, $1 # e0 : - mult $f16, $f12, $f11 # .. fm : $f11 = x * 0.5 - subl $2, $1, $2 # e0 : - addt $f12, $f12, $f17 # .. fa : $f17 = 1.0 - srl $2, 12, $1 # e0 : - and $1, 0xfc, $1 # .. e1 : - addq $1, $4, $1 # e0 : - ldl $1, $T2($1) # .. e1 : - addt $f12, $f17, $f15 # fa : $f15 = 1.5 - subl $2, $1, $2 # .. e1 : - sll $2, 32, $2 # e0 : - ldt $f14, $DN($4) # .. e1 : - stq $2, $Y($sp) # e0 : - nop # .. e1 : avoid pipe flash - nop # e0 : - ldt $f13, $Y($sp) # .. e1 : - mult/su $f11, $f13, $f10 # fm : $f10 = (x * 0.5) * y - mult $f10, $f13, $f10 # fm : $f10 = ((x * 0.5) * y) * y - subt $f15, $f10, $f1 # fa : $f1 = (1.5 - 0.5*x*y*y) - mult $f13, $f1, $f13 # fm : yp = y*(1.5 - 0.5*x*y*y) - mult/su $f11, $f13, $f1 # fm : $f11 = x * 0.5 * yp - mult $f1, $f13, $f11 # fm : $f11 = (x * 0.5 * yp) * yp - subt $f18, $f11, $f1 # fa : $f1= (1.5-2^-30) - 0.5*x*yp*yp - mult $f13, $f1, $f13 # fm : ypp = $f13 = yp*$f1 - subt $f15, $f12, $f1 # fa : $f1 = (1.5 - 0.5) - ldt $f15, $UP($4) # .. e1 : - mult/su $f16, $f13, $f10 # fm : z = $f10 = x * ypp - mult $f10, $f13, $f11 # fm : $f11 = z*ypp + sll $3, 52, $5 # e0 : + lda $6, 0x7fd # .. e1 : + fnop # .. fa : + fnop # .. fm : + + subq $5, 1, $5 # e1 : + srl $3, 33, $1 # .. e0 : + cmpule $5, $6, $5 # e0 : + beq $5, $fixup # .. e1 : + + mult $f16, $f12, $f11 # fm : $f11 = x * 0.5 + subl $2, $1, $2 # .. e0 : + addt $f12, $f12, $f17 # .. fa : $f17 = 1.0 + srl $2, 12, $1 # e0 : + + and $1, 0xfc, $1 # e0 : + addq $1, $4, $1 # e1 : + ldl $1, $T2($1) # e0 : + addt $f12, $f17, $f15 # .. fa : $f15 = 1.5 + + subl $2, $1, $2 # e0 : + ldt $f14, $DN($4) # .. e1 : + sll $2, 32, $2 # e0 : + stq $2, $Y($sp) # e0 : + + ldt $f13, $Y($sp) # e0 : + mult/su $f11, $f13, $f10 # fm 2: $f10 = (x * 0.5) * y + mult $f10, $f13, $f10 # fm 4: $f10 = ((x * 0.5) * y) * y + subt $f15, $f10, $f1 # fa 4: $f1 = (1.5 - 0.5*x*y*y) + + mult $f13, $f1, $f13 # fm 4: yp = y*(1.5 - 0.5*x*y*y) + mult/su $f11, $f13, $f1 # fm 4: $f11 = x * 0.5 * yp + mult $f1, $f13, $f11 # fm 4: $f11 = (x * 0.5 * yp) * yp + subt $f18, $f11, $f1 # fa 4: $f1= (1.5-2^-30) - 0.5*x*yp*yp + + mult $f13, $f1, $f13 # fm 4: ypp = $f13 = yp*$f1 + subt $f15, $f12, $f1 # .. fa : $f1 = (1.5 - 0.5) + ldt $f15, $UP($4) # .. e0 : + mult/su $f16, $f13, $f10 # fm 4: z = $f10 = x * ypp + + mult $f10, $f13, $f11 # fm 4: $f11 = z*ypp mult $f10, $f12, $f12 # fm : $f12 = z*0.5 - subt $f1, $f11, $f1 # .. fa : $f1 = 1 - z*ypp - mult $f12, $f1, $f12 # fm : $f12 = z*0.5*(1 - z*ypp) - addt $f10, $f12, $f0 # fa : zp=res=$f0= z + z*0.5*(1 - z*ypp) + subt $f1, $f11, $f1 # fa 4: $f1 = 1 - z*ypp + mult $f12, $f1, $f12 # fm 4: $f12 = z*0.5*(1 - z*ypp) - mult/c $f0, $f14, $f12 # fm : zmi = zp * DN + addt $f10, $f12, $f0 # fa 4: zp=res= z + z*0.5*(1 - z*ypp) + mult/c $f0, $f14, $f12 # fm 4: zmi = zp * DN mult/c $f0, $f15, $f11 # fm : zpl = zp * UP mult/c $f0, $f12, $f1 # fm : $f1 = zp * zmi - mult/c $f0, $f11, $f15 # fm : $f15 = zp * zpl - subt/su $f1, $f16, $f13 # fa : y1 = zp*zmi - x - subt/su $f15, $f16, $f14 # fa : y2 = zp*zpl - x - - fcmovge $f13, $f12, $f0 # res = (y1 >= 0) ? zmi : res - fcmovlt $f14, $f11, $f0 # res = (y2 < 0) ? zpl : res + mult/c $f0, $f11, $f15 # fm : $f15 = zp * zpl + subt/su $f1, $f16, $f13 # .. fa : y1 = zp*zmi - x + subt/su $f15, $f16, $f14 # fa 4: y2 = zp*zpl - x + fcmovge $f13, $f12, $f0 # fa 3: res = (y1 >= 0) ? zmi : res - addq $sp, 16, $sp # e0 : + fcmovlt $f14, $f11, $f0 # fa 4: res = (y2 < 0) ? zpl : res + addq $sp, 16, $sp # .. e0 : ret # .. e1 : -$negative: - ldt $f0, $NAN($4) + .align 4 +$fixup: addq $sp, 16, $sp - ret + br "ASM_ALPHA_NG_SYMBOL_PREFIX"__full_ieee754_sqrt..ng .end __ieee754_sqrt"); -#endif /* _IEEE_FP */ -#endif /* _IEEE_FP && _IEEE_FP_INEXACT */ +static double __full_ieee754_sqrt(double) __attribute__((unused)); +#define __ieee754_sqrt __full_ieee754_sqrt + +#endif /* _IEEE_FP_INEXACT */ + +#include From d7bb0de1781c1729ca07bc826348c825b7daaba2 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sun, 23 Aug 1998 04:09:49 +0000 Subject: [PATCH 1352/4487] * sysdeps/alpha/fpu/bits/mathinline.h (__floorf, __floor): Early out for -0. Optimize for !_IEEE_FP_INEXACT. * sysdeps/alpha/fpu/s_floor.c: New. * sysdeps/alpha/fpu/s_floorf.c: New. * sysdeps/alpha/fpu/s_ceil.c: New. * sysdeps/alpha/fpu/s_ceilf.c: New. --- sysdeps/alpha/fpu/bits/mathinline.h | 28 +++++++++----- sysdeps/alpha/fpu/s_ceil.c | 58 ++++++++++++++++++++++++++++ sysdeps/alpha/fpu/s_ceilf.c | 59 +++++++++++++++++++++++++++++ sysdeps/alpha/fpu/s_floor.c | 39 +++++++++++++++++++ sysdeps/alpha/fpu/s_floorf.c | 35 +++++++++++++++++ 5 files changed, 209 insertions(+), 10 deletions(-) create mode 100644 sysdeps/alpha/fpu/s_ceil.c create mode 100644 sysdeps/alpha/fpu/s_ceilf.c create mode 100644 sysdeps/alpha/fpu/s_floor.c create mode 100644 sysdeps/alpha/fpu/s_floorf.c diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h index 492d9f18a7..681ea70cf9 100644 --- a/sysdeps/alpha/fpu/bits/mathinline.h +++ b/sysdeps/alpha/fpu/bits/mathinline.h @@ -75,7 +75,7 @@ __inline_copysign(copysign, double) #undef __MATH_INLINE_copysign -#if defined __GNUC__ && (__GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ >= 8) +#if defined __GNUC__ && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8)) __MATH_INLINE float __fabsf (float __x) { return __builtin_fabsf (__x); } __MATH_INLINE float fabsf (float __x) { return __builtin_fabsf (__x); } __MATH_INLINE double __fabs (double __x) { return __builtin_fabs (__x); } @@ -106,7 +106,8 @@ __inline_fabs(fabs, double) __MATH_INLINE float __floorf (float __x) { - if (fabsf (__x) < 16777216.0f) /* 1 << FLT_MANT_DIG */ + /* Check not zero since floor(-0) == -0. */ + if (__x != 0 && fabsf (__x) < 16777216.0f) /* 1 << FLT_MANT_DIG */ { /* Note that Alpha S_Floating is stored in registers in a restricted T_Floating format, so we don't even need to @@ -116,10 +117,13 @@ __floorf (float __x) float __tmp1, __tmp2; __asm ("cvtst/s %3,%2\n\t" +#ifdef _IEEE_FP_INEXACT "cvttq/svim %2,%1\n\t" - "cvtqt/suim %1,%0\n\t" - "trapb" - : "=&f"(__x), "=&f"(__tmp1), "=&f"(__tmp2) +#else + "cvttq/svm %2,%1\n\t" +#endif + "cvtqt/m %1,%0\n\t" + : "=f"(__x), "=&f"(__tmp1), "=&f"(__tmp2) : "f"(__x)); } return __x; @@ -128,13 +132,17 @@ __floorf (float __x) __MATH_INLINE double __floor (double __x) { - if (fabs (__x) < 9007199254740992.0) /* 1 << DBL_MANT_DIG */ + if (__x != 0 && fabs (__x) < 9007199254740992.0) /* 1 << DBL_MANT_DIG */ { double __tmp1; - __asm ("cvttq/svim %2,%1\n\t" - "cvtqt/suim %1,%0\n\t" - "trapb" - : "=&f"(__x), "=&f"(__tmp1) + __asm ( +#ifdef _IEEE_FP_INEXACT + "cvttq/svim %2,%1\n\t" +#else + "cvttq/svm %2,%1\n\t" +#endif + "cvtqt/m %1,%0\n\t" + : "=f"(__x), "=&f"(__tmp1) : "f"(__x)); } return __x; diff --git a/sysdeps/alpha/fpu/s_ceil.c b/sysdeps/alpha/fpu/s_ceil.c new file mode 100644 index 0000000000..23491db5ac --- /dev/null +++ b/sysdeps/alpha/fpu/s_ceil.c @@ -0,0 +1,58 @@ +/* Copyright (C) 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +double +__ceil (double x) +{ + if (x != 0 && fabs (x) < 9007199254740992.0) /* 1 << DBL_MANT_DIG */ + { + double tmp1; + unsigned long fpcr0, fpcr1; + unsigned long pinf = 3UL << 58; + + /* Set round to +inf. */ + __asm __volatile("excb; mf_fpcr %0" : "=f"(fpcr0)); + __asm __volatile("mt_fpcr %0; excb" : : "f"(fpcr0 | pinf)); + + /* Calculate! */ +#ifdef _IEEE_FP_INEXACT + __asm("cvttq/svid %2,%1\n\tcvtqt/suid %1,%0" + : "=f"(x), "=&f"(tmp1) + : "f"(x)); +#else + __asm("cvttq/svd %2,%1\n\tcvtqt/d %1,%0" + : "=f"(x), "=&f"(tmp1) + : "f"(x)); +#endif + + /* Reset rounding mode, while retaining new exception bits. */ + __asm __volatile("excb; mf_fpcr %0" : "=f"(fpcr1)); + fpcr0 = (fpcr0 & pinf) | (fpcr1 & ~pinf); + __asm __volatile("mt_fpcr %0; excb" : : "f"(fpcr0)); + } + return x; +} + +weak_alias (__ceil, ceil) +#ifdef NO_LONG_DOUBLE +strong_alias (__ceil, __ceill) +weak_alias (__ceil, ceill) +#endif diff --git a/sysdeps/alpha/fpu/s_ceilf.c b/sysdeps/alpha/fpu/s_ceilf.c new file mode 100644 index 0000000000..3defaeb01e --- /dev/null +++ b/sysdeps/alpha/fpu/s_ceilf.c @@ -0,0 +1,59 @@ +/* Copyright (C) 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +float +__ceilf (float x) +{ + if (x != 0 && fabsf (x) < 16777216.0f) /* 1 << FLT_MANT_DIG */ + { + float tmp1, tmp2; + unsigned long fpcr0, fpcr1; + unsigned long pinf = 3UL << 58; + + /* Set round to +inf. */ + __asm __volatile("excb; mf_fpcr %0" : "=f"(fpcr0)); + __asm __volatile("mt_fpcr %0; excb" : : "f"(fpcr0 | pinf)); + + /* Calculate! + Note that Alpha S_Floating is stored in registers in a + restricted T_Floating format, so we don't even need to + convert back to S_Floating in the end. The initial + conversion to T_Floating is needed to handle denormals. */ + +#ifdef _IEEE_FP_INEXACT + __asm("cvtst/s %3,%2\n\tcvttq/svid %2,%1\n\tcvtqt/suid %1,%0" + : "=f"(x), "=&f"(tmp1), "=&f"(tmp2) + : "f"(x)); +#else + __asm("cvtst/s %3,%2\n\tcvttq/svd %2,%1\n\tcvtqt/d %1,%0" + : "=f"(x), "=&f"(tmp1), "=&f"(tmp2) + : "f"(x)); +#endif + + /* Reset rounding mode, while retaining new exception bits. */ + __asm __volatile("excb; mf_fpcr %0" : "=f"(fpcr1)); + fpcr0 = (fpcr0 & pinf) | (fpcr1 & ~pinf); + __asm __volatile("mt_fpcr %0; excb" : : "f"(fpcr0)); + } + return x; +} + +weak_alias (__ceilf, ceilf) diff --git a/sysdeps/alpha/fpu/s_floor.c b/sysdeps/alpha/fpu/s_floor.c new file mode 100644 index 0000000000..7b647923e2 --- /dev/null +++ b/sysdeps/alpha/fpu/s_floor.c @@ -0,0 +1,39 @@ +/* Copyright (C) 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef __USE_EXTERN_INLINES +#define __USE_EXTERN_INLINES +#endif +#define __floor __i_floor + +#include + +#undef __floor + +double +__floor (double x) +{ + return __i_floor(x); +} + +weak_alias (__floor, floor) +#ifdef NO_LONG_DOUBLE +strong_alias (__floor, __floorl) +weak_alias (__floor, floorl) +#endif diff --git a/sysdeps/alpha/fpu/s_floorf.c b/sysdeps/alpha/fpu/s_floorf.c new file mode 100644 index 0000000000..d25643d19e --- /dev/null +++ b/sysdeps/alpha/fpu/s_floorf.c @@ -0,0 +1,35 @@ +/* Copyright (C) 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef __USE_EXTERN_INLINES +#define __USE_EXTERN_INLINES +#endif +#define __floorf __i_floorf + +#include + +#undef __floorf + +float +__floorf (float x) +{ + return __i_floorf(x); +} + +weak_alias (__floorf, floorf) From d7eae898a7c28564882f3747e09c7e1cf15108d4 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 24 Aug 1998 01:42:29 +0000 Subject: [PATCH 1353/4487] * sysdeps/unix/sysv/linux/m68k/Makefile (sysdep_headers): Add sys/reg.h. * sysdeps/unix/sysv/linux/m68k/sys/reg.h: New file. * sysdeps/unix/sysv/linux/m68k/Dist: Distribute it. --- sysdeps/unix/sysv/linux/m68k/Dist | 1 + sysdeps/unix/sysv/linux/m68k/Makefile | 1 + sysdeps/unix/sysv/linux/m68k/sys/reg.h | 89 ++++++++++++++++++++++++++ 3 files changed, 91 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/sys/reg.h diff --git a/sysdeps/unix/sysv/linux/m68k/Dist b/sysdeps/unix/sysv/linux/m68k/Dist index 25aa20bcfa..103e273817 100644 --- a/sysdeps/unix/sysv/linux/m68k/Dist +++ b/sysdeps/unix/sysv/linux/m68k/Dist @@ -1,3 +1,4 @@ bits/mman.h clone.S mremap.S +sys/reg.h diff --git a/sysdeps/unix/sysv/linux/m68k/Makefile b/sysdeps/unix/sysv/linux/m68k/Makefile index 3cedf6322e..71cee22442 100644 --- a/sysdeps/unix/sysv/linux/m68k/Makefile +++ b/sysdeps/unix/sysv/linux/m68k/Makefile @@ -4,6 +4,7 @@ m68k-syntax-flag = -DMOTOROLA_SYNTAX ifeq ($(subdir),misc) sysdep_routines += mremap +sysdep_headers += sys/reg.h endif ifeq ($(subdir),elf) diff --git a/sysdeps/unix/sysv/linux/m68k/sys/reg.h b/sysdeps/unix/sysv/linux/m68k/sys/reg.h new file mode 100644 index 0000000000..0f3a13382d --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/sys/reg.h @@ -0,0 +1,89 @@ +/* Copyright (C) 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_REG_H +#define _SYS_REG_H 1 + +/* Index into an array of 4 byte integers returned from ptrace for + location of the users' stored general purpose registers. */ + +enum +{ + PT_D1 = 0, +#define PT_D1 PT_D1 + PT_D2 = 1, +#define PT_D2 PT_D2 + PT_D3 = 2, +#define PT_D3 PT_D3 + PT_D4 = 3, +#define PT_D4 PT_D4 + PT_D5 = 4, +#define PT_D5 PT_D5 + PT_D6 = 5, +#define PT_D6 PT_D6 + PT_D7 = 6, +#define PT_D7 PT_D7 + PT_A0 = 7, +#define PT_A0 PT_A0 + PT_A1 = 8, +#define PT_A1 PT_A1 + PT_A2 = 9, +#define PT_A2 PT_A2 + PT_A3 = 10, +#define PT_A3 PT_A3 + PT_A4 = 11, +#define PT_A4 PT_A4 + PT_A5 = 12, +#define PT_A5 PT_A5 + PT_A6 = 13, +#define PT_A6 PT_A6 + PT_D0 = 14, +#define PT_D0 PT_D0 + PT_USP = 15, +#define PT_USP PT_USP + PT_ORIG_D0 = 16, +#define PT_ORIG_D0 PT_ORIG_D0 + PT_SR = 17, +#define PT_SR PT_SR + PT_PC = 18, +#define PT_PC PT_PC + PT_FP0 = 21, +#define PT_FP0 PT_FP0 + PT_FP1 = 24, +#define PT_FP1 PT_FP1 + PT_FP2 = 27, +#define PT_FP2 PT_FP2 + PT_FP3 = 30, +#define PT_FP3 PT_FP3 + PT_FP4 = 33, +#define PT_FP4 PT_FP4 + PT_FP5 = 36, +#define PT_FP5 PT_FP5 + PT_FP6 = 39, +#define PT_FP6 PT_FP6 + PT_FP7 = 42, +#define PT_FP7 PT_FP7 + PT_FPCR = 45, +#define PT_FPCR PT_FPCR + PT_FPSR = 46, +#define PT_FPSR PT_FPSR + PT_FPIAR = 47 +#define PT_FPIAR PT_FPIAR +}; + +#endif /* _SYS_REG_H */ From 1af688f19cfe38e90eab09ba481e537a2c9a0703 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 26 Aug 1998 00:06:05 +0000 Subject: [PATCH 1354/4487] Define O_DIRECT. Correct comment for O_LARGEFILE. --- sysdeps/unix/sysv/linux/alpha/bits/fcntl.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h index 0dc0c47b1a..7cd32a34a3 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h @@ -43,7 +43,11 @@ #define O_FSYNC O_SYNC #define O_ASYNC 020000 /* fcntl, for BSD compatibility */ -/* XXX missing */ +#ifdef __USE_GNU +# define O_DIRECT 040000 /* Direct disk access. */ +#endif + +/* Not necessary, files are always with 64bit off_t. */ #define O_LARGEFILE 0 /* Values for the second argument to `fcntl'. */ From f35b9f2a88e237e2849417163d2bc72215409de6 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 28 Aug 1998 01:42:42 +0000 Subject: [PATCH 1355/4487] * sysdeps/unix/sysv/linux/m68k/register-dump.h: New file. --- sysdeps/unix/sysv/linux/m68k/register-dump.h | 214 +++++++++++++++++++ 1 file changed, 214 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/register-dump.h diff --git a/sysdeps/unix/sysv/linux/m68k/register-dump.h b/sysdeps/unix/sysv/linux/m68k/register-dump.h new file mode 100644 index 0000000000..6e66b62f5b --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/register-dump.h @@ -0,0 +1,214 @@ +/* Dump registers. + Copyright (C) 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Schwab . + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include + +/* We will print the register dump in this format: + + D0: XXXXXXXX D1: XXXXXXXX D2: XXXXXXXX D3: XXXXXXXX + D4: XXXXXXXX D5: XXXXXXXX D6: XXXXXXXX D7: XXXXXXXX + A0: XXXXXXXX A1: XXXXXXXX A2: XXXXXXXX A3: XXXXXXXX + A4: XXXXXXXX A5: XXXXXXXX A6: XXXXXXXX A7: XXXXXXXX + PC: XXXXXXXX SR: XXXX + + OldMask: XXXXXXXX Vector: XXXX + + FP0: XXXXXXXXXXXXXXXXXXXXXXXX FP1: XXXXXXXXXXXXXXXXXXXXXXXX + FP2: XXXXXXXXXXXXXXXXXXXXXXXX FP3: XXXXXXXXXXXXXXXXXXXXXXXX + FP4: XXXXXXXXXXXXXXXXXXXXXXXX FP5: XXXXXXXXXXXXXXXXXXXXXXXX + FP6: XXXXXXXXXXXXXXXXXXXXXXXX FP7: XXXXXXXXXXXXXXXXXXXXXXXX + FPCR: XXXXXXXX FPSR: XXXXXXXX FPIAR: XXXXXXXX + +*/ + +/* Linux saves only the call-clobbered registers in the sigcontext. We + need to use a trampoline that saves the rest so that the C code can + access them. We use the sc_fpstate field, since the handler is not + supposed to return anyway, thus it doesn't matter that it's clobbered. */ + +/* static */ void catch_segfault (int, int, struct sigcontext *); + +/* Dummy function so that we can use asm with arguments. */ +static void __attribute__ ((unused)) +__dummy__ (void) +{ + asm (" +catch_segfault: + move.l 12(%%sp),%%a0 + lea %c0(%%a0),%%a0 + /* Clear the first 4 bytes to make it a null fp state, just + in case the handler does return. */ + clr.l (%%a0)+ + movem.l %%d2-%%d7/%%a2-%%a6,(%%a0) + fmovem.x %%fp2-%%fp7,11*4(%%a0) + jra real_catch_segfault" + : : "n" (offsetof (struct sigcontext, sc_fpstate))); +} +#define catch_segfault(a,b) \ + __attribute__ ((unused)) real_catch_segfault(a,b) + +static void +hexvalue (unsigned long int value, char *buf, size_t len) +{ + char *cp = _itoa_word (value, buf + len, 16, 0); + while (cp > buf) + *--cp = '0'; +} + +static void +register_dump (int fd, struct sigcontext *ctx) +{ + char regs[20][8]; + char fpregs[11][24]; + struct iovec iov[63], *next_iov = iov; + unsigned long *p = (unsigned long *) ctx->sc_fpstate + 1; + +#define ADD_STRING(str) \ + next_iov->iov_base = (char *) (str); \ + next_iov->iov_len = strlen (str); \ + ++next_iov +#define ADD_MEM(str, len) \ + next_iov->iov_base = (str); \ + next_iov->iov_len = (len); \ + ++next_iov + + /* Generate strings of register contents. */ + hexvalue (ctx->sc_d0, regs[0], 8); + hexvalue (ctx->sc_d1, regs[1], 8); + hexvalue (*p++, regs[2], 8); + hexvalue (*p++, regs[3], 8); + hexvalue (*p++, regs[4], 8); + hexvalue (*p++, regs[5], 8); + hexvalue (*p++, regs[6], 8); + hexvalue (*p++, regs[7], 8); + hexvalue (ctx->sc_a0, regs[8], 8); + hexvalue (ctx->sc_a1, regs[9], 8); + hexvalue (*p++, regs[10], 8); + hexvalue (*p++, regs[11], 8); + hexvalue (*p++, regs[12], 8); + hexvalue (*p++, regs[13], 8); + hexvalue (*p++, regs[14], 8); + hexvalue (ctx->sc_usp, regs[15], 8); + hexvalue (ctx->sc_pc, regs[16], 8); + hexvalue (ctx->sc_sr, regs[17], 4); + hexvalue (ctx->sc_mask, regs[18], 8); + hexvalue (ctx->sc_formatvec & 0xfff, regs[19], 4); + hexvalue (ctx->sc_fpregs[0], fpregs[0], 8); + hexvalue (ctx->sc_fpregs[1], fpregs[0] + 8, 8); + hexvalue (ctx->sc_fpregs[2], fpregs[0] + 16, 8); + hexvalue (ctx->sc_fpregs[3], fpregs[1], 8); + hexvalue (ctx->sc_fpregs[4], fpregs[1] + 8, 8); + hexvalue (ctx->sc_fpregs[5], fpregs[1] + 16, 8); + hexvalue (*p++, fpregs[2], 8); + hexvalue (*p++, fpregs[2] + 8, 8); + hexvalue (*p++, fpregs[2] + 16, 8); + hexvalue (*p++, fpregs[3], 8); + hexvalue (*p++, fpregs[3] + 8, 8); + hexvalue (*p++, fpregs[3] + 16, 8); + hexvalue (*p++, fpregs[4], 8); + hexvalue (*p++, fpregs[4] + 8, 8); + hexvalue (*p++, fpregs[4] + 16, 8); + hexvalue (*p++, fpregs[5], 8); + hexvalue (*p++, fpregs[5] + 8, 8); + hexvalue (*p++, fpregs[5] + 16, 8); + hexvalue (*p++, fpregs[6], 8); + hexvalue (*p++, fpregs[6] + 8, 8); + hexvalue (*p++, fpregs[6] + 16, 8); + hexvalue (*p++, fpregs[7], 8); + hexvalue (*p++, fpregs[7] + 8, 8); + hexvalue (*p++, fpregs[7] + 16, 8); + hexvalue (ctx->sc_fpcntl[0], fpregs[8], 8); + hexvalue (ctx->sc_fpcntl[1], fpregs[9], 8); + hexvalue (ctx->sc_fpcntl[2], fpregs[10], 8); + + /* Generate the output. */ + ADD_STRING ("Register dump:\n\n D0: "); + ADD_MEM (regs[0], 8); + ADD_STRING (" D1: "); + ADD_MEM (regs[1], 8); + ADD_STRING (" D2: "); + ADD_MEM (regs[2], 8); + ADD_STRING (" D3: "); + ADD_MEM (regs[3], 8); + ADD_STRING ("\n D4: "); + ADD_MEM (regs[4], 8); + ADD_STRING (" D5: "); + ADD_MEM (regs[5], 8); + ADD_STRING (" D6: "); + ADD_MEM (regs[6], 8); + ADD_STRING (" D7: "); + ADD_MEM (regs[7], 8); + ADD_STRING ("\n A0: "); + ADD_MEM (regs[8], 8); + ADD_STRING (" A1: "); + ADD_MEM (regs[9], 8); + ADD_STRING (" A2: "); + ADD_MEM (regs[10], 8); + ADD_STRING (" A3: "); + ADD_MEM (regs[11], 8); + ADD_STRING ("\n A4: "); + ADD_MEM (regs[12], 8); + ADD_STRING (" A5: "); + ADD_MEM (regs[13], 8); + ADD_STRING (" A6: "); + ADD_MEM (regs[14], 8); + ADD_STRING (" A7: "); + ADD_MEM (regs[15], 8); + ADD_STRING ("\n PC: "); + ADD_MEM (regs[16], 8); + ADD_STRING (" SR: "); + ADD_MEM (regs[17], 4); + + ADD_STRING ("\n\n OldMask: "); + ADD_MEM (regs[18], 8); + ADD_STRING (" Vector: "); + ADD_MEM (regs[19], 4); + + ADD_STRING ("\n\n FP0: "); + ADD_MEM (fpregs[0], 24); + ADD_STRING (" FP1: "); + ADD_MEM (fpregs[1], 24); + ADD_STRING ("\n FP2: "); + ADD_MEM (fpregs[2], 24); + ADD_STRING (" FP3: "); + ADD_MEM (fpregs[3], 24); + ADD_STRING ("\n FP4: "); + ADD_MEM (fpregs[4], 24); + ADD_STRING (" FP5: "); + ADD_MEM (fpregs[5], 24); + ADD_STRING ("\n FP6: "); + ADD_MEM (fpregs[6], 24); + ADD_STRING (" FP7: "); + ADD_MEM (fpregs[7], 24); + ADD_STRING ("\n FPCR: "); + ADD_MEM (fpregs[8], 8); + ADD_STRING (" FPSR: "); + ADD_MEM (fpregs[9], 8); + ADD_STRING (" FPIAR: "); + ADD_MEM (fpregs[10], 8); + ADD_STRING ("\n"); + + /* Write the stuff out. */ + writev (fd, iov, next_iov - iov); +} + +#define REGISTER_DUMP register_dump (fd, ctx) From 68d11b268ef545ce6a14ba574836609b36fd783a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 28 Aug 1998 22:54:12 +0000 Subject: [PATCH 1356/4487] (elf_machine_lazy_rel): Change first parameter and use this value. --- sysdeps/alpha/dl-machine.h | 6 +++--- sysdeps/arm/dl-machine.h | 8 ++++---- sysdeps/m68k/dl-machine.h | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 8f639a94b9..648fb78ab0 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -448,16 +448,16 @@ elf_machine_rela (struct link_map *map, } static inline void -elf_machine_lazy_rel (struct link_map *map, const Elf64_Rela *reloc) +elf_machine_lazy_rel (Elf64_Addr l_addr, const Elf64_Rela *reloc) { - Elf64_Addr * const reloc_addr = (void *)(map->l_addr + reloc->r_offset); + Elf64_Addr * const reloc_addr = (void *)(l_addr + reloc->r_offset); unsigned long const r_type = ELF64_R_TYPE (reloc->r_info); if (r_type == R_ALPHA_JMP_SLOT) { /* Perform a RELATIVE reloc on the .got entry that transfers to the .plt. */ - *reloc_addr += map->l_addr; + *reloc_addr += l_addr; } else if (r_type == R_ALPHA_NONE) return; diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index c40f9d7260..49e9d085aa 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -166,7 +166,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) mov pc, ip .size _dl_runtime_resolve, .-_dl_runtime_resolve - + .globl _dl_runtime_profile .type _dl_runtime_profile, #function .align 2 @@ -449,13 +449,13 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, } static inline void -elf_machine_lazy_rel (struct link_map *map, const Elf32_Rel *reloc) +elf_machine_lazy_rel (Elf32_Addr l_addr, const Elf32_Rel *reloc) { - Elf32_Addr *const reloc_addr = (void *) (map->l_addr + reloc->r_offset); + Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset); switch (ELF32_R_TYPE (reloc->r_info)) { case R_ARM_JUMP_SLOT: - *reloc_addr += map->l_addr; + *reloc_addr += l_addr; break; default: assert (! "unexpected PLT reloc type"); diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index 3e574802c4..b8911dccc7 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -320,13 +320,13 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, } static inline void -elf_machine_lazy_rel (struct link_map *map, const Elf32_Rela *reloc) +elf_machine_lazy_rel (Elf32_Addr l_addr, const Elf32_Rela *reloc) { - Elf32_Addr *const reloc_addr = (void *) (map->l_addr + reloc->r_offset); + Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset); switch (ELF32_R_TYPE (reloc->r_info)) { case R_68K_JMP_SLOT: - *reloc_addr += map->l_addr; + *reloc_addr += l_addr; break; default: assert (! "unexpected PLT reloc type"); From 8d897cf4178521eabea370429d5dafc8f9edb523 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 28 Aug 1998 22:54:33 +0000 Subject: [PATCH 1357/4487] (elf_machine_lazy_rel): Change first parameter. --- sysdeps/mips/dl-machine.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 7ee2e20343..bbd22d8777 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. MIPS version. - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Kazumoto Kojima . @@ -582,7 +582,7 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, } static inline void -elf_machine_lazy_rel (struct link_map *map, const ElfW(Rel) *reloc) +elf_machine_lazy_rel (Elf32_addr l_addr, const ElfW(Rel) *reloc) { /* Do nothing. */ } From 55bdcfe5d94794892fc1aa8f1504861e50c1ecdc Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 31 Aug 1998 16:04:06 +0000 Subject: [PATCH 1358/4487] (ENOMSG): Remove duplicate. --- sysdeps/standalone/bits/errno.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sysdeps/standalone/bits/errno.h b/sysdeps/standalone/bits/errno.h index d4030b7f44..d4f7879280 100644 --- a/sysdeps/standalone/bits/errno.h +++ b/sysdeps/standalone/bits/errno.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1994, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1994, 1996, 1997, 1998 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 @@ -39,7 +39,6 @@ # define ENOMSG 11 # define ENAMETOOLONG 12 # define ELOOP 13 -# define ENOMSG 14 # define E2BIG 15 # define EINTR 16 # define ENOEXEC 18 From a2ffe12b49e82c9d6f8158aaa34a30cdb3129011 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 9 Sep 1998 01:35:38 +0000 Subject: [PATCH 1359/4487] * sysdeps/m68k/fpu/bits/mathinline.h (isinf): Avoid conflict with C9x macro. --- sysdeps/m68k/fpu/bits/mathinline.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/fpu/bits/mathinline.h index e5eb591e30..b1e2a75f1b 100644 --- a/sysdeps/m68k/fpu/bits/mathinline.h +++ b/sysdeps/m68k/fpu/bits/mathinline.h @@ -442,7 +442,9 @@ __inline_forward(double,frexp, (double __value, int *__expptr), __inline_forward_c(double,floor, (double __x), (__x)) __inline_forward_c(double,ceil, (double __x), (__x)) # ifdef __USE_MISC +# ifndef __USE_ISOC9X /* Conflict with macro of same name. */ __inline_forward_c(int,isinf, (double __value), (__value)) +# endif __inline_forward_c(int,finite, (double __value), (__value)) __inline_forward_c(double,scalbn, (double __x, int __n), (__x, __n)) # endif From 739902c55d0731df1a6da9b3e6ff0cabaa694461 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 9 Sep 1998 01:36:38 +0000 Subject: [PATCH 1360/4487] * sysdeps/m68k/dl-machine.h(RTLD_START): Push _dl_main_searchlist instead of _dl_default_scope[2] as argument to _dl_init_next. --- sysdeps/m68k/dl-machine.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index b8911dccc7..a4affcc0f0 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -180,8 +180,9 @@ asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \ lea (%sp, %d0*4), %sp | Push back the modified argument count. move.l %d1, -(%sp) -0: | Push _dl_default_scope[2] as argument in _dl_init_next call below. - move.l ([_dl_default_scope@GOT.w, %a5], 8), %d2 +0: | Push the searchlist of the main object as argument in + | the _dl_init_next call below. + move.l ([_dl_main_searchlist@GOT.w, %a5]), %d2 0: move.l %d2, -(%sp) | Call _dl_init_next to return the address of an initializer | function to run. From 831f9aedc478acaa2446a1eef35eaba25ffcf876 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 11 Sep 1998 13:48:14 +0000 Subject: [PATCH 1361/4487] * sysdeps/alpha/dl-machine.h (_dl_start_user): Pass pointer to _dl_main_searchlist not _dl_default_scope to _dl_init_next. * sysdeps/sparc/sparc32/dl-machine.h (_dl_start_user): Likewise. * sysdeps/sparc/sparc64/dl-machine.h (_dl_start_user): Likewise. --- sysdeps/alpha/dl-machine.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 648fb78ab0..b63661f6f3 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -251,8 +251,8 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) subq $2, $1, $2 s8addq $1, $sp, $sp stq $2, 0($sp) - /* Load _dl_default_scope[2] into s1 to pass to _dl_init_next. */ -0: ldq $10, _dl_default_scope+16 + /* Load _dl_main_searchlist into s1 to pass to _dl_init_next. */ +0: ldq $10, _dl_main_searchlist /* Call _dl_init_next to return the address of an initializer function to run. */ 1: mov $10, $16 From 190df176a74c67fdedba752c5e484c190b576596 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 11 Sep 1998 18:18:17 +0000 Subject: [PATCH 1362/4487] Wrapper around Linux version of this file. The code can be shared. --- sysdeps/unix/sysv/sysv4/solaris2/sigwaitinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sigwaitinfo.c b/sysdeps/unix/sysv/sysv4/solaris2/sigwaitinfo.c index 026e61102e..f246640023 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/sigwaitinfo.c +++ b/sysdeps/unix/sysv/sysv4/solaris2/sigwaitinfo.c @@ -1,2 +1,2 @@ /* We can reuse the Linux implementation. */ -#include +#include From 69e46a642c02686a6e4891b7e4114aab38800fdc Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 11 Sep 1998 18:18:39 +0000 Subject: [PATCH 1363/4487] Solaris 2 definitions for sigstack/sigaltstack. --- .../unix/sysv/sysv4/solaris2/bits/sigstack.h | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/solaris2/bits/sigstack.h diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/sigstack.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/sigstack.h new file mode 100644 index 0000000000..6c6ccae6a5 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/sigstack.h @@ -0,0 +1,55 @@ +/* sigstack, sigaltstack definitions. + Copyright (C) 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SIGNAL_H +# error "Never include this file directly. Use instead" +#endif + + +/* Structure describing a signal stack (obsolete). */ +struct sigstack + { + __ptr_t ss_sp; /* Signal stack pointer. */ + int ss_onstack; /* Nonzero if executing on this stack. */ + }; + + +/* Possible values for `ss_flags.'. */ +enum +{ + SS_ONSTACK = 1, +#define SS_ONSTACK SS_ONSTACK + SS_DISABLE +#define SS_DISABLE SS_DISABLE +}; + +/* Minimum stack size for a signal handler. */ +#define MINSIGSTKSZ 2048 + +/* System default stack size. */ +#define SIGSTKSZ 8192 + + +/* Alternate, preferred interface. */ +typedef struct sigaltstack + { + __ptr_t ss_sp; + size_t ss_size; + int ss_flags; + } stack_t; From a256afab2c7a505d80fdfa2ca316b3e5afe077e4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 11 Sep 1998 18:19:01 +0000 Subject: [PATCH 1364/4487] Solaris 2 trap definitions. --- .../unix/sysv/sysv4/solaris2/sparc/sys/trap.h | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/solaris2/sparc/sys/trap.h diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys/trap.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys/trap.h new file mode 100644 index 0000000000..411d23e5bd --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys/trap.h @@ -0,0 +1,36 @@ +/* Copyright (C) 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_TRAP_H +#define _SYS_TRAP_H 1 + +/* Solaris2 software traps. */ + +#define ST_OSYSCALL 0x00 +#define ST_BREAKPOINT 0x01 +#define ST_DIV0 0x02 +#define ST_FLUSH_WINDOWS 0x03 +#define ST_CLEAN_WINDOWS 0x04 +#define ST_RANGE_CHECK 0x05 +#define ST_FIX_ALIGN 0x06 +#define ST_INT_OVERFLOW 0x07 +#define ST_SYSCALL 0x08 + +/* Traps 0x10 through 0x1f are allotted to the user. */ + +#endif /* sys/trap.h */ From badbd76bb8508bd0b65543691782f7a6fcf76476 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 11 Sep 1998 18:19:16 +0000 Subject: [PATCH 1365/4487] Solaris 2 ucontext definitions. --- .../sysv/sysv4/solaris2/sparc/sys/ucontext.h | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/solaris2/sparc/sys/ucontext.h diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys/ucontext.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys/ucontext.h new file mode 100644 index 0000000000..4a32f816c9 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys/ucontext.h @@ -0,0 +1,42 @@ +/* Copyright (C) 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_UCONTEXT_H +#define _SYS_UCONTEXT_H 1 + +#include +#include +#include + +typedef struct +{ + long int mc_filler[78]; +} mcontext_t; + +struct ucontext +{ + unsigned long int uc_flags; + struct ucontext *uc_link; + sigset_t uc_sigmask; + stack_t uc_stack; + mcontext_t uc_mcontext; + long int uc_filler[23]; +}; +typedef struct ucontext ucontext_t; + +#endif /* sys/ucontext.h */ From 5c39892183f856cb2a293c6a3e4d202bb8967551 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 11 Sep 1998 18:19:33 +0000 Subject: [PATCH 1366/4487] Solaris 2 vrsion of param.h. --- sysdeps/unix/sysv/sysv4/solaris2/sys/param.h | 59 ++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/solaris2/sys/param.h diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sys/param.h b/sysdeps/unix/sysv/sysv4/solaris2/sys/param.h new file mode 100644 index 0000000000..3afb17a03c --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/solaris2/sys/param.h @@ -0,0 +1,59 @@ +/* Copyright (C) 1995, 1996, 1997, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_PARAM_H +#define _SYS_PARAM_H 1 + +#include + +/* BSD names for some values. */ + +#define NBBY CHAR_BIT +#ifndef NGROUPS +# define NGROUPS NGROUPS_MAX +#endif +#define MAXSYMLINKS 5 +#define CANBSIZ MAX_CANON +#define NCARGS ARG_MAX +#define MAXPATHLEN PATH_MAX +#define NOFILE OPEN_MAX + + +#include + +/* Bit map related macros. */ +#define setbit(a,i) ((a)[(i)/NBBY] |= 1<<((i)%NBBY)) +#define clrbit(a,i) ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY))) +#define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY))) +#define isclr(a,i) (((a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0) + +/* Macros for counting and rounding. */ +#ifndef howmany +# define howmany(x, y) (((x)+((y)-1))/(y)) +#endif +#define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) +#define powerof2(x) ((((x)-1)&(x))==0) + +/* Macros for min/max. */ +#define MIN(a,b) (((a)<(b))?(a):(b)) +#define MAX(a,b) (((a)>(b))?(a):(b)) + +/* Unit of `st_blocks'. */ +#define DEV_BSIZE 512 + +#endif /* sys/param.h */ From 91df7dba195b237e2a10605af8a791aabb1648d1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 11 Sep 1998 18:19:49 +0000 Subject: [PATCH 1367/4487] Solaris 2 system calls. --- .../unix/sysv/sysv4/solaris2/sys/syscall.h | 245 ++++++++++++++++++ 1 file changed, 245 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/solaris2/sys/syscall.h diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sys/syscall.h b/sysdeps/unix/sysv/sysv4/solaris2/sys/syscall.h new file mode 100644 index 0000000000..2c071a76ea --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/solaris2/sys/syscall.h @@ -0,0 +1,245 @@ +/* Copyright (C) 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYSCALL_H +#define _SYSCALL_H 1 + +/* Solaris 2 syscall numbers */ + +#define SYS_syscall 0 +#define SYS_exit 1 +#define SYS_fork 2 +#define SYS_read 3 +#define SYS_write 4 +#define SYS_open 5 +#define SYS_close 6 +#define SYS_wait 7 +#define SYS_creat 8 +#define SYS_link 9 +#define SYS_unlink 10 +#define SYS_exec 11 +#define SYS_chdir 12 +#define SYS_time 13 +#define SYS_mknod 14 +#define SYS_chmod 15 +#define SYS_chown 16 +#define SYS_brk 17 +#define SYS_stat 18 +#define SYS_lseek 19 +#define SYS_getpid 20 +#define SYS_mount 21 +#define SYS_umount 22 +#define SYS_setuid 23 +#define SYS_getuid 24 +#define SYS_stime 25 +#define SYS_ptrace 26 +#define SYS_alarm 27 +#define SYS_fstat 28 +#define SYS_pause 29 +#define SYS_utime 30 +#define SYS_stty 31 +#define SYS_gtty 32 +#define SYS_access 33 +#define SYS_nice 34 +#define SYS_statfs 35 +#define SYS_sync 36 +#define SYS_kill 37 +#define SYS_fstatfs 38 +#define SYS_pgrpsys 39 +#define SYS_xenix 40 +#define SYS_dup 41 +#define SYS_pipe 42 +#define SYS_times 43 +#define SYS_profil 44 +#define SYS_plock 45 +#define SYS_setgid 46 +#define SYS_getgid 47 +#define SYS_signal 48 +#define SYS_msgsys 49 +#define SYS_syssun 50 +#define SYS_sysi86 50 +#define SYS_sysppc 50 +#define SYS_acct 51 +#define SYS_shmsys 52 +#define SYS_semsys 53 +#define SYS_ioctl 54 +#define SYS_uadmin 55 +#define SYS_utssys 57 +#define SYS_fdsync 58 +#define SYS_execve 59 +#define SYS_umask 60 +#define SYS_chroot 61 +#define SYS_fcntl 62 +#define SYS_ulimit 63 +#define SYS_rmdir 79 +#define SYS_mkdir 80 +#define SYS_getdents 81 +#define SYS_sysfs 84 +#define SYS_getmsg 85 +#define SYS_putmsg 86 +#define SYS_poll 87 +#define SYS_lstat 88 +#define SYS_symlink 89 +#define SYS_readlink 90 +#define SYS_setgroups 91 +#define SYS_getgroups 92 +#define SYS_fchmod 93 +#define SYS_fchown 94 +#define SYS_sigprocmask 95 +#define SYS_sigsuspend 96 +#define SYS_sigaltstack 97 +#define SYS_sigaction 98 +#define SYS_sigpending 99 +#define SYS_context 100 +#define SYS_evsys 101 +#define SYS_evtrapret 102 +#define SYS_statvfs 103 +#define SYS_fstatvfs 104 +#define SYS_nfssys 106 +#define SYS_waitsys 107 +#define SYS_sigsendsys 108 +#define SYS_hrtsys 109 +#define SYS_acancel 110 +#define SYS_async 111 +#define SYS_priocntlsys 112 +#define SYS_pathconf 113 +#define SYS_mincore 114 +#define SYS_mmap 115 +#define SYS_mprotect 116 +#define SYS_munmap 117 +#define SYS_fpathconf 118 +#define SYS_vfork 119 +#define SYS_fchdir 120 +#define SYS_readv 121 +#define SYS_writev 122 +#define SYS_xstat 123 +#define SYS_lxstat 124 +#define SYS_fxstat 125 +#define SYS_xmknod 126 +#define SYS_clocal 127 +#define SYS_setrlimit 128 +#define SYS_getrlimit 129 +#define SYS_lchown 130 +#define SYS_memcntl 131 +#define SYS_getpmsg 132 +#define SYS_putpmsg 133 +#define SYS_rename 134 +#define SYS_uname 135 +#define SYS_setegid 136 +#define SYS_sysconfig 137 +#define SYS_adjtime 138 +#define SYS_systeminfo 139 +#define SYS_seteuid 141 +#define SYS_vtrace 142 +#define SYS_fork1 143 +#define SYS_sigtimedwait 144 +#define SYS_lwp_info 145 +#define SYS_yield 146 +#define SYS_lwp_sema_wait 147 +#define SYS_lwp_sema_post 148 +#define SYS_lwp_sema_trywait 149 +#define SYS_modctl 152 +#define SYS_fchroot 153 +#define SYS_utimes 154 +#define SYS_vhangup 155 +#define SYS_gettimeofday 156 +#define SYS_getitimer 157 +#define SYS_setitimer 158 +#define SYS_lwp_create 159 +#define SYS_lwp_exit 160 +#define SYS_lwp_suspend 161 +#define SYS_lwp_continue 162 +#define SYS_lwp_kill 163 +#define SYS_lwp_self 164 +#define SYS_lwp_setprivate 165 +#define SYS_lwp_getprivate 166 +#define SYS_lwp_wait 167 +#define SYS_lwp_mutex_unlock 168 +#define SYS_lwp_mutex_lock 169 +#define SYS_lwp_cond_wait 170 +#define SYS_lwp_cond_signal 171 +#define SYS_lwp_cond_broadcast 172 +#define SYS_pread 173 +#define SYS_pwrite 174 +#define SYS_llseek 175 +#define SYS_inst_sync 176 +#define SYS_kaio 178 +#define SYS_tsolsys 184 +#define SYS_acl 185 +#define SYS_auditsys 186 +#define SYS_processor_bind 187 +#define SYS_processor_info 188 +#define SYS_p_online 189 +#define SYS_sigqueue 190 +#define SYS_clock_gettime 191 +#define SYS_clock_settime 192 +#define SYS_clock_getres 193 +#define SYS_timer_create 194 +#define SYS_timer_delete 195 +#define SYS_timer_settime 196 +#define SYS_timer_gettime 197 +#define SYS_timer_getoverrun 198 +#define SYS_nanosleep 199 +#define SYS_facl 200 +#define SYS_door 201 +#define SYS_setreuid 202 +#define SYS_setregid 203 +#define SYS_install_utrap 204 +#define SYS_signotify 205 +#define SYS_schedctl 206 +#define SYS_pset 207 +#define SYS_resolvepath 209 +#define SYS_signotifywait 210 +#define SYS_lwp_sigredirect 211 +#define SYS_lwp_alarm 212 +#define SYS_getdents64 213 +#define SYS_mmap64 214 +#define SYS_stat64 215 +#define SYS_lstat64 216 +#define SYS_fstat64 217 +#define SYS_statvfs64 218 +#define SYS_fstatvfs64 219 +#define SYS_setrlimit64 220 +#define SYS_getrlimit64 221 +#define SYS_pread64 222 +#define SYS_pwrite64 223 +#define SYS_creat64 224 +#define SYS_open64 225 +#define SYS_rpcsys 226 +#define SYS_so_socket 230 +#define SYS_so_socketpair 231 +#define SYS_bind 232 +#define SYS_listen 233 +#define SYS_accept 234 +#define SYS_connect 235 +#define SYS_shutdown 236 +#define SYS_recv 237 +#define SYS_recvfrom 238 +#define SYS_recvmsg 239 +#define SYS_send 240 +#define SYS_sendmsg 241 +#define SYS_sendto 242 +#define SYS_getpeername 243 +#define SYS_getsockname 244 +#define SYS_getsockopt 245 +#define SYS_setsockopt 246 +#define SYS_sockconfig 247 +#define SYS_ntp_gettime 248 +#define SYS_ntp_adjtime 249 + +#endif /* sys/syscall.h */ From aa64d5442165a2c7efaae51ded2346571d6612ae Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 14 Sep 1998 15:01:30 +0000 Subject: [PATCH 1368/4487] Extra objects for ARM. --- sysdeps/arm/Dist | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/arm/Dist diff --git a/sysdeps/arm/Dist b/sysdeps/arm/Dist new file mode 100644 index 0000000000..d78de40205 --- /dev/null +++ b/sysdeps/arm/Dist @@ -0,0 +1 @@ +ieee754.h From efe4f49dc1197cce5f346fe8f7c7f2c5fc2bca11 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 14 Sep 1998 15:01:45 +0000 Subject: [PATCH 1369/4487] Moved one dir up. --- sysdeps/arm/fpu/Dist | 1 - 1 file changed, 1 deletion(-) delete mode 100644 sysdeps/arm/fpu/Dist diff --git a/sysdeps/arm/fpu/Dist b/sysdeps/arm/fpu/Dist deleted file mode 100644 index d78de40205..0000000000 --- a/sysdeps/arm/fpu/Dist +++ /dev/null @@ -1 +0,0 @@ -ieee754.h From 04853189a26343e18cde99ec21b633a4520dbfb8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 14 Sep 1998 16:26:45 +0000 Subject: [PATCH 1370/4487] Extra files for Solaris/SPARC. --- sysdeps/unix/sysv/sysv4/solaris2/sparc/Dist | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/sysv4/solaris2/sparc/Dist diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/Dist b/sysdeps/unix/sysv/sysv4/solaris2/sparc/Dist new file mode 100644 index 0000000000..7832507772 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/Dist @@ -0,0 +1 @@ +sys/trap.h From 8b86c06fec527464b6c1d137cd0669eef4a773a4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 14 Sep 1998 16:38:32 +0000 Subject: [PATCH 1371/4487] Add init-first.h. --- sysdeps/unix/sysv/linux/arm/Dist | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/arm/Dist b/sysdeps/unix/sysv/linux/arm/Dist index d987285445..6e1be78f3a 100644 --- a/sysdeps/unix/sysv/linux/arm/Dist +++ b/sysdeps/unix/sysv/linux/arm/Dist @@ -1,2 +1,3 @@ bits/mman.h clone.S +init-first.h From f3a306c88fec3134df6ca16c1b056f815c6ad784 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 17 Sep 1998 19:36:37 +0000 Subject: [PATCH 1372/4487] Fix typo. --- sysdeps/unix/sysv/sysv4/bits/utsname.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/sysv4/bits/utsname.h b/sysdeps/unix/sysv/sysv4/bits/utsname.h index bf2c0a8da5..dfe46b851b 100644 --- a/sysdeps/unix/sysv/sysv4/bits/utsname.h +++ b/sysdeps/unix/sysv/sysv4/bits/utsname.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 1998 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 @@ -16,7 +16,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef _UTSNAME_H +#ifndef _SYS_UTSNAME_H # error "Never include directly; use instead." #endif From 344b4b4e2352446f1a14b9d91e4f2018ae19a78d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 18 Sep 1998 09:10:23 +0000 Subject: [PATCH 1373/4487] (elf_machine_lazy_rel): Optimise a bit. (RTLD_START): Keep in step with recent ld.so changes. (elf_machine_runtime_setup): Correct behaviour when profiling. --- sysdeps/arm/dl-machine.h | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 49e9d085aa..b0f364f8ff 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -99,8 +99,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) end in this function. */ if (profile) { - //got[2] = (Elf32_Addr) &_dl_runtime_profile; - got[2] = (Elf32_Addr) &_dl_runtime_resolve; + got[2] = (Elf32_Addr) &_dl_runtime_profile; /* Say that we really want profiling and the timers are started. */ _dl_profile_map = l; } @@ -283,9 +282,8 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) str r0, [sp] @ now we enter a _dl_init_next loop - ldr r2, .L_DEF_SCOPE - ldr r2, [sl, r2] - ldr r4, [r2, #8] + ldr r4, .L_MAIN_SEARCHLIST + ldr r4, [sl, r4] @ call _dl_init_next to get the address of an initalizer 0: mov r0, r4 bl _dl_init_next(PLT) @@ -311,14 +309,14 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) .word _GLOBAL_OFFSET_TABLE_ - .L_GOT_GOT - 4 \n\ .L_SKIP_ARGS: \n\ .word _dl_skip_args(GOTOFF) \n\ -.L_DEF_SCOPE: \n\ - .word _dl_default_scope(GOT) \n\ .L_STARTUP_FLAG: .word _dl_starting_up(GOT) .L_FINI_PROC: .word _dl_fini(GOT) .L_STACK_END: .word __libc_stack_end(GOT) +.L_MAIN_SEARCHLIST + .word _dl_main_searchlist(GOT) .previous\n\ "); @@ -452,15 +450,9 @@ static inline void elf_machine_lazy_rel (Elf32_Addr l_addr, const Elf32_Rel *reloc) { Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset); - switch (ELF32_R_TYPE (reloc->r_info)) - { - case R_ARM_JUMP_SLOT: - *reloc_addr += l_addr; - break; - default: - assert (! "unexpected PLT reloc type"); - break; - } + /* Check for unexpected PLT reloc type. */ + assert (ELF32_R_TYPE (reloc->r_info) == R_ARM_JUMP_SLOT); + *reloc_addr += l_addr; } #endif /* RESOLVE */ From b3e2d5611fe96852030d9934f5376985864d4e42 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 22 Sep 1998 01:42:11 +0000 Subject: [PATCH 1374/4487] * sysdeps/m68k/dl-machine.h (elf_machine_lazy_rel): Slightly optimized. --- sysdeps/m68k/dl-machine.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index a4affcc0f0..88fcd1f0bc 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -324,15 +324,8 @@ static inline void elf_machine_lazy_rel (Elf32_Addr l_addr, const Elf32_Rela *reloc) { Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset); - switch (ELF32_R_TYPE (reloc->r_info)) - { - case R_68K_JMP_SLOT: - *reloc_addr += l_addr; - break; - default: - assert (! "unexpected PLT reloc type"); - break; - } + assert (ELF32_R_TYPE (reloc->r_info) == R_68K_JMP_SLOT); + *reloc_addr += l_addr; } #endif /* RESOLVE */ From b720449067c7138b1ecf2386c5da3318bd916206 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 22 Sep 1998 12:44:47 +0000 Subject: [PATCH 1375/4487] (SA_ONSTACK): Define. --- sysdeps/unix/sysv/linux/alpha/bits/sigaction.h | 3 ++- sysdeps/unix/sysv/linux/mips/bits/sigaction.h | 11 ++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h index 274531f270..ae1249af51 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h @@ -37,7 +37,7 @@ struct sigaction /* Bits in `sa_flags'. */ #define SA_NOCLDSTOP 0x00000004 /* Don't send SIGCHLD when children stop. */ #ifdef __USE_MISC -# define SA_STACK 0x00000001 /* Use signal stack by using `sa_restorer'. */ +# define SA_ONSTACK 0x00000001 /* Use signal stack by using `sa_restorer'. */ # define SA_RESTART 0x00000002 /* Restart syscall on signal return. */ # define SA_INTERRUPT 0x20000000 /* Historical no-op. */ # define SA_NOMASK 0x00000008 /* Don't automatically block the signal @@ -47,6 +47,7 @@ struct sigaction /* Some aliases for the SA_ constants. */ # define SA_NODEFER SA_NOMASK # define SA_RESETHAND SA_ONESHOT +# define SA_STACK SA_ONSTACK #endif /* Values for the HOW argument to `sigprocmask'. */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h index 71ca8846eb..7f72406e01 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h +++ b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h @@ -45,16 +45,17 @@ struct sigaction /* Bits in `sa_flags'. */ #define SA_NOCLDSTOP 1 /* Don't send SIGCHLD when children stop. */ #ifdef __USE_MISC -# define SA_STACK 0x08000000 /* Use signal stack by using `sa_restorer'. */ -# define SA_RESTART 0x10000000 /* Restart syscall on signal return. */ -# define SA_INTERRUPT 0x20000000 /* Historical no-op. */ -# define SA_NODEFER 0x40000000 /* Don't automatically block the signal when +# define SA_ONSTACK 0x00000001 /* Use signal stack by using `sa_restorer'. */ +# define SA_RESTART 0x00000004 /* Restart syscall on signal return. */ +# define SA_INTERRUPT 0x00000000 /* Historical no-op. */ +# define SA_NODEFER 0x00000010 /* Don't automatically block the signal when its handler is being executed. */ -# define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler. */ +# define SA_RESETHAND 0x00000002 /* Reset to SIG_DFL on entry to handler. */ /* Some aliases for the SA_ constants. */ # define SA_NOMASK SA_NODEFER # define SA_ONESHOT SA_RESETHAND +# define SA_STACK SA_ONSTACK #endif /* Values for the HOW argument to `sigprocmask'. */ From c06df6978004eb694057a56f4f3b0af10358d527 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 23 Sep 1998 16:33:27 +0000 Subject: [PATCH 1376/4487] Not needed anymore. --- sysdeps/unix/bsd/osf/sys/mman.h | 119 ------------------------- sysdeps/unix/bsd/sun/sunos4/sys/mman.h | 116 ------------------------ sysdeps/unix/bsd/ultrix4/sys/mman.h | 102 --------------------- sysdeps/unix/sysv/irix4/sys/mman.h | 110 ----------------------- 4 files changed, 447 deletions(-) delete mode 100644 sysdeps/unix/bsd/osf/sys/mman.h delete mode 100644 sysdeps/unix/bsd/sun/sunos4/sys/mman.h delete mode 100644 sysdeps/unix/bsd/ultrix4/sys/mman.h delete mode 100644 sysdeps/unix/sysv/irix4/sys/mman.h diff --git a/sysdeps/unix/bsd/osf/sys/mman.h b/sysdeps/unix/bsd/osf/sys/mman.h deleted file mode 100644 index 6ada4e6497..0000000000 --- a/sysdeps/unix/bsd/osf/sys/mman.h +++ /dev/null @@ -1,119 +0,0 @@ -/* Definitions for BSD-style memory management. OSF/1 version. - Copyright (C) 1994, 1995, 1996, 1997, 1998 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _SYS_MMAN_H - -#define _SYS_MMAN_H 1 -#include - -#include -#define __need_size_t -#include - - -/* Protections are chosen from these bits, OR'd together. The - implementation does not necessarily support PROT_EXEC or PROT_WRITE - without PROT_READ. The only guarantees are that no writing will be - allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ - -#define PROT_NONE 0x00 /* No access. */ -#define PROT_READ 0x01 /* Pages can be read. */ -#define PROT_WRITE 0x02 /* Pages can be written. */ -#define PROT_EXEC 0x04 /* Pages can be executed. */ - - -/* Flags contain mapping type, sharing type and options. */ - -/* Mapping type (must choose one and only one of these). */ -#ifdef __USE_BSD -# define MAP_FILE 0x00 /* Mapped from a file or device. */ -# define MAP_ANON 0x10 /* Allocated from anonymous virtual memory. */ -# define MAP_ANONYMOUS MAP_ANON -# define MAP_TYPE 0xf0 /* Mask for type field. */ -#endif - -/* Sharing types (must choose one and only one of these). */ -#define MAP_SHARED 0x01 /* Share changes. */ -#define MAP_PRIVATE 0x02 /* Changes private; copy pages on write. */ - -/* Other flags. */ -#define MAP_FIXED 0x0100 /* Map address must be exactly as requested. */ -#ifdef __USE_BSD -# define MAP_VARIABLE 0 /* Absence of MAP_FIXED. */ -# define MAP_HASSEMPHORE 0x0200 /* Region may contain semaphores. */ -# define MAP_INHERIT 0x0400 /* Region is retained after exec. */ -# define MAP_UNALIGNED 0x0800 /* File offset need not be page-aligned. */ -#endif - -/* Advice to `madvise'. */ -#ifdef __USE_BSD -# define MADV_NORMAL 0 /* No further special treatment. */ -# define MADV_RANDOM 1 /* Expect random page references. */ -# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define MADV_WILLNEED 3 /* Will need these pages. */ -# define MADV_DONTNEED 4 /* Don't need these pages. */ -# define MADV_SPACEAVAIL 5 /* Ensure that resources are available. */ -#endif - -/* Flags to `msync'. */ -#define MS_ASYNC 1 /* Asynchronous cache flush. */ -#define MS_SYNC 3 /* Synchronous cache flush. */ -#define MS_INVALIDATE 4 /* Invalidate cached pages. */ - -/* Return value of `mmap' in case of an error. */ -#define MAP_FAILED ((__ptr_t) -1) - - -__BEGIN_DECLS -/* Map addresses starting near ADDR and extending for LEN bytes. from - OFFSET into the file FD describes according to PROT and FLAGS. If ADDR - is nonzero, it is the desired mapping address. If the MAP_FIXED bit is - set in FLAGS, the mapping will be at ADDR exactly (which must be - page-aligned); otherwise the system chooses a convenient nearby address. - The return value is the actual mapping address chosen or MAP_FAILED - for errors (in which case `errno' is set). A successful `mmap' call - deallocates any previous mapping for the affected region. */ - -extern __ptr_t mmap __P ((__ptr_t __addr, size_t __len, int __prot, - int __flags, int __fd, off_t __offset)); - -/* Deallocate any mapping for the region starting at ADDR and extending LEN - bytes. Returns 0 if successful, -1 for errors (and sets errno). */ -extern int munmap __P ((__ptr_t __addr, size_t __len)); - -/* Change the memory protection of the region starting at ADDR and - extending LEN bytes to PROT. Returns 0 if successful, -1 for errors - (and sets errno). */ -extern int mprotect __P ((__ptr_t __addr, size_t __len, int __prot)); - -/* Synchronize the region starting at ADDR and extending LEN bytes with the - file it maps. Filesystem operations on a file being mapped are - unpredictable before this is done. */ -extern int msync __P ((__ptr_t __addr, size_t __len, int __flags)); - -#ifdef __USE_BSD -/* Advise the system about particular usage patterns the program follows - for the region starting at ADDR and extending LEN bytes. */ -extern int madvise __P ((__ptr_t __addr, size_t __len, int __advice)); -#endif - -__END_DECLS - - -#endif /* sys/mman.h */ diff --git a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h deleted file mode 100644 index 15608e5f24..0000000000 --- a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h +++ /dev/null @@ -1,116 +0,0 @@ -/* Definitions for BSD-style memory management. SunOS 4 version. - Copyright (C) 1994, 1995, 1996, 1997, 1998 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _SYS_MMAN_H - -#define _SYS_MMAN_H 1 -#include - -#include -#define __need_size_t -#include - - -/* Protections are chosen from these bits, OR'd together. The - implementation does not necessarily support PROT_EXEC or PROT_WRITE - without PROT_READ. The only guarantees are that no writing will be - allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ - -#define PROT_NONE 0x00 /* No access. */ -#define PROT_READ 0x01 /* Pages can be read. */ -#define PROT_WRITE 0x02 /* Pages can be written. */ -#define PROT_EXEC 0x04 /* Pages can be executed. */ - - -/* Sharing types (must choose one and only one of these). */ -#define MAP_SHARED 0x01 /* Share changes. */ -#define MAP_PRIVATE 0x02 /* Changes private; copy pages on write. */ -#ifdef __USE_BSD -# define MAP_TYPE 0x0f /* Mask for sharing type. */ -#endif - -/* Other flags. */ -#define MAP_FIXED 0x10 /* Map address must be exactly as requested. */ -/* The following three flags are not actually implemented in SunOS 4.1. */ -#ifdef __USE_BSD -# define MAP_RENAME 0x20 /* Rename private pages to file. */ -# define MAP_NORESERVE 0x40 /* Don't reserve needed swap area. */ -# define MAP_INHERIT 0x80 /* Region is retained after exec. */ -#endif - -/* This is an internal flag that is always set in `mmap' system calls. In - older versions of SunOS 4 `mmap' did not return the actual mapping - address, but always returned zero. This flag says to return the - address; the `mmap' C library function always sets it. */ -#define _MAP_NEW 0x80000000 - -/* Advice to `madvise'. */ -#ifdef __USE_BSD -# define MADV_NORMAL 0 /* No further special treatment. */ -# define MADV_RANDOM 1 /* Expect random page references. */ -# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define MADV_WILLNEED 3 /* Will need these pages. */ -# define MADV_DONTNEED 4 /* Don't need these pages. */ -#endif - -/* Flags to `msync'. */ -#define MS_ASYNC 0x1 /* Return immediately, don't fsync. */ -#define MS_INVALIDATE 0x2 /* Invalidate caches. */ - -/* Return value of `mmap' in case of an error. */ -#define MAP_FAILED ((__ptr_t) -1) - - -__BEGIN_DECLS -/* Map addresses starting near ADDR and extending for LEN bytes. from - OFFSET into the file FD describes according to PROT and FLAGS. If ADDR - is nonzero, it is the desired mapping address. If the MAP_FIXED bit is - set in FLAGS, the mapping will be at ADDR exactly (which must be - page-aligned); otherwise the system chooses a convenient nearby address. - The return value is the actual mapping address chosen or MAP_FAILED - for errors (in which case `errno' is set). A successful `mmap' call - deallocates any previous mapping for the affected region. */ - -extern __ptr_t mmap __P ((__ptr_t __addr, size_t __len, int __prot, - int __flags, int __fd, __off_t __offset)); - -/* Deallocate any mapping for the region starting at ADDR and extending LEN - bytes. Returns 0 if successful, -1 for errors (and sets errno). */ -extern int munmap __P ((__ptr_t __addr, size_t __len)); - -/* Change the memory protection of the region starting at ADDR and - extending LEN bytes to PROT. Returns 0 if successful, -1 for errors - (and sets errno). */ -extern int mprotect __P ((__ptr_t __addr, size_t __len, int __prot)); - -/* Synchronize the region starting at ADDR and extending LEN bytes with the - file it maps. Filesystem operations on a file being mapped are - unpredictable before this is done. */ -extern int msync __P ((__ptr_t __addr, size_t __len, int __flags)); - -#ifdef __USE_BSD -/* Advise the system about particular usage patterns the program follows - for the region starting at ADDR and extending LEN bytes. */ -extern int madvise __P ((__ptr_t __addr, size_t __len, int __advice)); -#endif - -__END_DECLS - - -#endif /* sys/mman.h */ diff --git a/sysdeps/unix/bsd/ultrix4/sys/mman.h b/sysdeps/unix/bsd/ultrix4/sys/mman.h deleted file mode 100644 index 142509455c..0000000000 --- a/sysdeps/unix/bsd/ultrix4/sys/mman.h +++ /dev/null @@ -1,102 +0,0 @@ -/* Definitions for BSD-style memory management. Ultrix 4 version. - Copyright (C) 1994, 1995, 1996, 1997, 1998 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _SYS_MMAN_H - -#define _SYS_MMAN_H 1 -#include - -#include -#define __need_size_t -#include - - -/* Protections are chosen from these bits, OR'd together. The - implementation does not necessarily support PROT_EXEC or PROT_WRITE - without PROT_READ. The only guarantees are that no writing will be - allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ - -#define PROT_NONE 0x00 /* No access. */ -#define PROT_READ 0x01 /* Pages can be read. */ -#define PROT_WRITE 0x02 /* Pages can be written. */ -#define PROT_EXEC 0x04 /* Pages can be executed. */ - - -/* Sharing types (must choose one and only one of these). */ -#define MAP_SHARED 0x01 /* Share changes. */ -#define MAP_PRIVATE 0x02 /* Changes private; copy pages on write. */ -#ifdef __USE_BSD -# define MAP_TYPE 0x0f /* Mask for sharing type. */ -#endif - -/* Other flags. */ -#define MAP_FIXED 0x10 /* Map address must be exactly as requested. */ - -/* Advice to `madvise'. */ -#ifdef __USE_BSD -# define MADV_NORMAL 0 /* No further special treatment. */ -# define MADV_RANDOM 1 /* Expect random page references. */ -# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define MADV_WILLNEED 3 /* Will need these pages. */ -# define MADV_DONTNEED 4 /* Don't need these pages. */ -#endif - -/* Return value of `mmap' in case of an error. */ -#define MAP_FAILED ((__ptr_t) -1) - - -__BEGIN_DECLS -/* Map addresses starting near ADDR and extending for LEN bytes. from - OFFSET into the file FD describes according to PROT and FLAGS. If ADDR - is nonzero, it is the desired mapping address. If the MAP_FIXED bit is - set in FLAGS, the mapping will be at ADDR exactly (which must be - page-aligned); otherwise the system chooses a convenient nearby address. - The return value is the actual mapping address chosen or MAP_FAILED - for errors (in which case `errno' is set). A successful `mmap' call - deallocates any previous mapping for the affected region. */ - -extern __ptr_t mmap __P ((__ptr_t __addr, size_t __len, int __prot, - int __flags, int __fd, off_t __offset)); - -/* Deallocate any mapping for the region starting at ADDR and extending LEN - bytes. Returns 0 if successful, -1 for errors (and sets errno). */ -extern int munmap __P ((__ptr_t __addr, size_t __len)); - -/* Change the memory protection of the region starting at ADDR and - extending LEN bytes to PROT. Returns 0 if successful, -1 for errors - (and sets errno). */ -extern int mprotect __P ((__ptr_t __addr, size_t __len, int __prot)); - -/* Ultrix 4 does not implement `msync' or `madvise'. */ - -/* Synchronize the region starting at ADDR and extending LEN bytes with the - file it maps. Filesystem operations on a file being mapped are - unpredictable before this is done. */ -extern int msync __P ((__ptr_t __addr, size_t __len)); - -#ifdef __USE_BSD -/* Advise the system about particular usage patterns the program follows - for the region starting at ADDR and extending LEN bytes. */ -extern int madvise __P ((__ptr_t __addr, size_t __len, int __advice)); -#endif - -__END_DECLS - - -#endif /* sys/mman.h */ diff --git a/sysdeps/unix/sysv/irix4/sys/mman.h b/sysdeps/unix/sysv/irix4/sys/mman.h deleted file mode 100644 index 9147aa7e58..0000000000 --- a/sysdeps/unix/sysv/irix4/sys/mman.h +++ /dev/null @@ -1,110 +0,0 @@ -/* Definitions for BSD-style memory management. Irix 4 version. - Copyright (C) 1994, 1995, 1996, 1997, 1998 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _SYS_MMAN_H - -#define _SYS_MMAN_H 1 -#include - -#include - - -/* Protections are chosen from these bits, OR'd together. The - implementation does not necessarily support PROT_EXEC or PROT_WRITE - without PROT_READ. The only guarantees are that no writing will be - allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ - -#define PROT_NONE 0x00 /* No access. */ -#define PROT_READ 0x04 /* Pages can be read. */ -#define PROT_WRITE 0x02 /* Pages can be written. */ -#define PROT_EXEC 0x01 /* Pages can be executed. */ -#ifdef __USE_MISC -# define PROT_EXECUTE PROT_EXEC -#endif - - -/* Sharing types (must choose one and only one of these). */ -#define MAP_SHARED 0x01 /* Share changes. */ -#define MAP_PRIVATE 0x02 /* Changes private; copy pages on write. */ -#ifdef __USE_BSD -# define MAP_TYPE 0x0f /* Mask for sharing type. */ -#endif - -/* Other flags. */ -#define MAP_FIXED 0x10 /* Map address must be exactly as requested. */ -#ifdef __USE_MISC -# define MAP_RENAME 0x20 /* Rename private pages to file. */ -# define MAP_AUTOGROW 0x40 /* Grow file as pages are written. */ -# define MAP_LOCAL 0x80 /* Copy the mapped region on fork. */ -#endif - -/* Advice to `madvise'. */ -#ifdef __USE_BSD -# define MADV_NORMAL 0 /* No further special treatment. */ -# define MADV_RANDOM 1 /* Expect random page references. */ -# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define MADV_WILLNEED 3 /* Will need these pages. */ -# define MADV_DONTNEED 4 /* Don't need these pages. */ -#endif - -/* Flags to `msync'. */ -#define MS_ASYNC 0x1 /* Return immediately, don't fsync. */ -#define MS_INVALIDATE 0x2 /* Invalidate caches. */ - -/* Return value of `mmap' in case of an error. */ -#define MAP_FAILED ((__ptr_t) -1) - - -__BEGIN_DECLS -/* Map addresses starting near ADDR and extending for LEN bytes. from - OFFSET into the file FD describes according to PROT and FLAGS. If ADDR - is nonzero, it is the desired mapping address. If the MAP_FIXED bit is - set in FLAGS, the mapping will be at ADDR exactly (which must be - page-aligned); otherwise the system chooses a convenient nearby address. - The return value is the actual mapping address chosen or MAP_FAILED - for errors (in which case `errno' is set). A successful `mmap' call - deallocates any previous mapping for the affected region. */ - -extern __ptr_t mmap __P ((__ptr_t __addr, size_t __len, int __prot, - int __flags, int __fd, __off_t __offset)); - -/* Deallocate any mapping for the region starting at ADDR and extending LEN - bytes. Returns 0 if successful, -1 for errors (and sets errno). */ -extern int munmap __P ((__ptr_t __addr, size_t __len)); - -/* Change the memory protection of the region starting at ADDR and - extending LEN bytes to PROT. Returns 0 if successful, -1 for errors - (and sets errno). */ -extern int mprotect __P ((__ptr_t __addr, size_t __len, int __prot)); - -/* Synchronize the region starting at ADDR and extending LEN bytes with the - file it maps. Filesystem operations on a file being mapped are - unpredictable before this is done. */ -extern int msync __P ((__ptr_t __addr, size_t __len, int __flags)); - -#ifdef __USE_BSD -/* Advise the system about particular usage patterns the program follows - for the region starting at ADDR and extending LEN bytes. */ -extern int madvise __P ((__ptr_t __addr, size_t __len, int __advice)); -#endif - -__END_DECLS - - -#endif /* sys/mman.h */ From 9a84961b89e25b9030490428472c015a94b7d742 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 23 Sep 1998 16:34:46 +0000 Subject: [PATCH 1377/4487] Don't use #include_next. --- sysdeps/mach/alpha/sysdep.h | 2 +- sysdeps/mach/alpha/thread_state.h | 2 +- sysdeps/mach/mips/sysdep.h | 2 +- sysdeps/mach/mips/thread_state.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/mach/alpha/sysdep.h b/sysdeps/mach/alpha/sysdep.h index 6c1035a5e3..55130754aa 100644 --- a/sysdeps/mach/alpha/sysdep.h +++ b/sysdeps/mach/alpha/sysdep.h @@ -38,4 +38,4 @@ #define STACK_GROWTH_DOWN -#include_next +#include diff --git a/sysdeps/mach/alpha/thread_state.h b/sysdeps/mach/alpha/thread_state.h index ea9f944064..dc30a79926 100644 --- a/sysdeps/mach/alpha/thread_state.h +++ b/sysdeps/mach/alpha/thread_state.h @@ -36,4 +36,4 @@ struct machine_thread_all_state struct alpha_float_state fpu; }; -#include_next +#include diff --git a/sysdeps/mach/mips/sysdep.h b/sysdeps/mach/mips/sysdep.h index 7bacb02cf4..45cbf6920c 100644 --- a/sysdeps/mach/mips/sysdep.h +++ b/sysdeps/mach/mips/sysdep.h @@ -80,4 +80,4 @@ _start:\n\ #define ret j ra; nop #endif -#include_next +#include diff --git a/sysdeps/mach/mips/thread_state.h b/sysdeps/mach/mips/thread_state.h index a72848dfc0..17334cf810 100644 --- a/sysdeps/mach/mips/thread_state.h +++ b/sysdeps/mach/mips/thread_state.h @@ -39,4 +39,4 @@ struct machine_thread_all_state struct mips_float_state fpu; }; -#include_next +#include From 68ba15f9a34ad7039c9627f1feeaea418ae54710 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 23 Sep 1998 16:35:43 +0000 Subject: [PATCH 1378/4487] SunOS4 system dependent bits of sys/mman.h. --- sysdeps/unix/bsd/sun/sunos4/bits/mman.h | 68 +++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 sysdeps/unix/bsd/sun/sunos4/bits/mman.h diff --git a/sysdeps/unix/bsd/sun/sunos4/bits/mman.h b/sysdeps/unix/bsd/sun/sunos4/bits/mman.h new file mode 100644 index 0000000000..ed80baf2e3 --- /dev/null +++ b/sysdeps/unix/bsd/sun/sunos4/bits/mman.h @@ -0,0 +1,68 @@ +/* Definitions for BSD-style memory management. SunOS 4 version. + Copyright (C) 1994, 1995, 1996, 1997, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _BITS_MMAN_H +#define _BITS_MMAN_H 1 + +/* Protections are chosen from these bits, OR'd together. The + implementation does not necessarily support PROT_EXEC or PROT_WRITE + without PROT_READ. The only guarantees are that no writing will be + allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ + +#define PROT_NONE 0x00 /* No access. */ +#define PROT_READ 0x01 /* Pages can be read. */ +#define PROT_WRITE 0x02 /* Pages can be written. */ +#define PROT_EXEC 0x04 /* Pages can be executed. */ + +/* Sharing types (must choose one and only one of these). */ +#define MAP_SHARED 0x01 /* Share changes. */ +#define MAP_PRIVATE 0x02 /* Changes private; copy pages on write. */ +#ifdef __USE_BSD +# define MAP_TYPE 0x0f /* Mask for sharing type. */ +#endif + +/* Other flags. */ +#define MAP_FIXED 0x10 /* Map address must be exactly as requested. */ +/* The following three flags are not actually implemented in SunOS 4.1. */ +#ifdef __USE_BSD +# define MAP_RENAME 0x20 /* Rename private pages to file. */ +# define MAP_NORESERVE 0x40 /* Don't reserve needed swap area. */ +# define MAP_INHERIT 0x80 /* Region is retained after exec. */ +#endif + +/* This is an internal flag that is always set in `mmap' system calls. In + older versions of SunOS 4 `mmap' did not return the actual mapping + address, but always returned zero. This flag says to return the + address; the `mmap' C library function always sets it. */ +#define _MAP_NEW 0x80000000 + +/* Advice to `madvise'. */ +#ifdef __USE_BSD +# define MADV_NORMAL 0 /* No further special treatment. */ +# define MADV_RANDOM 1 /* Expect random page references. */ +# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define MADV_WILLNEED 3 /* Will need these pages. */ +# define MADV_DONTNEED 4 /* Don't need these pages. */ +#endif + +/* Flags to `msync'. */ +#define MS_ASYNC 0x1 /* Return immediately, don't fsync. */ +#define MS_INVALIDATE 0x2 /* Invalidate caches. */ + +#endif /* bits/mman.h */ From c1bc2343a30e519ff7dfa22d438bc9d57a5da7fd Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 23 Sep 1998 16:35:56 +0000 Subject: [PATCH 1379/4487] Ultrix4 system dependent bits of sys/mman.h. --- sysdeps/unix/bsd/ultrix4/bits/mman.h | 51 ++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 sysdeps/unix/bsd/ultrix4/bits/mman.h diff --git a/sysdeps/unix/bsd/ultrix4/bits/mman.h b/sysdeps/unix/bsd/ultrix4/bits/mman.h new file mode 100644 index 0000000000..9acb6ceed5 --- /dev/null +++ b/sysdeps/unix/bsd/ultrix4/bits/mman.h @@ -0,0 +1,51 @@ +/* Definitions for BSD-style memory management. Ultrix 4 version. + Copyright (C) 1994, 1995, 1996, 1997, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _BITS_MMAN_H +#define _BITS_MMAN_H 1 + +/* Protections are chosen from these bits, OR'd together. The + implementation does not necessarily support PROT_EXEC or PROT_WRITE + without PROT_READ. The only guarantees are that no writing will be + allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ + +#define PROT_NONE 0x00 /* No access. */ +#define PROT_READ 0x01 /* Pages can be read. */ +#define PROT_WRITE 0x02 /* Pages can be written. */ +#define PROT_EXEC 0x04 /* Pages can be executed. */ +/* Sharing types (must choose one and only one of these). */ +#define MAP_SHARED 0x01 /* Share changes. */ +#define MAP_PRIVATE 0x02 /* Changes private; copy pages on write. */ +#ifdef __USE_BSD +# define MAP_TYPE 0x0f /* Mask for sharing type. */ +#endif + +/* Other flags. */ +#define MAP_FIXED 0x10 /* Map address must be exactly as requested. */ + +/* Advice to `madvise'. */ +#ifdef __USE_BSD +# define MADV_NORMAL 0 /* No further special treatment. */ +# define MADV_RANDOM 1 /* Expect random page references. */ +# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define MADV_WILLNEED 3 /* Will need these pages. */ +# define MADV_DONTNEED 4 /* Don't need these pages. */ +#endif + +#endif /* bits/mman.h */ From ed00ca14c4c30aa0651fa684e3a6b6219ef00fe4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 23 Sep 1998 16:36:12 +0000 Subject: [PATCH 1380/4487] Irix4 system dependent bits of sys/mman.h. --- sysdeps/unix/sysv/irix4/bits/mman.h | 64 +++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 sysdeps/unix/sysv/irix4/bits/mman.h diff --git a/sysdeps/unix/sysv/irix4/bits/mman.h b/sysdeps/unix/sysv/irix4/bits/mman.h new file mode 100644 index 0000000000..c378cce648 --- /dev/null +++ b/sysdeps/unix/sysv/irix4/bits/mman.h @@ -0,0 +1,64 @@ +/* Definitions for BSD-style memory management. Irix 4 version. + Copyright (C) 1994, 1995, 1996, 1997, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _BITS_MMAN_H +#define _BITS_MMAN_H 1 + +/* Protections are chosen from these bits, OR'd together. The + implementation does not necessarily support PROT_EXEC or PROT_WRITE + without PROT_READ. The only guarantees are that no writing will be + allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ + +#define PROT_NONE 0x00 /* No access. */ +#define PROT_READ 0x04 /* Pages can be read. */ +#define PROT_WRITE 0x02 /* Pages can be written. */ +#define PROT_EXEC 0x01 /* Pages can be executed. */ +#ifdef __USE_MISC +# define PROT_EXECUTE PROT_EXEC +#endif + +/* Sharing types (must choose one and only one of these). */ +#define MAP_SHARED 0x01 /* Share changes. */ +#define MAP_PRIVATE 0x02 /* Changes private; copy pages on write. */ +#ifdef __USE_BSD +# define MAP_TYPE 0x0f /* Mask for sharing type. */ +#endif + +/* Other flags. */ +#define MAP_FIXED 0x10 /* Map address must be exactly as requested. */ +#ifdef __USE_MISC +# define MAP_RENAME 0x20 /* Rename private pages to file. */ +# define MAP_AUTOGROW 0x40 /* Grow file as pages are written. */ +# define MAP_LOCAL 0x80 /* Copy the mapped region on fork. */ +#endif + +/* Advice to `madvise'. */ +#ifdef __USE_BSD +# define MADV_NORMAL 0 /* No further special treatment. */ +# define MADV_RANDOM 1 /* Expect random page references. */ +# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define MADV_WILLNEED 3 /* Will need these pages. */ +# define MADV_DONTNEED 4 /* Don't need these pages. */ +#endif + +/* Flags to `msync'. */ +#define MS_ASYNC 0x1 /* Return immediately, don't fsync. */ +#define MS_INVALIDATE 0x2 /* Invalidate caches. */ + +#endif /* bits/mman.h */ From f65fc5cb2d45cc289811a94a31ca34b7c3666032 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 23 Sep 1998 16:37:13 +0000 Subject: [PATCH 1381/4487] Don't mention bits/mman.h. --- sysdeps/unix/sysv/linux/alpha/Dist | 1 - sysdeps/unix/sysv/linux/arm/Dist | 1 - sysdeps/unix/sysv/linux/m68k/Dist | 1 - sysdeps/unix/sysv/linux/mips/Dist | 1 - 4 files changed, 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist index d20860445c..21e134024f 100644 --- a/sysdeps/unix/sysv/linux/alpha/Dist +++ b/sysdeps/unix/sysv/linux/alpha/Dist @@ -1,6 +1,5 @@ alpha/ptrace.h alpha/regdef.h -bits/mman.h clone.S ieee_get_fp_control.S ieee_set_fp_control.S diff --git a/sysdeps/unix/sysv/linux/arm/Dist b/sysdeps/unix/sysv/linux/arm/Dist index 6e1be78f3a..3217436f25 100644 --- a/sysdeps/unix/sysv/linux/arm/Dist +++ b/sysdeps/unix/sysv/linux/arm/Dist @@ -1,3 +1,2 @@ -bits/mman.h clone.S init-first.h diff --git a/sysdeps/unix/sysv/linux/m68k/Dist b/sysdeps/unix/sysv/linux/m68k/Dist index 103e273817..6059865f54 100644 --- a/sysdeps/unix/sysv/linux/m68k/Dist +++ b/sysdeps/unix/sysv/linux/m68k/Dist @@ -1,4 +1,3 @@ -bits/mman.h clone.S mremap.S sys/reg.h diff --git a/sysdeps/unix/sysv/linux/mips/Dist b/sysdeps/unix/sysv/linux/mips/Dist index 0f106cf8fa..f3ae821129 100644 --- a/sysdeps/unix/sysv/linux/mips/Dist +++ b/sysdeps/unix/sysv/linux/mips/Dist @@ -1,4 +1,3 @@ -bits/mman.h clone.S kernel_sigaction.h kernel_stat.h From d05b46514bb8d1246e782b1a8f81eff9fd8bb055 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 23 Sep 1998 16:40:59 +0000 Subject: [PATCH 1382/4487] OSF system dependent bits of sys/mman.h. --- sysdeps/unix/bsd/osf/bits/mman.h | 71 ++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 sysdeps/unix/bsd/osf/bits/mman.h diff --git a/sysdeps/unix/bsd/osf/bits/mman.h b/sysdeps/unix/bsd/osf/bits/mman.h new file mode 100644 index 0000000000..fd5d79deef --- /dev/null +++ b/sysdeps/unix/bsd/osf/bits/mman.h @@ -0,0 +1,71 @@ +/* Flags for BSD-style memory management. OSF/1 version. + Copyright (C) 1994, 1995, 1996, 1997, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _BITS_MMAN_H +#define _BITS_MMAN_H 1 + +/* Protections are chosen from these bits, OR'd together. The + implementation does not necessarily support PROT_EXEC or PROT_WRITE + without PROT_READ. The only guarantees are that no writing will be + allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ + +#define PROT_NONE 0x00 /* No access. */ +#define PROT_READ 0x01 /* Pages can be read. */ +#define PROT_WRITE 0x02 /* Pages can be written. */ +#define PROT_EXEC 0x04 /* Pages can be executed. */ + +/* Flags contain mapping type, sharing type and options. */ + +/* Mapping type (must choose one and only one of these). */ +#ifdef __USE_BSD +# define MAP_FILE 0x00 /* Mapped from a file or device. */ +# define MAP_ANON 0x10 /* Allocated from anonymous virtual memory. */ +# define MAP_ANONYMOUS MAP_ANON +# define MAP_TYPE 0xf0 /* Mask for type field. */ +#endif + +/* Sharing types (must choose one and only one of these). */ +#define MAP_SHARED 0x01 /* Share changes. */ +#define MAP_PRIVATE 0x02 /* Changes private; copy pages on write. */ + +/* Other flags. */ +#define MAP_FIXED 0x0100 /* Map address must be exactly as requested. */ +#ifdef __USE_BSD +# define MAP_VARIABLE 0 /* Absence of MAP_FIXED. */ +# define MAP_HASSEMPHORE 0x0200 /* Region may contain semaphores. */ +# define MAP_INHERIT 0x0400 /* Region is retained after exec. */ +# define MAP_UNALIGNED 0x0800 /* File offset need not be page-aligned. */ +#endif + +/* Advice to `madvise'. */ +#ifdef __USE_BSD +# define MADV_NORMAL 0 /* No further special treatment. */ +# define MADV_RANDOM 1 /* Expect random page references. */ +# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define MADV_WILLNEED 3 /* Will need these pages. */ +# define MADV_DONTNEED 4 /* Don't need these pages. */ +# define MADV_SPACEAVAIL 5 /* Ensure that resources are available. */ +#endif + +/* Flags to `msync'. */ +#define MS_ASYNC 1 /* Asynchronous cache flush. */ +#define MS_SYNC 3 /* Synchronous cache flush. */ +#define MS_INVALIDATE 4 /* Invalidate cached pages. */ + +#endif /* bits/mman.h */ From 225146fe16633f3492b8f602ce5bfd15ef49f6d3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 28 Sep 1998 11:49:19 +0000 Subject: [PATCH 1383/4487] Sync with generic Linux version. (__cmsg_nxthdr): Use CMSG_ALIGN (fixes a bug) and correct test for availability of another entry. --- sysdeps/unix/sysv/linux/mips/bits/socket.h | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h index 75ed54fc56..528b8be8d4 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/socket.h +++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h @@ -149,8 +149,13 @@ struct cmsghdr #endif #define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg) #define CMSG_FIRSTHDR(mhdr) \ - ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \ + ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \ ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL) +#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \ + & ~(sizeof (size_t) - 1)) +#define CMSG_SPACE(len) (CMSG_ALIGN (len) \ + + CMSG_ALIGN (sizeof (struct cmsghdr))) +#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len)) #ifndef _EXTERN_INLINE @@ -161,18 +166,19 @@ extern struct cmsghdr *__cmsg_nxthdr __P ((struct msghdr *__mhdr, _EXTERN_INLINE struct cmsghdr * __cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) { - unsigned char *__p; - if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr)) /* The kernel header does this so there may be a reason. */ return NULL; - __p = (((unsigned char *) __cmsg) - + ((__cmsg->cmsg_len + sizeof (long int) - 1) & ~sizeof (long int))); - if (__p >= (unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen) + __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg + + CMSG_ALIGN (__cmsg->cmsg_len)); + if ((unsigned char *) (__cmsg + 1) >= ((unsigned char *) __mhdr->msg_control + + __mhdr->msg_controllen) + || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len) + >= ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen))) /* No more entries. */ return NULL; - return (struct cmsghdr *) __p; + return __cmsg; } From 4fbbde293478419189b09dd026b9c3d3260d5620 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 29 Sep 1998 22:41:48 +0000 Subject: [PATCH 1384/4487] List Ruffian in platforms[]. --- sysdeps/unix/sysv/linux/alpha/ioperm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c index cf263f762c..26d976ecad 100644 --- a/sysdeps/unix/sysv/linux/alpha/ioperm.c +++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c @@ -104,6 +104,7 @@ static struct platform { {"Noname", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM}, {"Sable", IOSYS_T2, 5, T2_DENSE_MEM, T2_SPARSE_MEM}, {"Miata", IOSYS_CIA, 5, CIA_DENSE_MEM, CIA_SPARSE_MEM}, + {"Ruffian", IOSYS_CIA, 5, CIA_DENSE_MEM, CIA_SPARSE_MEM}, }; From 0f72aee6de5802bd45d0bfa90e19b6569cf3ab51 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 1 Oct 1998 10:57:23 +0000 Subject: [PATCH 1385/4487] Protect use of long long by __extension__. --- sysdeps/unix/sysv/linux/mips/bits/types.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h index 2bb8a2a9c6..c716d5735d 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/types.h +++ b/sysdeps/unix/sysv/linux/mips/bits/types.h @@ -34,8 +34,8 @@ typedef unsigned short __u_short; typedef unsigned int __u_int; typedef unsigned long __u_long; #ifdef __GNUC__ -typedef unsigned long long int __u_quad_t; -typedef long long int __quad_t; +__extension__ typedef unsigned long long int __u_quad_t; +__extension__ typedef long long int __quad_t; #else typedef struct { @@ -53,8 +53,8 @@ typedef unsigned short int __uint16_t; typedef signed int __int32_t; typedef unsigned int __uint32_t; #ifdef __GNUC__ -typedef signed long long int __int64_t; -typedef unsigned long long int __uint64_t; +__extension__ typedef signed long long int __int64_t; +__extension__ typedef unsigned long long int __uint64_t; #endif typedef __quad_t *__qaddr_t; From 911c0aba69a04c84ef9969d5895d9568dfd58f54 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 1 Oct 1998 14:29:47 +0000 Subject: [PATCH 1386/4487] Correct args to mcount(). --- sysdeps/arm/machine-gmon.h | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/sysdeps/arm/machine-gmon.h b/sysdeps/arm/machine-gmon.h index 96b4c13c72..3909b5e0c3 100644 --- a/sysdeps/arm/machine-gmon.h +++ b/sysdeps/arm/machine-gmon.h @@ -41,25 +41,27 @@ static void mcount_internal (u_long frompc, u_long selfpc) blind calls to _mount(), ignoring the fact that _mcount may clobber registers; therefore, _mcount may NOT clobber registers */ /* if (this_fp!=0) { - r0 = this_lr - r1 = this_fp - r1 = [r1-4] which is caller's fp + r0 = this_fp + r1 = this_lr + r1 = [r1-4] which is caller's lr if (r1!=0) r1 = caller's lr call mcount_internal(this_lr, caller's_lr) } -*/ +*/ + #define MCOUNT \ void _mcount (void) \ { \ __asm__("stmdb sp!, {r0, r1, r2, r3};" \ "movs fp, fp;" \ - "moveq r0, #0;" \ - "ldrne r0, [fp, $-4];" \ - "ldrne r1, [fp, $-12];" \ - "movnes r1, r1;" \ - "ldrne r1, [r1, $-4];" \ - "movs r1, r1;" \ + "moveq r1, #0;" \ + "ldrne r1, [fp, $-4];" \ + "ldrne r0, [fp, $-12];" \ + "movnes r0, r0;" \ + "ldrne r0, [r0, $-4];" \ + "movs r0, r0;" \ "blne mcount_internal;" \ "ldmia sp!, {r0, r1, r2, r3}"); \ } + From e5432e2896eb8433055e9d594f19c8e35ffcda96 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 1 Oct 1998 14:30:25 +0000 Subject: [PATCH 1387/4487] Register content dump function. --- sysdeps/unix/sysv/linux/arm/register-dump.h | 132 ++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/register-dump.h diff --git a/sysdeps/unix/sysv/linux/arm/register-dump.h b/sysdeps/unix/sysv/linux/arm/register-dump.h new file mode 100644 index 0000000000..1b948ab5ff --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/register-dump.h @@ -0,0 +1,132 @@ +/* Dump registers. + Copyright (C) 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Philip Blundell , 1998. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +/* We will print the register dump in this format: + + R0: XXXXXXXX R1: XXXXXXXX R2: XXXXXXXX R3: XXXXXXXX + R4: XXXXXXXX R5: XXXXXXXX R6: XXXXXXXX R7: XXXXXXXX + R8: XXXXXXXX R9: XXXXXXXX SL: XXXXXXXX FP: XXXXXXXX + IP: XXXXXXXX SP: XXXXXXXX LR: XXXXXXXX PC: XXXXXXXX + + CPSR: XXXXXXXX + + Trap: XXXXXXXX Error: XXXXXXXX OldMask: XXXXXXXX + + */ + +static void +hexvalue (unsigned long int value, char *buf, size_t len) +{ + char *cp = _itoa_word (value, buf + len, 16, 0); + while (cp > buf) + *--cp = '0'; +} + +static void +register_dump (int fd, struct sigcontext *ctx) +{ + char regs[20][8]; + struct iovec iov[97]; + size_t nr = 0; + +#define ADD_STRING(str) \ + iov[nr].iov_base = (char *) str; \ + iov[nr].iov_len = strlen (str); \ + ++nr +#define ADD_MEM(str, len) \ + iov[nr].iov_base = str; \ + iov[nr].iov_len = len; \ + ++nr + + /* Generate strings of register contents. */ + hexvalue (ctx->arm_r0, regs[0], 8); + hexvalue (ctx->arm_r1, regs[1], 8); + hexvalue (ctx->arm_r2, regs[2], 8); + hexvalue (ctx->arm_r3, regs[3], 8); + hexvalue (ctx->arm_r4, regs[4], 8); + hexvalue (ctx->arm_r5, regs[5], 8); + hexvalue (ctx->arm_r6, regs[6], 8); + hexvalue (ctx->arm_r7, regs[7], 8); + hexvalue (ctx->arm_r8, regs[8], 8); + hexvalue (ctx->arm_r9, regs[9], 8); + hexvalue (ctx->arm_r10, regs[10], 4); + hexvalue (ctx->arm_fp, regs[11], 4); + hexvalue (ctx->arm_ip, regs[12], 4); + hexvalue (ctx->arm_sp, regs[13], 4); + hexvalue (ctx->arm_lr, regs[14], 4); + hexvalue (ctx->arm_pc, regs[15], 4); + hexvalue (ctx->arm_cpsr, regs[16], 8); + hexvalue (ctx->trap_no, regs[17], 8); + hexvalue (ctx->error_code, regs[18], 8); + hexvalue (ctx->old_mask, regs[19], 8); + + /* Generate the output. */ + ADD_STRING ("Register dump:\n\n R0: "); + ADD_MEM (regs[0], 8); + ADD_STRING (" R1: "); + ADD_MEM (regs[1], 8); + ADD_STRING (" R2: "); + ADD_MEM (regs[2], 8); + ADD_STRING (" R3: "); + ADD_MEM (regs[3], 8); + ADD_STRING ("\n R4: "); + ADD_MEM (regs[4], 8); + ADD_STRING (" R5: "); + ADD_MEM (regs[5], 8); + ADD_STRING (" R6: "); + ADD_MEM (regs[6], 8); + ADD_STRING (" R7: "); + ADD_MEM (regs[7], 8); + ADD_STRING ("\n R8: "); + ADD_MEM (regs[8], 8); + ADD_STRING (" R9: "); + ADD_MEM (regs[9], 8); + ADD_STRING (" SL: "); + ADD_MEM (regs[10], 8); + ADD_STRING (" FP: "); + ADD_MEM (regs[11], 8); + ADD_STRING ("\n IP: "); + ADD_MEM (regs[12], 8); + ADD_STRING (" SP: "); + ADD_MEM (regs[13], 8); + ADD_STRING (" LR: "); + ADD_MEM (regs[14], 8); + ADD_STRING (" PC: "); + ADD_MEM (regs[15], 8); + ADD_STRING ("\n\n CPSR: "); + ADD_MEM (regs[16], 8); + ADD_STRING ("\n\n Trap: "); + ADD_MEM (regs[17], 8); + ADD_STRING (" Error: "); + ADD_MEM (regs[18], 8); + ADD_STRING (" OldMask: "); + ADD_MEM (regs[19], 8); + + ADD_STRING ("\n"); + + /* Write the stuff out. */ + writev (fd, iov, nr); +} + + +#define REGISTER_DUMP register_dump (fd, &ctx) From fa858214167518b935d3a42996ff34aba8a0ed37 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 1 Oct 1998 14:30:44 +0000 Subject: [PATCH 1388/4487] Cope with fussy assembler. --- sysdeps/arm/fpu/__longjmp.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/arm/fpu/__longjmp.S b/sysdeps/arm/fpu/__longjmp.S index 25ba6b39fa..2972ff6f5c 100644 --- a/sysdeps/arm/fpu/__longjmp.S +++ b/sysdeps/arm/fpu/__longjmp.S @@ -30,7 +30,7 @@ ENTRY (__longjmp) movs r0, r1 /* get the return value in place */ moveq r0, #1 /* can't let setjmp() return zero! */ - lfmia f4, 4, [ip] ! /* load the floating point regs */ + lfmfd f4, 4, [ip] ! /* load the floating point regs */ LOADREGS(ia, ip, {v1-v6, sl, fp, sp, pc}) END (__longjmp) From f036f1a9bc28b0b873054034355c390a63644a09 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 5 Oct 1998 13:39:21 +0000 Subject: [PATCH 1389/4487] Fix typo in last change. --- sysdeps/arm/dl-machine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index b0f364f8ff..66ab4c6de2 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -315,7 +315,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) .word _dl_fini(GOT) .L_STACK_END: .word __libc_stack_end(GOT) -.L_MAIN_SEARCHLIST +.L_MAIN_SEARCHLIST: .word _dl_main_searchlist(GOT) .previous\n\ "); From 604791b664bc91309a40f69d3b47c8c0face1a86 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 5 Oct 1998 13:39:33 +0000 Subject: [PATCH 1390/4487] ARM specific hugeval definition. --- sysdeps/arm/bits/huge_val.h | 88 +++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 sysdeps/arm/bits/huge_val.h diff --git a/sysdeps/arm/bits/huge_val.h b/sysdeps/arm/bits/huge_val.h new file mode 100644 index 0000000000..0e07bd56cc --- /dev/null +++ b/sysdeps/arm/bits/huge_val.h @@ -0,0 +1,88 @@ +/* `HUGE_VAL' constants for IEEE 754 machines (where it is infinity). + Used by and functions for overflow. + ARM version. + Copyright (C) 1992, 1995, 1996, 1997, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _MATH_H +# error "Never use directly; include instead." +#endif + +#include + +/* IEEE positive infinity (-HUGE_VAL is negative infinity). */ + +#ifdef __GNUC__ + +# define HUGE_VAL \ + (__extension__ \ + ((union { unsigned __l __attribute__((__mode__(__DI__))); double __d; }) \ + { __l: 0x000000007ff00000ULL }).__d) + +#else /* not GCC */ + +# include + +typedef union { unsigned char __c[8]; double __d; } __huge_val_t; + +# if __BYTE_ORDER == __BIG_ENDIAN +# define __HUGE_VAL_bytes { 0, 0, 0, 0, 0x7f, 0xf0, 0, 0 } +# endif +# if __BYTE_ORDER == __LITTLE_ENDIAN +# define __HUGE_VAL_bytes { 0, 0, 0xf0, 0x7f, 0, 0, 0, 0 } +# endif + +static __huge_val_t __huge_val = { __HUGE_VAL_bytes }; +# define HUGE_VAL (__huge_val.__d) + +#endif /* GCC. */ + + +/* ISO C 9X extensions: (float) HUGE_VALF and (long double) HUGE_VALL. */ + +#ifdef __USE_ISOC9X + +# ifdef __GNUC__ + +# define HUGE_VALF \ + (__extension__ \ + ((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; }) \ + { __l: 0x7f800000UL }).__d) + +# else /* not GCC */ + +typedef union { unsigned char __c[4]; float __f; } __huge_valf_t; + +# if __BYTE_ORDER == __BIG_ENDIAN +# define __HUGE_VALF_bytes { 0x7f, 0x80, 0, 0 } +# endif +# if __BYTE_ORDER == __LITTLE_ENDIAN +# define __HUGE_VALF_bytes { 0, 0, 0x80, 0x7f } +# endif + +static __huge_valf_t __huge_valf = { __HUGE_VALF_bytes }; +# define HUGE_VALF (__huge_valf.__f) + +# endif /* GCC. */ + + +/* Generally there is no separate `long double' format and it is the + same as `double'. */ +# define HUGE_VALL HUGE_VAL + +#endif /* __USE_ISOC9X. */ From 641d7074001bd7c4dd0f90f32a8c06390c942e00 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 7 Oct 1998 02:02:53 +0000 Subject: [PATCH 1391/4487] * sysdeps/m68k/dl-machine.h (RTLD_START): Fix clearing startup flag. --- sysdeps/m68k/dl-machine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index 88fcd1f0bc..067c2fbb88 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -203,7 +203,7 @@ asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \ | Loop to call _dl_init_next for the next initializer. jra 0b 1: | Clear the startup flag. - clr.l _dl_starting_up@GOT.w(%a5) + clr.l ([_dl_starting_up@GOT.w, %a5]) | Pass our finalizer function to the user in %a1. move.l _dl_fini@GOT.w(%a5), %a1 | Initialize %fp with the stack pointer. From a8d236a8b7e0d16513e32a6419f282dab58debc2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 8 Oct 1998 13:09:39 +0000 Subject: [PATCH 1392/4487] (platform): Add missing Ruffian entry. --- sysdeps/unix/sysv/linux/alpha/ioperm.c | 265 ++++++++++++++++++++----- 1 file changed, 217 insertions(+), 48 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c index 26d976ecad..83c4ec21ac 100644 --- a/sysdeps/unix/sysv/linux/alpha/ioperm.c +++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c @@ -66,14 +66,72 @@ #define CIA_SPARSE_MEM (0xfffffc8000000000UL) #define CIA_DENSE_MEM (0xfffffc8600000000UL) +/* SABLE is EV4, GAMMA is EV5 */ #define T2_IO_BASE (0xfffffc03a0000000UL) #define T2_SPARSE_MEM (0xfffffc0200000000UL) #define T2_DENSE_MEM (0xfffffc03c0000000UL) +#define GAMMA_IO_BASE (0xfffffc83a0000000UL) +#define GAMMA_SPARSE_MEM (0xfffffc8200000000UL) +#define GAMMA_DENSE_MEM (0xfffffc83c0000000UL) + +/* these are for the RAWHIDE family */ +#define MCPCIA_IO_BASE (0xfffffcf980000000UL) +#define MCPCIA_SPARSE_MEM (0xfffffcf800000000UL) +#define MCPCIA_DENSE_MEM (0xfffffcf900000000UL) + +/* Tsunami has no SPARSE space */ +/* NOTE: these are hardwired to PCI bus 0 addresses!!! */ +/* Also, these are PHYSICAL, as/so there's no KSEG translation */ +#define TSUNAMI_IO_BASE (0x00000801fc000000UL + 0xfffffc0000000000UL) +#define TSUNAMI_DENSE_MEM (0x0000080000000000UL + 0xfffffc0000000000UL) + typedef enum { - IOSYS_UNKNOWN, IOSYS_JENSEN, IOSYS_APECS, IOSYS_CIA, IOSYS_T2 + IOSYS_UNKNOWN, IOSYS_JENSEN, IOSYS_APECS, IOSYS_CIA, IOSYS_T2, + IOSYS_TSUNAMI, IOSYS_MCPCIA, IOSYS_GAMMA, IOSYS_CPUDEP } iosys_t; +static struct io_system { + int hae_shift; + unsigned long int bus_memory_base; + unsigned long int sparse_bus_mem_base; + unsigned long int bus_io_base; +} io_system[] = { /* NOTE! must match iosys_t enumeration */ +/* UNKNOWN */ {0, 0, 0, 0}, +/* JENSEN */ {7, 0, JENSEN_SPARSE_MEM, JENSEN_IO_BASE}, +/* APECS */ {5, APECS_DENSE_MEM, APECS_SPARSE_MEM, APECS_IO_BASE}, +/* CIA */ {5, CIA_DENSE_MEM, CIA_SPARSE_MEM, CIA_IO_BASE}, +/* T2 */ {5, T2_DENSE_MEM, T2_SPARSE_MEM, T2_IO_BASE}, +/* TSUNAMI */ {0, TSUNAMI_DENSE_MEM, 0, TSUNAMI_IO_BASE}, +/* MCPCIA */ {5, MCPCIA_DENSE_MEM, MCPCIA_SPARSE_MEM, MCPCIA_IO_BASE}, +/* GAMMA */ {5, GAMMA_DENSE_MEM, GAMMA_SPARSE_MEM, GAMMA_IO_BASE}, +/* CPUDEP */ {0, 0, 0, 0}, +}; + +static struct platform { + const char *name; + iosys_t io_sys; +} platform[] = { + {"Alcor", IOSYS_CIA}, + {"Avanti", IOSYS_APECS}, + {"XL", IOSYS_APECS}, + {"Cabriolet", IOSYS_APECS}, + {"EB164", IOSYS_CIA}, + {"EB64+", IOSYS_APECS}, + {"EB66", IOSYS_APECS}, + {"EB66P", IOSYS_APECS}, + {"Jensen", IOSYS_JENSEN}, + {"Mikasa", IOSYS_CPUDEP}, + {"Noritake", IOSYS_CPUDEP}, + {"Noname", IOSYS_APECS}, + {"Sable", IOSYS_CPUDEP}, + {"Miata", IOSYS_CIA}, + {"Tsunami", IOSYS_TSUNAMI}, + {"Rawhide", IOSYS_MCPCIA}, + {"Ruffian", IOSYS_CIA}, + {"Takara", IOSYS_CIA}, +}; + struct ioswtch { void (*sethae)(unsigned long int addr); void (*outb)(unsigned char b, unsigned long int port); @@ -84,30 +142,6 @@ struct ioswtch { unsigned int (*inl)(unsigned long int port); }; -static struct platform { - const char *name; - int io_sys; - iosys_t hae_shift; - unsigned long int bus_memory_base; - unsigned long int sparse_bus_memory_base; -} platform[] = { - {"Alcor", IOSYS_CIA, 5, CIA_DENSE_MEM, CIA_SPARSE_MEM}, - {"Avanti", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM}, - {"Cabriolet", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM}, - {"EB164", IOSYS_CIA, 5, CIA_DENSE_MEM, CIA_SPARSE_MEM}, - {"EB64+", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM}, - {"EB66", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM}, - {"EB66P", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM}, - {"Jensen", IOSYS_JENSEN, 7, 0, JENSEN_SPARSE_MEM}, - {"Mikasa", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM}, - {"Mustang", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM}, - {"Noname", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM}, - {"Sable", IOSYS_T2, 5, T2_DENSE_MEM, T2_SPARSE_MEM}, - {"Miata", IOSYS_CIA, 5, CIA_DENSE_MEM, CIA_SPARSE_MEM}, - {"Ruffian", IOSYS_CIA, 5, CIA_DENSE_MEM, CIA_SPARSE_MEM}, -}; - - static struct { struct hae { unsigned long int cache; @@ -130,6 +164,8 @@ port_to_cpu_addr (unsigned long int port, iosys_t iosys, int size) { if (iosys == IOSYS_JENSEN) return (port << 7) + ((size - 1) << 5) + io.base; + else if (iosys == IOSYS_TSUNAMI) + return port + io.base; else return (port << 5) + ((size - 1) << 3) + io.base; } @@ -194,9 +230,6 @@ inline_outl (unsigned int b, unsigned long int port, iosys_t iosys) { unsigned long int addr = port_to_cpu_addr (port, iosys, 4); - if (port >= MAX_PORT) - return; - inline_sethae (0, iosys); *(vuip)addr = b; mb (); @@ -236,8 +269,77 @@ inline_inl (unsigned long int port, iosys_t iosys) return *(vuip) addr; } +/* + * Now define the inline functions for CPUs supporting byte/word insns, + * and whose core logic supports I/O space accesses utilizing them. + * + * These routines could be used by MIATA, for example, because it has + * and EV56 plus PYXIS, but it currently uses SPARSE anyway. + * + * These routines are necessary for TSUNAMI/TYPHOON based platforms, + * which will have (at least) EV6. + */ + +static inline void +inline_bwx_outb (unsigned char b, unsigned long int port, iosys_t iosys) +{ + unsigned long int addr = port_to_cpu_addr (port, iosys, 4); + + __asm__ __volatile__ ("stb %1,%0" : : "m"(*(unsigned char *)addr), "r"(b)); + mb (); +} + + +static inline void +inline_bwx_outw (unsigned short int b, unsigned long int port, iosys_t iosys) +{ + unsigned long int addr = port_to_cpu_addr (port, iosys, 4); + + __asm__ __volatile__ ("stw %1,%0" : : "m"(*(unsigned short *)addr), "r"(b)); + mb (); +} + + +static inline void +inline_bwx_outl (unsigned int b, unsigned long int port, iosys_t iosys) +{ + unsigned long int addr = port_to_cpu_addr (port, iosys, 4); -#define DCL_SETHAE(name, iosys) \ + *(vuip)addr = b; + mb (); +} + + +static inline unsigned int +inline_bwx_inb (unsigned long int port, iosys_t iosys) +{ + unsigned long int r, addr = port_to_cpu_addr (port, iosys, 1); + + __asm__ __volatile__ ("ldbu %0,%1" : "=r"(r) : "m"(*(unsigned char *)addr)); + return 0xffUL & r; +} + + +static inline unsigned int +inline_bwx_inw (unsigned long int port, iosys_t iosys) +{ + unsigned long int r, addr = port_to_cpu_addr (port, iosys, 1); + + __asm__ __volatile__ ("ldwu %0,%1" : "=r"(r) : "m"(*(unsigned short *)addr)); + return 0xffffUL & r; +} + + +static inline unsigned int +inline_bwx_inl (unsigned long int port, iosys_t iosys) +{ + unsigned long int addr = port_to_cpu_addr (port, iosys, 4); + + return *(vuip) addr; +} + + +#define DCL_SETHAE(name, iosys) \ static void \ name##_sethae (unsigned long int addr) \ { \ @@ -259,6 +361,28 @@ name##_##func (unsigned long int addr) \ return inline_##func (addr, IOSYS_##iosys); \ } +#define DCL_SETHAE_IGNORE(name, iosys) \ +static void \ +name##_sethae (unsigned long int addr) \ +{ \ +/* do nothing */ \ +} + +#define DCL_OUT_BWX(name, func, type, iosys) \ +static void \ +name##_##func (unsigned type b, unsigned long int addr) \ +{ \ + inline_bwx_##func (b, addr, IOSYS_##iosys); \ +} + + +#define DCL_IN_BWX(name, func, iosys) \ +static unsigned int \ +name##_##func (unsigned long int addr) \ +{ \ + return inline_bwx_##func (addr, IOSYS_##iosys); \ +} + DCL_SETHAE(jensen, JENSEN) DCL_OUT(jensen, outb, char, JENSEN) @@ -279,7 +403,15 @@ DCL_IN(apecs, inb, APECS) DCL_IN(apecs, inw, APECS) DCL_IN(apecs, inl, APECS) -struct ioswtch ioswtch[] = { +DCL_SETHAE_IGNORE(tsunami, TSUNAMI) +DCL_OUT_BWX(tsunami, outb, char, TSUNAMI) +DCL_OUT_BWX(tsunami, outw, short int, TSUNAMI) +DCL_OUT_BWX(tsunami, outl, int, TSUNAMI) +DCL_IN_BWX(tsunami, inb, TSUNAMI) +DCL_IN_BWX(tsunami, inw, TSUNAMI) +DCL_IN_BWX(tsunami, inl, TSUNAMI) + +static struct ioswtch ioswtch[] = { { jensen_sethae, jensen_outb, jensen_outw, jensen_outl, @@ -289,6 +421,11 @@ struct ioswtch ioswtch[] = { apecs_sethae, apecs_outb, apecs_outw, apecs_outl, apecs_inb, apecs_inw, apecs_inl + }, + { + tsunami_sethae, + tsunami_outb, tsunami_outw, tsunami_outl, + tsunami_inb, tsunami_inw, tsunami_inl } }; @@ -358,12 +495,54 @@ init_iosys (void) { if (strcmp (platform[i].name, systype) == 0) { - io.hae_shift = platform[i].hae_shift; - io.bus_memory_base = platform[i].bus_memory_base; - io.sparse_bus_memory_base = platform[i].sparse_bus_memory_base; io.sys = platform[i].io_sys; + /* some platforms can have either EV4 or EV5 CPUs */ + if (io.sys == IOSYS_CPUDEP) + { + FILE * fp; + char cputype[256]; + fp = fopen (PATH_CPUINFO, "r"); + if (fp == NULL) + return -1; + while ((n = fscanf (fp, "cpu model : %256[^\n]\n", cputype)) + != EOF + && n != 1) + fgets (cputype, 256, fp); + + fclose (fp); + + if (strcmp (platform[i].name, "Sable") == 0) + { + if (strncmp (cputype, "EV4", 3) == 0) + io.sys = IOSYS_T2; + else if (strncmp (cputype, "EV5", 3) == 0) + io.sys = IOSYS_GAMMA; + } + else + { + if (strncmp (cputype, "EV4", 3) == 0) + io.sys = IOSYS_APECS; + else if (strncmp (cputype, "EV5", 3) == 0) + io.sys = IOSYS_CIA; + } + if (n == EOF || io.sys == IOSYS_CPUDEP) + { + /* This can happen if the format of /proc/cpuinfo changes.*/ + fprintf (stderr, "ioperm.init_iosys(): Unable to determine" + " CPU model.\n"); + __set_errno (ENODEV); + return -1; + } + } + io.hae_shift = io_system[io.sys].hae_shift; + io.bus_memory_base = io_system[io.sys].bus_memory_base; + io.sparse_bus_memory_base = io_system[io.sys].sparse_bus_mem_base; + io.io_base = io_system[io.sys].bus_io_base; + if (io.sys == IOSYS_JENSEN) io.swp = &ioswtch[0]; + else if (io.sys == IOSYS_TSUNAMI) + io.swp = &ioswtch[2]; else io.swp = &ioswtch[1]; return 0; @@ -396,32 +575,22 @@ _ioperm (unsigned long int from, unsigned long int num, int turn_on) { if (!io.base) { - unsigned long int base; int fd; io.hae.reg = 0; /* not used in user-level */ io.hae.cache = 0; - __sethae (io.hae.cache); /* synchronize with hw */ + if (io.sys != IOSYS_TSUNAMI) + __sethae (io.hae.cache); /* synchronize with hw */ fd = open ("/dev/mem", O_RDWR); if (fd < 0) - return fd; + return -1; - switch (io.sys) - { - case IOSYS_UNKNOWN: base = io.io_base; break; - case IOSYS_JENSEN: base = JENSEN_IO_BASE; break; - case IOSYS_APECS: base = APECS_IO_BASE; break; - case IOSYS_CIA: base = CIA_IO_BASE; break; - default: - __set_errno (ENODEV); - return -1; - } - addr = port_to_cpu_addr (0, io.sys, 1); + addr = port_to_cpu_addr (0, io.sys, 1); len = port_to_cpu_addr (MAX_PORT, io.sys, 1) - addr; io.base = (unsigned long int) __mmap (0, len, PROT_NONE, MAP_SHARED, - fd, base); + fd, io.io_base); close (fd); if ((long) io.base == -1) return -1; From 7817d752ae5f57c0e737a5994714e12d22a462d6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 9 Oct 1998 10:50:07 +0000 Subject: [PATCH 1393/4487] Move definition of sigcontext union to bits/armsigctx.h. --- sysdeps/unix/sysv/linux/arm/profil-counter.h | 42 +------------------- 1 file changed, 2 insertions(+), 40 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/profil-counter.h b/sysdeps/unix/sysv/linux/arm/profil-counter.h index 0d5024fa47..55a11bd76b 100644 --- a/sysdeps/unix/sysv/linux/arm/profil-counter.h +++ b/sysdeps/unix/sysv/linux/arm/profil-counter.h @@ -19,51 +19,13 @@ #include #include - -union k_sigcontext - { - struct - { - unsigned long int trap_no; - unsigned long int error_code; - unsigned long int oldmask; - unsigned long int arm_r0; - unsigned long int arm_r1; - unsigned long int arm_r2; - unsigned long int arm_r3; - unsigned long int arm_r4; - unsigned long int arm_r5; - unsigned long int arm_r6; - unsigned long int arm_r7; - unsigned long int arm_r8; - unsigned long int arm_r9; - unsigned long int arm_r10; - unsigned long int arm_fp; - unsigned long int arm_ip; - unsigned long int arm_sp; - unsigned long int arm_lr; - unsigned long int arm_pc; - unsigned long int arm_cpsr; - } v21; - struct - { - unsigned long int magic; - struct pt_regs reg; - unsigned long int trap_no; - unsigned long int error_code; - unsigned long int oldmask; - } v20; -}; +#include void profil_counter (int signo, int _a2, int _a3, int _a4, union k_sigcontext sc) { - /* The format of struct sigcontext changed between 2.0 and 2.1 kernels. - Fortunately 2.0 puts a magic number in the first word and this is not - a legal value for `trap_no', so we can tell them apart. */ - void *pc; - if (sc.v20.magic == 0x4B534154) + if (sc.v20.magic == SIGCONTEXT_2_0_MAGIC) pc = (void *) sc.v20.reg.ARM_pc; else pc = (void *) sc.v21.arm_pc; From e205b76dd77eb84676441629ca63d14d6d706536 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 9 Oct 1998 10:50:14 +0000 Subject: [PATCH 1394/4487] Add support for version 2.0 kernels. --- sysdeps/unix/sysv/linux/arm/register-dump.h | 69 ++++++++++++++------- 1 file changed, 48 insertions(+), 21 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/register-dump.h b/sysdeps/unix/sysv/linux/arm/register-dump.h index 1b948ab5ff..015780c623 100644 --- a/sysdeps/unix/sysv/linux/arm/register-dump.h +++ b/sysdeps/unix/sysv/linux/arm/register-dump.h @@ -20,6 +20,7 @@ #include #include +#include /* We will print the register dump in this format: @@ -43,7 +44,7 @@ hexvalue (unsigned long int value, char *buf, size_t len) } static void -register_dump (int fd, struct sigcontext *ctx) +register_dump (int fd, union k_sigcontext *ctx) { char regs[20][8]; struct iovec iov[97]; @@ -59,26 +60,52 @@ register_dump (int fd, struct sigcontext *ctx) ++nr /* Generate strings of register contents. */ - hexvalue (ctx->arm_r0, regs[0], 8); - hexvalue (ctx->arm_r1, regs[1], 8); - hexvalue (ctx->arm_r2, regs[2], 8); - hexvalue (ctx->arm_r3, regs[3], 8); - hexvalue (ctx->arm_r4, regs[4], 8); - hexvalue (ctx->arm_r5, regs[5], 8); - hexvalue (ctx->arm_r6, regs[6], 8); - hexvalue (ctx->arm_r7, regs[7], 8); - hexvalue (ctx->arm_r8, regs[8], 8); - hexvalue (ctx->arm_r9, regs[9], 8); - hexvalue (ctx->arm_r10, regs[10], 4); - hexvalue (ctx->arm_fp, regs[11], 4); - hexvalue (ctx->arm_ip, regs[12], 4); - hexvalue (ctx->arm_sp, regs[13], 4); - hexvalue (ctx->arm_lr, regs[14], 4); - hexvalue (ctx->arm_pc, regs[15], 4); - hexvalue (ctx->arm_cpsr, regs[16], 8); - hexvalue (ctx->trap_no, regs[17], 8); - hexvalue (ctx->error_code, regs[18], 8); - hexvalue (ctx->old_mask, regs[19], 8); + if (ctx->v20.magic == SIGCONTEXT_2_0_MAGIC) + { + hexvalue (ctx->v20.reg.ARM_r0, regs[0], 8); + hexvalue (ctx->v20.reg.ARM_r1, regs[1], 8); + hexvalue (ctx->v20.reg.ARM_r2, regs[2], 8); + hexvalue (ctx->v20.reg.ARM_r3, regs[3], 8); + hexvalue (ctx->v20.reg.ARM_r4, regs[4], 8); + hexvalue (ctx->v20.reg.ARM_r5, regs[5], 8); + hexvalue (ctx->v20.reg.ARM_r6, regs[6], 8); + hexvalue (ctx->v20.reg.ARM_r7, regs[7], 8); + hexvalue (ctx->v20.reg.ARM_r8, regs[8], 8); + hexvalue (ctx->v20.reg.ARM_r9, regs[9], 8); + hexvalue (ctx->v20.reg.ARM_r10, regs[10], 4); + hexvalue (ctx->v20.reg.ARM_fp, regs[11], 4); + hexvalue (ctx->v20.reg.ARM_ip, regs[12], 4); + hexvalue (ctx->v20.reg.ARM_sp, regs[13], 4); + hexvalue (ctx->v20.reg.ARM_lr, regs[14], 4); + hexvalue (ctx->v20.reg.ARM_pc, regs[15], 4); + hexvalue (ctx->v20.reg.ARM_cpsr, regs[16], 8); + hexvalue (ctx->v20.trap_no, regs[17], 8); + hexvalue (ctx->v20.error_code, regs[18], 8); + hexvalue (ctx->v20.oldmask, regs[19], 8); + } + else + { + hexvalue (ctx->v21.arm_r0, regs[0], 8); + hexvalue (ctx->v21.arm_r1, regs[1], 8); + hexvalue (ctx->v21.arm_r2, regs[2], 8); + hexvalue (ctx->v21.arm_r3, regs[3], 8); + hexvalue (ctx->v21.arm_r4, regs[4], 8); + hexvalue (ctx->v21.arm_r5, regs[5], 8); + hexvalue (ctx->v21.arm_r6, regs[6], 8); + hexvalue (ctx->v21.arm_r7, regs[7], 8); + hexvalue (ctx->v21.arm_r8, regs[8], 8); + hexvalue (ctx->v21.arm_r9, regs[9], 8); + hexvalue (ctx->v21.arm_r10, regs[10], 4); + hexvalue (ctx->v21.arm_fp, regs[11], 4); + hexvalue (ctx->v21.arm_ip, regs[12], 4); + hexvalue (ctx->v21.arm_sp, regs[13], 4); + hexvalue (ctx->v21.arm_lr, regs[14], 4); + hexvalue (ctx->v21.arm_pc, regs[15], 4); + hexvalue (ctx->v21.arm_cpsr, regs[16], 8); + hexvalue (ctx->v21.trap_no, regs[17], 8); + hexvalue (ctx->v21.error_code, regs[18], 8); + hexvalue (ctx->v21.oldmask, regs[19], 8); + } /* Generate the output. */ ADD_STRING ("Register dump:\n\n R0: "); From d856c1629105486911ea72da0e765a1914265158 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 9 Oct 1998 10:50:29 +0000 Subject: [PATCH 1395/4487] Definition of sigcontext for 2.0 and 2.1 kernels. --- sysdeps/unix/sysv/linux/arm/bits/armsigctx.h | 59 ++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/bits/armsigctx.h diff --git a/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h b/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h new file mode 100644 index 0000000000..395e194293 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h @@ -0,0 +1,59 @@ +/* Definition of `struct sigcontext' for Linux/ARM + Copyright (C) 1996, 1997, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* The format of struct sigcontext changed between 2.0 and 2.1 kernels. + Fortunately 2.0 puts a magic number in the first word and this is not + a legal value for `trap_no', so we can tell them apart. */ + +union k_sigcontext + { + struct + { + unsigned long int trap_no; + unsigned long int error_code; + unsigned long int oldmask; + unsigned long int arm_r0; + unsigned long int arm_r1; + unsigned long int arm_r2; + unsigned long int arm_r3; + unsigned long int arm_r4; + unsigned long int arm_r5; + unsigned long int arm_r6; + unsigned long int arm_r7; + unsigned long int arm_r8; + unsigned long int arm_r9; + unsigned long int arm_r10; + unsigned long int arm_fp; + unsigned long int arm_ip; + unsigned long int arm_sp; + unsigned long int arm_lr; + unsigned long int arm_pc; + unsigned long int arm_cpsr; + } v21; + struct + { + unsigned long int magic; + struct pt_regs reg; + unsigned long int trap_no; + unsigned long int error_code; + unsigned long int oldmask; + } v20; +}; + +#define SIGCONTEXT_2_0_MAGIC 0x4B534154 From 33b59efe6cff67ef7a495d43161b3e9703909692 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 9 Oct 1998 11:22:07 +0000 Subject: [PATCH 1396/4487] Define PT_EI as extern inline is not yet defined. Use PT_EI in extern inline definitions. --- sysdeps/arm/linuxthreads/pt-machine.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sysdeps/arm/linuxthreads/pt-machine.h b/sysdeps/arm/linuxthreads/pt-machine.h index 0b9bc01fc1..d4dc4c4ed9 100644 --- a/sysdeps/arm/linuxthreads/pt-machine.h +++ b/sysdeps/arm/linuxthreads/pt-machine.h @@ -1,6 +1,6 @@ /* Machine-dependent pthreads configuration and inline functions. ARM version. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Philip Blundell . @@ -19,13 +19,17 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef PT_EI +# define PT_EI extern inline +#endif + /* This will not work on ARM1 or ARM2 because SWP is lacking on those machines. Unfortunately we have no way to detect this at compile time; let's hope nobody tries to use one. */ /* Spinlock implementation; required. */ -extern inline int +PT_EI int testandset (int *spinlock) { register unsigned int ret; From 86ffa1b43a5f7b4ff5a639090e2d320b3ca4990d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 12 Oct 1998 11:15:04 +0000 Subject: [PATCH 1397/4487] (PSEUDO): Add missing semicolon so that profiling works. --- sysdeps/unix/sysv/linux/arm/sysdep.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index 381ce26979..5972abaa9a 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -49,8 +49,8 @@ #undef PSEUDO #define PSEUDO(name, syscall_name, args) \ .text; \ - .type syscall_error,%function ; \ - ENTRY (name) \ + .type syscall_error,%function; \ + ENTRY (name); \ DO_CALL (args, syscall_name); \ cmn r0, $4096; \ bhs PLTJMP(C_SYMBOL_NAME(__syscall_error)); From 9230582571ad6795f6e220afa4d89f44981c2814 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 12 Oct 1998 12:56:56 +0000 Subject: [PATCH 1398/4487] (CFLAGS-ioperm.c): New variable to prevent warnings from use of modern CPU instructions. --- sysdeps/unix/sysv/linux/alpha/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile index fbbc56ecd3..e03c31e446 100644 --- a/sysdeps/unix/sysv/linux/alpha/Makefile +++ b/sysdeps/unix/sysv/linux/alpha/Makefile @@ -12,4 +12,6 @@ sysdep_routines += ieee_get_fp_control ieee_set_fp_control \ sysdep_routines += osf_select osf_gettimeofday osf_settimeofday \ osf_getitimer osf_setitimer osf_utimes \ osf_getrusage osf_wait4 old_adjtimex + +CFLAGS-ioperm.c = -Wa,-mev6 endif From f3afb0fffac2cb4bc298db8aff82560c09fff717 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 13 Oct 1998 16:25:31 +0000 Subject: [PATCH 1399/4487] (inline_outb): Fix output parameter format string. (inline_outw): Likewise. --- sysdeps/unix/sysv/linux/alpha/ioperm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c index 83c4ec21ac..bd642e33c8 100644 --- a/sysdeps/unix/sysv/linux/alpha/ioperm.c +++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c @@ -206,7 +206,7 @@ inline_outb (unsigned char b, unsigned long int port, iosys_t iosys) unsigned long int addr = port_to_cpu_addr (port, iosys, 1); inline_sethae (0, iosys); - asm ("insbl %2,%1,%0" : "r=" (w) : "ri" (port & 0x3), "r" (b)); + asm ("insbl %2,%1,%0" : "=r" (w) : "ri" (port & 0x3), "r" (b)); *(vuip)addr = w; mb (); } @@ -219,7 +219,7 @@ inline_outw (unsigned short int b, unsigned long int port, iosys_t iosys) unsigned long int addr = port_to_cpu_addr (port, iosys, 2); inline_sethae (0, iosys); - asm ("inswl %2,%1,%0" : "r=" (w) : "ri" (port & 0x3), "r" (b)); + asm ("inswl %2,%1,%0" : "=r" (w) : "ri" (port & 0x3), "r" (b)); *(vuip)addr = w; mb (); } From fa03e7a0ebc77c0bf5a306aee626cb8cd4046179 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 14 Oct 1998 12:59:04 +0000 Subject: [PATCH 1400/4487] Define __kernel_termios here instead of including kernel_termios.h. --- sysdeps/unix/sysv/linux/alpha/bits/ioctls.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h b/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h index dcbf9f4402..a30035cee5 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h @@ -22,7 +22,20 @@ /* Use the definitions from the kernel header files. */ #include -#include + +/* We need the kernel definition of the `termios' struct. */ +#define __KERNEL_NCCS 19 +struct __kernel_termios + { + tcflag_t c_iflag; /* input mode flags */ + tcflag_t c_oflag; /* output mode flags */ + tcflag_t c_cflag; /* control mode flags */ + tcflag_t c_lflag; /* local mode flags */ + cc_t c_cc[__KERNEL_NCCS]; /* control characters */ + cc_t c_line; /* line discipline */ + speed_t c_ispeed; /* input speed */ + speed_t c_ospeed; /* output speed */ + }; /* Oh well, this is necessary since the kernel data structure is different from the user-level version. */ From a7077ca4f24a420d0b29b3f5d3d2d6272fe20dab Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 15 Oct 1998 07:50:31 +0000 Subject: [PATCH 1401/4487] Include termios.h to have all types defined. --- sysdeps/unix/sysv/linux/alpha/bits/ioctls.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h b/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h index a30035cee5..7096b5a76a 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h @@ -20,6 +20,9 @@ # error "Never use directly; include instead." #endif +/* Get the necessary definitions. */ +#include + /* Use the definitions from the kernel header files. */ #include From edb87b12b3127a9bd1e60fed1f25cd73df618f9d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 15 Oct 1998 09:21:29 +0000 Subject: [PATCH 1402/4487] Remove __kernel_termios again. Use char[44] to define size of the struct. --- sysdeps/unix/sysv/linux/alpha/bits/ioctls.h | 25 ++++----------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h b/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h index 7096b5a76a..7c1e0f7960 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h @@ -20,35 +20,18 @@ # error "Never use directly; include instead." #endif -/* Get the necessary definitions. */ -#include - /* Use the definitions from the kernel header files. */ #include -/* We need the kernel definition of the `termios' struct. */ -#define __KERNEL_NCCS 19 -struct __kernel_termios - { - tcflag_t c_iflag; /* input mode flags */ - tcflag_t c_oflag; /* output mode flags */ - tcflag_t c_cflag; /* control mode flags */ - tcflag_t c_lflag; /* local mode flags */ - cc_t c_cc[__KERNEL_NCCS]; /* control characters */ - cc_t c_line; /* line discipline */ - speed_t c_ispeed; /* input speed */ - speed_t c_ospeed; /* output speed */ - }; - /* Oh well, this is necessary since the kernel data structure is different from the user-level version. */ #undef TCGETS #undef TCSETS #undef TCSETSW #undef TCSETSF -#define TCGETS _IOR ('t', 19, struct __kernel_termios) -#define TCSETS _IOW ('t', 20, struct __kernel_termios) -#define TCSETSW _IOW ('t', 21, struct __kernel_termios) -#define TCSETSF _IOW ('t', 22, struct __kernel_termios) +#define TCGETS _IOR ('t', 19, char[44]) +#define TCSETS _IOW ('t', 20, char[44]) +#define TCSETSW _IOW ('t', 21, char[44]) +#define TCSETSF _IOW ('t', 22, char[44]) #include From 6a9821445a86881fd34da168568e8657ef1e9934 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 15 Oct 1998 10:45:34 +0000 Subject: [PATCH 1403/4487] Add bits/armsigctx.h. --- sysdeps/unix/sysv/linux/arm/Dist | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/arm/Dist b/sysdeps/unix/sysv/linux/arm/Dist index 3217436f25..16bbb3e2ef 100644 --- a/sysdeps/unix/sysv/linux/arm/Dist +++ b/sysdeps/unix/sysv/linux/arm/Dist @@ -1,2 +1,3 @@ clone.S init-first.h +bits/armsigctx.h From 4a12df66acfea09aa977a5994f9edc50acdb67db Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 16 Oct 1998 16:18:30 +0000 Subject: [PATCH 1404/4487] Linux/Arm specific makefile. --- sysdeps/unix/sysv/linux/arm/Makefile | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/Makefile diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile new file mode 100644 index 0000000000..e65a5c1fa3 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/Makefile @@ -0,0 +1,3 @@ +ifeq ($(subdir),misc) +sysdep_routines += setfsgid setfsuid setresgid setresuid +endif From 32f8b0679c49a3fb9d7489f681d9f058885dbef0 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 16 Oct 1998 16:21:03 +0000 Subject: [PATCH 1405/4487] Wrapper around setegid syscall to check for value range. --- sysdeps/unix/sysv/linux/arm/setegid.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/arm/setegid.c diff --git a/sysdeps/unix/sysv/linux/arm/setegid.c b/sysdeps/unix/sysv/linux/arm/setegid.c new file mode 100644 index 0000000000..2e3a54c893 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/setegid.c @@ -0,0 +1 @@ +#include From ed2acf85b133408629037f507137d4b36683c893 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 16 Oct 1998 16:21:08 +0000 Subject: [PATCH 1406/4487] Wrapper around setugid syscall to check for value range. --- sysdeps/unix/sysv/linux/arm/seteuid.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/arm/seteuid.c diff --git a/sysdeps/unix/sysv/linux/arm/seteuid.c b/sysdeps/unix/sysv/linux/arm/seteuid.c new file mode 100644 index 0000000000..18e41d08c1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/seteuid.c @@ -0,0 +1 @@ +#include From b1491b35b3f944df7cfbb8fa9274c647ca21497d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 16 Oct 1998 16:21:18 +0000 Subject: [PATCH 1407/4487] Wrapper around setfsgid syscall to check for value range. --- sysdeps/unix/sysv/linux/arm/setfsgid.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/arm/setfsgid.c diff --git a/sysdeps/unix/sysv/linux/arm/setfsgid.c b/sysdeps/unix/sysv/linux/arm/setfsgid.c new file mode 100644 index 0000000000..0886712569 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/setfsgid.c @@ -0,0 +1 @@ +#include From 0047c441ae568f67ae66289b8d96d923d5de6b1f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 16 Oct 1998 16:21:24 +0000 Subject: [PATCH 1408/4487] Wrapper around setfsuid syscall to check for value range. --- sysdeps/unix/sysv/linux/arm/setfsuid.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/arm/setfsuid.c diff --git a/sysdeps/unix/sysv/linux/arm/setfsuid.c b/sysdeps/unix/sysv/linux/arm/setfsuid.c new file mode 100644 index 0000000000..a9f22eb8ab --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/setfsuid.c @@ -0,0 +1 @@ +#include From b86b54f476fd19cd35a2c5c405d9ac78f44f8cba Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 16 Oct 1998 16:21:31 +0000 Subject: [PATCH 1409/4487] Wrapper around setgid syscall to check for value range. --- sysdeps/unix/sysv/linux/arm/setgid.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/arm/setgid.c diff --git a/sysdeps/unix/sysv/linux/arm/setgid.c b/sysdeps/unix/sysv/linux/arm/setgid.c new file mode 100644 index 0000000000..377021d9ec --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/setgid.c @@ -0,0 +1 @@ +#include From 111397630d86619663af641006a503c5a363f4af Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 16 Oct 1998 16:21:38 +0000 Subject: [PATCH 1410/4487] Wrapper around setgroups syscall to check for value range. --- sysdeps/unix/sysv/linux/arm/setgroups.c | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/setgroups.c diff --git a/sysdeps/unix/sysv/linux/arm/setgroups.c b/sysdeps/unix/sysv/linux/arm/setgroups.c new file mode 100644 index 0000000000..0e7086278f --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/setgroups.c @@ -0,0 +1,2 @@ +/* We also have to rewrite the kernel gid_t to the user land type. */ +#include From 5978cf827311bdc89c8a388470d15430d924613a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 16 Oct 1998 16:21:45 +0000 Subject: [PATCH 1411/4487] Wrapper around setresgid syscall to check for value range. --- sysdeps/unix/sysv/linux/arm/setresgid.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/arm/setresgid.c diff --git a/sysdeps/unix/sysv/linux/arm/setresgid.c b/sysdeps/unix/sysv/linux/arm/setresgid.c new file mode 100644 index 0000000000..daca1a4833 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/setresgid.c @@ -0,0 +1 @@ +#include From 176f971960d5f1d35c21a77da0a08f60798e2f6e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 16 Oct 1998 16:21:49 +0000 Subject: [PATCH 1412/4487] Wrapper around setresuid syscall to check for value range. --- sysdeps/unix/sysv/linux/arm/setresuid.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/arm/setresuid.c diff --git a/sysdeps/unix/sysv/linux/arm/setresuid.c b/sysdeps/unix/sysv/linux/arm/setresuid.c new file mode 100644 index 0000000000..3aeabe9ad7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/setresuid.c @@ -0,0 +1 @@ +#include From b88a94ba8202c47913c17af211f9f1d721afd3b2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 16 Oct 1998 16:21:54 +0000 Subject: [PATCH 1413/4487] Wrapper around setuid syscall to check for value range. --- sysdeps/unix/sysv/linux/arm/setuid.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/arm/setuid.c diff --git a/sysdeps/unix/sysv/linux/arm/setuid.c b/sysdeps/unix/sysv/linux/arm/setuid.c new file mode 100644 index 0000000000..de394379be --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/setuid.c @@ -0,0 +1 @@ +#include From f858fcedc84c1bf718069d4468a555acbf288093 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 16 Oct 1998 16:28:05 +0000 Subject: [PATCH 1414/4487] [subdir=misc] (sysdep_routines): Add setfsgid, setfsuid, setresgid, and setresuid. --- sysdeps/unix/sysv/linux/m68k/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/m68k/Makefile b/sysdeps/unix/sysv/linux/m68k/Makefile index 71cee22442..7e46d51b86 100644 --- a/sysdeps/unix/sysv/linux/m68k/Makefile +++ b/sysdeps/unix/sysv/linux/m68k/Makefile @@ -3,7 +3,7 @@ m68k-syntax-flag = -DMOTOROLA_SYNTAX ifeq ($(subdir),misc) -sysdep_routines += mremap +sysdep_routines += mremap setfsgid setfsuid setresgid setresuid sysdep_headers += sys/reg.h endif From d69f35a8073dd987a12c92ebff0efa7d38ff5464 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 16 Oct 1998 16:28:36 +0000 Subject: [PATCH 1415/4487] Add s_setgid, s_setresuid, s_setresgid, and s_setuid. --- sysdeps/unix/sysv/linux/arm/syscalls.list | 4 ++++ sysdeps/unix/sysv/linux/m68k/syscalls.list | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/sysdeps/unix/sysv/linux/arm/syscalls.list b/sysdeps/unix/sysv/linux/arm/syscalls.list index a3ecdd7d73..3adc087d15 100644 --- a/sysdeps/unix/sysv/linux/arm/syscalls.list +++ b/sysdeps/unix/sysv/linux/arm/syscalls.list @@ -2,6 +2,10 @@ s_getgroups getgroups getgroups 2 __syscall_getgroups s_llseek llseek _llseek 5 __sys_llseek +s_setgid setgid setgid 1 __syscall_setgid s_setgroups setgroups setgroups 2 __syscall_setgroups +s_setresuid setresuid setresuid 3 __syscall_setresuid +s_setresgid setresgid setresgid 3 __syscall_setresgid +s_setuid setuid setuid 1 __syscall_setuid vm86 - vm86 1 __vm86 vm86 syscall - syscall 5 syscall diff --git a/sysdeps/unix/sysv/linux/m68k/syscalls.list b/sysdeps/unix/sysv/linux/m68k/syscalls.list index 473c2ec5b2..971c4ee7bf 100644 --- a/sysdeps/unix/sysv/linux/m68k/syscalls.list +++ b/sysdeps/unix/sysv/linux/m68k/syscalls.list @@ -4,4 +4,8 @@ cacheflush EXTRA cacheflush 4 __cacheflush cacheflush s_getgroups getgroups getgroups 2 __syscall_getgroups s_llseek llseek _llseek 5 __sys_llseek +s_setgid setgid setgid 1 __syscall_setgid s_setgroups setgroups setgroups 2 __syscall_setgroups +s_setresgid setresgid setresgid 3 __syscall_setresgid +s_setresuid setresuid setresuid 3 __syscall_setresuid +s_setuid setuid setuid 1 __syscall_setuid From c220db51b0f2e94198da18d5b76ee520b59bc652 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 16 Oct 1998 16:29:19 +0000 Subject: [PATCH 1416/4487] Add O_DIRECTORY. --- sysdeps/unix/sysv/linux/alpha/bits/fcntl.h | 1 + sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h index 7cd32a34a3..e67ad19f65 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h @@ -45,6 +45,7 @@ #ifdef __USE_GNU # define O_DIRECT 040000 /* Direct disk access. */ +# define O_DIRECTORY 0100000 /* Must be a directory. */ #endif /* Not necessary, files are always with 64bit off_t. */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index 0a0d9c9d00..63e754d5fe 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -38,7 +38,11 @@ #define O_EXCL 0x0400 /* not fcntl */ #define O_NOCTTY 0x0800 /* not fcntl */ #define O_FSYNC O_SYNC -#define O_ASYNC 020000 +#define O_ASYNC 0x1000 + +#ifdef __USE_GNU +# define O_DIRECTORY 0x2000 /* Must be a directory. */ +#endif #define O_NDELAY O_NONBLOCK From 2b0a897428a4fab49153db19b4effda19bc25079 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 18 Oct 1998 13:05:43 +0000 Subject: [PATCH 1417/4487] Wrapper arpund system call with check of parameter value range. --- sysdeps/unix/sysv/linux/m68k/setegid.c | 1 + sysdeps/unix/sysv/linux/m68k/seteuid.c | 1 + sysdeps/unix/sysv/linux/m68k/setfsgid.c | 1 + sysdeps/unix/sysv/linux/m68k/setfsuid.c | 1 + sysdeps/unix/sysv/linux/m68k/setgid.c | 1 + sysdeps/unix/sysv/linux/m68k/setresgid.c | 1 + sysdeps/unix/sysv/linux/m68k/setresuid.c | 1 + sysdeps/unix/sysv/linux/m68k/setuid.c | 1 + 8 files changed, 8 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/setegid.c create mode 100644 sysdeps/unix/sysv/linux/m68k/seteuid.c create mode 100644 sysdeps/unix/sysv/linux/m68k/setfsgid.c create mode 100644 sysdeps/unix/sysv/linux/m68k/setfsuid.c create mode 100644 sysdeps/unix/sysv/linux/m68k/setgid.c create mode 100644 sysdeps/unix/sysv/linux/m68k/setresgid.c create mode 100644 sysdeps/unix/sysv/linux/m68k/setresuid.c create mode 100644 sysdeps/unix/sysv/linux/m68k/setuid.c diff --git a/sysdeps/unix/sysv/linux/m68k/setegid.c b/sysdeps/unix/sysv/linux/m68k/setegid.c new file mode 100644 index 0000000000..2e3a54c893 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/setegid.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/m68k/seteuid.c b/sysdeps/unix/sysv/linux/m68k/seteuid.c new file mode 100644 index 0000000000..18e41d08c1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/seteuid.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/m68k/setfsgid.c b/sysdeps/unix/sysv/linux/m68k/setfsgid.c new file mode 100644 index 0000000000..0886712569 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/setfsgid.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/m68k/setfsuid.c b/sysdeps/unix/sysv/linux/m68k/setfsuid.c new file mode 100644 index 0000000000..b4785957bc --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/setfsuid.c @@ -0,0 +1 @@ +s diff --git a/sysdeps/unix/sysv/linux/m68k/setgid.c b/sysdeps/unix/sysv/linux/m68k/setgid.c new file mode 100644 index 0000000000..377021d9ec --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/setgid.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/m68k/setresgid.c b/sysdeps/unix/sysv/linux/m68k/setresgid.c new file mode 100644 index 0000000000..daca1a4833 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/setresgid.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/m68k/setresuid.c b/sysdeps/unix/sysv/linux/m68k/setresuid.c new file mode 100644 index 0000000000..3aeabe9ad7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/setresuid.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/m68k/setuid.c b/sysdeps/unix/sysv/linux/m68k/setuid.c new file mode 100644 index 0000000000..de394379be --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/setuid.c @@ -0,0 +1 @@ +#include From 0e8ad5182b21b654c96f9cf267d370beced8874a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 19 Oct 1998 14:40:52 +0000 Subject: [PATCH 1418/4487] Added setfsgid and setfsuid. --- sysdeps/unix/sysv/linux/arm/syscalls.list | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/syscalls.list b/sysdeps/unix/sysv/linux/arm/syscalls.list index 3adc087d15..e3fe1d7b8d 100644 --- a/sysdeps/unix/sysv/linux/arm/syscalls.list +++ b/sysdeps/unix/sysv/linux/arm/syscalls.list @@ -2,10 +2,12 @@ s_getgroups getgroups getgroups 2 __syscall_getgroups s_llseek llseek _llseek 5 __sys_llseek +s_setfsgid setfsgid setfsgid 1 __syscall_setfsgid +s_setfsuid setfsuid setfsuid 1 __syscall_setfsuid s_setgid setgid setgid 1 __syscall_setgid s_setgroups setgroups setgroups 2 __syscall_setgroups -s_setresuid setresuid setresuid 3 __syscall_setresuid s_setresgid setresgid setresgid 3 __syscall_setresgid +s_setresuid setresuid setresuid 3 __syscall_setresuid s_setuid setuid setuid 1 __syscall_setuid -vm86 - vm86 1 __vm86 vm86 syscall - syscall 5 syscall +vm86 - vm86 1 __vm86 vm86 From 97c1529523bb5cdba82b44a1b2d51d87701876b6 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 21 Oct 1998 01:50:21 +0000 Subject: [PATCH 1419/4487] * sysdeps/unix/sysv/linux/m68k/setfsuid.c: Add real contents. * sysdeps/unix/sysv/linux/m68k/syscalls.list: Add s_setfs[ug]id. --- sysdeps/unix/sysv/linux/m68k/setfsuid.c | 2 +- sysdeps/unix/sysv/linux/m68k/syscalls.list | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/m68k/setfsuid.c b/sysdeps/unix/sysv/linux/m68k/setfsuid.c index b4785957bc..a9f22eb8ab 100644 --- a/sysdeps/unix/sysv/linux/m68k/setfsuid.c +++ b/sysdeps/unix/sysv/linux/m68k/setfsuid.c @@ -1 +1 @@ -s +#include diff --git a/sysdeps/unix/sysv/linux/m68k/syscalls.list b/sysdeps/unix/sysv/linux/m68k/syscalls.list index 971c4ee7bf..93dec8c118 100644 --- a/sysdeps/unix/sysv/linux/m68k/syscalls.list +++ b/sysdeps/unix/sysv/linux/m68k/syscalls.list @@ -4,6 +4,8 @@ cacheflush EXTRA cacheflush 4 __cacheflush cacheflush s_getgroups getgroups getgroups 2 __syscall_getgroups s_llseek llseek _llseek 5 __sys_llseek +s_setfsgid setfsgid setfsgid 1 __syscall_setfsgid +s_setfsuid setfsuid setfsuid 1 __syscall_setfsuid s_setgid setgid setgid 1 __syscall_setgid s_setgroups setgroups setgroups 2 __syscall_setgroups s_setresgid setresgid setresgid 3 __syscall_setresgid From a4189240309f88690f7234267c02b4da1628ed93 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 21 Oct 1998 15:14:29 +0000 Subject: [PATCH 1420/4487] Linux/ARM implementation of setregid. --- sysdeps/unix/sysv/linux/arm/setregid.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/arm/setregid.c diff --git a/sysdeps/unix/sysv/linux/arm/setregid.c b/sysdeps/unix/sysv/linux/arm/setregid.c new file mode 100644 index 0000000000..99c57ad20f --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/setregid.c @@ -0,0 +1 @@ +#include From 7471881d52c4ac19b9d74b90873a9c07d19b5a44 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 21 Oct 1998 15:14:34 +0000 Subject: [PATCH 1421/4487] Linux/ARM implementation of setreuid. --- sysdeps/unix/sysv/linux/arm/setreuid.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/arm/setreuid.c diff --git a/sysdeps/unix/sysv/linux/arm/setreuid.c b/sysdeps/unix/sysv/linux/arm/setreuid.c new file mode 100644 index 0000000000..8ad61226e9 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/setreuid.c @@ -0,0 +1 @@ +#include From 7523f256a83d17d5faf798a1eb046eb1e1a5dc69 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 21 Oct 1998 15:27:37 +0000 Subject: [PATCH 1422/4487] Linux/m68k specific setregid definition. --- sysdeps/unix/sysv/linux/m68k/setregid.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/setregid.c diff --git a/sysdeps/unix/sysv/linux/m68k/setregid.c b/sysdeps/unix/sysv/linux/m68k/setregid.c new file mode 100644 index 0000000000..99c57ad20f --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/setregid.c @@ -0,0 +1 @@ +#include From 90f70b8356aa5bad73c0b13ced1c6d9d5570b2e6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 21 Oct 1998 15:27:42 +0000 Subject: [PATCH 1423/4487] Linux/m68k specific setreuid definition. --- sysdeps/unix/sysv/linux/m68k/setreuid.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/setreuid.c diff --git a/sysdeps/unix/sysv/linux/m68k/setreuid.c b/sysdeps/unix/sysv/linux/m68k/setreuid.c new file mode 100644 index 0000000000..8ad61226e9 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/setreuid.c @@ -0,0 +1 @@ +#include From 1d40317e33ca89fb96568abf5804af88d795ebd1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 21 Oct 1998 15:28:22 +0000 Subject: [PATCH 1424/4487] Add various __syscall_* definitions. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 30 +++++++++++++++++++ sysdeps/unix/sysv/linux/arm/syscalls.list | 32 +++++++++++++++++++++ sysdeps/unix/sysv/linux/m68k/syscalls.list | 32 +++++++++++++++++++++ sysdeps/unix/sysv/linux/mips/syscalls.list | 26 ++++++++++++++++- 4 files changed, 119 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 9f002b2ad1..5d89ccbd53 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -79,3 +79,33 @@ old_adjtimex - old_adjtimex 1 __adjtimex_tv32 __adjtimex@GLIBC_2.0 adjtimex@GLI # and one for timeval64 entry points adjtimex adjtime adjtimex 1 __syscall_adjtimex_tv64 + +# System calls with wrappers. +rt_sigaction - rt_sigaction 4 __syscall_rt_sigaction +rt_sigpending - rt_sigpending 2 __syscall_rt_sigpending +rt_sigprocmask - rt_sigprocmask 4 __syscall_rt_sigprocmask +rt_sigqueueinfo - rt_sigqueueinfo 3 __syscall_rt_sigqueueinfo +rt_sigsuspend - rt_sigsuspend 2 __syscall_rt_sigsuspend +rt_sigtimedwait - rt_sigtimedwait 4 __syscall_rt_sigtimedwait +s_getcwd getcwd getcwd 2 __syscall_getcwd +s_getdents getdents getdents 3 __syscall_getdents +s_getpriority getpriority getpriority 2 __syscall_getpriority +s_getresgid getresgid getresgid 3 __syscall_getresgid +s_getresuid getresuid getresuid 3 __syscall_getresuid +s_poll poll poll 3 __syscall_poll +s_pread64 pread64 pread 5 __syscall_pread64 +s_ptrace ptrace ptrace 4 __syscall_ptrace +s_pwrite64 pwrite64 pwrite 5 __syscall_pwrite64 +s_reboot reboot reboot 3 __syscall_reboot +s_sigaction sigaction sigaction 3 __syscall_sigaction +s_sigpending sigpending sigpending 1 __syscall_sigpending +s_sigprocmask sigprocmask sigprocmask 3 __syscall_sigprocmask +s_sigsuspend sigsuspend sigsuspend 3 __syscall_sigsuspend +s_sysctl sysctl _sysctl 1 __syscall__sysctl +s_ustat ustat ustat 2 __syscall_ustat +sys_fstat fxstat fstat 2 __syscall_fstat +sys_lstat lxstat lstat 2 __syscall_lstat +sys_mknod xmknod mknod 3 __syscall_mknod +sys_readv readv readv 3 __syscall_readv +sys_stat xstat stat 2 __syscall_stat +sys_writev writev writev 3 __syscall_writev diff --git a/sysdeps/unix/sysv/linux/arm/syscalls.list b/sysdeps/unix/sysv/linux/arm/syscalls.list index e3fe1d7b8d..b89badf831 100644 --- a/sysdeps/unix/sysv/linux/arm/syscalls.list +++ b/sysdeps/unix/sysv/linux/arm/syscalls.list @@ -6,8 +6,40 @@ s_setfsgid setfsgid setfsgid 1 __syscall_setfsgid s_setfsuid setfsuid setfsuid 1 __syscall_setfsuid s_setgid setgid setgid 1 __syscall_setgid s_setgroups setgroups setgroups 2 __syscall_setgroups +s_setregid setregid setregid 2 __syscall_setregid s_setresgid setresgid setresgid 3 __syscall_setresgid s_setresuid setresuid setresuid 3 __syscall_setresuid +s_setreuid setreuid setreuid 2 __syscall_setreuid s_setuid setuid setuid 1 __syscall_setuid syscall - syscall 5 syscall vm86 - vm86 1 __vm86 vm86 + +# System calls with wrappers. +rt_sigaction - rt_sigaction 4 __syscall_rt_sigaction +rt_sigpending - rt_sigpending 2 __syscall_rt_sigpending +rt_sigprocmask - rt_sigprocmask 4 __syscall_rt_sigprocmask +rt_sigqueueinfo - rt_sigqueueinfo 3 __syscall_rt_sigqueueinfo +rt_sigsuspend - rt_sigsuspend 2 __syscall_rt_sigsuspend +rt_sigtimedwait - rt_sigtimedwait 4 __syscall_rt_sigtimedwait +s_getcwd getcwd getcwd 2 __syscall_getcwd +s_getdents getdents getdents 3 __syscall_getdents +s_getpriority getpriority getpriority 2 __syscall_getpriority +s_getresgid getresgid getresgid 3 __syscall_getresgid +s_getresuid getresuid getresuid 3 __syscall_getresuid +s_poll poll poll 3 __syscall_poll +s_pread64 pread64 pread 5 __syscall_pread64 +s_ptrace ptrace ptrace 4 __syscall_ptrace +s_pwrite64 pwrite64 pwrite 5 __syscall_pwrite64 +s_reboot reboot reboot 3 __syscall_reboot +s_sigaction sigaction sigaction 3 __syscall_sigaction +s_sigpending sigpending sigpending 1 __syscall_sigpending +s_sigprocmask sigprocmask sigprocmask 3 __syscall_sigprocmask +s_sigsuspend sigsuspend sigsuspend 3 __syscall_sigsuspend +s_sysctl sysctl _sysctl 1 __syscall__sysctl +s_ustat ustat ustat 2 __syscall_ustat +sys_fstat fxstat fstat 2 __syscall_fstat +sys_lstat lxstat lstat 2 __syscall_lstat +sys_mknod xmknod mknod 3 __syscall_mknod +sys_readv readv readv 3 __syscall_readv +sys_stat xstat stat 2 __syscall_stat +sys_writev writev writev 3 __syscall_writev diff --git a/sysdeps/unix/sysv/linux/m68k/syscalls.list b/sysdeps/unix/sysv/linux/m68k/syscalls.list index 93dec8c118..d10a6e8626 100644 --- a/sysdeps/unix/sysv/linux/m68k/syscalls.list +++ b/sysdeps/unix/sysv/linux/m68k/syscalls.list @@ -8,6 +8,38 @@ s_setfsgid setfsgid setfsgid 1 __syscall_setfsgid s_setfsuid setfsuid setfsuid 1 __syscall_setfsuid s_setgid setgid setgid 1 __syscall_setgid s_setgroups setgroups setgroups 2 __syscall_setgroups +s_setregid setregid setregid 2 __syscall_setregid s_setresgid setresgid setresgid 3 __syscall_setresgid s_setresuid setresuid setresuid 3 __syscall_setresuid +s_setreuid setreuid setreuid 2 __syscall_setreuid s_setuid setuid setuid 1 __syscall_setuid + +# System calls with wrappers. +rt_sigaction - rt_sigaction 4 __syscall_rt_sigaction +rt_sigpending - rt_sigpending 2 __syscall_rt_sigpending +rt_sigprocmask - rt_sigprocmask 4 __syscall_rt_sigprocmask +rt_sigqueueinfo - rt_sigqueueinfo 3 __syscall_rt_sigqueueinfo +rt_sigsuspend - rt_sigsuspend 2 __syscall_rt_sigsuspend +rt_sigtimedwait - rt_sigtimedwait 4 __syscall_rt_sigtimedwait +s_getcwd getcwd getcwd 2 __syscall_getcwd +s_getdents getdents getdents 3 __syscall_getdents +s_getpriority getpriority getpriority 2 __syscall_getpriority +s_getresgid getresgid getresgid 3 __syscall_getresgid +s_getresuid getresuid getresuid 3 __syscall_getresuid +s_poll poll poll 3 __syscall_poll +s_pread64 pread64 pread 5 __syscall_pread64 +s_ptrace ptrace ptrace 4 __syscall_ptrace +s_pwrite64 pwrite64 pwrite 5 __syscall_pwrite64 +s_reboot reboot reboot 3 __syscall_reboot +s_sigaction sigaction sigaction 3 __syscall_sigaction +s_sigpending sigpending sigpending 1 __syscall_sigpending +s_sigprocmask sigprocmask sigprocmask 3 __syscall_sigprocmask +s_sigsuspend sigsuspend sigsuspend 3 __syscall_sigsuspend +s_sysctl sysctl _sysctl 1 __syscall__sysctl +s_ustat ustat ustat 2 __syscall_ustat +sys_fstat fxstat fstat 2 __syscall_fstat +sys_lstat lxstat lstat 2 __syscall_lstat +sys_mknod xmknod mknod 3 __syscall_mknod +sys_readv readv readv 3 __syscall_readv +sys_stat xstat stat 2 __syscall_stat +sys_writev writev writev 3 __syscall_writev diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index b9392001e4..7f3630c586 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -41,9 +41,33 @@ getresgid - getresgid 3 getresgid # There are defined locally because the caller is also defined in this dir. # s_llseek llseek _llseek 5 __sys_llseek + +# System calls with wrappers. +rt_sigaction - rt_sigaction 4 __syscall_rt_sigaction +rt_sigpending - rt_sigpending 2 __syscall_rt_sigpending +rt_sigprocmask - rt_sigprocmask 4 __syscall_rt_sigprocmask +rt_sigqueueinfo - rt_sigqueueinfo 3 __syscall_rt_sigqueueinfo +rt_sigsuspend - rt_sigsuspend 2 __syscall_rt_sigsuspend +rt_sigtimedwait - rt_sigtimedwait 4 __syscall_rt_sigtimedwait +s_getcwd getcwd getcwd 2 __syscall_getcwd +s_getdents getdents getdents 3 __syscall_getdents +s_getpriority getpriority getpriority 2 __syscall_getpriority +s_getresgid getresgid getresgid 3 __syscall_getresgid +s_getresuid getresuid getresuid 3 __syscall_getresuid +s_poll poll poll 3 __syscall_poll +s_pread64 pread64 pread 5 __syscall_pread64 +s_ptrace ptrace ptrace 4 __syscall_ptrace +s_pwrite64 pwrite64 pwrite 5 __syscall_pwrite64 +s_reboot reboot reboot 3 __syscall_reboot s_sigaction sigaction sigaction 3 __syscall_sigaction +s_sigpending sigpending sigpending 1 __syscall_sigpending +s_sigprocmask sigprocmask sigprocmask 3 __syscall_sigprocmask +s_sigsuspend sigsuspend sigsuspend 3 __syscall_sigsuspend +s_sysctl sysctl _sysctl 1 __syscall__sysctl s_ustat ustat ustat 2 __syscall_ustat -sys_mknod xmknod mknod 3 __syscall_mknod sys_fstat fxstat fstat 2 __syscall_fstat sys_lstat lxstat lstat 2 __syscall_lstat +sys_mknod xmknod mknod 3 __syscall_mknod +sys_readv readv readv 3 __syscall_readv sys_stat xstat stat 2 __syscall_stat +sys_writev writev writev 3 __syscall_writev From 5e9b4624add6b1629d13896239b7441d0f75a95b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 21 Oct 1998 15:40:22 +0000 Subject: [PATCH 1425/4487] [subdir=signal] (sysdep_routines): Add various rt_* functions. --- sysdeps/unix/sysv/linux/alpha/Makefile | 5 +++++ sysdeps/unix/sysv/linux/arm/Makefile | 5 +++++ sysdeps/unix/sysv/linux/m68k/Makefile | 5 +++++ sysdeps/unix/sysv/linux/mips/Makefile | 2 ++ 4 files changed, 17 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile index e03c31e446..b62a871506 100644 --- a/sysdeps/unix/sysv/linux/alpha/Makefile +++ b/sysdeps/unix/sysv/linux/alpha/Makefile @@ -15,3 +15,8 @@ sysdep_routines += osf_select osf_gettimeofday osf_settimeofday \ CFLAGS-ioperm.c = -Wa,-mev6 endif + +ifeq ($(subdir),signal) +sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \ + rt_sigqueueinfo rt_sigaction rt_sigpending +endif diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile index e65a5c1fa3..cebaa94134 100644 --- a/sysdeps/unix/sysv/linux/arm/Makefile +++ b/sysdeps/unix/sysv/linux/arm/Makefile @@ -1,3 +1,8 @@ ifeq ($(subdir),misc) sysdep_routines += setfsgid setfsuid setresgid setresuid endif + +ifeq ($(subdir),signal) +sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \ + rt_sigqueueinfo rt_sigaction rt_sigpending +endif diff --git a/sysdeps/unix/sysv/linux/m68k/Makefile b/sysdeps/unix/sysv/linux/m68k/Makefile index 7e46d51b86..8741550f03 100644 --- a/sysdeps/unix/sysv/linux/m68k/Makefile +++ b/sysdeps/unix/sysv/linux/m68k/Makefile @@ -11,3 +11,8 @@ ifeq ($(subdir),elf) sysdep-others += lddlibc4 install-bin += lddlibc4 endif + +ifeq ($(subdir),signal) +sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \ + rt_sigqueueinfo rt_sigaction rt_sigpending +endif diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile index e6240ea9a4..5d3e280d7c 100644 --- a/sysdeps/unix/sysv/linux/mips/Makefile +++ b/sysdeps/unix/sysv/linux/mips/Makefile @@ -1,4 +1,6 @@ ifeq ($(subdir),signal) +sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \ + rt_sigqueueinfo rt_sigaction rt_sigpending #sysdep_routines += sigsuspend endif From c4d999254991bc3bc924e9fc8dd7ecb43b6caec5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 22 Oct 1998 11:17:42 +0000 Subject: [PATCH 1426/4487] Wrap assembler macros in #ifdef __ASSEMBLER__. --- sysdeps/unix/arm/sysdep.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/arm/sysdep.h b/sysdeps/unix/arm/sysdep.h index b823b5a17d..6f0efc0c73 100644 --- a/sysdeps/unix/arm/sysdep.h +++ b/sysdeps/unix/arm/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998 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 @@ -22,5 +22,9 @@ /* Some definitions to allow the assembler in sysdeps/unix/ to build without needing ARM-specific versions of all the files. */ +#ifdef __ASSEMBLER__ + #define ret RETINSTR(mov, pc, r14) #define MOVE(a,b) mov b,a + +#endif From 96b2e43371301cfda1cca81153a78dd768c7f058 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 22 Oct 1998 14:41:10 +0000 Subject: [PATCH 1427/4487] Use __PMT instead of __P for sa_restorer. --- sysdeps/unix/sysv/linux/mips/bits/sigaction.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h index 7f72406e01..435f8e00f6 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h +++ b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h @@ -1,5 +1,5 @@ /* The proper definitions for Linux/MIPS's sigaction. - Copyright (C) 1993, 1994, 1995, 1997 Free Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1997, 1998 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 @@ -35,7 +35,7 @@ struct sigaction /* The ABI says here are two unused ints following. */ /* Restore handler. */ - void (*sa_restorer) __P ((void)); + void (*sa_restorer) __PMT ((void)); #if _MIPS_ISA == _MIPS_ISA_MIPS1 || _MIPS_ISA == _MIPS_ISA_MIPS2 int sa_resv[1]; From 3e79e1949120834bb7726b664d5f7899838753b9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 23 Oct 1998 13:41:33 +0000 Subject: [PATCH 1428/4487] Handle _PC_LINK_MAX here. --- sysdeps/unix/sysv/linux/alpha/fpathconf.c | 44 +++++++++++++++++++++-- sysdeps/unix/sysv/linux/alpha/pathconf.c | 44 +++++++++++++++++++++-- 2 files changed, 82 insertions(+), 6 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/fpathconf.c b/sysdeps/unix/sysv/linux/alpha/fpathconf.c index d8c428dcda..b822daaf39 100644 --- a/sysdeps/unix/sysv/linux/alpha/fpathconf.c +++ b/sysdeps/unix/sysv/linux/alpha/fpathconf.c @@ -22,9 +22,7 @@ #include #include -#define EXT2_SUPER_MAGIC 0xef53 -#define UFS_MAGIC 0x00011954 -#define UFS_CIGAM 0x54190100 /* byteswapped MAGIC */ +#include static long int default_fpathconf (int fd, int name); @@ -55,6 +53,46 @@ __fpathconf (fd, name) /* This filesystem supported files >2GB. */ return 64; } + if (name == _PC_LINK_MAX) + { + struct statfs fsbuf; + + /* Determine the filesystem type. */ + if (__fstatfs (fd, &fsbuf) < 0) + /* not possible, return the default value. */ + return LINK_MAX; + + switch (fsbuf.f_type) + { + case EXT2_SUPER_MAGIC: + return EXT2_LINK_MAX; + + case MINIX_SUPER_MAGIC: + case MINIX_SUPER_MAGIC2: + return MINIX_LINK_MAX; + + case MINIX2_SUPER_MAGIC: + case MINIX2_SUPER_MAGIC2: + return MINIX2_LINK_MAX; + + case XENIX_SUPER_MAGIC: + return XENIX_LINK_MAX; + + case SYSV4_SUPER_MAGIC: + case SYSV2_SUPER_MAGIC: + return SYSV_LINK_MAX; + + case COH_SUPER_MAGIC: + return COH_LINK_MAX; + + case UFS_MAGIC: + case UFS_CIGAM: + return UFS_LINK_MAX; + + default: + return LINK_MAX; + } + } /* Fallback to the generic version. */ return default_fpathconf (fd, name); diff --git a/sysdeps/unix/sysv/linux/alpha/pathconf.c b/sysdeps/unix/sysv/linux/alpha/pathconf.c index 91ca0942fb..15910be9a1 100644 --- a/sysdeps/unix/sysv/linux/alpha/pathconf.c +++ b/sysdeps/unix/sysv/linux/alpha/pathconf.c @@ -23,9 +23,7 @@ #include #include -#define EXT2_SUPER_MAGIC 0xef53 -#define UFS_MAGIC 0x00011954 -#define UFS_CIGAM 0x54190100 /* byteswapped MAGIC */ +#include static long int default_pathconf (const char *path, int name); @@ -48,6 +46,46 @@ __pathconf (const char *path, int name) /* This filesystem supported files >2GB. */ return 64; } + if (name == _PC_LINK_MAX) + { + struct statfs fsbuf; + + /* Determine the filesystem type. */ + if (__statfs (fd, &fsbuf) < 0) + /* not possible, return the default value. */ + return LINK_MAX; + + switch (fsbuf.f_type) + { + case EXT2_SUPER_MAGIC: + return EXT2_LINK_MAX; + + case MINIX_SUPER_MAGIC: + case MINIX_SUPER_MAGIC2: + return MINIX_LINK_MAX; + + case MINIX2_SUPER_MAGIC: + case MINIX2_SUPER_MAGIC2: + return MINIX2_LINK_MAX; + + case XENIX_SUPER_MAGIC: + return XENIX_LINK_MAX; + + case SYSV4_SUPER_MAGIC: + case SYSV2_SUPER_MAGIC: + return SYSV_LINK_MAX; + + case COH_SUPER_MAGIC: + return COH_LINK_MAX; + + case UFS_MAGIC: + case UFS_CIGAM: + return UFS_LINK_MAX; + + default: + return LINK_MAX; + } + } /* Fallback to the generic version. */ return default_pathconf (path, name); From 9c962c928d252fdd11b513ab30dfef5f3410e38d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 23 Oct 1998 13:41:45 +0000 Subject: [PATCH 1429/4487] Don't bother including here. --- sysdeps/unix/sysv/linux/arm/profil-counter.h | 1 - 1 file changed, 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/arm/profil-counter.h b/sysdeps/unix/sysv/linux/arm/profil-counter.h index 55a11bd76b..a1a4fc9d7f 100644 --- a/sysdeps/unix/sysv/linux/arm/profil-counter.h +++ b/sysdeps/unix/sysv/linux/arm/profil-counter.h @@ -18,7 +18,6 @@ Boston, MA 02111-1307, USA. */ #include -#include #include void From 8ffd8e8442ed1095bf383db1a0adec19fd46256f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 23 Oct 1998 13:41:52 +0000 Subject: [PATCH 1430/4487] Remove spurious call to C_SYMBOL_NAME macro. --- sysdeps/unix/sysv/linux/arm/sysdep.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.S b/sysdeps/unix/sysv/linux/arm/sysdep.S index 872ed4b555..3e3c853c78 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.S +++ b/sysdeps/unix/sysv/linux/arm/sysdep.S @@ -24,7 +24,7 @@ .type C_SYMBOL_NAME(errno),%object .size C_SYMBOL_NAME(errno),4 C_SYMBOL_NAME(errno): .zero 4 -weak_alias (C_SYMBOL_NAME(errno), C_SYMBOL_NAME(_errno)) +weak_alias (errno, _errno) .text /* The syscall stubs jump here when they detect an error. From 1cecc97eb772d72e662036dc16d1c5dafa8f1e6b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 23 Oct 1998 13:42:01 +0000 Subject: [PATCH 1431/4487] Include to define struct pt_regs. --- sysdeps/unix/sysv/linux/arm/bits/armsigctx.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h b/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h index 395e194293..ba78c03a89 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h +++ b/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h @@ -21,6 +21,8 @@ Fortunately 2.0 puts a magic number in the first word and this is not a legal value for `trap_no', so we can tell them apart. */ +#include + union k_sigcontext { struct From d8f1bea43317b14c313d861d62c86f8682d1f8a2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 23 Oct 1998 14:00:35 +0000 Subject: [PATCH 1432/4487] Remove duplicate ustat definition. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 1 - 1 file changed, 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 5d89ccbd53..4ccf41daf3 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -102,7 +102,6 @@ s_sigpending sigpending sigpending 1 __syscall_sigpending s_sigprocmask sigprocmask sigprocmask 3 __syscall_sigprocmask s_sigsuspend sigsuspend sigsuspend 3 __syscall_sigsuspend s_sysctl sysctl _sysctl 1 __syscall__sysctl -s_ustat ustat ustat 2 __syscall_ustat sys_fstat fxstat fstat 2 __syscall_fstat sys_lstat lxstat lstat 2 __syscall_lstat sys_mknod xmknod mknod 3 __syscall_mknod From a2567f79254ef11b9642835a4543388980e1bc76 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 23 Oct 1998 14:04:39 +0000 Subject: [PATCH 1433/4487] Add setresuid.c, setresgid.c, setfsuid.c, and setfsgid.c. --- sysdeps/unix/sysv/linux/arm/Dist | 4 ++++ sysdeps/unix/sysv/linux/m68k/Dist | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/sysdeps/unix/sysv/linux/arm/Dist b/sysdeps/unix/sysv/linux/arm/Dist index 16bbb3e2ef..18aa31fa9d 100644 --- a/sysdeps/unix/sysv/linux/arm/Dist +++ b/sysdeps/unix/sysv/linux/arm/Dist @@ -1,3 +1,7 @@ clone.S init-first.h +setresuid.c +setresgid.c +setfsuid.c +setfsgid.c bits/armsigctx.h diff --git a/sysdeps/unix/sysv/linux/m68k/Dist b/sysdeps/unix/sysv/linux/m68k/Dist index 6059865f54..c28074fb5b 100644 --- a/sysdeps/unix/sysv/linux/m68k/Dist +++ b/sysdeps/unix/sysv/linux/m68k/Dist @@ -1,3 +1,7 @@ clone.S mremap.S +setresuid.c +setresgid.c +setfsuid.c +setfsgid.c sys/reg.h From abcecb5bd2eff64c3ba7094014633ae8e188190b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 23 Oct 1998 23:22:54 +0000 Subject: [PATCH 1434/4487] (O_LARGEFILE, O_NOFOLLOW, O_DIRECT): New macros. (O_DIRECTORY): Correct definition according to official 2.1.126. --- sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index 63e754d5fe..a01dcaec32 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -41,7 +41,10 @@ #define O_ASYNC 0x1000 #ifdef __USE_GNU -# define O_DIRECTORY 0x2000 /* Must be a directory. */ +# define O_LARGEFILE 0x2000 /* Allow large file opens. */ +# define O_NOFOLLOW 0x4000 /* Do not follow links. */ +# define O_DIRECT 0x8000 /* Direct disk access hint. */ +# define O_DIRECTORY 0x10000 /* Must be a directory. */ #endif #define O_NDELAY O_NONBLOCK From 47754990f43562e7076631fc27b040e12c85e5d1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 23 Oct 1998 23:24:00 +0000 Subject: [PATCH 1435/4487] (O_NOFOLLOW): New macro. --- sysdeps/unix/sysv/linux/alpha/bits/fcntl.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h index e67ad19f65..70ebbeba61 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h @@ -46,6 +46,7 @@ #ifdef __USE_GNU # define O_DIRECT 040000 /* Direct disk access. */ # define O_DIRECTORY 0100000 /* Must be a directory. */ +# define O_NOFOLLOW 0200000 /* Do not follow links. */ #endif /* Not necessary, files are always with 64bit off_t. */ From ec86258b004ed05399ec3b271c0fa314370afbfd Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 24 Oct 1998 10:59:25 +0000 Subject: [PATCH 1436/4487] (__pathconf): Use path as first argument to statfs. --- sysdeps/unix/sysv/linux/alpha/pathconf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/pathconf.c b/sysdeps/unix/sysv/linux/alpha/pathconf.c index 15910be9a1..24d6880523 100644 --- a/sysdeps/unix/sysv/linux/alpha/pathconf.c +++ b/sysdeps/unix/sysv/linux/alpha/pathconf.c @@ -51,7 +51,7 @@ __pathconf (const char *path, int name) struct statfs fsbuf; /* Determine the filesystem type. */ - if (__statfs (fd, &fsbuf) < 0) + if (__statfs (path, &fsbuf) < 0) /* not possible, return the default value. */ return LINK_MAX; From 91c2d735431d38358a6cb6f7fea9682aa6d320ec Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 24 Oct 1998 11:01:21 +0000 Subject: [PATCH 1437/4487] Remove duplicate definition of O_LARGEFILE. --- sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index a01dcaec32..027347053b 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -49,9 +49,6 @@ #define O_NDELAY O_NONBLOCK -/* XXX missing */ -#define O_LARGEFILE 0 - /* Values for the second argument to `fcntl'. */ #define F_DUPFD 0 /* Duplicate file descriptor. */ #define F_GETFD 1 /* Get file descriptor flags. */ From e1a011e7312f01441782877076631d8f07bac9c6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 25 Oct 1998 09:09:29 +0000 Subject: [PATCH 1438/4487] (LOCK_SH, LOCK_EX, LOCK_NB, LOCK_UN): Protect with __USE_BSD. --- sysdeps/unix/sysv/linux/alpha/bits/fcntl.h | 12 +++++++----- sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 12 +++++++----- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h index 70ebbeba61..9f90ddf57c 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h @@ -89,12 +89,14 @@ #define F_EXLCK 16 /* or 3 */ #define F_SHLCK 32 /* or 4 */ -/* operations for bsd flock(), also used by the kernel implementation */ -#define LOCK_SH 1 /* shared lock */ -#define LOCK_EX 2 /* exclusive lock */ -#define LOCK_NB 4 /* or'd with one of the above to prevent +/* Operations for bsd flock(), also used by the kernel implementation */ +#ifdef __USE_BSD +# define LOCK_SH 1 /* shared lock */ +# define LOCK_EX 2 /* exclusive lock */ +# define LOCK_NB 4 /* or'd with one of the above to prevent blocking */ -#define LOCK_UN 8 /* remove lock */ +# define LOCK_UN 8 /* remove lock */ +#endif /* We don't need to support __USE_FILE_OFFSET64. */ struct flock diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index 027347053b..0a21a59e0a 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -86,12 +86,14 @@ #define F_EXLCK 4 /* or 3 */ #define F_SHLCK 8 /* or 4 */ -/* operations for bsd flock(), also used by the kernel implementation */ -#define LOCK_SH 1 /* shared lock */ -#define LOCK_EX 2 /* exclusive lock */ -#define LOCK_NB 4 /* or'd with one of the above to prevent XXXXXXXXXXXXXXXXXX +#ifdef __USE_BSD +/* Operations for bsd flock(), also used by the kernel implementation */ +# define LOCK_SH 1 /* shared lock */ +# define LOCK_EX 2 /* exclusive lock */ +# define LOCK_NB 4 /* or'd with one of the above to prevent XXXXXXXXXXXXXXXXXX blocking */ -#define LOCK_UN 8 /* remove lock */ +# define LOCK_UN 8 /* remove lock */ +#endif typedef struct flock { From 0b78da0365f4b4a627a7bdf40f967fb5660de9be Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 25 Oct 1998 09:09:44 +0000 Subject: [PATCH 1439/4487] (timeval): Protect with __need_timeval. --- sysdeps/unix/sysv/linux/alpha/bits/time.h | 12 +++++++----- sysdeps/unix/sysv/linux/mips/bits/time.h | 9 ++++++--- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/time.h b/sysdeps/unix/sysv/linux/alpha/bits/time.h index acb2b41f97..f44b5dcabc 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/time.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/time.h @@ -42,10 +42,11 @@ # endif /* bits/time.h */ #endif /* !__need_timeval */ - -#ifndef _STRUCT_TIMEVAL -# define _STRUCT_TIMEVAL 1 -# include +#ifdef __need_timeval +# undef __need_timeval +# ifndef _STRUCT_TIMEVAL +# define _STRUCT_TIMEVAL 1 +# include /* A time value that is accurate to the nearest microsecond but also has a range of years. */ @@ -54,4 +55,5 @@ struct timeval __time_t tv_sec; /* Seconds. */ __time_t tv_usec; /* Microseconds. */ }; -#endif /* struct timeval */ +# endif /* struct timeval */ +#endif /* need timeval */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/time.h b/sysdeps/unix/sysv/linux/mips/bits/time.h index 91dc65c910..15c7cb3852 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/time.h +++ b/sysdeps/unix/sysv/linux/mips/bits/time.h @@ -42,8 +42,10 @@ # endif /* bits/time.h */ #endif -#ifndef _STRUCT_TIMEVAL -# define _STRUCT_TIMEVAL 1 +#ifdef __need_timeval +# undef __need_timeval +# ifndef _STRUCT_TIMEVAL +# define _STRUCT_TIMEVAL 1 /* A time value that is accurate to the nearest microsecond but also has a range of years. */ struct timeval @@ -51,4 +53,5 @@ struct timeval long int tv_sec; /* Seconds. */ long int tv_usec; /* Microseconds. */ }; -#endif /* struct timeval */ +# endif /* struct timeval */ +#endif /* need timeval */ From b227d2e7ebf9d73b26b94e342444ac9c023695ca Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 25 Oct 1998 09:10:44 +0000 Subject: [PATCH 1440/4487] (__fd_set): Define element as fds_bits only is __USE_XOPEN. Otherwise use __fds_bits. --- sysdeps/unix/sysv/linux/alpha/bits/types.h | 11 +++++++++-- sysdeps/unix/sysv/linux/mips/bits/types.h | 11 +++++++++-- sysdeps/unix/sysv/sysv4/solaris2/bits/types.h | 7 ++++++- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h index d4f2217f05..aee9d046ec 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/types.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h @@ -102,8 +102,13 @@ typedef unsigned long int __fd_mask; /* fd_set for select and pselect. */ typedef struct { - /* XPG4.2 requires this member name. */ + /* XPG4.2 requires this member name. Otherwise avoid the name + from the user namespace. */ +#ifdef __USE_XOPEN __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS]; +#else + __fd_mask __fds_bits[__FD_SETSIZE / __NFDBITS]; +#endif } __fd_set; /* Used in XTI. */ @@ -115,6 +120,8 @@ typedef long int __intptr_t; /* Now add the thread types. */ -#include +#if defined __USE_POSIX199506 || defined __USE_UNIX98 +# include +#endif #endif /* bits/types.h */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h index c716d5735d..e32dadf57f 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/types.h +++ b/sysdeps/unix/sysv/linux/mips/bits/types.h @@ -99,8 +99,13 @@ typedef unsigned long int __fd_mask; /* fd_set for select and pselect. */ typedef struct { - /* XPG4.2 requires this member name. */ + /* XPG4.2 requires this member name. Otherwise avoid the name + from the user namespace. */ +#ifdef __USE_XOPEN __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS]; +#else + __fd_mask __fds_bits[__FD_SETSIZE / __NFDBITS]; +#endif } __fd_set; @@ -139,6 +144,8 @@ typedef int __intptr_t; /* Now add the thread types. */ -#include +#if defined __USE_POSIX199506 || defined __USE_UNIX98 +# include +#endif #endif /* bits/types.h */ diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h index e25dec98fb..aa73ebcb19 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h @@ -90,8 +90,13 @@ typedef int __key_t; /* Type of an IPC key */ typedef struct { - /* XPG4.2 requires this member name. */ + /* XPG4.2 requires this member name. Otherwise avoid the name + from the user namespace. */ +#ifdef __USE_XOPEN unsigned long int fds_bits[(__FD_SETSIZE + (__NFDBITS - 1)) / __NFDBITS]; +#else + unsigned long int __fds_bits[(__FD_SETSIZE + (__NFDBITS - 1)) / __NFDBITS]; +#endif } __fd_set; typedef unsigned long int __fd_mask; From dca170801437cac4a857e1f855b7446c5fe8c7e1 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 26 Oct 1998 01:47:41 +0000 Subject: [PATCH 1441/4487] * sysdeps/unix/sysv/linux/m68k/Makefile [subdir=signal]: Remove rt_sigsuspend, rt_sigprocmask, rt_sigtimedwait, rt_sigqueueinfo, rt_sigaction and rt_sigpending. * sysdeps/unix/sysv/linux/m68k/syscalls.list: Remove all entries for __syscall_* functions. * sysdeps/unix/sysv/linux/m68k/sysdep.h: Implement INLINE_SYSCALL. --- sysdeps/unix/sysv/linux/m68k/Makefile | 5 --- sysdeps/unix/sysv/linux/m68k/syscalls.list | 42 ------------------- sysdeps/unix/sysv/linux/m68k/sysdep.h | 48 +++++++++++++++++++++- 3 files changed, 47 insertions(+), 48 deletions(-) diff --git a/sysdeps/unix/sysv/linux/m68k/Makefile b/sysdeps/unix/sysv/linux/m68k/Makefile index 8741550f03..7e46d51b86 100644 --- a/sysdeps/unix/sysv/linux/m68k/Makefile +++ b/sysdeps/unix/sysv/linux/m68k/Makefile @@ -11,8 +11,3 @@ ifeq ($(subdir),elf) sysdep-others += lddlibc4 install-bin += lddlibc4 endif - -ifeq ($(subdir),signal) -sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \ - rt_sigqueueinfo rt_sigaction rt_sigpending -endif diff --git a/sysdeps/unix/sysv/linux/m68k/syscalls.list b/sysdeps/unix/sysv/linux/m68k/syscalls.list index d10a6e8626..9ae4f73757 100644 --- a/sysdeps/unix/sysv/linux/m68k/syscalls.list +++ b/sysdeps/unix/sysv/linux/m68k/syscalls.list @@ -1,45 +1,3 @@ # File name Caller Syscall name # args Strong name Weak names cacheflush EXTRA cacheflush 4 __cacheflush cacheflush - -s_getgroups getgroups getgroups 2 __syscall_getgroups -s_llseek llseek _llseek 5 __sys_llseek -s_setfsgid setfsgid setfsgid 1 __syscall_setfsgid -s_setfsuid setfsuid setfsuid 1 __syscall_setfsuid -s_setgid setgid setgid 1 __syscall_setgid -s_setgroups setgroups setgroups 2 __syscall_setgroups -s_setregid setregid setregid 2 __syscall_setregid -s_setresgid setresgid setresgid 3 __syscall_setresgid -s_setresuid setresuid setresuid 3 __syscall_setresuid -s_setreuid setreuid setreuid 2 __syscall_setreuid -s_setuid setuid setuid 1 __syscall_setuid - -# System calls with wrappers. -rt_sigaction - rt_sigaction 4 __syscall_rt_sigaction -rt_sigpending - rt_sigpending 2 __syscall_rt_sigpending -rt_sigprocmask - rt_sigprocmask 4 __syscall_rt_sigprocmask -rt_sigqueueinfo - rt_sigqueueinfo 3 __syscall_rt_sigqueueinfo -rt_sigsuspend - rt_sigsuspend 2 __syscall_rt_sigsuspend -rt_sigtimedwait - rt_sigtimedwait 4 __syscall_rt_sigtimedwait -s_getcwd getcwd getcwd 2 __syscall_getcwd -s_getdents getdents getdents 3 __syscall_getdents -s_getpriority getpriority getpriority 2 __syscall_getpriority -s_getresgid getresgid getresgid 3 __syscall_getresgid -s_getresuid getresuid getresuid 3 __syscall_getresuid -s_poll poll poll 3 __syscall_poll -s_pread64 pread64 pread 5 __syscall_pread64 -s_ptrace ptrace ptrace 4 __syscall_ptrace -s_pwrite64 pwrite64 pwrite 5 __syscall_pwrite64 -s_reboot reboot reboot 3 __syscall_reboot -s_sigaction sigaction sigaction 3 __syscall_sigaction -s_sigpending sigpending sigpending 1 __syscall_sigpending -s_sigprocmask sigprocmask sigprocmask 3 __syscall_sigprocmask -s_sigsuspend sigsuspend sigsuspend 3 __syscall_sigsuspend -s_sysctl sysctl _sysctl 1 __syscall__sysctl -s_ustat ustat ustat 2 __syscall_ustat -sys_fstat fxstat fstat 2 __syscall_fstat -sys_lstat lxstat lstat 2 __syscall_lstat -sys_mknod xmknod mknod 3 __syscall_mknod -sys_readv readv readv 3 __syscall_readv -sys_stat xstat stat 2 __syscall_stat -sys_writev writev writev 3 __syscall_writev diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h index 4094172587..d445471440 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -158,4 +158,50 @@ SYSCALL_ERROR_LABEL: \ #define MOVE(x,y) movel x , y #endif -#endif /* __ASSEMBLER__ */ +#else /* not __ASSEMBLER__ */ + +/* Define a macro which expands into the inline wrapper code for a system + call. */ +#undef INLINE_SYSCALL +#define INLINE_SYSCALL(name, nr, args...) \ + ({ unsigned int _sys_result; \ + { \ + LOAD_ARGS_##nr (args) \ + register int _d0 asm ("%d0") = __NR_##name; \ + asm volatile ("trap #0" \ + : "=d" (_d0) \ + : "0" (_d0) ASM_ARGS_##nr \ + : "d0"); \ + _sys_result = _d0; \ + } \ + if (_sys_result >= (unsigned int) -4095) \ + { \ + __set_errno (-_sys_result); \ + _sys_result = (unsigned int) -1; \ + } \ + (int) _sys_result; }) + +#define LOAD_ARGS_0() +#define ASM_ARGS_0 +#define LOAD_ARGS_1(a1) \ + register int _d1 asm ("d1") = (int) (a1); \ + LOAD_ARGS_0 () +#define ASM_ARGS_1 ASM_ARGS_0, "d" (_d1) +#define LOAD_ARGS_2(a1, a2) \ + register int _d2 asm ("d2") = (int) (a2); \ + LOAD_ARGS_1 (a1) +#define ASM_ARGS_2 ASM_ARGS_1, "d" (_d2) +#define LOAD_ARGS_3(a1, a2, a3) \ + register int _d3 asm ("d3") = (int) (a3); \ + LOAD_ARGS_2 (a1, a2) +#define ASM_ARGS_3 ASM_ARGS_2, "d" (_d3) +#define LOAD_ARGS_4(a1, a2, a3, a4) \ + register int _d4 asm ("d4") = (int) (a4); \ + LOAD_ARGS_3 (a1, a2, a3) +#define ASM_ARGS_4 ASM_ARGS_3, "d" (_d4) +#define LOAD_ARGS_5(a1, a2, a3, a4, a5) \ + register int _d5 asm ("d5") = (int) (a5); \ + LOAD_ARGS_4 (a1, a2, a3, a4) +#define ASM_ARGS_5 ASM_ARGS_4, "d" (_d5) + +#endif /* not __ASSEMBLER__ */ From d87c3bc05d7ffb819a42f592662139c82ff1074d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 26 Oct 1998 11:08:18 +0000 Subject: [PATCH 1442/4487] Rename __syscall_pwrite64 to __syscall_pwrite. Rename __sys_llseek to __syscall__llseek. --- sysdeps/unix/sysv/linux/arm/syscalls.list | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/syscalls.list b/sysdeps/unix/sysv/linux/arm/syscalls.list index b89badf831..6f332ce873 100644 --- a/sysdeps/unix/sysv/linux/arm/syscalls.list +++ b/sysdeps/unix/sysv/linux/arm/syscalls.list @@ -1,7 +1,7 @@ # File name Caller Syscall name # args Strong name Weak names s_getgroups getgroups getgroups 2 __syscall_getgroups -s_llseek llseek _llseek 5 __sys_llseek +s_llseek llseek _llseek 5 __syscall__llseek s_setfsgid setfsgid setfsgid 1 __syscall_setfsgid s_setfsuid setfsuid setfsuid 1 __syscall_setfsuid s_setgid setgid setgid 1 __syscall_setgid @@ -27,9 +27,9 @@ s_getpriority getpriority getpriority 2 __syscall_getpriority s_getresgid getresgid getresgid 3 __syscall_getresgid s_getresuid getresuid getresuid 3 __syscall_getresuid s_poll poll poll 3 __syscall_poll -s_pread64 pread64 pread 5 __syscall_pread64 +s_pread64 pread64 pread 5 __syscall_pread s_ptrace ptrace ptrace 4 __syscall_ptrace -s_pwrite64 pwrite64 pwrite 5 __syscall_pwrite64 +s_pwrite64 pwrite64 pwrite 5 __syscall_pwrite s_reboot reboot reboot 3 __syscall_reboot s_sigaction sigaction sigaction 3 __syscall_sigaction s_sigpending sigpending sigpending 1 __syscall_sigpending From 04cfab506548c350172ff8d8bb7c5652e267907b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 26 Oct 1998 11:09:12 +0000 Subject: [PATCH 1443/4487] Rename __syscall_pwrite64 to __syscall_pwrite. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 2 -- sysdeps/unix/sysv/linux/mips/syscalls.list | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 4ccf41daf3..b48f538211 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -93,9 +93,7 @@ s_getpriority getpriority getpriority 2 __syscall_getpriority s_getresgid getresgid getresgid 3 __syscall_getresgid s_getresuid getresuid getresuid 3 __syscall_getresuid s_poll poll poll 3 __syscall_poll -s_pread64 pread64 pread 5 __syscall_pread64 s_ptrace ptrace ptrace 4 __syscall_ptrace -s_pwrite64 pwrite64 pwrite 5 __syscall_pwrite64 s_reboot reboot reboot 3 __syscall_reboot s_sigaction sigaction sigaction 3 __syscall_sigaction s_sigpending sigpending sigpending 1 __syscall_sigpending diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index 7f3630c586..dd38647d95 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -40,7 +40,7 @@ getresgid - getresgid 3 getresgid # # There are defined locally because the caller is also defined in this dir. # -s_llseek llseek _llseek 5 __sys_llseek +s_llseek llseek _llseek 5 __syscall__llseek # System calls with wrappers. rt_sigaction - rt_sigaction 4 __syscall_rt_sigaction @@ -55,9 +55,9 @@ s_getpriority getpriority getpriority 2 __syscall_getpriority s_getresgid getresgid getresgid 3 __syscall_getresgid s_getresuid getresuid getresuid 3 __syscall_getresuid s_poll poll poll 3 __syscall_poll -s_pread64 pread64 pread 5 __syscall_pread64 +s_pread64 pread64 pread 5 __syscall_pread s_ptrace ptrace ptrace 4 __syscall_ptrace -s_pwrite64 pwrite64 pwrite 5 __syscall_pwrite64 +s_pwrite64 pwrite64 pwrite 5 __syscall_pwrite s_reboot reboot reboot 3 __syscall_reboot s_sigaction sigaction sigaction 3 __syscall_sigaction s_sigpending sigpending sigpending 1 __syscall_sigpending From ad427949d159fd79bc4b422851c173113ab96b72 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 26 Oct 1998 15:43:18 +0000 Subject: [PATCH 1444/4487] Include bits/pthreadtypes.h only not for POSIX 199506. --- sysdeps/unix/sysv/linux/alpha/bits/types.h | 2 +- sysdeps/unix/sysv/linux/mips/bits/types.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h index aee9d046ec..6a1e846263 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/types.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h @@ -120,7 +120,7 @@ typedef long int __intptr_t; /* Now add the thread types. */ -#if defined __USE_POSIX199506 || defined __USE_UNIX98 +#ifdef __USE_UNIX98 # include #endif diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h index e32dadf57f..6629366c30 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/types.h +++ b/sysdeps/unix/sysv/linux/mips/bits/types.h @@ -144,7 +144,7 @@ typedef int __intptr_t; /* Now add the thread types. */ -#if defined __USE_POSIX199506 || defined __USE_UNIX98 +#ifdef __USE_UNIX98 # include #endif From 9dda87abb5d14575622ac712712e9edf290aab56 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 28 Oct 1998 14:41:28 +0000 Subject: [PATCH 1445/4487] (__FDS_BITS): New macro to access fds_bits member. --- sysdeps/unix/sysv/linux/alpha/bits/types.h | 2 ++ sysdeps/unix/sysv/linux/mips/bits/types.h | 2 ++ sysdeps/unix/sysv/sysv4/solaris2/bits/types.h | 2 ++ 3 files changed, 6 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h index 6a1e846263..d71599cb32 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/types.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h @@ -106,8 +106,10 @@ typedef struct from the user namespace. */ #ifdef __USE_XOPEN __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS]; +# define __FDS_BITS(set) ((set)->fds_bits) #else __fd_mask __fds_bits[__FD_SETSIZE / __NFDBITS]; +# define __FDS_BITS(set) ((set)->__fds_bits) #endif } __fd_set; diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h index 6629366c30..36a1e0e0e3 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/types.h +++ b/sysdeps/unix/sysv/linux/mips/bits/types.h @@ -103,8 +103,10 @@ typedef struct from the user namespace. */ #ifdef __USE_XOPEN __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS]; +# define __FDS_BITS(set) ((set)->fds_bits) #else __fd_mask __fds_bits[__FD_SETSIZE / __NFDBITS]; +# define __FDS_BITS(set) ((set)->__fds_bits) #endif } __fd_set; diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h index aa73ebcb19..aeba05b7b3 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h @@ -94,8 +94,10 @@ typedef struct from the user namespace. */ #ifdef __USE_XOPEN unsigned long int fds_bits[(__FD_SETSIZE + (__NFDBITS - 1)) / __NFDBITS]; +# define __FDS_BITS(set) ((set)->fds_bits) #else unsigned long int __fds_bits[(__FD_SETSIZE + (__NFDBITS - 1)) / __NFDBITS]; +# define __FDS_BITS(set) ((set)->__fds_bits) #endif } __fd_set; From 13d54c34ab675e0f0fec92532ce4661c9f96efd4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 31 Oct 1998 23:37:54 +0000 Subject: [PATCH 1446/4487] (INLINE_SYSCALL*): New. (inline_syscall*): New. --- sysdeps/unix/alpha/sysdep.h | 165 +++++++++++++++++++++++++++++++++++- 1 file changed, 164 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h index f43c7f8edf..80cb3e2486 100644 --- a/sysdeps/unix/alpha/sysdep.h +++ b/sysdeps/unix/alpha/sysdep.h @@ -109,4 +109,167 @@ __LABEL(name) \ #define MOVE(x,y) mov x,y -#endif +#else /* !ASSEMBLER */ + +/* Define a macro which expands inline into the wrapper code for a + system call. */ + +#undef INLINE_SYSCALL +#define INLINE_SYSCALL(name, nr, args...) INLINE_SYSCALL1(name, nr, args) + +#define INLINE_SYSCALL1(name, nr, args...) \ +({ \ + long _sc_ret, _sc_err; \ + inline_syscall##nr(name, args); \ + if (_sc_err) \ + { \ + __set_errno (_sc_ret); \ + _sc_ret = -1L; \ + } \ + _sc_ret; \ +}) + +#define inline_syscall_clobbers \ + "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8", \ + "$22", "$23", "$24", "$25", "$27", "$28" + +/* It is moderately important optimization-wise to limit the lifetime + of the hard-register variables as much as possible. Thus we copy + in/out as close to the asm as possible. */ + +#define inline_syscall0(name) \ +{ \ + register long _sc_0 __asm__("$0"); \ + register long _sc_19 __asm__("$19"); \ + \ + _sc_0 = __NR_##name; \ + __asm__("callsys # %0 %1 <= %2" \ + : "=r"(_sc_0), "=r"(_sc_19) \ + : "0"(_sc_0) \ + : inline_syscall_clobbers); \ + _sc_ret = _sc_0, _sc_err = _sc_19; \ +} + +#define inline_syscall1(name,arg1) \ +{ \ + register long _sc_0 __asm__("$0"); \ + register long _sc_16 __asm__("$16"); \ + register long _sc_19 __asm__("$19"); \ + \ + _sc_0 = __NR_##name; \ + _sc_16 = (long) (arg1); \ + __asm__("callsys # %0 %1 <= %2 %3" \ + : "=r"(_sc_0), "=r"(_sc_19) \ + : "0"(_sc_0), "r"(_sc_16) \ + : inline_syscall_clobbers); \ + _sc_ret = _sc_0, _sc_err = _sc_19; \ +} + +#define inline_syscall2(name,arg1,arg2) \ +{ \ + register long _sc_0 __asm__("$0"); \ + register long _sc_16 __asm__("$16"); \ + register long _sc_17 __asm__("$17"); \ + register long _sc_19 __asm__("$19"); \ + \ + _sc_0 = __NR_##name; \ + _sc_16 = (long) (arg1); \ + _sc_17 = (long) (arg2); \ + __asm__("callsys # %0 %1 <= %2 %3 %4" \ + : "=r"(_sc_0), "=r"(_sc_19) \ + : "0"(_sc_0), "r"(_sc_16), "r"(_sc_17) \ + : inline_syscall_clobbers); \ + _sc_ret = _sc_0, _sc_err = _sc_19; \ +} + +#define inline_syscall3(name,arg1,arg2,arg3) \ +{ \ + register long _sc_0 __asm__("$0"); \ + register long _sc_16 __asm__("$16"); \ + register long _sc_17 __asm__("$17"); \ + register long _sc_18 __asm__("$18"); \ + register long _sc_19 __asm__("$19"); \ + \ + _sc_0 = __NR_##name; \ + _sc_16 = (long) (arg1); \ + _sc_17 = (long) (arg2); \ + _sc_18 = (long) (arg3); \ + __asm__("callsys # %0 %1 <= %2 %3 %4 %5" \ + : "=r"(_sc_0), "=r"(_sc_19) \ + : "0"(_sc_0), "r"(_sc_16), "r"(_sc_17), \ + "r"(_sc_18) \ + : inline_syscall_clobbers); \ + _sc_ret = _sc_0, _sc_err = _sc_19; \ +} + +#define inline_syscall4(name,arg1,arg2,arg3,arg4) \ +{ \ + register long _sc_0 __asm__("$0"); \ + register long _sc_16 __asm__("$16"); \ + register long _sc_17 __asm__("$17"); \ + register long _sc_18 __asm__("$18"); \ + register long _sc_19 __asm__("$19"); \ + \ + _sc_0 = __NR_##name; \ + _sc_16 = (long) (arg1); \ + _sc_17 = (long) (arg2); \ + _sc_18 = (long) (arg3); \ + _sc_19 = (long) (arg4); \ + __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6" \ + : "=r"(_sc_0), "=r"(_sc_19) \ + : "0"(_sc_0), "r"(_sc_16), "r"(_sc_17), \ + "r"(_sc_18), "1"(_sc_19) \ + : inline_syscall_clobbers); \ + _sc_ret = _sc_0, _sc_err = _sc_19; \ +} + +#define inline_syscall5(name,arg1,arg2,arg3,arg4,arg5) \ +{ \ + register long _sc_0 __asm__("$0"); \ + register long _sc_16 __asm__("$16"); \ + register long _sc_17 __asm__("$17"); \ + register long _sc_18 __asm__("$18"); \ + register long _sc_19 __asm__("$19"); \ + register long _sc_20 __asm__("$20"); \ + \ + _sc_0 = __NR_##name; \ + _sc_16 = (long) (arg1); \ + _sc_17 = (long) (arg2); \ + _sc_18 = (long) (arg3); \ + _sc_19 = (long) (arg4); \ + _sc_20 = (long) (arg5); \ + __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7" \ + : "=r"(_sc_0), "=r"(_sc_19) \ + : "0"(_sc_0), "r"(_sc_16), "r"(_sc_17), \ + "r"(_sc_18), "1"(_sc_19), "r"(_sc_20) \ + : inline_syscall_clobbers); \ + _sc_ret = _sc_0, _sc_err = _sc_19; \ +} + +#define inline_syscall6(name,arg1,arg2,arg3,arg4,arg5,arg6) \ +{ \ + register long _sc_0 __asm__("$0"); \ + register long _sc_16 __asm__("$16"); \ + register long _sc_17 __asm__("$17"); \ + register long _sc_18 __asm__("$18"); \ + register long _sc_19 __asm__("$19"); \ + register long _sc_20 __asm__("$20"); \ + register long _sc_21 __asm__("$21"); \ + \ + _sc_0 = __NR_##name; \ + _sc_16 = (long) (arg1); \ + _sc_17 = (long) (arg2); \ + _sc_18 = (long) (arg3); \ + _sc_19 = (long) (arg4); \ + _sc_20 = (long) (arg5); \ + _sc_21 = (long) (arg6); \ + __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7 %8" \ + : "=r"(_sc_0), "=r"(_sc_19) \ + : "0"(_sc_0), "r"(_sc_16), "r"(_sc_17), \ + "r"(_sc_18), "1"(_sc_19), "r"(_sc_20), \ + "r"(_sc_21) \ + : inline_syscall_clobbers); \ + _sc_ret = _sc_0, _sc_err = _sc_19; \ +} + +#endif /* ASSEMBLER */ From 26ecf6a8865ecda48091ad852b32515caa3ef11c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 31 Oct 1998 23:38:09 +0000 Subject: [PATCH 1447/4487] (INLINE_SYSCALL): New. --- sysdeps/unix/sysv/linux/alpha/sysdep.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h index 29d973f5b9..1a3cf37c6d 100644 --- a/sysdeps/unix/sysv/linux/alpha/sysdep.h +++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h @@ -55,3 +55,15 @@ #define __NR_osf_shmat 209 #define __NR_osf_getsysinfo 256 #define __NR_osf_setsysinfo 257 + +/* + * In order to get the hidden arguments for rt_sigaction set up + * properly, we need to call the assembly version. Detect this in the + * INLINE_SYSCALL macro, and fail to expand inline in that case. + */ + +#undef INLINE_SYSCALL +#define INLINE_SYSCALL(name, nr, args...) \ + (__NR_##name == __NR_rt_sigaction \ + ? __syscall_##name(args) \ + : INLINE_SYSCALL1(name, nr, args)) From 1dc5a942c96e0b48959d086d3423f5245bef4fef Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 31 Oct 1998 23:38:23 +0000 Subject: [PATCH 1448/4487] Kill __syscall* bits. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 27 --------------------- 1 file changed, 27 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index b48f538211..9f002b2ad1 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -79,30 +79,3 @@ old_adjtimex - old_adjtimex 1 __adjtimex_tv32 __adjtimex@GLIBC_2.0 adjtimex@GLI # and one for timeval64 entry points adjtimex adjtime adjtimex 1 __syscall_adjtimex_tv64 - -# System calls with wrappers. -rt_sigaction - rt_sigaction 4 __syscall_rt_sigaction -rt_sigpending - rt_sigpending 2 __syscall_rt_sigpending -rt_sigprocmask - rt_sigprocmask 4 __syscall_rt_sigprocmask -rt_sigqueueinfo - rt_sigqueueinfo 3 __syscall_rt_sigqueueinfo -rt_sigsuspend - rt_sigsuspend 2 __syscall_rt_sigsuspend -rt_sigtimedwait - rt_sigtimedwait 4 __syscall_rt_sigtimedwait -s_getcwd getcwd getcwd 2 __syscall_getcwd -s_getdents getdents getdents 3 __syscall_getdents -s_getpriority getpriority getpriority 2 __syscall_getpriority -s_getresgid getresgid getresgid 3 __syscall_getresgid -s_getresuid getresuid getresuid 3 __syscall_getresuid -s_poll poll poll 3 __syscall_poll -s_ptrace ptrace ptrace 4 __syscall_ptrace -s_reboot reboot reboot 3 __syscall_reboot -s_sigaction sigaction sigaction 3 __syscall_sigaction -s_sigpending sigpending sigpending 1 __syscall_sigpending -s_sigprocmask sigprocmask sigprocmask 3 __syscall_sigprocmask -s_sigsuspend sigsuspend sigsuspend 3 __syscall_sigsuspend -s_sysctl sysctl _sysctl 1 __syscall__sysctl -sys_fstat fxstat fstat 2 __syscall_fstat -sys_lstat lxstat lstat 2 __syscall_lstat -sys_mknod xmknod mknod 3 __syscall_mknod -sys_readv readv readv 3 __syscall_readv -sys_stat xstat stat 2 __syscall_stat -sys_writev writev writev 3 __syscall_writev From 79df5fdb24d5c9c6ad43e93afcec57d77871adb5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 5 Nov 1998 18:05:39 +0000 Subject: [PATCH 1449/4487] Define only if __USE_ISOC9X. --- sysdeps/m68k/fpu/bits/mathdef.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/sysdeps/m68k/fpu/bits/mathdef.h b/sysdeps/m68k/fpu/bits/mathdef.h index e3d33a53a2..5bad57bcc3 100644 --- a/sysdeps/m68k/fpu/bits/mathdef.h +++ b/sysdeps/m68k/fpu/bits/mathdef.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998 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,7 +20,7 @@ # error "Never use directly; include instead" #endif - +#ifdef __USE_ISOC9X /* The m68k FPUs evaluate all values in the 96 bit floating-point format which is also available for the user as `long double'. Therefore we define: */ @@ -30,14 +30,16 @@ typedef long double double_t; /* `double' expressions are evaluated as `long double'. */ /* Signal that both types are `long double'. */ -#define FLT_EVAL_METHOD 2 +# define FLT_EVAL_METHOD 2 /* Define `INFINITY' as value of type `float'. */ -#define INFINITY HUGE_VALF +# define INFINITY HUGE_VALF /* The values returned by `ilogb' for 0 and NaN respectively. */ -#define FP_ILOGB0 0x80000000 -#define FP_ILOGBNAN 0x7fffffff +# define FP_ILOGB0 0x80000000 +# define FP_ILOGBNAN 0x7fffffff /* Number of decimal digits for the `long double' type. */ -#define DECIMAL_DIG 18 +# define DECIMAL_DIG 18 + +#endif /* ISO C 9X */ From 200172bd3ff8de02b2bed138036d0c0c0b5c06bd Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 10 Nov 1998 19:10:36 +0000 Subject: [PATCH 1450/4487] Define ISO C 9X stuff only if included from math.h and __USE_ISOC9X is defined. --- sysdeps/alpha/fpu/bits/mathdef.h | 43 +++++++++++++++++++------------- sysdeps/m68k/fpu/bits/mathdef.h | 4 +-- 2 files changed, 28 insertions(+), 19 deletions(-) diff --git a/sysdeps/alpha/fpu/bits/mathdef.h b/sysdeps/alpha/fpu/bits/mathdef.h index 2ff626d089..5ee9644469 100644 --- a/sysdeps/alpha/fpu/bits/mathdef.h +++ b/sysdeps/alpha/fpu/bits/mathdef.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998 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 @@ -16,56 +16,65 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef _MATH_H +#if !defined _MATH_H && !defined _COMPLEX_H # error "Never use directly; include instead" #endif /* FIXME! This file describes properties of the compiler, not the machine; it should not be part of libc! */ -#ifdef __GNUC__ -# if __STDC__ == 1 +#if defined __USE_ISOC9X && defined _MATH_H +# ifdef __GNUC__ +# if __STDC__ == 1 /* In GNU or ANSI mode, gcc leaves `float' expressions as-is. */ typedef float float_t; typedef double double_t; /* Signal that types stay as they were declared. */ -# define FLT_EVAL_METHOD 0 +# define FLT_EVAL_METHOD 0 /* Define `INFINITY' as value of type `float'. */ -# define INFINITY HUGE_VALF +# define INFINITY HUGE_VALF -# else +# else /* For `gcc -traditional', `float' expressions are evaluated as `double'. */ typedef double float_t; typedef double double_t; /* Signal that both types are `double'. */ -# define FLT_EVAL_METHOD 1 +# define FLT_EVAL_METHOD 1 /* Define `INFINITY' as value of type `float'. */ -# define INFINITY HUGE_VALF +# define INFINITY HUGE_VALF -# endif -#else +# endif +# else /* Wild guess at types for float_t and double_t. */ typedef double float_t; typedef double double_t; /* Strange compiler, we don't know how it works. */ -# define FLT_EVAL_METHOD -1 +# define FLT_EVAL_METHOD -1 /* Define `INFINITY' as value of type `float'. */ -# define INFINITY HUGE_VALF +# define INFINITY HUGE_VALF -#endif +# endif /* The values returned by `ilogb' for 0 and NaN respectively. */ -#define FP_ILOGB0 0x80000001 -#define FP_ILOGBNAN 0x7fffffff +# define FP_ILOGB0 0x80000001 +# define FP_ILOGBNAN 0x7fffffff /* Number of decimal digits for the `double' type. */ -#define DECIMAL_DIG 15 +# define DECIMAL_DIG 15 + +#endif /* ISO C 9X */ + +#ifndef __NO_LONG_DOUBLE_MATH +/* Signal that we do not really have a `long double'. The disables the + declaration of all the `long double' function variants. */ +# define __NO_LONG_DOUBLE_MATH 1 +#endif diff --git a/sysdeps/m68k/fpu/bits/mathdef.h b/sysdeps/m68k/fpu/bits/mathdef.h index 5bad57bcc3..250f0f3929 100644 --- a/sysdeps/m68k/fpu/bits/mathdef.h +++ b/sysdeps/m68k/fpu/bits/mathdef.h @@ -16,11 +16,11 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef _MATH_H +#if !defined _MATH_H && !defined _COMPLEX_H # error "Never use directly; include instead" #endif -#ifdef __USE_ISOC9X +#if defined __USE_ISOC9X && defined _MATH_H /* The m68k FPUs evaluate all values in the 96 bit floating-point format which is also available for the user as `long double'. Therefore we define: */ From 88e7faf1e1bb059d7bd633242545108e2fe9fa2f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 12 Nov 1998 11:21:36 +0000 Subject: [PATCH 1451/4487] Cleanup comment. --- sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index 0a21a59e0a..5ed6d76ef1 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -90,7 +90,7 @@ /* Operations for bsd flock(), also used by the kernel implementation */ # define LOCK_SH 1 /* shared lock */ # define LOCK_EX 2 /* exclusive lock */ -# define LOCK_NB 4 /* or'd with one of the above to prevent XXXXXXXXXXXXXXXXXX +# define LOCK_NB 4 /* or'd with one of the above to prevent blocking */ # define LOCK_UN 8 /* remove lock */ #endif From 11a39ef8a487b4c8c3f465c3b9c3aa500ea1e670 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 13 Nov 1998 03:01:32 +0000 Subject: [PATCH 1452/4487] * sysdeps/unix/sysv/linux/m68k/sysdep.h (INLINE_SYSCALL): Remove d0 from clobber list. --- sysdeps/unix/sysv/linux/m68k/sysdep.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h index d445471440..08047ebda0 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -170,8 +170,7 @@ SYSCALL_ERROR_LABEL: \ register int _d0 asm ("%d0") = __NR_##name; \ asm volatile ("trap #0" \ : "=d" (_d0) \ - : "0" (_d0) ASM_ARGS_##nr \ - : "d0"); \ + : "0" (_d0) ASM_ARGS_##nr); \ _sys_result = _d0; \ } \ if (_sys_result >= (unsigned int) -4095) \ From f05b28e62f918c6716dc433d4c24972ebc318f13 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 13 Nov 1998 14:47:31 +0000 Subject: [PATCH 1453/4487] (__JMP_BUF_SP): Correct value. --- sysdeps/arm/fpu/bits/setjmp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/arm/fpu/bits/setjmp.h b/sysdeps/arm/fpu/bits/setjmp.h index 895356fe0a..a9fb9f32b3 100644 --- a/sysdeps/arm/fpu/bits/setjmp.h +++ b/sysdeps/arm/fpu/bits/setjmp.h @@ -28,7 +28,7 @@ typedef int __jmp_buf[22]; #endif -#define __JMP_BUF_SP 8 +#define __JMP_BUF_SP 20 /* Test if longjmp to JMPBUF would unwind the frame containing a local variable at ADDRESS. */ From ec2a735fdb786dc479539fcc3a18ae7b46453545 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 16 Nov 1998 02:41:56 +0000 Subject: [PATCH 1454/4487] * sysdeps/unix/sysv/linux/m68k/sysdep.h (INLINE_SYSCALL): Undo last change. --- sysdeps/unix/sysv/linux/m68k/sysdep.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h index 08047ebda0..d445471440 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -170,7 +170,8 @@ SYSCALL_ERROR_LABEL: \ register int _d0 asm ("%d0") = __NR_##name; \ asm volatile ("trap #0" \ : "=d" (_d0) \ - : "0" (_d0) ASM_ARGS_##nr); \ + : "0" (_d0) ASM_ARGS_##nr \ + : "d0"); \ _sys_result = _d0; \ } \ if (_sys_result >= (unsigned int) -4095) \ From bc8f3c9b4e9b106ab55863f1035e1e515fcf7f10 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 16 Nov 1998 12:01:02 +0000 Subject: [PATCH 1455/4487] Add mmap64 alias. --- sysdeps/unix/sysv/linux/arm/mmap.S | 1 + sysdeps/unix/sysv/linux/m68k/mmap.S | 1 + 2 files changed, 2 insertions(+) diff --git a/sysdeps/unix/sysv/linux/arm/mmap.S b/sysdeps/unix/sysv/linux/arm/mmap.S index 905303e8e3..f9a773fc68 100644 --- a/sysdeps/unix/sysv/linux/arm/mmap.S +++ b/sysdeps/unix/sysv/linux/arm/mmap.S @@ -37,3 +37,4 @@ ENTRY (__mmap) PSEUDO_END (__mmap) weak_alias (__mmap, mmap) +weak_alias (__mmap, mmap64) diff --git a/sysdeps/unix/sysv/linux/m68k/mmap.S b/sysdeps/unix/sysv/linux/m68k/mmap.S index 94578311b3..c7015ae8b0 100644 --- a/sysdeps/unix/sysv/linux/m68k/mmap.S +++ b/sysdeps/unix/sysv/linux/m68k/mmap.S @@ -41,3 +41,4 @@ ENTRY (__mmap) PSEUDO_END (__mmap) weak_alias (__mmap, mmap) +weak_alias (__mmap, mmap64) From 1173aab2d28d0d8ada3f773002ea6aa35f3125e2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 26 Nov 1998 12:00:10 +0000 Subject: [PATCH 1456/4487] Remove __setfpucw declaration, it's an internal symbol. --- sysdeps/alpha/fpu/fpu_control.h | 9 +-------- sysdeps/arm/fpu/fpu_control.h | 7 ------- sysdeps/m68k/fpu_control.h | 9 +-------- 3 files changed, 2 insertions(+), 23 deletions(-) diff --git a/sysdeps/alpha/fpu/fpu_control.h b/sysdeps/alpha/fpu/fpu_control.h index bcf73e857e..dfca373c3d 100644 --- a/sysdeps/alpha/fpu/fpu_control.h +++ b/sysdeps/alpha/fpu/fpu_control.h @@ -1,5 +1,5 @@ /* FPU control word bits. Alpha-maped-to-Intel version. - Copyright (C) 1996 Free Software Foundation, Inc. + Copyright (C) 1996, 1998 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Olaf Flebbe. @@ -103,11 +103,4 @@ typedef unsigned int fpu_control_t; /* Default control word set at startup. */ extern fpu_control_t __fpu_control; -__BEGIN_DECLS - -/* called by start.o. It can be used to manipulate fpu control word. */ -extern void __setfpucw __P ((unsigned short)); - -__END_DECLS - #endif /* _ALPHA_FPU_CONTROL */ diff --git a/sysdeps/arm/fpu/fpu_control.h b/sysdeps/arm/fpu/fpu_control.h index 8a2d338c49..27b8dda972 100644 --- a/sysdeps/arm/fpu/fpu_control.h +++ b/sysdeps/arm/fpu/fpu_control.h @@ -83,11 +83,4 @@ typedef unsigned int fpu_control_t; /* Default control word set at startup. */ extern fpu_control_t __fpu_control; -__BEGIN_DECLS - -/* Called at startup. It can be used to manipulate fpu control register. */ -extern void __setfpucw __P ((fpu_control_t)); - -__END_DECLS - #endif /* _FPU_CONTROL_H */ diff --git a/sysdeps/m68k/fpu_control.h b/sysdeps/m68k/fpu_control.h index 12ea1336c3..28405b6a3b 100644 --- a/sysdeps/m68k/fpu_control.h +++ b/sysdeps/m68k/fpu_control.h @@ -1,5 +1,5 @@ /* 68k FPU control word definitions. - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998 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 @@ -98,11 +98,4 @@ typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__SI__))); /* Default control word set at startup. */ extern fpu_control_t __fpu_control; -__BEGIN_DECLS - -/* Called at startup. It can be used to manipulate fpu control register. */ -extern void __setfpucw __P ((fpu_control_t)); - -__END_DECLS - #endif /* _M68K_FPU_CONTROL_H */ From 3f72bf96a90c056afada9674ba1f152c4e0d64b7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 26 Nov 1998 12:01:21 +0000 Subject: [PATCH 1457/4487] (ELF_MACHINE_NO_PLT): New defined macro. (elf_machine_got_rel): Remove scope variable. Use scope from the map. Don't modify _dl_global_scope_end in the end. (__dl_runtime_resolv): Also use scope from the map. --- sysdeps/mips/dl-machine.h | 17 ++++++----------- sysdeps/mips/mips64/dl-machine.h | 17 ++++++----------- 2 files changed, 12 insertions(+), 22 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index bbd22d8777..5f6e12752e 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -23,6 +23,8 @@ #define ELF_MACHINE_NAME "MIPS" +#define ELF_MACHINE_NO_PLT + #include #include @@ -142,7 +144,6 @@ elf_machine_got_rel (struct link_map *map, int lazy) ElfW(Addr) *got; ElfW(Sym) *sym; int i, n; - struct link_map **scope; const char *strtab = ((void *) map->l_addr + map->l_info[DT_STRTAB]->d_un.d_ptr); @@ -150,7 +151,8 @@ elf_machine_got_rel (struct link_map *map, int lazy) ({ \ const ElfW(Sym) *ref = sym; \ ElfW(Addr) sym_loadaddr; \ - sym_loadaddr = _dl_lookup_symbol (strtab + sym->st_name, &ref, scope, \ + sym_loadaddr = _dl_lookup_symbol (strtab + sym->st_name, &ref, \ + map->l_scope, \ map->l_name, ELF_MACHINE_RELOC_NOPLT);\ (ref)? sym_loadaddr + ref->st_value: 0; \ }) @@ -166,9 +168,6 @@ elf_machine_got_rel (struct link_map *map, int lazy) while (i < n) got[i++] += map->l_addr; - /* Set scope. */ - scope = _dl_object_relocation_scope (map); - /* Handle global got entries. */ got += n; sym = (ElfW(Sym) *) ((void *) map->l_addr @@ -210,7 +209,6 @@ elf_machine_got_rel (struct link_map *map, int lazy) } #undef RESOLVE_GOTSYM - *_dl_global_scope_end = NULL; return; } @@ -362,16 +360,13 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \ const ElfW(Sym) *definer; \ ElfW(Addr) loadbase; \ ElfW(Addr) funcaddr; \ - struct link_map **scope; \ \ /* Look up the symbol's run-time value. */ \ - scope = _dl_object_relocation_scope (l); \ definer = &symtab[sym_index]; \ \ loadbase = _dl_lookup_symbol (strtab + definer->st_name, &definer, \ - scope, l->l_name, ELF_MACHINE_RELOC_NOPLT); \ - \ - *_dl_global_scope_end = NULL; \ + l->l_scope, l->l_name, \ + ELF_MACHINE_RELOC_NOPLT); \ \ /* Apply the relocation with that value. */ \ funcaddr = loadbase + definer->st_value; \ diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h index 76981a6a9b..1045da15b6 100644 --- a/sysdeps/mips/mips64/dl-machine.h +++ b/sysdeps/mips/mips64/dl-machine.h @@ -23,6 +23,8 @@ #define ELF_MACHINE_NAME "MIPS" +#define ELF_MACHINE_NO_PLT + #include #include @@ -142,7 +144,6 @@ elf_machine_got_rel (struct link_map *map, int lazy) ElfW(Addr) *got; ElfW(Sym) *sym; int i, n; - struct link_map **scope; const char *strtab = ((void *) map->l_addr + map->l_info[DT_STRTAB]->d_un.d_ptr); @@ -150,7 +151,8 @@ elf_machine_got_rel (struct link_map *map, int lazy) ({ \ const ElfW(Sym) *ref = sym; \ ElfW(Addr) sym_loadaddr; \ - sym_loadaddr = _dl_lookup_symbol (strtab + sym->st_name, &ref, scope, \ + sym_loadaddr = _dl_lookup_symbol (strtab + sym->st_name, &ref, \ + map->l_scope, \ map->l_name, ELF_MACHINE_RELOC_NOPLT);\ (ref)? sym_loadaddr + ref->st_value: 0; \ }) @@ -166,9 +168,6 @@ elf_machine_got_rel (struct link_map *map, int lazy) while (i < n) got[i++] += map->l_addr; - /* Set scope. */ - scope = _dl_object_relocation_scope (map); - /* Handle global got entries. */ got += n; sym = (ElfW(Sym) *) ((void *) map->l_addr @@ -210,7 +209,6 @@ elf_machine_got_rel (struct link_map *map, int lazy) } #undef RESOLVE_GOTSYM - *_dl_global_scope_end = NULL; return; } @@ -362,16 +360,13 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \ const ElfW(Sym) *definer; \ ElfW(Addr) loadbase; \ ElfW(Addr) funcaddr; \ - struct link_map **scope; \ \ /* Look up the symbol's run-time value. */ \ - scope = _dl_object_relocation_scope (l); \ definer = &symtab[sym_index]; \ \ loadbase = _dl_lookup_symbol (strtab + definer->st_name, &definer, \ - scope, l->l_name, ELF_MACHINE_RELOC_NOPLT); \ - \ - *_dl_global_scope_end = NULL; \ + l->l_scope, l->l_name, \ + ELF_MACHINE_RELOC_NOPLT); \ \ /* Apply the relocation with that value. */ \ funcaddr = loadbase + definer->st_value; \ From 3f764c1f26f806f21e39601d66b8ffe40ffe6d7e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 26 Nov 1998 12:01:59 +0000 Subject: [PATCH 1458/4487] System V ucontext definition for MIPS. --- sysdeps/mips/sys/ucontext.h | 144 ++++++++++++++++++++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 sysdeps/mips/sys/ucontext.h diff --git a/sysdeps/mips/sys/ucontext.h b/sysdeps/mips/sys/ucontext.h new file mode 100644 index 0000000000..f177cad121 --- /dev/null +++ b/sysdeps/mips/sys/ucontext.h @@ -0,0 +1,144 @@ +/* Copyright (C) 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* System V/mips ABI compliant context switching support. */ + +#ifndef _SYS_UCONTEXT_H +#define _SYS_UCONTEXT_H 1 + +#include +#include + +/* Type for general register. */ +typedef unsigned int greg_t; + +/* Number of general registers. */ +#define NGREG 36 + +/* Container for all general registers. */ +typedef greg_t gregset_t[NGREG]; + +/* Number of each register is the `gregset_t' array. */ +enum +{ + CTX_R0 = 0, +#define CTX_R0 CTX_R0 + CTX_AT = 1, +#define CTX_AT CTX_AT + CTX_V0 = 2, +#define CTX_V0 CTX_V0 + CTX_V1 = 3, +#define CTX_V1 CTX_V1 + CTX_A0 = 4, +#define CTX_A0 CTX_A0 + CTX_A1 = 5, +#define CTX_A1 CTX_A1 + CTX_A2 = 6, +#define CTX_A2 CTX_A2 + CTX_A3 = 7, +#define CTX_A3 CTX_A3 + CTX_T0 = 8, +#define CTX_T0 CTX_T0 + CTX_T1 = 9, +#define CTX_T1 CTX_T1 + CTX_T2 = 10, +#define CTX_T2 CTX_T2 + CTX_T3 = 11, +#define CTX_T3 CTX_T3 + CTX_T4 = 12, +#define CTX_T4 CTX_T4 + CTX_T5 = 13, +#define CTX_T5 CTX_T5 + CTX_T6 = 14, +#define CTX_T6 CTX_T6 + CTX_T7 = 15, +#define CTX_T7 CTX_T7 + CTX_S0 = 16, +#define CTX_S0 CTX_S0 + CTX_S1 = 17, +#define CTX_S1 CTX_S1 + CTX_S2 = 18, +#define CTX_S2 CTX_S2 + CTX_S3 = 19, +#define CTX_S3 CTX_S3 + CTX_S4 = 20, +#define CTX_S4 CTX_S4 + CTX_S5 = 21, +#define CTX_S5 CTX_S5 + CTX_S6 = 22, +#define CTX_S6 CTX_S6 + CTX_S7 = 23, +#define CTX_S7 CTX_S7 + CTX_T8 = 24, +#define CTX_T8 CTX_T8 + CTX_T9 = 25, +#define CTX_T9 CTX_T9 + CTX_K0 = 26, +#define CTX_K0 CTX_K0 + CTX_K1 = 27, +#define CTX_K1 CTX_K1 + CTX_GP = 28, +#define CTX_GP CTX_GP + CTX_SP = 29, +#define CTX_SP CTX_SP + CTX_S8 = 30, +#define CTX_S8 CTX_S8 + CTX_RA = 31, +#define CTX_RA CTX_RA + CTX_MDLO = 32, +#define CTX_MDLO CTX_MDLO + CTX_MDHI = 33, +#define CTX_MDHI CTX_MDHI + CTX_CAUSE = 34, +#define CTX_CAUSE CTX_CAUSE + CTX_EPC = 35, +#define CTX_EPC CTX_EPC +}; + +/* Structure to describe FPU registers. */ +typedef struct fpregset +{ + union + { + double fp_dregs[16]; + float fp_fregs[32]; + unsigned int fp_regs[32]; + } fp_r; + unsigned int fp_csr; + unsigned int fp_pad; +} fpregset_t; + +/* Context to describe whole processor state. */ +typedef struct +{ + gregset_t gpregs; + fpregset_t fpregs; +} mcontext_t; + +/* Userlevel context. */ +typedef struct ucontext +{ + unsigned long int uc_flags; + struct ucontext *uc_links; + __sigset_t uc_sigmask; + stack_t uc_stack; + mcontext_t uc_mcontext; + long int uc_filler[48]; +} ucontext_t; + +#endif /* sys/ucontext.h */ From 60f3ce2755b7ab3b43959cfd3fa0f221b9c57508 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 27 Nov 1998 09:04:02 +0000 Subject: [PATCH 1459/4487] Add closing comment to avoid warning. --- sysdeps/mips/mul_1.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/mips/mul_1.S b/sysdeps/mips/mul_1.S index 184aae6fa1..aeaf083d89 100644 --- a/sysdeps/mips/mul_1.S +++ b/sysdeps/mips/mul_1.S @@ -1,7 +1,7 @@ /* MIPS __mpn_mul_1 -- Multiply a limb vector with a single limb and store the product in a second limb vector. -Copyright (C) 1995 Free Software Foundation, Inc. +Copyright (C) 1995, 1998 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -74,7 +74,7 @@ $LC1: mflo $10 multu $8,$7 sw $10,0($4) addiu $4,$4,4 - addu $2,$9,$2 /* add high product limb and carry from addition + addu $2,$9,$2 /* add high product limb and carry from addition */ /* cool down phase 0 */ $LC0: mflo $10 From e7782e5ed6ebe2ee122b6f3c31d63917768a77ad Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 27 Nov 1998 10:01:37 +0000 Subject: [PATCH 1460/4487] Fix handling of weak undefined symbols during bootstrapping. --- sysdeps/arm/dl-machine.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 66ab4c6de2..53aa806ec2 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -416,7 +416,13 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, break; case R_ARM_GLOB_DAT: case R_ARM_JUMP_SLOT: - *reloc_addr = value; +#ifdef RTLD_BOOTSTRAP + /* Fix weak undefined references. */ + if (sym != NULL && sym->st_value == 0) + *reloc_addr = 0; + else +#endif + *reloc_addr = value; break; case R_ARM_ABS32: { From ccdf0819b4320c1829b5de821534826dde42b2cc Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 27 Nov 1998 11:34:17 +0000 Subject: [PATCH 1461/4487] (__FLOAT_WORD_ORDER): Define to big endian. --- sysdeps/arm/bits/endian.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/arm/bits/endian.h b/sysdeps/arm/bits/endian.h index ad3b5393bc..7fe486e89d 100644 --- a/sysdeps/arm/bits/endian.h +++ b/sysdeps/arm/bits/endian.h @@ -1,7 +1,8 @@ -/* ARM is little-endian. */ +/* ARM is (usually) little-endian but with a big-endian FPU. */ #ifndef _ENDIAN_H # error "Never use directly; include instead." #endif #define __BYTE_ORDER __LITTLE_ENDIAN +#define __FLOAT_WORD_ORDER __BIG_ENDIAN From 94f347c012cd9075add9cf0c6d51115802d9e381 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 28 Nov 1998 20:59:14 +0000 Subject: [PATCH 1462/4487] (sysdep_routines): Use += instead of a :=. --- sysdeps/mips/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/mips/Makefile b/sysdeps/mips/Makefile index 736414197a..5585c61f03 100644 --- a/sysdeps/mips/Makefile +++ b/sysdeps/mips/Makefile @@ -1,3 +1,3 @@ ifeq ($(subdir),setjmp) -sysdep_routines := $(sysdep_routines) setjmp_aux +sysdep_routines += setjmp_aux endif From ea0499d2b812a866b08b4c594200e839fc1ce6e2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 28 Nov 1998 20:59:45 +0000 Subject: [PATCH 1463/4487] ISO C 9x FPU exception handling function. --- sysdeps/mips/bits/fenv.h | 72 +++++++++++++++++++++++++++++++++++++ sysdeps/mips/fclrexcpt.c | 40 +++++++++++++++++++++ sysdeps/mips/fegetenv.c | 28 +++++++++++++++ sysdeps/mips/fegetround.c | 33 +++++++++++++++++ sysdeps/mips/fesetenv.c | 31 ++++++++++++++++ sysdeps/mips/fesetround.c | 43 ++++++++++++++++++++++ sysdeps/mips/feupdateenv.c | 40 +++++++++++++++++++++ sysdeps/mips/fgetexcptflg.c | 33 +++++++++++++++++ sysdeps/mips/ftestexcept.c | 33 +++++++++++++++++ 9 files changed, 353 insertions(+) create mode 100644 sysdeps/mips/bits/fenv.h create mode 100644 sysdeps/mips/fclrexcpt.c create mode 100644 sysdeps/mips/fegetenv.c create mode 100644 sysdeps/mips/fegetround.c create mode 100644 sysdeps/mips/fesetenv.c create mode 100644 sysdeps/mips/fesetround.c create mode 100644 sysdeps/mips/feupdateenv.c create mode 100644 sysdeps/mips/fgetexcptflg.c create mode 100644 sysdeps/mips/ftestexcept.c diff --git a/sysdeps/mips/bits/fenv.h b/sysdeps/mips/bits/fenv.h new file mode 100644 index 0000000000..0637bf7623 --- /dev/null +++ b/sysdeps/mips/bits/fenv.h @@ -0,0 +1,72 @@ +/* Copyright (C) 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _FENV_H +# error "Never use directly; include instead." +#endif + + +/* Define bits representing the exception. We use the bit positions + of the appropriate bits in the FPU control word. */ +enum + { + FE_INEXACT = 0x04, +#define FE_INEXACT FE_INEXACT + FE_UNDERFLOW = 0x08, +#define FE_UNDERFLOW FE_UNDERFLOW + FE_OVERFLOW = 0x10, +#define FE_OVERFLOW FE_OVERFLOW + FE_DIVBYZERO = 0x20, +#define FE_DIVBYZERO FE_DIVBYZERO + FE_INVALID = 0x40, +#define FE_INVALID FE_INVALID + }; + +#define FE_ALL_EXCEPT \ + (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID) + +/* The MIPS FPU supports all of the four defined rounding modes. We + use again the bit positions in the FPU control word as the values + for the appropriate macros. */ +enum + { + FE_TONEAREST = 0x0, +#define FE_TONEAREST FE_TONEAREST + FE_TOWARDZERO = 0x1, +#define FE_TOWARDZERO FE_TOWARDZERO + FE_UPWARD = 0x2, +#define FE_UPWARD FE_UPWARD + FE_DOWNWARD = 0x3 +#define FE_DOWNWARD FE_DOWNWARD + }; + + +/* Type representing exception flags. */ +typedef unsigned short int fexcept_t; + + +/* Type representing floating-point environment. This function corresponds + to the layout of the block written by the `fstenv'. */ +typedef struct + { + unsigned int fp_control_register; + } +fenv_t; + +/* If the default argument is used we use this value. */ +#define FE_DFL_ENV ((fenv_t *) -1) diff --git a/sysdeps/mips/fclrexcpt.c b/sysdeps/mips/fclrexcpt.c new file mode 100644 index 0000000000..de96dd0b5c --- /dev/null +++ b/sysdeps/mips/fclrexcpt.c @@ -0,0 +1,40 @@ +/* Clear given exceptions in current floating-point environment. + Copyright (C) 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Jaeger , 1998. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +void +feclearexcept (int excepts) +{ + int cw; + + /* Mask out unsupported bits/exceptions. */ + excepts &= FE_ALL_EXCEPT; + + /* Read the complete control word. */ + _FPU_GETCW (cw); + + /* Clear exception bits. */ + cw &= ~excepts; + + /* Put the new data in effect. */ + _FPU_SETCW (cw); +} diff --git a/sysdeps/mips/fegetenv.c b/sysdeps/mips/fegetenv.c new file mode 100644 index 0000000000..13a2c8fc19 --- /dev/null +++ b/sysdeps/mips/fegetenv.c @@ -0,0 +1,28 @@ +/* Store current floating-point environment. + Copyright (C) 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Jaeger , 1998. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +void +fegetenv (fenv_t *envp) +{ + _FPU_GETCW (*envp); +} diff --git a/sysdeps/mips/fegetround.c b/sysdeps/mips/fegetround.c new file mode 100644 index 0000000000..e2e51ae64d --- /dev/null +++ b/sysdeps/mips/fegetround.c @@ -0,0 +1,33 @@ +/* Return current rounding direction. + Copyright (C) 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Jaeger , 1998. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +int +fegetround (void) +{ + int cw; + + /* Get control word. */ + _FPU_GETCW (cw); + + return cw & 0x3; +} diff --git a/sysdeps/mips/fesetenv.c b/sysdeps/mips/fesetenv.c new file mode 100644 index 0000000000..58df06391e --- /dev/null +++ b/sysdeps/mips/fesetenv.c @@ -0,0 +1,31 @@ +/* Install given floating-point environment. + Copyright (C) 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Jaeger , 1998. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +void +fesetenv (const fenv_t *envp) +{ + if (envp == FE_DFL_ENV) + _FPU_SETCW (_FPU_DEFAULT); + else + _FPU_SETCW (envp->fp_control_register); +} diff --git a/sysdeps/mips/fesetround.c b/sysdeps/mips/fesetround.c new file mode 100644 index 0000000000..6b623d6eab --- /dev/null +++ b/sysdeps/mips/fesetround.c @@ -0,0 +1,43 @@ +/* Set current rounding direction. + Copyright (C) 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Jaeger , 1998. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +int +fesetround (int round) +{ + unsigned short int cw; + + if ((round & ~0x3) != 0) + /* ROUND is no valid rounding mode. */ + return 0; + + /* Get current state. */ + _FPU_GETCW (cw); + + /* Set rounding bits. */ + cw &= ~0x3; + cw |= round; + /* Set new state. */ + _FPU_SETCW (cw); + + return 1; +} diff --git a/sysdeps/mips/feupdateenv.c b/sysdeps/mips/feupdateenv.c new file mode 100644 index 0000000000..e826084671 --- /dev/null +++ b/sysdeps/mips/feupdateenv.c @@ -0,0 +1,40 @@ +/* Install given floating-point environment and raise exceptions. + Copyright (C) 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Jaeger , 1998. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +void +feupdateenv (const fenv_t *envp) +{ + int temp; + + /* Save current exceptions. */ + _FPU_GETCW (temp); + temp &= FE_ALL_EXCEPT; + + /* Install new environment. */ + fesetenv (envp); + + /* Raise the safed exception. Incidently for us the implementation + defined format of the values in objects of type fexcept_t is the + same as the ones specified using the FE_* constants. */ + feraiseexcept (temp); +} diff --git a/sysdeps/mips/fgetexcptflg.c b/sysdeps/mips/fgetexcptflg.c new file mode 100644 index 0000000000..f3d52bc555 --- /dev/null +++ b/sysdeps/mips/fgetexcptflg.c @@ -0,0 +1,33 @@ +/* Store current representation for exceptions. + Copyright (C) 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Jaeger , 1998. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +void +fegetexceptflag (fexcept_t *flagp, int excepts) +{ + fexcept_t temp; + + /* Get the current exceptions. */ + _FPU_GETCW (temp); + + *flagp = temp & excepts & FE_ALL_EXCEPT; +} diff --git a/sysdeps/mips/ftestexcept.c b/sysdeps/mips/ftestexcept.c new file mode 100644 index 0000000000..f348258318 --- /dev/null +++ b/sysdeps/mips/ftestexcept.c @@ -0,0 +1,33 @@ +/* Test exception in current environment. + Copyright (C) 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Jaeger , 1998. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +int +fetestexcept (int excepts) +{ + int cw; + + /* Get current control word. */ + _FPU_GETCW (cw); + + return cw & excepts & FE_ALL_EXCEPT; +} From 598f68bf688e93e0c63bce4b5cbe76b4b4ebcb63 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 28 Nov 1998 21:00:06 +0000 Subject: [PATCH 1464/4487] Define _errno as weak_alias, rewrite errno declaration. --- sysdeps/unix/mips/sysdep.S | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/mips/sysdep.S b/sysdeps/unix/mips/sysdep.S index 4275d664ec..fa8888663e 100644 --- a/sysdeps/unix/mips/sysdep.S +++ b/sysdeps/unix/mips/sysdep.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1993, 1994, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1993, 1994, 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -21,10 +21,16 @@ #define _ERRNO_H #include - .comm errno, 4 + .bss + .globl errno #ifdef __ELF__ - .type errno, @object + .type errno, @object #endif + .size errno, 4 +errno: + .space 4 + +weak_alias (errno, _errno) .set noreorder From 35a72cb3b3b6717e454b0887508f54ba5d5c0ea0 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 28 Nov 1998 21:00:37 +0000 Subject: [PATCH 1465/4487] (old_kernel_sigaction): Define. (struct kernel_sigaction): Rename sa_handler to k_sa_handler. --- sysdeps/unix/sysv/linux/mips/kernel_sigaction.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h b/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h index bb7fe6bece..3a803a66a5 100644 --- a/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h +++ b/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h @@ -4,9 +4,12 @@ #define HAVE_SA_RESTORER +/* Linux/MIPS still uses the old sigaction structure in the kernel. */ +#define old_kernel_sigaction kernel_sigaction + struct kernel_sigaction { unsigned int sa_flags; - __sighandler_t sa_handler; + __sighandler_t k_sa_handler; unsigned long sa_mask; unsigned int __pad0[3]; /* reserved, keep size constant */ From 9a8611169ba3dd80d0d83e06b2469c896ae953b0 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 28 Nov 1998 21:00:55 +0000 Subject: [PATCH 1466/4487] Add copyright message, change name of include protection, remove inclusion of . --- sysdeps/unix/sysv/linux/mips/kernel_termios.h | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/kernel_termios.h b/sysdeps/unix/sysv/linux/mips/kernel_termios.h index 35be1bb290..e8768627fc 100644 --- a/sysdeps/unix/sysv/linux/mips/kernel_termios.h +++ b/sysdeps/unix/sysv/linux/mips/kernel_termios.h @@ -1,9 +1,24 @@ -#ifndef _SYS_KERNEL_TERMIOS_H -#define _SYS_KERNEL_TERMIOS_H 1 -/* The following corresponds to the values from the Linux 2.1.24 kernel. */ +/* Copyright (C) 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -/* We need the definition of tcflag_t, cc_t, and speed_t. */ -#include + 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _KERNEL_TERMIOS_H +#define _KERNEL_TERMIOS_H 1 +/* The following corresponds to the values from the Linux 2.1.24 kernel. */ #define __KERNEL_NCCS 23 From 16306093d1e18f618a76236e5866a50c59428f3a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 28 Nov 1998 21:01:13 +0000 Subject: [PATCH 1467/4487] Update entries. --- sysdeps/unix/sysv/linux/mips/syscalls.list | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index dd38647d95..dd29d159aa 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -34,13 +34,16 @@ shutdown - shutdown 2 __shutdown shutdown socket - socket 3 __socket socket socketpair - socketpair 4 __socketpair socketpair -getresuid - getresuid 3 getresuid -getresgid - getresgid 3 getresgid - # # There are defined locally because the caller is also defined in this dir. # -s_llseek llseek _llseek 5 __syscall__llseek +s_llseek llseek _llseek 5 __sys_llseek +s_sigaction sigaction sigaction 3 __syscall_sigaction +s_ustat ustat ustat 2 __syscall_ustat +sys_mknod xmknod mknod 3 __syscall_mknod +sys_fstat fxstat fstat 2 __syscall_fstat +sys_lstat lxstat lstat 2 __syscall_lstat +sys_stat xstat stat 2 __syscall_stat # System calls with wrappers. rt_sigaction - rt_sigaction 4 __syscall_rt_sigaction @@ -55,16 +58,14 @@ s_getpriority getpriority getpriority 2 __syscall_getpriority s_getresgid getresgid getresgid 3 __syscall_getresgid s_getresuid getresuid getresuid 3 __syscall_getresuid s_poll poll poll 3 __syscall_poll -s_pread64 pread64 pread 5 __syscall_pread +s_pread pread pread 6 __syscall_pread s_ptrace ptrace ptrace 4 __syscall_ptrace -s_pwrite64 pwrite64 pwrite 5 __syscall_pwrite +s_pwrite pwrite pwrite 6 __syscall_pwrite s_reboot reboot reboot 3 __syscall_reboot -s_sigaction sigaction sigaction 3 __syscall_sigaction s_sigpending sigpending sigpending 1 __syscall_sigpending s_sigprocmask sigprocmask sigprocmask 3 __syscall_sigprocmask -s_sigsuspend sigsuspend sigsuspend 3 __syscall_sigsuspend -s_sysctl sysctl _sysctl 1 __syscall__sysctl -s_ustat ustat ustat 2 __syscall_ustat +# Todo: we can pass 6 args in registers, no need for the wrapper +sysctl sysctl _sysctl 1 __syscall_sysctl sys_fstat fxstat fstat 2 __syscall_fstat sys_lstat lxstat lstat 2 __syscall_lstat sys_mknod xmknod mknod 3 __syscall_mknod From 5d4018c40f42f676bc9c731094c66b49c92e9218 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 28 Nov 1998 21:01:30 +0000 Subject: [PATCH 1468/4487] Use INLINE_SYSCALL instead of calling __syscall_*. --- sysdeps/unix/sysv/linux/mips/ustat.c | 7 +++++-- sysdeps/unix/sysv/linux/mips/xmknod.c | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/ustat.c b/sysdeps/unix/sysv/linux/mips/ustat.c index 447ab2947e..63eb68c602 100644 --- a/sysdeps/unix/sysv/linux/mips/ustat.c +++ b/sysdeps/unix/sysv/linux/mips/ustat.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -17,9 +17,12 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include #include #include +#include +#include extern int __syscall_ustat (unsigned long dev, struct ustat *ubuf); @@ -31,5 +34,5 @@ ustat (dev_t dev, struct ustat *ubuf) /* We must convert the value to dev_t type used by the kernel. */ k_dev = ((major (dev) & 0xff) << 8) | (minor (dev) & 0xff); - return __syscall_ustat (k_dev, ubuf); + return INLINE_SYSCALL (ustat, 2, k_dev, ubuf); } diff --git a/sysdeps/unix/sysv/linux/mips/xmknod.c b/sysdeps/unix/sysv/linux/mips/xmknod.c index c7ff64fecb..ba1b468b78 100644 --- a/sysdeps/unix/sysv/linux/mips/xmknod.c +++ b/sysdeps/unix/sysv/linux/mips/xmknod.c @@ -1,5 +1,5 @@ /* xmknod call using old-style Unix mknod system call. - Copyright (C) 1991, 1993, 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1991, 93, 95, 96, 97, 98 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 @@ -22,6 +22,9 @@ #include #include +#include +#include + extern int __syscall_mknod (const char *, unsigned long, unsigned int); /* Create a device file named PATH, with permission and special bits MODE @@ -41,7 +44,7 @@ __xmknod (int vers, const char *path, mode_t mode, dev_t *dev) /* We must convert the value to dev_t type used by the kernel. */ k_dev = ((major (*dev) & 0xff) << 8) | (minor (*dev) & 0xff); - return __syscall_mknod (path, mode, k_dev); + return INLINE_SYSCALL (mknod, 3, path, mode, k_dev); } weak_alias (__xmknod, _xmknod) From abbde1b09842dd536135619a1c9db86bb76efe07 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 28 Nov 1998 21:03:02 +0000 Subject: [PATCH 1469/4487] Conversion function for stat structure. --- sysdeps/unix/sysv/linux/mips/xstatconv.c | 120 +++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/mips/xstatconv.c diff --git a/sysdeps/unix/sysv/linux/mips/xstatconv.c b/sysdeps/unix/sysv/linux/mips/xstatconv.c new file mode 100644 index 0000000000..356235ace7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/xstatconv.c @@ -0,0 +1,120 @@ +/* Convert between the kernel's `struct stat' format, and libc's. + Copyright (C) 1991, 1995, 1996, 1997, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + + +static inline int +xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf) +{ + switch (vers) + { + case _STAT_VER_KERNEL: + /* Nothing to do. The struct is in the form the kernel expects. + We should have short-circuted before we got here, but for + completeness... */ + *(struct kernel_stat *) ubuf = *kbuf; + break; + + case _STAT_VER_LINUX: + { + struct stat *buf = ubuf; + + /* Convert to current kernel version of `struct stat'. */ + buf->st_dev = kbuf->st_dev; + buf->st_pad1[0] = 0; buf->st_pad1[1] = 0; buf->st_pad1[2] = 0; + buf->st_ino = kbuf->st_ino; + buf->st_mode = kbuf->st_mode; + buf->st_nlink = kbuf->st_nlink; + buf->st_uid = kbuf->st_uid; + buf->st_gid = kbuf->st_gid; + buf->st_rdev = kbuf->st_rdev; + buf->st_pad2[0] = 0; buf->st_pad2[1] = 0; + buf->st_pad3 = 0; + buf->st_size = kbuf->st_size; + buf->st_blksize = kbuf->st_blksize; + buf->st_blocks = kbuf->st_blocks; + + buf->st_atime = kbuf->st_atime; buf->__reserved0 = 0; + buf->st_mtime = kbuf->st_mtime; buf->__reserved1 = 0; + buf->st_ctime = kbuf->st_ctime; buf->__reserved2 = 0; + + buf->st_pad4[0] = 0; buf->st_pad4[1] = 0; + buf->st_pad4[2] = 0; buf->st_pad4[3] = 0; + buf->st_pad4[4] = 0; buf->st_pad4[5] = 0; + buf->st_pad4[6] = 0; buf->st_pad4[7] = 0; + } + break; + + default: + __set_errno (EINVAL); + return -1; + } + + return 0; +} + +static inline int +xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf) +{ +#ifdef XSTAT_IS_XSTAT64 + return xstat_conv (vers, kbuf, ubuf); +#else + switch (vers) + { + case _STAT_VER_LINUX: + { + struct stat64 *buf = ubuf; + + buf->st_dev = kbuf->st_dev; + buf->st_pad1[0] = 0; buf->st_pad1[1] = 0; buf->st_pad1[2] = 0; + buf->st_ino = kbuf->st_ino; + buf->st_mode = kbuf->st_mode; + buf->st_nlink = kbuf->st_nlink; + buf->st_uid = kbuf->st_uid; + buf->st_gid = kbuf->st_gid; + buf->st_rdev = kbuf->st_rdev; + buf->st_pad2[0] = 0; buf->st_pad2[1] = 0; + buf->st_pad3 = 0; + buf->st_size = kbuf->st_size; + buf->st_blksize = kbuf->st_blksize; + buf->st_blocks = kbuf->st_blocks; + + buf->st_atime = kbuf->st_atime; buf->__reserved0 = 0; + buf->st_mtime = kbuf->st_mtime; buf->__reserved1 = 0; + buf->st_ctime = kbuf->st_ctime; buf->__reserved2 = 0; + + buf->st_pad4[0] = 0; buf->st_pad4[1] = 0; + buf->st_pad4[2] = 0; buf->st_pad4[3] = 0; + buf->st_pad4[4] = 0; buf->st_pad4[5] = 0; + buf->st_pad4[6] = 0; buf->st_pad4[7] = 0; + } + break; + + /* If struct stat64 is different from struct stat then + _STAT_VER_KERNEL does not make sense. */ + case _STAT_VER_KERNEL: + default: + __set_errno (EINVAL); + return -1; + } + + return 0; +#endif +} From 5b7919d7f25958391b621bb24bca78bd99c0ee78 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 28 Nov 1998 21:03:24 +0000 Subject: [PATCH 1470/4487] Linux/MIPS specific versions. --- sysdeps/unix/sysv/linux/mips/pread.c | 62 +++++++++++++++++++++++ sysdeps/unix/sysv/linux/mips/pread64.c | 65 +++++++++++++++++++++++++ sysdeps/unix/sysv/linux/mips/pwrite.c | 62 +++++++++++++++++++++++ sysdeps/unix/sysv/linux/mips/pwrite64.c | 65 +++++++++++++++++++++++++ 4 files changed, 254 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/mips/pread.c create mode 100644 sysdeps/unix/sysv/linux/mips/pread64.c create mode 100644 sysdeps/unix/sysv/linux/mips/pwrite.c create mode 100644 sysdeps/unix/sysv/linux/mips/pwrite64.c diff --git a/sysdeps/unix/sysv/linux/mips/pread.c b/sysdeps/unix/sysv/linux/mips/pread.c new file mode 100644 index 0000000000..c3bdcf9cc7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/pread.c @@ -0,0 +1,62 @@ +/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1997. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +#include +#include + +#ifdef __NR_pread + +extern ssize_t __syscall_pread (int fd, void *buf, size_t count, int dummy, + off_t offset_hi, off_t offset_lo); + +static ssize_t __emulate_pread (int fd, void *buf, size_t count, + off_t offset) internal_function; + + +ssize_t +__pread (fd, buf, count, offset) + int fd; + void *buf; + size_t count; + off_t offset; +{ + ssize_t result; + + /* First try the syscall. */ +#if defined(__MIPSEB__) + result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, 0, offset); +#elif defined(__MIPSEL__) + result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, offset, 0); +#endif + if (result == -1 && errno == ENOSYS) + /* No system call available. Use the emulation. */ + result = __emulate_pread (fd, buf, count, offset); + + return result; +} + +weak_alias (__pread, pread) + +#define __pread(fd, buf, count, offset) \ + static internal_function __emulate_pread (fd, buf, count, offset) +#endif +#include diff --git a/sysdeps/unix/sysv/linux/mips/pread64.c b/sysdeps/unix/sysv/linux/mips/pread64.c new file mode 100644 index 0000000000..dfcfa01318 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/pread64.c @@ -0,0 +1,65 @@ +/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1997. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +#include +#include + +#ifdef __NR_pread + +extern ssize_t __syscall_pread (int fd, void *buf, size_t count, int dummy, + off_t offset_hi, off_t offset_lo); + +static ssize_t __emulate_pread64 (int fd, void *buf, size_t count, + off64_t offset) internal_function; + + +ssize_t +__pread64 (fd, buf, count, offset) + int fd; + void *buf; + size_t count; + off64_t offset; +{ + ssize_t result; + + /* First try the syscall. */ +#if defined(__MIPSEB__) + result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, (off_t) (offset >> 32), + (off_t) (offset & 0xffffffff)); +#elif defined(__MIPSEL__) + result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, + (off_t) (offset & 0xffffffff), + (off_t) (offset >> 32)); +#endif + if (result == -1 && errno == ENOSYS) + /* No system call available. Use the emulation. */ + result = __emulate_pread64 (fd, buf, count, offset); + + return result; +} + +weak_alias (__pread64, pread64) + +#define __pread64(fd, buf, count, offset) \ + static internal_function __emulate_pread64 (fd, buf, count, offset) +#endif +#include diff --git a/sysdeps/unix/sysv/linux/mips/pwrite.c b/sysdeps/unix/sysv/linux/mips/pwrite.c new file mode 100644 index 0000000000..274c14266e --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/pwrite.c @@ -0,0 +1,62 @@ +/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1997. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +#include +#include + +#ifdef __NR_pwrite + +extern ssize_t __syscall_pwrite (int fd, const void *buf, size_t count, + int dummy, off_t offset_hi, off_t offset_lo); + +static ssize_t __emulate_pwrite (int fd, const void *buf, size_t count, + off_t offset) internal_function; + + +ssize_t +__pwrite (fd, buf, count, offset) + int fd; + const void *buf; + size_t count; + off_t offset; +{ + ssize_t result; + + /* First try the syscall. */ +#if defined(__MIPSEB__) + result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, 0, offset); +#elif defined(__MIPSEL__) + result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, offset, 0); +#endif + if (result == -1 && errno == ENOSYS) + /* No system call available. Use the emulation. */ + result = __emulate_pwrite (fd, buf, count, offset); + + return result; +} + +weak_alias (__pwrite, pwrite) + +#define __pwrite(fd, buf, count, offset) \ + static internal_function __emulate_pwrite (fd, buf, count, offset) +#endif +#include diff --git a/sysdeps/unix/sysv/linux/mips/pwrite64.c b/sysdeps/unix/sysv/linux/mips/pwrite64.c new file mode 100644 index 0000000000..f73b10e0aa --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/pwrite64.c @@ -0,0 +1,65 @@ +/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ralf Baechle , 1998. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +#include +#include + +#ifdef __NR_pwrite + +extern ssize_t __syscall_pwrite (int fd, const void *buf, size_t count, + int dummy, off_t offset_hi, off_t offset_lo); + +static ssize_t __emulate_pwrite64 (int fd, const void *buf, size_t count, + off64_t offset) internal_function; + + +ssize_t +__pwrite64 (fd, buf, count, offset) + int fd; + const void *buf; + size_t count; + off64_t offset; +{ + ssize_t result; + + /* First try the syscall. */ +#if defined(__MIPSEB__) + result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, (off_t) (offset >> 32), + (off_t) (offset & 0xffffffff)); +#elif defined(__MIPSEL__) + result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, + (off_t) (offset & 0xffffffff), + (off_t) (offset >> 32)); +#endif + if (result == -1 && errno == ENOSYS) + /* No system call available. Use the emulation. */ + result = __emulate_pwrite64 (fd, buf, count, offset); + + return result; +} + +weak_alias (__pwrite64, pwrite64) + +#define __pwrite64(fd, buf, count, offset) \ + static internal_function __emulate_pwrite64 (fd, buf, count, offset) +#endif +#include From 889c9b63214471c17314a60d9306b078d75199ed Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 28 Nov 1998 21:03:41 +0000 Subject: [PATCH 1471/4487] Remove ipc_kludge. --- sysdeps/unix/sysv/linux/mips/bits/ipc.h | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/ipc.h b/sysdeps/unix/sysv/linux/mips/bits/ipc.h index 2841e6a5e2..04bd3f0ce2 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/ipc.h +++ b/sysdeps/unix/sysv/linux/mips/bits/ipc.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 1998 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 @@ -33,7 +33,6 @@ #define IPC_STAT 2 /* Get `ipc_perm' options. */ #define IPC_INFO 3 /* See ipcs. */ - /* Special key values. */ #define IPC_PRIVATE ((__key_t) 0) /* Private key. */ @@ -51,14 +50,6 @@ struct ipc_perm }; -/* Kludge to work around Linux' restriction of only up to five - arguments to a system call. */ -struct ipc_kludge - { - void *msgp; - long int msgtyp; - }; - __BEGIN_DECLS /* The actual system call: all functions are multiplexed by this. */ From 62fe3ebee6086fcce827c24fbc32d5ada49dcb31 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 28 Nov 1998 21:04:12 +0000 Subject: [PATCH 1472/4487] Remove inclusion of and add needed symbols from ; --- sysdeps/unix/sysv/linux/mips/bits/signum.h | 59 +++++++++++++++++++--- 1 file changed, 52 insertions(+), 7 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/signum.h b/sysdeps/unix/sysv/linux/mips/bits/signum.h index c30abe3841..2cf5814739 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/signum.h +++ b/sysdeps/unix/sysv/linux/mips/bits/signum.h @@ -19,16 +19,61 @@ #ifdef _SIGNAL_H -/* Take these architecture specific stuff from the kernel header files. */ -#define __need_fake_sigfuns -#define __need_signums -#include +/* Fake signal functions. */ +#define SIG_ERR ((__sighandler_t) -1) /* Error return. */ +#define SIG_DFL ((__sighandler_t) 0) /* Default action. */ +#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */ #ifdef __USE_UNIX98 # define SIG_HOLD ((__sighandler_t) 2) /* Add signal to hold mask. */ #endif -#endif /* included. */ -#define __need__nsig -#include +#define SIGHUP 1 /* Hangup (POSIX). */ +#define SIGINT 2 /* Interrupt (ANSI). */ +#define SIGQUIT 3 /* Quit (POSIX). */ +#define SIGILL 4 /* Illegal instruction (ANSI). */ +#define SIGTRAP 5 /* Trace trap (POSIX). */ +#define SIGIOT 6 /* IOT trap (4.2 BSD). */ +#define SIGABRT SIGIOT /* Abort (ANSI). */ +#define SIGEMT 7 +#define SIGFPE 8 /* Floating-point exception (ANSI). */ +#define SIGKILL 9 /* Kill, unblockable (POSIX). */ +#define SIGBUS 10 /* BUS error (4.2 BSD). */ +#define SIGSEGV 11 /* Segmentation violation (ANSI). */ +#define SIGSYS 12 +#define SIGPIPE 13 /* Broken pipe (POSIX). */ +#define SIGALRM 14 /* Alarm clock (POSIX). */ +#define SIGTERM 15 /* Termination (ANSI). */ +#define SIGUSR1 16 /* User-defined signal 1 (POSIX). */ +#define SIGUSR2 17 /* User-defined signal 2 (POSIX). */ +#define SIGCHLD 18 /* Child status has changed (POSIX). */ +#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */ +#define SIGPWR 19 /* Power failure restart (System V). */ +#define SIGWINCH 20 /* Window size change (4.3 BSD, Sun). */ +#define SIGURG 21 /* Urgent condition on socket (4.2 BSD). */ +#define SIGIO 22 /* I/O now possible (4.2 BSD). */ +#define SIGPOLL SIGIO /* Pollable event occurred (System V). */ +#define SIGSTOP 23 /* Stop, unblockable (POSIX). */ +#define SIGTSTP 24 /* Keyboard stop (POSIX). */ +#define SIGCONT 25 /* Continue (POSIX). */ +#define SIGTTIN 26 /* Background read from tty (POSIX). */ +#define SIGTTOU 27 /* Background write to tty (POSIX). */ +#define SIGVTALRM 28 /* Virtual alarm clock (4.2 BSD). */ +#define SIGPROF 29 /* Profiling alarm clock (4.2 BSD). */ +#define SIGXCPU 30 /* CPU limit exceeded (4.2 BSD). */ +#define SIGXFSZ 31 /* File size limit exceeded (4.2 BSD). */ + + +#define _NSIG 128 /* Biggest signal number + 1 + (including real-time signals). */ + +#define SIGRTMIN (__libc_current_sigrtmin ()) +#define SIGRTMAX (__libc_current_sigrtmax ()) + +/* These are the hard limits of the kernel. These values should not be + used directly at user level. */ +#define __SIGRTMIN 32 +#define __SIGRTMAX (_NSIG - 1) + +#endif /* included. */ From ff87e21b31d673e5966a863937c963c74df4443f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 28 Nov 1998 21:04:24 +0000 Subject: [PATCH 1473/4487] Update file. --- sysdeps/unix/sysv/linux/mips/bits/socket.h | 149 +++++++++++++++------ 1 file changed, 105 insertions(+), 44 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h index 528b8be8d4..cd85df7ef3 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/socket.h +++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h @@ -1,4 +1,4 @@ -/* System-specific socket constants and types. Linux version. +/* System-specific socket constants and types. Linux/MIPS version. Copyright (C) 1991, 92, 94, 95, 96, 97, 98 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -17,7 +17,10 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#if !defined _SYS_STAT_H && !defined _NETINET_IN_H +#ifndef __BITS_SOCKET_H +#define __BITS_SOCKET_H + +#if !defined _SYS_SOCKET_H && !defined _NETINET_IN_H # error "Never include directly; use instead." #endif @@ -25,65 +28,93 @@ #define __need_NULL #include +#include + /* Type for length arguments in socket calls. */ typedef unsigned int socklen_t; -/* Supported address families. */ -#define PF_UNSPEC 0 +/* Types of sockets. */ +enum __socket_type +{ + SOCK_DGRAM = 1, /* Connectionless, unreliable datagrams + of fixed maximum length. */ +#define SOCK_DGRAM SOCK_DGRAM + SOCK_STREAM = 2, /* Sequenced, reliable, connection-based + byte streams. */ +#define SOCK_STREAM SOCK_STREAM + SOCK_RAW = 3, /* Raw protocol interface. */ +#define SOCK_RAW SOCK_RAW + SOCK_RDM = 4, /* Reliably-delivered messages. */ +#define SOCK_RDM SOCK_RDM + SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, + datagrams of fixed maximum length. */ +#define SOCK_SEQPACKET SOCK_SEQPACKET + SOCK_PACKET = 10 /* Linux specific way of getting packets + at the dev level. For writing rarp and + other similar things on the user level. */ +#define SOCK_PACKET SOCK_PACKET +}; + +/* Protocol families. */ +#define PF_UNSPEC 0 /* Unspecified. */ #define PF_LOCAL 1 /* Local to host (pipes and file-domain). */ #define PF_UNIX PF_LOCAL /* Old BSD name for PF_LOCAL. */ -#define PF_FILE PF_LOCAL /* POSIX name for PF_LOCAL. */ +#define PF_FILE PF_LOCAL /* Another non-standard name for PF_LOCAL. */ #define PF_INET 2 /* IP protocol family. */ #define PF_AX25 3 /* Amateur Radio AX.25. */ #define PF_IPX 4 /* Novell Internet Protocol. */ -#define PF_APPLETALK 5 /* Don't use this. */ +#define PF_APPLETALK 5 /* Appletalk DDP. */ #define PF_NETROM 6 /* Amateur radio NetROM. */ #define PF_BRIDGE 7 /* Multiprotocol bridge. */ -#define PF_AAL5 8 /* Reserved for Werner's ATM. */ +#define PF_ATMPVC 8 /* ATM PVCs. */ #define PF_X25 9 /* Reserved for X.25 project. */ #define PF_INET6 10 /* IP version 6. */ -#define PF_ROSE 11 /* Amateur Radio X.25 PLP */ -#define PF_DECnet 12 /* Reserved for DECnet project */ -#define PF_NETBEUI 13 /* Reserved for 802.2LLC project*/ -#define PF_SECURITY 14 /* Security callback pseudo AF */ -#define PF_KEY 15 /* PF_KEY key management API */ +#define PF_ROSE 11 /* Amateur Radio X.25 PLP. */ +#define PF_DECnet 12 /* Reserved for DECnet project. */ +#define PF_NETBEUI 13 /* Reserved for 802.2LLC project. */ +#define PF_SECURITY 14 /* Security callback pseudo AF. */ +#define PF_KEY 15 /* PF_KEY key management API. */ #define PF_NETLINK 16 -#define PF_ROUTE PF_NETLINK /* Alias to emulate 4.4BSD */ -#define PF_PACKET 17 /* Packet family */ -#define PF_ASH 18 /* Ash */ -#define PF_MAX 32 /* For now.. */ - -/* Protocol families, same as address families. */ -#define AF_UNSPEC PF_UNSPEC -#define AF_UNIX PF_UNIX -#define AF_LOCAL PF_LOCAL -#define AF_FILE PF_FILE - -#define AF_AX25 PF_AX25 -#define AF_IPX PF_IPX -#define AF_APPLETALK PF_APPLETALK +#define PF_ROUTE PF_NETLINK /* Alias to emulate 4.4BSD. */ +#define PF_PACKET 17 /* Packet family. */ +#define PF_ASH 18 /* Ash. */ +#define PF_ECONET 19 /* Acorn Econet. */ +#define PF_ATMSVC 20 /* ATM SVCs. */ +#define PF_SNA 22 /* Linux SNA Project */ +#define PF_MAX 32 /* For now.. */ + +/* Address families. */ +#define AF_UNSPEC PF_UNSPEC +#define AF_LOCAL PF_LOCAL +#define AF_UNIX PF_UNIX +#define AF_FILE PF_FILE +#define AF_INET PF_INET +#define AF_AX25 PF_AX25 +#define AF_IPX PF_IPX +#define AF_APPLETALK PF_APPLETALK #define AF_NETROM PF_NETROM -#define AF_BRIDGE PF_BRIDGE -#define AF_AAL5 PF_AAL5 -#define AF_X25 PF_X25 -#define AF_INET6 PF_INET6 -#define AF_ROSE PF_ROSE -#define AF_DECNET PF_DECNET -#define AF_NETBEUI PF_NETBEUI +#define AF_BRIDGE PF_BRIDGE +#define AF_ATMPVC PF_ATMPVC +#define AF_X25 PF_X25 +#define AF_INET6 PF_INET6 +#define AF_ROSE PF_ROSE +#define AF_DECnet PF_DECnet +#define AF_NETBEUI PF_NETBEUI #define AF_SECURITY PF_SECURITY #define pseudo_AF_KEY PF_KEY #define AF_NETLINK PF_NETLINK #define AF_ROUTE PF_ROUTE #define AF_PACKET PF_PACKET #define AF_ASH PF_ASH -#define AF_MAX PF_MAX +#define AF_ECONET PF_ECONET +#define AF_ATMSVC PF_ATMSVC +#define AF_SNA PF_SNA +#define AF_MAX PF_MAX /* Socket level values. Others are defined in the appropriate headers. XXX These definitions also should go into the appropriate headers as far as they are available. */ -#define SOL_IPV6 41 -#define SOL_ICMPV6 58 #define SOL_RAW 255 #define SOL_DECNET 261 #define SOL_X25 262 @@ -106,10 +137,15 @@ struct sockaddr enum { MSG_OOB = 0x01, /* Process out-of-band data. */ +#define MSG_OOB MSG_OOB MSG_PEEK = 0x02, /* Peek at incoming messages. */ +#define MSG_PEEK MSG_PEEK MSG_DONTROUTE = 0x04, /* Don't use local routing. */ +#define MSG_DONTROUTE MSG_DONTROUTE MSG_CTRUNC = 0x08, /* Control data lost before delivery. */ +#define MSG_CTRUNC MSG_CTRUNC MSG_PROXY = 0x10 /* Supply or ask second address. */ +#define MSG_PROXY MSG_PROXY }; @@ -121,10 +157,10 @@ struct msghdr socklen_t msg_namelen; /* Length of address data. */ struct iovec *msg_iov; /* Vector of data to send/receive into. */ - int msg_iovlen; /* Number of elements in the vector. */ + size_t msg_iovlen; /* Number of elements in the vector. */ __ptr_t msg_control; /* Ancillary data (eg BSD filedesc passing). */ - socklen_t msg_controllen; /* Ancillary data buffer length. */ + size_t msg_controllen; /* Ancillary data buffer length. */ int msg_flags; /* Flags on received message. */ }; @@ -132,12 +168,13 @@ struct msghdr /* Structure used for storage of ancillary data object information. */ struct cmsghdr { - socklen_t cmsg_len; /* Length of data in cmsg_data plus length + size_t cmsg_len; /* Length of data in cmsg_data plus length of cmsghdr structure. */ int cmsg_level; /* Originating protocol. */ int cmsg_type; /* Protocol specific type. */ #if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2 unsigned char __cmsg_data[0]; /* Ancillary data. */ + /* XXX Perhaps this should be removed. */ #endif }; @@ -157,14 +194,14 @@ struct cmsghdr + CMSG_ALIGN (sizeof (struct cmsghdr))) #define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len)) - -#ifndef _EXTERN_INLINE -# define _EXTERN_INLINE extern __inline -#endif extern struct cmsghdr *__cmsg_nxthdr __P ((struct msghdr *__mhdr, struct cmsghdr *__cmsg)); +#ifdef __USE_EXTERN_INLINES +# ifndef _EXTERN_INLINE +# define _EXTERN_INLINE extern __inline +# endif _EXTERN_INLINE struct cmsghdr * -__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) +__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW { if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr)) /* The kernel header does this so there may be a reason. */ @@ -180,7 +217,29 @@ __cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) return NULL; return __cmsg; } +#endif /* Use `extern inline'. */ +/* Socket level message types. This must match the definitions in + . */ +enum + { + SCM_RIGHTS = 0x01, /* Transfer file descriptors. */ +#define SCM_RIGHTS SCM_RIGHTS +#ifdef __USE_BSD + SCM_CREDENTIALS = 0x02, /* Credentials passing. */ +# define SCM_CREDENTIALS SCM_CREDENTIALS +#endif + __SCM_CONNECT = 0x03 /* Data array is `struct scm_connect'. */ + }; + +/* User visible structure for SCM_CREDENTIALS message */ + +struct ucred +{ + pid_t pid; /* PID of sending process. */ + uid_t uid; /* UID of sending process. */ + gid_t gid; /* GID of sending process. */ +}; /* Get socket manipulation related informations from kernel headers. */ #include @@ -192,3 +251,5 @@ struct linger int l_onoff; /* Nonzero to linger on close. */ int l_linger; /* Time to linger. */ }; + +#endif /* bits/socket.h */ From 8c0829162b3f6ebec2d4e228b8749c2e72fbf4e7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 28 Nov 1998 21:04:33 +0000 Subject: [PATCH 1474/4487] (_STAT_VER_KERNEL): Added. --- sysdeps/unix/sysv/linux/mips/bits/stat.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h index 3bcf1a9299..f0afd5e728 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/stat.h +++ b/sysdeps/unix/sysv/linux/mips/bits/stat.h @@ -22,15 +22,17 @@ /* Versions of the `struct stat' data structure. */ #define _STAT_VER_LINUX_OLD 1 +#define _STAT_VER_KERNEL 1 #define _STAT_VER_SVR4 2 #define _STAT_VER_LINUX 3 -#define _STAT_VER _STAT_VER_LINUX /* The one defined below. */ +#define _STAT_VER _STAT_VER_LINUX /* The one defined below. */ /* Versions of the `xmknod' interface. */ #define _MKNOD_VER_LINUX 1 #define _MKNOD_VER_SVR4 2 #define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */ + /* Structure describing file characteristics. */ struct stat { From 14a3f7b7d63a8fff43328b3f6b616e5c39175f00 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 28 Nov 1998 21:04:59 +0000 Subject: [PATCH 1475/4487] Removed. --- sysdeps/unix/sysv/linux/mips/bits/time.h | 57 ----------------- sysdeps/unix/sysv/linux/mips/xstat.c | 80 ------------------------ 2 files changed, 137 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/mips/bits/time.h delete mode 100644 sysdeps/unix/sysv/linux/mips/xstat.c diff --git a/sysdeps/unix/sysv/linux/mips/bits/time.h b/sysdeps/unix/sysv/linux/mips/bits/time.h deleted file mode 100644 index 15c7cb3852..0000000000 --- a/sysdeps/unix/sysv/linux/mips/bits/time.h +++ /dev/null @@ -1,57 +0,0 @@ -/* System-dependent timing definitions. Linux/MIPS version. - Copyright (C) 1996, 1997, 1998 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* - * Never include this file directly; use instead. - */ - -#ifndef __need_timeval -# ifndef _BITS_TIME_H -# define _BITS_TIME_H 1 - -/* ISO/IEC 9899:1990 7.12.1: - The macro `CLOCKS_PER_SEC' is the number per second of the value - returned by the `clock' function. */ -/* CAE XSH, Issue 4, Version 2: - The value of CLOCKS_PER_SEC is required to be 1 million on all - XSI-conformant systems. */ -# define CLOCKS_PER_SEC 1000000 - -# ifndef __STRICT_ANSI__ -/* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK - presents the real value for clock ticks per second for the system. */ -# define CLK_TCK 100 /* XXX not correct for all systems. */ -# endif - -# endif /* bits/time.h */ -#endif - -#ifdef __need_timeval -# undef __need_timeval -# ifndef _STRUCT_TIMEVAL -# define _STRUCT_TIMEVAL 1 -/* A time value that is accurate to the nearest - microsecond but also has a range of years. */ -struct timeval - { - long int tv_sec; /* Seconds. */ - long int tv_usec; /* Microseconds. */ - }; -# endif /* struct timeval */ -#endif /* need timeval */ diff --git a/sysdeps/unix/sysv/linux/mips/xstat.c b/sysdeps/unix/sysv/linux/mips/xstat.c deleted file mode 100644 index 9f7eb58e0a..0000000000 --- a/sysdeps/unix/sysv/linux/mips/xstat.c +++ /dev/null @@ -1,80 +0,0 @@ -/* xstat using old-style Unix stat system call. - Copyright (C) 1991, 1995, 1996, 1997 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include -#include -#include - -#include - -extern int __syscall_stat (const char *, struct kernel_stat *); - -/* Get information about the file NAME in BUF. */ -int -__xstat (int vers, const char *name, struct stat *buf) -{ - struct kernel_stat kbuf; - int result; - - switch (vers) - { - case _STAT_VER_LINUX_OLD: - /* Nothing to do. The struct is in the form the kernel expects - it to be. */ - result = __syscall_stat (name, (struct kernel_stat *) buf); - break; - - case _STAT_VER_LINUX: - /* Do the system call. */ - result = __syscall_stat (name, &kbuf); - - /* Convert to current kernel version of `struct stat'. */ - buf->st_dev = kbuf.st_dev; - buf->st_pad1[0] = 0; buf->st_pad1[1] = 0; buf->st_pad1[2] = 0; - buf->st_ino = kbuf.st_ino; - buf->st_mode = kbuf.st_mode; - buf->st_nlink = kbuf.st_nlink; - buf->st_uid = kbuf.st_uid; - buf->st_gid = kbuf.st_gid; - buf->st_rdev = kbuf.st_rdev; - buf->st_pad2[0] = 0; buf->st_pad2[1] = 0; - buf->st_pad3 = 0; - buf->st_size = kbuf.st_size; - buf->st_blksize = kbuf.st_blksize; - buf->st_blocks = kbuf.st_blocks; - - buf->st_atime = kbuf.st_atime; buf->__reserved0 = 0; - buf->st_mtime = kbuf.st_mtime; buf->__reserved1 = 0; - buf->st_ctime = kbuf.st_ctime; buf->__reserved2 = 0; - - buf->st_pad4[0] = 0; buf->st_pad4[1] = 0; - buf->st_pad4[2] = 0; buf->st_pad4[3] = 0; - buf->st_pad4[4] = 0; buf->st_pad4[5] = 0; - buf->st_pad4[6] = 0; buf->st_pad4[7] = 0; - break; - - default: - __set_errno (EINVAL); - result = -1; - break; - } - - return result; -} -weak_alias (__xstat, _xstat) From 34535a90fa2071ebf1d487ff4003a0b264f2ae64 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 28 Nov 1998 21:05:22 +0000 Subject: [PATCH 1476/4487] Add missing SYS_* constants, correct values according to Linux 2.1.130. --- sysdeps/unix/sysv/linux/mips/sys/syscall.h | 26 +++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/sys/syscall.h b/sysdeps/unix/sysv/linux/mips/sys/syscall.h index 82f8427aa0..36214e4162 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/syscall.h +++ b/sysdeps/unix/sysv/linux/mips/sys/syscall.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 1998 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 @@ -1009,7 +1009,7 @@ #define SYS_time (SYS_Linux + 13) #define SYS_mknod (SYS_Linux + 14) #define SYS_chmod (SYS_Linux + 15) -#define SYS_chown (SYS_Linux + 16) +#define SYS_lchown (SYS_Linux + 16) #define SYS_break (SYS_Linux + 17) #define SYS_oldstat (SYS_Linux + 18) #define SYS_lseek (SYS_Linux + 19) @@ -1045,7 +1045,7 @@ #define SYS_geteuid (SYS_Linux + 49) #define SYS_getegid (SYS_Linux + 50) #define SYS_acct (SYS_Linux + 51) -#define SYS_phys (SYS_Linux + 52) +#define SYS_umount2 (SYS_Linux + 52) #define SYS_lock (SYS_Linux + 53) #define SYS_ioctl (SYS_Linux + 54) #define SYS_fcntl (SYS_Linux + 55) @@ -1183,5 +1183,25 @@ #define SYS_query_module (SYS_Linux + 187) #define SYS_poll (SYS_Linux + 188) #define SYS_nfsservctl (SYS_Linux + 189) +#define SYS_setresgid (SYS_Linux + 190) +#define SYS_getresgid (SYS_Linux + 191) +#define SYS_prctl (SYS_Linux + 192) +#define SYS_rt_sigreturn (SYS_Linux + 193) +#define SYS_rt_sigaction (SYS_Linux + 194) +#define SYS_rt_sigprocmask (SYS_Linux + 195) +#define SYS_rt_sigpending (SYS_Linux + 196) +#define SYS_rt_sigtimedwait (SYS_Linux + 197) +#define SYS_rt_sigqueueinfo (SYS_Linux + 198) +#define SYS_rt_sigsuspend (SYS_Linux + 199) +#define SYS_pread (SYS_Linux + 200) +#define SYS_pwrite (SYS_Linux + 201) +#define SYS_chown (SYS_Linux + 202) +#define SYS_getcwd (SYS_Linux + 203) +#define SYS_capget (SYS_Linux + 204) +#define SYS_capset (SYS_Linux + 205) +#define SYS_sigaltstack (SYS_Linux + 206) +#define SYS_sendfile (SYS_Linux + 207) +#define SYS_putpmsg (SYS_Linux + 208) +#define SYS_getpmsg (SYS_Linux + 209) #endif /* sys/syscall.h */ From 1b1d9381923db975441728ea838fa8f2e4ef5990 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 28 Nov 1998 21:05:36 +0000 Subject: [PATCH 1477/4487] Linux/MIPS ucontext definition. --- sysdeps/unix/sysv/linux/mips/sys/ucontext.h | 77 +++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/mips/sys/ucontext.h diff --git a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h new file mode 100644 index 0000000000..dd534eae20 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h @@ -0,0 +1,77 @@ +/* Copyright (C) 1997, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* Don't rely on this, the interface is currently messed up and may need to + be broken to be fixed. */ +#ifndef _SYS_UCONTEXT_H +#define _SYS_UCONTEXT_H 1 + +#include +#include + +/* We need the signal context definitions even if they are not used + included in . */ +#include + + +/* Type for general register. */ +typedef unsigned long greg_t; + +/* Number of general registers. */ +#define NGREG 37 +#define NFPREG 33 + +/* Container for all general registers. */ +typedef struct gregset { + greg_t g_regs[32]; + greg_t g_hi; + greg_t g_lo; + greg_t g_pad[3]; +} gregset_t; + +/* Container for all FPU registers. */ +typedef struct fpregset { + union { + double fp_dregs[32]; + struct { + float _fp_fregs; + unsigned int _fp_pad; + } fp_fregs[32]; + } fp_r; + unsigned int fp_csr; + unsigned int fp_pad; +} fpregset_t; + +/* Context to describe whole processor state. */ +typedef struct + { + gregset_t gregs; + fpregset_t fpregs; + } mcontext_t; + +/* Userlevel context. */ +typedef struct ucontext + { + unsigned long uc_flags; + struct ucontext *uc_link; + stack_t uc_stack; + mcontext_t uc_mcontext; + __sigset_t uc_sigmask; + } ucontext_t; + +#endif /* sys/ucontext.h */ From 7f4d2f79bf1b9d4b56e914a03066b77c89467f6f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 30 Nov 1998 14:21:20 +0000 Subject: [PATCH 1478/4487] Remove ipc_kludge. --- sysdeps/unix/sysv/linux/alpha/bits/ipc.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/ipc.h b/sysdeps/unix/sysv/linux/alpha/bits/ipc.h index ec116f6114..7b644e8b7a 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/ipc.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/ipc.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 1998 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 @@ -50,13 +50,6 @@ struct ipc_perm }; -/* Kludge to work around Linux' restriction of only up to five - arguments to a system call. */ -struct ipc_kludge - { - void *msgp; - long int msgtyp; - }; __BEGIN_DECLS From 56a10f1cae6726edd6a92272e5fd124600e07974 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 1 Dec 1998 11:25:00 +0000 Subject: [PATCH 1479/4487] Use correct type for parameter. --- sysdeps/unix/sysv/linux/alpha/setfpucw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/setfpucw.c b/sysdeps/unix/sysv/linux/alpha/setfpucw.c index 9133c81110..5e74c35d88 100644 --- a/sysdeps/unix/sysv/linux/alpha/setfpucw.c +++ b/sysdeps/unix/sysv/linux/alpha/setfpucw.c @@ -1,5 +1,5 @@ /* Set FP exception mask and rounding mode. - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998 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 @@ -41,7 +41,7 @@ wrfpcr (unsigned long fpcr) void -__setfpucw (unsigned short fpu_control) +__setfpucw (fpu_control_t fpu_control) { unsigned long fpcr = 0, fpcw = 0; From 7078dcb53d088eff05ef72cdc6e7060bb7f2ad35 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 1 Dec 1998 20:50:20 +0000 Subject: [PATCH 1480/4487] Add xstatconv.c. --- sysdeps/unix/sysv/linux/mips/Dist | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/mips/Dist b/sysdeps/unix/sysv/linux/mips/Dist index f3ae821129..5f0429b282 100644 --- a/sysdeps/unix/sysv/linux/mips/Dist +++ b/sysdeps/unix/sysv/linux/mips/Dist @@ -6,6 +6,7 @@ entry.h regdef.h fpregdef.h sgidefs.h +xstatconv.c sys/acct.h sys/asm.h sys/cachectl.h From c0e2368bfef699e921efcc03fd0faed7d49becd1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 4 Dec 1998 20:57:00 +0000 Subject: [PATCH 1481/4487] (dl_start_user): Incorrect address for _dl_main_searchlist passed to _dl_init_next. --- sysdeps/arm/dl-machine.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 53aa806ec2..b8a1e19359 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -284,6 +284,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) @ now we enter a _dl_init_next loop ldr r4, .L_MAIN_SEARCHLIST ldr r4, [sl, r4] + ldr r4, [r4] @ call _dl_init_next to get the address of an initalizer 0: mov r0, r4 bl _dl_init_next(PLT) From b428ebeef703a895b8696f8b2b2b21d30fac82fc Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 7 Dec 1998 12:07:42 +0000 Subject: [PATCH 1482/4487] Save a4 through both paths. --- sysdeps/unix/sysv/linux/alpha/select.S | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/select.S b/sysdeps/unix/sysv/linux/alpha/select.S index 704e71d753..1876e2f947 100644 --- a/sysdeps/unix/sysv/linux/alpha/select.S +++ b/sysdeps/unix/sysv/linux/alpha/select.S @@ -50,6 +50,11 @@ LEAF(SELECT, 64) .prologue 1 ldl t0, __libc_missing_axp_tv64 + + /* Save timeout early, since we'll need to recover this after + the system call. */ + stq a4, 48(sp) + bne t0, $do32 /* Save arguments in case we do need to fall back. */ @@ -57,7 +62,6 @@ LEAF(SELECT, 64) stq a1, 16(sp) stq a2, 24(sp) stq a3, 32(sp) - stq a4, 48(sp) ldi v0, SYS_ify(select) callsys From e4c180f706893bccbfe057d51e4bd98e8f02c131 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 10 Dec 1998 09:59:12 +0000 Subject: [PATCH 1483/4487] Use sys/user.h not asm/user.h. --- sysdeps/unix/sysv/linux/mips/sys/procfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/sys/procfs.h b/sysdeps/unix/sysv/linux/mips/sys/procfs.h index d740954a8d..c97836f6e9 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/mips/sys/procfs.h @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include __BEGIN_DECLS From 04fd64c32eca51e859a4d72b160ee65205c5087c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 11 Dec 1998 15:27:22 +0000 Subject: [PATCH 1484/4487] (elf_machine_rel): Fixl_addr parameter type. --- sysdeps/mips/dl-machine.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 5f6e12752e..77b8c4e18f 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -23,7 +23,7 @@ #define ELF_MACHINE_NAME "MIPS" -#define ELF_MACHINE_NO_PLT +#define ELF_MACHINE_NO_PLT #include #include @@ -577,7 +577,7 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, } static inline void -elf_machine_lazy_rel (Elf32_addr l_addr, const ElfW(Rel) *reloc) +elf_machine_lazy_rel (ElfW(Addr) l_addr, const ElfW(Rel) *reloc) { /* Do nothing. */ } From f210901a5a2af98bbdc334af12f0003816bede77 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 13 Dec 1998 12:12:49 +0000 Subject: [PATCH 1485/4487] Avoid -Wparentheses warning. --- sysdeps/alpha/fpu/fsetexcptflg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/fpu/fsetexcptflg.c b/sysdeps/alpha/fpu/fsetexcptflg.c index 7e373bea6f..5764a6ec7b 100644 --- a/sysdeps/alpha/fpu/fsetexcptflg.c +++ b/sysdeps/alpha/fpu/fsetexcptflg.c @@ -1,5 +1,5 @@ /* Set floating-point environment exception handling. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1997. @@ -29,7 +29,7 @@ fesetexceptflag (const fexcept_t *flagp, int excepts) tmp = __ieee_get_fp_control(); /* Set all the bits that were called for. */ - tmp = tmp & ~FE_ALL_EXCEPT | *flagp & excepts & FE_ALL_EXCEPT; + tmp = (tmp & ~FE_ALL_EXCEPT) | (*flagp & excepts & FE_ALL_EXCEPT); /* And store it back. */ __ieee_set_fp_control(tmp); From 17cb2406ceb47cf05f31d28381634389945e523c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 18 Dec 1998 16:00:09 +0000 Subject: [PATCH 1486/4487] (struct sigaltstack): Move ss_size field at the end. --- sysdeps/unix/sysv/sysv4/solaris2/bits/sigstack.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/sigstack.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/sigstack.h index 6c6ccae6a5..905e87fd95 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/bits/sigstack.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/sigstack.h @@ -50,6 +50,6 @@ enum typedef struct sigaltstack { __ptr_t ss_sp; - size_t ss_size; int ss_flags; + size_t ss_size; } stack_t; From bc46f1f605bfa002d59720f293aed0a7867974d1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 18 Dec 1998 16:01:28 +0000 Subject: [PATCH 1487/4487] Include features.h and stddef.h. --- sysdeps/unix/sysv/sysv4/solaris2/bits/types.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h index aeba05b7b3..8c4a13ada9 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h @@ -23,6 +23,10 @@ #ifndef _BITS_TYPES_H #define _BITS_TYPES_H 1 +#include + +#define __need_size_t +#include /* Convenience types. */ typedef unsigned char __u_char; From ba023f01b9ec4662c643ac4b81c47c8cda6da896 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 22 Dec 1998 17:25:07 +0000 Subject: [PATCH 1488/4487] (INLINE_SYSCALL): Add implementation. --- sysdeps/unix/sysv/linux/arm/sysdep.h | 46 ++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index 5972abaa9a..d7e28220a7 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -104,6 +104,52 @@ #define UNDOARGS_4 /* nothing */ #define UNDOARGS_5 ldr r4, [sp]; +#else /* not __ASSEMBLER__ */ + +/* Define a macro which expands into the inline wrapper code for a system + call. */ +#undef INLINE_SYSCALL +#define INLINE_SYSCALL(name, nr, args...) \ + ({ unsigned int _sys_result; \ + { \ + register int _a1 asm ("a1"); \ + LOAD_ARGS_##nr (args) \ + asm volatile ("swi %1" \ + : "=r" (_a1) \ + : "i" (SYS_ify(name)) ASM_ARGS_##nr \ + : "a1"); \ + _sys_result = _a1; \ + } \ + if (_sys_result >= (unsigned int) -4095) \ + { \ + __set_errno (-_sys_result); \ + _sys_result = (unsigned int) -1; \ + } \ + (int) _sys_result; }) + +#define LOAD_ARGS_0() +#define ASM_ARGS_0 +#define LOAD_ARGS_1(a1) \ + _a1 = (int) (a1); \ + LOAD_ARGS_0 () +#define ASM_ARGS_1 ASM_ARGS_0, "r" (_a1) +#define LOAD_ARGS_2(a1, a2) \ + register int _a2 asm ("a2") = (int) (a2); \ + LOAD_ARGS_1 (a1) +#define ASM_ARGS_2 ASM_ARGS_1, "r" (_a2) +#define LOAD_ARGS_3(a1, a2, a3) \ + register int _a3 asm ("a3") = (int) (a3); \ + LOAD_ARGS_2 (a1, a2) +#define ASM_ARGS_3 ASM_ARGS_2, "r" (_a3) +#define LOAD_ARGS_4(a1, a2, a3, a4) \ + register int _a4 asm ("a4") = (int) (a4); \ + LOAD_ARGS_3 (a1, a2, a3) +#define ASM_ARGS_4 ASM_ARGS_3, "r" (_a4) +#define LOAD_ARGS_5(a1, a2, a3, a4, a5) \ + register int _v1 asm ("v1") = (int) (a5); \ + LOAD_ARGS_4 (a1, a2, a3, a4) +#define ASM_ARGS_5 ASM_ARGS_4, "r" (_v1) + #endif /* __ASSEMBLER__ */ #endif /* linux/arm/sysdep.h */ From fc37023323926d9c68fcf8381553475e6a56b3b3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 22 Dec 1998 17:25:27 +0000 Subject: [PATCH 1489/4487] Remove wrappers for now-inlined calls. --- sysdeps/unix/sysv/linux/arm/syscalls.list | 30 ----------------------- 1 file changed, 30 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/syscalls.list b/sysdeps/unix/sysv/linux/arm/syscalls.list index 6f332ce873..08839db952 100644 --- a/sysdeps/unix/sysv/linux/arm/syscalls.list +++ b/sysdeps/unix/sysv/linux/arm/syscalls.list @@ -13,33 +13,3 @@ s_setreuid setreuid setreuid 2 __syscall_setreuid s_setuid setuid setuid 1 __syscall_setuid syscall - syscall 5 syscall vm86 - vm86 1 __vm86 vm86 - -# System calls with wrappers. -rt_sigaction - rt_sigaction 4 __syscall_rt_sigaction -rt_sigpending - rt_sigpending 2 __syscall_rt_sigpending -rt_sigprocmask - rt_sigprocmask 4 __syscall_rt_sigprocmask -rt_sigqueueinfo - rt_sigqueueinfo 3 __syscall_rt_sigqueueinfo -rt_sigsuspend - rt_sigsuspend 2 __syscall_rt_sigsuspend -rt_sigtimedwait - rt_sigtimedwait 4 __syscall_rt_sigtimedwait -s_getcwd getcwd getcwd 2 __syscall_getcwd -s_getdents getdents getdents 3 __syscall_getdents -s_getpriority getpriority getpriority 2 __syscall_getpriority -s_getresgid getresgid getresgid 3 __syscall_getresgid -s_getresuid getresuid getresuid 3 __syscall_getresuid -s_poll poll poll 3 __syscall_poll -s_pread64 pread64 pread 5 __syscall_pread -s_ptrace ptrace ptrace 4 __syscall_ptrace -s_pwrite64 pwrite64 pwrite 5 __syscall_pwrite -s_reboot reboot reboot 3 __syscall_reboot -s_sigaction sigaction sigaction 3 __syscall_sigaction -s_sigpending sigpending sigpending 1 __syscall_sigpending -s_sigprocmask sigprocmask sigprocmask 3 __syscall_sigprocmask -s_sigsuspend sigsuspend sigsuspend 3 __syscall_sigsuspend -s_sysctl sysctl _sysctl 1 __syscall__sysctl -s_ustat ustat ustat 2 __syscall_ustat -sys_fstat fxstat fstat 2 __syscall_fstat -sys_lstat lxstat lstat 2 __syscall_lstat -sys_mknod xmknod mknod 3 __syscall_mknod -sys_readv readv readv 3 __syscall_readv -sys_stat xstat stat 2 __syscall_stat -sys_writev writev writev 3 __syscall_writev From 3d72808b73faa87378f84c26186f3de8bb198a81 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 22 Dec 1998 17:26:00 +0000 Subject: [PATCH 1490/4487] Implementation of inb, outb etc for ARM systems. --- sysdeps/unix/sysv/linux/arm/ioperm.c | 271 +++++++++++++++++++++++++++ 1 file changed, 271 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/ioperm.c diff --git a/sysdeps/unix/sysv/linux/arm/ioperm.c b/sysdeps/unix/sysv/linux/arm/ioperm.c new file mode 100644 index 0000000000..551fc97d0c --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/ioperm.c @@ -0,0 +1,271 @@ +/* Copyright (C) 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Phil Blundell, based on the Alpha version by + David Mosberger. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* I/O port access on the ARM is something of a fiction. What we do is to + map an appropriate area of /dev/mem into user space so that a program + can blast away at the hardware in such a way as to generate I/O cycles + on the bus. To insulate user code from dependencies on particular + hardware we don't allow calls to inb() and friends to be inlined, but + force them to come through code in here every time. Performance-critical + registers tend to be memory mapped these days so this should be no big + problem. */ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include + +#define PATH_ARM_SYSTYPE "/etc/arm_systype" +#define PATH_CPUINFO "/proc/cpuinfo" + +#define MAX_PORT 0x10000 + +static struct { + unsigned long int base; + unsigned long int io_base; + unsigned int shift; + unsigned int initdone; /* since all the above could be 0 */ +} io; + +#define IO_BASE_FOOTBRIDGE 0x7c000000 +#define IO_SHIFT_FOOTBRIDGE 0 + +static struct platform { + const char *name; + unsigned long int io_base; + unsigned int shift; +} platform[] = { + /* All currently supported platforms are in fact the same. :-) */ + {"Chalice-CATS", IO_BASE_FOOTBRIDGE, IO_SHIFT_FOOTBRIDGE}, + {"DEC-EBSA285", IO_BASE_FOOTBRIDGE, IO_SHIFT_FOOTBRIDGE}, + {"Corel-NetWinder", IO_BASE_FOOTBRIDGE, IO_SHIFT_FOOTBRIDGE}, +}; + +#define IO_ADDR(port) (io.base + ((port) << io.shift)) + +/* + * Initialize I/O system. To determine what I/O system we're dealing + * with, we first try to read the value of symlink PATH_ARM_SYSTYPE, + * if that fails, we lookup the "system type" field in /proc/cpuinfo. + * If that fails as well, we give up. Other possible options might be + * to look at the ELF auxiliary vector or to add a special system call + * but there is probably no point. + * + * If the value received from PATH_ARM_SYSTYPE begins with a number, + * assume this is a previously unsupported system and the values encode, + * in order, ",". + */ + +static int +init_iosys (void) +{ + char systype[256]; + int i, n; + + n = readlink (PATH_ARM_SYSTYPE, systype, sizeof (systype) - 1); + if (n > 0) + { + systype[n] = '\0'; + if (isdigit (systype[0])) + { + if (sscanf (systype, "%li,%i", &io.io_base, &io.shift) == 2) + { + io.initdone = 1; + return 0; + } + /* else we're likely going to fail with the system match below */ + } + } + else + { + FILE * fp; + + fp = fopen (PATH_CPUINFO, "r"); + if (!fp) + return -1; + while ((n = fscanf (fp, "Hardware\t: %256[^\n]\n", systype)) + != EOF) + { + if (n == 1) + break; + else + fgets (systype, 256, fp); + } + fclose (fp); + + if (n == EOF) + { + /* this can happen if the format of /proc/cpuinfo changes... */ + fprintf (stderr, + "ioperm: Unable to determine system type.\n" + "\t(May need " PATH_ARM_SYSTYPE " symlink?)\n"); + __set_errno (ENODEV); + return -1; + } + } + + /* translate systype name into i/o system: */ + for (i = 0; i < sizeof (platform) / sizeof (platform[0]); ++i) + { + if (strcmp (platform[i].name, systype) == 0) + { + io.shift = platform[i].shift; + io.io_base = platform[i].io_base; + io.initdone = 1; + return 0; + } + } + + /* systype is not a known platform name... */ + __set_errno (EINVAL); + return -1; +} + +int +_ioperm (unsigned long int from, unsigned long int num, int turn_on) +{ + unsigned long int addr, len; + int prot; + + if (!io.initdone && init_iosys () < 0) + return -1; + + /* this test isn't as silly as it may look like; consider overflows! */ + if (from >= MAX_PORT || from + num > MAX_PORT) + { + __set_errno (EINVAL); + return -1; + } + + if (turn_on) + { + if (! io.base) + { + int fd; + + fd = open ("/dev/mem", O_RDWR); + if (fd < 0) + return -1; + + io.base = + (unsigned long int) __mmap (0, MAX_PORT << io.shift, PROT_NONE, + MAP_SHARED, fd, io.io_base); + close (fd); + if ((long) io.base == -1) + return -1; + } + prot = PROT_READ | PROT_WRITE; + } + else + { + if (!io.base) + return 0; /* never was turned on... */ + + /* turnoff access to relevant pages: */ + prot = PROT_NONE; + } + addr = (io.base + (from << io.shift)) & PAGE_MASK; + len = num << io.shift; + return mprotect ((void *) addr, len, prot); +} + + +int +_iopl (unsigned int level) +{ + if (level > 3) + { + __set_errno (EINVAL); + return -1; + } + if (level) + { + return _ioperm (0, MAX_PORT, 1); + } + return 0; +} + + +void +_outb (unsigned char b, unsigned long int port) +{ + if (port >= MAX_PORT) + return; + + *((volatile unsigned char *)(IO_ADDR (port))) = b; +} + + +void +_outw (unsigned short b, unsigned long int port) +{ + if (port >= MAX_PORT) + return; + + *((volatile unsigned short *)(IO_ADDR (port))) = b; +} + + +void +_outl (unsigned int b, unsigned long int port) +{ + if (port >= MAX_PORT) + return; + + *((volatile unsigned long *)(IO_ADDR (port))) = b; +} + + +unsigned int +_inb (unsigned long int port) +{ + return *((volatile unsigned char *)(IO_ADDR (port))); +} + + +unsigned int +_inw (unsigned long int port) +{ + return *((volatile unsigned short *)(IO_ADDR (port))); +} + + +unsigned int +_inl (unsigned long int port) +{ + return *((volatile unsigned long *)(IO_ADDR (port))); +} + +weak_alias (_ioperm, ioperm); +weak_alias (_iopl, iopl); +weak_alias (_inb, inb); +weak_alias (_inw, inw); +weak_alias (_inl, inl); +weak_alias (_outb, outb); +weak_alias (_outw, outw); +weak_alias (_outl, outl); From 78c3f7b379909215ae5180609b4a494493f65084 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 22 Dec 1998 17:27:23 +0000 Subject: [PATCH 1491/4487] Header for implementation of inb, outb etc for ARM systems. --- sysdeps/unix/sysv/linux/arm/sys/io.h | 48 ++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/sys/io.h diff --git a/sysdeps/unix/sysv/linux/arm/sys/io.h b/sysdeps/unix/sysv/linux/arm/sys/io.h new file mode 100644 index 0000000000..9f9eebc6fb --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/sys/io.h @@ -0,0 +1,48 @@ +/* Copyright (C) 1996, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_IO_H + +#define _SYS_IO_H 1 +#include + +__BEGIN_DECLS + +/* If TURN_ON is TRUE, request for permission to do direct i/o on the + port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O + permission off for that range. This call requires root privileges. */ +extern int ioperm __P ((unsigned long int __from, unsigned long int __num, + int __turn_on)); + +/* Set the I/O privilege level to LEVEL. If LEVEL is nonzero, + permission to access any I/O port is granted. This call requires + root privileges. */ +extern int iopl __P ((int __level)); + +/* The functions that actually perform reads and writes. */ +extern unsigned char inb (unsigned long port); +extern unsigned short inw (unsigned long port); +extern unsigned long inl (unsigned long port); + +extern void outb (unsigned char value, unsigned long port); +extern void outw (unsigned short value, unsigned long port); +extern void outl (unsigned long value, unsigned long port); + +__END_DECLS + +#endif /* _SYS_IO_H */ From d2eb5e136a75f27e5f59bce577f4ae07b9e3ebdb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 22 Dec 1998 17:27:58 +0000 Subject: [PATCH 1492/4487] Add appropriate entries for the above. --- sysdeps/unix/sysv/linux/arm/Versions | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/Versions diff --git a/sysdeps/unix/sysv/linux/arm/Versions b/sysdeps/unix/sysv/linux/arm/Versions new file mode 100644 index 0000000000..3a412cc3a3 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/Versions @@ -0,0 +1,7 @@ +libc { + GLIBC_2.1 { + ioperm; iopl; + inb; inw; inl; + outb; outw; outl; + } +} From 97775ba3cefea9a437bc6b3a98cbd06537ff90c5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 24 Dec 1998 16:17:59 +0000 Subject: [PATCH 1493/4487] (sysdep_routines): Add ioperm. --- sysdeps/unix/sysv/linux/arm/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile index cebaa94134..d76698b405 100644 --- a/sysdeps/unix/sysv/linux/arm/Makefile +++ b/sysdeps/unix/sysv/linux/arm/Makefile @@ -1,5 +1,5 @@ ifeq ($(subdir),misc) -sysdep_routines += setfsgid setfsuid setresgid setresuid +sysdep_routines += setfsgid setfsuid setresgid setresuid ioperm endif ifeq ($(subdir),signal) From 4479f563344b0856ba6e4e08a98fd926eda8008a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 27 Dec 1998 17:28:24 +0000 Subject: [PATCH 1494/4487] Add ioperm.c and sys/io.h. --- sysdeps/unix/sysv/linux/arm/Dist | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/unix/sysv/linux/arm/Dist b/sysdeps/unix/sysv/linux/arm/Dist index 18aa31fa9d..479a4abb08 100644 --- a/sysdeps/unix/sysv/linux/arm/Dist +++ b/sysdeps/unix/sysv/linux/arm/Dist @@ -1,7 +1,9 @@ clone.S init-first.h +ioperm.c setresuid.c setresgid.c setfsuid.c setfsgid.c bits/armsigctx.h +sys/io.h From eb78494f44ba50f35d7192c68ac6e4ad9ff55af5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 31 Dec 1998 18:12:32 +0000 Subject: [PATCH 1495/4487] Add new files. --- sysdeps/mips/Dist | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sysdeps/mips/Dist b/sysdeps/mips/Dist index 9b6fd71f01..7ccfb1bfe6 100644 --- a/sysdeps/mips/Dist +++ b/sysdeps/mips/Dist @@ -1,3 +1,9 @@ setjmp_aux.c rtld-ldscript.in rtld-parms +regdef.h +sgidefs.h +fpregdef.h +sys/regdef.h +sys/fpregdef.h +sys/asm.h From df8c87f808e265180cd49ff8d190633d8ef09b42 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 31 Dec 1998 18:12:40 +0000 Subject: [PATCH 1496/4487] Add new headers. --- sysdeps/mips/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysdeps/mips/Makefile b/sysdeps/mips/Makefile index 5585c61f03..54b3520c84 100644 --- a/sysdeps/mips/Makefile +++ b/sysdeps/mips/Makefile @@ -1,3 +1,7 @@ +ifeq ($(subdir),misc) +headers += regdef.h fpregdef.h sys/regdef.h sys/fpregdef.h sys/asm.h sgidefs.h +endif + ifeq ($(subdir),setjmp) sysdep_routines += setjmp_aux endif From 18aa0178afabf7b06379ad2416e4348800d6c4e3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 31 Dec 1998 18:12:57 +0000 Subject: [PATCH 1497/4487] MIPS floating point register definitions. --- sysdeps/mips/fpregdef.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 sysdeps/mips/fpregdef.h diff --git a/sysdeps/mips/fpregdef.h b/sysdeps/mips/fpregdef.h new file mode 100644 index 0000000000..25b93cade4 --- /dev/null +++ b/sysdeps/mips/fpregdef.h @@ -0,0 +1,24 @@ +/* Copyright (C) 1991, 92, 94, 95, 96 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _FPREGDEF_H +#define _FPREGDEF_H + +#include + +#endif /* _FPREGDEF_H */ From 1599a5f3d2b1fe766d6d2fa69fcac5f4efb2db34 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 31 Dec 1998 18:13:10 +0000 Subject: [PATCH 1498/4487] MIPS floating point control information. --- sysdeps/mips/fpu_control.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/mips/fpu_control.h b/sysdeps/mips/fpu_control.h index e271ae1fcc..471c68e413 100644 --- a/sysdeps/mips/fpu_control.h +++ b/sysdeps/mips/fpu_control.h @@ -1,5 +1,5 @@ /* FPU control word bits. Mips version. - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Olaf Flebbe and Ralf Baechle. @@ -80,7 +80,7 @@ /* The fdlibm code requires strict IEEE double precision arithmetic, and no interrupts for exceptions, rounding to nearest. */ -#define _FPU_DEFAULT 0x00000600 +#define _FPU_DEFAULT 0x00000000 /* IEEE: same as above, but exceptions */ #define _FPU_IEEE 0x00000F80 From f2fdff253e83f64300c05db96a0465e176548183 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 31 Dec 1998 18:13:29 +0000 Subject: [PATCH 1499/4487] MIPS register definitions. --- sysdeps/mips/regdef.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 sysdeps/mips/regdef.h diff --git a/sysdeps/mips/regdef.h b/sysdeps/mips/regdef.h new file mode 100644 index 0000000000..0fa50f0926 --- /dev/null +++ b/sysdeps/mips/regdef.h @@ -0,0 +1,27 @@ +/* Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ralf Baechle . + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _REGDEF_H +#define _REGDEF_H + +#include +#include + +#endif /* _REGDEF_H */ + From 579075e899b36c20d914f1eb38c4654dc478f5bf Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 31 Dec 1998 18:13:42 +0000 Subject: [PATCH 1500/4487] SGI's MIPS definitions. --- sysdeps/mips/sgidefs.h | 44 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 sysdeps/mips/sgidefs.h diff --git a/sysdeps/mips/sgidefs.h b/sysdeps/mips/sgidefs.h new file mode 100644 index 0000000000..56567e884e --- /dev/null +++ b/sysdeps/mips/sgidefs.h @@ -0,0 +1,44 @@ +/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ralf Baechle . + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SGIDEFS_H +#define _SGIDEFS_H 1 + +/* + * Definitions for the ISA level + */ +#define _MIPS_ISA_MIPS1 1 +#define _MIPS_ISA_MIPS2 2 +#define _MIPS_ISA_MIPS3 3 +#define _MIPS_ISA_MIPS4 4 +#define _MIPS_ISA_MIPS5 5 + +/* + * Subprogram calling convention + * + * At the moment only _MIPS_SIM_ABI32 is in use. This will change rsn. + * Until GCC 2.8.0 is released don't rely on this definitions because the + * 64bit code is essentially using the 32bit interface model just with + * 64bit registers. + */ +#define _MIPS_SIM_ABI32 1 +#define _MIPS_SIM_NABI32 2 +#define _MIPS_SIM_ABI64 3 + +#endif /* sgidefs.h */ From 74de4bb5bcdee4ed00682cbd8d3ae8bbc7dbe14f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 31 Dec 1998 18:13:59 +0000 Subject: [PATCH 1501/4487] MIPS assembler helper definitions. --- sysdeps/mips/sys/asm.h | 377 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 377 insertions(+) create mode 100644 sysdeps/mips/sys/asm.h diff --git a/sysdeps/mips/sys/asm.h b/sysdeps/mips/sys/asm.h new file mode 100644 index 0000000000..b90a331ab7 --- /dev/null +++ b/sysdeps/mips/sys/asm.h @@ -0,0 +1,377 @@ +/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ralf Baechle . + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_ASM_H +#define _SYS_ASM_H + +#include + +#ifndef CAT +#ifdef __STDC__ +#define __CAT(str1,str2) str1##str2 +#else +#define __CAT(str1,str2) str1/**/str2 +#endif +#define CAT(str1,str2) __CAT(str1,str2) +#endif + +/* + * Macros to handle different pointer/register sizes for 32/64-bit code + * + * 64 bit address space isn't used yet, so we may use the R3000 32 bit + * defines for now. + */ +#define PTR .word +#define PTRSIZE 4 +#define PTRLOG 2 + +/* + * PIC specific declarations + */ +#ifdef __PIC__ +#define CPRESTORE(register) \ + .cprestore register +#define CPADD(register) \ + .cpadd register +#define CPLOAD(register) \ + .cpload register +#else +#define CPRESTORE(register) +#define CPADD(register) +#define CPLOAD(register) +#endif + +/* + * LEAF - declare leaf routine + */ +#define LEAF(symbol) \ + .globl symbol; \ + .align 2; \ + .type symbol,@function; \ + .ent symbol,0; \ +symbol: .frame sp,0,ra + +/* + * NESTED - declare nested routine entry point + */ +#define NESTED(symbol, framesize, rpc) \ + .globl symbol; \ + .align 2; \ + .type symbol,@function; \ + .ent symbol,0; \ +symbol: .frame sp, framesize, rpc + +/* + * END - mark end of function + */ +#define END(function) \ + .end function; \ + .size function,.-function + +/* + * EXPORT - export definition of symbol + */ +#define EXPORT(symbol) \ + .globl symbol; \ +symbol: + +/* + * ABS - export absolute symbol + */ +#define ABS(symbol,value) \ + .globl symbol; \ +symbol = value + +#define PANIC(msg) \ + .set push; \ + .set reorder; \ + la a0,8f; \ + jal panic; \ +9: b 9b; \ + .set pop; \ + TEXT(msg) + +/* + * Print formated string + */ +#define PRINT(string) \ + .set push; \ + .set reorder; \ + la a0,8f; \ + jal printk; \ + .set pop; \ + TEXT(string) + +#define TEXT(msg) \ + .data; \ +8: .asciiz msg; \ + .previous; + +/* + * Build text tables + */ +#define TTABLE(string) \ + .text; \ + .word 1f; \ + .previous; \ + .data; \ +1: .asciz string; \ + .previous + +/* + * MIPS IV pref instruction. + * Use with .set noreorder only! + * + * MIPS IV implementations are free to treat this as a nop. The R5000 + * is one of them. So we should have an option not to use this instruction. + */ +#if (_MIPS_ISA == _MIPS_ISA_MIPS4) || (_MIPS_ISA == _MIPS_ISA_MIPS5) +#define PREF(hint,addr) \ + pref hint,addr +#define PREFX(hint,addr) \ + prefx hint,addr +#else +#define PREF +#define PREFX +#endif + +/* + * MIPS ISA IV/V movn/movz instructions and equivalents for older CPUs. + */ +#if _MIPS_ISA == _MIPS_ISA_MIPS1 +#define MOVN(rd,rs,rt) \ + .set push; \ + .set reorder; \ + beqz rt,9f; \ + move rd,rs; \ + .set pop; \ +9: +#define MOVZ(rd,rs,rt) \ + .set push; \ + .set reorder; \ + bnez rt,9f; \ + move rd,rt; \ + .set pop; \ +9: +#endif /* _MIPS_ISA == _MIPS_ISA_MIPS1 */ +#if (_MIPS_ISA == _MIPS_ISA_MIPS2) || (_MIPS_ISA == _MIPS_ISA_MIPS3) +#define MOVN(rd,rs,rt) \ + .set push; \ + .set noreorder; \ + bnezl rt,9f; \ + move rd,rs; \ + .set pop; \ +9: +#define MOVZ(rd,rs,rt) \ + .set push; \ + .set noreorder; \ + beqzl rt,9f; \ + movz rd,rs; \ + .set pop; \ +9: +#endif /* (_MIPS_ISA == _MIPS_ISA_MIPS2) || (_MIPS_ISA == _MIPS_ISA_MIPS3) */ +#if (_MIPS_ISA == _MIPS_ISA_MIPS4) || (_MIPS_ISA == _MIPS_ISA_MIPS5) +#define MOVN(rd,rs,rt) \ + movn rd,rs,rt +#define MOVZ(rd,rs,rt) \ + movz rd,rs,rt +#endif /* (_MIPS_ISA == _MIPS_ISA_MIPS4) || (_MIPS_ISA == _MIPS_ISA_MIPS5) */ + +/* + * Stack alignment + */ +#if (_MIPS_ISA == _MIPS_ISA_MIPS1) || (_MIPS_ISA == _MIPS_ISA_MIPS2) +#define ALSZ 7 +#define ALMASK ~7 +#endif +#if (_MIPS_ISA == _MIPS_ISA_MIPS3) || (_MIPS_ISA == _MIPS_ISA_MIPS4) || \ + (_MIPS_ISA == _MIPS_ISA_MIPS5) +#define ALSZ 15 +#define ALMASK ~15 +#endif + +/* + * Size of a register + */ +#ifdef __mips64 +#define SZREG 8 +#else +#define SZREG 4 +#endif + +/* + * Use the following macros in assemblercode to load/store registers, + * pointers etc. + */ +#if (_MIPS_ISA == _MIPS_ISA_MIPS1) || (_MIPS_ISA == _MIPS_ISA_MIPS2) +#define REG_S sw +#define REG_L lw +#define PTR_SUBU subu +#define PTR_ADDU addu +#endif +#if (_MIPS_ISA == _MIPS_ISA_MIPS3) || (_MIPS_ISA == _MIPS_ISA_MIPS4) || \ + (_MIPS_ISA == _MIPS_ISA_MIPS5) +#define REG_S sd +#define REG_L ld +/* We still live in a 32 bit address space ... */ +#define PTR_SUBU subu +#define PTR_ADDU addu +#endif + +/* + * How to add/sub/load/store/shift C int variables. + */ +#if (_MIPS_SZINT == 32) +#define INT_ADD add +#define INT_ADDI addi +#define INT_ADDU addu +#define INT_ADDIU addiu +#define INT_SUB add +#define INT_SUBI subi +#define INT_SUBU subu +#define INT_SUBIU subu +#define INT_L lw +#define INT_S sw +#define LONG_SLL sll +#define LONG_SLLV sllv +#define LONG_SRL srl +#define LONG_SRLV srlv +#define LONG_SRA sra +#define LONG_SRAV srav +#endif + +#if (_MIPS_SZINT == 64) +#define INT_ADD dadd +#define INT_ADDI daddi +#define INT_ADDU daddu +#define INT_ADDIU daddiu +#define INT_SUB dadd +#define INT_SUBI dsubi +#define INT_SUBU dsubu +#define INT_SUBIU dsubu +#define INT_L ld +#define INT_S sd +#define LONG_SLL dsll +#define LONG_SLLV dsllv +#define LONG_SRL dsrl +#define LONG_SRLV dsrlv +#define LONG_SRA dsra +#define LONG_SRAV dsrav +#endif + +/* + * How to add/sub/load/store/shift C long variables. + */ +#if (_MIPS_SZLONG == 32) +#define LONG_ADD add +#define LONG_ADDI addi +#define LONG_ADDU addu +#define LONG_ADDIU addiu +#define LONG_SUB add +#define LONG_SUBI subi +#define LONG_SUBU subu +#define LONG_SUBIU subu +#define LONG_L lw +#define LONG_S sw +#define LONG_SLL sll +#define LONG_SLLV sllv +#define LONG_SRL srl +#define LONG_SRLV srlv +#define LONG_SRA sra +#define LONG_SRAV srav +#endif + +#if (_MIPS_SZLONG == 64) +#define LONG_ADD dadd +#define LONG_ADDI daddi +#define LONG_ADDU daddu +#define LONG_ADDIU daddiu +#define LONG_SUB dadd +#define LONG_SUBI dsubi +#define LONG_SUBU dsubu +#define LONG_SUBIU dsubu +#define LONG_L ld +#define LONG_S sd +#define LONG_SLL dsll +#define LONG_SLLV dsllv +#define LONG_SRL dsrl +#define LONG_SRLV dsrlv +#define LONG_SRA dsra +#define LONG_SRAV dsrav +#endif + +/* + * How to add/sub/load/store/shift pointers. + */ +#if (_MIPS_SZLONG == 32) +#define PTR_ADD add +#define PTR_ADDI addi +#define PTR_ADDU addu +#define PTR_ADDIU addiu +#define PTR_SUB add +#define PTR_SUBI subi +#define PTR_SUBU subu +#define PTR_SUBIU subu +#define PTR_L lw +#define PTR_S sw +#define PTR_SLL sll +#define PTR_SLLV sllv +#define PTR_SRL srl +#define PTR_SRLV srlv +#define PTR_SRA sra +#define PTR_SRAV srav + +#define PTR_SCALESHIFT 2 +#endif + +#if (_MIPS_SZLONG == 64) +#define PTR_ADD dadd +#define PTR_ADDI daddi +#define PTR_ADDU daddu +#define PTR_ADDIU daddiu +#define PTR_SUB dadd +#define PTR_SUBI dsubi +#define PTR_SUBU dsubu +#define PTR_SUBIU dsubu +#define PTR_L ld +#define PTR_S sd +#define PTR_SLL dsll +#define PTR_SLLV dsllv +#define PTR_SRL dsrl +#define PTR_SRLV dsrlv +#define PTR_SRA dsra +#define PTR_SRAV dsrav + +#define PTR_SCALESHIFT 3 +#endif + +/* + * Some cp0 registers were extended to 64bit for MIPS III. + */ +#if (_MIPS_ISA == _MIPS_ISA_MIPS1) || (_MIPS_ISA == _MIPS_ISA_MIPS2) +#define MFC0 mfc0 +#define MTC0 mtc0 +#endif +#if (_MIPS_ISA == _MIPS_ISA_MIPS3) || (_MIPS_ISA == _MIPS_ISA_MIPS4) || \ + (_MIPS_ISA == _MIPS_ISA_MIPS5) +#define MFC0 dmfc0 +#define MTC0 dmtc0 +#endif + +#endif /* sys/asm.h */ From 283cf8bf854a20ba784f57bd6913d92d3269a047 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 31 Dec 1998 18:14:25 +0000 Subject: [PATCH 1502/4487] MIP floating point definition header. --- sysdeps/mips/sys/fpregdef.h | 61 +++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 sysdeps/mips/sys/fpregdef.h diff --git a/sysdeps/mips/sys/fpregdef.h b/sysdeps/mips/sys/fpregdef.h new file mode 100644 index 0000000000..ef7309c454 --- /dev/null +++ b/sysdeps/mips/sys/fpregdef.h @@ -0,0 +1,61 @@ +/* Copyright (C) 1991, 92, 94, 95, 96, 97, 98 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_FPREGDEF_H +#define _SYS_FPREGDEF_H + +/* + * These definitions only cover the R3000-ish 16/32 register model. + * But we're trying to be R3000 friendly anyway ... + */ +#define fv0 $f0 /* return value */ +#define fv0f $f1 +#define fv1 $f2 +#define fv1f $f3 +#define fa0 $f12 /* argument registers */ +#define fa0f $f13 +#define fa1 $f14 +#define fa1f $f15 +#define ft0 $f4 /* caller saved */ +#define ft0f $f5 +#define ft1 $f6 +#define ft1f $f7 +#define ft2 $f8 +#define ft2f $f9 +#define ft3 $f10 +#define ft3f $f11 +#define ft4 $f16 +#define ft4f $f17 +#define ft5 $f18 +#define ft5f $f19 +#define fs0 $f20 /* callee saved */ +#define fs0f $f21 +#define fs1 $f22 +#define fs1f $f23 +#define fs2 $f24 +#define fs2f $f25 +#define fs3 $f26 +#define fs3f $f27 +#define fs4 $f28 +#define fs4f $f29 +#define fs5 $f30 +#define fs5f $f31 + +#define fcr31 $31 /* FPU status register */ + +#endif /* sys/fpregdef.h */ From 02656f74b2dba27a3eed33c216d1fbcb3bf1df04 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 31 Dec 1998 18:15:20 +0000 Subject: [PATCH 1503/4487] Remove deleted files. --- sysdeps/unix/sysv/linux/mips/Dist | 6 ------ sysdeps/unix/sysv/linux/mips/Makefile | 3 +-- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/Dist b/sysdeps/unix/sysv/linux/mips/Dist index 5f0429b282..576aef8046 100644 --- a/sysdeps/unix/sysv/linux/mips/Dist +++ b/sysdeps/unix/sysv/linux/mips/Dist @@ -3,14 +3,8 @@ kernel_sigaction.h kernel_stat.h kernel_termios.h entry.h -regdef.h -fpregdef.h -sgidefs.h xstatconv.c sys/acct.h -sys/asm.h sys/cachectl.h -sys/fpregdef.h sys/procfs.h -sys/regdef.h sys/sysmips.h diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile index 5d3e280d7c..41451ca7d1 100644 --- a/sysdeps/unix/sysv/linux/mips/Makefile +++ b/sysdeps/unix/sysv/linux/mips/Makefile @@ -7,6 +7,5 @@ endif ifeq ($(subdir),misc) sysdep_routines += cachectl cacheflush sysmips -headers += regdef.h fpregdef.h sys/asm.h sys/cachectl.h sys/fpregdef.h \ - sys/regdef.h sys/sysmips.h +headers += sys/cachectl.h sys/sysmips.h endif From 025cc5bfda4fa45bac7ae2674810e8f2d5e2e254 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 31 Dec 1998 18:15:46 +0000 Subject: [PATCH 1504/4487] Moved into MIPS specific directory. --- sysdeps/unix/sysv/linux/mips/fpregdef.h | 1 - sysdeps/unix/sysv/linux/mips/regdef.h | 1 - sysdeps/unix/sysv/linux/mips/sgidefs.h | 28 -------------------- sysdeps/unix/sysv/linux/mips/sys/asm.h | 28 -------------------- sysdeps/unix/sysv/linux/mips/sys/fpregdef.h | 27 ------------------- sysdeps/unix/sysv/linux/mips/sys/regdef.h | 29 --------------------- 6 files changed, 114 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/mips/fpregdef.h delete mode 100644 sysdeps/unix/sysv/linux/mips/regdef.h delete mode 100644 sysdeps/unix/sysv/linux/mips/sgidefs.h delete mode 100644 sysdeps/unix/sysv/linux/mips/sys/asm.h delete mode 100644 sysdeps/unix/sysv/linux/mips/sys/fpregdef.h delete mode 100644 sysdeps/unix/sysv/linux/mips/sys/regdef.h diff --git a/sysdeps/unix/sysv/linux/mips/fpregdef.h b/sysdeps/unix/sysv/linux/mips/fpregdef.h deleted file mode 100644 index a963d5f588..0000000000 --- a/sysdeps/unix/sysv/linux/mips/fpregdef.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/mips/regdef.h b/sysdeps/unix/sysv/linux/mips/regdef.h deleted file mode 100644 index b613c8b250..0000000000 --- a/sysdeps/unix/sysv/linux/mips/regdef.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/mips/sgidefs.h b/sysdeps/unix/sysv/linux/mips/sgidefs.h deleted file mode 100644 index a36ece0175..0000000000 --- a/sysdeps/unix/sysv/linux/mips/sgidefs.h +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ralf Baechle . - - 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 - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _SGIDEFS_H -#define _SGIDEFS_H 1 - -/* - * The real definitions come from the Linux kernel sources - */ -#include - -#endif /* sgidefs.h */ diff --git a/sysdeps/unix/sysv/linux/mips/sys/asm.h b/sysdeps/unix/sysv/linux/mips/sys/asm.h deleted file mode 100644 index 346a9c4ec2..0000000000 --- a/sysdeps/unix/sysv/linux/mips/sys/asm.h +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ralf Baechle . - - 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 - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _SYS_ASM_H -#define _SYS_ASM_H - -/* - * The real definitions come from the Linux kernel sources - */ -#include - -#endif /* sys/asm.h */ diff --git a/sysdeps/unix/sysv/linux/mips/sys/fpregdef.h b/sysdeps/unix/sysv/linux/mips/sys/fpregdef.h deleted file mode 100644 index 48d8f7513e..0000000000 --- a/sysdeps/unix/sysv/linux/mips/sys/fpregdef.h +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 1991, 92, 94, 95, 96, 97 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _SYS_FPREGDEF_H -#define _SYS_FPREGDEF_H - -/* - * The real definitions come from the Linux kernel sources - */ -#include - -#endif /* sys/fpregdef.h */ diff --git a/sysdeps/unix/sysv/linux/mips/sys/regdef.h b/sysdeps/unix/sysv/linux/mips/sys/regdef.h deleted file mode 100644 index 700fd66f0b..0000000000 --- a/sysdeps/unix/sysv/linux/mips/sys/regdef.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ralf Baechle . - - 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 - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _REGDEF_H -#define _REGDEF_H 1 - -/* - * The real definitions come from the Linux kernel sources - */ -#include -#include - -#endif /* regdef.h */ From 66f73ab566ba49d81d5d70372fbf4e959e80ae45 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 31 Dec 1998 18:16:11 +0000 Subject: [PATCH 1505/4487] Add ipc, change pread/pwrite and llseek calls. --- sysdeps/unix/sysv/linux/mips/syscalls.list | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index dd29d159aa..434be84898 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -37,7 +37,7 @@ socketpair - socketpair 4 __socketpair socketpair # # There are defined locally because the caller is also defined in this dir. # -s_llseek llseek _llseek 5 __sys_llseek +s_llseek llseek _llseek 5 __syscall_llseek s_sigaction sigaction sigaction 3 __syscall_sigaction s_ustat ustat ustat 2 __syscall_ustat sys_mknod xmknod mknod 3 __syscall_mknod @@ -57,10 +57,11 @@ s_getdents getdents getdents 3 __syscall_getdents s_getpriority getpriority getpriority 2 __syscall_getpriority s_getresgid getresgid getresgid 3 __syscall_getresgid s_getresuid getresuid getresuid 3 __syscall_getresuid +s_ipc msgget ipc 5 __syscall_ipc s_poll poll poll 3 __syscall_poll -s_pread pread pread 6 __syscall_pread +s_pread64 pread64 pread 6 __syscall_pread s_ptrace ptrace ptrace 4 __syscall_ptrace -s_pwrite pwrite pwrite 6 __syscall_pwrite +s_pwrite64 pwrite64 pwrite 6 __syscall_pwrite s_reboot reboot reboot 3 __syscall_reboot s_sigpending sigpending sigpending 1 __syscall_sigpending s_sigprocmask sigprocmask sigprocmask 3 __syscall_sigprocmask From 87d6672e7ef4e7e695abe75d815ddb0d796ded84 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 31 Dec 1998 18:16:43 +0000 Subject: [PATCH 1506/4487] Linux/MIPS specific misc low-level definitions. --- sysdeps/unix/sysv/linux/mips/sysdep.S | 36 +++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/mips/sysdep.S diff --git a/sysdeps/unix/sysv/linux/mips/sysdep.S b/sysdeps/unix/sysv/linux/mips/sysdep.S new file mode 100644 index 0000000000..c7bc193a40 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/sysdep.S @@ -0,0 +1,36 @@ +/* Copyright (C) 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +/* Because the Linux version is in fact MIPS/ELF and the start.? file + for this system (sysdeps/mips/elf/start.S) is also used by The Hurd + and therefore this files must not contain the definition of the + `errno' variable (I don't know why, ask Roland), we have to define + it somewhere else. + + ...and this place is here. */ + .bss + .globl errno + .type errno,@object + .size errno,4 +errno: .word 4 + .text +weak_alias(errno, _errno) + +#include From 61758030ed22232553cd26393e88b8607979929b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 31 Dec 1998 18:16:52 +0000 Subject: [PATCH 1507/4487] Sync with current Linux 2.1.132 kernel sources. --- sysdeps/unix/sysv/linux/mips/bits/sigaction.h | 29 +++++++++++++++---- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h index 435f8e00f6..855fe287d4 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h +++ b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h @@ -28,8 +28,20 @@ struct sigaction unsigned int sa_flags; /* Signal handler. */ +#ifdef __USE_POSIX199309 + union + { + /* Used if SA_SIGINFO is not set. */ + __sighandler_t sa_handler; + /* Used if SA_SIGINFO is set. */ + void (*sa_sigaction) __PMT ((int, siginfo_t *, void *)); + } + __sigaction_handler; +# define sa_handler __sigaction_handler.sa_handler +# define sa_sigaction __sigaction_handler.sa_sigaction +#else __sighandler_t sa_handler; - +#endif /* Additional set of signals to be blocked. */ __sigset_t sa_mask; @@ -43,14 +55,17 @@ struct sigaction }; /* Bits in `sa_flags'. */ -#define SA_NOCLDSTOP 1 /* Don't send SIGCHLD when children stop. */ -#ifdef __USE_MISC +#define SA_NOCLDSTOP 0x00020000 /* Don't send SIGCHLD when children stop. */ +#define SA_SIGINFO 0x00000008 /* Invoke signal-catching function with + three arguments instead of one. */ +#if defined __USE_UNIX98 || defined __USE_MISC # define SA_ONSTACK 0x00000001 /* Use signal stack by using `sa_restorer'. */ # define SA_RESTART 0x00000004 /* Restart syscall on signal return. */ -# define SA_INTERRUPT 0x00000000 /* Historical no-op. */ # define SA_NODEFER 0x00000010 /* Don't automatically block the signal when its handler is being executed. */ -# define SA_RESETHAND 0x00000002 /* Reset to SIG_DFL on entry to handler. */ +#endif +#ifdef __USE_MISC +# define SA_INTERRUPT 0x01000000 /* Historical no-op. */ /* Some aliases for the SA_ constants. */ # define SA_NOMASK SA_NODEFER @@ -63,5 +78,7 @@ struct sigaction #define SIG_BLOCK 1 /* Block signals. */ #define SIG_UNBLOCK 2 /* Unblock signals. */ #define SIG_SETMASK 3 /* Set the set of blocked signals. */ -#define SIG_SETMASK32 256 /* Goodie from SGI for BSD compatibility: +#ifdef __USE_MISC +# define SIG_SETMASK32 256 /* Goodie from SGI for BSD compatibility: set only the low 32 bit of the sigset. */ +#endif From 6d1d5abfa2720b3638b271be89ac813c5ce05e55 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 4 Jan 1999 01:36:55 +0000 Subject: [PATCH 1508/4487] * sysdeps/m68k/dl-machine.h (elf_machine_rela): Reorder expression to avoid accessing global data in the usual case. --- sysdeps/m68k/dl-machine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index 067c2fbb88..f2fe553069 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -272,7 +272,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, found. */ break; if (sym->st_size > refsym->st_size - || (_dl_verbose && sym->st_size < refsym->st_size)) + || (sym->st_size < refsym->st_size && _dl_verbose)) { extern char **_dl_argv; const char *strtab; From 26466099db2c1260f2cc54facf9e6f4279c8e61f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 4 Jan 1999 09:31:27 +0000 Subject: [PATCH 1509/4487] Linux/ARM implementation of pread. --- sysdeps/unix/sysv/linux/arm/pread.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/arm/pread.c diff --git a/sysdeps/unix/sysv/linux/arm/pread.c b/sysdeps/unix/sysv/linux/arm/pread.c new file mode 100644 index 0000000000..06bc6010a8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/pread.c @@ -0,0 +1 @@ +#include From d7335f19735d3a4ce6d6d1bff9505da22180b7f7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 4 Jan 1999 09:31:32 +0000 Subject: [PATCH 1510/4487] Linux/ARM implementation of pread64. --- sysdeps/unix/sysv/linux/arm/pread64.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/arm/pread64.c diff --git a/sysdeps/unix/sysv/linux/arm/pread64.c b/sysdeps/unix/sysv/linux/arm/pread64.c new file mode 100644 index 0000000000..c567fc530a --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/pread64.c @@ -0,0 +1 @@ +#include From db0fc322328fd1512460bd27bb299799597ec114 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 4 Jan 1999 09:31:41 +0000 Subject: [PATCH 1511/4487] Linux/ARM implementation of pwrite64. --- sysdeps/unix/sysv/linux/arm/pwrite64.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/arm/pwrite64.c diff --git a/sysdeps/unix/sysv/linux/arm/pwrite64.c b/sysdeps/unix/sysv/linux/arm/pwrite64.c new file mode 100644 index 0000000000..4993830d26 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/pwrite64.c @@ -0,0 +1 @@ +#include From 942aea54d81af3608bcf0e17fb7418d1703907e6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 4 Jan 1999 09:31:47 +0000 Subject: [PATCH 1512/4487] Linux/ARM implementation of pwrite. --- sysdeps/unix/sysv/linux/arm/pwrite.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/arm/pwrite.c diff --git a/sysdeps/unix/sysv/linux/arm/pwrite.c b/sysdeps/unix/sysv/linux/arm/pwrite.c new file mode 100644 index 0000000000..b9b5e35107 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/pwrite.c @@ -0,0 +1 @@ +#include From ba498420cb6a8e816483f88fb114d3dad59f08ff Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 4 Jan 1999 17:21:15 +0000 Subject: [PATCH 1513/4487] Correct widths of register values. --- sysdeps/unix/sysv/linux/arm/register-dump.h | 26 ++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/register-dump.h b/sysdeps/unix/sysv/linux/arm/register-dump.h index 015780c623..4ccd9e2e4c 100644 --- a/sysdeps/unix/sysv/linux/arm/register-dump.h +++ b/sysdeps/unix/sysv/linux/arm/register-dump.h @@ -1,5 +1,5 @@ /* Dump registers. - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Philip Blundell , 1998. @@ -72,12 +72,12 @@ register_dump (int fd, union k_sigcontext *ctx) hexvalue (ctx->v20.reg.ARM_r7, regs[7], 8); hexvalue (ctx->v20.reg.ARM_r8, regs[8], 8); hexvalue (ctx->v20.reg.ARM_r9, regs[9], 8); - hexvalue (ctx->v20.reg.ARM_r10, regs[10], 4); - hexvalue (ctx->v20.reg.ARM_fp, regs[11], 4); - hexvalue (ctx->v20.reg.ARM_ip, regs[12], 4); - hexvalue (ctx->v20.reg.ARM_sp, regs[13], 4); - hexvalue (ctx->v20.reg.ARM_lr, regs[14], 4); - hexvalue (ctx->v20.reg.ARM_pc, regs[15], 4); + hexvalue (ctx->v20.reg.ARM_r10, regs[10], 8); + hexvalue (ctx->v20.reg.ARM_fp, regs[11], 8); + hexvalue (ctx->v20.reg.ARM_ip, regs[12], 8); + hexvalue (ctx->v20.reg.ARM_sp, regs[13], 8); + hexvalue (ctx->v20.reg.ARM_lr, regs[14], 8); + hexvalue (ctx->v20.reg.ARM_pc, regs[15], 8); hexvalue (ctx->v20.reg.ARM_cpsr, regs[16], 8); hexvalue (ctx->v20.trap_no, regs[17], 8); hexvalue (ctx->v20.error_code, regs[18], 8); @@ -95,12 +95,12 @@ register_dump (int fd, union k_sigcontext *ctx) hexvalue (ctx->v21.arm_r7, regs[7], 8); hexvalue (ctx->v21.arm_r8, regs[8], 8); hexvalue (ctx->v21.arm_r9, regs[9], 8); - hexvalue (ctx->v21.arm_r10, regs[10], 4); - hexvalue (ctx->v21.arm_fp, regs[11], 4); - hexvalue (ctx->v21.arm_ip, regs[12], 4); - hexvalue (ctx->v21.arm_sp, regs[13], 4); - hexvalue (ctx->v21.arm_lr, regs[14], 4); - hexvalue (ctx->v21.arm_pc, regs[15], 4); + hexvalue (ctx->v21.arm_r10, regs[10], 8); + hexvalue (ctx->v21.arm_fp, regs[11], 8); + hexvalue (ctx->v21.arm_ip, regs[12], 8); + hexvalue (ctx->v21.arm_sp, regs[13], 8); + hexvalue (ctx->v21.arm_lr, regs[14], 8); + hexvalue (ctx->v21.arm_pc, regs[15], 8); hexvalue (ctx->v21.arm_cpsr, regs[16], 8); hexvalue (ctx->v21.trap_no, regs[17], 8); hexvalue (ctx->v21.error_code, regs[18], 8); From 5093ff056ee1c735bb4378012923e55d62447b64 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 4 Jan 1999 17:21:38 +0000 Subject: [PATCH 1514/4487] Linux/ARM specific sigcontext definitions. --- sysdeps/unix/sysv/linux/arm/sigcontextinfo.h | 27 ++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/sigcontextinfo.h diff --git a/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h b/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h new file mode 100644 index 0000000000..089be69549 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h @@ -0,0 +1,27 @@ +/* Copyright (C) 1999 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Philip Blundell , 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#define SIGCONTEXT int signal, int _a2, int _a3, int _a4, union k_sigcontext + +#define GET_PC(ctx) ((void *)((ctx.v20.magic == SIGCONTEXT_2_0_MAGIC) ? \ + ctx.v20.reg.ARM_pc : ctx.v21.arm_pc)) +#define GET_FRAME(ctx) ((void *)((ctx.v20.magic == SIGCONTEXT_2_0_MAGIC) ? \ + ctx.v20.reg.ARM_fp : ctx.v21.arm_fp)) +#define GET_STACK(ctx) ((void *)((ctx.v20.magic == SIGCONTEXT_2_0_MAGIC) ? \ + ctx.v20.reg.ARM_sp : ctx.v21.arm_sp)) From 44338a354e3cd8e04731c86ca50cd9a229be396c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 5 Jan 1999 09:03:21 +0000 Subject: [PATCH 1515/4487] Linux/ARM specific definitions for signal handlers and ptrace. --- sysdeps/unix/sysv/linux/arm/sys/user.h | 68 ++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/sys/user.h diff --git a/sysdeps/unix/sysv/linux/arm/sys/user.h b/sysdeps/unix/sysv/linux/arm/sys/user.h new file mode 100644 index 0000000000..f06d3e465a --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/sys/user.h @@ -0,0 +1,68 @@ +/* Copyright (C) 1998, 1999 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_USER_H +#define _SYS_USER_H 1 + +#include + +/* and both define the PTRACE_* macros. + This leads to compilation problems with programs which include both + user.h and ptrace.h (eg: GDB). Do not include here. */ +#include + +struct user_fp +{ + struct fp_reg + { + unsigned int sign1:1; + unsigned int unused:15; + unsigned int sign2:1; + unsigned int exponent:14; + unsigned int j:1; + unsigned int mantissa1:31; + unsigned int mantissa0:32; + } fpregs[8]; + unsigned int fpsr:32; + unsigned int fpcr:32; +}; + +struct user +{ + struct pt_regs regs; /* General registers */ + int u_fpvalid; /* True if math co-processor being used. */ + + unsigned long int u_tsize; /* Text segment size (pages). */ + unsigned long int u_dsize; /* Data segment size (pages). */ + unsigned long int u_ssize; /* Stack segment size (pages). */ + + unsigned long start_code; /* Starting virtual address of text. */ + unsigned long start_stack; /* Starting virtual address of stack. */ + + long int signal; /* Signal that caused the core dump. */ + int reserved; /* No longer used */ + struct pt_regs *u_ar0; /* help gdb to find the general registers. */ + + unsigned long magic; /* uniquely identify a core file */ + char u_comm[32]; /* User command that was responsible */ + int u_debugreg[8]; + struct user_fp u_fp; /* Floating point registers */ + struct user_fp_struct *u_fp0; /* help gdb to find the FP registers. */ +}; + +#endif /* sys/user.h */ From 2a3db76a83ba012ee7e901e1f8521769503d0c27 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 7 Jan 1999 09:53:42 +0000 Subject: [PATCH 1516/4487] Correct type for __fsfilcnt_t. --- sysdeps/unix/sysv/linux/alpha/bits/types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h index d71599cb32..0bc6cf6575 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/types.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 92, 94, 95, 96, 97, 98 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,94,95,96,97,98,99 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 @@ -63,7 +63,7 @@ typedef __int32_t __blkcnt_t; /* Type to count nr disk blocks. */ typedef __int64_t __blkcnt64_t; /* "" (LFS) */ typedef __uint32_t __fsblkcnt_t; /* Type to count file system blocks. */ typedef __uint64_t __fsblkcnt64_t; /* "" (LFS) */ -typedef __uint64_t __fsfilcnt_t; /* Type to count file system inodes. */ +typedef __uint32_t __fsfilcnt_t; /* Type to count file system inodes. */ typedef __uint64_t __fsfilcnt64_t; /* "" (LFS) */ typedef __uint32_t __id_t; /* General type for IDs. */ From a6446af10a8b602b7b8f6e411c85e1a01db933dc Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 7 Jan 1999 09:53:56 +0000 Subject: [PATCH 1517/4487] Fix bug in last change. --- sysdeps/unix/sysv/linux/arm/sigcontextinfo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h b/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h index 089be69549..d92c9fadf1 100644 --- a/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h +++ b/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h @@ -17,7 +17,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define SIGCONTEXT int signal, int _a2, int _a3, int _a4, union k_sigcontext +#define SIGCONTEXT int _a2, int _a3, int _a4, union k_sigcontext #define GET_PC(ctx) ((void *)((ctx.v20.magic == SIGCONTEXT_2_0_MAGIC) ? \ ctx.v20.reg.ARM_pc : ctx.v21.arm_pc)) From cd641f748fa621f1619af6208c58f3b54c494d97 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 13 Jan 1999 01:43:33 +0000 Subject: [PATCH 1518/4487] * sysdeps/unix/sysv/linux/m68k/vfork.S: New file. --- sysdeps/unix/sysv/linux/m68k/vfork.S | 65 ++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/vfork.S diff --git a/sysdeps/unix/sysv/linux/m68k/vfork.S b/sysdeps/unix/sysv/linux/m68k/vfork.S new file mode 100644 index 0000000000..e5761f9371 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/vfork.S @@ -0,0 +1,65 @@ +/* Copyright (C) 1999 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Schwab . + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#define _ERRNO_H 1 +#include + +/* Clone the calling process, but without copying the whole address space. + The calling process is suspended until the new process exits or is + replaced by a call to `execve'. Return -1 for errors, 0 to the new process, + and the process ID of the new process to the old process. */ + +ENTRY (__vfork) + +#ifdef __NR_vfork + + /* Pop the return PC value into A0. */ + movel %sp@+, %a0 + + /* Stuff the syscall number in D0 and trap into the kernel. */ + movel #SYS_ify (vfork), %d0 + trap #0 + tstl %d0 + jmi .Lerror /* Branch forward if it failed. */ + + /* Jump to the return PC. */ + jmp %a0@ + +.Lerror: + /* Push back the return PC. */ + movel %a0,%sp@- + + /* Check if vfork syscall is known at all. */ + movel #-ENOSYS,%d1 + cmpl %d0,%d1 + jne SYSCALL_ERROR_LABEL + +#endif + + /* If we don't have vfork, fork is close enough. */ + + movel #SYS_ify (fork), %d0 + trap #0 + jmi SYSCALL_ERROR_LABEL + rts + +PSEUDO_END (__vfork) + +weak_alias (__vfork, vfork) From 9346d2ecb16a8cea9c2cb64834af418ba992c5c8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 14 Jan 1999 00:15:14 +0000 Subject: [PATCH 1519/4487] Add vfork. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 9f002b2ad1..829f35ec94 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -17,6 +17,7 @@ semctl - semctl 4 __semctl semctl osf_sigprocmask - osf_sigprocmask 2 __osf_sigprocmask sigstack - sigstack 2 sigstack +vfork - vfork 0 __vfork vfork getpeername - getpeername 3 __getpeername getpeername getpriority - getpriority 2 __getpriority getpriority From 465cf3e6e259b16923829e146e0fb8cfa9481be3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 14 Jan 1999 12:35:18 +0000 Subject: [PATCH 1520/4487] Remove sys/regdef.h. --- sysdeps/mips/Dist | 1 - 1 file changed, 1 deletion(-) diff --git a/sysdeps/mips/Dist b/sysdeps/mips/Dist index 7ccfb1bfe6..e053523950 100644 --- a/sysdeps/mips/Dist +++ b/sysdeps/mips/Dist @@ -4,6 +4,5 @@ rtld-parms regdef.h sgidefs.h fpregdef.h -sys/regdef.h sys/fpregdef.h sys/asm.h From 453b49e1f4d7e227f50efeb16f4ee0c68579c7fe Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 14 Jan 1999 12:57:55 +0000 Subject: [PATCH 1521/4487] Add sys/user.h. --- sysdeps/unix/sysv/linux/arm/Dist | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/arm/Dist b/sysdeps/unix/sysv/linux/arm/Dist index 479a4abb08..0bf79a4f98 100644 --- a/sysdeps/unix/sysv/linux/arm/Dist +++ b/sysdeps/unix/sysv/linux/arm/Dist @@ -7,3 +7,4 @@ setfsuid.c setfsgid.c bits/armsigctx.h sys/io.h +sys/user.h From e53006703b9ffc90fcef649866480f4865dacceb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 14 Jan 1999 13:26:19 +0000 Subject: [PATCH 1522/4487] Register definitions for MIPS. --- sysdeps/mips/sys/regdef.h | 61 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 sysdeps/mips/sys/regdef.h diff --git a/sysdeps/mips/sys/regdef.h b/sysdeps/mips/sys/regdef.h new file mode 100644 index 0000000000..9f7b3181c0 --- /dev/null +++ b/sysdeps/mips/sys/regdef.h @@ -0,0 +1,61 @@ +/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ralf Baechle . + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_REGDEF_H +#define _SYS_REGDEF_H + +/* + * Symbolic register names for 32 bit ABI + */ +#define zero $0 /* wired zero */ +#define AT $1 /* assembler temp - uppercase because of ".set at" */ +#define v0 $2 /* return value */ +#define v1 $3 +#define a0 $4 /* argument registers */ +#define a1 $5 +#define a2 $6 +#define a3 $7 +#define t0 $8 /* caller saved */ +#define t1 $9 +#define t2 $10 +#define t3 $11 +#define t4 $12 +#define t5 $13 +#define t6 $14 +#define t7 $15 +#define s0 $16 /* callee saved */ +#define s1 $17 +#define s2 $18 +#define s3 $19 +#define s4 $20 +#define s5 $21 +#define s6 $22 +#define s7 $23 +#define t8 $24 /* caller saved */ +#define t9 $25 +#define jp $25 /* PIC jump register */ +#define k0 $26 /* kernel scratch */ +#define k1 $27 +#define gp $28 /* global pointer */ +#define sp $29 /* stack pointer */ +#define fp $30 /* frame pointer */ +#define s8 $30 /* same like fp! */ +#define ra $31 /* return address */ + +#endif /* _SYS_REGDEF_H */ From d6ab589ffef413ac82e2aa2b56ca3df365243c8d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 14 Jan 1999 13:26:49 +0000 Subject: [PATCH 1523/4487] Add sys/regdef.h back. --- sysdeps/mips/Dist | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/mips/Dist b/sysdeps/mips/Dist index e053523950..7c7e545ca4 100644 --- a/sysdeps/mips/Dist +++ b/sysdeps/mips/Dist @@ -5,4 +5,5 @@ regdef.h sgidefs.h fpregdef.h sys/fpregdef.h +sys/regdef.h sys/asm.h From 6c56758e2a2c3fa0d66db27ea40b778240ac206e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 14 Jan 1999 13:30:32 +0000 Subject: [PATCH 1524/4487] Linux/MIPS specific siginfo definition. --- sysdeps/unix/sysv/linux/mips/bits/siginfo.h | 282 ++++++++++++++++++++ 1 file changed, 282 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/mips/bits/siginfo.h diff --git a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h new file mode 100644 index 0000000000..81a6ec115d --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h @@ -0,0 +1,282 @@ +/* siginfo_t, sigevent and constants. Linux version. + Copyright (C) 1997, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#if !defined _SIGNAL_H && !defined __need_siginfo_t +# error "Never include this file directly. Use instead" +#endif + +#if (!defined __have_siginfo_t \ + && (defined _SIGNAL_H || defined __need_siginfo_t)) +# define __have_siginfo_t 1 + +/* Type for data associated with a signal. */ +typedef union sigval + { + int sival_int; + void *sival_ptr; + } sigval_t; + +# define __SI_MAX_SIZE 128 +# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3) + +typedef struct siginfo + { + int si_signo; /* Signal number. */ + int si_errno; /* If non-zero, an errno value associated with + this signal, as defined in . */ + int si_code; /* Signal code. */ + + union + { + int _pad[__SI_PAD_SIZE]; + + /* kill(). */ + struct + { + __pid_t si_pid; /* Sending process ID. */ + __uid_t si_uid; /* Real user ID of sending process. */ + } _kill; + + /* SIGCHLD. */ + struct + { + __pid_t si_pid; /* Which child. */ + __uid_t si_uid; /* Real user ID of sending process. */ + int si_status; /* Exit value or signal. */ + __clock_t si_utime; + __clock_t si_stime; + } _sigchld; + + /* SIGILL, SIGFPE, SIGSEGV, SIGBUS. */ + struct + { + void *si_addr; /* Faulting insn/memory ref. */ + } _sigfault; + + /* SIGPOLL. */ + struct + { + int si_band; /* Band event for SIGPOLL. */ + int si_fd; + } _sigpoll; + + /* POSIX.1b timers. */ + struct + { + unsigned int _timer1; + unsigned int _timer2; + } _timer; + + /* POSIX.1b signals. */ + struct + { + __pid_t si_pid; /* Sending process ID. */ + __uid_t si_uid; /* Real user ID of sending process. */ + sigval_t si_sigval; /* Signal value. */ + } _rt; + } _sifields; + } siginfo_t; + + +/* X/Open requires some more fields with fixed names. */ +# define si_pid _sifields._kill.si_pid +# define si_uid _sifields._kill.si_uid +# define si_status _sifields._sigchld.si_status +# define si_utime _sifields._sigchld.si_utime +# define si_stime _sifields._sigchld.si_stime +# define si_value _sifields._rt.si_sigval +# define si_int _sifields._rt.si_sigval.sival_int +# define si_ptr _sifields._rt.si_sigval.sival_ptr +# define si_addr _sifields._sigfault.si_addr +# define si_band _sifields._sigpoll.si_band +# define si_fd _sifields._sigpoll.si_fd + + +/* Values for `si_code'. Positive values are reserved for kernel-generated + signals. */ +enum +{ + SI_SIGIO = -5, /* Sent by queued SIGIO. */ +# define SI_SIGIO SI_SIGIO + SI_MESGQ, /* Sent by real time mesq state change. */ +# define SI_MESGQ SI_MESGQ + SI_TIMER, /* Sent by real time mesq state change. */ +# define SI_TIMER SI_TIMER + SI_ASYNCIO, /* Sent by AIO completion. */ +# define SI_ASYNCIO SI_ASYNCIO + SI_QUEUE, /* Sent by sigqueue. */ +# define SI_QUEUE SI_QUEUE + SI_USER /* Sent by kill, sigsend, raise. */ +# define SI_USER SI_USER +}; + + +/* `si_code' values for SIGILL signal. */ +enum +{ + ILL_ILLOPC = 1, /* Illegal opcode. */ +# define ILL_ILLOPC ILL_ILLOPC + ILL_ILLOPN, /* Illegal operand. */ +# define ILL_ILLOPN ILL_ILLOPN + ILL_ILLADR, /* Illegal addressing mode. */ +# define ILL_ILLADR ILL_ILLADR + ILL_ILLTRP, /* Illegal trap. */ +# define ILL_ILLTRP ILL_ILLTRP + ILL_PRVOPC, /* Privileged opcode. */ +# define ILL_PRVOPC ILL_PRVOPC + ILL_PRVREG, /* Privileged register. */ +# define ILL_PRVREG ILL_PRVREG + ILL_COPROC, /* Coprocessor error. */ +# define ILL_COPROC ILL_COPROC + ILL_BADSTK /* Internal stack error. */ +# define ILL_BADSTK ILL_BADSTK +}; + +/* `si_code' values for SIGFPE signal. */ +enum +{ + FPE_INTDIV = 1, /* Integer divide by zero. */ +# define FPE_INTDIV FPE_INTDIV + FPE_INTOVF, /* Integer overflow. */ +# define FPE_INTOVF FPE_INTOVF + FPE_FLTDIV, /* Floating point divide by zero. */ +# define FPE_FLTDIV FPE_FLTDIV + FPE_FLTOVF, /* Floating point overflow. */ +# define FPE_FLTOVF FPE_FLTOVF + FPE_FLTUND, /* Floating point underflow. */ +# define FPE_FLTUND FPE_FLTUND + FPE_FLTRES, /* Floating point inexact result. */ +# define FPE_FLTRES FPE_FLTRES + FPE_FLTINV, /* Floating point invalid operation. */ +# define FPE_FLTINV FPE_FLTINV + FPE_FLTSUB /* Subscript out of range. */ +# define FPE_FLTSUB FPE_FLTSUB +}; + +/* `si_code' values for SIGSEGV signal. */ +enum +{ + SEGV_MAPERR = 1, /* Address not mapped to object. */ +# define SEGV_MAPERR SEGV_MAPERR + SEGV_ACCERR /* Invalid permissions for mapped object. */ +# define SEGV_ACCERR SEGV_ACCERR +}; + +/* `si_code' values for SIGBUS signal. */ +enum +{ + BUS_ADRALN = 1, /* Invalid address alignment. */ +# define BUS_ADRALN BUS_ADRALN + BUS_ADRERR, /* Non-existant physical address. */ +# define BUS_ADRERR BUS_ADRERR + BUS_OBJERR /* Object specific hardware error. */ +# define BUS_OBJERR BUS_OBJERR +}; + +/* `si_code' values for SIGTRAP signal. */ +enum +{ + TRAP_BRKPT = 1, /* Process breakpoint. */ +# define TRAP_BRKPT TRAP_BRKPT + TRAP_TRACE /* Process trace trap. */ +# define TRAP_TRACE TRAP_TRACE +}; + +/* `si_code' values for SIGCHLD signal. */ +enum +{ + CLD_EXITED = 1, /* Child has exited. */ +# define CLD_EXITED CLD_EXITED + CLD_KILLED, /* Child was killed. */ +# define CLD_KILLED CLD_KILLED + CLD_DUMPED, /* Child terminated abnormally. */ +# define CLD_DUMPED CLD_DUMPED + CLD_TRAPPED, /* Traced child has trapped. */ +# define CLD_TRAPPED CLD_TRAPPED + CLD_STOPPED, /* Child has stopped. */ +# define CLD_STOPPED CLD_STOPPED + CLD_CONTINUED /* Stopped child has continued. */ +# define CLD_CONTINUED CLD_CONTINUED +}; + +/* `si_code' values for SIGPOLL signal. */ +enum +{ + POLL_IN = 1, /* Data input available. */ +# define POLL_IN POLL_IN + POLL_OUT, /* Output buffers available. */ +# define POLL_OUT POLL_OUT + POLL_MSG, /* Input message available. */ +# define POLL_MSG POLL_MSG + POLL_ERR, /* I/O error. */ +# define POLL_ERR POLL_ERR + POLL_PRI, /* High priority input available. */ +# define POLL_PRI POLL_PRI + POLL_HUP /* Device disconnected. */ +# define POLL_HUP POLL_HUP +}; + +# undef __need_siginfo_t +#endif /* !have siginfo_t && (have _SIGNAL_H || need siginfo_t). */ + + +#if defined _SIGNAL_H && !defined __have_sigevent_t +# define __have_sigevent_t 1 + +/* Structure to transport application-defined values with signals. */ +# define __SIGEV_MAX_SIZE 64 +# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3) + +/* XXX This one might need to change!!! */ +typedef struct sigevent + { + sigval_t sigev_value; + int sigev_signo; + int sigev_notify; + + union + { + int _pad[__SIGEV_PAD_SIZE]; + + struct + { + void (*_function) __PMT ((sigval_t)); /* Function to start. */ + void *_attribute; /* Really pthread_attr_t. */ + } _sigev_thread; + } _sigev_un; + } sigevent_t; + +/* POSIX names to access some of the members. */ +# define sigev_notify_function _sigev_un._sigev_thread._function +# define sigev_notify_attributes _sigev_un._sigev_thread._attribute + +/* `sigev_notify' values. */ +enum +{ + SIGEV_SIGNAL = 0, /* Notify via signal. */ +# define SIGEV_SIGNAL SIGEV_SIGNAL + SIGEV_NONE, /* Other notification: meaningless. */ +# define SIGEV_NONE SIGEV_NONE + SIGEV_CALLBACK, /* Deliver via thread creation. */ +# define SIGEV_CALLBACK SIGEV_CALLBACK + SIGEV_THREAD /* Deliver via thread creation. */ +# define SIGEV_THREAD SIGEV_THREAD +}; + +#endif /* have _SIGNAL_H. */ From 68798276c9dbcb1e3c6fe924e1ecf277c81f72c6 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 18 Jan 1999 01:45:33 +0000 Subject: [PATCH 1525/4487] * sysdeps/unix/sysv/linux/m68k/vfork.S: Test return value after fork syscall. --- sysdeps/unix/sysv/linux/m68k/vfork.S | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/m68k/vfork.S b/sysdeps/unix/sysv/linux/m68k/vfork.S index e5761f9371..d5b321dff6 100644 --- a/sysdeps/unix/sysv/linux/m68k/vfork.S +++ b/sysdeps/unix/sysv/linux/m68k/vfork.S @@ -57,6 +57,7 @@ ENTRY (__vfork) movel #SYS_ify (fork), %d0 trap #0 + tstl %d0 jmi SYSCALL_ERROR_LABEL rts From f90bac9291a0d6fe48264d253a218354fdbe2ad1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 19 Jan 1999 12:24:34 +0000 Subject: [PATCH 1526/4487] Add baud rates > 460800. --- sysdeps/unix/sysv/linux/alpha/bits/termios.h | 13 ++++++++++- sysdeps/unix/sysv/linux/mips/bits/termios.h | 23 +++++++++++++++----- 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/termios.h b/sysdeps/unix/sysv/linux/alpha/bits/termios.h index 0d57c489d9..bfd64ee99a 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/termios.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/termios.h @@ -1,5 +1,5 @@ /* termios type and macro definitions. Linux version. - Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1993, 94, 95, 96, 97, 99 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 @@ -138,6 +138,17 @@ struct termios #define B115200 00021 #define B230400 00022 #define B460800 00023 +#define B500000 00024 +#define B576000 00025 +#define B921600 00026 +#define B1000000 00027 +#define B1152000 00030 +#define B1500000 00031 +#define B2000000 00032 +#define B2500000 00033 +#define B3000000 00034 +#define B3500000 00035 +#define B4000000 00036 #define CSIZE 00001400 #define CS5 00000000 diff --git a/sysdeps/unix/sysv/linux/mips/bits/termios.h b/sysdeps/unix/sysv/linux/mips/bits/termios.h index de21ee1775..e43c03b54b 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/termios.h +++ b/sysdeps/unix/sysv/linux/mips/bits/termios.h @@ -1,5 +1,5 @@ /* termios type and macro definitions. Linux/MIPS version. - Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1993, 94, 95, 96, 97, 99 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 @@ -200,11 +200,22 @@ struct termios #define HUPCL 0002000 /* Hang up on last close. */ #define CLOCAL 0004000 /* Ignore modem status lines. */ #ifdef __USE_BSD -# define CBAUDEX 0010000 -# define B57600 0010001 -# define B115200 0010002 -# define B230400 0010003 -# define B460800 0010004 +# define CBAUDEX 0010000 +# define B57600 0010001 +# define B115200 0010002 +# define B230400 0010003 +# define B460800 0010004 +# define B500000 0010005 +# define B576000 0010006 +# define B921600 0010007 +# define B1000000 0010010 +# define B1152000 0010011 +# define B1500000 0010012 +# define B2000000 0010013 +# define B2500000 0010014 +# define B3000000 0010015 +# define B3500000 0010016 +# define B4000000 0010017 # define CIBAUD 002003600000 /* input baud rate (not used) */ # define CRTSCTS 020000000000 /* flow control */ #endif From f67e2479b460fa08da1506b2e50a36f096ff12f3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 20 Jan 1999 09:23:32 +0000 Subject: [PATCH 1527/4487] Add __atan2 for libm and GLIBC_2.0. --- sysdeps/alpha/Versions | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sysdeps/alpha/Versions b/sysdeps/alpha/Versions index c7c1f047f6..76b67a6b90 100644 --- a/sysdeps/alpha/Versions +++ b/sysdeps/alpha/Versions @@ -5,3 +5,9 @@ libc { __remls; __divl; __reml; __divq; __remq; __divqu; __remqu; } } +libm { + GLIBC_2.0 { + # used in inline functions. + __atan2; + } +} From 5149854edff9d449a052b9615922b6d820328682 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 21 Jan 1999 09:46:07 +0000 Subject: [PATCH 1528/4487] Linux/Arm vfork implementation. --- sysdeps/unix/sysv/linux/arm/vfork.S | 46 +++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/vfork.S diff --git a/sysdeps/unix/sysv/linux/arm/vfork.S b/sysdeps/unix/sysv/linux/arm/vfork.S new file mode 100644 index 0000000000..4c2f1a2982 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/vfork.S @@ -0,0 +1,46 @@ +/* Copyright (C) 1999 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Philip Blundell + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#define _ERRNO_H 1 +#include +#define _SIGNAL_H +#include + +#define CLONE_VM 0x00000100 /* Set if VM shared between processes. */ +#define CLONE_VFORK 0x00004000 /* Set if the parent wants the child to + wake it up on mm_release. */ + +/* Clone the calling process, but without copying the whole address space. + The calling process is suspended until the new process exits or is + replaced by a call to `execve'. Return -1 for errors, 0 to the new process, + and the process ID of the new process to the old process. */ + +ENTRY (__vfork) + mov a1, $SIGCLD + orr a1, a1, $(CLONE_VM | CLONE_VFORK) + mov a2, $0 + swi SYS_ify(clone) + cmn a1, $4096 + bhs PLTJMP(C_SYMBOL_NAME(__syscall_error)) + RETINSTR(mov, pc, lr) + +PSEUDO_END (__vfork) + +weak_alias (__vfork, vfork) From 462d695aea95ad3908aabb4013294c8441fe99f1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 21 Jan 1999 09:46:15 +0000 Subject: [PATCH 1529/4487] Linux/Arm sigaction implementation. --- sysdeps/unix/sysv/linux/arm/sigaction.c | 161 ++++++++++++++++++++++++ 1 file changed, 161 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/sigaction.c diff --git a/sysdeps/unix/sysv/linux/arm/sigaction.c b/sysdeps/unix/sysv/linux/arm/sigaction.c new file mode 100644 index 0000000000..76399a2b7a --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/sigaction.c @@ -0,0 +1,161 @@ +/* Copyright (C) 1997, 1998, 1999 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include + +#include +#include + +/* The difference here is that the sigaction structure used in the + kernel is not the same as we use in the libc. Therefore we must + translate it here. */ +#include + +extern int __syscall_sigaction (int, const struct old_kernel_sigaction *, + struct old_kernel_sigaction *); +extern int __syscall_rt_sigaction (int, const struct kernel_sigaction *, + struct kernel_sigaction *, size_t); + +/* The variable is shared between all wrappers around signal handling + functions which have RT equivalents. */ +int __libc_missing_rt_sigs; + +#define SA_RESTORER 0x04000000 + +/* When RT signals are in use we need to use a different return stub. */ +#ifdef __NR_rt_sigreturn +#define choose_restorer(flags) \ + (flags & SA_SIGINFO) ? &&__default_rt_sa_restorer \ + : &&__default_sa_restorer +#else +#define choose_restorer(flags) \ + &&__default_sa_restorer +#endif + +/* If ACT is not NULL, change the action for SIG to *ACT. + If OACT is not NULL, put the old action for SIG in *OACT. */ +int +__sigaction (sig, act, oact) + int sig; + const struct sigaction *act; + struct sigaction *oact; +{ + struct old_kernel_sigaction k_sigact, k_osigact; + int result; + +#ifdef __NR_rt_sigaction + /* First try the RT signals. */ + if (!__libc_missing_rt_sigs) + { + struct kernel_sigaction kact, koact; + int saved_errno = errno; + + if (act) + { + kact.k_sa_handler = act->sa_handler; + memcpy (&kact.sa_mask, &act->sa_mask, sizeof (sigset_t)); + kact.sa_flags = act->sa_flags; +# ifdef HAVE_SA_RESTORER + /* If the user specified SA_ONSTACK this means she is trying to + use the old-style stack switching. Unfortunately this + requires the sa_restorer field so we cannot install our own + handler. (In fact the user is likely to be out of luck anyway + since the kernel currently only supports stack switching via + the X/Open sigaltstack interface, but we allow for the + possibility that this might change in the future.) */ + if (kact.sa_flags & (SA_RESTORER | SA_ONSTACK)) + kact.sa_restorer = act->sa_restorer; + else + { + kact.sa_restorer = choose_restorer (kact.sa_flags); + kact.sa_flags |= SA_RESTORER; + } +# endif + } + + /* XXX The size argument hopefully will have to be changed to the + real size of the user-level sigset_t. */ + result = INLINE_SYSCALL (rt_sigaction, 4, sig, act ? &kact : NULL, + oact ? &koact : NULL, _NSIG / 8); + + if (result >= 0 || errno != ENOSYS) + { + if (oact && result >= 0) + { + oact->sa_handler = koact.k_sa_handler; + memcpy (&oact->sa_mask, &koact.sa_mask, sizeof (sigset_t)); + oact->sa_flags = koact.sa_flags; +# ifdef HAVE_SA_RESTORER + oact->sa_restorer = koact.sa_restorer; +# endif + } + return result; + } + + __set_errno (saved_errno); + __libc_missing_rt_sigs = 1; + } +#endif + + if (act) + { + k_sigact.k_sa_handler = act->sa_handler; + k_sigact.sa_mask = act->sa_mask.__val[0]; + k_sigact.sa_flags = act->sa_flags; +#ifdef HAVE_SA_RESTORER + /* See the comments above for why we test SA_ONSTACK. */ + if (k_sigact.sa_flags & (SA_RESTORER | SA_ONSTACK)) + k_sigact.sa_restorer = act->sa_restorer; + else + { + k_sigact.sa_restorer = choose_restorer (k_sigact.sa_flags); + k_sigact.sa_flags |= SA_RESTORER; + } +#endif + } + result = INLINE_SYSCALL (sigaction, 3, sig, act ? &k_sigact : NULL, + oact ? &k_osigact : NULL); + if (oact && result >= 0) + { + oact->sa_handler = k_osigact.k_sa_handler; + oact->sa_mask.__val[0] = k_osigact.sa_mask; + oact->sa_flags = k_osigact.sa_flags; +#ifdef HAVE_SA_RESTORER + oact->sa_restorer = k_osigact.sa_restorer; +#endif + } + return result; + + /* If no SA_RESTORER function was specified by the application we use + this one. This avoids the need for the kernel to synthesise a return + instruction on the stack, which would involve expensive cache flushes. */ + __default_sa_restorer: + asm volatile ("swi %0" : : "i" (__NR_sigreturn)); + +#ifdef __NR_rt_sigreturn + __default_rt_sa_restorer: + asm volatile ("swi %0" : : "i" (__NR_rt_sigreturn)); +#endif + + /* NOTREACHED */ + return -1; +} + +weak_alias (__sigaction, sigaction) From 7f833eba90a4ff7e73410143f8f687dca393550e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 21 Jan 1999 09:46:25 +0000 Subject: [PATCH 1530/4487] Optimise a little, support 26-bit machines correctly and fix check for returned errors. --- sysdeps/unix/sysv/linux/arm/clone.S | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/clone.S b/sysdeps/unix/sysv/linux/arm/clone.S index 728d62f3e3..46359e8362 100644 --- a/sysdeps/unix/sysv/linux/arm/clone.S +++ b/sysdeps/unix/sysv/linux/arm/clone.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Pat Beirne @@ -45,20 +45,17 @@ ENTRY(__clone) mov r0, r2 @ new sp is already in r1 swi SYS_ify(clone) - cmp r0, #0 - blt PLTJMP(syscall_error) - beq thread_start - @ else, thread was launched... - mov pc, lr + cmn a1, $4096 + bhs PLTJMP(C_SYMBOL_NAME(__syscall_error)) + RETINSTR(movne,pc,lr) -thread_start: @ pick the function arg and call address off the stack and execute ldr r0, [sp, #4] mov lr, pc ldr pc, [sp] @ and we are done, passing the return value through r0 - bl PLTJMP(_exit) + b PLTJMP(_exit) PSEUDO_END (__clone) From 33092c325a93991e6c9a80893ba18f40798d22ff Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 21 Jan 1999 09:46:35 +0000 Subject: [PATCH 1531/4487] Add vfork.S. --- sysdeps/unix/sysv/linux/arm/Dist | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/arm/Dist b/sysdeps/unix/sysv/linux/arm/Dist index 0bf79a4f98..f4b271d785 100644 --- a/sysdeps/unix/sysv/linux/arm/Dist +++ b/sysdeps/unix/sysv/linux/arm/Dist @@ -1,3 +1,4 @@ +vfork.S clone.S init-first.h ioperm.c From 61f5bb0159131de60f5eabcba9ec045d4acd9443 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 22 Jan 1999 09:19:57 +0000 Subject: [PATCH 1532/4487] Undo last change. Not needed. --- sysdeps/unix/sysv/linux/arm/Dist | 1 - 1 file changed, 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/arm/Dist b/sysdeps/unix/sysv/linux/arm/Dist index f4b271d785..0bf79a4f98 100644 --- a/sysdeps/unix/sysv/linux/arm/Dist +++ b/sysdeps/unix/sysv/linux/arm/Dist @@ -1,4 +1,3 @@ -vfork.S clone.S init-first.h ioperm.c From f6e4428cea134a8aa1d2612fdd44d48dd7a938f7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 25 Jan 1999 09:27:19 +0000 Subject: [PATCH 1533/4487] Correct error check again. --- sysdeps/unix/sysv/linux/arm/clone.S | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/clone.S b/sysdeps/unix/sysv/linux/arm/clone.S index 46359e8362..94aed12b47 100644 --- a/sysdeps/unix/sysv/linux/arm/clone.S +++ b/sysdeps/unix/sysv/linux/arm/clone.S @@ -41,13 +41,13 @@ ENTRY(__clone) str r0, [r1] @ do the system call - @ get flags + @ get flags mov r0, r2 @ new sp is already in r1 swi SYS_ify(clone) - cmn a1, $4096 - bhs PLTJMP(C_SYMBOL_NAME(__syscall_error)) - RETINSTR(movne,pc,lr) + movs a1, a1 + blt PLTJMP(C_SYMBOL_NAME(__syscall_error)) + RETINSTR(movne, pc, lr) @ pick the function arg and call address off the stack and execute ldr r0, [sp, #4] From 0583626692f7f0d76c0aa57e069db1c420dd6fcf Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 28 Jan 1999 17:34:23 +0000 Subject: [PATCH 1534/4487] Error messages for Solaris/SPARC. --- .../unix/sysv/sysv4/solaris2/sparc/errlist.c | 184 ++++++++++++++++++ 1 file changed, 184 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c b/sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c new file mode 100644 index 0000000000..37f003bda1 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c @@ -0,0 +1,184 @@ +/* Copyright (C) 1999 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + + +/* This is a list of all known `errno' codes. */ + + +const int _sys_nerr = 152; + +const char *const _sys_errlist[] = +{ + N_("Error 0"), + N_("Not owner"), + N_("No such file or directory"), + N_("No such process"), + N_("Interrupted system call"), + N_("I/O error"), + N_("No such device or address"), + N_("Arg list too long"), + N_("Exec format error"), + N_("Bad file number"), + N_("No child processes"), + N_("Resource temporarily unavailable"), + N_("Not enough space"), + N_("Permission denied"), + N_("Bad address"), + N_("Block device required"), + N_("Device busy"), + N_("File exists"), + N_("Cross-device link"), + N_("No such device"), + N_("Not a directory"), + N_("Is a directory"), + N_("Invalid argument"), + N_("File table overflow"), + N_("Too many open files"), + N_("Inappropriate ioctl for device"), + N_("Text file busy"), + N_("File too large"), + N_("No space left on device"), + N_("Illegal seek"), + N_("Read-only file system"), + N_("Too many links"), + N_("Broken pipe"), + N_("Argument out of domain"), + N_("Result too large"), + N_("No message of desired type"), + N_("Identifier removed"), + N_("Channel number out of range"), + N_("Level 2 not synchronized"), + N_("Level 3 halted"), + N_("Level 3 reset"), + N_("Link number out of range"), + N_("Protocol driver not attached"), + N_("No CSI structure available"), + N_("Level 2 halted"), + N_("Deadlock situation detected/avoided"), + N_("No record locks available"), + N_("Operation canceled"), + N_("Operation not supported"), + N_("Disc quota exceeded"), + N_("Bad exchange descriptor"), + N_("Bad request descriptor"), + N_("Message tables full"), + N_("Anode table overflow"), + N_("Bad request code"), + N_("Invalid slot"), + N_("File locking deadlock"), + N_("Bad font file format"), + N_("Error 58"), + N_("Error 59"), + N_("Not a stream device"), + N_("No data available"), + N_("Timer expired"), + N_("Out of stream resources"), + N_("Machine is not on the network"), + N_("Package not installed"), + N_("Object is remote"), + N_("Link has been severed"), + N_("Advertise error"), + N_("Srmount error"), + N_("Communication error on send"), + N_("Protocol error"), + N_("Error 72"), + N_("Error 73"), + N_("Multihop attempted"), + N_("Error 75"), + N_("Error 76"), + N_("Not a data message"), + N_("File name too long"), + N_("Value too large for defined data type"), + N_("Name not unique on network"), + N_("File descriptor in bad state"), + N_("Remote address changed"), + N_("Can not access a needed shared library"), + N_("Accessing a corrupted shared library"), + N_(".lib section in a.out corrupted"), + N_("Attempting to link in more shared libraries than system limit"), + N_("Can not exec a shared library directly"), + N_("Illegal byte sequence"), + N_("Operation not applicable"), + N_("Number of symbolic links encountered during path name traversal exceeds MAXSYMLINKS"), + N_("Error 91"), + N_("Error 92"), + N_("Directory not empty"), + N_("Too many users"), + N_("Socket operation on non-socket"), + N_("Destination address required"), + N_("Message too long"), + N_("Protocol wrong type for socket"), + N_("Option not supported by protocol"), + N_("Error 100"), + N_("Error 101"), + N_("Error 102"), + N_("Error 103"), + N_("Error 104"), + N_("Error 105"), + N_("Error 106"), + N_("Error 107"), + N_("Error 108"), + N_("Error 109"), + N_("Error 110"), + N_("Error 111"), + N_("Error 112"), + N_("Error 113"), + N_("Error 114"), + N_("Error 115"), + N_("Error 116"), + N_("Error 117"), + N_("Error 118"), + N_("Error 119"), + N_("Protocol not supported"), + N_("Socket type not supported"), + N_("Operation not supported on transport endpoint"), + N_("Protocol family not supported"), + N_("Address family not supported by protocol family"), + N_("Address already in use"), + N_("Cannot assign requested address"), + N_("Network is down"), + N_("Network is unreachable"), + N_("Network dropped connection because of reset"), + N_("Software caused connection abort"), + N_("Connection reset by peer"), + N_("No buffer space available"), + N_("Transport endpoint is already connected"), + N_("Transport endpoint is not connected"), + N_("Structure needs cleaning"), + N_("Error 136"), + N_("Not a name file"), + N_("Not available"), + N_("Is a name file"), + N_("Remote I/O error"), + N_("Reserved for future use"), + N_("Error 142"), + N_("Cannot send after socket shutdown"), + N_("Too many references: cannot splice"), + N_("Connection timed out"), + N_("Connection refused"), + N_("Host is down"), + N_("No route to host"), + N_("Operation already in progress"), + N_("Operation now in progress"), + N_("Stale NFS file handle)" +}; + +weak_alias (_sys_errlist, sys_errlist) +weak_alias (_sys_nerr, sys_nerr) From 9953714a279e36ce73c68463b2c414e2f9d60bfc Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 28 Jan 1999 17:34:45 +0000 Subject: [PATCH 1535/4487] configure script for Solaris. --- sysdeps/unix/sysv/sysv4/solaris2/configure | 31 +++++++++++++++++ sysdeps/unix/sysv/sysv4/solaris2/configure.in | 33 +++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/solaris2/configure create mode 100644 sysdeps/unix/sysv/sysv4/solaris2/configure.in diff --git a/sysdeps/unix/sysv/sysv4/solaris2/configure b/sysdeps/unix/sysv/sysv4/solaris2/configure new file mode 100644 index 0000000000..9dc976812c --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/solaris2/configure @@ -0,0 +1,31 @@ + # Local configure fragment for sysdeps/unix/sysv/sysv4/solaris2 + +# Concensus on stdio is that it's broken. +test $stdio = default && stdio=libio + +# Crypt is your friend. +case $add_ons in + *crypt*) + message= + ;; + *) + message="\ +*** WARNING: +*** Are you sure you do not want to use the \`crypt' add-on?" + ;; +esac + +if test "$message"; then + if test $enable_sanity = yes; then + echo "\ +*** You should not compile the GNU libc without the \`crypt' add-on. +*** Not using them risks to be incompatible with the libraries of +*** other systems. Consider getting the add-on and restart the +*** configuration. +*** If you reall mean to avoid this add-on run configure again, now +*** using the extra parameter \`--disable-sanity-checks'." + exit 1 + else + echo "$message" + fi +fi diff --git a/sysdeps/unix/sysv/sysv4/solaris2/configure.in b/sysdeps/unix/sysv/sysv4/solaris2/configure.in new file mode 100644 index 0000000000..1c02fbb499 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/solaris2/configure.in @@ -0,0 +1,33 @@ +sinclude(./aclocal.m4)dnl Autoconf lossage +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/unix/sysv/sysv4/solaris2 + +# Concensus on stdio is that it's broken. +test $stdio = default && stdio=libio + +# Crypt is your friend. +case $add_ons in + *crypt*) + message= + ;; + *) + message="\ +*** WARNING: +*** Are you sure you do not want to use the \`crypt' add-on?" + ;; +esac + +if test "$message"; then + if test $enable_sanity = yes; then + echo "\ +*** You should not compile the GNU libc without the \`crypt' add-on. +*** Not using them risks to be incompatible with the libraries of +*** other systems. Consider getting the add-on and restart the +*** configuration. +*** If you reall mean to avoid this add-on run configure again, now +*** using the extra parameter \`--disable-sanity-checks'." + exit 1 + else + echo "$message" + fi +fi From ac3b5c24b4af9e8eba00f6531380e849d7392460 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 29 Jan 1999 08:03:49 +0000 Subject: [PATCH 1536/4487] We need to use a syscall. --- sysdeps/unix/sysv/linux/arm/vfork.S | 46 ----------------------------- 1 file changed, 46 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/arm/vfork.S diff --git a/sysdeps/unix/sysv/linux/arm/vfork.S b/sysdeps/unix/sysv/linux/arm/vfork.S deleted file mode 100644 index 4c2f1a2982..0000000000 --- a/sysdeps/unix/sysv/linux/arm/vfork.S +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (C) 1999 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Philip Blundell - - 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 - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include -#define _ERRNO_H 1 -#include -#define _SIGNAL_H -#include - -#define CLONE_VM 0x00000100 /* Set if VM shared between processes. */ -#define CLONE_VFORK 0x00004000 /* Set if the parent wants the child to - wake it up on mm_release. */ - -/* Clone the calling process, but without copying the whole address space. - The calling process is suspended until the new process exits or is - replaced by a call to `execve'. Return -1 for errors, 0 to the new process, - and the process ID of the new process to the old process. */ - -ENTRY (__vfork) - mov a1, $SIGCLD - orr a1, a1, $(CLONE_VM | CLONE_VFORK) - mov a2, $0 - swi SYS_ify(clone) - cmn a1, $4096 - bhs PLTJMP(C_SYMBOL_NAME(__syscall_error)) - RETINSTR(mov, pc, lr) - -PSEUDO_END (__vfork) - -weak_alias (__vfork, vfork) From a87b0e3624267638026c10120cb80d72006585ab Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 29 Jan 1999 09:06:03 +0000 Subject: [PATCH 1537/4487] m68k specific export and versioning list. --- sysdeps/m68k/Versions | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sysdeps/m68k/Versions diff --git a/sysdeps/m68k/Versions b/sysdeps/m68k/Versions new file mode 100644 index 0000000000..2b020f8f58 --- /dev/null +++ b/sysdeps/m68k/Versions @@ -0,0 +1,6 @@ +libc { + GLIBC_2.0 { + # Functions from libgcc. + __divdi3; __moddi3; __udivdi3; __umoddi3; + } +} From 068bbaf6e03542833233fb8789481e0ac05c8768 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 29 Jan 1999 10:57:31 +0000 Subject: [PATCH 1538/4487] (__floorf): Don't depend on inlining, duplicate the code. --- sysdeps/alpha/fpu/s_floorf.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/fpu/s_floorf.c b/sysdeps/alpha/fpu/s_floorf.c index d25643d19e..7502b6781e 100644 --- a/sysdeps/alpha/fpu/s_floorf.c +++ b/sysdeps/alpha/fpu/s_floorf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson. @@ -29,7 +29,27 @@ float __floorf (float x) { - return __i_floorf(x); + /* Check not zero since floor(-0) == -0. */ + if (x != 0 && fabsf (x) < 16777216.0f) /* 1 << FLT_MANT_DIG */ + { + /* Note that Alpha S_Floating is stored in registers in a + restricted T_Floating format, so we don't even need to + convert back to S_Floating in the end. The initial + conversion to T_Floating is needed to handle denormals. */ + + float __tmp1, __tmp2; + + __asm ("cvtst/s %3,%2\n\t" +#ifdef _IEEE_FP_INEXACT + "cvttq/svim %2,%1\n\t" +#else + "cvttq/svm %2,%1\n\t" +#endif + "cvtqt/m %1,%0\n\t" + : "=f"(x), "=&f"(__tmp1), "=&f"(__tmp2) + : "f"(x)); + } + return x; } weak_alias (__floorf, floorf) From f8aa49875333b3ce3f790a407b0597601f233a1a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 29 Jan 1999 10:57:47 +0000 Subject: [PATCH 1539/4487] (__floor): Don't depend on inlining, duplicate the code. --- sysdeps/alpha/fpu/s_floor.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/fpu/s_floor.c b/sysdeps/alpha/fpu/s_floor.c index 7b647923e2..c7e14662fe 100644 --- a/sysdeps/alpha/fpu/s_floor.c +++ b/sysdeps/alpha/fpu/s_floor.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson. @@ -29,7 +29,20 @@ double __floor (double x) { - return __i_floor(x); + if (x != 0 && fabs (x) < 9007199254740992.0) /* 1 << DBL_MANT_DIG */ + { + double __tmp1; + __asm ( +#ifdef _IEEE_FP_INEXACT + "cvttq/svim %2,%1\n\t" +#else + "cvttq/svm %2,%1\n\t" +#endif + "cvtqt/m %1,%0\n\t" + : "=f"(x), "=&f"(__tmp1) + : "f"(x)); + } + return x; } weak_alias (__floor, floor) From 92a38c359c748628f33f1352675610755724dbc7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 29 Jan 1999 16:55:14 +0000 Subject: [PATCH 1540/4487] (__floor): Copy commentary from bits/mathinclude.h. Kill unused defines. --- sysdeps/alpha/fpu/s_floor.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sysdeps/alpha/fpu/s_floor.c b/sysdeps/alpha/fpu/s_floor.c index c7e14662fe..146e19b35a 100644 --- a/sysdeps/alpha/fpu/s_floor.c +++ b/sysdeps/alpha/fpu/s_floor.c @@ -17,18 +17,17 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef __USE_EXTERN_INLINES -#define __USE_EXTERN_INLINES -#endif -#define __floor __i_floor - #include -#undef __floor + +/* Use the -inf rounding mode conversion instructions to implement + floor. We note when the exponent is large enough that the value + must be integral, as this avoids unpleasant integer overflows. */ double __floor (double x) { + /* Check not zero since floor(-0) == -0. */ if (x != 0 && fabs (x) < 9007199254740992.0) /* 1 << DBL_MANT_DIG */ { double __tmp1; From 8380d4887d3332ea9579615aa0726e6e17ed24ca Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 29 Jan 1999 16:56:01 +0000 Subject: [PATCH 1541/4487] (__floorf): Copy commentary from bits/mathinclude.h. Kill unused defines. --- sysdeps/alpha/fpu/s_floorf.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/sysdeps/alpha/fpu/s_floorf.c b/sysdeps/alpha/fpu/s_floorf.c index 7502b6781e..9e693642dd 100644 --- a/sysdeps/alpha/fpu/s_floorf.c +++ b/sysdeps/alpha/fpu/s_floorf.c @@ -17,14 +17,12 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef __USE_EXTERN_INLINES -#define __USE_EXTERN_INLINES -#endif -#define __floorf __i_floorf - #include -#undef __floorf + +/* Use the -inf rounding mode conversion instructions to implement + floor. We note when the exponent is large enough that the value + must be integral, as this avoids unpleasant integer overflows. */ float __floorf (float x) @@ -37,7 +35,7 @@ __floorf (float x) convert back to S_Floating in the end. The initial conversion to T_Floating is needed to handle denormals. */ - float __tmp1, __tmp2; + float tmp1, tmp2; __asm ("cvtst/s %3,%2\n\t" #ifdef _IEEE_FP_INEXACT @@ -46,7 +44,7 @@ __floorf (float x) "cvttq/svm %2,%1\n\t" #endif "cvtqt/m %1,%0\n\t" - : "=f"(x), "=&f"(__tmp1), "=&f"(__tmp2) + : "=f"(x), "=&f"(tmp1), "=&f"(tmp2) : "f"(x)); } return x; From a3289ba5e8861eb6c7485bcdc1d72b0500a35746 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 29 Jan 1999 16:57:43 +0000 Subject: [PATCH 1542/4487] Atomic operation functions for Alpha. --- sysdeps/alpha/atomicity.h | 102 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 sysdeps/alpha/atomicity.h diff --git a/sysdeps/alpha/atomicity.h b/sysdeps/alpha/atomicity.h new file mode 100644 index 0000000000..34a538f4c0 --- /dev/null +++ b/sysdeps/alpha/atomicity.h @@ -0,0 +1,102 @@ +/* Low-level functions for atomic operations. Alpha version. + Copyright (C) 1999 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _ATOMICITY_H +#define _ATOMICITY_H 1 + +#include + + +static inline int +__attribute__ ((unused)) +exchange_and_add (volatile uint32_t *mem, int val) +{ + register int result, tmp; + + __asm__ __volatile__ ( + "/* Inline exchange & add */\n" + "1:\t" + "ldl_l %0,%3\n\t" + "addl %0,%4,%1\n\t" + "stl_c %1,%2\n\t" + "beq %1,2f\n" + ".subsection 2\n" + "2:\t" + "br 1b\n" + ".subsection 1\n\t" + "mb\n\t" + "/* End exchange & add */" + : "=&r"(result), "=&r"(tmp), "=m"(*mem) + : "m" (*mem), "r"(val)); + + return result; +} + +static inline void +__attribute__ ((unused)) +atomic_add (volatile uint32_t *mem, int val) +{ + register int result; + + __asm__ __volatile__ ( + "/* Inline exchange & add */\n" + "1:\t" + "ldl_l %0,%2\n\t" + "addl %0,%3,%0\n\t" + "stl_c %0,%1\n\t" + "beq %0,2f\n\t" + ".subsection 2\n" + "2:\t" + "br 1b\n" + ".subsection 1\n\t" + "mb\n\t" + "/* End exchange & add */" + : "=&r"(result), "=m"(*mem) + : "m" (*mem), "r"(val)); +} + +static inline long +__attribute__ ((unused)) +compare_and_swap (volatile long int *p, long int oldval, long int newval) +{ + long int ret; + + __asm__ __volatile__ ( + "/* Inline compare & swap */\n" + "1:\t" + "ldq_l %0,%4\n\t" + "cmpeq %0,%2,%0\n\t" + "beq %0,3f\n\t" + "mov %3,%0\n\t" + "stq_c %0,%1\n\t" + "beq %0,2f\n\t" + ".subsection 2\n" + "2:\t" + "br 1b\n" + ".subsection 1\n\t" + "3:\t" + "mb\n\t" + "/* End compare & swap */" + : "=&r"(ret), "=m"(*p) + : "r"(oldval), "r"(newval), "m"(*p)); + + return ret; +} + +#endif /* atomicity.h */ From 2bad373511150e3cedbbfa9c2319dd3087945118 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 7 Feb 1999 12:44:06 +0000 Subject: [PATCH 1543/4487] Add alias _Exit. --- sysdeps/standalone/i386/force_cpu386/_exit.c | 3 ++- sysdeps/standalone/i960/nindy960/_exit.c | 3 ++- sysdeps/standalone/m68k/m68020/mvme136/_exit.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sysdeps/standalone/i386/force_cpu386/_exit.c b/sysdeps/standalone/i386/force_cpu386/_exit.c index 455dc0e7b8..5f9e5e3116 100644 --- a/sysdeps/standalone/i386/force_cpu386/_exit.c +++ b/sysdeps/standalone/i386/force_cpu386/_exit.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1997, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), On-Line Applications Research Corporation. @@ -36,6 +36,7 @@ _exit (status) /* status is ignored */ Bsp_cleanup(); } +weak_alias (_exit, _Exit) #ifdef HAVE_GNU_LD diff --git a/sysdeps/standalone/i960/nindy960/_exit.c b/sysdeps/standalone/i960/nindy960/_exit.c index e56dcc07a4..8ca6e78e80 100644 --- a/sysdeps/standalone/i960/nindy960/_exit.c +++ b/sysdeps/standalone/i960/nindy960/_exit.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1997, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), On-Line Applications Research Corporation. @@ -43,6 +43,7 @@ _exit (status) * application if the user types "go". */ } +weak_alias (_exit, _Exit) #ifdef HAVE_GNU_LD diff --git a/sysdeps/standalone/m68k/m68020/mvme136/_exit.c b/sysdeps/standalone/m68k/m68020/mvme136/_exit.c index d45e52d41d..ecd93db129 100644 --- a/sysdeps/standalone/m68k/m68020/mvme136/_exit.c +++ b/sysdeps/standalone/m68k/m68020/mvme136/_exit.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1997, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), On-Line Applications Research Corporation. @@ -47,3 +47,4 @@ _exit (status) M68Kvec[ 45 ] = __exit_trap; /* install exit_trap handler */ asm volatile( "trap #13" ); /* insures SUPV mode */ } +weak_alias (_exit, _Exit) From 4fb65d7fc7cd5732f3b88a758a28c15c9d329e81 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 8 Feb 1999 10:02:37 +0000 Subject: [PATCH 1544/4487] (TRAMPOLINE_TEMPLATE): Save and restore all call-clobbered fp regs. --- sysdeps/alpha/dl-machine.h | 139 +++++++++++++++++++++++++------------ 1 file changed, 93 insertions(+), 46 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index b63661f6f3..d351e9dccc 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -134,31 +134,55 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) .globl " #tramp_name " .ent " #tramp_name " " #tramp_name ": - lda $sp, -168($sp) - .frame $sp, 168, $26 + lda $sp, -44*8($sp) + .frame $sp, 44*8, $26 /* Preserve all integer registers that C normally doesn't. */ - stq $26, 0($sp) - stq $0, 8($sp) - stq $1, 16($sp) - stq $2, 24($sp) - stq $3, 32($sp) - stq $4, 40($sp) - stq $5, 48($sp) - stq $6, 56($sp) - stq $7, 64($sp) - stq $8, 72($sp) - stq $16, 80($sp) - stq $17, 88($sp) - stq $18, 96($sp) - stq $19, 104($sp) - stq $20, 112($sp) - stq $21, 120($sp) - stq $22, 128($sp) - stq $23, 136($sp) - stq $24, 144($sp) - stq $25, 152($sp) - stq $29, 160($sp) - .mask 0x27ff01ff, -168 + stq $26, 0*8($sp) + stq $0, 1*8($sp) + stq $1, 2*8($sp) + stq $2, 3*8($sp) + stq $3, 4*8($sp) + stq $4, 5*8($sp) + stq $5, 6*8($sp) + stq $6, 7*8($sp) + stq $7, 8*8($sp) + stq $8, 9*8($sp) + stq $16, 10*8($sp) + stq $17, 11*8($sp) + stq $18, 12*8($sp) + stq $19, 13*8($sp) + stq $20, 14*8($sp) + stq $21, 15*8($sp) + stq $22, 16*8($sp) + stq $23, 17*8($sp) + stq $24, 18*8($sp) + stq $25, 19*8($sp) + stq $29, 20*8($sp) + stt $f0, 21*8($sp) + stt $f1, 22*8($sp) + stt $f10, 23*8($sp) + stt $f11, 24*8($sp) + stt $f12, 25*8($sp) + stt $f13, 26*8($sp) + stt $f14, 27*8($sp) + stt $f15, 28*8($sp) + stt $f16, 29*8($sp) + stt $f17, 30*8($sp) + stt $f18, 31*8($sp) + stt $f19, 32*8($sp) + stt $f20, 33*8($sp) + stt $f21, 34*8($sp) + stt $f22, 35*8($sp) + stt $f23, 36*8($sp) + stt $f24, 37*8($sp) + stt $f25, 38*8($sp) + stt $f26, 39*8($sp) + stt $f27, 40*8($sp) + stt $f28, 41*8($sp) + stt $f29, 42*8($sp) + stt $f30, 43*8($sp) + .mask 0x27ff01ff, -44*8 + .fmask 0xfffffc03, -(44-21)*8 /* Set up our $gp */ br $gp, .+4 ldgp $gp, 0($gp) @@ -177,31 +201,54 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) /* Move the destination address into position. */ mov $0, $27 /* Restore program registers. */ - ldq $26, 0($sp) - ldq $0, 8($sp) - ldq $1, 16($sp) - ldq $2, 24($sp) - ldq $3, 32($sp) - ldq $4, 40($sp) - ldq $5, 48($sp) - ldq $6, 56($sp) - ldq $7, 64($sp) - ldq $8, 72($sp) - ldq $16, 80($sp) - ldq $17, 88($sp) - ldq $18, 96($sp) - ldq $19, 104($sp) - ldq $20, 112($sp) - ldq $21, 120($sp) - ldq $22, 128($sp) - ldq $23, 136($sp) - ldq $24, 144($sp) - ldq $25, 152($sp) - ldq $29, 160($sp) + ldq $26, 0*8($sp) + ldq $0, 1*8($sp) + ldq $1, 2*8($sp) + ldq $2, 3*8($sp) + ldq $3, 4*8($sp) + ldq $4, 5*8($sp) + ldq $5, 6*8($sp) + ldq $6, 7*8($sp) + ldq $7, 8*8($sp) + ldq $8, 9*8($sp) + ldq $16, 10*8($sp) + ldq $17, 11*8($sp) + ldq $18, 12*8($sp) + ldq $19, 13*8($sp) + ldq $20, 14*8($sp) + ldq $21, 15*8($sp) + ldq $22, 16*8($sp) + ldq $23, 17*8($sp) + ldq $24, 18*8($sp) + ldq $25, 19*8($sp) + ldq $29, 20*8($sp) + ldt $f0, 21*8($sp) + ldt $f1, 22*8($sp) + ldt $f10, 23*8($sp) + ldt $f11, 24*8($sp) + ldt $f12, 25*8($sp) + ldt $f13, 26*8($sp) + ldt $f14, 27*8($sp) + ldt $f15, 28*8($sp) + ldt $f16, 29*8($sp) + ldt $f17, 30*8($sp) + ldt $f18, 31*8($sp) + ldt $f19, 32*8($sp) + ldt $f20, 33*8($sp) + ldt $f21, 34*8($sp) + ldt $f22, 35*8($sp) + ldt $f23, 36*8($sp) + ldt $f24, 37*8($sp) + ldt $f25, 38*8($sp) + ldt $f26, 39*8($sp) + ldt $f27, 40*8($sp) + ldt $f28, 41*8($sp) + ldt $f29, 42*8($sp) + ldt $f30, 43*8($sp) /* Flush the Icache after having modified the .plt code. */ " #IMB " /* Clean up and turn control to the destination */ - lda $sp, 168($sp) + lda $sp, 44*8($sp) jmp $31, ($27) .end " #tramp_name) From 864e156e88410edbfcc53813cf5d372a74e78ce0 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 8 Feb 1999 10:11:50 +0000 Subject: [PATCH 1545/4487] Add missing RT signal definitions. --- sysdeps/unix/sysv/linux/alpha/bits/signum.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/signum.h b/sysdeps/unix/sysv/linux/alpha/bits/signum.h index 44c3374e6c..0d5452dc30 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/signum.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/signum.h @@ -1,5 +1,5 @@ /* Signal number definitions. Linux/Alpha version. - Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 1999 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 @@ -71,4 +71,12 @@ #define _NSIG 64 /* Biggest signal number + 1. */ +#define SIGRTMIN (__libc_current_sigrtmin ()) +#define SIGRTMAX (__libc_current_sigrtmax ()) + +/* These are the hard limits of the kernel. These values should not be + used directly at user level. */ +#define __SIGRTMIN 32 +#define __SIGRTMAX (_NSIG - 1) + #endif /* included. */ From 7a1ccf774403a23ee581c13329734b9c8ed8076f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 10 Feb 1999 11:33:31 +0000 Subject: [PATCH 1546/4487] Change __ino64_t to 64 bits. --- sysdeps/unix/sysv/linux/mips/bits/types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h index 36a1e0e0e3..9828066178 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/types.h +++ b/sysdeps/unix/sysv/linux/mips/bits/types.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 92, 94, 95, 96, 97, 98 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,94,95,96,97,98,99 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 @@ -132,7 +132,7 @@ typedef __u_long __fsfilcnt_t; typedef __u_quad_t __fsfilcnt64_t; /* Type of file serial numbers. */ -typedef __u_long __ino64_t; +typedef __u_quad_t __ino64_t; /* Type of file sizes and offsets. */ typedef __loff_t __off64_t; From fdf595bb492fe768cf269ae9e3067ba229306284 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 11 Feb 1999 12:00:52 +0000 Subject: [PATCH 1547/4487] Undo last patch. --- sysdeps/unix/sysv/linux/mips/bits/types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h index 9828066178..36a1e0e0e3 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/types.h +++ b/sysdeps/unix/sysv/linux/mips/bits/types.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,92,94,95,96,97,98,99 Free Software Foundation, Inc. +/* Copyright (C) 1991, 92, 94, 95, 96, 97, 98 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 @@ -132,7 +132,7 @@ typedef __u_long __fsfilcnt_t; typedef __u_quad_t __fsfilcnt64_t; /* Type of file serial numbers. */ -typedef __u_quad_t __ino64_t; +typedef __u_long __ino64_t; /* Type of file sizes and offsets. */ typedef __loff_t __off64_t; From 02c1ba5bdf81445777452bd7e099fd2aa55e035a Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 13 Feb 1999 16:51:29 +0000 Subject: [PATCH 1548/4487] * sysdeps/m68k/fpu/s_modf.c: Optimized by using __m81_test instead of separare explicit comparisons. --- sysdeps/m68k/fpu/s_modf.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sysdeps/m68k/fpu/s_modf.c b/sysdeps/m68k/fpu/s_modf.c index 6c2449aa56..52ee64caad 100644 --- a/sysdeps/m68k/fpu/s_modf.c +++ b/sysdeps/m68k/fpu/s_modf.c @@ -33,15 +33,18 @@ float_type s(__modf) (float_type x, float_type *iptr) { float_type x_int, result; + unsigned long x_cond; + __asm ("fintrz%.x %1, %0" : "=f" (x_int) : "f" (x)); *iptr = x_int; - if (m81(__isinf) (x)) + x_cond = __m81_test (x); + if (x_cond & __M81_COND_INF) { result = 0; - if (x < 0) + if (x_cond & __M81_COND_NEG) result = -result; } - else if (x == 0) + else if (x_cond & __M81_COND_ZERO) result = x; else result = x - x_int; From 93835354421b51653f63a70e5c743a66f7d97d97 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 16 Feb 1999 09:35:56 +0000 Subject: [PATCH 1549/4487] Fix typo. Remove __setfpucw. --- sysdeps/mips/fpu_control.h | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/sysdeps/mips/fpu_control.h b/sysdeps/mips/fpu_control.h index 471c68e413..789a614973 100644 --- a/sysdeps/mips/fpu_control.h +++ b/sysdeps/mips/fpu_control.h @@ -1,5 +1,5 @@ /* FPU control word bits. Mips version. - Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Olaf Flebbe and Ralf Baechle. @@ -52,7 +52,7 @@ * Rounding Control: * 00 - rounding to nearest (RN) * 01 - rounding toward zero (RZ) - * 01 - rounding (up) toward plus infinity (RP) + * 10 - rounding (up) toward plus infinity (RP) * 11 - rounding (down)toward minus infinity (RM) */ @@ -95,12 +95,4 @@ typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__HI__))); /* Default control word set at startup. */ extern fpu_control_t __fpu_control; -__BEGIN_DECLS - -/* Called at startup. It can be used to manipulate the fpu control - register. */ -extern void __setfpucw __P ((fpu_control_t)); - -__END_DECLS - #endif /* fpu_control.h */ From 42bda2c45336f8a110ba83ee7d250889dbfb1159 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 16 Feb 1999 12:13:56 +0000 Subject: [PATCH 1550/4487] (_sys_errlist): Fix typo. --- sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c b/sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c index 37f003bda1..5d642e47f1 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c @@ -177,7 +177,7 @@ const char *const _sys_errlist[] = N_("No route to host"), N_("Operation already in progress"), N_("Operation now in progress"), - N_("Stale NFS file handle)" + N_("Stale NFS file handle") }; weak_alias (_sys_errlist, sys_errlist) From 1d32500284b17fa9b559dcc9f40663e8025560ce Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 16 Feb 1999 15:13:16 +0000 Subject: [PATCH 1551/4487] Fix typo. --- sysdeps/mips/bits/dlfcn.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/mips/bits/dlfcn.h b/sysdeps/mips/bits/dlfcn.h index c105537dfd..8477b53e81 100644 --- a/sysdeps/mips/bits/dlfcn.h +++ b/sysdeps/mips/bits/dlfcn.h @@ -1,5 +1,5 @@ -/* System dependand definitions for run-time dynamic loading. - Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* System dependent definitions for run-time dynamic loading. + Copyright (C) 1996, 1997, 1999 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 From 3e3649f6e281d7a3b8c69e3484bb06a2d60a23e6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 20 Feb 1999 14:56:45 +0000 Subject: [PATCH 1552/4487] (elf_machine_fixup_plt): DT_JMPREL and DT_PLTGOT entries are already relocated. (elf_machine_rela): Likewise for DT_SYMTAB. --- sysdeps/alpha/dl-machine.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index d351e9dccc..6e11380774 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. Alpha version. - Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson . @@ -350,8 +350,8 @@ elf_machine_fixup_plt(struct link_map *l, const Elf64_Rela *reloc, /* Recover the PLT entry address by calculating reloc's index into the .rela.plt, and finding that entry in the .plt. */ - rela_plt = (void *)(l->l_addr + l->l_info[DT_JMPREL]->d_un.d_ptr); - plte = (void *)(l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr + 32); + rela_plt = (void *) l->l_info[DT_JMPREL]->d_un.d_ptr; + plte = (void *) (l->l_info[DT_PLTGOT]->d_un.d_ptr + 32); plte += 3 * (reloc - rela_plt); /* Find the displacement from the plt entry to the function. */ @@ -481,7 +481,7 @@ elf_machine_rela (struct link_map *map, than the dynamic linker's built-in definitions used while loading those libraries. */ const Elf64_Sym *const dlsymtab - = (void *)(map->l_addr + map->l_info[DT_SYMTAB]->d_un.d_ptr); + = (void *) map->l_info[DT_SYMTAB]->d_un.d_ptr; sym_value -= map->l_addr; sym_value -= dlsymtab[ELF64_R_SYM(reloc->r_info)].st_value; sym_value -= reloc->r_addend; From 44bff568045ce9d3d8471ee5f27803e93a2149a8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 20 Feb 1999 14:57:43 +0000 Subject: [PATCH 1553/4487] (elf_machine_rel): DT_STRTAB is already relocated. --- sysdeps/arm/dl-machine.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index b8a1e19359..e443711fba 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. ARM version. - Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997, 1998, 1999 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 @@ -405,8 +405,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, { const char *strtab; - strtab = ((const char *) map->l_addr - + map->l_info[DT_STRTAB]->d_un.d_ptr); + strtab = (const void *) map->l_info[DT_STRTAB]->d_un.d_ptr; _dl_sysdep_error (_dl_argv[0] ?: "", ": Symbol `", strtab + refsym->st_name, "' has different size in shared object, " @@ -417,9 +416,9 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, break; case R_ARM_GLOB_DAT: case R_ARM_JUMP_SLOT: -#ifdef RTLD_BOOTSTRAP +#ifdef RTLD_BOOTSTRAP /* Fix weak undefined references. */ - if (sym != NULL && sym->st_value == 0) + if (sym != NULL && sym->st_value == 0) *reloc_addr = 0; else #endif From a2790a3c68e2f17ad5a92d41465abe8829569888 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 20 Feb 1999 14:58:50 +0000 Subject: [PATCH 1554/4487] (elf_machine_rela): DT_STRTAB is already relocated. --- sysdeps/m68k/dl-machine.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index f2fe553069..8ce24a7f63 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. m68k version. - Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 1999 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 @@ -277,8 +277,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, extern char **_dl_argv; const char *strtab; - strtab = ((void *) map->l_addr - + map->l_info[DT_STRTAB]->d_un.d_ptr); + strtab = (const void *) map->l_info[DT_STRTAB]->d_un.d_ptr; _dl_sysdep_error (_dl_argv[0] ?: "", ": Symbol `", strtab + refsym->st_name, "' has different size in shared object, " From 3aa76df33462705bbc45ce0f8bacc5630c30ed18 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 20 Feb 1999 15:00:01 +0000 Subject: [PATCH 1555/4487] (elf_machine_got_rel): Likewise. (elf_machine_got_rel): Likewise for DT_SYMTAB and DT_STRTAB. --- sysdeps/mips/dl-machine.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 77b8c4e18f..749ea00170 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. MIPS version. - Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Kazumoto Kojima . @@ -144,8 +144,7 @@ elf_machine_got_rel (struct link_map *map, int lazy) ElfW(Addr) *got; ElfW(Sym) *sym; int i, n; - const char *strtab - = ((void *) map->l_addr + map->l_info[DT_STRTAB]->d_un.d_ptr); + const char *strtab = (const void *) map->l_info[DT_STRTAB]->d_un.d_ptr; #define RESOLVE_GOTSYM(sym) \ ({ \ @@ -170,8 +169,7 @@ elf_machine_got_rel (struct link_map *map, int lazy) /* Handle global got entries. */ got += n; - sym = (ElfW(Sym) *) ((void *) map->l_addr - + map->l_info[DT_SYMTAB]->d_un.d_ptr); + sym = (void *) map->l_info[DT_SYMTAB]->d_un.d_ptr; sym += map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val; i = (map->l_info[DT_MIPS (SYMTABNO)]->d_un.d_val - map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val); @@ -348,9 +346,9 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \ { \ struct link_map *l = elf_machine_runtime_link_map (old_gpreg, stub_pc); \ const ElfW(Sym) *const symtab \ - = (const ElfW(Sym) *) (l->l_addr + l->l_info[DT_SYMTAB]->d_un.d_ptr); \ + = (const void *) l->l_info[DT_SYMTAB]->d_un.d_ptr; \ const char *strtab \ - = (void *) (l->l_addr + l->l_info[DT_STRTAB]->d_un.d_ptr); \ + = (const void *) l->l_info[DT_STRTAB]->d_un.d_ptr; \ const ElfW(Addr) *got \ = (const ElfW(Addr) *) (l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr); \ const ElfW(Word) local_gotno \ From e675032fec82b43337fde2840fdf1df0bb30b68a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 20 Feb 1999 18:22:38 +0000 Subject: [PATCH 1556/4487] (elf_machine_runtime_setup): DT_PLTGOT entry is already relocated. --- sysdeps/alpha/dl-machine.h | 2 +- sysdeps/m68k/dl-machine.h | 2 +- sysdeps/mips/dl-machine.h | 8 +++----- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 6e11380774..21059f5e4f 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -98,7 +98,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) /* The GOT entries for the functions in the PLT have not been filled in yet. Their initial contents are directed to the PLT which arranges for the dynamic linker to be called. */ - plt = l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr; + plt = l->l_info[DT_PLTGOT]->d_un.d_ptr; /* This function will be called to perform the relocation. */ if (!profile) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index 8ce24a7f63..afa68efe1b 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -80,7 +80,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) to push an offset into the .rela.plt section, push _GLOBAL_OFFSET_TABLE_[1], and then jump to _GLOBAL_OFFSET_TABLE_[2]. */ - got = (Elf32_Addr *) (l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr); + got = (Elf32_Addr *) l->l_info[DT_PLTGOT]->d_un.d_ptr; got[1] = (Elf32_Addr) l; /* Identify this shared object. */ /* The got[2] entry contains the address of a function which gets diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 749ea00170..6896e53546 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -156,8 +156,7 @@ elf_machine_got_rel (struct link_map *map, int lazy) (ref)? sym_loadaddr + ref->st_value: 0; \ }) - got = (ElfW(Addr) *) ((void *) map->l_addr - + map->l_info[DT_PLTGOT]->d_un.d_ptr); + got = (ElfW(Addr) *) map->l_info[DT_PLTGOT]->d_un.d_ptr; /* got[0] is reserved. got[1] is also reserved for the dynamic object generated by gnu ld. Skip these reserved entries from relocation. */ @@ -232,8 +231,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) Their initial contents will arrange when called to put an offset into the .dynsym section in t8, the return address in t7 and then jump to _GLOBAL_OFFSET_TABLE[0]. */ - got = (ElfW(Addr) *) ((void *) l->l_addr - + l->l_info[DT_PLTGOT]->d_un.d_ptr); + got = (ElfW(Addr) *) l->l_info[DT_PLTGOT]->d_un.d_ptr; /* This function will get called to fix up the GOT entry indicated by the register t8, and then jump to the resolved address. */ @@ -350,7 +348,7 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \ const char *strtab \ = (const void *) l->l_info[DT_STRTAB]->d_un.d_ptr; \ const ElfW(Addr) *got \ - = (const ElfW(Addr) *) (l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr); \ + = (const ElfW(Addr) *) l->l_info[DT_PLTGOT]->d_un.d_ptr; \ const ElfW(Word) local_gotno \ = (const ElfW(Word)) l->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; \ const ElfW(Word) gotsym \ From 963048adc594a58b83ff451ae319dad1f75c5c6c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 20 Feb 1999 18:25:14 +0000 Subject: [PATCH 1557/4487] (elf_machine_runtime_setup): DT_PLTGOT entry is already relocated. (__dl_runtime_resolve): Likewise. --- sysdeps/mips/mips64/dl-machine.h | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h index 1045da15b6..e2b62b8199 100644 --- a/sysdeps/mips/mips64/dl-machine.h +++ b/sysdeps/mips/mips64/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. MIPS version. - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Kazumoto Kojima . @@ -23,7 +23,7 @@ #define ELF_MACHINE_NAME "MIPS" -#define ELF_MACHINE_NO_PLT +#define ELF_MACHINE_NO_PLT #include #include @@ -144,8 +144,7 @@ elf_machine_got_rel (struct link_map *map, int lazy) ElfW(Addr) *got; ElfW(Sym) *sym; int i, n; - const char *strtab - = ((void *) map->l_addr + map->l_info[DT_STRTAB]->d_un.d_ptr); + const char *strtab = (const void *) map->l_info[DT_STRTAB]->d_un.d_ptr; #define RESOLVE_GOTSYM(sym) \ ({ \ @@ -157,8 +156,7 @@ elf_machine_got_rel (struct link_map *map, int lazy) (ref)? sym_loadaddr + ref->st_value: 0; \ }) - got = (ElfW(Addr) *) ((void *) map->l_addr - + map->l_info[DT_PLTGOT]->d_un.d_ptr); + got = (ElfW(Addr) *) map->l_info[DT_PLTGOT]->d_un.d_ptr; /* got[0] is reserved. got[1] is also reserved for the dynamic object generated by gnu ld. Skip these reserved entries from relocation. */ @@ -170,8 +168,7 @@ elf_machine_got_rel (struct link_map *map, int lazy) /* Handle global got entries. */ got += n; - sym = (ElfW(Sym) *) ((void *) map->l_addr - + map->l_info[DT_SYMTAB]->d_un.d_ptr); + sym = (ElfW(Sym) *) map->l_info[DT_SYMTAB]->d_un.d_ptr; sym += map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val; i = (map->l_info[DT_MIPS (SYMTABNO)]->d_un.d_val - map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val); @@ -234,8 +231,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) Their initial contents will arrange when called to put an offset into the .dynsym section in t8, the return address in t7 and then jump to _GLOBAL_OFFSET_TABLE[0]. */ - got = (ElfW(Addr) *) ((void *) l->l_addr - + l->l_info[DT_PLTGOT]->d_un.d_ptr); + got = (ElfW(Addr) *) l->l_info[DT_PLTGOT]->d_un.d_ptr; /* This function will get called to fix up the GOT entry indicated by the register t8, and then jump to the resolved address. */ @@ -348,11 +344,10 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \ { \ struct link_map *l = elf_machine_runtime_link_map (old_gpreg, stub_pc); \ const ElfW(Sym) *const symtab \ - = (const ElfW(Sym) *) (l->l_addr + l->l_info[DT_SYMTAB]->d_un.d_ptr); \ - const char *strtab \ - = (void *) (l->l_addr + l->l_info[DT_STRTAB]->d_un.d_ptr); \ + = (const ElfW(Sym) *) l->l_info[DT_SYMTAB]->d_un.d_ptr; \ + const char *strtab = (const void *) l->l_info[DT_STRTAB]->d_un.d_ptr; \ const ElfW(Addr) *got \ - = (const ElfW(Addr) *) (l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr); \ + = (const ElfW(Addr) *) l->l_info[DT_PLTGOT]->d_un.d_ptr; \ const ElfW(Word) local_gotno \ = (const ElfW(Word)) l->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; \ const ElfW(Word) gotsym \ From df019d9428ba9c0c2e234d5269c7869982a3b4bf Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 1 Mar 1999 07:20:35 +0000 Subject: [PATCH 1558/4487] (ucontext): Rename field uc_links to uc_link which is the right name according to Unix98. --- sysdeps/arm/sys/ucontext.h | 4 ++-- sysdeps/m68k/sys/ucontext.h | 4 ++-- sysdeps/mips/sys/ucontext.h | 4 ++-- sysdeps/unix/sysv/linux/alpha/sys/ucontext.h | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sysdeps/arm/sys/ucontext.h b/sysdeps/arm/sys/ucontext.h index 70af80fa47..999c01c417 100644 --- a/sysdeps/arm/sys/ucontext.h +++ b/sysdeps/arm/sys/ucontext.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999 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 @@ -85,7 +85,7 @@ typedef struct typedef struct ucontext { unsigned long int uc_flags; - struct ucontext *uc_links; + struct ucontext *uc_link; __sigset_t uc_sigmask; stack_t uc_stack; mcontext_t uc_mcontext; diff --git a/sysdeps/m68k/sys/ucontext.h b/sysdeps/m68k/sys/ucontext.h index 4776e7d821..1acfee41df 100644 --- a/sysdeps/m68k/sys/ucontext.h +++ b/sysdeps/m68k/sys/ucontext.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1999 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 @@ -98,7 +98,7 @@ typedef struct typedef struct ucontext { unsigned long int uc_flags; - struct ucontext *uc_links; + struct ucontext *uc_link; __sigset_t uc_sigmask; stack_t uc_stack; mcontext_t uc_mcontext; diff --git a/sysdeps/mips/sys/ucontext.h b/sysdeps/mips/sys/ucontext.h index f177cad121..741fb28df7 100644 --- a/sysdeps/mips/sys/ucontext.h +++ b/sysdeps/mips/sys/ucontext.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999 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 @@ -134,7 +134,7 @@ typedef struct typedef struct ucontext { unsigned long int uc_flags; - struct ucontext *uc_links; + struct ucontext *uc_link; __sigset_t uc_sigmask; stack_t uc_stack; mcontext_t uc_mcontext; diff --git a/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h b/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h index 349dd1e2a2..08eeb6e4a2 100644 --- a/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999 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 @@ -31,7 +31,7 @@ typedef struct sigcontext mcontext_t; typedef struct ucontext { unsigned long int uc_flags; - struct ucontext *uc_links; + struct ucontext *uc_link; unsigned long __uc_osf_sigmask; stack_t uc_stack; mcontext_t uc_mcontext; From a96af7b96e2cc213d000164746189eef058d474f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 2 Mar 1999 08:06:57 +0000 Subject: [PATCH 1559/4487] (elf_machine_runtime_setup): DT_PLTGOT entry is already relocated. --- sysdeps/arm/dl-machine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index e443711fba..aff8df2238 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -88,7 +88,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) in. Their initial contents will arrange when called to push an index into the .got section, load ip with &_GLOBAL_OFFSET_TABLE_[3], and then jump to _GLOBAL_OFFSET_TABLE[2]. */ - got = (Elf32_Addr *) (l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr); + got = (Elf32_Addr *) l->l_info[DT_PLTGOT]->d_un.d_ptr; got[1] = (Elf32_Addr) l; /* Identify this shared object. */ /* The got[2] entry contains the address of a function which gets From d1227256003b57c34f59a705ca134f9a2f8fa660 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 8 Mar 1999 21:39:15 +0000 Subject: [PATCH 1560/4487] m68k specific strtold wrapper. --- sysdeps/m68k/strtold.c | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sysdeps/m68k/strtold.c diff --git a/sysdeps/m68k/strtold.c b/sysdeps/m68k/strtold.c new file mode 100644 index 0000000000..dd7fbce195 --- /dev/null +++ b/sysdeps/m68k/strtold.c @@ -0,0 +1,2 @@ +#define DENORM_EXP (MIN_EXP - 1) +#include From 2838157b3d25bfa792eed48f9f915b36bdb4f019 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 10 Mar 1999 16:07:49 +0000 Subject: [PATCH 1561/4487] m68k specific function to print floating point numbers in hexadecimal format. --- sysdeps/m68k/printf_fphex.c | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sysdeps/m68k/printf_fphex.c diff --git a/sysdeps/m68k/printf_fphex.c b/sysdeps/m68k/printf_fphex.c new file mode 100644 index 0000000000..0e68b16b77 --- /dev/null +++ b/sysdeps/m68k/printf_fphex.c @@ -0,0 +1,2 @@ +#define LONG_DOUBLE_DENORM_BIAS IEEE854_LONG_DOUBLE_BIAS +#include From 2ac24faac88b624b04321f29bbedb97545a47b2f Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 19 Mar 1999 01:54:41 +0000 Subject: [PATCH 1562/4487] 1999-03-18 Philip Blundell * sysdeps/unix/sysv/linux/arm/getgroups.c: New file. Use the i386 implementation. --- sysdeps/unix/sysv/linux/arm/getgroups.c | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/getgroups.c diff --git a/sysdeps/unix/sysv/linux/arm/getgroups.c b/sysdeps/unix/sysv/linux/arm/getgroups.c new file mode 100644 index 0000000000..102ea24e14 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/getgroups.c @@ -0,0 +1,2 @@ +/* We also have to rewrite the kernel gid_t to the user land type. */ +#include From 3c3174b2ec92bf18f678895118c2348a2be7f029 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 12 Apr 1999 09:01:49 +0000 Subject: [PATCH 1563/4487] Delete inline implementations of strcpy and stpcpy. --- sysdeps/arm/bits/string.h | 125 +------------------------------------- 1 file changed, 1 insertion(+), 124 deletions(-) diff --git a/sysdeps/arm/bits/string.h b/sysdeps/arm/bits/string.h index 8dce456f39..4ca2e307a1 100644 --- a/sysdeps/arm/bits/string.h +++ b/sysdeps/arm/bits/string.h @@ -1,5 +1,5 @@ /* Optimized, inlined string functions. ARM version. - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1998, 1999 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,126 +25,3 @@ since they don't work on the ARM. */ #define _HAVE_STRING_ARCH_strcpy 1 #define _HAVE_STRING_ARCH_stpcpy 1 - -/* We only provide optimizations if GNU CC is used and this is a little - endian system (the code below does not work on big endian machines). - With current versions of GCC these optimi\ations produce quite a large - amount of code so we only enable them if the user specifically asked - for it. */ -#if !defined __NO_STRING_INLINES && defined __GNUC__ && __GNUC__ >= 2 \ - && !defined __ARMEB__ && defined __USE_STRING_INLINES - -/* Copy SRC to DEST. */ -#define strcpy(dest, src) \ - (__extension__ (__builtin_constant_p (src) \ - ? (__string2_1bptr_p (src) && strlen (src) + 1 <= 8 \ - ? __strcpy_small (dest, src, strlen (src) + 1) \ - : (char *) memcpy (dest, src, strlen (src) + 1)) \ - : strcpy (dest, src))) - -#define __strcpy_small(dest, src, srclen) \ - (__extension__ ({ char *__dest = (char *) (dest); \ - const char *__src = (const char *) (src); \ - size_t __srclen = (srclen); \ - switch (__srclen) \ - { \ - case 5: \ - *((unsigned long int *) __dest) = \ - *((const unsigned long int *) (__src)); \ - __dest += 4; \ - __src += 4; \ - case 1: \ - *__dest++ = '\0'; \ - break; \ - case 6: \ - *((unsigned long int *) __dest) = \ - *((const unsigned long int *) (__src)); \ - __dest += 4; \ - __src += 4; \ - case 2: \ - *((unsigned short int *) __dest) = \ - __src[0]; \ - __dest += 2; \ - break; \ - case 7: \ - *((unsigned long int *) __dest) = \ - *((const unsigned long int *) (__src)); \ - __dest += 4; \ - __src += 4; \ - case 3: \ - *((unsigned short int *) __dest) = \ - *((const unsigned short int *) (__src)); \ - __dest[2] = '\0'; \ - __dest += 3; \ - break; \ - case 8: \ - *((unsigned long int *) __dest) = \ - *((const unsigned long int *) (__src)); \ - __dest += 4; \ - __src += 4; \ - case 4: \ - *((unsigned long int *) __dest) = \ - *((const unsigned short int *) (__src)) | \ - (__src[2] << 16); \ - __dest += 4; \ - break; \ - } \ - (__dest - __srclen) ; })) - -/* Copy SRC to DEST, returning pointer to final NUL byte. */ -#define __stpcpy(dest, src) \ - (__extension__ (__builtin_constant_p (src) \ - ? (__string2_1bptr_p (src) && strlen (src) + 1 <= 8 \ - ? __stpcpy_small (dest, src, strlen (src) + 1) \ - : ((char *) __mempcpy (dest, src, strlen (src) + 1) - 1))\ - : __stpcpy (dest, src))) - -#define __stpcpy_small(dest, src, srclen) \ - (__extension__ ({ char *__dest = (char *) (dest); \ - const char *__src = (const char *) (src); \ - switch (srclen) \ - { \ - case 5: \ - *((unsigned long int *) __dest) = \ - *((const unsigned long int *) (__src)); \ - __dest += 4; \ - __src += 4; \ - case 1: \ - *__dest++ = '\0'; \ - break; \ - case 6: \ - *((unsigned long int *) __dest) = \ - *((const unsigned long int *) (__src)); \ - __dest += 4; \ - __src += 4; \ - case 2: \ - *((unsigned short int *) __dest) = \ - __src[0]; \ - __dest += 2; \ - break; \ - case 7: \ - *((unsigned long int *) __dest) = \ - *((const unsigned long int *) (__src)); \ - __dest += 4; \ - __src += 4; \ - case 3: \ - *((unsigned short int *) __dest) = \ - *((const unsigned short int *) (__src)); \ - __dest[2] = '\0'; \ - __dest += 3; \ - break; \ - case 8: \ - *((unsigned long int *) __dest) = \ - *((const unsigned long int *) (__src)); \ - __dest += 4; \ - __src += 4; \ - case 4: \ - *((unsigned long int *) __dest) = \ - *((const unsigned short int *) (__src)) | \ - (__src[2] << 16); \ - __dest += 4; \ - break; \ - } \ - __dest; })) - -#endif From 85fb60ef9e5d5f931d3cec1d3b11e2f416be7d97 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 12 Apr 1999 09:02:23 +0000 Subject: [PATCH 1564/4487] [$(subdir) = signal] (sysdep_routines): Add sigrestorer. --- sysdeps/unix/sysv/linux/arm/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile index d76698b405..99a560c859 100644 --- a/sysdeps/unix/sysv/linux/arm/Makefile +++ b/sysdeps/unix/sysv/linux/arm/Makefile @@ -4,5 +4,6 @@ endif ifeq ($(subdir),signal) sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \ - rt_sigqueueinfo rt_sigaction rt_sigpending + rt_sigqueueinfo rt_sigaction rt_sigpending \ + sigrestorer endif From 65e8edc76bc0fb61dfaf6f3bfa8b81b77f9a7053 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 12 Apr 1999 09:02:39 +0000 Subject: [PATCH 1565/4487] (_outw, _outb, _outl): Don't bother range checking the port number. --- sysdeps/unix/sysv/linux/arm/ioperm.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/ioperm.c b/sysdeps/unix/sysv/linux/arm/ioperm.c index 551fc97d0c..260226d9f3 100644 --- a/sysdeps/unix/sysv/linux/arm/ioperm.c +++ b/sysdeps/unix/sysv/linux/arm/ioperm.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Phil Blundell, based on the Alpha version by David Mosberger. @@ -214,9 +214,6 @@ _iopl (unsigned int level) void _outb (unsigned char b, unsigned long int port) { - if (port >= MAX_PORT) - return; - *((volatile unsigned char *)(IO_ADDR (port))) = b; } @@ -224,9 +221,6 @@ _outb (unsigned char b, unsigned long int port) void _outw (unsigned short b, unsigned long int port) { - if (port >= MAX_PORT) - return; - *((volatile unsigned short *)(IO_ADDR (port))) = b; } @@ -234,9 +228,6 @@ _outw (unsigned short b, unsigned long int port) void _outl (unsigned int b, unsigned long int port) { - if (port >= MAX_PORT) - return; - *((volatile unsigned long *)(IO_ADDR (port))) = b; } From 2761e5acd7cfd152c37ad0ee30b5499e79429520 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 12 Apr 1999 09:02:56 +0000 Subject: [PATCH 1566/4487] Don't rely on undefined compiler behaviour. --- sysdeps/unix/sysv/linux/arm/sigaction.c | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/sigaction.c b/sysdeps/unix/sysv/linux/arm/sigaction.c index 76399a2b7a..102d66595b 100644 --- a/sysdeps/unix/sysv/linux/arm/sigaction.c +++ b/sysdeps/unix/sysv/linux/arm/sigaction.c @@ -39,11 +39,14 @@ int __libc_missing_rt_sigs; #define SA_RESTORER 0x04000000 +extern void __default_sa_restorer(void); +extern void __default_rt_sa_restorer(void); + /* When RT signals are in use we need to use a different return stub. */ #ifdef __NR_rt_sigreturn #define choose_restorer(flags) \ - (flags & SA_SIGINFO) ? &&__default_rt_sa_restorer \ - : &&__default_sa_restorer + (flags & SA_SIGINFO) ? __default_rt_sa_restorer \ + : __default_sa_restorer #else #define choose_restorer(flags) \ &&__default_sa_restorer @@ -142,20 +145,6 @@ __sigaction (sig, act, oact) #endif } return result; - - /* If no SA_RESTORER function was specified by the application we use - this one. This avoids the need for the kernel to synthesise a return - instruction on the stack, which would involve expensive cache flushes. */ - __default_sa_restorer: - asm volatile ("swi %0" : : "i" (__NR_sigreturn)); - -#ifdef __NR_rt_sigreturn - __default_rt_sa_restorer: - asm volatile ("swi %0" : : "i" (__NR_rt_sigreturn)); -#endif - - /* NOTREACHED */ - return -1; } weak_alias (__sigaction, sigaction) From 2f091ace9da87cec5f22d606918e7a0f03ff2f1d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 12 Apr 1999 09:03:27 +0000 Subject: [PATCH 1567/4487] Signal termination function. --- sysdeps/unix/sysv/linux/arm/sigrestorer.S | 33 +++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/sigrestorer.S diff --git a/sysdeps/unix/sysv/linux/arm/sigrestorer.S b/sysdeps/unix/sysv/linux/arm/sigrestorer.S new file mode 100644 index 0000000000..8d32e4ce9c --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/sigrestorer.S @@ -0,0 +1,33 @@ +/* Copyright (C) 1999 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +/* If no SA_RESTORER function was specified by the application we use + one of these. This avoids the need for the kernel to synthesise a return + instruction on the stack, which would involve expensive cache flushes. */ + +ENTRY(__default_sa_restorer) + swi SYS_ify(sigreturn) + +#ifdef __NR_rt_sigreturn + +ENTRY(__default_rt_sa_restorer) + swi SYS_ify(rt_sigreturn) + +#endif From 74804c97db7530bb456be46cdcc56067481c49f0 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 12 Apr 1999 09:03:50 +0000 Subject: [PATCH 1568/4487] Linux/ARM vfork implementation. --- sysdeps/unix/sysv/linux/arm/vfork.S | 50 +++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/vfork.S diff --git a/sysdeps/unix/sysv/linux/arm/vfork.S b/sysdeps/unix/sysv/linux/arm/vfork.S new file mode 100644 index 0000000000..3d5bd95300 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/vfork.S @@ -0,0 +1,50 @@ +/* Copyright (C) 1999 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Philip Blundell . + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#define _ERRNO_H 1 +#include + +/* Clone the calling process, but without copying the whole address space. + The calling process is suspended until the new process exits or is + replaced by a call to `execve'. Return -1 for errors, 0 to the new process, + and the process ID of the new process to the old process. */ + +ENTRY (__vfork) + +#ifdef __NR_vfork + swi __NR_vfork + cmn a1, #4096 + RETINSTR(movcc, pc, lr) + + /* Check if vfork syscall is known at all. */ + ldr a2, =-ENOSYS + teq a1, a2 + bne PLTJMP(C_SYMBOL_NAME(__syscall_error)) +#endif + + /* If we don't have vfork, fork is close enough. */ + swi __NR_fork + cmn a1, #4096 + RETINSTR(movcc, pc, lr) + b PLTJMP(C_SYMBOL_NAME(__syscall_error)) + +PSEUDO_END (__vfork) + +weak_alias (__vfork, vfork) From a9b40c2a26d37e4d8d506d009b217d6746cf1f4c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 12 Apr 1999 09:04:12 +0000 Subject: [PATCH 1569/4487] (INLINE_SYSCALL): Include the syscall name in assembler output for ease of debugging. --- sysdeps/unix/sysv/linux/arm/sysdep.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index d7e28220a7..7812e99075 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -114,7 +114,7 @@ { \ register int _a1 asm ("a1"); \ LOAD_ARGS_##nr (args) \ - asm volatile ("swi %1" \ + asm volatile ("swi %1 @ syscall " #name \ : "=r" (_a1) \ : "i" (SYS_ify(name)) ASM_ARGS_##nr \ : "a1"); \ From 3b40f7d3d4c2691737e17df6729eda6e46a59a1f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 12 Apr 1999 09:04:34 +0000 Subject: [PATCH 1570/4487] Support big endian operation. --- sysdeps/arm/bits/endian.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysdeps/arm/bits/endian.h b/sysdeps/arm/bits/endian.h index 7fe486e89d..5e54cc7534 100644 --- a/sysdeps/arm/bits/endian.h +++ b/sysdeps/arm/bits/endian.h @@ -4,5 +4,9 @@ # error "Never use directly; include instead." #endif +#ifdef __ARMEB__ +#define __BYTE_ORDER __BIG_ENDIAN +#else #define __BYTE_ORDER __LITTLE_ENDIAN +#endif #define __FLOAT_WORD_ORDER __BIG_ENDIAN From 95084e8a4768dbbf78790d5425f1f2d058bc66f1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 14 Apr 1999 13:42:04 +0000 Subject: [PATCH 1571/4487] Socket calls could not be restarted after being interrupted by a signal. The parameters on the stack were corrupted by the signal handler. --- sysdeps/unix/sysv/linux/arm/socket.S | 35 +++++++++++++++++++++------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/socket.S b/sysdeps/unix/sysv/linux/arm/socket.S index b51d887a7f..92c7e907a2 100644 --- a/sysdeps/unix/sysv/linux/arm/socket.S +++ b/sysdeps/unix/sysv/linux/arm/socket.S @@ -35,12 +35,19 @@ #define __socket P(__,socket) #endif -#define PUSHARGS_1 stmfd ip!, {a1} -#define PUSHARGS_2 stmfd ip!, {a1, a2} -#define PUSHARGS_3 stmfd ip!, {a1, a2, a3} -#define PUSHARGS_4 stmfd ip!, {a1, a2, a3, a4} -#define PUSHARGS_5 stmfd ip!, {a1, a2, a3, a4} /* Caller has already pushed arg 5 */ -#define PUSHARGS_6 stmfd ip!, {a1, a2, a3, a4} +#define PUSHARGS_1 stmfd sp!, {a1} +#define PUSHARGS_2 stmfd sp!, {a1, a2} +#define PUSHARGS_3 stmfd sp!, {a1, a2, a3} +#define PUSHARGS_4 stmfd sp!, {a1, a2, a3, a4} +#define PUSHARGS_5 stmfd sp!, {a1, a2, a3, a4} /* Caller has already pushed arg 5 */ +#define PUSHARGS_6 stmfd sp!, {a1, a2, a3, a4} + +#define POPARGS_1 add sp, sp, #4 +#define POPARGS_2 add sp, sp, #8 +#define POPARGS_3 add sp, sp, #12 +#define POPARGS_4 add sp, sp, #16 +#define POPARGS_5 add sp, sp, #16 +#define POPARGS_6 add sp, sp, #16 #ifndef NARGS #define NARGS 3 /* If we were called with no wrapper, this is really socket() */ @@ -48,15 +55,27 @@ .globl __socket ENTRY (__socket) + /* This code previously moved sp into ip and stored the args using + stmdb ip!, {a1-a4}. It did not modify sp, so the stack never had + to be restored after the syscall completed. It saved an + instruction and meant no stack cleanup work was required. + + This will not work in the case of a socket call being interrupted + by a signal. If the signal handler uses any stack the arguments + to socket will be trashed. The results of a restart of any + socket call are then unpredictable. */ + /* Push args onto the stack. */ - mov ip, sp P(PUSHARGS_,NARGS) /* Do the system call trap. */ mov a1, $P(SOCKOP_,socket) - mov a2, ip + mov a2, sp swi SYS_ify(socketcall) + /* Pop args off the stack */ + P(POPARGS_,NARGS) + /* r0 is < 0 if there was an error. */ cmn r0, $124 bhs PLTJMP(syscall_error) From 45c6c04d8db529cb9b5d534e747318aac5f9334f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 14 Apr 1999 13:42:16 +0000 Subject: [PATCH 1572/4487] mmap calls could not be restarted after being interrupted by a signal. The parameters on the stack were corrupted by the signal handler. --- sysdeps/unix/sysv/linux/arm/mmap.S | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/mmap.S b/sysdeps/unix/sysv/linux/arm/mmap.S index f9a773fc68..fcff57c55d 100644 --- a/sysdeps/unix/sysv/linux/arm/mmap.S +++ b/sysdeps/unix/sysv/linux/arm/mmap.S @@ -26,10 +26,26 @@ ENTRY (__mmap) mmap() takes six, we need to build a parameter block and pass its address instead. The 386 port does a similar trick. */ - mov ip, sp - stmdb ip!, {a1-a4} - mov a1, ip + /* This code previously moved sp into ip and stored the args using + stmdb ip!, {a1-a4}. It did not modify sp, so the stack never had + to be restored after the syscall completed. It saved an + instruction and meant no stack cleanup work was required. + + This will not work in the case of a mmap call being interrupted + by a signal. If the signal handler uses any stack the arguments + to mmap will be trashed. The results of a restart of mmap are + then unpredictable. */ + + /* store args on the stack */ + stmdb sp!, {a1-a4} + + /* do the syscall */ + mov a1, sp swi SYS_ify (mmap) + + /* pop args off the stack. */ + add sp, sp, #16 + cmn r0, $4096 bhs PLTJMP(syscall_error); ret From 5f406da841fc8831a1354f59beb36acb9ac2fdcb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 15 Apr 1999 14:45:16 +0000 Subject: [PATCH 1573/4487] Fix typo in preventing compilation of file. --- sysdeps/unix/sysv/linux/arm/sigaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/arm/sigaction.c b/sysdeps/unix/sysv/linux/arm/sigaction.c index 102d66595b..2e70b321ef 100644 --- a/sysdeps/unix/sysv/linux/arm/sigaction.c +++ b/sysdeps/unix/sysv/linux/arm/sigaction.c @@ -49,7 +49,7 @@ extern void __default_rt_sa_restorer(void); : __default_sa_restorer #else #define choose_restorer(flags) \ - &&__default_sa_restorer + __default_sa_restorer #endif /* If ACT is not NULL, change the action for SIG to *ACT. From 7483ee1131eb7ae090d48d53545627e5bf382b3d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 16 Apr 1999 14:19:10 +0000 Subject: [PATCH 1574/4487] Removed since cmpxchg/no-cmpxchg doesn't exist anymore. --- sysdeps/arm/linuxthreads/Implies | 1 - 1 file changed, 1 deletion(-) delete mode 100644 sysdeps/arm/linuxthreads/Implies diff --git a/sysdeps/arm/linuxthreads/Implies b/sysdeps/arm/linuxthreads/Implies deleted file mode 100644 index 7edcd7e757..0000000000 --- a/sysdeps/arm/linuxthreads/Implies +++ /dev/null @@ -1 +0,0 @@ -pthread/no-cmpxchg From d33ecfde382d27a4ec660632c01a76c7c9451603 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 16 Apr 1999 17:06:33 +0000 Subject: [PATCH 1575/4487] Correct signed/unsigned-ness of blkcnt and fsblkcnt. --- sysdeps/unix/sysv/linux/alpha/bits/types.h | 10 +++++----- sysdeps/unix/sysv/linux/mips/bits/types.h | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h index 0bc6cf6575..0af9fb399d 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/types.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h @@ -59,11 +59,11 @@ typedef __int32_t __pid_t; /* Type of process identifications. */ typedef __int64_t __ssize_t; /* Type of a byte count, or error. */ typedef __int64_t __rlim_t; /* Type of resource counts. */ typedef __int64_t __rlim64_t; /* "" (LFS) */ -typedef __int32_t __blkcnt_t; /* Type to count nr disk blocks. */ -typedef __int64_t __blkcnt64_t; /* "" (LFS) */ -typedef __uint32_t __fsblkcnt_t; /* Type to count file system blocks. */ -typedef __uint64_t __fsblkcnt64_t; /* "" (LFS) */ -typedef __uint32_t __fsfilcnt_t; /* Type to count file system inodes. */ +typedef __uint32_t __blkcnt_t; /* Type to count nr disk blocks. */ +typedef __uint64_t __blkcnt64_t; /* "" (LFS) */ +typedef __int32_t __fsblkcnt_t; /* Type to count file system blocks. */ +typedef __int64_t __fsblkcnt64_t; /* "" (LFS) */ +typedef __uint32_t __fsfilcnt_t; /* Type to count file system inodes. */ typedef __uint64_t __fsfilcnt64_t; /* "" (LFS) */ typedef __uint32_t __id_t; /* General type for IDs. */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h index 36a1e0e0e3..51d9fcdc06 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/types.h +++ b/sysdeps/unix/sysv/linux/mips/bits/types.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 92, 94, 95, 96, 97, 98 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,94,95,96,97,98,99 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 @@ -120,12 +120,12 @@ typedef long int __ipc_pid_t; /* Types from the Large File Support interface. */ /* Type to count number os disk blocks. */ -typedef __u_long __blkcnt_t; -typedef __u_quad_t __blkcnt64_t; +typedef long int __blkcnt_t; +typedef __quad_t __blkcnt64_t; /* Type to count file system blocks. */ -typedef long int __fsblkcnt_t; -typedef __quad_t __fsblkcnt64_t; +typedef __u_long __fsblkcnt_t; +typedef __u_quad_t __fsblkcnt64_t; /* Type to count file system inodes. */ typedef __u_long __fsfilcnt_t; From 761fb24284ca1a148987d235f01daec323837fc2 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 30 Apr 1999 17:27:14 +0000 Subject: [PATCH 1576/4487] New file. --- sysdeps/m68k/stackinfo.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 sysdeps/m68k/stackinfo.h diff --git a/sysdeps/m68k/stackinfo.h b/sysdeps/m68k/stackinfo.h new file mode 100644 index 0000000000..a1b8e06a89 --- /dev/null +++ b/sysdeps/m68k/stackinfo.h @@ -0,0 +1,28 @@ +/* Copyright (C) 1999 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* This file contains a bit of information about the stack allocation + of the processor. */ + +#ifndef _STACKINFO_H +#define _STACKINFO_H 1 + +/* On m68k the stack grows down. */ +#define _STACK_GROWS_DOWN 1 + +#endif /* stackinfo.h */ From b6a1f966a05f09778764e7f88bdf1eae565f842d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 3 May 1999 12:40:23 +0000 Subject: [PATCH 1577/4487] Add sigrestorer.S. --- sysdeps/unix/sysv/linux/arm/Dist | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/arm/Dist b/sysdeps/unix/sysv/linux/arm/Dist index 0bf79a4f98..28e86426ec 100644 --- a/sysdeps/unix/sysv/linux/arm/Dist +++ b/sysdeps/unix/sysv/linux/arm/Dist @@ -5,6 +5,7 @@ setresuid.c setresgid.c setfsuid.c setfsgid.c +sigrestorer.S bits/armsigctx.h sys/io.h sys/user.h From 1c2d926dc86653ad0a216246efbdf8ca597dc80a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 11 May 1999 12:07:07 +0000 Subject: [PATCH 1578/4487] (struct sockaddr_storage): New structure; storage suitable for any socket address. --- sysdeps/unix/sysv/linux/mips/bits/socket.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h index cd85df7ef3..5dbdee419f 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/socket.h +++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h @@ -1,5 +1,5 @@ /* System-specific socket constants and types. Linux/MIPS version. - Copyright (C) 1991, 92, 94, 95, 96, 97, 98 Free Software Foundation, Inc. + Copyright (C) 1991,92,94,95,96,97,98,99 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,6 +28,7 @@ #define __need_NULL #include +#include #include /* Type for length arguments in socket calls. */ @@ -133,6 +134,24 @@ struct sockaddr }; +/* Structure large enough to hold any socket address (with the historical + exception of AF_UNIX). We reserve 128 bytes. */ +#if ULONG_MAX > 0xffffffff +# define __ss_align __uint64_t +#else +# define __ss_align __uint32_t +#endif +#define _SS_SIZE 128 +#define _SS_PADSIZE (_SS_SIZE - (2 * sizeof(__ss_align))) + +struct sockaddr_storage + { + __SOCKADDR_COMMON (__ss_); /* Address family, etc. */ + __ss_align __ss_align; /* Force desired alignment. */ + char __ss_padding[_SS_PADSIZE]; + }; + + /* Bits in the FLAGS argument to `send', `recv', et al. */ enum { From 09ea25239c6918f4b2847ca5d0ab7c4ee53c0b9f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 May 1999 08:55:49 +0000 Subject: [PATCH 1579/4487] Zap high byte of length. Reschedule. --- sysdeps/alpha/memchr.S | 178 +++++++++++++++++++++-------------------- 1 file changed, 91 insertions(+), 87 deletions(-) diff --git a/sysdeps/alpha/memchr.S b/sysdeps/alpha/memchr.S index 7456735aad..0ea4aa1b3d 100644 --- a/sysdeps/alpha/memchr.S +++ b/sysdeps/alpha/memchr.S @@ -17,8 +17,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* Finds characters in a memory area. Optimized for the Alpha -architecture: +/* Finds characters in a memory area. Optimized for the Alpha: - memory accessed as aligned quadwords only - uses cmpbge to compare 8 bytes in parallel @@ -48,119 +47,124 @@ ENTRY(memchr) .prologue 0 #endif - beq a2, $not_found - ldq_u t0, 0(a0) # load first quadword (a0 may be misaligned) - addq a0, a2, t4 - and a1, 0xff, a1 # a1 = 00000000000000ch - sll a1, 8, t1 # t1 = 000000000000ch00 - cmpult a2, 9, t3 - or t1, a1, a1 # a1 = 000000000000chch - sll a1, 16, t1 # t1 = 00000000chch0000 - lda t2, -1(zero) - or t1, a1, a1 # a1 = 00000000chchchch - sll a1, 32, t1 # t1 = chchchch00000000 - extql t0, a0, t6 - or t1, a1, a1 # a1 = chchchchchchchch - - beq t3, $first_quad - - ldq_u t5, -1(t4) - extqh t5, a0, t5 - mov a0, v0 - or t6, t5, t0 # t0 = quadword starting at a0 - - # + # Hack -- if someone passes in (size_t)-1, hoping to just + # search til the end of the address space, we will overflow + # below when we find the address of the last byte. Given + # that we will never have a 56-bit address space, cropping + # the length is the easiest way to avoid trouble. + zap a2, 0x80, t4 #-e0 : + + beq a2, $not_found # .. e1 : + ldq_u t0, 0(a0) # e1 : load first quadword + insbl a1, 1, t1 # .. e0 : t1 = 000000000000ch00 + and a1, 0xff, a1 #-e0 : a1 = 00000000000000ch + cmpult a2, 9, t3 # .. e1 : + or t1, a1, a1 # e0 : a1 = 000000000000chch + lda t2, -1(zero) # .. e1 : + sll a1, 16, t1 #-e0 : t1 = 00000000chch0000 + addq a0, t4, t4 # .. e1 : + or t1, a1, a1 # e1 : a1 = 00000000chchchch + unop # : + sll a1, 32, t1 #-e0 : t1 = chchchch00000000 + or t1, a1, a1 # e1 : a1 = chchchchchchchch + extql t0, a0, t6 # e0 : + beq t3, $first_quad # .. e1 : + + ldq_u t5, -1(t4) #-e1 : eight or less bytes to search + extqh t5, a0, t5 # .. e0 : + mov a0, v0 # e0 : + or t6, t5, t0 # .. e1 : t0 = quadword starting at a0 + # Deal with the case where at most 8 bytes remain to be searched # in t0. E.g.: # a2 = 6 # t0 = ????c6c5c4c3c2c1 $last_quad: - negq a2, t5 - srl t2, t5, t5 # t5 = mask of a2 bits set - xor a1, t0, t0 - cmpbge zero, t0, t1 - and t1, t5, t1 - beq t1, $not_found + negq a2, t5 #-e0 : + xor a1, t0, t0 # .. e1 : + srl t2, t5, t5 # e0 : t5 = mask of a2 bits set + cmpbge zero, t0, t1 # .. e1 : + and t1, t5, t1 #-e0 : + beq t1, $not_found # .. e1 : $found_it: - # now, determine which byte matched: - negq t1, t2 - and t1, t2, t1 - - and t1, 0x0f, t0 - addq v0, 4, t2 - cmoveq t0, t2, v0 + # Now, determine which byte matched: + negq t1, t2 # e0 : + and t1, t2, t1 # e1 : - and t1, 0x33, t0 - addq v0, 2, t2 - cmoveq t0, t2, v0 + and t1, 0x0f, t0 #-e0 : + addq v0, 4, t2 # .. e1 : + cmoveq t0, t2, v0 # e0 : - and t1, 0x55, t0 - addq v0, 1, t2 - cmoveq t0, t2, v0 + addq v0, 2, t2 # .. e1 : + and t1, 0x33, t0 #-e0 : + cmoveq t0, t2, v0 # .. e1 : -$done: ret + and t1, 0x55, t0 # e0 : + addq v0, 1, t2 # .. e1 : + cmoveq t0, t2, v0 #-e0 : +$done: ret # .. e1 : - # # Deal with the case where a2 > 8 bytes remain to be # searched. a0 may not be aligned. - # + .align 4 $first_quad: - andnot a0, 0x7, v0 - insqh t2, a0, t1 # t1 = 0000ffffffffffff (a0<0:2> ff bytes) - xor t0, a1, t0 - or t0, t1, t0 # t0 = ====ffffffffffff - cmpbge zero, t0, t1 - bne t1, $found_it + andnot a0, 0x7, v0 #-e1 : + insqh t2, a0, t1 # .. e0 : t1 = 0000ffffffffffff (a0<0:2> ff) + xor t0, a1, t0 # e0 : + or t0, t1, t0 # e1 : t0 = ====ffffffffffff + cmpbge zero, t0, t1 #-e0 : + bne t1, $found_it # .. e1 : + + # At least one byte left to process. + + ldq t0, 8(v0) # e0 : + subq t4, 1, a2 # .. e1 : + addq v0, 8, v0 #-e0 : - /* at least one byte left to process */ + # Make a2 point to last quad to be accessed (the + # last quad may or may not be partial). - ldq t0, 8(v0) - addq v0, 8, v0 - /* - * Make a2 point to last quad to be accessed (the - * last quad may or may not be partial). - */ - subq t4, 1, a2 - andnot a2, 0x7, a2 - cmpult v0, a2, t1 - beq t1, $final + andnot a2, 0x7, a2 # .. e1 : + cmpult v0, a2, t1 # e0 : + beq t1, $final # .. e1 : - /* at least two quads remain to be accessed */ + # At least two quads remain to be accessed. - subq a2, v0, t3 # t3 <- number of quads to be processed in loop - and t3, 8, t3 # odd number of quads? - bne t3, $odd_quad_count + subq a2, v0, t3 #-e0 : t3 <- nr quads to be processed + and t3, 8, t3 # e1 : odd number of quads? + bne t3, $odd_quad_count # e1 : - /* at least three quads remain to be accessed */ + # At least three quads remain to be accessed - mov t0, t3 # move prefetched value into correct register + mov t0, t3 # e0 : move prefetched value to correct reg - .align 3 + .align 4 $unrolled_loop: - ldq t0, 8(v0) # prefetch t0 - xor a1, t3, t1 - cmpbge zero, t1, t1 - bne t1, $found_it + ldq t0, 8(v0) #-e0 : prefetch t0 + xor a1, t3, t1 # .. e1 : + cmpbge zero, t1, t1 # e0 : + bne t1, $found_it # .. e1 : - addq v0, 8, v0 + addq v0, 8, v0 #-e0 : $odd_quad_count: - xor a1, t0, t1 - ldq t3, 8(v0) # prefetch t3 - cmpbge zero, t1, t1 - bne t1, $found_it + xor a1, t0, t1 # .. e1 : + ldq t3, 8(v0) # e0 : prefetch t3 + cmpbge zero, t1, t1 # .. e1 : + addq v0, 8, t5 #-e0 : + bne t1, $found_it # .. e1 : - addq v0, 8, v0 - cmpult v0, a2, t5 - bne t5, $unrolled_loop + cmpult t5, a2, t5 # e0 : + addq v0, 8, v0 # .. e1 : + bne t5, $unrolled_loop #-e1 : - mov t3, t0 # move prefetched value into t0 -$final: subq t4, v0, a2 # a2 <- number of bytes left to do - bne a2, $last_quad + mov t3, t0 # e0 : move prefetched value into t0 +$final: subq t4, v0, a2 # .. e1 : a2 <- number of bytes left to do + bne a2, $last_quad # e1 : $not_found: - mov zero, v0 - ret + mov zero, v0 #-e0 : + ret # .. e1 : END(memchr) From 303e53829a227523f0d3c6db4e99f7e5fa7d6628 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 22 May 1999 17:14:30 +0000 Subject: [PATCH 1580/4487] * sysdeps/m68k/fpu/bits/fenv.h (fenv_t): Prepend __ to member names to protect from user's macro namespace. * sysdeps/m68k/fpu/feholdexcpt.c, sysdeps/m68k/fpu/fesetenv.c: Adapted. --- sysdeps/m68k/fpu/bits/fenv.h | 8 ++++---- sysdeps/m68k/fpu/feholdexcpt.c | 6 +++--- sysdeps/m68k/fpu/fesetenv.c | 14 +++++++------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/sysdeps/m68k/fpu/bits/fenv.h b/sysdeps/m68k/fpu/bits/fenv.h index e1a278d333..3138fefe66 100644 --- a/sysdeps/m68k/fpu/bits/fenv.h +++ b/sysdeps/m68k/fpu/bits/fenv.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999 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 @@ -64,9 +64,9 @@ typedef unsigned int fexcept_t; corresponds to the layout of the block written by `fmovem'. */ typedef struct { - unsigned int control_register; - unsigned int status_register; - unsigned int instruction_address; + unsigned int __control_register; + unsigned int __status_register; + unsigned int __instruction_address; } fenv_t; diff --git a/sysdeps/m68k/fpu/feholdexcpt.c b/sysdeps/m68k/fpu/feholdexcpt.c index e36617d962..1ccf84bc86 100644 --- a/sysdeps/m68k/fpu/feholdexcpt.c +++ b/sysdeps/m68k/fpu/feholdexcpt.c @@ -1,5 +1,5 @@ /* Store current floating-point environment and clear exceptions. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab @@ -29,10 +29,10 @@ feholdexcept (fenv_t *envp) __asm__ ("fmovem%.l %/fpcr/%/fpsr/%/fpiar,%0" : "=m" (*envp)); /* Now clear all exceptions. */ - fpsr = envp->status_register & ~FE_ALL_EXCEPT; + fpsr = envp->__status_register & ~FE_ALL_EXCEPT; __asm__ __volatile__ ("fmove%.l %0,%/fpsr" : : "dm" (fpsr)); /* And set all exceptions to non-stop. */ - fpcr = envp->control_register & ~(FE_ALL_EXCEPT << 6); + fpcr = envp->__control_register & ~(FE_ALL_EXCEPT << 6); __asm__ __volatile__ ("fmove%.l %0,%!" : : "dm" (fpcr)); return 1; diff --git a/sysdeps/m68k/fpu/fesetenv.c b/sysdeps/m68k/fpu/fesetenv.c index 6dd131b888..b8ad428893 100644 --- a/sysdeps/m68k/fpu/fesetenv.c +++ b/sysdeps/m68k/fpu/fesetenv.c @@ -1,5 +1,5 @@ /* Install given floating-point environment. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab @@ -31,17 +31,17 @@ fesetenv (const fenv_t *envp) we want to use from the environment specified by the parameter. */ __asm__ ("fmovem%.l %/fpcr/%/fpsr/%/fpiar,%0" : "=m" (*&temp)); - temp.status_register &= ~FE_ALL_EXCEPT; - temp.control_register &= ~((FE_ALL_EXCEPT << 6) | FE_UPWARD); + temp.__status_register &= ~FE_ALL_EXCEPT; + temp.__control_register &= ~((FE_ALL_EXCEPT << 6) | FE_UPWARD); if (envp == FE_DFL_ENV) ; else if (envp == FE_NOMASK_ENV) - temp.control_register |= FE_ALL_EXCEPT << 6; + temp.__control_register |= FE_ALL_EXCEPT << 6; else { - temp.control_register |= (envp->control_register - & ((FE_ALL_EXCEPT << 6) | FE_UPWARD)); - temp.status_register |= envp->status_register & FE_ALL_EXCEPT; + temp.__control_register |= (envp->__control_register + & ((FE_ALL_EXCEPT << 6) | FE_UPWARD)); + temp.__status_register |= envp->__status_register & FE_ALL_EXCEPT; } __asm__ __volatile__ ("fmovem%.l %0,%/fpcr/%/fpsr/%/fpiar" : : "m" (*&temp)); From d3cbb9807c3b99c762c1661c2ec2345d0b574089 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 23 May 1999 09:44:56 +0000 Subject: [PATCH 1581/4487] (fenv_t): Prepend __ to member names to protect from user's macro namespace. --- sysdeps/arm/fpu/bits/fenv.h | 10 +++++----- sysdeps/mips/bits/fenv.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sysdeps/arm/fpu/bits/fenv.h b/sysdeps/arm/fpu/bits/fenv.h index ca06196dda..3c9e2861c7 100644 --- a/sysdeps/arm/fpu/bits/fenv.h +++ b/sysdeps/arm/fpu/bits/fenv.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999 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 @@ -21,7 +21,7 @@ #endif /* Define bits representing exceptions in the FPU status word. */ -enum +enum { FE_INVALID = 1, #define FE_INVALID FE_INVALID @@ -34,7 +34,7 @@ enum }; /* Amount to shift by to convert an exception to a mask bit. */ -#define FE_EXCEPT_SHIFT 16 +#define FE_EXCEPT_SHIFT 16 /* All supported exceptions. */ #define FE_ALL_EXCEPT \ @@ -45,12 +45,12 @@ enum #define FE_TONEAREST 0 /* Type representing exception flags. */ -typedef unsigned long fexcept_t; +typedef unsigned long int fexcept_t; /* Type representing floating-point environment. */ typedef struct { - unsigned long cw; + unsigned long int __cw; } fenv_t; diff --git a/sysdeps/mips/bits/fenv.h b/sysdeps/mips/bits/fenv.h index 0637bf7623..efa90b6dbd 100644 --- a/sysdeps/mips/bits/fenv.h +++ b/sysdeps/mips/bits/fenv.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999 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 @@ -64,7 +64,7 @@ typedef unsigned short int fexcept_t; to the layout of the block written by the `fstenv'. */ typedef struct { - unsigned int fp_control_register; + unsigned int __fp_control_register; } fenv_t; From b28057ced40fb9f1ecddcbe1af5917043ff53b58 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 23 May 1999 09:46:25 +0000 Subject: [PATCH 1582/4487] Adapted for header file change. --- sysdeps/arm/fpu/fegetenv.c | 4 ++-- sysdeps/arm/fpu/feholdexcpt.c | 4 ++-- sysdeps/arm/fpu/fesetenv.c | 4 ++-- sysdeps/mips/fesetenv.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sysdeps/arm/fpu/fegetenv.c b/sysdeps/arm/fpu/fegetenv.c index 5b31c5e644..99dc1f0d8c 100644 --- a/sysdeps/arm/fpu/fegetenv.c +++ b/sysdeps/arm/fpu/fegetenv.c @@ -1,5 +1,5 @@ /* Store current floating-point environment. - Copyright (C) 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 1999 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,5 +25,5 @@ fegetenv (fenv_t *envp) { unsigned long int temp; _FPU_GETCW(temp); - envp->cw = temp; + envp->__cw = temp; } diff --git a/sysdeps/arm/fpu/feholdexcpt.c b/sysdeps/arm/fpu/feholdexcpt.c index 5679ccc243..3faabd90eb 100644 --- a/sysdeps/arm/fpu/feholdexcpt.c +++ b/sysdeps/arm/fpu/feholdexcpt.c @@ -1,5 +1,5 @@ /* Store current floating-point environment and clear exceptions. - Copyright (C) 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 1999 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 @@ -27,7 +27,7 @@ feholdexcept (fenv_t *envp) /* Store the environment. */ _FPU_GETCW(temp); - envp->cw = temp; + envp->__cw = temp; /* Now set all exceptions to non-stop. */ temp &= ~(FE_ALL_EXCEPT << FE_EXCEPT_SHIFT); diff --git a/sysdeps/arm/fpu/fesetenv.c b/sysdeps/arm/fpu/fesetenv.c index b2d3ec5e9f..7f3a434778 100644 --- a/sysdeps/arm/fpu/fesetenv.c +++ b/sysdeps/arm/fpu/fesetenv.c @@ -1,5 +1,5 @@ /* Install given floating-point environment. - Copyright (C) 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 1999 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 @@ -27,7 +27,7 @@ fesetenv (const fenv_t *envp) _FPU_SETCW(_FPU_DEFAULT); else { - unsigned long temp = envp->cw; + unsigned long temp = envp->__cw; _FPU_SETCW(temp); } } diff --git a/sysdeps/mips/fesetenv.c b/sysdeps/mips/fesetenv.c index 58df06391e..116fbaefce 100644 --- a/sysdeps/mips/fesetenv.c +++ b/sysdeps/mips/fesetenv.c @@ -1,5 +1,5 @@ /* Install given floating-point environment. - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger , 1998. @@ -27,5 +27,5 @@ fesetenv (const fenv_t *envp) if (envp == FE_DFL_ENV) _FPU_SETCW (_FPU_DEFAULT); else - _FPU_SETCW (envp->fp_control_register); + _FPU_SETCW (envp->__fp_control_register); } From d31690f15632bdd667cdd65f868aa8440b4b4c54 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 23 May 1999 10:11:27 +0000 Subject: [PATCH 1583/4487] Pretty print. --- sysdeps/alpha/fpu/bits/fenv.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/alpha/fpu/bits/fenv.h b/sysdeps/alpha/fpu/bits/fenv.h index 2ccf149f0a..8e7b6ece5b 100644 --- a/sysdeps/alpha/fpu/bits/fenv.h +++ b/sysdeps/alpha/fpu/bits/fenv.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999 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 @@ -83,10 +83,10 @@ enum /* Type representing exception flags. */ -typedef unsigned long fexcept_t; +typedef unsigned long int fexcept_t; /* Type representing floating-point environment. */ -typedef unsigned long fenv_t; +typedef unsigned long int fenv_t; /* If the default argument is used we use this value. Note that due to architecture-specified page mappings, no user-space pointer will ever From e79468a241ef13b90888870eec02ab2ca39e0b56 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 6 Jun 1999 09:20:55 +0000 Subject: [PATCH 1584/4487] (elf_machine_load_address): Fix problems with GOT addressing. --- sysdeps/arm/dl-machine.h | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index aff8df2238..754a6caa13 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -52,22 +52,14 @@ elf_machine_dynamic (void) /* Return the run-time load address of the shared object. */ -// patb static inline Elf32_Addr __attribute__ ((unused)) elf_machine_load_address (void) { - Elf32_Addr addr; - asm (" ldr ip,.L1 - ldr r3,.L3 - add r3, r3, sl - ldr ip,[sl, ip] - sub ip, r3, ip - b .L2 - .L1: .word _dl_start(GOT) - .L3: .word _dl_start(GOTOFF) - .L2: mov %0, ip" - : "=r" (addr) : : "ip", "r3"); - return addr; + extern void __dl_start asm ("_dl_start"); + Elf32_Addr got_addr = (Elf32_Addr) &__dl_start; + Elf32_Addr pcrel_addr; + asm ("adr %0, _dl_start" : "=r" (pcrel_addr)); + return pcrel_addr - got_addr; } From 98226e08b5d4eb4edb3ac8b73bd4a766e955a747 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 8 Jun 1999 21:15:39 +0000 Subject: [PATCH 1585/4487] Remove advertising clause of copyright. --- sysdeps/unix/bsd/sun/sunos4/sys/ttydefaults.h | 4 ---- sysdeps/vax/DEFS.h | 4 ---- 2 files changed, 8 deletions(-) diff --git a/sysdeps/unix/bsd/sun/sunos4/sys/ttydefaults.h b/sysdeps/unix/bsd/sun/sunos4/sys/ttydefaults.h index d4ee4ac451..d18433c6fe 100644 --- a/sysdeps/unix/bsd/sun/sunos4/sys/ttydefaults.h +++ b/sysdeps/unix/bsd/sun/sunos4/sys/ttydefaults.h @@ -15,10 +15,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. diff --git a/sysdeps/vax/DEFS.h b/sysdeps/vax/DEFS.h index 01f1f0cdd0..50f8b7e131 100644 --- a/sysdeps/vax/DEFS.h +++ b/sysdeps/vax/DEFS.h @@ -10,10 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. From bfd3bd48147d1998d6ed09b10ddbf49854ef2ce6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 9 Jun 1999 13:03:40 +0000 Subject: [PATCH 1586/4487] Remove advertising clause of copyright. --- sysdeps/vax/bcopy.s | 4 ---- sysdeps/vax/bzero.s | 4 ---- sysdeps/vax/ffs.s | 4 ---- sysdeps/vax/memchr.s | 4 ---- sysdeps/vax/memcmp.s | 4 ---- sysdeps/vax/memmove.s | 4 ---- sysdeps/vax/memset.s | 4 ---- sysdeps/vax/strcat.s | 4 ---- sysdeps/vax/strchr.s | 4 ---- sysdeps/vax/strcmp.s | 4 ---- sysdeps/vax/strcpy.s | 4 ---- sysdeps/vax/strcspn.s | 4 ---- sysdeps/vax/strlen.s | 4 ---- sysdeps/vax/strncat.s | 4 ---- sysdeps/vax/strncmp.s | 4 ---- sysdeps/vax/strncpy.s | 4 ---- sysdeps/vax/strpbrk.s | 4 ---- sysdeps/vax/strrchr.s | 4 ---- sysdeps/vax/strsep.s | 4 ---- sysdeps/vax/strspn.s | 4 ---- sysdeps/vax/strstr.s | 4 ---- 21 files changed, 84 deletions(-) diff --git a/sysdeps/vax/bcopy.s b/sysdeps/vax/bcopy.s index 43bb93d216..186ad365f8 100644 --- a/sysdeps/vax/bcopy.s +++ b/sysdeps/vax/bcopy.s @@ -10,10 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. diff --git a/sysdeps/vax/bzero.s b/sysdeps/vax/bzero.s index dff59ba667..be61a97d89 100644 --- a/sysdeps/vax/bzero.s +++ b/sysdeps/vax/bzero.s @@ -10,10 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. diff --git a/sysdeps/vax/ffs.s b/sysdeps/vax/ffs.s index 9f7ebc95fe..6272cfd59f 100644 --- a/sysdeps/vax/ffs.s +++ b/sysdeps/vax/ffs.s @@ -10,10 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. diff --git a/sysdeps/vax/memchr.s b/sysdeps/vax/memchr.s index b81c2bcf87..18120b06ac 100644 --- a/sysdeps/vax/memchr.s +++ b/sysdeps/vax/memchr.s @@ -10,10 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. diff --git a/sysdeps/vax/memcmp.s b/sysdeps/vax/memcmp.s index f7e47ded46..e32fe24f41 100644 --- a/sysdeps/vax/memcmp.s +++ b/sysdeps/vax/memcmp.s @@ -10,10 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. diff --git a/sysdeps/vax/memmove.s b/sysdeps/vax/memmove.s index 8f897fa3f4..738544142f 100644 --- a/sysdeps/vax/memmove.s +++ b/sysdeps/vax/memmove.s @@ -10,10 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. diff --git a/sysdeps/vax/memset.s b/sysdeps/vax/memset.s index 12b1f74fe3..dda14868f9 100644 --- a/sysdeps/vax/memset.s +++ b/sysdeps/vax/memset.s @@ -10,10 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. diff --git a/sysdeps/vax/strcat.s b/sysdeps/vax/strcat.s index 7cf8884204..bfe64e61a3 100644 --- a/sysdeps/vax/strcat.s +++ b/sysdeps/vax/strcat.s @@ -10,10 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. diff --git a/sysdeps/vax/strchr.s b/sysdeps/vax/strchr.s index 70025cce6e..d56cb4b0a0 100644 --- a/sysdeps/vax/strchr.s +++ b/sysdeps/vax/strchr.s @@ -10,10 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. diff --git a/sysdeps/vax/strcmp.s b/sysdeps/vax/strcmp.s index c9c5b479ae..479e14f301 100644 --- a/sysdeps/vax/strcmp.s +++ b/sysdeps/vax/strcmp.s @@ -10,10 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. diff --git a/sysdeps/vax/strcpy.s b/sysdeps/vax/strcpy.s index 56dbe5741c..1eb00ba6c3 100644 --- a/sysdeps/vax/strcpy.s +++ b/sysdeps/vax/strcpy.s @@ -10,10 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. diff --git a/sysdeps/vax/strcspn.s b/sysdeps/vax/strcspn.s index f7b0a99792..155b783089 100644 --- a/sysdeps/vax/strcspn.s +++ b/sysdeps/vax/strcspn.s @@ -10,10 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. diff --git a/sysdeps/vax/strlen.s b/sysdeps/vax/strlen.s index 2b7e0a7ef4..9479fbbf65 100644 --- a/sysdeps/vax/strlen.s +++ b/sysdeps/vax/strlen.s @@ -10,10 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. diff --git a/sysdeps/vax/strncat.s b/sysdeps/vax/strncat.s index bcf29c16c7..2387d1b1bb 100644 --- a/sysdeps/vax/strncat.s +++ b/sysdeps/vax/strncat.s @@ -10,10 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. diff --git a/sysdeps/vax/strncmp.s b/sysdeps/vax/strncmp.s index 0758bd8729..8d8f5d419a 100644 --- a/sysdeps/vax/strncmp.s +++ b/sysdeps/vax/strncmp.s @@ -10,10 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. diff --git a/sysdeps/vax/strncpy.s b/sysdeps/vax/strncpy.s index 03a09b7bda..ade70e9dca 100644 --- a/sysdeps/vax/strncpy.s +++ b/sysdeps/vax/strncpy.s @@ -10,10 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. diff --git a/sysdeps/vax/strpbrk.s b/sysdeps/vax/strpbrk.s index 0d1b25e22f..4a0e541719 100644 --- a/sysdeps/vax/strpbrk.s +++ b/sysdeps/vax/strpbrk.s @@ -10,10 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. diff --git a/sysdeps/vax/strrchr.s b/sysdeps/vax/strrchr.s index 87313445c9..b0e482c9fa 100644 --- a/sysdeps/vax/strrchr.s +++ b/sysdeps/vax/strrchr.s @@ -10,10 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. diff --git a/sysdeps/vax/strsep.s b/sysdeps/vax/strsep.s index 9751acc699..dcf2a7caaa 100644 --- a/sysdeps/vax/strsep.s +++ b/sysdeps/vax/strsep.s @@ -10,10 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. diff --git a/sysdeps/vax/strspn.s b/sysdeps/vax/strspn.s index fc86af7c37..ca944828cd 100644 --- a/sysdeps/vax/strspn.s +++ b/sysdeps/vax/strspn.s @@ -10,10 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. diff --git a/sysdeps/vax/strstr.s b/sysdeps/vax/strstr.s index 2e5337595d..0283a57dcf 100644 --- a/sysdeps/vax/strstr.s +++ b/sysdeps/vax/strstr.s @@ -10,10 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. From 55dec6d8651110241486f4ef490bbbbb9c40f7f3 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 14 Jun 1999 00:59:40 +0000 Subject: [PATCH 1587/4487] New files, optimized for m68k. --- sysdeps/m68k/memchr.S | 228 ++++++++++++++++++++++++++++++++++ sysdeps/m68k/rawmemchr.S | 179 +++++++++++++++++++++++++++ sysdeps/m68k/strchr.S | 257 +++++++++++++++++++++++++++++++++++++++ sysdeps/m68k/strchrnul.S | 250 +++++++++++++++++++++++++++++++++++++ 4 files changed, 914 insertions(+) create mode 100644 sysdeps/m68k/memchr.S create mode 100644 sysdeps/m68k/rawmemchr.S create mode 100644 sysdeps/m68k/strchr.S create mode 100644 sysdeps/m68k/strchrnul.S diff --git a/sysdeps/m68k/memchr.S b/sysdeps/m68k/memchr.S new file mode 100644 index 0000000000..a1599f8d89 --- /dev/null +++ b/sysdeps/m68k/memchr.S @@ -0,0 +1,228 @@ +/* memchr (str, ch, n) -- Return pointer to first occurrence of CH in the + first N bytes of STR. + For Motorola 68000. + Copyright (C) 1999 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Schwab . + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include "asm-syntax.h" + + TEXT +ENTRY(memchr) + /* Save the callee-saved registers we use. */ + moveml R(d2)-R(d4),MEM_PREDEC(sp) + + /* Get string pointer, character and length. */ + movel MEM_DISP(sp,16),R(a0) + moveb MEM_DISP(sp,23),R(d0) + movel MEM_DISP(sp,24),R(d4) + + /* Check if at least four bytes left to search. */ + moveql #4,R(d1) + cmpl R(d1),R(d4) + bcs L(L6) + + /* Distribute the character to all bytes of a longword. */ + movel R(d0),R(d1) + lsll #8,R(d1) + moveb R(d0),R(d1) + movel R(d1),R(d0) + swap R(d0) + movew R(d1),R(d0) + + /* First search for the character one byte at a time until the + pointer is aligned to a longword boundary. */ + movel R(a0),R(d1) + andw #3,R(d1) + beq L(L1) + cmpb MEM(a0),R(d0) + beq L(L9) + addql #1,R(a0) + subql #1,R(d4) + beq L(L7) + + movel R(a0),R(d1) + andw #3,R(d1) + beq L(L1) + cmpb MEM(a0),R(d0) + beq L(L9) + addql #1,R(a0) + subql #1,R(d4) + beq L(L7) + + movel R(a0),R(d1) + andw #3,R(d1) + beq L(L1) + cmpb MEM(a0),R(d0) + beq L(L9) + addql #1,R(a0) + subql #1,R(d4) + beq L(L7) + +L(L1:) + /* Load the magic bits. Unlike the generic implementation we can + use the carry bit as the fourth hole. */ + movel #0xfefefeff,R(d3) + + /* We exit the loop if adding MAGIC_BITS to LONGWORD fails to + change any of the hole bits of LONGWORD. + + 1) Is this safe? Will it catch all the zero bytes? + Suppose there is a byte with all zeros. Any carry bits + propagating from its left will fall into the hole at its + least significant bit and stop. Since there will be no + carry from its most significant bit, the LSB of the + byte to the left will be unchanged, and the zero will be + detected. + + 2) Is this worthwhile? Will it ignore everything except + zero bytes? Suppose every byte of LONGWORD has a bit set + somewhere. There will be a carry into bit 8. If bit 8 + is set, this will carry into bit 16. If bit 8 is clear, + one of bits 9-15 must be set, so there will be a carry + into bit 16. Similarly, there will be a carry into bit + 24. If one of bits 24-31 is set, there will be a carry + into bit 32 (=carry flag), so all of the hole bits will + be changed. + + 3) But wait! Aren't we looking for C, not zero? + Good point. So what we do is XOR LONGWORD with a longword, + each of whose bytes is C. This turns each byte that is C + into a zero. */ + + /* Still at least 4 bytes to search? */ + subql #4,R(d4) + bcs L(L6) + +L(L2:) + /* Get the longword in question. */ + movel MEM_POSTINC(a0),R(d1) + /* XOR with the byte we search for. */ + eorl R(d0),R(d1) + + /* Add the magic value. We get carry bits reported for each byte + which is not C. */ + movel R(d3),R(d2) + addl R(d1),R(d2) + + /* Check the fourth carry bit before it is clobbered by the next + XOR. If it is not set we have a hit. */ + bcc L(L8) + + /* We are only interested in carry bits that change due to the + previous add, so remove original bits. */ + eorl R(d1),R(d2) + + /* Now test for the other three overflow bits. + Set all non-carry bits. */ + orl R(d3),R(d2) + /* Add 1 to get zero if all carry bits were set. */ + addql #1,R(d2) + + /* If we don't get zero then at least one byte of the word equals + C. */ + bne L(L8) + + /* Still at least 4 bytes to search? */ + subql #4,R(d4) + bcs L(L6) + + /* Get the longword in question. */ + movel MEM_POSTINC(a0),R(d1) + /* XOR with the byte we search for. */ + eorl R(d0),R(d1) + + /* Add the magic value. We get carry bits reported for each byte + which is not C. */ + movel R(d3),R(d2) + addl R(d1),R(d2) + + /* Check the fourth carry bit before it is clobbered by the next + XOR. If it is not set we have a hit. */ + bcc L(L8) + + /* We are only interested in carry bits that change due to the + previous add, so remove original bits */ + eorl R(d1),R(d2) + + /* Now test for the other three overflow bits. + Set all non-carry bits. */ + orl R(d3),R(d2) + /* Add 1 to get zero if all carry bits were set. */ + addql #1,R(d2) + + /* If we don't get zero then at least one byte of the word equals + C. */ + bne L(L8) + + /* Still at least 4 bytes to search? */ + subql #4,R(d4) + bcc L(L2) + +L(L6:) + /* Search one byte at a time in the remaining less than 4 bytes. */ + andw #3,R(d4) + beq L(L7) + cmpb MEM(a0),R(d0) + beq L(L9) + addql #1,R(a0) + + subqw #1,R(d4) + beq L(L7) + cmpb MEM(a0),R(d0) + beq L(L9) + addql #1,R(a0) + + subqw #1,R(d4) + beq L(L7) + cmpb MEM(a0),R(d0) + beq L(L9) + +L(L7:) + /* Return NULL. */ + clrl R(d0) + movel R(d0),R(a0) + moveml MEM_POSTINC(sp),R(d2)-R(d4) + rts + +L(L8:) + /* We have a hit. Check to see which byte it was. First + compensate for the autoincrement in the loop. */ + subql #4,R(a0) + + cmpb MEM(a0),R(d0) + beq L(L9) + addql #1,R(a0) + + cmpb MEM(a0),R(d0) + beq L(L9) + addql #1,R(a0) + + cmpb MEM(a0),R(d0) + beq L(L9) + addql #1,R(a0) + + /* Otherwise the fourth byte must equal C. */ +L(L9:) + movel R(a0),R(d0) + moveml MEM_POSTINC(sp),R(d2)-R(d4) + rts +END(strchr) + +weak_alias (strchr, index) diff --git a/sysdeps/m68k/rawmemchr.S b/sysdeps/m68k/rawmemchr.S new file mode 100644 index 0000000000..74eb1cab29 --- /dev/null +++ b/sysdeps/m68k/rawmemchr.S @@ -0,0 +1,179 @@ +/* rawmemchr (str, ch) -- Return pointer to first occurrence of CH in STR. + For Motorola 68000. + Copyright (C) 1999 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Schwab . + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include "asm-syntax.h" + + TEXT +ENTRY(__rawmemchr) + /* Save the callee-saved registers we use. */ + movel R(d2),MEM_PREDEC(sp) + movel R(d3),MEM_PREDEC(sp) + + /* Get string pointer and character. */ + movel MEM_DISP(sp,12),R(a0) + moveb MEM_DISP(sp,19),R(d0) + + /* Distribute the character to all bytes of a longword. */ + movel R(d0),R(d1) + lsll #8,R(d1) + moveb R(d0),R(d1) + movel R(d1),R(d0) + swap R(d0) + movew R(d1),R(d0) + + /* First search for the character one byte at a time until the + pointer is aligned to a longword boundary. */ + movel R(a0),R(d1) + andw #3,R(d1) + beq L(L1) + cmpb MEM(a0),R(d0) + beq L(L9) + addql #1,R(a0) + + movel R(a0),R(d1) + andw #3,R(d1) + beq L(L1) + cmpb MEM(a0),R(d0) + beq L(L9) + addql #1,R(a0) + + movel R(a0),R(d1) + andw #3,R(d1) + beq L(L1) + cmpb MEM(a0),R(d0) + beq L(L9) + addql #1,R(a0) + +L(L1:) + /* Load the magic bits. Unlike the generic implementation we can + use the carry bit as the fourth hole. */ + movel #0xfefefeff,R(d3) + + /* We exit the loop if adding MAGIC_BITS to LONGWORD fails to + change any of the hole bits of LONGWORD. + + 1) Is this safe? Will it catch all the zero bytes? + Suppose there is a byte with all zeros. Any carry bits + propagating from its left will fall into the hole at its + least significant bit and stop. Since there will be no + carry from its most significant bit, the LSB of the + byte to the left will be unchanged, and the zero will be + detected. + + 2) Is this worthwhile? Will it ignore everything except + zero bytes? Suppose every byte of LONGWORD has a bit set + somewhere. There will be a carry into bit 8. If bit 8 + is set, this will carry into bit 16. If bit 8 is clear, + one of bits 9-15 must be set, so there will be a carry + into bit 16. Similarly, there will be a carry into bit + 24. If one of bits 24-31 is set, there will be a carry + into bit 32 (=carry flag), so all of the hole bits will + be changed. + + 3) But wait! Aren't we looking for C, not zero? + Good point. So what we do is XOR LONGWORD with a longword, + each of whose bytes is C. This turns each byte that is C + into a zero. */ + +L(L2:) + /* Get the longword in question. */ + movel MEM_POSTINC(a0),R(d1) + /* XOR with the byte we search for. */ + eorl R(d0),R(d1) + + /* Add the magic value. We get carry bits reported for each byte + which is not C. */ + movel R(d3),R(d2) + addl R(d1),R(d2) + + /* Check the fourth carry bit before it is clobbered by the next + XOR. If it is not set we have a hit. */ + bcc L(L8) + + /* We are only interested in carry bits that change due to the + previous add, so remove original bits. */ + eorl R(d1),R(d2) + + /* Now test for the other three overflow bits. + Set all non-carry bits. */ + orl R(d3),R(d2) + /* Add 1 to get zero if all carry bits were set. */ + addql #1,R(d2) + + /* If we don't get zero then at least one byte of the word equals + C. */ + bne L(L8) + + /* Get the longword in question. */ + movel MEM_POSTINC(a0),R(d1) + /* XOR with the byte we search for. */ + eorl R(d0),R(d1) + + /* Add the magic value. We get carry bits reported for each byte + which is not C. */ + movel R(d3),R(d2) + addl R(d1),R(d2) + + /* Check the fourth carry bit before it is clobbered by the next + XOR. If it is not set we have a hit. */ + bcc L(L8) + + /* We are only interested in carry bits that change due to the + previous add, so remove original bits */ + eorl R(d1),R(d2) + + /* Now test for the other three overflow bits. + Set all non-carry bits. */ + orl R(d3),R(d2) + /* Add 1 to get zero if all carry bits were set. */ + addql #1,R(d2) + + /* If we don't get zero then at least one byte of the word equals + C. */ + beq L(L2) + +L(L8:) + /* We have a hit. Check to see which byte it was. First + compensate for the autoincrement in the loop. */ + subql #4,R(a0) + + cmpb MEM(a0),R(d0) + beq L(L9) + addql #1,R(a0) + + cmpb MEM(a0),R(d0) + beq L(L9) + addql #1,R(a0) + + cmpb MEM(a0),R(d0) + beq L(L9) + addql #1,R(a0) + + /* Otherwise the fourth byte must equal C. */ +L(L9:) + movel R(a0),R(d0) + movel MEM_POSTINC(sp),R(d3) + movel MEM_POSTINC(sp),R(d2) + rts +END(__rawmemchr) + +weak_alias (__rawmemchr, rawmemchr) diff --git a/sysdeps/m68k/strchr.S b/sysdeps/m68k/strchr.S new file mode 100644 index 0000000000..45d02d0831 --- /dev/null +++ b/sysdeps/m68k/strchr.S @@ -0,0 +1,257 @@ +/* strchr (str, ch) -- Return pointer to first occurrence of CH in STR. + For Motorola 68000. + Copyright (C) 1999 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Schwab . + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include "asm-syntax.h" + + TEXT +ENTRY(strchr) + /* Save the callee-saved registers we use. */ + movel R(d2),MEM_PREDEC(sp) + movel R(d3),MEM_PREDEC(sp) + + /* Get string pointer and character. */ + movel MEM_DISP(sp,12),R(a0) + moveb MEM_DISP(sp,19),R(d0) + + /* Distribute the character to all bytes of a longword. */ + movel R(d0),R(d1) + lsll #8,R(d1) + moveb R(d0),R(d1) + movel R(d1),R(d0) + swap R(d0) + movew R(d1),R(d0) + + /* First search for the character one byte at a time until the + pointer is aligned to a longword boundary. */ + movel R(a0),R(d1) + andw #3,R(d1) + beq L(L1) + moveb MEM(a0),R(d1) + cmpb R(d0),R(d1) + beq L(L9) + tstb R(d1) + beq L(L3) + addql #1,R(a0) + + movel R(a0),R(d1) + andw #3,R(d1) + beq L(L1) + moveb MEM(a0),R(d1) + cmpb R(d0),R(d1) + beq L(L9) + tstb R(d1) + beq L(L3) + addql #1,R(a0) + + movel R(a0),R(d1) + andw #3,R(d1) + beq L(L1) + moveb MEM(a0),R(d1) + cmpb R(d0),R(d1) + beq L(L9) + tstb R(d1) + beq L(L3) + addql #1,R(a0) + +L(L1:) + /* Load the magic bits. Unlike the generic implementation we can + use the carry bit as the fourth hole. */ + movel #0xfefefeff,R(d3) + + /* We exit the loop if adding MAGIC_BITS to LONGWORD fails to + change any of the hole bits of LONGWORD. + + 1) Is this safe? Will it catch all the zero bytes? + Suppose there is a byte with all zeros. Any carry bits + propagating from its left will fall into the hole at its + least significant bit and stop. Since there will be no + carry from its most significant bit, the LSB of the + byte to the left will be unchanged, and the zero will be + detected. + + 2) Is this worthwhile? Will it ignore everything except + zero bytes? Suppose every byte of LONGWORD has a bit set + somewhere. There will be a carry into bit 8. If bit 8 + is set, this will carry into bit 16. If bit 8 is clear, + one of bits 9-15 must be set, so there will be a carry + into bit 16. Similarly, there will be a carry into bit + 24. If one of bits 24-31 is set, there will be a carry + into bit 32 (=carry flag), so all of the hole bits will + be changed. + + 3) But wait! Aren't we looking for C, not zero? + Good point. So what we do is XOR LONGWORD with a longword, + each of whose bytes is C. This turns each byte that is C + into a zero. */ + +L(L2:) + /* Get the longword in question. */ + movel MEM_POSTINC(a0),R(d1) + /* XOR with the byte we search for. */ + eorl R(d0),R(d1) + + /* Add the magic value. We get carry bits reported for each byte + which is not C. */ + movel R(d3),R(d2) + addl R(d1),R(d2) + + /* Check the fourth carry bit before it is clobbered by the next + XOR. If it is not set we have a hit. */ + bcc L(L8) + + /* We are only interested in carry bits that change due to the + previous add, so remove original bits. */ + eorl R(d1),R(d2) + + /* Now test for the other three overflow bits. + Set all non-carry bits. */ + orl R(d3),R(d2) + /* Add 1 to get zero if all carry bits were set. */ + addql #1,R(d2) + + /* If we don't get zero then at least one byte of the word equals + C. */ + bne L(L8) + + /* Next look for a NUL byte. + Restore original longword without reload. */ + eorl R(d0),R(d1) + /* Add the magic value. We get carry bits reported for each byte + which is not NUL. */ + movel R(d3),R(d2) + addl R(d1),R(d2) + + /* Check the fourth carry bit before it is clobbered by the next + XOR. If it is not set we have a hit, and return NULL. */ + bcc L(L3) + + /* We are only interested in carry bits that change due to the + previous add, so remove original bits. */ + eorl R(d1),R(d2) + + /* Now test for the other three overflow bits. + Set all non-carry bits. */ + orl R(d3),R(d2) + /* Add 1 to get zero if all carry bits were set. */ + addql #1,R(d2) + + /* If we don't get zero then at least one byte of the word was NUL + and we return NULL. Otherwise continue with the next longword. */ + bne L(L3) + + /* Get the longword in question. */ + movel MEM_POSTINC(a0),R(d1) + /* XOR with the byte we search for. */ + eorl R(d0),R(d1) + + /* Add the magic value. We get carry bits reported for each byte + which is not C. */ + movel R(d3),R(d2) + addl R(d1),R(d2) + + /* Check the fourth carry bit before it is clobbered by the next + XOR. If it is not set we have a hit. */ + bcc L(L8) + + /* We are only interested in carry bits that change due to the + previous add, so remove original bits */ + eorl R(d1),R(d2) + + /* Now test for the other three overflow bits. + Set all non-carry bits. */ + orl R(d3),R(d2) + /* Add 1 to get zero if all carry bits were set. */ + addql #1,R(d2) + + /* If we don't get zero then at least one byte of the word equals + C. */ + bne L(L8) + + /* Next look for a NUL byte. + Restore original longword without reload. */ + eorl R(d0),R(d1) + /* Add the magic value. We get carry bits reported for each byte + which is not NUL. */ + movel R(d3),R(d2) + addl R(d1),R(d2) + + /* Check the fourth carry bit before it is clobbered by the next + XOR. If it is not set we have a hit, and return NULL. */ + bcc L(L3) + + /* We are only interested in carry bits that change due to the + previous add, so remove original bits */ + eorl R(d1),R(d2) + + /* Now test for the other three overflow bits. + Set all non-carry bits. */ + orl R(d3),R(d2) + /* Add 1 to get zero if all carry bits were set. */ + addql #1,R(d2) + + /* If we don't get zero then at least one byte of the word was NUL + and we return NULL. Otherwise continue with the next longword. */ + beq L(L2) + +L(L3:) + /* Return NULL. */ + clrl R(d0) + movel R(d0),R(a0) + movel MEM_POSTINC(sp),R(d3) + movel MEM_POSTINC(sp),R(d2) + rts + +L(L8:) + /* We have a hit. Check to see which byte it was. First + compensate for the autoincrement in the loop. */ + subql #4,R(a0) + + moveb MEM(a0),R(d1) + cmpb R(d0),R(d1) + beq L(L9) + tstb R(d1) + beq L(L3) + addql #1,R(a0) + + moveb MEM(a0),R(d1) + cmpb R(d0),R(d1) + beq L(L9) + tstb R(d1) + beq L(L3) + addql #1,R(a0) + + moveb MEM(a0),R(d1) + cmpb R(d0),R(d1) + beq L(L9) + tstb R(d1) + beq L(L3) + addql #1,R(a0) + + /* Otherwise the fourth byte must equal C. */ +L(L9:) + movel R(a0),R(d0) + movel MEM_POSTINC(sp),R(d3) + movel MEM_POSTINC(sp),R(d2) + rts +END(strchr) + +weak_alias (strchr, index) diff --git a/sysdeps/m68k/strchrnul.S b/sysdeps/m68k/strchrnul.S new file mode 100644 index 0000000000..45e7616e1a --- /dev/null +++ b/sysdeps/m68k/strchrnul.S @@ -0,0 +1,250 @@ +/* strchrnul (str, ch) -- Return pointer to first occurrence of CH in STR + or the final NUL byte. + For Motorola 68000. + Copyright (C) 1999 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Schwab . + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include "asm-syntax.h" + + TEXT +ENTRY(__strchrnul) + /* Save the callee-saved registers we use. */ + movel R(d2),MEM_PREDEC(sp) + movel R(d3),MEM_PREDEC(sp) + + /* Get string pointer and character. */ + movel MEM_DISP(sp,12),R(a0) + moveb MEM_DISP(sp,19),R(d0) + + /* Distribute the character to all bytes of a longword. */ + movel R(d0),R(d1) + lsll #8,R(d1) + moveb R(d0),R(d1) + movel R(d1),R(d0) + swap R(d0) + movew R(d1),R(d0) + + /* First search for the character one byte at a time until the + pointer is aligned to a longword boundary. */ + movel R(a0),R(d1) + andw #3,R(d1) + beq L(L1) + moveb MEM(a0),R(d1) + cmpb R(d0),R(d1) + beq L(L9) + tstb R(d1) + beq L(L9) + addql #1,R(a0) + + movel R(a0),R(d1) + andw #3,R(d1) + beq L(L1) + moveb MEM(a0),R(d1) + cmpb R(d0),R(d1) + beq L(L9) + tstb R(d1) + beq L(L9) + addql #1,R(a0) + + movel R(a0),R(d1) + andw #3,R(d1) + beq L(L1) + moveb MEM(a0),R(d1) + cmpb R(d0),R(d1) + beq L(L9) + tstb R(d1) + beq L(L9) + addql #1,R(a0) + +L(L1:) + /* Load the magic bits. Unlike the generic implementation we can + use the carry bit as the fourth hole. */ + movel #0xfefefeff,R(d3) + + /* We exit the loop if adding MAGIC_BITS to LONGWORD fails to + change any of the hole bits of LONGWORD. + + 1) Is this safe? Will it catch all the zero bytes? + Suppose there is a byte with all zeros. Any carry bits + propagating from its left will fall into the hole at its + least significant bit and stop. Since there will be no + carry from its most significant bit, the LSB of the + byte to the left will be unchanged, and the zero will be + detected. + + 2) Is this worthwhile? Will it ignore everything except + zero bytes? Suppose every byte of LONGWORD has a bit set + somewhere. There will be a carry into bit 8. If bit 8 + is set, this will carry into bit 16. If bit 8 is clear, + one of bits 9-15 must be set, so there will be a carry + into bit 16. Similarly, there will be a carry into bit + 24. If one of bits 24-31 is set, there will be a carry + into bit 32 (=carry flag), so all of the hole bits will + be changed. + + 3) But wait! Aren't we looking for C, not zero? + Good point. So what we do is XOR LONGWORD with a longword, + each of whose bytes is C. This turns each byte that is C + into a zero. */ + +L(L2:) + /* Get the longword in question. */ + movel MEM_POSTINC(a0),R(d1) + /* XOR with the byte we search for. */ + eorl R(d0),R(d1) + + /* Add the magic value. We get carry bits reported for each byte + which is not C. */ + movel R(d3),R(d2) + addl R(d1),R(d2) + + /* Check the fourth carry bit before it is clobbered by the next + XOR. If it is not set we have a hit. */ + bcc L(L8) + + /* We are only interested in carry bits that change due to the + previous add, so remove original bits. */ + eorl R(d1),R(d2) + + /* Now test for the other three overflow bits. + Set all non-carry bits. */ + orl R(d3),R(d2) + /* Add 1 to get zero if all carry bits were set. */ + addql #1,R(d2) + + /* If we don't get zero then at least one byte of the word equals + C. */ + bne L(L8) + + /* Next look for a NUL byte. + Restore original longword without reload. */ + eorl R(d0),R(d1) + /* Add the magic value. We get carry bits reported for each byte + which is not NUL. */ + movel R(d3),R(d2) + addl R(d1),R(d2) + + /* Check the fourth carry bit before it is clobbered by the next + XOR. If it is not set we have a hit. */ + bcc L(L8) + + /* We are only interested in carry bits that change due to the + previous add, so remove original bits. */ + eorl R(d1),R(d2) + + /* Now test for the other three overflow bits. + Set all non-carry bits. */ + orl R(d3),R(d2) + /* Add 1 to get zero if all carry bits were set. */ + addql #1,R(d2) + + /* If we don't get zero then at least one byte of the word was + NUL. Otherwise continue with the next longword. */ + bne L(L8) + + /* Get the longword in question. */ + movel MEM_POSTINC(a0),R(d1) + /* XOR with the byte we search for. */ + eorl R(d0),R(d1) + + /* Add the magic value. We get carry bits reported for each byte + which is not C. */ + movel R(d3),R(d2) + addl R(d1),R(d2) + + /* Check the fourth carry bit before it is clobbered by the next + XOR. If it is not set we have a hit. */ + bcc L(L8) + + /* We are only interested in carry bits that change due to the + previous add, so remove original bits */ + eorl R(d1),R(d2) + + /* Now test for the other three overflow bits. + Set all non-carry bits. */ + orl R(d3),R(d2) + /* Add 1 to get zero if all carry bits were set. */ + addql #1,R(d2) + + /* If we don't get zero then at least one byte of the word equals + C. */ + bne L(L8) + + /* Next look for a NUL byte. + Restore original longword without reload. */ + eorl R(d0),R(d1) + /* Add the magic value. We get carry bits reported for each byte + which is not NUL. */ + movel R(d3),R(d2) + addl R(d1),R(d2) + + /* Check the fourth carry bit before it is clobbered by the next + XOR. If it is not set we have a hit. */ + bcc L(L8) + + /* We are only interested in carry bits that change due to the + previous add, so remove original bits */ + eorl R(d1),R(d2) + + /* Now test for the other three overflow bits. + Set all non-carry bits. */ + orl R(d3),R(d2) + /* Add 1 to get zero if all carry bits were set. */ + addql #1,R(d2) + + /* If we don't get zero then at least one byte of the word was + NUL. Otherwise continue with the next longword. */ + beq L(L2) + +L(L8:) + /* We have a hit. Check to see which byte it was. First + compensate for the autoincrement in the loop. */ + subql #4,R(a0) + + moveb MEM(a0),R(d1) + cmpb R(d0),R(d1) + beq L(L9) + tstb R(d1) + beq L(L9) + addql #1,R(a0) + + moveb MEM(a0),R(d1) + cmpb R(d0),R(d1) + beq L(L9) + tstb R(d1) + beq L(L9) + addql #1,R(a0) + + moveb MEM(a0),R(d1) + cmpb R(d0),R(d1) + beq L(L9) + tstb R(d1) + beq L(L9) + addql #1,R(a0) + + /* Otherwise the fourth byte must equal C or be NUL. */ +L(L9:) + movel R(a0),R(d0) + movel MEM_POSTINC(sp),R(d3) + movel MEM_POSTINC(sp),R(d2) + rts +END(__strchrnul) + +weak_alias (__strchrnul, strchrnul) From 0a437ddb588e5591664a323adeea28316d151378 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 15 Jun 1999 11:51:17 +0000 Subject: [PATCH 1588/4487] Add __sysctl. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 829f35ec94..ba20cd0d72 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -55,7 +55,7 @@ setsockopt - setsockopt 5 __setsockopt setsockopt shutdown - shutdown 2 __shutdown shutdown socket - socket 3 __socket socket socketpair - socketpair 4 __socketpair socketpair -sysctl - _sysctl 6 sysctl +sysctl - _sysctl 6 __sysctl sysctl getresuid - getresuid 3 getresuid getresgid - getresgid 3 getresgid From 56de49240cff9308effc28e08e39d5f26c442c9e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 16 Jun 1999 14:30:16 +0000 Subject: [PATCH 1589/4487] sysmacros.h file for Linux/Alpha. --- sysdeps/unix/sysv/linux/alpha/sys/sysmacros.h | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/sys/sysmacros.h diff --git a/sysdeps/unix/sysv/linux/alpha/sys/sysmacros.h b/sysdeps/unix/sysv/linux/alpha/sys/sysmacros.h new file mode 100644 index 0000000000..ca5d44ffb9 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/sys/sysmacros.h @@ -0,0 +1,29 @@ +/* Definitions of macros to access `dev_t' values. + Copyright (C) 1996, 1997, 1999 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_SYSMACROS_H +#define _SYS_SYSMACROS_H 1 + +/* For compatibility we provide alternative names. */ +#define major(dev) ((int)(((dev) >> 8) & 0xff)) +#define minor(dev) ((int)((dev) & 0xff)) +#define makedev(major, minor) ((((unsigned int) (major)) << 8) \ + | ((unsigned int) (minor))) + +#endif /* sys/sysmacros.h */ From 4d1f7dc129fa500c4fb49e68e2acc44576afb52f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 19 Jun 1999 09:47:58 +0000 Subject: [PATCH 1590/4487] Include libintl.h. --- sysdeps/mach/hurd/mips/dl-machine.c | 1 + sysdeps/unix/sysv/linux/arm/siglist.c | 1 + sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c | 1 + 3 files changed, 3 insertions(+) diff --git a/sysdeps/mach/hurd/mips/dl-machine.c b/sysdeps/mach/hurd/mips/dl-machine.c index 18261e1115..e4955e441d 100644 --- a/sysdeps/mach/hurd/mips/dl-machine.c +++ b/sysdeps/mach/hurd/mips/dl-machine.c @@ -31,6 +31,7 @@ #include #include #include +#include void weak_function abort (void) diff --git a/sysdeps/unix/sysv/linux/arm/siglist.c b/sysdeps/unix/sysv/linux/arm/siglist.c index 9a539604ff..5d3a9afc53 100644 --- a/sysdeps/unix/sysv/linux/arm/siglist.c +++ b/sysdeps/unix/sysv/linux/arm/siglist.c @@ -19,6 +19,7 @@ #include #include #include +#include #if defined HAVE_ELF && defined PIC && defined DO_VERSIONING # define SYS_SIGLIST __new_sys_siglist diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c b/sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c index 5d642e47f1..fd8a503ef4 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c @@ -17,6 +17,7 @@ Boston, MA 02111-1307, USA. */ #include +#include /* This is a list of all known `errno' codes. */ From e261a74e1620973f340f4d7d769a5030c2db9445 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 19 Jun 1999 09:57:23 +0000 Subject: [PATCH 1591/4487] Use __GNUC_PREREQ. --- sysdeps/alpha/fpu/bits/mathinline.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h index 681ea70cf9..9207d52f6a 100644 --- a/sysdeps/alpha/fpu/bits/mathinline.h +++ b/sysdeps/alpha/fpu/bits/mathinline.h @@ -75,7 +75,7 @@ __inline_copysign(copysign, double) #undef __MATH_INLINE_copysign -#if defined __GNUC__ && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8)) +#if __GNUC_PREREQ (2, 8) __MATH_INLINE float __fabsf (float __x) { return __builtin_fabsf (__x); } __MATH_INLINE float fabsf (float __x) { return __builtin_fabsf (__x); } __MATH_INLINE double __fabs (double __x) { return __builtin_fabs (__x); } From ad5ec55ca3fccbd4147d6a40ac3a2117c6490b2d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 21 Jun 1999 13:00:14 +0000 Subject: [PATCH 1592/4487] Correct counting of subsections. --- sysdeps/alpha/atomicity.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sysdeps/alpha/atomicity.h b/sysdeps/alpha/atomicity.h index 34a538f4c0..6ed2ee61ed 100644 --- a/sysdeps/alpha/atomicity.h +++ b/sysdeps/alpha/atomicity.h @@ -36,10 +36,10 @@ exchange_and_add (volatile uint32_t *mem, int val) "addl %0,%4,%1\n\t" "stl_c %1,%2\n\t" "beq %1,2f\n" - ".subsection 2\n" + ".subsection 1\n" "2:\t" "br 1b\n" - ".subsection 1\n\t" + ".previous\n\t" "mb\n\t" "/* End exchange & add */" : "=&r"(result), "=&r"(tmp), "=m"(*mem) @@ -61,10 +61,10 @@ atomic_add (volatile uint32_t *mem, int val) "addl %0,%3,%0\n\t" "stl_c %0,%1\n\t" "beq %0,2f\n\t" - ".subsection 2\n" + ".subsection 1\n" "2:\t" "br 1b\n" - ".subsection 1\n\t" + ".previous\n\t" "mb\n\t" "/* End exchange & add */" : "=&r"(result), "=m"(*mem) @@ -86,10 +86,10 @@ compare_and_swap (volatile long int *p, long int oldval, long int newval) "mov %3,%0\n\t" "stq_c %0,%1\n\t" "beq %0,2f\n\t" - ".subsection 2\n" + ".subsection 1\n" "2:\t" "br 1b\n" - ".subsection 1\n\t" + ".previous\n\t" "3:\t" "mb\n\t" "/* End compare & swap */" From 5da9d1244a543df757854911b09e48129e0b9ede Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 26 Jun 1999 16:43:55 +0000 Subject: [PATCH 1593/4487] * sysdeps/m68k/fpu/bits/mathinline.h: Move all libm internal definitions... * sysdeps/m68k/fpu/mathimpl.h: ... here. New file. * sysdeps/m68k/fpu/e_acos.c: Include "mathimpl.h". * sysdeps/m68k/fpu/e_atan2.c: Likewise. * sysdeps/m68k/fpu/e_fmod.c: Likewise. * sysdeps/m68k/fpu/e_pow.c: Likewise. * sysdeps/m68k/fpu/e_scalb.c: Likewise. * sysdeps/m68k/fpu/s_ccos.c: Likewise. * sysdeps/m68k/fpu/s_ccosh.c: Likewise. * sysdeps/m68k/fpu/s_cexp.c: Likewise. * sysdeps/m68k/fpu/s_csin.c: Likewise. * sysdeps/m68k/fpu/s_csinh.c: Likewise. * sysdeps/m68k/fpu/s_ilogb.c: Likewise. * sysdeps/m68k/fpu/s_llrint.c: Likewise. * sysdeps/m68k/fpu/s_llrintf.c: Likewise. * sysdeps/m68k/fpu/s_llrintl.c: Likewise. * sysdeps/m68k/fpu/s_modf.c: Likewise. --- sysdeps/m68k/fpu/bits/mathinline.h | 63 +------------------- sysdeps/m68k/fpu/e_acos.c | 3 +- sysdeps/m68k/fpu/e_atan2.c | 3 +- sysdeps/m68k/fpu/e_fmod.c | 3 +- sysdeps/m68k/fpu/e_pow.c | 3 +- sysdeps/m68k/fpu/e_scalb.c | 3 +- sysdeps/m68k/fpu/mathimpl.h | 93 ++++++++++++++++++++++++++++++ sysdeps/m68k/fpu/s_ccos.c | 3 +- sysdeps/m68k/fpu/s_ccosh.c | 3 +- sysdeps/m68k/fpu/s_cexp.c | 3 +- sysdeps/m68k/fpu/s_csin.c | 3 +- sysdeps/m68k/fpu/s_csinh.c | 3 +- sysdeps/m68k/fpu/s_ilogb.c | 3 +- sysdeps/m68k/fpu/s_llrint.c | 3 +- sysdeps/m68k/fpu/s_llrintf.c | 3 +- sysdeps/m68k/fpu/s_llrintl.c | 3 +- sysdeps/m68k/fpu/s_modf.c | 3 +- 17 files changed, 125 insertions(+), 76 deletions(-) create mode 100644 sysdeps/m68k/fpu/mathimpl.h diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/fpu/bits/mathinline.h index b1e2a75f1b..c753fae827 100644 --- a/sysdeps/m68k/fpu/bits/mathinline.h +++ b/sysdeps/m68k/fpu/bits/mathinline.h @@ -1,5 +1,5 @@ /* Definitions of inline math functions implemented by the m68881/2. - Copyright (C) 1991, 92, 93, 94, 96, 97, 98 Free Software Foundation, Inc. + Copyright (C) 1991,92,93,94,96,97,98,99 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 @@ -116,22 +116,6 @@ return __result; \ } -#ifdef __LIBC_INTERNAL_MATH_INLINES -/* ieee style elementary functions */ -/* These are internal to the implementation of libm. */ -__inline_mathop(__ieee754_acos, acos) -__inline_mathop(__ieee754_asin, asin) -__inline_mathop(__ieee754_cosh, cosh) -__inline_mathop(__ieee754_sinh, sinh) -__inline_mathop(__ieee754_exp, etox) -__inline_mathop(__ieee754_exp2, twotox) -__inline_mathop(__ieee754_exp10, tentox) -__inline_mathop(__ieee754_log10, log10) -__inline_mathop(__ieee754_log, logn) -__inline_mathop(__ieee754_sqrt, sqrt) -__inline_mathop(__ieee754_atanh, atanh) -#endif - __inline_mathop(__atan, atan) __inline_mathop(__cos, cos) __inline_mathop(__sin, sin) @@ -180,52 +164,9 @@ __inline_mathop(trunc, intrz) #endif /* !__NO_MATH_INLINES && __OPTIMIZE__ */ /* This macro contains the definition for the rest of the inline - functions, using __FLOAT_TYPE as the domain type and __S as the suffix + functions, using FLOAT_TYPE as the domain type and S as the suffix for the function names. */ -#ifdef __LIBC_INTERNAL_MATH_INLINES -/* Internally used functions. */ -# define __internal_inline_functions(float_type, s) \ -__m81_defun (float_type, __CONCAT(__ieee754_remainder,s), \ - (float_type __x, float_type __y)) \ -{ \ - float_type __result; \ - __asm("frem%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); \ - return __result; \ -} \ - \ -__m81_defun (float_type, __CONCAT(__ieee754_fmod,s), \ - (float_type __x, float_type __y)) \ -{ \ - float_type __result; \ - __asm("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); \ - return __result; \ -} - -__internal_inline_functions (double,) -__internal_inline_functions (float,f) -__internal_inline_functions (long double,l) -# undef __internal_inline_functions - -/* Get the m68881 condition codes, to quickly check multiple conditions. */ -static __inline__ unsigned long -__m81_test (long double __val) -{ - unsigned long __fpsr; - __asm ("ftst%.x %1; fmove%.l %/fpsr,%0" : "=dm" (__fpsr) : "f" (__val)); - return __fpsr; -} - -/* Bit values returned by __m81_test. */ -# define __M81_COND_NAN (1 << 24) -# define __M81_COND_INF (2 << 24) -# define __M81_COND_ZERO (4 << 24) -# define __M81_COND_NEG (8 << 24) - -#endif /* __LIBC_INTENRAL_MATH_INLINES */ - -/* The rest of the functions are available to the user. */ - #define __inline_functions(float_type, s) \ __m81_inline float_type \ __m81_u(__CONCAT(__frexp,s))(float_type __value, int *__expptr) \ diff --git a/sysdeps/m68k/fpu/e_acos.c b/sysdeps/m68k/fpu/e_acos.c index 80803ff80f..4226b73265 100644 --- a/sysdeps/m68k/fpu/e_acos.c +++ b/sysdeps/m68k/fpu/e_acos.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1999 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 @@ -18,6 +18,7 @@ #include #include "math_private.h" +#include "mathimpl.h" #ifndef FUNC #define FUNC __ieee754_acos diff --git a/sysdeps/m68k/fpu/e_atan2.c b/sysdeps/m68k/fpu/e_atan2.c index 7b275b4048..6a5af2a9c0 100644 --- a/sysdeps/m68k/fpu/e_atan2.c +++ b/sysdeps/m68k/fpu/e_atan2.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1999 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 @@ -18,6 +18,7 @@ #include #include "math_private.h" +#include "mathimpl.h" #ifndef SUFF #define SUFF diff --git a/sysdeps/m68k/fpu/e_fmod.c b/sysdeps/m68k/fpu/e_fmod.c index 9e59a43302..9695a863ff 100644 --- a/sysdeps/m68k/fpu/e_fmod.c +++ b/sysdeps/m68k/fpu/e_fmod.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1999 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 @@ -18,6 +18,7 @@ #include #include "math_private.h" +#include "mathimpl.h" #ifndef FUNC #define FUNC __ieee754_fmod diff --git a/sysdeps/m68k/fpu/e_pow.c b/sysdeps/m68k/fpu/e_pow.c index ee95a39395..3dc3d819ab 100644 --- a/sysdeps/m68k/fpu/e_pow.c +++ b/sysdeps/m68k/fpu/e_pow.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1999 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 @@ -18,6 +18,7 @@ #include #include "math_private.h" +#include "mathimpl.h" #ifndef SUFF #define SUFF diff --git a/sysdeps/m68k/fpu/e_scalb.c b/sysdeps/m68k/fpu/e_scalb.c index ef1724b036..22332ca3ad 100644 --- a/sysdeps/m68k/fpu/e_scalb.c +++ b/sysdeps/m68k/fpu/e_scalb.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab . @@ -18,6 +18,7 @@ Boston, MA 02111-1307, USA. */ #include +#include "mathimpl.h" #ifndef SUFF #define SUFF diff --git a/sysdeps/m68k/fpu/mathimpl.h b/sysdeps/m68k/fpu/mathimpl.h new file mode 100644 index 0000000000..a2785b21b4 --- /dev/null +++ b/sysdeps/m68k/fpu/mathimpl.h @@ -0,0 +1,93 @@ +/* Definitions of libc internal inline math functions implemented + by the m68881/2. + Copyright (C) 1991,92,93,94,96,97,98,99 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* This file contains the definitions of the inline math functions that + are only used internally inside libm, not visible to the user. */ + +__inline_mathop (__ieee754_acos, acos) +__inline_mathop (__ieee754_asin, asin) +__inline_mathop (__ieee754_cosh, cosh) +__inline_mathop (__ieee754_sinh, sinh) +__inline_mathop (__ieee754_exp, etox) +__inline_mathop (__ieee754_exp2, twotox) +__inline_mathop (__ieee754_exp10, tentox) +__inline_mathop (__ieee754_log10, log10) +__inline_mathop (__ieee754_log, logn) +__inline_mathop (__ieee754_sqrt, sqrt) +__inline_mathop (__ieee754_atanh, atanh) + +__m81_defun (double, __ieee754_remainder, (double __x, double __y)) +{ + double __result; + __asm ("frem%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); + return __result; +} + +__m81_defun (float, __ieee754_remainderf, (float __x, float __y)) +{ + float __result; + __asm ("frem%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); + return __result; +} + +__m81_defun (long double, + __ieee754_remainderl, (long double __x, long double __y)) +{ + long double __result; + __asm ("frem%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); + return __result; +} + +__m81_defun (double, __ieee754_fmod, (double __x, double __y)) +{ + double __result; + __asm ("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); + return __result; +} + +__m81_defun (float, __ieee754_fmodf, (float __x, float __y)) +{ + float __result; + __asm ("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); + return __result; +} + +__m81_defun (long double, + __ieee754_fmodl, (long double __x, long double __y)) +{ + long double __result; + __asm ("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); + return __result; +} + +/* Get the m68881 condition codes, to quickly check multiple conditions. */ +static __inline__ unsigned long +__m81_test (long double __val) +{ + unsigned long __fpsr; + __asm ("ftst%.x %1; fmove%.l %/fpsr,%0" : "=dm" (__fpsr) : "f" (__val)); + return __fpsr; +} + +/* Bit values returned by __m81_test. */ +#define __M81_COND_NAN (1 << 24) +#define __M81_COND_INF (2 << 24) +#define __M81_COND_ZERO (4 << 24) +#define __M81_COND_NEG (8 << 24) diff --git a/sysdeps/m68k/fpu/s_ccos.c b/sysdeps/m68k/fpu/s_ccos.c index fbd5ef5388..6f1232f99a 100644 --- a/sysdeps/m68k/fpu/s_ccos.c +++ b/sysdeps/m68k/fpu/s_ccos.c @@ -1,5 +1,5 @@ /* Complex cosine function. m68k fpu version - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab . @@ -20,6 +20,7 @@ #include #include +#include "mathimpl.h" #ifndef SUFF #define SUFF diff --git a/sysdeps/m68k/fpu/s_ccosh.c b/sysdeps/m68k/fpu/s_ccosh.c index af751430de..437d42dfe8 100644 --- a/sysdeps/m68k/fpu/s_ccosh.c +++ b/sysdeps/m68k/fpu/s_ccosh.c @@ -1,5 +1,5 @@ /* Complex cosine hyperbole function. m68k fpu version - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab . @@ -20,6 +20,7 @@ #include #include +#include "mathimpl.h" #ifndef SUFF #define SUFF diff --git a/sysdeps/m68k/fpu/s_cexp.c b/sysdeps/m68k/fpu/s_cexp.c index fcf87ed687..899fdc4785 100644 --- a/sysdeps/m68k/fpu/s_cexp.c +++ b/sysdeps/m68k/fpu/s_cexp.c @@ -1,5 +1,5 @@ /* Complex exponential function. m68k fpu version - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab @@ -20,6 +20,7 @@ #include #include +#include "mathimpl.h" #ifndef SUFF #define SUFF diff --git a/sysdeps/m68k/fpu/s_csin.c b/sysdeps/m68k/fpu/s_csin.c index 72214c4cff..11e217b9b6 100644 --- a/sysdeps/m68k/fpu/s_csin.c +++ b/sysdeps/m68k/fpu/s_csin.c @@ -1,5 +1,5 @@ /* Complex sine function. m68k fpu version - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab . @@ -20,6 +20,7 @@ #include #include +#include "mathimpl.h" #ifndef SUFF #define SUFF diff --git a/sysdeps/m68k/fpu/s_csinh.c b/sysdeps/m68k/fpu/s_csinh.c index e829f4d3ae..4dfbe129b4 100644 --- a/sysdeps/m68k/fpu/s_csinh.c +++ b/sysdeps/m68k/fpu/s_csinh.c @@ -1,5 +1,5 @@ /* Complex sine hyperbole function. m68k fpu version - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab . @@ -20,6 +20,7 @@ #include #include +#include "mathimpl.h" #ifndef SUFF #define SUFF diff --git a/sysdeps/m68k/fpu/s_ilogb.c b/sysdeps/m68k/fpu/s_ilogb.c index ef90946f59..15cff29c60 100644 --- a/sysdeps/m68k/fpu/s_ilogb.c +++ b/sysdeps/m68k/fpu/s_ilogb.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1999 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 @@ -17,6 +17,7 @@ Boston, MA 02111-1307, USA. */ #include +#include "mathimpl.h" #ifndef SUFF #define SUFF diff --git a/sysdeps/m68k/fpu/s_llrint.c b/sysdeps/m68k/fpu/s_llrint.c index 423939aa0b..b733d77260 100644 --- a/sysdeps/m68k/fpu/s_llrint.c +++ b/sysdeps/m68k/fpu/s_llrint.c @@ -1,6 +1,6 @@ /* Round argument to nearest integral value according to current rounding direction. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab @@ -21,6 +21,7 @@ #include #include "math_private.h" +#include "mathimpl.h" long long int __llrint (double x) diff --git a/sysdeps/m68k/fpu/s_llrintf.c b/sysdeps/m68k/fpu/s_llrintf.c index 0cd12c9920..b9ba5a0148 100644 --- a/sysdeps/m68k/fpu/s_llrintf.c +++ b/sysdeps/m68k/fpu/s_llrintf.c @@ -1,6 +1,6 @@ /* Round argument to nearest integral value according to current rounding direction. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab @@ -21,6 +21,7 @@ #include #include "math_private.h" +#include "mathimpl.h" long long int __llrintf (float x) diff --git a/sysdeps/m68k/fpu/s_llrintl.c b/sysdeps/m68k/fpu/s_llrintl.c index 6f63e0bcd1..c874bfdde0 100644 --- a/sysdeps/m68k/fpu/s_llrintl.c +++ b/sysdeps/m68k/fpu/s_llrintl.c @@ -1,6 +1,6 @@ /* Round argument to nearest integral value according to current rounding direction. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab @@ -21,6 +21,7 @@ #include #include "math_private.h" +#include "mathimpl.h" long long int __llrintl (long double x) diff --git a/sysdeps/m68k/fpu/s_modf.c b/sysdeps/m68k/fpu/s_modf.c index 52ee64caad..d19f2a7f89 100644 --- a/sysdeps/m68k/fpu/s_modf.c +++ b/sysdeps/m68k/fpu/s_modf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1999 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 @@ -17,6 +17,7 @@ Boston, MA 02111-1307, USA. */ #include +#include "mathimpl.h" #ifndef SUFF #define SUFF From d38f39d0054f5528a589ef0b97fff978571b38f4 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 26 Jun 1999 18:11:01 +0000 Subject: [PATCH 1594/4487] New file. --- sysdeps/m68k/fpu/Dist | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/m68k/fpu/Dist diff --git a/sysdeps/m68k/fpu/Dist b/sysdeps/m68k/fpu/Dist new file mode 100644 index 0000000000..e649e8d55e --- /dev/null +++ b/sysdeps/m68k/fpu/Dist @@ -0,0 +1 @@ +mathimpl.h From 05246799a60cd0172f46e443f42b2054a9f9cded Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 6 Jul 1999 16:06:12 +0000 Subject: [PATCH 1595/4487] Update for some more motherboards. --- sysdeps/unix/sysv/linux/alpha/ioperm.c | 383 +++++++++++++++---------- 1 file changed, 228 insertions(+), 155 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c index bd642e33c8..5b2edd0482 100644 --- a/sysdeps/unix/sysv/linux/alpha/ioperm.c +++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger. @@ -86,11 +86,21 @@ #define TSUNAMI_IO_BASE (0x00000801fc000000UL + 0xfffffc0000000000UL) #define TSUNAMI_DENSE_MEM (0x0000080000000000UL + 0xfffffc0000000000UL) +/* Polaris has SPARSE space, but we prefer to use only DENSE */ +/* because of some idiosyncracies in actually using SPARSE */ +#define POLARIS_IO_BASE (0xfffffcf9fc000000UL) +#define POLARIS_DENSE_MEM (0xfffffcf900000000UL) + typedef enum { IOSYS_UNKNOWN, IOSYS_JENSEN, IOSYS_APECS, IOSYS_CIA, IOSYS_T2, - IOSYS_TSUNAMI, IOSYS_MCPCIA, IOSYS_GAMMA, IOSYS_CPUDEP + IOSYS_TSUNAMI, IOSYS_MCPCIA, IOSYS_GAMMA, IOSYS_POLARIS, + IOSYS_CPUDEP, IOSYS_PCIDEP } iosys_t; +typedef enum { + IOSWIZZLE_JENSEN, IOSWIZZLE_SPARSE, IOSWIZZLE_DENSE +} ioswizzle_t; + static struct io_system { int hae_shift; unsigned long int bus_memory_base; @@ -105,7 +115,9 @@ static struct io_system { /* TSUNAMI */ {0, TSUNAMI_DENSE_MEM, 0, TSUNAMI_IO_BASE}, /* MCPCIA */ {5, MCPCIA_DENSE_MEM, MCPCIA_SPARSE_MEM, MCPCIA_IO_BASE}, /* GAMMA */ {5, GAMMA_DENSE_MEM, GAMMA_SPARSE_MEM, GAMMA_IO_BASE}, -/* CPUDEP */ {0, 0, 0, 0}, +/* POLARIS */ {0, POLARIS_DENSE_MEM, 0, POLARIS_IO_BASE}, +/* CPUDEP */ {0, 0, 0, 0}, /* for platforms dependent on CPU type */ +/* PCIDEP */ {0, 0, 0, 0}, /* for platforms dependent on core logic */ }; static struct platform { @@ -116,7 +128,7 @@ static struct platform { {"Avanti", IOSYS_APECS}, {"XL", IOSYS_APECS}, {"Cabriolet", IOSYS_APECS}, - {"EB164", IOSYS_CIA}, + {"EB164", IOSYS_PCIDEP}, {"EB64+", IOSYS_APECS}, {"EB66", IOSYS_APECS}, {"EB66P", IOSYS_APECS}, @@ -153,38 +165,27 @@ static struct { unsigned long int sparse_bus_memory_base; unsigned long int io_base; iosys_t sys; + ioswizzle_t swiz; int hae_shift; } io; extern void __sethae (unsigned long int); /* we can't use asm/io.h */ - static inline unsigned long int -port_to_cpu_addr (unsigned long int port, iosys_t iosys, int size) +port_to_cpu_addr (unsigned long int port, ioswizzle_t ioswiz, int size) { - if (iosys == IOSYS_JENSEN) - return (port << 7) + ((size - 1) << 5) + io.base; - else if (iosys == IOSYS_TSUNAMI) + if (ioswiz == IOSWIZZLE_SPARSE) + return (port << 5) + ((size - 1) << 3) + io.base; + else if (ioswiz == IOSWIZZLE_DENSE) return port + io.base; else - return (port << 5) + ((size - 1) << 3) + io.base; + return (port << 7) + ((size - 1) << 5) + io.base; } - static inline void -inline_sethae (unsigned long int addr, iosys_t iosys) +inline_sethae (unsigned long int addr, ioswizzle_t ioswiz) { - if (iosys == IOSYS_JENSEN) - { - /* hae on the Jensen is bits 31:25 shifted right */ - addr >>= 25; - if (addr != io.hae.cache) - { - __sethae (addr); - io.hae.cache = addr; - } - } - else + if (ioswiz == IOSWIZZLE_SPARSE) { unsigned long int msb; @@ -196,16 +197,25 @@ inline_sethae (unsigned long int addr, iosys_t iosys) io.hae.cache = msb; } } + else + { + /* hae on the Jensen is bits 31:25 shifted right */ + addr >>= 25; + if (addr != io.hae.cache) + { + __sethae (addr); + io.hae.cache = addr; + } + } } - static inline void -inline_outb (unsigned char b, unsigned long int port, iosys_t iosys) +inline_outb (unsigned char b, unsigned long int port, ioswizzle_t ioswiz) { unsigned int w; - unsigned long int addr = port_to_cpu_addr (port, iosys, 1); + unsigned long int addr = port_to_cpu_addr (port, ioswiz, 1); - inline_sethae (0, iosys); + inline_sethae (0, ioswiz); asm ("insbl %2,%1,%0" : "=r" (w) : "ri" (port & 0x3), "r" (b)); *(vuip)addr = w; mb (); @@ -213,12 +223,12 @@ inline_outb (unsigned char b, unsigned long int port, iosys_t iosys) static inline void -inline_outw (unsigned short int b, unsigned long int port, iosys_t iosys) +inline_outw (unsigned short int b, unsigned long int port, ioswizzle_t ioswiz) { unsigned int w; - unsigned long int addr = port_to_cpu_addr (port, iosys, 2); + unsigned long int addr = port_to_cpu_addr (port, ioswiz, 2); - inline_sethae (0, iosys); + inline_sethae (0, ioswiz); asm ("inswl %2,%1,%0" : "=r" (w) : "ri" (port & 0x3), "r" (b)); *(vuip)addr = w; mb (); @@ -226,22 +236,22 @@ inline_outw (unsigned short int b, unsigned long int port, iosys_t iosys) static inline void -inline_outl (unsigned int b, unsigned long int port, iosys_t iosys) +inline_outl (unsigned int b, unsigned long int port, ioswizzle_t ioswiz) { - unsigned long int addr = port_to_cpu_addr (port, iosys, 4); + unsigned long int addr = port_to_cpu_addr (port, ioswiz, 4); - inline_sethae (0, iosys); + inline_sethae (0, ioswiz); *(vuip)addr = b; mb (); } static inline unsigned int -inline_inb (unsigned long int port, iosys_t iosys) +inline_inb (unsigned long int port, ioswizzle_t ioswiz) { - unsigned long int result, addr = port_to_cpu_addr (port, iosys, 1); + unsigned long int result, addr = port_to_cpu_addr (port, ioswiz, 1); - inline_sethae (0, iosys); + inline_sethae (0, ioswiz); result = *(vuip) addr; result >>= (port & 3) * 8; return 0xffUL & result; @@ -249,11 +259,11 @@ inline_inb (unsigned long int port, iosys_t iosys) static inline unsigned int -inline_inw (unsigned long int port, iosys_t iosys) +inline_inw (unsigned long int port, ioswizzle_t ioswiz) { - unsigned long int result, addr = port_to_cpu_addr (port, iosys, 2); + unsigned long int result, addr = port_to_cpu_addr (port, ioswiz, 2); - inline_sethae (0, iosys); + inline_sethae (0, ioswiz); result = *(vuip) addr; result >>= (port & 3) * 8; return 0xffffUL & result; @@ -261,11 +271,11 @@ inline_inw (unsigned long int port, iosys_t iosys) static inline unsigned int -inline_inl (unsigned long int port, iosys_t iosys) +inline_inl (unsigned long int port, ioswizzle_t ioswiz) { - unsigned long int addr = port_to_cpu_addr (port, iosys, 4); + unsigned long int addr = port_to_cpu_addr (port, ioswiz, 4); - inline_sethae (0, iosys); + inline_sethae (0, ioswiz); return *(vuip) addr; } @@ -274,115 +284,115 @@ inline_inl (unsigned long int port, iosys_t iosys) * and whose core logic supports I/O space accesses utilizing them. * * These routines could be used by MIATA, for example, because it has - * and EV56 plus PYXIS, but it currently uses SPARSE anyway. + * and EV56 plus PYXIS, but it currently uses SPARSE anyway. This is + * also true of RX164 which used POLARIS, but we will choose to use + * these routines in that case instead of SPARSE. * * These routines are necessary for TSUNAMI/TYPHOON based platforms, * which will have (at least) EV6. */ +static inline unsigned long int +dense_port_to_cpu_addr (unsigned long int port) +{ + return port + io.base; +} + static inline void -inline_bwx_outb (unsigned char b, unsigned long int port, iosys_t iosys) +inline_bwx_outb (unsigned char b, unsigned long int port) { - unsigned long int addr = port_to_cpu_addr (port, iosys, 4); + unsigned long int addr = dense_port_to_cpu_addr (port); __asm__ __volatile__ ("stb %1,%0" : : "m"(*(unsigned char *)addr), "r"(b)); mb (); } - static inline void -inline_bwx_outw (unsigned short int b, unsigned long int port, iosys_t iosys) +inline_bwx_outw (unsigned short int b, unsigned long int port) { - unsigned long int addr = port_to_cpu_addr (port, iosys, 4); + unsigned long int addr = dense_port_to_cpu_addr (port); __asm__ __volatile__ ("stw %1,%0" : : "m"(*(unsigned short *)addr), "r"(b)); mb (); } - static inline void -inline_bwx_outl (unsigned int b, unsigned long int port, iosys_t iosys) +inline_bwx_outl (unsigned int b, unsigned long int port) { - unsigned long int addr = port_to_cpu_addr (port, iosys, 4); + unsigned long int addr = dense_port_to_cpu_addr (port); *(vuip)addr = b; mb (); } - static inline unsigned int -inline_bwx_inb (unsigned long int port, iosys_t iosys) +inline_bwx_inb (unsigned long int port) { - unsigned long int r, addr = port_to_cpu_addr (port, iosys, 1); + unsigned long int r, addr = dense_port_to_cpu_addr (port); __asm__ __volatile__ ("ldbu %0,%1" : "=r"(r) : "m"(*(unsigned char *)addr)); return 0xffUL & r; } - static inline unsigned int -inline_bwx_inw (unsigned long int port, iosys_t iosys) +inline_bwx_inw (unsigned long int port) { - unsigned long int r, addr = port_to_cpu_addr (port, iosys, 1); + unsigned long int r, addr = dense_port_to_cpu_addr (port); __asm__ __volatile__ ("ldwu %0,%1" : "=r"(r) : "m"(*(unsigned short *)addr)); return 0xffffUL & r; } - static inline unsigned int -inline_bwx_inl (unsigned long int port, iosys_t iosys) +inline_bwx_inl (unsigned long int port) { - unsigned long int addr = port_to_cpu_addr (port, iosys, 4); + unsigned long int addr = dense_port_to_cpu_addr (port); return *(vuip) addr; } +/* macros to define routines with appropriate names and functions */ -#define DCL_SETHAE(name, iosys) \ -static void \ -name##_sethae (unsigned long int addr) \ -{ \ - inline_sethae (addr, IOSYS_##iosys); \ +/* these do either SPARSE or JENSEN swizzle */ + +#define DCL_SETHAE(name, ioswiz) \ +static void \ +name##_sethae (unsigned long int addr) \ +{ \ + inline_sethae (addr, IOSWIZZLE_##ioswiz); \ } -#define DCL_OUT(name, func, type, iosys) \ +#define DCL_OUT(name, func, type, ioswiz) \ static void \ name##_##func (unsigned type b, unsigned long int addr) \ { \ - inline_##func (b, addr, IOSYS_##iosys); \ + inline_##func (b, addr, IOSWIZZLE_##ioswiz); \ } - -#define DCL_IN(name, func, iosys) \ +#define DCL_IN(name, func, ioswiz) \ static unsigned int \ name##_##func (unsigned long int addr) \ { \ - return inline_##func (addr, IOSYS_##iosys); \ + return inline_##func (addr, IOSWIZZLE_##ioswiz); \ } -#define DCL_SETHAE_IGNORE(name, iosys) \ -static void \ -name##_sethae (unsigned long int addr) \ -{ \ -/* do nothing */ \ -} +/* these do DENSE, so no swizzle is needed */ -#define DCL_OUT_BWX(name, func, type, iosys) \ +#define DCL_OUT_BWX(name, func, type) \ static void \ name##_##func (unsigned type b, unsigned long int addr) \ { \ - inline_bwx_##func (b, addr, IOSYS_##iosys); \ + inline_bwx_##func (b, addr); \ } - -#define DCL_IN_BWX(name, func, iosys) \ +#define DCL_IN_BWX(name, func) \ static unsigned int \ name##_##func (unsigned long int addr) \ { \ - return inline_bwx_##func (addr, IOSYS_##iosys); \ + return inline_bwx_##func (addr); \ } +/* now declare/define the necessary routines */ DCL_SETHAE(jensen, JENSEN) DCL_OUT(jensen, outb, char, JENSEN) @@ -392,25 +402,22 @@ DCL_IN(jensen, inb, JENSEN) DCL_IN(jensen, inw, JENSEN) DCL_IN(jensen, inl, JENSEN) -/* The APECS functions are also used for CIA since they are - identical. */ - -DCL_SETHAE(apecs, APECS) -DCL_OUT(apecs, outb, char, APECS) -DCL_OUT(apecs, outw, short int, APECS) -DCL_OUT(apecs, outl, int, APECS) -DCL_IN(apecs, inb, APECS) -DCL_IN(apecs, inw, APECS) -DCL_IN(apecs, inl, APECS) - -DCL_SETHAE_IGNORE(tsunami, TSUNAMI) -DCL_OUT_BWX(tsunami, outb, char, TSUNAMI) -DCL_OUT_BWX(tsunami, outw, short int, TSUNAMI) -DCL_OUT_BWX(tsunami, outl, int, TSUNAMI) -DCL_IN_BWX(tsunami, inb, TSUNAMI) -DCL_IN_BWX(tsunami, inw, TSUNAMI) -DCL_IN_BWX(tsunami, inl, TSUNAMI) - +DCL_SETHAE(sparse, SPARSE) +DCL_OUT(sparse, outb, char, SPARSE) +DCL_OUT(sparse, outw, short int, SPARSE) +DCL_OUT(sparse, outl, int, SPARSE) +DCL_IN(sparse, inb, SPARSE) +DCL_IN(sparse, inw, SPARSE) +DCL_IN(sparse, inl, SPARSE) + +DCL_OUT_BWX(dense, outb, char) +DCL_OUT_BWX(dense, outw, short int) +DCL_OUT_BWX(dense, outl, int) +DCL_IN_BWX(dense, inb) +DCL_IN_BWX(dense, inw) +DCL_IN_BWX(dense, inl) + +/* define the "swizzle" switch */ static struct ioswtch ioswtch[] = { { jensen_sethae, @@ -418,18 +425,63 @@ static struct ioswtch ioswtch[] = { jensen_inb, jensen_inw, jensen_inl }, { - apecs_sethae, - apecs_outb, apecs_outw, apecs_outl, - apecs_inb, apecs_inw, apecs_inl + sparse_sethae, + sparse_outb, sparse_outw, sparse_outl, + sparse_inb, sparse_inw, sparse_inl }, { - tsunami_sethae, - tsunami_outb, tsunami_outw, tsunami_outl, - tsunami_inb, tsunami_inw, tsunami_inl + NULL, + dense_outb, dense_outw, dense_outl, + dense_inb, dense_inw, dense_inl } }; +/* routine to process the /proc/cpuinfo information into the fields */ +/* that are required for correctly determining the platform parameters */ + +char systype[256]; /* system type field */ +char sysvari[256]; /* system variation field */ +char cpumodel[256]; /* cpu model field */ +int got_type, got_vari, got_model; + +static int +process_cpuinfo(void) +{ + char dummy[256]; + FILE * fp; + fp = fopen (PATH_CPUINFO, "r"); + if (!fp) + return 0; + + got_type = got_vari = got_model = 0; + systype[0] = sysvari[0] = cpumodel[0] = 0; + + while (1) + { + if (fgets (dummy, 256, fp) == NULL) break; + /* fprintf(stderr, "read: %s", dummy); */ + if (!got_type && + sscanf (dummy, "system type : %256[^\n]\n", systype) == 1) + got_type = 1; + if (!got_vari && + sscanf (dummy, "system variation : %256[^\n]\n", sysvari) == 1) + got_vari = 1; + if (!got_model && + sscanf (dummy, "cpu model : %256[^\n]\n", cpumodel) == 1) + got_model = 1; + } + + fclose (fp); + +#if 1 + fprintf(stderr, "system type: %s\n", systype); + fprintf(stderr, "system vari: %s\n", sysvari); + fprintf(stderr, "cpu model: %s\n", cpumodel); +#endif + + return got_type+got_vari+got_model; +} /* * Initialize I/O system. To determine what I/O system we're dealing * with, we first try to read the value of symlink PATH_ALPHA_SYSTYPE, @@ -443,7 +495,6 @@ static struct ioswtch ioswtch[] = { static int init_iosys (void) { - char systype[256]; int i, n; n = readlink (PATH_ALPHA_SYSTYPE, systype, sizeof (systype) - 1); @@ -456,7 +507,8 @@ init_iosys (void) &io.bus_memory_base, &io.sparse_bus_memory_base) == 4) { io.sys = IOSYS_UNKNOWN; - io.swp = &ioswtch[1]; + io.swiz = IOSWIZZLE_SPARSE; + io.swp = &ioswtch[IOSWIZZLE_SPARSE]; return 0; } /* else we're likely going to fail with the system match below */ @@ -464,22 +516,9 @@ init_iosys (void) } else { - FILE * fp; + n = process_cpuinfo(); - fp = fopen (PATH_CPUINFO, "r"); - if (!fp) - return -1; - while ((n = fscanf (fp, "system type : %256[^\n]\n", systype)) - != EOF) - { - if (n == 1) - break; - else - fgets (systype, 256, fp); - } - fclose (fp); - - if (n == EOF) + if (!n) { /* this can happen if the format of /proc/cpuinfo changes... */ fprintf (stderr, @@ -497,35 +536,23 @@ init_iosys (void) { io.sys = platform[i].io_sys; /* some platforms can have either EV4 or EV5 CPUs */ - if (io.sys == IOSYS_CPUDEP) + if (io.sys == IOSYS_CPUDEP) /* SABLE or MIKASA or NORITAKE so far */ { - FILE * fp; - char cputype[256]; - fp = fopen (PATH_CPUINFO, "r"); - if (fp == NULL) - return -1; - while ((n = fscanf (fp, "cpu model : %256[^\n]\n", cputype)) - != EOF - && n != 1) - fgets (cputype, 256, fp); - - fclose (fp); - if (strcmp (platform[i].name, "Sable") == 0) { - if (strncmp (cputype, "EV4", 3) == 0) + if (strncmp (cpumodel, "EV4", 3) == 0) io.sys = IOSYS_T2; - else if (strncmp (cputype, "EV5", 3) == 0) + else if (strncmp (cpumodel, "EV5", 3) == 0) io.sys = IOSYS_GAMMA; } else - { - if (strncmp (cputype, "EV4", 3) == 0) + { /* this covers MIKASA/NORITAKE */ + if (strncmp (cpumodel, "EV4", 3) == 0) io.sys = IOSYS_APECS; - else if (strncmp (cputype, "EV5", 3) == 0) + else if (strncmp (cpumodel, "EV5", 3) == 0) io.sys = IOSYS_CIA; } - if (n == EOF || io.sys == IOSYS_CPUDEP) + if (io.sys == IOSYS_CPUDEP) { /* This can happen if the format of /proc/cpuinfo changes.*/ fprintf (stderr, "ioperm.init_iosys(): Unable to determine" @@ -534,23 +561,46 @@ init_iosys (void) return -1; } } + /* some platforms can have different core logic chipsets */ + if (io.sys == IOSYS_PCIDEP) /* EB164 so far */ + { + if (strcmp (systype, "EB164") == 0) + { + if (strncmp (sysvari, "RX164", 5) == 0) + io.sys = IOSYS_POLARIS; + else + io.sys = IOSYS_CIA; + } + if (io.sys == IOSYS_PCIDEP) + { + /* This can happen if the format of /proc/cpuinfo changes.*/ + fprintf (stderr, "ioperm.init_iosys(): Unable to determine" + " core logic chipset.\n"); + __set_errno (ENODEV); + return -1; + } + } io.hae_shift = io_system[io.sys].hae_shift; io.bus_memory_base = io_system[io.sys].bus_memory_base; io.sparse_bus_memory_base = io_system[io.sys].sparse_bus_mem_base; io.io_base = io_system[io.sys].bus_io_base; if (io.sys == IOSYS_JENSEN) - io.swp = &ioswtch[0]; - else if (io.sys == IOSYS_TSUNAMI) - io.swp = &ioswtch[2]; + io.swiz = IOSWIZZLE_JENSEN; + else if (io.sys == IOSYS_TSUNAMI || io.sys == IOSYS_POLARIS) + io.swiz = IOSWIZZLE_DENSE; else - io.swp = &ioswtch[1]; + io.swiz = IOSWIZZLE_SPARSE; + io.swp = &ioswtch[io.swiz]; return 0; } } /* systype is not a know platform name... */ __set_errno (EINVAL); +#if 1 + fprintf(stderr, "init_iosys: platform not recognized\n"); +#endif return -1; } @@ -559,18 +609,29 @@ int _ioperm (unsigned long int from, unsigned long int num, int turn_on) { unsigned long int addr, len; - int prot; + int prot, err; - if (!io.swp && init_iosys () < 0) + if (!io.swp && init_iosys() < 0) { +#if 1 + fprintf(stderr, "ioperm: init_iosys() failed\n"); +#endif return -1; + } /* this test isn't as silly as it may look like; consider overflows! */ if (from >= MAX_PORT || from + num > MAX_PORT) { __set_errno (EINVAL); +#if 1 + fprintf(stderr, "ioperm: from/num out of range\n"); +#endif return -1; } +#if 1 + fprintf(stderr, "ioperm: turn_on %d io.base %ld\n", turn_on, io.base); +#endif + if (turn_on) { if (!io.base) @@ -579,19 +640,27 @@ _ioperm (unsigned long int from, unsigned long int num, int turn_on) io.hae.reg = 0; /* not used in user-level */ io.hae.cache = 0; - if (io.sys != IOSYS_TSUNAMI) + if (io.swiz != IOSWIZZLE_DENSE) __sethae (io.hae.cache); /* synchronize with hw */ fd = open ("/dev/mem", O_RDWR); - if (fd < 0) + if (fd < 0) { +#if 1 + fprintf(stderr, "ioperm: /dev/mem open failed\n"); +#endif return -1; + } - addr = port_to_cpu_addr (0, io.sys, 1); - len = port_to_cpu_addr (MAX_PORT, io.sys, 1) - addr; + addr = port_to_cpu_addr (0, io.swiz, 1); + len = port_to_cpu_addr (MAX_PORT, io.swiz, 1) - addr; io.base = (unsigned long int) __mmap (0, len, PROT_NONE, MAP_SHARED, fd, io.io_base); close (fd); +#if 1 + fprintf(stderr, "ioperm: mmap of len 0x%lx returned 0x%lx\n", + len, io.base); +#endif if ((long) io.base == -1) return -1; } @@ -605,10 +674,14 @@ _ioperm (unsigned long int from, unsigned long int num, int turn_on) /* turnoff access to relevant pages: */ prot = PROT_NONE; } - addr = port_to_cpu_addr (from, io.sys, 1); + addr = port_to_cpu_addr (from, io.swiz, 1); addr &= PAGE_MASK; - len = port_to_cpu_addr (from + num, io.sys, 1) - addr; - return mprotect ((void *) addr, len, prot); + len = port_to_cpu_addr (from + num, io.swiz, 1) - addr; + err = mprotect ((void *) addr, len, prot); +#if 1 + fprintf(stderr, "ioperm: mprotect returned %d\n", err); +#endif + return err; } From e19b39916e7098a1f528aea63340314916d06084 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 13 Jul 1999 23:43:10 +0000 Subject: [PATCH 1596/4487] Add ieee754/flt-32 and ieee754/dbl-64. --- sysdeps/alpha/Implies | 5 +++-- sysdeps/arm/Implies | 3 ++- sysdeps/i960/Implies | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sysdeps/alpha/Implies b/sysdeps/alpha/Implies index 37fee79d97..2c6af5b7bb 100644 --- a/sysdeps/alpha/Implies +++ b/sysdeps/alpha/Implies @@ -1,3 +1,4 @@ wordsize-64 -# Alpha uses IEEE 754 floating point. -ieee754 +# Alpha uses IEEE 754 single and double precision floating point. +ieee754/flt-32 +ieee754/dbl-64 diff --git a/sysdeps/arm/Implies b/sysdeps/arm/Implies index d6acf04a82..780c4e2467 100644 --- a/sysdeps/arm/Implies +++ b/sysdeps/arm/Implies @@ -1,2 +1,3 @@ wordsize-32 -ieee754 +ieee754/flt-32 +ieee754/dbl-64 diff --git a/sysdeps/i960/Implies b/sysdeps/i960/Implies index f8c4079ab5..1d569744ab 100644 --- a/sysdeps/i960/Implies +++ b/sysdeps/i960/Implies @@ -1,2 +1,3 @@ # i960 family uses IEEE 754 floating point. -ieee754 +ieee754/flt-32 +ieee754/dbl-64 From eb302d68955d86493cf188933e80169d8224eaa6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 14 Jul 1999 00:27:51 +0000 Subject: [PATCH 1597/4487] Add flt-32, dbl-64, and ldbl-96. --- sysdeps/m68k/Implies | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysdeps/m68k/Implies b/sysdeps/m68k/Implies index 09dd873973..b64e753525 100644 --- a/sysdeps/m68k/Implies +++ b/sysdeps/m68k/Implies @@ -1,3 +1,5 @@ wordsize-32 # 68k uses IEEE 754 floating point. -ieee754 +ieee754/flt-32 +ieee754/dbl-64 +ieee754/ldbl-96 From 3ca78edaed2504f43cefd140357c20bb968c9211 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 14 Jul 1999 00:28:28 +0000 Subject: [PATCH 1598/4487] Adjusted for modified printf_fphex extendability. --- sysdeps/m68k/printf_fphex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/m68k/printf_fphex.c b/sysdeps/m68k/printf_fphex.c index 0e68b16b77..d021a090ab 100644 --- a/sysdeps/m68k/printf_fphex.c +++ b/sysdeps/m68k/printf_fphex.c @@ -1,2 +1,2 @@ #define LONG_DOUBLE_DENORM_BIAS IEEE854_LONG_DOUBLE_BIAS -#include +#include From 6ad8eb9f5e7f80bba64fcfe10cd537100634d109 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 14 Jul 1999 00:28:43 +0000 Subject: [PATCH 1599/4487] Adjusted for modified strtold extendability. --- sysdeps/m68k/strtold.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/m68k/strtold.c b/sysdeps/m68k/strtold.c index dd7fbce195..f756488275 100644 --- a/sysdeps/m68k/strtold.c +++ b/sysdeps/m68k/strtold.c @@ -1,2 +1,2 @@ #define DENORM_EXP (MIN_EXP - 1) -#include +#include From 98a0c25a631e565b55ec4c1acff1abcda4fb72c1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 14 Jul 1999 00:29:21 +0000 Subject: [PATCH 1600/4487] Add flt-32 and dbl-64. --- sysdeps/mips/Implies | 3 ++- sysdeps/mips/mips64/Implies | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sysdeps/mips/Implies b/sysdeps/mips/Implies index 5aeb9ae460..9f60963329 100644 --- a/sysdeps/mips/Implies +++ b/sysdeps/mips/Implies @@ -1,3 +1,4 @@ wordsize-32 # MIPS uses IEEE 754 floating point. -ieee754 +ieee754/flt-32 +ieee754/dbl-64 diff --git a/sysdeps/mips/mips64/Implies b/sysdeps/mips/mips64/Implies index 06b9091f3b..25106df989 100644 --- a/sysdeps/mips/mips64/Implies +++ b/sysdeps/mips/mips64/Implies @@ -1,3 +1,4 @@ wordsize-64 # MIPS uses IEEE 754 floating point. -ieee754 +ieee754/flt-32 +ieee754/dbl-64 From b9104c3e71b123117deeae0ad088ab655b8d7cf7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 15 Jul 1999 11:51:36 +0000 Subject: [PATCH 1601/4487] (_inb, _inw, _inl, _outb, _outw, _outl): Added to GLIBC_2.1.2. --- sysdeps/unix/sysv/linux/arm/Versions | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysdeps/unix/sysv/linux/arm/Versions b/sysdeps/unix/sysv/linux/arm/Versions index 3a412cc3a3..7f97893007 100644 --- a/sysdeps/unix/sysv/linux/arm/Versions +++ b/sysdeps/unix/sysv/linux/arm/Versions @@ -4,4 +4,8 @@ libc { inb; inw; inl; outb; outw; outl; } + GLIBC_2.1.2 { + _inb; _inw; _inl; + _outb; _outw; _outl; + } } From b4ac6f26f2c2a97c1516104ec0329fc37d7569a8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 17 Jul 1999 23:16:23 +0000 Subject: [PATCH 1602/4487] Define __suseconds_t. --- sysdeps/unix/sysv/linux/alpha/bits/types.h | 1 + sysdeps/unix/sysv/linux/mips/bits/types.h | 1 + sysdeps/unix/sysv/sysv4/solaris2/bits/types.h | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h index 0af9fb399d..91b49a2fcc 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/types.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h @@ -76,6 +76,7 @@ typedef struct typedef int __daddr_t; /* Type of a disk address. */ typedef char *__caddr_t; /* Type of a core address. */ typedef long int __time_t; +typedef long int __suseconds_t; typedef long int __swblk_t; /* Type of a swap block maybe? */ typedef long int __clock_t; typedef int __key_t; /* Type of a SYSV IPC key. */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h index 51d9fcdc06..4b63cf82f4 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/types.h +++ b/sysdeps/unix/sysv/linux/mips/bits/types.h @@ -81,6 +81,7 @@ typedef struct typedef int __daddr_t; /* The type of a disk address. */ typedef char *__caddr_t; typedef long int __time_t; +typedef long int __suseconds_t; typedef long int __swblk_t; /* Type of a swap block maybe? */ typedef long int __clock_t; diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h index 8c4a13ada9..b2eace3f54 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 92, 94, 95, 96, 97, 98 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,94,95,96,97,98,99 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 @@ -79,6 +79,7 @@ typedef unsigned int __id_t; /* General type for IDs. */ typedef long int __daddr_t; /* The type of a disk address. */ typedef char *__caddr_t; typedef long int __time_t; +typedef int __suseconds_t; typedef long int __swblk_t; /* Type of a swap block maybe? */ typedef int __key_t; /* Type of an IPC key */ From 9a16d32a64fb75625da9bab90b2bc338a6f678c1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 17 Jul 1999 23:18:23 +0000 Subject: [PATCH 1603/4487] (timeval): Use __suseconds_t type for tv_usec element. --- sysdeps/unix/sysv/linux/alpha/bits/time.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/time.h b/sysdeps/unix/sysv/linux/alpha/bits/time.h index f44b5dcabc..aeb03b6341 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/time.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/time.h @@ -1,5 +1,5 @@ /* System-dependent timing definitions. Linux/Alpha version. - Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 1999 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 @@ -42,7 +42,7 @@ # endif /* bits/time.h */ #endif /* !__need_timeval */ -#ifdef __need_timeval +#ifdef __need_timeval # undef __need_timeval # ifndef _STRUCT_TIMEVAL # define _STRUCT_TIMEVAL 1 @@ -53,7 +53,7 @@ struct timeval { __time_t tv_sec; /* Seconds. */ - __time_t tv_usec; /* Microseconds. */ + __suseconds_t tv_usec; /* Microseconds. */ }; # endif /* struct timeval */ #endif /* need timeval */ From 22b137b9fd64a3ee1591c7d97dad455cd14c4947 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 18 Jul 1999 00:25:28 +0000 Subject: [PATCH 1604/4487] Undo last change. --- sysdeps/unix/sysv/linux/arm/Versions | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/Versions b/sysdeps/unix/sysv/linux/arm/Versions index 7f97893007..3a412cc3a3 100644 --- a/sysdeps/unix/sysv/linux/arm/Versions +++ b/sysdeps/unix/sysv/linux/arm/Versions @@ -4,8 +4,4 @@ libc { inb; inw; inl; outb; outw; outl; } - GLIBC_2.1.2 { - _inb; _inw; _inl; - _outb; _outw; _outl; - } } From 893f3d106f7ef4d98c0fb279aa05c55d3a310a21 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 21 Jul 1999 16:57:52 +0000 Subject: [PATCH 1605/4487] 1999-07-21 Roland McGrath * elf/dl-reloc.c (_dl_reloc_bad_type): New function. * elf/ldsodefs.h: Declare it. * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela): Use it instead of assert. (elf_machine_lazy_rel): Likewise. Take new arg MAP. * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela): Likewise. (elf_machine_lazy_rel): Likewise. * sysdeps/mips/dl-machine.h (elf_machine_rel): Likewise. (elf_machine_lazy_rel): Likewise. * sysdeps/mips/mips64/dl-machine.h (elf_machine_rel): Likewise. (elf_machine_lazy_rel): Likewise. * sysdeps/m68k/dl-machine.h (elf_machine_rela): Likewise. (elf_machine_lazy_rel): Likewise. * sysdeps/i386/dl-machine.h (elf_machine_rel): Likewise. (elf_machine_lazy_rel): Likewise. * sysdeps/generic/dl-machine.h (elf_machine_rel): Likewise. * sysdeps/arm/dl-machine.h (elf_machine_rel): Likewise. (elf_machine_lazy_rel): Likewise. * sysdeps/alpha/dl-machine.h (elf_machine_rela): Likewise. (elf_machine_lazy_rel): Likewise. * sysdeps/powerpc/dl-machine.h (elf_machine_lazy_rel): Likewise. * sysdeps/powerpc/dl-machine.c (__process_machine_rela): Use _dl_reloc_bad_type instead of _dl_signal_error. * elf/do-rel.h (elf_dynamic_do_rel): Pass MAP to elf_machine_lazy_rel. --- sysdeps/alpha/dl-machine.h | 8 ++++---- sysdeps/arm/dl-machine.h | 13 +++++++------ sysdeps/m68k/dl-machine.h | 13 +++++++------ sysdeps/mips/dl-machine.h | 6 +++--- sysdeps/mips/mips64/dl-machine.h | 6 +++--- 5 files changed, 24 insertions(+), 22 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 21059f5e4f..78a6f502ed 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -26,7 +26,6 @@ #define ELF_MACHINE_NAME "alpha" -#include #include @@ -490,12 +489,13 @@ elf_machine_rela (struct link_map *map, *reloc_addr = sym_value; } else - assert (! "unexpected dynamic reloc type"); + _dl_reloc_bad_type (map, r_type, 0); } } static inline void -elf_machine_lazy_rel (Elf64_Addr l_addr, const Elf64_Rela *reloc) +elf_machine_lazy_rel (struct link_map *map, + Elf64_Addr l_addr, const Elf64_Rela *reloc) { Elf64_Addr * const reloc_addr = (void *)(l_addr + reloc->r_offset); unsigned long const r_type = ELF64_R_TYPE (reloc->r_info); @@ -509,7 +509,7 @@ elf_machine_lazy_rel (Elf64_Addr l_addr, const Elf64_Rela *reloc) else if (r_type == R_ALPHA_NONE) return; else - assert (! "unexpected PLT reloc type"); + _dl_reloc_bad_type (map, r_type, 1); } #endif /* RESOLVE */ diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 754a6caa13..d112e3fa9f 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -24,8 +24,6 @@ #include -#include - /* Return nonzero iff E_MACHINE is compatible with the running host. */ static inline int __attribute__ ((unused)) elf_machine_matches_host (Elf32_Half e_machine) @@ -438,19 +436,22 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, break; } default: - assert (! "unexpected dynamic reloc type"); + _dl_reloc_bad_type (map, ELF32_R_TYPE (reloc->r_info), 0); break; } } } static inline void -elf_machine_lazy_rel (Elf32_Addr l_addr, const Elf32_Rel *reloc) +elf_machine_lazy_rel (struct link_map *map, + Elf32_Addr l_addr, const Elf32_Rel *reloc) { Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset); /* Check for unexpected PLT reloc type. */ - assert (ELF32_R_TYPE (reloc->r_info) == R_ARM_JUMP_SLOT); - *reloc_addr += l_addr; + if (ELF32_R_TYPE (reloc->r_info) == R_ARM_JUMP_SLOT) + *reloc_addr += l_addr; + else + _dl_reloc_bad_type (map, ELF32_R_TYPE (reloc->r_info), 1); } #endif /* RESOLVE */ diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index afa68efe1b..f9f9bf7626 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -24,8 +24,6 @@ #include -#include - /* Return nonzero iff E_MACHINE is compatible with the running host. */ static inline int elf_machine_matches_host (Elf32_Half e_machine) @@ -313,18 +311,21 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, case R_68K_NONE: /* Alright, Wilbur. */ break; default: - assert (! "unexpected dynamic reloc type"); + _dl_reloc_bad_type (map, ELF32_R_TYPE (reloc->r_info), 0); break; } } } static inline void -elf_machine_lazy_rel (Elf32_Addr l_addr, const Elf32_Rela *reloc) +elf_machine_lazy_rel (struct link_map *map, + Elf32_Addr l_addr, const Elf32_Rela *reloc) { Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset); - assert (ELF32_R_TYPE (reloc->r_info) == R_68K_JMP_SLOT); - *reloc_addr += l_addr; + if (ELF32_R_TYPE (reloc->r_info) == R_68K_JMP_SLOT) + *reloc_addr += l_addr; + else + _dl_reloc_bad_type (map, ELF32_R_TYPE (reloc->r_info), 1); } #endif /* RESOLVE */ diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 6896e53546..5811b78b29 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -25,7 +25,6 @@ #define ELF_MACHINE_NO_PLT -#include #include #ifndef ENTRY_POINT @@ -567,13 +566,14 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, case R_MIPS_NONE: /* Alright, Wilbur. */ break; default: - assert (! "unexpected dynamic reloc type"); + _dl_reloc_bad_type (map, ELFW(R_TYPE) (reloc->r_info), 0); break; } } static inline void -elf_machine_lazy_rel (ElfW(Addr) l_addr, const ElfW(Rel) *reloc) +elf_machine_lazy_rel (struct link_map *map, + ElfW(Addr) l_addr, const ElfW(Rel) *reloc) { /* Do nothing. */ } diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h index e2b62b8199..f200fcda64 100644 --- a/sysdeps/mips/mips64/dl-machine.h +++ b/sysdeps/mips/mips64/dl-machine.h @@ -25,7 +25,6 @@ #define ELF_MACHINE_NO_PLT -#include #include #ifndef ENTRY_POINT @@ -562,13 +561,14 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, case R_MIPS_NONE: /* Alright, Wilbur. */ break; default: - assert (! "unexpected dynamic reloc type"); + _dl_reloc_bad_type (map, ELFW(R_TYPE) (reloc->r_info), 0); break; } } static inline void -elf_machine_lazy_rel (struct link_map *map, const ElfW(Rel) *reloc) +elf_machine_lazy_rel (struct link_map *map, ElfW(Addr) l_addr, + const ElfW(Rel) *reloc) { /* Do nothing. */ } From 773d8a5255671263a01af11e25b2d35db32d3f4d Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 26 Jul 1999 08:27:39 +0000 Subject: [PATCH 1606/4487] * sysdeps/m68k/dl-machine.h (RTLD_START): Call pre-init funtions. --- sysdeps/m68k/dl-machine.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index f9f9bf7626..e3ebca5a9d 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -181,6 +181,20 @@ asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \ 0: | Push the searchlist of the main object as argument in | the _dl_init_next call below. move.l ([_dl_main_searchlist@GOT.w, %a5]), %d2 + | First dun the pre-initializers. +0: move.l %d2, -(%sp) + | Call _dl_preinit_next to return the address of an pre-initializer + | function to run. + bsr.l _dl_preinit_next@PLTPC + add.l #4, %sp | Pop argument. + | Check for zero return, when out of pre-initializers. + tst.l %d0 + jeq 0f + | Call the shared object pre-initializer function. + move.l %d0, %a0 + jsr (%a0) + | Loop to call _dl_preinit_next for the next pre-initializer. + jra 0b 0: move.l %d2, -(%sp) | Call _dl_init_next to return the address of an initializer | function to run. From 078a1bd7067aab4683a72d773e89616764ce3db3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 27 Jul 1999 00:18:20 +0000 Subject: [PATCH 1607/4487] Define __clockid_t, __timer_t, CLOCK_REALTIME, and TIMER_ABSTIME. --- sysdeps/unix/sysv/linux/alpha/bits/time.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/time.h b/sysdeps/unix/sysv/linux/alpha/bits/time.h index aeb03b6341..bbf93f6952 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/time.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/time.h @@ -39,6 +39,20 @@ # define CLK_TCK 1024 # endif +/* Clock ID used in clock and timer functions. */ +typedef int __clockid_t; + +/* Timer ID returned by `timer_create'. */ +typedef int __timer_t; + +# ifdef __USE_POSIX199309 +/* Identifier for system-wide realtime clock. */ +# define CLOCK_REALTIME 0 + +/* Flag to indicate time is absolute. */ +# define TIMER_ABSTIME 1 +# endif + # endif /* bits/time.h */ #endif /* !__need_timeval */ From d06391697775680459399a964858ecb2d328c158 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 27 Jul 1999 05:06:25 +0000 Subject: [PATCH 1608/4487] Correct types. --- sysdeps/unix/sysv/sysv4/getpgid.c | 7 +++---- sysdeps/unix/sysv/sysv4/setpgid.c | 6 +++--- sysdeps/unix/sysv/sysv4/setsid.c | 6 +++--- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/sysdeps/unix/sysv/sysv4/getpgid.c b/sysdeps/unix/sysv/sysv4/getpgid.c index 3195e6cddd..d2b27cb060 100644 --- a/sysdeps/unix/sysv/sysv4/getpgid.c +++ b/sysdeps/unix/sysv/sysv4/getpgid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1997, 1999 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 @@ -16,14 +16,13 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include #include #include -extern int __pgrpsys __P ((int type, ...)); +extern pid_t __pgrpsys __P ((int type, ...)); /* Get the process group ID of process PID. */ -int +pid_t __getpgid (pid) pid_t pid; { diff --git a/sysdeps/unix/sysv/sysv4/setpgid.c b/sysdeps/unix/sysv/sysv4/setpgid.c index 46396322d2..d9d3e8f306 100644 --- a/sysdeps/unix/sysv/sysv4/setpgid.c +++ b/sysdeps/unix/sysv/sysv4/setpgid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1996, 1997, 1999 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 @@ -19,14 +19,14 @@ #include #include -extern int __pgrpsys __P ((int type, ...)); +extern int __pgrpsys __P ((pid_t type, ...)); /* Set the process group ID of the process matching PID to PGID. If PID is zero, the current process's process group ID is set. If PGID is zero, the process ID of the process is used. */ int __setpgid (pid, pgid) - int pid, pgid; /* XXX why not pid_t ? */ + pid_t pid, pgid; { return __pgrpsys (5, pid, pgid); } diff --git a/sysdeps/unix/sysv/sysv4/setsid.c b/sysdeps/unix/sysv/sysv4/setsid.c index 37998bfe03..638ab73889 100644 --- a/sysdeps/unix/sysv/sysv4/setsid.c +++ b/sysdeps/unix/sysv/sysv4/setsid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1997, 1999 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 @@ -19,12 +19,12 @@ #include #include -extern int __pgrpsys __P ((int type, ...)); +extern pid_t __pgrpsys __P ((int type, ...)); /* Create a new session with the calling process as its leader. The process group IDs of the session and the calling process are set to the process ID of the calling process, which is returned. */ -int +pid_t __setsid () { return __pgrpsys (3); From 8cfc6b71c4d9f6d0ecadf40a068f7f89c9a203e9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 27 Jul 1999 05:47:28 +0000 Subject: [PATCH 1609/4487] ELF type definitions for Linux/Alpha. --- sysdeps/unix/sysv/linux/alpha/bits/elfclass.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/elfclass.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/elfclass.h b/sysdeps/unix/sysv/linux/alpha/bits/elfclass.h new file mode 100644 index 0000000000..e5aa4a0fbd --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/bits/elfclass.h @@ -0,0 +1,14 @@ +/* This file specifies the native word size of the machine, which indicates + the ELF file class used for executables and shared objects on this + machine. */ + +#ifndef _LINK_H +# error "Never use directly; include instead." +#endif + +#include + +#define __ELF_NATIVE_CLASS __WORDSIZE + +/* Linux/Alpha is exceptional as it has .hash section with 64 bit entries. */ +typedef uint64_t Elf_Symndx; From d54eed1a9a8a723f264a1e1f2ce8f603662c8d23 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 31 Jul 1999 06:09:30 +0000 Subject: [PATCH 1610/4487] Linux/Alpha specific functions to read system information. --- sysdeps/unix/sysv/linux/alpha/getsysstats.c | 54 +++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/getsysstats.c diff --git a/sysdeps/unix/sysv/linux/alpha/getsysstats.c b/sysdeps/unix/sysv/linux/alpha/getsysstats.c new file mode 100644 index 0000000000..8588903c89 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/getsysstats.c @@ -0,0 +1,54 @@ +/* Determine various system internal values, Linux/Alpha version. + Copyright (C) 1999 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Schwab + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + +/* We need to define a special parser for /proc/cpuinfo. */ +#define GET_NPROCS_PARSER(FP, BUFFER, RESULT) \ + do \ + { \ + (RESULT) = 0; \ + /* Find the line that contains the information about the number of \ + active cpus. We don't have to fear extremely long lines since \ + the kernel will not generate them. 8192 bytes are really \ + enough. */ \ + while (fgets_unlocked (BUFFER, sizeof (BUFFER), FP) != NULL) \ + if (sscanf (BUFFER, "CPUs probed %*d active %d", &(RESULT)) == 1) \ + break; \ + } \ + while (0) + + +/* On the Alpha we can distinguish between the number of configured and + active cpus. */ +#define GET_NPROCS_CONF_PARSER(FP, BUFFER, RESULT) \ + do \ + { \ + (RESULT) = 0; \ + /* Find the line that contains the information about the number of \ + probed cpus. We don't have to fear extremely long lines since \ + the kernel will not generate them. 8192 bytes are really \ + enough. */ \ + while (fgets_unlocked ((BUFFER), sizeof (BUFFER), (FP)) != NULL) \ + if (sscanf (buffer, "CPUs probed %d", &(RESULT)) == 1) \ + break; \ + } \ + while (0) + +#include From 0ed67a6c1dcc09aa5ced649867c5ede36673c0fb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 2 Aug 1999 19:44:27 +0000 Subject: [PATCH 1611/4487] Use new path for e_sqrt.c. --- sysdeps/alpha/fpu/e_sqrt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/alpha/fpu/e_sqrt.c b/sysdeps/alpha/fpu/e_sqrt.c index 7b4e596664..295a1c3692 100644 --- a/sysdeps/alpha/fpu/e_sqrt.c +++ b/sysdeps/alpha/fpu/e_sqrt.c @@ -162,4 +162,4 @@ static double __full_ieee754_sqrt(double) __attribute__((unused)); #endif /* _IEEE_FP_INEXACT */ -#include +#include From bad8d32c2825d17f99e49502dbcdd9b09d162b56 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 4 Aug 1999 16:00:23 +0000 Subject: [PATCH 1612/4487] (GET_NPROCS_PARSER): Initialize result to one. --- sysdeps/unix/sysv/linux/alpha/getsysstats.c | 48 ++++++++++----------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/getsysstats.c b/sysdeps/unix/sysv/linux/alpha/getsysstats.c index 8588903c89..27355b5fe4 100644 --- a/sysdeps/unix/sysv/linux/alpha/getsysstats.c +++ b/sysdeps/unix/sysv/linux/alpha/getsysstats.c @@ -20,35 +20,35 @@ /* We need to define a special parser for /proc/cpuinfo. */ -#define GET_NPROCS_PARSER(FP, BUFFER, RESULT) \ - do \ - { \ - (RESULT) = 0; \ - /* Find the line that contains the information about the number of \ - active cpus. We don't have to fear extremely long lines since \ - the kernel will not generate them. 8192 bytes are really \ - enough. */ \ - while (fgets_unlocked (BUFFER, sizeof (BUFFER), FP) != NULL) \ - if (sscanf (BUFFER, "CPUs probed %*d active %d", &(RESULT)) == 1) \ - break; \ - } \ +#define GET_NPROCS_PARSER(FP, BUFFER, RESULT) \ + do \ + { \ + /* Find the line that contains the information about the number of \ + active cpus. We don't have to fear extremely long lines since \ + the kernel will not generate them. 8192 bytes are really enough. \ + If there is no "CPUs ..." line then we are on a UP system. */ \ + (RESULT) = 1; \ + while (fgets_unlocked (BUFFER, sizeof (BUFFER), FP) != NULL) \ + if (sscanf (BUFFER, "CPUs probed %*d active %d", &(RESULT)) == 1) \ + break; \ + } \ while (0) /* On the Alpha we can distinguish between the number of configured and active cpus. */ -#define GET_NPROCS_CONF_PARSER(FP, BUFFER, RESULT) \ - do \ - { \ - (RESULT) = 0; \ - /* Find the line that contains the information about the number of \ - probed cpus. We don't have to fear extremely long lines since \ - the kernel will not generate them. 8192 bytes are really \ - enough. */ \ - while (fgets_unlocked ((BUFFER), sizeof (BUFFER), (FP)) != NULL) \ - if (sscanf (buffer, "CPUs probed %d", &(RESULT)) == 1) \ - break; \ - } \ +#define GET_NPROCS_CONF_PARSER(FP, BUFFER, RESULT) \ + do \ + { \ + /* Find the line that contains the information about the number of \ + probed cpus. We don't have to fear extremely long lines since \ + the kernel will not generate them. 8192 bytes are really enough. \ + If there is no "CPUs ..." line then we are on a UP system. */ \ + (RESULT) = 1; \ + while (fgets_unlocked ((BUFFER), sizeof (BUFFER), (FP)) != NULL) \ + if (sscanf (buffer, "CPUs probed %d", &(RESULT)) == 1) \ + break; \ + } \ while (0) #include From 1d8af493840b404cc85e5b6dd558e1a57bb1508a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 5 Aug 1999 16:56:44 +0000 Subject: [PATCH 1613/4487] (O_RSYNC, O_DSYNC): Define. --- sysdeps/unix/sysv/linux/alpha/bits/fcntl.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h index 9f90ddf57c..1ed9944124 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997, 1998, 1999 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 @@ -52,6 +52,14 @@ /* Not necessary, files are always with 64bit off_t. */ #define O_LARGEFILE 0 +/* For now Linux has synchronisity options for data and read operations. + We define the symbols here but let them do the same as O_SYNC since + this is a superset. */ +#if defined __USE_POSIX199309 || defined __USE_UNIX98 +# define O_DSYNC O_SYNC /* Synchronize data. */ +# define O_RSYNC O_SYNC /* Synchronize read operations. */ +#endif + /* Values for the second argument to `fcntl'. */ #define F_DUPFD 0 /* Duplicate file descriptor. */ #define F_GETFD 1 /* Get file descriptor flags. */ From c93c0c6259666fe2ec2f5049b9d27defb89c1151 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 6 Aug 1999 17:22:24 +0000 Subject: [PATCH 1614/4487] (O_LARGEFILE): Define only if __USE_LARGEFILE64. --- sysdeps/unix/sysv/linux/alpha/bits/fcntl.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h index 1ed9944124..312cd08963 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h @@ -49,8 +49,10 @@ # define O_NOFOLLOW 0200000 /* Do not follow links. */ #endif +#ifdef __USE_LARGEFILE64 /* Not necessary, files are always with 64bit off_t. */ -#define O_LARGEFILE 0 +# define O_LARGEFILE 0 +#endif /* For now Linux has synchronisity options for data and read operations. We define the symbols here but let them do the same as O_SYNC since From 6a06c0af60ab2c89801a957e9c70e5b01f5423cc Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 6 Aug 1999 17:23:00 +0000 Subject: [PATCH 1615/4487] (O_DSYNC, O_RSYNC): New definitions. (O_LARGEFILE): Define only if __USE_LARGEFILE64. --- sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index 5ed6d76ef1..749becd7d5 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -40,8 +40,11 @@ #define O_FSYNC O_SYNC #define O_ASYNC 0x1000 -#ifdef __USE_GNU +#ifdef __USE_LARGEFILE64 # define O_LARGEFILE 0x2000 /* Allow large file opens. */ +#endif + +#ifdef __USE_GNU # define O_NOFOLLOW 0x4000 /* Do not follow links. */ # define O_DIRECT 0x8000 /* Direct disk access hint. */ # define O_DIRECTORY 0x10000 /* Must be a directory. */ @@ -49,6 +52,14 @@ #define O_NDELAY O_NONBLOCK +/* For now Linux has no synchronisity options for data and read + operations. We define the symbols here but let them do the same as + O_SYNC since this is a superset. */ +#if defined __USE_POSIX199309 || defined __USE_UNIX98 +# define O_DSYNC O_SYNC /* Synchronize data. */ +# define O_RSYNC O_SYNC /* Synchronize read operations. */ +#endif + /* Values for the second argument to `fcntl'. */ #define F_DUPFD 0 /* Duplicate file descriptor. */ #define F_GETFD 1 /* Get file descriptor flags. */ From 26de9a821bf629f0a8d137a2f0240ad0a1fcd3cb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 10 Aug 1999 05:10:14 +0000 Subject: [PATCH 1616/4487] Define ARM specific versions of VALID_ELF_HEADER, VALID_ELF_OSABI, VALID_ELF_ABIVERSION. --- sysdeps/arm/dl-machine.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index d112e3fa9f..25e2f06321 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -24,6 +24,14 @@ #include +#define VALID_ELF_ABIVERSION(ver) (ver == 0) +#define VALID_ELF_OSABI(osabi) \ + (osabi == ELFOSABI_SYSV || osabi == ELFOSABI_ARM) +#define VALID_ELF_HEADER(hdr,exp,size) \ + memcmp (hdr,exp,size-2) == 0 \ + && VALID_ELF_OSABI (hdr[EI_OSABI]) \ + && VALID_ELF_ABIVERSION (hdr[EI_ABIVERSION]) + /* Return nonzero iff E_MACHINE is compatible with the running host. */ static inline int __attribute__ ((unused)) elf_machine_matches_host (Elf32_Half e_machine) From 283cadf410fb23a1f35a7275375c886f85210e30 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 18 Aug 1999 01:18:14 +0000 Subject: [PATCH 1617/4487] Define type __useconds_t. --- sysdeps/unix/sysv/linux/alpha/bits/types.h | 1 + sysdeps/unix/sysv/linux/mips/bits/types.h | 1 + sysdeps/unix/sysv/sysv4/solaris2/bits/types.h | 1 + 3 files changed, 3 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h index 91b49a2fcc..096d92050c 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/types.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h @@ -76,6 +76,7 @@ typedef struct typedef int __daddr_t; /* Type of a disk address. */ typedef char *__caddr_t; /* Type of a core address. */ typedef long int __time_t; +typedef int __useconds_t; typedef long int __suseconds_t; typedef long int __swblk_t; /* Type of a swap block maybe? */ typedef long int __clock_t; diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h index 4b63cf82f4..e1c436f319 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/types.h +++ b/sysdeps/unix/sysv/linux/mips/bits/types.h @@ -82,6 +82,7 @@ typedef int __daddr_t; /* The type of a disk address. */ typedef char *__caddr_t; typedef long int __time_t; typedef long int __suseconds_t; +typedef int __useconds_t; typedef long int __swblk_t; /* Type of a swap block maybe? */ typedef long int __clock_t; diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h index b2eace3f54..ec1142c75f 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h @@ -79,6 +79,7 @@ typedef unsigned int __id_t; /* General type for IDs. */ typedef long int __daddr_t; /* The type of a disk address. */ typedef char *__caddr_t; typedef long int __time_t; +typedef int __useconds_t; typedef int __suseconds_t; typedef long int __swblk_t; /* Type of a swap block maybe? */ typedef int __key_t; /* Type of an IPC key */ From 0dd0e77c4c4be0cdb096d5ac9ae422ef2aea2ebe Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 18 Aug 1999 03:39:59 +0000 Subject: [PATCH 1618/4487] Make __useconds_t unsigned. --- sysdeps/unix/sysv/linux/alpha/bits/types.h | 2 +- sysdeps/unix/sysv/linux/mips/bits/types.h | 2 +- sysdeps/unix/sysv/sysv4/solaris2/bits/types.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h index 096d92050c..4bc43199d5 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/types.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h @@ -76,7 +76,7 @@ typedef struct typedef int __daddr_t; /* Type of a disk address. */ typedef char *__caddr_t; /* Type of a core address. */ typedef long int __time_t; -typedef int __useconds_t; +typedef unsigned int __useconds_t; typedef long int __suseconds_t; typedef long int __swblk_t; /* Type of a swap block maybe? */ typedef long int __clock_t; diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h index e1c436f319..d7176c31c6 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/types.h +++ b/sysdeps/unix/sysv/linux/mips/bits/types.h @@ -81,8 +81,8 @@ typedef struct typedef int __daddr_t; /* The type of a disk address. */ typedef char *__caddr_t; typedef long int __time_t; +typedef unsigned int __useconds_t; typedef long int __suseconds_t; -typedef int __useconds_t; typedef long int __swblk_t; /* Type of a swap block maybe? */ typedef long int __clock_t; diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h index ec1142c75f..79713e75ba 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h @@ -79,7 +79,7 @@ typedef unsigned int __id_t; /* General type for IDs. */ typedef long int __daddr_t; /* The type of a disk address. */ typedef char *__caddr_t; typedef long int __time_t; -typedef int __useconds_t; +typedef unsigned int __useconds_t; typedef int __suseconds_t; typedef long int __swblk_t; /* Type of a swap block maybe? */ typedef int __key_t; /* Type of an IPC key */ From 77c5dc9ed7419fc531f7d2627e0265340e00f340 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 18 Aug 1999 07:43:39 +0000 Subject: [PATCH 1619/4487] Include bits/types.h instead of sys/types.h. --- sysdeps/unix/sysv/linux/alpha/bits/ipc.h | 4 ++-- sysdeps/unix/sysv/linux/mips/bits/ipc.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/ipc.h b/sysdeps/unix/sysv/linux/alpha/bits/ipc.h index 7b644e8b7a..804e1ee3f7 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/ipc.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/ipc.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 1998, 1999 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,7 +20,7 @@ # error "Never use directly; include instead." #endif -#include +#include /* Mode bits for `msgget', `semget', and `shmget'. */ #define IPC_CREAT 01000 /* Create key if key does not exist. */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/ipc.h b/sysdeps/unix/sysv/linux/mips/bits/ipc.h index 04bd3f0ce2..fb989cceca 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/ipc.h +++ b/sysdeps/unix/sysv/linux/mips/bits/ipc.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 1998, 1999 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,7 +20,7 @@ # error "Never use directly; include instead." #endif -#include +#include /* Mode bits for `msgget', `semget', and `shmget'. */ #define IPC_CREAT 01000 /* Create key if key does not exist. */ From daacfe6797f32c40396cd9a996aba528d49959be Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 18 Aug 1999 07:46:26 +0000 Subject: [PATCH 1620/4487] (struct stat): Use __blksize_t for st_blksize member. --- sysdeps/unix/bsd/osf/alpha/bits/stat.h | 4 ++-- sysdeps/unix/sysv/sysv4/i386/bits/stat.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/bsd/osf/alpha/bits/stat.h b/sysdeps/unix/bsd/osf/alpha/bits/stat.h index 7084b4e534..b73c23ae96 100644 --- a/sysdeps/unix/bsd/osf/alpha/bits/stat.h +++ b/sysdeps/unix/bsd/osf/alpha/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1996, 1997, 1999 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 @@ -42,7 +42,7 @@ struct stat int st_ctime; /* Time of last status change. */ int st_ctime_usec; - unsigned int st_blksize; /* Optimal block size for I/O. */ + __blksize_t st_blksize; /* Optimal block size for I/O. */ #define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ __blkcnt_t st_blocks; /* Number of 512-byte blocks allocated. */ diff --git a/sysdeps/unix/sysv/sysv4/i386/bits/stat.h b/sysdeps/unix/sysv/sysv4/i386/bits/stat.h index 104ad2f247..4c6b729579 100644 --- a/sysdeps/unix/sysv/sysv4/i386/bits/stat.h +++ b/sysdeps/unix/sysv/sysv4/i386/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1996, 1997, 1999 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 @@ -51,7 +51,7 @@ struct stat long int st_ctime; /* Time of last status change. */ unsigned long int st_ctime_usec; - long int st_blksize; /* Optimal block size for I/O. */ + __blksize_t st_blksize; /* Optimal block size for I/O. */ #define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ __blkcnt_t st_blocks; /* Number of 512-byte blocks allocated. */ From 699679342689b25677368750fb6435e1c083b8fe Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 18 Aug 1999 07:46:54 +0000 Subject: [PATCH 1621/4487] (struct stat): Use __blksize_t for st_blksize member. (struct stat64): Likewise. --- sysdeps/unix/sysv/linux/alpha/bits/stat.h | 6 +++--- sysdeps/unix/sysv/linux/mips/bits/stat.h | 6 +++--- sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/stat.h b/sysdeps/unix/sysv/linux/alpha/bits/stat.h index cb4ab78268..e1dad323b1 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/stat.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998, 1999 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 @@ -53,7 +53,7 @@ struct stat __blkcnt_t st_blocks; /* Nr. 512-byte blocks allocated. */ int __pad2; #endif - unsigned int st_blksize; /* Optimal block size for I/O. */ + __blksize_t st_blksize; /* Optimal block size for I/O. */ unsigned int st_flags; unsigned int st_gen; int __pad3; @@ -76,7 +76,7 @@ struct stat64 __time_t st_mtime; /* Time of last modification. */ __time_t st_ctime; /* Time of last status change. */ __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */ - unsigned int st_blksize; /* Optimal block size for I/O. */ + __blksize_t st_blksize; /* Optimal block size for I/O. */ unsigned int st_flags; unsigned int st_gen; int __pad3; diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h index f0afd5e728..1379ea7a6b 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/stat.h +++ b/sysdeps/unix/sysv/linux/mips/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1992, 95, 96, 97, 98, 99 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 @@ -66,7 +66,7 @@ struct stat long int __reserved1; __time_t st_ctime; /* Time of last status change. */ long int __reserved2; - long int st_blksize; /* Optimal block size for I/O. */ + __blksize_t st_blksize; /* Optimal block size for I/O. */ #ifndef __USE_FILE_OFFSET64 __blkcnt_t st_blocks; /* Number of 512-byte blocks allocated. */ #else @@ -104,7 +104,7 @@ struct stat64 long int __reserved1; __time_t st_ctime; /* Time of last status change. */ long int __reserved2; - long int st_blksize; /* Optimal block size for I/O. */ + __blksize_t st_blksize; /* Optimal block size for I/O. */ __blkcnt64_t st_blocks; /* Number of 512-byte blocks allocated. */ char st_fstype[16]; /* Filesystem type name */ long int st_pad4[8]; diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h index ef93b7be27..34cc328b51 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1996, 1997, 1998, 1999 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 @@ -50,7 +50,7 @@ struct stat __time_t st_ctime; /* Time of last status change. */ unsigned long int st_ctime_usec; - long int st_blksize; /* Optimal block size for I/O. */ + __blksize_t st_blksize; /* Optimal block size for I/O. */ #define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ __blkcnt_t st_blocks; /* Number of 512-byte blocks allocated. */ @@ -81,7 +81,7 @@ struct stat64 __time_t st_ctime; /* Time of last status change */ unsigned long int st_ctime_usec; - long int st_blksize; + __blksize_t st_blksize; __blkcnt64_t st_blocks; char st_fstype[_ST_FSTYPSZ]; long int st_filler3[8]; From f739f8a81ecb36242ea5f796a7e154a9cc3974b6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 18 Aug 1999 07:47:37 +0000 Subject: [PATCH 1622/4487] Define __blksize_t. --- sysdeps/unix/sysv/linux/alpha/bits/types.h | 5 +++-- sysdeps/unix/sysv/linux/mips/bits/types.h | 3 +++ sysdeps/unix/sysv/sysv4/solaris2/bits/types.h | 3 +++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h index 4bc43199d5..d98ed8ad8c 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/types.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h @@ -59,8 +59,9 @@ typedef __int32_t __pid_t; /* Type of process identifications. */ typedef __int64_t __ssize_t; /* Type of a byte count, or error. */ typedef __int64_t __rlim_t; /* Type of resource counts. */ typedef __int64_t __rlim64_t; /* "" (LFS) */ -typedef __uint32_t __blkcnt_t; /* Type to count nr disk blocks. */ -typedef __uint64_t __blkcnt64_t; /* "" (LFS) */ +typedef __uint32_t __blksize_t; /* Type to represnet block size. */ +typedef __uint32_t __blkcnt_t; /* Type to count nr disk blocks. */ +typedef __uint64_t __blkcnt64_t; /* "" (LFS) */ typedef __int32_t __fsblkcnt_t; /* Type to count file system blocks. */ typedef __int64_t __fsblkcnt64_t; /* "" (LFS) */ typedef __uint32_t __fsfilcnt_t; /* Type to count file system inodes. */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h index d7176c31c6..37c3f21c5b 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/types.h +++ b/sysdeps/unix/sysv/linux/mips/bits/types.h @@ -119,6 +119,9 @@ typedef int __key_t; typedef long int __ipc_pid_t; +/* Type to represent block size. */ +typedef long int __blksize_t; + /* Types from the Large File Support interface. */ /* Type to count number os disk blocks. */ diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h index 79713e75ba..1e7b50e780 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h @@ -110,6 +110,9 @@ typedef struct typedef unsigned long int __fd_mask; +/* Type to represent block size. */ +typedef long int __blksize_t; + /* Types from the Large File Support interface. */ /* Type to count number os disk blocks. */ From 0cabeaa3fdf785b7a1b7e0f255e9bb248df3b909 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 19 Aug 1999 19:57:25 +0000 Subject: [PATCH 1623/4487] Information how to access signal context on Linux/Alpha. --- .../unix/sysv/linux/alpha/sigcontextinfo.h | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h diff --git a/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h b/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h new file mode 100644 index 0000000000..3125e9ba9b --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h @@ -0,0 +1,22 @@ +/* Copyright (C) 1999 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#define SIGCONTEXT struct sigcontext +#define GET_PC(ctx) ((void *) (ctx).sc_pc) +#define GET_FRAME(ctx) ((void *) (ctx).sc_regs[15]) +#define GET_STACK(ctx) ((void *) (ctx).sc_regs[30]) From 9661dd713dfecabc704a8766f9558a3d57f49e32 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 22 Aug 1999 16:04:24 +0000 Subject: [PATCH 1624/4487] (SA_RESETHAND): Add it. --- sysdeps/unix/sysv/linux/mips/bits/sigaction.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h index 855fe287d4..8d080272fc 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h +++ b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h @@ -1,5 +1,5 @@ /* The proper definitions for Linux/MIPS's sigaction. - Copyright (C) 1993, 1994, 1995, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1993, 94, 95, 97, 98, 99 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 @@ -60,6 +60,7 @@ struct sigaction three arguments instead of one. */ #if defined __USE_UNIX98 || defined __USE_MISC # define SA_ONSTACK 0x00000001 /* Use signal stack by using `sa_restorer'. */ +# define SA_RESETHAND 0x00000002 /* Reset to SIG_DFL on entry to handler. */ # define SA_RESTART 0x00000004 /* Restart syscall on signal return. */ # define SA_NODEFER 0x00000010 /* Don't automatically block the signal when its handler is being executed. */ From 10b20b58ab5112a6507ebe45e93b9e22f8bef755 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 22 Aug 1999 16:05:13 +0000 Subject: [PATCH 1625/4487] Remove SGI specific calls, add RTLD_LOCAL. --- sysdeps/mips/bits/dlfcn.h | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/sysdeps/mips/bits/dlfcn.h b/sysdeps/mips/bits/dlfcn.h index 8477b53e81..2939d9e19f 100644 --- a/sysdeps/mips/bits/dlfcn.h +++ b/sysdeps/mips/bits/dlfcn.h @@ -31,12 +31,7 @@ visible as if the object were linked directly into the program. */ #define RTLD_GLOBAL 0x004 -__BEGIN_DECLS - -/* Some SGI specific calls that aren't implemented yet. */ -extern void *sgidladd __P ((__const char *, int)); -extern void *sgidlopen_version __P ((__const char *, int, __const char *, - int)); -extern char *sgigetdsoversion __P ((__const char *)); - -__END_DECLS +/* Unix98 demands the following flag which is the inverse to RTLD_GLOBAL. + The implementation does this by default and so we can define the + value to zero. */ +#define RTLD_LOCAL 0 From 3013083aa3d07ea29a97393e62722d21ed45bcc0 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 23 Aug 1999 04:06:18 +0000 Subject: [PATCH 1626/4487] Add execve syscall. --- sysdeps/unix/sysv/linux/mips/syscalls.list | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index 434be84898..b6450a9d08 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -52,6 +52,7 @@ rt_sigprocmask - rt_sigprocmask 4 __syscall_rt_sigprocmask rt_sigqueueinfo - rt_sigqueueinfo 3 __syscall_rt_sigqueueinfo rt_sigsuspend - rt_sigsuspend 2 __syscall_rt_sigsuspend rt_sigtimedwait - rt_sigtimedwait 4 __syscall_rt_sigtimedwait +s_execve execve execv 3 __syscall_execve s_getcwd getcwd getcwd 2 __syscall_getcwd s_getdents getdents getdents 3 __syscall_getdents s_getpriority getpriority getpriority 2 __syscall_getpriority From 446548bb2820fca348f70a3d6a4bed5356b756da Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 23 Aug 1999 17:43:28 +0000 Subject: [PATCH 1627/4487] Define SIGCONTEXT_EXTRA_ARGS. --- sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h | 1 + sysdeps/unix/sysv/linux/arm/sigcontextinfo.h | 1 + sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h | 5 +++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h b/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h index 3125e9ba9b..19c35a4624 100644 --- a/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h +++ b/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h @@ -17,6 +17,7 @@ Boston, MA 02111-1307, USA. */ #define SIGCONTEXT struct sigcontext +#define SIGCONTEXT_EXTRA_ARGS #define GET_PC(ctx) ((void *) (ctx).sc_pc) #define GET_FRAME(ctx) ((void *) (ctx).sc_regs[15]) #define GET_STACK(ctx) ((void *) (ctx).sc_regs[30]) diff --git a/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h b/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h index d92c9fadf1..51788e0e51 100644 --- a/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h +++ b/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h @@ -18,6 +18,7 @@ Boston, MA 02111-1307, USA. */ #define SIGCONTEXT int _a2, int _a3, int _a4, union k_sigcontext +#define SIGCONTEXT_EXTRA_ARGS _a2, _a3, _a4, #define GET_PC(ctx) ((void *)((ctx.v20.magic == SIGCONTEXT_2_0_MAGIC) ? \ ctx.v20.reg.ARM_pc : ctx.v21.arm_pc)) diff --git a/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h b/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h index bdef810a23..86bf934c51 100644 --- a/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h +++ b/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab , 1998. @@ -17,7 +17,8 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define SIGCONTEXT int code, struct sigcontext * +#define SIGCONTEXT int _code, struct sigcontext * +#define SIGCONTEXT_EXTRA_ARGS _code, #define GET_PC(ctx) ((void *) (ctx)->sc_pc) #define GET_FRAME(ctx) ((void *) __builtin_frame_address (1)) #define GET_STACK(ctx) ((void *) (ctx)->sc_usp) From 7e5a3fd89ac28defdd39c082b2d885da2ed9c5dd Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 23 Aug 1999 17:53:43 +0000 Subject: [PATCH 1628/4487] Linux/MIPS specific error codes. --- sysdeps/unix/sysv/linux/mips/bits/errno.h | 56 +++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/mips/bits/errno.h diff --git a/sysdeps/unix/sysv/linux/mips/bits/errno.h b/sysdeps/unix/sysv/linux/mips/bits/errno.h new file mode 100644 index 0000000000..9412b23070 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/bits/errno.h @@ -0,0 +1,56 @@ +/* Error constants. MIPS/Linux specific version. + Copyright (C) 1996, 1997, 1998, 1999 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifdef _ERRNO_H + +# undef EDOM +# undef EILSEQ +# undef ERANGE +# include + +/* Linux has no ENOTSUP error code. */ +# define ENOTSUP EOPNOTSUPP + +# ifndef __ASSEMBLER__ +/* We now need a declaration of the `errno' variable. */ +extern int errno; + +/* Function to get address of global `errno' variable. */ +extern int *__errno_location __P ((void)) __attribute__ ((__const__)); + +# if defined _LIBC +/* We wouldn't need a special macro anymore but it is history. */ +# define __set_errno(val) (*__errno_location ()) = (val) +# endif /* _LIBC */ + +# if !defined _LIBC || defined _LIBC_REENTRANT +/* When using threads, errno is a per-thread value. */ +# define errno (*__errno_location ()) +# endif +# endif /* !__ASSEMBLER__ */ +#endif /* _ERRNO_H */ + +#if !defined _ERRNO_H && defined __need_Emath +/* This is ugly but the kernel header is not clean enough. We must + define only the values EDOM and ERANGE in case __need_Emath is + defined. The value is the same for all Linux ports. */ +# define EDOM 33 /* Math argument out of domain of function. */ +# define EILSEQ 84 /* Illegal byte sequence. */ +# define ERANGE 34 /* Math result not representable. */ +#endif /* !_ERRNO_H && __need_Emath */ From 143751489c604337d5f82fbf47fad4bbd3186a92 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 24 Aug 1999 20:35:50 +0000 Subject: [PATCH 1629/4487] Use hexadecimal floating-point constants for gcc >= 2.95. --- sysdeps/arm/bits/huge_val.h | 22 +++++++++++++++++++--- sysdeps/m68k/bits/huge_val.h | 35 ++++++++++++++++++++++++++--------- 2 files changed, 45 insertions(+), 12 deletions(-) diff --git a/sysdeps/arm/bits/huge_val.h b/sysdeps/arm/bits/huge_val.h index 0e07bd56cc..1b236c425d 100644 --- a/sysdeps/arm/bits/huge_val.h +++ b/sysdeps/arm/bits/huge_val.h @@ -1,7 +1,7 @@ /* `HUGE_VAL' constants for IEEE 754 machines (where it is infinity). Used by and functions for overflow. ARM version. - Copyright (C) 1992, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1992, 95, 96, 97, 98, 99 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 @@ -29,11 +29,19 @@ #ifdef __GNUC__ -# define HUGE_VAL \ +# if __GNUC_PREREQ(2,95) + +# define HUGE_VAL (0x1.0p2047) + +# else + +# define HUGE_VAL \ (__extension__ \ ((union { unsigned __l __attribute__((__mode__(__DI__))); double __d; }) \ { __l: 0x000000007ff00000ULL }).__d) +# endif + #else /* not GCC */ # include @@ -59,11 +67,19 @@ static __huge_val_t __huge_val = { __HUGE_VAL_bytes }; # ifdef __GNUC__ -# define HUGE_VALF \ +# if __GNUC_PREREQ(2,95) + +# define HUGE_VALF (0x1.0p255f) + +# else + +# define HUGE_VALF \ (__extension__ \ ((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; }) \ { __l: 0x7f800000UL }).__d) +# endif + # else /* not GCC */ typedef union { unsigned char __c[4]; float __f; } __huge_valf_t; diff --git a/sysdeps/m68k/bits/huge_val.h b/sysdeps/m68k/bits/huge_val.h index 822b82930b..14c0855ab1 100644 --- a/sysdeps/m68k/bits/huge_val.h +++ b/sysdeps/m68k/bits/huge_val.h @@ -1,6 +1,6 @@ /* `HUGE_VAL' constants for m68k (where it is infinity). Used by and functions for overflow. - Copyright (C) 1992, 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1992, 1995, 1996, 1997, 1999 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 @@ -30,11 +30,19 @@ #ifdef __GNUC__ -# define HUGE_VAL \ +# if __GNUC_PREREQ(2,95) + +# define HUGE_VAL (0x1.0p2047) + +# else + +# define HUGE_VAL \ (__extension__ \ ((union { unsigned long long __l; double __d; }) \ { __l: 0x7ff0000000000000ULL }).__d) +# endif + #else /* not GCC */ static union { unsigned char __c[8]; double __d; } __huge_val = @@ -48,28 +56,37 @@ static union { unsigned char __c[8]; double __d; } __huge_val = #ifdef __USE_ISOC9X -# ifdef __GNUC__ +# if __GNUC_PREREQ(2,95) -# define HUGE_VALF \ +# define HUGE_VALF (0x1.0p255f) +# define HUGE_VALL (0x1.0p32767L) + +# else + +# ifdef __GNUC__ + +# define HUGE_VALF \ (__extension__ \ ((union { unsigned long __l; float __f; }) \ { __l: 0x7f800000UL }).__f) -# define HUGE_VALL \ +# define HUGE_VALL \ (__extension__ \ ((union { unsigned long __l[3]; long double __ld; }) \ { __l: { 0x7fff0000UL, 0x80000000UL, 0UL } }).__ld) -# else /* not GCC */ +# else /* not GCC */ static union { unsigned char __c[4]; float __f; } __huge_valf = { { 0x7f, 0x80, 0, 0 } }; -# define HUGE_VALF (__huge_valf.__f) +# define HUGE_VALF (__huge_valf.__f) static union { unsigned char __c[12]; long double __ld; } __huge_vall = { { 0x7f, 0xff, 0, 0, 0x80, 0, 0, 0, 0, 0, 0, 0 } }; -# define HUGE_VALL (__huge_vall.__ld) +# define HUGE_VALL (__huge_vall.__ld) + +# endif /* GCC. */ -# endif /* GCC. */ +# endif /* GCC 2.95. */ #endif /* __USE_ISOC9X. */ From c79dd0e87d0c2ff7845dfcb57cf8895583618219 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 24 Aug 1999 20:59:41 +0000 Subject: [PATCH 1630/4487] Rewrite, don't declare errno here. --- sysdeps/unix/mips/sysdep.S | 69 ++++++++++++++++++++++++++++---------- 1 file changed, 52 insertions(+), 17 deletions(-) diff --git a/sysdeps/unix/mips/sysdep.S b/sysdeps/unix/mips/sysdep.S index fa8888663e..f3974bf589 100644 --- a/sysdeps/unix/mips/sysdep.S +++ b/sysdeps/unix/mips/sysdep.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1993, 1994, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1992,93,94,97,98,99 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -21,21 +21,59 @@ #define _ERRNO_H #include - .bss - .globl errno -#ifdef __ELF__ - .type errno, @object +#ifdef _LIBC_REENTRANT + +ENTRY(__syscall_error) +#ifdef PIC + .set noreorder + .set noat + move $1, $31 + bltzal $0, 0f + nop +0: .cpload $31 + move $31, $1 + .set at + .set reorder +#endif + subu sp, 32 +#ifdef __PIC__ + .cprestore 16 +#endif + sw v0, 20(sp) + sw ra, 24(sp) + +#if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN + /* We translate the system's EWOULDBLOCK error into EAGAIN. + The GNU C library always defines EWOULDBLOCK==EAGAIN. + EWOULDBLOCK_sys is the original number. */ + bne v0, EWOULDBLOCK_sys, skip + nop + li v0, EAGAIN +skip: #endif - .size errno, 4 -errno: - .space 4 + /* Store it in the "real" variable ... */ + sw v0, errno -weak_alias (errno, _errno) + /* Find our per-thread errno address */ + jal __errno_location + + /* Store the error value. */ + lw t0, 20(sp) + sw t0, 0(v0) + + /* And just kick back a -1. */ + lw ra, 24(sp) + addiu sp, 32 + li v0, -1 + j ra + END(__syscall_error) + +#else /* _LIBC_REENTRANT */ - .set noreorder ENTRY(__syscall_error) -#ifdef PIC +#ifdef __PIC__ + .set noreorder .set noat move $1, $31 bltzal $0, 0f @@ -43,13 +81,13 @@ ENTRY(__syscall_error) 0: .cpload $31 move $31, $1 .set at + .set reorder #endif #if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN /* We translate the system's EWOULDBLOCK error into EAGAIN. The GNU C library always defines EWOULDBLOCK==EAGAIN. EWOULDBLOCK_sys is the original number. */ bne v0, EWOULDBLOCK_sys, skip - nop li v0, EAGAIN skip: #endif @@ -57,10 +95,7 @@ skip: sw v0, errno /* And just kick back a -1. */ - j ra li v0, -1 + j ra END(__syscall_error) - -/* We provide this alias for compatilility with other Unices - like IRIX 5 */ -weak_alias (__syscall_error, syscall_error) +#endif /* _LIBC_REENTRANT */ From 61098fa137261cd5b157a3916404b6dd214c3e87 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 24 Aug 1999 20:59:51 +0000 Subject: [PATCH 1631/4487] Use __syscall_error. --- sysdeps/unix/mips/sysdep.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sysdeps/unix/mips/sysdep.h b/sysdeps/unix/mips/sysdep.h index 4514d07c66..256b0a78cd 100644 --- a/sysdeps/unix/mips/sysdep.h +++ b/sysdeps/unix/mips/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1995, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995, 1997, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -29,13 +29,13 @@ .ent name,0; \ name##: -/* Note that while it's better structurally, going back to call syscall_error +/* Note that while it's better structurally, going back to call __syscall_error can make things confusing if you're debugging---it looks like it's jumping backwards into the previous fn. */ -#ifdef __PIC__ +#ifdef PIC #define PSEUDO(name, syscall_name, args) \ .align 2; \ - 99: la t9,syscall_error; \ + 99: la t9,__syscall_error; \ jr t9; \ ENTRY(name) \ .set noreorder; \ @@ -49,7 +49,7 @@ #define PSEUDO(name, syscall_name, args) \ .set noreorder; \ .align 2; \ - 99: j syscall_error; \ + 99: j __syscall_error; \ ENTRY(name) \ .set noreorder; \ li v0, SYS_##syscall_name; \ From 9cc31184c87ae045b44210cac657981060e4cc49 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 24 Aug 1999 22:13:10 +0000 Subject: [PATCH 1632/4487] Fix EILSEQ value changed in last patch. --- sysdeps/unix/sysv/linux/mips/bits/errno.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/errno.h b/sysdeps/unix/sysv/linux/mips/bits/errno.h index 9412b23070..b6237e9bc1 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/errno.h +++ b/sysdeps/unix/sysv/linux/mips/bits/errno.h @@ -51,6 +51,6 @@ extern int *__errno_location __P ((void)) __attribute__ ((__const__)); define only the values EDOM and ERANGE in case __need_Emath is defined. The value is the same for all Linux ports. */ # define EDOM 33 /* Math argument out of domain of function. */ -# define EILSEQ 84 /* Illegal byte sequence. */ +# define EILSEQ 88 /* Illegal byte sequence. */ # define ERANGE 34 /* Math result not representable. */ #endif /* !_ERRNO_H && __need_Emath */ From 1a839cb12e054e26506b721bf18aca731bbdbe24 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 25 Aug 1999 17:39:15 +0000 Subject: [PATCH 1633/4487] Fix comment. --- sysdeps/unix/sysv/linux/mips/bits/errno.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/errno.h b/sysdeps/unix/sysv/linux/mips/bits/errno.h index b6237e9bc1..7782c0ba90 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/errno.h +++ b/sysdeps/unix/sysv/linux/mips/bits/errno.h @@ -48,8 +48,8 @@ extern int *__errno_location __P ((void)) __attribute__ ((__const__)); #if !defined _ERRNO_H && defined __need_Emath /* This is ugly but the kernel header is not clean enough. We must - define only the values EDOM and ERANGE in case __need_Emath is - defined. The value is the same for all Linux ports. */ + define only the values EDOM, EILSEQ and ERANGE in case __need_Emath is + defined. */ # define EDOM 33 /* Math argument out of domain of function. */ # define EILSEQ 88 /* Illegal byte sequence. */ # define ERANGE 34 /* Math result not representable. */ From 90445b8a224dc963a852b1bc92cca22982a3c3fe Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 25 Aug 1999 17:40:49 +0000 Subject: [PATCH 1634/4487] Fix typo in execve entry. --- sysdeps/unix/sysv/linux/mips/syscalls.list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index b6450a9d08..780a899d4f 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -52,7 +52,7 @@ rt_sigprocmask - rt_sigprocmask 4 __syscall_rt_sigprocmask rt_sigqueueinfo - rt_sigqueueinfo 3 __syscall_rt_sigqueueinfo rt_sigsuspend - rt_sigsuspend 2 __syscall_rt_sigsuspend rt_sigtimedwait - rt_sigtimedwait 4 __syscall_rt_sigtimedwait -s_execve execve execv 3 __syscall_execve +s_execve execve execve 3 __syscall_execve s_getcwd getcwd getcwd 2 __syscall_getcwd s_getdents getdents getdents 3 __syscall_getdents s_getpriority getpriority getpriority 2 __syscall_getpriority From 3f77348a3802b173694b202b18033049697ad187 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 25 Aug 1999 17:41:51 +0000 Subject: [PATCH 1635/4487] Add missing underscore in _llseek entry. --- sysdeps/unix/sysv/linux/mips/syscalls.list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index 780a899d4f..0939cda0cf 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -37,7 +37,7 @@ socketpair - socketpair 4 __socketpair socketpair # # There are defined locally because the caller is also defined in this dir. # -s_llseek llseek _llseek 5 __syscall_llseek +s_llseek llseek _llseek 5 __syscall__llseek s_sigaction sigaction sigaction 3 __syscall_sigaction s_ustat ustat ustat 2 __syscall_ustat sys_mknod xmknod mknod 3 __syscall_mknod From 42d9b8260ec95b761bf2c23b76a6a2b12a5f1f66 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 25 Aug 1999 18:42:20 +0000 Subject: [PATCH 1636/4487] getdents implementation for Solaris. --- sysdeps/unix/sysv/sysv4/solaris2/getdents.c | 114 ++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/solaris2/getdents.c diff --git a/sysdeps/unix/sysv/sysv4/solaris2/getdents.c b/sysdeps/unix/sysv/sysv4/solaris2/getdents.c new file mode 100644 index 0000000000..2cf2a5784e --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/solaris2/getdents.c @@ -0,0 +1,114 @@ +/* Copyright (C) 1993,95,96,97,98 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include +#include +#include +#include +#include + +#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) + + +extern int __getdents __P ((int fd, char *buf, size_t nbytes)); + +/* For Solaris we need a special version of this file since the + definition of `struct dirent' is not the same for the kernel and + the libc. There is one additional field which might be introduced + in the kernel structure in the future. + + He is the system definition of `struct dirent' as of 2.6: */ + +struct kernel_dirent + { + ino_t d_ino; + off_t d_off; + unsigned short int d_reclen; + char d_name[256]; + }; + +#ifdef GETDENTS64 +#define __getdirentries __getdirentries64 +#define dirent dirent64 +#endif + +/* The problem here is that we cannot simply read the next NBYTES + bytes. We need to take the additional field into account. We use + some heuristic. Assuming the directory contains names with 14 + characters on average we can compute an estimate number of entries + which fit in the buffer. Taking this number allows us to specify a + correct number of bytes to read. If we should be wrong, we can reset + the file descriptor. */ +ssize_t +__getdirentries (int fd, char *buf, size_t nbytes, off_t *basep) +{ + off_t base = __lseek (fd, (off_t) 0, SEEK_CUR); + off_t last_offset = base; + size_t red_nbytes; + struct kernel_dirent *skdp, *kdp; + struct dirent *dp; + int retval; + const size_t size_diff = (offsetof (struct dirent, d_name) + - offsetof (struct kernel_dirent, d_name)); + + red_nbytes = nbytes - ((nbytes / (offsetof (struct dirent, d_name) + 14)) + * size_diff); + + dp = (struct dirent *) buf; + skdp = kdp = __alloca (red_nbytes); + + retval = __getdents (fd, (char *) kdp, red_nbytes); + + while ((char *) kdp < (char *) skdp + retval) + { + const size_t alignment = __alignof__ (struct dirent); + /* Since kdp->d_reclen is already aligned for the kernel structure + this may compute a value that is bigger than necessary. */ + size_t new_reclen = ((kdp->d_reclen + size_diff + alignment - 1) + & ~(alignment - 1)); + if ((char *) dp + new_reclen > buf + nbytes) + { + /* Our heuristic failed. We read too many entries. Reset + the stream. */ + __lseek (fd, last_offset, SEEK_SET); + break; + } + + last_offset = kdp->d_off; + dp->d_ino = kdp->d_ino; + dp->d_off = kdp->d_off; + dp->d_reclen = new_reclen; + dp->d_type = DT_UNKNOWN; + memcpy (dp->d_name, kdp->d_name, + kdp->d_reclen - offsetof (struct kernel_dirent, d_name)); + + dp = (struct dirent *) ((char *) dp + new_reclen); + kdp = (struct kernel_dirent *) (((char *) kdp) + kdp->d_reclen); + } + + if (basep) + *basep = base; + + return (char *) dp - buf; +} + +#ifndef GETDENTS64 +weak_alias (__getdirentries, getdirentries) +#endif From 8c1f89e9112d99f19119709e7289cce2f3e0d815 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 25 Aug 1999 18:48:38 +0000 Subject: [PATCH 1637/4487] Solaris dirent definition. --- .../unix/sysv/sysv4/solaris2/bits/dirent.h | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 sysdeps/unix/sysv/sysv4/solaris2/bits/dirent.h diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/dirent.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/dirent.h new file mode 100644 index 0000000000..cc6c999549 --- /dev/null +++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/dirent.h @@ -0,0 +1,50 @@ +/* Copyright (C) 1996, 1997, 1999 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _DIRENT_H +# error "Never use directly; include instead." +#endif + +struct dirent + { +#ifndef __USE_FILE_OFFSET64 + __ino_t d_ino; + __off_t d_off; +#else + __ino64_t d_ino; + __off64_t d_off; +#endif + unsigned short int d_reclen; + char d_name[256]; /* We must not include limits.h! */ + }; + +#ifdef __USE_LARGEFILE64 +struct dirent64 + { + __ino64_t d_ino; + __off64_t d_off; + unsigned short int d_reclen; + char d_name[256]; /* We must not include limits.h! */ + }; +#endif + +#define d_fileno d_ino /* Backwards compatibility. */ + +#undef _DIRENT_HAVE_D_NAMLEN +#define _DIRENT_HAVE_D_RECLEN +#define _DIRENT_HAVE_D_OFF From 02043cd067997b6cbb14b5106c02a3adfd2e45cb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 25 Aug 1999 20:18:37 +0000 Subject: [PATCH 1638/4487] Define endianess for HPPA. --- sysdeps/hppa/bits/endian.h | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 sysdeps/hppa/bits/endian.h diff --git a/sysdeps/hppa/bits/endian.h b/sysdeps/hppa/bits/endian.h new file mode 100644 index 0000000000..585db0c0fa --- /dev/null +++ b/sysdeps/hppa/bits/endian.h @@ -0,0 +1,7 @@ +/* hppa1.1 big-endian. */ + +#ifndef _ENDIAN_H +# error "Never use directly; include instead." +#endif + +#define __BYTE_ORDER __BIG_ENDIAN From 7dab346125c2a6060a895636418dc26dc60c4c8b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 25 Aug 1999 20:26:03 +0000 Subject: [PATCH 1639/4487] HPUX error number definitions. --- sysdeps/unix/sysv/hpux/bits/errno.h | 36 +++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 sysdeps/unix/sysv/hpux/bits/errno.h diff --git a/sysdeps/unix/sysv/hpux/bits/errno.h b/sysdeps/unix/sysv/hpux/bits/errno.h new file mode 100644 index 0000000000..9414fc792a --- /dev/null +++ b/sysdeps/unix/sysv/hpux/bits/errno.h @@ -0,0 +1,36 @@ +/* Copyright (C) 1991, 1994, 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* This file defines the `errno' constants. */ + +#if !defined __Emath_defined && (defined _ERRNO_H || defined __need_Emath) +#undef __need_Emath +#define __Emath_defined 1 + +#endif + +#ifdef _ERRNO_H +#define EBADF 9 +#define ENOMEM 12 +#define EINVAL 22 +#define ERANGE 34 +#define ENOMSG 35 +#define ENOSYS 251 +#endif + +#define __set_errno(val) errno = (val) From 08316d230bc844b265930380d7b89ee1264bc3b4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 25 Aug 1999 20:27:19 +0000 Subject: [PATCH 1640/4487] HPUX setjmp buffer definition. --- sysdeps/unix/sysv/hpux/bits/setjmp.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 sysdeps/unix/sysv/hpux/bits/setjmp.h diff --git a/sysdeps/unix/sysv/hpux/bits/setjmp.h b/sysdeps/unix/sysv/hpux/bits/setjmp.h new file mode 100644 index 0000000000..216d7bdd64 --- /dev/null +++ b/sysdeps/unix/sysv/hpux/bits/setjmp.h @@ -0,0 +1,16 @@ +/* Define the machine-dependent type `jmp_buf'. Stub version. */ + +#ifndef _SETJMP_H +# error "Never include directly; use instead." +#endif + +/* XXX This should go into different files!!! */ + +#ifdef __hp9000s300 +typedef int __jmp_buf[100]; +#endif /* __hp9000s300 */ + +#ifdef __hp9000s800 +typedef double __jmp_buf[25]; +#endif /* __hp9000s800 */ + From a0688161bd579a3a62415db5a3e26e59628e7dd1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 25 Aug 1999 20:28:22 +0000 Subject: [PATCH 1641/4487] HPUX stat buffer definition. --- sysdeps/unix/sysv/hpux/bits/stat.h | 123 +++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 sysdeps/unix/sysv/hpux/bits/stat.h diff --git a/sysdeps/unix/sysv/hpux/bits/stat.h b/sysdeps/unix/sysv/hpux/bits/stat.h new file mode 100644 index 0000000000..4ef5e7263c --- /dev/null +++ b/sysdeps/unix/sysv/hpux/bits/stat.h @@ -0,0 +1,123 @@ +/* Copyright (C) 1992, 1995, 1996, 1997, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_STAT_H +# error "Never include directly; use instead." +#endif + +/* Versions of the `struct stat' data structure. */ +#define _STAT_VER_SVR4 1 +#define _STAT_VER _STAT_VER_SVR4 /* The one defined below. */ + +/* Versions of the `xmknod' interface. */ +#define _MKNOD_VER_SVR4 1 +#define _MKNOD_VER _MKNOD_VER_SVR4 /* The bits defined below. */ + + +struct stat + { + __dev_t st_dev; /* Device. */ + unsigned short int __pad1; +#ifndef __USE_FILE_OFFSET64 + __ino_t st_ino; /* File serial number. */ +#else + __ino64_t st_ino; /* File serial number. */ +#endif + __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. */ + unsigned short int __pad2; +#ifndef __USE_FILE_OFFSET64 + __off_t st_size; /* Size of file, in bytes. */ +#else + __off64_t st_size; /* Size of file, in bytes. */ +#endif + unsigned long int st_blksize; /* Optimal block size for I/O. */ + +#ifndef __USE_FILE_OFFSET64 + __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ +#else + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ +#endif + __time_t st_atime; /* Time of last access. */ + unsigned long int __unused1; + __time_t st_mtime; /* Time of last modification. */ + unsigned long int __unused2; + __time_t st_ctime; /* Time of last status change. */ + unsigned long int __unused3; + unsigned long int __unused4; + unsigned long int __unused5; + }; + +#ifdef __USE_LARGEFILE64 +struct stat64 + { + __dev_t st_dev; /* Device. */ + unsigned short int __pad1; + + __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. */ + unsigned short int __pad2; + __off64_t st_size; /* Size of file, in bytes. */ + unsigned long int st_blksize; /* Optimal block size for I/O. */ + + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ + __time_t st_atime; /* Time of last access. */ + unsigned long int __unused1; + __time_t st_mtime; /* Time of last modification. */ + unsigned long int __unused2; + __time_t st_ctime; /* Time of last status change. */ + unsigned long int __unused3; + unsigned long int __unused4; + unsigned long int __unused5; + }; +#endif + +/* Tell code we have these members. */ +#define _STATBUF_ST_BLKSIZE +#define _STATBUF_ST_RDEV + +/* Encoding of the file mode. */ + +#define __S_IFMT 0170000 /* These bits determine file type. */ + +/* File types. */ +#define __S_IFDIR 0040000 /* Directory. */ +#define __S_IFCHR 0020000 /* Character device. */ +#define __S_IFBLK 0060000 /* Block device. */ +#define __S_IFREG 0100000 /* Regular file. */ +#define __S_IFIFO 0010000 /* FIFO. */ + +/* These don't actually exist on System V, but having them doesn't hurt. */ +#define __S_IFLNK 0120000 /* Symbolic link. */ +#define __S_IFSOCK 0140000 /* Socket. */ + +/* Protection bits. */ + +#define __S_ISUID 04000 /* Set user ID on execution. */ +#define __S_ISGID 02000 /* Set group ID on execution. */ +#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ +#define __S_IREAD 0400 /* Read by owner. */ +#define __S_IWRITE 0200 /* Write by owner. */ +#define __S_IEXEC 0100 /* Execute by owner. */ From fe3f1d14b5aafdae316dc0dc60c65826445c0120 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 25 Aug 1999 20:28:43 +0000 Subject: [PATCH 1642/4487] HPUX type definitions. --- sysdeps/unix/sysv/hpux/bits/types.h | 147 ++++++++++++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 sysdeps/unix/sysv/hpux/bits/types.h diff --git a/sysdeps/unix/sysv/hpux/bits/types.h b/sysdeps/unix/sysv/hpux/bits/types.h new file mode 100644 index 0000000000..86595e87a8 --- /dev/null +++ b/sysdeps/unix/sysv/hpux/bits/types.h @@ -0,0 +1,147 @@ +/* Copyright (C) 1991, 92, 94, 95, 96, 97, 98 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* + * Never include this file directly; use instead. + */ + +#ifndef _BITS_TYPES_H +#define _BITS_TYPES_H 1 + +#include + +#define __need_size_t +#include + +/* Convenience types. */ +typedef unsigned char __u_char; +typedef unsigned short __u_short; +typedef unsigned int __u_int; +typedef unsigned long __u_long; +#ifdef __GNUC__ +__extension__ typedef unsigned long long int __u_quad_t; +__extension__ typedef long long int __quad_t; +#else +typedef struct + { + long int __val[2]; + } __quad_t; +typedef struct + { + __u_long __val[2]; + } __u_quad_t; +#endif +typedef signed char __int8_t; +typedef unsigned char __uint8_t; +typedef signed short int __int16_t; +typedef unsigned short int __uint16_t; +typedef signed int __int32_t; +typedef unsigned int __uint32_t; +#ifdef __GNUC__ +__extension__ typedef signed long long int __int64_t; +__extension__ typedef unsigned long long int __uint64_t; +#endif +typedef __quad_t *__qaddr_t; + +typedef long int __dev_t; /* Type of device numbers. */ +typedef long int __uid_t; /* Type of user identifications. */ +typedef long int __gid_t; /* Type of group identifications. */ +typedef __u_long __ino_t; /* Type of file serial numbers. */ +typedef __u_short __mode_t; /* Type of file attribute bitmasks. */ +typedef short __nlink_t; /* Type of file link counts. */ +typedef long int __off_t; /* Type of file sizes and offsets. */ +typedef __quad_t __loff_t; /* Type of file sizes and offsets. */ +typedef long int __pid_t; /* Type of process identifications. */ +typedef long int __ssize_t; /* Type of a byte count, or error. */ +typedef __u_long __rlim_t; /* Type of resource counts. */ +typedef __quad_t __rlim64_t; /* Type of resource counts (LFS). */ +typedef long int __id_t; /* General type for ID. */ + +typedef struct + { + long int __val[2]; + } __fsid_t; /* Type of file system IDs. */ + +/* Everythin' else. */ +typedef long int __daddr_t; /* The type of a disk address. */ +typedef char *__caddr_t; +typedef long int __time_t; +typedef long int __swblk_t; /* Type of a swap block maybe? */ + +typedef __u_long __clock_t; + +/* One element in the file descriptor mask array. */ +typedef long int __fd_mask; + +/* Number of descriptors that can fit in an `fd_set'. */ +#define __FD_SETSIZE 2048 + +/* It's easier to assume 8-bit bytes than to get CHAR_BIT. */ +#define __NFDBITS (8 * sizeof (__fd_mask)) +#define __FDELT(d) ((d) / __NFDBITS) +#define __FDMASK(d) ((__fd_mask) 1 << ((d) % __NFDBITS)) + +/* fd_set for select and pselect. */ +typedef struct + { + /* XPG4.2 requires this member name. Otherwise avoid the name + from the global namespace. */ +#ifdef __USE_XOPEN + __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS]; +# define __FDS_BITS(set) ((set)->fds_bits) +#else + __fd_mask __fds_bits[__FD_SETSIZE / __NFDBITS]; +# define __FDS_BITS(set) ((set)->__fds_bits) +#endif + } __fd_set; + + +typedef long int __key_t; + +/* Used in `struct shmid_ds'. */ +typedef unsigned short int __ipc_pid_t; + + +/* Types from the Large File Support interface. */ + +/* Type to count number os disk blocks. */ +typedef __u_long __blkcnt_t; +typedef __u_quad_t __blkcnt64_t; + +/* Type to count file system blocks. */ +typedef long int __fsblkcnt_t; +typedef __quad_t __fsblkcnt64_t; + +/* Type to count file system inodes. */ +typedef __u_long __fsfilcnt_t; +typedef __u_quad_t __fsfilcnt64_t; + +/* Type of file serial numbers. */ +typedef __u_long __ino64_t; + +/* Type of file sizes and offsets. */ +typedef __loff_t __off64_t; + +/* Used in XTI. */ +typedef int __t_scalar_t; +typedef unsigned int __t_uscalar_t; + +/* Duplicates info from stdint.h but this is used in unistd.h. */ +typedef int __intptr_t; + +#endif /* bits/types.h */ From 957a4a990a7a965e22a23a02f968758fb2b35e58 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 28 Aug 1999 00:25:40 +0000 Subject: [PATCH 1643/4487] Update from 2.3.15 kernel. --- sysdeps/unix/sysv/linux/mips/bits/socket.h | 47 ++++++++++++++++++---- 1 file changed, 39 insertions(+), 8 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h index 5dbdee419f..74f54e87bd 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/socket.h +++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h @@ -82,6 +82,7 @@ enum __socket_type #define PF_ECONET 19 /* Acorn Econet. */ #define PF_ATMSVC 20 /* ATM SVCs. */ #define PF_SNA 22 /* Linux SNA Project */ +#define PF_IRDA 23 /* IRDA sockets. */ #define PF_MAX 32 /* For now.. */ /* Address families. */ @@ -102,7 +103,7 @@ enum __socket_type #define AF_DECnet PF_DECnet #define AF_NETBEUI PF_NETBEUI #define AF_SECURITY PF_SECURITY -#define pseudo_AF_KEY PF_KEY +#define AF_KEY PF_KEY #define AF_NETLINK PF_NETLINK #define AF_ROUTE PF_ROUTE #define AF_PACKET PF_PACKET @@ -110,6 +111,7 @@ enum __socket_type #define AF_ECONET PF_ECONET #define AF_ATMSVC PF_ATMSVC #define AF_SNA PF_SNA +#define AF_IRDA PF_IRDA #define AF_MAX PF_MAX /* Socket level values. Others are defined in the appropriate headers. @@ -119,6 +121,10 @@ enum __socket_type #define SOL_RAW 255 #define SOL_DECNET 261 #define SOL_X25 262 +#define SOL_PACKET 263 +#define SOL_ATM 264 /* ATM layer (cell level). */ +#define SOL_AAL 265 /* ATM Adaption Layer (packet level). */ +#define SOL_IRDA 266 /* Maximum queue length specifiable by listen. */ #define SOMAXCONN 128 @@ -137,17 +143,17 @@ struct sockaddr /* Structure large enough to hold any socket address (with the historical exception of AF_UNIX). We reserve 128 bytes. */ #if ULONG_MAX > 0xffffffff -# define __ss_align __uint64_t +# define __ss_aligntype __uint64_t #else -# define __ss_align __uint32_t +# define __ss_aligntype __uint32_t #endif #define _SS_SIZE 128 -#define _SS_PADSIZE (_SS_SIZE - (2 * sizeof(__ss_align))) +#define _SS_PADSIZE (_SS_SIZE - (2 * sizeof (__ss_aligntype))) struct sockaddr_storage { __SOCKADDR_COMMON (__ss_); /* Address family, etc. */ - __ss_align __ss_align; /* Force desired alignment. */ + __ss_aligntype __ss_align; /* Force desired alignment. */ char __ss_padding[_SS_PADSIZE]; }; @@ -161,10 +167,35 @@ enum #define MSG_PEEK MSG_PEEK MSG_DONTROUTE = 0x04, /* Don't use local routing. */ #define MSG_DONTROUTE MSG_DONTROUTE +#ifdef __USE_GNU + /* DECnet uses a different name. */ + MSG_TRYHARD = MSG_DONTROUTE, +# define MSG_TRYHARD MSG_DONTROUTE +#endif MSG_CTRUNC = 0x08, /* Control data lost before delivery. */ #define MSG_CTRUNC MSG_CTRUNC - MSG_PROXY = 0x10 /* Supply or ask second address. */ + MSG_PROXY = 0x10, /* Supply or ask second address. */ #define MSG_PROXY MSG_PROXY + MSG_TRUNC = 0x20, +#define MSG_TRUNC MSG_TRUNC + MSG_DONTWAIT = 0x40, /* Nonblocking IO. */ +#define MSG_DONTWAIT MSG_DONTWAIT + MSG_EOR = 0x80, /* End of record. */ +#define MSG_EOR MSG_EOR + MSG_WAITALL = 0x100, /* Wait for a full request. */ +#define MSG_WAITALL MSG_WAITALL + MSG_FIN = 0x200, +#define MSG_FIN MSG_FIN + MSG_SYN = 0x400, +#define MSG_SYN MSG_SYN + MSG_URG = 0x800, +#define MSG_URG MSG_URG + MSG_RST = 0x1000, +#define MSG_RST MSG_RST + MSG_ERRQUEUE = 0x2000, /* Fetch message from error queue. */ +#define MSG_ERRQUEUE MSG_ERRQUEUE + MSG_NOSIGNAL = 0x4000 /* Do not generate SIGPIPE. */ +#define MSG_NOSIGNAL MSG_NOSIGNAL }; @@ -224,7 +255,7 @@ __cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW { if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr)) /* The kernel header does this so there may be a reason. */ - return NULL; + return 0; __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)); @@ -233,7 +264,7 @@ __cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len) >= ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen))) /* No more entries. */ - return NULL; + return 0; return __cmsg; } #endif /* Use `extern inline'. */ From e7a486ef9923f710dac7df97c70d9841b8c649c3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 28 Aug 1999 22:14:27 +0000 Subject: [PATCH 1644/4487] Fix sa_flags, partially reverting a patch from 1998-12-29. We just can't change the flags, kernels with different flags lead to incompatibilities. --- sysdeps/unix/sysv/linux/mips/bits/sigaction.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h index 8d080272fc..963b425f48 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h +++ b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h @@ -55,18 +55,20 @@ struct sigaction }; /* Bits in `sa_flags'. */ -#define SA_NOCLDSTOP 0x00020000 /* Don't send SIGCHLD when children stop. */ +/* Please note that some Linux kernels versions use different values for these + flags which is a bug in those kernel versions. */ +#define SA_NOCLDSTOP 0x00000001 /* Don't send SIGCHLD when children stop. */ #define SA_SIGINFO 0x00000008 /* Invoke signal-catching function with three arguments instead of one. */ #if defined __USE_UNIX98 || defined __USE_MISC -# define SA_ONSTACK 0x00000001 /* Use signal stack by using `sa_restorer'. */ -# define SA_RESETHAND 0x00000002 /* Reset to SIG_DFL on entry to handler. */ -# define SA_RESTART 0x00000004 /* Restart syscall on signal return. */ -# define SA_NODEFER 0x00000010 /* Don't automatically block the signal when +# define SA_ONSTACK 0x08000000 /* Use signal stack by using `sa_restorer'. */ +# define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler. */ +# define SA_RESTART 0x10000000 /* Restart syscall on signal return. */ +# define SA_NODEFER 0x40000000 /* Don't automatically block the signal when its handler is being executed. */ #endif #ifdef __USE_MISC -# define SA_INTERRUPT 0x01000000 /* Historical no-op. */ +# define SA_INTERRUPT 0x20000000 /* Historical no-op. */ /* Some aliases for the SA_ constants. */ # define SA_NOMASK SA_NODEFER From c1d675f8aefc349e43101d2a518f4d09eadf9f04 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 30 Aug 1999 21:51:20 +0000 Subject: [PATCH 1645/4487] [db2]: Set CFLAGS of mutex.c to make spinlocks known. --- sysdeps/alpha/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile index 250a31779c..63c7d4bba0 100644 --- a/sysdeps/alpha/Makefile +++ b/sysdeps/alpha/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc. +# Copyright (C) 1993, 94, 95, 96, 97, 99 Free Software Foundation, Inc. # This file is part of the GNU C Library. # Contributed by Brendan Kehoe (brendan@zen.org). @@ -17,6 +17,10 @@ # write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. +ifeq ($(subdir),db2) +CPPFLAGS += -DHAVE_SPINLOCKS=1 -DHAVE_ASSEM_ALPHA=1 +endif + ifeq ($(subdir),gmon) sysdep_routines += _mcount endif From 7f3e8e714677587a8f2c13c593d9b39910eda961 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 1 Sep 1999 16:34:37 +0000 Subject: [PATCH 1646/4487] #include . --- sysdeps/unix/sysv/linux/arm/sigcontextinfo.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h b/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h index 51788e0e51..7f6ecbdee1 100644 --- a/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h +++ b/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h @@ -17,6 +17,8 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include + #define SIGCONTEXT int _a2, int _a3, int _a4, union k_sigcontext #define SIGCONTEXT_EXTRA_ARGS _a2, _a3, _a4, From 2788ea804da2162bc7e9c7ee81e9332fbc1a249c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 1 Sep 1999 16:34:56 +0000 Subject: [PATCH 1647/4487] Enclose header in an #ifdef statement to prevent it from being included twice. --- sysdeps/unix/sysv/linux/arm/bits/armsigctx.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h b/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h index ba78c03a89..3435a961bc 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h +++ b/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h @@ -1,5 +1,5 @@ /* Definition of `struct sigcontext' for Linux/ARM - Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 1999 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 @@ -21,6 +21,9 @@ Fortunately 2.0 puts a magic number in the first word and this is not a legal value for `trap_no', so we can tell them apart. */ +#ifndef __ARMSIGCTX_H +#define __ARMSIGCTX_H 1 + #include union k_sigcontext @@ -59,3 +62,5 @@ union k_sigcontext }; #define SIGCONTEXT_2_0_MAGIC 0x4B534154 + +#endif /* bits/armsigctx.h */ From 876914479ac53fd426d2557c4861494b2fda79e7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 3 Sep 1999 07:05:16 +0000 Subject: [PATCH 1648/4487] Include instead of . --- sysdeps/unix/sysv/linux/alpha/sys/procfs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h index 7bd6e6958d..7d4059664e 100644 --- a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1999 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 @@ #include #include #include -#include +#include #include __BEGIN_DECLS From f908ea6c8542999a75ae8db38dbbeb52ef1e7b21 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 3 Sep 1999 07:08:11 +0000 Subject: [PATCH 1649/4487] Linux/Alpha specific definitions to access information passed up from the kernel. --- sysdeps/unix/sysv/linux/alpha/sys/user.h | 50 ++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/sys/user.h diff --git a/sysdeps/unix/sysv/linux/alpha/sys/user.h b/sysdeps/unix/sysv/linux/alpha/sys/user.h new file mode 100644 index 0000000000..fe6acb2247 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/sys/user.h @@ -0,0 +1,50 @@ +/* Copyright (C) 1999 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_USER_H +#define _SYS_USER_H 1 + +/* The whole purpose of this file is for gdb/strace and gdb/strace + only. Don't read too much into it. Don't use it for anything other + than gdb/strace unless you know what you are doing. */ + +#include +#include + +struct user +{ + unsigned long int regs[EF_SIZE / 8 + 32]; /* integer and fp regs */ + size_t u_tsize; /* text size (pages) */ + size_t u_dsize; /* data size (pages) */ + size_t u_ssize; /* stack size (pages) */ + unsigned long int start_code; /* text starting address */ + unsigned long int start_data; /* data starting address */ + unsigned long int start_stack; /* stack starting address */ + long int signal; /* signal causing core dump */ + struct regs *u_ar0; /* help gdb find registers */ + unsigned long int magic; /* identifies a core file */ + char u_comm[32]; /* user command name */ +}; + +#define NBPG PAGE_SIZE +#define UPAGES 1 +#define HOST_TEXT_START_ADDR (u.start_code) +#define HOST_DATA_START_ADDR (u.start_data) +#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) + +#endif /* sys/user.h */ From ad2b56f270ec6d0da495ca7d2dc09e7923a50058 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 7 Sep 1999 01:40:31 +0000 Subject: [PATCH 1650/4487] Add sys/user.h. --- sysdeps/unix/sysv/linux/alpha/Dist | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist index 21e134024f..2ed1571fb1 100644 --- a/sysdeps/unix/sysv/linux/alpha/Dist +++ b/sysdeps/unix/sysv/linux/alpha/Dist @@ -15,4 +15,5 @@ sizes.h sys/acct.h sys/io.h sys/procfs.h +sys/user.h xstatconv.c From 557847754d5567636f8203059b81ea1f67647ab9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 14 Sep 1999 01:38:51 +0000 Subject: [PATCH 1651/4487] Added members 'unsigned char ftype[8]', and 'unsigned int init_flag' to struct user_fp. Tnese were added in version 2.2.12 of the ARM Linux kernel. --- sysdeps/unix/sysv/linux/arm/sys/user.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/unix/sysv/linux/arm/sys/user.h b/sysdeps/unix/sysv/linux/arm/sys/user.h index f06d3e465a..253b0f5ea9 100644 --- a/sysdeps/unix/sysv/linux/arm/sys/user.h +++ b/sysdeps/unix/sysv/linux/arm/sys/user.h @@ -40,6 +40,8 @@ struct user_fp } fpregs[8]; unsigned int fpsr:32; unsigned int fpcr:32; + unsigned char ftype[8]; + unsigned int init_flag; }; struct user From f70ab57d2e45ef000d859b69d6b3fdc2cae696a4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 14 Sep 1999 01:40:33 +0000 Subject: [PATCH 1652/4487] Linux/Arm definitions for register access. --- sysdeps/unix/sysv/linux/arm/sys/elf.h | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/sys/elf.h diff --git a/sysdeps/unix/sysv/linux/arm/sys/elf.h b/sysdeps/unix/sysv/linux/arm/sys/elf.h new file mode 100644 index 0000000000..83658c3c27 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/sys/elf.h @@ -0,0 +1,30 @@ +/* Copyright (C) 1996, 1997, 1999 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_ELF_H +#define _SYS_ELF_H 1 + +#include + +typedef unsigned long int elf_greg_t; +#define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t)) + +typedef elf_greg_t elf_gregset_t[ELF_NGREG]; +typedef struct user_fp elf_fpregset_t; + +#endif /* sys/elf.h */ From 7733584f0954970ebd0866c6dc3b4891f0044664 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 14 Sep 1999 01:40:51 +0000 Subject: [PATCH 1653/4487] Linux/Arm definitions for process image access. --- sysdeps/unix/sysv/linux/arm/sys/procfs.h | 99 ++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/sys/procfs.h diff --git a/sysdeps/unix/sysv/linux/arm/sys/procfs.h b/sysdeps/unix/sysv/linux/arm/sys/procfs.h new file mode 100644 index 0000000000..e2f373155d --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/sys/procfs.h @@ -0,0 +1,99 @@ +/* Copyright (C) 1996, 1997, 1999 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_PROCFS_H + +#define _SYS_PROCFS_H 1 +#include + +/* This is somehow modelled after the file of the same name on SysVr4 + systems. It provides a definition of the core file format for ELF + used on Linux. */ + +#include +#include +#include +#include +#include + +__BEGIN_DECLS + +struct elf_siginfo + { + int si_signo; /* Signal number. */ + int si_code; /* Extra code. */ + int si_errno; /* Errno. */ + }; + +/* Definitions to generate core files. Fields present but not used are + marked with "XXX". */ +struct elf_prstatus + { +#if 0 + long int pr_flags; /* XXX Process flags. */ + short int pr_why; /* XXX Reason for process halt. */ + short int pr_what; /* XXX More detailed reason. */ +#endif + struct elf_siginfo pr_info; /* Info associated with signal. */ + short int pr_cursig; /* Current signal. */ + unsigned long int pr_sigpend; /* Set of pending signals. */ + unsigned long int pr_sighold; /* Set of held signals. */ +#if 0 + struct sigaltstack pr_altstack; /* Alternate stack info. */ + struct sigaction pr_action; /* Signal action for current sig. */ +#endif + __pid_t pr_pid; + __pid_t pr_ppid; + __pid_t pr_pgrp; + __pid_t pr_sid; + struct timeval pr_utime; /* User time. */ + struct timeval pr_stime; /* System time. */ + struct timeval pr_cutime; /* Cumulative user time. */ + struct timeval pr_cstime; /* Cumulative system time. */ +#if 0 + long int pr_instr; /* Current instruction. */ +#endif + elf_gregset_t pr_reg; /* GP registers. */ + int pr_fpvalid; /* True if math copro being used. */ + }; + + +#define ELF_PRARGSZ (80) /* Number of chars for args */ + +struct elf_prpsinfo + { + char pr_state; /* Numeric process state. */ + char pr_sname; /* Char for pr_state. */ + char pr_zomb; /* Zombie. */ + char pr_nice; /* Nice val. */ + unsigned long int pr_flag; /* Flags. */ + unsigned short int pr_uid; + unsigned short int pr_gid; + int pr_pid, pr_ppid, pr_pgrp, pr_sid; + /* Lots missing */ + char pr_fname[16]; /* Filename of executable. */ + char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ + }; + + +typedef struct elf_prstatus prstatus_t; +typedef struct elf_prpsinfo prpsinfo_t; + +__END_DECLS + +#endif /* sys/procfs.h */ From c628e0383d2beb71bf73423f7ac9775dc576978c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 1 Oct 1999 16:03:15 +0000 Subject: [PATCH 1654/4487] Disable debug messages. --- sysdeps/unix/sysv/linux/alpha/ioperm.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c index 5b2edd0482..7b38fcceea 100644 --- a/sysdeps/unix/sysv/linux/alpha/ioperm.c +++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c @@ -436,6 +436,8 @@ static struct ioswtch ioswtch[] = { } }; +#undef DEBUG_IOPERM + /* routine to process the /proc/cpuinfo information into the fields */ /* that are required for correctly determining the platform parameters */ @@ -474,7 +476,7 @@ process_cpuinfo(void) fclose (fp); -#if 1 +#ifdef DEBUG_IOPERM fprintf(stderr, "system type: %s\n", systype); fprintf(stderr, "system vari: %s\n", sysvari); fprintf(stderr, "cpu model: %s\n", cpumodel); @@ -598,7 +600,7 @@ init_iosys (void) /* systype is not a know platform name... */ __set_errno (EINVAL); -#if 1 +#ifdef DEBUG_IOPERM fprintf(stderr, "init_iosys: platform not recognized\n"); #endif return -1; @@ -612,7 +614,7 @@ _ioperm (unsigned long int from, unsigned long int num, int turn_on) int prot, err; if (!io.swp && init_iosys() < 0) { -#if 1 +#ifdef DEBUG_IOPERM fprintf(stderr, "ioperm: init_iosys() failed\n"); #endif return -1; @@ -622,13 +624,13 @@ _ioperm (unsigned long int from, unsigned long int num, int turn_on) if (from >= MAX_PORT || from + num > MAX_PORT) { __set_errno (EINVAL); -#if 1 +#ifdef DEBUG_IOPERM fprintf(stderr, "ioperm: from/num out of range\n"); #endif return -1; } -#if 1 +#ifdef DEBUG_IOPERM fprintf(stderr, "ioperm: turn_on %d io.base %ld\n", turn_on, io.base); #endif @@ -645,7 +647,7 @@ _ioperm (unsigned long int from, unsigned long int num, int turn_on) fd = open ("/dev/mem", O_RDWR); if (fd < 0) { -#if 1 +#ifdef DEBUG_IOPERM fprintf(stderr, "ioperm: /dev/mem open failed\n"); #endif return -1; @@ -657,7 +659,7 @@ _ioperm (unsigned long int from, unsigned long int num, int turn_on) (unsigned long int) __mmap (0, len, PROT_NONE, MAP_SHARED, fd, io.io_base); close (fd); -#if 1 +#ifdef DEBUG_IOPERM fprintf(stderr, "ioperm: mmap of len 0x%lx returned 0x%lx\n", len, io.base); #endif @@ -678,7 +680,7 @@ _ioperm (unsigned long int from, unsigned long int num, int turn_on) addr &= PAGE_MASK; len = port_to_cpu_addr (from + num, io.swiz, 1) - addr; err = mprotect ((void *) addr, len, prot); -#if 1 +#ifdef DEBUG_IOPERM fprintf(stderr, "ioperm: mprotect returned %d\n", err); #endif return err; From fcda5fcc59093c4e7014a8e6a4da3e5db43c38f5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 10 Oct 1999 20:31:45 +0000 Subject: [PATCH 1655/4487] HPPA definitions. --- sysdeps/hppa/sysdep.h | 77 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 sysdeps/hppa/sysdep.h diff --git a/sysdeps/hppa/sysdep.h b/sysdeps/hppa/sysdep.h new file mode 100644 index 0000000000..735882da09 --- /dev/null +++ b/sysdeps/hppa/sysdep.h @@ -0,0 +1,77 @@ +/* Assembler macros for HP/PA. + Copyright (C) 1999 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper, , August 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +#ifdef __ASSEMBLER__ + +/* Syntactic details of assembler. */ + +#define ALIGNARG(log2) log2 + + +/* Define an entry point visible from C. + + There is currently a bug in gdb which prevents us from specifying + incomplete stabs information. Fake some entries here which specify + the current source file. */ +#define ENTRY(name) \ + .SPACE $TEXT$; \ + .SUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY; \ + .align ALIGNARG(4); \ + .NSUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY; \ + .EXPORT C_SYMBOL_NAME(name),ENTRY,PRIV_LEV=3,ARGW0=GR,RTNVAL=GR; \ + C_LABEL(name) \ + + CALL_MCOUNT + +#undef END +#define END(name) \ + .PROCEND + + +/* If compiled for profiling, call `mcount' at the start of each function. */ +#ifdef PROF +/* The mcount code relies on a normal frame pointer being on the stack + to locate our caller, so push one just for its benefit. */ +#define CALL_MCOUNT \ + XXX +#else +#define CALL_MCOUNT /* Do nothing. */ +#endif + +#define PSEUDO(name, syscall_name, args) \ + ENTRY (name) \ + DO_CALL (syscall_name, args) + +#undef PSEUDO_END +#define PSEUDO_END(name) \ + END (name) + +#define JUMPTARGET(name) name +#define SYSCALL_PIC_SETUP /* Nothing. */ + +/* Local label name for asm code. */ +#ifndef L +#define L(name) name +#endif + +#endif /* __ASSEMBLER__ */ From 18e7dfd6268636a227597c6dc96a368b81386dc6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 10 Oct 1999 20:34:26 +0000 Subject: [PATCH 1656/4487] HPUX specific definitions. --- sysdeps/unix/sysv/hpux/sysdep.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 sysdeps/unix/sysv/hpux/sysdep.h diff --git a/sysdeps/unix/sysv/hpux/sysdep.h b/sysdeps/unix/sysv/hpux/sysdep.h new file mode 100644 index 0000000000..88c2dcf6aa --- /dev/null +++ b/sysdeps/unix/sysv/hpux/sysdep.h @@ -0,0 +1,26 @@ +/* Copyright (C) 1999 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper, , August 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* No underscores necessary. */ +#define NO_UNDERSCORES + +#include + +/* HPUX uses the usual syscall naming. */ +#define SYS_ify(name) SYS_##name From 362932c82f64a9fc1947d8be2b9f1a0d30310a52 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 11 Oct 1999 19:22:39 +0000 Subject: [PATCH 1657/4487] Declare SA_SIGINFO. --- sysdeps/unix/sysv/linux/alpha/bits/sigaction.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h index ae1249af51..2f8b3bad3c 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h @@ -36,6 +36,8 @@ struct sigaction /* Bits in `sa_flags'. */ #define SA_NOCLDSTOP 0x00000004 /* Don't send SIGCHLD when children stop. */ +#define SA_SIGINFO 0x00000040 /* Invoke signal-catching function with three + arguments instead of one. */ #ifdef __USE_MISC # define SA_ONSTACK 0x00000001 /* Use signal stack by using `sa_restorer'. */ # define SA_RESTART 0x00000002 /* Restart syscall on signal return. */ From 12b8ab07b980809e254857b1163871655caa88ef Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 12 Oct 1999 15:19:54 +0000 Subject: [PATCH 1658/4487] Update to match generic Linux version. --- sysdeps/unix/sysv/linux/alpha/bits/sigaction.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h index 2f8b3bad3c..7a586be7c9 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h @@ -1,5 +1,5 @@ /* The proper definitions for Linux/Alpha sigaction. - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1999 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,7 +25,20 @@ struct sigaction { /* Signal handler. */ +#ifdef __USE_POSIX199309 + union + { + /* Used if SA_SIGINFO is not set. */ + __sighandler_t sa_handler; + /* Used if SA_SIGINFO is set. */ + void (*sa_sigaction) (int, siginfo_t *, void *); + } + __sigaction_handler; +# define sa_handler __sigaction_handler.sa_handler +# define sa_sigaction __sigaction_handler.sa_sigaction +#else __sighandler_t sa_handler; +#endif /* Additional set of signals to be blocked. */ __sigset_t sa_mask; From 6e64e12d90de2f0158e45dde1707ce42fddd9e5e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 12 Oct 1999 15:50:11 +0000 Subject: [PATCH 1659/4487] Add definition of gregset_t and fpregset_t. --- sysdeps/unix/sysv/linux/alpha/sys/ucontext.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h b/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h index 08eeb6e4a2..50c643ae06 100644 --- a/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h @@ -24,6 +24,26 @@ #include + +/* Type for general register. */ +typedef long int greg_t; + +/* Number of general registers. */ +#define NGREG 33 + +/* Container for all general registers. */ +typedef greg_t gregset_t[NGREG]; + +/* Type for floating-point register. */ +typedef long int fpreg_t; + +/* Number of general registers. */ +#define NFPREG 32 + +/* Container for all general registers. */ +typedef fpreg_t fpregset_t[NFPREG]; + + /* A machine context is exactly a sigcontext. */ typedef struct sigcontext mcontext_t; From 33f88b1aad39de2fe003c645c0a7af1e30664d2f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 19 Oct 1999 03:06:37 +0000 Subject: [PATCH 1660/4487] Remove wordsize-32 reference. --- sysdeps/mips/Implies | 1 - 1 file changed, 1 deletion(-) diff --git a/sysdeps/mips/Implies b/sysdeps/mips/Implies index 9f60963329..8c18cb3034 100644 --- a/sysdeps/mips/Implies +++ b/sysdeps/mips/Implies @@ -1,4 +1,3 @@ -wordsize-32 # MIPS uses IEEE 754 floating point. ieee754/flt-32 ieee754/dbl-64 From 1e4e03d63bf03ef838a65c6a36ff8450ccda4568 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 19 Oct 1999 03:06:55 +0000 Subject: [PATCH 1661/4487] Implied directories for MIPS3. --- sysdeps/mips/mips3/Implies | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/mips/mips3/Implies diff --git a/sysdeps/mips/mips3/Implies b/sysdeps/mips/mips3/Implies new file mode 100644 index 0000000000..39a34c5f57 --- /dev/null +++ b/sysdeps/mips/mips3/Implies @@ -0,0 +1 @@ +wordsize-32 From 0f2d32942cddfb8f1fce834506645114b1423eac Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 19 Oct 1999 03:07:09 +0000 Subject: [PATCH 1662/4487] Correct namespace selection. --- sysdeps/unix/sysv/linux/alpha/bits/sigaction.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h index 7a586be7c9..be04235981 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h @@ -49,19 +49,21 @@ struct sigaction /* Bits in `sa_flags'. */ #define SA_NOCLDSTOP 0x00000004 /* Don't send SIGCHLD when children stop. */ -#define SA_SIGINFO 0x00000040 /* Invoke signal-catching function with three - arguments instead of one. */ -#ifdef __USE_MISC +#define SA_SIGINFO 0x00000040 /* Invoke signal-catching function with + three arguments instead of one. */ +#if defined __USE_UNIX98 || defined __USE_MISC # define SA_ONSTACK 0x00000001 /* Use signal stack by using `sa_restorer'. */ # define SA_RESTART 0x00000002 /* Restart syscall on signal return. */ -# define SA_INTERRUPT 0x20000000 /* Historical no-op. */ -# define SA_NOMASK 0x00000008 /* Don't automatically block the signal +# define SA_NODEFER 0x00000008 /* Don't automatically block the signal when its handler is being executed. */ -# define SA_ONESHOT 0x00000010 /* Reset to SIG_DFL on entry to handler. */ +# define SA_RESETHAND 0x00000010 /* Reset to SIG_DFL on entry to handler. */ +#endif +#ifdef __USE_MISC +# define SA_INTERRUPT 0x20000000 /* Historical no-op. */ /* Some aliases for the SA_ constants. */ -# define SA_NODEFER SA_NOMASK -# define SA_RESETHAND SA_ONESHOT +# define SA_NOMASK SA_NODEFER +# define SA_ONESHOT SA_RESETHAND # define SA_STACK SA_ONSTACK #endif From 0927b9fc12e16ebfda90adc59571c1b213222592 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 29 Oct 1999 20:23:01 +0000 Subject: [PATCH 1663/4487] Added missing N_* constants. --- sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h b/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h index 4f5c2b0d3e..7959570146 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h +++ b/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h @@ -1,5 +1,5 @@ /* Structure types for pre-termios terminal ioctls. Linux/MIPS version. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 1999 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 @@ -64,3 +64,12 @@ struct termio #define N_PPP 3 #define N_STRIP 4 #define N_AX25 5 +#define N_X25 6 /* X.25 async */ +#define N_6PACK 7 +#define N_MASC 8 /* Mobitex module */ +#define N_R3964 9 /* Simatic R3964 module */ +#define N_PROFIBUS_FDL 10 /* Profibus */ +#define N_IRDA 11 /* Linux IR */ +#define N_SMSBLOCK 12 /* SMS block mode */ +#define N_HDLC 13 /* synchronous HDLC */ +#define N_SYNC_PPP 14 /* synchronous PPP */ From 6c555ab57e2168ea287cefabd825d61b49b51598 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 31 Oct 1999 17:31:25 +0000 Subject: [PATCH 1664/4487] Replace __USE_ISOC9X by __USE_ISOC99 and also recognize _ISOC99_SOURCE. --- sysdeps/alpha/fpu/bits/mathdef.h | 6 +++--- sysdeps/alpha/fpu/bits/mathinline.h | 6 +++--- sysdeps/arm/bits/huge_val.h | 6 +++--- sysdeps/m68k/bits/huge_val.h | 6 +++--- sysdeps/m68k/fpu/bits/mathdef.h | 6 +++--- sysdeps/m68k/fpu/bits/mathinline.h | 32 ++++++++++++++--------------- 6 files changed, 31 insertions(+), 31 deletions(-) diff --git a/sysdeps/alpha/fpu/bits/mathdef.h b/sysdeps/alpha/fpu/bits/mathdef.h index 5ee9644469..f5d5de8b12 100644 --- a/sysdeps/alpha/fpu/bits/mathdef.h +++ b/sysdeps/alpha/fpu/bits/mathdef.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999 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 @@ /* FIXME! This file describes properties of the compiler, not the machine; it should not be part of libc! */ -#if defined __USE_ISOC9X && defined _MATH_H +#if defined __USE_ISOC99 && defined _MATH_H # ifdef __GNUC__ # if __STDC__ == 1 @@ -71,7 +71,7 @@ typedef double double_t; /* Number of decimal digits for the `double' type. */ # define DECIMAL_DIG 15 -#endif /* ISO C 9X */ +#endif /* ISO C99 */ #ifndef __NO_LONG_DOUBLE_MATH /* Signal that we do not really have a `long double'. The disables the diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h index 9207d52f6a..87765d2389 100644 --- a/sysdeps/alpha/fpu/bits/mathinline.h +++ b/sysdeps/alpha/fpu/bits/mathinline.h @@ -1,5 +1,5 @@ /* Inline math functions for Alpha. - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger-Tang. @@ -28,7 +28,7 @@ # define __MATH_INLINE extern __inline #endif -#ifdef __USE_ISOC9X +#ifdef __USE_ISOC99 # define isunordered(x, y) \ (__extension__ \ ({ double __r; \ @@ -56,7 +56,7 @@ (__extension__ \ ({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \ !isunordered(__x, __y) && __x != __y; })) -#endif /* ISOC9X */ +#endif /* ISO C99 */ #define __inline_copysign(NAME, TYPE) \ __MATH_INLINE TYPE \ diff --git a/sysdeps/arm/bits/huge_val.h b/sysdeps/arm/bits/huge_val.h index 1b236c425d..398476cf72 100644 --- a/sysdeps/arm/bits/huge_val.h +++ b/sysdeps/arm/bits/huge_val.h @@ -61,9 +61,9 @@ static __huge_val_t __huge_val = { __HUGE_VAL_bytes }; #endif /* GCC. */ -/* ISO C 9X extensions: (float) HUGE_VALF and (long double) HUGE_VALL. */ +/* ISO C99 extensions: (float) HUGE_VALF and (long double) HUGE_VALL. */ -#ifdef __USE_ISOC9X +#ifdef __USE_ISOC99 # ifdef __GNUC__ @@ -101,4 +101,4 @@ static __huge_valf_t __huge_valf = { __HUGE_VALF_bytes }; same as `double'. */ # define HUGE_VALL HUGE_VAL -#endif /* __USE_ISOC9X. */ +#endif /* __USE_ISOC99. */ diff --git a/sysdeps/m68k/bits/huge_val.h b/sysdeps/m68k/bits/huge_val.h index 14c0855ab1..339f374d68 100644 --- a/sysdeps/m68k/bits/huge_val.h +++ b/sysdeps/m68k/bits/huge_val.h @@ -52,9 +52,9 @@ static union { unsigned char __c[8]; double __d; } __huge_val = #endif /* GCC. */ -/* ISO C 9X extensions: (float) HUGE_VALF and (long double) HUGE_VALL. */ +/* ISO C 99 extensions: (float) HUGE_VALF and (long double) HUGE_VALL. */ -#ifdef __USE_ISOC9X +#ifdef __USE_ISOC99 # if __GNUC_PREREQ(2,95) @@ -89,4 +89,4 @@ static union { unsigned char __c[12]; long double __ld; } __huge_vall = # endif /* GCC 2.95. */ -#endif /* __USE_ISOC9X. */ +#endif /* __USE_ISOC99. */ diff --git a/sysdeps/m68k/fpu/bits/mathdef.h b/sysdeps/m68k/fpu/bits/mathdef.h index 250f0f3929..2f650ec8b5 100644 --- a/sysdeps/m68k/fpu/bits/mathdef.h +++ b/sysdeps/m68k/fpu/bits/mathdef.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999 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,7 +20,7 @@ # error "Never use directly; include instead" #endif -#if defined __USE_ISOC9X && defined _MATH_H +#if defined __USE_ISOC99 && defined _MATH_H /* The m68k FPUs evaluate all values in the 96 bit floating-point format which is also available for the user as `long double'. Therefore we define: */ @@ -42,4 +42,4 @@ typedef long double double_t; /* `double' expressions are evaluated as /* Number of decimal digits for the `long double' type. */ # define DECIMAL_DIG 18 -#endif /* ISO C 9X */ +#endif /* ISO C99 */ diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/fpu/bits/mathinline.h index c753fae827..9dad4c69cc 100644 --- a/sysdeps/m68k/fpu/bits/mathinline.h +++ b/sysdeps/m68k/fpu/bits/mathinline.h @@ -19,9 +19,9 @@ #ifdef __GNUC__ -#ifdef __USE_ISOC9X +#ifdef __USE_ISOC99 -/* ISO C 9X defines some macros to perform unordered comparisons. The +/* ISO C99 defines some macros to perform unordered comparisons. The m68k FPU supports this with special opcodes and we should use them. These must not be inline functions since we have to be able to handle all floating-point types. */ @@ -98,7 +98,7 @@ suffixed with f and l for the float and long double version, resp). OP is the name of the fpu operation (without leading f). */ -#if defined __USE_MISC || defined __USE_ISOC9X +#if defined __USE_MISC || defined __USE_ISOC99 # define __inline_mathop(func, op) \ __inline_mathop1(double, func, op) \ __inline_mathop1(float, __CONCAT(func,f), op) \ @@ -123,7 +123,7 @@ __inline_mathop(__tan, tan) __inline_mathop(__tanh, tanh) __inline_mathop(__fabs, abs) -#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC9X +#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 __inline_mathop(__rint, int) __inline_mathop(__expm1, etoxm1) __inline_mathop(__log1p, lognp1) @@ -133,7 +133,7 @@ __inline_mathop(__log1p, lognp1) __inline_mathop(__significand, getman) #endif -#ifdef __USE_ISOC9X +#ifdef __USE_ISOC99 __inline_mathop(__log2, log2) __inline_mathop(__trunc, intrz) #endif @@ -146,7 +146,7 @@ __inline_mathop(sin, sin) __inline_mathop(tan, tan) __inline_mathop(tanh, tanh) -# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC9X +# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 __inline_mathop(rint, int) __inline_mathop(expm1, etoxm1) __inline_mathop(log1p, lognp1) @@ -156,7 +156,7 @@ __inline_mathop(log1p, lognp1) __inline_mathop(significand, getman) # endif -# ifdef __USE_ISOC9X +# ifdef __USE_ISOC99 __inline_mathop(log2, log2) __inline_mathop(trunc, intrz) # endif @@ -223,7 +223,7 @@ __m81_defun (float_type, __CONCAT(__ceil,s), (float_type __x)) \ } __inline_functions(double,) -#if defined __USE_MISC || defined __USE_ISOC9X +#if defined __USE_MISC || defined __USE_ISOC99 __inline_functions(float,f) __inline_functions(long double,l) #endif @@ -287,7 +287,7 @@ __inline_functions(long double,l) #endif -#ifdef __USE_ISOC9X +#ifdef __USE_ISOC99 # define __inline_functions(float_type, s) \ __m81_defun (int, __CONCAT(__signbit,s), (float_type __value)) \ @@ -383,18 +383,18 @@ __inline_forward(double,frexp, (double __value, int *__expptr), __inline_forward_c(double,floor, (double __x), (__x)) __inline_forward_c(double,ceil, (double __x), (__x)) # ifdef __USE_MISC -# ifndef __USE_ISOC9X /* Conflict with macro of same name. */ +# ifndef __USE_ISOC99 /* Conflict with macro of same name. */ __inline_forward_c(int,isinf, (double __value), (__value)) # endif __inline_forward_c(int,finite, (double __value), (__value)) __inline_forward_c(double,scalbn, (double __x, int __n), (__x, __n)) # endif # if defined __USE_MISC || defined __USE_XOPEN -# ifndef __USE_ISOC9X /* Conflict with macro of same name. */ +# ifndef __USE_ISOC99 /* Conflict with macro of same name. */ __inline_forward_c(int,isnan, (double __value), (__value)) # endif # endif -# ifdef __USE_ISOC9X +# ifdef __USE_ISOC99 __inline_forward_c(double,scalbln, (double __x, long int __n), (__x, __n)) __inline_forward_c(double,nearbyint, (double __value), (__value)) __inline_forward_c(long int,lrint, (double __value), (__value)) @@ -406,7 +406,7 @@ __inline_forward(void,sincos, (double __x, double *__sinx, double *__cosx), (__x, __sinx, __cosx)) # endif -# if defined __USE_MISC || defined __USE_ISOC9X +# if defined __USE_MISC || defined __USE_ISOC99 __inline_forward(float,frexpf, (float __value, int *__expptr), (__value, __expptr)) @@ -418,7 +418,7 @@ __inline_forward_c(int,finitef, (float __value), (__value)) __inline_forward_c(float,scalbnf, (float __x, int __n), (__x, __n)) __inline_forward_c(int,isnanf, (float __value), (__value)) # endif -# ifdef __USE_ISOC9X +# ifdef __USE_ISOC99 __inline_forward_c(float,scalblnf, (float __x, long int __n), (__x, __n)) __inline_forward_c(float,nearbyintf, (float __value), (__value)) __inline_forward_c(long int,lrintf, (float __value), (__value)) @@ -440,7 +440,7 @@ __inline_forward_c(int,finitel, (long double __value), (__value)) __inline_forward_c(long double,scalbnl, (long double __x, int __n), (__x, __n)) __inline_forward_c(int,isnanl, (long double __value), (__value)) # endif -# ifdef __USE_ISOC9X +# ifdef __USE_ISOC99 __inline_forward_c(long double,scalblnl, (long double __x, long int __n), (__x, __n)) __inline_forward_c(long double,nearbyintl, (long double __value), (__value)) @@ -455,7 +455,7 @@ __inline_forward(void,sincosl, (__x, __sinx, __cosx)) # endif -#endif /* Use misc or ISO C9X */ +#endif /* Use misc or ISO C99 */ #undef __inline_forward #undef __inline_forward_c From 146bade74f9459c30ea834f978d6fce3eb873b2a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 31 Oct 1999 23:13:47 +0000 Subject: [PATCH 1665/4487] Return value and add alias. --- sysdeps/alpha/fpu/fclrexcpt.c | 20 +++++++++----- sysdeps/alpha/fpu/fegetenv.c | 19 +++++++++---- sysdeps/alpha/fpu/fesetenv.c | 24 ++++++++++------ sysdeps/alpha/fpu/feupdateenv.c | 20 +++++++++----- sysdeps/alpha/fpu/fgetexcptflg.c | 14 +++++++--- sysdeps/alpha/fpu/fraiseexcpt.c | 47 +++++++++++++++----------------- sysdeps/alpha/fpu/fsetexcptflg.c | 18 ++++++++---- sysdeps/arm/fpu/fclrexcpt.c | 16 +++++++---- sysdeps/arm/fpu/fegetenv.c | 12 ++++++-- sysdeps/arm/fpu/fesetenv.c | 16 +++++++---- sysdeps/arm/fpu/fraiseexcpt.c | 16 +++++++---- sysdeps/arm/fpu/fsetexcptflg.c | 16 +++++++---- sysdeps/m68k/fpu/fclrexcpt.c | 12 ++++++-- sysdeps/m68k/fpu/fegetenv.c | 12 ++++++-- sysdeps/m68k/fpu/fesetenv.c | 10 +++++-- sysdeps/m68k/fpu/feupdateenv.c | 12 ++++++-- sysdeps/m68k/fpu/fgetexcptflg.c | 12 ++++++-- sysdeps/m68k/fpu/fraiseexcpt.c | 12 ++++++-- sysdeps/m68k/fpu/fsetexcptflg.c | 12 ++++++-- sysdeps/mips/fclrexcpt.c | 14 +++++++--- sysdeps/mips/fegetenv.c | 12 ++++++-- sysdeps/mips/fesetenv.c | 10 +++++-- sysdeps/mips/feupdateenv.c | 12 ++++++-- sysdeps/mips/fgetexcptflg.c | 12 ++++++-- 24 files changed, 258 insertions(+), 122 deletions(-) diff --git a/sysdeps/alpha/fpu/fclrexcpt.c b/sysdeps/alpha/fpu/fclrexcpt.c index 7aa79af100..2e76995f4e 100644 --- a/sysdeps/alpha/fpu/fclrexcpt.c +++ b/sysdeps/alpha/fpu/fclrexcpt.c @@ -1,5 +1,5 @@ /* Clear given exceptions in current floating-point environment. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1997. @@ -20,17 +20,23 @@ #include -void -feclearexcept (int excepts) +int +__feclearexcept (int excepts) { - unsigned long swcr; + unsigned long int swcr; /* Get the current state. */ - swcr = __ieee_get_fp_control(); + swcr = __ieee_get_fp_control (); /* Clear the relevant bits. */ - swcr &= ~((unsigned long)excepts & FE_ALL_EXCEPT); + swcr &= ~((unsigned long int) excepts & FE_ALL_EXCEPT); /* Put the new state in effect. */ - __ieee_set_fp_control(swcr); + __ieee_set_fp_control (swcr); + + /* Success. */ + return 0; } +strong_alias (__feclearexcept, __old_feclearexcept) +symbol_version (__old_feclearexcept, feclearexcept, GLIBC_2.1); +default_symbol_version (__feclearexcept, feclearexcept, GLIBC_2.1.3); diff --git a/sysdeps/alpha/fpu/fegetenv.c b/sysdeps/alpha/fpu/fegetenv.c index c8b705d230..63dc7ffaaf 100644 --- a/sysdeps/alpha/fpu/fegetenv.c +++ b/sysdeps/alpha/fpu/fegetenv.c @@ -1,5 +1,5 @@ /* Store current floating-point environment. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1997 @@ -20,18 +20,25 @@ #include -void -fegetenv (fenv_t *envp) +int +__fegetenv (fenv_t *envp) { - unsigned long fpcr, swcr; + unsigned long int fpcr; + unsigned long int swcr; /* Get status from software and hardware. Note that we don't need an excb because the callsys is an implied trap barrier. */ - swcr = __ieee_get_fp_control(); - __asm__ __volatile__("mf_fpcr %0" : "=f"(fpcr)); + swcr = __ieee_get_fp_control (); + __asm__ __volatile__ ("mf_fpcr %0" : "=f" (fpcr)); /* Merge the two bits of information. The magic number at the end is the exception enable mask. */ *envp = (fpcr & (3UL << 58)) | (swcr & (FE_ALL_EXCEPT | 0x3e)); + + /* Success. */ + return 0; } +strong_alias (__fegetenv, __old_fegetenv) +symbol_version (__old_fegetenv, fegetenv, GLIBC_2.1); +default_symbol_version (__fegetenv, fegetenv, GLIBC_2.1.3); diff --git a/sysdeps/alpha/fpu/fesetenv.c b/sysdeps/alpha/fpu/fesetenv.c index 3692967a5b..9a38778b0c 100644 --- a/sysdeps/alpha/fpu/fesetenv.c +++ b/sysdeps/alpha/fpu/fesetenv.c @@ -1,5 +1,5 @@ /* Install given floating-point environment. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1997 @@ -20,26 +20,32 @@ #include -void -fesetenv (const fenv_t *envp) +int +__fesetenv (const fenv_t *envp) { - unsigned long fpcr; + unsigned long int fpcr; fenv_t env; /* Magic encoding of default values: high bit set (never possible for a user-space address) is not indirect. And we don't even have to get rid of it since we mask things around just below. */ - if ((long)envp >= 0) + if ((long int) envp >= 0) env = *envp; else - env = (unsigned long)envp; + env = (unsigned long int) envp; /* Reset the rounding mode with the hardware fpcr. Note that the following system call is an implied trap barrier for our modification. */ - __asm__ __volatile__("excb; mf_fpcr %0" : "=f"(fpcr)); + __asm__ __volatile__ ("excb; mf_fpcr %0" : "=f" (fpcr)); fpcr = (fpcr & ~(3UL << 58)) | (env & (3UL << 58)); - __asm__ __volatile__("mt_fpcr %0" : : "f"(fpcr)); + __asm__ __volatile__ ("mt_fpcr %0" : : "f" (fpcr)); /* Reset the exception status and mask with the kernel's FP code. */ - __ieee_set_fp_control(env & (FE_ALL_EXCEPT | 0x3e)); + __ieee_set_fp_control (env & (FE_ALL_EXCEPT | 0x3e)); + + /* Success. */ + return 0; } +strong_alias (__fesetenv, __old_fesetenv) +symbol_version (__old_fesetenv, fesetenv, GLIBC_2.1); +default_symbol_version (__fesetenv, fesetenv, GLIBC_2.1.3); diff --git a/sysdeps/alpha/fpu/feupdateenv.c b/sysdeps/alpha/fpu/feupdateenv.c index 816575a134..bd6a979aa7 100644 --- a/sysdeps/alpha/fpu/feupdateenv.c +++ b/sysdeps/alpha/fpu/feupdateenv.c @@ -1,5 +1,5 @@ /* Install given floating-point environment and raise exceptions. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1997. @@ -20,19 +20,25 @@ #include -void -feupdateenv (const fenv_t *envp) +int +__feupdateenv (const fenv_t *envp) { - unsigned long tmp; + unsigned long int tmp; /* Get the current exception state. */ - tmp = __ieee_get_fp_control(); + tmp = __ieee_get_fp_control (); /* Install new environment. */ - fesetenv(envp); + fesetenv (envp); /* Raise the saved exception. Incidently for us the implementation defined format of the values in objects of type fexcept_t is the same as the ones specified using the FE_* constants. */ - feraiseexcept((int)tmp & FE_ALL_EXCEPT); + feraiseexcept ((int) tmp & FE_ALL_EXCEPT); + + /* Success. */ + return 0; } +strong_alias (__feupdateenv, __old_feupdateenv) +symbol_version (__old_feupdateenv, feupdateenv, GLIBC_2.1); +default_symbol_version (__feupdateenv, feupdateenv, GLIBC_2.1.3); diff --git a/sysdeps/alpha/fpu/fgetexcptflg.c b/sysdeps/alpha/fpu/fgetexcptflg.c index 28d9e129b1..2811d02cd1 100644 --- a/sysdeps/alpha/fpu/fgetexcptflg.c +++ b/sysdeps/alpha/fpu/fgetexcptflg.c @@ -1,5 +1,5 @@ /* Store current representation for exceptions. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1997. @@ -20,14 +20,20 @@ #include -void -fegetexceptflag (fexcept_t *flagp, int excepts) +int +__fegetexceptflag (fexcept_t *flagp, int excepts) { - unsigned long tmp; + unsigned long int tmp; /* Get the current state. */ tmp = __ieee_get_fp_control(); /* Return that portion that corresponds to the requested exceptions. */ *flagp = tmp & excepts & FE_ALL_EXCEPT; + + /* Success. */ + return 0; } +strong_alias (__fegetexceptflag, __old_fegetexceptflag) +symbol_version (__old_fegetexceptflag, fegetexceptflag, GLIBC_2.1); +default_symbol_version (__fegetexceptflag, fegetexceptflag, GLIBC_2.1.3); diff --git a/sysdeps/alpha/fpu/fraiseexcpt.c b/sysdeps/alpha/fpu/fraiseexcpt.c index 9b61ddb843..bcbc06b400 100644 --- a/sysdeps/alpha/fpu/fraiseexcpt.c +++ b/sysdeps/alpha/fpu/fraiseexcpt.c @@ -1,5 +1,5 @@ /* Raise given exceptions. - Copyright (C) 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1997. @@ -22,9 +22,10 @@ #include void -feraiseexcept (int excepts) +__feraiseexcept (int excepts) { - double tmp, dummy; + double tmp; + double dummy; /* Raise exceptions represented by EXPECTS. But we must raise only one signal at a time. It is important the if the overflow/underflow @@ -36,38 +37,34 @@ feraiseexcept (int excepts) /* First: invalid exception. */ if (FE_INVALID & excepts) - { - /* One example of a invalid operation is 0 * Infinity. */ - __asm__ __volatile__("mult/sui $f31,%1,%0; trapb" - : "=&f"(tmp) : "f"(HUGE_VAL)); - } + /* One example of a invalid operation is 0 * Infinity. */ + __asm__ __volatile__("mult/sui $f31,%1,%0; trapb" + : "=&f" (tmp) : "f" (HUGE_VAL)); /* Next: division by zero. */ if (FE_DIVBYZERO & excepts) - { - __asm__ __volatile__("cmpteq $f31,$f31,%1; divt/sui %1,$f31,%0; trapb" - : "=&f"(tmp), "=f"(dummy)); - } + __asm__ __volatile__("cmpteq $f31,$f31,%1; divt/sui %1,$f31,%0; trapb" + : "=&f" (tmp), "=f" (dummy)); /* Next: overflow. */ if (FE_OVERFLOW & excepts) - { - __asm__ __volatile__("mult/sui %1,%1,%0; trapb" - : "=&f"(tmp) : "f"(DBL_MAX)); - } + __asm__ __volatile__("mult/sui %1,%1,%0; trapb" + : "=&f" (tmp) : "f" (DBL_MAX)); /* Next: underflow. */ if (FE_UNDERFLOW & excepts) - { - __asm__ __volatile__("divt/sui %1,%2,%0; trapb" - : "=&f"(tmp) : "f"(DBL_MIN), - "f"((double) (1UL << 60))); - } + __asm__ __volatile__("divt/sui %1,%2,%0; trapb" + : "=&f" (tmp) : "f" (DBL_MIN), + "f" ((double) (1UL << 60))); /* Last: inexact. */ if (FE_INEXACT & excepts) - { - __asm__ __volatile__("divt/sui %1,%2,%0; trapb" - : "=&f"(tmp) : "f"(1.0), "f"(M_PI)); - } + __asm__ __volatile__("divt/sui %1,%2,%0; trapb" + : "=&f" (tmp) : "f" (1.0), "f" (M_PI)); + + /* Success. */ + return 0; } +strong_alias (__feraiseexcept, __old_feraiseexcept) +symbol_version (__old_feraiseexcept, feraiseexcept, GLIBC_2.1); +default_symbol_version (__feraiseexcept, feraiseexcept, GLIBC_2.1.3); diff --git a/sysdeps/alpha/fpu/fsetexcptflg.c b/sysdeps/alpha/fpu/fsetexcptflg.c index 5764a6ec7b..eeb987ede2 100644 --- a/sysdeps/alpha/fpu/fsetexcptflg.c +++ b/sysdeps/alpha/fpu/fsetexcptflg.c @@ -1,5 +1,5 @@ /* Set floating-point environment exception handling. - Copyright (C) 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1997. @@ -20,17 +20,23 @@ #include -void -fesetexceptflag (const fexcept_t *flagp, int excepts) +int +__fesetexceptflag (const fexcept_t *flagp, int excepts) { - unsigned long tmp; + unsigned long int tmp; /* Get the current exception state. */ - tmp = __ieee_get_fp_control(); + tmp = __ieee_get_fp_control (); /* Set all the bits that were called for. */ tmp = (tmp & ~FE_ALL_EXCEPT) | (*flagp & excepts & FE_ALL_EXCEPT); /* And store it back. */ - __ieee_set_fp_control(tmp); + __ieee_set_fp_control (tmp); + + /* Success. */ + return 0; } +strong_alias (__fesetexceptflag, __old_fesetexceptflag) +symbol_version (__old_fesetexceptflag, fesetexceptflag, GLIBC_2.1); +default_symbol_version (__fesetexceptflag, fesetexceptflag, GLIBC_2.1.3); diff --git a/sysdeps/arm/fpu/fclrexcpt.c b/sysdeps/arm/fpu/fclrexcpt.c index 34ad36dfa8..0bcdfdf5d9 100644 --- a/sysdeps/arm/fpu/fclrexcpt.c +++ b/sysdeps/arm/fpu/fclrexcpt.c @@ -1,5 +1,5 @@ /* Clear given exceptions in current floating-point environment. - Copyright (C) 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 1999 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,8 +20,8 @@ #include #include -void -feclearexcept (int excepts) +int +__feclearexcept (int excepts) { unsigned long int temp; @@ -29,11 +29,17 @@ feclearexcept (int excepts) excepts &= FE_ALL_EXCEPT; /* Get the current floating point status. */ - _FPU_GETCW(temp); + _FPU_GETCW (temp); /* Clear the relevant bits. */ temp &= excepts ^ FE_ALL_EXCEPT; /* Put the new data in effect. */ - _FPU_SETCW(temp); + _FPU_SETCW (temp); + + /* Success. */ + return 0; } +strong_alias (__feclearexcept, __old_feclearexcept) +symbol_version (__old_feclearexcept, feclearexcept, GLIBC_2.1); +default_symbol_version (__feclearexcept, feclearexcept, GLIBC_2.1.3); diff --git a/sysdeps/arm/fpu/fegetenv.c b/sysdeps/arm/fpu/fegetenv.c index 99dc1f0d8c..7fde5f21e4 100644 --- a/sysdeps/arm/fpu/fegetenv.c +++ b/sysdeps/arm/fpu/fegetenv.c @@ -20,10 +20,16 @@ #include #include -void -fegetenv (fenv_t *envp) +int +__fegetenv (fenv_t *envp) { unsigned long int temp; - _FPU_GETCW(temp); + _FPU_GETCW (temp); envp->__cw = temp; + + /* Success. */ + return 0; } +strong_alias (__fegetenv, __old_fegetenv) +symbol_version (__old_fegetenv, fegetenv, GLIBC_2.1); +default_symbol_version (__fegetenv, fegetenv, GLIBC_2.1.3); diff --git a/sysdeps/arm/fpu/fesetenv.c b/sysdeps/arm/fpu/fesetenv.c index 7f3a434778..13cda82554 100644 --- a/sysdeps/arm/fpu/fesetenv.c +++ b/sysdeps/arm/fpu/fesetenv.c @@ -20,14 +20,20 @@ #include #include -void -fesetenv (const fenv_t *envp) +int +__fesetenv (const fenv_t *envp) { if (envp == FE_DFL_ENV) - _FPU_SETCW(_FPU_DEFAULT); + _FPU_SETCW (_FPU_DEFAULT); else { - unsigned long temp = envp->__cw; - _FPU_SETCW(temp); + unsigned long int temp = envp->__cw; + _FPU_SETCW (temp); } + + /* Success. */ + return 0; } +strong_alias (__fesetenv, __old_fesetenv) +symbol_version (__old_fesetenv, fesetenv, GLIBC_2.1); +default_symbol_version (__fesetenv, fesetenv, GLIBC_2.1.3); diff --git a/sysdeps/arm/fpu/fraiseexcpt.c b/sysdeps/arm/fpu/fraiseexcpt.c index 0fbfb16c94..77d928a32b 100644 --- a/sysdeps/arm/fpu/fraiseexcpt.c +++ b/sysdeps/arm/fpu/fraiseexcpt.c @@ -1,5 +1,5 @@ /* Raise given exceptions. - Copyright (C) 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 1999 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 @@ -21,12 +21,18 @@ #include #include -void -feraiseexcept (int excepts) +int +__feraiseexcept (int excepts) { /* Raise exceptions represented by EXPECTS. */ fexcept_t temp; - _FPU_GETCW(temp); + _FPU_GETCW (temp); temp |= (excepts & FE_ALL_EXCEPT); - _FPU_SETCW(temp); + _FPU_SETCW (temp); + + /* Success. */ + return 0; } +strong_alias (__feraiseexcept, __old_feraiseexcept) +symbol_version (__old_feraiseexcept, feraiseexcept, GLIBC_2.1); +default_symbol_version (__feraiseexcept, feraiseexcept, GLIBC_2.1.3); diff --git a/sysdeps/arm/fpu/fsetexcptflg.c b/sysdeps/arm/fpu/fsetexcptflg.c index f5c06a6f6c..ef157a27ed 100644 --- a/sysdeps/arm/fpu/fsetexcptflg.c +++ b/sysdeps/arm/fpu/fsetexcptflg.c @@ -1,5 +1,5 @@ /* Set floating-point environment exception handling. - Copyright (C) 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 1999 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 @@ -21,18 +21,24 @@ #include #include -void -fesetexceptflag (const fexcept_t *flagp, int excepts) +int +__fesetexceptflag (const fexcept_t *flagp, int excepts) { fexcept_t temp; /* Get the current environment. */ - _FPU_GETCW(temp); + _FPU_GETCW (temp); /* Set the desired exception mask. */ temp &= ~((excepts & FE_ALL_EXCEPT) << FE_EXCEPT_SHIFT); temp |= (*flagp & excepts & FE_ALL_EXCEPT) << FE_EXCEPT_SHIFT; /* Save state back to the FPU. */ - _FPU_SETCW(temp); + _FPU_SETCW (temp); + + /* Success. */ + return 0; } +strong_alias (__fesetexceptflag, __old_fesetexceptflag) +symbol_version (__old_fesetexceptflag, fesetexceptflag, GLIBC_2.1); +default_symbol_version (__fesetexceptflag, fesetexceptflag, GLIBC_2.1.3); diff --git a/sysdeps/m68k/fpu/fclrexcpt.c b/sysdeps/m68k/fpu/fclrexcpt.c index b914bac9f9..5b2c4253e5 100644 --- a/sysdeps/m68k/fpu/fclrexcpt.c +++ b/sysdeps/m68k/fpu/fclrexcpt.c @@ -1,5 +1,5 @@ /* Clear given exceptions in current floating-point environment. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab @@ -20,8 +20,8 @@ #include -void -feclearexcept (int excepts) +int +__feclearexcept (int excepts) { fexcept_t fpsr; @@ -36,4 +36,10 @@ feclearexcept (int excepts) /* Put the new data in effect. */ __asm__ __volatile__ ("fmove%.l %0,%/fpsr" : : "dm" (fpsr)); + + /* Success. */ + return 0; } +strong_alias (__feclearexcept, __old_feclearexcept) +symbol_version (__old_feclearexcept, feclearexcept, GLIBC_2.1); +default_symbol_version (__feclearexcept, feclearexcept, GLIBC_2.1.3); diff --git a/sysdeps/m68k/fpu/fegetenv.c b/sysdeps/m68k/fpu/fegetenv.c index b437b7ef8a..8936b38807 100644 --- a/sysdeps/m68k/fpu/fegetenv.c +++ b/sysdeps/m68k/fpu/fegetenv.c @@ -1,5 +1,5 @@ /* Store current floating-point environment. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab @@ -20,8 +20,14 @@ #include -void -fegetenv (fenv_t *envp) +int +__fegetenv (fenv_t *envp) { __asm__ ("fmovem%.l %/fpcr/%/fpsr/%/fpiar,%0" : "=m" (*envp)); + + /* Success. */ + return 0; } +strong_alias (__fegetenv, __old_fegetenv) +symbol_version (__old_fegetenv, fegetenv, GLIBC_2.1); +default_symbol_version (__fegetenv, fegetenv, GLIBC_2.1.3); diff --git a/sysdeps/m68k/fpu/fesetenv.c b/sysdeps/m68k/fpu/fesetenv.c index b8ad428893..11bffb449e 100644 --- a/sysdeps/m68k/fpu/fesetenv.c +++ b/sysdeps/m68k/fpu/fesetenv.c @@ -20,8 +20,8 @@ #include -void -fesetenv (const fenv_t *envp) +int +__fesetenv (const fenv_t *envp) { fenv_t temp; @@ -45,4 +45,10 @@ fesetenv (const fenv_t *envp) } __asm__ __volatile__ ("fmovem%.l %0,%/fpcr/%/fpsr/%/fpiar" : : "m" (*&temp)); + + /* Success. */ + return 0; } +strong_alias (__fesetenv, __old_fesetenv) +symbol_version (__old_fesetenv, fesetenv, GLIBC_2.1); +default_symbol_version (__fesetenv, fesetenv, GLIBC_2.1.3); diff --git a/sysdeps/m68k/fpu/feupdateenv.c b/sysdeps/m68k/fpu/feupdateenv.c index f5922b4de4..48d42d983f 100644 --- a/sysdeps/m68k/fpu/feupdateenv.c +++ b/sysdeps/m68k/fpu/feupdateenv.c @@ -1,5 +1,5 @@ /* Install given floating-point environment and raise exceptions. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab @@ -20,8 +20,8 @@ #include -void -feupdateenv (const fenv_t *envp) +int +__feupdateenv (const fenv_t *envp) { fexcept_t fpsr; @@ -36,4 +36,10 @@ feupdateenv (const fenv_t *envp) defined format of the values in objects of type fexcept_t is the same as the ones specified using the FE_* constants. */ feraiseexcept ((int) fpsr); + + /* Success. */ + return 0; } +strong_alias (__feupdateenv, __old_feupdateenv) +symbol_version (__old_feupdateenv, feupdateenv, GLIBC_2.1); +default_symbol_version (__feupdateenv, feupdateenv, GLIBC_2.1.3); diff --git a/sysdeps/m68k/fpu/fgetexcptflg.c b/sysdeps/m68k/fpu/fgetexcptflg.c index 4086e1a97f..5d3a435970 100644 --- a/sysdeps/m68k/fpu/fgetexcptflg.c +++ b/sysdeps/m68k/fpu/fgetexcptflg.c @@ -1,5 +1,5 @@ /* Store current representation for exceptions. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab @@ -20,8 +20,8 @@ #include -void -fegetexceptflag (fexcept_t *flagp, int excepts) +int +__fegetexceptflag (fexcept_t *flagp, int excepts) { fexcept_t fpsr; @@ -29,4 +29,10 @@ fegetexceptflag (fexcept_t *flagp, int excepts) __asm__ ("fmove%.l %/fpsr,%0" : "=dm" (fpsr)); *flagp = fpsr & excepts & FE_ALL_EXCEPT; + + /* Success. */ + return 0; } +strong_alias (__fegetexceptflag, __old_fegetexceptflag) +symbol_version (__old_fegetexceptflag, fegetexceptflag, GLIBC_2.1); +default_symbol_version (__fegetexceptflag, fegetexceptflag, GLIBC_2.1.3); diff --git a/sysdeps/m68k/fpu/fraiseexcpt.c b/sysdeps/m68k/fpu/fraiseexcpt.c index bc49c9c71f..c283d4bbde 100644 --- a/sysdeps/m68k/fpu/fraiseexcpt.c +++ b/sysdeps/m68k/fpu/fraiseexcpt.c @@ -1,5 +1,5 @@ /* Raise given exceptions. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab @@ -21,8 +21,8 @@ #include #include -void -feraiseexcept (int excepts) +int +__feraiseexcept (int excepts) { /* Raise exceptions represented by EXCEPTS. But we must raise only one signal at a time. It is important that if the overflow/underflow @@ -67,4 +67,10 @@ feraiseexcept (int excepts) long double d = 1.0; __asm__ __volatile__ ("fdiv%.s %#0r3,%0; fnop" : "=f" (d) : "0" (d)); } + + /* Success. */ + return 0; } +strong_alias (__feraiseexcept, __old_feraiseexcept) +symbol_version (__old_feraiseexcept, feraiseexcept, GLIBC_2.1); +default_symbol_version (__feraiseexcept, feraiseexcept, GLIBC_2.1.3); diff --git a/sysdeps/m68k/fpu/fsetexcptflg.c b/sysdeps/m68k/fpu/fsetexcptflg.c index aa92ffd0c5..890042a0a7 100644 --- a/sysdeps/m68k/fpu/fsetexcptflg.c +++ b/sysdeps/m68k/fpu/fsetexcptflg.c @@ -1,5 +1,5 @@ /* Set floating-point environment exception handling. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab @@ -21,8 +21,8 @@ #include #include -void -fesetexceptflag (const fexcept_t *flagp, int excepts) +int +__fesetexceptflag (const fexcept_t *flagp, int excepts) { fexcept_t fpsr; @@ -35,4 +35,10 @@ fesetexceptflag (const fexcept_t *flagp, int excepts) /* Store the new status register. */ __asm__ __volatile__ ("fmove%.l %0,%/fpsr" : : "dm" (fpsr)); + + /* Success. */ + return 0; } +strong_alias (__fesetexceptflag, __old_fesetexceptflag) +symbol_version (__old_fesetexceptflag, fesetexceptflag, GLIBC_2.1); +default_symbol_version (__fesetexceptflag, fesetexceptflag, GLIBC_2.1.3); diff --git a/sysdeps/mips/fclrexcpt.c b/sysdeps/mips/fclrexcpt.c index de96dd0b5c..990dfe6996 100644 --- a/sysdeps/mips/fclrexcpt.c +++ b/sysdeps/mips/fclrexcpt.c @@ -1,5 +1,5 @@ /* Clear given exceptions in current floating-point environment. - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger , 1998. @@ -21,8 +21,8 @@ #include #include -void -feclearexcept (int excepts) +int +__feclearexcept (int excepts) { int cw; @@ -34,7 +34,13 @@ feclearexcept (int excepts) /* Clear exception bits. */ cw &= ~excepts; - + /* Put the new data in effect. */ _FPU_SETCW (cw); + + /* Success. */ + return 0; } +strong_alias (__feclearexcept, __old_feclearexcept) +symbol_version (__old_feclearexcept, feclearexcept, GLIBC_2.1); +default_symbol_version (__feclearexcept, feclearexcept, GLIBC_2.1.3); diff --git a/sysdeps/mips/fegetenv.c b/sysdeps/mips/fegetenv.c index 13a2c8fc19..72b7ee5811 100644 --- a/sysdeps/mips/fegetenv.c +++ b/sysdeps/mips/fegetenv.c @@ -1,5 +1,5 @@ /* Store current floating-point environment. - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger , 1998. @@ -21,8 +21,14 @@ #include #include -void -fegetenv (fenv_t *envp) +int +__fegetenv (fenv_t *envp) { _FPU_GETCW (*envp); + + /* Success. */ + return 0; } +strong_alias (__fegetenv, __old_fegetenv) +symbol_version (__old_fegetenv, fegetenv, GLIBC_2.1); +default_symbol_version (__fegetenv, fegetenv, GLIBC_2.1.3); diff --git a/sysdeps/mips/fesetenv.c b/sysdeps/mips/fesetenv.c index 116fbaefce..43a571efde 100644 --- a/sysdeps/mips/fesetenv.c +++ b/sysdeps/mips/fesetenv.c @@ -21,11 +21,17 @@ #include #include -void -fesetenv (const fenv_t *envp) +int +__fesetenv (const fenv_t *envp) { if (envp == FE_DFL_ENV) _FPU_SETCW (_FPU_DEFAULT); else _FPU_SETCW (envp->__fp_control_register); + + /* Success. */ + return 0; } +strong_alias (__fesetenv, __old_fesetenv) +symbol_version (__old_fesetenv, fesetenv, GLIBC_2.1); +default_symbol_version (__fesetenv, fesetenv, GLIBC_2.1.3); diff --git a/sysdeps/mips/feupdateenv.c b/sysdeps/mips/feupdateenv.c index e826084671..f0748cee77 100644 --- a/sysdeps/mips/feupdateenv.c +++ b/sysdeps/mips/feupdateenv.c @@ -1,5 +1,5 @@ /* Install given floating-point environment and raise exceptions. - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger , 1998. @@ -21,8 +21,8 @@ #include #include -void -feupdateenv (const fenv_t *envp) +int +__feupdateenv (const fenv_t *envp) { int temp; @@ -37,4 +37,10 @@ feupdateenv (const fenv_t *envp) defined format of the values in objects of type fexcept_t is the same as the ones specified using the FE_* constants. */ feraiseexcept (temp); + + /* Success. */ + return 0; } +strong_alias (__feupdateenv, __old_feupdateenv) +symbol_version (__old_feupdateenv, feupdateenv, GLIBC_2.1); +default_symbol_version (__feupdateenv, feupdateenv, GLIBC_2.1.3); diff --git a/sysdeps/mips/fgetexcptflg.c b/sysdeps/mips/fgetexcptflg.c index f3d52bc555..8c586b5200 100644 --- a/sysdeps/mips/fgetexcptflg.c +++ b/sysdeps/mips/fgetexcptflg.c @@ -1,5 +1,5 @@ /* Store current representation for exceptions. - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger , 1998. @@ -21,8 +21,8 @@ #include #include -void -fegetexceptflag (fexcept_t *flagp, int excepts) +int +__fegetexceptflag (fexcept_t *flagp, int excepts) { fexcept_t temp; @@ -30,4 +30,10 @@ fegetexceptflag (fexcept_t *flagp, int excepts) _FPU_GETCW (temp); *flagp = temp & excepts & FE_ALL_EXCEPT; + + /* Success. */ + return 0; } +strong_alias (__fegetexceptflag, __old_fegetexceptflag) +symbol_version (__old_fegetexceptflag, fegetexceptflag, GLIBC_2.1); +default_symbol_version (__fegetexceptflag, fegetexceptflag, GLIBC_2.1.3); From 08784f9d79054909fb049c64c3cf28ffd693deca Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 1 Nov 1999 00:11:13 +0000 Subject: [PATCH 1666/4487] Moved into fpu subdir. --- sysdeps/mips/fclrexcpt.c | 46 ------------------------------------- sysdeps/mips/fegetenv.c | 34 --------------------------- sysdeps/mips/fegetround.c | 33 -------------------------- sysdeps/mips/fesetenv.c | 37 ----------------------------- sysdeps/mips/fesetround.c | 43 ---------------------------------- sysdeps/mips/feupdateenv.c | 46 ------------------------------------- sysdeps/mips/fgetexcptflg.c | 39 ------------------------------- sysdeps/mips/ftestexcept.c | 33 -------------------------- 8 files changed, 311 deletions(-) delete mode 100644 sysdeps/mips/fclrexcpt.c delete mode 100644 sysdeps/mips/fegetenv.c delete mode 100644 sysdeps/mips/fegetround.c delete mode 100644 sysdeps/mips/fesetenv.c delete mode 100644 sysdeps/mips/fesetround.c delete mode 100644 sysdeps/mips/feupdateenv.c delete mode 100644 sysdeps/mips/fgetexcptflg.c delete mode 100644 sysdeps/mips/ftestexcept.c diff --git a/sysdeps/mips/fclrexcpt.c b/sysdeps/mips/fclrexcpt.c deleted file mode 100644 index 990dfe6996..0000000000 --- a/sysdeps/mips/fclrexcpt.c +++ /dev/null @@ -1,46 +0,0 @@ -/* Clear given exceptions in current floating-point environment. - Copyright (C) 1998, 1999 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Jaeger , 1998. - - 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 - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include -#include - -int -__feclearexcept (int excepts) -{ - int cw; - - /* Mask out unsupported bits/exceptions. */ - excepts &= FE_ALL_EXCEPT; - - /* Read the complete control word. */ - _FPU_GETCW (cw); - - /* Clear exception bits. */ - cw &= ~excepts; - - /* Put the new data in effect. */ - _FPU_SETCW (cw); - - /* Success. */ - return 0; -} -strong_alias (__feclearexcept, __old_feclearexcept) -symbol_version (__old_feclearexcept, feclearexcept, GLIBC_2.1); -default_symbol_version (__feclearexcept, feclearexcept, GLIBC_2.1.3); diff --git a/sysdeps/mips/fegetenv.c b/sysdeps/mips/fegetenv.c deleted file mode 100644 index 72b7ee5811..0000000000 --- a/sysdeps/mips/fegetenv.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Store current floating-point environment. - Copyright (C) 1998, 1999 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Jaeger , 1998. - - 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 - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include -#include - -int -__fegetenv (fenv_t *envp) -{ - _FPU_GETCW (*envp); - - /* Success. */ - return 0; -} -strong_alias (__fegetenv, __old_fegetenv) -symbol_version (__old_fegetenv, fegetenv, GLIBC_2.1); -default_symbol_version (__fegetenv, fegetenv, GLIBC_2.1.3); diff --git a/sysdeps/mips/fegetround.c b/sysdeps/mips/fegetround.c deleted file mode 100644 index e2e51ae64d..0000000000 --- a/sysdeps/mips/fegetround.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Return current rounding direction. - Copyright (C) 1998 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Jaeger , 1998. - - 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 - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include -#include - -int -fegetround (void) -{ - int cw; - - /* Get control word. */ - _FPU_GETCW (cw); - - return cw & 0x3; -} diff --git a/sysdeps/mips/fesetenv.c b/sysdeps/mips/fesetenv.c deleted file mode 100644 index 43a571efde..0000000000 --- a/sysdeps/mips/fesetenv.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Install given floating-point environment. - Copyright (C) 1998, 1999 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Jaeger , 1998. - - 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 - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include -#include - -int -__fesetenv (const fenv_t *envp) -{ - if (envp == FE_DFL_ENV) - _FPU_SETCW (_FPU_DEFAULT); - else - _FPU_SETCW (envp->__fp_control_register); - - /* Success. */ - return 0; -} -strong_alias (__fesetenv, __old_fesetenv) -symbol_version (__old_fesetenv, fesetenv, GLIBC_2.1); -default_symbol_version (__fesetenv, fesetenv, GLIBC_2.1.3); diff --git a/sysdeps/mips/fesetround.c b/sysdeps/mips/fesetround.c deleted file mode 100644 index 6b623d6eab..0000000000 --- a/sysdeps/mips/fesetround.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Set current rounding direction. - Copyright (C) 1998 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Jaeger , 1998. - - 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 - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include -#include - -int -fesetround (int round) -{ - unsigned short int cw; - - if ((round & ~0x3) != 0) - /* ROUND is no valid rounding mode. */ - return 0; - - /* Get current state. */ - _FPU_GETCW (cw); - - /* Set rounding bits. */ - cw &= ~0x3; - cw |= round; - /* Set new state. */ - _FPU_SETCW (cw); - - return 1; -} diff --git a/sysdeps/mips/feupdateenv.c b/sysdeps/mips/feupdateenv.c deleted file mode 100644 index f0748cee77..0000000000 --- a/sysdeps/mips/feupdateenv.c +++ /dev/null @@ -1,46 +0,0 @@ -/* Install given floating-point environment and raise exceptions. - Copyright (C) 1998, 1999 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Jaeger , 1998. - - 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 - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include -#include - -int -__feupdateenv (const fenv_t *envp) -{ - int temp; - - /* Save current exceptions. */ - _FPU_GETCW (temp); - temp &= FE_ALL_EXCEPT; - - /* Install new environment. */ - fesetenv (envp); - - /* Raise the safed exception. Incidently for us the implementation - defined format of the values in objects of type fexcept_t is the - same as the ones specified using the FE_* constants. */ - feraiseexcept (temp); - - /* Success. */ - return 0; -} -strong_alias (__feupdateenv, __old_feupdateenv) -symbol_version (__old_feupdateenv, feupdateenv, GLIBC_2.1); -default_symbol_version (__feupdateenv, feupdateenv, GLIBC_2.1.3); diff --git a/sysdeps/mips/fgetexcptflg.c b/sysdeps/mips/fgetexcptflg.c deleted file mode 100644 index 8c586b5200..0000000000 --- a/sysdeps/mips/fgetexcptflg.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Store current representation for exceptions. - Copyright (C) 1998, 1999 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Jaeger , 1998. - - 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 - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include -#include - -int -__fegetexceptflag (fexcept_t *flagp, int excepts) -{ - fexcept_t temp; - - /* Get the current exceptions. */ - _FPU_GETCW (temp); - - *flagp = temp & excepts & FE_ALL_EXCEPT; - - /* Success. */ - return 0; -} -strong_alias (__fegetexceptflag, __old_fegetexceptflag) -symbol_version (__old_fegetexceptflag, fegetexceptflag, GLIBC_2.1); -default_symbol_version (__fegetexceptflag, fegetexceptflag, GLIBC_2.1.3); diff --git a/sysdeps/mips/ftestexcept.c b/sysdeps/mips/ftestexcept.c deleted file mode 100644 index f348258318..0000000000 --- a/sysdeps/mips/ftestexcept.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Test exception in current environment. - Copyright (C) 1998 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Jaeger , 1998. - - 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 - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include -#include - -int -fetestexcept (int excepts) -{ - int cw; - - /* Get current control word. */ - _FPU_GETCW (cw); - - return cw & excepts & FE_ALL_EXCEPT; -} From 4a986c1a7d1afc104d1f4243e83f86a208698a56 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 1 Nov 1999 00:15:18 +0000 Subject: [PATCH 1667/4487] feclearexcept implementation for PowerPC. --- sysdeps/mips/fpu/fclrexcpt.c | 46 ++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 sysdeps/mips/fpu/fclrexcpt.c diff --git a/sysdeps/mips/fpu/fclrexcpt.c b/sysdeps/mips/fpu/fclrexcpt.c new file mode 100644 index 0000000000..990dfe6996 --- /dev/null +++ b/sysdeps/mips/fpu/fclrexcpt.c @@ -0,0 +1,46 @@ +/* Clear given exceptions in current floating-point environment. + Copyright (C) 1998, 1999 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Jaeger , 1998. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +int +__feclearexcept (int excepts) +{ + int cw; + + /* Mask out unsupported bits/exceptions. */ + excepts &= FE_ALL_EXCEPT; + + /* Read the complete control word. */ + _FPU_GETCW (cw); + + /* Clear exception bits. */ + cw &= ~excepts; + + /* Put the new data in effect. */ + _FPU_SETCW (cw); + + /* Success. */ + return 0; +} +strong_alias (__feclearexcept, __old_feclearexcept) +symbol_version (__old_feclearexcept, feclearexcept, GLIBC_2.1); +default_symbol_version (__feclearexcept, feclearexcept, GLIBC_2.1.3); From dd5c04b4d6947ef2a2a822f6135e8d02a89ba484 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 1 Nov 1999 00:15:28 +0000 Subject: [PATCH 1668/4487] fegetenv implementation for PowerPC. --- sysdeps/mips/fpu/fegetenv.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 sysdeps/mips/fpu/fegetenv.c diff --git a/sysdeps/mips/fpu/fegetenv.c b/sysdeps/mips/fpu/fegetenv.c new file mode 100644 index 0000000000..72b7ee5811 --- /dev/null +++ b/sysdeps/mips/fpu/fegetenv.c @@ -0,0 +1,34 @@ +/* Store current floating-point environment. + Copyright (C) 1998, 1999 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Jaeger , 1998. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +int +__fegetenv (fenv_t *envp) +{ + _FPU_GETCW (*envp); + + /* Success. */ + return 0; +} +strong_alias (__fegetenv, __old_fegetenv) +symbol_version (__old_fegetenv, fegetenv, GLIBC_2.1); +default_symbol_version (__fegetenv, fegetenv, GLIBC_2.1.3); From e576db000f806912f6881b25d13e90f2db83fbe1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 1 Nov 1999 00:15:45 +0000 Subject: [PATCH 1669/4487] fegetround implementation for PowerPC. --- sysdeps/mips/fpu/fegetround.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 sysdeps/mips/fpu/fegetround.c diff --git a/sysdeps/mips/fpu/fegetround.c b/sysdeps/mips/fpu/fegetround.c new file mode 100644 index 0000000000..e2e51ae64d --- /dev/null +++ b/sysdeps/mips/fpu/fegetround.c @@ -0,0 +1,33 @@ +/* Return current rounding direction. + Copyright (C) 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Jaeger , 1998. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +int +fegetround (void) +{ + int cw; + + /* Get control word. */ + _FPU_GETCW (cw); + + return cw & 0x3; +} From 9ce49bd30badbf1c357b6d7a52f0121917ddedfb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 1 Nov 1999 00:15:55 +0000 Subject: [PATCH 1670/4487] fesetenv implementation for PowerPC. --- sysdeps/mips/fpu/fesetenv.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 sysdeps/mips/fpu/fesetenv.c diff --git a/sysdeps/mips/fpu/fesetenv.c b/sysdeps/mips/fpu/fesetenv.c new file mode 100644 index 0000000000..43a571efde --- /dev/null +++ b/sysdeps/mips/fpu/fesetenv.c @@ -0,0 +1,37 @@ +/* Install given floating-point environment. + Copyright (C) 1998, 1999 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Jaeger , 1998. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +int +__fesetenv (const fenv_t *envp) +{ + if (envp == FE_DFL_ENV) + _FPU_SETCW (_FPU_DEFAULT); + else + _FPU_SETCW (envp->__fp_control_register); + + /* Success. */ + return 0; +} +strong_alias (__fesetenv, __old_fesetenv) +symbol_version (__old_fesetenv, fesetenv, GLIBC_2.1); +default_symbol_version (__fesetenv, fesetenv, GLIBC_2.1.3); From deb5c024aa25827dc11738ca05497a9126fd2a78 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 1 Nov 1999 00:16:05 +0000 Subject: [PATCH 1671/4487] fesetround implementation for PowerPC. --- sysdeps/mips/fpu/fesetround.c | 43 +++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 sysdeps/mips/fpu/fesetround.c diff --git a/sysdeps/mips/fpu/fesetround.c b/sysdeps/mips/fpu/fesetround.c new file mode 100644 index 0000000000..6b623d6eab --- /dev/null +++ b/sysdeps/mips/fpu/fesetround.c @@ -0,0 +1,43 @@ +/* Set current rounding direction. + Copyright (C) 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Jaeger , 1998. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +int +fesetround (int round) +{ + unsigned short int cw; + + if ((round & ~0x3) != 0) + /* ROUND is no valid rounding mode. */ + return 0; + + /* Get current state. */ + _FPU_GETCW (cw); + + /* Set rounding bits. */ + cw &= ~0x3; + cw |= round; + /* Set new state. */ + _FPU_SETCW (cw); + + return 1; +} From cf025bb2981527ca3d2c6cc5f4741724f7249130 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 1 Nov 1999 00:16:24 +0000 Subject: [PATCH 1672/4487] feupdateenv implementation for PowerPC. --- sysdeps/mips/fpu/feupdateenv.c | 46 ++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 sysdeps/mips/fpu/feupdateenv.c diff --git a/sysdeps/mips/fpu/feupdateenv.c b/sysdeps/mips/fpu/feupdateenv.c new file mode 100644 index 0000000000..f0748cee77 --- /dev/null +++ b/sysdeps/mips/fpu/feupdateenv.c @@ -0,0 +1,46 @@ +/* Install given floating-point environment and raise exceptions. + Copyright (C) 1998, 1999 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Jaeger , 1998. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +int +__feupdateenv (const fenv_t *envp) +{ + int temp; + + /* Save current exceptions. */ + _FPU_GETCW (temp); + temp &= FE_ALL_EXCEPT; + + /* Install new environment. */ + fesetenv (envp); + + /* Raise the safed exception. Incidently for us the implementation + defined format of the values in objects of type fexcept_t is the + same as the ones specified using the FE_* constants. */ + feraiseexcept (temp); + + /* Success. */ + return 0; +} +strong_alias (__feupdateenv, __old_feupdateenv) +symbol_version (__old_feupdateenv, feupdateenv, GLIBC_2.1); +default_symbol_version (__feupdateenv, feupdateenv, GLIBC_2.1.3); From f2425ccdbb5d0d2e1abaae3f7e6d79f39a1fca4c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 1 Nov 1999 00:16:36 +0000 Subject: [PATCH 1673/4487] fegetexcept implementation for PowerPC. --- sysdeps/mips/fpu/fgetexcptflg.c | 39 +++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 sysdeps/mips/fpu/fgetexcptflg.c diff --git a/sysdeps/mips/fpu/fgetexcptflg.c b/sysdeps/mips/fpu/fgetexcptflg.c new file mode 100644 index 0000000000..8c586b5200 --- /dev/null +++ b/sysdeps/mips/fpu/fgetexcptflg.c @@ -0,0 +1,39 @@ +/* Store current representation for exceptions. + Copyright (C) 1998, 1999 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Jaeger , 1998. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +int +__fegetexceptflag (fexcept_t *flagp, int excepts) +{ + fexcept_t temp; + + /* Get the current exceptions. */ + _FPU_GETCW (temp); + + *flagp = temp & excepts & FE_ALL_EXCEPT; + + /* Success. */ + return 0; +} +strong_alias (__fegetexceptflag, __old_fegetexceptflag) +symbol_version (__old_fegetexceptflag, fegetexceptflag, GLIBC_2.1); +default_symbol_version (__fegetexceptflag, fegetexceptflag, GLIBC_2.1.3); From d971640e9847e3f34d242b81022e361d4dad43da Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 1 Nov 1999 00:16:46 +0000 Subject: [PATCH 1674/4487] fetestexcept implementation for PowerPC. --- sysdeps/mips/fpu/ftestexcept.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 sysdeps/mips/fpu/ftestexcept.c diff --git a/sysdeps/mips/fpu/ftestexcept.c b/sysdeps/mips/fpu/ftestexcept.c new file mode 100644 index 0000000000..f348258318 --- /dev/null +++ b/sysdeps/mips/fpu/ftestexcept.c @@ -0,0 +1,33 @@ +/* Test exception in current environment. + Copyright (C) 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Jaeger , 1998. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +int +fetestexcept (int excepts) +{ + int cw; + + /* Get current control word. */ + _FPU_GETCW (cw); + + return cw & excepts & FE_ALL_EXCEPT; +} From 17f1ad449977e0b86ea01da527080df31f0e663c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 1 Nov 1999 02:35:05 +0000 Subject: [PATCH 1675/4487] (SI_KERNEL): Added. --- sysdeps/unix/sysv/linux/mips/bits/siginfo.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h index 81a6ec115d..d1418692f3 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h +++ b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h @@ -122,8 +122,10 @@ enum # define SI_ASYNCIO SI_ASYNCIO SI_QUEUE, /* Sent by sigqueue. */ # define SI_QUEUE SI_QUEUE - SI_USER /* Sent by kill, sigsend, raise. */ + SI_USER, /* Sent by kill, sigsend, raise. */ # define SI_USER SI_USER + SI_KERNEL = 0x80 /* Send by kernel. */ +#define SI_KERNEL SI_KERNEL }; From 67b11b531ed8d6625200115b6e8c1934303deda4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 2 Nov 1999 06:54:45 +0000 Subject: [PATCH 1676/4487] Add more pr* types used by the debugger. --- sysdeps/unix/sysv/linux/alpha/sys/procfs.h | 12 ++++++++++++ sysdeps/unix/sysv/linux/arm/sys/procfs.h | 12 ++++++++++++ sysdeps/unix/sysv/linux/mips/sys/procfs.h | 14 +++++++++++++- 3 files changed, 37 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h index 7d4059664e..428563b39a 100644 --- a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h @@ -101,6 +101,18 @@ struct elf_prpsinfo }; +/* Addresses. */ +typedef void *psaddr_t; + +/* Register sets. Linux has different names. */ +typedef gregset_t prgregset_t; +typedef fpregset_t prfpregset_t; + +/* We don't have any differences between processes and threads, + therefore habe only ine PID type. */ +typedef __pid_t lwpid_t; + + typedef struct elf_prstatus prstatus_t; typedef struct elf_prpsinfo prpsinfo_t; diff --git a/sysdeps/unix/sysv/linux/arm/sys/procfs.h b/sysdeps/unix/sysv/linux/arm/sys/procfs.h index e2f373155d..497c8e9b0b 100644 --- a/sysdeps/unix/sysv/linux/arm/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/arm/sys/procfs.h @@ -91,6 +91,18 @@ struct elf_prpsinfo }; +/* Addresses. */ +typedef void *psaddr_t; + +/* Register sets. Linux has different names. */ +typedef gregset_t prgregset_t; +typedef fpregset_t prfpregset_t; + +/* We don't have any differences between processes and threads, + therefore habe only ine PID type. */ +typedef __pid_t lwpid_t; + + typedef struct elf_prstatus prstatus_t; typedef struct elf_prpsinfo prpsinfo_t; diff --git a/sysdeps/unix/sysv/linux/mips/sys/procfs.h b/sysdeps/unix/sysv/linux/mips/sys/procfs.h index c97836f6e9..5a94de0de5 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/mips/sys/procfs.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1999 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 @@ -101,6 +101,18 @@ struct elf_prpsinfo }; +/* Addresses. */ +typedef void *psaddr_t; + +/* Register sets. Linux has different names. */ +typedef gregset_t prgregset_t; +typedef fpregset_t prfpregset_t; + +/* We don't have any differences between processes and threads, + therefore habe only ine PID type. */ +typedef __pid_t lwpid_t; + + typedef struct elf_prstatus prstatus_t; typedef struct elf_prpsinfo prpsinfo_t; From 1e70a8a3757353f39f02947e7d607316fa44fd82 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 12 Nov 1999 21:27:08 +0000 Subject: [PATCH 1677/4487] Follow changes from i386 version. --- sysdeps/unix/sysv/linux/alpha/sys/procfs.h | 14 ++++++++++++-- sysdeps/unix/sysv/linux/arm/sys/procfs.h | 14 ++++++++++++-- sysdeps/unix/sysv/linux/mips/sys/procfs.h | 15 +++++++++++++-- 3 files changed, 37 insertions(+), 6 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h index 428563b39a..f47adeebfe 100644 --- a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h @@ -17,17 +17,17 @@ Boston, MA 02111-1307, USA. */ #ifndef _SYS_PROCFS_H - #define _SYS_PROCFS_H 1 -#include /* This is somehow modelled after the file of the same name on SysVr4 systems. It provides a definition of the core file format for ELF used on Linux. */ +#include #include #include #include +#include #include #include @@ -100,6 +100,16 @@ struct elf_prpsinfo char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ }; +/* Addresses. */ +typedef void *psaddr_t; + +/* Register sets. Linux has different names. */ +typedef gregset_t prgregset_t; +typedef fpregset_t prfpregset_t; + +/* We don't have any differences between processes and threads, + therefore habe only ine PID type. */ +typedef __pid_t lwpid_t; /* Addresses. */ typedef void *psaddr_t; diff --git a/sysdeps/unix/sysv/linux/arm/sys/procfs.h b/sysdeps/unix/sysv/linux/arm/sys/procfs.h index 497c8e9b0b..a228179796 100644 --- a/sysdeps/unix/sysv/linux/arm/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/arm/sys/procfs.h @@ -17,17 +17,17 @@ Boston, MA 02111-1307, USA. */ #ifndef _SYS_PROCFS_H - #define _SYS_PROCFS_H 1 -#include /* This is somehow modelled after the file of the same name on SysVr4 systems. It provides a definition of the core file format for ELF used on Linux. */ +#include #include #include #include +#include #include #include @@ -90,6 +90,16 @@ struct elf_prpsinfo char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ }; +/* Addresses. */ +typedef void *psaddr_t; + +/* Register sets. Linux has different names. */ +typedef gregset_t prgregset_t; +typedef fpregset_t prfpregset_t; + +/* We don't have any differences between processes and threads, + therefore habe only ine PID type. */ +typedef __pid_t lwpid_t; /* Addresses. */ typedef void *psaddr_t; diff --git a/sysdeps/unix/sysv/linux/mips/sys/procfs.h b/sysdeps/unix/sysv/linux/mips/sys/procfs.h index 5a94de0de5..9c6bac9dc6 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/mips/sys/procfs.h @@ -17,17 +17,17 @@ Boston, MA 02111-1307, USA. */ #ifndef _SYS_PROCFS_H - #define _SYS_PROCFS_H 1 -#include /* This is somehow modelled after the file of the same name on SysVr4 systems. It provides a definition of the core file format for ELF used on Linux. */ +#include #include #include #include +#include #include #include @@ -100,6 +100,17 @@ struct elf_prpsinfo char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ }; +/* Addresses. */ +typedef void *psaddr_t; + +/* Register sets. Linux has different names. */ +typedef gregset_t prgregset_t; +typedef fpregset_t prfpregset_t; + +/* We don't have any differences between processes and threads, + therefore habe only ine PID type. */ +typedef __pid_t lwpid_t; + /* Addresses. */ typedef void *psaddr_t; From f2fe71afa2e364a3df6a92d8bbb6ed0036e78c13 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 15 Nov 1999 08:00:07 +0000 Subject: [PATCH 1678/4487] Remove duplicate definitions. --- sysdeps/unix/sysv/linux/alpha/sys/procfs.h | 11 ----------- sysdeps/unix/sysv/linux/arm/sys/procfs.h | 11 ----------- sysdeps/unix/sysv/linux/mips/sys/procfs.h | 11 ----------- 3 files changed, 33 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h index f47adeebfe..87f8e4cd17 100644 --- a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h @@ -111,17 +111,6 @@ typedef fpregset_t prfpregset_t; therefore habe only ine PID type. */ typedef __pid_t lwpid_t; -/* Addresses. */ -typedef void *psaddr_t; - -/* Register sets. Linux has different names. */ -typedef gregset_t prgregset_t; -typedef fpregset_t prfpregset_t; - -/* We don't have any differences between processes and threads, - therefore habe only ine PID type. */ -typedef __pid_t lwpid_t; - typedef struct elf_prstatus prstatus_t; typedef struct elf_prpsinfo prpsinfo_t; diff --git a/sysdeps/unix/sysv/linux/arm/sys/procfs.h b/sysdeps/unix/sysv/linux/arm/sys/procfs.h index a228179796..5198033ba0 100644 --- a/sysdeps/unix/sysv/linux/arm/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/arm/sys/procfs.h @@ -101,17 +101,6 @@ typedef fpregset_t prfpregset_t; therefore habe only ine PID type. */ typedef __pid_t lwpid_t; -/* Addresses. */ -typedef void *psaddr_t; - -/* Register sets. Linux has different names. */ -typedef gregset_t prgregset_t; -typedef fpregset_t prfpregset_t; - -/* We don't have any differences between processes and threads, - therefore habe only ine PID type. */ -typedef __pid_t lwpid_t; - typedef struct elf_prstatus prstatus_t; typedef struct elf_prpsinfo prpsinfo_t; diff --git a/sysdeps/unix/sysv/linux/mips/sys/procfs.h b/sysdeps/unix/sysv/linux/mips/sys/procfs.h index 9c6bac9dc6..7e17bc0c40 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/mips/sys/procfs.h @@ -100,17 +100,6 @@ struct elf_prpsinfo char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ }; -/* Addresses. */ -typedef void *psaddr_t; - -/* Register sets. Linux has different names. */ -typedef gregset_t prgregset_t; -typedef fpregset_t prfpregset_t; - -/* We don't have any differences between processes and threads, - therefore habe only ine PID type. */ -typedef __pid_t lwpid_t; - /* Addresses. */ typedef void *psaddr_t; From 264ce3b03b710f6c4cf58c8a365d2a9e7f45adfd Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 18 Nov 1999 00:11:49 +0000 Subject: [PATCH 1679/4487] Remove greg_t, gregset_t, fpregset_t, and NGREG definitions. --- sysdeps/unix/sysv/linux/alpha/sys/procfs.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h index 87f8e4cd17..a9ae104e56 100644 --- a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h @@ -40,11 +40,6 @@ struct elf_siginfo int si_errno; /* Errno. */ }; -typedef elf_greg_t greg_t; -typedef elf_gregset_t gregset_t; -typedef elf_fpregset_t fpregset_t; -#define NGREG ELF_NGREG - /* Definitions to generate Intel SVR4-like core files. These mostly have the same names as the SVR4 types with "elf_" tacked on the front to prevent clashes with linux definitions, and the typedef From 1b5f51e74971b7f93aef02ded83515e73821b36d Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 22 Nov 1999 16:34:19 +0000 Subject: [PATCH 1680/4487] Add __syscall_setrlimit. --- sysdeps/unix/sysv/linux/mips/syscalls.list | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index 0939cda0cf..5ddba9b4f6 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -64,6 +64,7 @@ s_pread64 pread64 pread 6 __syscall_pread s_ptrace ptrace ptrace 4 __syscall_ptrace s_pwrite64 pwrite64 pwrite 6 __syscall_pwrite s_reboot reboot reboot 3 __syscall_reboot +s_setrlimit setrlimit setrlimit 3 __syscall_setrlimit s_sigpending sigpending sigpending 1 __syscall_sigpending s_sigprocmask sigprocmask sigprocmask 3 __syscall_sigprocmask # Todo: we can pass 6 args in registers, no need for the wrapper From ccae44c2e643a8d4a553af30853b41b3e44bcb71 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 22 Nov 1999 16:35:07 +0000 Subject: [PATCH 1681/4487] Include to get key_t. --- sysdeps/unix/sysv/linux/mips/bits/ipc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/ipc.h b/sysdeps/unix/sysv/linux/mips/bits/ipc.h index fb989cceca..5c36d99ef8 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/ipc.h +++ b/sysdeps/unix/sysv/linux/mips/bits/ipc.h @@ -20,7 +20,7 @@ # error "Never use directly; include instead." #endif -#include +#include /* Mode bits for `msgget', `semget', and `shmget'. */ #define IPC_CREAT 01000 /* Create key if key does not exist. */ From 58f68573b9c703d3ad9a29e5582e5d891d942c37 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 23 Nov 1999 15:49:22 +0000 Subject: [PATCH 1682/4487] * sysdeps/mips/dl-machine.h (elf_machine_dynamic): New function. (elf_machine_got): Removed, not needed anymore. (ELF_MACHINE_RELOC_NOPLT): Removed. (ELF_MACHINE_JMP_SLOT): Added. (_RTLD_PROLOGUE): We use gcc, no need to check for __STDC__. (_RTLD_EPILOGUE): Likewise. (RESOLVE_GOTSYM): Use R_MIPS_REL32. (ELF_MACHINE_RUNTIME_TRAMPOLINE): Likewise. Based on patches from Maciej W. Rozycki and Ralf Baechle . --- sysdeps/mips/dl-machine.h | 39 ++++++++++++++++----------------------- 1 file changed, 16 insertions(+), 23 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 5811b78b29..d8b892b83f 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -32,25 +32,19 @@ #endif #ifndef _RTLD_PROLOGUE -#ifdef __STDC__ -#define _RTLD_PROLOGUE(entry) "\n\t.globl " #entry \ - "\n\t.ent " #entry \ - "\n\t" #entry ":\n\t" -#else -#define _RTLD_PROLOGUE(entry) "\n\t.globl entry\n\t.ent entry\n\t entry:\n\t" -#endif +# define _RTLD_PROLOGUE(entry) "\n\t.globl " #entry \ + "\n\t.ent " #entry \ + "\n\t" #entry ":\n\t" #endif #ifndef _RTLD_EPILOGUE -#ifdef __STDC__ -#define _RTLD_EPILOGUE(entry) "\t.end " #entry "\n" -#else -#define _RTLD_EPILOGUE(entry) "\t.end entry\n" -#endif +# define _RTLD_EPILOGUE(entry) "\t.end " #entry "\n" #endif -/* I have no idea what I am doing. */ -#define ELF_MACHINE_RELOC_NOPLT -1 +/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. + This makes no sense on MIPS but we have to define this to R_MIPS_REL32 + to avoid the asserts in dl-lookup.c from blowing. */ +#define ELF_MACHINE_JMP_SLOT R_MIPS_REL32 #define elf_machine_lookup_noplt_p(type) (1) #define elf_machine_lookup_noexec_p(type) (0) @@ -104,14 +98,13 @@ elf_mips_got_from_gpreg (ElfW(Addr) gpreg) return (ElfW(Addr) *) (gpreg - 0x7ff0); } -/* Return the run-time address of the _GLOBAL_OFFSET_TABLE_. - Must be inlined in a function which uses global data. */ -static inline ElfW(Addr) * -elf_machine_got (void) +/* Return the link-time address of _DYNAMIC. Conveniently, this is the + first element of the GOT. This must be inlined in a function which + uses global data. */ +static inline ElfW(Addr) +elf_machine_dynamic (void) { - ElfW(Addr) gp; - - __asm__ __volatile__("move %0, $28\n\t" : "=r" (gp)); + register ElfW(Addr) gp __asm__ ("$28"); return elf_mips_got_from_gpreg (gp); } @@ -151,7 +144,7 @@ elf_machine_got_rel (struct link_map *map, int lazy) ElfW(Addr) sym_loadaddr; \ sym_loadaddr = _dl_lookup_symbol (strtab + sym->st_name, &ref, \ map->l_scope, \ - map->l_name, ELF_MACHINE_RELOC_NOPLT);\ + map->l_name, R_MIPS_REL32);\ (ref)? sym_loadaddr + ref->st_value: 0; \ }) @@ -361,7 +354,7 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \ \ loadbase = _dl_lookup_symbol (strtab + definer->st_name, &definer, \ l->l_scope, l->l_name, \ - ELF_MACHINE_RELOC_NOPLT); \ + R_MIPS_REL32); \ \ /* Apply the relocation with that value. */ \ funcaddr = loadbase + definer->st_value; \ From 119fab9878aaf5a657b7295d73b838156ff6a27e Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 23 Nov 1999 15:57:26 +0000 Subject: [PATCH 1683/4487] Fix typo in applying last patch. --- sysdeps/mips/dl-machine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index d8b892b83f..7761100455 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -105,7 +105,7 @@ static inline ElfW(Addr) elf_machine_dynamic (void) { register ElfW(Addr) gp __asm__ ("$28"); - return elf_mips_got_from_gpreg (gp); + return *elf_mips_got_from_gpreg (gp); } From f4b123a3a8a350d31d2a371283bf986f5b9ec83a Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 23 Nov 1999 16:10:26 +0000 Subject: [PATCH 1684/4487] (elf_machine_dynamic): New function. (elf_machine_got): Removed, not needed anymore. (ELF_MACHINE_RELOC_NOPLT): Removed. (ELF_MACHINE_JMP_SLOT): Added. (_RTLD_PROLOGUE): We use gcc, no need to check for __STDC__. (_RTLD_EPILOGUE): Likewise. (RESOLVE_GOTSYM): Use R_MIPS_REL32. (ELF_MACHINE_RUNTIME_TRAMPOLINE): Likewise. --- sysdeps/mips/mips64/dl-machine.h | 36 +++++++++++++------------------- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h index f200fcda64..3dc97eb1ed 100644 --- a/sysdeps/mips/mips64/dl-machine.h +++ b/sysdeps/mips/mips64/dl-machine.h @@ -32,25 +32,19 @@ #endif #ifndef _RTLD_PROLOGUE -#ifdef __STDC__ -#define _RTLD_PROLOGUE(entry) "\n\t.globl " #entry \ +# define _RTLD_PROLOGUE(entry) "\n\t.globl " #entry \ "\n\t.ent " #entry \ "\n\t" #entry ":\n\t" -#else -#define _RTLD_PROLOGUE(entry) "\n\t.globl entry\n\t.ent entry\n\t entry:\n\t" -#endif #endif #ifndef _RTLD_EPILOGUE -#ifdef __STDC__ -#define _RTLD_EPILOGUE(entry) "\t.end " #entry "\n" -#else -#define _RTLD_EPILOGUE(entry) "\t.end entry\n" -#endif +# define _RTLD_EPILOGUE(entry) "\t.end " #entry "\n" #endif -/* I have no idea what I am doing. */ -#define ELF_MACHINE_RELOC_NOPLT -1 +/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. + This makes no sense on MIPS but we have to define this to R_MIPS_REL32 + to avoid the asserts in dl-lookup.c from blowing. */ +#define ELF_MACHINE_JMP_SLOT R_MIPS_REL32 #define elf_machine_lookup_noplt_p(type) (1) #define elf_machine_lookup_noexec_p(type) (0) @@ -104,15 +98,15 @@ elf_mips_got_from_gpreg (ElfW(Addr) gpreg) return (ElfW(Addr) *) (gpreg - 0x7ff0); } -/* Return the run-time address of the _GLOBAL_OFFSET_TABLE_. - Must be inlined in a function which uses global data. */ -static inline ElfW(Addr) * -elf_machine_got (void) +/* Return the link-time address of _DYNAMIC. Conveniently, this is the + first element of the GOT. This must be inlined in a function which + uses global data. */ +static inline ElfW(Addr) +elf_machine_dynamic (void) { - ElfW(Addr) gp; + register ElfW(Addr) gp __asm__ ("$28"); - __asm__ __volatile__("move %0, $28\n\t" : "=r" (gp)); - return elf_mips_got_from_gpreg (gp); + return *elf_mips_got_from_gpreg (gp); } @@ -151,7 +145,7 @@ elf_machine_got_rel (struct link_map *map, int lazy) ElfW(Addr) sym_loadaddr; \ sym_loadaddr = _dl_lookup_symbol (strtab + sym->st_name, &ref, \ map->l_scope, \ - map->l_name, ELF_MACHINE_RELOC_NOPLT);\ + map->l_name, R_MIPS_REL32);\ (ref)? sym_loadaddr + ref->st_value: 0; \ }) @@ -360,7 +354,7 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \ \ loadbase = _dl_lookup_symbol (strtab + definer->st_name, &definer, \ l->l_scope, l->l_name, \ - ELF_MACHINE_RELOC_NOPLT); \ + R_MIPS_REL32); \ \ /* Apply the relocation with that value. */ \ funcaddr = loadbase + definer->st_value; \ From d2463e15d19e3387f7cb9844f517bff3f419add9 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 29 Nov 1999 17:50:55 +0000 Subject: [PATCH 1685/4487] * sysdeps/m68k/bits/byteswap.h (__bswap_32): Rename local variable __v to __bswap_32_v. (__bswap_64): Rename local variables __v and __r to __bswap_64_v and __bswap_64_r to avoid clash with __bswap_32 macro. --- sysdeps/m68k/bits/byteswap.h | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/sysdeps/m68k/bits/byteswap.h b/sysdeps/m68k/bits/byteswap.h index 41bbe59782..e828fc6554 100644 --- a/sysdeps/m68k/bits/byteswap.h +++ b/sysdeps/m68k/bits/byteswap.h @@ -34,17 +34,17 @@ #if defined __GNUC__ && __GNUC__ >= 2 # define __bswap_32(x) \ - __extension__ \ - ({ unsigned int __v; \ - if (__builtin_constant_p (x)) \ - __v = __bswap_constant_32 (x); \ - else \ - __asm__ __volatile__ ("ror%.w %#8, %0;" \ - "swap %0;" \ - "ror%.w %#8, %0" \ - : "=d" (__v) \ - : "0" (x)); \ - __v; }) + __extension__ \ + ({ unsigned int __bswap_32_v; \ + if (__builtin_constant_p (x)) \ + __bswap_32_v = __bswap_constant_32 (x); \ + else \ + __asm__ __volatile__ ("ror%.w %#8, %0;" \ + "swap %0;" \ + "ror%.w %#8, %0" \ + : "=d" (__bswap_32_v) \ + : "0" (x)); \ + __bswap_32_v; }) #else # define __bswap_32(x) __bswap_constant_32 (x) #endif @@ -52,11 +52,11 @@ #if defined __GNUC__ && __GNUC__ >= 2 /* Swap bytes in 64 bit value. */ # define __bswap_64(x) \ - __extension__ \ - ({ union { unsigned long long int __ll; \ - unsigned long int __l[2]; } __v, __r; \ - __v.__ll = (x); \ - __r.__l[0] = __bswap_32 (__v.__l[1]); \ - __r.__l[1] = __bswap_32 (__v.__l[0]); \ - __r.__ll; }) + __extension__ \ + ({ union { unsigned long long int __ll; \ + unsigned long int __l[2]; } __bswap_64_v, __bswap_64_r; \ + __bswap_64_v.__ll = (x); \ + __bswap_64_r.__l[0] = __bswap_32 (__bswap_64_v.__l[1]); \ + __bswap_64_r.__l[1] = __bswap_32 (__bswap_64_v.__l[0]); \ + __bswap_64_r.__ll; }) #endif From fce334577e78cb053eb06e08ffa2736be013dd80 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 2 Dec 1999 08:18:09 +0000 Subject: [PATCH 1686/4487] Backwared compatible Linux/Alpha getrlimit64 implementation. --- sysdeps/unix/sysv/linux/alpha/oldgetrlimit64.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/oldgetrlimit64.c diff --git a/sysdeps/unix/sysv/linux/alpha/oldgetrlimit64.c b/sysdeps/unix/sysv/linux/alpha/oldgetrlimit64.c new file mode 100644 index 0000000000..9feab0e6b8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/oldgetrlimit64.c @@ -0,0 +1 @@ +/* getrlimit64 is the same as getrlimit. */ From ecb0bc529997f5be510b65908a5ad5ad7e364d9e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 2 Dec 1999 08:18:16 +0000 Subject: [PATCH 1687/4487] Backwared compatible Linux/Alpha setrlimit64 implementation. --- sysdeps/unix/sysv/linux/alpha/oldsetrlimit64.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/oldsetrlimit64.c diff --git a/sysdeps/unix/sysv/linux/alpha/oldsetrlimit64.c b/sysdeps/unix/sysv/linux/alpha/oldsetrlimit64.c new file mode 100644 index 0000000000..8edcff0086 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/oldsetrlimit64.c @@ -0,0 +1 @@ +/* setrlimit64 is the same as setrlimit. */ From c0318789f260d29a8641bb64bb9a26145702e809 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 2 Dec 1999 08:18:33 +0000 Subject: [PATCH 1688/4487] Add oldsetrlimit and oldgetrlimit. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index ba20cd0d72..49f2b11a50 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -29,6 +29,8 @@ fstatfs - fstatfs 2 __fstatfs fstatfs fstatfs64 statfs - statfs 2 __statfs statfs statfs64 getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64 setrlimit - setrlimit 2 setrlimit setrlimit64 +oldgetrlimit EXTRA getrlimit 2 __old_getrlimit getrlimit@GLIBC_2.0 getrlimit64@GLIBC_2.1 +oldsetrlimit EXTRA setrlimit 2 __old_setrlimit setrlimit@GLIBC_2.0 setrlimit64@GLIBC_2.1 ftruncate - ftruncate 2 __ftruncate ftruncate ftruncate64 truncate - truncate 2 truncate truncate64 From 43f0382c7263573658c772e9c26048c944f08981 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 2 Dec 1999 08:19:07 +0000 Subject: [PATCH 1689/4487] Fix signedness of __rlim_t and __rlim64_t. --- sysdeps/unix/sysv/linux/alpha/bits/types.h | 4 ++-- sysdeps/unix/sysv/linux/mips/bits/types.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h index d98ed8ad8c..d55fee384c 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/types.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h @@ -57,8 +57,8 @@ typedef __int64_t __off64_t; /* "" (LFS) */ typedef __int64_t __loff_t; /* Type of file sizes and offsets. */ typedef __int32_t __pid_t; /* Type of process identifications. */ typedef __int64_t __ssize_t; /* Type of a byte count, or error. */ -typedef __int64_t __rlim_t; /* Type of resource counts. */ -typedef __int64_t __rlim64_t; /* "" (LFS) */ +typedef __uint64_t __rlim_t; /* Type of resource counts. */ +typedef __uint64_t __rlim64_t; /* "" (LFS) */ typedef __uint32_t __blksize_t; /* Type to represnet block size. */ typedef __uint32_t __blkcnt_t; /* Type to count nr disk blocks. */ typedef __uint64_t __blkcnt64_t; /* "" (LFS) */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h index 37c3f21c5b..a52bb8022b 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/types.h +++ b/sysdeps/unix/sysv/linux/mips/bits/types.h @@ -68,8 +68,8 @@ typedef long int __off_t; /* Type of file sizes and offsets. */ typedef __quad_t __loff_t; /* Type of file sizes and offsets. */ typedef int __pid_t; /* Type of process identifications. */ typedef int __ssize_t; /* Type of a byte count, or error. */ -typedef long int __rlim_t; /* Type of resource counts. */ -typedef __quad_t __rlim64_t; /* Type of resource counts (LFS). */ +typedef __u_long __rlim_t; /* Type of resource counts. */ +typedef __u_quad_t __rlim64_t; /* Type of resource counts (LFS). */ typedef __u_int __id_t; /* General type for ID. */ typedef struct From e22a3eb7947347b9d7aacd14c72edd7983677781 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 4 Dec 1999 07:40:43 +0000 Subject: [PATCH 1690/4487] (__t_scalar_t, __t_uscalar_t): Make long types. --- sysdeps/unix/sysv/linux/alpha/bits/types.h | 4 ++-- sysdeps/unix/sysv/linux/mips/bits/types.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h index d55fee384c..8a79621cc6 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/types.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h @@ -117,8 +117,8 @@ typedef struct } __fd_set; /* Used in XTI. */ -typedef int __t_scalar_t; -typedef unsigned int __t_uscalar_t; +typedef long int __t_scalar_t; +typedef unsigned long int __t_uscalar_t; /* Duplicates info from stdint.h but this is used in unistd.h. */ typedef long int __intptr_t; diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h index a52bb8022b..48a9bf07e1 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/types.h +++ b/sysdeps/unix/sysv/linux/mips/bits/types.h @@ -143,8 +143,8 @@ typedef __u_long __ino64_t; typedef __loff_t __off64_t; /* Used in XTI. */ -typedef int __t_scalar_t; -typedef unsigned int __t_uscalar_t; +typedef long int __t_scalar_t; +typedef unsigned long int __t_uscalar_t; /* Duplicates info from stdint.h but this is used in unistd.h. */ typedef int __intptr_t; From d1af493c6b3bcaaaa4c24a5a3b6e5592c33fc69d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 8 Dec 1999 07:35:32 +0000 Subject: [PATCH 1691/4487] (elf_machine_rel): Fixup R_ARM_PC24 relocs if possible. --- sysdeps/arm/dl-machine.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 25e2f06321..2e6faf5d51 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -443,6 +443,23 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, *reloc_addr += value; break; } + case R_ARM_PC24: + { + signed int addend; + + addend = *reloc_addr & 0x00ffffff; + if (addend & 0x00800000) addend |= 0xff000000; + + value = value - (unsigned int)reloc_addr + (addend << 2); + if (value & 0xfc000003) + _dl_signal_error (0, map->l_name, + "R_ARM_PC24 relocation out of range"); + + value = value >> 2; + value = (*reloc_addr & 0xff000000) | (value & 0x00ffffff); + *reloc_addr = value; + } + break; default: _dl_reloc_bad_type (map, ELF32_R_TYPE (reloc->r_info), 0); break; From 6d1adc87341959961558bf25129547466f28f417 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 18 Dec 1999 19:36:39 +0000 Subject: [PATCH 1692/4487] Protect definitions for math.h against double inclusion. --- sysdeps/alpha/fpu/bits/mathdef.h | 4 +++- sysdeps/m68k/fpu/bits/mathdef.h | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/fpu/bits/mathdef.h b/sysdeps/alpha/fpu/bits/mathdef.h index f5d5de8b12..30f93dda1c 100644 --- a/sysdeps/alpha/fpu/bits/mathdef.h +++ b/sysdeps/alpha/fpu/bits/mathdef.h @@ -23,7 +23,9 @@ /* FIXME! This file describes properties of the compiler, not the machine; it should not be part of libc! */ -#if defined __USE_ISOC99 && defined _MATH_H +#if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF +# define _MATH_H_MATHDEF 1 + # ifdef __GNUC__ # if __STDC__ == 1 diff --git a/sysdeps/m68k/fpu/bits/mathdef.h b/sysdeps/m68k/fpu/bits/mathdef.h index 2f650ec8b5..c80dad3fe1 100644 --- a/sysdeps/m68k/fpu/bits/mathdef.h +++ b/sysdeps/m68k/fpu/bits/mathdef.h @@ -20,7 +20,9 @@ # error "Never use directly; include instead" #endif -#if defined __USE_ISOC99 && defined _MATH_H +#if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF +# define _MATH_H_MATHDEF 1 + /* The m68k FPUs evaluate all values in the 96 bit floating-point format which is also available for the user as `long double'. Therefore we define: */ From baa41915ea44a3de3ac8e0f1daa316a38da98be7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 18 Dec 1999 19:39:28 +0000 Subject: [PATCH 1693/4487] Not neeeded. --- sysdeps/unix/sysv/linux/alpha/oldgetrlimit64.c | 1 - sysdeps/unix/sysv/linux/alpha/oldsetrlimit64.c | 1 - 2 files changed, 2 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/alpha/oldgetrlimit64.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/oldsetrlimit64.c diff --git a/sysdeps/unix/sysv/linux/alpha/oldgetrlimit64.c b/sysdeps/unix/sysv/linux/alpha/oldgetrlimit64.c deleted file mode 100644 index 9feab0e6b8..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/oldgetrlimit64.c +++ /dev/null @@ -1 +0,0 @@ -/* getrlimit64 is the same as getrlimit. */ diff --git a/sysdeps/unix/sysv/linux/alpha/oldsetrlimit64.c b/sysdeps/unix/sysv/linux/alpha/oldsetrlimit64.c deleted file mode 100644 index 8edcff0086..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/oldsetrlimit64.c +++ /dev/null @@ -1 +0,0 @@ -/* setrlimit64 is the same as setrlimit. */ From 9d1306dd216960a60dfb951c1385bf05b7a20512 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 18 Dec 1999 23:40:50 +0000 Subject: [PATCH 1694/4487] (CLEAR_CACHE): New macro to force a cache flush. --- sysdeps/arm/dl-machine.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 2e6faf5d51..de2d0babf5 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -32,6 +32,14 @@ && VALID_ELF_OSABI (hdr[EI_OSABI]) \ && VALID_ELF_ABIVERSION (hdr[EI_ABIVERSION]) +#define CLEAR_CACHE(BEG,END) \ +{ \ + register unsigned long _beg __asm ("a1") = (unsigned long)(BEG); \ + register unsigned long _end __asm ("a2") = (unsigned long)((END) - (BEG));\ + register unsigned long _flg __asm ("a3") = 0; \ + __asm __volatile ("swi 0x9f0002"); \ +} + /* Return nonzero iff E_MACHINE is compatible with the running host. */ static inline int __attribute__ ((unused)) elf_machine_matches_host (Elf32_Half e_machine) From b555e31b89dd6efdd29daae0cfc19367e854bdfc Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 19 Dec 1999 00:02:03 +0000 Subject: [PATCH 1695/4487] Linux/Alpha specific definitions for resource.h. --- sysdeps/unix/sysv/linux/alpha/bits/resource.h | 204 ++++++++++++++++++ 1 file changed, 204 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/resource.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/resource.h b/sysdeps/unix/sysv/linux/alpha/bits/resource.h new file mode 100644 index 0000000000..c89f5a0639 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/bits/resource.h @@ -0,0 +1,204 @@ +/* Bit values & structures for resource limits. Alpha/Linux version. + Copyright (C) 1994, 1996, 1997, 1998, 1999 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_RESOURCE_H +# error "Never use directly; include instead." +#endif + +#include + +/* Transmute defines to enumerations. The macro re-definitions are + necessary because some programs want to test for operating system + features with #ifdef RUSAGE_SELF. In ISO C the reflexive + definition is a no-op. */ + +/* Kinds of resource limit. */ +enum __rlimit_resource +{ + /* Per-process CPU limit, in seconds. */ + RLIMIT_CPU = 0, +#define RLIMIT_CPU RLIMIT_CPU + + /* Largest file that can be created, in bytes. */ + RLIMIT_FSIZE = 1, +#define RLIMIT_FSIZE RLIMIT_FSIZE + + /* Maximum size of data segment, in bytes. */ + RLIMIT_DATA = 2, +#define RLIMIT_DATA RLIMIT_DATA + + /* Maximum size of stack segment, in bytes. */ + RLIMIT_STACK = 3, +#define RLIMIT_STACK RLIMIT_STACK + + /* Largest core file that can be created, in bytes. */ + RLIMIT_CORE = 4, +#define RLIMIT_CORE RLIMIT_CORE + + /* Largest resident set size, in bytes. + This affects swapping; processes that are exceeding their + resident set size will be more likely to have physical memory + taken from them. */ + RLIMIT_RSS = 5, +#define RLIMIT_RSS RLIMIT_RSS + + /* Number of open files. */ + RLIMIT_NOFILE = 6, + RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */ +#define RLIMIT_NOFILE RLIMIT_NOFILE +#define RLIMIT_OFILE RLIMIT_OFILE + + /* Address space limit (?) */ + RLIMIT_AS = 7, +#define RLIMIT_AS RLIMIT_AS + + /* Number of processes. */ + RLIMIT_NPROC = 8, +#define RLIMIT_NPROC RLIMIT_NPROC + + /* Locked-in-memory address space. */ + RLIMIT_MEMLOCK = 9, +#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK + + RLIM_NLIMITS = 10 +#define RLIMIT_NLIMITS RLIMIT_NLIMITS +#define RLIM_NLIMITS RLIM_NLIMITS +}; + +/* Value to indicate that there is no limit. */ +#ifndef __USE_FILE_OFFSET64 +# define RLIM_INFINITY ((long int)(~0UL >> 1)) +#else +# define RLIM_INFINITY 0x7fffffffffffffffLL +#endif + +#ifdef __USE_LARGEFILE64 +# define RLIM64_INFINITY 0x7fffffffffffffffLL +#endif + +/* We can represent all limits. */ +#define RLIM_SAVED_MAX RLIM_INFINITY +#define RLIM_SAVED_CUR RLIM_INFINITY + + +/* Type for resource quantity measurement. */ +#ifndef __USE_FILE_OFFSET64 +typedef __rlim_t rlim_t; +#else +typedef __rlim64_t rlim_t; +#endif +#ifdef __USE_LARGEFILE64 +typedef __rlim64_t rlim64_t; +#endif + +struct rlimit + { + /* The current (soft) limit. */ + rlim_t rlim_cur; + /* The hard limit. */ + rlim_t rlim_max; + }; + +#ifdef __USE_LARGEFILE64 +struct rlimit64 + { + /* The current (soft) limit. */ + rlim64_t rlim_cur; + /* The hard limit. */ + rlim64_t rlim_max; + }; +#endif + +/* Whose usage statistics do you want? */ +enum __rusage_who +{ + /* The calling process. */ + RUSAGE_SELF = 0, +#define RUSAGE_SELF RUSAGE_SELF + + /* All of its terminated child processes. */ + RUSAGE_CHILDREN = -1, +#define RUSAGE_CHILDREN RUSAGE_CHILDREN + + /* Both. */ + RUSAGE_BOTH = -2 +#define RUSAGE_BOTH RUSAGE_BOTH +}; + +#define __need_timeval +#include /* For `struct timeval'. */ + +/* Structure which says how much of each resource has been used. */ +struct rusage + { + /* Total amount of user time used. */ + struct timeval ru_utime; + /* Total amount of system time used. */ + struct timeval ru_stime; + /* Maximum resident set size (in kilobytes). */ + long int ru_maxrss; + /* Amount of sharing of text segment memory + with other processes (kilobyte-seconds). */ + long int ru_ixrss; + /* Amount of data segment memory used (kilobyte-seconds). */ + long int ru_idrss; + /* Amount of stack memory used (kilobyte-seconds). */ + long int ru_isrss; + /* Number of soft page faults (i.e. those serviced by reclaiming + a page from the list of pages awaiting reallocation. */ + long int ru_minflt; + /* Number of hard page faults (i.e. those that required I/O). */ + long int ru_majflt; + /* Number of times a process was swapped out of physical memory. */ + long int ru_nswap; + /* Number of input operations via the file system. Note: This + and `ru_oublock' do not include operations with the cache. */ + long int ru_inblock; + /* Number of output operations via the file system. */ + long int ru_oublock; + /* Number of IPC messages sent. */ + long int ru_msgsnd; + /* Number of IPC messages received. */ + long int ru_msgrcv; + /* Number of signals delivered. */ + long int ru_nsignals; + /* Number of voluntary context switches, i.e. because the process + gave up the process before it had to (usually to wait for some + resource to be available). */ + long int ru_nvcsw; + /* Number of involuntary context switches, i.e. a higher priority process + became runnable or the current process used up its time slice. */ + long int ru_nivcsw; + }; + +/* Priority limits. */ +#define PRIO_MIN -20 /* Minimum priority a process can have. */ +#define PRIO_MAX 20 /* Maximum priority a process can have. */ + +/* The type of the WHICH argument to `getpriority' and `setpriority', + indicating what flavor of entity the WHO argument specifies. */ +enum __priority_which +{ + PRIO_PROCESS = 0, /* WHO is a process ID. */ +#define PRIO_PROCESS PRIO_PROCESS + PRIO_PGRP = 1, /* WHO is a process group ID. */ +#define PRIO_PGRP PRIO_PGRP + PRIO_USER = 2 /* WHO is a user ID. */ +#define PRIO_USER PRIO_USER +}; From b2b066ffc29f72ec3e1cfc8f6ee24459fff4dd1d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 19 Dec 1999 00:02:12 +0000 Subject: [PATCH 1696/4487] Linux/MIPS specific definitions for resource.h. --- sysdeps/unix/sysv/linux/mips/bits/resource.h | 205 +++++++++++++++++++ 1 file changed, 205 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/mips/bits/resource.h diff --git a/sysdeps/unix/sysv/linux/mips/bits/resource.h b/sysdeps/unix/sysv/linux/mips/bits/resource.h new file mode 100644 index 0000000000..feb9cc72d0 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/bits/resource.h @@ -0,0 +1,205 @@ +/* Bit values & structures for resource limits. MIPS/Linux version. + Copyright (C) 1994, 1996, 1997, 1998, 1999 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_RESOURCE_H +# error "Never use directly; include instead." +#endif + +#include +#include + +/* Transmute defines to enumerations. The macro re-definitions are + necessary because some programs want to test for operating system + features with #ifdef RUSAGE_SELF. In ISO C the reflexive + definition is a no-op. */ + +/* Kinds of resource limit. */ +enum __rlimit_resource +{ + /* Per-process CPU limit, in seconds. */ + RLIMIT_CPU = 0, +#define RLIMIT_CPU RLIMIT_CPU + + /* Largest file that can be created, in bytes. */ + RLIMIT_FSIZE = 1, +#define RLIMIT_FSIZE RLIMIT_FSIZE + + /* Maximum size of data segment, in bytes. */ + RLIMIT_DATA = 2, +#define RLIMIT_DATA RLIMIT_DATA + + /* Maximum size of stack segment, in bytes. */ + RLIMIT_STACK = 3, +#define RLIMIT_STACK RLIMIT_STACK + + /* Largest core file that can be created, in bytes. */ + RLIMIT_CORE = 4, +#define RLIMIT_CORE RLIMIT_CORE + + /* Largest resident set size, in bytes. + This affects swapping; processes that are exceeding their + resident set size will be more likely to have physical memory + taken from them. */ + RLIMIT_RSS = 7, +#define RLIMIT_RSS RLIMIT_RSS + + /* Number of open files. */ + RLIMIT_NOFILE = 5, + RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */ +#define RLIMIT_NOFILE RLIMIT_NOFILE +#define RLIMIT_OFILE RLIMIT_OFILE + + /* Address space limit (?) */ + RLIMIT_AS = 6, +#define RLIMIT_AS RLIMIT_AS + + /* Number of processes. */ + RLIMIT_NPROC = 8, +#define RLIMIT_NPROC RLIMIT_NPROC + + /* Locked-in-memory address space. */ + RLIMIT_MEMLOCK = 9, +#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK + + RLIM_NLIMITS = 10 +#define RLIMIT_NLIMITS RLIMIT_NLIMITS +#define RLIM_NLIMITS RLIM_NLIMITS +}; + +/* Value to indicate that there is no limit. */ +#ifndef __USE_FILE_OFFSET64 +# define RLIM_INFINITY ((long int)(~0UL >> 1)) +#else +# define RLIM_INFINITY 0x7fffffffffffffffLL +#endif + +#ifdef __USE_LARGEFILE64 +# define RLIM64_INFINITY 0x7fffffffffffffffLL +#endif + +/* We can represent all limits. */ +#define RLIM_SAVED_MAX RLIM_INFINITY +#define RLIM_SAVED_CUR RLIM_INFINITY + + +/* Type for resource quantity measurement. */ +#ifndef __USE_FILE_OFFSET64 +typedef __rlim_t rlim_t; +#else +typedef __rlim64_t rlim_t; +#endif +#ifdef __USE_LARGEFILE64 +typedef __rlim64_t rlim64_t; +#endif + +struct rlimit + { + /* The current (soft) limit. */ + rlim_t rlim_cur; + /* The hard limit. */ + rlim_t rlim_max; + }; + +#ifdef __USE_LARGEFILE64 +struct rlimit64 + { + /* The current (soft) limit. */ + rlim64_t rlim_cur; + /* The hard limit. */ + rlim64_t rlim_max; + }; +#endif + +/* Whose usage statistics do you want? */ +enum __rusage_who +{ + /* The calling process. */ + RUSAGE_SELF = 0, +#define RUSAGE_SELF RUSAGE_SELF + + /* All of its terminated child processes. */ + RUSAGE_CHILDREN = -1, +#define RUSAGE_CHILDREN RUSAGE_CHILDREN + + /* Both. */ + RUSAGE_BOTH = -2 +#define RUSAGE_BOTH RUSAGE_BOTH +}; + +#define __need_timeval +#include /* For `struct timeval'. */ + +/* Structure which says how much of each resource has been used. */ +struct rusage + { + /* Total amount of user time used. */ + struct timeval ru_utime; + /* Total amount of system time used. */ + struct timeval ru_stime; + /* Maximum resident set size (in kilobytes). */ + long int ru_maxrss; + /* Amount of sharing of text segment memory + with other processes (kilobyte-seconds). */ + long int ru_ixrss; + /* Amount of data segment memory used (kilobyte-seconds). */ + long int ru_idrss; + /* Amount of stack memory used (kilobyte-seconds). */ + long int ru_isrss; + /* Number of soft page faults (i.e. those serviced by reclaiming + a page from the list of pages awaiting reallocation. */ + long int ru_minflt; + /* Number of hard page faults (i.e. those that required I/O). */ + long int ru_majflt; + /* Number of times a process was swapped out of physical memory. */ + long int ru_nswap; + /* Number of input operations via the file system. Note: This + and `ru_oublock' do not include operations with the cache. */ + long int ru_inblock; + /* Number of output operations via the file system. */ + long int ru_oublock; + /* Number of IPC messages sent. */ + long int ru_msgsnd; + /* Number of IPC messages received. */ + long int ru_msgrcv; + /* Number of signals delivered. */ + long int ru_nsignals; + /* Number of voluntary context switches, i.e. because the process + gave up the process before it had to (usually to wait for some + resource to be available). */ + long int ru_nvcsw; + /* Number of involuntary context switches, i.e. a higher priority process + became runnable or the current process used up its time slice. */ + long int ru_nivcsw; + }; + +/* Priority limits. */ +#define PRIO_MIN -20 /* Minimum priority a process can have. */ +#define PRIO_MAX 20 /* Maximum priority a process can have. */ + +/* The type of the WHICH argument to `getpriority' and `setpriority', + indicating what flavor of entity the WHO argument specifies. */ +enum __priority_which +{ + PRIO_PROCESS = 0, /* WHO is a process ID. */ +#define PRIO_PROCESS PRIO_PROCESS + PRIO_PGRP = 1, /* WHO is a process group ID. */ +#define PRIO_PGRP PRIO_PGRP + PRIO_USER = 2 /* WHO is a user ID. */ +#define PRIO_USER PRIO_USER +}; From 7b6a54e39c1f3a52a8296db034a7c2d3ee430b6f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Dec 1999 07:58:57 +0000 Subject: [PATCH 1697/4487] Linux/m68k specific implementation of getmsg. --- sysdeps/unix/sysv/linux/m68k/getmsg.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/getmsg.c diff --git a/sysdeps/unix/sysv/linux/m68k/getmsg.c b/sysdeps/unix/sysv/linux/m68k/getmsg.c new file mode 100644 index 0000000000..329cb805ec --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/getmsg.c @@ -0,0 +1 @@ +include From 4ea9edf1970812b064146de2138b2548ba0271b4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Dec 1999 07:59:04 +0000 Subject: [PATCH 1698/4487] Linux/m68k specific implementation of getpmsg. --- sysdeps/unix/sysv/linux/m68k/getpmsg.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/getpmsg.c diff --git a/sysdeps/unix/sysv/linux/m68k/getpmsg.c b/sysdeps/unix/sysv/linux/m68k/getpmsg.c new file mode 100644 index 0000000000..5b1b7559fe --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/getpmsg.c @@ -0,0 +1 @@ +include From 20113dce1513a489299238c16ba37bdceebe8d2f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Dec 1999 07:59:12 +0000 Subject: [PATCH 1699/4487] Linux/m68k specific implementation of putmsg. --- sysdeps/unix/sysv/linux/m68k/putmsg.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/putmsg.c diff --git a/sysdeps/unix/sysv/linux/m68k/putmsg.c b/sysdeps/unix/sysv/linux/m68k/putmsg.c new file mode 100644 index 0000000000..c744bf27f1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/putmsg.c @@ -0,0 +1 @@ +include From a851d4d062cc2369e018d4b429b191b17780606c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Dec 1999 07:59:20 +0000 Subject: [PATCH 1700/4487] Linux/m68k specific implementation of putpmsg. --- sysdeps/unix/sysv/linux/m68k/putpmsg.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/putpmsg.c diff --git a/sysdeps/unix/sysv/linux/m68k/putpmsg.c b/sysdeps/unix/sysv/linux/m68k/putpmsg.c new file mode 100644 index 0000000000..8744136708 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/putpmsg.c @@ -0,0 +1 @@ +include From 8a4102025713bbacf357bbbf126ac19dd7e43193 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Dec 1999 07:59:30 +0000 Subject: [PATCH 1701/4487] Linux/MIPS specific implementation of getmsg. --- sysdeps/unix/sysv/linux/mips/getmsg.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/mips/getmsg.c diff --git a/sysdeps/unix/sysv/linux/mips/getmsg.c b/sysdeps/unix/sysv/linux/mips/getmsg.c new file mode 100644 index 0000000000..329cb805ec --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/getmsg.c @@ -0,0 +1 @@ +include From 764681b7a4bad811fa850b6b600cca79aa394f49 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Dec 1999 07:59:47 +0000 Subject: [PATCH 1702/4487] Linux/MIPS specific implementation of getpmsg. --- sysdeps/unix/sysv/linux/mips/getpmsg.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/mips/getpmsg.c diff --git a/sysdeps/unix/sysv/linux/mips/getpmsg.c b/sysdeps/unix/sysv/linux/mips/getpmsg.c new file mode 100644 index 0000000000..5b1b7559fe --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/getpmsg.c @@ -0,0 +1 @@ +include From f57d4a939485258450c2538e9d3c793ebea84abd Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Dec 1999 07:59:55 +0000 Subject: [PATCH 1703/4487] Linux/MIPS specific implementation of putmsg. --- sysdeps/unix/sysv/linux/mips/putmsg.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/mips/putmsg.c diff --git a/sysdeps/unix/sysv/linux/mips/putmsg.c b/sysdeps/unix/sysv/linux/mips/putmsg.c new file mode 100644 index 0000000000..c744bf27f1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/putmsg.c @@ -0,0 +1 @@ +include From ffe8fc1f1a07edba14fd0a37cfd71227edfe174d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Dec 1999 08:00:02 +0000 Subject: [PATCH 1704/4487] Linux/MIPS specific implementation of putpmsg. --- sysdeps/unix/sysv/linux/mips/putpmsg.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/mips/putpmsg.c diff --git a/sysdeps/unix/sysv/linux/mips/putpmsg.c b/sysdeps/unix/sysv/linux/mips/putpmsg.c new file mode 100644 index 0000000000..8744136708 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/putpmsg.c @@ -0,0 +1 @@ +include From 936d4afc98f9f1017085a7001b43f60ae795fef2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Dec 1999 16:01:52 +0000 Subject: [PATCH 1705/4487] Add missing #. --- sysdeps/unix/sysv/linux/m68k/getmsg.c | 2 +- sysdeps/unix/sysv/linux/m68k/getpmsg.c | 2 +- sysdeps/unix/sysv/linux/m68k/putmsg.c | 2 +- sysdeps/unix/sysv/linux/m68k/putpmsg.c | 2 +- sysdeps/unix/sysv/linux/mips/getmsg.c | 2 +- sysdeps/unix/sysv/linux/mips/getpmsg.c | 2 +- sysdeps/unix/sysv/linux/mips/putmsg.c | 2 +- sysdeps/unix/sysv/linux/mips/putpmsg.c | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sysdeps/unix/sysv/linux/m68k/getmsg.c b/sysdeps/unix/sysv/linux/m68k/getmsg.c index 329cb805ec..3a1fa08525 100644 --- a/sysdeps/unix/sysv/linux/m68k/getmsg.c +++ b/sysdeps/unix/sysv/linux/m68k/getmsg.c @@ -1 +1 @@ -include +#include diff --git a/sysdeps/unix/sysv/linux/m68k/getpmsg.c b/sysdeps/unix/sysv/linux/m68k/getpmsg.c index 5b1b7559fe..bb65f81bf9 100644 --- a/sysdeps/unix/sysv/linux/m68k/getpmsg.c +++ b/sysdeps/unix/sysv/linux/m68k/getpmsg.c @@ -1 +1 @@ -include +#include diff --git a/sysdeps/unix/sysv/linux/m68k/putmsg.c b/sysdeps/unix/sysv/linux/m68k/putmsg.c index c744bf27f1..ebc1680ca7 100644 --- a/sysdeps/unix/sysv/linux/m68k/putmsg.c +++ b/sysdeps/unix/sysv/linux/m68k/putmsg.c @@ -1 +1 @@ -include +#include diff --git a/sysdeps/unix/sysv/linux/m68k/putpmsg.c b/sysdeps/unix/sysv/linux/m68k/putpmsg.c index 8744136708..fbfa59892a 100644 --- a/sysdeps/unix/sysv/linux/m68k/putpmsg.c +++ b/sysdeps/unix/sysv/linux/m68k/putpmsg.c @@ -1 +1 @@ -include +#include diff --git a/sysdeps/unix/sysv/linux/mips/getmsg.c b/sysdeps/unix/sysv/linux/mips/getmsg.c index 329cb805ec..3a1fa08525 100644 --- a/sysdeps/unix/sysv/linux/mips/getmsg.c +++ b/sysdeps/unix/sysv/linux/mips/getmsg.c @@ -1 +1 @@ -include +#include diff --git a/sysdeps/unix/sysv/linux/mips/getpmsg.c b/sysdeps/unix/sysv/linux/mips/getpmsg.c index 5b1b7559fe..bb65f81bf9 100644 --- a/sysdeps/unix/sysv/linux/mips/getpmsg.c +++ b/sysdeps/unix/sysv/linux/mips/getpmsg.c @@ -1 +1 @@ -include +#include diff --git a/sysdeps/unix/sysv/linux/mips/putmsg.c b/sysdeps/unix/sysv/linux/mips/putmsg.c index c744bf27f1..ebc1680ca7 100644 --- a/sysdeps/unix/sysv/linux/mips/putmsg.c +++ b/sysdeps/unix/sysv/linux/mips/putmsg.c @@ -1 +1 @@ -include +#include diff --git a/sysdeps/unix/sysv/linux/mips/putpmsg.c b/sysdeps/unix/sysv/linux/mips/putpmsg.c index 8744136708..fbfa59892a 100644 --- a/sysdeps/unix/sysv/linux/mips/putpmsg.c +++ b/sysdeps/unix/sysv/linux/mips/putpmsg.c @@ -1 +1 @@ -include +#include From 2dfdce515ff6a01bc88f623caf19989ba918dde8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Dec 1999 17:50:04 +0000 Subject: [PATCH 1706/4487] (CLEAR_CACHE): Fix a2 value. --- sysdeps/arm/dl-machine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index de2d0babf5..ef5584f19f 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -35,7 +35,7 @@ #define CLEAR_CACHE(BEG,END) \ { \ register unsigned long _beg __asm ("a1") = (unsigned long)(BEG); \ - register unsigned long _end __asm ("a2") = (unsigned long)((END) - (BEG));\ + register unsigned long _end __asm ("a2") = (unsigned long)(END); \ register unsigned long _flg __asm ("a3") = 0; \ __asm __volatile ("swi 0x9f0002"); \ } From feaa2cd82b6e7d8c2811ac2529c0e3f6cb4e1ffb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 24 Dec 1999 05:47:47 +0000 Subject: [PATCH 1707/4487] Add __libc_lseek64, __libc_pread, __libc_pread64, __libc_pwrite and __libc_pwrite64. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 49f2b11a50..03030b6c45 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -22,9 +22,9 @@ vfork - vfork 0 __vfork vfork getpeername - getpeername 3 __getpeername getpeername getpriority - getpriority 2 __getpriority getpriority mmap - mmap 6 __mmap mmap __mmap64 mmap64 -llseek EXTRA lseek 3 __llseek llseek __lseek64 lseek64 -pread - pread 4 __pread pread __pread64 pread64 -pwrite - pwrite 4 __pwrite pwrite __pwrite64 pwrite64 +llseek EXTRA lseek 3 __libc_lseek64 __llseek llseek __lseek64 lseek64 +pread - pread 4 __libc_pread __libc_pread64 __pread pread __pread64 pread64 +pwrite - pwrite 4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64 fstatfs - fstatfs 2 __fstatfs fstatfs fstatfs64 statfs - statfs 2 __statfs statfs statfs64 getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64 From 0985e3b7171992a69253f956673de72bffe0ab9b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 27 Dec 1999 06:06:11 +0000 Subject: [PATCH 1708/4487] Remove vm86. Set argument count for `syscall' to 7. --- sysdeps/unix/sysv/linux/arm/syscalls.list | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/syscalls.list b/sysdeps/unix/sysv/linux/arm/syscalls.list index 08839db952..60303d3df7 100644 --- a/sysdeps/unix/sysv/linux/arm/syscalls.list +++ b/sysdeps/unix/sysv/linux/arm/syscalls.list @@ -11,5 +11,4 @@ s_setresgid setresgid setresgid 3 __syscall_setresgid s_setresuid setresuid setresuid 3 __syscall_setresuid s_setreuid setreuid setreuid 2 __syscall_setreuid s_setuid setuid setuid 1 __syscall_setuid -syscall - syscall 5 syscall -vm86 - vm86 1 __vm86 vm86 +syscall - syscall 7 syscall From 62749187ae455591bafd92a1f7e0deb46d210a2c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 27 Dec 1999 06:06:32 +0000 Subject: [PATCH 1709/4487] Add support for syscalls with more than five arguments. (DOARGS_5, UNDOARGS_5): Don't corrupt the calling stack frame. --- sysdeps/unix/sysv/linux/arm/sysdep.h | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index 7812e99075..cd83389f37 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 93, 95, 96, 97, 98 Free Software Foundation, Inc. +/* Copyright (C) 1992, 93, 95, 96, 97, 98, 99 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, , August 1995. ARM changes by Philip Blundell, , May 1997. @@ -69,6 +69,8 @@ arg 3 r2 arg 4 r3 arg 5 r4 (this is different from the APCS convention) + arg 6 r5 + arg 7 r6 The compiler is going to form a call by coming here, through PSEUDO, with arguments @@ -78,9 +80,12 @@ arg 3 r2 arg 4 r3 arg 5 [sp] + arg 6 [sp+4] + arg 7 [sp+8] - We need to shuffle values between R4 and the stack so that the caller's - R4 is not corrupted, and the kernel sees the right argument there. + We need to shuffle values between R4..R6 and the stack so that the + caller's v1..v3 and stack frame are not corrupted, and the kernel + sees the right arguments. */ @@ -95,14 +100,18 @@ #define DOARGS_2 /* nothing */ #define DOARGS_3 /* nothing */ #define DOARGS_4 /* nothing */ -#define DOARGS_5 ldr ip, [sp]; str r4, [sp]; mov r4, ip; +#define DOARGS_5 str r4, [sp, $-4]!; ldr r4, [sp, $4]; +#define DOARGS_6 mov ip, sp; stmfd sp!, {r4, r5}; ldmia ip, {r4, r5}; +#define DOARGS_7 mov ip, sp; stmfd sp!, {r4, r5, r6}; ldmia ip, {r4, r5, r6}; #define UNDOARGS_0 /* nothing */ #define UNDOARGS_1 /* nothing */ #define UNDOARGS_2 /* nothing */ #define UNDOARGS_3 /* nothing */ #define UNDOARGS_4 /* nothing */ -#define UNDOARGS_5 ldr r4, [sp]; +#define UNDOARGS_5 ldr r4, [sp, $4]!; +#define UNDOARGS_6 ldmfd sp!, {r4, r5}; +#define UNDOARGS_7 ldmfd sp!, {r4, r5, r6}; #else /* not __ASSEMBLER__ */ @@ -149,6 +158,14 @@ register int _v1 asm ("v1") = (int) (a5); \ LOAD_ARGS_4 (a1, a2, a3, a4) #define ASM_ARGS_5 ASM_ARGS_4, "r" (_v1) +#define LOAD_ARGS_6(a1, a2, a3, a4, a5, a6) \ + register int _v2 asm ("v2") = (int) (a6); \ + LOAD_ARGS_5 (a1, a2, a3, a4, a5) +#define ASM_ARGS_6 ASM_ARGS_5, "r" (_v2) +#define LOAD_ARGS_7(a1, a2, a3, a4, a5, a6, a7) \ + register int _v3 asm ("v3") = (int) (a7); \ + LOAD_ARGS_6 (a1, a2, a3, a4, a5, a6) +#define ASM_ARGS_7 ASM_ARGS_6, "r" (_v3) #endif /* __ASSEMBLER__ */ From 1be564e03ef9628ab0ef55d766ffea81a9d781be Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 27 Dec 1999 06:11:17 +0000 Subject: [PATCH 1710/4487] Remove inclusion of . --- sysdeps/unix/sysv/linux/mips/bits/resource.h | 1 - 1 file changed, 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/resource.h b/sysdeps/unix/sysv/linux/mips/bits/resource.h index feb9cc72d0..613b6bcc4c 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/resource.h +++ b/sysdeps/unix/sysv/linux/mips/bits/resource.h @@ -21,7 +21,6 @@ # error "Never use directly; include instead." #endif -#include #include /* Transmute defines to enumerations. The macro re-definitions are From 33ea3bcec3467989cc254b91aa52fbddab38871e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 28 Dec 1999 22:13:37 +0000 Subject: [PATCH 1711/4487] Remove oldgetrlimit and oldsetrlimit definitions. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 2 -- 1 file changed, 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 03030b6c45..8a86c7c76d 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -29,8 +29,6 @@ fstatfs - fstatfs 2 __fstatfs fstatfs fstatfs64 statfs - statfs 2 __statfs statfs statfs64 getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64 setrlimit - setrlimit 2 setrlimit setrlimit64 -oldgetrlimit EXTRA getrlimit 2 __old_getrlimit getrlimit@GLIBC_2.0 getrlimit64@GLIBC_2.1 -oldsetrlimit EXTRA setrlimit 2 __old_setrlimit setrlimit@GLIBC_2.0 setrlimit64@GLIBC_2.1 ftruncate - ftruncate 2 __ftruncate ftruncate ftruncate64 truncate - truncate 2 truncate truncate64 From 27cd2cbea62bf56d085b622ba9dc5192af1a33b8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 29 Dec 1999 17:50:32 +0000 Subject: [PATCH 1712/4487] Don't include ; remove K&R compatibility; add missing ints. --- sysdeps/unix/sysv/linux/alpha/sys/io.h | 45 ++++++++++++-------------- 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/sys/io.h b/sysdeps/unix/sysv/linux/alpha/sys/io.h index 208e793119..0095714148 100644 --- a/sysdeps/unix/sysv/linux/alpha/sys/io.h +++ b/sysdeps/unix/sysv/linux/alpha/sys/io.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1999 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,9 +23,6 @@ __BEGIN_DECLS -/* Get constants from kernel header files. */ -#include - /* If TURN_ON is TRUE, request for permission to do direct i/o on the port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O permission off for that range. This call requires root privileges. @@ -33,39 +30,39 @@ __BEGIN_DECLS Portability note: not all Linux platforms support this call. Most platforms based on the PC I/O architecture probably will, however. E.g., Linux/Alpha for Alpha PCs supports this. */ -extern int ioperm __P ((unsigned long int __from, unsigned long int __num, - int __turn_on)); +extern int ioperm (unsigned long int __from, unsigned long int __num, + int __turn_on) __THROW; /* Set the I/O privilege level to LEVEL. If LEVEL>3, permission to access any I/O port is granted. This call requires root privileges. */ -extern int iopl __P ((int __level)); +extern int iopl (int __level) __THROW; /* Return the physical address of the DENSE I/O memory or NULL if none is available (e.g. on a jensen). */ -extern unsigned long _bus_base __P ((void)) __attribute__ ((const)); -extern unsigned long bus_base __P ((void)) __attribute__ ((const)); +extern unsigned long int _bus_base (void) __THROW __attribute__ ((const)); +extern unsigned long int bus_base (void) __THROW __attribute__ ((const)); /* Return the physical address of the SPARSE I/O memory. */ -extern unsigned long _bus_base_sparse __P ((void)) __attribute__ ((const)); -extern unsigned long bus_base_sparse __P ((void)) __attribute__ ((const)); +extern unsigned long _bus_base_sparse (void) __THROW __attribute__ ((const)); +extern unsigned long bus_base_sparse (void) __THROW __attribute__ ((const)); /* Return the HAE shift used by the SPARSE I/O memory. */ -extern int _hae_shift __P ((void)) __attribute__ ((const)); -extern int hae_shift __P ((void)) __attribute__ ((const)); +extern int _hae_shift (void) __THROW __attribute__ ((const)); +extern int hae_shift (void) __THROW __attribute__ ((const)); /* Access PCI space protected from machine checks. */ -extern int pciconfig_read __P ((unsigned long int __bus, - unsigned long int __dfn, - unsigned long int __off, - unsigned long int __len, - unsigned char *__buf)); - -extern int pciconfig_write __P ((unsigned long int __bus, - unsigned long int __dfn, - unsigned long int __off, - unsigned long int __len, - unsigned char *__buf)); +extern int pciconfig_read (unsigned long int __bus, + unsigned long int __dfn, + unsigned long int __off, + unsigned long int __len, + unsigned char *__buf) __THROW; + +extern int pciconfig_write (unsigned long int __bus, + unsigned long int __dfn, + unsigned long int __off, + unsigned long int __len, + unsigned char *__buf) __THROW; __END_DECLS From ddd4d0151d4f64229cb384ba7a4eed79042e000e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 29 Dec 1999 17:50:45 +0000 Subject: [PATCH 1713/4487] Remove K&R compatibility, add missing ints. --- sysdeps/unix/sysv/linux/arm/sys/io.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/sys/io.h b/sysdeps/unix/sysv/linux/arm/sys/io.h index 9f9eebc6fb..96d54cd337 100644 --- a/sysdeps/unix/sysv/linux/arm/sys/io.h +++ b/sysdeps/unix/sysv/linux/arm/sys/io.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1998, 1999 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 @@ -26,22 +26,22 @@ __BEGIN_DECLS /* If TURN_ON is TRUE, request for permission to do direct i/o on the port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O permission off for that range. This call requires root privileges. */ -extern int ioperm __P ((unsigned long int __from, unsigned long int __num, - int __turn_on)); +extern int ioperm (unsigned long int __from, unsigned long int __num, + int __turn_on) __THROW; /* Set the I/O privilege level to LEVEL. If LEVEL is nonzero, permission to access any I/O port is granted. This call requires root privileges. */ -extern int iopl __P ((int __level)); +extern int iopl (int __level) __THROW; /* The functions that actually perform reads and writes. */ -extern unsigned char inb (unsigned long port); -extern unsigned short inw (unsigned long port); -extern unsigned long inl (unsigned long port); +extern unsigned char inb (unsigned long int port) __THROW; +extern unsigned short int inw (unsigned long int port) __THROW; +extern unsigned long int inl (unsigned long int port) __THROW; -extern void outb (unsigned char value, unsigned long port); -extern void outw (unsigned short value, unsigned long port); -extern void outl (unsigned long value, unsigned long port); +extern void outb (unsigned char value, unsigned long int port) __THROW; +extern void outw (unsigned short value, unsigned long int port) __THROW; +extern void outl (unsigned long value, unsigned long int port) __THROW; __END_DECLS From f549254adeb5b63dcaeb008a6f5d0bc5faacf4f6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 3 Jan 2000 03:50:21 +0000 Subject: [PATCH 1714/4487] Definitions for math on Arm. --- sysdeps/arm/fpu/bits/mathdef.h | 54 ++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 sysdeps/arm/fpu/bits/mathdef.h diff --git a/sysdeps/arm/fpu/bits/mathdef.h b/sysdeps/arm/fpu/bits/mathdef.h new file mode 100644 index 0000000000..cb0c348374 --- /dev/null +++ b/sysdeps/arm/fpu/bits/mathdef.h @@ -0,0 +1,54 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#if !defined _MATH_H && !defined _COMPLEX_H +# error "Never use directly; include instead" +#endif + +#if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF +# define _MATH_H_MATHDEF 1 + +/* GCC does not promote `float' values to `double'. */ +typedef float float_t; /* `float' expressions are evaluated as + `float'. */ +typedef double double_t; /* `double' expressions are evaluated as + `double'. */ + +/* Signal that types stay as they were declared. */ +# define FLT_EVAL_METHOD 0 + +/* Define `INFINITY' as value of type `float'. */ +# define INFINITY HUGE_VALF + + +/* The values returned by `ilogb' for 0 and NaN respectively. */ +# define FP_ILOGB0 0x80000001 +# define FP_ILOGBNAN 0x7fffffff + +/* Number of decimal digits for the `double' type. */ +# define DECIMAL_DIG 15 + +#endif /* ISO C99 */ + +#ifndef __NO_LONG_DOUBLE_MATH +/* Signal that we do not really have a `long double'. This disables the + declaration of all the `long double' function variants. */ +/* XXX The FPA does support this but the patterns in GCC are currently + turned off. */ +# define __NO_LONG_DOUBLE_MATH 1 +#endif From 7aacf7acd57ca48404697e6e23c9107f7cd7fe04 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 3 Jan 2000 16:58:49 +0000 Subject: [PATCH 1715/4487] (_HAVE_STRING_ARCH_mempcpy): Define. --- sysdeps/arm/bits/string.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sysdeps/arm/bits/string.h b/sysdeps/arm/bits/string.h index 4ca2e307a1..094f90192d 100644 --- a/sysdeps/arm/bits/string.h +++ b/sysdeps/arm/bits/string.h @@ -1,5 +1,5 @@ /* Optimized, inlined string functions. ARM version. - Copyright (C) 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 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 @@ -22,6 +22,10 @@ #endif /* We must defeat the generic optimized versions of these functions in - since they don't work on the ARM. */ + since they don't work on the ARM. This is because + the games they play with the __STRING2_COPY_ARR# structures fail + when structs are always 32-bit aligned. + XXX Should provide suitably optimal replacements. */ #define _HAVE_STRING_ARCH_strcpy 1 #define _HAVE_STRING_ARCH_stpcpy 1 +#define _HAVE_STRING_ARCH_mempcpy 1 From 51e2a98075328233f0b513749bd4ac9feed9d262 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 3 Jan 2000 23:20:42 +0000 Subject: [PATCH 1716/4487] Remove mmap64 alias. Optimise error handling a little. --- sysdeps/unix/sysv/linux/arm/mmap.S | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/mmap.S b/sysdeps/unix/sysv/linux/arm/mmap.S index fcff57c55d..31d57e4a4d 100644 --- a/sysdeps/unix/sysv/linux/arm/mmap.S +++ b/sysdeps/unix/sysv/linux/arm/mmap.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 1998, 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 @@ -23,12 +23,12 @@ ENTRY (__mmap) /* Because we can only get five args through the syscall interface, and - mmap() takes six, we need to build a parameter block and pass its + mmap() takes six, we need to build a parameter block and pass its address instead. The 386 port does a similar trick. */ /* This code previously moved sp into ip and stored the args using - stmdb ip!, {a1-a4}. It did not modify sp, so the stack never had - to be restored after the syscall completed. It saved an + stmdb ip!, {a1-a4}. It did not modify sp, so the stack never had + to be restored after the syscall completed. It saved an instruction and meant no stack cleanup work was required. This will not work in the case of a mmap call being interrupted @@ -47,10 +47,9 @@ ENTRY (__mmap) add sp, sp, #16 cmn r0, $4096 - bhs PLTJMP(syscall_error); - ret + RETINSTR(movcc, pc, lr) + b PLTJMP(syscall_error); PSEUDO_END (__mmap) weak_alias (__mmap, mmap) -weak_alias (__mmap, mmap64) From 51fa0bed7611384d56f512311e1e0d1776ee159d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 3 Jan 2000 23:21:18 +0000 Subject: [PATCH 1717/4487] Linux/Arm mmap64 implementation. --- sysdeps/unix/sysv/linux/arm/mmap64.S | 66 ++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/mmap64.S diff --git a/sysdeps/unix/sysv/linux/arm/mmap64.S b/sysdeps/unix/sysv/linux/arm/mmap64.S new file mode 100644 index 0000000000..604bb76137 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/mmap64.S @@ -0,0 +1,66 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +#define EINVAL 22 + + /* The mmap2 system call takes six arguments, all in registers. */ + .text +ENTRY (__mmap64) +#ifdef __NR_mmap2 + stmfd sp!, {r4, r5, lr} + ldr r5, [sp, $16] + ldr r4, [sp, $12] + movs ip, r5, lsl $20 @ check that offset is page-aligned + bne .Linval + ldr ip, [sp, $20] + mov r5, r5, lsr $12 + orr r5, r5, ip, lsl $20 @ compose page offset + movs ip, ip, lsr $12 + bne .Linval @ check for overflow + mov ip, r0 + swi SYS_ify (mmap2) + cmn r0, $4096 + LOADREGS(ccfd, sp!, {r4, r5, pc}) + teq r0, $-ENOSYS + ldmnefd sp!, {r4, r5, lr} + bne PLTJMP(syscall_error) + /* The current kernel does not support mmap2. Fall back to plain + mmap if the offset is small enough. */ + ldr r5, [sp, $20] + mov r0, ip @ first arg was clobbered + teq r5, $0 + ldmeqfd sp!, {r4, r5, lr} + beq PLTJMP(__mmap) +.Linval: + mov r0, $-EINVAL + ldmfd sp!, {r4, r5, lr} + b PLTJMP(syscall_error) +#else + /* The kernel headers do not support mmap2. Fall back to plain + mmap if the offset is small enough. */ + ldr ip, [sp, $8] + teq ip, $0 + beq PLTJMP(__mmap) + mov r0, $-EINVAL + b PLTJMP(syscall_error) +#endif +PSEUDO_END (__mmap64) + +weak_alias (__mmap64, mmap64) From aba7548814035d328cfbd9b59d3981b6620dbe6f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 4 Jan 2000 23:54:35 +0000 Subject: [PATCH 1718/4487] Use sysctl by preference to obtain port mapping information. Avoid use of mprotect. --- sysdeps/unix/sysv/linux/arm/ioperm.c | 63 ++++++++++++++++------------ 1 file changed, 37 insertions(+), 26 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/ioperm.c b/sysdeps/unix/sysv/linux/arm/ioperm.c index 260226d9f3..f4c9322823 100644 --- a/sysdeps/unix/sysv/linux/arm/ioperm.c +++ b/sysdeps/unix/sysv/linux/arm/ioperm.c @@ -27,6 +27,12 @@ registers tend to be memory mapped these days so this should be no big problem. */ +/* Once upon a time this file used mprotect to enable and disable + access to particular areas of I/O space. Unfortunately the + mprotect syscall also has the side effect of enabling caching for + the area affected (this is a kernel limitation). So we now just + enable all the ports all of the time. */ + #include #include #include @@ -39,6 +45,7 @@ #include #include +#include #define PATH_ARM_SYSTYPE "/etc/arm_systype" #define PATH_CPUINFO "/proc/cpuinfo" @@ -69,16 +76,22 @@ static struct platform { #define IO_ADDR(port) (io.base + ((port) << io.shift)) /* - * Initialize I/O system. To determine what I/O system we're dealing - * with, we first try to read the value of symlink PATH_ARM_SYSTYPE, - * if that fails, we lookup the "system type" field in /proc/cpuinfo. - * If that fails as well, we give up. Other possible options might be - * to look at the ELF auxiliary vector or to add a special system call - * but there is probably no point. + * Initialize I/O system. There are several ways to get the information + * we need. Each is tried in turn until one succeeds. + * + * 1. Sysctl (CTL_BUS, BUS_ISA, ISA_*). This is the preferred method + * but not all kernels support it. + * + * 2. Read the value (not the contents) of symlink PATH_ARM_SYSTYPE. + * - If it matches one of the entries in the table above, use the + * corresponding values. + * - If it begins with a number, assume this is a previously + * unsupported system and the values encode, in order, + * ",". * - * If the value received from PATH_ARM_SYSTYPE begins with a number, - * assume this is a previously unsupported system and the values encode, - * in order, ",". + * 3. Lookup the "system type" field in /proc/cpuinfo. Again, if it + * matches an entry in the platform[] table, use the corresponding + * values. */ static int @@ -86,6 +99,16 @@ init_iosys (void) { char systype[256]; int i, n; + static int iobase_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_BASE }; + static int ioshift_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_SHIFT }; + size_t len = sizeof(io.base); + + if (! sysctl (iobase_name, 3, &io.io_base, &len, NULL, 0) + && ! sysctl (ioshift_name, 3, &io.shift, &len, NULL, 0)) + { + io.initdone = 1; + return 0; + } n = readlink (PATH_ARM_SYSTYPE, systype, sizeof (systype) - 1); if (n > 0) @@ -106,7 +129,7 @@ init_iosys (void) FILE * fp; fp = fopen (PATH_CPUINFO, "r"); - if (!fp) + if (! fp) return -1; while ((n = fscanf (fp, "Hardware\t: %256[^\n]\n", systype)) != EOF) @@ -149,10 +172,7 @@ init_iosys (void) int _ioperm (unsigned long int from, unsigned long int num, int turn_on) { - unsigned long int addr, len; - int prot; - - if (!io.initdone && init_iosys () < 0) + if (! io.initdone && init_iosys () < 0) return -1; /* this test isn't as silly as it may look like; consider overflows! */ @@ -173,25 +193,16 @@ _ioperm (unsigned long int from, unsigned long int num, int turn_on) return -1; io.base = - (unsigned long int) __mmap (0, MAX_PORT << io.shift, PROT_NONE, + (unsigned long int) __mmap (0, MAX_PORT << io.shift, + PROT_READ | PROT_WRITE, MAP_SHARED, fd, io.io_base); close (fd); if ((long) io.base == -1) return -1; } - prot = PROT_READ | PROT_WRITE; } - else - { - if (!io.base) - return 0; /* never was turned on... */ - /* turnoff access to relevant pages: */ - prot = PROT_NONE; - } - addr = (io.base + (from << io.shift)) & PAGE_MASK; - len = num << io.shift; - return mprotect ((void *) addr, len, prot); + return 0; } From a60ba9f602b91aa3eea871a3f31403c96634c8a8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 6 Jan 2000 00:02:54 +0000 Subject: [PATCH 1719/4487] Arm specific stack layout description. --- sysdeps/arm/frame.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 sysdeps/arm/frame.h diff --git a/sysdeps/arm/frame.h b/sysdeps/arm/frame.h new file mode 100644 index 0000000000..16f329c0e5 --- /dev/null +++ b/sysdeps/arm/frame.h @@ -0,0 +1,26 @@ +/* Definition of stack frame structure. ARM/APCS version. + Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* This is the APCS stack backtrace structure. */ +struct layout +{ + struct layout *next; + void *sp; + void *return_address; +}; From 2c545e4b420889924b6942465be70821b64b3813 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 6 Jan 2000 00:04:04 +0000 Subject: [PATCH 1720/4487] (ADVANCE_STACK_FRAME): New macro. (GET_FRAME): Apply above to returned value. --- sysdeps/unix/sysv/linux/arm/sigcontextinfo.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h b/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h index 7f6ecbdee1..1aaca1e155 100644 --- a/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h +++ b/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h @@ -24,7 +24,10 @@ #define GET_PC(ctx) ((void *)((ctx.v20.magic == SIGCONTEXT_2_0_MAGIC) ? \ ctx.v20.reg.ARM_pc : ctx.v21.arm_pc)) -#define GET_FRAME(ctx) ((void *)((ctx.v20.magic == SIGCONTEXT_2_0_MAGIC) ? \ +#define GET_FRAME(ctx) \ + ADVANCE_STACK_FRAME((void *)((ctx.v20.magic == SIGCONTEXT_2_0_MAGIC) ? \ ctx.v20.reg.ARM_fp : ctx.v21.arm_fp)) #define GET_STACK(ctx) ((void *)((ctx.v20.magic == SIGCONTEXT_2_0_MAGIC) ? \ ctx.v20.reg.ARM_sp : ctx.v21.arm_sp)) +#define ADVANCE_STACK_FRAME(frm) \ + ((struct layout *)frm - 1) From 84232695106b134d39ca3a24ced6541bd2046f28 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 6 Jan 2000 00:07:38 +0000 Subject: [PATCH 1721/4487] Add `fault_address'. --- sysdeps/unix/sysv/linux/arm/bits/armsigctx.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h b/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h index 3435a961bc..636a93bd95 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h +++ b/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h @@ -1,5 +1,5 @@ /* Definition of `struct sigcontext' for Linux/ARM - Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1996, 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 @@ -21,6 +21,12 @@ Fortunately 2.0 puts a magic number in the first word and this is not a legal value for `trap_no', so we can tell them apart. */ +/* Early 2.2 and 2.3 kernels do not have the `fault_address' member in + the sigcontext structure. Unfortunately there is no reliable way + to test for its presence and this word will contain garbage for too-old + kernels. Versions 2.2.14 and 2.3.35 (plus later versions) are known to + include this element. */ + #ifndef __ARMSIGCTX_H #define __ARMSIGCTX_H 1 @@ -50,6 +56,7 @@ union k_sigcontext unsigned long int arm_lr; unsigned long int arm_pc; unsigned long int arm_cpsr; + unsigned long fault_address; } v21; struct { From 9a7c1b605a8bbdfdcd698333154b25975963b2b5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 6 Jan 2000 04:34:45 +0000 Subject: [PATCH 1722/4487] Distribute sys/elf.h and sys/procfs.h. --- sysdeps/unix/sysv/linux/arm/Dist | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/unix/sysv/linux/arm/Dist b/sysdeps/unix/sysv/linux/arm/Dist index 28e86426ec..73fd68e2b4 100644 --- a/sysdeps/unix/sysv/linux/arm/Dist +++ b/sysdeps/unix/sysv/linux/arm/Dist @@ -7,5 +7,7 @@ setfsuid.c setfsgid.c sigrestorer.S bits/armsigctx.h +sys/elf.h sys/io.h +sys/procfs.h sys/user.h From 9b1eef96d27c9b204feb6af835259962bc53c934 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 10 Jan 2000 01:42:43 +0000 Subject: [PATCH 1723/4487] (CLEAR_CACHE): System calls clobber R0. (dl_platform_init): Allow _dl_platform to be NULL. --- sysdeps/arm/dl-machine.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index ef5584f19f..78341fc49a 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -37,7 +37,10 @@ register unsigned long _beg __asm ("a1") = (unsigned long)(BEG); \ register unsigned long _end __asm ("a2") = (unsigned long)(END); \ register unsigned long _flg __asm ("a3") = 0; \ - __asm __volatile ("swi 0x9f0002"); \ + __asm __volatile ("swi 0x9f0002 @ sys_cacheflush" \ + : /* no outputs */ \ + : /* no inputs */ \ + : "a1"); \ } /* Return nonzero iff E_MACHINE is compatible with the running host. */ @@ -350,10 +353,9 @@ extern const char *_dl_platform; static inline void __attribute__ ((unused)) dl_platform_init (void) { - if (_dl_platform == NULL) - /* We default to ARM - This is where processors could be distinguished arm2, arm6, sa110, etc */ - _dl_platform = "ARM"; + if (_dl_platform != NULL && *_dl_platform == '\0') + /* Avoid an empty string which would disturb us. */ + _dl_platform = NULL; } static inline void From 13270773aced41152dae31fa481b877817c9b452 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 10 Jan 2000 01:43:13 +0000 Subject: [PATCH 1724/4487] (UNDOARGS_5): Fix error in last change. --- sysdeps/unix/sysv/linux/arm/sysdep.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index cd83389f37..c337af2b14 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 93, 95, 96, 97, 98, 99 Free Software Foundation, Inc. +/* Copyright (C) 1992, 93, 95-99, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, , August 1995. ARM changes by Philip Blundell, , May 1997. @@ -109,7 +109,7 @@ #define UNDOARGS_2 /* nothing */ #define UNDOARGS_3 /* nothing */ #define UNDOARGS_4 /* nothing */ -#define UNDOARGS_5 ldr r4, [sp, $4]!; +#define UNDOARGS_5 ldr r4, [sp], $4; #define UNDOARGS_6 ldmfd sp!, {r4, r5}; #define UNDOARGS_7 ldmfd sp!, {r4, r5, r6}; From 93b2a8e75197568ac47fc92c2f104c255cbf2415 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 10 Jan 2000 11:44:24 +0000 Subject: [PATCH 1725/4487] 2000-01-10 Andreas Jaeger * sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h: Add missing int's. * sysdeps/unix/sysv/linux/mips/sys/acct.h: Remove K&R support, add missing int's. * sysdeps/unix/sysv/linux/mips/bits/errno.h: Remove K&R support. * sysdeps/unix/sysv/linux/mips/bits/ipc.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/siginfo.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/socket.h: Likewise. * sysdeps/unix/sysv/linux/mips/sys/cachectl.h: Likewise. * sysdeps/unix/sysv/linux/mips/sys/sysmips.h: Likewise. --- sysdeps/unix/sysv/linux/mips/bits/errno.h | 4 ++-- .../unix/sysv/linux/mips/bits/ioctl-types.h | 18 +++++++++--------- sysdeps/unix/sysv/linux/mips/bits/ipc.h | 6 +++--- sysdeps/unix/sysv/linux/mips/bits/sigaction.h | 6 +++--- sysdeps/unix/sysv/linux/mips/bits/siginfo.h | 6 +++--- sysdeps/unix/sysv/linux/mips/bits/socket.h | 10 +++++----- sysdeps/unix/sysv/linux/mips/sys/acct.h | 8 ++++---- sysdeps/unix/sysv/linux/mips/sys/cachectl.h | 10 +++++----- sysdeps/unix/sysv/linux/mips/sys/sysmips.h | 6 +++--- 9 files changed, 37 insertions(+), 37 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/errno.h b/sysdeps/unix/sysv/linux/mips/bits/errno.h index 7782c0ba90..c45829a18c 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/errno.h +++ b/sysdeps/unix/sysv/linux/mips/bits/errno.h @@ -1,5 +1,5 @@ /* Error constants. MIPS/Linux specific version. - Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1996, 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 @@ -32,7 +32,7 @@ extern int errno; /* Function to get address of global `errno' variable. */ -extern int *__errno_location __P ((void)) __attribute__ ((__const__)); +extern int *__errno_location (void) __THROW __attribute__ ((__const__)); # if defined _LIBC /* We wouldn't need a special macro anymore but it is history. */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h b/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h index 7959570146..573f9e7ca3 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h +++ b/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h @@ -1,5 +1,5 @@ /* Structure types for pre-termios terminal ioctls. Linux/MIPS version. - Copyright (C) 1997, 1999 Free Software Foundation, Inc. + Copyright (C) 1997, 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 @@ -26,19 +26,19 @@ struct winsize { - unsigned short ws_row; - unsigned short ws_col; - unsigned short ws_xpixel; - unsigned short ws_ypixel; + unsigned short int ws_row; + unsigned short int ws_col; + unsigned short int ws_xpixel; + unsigned short int ws_ypixel; }; #define NCC 8 struct termio { - unsigned short c_iflag; /* input mode flags */ - unsigned short c_oflag; /* output mode flags */ - unsigned short c_cflag; /* control mode flags */ - unsigned short c_lflag; /* local mode flags */ + unsigned short int c_iflag; /* input mode flags */ + unsigned short int c_oflag; /* output mode flags */ + unsigned short int c_cflag; /* control mode flags */ + unsigned short int c_lflag; /* local mode flags */ char c_line; /* line discipline */ /* Yes, this is really NCCS. */ unsigned char c_cc[32 /* NCCS */]; /* control characters */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/ipc.h b/sysdeps/unix/sysv/linux/mips/bits/ipc.h index 5c36d99ef8..3c2e5276b8 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/ipc.h +++ b/sysdeps/unix/sysv/linux/mips/bits/ipc.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1995, 96, 97, 98, 99, 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 @@ -53,8 +53,8 @@ struct ipc_perm __BEGIN_DECLS /* The actual system call: all functions are multiplexed by this. */ -extern int __ipc __P ((int __call, int __first, int __second, int __third, - void *__ptr)); +extern int __ipc (int __call, int __first, int __second, int __third, + void *__ptr) __THROW; __END_DECLS diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h index 963b425f48..04179d2982 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h +++ b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h @@ -1,5 +1,5 @@ /* The proper definitions for Linux/MIPS's sigaction. - Copyright (C) 1993, 94, 95, 97, 98, 99 Free Software Foundation, Inc. + Copyright (C) 1993,94,95,97,98,99,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 @@ -34,7 +34,7 @@ struct sigaction /* Used if SA_SIGINFO is not set. */ __sighandler_t sa_handler; /* Used if SA_SIGINFO is set. */ - void (*sa_sigaction) __PMT ((int, siginfo_t *, void *)); + void (*sa_sigaction) (int, siginfo_t *, void *); } __sigaction_handler; # define sa_handler __sigaction_handler.sa_handler @@ -47,7 +47,7 @@ struct sigaction /* The ABI says here are two unused ints following. */ /* Restore handler. */ - void (*sa_restorer) __PMT ((void)); + void (*sa_restorer) (void); #if _MIPS_ISA == _MIPS_ISA_MIPS1 || _MIPS_ISA == _MIPS_ISA_MIPS2 int sa_resv[1]; diff --git a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h index d1418692f3..9d348acb99 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h +++ b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h @@ -1,5 +1,5 @@ /* siginfo_t, sigevent and constants. Linux version. - Copyright (C) 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 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 @@ -258,8 +258,8 @@ typedef struct sigevent struct { - void (*_function) __PMT ((sigval_t)); /* Function to start. */ - void *_attribute; /* Really pthread_attr_t. */ + void (*_function) (sigval_t); /* Function to start. */ + void *_attribute; /* Really pthread_attr_t. */ } _sigev_thread; } _sigev_un; } sigevent_t; diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h index 74f54e87bd..747b11905d 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/socket.h +++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h @@ -1,5 +1,5 @@ /* System-specific socket constants and types. Linux/MIPS version. - Copyright (C) 1991,92,94,95,96,97,98,99 Free Software Foundation, Inc. + Copyright (C) 1991,92,94,95,96,97,98,99,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 @@ -203,13 +203,13 @@ enum `sendmsg' and received by `recvmsg'. */ struct msghdr { - __ptr_t msg_name; /* Address to send to/receive from. */ + void *msg_name; /* Address to send to/receive from. */ socklen_t msg_namelen; /* Length of address data. */ struct iovec *msg_iov; /* Vector of data to send/receive into. */ size_t msg_iovlen; /* Number of elements in the vector. */ - __ptr_t msg_control; /* Ancillary data (eg BSD filedesc passing). */ + void *msg_control; /* Ancillary data (eg BSD filedesc passing). */ size_t msg_controllen; /* Ancillary data buffer length. */ int msg_flags; /* Flags on received message. */ @@ -244,8 +244,8 @@ struct cmsghdr + CMSG_ALIGN (sizeof (struct cmsghdr))) #define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len)) -extern struct cmsghdr *__cmsg_nxthdr __P ((struct msghdr *__mhdr, - struct cmsghdr *__cmsg)); +extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr, + struct cmsghdr *__cmsg) __THROW; #ifdef __USE_EXTERN_INLINES # ifndef _EXTERN_INLINE # define _EXTERN_INLINE extern __inline diff --git a/sysdeps/unix/sysv/linux/mips/sys/acct.h b/sysdeps/unix/sysv/linux/mips/sys/acct.h index ee596db82b..a17153c217 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/acct.h +++ b/sysdeps/unix/sysv/linux/mips/sys/acct.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997 Free Software Foundation, Inc. +/* Copyright (C) 1997, 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 @@ -36,8 +36,8 @@ struct acct time_t ac_stime; /* Accounting system time. */ time_t ac_etime; /* Accounting elapsed time. */ time_t ac_btime; /* Beginning time. */ - long ac_uid; /* Accounting user ID. */ - long ac_gid; /* Accounting group ID. */ + long int ac_uid; /* Accounting user ID. */ + long int ac_gid; /* Accounting group ID. */ unsigned long int ac_tty; /* Controlling tty. */ /* Please note that the value of the `ac_tty' field, a device number, is encoded differently in the kernel and for the libc dev_t type. */ @@ -59,7 +59,7 @@ enum /* Switch process accounting on and off. */ -extern int acct __P ((__const char *__filename)); +extern int acct (__const char *__filename) __THROW; __END_DECLS diff --git a/sysdeps/unix/sysv/linux/mips/sys/cachectl.h b/sysdeps/unix/sysv/linux/mips/sys/cachectl.h index 740c24d6a8..3bbd47cfb4 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/cachectl.h +++ b/sysdeps/unix/sysv/linux/mips/sys/cachectl.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 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 @@ -29,13 +29,13 @@ __BEGIN_DECLS #ifdef __USE_MISC -extern int cachectl __P ((void *addr, __const int nbytes, __const int op)); +extern int cachectl (void *addr, __const int nbytes, __const int op) __THROW; #endif -extern int __cachectl __P ((void *addr, __const int nbytes, __const int op)); +extern int __cachectl (void *addr, __const int nbytes, __const int op) __THROW; #ifdef __USE_MISC -extern int cacheflush __P ((void *addr, __const int nbytes, __const int op)); +extern int cacheflush (void *addr, __const int nbytes, __const int op) __THROW; #endif -extern int _flush_cache __P ((char *addr, __const int nbytes, __const int op)); +extern int _flush_cache (char *addr, __const int nbytes, __const int op) __THROW; __END_DECLS diff --git a/sysdeps/unix/sysv/linux/mips/sys/sysmips.h b/sysdeps/unix/sysv/linux/mips/sys/sysmips.h index cbb7eba2b4..8afb149eb9 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/sysmips.h +++ b/sysdeps/unix/sysv/linux/mips/sys/sysmips.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 92, 94, 95, 96, 97 Free Software Foundation, Inc. +/* Copyright (C) 1991, 92, 94, 95, 96, 97, 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,8 +28,8 @@ __BEGIN_DECLS -extern int sysmips __P ((__const int cmd, __const int arg1, - __const int arg2, __const int arg3)); +extern int sysmips (__const int cmd, __const int arg1, + __const int arg2, __const int arg3) __THROW; __END_DECLS From 7e61a4b7b9dc71869c315c19e8aed80c2ec731b9 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 10 Jan 2000 12:33:45 +0000 Subject: [PATCH 1726/4487] 2000-01-10 Andreas Jaeger * sysdeps/mips/Implies: Add wordsize-32. --- sysdeps/mips/Implies | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/mips/Implies b/sysdeps/mips/Implies index 8c18cb3034..9f60963329 100644 --- a/sysdeps/mips/Implies +++ b/sysdeps/mips/Implies @@ -1,3 +1,4 @@ +wordsize-32 # MIPS uses IEEE 754 floating point. ieee754/flt-32 ieee754/dbl-64 From 94e6a9a2e0e8d92852a7ef383b81b79eac544366 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 10 Jan 2000 14:27:50 +0000 Subject: [PATCH 1727/4487] 2000-01-10 Andreas Jaeger * sysdeps/unix/sysv/linux/mips/sys/procfs.h: Remove greg_t, gregset_t, fpregset_t, and NGREG definitions. --- sysdeps/unix/sysv/linux/mips/sys/procfs.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/sys/procfs.h b/sysdeps/unix/sysv/linux/mips/sys/procfs.h index 7e17bc0c40..414e60e4d9 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/mips/sys/procfs.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 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 @@ -40,10 +40,6 @@ struct elf_siginfo int si_errno; /* Errno. */ }; -typedef elf_greg_t greg_t; -typedef elf_gregset_t gregset_t; -typedef elf_fpregset_t fpregset_t; -#define NGREG ELF_NGREG /* Definitions to generate Intel SVR4-like core files. These mostly have the same names as the SVR4 types with "elf_" tacked on the From be57c15a96c8c563f9cc8353bce14eec78a8128d Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 10 Jan 2000 17:34:40 +0000 Subject: [PATCH 1728/4487] 2000-01-10 Andreas Jaeger * sysdeps/mips/dl-machine.h (elf_machine_matches_host): Follow change from 1999-10-07 to elf/elf.h and rename EM_MIPS_RS4_BE to EM_MIPS_RS3_LE. * sysdeps/mips/mips64/dl-machine.h: Likewise. --- sysdeps/mips/dl-machine.h | 4 ++-- sysdeps/mips/mips64/dl-machine.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 7761100455..f7a1a6d4c0 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. MIPS version. - Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Kazumoto Kojima . @@ -84,7 +84,7 @@ elf_machine_matches_host (ElfW(Half) e_machine) switch (e_machine) { case EM_MIPS: - case EM_MIPS_RS4_BE: + case EM_MIPS_RS3_LE: return 1; default: return 0; diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h index 3dc97eb1ed..fe4667a87d 100644 --- a/sysdeps/mips/mips64/dl-machine.h +++ b/sysdeps/mips/mips64/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. MIPS version. - Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Kazumoto Kojima . @@ -84,7 +84,7 @@ elf_machine_matches_host (ElfW(Half) e_machine) switch (e_machine) { case EM_MIPS: - case EM_MIPS_RS4_BE: + case EM_MIPS_RS3_LE: return 1; default: return 0; From f81825597154caf652683efff52ae2bc3eb71b20 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 11 Jan 2000 17:12:43 +0000 Subject: [PATCH 1729/4487] 2000-01-11 Andreas Schwab * sysdeps/mips/__longjmp.c (__longjmp): Change call to abort into infinite loop to avoid pulling in stdio in the dynamic linker. --- sysdeps/mips/__longjmp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sysdeps/mips/__longjmp.c b/sysdeps/mips/__longjmp.c index 9b4c1e14e0..e9ef5cff3d 100644 --- a/sysdeps/mips/__longjmp.c +++ b/sysdeps/mips/__longjmp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1995, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995, 1997, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -79,5 +79,6 @@ __longjmp (env, val_arg) asm volatile ("j $31"); - abort (); + /* Avoid `volatile function does return' warnings. */ + for (;;); } From 6959849dcf5c8fab650e95b917b4bf9eb35a0761 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 11 Jan 2000 18:08:15 +0000 Subject: [PATCH 1730/4487] 2000-01-11 Andreas Schwab * sysdeps/mips/__longjmp.c (__longjmp): Change call to abort into infinite loop to avoid pulling in stdio in the dynamic linker. * sysdeps/mips/mips64/__longjmp.c (__longjmp): Likewise. --- sysdeps/mips/mips64/__longjmp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sysdeps/mips/mips64/__longjmp.c b/sysdeps/mips/mips64/__longjmp.c index 551daa4895..28fef4720b 100644 --- a/sysdeps/mips/mips64/__longjmp.c +++ b/sysdeps/mips/mips64/__longjmp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1995, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995, 1997, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -81,5 +81,6 @@ __longjmp (env, val_arg) asm volatile ("j $31"); - abort (); + /* Avoid `volatile function does return' warnings. */ + for (;;); } From a4d6b8eb3953483dfe899295661e41d6d13f833a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 12 Jan 2000 10:21:37 +0000 Subject: [PATCH 1731/4487] [subdir=resource] (sysdep_routines): Add oldgetrlimit64, oldsetrlimit64. [subdir=misc] (sysdep_headers): Add sys/elf.h. --- sysdeps/unix/sysv/linux/arm/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile index 99a560c859..79eff05b90 100644 --- a/sysdeps/unix/sysv/linux/arm/Makefile +++ b/sysdeps/unix/sysv/linux/arm/Makefile @@ -1,5 +1,6 @@ ifeq ($(subdir),misc) sysdep_routines += setfsgid setfsuid setresgid setresuid ioperm +sysdep_headers += sys/elf.h endif ifeq ($(subdir),signal) @@ -7,3 +8,7 @@ sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \ rt_sigqueueinfo rt_sigaction rt_sigpending \ sigrestorer endif + +ifeq ($(subdir),resource) +sysdep_routines += oldgetrlimit64 oldsetrlimit64 +endif From 13e885e2d20716e76f1a9c81108a0cf8141c970f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 12 Jan 2000 10:21:53 +0000 Subject: [PATCH 1732/4487] Add oldgetrlimit, oldsetrlimit. --- sysdeps/unix/sysv/linux/arm/syscalls.list | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/unix/sysv/linux/arm/syscalls.list b/sysdeps/unix/sysv/linux/arm/syscalls.list index 60303d3df7..53da8bbb7d 100644 --- a/sysdeps/unix/sysv/linux/arm/syscalls.list +++ b/sysdeps/unix/sysv/linux/arm/syscalls.list @@ -12,3 +12,5 @@ s_setresuid setresuid setresuid 3 __syscall_setresuid s_setreuid setreuid setreuid 2 __syscall_setreuid s_setuid setuid setuid 1 __syscall_setuid syscall - syscall 7 syscall +oldgetrlimit EXTRA getrlimit 2 __old_getrlimit getrlimit@GLIBC_2.0 +oldsetrlimit EXTRA setrlimit 2 __old_setrlimit setrlimit@GLIBC_2.0 From b7b89e455b5c1177adf443ab37a895a16612a9d9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 12 Jan 2000 10:22:08 +0000 Subject: [PATCH 1733/4487] Add getrlimit, setrlimit, getrlimit64, setrlimit64 for GLIBC_2.1.3. --- sysdeps/unix/sysv/linux/arm/Versions | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysdeps/unix/sysv/linux/arm/Versions b/sysdeps/unix/sysv/linux/arm/Versions index 3a412cc3a3..39f209f086 100644 --- a/sysdeps/unix/sysv/linux/arm/Versions +++ b/sysdeps/unix/sysv/linux/arm/Versions @@ -4,4 +4,8 @@ libc { inb; inw; inl; outb; outw; outl; } + GLIBC_2.1.3 { + # New rlimit interface + getrlimit; setrlimit; getrlimit64; setrlimit64; + } } From b97b0e6d544851cc96473e1702352edb8ec4616f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 12 Jan 2000 10:23:30 +0000 Subject: [PATCH 1734/4487] Linux/Arm specific setrlimit implementation. --- sysdeps/unix/sysv/linux/arm/setrlimit.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/arm/setrlimit.c diff --git a/sysdeps/unix/sysv/linux/arm/setrlimit.c b/sysdeps/unix/sysv/linux/arm/setrlimit.c new file mode 100644 index 0000000000..bfaef74c38 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/setrlimit.c @@ -0,0 +1 @@ +#include From ee122dfb5cfd2fcab67ee1e68f64e24092aba8b0 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 12 Jan 2000 10:23:41 +0000 Subject: [PATCH 1735/4487] Linux/Arm specific getrlimit implementation. --- sysdeps/unix/sysv/linux/arm/getrlimit.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/arm/getrlimit.c diff --git a/sysdeps/unix/sysv/linux/arm/getrlimit.c b/sysdeps/unix/sysv/linux/arm/getrlimit.c new file mode 100644 index 0000000000..fc06dbd641 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/getrlimit.c @@ -0,0 +1 @@ +#include From 7857dde8f38ad54f624138973435fbed820c7aca Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 12 Jan 2000 10:23:51 +0000 Subject: [PATCH 1736/4487] Linux/Arm specific getrlimit64 implementation. --- sysdeps/unix/sysv/linux/arm/getrlimit64.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/arm/getrlimit64.c diff --git a/sysdeps/unix/sysv/linux/arm/getrlimit64.c b/sysdeps/unix/sysv/linux/arm/getrlimit64.c new file mode 100644 index 0000000000..fef018f471 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/getrlimit64.c @@ -0,0 +1 @@ +#include From 9b0b5c11789b357756836854edbd1f3bdbf7c66b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 12 Jan 2000 10:24:10 +0000 Subject: [PATCH 1737/4487] Linux/Arm specific setrlimit64 implementation. --- sysdeps/unix/sysv/linux/arm/oldsetrlimit64.c | 1 + sysdeps/unix/sysv/linux/arm/setrlimit64.c | 1 + 2 files changed, 2 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/oldsetrlimit64.c create mode 100644 sysdeps/unix/sysv/linux/arm/setrlimit64.c diff --git a/sysdeps/unix/sysv/linux/arm/oldsetrlimit64.c b/sysdeps/unix/sysv/linux/arm/oldsetrlimit64.c new file mode 100644 index 0000000000..93bdc37cac --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/oldsetrlimit64.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/arm/setrlimit64.c b/sysdeps/unix/sysv/linux/arm/setrlimit64.c new file mode 100644 index 0000000000..ed64b871f4 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/setrlimit64.c @@ -0,0 +1 @@ +#include From 41955e53253253fa3c3c21b5d86fe8017b5be9dc Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 12 Jan 2000 10:24:30 +0000 Subject: [PATCH 1738/4487] Linux/Arm specific compatibility getrlimit64 implementation. --- sysdeps/unix/sysv/linux/arm/oldgetrlimit64.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/arm/oldgetrlimit64.c diff --git a/sysdeps/unix/sysv/linux/arm/oldgetrlimit64.c b/sysdeps/unix/sysv/linux/arm/oldgetrlimit64.c new file mode 100644 index 0000000000..4c27e957bf --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/oldgetrlimit64.c @@ -0,0 +1 @@ +#include From df4969c4212eaecabcd5053a6a93c5f40a7484dc Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Jan 2000 05:17:33 +0000 Subject: [PATCH 1739/4487] Linux/Arm implementation of chown. --- sysdeps/unix/sysv/linux/arm/chown.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/arm/chown.c diff --git a/sysdeps/unix/sysv/linux/arm/chown.c b/sysdeps/unix/sysv/linux/arm/chown.c new file mode 100644 index 0000000000..1961622564 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/chown.c @@ -0,0 +1 @@ +#include From 5daabcd7a5e34fe635dcce7a8994e19fa289239c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Jan 2000 05:17:42 +0000 Subject: [PATCH 1740/4487] Linux/Arm implementation of fchown. --- sysdeps/unix/sysv/linux/arm/fchown.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/arm/fchown.c diff --git a/sysdeps/unix/sysv/linux/arm/fchown.c b/sysdeps/unix/sysv/linux/arm/fchown.c new file mode 100644 index 0000000000..3a69ecc9e7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/fchown.c @@ -0,0 +1 @@ +#include From 20eb495ca66266328c15a0d26a191a2aa99c3057 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Jan 2000 05:17:53 +0000 Subject: [PATCH 1741/4487] Linux/Arm implementation of geteuid. --- sysdeps/unix/sysv/linux/arm/geteuid.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/arm/geteuid.c diff --git a/sysdeps/unix/sysv/linux/arm/geteuid.c b/sysdeps/unix/sysv/linux/arm/geteuid.c new file mode 100644 index 0000000000..ebcb555b5e --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/geteuid.c @@ -0,0 +1 @@ +#include From 00f523c53465b34c0b9b765ddc35b737b3f1fbc8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Jan 2000 05:18:01 +0000 Subject: [PATCH 1742/4487] Linux/Arm implementation of getegid. --- sysdeps/unix/sysv/linux/arm/getegid.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/arm/getegid.c diff --git a/sysdeps/unix/sysv/linux/arm/getegid.c b/sysdeps/unix/sysv/linux/arm/getegid.c new file mode 100644 index 0000000000..37b4b4a530 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/getegid.c @@ -0,0 +1 @@ +#include From 20b74d454698ed7fcd18d18eeeec4eef44e27657 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Jan 2000 05:18:08 +0000 Subject: [PATCH 1743/4487] Linux/Arm implementation of getgid. --- sysdeps/unix/sysv/linux/arm/getgid.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/arm/getgid.c diff --git a/sysdeps/unix/sysv/linux/arm/getgid.c b/sysdeps/unix/sysv/linux/arm/getgid.c new file mode 100644 index 0000000000..0a4d6061f0 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/getgid.c @@ -0,0 +1 @@ +#include From 95c95a5696e7773ada82f80de8711639a8e7276e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Jan 2000 05:18:15 +0000 Subject: [PATCH 1744/4487] Linux/Arm implementation of getuid. --- sysdeps/unix/sysv/linux/arm/getuid.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/arm/getuid.c diff --git a/sysdeps/unix/sysv/linux/arm/getuid.c b/sysdeps/unix/sysv/linux/arm/getuid.c new file mode 100644 index 0000000000..d682c79a49 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/getuid.c @@ -0,0 +1 @@ +#include From ab25616f31e12ebe826a3473500ef8529d2a1736 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Jan 2000 05:18:30 +0000 Subject: [PATCH 1745/4487] Linux/Arm implementation of lchown. --- sysdeps/unix/sysv/linux/arm/lchown.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/arm/lchown.c diff --git a/sysdeps/unix/sysv/linux/arm/lchown.c b/sysdeps/unix/sysv/linux/arm/lchown.c new file mode 100644 index 0000000000..c89de99ba2 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/lchown.c @@ -0,0 +1 @@ +#include From 6ab12c1eebfc802b607990883e1247a1c2f6f6f0 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Jan 2000 05:19:42 +0000 Subject: [PATCH 1746/4487] Linux/i386 implementation of chown. --- sysdeps/unix/sysv/linux/m68k/chown.c | 57 ++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/chown.c diff --git a/sysdeps/unix/sysv/linux/m68k/chown.c b/sysdeps/unix/sysv/linux/m68k/chown.c new file mode 100644 index 0000000000..c27da95944 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/chown.c @@ -0,0 +1,57 @@ +/* Copyright (C) 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +#include +#include + +#include + +#include + +extern int __syscall_chown (const char *__file, + uid_t __owner, gid_t __group); + +#ifdef __NR_chown32 +extern int __syscall_chown32 (const char *__file, + __kernel_uid32_t owner, __kernel_gid32_t group); +#endif /* __NR_chown32 */ + +int +__chown (const char *file, uid_t owner, gid_t group) +{ +#ifdef __NR_chown32 + if (__libc_missing_32bit_uids != NO_HIGHUIDS) + { + int result; + int saved_errno = errno; + + result = INLINE_SYSCALL (chown32, 3, file, owner, group); + if (result == 0 || errno != ENOSYS) + return result; + + __set_errno (saved_errno); + __libc_missing_32bit_uids = NO_HIGHUIDS; + } +#endif /* __NR_chown32 */ + + return INLINE_SYSCALL (chown, 3, file, owner, group); +} +weak_alias (__chown, chown) From 76862c6dd7bb42e502afcc70b7f8edef3504e3ff Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Jan 2000 05:19:51 +0000 Subject: [PATCH 1747/4487] Linux/i386 implementation of fchown. --- sysdeps/unix/sysv/linux/m68k/fchown.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/fchown.c diff --git a/sysdeps/unix/sysv/linux/m68k/fchown.c b/sysdeps/unix/sysv/linux/m68k/fchown.c new file mode 100644 index 0000000000..3a69ecc9e7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/fchown.c @@ -0,0 +1 @@ +#include From 26bb8c8c1b7de6f4bf895d5fff6bcd867ffaca1e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Jan 2000 05:20:03 +0000 Subject: [PATCH 1748/4487] Linux/i386 implementation of getegid. --- sysdeps/unix/sysv/linux/m68k/getegid.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/getegid.c diff --git a/sysdeps/unix/sysv/linux/m68k/getegid.c b/sysdeps/unix/sysv/linux/m68k/getegid.c new file mode 100644 index 0000000000..37b4b4a530 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/getegid.c @@ -0,0 +1 @@ +#include From b1e3521362cb51077043eed3d27b02c63a3cb838 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Jan 2000 05:20:10 +0000 Subject: [PATCH 1749/4487] Linux/i386 implementation of geteuid. --- sysdeps/unix/sysv/linux/m68k/geteuid.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/geteuid.c diff --git a/sysdeps/unix/sysv/linux/m68k/geteuid.c b/sysdeps/unix/sysv/linux/m68k/geteuid.c new file mode 100644 index 0000000000..ebcb555b5e --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/geteuid.c @@ -0,0 +1 @@ +#include From 881cf30824f051b1539492c5a472afd76beea0f7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Jan 2000 05:20:20 +0000 Subject: [PATCH 1750/4487] Linux/i386 implementation of getuid. --- sysdeps/unix/sysv/linux/m68k/getuid.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/getuid.c diff --git a/sysdeps/unix/sysv/linux/m68k/getuid.c b/sysdeps/unix/sysv/linux/m68k/getuid.c new file mode 100644 index 0000000000..d682c79a49 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/getuid.c @@ -0,0 +1 @@ +#include From 4b1aa399d1f2104e2570571ca382dab7c11b3727 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Jan 2000 05:20:27 +0000 Subject: [PATCH 1751/4487] Linux/i386 implementation of getgid. --- sysdeps/unix/sysv/linux/m68k/getgid.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/getgid.c diff --git a/sysdeps/unix/sysv/linux/m68k/getgid.c b/sysdeps/unix/sysv/linux/m68k/getgid.c new file mode 100644 index 0000000000..0a4d6061f0 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/getgid.c @@ -0,0 +1 @@ +#include From 1219d5bc53112de6bc5712a7b02f8de40040aca3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Jan 2000 05:20:35 +0000 Subject: [PATCH 1752/4487] Linux/i386 implementation of lchown. --- sysdeps/unix/sysv/linux/m68k/lchown.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/lchown.c diff --git a/sysdeps/unix/sysv/linux/m68k/lchown.c b/sysdeps/unix/sysv/linux/m68k/lchown.c new file mode 100644 index 0000000000..c89de99ba2 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/lchown.c @@ -0,0 +1 @@ +#include From ab944a2185910ef71ba9c2a0356616e732946fa7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Jan 2000 04:26:49 +0000 Subject: [PATCH 1753/4487] Update for new ipc. --- sysdeps/unix/sysv/linux/alpha/bits/ipc.h | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/ipc.h b/sysdeps/unix/sysv/linux/alpha/bits/ipc.h index 804e1ee3f7..0196fe490f 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/ipc.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/ipc.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 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 @@ -47,15 +47,29 @@ struct ipc_perm unsigned int cgid; /* Creator's group ID. */ unsigned int mode; /* Read/write permission. */ unsigned short int __seq; /* Sequence number. */ + unsigned short int __pad1; + unsigned long int __unused1; + unsigned long int __unused2; }; +#ifdef __LIBC_IPC_INTERNAL +struct __old_ipc_perm + { + __key_t __key; /* Key. */ + unsigned int uid; /* Owner's user ID. */ + unsigned int gid; /* Owner's group ID. */ + unsigned int cuid; /* Creator's user ID. */ + unsigned int cgid; /* Creator's group ID. */ + unsigned int mode; /* Read/write permission. */ + unsigned short int __seq; /* Sequence number. */ + }; __BEGIN_DECLS /* The actual system call: all functions are multiplexed by this. */ -extern int __ipc __P ((int __call, int __first, int __second, int __third, - void *__ptr)); +extern int __ipc (int __call, int __first, int __second, int __third, + void *__ptr); __END_DECLS @@ -71,3 +85,5 @@ __END_DECLS #define IPCOP_shmdt 22 #define IPCOP_shmget 23 #define IPCOP_shmctl 24 + +#endif From 05bd55b91020658a71920762ca0063245f8c3fdf Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Jan 2000 04:27:05 +0000 Subject: [PATCH 1754/4487] Linux/Alpha SysV msq definitions. --- sysdeps/unix/sysv/linux/alpha/bits/msq.h | 87 ++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/msq.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/msq.h b/sysdeps/unix/sysv/linux/alpha/bits/msq.h new file mode 100644 index 0000000000..a8d4cc6711 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/bits/msq.h @@ -0,0 +1,87 @@ +/* Copyright (C) 1995, 1996, 1997, 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_MSG_H +# error "Never use directly; include instead." +#endif + +#include + +/* Define options for message queue functions. */ +#define MSG_NOERROR 010000 /* no error if message is too big */ +#define MSG_EXCEPT 020000 /* recv any msg except of specified type */ + + +/* Structure of record for one message inside the kernel. + The type `struct msg' is opaque. */ +struct msqid_ds +{ + struct ipc_perm msg_perm; /* structure describing operation permission */ + __time_t msg_stime; /* time of last msgsnd command */ + __time_t msg_rtime; /* time of last msgrcv command */ + __time_t msg_ctime; /* time of last change */ + unsigned long int __msg_cbytes; /* current number of bytes on queue */ + unsigned long int msg_qnum; /* number of messages currently on queue */ + unsigned long int 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; +}; + +#ifdef __LIBC_IPC_INTERNAL +struct __old_msqid_ds +{ + struct __old_ipc_perm msg_perm; /* structure describing operation permission */ + struct msg *__msg_first; /* pointer to first message on queue */ + struct msg *__msg_last; /* pointer to last message on queue */ + __time_t msg_stime; /* time of last msgsnd command */ + __time_t msg_rtime; /* time of last msgrcv command */ + __time_t msg_ctime; /* time of last change */ + struct wait_queue *__wwait; /* ??? */ + struct wait_queue *__rwait; /* ??? */ + unsigned short int __msg_cbytes; /* current number of bytes on queue */ + unsigned short int msg_qnum; /* number of messages currently on queue */ + unsigned short int msg_qbytes; /* max number of bytes allowed on queue */ + __ipc_pid_t msg_lspid; /* pid of last msgsnd() */ + __ipc_pid_t msg_lrpid; /* pid of last msgrcv() */ +}; +#endif + +#ifdef __USE_MISC + +# define msg_cbytes __msg_cbytes + +/* ipcs ctl commands */ +# define MSG_STAT 11 +# define MSG_INFO 12 + +/* buffer for msgctl calls IPC_INFO, MSG_INFO */ +struct msginfo + { + int msgpool; + int msgmap; + int msgmax; + int msgmnb; + int msgmni; + int msgssz; + int msgtql; + unsigned short int msgseg; + }; + +#endif /* __USE_MISC */ From db706c12f591d6ded0ec1d5b5776515a2a63000a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Jan 2000 04:27:12 +0000 Subject: [PATCH 1755/4487] Linux/Alpha SysV sem definitions. --- sysdeps/unix/sysv/linux/alpha/bits/sem.h | 99 ++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/sem.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sem.h b/sysdeps/unix/sysv/linux/alpha/bits/sem.h new file mode 100644 index 0000000000..19a3aa52cc --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/bits/sem.h @@ -0,0 +1,99 @@ +/* Copyright (C) 1995, 1996, 1997, 1998, 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_SEM_H +# error "Never include directly; use instead." +#endif + +#include + +/* Flags for `semop'. */ +#define SEM_UNDO 0x1000 /* undo the operation on exit */ + +/* Commands for `semctl'. */ +#define GETPID 11 /* get sempid */ +#define GETVAL 12 /* get semval */ +#define GETALL 13 /* get all semval's */ +#define GETNCNT 14 /* get semncnt */ +#define GETZCNT 15 /* get semzcnt */ +#define SETVAL 16 /* set semval */ +#define SETALL 17 /* set all semval's */ + + +/* Data structure describing a set of semaphores. */ +struct semid_ds +{ + struct ipc_perm sem_perm; /* operation permission struct */ + __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; +}; + +#ifdef __LIBC_IPC_INTERNAL +struct __old_semid_ds +{ + struct __old_ipc_perm sem_perm; /* operation permission struct */ + __time_t sem_otime; /* last semop() time */ + __time_t sem_ctime; /* last time changed by semctl() */ + struct sem *__sembase; /* ptr to first semaphore in array */ + struct sem_queue *__sem_pending; /* pending operations */ + struct sem_queue *__sem_pending_last; /* last pending operation */ + struct sem_undo *__undo; /* ondo requests on this array */ + unsigned short int sem_nsems; /* number of semaphores in set */ +}; +#endif + +/* The user should define a union like the following to use it for arguments + for `semctl'. + + union semun + { + int val; <= value for SETVAL + struct semid_ds *buf; <= buffer for IPC_STAT & IPC_SET + unsigned short int *array; <= array for GETALL & SETALL + struct seminfo *__buf; <= buffer for IPC_INFO + }; + + Previous versions of this file used to define this union but this is + incorrect. One can test the macro _SEM_SEMUN_UNDEFINED to see whether + one must define the union or not. */ +#define _SEM_SEMUN_UNDEFINED 1 + +#ifdef __USE_MISC + +/* ipcs ctl cmds */ +# define SEM_STAT 18 +# define SEM_INFO 19 + +struct seminfo +{ + int semmap; + int semmni; + int semmns; + int semmnu; + int semmsl; + int semopm; + int semume; + int semusz; + int semvmx; + int semaem; +}; + +#endif /* __USE_MISC */ From a7b22345a14e914076e461c5114525d7b8f3b344 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Jan 2000 04:27:20 +0000 Subject: [PATCH 1756/4487] Linux/Alpha SysV shm definitions. --- sysdeps/unix/sysv/linux/alpha/bits/shm.h | 113 +++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/shm.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/shm.h b/sysdeps/unix/sysv/linux/alpha/bits/shm.h new file mode 100644 index 0000000000..4e297647b5 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/bits/shm.h @@ -0,0 +1,113 @@ +/* Copyright (C) 1995, 1996, 1997, 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_SHM_H +# error "Never include directly; use instead." +#endif + +#include + +/* Permission flag for shmget. */ +#define SHM_R 0400 /* or S_IRUGO from */ +#define SHM_W 0200 /* or S_IWUGO from */ + +/* Flags for `shmat'. */ +#define SHM_RDONLY 010000 /* attach read-only else read-write */ +#define SHM_RND 020000 /* round attach address to SHMLBA */ +#define SHM_REMAP 040000 /* take-over region on attach */ + +/* Commands for `shmctl'. */ +#define SHM_LOCK 11 /* lock segment (root only) */ +#define SHM_UNLOCK 12 /* unlock segment (root only) */ + + +/* Data structure describing a set of semaphores. */ +struct shmid_ds + { + struct ipc_perm shm_perm; /* operation permission struct */ + size_t shm_segsz; /* size of segment in bytes */ + __time_t shm_atime; /* time of last shmat() */ + __time_t shm_dtime; /* time of last shmdt() */ + __time_t shm_ctime; /* time of last change by shmctl() */ + pid_t shm_cpid; /* pid of creator */ + pid_t shm_lpid; /* pid of last shmop */ + unsigned long int shm_nattch; /* number of current attaches */ + unsigned long int __unused1; + unsigned long int __unused2; + }; + +#ifdef __LIBC_IPC_INTERNAL +struct __old_shmid_ds + { + struct __old_ipc_perm shm_perm; /* operation permission struct */ + int shm_segsz; /* size of segment in bytes */ + __time_t shm_atime; /* time of last shmat() */ + __time_t shm_dtime; /* time of last shmdt() */ + __time_t shm_ctime; /* time of last change by shmctl() */ + __ipc_pid_t shm_cpid; /* pid of creator */ + __ipc_pid_t shm_lpid; /* pid of last shmop */ + unsigned short int shm_nattch; /* number of current attaches */ + unsigned short int __shm_npages; /* size of segment (pages) */ + unsigned long int *__shm_pages; /* array of ptrs to frames -> SHMMAX */ + struct vm_area_struct *__attaches; /* descriptors for attaches */ + }; +#endif + +#ifdef __USE_MISC + +/* ipcs ctl commands */ +# define SHM_STAT 13 +# define SHM_INFO 14 + +/* shm_mode upper byte flags */ +# define SHM_DEST 01000 /* segment will be destroyed on last detach */ +# define SHM_LOCKED 02000 /* segment will not be swapped */ + +struct shminfo + { + unsigned long int shmmax; + unsigned long int shmmin; + unsigned long int shmmni; + unsigned long int shmseg; + unsigned long int shmall; + unsigned long int __unused1; + unsigned long int __unused2; + unsigned long int __unused3; + unsigned long int __unused4; + }; + +struct __old_shminfo + { + int shmmax; + int shmmin; + int shmmni; + int shmseg; + int shmall; + }; + +struct shm_info + { + int used_ids; + unsigned long int shm_tot; /* total allocated shm */ + unsigned long int shm_rss; /* total resident shm */ + unsigned long int shm_swp; /* total swapped shm */ + unsigned long int swap_attempts; + unsigned long int swap_successes; + }; + +#endif /* __USE_MISC */ From 293c7e46e33936521c293c73900f6e0d1ed43bcc Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Jan 2000 04:30:34 +0000 Subject: [PATCH 1757/4487] (__syscall_chown): Use proper prototype. Don't include non-existant header. (__chown): Return EINVAL if owner or group are out of the range -1U .. 65534. --- sysdeps/unix/sysv/linux/m68k/chown.c | 31 +++++++++++++++++++++------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/sysdeps/unix/sysv/linux/m68k/chown.c b/sysdeps/unix/sysv/linux/m68k/chown.c index c27da95944..4e7625c13e 100644 --- a/sysdeps/unix/sysv/linux/m68k/chown.c +++ b/sysdeps/unix/sysv/linux/m68k/chown.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 1998, 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 @@ -24,21 +24,28 @@ #include -#include - extern int __syscall_chown (const char *__file, - uid_t __owner, gid_t __group); + __kernel_uid_t __owner, __kernel_gid_t __group); #ifdef __NR_chown32 extern int __syscall_chown32 (const char *__file, __kernel_uid32_t owner, __kernel_gid32_t group); + +# if __ASSUME_32BITUIDS == 0 +/* This variable is shared with all files that need to check for 32bit + uids. */ +extern int __libc_missing_32bit_uids; +# endif #endif /* __NR_chown32 */ int __chown (const char *file, uid_t owner, gid_t group) { -#ifdef __NR_chown32 - if (__libc_missing_32bit_uids != NO_HIGHUIDS) +#if __ASSUME_32BITUIDS + return INLINE_SYSCALL (chown32, 3, file, owner, group); +#else +# ifdef __NR_chown32 + if (!__libc_missing_32bit_uids) { int result; int saved_errno = errno; @@ -48,10 +55,18 @@ __chown (const char *file, uid_t owner, gid_t group) return result; __set_errno (saved_errno); - __libc_missing_32bit_uids = NO_HIGHUIDS; + __libc_missing_32bit_uids = 1; + } +# endif /* __NR_chown32 */ + + if (((owner + 1) > (gid_t) ((__kernel_uid_t) -1U)) + || ((group + 1) > (gid_t) ((__kernel_gid_t) -1U))) + { + __set_errno (EINVAL); + return -1; } -#endif /* __NR_chown32 */ return INLINE_SYSCALL (chown, 3, file, owner, group); +#endif } weak_alias (__chown, chown) From f7d91a2716c29b8378b3a1b1427e7cdacc4fbddd Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 19 Jan 2000 03:51:30 +0000 Subject: [PATCH 1758/4487] Linux/Arm implementation of fxstat. --- sysdeps/unix/sysv/linux/arm/fxstat.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/arm/fxstat.c diff --git a/sysdeps/unix/sysv/linux/arm/fxstat.c b/sysdeps/unix/sysv/linux/arm/fxstat.c new file mode 100644 index 0000000000..4f219f0b9d --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/fxstat.c @@ -0,0 +1 @@ +#include From f8b3a62dba5b4799ee1e75b19c4506dbbcfaff22 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 19 Jan 2000 03:51:45 +0000 Subject: [PATCH 1759/4487] Linux/Arm implementation of lxstat. --- sysdeps/unix/sysv/linux/arm/lxstat.c | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/lxstat.c diff --git a/sysdeps/unix/sysv/linux/arm/lxstat.c b/sysdeps/unix/sysv/linux/arm/lxstat.c new file mode 100644 index 0000000000..2371cd9719 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/lxstat.c @@ -0,0 +1,2 @@ +#include + From 6274fd0fe85fca2efb4127b896d75924ddee93cf Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 19 Jan 2000 03:51:57 +0000 Subject: [PATCH 1760/4487] Linux/Arm implementation of xstat. --- sysdeps/unix/sysv/linux/arm/xstat.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/arm/xstat.c diff --git a/sysdeps/unix/sysv/linux/arm/xstat.c b/sysdeps/unix/sysv/linux/arm/xstat.c new file mode 100644 index 0000000000..e9869f5508 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/xstat.c @@ -0,0 +1 @@ +#include From 74a892eea9ef329293a5b707cb670cae33b30a51 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 19 Jan 2000 03:52:16 +0000 Subject: [PATCH 1761/4487] Linux/m68k implementation of fxstat. --- sysdeps/unix/sysv/linux/m68k/fxstat.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/fxstat.c diff --git a/sysdeps/unix/sysv/linux/m68k/fxstat.c b/sysdeps/unix/sysv/linux/m68k/fxstat.c new file mode 100644 index 0000000000..4f219f0b9d --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/fxstat.c @@ -0,0 +1 @@ +#include From 8c2308629214e6b90545d457c06bade822d027d3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 19 Jan 2000 03:52:32 +0000 Subject: [PATCH 1762/4487] Linux/m68k implementation of lxstat. --- sysdeps/unix/sysv/linux/m68k/lxstat.c | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/lxstat.c diff --git a/sysdeps/unix/sysv/linux/m68k/lxstat.c b/sysdeps/unix/sysv/linux/m68k/lxstat.c new file mode 100644 index 0000000000..2371cd9719 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/lxstat.c @@ -0,0 +1,2 @@ +#include + From 13990a22c1a9723d7c4add7b8cf9d7f70535b06c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 19 Jan 2000 03:52:47 +0000 Subject: [PATCH 1763/4487] iLinux/m68k implementation of xstat. --- sysdeps/unix/sysv/linux/m68k/xstat.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/xstat.c diff --git a/sysdeps/unix/sysv/linux/m68k/xstat.c b/sysdeps/unix/sysv/linux/m68k/xstat.c new file mode 100644 index 0000000000..e9869f5508 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/xstat.c @@ -0,0 +1 @@ +#include From 358f8be2ed1785dea497a8a8e83d1cfc3333ad22 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 23 Jan 2000 08:52:50 +0000 Subject: [PATCH 1764/4487] Add sys/io.h. --- sysdeps/unix/sysv/linux/alpha/Makefile | 2 +- sysdeps/unix/sysv/linux/arm/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile index b62a871506..3265e0fa1e 100644 --- a/sysdeps/unix/sysv/linux/alpha/Makefile +++ b/sysdeps/unix/sysv/linux/alpha/Makefile @@ -3,7 +3,7 @@ sysdep_routines += oldglob endif ifeq ($(subdir),misc) -sysdep_headers += alpha/ptrace.h alpha/regdef.h +sysdep_headers += alpha/ptrace.h alpha/regdef.h sys/io.h sysdep_routines += ieee_get_fp_control ieee_set_fp_control \ sethae ioperm osf_sigprocmask llseek adjtimex diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile index 79eff05b90..b82a6ef160 100644 --- a/sysdeps/unix/sysv/linux/arm/Makefile +++ b/sysdeps/unix/sysv/linux/arm/Makefile @@ -1,6 +1,6 @@ ifeq ($(subdir),misc) sysdep_routines += setfsgid setfsuid setresgid setresuid ioperm -sysdep_headers += sys/elf.h +sysdep_headers += sys/elf.h sys/io.h endif ifeq ($(subdir),signal) From 7ea605ff3491ea95864a7bb5220ffca46a8598e6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 23 Jan 2000 08:53:21 +0000 Subject: [PATCH 1765/4487] Add prototypes for port access functions. --- sysdeps/unix/sysv/linux/alpha/sys/io.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/sys/io.h b/sysdeps/unix/sysv/linux/alpha/sys/io.h index 0095714148..d1f5ac3eec 100644 --- a/sysdeps/unix/sysv/linux/alpha/sys/io.h +++ b/sysdeps/unix/sysv/linux/alpha/sys/io.h @@ -64,6 +64,14 @@ extern int pciconfig_write (unsigned long int __bus, unsigned long int __len, unsigned char *__buf) __THROW; +/* Userspace declarations. */ +extern unsigned int inb (unsigned long __port) __THROW; +extern unsigned int inw (unsigned long __port) __THROW; +extern unsigned int inl (unsigned long __port) __THROW; +extern void outb (unsigned char __b, unsigned long __port) __THROW; +extern void outw (unsigned short __w, unsigned long __port) __THROW; +extern void outl (unsigned int __l, unsigned long __port) __THROW; + __END_DECLS #endif /* _SYS_IO_H */ From 41aa6d836bafbdd4d6f8e12486f80bfee790f1b6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 24 Jan 2000 01:44:35 +0000 Subject: [PATCH 1766/4487] Correct check for ENOSYS. --- sysdeps/unix/sysv/linux/arm/mmap64.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/arm/mmap64.S b/sysdeps/unix/sysv/linux/arm/mmap64.S index 604bb76137..904c56404d 100644 --- a/sysdeps/unix/sysv/linux/arm/mmap64.S +++ b/sysdeps/unix/sysv/linux/arm/mmap64.S @@ -19,6 +19,7 @@ #include #define EINVAL 22 +#define ENOSYS 38 /* The mmap2 system call takes six arguments, all in registers. */ .text @@ -38,7 +39,7 @@ ENTRY (__mmap64) swi SYS_ify (mmap2) cmn r0, $4096 LOADREGS(ccfd, sp!, {r4, r5, pc}) - teq r0, $-ENOSYS + cmn r0, $(ENOSYS - 1) ldmnefd sp!, {r4, r5, lr} bne PLTJMP(syscall_error) /* The current kernel does not support mmap2. Fall back to plain From 9eaa6929206799a4ff8d364d0287866628320baf Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 24 Jan 2000 12:05:37 +0000 Subject: [PATCH 1767/4487] Not needed anymore. --- sysdeps/unix/sysv/linux/arm/oldsetrlimit64.c | 1 - sysdeps/unix/sysv/linux/arm/setrlimit64.c | 1 - 2 files changed, 2 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/arm/oldsetrlimit64.c delete mode 100644 sysdeps/unix/sysv/linux/arm/setrlimit64.c diff --git a/sysdeps/unix/sysv/linux/arm/oldsetrlimit64.c b/sysdeps/unix/sysv/linux/arm/oldsetrlimit64.c deleted file mode 100644 index 93bdc37cac..0000000000 --- a/sysdeps/unix/sysv/linux/arm/oldsetrlimit64.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/arm/setrlimit64.c b/sysdeps/unix/sysv/linux/arm/setrlimit64.c deleted file mode 100644 index ed64b871f4..0000000000 --- a/sysdeps/unix/sysv/linux/arm/setrlimit64.c +++ /dev/null @@ -1 +0,0 @@ -#include From b4f75eec45c45e16dea9fd0e591a6ab0e92aebb7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 24 Jan 2000 12:06:14 +0000 Subject: [PATCH 1768/4487] Linux/Arm specific resource handling definitions. --- sysdeps/unix/sysv/linux/arm/bits/resource.h | 205 ++++++++++++++++++++ 1 file changed, 205 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/bits/resource.h diff --git a/sysdeps/unix/sysv/linux/arm/bits/resource.h b/sysdeps/unix/sysv/linux/arm/bits/resource.h new file mode 100644 index 0000000000..710f1119c0 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/bits/resource.h @@ -0,0 +1,205 @@ +/* Bit values & structures for resource limits. Linux version. + Copyright (C) 1994, 1996, 1997, 1998, 1999 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_RESOURCE_H +# error "Never use directly; include instead." +#endif + +#include + +/* Transmute defines to enumerations. The macro re-definitions are + necessary because some programs want to test for operating system + features with #ifdef RUSAGE_SELF. In ISO C the reflexive + definition is a no-op. */ + +/* Kinds of resource limit. */ +enum __rlimit_resource +{ + /* Per-process CPU limit, in seconds. */ + RLIMIT_CPU = 0, +#define RLIMIT_CPU RLIMIT_CPU + + /* Largest file that can be created, in bytes. */ + RLIMIT_FSIZE = 1, +#define RLIMIT_FSIZE RLIMIT_FSIZE + + /* Maximum size of data segment, in bytes. */ + RLIMIT_DATA = 2, +#define RLIMIT_DATA RLIMIT_DATA + + /* Maximum size of stack segment, in bytes. */ + RLIMIT_STACK = 3, +#define RLIMIT_STACK RLIMIT_STACK + + /* Largest core file that can be created, in bytes. */ + RLIMIT_CORE = 4, +#define RLIMIT_CORE RLIMIT_CORE + + /* Largest resident set size, in bytes. + This affects swapping; processes that are exceeding their + resident set size will be more likely to have physical memory + taken from them. */ + RLIMIT_RSS = 5, +#define RLIMIT_RSS RLIMIT_RSS + + /* Number of open files. */ + RLIMIT_NOFILE = 7, + RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */ +#define RLIMIT_NOFILE RLIMIT_NOFILE +#define RLIMIT_OFILE RLIMIT_OFILE + + /* Address space limit. */ + RLIMIT_AS = 9, +#define RLIMIT_AS RLIMIT_AS + + /* Number of processes. */ + RLIMIT_NPROC = 6, +#define RLIMIT_NPROC RLIMIT_NPROC + + /* Locked-in-memory address space. */ + RLIMIT_MEMLOCK = 8, +#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK + + RLIMIT_NLIMITS = 10, + RLIM_NLIMITS = RLIMIT_NLIMITS +#define RLIMIT_NLIMITS RLIMIT_NLIMITS +#define RLIM_NLIMITS RLIM_NLIMITS +}; + +/* Value to indicate that there is no limit. */ +#ifndef __USE_FILE_OFFSET64 +# define RLIM_INFINITY ((unsigned long int)(~0UL)) +#else +# define RLIM_INFINITY 0xffffffffffffffffuLL +#endif + +#ifdef __USE_LARGEFILE64 +# define RLIM64_INFINITY 0xffffffffffffffffuLL +#endif + +/* We can represent all limits. */ +#define RLIM_SAVED_MAX RLIM_INFINITY +#define RLIM_SAVED_CUR RLIM_INFINITY + + +/* Type for resource quantity measurement. */ +#ifndef __USE_FILE_OFFSET64 +typedef __rlim_t rlim_t; +#else +typedef __rlim64_t rlim_t; +#endif +#ifdef __USE_LARGEFILE64 +typedef __rlim64_t rlim64_t; +#endif + +struct rlimit + { + /* The current (soft) limit. */ + rlim_t rlim_cur; + /* The hard limit. */ + rlim_t rlim_max; + }; + +#ifdef __USE_LARGEFILE64 +struct rlimit64 + { + /* The current (soft) limit. */ + rlim64_t rlim_cur; + /* The hard limit. */ + rlim64_t rlim_max; + }; +#endif + +/* Whose usage statistics do you want? */ +enum __rusage_who +{ + /* The calling process. */ + RUSAGE_SELF = 0, +#define RUSAGE_SELF RUSAGE_SELF + + /* All of its terminated child processes. */ + RUSAGE_CHILDREN = -1, +#define RUSAGE_CHILDREN RUSAGE_CHILDREN + + /* Both. */ + RUSAGE_BOTH = -2 +#define RUSAGE_BOTH RUSAGE_BOTH +}; + +#define __need_timeval +#include /* For `struct timeval'. */ + +/* Structure which says how much of each resource has been used. */ +struct rusage + { + /* Total amount of user time used. */ + struct timeval ru_utime; + /* Total amount of system time used. */ + struct timeval ru_stime; + /* Maximum resident set size (in kilobytes). */ + long int ru_maxrss; + /* Amount of sharing of text segment memory + with other processes (kilobyte-seconds). */ + long int ru_ixrss; + /* Amount of data segment memory used (kilobyte-seconds). */ + long int ru_idrss; + /* Amount of stack memory used (kilobyte-seconds). */ + long int ru_isrss; + /* Number of soft page faults (i.e. those serviced by reclaiming + a page from the list of pages awaiting reallocation. */ + long int ru_minflt; + /* Number of hard page faults (i.e. those that required I/O). */ + long int ru_majflt; + /* Number of times a process was swapped out of physical memory. */ + long int ru_nswap; + /* Number of input operations via the file system. Note: This + and `ru_oublock' do not include operations with the cache. */ + long int ru_inblock; + /* Number of output operations via the file system. */ + long int ru_oublock; + /* Number of IPC messages sent. */ + long int ru_msgsnd; + /* Number of IPC messages received. */ + long int ru_msgrcv; + /* Number of signals delivered. */ + long int ru_nsignals; + /* Number of voluntary context switches, i.e. because the process + gave up the process before it had to (usually to wait for some + resource to be available). */ + long int ru_nvcsw; + /* Number of involuntary context switches, i.e. a higher priority process + became runnable or the current process used up its time slice. */ + long int ru_nivcsw; + }; + +/* Priority limits. */ +#define PRIO_MIN -20 /* Minimum priority a process can have. */ +#define PRIO_MAX 20 /* Maximum priority a process can have. */ + +/* The type of the WHICH argument to `getpriority' and `setpriority', + indicating what flavor of entity the WHO argument specifies. */ +enum __priority_which +{ + PRIO_PROCESS = 0, /* WHO is a process ID. */ +#define PRIO_PROCESS PRIO_PROCESS + PRIO_PGRP = 1, /* WHO is a process group ID. */ +#define PRIO_PGRP PRIO_PGRP + PRIO_USER = 2 /* WHO is a user ID. */ +#define PRIO_USER PRIO_USER +}; From 6bb1e664313c7864b22e16e9cc3b75bdcd381968 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 24 Jan 2000 12:06:59 +0000 Subject: [PATCH 1769/4487] Remove oldsetrlimit64.c. --- sysdeps/unix/sysv/linux/arm/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile index b82a6ef160..6040b20193 100644 --- a/sysdeps/unix/sysv/linux/arm/Makefile +++ b/sysdeps/unix/sysv/linux/arm/Makefile @@ -10,5 +10,5 @@ sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \ endif ifeq ($(subdir),resource) -sysdep_routines += oldgetrlimit64 oldsetrlimit64 +sysdep_routines += oldgetrlimit64 endif From adcd6eb68b0d95533bea52544aeadf37e0cf5119 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 24 Jan 2000 12:07:25 +0000 Subject: [PATCH 1770/4487] Remove setrlimit64@GLIBC_2.1.3. --- sysdeps/unix/sysv/linux/arm/Versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/arm/Versions b/sysdeps/unix/sysv/linux/arm/Versions index 39f209f086..531817f737 100644 --- a/sysdeps/unix/sysv/linux/arm/Versions +++ b/sysdeps/unix/sysv/linux/arm/Versions @@ -6,6 +6,6 @@ libc { } GLIBC_2.1.3 { # New rlimit interface - getrlimit; setrlimit; getrlimit64; setrlimit64; + getrlimit; setrlimit; getrlimit64; } } From d0b0bd9a5683a6a9fa89a30006734fd98acede32 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 24 Jan 2000 12:27:13 +0000 Subject: [PATCH 1771/4487] Move private decls into ../*_priv.h file. --- sysdeps/unix/sysv/linux/alpha/bits/ipc.h | 36 ------------------------ 1 file changed, 36 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/ipc.h b/sysdeps/unix/sysv/linux/alpha/bits/ipc.h index 0196fe490f..7ad2c7c8e0 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/ipc.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/ipc.h @@ -51,39 +51,3 @@ struct ipc_perm unsigned long int __unused1; unsigned long int __unused2; }; - -#ifdef __LIBC_IPC_INTERNAL - -struct __old_ipc_perm - { - __key_t __key; /* Key. */ - unsigned int uid; /* Owner's user ID. */ - unsigned int gid; /* Owner's group ID. */ - unsigned int cuid; /* Creator's user ID. */ - unsigned int cgid; /* Creator's group ID. */ - unsigned int mode; /* Read/write permission. */ - unsigned short int __seq; /* Sequence number. */ - }; - -__BEGIN_DECLS - -/* The actual system call: all functions are multiplexed by this. */ -extern int __ipc (int __call, int __first, int __second, int __third, - void *__ptr); - -__END_DECLS - -/* The codes for the functions to use the multiplexer `__ipc'. */ -#define IPCOP_semop 1 -#define IPCOP_semget 2 -#define IPCOP_semctl 3 -#define IPCOP_msgsnd 11 -#define IPCOP_msgrcv 12 -#define IPCOP_msgget 13 -#define IPCOP_msgctl 14 -#define IPCOP_shmat 21 -#define IPCOP_shmdt 22 -#define IPCOP_shmget 23 -#define IPCOP_shmctl 24 - -#endif From 2cb94409784535008f06007bd2b3c0c76b7242dc Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 24 Jan 2000 12:30:41 +0000 Subject: [PATCH 1772/4487] Linux/Alpha private IPC definitions. --- sysdeps/unix/sysv/linux/alpha/ipc_priv.h | 54 ++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/ipc_priv.h diff --git a/sysdeps/unix/sysv/linux/alpha/ipc_priv.h b/sysdeps/unix/sysv/linux/alpha/ipc_priv.h new file mode 100644 index 0000000000..cc69795745 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/ipc_priv.h @@ -0,0 +1,54 @@ +/* Copyright (C) 1995-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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +#define __IPC_64 0x100 + +struct __old_ipc_perm +{ + __key_t __key; /* Key. */ + unsigned int uid; /* Owner's user ID. */ + unsigned int gid; /* Owner's group ID. */ + unsigned int cuid; /* Creator's user ID. */ + unsigned int cgid; /* Creator's group ID. */ + unsigned int mode; /* Read/write permission. */ + unsigned short int __seq; /* Sequence number. */ +}; + + +__BEGIN_DECLS + +/* The actual system call: all functions are multiplexed by this. */ +extern int __syscall_ipc (int __call, int __first, int __second, + int __third, void *__ptr); + +__END_DECLS + +/* The codes for the functions to use the multiplexer `__syscall_ipc'. */ +#define IPCOP_semop 1 +#define IPCOP_semget 2 +#define IPCOP_semctl 3 +#define IPCOP_msgsnd 11 +#define IPCOP_msgrcv 12 +#define IPCOP_msgget 13 +#define IPCOP_msgctl 14 +#define IPCOP_shmat 21 +#define IPCOP_shmdt 22 +#define IPCOP_shmget 23 +#define IPCOP_shmctl 24 From 47504af3f682519419689923af26479a1de13e69 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 24 Jan 2000 12:31:25 +0000 Subject: [PATCH 1773/4487] Remove private decls. --- sysdeps/unix/sysv/linux/alpha/bits/msq.h | 19 ----------------- sysdeps/unix/sysv/linux/alpha/bits/sem.h | 14 ------------- sysdeps/unix/sysv/linux/alpha/bits/shm.h | 26 ------------------------ 3 files changed, 59 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/msq.h b/sysdeps/unix/sysv/linux/alpha/bits/msq.h index a8d4cc6711..3e784d9544 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/msq.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/msq.h @@ -44,25 +44,6 @@ struct msqid_ds unsigned long int __unused2; }; -#ifdef __LIBC_IPC_INTERNAL -struct __old_msqid_ds -{ - struct __old_ipc_perm msg_perm; /* structure describing operation permission */ - struct msg *__msg_first; /* pointer to first message on queue */ - struct msg *__msg_last; /* pointer to last message on queue */ - __time_t msg_stime; /* time of last msgsnd command */ - __time_t msg_rtime; /* time of last msgrcv command */ - __time_t msg_ctime; /* time of last change */ - struct wait_queue *__wwait; /* ??? */ - struct wait_queue *__rwait; /* ??? */ - unsigned short int __msg_cbytes; /* current number of bytes on queue */ - unsigned short int msg_qnum; /* number of messages currently on queue */ - unsigned short int msg_qbytes; /* max number of bytes allowed on queue */ - __ipc_pid_t msg_lspid; /* pid of last msgsnd() */ - __ipc_pid_t msg_lrpid; /* pid of last msgrcv() */ -}; -#endif - #ifdef __USE_MISC # define msg_cbytes __msg_cbytes diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sem.h b/sysdeps/unix/sysv/linux/alpha/bits/sem.h index 19a3aa52cc..5236d57984 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/sem.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/sem.h @@ -46,20 +46,6 @@ struct semid_ds unsigned long int __unused2; }; -#ifdef __LIBC_IPC_INTERNAL -struct __old_semid_ds -{ - struct __old_ipc_perm sem_perm; /* operation permission struct */ - __time_t sem_otime; /* last semop() time */ - __time_t sem_ctime; /* last time changed by semctl() */ - struct sem *__sembase; /* ptr to first semaphore in array */ - struct sem_queue *__sem_pending; /* pending operations */ - struct sem_queue *__sem_pending_last; /* last pending operation */ - struct sem_undo *__undo; /* ondo requests on this array */ - unsigned short int sem_nsems; /* number of semaphores in set */ -}; -#endif - /* The user should define a union like the following to use it for arguments for `semctl'. diff --git a/sysdeps/unix/sysv/linux/alpha/bits/shm.h b/sysdeps/unix/sysv/linux/alpha/bits/shm.h index 4e297647b5..683a9b6726 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/shm.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/shm.h @@ -51,23 +51,6 @@ struct shmid_ds unsigned long int __unused2; }; -#ifdef __LIBC_IPC_INTERNAL -struct __old_shmid_ds - { - struct __old_ipc_perm shm_perm; /* operation permission struct */ - int shm_segsz; /* size of segment in bytes */ - __time_t shm_atime; /* time of last shmat() */ - __time_t shm_dtime; /* time of last shmdt() */ - __time_t shm_ctime; /* time of last change by shmctl() */ - __ipc_pid_t shm_cpid; /* pid of creator */ - __ipc_pid_t shm_lpid; /* pid of last shmop */ - unsigned short int shm_nattch; /* number of current attaches */ - unsigned short int __shm_npages; /* size of segment (pages) */ - unsigned long int *__shm_pages; /* array of ptrs to frames -> SHMMAX */ - struct vm_area_struct *__attaches; /* descriptors for attaches */ - }; -#endif - #ifdef __USE_MISC /* ipcs ctl commands */ @@ -91,15 +74,6 @@ struct shminfo unsigned long int __unused4; }; -struct __old_shminfo - { - int shmmax; - int shmmin; - int shmmni; - int shmseg; - int shmall; - }; - struct shm_info { int used_ids; From 9b2282bc344e37f238e803b5f3b8acdd1f1a7fbf Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 24 Jan 2000 12:34:15 +0000 Subject: [PATCH 1774/4487] Add ipc_priv.h. --- sysdeps/unix/sysv/linux/alpha/Dist | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist index 2ed1571fb1..c8868aa427 100644 --- a/sysdeps/unix/sysv/linux/alpha/Dist +++ b/sysdeps/unix/sysv/linux/alpha/Dist @@ -5,6 +5,7 @@ ieee_get_fp_control.S ieee_set_fp_control.S init-first.h ioperm.c +ipc_priv.h kernel_sigaction.h kernel_stat.h kernel_termios.h From c388491ab68354e62a7defc64c8c4bd861c2b008 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 29 Jan 2000 12:02:14 +0000 Subject: [PATCH 1775/4487] Backout rlimit changes for resource directory. --- sysdeps/unix/sysv/linux/arm/Makefile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile index 6040b20193..939c74cea7 100644 --- a/sysdeps/unix/sysv/linux/arm/Makefile +++ b/sysdeps/unix/sysv/linux/arm/Makefile @@ -8,7 +8,3 @@ sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \ rt_sigqueueinfo rt_sigaction rt_sigpending \ sigrestorer endif - -ifeq ($(subdir),resource) -sysdep_routines += oldgetrlimit64 -endif From 1fee13c891bc41db5f2e2c49634070a37217d2ab Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 29 Jan 2000 12:02:32 +0000 Subject: [PATCH 1776/4487] Backout changes for versioning setrlimit and getrlimit. --- sysdeps/unix/sysv/linux/arm/syscalls.list | 2 -- 1 file changed, 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/syscalls.list b/sysdeps/unix/sysv/linux/arm/syscalls.list index 53da8bbb7d..60303d3df7 100644 --- a/sysdeps/unix/sysv/linux/arm/syscalls.list +++ b/sysdeps/unix/sysv/linux/arm/syscalls.list @@ -12,5 +12,3 @@ s_setresuid setresuid setresuid 3 __syscall_setresuid s_setreuid setreuid setreuid 2 __syscall_setreuid s_setuid setuid setuid 1 __syscall_setuid syscall - syscall 7 syscall -oldgetrlimit EXTRA getrlimit 2 __old_getrlimit getrlimit@GLIBC_2.0 -oldsetrlimit EXTRA setrlimit 2 __old_setrlimit setrlimit@GLIBC_2.0 From acb1cd8ea1cfc675b307352f7ad5ff61ea345b26 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 29 Jan 2000 12:02:41 +0000 Subject: [PATCH 1777/4487] Export the new *rlimit interface with symbol version GLIBC_2.2. --- sysdeps/unix/sysv/linux/arm/Versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/arm/Versions b/sysdeps/unix/sysv/linux/arm/Versions index 531817f737..7e71a8604d 100644 --- a/sysdeps/unix/sysv/linux/arm/Versions +++ b/sysdeps/unix/sysv/linux/arm/Versions @@ -4,7 +4,7 @@ libc { inb; inw; inl; outb; outw; outl; } - GLIBC_2.1.3 { + GLIBC_2.2 { # New rlimit interface getrlimit; setrlimit; getrlimit64; } From 16e4bf6fece0a835d3a5c07c088c7070c8174363 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 31 Jan 2000 07:56:49 +0000 Subject: [PATCH 1778/4487] Correct return value according to the standard. --- sysdeps/alpha/fpu/feholdexcpt.c | 2 +- sysdeps/alpha/fpu/fesetround.c | 4 ++-- sysdeps/arm/fpu/feholdexcpt.c | 2 +- sysdeps/arm/fpu/fesetround.c | 2 +- sysdeps/m68k/fpu/feholdexcpt.c | 2 +- sysdeps/m68k/fpu/fesetround.c | 4 ++-- sysdeps/mips/fpu/fesetround.c | 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sysdeps/alpha/fpu/feholdexcpt.c b/sysdeps/alpha/fpu/feholdexcpt.c index 493d6a18eb..a179366cbf 100644 --- a/sysdeps/alpha/fpu/feholdexcpt.c +++ b/sysdeps/alpha/fpu/feholdexcpt.c @@ -29,5 +29,5 @@ feholdexcept (fenv_t *envp) /* Clear all exception status bits and exception enable bits. */ __ieee_set_fp_control(0); - return 1; + return 0; } diff --git a/sysdeps/alpha/fpu/fesetround.c b/sysdeps/alpha/fpu/fesetround.c index f49586cf8b..f0aaaa2c88 100644 --- a/sysdeps/alpha/fpu/fesetround.c +++ b/sysdeps/alpha/fpu/fesetround.c @@ -26,7 +26,7 @@ fesetround (int round) unsigned long fpcr; if (round & ~3) - return 0; + return 1; /* Get the current state. */ __asm__ __volatile__("excb; mf_fpcr %0" : "=f"(fpcr)); @@ -37,5 +37,5 @@ fesetround (int round) /* Put the new state in effect. */ __asm__ __volatile__("mt_fpcr %0; excb" : : "f"(fpcr)); - return 1; + return 0; } diff --git a/sysdeps/arm/fpu/feholdexcpt.c b/sysdeps/arm/fpu/feholdexcpt.c index 3faabd90eb..3422d54bb8 100644 --- a/sysdeps/arm/fpu/feholdexcpt.c +++ b/sysdeps/arm/fpu/feholdexcpt.c @@ -33,5 +33,5 @@ feholdexcept (fenv_t *envp) temp &= ~(FE_ALL_EXCEPT << FE_EXCEPT_SHIFT); _FPU_SETCW(temp); - return 1; + return 0; } diff --git a/sysdeps/arm/fpu/fesetround.c b/sysdeps/arm/fpu/fesetround.c index 7591b397e1..04eb09c413 100644 --- a/sysdeps/arm/fpu/fesetround.c +++ b/sysdeps/arm/fpu/fesetround.c @@ -23,5 +23,5 @@ int fesetround (int round) { /* We only support FE_TONEAREST, so there is no need for any work. */ - return (round == FE_TONEAREST)?1:0; + return (round == FE_TONEAREST)?0:1; } diff --git a/sysdeps/m68k/fpu/feholdexcpt.c b/sysdeps/m68k/fpu/feholdexcpt.c index 1ccf84bc86..44a7c7d9fd 100644 --- a/sysdeps/m68k/fpu/feholdexcpt.c +++ b/sysdeps/m68k/fpu/feholdexcpt.c @@ -35,5 +35,5 @@ feholdexcept (fenv_t *envp) fpcr = envp->__control_register & ~(FE_ALL_EXCEPT << 6); __asm__ __volatile__ ("fmove%.l %0,%!" : : "dm" (fpcr)); - return 1; + return 0; } diff --git a/sysdeps/m68k/fpu/fesetround.c b/sysdeps/m68k/fpu/fesetround.c index 8d5466c956..8e06a15f03 100644 --- a/sysdeps/m68k/fpu/fesetround.c +++ b/sysdeps/m68k/fpu/fesetround.c @@ -27,12 +27,12 @@ fesetround (int round) if (round & ~FE_UPWARD) /* ROUND is no valid rounding mode. */ - return 0; + return 1; __asm__ ("fmove%.l %!,%0" : "=dm" (fpcr)); fpcr &= ~FE_UPWARD; fpcr |= round; __asm__ __volatile__ ("fmove%.l %0,%!" : : "dm" (fpcr)); - return 1; + return 0; } diff --git a/sysdeps/mips/fpu/fesetround.c b/sysdeps/mips/fpu/fesetround.c index 6b623d6eab..ae6ae86bb1 100644 --- a/sysdeps/mips/fpu/fesetround.c +++ b/sysdeps/mips/fpu/fesetround.c @@ -28,7 +28,7 @@ fesetround (int round) if ((round & ~0x3) != 0) /* ROUND is no valid rounding mode. */ - return 0; + return 1; /* Get current state. */ _FPU_GETCW (cw); @@ -39,5 +39,5 @@ fesetround (int round) /* Set new state. */ _FPU_SETCW (cw); - return 1; + return 0; } From fc16ca32545dc9fa488c37c3ae602be1a239814f Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 1 Feb 2000 08:28:15 +0000 Subject: [PATCH 1779/4487] 2000-02-01 Andreas Jaeger * sysdeps/mips/elf/start.S: Rewritten for __libc_start_main. --- sysdeps/mips/elf/start.S | 107 ++++++++++----------------------------- 1 file changed, 26 insertions(+), 81 deletions(-) diff --git a/sysdeps/mips/elf/start.S b/sysdeps/mips/elf/start.S index ce9ad9c7ec..b432953251 100644 --- a/sysdeps/mips/elf/start.S +++ b/sysdeps/mips/elf/start.S @@ -1,5 +1,5 @@ /* Startup code compliant to the ELF Mips ABI. - Copyright (C) 1995, 1997 Free Software Foundation, Inc. + Copyright (C) 1995, 1997, 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 @@ -45,6 +45,12 @@ stack frame. */ + +/* We need to call: + __libc_start_main (int (*main) (int, char **, char **), int argc, + char **argv, void (*init) (void), void (*fini) (void), + void (*rtld_fini) (void), void *stack_end) +*/ #ifdef PIC /* A macro to (re)initialize gp. We can get the run time address of 0f in ra ($31) by blezal instruction. In this early phase, we can't save gp @@ -66,84 +72,28 @@ ENTRY_POINT: #endif move $31, $0 - /* $2 contains the address of the shared library termination - function, which we will register with `atexit' to be called by - `exit'. I suspect that on some systems, and when statically - linked, this will not be set by anything to any function - pointer; hopefully it will be zero so we don't try to call - random pointers. */ - beq $2, $0, nofini - move $4, $2 - jal atexit -#ifdef PIC - SET_GP -#endif -nofini: - - /* Do essential libc initialization. In statically linked - programs under the GNU Hurd, this is what sets up the - arguments on the stack for the code below. Since the argument - registers (a0 - a3) saved to the first 4 stack entries by - the prologue of __libc_init_first, we preload them to - prevent clobbering the stack tops. In Hurd case, stack pointer - ($29) may be VM_MAX_ADDRESS here. If so, we must modify it. */ -#if 0 - jal mach_host_self -#endif - li $4, 0x80000000 - bne $29, $4, 1f - subu $29, 16 - sw $0, 0($29) - sw $0, 4($29) - sw $0, 8($29) - sw $0, 12($29) -1: - lw $4, 0($29) - lw $5, 4($29) - lw $6, 8($29) - lw $7, 12($29) - jal __libc_init_first -#ifdef PIC - SET_GP -#endif - lw $4, 0($29) - lw $5, 4($29) - lw $6, 8($29) - lw $7, 12($29) - - /* Call `_init', which is the entry point to our own `.init' - section; and register with `atexit' to have `exit' call - `_fini', which is the entry point to our own `.fini' section. */ - jal _init -#ifdef PIC - SET_GP -#endif #if (__mips64) - dla $4, _fini -#else /* __mips64 */ - la $4, _fini -#endif /* __mips64 */ - - jal atexit -#ifdef PIC - SET_GP + dla $4, main /* main */ + lw $5, 0($29) /* argc */ + addu $6, $29, 4 /* argv */ + /* Allocate space on the stack for seven arguments but align to 32. */ + subu $29, 32 + dla $7, _init /* init */ + dla $8, _fini +#else + la $4, main /* main */ + lw $5, 0($29) /* argc */ + addu $6, $29, 4 /* argv */ + /* Allocate space on the stack for seven arguments but align to 32. */ + subu $29, 32 + la $7, _init /* init */ + la $8, _fini #endif + sw $8, 16($29) /* fini */ + sw $2, 20($29) /* rtld_fini */ + sw $29, 24($29) /* stack_end */ + jal __libc_start_main - /* Extract the arguments and environment as encoded on the stack - and set up the arguments for `main': argc, argv, envp. */ - lw $4, 0($29) /* argc */ - addu $5, $29, 4 /* argv */ - sll $6, $4, 2 - addu $6, $6, 4 - addu $6, $5, $6 /* envp = &argv[argc + 1] */ - - /* Call the user's main function, and exit with its value. */ - jal main -#ifdef PIC - SET_GP -#endif - move $4, $2 - jal exit /* This should never return. */ hlt: b hlt /* Crash if somehow it does return. */ /* Define a symbol for the first piece of initialized data. */ @@ -153,8 +103,3 @@ __data_start: .long 0 .weak data_start data_start = __data_start - - .comm errno, 4, 4 -#ifdef __ELF__ - .type errno, @object -#endif From e67a8419c745fe9285cddcf9cc2de17d825a657e Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 1 Feb 2000 11:20:19 +0000 Subject: [PATCH 1780/4487] 2000-02-01 Andreas Jaeger * sysdeps/unix/sysv/linux/mips/sys/ucontext.h: Add missing ints. --- sysdeps/unix/sysv/linux/mips/sys/ucontext.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h index dd534eae20..e9a4fbc366 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 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 @@ -30,7 +30,7 @@ /* Type for general register. */ -typedef unsigned long greg_t; +typedef unsigned long int greg_t; /* Number of general registers. */ #define NGREG 37 @@ -67,7 +67,7 @@ typedef struct /* Userlevel context. */ typedef struct ucontext { - unsigned long uc_flags; + unsigned long int uc_flags; struct ucontext *uc_link; stack_t uc_stack; mcontext_t uc_mcontext; From 7289f2bbfba0fa01ad5dde270b693ed6f7051d07 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 1 Feb 2000 11:54:37 +0000 Subject: [PATCH 1781/4487] 2000-02-01 Andreas Jaeger * sysdeps/unix/sysv/linux/mips/init-first.h: New file, from Ralf Baechle . * sysdeps/unix/sysv/linux/mips/brk.c: New file. --- sysdeps/unix/sysv/linux/mips/brk.c | 56 +++++++++++++++++++++++ sysdeps/unix/sysv/linux/mips/init-first.h | 51 +++++++++++++++++++++ 2 files changed, 107 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/mips/brk.c create mode 100644 sysdeps/unix/sysv/linux/mips/init-first.h diff --git a/sysdeps/unix/sysv/linux/mips/brk.c b/sysdeps/unix/sysv/linux/mips/brk.c new file mode 100644 index 0000000000..ce8561797d --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/brk.c @@ -0,0 +1,56 @@ +/* brk system call for Linux/MIPS. + Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include + +void *__curbrk = 0; + +/* Old braindamage in GCC's crtstuff.c requires this symbol in an attempt + to work around different old braindamage in the old Linux/x86 ELF + dynamic linker. Sigh. */ +weak_alias (__curbrk, ___brk_addr) + +int +__brk (void *addr) +{ + void *newbrk; + + { + register long int res __asm__ ("$2"); + + asm ("move\t$4,%2\n\t" + "syscall" /* Perform the system call. */ + : "=r" (res) + : "0" (SYS_ify (brk)), "r" (addr) + : "$4", "$7"); + newbrk = (void *) res; + } + __curbrk = newbrk; + + if (newbrk < addr) + { + __set_errno (ENOMEM); + return -1; + } + + return 0; +} +weak_alias (__brk, brk) diff --git a/sysdeps/unix/sysv/linux/mips/init-first.h b/sysdeps/unix/sysv/linux/mips/init-first.h new file mode 100644 index 0000000000..d8c2f38c78 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/init-first.h @@ -0,0 +1,51 @@ +/* Prepare arguments for library initialization function. + Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* The job of this fragment it to find argc and friends for INIT. + This is done in one of two ways: either in the stack context + of program start, or having dlopen pass them in. */ + +#define SYSDEP_CALL_INIT(NAME, INIT) \ + asm(".weak _dl_starting_up\n\t" \ + ".globl " #NAME "\n\t" \ + ".ent " #NAME "\n" \ + #NAME ":\n\t" \ + ".set noreorder\n\t" \ + ".cpload $25\n\t" \ + ".set reorder\n\t" \ + /* Are we a dynamic libc being loaded into a static program? */ \ + "la $8, _dl_starting_up\n\t" \ + "beqz $8, 1f\n\t" \ + "lw $8, 0($8)\n\t" \ + "seq $8, $8, 0\n" \ + "1:\t" \ + "sw $8, __libc_multiple_libcs\n\t" \ + /* If so, argc et al are in a0-a2 already. Otherwise, load them. */ \ + "bnez $8, 2f\n\t" \ + "lw $4, 16($29)\n\t" \ + "addiu $5, $29, 20\n\t" \ + "sll $6, $4, 2\n\t" \ + "addiu $6, $6, 4\n\t" \ + "addu $6, $5, $6\n" \ + "2:\t" \ + "la $25, " #INIT "\n\t" \ + "jr $25\n\t" \ + ".end " #NAME "\n\t" \ + "3:\t" \ + ".size " #NAME ", 3b-" #NAME); From bbfe4cc5897e0b150f1b2a243a0e35993714e97b Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 1 Feb 2000 13:39:59 +0000 Subject: [PATCH 1782/4487] 2000-02-01 Andreas Jaeger * sysdeps/unix/sysv/linux/mips/lxstat.c: Removed, we can use the generic function. * sysdeps/unix/sysv/linux/mips/fxstat.c: Likewise. --- sysdeps/unix/sysv/linux/mips/fxstat.c | 80 --------------------------- sysdeps/unix/sysv/linux/mips/lxstat.c | 80 --------------------------- 2 files changed, 160 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/mips/fxstat.c delete mode 100644 sysdeps/unix/sysv/linux/mips/lxstat.c diff --git a/sysdeps/unix/sysv/linux/mips/fxstat.c b/sysdeps/unix/sysv/linux/mips/fxstat.c deleted file mode 100644 index 4a3c486a4a..0000000000 --- a/sysdeps/unix/sysv/linux/mips/fxstat.c +++ /dev/null @@ -1,80 +0,0 @@ -/* fxstat using old-style Unix fstat system call. - Copyright (C) 1991, 1995, 1996, 1997 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include -#include -#include - -#include - -extern int __syscall_fstat (int, struct kernel_stat *); - -/* Get information about the file descriptor FD in BUF. */ -int -__fxstat (int vers, int fd, struct stat *buf) -{ - struct kernel_stat kbuf; - int result; - - switch (vers) - { - case _STAT_VER_LINUX_OLD: - /* Nothing to do. The struct is in the form the kernel expects - it to be. */ - result = __syscall_fstat (fd, (struct kernel_stat *) buf); - break; - - case _STAT_VER_LINUX: - /* Do the system call. */ - result = __syscall_fstat (fd, &kbuf); - - /* Convert to current kernel version of `struct stat'. */ - buf->st_dev = kbuf.st_dev; - buf->st_pad1[0] = 0; buf->st_pad1[1] = 0; buf->st_pad1[2] = 0; - buf->st_ino = kbuf.st_ino; - buf->st_mode = kbuf.st_mode; - buf->st_nlink = kbuf.st_nlink; - buf->st_uid = kbuf.st_uid; - buf->st_gid = kbuf.st_gid; - buf->st_rdev = kbuf.st_rdev; - buf->st_pad2[0] = 0; buf->st_pad2[1] = 0; - buf->st_pad3 = 0; - buf->st_size = kbuf.st_size; - buf->st_blksize = kbuf.st_blksize; - buf->st_blocks = kbuf.st_blocks; - - buf->st_atime = kbuf.st_atime; buf->__reserved0 = 0; - buf->st_mtime = kbuf.st_mtime; buf->__reserved1 = 0; - buf->st_ctime = kbuf.st_ctime; buf->__reserved2 = 0; - - buf->st_pad4[0] = 0; buf->st_pad4[1] = 0; - buf->st_pad4[2] = 0; buf->st_pad4[3] = 0; - buf->st_pad4[4] = 0; buf->st_pad4[5] = 0; - buf->st_pad4[6] = 0; buf->st_pad4[7] = 0; - break; - - default: - __set_errno (EINVAL); - result = -1; - break; - } - - return result; -} -weak_alias (__fxstat, _fxstat) diff --git a/sysdeps/unix/sysv/linux/mips/lxstat.c b/sysdeps/unix/sysv/linux/mips/lxstat.c deleted file mode 100644 index 7907b2f2d2..0000000000 --- a/sysdeps/unix/sysv/linux/mips/lxstat.c +++ /dev/null @@ -1,80 +0,0 @@ -/* lxstat using old-style Unix lstat system call. - Copyright (C) 1991, 1995, 1996, 1997 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include -#include -#include - -#include - -extern int __syscall_lstat (const char *, struct kernel_stat *); - -/* Get information about the file NAME in BUF. */ -int -__lxstat (int vers, const char *name, struct stat *buf) -{ - struct kernel_stat kbuf; - int result; - - switch (vers) - { - case _STAT_VER_LINUX_OLD: - /* Nothing to do. The struct is in the form the kernel expects - it to be. */ - result = __syscall_lstat (name, (struct kernel_stat *) buf); - break; - - case _STAT_VER_LINUX: - /* Do the system call. */ - result = __syscall_lstat (name, &kbuf); - - /* Convert to current kernel version of `struct stat'. */ - buf->st_dev = kbuf.st_dev; - buf->st_pad1[0] = 0; buf->st_pad1[1] = 0; buf->st_pad1[2] = 0; - buf->st_ino = kbuf.st_ino; - buf->st_mode = kbuf.st_mode; - buf->st_nlink = kbuf.st_nlink; - buf->st_uid = kbuf.st_uid; - buf->st_gid = kbuf.st_gid; - buf->st_rdev = kbuf.st_rdev; - buf->st_pad2[0] = 0; buf->st_pad2[1] = 0; - buf->st_pad3 = 0; - buf->st_size = kbuf.st_size; - buf->st_blksize = kbuf.st_blksize; - buf->st_blocks = kbuf.st_blocks; - - buf->st_atime = kbuf.st_atime; buf->__reserved0 = 0; - buf->st_mtime = kbuf.st_mtime; buf->__reserved1 = 0; - buf->st_ctime = kbuf.st_ctime; buf->__reserved2 = 0; - - buf->st_pad4[0] = 0; buf->st_pad4[1] = 0; - buf->st_pad4[2] = 0; buf->st_pad4[3] = 0; - buf->st_pad4[4] = 0; buf->st_pad4[5] = 0; - buf->st_pad4[6] = 0; buf->st_pad4[7] = 0; - break; - - default: - __set_errno (EINVAL); - result = -1; - break; - } - - return result; -} -weak_alias (__lxstat, _lxstat) From d86bec0d491146f387ac6ab629032ed7be84a50c Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 1 Feb 2000 16:50:51 +0000 Subject: [PATCH 1783/4487] 2000-02-01 Andreas Jaeger * sysdeps/unix/sysv/linux/mips/syscalls.list: Remove duplicates. --- sysdeps/unix/sysv/linux/mips/syscalls.list | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index 5ddba9b4f6..a4cae307d1 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -35,15 +35,12 @@ socket - socket 3 __socket socket socketpair - socketpair 4 __socketpair socketpair # -# There are defined locally because the caller is also defined in this dir. +# These are defined locally because the caller is also defined in this dir. # s_llseek llseek _llseek 5 __syscall__llseek s_sigaction sigaction sigaction 3 __syscall_sigaction s_ustat ustat ustat 2 __syscall_ustat sys_mknod xmknod mknod 3 __syscall_mknod -sys_fstat fxstat fstat 2 __syscall_fstat -sys_lstat lxstat lstat 2 __syscall_lstat -sys_stat xstat stat 2 __syscall_stat # System calls with wrappers. rt_sigaction - rt_sigaction 4 __syscall_rt_sigaction @@ -71,7 +68,6 @@ s_sigprocmask sigprocmask sigprocmask 3 __syscall_sigprocmask sysctl sysctl _sysctl 1 __syscall_sysctl sys_fstat fxstat fstat 2 __syscall_fstat sys_lstat lxstat lstat 2 __syscall_lstat -sys_mknod xmknod mknod 3 __syscall_mknod sys_readv readv readv 3 __syscall_readv sys_stat xstat stat 2 __syscall_stat sys_writev writev writev 3 __syscall_writev From ede084048d0fdc71dc458a11860086b3bc432afa Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 3 Feb 2000 14:10:24 +0000 Subject: [PATCH 1784/4487] 2000-02-03 Andreas Jaeger * sysdeps/unix/sysv/linux/mips/sigcontextinfo.h: New file. * sysdeps/unix/sysv/linux/mips/register-dump.h: New file. * sysdeps/mips/stackinfo.h: New file. --- sysdeps/mips/stackinfo.h | 28 +++++ sysdeps/unix/sysv/linux/mips/register-dump.h | 110 ++++++++++++++++++ sysdeps/unix/sysv/linux/mips/sigcontextinfo.h | 25 ++++ 3 files changed, 163 insertions(+) create mode 100644 sysdeps/mips/stackinfo.h create mode 100644 sysdeps/unix/sysv/linux/mips/register-dump.h create mode 100644 sysdeps/unix/sysv/linux/mips/sigcontextinfo.h diff --git a/sysdeps/mips/stackinfo.h b/sysdeps/mips/stackinfo.h new file mode 100644 index 0000000000..612d251807 --- /dev/null +++ b/sysdeps/mips/stackinfo.h @@ -0,0 +1,28 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* This file contains a bit of information about the stack allocation + of the processor. */ + +#ifndef _STACKINFO_H +#define _STACKINFO_H 1 + +/* On MIPS the stack grows down. */ +#define _STACK_GROWS_DOWN 1 + +#endif /* stackinfo.h */ diff --git a/sysdeps/unix/sysv/linux/mips/register-dump.h b/sysdeps/unix/sysv/linux/mips/register-dump.h new file mode 100644 index 0000000000..c48980dbb5 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/register-dump.h @@ -0,0 +1,110 @@ +/* Dump registers. + Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Jaeger , 2000. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +/* We will print the register dump in this format: + + R0 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX + R8 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX + R16 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX + R24 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX + pc cause status badvaddr lo hi + XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX + The FPU registers will not be printed. +*/ + +static void +hexvalue (unsigned long int value, char *buf, size_t len) +{ + char *cp = _itoa_word (value, buf + len, 16, 0); + while (cp > buf) + *--cp = '0'; +} + +static void +register_dump (int fd, struct sigcontext *ctx) +{ + char regs[32][8]; + char fpregs[32][8]; + struct iovec iov[97]; XXX + size_t nr = 0; + int i; + +#define ADD_STRING(str) \ + iov[nr].iov_base = (char *) str; \ + iov[nr].iov_len = strlen (str); \ + ++nr +#define ADD_MEM(str, len) \ + iov[nr].iov_base = str; \ + iov[nr].iov_len = len; \ + ++nr + + /* Generate strings of register contents. */ + for (i = 0; i < 31; i++) + hexvalue (ctx->sc_regs, regs[i], 8); + hexvalue (ctx->sc_pc, regs[32], 8); + hexvalue (ctx->sc_cause, regs[33], 8); + hexvalue (ctx->sc_status, regs[34], 8); + hexvalue (ctx->badvaddr, regs[35], 8); + hexvalue (ctx->sc_mdhi, regs[36], 8); + hexvalue (ctx->sc_mdlo, regs[37], 8); + + /* Generate the output. */ + ADD_STRING ("Register dump:\n\n R0 "); + for (i = 0; i < 8; i++) + { + ADD_MEM (regs[i], 8); + ADD_STRING (" ", 1); + } + ADD_STRING ("\n R8 "); + for (i = 8; i < 16; i++) + { + ADD_MEM (regs[i], 8); + ADD_STRING (" ", 1); + } + ADD_STRING ("\n R16 "); + for (i = 16; i < 24; i++) + { + ADD_MEM (regs[i], 8); + ADD_STRING (" ", 1); + } + ADD_STRING ("\n R24 "); + for (i = 24; i < 32; i++) + { + ADD_MEM (regs[i], 8); + ADD_STRING (" ", 1); + } + ADD_STRING ("\n pc cause status badvaddr lo hi\n "); + ADD_MEM (regs[], 8); + for (i = 32; i < 38; i++) + { + ADD_MEM (regs[i], 8); + ADD_STRING (" ", 1); + } + ADD_STRING ("\n", 1); + + /* Write the stuff out. */ + writev (fd, iov, nr); +} + + +#define REGISTER_DUMP register_dump (fd, &ctx) diff --git a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h new file mode 100644 index 0000000000..2d9f280b12 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h @@ -0,0 +1,25 @@ +/* Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Jaeger , 2000. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + +#define SIGCONTEXT struct sigcontext +#define SIGCONTEXT_EXTRA_ARGS +#define GET_PC(ctx) ((void *) ctx.pc) +#define GET_FRAME(ctx) ((void *) ctx.sc_regs[30]) +#define GET_STACK(ctx) ((void *) ctx.sc_regs[29]) From ae8736b79852eaf7dc00d592a906faff5954954d Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 3 Feb 2000 15:03:50 +0000 Subject: [PATCH 1785/4487] 2000-02-03 Andreas Jaeger * sysdeps/mips/abort-instr.h: New file. --- sysdeps/mips/abort-instr.h | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sysdeps/mips/abort-instr.h diff --git a/sysdeps/mips/abort-instr.h b/sysdeps/mips/abort-instr.h new file mode 100644 index 0000000000..d7d8d501b3 --- /dev/null +++ b/sysdeps/mips/abort-instr.h @@ -0,0 +1,2 @@ +/* An instruction which should crash any program is a breakpoint. */ +#define ABORT_INSTRUCTION asm ("break 255") From 19918d3ddd03c90b126765f502ee692cf511ba6d Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 4 Feb 2000 16:38:20 +0000 Subject: [PATCH 1786/4487] 2000-02-04 Andreas Jaeger * sysdeps/unix/sysv/linux/mips/bits/mman.h: Use correct values for the defines. --- sysdeps/unix/sysv/linux/mips/bits/mman.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/mman.h b/sysdeps/unix/sysv/linux/mips/bits/mman.h index be460ab6c6..0efbab2f21 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/mman.h +++ b/sysdeps/unix/sysv/linux/mips/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/PowerPC version. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 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 @@ -46,27 +46,27 @@ #define MAP_FIXED 0x10 /* Interpret addr exactly. */ #ifdef __USE_MISC # define MAP_FILE 0x00 -# define MAP_ANONYMOUS 0x20 /* Don't use a file. */ +# define MAP_ANONYMOUS 0x0800 /* Don't use a file. */ # define MAP_ANON MAP_ANONYMOUS # define MAP_RENAME MAP_ANONYMOUS #endif /* These are Linux-specific. */ #ifdef __USE_MISC -# define MAP_GROWSDOWN 0x0100 /* Stack-like segment. */ -# define MAP_DENYWRITE 0x0800 /* ETXTBSY */ -# define MAP_EXECUTABLE 0x1000 /* Mark it as an executable. */ -# define MAP_NORESERVE 0x0040 /* Don't check for reservations. */ +# define MAP_GROWSDOWN 0x1000 /* Stack-like segment. */ +# define MAP_DENYWRITE 0x2000 /* ETXTBSY */ +# define MAP_EXECUTABLE 0x4000 /* Mark it as an executable. */ +# define MAP_NORESERVE 0x0400 /* Don't check for reservations. */ #endif /* Flags to `msync'. */ #define MS_ASYNC 1 /* Sync memory asynchronously. */ -#define MS_SYNC 4 /* Synchronous memory sync. */ +#define MS_SYNC 0 /* Synchronous memory sync. */ #define MS_INVALIDATE 2 /* Invalidate the caches. */ /* Flags for `mlockall'. */ -#define MCL_CURRENT 0x2000 /* Lock all currently mapped pages. */ -#define MCL_FUTURE 0x4000 /* Lock all additions to address +#define MCL_CURRENT 1 /* Lock all currently mapped pages. */ +#define MCL_FUTURE 2 /* Lock all additions to address space. */ /* Flags for `mremap'. */ From 4cd50e5eb82bf8f3b762b153b970ba7f0c91b5e2 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 4 Feb 2000 16:40:32 +0000 Subject: [PATCH 1787/4487] Fix typo in comment. --- sysdeps/unix/sysv/linux/mips/bits/mman.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/mman.h b/sysdeps/unix/sysv/linux/mips/bits/mman.h index 0efbab2f21..63c8b747f8 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/mman.h +++ b/sysdeps/unix/sysv/linux/mips/bits/mman.h @@ -1,4 +1,4 @@ -/* Definitions for POSIX memory map interface. Linux/PowerPC version. +/* Definitions for POSIX memory map interface. Linux/MIPS version. Copyright (C) 1997, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. From 22e908b01a91acc84a10b3032decbb60c6dccb0f Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sat, 5 Feb 2000 07:45:59 +0000 Subject: [PATCH 1788/4487] 2000-02-05 Andreas Jaeger * sysdeps/unix/sysv/linux/mips/bits/mman.h (MS_SYNC): 0 will not work - set to 4 in accordance with changes made in the Linux/MIPS kernel. Using MS_SYNC on older kernels with MS_SYNC == 0 doesn't actually work. --- sysdeps/unix/sysv/linux/mips/bits/mman.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/mman.h b/sysdeps/unix/sysv/linux/mips/bits/mman.h index 63c8b747f8..5b8c752ccd 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/mman.h +++ b/sysdeps/unix/sysv/linux/mips/bits/mman.h @@ -61,8 +61,8 @@ /* Flags to `msync'. */ #define MS_ASYNC 1 /* Sync memory asynchronously. */ -#define MS_SYNC 0 /* Synchronous memory sync. */ #define MS_INVALIDATE 2 /* Invalidate the caches. */ +#define MS_SYNC 4 /* Synchronous memory sync. */ /* Flags for `mlockall'. */ #define MCL_CURRENT 1 /* Lock all currently mapped pages. */ From 25fdf1f5c1d1ddc4c97254254b8d2b6823553886 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 8 Feb 2000 09:46:01 +0000 Subject: [PATCH 1789/4487] 2000-02-08 Andreas Jaeger * sysdeps/unix/sysv/linux/mips/pwrite64.c: Define __libc_* variant for cancelation wrapper; use __ASSUME_PWRITE_SYSCALL macro. * sysdeps/unix/sysv/linux/mips/pread64.c: Likewise. * sysdeps/unix/sysv/linux/mips/pwrite.c: Likewise. * sysdeps/unix/sysv/linux/mips/pread.c: Likewise. --- sysdeps/unix/sysv/linux/mips/pread.c | 33 +++++++++++++++--------- sysdeps/unix/sysv/linux/mips/pread64.c | 34 ++++++++++++++++--------- sysdeps/unix/sysv/linux/mips/pwrite.c | 29 +++++++++++++-------- sysdeps/unix/sysv/linux/mips/pwrite64.c | 31 ++++++++++++++-------- 4 files changed, 83 insertions(+), 44 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/pread.c b/sysdeps/unix/sysv/linux/mips/pread.c index c3bdcf9cc7..d926a06508 100644 --- a/sysdeps/unix/sysv/linux/mips/pread.c +++ b/sysdeps/unix/sysv/linux/mips/pread.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -23,17 +23,21 @@ #include #include -#ifdef __NR_pread +#include -extern ssize_t __syscall_pread (int fd, void *buf, size_t count, int dummy, - off_t offset_hi, off_t offset_lo); +#if defined __NR_pread || __ASSUME_PREAD_SYSCALL > 0 +# if __ASSUME_PREAD_SYSCALL == 0 static ssize_t __emulate_pread (int fd, void *buf, size_t count, off_t offset) internal_function; +# endif +extern ssize_t __syscall_pread (int fd, void *buf, size_t count, int dummy, + off_t offset_hi, off_t offset_lo); + ssize_t -__pread (fd, buf, count, offset) +__libc_pread (fd, buf, count, offset) int fd; void *buf; size_t count; @@ -42,21 +46,26 @@ __pread (fd, buf, count, offset) ssize_t result; /* First try the syscall. */ -#if defined(__MIPSEB__) +# if defined(__MIPSEB__) result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, 0, offset); -#elif defined(__MIPSEL__) +# elif defined(__MIPSEL__) result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, offset, 0); -#endif +# endif +# if __ASSUME_PREAD_SYSCALL == 0 if (result == -1 && errno == ENOSYS) /* No system call available. Use the emulation. */ result = __emulate_pread (fd, buf, count, offset); - +# endif return result; } -weak_alias (__pread, pread) +strong_alias (__libc_pread, __pread) +weak_alias (__libc_pread, pread) -#define __pread(fd, buf, count, offset) \ +# define __libc_pread(fd, buf, count, offset) \ static internal_function __emulate_pread (fd, buf, count, offset) #endif -#include + +#if __ASSUME_PREAD_SYSCALL == 0 +# include +#endif diff --git a/sysdeps/unix/sysv/linux/mips/pread64.c b/sysdeps/unix/sysv/linux/mips/pread64.c index dfcfa01318..85fe77c762 100644 --- a/sysdeps/unix/sysv/linux/mips/pread64.c +++ b/sysdeps/unix/sysv/linux/mips/pread64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -23,17 +23,22 @@ #include #include -#ifdef __NR_pread +#include -extern ssize_t __syscall_pread (int fd, void *buf, size_t count, int dummy, - off_t offset_hi, off_t offset_lo); +#if defined __NR_pread || __ASSUME_PREAD_SYSCALL > 0 +# if __ASSUME_PREAD_SYSCALL == 0 static ssize_t __emulate_pread64 (int fd, void *buf, size_t count, off64_t offset) internal_function; +# endif + +extern ssize_t __syscall_pread (int fd, void *buf, size_t count, int dummy, + off_t offset_hi, off_t offset_lo); + ssize_t -__pread64 (fd, buf, count, offset) +__libc_pread64 (fd, buf, count, offset) int fd; void *buf; size_t count; @@ -42,24 +47,29 @@ __pread64 (fd, buf, count, offset) ssize_t result; /* First try the syscall. */ -#if defined(__MIPSEB__) +# if defined(__MIPSEB__) result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, (off_t) (offset >> 32), (off_t) (offset & 0xffffffff)); -#elif defined(__MIPSEL__) +# elif defined(__MIPSEL__) result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, (off_t) (offset & 0xffffffff), (off_t) (offset >> 32)); -#endif +# endif +# if __ASSUME_PREAD_SYSCALL == 0 if (result == -1 && errno == ENOSYS) /* No system call available. Use the emulation. */ result = __emulate_pread64 (fd, buf, count, offset); - +# endif return result; } -weak_alias (__pread64, pread64) +strong_alias (__libc_pread64, __pread64) +weak_alias (__libc_pread64, pread64) -#define __pread64(fd, buf, count, offset) \ +# define __libc_pread64(fd, buf, count, offset) \ static internal_function __emulate_pread64 (fd, buf, count, offset) #endif -#include + +#if __ASSUME_PREAD_SYSCALL == 0 +# include +#endif diff --git a/sysdeps/unix/sysv/linux/mips/pwrite.c b/sysdeps/unix/sysv/linux/mips/pwrite.c index 274c14266e..a83df31ca4 100644 --- a/sysdeps/unix/sysv/linux/mips/pwrite.c +++ b/sysdeps/unix/sysv/linux/mips/pwrite.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -23,17 +23,20 @@ #include #include -#ifdef __NR_pwrite +#include + +#if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0 extern ssize_t __syscall_pwrite (int fd, const void *buf, size_t count, int dummy, off_t offset_hi, off_t offset_lo); +# if __ASSUME_PWRITE_SYSCALL == 0 static ssize_t __emulate_pwrite (int fd, const void *buf, size_t count, off_t offset) internal_function; - +# endif ssize_t -__pwrite (fd, buf, count, offset) +__libc_pwrite (fd, buf, count, offset) int fd; const void *buf; size_t count; @@ -42,21 +45,27 @@ __pwrite (fd, buf, count, offset) ssize_t result; /* First try the syscall. */ -#if defined(__MIPSEB__) +# if defined(__MIPSEB__) result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, 0, offset); -#elif defined(__MIPSEL__) +# elif defined(__MIPSEL__) result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, offset, 0); -#endif +# endif +# if __ASSUME_PWRITE_SYSCALL == 0 if (result == -1 && errno == ENOSYS) /* No system call available. Use the emulation. */ result = __emulate_pwrite (fd, buf, count, offset); +# endif return result; } -weak_alias (__pwrite, pwrite) +strong_alias (__libc_pwrite, __pwrite) +weak_alias (__libc_pwrite, pwrite) -#define __pwrite(fd, buf, count, offset) \ +# define __libc_pwrite(fd, buf, count, offset) \ static internal_function __emulate_pwrite (fd, buf, count, offset) #endif -#include + +#if __ASSUME_PWRITE_SYSCALL == 0 +# include +#endif diff --git a/sysdeps/unix/sysv/linux/mips/pwrite64.c b/sysdeps/unix/sysv/linux/mips/pwrite64.c index f73b10e0aa..2086f76985 100644 --- a/sysdeps/unix/sysv/linux/mips/pwrite64.c +++ b/sysdeps/unix/sysv/linux/mips/pwrite64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ralf Baechle , 1998. @@ -23,17 +23,20 @@ #include #include -#ifdef __NR_pwrite +#include + +#if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0 extern ssize_t __syscall_pwrite (int fd, const void *buf, size_t count, int dummy, off_t offset_hi, off_t offset_lo); +# if __ASSUME_PWRITE_SYSCALL == 0 static ssize_t __emulate_pwrite64 (int fd, const void *buf, size_t count, off64_t offset) internal_function; - +# endif ssize_t -__pwrite64 (fd, buf, count, offset) +__libc_pwrite64 (fd, buf, count, offset) int fd; const void *buf; size_t count; @@ -42,24 +45,32 @@ __pwrite64 (fd, buf, count, offset) ssize_t result; /* First try the syscall. */ -#if defined(__MIPSEB__) +# if defined(__MIPSEB__) result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, (off_t) (offset >> 32), (off_t) (offset & 0xffffffff)); -#elif defined(__MIPSEL__) +# elif defined(__MIPSEL__) result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, (off_t) (offset & 0xffffffff), (off_t) (offset >> 32)); -#endif +# endif + +# if __ASSUME_PWRITE_SYSCALL == 0 if (result == -1 && errno == ENOSYS) /* No system call available. Use the emulation. */ result = __emulate_pwrite64 (fd, buf, count, offset); +# endif return result; } -weak_alias (__pwrite64, pwrite64) +strong_alias (__libc_pwrite64, __pwrite64) +weak_alias (__libc_pwrite64, pwrite64) -#define __pwrite64(fd, buf, count, offset) \ +# define __libc_pwrite64(fd, buf, count, offset) \ static internal_function __emulate_pwrite64 (fd, buf, count, offset) #endif -#include + +#if __ASSUME_PWRITE_SYSCALL == 0 +# include +#endif + From b3be99749f4d8d371d1bc5a0a11547d2a4b14bf2 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 8 Feb 2000 13:41:37 +0000 Subject: [PATCH 1790/4487] 2000-02-08 Andreas Jaeger * sysdeps/unix/sysv/linux/mips/bits/termios.h: Remove members c_ispeed and c_ospeed which are not implemented. --- sysdeps/unix/sysv/linux/mips/bits/termios.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/termios.h b/sysdeps/unix/sysv/linux/mips/bits/termios.h index e43c03b54b..f7abe474df 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/termios.h +++ b/sysdeps/unix/sysv/linux/mips/bits/termios.h @@ -68,8 +68,6 @@ struct termios tcflag_t c_lflag; /* local mode flags */ cc_t c_line; /* line discipline */ cc_t c_cc[NCCS]; /* control characters */ - speed_t c_ispeed; /* input speed */ - speed_t c_ospeed; /* output speed */ }; /* c_cc characters */ @@ -93,7 +91,7 @@ struct termios * VDSUSP is not supported */ #if defined __USE_BSD -#define VDSUSP 11 /* Delayed suspend character [ISIG]. */ +# define VDSUSP 11 /* Delayed suspend character [ISIG]. */ #endif #endif #ifdef __USE_BSD From ff75a64c4a2227347d6ba51756c6cd10fd84ddde Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 8 Feb 2000 16:36:09 +0000 Subject: [PATCH 1791/4487] 2000-02-08 Andreas Jaeger * sysdeps/unix/sysv/linux/mips/register-dump.h (register_dump): Fix usage of macro ADD_STRING. --- sysdeps/unix/sysv/linux/mips/register-dump.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/register-dump.h b/sysdeps/unix/sysv/linux/mips/register-dump.h index c48980dbb5..61a4688242 100644 --- a/sysdeps/unix/sysv/linux/mips/register-dump.h +++ b/sysdeps/unix/sysv/linux/mips/register-dump.h @@ -73,34 +73,34 @@ register_dump (int fd, struct sigcontext *ctx) for (i = 0; i < 8; i++) { ADD_MEM (regs[i], 8); - ADD_STRING (" ", 1); + ADD_STRING (" "); } ADD_STRING ("\n R8 "); for (i = 8; i < 16; i++) { ADD_MEM (regs[i], 8); - ADD_STRING (" ", 1); + ADD_STRING (" "); } ADD_STRING ("\n R16 "); for (i = 16; i < 24; i++) { ADD_MEM (regs[i], 8); - ADD_STRING (" ", 1); + ADD_STRING (" "); } ADD_STRING ("\n R24 "); for (i = 24; i < 32; i++) { ADD_MEM (regs[i], 8); - ADD_STRING (" ", 1); + ADD_STRING (" "); } ADD_STRING ("\n pc cause status badvaddr lo hi\n "); ADD_MEM (regs[], 8); for (i = 32; i < 38; i++) { ADD_MEM (regs[i], 8); - ADD_STRING (" ", 1); + ADD_STRING (" "); } - ADD_STRING ("\n", 1); + ADD_STRING ("\n"); /* Write the stuff out. */ writev (fd, iov, nr); From fb8168397d78fd345c0eddcd5b3b3569d0085bd3 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 8 Feb 2000 17:27:15 +0000 Subject: [PATCH 1792/4487] 2000-02-08 Andreas Jaeger * sysdeps/unix/sysv/linux/mips/sigcontextinfo.h (GET_PC): Fix typo. * sysdeps/unix/sysv/linux/mips/register-dump.h (register_dump): Make it compile. --- sysdeps/unix/sysv/linux/mips/register-dump.h | 8 +++----- sysdeps/unix/sysv/linux/mips/sigcontextinfo.h | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/register-dump.h b/sysdeps/unix/sysv/linux/mips/register-dump.h index 61a4688242..e204223054 100644 --- a/sysdeps/unix/sysv/linux/mips/register-dump.h +++ b/sysdeps/unix/sysv/linux/mips/register-dump.h @@ -44,8 +44,7 @@ static void register_dump (int fd, struct sigcontext *ctx) { char regs[32][8]; - char fpregs[32][8]; - struct iovec iov[97]; XXX + struct iovec iov[38]; size_t nr = 0; int i; @@ -60,11 +59,11 @@ register_dump (int fd, struct sigcontext *ctx) /* Generate strings of register contents. */ for (i = 0; i < 31; i++) - hexvalue (ctx->sc_regs, regs[i], 8); + hexvalue (ctx->sc_regs[i], regs[i], 8); hexvalue (ctx->sc_pc, regs[32], 8); hexvalue (ctx->sc_cause, regs[33], 8); hexvalue (ctx->sc_status, regs[34], 8); - hexvalue (ctx->badvaddr, regs[35], 8); + hexvalue (ctx->sc_badvaddr, regs[35], 8); hexvalue (ctx->sc_mdhi, regs[36], 8); hexvalue (ctx->sc_mdlo, regs[37], 8); @@ -94,7 +93,6 @@ register_dump (int fd, struct sigcontext *ctx) ADD_STRING (" "); } ADD_STRING ("\n pc cause status badvaddr lo hi\n "); - ADD_MEM (regs[], 8); for (i = 32; i < 38; i++) { ADD_MEM (regs[i], 8); diff --git a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h index 2d9f280b12..9b3e7ea3a6 100644 --- a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h +++ b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h @@ -20,6 +20,6 @@ #define SIGCONTEXT struct sigcontext #define SIGCONTEXT_EXTRA_ARGS -#define GET_PC(ctx) ((void *) ctx.pc) +#define GET_PC(ctx) ((void *) ctx.sc_pc) #define GET_FRAME(ctx) ((void *) ctx.sc_regs[30]) #define GET_STACK(ctx) ((void *) ctx.sc_regs[29]) From b7393d1c58e0094a0443903658ead2ac90a98243 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 9 Feb 2000 14:58:57 +0000 Subject: [PATCH 1793/4487] 2000-02-09 Andreas Jaeger * sysdeps/unix/sysv/linux/mips/sys/syscall.h: Add new syscalls. * sysdeps/unix/sysv/linux/mips/syscalls.list: Add missing syscalls. --- sysdeps/unix/sysv/linux/mips/sys/syscall.h | 9 ++++++++- sysdeps/unix/sysv/linux/mips/syscalls.list | 8 ++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/sys/syscall.h b/sysdeps/unix/sysv/linux/mips/sys/syscall.h index 36214e4162..27dc08aa5b 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/syscall.h +++ b/sysdeps/unix/sysv/linux/mips/sys/syscall.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,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 @@ -1203,5 +1203,12 @@ #define SYS_sendfile (SYS_Linux + 207) #define SYS_putpmsg (SYS_Linux + 208) #define SYS_getpmsg (SYS_Linux + 209) +#define SYS_mmap2 (SYS_Linux + 210) +#define SYS_truncate64 (SYS_Linux + 211) +#define SYS_ftruncate64 (SYS_Linux + 212) +#define SYS_stat64 (SYS_Linux + 213) +#define SYS_lstat64 (SYS_Linux + 214) +#define SYS_fstat64 (SYS_Linux + 215) + #endif /* sys/syscall.h */ diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index a4cae307d1..6bb4451ff3 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -50,20 +50,28 @@ rt_sigqueueinfo - rt_sigqueueinfo 3 __syscall_rt_sigqueueinfo rt_sigsuspend - rt_sigsuspend 2 __syscall_rt_sigsuspend rt_sigtimedwait - rt_sigtimedwait 4 __syscall_rt_sigtimedwait s_execve execve execve 3 __syscall_execve +s_fstat64 fxstat64 fstat64 2 __syscall_fstat64 +s_ftruncate64 ftruncate64 ftruncate64 3 __syscall_ftruncate64 s_getcwd getcwd getcwd 2 __syscall_getcwd s_getdents getdents getdents 3 __syscall_getdents +s_getpmsg getpmsg getpmsg 5 __syscall_getpmsg s_getpriority getpriority getpriority 2 __syscall_getpriority s_getresgid getresgid getresgid 3 __syscall_getresgid s_getresuid getresuid getresuid 3 __syscall_getresuid s_ipc msgget ipc 5 __syscall_ipc +s_lstat64 lxstat64 lstat64 2 __syscall_lstat64 s_poll poll poll 3 __syscall_poll s_pread64 pread64 pread 6 __syscall_pread +s_putpmsg putpmsg putpmsg 5 __syscall_putpmsg s_ptrace ptrace ptrace 4 __syscall_ptrace s_pwrite64 pwrite64 pwrite 6 __syscall_pwrite s_reboot reboot reboot 3 __syscall_reboot s_setrlimit setrlimit setrlimit 3 __syscall_setrlimit s_sigpending sigpending sigpending 1 __syscall_sigpending s_sigprocmask sigprocmask sigprocmask 3 __syscall_sigprocmask +s_stat64 xstat64 stat64 2 __syscall_stat64 +s_truncate64 truncate64 truncate64 3 __syscall_truncate64 + # Todo: we can pass 6 args in registers, no need for the wrapper sysctl sysctl _sysctl 1 __syscall_sysctl sys_fstat fxstat fstat 2 __syscall_fstat From a233bb29c877f7268159f0e068ea4a7ae761ae25 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 10 Feb 2000 11:09:31 +0000 Subject: [PATCH 1794/4487] 2000-02-10 Andreas Jaeger * sysdeps/unix/sysv/linux/mips/clone.S: Rewritten. Based on a patch by Hiroyuki Machida . --- sysdeps/unix/sysv/linux/mips/clone.S | 68 +++++++++++++--------------- 1 file changed, 32 insertions(+), 36 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/clone.S b/sysdeps/unix/sysv/linux/mips/clone.S index 4d6408dc97..30499bcf43 100644 --- a/sysdeps/unix/sysv/linux/mips/clone.S +++ b/sysdeps/unix/sysv/linux/mips/clone.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ralf Baechle , 1996. @@ -26,9 +26,9 @@ #define _ERRNO_H 1 #include -/* int clone(int (*fn)(), void *child_stack, int flags, int nargs, ...) */ +/* int clone(int (*fn)(), void *child_stack, int flags, void *arg) */ -#define FRAMESZ 4*SZREG +#define FRAMESZ 8*SZREG #if _MIPS_SIM == _MIPS_SIM_ABI32 #define MAX_REG_ARGS 4 #else @@ -36,14 +36,16 @@ #endif .text -NESTED(__clone,4*SZREG,sp) -#ifdef PIC +NESTED(__clone,FRAMESZ,sp) +#ifdef __PIC__ .set noreorder .cpload $25 .set reorder - .cprestore 16 -#endif PTR_SUBIU sp,FRAMESZ + .cprestore SZREG*4 +#else + PTR_SUBIU sp,FRAMESZ +#endif #ifdef PROF .set noat move $1,ra @@ -51,25 +53,20 @@ NESTED(__clone,4*SZREG,sp) .set at #endif + REG_S s0,FRAMESZ-SZREG*2(sp) + REG_S s1,FRAMESZ-SZREG*3(sp) /* Sanity check arguments. */ li v0,EINVAL beqz a0,error /* no NULL function pointers */ beqz a1,error /* no NULL stack pointers */ - bltz a3,error /* no negative argument counts */ /* Allocate space on the new stack and copy args over */ - move t0,a3 # save nargs for __thread_start - PTR_SLL t1,a3,PTR_SCALESHIFT - PTR_ADDU t1,a3,sp -1: REG_L t2,-SZREG(t1) - PTR_SUBIU t1,SZREG - REG_S t2,-SZREG(a1) - PTR_SUBIU a3,1 - PTR_SUBIU a1,SZREG - bnez a3,1b + /* Save the arg for user's function */ + move s0,a3 /* Save arg __thread_start. */ + move s1,a0 /* Save func. pointer. */ + /* Do the system call */ - move t9,a0 # get fn ptr out of the way move a0,a2 li v0,__NR_clone syscall @@ -78,11 +75,15 @@ NESTED(__clone,4*SZREG,sp) beqz v0,__thread_start /* Successful return from the parent */ + REG_L s0,FRAMESZ-SZREG*2(sp) + REG_L s1,FRAMESZ-SZREG*3(sp) PTR_ADDIU sp,FRAMESZ ret /* Something bad happened -- no child created */ error: + REG_L s0,FRAMESZ-SZREG*2(sp) + REG_L s1,FRAMESZ-SZREG*3(sp) PTR_ADDIU sp,FRAMESZ #ifdef PIC la t9,__syscall_error @@ -96,30 +97,25 @@ error: its own function so that we can terminate the stack trace with our debug info. - At this point we have t0=nargs, t9=fn, sp=&arg[0]. */ + At this point we have s0=arg, s1=fn. */ -NESTED(__thread_start,32,sp) - /* Stackframe has been created on entry of clone() */ - /* Calculate address of jump into argument loading code */ - li t1,MAX_REG_ARGS - slt t0,t1,t2 /* max MAX_REG_ARGS args in registers */ - MOVN (t2,t1,t0) - la v0,arg0 - PTR_SLL t1,t0,PTR_SCALESHIFT - PTR_SUBU v0,t1 - jr v0 +NESTED(__thread_start,FRAMESZ,sp) + /* The stackframe has been created on entry of clone(). */ + /* Resort the arg for user's function. */ + move a0,s0 + move t9,s1 - /* Load the integer register arguments */ - REG_L a0,SZREG(sp) -arg0: - - /* Call the user's function */ + /* Call the user's function. */ jalr t9 - /* Call _exit rather than doing it inline for breakpoint purposes */ + /* Call _exit rather than doing it inline for breakpoint purposes. */ move a0,v0 +#ifdef __PIC__ + la t9,_exit + jalr t9 +#else jal _exit - +#endif END(__thread_start) weak_alias(__clone, clone) From 9dca440b10c5709a417b4995d2ab5ca52aa2cb3d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 11 Feb 2000 18:49:01 +0000 Subject: [PATCH 1795/4487] (_FPU_DEFAULT): Set the AC bit. --- sysdeps/arm/fpu/fpu_control.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/arm/fpu/fpu_control.h b/sysdeps/arm/fpu/fpu_control.h index 27b8dda972..b5338c5755 100644 --- a/sysdeps/arm/fpu/fpu_control.h +++ b/sysdeps/arm/fpu/fpu_control.h @@ -71,7 +71,7 @@ /* The fdlibm code requires no interrupts for exceptions. Don't change the rounding mode, it would break long double I/O! */ -#define _FPU_DEFAULT 0x00000000 /* Default value. */ +#define _FPU_DEFAULT 0x00001000 /* Default value. */ /* Type of the control word. */ typedef unsigned int fpu_control_t; From fe60fdbe10db0bccb3b8a42df67616ddef29cd1c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 11 Feb 2000 19:40:32 +0000 Subject: [PATCH 1796/4487] Linux/i386 specific getresgid implementation. --- sysdeps/unix/sysv/linux/arm/getresgid.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/arm/getresgid.c diff --git a/sysdeps/unix/sysv/linux/arm/getresgid.c b/sysdeps/unix/sysv/linux/arm/getresgid.c new file mode 100644 index 0000000000..b703a414cc --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/getresgid.c @@ -0,0 +1 @@ +#include From 5ef54b6fd7d9736dbe1d3711420e9420eb5e9336 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 11 Feb 2000 19:40:38 +0000 Subject: [PATCH 1797/4487] Linux/i386 specific getresuid implementation. --- sysdeps/unix/sysv/linux/arm/getresuid.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/arm/getresuid.c diff --git a/sysdeps/unix/sysv/linux/arm/getresuid.c b/sysdeps/unix/sysv/linux/arm/getresuid.c new file mode 100644 index 0000000000..0b14cefe34 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/getresuid.c @@ -0,0 +1 @@ +#include From 9410cd8d7ce2664544953b3b8a1368fbb881cf74 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 11 Feb 2000 19:40:53 +0000 Subject: [PATCH 1798/4487] Linux/i386 specific msgctl implementation. --- sysdeps/unix/sysv/linux/arm/msgctl.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/arm/msgctl.c diff --git a/sysdeps/unix/sysv/linux/arm/msgctl.c b/sysdeps/unix/sysv/linux/arm/msgctl.c new file mode 100644 index 0000000000..9f9b8431a3 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/msgctl.c @@ -0,0 +1 @@ +#include From 6c391b09956cdfe509804d0c01b07f4aeb84caaa Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 11 Feb 2000 19:40:59 +0000 Subject: [PATCH 1799/4487] Linux/i386 specific semctl implementation. --- sysdeps/unix/sysv/linux/arm/semctl.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/arm/semctl.c diff --git a/sysdeps/unix/sysv/linux/arm/semctl.c b/sysdeps/unix/sysv/linux/arm/semctl.c new file mode 100644 index 0000000000..e9b1a483c9 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/semctl.c @@ -0,0 +1 @@ +#include From 78a718de6ff75e3445010743960604db86775e43 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 11 Feb 2000 19:41:04 +0000 Subject: [PATCH 1800/4487] Linux/i386 specific shmctl implementation. --- sysdeps/unix/sysv/linux/arm/shmctl.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/arm/shmctl.c diff --git a/sysdeps/unix/sysv/linux/arm/shmctl.c b/sysdeps/unix/sysv/linux/arm/shmctl.c new file mode 100644 index 0000000000..7eac6380dd --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/shmctl.c @@ -0,0 +1 @@ +#include From 886523a9baa1bbe3169359270c7c4d8bfd2aa546 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 11 Feb 2000 19:42:16 +0000 Subject: [PATCH 1801/4487] Document new tristate __libc_missing_32bit_uids. Use 32bit uid syscall if __libc_missing_32bit_uids is -1 or 0. --- sysdeps/unix/sysv/linux/m68k/chown.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/m68k/chown.c b/sysdeps/unix/sysv/linux/m68k/chown.c index 4e7625c13e..79701ee6ff 100644 --- a/sysdeps/unix/sysv/linux/m68k/chown.c +++ b/sysdeps/unix/sysv/linux/m68k/chown.c @@ -45,7 +45,7 @@ __chown (const char *file, uid_t owner, gid_t group) return INLINE_SYSCALL (chown32, 3, file, owner, group); #else # ifdef __NR_chown32 - if (!__libc_missing_32bit_uids) + if (__libc_missing_32bit_uids <= 0) { int result; int saved_errno = errno; From d60da510e26925fd089228a6c7f311b36b2e0161 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 11 Feb 2000 19:43:28 +0000 Subject: [PATCH 1802/4487] Linux/m68k getresgid implementation. --- sysdeps/unix/sysv/linux/m68k/getresgid.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/getresgid.c diff --git a/sysdeps/unix/sysv/linux/m68k/getresgid.c b/sysdeps/unix/sysv/linux/m68k/getresgid.c new file mode 100644 index 0000000000..b703a414cc --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/getresgid.c @@ -0,0 +1 @@ +#include From ef034ccbd579401e759410aa2f1b53f78d873c2d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 11 Feb 2000 19:43:32 +0000 Subject: [PATCH 1803/4487] Linux/m68k getresuid implementation. --- sysdeps/unix/sysv/linux/m68k/getresuid.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/getresuid.c diff --git a/sysdeps/unix/sysv/linux/m68k/getresuid.c b/sysdeps/unix/sysv/linux/m68k/getresuid.c new file mode 100644 index 0000000000..0b14cefe34 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/getresuid.c @@ -0,0 +1 @@ +#include From ac707c19aaf6ff6d0cd3899932903ff4f39e103e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 11 Feb 2000 19:43:37 +0000 Subject: [PATCH 1804/4487] Linux/m68k smgctl implementation. --- sysdeps/unix/sysv/linux/m68k/msgctl.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/msgctl.c diff --git a/sysdeps/unix/sysv/linux/m68k/msgctl.c b/sysdeps/unix/sysv/linux/m68k/msgctl.c new file mode 100644 index 0000000000..9f9b8431a3 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/msgctl.c @@ -0,0 +1 @@ +#include From a020fa2f4de2daa10c6454c4acd59544a95c38e4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 11 Feb 2000 19:43:42 +0000 Subject: [PATCH 1805/4487] Linux/m68k semctl implementation. --- sysdeps/unix/sysv/linux/m68k/semctl.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/semctl.c diff --git a/sysdeps/unix/sysv/linux/m68k/semctl.c b/sysdeps/unix/sysv/linux/m68k/semctl.c new file mode 100644 index 0000000000..e9b1a483c9 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/semctl.c @@ -0,0 +1 @@ +#include From fb30b58ad5eeaa8b4cda2e780ad9489a62864605 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 11 Feb 2000 19:43:46 +0000 Subject: [PATCH 1806/4487] Linux/m68k shmctl implementation. --- sysdeps/unix/sysv/linux/m68k/shmctl.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/shmctl.c diff --git a/sysdeps/unix/sysv/linux/m68k/shmctl.c b/sysdeps/unix/sysv/linux/m68k/shmctl.c new file mode 100644 index 0000000000..7eac6380dd --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/shmctl.c @@ -0,0 +1 @@ +#include From 8b9d6d804540939dc317513580054eccf8f519cf Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 11 Feb 2000 19:44:00 +0000 Subject: [PATCH 1807/4487] (getresuid): Make syscall directly, no stubs needed. (getresgid): Likewise. --- sysdeps/unix/sysv/linux/mips/syscalls.list | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index 6bb4451ff3..d8c5afa571 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -56,8 +56,8 @@ s_getcwd getcwd getcwd 2 __syscall_getcwd s_getdents getdents getdents 3 __syscall_getdents s_getpmsg getpmsg getpmsg 5 __syscall_getpmsg s_getpriority getpriority getpriority 2 __syscall_getpriority -s_getresgid getresgid getresgid 3 __syscall_getresgid -s_getresuid getresuid getresuid 3 __syscall_getresuid +getresgid - getresgid 3 getresgid +getresuid - getresuid 3 getresuid s_ipc msgget ipc 5 __syscall_ipc s_lstat64 lxstat64 lstat64 2 __syscall_lstat64 s_poll poll poll 3 __syscall_poll From cab8e3a3ec25f71d369553667d907ed6da8cc5c4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 11 Feb 2000 19:47:25 +0000 Subject: [PATCH 1808/4487] Alpha specific definitions of macros to get stack pointer and high precision timer. --- sysdeps/alpha/memprof.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 sysdeps/alpha/memprof.h diff --git a/sysdeps/alpha/memprof.h b/sysdeps/alpha/memprof.h new file mode 100644 index 0000000000..462b5ce1c2 --- /dev/null +++ b/sysdeps/alpha/memprof.h @@ -0,0 +1,21 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#define GETSP() ({ register uintptr_t stack_ptr asm ("$30"); stack_ptr; }) + +#include From c2fab833fbb220599afc10f2ba04f8c4f195b475 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 11 Feb 2000 19:47:42 +0000 Subject: [PATCH 1809/4487] m68k specific definitions of macros to get stack pointer and high precision timer. --- sysdeps/m68k/memprof.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 sysdeps/m68k/memprof.h diff --git a/sysdeps/m68k/memprof.h b/sysdeps/m68k/memprof.h new file mode 100644 index 0000000000..5fd1cf4282 --- /dev/null +++ b/sysdeps/m68k/memprof.h @@ -0,0 +1,22 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + +#define GETSP() ({ register uintptr_t stack_ptr asm ("%sp"); stack_ptr; }) + +#include From 6753cccf4b6ac2913c707817d2356e7212c31d43 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 11 Feb 2000 19:47:48 +0000 Subject: [PATCH 1810/4487] MIPS specific definitions of macros to get stack pointer and high precision timer. --- sysdeps/mips/memprof.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 sysdeps/mips/memprof.h diff --git a/sysdeps/mips/memprof.h b/sysdeps/mips/memprof.h new file mode 100644 index 0000000000..93f2917d8c --- /dev/null +++ b/sysdeps/mips/memprof.h @@ -0,0 +1,21 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#define GETSP() ({ register uintptr_t stack_ptr asm ("$29"); stack_ptr; }) + +#include From 9e683793e4eef0aed916ad1113c1c60d233f73a4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 11 Feb 2000 21:00:09 +0000 Subject: [PATCH 1811/4487] Linux/Alpha specific msgctl implementation. --- sysdeps/unix/sysv/linux/alpha/msgctl.c | 120 +++++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/msgctl.c diff --git a/sysdeps/unix/sysv/linux/alpha/msgctl.c b/sysdeps/unix/sysv/linux/alpha/msgctl.c new file mode 100644 index 0000000000..2d07b1f400 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/msgctl.c @@ -0,0 +1,120 @@ +/* Copyright (C) 1995, 1997, 1998, 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , August 1995. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include + +#include +#include +#include + +#include "kernel-features.h" + +struct __old_msqid_ds +{ + struct __old_ipc_perm msg_perm; /* structure describing operation permission */ + struct msg *__msg_first; /* pointer to first message on queue */ + struct msg *__msg_last; /* pointer to last message on queue */ + __time_t msg_stime; /* time of last msgsnd command */ + __time_t msg_rtime; /* time of last msgrcv command */ + __time_t msg_ctime; /* time of last change */ + struct wait_queue *__wwait; /* ??? */ + struct wait_queue *__rwait; /* ??? */ + unsigned short int __msg_cbytes; /* current number of bytes on queue */ + unsigned short int msg_qnum; /* number of messages currently on queue */ + unsigned short int msg_qbytes; /* max number of bytes allowed on queue */ + __ipc_pid_t msg_lspid; /* pid of last msgsnd() */ + __ipc_pid_t msg_lrpid; /* pid of last msgrcv() */ +}; + +/* Allows to control internal state and destruction of message queue + objects. */ +int __new_msgctl (int, int, struct msqid_ds *); + +int +__new_msgctl (int msqid, int cmd, struct msqid_ds *buf) +{ +#if __ASSUME_32BITUIDS > 0 + return INLINE_SYSCALL (msgctl, 3, msqid, cmd | __IPC_64, buf); +#else + switch (cmd) { + case MSG_STAT: + case IPC_STAT: + case IPC_SET: + break; + default: + return INLINE_SYSCALL (msgctl, 3, msqid, cmd, buf); + } + + { + int save_errno = errno, result; + struct __old_msqid_ds old; + + /* Unfortunately there is no way how to find out for sure whether + we should use old or new msgctl. */ + result = INLINE_SYSCALL (msgctl, 3, msqid, cmd | __IPC_64, buf); + if (result != -1 || errno != EINVAL) + return result; + + __set_errno(save_errno); + if (cmd == IPC_SET) + { + old.msg_perm.uid = buf->msg_perm.uid; + old.msg_perm.gid = buf->msg_perm.gid; + old.msg_perm.mode = buf->msg_perm.mode; + old.msg_qbytes = buf->msg_qbytes; + if (old.msg_perm.uid != buf->msg_perm.uid || + old.msg_perm.gid != buf->msg_perm.gid || + old.msg_qbytes != buf->msg_qbytes) + { + __set_errno (EINVAL); + return -1; + } + } + result = INLINE_SYSCALL (msgctl, 3, msqid, cmd, &old); + if (result != -1 && cmd != IPC_SET) + { + memset(buf, 0, sizeof(*buf)); + buf->msg_perm.__key = old.msg_perm.__key; + buf->msg_perm.uid = old.msg_perm.uid; + buf->msg_perm.gid = old.msg_perm.gid; + buf->msg_perm.cuid = old.msg_perm.cuid; + buf->msg_perm.cgid = old.msg_perm.cgid; + buf->msg_perm.mode = old.msg_perm.mode; + buf->msg_perm.__seq = old.msg_perm.__seq; + buf->msg_stime = old.msg_stime; + buf->msg_rtime = old.msg_rtime; + buf->msg_ctime = old.msg_ctime; + buf->__msg_cbytes = old.__msg_cbytes; + buf->msg_qnum = old.msg_qnum; + buf->msg_qbytes = old.msg_qbytes; + buf->msg_lspid = old.msg_lspid; + buf->msg_lrpid = old.msg_lrpid; + } + return result; + } +#endif +} + +#if defined PIC && DO_VERSIONING +default_symbol_version (__new_msgctl, msgctl, GLIBC_2.2); +#else +weak_alias (__new_msgctl, msgctl); +#endif From 3b6c96e67b0aee54e255605a4126f029d0ec1c8b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 11 Feb 2000 21:00:16 +0000 Subject: [PATCH 1812/4487] Linux/Alpha specific semctl implementation. --- sysdeps/unix/sysv/linux/alpha/semctl.c | 132 +++++++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/semctl.c diff --git a/sysdeps/unix/sysv/linux/alpha/semctl.c b/sysdeps/unix/sysv/linux/alpha/semctl.c new file mode 100644 index 0000000000..6281e44993 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/semctl.c @@ -0,0 +1,132 @@ +/* Copyright (C) 1995, 1997, 1998, 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , August 1995. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include +#include + +#include +#include +#include + +#include "kernel-features.h" + +struct __old_semid_ds +{ + struct __old_ipc_perm sem_perm; /* operation permission struct */ + __time_t sem_otime; /* last semop() time */ + __time_t sem_ctime; /* last time changed by semctl() */ + struct sem *__sembase; /* ptr to first semaphore in array */ + struct sem_queue *__sem_pending; /* pending operations */ + struct sem_queue *__sem_pending_last; /* last pending operation */ + struct sem_undo *__undo; /* ondo requests on this array */ + unsigned short int sem_nsems; /* number of semaphores in set */ +}; + +/* Define a `union semun' suitable for Linux here. */ +union semun +{ + int val; /* value for SETVAL */ + struct semid_ds *buf; /* buffer for IPC_STAT & IPC_SET */ + unsigned short int *array; /* array for GETALL & SETALL */ + struct seminfo *__buf; /* buffer for IPC_INFO */ +}; + + +/* Return identifier for array of NSEMS semaphores associated with + KEY. */ +int __new_semctl (int semid, int semnum, int cmd, ...); + +int +__new_semctl (int semid, int semnum, int cmd, ...) +{ + union semun arg; + va_list ap; + + va_start (ap, cmd); + + /* Get the argument. */ + arg = va_arg (ap, union semun); + + va_end (ap); + +#if __ASSUME_32BITUIDS > 0 + return INLINE_SYSCALL (semctl, 4, semid, semnum, cmd | __IPC_64, &arg); +#else + switch (cmd) { + case SEM_STAT: + case IPC_STAT: + case IPC_SET: + break; + default: + return INLINE_SYSCALL (semctl, 4, semid, semnum, cmd, &arg); + } + + { + int save_errno = errno, result; + struct __old_semid_ds old; + struct semid_ds *buf; + + /* Unfortunately there is no way how to find out for sure whether + we should use old or new semctl. */ + result = INLINE_SYSCALL (semctl, 4, semid, semnum, cmd | __IPC_64, &arg); + if (result != -1 || errno != EINVAL) + return result; + + __set_errno(save_errno); + buf = arg.buf; + arg.buf = (struct semid_ds *)&old; + if (cmd == IPC_SET) + { + old.sem_perm.uid = buf->sem_perm.uid; + old.sem_perm.gid = buf->sem_perm.gid; + old.sem_perm.mode = buf->sem_perm.mode; + if (old.sem_perm.uid != buf->sem_perm.uid || + old.sem_perm.gid != buf->sem_perm.gid) + { + __set_errno (EINVAL); + return -1; + } + } + result = INLINE_SYSCALL (semctl, 4, semid, semnum, cmd, &arg); + if (result != -1 && cmd != IPC_SET) + { + memset(buf, 0, sizeof(*buf)); + buf->sem_perm.__key = old.sem_perm.__key; + buf->sem_perm.uid = old.sem_perm.uid; + buf->sem_perm.gid = old.sem_perm.gid; + buf->sem_perm.cuid = old.sem_perm.cuid; + buf->sem_perm.cgid = old.sem_perm.cgid; + buf->sem_perm.mode = old.sem_perm.mode; + buf->sem_perm.__seq = old.sem_perm.__seq; + buf->sem_otime = old.sem_otime; + buf->sem_ctime = old.sem_ctime; + buf->sem_nsems = old.sem_nsems; + } + return result; + } +#endif +} + +#if defined PIC && DO_VERSIONING +default_symbol_version (__new_semctl, semctl, GLIBC_2.2); +#else +weak_alias (__new_semctl, semctl); +#endif From f8d5da2998f939799aef32f8070b651234e2b955 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 11 Feb 2000 21:00:22 +0000 Subject: [PATCH 1813/4487] Linux/Alpha specific shmctl implementation. --- sysdeps/unix/sysv/linux/alpha/shmctl.c | 137 +++++++++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/shmctl.c diff --git a/sysdeps/unix/sysv/linux/alpha/shmctl.c b/sysdeps/unix/sysv/linux/alpha/shmctl.c new file mode 100644 index 0000000000..162afeee3d --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/shmctl.c @@ -0,0 +1,137 @@ +/* Copyright (C) 1995, 1997, 1998, 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , August 1995. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include + +#include +#include +#include +#include + +#include "kernel-features.h" + +struct __old_shmid_ds +{ + struct __old_ipc_perm shm_perm; /* operation permission struct */ + int shm_segsz; /* size of segment in bytes */ + __time_t shm_atime; /* time of last shmat() */ + __time_t shm_dtime; /* time of last shmdt() */ + __time_t shm_ctime; /* time of last change by shmctl() */ + __ipc_pid_t shm_cpid; /* pid of creator */ + __ipc_pid_t shm_lpid; /* pid of last shmop */ + unsigned short int shm_nattch; /* number of current attaches */ + unsigned short int __shm_npages; /* size of segment (pages) */ + unsigned long int *__shm_pages; /* array of ptrs to frames -> SHMMAX */ + struct vm_area_struct *__attaches; /* descriptors for attaches */ +}; + +struct __old_shminfo +{ + int shmmax; + int shmmin; + int shmmni; + int shmseg; + int shmall; +}; + +/* Provide operations to control over shared memory segments. */ +int __new_shmctl (int, int, struct shmid_ds *); + +int +__new_shmctl (int shmid, int cmd, struct shmid_ds *buf) +{ +#if __ASSUME_32BITUIDS > 0 + return INLINE_SYSCALL (shmctl, 3, shmid, cmd | __IPC_64, buf); +#else + switch (cmd) { + case SHM_STAT: + case IPC_STAT: + case IPC_SET: + case IPC_INFO: + break; + default: + return INLINE_SYSCALL (shmctl, 3, shmid, cmd, buf); + } + + { + int save_errno = errno, result; + struct __old_shmid_ds old; + + /* Unfortunately there is no way how to find out for sure whether + we should use old or new shmctl. */ + result = INLINE_SYSCALL (shmctl, 3, shmid, cmd | __IPC_64, buf); + if (result != -1 || errno != EINVAL) + return result; + + __set_errno(save_errno); + if (cmd == IPC_SET) + { + old.shm_perm.uid = buf->shm_perm.uid; + old.shm_perm.gid = buf->shm_perm.gid; + old.shm_perm.mode = buf->shm_perm.mode; + if (old.shm_perm.uid != buf->shm_perm.uid || + old.shm_perm.gid != buf->shm_perm.gid) + { + __set_errno (EINVAL); + return -1; + } + } + result = INLINE_SYSCALL (shmctl, 3, shmid, cmd, &old); + if (result != -1 && (cmd == SHM_STAT || cmd == IPC_STAT)) + { + memset(buf, 0, sizeof(*buf)); + buf->shm_perm.__key = old.shm_perm.__key; + buf->shm_perm.uid = old.shm_perm.uid; + buf->shm_perm.gid = old.shm_perm.gid; + buf->shm_perm.cuid = old.shm_perm.cuid; + buf->shm_perm.cgid = old.shm_perm.cgid; + buf->shm_perm.mode = old.shm_perm.mode; + buf->shm_perm.__seq = old.shm_perm.__seq; + buf->shm_atime = old.shm_atime; + buf->shm_dtime = old.shm_dtime; + buf->shm_ctime = old.shm_ctime; + buf->shm_segsz = old.shm_segsz; + buf->shm_nattch = old.shm_nattch; + buf->shm_cpid = old.shm_cpid; + buf->shm_lpid = old.shm_lpid; + } + else if (result != -1 && cmd == IPC_INFO) + { + struct __old_shminfo *oldi = (struct __old_shminfo *)&old; + struct shminfo *i = (struct shminfo *)buf; + + memset(i, 0, sizeof(*i)); + i->shmmax = oldi->shmmax; + i->shmmin = oldi->shmmin; + i->shmmni = oldi->shmmni; + i->shmseg = oldi->shmseg; + i->shmall = oldi->shmall; + } + return result; + } +#endif +} + +#if defined PIC && DO_VERSIONING +default_symbol_version (__new_shmctl, shmctl, GLIBC_2.2); +#else +weak_alias (__new_shmctl, shmctl); +#endif From 23f140126681dc4ce428f763dc89429e85fea01b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 11 Feb 2000 21:00:47 +0000 Subject: [PATCH 1814/4487] (msgctl, semctl, shmctl): Make them EXTRA as __old_* and as GLIBC_2.0 symbols. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 8a86c7c76d..241ed02239 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -3,17 +3,17 @@ # used to implement inb()/outb() etc. sethae - sethae 1 __sethae -msgctl - msgctl 3 __msgctl msgctl +oldmsgctl EXTRA msgctl 3 __old_msgctl msgctl@GLIBC_2.0 msgget - msgget 2 __msgget msgget msgrcv - msgrcv 5 __msgrcv msgrcv msgsnd - msgsnd 4 __msgsnd msgsnd shmat - osf_shmat 3 __shmat shmat -shmctl - shmctl 3 __shmctl shmctl +oldshmctl EXTRA shmctl 3 __old_shmctl shmctl@GLIBC_2.0 shmdt - shmdt 1 __shmdt shmdt shmget - shmget 3 __shmget shmget semop - semop 3 __semop semop semget - semget 3 __semget semget -semctl - semctl 4 __semctl semctl +oldsemctl EXTRA semctl 4 __old_semctl semctl@GLIBC_2.0 osf_sigprocmask - osf_sigprocmask 2 __osf_sigprocmask sigstack - sigstack 2 sigstack From e1b4ab28aebe864cc5f5de04f22950755c413481 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 11 Feb 2000 21:01:03 +0000 Subject: [PATCH 1815/4487] Add oldmsgctl, oldsemctl. --- sysdeps/unix/sysv/linux/alpha/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile index 3265e0fa1e..0f08d13f69 100644 --- a/sysdeps/unix/sysv/linux/alpha/Makefile +++ b/sysdeps/unix/sysv/linux/alpha/Makefile @@ -13,6 +13,9 @@ sysdep_routines += osf_select osf_gettimeofday osf_settimeofday \ osf_getitimer osf_setitimer osf_utimes \ osf_getrusage osf_wait4 old_adjtimex +# Support old ipc control +sysdep_routines += oldmsgctl oldsemctl oldshmctl + CFLAGS-ioperm.c = -Wa,-mev6 endif From bab23124f035734d66ca1841dba8df2f7cd17348 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sat, 12 Feb 2000 11:27:47 +0000 Subject: [PATCH 1816/4487] 2000-02-12 Andreas Jaeger * sysdeps/mips/dl-machine.h (__start): Rewritten for 2.2 startup conventions. (elf_machine_rel): Use R_MIPS_REL32 for RESOLVE. (elf_machine_runtime_setup,elf_machine_got_rel): Move at end of file and make dependend on RESOLVE. (ELF_MACHINE_RUNTIME_TRAMPOLINE): Fix arguments to _dl_lookup_symbol. (RESOLVE_GOTSYM): Fix arguments to _dl_lookup_symbol. --- sysdeps/mips/dl-machine.h | 277 ++++++++++++++++++++------------------ 1 file changed, 147 insertions(+), 130 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index f7a1a6d4c0..d0b20ae655 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -59,8 +59,13 @@ /* * MIPS libraries are usually linked to a non-zero base address. We - * subtrace the base address from the address where we map the object + * subtract the base address from the address where we map the object * to. This results in more efficient address space usage. + * + * FIXME: By the time when MAP_BASE_ADDR is called we don't have the + * DYNAMIC section read. Until this is fixed make the assumption that + * libraries have their base address at 0x5ffe0000. This needs to be + * fixed before we can safely get rid of this MIPSism. */ #if 0 #define MAP_BASE_ADDR(l) ((l)->l_info[DT_MIPS(BASE_ADDRESS)] ? \ @@ -126,125 +131,8 @@ elf_machine_load_address (void) return addr; } -/* The MSB of got[1] of a gnu object is set to identify gnu objects. */ -#define ELF_MIPS_GNU_GOT1_MASK 0x80000000 - -/* Relocate GOT. */ -static inline void -elf_machine_got_rel (struct link_map *map, int lazy) -{ - ElfW(Addr) *got; - ElfW(Sym) *sym; - int i, n; - const char *strtab = (const void *) map->l_info[DT_STRTAB]->d_un.d_ptr; - -#define RESOLVE_GOTSYM(sym) \ - ({ \ - const ElfW(Sym) *ref = sym; \ - ElfW(Addr) sym_loadaddr; \ - sym_loadaddr = _dl_lookup_symbol (strtab + sym->st_name, &ref, \ - map->l_scope, \ - map->l_name, R_MIPS_REL32);\ - (ref)? sym_loadaddr + ref->st_value: 0; \ - }) - - got = (ElfW(Addr) *) map->l_info[DT_PLTGOT]->d_un.d_ptr; - - /* got[0] is reserved. got[1] is also reserved for the dynamic object - generated by gnu ld. Skip these reserved entries from relocation. */ - i = (got[1] & ELF_MIPS_GNU_GOT1_MASK)? 2: 1; - n = map->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; - /* Add the run-time display to all local got entries. */ - while (i < n) - got[i++] += map->l_addr; - /* Handle global got entries. */ - got += n; - sym = (void *) map->l_info[DT_SYMTAB]->d_un.d_ptr; - sym += map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val; - i = (map->l_info[DT_MIPS (SYMTABNO)]->d_un.d_val - - map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val); - - while (i--) - { - if (sym->st_shndx == SHN_UNDEF) - { - if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC) - { - if (sym->st_value && lazy) - *got = sym->st_value + map->l_addr; - else - *got = RESOLVE_GOTSYM (sym); - } - else /* if (*got == 0 || *got == QS) */ - *got = RESOLVE_GOTSYM (sym); - } - else if (sym->st_shndx == SHN_COMMON) - *got = RESOLVE_GOTSYM (sym); - else if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC - && *got != sym->st_value - && lazy) - *got += map->l_addr; - else if (ELFW(ST_TYPE) (sym->st_info) == STT_SECTION) - { - if (sym->st_other == 0) - *got += map->l_addr; - } - else - *got = RESOLVE_GOTSYM (sym); - - got++; - sym++; - } - -#undef RESOLVE_GOTSYM - - return; -} - -/* Set up the loaded object described by L so its stub function - will jump to the on-demand fixup code in dl-runtime.c. */ - -static inline int -elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) -{ - ElfW(Addr) *got; - extern void _dl_runtime_resolve (ElfW(Word)); - extern int _dl_mips_gnu_objects; - -#ifdef RTLD_BOOTSTRAP - { - return lazy; - } -#endif - if (lazy) - { - /* The GOT entries for functions have not yet been filled in. - Their initial contents will arrange when called to put an - offset into the .dynsym section in t8, the return address - in t7 and then jump to _GLOBAL_OFFSET_TABLE[0]. */ - got = (ElfW(Addr) *) l->l_info[DT_PLTGOT]->d_un.d_ptr; - - /* This function will get called to fix up the GOT entry indicated by - the register t8, and then jump to the resolved address. */ - got[0] = (ElfW(Addr)) &_dl_runtime_resolve; - - /* Store l to _GLOBAL_OFFSET_TABLE[1] for gnu object. The MSB - of got[1] of a gnu object is set to identify gnu objects. - Where we can store l for non gnu objects? XXX */ - if ((got[1] & ELF_MIPS_GNU_GOT1_MASK) != 0) - got[1] = (ElfW(Addr)) ((unsigned) l | ELF_MIPS_GNU_GOT1_MASK); - else - _dl_mips_gnu_objects = 0; - } - - /* Relocate global offset table. */ - elf_machine_got_rel (l, lazy); - - return lazy; -} - -/* Get link_map for this object. */ +/* Get link map for callers object containing STUB_PC. */ static inline struct link_map * elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc) { @@ -352,9 +240,8 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \ /* Look up the symbol's run-time value. */ \ definer = &symtab[sym_index]; \ \ - loadbase = _dl_lookup_symbol (strtab + definer->st_name, &definer, \ - l->l_scope, l->l_name, \ - R_MIPS_REL32); \ + loadbase = _dl_lookup_symbol (strtab + definer->st_name, l, &definer, \ + l->l_scope, R_MIPS_REL32); \ \ /* Apply the relocation with that value. */ \ funcaddr = loadbase + definer->st_value; \ @@ -470,19 +357,33 @@ _dl_start_user:\n\ addu $29, $2\n\ # Save back the modified argument count.\n\ sw $4, 0($29)\n\ - # Get _dl_default_scope[2] as argument in _dl_init_next call below.\n\ -1: la $2, _dl_default_scope\n\ - lw $4, 8($2)\n\ +1: subu $29, 16\n\ +2: # Push the searchlist of the main object as argument in\n\ + # the _dl_preinit_next and _dl_init_next calls below.\n\ + lw $4, _dl_main_searchlist\n\ + # First run the pre-initializers.\n\ + # Call _dl_preinit_next to return the address of an initializer\n\ + # function to run.\n\ + jal _dl_preinit_next + move $28, $16\n\ + # Check for zero return, when out of initializers.\n\ + beq $2, $0, 4f\n\ + # Call the pre-initializer.\n\ + move $25, $2\n\ + jalr $25\n\ + move $28, $16\n + # Loop to call _dl_preinit_next for the next initializer.\n\ + b 2b\n +4: lw $4, _dl_main_searchlist\n\ # Call _dl_init_next to return the address of an initializer\n\ # function to run.\n\ - subu $29, 16\n\ jal _dl_init_next\n\ - addiu $29, 16\n\ move $28, $16\n\ # Check for zero return, when out of initializers.\n\ beq $2, $0, 2f\n\ # Call the shared object initializer function.\n\ move $25, $2\n\ + # XXX This looks broken ###.\n\ lw $4, 0($29)\n\ lw $5, 4($29)\n\ lw $6, 8($29)\n\ @@ -490,8 +391,9 @@ _dl_start_user:\n\ jalr $25\n\ move $28, $16\n\ # Loop to call _dl_init_next for the next initializer.\n\ - b 1b\n\ -2: # Clear the startup flag. Assumes 32 bit ints.\n\ + b 4b\n\ +2: addiu $29, 16\n\ + # Clear the startup flag. Assumes 32 bit ints.\n\ sw $0, _dl_starting_up\n\ # Pass our finalizer function to the user in ra.\n\ la $31, _dl_fini\n\ @@ -552,7 +454,7 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, built-in definitions used while loading those libraries. */ undo = map->l_addr + sym->st_value; #endif - loadbase = RESOLVE (&sym, version, 0); + loadbase = RESOLVE (&sym, version, R_MIPS_REL32); *reloc_addr += (sym ? (loadbase + sym->st_value) : 0) - undo; } break; @@ -571,4 +473,119 @@ elf_machine_lazy_rel (struct link_map *map, /* Do nothing. */ } +/* The MSB of got[1] of a gnu object is set to identify gnu objects. */ +#define ELF_MIPS_GNU_GOT1_MASK 0x80000000 + +/* Relocate GOT. */ +static inline void +elf_machine_got_rel (struct link_map *map, int lazy) +{ + ElfW(Addr) *got; + ElfW(Sym) *sym; + int i, n; + const char *strtab = (const void *) map->l_info[DT_STRTAB]->d_un.d_ptr; + +#define RESOLVE_GOTSYM(sym) \ + ({ \ + const ElfW(Sym) *ref = sym; \ + ElfW(Addr) sym_loadaddr; \ + sym_loadaddr = _dl_lookup_symbol (strtab + sym->st_name, map, \ + &ref, map->l_scope, \ + R_MIPS_REL32); \ + (ref)? sym_loadaddr + ref->st_value: 0; \ + }) + + got = (ElfW(Addr) *) map->l_info[DT_PLTGOT]->d_un.d_ptr; + + /* got[0] is reserved. got[1] is also reserved for the dynamic object + generated by gnu ld. Skip these reserved entries from relocation. */ + i = (got[1] & ELF_MIPS_GNU_GOT1_MASK)? 2: 1; + n = map->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; + /* Add the run-time display to all local got entries. */ + while (i < n) + got[i++] += map->l_addr; + + /* Handle global got entries. */ + got += n; + sym = (void *) map->l_info[DT_SYMTAB]->d_un.d_ptr; + sym += map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val; + i = (map->l_info[DT_MIPS (SYMTABNO)]->d_un.d_val + - map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val); + + while (i--) + { + if (sym->st_shndx == SHN_UNDEF) + { + if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC) + { + if (sym->st_value && lazy) + *got = sym->st_value + map->l_addr; + else + *got = RESOLVE_GOTSYM (sym); + } + else /* if (*got == 0 || *got == QS) */ + *got = RESOLVE_GOTSYM (sym); + } + else if (sym->st_shndx == SHN_COMMON) + *got = RESOLVE_GOTSYM (sym); + else if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC + && *got != sym->st_value + && lazy) + *got += map->l_addr; + else if (ELFW(ST_TYPE) (sym->st_info) == STT_SECTION) + { + if (sym->st_other == 0) + *got += map->l_addr; + } + else + *got = RESOLVE_GOTSYM (sym); + + got++; + sym++; + } + +#undef RESOLVE_GOTSYM + + return; +} + +/* Set up the loaded object described by L so its stub function + will jump to the on-demand fixup code in dl-runtime.c. */ + +static inline int +elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) +{ +# ifndef RTLD_BOOTSTRAP + ElfW(Addr) *got; + extern void _dl_runtime_resolve (ElfW(Word)); + extern int _dl_mips_gnu_objects; + + if (lazy) + { + /* The GOT entries for functions have not yet been filled in. + Their initial contents will arrange when called to put an + offset into the .dynsym section in t8, the return address + in t7 and then jump to _GLOBAL_OFFSET_TABLE[0]. */ + got = (ElfW(Addr) *) l->l_info[DT_PLTGOT]->d_un.d_ptr; + + /* This function will get called to fix up the GOT entry indicated by + the register t8, and then jump to the resolved address. */ + got[0] = (ElfW(Addr)) &_dl_runtime_resolve; + + /* Store l to _GLOBAL_OFFSET_TABLE[1] for gnu object. The MSB + of got[1] of a gnu object is set to identify gnu objects. + Where we can store l for non gnu objects? XXX */ + if ((got[1] & ELF_MIPS_GNU_GOT1_MASK) != 0) + got[1] = (ElfW(Addr)) ((unsigned) l | ELF_MIPS_GNU_GOT1_MASK); + else + _dl_mips_gnu_objects = 0; + } + + /* Relocate global offset table. */ + elf_machine_got_rel (l, lazy); + +# endif + return lazy; +} + #endif /* RESOLVE */ From 58d7604e5df2cbd76ca41918d8f568c839a4f33d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 14 Feb 2000 18:11:04 +0000 Subject: [PATCH 1817/4487] opl, _ioperm): Add Rebel-NetWinder to platform table so _ioperm platform lookup via /proc/cpuinfo works on later version NetWinders. --- sysdeps/unix/sysv/linux/arm/ioperm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/arm/ioperm.c b/sysdeps/unix/sysv/linux/arm/ioperm.c index f4c9322823..3c51540ffe 100644 --- a/sysdeps/unix/sysv/linux/arm/ioperm.c +++ b/sysdeps/unix/sysv/linux/arm/ioperm.c @@ -71,6 +71,7 @@ static struct platform { {"Chalice-CATS", IO_BASE_FOOTBRIDGE, IO_SHIFT_FOOTBRIDGE}, {"DEC-EBSA285", IO_BASE_FOOTBRIDGE, IO_SHIFT_FOOTBRIDGE}, {"Corel-NetWinder", IO_BASE_FOOTBRIDGE, IO_SHIFT_FOOTBRIDGE}, + {"Rebel-NetWinder", IO_BASE_FOOTBRIDGE, IO_SHIFT_FOOTBRIDGE}, }; #define IO_ADDR(port) (io.base + ((port) << io.shift)) From 574b0730357c3a20d73582de8112cab0b3f3e151 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 20 Feb 2000 17:58:12 +0000 Subject: [PATCH 1818/4487] Fix off by one error. --- sysdeps/unix/sysv/linux/arm/mmap64.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/arm/mmap64.S b/sysdeps/unix/sysv/linux/arm/mmap64.S index 904c56404d..57b1d8ace2 100644 --- a/sysdeps/unix/sysv/linux/arm/mmap64.S +++ b/sysdeps/unix/sysv/linux/arm/mmap64.S @@ -39,7 +39,7 @@ ENTRY (__mmap64) swi SYS_ify (mmap2) cmn r0, $4096 LOADREGS(ccfd, sp!, {r4, r5, pc}) - cmn r0, $(ENOSYS - 1) + cmn r0, $ENOSYS ldmnefd sp!, {r4, r5, lr} bne PLTJMP(syscall_error) /* The current kernel does not support mmap2. Fall back to plain From 2ffceb847f1ccd716448658dd079a2f49f69df79 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 22 Feb 2000 05:32:19 +0000 Subject: [PATCH 1819/4487] Update comment. --- sysdeps/alpha/fpu/fpu_control.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/fpu/fpu_control.h b/sysdeps/alpha/fpu/fpu_control.h index dfca373c3d..a2cf936cd2 100644 --- a/sysdeps/alpha/fpu/fpu_control.h +++ b/sysdeps/alpha/fpu/fpu_control.h @@ -1,5 +1,5 @@ /* FPU control word bits. Alpha-maped-to-Intel version. - Copyright (C) 1996, 1998 Free Software Foundation, Inc. + Copyright (C) 1996, 1998, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Olaf Flebbe. @@ -94,7 +94,7 @@ #define _FPU_DEFAULT 0x137f -/* IEEE: same as above, but exceptions */ +/* IEEE: same as above. */ #define _FPU_IEEE 0x137f /* Type of the control word. */ From 158331933d2d227af88da2f3fd16542391eb488f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 23 Feb 2000 05:59:11 +0000 Subject: [PATCH 1820/4487] Define SA_NOCLDWAIT. --- sysdeps/unix/sysv/linux/alpha/bits/sigaction.h | 3 ++- sysdeps/unix/sysv/linux/mips/bits/sigaction.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h index be04235981..605c4f3fa3 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h @@ -1,5 +1,5 @@ /* The proper definitions for Linux/Alpha sigaction. - Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 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 @@ -49,6 +49,7 @@ struct sigaction /* Bits in `sa_flags'. */ #define SA_NOCLDSTOP 0x00000004 /* Don't send SIGCHLD when children stop. */ +#define SA_NOCLDWAIT 0x00000020 /* Don't create zombie on child death. */ #define SA_SIGINFO 0x00000040 /* Invoke signal-catching function with three arguments instead of one. */ #if defined __USE_UNIX98 || defined __USE_MISC diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h index 04179d2982..0225078652 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h +++ b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h @@ -58,6 +58,7 @@ struct sigaction /* Please note that some Linux kernels versions use different values for these flags which is a bug in those kernel versions. */ #define SA_NOCLDSTOP 0x00000001 /* Don't send SIGCHLD when children stop. */ +#define SA_NOCLDWAIT 0x00010000 /* Don't create zombie on child death. */ #define SA_SIGINFO 0x00000008 /* Invoke signal-catching function with three arguments instead of one. */ #if defined __USE_UNIX98 || defined __USE_MISC From 028bec36ffa0222c3dec94cb393a427fc049bb98 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 23 Feb 2000 05:59:55 +0000 Subject: [PATCH 1821/4487] Linux/Alpha specific siginfo definitions. --- sysdeps/unix/sysv/linux/alpha/bits/siginfo.h | 293 +++++++++++++++++++ 1 file changed, 293 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/siginfo.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h b/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h new file mode 100644 index 0000000000..9426c13ee7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h @@ -0,0 +1,293 @@ +/* siginfo_t, sigevent and constants. Linux/SPARC version. + 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#if !defined _SIGNAL_H && !defined __need_siginfo_t +# error "Never include this file directly. Use instead" +#endif + +#include + +#if (!defined __have_siginfo_t \ + && (defined _SIGNAL_H || defined __need_siginfo_t)) +# define __have_siginfo_t 1 + +/* Type for data associated with a signal. */ +typedef union sigval + { + int sival_int; + void *sival_ptr; + } sigval_t; + +# define __SI_MAX_SIZE 128 +# if __WORDSIZE == 64 +# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 4) +# else +# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3) +# endif + +typedef struct siginfo + { + int si_signo; /* Signal number. */ + int si_errno; /* If non-zero, an errno value associated with + this signal, as defined in . */ + int si_code; /* Signal code. */ + + union + { + int _pad[__SI_PAD_SIZE]; + + /* kill(). */ + struct + { + __pid_t si_pid; /* Sending process ID. */ + __uid_t si_uid; /* Real user ID of sending process. */ + } _kill; + + /* POSIX.1b timers. */ + struct + { + unsigned int _timer1; + unsigned int _timer2; + } _timer; + + /* POSIX.1b signals. */ + struct + { + __pid_t si_pid; /* Sending process ID. */ + __uid_t si_uid; /* Real user ID of sending process. */ + sigval_t si_sigval; /* Signal value. */ + } _rt; + + /* SIGCHLD. */ + struct + { + __pid_t si_pid; /* Which child. */ + __uid_t si_uid; /* Real user ID of sending process. */ + int si_status; /* Exit value or signal. */ + __clock_t si_utime; + __clock_t si_stime; + } _sigchld; + + /* SIGILL, SIGFPE, SIGSEGV, SIGBUS. */ + struct + { + void *si_addr; /* Faulting insn/memory ref. */ + } _sigfault; + + /* SIGPOLL. */ + struct + { + int si_band; /* Band event for SIGPOLL. */ + int si_fd; + } _sigpoll; + } _sifields; + } siginfo_t; + + +/* X/Open requires some more fields with fixed names. */ +# define si_pid _sifields._kill.si_pid +# define si_uid _sifields._kill.si_uid +# define si_timer1 _sifields._timer._timer1 +# define si_timer2 _sifields._timer._timer2 +# define si_status _sifields._sigchld.si_status +# define si_utime _sifields._sigchld.si_utime +# define si_stime _sifields._sigchld.si_stime +# define si_value _sifields._rt.si_sigval +# define si_int _sifields._rt.si_sigval.sival_int +# define si_ptr _sifields._rt.si_sigval.sival_ptr +# define si_addr _sifields._sigfault.si_addr +# define si_band _sifields._sigpoll.si_band +# define si_fd _sifields._sigpoll.si_fd + + +/* Values for `si_code'. Positive values are reserved for kernel-generated + signals. */ +enum +{ + SI_SIGIO = -5, /* Sent by queued SIGIO. */ +# define SI_SIGIO SI_SIGIO + SI_ASYNCIO, /* Sent by AIO completion. */ +# define SI_ASYNCIO SI_ASYNCIO + SI_MESGQ, /* Sent by real time mesq state change. */ +# define SI_MESGQ SI_MESGQ + SI_TIMER, /* Sent by timer expiration. */ +# define SI_TIMER SI_TIMER + SI_QUEUE, /* Sent by sigqueue. */ +# define SI_QUEUE SI_QUEUE + SI_USER, /* Sent by kill, sigsend, raise. */ +# define SI_USER SI_USER + SI_KERNEL = 0x80 /* Send by kernel. */ +#define SI_KERNEL SI_KERNEL +}; + + +/* `si_code' values for SIGILL signal. */ +enum +{ + ILL_ILLOPC = 1, /* Illegal opcode. */ +# define ILL_ILLOPC ILL_ILLOPC + ILL_ILLOPN, /* Illegal operand. */ +# define ILL_ILLOPN ILL_ILLOPN + ILL_ILLADR, /* Illegal addressing mode. */ +# define ILL_ILLADR ILL_ILLADR + ILL_ILLTRP, /* Illegal trap. */ +# define ILL_ILLTRP ILL_ILLTRP + ILL_PRVOPC, /* Privileged opcode. */ +# define ILL_PRVOPC ILL_PRVOPC + ILL_PRVREG, /* Privileged register. */ +# define ILL_PRVREG ILL_PRVREG + ILL_COPROC, /* Coprocessor error. */ +# define ILL_COPROC ILL_COPROC + ILL_BADSTK /* Internal stack error. */ +# define ILL_BADSTK ILL_BADSTK +}; + +/* `si_code' values for SIGFPE signal. */ +enum +{ + FPE_INTDIV = 1, /* Integer divide by zero. */ +# define FPE_INTDIV FPE_INTDIV + FPE_INTOVF, /* Integer overflow. */ +# define FPE_INTOVF FPE_INTOVF + FPE_FLTDIV, /* Floating point divide by zero. */ +# define FPE_FLTDIV FPE_FLTDIV + FPE_FLTOVF, /* Floating point overflow. */ +# define FPE_FLTOVF FPE_FLTOVF + FPE_FLTUND, /* Floating point underflow. */ +# define FPE_FLTUND FPE_FLTUND + FPE_FLTRES, /* Floating point inexact result. */ +# define FPE_FLTRES FPE_FLTRES + FPE_FLTINV, /* Floating point invalid operation. */ +# define FPE_FLTINV FPE_FLTINV + FPE_FLTSUB /* Subscript out of range. */ +# define FPE_FLTSUB FPE_FLTSUB +}; + +/* `si_code' values for SIGSEGV signal. */ +enum +{ + SEGV_MAPERR = 1, /* Address not mapped to object. */ +# define SEGV_MAPERR SEGV_MAPERR + SEGV_ACCERR /* Invalid permissions for mapped object. */ +# define SEGV_ACCERR SEGV_ACCERR +}; + +/* `si_code' values for SIGBUS signal. */ +enum +{ + BUS_ADRALN = 1, /* Invalid address alignment. */ +# define BUS_ADRALN BUS_ADRALN + BUS_ADRERR, /* Non-existant physical address. */ +# define BUS_ADRERR BUS_ADRERR + BUS_OBJERR /* Object specific hardware error. */ +# define BUS_OBJERR BUS_OBJERR +}; + +/* `si_code' values for SIGTRAP signal. */ +enum +{ + TRAP_BRKPT = 1, /* Process breakpoint. */ +# define TRAP_BRKPT TRAP_BRKPT + TRAP_TRACE /* Process trace trap. */ +# define TRAP_TRACE TRAP_TRACE +}; + +/* `si_code' values for SIGCHLD signal. */ +enum +{ + CLD_EXITED = 1, /* Child has exited. */ +# define CLD_EXITED CLD_EXITED + CLD_KILLED, /* Child was killed. */ +# define CLD_KILLED CLD_KILLED + CLD_DUMPED, /* Child terminated abnormally. */ +# define CLD_DUMPED CLD_DUMPED + CLD_TRAPPED, /* Traced child has trapped. */ +# define CLD_TRAPPED CLD_TRAPPED + CLD_STOPPED, /* Child has stopped. */ +# define CLD_STOPPED CLD_STOPPED + CLD_CONTINUED /* Stopped child has continued. */ +# define CLD_CONTINUED CLD_CONTINUED +}; + +/* `si_code' values for SIGPOLL signal. */ +enum +{ + POLL_IN = 1, /* Data input available. */ +# define POLL_IN POLL_IN + POLL_OUT, /* Output buffers available. */ +# define POLL_OUT POLL_OUT + POLL_MSG, /* Input message available. */ +# define POLL_MSG POLL_MSG + POLL_ERR, /* I/O error. */ +# define POLL_ERR POLL_ERR + POLL_PRI, /* High priority input available. */ +# define POLL_PRI POLL_PRI + POLL_HUP /* Device disconnected. */ +# define POLL_HUP POLL_HUP +}; + +# undef __need_siginfo_t +#endif /* !have siginfo_t && (have _SIGNAL_H || need siginfo_t). */ + + +#if defined _SIGNAL_H && !defined __have_sigevent_t +# define __have_sigevent_t 1 + +/* Structure to transport application-defined values with signals. */ +# define __SIGEV_MAX_SIZE 64 +# if __WORDSIZE == 64 +# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4) +# else +# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3) +# endif + +typedef struct sigevent + { + sigval_t sigev_value; + int sigev_signo; + int sigev_notify; + + union + { + int _pad[__SIGEV_PAD_SIZE]; + + struct + { + void (*_function) (sigval_t); /* Function to start. */ + void *_attribute; /* Really pthread_attr_t. */ + } _sigev_thread; + } _sigev_un; + } sigevent_t; + +/* POSIX names to access some of the members. */ +# define sigev_notify_function _sigev_un._sigev_thread._function +# define sigev_notify_attributes _sigev_un._sigev_thread._attribute + +/* `sigev_notify' values. */ +enum +{ + SIGEV_SIGNAL = 0, /* Notify via signal. */ +# define SIGEV_SIGNAL SIGEV_SIGNAL + SIGEV_NONE, /* Other notification: meaningless. */ +# define SIGEV_NONE SIGEV_NONE + SIGEV_THREAD /* Deliver via thread creation. */ +# define SIGEV_THREAD SIGEV_THREAD +}; + +#endif /* have _SIGNAL_H. */ From 6d70eeb43cfc91c89b179f5a4a27a16a46cded1f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 24 Feb 2000 07:57:37 +0000 Subject: [PATCH 1822/4487] Allow including from stdlib.h. --- sysdeps/unix/sysv/sysv4/bits/waitflags.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/sysv4/bits/waitflags.h b/sysdeps/unix/sysv/sysv4/bits/waitflags.h index e99dc00511..841f8a303b 100644 --- a/sysdeps/unix/sysv/sysv4/bits/waitflags.h +++ b/sysdeps/unix/sysv/sysv4/bits/waitflags.h @@ -1,5 +1,5 @@ /* Definitions of flag bits for `waitpid' et al. - Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1993, 1996, 1997, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -18,7 +18,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef _SYS_WAIT_H +#if !defined _SYS_WAIT_H && !defined _STDLIB_H # error "Never include directly; use instead." #endif From 40d43549381087377ce2e19d9b162272bc07abdd Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 25 Feb 2000 08:54:48 +0000 Subject: [PATCH 1823/4487] Include bits/types.h, not sys/types.h. (MSG_EXCEPT): Only define if __USE_GNU. Define msgqnum_t and msglen_t and use them in struct msqid_ds definition. --- sysdeps/unix/sysv/linux/alpha/bits/msq.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/msq.h b/sysdeps/unix/sysv/linux/alpha/bits/msq.h index 3e784d9544..3ca076e9f9 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/msq.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/msq.h @@ -20,11 +20,17 @@ # error "Never use directly; include instead." #endif -#include +#include /* Define options for message queue functions. */ #define MSG_NOERROR 010000 /* no error if message is too big */ -#define MSG_EXCEPT 020000 /* recv any msg except of specified type */ +#ifdef __USE_GNU +# define MSG_EXCEPT 020000 /* recv any msg except of specified type */ +#endif + +/* Types used in the structure definition. */ +typedef unsigned long int msgqnum_t; +typedef unsigned long int msglen_t; /* Structure of record for one message inside the kernel. @@ -36,8 +42,8 @@ struct msqid_ds __time_t msg_rtime; /* time of last msgrcv command */ __time_t msg_ctime; /* time of last change */ unsigned long int __msg_cbytes; /* current number of bytes on queue */ - unsigned long int msg_qnum; /* number of messages currently on queue */ - unsigned long int msg_qbytes; /* max number of bytes allowed on queue */ + msgqnum_t msg_qnum; /* number of messages currently on queue */ + 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; From cf95db7e002abc7d27c9ce7e0e5221af53fdd39f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 25 Feb 2000 08:56:31 +0000 Subject: [PATCH 1824/4487] (IPC_INFO): Only define if __USE_GNU. --- sysdeps/unix/sysv/linux/alpha/bits/ipc.h | 4 +++- sysdeps/unix/sysv/linux/mips/bits/ipc.h | 28 ++++++++++++++---------- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/ipc.h b/sysdeps/unix/sysv/linux/alpha/bits/ipc.h index 7ad2c7c8e0..004a683112 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/ipc.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/ipc.h @@ -31,7 +31,9 @@ #define IPC_RMID 0 /* Remove identifier. */ #define IPC_SET 1 /* Set `ipc_perm' options. */ #define IPC_STAT 2 /* Get `ipc_perm' options. */ -#define IPC_INFO 3 /* See ipcs. */ +#ifdef __USE_GNU +# define IPC_INFO 3 /* See ipcs. */ +#endif /* Special key values. */ #define IPC_PRIVATE ((__key_t) 0) /* Private key. */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/ipc.h b/sysdeps/unix/sysv/linux/mips/bits/ipc.h index 3c2e5276b8..8364dca56e 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/ipc.h +++ b/sysdeps/unix/sysv/linux/mips/bits/ipc.h @@ -31,7 +31,9 @@ #define IPC_RMID 0 /* Remove identifier. */ #define IPC_SET 1 /* Set `ipc_perm' options. */ #define IPC_STAT 2 /* Get `ipc_perm' options. */ -#define IPC_INFO 3 /* See ipcs. */ +#ifdef __USE_GNU +# define IPC_INFO 3 /* See ipcs. */ +#endif /* Special key values. */ #define IPC_PRIVATE ((__key_t) 0) /* Private key. */ @@ -58,15 +60,17 @@ extern int __ipc (int __call, int __first, int __second, int __third, __END_DECLS +#ifdef __USE_GNU /* The codes for the functions to use the multiplexer `__ipc'. */ -#define IPCOP_semop 1 -#define IPCOP_semget 2 -#define IPCOP_semctl 3 -#define IPCOP_msgsnd 11 -#define IPCOP_msgrcv 12 -#define IPCOP_msgget 13 -#define IPCOP_msgctl 14 -#define IPCOP_shmat 21 -#define IPCOP_shmdt 22 -#define IPCOP_shmget 23 -#define IPCOP_shmctl 24 +# define IPCOP_semop 1 +# define IPCOP_semget 2 +# define IPCOP_semctl 3 +# define IPCOP_msgsnd 11 +# define IPCOP_msgrcv 12 +# define IPCOP_msgget 13 +# define IPCOP_msgctl 14 +# define IPCOP_shmat 21 +# define IPCOP_shmdt 22 +# define IPCOP_shmget 23 +# define IPCOP_shmctl 24 +#endif From 5e516adf181b500bcd96a42a3b4401c470bc135e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 25 Feb 2000 17:05:23 +0000 Subject: [PATCH 1825/4487] (struct msqid_ds): Use __pid_t. --- sysdeps/unix/sysv/linux/alpha/bits/msq.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/msq.h b/sysdeps/unix/sysv/linux/alpha/bits/msq.h index 3ca076e9f9..9271ce69d7 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/msq.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/msq.h @@ -44,8 +44,8 @@ struct msqid_ds unsigned long int __msg_cbytes; /* current number of bytes on queue */ msgqnum_t msg_qnum; /* number of messages currently on queue */ 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() */ + __pid_t msg_lspid; /* pid of last msgsnd() */ + __pid_t msg_lrpid; /* pid of last msgrcv() */ unsigned long int __unused1; unsigned long int __unused2; }; From 9a25e078c309f626d8c3c2b30d1d7eb61b6dc7ac Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 26 Feb 2000 00:58:51 +0000 Subject: [PATCH 1826/4487] (__feraiseexcept): Correct declaration to return value. --- sysdeps/alpha/fpu/fraiseexcpt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/fpu/fraiseexcpt.c b/sysdeps/alpha/fpu/fraiseexcpt.c index bcbc06b400..1cf9e580de 100644 --- a/sysdeps/alpha/fpu/fraiseexcpt.c +++ b/sysdeps/alpha/fpu/fraiseexcpt.c @@ -1,5 +1,5 @@ /* Raise given exceptions. - 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. Contributed by Richard Henderson , 1997. @@ -21,7 +21,7 @@ #include #include -void +int __feraiseexcept (int excepts) { double tmp; From 41841677b4a1ce37863bb00ab40327dcdc07ae20 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 26 Feb 2000 01:09:38 +0000 Subject: [PATCH 1827/4487] Change default version to GLIBC_2.2. --- sysdeps/alpha/fpu/fclrexcpt.c | 4 ++-- sysdeps/alpha/fpu/fegetenv.c | 4 ++-- sysdeps/alpha/fpu/fesetenv.c | 4 ++-- sysdeps/alpha/fpu/feupdateenv.c | 4 ++-- sysdeps/alpha/fpu/fgetexcptflg.c | 4 ++-- sysdeps/alpha/fpu/fsetexcptflg.c | 4 ++-- sysdeps/arm/fpu/fclrexcpt.c | 4 ++-- sysdeps/arm/fpu/fegetenv.c | 4 ++-- sysdeps/arm/fpu/fesetenv.c | 4 ++-- sysdeps/arm/fpu/fraiseexcpt.c | 4 ++-- sysdeps/arm/fpu/fsetexcptflg.c | 4 ++-- sysdeps/m68k/fpu/fclrexcpt.c | 4 ++-- sysdeps/m68k/fpu/fegetenv.c | 4 ++-- sysdeps/m68k/fpu/fesetenv.c | 4 ++-- sysdeps/m68k/fpu/feupdateenv.c | 4 ++-- sysdeps/m68k/fpu/fgetexcptflg.c | 4 ++-- sysdeps/m68k/fpu/fraiseexcpt.c | 4 ++-- sysdeps/m68k/fpu/fsetexcptflg.c | 4 ++-- sysdeps/mips/fpu/fclrexcpt.c | 4 ++-- sysdeps/mips/fpu/fegetenv.c | 4 ++-- sysdeps/mips/fpu/fesetenv.c | 4 ++-- sysdeps/mips/fpu/feupdateenv.c | 4 ++-- sysdeps/mips/fpu/fgetexcptflg.c | 4 ++-- 23 files changed, 46 insertions(+), 46 deletions(-) diff --git a/sysdeps/alpha/fpu/fclrexcpt.c b/sysdeps/alpha/fpu/fclrexcpt.c index 2e76995f4e..006f50613d 100644 --- a/sysdeps/alpha/fpu/fclrexcpt.c +++ b/sysdeps/alpha/fpu/fclrexcpt.c @@ -1,5 +1,5 @@ /* Clear given exceptions in current floating-point environment. - Copyright (C) 1997, 1999 Free Software Foundation, Inc. + Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1997. @@ -39,4 +39,4 @@ __feclearexcept (int excepts) } strong_alias (__feclearexcept, __old_feclearexcept) symbol_version (__old_feclearexcept, feclearexcept, GLIBC_2.1); -default_symbol_version (__feclearexcept, feclearexcept, GLIBC_2.1.3); +default_symbol_version (__feclearexcept, feclearexcept, GLIBC_2.2); diff --git a/sysdeps/alpha/fpu/fegetenv.c b/sysdeps/alpha/fpu/fegetenv.c index 63dc7ffaaf..51ce1c21ab 100644 --- a/sysdeps/alpha/fpu/fegetenv.c +++ b/sysdeps/alpha/fpu/fegetenv.c @@ -1,5 +1,5 @@ /* Store current floating-point environment. - Copyright (C) 1997, 1999 Free Software Foundation, Inc. + Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1997 @@ -41,4 +41,4 @@ __fegetenv (fenv_t *envp) } strong_alias (__fegetenv, __old_fegetenv) symbol_version (__old_fegetenv, fegetenv, GLIBC_2.1); -default_symbol_version (__fegetenv, fegetenv, GLIBC_2.1.3); +default_symbol_version (__fegetenv, fegetenv, GLIBC_2.2); diff --git a/sysdeps/alpha/fpu/fesetenv.c b/sysdeps/alpha/fpu/fesetenv.c index 9a38778b0c..58bc13aaf2 100644 --- a/sysdeps/alpha/fpu/fesetenv.c +++ b/sysdeps/alpha/fpu/fesetenv.c @@ -1,5 +1,5 @@ /* Install given floating-point environment. - Copyright (C) 1997, 1999 Free Software Foundation, Inc. + Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1997 @@ -48,4 +48,4 @@ __fesetenv (const fenv_t *envp) } strong_alias (__fesetenv, __old_fesetenv) symbol_version (__old_fesetenv, fesetenv, GLIBC_2.1); -default_symbol_version (__fesetenv, fesetenv, GLIBC_2.1.3); +default_symbol_version (__fesetenv, fesetenv, GLIBC_2.2); diff --git a/sysdeps/alpha/fpu/feupdateenv.c b/sysdeps/alpha/fpu/feupdateenv.c index bd6a979aa7..61226c6b44 100644 --- a/sysdeps/alpha/fpu/feupdateenv.c +++ b/sysdeps/alpha/fpu/feupdateenv.c @@ -1,5 +1,5 @@ /* Install given floating-point environment and raise exceptions. - Copyright (C) 1997, 1999 Free Software Foundation, Inc. + Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1997. @@ -41,4 +41,4 @@ __feupdateenv (const fenv_t *envp) } strong_alias (__feupdateenv, __old_feupdateenv) symbol_version (__old_feupdateenv, feupdateenv, GLIBC_2.1); -default_symbol_version (__feupdateenv, feupdateenv, GLIBC_2.1.3); +default_symbol_version (__feupdateenv, feupdateenv, GLIBC_2.2); diff --git a/sysdeps/alpha/fpu/fgetexcptflg.c b/sysdeps/alpha/fpu/fgetexcptflg.c index 2811d02cd1..bd47535be8 100644 --- a/sysdeps/alpha/fpu/fgetexcptflg.c +++ b/sysdeps/alpha/fpu/fgetexcptflg.c @@ -1,5 +1,5 @@ /* Store current representation for exceptions. - Copyright (C) 1997, 1999 Free Software Foundation, Inc. + Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1997. @@ -36,4 +36,4 @@ __fegetexceptflag (fexcept_t *flagp, int excepts) } strong_alias (__fegetexceptflag, __old_fegetexceptflag) symbol_version (__old_fegetexceptflag, fegetexceptflag, GLIBC_2.1); -default_symbol_version (__fegetexceptflag, fegetexceptflag, GLIBC_2.1.3); +default_symbol_version (__fegetexceptflag, fegetexceptflag, GLIBC_2.2); diff --git a/sysdeps/alpha/fpu/fsetexcptflg.c b/sysdeps/alpha/fpu/fsetexcptflg.c index eeb987ede2..eb74defb5a 100644 --- a/sysdeps/alpha/fpu/fsetexcptflg.c +++ b/sysdeps/alpha/fpu/fsetexcptflg.c @@ -1,5 +1,5 @@ /* Set floating-point environment exception handling. - 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. Contributed by Richard Henderson , 1997. @@ -39,4 +39,4 @@ __fesetexceptflag (const fexcept_t *flagp, int excepts) } strong_alias (__fesetexceptflag, __old_fesetexceptflag) symbol_version (__old_fesetexceptflag, fesetexceptflag, GLIBC_2.1); -default_symbol_version (__fesetexceptflag, fesetexceptflag, GLIBC_2.1.3); +default_symbol_version (__fesetexceptflag, fesetexceptflag, GLIBC_2.2); diff --git a/sysdeps/arm/fpu/fclrexcpt.c b/sysdeps/arm/fpu/fclrexcpt.c index 0bcdfdf5d9..11fb0f84ec 100644 --- a/sysdeps/arm/fpu/fclrexcpt.c +++ b/sysdeps/arm/fpu/fclrexcpt.c @@ -1,5 +1,5 @@ /* Clear given exceptions in current floating-point environment. - 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 @@ -42,4 +42,4 @@ __feclearexcept (int excepts) } strong_alias (__feclearexcept, __old_feclearexcept) symbol_version (__old_feclearexcept, feclearexcept, GLIBC_2.1); -default_symbol_version (__feclearexcept, feclearexcept, GLIBC_2.1.3); +default_symbol_version (__feclearexcept, feclearexcept, GLIBC_2.2); diff --git a/sysdeps/arm/fpu/fegetenv.c b/sysdeps/arm/fpu/fegetenv.c index 7fde5f21e4..53d20897aa 100644 --- a/sysdeps/arm/fpu/fegetenv.c +++ b/sysdeps/arm/fpu/fegetenv.c @@ -1,5 +1,5 @@ /* Store current floating-point environment. - 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 @@ -32,4 +32,4 @@ __fegetenv (fenv_t *envp) } strong_alias (__fegetenv, __old_fegetenv) symbol_version (__old_fegetenv, fegetenv, GLIBC_2.1); -default_symbol_version (__fegetenv, fegetenv, GLIBC_2.1.3); +default_symbol_version (__fegetenv, fegetenv, GLIBC_2.2); diff --git a/sysdeps/arm/fpu/fesetenv.c b/sysdeps/arm/fpu/fesetenv.c index 13cda82554..fd2040d205 100644 --- a/sysdeps/arm/fpu/fesetenv.c +++ b/sysdeps/arm/fpu/fesetenv.c @@ -1,5 +1,5 @@ /* Install given floating-point environment. - 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 @@ -36,4 +36,4 @@ __fesetenv (const fenv_t *envp) } strong_alias (__fesetenv, __old_fesetenv) symbol_version (__old_fesetenv, fesetenv, GLIBC_2.1); -default_symbol_version (__fesetenv, fesetenv, GLIBC_2.1.3); +default_symbol_version (__fesetenv, fesetenv, GLIBC_2.2); diff --git a/sysdeps/arm/fpu/fraiseexcpt.c b/sysdeps/arm/fpu/fraiseexcpt.c index 77d928a32b..9163744ecb 100644 --- a/sysdeps/arm/fpu/fraiseexcpt.c +++ b/sysdeps/arm/fpu/fraiseexcpt.c @@ -1,5 +1,5 @@ /* Raise given exceptions. - 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 @@ -35,4 +35,4 @@ __feraiseexcept (int excepts) } strong_alias (__feraiseexcept, __old_feraiseexcept) symbol_version (__old_feraiseexcept, feraiseexcept, GLIBC_2.1); -default_symbol_version (__feraiseexcept, feraiseexcept, GLIBC_2.1.3); +default_symbol_version (__feraiseexcept, feraiseexcept, GLIBC_2.2); diff --git a/sysdeps/arm/fpu/fsetexcptflg.c b/sysdeps/arm/fpu/fsetexcptflg.c index ef157a27ed..960ca2b360 100644 --- a/sysdeps/arm/fpu/fsetexcptflg.c +++ b/sysdeps/arm/fpu/fsetexcptflg.c @@ -1,5 +1,5 @@ /* Set floating-point environment exception handling. - 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 @@ -41,4 +41,4 @@ __fesetexceptflag (const fexcept_t *flagp, int excepts) } strong_alias (__fesetexceptflag, __old_fesetexceptflag) symbol_version (__old_fesetexceptflag, fesetexceptflag, GLIBC_2.1); -default_symbol_version (__fesetexceptflag, fesetexceptflag, GLIBC_2.1.3); +default_symbol_version (__fesetexceptflag, fesetexceptflag, GLIBC_2.2); diff --git a/sysdeps/m68k/fpu/fclrexcpt.c b/sysdeps/m68k/fpu/fclrexcpt.c index 5b2c4253e5..a2f144bea9 100644 --- a/sysdeps/m68k/fpu/fclrexcpt.c +++ b/sysdeps/m68k/fpu/fclrexcpt.c @@ -1,5 +1,5 @@ /* Clear given exceptions in current floating-point environment. - Copyright (C) 1997, 1999 Free Software Foundation, Inc. + Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab @@ -42,4 +42,4 @@ __feclearexcept (int excepts) } strong_alias (__feclearexcept, __old_feclearexcept) symbol_version (__old_feclearexcept, feclearexcept, GLIBC_2.1); -default_symbol_version (__feclearexcept, feclearexcept, GLIBC_2.1.3); +default_symbol_version (__feclearexcept, feclearexcept, GLIBC_2.2); diff --git a/sysdeps/m68k/fpu/fegetenv.c b/sysdeps/m68k/fpu/fegetenv.c index 8936b38807..60226ffcc0 100644 --- a/sysdeps/m68k/fpu/fegetenv.c +++ b/sysdeps/m68k/fpu/fegetenv.c @@ -1,5 +1,5 @@ /* Store current floating-point environment. - Copyright (C) 1997, 1999 Free Software Foundation, Inc. + Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab @@ -30,4 +30,4 @@ __fegetenv (fenv_t *envp) } strong_alias (__fegetenv, __old_fegetenv) symbol_version (__old_fegetenv, fegetenv, GLIBC_2.1); -default_symbol_version (__fegetenv, fegetenv, GLIBC_2.1.3); +default_symbol_version (__fegetenv, fegetenv, GLIBC_2.2); diff --git a/sysdeps/m68k/fpu/fesetenv.c b/sysdeps/m68k/fpu/fesetenv.c index 11bffb449e..e780fe8320 100644 --- a/sysdeps/m68k/fpu/fesetenv.c +++ b/sysdeps/m68k/fpu/fesetenv.c @@ -1,5 +1,5 @@ /* Install given floating-point environment. - Copyright (C) 1997, 1999 Free Software Foundation, Inc. + Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab @@ -51,4 +51,4 @@ __fesetenv (const fenv_t *envp) } strong_alias (__fesetenv, __old_fesetenv) symbol_version (__old_fesetenv, fesetenv, GLIBC_2.1); -default_symbol_version (__fesetenv, fesetenv, GLIBC_2.1.3); +default_symbol_version (__fesetenv, fesetenv, GLIBC_2.2); diff --git a/sysdeps/m68k/fpu/feupdateenv.c b/sysdeps/m68k/fpu/feupdateenv.c index 48d42d983f..7115f8b5cf 100644 --- a/sysdeps/m68k/fpu/feupdateenv.c +++ b/sysdeps/m68k/fpu/feupdateenv.c @@ -1,5 +1,5 @@ /* Install given floating-point environment and raise exceptions. - Copyright (C) 1997, 1999 Free Software Foundation, Inc. + Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab @@ -42,4 +42,4 @@ __feupdateenv (const fenv_t *envp) } strong_alias (__feupdateenv, __old_feupdateenv) symbol_version (__old_feupdateenv, feupdateenv, GLIBC_2.1); -default_symbol_version (__feupdateenv, feupdateenv, GLIBC_2.1.3); +default_symbol_version (__feupdateenv, feupdateenv, GLIBC_2.2); diff --git a/sysdeps/m68k/fpu/fgetexcptflg.c b/sysdeps/m68k/fpu/fgetexcptflg.c index 5d3a435970..8a56e209b0 100644 --- a/sysdeps/m68k/fpu/fgetexcptflg.c +++ b/sysdeps/m68k/fpu/fgetexcptflg.c @@ -1,5 +1,5 @@ /* Store current representation for exceptions. - Copyright (C) 1997, 1999 Free Software Foundation, Inc. + Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab @@ -35,4 +35,4 @@ __fegetexceptflag (fexcept_t *flagp, int excepts) } strong_alias (__fegetexceptflag, __old_fegetexceptflag) symbol_version (__old_fegetexceptflag, fegetexceptflag, GLIBC_2.1); -default_symbol_version (__fegetexceptflag, fegetexceptflag, GLIBC_2.1.3); +default_symbol_version (__fegetexceptflag, fegetexceptflag, GLIBC_2.2); diff --git a/sysdeps/m68k/fpu/fraiseexcpt.c b/sysdeps/m68k/fpu/fraiseexcpt.c index c283d4bbde..dcdd6c9131 100644 --- a/sysdeps/m68k/fpu/fraiseexcpt.c +++ b/sysdeps/m68k/fpu/fraiseexcpt.c @@ -1,5 +1,5 @@ /* Raise given exceptions. - Copyright (C) 1997, 1999 Free Software Foundation, Inc. + Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab @@ -73,4 +73,4 @@ __feraiseexcept (int excepts) } strong_alias (__feraiseexcept, __old_feraiseexcept) symbol_version (__old_feraiseexcept, feraiseexcept, GLIBC_2.1); -default_symbol_version (__feraiseexcept, feraiseexcept, GLIBC_2.1.3); +default_symbol_version (__feraiseexcept, feraiseexcept, GLIBC_2.2); diff --git a/sysdeps/m68k/fpu/fsetexcptflg.c b/sysdeps/m68k/fpu/fsetexcptflg.c index 890042a0a7..04ecf66c9c 100644 --- a/sysdeps/m68k/fpu/fsetexcptflg.c +++ b/sysdeps/m68k/fpu/fsetexcptflg.c @@ -1,5 +1,5 @@ /* Set floating-point environment exception handling. - Copyright (C) 1997, 1999 Free Software Foundation, Inc. + Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab @@ -41,4 +41,4 @@ __fesetexceptflag (const fexcept_t *flagp, int excepts) } strong_alias (__fesetexceptflag, __old_fesetexceptflag) symbol_version (__old_fesetexceptflag, fesetexceptflag, GLIBC_2.1); -default_symbol_version (__fesetexceptflag, fesetexceptflag, GLIBC_2.1.3); +default_symbol_version (__fesetexceptflag, fesetexceptflag, GLIBC_2.2); diff --git a/sysdeps/mips/fpu/fclrexcpt.c b/sysdeps/mips/fpu/fclrexcpt.c index 990dfe6996..93915d6a5d 100644 --- a/sysdeps/mips/fpu/fclrexcpt.c +++ b/sysdeps/mips/fpu/fclrexcpt.c @@ -1,5 +1,5 @@ /* Clear given exceptions in current floating-point environment. - Copyright (C) 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger , 1998. @@ -43,4 +43,4 @@ __feclearexcept (int excepts) } strong_alias (__feclearexcept, __old_feclearexcept) symbol_version (__old_feclearexcept, feclearexcept, GLIBC_2.1); -default_symbol_version (__feclearexcept, feclearexcept, GLIBC_2.1.3); +default_symbol_version (__feclearexcept, feclearexcept, GLIBC_2.2); diff --git a/sysdeps/mips/fpu/fegetenv.c b/sysdeps/mips/fpu/fegetenv.c index 72b7ee5811..de263ca044 100644 --- a/sysdeps/mips/fpu/fegetenv.c +++ b/sysdeps/mips/fpu/fegetenv.c @@ -1,5 +1,5 @@ /* Store current floating-point environment. - Copyright (C) 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger , 1998. @@ -31,4 +31,4 @@ __fegetenv (fenv_t *envp) } strong_alias (__fegetenv, __old_fegetenv) symbol_version (__old_fegetenv, fegetenv, GLIBC_2.1); -default_symbol_version (__fegetenv, fegetenv, GLIBC_2.1.3); +default_symbol_version (__fegetenv, fegetenv, GLIBC_2.2); diff --git a/sysdeps/mips/fpu/fesetenv.c b/sysdeps/mips/fpu/fesetenv.c index 43a571efde..37e9027b2c 100644 --- a/sysdeps/mips/fpu/fesetenv.c +++ b/sysdeps/mips/fpu/fesetenv.c @@ -1,5 +1,5 @@ /* Install given floating-point environment. - Copyright (C) 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger , 1998. @@ -34,4 +34,4 @@ __fesetenv (const fenv_t *envp) } strong_alias (__fesetenv, __old_fesetenv) symbol_version (__old_fesetenv, fesetenv, GLIBC_2.1); -default_symbol_version (__fesetenv, fesetenv, GLIBC_2.1.3); +default_symbol_version (__fesetenv, fesetenv, GLIBC_2.2); diff --git a/sysdeps/mips/fpu/feupdateenv.c b/sysdeps/mips/fpu/feupdateenv.c index f0748cee77..8c24881449 100644 --- a/sysdeps/mips/fpu/feupdateenv.c +++ b/sysdeps/mips/fpu/feupdateenv.c @@ -1,5 +1,5 @@ /* Install given floating-point environment and raise exceptions. - Copyright (C) 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger , 1998. @@ -43,4 +43,4 @@ __feupdateenv (const fenv_t *envp) } strong_alias (__feupdateenv, __old_feupdateenv) symbol_version (__old_feupdateenv, feupdateenv, GLIBC_2.1); -default_symbol_version (__feupdateenv, feupdateenv, GLIBC_2.1.3); +default_symbol_version (__feupdateenv, feupdateenv, GLIBC_2.2); diff --git a/sysdeps/mips/fpu/fgetexcptflg.c b/sysdeps/mips/fpu/fgetexcptflg.c index 8c586b5200..64a2e11e1b 100644 --- a/sysdeps/mips/fpu/fgetexcptflg.c +++ b/sysdeps/mips/fpu/fgetexcptflg.c @@ -1,5 +1,5 @@ /* Store current representation for exceptions. - Copyright (C) 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger , 1998. @@ -36,4 +36,4 @@ __fegetexceptflag (fexcept_t *flagp, int excepts) } strong_alias (__fegetexceptflag, __old_fegetexceptflag) symbol_version (__old_fegetexceptflag, fegetexceptflag, GLIBC_2.1); -default_symbol_version (__fegetexceptflag, fegetexceptflag, GLIBC_2.1.3); +default_symbol_version (__fegetexceptflag, fegetexceptflag, GLIBC_2.2); From b90be065426c33b15807040ff4e31a654fb13659 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sat, 26 Feb 2000 08:13:07 +0000 Subject: [PATCH 1828/4487] Apply forgotten patch to change default version to 2.2. --- sysdeps/alpha/fpu/fraiseexcpt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/alpha/fpu/fraiseexcpt.c b/sysdeps/alpha/fpu/fraiseexcpt.c index 1cf9e580de..a3e60d02eb 100644 --- a/sysdeps/alpha/fpu/fraiseexcpt.c +++ b/sysdeps/alpha/fpu/fraiseexcpt.c @@ -67,4 +67,4 @@ __feraiseexcept (int excepts) } strong_alias (__feraiseexcept, __old_feraiseexcept) symbol_version (__old_feraiseexcept, feraiseexcept, GLIBC_2.1); -default_symbol_version (__feraiseexcept, feraiseexcept, GLIBC_2.1.3); +default_symbol_version (__feraiseexcept, feraiseexcept, GLIBC_2.2); From 37b22a8dd3975eb3ab47a93bf5237bf802e7bf55 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 28 Feb 2000 04:59:24 +0000 Subject: [PATCH 1829/4487] Fix type of second parameter. --- sysdeps/unix/sysv/irix4/getpriority.c | 4 ++-- sysdeps/unix/sysv/irix4/setpriority.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/irix4/getpriority.c b/sysdeps/unix/sysv/irix4/getpriority.c index 290573a65c..5203b42ac9 100644 --- a/sysdeps/unix/sysv/irix4/getpriority.c +++ b/sysdeps/unix/sysv/irix4/getpriority.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1996, 1997, 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 @@ -29,7 +29,7 @@ extern int __sysmp __P ((int, ...)); int getpriority (which, who) enum __priority_which which; - int who; + id_t who; { switch (which) { diff --git a/sysdeps/unix/sysv/irix4/setpriority.c b/sysdeps/unix/sysv/irix4/setpriority.c index 5d6313ae1c..8e2c8ec943 100644 --- a/sysdeps/unix/sysv/irix4/setpriority.c +++ b/sysdeps/unix/sysv/irix4/setpriority.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1996, 1997, 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 @@ -23,7 +23,7 @@ int setpriority (which, who, prio) enum __priority_which which; - int who; + id_t who; int prio; { switch (which) From 2c11d9bcf5a9cd5bb38650ca7a44edd98db88c5c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 28 Feb 2000 05:02:28 +0000 Subject: [PATCH 1830/4487] Define shmatt_t type and use it in struct shmid_ds definition. --- sysdeps/unix/sysv/linux/alpha/bits/shm.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/shm.h b/sysdeps/unix/sysv/linux/alpha/bits/shm.h index 683a9b6726..acd479de57 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/shm.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/shm.h @@ -20,7 +20,7 @@ # error "Never include directly; use instead." #endif -#include +#include /* Permission flag for shmget. */ #define SHM_R 0400 /* or S_IRUGO from */ @@ -36,6 +36,9 @@ #define SHM_UNLOCK 12 /* unlock segment (root only) */ +/* Type to count number of attaches. */ +typedef unsigned long int shmatt_t; + /* Data structure describing a set of semaphores. */ struct shmid_ds { @@ -44,9 +47,9 @@ struct shmid_ds __time_t shm_atime; /* time of last shmat() */ __time_t shm_dtime; /* time of last shmdt() */ __time_t shm_ctime; /* time of last change by shmctl() */ - pid_t shm_cpid; /* pid of creator */ - pid_t shm_lpid; /* pid of last shmop */ - unsigned long int shm_nattch; /* number of current attaches */ + __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; }; From e6e840f034d9a74d4dff3af5e567405248557257 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 28 Feb 2000 20:50:34 +0000 Subject: [PATCH 1831/4487] Define DL_CALL_FCT here. --- sysdeps/mips/bits/dlfcn.h | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/sysdeps/mips/bits/dlfcn.h b/sysdeps/mips/bits/dlfcn.h index 2939d9e19f..0da3a67a92 100644 --- a/sysdeps/mips/bits/dlfcn.h +++ b/sysdeps/mips/bits/dlfcn.h @@ -1,5 +1,5 @@ /* System dependent definitions for run-time dynamic loading. - Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 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 @@ -35,3 +35,21 @@ The implementation does this by default and so we can define the value to zero. */ #define RTLD_LOCAL 0 + +#ifdef __USE_GNU +/* To support profiling of shared objects it is a good idea to call + the function found using `dlsym' using the following macro since + these calls do not use the PLT. But this would mean the dynamic + loader has no chance to find out when the function is called. The + macro applies the necessary magic so that profiling is possible. + Rewrite + foo = (*fctp) (arg1, arg2); + into + foo = DL_CALL_FCT (fctp, (arg1, arg2)); +*/ +# define DL_CALL_FCT(fctp, args) \ + (_dl_mcount_wrapper_check (fctp), (*(fctp)) args) + +/* This function calls the profiling functions. */ +extern void _dl_mcount_wrapper_check (void *__selfpc) __THROW; +#endif From 1a76429b6563f4eb73c4a43865b4879719244717 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 28 Feb 2000 21:15:52 +0000 Subject: [PATCH 1832/4487] Define _STATFS_F_NAMELEN. --- sysdeps/unix/sysv/linux/mips/bits/statfs.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/statfs.h b/sysdeps/unix/sysv/linux/mips/bits/statfs.h index 36d9996a69..1099ae1f5e 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/statfs.h +++ b/sysdeps/unix/sysv/linux/mips/bits/statfs.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997 Free Software Foundation, Inc. +/* Copyright (C) 1997, 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 @@ -67,3 +67,6 @@ struct statfs64 long int f_spare[6]; }; #endif + +/* Tell code we have these members. */ +#define _STATFS_F_NAMELEN From 2e6c2875e8dafd33badd62eb93d40e57705f636f Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 10 Mar 2000 08:40:34 +0000 Subject: [PATCH 1833/4487] 2000-03-09 Martin Buchholz * sysdeps/unix/sysv/linux/alpha/syscall.S: * manual/message.texi (Using gettextized software): * manual/message.texi (Message Translation): Doc Fixes. * manual/filesys.texi (File Size): * manual/charset.texi (glibc iconv Implementation): * locale/programs/ld-collate.c (collate_output): * iconv/gconv_db.c (find_derivation): * manual/install.texi: * manual/search.texi (Hash Search Function): * manual/stdio.texi (Output Conversion Syntax): * FAQ.in: * config.h.in: * sysdeps/generic/dl-sysdep.c: Doc Fixes. `allows to' is not correct English. * elf/rtld.c: Doc fixes. * manual/creature.texi (Feature Test Macros): Doc fixes. * manual/memory.texi (Hooks for Malloc): Doc Fixes. * manual/filesys.texi (Working Directory): Check for ERANGE to avoid infloop. --- sysdeps/unix/sysv/linux/alpha/syscall.S | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/syscall.S b/sysdeps/unix/sysv/linux/alpha/syscall.S index d25dd6b51f..7f8a33f304 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscall.S +++ b/sysdeps/unix/sysv/linux/alpha/syscall.S @@ -21,10 +21,10 @@ /* * This is for COMPATIBILITY with Linux/x86 only. Linux/Alpha system - * calls return an error indication in a3. This allows to return - * arbitrary 64bit values in v0 (because negative values are not - * mistaken as error numbers). However, C allows to return only one - * value so the interface below folds the error indication passed in + * calls return an error indication in a3. This allows arbitrary 64bit + * values to be returned in v0 (because negative values are not + * mistaken as error numbers). However, C allows only one value to + * be returned, so the interface below folds the error indication passed in * a3 back into v0: it sets v0 to -errno if an error occurs. Thus, * no negative 64bit numbers can be returned. To avoid this problem, * use assembly stubs wherever possible/convenient. From 052065ad7b493a0401582a698e4d0c8a6951b7e3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 15 Mar 2000 07:22:08 +0000 Subject: [PATCH 1834/4487] (platform): Add entry for Nautilus. --- sysdeps/unix/sysv/linux/alpha/ioperm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c index 7b38fcceea..65bab818d9 100644 --- a/sysdeps/unix/sysv/linux/alpha/ioperm.c +++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1996-1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger. @@ -139,6 +139,7 @@ static struct platform { {"Sable", IOSYS_CPUDEP}, {"Miata", IOSYS_CIA}, {"Tsunami", IOSYS_TSUNAMI}, + {"Nautilus", IOSYS_TSUNAMI}, {"Rawhide", IOSYS_MCPCIA}, {"Ruffian", IOSYS_CIA}, {"Takara", IOSYS_CIA}, From 9399c12de52b29c259a15f59c2621c48efbe8ecd Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 16 Mar 2000 07:06:45 +0000 Subject: [PATCH 1835/4487] Make __pread64 weak alias. --- sysdeps/unix/sysv/linux/mips/pread64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/pread64.c b/sysdeps/unix/sysv/linux/mips/pread64.c index 85fe77c762..d17dbeb396 100644 --- a/sysdeps/unix/sysv/linux/mips/pread64.c +++ b/sysdeps/unix/sysv/linux/mips/pread64.c @@ -63,7 +63,7 @@ __libc_pread64 (fd, buf, count, offset) return result; } -strong_alias (__libc_pread64, __pread64) +weak_alias (__libc_pread64, __pread64) weak_alias (__libc_pread64, pread64) # define __libc_pread64(fd, buf, count, offset) \ From 59e14c2112c9b7a6bbdab7042d23223fa30e2ec1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 16 Mar 2000 07:07:13 +0000 Subject: [PATCH 1836/4487] Make __pwrite64 weak alias. --- sysdeps/unix/sysv/linux/mips/pwrite64.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/pwrite64.c b/sysdeps/unix/sysv/linux/mips/pwrite64.c index 2086f76985..295a1754b6 100644 --- a/sysdeps/unix/sysv/linux/mips/pwrite64.c +++ b/sysdeps/unix/sysv/linux/mips/pwrite64.c @@ -63,7 +63,7 @@ __libc_pwrite64 (fd, buf, count, offset) return result; } -strong_alias (__libc_pwrite64, __pwrite64) +weak_alias (__libc_pwrite64, __pwrite64) weak_alias (__libc_pwrite64, pwrite64) # define __libc_pwrite64(fd, buf, count, offset) \ @@ -73,4 +73,3 @@ weak_alias (__libc_pwrite64, pwrite64) #if __ASSUME_PWRITE_SYSCALL == 0 # include #endif - From 194b9b3b26d70c79d4c40d90e07f4d59efbc5b20 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 20 Mar 2000 20:23:05 +0000 Subject: [PATCH 1837/4487] * sysdeps/unix/sysv/linux/alpha/Makefile (sysdep_routines): Kill sethae. * sysdeps/unix/sysv/linux/alpha/Versions: Add pciconfig_iobase. * sysdeps/unix/sysv/linux/alpha/ioperm.c (all address constants): Use physical addresses not KSEG addresses. (io_system): Add PYXIS. (io): Remove hae.reg, sys, hae_shift. (stb_mb, stw_mb, stl_mb, __sethae): New. (inline_outb, inline_outw, inline_outl): Don't set hae. (inline_inb, inline_inw, inline_inl): Likewise. (dense_sethae): New null function. (struct cpuinfo_data): New. (process_cpuinfo): Use local and stack variables, not static. Move readlink check here from init_iosys. (init_iosys): Use __pciconfig_iobase first. Know SX and LX as PYXIS. (_iopl): Simplify. (_hae_shift): Calculate it here. * sysdeps/unix/sysv/linux/alpha/syscalls.list: Remove sethae, add pciconfig_iobase. --- sysdeps/unix/sysv/linux/alpha/Makefile | 2 +- sysdeps/unix/sysv/linux/alpha/Versions | 3 + sysdeps/unix/sysv/linux/alpha/ioperm.c | 521 +++++++++++--------- sysdeps/unix/sysv/linux/alpha/sys/io.h | 18 + sysdeps/unix/sysv/linux/alpha/syscalls.list | 4 +- 5 files changed, 320 insertions(+), 228 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile index 0f08d13f69..62536ae1ae 100644 --- a/sysdeps/unix/sysv/linux/alpha/Makefile +++ b/sysdeps/unix/sysv/linux/alpha/Makefile @@ -6,7 +6,7 @@ ifeq ($(subdir),misc) sysdep_headers += alpha/ptrace.h alpha/regdef.h sys/io.h sysdep_routines += ieee_get_fp_control ieee_set_fp_control \ - sethae ioperm osf_sigprocmask llseek adjtimex + ioperm osf_sigprocmask llseek adjtimex # Support old timeval32 entry points sysdep_routines += osf_select osf_gettimeofday osf_settimeofday \ diff --git a/sysdeps/unix/sysv/linux/alpha/Versions b/sysdeps/unix/sysv/linux/alpha/Versions index ad490400fb..d1b0e48711 100644 --- a/sysdeps/unix/sysv/linux/alpha/Versions +++ b/sysdeps/unix/sysv/linux/alpha/Versions @@ -46,4 +46,7 @@ libc { # w* wait4; } + GLIBC_2.1.3 { + pciconfig_iobase; + } } diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c index 65bab818d9..310930bc21 100644 --- a/sysdeps/unix/sysv/linux/alpha/ioperm.c +++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c @@ -21,11 +21,11 @@ Modern devices hopefully are sane enough not to put any performance critical registers in i/o space. - On the first call to ioperm() or _sethae(), the entire (E)ISA port - space is mapped into the virtual address space at address io.base. - mprotect() calls are then used to enable/disable access to ports. Per - page, there are PAGE_SIZE>>IO_SHIFT I/O ports (e.g., 256 ports on a - Low Cost Alpha based system using 8KB pages). + On the first call to ioperm, the entire (E)ISA port space is mapped + into the virtual address space at address io.base. mprotect calls + are then used to enable/disable access to ports. Per page, there + are PAGE_SIZE>>IO_SHIFT I/O ports (e.g., 256 ports on a Low Cost Alpha + based system using 8KB pages). Keep in mind that this code should be able to run in a 32bit address space. It is therefore unreasonable to expect mmap'ing the entire @@ -42,57 +42,62 @@ #include #include +#include -#include -#include +#include +#include #define PATH_ALPHA_SYSTYPE "/etc/alpha_systype" #define PATH_CPUINFO "/proc/cpuinfo" #define MAX_PORT 0x10000 +#define vip volatile int * #define vuip volatile unsigned int * +#define vusp volatile unsigned short * +#define vucp volatile unsigned char * -#define JENSEN_IO_BASE (0xfffffc0300000000UL) -#define JENSEN_SPARSE_MEM (0xfffffc0200000000UL) +#define JENSEN_IO_BASE (0x300000000UL) +#define JENSEN_SPARSE_MEM (0x200000000UL) /* With respect to the I/O architecture, APECS and LCA are identical, so the following defines apply to LCA as well. */ -#define APECS_IO_BASE (0xfffffc01c0000000UL) -#define APECS_SPARSE_MEM (0xfffffc0200000000UL) -#define APECS_DENSE_MEM (0xfffffc0300000000UL) +#define APECS_IO_BASE (0x1c0000000UL) +#define APECS_SPARSE_MEM (0x200000000UL) +#define APECS_DENSE_MEM (0x300000000UL) -/* The same holds for CIA and PYXIS. */ -#define CIA_IO_BASE (0xfffffc8580000000UL) -#define CIA_SPARSE_MEM (0xfffffc8000000000UL) -#define CIA_DENSE_MEM (0xfffffc8600000000UL) +/* The same holds for CIA and PYXIS, except for PYXIS we prefer BWX. */ +#define CIA_IO_BASE (0x8580000000UL) +#define CIA_SPARSE_MEM (0x8000000000UL) +#define CIA_DENSE_MEM (0x8600000000UL) -/* SABLE is EV4, GAMMA is EV5 */ -#define T2_IO_BASE (0xfffffc03a0000000UL) -#define T2_SPARSE_MEM (0xfffffc0200000000UL) -#define T2_DENSE_MEM (0xfffffc03c0000000UL) +#define PYXIS_IO_BASE (0x8900000000UL) +#define PYXIS_DENSE_MEM (0x8800000000UL) -#define GAMMA_IO_BASE (0xfffffc83a0000000UL) -#define GAMMA_SPARSE_MEM (0xfffffc8200000000UL) -#define GAMMA_DENSE_MEM (0xfffffc83c0000000UL) +/* SABLE is EV4, GAMMA is EV5 */ +#define T2_IO_BASE (0x3a0000000UL) +#define T2_SPARSE_MEM (0x200000000UL) +#define T2_DENSE_MEM (0x3c0000000UL) -/* these are for the RAWHIDE family */ -#define MCPCIA_IO_BASE (0xfffffcf980000000UL) -#define MCPCIA_SPARSE_MEM (0xfffffcf800000000UL) -#define MCPCIA_DENSE_MEM (0xfffffcf900000000UL) +#define GAMMA_IO_BASE (0x83a0000000UL) +#define GAMMA_SPARSE_MEM (0x8200000000UL) +#define GAMMA_DENSE_MEM (0x83c0000000UL) -/* Tsunami has no SPARSE space */ /* NOTE: these are hardwired to PCI bus 0 addresses!!! */ -/* Also, these are PHYSICAL, as/so there's no KSEG translation */ -#define TSUNAMI_IO_BASE (0x00000801fc000000UL + 0xfffffc0000000000UL) -#define TSUNAMI_DENSE_MEM (0x0000080000000000UL + 0xfffffc0000000000UL) +#define MCPCIA_IO_BASE (0xf980000000UL) +#define MCPCIA_SPARSE_MEM (0xf800000000UL) +#define MCPCIA_DENSE_MEM (0xf900000000UL) + +/* Tsunami and Irongate use the same offsets, at least for hose 0. */ +#define TSUNAMI_IO_BASE (0x801fc000000UL) +#define TSUNAMI_DENSE_MEM (0x80000000000UL) -/* Polaris has SPARSE space, but we prefer to use only DENSE */ -/* because of some idiosyncracies in actually using SPARSE */ -#define POLARIS_IO_BASE (0xfffffcf9fc000000UL) -#define POLARIS_DENSE_MEM (0xfffffcf900000000UL) +/* Polaris has SPARSE space, but we prefer to use only DENSE + because of some idiosyncracies in actually using SPARSE. */ +#define POLARIS_IO_BASE (0xf9fc000000UL) +#define POLARIS_DENSE_MEM (0xf900000000UL) typedef enum { - IOSYS_UNKNOWN, IOSYS_JENSEN, IOSYS_APECS, IOSYS_CIA, IOSYS_T2, + IOSYS_UNKNOWN, IOSYS_JENSEN, IOSYS_APECS, IOSYS_CIA, IOSYS_PYXIS, IOSYS_T2, IOSYS_TSUNAMI, IOSYS_MCPCIA, IOSYS_GAMMA, IOSYS_POLARIS, IOSYS_CPUDEP, IOSYS_PCIDEP } iosys_t; @@ -102,22 +107,22 @@ typedef enum { } ioswizzle_t; static struct io_system { - int hae_shift; unsigned long int bus_memory_base; unsigned long int sparse_bus_mem_base; unsigned long int bus_io_base; } io_system[] = { /* NOTE! must match iosys_t enumeration */ -/* UNKNOWN */ {0, 0, 0, 0}, -/* JENSEN */ {7, 0, JENSEN_SPARSE_MEM, JENSEN_IO_BASE}, -/* APECS */ {5, APECS_DENSE_MEM, APECS_SPARSE_MEM, APECS_IO_BASE}, -/* CIA */ {5, CIA_DENSE_MEM, CIA_SPARSE_MEM, CIA_IO_BASE}, -/* T2 */ {5, T2_DENSE_MEM, T2_SPARSE_MEM, T2_IO_BASE}, -/* TSUNAMI */ {0, TSUNAMI_DENSE_MEM, 0, TSUNAMI_IO_BASE}, -/* MCPCIA */ {5, MCPCIA_DENSE_MEM, MCPCIA_SPARSE_MEM, MCPCIA_IO_BASE}, -/* GAMMA */ {5, GAMMA_DENSE_MEM, GAMMA_SPARSE_MEM, GAMMA_IO_BASE}, -/* POLARIS */ {0, POLARIS_DENSE_MEM, 0, POLARIS_IO_BASE}, -/* CPUDEP */ {0, 0, 0, 0}, /* for platforms dependent on CPU type */ -/* PCIDEP */ {0, 0, 0, 0}, /* for platforms dependent on core logic */ +/* UNKNOWN */ {0, 0, 0}, +/* JENSEN */ {0, JENSEN_SPARSE_MEM, JENSEN_IO_BASE}, +/* APECS */ {APECS_DENSE_MEM, APECS_SPARSE_MEM, APECS_IO_BASE}, +/* CIA */ {CIA_DENSE_MEM, CIA_SPARSE_MEM, CIA_IO_BASE}, +/* PYXIS */ {PYXIS_DENSE_MEM, 0, PYXIS_IO_BASE}, +/* T2 */ {T2_DENSE_MEM, T2_SPARSE_MEM, T2_IO_BASE}, +/* TSUNAMI */ {TSUNAMI_DENSE_MEM, 0, TSUNAMI_IO_BASE}, +/* MCPCIA */ {MCPCIA_DENSE_MEM, MCPCIA_SPARSE_MEM, MCPCIA_IO_BASE}, +/* GAMMA */ {GAMMA_DENSE_MEM, GAMMA_SPARSE_MEM, GAMMA_IO_BASE}, +/* POLARIS */ {POLARIS_DENSE_MEM, 0, POLARIS_IO_BASE}, +/* CPUDEP */ {0, 0, 0}, /* for platforms dependent on CPU type */ +/* PCIDEP */ {0, 0, 0}, /* for platforms dependent on core logic */ }; static struct platform { @@ -126,23 +131,23 @@ static struct platform { } platform[] = { {"Alcor", IOSYS_CIA}, {"Avanti", IOSYS_APECS}, - {"XL", IOSYS_APECS}, {"Cabriolet", IOSYS_APECS}, {"EB164", IOSYS_PCIDEP}, {"EB64+", IOSYS_APECS}, {"EB66", IOSYS_APECS}, {"EB66P", IOSYS_APECS}, {"Jensen", IOSYS_JENSEN}, + {"Miata", IOSYS_PYXIS}, {"Mikasa", IOSYS_CPUDEP}, - {"Noritake", IOSYS_CPUDEP}, - {"Noname", IOSYS_APECS}, - {"Sable", IOSYS_CPUDEP}, - {"Miata", IOSYS_CIA}, - {"Tsunami", IOSYS_TSUNAMI}, {"Nautilus", IOSYS_TSUNAMI}, + {"Noname", IOSYS_APECS}, + {"Noritake", IOSYS_CPUDEP}, {"Rawhide", IOSYS_MCPCIA}, - {"Ruffian", IOSYS_CIA}, + {"Ruffian", IOSYS_PYXIS}, + {"Sable", IOSYS_CPUDEP}, {"Takara", IOSYS_CIA}, + {"Tsunami", IOSYS_TSUNAMI}, + {"XL", IOSYS_APECS}, }; struct ioswtch { @@ -156,31 +161,58 @@ struct ioswtch { }; static struct { - struct hae { - unsigned long int cache; - unsigned long int * reg; - } hae; + unsigned long int hae_cache; unsigned long int base; struct ioswtch * swp; unsigned long int bus_memory_base; unsigned long int sparse_bus_memory_base; unsigned long int io_base; - iosys_t sys; ioswizzle_t swiz; - int hae_shift; } io; -extern void __sethae (unsigned long int); /* we can't use asm/io.h */ +static inline void +stb_mb(unsigned char val, unsigned long addr) +{ + __asm__("stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val)); +} + +static inline void +stw_mb(unsigned short val, unsigned long addr) +{ + __asm__("stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val)); +} + +static inline void +stl_mb(unsigned int val, unsigned long addr) +{ + __asm__("stl %1,%0; mb" : "=m"(*(vip)addr) : "r"(val)); +} + +/* No need to examine error -- sethae never fails. */ +static inline void +__sethae(unsigned long value) +{ + register unsigned long r16 __asm__("$16") = value; + register unsigned long r0 __asm__("$0") = __NR_sethae; + __asm__ __volatile__ ("callsys" + : "=r"(r0) + : "0"(r0), "r" (r16) + : inline_syscall_clobbers, "$19"); +} + +extern long __pciconfig_iobase(enum __pciconfig_iobase_which __which, + unsigned long int __bus, + unsigned long int __dfn); static inline unsigned long int port_to_cpu_addr (unsigned long int port, ioswizzle_t ioswiz, int size) { if (ioswiz == IOSWIZZLE_SPARSE) - return (port << 5) + ((size - 1) << 3) + io.base; + return io.base + (port << 5) + ((size - 1) << 3); else if (ioswiz == IOSWIZZLE_DENSE) return port + io.base; else - return (port << 7) + ((size - 1) << 5) + io.base; + return io.base + (port << 7) + ((size - 1) << 5); } static inline void @@ -192,20 +224,20 @@ inline_sethae (unsigned long int addr, ioswizzle_t ioswiz) /* no need to set hae if msb is 0: */ msb = addr & 0xf8000000; - if (msb && msb != io.hae.cache) + if (msb && msb != io.hae_cache) { + io.hae_cache = msb; __sethae (msb); - io.hae.cache = msb; } } - else + else if (ioswiz == IOSWIZZLE_JENSEN) { - /* hae on the Jensen is bits 31:25 shifted right */ + /* HAE on the Jensen is bits 31:25 shifted right. */ addr >>= 25; - if (addr != io.hae.cache) + if (addr != io.hae_cache) { + io.hae_cache = addr; __sethae (addr); - io.hae.cache = addr; } } } @@ -216,23 +248,19 @@ inline_outb (unsigned char b, unsigned long int port, ioswizzle_t ioswiz) unsigned int w; unsigned long int addr = port_to_cpu_addr (port, ioswiz, 1); - inline_sethae (0, ioswiz); asm ("insbl %2,%1,%0" : "=r" (w) : "ri" (port & 0x3), "r" (b)); - *(vuip)addr = w; - mb (); + stl_mb(w, addr); } static inline void inline_outw (unsigned short int b, unsigned long int port, ioswizzle_t ioswiz) { - unsigned int w; + unsigned long w; unsigned long int addr = port_to_cpu_addr (port, ioswiz, 2); - inline_sethae (0, ioswiz); asm ("inswl %2,%1,%0" : "=r" (w) : "ri" (port & 0x3), "r" (b)); - *(vuip)addr = w; - mb (); + stl_mb(w, addr); } @@ -241,19 +269,17 @@ inline_outl (unsigned int b, unsigned long int port, ioswizzle_t ioswiz) { unsigned long int addr = port_to_cpu_addr (port, ioswiz, 4); - inline_sethae (0, ioswiz); - *(vuip)addr = b; - mb (); + stl_mb(b, addr); } static inline unsigned int inline_inb (unsigned long int port, ioswizzle_t ioswiz) { - unsigned long int result, addr = port_to_cpu_addr (port, ioswiz, 1); + unsigned long int addr = port_to_cpu_addr (port, ioswiz, 1); + int result; - inline_sethae (0, ioswiz); - result = *(vuip) addr; + result = *(vip) addr; result >>= (port & 3) * 8; return 0xffUL & result; } @@ -262,10 +288,10 @@ inline_inb (unsigned long int port, ioswizzle_t ioswiz) static inline unsigned int inline_inw (unsigned long int port, ioswizzle_t ioswiz) { - unsigned long int result, addr = port_to_cpu_addr (port, ioswiz, 2); + unsigned long int addr = port_to_cpu_addr (port, ioswiz, 2); + int result; - inline_sethae (0, ioswiz); - result = *(vuip) addr; + result = *(vip) addr; result >>= (port & 3) * 8; return 0xffffUL & result; } @@ -276,7 +302,6 @@ inline_inl (unsigned long int port, ioswizzle_t ioswiz) { unsigned long int addr = port_to_cpu_addr (port, ioswiz, 4); - inline_sethae (0, ioswiz); return *(vuip) addr; } @@ -303,45 +328,41 @@ static inline void inline_bwx_outb (unsigned char b, unsigned long int port) { unsigned long int addr = dense_port_to_cpu_addr (port); - - __asm__ __volatile__ ("stb %1,%0" : : "m"(*(unsigned char *)addr), "r"(b)); - mb (); + stb_mb (b, addr); } static inline void inline_bwx_outw (unsigned short int b, unsigned long int port) { unsigned long int addr = dense_port_to_cpu_addr (port); - - __asm__ __volatile__ ("stw %1,%0" : : "m"(*(unsigned short *)addr), "r"(b)); - mb (); + stw_mb (b, addr); } static inline void inline_bwx_outl (unsigned int b, unsigned long int port) { unsigned long int addr = dense_port_to_cpu_addr (port); - - *(vuip)addr = b; - mb (); + stl_mb (b, addr); } static inline unsigned int inline_bwx_inb (unsigned long int port) { - unsigned long int r, addr = dense_port_to_cpu_addr (port); + unsigned long int addr = dense_port_to_cpu_addr (port); + unsigned char r; - __asm__ __volatile__ ("ldbu %0,%1" : "=r"(r) : "m"(*(unsigned char *)addr)); - return 0xffUL & r; + __asm__ ("ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr)); + return r; } static inline unsigned int inline_bwx_inw (unsigned long int port) { - unsigned long int r, addr = dense_port_to_cpu_addr (port); + unsigned long int addr = dense_port_to_cpu_addr (port); + unsigned short r; - __asm__ __volatile__ ("ldwu %0,%1" : "=r"(r) : "m"(*(unsigned short *)addr)); - return 0xffffUL & r; + __asm__ ("ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr)); + return r; } static inline unsigned int @@ -411,6 +432,7 @@ DCL_IN(sparse, inb, SPARSE) DCL_IN(sparse, inw, SPARSE) DCL_IN(sparse, inl, SPARSE) +DCL_SETHAE(dense, DENSE) DCL_OUT_BWX(dense, outb, char) DCL_OUT_BWX(dense, outw, short int) DCL_OUT_BWX(dense, outl, int) @@ -431,7 +453,7 @@ static struct ioswtch ioswtch[] = { sparse_inb, sparse_inw, sparse_inl }, { - NULL, + dense_sethae, dense_outb, dense_outw, dense_outl, dense_inb, dense_inw, dense_inl } @@ -439,171 +461,216 @@ static struct ioswtch ioswtch[] = { #undef DEBUG_IOPERM -/* routine to process the /proc/cpuinfo information into the fields */ -/* that are required for correctly determining the platform parameters */ +/* Routine to process the /proc/cpuinfo information into the fields + that are required for correctly determining the platform parameters. */ -char systype[256]; /* system type field */ -char sysvari[256]; /* system variation field */ -char cpumodel[256]; /* cpu model field */ -int got_type, got_vari, got_model; +struct cpuinfo_data +{ + char systype[256]; /* system type field */ + char sysvari[256]; /* system variation field */ + char cpumodel[256]; /* cpu model field */ +}; -static int -process_cpuinfo(void) +static inline int +process_cpuinfo(struct cpuinfo_data *data) { + int got_type, got_vari, got_model; char dummy[256]; FILE * fp; + int n; + + data->systype[0] = 0; + data->sysvari[0] = 0; + data->cpumodel[0] = 0; + + /* If there's an /etc/alpha_systype link, we're intending to override + whatever's in /proc/cpuinfo. */ + n = __readlink (PATH_ALPHA_SYSTYPE, data->systype, 256 - 1); + if (n > 0) + { + data->systype[n] = '\0'; + return 1; + } fp = fopen (PATH_CPUINFO, "r"); if (!fp) return 0; got_type = got_vari = got_model = 0; - systype[0] = sysvari[0] = cpumodel[0] = 0; while (1) { - if (fgets (dummy, 256, fp) == NULL) break; - /* fprintf(stderr, "read: %s", dummy); */ + if (fgets (dummy, 256, fp) == NULL) + break; if (!got_type && - sscanf (dummy, "system type : %256[^\n]\n", systype) == 1) + sscanf (dummy, "system type : %256[^\n]\n", data->systype) == 1) got_type = 1; if (!got_vari && - sscanf (dummy, "system variation : %256[^\n]\n", sysvari) == 1) + sscanf (dummy, "system variation : %256[^\n]\n", data->sysvari) == 1) got_vari = 1; if (!got_model && - sscanf (dummy, "cpu model : %256[^\n]\n", cpumodel) == 1) + sscanf (dummy, "cpu model : %256[^\n]\n", data->cpumodel) == 1) got_model = 1; } fclose (fp); #ifdef DEBUG_IOPERM - fprintf(stderr, "system type: %s\n", systype); - fprintf(stderr, "system vari: %s\n", sysvari); - fprintf(stderr, "cpu model: %s\n", cpumodel); + fprintf(stderr, "system type: `%s'\n", data->systype); + fprintf(stderr, "system vari: `%s'\n", data->sysvari); + fprintf(stderr, "cpu model: `%s'\n", data->cpumodel); #endif - return got_type+got_vari+got_model; + return got_type + got_vari + got_model; } + + /* - * Initialize I/O system. To determine what I/O system we're dealing - * with, we first try to read the value of symlink PATH_ALPHA_SYSTYPE, - * if that fails, we lookup the "system type" field in /proc/cpuinfo. - * If that fails as well, we give up. - * - * If the value received from PATH_ALPHA_SYSTYPE begins with a number, - * assume this is a previously unsupported system and the values encode, - * in order, ",,,". + * Initialize I/O system. */ static int init_iosys (void) { - int i, n; + long addr; + int i, olderrno = errno; + struct cpuinfo_data data; - n = readlink (PATH_ALPHA_SYSTYPE, systype, sizeof (systype) - 1); - if (n > 0) + /* First try the pciconfig_iobase syscall added to 2.2.15 and 2.3.99. */ + + addr = __pciconfig_iobase (IOBASE_DENSE_MEM, 0, 0); + if (addr != -1) { - systype[n] = '\0'; - if (isdigit (systype[0])) + ioswizzle_t io_swiz; + + if (addr == 0) + { + /* Only Jensen doesn't have dense mem space. */ + io.sparse_bus_memory_base + = io_system[IOSYS_JENSEN].sparse_bus_mem_base; + io.io_base = io_system[IOSYS_JENSEN].bus_io_base; + io_swiz = IOSWIZZLE_JENSEN; + } + else { - if (sscanf (systype, "%li,%i,%li,%li", &io.io_base, &io.hae_shift, - &io.bus_memory_base, &io.sparse_bus_memory_base) == 4) + io.bus_memory_base = addr; + + addr = __pciconfig_iobase (IOBASE_DENSE_IO, 0, 0); + if (addr != 0) + { + /* The X server uses _bus_base_sparse == 0 to know that + BWX access are supported to dense mem space. This is + true of every system that supports dense io space, so + never fill in io.sparse_bus_memory_base in this case. */ + io_swiz = IOSWIZZLE_DENSE; + io.io_base = addr; + } + else { - io.sys = IOSYS_UNKNOWN; - io.swiz = IOSWIZZLE_SPARSE; - io.swp = &ioswtch[IOSWIZZLE_SPARSE]; - return 0; + io.sparse_bus_memory_base + = __pciconfig_iobase (IOBASE_SPARSE_MEM, 0, 0); + io.io_base = __pciconfig_iobase (IOBASE_SPARSE_IO, 0, 0); + io_swiz = IOSWIZZLE_SPARSE; } - /* else we're likely going to fail with the system match below */ } + + io.swiz = io_swiz; + io.swp = &ioswtch[io_swiz]; + + return 0; } - else - { - n = process_cpuinfo(); - if (!n) - { - /* this can happen if the format of /proc/cpuinfo changes... */ - fprintf (stderr, - "ioperm.init_iosys(): Unable to determine system type.\n" - "\t(May need " PATH_ALPHA_SYSTYPE " symlink?)\n"); - __set_errno (ENODEV); - return -1; - } + /* Second, collect the contents of /etc/alpha_systype or /proc/cpuinfo. */ + + if (process_cpuinfo(&data) == 0) + { + /* This can happen if the format of /proc/cpuinfo changes. */ + fprintf (stderr, + "ioperm.init_iosys: Unable to determine system type.\n" + "\t(May need " PATH_ALPHA_SYSTYPE " symlink?)\n"); + __set_errno (ENODEV); + return -1; } - /* translate systype name into i/o system: */ + /* Translate systype name into i/o system. */ for (i = 0; i < sizeof (platform) / sizeof (platform[0]); ++i) { - if (strcmp (platform[i].name, systype) == 0) + if (strcmp (platform[i].name, data.systype) == 0) { - io.sys = platform[i].io_sys; - /* some platforms can have either EV4 or EV5 CPUs */ - if (io.sys == IOSYS_CPUDEP) /* SABLE or MIKASA or NORITAKE so far */ + iosys_t io_sys = platform[i].io_sys; + + /* Some platforms can have either EV4 or EV5 CPUs. */ + if (io_sys == IOSYS_CPUDEP) { + /* SABLE or MIKASA or NORITAKE so far. */ if (strcmp (platform[i].name, "Sable") == 0) { - if (strncmp (cpumodel, "EV4", 3) == 0) - io.sys = IOSYS_T2; - else if (strncmp (cpumodel, "EV5", 3) == 0) - io.sys = IOSYS_GAMMA; + if (strncmp (data.cpumodel, "EV4", 3) == 0) + io_sys = IOSYS_T2; + else if (strncmp (data.cpumodel, "EV5", 3) == 0) + io_sys = IOSYS_GAMMA; } else - { /* this covers MIKASA/NORITAKE */ - if (strncmp (cpumodel, "EV4", 3) == 0) - io.sys = IOSYS_APECS; - else if (strncmp (cpumodel, "EV5", 3) == 0) - io.sys = IOSYS_CIA; + { + /* This covers MIKASA/NORITAKE. */ + if (strncmp (data.cpumodel, "EV4", 3) == 0) + io_sys = IOSYS_APECS; + else if (strncmp (data.cpumodel, "EV5", 3) == 0) + io_sys = IOSYS_CIA; } - if (io.sys == IOSYS_CPUDEP) + if (io_sys == IOSYS_CPUDEP) { /* This can happen if the format of /proc/cpuinfo changes.*/ - fprintf (stderr, "ioperm.init_iosys(): Unable to determine" + fprintf (stderr, "ioperm.init_iosys: Unable to determine" " CPU model.\n"); __set_errno (ENODEV); return -1; } } - /* some platforms can have different core logic chipsets */ - if (io.sys == IOSYS_PCIDEP) /* EB164 so far */ + /* Some platforms can have different core logic chipsets */ + if (io_sys == IOSYS_PCIDEP) { - if (strcmp (systype, "EB164") == 0) + /* EB164 so far */ + if (strcmp (data.systype, "EB164") == 0) { - if (strncmp (sysvari, "RX164", 5) == 0) - io.sys = IOSYS_POLARIS; + if (strncmp (data.sysvari, "RX164", 5) == 0) + io_sys = IOSYS_POLARIS; + else if (strncmp (data.sysvari, "LX164", 5) == 0 + || strncmp (data.sysvari, "SX164", 5) == 0) + io_sys = IOSYS_PYXIS; else - io.sys = IOSYS_CIA; + io_sys = IOSYS_CIA; } - if (io.sys == IOSYS_PCIDEP) + if (io_sys == IOSYS_PCIDEP) { /* This can happen if the format of /proc/cpuinfo changes.*/ - fprintf (stderr, "ioperm.init_iosys(): Unable to determine" + fprintf (stderr, "ioperm.init_iosys: Unable to determine" " core logic chipset.\n"); __set_errno (ENODEV); return -1; } } - io.hae_shift = io_system[io.sys].hae_shift; - io.bus_memory_base = io_system[io.sys].bus_memory_base; - io.sparse_bus_memory_base = io_system[io.sys].sparse_bus_mem_base; - io.io_base = io_system[io.sys].bus_io_base; + io.bus_memory_base = io_system[io_sys].bus_memory_base; + io.sparse_bus_memory_base = io_system[io_sys].sparse_bus_mem_base; + io.io_base = io_system[io_sys].bus_io_base; - if (io.sys == IOSYS_JENSEN) + if (io_sys == IOSYS_JENSEN) io.swiz = IOSWIZZLE_JENSEN; - else if (io.sys == IOSYS_TSUNAMI || io.sys == IOSYS_POLARIS) + else if (io_sys == IOSYS_TSUNAMI + || io_sys == IOSYS_POLARIS + || io_sys == IOSYS_PYXIS) io.swiz = IOSWIZZLE_DENSE; else io.swiz = IOSWIZZLE_SPARSE; io.swp = &ioswtch[io.swiz]; + + __set_errno (olderrno); return 0; } } - /* systype is not a know platform name... */ - __set_errno (EINVAL); -#ifdef DEBUG_IOPERM - fprintf(stderr, "init_iosys: platform not recognized\n"); -#endif + __set_errno (ENODEV); + fprintf(stderr, "ioperm.init_iosys: Platform not recognized.\n" + "\t(May need " PATH_ALPHA_SYSTYPE " symlink?)\n"); return -1; } @@ -611,17 +678,18 @@ init_iosys (void) int _ioperm (unsigned long int from, unsigned long int num, int turn_on) { - unsigned long int addr, len; - int prot, err; + unsigned long int addr, len, pagesize = __getpagesize(); + int prot; - if (!io.swp && init_iosys() < 0) { + if (!io.swp && init_iosys() < 0) + { #ifdef DEBUG_IOPERM - fprintf(stderr, "ioperm: init_iosys() failed\n"); + fprintf(stderr, "ioperm: init_iosys() failed (%m)\n"); #endif - return -1; - } + return -1; + } - /* this test isn't as silly as it may look like; consider overflows! */ + /* This test isn't as silly as it may look like; consider overflows! */ if (from >= MAX_PORT || from + num > MAX_PORT) { __set_errno (EINVAL); @@ -632,7 +700,7 @@ _ioperm (unsigned long int from, unsigned long int num, int turn_on) } #ifdef DEBUG_IOPERM - fprintf(stderr, "ioperm: turn_on %d io.base %ld\n", turn_on, io.base); + fprintf(stderr, "ioperm: turn_on %d io.base %ld\n", turn_on, io.base); #endif if (turn_on) @@ -641,25 +709,28 @@ _ioperm (unsigned long int from, unsigned long int num, int turn_on) { int fd; - io.hae.reg = 0; /* not used in user-level */ - io.hae.cache = 0; + io.hae_cache = 0; if (io.swiz != IOSWIZZLE_DENSE) - __sethae (io.hae.cache); /* synchronize with hw */ + { + /* Synchronize with hw. */ + __sethae (0); + } - fd = open ("/dev/mem", O_RDWR); - if (fd < 0) { + fd = __open ("/dev/mem", O_RDWR); + if (fd < 0) + { #ifdef DEBUG_IOPERM - fprintf(stderr, "ioperm: /dev/mem open failed\n"); + fprintf(stderr, "ioperm: /dev/mem open failed (%m)\n"); #endif - return -1; - } + return -1; + } addr = port_to_cpu_addr (0, io.swiz, 1); len = port_to_cpu_addr (MAX_PORT, io.swiz, 1) - addr; io.base = (unsigned long int) __mmap (0, len, PROT_NONE, MAP_SHARED, fd, io.io_base); - close (fd); + __close (fd); #ifdef DEBUG_IOPERM fprintf(stderr, "ioperm: mmap of len 0x%lx returned 0x%lx\n", len, io.base); @@ -678,29 +749,27 @@ _ioperm (unsigned long int from, unsigned long int num, int turn_on) prot = PROT_NONE; } addr = port_to_cpu_addr (from, io.swiz, 1); - addr &= PAGE_MASK; + addr &= ~(pagesize - 1); len = port_to_cpu_addr (from + num, io.swiz, 1) - addr; - err = mprotect ((void *) addr, len, prot); -#ifdef DEBUG_IOPERM - fprintf(stderr, "ioperm: mprotect returned %d\n", err); -#endif - return err; + return __mprotect ((void *) addr, len, prot); } int -_iopl (unsigned int level) -{ - if (level > 3) - { - __set_errno (EINVAL); - return -1; - } - if (level) - { - return _ioperm (0, MAX_PORT, 1); - } - return 0; +_iopl (int level) +{ + switch (level) + { + case 0: + return 0; + + case 1: case 2: case 3: + return _ioperm (0, MAX_PORT, 1); + + default: + __set_errno (EINVAL); + return -1; + } } @@ -786,7 +855,11 @@ _hae_shift(void) { if (!io.swp && init_iosys () < 0) return -1; - return io.hae_shift; + if (io.swiz == IOSWIZZLE_JENSEN) + return 7; + if (io.swiz == IOSWIZZLE_SPARSE) + return 5; + return 0; } weak_alias (_sethae, sethae); diff --git a/sysdeps/unix/sysv/linux/alpha/sys/io.h b/sysdeps/unix/sysv/linux/alpha/sys/io.h index d1f5ac3eec..d98430baa9 100644 --- a/sysdeps/unix/sysv/linux/alpha/sys/io.h +++ b/sysdeps/unix/sysv/linux/alpha/sys/io.h @@ -51,6 +51,24 @@ extern unsigned long bus_base_sparse (void) __THROW __attribute__ ((const)); extern int _hae_shift (void) __THROW __attribute__ ((const)); extern int hae_shift (void) __THROW __attribute__ ((const)); +/* Previous three are deprecated in favour of the following, which + knows about multiple PCI "hoses". Provide the PCI bus and dfn + numbers just as to pciconfig_read/write. */ + +enum __pciconfig_iobase_which +{ + IOBASE_HOSE = 0, /* Return hose index. */ + IOBASE_SPARSE_MEM = 1, /* Return physical memory addresses. */ + IOBASE_DENSE_MEM = 2, + IOBASE_SPARSE_IO = 3, + IOBASE_DENSE_IO = 4 +}; + +extern long pciconfig_iobase(enum __pciconfig_iobase_which __which, + unsigned long int __bus, + unsigned long int __dfn) + __THROW __attribute__ ((const)); + /* Access PCI space protected from machine checks. */ extern int pciconfig_read (unsigned long int __bus, unsigned long int __dfn, diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 241ed02239..617b6f54ae 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -1,8 +1,5 @@ # File name Caller Syscall name # args Strong name Weak names -# used to implement inb()/outb() etc. -sethae - sethae 1 __sethae - oldmsgctl EXTRA msgctl 3 __old_msgctl msgctl@GLIBC_2.0 msgget - msgget 2 __msgget msgget msgrcv - msgrcv 5 __msgrcv msgrcv @@ -63,6 +60,7 @@ getresgid - getresgid 3 getresgid # access pci space protected from machine checks: pciconfig_read EXTRA pciconfig_read 5 pciconfig_read pciconfig_write EXTRA pciconfig_write 5 pciconfig_write +pciconfig_iobase EXTRA pciconfig_iobase 3 __pciconfig_iobase pciconfig_iobase # Wrapper for adjtimex. adjtimex - syscall_adjtimex 1 __syscall_adjtimex syscall_adjtimex From cd112ac0a347fe08ba42273a365b5471d3dfca88 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 20 Mar 2000 20:24:41 +0000 Subject: [PATCH 1838/4487] * sysdeps/unix/sysv/linux/alpha/bits/mman.h: Add MADV constants. --- sysdeps/unix/sysv/linux/alpha/bits/mman.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/mman.h b/sysdeps/unix/sysv/linux/alpha/bits/mman.h index 1411c85831..a7ada102d2 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/mman.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/mman.h @@ -81,3 +81,19 @@ #ifdef __USE_GNU # define MREMAP_MAYMOVE 1 #endif + +/* Advice to `madvise'. */ +#ifdef __USE_BSD +# define MADV_NORMAL 0 /* No further special treatment. */ +# define MADV_RANDOM 1 /* Expect random page references. */ +# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define MADV_WILLNEED 3 /* Will need these pages. */ +# define MADV_DONTNEED 6 /* Don't need these pages. */ +#endif + +/* Not used by Linux, but here to make sure we don't clash with + OSF/1 defines. */ +#if 0 && defined(__USE_BSD) +# define MADV_DONTNEED_COMPAT 4 /* Old version? */ +# define MADV_SPACEAVAIL 5 /* Ensure resources are available. */ +#endif From 9dc874df52f8e7d251e4684cefe95320c31074fd Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 20 Mar 2000 20:32:11 +0000 Subject: [PATCH 1839/4487] * sysdeps/alpha/fpu/fraiseexcpt.c: Use get/set_fp_control instead of arithmetic instructions. * sysdeps/alpha/fpu/s_ceil.c: Use round to -inf instead of playing with the fpcr. Protect from INV exception. * sysdeps/alpha/fpu/s_ceilf.c: Likewise. * sysdeps/alpha/fpu/s_floor.c: Protect from INV exception. * sysdeps/alpha/fpu/s_floorf.c: Likewise. * sysdeps/alpha/fpu/s_copysign.c: New. * sysdeps/alpha/fpu/s_copysignf.c: New. * sysdeps/alpha/fpu/s_fabs.c: New. * sysdeps/alpha/fpu/s_fabsf.c: New. * sysdeps/alpha/fpu/s_rint.c: New. * sysdeps/alpha/fpu/s_rintf.c: New. --- sysdeps/alpha/fpu/fraiseexcpt.c | 41 +++++--------------------- sysdeps/alpha/fpu/s_ceil.c | 36 ++++++++++------------- sysdeps/alpha/fpu/s_ceilf.c | 44 +++++++++++++--------------- sysdeps/alpha/fpu/s_copysign.c | 33 +++++++++++++++++++++ sysdeps/alpha/fpu/s_copysignf.c | 29 ++++++++++++++++++ sysdeps/alpha/fpu/s_fabs.c | 37 +++++++++++++++++++++++ sysdeps/alpha/fpu/s_fabsf.c | 33 +++++++++++++++++++++ sysdeps/alpha/fpu/s_floor.c | 14 +++++---- sysdeps/alpha/fpu/s_floorf.c | 13 +++++---- sysdeps/alpha/fpu/s_rint.c | 50 +++++++++++++++++++++++++++++++ sysdeps/alpha/fpu/s_rintf.c | 52 +++++++++++++++++++++++++++++++++ 11 files changed, 294 insertions(+), 88 deletions(-) create mode 100644 sysdeps/alpha/fpu/s_copysign.c create mode 100644 sysdeps/alpha/fpu/s_copysignf.c create mode 100644 sysdeps/alpha/fpu/s_fabs.c create mode 100644 sysdeps/alpha/fpu/s_fabsf.c create mode 100644 sysdeps/alpha/fpu/s_rint.c create mode 100644 sysdeps/alpha/fpu/s_rintf.c diff --git a/sysdeps/alpha/fpu/fraiseexcpt.c b/sysdeps/alpha/fpu/fraiseexcpt.c index a3e60d02eb..b0eab000cb 100644 --- a/sysdeps/alpha/fpu/fraiseexcpt.c +++ b/sysdeps/alpha/fpu/fraiseexcpt.c @@ -24,43 +24,16 @@ int __feraiseexcept (int excepts) { - double tmp; - double dummy; + unsigned long int tmp; - /* Raise exceptions represented by EXPECTS. But we must raise only - one signal at a time. It is important the if the overflow/underflow - exception and the inexact exception are given at the same time, - the overflow/underflow exception precedes the inexact exception. */ + /* Get the current exception state. */ + tmp = __ieee_get_fp_control (); - /* We do these bits in assembly to be certain GCC doesn't optimize - away something important. */ + /* Set all the bits that were called for. */ + tmp |= (excepts & FE_ALL_EXCEPT); - /* First: invalid exception. */ - if (FE_INVALID & excepts) - /* One example of a invalid operation is 0 * Infinity. */ - __asm__ __volatile__("mult/sui $f31,%1,%0; trapb" - : "=&f" (tmp) : "f" (HUGE_VAL)); - - /* Next: division by zero. */ - if (FE_DIVBYZERO & excepts) - __asm__ __volatile__("cmpteq $f31,$f31,%1; divt/sui %1,$f31,%0; trapb" - : "=&f" (tmp), "=f" (dummy)); - - /* Next: overflow. */ - if (FE_OVERFLOW & excepts) - __asm__ __volatile__("mult/sui %1,%1,%0; trapb" - : "=&f" (tmp) : "f" (DBL_MAX)); - - /* Next: underflow. */ - if (FE_UNDERFLOW & excepts) - __asm__ __volatile__("divt/sui %1,%2,%0; trapb" - : "=&f" (tmp) : "f" (DBL_MIN), - "f" ((double) (1UL << 60))); - - /* Last: inexact. */ - if (FE_INEXACT & excepts) - __asm__ __volatile__("divt/sui %1,%2,%0; trapb" - : "=&f" (tmp) : "f" (1.0), "f" (M_PI)); + /* And store it back. */ + __ieee_set_fp_control (tmp); /* Success. */ return 0; diff --git a/sysdeps/alpha/fpu/s_ceil.c b/sysdeps/alpha/fpu/s_ceil.c index 23491db5ac..f30db008ce 100644 --- a/sysdeps/alpha/fpu/s_ceil.c +++ b/sysdeps/alpha/fpu/s_ceil.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson. @@ -19,34 +19,30 @@ #include +/* Use the -inf rounding mode conversion instructions to implement + ceil, via something akin to -floor(-x). This is much faster than + playing with the fpcr to achieve +inf rounding mode. */ + double __ceil (double x) { - if (x != 0 && fabs (x) < 9007199254740992.0) /* 1 << DBL_MANT_DIG */ + if (isless (fabs (x), 9007199254740992.0)) /* 1 << DBL_MANT_DIG */ { - double tmp1; - unsigned long fpcr0, fpcr1; - unsigned long pinf = 3UL << 58; - - /* Set round to +inf. */ - __asm __volatile("excb; mf_fpcr %0" : "=f"(fpcr0)); - __asm __volatile("mt_fpcr %0; excb" : : "f"(fpcr0 | pinf)); + double tmp1, new_x; - /* Calculate! */ + new_x = -x; + __asm ( #ifdef _IEEE_FP_INEXACT - __asm("cvttq/svid %2,%1\n\tcvtqt/suid %1,%0" - : "=f"(x), "=&f"(tmp1) - : "f"(x)); + "cvttq/svim %2,%1\n\t" #else - __asm("cvttq/svd %2,%1\n\tcvtqt/d %1,%0" - : "=f"(x), "=&f"(tmp1) - : "f"(x)); + "cvttq/svm %2,%1\n\t" #endif + "cvtqt/m %1,%0\n\t" + : "=f"(new_x), "=&f"(tmp1) + : "f"(new_x)); - /* Reset rounding mode, while retaining new exception bits. */ - __asm __volatile("excb; mf_fpcr %0" : "=f"(fpcr1)); - fpcr0 = (fpcr0 & pinf) | (fpcr1 & ~pinf); - __asm __volatile("mt_fpcr %0; excb" : : "f"(fpcr0)); + /* Fix up the negation we did above, as well as handling -0 properly. */ + x = copysign(new_x, x); } return x; } diff --git a/sysdeps/alpha/fpu/s_ceilf.c b/sysdeps/alpha/fpu/s_ceilf.c index 3defaeb01e..35c51a2766 100644 --- a/sysdeps/alpha/fpu/s_ceilf.c +++ b/sysdeps/alpha/fpu/s_ceilf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson. @@ -19,39 +19,35 @@ #include +/* Use the -inf rounding mode conversion instructions to implement + ceil, via something akin to -floor(-x). This is much faster than + playing with the fpcr to achieve +inf rounding mode. */ + float __ceilf (float x) { - if (x != 0 && fabsf (x) < 16777216.0f) /* 1 << FLT_MANT_DIG */ + if (isless (fabsf (x), 16777216.0f)) /* 1 << FLT_MANT_DIG */ { - float tmp1, tmp2; - unsigned long fpcr0, fpcr1; - unsigned long pinf = 3UL << 58; - - /* Set round to +inf. */ - __asm __volatile("excb; mf_fpcr %0" : "=f"(fpcr0)); - __asm __volatile("mt_fpcr %0; excb" : : "f"(fpcr0 | pinf)); + /* Note that Alpha S_Floating is stored in registers in a + restricted T_Floating format, so we don't even need to + convert back to S_Floating in the end. The initial + conversion to T_Floating is needed to handle denormals. */ - /* Calculate! - Note that Alpha S_Floating is stored in registers in a - restricted T_Floating format, so we don't even need to - convert back to S_Floating in the end. The initial - conversion to T_Floating is needed to handle denormals. */ + float tmp1, tmp2, new_x; + new_x = -x; + __asm ("cvtst/s %3,%2\n\t" #ifdef _IEEE_FP_INEXACT - __asm("cvtst/s %3,%2\n\tcvttq/svid %2,%1\n\tcvtqt/suid %1,%0" - : "=f"(x), "=&f"(tmp1), "=&f"(tmp2) - : "f"(x)); + "cvttq/svim %2,%1\n\t" #else - __asm("cvtst/s %3,%2\n\tcvttq/svd %2,%1\n\tcvtqt/d %1,%0" - : "=f"(x), "=&f"(tmp1), "=&f"(tmp2) - : "f"(x)); + "cvttq/svm %2,%1\n\t" #endif + "cvtqt/m %1,%0\n\t" + : "=f"(new_x), "=&f"(tmp1), "=&f"(tmp2) + : "f"(new_x)); - /* Reset rounding mode, while retaining new exception bits. */ - __asm __volatile("excb; mf_fpcr %0" : "=f"(fpcr1)); - fpcr0 = (fpcr0 & pinf) | (fpcr1 & ~pinf); - __asm __volatile("mt_fpcr %0; excb" : : "f"(fpcr0)); + /* Fix up the negation we did above, as well as handling -0 properly. */ + x = copysignf(new_x, x); } return x; } diff --git a/sysdeps/alpha/fpu/s_copysign.c b/sysdeps/alpha/fpu/s_copysign.c new file mode 100644 index 0000000000..5c8d827018 --- /dev/null +++ b/sysdeps/alpha/fpu/s_copysign.c @@ -0,0 +1,33 @@ +/* Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +double +__copysign (double x, double y) +{ + __asm ("cpys %1, %2, %0" : "=f" (x) : "f" (y), "f" (x)); + return x; +} + +weak_alias (__copysign, copysign) +#ifdef NO_LONG_DOUBLE +strong_alias (__copysign, __copysignl) +weak_alias (__copysign, copysignl) +#endif diff --git a/sysdeps/alpha/fpu/s_copysignf.c b/sysdeps/alpha/fpu/s_copysignf.c new file mode 100644 index 0000000000..d2c5d886d0 --- /dev/null +++ b/sysdeps/alpha/fpu/s_copysignf.c @@ -0,0 +1,29 @@ +/* Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +float +__copysignf (float x, float y) +{ + __asm ("cpys %1, %2, %0" : "=f" (x) : "f" (y), "f" (x)); + return x; +} + +weak_alias (__copysignf, copysignf) diff --git a/sysdeps/alpha/fpu/s_fabs.c b/sysdeps/alpha/fpu/s_fabs.c new file mode 100644 index 0000000000..fb446d8cb9 --- /dev/null +++ b/sysdeps/alpha/fpu/s_fabs.c @@ -0,0 +1,37 @@ +/* Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +double +__fabs (double x) +{ +#if __GNUC_PREREQ (2, 8) + return __builtin_fabs (x); +#else + __asm ("cpys $f31, %1, %0" : "=f" (x) : "f" (x)); + return x; +#endif +} + +weak_alias (__fabs, fabs) +#ifdef NO_LONG_DOUBLE +strong_alias (__fabs, __fabsl) +weak_alias (__fabs, fabsl) +#endif diff --git a/sysdeps/alpha/fpu/s_fabsf.c b/sysdeps/alpha/fpu/s_fabsf.c new file mode 100644 index 0000000000..ec5390747f --- /dev/null +++ b/sysdeps/alpha/fpu/s_fabsf.c @@ -0,0 +1,33 @@ +/* Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +float +__fabsf (float x) +{ +#if __GNUC_PREREQ (2, 8) + return __builtin_fabsf (x); +#else + __asm ("cpys $f31, %1, %0" : "=f" (x) : "f" (x)); + return x; +#endif +} + +weak_alias (__fabsf, fabsf) diff --git a/sysdeps/alpha/fpu/s_floor.c b/sysdeps/alpha/fpu/s_floor.c index 146e19b35a..b6d01f5947 100644 --- a/sysdeps/alpha/fpu/s_floor.c +++ b/sysdeps/alpha/fpu/s_floor.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson. @@ -27,10 +27,10 @@ double __floor (double x) { - /* Check not zero since floor(-0) == -0. */ - if (x != 0 && fabs (x) < 9007199254740992.0) /* 1 << DBL_MANT_DIG */ + if (isless (fabs (x), 9007199254740992.0)) /* 1 << DBL_MANT_DIG */ { - double __tmp1; + double tmp1, new_x; + __asm ( #ifdef _IEEE_FP_INEXACT "cvttq/svim %2,%1\n\t" @@ -38,8 +38,12 @@ __floor (double x) "cvttq/svm %2,%1\n\t" #endif "cvtqt/m %1,%0\n\t" - : "=f"(x), "=&f"(__tmp1) + : "=f"(new_x), "=&f"(tmp1) : "f"(x)); + + /* floor(-0) == -0, and in general we'll always have the same + sign as our input. */ + x = copysign(new_x, x); } return x; } diff --git a/sysdeps/alpha/fpu/s_floorf.c b/sysdeps/alpha/fpu/s_floorf.c index 9e693642dd..624e7c87b8 100644 --- a/sysdeps/alpha/fpu/s_floorf.c +++ b/sysdeps/alpha/fpu/s_floorf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson. @@ -27,15 +27,14 @@ float __floorf (float x) { - /* Check not zero since floor(-0) == -0. */ - if (x != 0 && fabsf (x) < 16777216.0f) /* 1 << FLT_MANT_DIG */ + if (isless (fabsf (x), 16777216.0f)) /* 1 << FLT_MANT_DIG */ { /* Note that Alpha S_Floating is stored in registers in a restricted T_Floating format, so we don't even need to convert back to S_Floating in the end. The initial conversion to T_Floating is needed to handle denormals. */ - float tmp1, tmp2; + float tmp1, tmp2, new_x; __asm ("cvtst/s %3,%2\n\t" #ifdef _IEEE_FP_INEXACT @@ -44,8 +43,12 @@ __floorf (float x) "cvttq/svm %2,%1\n\t" #endif "cvtqt/m %1,%0\n\t" - : "=f"(x), "=&f"(tmp1), "=&f"(tmp2) + : "=f"(new_x), "=&f"(tmp1), "=&f"(tmp2) : "f"(x)); + + /* floor(-0) == -0, and in general we'll always have the same + sign as our input. */ + x = copysignf(new_x, x); } return x; } diff --git a/sysdeps/alpha/fpu/s_rint.c b/sysdeps/alpha/fpu/s_rint.c new file mode 100644 index 0000000000..7309b4134e --- /dev/null +++ b/sysdeps/alpha/fpu/s_rint.c @@ -0,0 +1,50 @@ +/* Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + + +double +__rint (double x) +{ + if (isless (fabs (x), 9007199254740992.0)) /* 1 << DBL_MANT_DIG */ + { + double tmp1, new_x; + __asm ( +#ifdef _IEEE_FP_INEXACT + "cvttq/svid %2,%1\n\t" +#else + "cvttq/svd %2,%1\n\t" +#endif + "cvtqt/d %1,%0\n\t" + : "=f"(new_x), "=&f"(tmp1) + : "f"(x)); + + /* rint(-0.1) == -0, and in general we'll always have the same + sign as our input. */ + x = copysign(new_x, x); + } + return x; +} + +weak_alias (__rint, rint) +#ifdef NO_LONG_DOUBLE +strong_alias (__rint, __rintl) +weak_alias (__rint, rintl) +#endif diff --git a/sysdeps/alpha/fpu/s_rintf.c b/sysdeps/alpha/fpu/s_rintf.c new file mode 100644 index 0000000000..044f7e5f7a --- /dev/null +++ b/sysdeps/alpha/fpu/s_rintf.c @@ -0,0 +1,52 @@ +/* Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + + +float +__rintf (float x) +{ + if (isless (fabsf (x), 16777216.0f)) /* 1 << FLT_MANT_DIG */ + { + /* Note that Alpha S_Floating is stored in registers in a + restricted T_Floating format, so we don't even need to + convert back to S_Floating in the end. The initial + conversion to T_Floating is needed to handle denormals. */ + + float tmp1, tmp2, new_x; + + __asm ("cvtst/s %3,%2\n\t" +#ifdef _IEEE_FP_INEXACT + "cvttq/svid %2,%1\n\t" +#else + "cvttq/svd %2,%1\n\t" +#endif + "cvtqt/d %1,%0\n\t" + : "=f"(new_x), "=&f"(tmp1), "=&f"(tmp2) + : "f"(x)); + + /* rint(-0.1) == -0, and in general we'll always have the same + sign as our input. */ + x = copysignf(new_x, x); + } + return x; +} + +weak_alias (__rintf, rintf) From 7e47b466c7a5f2f77f1e16d71b3cf8da086e57dc Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 20 Mar 2000 22:08:26 +0000 Subject: [PATCH 1840/4487] * sysdeps/unix/sysv/linux/alpha/Versions: Put pciconfig_iobase in GLIBC_2.1.4. --- sysdeps/unix/sysv/linux/alpha/Versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/Versions b/sysdeps/unix/sysv/linux/alpha/Versions index d1b0e48711..7eee0f76fa 100644 --- a/sysdeps/unix/sysv/linux/alpha/Versions +++ b/sysdeps/unix/sysv/linux/alpha/Versions @@ -46,7 +46,7 @@ libc { # w* wait4; } - GLIBC_2.1.3 { + GLIBC_2.1.4 { pciconfig_iobase; } } From cc9b3b98b929ac816c1a3808c1115e2724f30788 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 20 Mar 2000 22:51:18 +0000 Subject: [PATCH 1841/4487] (MADV_*): Add flags from latest Linux kernel. --- sysdeps/unix/sysv/linux/arm/bits/mman.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sysdeps/unix/sysv/linux/arm/bits/mman.h b/sysdeps/unix/sysv/linux/arm/bits/mman.h index fcc0643290..37a1959f05 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/mman.h +++ b/sysdeps/unix/sysv/linux/arm/bits/mman.h @@ -73,3 +73,12 @@ #ifdef __USE_GNU # define MREMAP_MAYMOVE 1 #endif + +/* Advice to `madvise'. */ +#ifdef __USE_BSD +# define MADV_NORMAL 0 /* No further special treatment. */ +# define MADV_RANDOM 1 /* Expect random page references. */ +# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define MADV_WILLNEED 3 /* Will need these pages. */ +# define MADV_DONTNEED 4 /* Don't need these pages. */ +#endif From 5659dfb7936abeac75d52c0eaf5fc39b4f503378 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:11:25 +0000 Subject: [PATCH 1842/4487] AIX specific Makefile. --- sysdeps/unix/sysv/aix/Makefile | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 sysdeps/unix/sysv/aix/Makefile diff --git a/sysdeps/unix/sysv/aix/Makefile b/sysdeps/unix/sysv/aix/Makefile new file mode 100644 index 0000000000..e69de29bb2 From 5570c4b60c51e0061918e27d250bcd6996474b4d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:11:42 +0000 Subject: [PATCH 1843/4487] AIX implementation of _exit. --- sysdeps/unix/sysv/aix/_exit.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/_exit.c diff --git a/sysdeps/unix/sysv/aix/_exit.c b/sysdeps/unix/sysv/aix/_exit.c new file mode 100644 index 0000000000..f4654c1d3a --- /dev/null +++ b/sysdeps/unix/sysv/aix/_exit.c @@ -0,0 +1,29 @@ +/* Copyright (C) 1999 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + + +/* We define only thr alias introduced in ISO C99 because _exit itself + is a system call. */ +void +_Exit (status) + int status; +{ + _exit (status); +} From a26c24f4539380d63f8ee70ec6b59f4432a056a0 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:11:58 +0000 Subject: [PATCH 1844/4487] AIX implementation of accept. --- sysdeps/unix/sysv/aix/accept.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/accept.c diff --git a/sysdeps/unix/sysv/aix/accept.c b/sysdeps/unix/sysv/aix/accept.c new file mode 100644 index 0000000000..364f02b4f8 --- /dev/null +++ b/sysdeps/unix/sysv/aix/accept.c @@ -0,0 +1,29 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +extern int naccept (int s, void *uap_name, int *uap_anamelen); + +int +accept (int fd, __SOCKADDR_ARG addr, socklen_t *addr_len) +{ + assert (sizeof (socklen_t) == sizeof (int)); + return naccept (fd, addr.__sockaddr__, addr_len); +} From 23ef7b61549d7aa931ac3160a790255657915118 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:12:05 +0000 Subject: [PATCH 1845/4487] AIX implementation of access. --- sysdeps/unix/sysv/aix/access.c | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/access.c diff --git a/sysdeps/unix/sysv/aix/access.c b/sysdeps/unix/sysv/aix/access.c new file mode 100644 index 0000000000..e25ee8f686 --- /dev/null +++ b/sysdeps/unix/sysv/aix/access.c @@ -0,0 +1,10 @@ +#include + +extern int accessx (const char *name, int type, int who); + +int +__access (const char *name, int type) +{ + return accessx (name, type, ACC_INVOKER); +} +strong_alias (__access, access) From d9fd2b3823ec0b1353be674280a4e5b19854b2f9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:12:10 +0000 Subject: [PATCH 1846/4487] AIX implementation of brk. --- sysdeps/unix/sysv/aix/brk.c | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/brk.c diff --git a/sysdeps/unix/sysv/aix/brk.c b/sysdeps/unix/sysv/aix/brk.c new file mode 100644 index 0000000000..64bc8cdd2b --- /dev/null +++ b/sysdeps/unix/sysv/aix/brk.c @@ -0,0 +1,8 @@ +/* This is a system call. We only have to provide the wrapper. */ +#include + +int +__brk (void *addr) +{ + return brk (addr); +} From 5460770e60f5645c3aaf3583216c63fb5e6af5e2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:12:16 +0000 Subject: [PATCH 1847/4487] AIX implementation of chown. --- sysdeps/unix/sysv/aix/chown.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/chown.c diff --git a/sysdeps/unix/sysv/aix/chown.c b/sysdeps/unix/sysv/aix/chown.c new file mode 100644 index 0000000000..902d410449 --- /dev/null +++ b/sysdeps/unix/sysv/aix/chown.c @@ -0,0 +1,25 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +__chown (const char *file, uid_t owner, gid_t group) +{ + return chown (file, owner, group); +} From 36e2d40c303de2f46b3ba5dbf4f68e48f0dbc72f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:12:25 +0000 Subject: [PATCH 1848/4487] AIX implementation of close. --- sysdeps/unix/sysv/aix/close.c | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/close.c diff --git a/sysdeps/unix/sysv/aix/close.c b/sysdeps/unix/sysv/aix/close.c new file mode 100644 index 0000000000..4d500c50af --- /dev/null +++ b/sysdeps/unix/sysv/aix/close.c @@ -0,0 +1,8 @@ +/* This is a system call. We only have to provide the wrapper. */ +#include + +int +__close (int fd) +{ + return close (fd); +} From 601c41de3291a4813fa4db71fe2bdd3ffab5249f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:12:41 +0000 Subject: [PATCH 1849/4487] AIX specific configure.in. --- sysdeps/unix/sysv/aix/configure.in | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/configure.in diff --git a/sysdeps/unix/sysv/aix/configure.in b/sysdeps/unix/sysv/aix/configure.in new file mode 100644 index 0000000000..e3fd4efefb --- /dev/null +++ b/sysdeps/unix/sysv/aix/configure.in @@ -0,0 +1,10 @@ +sinclude(./aclocal.m4)dnl Autoconf lossage +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/unix/sysv/linux. + +# On Linux, the default is to use libio instead of stdio. +test $stdio = default && stdio=libio + +# Don't bother trying to generate any glue code to be compatible with the +# existing system library, because we are the only system library. +inhibit_glue=yes From fd08ea71367e3c690e5c573d4199dc1c1e711803 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:12:49 +0000 Subject: [PATCH 1850/4487] Rebuild. --- sysdeps/unix/sysv/aix/configure | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/configure diff --git a/sysdeps/unix/sysv/aix/configure b/sysdeps/unix/sysv/aix/configure new file mode 100644 index 0000000000..7fc920ecaa --- /dev/null +++ b/sysdeps/unix/sysv/aix/configure @@ -0,0 +1,8 @@ + # Local configure fragment for sysdeps/unix/sysv/linux. + +# On Linux, the default is to use libio instead of stdio. +test $stdio = default && stdio=libio + +# Don't bother trying to generate any glue code to be compatible with the +# existing system library, because we are the only system library. +inhibit_glue=yes From 3aa78fe2d4a527aa82d12c50413175f0edbb8bac Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:12:57 +0000 Subject: [PATCH 1851/4487] AIX implementation of connect. --- sysdeps/unix/sysv/aix/connect.c | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/connect.c diff --git a/sysdeps/unix/sysv/aix/connect.c b/sysdeps/unix/sysv/aix/connect.c new file mode 100644 index 0000000000..7fb636dea9 --- /dev/null +++ b/sysdeps/unix/sysv/aix/connect.c @@ -0,0 +1,8 @@ +/* This is a system call. We only have to provide the wrapper. */ +#include + +int +__connect (int fd, __CONST_SOCKADDR_ARG addr, socklen_t len) +{ + return connect (fd, addr, len); +} From 6011d72b4666ac6a10f25be7c6fccb0109d996ec Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:13:16 +0000 Subject: [PATCH 1852/4487] AIX specific environment definition. --- sysdeps/unix/sysv/aix/environ.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/aix/environ.c diff --git a/sysdeps/unix/sysv/aix/environ.c b/sysdeps/unix/sysv/aix/environ.c new file mode 100644 index 0000000000..01e7ba8281 --- /dev/null +++ b/sysdeps/unix/sysv/aix/environ.c @@ -0,0 +1 @@ +/* We don't need to define environ, the kernel does it. */ From b4b2b1bb099144c1fadfc3c0d42a2179757ac1b8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:13:29 +0000 Subject: [PATCH 1853/4487] AIX implementation of euidaccess. --- sysdeps/unix/sysv/aix/euidaccess.c | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/euidaccess.c diff --git a/sysdeps/unix/sysv/aix/euidaccess.c b/sysdeps/unix/sysv/aix/euidaccess.c new file mode 100644 index 0000000000..598755c2df --- /dev/null +++ b/sysdeps/unix/sysv/aix/euidaccess.c @@ -0,0 +1,5 @@ +int +euidaccess (const char *name, int type) +{ + return accessx (name, type, ACC_SELF); +} From e72d8a4fd411cf49510cb014b00a558def49f505 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:13:37 +0000 Subject: [PATCH 1854/4487] AIX implementation of execve. --- sysdeps/unix/sysv/aix/execve.c | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/execve.c diff --git a/sysdeps/unix/sysv/aix/execve.c b/sysdeps/unix/sysv/aix/execve.c new file mode 100644 index 0000000000..ea1b67d630 --- /dev/null +++ b/sysdeps/unix/sysv/aix/execve.c @@ -0,0 +1,8 @@ +/* This is a system call. We only have to provide the wrapper. */ +#include + +int +__execve (const char *path, char *const argv[], char *const envp[]) +{ + return execve (path, argv, envp); +} From 2d4d9380f359687c999d0e055f49ba90e00aa6cf Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:13:45 +0000 Subject: [PATCH 1855/4487] AIX implementation of fchown. --- sysdeps/unix/sysv/aix/fchown.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/fchown.c diff --git a/sysdeps/unix/sysv/aix/fchown.c b/sysdeps/unix/sysv/aix/fchown.c new file mode 100644 index 0000000000..de51384493 --- /dev/null +++ b/sysdeps/unix/sysv/aix/fchown.c @@ -0,0 +1,25 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +__fchown (int fds, uid_t owner, gid_t group) +{ + return fchown (fds, owner, group); +} From ddef432c154460394aa9b17dc8408ad1c34f1cf5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:13:56 +0000 Subject: [PATCH 1856/4487] AIX implementation of fcntl. --- sysdeps/unix/sysv/aix/fcntl.c | 40 +++++++++++++++++++++++++++++++ sysdeps/unix/sysv/aix/fdatasync.c | 31 ++++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/fcntl.c create mode 100644 sysdeps/unix/sysv/aix/fdatasync.c diff --git a/sysdeps/unix/sysv/aix/fcntl.c b/sysdeps/unix/sysv/aix/fcntl.c new file mode 100644 index 0000000000..5a4bb8a1bb --- /dev/null +++ b/sysdeps/unix/sysv/aix/fcntl.c @@ -0,0 +1,40 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +extern int kfcntl (int fdes, int cmd, unsigned long int arg); + +int +__fcntl (int fdes, int cmd, ...) +{ + va_list va; + int res; + unsigned long int arg; + + va_start (va, cmd); + arg = va_arg (va, unsigned long int); + + res = kfcntl (fdes, cmd, arg); + + va_end (va); + + return res; +} +strong_alias (__fcntl, fcntl) diff --git a/sysdeps/unix/sysv/aix/fdatasync.c b/sysdeps/unix/sysv/aix/fdatasync.c new file mode 100644 index 0000000000..177260daa2 --- /dev/null +++ b/sysdeps/unix/sysv/aix/fdatasync.c @@ -0,0 +1,31 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +#define _FDATASYNC 0x00400000 +#define FDATASYNC _FDATASYNC + +extern int kfsync_range (int fd, int how, long long int off, + long long int len); + +int +fdatasync (int fd) +{ + return kfsync_range (fd, FDATASYNC, 0, 0); +} From fe93696234605b3014e3851c04e53a2ccfa162c2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:14:07 +0000 Subject: [PATCH 1857/4487] AIX implementation of fork. --- sysdeps/unix/sysv/aix/fork.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/fork.c diff --git a/sysdeps/unix/sysv/aix/fork.c b/sysdeps/unix/sysv/aix/fork.c new file mode 100644 index 0000000000..9c84fb0684 --- /dev/null +++ b/sysdeps/unix/sysv/aix/fork.c @@ -0,0 +1,27 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + + +pid_t +__fork (void) +{ + return kfork (); +} +strong_alias (__fork, fork) From 1be48beb0ae93de38883246b5d1e913a39eaae03 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:14:14 +0000 Subject: [PATCH 1858/4487] AIX implementation of fstatfs. --- sysdeps/unix/sysv/aix/fstatfs.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/fstatfs.c diff --git a/sysdeps/unix/sysv/aix/fstatfs.c b/sysdeps/unix/sysv/aix/fstatfs.c new file mode 100644 index 0000000000..3b92b9e0f5 --- /dev/null +++ b/sysdeps/unix/sysv/aix/fstatfs.c @@ -0,0 +1,27 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +extern int fstatfs (int fd, struct statfs *buf); + +int +__fstatfs (int fd, struct statfs *buf) +{ + return fstatfs (fd, buf); +} From 026b4afc06b7690914ff780922996164fd477087 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:14:21 +0000 Subject: [PATCH 1859/4487] AIX implementation of fsync. --- sysdeps/unix/sysv/aix/fsync.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/fsync.c diff --git a/sysdeps/unix/sysv/aix/fsync.c b/sysdeps/unix/sysv/aix/fsync.c new file mode 100644 index 0000000000..6ad1dac333 --- /dev/null +++ b/sysdeps/unix/sysv/aix/fsync.c @@ -0,0 +1,31 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +#define _FSYNC 0x00000010 +#define FFILESYNC _FSYNC + +extern int kfsync_range (int fd, int how, long long int off, + long long int len); + +int +fsync (int fd) +{ + return kfsync_range (fd, FFILESYNC, 0, 0); +} From e745b101a7623f701ee13b091325f977adddf20e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:14:30 +0000 Subject: [PATCH 1860/4487] AIX implementation of ftruncate. --- sysdeps/unix/sysv/aix/ftruncate.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/ftruncate.c diff --git a/sysdeps/unix/sysv/aix/ftruncate.c b/sysdeps/unix/sysv/aix/ftruncate.c new file mode 100644 index 0000000000..5ad14cbb6b --- /dev/null +++ b/sysdeps/unix/sysv/aix/ftruncate.c @@ -0,0 +1,28 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +extern int kftruncate (int fd, long long int length); + +int +__ftruncate (int fd, off_t length) +{ + return kftruncate (fd, length); +} +strong_alias (__ftruncate, ftruncate) From 71b3147ef13abadf996871c1ca1542469c37dd46 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:14:37 +0000 Subject: [PATCH 1861/4487] AIX implementation of ftruncate64. --- sysdeps/unix/sysv/aix/ftruncate64.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/ftruncate64.c diff --git a/sysdeps/unix/sysv/aix/ftruncate64.c b/sysdeps/unix/sysv/aix/ftruncate64.c new file mode 100644 index 0000000000..56a5ed58c1 --- /dev/null +++ b/sysdeps/unix/sysv/aix/ftruncate64.c @@ -0,0 +1,27 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +extern int kftruncate (int fd, long long int length); + +int +ftruncate64 (int fd, off64_t length) +{ + return kftruncate (fd, length); +} From c6a83472a8e0dd04cc5439d358ca2f27abd624ed Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:14:47 +0000 Subject: [PATCH 1862/4487] AIX implementation of __fxstat. --- sysdeps/unix/sysv/aix/fxstat.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/fxstat.c diff --git a/sysdeps/unix/sysv/aix/fxstat.c b/sysdeps/unix/sysv/aix/fxstat.c new file mode 100644 index 0000000000..9f5a477590 --- /dev/null +++ b/sysdeps/unix/sysv/aix/fxstat.c @@ -0,0 +1,31 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +#define STX_NORMAL 0x00 + +extern int fstatx (int fd, struct stat *st, int len, int cmd); + +int +__fxstat (int ver, int fd, struct stat *st) +{ + assert (ver == 0); + return fstatx (fd, st, sizeof (*st), STX_NORMAL); +} From 46f4ffc34c3adeac2ca58e6d9cfe839e7344ef5f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:14:51 +0000 Subject: [PATCH 1863/4487] AIX implementation of __fxstat64. --- sysdeps/unix/sysv/aix/fxstat64.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/fxstat64.c diff --git a/sysdeps/unix/sysv/aix/fxstat64.c b/sysdeps/unix/sysv/aix/fxstat64.c new file mode 100644 index 0000000000..5d2f22bde9 --- /dev/null +++ b/sysdeps/unix/sysv/aix/fxstat64.c @@ -0,0 +1,32 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +#define STX_NORMAL 0x00 +#define STX_64 0x08 + +extern int fstatx (int fd, struct stat64 *st, int len, int cmd); + +int +__fxstat64 (int ver, int fd, struct stat64 *st) +{ + assert (ver == 0); + return fstatx (fd, st, sizeof (*st), STX_NORMAL | STX_64); +} From f3fc51027666dbb463ca78bce388a66e64bdf484 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:15:02 +0000 Subject: [PATCH 1864/4487] AIX implementation of getdents. --- sysdeps/unix/sysv/aix/getdents.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/getdents.c diff --git a/sysdeps/unix/sysv/aix/getdents.c b/sysdeps/unix/sysv/aix/getdents.c new file mode 100644 index 0000000000..fd45199851 --- /dev/null +++ b/sysdeps/unix/sysv/aix/getdents.c @@ -0,0 +1,28 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +extern int getdirent (int fd, char *buf, size_t count); + +ssize_t +__getdents (int fd, char *buf, size_t count) +{ + return getdirent (fd, buf, count); +} From 60b73b68d4dfad739f3d6f57e55a12ca0552f67f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:15:10 +0000 Subject: [PATCH 1865/4487] AIX implementation of getegid. --- sysdeps/unix/sysv/aix/getegid.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/getegid.c diff --git a/sysdeps/unix/sysv/aix/getegid.c b/sysdeps/unix/sysv/aix/getegid.c new file mode 100644 index 0000000000..30a6a995a8 --- /dev/null +++ b/sysdeps/unix/sysv/aix/getegid.c @@ -0,0 +1,29 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +/* is there a reason *NOT* to include ? If so #define ID_EFFECTIVE */ +#include + + +gid_t +__getegid (void) +{ + return getgidx (ID_EFFECTIVE); +} +strong_alias (__getegid, getegid) From 9676468e88ff022d8440043e0cbb9dbb93d725bf Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:15:16 +0000 Subject: [PATCH 1866/4487] AIX implementation of geteuid. --- sysdeps/unix/sysv/aix/geteuid.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/geteuid.c diff --git a/sysdeps/unix/sysv/aix/geteuid.c b/sysdeps/unix/sysv/aix/geteuid.c new file mode 100644 index 0000000000..4856868445 --- /dev/null +++ b/sysdeps/unix/sysv/aix/geteuid.c @@ -0,0 +1,29 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +/* is there a reason *NOT* to include ? If so #define ID_EFFECTIVE */ +#include + + +uid_t +__geteuid (void) +{ + return getuidx (ID_EFFECTIVE); +} +strong_alias (__geteuid, geteuid) From f29772215fe5e1a8f4178ccc93526f78fea6adb9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:15:22 +0000 Subject: [PATCH 1867/4487] AIX implementation of getgid. --- sysdeps/unix/sysv/aix/getgid.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/getgid.c diff --git a/sysdeps/unix/sysv/aix/getgid.c b/sysdeps/unix/sysv/aix/getgid.c new file mode 100644 index 0000000000..ca088652f6 --- /dev/null +++ b/sysdeps/unix/sysv/aix/getgid.c @@ -0,0 +1,30 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +/* is there a reason *NOT* to include ? If so #define ID_REAL */ +#include + +extern gid_t getgidx (int which); + +gid_t +__getgid (void) +{ + return getgidx (ID_REAL); +} +strong_alias (__getgid, getgid) From a00d14b76c755908722d134af05bd23aa7296b9f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:15:30 +0000 Subject: [PATCH 1868/4487] AIX implementation of getpeername. --- sysdeps/unix/sysv/aix/getpeername.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/getpeername.c diff --git a/sysdeps/unix/sysv/aix/getpeername.c b/sysdeps/unix/sysv/aix/getpeername.c new file mode 100644 index 0000000000..d227e286cd --- /dev/null +++ b/sysdeps/unix/sysv/aix/getpeername.c @@ -0,0 +1,27 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +extern int ngetpeername (int s, void *uap_asa, int *uap_alen); + +int +getpeername (int fd, __SOCKADDR_ARG addr, socklen_t *len) +{ + return ngetpeername (fd, addr.__sockaddr__, len); +} From ebea3f565b3ecab953b0a5fbe411acf05bc38fb9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:15:37 +0000 Subject: [PATCH 1869/4487] AIX implementation of getpgid. --- sysdeps/unix/sysv/aix/getpgid.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/getpgid.c diff --git a/sysdeps/unix/sysv/aix/getpgid.c b/sysdeps/unix/sysv/aix/getpgid.c new file mode 100644 index 0000000000..53f2e1accf --- /dev/null +++ b/sysdeps/unix/sysv/aix/getpgid.c @@ -0,0 +1,28 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +extern int kgetpgidx (pid_t pid); + +int +__getgpid (pid_t pid) +{ + return kgetpgidx (pid); +} +strong_alias (__getpgid, getpgid) From 7c5ac4b8469389b1fe0e39f9f7217f3d88880aba Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:15:44 +0000 Subject: [PATCH 1870/4487] AIX implementation of getpgrp. --- sysdeps/unix/sysv/aix/getpgrp.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/aix/getpgrp.c diff --git a/sysdeps/unix/sysv/aix/getpgrp.c b/sysdeps/unix/sysv/aix/getpgrp.c new file mode 100644 index 0000000000..ce37738beb --- /dev/null +++ b/sysdeps/unix/sysv/aix/getpgrp.c @@ -0,0 +1 @@ +/* This function is available as a system call. */ From c7e7790bfb7b80b4b7362ccbdc9ed044caf6d0a1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:15:50 +0000 Subject: [PATCH 1871/4487] AIX implementation of getpid. --- sysdeps/unix/sysv/aix/getpid.c | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/getpid.c diff --git a/sysdeps/unix/sysv/aix/getpid.c b/sysdeps/unix/sysv/aix/getpid.c new file mode 100644 index 0000000000..67ef7eaf79 --- /dev/null +++ b/sysdeps/unix/sysv/aix/getpid.c @@ -0,0 +1,6 @@ +/* This is a system call. We only have to provide the wrapper. */ +int +__getpid (void) +{ + return getpid (); +} From d22193dc9dac5c2574f9c7e55b2477228988f0aa Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:15:55 +0000 Subject: [PATCH 1872/4487] AIX implementation of getppid. --- sysdeps/unix/sysv/aix/getppid.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/aix/getppid.c diff --git a/sysdeps/unix/sysv/aix/getppid.c b/sysdeps/unix/sysv/aix/getppid.c new file mode 100644 index 0000000000..6036fbbffd --- /dev/null +++ b/sysdeps/unix/sysv/aix/getppid.c @@ -0,0 +1 @@ +/* This is a system call. */ From bbcea352bd5f6e20e28a39510b808f20f758558d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:16:01 +0000 Subject: [PATCH 1873/4487] AIX implementation of getsid. --- sysdeps/unix/sysv/aix/getsid.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/getsid.c diff --git a/sysdeps/unix/sysv/aix/getsid.c b/sysdeps/unix/sysv/aix/getsid.c new file mode 100644 index 0000000000..88b9daa8e5 --- /dev/null +++ b/sysdeps/unix/sysv/aix/getsid.c @@ -0,0 +1,27 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +extern int kgetsid (pid_t pid); + +int +getsid (pid_t pid) +{ + return kgetsid (pid); +} From 4e8d527d7534c114485d82094178d306f0b280f5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:16:09 +0000 Subject: [PATCH 1874/4487] AIX implementation of getsockname. --- sysdeps/unix/sysv/aix/getsockname.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/getsockname.c diff --git a/sysdeps/unix/sysv/aix/getsockname.c b/sysdeps/unix/sysv/aix/getsockname.c new file mode 100644 index 0000000000..c1a561428e --- /dev/null +++ b/sysdeps/unix/sysv/aix/getsockname.c @@ -0,0 +1,27 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +extern int ngetsockname (int s, void *uap_asa, int *uap_alen); + +int +getsockname (int fd, __SOCKADDR_ARG addr, socklen_t *len) +{ + return ngetsockname (fd, addr.__sockaddr__, len); +} From 698fb09ef599b4eefc9093eb90b241883db52e90 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:16:23 +0000 Subject: [PATCH 1875/4487] AIX implementation of getuid. --- sysdeps/unix/sysv/aix/getuid.c | 30 ++++++++++++++++++++++++ sysdeps/unix/sysv/aix/ioctl.c | 43 ++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/getuid.c create mode 100644 sysdeps/unix/sysv/aix/ioctl.c diff --git a/sysdeps/unix/sysv/aix/getuid.c b/sysdeps/unix/sysv/aix/getuid.c new file mode 100644 index 0000000000..4bc1c8acdb --- /dev/null +++ b/sysdeps/unix/sysv/aix/getuid.c @@ -0,0 +1,30 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +/* is there a reason *NOT* to include ? If so #define ID_REAL */ +#include + +extern uid_t getuidx (int which); + +uid_t +__getuid (void) +{ + return getuidx (ID_REAL); +} +strong_alias (__getuid, getuid) diff --git a/sysdeps/unix/sysv/aix/ioctl.c b/sysdeps/unix/sysv/aix/ioctl.c new file mode 100644 index 0000000000..6e1445d946 --- /dev/null +++ b/sysdeps/unix/sysv/aix/ioctl.c @@ -0,0 +1,43 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +extern int kioctl (int fdes, int cmd, unsigned long int arg, + unsigned long int ext); + +int +__ioctl (int fdes, unsigned long int cmd, ...) +{ + va_list va; + int res; + unsigned long int arg; + unsigned long int ext; + + va_start (va, cmd); + arg = va_arg (va, unsigned long int); + ext = va_arg (va, unsigned long int); + + res = kioctl (fdes, cmd, arg, ext); + + va_end (va); + + return res; +} +strong_alias (__ioctl, ioctl) From 551e64e98e74f68b762f34c1dc5d65afbf110058 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:16:41 +0000 Subject: [PATCH 1876/4487] AIX specific kernel prototypes. --- sysdeps/unix/sysv/aix/kernel_proto.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/kernel_proto.h diff --git a/sysdeps/unix/sysv/aix/kernel_proto.h b/sysdeps/unix/sysv/aix/kernel_proto.h new file mode 100644 index 0000000000..d3ddfa6a0a --- /dev/null +++ b/sysdeps/unix/sysv/aix/kernel_proto.h @@ -0,0 +1,25 @@ +/* Copyright (C) 1999 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* This file contains prototypes for the "functions" exported by /unix + on AIX. */ +#include + + +extern ssize_t kwrite (int, const void *, size_t); From 4ae9382d40bde8ffe104b107b7c526e743d20de8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:16:47 +0000 Subject: [PATCH 1877/4487] AIX implementation of kill. --- sysdeps/unix/sysv/aix/kill.c | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/kill.c diff --git a/sysdeps/unix/sysv/aix/kill.c b/sysdeps/unix/sysv/aix/kill.c new file mode 100644 index 0000000000..dfe366c397 --- /dev/null +++ b/sysdeps/unix/sysv/aix/kill.c @@ -0,0 +1,8 @@ +/* This is a system call. We only have to provide the wrapper. */ +#include + +int +__kill (pid_t pid, int sig) +{ + return kill (pid, sig); +} From 9d338985e4679487e1a89e22aed4bb1c8eb36da0 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:16:55 +0000 Subject: [PATCH 1878/4487] AIX implementation of lchown. --- sysdeps/unix/sysv/aix/lchown.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/lchown.c diff --git a/sysdeps/unix/sysv/aix/lchown.c b/sysdeps/unix/sysv/aix/lchown.c new file mode 100644 index 0000000000..57a83b5f6e --- /dev/null +++ b/sysdeps/unix/sysv/aix/lchown.c @@ -0,0 +1,25 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +__lchown (const char *file, uid_t owner, gid_t group) +{ + return lchown (file, owner, group); +} From 47415cb2612e7d02c20b6821a9fb206b43898635 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:17:14 +0000 Subject: [PATCH 1879/4487] AIX specific libc startup code.. --- sysdeps/unix/sysv/aix/libc-start.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/libc-start.c diff --git a/sysdeps/unix/sysv/aix/libc-start.c b/sysdeps/unix/sysv/aix/libc-start.c new file mode 100644 index 0000000000..f7eb65e8b4 --- /dev/null +++ b/sysdeps/unix/sysv/aix/libc-start.c @@ -0,0 +1,20 @@ +/* We don't need the usual code since we are using the AIX crt code. */ + +/* This function is called in the AIX crt0. */ +void +__mod_init (void) +{ + /* XXX What has to be done? */ +} + +/* This variable is reference in the AIX crt0 code. + XXX Since I don't know how it is used make it a pointer to a function. */ +void *__crt0v = __mod_init; + + +/* XXX Another weird function from the C library. I have no idea what + it does but it is needed by libgcc. */ +void +_savef14 (void) +{ +} From 15373f8bd25491983010da0c1340f8c2031a4994 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:17:22 +0000 Subject: [PATCH 1880/4487] AIX implementation of lockf. --- sysdeps/unix/sysv/aix/lockf.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/lockf.c diff --git a/sysdeps/unix/sysv/aix/lockf.c b/sysdeps/unix/sysv/aix/lockf.c new file mode 100644 index 0000000000..43ac1af4b4 --- /dev/null +++ b/sysdeps/unix/sysv/aix/lockf.c @@ -0,0 +1,27 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +extern int klockf (int fd, int function, long long int size); + +int +lockf (int fd, int cmd, off_t len) +{ + return klockf (fd, cmd, len); +} From 2260eae7d1de0da09c47633696d90c630e4ca1e7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:17:26 +0000 Subject: [PATCH 1881/4487] AIX implementation of lockf64. --- sysdeps/unix/sysv/aix/lockf64.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/lockf64.c diff --git a/sysdeps/unix/sysv/aix/lockf64.c b/sysdeps/unix/sysv/aix/lockf64.c new file mode 100644 index 0000000000..ad4840bc0a --- /dev/null +++ b/sysdeps/unix/sysv/aix/lockf64.c @@ -0,0 +1,27 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +extern int klockf (int fd, int function, long long int size); + +int +lockf64 (int fd, int cmd, off64_t len) +{ + return klockf (fd, cmd, len); +} From e41d64d42a0613a1776a88dd772e2c972f2f12be Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:17:33 +0000 Subject: [PATCH 1882/4487] AIX implementation of lseek. --- sysdeps/unix/sysv/aix/lseek.c | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/lseek.c diff --git a/sysdeps/unix/sysv/aix/lseek.c b/sysdeps/unix/sysv/aix/lseek.c new file mode 100644 index 0000000000..99a6fb50b1 --- /dev/null +++ b/sysdeps/unix/sysv/aix/lseek.c @@ -0,0 +1,8 @@ +/* This is a system call. We only have to provide the wrapper. */ +#include + +off_t +__lseek (int fd, off_t offset, int whence) +{ + return lseek (fd, offset, whence); +} From d931954b27ac53a5c4aefd1f2d9b5c226f58f2ab Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:17:38 +0000 Subject: [PATCH 1883/4487] AIX implementation of lseek64. --- sysdeps/unix/sysv/aix/lseek64.c | 35 +++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/lseek64.c diff --git a/sysdeps/unix/sysv/aix/lseek64.c b/sysdeps/unix/sysv/aix/lseek64.c new file mode 100644 index 0000000000..621cdaee70 --- /dev/null +++ b/sysdeps/unix/sysv/aix/lseek64.c @@ -0,0 +1,35 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +extern int klseek (int fd, long long int offset, int sbase, + long long int *new_offp); + +off64_t +__libc_lseek64 (int fd, off64_t offset, int whence) +{ + long long int res; + + if (klseek (fd, offset, whence, &res) < 0) + res = -1ll; + + return res; +} +strong_alias (__libc_lseek64, __lseek64) +strong_alias (__libc_lseek64, lseek64) From 4588e96db96b9c4198fd26ff9699f4fc78d76352 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:17:47 +0000 Subject: [PATCH 1884/4487] AIX implementation of __lxstat. --- sysdeps/unix/sysv/aix/lxstat.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/lxstat.c diff --git a/sysdeps/unix/sysv/aix/lxstat.c b/sysdeps/unix/sysv/aix/lxstat.c new file mode 100644 index 0000000000..2edaf72d86 --- /dev/null +++ b/sysdeps/unix/sysv/aix/lxstat.c @@ -0,0 +1,33 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +/* this is #define'd in - why #define it again? +#define STX_LINK 0x01 + */ + +extern int statx (const char *pathname, struct stat *st, int len, int cmd); + +int +__lxstat (int ver, const char *pathname, struct stat *st) +{ + assert (ver == 0); + return statx (pathname, st, sizeof (*st), STX_LINK); +} From 03932925c13784a617f3675e0b182d6fa3f409e8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:17:53 +0000 Subject: [PATCH 1885/4487] AIX implementation of __lxstat64. --- sysdeps/unix/sysv/aix/lxstat64.c | 34 ++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/lxstat64.c diff --git a/sysdeps/unix/sysv/aix/lxstat64.c b/sysdeps/unix/sysv/aix/lxstat64.c new file mode 100644 index 0000000000..426b59443f --- /dev/null +++ b/sysdeps/unix/sysv/aix/lxstat64.c @@ -0,0 +1,34 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +/* these are #define'd in why #define them again? +#define STX_LINK 0x01 +#define STX_64 0x08 + */ + +extern int statx (const char *pathname, struct stat64 *st, int len, int cmd); + +int +__lxstat64 (int ver, const char *pathname, struct stat64 *st) +{ + assert (ver == 0); + return statx (pathname, st, sizeof (*st), STX_LINK | STX_64); +} From 518d7e658de731cfdb91a9806e793dd3351f92f0 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:18:01 +0000 Subject: [PATCH 1886/4487] AIX implementation of mmap. --- sysdeps/unix/sysv/aix/mmap.c | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/mmap.c diff --git a/sysdeps/unix/sysv/aix/mmap.c b/sysdeps/unix/sysv/aix/mmap.c new file mode 100644 index 0000000000..cd967d36bc --- /dev/null +++ b/sysdeps/unix/sysv/aix/mmap.c @@ -0,0 +1,9 @@ +/* This is a system call. We only have to provide the wrapper. */ +#include +#include + +void * +__mmap (void *addr, size_t len, int prot, int flags, int fd, off_t offset) +{ + return mmap (addr, len, prot, flags, fd, offset); +} From 39595bc012dc23bc2e076e70cfcbf2e564d9a85b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:18:05 +0000 Subject: [PATCH 1887/4487] AIX implementation of mmap64. --- sysdeps/unix/sysv/aix/mmap64.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/mmap64.c diff --git a/sysdeps/unix/sysv/aix/mmap64.c b/sysdeps/unix/sysv/aix/mmap64.c new file mode 100644 index 0000000000..9f2a277faf --- /dev/null +++ b/sysdeps/unix/sysv/aix/mmap64.c @@ -0,0 +1,30 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +extern int kmmap (void *addr, size_t len, int prot, int flags, int fd, + long long int offset); + +void * +__mmap64 (void *addr, size_t len, int prot, int flags, int fd, off64_t offset) +{ + return kmmap (addr, len, prot, flags, fd, offset); +} +strong_alias (__mmap64, mmap64) From f38ffbfeccb1c67491515e3620a88ace48977e41 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:18:13 +0000 Subject: [PATCH 1888/4487] AIX implementation of munmap. --- sysdeps/unix/sysv/aix/munmap.c | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/munmap.c diff --git a/sysdeps/unix/sysv/aix/munmap.c b/sysdeps/unix/sysv/aix/munmap.c new file mode 100644 index 0000000000..7f583be358 --- /dev/null +++ b/sysdeps/unix/sysv/aix/munmap.c @@ -0,0 +1,8 @@ +/* This is a system call. We only have to provide the wrapper. */ +#include + +int +__munmap (void *addr, size_t len) +{ + return munmap (addr, len); +} From 63fe00f0c674f7c373cfca6afaac644e3ce0eb9a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:18:22 +0000 Subject: [PATCH 1889/4487] AIX implementation of nanosleep. --- sysdeps/unix/sysv/aix/nanosleep.c | 41 +++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/nanosleep.c diff --git a/sysdeps/unix/sysv/aix/nanosleep.c b/sysdeps/unix/sysv/aix/nanosleep.c new file mode 100644 index 0000000000..1277319c94 --- /dev/null +++ b/sysdeps/unix/sysv/aix/nanosleep.c @@ -0,0 +1,41 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include + +/* this is declared in not */ +#if 0 +struct timestruc_t +{ + time_t tv_sec; /* seconds. */ + suseconds_t tv_nsec; /* and nanoseconds. */ +}; +#endif + +extern int _nsleep (struct timestruc_t *rqtp, struct timestruc_t *rmtp); + +int +__libc_nanosleep (const struct timespec *req, struct timespec *rem) +{ + assert (sizeof (struct timestruc_t) == sizeof (*req)); + return _nsleep ((struct timestruc_t *) req, (struct timestruc_t *) rem); +} +strong_alias (__libc_nanosleep, __nanosleep) +strong_alias (__libc_nanosleep, nanosleep) From 56f5c4388fad5a1e082e4ed1a461119d5dcdc74c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:18:28 +0000 Subject: [PATCH 1890/4487] AIX implementation of open. --- sysdeps/unix/sysv/aix/open.c | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/open.c diff --git a/sysdeps/unix/sysv/aix/open.c b/sysdeps/unix/sysv/aix/open.c new file mode 100644 index 0000000000..7bab537154 --- /dev/null +++ b/sysdeps/unix/sysv/aix/open.c @@ -0,0 +1,37 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include + +int +__open (const char *file, int oflag, ...) +{ + int mode = 0; + + if (oflag & O_CREAT) + { + va_list arg; + va_start (arg, oflag); + mode = va_arg (arg, int); + va_end (arg); + } + + return open (file, oflag, mode); +} From d10f02264a597ced38d4c751094d94bfc3223d38 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:18:34 +0000 Subject: [PATCH 1891/4487] AIX implementation of pread. --- sysdeps/unix/sysv/aix/pread.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/pread.c diff --git a/sysdeps/unix/sysv/aix/pread.c b/sysdeps/unix/sysv/aix/pread.c new file mode 100644 index 0000000000..35fd7ca398 --- /dev/null +++ b/sysdeps/unix/sysv/aix/pread.c @@ -0,0 +1,27 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +extern int kpread (int fd, void *buf, size_t len, long long int off); + +ssize_t +__pread (int fd, void *buf, size_t len, off_t off) +{ + return kpread (fd, buf, len, off); +} From 9a1dfe2293a6d6fc821b4447f0907d8dda481176 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:18:39 +0000 Subject: [PATCH 1892/4487] AIX implementation of pread64. --- sysdeps/unix/sysv/aix/pread64.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/pread64.c diff --git a/sysdeps/unix/sysv/aix/pread64.c b/sysdeps/unix/sysv/aix/pread64.c new file mode 100644 index 0000000000..428fc63321 --- /dev/null +++ b/sysdeps/unix/sysv/aix/pread64.c @@ -0,0 +1,27 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +extern int kpread (int fd, void *buf, size_t len, long long int off); + +ssize_t +__pread64 (int fd, void *buf, size_t len, off64_t off) +{ + return kpread (fd, buf, len, off); +} From 4ac5a17cf9cf109dc3ca4180985053016862cb9a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:18:58 +0000 Subject: [PATCH 1893/4487] AIX definitions for profiling. --- sysdeps/unix/sysv/aix/profil-counter.h | 27 ++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/profil-counter.h diff --git a/sysdeps/unix/sysv/aix/profil-counter.h b/sysdeps/unix/sysv/aix/profil-counter.h new file mode 100644 index 0000000000..f58f1b6431 --- /dev/null +++ b/sysdeps/unix/sysv/aix/profil-counter.h @@ -0,0 +1,27 @@ +/* Machine-dependent SIGPROF signal handler. AIX version. + Copyright (C) 1996, 1997, 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* In many Unix systems signal handlers are called like this + and the interrupted PC is easily findable in the `struct sigcontext'. */ + +static void +profil_counter (int signr, int code, struct sigcontext *scp) +{ + profil_count ((void *) scp->sc_jmpbuf.__jmp_context.__gpr[0]); +} From 8198cb76b2fb2675d7024bb00ea0cb8e1501136b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:19:08 +0000 Subject: [PATCH 1894/4487] AIX implementation of read. --- sysdeps/unix/sysv/aix/read.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/read.c diff --git a/sysdeps/unix/sysv/aix/read.c b/sysdeps/unix/sysv/aix/read.c new file mode 100644 index 0000000000..556f7c6b67 --- /dev/null +++ b/sysdeps/unix/sysv/aix/read.c @@ -0,0 +1,29 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +extern int kread (int fd, void *buf, size_t len); + +ssize_t +__libc_read (int fd, void *buf, size_t len) +{ + return kread (fd, buf, len); +} +strong_alias (__libc_read, __read) +strong_alias (__libc_read, read) From f31359c0edf267030ee89841c10d298f8725a73b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:19:13 +0000 Subject: [PATCH 1895/4487] AIX implementation of readlink. --- sysdeps/unix/sysv/aix/readlink.c | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/readlink.c diff --git a/sysdeps/unix/sysv/aix/readlink.c b/sysdeps/unix/sysv/aix/readlink.c new file mode 100644 index 0000000000..2770358b98 --- /dev/null +++ b/sysdeps/unix/sysv/aix/readlink.c @@ -0,0 +1,8 @@ +/* This is a system call. We only have to provide the wrapper. */ +#include + +int +__readlink (const char *path, char *buf, size_t len) +{ + return readlink (path, buf, len); +} From 92f025ebe338a7fd5bec3dcc3f47652a4abaa23b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:19:20 +0000 Subject: [PATCH 1896/4487] AIX implementation of readv. --- sysdeps/unix/sysv/aix/readv.c | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/readv.c diff --git a/sysdeps/unix/sysv/aix/readv.c b/sysdeps/unix/sysv/aix/readv.c new file mode 100644 index 0000000000..67d54c997c --- /dev/null +++ b/sysdeps/unix/sysv/aix/readv.c @@ -0,0 +1,37 @@ +/* Copyright (C) 1991, 1995-1998, 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +extern ssize_t kreadv (int fd, const struct iovec *iovp, size_t iovcnt, + long int ext); + +/* Read data from file descriptor FD, and put the result in the + buffers described by VECTOR, which is a vector of COUNT `struct iovec's. + The buffers are filled in the order specified. + Operates just like `read' (see ) except that data are + put in VECTOR instead of a contiguous buffer. */ +ssize_t +__readv (fd, vector, count) + int fd; + const struct iovec *vector; + int count; +{ + return kreadv (fd, vector, count, 0); +} +strong_alias (__readv, readv) From 1fca6a4d4b487272f483a5639c64fb2cd98395c7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:19:29 +0000 Subject: [PATCH 1897/4487] AIX implementation of recvfrom. --- sysdeps/unix/sysv/aix/recvfrom.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/recvfrom.c diff --git a/sysdeps/unix/sysv/aix/recvfrom.c b/sysdeps/unix/sysv/aix/recvfrom.c new file mode 100644 index 0000000000..88f042a360 --- /dev/null +++ b/sysdeps/unix/sysv/aix/recvfrom.c @@ -0,0 +1,29 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +extern int nrecvfrom (int s, void *uap_buf, int len, int flags, + void *uap_from, int *uap_fromlenaddr); + +int +recvfrom (int fd, void *buf, size_t n, int flags, __SOCKADDR_ARG addr, + socklen_t *addr_len) +{ + return nrecvfrom (fd, buf, n, flags, addr.__sockaddr__, addr_len); +} From 83ad13fa285804f66762e1563d2881fe2a60d2c5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:19:34 +0000 Subject: [PATCH 1898/4487] AIX implementation of recvmsg. --- sysdeps/unix/sysv/aix/recvmsg.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/recvmsg.c diff --git a/sysdeps/unix/sysv/aix/recvmsg.c b/sysdeps/unix/sysv/aix/recvmsg.c new file mode 100644 index 0000000000..baecd5a40b --- /dev/null +++ b/sysdeps/unix/sysv/aix/recvmsg.c @@ -0,0 +1,27 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +extern int nrecvmsg (int s, struct msghdr *uap_msg, int flags); + +int +recvmsg (int fd, struct msghdr *message, int flags) +{ + return nrecvmsg (fd, message, flags); +} From 00f4e2e47890af1b8b8a46ab630f527824441b5c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:19:43 +0000 Subject: [PATCH 1899/4487] AIX implementation of revoke. --- sysdeps/unix/sysv/aix/revoke.c | 41 ++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/revoke.c diff --git a/sysdeps/unix/sysv/aix/revoke.c b/sysdeps/unix/sysv/aix/revoke.c new file mode 100644 index 0000000000..2a81080489 --- /dev/null +++ b/sysdeps/unix/sysv/aix/revoke.c @@ -0,0 +1,41 @@ +/* Revoke the access of all descriptors currently open on a file. AIX version. + Copyright (C) 1995, 1996, 1997, 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include + +extern int frevoke (int fdes); + +int +revoke (file) + const char *file; +{ + int fd; + int res; + + fd = open (file, O_RDONLY); + if (fd < 0) + return -1; + + res = frevoke (fd); + (void) close (fd); + + return res; +} From bada1fee5754dbc715d48d59882585bdf783163b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:19:50 +0000 Subject: [PATCH 1900/4487] AIX implementation of sbrk. --- sysdeps/unix/sysv/aix/sbrk.c | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/sbrk.c diff --git a/sysdeps/unix/sysv/aix/sbrk.c b/sysdeps/unix/sysv/aix/sbrk.c new file mode 100644 index 0000000000..9e4b5605c7 --- /dev/null +++ b/sysdeps/unix/sysv/aix/sbrk.c @@ -0,0 +1,8 @@ +/* This is a system call. We only have to provide the wrapper. */ +#include + +void * +__sbrk (ptrdiff_t delta) +{ + return sbrk (delta); +} From ea8194fbd918b6638da5941ea927c9d2ee15f684 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:20:03 +0000 Subject: [PATCH 1901/4487] AIX implementation of sched_yield. --- sysdeps/unix/sysv/aix/sched_yield.c | 31 +++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/sched_yield.c diff --git a/sysdeps/unix/sysv/aix/sched_yield.c b/sysdeps/unix/sysv/aix/sched_yield.c new file mode 100644 index 0000000000..0820c9a4f8 --- /dev/null +++ b/sysdeps/unix/sysv/aix/sched_yield.c @@ -0,0 +1,31 @@ +/* Copyright (C) 1996, 1997, 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +extern void yield (void); + + +/* Yield the processor. */ +int +__sched_yield (void) +{ + yield (); + return 0; +} +strong_alias (__sched_yield, sched_yield) From ebd7ebff2c415b186096f364719c6e99908bfff0 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:20:14 +0000 Subject: [PATCH 1902/4487] AIX implementation of sendmsg. --- sysdeps/unix/sysv/aix/sendmsg.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/sendmsg.c diff --git a/sysdeps/unix/sysv/aix/sendmsg.c b/sysdeps/unix/sysv/aix/sendmsg.c new file mode 100644 index 0000000000..6dbbf5e8c1 --- /dev/null +++ b/sysdeps/unix/sysv/aix/sendmsg.c @@ -0,0 +1,27 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +extern int nsendmsg (int s, void *uap_msg, int flags); + +int +sendmsg (int fd, const struct msghdr *message, int flags) +{ + return nsendmsg (fd, message, flags); +} From ca97c065e748bfc866a9ef90a9e5bebb0fb2f6f6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:20:21 +0000 Subject: [PATCH 1903/4487] AIX implementation of setegid. --- sysdeps/unix/sysv/aix/setegid.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/setegid.c diff --git a/sysdeps/unix/sysv/aix/setegid.c b/sysdeps/unix/sysv/aix/setegid.c new file mode 100644 index 0000000000..9f660ff27a --- /dev/null +++ b/sysdeps/unix/sysv/aix/setegid.c @@ -0,0 +1,32 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +/* is there a reason *NOT* to include ? If so #define ID_EFFECTIVE */ +#include + + +extern int setgidx (int mask, gid_t gid); + +int +__setegid (gid_t gid) +{ + return setgidx (ID_EFFECTIVE, gid); +} +strong_alias (__setegid, setegid) From c59cabddb1436380fab69ece80d886f6fa7f7af7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:20:26 +0000 Subject: [PATCH 1904/4487] AIX implementation of seteuid. --- sysdeps/unix/sysv/aix/seteuid.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/seteuid.c diff --git a/sysdeps/unix/sysv/aix/seteuid.c b/sysdeps/unix/sysv/aix/seteuid.c new file mode 100644 index 0000000000..de9280be9e --- /dev/null +++ b/sysdeps/unix/sysv/aix/seteuid.c @@ -0,0 +1,32 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + + +/* is there a reason *NOT* to include ? If so #define ID_EFFECTIVE */ +#include + +extern int setuidx (int mask, uid_t uid); + +int +__seteuid (uid_t uid) +{ + return setuidx (ID_EFFECTIVE, uid); +} +strong_alias (__seteuid, seteuid) From c11bc02c6d31cb5523103bcacbe97ebdbbb2f955 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:20:31 +0000 Subject: [PATCH 1905/4487] AIX implementation of setgid. --- sysdeps/unix/sysv/aix/setgid.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/setgid.c diff --git a/sysdeps/unix/sysv/aix/setgid.c b/sysdeps/unix/sysv/aix/setgid.c new file mode 100644 index 0000000000..bf976ec72e --- /dev/null +++ b/sysdeps/unix/sysv/aix/setgid.c @@ -0,0 +1,32 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + + +/* is there a reason *NOT* to include ? If so #define ID_REAL */ +#include + +extern int setgidx (int mask, gid_t gid); + +int +__setgid (gid_t gid) +{ + return setgidx (ID_REAL, gid); +} +strong_alias (__setgid, setgid) From 627465efd0770755e9e0cda08497af6a92d4c817 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:20:40 +0000 Subject: [PATCH 1906/4487] AIX implementation of setregid. --- sysdeps/unix/sysv/aix/setregid.c | 42 ++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/setregid.c diff --git a/sysdeps/unix/sysv/aix/setregid.c b/sysdeps/unix/sysv/aix/setregid.c new file mode 100644 index 0000000000..02961b4dc0 --- /dev/null +++ b/sysdeps/unix/sysv/aix/setregid.c @@ -0,0 +1,42 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +/* is there a reason *NOT* to include ? */ +/* If so #define ID_EFFECTIVE and ID_REAL */ +#include + + +extern int setgidx (int mask, gid_t gid); + +int +__setregid (gid_t rgid, gid_t egid) +{ + int res; + + if (rgid == egid) + return setgidx (ID_EFFECTIVE | ID_REAL, egid); + + res = setgidx (ID_REAL, rgid); + if (res == 0) + res = setgidx (ID_EFFECTIVE, egid); + + return res; +} +strong_alias (__setregid, setregid) From 5db961844f38251188c98f5e8d74377b7646a6c3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:20:45 +0000 Subject: [PATCH 1907/4487] AIX implementation of setreuid. --- sysdeps/unix/sysv/aix/setreuid.c | 41 ++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/setreuid.c diff --git a/sysdeps/unix/sysv/aix/setreuid.c b/sysdeps/unix/sysv/aix/setreuid.c new file mode 100644 index 0000000000..ecf12a1ff3 --- /dev/null +++ b/sysdeps/unix/sysv/aix/setreuid.c @@ -0,0 +1,41 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +/* is there a reason *NOT* to include ? */ +/* If so #define ID_EFFECTIVE and ID_REAL */ +#include + +extern int setuidx (int mask, uid_t uid); + +int +__setreuid (uid_t ruid, uid_t euid) +{ + int res; + + if (ruid == euid) + return setuidx (ID_EFFECTIVE | ID_REAL, euid); + + res = setuidx (ID_REAL, ruid); + if (res == 0) + res = setuidx (ID_EFFECTIVE, euid); + + return res; +} +strong_alias (__setreuid, setreuid) From b0dacffd2afc24544fd9708944d8582f5cffa3b7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:20:50 +0000 Subject: [PATCH 1908/4487] AIX implementation of setuid. --- sysdeps/unix/sysv/aix/setuid.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/setuid.c diff --git a/sysdeps/unix/sysv/aix/setuid.c b/sysdeps/unix/sysv/aix/setuid.c new file mode 100644 index 0000000000..679db050bd --- /dev/null +++ b/sysdeps/unix/sysv/aix/setuid.c @@ -0,0 +1,31 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +/* is there a reason *NOT* to include ? If so #define ID_REAL */ +#include + +extern int setuidx (int mask, uid_t uid); + +int +__setuid (uid_t uid) +{ + return setuidx (ID_REAL, uid); +} +strong_alias (__setuid, setuid) From 8b10fdaa38d4fcf3be81268fbb15b15b14de659e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:20:58 +0000 Subject: [PATCH 1909/4487] AIX implementation of sigaction. --- sysdeps/unix/sysv/aix/sigaction.c | 35 +++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/sigaction.c diff --git a/sysdeps/unix/sysv/aix/sigaction.c b/sysdeps/unix/sysv/aix/sigaction.c new file mode 100644 index 0000000000..65801f4746 --- /dev/null +++ b/sysdeps/unix/sysv/aix/sigaction.c @@ -0,0 +1,35 @@ +/* Copyright (C) 1991, 1995, 1996, 1997, 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +extern int _sigaction (int sig, const struct sigaction *act, + struct sigaction *oact); + +/* If ACT is not NULL, change the action for SIG to *ACT. + If OACT is not NULL, put the old action for SIG in *OACT. */ +int +__sigaction (sig, act, oact) + int sig; + const struct sigaction *act; + struct sigaction *oact; +{ + return _sigaction (sig, act, oact); +} +strong_alias (__sigaction, sigaction) From 9264940da4ff3ea80ddb8a9828c89ac738e6f7d9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:21:07 +0000 Subject: [PATCH 1910/4487] AIX implementation of sigpending. --- sysdeps/unix/sysv/aix/sigpending.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/sigpending.c diff --git a/sysdeps/unix/sysv/aix/sigpending.c b/sysdeps/unix/sysv/aix/sigpending.c new file mode 100644 index 0000000000..a6add428e2 --- /dev/null +++ b/sysdeps/unix/sysv/aix/sigpending.c @@ -0,0 +1,30 @@ +/* Copyright (C) 1991, 1995, 1996, 1997, 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +extern int _sigpending (sigset_t *set); + + +/* Store in SET all signals that are blocked and pending. */ +int +sigpending (set) + sigset_t *set; +{ + return _sigpending (set); +} From 70109e7ac5c3fb0de8281ef4619ec0ea820e8118 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:21:16 +0000 Subject: [PATCH 1911/4487] AIX implementation of sigprocmask. --- sysdeps/unix/sysv/aix/sigprocmask.c | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/sigprocmask.c diff --git a/sysdeps/unix/sysv/aix/sigprocmask.c b/sysdeps/unix/sysv/aix/sigprocmask.c new file mode 100644 index 0000000000..1046903b9c --- /dev/null +++ b/sysdeps/unix/sysv/aix/sigprocmask.c @@ -0,0 +1,8 @@ +/* This is a system call. We only have to provide the wrapper. */ +#include + +int +__sigprocmask (int how, const sigset_t *set, sigset_t *oset) +{ + return sigprocmask (how, set, oset); +} From 67324c62d11a7c4005d5bc4d67dcd0a57504ce5d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:21:46 +0000 Subject: [PATCH 1912/4487] AIX code to convert sigest. --- sysdeps/unix/sysv/aix/sigset-cvt-mask.h | 28 +++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/sigset-cvt-mask.h diff --git a/sysdeps/unix/sysv/aix/sigset-cvt-mask.h b/sysdeps/unix/sysv/aix/sigset-cvt-mask.h new file mode 100644 index 0000000000..5a01212473 --- /dev/null +++ b/sysdeps/unix/sysv/aix/sigset-cvt-mask.h @@ -0,0 +1,28 @@ +/* Convert between lowlevel sigmask and libc representation of sigset_t. + AIX version. + Copyright (C) 1998, 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#define sigset_set_old_mask(set, mask) \ + do { \ + (set)->__losigs = (unsigned int) mask; \ + (set)->__hisigs = 0; \ + } while (0) + +#define sigset_get_old_mask(set, mask) \ + ((mask) = (unsigned int) (set)->__losigs) From 72f301a3fcdea4a7a2c5201cf746feb37ed1e7da Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:21:53 +0000 Subject: [PATCH 1913/4487] AIX implementation of sigsuspend. --- sysdeps/unix/sysv/aix/sigsuspend.c | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/sigsuspend.c diff --git a/sysdeps/unix/sysv/aix/sigsuspend.c b/sysdeps/unix/sysv/aix/sigsuspend.c new file mode 100644 index 0000000000..123728114e --- /dev/null +++ b/sysdeps/unix/sysv/aix/sigsuspend.c @@ -0,0 +1,32 @@ +/* Copyright (C) 1991, 1995-1998, 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +extern int _sigsuspend (const sigset_t *sigmask); + + +/* Change the set of blocked signals to SET, + wait until a signal arrives, and restore the set of blocked signals. */ +int +__sigsuspend (set) + const sigset_t *set; +{ + return _sigsuspend (set); +} +weak_alias (__sigsuspend, sigsuspend) From 8b2af91502682fea339b95ed7844305443ef2139 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:22:02 +0000 Subject: [PATCH 1914/4487] AIX implementation of statfs. --- sysdeps/unix/sysv/aix/statfs.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/statfs.c diff --git a/sysdeps/unix/sysv/aix/statfs.c b/sysdeps/unix/sysv/aix/statfs.c new file mode 100644 index 0000000000..c0c966c890 --- /dev/null +++ b/sysdeps/unix/sysv/aix/statfs.c @@ -0,0 +1,27 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +extern int statfs (const char *file, struct statfs *buf); + +int +__statfs (const char *file, struct statfs *buf) +{ + return statfs (file, buf); +} From 88a0392bb6833d66a8ba33e5d24954e2a1aea2e2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:22:10 +0000 Subject: [PATCH 1915/4487] AIX implementation of syscall. --- sysdeps/unix/sysv/aix/syscall.c | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/syscall.c diff --git a/sysdeps/unix/sysv/aix/syscall.c b/sysdeps/unix/sysv/aix/syscall.c new file mode 100644 index 0000000000..6f204ff809 --- /dev/null +++ b/sysdeps/unix/sysv/aix/syscall.c @@ -0,0 +1,2 @@ +/* XXX We will have to see whether it is possible to implement this + function at all. */ From 56ce0eedb95a8fcfb1d4b6ee326c3e4c27548a3b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:22:27 +0000 Subject: [PATCH 1916/4487] AIX sysdep specific low-level interfact definitions.. --- sysdeps/unix/sysv/aix/sysdep.h | 88 ++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/sysdep.h diff --git a/sysdeps/unix/sysv/aix/sysdep.h b/sysdeps/unix/sysv/aix/sysdep.h new file mode 100644 index 0000000000..182e324dfc --- /dev/null +++ b/sysdeps/unix/sysv/aix/sysdep.h @@ -0,0 +1,88 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + + +/* This seems to always be the case on PPC. */ +#define ALIGNARG(log2) log2 + +/* How to define local lables. */ +#define L(name) L..##name + +/* Label in text section. */ +#define C_TEXT(name) .##name + +/* Function descriptor. */ +#define FUNCDESC(real, code) \ + .toc; \ + .csect real##[DS], 3; \ + .globl real; \ +real: \ + .long code, TOC[tc0], 0; + +/* Code to generate function entry code. */ +#define ENTRY(name) \ + FUNCDESC (name, C_TEXT (name)) \ + .csect .text[PR], 2; \ + .globl C_TEXT (name); \ +C_TEXT (name): + +/* XXX For now we don't define any code. */ +#define CALL_MCOUNT + +#define EALIGN_W_0 /* No words to insert. */ +#define EALIGN_W_1 nop +#define EALIGN_W_2 nop;nop +#define EALIGN_W_3 nop;nop;nop +#define EALIGN_W_4 EALIGN_W_3;nop +#define EALIGN_W_5 EALIGN_W_4;nop +#define EALIGN_W_6 EALIGN_W_5;nop +#define EALIGN_W_7 EALIGN_W_6;nop + +/* EALIGN is like ENTRY, but does alignment to 'words'*4 bytes + past a 2^align boundary. */ +#ifdef PROF +#define EALIGN(name, alignt, words) \ + FUNCDESC (name, C_TEXT (name)) \ + .csect .text[PR], 2; \ + .align ALIGNARG(2); \ + .globl C_TEXT (name); \ +C_TEXT (name): \ + CALL_MCOUNT \ + b L(align_0); \ + .align ALIGNARG(alignt); \ + EALIGN_W_##words; \ +L(align_0): +#else /* PROF */ +#define EALIGN(name, alignt, words) \ + FUNCDESC (name, C_TEXT (name)) \ + .csect .text[PR], 2; \ + .align ALIGNARG(alignt); \ + EALIGN_W_##words; \ + .globl C_TEXT (name); \ +C_TEXT (name): +#endif + +/* No special end code for now. We will eventually add to usual prolog + with function length etc. */ +#define END(name) + + +/* Jumping to another function. We are jumping to the TOC entry. */ +#define JUMPTARGET(name) name From e22f9474ac6942dbd20f4e450209a9ed24deb202 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:22:36 +0000 Subject: [PATCH 1917/4487] AIX implementation of truncate. --- sysdeps/unix/sysv/aix/truncate.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/truncate.c diff --git a/sysdeps/unix/sysv/aix/truncate.c b/sysdeps/unix/sysv/aix/truncate.c new file mode 100644 index 0000000000..78f20fad13 --- /dev/null +++ b/sysdeps/unix/sysv/aix/truncate.c @@ -0,0 +1,28 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +extern int ktruncate (const char *name, long long int length); + +int +__truncate (const char *name, off_t length) +{ + return ktruncate (name, length); +} +strong_alias (__truncate, truncate) From 194ed9ac29a4ded30b9301ec1ad79d636b042b7f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:22:40 +0000 Subject: [PATCH 1918/4487] AIX implementation of truncate64. --- sysdeps/unix/sysv/aix/truncate64.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/truncate64.c diff --git a/sysdeps/unix/sysv/aix/truncate64.c b/sysdeps/unix/sysv/aix/truncate64.c new file mode 100644 index 0000000000..6582a458b1 --- /dev/null +++ b/sysdeps/unix/sysv/aix/truncate64.c @@ -0,0 +1,28 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +extern int ktruncate (const char *name, long long int length); + +int +__truncate64 (const char *name, off64_t length) +{ + return ktruncate (name, length); +} +strong_alias (__truncate64, truncate64) From 69729d86164f9251bd7698cef452be1e5efbedf8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:22:48 +0000 Subject: [PATCH 1919/4487] AIX implementation of uname. --- sysdeps/unix/sysv/aix/uname.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/aix/uname.c diff --git a/sysdeps/unix/sysv/aix/uname.c b/sysdeps/unix/sysv/aix/uname.c new file mode 100644 index 0000000000..6036fbbffd --- /dev/null +++ b/sysdeps/unix/sysv/aix/uname.c @@ -0,0 +1 @@ +/* This is a system call. */ From f023ae74fe5127523bc19415f64673a2391bcb65 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:22:56 +0000 Subject: [PATCH 1920/4487] AIX implementation of wait3. --- sysdeps/unix/sysv/aix/wait3.c | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/wait3.c diff --git a/sysdeps/unix/sysv/aix/wait3.c b/sysdeps/unix/sysv/aix/wait3.c new file mode 100644 index 0000000000..0e37f80d5d --- /dev/null +++ b/sysdeps/unix/sysv/aix/wait3.c @@ -0,0 +1,42 @@ +/* Copyright (C) 1992, 93, 1995-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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include +#include + +extern pid_t kwaitpid (int *stat_loc, pid_t pid, int options, + struct rusage *ru_loc, siginfo_t *infop); + +/* Wait for a child to exit. When one does, put its status in *STAT_LOC and + return its process ID. For errors return (pid_t) -1. If USAGE is not nil, + store information about the child's resource usage (as a `struct rusage') + there. If the WUNTRACED bit is set in OPTIONS, return status for stopped + children; otherwise don't. */ +pid_t +__wait3 (__WAIT_STATUS stat_loc, int options, struct rusage *usage) +{ + if (usage != NULL) + { + __set_errno (ENOSYS); + return (pid_t) -1; + } + return kwaitpid (stat_loc.__iptr, WAIT_ANY, options, usage, NULL); +} +strong_alias (__wait3, wait3) From 7dbc4841f49a93b2d01ce51d7a8ca79f043994e1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:23:00 +0000 Subject: [PATCH 1921/4487] AIX implementation of wait4. --- sysdeps/unix/sysv/aix/wait4.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/wait4.c diff --git a/sysdeps/unix/sysv/aix/wait4.c b/sysdeps/unix/sysv/aix/wait4.c new file mode 100644 index 0000000000..1a5f58f8d1 --- /dev/null +++ b/sysdeps/unix/sysv/aix/wait4.c @@ -0,0 +1,33 @@ +/* Copyright (C) 1991, 1992, 1995-1997, 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include +#include + +extern pid_t kwaitpid (int *stat_loc, pid_t pid, int options, + struct rusage *ru_loc, siginfo_t *infop); + +pid_t +__wait4 (__pid_t pid, __WAIT_STATUS stat_loc, int options, + struct rusage *usage) +{ + return kwaitpid (stat_loc.__iptr, pid, options, usage, NULL); +} +strong_alias (__wait4, wait4) From 3d0f99ef86517ddba0e011412edd78bbf89148f5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:23:06 +0000 Subject: [PATCH 1922/4487] AIX implementation of waitid. --- sysdeps/unix/sysv/aix/waitid.c | 82 ++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/waitid.c diff --git a/sysdeps/unix/sysv/aix/waitid.c b/sysdeps/unix/sysv/aix/waitid.c new file mode 100644 index 0000000000..a1fcae0059 --- /dev/null +++ b/sysdeps/unix/sysv/aix/waitid.c @@ -0,0 +1,82 @@ +/* Pseudo implementation of waitid. + Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Zack Weinberg , 1997. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#define __need_NULL +#include +#include +#include + +#include + +extern pid_t kwaitpid (int *stat_loc, pid_t pid, int options, + struct rusage *ru_loc, siginfo_t *infop); + +int +waitid (idtype, id, infop, options) + idtype_t idtype; + id_t id; + siginfo_t *infop; + int options; +{ + pid_t pid, child; + int status; + + switch (idtype) + { + case P_PID: + if(id <= 0) + goto invalid; + pid = (pid_t) id; + break; + case P_PGID: + if (id < 0 || id == 1) + goto invalid; + pid = (pid_t) -id; + break; + case P_ALL: + pid = -1; + break; + default: + invalid: + __set_errno (EINVAL); + return -1; + } + + /* Technically we're supposed to return EFAULT if infop is bogus, + but that would involve mucking with signals, which is + too much hassle. User will have to deal with SIGSEGV/SIGBUS. + We just check for a null pointer. */ + + if (infop == NULL) + { + __set_errno (EFAULT); + return -1; + } + + child = kwaitpid (&status, pid, options, NULL, infop); + + if (child == -1) + /* `waitpid' set `errno' for us. */ + return -1; + + return 0; +} From b4e2aeb15d14c1b5979fb026cb66a7b4d64f2ab8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:23:10 +0000 Subject: [PATCH 1923/4487] AIX implementation of waitpid. --- sysdeps/unix/sysv/aix/waitpid.c | 52 +++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/waitpid.c diff --git a/sysdeps/unix/sysv/aix/waitpid.c b/sysdeps/unix/sysv/aix/waitpid.c new file mode 100644 index 0000000000..10befc39be --- /dev/null +++ b/sysdeps/unix/sysv/aix/waitpid.c @@ -0,0 +1,52 @@ +/* Copyright (C) 1991, 1995, 1996, 1997, 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include +#include + +extern pid_t kwaitpid (int *stat_loc, pid_t pid, int options, + struct rusage *ru_loc, siginfo_t *infop); + + +/* Wait for a child matching PID to die. + If PID is greater than 0, match any process whose process ID is PID. + If PID is (pid_t) -1, match any process. + If PID is (pid_t) 0, match any process with the + same process group as the current process. + If PID is less than -1, match any process whose + process group is the absolute value of PID. + If the WNOHANG bit is set in OPTIONS, and that child + is not already dead, return (pid_t) 0. If successful, + return PID and store the dead child's status in STAT_LOC. + Return (pid_t) -1 for errors. If the WUNTRACED bit is set in OPTIONS, + return status for stopped children; otherwise don't. */ +pid_t +__libc_waitpid (pid_t pid, int *stat_loc, int options) +{ + if ((options & ~(WNOHANG|WUNTRACED)) != 0) + { + __set_errno (EINVAL); + return (pid_t) -1; + } + + return kwaitpid (stat_loc, pid, options, NULL, NULL); +} +weak_alias (__libc_waitpid, __waitpid) +weak_alias (__libc_waitpid, waitpid) From aa630daa0085cef1f33c834cb0f1a57558d289ce Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:23:16 +0000 Subject: [PATCH 1924/4487] AIX implementation of write. --- sysdeps/unix/sysv/aix/write.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/write.c diff --git a/sysdeps/unix/sysv/aix/write.c b/sysdeps/unix/sysv/aix/write.c new file mode 100644 index 0000000000..6a43fb1290 --- /dev/null +++ b/sysdeps/unix/sysv/aix/write.c @@ -0,0 +1,34 @@ +/* Copyright (C) 1999 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +#include "kernel_proto.h" + + +ssize_t +__write (fd, ptr, n) + int fd; + const void *ptr; + size_t n; +{ + return kwrite (fd, ptr, n); +} +/* AIX has no weak aliases (yet) but let's hope for better times. */ +weak_alias (__write, write) From b4fd7284f50eaff1dd3489454f75a169bd363a58 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:23:20 +0000 Subject: [PATCH 1925/4487] AIX implementation of writev. --- sysdeps/unix/sysv/aix/writev.c | 37 ++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/writev.c diff --git a/sysdeps/unix/sysv/aix/writev.c b/sysdeps/unix/sysv/aix/writev.c new file mode 100644 index 0000000000..a8f9cf55b4 --- /dev/null +++ b/sysdeps/unix/sysv/aix/writev.c @@ -0,0 +1,37 @@ +/* Copyright (C) 1991, 1995-1998, 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +extern ssize_t kwritev (int fd, const struct iovec *iovp, size_t iovcnt, + long int ext); + +/* Read data from file descriptor FD, and put the result in the + buffers described by VECTOR, which is a vector of COUNT `struct iovec's. + The buffers are filled in the order specified. + Operates just like `read' (see ) except that data are + put in VECTOR instead of a contiguous buffer. */ +ssize_t +__writev (fd, vector, count) + int fd; + const struct iovec *vector; + int count; +{ + return kwritev (fd, vector, count, 0); +} +strong_alias (__writev, writev) From 91f6208ff1fd00f3e3341c8d2a9256b56d842a87 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:23:30 +0000 Subject: [PATCH 1926/4487] AIX implementation of __xstat. --- sysdeps/unix/sysv/aix/xstat.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/xstat.c diff --git a/sysdeps/unix/sysv/aix/xstat.c b/sysdeps/unix/sysv/aix/xstat.c new file mode 100644 index 0000000000..e053ce7f11 --- /dev/null +++ b/sysdeps/unix/sysv/aix/xstat.c @@ -0,0 +1,33 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +/* this is #define'd in why #define it here? +#define STX_NORMAL 0x00 + */ + +extern int statx (const char *pathname, struct stat *st, int len, int cmd); + +int +__xstat (int ver, const char *pathname, struct stat *st) +{ + assert (ver == 0); + return statx (pathname, st, sizeof (*st), STX_NORMAL); +} From 7c936702f16b54e9a109533d72c21e263065aa7a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:23:34 +0000 Subject: [PATCH 1927/4487] AIX implementation of __xstat64. --- sysdeps/unix/sysv/aix/xstat64.c | 34 +++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/xstat64.c diff --git a/sysdeps/unix/sysv/aix/xstat64.c b/sysdeps/unix/sysv/aix/xstat64.c new file mode 100644 index 0000000000..07a62fd065 --- /dev/null +++ b/sysdeps/unix/sysv/aix/xstat64.c @@ -0,0 +1,34 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +/* these are #define'd in , why #define them here? +#define STX_NORMAL 0x00 +#define STX_64 0x08 + */ + +extern int statx (const char *pathname, struct stat64 *st, int len, int cmd); + +int +__xstat64 (int ver, const char *pathname, struct stat64 *st) +{ + assert (ver == 0); + return statx (pathname, st, sizeof (*st), STX_NORMAL | STX_64); +} From ac70e97249c11f3fcd9b399dff32d67dedfb38ec Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:24:44 +0000 Subject: [PATCH 1928/4487] AIX definitions for dirent.h. --- sysdeps/unix/sysv/aix/bits/dirent.h | 55 +++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/bits/dirent.h diff --git a/sysdeps/unix/sysv/aix/bits/dirent.h b/sysdeps/unix/sysv/aix/bits/dirent.h new file mode 100644 index 0000000000..48fb1b220f --- /dev/null +++ b/sysdeps/unix/sysv/aix/bits/dirent.h @@ -0,0 +1,55 @@ +/* Directory entry structure `struct dirent'. Old System V version. + Copyright (C) 1996, 1997, 1999 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _DIRENT_H +# error "Never use directly; include instead." +#endif + +struct dirent + { +#ifndef __USE_FILE_OFFSET64 + __off_t d_off; + __ino_t d_ino; +#else + __off64_t d_off; + __ino64_t d_ino; +#endif + unsigned short int d_reclen; + unsigned short int d_namlen; + char d_name[256]; + }; + +#ifdef __USE_LARGEFILE64 +struct dirent64 + { + __off64_t d_off; + __ino64_t d_ino; + unsigned short int d_reclen; + unsigned short int d_namlen; + char d_name[256]; + }; +#endif + +#define d_fileno d_ino /* Backwards compatibility. */ +#define d_offset d_off + +#define _DIRENT_HAVE_D_NAMLEN +#define _DIRENT_HAVE_D_RECLEN +#define _DIRENT_HAVE_D_OFF +#undef _DIRENT_HAVE_D_TYPE From bea5d51e0f0015cdbd3bdaaec7a1ea326e4206eb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:24:49 +0000 Subject: [PATCH 1929/4487] AIX definitions for dlfcn.h. --- sysdeps/unix/sysv/aix/bits/dlfcn.h | 47 ++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/bits/dlfcn.h diff --git a/sysdeps/unix/sysv/aix/bits/dlfcn.h b/sysdeps/unix/sysv/aix/bits/dlfcn.h new file mode 100644 index 0000000000..e67c9a8c7c --- /dev/null +++ b/sysdeps/unix/sysv/aix/bits/dlfcn.h @@ -0,0 +1,47 @@ +/* AIX dependent definitions for run-time dynamic loading. + Copyright (C) 1996, 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _DLFCN_H +# error "Never use directly; include instead." +#endif + +/* The MODE argument to `dlopen' contains one of the following: */ +#define RTLD_LAZY 0x004 /* Lazy function call binding. */ +#define RTLD_NOW 0x002 /* Immediate function call binding. */ +#define RTLD_BINDING_MASK 0x6 /* Mask of binding time value. */ + +/* If the following bit is set in the MODE argument to `dlopen', + the symbols of the loaded object and its dependencies are made + visible as if the object were linked directly into the program. */ +#define RTLD_GLOBAL 0x10000 + +/* Unix98 demands the following flag which is the inverse to RTLD_GLOBAL. + The implementation does this by default and so we can define the + value to zero. */ +#define RTLD_LOCAL 0x800000 + +#ifdef __USE_GNU +/* These are extensions of the AIX kernel. */ +# define RTLD_NOAUTODEFER 0x020000 +# define RTLD_MEMBER 0x040000 +# define RTLD_UNIX_LATEST 0x100000 +#endif + +/* No support to profile shared libraries available. */ +# define DL_CALL_FCT(fctp, args) fctp args From 930b47a5db5f928c1564384276f65663ade9bb5d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:24:55 +0000 Subject: [PATCH 1930/4487] AIX definitions for endian.h. --- sysdeps/unix/sysv/aix/bits/endian.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/bits/endian.h diff --git a/sysdeps/unix/sysv/aix/bits/endian.h b/sysdeps/unix/sysv/aix/bits/endian.h new file mode 100644 index 0000000000..a86de7e502 --- /dev/null +++ b/sysdeps/unix/sysv/aix/bits/endian.h @@ -0,0 +1,23 @@ +/* Copyright (C) 1997, 1998, 1999 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _ENDIAN_H +# error "Never use directly; include instead." +#endif + +#define __BYTE_ORDER __BIG_ENDIAN From 324c77e383a952675832857557c7b811657f1fca Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:25:02 +0000 Subject: [PATCH 1931/4487] AIX definitions for errno.h. --- sysdeps/unix/sysv/aix/bits/errno.h | 155 +++++++++++++++++++++++++++++ 1 file changed, 155 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/bits/errno.h diff --git a/sysdeps/unix/sysv/aix/bits/errno.h b/sysdeps/unix/sysv/aix/bits/errno.h new file mode 100644 index 0000000000..37800c3874 --- /dev/null +++ b/sysdeps/unix/sysv/aix/bits/errno.h @@ -0,0 +1,155 @@ +/* Copyright (C) 1999 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* This file defines the `errno' constants. */ + +#if !defined __Emath_defined && (defined _ERRNO_H || defined __need_Emath) +#undef __need_Emath +#define __Emath_defined 1 + +#endif + +#ifdef _ERRNO_H +# undef EDOM +# undef EILSEQ +# undef ERANGE + +# define EPERM 1 /* Operation not permitted. */ +# define ENOENT 2 /* No such file or directory. */ +# define ESRCH 3 /* No such process. */ +# define EINTR 4 /* interrupted system call. */ +# define EIO 5 /* I/O error. */ +# define ENXIO 6 /* No such device or address. */ +# define E2BIG 7 /* Arg list too long. */ +# define ENOEXEC 8 /* Exec format error. */ +# define EBADF 9 /* Bad file descriptor. */ +# define ECHILD 10 /* No child processes. */ +# define EAGAIN 11 /* Resource temporarily unavailable. */ +# define ENOMEM 12 /* Not enough space. */ +# define EACCES 13 /* Permission denied. */ +# define EFAULT 14 /* Bad address. */ +# define ENOTBLK 15 /* Block device required. */ +# define EBUSY 16 /* Resource busy. */ +# define EEXIST 17 /* File exists. */ +# define EXDEV 18 /* Improper link. */ +# define ENODEV 19 /* No such device. */ +# define ENOTDIR 20 /* Not a directory. */ +# define EISDIR 21 /* Is a directory. */ +# define EINVAL 22 /* Invalid argument. */ +# define ENFILE 23 /* Too many open files in system. */ +# define EMFILE 24 /* Too many open files. */ +# define ENOTTY 25 /* Inappropriate I/O control operation. */ +# define ETXTBSY 26 /* Text file busy. */ +# define EFBIG 27 /* File too large. */ +# define ENOSPC 28 /* No space left on device. */ +# define ESPIPE 29 /* Invalid seek. */ +# define EROFS 30 /* Read only file system. */ +# define EMLINK 31 /* Too many links. */ +# define EPIPE 32 /* Broken pipe. */ +# define EDOM 33 /* Domain error within math function. */ +# define ERANGE 34 /* Result too large. */ +# define ENOMSG 35 /* No message of desired type. */ +# define EIDRM 36 /* Identifier removed. */ +# define ECHRNG 37 /* Channel number out of range. */ +# define EL2NSYNC 38 /* Level 2 not synchronized. */ +# define EL3HLT 39 /* Level 3 halted. */ +# define EL3RST 40 /* Level 3 reset. */ +# define ELNRNG 41 /* Link number out of range. */ +# define EUNATCH 42 /* Protocol driver not attached. */ +# define ENOCSI 43 /* No CSI structure available. */ +# define EL2HLT 44 /* Level 2 halted. */ +# define EDEADLK 45 /* Resource deadlock avoided. */ +# define ENOTREADY 46 /* Device not ready. */ +# define EWRPROTECT 47 /* Write-protected media. */ +# define EFORMAT 48 /* Unformatted media. */ +# define ENOLCK 49 /* No locks available. */ +# define ENOCONNECT 50 /* No connection. */ +# define ESTALE 52 /* No filesystem. */ +# define EDIST 53 /* Old, currently unused AIX errno. */ +# if __USE_XOPEN_EXTENDED +# define EWOULDBLOCK EAGAIN /* Operation would block. */ +# else /* __USE_XOPEN_EXTENDED */ +# define EWOULDBLOCK 54 +# endif /* __USE_XOPEN_EXTENDED */ +# define EINPROGRESS 55 /* Operation now in progress. */ +# define EALREADY 56 /* Operation already in progress. */ +# define ENOTSOCK 57 /* Socket operation on non-socket. */ +# define EDESTADDRREQ 58 /* Destination address required. */ +# define EDESTADDREQ EDESTADDRREQ /* Destination address required. */ +# define EMSGSIZE 59 /* Message too long. */ +# define EPROTOTYPE 60 /* Protocol wrong type for socket. */ +# define ENOPROTOOPT 61 /* Protocol not available. */ +# define EPROTONOSUPPORT 62 /* Protocol not supported. */ +# define ESOCKTNOSUPPORT 63 /* Socket type not supported. */ +# define EOPNOTSUPP 64 /* Operation not supported on socket. */ +# define EPFNOSUPPORT 65 /* Protocol family not supported. */ +# define EADDRINUSE 67 /* Address already in use. */ +# define EADDRNOTAVAIL 68 /* Can't assign requested address. */ +# define ENETDOWN 69 /* Network is down. */ +# define ENETUNREACH 70 /* Network is unreachable. */ +# define ENETRESET 71 /* Network dropped connection on reset. */ +# define ECONNABORTED 72 /* Software caused connection abort. */ +# define ECONNRESET 73 /* Connection reset by peer. */ +# define ENOBUFS 74 /* No buffer space available. */ +# define EISCONN 75 /* Socket is already connected. */ +# define ENOTCONN 76 /* Socket is not connected. */ +# define ESHUTDOWN 77 /* Can't send after socket shutdown. */ +# define ETIMEDOUT 78 /* Connection timed out. */ +# define ECONNREFUSED 79 /* Connection refused. */ +# define EHOSTDOWN 80 /* Host is down. */ +# define EHOSTUNREACH 81 /* No route to host. */ +# define ERESTART 82 /* Restart the system call. */ +# define EPROCLIM 83 /* Too many processes. */ +# define EUSERS 84 /* Too many users. */ +# define ELOOP 85 /* Too many levels of symbolic links. */ +# define ENAMETOOLONG 86 /* File name too long. */ +# define ENOTEMPTY EEXIST /* Directory not empty. */ +# define EDQUOT 88 /* Disc quota exceeded. */ +# define ECORRUPT 89 /* Invalid file system control data. */ +# define EREMOTE 93 /* Item is not local to host. */ +# define ENOSYS 109 /* Function not implemented POSIX. */ +# define EMEDIA 110 /* Media surface error. */ +# define ESOFT 111 /* I/O completed, but needs relocation. */ +# define ENOATTR 112 /* No attribute found. */ +# define ESAD 113 /* Security authentication denied. */ +# define ENOTRUST 114 /* Not a trusted program. */ +# define ETOOMANYREFS 115 /* Too many references: can't splice. */ +# define EILSEQ 116 /* Invalid wide character. */ +# define ECANCELED 117 /* Asynchronous i/o cancelled. */ +# define ENOSR 118 /* Temp out of streams resources. */ +# define ETIME 119 /* I_STR ioctl timed out. */ +# define EBADMSG 120 /* Wrong message type at stream head. */ +# define EPROTO 121 /* STREAMS protocol error. */ +# define ENODATA 122 /* No message ready at stream head. */ +# define ENOSTR 123 /* Fd is not a stream. */ +# define ECLONEME ERESTART /* This is the way we clone a stream. */ +# define ENOTSUP 124 /* POSIX threads unsupported value. */ +# define EMULTIHOP 125 /* Multihop is not allowed. */ +# define ENOLINK 126 /* The link has been severed. */ +# define EOVERFLOW 127 /* Value too large to be stored in data type.*/ + +# ifdef _LIBC +# define __set_errno(val) errno = (val) +# endif +#endif + +#if !defined _ERRNO_H && defined __need_Emath +# define EDOM 33 /* Math argument out of domain of function. */ +# define EILSEQ 116 /* Illegal byte sequence. */ +# define ERANGE 34 /* Math result not representable. */ +#endif /* !_ERRNO_H && __need_Emath */ From 379357d9908bb30714fc05cab2e204dbd9b961d4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:25:11 +0000 Subject: [PATCH 1932/4487] AIX definitions for fcntl.h. --- sysdeps/unix/sysv/aix/bits/fcntl.h | 137 +++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/bits/fcntl.h diff --git a/sysdeps/unix/sysv/aix/bits/fcntl.h b/sysdeps/unix/sysv/aix/bits/fcntl.h new file mode 100644 index 0000000000..039a604b19 --- /dev/null +++ b/sysdeps/unix/sysv/aix/bits/fcntl.h @@ -0,0 +1,137 @@ +/* O_*, F_*, FD_* bit values for Linux. + Copyright (C) 1995, 1996, 1997, 1998, 1999 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _FCNTL_H +# error "Never use directly; include instead." +#endif + + +#include + +/* open/fcntl. */ +#define O_ACCMODE 0003 +#define O_RDONLY 00 +#define O_WRONLY 01 +#define O_RDWR 02 +#define O_NONBLOCK 04 +#define O_NDELAY O_NONBLOCK +#define O_APPEND 010 +#define O_SYNC 020 +#define O_FSYNC O_SYNC +#define O_CREAT 0400 /* not fcntl */ +#define O_TRUNC 01000 /* not fcntl */ +#define O_EXCL 02000 /* not fcntl */ +#define O_NOCTTY 04000 /* not fcntl */ +#define O_ASYNC 0400000 + +#ifdef __USE_LARGEFILE64 +# define O_LARGEFILE 0400000000 +#endif + +/* For now Linux has synchronisity options for data and read operations. + We define the symbols here but let them do the same as O_SYNC since + this is a superset. */ +#if defined __USE_POSIX199309 || defined __USE_UNIX98 +# define O_DSYNC 020000000 /* Synchronize data. */ +# define O_RSYNC 010000000 /* Synchronize read operations. */ +#endif + +/* Values for the second argument to `fcntl'. */ +#define F_DUPFD 0 /* Duplicate file descriptor. */ +#define F_GETFD 1 /* Get file descriptor flags. */ +#define F_SETFD 2 /* Set file descriptor flags. */ +#define F_GETFL 3 /* Get file status flags. */ +#define F_SETFL 4 /* Set file status flags. */ +#ifndef __USE_FILE_OFFSET64 +# define F_GETLK 5 /* Get record locking info. */ +# define F_SETLK 6 /* Set record locking info (non-blocking). */ +# define F_SETLKW 7 /* Set record locking info (blocking). */ +#else +# define F_GETLK 11 /* Get record locking info. */ +# define F_SETLK 12 /* Set record locking info (non-blocking). */ +# define F_SETLKW 13 /* Set record locking info (blocking). */ +#endif + +#ifdef __USE_LARGEFILE64 +# define F_GETLK64 11 /* Get record locking info. */ +# define F_SETLK64 12 /* Set record locking info (non-blocking). */ +# define F_SETLKW64 13 /* Set record locking info (blocking). */ +#endif + +#ifdef __USE_BSD +# define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */ +# define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */ +#endif + +/* For F_[GET|SET]FL. */ +#define FD_CLOEXEC 1 /* actually anything with low bit set goes */ + +/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */ +#define F_RDLCK 1 /* Read lock. */ +#define F_WRLCK 2 /* Write lock. */ +#define F_UNLCK 3 /* Remove lock. */ + +#ifdef __USE_BSD +/* Operations for bsd flock(), also used by the kernel implementation */ +# define LOCK_SH 1 /* shared lock */ +# define LOCK_EX 2 /* exclusive lock */ +# define LOCK_NB 4 /* or'd with one of the above to prevent + blocking */ +# define LOCK_UN 8 /* remove lock */ +#endif + +struct flock + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ +#ifndef __USE_FILE_OFFSET64 + __off_t l_start; /* Offset where the lock begins. */ + __off_t l_len; /* Size of the locked area; zero means until EOF. */ +#endif + unsigned int l_sysid; + __pid_t l_pid; /* Process holding the lock. */ + int l_vfs; +#ifdef __USE_FILE_OFFSET64 + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ +#endif + }; + +#ifdef __USE_LARGEFILE64 +struct flock64 + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ + unsigned int l_sysid; + __pid_t l_pid; /* Process holding the lock. */ + int l_vfs; + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ + }; +#endif + +/* Define some more compatibility macros to be backward compatible with + BSD systems which did not managed to hide these kernel macros. */ +#ifdef __USE_BSD +# define FAPPEND O_APPEND +# define FFSYNC O_FSYNC +# define FASYNC O_ASYNC +# define FNONBLOCK O_NONBLOCK +# define FNDELAY O_NDELAY +#endif /* Use BSD. */ From fa312c40817027a66a5592ab1f6f73ad7a1eda98 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:25:18 +0000 Subject: [PATCH 1933/4487] AIX definitions for resource.h. --- sysdeps/unix/sysv/aix/bits/resource.h | 191 ++++++++++++++++++++++++++ 1 file changed, 191 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/bits/resource.h diff --git a/sysdeps/unix/sysv/aix/bits/resource.h b/sysdeps/unix/sysv/aix/bits/resource.h new file mode 100644 index 0000000000..823a5f0659 --- /dev/null +++ b/sysdeps/unix/sysv/aix/bits/resource.h @@ -0,0 +1,191 @@ +/* Bit values & structures for resource limits. AIX version. + Copyright (C) 1994, 1996-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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_RESOURCE_H +# error "Never use directly; include instead." +#endif + +#include + +/* Transmute defines to enumerations. The macro re-definitions are + necessary because some programs want to test for operating system + features with #ifdef RUSAGE_SELF. In ISO C the reflexive + definition is a no-op. */ + +/* Kinds of resource limit. */ +enum __rlimit_resource +{ + /* Per-process CPU limit, in seconds. */ + RLIMIT_CPU = 0, +#define RLIMIT_CPU RLIMIT_CPU + + /* Largest file that can be created, in bytes. */ + RLIMIT_FSIZE = 1, +#define RLIMIT_FSIZE RLIMIT_FSIZE + + /* Maximum size of data segment, in bytes. */ + RLIMIT_DATA = 2, +#define RLIMIT_DATA RLIMIT_DATA + + /* Maximum size of stack segment, in bytes. */ + RLIMIT_STACK = 3, +#define RLIMIT_STACK RLIMIT_STACK + + /* Largest core file that can be created, in bytes. */ + RLIMIT_CORE = 4, +#define RLIMIT_CORE RLIMIT_CORE + + /* Largest resident set size, in bytes. + This affects swapping; processes that are exceeding their + resident set size will be more likely to have physical memory + taken from them. */ + RLIMIT_RSS = 5, +#define RLIMIT_RSS RLIMIT_RSS + + /* Address space limit (?) */ + RLIMIT_AS = 6, +#define RLIMIT_AS RLIMIT_AS + + /* Number of open files. */ + RLIMIT_NOFILE = 7, + RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */ +#define RLIMIT_NOFILE RLIMIT_NOFILE +#define RLIMIT_OFILE RLIMIT_OFILE + + RLIM_NLIMITS = 10 +#define RLIMIT_NLIMITS RLIMIT_NLIMITS +#define RLIM_NLIMITS RLIM_NLIMITS +}; + +/* Value to indicate that there is no limit. */ +#ifndef __USE_FILE_OFFSET64 +# define RLIM_INFINITY ((long int)(~0UL >> 1)) +#else +# define RLIM_INFINITY 0x7fffffffffffffffLL +#endif + +#ifdef __USE_LARGEFILE64 +# define RLIM64_INFINITY 0x7fffffffffffffffLL +#endif + +#define RLIM_SAVED_MAX (RLIM_INFINITY - 1) +#define RLIM_SAVED_CUR (RLIM_INFINITY - 2) + + +/* Type for resource quantity measurement. */ +#ifndef __USE_FILE_OFFSET64 +typedef __rlim_t rlim_t; +#else +typedef __rlim64_t rlim_t; +#endif +#ifdef __USE_LARGEFILE64 +typedef __rlim64_t rlim64_t; +#endif + +struct rlimit + { + /* The current (soft) limit. */ + rlim_t rlim_cur; + /* The hard limit. */ + rlim_t rlim_max; + }; + +#ifdef __USE_LARGEFILE64 +struct rlimit64 + { + /* The current (soft) limit. */ + rlim64_t rlim_cur; + /* The hard limit. */ + rlim64_t rlim_max; + }; +#endif + +/* Whose usage statistics do you want? */ +enum __rusage_who +{ + /* The calling process. */ + RUSAGE_SELF = 0, +#define RUSAGE_SELF RUSAGE_SELF + + /* All of its terminated child processes. */ + RUSAGE_CHILDREN = -1 +#define RUSAGE_CHILDREN RUSAGE_CHILDREN +}; + +#define __need_timeval +#include /* For `struct timeval'. */ + +/* Structure which says how much of each resource has been used. */ +struct rusage + { + /* Total amount of user time used. */ + struct timeval ru_utime; + /* Total amount of system time used. */ + struct timeval ru_stime; + /* Maximum resident set size (in kilobytes). */ + long int ru_maxrss; + /* Amount of sharing of text segment memory + with other processes (kilobyte-seconds). */ + long int ru_ixrss; + /* Amount of data segment memory used (kilobyte-seconds). */ + long int ru_idrss; + /* Amount of stack memory used (kilobyte-seconds). */ + long int ru_isrss; + /* Number of soft page faults (i.e. those serviced by reclaiming + a page from the list of pages awaiting reallocation. */ + long int ru_minflt; + /* Number of hard page faults (i.e. those that required I/O). */ + long int ru_majflt; + /* Number of times a process was swapped out of physical memory. */ + long int ru_nswap; + /* Number of input operations via the file system. Note: This + and `ru_oublock' do not include operations with the cache. */ + long int ru_inblock; + /* Number of output operations via the file system. */ + long int ru_oublock; + /* Number of IPC messages sent. */ + long int ru_msgsnd; + /* Number of IPC messages received. */ + long int ru_msgrcv; + /* Number of signals delivered. */ + long int ru_nsignals; + /* Number of voluntary context switches, i.e. because the process + gave up the process before it had to (usually to wait for some + resource to be available). */ + long int ru_nvcsw; + /* Number of involuntary context switches, i.e. a higher priority process + became runnable or the current process used up its time slice. */ + long int ru_nivcsw; + }; + +/* Priority limits. */ +#define PRIO_MIN -20 /* Minimum priority a process can have. */ +#define PRIO_MAX 20 /* Maximum priority a process can have. */ + +/* The type of the WHICH argument to `getpriority' and `setpriority', + indicating what flavor of entity the WHO argument specifies. */ +enum __priority_which +{ + PRIO_PROCESS = 0, /* WHO is a process ID. */ +#define PRIO_PROCESS PRIO_PROCESS + PRIO_PGRP = 1, /* WHO is a process group ID. */ +#define PRIO_PGRP PRIO_PGRP + PRIO_USER = 2 /* WHO is a user ID. */ +#define PRIO_USER PRIO_USER +}; From 6b4c331660b7e1ec846b9ebb5af4137e5b97c38d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:25:30 +0000 Subject: [PATCH 1934/4487] AIX definitions for setjmp.h. --- sysdeps/unix/sysv/aix/bits/setjmp.h | 46 +++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/bits/setjmp.h diff --git a/sysdeps/unix/sysv/aix/bits/setjmp.h b/sysdeps/unix/sysv/aix/bits/setjmp.h new file mode 100644 index 0000000000..675ed62e3f --- /dev/null +++ b/sysdeps/unix/sysv/aix/bits/setjmp.h @@ -0,0 +1,46 @@ +/* Copyright (C) 1997, 1998, 1999 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* Define the machine-dependent type `jmp_buf'. PowerPC version. */ + +#ifndef _SETJMP_H +# error "Never include directly; use instead." +#endif + +/* The previous bits/setjmp.h had __jmp_buf defined as a structure. + We use an array of 'long int' instead, to make writing the + assembler easier. Naturally, user code should not depend on + either representation. */ + +#if defined __USE_MISC || defined _ASM +# define JB_GPR1 0 /* Also known as the stack pointer */ +# define JB_GPR2 1 +# define JB_LR 2 /* The address we will return to */ +# define JB_GPRS 3 /* GPRs 14 through 31 are saved, 18 in total */ +# define JB_CR 21 /* Condition code registers. */ +# define JB_FPRS 22 /* FPRs 14 through 31 are saved, 18*2 words total */ +#endif + +#ifndef _ASM +typedef long int __jmp_buf[64]; +#endif + +/* Test if longjmp to JMPBUF would unwind the frame + containing a local variable at ADDRESS. */ +#define _JMPBUF_UNWINDS(jmpbuf, address) \ + ((void *) (address) < (void *) (jmpbuf)[JB_GPR1]) From b1c2877714221a0cdd6df22dbe55b0ec13e3f40e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:25:38 +0000 Subject: [PATCH 1935/4487] AIX definitions for sigaction.h. --- sysdeps/unix/sysv/aix/bits/sigaction.h | 72 ++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/bits/sigaction.h diff --git a/sysdeps/unix/sysv/aix/bits/sigaction.h b/sysdeps/unix/sysv/aix/bits/sigaction.h new file mode 100644 index 0000000000..75c35e5b32 --- /dev/null +++ b/sysdeps/unix/sysv/aix/bits/sigaction.h @@ -0,0 +1,72 @@ +/* The proper definitions for AIX's sigaction. + Copyright (C) 1993-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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SIGNAL_H +# error "Never include directly; use instead." +#endif + +/* Structure describing the action to be taken when a signal arrives. */ +struct sigaction + { + /* Signal handler. */ +#ifdef __USE_POSIX199309 + union + { + /* Used if SA_SIGINFO is not set. */ + __sighandler_t sa_handler; + /* Used if SA_SIGINFO is set. */ + void (*sa_sigaction) (int, siginfo_t *, void *); + } + __sigaction_handler; +# define sa_handler __sigaction_handler.sa_handler +# define sa_sigaction __sigaction_handler.sa_sigaction +#else + __sighandler_t sa_handler; +#endif + + /* Additional set of signals to be blocked. */ + __sigset_t sa_mask; + + /* Special flags. */ + int sa_flags; + }; + +/* Bits in `sa_flags'. */ +#define SA_NOCLDSTOP 4 /* Don't send SIGCHLD when children stop. */ +#define SA_NOCLDWAIT 0x400 /* Don't create on death of child. */ +#define SA_SIGINFO 0x100 /* Invoke signal-catching function with + three arguments instead of one. */ +#if defined __USE_UNIX98 || defined __USE_MISC +# define SA_ONSTACK 0x00000001 /* Use signal stack by using `sa_restorer'. */ +# define SA_RESTART 0x00000008 /* Restart syscall on signal return. */ +# define SA_NODEFER 0x00000200 /* Don't automatically block the signal when + its handler is being executed. */ +# define SA_RESETHAND 0x00000002 /* Reset to SIG_DFL on entry to handler. */ +#endif +#ifdef __USE_MISC +/* Some aliases for the SA_ constants. */ +# define SA_NOMASK SA_NODEFER +# define SA_ONESHOT SA_RESETHAND +# define SA_STACK SA_ONSTACK +#endif + +/* Values for the HOW argument to `sigprocmask'. */ +#define SIG_BLOCK 0 /* Block signals. */ +#define SIG_UNBLOCK 1 /* Unblock signals. */ +#define SIG_SETMASK 2 /* Set the set of blocked signals. */ From 69f7887417670a7017253995e451712c142559a1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:25:47 +0000 Subject: [PATCH 1936/4487] AIX definitions for sigcontext.h. --- sysdeps/unix/sysv/aix/bits/sigcontext.h | 32 +++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/bits/sigcontext.h diff --git a/sysdeps/unix/sysv/aix/bits/sigcontext.h b/sysdeps/unix/sysv/aix/bits/sigcontext.h new file mode 100644 index 0000000000..86b3c24910 --- /dev/null +++ b/sysdeps/unix/sysv/aix/bits/sigcontext.h @@ -0,0 +1,32 @@ +/* Copyright (C) 1996, 1997, 1998, 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H +# error "Never use directly; include instead." +#endif + +#include + + +struct sigcontext +{ + int sc_onstack; /* Sigstack state to restore. */ + sigset_t sc_mask; /* Signal mask to restore. */ + int sc_uerror; /* u_error to restore. */ + struct mcontext_t sc_jmpbuf; /* Process context to restore. */ +}; From 37b4419e8209837b94d8900fea5ef35a2df078c6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:25:53 +0000 Subject: [PATCH 1937/4487] AIX definitions for signum.h. --- sysdeps/unix/sysv/aix/bits/signum.h | 96 +++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/bits/signum.h diff --git a/sysdeps/unix/sysv/aix/bits/signum.h b/sysdeps/unix/sysv/aix/bits/signum.h new file mode 100644 index 0000000000..b4397448b2 --- /dev/null +++ b/sysdeps/unix/sysv/aix/bits/signum.h @@ -0,0 +1,96 @@ +/* Signal number definitions. AIX version. + Copyright (C) 1995-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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifdef _SIGNAL_H + +/* Fake signal functions. */ +#define SIG_ERR ((__sighandler_t) -1) /* Error return. */ +#define SIG_DFL ((__sighandler_t) 0) /* Default action. */ +#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */ + +#ifdef __USE_UNIX98 +# define SIG_HOLD ((__sighandler_t) 2) /* Add signal to hold mask. */ +# define SIG_CATCHE ((__sighandler_t) 3) +#endif + + +/* Signals. */ +#define SIGHUP 1 /* Hangup (POSIX). */ +#define SIGINT 2 /* Interrupt (ANSI). */ +#define SIGQUIT 3 /* Quit (POSIX). */ +#define SIGILL 4 /* Illegal instruction (ANSI). */ +#define SIGTRAP 5 /* Trace trap (POSIX). */ +#define SIGABRT 6 /* Abort (ANSI). */ +#define SIGIOT SIGABRT /* Abort (terminal) process. */ +#define SIGEMT 7 /* EMT instruction. */ +#define SIGFPE 8 /* Floating-point exception (ANSI). */ +#define SIGKILL 9 /* Kill, unblockable (POSIX). */ +#define SIGBUS 10 /* BUS error (4.2 BSD). */ +#define SIGSEGV 11 /* Segmentation violation (ANSI). */ +#define SIGSYS 12 /* Bad system call. */ +#define SIGPIPE 13 /* Broken pipe (POSIX). */ +#define SIGALRM 14 /* Alarm clock (POSIX). */ +#define SIGTERM 15 /* Termination (ANSI). */ +#define SIGURG 16 /* Urgent condition on socket (4.2 BSD). */ +#define SIGIOINT SIGURG /* Printer to backend error signal. */ +#define SIGSTOP 17 /* Stop, unblockable (POSIX). */ +#define SIGTSTP 18 /* Keyboard stop (POSIX). */ +#define SIGCONT 19 /* Continue (POSIX). */ +#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */ +#define SIGCHLD 20 /* Child status has changed (POSIX). */ +#define SIGTTIN 21 /* Background read from tty (POSIX). */ +#define SIGTTOU 22 /* Background write to tty (POSIX). */ +#define SIGIO 23 /* I/O now possible (4.2 BSD). */ +#define SIGAIO SIGIO /* Base LAN I/O. */ +#define SIGPTY SIGIO /* PTY I/O. */ +#define SIGPOLL SIGIO /* ANother I/O event. */ +#define SIGXCPU 24 /* CPU limit exceeded (4.2 BSD). */ +#define SIGXFSZ 25 /* File size limit exceeded (4.2 BSD). */ +#define SIGMSG 27 /* Input data is in the ring buffer. */ +#define SIGWINCH 28 /* Window size change (4.3 BSD, Sun). */ +#define SIGPWR 29 /* Power failure restart (System V). */ +#define SIGUSR1 30 /* User-defined signal 1 (POSIX). */ +#define SIGUSR2 31 /* User-defined signal 2 (POSIX). */ +#define SIGPROF 32 /* Profiling alarm clock (4.2 BSD). */ +#define SIGDANGER 33 /* System crash imminent. */ +#define SIGVTALRM 34 /* Virtual alarm clock (4.2 BSD). */ +#define SIGMIGRATE 35 /* Migrate process. */ +#define SIGPRE 36 /* Programming exception. */ +#define SIGVIRT 37 /* AIX virtual time alarm. */ +#define SIGARLM1 38 /* Reserved, don't use. */ +#define SIGWAITING 39 /* Reserved, don't use. */ +#define SIGCPUFAIL 59 /* Predictive de-configuration of processors.*/ +#define SIGKAP 60 /* Keep alive poll from native keyboard. */ +#define SIGGRANT SIGKAP /* Monitor mode granted. */ +#define SIGRETRACT 61 /* Monitor mode should be relinguished. */ +#define SIGSOUND 62 /* Sound control has completed. */ +#define SIGSAK 63 /* Secure attentation key. */ + +#define _NSIG 64 /* Biggest signal number + 1 + (including real-time signals). */ + +#define SIGRTMIN (__libc_current_sigrtmin ()) +#define SIGRTMAX (__libc_current_sigrtmax ()) + +/* These are the hard limits of the kernel. These values should not be + used directly at user level. */ +#define __SIGRTMIN 888 +#define __SIGRTMAX 999 + +#endif /* included. */ From 657870667bc4a0fd5c3ff33af5229490b5c01a1f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:25:59 +0000 Subject: [PATCH 1938/4487] AIX definitions for sigset.h. --- sysdeps/unix/sysv/aix/bits/sigset.h | 125 ++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/bits/sigset.h diff --git a/sysdeps/unix/sysv/aix/bits/sigset.h b/sysdeps/unix/sysv/aix/bits/sigset.h new file mode 100644 index 0000000000..4735796259 --- /dev/null +++ b/sysdeps/unix/sysv/aix/bits/sigset.h @@ -0,0 +1,125 @@ +/* __sig_atomic_t, __sigset_t, and related definitions. AIX version. + Copyright (C) 1991,1992,1994,1996,1997,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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SIGSET_H_types +# define _SIGSET_H_types 1 + +typedef int __sig_atomic_t; + +/* A `sigset_t' has a bit for each signal. */ + +typedef struct + { + unsigned int __losigs; + unsigned int __hisigs; + } __sigset_t; + +#endif + + +/* We only want to define these functions if was actually + included; otherwise we were included just to define the types. Since we + are namespace-clean, it wouldn't hurt to define extra macros. But + trouble can be caused by functions being defined (e.g., any global + register vars declared later will cause compilation errors). */ + +#if !defined _SIGSET_H_fns && defined _SIGNAL_H +# define _SIGSET_H_fns 1 + +# ifndef _EXTERN_INLINE +# define _EXTERN_INLINE extern __inline +# endif + +/* Return a mask that includes the bit for SIG only. */ +# define __sigmask(sig) \ + (((unsigned long int) 1) << (((sig) - 1) % (8 * sizeof (unsigned int)))) + +# if defined __GNUC__ && __GNUC__ >= 2 +# define __sigemptyset(set) \ + (__extension__ ({ sigset_t *__set = (set); \ + __set->__losigs = __set->__hisigs = 0; \ + 0; })) +# define __sigfillset(set) \ + (__extension__ ({ sigset_t *__set = (set); \ + __set->__losigs = __set->__hisigs = ~0u; \ + 0; })) + +# ifdef __USE_GNU +/* The POSIX does not specify for handling the whole signal set in one + command. This is often wanted and so we define three more functions + here. */ +# define __sigisemptyset(set) \ + (__extension__ ({ const sigset_t *__set = (set); \ + (__set->__losigs | __set->__hisigs) == 0; })) +# define __sigandset(dest, left, right) \ + (__extension__ ({ sigset_t *__dest = (dest); \ + const sigset_t *__left = (left); \ + const sigset_t *__right = (right); \ + __dest->__losigs = __left->__losigs & __right->__losigs; \ + __dest->__hisigs = __left->__hisigs & __right->__hisigs; \ + 0; })) +# define __sigorset(dest, left, right) \ + (__extension__ ({ sigset_t *__dest = (dest); \ + const sigset_t *__left = (left); \ + const sigset_t *__right = (right); \ + __dest->__losigs = __left->__losigs | __right->__losigs; \ + __dest->__hisigs = __left->__hisigs | __right->__hisigs; \ + 0; })) +# endif +# endif + +/* These functions needn't check for a bogus signal number -- error + checking is done in the non __ versions. */ + +extern int __sigismember (__const __sigset_t *, int); +extern int __sigaddset (__sigset_t *, int); +extern int __sigdelset (__sigset_t *, int); + +# ifdef __USE_EXTERN_INLINES +_EXTERN_INLINE int +__sigismember (__const __sigset_t *__set, int __sig) +{ + unsigned int __mask = __sigmask (__sig); + + return ((__sig < 33 ? __set->__losigs : __set->__hisigs) & __mask ) ? 1 : 0; +} + +_EXTERN_INLINE int +__sigaddset (__sigset_t *__set, int __sig) +{ + unsigned int __mask = __sigmask (__sig); + + (__sig < 33 ? __set->__losigs : __set->__hisigs) |= __mask; + + return 0; +} + +_EXTERN_INLINE int +__sigdelset (__sigset_t *__set, int __sig) +{ + unsigned int __mask = __sigmask (__sig); + + (__sig < 33 ? __set->__losigs : __set->__hisigs) &= ~__mask; + + return 0; +} +# endif + + +#endif /* ! _SIGSET_H_fns. */ From f8b4a9e0773a24280d69a2a75209b48c2dd376e7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:26:06 +0000 Subject: [PATCH 1939/4487] AIX definitions for sigstack.h. --- sysdeps/unix/sysv/aix/bits/sigstack.h | 46 +++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/bits/sigstack.h diff --git a/sysdeps/unix/sysv/aix/bits/sigstack.h b/sysdeps/unix/sysv/aix/bits/sigstack.h new file mode 100644 index 0000000000..c229cc03f7 --- /dev/null +++ b/sysdeps/unix/sysv/aix/bits/sigstack.h @@ -0,0 +1,46 @@ +/* sigstack, sigaltstack definitions. + Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SIGNAL_H +# error "Never include this file directly. Use instead" +#endif + + +/* Structure describing a signal stack (obsolete). */ +struct sigstack + { + void *ss_sp; /* Signal stack pointer. */ + int ss_onstack; /* Nonzero if executing on this stack. */ + }; + + +/* Possible values for `ss_flags.'. */ +enum +{ + SS_ONSTACK = 1, +#define SS_ONSTACK SS_ONSTACK + SS_DISABLE +#define SS_DISABLE SS_DISABLE +}; + +/* Minimum stack size for a signal handler. */ +#define MINSIGSTKSZ 1024 + +/* System default stack size. */ +#define SIGSTKSZ 4096 From d451c6fa41d56823b80a429ebe573d9ff9d6c3f7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:26:12 +0000 Subject: [PATCH 1940/4487] AIX definitions for socket.h. --- sysdeps/unix/sysv/aix/bits/socket.h | 291 ++++++++++++++++++++++++++++ 1 file changed, 291 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/bits/socket.h diff --git a/sysdeps/unix/sysv/aix/bits/socket.h b/sysdeps/unix/sysv/aix/bits/socket.h new file mode 100644 index 0000000000..e89735453a --- /dev/null +++ b/sysdeps/unix/sysv/aix/bits/socket.h @@ -0,0 +1,291 @@ +/* System-specific socket constants and types. AIX version. + Copyright (C) 1991,92,94,95,96,97,98,99, 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef __BITS_SOCKET_H +#define __BITS_SOCKET_H + +#if !defined _SYS_SOCKET_H && !defined _NETINET_IN_H +# error "Never include directly; use instead." +#endif + +#define __need_size_t +#define __need_NULL +#include + +#include +#include + +/* Type for length arguments in socket calls. */ +typedef unsigned int socklen_t; + +/* Types of sockets. */ +enum __socket_type +{ + SOCK_STREAM = 1, /* Sequenced, reliable, connection-based + byte streams. */ +#define SOCK_STREAM SOCK_STREAM + SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams + of fixed maximum length. */ +#define SOCK_DGRAM SOCK_DGRAM + SOCK_RAW = 3, /* Raw protocol interface. */ +#define SOCK_RAW SOCK_RAW + SOCK_RDM = 4, /* Reliably-delivered messages. */ +#define SOCK_RDM SOCK_RDM + SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, + datagrams of fixed maximum length. */ +#define SOCK_SEQPACKET SOCK_SEQPACKET + SOCK_CONN_DGRAM = 6 /* Conneciton datagram. */ +#define SOCK_CONN_DGRAM SOCK_CONN_DGRAM +}; + +/* Protocol families. */ +#define PF_UNSPEC 0 /* Unspecified. */ +#define PF_LOCAL 1 /* Local to host (pipes and file-domain). */ +#define PF_UNIX PF_LOCAL /* Old BSD name for PF_LOCAL. */ +#define PF_FILE PF_LOCAL /* Another non-standard name for PF_LOCAL. */ +#define PF_INET 2 /* IP protocol family. */ +#define PF_IMPLINK 3 /* ARPAnet IMP addresses. */ +#define PF_PUP 4 /* PUP protocols (e.g., BSP). */ +#define PF_CHAOS 5 /* MIT CHAOS protocols. */ +#define PF_NS 6 /* XEROX NS protocols. */ +#define PF_ISO 7 /* ISO protocols. */ +#define PF_OSI PF_ISO +#define PF_ECMA 8 /* European Computer Manufacturers. */ +#define PF_DATAKIT 9 /* Datakit protocols. */ +#define PF_CCITT 10 /* CCITT protocols, X.25 etc. */ +#define PF_SNA 11 /* IBM SNA. */ +#define PF_DECnet 12 /* DECnet. */ +#define PF_DLI 13 /* DEC Direct data link interface. */ +#define PF_LAT 14 /* LAT. */ +#define PF_HYLINK 15 /* NSC Hyperchannel. */ +#define PF_APPLETALK 16 /* Apple Talk. */ +#define PF_NETLINK 17 /* Internet Routing Protocol. */ +#define PF_ROUTE PF_NETLINK /* Alias to emulate 4.4BSD. */ +#define PF_LINK 18 /* Link layer interface. */ +#define PF_XTP 19 /* eXpress Transfer Protocol (no AF). */ +#define PF_INTF 20 /* Debugging use only. */ +#define PF_RIF 21 /* Raw interface. */ +#define PF_NETWARE 22 +#define PF_NDD 23 +#define PF_INET6 24 /* IPv6. */ +#define PF_MAX 30 /* For now.. */ + +/* Address families. */ +#define AF_UNSPEC PF_UNSPEC +#define AF_LOCAL PF_LOCAL +#define AF_UNIX PF_UNIX +#define AF_FILE PF_FILE +#define AF_INET PF_INET +#define AF_IMPLINK PF_IMPLINK +#define AF_PUP PF_PUP +#define AF_CHAOS PF_CHAOS +#define AF_NS PF_NS +#define AF_ISO PF_ISO +#define AF_OSI PF_OSI +#define AF_ECMA PF_ECMA +#define AF_DATAKIT PF_DATAKIT +#define AF_CCITT PF_CCITT +#define AF_SNA PF_SNA +#define AF_DECnet PF_DECnet +#define AF_DLI PF_DLI +#define AF_LAT PF_LAT +#define AF_HYLINK PF_HYLINK +#define AF_APPLETALK PF_APPLETALK +#define AF_NETLINK PF_NETLINK +#define AF_ROUTE PF_ROUTE +#define AF_LINK PF_LINK +#define AF_INTF PF_INTF +#define AF_RIF PF_RIF +#define AF_NETWARE PF_NETWARE +#define AF_NDD PF_NDD +#define AF_INET6 PF_INET6 +#define AF_MAX PF_MAX + +/* Socket level values. Others are defined in the appropriate headers. + + XXX These definitions also should go into the appropriate headers as + far as they are available. */ +#define SOL_SOCKET 0xffff + +/* Maximum queue length specifiable by listen. */ +#define SOMAXCONN 1024 + +/* Get the definition of the macro to define the common sockaddr members. */ +#include + +/* Structure describing a generic socket address. */ +struct sockaddr + { + __SOCKADDR_COMMON (sa_); /* Common data: address family and length. */ + char sa_data[14]; /* Address data. */ + }; + + +/* Structure large enough to hold any socket address (with the historical + exception of AF_UNIX). We reserve 128 bytes. */ +#if ULONG_MAX > 0xffffffff +# define __ss_aligntype __uint64_t +#else +# define __ss_aligntype __uint32_t +#endif +#define _SS_SIZE 128 +#define _SS_PADSIZE (_SS_SIZE - (2 * sizeof (__ss_aligntype))) + +struct sockaddr_storage + { + __SOCKADDR_COMMON (__ss_); /* Address family, etc. */ + __ss_aligntype __ss_align; /* Force desired alignment. */ + char __ss_padding[_SS_PADSIZE]; + }; + + +/* Bits in the FLAGS argument to `send', `recv', et al. */ +enum + { + MSG_OOB = 0x01, /* Process out-of-band data. */ +#define MSG_OOB MSG_OOB + MSG_PEEK = 0x02, /* Peek at incoming messages. */ +#define MSG_PEEK MSG_PEEK + MSG_DONTROUTE = 0x04, /* Don't use local routing. */ +#define MSG_DONTROUTE MSG_DONTROUTE + MSG_EOR = 0x08, /* End of record. */ +#define MSG_EOR MSG_EOR + MSG_TRUNC = 0x10, +#define MSG_TRUNC MSG_TRUNC + MSG_CTRUNC = 0x20, /* Control data lost before delivery. */ +#define MSG_CTRUNC MSG_CTRUNC + MSG_WAITALL = 0x40, /* Wait for a full request. */ +#define MSG_WAITALL MSG_WAITALL + MSG_MPEG2 = 0x80, /* Message contain MPEG2 data. */ +#define MSG_MPEG2 MSG_MPEG2 + }; + + +/* Structure describing messages sent by + `sendmsg' and received by `recvmsg'. */ +struct msghdr + { + void *msg_name; /* Address to send to/receive from. */ + socklen_t msg_namelen; /* Length of address data. */ + + struct iovec *msg_iov; /* Vector of data to send/receive into. */ + int msg_iovlen; /* Number of elements in the vector. */ + + void *msg_control; /* Ancillary data (eg BSD filedesc passing). */ + socklen_t msg_controllen; /* Ancillary data buffer length. */ + + int msg_flags; /* Flags on received message. */ + }; + +/* Structure used for storage of ancillary data object information. */ +struct cmsghdr + { + socklen_t cmsg_len; /* Length of data in cmsg_data plus length + of cmsghdr structure. */ + int cmsg_level; /* Originating protocol. */ + int cmsg_type; /* Protocol specific type. */ +#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2 + unsigned char __cmsg_data[0]; /* Ancillary data. */ + /* XXX Perhaps this should be removed. */ +#endif + }; + +/* Ancillary data object manipulation macros. */ +#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2 +# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data) +#else +# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1)) +#endif +#define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg) +#define CMSG_FIRSTHDR(mhdr) \ + ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \ + ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL) +#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \ + & ~(sizeof (size_t) - 1)) +#define CMSG_SPACE(len) (CMSG_ALIGN (len) \ + + CMSG_ALIGN (sizeof (struct cmsghdr))) +#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len)) + +extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr, + struct cmsghdr *__cmsg) __THROW; +#ifdef __USE_EXTERN_INLINES +# ifndef _EXTERN_INLINE +# define _EXTERN_INLINE extern __inline +# endif +_EXTERN_INLINE struct cmsghdr * +__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW +{ + if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr)) + /* The kernel header does this so there may be a reason. */ + return 0; + + __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg + + CMSG_ALIGN (__cmsg->cmsg_len)); + if ((unsigned char *) (__cmsg + 1) >= ((unsigned char *) __mhdr->msg_control + + __mhdr->msg_controllen) + || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len) + >= ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen))) + /* No more entries. */ + return 0; + return __cmsg; +} +#endif /* Use `extern inline'. */ + +/* Socket level message types. This must match the definitions in + . */ +enum + { + SCM_RIGHTS = 0x01 /* Transfer file descriptors. */ +#define SCM_RIGHTS SCM_RIGHTS + }; + +/* Options flags per socket. */ +#define SO_DEBUG 0x0001 /* Turn on debugging info recording. */ +#define SO_ACCEPTCONN 0x0002 /* Socket has had listen(). */ +#define SO_REUSEADDR 0x0004 /* Allow local address reuse. */ +#define SO_KEEPALIVE 0x0008 /* Keep connections alive. */ +#define SO_DONTROUTE 0x0010 /* Just use interface addresses. */ +#define SO_BROADCAST 0x0020 /* Permit sending of broadcast msgs. */ +#define SO_USELOOPBACK 0x0040 /* Bypass hardware when possible. */ +#define SO_LINGER 0x0080 /* Linger on close if data present. */ +#define SO_OOBINLINE 0x0100 /* Leave received OOB data in line. */ +#define SO_REUSEPORT 0x0200 /* Allow local address & port reuse. */ +#define SO_USE_IFBUFS 0x0400 /* Interface will supply buffers. */ +#define SO_CKSUMRECV 0x0800 /* Defer checksum until receive. */ +#define SO_NOREUSEADDR 0x1000 /* Prevent local address reuse. */ +#define SO_SNDBUF 0x1001 /* Send buffer size. */ +#define SO_RCVBUF 0x1002 /* Receive buffer size. */ +#define SO_SNDLOWAT 0x1003 /* Send low-water mark. */ +#define SO_RCVLOWAT 0x1004 /* Receive low-water mark. */ +#define SO_SNDTIMEO 0x1005 /* Send timeout. */ +#define SO_RCVTIMEO 0x1006 /* Receive timeout. */ +#define SO_ERROR 0x1007 /* Get error status and clear. */ +#define SO_TYPE 0x1008 /* Get socket type. */ +#define SO_KERNACCEPT 0x2000 /* Derive a in-kernel only socket. */ +#define SO_AUDIT 0x8000 /* Turn on socket auditing. */ + + +/* Structure used to manipulate the SO_LINGER option. */ +struct linger + { + int l_onoff; /* Nonzero to linger on close. */ + int l_linger; /* Time to linger. */ + }; + +#endif /* bits/socket.h */ From 9c7386670c33157e1a51688c940458487e538632 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:26:18 +0000 Subject: [PATCH 1941/4487] AIX definitions for stat.h. --- sysdeps/unix/sysv/aix/bits/stat.h | 124 ++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/bits/stat.h diff --git a/sysdeps/unix/sysv/aix/bits/stat.h b/sysdeps/unix/sysv/aix/bits/stat.h new file mode 100644 index 0000000000..252662e062 --- /dev/null +++ b/sysdeps/unix/sysv/aix/bits/stat.h @@ -0,0 +1,124 @@ +/* Copyright (C) 1999 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_STAT_H +# error "Never include directly; use instead." +#endif + +struct stat + { + __dev_t st_dev; /* Device. */ +#ifndef __USE_FILE_OFFSET64 + __ino_t st_ino; /* File serial number. */ +#else + __ino64_t st_ino; /* File serial number. */ +#endif + __mode_t st_mode; /* File mode. */ + __nlink_t st_nlink; /* Link count. */ + unsigned short int st_flag; /* Flag word. */ + __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. */ +#ifndef __USE_FILE_OFFSET64 + __off_t st_size; /* Size of file, in bytes. */ +#else + int st_ssize; /* Size of file, in bytes. */ +#endif + __time_t st_atime; /* Time of last access. */ + unsigned long int __unused1; + __time_t st_mtime; /* Time of last modification. */ + unsigned long int __unused2; + __time_t st_ctime; /* Time of last status change. */ + unsigned long int __unused3; + __blksize_t st_blksize; /* Optimal block size for I/O. */ +#ifndef __USE_FILE_OFFSET64 + __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ +#else + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ +#endif + int st_vfstype; /* Type of the filesystem. */ + unsigned int st_vfs; /* Vfs number. */ + unsigned int st_type; /* Vnode type. */ + unsigned int st_gen; /* Inode generation number. */ + +#define _STATBUF_RESERVED_SPACE 9 + unsigned int st_reserved[_STATBUF_RESERVED_SPACE]; + +#ifdef __USE_FILE_OFFSET64 + unsigned int st_padto_ll; + __off64_t st_size; /* 64 bit file size in bytes. */ +#endif + }; + +#ifdef __USE_LARGEFILE64 +struct stat64 + { + __dev_t st_dev; /* Device. */ + __ino64_t st_ino; /* File serial number. */ + __mode_t st_mode; /* File mode. */ + __nlink_t st_nlink; /* Link count. */ + unsigned short int st_flag; /* Flag word. */ + __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. */ + int st_ssize; /* Size of file, in bytes. */ + __time_t st_atime; /* Time of last access. */ + unsigned long int __unused1; + __time_t st_mtime; /* Time of last modification. */ + unsigned long int __unused2; + __time_t st_ctime; /* Time of last status change. */ + unsigned long int __unused3; + __blksize_t st_blksize; /* Optimal block size for I/O. */ + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ + int st_vfstype; /* Type of the filesystem. */ + unsigned int st_vfs; /* Vfs number. */ + unsigned int st_type; /* Vnode type. */ + unsigned int st_gen; /* Inode generation number. */ + unsigned int st_reserved[_STATBUF_RESERVED_SPACE]; + unsigned int st_padto_ll; + __off64_t st_size; /* 64 bit file size in bytes. */ + }; +#endif + +/* Tell code we have these members. */ +#define _STATBUF_ST_BLKSIZE +#define _STATBUF_ST_RDEV + +/* Encoding of the file mode. */ + +#define __S_IFMT 0170000 /* These bits determine file type. */ + +/* File types. */ +#define __S_IFDIR 0040000 /* Directory. */ +#define __S_IFCHR 0020000 /* Character device. */ +#define __S_IFBLK 0060000 /* Block device. */ +#define __S_IFREG 0100000 /* Regular file. */ +#define __S_IFIFO 0010000 /* FIFO. */ + +/* These don't actually exist on System V, but having them doesn't hurt. */ +#define __S_IFLNK 0120000 /* Symbolic link. */ +#define __S_IFSOCK 0140000 /* Socket. */ + +/* Protection bits. */ + +#define __S_ISUID 04000 /* Set user ID on execution. */ +#define __S_ISGID 02000 /* Set group ID on execution. */ +#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ +#define __S_IREAD 0400 /* Read by owner. */ +#define __S_IWRITE 0200 /* Write by owner. */ +#define __S_IEXEC 0100 /* Execute by owner. */ From 15d3faa27613b29b8152d8461d102dbb7d8b1a73 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:26:22 +0000 Subject: [PATCH 1942/4487] AIX definitions for statfs.h. --- sysdeps/unix/sysv/aix/bits/statfs.h | 77 +++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/bits/statfs.h diff --git a/sysdeps/unix/sysv/aix/bits/statfs.h b/sysdeps/unix/sysv/aix/bits/statfs.h new file mode 100644 index 0000000000..2877339e74 --- /dev/null +++ b/sysdeps/unix/sysv/aix/bits/statfs.h @@ -0,0 +1,77 @@ +/* Copyright (C) 1997, 1998, 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_STATFS_H +# error "Never include directly; use instead." +#endif + +#include /* for __fsid_t and __fsblkcnt_t*/ + +struct statfs + { + int f_version; + int f_type; + int f_bsize; + /* The following five elements have type `int' since AIX's fsfilcnt_t + and fsblkcnt_t types do not fit. */ + int f_blocks; + int f_bfree; + int f_bavail; + int f_files; + int f_ffree; + __fsid_t f_fsid; + int f_vfstype; + int f_fsize; + int f_vfsnumber; + int f_vfsoff; + int f_vfslen; + int f_vfsvers; + char f_fname[32]; + char f_fpack[32]; + int f_name_max; + }; + +#ifdef __USE_LARGEFILE64 +/* XXX There seems to be no 64-bit versio of this structure. */ +struct statfs64 + { + int f_version; + int f_type; + int f_bsize; + /* The following five elements have type `int' since AIX's fsfilcnt_t + and fsblkcnt_t types do not fit. */ + int f_blocks; + int f_bfree; + int f_bavail; + int f_files; + int f_ffree; + __fsid_t f_fsid; + int f_vfstype; + int f_fsize; + int f_vfsnumber; + int f_vfsoff; + int f_vfslen; + int f_vfsvers; + char f_fname[32]; + char f_fpack[32]; + int f_name_max; + }; +#endif + +/* Tell code we have these members. */ +#define _STATFS_F_NAME_MAX From 0773f9189169e8abbf6ee1fe1b4ea47371599561 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:26:28 +0000 Subject: [PATCH 1943/4487] AIX definitions for types.h. --- sysdeps/unix/sysv/aix/bits/types.h | 148 +++++++++++++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/bits/types.h diff --git a/sysdeps/unix/sysv/aix/bits/types.h b/sysdeps/unix/sysv/aix/bits/types.h new file mode 100644 index 0000000000..c41b34c1ef --- /dev/null +++ b/sysdeps/unix/sysv/aix/bits/types.h @@ -0,0 +1,148 @@ +/* Copyright (C) 1991,92,94,95,96,97,98,99 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* + * Never include this file directly; use instead. + */ + +#ifndef _BITS_TYPES_H +#define _BITS_TYPES_H 1 + +#include + +#define __need_size_t +#include + +/* Convenience types. */ +typedef unsigned char __u_char; +typedef unsigned short __u_short; +typedef unsigned int __u_int; +typedef unsigned long __u_long; +#ifdef __GNUC__ +__extension__ typedef unsigned long long int __u_quad_t; +__extension__ typedef long long int __quad_t; +#else +typedef struct + { + long int __val[2]; + } __quad_t; +typedef struct + { + __u_long __val[2]; + } __u_quad_t; +#endif +typedef signed char __int8_t; +typedef unsigned char __uint8_t; +typedef signed short int __int16_t; +typedef unsigned short int __uint16_t; +typedef signed int __int32_t; +typedef unsigned int __uint32_t; +#ifdef __GNUC__ +__extension__ typedef signed long long int __int64_t; +__extension__ typedef unsigned long long int __uint64_t; +#endif +typedef __quad_t *__qaddr_t; + +typedef __u_long __dev_t; /* Type of device numbers. */ +typedef __u_int __uid_t; /* Type of user identifications. */ +typedef __u_int __gid_t; /* Type of group identifications. */ +typedef __u_long __ino_t; /* Type of file serial numbers. */ +typedef __u_int __mode_t; /* Type of file attribute bitmasks. */ +typedef short int __nlink_t; /* Type of file link counts. */ +typedef long int __off_t; /* Type of file sizes and offsets. */ +typedef __quad_t __loff_t; /* Type of file sizes and offsets. */ +typedef int __pid_t; /* Type of process identifications. */ +typedef long int __ssize_t; /* Type of a byte count, or error. */ +typedef __u_long __rlim_t; /* Type of resource counts. */ +typedef __u_quad_t __rlim64_t; /* Type of resource counts (LFS). */ +typedef __u_long __id_t; /* General type for ID. */ + +typedef struct + { + unsigned long int __val[2]; + } __fsid_t; /* Type of file system IDs. */ + +/* Everythin' else. */ +typedef long int __daddr_t; /* The type of a disk address. */ +typedef char *__caddr_t; +typedef long int __time_t; +typedef __u_long __useconds_t; +typedef int __suseconds_t; +typedef long int __swblk_t; /* Type of a swap block maybe? */ + +typedef int __clock_t; + +/* One element in the file descriptor mask array. */ +typedef unsigned long int __fd_mask; + +/* Number of descriptors that can fit in an `fd_set'. */ +#define __FD_SETSIZE 1024 + +/* It's easier to assume 8-bit bytes than to get CHAR_BIT. */ +#define __NFDBITS (8 * sizeof (__fd_mask)) +#define __FDELT(d) ((d) / __NFDBITS) +#define __FDMASK(d) ((__fd_mask) 1 << ((d) % __NFDBITS)) + +/* fd_set for select and pselect. */ +typedef struct + { + /* XPG4.2 requires this member name. Otherwise avoid the name + from the global namespace. */ +#ifdef __USE_XOPEN + __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS]; +# define __FDS_BITS(set) ((set)->fds_bits) +#else + __fd_mask __fds_bits[__FD_SETSIZE / __NFDBITS]; +# define __FDS_BITS(set) ((set)->__fds_bits) +#endif + } __fd_set; + + +typedef long int __key_t; + +/* Type to represent block size. */ +typedef int __blksize_t; + +/* Types from the Large File Support interface. */ + +/* Type to count number os disk blocks. */ +typedef int __blkcnt_t; +typedef __quad_t __blkcnt64_t; + +/* Type to count file system blocks. */ +typedef __u_long __fsblkcnt_t; +typedef __u_quad_t __fsblkcnt64_t; + +/* Type to count file system inodes. */ +typedef __u_long __fsfilcnt_t; +typedef __u_quad_t __fsfilcnt64_t; + +/* Type of file serial numbers. */ +typedef __u_quad_t __ino64_t; + +/* Type of file sizes and offsets. */ +typedef __loff_t __off64_t; + +/* Used in XTI. */ +typedef int __t_scalar_t; +typedef unsigned int __t_uscalar_t; + +/* Duplicates info from stdint.h but this is used in unistd.h. */ +typedef int __intptr_t; + +#endif /* bits/types.h */ From 069d6bb93752fa810edfb3963363a3e1327ba874 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:26:35 +0000 Subject: [PATCH 1944/4487] AIX definitions for uio.h. --- sysdeps/unix/sysv/aix/bits/uio.h | 42 ++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/bits/uio.h diff --git a/sysdeps/unix/sysv/aix/bits/uio.h b/sysdeps/unix/sysv/aix/bits/uio.h new file mode 100644 index 0000000000..5868ccc257 --- /dev/null +++ b/sysdeps/unix/sysv/aix/bits/uio.h @@ -0,0 +1,42 @@ +/* Copyright (C) 1996, 1997, 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_UIO_H +# error "Never include directly; use instead." +#endif + + +#include + + +/* Size of object which can be written atomically. + + This macro has different values in different kernel versions. The + latest versions of ther kernel use 1024 and this is good choice. Since + the C library implementation of readv/writev is able to emulate the + functionality even if the currently running kernel does not support + this large value the readv/writev call will not fail because of this. */ +#define UIO_MAXIOV 16 + + +/* Structure for scatter/gather I/O. */ +struct iovec + { + void *iov_base; /* Pointer to data. */ + size_t iov_len; /* Length of data. */ + }; From f97043b7917b5dc71333c61749f4e33ce74cf33e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:26:41 +0000 Subject: [PATCH 1945/4487] AIX definitions for utmp.h. --- sysdeps/unix/sysv/aix/bits/utmp.h | 73 +++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/bits/utmp.h diff --git a/sysdeps/unix/sysv/aix/bits/utmp.h b/sysdeps/unix/sysv/aix/bits/utmp.h new file mode 100644 index 0000000000..04844096b0 --- /dev/null +++ b/sysdeps/unix/sysv/aix/bits/utmp.h @@ -0,0 +1,73 @@ +/* The `struct utmp' type, describing entries in the utmp file. AIX. + Copyright (C) 1996, 1997, 1999 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _UTMP_H +# error "Never include directly; use instead." +#endif + + +#include + +#define _PATH_UTMP "/etc/utmp" +#define _PATH_WTMP "/var/adm/wtmp" +#define _PATH_LASTLOG "/var/adm/lastlog" + + +#define UT_LINESIZE 12 +#define UT_NAMESIZE 8 +#define UT_HOSTSIZE 16 + + +struct utmp + { +#define ut_name ut_user + char ut_user[UT_NAMESIZE]; + char ut_id[14]; + char ut_line[UT_LINESIZE]; + short int ut_type; + short int ut_pid; + struct exit_status + { + short int e_termination; + short int e_exit; + } ut_exit; + __time_t ut_time; + char ut_host[UT_HOSTSIZE]; + }; + + +/* Tell the user that we have a modern system with UT_HOST, UT_TYPE, and + UT_ID fields. */ +#define _HAVE_UT_TYPE 1 +#define _HAVE_UT_PID 1 +#define _HAVE_UT_ID 1 +#define _HAVE_UT_HOST 1 + + +/* Values for the `ut_type' field of a `struct utmp'. */ +#define EMPTY 0 +#define RUN_LVL 1 +#define BOOT_TIME 2 +#define OLD_TIME 3 +#define NEW_TIME 4 +#define INIT_PROCESS 5 +#define LOGIN_PROCESS 6 +#define USER_PROCESS 7 +#define DEAD_PROCESS 8 +#define ACCOUNTING 9 From 9846a8a47ecfe5eededc68d8d3e0ba33cd0daefe Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:26:45 +0000 Subject: [PATCH 1946/4487] AIX definitions for utmpx.h. --- sysdeps/unix/sysv/aix/bits/utmpx.h | 67 ++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/bits/utmpx.h diff --git a/sysdeps/unix/sysv/aix/bits/utmpx.h b/sysdeps/unix/sysv/aix/bits/utmpx.h new file mode 100644 index 0000000000..7a7bce2f70 --- /dev/null +++ b/sysdeps/unix/sysv/aix/bits/utmpx.h @@ -0,0 +1,67 @@ +/* Structures and defenitions for the user accounting database. AIX. + Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _UTMPX_H +# error "Never include directly; use instead." +#endif + +#include +#include + + +#ifdef __USE_GNU +# include +# define _PATH_UTMPX _PATH_UTMP +# define _PATH_WTMPX _PATH_WTMP +#endif + + +#define __UT_LINESIZE 12 +#define __UT_NAMESIZE 8 +#define __UT_HOSTSIZE 16 + + +/* The structure describing an entry in the user accounting database. */ +struct utmpx +{ + char ut_user[__UT_NAMESIZE]; /* Username. */ + char ut_id[14]; /* Inittab ID. */ + char ut_line[__UT_LINESIZE]; /* Devicename. */ + short int ut_type; /* Type of login. */ + __pid_t ut_pid; /* Process ID of login process. */ + struct timeval ut_tv; /* Time entry was made. */ + char ut_host[__UT_HOSTSIZE]; /* Hostname for remote login. */ +}; + + +/* Values for the `ut_type' field of a `struct utmpx'. */ +#define EMPTY 0 /* No valid user accounting information. */ + +#define RUN_LVL 1 /* The system's runlevel. */ +#define BOOT_TIME 2 /* Time of system boot. */ +#define NEW_TIME 3 /* Time after system clock changed. */ +#define OLD_TIME 4 /* Time when system clock changed. */ + +#define INIT_PROCESS 5 /* Process spawned by the init process. */ +#define LOGIN_PROCESS 6 /* Session leader of a logged in user. */ +#define USER_PROCESS 7 /* Normal process. */ +#define DEAD_PROCESS 8 /* Terminated process. */ + +#ifdef __USE_GNU +# define ACCOUNTING 9 /* System accounting. */ +#endif From 908f98f274806d8279fbb0dae0226ae2cc55310b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:26:52 +0000 Subject: [PATCH 1947/4487] AIX definitions for utsname.h. --- sysdeps/unix/sysv/aix/bits/utsname.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/bits/utsname.h diff --git a/sysdeps/unix/sysv/aix/bits/utsname.h b/sysdeps/unix/sysv/aix/bits/utsname.h new file mode 100644 index 0000000000..e6958f0783 --- /dev/null +++ b/sysdeps/unix/sysv/aix/bits/utsname.h @@ -0,0 +1,23 @@ +/* Copyright (C) 1997, 1999 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_UTSNAME_H +# error "Never include directly; use instead." +#endif + +#define _UTSNAME_LENGTH 32 From f57e29a591daea5cc3fae43a1aaa87c6ca20df46 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:27:18 +0000 Subject: [PATCH 1948/4487] AIX definitions of library names. --- sysdeps/unix/sysv/aix/gnu/lib-names.h | 31 +++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/gnu/lib-names.h diff --git a/sysdeps/unix/sysv/aix/gnu/lib-names.h b/sysdeps/unix/sysv/aix/gnu/lib-names.h new file mode 100644 index 0000000000..d41f822f16 --- /dev/null +++ b/sysdeps/unix/sysv/aix/gnu/lib-names.h @@ -0,0 +1,31 @@ +#ifndef __GNU_LIB_NAMES_H +#define __GNU_LIB_NAMES_H 1 + +#define LIBBROKENLOCALE_SO "libBrokenLocale.a" +#define LIBCRYPT_SO "libcrypt.a" +#define LIBC_SO "libc.a" +#define LIBDB1_SO "libdb1.a" +#define LIBDB_SO "libdb.a" +#define LIBDL_SO "libdl.a" +#define LIBM_SO "libm.a" +#define LIBNOVERSION_SO "libNoVersion.a" +#define LIBNSL_SO "libnsl.a" +#define LIBNSS1_COMPAT_SO "libnss1_compat.a" +#define LIBNSS1_DB_SO "libnss1_db.a" +#define LIBNSS1_DNS_SO "libnss1_dns.a" +#define LIBNSS1_FILES_SO "libnss1_files.a" +#define LIBNSS1_NIS_SO "libnss1_nis.a" +#define LIBNSS_COMPAT_SO "libnss_compat.a" +#define LIBNSS_DB_SO "libnss_db.a" +#define LIBNSS_DNS_SO "libnss_dns.a" +#define LIBNSS_FILES_SO "libnss_files.a" +#define LIBNSS_HESIOD_SO "libnss_hesiod.a" +#define LIBNSS_LDAP_SO "libnss_ldap.a" +#define LIBNSS_NISPLUS_SO "libnss_nisplus.a" +#define LIBNSS_NIS_SO "libnss_nis.a" +#define LIBPTHREAD_SO "libpthread.a" +#define LIBRESOLV_SO "libresolv.a" +#define LIBRT_SO "librt.a" +#define LIBUTIL_SO "libutil.a" + +#endif /* gnu/lib-names.h */ From 0d5037b5bb0e44db52bbc819c06d592af60026f0 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:27:57 +0000 Subject: [PATCH 1949/4487] Code to convert error codes from AIX to Linux. --- sysdeps/unix/sysv/aix/linux/errnoconv.c | 125 ++++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/linux/errnoconv.c diff --git a/sysdeps/unix/sysv/aix/linux/errnoconv.c b/sysdeps/unix/sysv/aix/linux/errnoconv.c new file mode 100644 index 0000000000..95bd5a32b2 --- /dev/null +++ b/sysdeps/unix/sysv/aix/linux/errnoconv.c @@ -0,0 +1,125 @@ +/* Convert the error number the AIX kernel returns to what the Linux + application expects. */ +#include +#include "linux-errno.h" + + +static int mapping[] = +{ + [EPERM] = LINUX_EPERM, + [ENOENT] = LINUX_ENOENT, + [ESRCH] = LINUX_ESRCH, + [EINTR] = LINUX_EINTR, + [EIO] = LINUX_EIO, + [ENXIO] = LINUX_ENXIO, + [E2BIG] = LINUX_E2BIG, + [ENOEXEC] = LINUX_ENOEXEC, + [EBADF] = LINUX_EBADF, + [ECHILD] = LINUX_ECHILD, + [EAGAIN] = LINUX_EAGAIN, + [ENOMEM] = LINUX_ENOMEM, + [EACCES] = LINUX_EACCES, + [EFAULT] = LINUX_EFAULT, + [ENOTBLK] = LINUX_ENOTBLK, + [EBUSY] = LINUX_EBUSY, + [EEXIST] = LINUX_EEXIST, + [EXDEV] = LINUX_EXDEV, + [ENODEV] = LINUX_ENODEV, + [ENOTDIR] = LINUX_ENOTDIR, + [EISDIR] = LINUX_EISDIR, + [EINVAL] = LINUX_EINVAL, + [ENFILE] = LINUX_ENFILE, + [EMFILE] = LINUX_EMFILE, + [ENOTTY] = LINUX_ENOTTY, + [ETXTBSY] = LINUX_ETXTBSY, + [EFBIG] = LINUX_EFBIG, + [ENOSPC] = LINUX_ENOSPC, + [EIDRM] = LINUX_EIDRM, + [ECHRNG] = LINUX_ECHRNG, + [EL2NSYNC] = LINUX_EL2NSYNC, + [EL3HLT] = LINUX_EL3HLT, + [EL3RST] = LINUX_EL3RST, + [ELNRNG] = LINUX_ELNRNG, + [EUNATCH] = LINUX_EUNATCH, + [ENOCSI] = LINUX_ENOCSI, + [EL2HLT] = LINUX_EL2HLT, + [EDEADLK] = LINUX_EDEADLK, + [ENOTREADY] = LINUX_ENOTREADY, + // EWPROTECT: no Linux equivalent + // EFORMAT: no Linux equivalent + [ENOLCK] = LINUX_ENOLCK, + // ENOCONNECT: No Linux equivalent + [ESTALE] = LINUX_ESTALE, + // EDIST: no Linux equivalent + [54] = LINUX_EAGAIN, // EWOULDBLOCK + [EINPROGRESS] = LINUX_EINPROGRESS, + [EALREADY] = LINUX_EALREADY, + [ENOTSOCK] = LINUX_ENOTSOCK, + [EDESTADDRREQ] = LINUX_EDESTADDRREQ, + [EMSGSIZE] = LINUX_EMSGSIZE, + [EPROTOTYPE] = LINUX_EPROTOTYPE, + [ENOPROTOOPT] = LINUX_ENOPROTOOPT, + [EPROTONOSUPPORT] = LINUX_EPROTONOSUPPORT, + [ESOCKTNOSUPPORT] = LINUX_ESOCKTNOSUPPORT, + [EOPNOTSUPP] = LINUX_EOPNOTSUPP, + [EPFNOSUPPORT] = LINUX_EPFNOSUPPORT, + [EAFNOSUPPORT] = LINUX_EAFNOSUPPORT, + [EADDRINUSE] = LINUX_EADDRINUSE, + [EADDRNOTAVAIL] = LINUX_EADDRNOTAVAIL, + [ENETDOWN] = LINUX_ENETDOWN, + [ENETUNREACH] = LINUX_ENETUNREACH, + [ENETRESET] = LINUX_ENETRESET, + [ECONNABORTED] = LINUX_ECONNABORTED, + [ECONNRESET] = LINUX_ECONNRESET, + [ENOBUFS] = LINUX_ENOBUFS, + [EISCONN] = LINUX_EISCONN, + [ENOTCONN] = LINUX_ENOTCONN, + [ESHUTDOWN] = LINUX_ESHUTDOWN, + [ETIMEDOUT] = LINUX_ETIMEDOUT, + [ECONNREFUSED] = LINUX_ECONNREFUSED, + [EHOSTDOWN] = LINUX_EHOSTDOWN, + [EHOSTUNREACH] = LINUX_EHOSTUNREACH, + [ERESTART] = LINUX_ERESTART, + [EPROCLIM] = LINUX_EPROCLIM, + [EUSERS] = LINUX_EUSERS, + [ELOOP] = LINUX_ELOOP, + [ENAMETOOLONG] = LINUX_ENAMETOOLONG, + [87] = LINUX_ENOTEMPTY, // ENOTEMPTY + [EDQUOT] = LINUX_EDQUOT, + [ECORRUPT] = LINUX_ECORRUPT, + [EREMOTE] = LINUX_EREMOTE, + [ENOSYS] = LINUX_ENOSYS, + [EMEDIA] = LINUX_EMEDIA, + [ESOFT] = LINUX_ESOFT, + [ENOATTR] = LINUX_ENOATTR, + [ESAD] = LINUX_ESAD, + // ENOTRUST: no Linux equivalent + [ETOOMANYREFS] = LINUX_ETOOMANYREFS, + [EILSEQ] = LINUX_EILSEQ, + [ECANCELED] = LINUX_ECANCELED, + [ENOSR] = LINUX_ENOSR, + [ETIME] = LINUX_ETIME, + [EBADMSG] = LINUX_EBADMSG, + [EPROTO] = LINUX_EPROTO, + [ENODATA] = LINUX_ENODATA, + [ENOSTR] = LINUX_ENOSTR, + [ENOTSUP] = LINUX_ENOTSUP, + [EMULTIHOP] = LINUX_EMULTIHOP, + [ENOLINK] = LINUX_ENOLINK, + [EOVERFLOW] = LINUX_EOVERFLOW +}; + + +int +__errno_aix_to_linux (int err) +{ + int conv; + + if (err >= 0 && err < (sizeof (mapping) / sizeof (mapping[0])) + && ((conv = mapping[err]) != 0 || err == 0)) + return conv; + + /* The error value is not known. Create a special value which can + be easily recognized as an invalid result. */ + return 512 + err; +} From ea773c5b66e2f49d7e3607f7bacba8bd4f65c8f6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:28:12 +0000 Subject: [PATCH 1950/4487] Definition of Linux error codes. --- sysdeps/unix/sysv/aix/linux/linux-errno.h | 135 ++++++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/linux/linux-errno.h diff --git a/sysdeps/unix/sysv/aix/linux/linux-errno.h b/sysdeps/unix/sysv/aix/linux/linux-errno.h new file mode 100644 index 0000000000..b7cf0a5c5f --- /dev/null +++ b/sysdeps/unix/sysv/aix/linux/linux-errno.h @@ -0,0 +1,135 @@ +#ifndef _LINUX_ERRNO_H +#define _LINUX_ERRNO_H + +#define LINUX_EPERM 1 +#define LINUX_ENOENT 2 +#define LINUX_ESRCH 3 +#define LINUX_EINTR 4 +#define LINUX_EIO 5 +#define LINUX_ENXIO 6 +#define LINUX_E2BIG 7 +#define LINUX_ENOEXEC 8 +#define LINUX_EBADF 9 +#define LINUX_ECHILD 10 +#define LINUX_EAGAIN 11 +#define LINUX_ENOMEM 12 +#define LINUX_EACCES 13 +#define LINUX_EFAULT 14 +#define LINUX_ENOTBLK 15 +#define LINUX_EBUSY 16 +#define LINUX_EEXIST 17 +#define LINUX_EXDEV 18 +#define LINUX_ENODEV 19 +#define LINUX_ENOTDIR 20 +#define LINUX_EISDIR 21 +#define LINUX_EINVAL 22 +#define LINUX_ENFILE 23 +#define LINUX_EMFILE 24 +#define LINUX_ENOTTY 25 +#define LINUX_ETXTBSY 26 +#define LINUX_EFBIG 27 +#define LINUX_ENOSPC 28 +#define LINUX_ESPIPE 29 +#define LINUX_EROFS 30 +#define LINUX_EMLINK 31 +#define LINUX_EPIPE 32 +#define LINUX_EDOM 33 +#define LINUX_ERANGE 34 +#define LINUX_EDEADLK 35 +#define LINUX_ENAMETOOLONG 36 +#define LINUX_ENOLCK 37 +#define LINUX_ENOSYS 38 +#define LINUX_ENOTEMPTY 39 +#define LINUX_ELOOP 40 +#define LINUX_ENOMSG 42 +#define LINUX_EIDRM 43 +#define LINUX_ECHRNG 44 +#define LINUX_EL2NSYNC 45 +#define LINUX_EL3HLT 46 +#define LINUX_EL3RST 47 +#define LINUX_ELNRNG 48 +#define LINUX_EUNATCH 49 +#define LINUX_ENOCSI 50 +#define LINUX_EL2HLT 51 +#define LINUX_EBADE 52 +#define LINUX_EBADR 53 +#define LINUX_EXFULL 54 +#define LINUX_ENOANO 55 +#define LINUX_EBADRQC 56 +#define LINUX_EBADSLT 57 +#define LINUX_EDEADLOCK 58 +#define LINUX_EBFONT 59 +#define LINUX_ENOSTR 60 +#define LINUX_ENODATA 61 +#define LINUX_ETIME 62 +#define LINUX_ENOSR 63 +#define LINUX_ENONET 64 +#define LINUX_ENOPKG 65 +#define LINUX_EREMOTE 66 +#define LINUX_ENOLINK 67 +#define LINUX_EADV 68 +#define LINUX_ESRMNT 69 +#define LINUX_ECOMM 70 +#define LINUX_EPROTO 71 +#define LINUX_EMULTIHOP 72 +#define LINUX_EDOTDOT 73 +#define LINUX_EBADMSG 74 +#define LINUX_EOVERFLOW 75 +#define LINUX_ENOTUNIQ 76 +#define LINUX_EBADFD 77 +#define LINUX_EREMCHG 78 +#define LINUX_ELIBACC 79 +#define LINUX_ELIBBAD 80 +#define LINUX_ELIBSCN 81 +#define LINUX_ELIBMAX 82 +#define LINUX_ELIBEXEC 83 +#define LINUX_EILSEQ 84 +#define LINUX_ERESTART 85 +#define LINUX_ESTRPIPE 86 +#define LINUX_EUSERS 87 +#define LINUX_ENOTSOCK 88 +#define LINUX_EDESTADDRREQ 89 +#define LINUX_EMSGSIZE 90 +#define LINUX_EPROTOTYPE 91 +#define LINUX_ENOPROTOOPT 92 +#define LINUX_EPROTONOSUPPORT 93 +#define LINUX_ESOCKTNOSUPPORT 94 +#define LINUX_EOPNOTSUPP 95 +#define LINUX_EPFNOSUPPORT 96 +#define LINUX_EAFNOSUPPORT 97 +#define LINUX_EADDRINUSE 98 +#define LINUX_EADDRNOTAVAIL 99 +#define LINUX_ENETDOWN 100 +#define LINUX_ENETUNREACH 101 +#define LINUX_ENETRESET 102 +#define LINUX_ECONNABORTED 103 +#define LINUX_ECONNRESET 104 +#define LINUX_ENOBUFS 105 +#define LINUX_EISCONN 106 +#define LINUX_ENOTCONN 107 +#define LINUX_ESHUTDOWN 108 +#define LINUX_ETOOMANYREFS 109 +#define LINUX_ETIMEDOUT 110 +#define LINUX_ECONNREFUSED 111 +#define LINUX_EHOSTDOWN 112 +#define LINUX_EHOSTUNREACH 113 +#define LINUX_EALREADY 114 +#define LINUX_EINPROGRESS 115 +#define LINUX_ESTALE 116 +#define LINUX_EUCLEAN 117 +#define LINUX_ENOTNAM 118 +#define LINUX_ENAVAIL 119 +#define LINUX_EISNAM 120 +#define LINUX_EREMOTEIO 121 +#define LINUX_EDQUOT 122 + +#define LINUX_ENOMEDIUM 123 +#define LINUX_EMEDIUMTYPE 124 + +/* Should never be seen by user programs */ +#define LINUX_ERESTARTSYS 512 +#define LINUX_ERESTARTNOINTR 513 +#define LINUX_ERESTARTNOHAND 514 +#define LINUX_ENOIOCTLCMD 515 + +#endif From d01d7c6a7c785c10707b1cbb5dca0de1737627b6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:28:24 +0000 Subject: [PATCH 1951/4487] Definition of Linux stat structure. --- sysdeps/unix/sysv/aix/linux/linux-stat.h | 131 +++++++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/linux/linux-stat.h diff --git a/sysdeps/unix/sysv/aix/linux/linux-stat.h b/sysdeps/unix/sysv/aix/linux/linux-stat.h new file mode 100644 index 0000000000..01a2d4d253 --- /dev/null +++ b/sysdeps/unix/sysv/aix/linux/linux-stat.h @@ -0,0 +1,131 @@ +/* Copyright (C) 1992, 95, 96, 97, 98, 99, 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_STAT_H +# error "Never include directly; use instead." +#endif + +/* Versions of the `struct stat' data structure. */ +#define _STAT_VER_LINUX_OLD 1 +#define _STAT_VER_KERNEL 1 +#define _STAT_VER_SVR4 2 +#define _STAT_VER_LINUX 3 +#define _STAT_VER _STAT_VER_LINUX /* The one defined below. */ + +/* Versions of the `xmknod' interface. */ +#define _MKNOD_VER_LINUX 1 +#define _MKNOD_VER_SVR4 2 +#define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */ + + +struct stat + { + __dev_t st_dev; /* Device. */ + unsigned short int __pad1; +#ifndef __USE_FILE_OFFSET64 + __ino_t st_ino; /* File serial number. */ +#else + __ino64_t st_ino; /* File serial number. */ +#endif + __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. */ + unsigned short int __pad2; +#ifndef __USE_FILE_OFFSET64 + __off_t st_size; /* Size of file, in bytes. */ +#else + __off64_t st_size; /* Size of file, in bytes. */ +#endif + __blksize_t st_blksize; /* Optimal block size for I/O. */ + +#ifndef __USE_FILE_OFFSET64 + __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ +#else + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ +#endif + __time_t st_atime; /* Time of last access. */ + unsigned long int __unused1; + __time_t st_mtime; /* Time of last modification. */ + unsigned long int __unused2; + __time_t st_ctime; /* Time of last status change. */ + unsigned long int __unused3; + unsigned long int __unused4; + unsigned long int __unused5; + }; + +#ifdef __USE_LARGEFILE64 +struct stat64 + { + __dev_t st_dev; /* Device. */ + unsigned short int __pad1; + + __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. */ + unsigned short int __pad2; + __off64_t st_size; /* Size of file, in bytes. */ + __blksize_t st_blksize; /* Optimal block size for I/O. */ + + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ + __time_t st_atime; /* Time of last access. */ + unsigned long int __unused1; + __time_t st_mtime; /* Time of last modification. */ + unsigned long int __unused2; + __time_t st_ctime; /* Time of last status change. */ + unsigned long int __unused3; + unsigned long int __unused4; + unsigned long int __unused5; + }; +#endif + +/* Tell code we have these members. */ +#define _STATBUF_ST_BLKSIZE +#define _STATBUF_ST_RDEV + +/* Encoding of the file mode. */ + +#define __S_IFMT 0170000 /* These bits determine file type. */ + +/* File types. */ +#define __S_IFDIR 0040000 /* Directory. */ +#define __S_IFCHR 0020000 /* Character device. */ +#define __S_IFBLK 0060000 /* Block device. */ +#define __S_IFREG 0100000 /* Regular file. */ +#define __S_IFIFO 0010000 /* FIFO. */ + +/* These don't actually exist on System V, but having them doesn't hurt. */ +#define __S_IFLNK 0120000 /* Symbolic link. */ +#define __S_IFSOCK 0140000 /* Socket. */ + +/* Protection bits. */ + +#define __S_ISUID 04000 /* Set user ID on execution. */ +#define __S_ISGID 02000 /* Set group ID on execution. */ +#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ +#define __S_IREAD 0400 /* Read by owner. */ +#define __S_IWRITE 0200 /* Write by owner. */ +#define __S_IEXEC 0100 /* Execute by owner. */ + + +/* Thi macro (with a different name) is normally in . */ +#define linux_makedev(major, minor) (((major) << 8 | (minor))) From 244c5f9374a665fa5a7d3a2ce49c80269df3cb65 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:28:44 +0000 Subject: [PATCH 1952/4487] Code to convert AIX stat structure to Linux form.. --- sysdeps/unix/sysv/aix/linux/statconv.c | 35 ++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/linux/statconv.c diff --git a/sysdeps/unix/sysv/aix/linux/statconv.c b/sysdeps/unix/sysv/aix/linux/statconv.c new file mode 100644 index 0000000000..5333e23d7b --- /dev/null +++ b/sysdeps/unix/sysv/aix/linux/statconv.c @@ -0,0 +1,35 @@ +void +__stat_aix_to_linux (const struct stat *aixstat, struct stat *linuxstat) +{ + linuxstat->st_dev = linux_makedev (major (aixstat->st_dev), + minor (aixstat->st_dev)); + linuxstat->st_ino = aixstat->st_ino; + /* The following assumes that the mode values are the same on AIX + and Linux which is true in the moment. */ + linuxstat->st_mode = aixstat->st_mode; + linuxstat->st_nlink = aixstat->st_nlink; + /* There is no st_flag field in Linux. */ + linuxstat->st_uid = aixstat->st_uid; + linuxstat->st_gid = aixstat->st_gid; + linuxstat->st_rdev = linux_makedev (major (aixstat->st_rdev), + minor (aixstat->st_rdev)); + linuxstat->st_size = aixstat->st_size; + linuxstat->st_atime = aixstat->st_atime; + linuxstat->st_mtime = aixstat->st_mtime; + linuxstat->st_ctime = aixstat->st_ctime; + linuxstat->st_blksize = aixstat->st_blksize; + linuxstat->st_blocks = aixstat->st_blocks; + /* There is no st_vfstype in Linux. */ + /* There is no st_vfs in Linux. */ + /* There is no st_type in Linux. */ + /* There is no st_gen in Linux. */ + + /* File in the padding values with repeatable values. */ + linuxstat->__pad1 = 0; + linuxstat->__pad2 = 0; + linuxstat->__unused1 = 0; + linuxstat->__unused2 = 0; + linuxstat->__unused3 = 0; + linuxstat->__unused4 = 0; + linuxstat->__unused5 = 0; +} From e776840cf1c6b56740ce2af61834c4e1814fa606 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:29:10 +0000 Subject: [PATCH 1953/4487] AIX specific param.h. --- sysdeps/unix/sysv/aix/sys/param.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/sys/param.h diff --git a/sysdeps/unix/sysv/aix/sys/param.h b/sysdeps/unix/sysv/aix/sys/param.h new file mode 100644 index 0000000000..e128d8d60b --- /dev/null +++ b/sysdeps/unix/sysv/aix/sys/param.h @@ -0,0 +1,18 @@ +/* This file should contain various parameter macros appropriate for the + machine and operating system. There is no standard set of macros; this + file is just for compatibility with programs written for Unix that + expect it to define things. On Unix systems that do not have their own + sysdep version of this file, it is generated at build time by examining + the installed headers on the system. */ + +#include + +#define MAXSYMLINKS 1 +#define MAXPATHLEN 256 + +/* The pagesize is 4096. */ +#define EXEC_PAGESIZE 4096 + +/* Macros for min/max. */ +#define MIN(a,b) (((a)<(b))?(a):(b)) +#define MAX(a,b) (((a)>(b))?(a):(b)) From 9748d41f6a905dbe42b583931a6fb6af61170913 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 01:29:17 +0000 Subject: [PATCH 1954/4487] AIX specific ucontext.h. --- sysdeps/unix/sysv/aix/sys/ucontext.h | 113 +++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/sys/ucontext.h diff --git a/sysdeps/unix/sysv/aix/sys/ucontext.h b/sysdeps/unix/sysv/aix/sys/ucontext.h new file mode 100644 index 0000000000..c2ebf0cf13 --- /dev/null +++ b/sysdeps/unix/sysv/aix/sys/ucontext.h @@ -0,0 +1,113 @@ +/* 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_UCONTEXT_H +#define _SYS_UCONTEXT_H 1 + +#include +#include +#include + + +/* Alternate, preferred interface. */ +typedef struct sigaltstack + { + void *ss_sp; + size_t ss_size; + int ss_flags; + int __pad[4]; + } stack_t; + + +/* Forward declaration of AIX type. */ +typedef struct label_t label_t; + + + +typedef unsigned int kvmhandle_t; +typedef struct + { + unsigned long int __alloc; + kvmhandle_t __srval[16]; + } adspace_t; + + + +#define _NGPRS 32 +#define _NFPRS 32 + +struct __mstsafe +{ + struct __mstsave *__prev; /* Previous save area. */ + label_t *__kjmpbuf; /* Pointer to saved context. */ + char *__stackfix; /* Stack fix pointer. */ + char __intpri; /* Interrupt priority. */ + char __backt; /* Back-track flag. */ + char __rsvd[2]; /* Reserved. */ + __pid_t __curid; /* Copy of curid. */ + + int __excp_type; /* Exception type for debugger. */ + unsigned long int __iar; /* Instruction address register. */ + unsigned long int __msr; /* Machine state register. */ + unsigned long int __cr; /* Condition register. */ + unsigned long int __lr; /* Link register. */ + unsigned long int __ctr; /* Count register. */ + unsigned long int __xer; /* Fixed point exception. */ + unsigned long int __mq; /* Multiply/quotient register. */ + unsigned long int __tid; /* TID register. */ + unsigned long int __fpscr; /* Floating point status reg. */ + char __fpeu; /* Floating point ever used. */ + char __fpinfo; /* Floating point status flags. */ + char __pad[2]; /* Pad to dword boundary. */ + /* 1 implies state is in mstext */ + unsigned long int __except[5]; /* exception structure. */ + char __pad1[4]; /* Old bus field. */ + unsigned long int __o_iar; /* Old iar (for longjmp excpt). */ + unsigned long int __o_toc; /* Old toc (for longjmp excpt). */ + unsigned long int __o_arg1; /* Old arg1 (for longjmp excpt). */ + unsigned long int __excbranch; /* If not NULL, address to branch + to on exception. Used by + assembler routines for low + cost exception handling. */ + unsigned long int __fpscrx; /* Software extension to fpscr. */ + unsigned long int __o_vaddr; /* Saved vaddr for vmexception. */ + unsigned long int __cachealign[7]; /* Reserved. */ + adspace_t __as; /* Segment registers. */ + unsigned long int __gpr[_NGPRS]; /* General purpose registers. */ + double __fpr[_NFPRS]; /* Floating point registers. */ + }; + +typedef struct mcontext_t + { + struct __mstsafe __jmp_context; + } mcontext_t; + + +typedef struct ucontext_t + { + int __sc_onstack; /* Sigstack state to restore. */ + __sigset_t uc_sigmask; /* The set of signals that are blocked when + this context is active. */ + int __sc_uerror; /* u_error to restore. */ + mcontext_t uc_mcontext; /* Machine-specific image of saved context. */ + struct ucontext_t *uc_link; /* context resumed after this one returns */ + stack_t uc_stack; /* stack used by context */ + int __pad[4]; + } ucontext_t; + +#endif /* sys/ucontext.h */ From 2535a9deff765c705239a1c3e85fa449e535680b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 23 Mar 2000 20:30:03 +0000 Subject: [PATCH 1955/4487] MIPS specific additions to the internal definitions for the dynamic loader. --- sysdeps/mips/elf/ldsodefs.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sysdeps/mips/elf/ldsodefs.h diff --git a/sysdeps/mips/elf/ldsodefs.h b/sysdeps/mips/elf/ldsodefs.h new file mode 100644 index 0000000000..2dc783b57e --- /dev/null +++ b/sysdeps/mips/elf/ldsodefs.h @@ -0,0 +1,25 @@ +/* Run-time dynamic linker data structures for loaded ELF shared objects. + Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + +/* The MIPS ABI specifies that the dynamic section has to be read-only. */ + +#define DL_RO_DYN_SECTION 1 + +#include From f5a37cdb1be13330747dc453e2e401a5082ac74d Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 24 Mar 2000 15:27:37 +0000 Subject: [PATCH 1956/4487] 2000-03-24 Andreas Jaeger * sysdeps/mips/dl-machine.h (__dl_runtime_resolve): Use D_PTR to access relocated entries in l_info. (elf_machine_got_rel): Likewise. (elf_machine_runtime_setup): Likewise. * sysdeps/mips/mips64/dl-machine.h (elf_machine_got_rel): Likewise. (elf_machine_runtime_setup): Likewise. (__dl_runtime_resolve): Likewise. --- sysdeps/mips/dl-machine.h | 14 +++++++------- sysdeps/mips/mips64/dl-machine.h | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index d0b20ae655..188e9ae136 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -224,11 +224,11 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \ { \ struct link_map *l = elf_machine_runtime_link_map (old_gpreg, stub_pc); \ const ElfW(Sym) *const symtab \ - = (const void *) l->l_info[DT_SYMTAB]->d_un.d_ptr; \ + = (const void *) D_PTR (l, l_info[DT_SYMTAB]); \ const char *strtab \ - = (const void *) l->l_info[DT_STRTAB]->d_un.d_ptr; \ + = (const void *) D_PTR (l, l_info[DT_STRTAB]); \ const ElfW(Addr) *got \ - = (const ElfW(Addr) *) l->l_info[DT_PLTGOT]->d_un.d_ptr; \ + = (const ElfW(Addr) *) D_PTR (l, l_info[DT_PLTGOT]); \ const ElfW(Word) local_gotno \ = (const ElfW(Word)) l->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; \ const ElfW(Word) gotsym \ @@ -483,7 +483,7 @@ elf_machine_got_rel (struct link_map *map, int lazy) ElfW(Addr) *got; ElfW(Sym) *sym; int i, n; - const char *strtab = (const void *) map->l_info[DT_STRTAB]->d_un.d_ptr; + const char *strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]); #define RESOLVE_GOTSYM(sym) \ ({ \ @@ -495,7 +495,7 @@ elf_machine_got_rel (struct link_map *map, int lazy) (ref)? sym_loadaddr + ref->st_value: 0; \ }) - got = (ElfW(Addr) *) map->l_info[DT_PLTGOT]->d_un.d_ptr; + got = (ElfW(Addr) *) D_PTR (map, l_info[DT_PLTGOT]); /* got[0] is reserved. got[1] is also reserved for the dynamic object generated by gnu ld. Skip these reserved entries from relocation. */ @@ -507,7 +507,7 @@ elf_machine_got_rel (struct link_map *map, int lazy) /* Handle global got entries. */ got += n; - sym = (void *) map->l_info[DT_SYMTAB]->d_un.d_ptr; + sym = (void *) D_PTR (map, l_info[DT_SYMTAB]); sym += map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val; i = (map->l_info[DT_MIPS (SYMTABNO)]->d_un.d_val - map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val); @@ -566,7 +566,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) Their initial contents will arrange when called to put an offset into the .dynsym section in t8, the return address in t7 and then jump to _GLOBAL_OFFSET_TABLE[0]. */ - got = (ElfW(Addr) *) l->l_info[DT_PLTGOT]->d_un.d_ptr; + got = (ElfW(Addr) *) D_PTR (l, l_info[DT_PLTGOT]); /* This function will get called to fix up the GOT entry indicated by the register t8, and then jump to the resolved address. */ diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h index fe4667a87d..01f9a95f12 100644 --- a/sysdeps/mips/mips64/dl-machine.h +++ b/sysdeps/mips/mips64/dl-machine.h @@ -137,7 +137,7 @@ elf_machine_got_rel (struct link_map *map, int lazy) ElfW(Addr) *got; ElfW(Sym) *sym; int i, n; - const char *strtab = (const void *) map->l_info[DT_STRTAB]->d_un.d_ptr; + const char *strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]); #define RESOLVE_GOTSYM(sym) \ ({ \ @@ -149,7 +149,7 @@ elf_machine_got_rel (struct link_map *map, int lazy) (ref)? sym_loadaddr + ref->st_value: 0; \ }) - got = (ElfW(Addr) *) map->l_info[DT_PLTGOT]->d_un.d_ptr; + got = (ElfW(Addr) *) D_PTR (map, l_info[DT_PLTGOT]); /* got[0] is reserved. got[1] is also reserved for the dynamic object generated by gnu ld. Skip these reserved entries from relocation. */ @@ -161,7 +161,7 @@ elf_machine_got_rel (struct link_map *map, int lazy) /* Handle global got entries. */ got += n; - sym = (ElfW(Sym) *) map->l_info[DT_SYMTAB]->d_un.d_ptr; + sym = (ElfW(Sym) *) D_PTR (map, l_info[DT_SYMTAB]); sym += map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val; i = (map->l_info[DT_MIPS (SYMTABNO)]->d_un.d_val - map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val); @@ -224,7 +224,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) Their initial contents will arrange when called to put an offset into the .dynsym section in t8, the return address in t7 and then jump to _GLOBAL_OFFSET_TABLE[0]. */ - got = (ElfW(Addr) *) l->l_info[DT_PLTGOT]->d_un.d_ptr; + got = (ElfW(Addr) *) D_PTR (l, l_info[DT_PLTGOT]); /* This function will get called to fix up the GOT entry indicated by the register t8, and then jump to the resolved address. */ @@ -337,10 +337,10 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \ { \ struct link_map *l = elf_machine_runtime_link_map (old_gpreg, stub_pc); \ const ElfW(Sym) *const symtab \ - = (const ElfW(Sym) *) l->l_info[DT_SYMTAB]->d_un.d_ptr; \ - const char *strtab = (const void *) l->l_info[DT_STRTAB]->d_un.d_ptr; \ + = (const ElfW(Sym) *) D_PTR (l, l_info[DT_SYMTAB]); \ + const char *strtab = (const void *) D_PTR (l, l_info[DT_STRTAB]); \ const ElfW(Addr) *got \ - = (const ElfW(Addr) *) l->l_info[DT_PLTGOT]->d_un.d_ptr; \ + = (const ElfW(Addr) *) D_PTR (l, l_info[DT_PLTGOT]); \ const ElfW(Word) local_gotno \ = (const ElfW(Word)) l->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; \ const ElfW(Word) gotsym \ From 5fa399b6c11863e78fd9febf12e61afb19789b84 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 26 Mar 2000 18:40:17 +0000 Subject: [PATCH 1957/4487] Define _FPU_MASK_IM, _FPU_MASK_ZM, _FPU_MASK_OM, _FPU_MASK_UM, _FPU_MASK_PM, _FPU_MASK_DM, _FPU_DEFAULT, and _FPU_IEEE. Change _FPU_RESERVED. --- sysdeps/arm/fpu/fpu_control.h | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/sysdeps/arm/fpu/fpu_control.h b/sysdeps/arm/fpu/fpu_control.h index b5338c5755..dfcfaabfcd 100644 --- a/sysdeps/arm/fpu/fpu_control.h +++ b/sysdeps/arm/fpu/fpu_control.h @@ -1,5 +1,5 @@ /* FPU control word definitions. ARM version. - Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 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 @@ -23,12 +23,12 @@ /* We have a slight terminology confusion here. On the ARM, the register * we're interested in is actually the FPU status word - the FPU control * word is something different (which is implementation-defined and only - * accessible from supervisor mode.) + * accessible from supervisor mode.) * * The FPSR looks like this: * * 31-24 23-16 15-8 7-0 - * | system ID | trap enable | system control | exception flags | + * | system ID | trap enable | system control | exception flags | * * We ignore the system ID bits; for interest's sake they are: * @@ -40,7 +40,7 @@ * The trap enable and exception flags are both structured like this: * * 7 - 5 4 3 2 1 0 - * | reserved | INX | UFL | OFL | DVZ | IVO | + * | reserved | INX | UFL | OFL | DVZ | IVO | * * where a `1' bit in the enable byte means that the trap can occur, and * a `1' bit in the flags byte means the exception has occurred. @@ -57,7 +57,7 @@ * * 7-5 4 3 2 1 0 * | reserved | AC | EP | SO | NE | ND | - * + * * where the bits mean * * ND - no denormalised numbers (force them all to zero) @@ -67,11 +67,27 @@ * AC - use alternate definition for C flag on compare operations */ -#define _FPU_RESERVED 0xfff0e0f0 /* These bits are reserved. */ +/* masking of interrupts */ +#define _FPU_MASK_IM 0x00010000 /* invalid operation */ +#define _FPU_MASK_ZM 0x00020000 /* divide by zero */ +#define _FPU_MASK_OM 0x00040000 /* overflow */ +#define _FPU_MASK_UM 0x00080000 /* underflow */ +#define _FPU_MASK_PM 0x00100000 /* inexact */ +#define _FPU_MASK_DM 0x00000000 /* denormalized operation */ + +/* The system id bytes cannot be changed. + Only the bottom 5 bits in the trap enable byte can be changed. + Only the bottom 5 bits in the system control byte can be changed. + Only the bottom 5 bits in the exception flags are used. + The exception flags are set by the fpu, but can be zeroed by the user. */ +#define _FPU_RESERVED 0xffe0e0e0 /* These bits are reserved. */ -/* The fdlibm code requires no interrupts for exceptions. Don't - change the rounding mode, it would break long double I/O! */ -#define _FPU_DEFAULT 0x00001000 /* Default value. */ +/* The fdlibm code requires strict IEEE double precision arithmetic, + no interrupts for exceptions, rounding to nearest. Changing the + rounding mode will break long double I/O. Turn on the AC bit, + the compiler generates code that assumes it is on. */ +#define _FPU_DEFAULT 0x00001000 /* Default value. */ +#define _FPU_IEEE 0x001f1000 /* Default + exceptions enabled. */ /* Type of the control word. */ typedef unsigned int fpu_control_t; From 0d4d1e01f94aa3692c65471e59a6378c47746776 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 26 Mar 2000 18:41:48 +0000 Subject: [PATCH 1958/4487] Processor context definitions for Linux/Arm. --- sysdeps/unix/sysv/linux/arm/sys/ucontext.h | 94 ++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/sys/ucontext.h diff --git a/sysdeps/unix/sysv/linux/arm/sys/ucontext.h b/sysdeps/unix/sysv/linux/arm/sys/ucontext.h new file mode 100644 index 0000000000..6e51efec99 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/sys/ucontext.h @@ -0,0 +1,94 @@ +/* Copyright (C) 1998, 1999 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* System V/ARM ABI compliant context switching support. */ + +#ifndef _SYS_UCONTEXT_H +#define _SYS_UCONTEXT_H 1 + +#include +#include +#include + +typedef int greg_t; + +/* Number of general registers. */ +#define NGREG 16 + +/* Container for all general registers. */ +typedef elf_gregset_t gregset_t; + +/* Number of each register is the `gregset_t' array. */ +enum +{ + R0 = 0, +#define R0 R0 + R1 = 1, +#define R1 R1 + R2 = 2, +#define R2 R2 + R3 = 3, +#define R3 R3 + R4 = 4, +#define R4 R4 + R5 = 5, +#define R5 R5 + R6 = 6, +#define R6 R6 + R7 = 7, +#define R7 R7 + R8 = 8, +#define R8 R8 + R9 = 9, +#define R9 R9 + R10 = 10, +#define R10 R10 + R11 = 11, +#define R11 R11 + R12 = 12, +#define R12 R12 + R13 = 13, +#define R13 R13 + R14 = 14, +#define R14 R14 + R15 = 15, +#define R15 R15 +}; + +/* Structure to describe FPU registers. */ +typedef elf_fpregset_t fpregset_t; + +/* Context to describe whole processor state. */ +typedef struct + { + gregset_t gregs; + fpregset_t fpregs; + } mcontext_t; + +/* Userlevel context. */ +typedef struct ucontext + { + unsigned long int uc_flags; + struct ucontext *uc_link; + __sigset_t uc_sigmask; + stack_t uc_stack; + mcontext_t uc_mcontext; + long int uc_filler[5]; + } ucontext_t; + +#endif /* sys/ucontext.h */ From e9290bfa084fb81cee8f7c64df9d9f52521d81ca Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 26 Mar 2000 20:29:55 +0000 Subject: [PATCH 1959/4487] (ELF_MACHINE_RUNTIME_TRAMPOLINE): Use a C comment, not an assembly comment. --- sysdeps/alpha/dl-machine.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 78a6f502ed..d0b5c485ea 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. Alpha version. - Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson . @@ -254,7 +254,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) #ifndef PROF #define ELF_MACHINE_RUNTIME_TRAMPOLINE \ TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup, imb); \ - TRAMPOLINE_TEMPLATE (_dl_runtime_profile, profile_fixup, #nop); + TRAMPOLINE_TEMPLATE (_dl_runtime_profile, profile_fixup, /* nop */); #else #define ELF_MACHINE_RUNTIME_TRAMPOLINE \ TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup, imb); \ From 6955b182f170f934d78a8cdf4146662f84c48a38 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 26 Mar 2000 20:30:58 +0000 Subject: [PATCH 1960/4487] Clarify use of __ASSUME_32BITUIDS. --- sysdeps/unix/sysv/linux/alpha/msgctl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/msgctl.c b/sysdeps/unix/sysv/linux/alpha/msgctl.c index 2d07b1f400..93a9bf2618 100644 --- a/sysdeps/unix/sysv/linux/alpha/msgctl.c +++ b/sysdeps/unix/sysv/linux/alpha/msgctl.c @@ -51,6 +51,9 @@ int __new_msgctl (int, int, struct msqid_ds *); int __new_msgctl (int msqid, int cmd, struct msqid_ds *buf) { + /* This is a misnomer -- Alpha had 32-bit uids at the beginning + of time. However, msg_qnum and msg_qbytes changed size at + the same time the size of uid changed elsewhere. */ #if __ASSUME_32BITUIDS > 0 return INLINE_SYSCALL (msgctl, 3, msqid, cmd | __IPC_64, buf); #else From 17e74c26b7996d83fea6d4a4b92aa89449cea11a Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 29 Mar 2000 11:18:48 +0000 Subject: [PATCH 1961/4487] 2000-03-29 Andreas Jaeger * sysdeps/mips/fpu/fclrexcpt.c: Use shlib-compat macros. * sysdeps/mips/fpu/fegetenv.c: Likewise. * sysdeps/mips/fpu/fesetenv.c: Likewise. * sysdeps/mips/fpu/feupdateenv.c: Likewise. * sysdeps/mips/fpu/fgetexcptflg.c: Likewise. --- sysdeps/mips/fpu/fclrexcpt.c | 9 ++++++--- sysdeps/mips/fpu/fegetenv.c | 9 ++++++--- sysdeps/mips/fpu/fesetenv.c | 9 ++++++--- sysdeps/mips/fpu/feupdateenv.c | 9 ++++++--- sysdeps/mips/fpu/fgetexcptflg.c | 9 ++++++--- 5 files changed, 30 insertions(+), 15 deletions(-) diff --git a/sysdeps/mips/fpu/fclrexcpt.c b/sysdeps/mips/fpu/fclrexcpt.c index 93915d6a5d..62bb8b101b 100644 --- a/sysdeps/mips/fpu/fclrexcpt.c +++ b/sysdeps/mips/fpu/fclrexcpt.c @@ -1,7 +1,7 @@ /* Clear given exceptions in current floating-point environment. Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. - Contributed by Andreas Jaeger , 1998. + Contributed by Andreas Jaeger , 1998. 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,6 +20,7 @@ #include #include +#include int __feclearexcept (int excepts) @@ -41,6 +42,8 @@ __feclearexcept (int excepts) /* Success. */ return 0; } +#ifdef SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__feclearexcept, __old_feclearexcept) -symbol_version (__old_feclearexcept, feclearexcept, GLIBC_2.1); -default_symbol_version (__feclearexcept, feclearexcept, GLIBC_2.2); +compat_symbol (libm, __old_feclearexcept, feclearexcept, GLIBC_2_1); +#endif +versioned_symbol (libm, __feclearexcept, feclearexcept, GLIBC_2_2); diff --git a/sysdeps/mips/fpu/fegetenv.c b/sysdeps/mips/fpu/fegetenv.c index de263ca044..d3ba0db76f 100644 --- a/sysdeps/mips/fpu/fegetenv.c +++ b/sysdeps/mips/fpu/fegetenv.c @@ -1,7 +1,7 @@ /* Store current floating-point environment. Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. - Contributed by Andreas Jaeger , 1998. + Contributed by Andreas Jaeger , 1998. 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,6 +20,7 @@ #include #include +#include int __fegetenv (fenv_t *envp) @@ -29,6 +30,8 @@ __fegetenv (fenv_t *envp) /* Success. */ return 0; } +#ifdef SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__fegetenv, __old_fegetenv) -symbol_version (__old_fegetenv, fegetenv, GLIBC_2.1); -default_symbol_version (__fegetenv, fegetenv, GLIBC_2.2); +compat_symbol (libm, __old_fegetenv, fegetenv, GLIBC_2_1); +#endif +versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2); diff --git a/sysdeps/mips/fpu/fesetenv.c b/sysdeps/mips/fpu/fesetenv.c index 37e9027b2c..f409ac5239 100644 --- a/sysdeps/mips/fpu/fesetenv.c +++ b/sysdeps/mips/fpu/fesetenv.c @@ -1,7 +1,7 @@ /* Install given floating-point environment. Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. - Contributed by Andreas Jaeger , 1998. + Contributed by Andreas Jaeger , 1998. 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,6 +20,7 @@ #include #include +#include int __fesetenv (const fenv_t *envp) @@ -32,6 +33,8 @@ __fesetenv (const fenv_t *envp) /* Success. */ return 0; } +#ifdef SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__fesetenv, __old_fesetenv) -symbol_version (__old_fesetenv, fesetenv, GLIBC_2.1); -default_symbol_version (__fesetenv, fesetenv, GLIBC_2.2); +compat_symbol (libm, __old_fesetenv, fesetenv, GLIBC_2_1); +#endif +versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2); diff --git a/sysdeps/mips/fpu/feupdateenv.c b/sysdeps/mips/fpu/feupdateenv.c index 8c24881449..439405983e 100644 --- a/sysdeps/mips/fpu/feupdateenv.c +++ b/sysdeps/mips/fpu/feupdateenv.c @@ -1,7 +1,7 @@ /* Install given floating-point environment and raise exceptions. Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. - Contributed by Andreas Jaeger , 1998. + Contributed by Andreas Jaeger , 1998. 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,6 +20,7 @@ #include #include +#include int __feupdateenv (const fenv_t *envp) @@ -41,6 +42,8 @@ __feupdateenv (const fenv_t *envp) /* Success. */ return 0; } +#ifdef SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__feupdateenv, __old_feupdateenv) -symbol_version (__old_feupdateenv, feupdateenv, GLIBC_2.1); -default_symbol_version (__feupdateenv, feupdateenv, GLIBC_2.2); +compat_symbol (libm, __old_feupdateenv, feupdateenv, GLIBC_2_1); +#endif +versioned_symbol (libm, __feupdateenv, feupdateenv, GLIBC_2_2); diff --git a/sysdeps/mips/fpu/fgetexcptflg.c b/sysdeps/mips/fpu/fgetexcptflg.c index 64a2e11e1b..17696dbf41 100644 --- a/sysdeps/mips/fpu/fgetexcptflg.c +++ b/sysdeps/mips/fpu/fgetexcptflg.c @@ -1,7 +1,7 @@ /* Store current representation for exceptions. Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. - Contributed by Andreas Jaeger , 1998. + Contributed by Andreas Jaeger , 1998. 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,6 +20,7 @@ #include #include +#include int __fegetexceptflag (fexcept_t *flagp, int excepts) @@ -34,6 +35,8 @@ __fegetexceptflag (fexcept_t *flagp, int excepts) /* Success. */ return 0; } +#ifdef SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__fegetexceptflag, __old_fegetexceptflag) -symbol_version (__old_fegetexceptflag, fegetexceptflag, GLIBC_2.1); -default_symbol_version (__fegetexceptflag, fegetexceptflag, GLIBC_2.2); +compat_symbol (libm, __old_fegetexceptflag, fegetexceptflag, GLIBC_2_1); +#endif +versioned_symbol (libm, __fegetexceptflag, fegetexceptflag, GLIBC_2_2); From 7189e3b80753a9b159029c19f9848bdcde7efbbf Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 31 Mar 2000 05:16:19 +0000 Subject: [PATCH 1962/4487] Use D_PTR to access relocated entries in l_info. --- sysdeps/alpha/dl-machine.h | 8 ++++---- sysdeps/arm/dl-machine.h | 6 +++--- sysdeps/m68k/dl-machine.h | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index d0b5c485ea..ad79ef669c 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -97,7 +97,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) /* The GOT entries for the functions in the PLT have not been filled in yet. Their initial contents are directed to the PLT which arranges for the dynamic linker to be called. */ - plt = l->l_info[DT_PLTGOT]->d_un.d_ptr; + plt = D_PTR (l, l_info[DT_PLTGOT]); /* This function will be called to perform the relocation. */ if (!profile) @@ -349,8 +349,8 @@ elf_machine_fixup_plt(struct link_map *l, const Elf64_Rela *reloc, /* Recover the PLT entry address by calculating reloc's index into the .rela.plt, and finding that entry in the .plt. */ - rela_plt = (void *) l->l_info[DT_JMPREL]->d_un.d_ptr; - plte = (void *) (l->l_info[DT_PLTGOT]->d_un.d_ptr + 32); + rela_plt = (void *) D_PTR (l, l_info[DT_JMPREL]); + plte = (void *) (D_PTR (l, [DT_PLTGOT]) + 32); plte += 3 * (reloc - rela_plt); /* Find the displacement from the plt entry to the function. */ @@ -480,7 +480,7 @@ elf_machine_rela (struct link_map *map, than the dynamic linker's built-in definitions used while loading those libraries. */ const Elf64_Sym *const dlsymtab - = (void *) map->l_info[DT_SYMTAB]->d_un.d_ptr; + = (void *) D_PTR (map, l_info[DT_SYMTAB]); sym_value -= map->l_addr; sym_value -= dlsymtab[ELF64_R_SYM(reloc->r_info)].st_value; sym_value -= reloc->r_addend; diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 78341fc49a..d95cb67f90 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. ARM version. - Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1995,96,97,98,99,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 @@ -97,7 +97,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) in. Their initial contents will arrange when called to push an index into the .got section, load ip with &_GLOBAL_OFFSET_TABLE_[3], and then jump to _GLOBAL_OFFSET_TABLE[2]. */ - got = (Elf32_Addr *) l->l_info[DT_PLTGOT]->d_un.d_ptr; + got = (Elf32_Addr *) D_PTR (l, l_info[DT_PLTGOT]); got[1] = (Elf32_Addr) l; /* Identify this shared object. */ /* The got[2] entry contains the address of a function which gets @@ -413,7 +413,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, { const char *strtab; - strtab = (const void *) map->l_info[DT_STRTAB]->d_un.d_ptr; + strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]); _dl_sysdep_error (_dl_argv[0] ?: "", ": Symbol `", strtab + refsym->st_name, "' has different size in shared object, " diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index e3ebca5a9d..7a5dd351e6 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. m68k version. - Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1996, 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 @@ -78,7 +78,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) to push an offset into the .rela.plt section, push _GLOBAL_OFFSET_TABLE_[1], and then jump to _GLOBAL_OFFSET_TABLE_[2]. */ - got = (Elf32_Addr *) l->l_info[DT_PLTGOT]->d_un.d_ptr; + got = (Elf32_Addr *) D_PTR (l, l_info[DT_PLTGOT]); got[1] = (Elf32_Addr) l; /* Identify this shared object. */ /* The got[2] entry contains the address of a function which gets @@ -289,7 +289,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, extern char **_dl_argv; const char *strtab; - strtab = (const void *) map->l_info[DT_STRTAB]->d_un.d_ptr; + strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]); _dl_sysdep_error (_dl_argv[0] ?: "", ": Symbol `", strtab + refsym->st_name, "' has different size in shared object, " From 0772663d31d215458d3a85f3954e5b297ed84e40 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 31 Mar 2000 05:39:18 +0000 Subject: [PATCH 1963/4487] Use shlib-compat macros. --- sysdeps/unix/sysv/linux/alpha/adjtime.c | 25 ++++++---------- sysdeps/unix/sysv/linux/alpha/msgctl.c | 8 ++---- sysdeps/unix/sysv/linux/alpha/oldglob.c | 19 +++++++------ sysdeps/unix/sysv/linux/alpha/semctl.c | 7 ++--- sysdeps/unix/sysv/linux/alpha/shmctl.c | 7 ++--- sysdeps/unix/sysv/linux/arm/errlist.c | 27 +++++++++--------- sysdeps/unix/sysv/linux/arm/siglist.c | 38 +++++++++---------------- 7 files changed, 53 insertions(+), 78 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/adjtime.c b/sysdeps/unix/sysv/linux/alpha/adjtime.c index b695ece380..63cc66daf2 100644 --- a/sysdeps/unix/sysv/linux/alpha/adjtime.c +++ b/sysdeps/unix/sysv/linux/alpha/adjtime.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 1998, 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 @@ -16,6 +16,8 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include + struct timeval32 { int tv_sec, tv_usec; @@ -54,7 +56,7 @@ struct timex32 { #define TIMEX timex32 #define ADJTIME __adjtime_tv32 #define ADJTIMEX(x) __adjtimex_tv32 (x) -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) #define LINKAGE #else #define LINKAGE static @@ -65,8 +67,8 @@ extern int ADJTIMEX (struct TIMEX *); #include -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING -symbol_version (__adjtime_tv32, adjtime, GLIBC_2.0); +#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) +compat_symbol (libc, __adjtime_tv32, adjtime, GLIBC_2.0); #endif #undef TIMEVAL @@ -117,11 +119,7 @@ __adjtime (itv, otv) return ret; } -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING -default_symbol_version (__adjtime, adjtime, GLIBC_2.1); -#else -weak_alias (__adjtime, adjtime); -#endif +versioned_symbol (libc, __adjtime, adjtime, GLIBC_2_1); extern int __syscall_adjtimex_tv64 (struct timex *tx); @@ -191,11 +189,6 @@ __adjtimex_tv64 (struct timex *tx) return ret; } -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING strong_alias (__adjtimex_tv64, __adjtimex_tv64p); -default_symbol_version (__adjtimex_tv64, __adjtimex, GLIBC_2.1); -default_symbol_version (__adjtimex_tv64p, adjtimex, GLIBC_2.1); -#else -weak_alias (__adjtimex_tv64, __adjtimex); -weak_alias (__adjtimex_tv64, adjtimex); -#endif +versioned_symbol (libc, __adjtimex_tv64, __adjtimex, GLIBC_2_1); +versioned_symbol (libc, __adjtimex_tv64p, adjtimex, GLIBC_2_1); diff --git a/sysdeps/unix/sysv/linux/alpha/msgctl.c b/sysdeps/unix/sysv/linux/alpha/msgctl.c index 93a9bf2618..693b4d4c2d 100644 --- a/sysdeps/unix/sysv/linux/alpha/msgctl.c +++ b/sysdeps/unix/sysv/linux/alpha/msgctl.c @@ -116,8 +116,6 @@ __new_msgctl (int msqid, int cmd, struct msqid_ds *buf) #endif } -#if defined PIC && DO_VERSIONING -default_symbol_version (__new_msgctl, msgctl, GLIBC_2.2); -#else -weak_alias (__new_msgctl, msgctl); -#endif +#include +versioned_symbol (libc, __new_msgctl, msgctl, GLIBC_2_2); + diff --git a/sysdeps/unix/sysv/linux/alpha/oldglob.c b/sysdeps/unix/sysv/linux/alpha/oldglob.c index f405fbf2bc..d85c50e769 100644 --- a/sysdeps/unix/sysv/linux/alpha/oldglob.c +++ b/sysdeps/unix/sysv/linux/alpha/oldglob.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2000 Free Software Foundation, Inc. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as @@ -19,8 +19,9 @@ became necessary since the glob_t structure changed. */ #include #include +#include -#if defined PIC && DO_VERSIONING +#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) /* This is the old structure. The difference is that the gl_pathc and gl_offs elements have type `int'. */ @@ -33,11 +34,11 @@ typedef struct /* If the GLOB_ALTDIRFUNC flag is set, the following functions are used instead of the normal file access functions. */ - void (*gl_closedir) __P ((void *)); - struct dirent *(*gl_readdir) __P ((void *)); - __ptr_t (*gl_opendir) __P ((__const char *)); - int (*gl_lstat) __P ((__const char *, struct stat *)); - int (*gl_stat) __P ((__const char *, struct stat *)); + void (*gl_closedir) (void *); + struct dirent *(*gl_readdir) (void *); + __ptr_t (*gl_opendir) (__const char *); + int (*gl_lstat) (__const char *, struct stat *); + int (*gl_stat) (__const char *, struct stat *); } old_glob_t; @@ -75,7 +76,7 @@ __old_glob (const char *pattern, int flags, return result; } -symbol_version(__old_glob, glob, GLIBC_2.0); +compat_symbol (libc, __old_glob, glob, GLIBC_2_0); /* Free storage allocated in PGLOB by a previous `glob' call. */ @@ -90,6 +91,6 @@ __old_globfree (old_glob_t *pglob) globfree (&correct); } -symbol_version(__old_globfree, globfree, GLIBC_2.0); +compat_symbol (libc, __old_globfree, globfree, GLIBC_2_0); #endif diff --git a/sysdeps/unix/sysv/linux/alpha/semctl.c b/sysdeps/unix/sysv/linux/alpha/semctl.c index 6281e44993..a4534744d3 100644 --- a/sysdeps/unix/sysv/linux/alpha/semctl.c +++ b/sysdeps/unix/sysv/linux/alpha/semctl.c @@ -125,8 +125,5 @@ __new_semctl (int semid, int semnum, int cmd, ...) #endif } -#if defined PIC && DO_VERSIONING -default_symbol_version (__new_semctl, semctl, GLIBC_2.2); -#else -weak_alias (__new_semctl, semctl); -#endif +#include +versioned_symbol (libc, __new_semctl, semctl, GLIBC_2_2); diff --git a/sysdeps/unix/sysv/linux/alpha/shmctl.c b/sysdeps/unix/sysv/linux/alpha/shmctl.c index 162afeee3d..ebda160d32 100644 --- a/sysdeps/unix/sysv/linux/alpha/shmctl.c +++ b/sysdeps/unix/sysv/linux/alpha/shmctl.c @@ -130,8 +130,5 @@ __new_shmctl (int shmid, int cmd, struct shmid_ds *buf) #endif } -#if defined PIC && DO_VERSIONING -default_symbol_version (__new_shmctl, shmctl, GLIBC_2.2); -#else -weak_alias (__new_shmctl, shmctl); -#endif +#include +versioned_symbol (libc, __new_shmctl, shmctl, GLIBC_2_2); diff --git a/sysdeps/unix/sysv/linux/arm/errlist.c b/sysdeps/unix/sysv/linux/arm/errlist.c index e249522514..c72ecd86fd 100644 --- a/sysdeps/unix/sysv/linux/arm/errlist.c +++ b/sysdeps/unix/sysv/linux/arm/errlist.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 1998, 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 @@ -18,18 +18,18 @@ #include #include +#include -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING - -# define SYS_ERRLIST __new_sys_errlist -# define SYS_NERR __new_sys_nerr +#define SYS_ERRLIST __new_sys_errlist +#define SYS_NERR __new_sys_nerr +#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) asm (".data; .globl __old_sys_errlist; __old_sys_errlist:"); #endif #include -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) asm (".type __old_sys_errlist,%object;.size __old_sys_errlist," OLD_ERRLIST_SIZE_STR "*" PTR_SIZE_STR); @@ -44,12 +44,11 @@ symbol_version (_old_sys_nerr, sys_nerr, GLIBC_2.0); weak_alias (__old_sys_errlist, _old_sys_errlist); symbol_version (__old_sys_errlist, _sys_errlist, GLIBC_2.0); symbol_version (_old_sys_errlist, sys_errlist, GLIBC_2.0); - -weak_alias (__new_sys_nerr, _new_sys_nerr) -default_symbol_version (__new_sys_nerr, _sys_nerr, GLIBC_2.1); -default_symbol_version (_new_sys_nerr, sys_nerr, GLIBC_2.1); -weak_alias (__new_sys_errlist, _new_sys_errlist) -default_symbol_version (__new_sys_errlist, _sys_errlist, GLIBC_2.1); -default_symbol_version (_new_sys_errlist, sys_errlist, GLIBC_2.1); - #endif + +strong_alias (__new_sys_nerr, _new_sys_nerr) +versioned_symbol (libc, __new_sys_nerr, _sys_nerr, GLIBC_2_1); +versioned_symbol (libc, _new_sys_nerr, sys_nerr, GLIBC_2_1); +strong_alias (__new_sys_errlist, _new_sys_errlist) +versioned_symbol (libc, __new_sys_errlist, _sys_errlist, GLIBC_2_1); +versioned_symbol (libc, _new_sys_errlist, sys_errlist, GLIBC_2_1); diff --git a/sysdeps/unix/sysv/linux/arm/siglist.c b/sysdeps/unix/sysv/linux/arm/siglist.c index 5d3a9afc53..3d7464e3e4 100644 --- a/sysdeps/unix/sysv/linux/arm/siglist.c +++ b/sysdeps/unix/sysv/linux/arm/siglist.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 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 @@ -20,41 +20,34 @@ #include #include #include +#include -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING -# define SYS_SIGLIST __new_sys_siglist -# define SYS_SIGABBREV __new_sys_sigabbrev -#else -# define SYS_SIGLIST _sys_siglist -# define SYS_SIGABBREV _sys_sigabbrev -#endif - -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) asm (".data; .globl __old_sys_siglist; __old_sys_siglist:"); #endif -const char *const SYS_SIGLIST[NSIG] = +const char *const __new_sys_siglist[NSIG] = { #define init_sig(sig, abbrev, desc) [sig] desc, #include "siglist.h" #undef init_sig }; -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) asm (".type __old_sys_siglist,%object;.size __old_sys_siglist," OLD_SIGLIST_SIZE_STR "*" PTR_SIZE_STR); asm (".data; .globl __old_sys_sigabbrev; __old_sys_sigabbrev:"); #endif -const char *const SYS_SIGABBREV[NSIG] = +const char *const __new_sys_sigabbrev[NSIG] = { #define init_sig(sig, abbrev, desc) [sig] abbrev, #include "siglist.h" #undef init_sig }; -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) asm (".type __old_sys_sigabbrev,%object;.size __old_sys_sigabbrev," OLD_SIGLIST_SIZE_STR "*" PTR_SIZE_STR); @@ -62,15 +55,12 @@ extern const char *const *__old_sys_siglist; extern const char *const *__old_sys_sigabbrev; strong_alias (__old_sys_siglist, _old_sys_siglist) -symbol_version (__old_sys_siglist, _sys_siglist, GLIBC_2.0); -symbol_version (_old_sys_siglist, sys_siglist, GLIBC_2.0); -symbol_version (__old_sys_sigabbrev, sys_sigabbrev, GLIBC_2.0); +compat_symbol (libc, __old_sys_siglist, _sys_siglist, GLIBC_2_0); +compat_symbol (libc, _old_sys_siglist, sys_siglist, GLIBC_2_0); +compat_symbol (libc, __old_sys_sigabbrev, sys_sigabbrev, GLIBC_2_0); +#endif strong_alias (__new_sys_siglist, _new_sys_siglist) -default_symbol_version (__new_sys_siglist, _sys_siglist, GLIBC_2.1); -default_symbol_version (_new_sys_siglist, sys_siglist, GLIBC_2.1); -default_symbol_version (__new_sys_sigabbrev, sys_sigabbrev, GLIBC_2.1); -#else -weak_alias (_sys_siglist, sys_siglist) -weak_alias (_sys_sigabbrev, sys_sigabbrev) -#endif +versioned_symbol (libc, __new_sys_siglist, _sys_siglist, GLIBC_2_1); +versioned_symbol (libc, _new_sys_siglist, sys_siglist, GLIBC_2_1); +versioned_symbol (libc, __new_sys_sigabbrev, sys_sigabbrev, GLIBC_2_1); From 73a35fc451eb39c20dbdd2004e38219308ec75e4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 31 Mar 2000 05:44:27 +0000 Subject: [PATCH 1964/4487] Use SHARED instead of PIC. --- sysdeps/arm/init-first.c | 4 ++-- sysdeps/mips/init-first.c | 4 ++-- sysdeps/mips/machine-gmon.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sysdeps/arm/init-first.c b/sysdeps/arm/init-first.c index 87f9f0a749..1e90c849a1 100644 --- a/sysdeps/arm/init-first.c +++ b/sysdeps/arm/init-first.c @@ -39,7 +39,7 @@ init (int *data) __getopt_clean_environment (envp); } -#ifdef PIC +#ifdef SHARED /* This function is called to initialize the shared C library. It is called just before the user _start code from i386/elf/start.S, with the stack set up as that code gets it. */ @@ -63,7 +63,7 @@ _init (int argc, ...) void __libc_init_first (int argc __attribute__ ((unused)), ...) { -#ifndef PIC +#ifndef SHARED init (&argc); #endif } diff --git a/sysdeps/mips/init-first.c b/sysdeps/mips/init-first.c index 3fc4b7bc04..309ff8bcf1 100644 --- a/sysdeps/mips/init-first.c +++ b/sysdeps/mips/init-first.c @@ -34,7 +34,7 @@ init (int *data) __libc_init (argc, argv, envp); } -#ifdef PIC +#ifdef SHARED /* This function is called to initialize the shared C library. It is called just before the user _start code from mips/elf/start.S, with the stack set up as that code gets it. */ @@ -58,7 +58,7 @@ _init (int argc, ...) void __libc_init_first (int argc __attribute__ ((unused)), ...) { -#ifndef PIC +#ifndef SHARED init (&argc); #endif } diff --git a/sysdeps/mips/machine-gmon.h b/sysdeps/mips/machine-gmon.h index a01b1746f4..8b35a9194d 100644 --- a/sysdeps/mips/machine-gmon.h +++ b/sysdeps/mips/machine-gmon.h @@ -1,5 +1,5 @@ /* Machine-specific calling sequence for `mcount' profiling function. MIPS - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 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 @@ -21,7 +21,7 @@ /* Call __mcount with our the return PC for our caller, and the return PC our caller will return to. */ -#ifdef PIC +#ifdef __PIC__ #define CPLOAD ".cpload $25;" #else #define CPLOAD From b1212cdb2f012c408ac03f7c35392dd49ac77144 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 31 Mar 2000 11:11:10 +0000 Subject: [PATCH 1965/4487] 2000-03-31 Andreas Jaeger * sysdeps/mips/fpu/fgetexcptflg.c: Fix last patch to use #if. * sysdeps/mips/fpu/fegetenv.c: Likewise. * sysdeps/mips/fpu/feupdateenv.c: Likewise. * sysdeps/mips/fpu/fclrexcpt.c: Likewise. * sysdeps/mips/fpu/fesetenv.c: Likewise. --- sysdeps/mips/fpu/fclrexcpt.c | 2 +- sysdeps/mips/fpu/fegetenv.c | 2 +- sysdeps/mips/fpu/fesetenv.c | 2 +- sysdeps/mips/fpu/feupdateenv.c | 2 +- sysdeps/mips/fpu/fgetexcptflg.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sysdeps/mips/fpu/fclrexcpt.c b/sysdeps/mips/fpu/fclrexcpt.c index 62bb8b101b..9ed8486f6f 100644 --- a/sysdeps/mips/fpu/fclrexcpt.c +++ b/sysdeps/mips/fpu/fclrexcpt.c @@ -42,7 +42,7 @@ __feclearexcept (int excepts) /* Success. */ return 0; } -#ifdef SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__feclearexcept, __old_feclearexcept) compat_symbol (libm, __old_feclearexcept, feclearexcept, GLIBC_2_1); #endif diff --git a/sysdeps/mips/fpu/fegetenv.c b/sysdeps/mips/fpu/fegetenv.c index d3ba0db76f..5882305566 100644 --- a/sysdeps/mips/fpu/fegetenv.c +++ b/sysdeps/mips/fpu/fegetenv.c @@ -30,7 +30,7 @@ __fegetenv (fenv_t *envp) /* Success. */ return 0; } -#ifdef SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__fegetenv, __old_fegetenv) compat_symbol (libm, __old_fegetenv, fegetenv, GLIBC_2_1); #endif diff --git a/sysdeps/mips/fpu/fesetenv.c b/sysdeps/mips/fpu/fesetenv.c index f409ac5239..7ae688a6b1 100644 --- a/sysdeps/mips/fpu/fesetenv.c +++ b/sysdeps/mips/fpu/fesetenv.c @@ -33,7 +33,7 @@ __fesetenv (const fenv_t *envp) /* Success. */ return 0; } -#ifdef SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__fesetenv, __old_fesetenv) compat_symbol (libm, __old_fesetenv, fesetenv, GLIBC_2_1); #endif diff --git a/sysdeps/mips/fpu/feupdateenv.c b/sysdeps/mips/fpu/feupdateenv.c index 439405983e..86ba6f90e1 100644 --- a/sysdeps/mips/fpu/feupdateenv.c +++ b/sysdeps/mips/fpu/feupdateenv.c @@ -42,7 +42,7 @@ __feupdateenv (const fenv_t *envp) /* Success. */ return 0; } -#ifdef SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__feupdateenv, __old_feupdateenv) compat_symbol (libm, __old_feupdateenv, feupdateenv, GLIBC_2_1); #endif diff --git a/sysdeps/mips/fpu/fgetexcptflg.c b/sysdeps/mips/fpu/fgetexcptflg.c index 17696dbf41..0f7fea3941 100644 --- a/sysdeps/mips/fpu/fgetexcptflg.c +++ b/sysdeps/mips/fpu/fgetexcptflg.c @@ -35,7 +35,7 @@ __fegetexceptflag (fexcept_t *flagp, int excepts) /* Success. */ return 0; } -#ifdef SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__fegetexceptflag, __old_fegetexceptflag) compat_symbol (libm, __old_fegetexceptflag, fegetexceptflag, GLIBC_2_1); #endif From 3a344e73cc6c0b6cb75645f41438418c0fe6c955 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 31 Mar 2000 12:35:12 +0000 Subject: [PATCH 1966/4487] 2000-03-31 Andreas Jaeger * sysdeps/mips/dl-machine.h (RTLD_START): Rewritten to match new init function interface. * sysdeps/mips/mips64/dl-machine.h (RTLD_START): Likewise. --- sysdeps/mips/dl-machine.h | 53 ++++++++------------------------ sysdeps/mips/mips64/dl-machine.h | 46 +++++++++++++++------------ 2 files changed, 39 insertions(+), 60 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 188e9ae136..ce5f0f94f2 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -342,8 +342,10 @@ _dl_start_user:\n\ .cpload $25\n\ .set reorder\n\ move $16, $28\n\ - # Save the user entry point address in saved register.\n\ + # Save the user entry point address in a saved register.\n\ move $17, $2\n\ + # Store the highest stack address\n\ + sw $29, __libc_stack_end\n\ # See if we were run as a command with the executable file\n\ # name as an extra leading argument.\n\ lw $2, _dl_skip_args\n\ @@ -353,48 +355,19 @@ _dl_start_user:\n\ # Subtract _dl_skip_args from it.\n\ subu $4, $2\n\ # Adjust the stack pointer to skip _dl_skip_args words.\n\ - sll $2,2\n\ + sll $2, 2\n\ addu $29, $2\n\ # Save back the modified argument count.\n\ sw $4, 0($29)\n\ -1: subu $29, 16\n\ -2: # Push the searchlist of the main object as argument in\n\ - # the _dl_preinit_next and _dl_init_next calls below.\n\ - lw $4, _dl_main_searchlist\n\ - # First run the pre-initializers.\n\ - # Call _dl_preinit_next to return the address of an initializer\n\ - # function to run.\n\ - jal _dl_preinit_next - move $28, $16\n\ - # Check for zero return, when out of initializers.\n\ - beq $2, $0, 4f\n\ - # Call the pre-initializer.\n\ - move $25, $2\n\ - jalr $25\n\ - move $28, $16\n - # Loop to call _dl_preinit_next for the next initializer.\n\ - b 2b\n -4: lw $4, _dl_main_searchlist\n\ - # Call _dl_init_next to return the address of an initializer\n\ - # function to run.\n\ - jal _dl_init_next\n\ - move $28, $16\n\ - # Check for zero return, when out of initializers.\n\ - beq $2, $0, 2f\n\ - # Call the shared object initializer function.\n\ - move $25, $2\n\ - # XXX This looks broken ###.\n\ - lw $4, 0($29)\n\ - lw $5, 4($29)\n\ - lw $6, 8($29)\n\ - lw $7, 12($29)\n\ - jalr $25\n\ - move $28, $16\n\ - # Loop to call _dl_init_next for the next initializer.\n\ - b 4b\n\ -2: addiu $29, 16\n\ - # Clear the startup flag. Assumes 32 bit ints.\n\ - sw $0, _dl_starting_up\n\ +1: # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env) \n\ + lw $4, _dl_loaded\n\ + lw $5, 0($29)\n\ + la $6, 4($29)\n\ + la $7, 8($29)\n\ + subu $29, 16\n\ + # Call the function to run the initializers.\n\ + jal _dl_init + addiu $29, 16\n\ # Pass our finalizer function to the user in ra.\n\ la $31, _dl_fini\n\ # Jump to the user entry point.\n\ diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h index 01f9a95f12..c2f2f6e939 100644 --- a/sysdeps/mips/mips64/dl-machine.h +++ b/sysdeps/mips/mips64/dl-machine.h @@ -445,8 +445,10 @@ _RTLD_PROLOGUE (ENTRY_POINT)\ # doesn't say nothing about this, I emulate this here.\n\ dla $4, _DYNAMIC\n\ sd $4, -0x7ff0($28)\n\ + dsubu $29, 16\n\ move $4, $29\n\ jal _dl_start\n\ + daddiu $29, 16\n\ # Get the value of label '_dl_start_user' in t9 ($25).\n\ dla $25, _dl_start_user\n\ _dl_start_user:\n\ @@ -456,6 +458,8 @@ _dl_start_user:\n\ move $16, $28\n\ # Save the user entry point address in saved register.\n\ move $17, $2\n\ + # Store the highest stack address\n\ + sd $29, __libc_stack_end\n\ # See if we were run as a command with the executable file\n\ # name as an extra leading argument.\n\ ld $2, _dl_skip_args\n\ @@ -469,27 +473,29 @@ _dl_start_user:\n\ daddu $29, $2\n\ # Save back the modified argument count.\n\ sd $4, 0($29)\n\ - # Get _dl_default_scope[2] as argument in _dl_init_next call below.\n\ -1: dla $2, _dl_default_scope\n\ - ld $4, 2*8($2)\n\ - # Call _dl_init_next to return the address of an initializer\n\ - # function to run.\n\ - jal _dl_init_next\n\ - move $28, $16\n\ - # Check for zero return, when out of initializers.\n\ - beq $2, $0, 2f\n\ - # Call the shared object initializer function.\n\ - move $25, $2\n\ - ld $4, 0($29)\n\ - ld $5, 1*8($29)\n\ - ld $6, 2*8($29)\n\ - ld $7, 3*8($29)\n\ - jalr $25\n\ - move $28, $16\n\ - # Loop to call _dl_init_next for the next initializer.\n\ - b 1b\n\ +1: # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env) \n\ + ld $4, _dl_loaded\n\ + ld $5, 0($29)\n\ + dla $6, 4($29)\n\ + dla $7, 8($29)\n\ + dsubu $29, 16\n\ + # Call the function to run the initializers.\n\ + jal _dl_init + daddiu $29, 16\n\ + # Pass our finalizer function to the user in ra.\n\ + dla $31, _dl_fini\n\ + # Jump to the user entry point.\n\ +1: # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env) \n\ + lw $4, _dl_loaded\n\ + lw $5, 0($29)\n\ + la $6, 4($29)\n\ + la $7, 8($29)\n\ + subu $29, 16\n\ + # Call the function to run the initializers.\n\ + jal _dl_init + addiu $29, 16\n\ # Pass our finalizer function to the user in ra.\n\ -2: dla $31, _dl_fini\n\ + dla $31, _dl_fini\n\ # Jump to the user entry point.\n\ move $25, $17\n\ ld $4, 0($29)\n\ From 06554205501f8080767855dbc32810089172db70 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 1 Apr 2000 22:29:26 +0000 Subject: [PATCH 1967/4487] Linux/Alpha specific definitions for . --- sysdeps/unix/sysv/linux/alpha/bits/netdb.h | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/netdb.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/netdb.h b/sysdeps/unix/sysv/linux/alpha/bits/netdb.h new file mode 100644 index 0000000000..f5a33d998d --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/bits/netdb.h @@ -0,0 +1,35 @@ +/* Copyright (C) 1996, 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 modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 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 Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If + not, write to the Free Software Foundation, Inc., 59 Temple Place - + Suite 330, Boston, MA 02111-1307, USA. */ + +#ifndef _NETDB_H +# error "Never include directly; use instead." +#endif + + +/* Description of data base entry for a single network. NOTE: here a + poor assumption is made. The network number is expected to fit + into an unsigned long int variable. */ +struct netent +{ + char *n_name; /* Official name of network. */ + char **n_aliases; /* Alias list. */ + int n_addrtype; /* Net address type. */ + /* XXX We should probably use uint32_t for the field and ensure + compatiblity by adding appropriate padding. */ + unsigned long int n_net; /* Network number. */ +}; From 9de792e3c0cb05a1d7cf17dc5f2dc19e10847fc3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 2 Apr 2000 07:59:31 +0000 Subject: [PATCH 1968/4487] (__gethostname): Change type of second parameter to socklen_t. --- sysdeps/unix/sysv/sysv4/gethostname.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/sysv4/gethostname.c b/sysdeps/unix/sysv/sysv4/gethostname.c index 558d16e6f8..3f967e15d4 100644 --- a/sysdeps/unix/sysv/sysv4/gethostname.c +++ b/sysdeps/unix/sysv/sysv4/gethostname.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995, 1997, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -22,12 +22,12 @@ #include #include -extern int __sysinfo __P ((int command, char *buf, long count)); +extern int __sysinfo (int command, char *buf, long int count); int __gethostname (name, namelen) char *name; - size_t namelen; + socklen_t namelen; { return __sysinfo (SI_HOSTNAME, name, namelen); } From 23a7de4bb4d15afaab7edf400fc56f7573a23720 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 2 Apr 2000 08:01:25 +0000 Subject: [PATCH 1969/4487] Use __socklen_t to define socklen_t. Allow definition elsewhere. --- sysdeps/unix/sysv/aix/bits/socket.h | 5 ++++- sysdeps/unix/sysv/linux/mips/bits/socket.h | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/aix/bits/socket.h b/sysdeps/unix/sysv/aix/bits/socket.h index e89735453a..eb5b766e24 100644 --- a/sysdeps/unix/sysv/aix/bits/socket.h +++ b/sysdeps/unix/sysv/aix/bits/socket.h @@ -32,7 +32,10 @@ #include /* Type for length arguments in socket calls. */ -typedef unsigned int socklen_t; +#ifndef __socklen_t_defined +typedef __socklen_t socklen_t; +# define __socklen_t_defined +#endif /* Types of sockets. */ enum __socket_type diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h index 747b11905d..1462331ff7 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/socket.h +++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h @@ -32,7 +32,10 @@ #include /* Type for length arguments in socket calls. */ -typedef unsigned int socklen_t; +#ifndef __socklen_t_defined +typedef __socklen_t socklen_t; +# define __socklen_t_defined +#endif /* Types of sockets. */ enum __socket_type From b05b3eb67f3b2fbe431f5c340b0c78a2b9084fa2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 2 Apr 2000 08:05:11 +0000 Subject: [PATCH 1970/4487] Define __socklen_t. --- sysdeps/unix/sysv/aix/bits/types.h | 5 ++++- sysdeps/unix/sysv/hpux/bits/types.h | 7 +++++-- sysdeps/unix/sysv/linux/alpha/bits/types.h | 5 ++++- sysdeps/unix/sysv/linux/mips/bits/types.h | 5 ++++- sysdeps/unix/sysv/sysv4/solaris2/bits/types.h | 5 ++++- 5 files changed, 21 insertions(+), 6 deletions(-) diff --git a/sysdeps/unix/sysv/aix/bits/types.h b/sysdeps/unix/sysv/aix/bits/types.h index c41b34c1ef..830dcea7b0 100644 --- a/sysdeps/unix/sysv/aix/bits/types.h +++ b/sysdeps/unix/sysv/aix/bits/types.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,92,94,95,96,97,98,99 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,94,95,96,97,98,99, 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 @@ -145,4 +145,7 @@ typedef unsigned int __t_uscalar_t; /* Duplicates info from stdint.h but this is used in unistd.h. */ typedef int __intptr_t; +/* Duplicate info from sys/socket.h. */ +typedef unsigned int __socklen_t; + #endif /* bits/types.h */ diff --git a/sysdeps/unix/sysv/hpux/bits/types.h b/sysdeps/unix/sysv/hpux/bits/types.h index 86595e87a8..e95892eda3 100644 --- a/sysdeps/unix/sysv/hpux/bits/types.h +++ b/sysdeps/unix/sysv/hpux/bits/types.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 92, 94, 95, 96, 97, 98 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1994-1998, 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 @@ -103,7 +103,7 @@ typedef struct from the global namespace. */ #ifdef __USE_XOPEN __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS]; -# define __FDS_BITS(set) ((set)->fds_bits) +# define __FDS_BITS(set) ((set)->fds_bits) #else __fd_mask __fds_bits[__FD_SETSIZE / __NFDBITS]; # define __FDS_BITS(set) ((set)->__fds_bits) @@ -144,4 +144,7 @@ typedef unsigned int __t_uscalar_t; /* Duplicates info from stdint.h but this is used in unistd.h. */ typedef int __intptr_t; +/* Duplicate info from sys/socket.h. */ +typedef unsigned int __socklen_t; + #endif /* bits/types.h */ diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h index 8a79621cc6..722db9e230 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/types.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,92,94,95,96,97,98,99 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,94,95,96,97,98,99, 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 @@ -123,6 +123,9 @@ typedef unsigned long int __t_uscalar_t; /* Duplicates info from stdint.h but this is used in unistd.h. */ typedef long int __intptr_t; +/* Duplicate info from sys/socket.h. */ +typedef unsigned int __socklen_t; + /* Now add the thread types. */ #ifdef __USE_UNIX98 diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h index 48a9bf07e1..6bb07e7b13 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/types.h +++ b/sysdeps/unix/sysv/linux/mips/bits/types.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,92,94,95,96,97,98,99 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,94,95,96,97,98,99, 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 @@ -149,6 +149,9 @@ typedef unsigned long int __t_uscalar_t; /* Duplicates info from stdint.h but this is used in unistd.h. */ typedef int __intptr_t; +/* Duplicate info from sys/socket.h. */ +typedef unsigned int __socklen_t; + /* Now add the thread types. */ #ifdef __USE_UNIX98 diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h index 1e7b50e780..65ad002f79 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,92,94,95,96,97,98,99 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,94,95,96,97,98,99, 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 @@ -134,4 +134,7 @@ typedef unsigned int __t_uscalar_t; /* Duplicates info from stdint.h but this is used in unistd.h. */ typedef long int __intptr_t; +/* Duplicate info from sys/socket.h. */ +typedef unsigned int __socklen_t; + #endif /* bits/types.h */ From 776dbc655186db1622dce7bb0b0b0f273a20ab62 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 3 Apr 2000 18:06:38 +0000 Subject: [PATCH 1971/4487] Atomic operations for Arm. --- sysdeps/arm/atomicity.h | 86 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 sysdeps/arm/atomicity.h diff --git a/sysdeps/arm/atomicity.h b/sysdeps/arm/atomicity.h new file mode 100644 index 0000000000..01bd64e465 --- /dev/null +++ b/sysdeps/arm/atomicity.h @@ -0,0 +1,86 @@ +/* Low-level functions for atomic operations. ARM version. + 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _ATOMICITY_H +#define _ATOMICITY_H 1 + +#include + + +static inline int +__attribute__ ((unused)) +exchange_and_add (volatile uint32_t *mem, int val) +{ + int tmp1; + int tmp2; + int result; + __asm__ ("\n" + "0:\tldr\t%0,[%3]\n\t" + "add\t%1,%0,%4\n\t" + "swp\t%2,%1,[%3]\n\t" + "cmp\t%0,%2\n\t" + "swpne\t%1,%2,[%3]\n\t" + "bne\t0b" + : "=&r" (result), "=&r" (tmp1), "=&r" (tmp2) + : "r" (mem), "r"(val) + : "cc", "memory"); + return result; +} + +static inline void +__attribute__ ((unused)) +atomic_add (volatile uint32_t *mem, int val) +{ + int tmp1; + int tmp2; + int tmp3; + __asm__ ("\n" + "0:\tldr\t%0,[%3]\n\t" + "add\t%1,%0,%4\n\t" + "swp\t%2,%1,[%3]\n\t" + "cmp\t%0,%2\n\t" + "swpne\t%1,%2,[%3]\n\t" + "bne\t0b" + : "=&r" (tmp1), "=&r" (tmp2), "=&r" (tmp3) + : "r" (mem), "r"(val) + : "cc", "memory"); +} + +static inline int +__attribute__ ((unused)) +compare_and_swap (volatile long int *p, long int oldval, long int newval) +{ + int result, tmp; + __asm__ ("\n" + "0:\tldr\t%1,[%2]\n\t" + "mov\t%0,#0\n\t" + "cmp\t%1,%4\n\t" + "bne\t1f\n\t" + "swp\t%0,%3,[%2]\n\t" + "cmp\t%1,%0\n\t" + "swpne\t%1,%0,[%2]\n\t" + "bne\t0b\n\t" + "mov\t%0,#1\n" + "1:" + : "=&r" (result), "=&r" (tmp) + : "r" (p), "r" (newval), "r" (oldval) + : "cc", "memory"); +} + +#endif /* atomicity.h */ From 5ef1c4a3c21e28a457e6fe0c70d85adf1d992256 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 4 Apr 2000 06:01:18 +0000 Subject: [PATCH 1972/4487] Use SHARED instead of PIC. --- sysdeps/mach/hurd/mips/init-first.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/mach/hurd/mips/init-first.c b/sysdeps/mach/hurd/mips/init-first.c index 825b063c62..72c7a61cb0 100644 --- a/sysdeps/mach/hurd/mips/init-first.c +++ b/sysdeps/mach/hurd/mips/init-first.c @@ -1,5 +1,5 @@ /* Initialization code run first thing by the ELF startup code. For Mips/Hurd. - Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 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 @@ -109,7 +109,7 @@ init1 (int argc, char *arg0, ...) /* This is a hack to make the special getopt in GNU libc working. */ __getopt_clean_environment (envp); -#ifdef PIC +#ifdef SHARED __libc_global_ctors (); #endif @@ -175,7 +175,7 @@ __init (int *data) (void) &__init; } -#ifdef PIC +#ifdef SHARED /* This function is called to initialize the shared C library. It is called just before the user _start code from mips/elf/start.S, with the stack set up as that code gets it. */ @@ -274,7 +274,7 @@ void __libc_init_first (int argc, ...) } #endif -#ifndef PIC +#ifndef SHARED /* An assembler code wrapping c function __init. */ #ifdef __mips64 asm ("\ From 9814bea9f327340f12b7159b9464b7dd4b8f59a8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 4 Apr 2000 06:02:00 +0000 Subject: [PATCH 1973/4487] Use __PIC__ instead of PIC. --- sysdeps/mach/mips/thread_state.h | 4 ++-- sysdeps/unix/mips/sysdep.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/mach/mips/thread_state.h b/sysdeps/mach/mips/thread_state.h index 17334cf810..7aa5598f2b 100644 --- a/sysdeps/mach/mips/thread_state.h +++ b/sysdeps/mach/mips/thread_state.h @@ -1,5 +1,5 @@ /* Mach thread state definitions for machine-independent code. MIPS version. - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 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 @@ -20,7 +20,7 @@ #define MACHINE_THREAD_STATE_FLAVOR MIPS_THREAD_STATE #define MACHINE_THREAD_STATE_COUNT MIPS_THREAD_STATE_COUNT -#ifdef PIC +#ifdef __PIC__ #define MACHINE_THREAD_STATE_SET_PC(ts, pc) \ ((ts)->PC = (ts)->r25 = (unsigned long int) (pc)) #endif diff --git a/sysdeps/unix/mips/sysdep.h b/sysdeps/unix/mips/sysdep.h index 256b0a78cd..2ba1dea897 100644 --- a/sysdeps/unix/mips/sysdep.h +++ b/sysdeps/unix/mips/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1995, 1997, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1992,95,97,99,2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -32,7 +32,7 @@ /* Note that while it's better structurally, going back to call __syscall_error can make things confusing if you're debugging---it looks like it's jumping backwards into the previous fn. */ -#ifdef PIC +#ifdef __PIC__ #define PSEUDO(name, syscall_name, args) \ .align 2; \ 99: la t9,__syscall_error; \ From 782bca9790ebd685d87d11490b90a513aacb791f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 4 Apr 2000 06:03:28 +0000 Subject: [PATCH 1974/4487] Use shlib-compat macros. --- sysdeps/unix/sysv/linux/alpha/glob.c | 7 ++++--- sysdeps/unix/sysv/linux/arm/errlist.c | 8 ++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/glob.c b/sysdeps/unix/sysv/linux/alpha/glob.c index 0ce8d535be..10b10e4033 100644 --- a/sysdeps/unix/sysv/linux/alpha/glob.c +++ b/sysdeps/unix/sysv/linux/alpha/glob.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2000 Free Software Foundation, Inc. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as @@ -20,6 +20,7 @@ #include #include +#include /* For Linux/Alpha we have to make the glob symbols versioned. */ #define glob(pattern, flags, errfunc, pglob) \ @@ -40,8 +41,8 @@ extern void __new_globfree (glob_t *__pglob); #undef glob64 #undef globfree64 -default_symbol_version(__new_glob, glob, GLIBC_2.1); -default_symbol_version(__new_globfree, globfree, GLIBC_2.1); +versioned_symbol (libc, __new_glob, glob, GLIBC_2_1); +versioned_symbol (libc, __new_globfree, globfree, GLIBC_2_1); weak_alias (__new_glob, glob64) weak_alias (__new_globfree, globfree64) diff --git a/sysdeps/unix/sysv/linux/arm/errlist.c b/sysdeps/unix/sysv/linux/arm/errlist.c index c72ecd86fd..63bf8e916c 100644 --- a/sysdeps/unix/sysv/linux/arm/errlist.c +++ b/sysdeps/unix/sysv/linux/arm/errlist.c @@ -39,11 +39,11 @@ const int __old_sys_nerr = OLD_ERRLIST_SIZE; strong_alias (__old_sys_nerr, _old_sys_nerr); weak_alias (__old_sys_nerr, _old_sys_nerr) -symbol_version (__old_sys_nerr, _sys_nerr, GLIBC_2.0); -symbol_version (_old_sys_nerr, sys_nerr, GLIBC_2.0); +compat_symbol (libc, __old_sys_nerr, _sys_nerr, GLIBC_2_0); +compat_symbol (libc, _old_sys_nerr, sys_nerr, GLIBC_2_0); weak_alias (__old_sys_errlist, _old_sys_errlist); -symbol_version (__old_sys_errlist, _sys_errlist, GLIBC_2.0); -symbol_version (_old_sys_errlist, sys_errlist, GLIBC_2.0); +compat_symbol (libc, __old_sys_errlist, _sys_errlist, GLIBC_2_0); +compat_symbol (libc, _old_sys_errlist, sys_errlist, GLIBC_2_0); #endif strong_alias (__new_sys_nerr, _new_sys_nerr) From a502960ee1bf26c446f33c3e1539979a588dffcc Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 4 Apr 2000 12:08:40 +0000 Subject: [PATCH 1975/4487] * sysdeps/m68k/dl-machine.h (RTLD_START): Rewrite for new init function interface. Remove unused _dl_start_user entry point. --- sysdeps/m68k/dl-machine.h | 53 +++++++-------------------------------- 1 file changed, 9 insertions(+), 44 deletions(-) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index 7a5dd351e6..3ff82afe16 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -156,10 +156,6 @@ asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \ move.l %sp, -(%sp) jbsr _dl_start addq.l #4, %sp - - .globl _dl_start_user - .type _dl_start_user,@function -_dl_start_user: | Save the user entry point address in %a4. move.l %d0, %a4 | Point %a5 at the GOT. @@ -169,7 +165,6 @@ asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \ | See if we were run as a command with the executable file | name as an extra leading argument. move.l ([_dl_skip_args@GOT.w, %a5]), %d0 - jeq 0f | Pop the original argument count move.l (%sp)+, %d1 | Subtract _dl_skip_args from it. @@ -178,51 +173,21 @@ asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \ lea (%sp, %d0*4), %sp | Push back the modified argument count. move.l %d1, -(%sp) -0: | Push the searchlist of the main object as argument in - | the _dl_init_next call below. - move.l ([_dl_main_searchlist@GOT.w, %a5]), %d2 - | First dun the pre-initializers. -0: move.l %d2, -(%sp) - | Call _dl_preinit_next to return the address of an pre-initializer - | function to run. - bsr.l _dl_preinit_next@PLTPC - add.l #4, %sp | Pop argument. - | Check for zero return, when out of pre-initializers. - tst.l %d0 - jeq 0f - | Call the shared object pre-initializer function. - move.l %d0, %a0 - jsr (%a0) - | Loop to call _dl_preinit_next for the next pre-initializer. - jra 0b -0: move.l %d2, -(%sp) - | Call _dl_init_next to return the address of an initializer - | function to run. - bsr.l _dl_init_next@PLTPC - add.l #4, %sp | Pop argument. - | Check for zero return, when out of initializers. - tst.l %d0 - jeq 1f - | Call the shared object initializer function. - | NOTE: We depend only on the registers (%d2, %a4 and %a5) - | and the return address pushed by this call; - | the initializer is called with the stack just - | as it appears on entry, and it is free to move - | the stack around, as long as it winds up jumping to - | the return address on the top of the stack. - move.l %d0, %a0 - jsr (%a0) - | Loop to call _dl_init_next for the next initializer. - jra 0b -1: | Clear the startup flag. - clr.l ([_dl_starting_up@GOT.w, %a5]) + # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env) + pea 8(%sp, %d1*4) + pea 4(%sp) + move.l %d1, -(%sp) + move.l _dl_loaded@GOT.w(%a5), -(%sp) + jbsr _dl_init@PLTPC + addq.l #8, %sp + addq.l #8, %sp | Pass our finalizer function to the user in %a1. move.l _dl_fini@GOT.w(%a5), %a1 | Initialize %fp with the stack pointer. move.l %sp, %fp | Jump to the user's entry point. jmp (%a4) - .size _dl_start_user, . - _dl_start_user + .size _start, . - _start .previous"); /* Nonzero iff TYPE describes a relocation that should From a169be8dd3ad7f1aed0d5e8e9eb622bfb4065ead Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 5 Apr 2000 11:01:20 +0000 Subject: [PATCH 1976/4487] * sysdeps/m68k/dl-machine.h (RTLD_START): Readd _dl_start_user entry point, used on Hurd. --- sysdeps/m68k/dl-machine.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index 3ff82afe16..bf7dede6d2 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -156,6 +156,11 @@ asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \ move.l %sp, -(%sp) jbsr _dl_start addq.l #4, %sp + /* FALLTHRU */ + + .globl _dl_start_user + .type _dl_start_user,@function +_dl_start_user: | Save the user entry point address in %a4. move.l %d0, %a4 | Point %a5 at the GOT. @@ -187,7 +192,7 @@ asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \ move.l %sp, %fp | Jump to the user's entry point. jmp (%a4) - .size _start, . - _start + .size _dl_start_user, . - _dl_start_user .previous"); /* Nonzero iff TYPE describes a relocation that should From 7e3f69ad02b8274d56d769f61ad24b0f6f290f28 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 6 Apr 2000 04:56:46 +0000 Subject: [PATCH 1977/4487] Not needed anymore. --- sysdeps/unix/sysv/linux/alpha/init-first.h | 27 ----------- sysdeps/unix/sysv/linux/arm/init-first.h | 55 ---------------------- sysdeps/unix/sysv/linux/mips/init-first.h | 51 -------------------- 3 files changed, 133 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/alpha/init-first.h delete mode 100644 sysdeps/unix/sysv/linux/arm/init-first.h delete mode 100644 sysdeps/unix/sysv/linux/mips/init-first.h diff --git a/sysdeps/unix/sysv/linux/alpha/init-first.h b/sysdeps/unix/sysv/linux/alpha/init-first.h deleted file mode 100644 index a3f5d8f0c4..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/init-first.h +++ /dev/null @@ -1,27 +0,0 @@ -/* The job of this fragment it to find argc and friends for INIT. - This is done in one of two ways: either in the stack context - of program start, or having dlopen pass them in. */ - -#define SYSDEP_CALL_INIT(NAME, INIT) asm("\ - .weak _dl_starting_up - .globl " #NAME " - .ent " #NAME " -" #NAME ": - ldgp $29, 0($27) - .prologue 1 - .set at - /* Are we a dynamic libc being loaded into a static program? */ - lda $0, _dl_starting_up - beq $0, 1f - ldl $0, 0($0) - cmpeq $31, $0, $0 -1: stl $0, __libc_multiple_libcs - /* If so, argc et al are in a0-a2 already. Otherwise, load them. */ - bne $0, 2f - ldl $16, 0($30) - lda $17, 8($30) - s8addq $16, $17, $18 - addq $18, 8, $18 -2: br $31, " ASM_ALPHA_NG_SYMBOL_PREFIX #INIT "..ng - .set noat - .end " #NAME); diff --git a/sysdeps/unix/sysv/linux/arm/init-first.h b/sysdeps/unix/sysv/linux/arm/init-first.h deleted file mode 100644 index d68c368cc2..0000000000 --- a/sysdeps/unix/sysv/linux/arm/init-first.h +++ /dev/null @@ -1,55 +0,0 @@ -/* Prepare arguments for library initialization function. - Copyright (C) 1997 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* The job of this fragment it to find argc and friends for INIT. - This is done in one of two ways: either in the stack context - of program start, or having dlopen pass them in. - - */ - -#define SYSDEP_CALL_INIT(NAME, INIT) \ -void NAME (void* arg, ...) \ -{ \ - int argc; \ - char** argv; \ - char** envp; \ - /* The next variable is only here to work around a bug in gcc <= 2.7.2.2. \ - If the address would be taken inside the expression the optimizer \ - would try to be too smart and throws it away. Grrr. */ \ - int *dummy_addr = &_dl_starting_up; \ - \ - __libc_multiple_libcs = dummy_addr && !_dl_starting_up; \ - \ - if (!__libc_multiple_libcs) \ - { \ - /* The ... in the arg list above forces the gnu ARM compiler to \ - push r0, r1, r2, r3 onto the stack. This way we can get the address */ \ - argc = *(int*) (&arg+4); \ - argv = (char **) &arg + 5; \ - envp = &argv[argc+1]; \ - } \ - else /* the three were passed as arguments */ \ - { \ - argc = (int)arg; \ - argv = (char**)*(&arg + 1); \ - envp = (char**)*(&arg + 2); \ - } \ - \ - INIT (argc, argv, envp); \ -} diff --git a/sysdeps/unix/sysv/linux/mips/init-first.h b/sysdeps/unix/sysv/linux/mips/init-first.h deleted file mode 100644 index d8c2f38c78..0000000000 --- a/sysdeps/unix/sysv/linux/mips/init-first.h +++ /dev/null @@ -1,51 +0,0 @@ -/* Prepare arguments for library initialization function. - Copyright (C) 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 - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* The job of this fragment it to find argc and friends for INIT. - This is done in one of two ways: either in the stack context - of program start, or having dlopen pass them in. */ - -#define SYSDEP_CALL_INIT(NAME, INIT) \ - asm(".weak _dl_starting_up\n\t" \ - ".globl " #NAME "\n\t" \ - ".ent " #NAME "\n" \ - #NAME ":\n\t" \ - ".set noreorder\n\t" \ - ".cpload $25\n\t" \ - ".set reorder\n\t" \ - /* Are we a dynamic libc being loaded into a static program? */ \ - "la $8, _dl_starting_up\n\t" \ - "beqz $8, 1f\n\t" \ - "lw $8, 0($8)\n\t" \ - "seq $8, $8, 0\n" \ - "1:\t" \ - "sw $8, __libc_multiple_libcs\n\t" \ - /* If so, argc et al are in a0-a2 already. Otherwise, load them. */ \ - "bnez $8, 2f\n\t" \ - "lw $4, 16($29)\n\t" \ - "addiu $5, $29, 20\n\t" \ - "sll $6, $4, 2\n\t" \ - "addiu $6, $6, 4\n\t" \ - "addu $6, $5, $6\n" \ - "2:\t" \ - "la $25, " #INIT "\n\t" \ - "jr $25\n\t" \ - ".end " #NAME "\n\t" \ - "3:\t" \ - ".size " #NAME ", 3b-" #NAME); From 604220ddc61ac8778779226a7f506b13475e4ce7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 6 Apr 2000 20:09:41 +0000 Subject: [PATCH 1978/4487] init-first.h has been removed, remove it here also. --- sysdeps/unix/sysv/linux/alpha/Dist | 1 - sysdeps/unix/sysv/linux/arm/Dist | 1 - 2 files changed, 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist index c8868aa427..d80c5c2425 100644 --- a/sysdeps/unix/sysv/linux/alpha/Dist +++ b/sysdeps/unix/sysv/linux/alpha/Dist @@ -3,7 +3,6 @@ alpha/regdef.h clone.S ieee_get_fp_control.S ieee_set_fp_control.S -init-first.h ioperm.c ipc_priv.h kernel_sigaction.h diff --git a/sysdeps/unix/sysv/linux/arm/Dist b/sysdeps/unix/sysv/linux/arm/Dist index 73fd68e2b4..49bdaf3636 100644 --- a/sysdeps/unix/sysv/linux/arm/Dist +++ b/sysdeps/unix/sysv/linux/arm/Dist @@ -1,5 +1,4 @@ clone.S -init-first.h ioperm.c setresuid.c setresgid.c From 86e991277c606838885cb389846877484e86b9b5 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 7 Apr 2000 20:07:21 +0000 Subject: [PATCH 1979/4487] 2000-04-07 Andreas Jaeger * sysdeps/unix/sysv/linux/mips/kernel_sigaction.h: Updated for newer kernels. --- sysdeps/unix/sysv/linux/mips/kernel_sigaction.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h b/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h index 3a803a66a5..3742d54b0e 100644 --- a/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h +++ b/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h @@ -4,10 +4,7 @@ #define HAVE_SA_RESTORER -/* Linux/MIPS still uses the old sigaction structure in the kernel. */ -#define old_kernel_sigaction kernel_sigaction - -struct kernel_sigaction { +struct old_kernel_sigaction { unsigned int sa_flags; __sighandler_t k_sa_handler; unsigned long sa_mask; @@ -23,3 +20,12 @@ struct kernel_sigaction { int pad1[1]; /* reserved */ #endif }; + +/* This is the sigaction structure from the Linux 2.1.68 kernel. */ +struct kernel_sigaction { + unsigned int sa_flags; + __sighandler_t k_sa_handler; + sigset_t sa_mask; + void (*sa_restorer)(void); + int s_resv[1]; /* reserved */ +}; From 5719e666f7c432f3b3bb424ca5ca474198250d15 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 12 Apr 2000 17:59:20 +0000 Subject: [PATCH 1980/4487] 2000-04-11 Andreas Jaeger * sysdeps/mips/dl-machine.h: Update some comments. (ELF_MACHINE_ALIGN_MASK): Removed, it's not needed. --- sysdeps/mips/dl-machine.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index ce5f0f94f2..3d8349173a 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -52,11 +52,6 @@ in l_info array. */ #define DT_MIPS(x) (DT_MIPS_##x - DT_LOPROC + DT_NUM) -#if 0 -/* We may need 64k alignment. */ -#define ELF_MACHINE_ALIGN_MASK 0xffff -#endif - /* * MIPS libraries are usually linked to a non-zero base address. We * subtract the base address from the address where we map the object @@ -204,8 +199,13 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc) special argument registers t7 ($15) and t8 ($24): t7 address to return to the caller of the function t8 index for this function symbol in .dynsym - to usual c arguments. */ + to usual c arguments. + Other architectures call fixup from dl-runtime.c in + _dl_runtime_resolve. MIPS instead calls __dl_runtime_resolve. We + have to use our own version because of the way the got section is + treaded on MIPS (we've also got ELF_MACHINE_PLT defined). */ + #define ELF_MACHINE_RUNTIME_TRAMPOLINE \ /* The flag _dl_mips_gnu_objects is set if all dynamic objects are \ generated by the gnu linker. */ \ @@ -240,6 +240,7 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \ /* Look up the symbol's run-time value. */ \ definer = &symtab[sym_index]; \ \ + /* FIXME: Handle symbol versioning correctly. */ \ loadbase = _dl_lookup_symbol (strtab + definer->st_name, l, &definer, \ l->l_scope, R_MIPS_REL32); \ \ @@ -457,7 +458,7 @@ elf_machine_got_rel (struct link_map *map, int lazy) ElfW(Sym) *sym; int i, n; const char *strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]); - + /* FIXME: The macro RESOLVE_GOTSYM is not handling versioning. */ #define RESOLVE_GOTSYM(sym) \ ({ \ const ElfW(Sym) *ref = sym; \ @@ -523,7 +524,7 @@ elf_machine_got_rel (struct link_map *map, int lazy) } /* Set up the loaded object described by L so its stub function - will jump to the on-demand fixup code in dl-runtime.c. */ + will jump to the on-demand fixup code __dl_runtime_resolve. */ static inline int elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) From 21d129104c678b1a03f6f4c3855dca69e4001d9b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 12 Apr 2000 20:12:05 +0000 Subject: [PATCH 1981/4487] (RTLD_START): Rewrite for new init function interface. --- sysdeps/arm/dl-machine.h | 48 ++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 26 deletions(-) diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index d95cb67f90..19276abfa1 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -279,36 +279,32 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) str sp, [r1] @ See if we were run as a command with the executable file @ name as an extra leading argument. - ldr r1, .L_SKIP_ARGS - ldr r1, [sl, r1] + ldr r4, .L_SKIP_ARGS + ldr r4, [sl, r4] @ get the original arg count - ldr r0, [sp] + ldr r1, [sp] @ subtract _dl_skip_args from it - sub r0, r0, r1 + sub r1, r1, r4 @ adjust the stack pointer to skip them - add sp, sp, r1, lsl #2 + add sp, sp, r4, lsl #2 + @ get the argv address + add r2, sp, #4 @ store the new argc in the new stack location - str r0, [sp] + str r1, [sp] + @ compute envp + add r3, r2, r1, lsl #2 + add r3, r3, #4 - @ now we enter a _dl_init_next loop - ldr r4, .L_MAIN_SEARCHLIST - ldr r4, [sl, r4] - ldr r4, [r4] - @ call _dl_init_next to get the address of an initalizer -0: mov r0, r4 - bl _dl_init_next(PLT) - cmp r0, #0 - beq 1f - @ call the shared-object initializer - @ during this call, the stack may get moved around - mov lr, pc - mov pc, r0 - @ go back and look for another initializer - b 0b -1: @ clear the startup flag + @ now we call _dl_init + ldr r0, .L_LOADED + ldr r0, [sl, r0] + ldr r0, [r0] + @ call _dl_init + bl _dl_init(PLT) + @ clear the startup flag ldr r2, .L_STARTUP_FLAG ldr r1, [sl, r2] - @ we know r0==0 at this point + mov r0, #0 str r0, [r1] @ load the finalizer function ldr r0, .L_FINI_PROC @@ -325,8 +321,8 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) .word _dl_fini(GOT) .L_STACK_END: .word __libc_stack_end(GOT) -.L_MAIN_SEARCHLIST: - .word _dl_main_searchlist(GOT) +.L_LOADED: + .word _dl_loaded(GOT) .previous\n\ "); @@ -464,7 +460,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, if (value & 0xfc000003) _dl_signal_error (0, map->l_name, "R_ARM_PC24 relocation out of range"); - + value = value >> 2; value = (*reloc_addr & 0xff000000) | (value & 0x00ffffff); *reloc_addr = value; From 7fdeecfb092c65d3f6dc4aeb510ca3acd4e8df53 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 12 Apr 2000 20:58:59 +0000 Subject: [PATCH 1982/4487] Definition for memprof functionality on Arm. --- sysdeps/arm/memprof.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 sysdeps/arm/memprof.h diff --git a/sysdeps/arm/memprof.h b/sysdeps/arm/memprof.h new file mode 100644 index 0000000000..4e5081c167 --- /dev/null +++ b/sysdeps/arm/memprof.h @@ -0,0 +1,21 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#define GETSP() ({ register uintptr_t stack_ptr asm ("sp"); stack_ptr; }) + +#include From bc6909909301c463a10dbb58d95abbca62b99e53 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 12 Apr 2000 23:39:44 +0000 Subject: [PATCH 1983/4487] Arm specific error specification for math library. --- sysdeps/arm/libm-test-ulps | 1079 ++++++++++++++++++++++++++++++++++++ 1 file changed, 1079 insertions(+) create mode 100644 sysdeps/arm/libm-test-ulps diff --git a/sysdeps/arm/libm-test-ulps b/sysdeps/arm/libm-test-ulps new file mode 100644 index 0000000000..4737025991 --- /dev/null +++ b/sysdeps/arm/libm-test-ulps @@ -0,0 +1,1079 @@ +# Begin of automatic generation + +# asin +Test "asin (-0.5) == -pi/6": +float: 2 +ifloat: 2 +Test "asin (0.5) == pi/6": +float: 2 +ifloat: 2 +Test "asin (0.7) == 0.7753974966107530637": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +# atanh +Test "atanh (0.7) == 0.8673005276940531944": +double: 1 +idouble: 1 + +# cabs +Test "cabs (-0.7 + 12.4 i) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "cabs (-0.7 - 12.4 i) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "cabs (-12.4 + 0.7 i) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "cabs (-12.4 - 0.7 i) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508": +double: 1 +idouble: 1 +Test "cabs (0.7 + 12.4 i) == 12.41974234837422060118": +float: 1 +ifloat: 1 + +# cacos +Test "Real part of: cacos (0.7 + 1.2 i) == 1.1351827477151551089 - 1.0927647857577371459 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: cacos (0.7 + 1.2 i) == 1.1351827477151551089 - 1.0927647857577371459 i": +float: 1 +ifloat: 1 + +# cacosh +Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323 + 2.1414491111159960199 i": +double: 1 +float: 7 +idouble: 1 +ifloat: 7 +Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323 + 2.1414491111159960199 i": +double: 1 +float: 3 +idouble: 1 +ifloat: 3 +Test "Real part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459 + 1.1351827477151551089 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# casin +Test "Real part of: casin (0.7 + 1.2 i) == 0.4356135790797415103 + 1.0927647857577371459 i": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 +Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103 + 1.0927647857577371459 i": +float: 1 +ifloat: 1 + +# casinh +Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917 - 0.9646585044076027920 i": +double: 5 +float: 1 +idouble: 5 +ifloat: 1 +Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917 - 0.9646585044076027920 i": +double: 3 +float: 6 +idouble: 3 +ifloat: 6 +Test "Real part of: casinh (0.7 + 1.2 i) == 0.9786545955936738768 + 0.9113541895315601156 i": +double: 1 +idouble: 1 +Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.9786545955936738768 + 0.9113541895315601156 i": +float: 1 +ifloat: 1 + +# catan +Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225 - 0.2290726829685387662 i": +float: 3 +ifloat: 3 +Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225 - 0.2290726829685387662 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: catan (0.7 + 1.2 i) == 1.0785743834118921877 + 0.5770573776534306764 i": +float: 4 +ifloat: 4 +Test "Imaginary part of: catan (0.7 + 1.2 i) == 1.0785743834118921877 + 0.5770573776534306764 i": +double: 1 +idouble: 1 + +# catanh +Test "Real part of: catanh (-2 - 3 i) == -0.1469466662255297520 - 1.3389725222944935611 i": +double: 4 +idouble: 4 +Test "Imaginary part of: catanh (-2 - 3 i) == -0.1469466662255297520 - 1.3389725222944935611 i": +float: 4 +ifloat: 4 +Test "Real part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959 + 0.9702403077950989849 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959 + 0.9702403077950989849 i": +double: 1 +float: 6 +idouble: 1 +ifloat: 6 + +# cbrt +Test "cbrt (-27.0) == -3.0": +double: 1 +idouble: 1 +Test "cbrt (0.970299) == 0.99": +double: 1 +idouble: 1 + +# ccos +Test "Imaginary part of: ccos (-2 - 3 i) == -4.1896256909688072301 - 9.1092278937553365979 i": +float: 1 +ifloat: 1 +Test "Real part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i": +double: 1 +idouble: 1 + +# ccosh +Test "Real part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i": +float: 1 +ifloat: 1 +Test "Real part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i": +double: 1 +idouble: 1 + +# cexp +Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.1339809149295426134 - 0.0190985162611351964 i": +float: 1 +ifloat: 1 +Test "Real part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i": +float: 1 +ifloat: 1 + +# clog +Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680 - 2.1587989303424641704 i": +double: 1 +float: 3 +idouble: 1 +ifloat: 3 + +# clog10 +Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-2 - 3 i) == 0.5569716761534183846 - 0.9375544629863747085 i": +double: 1 +float: 5 +idouble: 1 +ifloat: 5 +Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Real part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i": +double: 1 +idouble: 1 +Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i": +float: 1 +ifloat: 1 + +# cos +Test "cos (0.7) == 0.7648421872844884262": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "cos (M_PI_6l * 2.0) == 0.5": +double: 1 +float: 0.5 +idouble: 1 +ifloat: 0.5 +Test "cos (M_PI_6l * 4.0) == -0.5": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "cos (pi/2) == 0": +double: 0.2758 +float: 0.3667 +idouble: 0.2758 +ifloat: 0.3667 + +# cpow +Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": +double: 1 +float: 4 +idouble: 1 +ifloat: 4 +Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": +float: 2 +ifloat: 2 +Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i": +double: 1.1031 +float: 1.5 +idouble: 1.1031 +ifloat: 1.5 + +# csin +Test "Imaginary part of: csin (0.7 + 1.2 i) == 1.1664563419657581376 + 1.1544997246948547371 i": +float: 1 +ifloat: 1 + +# csinh +Test "Imaginary part of: csinh (-2 - 3 i) == 3.5905645899857799520 - 0.5309210862485198052 i": +double: 1 +idouble: 1 +Test "Real part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i": +float: 1 +ifloat: 1 + +# csqrt +Test "Real part of: csqrt (-2 + 3 i) == 0.8959774761298381247 + 1.6741492280355400404 i": +float: 1 +ifloat: 1 +Test "Real part of: csqrt (-2 - 3 i) == 0.8959774761298381247 - 1.6741492280355400404 i": +float: 1 +ifloat: 1 +Test "Real part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i": +float: 1 +ifloat: 1 + +# ctan +Test "Real part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i": +double: 1 +idouble: 1 +Test "Real part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# ctanh +Test "Real part of: ctanh (-2 - 3 i) == -0.9653858790221331242 + 0.0098843750383224937 i": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i": +float: 1 +ifloat: 1 +Test "Real part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Imaginary part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + +# erfc +Test "erfc (0.7) == 0.32219880616258152702": +double: 1 +idouble: 1 +Test "erfc (1.2) == 0.089686021770364619762": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +Test "erfc (2.0) == 0.0046777349810472658379": +double: 1 +idouble: 1 +Test "erfc (4.1) == 0.67000276540848983727e-8": +double: 24 +float: 12 +idouble: 24 +ifloat: 12 + +# exp10 +Test "exp10 (-1) == 0.1": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "exp10 (0.7) == 5.0118723362727228500": +float: 1 +ifloat: 1 +Test "exp10 (3) == 1000": +double: 6 +float: 2 +idouble: 6 +ifloat: 2 + +# expm1 +Test "expm1 (1) == M_El - 1.0": +float: 1 +ifloat: 1 + +# fmod +Test "fmod (-6.5, -2.3) == -1.9": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "fmod (-6.5, 2.3) == -1.9": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "fmod (6.5, -2.3) == 1.9": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "fmod (6.5, 2.3) == 1.9": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + +# hypot +Test "hypot (-0.7, -12.4) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "hypot (-0.7, 12.4) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "hypot (-12.4, -0.7) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "hypot (-12.4, 0.7) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "hypot (0.7, -12.4) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "hypot (0.7, 1.2) == 1.3892443989449804508": +double: 1 +idouble: 1 +Test "hypot (0.7, 12.4) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "hypot (12.4, -0.7) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "hypot (12.4, 0.7) == 12.41974234837422060118": +float: 1 +ifloat: 1 + +# j0 +Test "j0 (10.0) == -0.24593576445134833520": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "j0 (2.0) == 0.22389077914123566805": +float: 2 +ifloat: 2 +Test "j0 (8.0) == 0.17165080713755390609": +float: 1 +ifloat: 1 + +# j1 +Test "j1 (10.0) == 0.043472746168861436670": +float: 2 +ifloat: 2 +Test "j1 (2.0) == 0.57672480775687338720": +double: 1 +idouble: 1 +Test "j1 (8.0) == 0.23463634685391462438": +double: 1 +idouble: 1 + +# jn +Test "jn (0, 10.0) == -0.24593576445134833520": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "jn (0, 2.0) == 0.22389077914123566805": +float: 2 +ifloat: 2 +Test "jn (0, 8.0) == 0.17165080713755390609": +float: 1 +ifloat: 1 +Test "jn (1, 10.0) == 0.043472746168861436670": +float: 2 +ifloat: 2 +Test "jn (1, 2.0) == 0.57672480775687338720": +double: 1 +idouble: 1 +Test "jn (1, 8.0) == 0.23463634685391462438": +double: 1 +idouble: 1 +Test "jn (10, 0.1) == 0.26905328954342155795e-19": +double: 6 +float: 4 +idouble: 6 +ifloat: 4 +Test "jn (10, 0.7) == 0.75175911502153953928e-11": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "jn (10, 10.0) == 0.20748610663335885770": +double: 4 +float: 3 +idouble: 4 +ifloat: 3 +Test "jn (10, 2.0) == 0.25153862827167367096e-6": +float: 4 +ifloat: 4 +Test "jn (3, 0.1) == 0.000020820315754756261429": +double: 1 +idouble: 1 +Test "jn (3, 0.7) == 0.0069296548267508408077": +float: 1 +ifloat: 1 +Test "jn (3, 10.0) == 0.058379379305186812343": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "jn (3, 2.0) == 0.12894324947440205110": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +# lgamma +Test "lgamma (0.7) == 0.26086724653166651439": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "lgamma (1.2) == -0.853740900033158497197e-1": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +# log +Test "log (0.7) == -0.35667494393873237891": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# log10 +Test "log10 (0.7) == -0.15490195998574316929": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "log10 (e) == log10(e)": +float: 1 +ifloat: 1 + +# log1p +Test "log1p (-0.3) == -0.35667494393873237891": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# log2 +Test "log2 (0.7) == -0.51457317282975824043": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# sincos +Test "sincos (0.7, &sin_res, &cos_res) puts 0.76484218728448842626 in cos_res": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": +double: 1 +float: 0.5 +idouble: 1 +ifloat: 0.5 +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.866025403784438646764 in sin_res": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res": +double: 0.2758 +float: 0.3667 +idouble: 0.2758 +ifloat: 0.3667 +Test "sincos (pi/6, &sin_res, &cos_res) puts 0.866025403784438646764 in cos_res": +float: 1 +ifloat: 1 + +# sinh +Test "sinh (0.7) == 0.75858370183953350346": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# tan +Test "tan (pi/4) == 1": +double: 0.5 +idouble: 0.5 + +# tanh +Test "tanh (0.7) == 0.60436777711716349631": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# tgamma +Test "tgamma (-0.5) == -2 sqrt (pi)": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "tgamma (0.5) == sqrt (pi)": +float: 1 +ifloat: 1 +Test "tgamma (0.7) == 1.29805533264755778568": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# y0 +Test "y0 (0.7) == -0.19066492933739506743": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "y0 (1.0) == 0.088256964215676957983": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "y0 (1.5) == 0.38244892379775884396": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "y0 (10.0) == 0.055671167283599391424": +float: 1 +ifloat: 1 +Test "y0 (8.0) == 0.22352148938756622053": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# y1 +Test "y1 (0.1) == -6.4589510947020269877": +double: 1 +idouble: 1 +Test "y1 (0.7) == -1.1032498719076333697": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "y1 (1.5) == -0.41230862697391129595": +float: 1 +ifloat: 1 +Test "y1 (10.0) == 0.24901542420695388392": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "y1 (2.0) == -0.10703243154093754689": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "y1 (8.0) == -0.15806046173124749426": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +# yn +Test "yn (0, 0.7) == -0.19066492933739506743": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "yn (0, 1.0) == 0.088256964215676957983": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "yn (0, 1.5) == 0.38244892379775884396": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "yn (0, 10.0) == 0.055671167283599391424": +float: 1 +ifloat: 1 +Test "yn (0, 8.0) == 0.22352148938756622053": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (1, 0.1) == -6.4589510947020269877": +double: 1 +idouble: 1 +Test "yn (1, 0.7) == -1.1032498719076333697": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (1, 1.5) == -0.41230862697391129595": +float: 1 +ifloat: 1 +Test "yn (1, 10.0) == 0.24901542420695388392": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "yn (1, 2.0) == -0.10703243154093754689": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (1, 8.0) == -0.15806046173124749426": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +Test "yn (10, 0.1) == -0.11831335132045197885e19": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +Test "yn (10, 0.7) == -0.42447194260703866924e10": +double: 3 +idouble: 3 +Test "yn (10, 1.0) == -0.12161801427868918929e9": +double: 1 +idouble: 1 +Test "yn (10, 10.0) == -0.35981415218340272205": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (10, 2.0) == -129184.54220803928264": +double: 2 +idouble: 2 +Test "yn (3, 0.1) == -5099.3323786129048894": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (3, 0.7) == -15.819479052819633505": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "yn (3, 10.0) == -0.25136265718383732978": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (3, 2.0) == -1.1277837768404277861": +double: 1 +idouble: 1 + +# Maximal error of functions: +Function: "asin": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +Function: "atanh": +double: 1 +idouble: 1 + +Function: "cabs": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "cacos": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "cacos": +float: 1 +ifloat: 1 + +Function: Real part of "cacosh": +double: 1 +float: 7 +idouble: 1 +ifloat: 7 + +Function: Imaginary part of "cacosh": +double: 1 +float: 3 +idouble: 1 +ifloat: 3 + +Function: Real part of "casin": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 + +Function: Imaginary part of "casin": +float: 1 +ifloat: 1 + +Function: Real part of "casinh": +double: 5 +float: 1 +idouble: 5 +ifloat: 1 + +Function: Imaginary part of "casinh": +double: 3 +float: 6 +idouble: 3 +ifloat: 6 + +Function: Real part of "catan": +float: 4 +ifloat: 4 + +Function: Imaginary part of "catan": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "catanh": +double: 4 +float: 1 +idouble: 4 +ifloat: 1 + +Function: Imaginary part of "catanh": +double: 1 +float: 6 +idouble: 1 +ifloat: 6 + +Function: "cbrt": +double: 1 +idouble: 1 + +Function: Real part of "ccos": +double: 1 +idouble: 1 + +Function: Imaginary part of "ccos": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "ccosh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "ccosh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "cexp": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "cexp": +float: 1 +ifloat: 1 + +Function: Imaginary part of "clog": +double: 1 +float: 3 +idouble: 1 +ifloat: 3 + +Function: Real part of "clog10": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "clog10": +double: 1 +float: 5 +idouble: 1 +ifloat: 5 + +Function: "cos": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + +Function: Real part of "cpow": +double: 1 +float: 4 +idouble: 1 +ifloat: 4 + +Function: Imaginary part of "cpow": +double: 1.1031 +float: 2 +idouble: 1.1031 +ifloat: 2 + +Function: Imaginary part of "csin": +float: 1 +ifloat: 1 + +Function: Real part of "csinh": +float: 1 +ifloat: 1 + +Function: Imaginary part of "csinh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "csqrt": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "csqrt": +float: 1 +ifloat: 1 + +Function: Real part of "ctan": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "ctan": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "ctanh": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + +Function: Imaginary part of "ctanh": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + +Function: "erfc": +double: 24 +float: 12 +idouble: 24 +ifloat: 12 + +Function: "exp10": +double: 6 +float: 2 +idouble: 6 +ifloat: 2 + +Function: "expm1": +float: 1 +ifloat: 1 + +Function: "fmod": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + +Function: "hypot": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "j0": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + +Function: "j1": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +Function: "jn": +double: 6 +float: 4 +idouble: 6 +ifloat: 4 + +Function: "lgamma": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +Function: "log": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "log10": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "log1p": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "log2": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "sincos": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "sinh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "tan": +double: 0.5 +idouble: 0.5 + +Function: "tanh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "tgamma": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "y0": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + +Function: "y1": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 + +Function: "yn": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 + +# end of automatic generation From 5b917f4e43d492af25920cc663685d3dc1d36928 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 13 Apr 2000 19:46:02 +0000 Subject: [PATCH 1984/4487] 2000-04-13 Andreas Jaeger * sysdeps/unix/mips/pipe.S: Reorder instructions since .reorder is default. * sysdeps/mips/__longjmp.c (__longjmp): Use $25 to fix problems with some applications. Patches by Ralf Baechle . * sysdeps/mips/bsd-setjmp.S: Use __PIC__. * sysdeps/mips/bsd-_setjmp.S: Likewise. * sysdeps/mips/setjmp.S: Likewise. --- sysdeps/mips/__longjmp.c | 4 ++-- sysdeps/mips/bsd-_setjmp.S | 6 +++--- sysdeps/mips/bsd-setjmp.S | 6 +++--- sysdeps/mips/setjmp.S | 8 ++++---- sysdeps/unix/mips/pipe.S | 5 ++--- 5 files changed, 14 insertions(+), 15 deletions(-) diff --git a/sysdeps/mips/__longjmp.c b/sysdeps/mips/__longjmp.c index e9ef5cff3d..a1920ca257 100644 --- a/sysdeps/mips/__longjmp.c +++ b/sysdeps/mips/__longjmp.c @@ -69,7 +69,7 @@ __longjmp (env, val_arg) asm volatile ("lw $23, %0" : : "m" (env[0].__regs[7])); /* Get the PC. */ - asm volatile ("lw $31, %0" : : "m" (env[0].__pc)); + asm volatile ("lw $25, %0" : : "m" (env[0].__pc)); /* Give setjmp 1 if given a 0, or what they gave us if non-zero. */ if (val == 0) @@ -77,7 +77,7 @@ __longjmp (env, val_arg) else asm volatile ("move $2, %0" : : "r" (val)); - asm volatile ("j $31"); + asm volatile ("jr $25"); /* Avoid `volatile function does return' warnings. */ for (;;); diff --git a/sysdeps/mips/bsd-_setjmp.S b/sysdeps/mips/bsd-_setjmp.S index 6d841fc237..bf7cb159fa 100644 --- a/sysdeps/mips/bsd-_setjmp.S +++ b/sysdeps/mips/bsd-_setjmp.S @@ -1,5 +1,5 @@ /* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. MIPS version. - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 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 @@ -23,12 +23,12 @@ #include -#ifdef PIC +#ifdef __PIC__ .option pic2 #endif ENTRY (_setjmp) .set noreorder -#ifdef PIC +#ifdef __PIC__ .cpload t9 la t9, C_SYMBOL_NAME (__sigsetjmp) jr t9 diff --git a/sysdeps/mips/bsd-setjmp.S b/sysdeps/mips/bsd-setjmp.S index 000aee436a..bab312b0df 100644 --- a/sysdeps/mips/bsd-setjmp.S +++ b/sysdeps/mips/bsd-setjmp.S @@ -1,5 +1,5 @@ /* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. MIPS version. - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 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 @@ -23,12 +23,12 @@ #include -#ifdef PIC +#ifdef __PIC__ .option pic2 #endif ENTRY (setjmp) .set noreorder -#ifdef PIC +#ifdef __PIC__ .cpload t9 la t9, C_SYMBOL_NAME (__sigsetjmp) jr t9 diff --git a/sysdeps/mips/setjmp.S b/sysdeps/mips/setjmp.S index 607b5f268d..804b27e897 100644 --- a/sysdeps/mips/setjmp.S +++ b/sysdeps/mips/setjmp.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 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 @@ -21,11 +21,11 @@ /* The function __sigsetjmp_aux saves all the registers, but it can't reliably access the stack or frame pointers, so we pass them in as extra arguments. */ -#ifdef PIC +#ifdef __PIC__ .option pic2 #endif ENTRY (__sigsetjmp) -#ifdef PIC +#ifdef __PIC__ .set noreorder .cpload t9 .set reorder @@ -36,7 +36,7 @@ ENTRY (__sigsetjmp) #else move a3, $fp #endif -#ifdef PIC +#ifdef __PIC__ la t9, __sigsetjmp_aux jr t9 #else diff --git a/sysdeps/unix/mips/pipe.S b/sysdeps/unix/mips/pipe.S index dac617461d..7066ac71ce 100644 --- a/sysdeps/unix/mips/pipe.S +++ b/sysdeps/unix/mips/pipe.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1995, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995, 1997, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -25,9 +25,8 @@ SYSCALL__ (pipe, 1) sw v1, 4(a0) /* Go out with a clean status. */ - j ra move v0, zero - nop + j ra .end __pipe weak_alias (__pipe, pipe) From 985286e05bb538f0f0b5c7422c3534c8c867d728 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 13 Apr 2000 19:53:13 +0000 Subject: [PATCH 1985/4487] 2000-04-13 Andreas Jaeger * sysdeps/unix/sysv/linux/mips/pipe.S: New file. --- sysdeps/unix/sysv/linux/mips/pipe.S | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/mips/pipe.S diff --git a/sysdeps/unix/sysv/linux/mips/pipe.S b/sysdeps/unix/sysv/linux/mips/pipe.S new file mode 100644 index 0000000000..604da74d63 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/pipe.S @@ -0,0 +1 @@ +#include \ No newline at end of file From d152663e8ac30b8283d8d3add312ee83a3c003c6 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 13 Apr 2000 20:13:29 +0000 Subject: [PATCH 1986/4487] 2000-04-13 Andreas Jaeger * sysdeps/unix/sysv/linux/mips/clone.S: Fix functions. --- sysdeps/unix/sysv/linux/mips/clone.S | 44 ++++++++++------------------ 1 file changed, 16 insertions(+), 28 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/clone.S b/sysdeps/unix/sysv/linux/mips/clone.S index 30499bcf43..1bb5c29d3c 100644 --- a/sysdeps/unix/sysv/linux/mips/clone.S +++ b/sysdeps/unix/sysv/linux/mips/clone.S @@ -26,25 +26,18 @@ #define _ERRNO_H 1 #include -/* int clone(int (*fn)(), void *child_stack, int flags, void *arg) */ - -#define FRAMESZ 8*SZREG -#if _MIPS_SIM == _MIPS_SIM_ABI32 -#define MAX_REG_ARGS 4 -#else -#define MAX_REG_ARGS 6 -#endif +/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg) */ .text -NESTED(__clone,FRAMESZ,sp) +NESTED(__clone,4*SZREG,sp) #ifdef __PIC__ .set noreorder .cpload $25 .set reorder - PTR_SUBIU sp,FRAMESZ - .cprestore SZREG*4 + subu sp,32 + .cprestore 16 #else - PTR_SUBIU sp,FRAMESZ + subu sp,32 #endif #ifdef PROF .set noat @@ -53,17 +46,15 @@ NESTED(__clone,FRAMESZ,sp) .set at #endif - REG_S s0,FRAMESZ-SZREG*2(sp) - REG_S s1,FRAMESZ-SZREG*3(sp) + /* Sanity check arguments. */ li v0,EINVAL - beqz a0,error /* no NULL function pointers */ - beqz a1,error /* no NULL stack pointers */ + beqz a0,error /* No NULL function pointers. */ + beqz a1,error /* No NULL stack pointers. */ - /* Allocate space on the new stack and copy args over */ - /* Save the arg for user's function */ - move s0,a3 /* Save arg __thread_start. */ - move s1,a0 /* Save func. pointer. */ + subu a1,32 /* Reserve argument save space. */ + sw a0,0(a1) /* Save function pointer. */ + sw a3,4(a1) /* Save argument pointer. */ /* Do the system call */ @@ -75,16 +66,12 @@ NESTED(__clone,FRAMESZ,sp) beqz v0,__thread_start /* Successful return from the parent */ - REG_L s0,FRAMESZ-SZREG*2(sp) - REG_L s1,FRAMESZ-SZREG*3(sp) - PTR_ADDIU sp,FRAMESZ + addiu sp,32 ret /* Something bad happened -- no child created */ error: - REG_L s0,FRAMESZ-SZREG*2(sp) - REG_L s1,FRAMESZ-SZREG*3(sp) - PTR_ADDIU sp,FRAMESZ + addiu sp,32 #ifdef PIC la t9,__syscall_error jr t9 @@ -100,10 +87,11 @@ error: At this point we have s0=arg, s1=fn. */ NESTED(__thread_start,FRAMESZ,sp) + /* cp is already loaded. */ /* The stackframe has been created on entry of clone(). */ /* Resort the arg for user's function. */ - move a0,s0 - move t9,s1 + move a0,0(sp) /* Function pointer. */ + move t9,4(sp) /* Argument pointer. */ /* Call the user's function. */ jalr t9 From 1c3fb6b3a4408ae5d511167f12a6f1e94684e51d Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 13 Apr 2000 20:19:15 +0000 Subject: [PATCH 1987/4487] Fix typos in last checkin. --- sysdeps/unix/sysv/linux/mips/clone.S | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/clone.S b/sysdeps/unix/sysv/linux/mips/clone.S index 1bb5c29d3c..7924d4dc68 100644 --- a/sysdeps/unix/sysv/linux/mips/clone.S +++ b/sysdeps/unix/sysv/linux/mips/clone.S @@ -86,12 +86,13 @@ error: At this point we have s0=arg, s1=fn. */ -NESTED(__thread_start,FRAMESZ,sp) +ENTRY(__thread_start) /* cp is already loaded. */ + .cprestore 16 /* The stackframe has been created on entry of clone(). */ /* Resort the arg for user's function. */ - move a0,0(sp) /* Function pointer. */ - move t9,4(sp) /* Argument pointer. */ + lw a0,0(sp) /* Function pointer. */ + lw t9,4(sp) /* Argument pointer. */ /* Call the user's function. */ jalr t9 From 040c028af28a4eaeba263762fff1da4c969a62c8 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 13 Apr 2000 20:31:43 +0000 Subject: [PATCH 1988/4487] Now I've applied Ralf's patch correctly and it works. --- sysdeps/unix/sysv/linux/mips/clone.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/clone.S b/sysdeps/unix/sysv/linux/mips/clone.S index 7924d4dc68..0398ba348e 100644 --- a/sysdeps/unix/sysv/linux/mips/clone.S +++ b/sysdeps/unix/sysv/linux/mips/clone.S @@ -91,8 +91,8 @@ ENTRY(__thread_start) .cprestore 16 /* The stackframe has been created on entry of clone(). */ /* Resort the arg for user's function. */ - lw a0,0(sp) /* Function pointer. */ - lw t9,4(sp) /* Argument pointer. */ + lw t9,0(sp) /* Function pointer. */ + lw a0,4(sp) /* Argument pointer. */ /* Call the user's function. */ jalr t9 From 15d5e7dc142bf8ee78d04d2adbfd04bfa737d985 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 13 Apr 2000 23:55:20 +0000 Subject: [PATCH 1989/4487] 2000-04-13 Andreas Jaeger * sysdeps/mips/dl-machine.h (__dl_runtime_resolve): Handle symbol versioning. --- sysdeps/mips/dl-machine.h | 47 +++++++++++++++++++++++++++++++-------- 1 file changed, 38 insertions(+), 9 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 3d8349173a..fecd3e17f9 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -233,22 +233,51 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \ = (const ElfW(Word)) l->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; \ const ElfW(Word) gotsym \ = (const ElfW(Word)) l->l_info[DT_MIPS (GOTSYM)]->d_un.d_val; \ - const ElfW(Sym) *definer; \ - ElfW(Addr) loadbase; \ + const ElfW(Sym) *sym; \ ElfW(Addr) funcaddr; \ + ElfW(Addr) value; \ \ /* Look up the symbol's run-time value. */ \ - definer = &symtab[sym_index]; \ + sym = &symtab[sym_index]; \ + /* FIXME: The symbol versioning stuff is not tested yet. */ \ + if (__builtin_expect (ELFW(ST_VISIBILITY) (sym->st_other), 0) == 0) \ + { \ + switch (l->l_info[VERSYMIDX (DT_VERSYM)] != NULL) \ + { \ + default: \ + { \ + const ElfW(Half) *vernum = \ + (const void *) D_PTR (l, l_info[VERSYMIDX (DT_VERSYM)]); \ + ElfW(Half) ndx = vernum[sym_index]; \ + const struct r_found_version *version = &l->l_versions[ndx]; \ \ - /* FIXME: Handle symbol versioning correctly. */ \ - loadbase = _dl_lookup_symbol (strtab + definer->st_name, l, &definer, \ - l->l_scope, R_MIPS_REL32); \ + if (version->hash != 0) \ + { \ + value = _dl_lookup_versioned_symbol(strtab + sym->st_name, l, \ + &sym, l->l_scope, version,\ + R_MIPS_REL32); \ + break; \ + } \ + /* Fall through. */ \ + } \ + case 0: \ + value = _dl_lookup_symbol (strtab + sym->st_name, l, &sym, \ + l->l_scope, R_MIPS_REL32); \ + } \ \ + /* Currently value contains the base load address of the object \ + that defines sym. Now add in the symbol offset. */ \ + value = (sym ? value + sym->st_value : 0); \ + } \ + else \ + /* We already found the symbol. The module (and therefore its load \ + address) is also known. */ \ + value = l->l_addr + sym->st_value; \ + \ /* Apply the relocation with that value. */ \ - funcaddr = loadbase + definer->st_value; \ - *(got + local_gotno + sym_index - gotsym) = funcaddr; \ + *(got + local_gotno + sym_index - gotsym) = value; \ \ - return funcaddr; \ + return value; \ } \ \ asm ("\n \ From 043351e023f7ef40e955e450ffdbe8dcbaecbd6c Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 14 Apr 2000 00:15:38 +0000 Subject: [PATCH 1990/4487] 2000-04-13 Andreas Jaeger * sysdeps/mips/dl-machine.h (elf_machine_got_rel): Only add runtime display if needed. --- sysdeps/mips/dl-machine.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index fecd3e17f9..960b6b78d1 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -504,10 +504,15 @@ elf_machine_got_rel (struct link_map *map, int lazy) generated by gnu ld. Skip these reserved entries from relocation. */ i = (got[1] & ELF_MIPS_GNU_GOT1_MASK)? 2: 1; n = map->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; - /* Add the run-time display to all local got entries. */ - while (i < n) - got[i++] += map->l_addr; - + /* Add the run-time display to all local got entries if needed. */ + if (map->l_addr != 0) + { + while (i < n) + got[i++] += map->l_addr; + } + else + i = n; + /* Handle global got entries. */ got += n; sym = (void *) D_PTR (map, l_info[DT_SYMTAB]); From 12c4efc1d077a571369447867b348f136ab66eb2 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 14 Apr 2000 00:35:39 +0000 Subject: [PATCH 1991/4487] 2000-04-13 Andreas Jaeger * sysdeps/mips/dl-machine.h (elf_machine_got_rel): Handle symbol versioning. --- sysdeps/mips/dl-machine.h | 65 ++++++++++++++++++++++++++++----------- 1 file changed, 47 insertions(+), 18 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 960b6b78d1..0d971e23d0 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -485,18 +485,46 @@ elf_machine_got_rel (struct link_map *map, int lazy) { ElfW(Addr) *got; ElfW(Sym) *sym; - int i, n; + int i, n, symidx; const char *strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]); + /* This function is loaded in dl-reloc as a nested function and can + therefore access the variable scope from _dl_relocate_object. */ +#ifdef RTLD_BOOTSTRAP +# define RESOLVE_GOTSYM(sym,sym_index) 0 +#else /* FIXME: The macro RESOLVE_GOTSYM is not handling versioning. */ -#define RESOLVE_GOTSYM(sym) \ - ({ \ - const ElfW(Sym) *ref = sym; \ - ElfW(Addr) sym_loadaddr; \ - sym_loadaddr = _dl_lookup_symbol (strtab + sym->st_name, map, \ - &ref, map->l_scope, \ - R_MIPS_REL32); \ - (ref)? sym_loadaddr + ref->st_value: 0; \ +# define RESOLVE_GOTSYM(sym,sym_index) \ + ({ \ + const ElfW(Sym) *ref = sym; \ + ElfW(Addr) value; \ + \ + switch (map->l_info[VERSYMIDX (DT_VERSYM)] != NULL) \ + { \ + default: \ + { \ + const ElfW(Half) *vernum = \ + (const void *) D_PTR (map, l_info[VERSYMIDX (DT_VERSYM)]); \ + ElfW(Half) ndx = vernum[sym_index]; \ + const struct r_found_version *version = &l->l_versions[ndx]; \ + \ + if (version->hash != 0) \ + { \ + value = _dl_lookup_versioned_symbol(strtab + sym->st_name, \ + map, \ + &ref, scope, version, \ + R_MIPS_REL32); \ + break; \ + } \ + /* Fall through. */ \ + } \ + case 0: \ + value = _dl_lookup_symbol (strtab + sym->st_name, map, &ref, \ + scope, R_MIPS_REL32); \ + } \ + \ + (ref)? value + ref->st_value: 0; \ }) +#endif /* RTLD_BOOTSTRAP */ got = (ElfW(Addr) *) D_PTR (map, l_info[DT_PLTGOT]); @@ -510,8 +538,6 @@ elf_machine_got_rel (struct link_map *map, int lazy) while (i < n) got[i++] += map->l_addr; } - else - i = n; /* Handle global got entries. */ got += n; @@ -519,7 +545,9 @@ elf_machine_got_rel (struct link_map *map, int lazy) sym += map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val; i = (map->l_info[DT_MIPS (SYMTABNO)]->d_un.d_val - map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val); - + /* Keep track of the symbol index. */ + symidx = n; + while (i--) { if (sym->st_shndx == SHN_UNDEF) @@ -529,13 +557,13 @@ elf_machine_got_rel (struct link_map *map, int lazy) if (sym->st_value && lazy) *got = sym->st_value + map->l_addr; else - *got = RESOLVE_GOTSYM (sym); + *got = RESOLVE_GOTSYM (sym, symidx); } else /* if (*got == 0 || *got == QS) */ - *got = RESOLVE_GOTSYM (sym); + *got = RESOLVE_GOTSYM (sym, symidx); } else if (sym->st_shndx == SHN_COMMON) - *got = RESOLVE_GOTSYM (sym); + *got = RESOLVE_GOTSYM (sym, symidx); else if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC && *got != sym->st_value && lazy) @@ -546,10 +574,11 @@ elf_machine_got_rel (struct link_map *map, int lazy) *got += map->l_addr; } else - *got = RESOLVE_GOTSYM (sym); + *got = RESOLVE_GOTSYM (sym, symidx); - got++; - sym++; + ++got; + ++sym; + ++symidx; } #undef RESOLVE_GOTSYM From fd327b8820b47ad2a90343e836cf5ea346a4e520 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 14 Apr 2000 05:57:49 +0000 Subject: [PATCH 1992/4487] Add POSIX_MADV_* constants. --- sysdeps/unix/sysv/linux/alpha/bits/mman.h | 11 ++++++++++- sysdeps/unix/sysv/linux/arm/bits/mman.h | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/mman.h b/sysdeps/unix/sysv/linux/alpha/bits/mman.h index a7ada102d2..31e39a8af5 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/mman.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/Alpha version. - Copyright (C) 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 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 @@ -91,6 +91,15 @@ # define MADV_DONTNEED 6 /* Don't need these pages. */ #endif +/* The POSIX people had to invent similar names for the same things. */ +#ifdef __USE_XOPEN2K +# define POSIX_MADV_NORMAL 0 /* No further special treatment. */ +# define POSIX_MADV_RANDOM 1 /* Expect random page references. */ +# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */ +# define POSIX_MADV_DONTNEED 6 /* Don't need these pages. */ +#endif + /* Not used by Linux, but here to make sure we don't clash with OSF/1 defines. */ #if 0 && defined(__USE_BSD) diff --git a/sysdeps/unix/sysv/linux/arm/bits/mman.h b/sysdeps/unix/sysv/linux/arm/bits/mman.h index 37a1959f05..fbb58c89dd 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/mman.h +++ b/sysdeps/unix/sysv/linux/arm/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/ARM version. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 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 @@ -82,3 +82,12 @@ # define MADV_WILLNEED 3 /* Will need these pages. */ # define MADV_DONTNEED 4 /* Don't need these pages. */ #endif + +/* The POSIX people had to invent similar names for the same things. */ +#ifdef __USE_XOPEN2K +# define POSIX_MADV_NORMAL 0 /* No further special treatment. */ +# define POSIX_MADV_RANDOM 1 /* Expect random page references. */ +# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */ +# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */ +#endif From a54fe716da2a9dfd1d581b21279c14ea7287196c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 14 Apr 2000 07:48:34 +0000 Subject: [PATCH 1993/4487] Define POSIX_FADV_NORMAL, POSIX_FADV_RANDOM, POSIX_FADV_SEQUENTIAL, POSIX_FADV_WILLNEED, POSIX_FADV_DONTNEED, and POSIX_FADV_NOREUSE. --- sysdeps/unix/sysv/linux/alpha/bits/fcntl.h | 16 +++++++++++++--- sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 12 +++++++++++- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h index 312cd08963..7081119a13 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1995-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 @@ -133,9 +133,19 @@ struct flock64 /* Define some more compatibility macros to be backward compatible with BSD systems which did not managed to hide these kernel macros. */ #ifdef __USE_BSD -# define FAPPEND O_APPEND +# define FAPPEND O_APPEND # define FFSYNC O_FSYNC # define FASYNC O_ASYNC # define FNONBLOCK O_NONBLOCK -# define FNDELAY O_NDELAY +# define FNDELAY O_NDELAY #endif /* Use BSD. */ + +/* Advise to `posix_fadvise'. */ +#ifdef __USE_XOPEN2K +# define POSIX_FADV_NORMAL 0 /* No further special treatment. */ +# define POSIX_FADV_RANDOM 1 /* Expect random page references. */ +# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */ +# define POSIX_FADV_DONTNEED 6 /* Don't need these pages. */ +# define POSIX_FADV_NOREUSE 7 /* Data will be accessed once. */ +#endif diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index 749becd7d5..18035765b1 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997, 1998, 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 @@ -145,3 +145,13 @@ struct flock64 # define FNONBLOCK O_NONBLOCK # define FNDELAY O_NDELAY #endif /* Use BSD. */ + +/* Advise to `posix_fadvise'. */ +#ifdef __USE_XOPEN2K +# define POSIX_FADV_NORMAL 0 /* No further special treatment. */ +# define POSIX_FADV_RANDOM 1 /* Expect random page references. */ +# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */ +# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */ +# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ +#endif From 500d200d0927e7ebb3c206f16e4f10761f060267 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 14 Apr 2000 17:36:37 +0000 Subject: [PATCH 1994/4487] 2000-04-14 Andreas Jaeger * weaks.c: Fix typo. 2000-04-14 Andreas Jaeger * sysdeps/generic/madvise.c: Fix typos. * sysdeps/unix/sysv/linux/mips/clone.S (error): Use __PIC__. * sysdeps/mips/bits/setjmp.h: Remove K&R compatibility. * sysdeps/mips/setjmp_aux.c (__sigsetjmp_aux): Silence gcc warnings. --- sysdeps/mips/bits/setjmp.h | 12 ++++++------ sysdeps/mips/setjmp_aux.c | 6 +++--- sysdeps/unix/sysv/linux/mips/clone.S | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sysdeps/mips/bits/setjmp.h b/sysdeps/mips/bits/setjmp.h index ff3d75f821..908b6d5935 100644 --- a/sysdeps/mips/bits/setjmp.h +++ b/sysdeps/mips/bits/setjmp.h @@ -1,5 +1,5 @@ /* Define the machine-dependent type `jmp_buf'. MIPS version. - Copyright (C) 1992, 1993, 1995, 1997 Free Software Foundation, Inc. + Copyright (C) 1992,93,95,97,2000 Free Software Foundation, Inc. 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 @@ -23,19 +23,19 @@ typedef struct { /* Program counter. */ - __ptr_t __pc; + void * __pc; /* Stack pointer. */ - __ptr_t __sp; + void * __sp; /* Callee-saved registers s0 through s7. */ int __regs[8]; /* The frame pointer. */ - __ptr_t __fp; + void * __fp; /* The global pointer. */ - __ptr_t __gp; + void * __gp; /* Floating point status register. */ int __fpc_csr; @@ -53,4 +53,4 @@ typedef struct /* Test if longjmp to JMPBUF would unwind the frame containing a local variable at ADDRESS. */ #define _JMPBUF_UNWINDS(jmpbuf, address) \ - ((__ptr_t) (address) < (jmpbuf)[0].__sp) + ((void *) (address) < (jmpbuf)[0].__sp) diff --git a/sysdeps/mips/setjmp_aux.c b/sysdeps/mips/setjmp_aux.c index d06732efc2..e7b83c4d3c 100644 --- a/sysdeps/mips/setjmp_aux.c +++ b/sysdeps/mips/setjmp_aux.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -39,10 +39,10 @@ __sigsetjmp_aux (jmp_buf env, int savemask, int sp, int fp) asm volatile ("sw $31, %0" : : "m" (env[0].__jmpbuf[0].__pc)); /* .. and the stack pointer; */ - env[0].__jmpbuf[0].__sp = sp; + env[0].__jmpbuf[0].__sp = (void *) sp; /* .. and the FP; it'll be in s8. */ - env[0].__jmpbuf[0].__fp = fp; + env[0].__jmpbuf[0].__fp = (void *) fp; /* .. and the GP; */ asm volatile ("sw $gp, %0" : : "m" (env[0].__jmpbuf[0].__gp)); diff --git a/sysdeps/unix/sysv/linux/mips/clone.S b/sysdeps/unix/sysv/linux/mips/clone.S index 0398ba348e..cee391305c 100644 --- a/sysdeps/unix/sysv/linux/mips/clone.S +++ b/sysdeps/unix/sysv/linux/mips/clone.S @@ -72,7 +72,7 @@ NESTED(__clone,4*SZREG,sp) /* Something bad happened -- no child created */ error: addiu sp,32 -#ifdef PIC +#ifdef __PIC__ la t9,__syscall_error jr t9 #else From 8cacb29129249607a36f75803b1aa28bfa778651 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 14 Apr 2000 17:53:07 +0000 Subject: [PATCH 1995/4487] Add newline at EOF. --- sysdeps/unix/sysv/linux/mips/pipe.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/pipe.S b/sysdeps/unix/sysv/linux/mips/pipe.S index 604da74d63..1708888da4 100644 --- a/sysdeps/unix/sysv/linux/mips/pipe.S +++ b/sysdeps/unix/sysv/linux/mips/pipe.S @@ -1 +1 @@ -#include \ No newline at end of file +#include From 127035bb553645e669381a988996bb90b5c31cd8 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sat, 15 Apr 2000 03:45:10 +0000 Subject: [PATCH 1996/4487] 2000-04-14 Andreas Jaeger * sysdeps/mips/dl-machine.h (elf_machine_got_rel): Initialize symidx correctly. * sysdeps/mips/add_n.S: Use __PIC__, add .end directive. --- sysdeps/mips/add_n.S | 7 ++-- sysdeps/mips/dl-machine.h | 73 +++++++++++++++++++-------------------- 2 files changed, 39 insertions(+), 41 deletions(-) diff --git a/sysdeps/mips/add_n.S b/sysdeps/mips/add_n.S index df32eecfcf..aa94c1d001 100644 --- a/sysdeps/mips/add_n.S +++ b/sysdeps/mips/add_n.S @@ -1,7 +1,7 @@ /* MIPS2 __mpn_add_n -- Add two limb vectors of the same length > 0 and store sum in a third limb vector. -Copyright (C) 1995 Free Software Foundation, Inc. +Copyright (C) 1995, 2000 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -28,12 +28,12 @@ MA 02111-1307, USA. */ s2_ptr $6 size $7 */ -#ifdef PIC +#ifdef __PIC__ .option pic2 #endif ENTRY (__mpn_add_n) .set noreorder -#ifdef PIC +#ifdef __PIC__ .cpload t9 #endif .set nomacro @@ -119,3 +119,4 @@ ENTRY (__mpn_add_n) sw $11,0($4) j $31 or $2,$2,$8 + .end __mpn_add_n \ No newline at end of file diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 0d971e23d0..5c628ce187 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -126,6 +126,8 @@ elf_machine_load_address (void) return addr; } +/* The MSB of got[1] of a gnu object is set to identify gnu objects. */ +#define ELF_MIPS_GNU_GOT1_MASK 0x80000000 /* Get link map for callers object containing STUB_PC. */ static inline struct link_map * @@ -476,9 +478,6 @@ elf_machine_lazy_rel (struct link_map *map, /* Do nothing. */ } -/* The MSB of got[1] of a gnu object is set to identify gnu objects. */ -#define ELF_MIPS_GNU_GOT1_MASK 0x80000000 - /* Relocate GOT. */ static inline void elf_machine_got_rel (struct link_map *map, int lazy) @@ -492,37 +491,36 @@ elf_machine_got_rel (struct link_map *map, int lazy) #ifdef RTLD_BOOTSTRAP # define RESOLVE_GOTSYM(sym,sym_index) 0 #else - /* FIXME: The macro RESOLVE_GOTSYM is not handling versioning. */ -# define RESOLVE_GOTSYM(sym,sym_index) \ - ({ \ - const ElfW(Sym) *ref = sym; \ - ElfW(Addr) value; \ - \ - switch (map->l_info[VERSYMIDX (DT_VERSYM)] != NULL) \ - { \ - default: \ - { \ - const ElfW(Half) *vernum = \ - (const void *) D_PTR (map, l_info[VERSYMIDX (DT_VERSYM)]); \ - ElfW(Half) ndx = vernum[sym_index]; \ - const struct r_found_version *version = &l->l_versions[ndx]; \ - \ - if (version->hash != 0) \ - { \ - value = _dl_lookup_versioned_symbol(strtab + sym->st_name, \ - map, \ - &ref, scope, version, \ - R_MIPS_REL32); \ - break; \ - } \ - /* Fall through. */ \ - } \ - case 0: \ - value = _dl_lookup_symbol (strtab + sym->st_name, map, &ref, \ - scope, R_MIPS_REL32); \ - } \ - \ - (ref)? value + ref->st_value: 0; \ +# define RESOLVE_GOTSYM(sym,sym_index) \ + ({ \ + const ElfW(Sym) *ref = sym; \ + ElfW(Addr) value; \ + \ + switch (map->l_info[VERSYMIDX (DT_VERSYM)] != NULL) \ + { \ + default: \ + { \ + const ElfW(Half) *vernum = \ + (const void *) D_PTR (map, l_info[VERSYMIDX (DT_VERSYM)]); \ + ElfW(Half) ndx = vernum[sym_index]; \ + const struct r_found_version *version = &l->l_versions[ndx]; \ + \ + if (version->hash != 0) \ + { \ + value = _dl_lookup_versioned_symbol(strtab + sym->st_name,\ + map, \ + &ref, scope, version, \ + R_MIPS_REL32); \ + break; \ + } \ + /* Fall through. */ \ + } \ + case 0: \ + value = _dl_lookup_symbol (strtab + sym->st_name, map, &ref, \ + scope, R_MIPS_REL32); \ + } \ + \ + (ref)? value + ref->st_value: 0; \ }) #endif /* RTLD_BOOTSTRAP */ @@ -541,12 +539,11 @@ elf_machine_got_rel (struct link_map *map, int lazy) /* Handle global got entries. */ got += n; - sym = (void *) D_PTR (map, l_info[DT_SYMTAB]); - sym += map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val; + /* Keep track of the symbol index. */ + symidx = map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val; + sym = (void *) D_PTR (map, l_info[DT_SYMTAB]) + symidx; i = (map->l_info[DT_MIPS (SYMTABNO)]->d_un.d_val - map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val); - /* Keep track of the symbol index. */ - symidx = n; while (i--) { From b5e0b658d87f03049679401da8c990f1437446bc Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sat, 15 Apr 2000 03:54:15 +0000 Subject: [PATCH 1997/4487] sysdeps/mips/add_n.S --- sysdeps/mips/addmul_1.S | 7 ++++--- sysdeps/mips/lshift.S | 7 ++++--- sysdeps/mips/mul_1.S | 7 ++++--- sysdeps/mips/rshift.S | 7 ++++--- sysdeps/mips/sub_n.S | 7 ++++--- sysdeps/mips/submul_1.S | 7 ++++--- 6 files changed, 24 insertions(+), 18 deletions(-) diff --git a/sysdeps/mips/addmul_1.S b/sysdeps/mips/addmul_1.S index dc1dc1ba50..131e3e8c94 100644 --- a/sysdeps/mips/addmul_1.S +++ b/sysdeps/mips/addmul_1.S @@ -1,7 +1,7 @@ /* MIPS __mpn_addmul_1 -- Multiply a limb vector with a single limb and add the product to a second limb vector. -Copyright (C) 1995 Free Software Foundation, Inc. +Copyright (C) 1995, 2000 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -28,12 +28,12 @@ MA 02111-1307, USA. */ size $6 s2_limb $7 */ -#ifdef PIC +#ifdef __PIC__ .option pic2 #endif ENTRY (__mpn_addmul_1) .set noreorder -#ifdef PIC +#ifdef __PIC__ .cpload t9 #endif .set nomacro @@ -96,3 +96,4 @@ $LC0: lw $10,0($4) sw $3,0($4) j $31 addu $2,$9,$2 /* add high product limb and carry from addition */ + END (__mpn_addmul_1) \ No newline at end of file diff --git a/sysdeps/mips/lshift.S b/sysdeps/mips/lshift.S index e76630310f..eac940161b 100644 --- a/sysdeps/mips/lshift.S +++ b/sysdeps/mips/lshift.S @@ -1,6 +1,6 @@ /* MIPS2 __mpn_lshift -- -Copyright (C) 1995 Free Software Foundation, Inc. +Copyright (C) 1995, 2000 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -27,12 +27,12 @@ MA 02111-1307, USA. */ size $6 cnt $7 */ -#ifdef PIC +#ifdef __PIC__ .option pic2 #endif ENTRY (__mpn_lshift) .set noreorder -#ifdef PIC +#ifdef __PIC__ .cpload t9 #endif .set nomacro @@ -95,3 +95,4 @@ ENTRY (__mpn_lshift) .Lend: sll $8,$10,$7 j $31 sw $8,-4($4) + END (__mpn_lshift) \ No newline at end of file diff --git a/sysdeps/mips/mul_1.S b/sysdeps/mips/mul_1.S index aeaf083d89..4838ad0c82 100644 --- a/sysdeps/mips/mul_1.S +++ b/sysdeps/mips/mul_1.S @@ -1,7 +1,7 @@ /* MIPS __mpn_mul_1 -- Multiply a limb vector with a single limb and store the product in a second limb vector. -Copyright (C) 1995, 1998 Free Software Foundation, Inc. +Copyright (C) 1995, 1998, 2000 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -28,12 +28,12 @@ MA 02111-1307, USA. */ size $6 s2_limb $7 */ -#ifdef PIC +#ifdef __PIC__ .option pic2 #endif ENTRY (__mpn_mul_1) .set noreorder -#ifdef PIC +#ifdef __PIC__ .cpload t9 #endif .set nomacro @@ -84,3 +84,4 @@ $LC0: mflo $10 sw $10,0($4) j $31 addu $2,$9,$2 /* add high product limb and carry from addition */ + END (__mpn_mul_1) \ No newline at end of file diff --git a/sysdeps/mips/rshift.S b/sysdeps/mips/rshift.S index 37bde2f7cd..7f10617319 100644 --- a/sysdeps/mips/rshift.S +++ b/sysdeps/mips/rshift.S @@ -1,6 +1,6 @@ /* MIPS2 __mpn_rshift -- -Copyright (C) 1995 Free Software Foundation, Inc. +Copyright (C) 1995, 2000 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -27,12 +27,12 @@ MA 02111-1307, USA. */ size $6 cnt $7 */ -#ifdef PIC +#ifdef __PIC__ .option pic2 #endif ENTRY (__mpn_rshift) .set noreorder -#ifdef PIC +#ifdef __PIC__ .cpload t9 #endif .set nomacro @@ -92,3 +92,4 @@ ENTRY (__mpn_rshift) .Lend: srl $8,$10,$7 j $31 sw $8,0($4) + END (__mpn_rshift) \ No newline at end of file diff --git a/sysdeps/mips/sub_n.S b/sysdeps/mips/sub_n.S index 09fbf7eeff..75d80c19f0 100644 --- a/sysdeps/mips/sub_n.S +++ b/sysdeps/mips/sub_n.S @@ -1,7 +1,7 @@ /* MIPS2 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and store difference in a third limb vector. -Copyright (C) 1995 Free Software Foundation, Inc. +Copyright (C) 1995, 2000 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -28,12 +28,12 @@ MA 02111-1307, USA. */ s2_ptr $6 size $7 */ -#ifdef PIC +#ifdef __PIC__ .option pic2 #endif ENTRY (__mpn_sub_n) .set noreorder -#ifdef PIC +#ifdef __PIC__ .cpload t9 #endif .set nomacro @@ -119,3 +119,4 @@ ENTRY (__mpn_sub_n) sw $11,0($4) j $31 or $2,$2,$8 + END (__mpn_sub_n) diff --git a/sysdeps/mips/submul_1.S b/sysdeps/mips/submul_1.S index eae8ebbfaf..1aae1ed5e2 100644 --- a/sysdeps/mips/submul_1.S +++ b/sysdeps/mips/submul_1.S @@ -1,7 +1,7 @@ /* MIPS __mpn_submul_1 -- Multiply a limb vector with a single limb and subtract the product from a second limb vector. -Copyright (C) 1995 Free Software Foundation, Inc. +Copyright (C) 1995, 2000 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -28,12 +28,12 @@ MA 02111-1307, USA. */ size $6 s2_limb $7 */ -#ifdef PIC +#ifdef __PIC__ .option pic2 #endif ENTRY (__mpn_submul_1) .set noreorder -#ifdef PIC +#ifdef __PIC__ .cpload t9 #endif .set nomacro @@ -96,3 +96,4 @@ $LC0: lw $10,0($4) sw $3,0($4) j $31 addu $2,$9,$2 /* add high product limb and carry from addition */ + END (__mpn_submul_1) From 245bff940851e6683e659be69f83a486502ffffa Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sat, 15 Apr 2000 04:33:57 +0000 Subject: [PATCH 1998/4487] 2000-04-14 Andreas Jaeger * sysdeps/mips/dl-machine.h (elf_machine_got_rel): Initialize symidx correctly. (elf_machine_got_rel): Cast sym correctly. --- sysdeps/mips/dl-machine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 5c628ce187..965cef9c8d 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -541,7 +541,7 @@ elf_machine_got_rel (struct link_map *map, int lazy) got += n; /* Keep track of the symbol index. */ symidx = map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val; - sym = (void *) D_PTR (map, l_info[DT_SYMTAB]) + symidx; + sym = (ElfW(Sym) *) D_PTR (map, l_info[DT_SYMTAB]) + symidx; i = (map->l_info[DT_MIPS (SYMTABNO)]->d_un.d_val - map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val); From f0824b0c78db196f78b8a7319e45d8617543069c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 15 Apr 2000 16:53:23 +0000 Subject: [PATCH 1999/4487] (RTLD_START):Rewrite for new init function interface. --- sysdeps/alpha/dl-machine.h | 71 ++++++++++++++++++++++++++------------ 1 file changed, 49 insertions(+), 22 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index ad79ef669c..b16e1c884c 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -289,37 +289,64 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) /* Store the highest stack address. */ stq $30, __libc_stack_end /* See if we were run as a command with the executable file - name as an extra leading argument. If so, adjust the stack - pointer to skip _dl_skip_args words. */ + name as an extra leading argument. */ ldl $1, _dl_skip_args - beq $1, 0f - ldq $2, 0($sp) - subq $2, $1, $2 - s8addq $1, $sp, $sp - stq $2, 0($sp) - /* Load _dl_main_searchlist into s1 to pass to _dl_init_next. */ -0: ldq $10, _dl_main_searchlist - /* Call _dl_init_next to return the address of an initializer - function to run. */ -1: mov $10, $16 - jsr $26, _dl_init_next - ldgp $gp, 0($26) - beq $0, 2f - mov $0, $27 - jsr $26, ($0) - ldgp $gp, 0($26) - br 1b -2: /* Clear the startup flag. */ - stl $31, _dl_starting_up + beq $1, $fixup_stack +$fixup_stack_ret: + /* The special initializer gets called with the stack just + as the application's entry point will see it; it can + switch stacks if it moves these contents over. */ +" RTLD_START_SPECIAL_INIT " + /* Call _dl_init(_dl_loaded, argc, argv, envp) to run initializers. */ + ldq $16, _dl_loaded + ldq $17, 0($sp) + lda $18, 8($sp) + s8addq $17, 8, $19 + addq $19, $18, $19 + jsr $26, _dl_init /* Pass our finalizer function to the user in $0. */ lda $0, _dl_fini /* Jump to the user's entry point. */ mov $9, $27 jmp ($9) +$fixup_stack: + /* Adjust the stack pointer to skip _dl_skip_args words. This + involves copying everything down, since the stack pointer must + always be 16-byte aligned. */ + ldq $2, 0($sp) + subq $2, $1, $2 + mov $sp, $4 + s8addq $2, $sp, $3 + stq $2, 0($sp) + /* Copy down argv. */ +0: ldq $5, 8($3) + addq $4, 8, $4 + addq $3, 8, $3 + stq $5, 0($4) + bne $5, 0b + /* Copy down envp. */ +1: ldq $5, 8($3) + addq $4, 8, $4 + addq $3, 8, $3 + stq $5, 0($4) + bne $5, 1b + /* Copy down auxiliary table. */ +2: ldq $5, 8($3) + ldq $6, 16($3) + addq $4, 16, $4 + addq $3, 16, $3 + stq $5, -8($4) + stq $6, 0($4) + bne $5, 2b + br $fixup_stack_ret .end _dl_start_user .set noat .previous"); +#ifndef RTLD_START_SPECIAL_INIT +#define RTLD_START_SPECIAL_INIT /* nothing */ +#endif + /* Nonzero iff TYPE describes relocation of a PLT entry, so PLT entries should not be allowed to define the value. */ #define elf_machine_lookup_noplt_p(type) ((type) == R_ALPHA_JMP_SLOT) @@ -350,7 +377,7 @@ elf_machine_fixup_plt(struct link_map *l, const Elf64_Rela *reloc, /* Recover the PLT entry address by calculating reloc's index into the .rela.plt, and finding that entry in the .plt. */ rela_plt = (void *) D_PTR (l, l_info[DT_JMPREL]); - plte = (void *) (D_PTR (l, [DT_PLTGOT]) + 32); + plte = (void *) (D_PTR (l, l_info[DT_PLTGOT]) + 32); plte += 3 * (reloc - rela_plt); /* Find the displacement from the plt entry to the function. */ From 4a88ca4687a93538368a57d983691b883511f7e8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 15 Apr 2000 16:57:53 +0000 Subject: [PATCH 2000/4487] Fix typo in compat_symbol call for old adjtime. --- sysdeps/unix/sysv/linux/alpha/adjtime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/adjtime.c b/sysdeps/unix/sysv/linux/alpha/adjtime.c index 63cc66daf2..560cb2771c 100644 --- a/sysdeps/unix/sysv/linux/alpha/adjtime.c +++ b/sysdeps/unix/sysv/linux/alpha/adjtime.c @@ -68,7 +68,7 @@ extern int ADJTIMEX (struct TIMEX *); #include #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) -compat_symbol (libc, __adjtime_tv32, adjtime, GLIBC_2.0); +compat_symbol (libc, __adjtime_tv32, adjtime, GLIBC_2_0); #endif #undef TIMEVAL From 2cf8794ab9c4cf7a0aee7e7f558fca92038c9bb3 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 17 Apr 2000 20:59:00 +0000 Subject: [PATCH 2001/4487] 2000-04-17 Andreas Jaeger * sysdeps/mips/add_n.S: Add newline at EOF. * sysdeps/mips/rshift.S: Likewise. * sysdeps/mips/mul_1.S: Likewise. * sysdeps/mips/lshift.S: Likewise. * sysdeps/mips/addmul_1.S: Likewise. --- sysdeps/mips/add_n.S | 2 +- sysdeps/mips/addmul_1.S | 2 +- sysdeps/mips/lshift.S | 2 +- sysdeps/mips/mul_1.S | 2 +- sysdeps/mips/rshift.S | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sysdeps/mips/add_n.S b/sysdeps/mips/add_n.S index aa94c1d001..823166535b 100644 --- a/sysdeps/mips/add_n.S +++ b/sysdeps/mips/add_n.S @@ -119,4 +119,4 @@ ENTRY (__mpn_add_n) sw $11,0($4) j $31 or $2,$2,$8 - .end __mpn_add_n \ No newline at end of file + .end __mpn_add_n diff --git a/sysdeps/mips/addmul_1.S b/sysdeps/mips/addmul_1.S index 131e3e8c94..3bcc11c528 100644 --- a/sysdeps/mips/addmul_1.S +++ b/sysdeps/mips/addmul_1.S @@ -96,4 +96,4 @@ $LC0: lw $10,0($4) sw $3,0($4) j $31 addu $2,$9,$2 /* add high product limb and carry from addition */ - END (__mpn_addmul_1) \ No newline at end of file + END (__mpn_addmul_1) diff --git a/sysdeps/mips/lshift.S b/sysdeps/mips/lshift.S index eac940161b..a163559c03 100644 --- a/sysdeps/mips/lshift.S +++ b/sysdeps/mips/lshift.S @@ -95,4 +95,4 @@ ENTRY (__mpn_lshift) .Lend: sll $8,$10,$7 j $31 sw $8,-4($4) - END (__mpn_lshift) \ No newline at end of file + END (__mpn_lshift) diff --git a/sysdeps/mips/mul_1.S b/sysdeps/mips/mul_1.S index 4838ad0c82..7ba435362f 100644 --- a/sysdeps/mips/mul_1.S +++ b/sysdeps/mips/mul_1.S @@ -84,4 +84,4 @@ $LC0: mflo $10 sw $10,0($4) j $31 addu $2,$9,$2 /* add high product limb and carry from addition */ - END (__mpn_mul_1) \ No newline at end of file + END (__mpn_mul_1) diff --git a/sysdeps/mips/rshift.S b/sysdeps/mips/rshift.S index 7f10617319..112982adbf 100644 --- a/sysdeps/mips/rshift.S +++ b/sysdeps/mips/rshift.S @@ -92,4 +92,4 @@ ENTRY (__mpn_rshift) .Lend: srl $8,$10,$7 j $31 sw $8,0($4) - END (__mpn_rshift) \ No newline at end of file + END (__mpn_rshift) From 3f00c0d4ff06bcc81ea06d85342915775ba35196 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Apr 2000 21:07:29 +0000 Subject: [PATCH 2002/4487] Implies file for AIX. --- sysdeps/unix/sysv/aix/Implies | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/Implies diff --git a/sysdeps/unix/sysv/aix/Implies b/sysdeps/unix/sysv/aix/Implies new file mode 100644 index 0000000000..279438d433 --- /dev/null +++ b/sysdeps/unix/sysv/aix/Implies @@ -0,0 +1,8 @@ +# AIX shares most of the syscalls which are also common to BSD and SVR4. +unix/common + +# AIX has all functions of the mmap family which are described in POSIX.4. +unix/mman + +# AIX has network support in the kernel. +unix/inet From 2b56e51b2ea1bca02cac2ac06d002100d6fdbca8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Apr 2000 21:11:22 +0000 Subject: [PATCH 2003/4487] Add some temporary definitions. --- sysdeps/unix/sysv/aix/Makefile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/sysdeps/unix/sysv/aix/Makefile b/sysdeps/unix/sysv/aix/Makefile index e69de29bb2..c94b9d45b6 100644 --- a/sysdeps/unix/sysv/aix/Makefile +++ b/sysdeps/unix/sysv/aix/Makefile @@ -0,0 +1,18 @@ +# XXX For now always link against the syscalls export file. +# This is a hack until the import/export stuff is worked out. ++postctor += /lib/syscalls.exp + +# XXX This is a hack until we have the possibility to generate out own crt0. +static-start-installed-name = /usr/lib/crt0.o + +ifeq ($(subdir),misc) +sysdep_routines += dl-open dl-sym dl-close +endif + +# Don't compile the ctype glue code, since there is no old non-GNU C library. +inhibit-glue = yes + +# XXX Don"t know yet why this is needed in the moment. +ifeq ($(subdir),timezone) +CPPFLAGS-zic.c = -Dunix +endif From 504b256dabca44fba8cffd84f9cac8da3a32fad6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Apr 2000 21:15:12 +0000 Subject: [PATCH 2004/4487] Versions file for AIX. --- sysdeps/unix/sysv/aix/Versions | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/Versions diff --git a/sysdeps/unix/sysv/aix/Versions b/sysdeps/unix/sysv/aix/Versions new file mode 100644 index 0000000000..4c32bbbe77 --- /dev/null +++ b/sysdeps/unix/sysv/aix/Versions @@ -0,0 +1,6 @@ +libc { + GLIBC_2.2 { + # u* + umount; + } +} From 53e2d5dd3ab673471dc7c7730422bda6794472da Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Apr 2000 21:15:54 +0000 Subject: [PATCH 2005/4487] Add copyright. --- sysdeps/unix/sysv/aix/access.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/sysdeps/unix/sysv/aix/access.c b/sysdeps/unix/sysv/aix/access.c index e25ee8f686..d46a524180 100644 --- a/sysdeps/unix/sysv/aix/access.c +++ b/sysdeps/unix/sysv/aix/access.c @@ -1,3 +1,21 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + #include extern int accessx (const char *name, int type, int who); From b5a6c2a9a250b7bc8ec79d21332be8e15a0d04fe Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Apr 2000 21:16:47 +0000 Subject: [PATCH 2006/4487] AIX bind implementation. --- sysdeps/unix/sysv/aix/bind.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/aix/bind.c diff --git a/sysdeps/unix/sysv/aix/bind.c b/sysdeps/unix/sysv/aix/bind.c new file mode 100644 index 0000000000..6036fbbffd --- /dev/null +++ b/sysdeps/unix/sysv/aix/bind.c @@ -0,0 +1 @@ +/* This is a system call. */ From cdb2874e3996efb84618c0e6a08afce643176c36 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Apr 2000 21:18:22 +0000 Subject: [PATCH 2007/4487] Add EAFNOSUPPORT. --- sysdeps/unix/sysv/aix/bits/errno.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/aix/bits/errno.h b/sysdeps/unix/sysv/aix/bits/errno.h index 37800c3874..d14e3299d4 100644 --- a/sysdeps/unix/sysv/aix/bits/errno.h +++ b/sysdeps/unix/sysv/aix/bits/errno.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1999 Free Software Foundation, Inc. +/* Copyright (C) 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 @@ -98,6 +98,8 @@ # define ESOCKTNOSUPPORT 63 /* Socket type not supported. */ # define EOPNOTSUPP 64 /* Operation not supported on socket. */ # define EPFNOSUPPORT 65 /* Protocol family not supported. */ +# define EAFNOSUPPORT 66 /* Address family not supported by protocol + family. */ # define EADDRINUSE 67 /* Address already in use. */ # define EADDRNOTAVAIL 68 /* Can't assign requested address. */ # define ENETDOWN 69 /* Network is down. */ From 4f203842160356e977958270e1c21fbb7cba2150 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 17 Apr 2000 21:22:59 +0000 Subject: [PATCH 2008/4487] 2000-04-17 Andreas Jaeger * sysdeps/mips/dl-machine.h (elf_machine_got_rel): Optimize a bit as suggested by Ulrich Drepper. (__dl_runtime_resolve): Remove unused variable, initialize sym directly. (RTLD_START): Document OFFSET_GP_GOT. (OFFSET_GP_GOT): New magic value. (elf_mips_got_from_gpreg): Use OFFSET_GP_GOT. (elf_machine_got_rel): Only declare strtab if needed. --- sysdeps/mips/dl-machine.h | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 965cef9c8d..19cdd245fe 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -18,6 +18,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* FIXME: Profiling of shared libraries is not implemented yet. */ #ifndef dl_machine_h #define dl_machine_h @@ -31,6 +32,10 @@ #error ENTRY_POINT needs to be defined for MIPS. #endif +/* The offset of gp from GOT might be system-dependent. It's set by + ld. The same value is also */ +#define OFFSET_GP_GOT 0x7ff0 + #ifndef _RTLD_PROLOGUE # define _RTLD_PROLOGUE(entry) "\n\t.globl " #entry \ "\n\t.ent " #entry \ @@ -95,7 +100,7 @@ static inline ElfW(Addr) * elf_mips_got_from_gpreg (ElfW(Addr) gpreg) { /* FIXME: the offset of gp from GOT may be system-dependent. */ - return (ElfW(Addr) *) (gpreg - 0x7ff0); + return (ElfW(Addr) *) (gpreg - OFFSET_GP_GOT); } /* Return the link-time address of _DYNAMIC. Conveniently, this is the @@ -207,7 +212,7 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc) _dl_runtime_resolve. MIPS instead calls __dl_runtime_resolve. We have to use our own version because of the way the got section is treaded on MIPS (we've also got ELF_MACHINE_PLT defined). */ - + #define ELF_MACHINE_RUNTIME_TRAMPOLINE \ /* The flag _dl_mips_gnu_objects is set if all dynamic objects are \ generated by the gnu linker. */ \ @@ -235,12 +240,9 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \ = (const ElfW(Word)) l->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; \ const ElfW(Word) gotsym \ = (const ElfW(Word)) l->l_info[DT_MIPS (GOTSYM)]->d_un.d_val; \ - const ElfW(Sym) *sym; \ - ElfW(Addr) funcaddr; \ + const ElfW(Sym) *sym = &symtab[sym_index]; \ ElfW(Addr) value; \ \ - /* Look up the symbol's run-time value. */ \ - sym = &symtab[sym_index]; \ /* FIXME: The symbol versioning stuff is not tested yet. */ \ if (__builtin_expect (ELFW(ST_VISIBILITY) (sym->st_other), 0) == 0) \ { \ @@ -279,7 +281,7 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \ /* Apply the relocation with that value. */ \ *(got + local_gotno + sym_index - gotsym) = value; \ \ - return value; \ + return value; \ } \ \ asm ("\n \ @@ -291,6 +293,7 @@ asm ("\n \ _dl_runtime_resolve:\n \ .set noreorder\n \ # Save slot call pc.\n \ + # XXX: Is this ok? \ move $3, $31\n \ # Modify t9 ($25) so as to point .cpload instruction.\n \ addu $25,8\n \ @@ -362,6 +365,7 @@ _RTLD_PROLOGUE(ENTRY_POINT)\ # the address of the dynamic structure. Though MIPS ABI\n\ # doesn't say nothing about this, I emulate this here.\n\ la $4, _DYNAMIC\n\ + # Subtract OFFSET_GP_GOT\n\ sw $4, -0x7ff0($28)\n\ move $4, $29\n\ subu $29, 16\n\ @@ -485,7 +489,9 @@ elf_machine_got_rel (struct link_map *map, int lazy) ElfW(Addr) *got; ElfW(Sym) *sym; int i, n, symidx; +#ifndef RTLD_BOOTSTRAP const char *strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]); +#endif /* This function is loaded in dl-reloc as a nested function and can therefore access the variable scope from _dl_relocate_object. */ #ifdef RTLD_BOOTSTRAP @@ -531,12 +537,12 @@ elf_machine_got_rel (struct link_map *map, int lazy) i = (got[1] & ELF_MIPS_GNU_GOT1_MASK)? 2: 1; n = map->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; /* Add the run-time display to all local got entries if needed. */ - if (map->l_addr != 0) + if (__builtin_expect (map->l_addr != 0, 0)) { while (i < n) got[i++] += map->l_addr; } - + /* Handle global got entries. */ got += n; /* Keep track of the symbol index. */ @@ -544,19 +550,16 @@ elf_machine_got_rel (struct link_map *map, int lazy) sym = (ElfW(Sym) *) D_PTR (map, l_info[DT_SYMTAB]) + symidx; i = (map->l_info[DT_MIPS (SYMTABNO)]->d_un.d_val - map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val); - + + /* This loop doesn't handle Quickstart. */ while (i--) { if (sym->st_shndx == SHN_UNDEF) { - if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC) - { - if (sym->st_value && lazy) - *got = sym->st_value + map->l_addr; - else - *got = RESOLVE_GOTSYM (sym, symidx); - } - else /* if (*got == 0 || *got == QS) */ + if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC + && sym->st_value && lazy) + *got = sym->st_value + map->l_addr; + else *got = RESOLVE_GOTSYM (sym, symidx); } else if (sym->st_shndx == SHN_COMMON) From b54e59028f791e828d0309c42e6bbb3f4f5a9105 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Apr 2000 21:28:18 +0000 Subject: [PATCH 2009/4487] AIX ioctl definitions. --- sysdeps/unix/sysv/aix/bits/ioctl-types.h | 92 +++++++++ sysdeps/unix/sysv/aix/bits/ioctls.h | 248 +++++++++++++++++++++++ 2 files changed, 340 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/bits/ioctl-types.h create mode 100644 sysdeps/unix/sysv/aix/bits/ioctls.h diff --git a/sysdeps/unix/sysv/aix/bits/ioctl-types.h b/sysdeps/unix/sysv/aix/bits/ioctl-types.h new file mode 100644 index 0000000000..ecc4cac1ff --- /dev/null +++ b/sysdeps/unix/sysv/aix/bits/ioctl-types.h @@ -0,0 +1,92 @@ +/* Structure types for pre-termios terminal ioctls. AIX version. + Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_IOCTL_H +# error "Never use directly; include instead +" +#endif + +/* Constants for use with `ioctl'. */ +#define TIOC ('T' << 8) +#define TCGETS (TIOC | 1) +#define TCSETS (TIOC | 2) +#define TCSETSW (TIOC | 3) +#define TCSETSF (TIOC | 4) +#define TCGETA (TIOC | 5) +#define TCSETA (TIOC | 6) +#define TCSETAW (TIOC | 7) +#define TCSETAF (TIOC | 8) +#define TCSBRK (TIOC | 9) +#define TCSBREAK (TIOC | 10) +#define TCXONC (TIOC | 11) +#define TCFLSH (TIOC | 12) +#define TCGLEN (TIOC | 13) +#define TCSLEN (TIOC | 14) +#define TCSAK (TIOC | 15) +#define TCQSAK (TIOC | 16) +#define TCTRUST (TIOC | 17) +#define TCQTRUST (TIOC | 18) +#define TCSMAP (TIOC | 19) +#define TCGMAP (TIOC | 20) +#define TCKEP (TIOC | 21) +#define TCGSAK (TIOC | 22) +#define TCLOOP (TIOC | 23) +#define TCVPD (TIOC | 24) +#define TCREG (TIOC | 25) +#define TCGSTATUS (TIOC | 26) +#define TCSCONTROL (TIOC | 27) +#define TCSCSMAP (TIOC | 28) +#define TCGCSMAP (TIOC | 29) +#define TCMGR TCSAK +#define TCQMGR TCQSAK +#define TIONREAD FIONREAD + + + +struct winsize +{ + unsigned short int ws_row; + unsigned short int ws_col; + unsigned short int ws_xpixel; + unsigned short int ws_ypixel; +}; + +#define NCC 8 +struct termio +{ + unsigned short int c_iflag; /* input mode flags */ + unsigned short int c_oflag; /* output mode flags */ + unsigned short int c_cflag; /* control mode flags */ + unsigned short int c_lflag; /* local mode flags */ + char c_line; /* line discipline */ + unsigned char c_cc[NCC]; /* control characters */ +}; + +/* modem lines */ +#define TIOCM_LE 0x001 +#define TIOCM_DTR 0x002 +#define TIOCM_RTS 0x004 +#define TIOCM_ST 0x008 +#define TIOCM_SR 0x010 +#define TIOCM_CTS 0x020 +#define TIOCM_CAR 0x040 +#define TIOCM_RNG 0x080 +#define TIOCM_DSR 0x100 +#define TIOCM_CD TIOCM_CAR +#define TIOCM_RI TIOCM_RNG diff --git a/sysdeps/unix/sysv/aix/bits/ioctls.h b/sysdeps/unix/sysv/aix/bits/ioctls.h new file mode 100644 index 0000000000..39e093b1bb --- /dev/null +++ b/sysdeps/unix/sysv/aix/bits/ioctls.h @@ -0,0 +1,248 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_IOCTL_H +# error "Never use directly; include instead." +#endif + + +#define IOCPARM_MASK 0x7f /* parameters must be < 128 bytes */ +#define IOC_VOID 0x20000000 /* no parameters */ +#define IOC_OUT 0x40000000 /* copy out parameters */ +#define IOC_IN (0x40000000<<1) /* copy in parameters */ +#define IOC_INOUT (IOC_IN|IOC_OUT) +#define _IO(x,y) (IOC_VOID|(x<<8)|y) +#define _IOR(x,y,t) (IOC_OUT|((sizeof(t)&IOCPARM_MASK)<<16)|(x<<8)|y) +#define _IOW(x,y,t) (IOC_IN|((sizeof(t)&IOCPARM_MASK)<<16)|(x<<8)|y) +#define _IOWR(x,y,t) (IOC_INOUT|((sizeof(t)&IOCPARM_MASK)<<16)|(x<<8)|y) + +#define TIOCGETD _IOR('t', 0, int) /* get line discipline */ +#define TIOCSETD _IOW('t', 1, int) /* set line discipline */ +#define TIOCHPCL _IO('t', 2) /* hang up on last close */ +#define TIOCMODG _IOR('t', 3, int) /* get modem control state */ +#define TIOCMODS _IOW('t', 4, int) /* set modem control state */ +#define TIOCGETP _IOR('t', 8,struct sgttyb)/* get parameters -- gtty */ +#define TIOCSETP _IOW('t', 9,struct sgttyb)/* set parameters -- stty */ +#define TIOCSETN _IOW('t',10,struct sgttyb)/* as above, but no flushtty */ +#define TIOCEXCL _IO('t', 13) /* set exclusive use of tty */ +#define TIOCNXCL _IO('t', 14) /* reset exclusive use of tty */ +#define TIOCFLUSH _IOW('t', 16, int) /* flush buffers */ +#define TIOCSETC _IOW('t',17,struct tchars)/* set special characters */ +#define TIOCGETC _IOR('t',18,struct tchars)/* get special characters */ +#define TANDEM 0x00000001 /* send stopc on out q full */ +#define CBREAK 0x00000002 /* half-cooked mode */ +#define LCASE 0x00000004 /* simulate lower case */ +#define CRMOD 0x00000010 /* map \r to \r\n on output */ +#define RAW 0x00000020 /* no i/o processing */ +#define ODDP 0x00000040 /* get/send odd parity */ +#define EVENP 0x00000080 /* get/send even parity */ +#define ANYP 0x000000c0 /* get any parity/send none */ +#define CRDELAY 0x00000300 /* \r delay */ +#define TBDELAY 0x00000c00 /* horizontal tab delay */ +#define XTABS 0x00000c00 /* expand tabs on output */ +#define BSDELAY 0x00001000 /* \b delay */ +#define VTDELAY 0x00002000 /* vertical tab delay */ +#define NLDELAY 0x0000c000 /* \n delay */ +#define NL2 0x00008000 /* vt05 */ +#define NL3 0x0000c000 +#define ALLDELAY (NLDELAY|TBDELAY|CRDELAY|VTDELAY|BSDELAY) +#define PRTERA 0x00020000 /* \ ... / erase */ +#define CRTERA 0x00040000 /* " \b " to wipe out char */ +#define TILDE 0x00080000 /* hazeltine tilde kludge */ +#define LITOUT 0x00200000 /* literal output */ +#define CRTBS 0x00400000 /* do backspacing for crt */ +#define MDMBUF 0x00800000 /* dtr pacing */ +#define NOHANG 0x01000000 /* no SIGHUP on carrier drop */ +#define L001000 0x02000000 +#define CRTKIL 0x04000000 /* kill line with " \b " */ +#define PASS8 0x08000000 +#define CTLECH 0x10000000 /* echo control chars as ^X */ +#define DECCTQ 0x40000000 /* only ^Q starts after ^S */ +#define NOFLUSH 0x80000000 /* no output flush on signal */ + + +/* SYS V REL. 4 PTY IOCTLs */ +#define UNLKPT _IO('t',70) /* unlock slave pty */ +#define ISPTM _IO('t',71) /* ret. maj+min of pty master */ +#define ISPTS _IO('t',73) /* return maj+min of slave */ +#define GRTPT _IO('t',74) /* grantpt slave pty*/ +#define RLOGIND _IO('t',75) /* for rlogind protocol in ptydd */ +#define TELNETDP _IO('t',76) /* for telnetd protocol in ptydd */ + +#define TIOCCONS _IOW('t', 98, int) /* become virtual console */ +#define TIOCGSID _IOR('t', 72, int) /* get the tty session id */ + + /* locals, from 127 down */ +#define TIOCLBIS _IOW('t', 127, int) /* bis local mode bits */ +#define TIOCLBIC _IOW('t', 126, int) /* bic local mode bits */ +#define TIOCLSET _IOW('t', 125, int) /* set entire mode word */ +#define TIOCLGET _IOR('t', 124, int) /* get local modes */ +#define LCRTBS (CRTBS>>16) +#define LPRTERA (PRTERA>>16) +#define LCRTERA (CRTERA>>16) +#define LTILDE (TILDE>>16) +#define LMDMBUF (MDMBUF>>16) +#define LLITOUT (LITOUT>>16) +#define LTOSTOP (TOSTOP>>16) +#define LFLUSHO (FLUSHO>>16) +#define LNOHANG (NOHANG>>16) +#define LCRTKIL (CRTKIL>>16) +#define LPASS8 (PASS8>>16) +#define LCTLECH (CTLECH>>16) +#define LPENDIN (PENDIN>>16) +#define LDECCTQ (DECCTQ>>16) +#define LNOFLSH (NOFLUSH>>16) +#define TIOCSBRK _IO('t', 123) /* set break bit */ +#define TIOCCBRK _IO('t', 122) /* clear break bit */ +#define TIOCSDTR _IO('t', 121) /* set data terminal ready */ +#define TIOCCDTR _IO('t', 120) /* clear data terminal ready */ +#define TIOCGPGRP _IOR('t', 119, int) /* get process group */ +#define TIOCSPGRP _IOW('t', 118, int) /* set process gorup */ +#define TIOCSLTC _IOW('t',117,struct ltchars)/* set local special chars */ +#define TIOCGLTC _IOR('t',116,struct ltchars)/* get local special chars */ +#define TIOCOUTQ _IOR('t', 115, int) /* output queue size */ +#define TIOCSTI _IOW('t', 114, char) /* simulate terminal input */ +#define TIOCNOTTY _IO('t', 113) /* void tty association */ +#define TIOCPKT _IOW('t', 112, int) /* pty: set/clear packet mode */ +#define TIOCPKT_DATA 0x00 /* data packet */ +#define TIOCPKT_FLUSHREAD 0x01 /* flush packet */ +#define TIOCPKT_FLUSHWRITE 0x02 /* flush packet */ +#define TIOCPKT_STOP 0x04 /* stop output */ +#define TIOCPKT_START 0x08 /* start output */ +#define TIOCPKT_NOSTOP 0x10 /* no more ^S, ^Q */ +#define TIOCPKT_DOSTOP 0x20 /* now do ^S ^Q */ +#define TIOCSTOP _IO('t', 111) /* stop output, like ^S */ +#define TIOCSTART _IO('t', 110) /* start output, like ^Q */ +#define TIOCMSET _IOW('t', 109, int) /* set all modem bits */ +#define TIOCMBIS _IOW('t', 108, int) /* bis modem bits */ +#define TIOCMBIC _IOW('t', 107, int) /* bic modem bits */ +#define TIOCMGET _IOR('t', 106, int) /* get all modem bits */ +#define TIOCREMOTE _IOW('t', 105, int) /* remote input editing */ +#define TIOCGWINSZ _IOR('t', 104, struct winsize) /* get window size */ +#define TIOCSWINSZ _IOW('t', 103, struct winsize) /* set window size */ +#define TIOCUCNTL _IOW('t', 102, int) /* pty: set/clr usr cntl mode */ +/* SLIP (Serial Line IP) ioctl's */ +#define SLIOCGUNIT _IOR('t', 101, int) /* get slip unit number */ +#define SLIOCSFLAGS _IOW('t', 89, int) /* set configuration flags */ +#define SLIOCGFLAGS _IOR('t', 90, int) /* get configuration flags */ +#define SLIOCSATTACH _IOWR('t', 91, int) /* Attach slip i.f. to tty */ +#define UIOCCMD(n) _IO('u', n) /* usr cntl op "n" */ + +#define OTTYDISC 0 /* old, v7 std tty driver */ +#define NETLDISC 1 /* line discip for berk net */ +#define NTTYDISC 2 /* new tty discipline */ +#define TABLDISC 3 /* tablet discipline */ +#define SLIPDISC 4 /* serial IP discipline */ + +#define FIOCLEX _IO('f', 1) /* set close on exec */ +#define FIONCLEX _IO('f', 2) /* clear close on exec */ +/* another local */ + +#define FIONREAD _IOR('f', 127, int) /* get # bytes to read */ +#define FIONBIO _IOW('f', 126, int) /* set/clear non-blocking i/o */ +#define FIOASYNC _IOW('f', 125, int) /* set/clear async i/o */ + +#define FIOSETOWN _IOW('f', 124, int) /* set owner */ +#define FIOGETOWN _IOR('f', 123, int) /* get owner */ +#define FIOASYNCQX _IOW('f', 122, int) /* set/clear async queueing */ + +/* socket i/o controls */ +#define SIOCSHIWAT _IOW('s', 0, int) /* set high watermark */ +#define SIOCGHIWAT _IOR('s', 1, int) /* get high watermark */ +#define SIOCSLOWAT _IOW('s', 2, int) /* set low watermark */ +#define SIOCGLOWAT _IOR('s', 3, int) /* get low watermark */ +#define SIOCATMARK _IOR('s', 7, int) /* at oob mark? */ +#define SIOCSPGRP _IOW('s', 8, int) /* set process group */ +#define SIOCGPGRP _IOR('s', 9, int) /* get process group */ + +#define SIOCADDRT (int)_IOW('r', 10, struct ortentry) /* add route */ +#define SIOCDELRT (int)_IOW('r', 11, struct ortentry) /* delete route */ + +#define SIOCSIFADDR (int)_IOW('i', 12, struct oifreq) /* set ifnet address */ +#define OSIOCGIFADDR (int)_IOWR('i',13, struct oifreq) /* get ifnet address */ +#define SIOCGIFADDR (int)_IOWR('i',33, struct oifreq) /* get ifnet address */ +#define SIOCSIFDSTADDR (int)_IOW('i', 14, struct oifreq) /* set p-p address */ +#define OSIOCGIFDSTADDR (int)_IOWR('i',15, struct oifreq) /* get p-p address */ +#define SIOCGIFDSTADDR (int)_IOWR('i',34, struct oifreq) /* get p-p address */ +#define SIOCSIFFLAGS (int)_IOW('i', 16, struct oifreq) /* set ifnet flags */ +#define SIOCGIFFLAGS (int)_IOWR('i',17, struct oifreq) /* get ifnet flags */ +#define OSIOCGIFBRDADDR (int)_IOWR('i',18, struct oifreq) /* get broadcast addr */ +#define SIOCGIFBRDADDR (int)_IOWR('i',35, struct oifreq) /* get broadcast addr */ +#define SIOCSIFBRDADDR (int)_IOW('i',19, struct oifreq) /* set broadcast addr */ +#define OSIOCGIFCONF (int)_IOWR('i',20, struct ifconf) /* get ifnet list */ +#define CSIOCGIFCONF (int)_IOWR('i',36, struct ifconf) /* get ifnet list */ +#define SIOCGIFCONF (int)_IOWR('i',69, struct ifconf) /* get ifnet list */ +#define OSIOCGIFNETMASK (int)_IOWR('i',21, struct oifreq) /* get net addr mask */ +#define SIOCGIFNETMASK (int)_IOWR('i',37, struct oifreq) /* get net addr mask */ +#define SIOCSIFNETMASK (int)_IOW('i',22, struct oifreq) /* set net addr mask */ +#define SIOCGIFMETRIC (int)_IOWR('i',23, struct oifreq) /* get IF metric */ +#define SIOCSIFMETRIC (int)_IOW('i',24, struct oifreq) /* set IF metric */ +#define SIOCDIFADDR (int)_IOW('i',25, struct oifreq) /* delete IF addr */ +#define SIOCAIFADDR (int)_IOW('i',26, struct ifaliasreq) /* add/chg IF alias */ +#define SIOCSIFSUBCHAN (int)_IOW('i',27, struct oifreq) /* set subchannel adr.*/ +#define SIOCSIFNETDUMP (int)_IOW('i',28, struct oifreq) /* set netdump fastwrt*/ + +#define SIOCSARP (int)_IOW('i', 30, struct arpreq) /* set arp entry */ +#define OSIOCGARP (int)_IOWR('i',31, struct arpreq) /* get arp entry */ +#define SIOCGARP (int)_IOWR('i',38, struct arpreq) /* get arp entry */ +#define SIOCDARP (int)_IOW('i', 32, struct arpreq) /* delete arp entry */ + +#define SIOCSIFOPTIONS (int)_IOW('i', 41, struct oifreq) /* set ifnet options */ +#define SIOCGIFOPTIONS (int)_IOWR('i',42, struct oifreq) /* get ifnet options */ +#define SIOCADDMULTI (int)_IOW('i', 49, struct ifreq) /* add multicast addr */ +#define SIOCDELMULTI (int)_IOW('i', 50, struct ifreq) /* del multicast addr */ +#define SIOCGETVIFCNT (int)_IOWR('u', 51, struct sioc_vif_req)/* vif pkt cnt */ +#define SIOCGETSGCNT (int)_IOWR('u', 52, struct sioc_sg_req) /* s,g pkt cnt */ + +#define SIOCADDNETID (int)_IOW('i',87, struct oifreq) /* set netids */ +#define SIOCSIFMTU (int)_IOW('i',88, struct oifreq) /* set mtu */ +#define SIOCGIFMTU (int)_IOWR('i',86, struct oifreq) /* get mtu */ + +#define SIOCSNETOPT (int)_IOW('i', 90, struct optreq) /* set network option */ +#define SIOCGNETOPT (int)_IOWR('i', 91, struct optreq) /* get network option */ +#define SIOCDNETOPT (int)_IOWR('i', 92, struct optreq) /* set default */ + +#define SIOCSX25XLATE (int)_IOW('i', 99, struct oifreq) /* set xlate tab */ +#define SIOCGX25XLATE (int)_IOWR('i',100, struct oifreq) /* get xlate tab */ +#define SIOCDX25XLATE (int)_IOW('i', 101, struct oifreq) /* delete xlate tab */ + +#define SIOCIFDETACH (int)_IOW('i', 102, struct ifreq) /* detach an ifnet */ +#define SIOCIFATTACH (int)_IOW('i', 103, struct ifreq) /* attach an ifnet */ + +#define SIOCGNMTUS (int)_IO('i',110) /* get NMTUs */ +#define SIOCGETMTUS (int)_IO('i',111) /* get common_mtus */ +#define SIOCADDMTU (int)_IOW('i',112, int) /* add mtu */ +#define SIOCDELMTU (int)_IOW('i',113, int) /* delete mtu */ + +#define SIOCGIFGIDLIST (int)_IO('i', 104) /* get gidlist */ +#define SIOCSIFGIDLIST (int)_IO('i', 105) /* set gidlist */ + +#define SIOCGSIZIFCONF (int)_IOR('i', 106, int) /* get size for SIOCGIFCONF */ + +#define SIOCIF_ATM_UBR (int)_IOW('i',120,struct ifreq) /* set ubr rate */ +#define SIOCIF_ATM_SNMPARP (int)_IOW('i',121,struct ifreq) /* atm snmp arp */ +#define SIOCIF_ATM_IDLE (int)_IOW('i',122,struct ifreq) /* set idle time */ +#define SIOCIF_ATM_DUMPARP (int)_IOW('i',123,struct ifreq) /* atm dump arp */ +#define SIOCIF_ATM_SVC (int)_IOW('i',124,struct ifreq) /* atmif init */ +#define SIOCIF_ATM_DARP (int)_IOW('i',125,struct ifreq) /* del atmarp */ +#define SIOCIF_ATM_GARP (int)_IOW('i',126,struct ifreq) /* get atmarp */ +#define SIOCIF_ATM_SARP (int)_IOW('i',127,struct ifreq) /* set atmarp */ + +#define SIOCGISNO (int)_IOWR('i',107, struct oifreq) /* get IF network options */ +#define SIOCSISNO (int)_IOW('i', 108, struct oifreq) /* set IF network options */ +#define SIOCGIFBAUDRATE (int)_IOWR('i', 109, struct oifreq) /* get ifnet's if_baudrate */ From f22183dbd6ad00ab5c96562f163f0b251e5e17a6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Apr 2000 22:02:26 +0000 Subject: [PATCH 2010/4487] poll definitions for AIX. --- sysdeps/unix/sysv/aix/bits/poll.h | 43 +++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/bits/poll.h diff --git a/sysdeps/unix/sysv/aix/bits/poll.h b/sysdeps/unix/sysv/aix/bits/poll.h new file mode 100644 index 0000000000..431c8a6c4e --- /dev/null +++ b/sysdeps/unix/sysv/aix/bits/poll.h @@ -0,0 +1,43 @@ +/* Copyright (C) 1997, 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_POLL_H +# error "Never use directly; include instead." +#endif + +/* Event types that can be polled for. These bits may be set in `events' + to indicate the interesting event types; they will appear in `revents' + to indicate the status of the file descriptor. */ +#define POLLIN 0x0001 /* There is data to read. */ +#define POLLPRI 0x0002 /* There is urgent data to read. */ +#define POLLOUT 0x0004 /* Writing now will not block. */ + +#ifdef __USE_XOPEN +/* These values are defined in XPG4.2. */ +# define POLLRDNORM 0x0010 /* Normal data may be read. */ +# define POLLRDBAND 0x0020 /* Priority data may be read. */ +# define POLLWRNORM POLLOUT /* Writing now will not block. */ +# define POLLWRBAND 0x0040 /* Priority data may be written. */ +#endif + +/* Event types always implicitly polled for. These bits need not be set in + `events', but they will appear in `revents' to indicate the status of + the file descriptor. */ +#define POLLERR 0x4000 /* Error condition. */ +#define POLLHUP 0x2000 /* Hung up. */ +#define POLLNVAL 0x8000 /* Invalid polling request. */ From cfc29f057658a9ec9c6732aa15116c084502803a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Apr 2000 22:03:40 +0000 Subject: [PATCH 2011/4487] termios definitions for AIX. --- sysdeps/unix/sysv/aix/bits/termios.h | 189 +++++++++++++++++++++++++++ 1 file changed, 189 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/bits/termios.h diff --git a/sysdeps/unix/sysv/aix/bits/termios.h b/sysdeps/unix/sysv/aix/bits/termios.h new file mode 100644 index 0000000000..96e65d1e3d --- /dev/null +++ b/sysdeps/unix/sysv/aix/bits/termios.h @@ -0,0 +1,189 @@ +/* termios type and macro definitions. AIX version. + Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _TERMIOS_H +# error "Never include directly; use instead." +#endif + +typedef unsigned char cc_t; +typedef unsigned int speed_t; +typedef unsigned int tcflag_t; + +#define NCCS 16 +struct termios + { + tcflag_t c_iflag; /* input mode flags */ + tcflag_t c_oflag; /* output mode flags */ + tcflag_t c_cflag; /* control mode flags */ + tcflag_t c_lflag; /* local mode flags */ + cc_t c_cc[NCCS]; /* control characters */ + }; + +/* c_cc characters */ +#define VINTR 0 +#define VQUIT 1 +#define VERASE 2 +#define VKILL 3 +#define VEOF 4 +#define VEOL 5 +#define VSTART 7 +#define VSTOP 8 +#define VSUSP 9 +#define VMIN 4 +#define VTIME 5 +#define VEOL2 6 +#define VDSUSP 10 +#define VREPRINT 11 +#define VDISCARD 12 +#define VWERSE 13 +#define VWERASE VWERSE +#define VLNEXT 14 +#define VSTRT VSTART + +/* c_iflag bits */ +#define IGNBRK 0000001 +#define BRKINT 0000002 +#define IGNPAR 0000004 +#define PARMRK 0000010 +#define INPCK 0000020 +#define ISTRIP 0000040 +#define INLCR 0000100 +#define IGNCR 0000200 +#define ICRNL 0000400 +#define IXON 0001000 +#define IXOFF 0002000 +#define IUCLC 0004000 +#define IXANY 0010000 +#define IMAXBEL 0200000 + +/* c_oflag bits */ +#define OPOST 0000001 +#define OLCUC 0000002 +#define ONLCR 0000004 +#define OCRNL 0000010 +#define ONOCR 0000020 +#define ONLRET 0000040 +#define OFILL 0000100 +#define OFDEL 0000200 +#if defined __USE_MISC || defined __USE_XOPEN +# define CRDLY 0001400 +# define CR0 0000000 +# define CR1 0000400 +# define CR2 0001000 +# define CR3 0001400 +# define TABDLY 0006000 +# define TAB0 0000000 +# define TAB1 0002000 +# define TAB2 0004000 +# define TAB3 0006000 +# define BSDLY 0010000 +# define BS0 0000000 +# define BS1 0010000 +# define FFDLY 0020000 +# define FF0 0000000 +# define FF1 0020000 +# define NLDLY 0040000 +# define NL0 0000000 +# define NL1 0040000 +#endif + +#define VTDLY 0100000 +#define VT0 0000000 +#define VT1 0100000 + +/* c_cflag bit meaning */ +#ifdef __USE_MISC +# define CBAUD 0000017 +#endif +#define B0 0000000 /* hang up */ +#define B50 0000001 +#define B75 0000002 +#define B110 0000003 +#define B134 0000004 +#define B150 0000005 +#define B200 0000006 +#define B300 0000007 +#define B600 0000010 +#define B1200 0000011 +#define B1800 0000012 +#define B2400 0000013 +#define B4800 0000014 +#define B9600 0000015 +#define B19200 0000016 +#define B38400 0000017 +#ifdef __USE_MISC +# define EXTA B19200 +# define EXTB B38400 +#endif +#define CSIZE 0000060 +#define CS5 0000000 +#define CS6 0000020 +#define CS7 0000040 +#define CS8 0000060 +#define CSTOPB 0000100 +#define CREAD 0000200 +#define PARENB 0000400 +#define PARODD 0001000 +#define HUPCL 0002000 +#define CLOCAL 0004000 +#ifdef __USE_MISC +# define CIBAUD 000003600000 /* input baud rate (not used) */ +# define CRTSCTS 020000000000 /* flow control */ +#endif + +/* c_lflag bits */ +#define ISIG 0000001 +#define ICANON 0000002 +#if defined __USE_MISC || defined __USE_XOPEN +# define XCASE 0000004 +#endif +#define ECHO 0000010 +#define ECHOE 0000020 +#define ECHOK 0000040 +#define ECHONL 0000100 +#define NOFLSH 0000200 +#define TOSTOP 0200000 +#ifdef __USE_MISC +# define ECHOCTL 0400000 +# define ECHOPRT 01000000 +# define ECHOKE 02000000 +# define FLUSHO 004000000 +# define PENDIN 04000000000 +#endif +#define IEXTEN 010000000 + +/* tcflow() and TCXONC use these */ +#define TCOOFF 0 +#define TCOON 1 +#define TCIOFF 2 +#define TCION 3 + +/* tcflush() and TCFLSH use these */ +#define TCIFLUSH 0 +#define TCOFLUSH 1 +#define TCIOFLUSH 2 + +/* tcsetattr uses these */ +#define TCSANOW 0 +#define TCSADRAIN 1 +#define TCSAFLUSH 2 + + +#define _IOT_termios /* Hurd ioctl type field. */ \ + _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2) From 516bca2bdac665ed11085d24d87ec2b65f4270f8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Apr 2000 22:05:34 +0000 Subject: [PATCH 2012/4487] AIX chdir implementation. --- sysdeps/unix/sysv/aix/chdir.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/chdir.c diff --git a/sysdeps/unix/sysv/aix/chdir.c b/sysdeps/unix/sysv/aix/chdir.c new file mode 100644 index 0000000000..17d46f7b53 --- /dev/null +++ b/sysdeps/unix/sysv/aix/chdir.c @@ -0,0 +1,25 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +__chdir (const char *path) +{ + return chdir (path); +} From 5ad81ec7ca21f94d10c674517c4304b8b11abcc9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Apr 2000 22:06:36 +0000 Subject: [PATCH 2013/4487] AIX chmod implementation. --- sysdeps/unix/sysv/aix/chmod.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/chmod.c diff --git a/sysdeps/unix/sysv/aix/chmod.c b/sysdeps/unix/sysv/aix/chmod.c new file mode 100644 index 0000000000..dbbe84e8f1 --- /dev/null +++ b/sysdeps/unix/sysv/aix/chmod.c @@ -0,0 +1,25 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +__chmod (const char *path, mode_t mode) +{ + return chmod (path, mode); +} From 93db91a4626fd0cfc9fe93eeb471f4686ac14aa6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Apr 2000 22:07:21 +0000 Subject: [PATCH 2014/4487] AIX chroot implementation. --- sysdeps/unix/sysv/aix/chroot.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/aix/chroot.c diff --git a/sysdeps/unix/sysv/aix/chroot.c b/sysdeps/unix/sysv/aix/chroot.c new file mode 100644 index 0000000000..6036fbbffd --- /dev/null +++ b/sysdeps/unix/sysv/aix/chroot.c @@ -0,0 +1 @@ +/* This is a system call. */ From 25f435284af63e8106dde282f5f231dfa09c838c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Apr 2000 22:12:24 +0000 Subject: [PATCH 2015/4487] AIX creat implementation. --- sysdeps/unix/sysv/aix/creat.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/aix/creat.c diff --git a/sysdeps/unix/sysv/aix/creat.c b/sysdeps/unix/sysv/aix/creat.c new file mode 100644 index 0000000000..6036fbbffd --- /dev/null +++ b/sysdeps/unix/sysv/aix/creat.c @@ -0,0 +1 @@ +/* This is a system call. */ From 0778cbcde47c9626b94c04c41a0aaa57459ea0d4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Apr 2000 22:13:12 +0000 Subject: [PATCH 2016/4487] AIX _dl_close implementation. --- sysdeps/unix/sysv/aix/dl-close.c | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/dl-close.c diff --git a/sysdeps/unix/sysv/aix/dl-close.c b/sysdeps/unix/sysv/aix/dl-close.c new file mode 100644 index 0000000000..a9a492a9c7 --- /dev/null +++ b/sysdeps/unix/sysv/aix/dl-close.c @@ -0,0 +1,9 @@ +/* XXX The implementation of dlopen should somehow use the __loadx system + call but how? */ +#include + +int +__libc_dlclose (void *handle) +{ + return 0; +} From b4f994c66b752d8d43777b4dbd860fae1e1f9700 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Apr 2000 22:14:50 +0000 Subject: [PATCH 2017/4487] AIX _dl_open implementation. --- sysdeps/unix/sysv/aix/dl-open.c | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/dl-open.c diff --git a/sysdeps/unix/sysv/aix/dl-open.c b/sysdeps/unix/sysv/aix/dl-open.c new file mode 100644 index 0000000000..50fd7120c5 --- /dev/null +++ b/sysdeps/unix/sysv/aix/dl-open.c @@ -0,0 +1,9 @@ +/* XXX The implementation of dlopen should somehow use the __loadx system + call but how? */ +#include + +void * +__libc_dlopen (const char *file) +{ + return (void *) 0; +} From 4d4f87b48e3a97d61eca7ab383d90792f081e84a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Apr 2000 22:15:47 +0000 Subject: [PATCH 2018/4487] AIX __libc_dlsym implementation. --- sysdeps/unix/sysv/aix/dl-sym.c | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/dl-sym.c diff --git a/sysdeps/unix/sysv/aix/dl-sym.c b/sysdeps/unix/sysv/aix/dl-sym.c new file mode 100644 index 0000000000..7e10ba10b0 --- /dev/null +++ b/sysdeps/unix/sysv/aix/dl-sym.c @@ -0,0 +1,9 @@ +/* XXX The implementation of dlopen should somehow use the __loadx system + call but how? */ +#include + +void * +__libc_dlsym (void *handle, const char *name) +{ + return (void *) 0; +} From 598e6ade517d888d50d3429d03c494b61f65f6d1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Apr 2000 22:37:08 +0000 Subject: [PATCH 2019/4487] AIX fchdir implementation. --- sysdeps/unix/sysv/aix/fchdir.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/aix/fchdir.c diff --git a/sysdeps/unix/sysv/aix/fchdir.c b/sysdeps/unix/sysv/aix/fchdir.c new file mode 100644 index 0000000000..6036fbbffd --- /dev/null +++ b/sysdeps/unix/sysv/aix/fchdir.c @@ -0,0 +1 @@ +/* This is a system call. */ From b21b9d8cc479c1b1560b502307292695b8f3502d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Apr 2000 22:37:55 +0000 Subject: [PATCH 2020/4487] AIX fchmod implementation. --- sysdeps/unix/sysv/aix/fchmod.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/fchmod.c diff --git a/sysdeps/unix/sysv/aix/fchmod.c b/sysdeps/unix/sysv/aix/fchmod.c new file mode 100644 index 0000000000..49fc92d074 --- /dev/null +++ b/sysdeps/unix/sysv/aix/fchmod.c @@ -0,0 +1,25 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +__fchmod (int fd, mode_t mode) +{ + return fchmod (fd, mode); +} From cf76bf245d616a86c11c30294d84e84e4b033014 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Apr 2000 22:41:47 +0000 Subject: [PATCH 2021/4487] AIX getgroups implementation. --- sysdeps/unix/sysv/aix/getgroups.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/getgroups.c diff --git a/sysdeps/unix/sysv/aix/getgroups.c b/sysdeps/unix/sysv/aix/getgroups.c new file mode 100644 index 0000000000..37ace340ed --- /dev/null +++ b/sysdeps/unix/sysv/aix/getgroups.c @@ -0,0 +1,25 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +__getgroups (int size, gid_t list[]) +{ + return getgroups (size, list); +} From 56e4a6964ec31a2c945509e048e1f1c91738f4c2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Apr 2000 22:43:14 +0000 Subject: [PATCH 2022/4487] AIX gethostname implementation. --- sysdeps/unix/sysv/aix/gethostname.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/gethostname.c diff --git a/sysdeps/unix/sysv/aix/gethostname.c b/sysdeps/unix/sysv/aix/gethostname.c new file mode 100644 index 0000000000..b213c6ffd5 --- /dev/null +++ b/sysdeps/unix/sysv/aix/gethostname.c @@ -0,0 +1,27 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +__gethostname (name, len) + char *name; + size_t len; +{ + return gethostname (name, len); +} From e7dd245c59d78d57f83566fb51b4426f32e98164 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Apr 2000 22:43:49 +0000 Subject: [PATCH 2023/4487] AIX getpriority implementation. --- sysdeps/unix/sysv/aix/getpriority.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/aix/getpriority.c diff --git a/sysdeps/unix/sysv/aix/getpriority.c b/sysdeps/unix/sysv/aix/getpriority.c new file mode 100644 index 0000000000..6036fbbffd --- /dev/null +++ b/sysdeps/unix/sysv/aix/getpriority.c @@ -0,0 +1 @@ +/* This is a system call. */ From 5fc3097f7da808aad8fa1225c58dea77a79a0444 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Apr 2000 22:45:39 +0000 Subject: [PATCH 2024/4487] AIX getrlimit implementation. --- sysdeps/unix/sysv/aix/getrlimit.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/getrlimit.c diff --git a/sysdeps/unix/sysv/aix/getrlimit.c b/sysdeps/unix/sysv/aix/getrlimit.c new file mode 100644 index 0000000000..2658f7ee4a --- /dev/null +++ b/sysdeps/unix/sysv/aix/getrlimit.c @@ -0,0 +1,25 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +__getrlimit (enum __rlimit_resource resource, struct rlimit *rlimits) +{ + return getrlimit (resource, rlimits); +} From 94fd03c6465efa5bf666f1a754b826ba17320a0b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Apr 2000 22:47:33 +0000 Subject: [PATCH 2025/4487] AIX getrlimit64 implementation. --- sysdeps/unix/sysv/aix/getrlimit64.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/getrlimit64.c diff --git a/sysdeps/unix/sysv/aix/getrlimit64.c b/sysdeps/unix/sysv/aix/getrlimit64.c new file mode 100644 index 0000000000..8f46c5fff3 --- /dev/null +++ b/sysdeps/unix/sysv/aix/getrlimit64.c @@ -0,0 +1,25 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +__getrlimit64 (enum __rlimit_resource resource, struct rlimit64 *rlimits) +{ + return getrlimit64 (resource, rlimits); +} From c2757d9621c85bdcdac5f9f670c300df9637648c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Apr 2000 22:48:28 +0000 Subject: [PATCH 2026/4487] AIX getrusage implementation. --- sysdeps/unix/sysv/aix/getrusage.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/getrusage.c diff --git a/sysdeps/unix/sysv/aix/getrusage.c b/sysdeps/unix/sysv/aix/getrusage.c new file mode 100644 index 0000000000..aa80adecc6 --- /dev/null +++ b/sysdeps/unix/sysv/aix/getrusage.c @@ -0,0 +1,27 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +__getrusage (who, usage) + enum __rusage_who who; + struct rusage *usage; +{ + return getrusage (who, usage); +} From 9f16cfe420d96344cb145d12c2fc783694102086 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Apr 2000 22:49:17 +0000 Subject: [PATCH 2027/4487] Define ID_REAL. --- sysdeps/unix/sysv/aix/getgid.c | 4 ++-- sysdeps/unix/sysv/aix/getuid.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/aix/getgid.c b/sysdeps/unix/sysv/aix/getgid.c index ca088652f6..6f2df60b50 100644 --- a/sysdeps/unix/sysv/aix/getgid.c +++ b/sysdeps/unix/sysv/aix/getgid.c @@ -17,8 +17,8 @@ Boston, MA 02111-1307, USA. */ #include -/* is there a reason *NOT* to include ? If so #define ID_REAL */ -#include + +#define ID_REAL 2 extern gid_t getgidx (int which); diff --git a/sysdeps/unix/sysv/aix/getuid.c b/sysdeps/unix/sysv/aix/getuid.c index 4bc1c8acdb..8d5f07098f 100644 --- a/sysdeps/unix/sysv/aix/getuid.c +++ b/sysdeps/unix/sysv/aix/getuid.c @@ -17,8 +17,8 @@ Boston, MA 02111-1307, USA. */ #include -/* is there a reason *NOT* to include ? If so #define ID_REAL */ -#include + +#define ID_REAL 2 extern uid_t getuidx (int which); From cce7a16e8e34a13c9ecc9d9f7ae126cfeb9c61e6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Apr 2000 23:03:44 +0000 Subject: [PATCH 2028/4487] Add copyright. --- sysdeps/unix/sysv/aix/brk.c | 19 ++++++++++++++++++- sysdeps/unix/sysv/aix/close.c | 19 ++++++++++++++++++- sysdeps/unix/sysv/aix/euidaccess.c | 20 ++++++++++++++++++++ sysdeps/unix/sysv/aix/execve.c | 19 ++++++++++++++++++- sysdeps/unix/sysv/aix/kill.c | 19 ++++++++++++++++++- 5 files changed, 92 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/aix/brk.c b/sysdeps/unix/sysv/aix/brk.c index 64bc8cdd2b..f736e28724 100644 --- a/sysdeps/unix/sysv/aix/brk.c +++ b/sysdeps/unix/sysv/aix/brk.c @@ -1,4 +1,21 @@ -/* This is a system call. We only have to provide the wrapper. */ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + #include int diff --git a/sysdeps/unix/sysv/aix/close.c b/sysdeps/unix/sysv/aix/close.c index 4d500c50af..e32b4fd10a 100644 --- a/sysdeps/unix/sysv/aix/close.c +++ b/sysdeps/unix/sysv/aix/close.c @@ -1,4 +1,21 @@ -/* This is a system call. We only have to provide the wrapper. */ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + #include int diff --git a/sysdeps/unix/sysv/aix/euidaccess.c b/sysdeps/unix/sysv/aix/euidaccess.c index 598755c2df..55e28230b1 100644 --- a/sysdeps/unix/sysv/aix/euidaccess.c +++ b/sysdeps/unix/sysv/aix/euidaccess.c @@ -1,3 +1,23 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#define ACC_SELF 0 + int euidaccess (const char *name, int type) { diff --git a/sysdeps/unix/sysv/aix/execve.c b/sysdeps/unix/sysv/aix/execve.c index ea1b67d630..968dc21169 100644 --- a/sysdeps/unix/sysv/aix/execve.c +++ b/sysdeps/unix/sysv/aix/execve.c @@ -1,4 +1,21 @@ -/* This is a system call. We only have to provide the wrapper. */ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + #include int diff --git a/sysdeps/unix/sysv/aix/kill.c b/sysdeps/unix/sysv/aix/kill.c index dfe366c397..861cff3360 100644 --- a/sysdeps/unix/sysv/aix/kill.c +++ b/sysdeps/unix/sysv/aix/kill.c @@ -1,4 +1,21 @@ -/* This is a system call. We only have to provide the wrapper. */ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + #include int From d5a39871bca6ed1fa0ab9283895d7511094895ae Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Apr 2000 23:04:36 +0000 Subject: [PATCH 2029/4487] AIX link implementation. --- sysdeps/unix/sysv/aix/link.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/link.c diff --git a/sysdeps/unix/sysv/aix/link.c b/sysdeps/unix/sysv/aix/link.c new file mode 100644 index 0000000000..bb650cc476 --- /dev/null +++ b/sysdeps/unix/sysv/aix/link.c @@ -0,0 +1,27 @@ +/* Copyright (C) 1997, 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +__link (from, to) + const char *from; + const char *to; +{ + return link (from, to); +} From 9ef28d0f3a3cfbe9001ed8c6308d12e420f26d25 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Apr 2000 23:05:21 +0000 Subject: [PATCH 2030/4487] Uncomment STX_LINK definition. --- sysdeps/unix/sysv/aix/lxstat.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sysdeps/unix/sysv/aix/lxstat.c b/sysdeps/unix/sysv/aix/lxstat.c index 2edaf72d86..58d8710a4a 100644 --- a/sysdeps/unix/sysv/aix/lxstat.c +++ b/sysdeps/unix/sysv/aix/lxstat.c @@ -19,9 +19,7 @@ #include #include -/* this is #define'd in - why #define it again? #define STX_LINK 0x01 - */ extern int statx (const char *pathname, struct stat *st, int len, int cmd); From 2f8f1d154905dec6cbaa92b7245f35e3c6bde8eb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Apr 2000 23:05:45 +0000 Subject: [PATCH 2031/4487] Uncomment STX_LINK and STX_64 definition. --- sysdeps/unix/sysv/aix/lxstat64.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sysdeps/unix/sysv/aix/lxstat64.c b/sysdeps/unix/sysv/aix/lxstat64.c index 426b59443f..4741da0e52 100644 --- a/sysdeps/unix/sysv/aix/lxstat64.c +++ b/sysdeps/unix/sysv/aix/lxstat64.c @@ -19,10 +19,8 @@ #include #include -/* these are #define'd in why #define them again? #define STX_LINK 0x01 #define STX_64 0x08 - */ extern int statx (const char *pathname, struct stat64 *st, int len, int cmd); From ae2e40d04d6bc304debc6ff2572646465a9010fe Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Apr 2000 23:06:41 +0000 Subject: [PATCH 2032/4487] AIX madvise implementation. --- sysdeps/unix/sysv/aix/madvise.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/aix/madvise.c diff --git a/sysdeps/unix/sysv/aix/madvise.c b/sysdeps/unix/sysv/aix/madvise.c new file mode 100644 index 0000000000..6036fbbffd --- /dev/null +++ b/sysdeps/unix/sysv/aix/madvise.c @@ -0,0 +1 @@ +/* This is a system call. */ From fb1360eb6ed05bfe74881b16859fa551ae5f591f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Apr 2000 23:07:54 +0000 Subject: [PATCH 2033/4487] AIX mkdir implementation. --- sysdeps/unix/sysv/aix/mkdir.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/mkdir.c diff --git a/sysdeps/unix/sysv/aix/mkdir.c b/sysdeps/unix/sysv/aix/mkdir.c new file mode 100644 index 0000000000..f7c358af42 --- /dev/null +++ b/sysdeps/unix/sysv/aix/mkdir.c @@ -0,0 +1,25 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +__mkdir (const char *name, mode_t mode) +{ + return mkdir (name, mode); +} From b0b050986bc1d182be94aaf4e744293a7319a838 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Apr 2000 23:09:34 +0000 Subject: [PATCH 2034/4487] AIX implementation of mknod. --- sysdeps/unix/sysv/aix/mknod.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/mknod.c diff --git a/sysdeps/unix/sysv/aix/mknod.c b/sysdeps/unix/sysv/aix/mknod.c new file mode 100644 index 0000000000..d724595e1f --- /dev/null +++ b/sysdeps/unix/sysv/aix/mknod.c @@ -0,0 +1,28 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +__mknod (path, mode, device) + const char *path; + mode_t mode; + dev_t device; +{ + return mknod (path, mode, device); +} From d51e90124fa82c1a7dd0a389e42c113e23735fa2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Apr 2000 23:10:17 +0000 Subject: [PATCH 2035/4487] AIX mprotect implementation. --- sysdeps/unix/sysv/aix/mprotect.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/mprotect.c diff --git a/sysdeps/unix/sysv/aix/mprotect.c b/sysdeps/unix/sysv/aix/mprotect.c new file mode 100644 index 0000000000..30374bbd5d --- /dev/null +++ b/sysdeps/unix/sysv/aix/mprotect.c @@ -0,0 +1,25 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +__mprotect (void *addr, size_t len, int prot) +{ + return mprotect (addr, len, prot); +} From 5c5e1eba35e4645c2240e911d0fa88bbab364478 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Apr 2000 23:10:58 +0000 Subject: [PATCH 2036/4487] AIX msgctl implementation. --- sysdeps/unix/sysv/aix/msgctl.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/aix/msgctl.c diff --git a/sysdeps/unix/sysv/aix/msgctl.c b/sysdeps/unix/sysv/aix/msgctl.c new file mode 100644 index 0000000000..6036fbbffd --- /dev/null +++ b/sysdeps/unix/sysv/aix/msgctl.c @@ -0,0 +1 @@ +/* This is a system call. */ From 09f057fe96bfc53a5cf267e94d98e132abe5ba90 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Apr 2000 23:11:32 +0000 Subject: [PATCH 2037/4487] AIX msgget implementation. --- sysdeps/unix/sysv/aix/msgget.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/aix/msgget.c diff --git a/sysdeps/unix/sysv/aix/msgget.c b/sysdeps/unix/sysv/aix/msgget.c new file mode 100644 index 0000000000..6036fbbffd --- /dev/null +++ b/sysdeps/unix/sysv/aix/msgget.c @@ -0,0 +1 @@ +/* This is a system call. */ From a4d132bfdf9576760204a240920583f98483e803 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 17 Apr 2000 23:56:16 +0000 Subject: [PATCH 2038/4487] (elf_machine_relplt): Removed, it's not needed. (_dl_runtime_resolve): Fix \n for a comment, safe gp and not pc. --- sysdeps/mips/dl-machine.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 19cdd245fe..a15b78d52d 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -198,9 +198,6 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc) return NULL; } -/* Mips has no PLT but define elf_machine_relplt to be elf_machine_rel. */ -#define elf_machine_relplt elf_machine_rel - /* Define mips specific runtime resolver. The function __dl_runtime_resolve is called from assembler function _dl_runtime_resolve which converts special argument registers t7 ($15) and t8 ($24): @@ -292,9 +289,8 @@ asm ("\n \ .ent _dl_runtime_resolve\n \ _dl_runtime_resolve:\n \ .set noreorder\n \ - # Save slot call pc.\n \ - # XXX: Is this ok? \ - move $3, $31\n \ + # Save GP.\n \ + move $3, $28\n \ # Modify t9 ($25) so as to point .cpload instruction.\n \ addu $25,8\n \ # Compute GP.\n \ From 37a0c9123391a2404b52f86bfd619e08618e9ad8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 00:42:45 +0000 Subject: [PATCH 2039/4487] AIX msgrcv implementation. --- sysdeps/unix/sysv/aix/msgrcv.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/aix/msgrcv.c diff --git a/sysdeps/unix/sysv/aix/msgrcv.c b/sysdeps/unix/sysv/aix/msgrcv.c new file mode 100644 index 0000000000..6036fbbffd --- /dev/null +++ b/sysdeps/unix/sysv/aix/msgrcv.c @@ -0,0 +1 @@ +/* This is a system call. */ From bef118cd0b1385da1b69a364fc7b4bca127623ab Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 15:49:10 +0000 Subject: [PATCH 2040/4487] AIX msgsnd implementation. --- sysdeps/unix/sysv/aix/msgsnd.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/aix/msgsnd.c diff --git a/sysdeps/unix/sysv/aix/msgsnd.c b/sysdeps/unix/sysv/aix/msgsnd.c new file mode 100644 index 0000000000..6036fbbffd --- /dev/null +++ b/sysdeps/unix/sysv/aix/msgsnd.c @@ -0,0 +1 @@ +/* This is a system call. */ From 7ba15d4a7876ccb16f5696f2bb972c5d8564a60e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 15:49:54 +0000 Subject: [PATCH 2041/4487] AIX msync implementation. --- sysdeps/unix/sysv/aix/msync.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/aix/msync.c diff --git a/sysdeps/unix/sysv/aix/msync.c b/sysdeps/unix/sysv/aix/msync.c new file mode 100644 index 0000000000..6036fbbffd --- /dev/null +++ b/sysdeps/unix/sysv/aix/msync.c @@ -0,0 +1 @@ +/* This is a system call. */ From f6507e4d339f0c300a7e8e3ebace9bde8a0a78ab Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 15:50:46 +0000 Subject: [PATCH 2042/4487] (struct timestruc_t): Define it here. --- sysdeps/unix/sysv/aix/nanosleep.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/aix/nanosleep.c b/sysdeps/unix/sysv/aix/nanosleep.c index 1277319c94..e39606f9c5 100644 --- a/sysdeps/unix/sysv/aix/nanosleep.c +++ b/sysdeps/unix/sysv/aix/nanosleep.c @@ -20,14 +20,12 @@ #include #include -/* this is declared in not */ -#if 0 struct timestruc_t { time_t tv_sec; /* seconds. */ suseconds_t tv_nsec; /* and nanoseconds. */ }; -#endif + extern int _nsleep (struct timestruc_t *rqtp, struct timestruc_t *rmtp); From 5b1d7b62c1917e3c8a4cf7491ec0b3a24f6690ca Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 15:52:10 +0000 Subject: [PATCH 2043/4487] AIX if.h header. --- sysdeps/unix/sysv/aix/net/if.h | 196 +++++++++++++++++++++++++++++++++ 1 file changed, 196 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/net/if.h diff --git a/sysdeps/unix/sysv/aix/net/if.h b/sysdeps/unix/sysv/aix/net/if.h new file mode 100644 index 0000000000..c950d35294 --- /dev/null +++ b/sysdeps/unix/sysv/aix/net/if.h @@ -0,0 +1,196 @@ +/* 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _NET_IF_H + +#define _NET_IF_H 1 +#include + +#include +#include + +/* Standard interface flags. */ +enum + { + IFF_UP = 0x1, /* Interface is up. */ +#define IFF_UP IFF_UP + IFF_BROADCAST = 0x2, /* Broadcast address valid. */ +#define IFF_BROADCAST IFF_BROADCAST + IFF_DEBUG = 0x4, /* Turn on debugging. */ +#define IFF_DEBUG IFF_DEBUG + IFF_LOOPBACK = 0x8, /* Is a loopback net. */ +#define IFF_LOOPBACK IFF_LOOPBACK + IFF_POINTOPOINT = 0x10, /* Interface is point-to-point link. */ +#define IFF_POINTOPOINT IFF_POINTOPOINT + IFF_NOTRAILERS = 0x20, /* Avoid use of trailers. */ +#define IFF_NOTRAILERS IFF_NOTRAILERS + IFF_RUNNING = 0x40, /* Resources allocated. */ +#define IFF_RUNNING IFF_RUNNING + IFF_NOARP = 0x80, /* No address resolution protocol. */ +#define IFF_NOARP IFF_NOARP + IFF_PROMISC = 0x100, /* Receive all packets. */ +#define IFF_PROMISC IFF_PROMISC + + /* Not supported */ + IFF_ALLMULTI = 0x200, /* Receive all multicast packets. */ +#define IFF_ALLMULTI IFF_ALLMULTI + + IFF_OACTIVE = 0x400, /* Transmission in progress. */ +#define IFF_OACTIVE IFF_OACTIVE + IFF_SIMPLEX = 0x800, /* Cannot hear own transmissions. */ +#define IFF_SIMPLEX IFF_SIMPLEX + IFF_DO_HW_LOOPBACK = 0x10000, /* Force loopback through hardware. */ +#define IFF_DO_HW_LOOPBACK IFF_DO_HW_LOOPBACK + IFF_ALLCAST = 0x20000, /* Global broadcast. */ +#define IFF_ALLCAST IFF_ALLCAST + IFF_BRIDGE = 0x40000, /* Receive all bridge packets. */ +#define IFF_BRIDGE IFF_BRIDGE + IFF_NOECHO = IFF_SIMPLEX, /* Reeives echo packets. */ +#define IFF_NOECHO IFF_NOECHO + }; + +/* The ifaddr structure contains information about one address of an + interface. They are maintained by the different address families, + are allocated and attached when an address is set, and are linked + together so all addresses for an interface can be located. */ + +struct ifaddr + { + struct sockaddr ifa_addr; /* Address of interface. */ + union + { + struct sockaddr ifu_broadaddr; + struct sockaddr ifu_dstaddr; + } ifa_ifu; + struct sockaddr *ifa_netmask; /* Used to determine subnet. */ + struct iface *ifa_ifp; /* Back-pointer to interface. */ + struct ifaddr *ifa_next; /* Next address for interface. */ + void (*ifa_rtrequest) (void); + struct rtentry *ifa_rt; + unsigned short int ifa_flags; + short int ifa_refcnt; + }; + +#define ifa_broadaddr ifa_ifu.ifu_broadaddr /* broadcast address */ +#define ifa_dstaddr ifa_ifu.ifu_dstaddr /* other end of link */ + +/* Interface request structure used for socket ioctl's. All interface + ioctl's must have parameter definitions which begin with ifr_name. + The remainder may be interface specific. */ + +struct ifreq + { +#define IFHWADDRLEN 6 +#define IFNAMSIZ 16 + union + { + char ifrn_name[IFNAMSIZ]; /* Interface name, e.g. "en0". */ + } ifr_ifrn; + + union + { + struct sockaddr ifru_addr; + struct sockaddr ifru_dstaddr; + struct sockaddr ifru_broadaddr; + struct sockaddr ifru_netmask; + struct sockaddr ifru_hwaddr; + short int ifru_flags; + int ifru_ivalue; + unsigned int ifru_mtu; + char ifru_slave[IFNAMSIZ]; /* Just fits the size */ + __caddr_t ifru_data; + unsigned short int ifru_site6; + } ifr_ifru; + }; + +/* Old AIX 3.1 version. */ +struct oifreq +{ + char ifr_name[IFNAMSIZ]; /* if name, e.g. "en0" */ + union + { + struct sockaddr ifru_addr; + struct sockaddr ifru_dstaddr; + struct sockaddr ifru_broadaddr; + int ifru_flags; + int ifru_metric; + caddr_t ifru_data; + unsigned int ifru_mtu; + } ifr_ifru; + unsigned char reserved[8]; +}; + + +#define ifr_name ifr_ifrn.ifrn_name /* interface name */ +#define ifr_hwaddr ifr_ifru.ifru_hwaddr /* MAC address */ +#define ifr_addr ifr_ifru.ifru_addr /* address */ +#define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-p lnk */ +#define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */ +#define ifr_netmask ifr_ifru.ifru_netmask /* interface net mask */ +#define ifr_flags ifr_ifru.ifru_flags /* flags */ +#define ifr_metric ifr_ifru.ifru_ivalue /* metric */ +#define ifr_mtu ifr_ifru.ifru_mtu /* mtu */ +#define ifr_slave ifr_ifru.ifru_slave /* slave device */ +#define ifr_data ifr_ifru.ifru_data /* for use by interface */ +#define ifr_ifindex ifr_ifru.ifru_ivalue /* interface index */ +#define ifr_bandwidth ifr_ifru.ifru_ivalue /* link bandwidth */ +#define ifr_baudrate ifr_ifru.ifru_ivalue /* link bandwidth */ +#define ifr_qlen ifr_ifru.ifru_ivalue /* queue length */ +#define ifr_site6 ifr_ifru.ifru_site6 /* IPv6 site index */ + + +/* Structure used in SIOCGIFCONF request. Used to retrieve interface + configuration for machine (useful for programs which must know all + networks accessible). */ + +struct ifconf + { + int ifc_len; /* Size of buffer. */ + union + { + __caddr_t ifcu_buf; + struct ifreq *ifcu_req; + } ifc_ifcu; + }; +#define ifc_buf ifc_ifcu.ifcu_buf /* Buffer address. */ +#define ifc_req ifc_ifcu.ifcu_req /* Array of structures. */ + +__BEGIN_DECLS + +/* Convert an interface name to an index, and vice versa. */ + +extern unsigned int if_nametoindex (__const char *__ifname) __THROW; +extern char *if_indextoname (unsigned int __ifindex, char *__ifname) __THROW; + +/* Return a list of all interfaces and their indices. */ + +struct if_nameindex + { + unsigned int if_index; /* 1, 2, ... */ + char *if_name; /* null terminated name: "eth0", ... */ + }; + +extern struct if_nameindex *if_nameindex (void) __THROW; + +/* Free the data returned from if_nameindex. */ + +extern void if_freenameindex (struct if_nameindex *__ptr) __THROW; + +__END_DECLS + +#endif /* net/if.h */ From dbde296891f89b5264dcaaaf61d77db4b87c0a29 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 15:55:27 +0000 Subject: [PATCH 2044/4487] AIX pipe implementation. --- sysdeps/unix/sysv/aix/pipe.S | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/pipe.S diff --git a/sysdeps/unix/sysv/aix/pipe.S b/sysdeps/unix/sysv/aix/pipe.S new file mode 100644 index 0000000000..b3a7ec94cf --- /dev/null +++ b/sysdeps/unix/sysv/aix/pipe.S @@ -0,0 +1,26 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +__pipe (pipedes) + int pipedes[2]; +{ + return pipe (pipedes); +} From c83c51cec3545929b274884b8e72cf2bf7bfc9b4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 15:56:16 +0000 Subject: [PATCH 2045/4487] AIX poll implementation. --- sysdeps/unix/sysv/aix/poll.S | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/poll.S diff --git a/sysdeps/unix/sysv/aix/poll.S b/sysdeps/unix/sysv/aix/poll.S new file mode 100644 index 0000000000..ae041a852f --- /dev/null +++ b/sysdeps/unix/sysv/aix/poll.S @@ -0,0 +1,28 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +__poll (fds, nfds, timeout) + struct pollfd *fds; + unsigned long int nfds; + int timeout; +{ + return poll (fds, nfds, timeout); +} From 506a1fac7e306ced04ef937b651bd89384a5b4a7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 15:57:14 +0000 Subject: [PATCH 2046/4487] Argh, must be a C file. --- sysdeps/unix/sysv/aix/pipe.S | 26 -------------------------- sysdeps/unix/sysv/aix/poll.S | 28 ---------------------------- 2 files changed, 54 deletions(-) delete mode 100644 sysdeps/unix/sysv/aix/pipe.S delete mode 100644 sysdeps/unix/sysv/aix/poll.S diff --git a/sysdeps/unix/sysv/aix/pipe.S b/sysdeps/unix/sysv/aix/pipe.S deleted file mode 100644 index b3a7ec94cf..0000000000 --- a/sysdeps/unix/sysv/aix/pipe.S +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright (C) 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 - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include - -int -__pipe (pipedes) - int pipedes[2]; -{ - return pipe (pipedes); -} diff --git a/sysdeps/unix/sysv/aix/poll.S b/sysdeps/unix/sysv/aix/poll.S deleted file mode 100644 index ae041a852f..0000000000 --- a/sysdeps/unix/sysv/aix/poll.S +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 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 - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include - -int -__poll (fds, nfds, timeout) - struct pollfd *fds; - unsigned long int nfds; - int timeout; -{ - return poll (fds, nfds, timeout); -} From b875e7027a5c204c1156ada22553b234b6049de2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 15:57:30 +0000 Subject: [PATCH 2047/4487] AIX pipe implementation. --- sysdeps/unix/sysv/aix/pipe.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/pipe.c diff --git a/sysdeps/unix/sysv/aix/pipe.c b/sysdeps/unix/sysv/aix/pipe.c new file mode 100644 index 0000000000..b3a7ec94cf --- /dev/null +++ b/sysdeps/unix/sysv/aix/pipe.c @@ -0,0 +1,26 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +__pipe (pipedes) + int pipedes[2]; +{ + return pipe (pipedes); +} From b4a5589d58a955d023b0360d72524403cd41461d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 15:57:46 +0000 Subject: [PATCH 2048/4487] AIX poll implementation. --- sysdeps/unix/sysv/aix/poll.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/poll.c diff --git a/sysdeps/unix/sysv/aix/poll.c b/sysdeps/unix/sysv/aix/poll.c new file mode 100644 index 0000000000..ae041a852f --- /dev/null +++ b/sysdeps/unix/sysv/aix/poll.c @@ -0,0 +1,28 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +__poll (fds, nfds, timeout) + struct pollfd *fds; + unsigned long int nfds; + int timeout; +{ + return poll (fds, nfds, timeout); +} From 05ab8acba19bbf32a6114b42309e8a751bac143e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 15:58:27 +0000 Subject: [PATCH 2049/4487] AIX rename implementation. --- sysdeps/unix/sysv/aix/rename.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/aix/rename.c diff --git a/sysdeps/unix/sysv/aix/rename.c b/sysdeps/unix/sysv/aix/rename.c new file mode 100644 index 0000000000..6036fbbffd --- /dev/null +++ b/sysdeps/unix/sysv/aix/rename.c @@ -0,0 +1 @@ +/* This is a system call. */ From 5745df2a3a9c301d7ed3709df6a5e30c23941497 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 15:59:17 +0000 Subject: [PATCH 2050/4487] AIX rmdir implementation. --- sysdeps/unix/sysv/aix/rmdir.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/rmdir.c diff --git a/sysdeps/unix/sysv/aix/rmdir.c b/sysdeps/unix/sysv/aix/rmdir.c new file mode 100644 index 0000000000..6b659ecb51 --- /dev/null +++ b/sysdeps/unix/sysv/aix/rmdir.c @@ -0,0 +1,25 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +__rmdir (const char *name) +{ + return rmdir (name); +} From 6d8593d823a2dae74ec8b5c3e906ec55c6f48c7a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 16:00:33 +0000 Subject: [PATCH 2051/4487] Update parameter type. --- sysdeps/unix/sysv/aix/sbrk.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/aix/sbrk.c b/sysdeps/unix/sysv/aix/sbrk.c index 9e4b5605c7..09ba0b1062 100644 --- a/sysdeps/unix/sysv/aix/sbrk.c +++ b/sysdeps/unix/sysv/aix/sbrk.c @@ -1,8 +1,25 @@ -/* This is a system call. We only have to provide the wrapper. */ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + #include void * -__sbrk (ptrdiff_t delta) +__sbrk (intptr_t delta) { return sbrk (delta); } From bfefa44d6c117898264d82459ad2474a060cc698 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 16:01:23 +0000 Subject: [PATCH 2052/4487] AIX select implementation. --- sysdeps/unix/sysv/aix/select.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/select.c diff --git a/sysdeps/unix/sysv/aix/select.c b/sysdeps/unix/sysv/aix/select.c new file mode 100644 index 0000000000..34df22fc5c --- /dev/null +++ b/sysdeps/unix/sysv/aix/select.c @@ -0,0 +1,30 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +__select (nfds, readfds, writefds, exceptfds, timeout) + int nfds; + fd_set *readfds; + fd_set *writefds; + fd_set *exceptfds; + struct timeval *timeout; +{ + return select (nfds, readfds, writefds, exceptfds, timeout); +} From fb8b9f103c1a250a29da97bcc6cc416959a47ac8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 16:04:22 +0000 Subject: [PATCH 2053/4487] AIX semctl implementation. --- sysdeps/unix/sysv/aix/semctl.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/aix/semctl.c diff --git a/sysdeps/unix/sysv/aix/semctl.c b/sysdeps/unix/sysv/aix/semctl.c new file mode 100644 index 0000000000..6036fbbffd --- /dev/null +++ b/sysdeps/unix/sysv/aix/semctl.c @@ -0,0 +1 @@ +/* This is a system call. */ From cd39f671cadf62fd662d2be449236995ed018960 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 16:05:03 +0000 Subject: [PATCH 2054/4487] AIX semget implementation. --- sysdeps/unix/sysv/aix/semget.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/aix/semget.c diff --git a/sysdeps/unix/sysv/aix/semget.c b/sysdeps/unix/sysv/aix/semget.c new file mode 100644 index 0000000000..6036fbbffd --- /dev/null +++ b/sysdeps/unix/sysv/aix/semget.c @@ -0,0 +1 @@ +/* This is a system call. */ From 580c1a55bb3c949fb7d067fc5bf7fac993a25985 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 16:05:38 +0000 Subject: [PATCH 2055/4487] AIX semop implementation. --- sysdeps/unix/sysv/aix/semop.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/aix/semop.c diff --git a/sysdeps/unix/sysv/aix/semop.c b/sysdeps/unix/sysv/aix/semop.c new file mode 100644 index 0000000000..6036fbbffd --- /dev/null +++ b/sysdeps/unix/sysv/aix/semop.c @@ -0,0 +1 @@ +/* This is a system call. */ From 3669ba5cb8aa7db4f2d9c185ed23c96cd35d9c50 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 16:06:12 +0000 Subject: [PATCH 2056/4487] AIX sendto implementation. --- sysdeps/unix/sysv/aix/sendto.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/aix/sendto.c diff --git a/sysdeps/unix/sysv/aix/sendto.c b/sysdeps/unix/sysv/aix/sendto.c new file mode 100644 index 0000000000..6036fbbffd --- /dev/null +++ b/sysdeps/unix/sysv/aix/sendto.c @@ -0,0 +1 @@ +/* This is a system call. */ From 7d83250b898c86652cd1a3981922234136d9e03a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 16:07:13 +0000 Subject: [PATCH 2057/4487] Define ID_EFFECTIVE. --- sysdeps/unix/sysv/aix/setegid.c | 3 +-- sysdeps/unix/sysv/aix/seteuid.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/aix/setegid.c b/sysdeps/unix/sysv/aix/setegid.c index 9f660ff27a..eedc71a54c 100644 --- a/sysdeps/unix/sysv/aix/setegid.c +++ b/sysdeps/unix/sysv/aix/setegid.c @@ -18,8 +18,7 @@ #include -/* is there a reason *NOT* to include ? If so #define ID_EFFECTIVE */ -#include +#define ID_EFFECTIVE 0x01 extern int setgidx (int mask, gid_t gid); diff --git a/sysdeps/unix/sysv/aix/seteuid.c b/sysdeps/unix/sysv/aix/seteuid.c index de9280be9e..c2fb9483dc 100644 --- a/sysdeps/unix/sysv/aix/seteuid.c +++ b/sysdeps/unix/sysv/aix/seteuid.c @@ -18,9 +18,8 @@ #include +#define ID_EFFECTIVE 0x01 -/* is there a reason *NOT* to include ? If so #define ID_EFFECTIVE */ -#include extern int setuidx (int mask, uid_t uid); From 08d89c57c2ea391a466fc53046bee5050092821f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 16:08:31 +0000 Subject: [PATCH 2058/4487] AIX setgroups implementation. --- sysdeps/unix/sysv/aix/setgroups.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/aix/setgroups.c diff --git a/sysdeps/unix/sysv/aix/setgroups.c b/sysdeps/unix/sysv/aix/setgroups.c new file mode 100644 index 0000000000..6036fbbffd --- /dev/null +++ b/sysdeps/unix/sysv/aix/setgroups.c @@ -0,0 +1 @@ +/* This is a system call. */ From f7446ac75bda9fac8588fa034ab4bc2b9ce0974b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 16:09:37 +0000 Subject: [PATCH 2059/4487] AIX setpgid implementation. --- sysdeps/unix/sysv/aix/setpgid.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/setpgid.c diff --git a/sysdeps/unix/sysv/aix/setpgid.c b/sysdeps/unix/sysv/aix/setpgid.c new file mode 100644 index 0000000000..cee16464fd --- /dev/null +++ b/sysdeps/unix/sysv/aix/setpgid.c @@ -0,0 +1,27 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +__setpgid (pid, pgid) + int pid; + int pgid; +{ + return setpgid (pid, pgid); +} From 9142cbef041ca2ba0bf4d0fdcf514dc67a35fc64 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 16:10:47 +0000 Subject: [PATCH 2060/4487] AIX setpgrp implementation. --- sysdeps/unix/sysv/aix/setpgrp.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/aix/setpgrp.c diff --git a/sysdeps/unix/sysv/aix/setpgrp.c b/sysdeps/unix/sysv/aix/setpgrp.c new file mode 100644 index 0000000000..6036fbbffd --- /dev/null +++ b/sysdeps/unix/sysv/aix/setpgrp.c @@ -0,0 +1 @@ +/* This is a system call. */ From 9cf10be3d40f0a4f77f806325c383e7fc2fef1b0 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 16:11:54 +0000 Subject: [PATCH 2061/4487] AIX setpriority implementation. --- sysdeps/unix/sysv/aix/setpriority.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/aix/setpriority.c diff --git a/sysdeps/unix/sysv/aix/setpriority.c b/sysdeps/unix/sysv/aix/setpriority.c new file mode 100644 index 0000000000..6036fbbffd --- /dev/null +++ b/sysdeps/unix/sysv/aix/setpriority.c @@ -0,0 +1 @@ +/* This is a system call. */ From bb67907d471e2511bedfc40ac3f5358a4b1886fb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 16:13:05 +0000 Subject: [PATCH 2062/4487] Define ID_EFFECTIVE and ID_REAL. --- sysdeps/unix/sysv/aix/setregid.c | 5 ++--- sysdeps/unix/sysv/aix/setreuid.c | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/sysdeps/unix/sysv/aix/setregid.c b/sysdeps/unix/sysv/aix/setregid.c index 02961b4dc0..b747b6c266 100644 --- a/sysdeps/unix/sysv/aix/setregid.c +++ b/sysdeps/unix/sysv/aix/setregid.c @@ -18,9 +18,8 @@ #include -/* is there a reason *NOT* to include ? */ -/* If so #define ID_EFFECTIVE and ID_REAL */ -#include +#define ID_EFFECTIVE 0x01 +#define ID_REAL 0x02 extern int setgidx (int mask, gid_t gid); diff --git a/sysdeps/unix/sysv/aix/setreuid.c b/sysdeps/unix/sysv/aix/setreuid.c index ecf12a1ff3..eafc764942 100644 --- a/sysdeps/unix/sysv/aix/setreuid.c +++ b/sysdeps/unix/sysv/aix/setreuid.c @@ -18,9 +18,9 @@ #include -/* is there a reason *NOT* to include ? */ -/* If so #define ID_EFFECTIVE and ID_REAL */ -#include +#define ID_EFFECTIVE 0x01 +#define ID_REAL 0x02 + extern int setuidx (int mask, uid_t uid); From 6376e31c11c4166b66ada78e341581aacbae9d31 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 16:15:14 +0000 Subject: [PATCH 2063/4487] AIX setrlimit implementation. --- sysdeps/unix/sysv/aix/setrlimit.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/setrlimit.c diff --git a/sysdeps/unix/sysv/aix/setrlimit.c b/sysdeps/unix/sysv/aix/setrlimit.c new file mode 100644 index 0000000000..d7480e3b6c --- /dev/null +++ b/sysdeps/unix/sysv/aix/setrlimit.c @@ -0,0 +1,25 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +__setrlimit (enum __rlimit_resource resource, const struct rlimit *rlimits) +{ + return setrlimit (resource, rlimits); +} From 2c4f60902aba56503bc5b7470efdbc1356a965ea Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 16:15:59 +0000 Subject: [PATCH 2064/4487] AIX setrlimit64 implementation. --- sysdeps/unix/sysv/aix/setrlimit64.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/setrlimit64.c diff --git a/sysdeps/unix/sysv/aix/setrlimit64.c b/sysdeps/unix/sysv/aix/setrlimit64.c new file mode 100644 index 0000000000..bfb1594ae0 --- /dev/null +++ b/sysdeps/unix/sysv/aix/setrlimit64.c @@ -0,0 +1,25 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +__setrlimit64 (enum __rlimit_resource resource, const struct rlimit64 *rlimits) +{ + return setrlimit64 (resource, rlimits); +} From 4d70663df0646574d7cdaa345f45f9d34796b905 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 16:16:41 +0000 Subject: [PATCH 2065/4487] AIX setsid implementation. --- sysdeps/unix/sysv/aix/setsid.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/setsid.c diff --git a/sysdeps/unix/sysv/aix/setsid.c b/sysdeps/unix/sysv/aix/setsid.c new file mode 100644 index 0000000000..980649bbbf --- /dev/null +++ b/sysdeps/unix/sysv/aix/setsid.c @@ -0,0 +1,25 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +__setsid () +{ + return setsid (); +} From 74cb21ae8f6bed6d64eb56b4557ce9849423b42b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 16:17:20 +0000 Subject: [PATCH 2066/4487] AIX setsockopt implementation. --- sysdeps/unix/sysv/aix/setsockopt.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/aix/setsockopt.c diff --git a/sysdeps/unix/sysv/aix/setsockopt.c b/sysdeps/unix/sysv/aix/setsockopt.c new file mode 100644 index 0000000000..6036fbbffd --- /dev/null +++ b/sysdeps/unix/sysv/aix/setsockopt.c @@ -0,0 +1 @@ +/* This is a system call. */ From b7ed538a9dde8b6edb5a54646d912d86f8afae42 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 16:17:51 +0000 Subject: [PATCH 2067/4487] Define ID_REAL. --- sysdeps/unix/sysv/aix/setgid.c | 3 +-- sysdeps/unix/sysv/aix/setuid.c | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/aix/setgid.c b/sysdeps/unix/sysv/aix/setgid.c index bf976ec72e..ba1b01ef35 100644 --- a/sysdeps/unix/sysv/aix/setgid.c +++ b/sysdeps/unix/sysv/aix/setgid.c @@ -18,9 +18,8 @@ #include +#define ID_REAL 0x02 -/* is there a reason *NOT* to include ? If so #define ID_REAL */ -#include extern int setgidx (int mask, gid_t gid); diff --git a/sysdeps/unix/sysv/aix/setuid.c b/sysdeps/unix/sysv/aix/setuid.c index 679db050bd..a86343a602 100644 --- a/sysdeps/unix/sysv/aix/setuid.c +++ b/sysdeps/unix/sysv/aix/setuid.c @@ -18,8 +18,8 @@ #include -/* is there a reason *NOT* to include ? If so #define ID_REAL */ -#include +#define ID_REAL 0x02 + extern int setuidx (int mask, uid_t uid); From 8c0364334c3d605271a7519d8a8bc9ed4b7102b7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 17:16:24 +0000 Subject: [PATCH 2068/4487] AIX shmat implementation. --- sysdeps/unix/sysv/aix/shmat.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/aix/shmat.c diff --git a/sysdeps/unix/sysv/aix/shmat.c b/sysdeps/unix/sysv/aix/shmat.c new file mode 100644 index 0000000000..6036fbbffd --- /dev/null +++ b/sysdeps/unix/sysv/aix/shmat.c @@ -0,0 +1 @@ +/* This is a system call. */ From d117b990086e28993146fbe6ac933b2e0a93986f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 17:17:12 +0000 Subject: [PATCH 2069/4487] AIX shmctl implementation. --- sysdeps/unix/sysv/aix/shmctl.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/aix/shmctl.c diff --git a/sysdeps/unix/sysv/aix/shmctl.c b/sysdeps/unix/sysv/aix/shmctl.c new file mode 100644 index 0000000000..6036fbbffd --- /dev/null +++ b/sysdeps/unix/sysv/aix/shmctl.c @@ -0,0 +1 @@ +/* This is a system call. */ From 58aea19680409cb9a8a245cb4aac4d8090e505f8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 17:18:00 +0000 Subject: [PATCH 2070/4487] AIX shmdt implementation. --- sysdeps/unix/sysv/aix/shmdt.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/aix/shmdt.c diff --git a/sysdeps/unix/sysv/aix/shmdt.c b/sysdeps/unix/sysv/aix/shmdt.c new file mode 100644 index 0000000000..6036fbbffd --- /dev/null +++ b/sysdeps/unix/sysv/aix/shmdt.c @@ -0,0 +1 @@ +/* This is a system call. */ From 3cac39029925aafd30a2fcfa8c4ca28dbc91097b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 17:18:37 +0000 Subject: [PATCH 2071/4487] AIX shmget implementation. --- sysdeps/unix/sysv/aix/shmget.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/aix/shmget.c diff --git a/sysdeps/unix/sysv/aix/shmget.c b/sysdeps/unix/sysv/aix/shmget.c new file mode 100644 index 0000000000..6036fbbffd --- /dev/null +++ b/sysdeps/unix/sysv/aix/shmget.c @@ -0,0 +1 @@ +/* This is a system call. */ From 8089d978a522c91decde39fd2186ef4e3714985b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 17:19:16 +0000 Subject: [PATCH 2072/4487] AIX sigaltstack implementation. --- sysdeps/unix/sysv/aix/sigaltstack.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/aix/sigaltstack.c diff --git a/sysdeps/unix/sysv/aix/sigaltstack.c b/sysdeps/unix/sysv/aix/sigaltstack.c new file mode 100644 index 0000000000..6036fbbffd --- /dev/null +++ b/sysdeps/unix/sysv/aix/sigaltstack.c @@ -0,0 +1 @@ +/* This is a system call. */ From 7960128f5db5ce3406c7241fe3a0d0d6fe0da6d1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 17:20:01 +0000 Subject: [PATCH 2073/4487] AIX sgistack implementation. --- sysdeps/unix/sysv/aix/sigstack.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/aix/sigstack.c diff --git a/sysdeps/unix/sysv/aix/sigstack.c b/sysdeps/unix/sysv/aix/sigstack.c new file mode 100644 index 0000000000..6036fbbffd --- /dev/null +++ b/sysdeps/unix/sysv/aix/sigstack.c @@ -0,0 +1 @@ +/* This is a system call. */ From 6d46f52217d88b30fff2d1a16a012034edca0844 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 17:20:43 +0000 Subject: [PATCH 2074/4487] AIX socket implementation. --- sysdeps/unix/sysv/aix/socket.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/socket.c diff --git a/sysdeps/unix/sysv/aix/socket.c b/sysdeps/unix/sysv/aix/socket.c new file mode 100644 index 0000000000..8e409cb0a3 --- /dev/null +++ b/sysdeps/unix/sysv/aix/socket.c @@ -0,0 +1,25 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +__socket (int domain, int type, int protocol) +{ + return socket (domain, type, protocol); +} From 5dfa9a879133f5de3cb99544c2281d4709fea5d2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 17:21:56 +0000 Subject: [PATCH 2075/4487] AIX socketpair implementation. --- sysdeps/unix/sysv/aix/socketpair.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/socketpair.c diff --git a/sysdeps/unix/sysv/aix/socketpair.c b/sysdeps/unix/sysv/aix/socketpair.c new file mode 100644 index 0000000000..b4dda7fef1 --- /dev/null +++ b/sysdeps/unix/sysv/aix/socketpair.c @@ -0,0 +1,25 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +__socketpair (int domain, int type, int protocol, int fds[2]) +{ + return socketpair (domain, type, protocol, fds); +} From 3768742b5ca80433a80862ab05c72a3086074dd2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 17:23:08 +0000 Subject: [PATCH 2076/4487] AIX cf[sg]et[io]speed implementations. --- sysdeps/unix/sysv/aix/speed.c | 72 +++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/speed.c diff --git a/sysdeps/unix/sysv/aix/speed.c b/sysdeps/unix/sysv/aix/speed.c new file mode 100644 index 0000000000..06934fef25 --- /dev/null +++ b/sysdeps/unix/sysv/aix/speed.c @@ -0,0 +1,72 @@ +/* `struct termios' speed frobnication functions. AIX version. + Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include + +/* Return the output baud rate stored in *TERMIOS_P. */ +speed_t +cfgetospeed (termios_p) + const struct termios *termios_p; +{ + return termios_p->c_cflag & 0x0000000f; +} + +/* Return the input baud rate stored in *TERMIOS_P. */ +speed_t +cfgetispeed (termios_p) + const struct termios *termios_p; +{ + return (termios_p->c_cflag & 0x000f0000) >> 16; +} + +/* Set the output baud rate stored in *TERMIOS_P to SPEED. */ +int +cfsetospeed (termios_p, speed) + struct termios *termios_p; + speed_t speed; +{ + if (termios_p == NULL) + { + __set_errno (EINVAL); + return -1; + } + + termios_p->c_cflag &= ~0x0000000f; + termios_p->c_cflag |= speed & 0x0000000f; + return 0; +} + +/* Set the input baud rate stored in *TERMIOS_P to SPEED. */ +int +cfsetispeed (termios_p, speed) + struct termios *termios_p; + speed_t speed; +{ + if (termios_p == NULL) + { + __set_errno (EINVAL); + return -1; + } + + termios_p->c_cflag &= ~0x000f0000; + termios_p->c_cflag |= (speed << 16) & ~0x000f0000; + return 0; +} From be97d53c5e3cb67e0e39636593c29c460034be07 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 17:24:57 +0000 Subject: [PATCH 2077/4487] AIX symlink implementation. --- sysdeps/unix/sysv/aix/symlink.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/symlink.c diff --git a/sysdeps/unix/sysv/aix/symlink.c b/sysdeps/unix/sysv/aix/symlink.c new file mode 100644 index 0000000000..a70f103450 --- /dev/null +++ b/sysdeps/unix/sysv/aix/symlink.c @@ -0,0 +1,27 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +__symlink (from, to) + const char *from; + const char *to; +{ + return symlink (from, to); +} From 1fcf9f333989d58cf8a3d485f294af8bab3c884e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 17:25:35 +0000 Subject: [PATCH 2078/4487] AIX sync implementation. --- sysdeps/unix/sysv/aix/sync.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/aix/sync.c diff --git a/sysdeps/unix/sysv/aix/sync.c b/sysdeps/unix/sysv/aix/sync.c new file mode 100644 index 0000000000..6036fbbffd --- /dev/null +++ b/sysdeps/unix/sysv/aix/sync.c @@ -0,0 +1 @@ +/* This is a system call. */ From 2b6e50c981f46b5fcf17b9072dc751856e3bd162 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 17:26:12 +0000 Subject: [PATCH 2079/4487] Define NGROUPS. --- sysdeps/unix/sysv/aix/sys/param.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysdeps/unix/sysv/aix/sys/param.h b/sysdeps/unix/sysv/aix/sys/param.h index e128d8d60b..66f2127fbe 100644 --- a/sysdeps/unix/sysv/aix/sys/param.h +++ b/sysdeps/unix/sysv/aix/sys/param.h @@ -13,6 +13,9 @@ /* The pagesize is 4096. */ #define EXEC_PAGESIZE 4096 +/* maximum number of supplemental groups. */ +#define NGROUPS 32 + /* Macros for min/max. */ #define MIN(a,b) (((a)<(b))?(a):(b)) #define MAX(a,b) (((a)>(b))?(a):(b)) From bc84839066d313567b1c0a8b5a4d6807fbb789ea Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 17:32:06 +0000 Subject: [PATCH 2080/4487] AIX tcgetattr implementation. --- sysdeps/unix/sysv/aix/tcgetattr.c | 152 ++++++++++++++++++++++++++++++ 1 file changed, 152 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/tcgetattr.c diff --git a/sysdeps/unix/sysv/aix/tcgetattr.c b/sysdeps/unix/sysv/aix/tcgetattr.c new file mode 100644 index 0000000000..b994f178bd --- /dev/null +++ b/sysdeps/unix/sysv/aix/tcgetattr.c @@ -0,0 +1,152 @@ +/* Copyright (C) 1992, 1995, 1996, 1997, 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include +#include +#include + +/* Put the state of FD into *TERMIOS_P. */ +int +__tcgetattr (fd, termios_p) + int fd; + struct termios *termios_p; +{ + struct __sysv_termio buf; + + if (termios_p == NULL) + { + __set_errno (EINVAL); + return -1; + } + + if (__ioctl (fd, _TCGETA, &buf) < 0) + return -1; + + termios_p->c_cflag &= ~0x000f0000; + termios_p->c_cflag |= (termios_p->c_cflag & 0xf) << 16; + + termios_p->c_iflag = 0; + if (buf.c_iflag & _SYSV_IGNBRK) + termios_p->c_iflag |= IGNBRK; + if (buf.c_iflag & _SYSV_BRKINT) + termios_p->c_iflag |= BRKINT; + if (buf.c_iflag & _SYSV_IGNPAR) + termios_p->c_iflag |= IGNPAR; + if (buf.c_iflag & _SYSV_PARMRK) + termios_p->c_iflag |= PARMRK; + if (buf.c_iflag & _SYSV_INPCK) + termios_p->c_iflag |= INPCK; + if (buf.c_iflag & _SYSV_ISTRIP) + termios_p->c_iflag |= ISTRIP; + if (buf.c_iflag & _SYSV_INLCR) + termios_p->c_iflag |= INLCR; + if (buf.c_iflag & _SYSV_IGNCR) + termios_p->c_iflag |= IGNCR; + if (buf.c_iflag & _SYSV_ICRNL) + termios_p->c_iflag |= ICRNL; + if (buf.c_iflag & _SYSV_IXON) + termios_p->c_iflag |= IXON; + if (buf.c_iflag & _SYSV_IXOFF) + termios_p->c_iflag |= IXOFF; + if (buf.c_iflag & _SYSV_IXANY) + termios_p->c_iflag |= IXANY; + if (buf.c_iflag & _SYSV_IMAXBEL) + termios_p->c_iflag |= IMAXBEL; + + termios_p->c_oflag = 0; + if (buf.c_oflag & OPOST) + termios_p->c_oflag |= OPOST; + if (buf.c_oflag & ONLCR) + termios_p->c_oflag |= ONLCR; + termios_p->c_cflag = 0; + switch (buf.c_cflag & _SYSV_CSIZE) + { + case _SYSV_CS5: + termios_p->c_cflag |= CS5; + break; + case _SYSV_CS6: + termios_p->c_cflag |= CS6; + break; + case _SYSV_CS7: + termios_p->c_cflag |= CS7; + break; + case _SYSV_CS8: + termios_p->c_cflag |= CS8; + break; + } + if (buf.c_cflag & _SYSV_CSTOPB) + termios_p->c_cflag |= CSTOPB; + if (buf.c_cflag & _SYSV_CREAD) + termios_p->c_cflag |= CREAD; + if (buf.c_cflag & _SYSV_PARENB) + termios_p->c_cflag |= PARENB; + if (buf.c_cflag & _SYSV_PARODD) + termios_p->c_cflag |= PARODD; + if (buf.c_cflag & _SYSV_HUPCL) + termios_p->c_cflag |= HUPCL; + if (buf.c_cflag & _SYSV_CLOCAL) + termios_p->c_cflag |= CLOCAL; + termios_p->c_lflag = 0; + if (buf.c_lflag & _SYSV_ISIG) + termios_p->c_lflag |= ISIG; + if (buf.c_lflag & _SYSV_ICANON) + termios_p->c_lflag |= ICANON; + if (buf.c_lflag & _SYSV_ECHO) + termios_p->c_lflag |= ECHO; + if (buf.c_lflag & _SYSV_ECHOE) + termios_p->c_lflag |= ECHOE; + if (buf.c_lflag & _SYSV_ECHOK) + termios_p->c_lflag |= ECHOK; + if (buf.c_lflag & _SYSV_ECHONL) + termios_p->c_lflag |= ECHONL; + if (buf.c_lflag & _SYSV_NOFLSH) + termios_p->c_lflag |= NOFLSH; + if (buf.c_lflag & _SYSV_TOSTOP) + termios_p->c_lflag |= TOSTOP; + if (buf.c_lflag & _SYSV_ECHOKE) + termios_p->c_lflag |= ECHOKE; + if (buf.c_lflag & _SYSV_ECHOPRT) + termios_p->c_lflag |= ECHOPRT; + if (buf.c_lflag & _SYSV_ECHOCTL) + termios_p->c_lflag |= ECHOCTL; + if (buf.c_lflag & _SYSV_FLUSHO) + termios_p->c_lflag |= FLUSHO; + if (buf.c_lflag & _SYSV_PENDIN) + termios_p->c_lflag |= PENDIN; + if (buf.c_lflag & _SYSV_IEXTEN) + termios_p->c_lflag |= IEXTEN; + + termios_p->c_cc[VEOF] = buf.c_cc[_SYSV_VEOF]; + termios_p->c_cc[VEOL] = buf.c_cc[_SYSV_VEOL]; + termios_p->c_cc[VEOL2] = buf.c_cc[_SYSV_VEOL2]; + termios_p->c_cc[VERASE] = buf.c_cc[_SYSV_VERASE]; + termios_p->c_cc[VKILL] = buf.c_cc[_SYSV_VKILL]; + termios_p->c_cc[VINTR] = buf.c_cc[_SYSV_VINTR]; + termios_p->c_cc[VQUIT] = buf.c_cc[_SYSV_VQUIT]; + termios_p->c_cc[VSTART] = '\021'; /* XON (^Q). */ + termios_p->c_cc[VSTOP] = '\023'; /* XOFF (^S). */ + termios_p->c_cc[VSUSP] = '\0'; /* System V release 3 lacks job control. */ + termios_p->c_cc[VMIN] = buf.c_cc[_SYSV_VMIN]; + termios_p->c_cc[VTIME] = buf.c_cc[_SYSV_VTIME]; + + return 0; +} + +weak_alias (__tcgetattr, tcgetattr) From 79be7d26af01d4ffc99e8d1d4b55f747b60806e9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 17:33:41 +0000 Subject: [PATCH 2081/4487] AIX tcsetattr implementation. --- sysdeps/unix/sysv/aix/tcsetattr.c | 197 ++++++++++++++++++++++++++++++ 1 file changed, 197 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/tcsetattr.c diff --git a/sysdeps/unix/sysv/aix/tcsetattr.c b/sysdeps/unix/sysv/aix/tcsetattr.c new file mode 100644 index 0000000000..516bcfb635 --- /dev/null +++ b/sysdeps/unix/sysv/aix/tcsetattr.c @@ -0,0 +1,197 @@ +/* Copyright (C) 1992, 1995, 1996, 1997, 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include +#include + +#include + + +const speed_t __unix_speeds[] = + { + 0, + 50, + 75, + 110, + 134, + 150, + 200, + 300, + 600, + 1200, + 1800, + 2400, + 4800, + 9600, + 19200, + 38400, + }; + + +/* Set the state of FD to *TERMIOS_P. */ +int +tcsetattr (fd, optional_actions, termios_p) + int fd; + int optional_actions; + const struct termios *termios_p; +{ + struct __sysv_termio buf; + int ioctl_function; + + if (termios_p == NULL) + { + __set_errno (EINVAL); + return -1; + } + switch (optional_actions) + { + case TCSANOW: + ioctl_function = _TCSETA; + break; + case TCSADRAIN: + ioctl_function = _TCSETAW; + break; + case TCSAFLUSH: + ioctl_function = _TCSETAF; + break; + default: + __set_errno (EINVAL); + return -1; + } + + if ((termios_p->c_cflag & 0x000f0000) >> 16 != (termios_p->c_cflag & 0xf)) + { + __set_errno (EINVAL); + return -1; + } + + buf.c_iflag = 0; + if (termios_p->c_iflag & IGNBRK) + buf.c_iflag |= _SYSV_IGNBRK; + if (termios_p->c_iflag & BRKINT) + buf.c_iflag |= _SYSV_BRKINT; + if (termios_p->c_iflag & IGNPAR) + buf.c_iflag |= _SYSV_IGNPAR; + if (termios_p->c_iflag & PARMRK) + buf.c_iflag |= _SYSV_PARMRK; + if (termios_p->c_iflag & INPCK) + buf.c_iflag |= _SYSV_INPCK; + if (termios_p->c_iflag & ISTRIP) + buf.c_iflag |= _SYSV_ISTRIP; + if (termios_p->c_iflag & INLCR) + buf.c_iflag |= _SYSV_INLCR; + if (termios_p->c_iflag & IGNCR) + buf.c_iflag |= _SYSV_IGNCR; + if (termios_p->c_iflag & ICRNL) + buf.c_iflag |= _SYSV_ICRNL; + if (termios_p->c_iflag & IXON) + buf.c_iflag |= _SYSV_IXON; + if (termios_p->c_iflag & IXOFF) + buf.c_iflag |= _SYSV_IXOFF; + if (termios_p->c_iflag & IXANY) + buf.c_iflag |= _SYSV_IXANY; + if (termios_p->c_iflag & IMAXBEL) + buf.c_iflag |= _SYSV_IMAXBEL; + + buf.c_oflag = 0; + if (termios_p->c_oflag & OPOST) + buf.c_oflag |= _SYSV_OPOST; + if (termios_p->c_oflag & ONLCR) + buf.c_oflag |= _SYSV_ONLCR; + + /* So far, buf.c_cflag contains the speed in CBAUD. */ + if (termios_p->c_cflag & CSTOPB) + buf.c_cflag |= _SYSV_CSTOPB; + if (termios_p->c_cflag & CREAD) + buf.c_cflag |= _SYSV_CREAD; + if (termios_p->c_cflag & PARENB) + buf.c_cflag |= _SYSV_PARENB; + if (termios_p->c_cflag & PARODD) + buf.c_cflag |= _SYSV_PARODD; + if (termios_p->c_cflag & HUPCL) + buf.c_cflag |= _SYSV_HUPCL; + if (termios_p->c_cflag & CLOCAL) + buf.c_cflag |= _SYSV_CLOCAL; + switch (termios_p->c_cflag & CSIZE) + { + case CS5: + buf.c_cflag |= _SYSV_CS5; + break; + case CS6: + buf.c_cflag |= _SYSV_CS6; + break; + case CS7: + buf.c_cflag |= _SYSV_CS7; + break; + case CS8: + buf.c_cflag |= _SYSV_CS8; + break; + } + + buf.c_lflag = 0; + if (termios_p->c_lflag & ISIG) + buf.c_lflag |= _SYSV_ISIG; + if (termios_p->c_lflag & ICANON) + buf.c_lflag |= _SYSV_ICANON; + if (termios_p->c_lflag & ECHO) + buf.c_lflag |= _SYSV_ECHO; + if (termios_p->c_lflag & ECHOE) + buf.c_lflag |= _SYSV_ECHOE; + if (termios_p->c_lflag & ECHOK) + buf.c_lflag |= _SYSV_ECHOK; + if (termios_p->c_lflag & ECHONL) + buf.c_lflag |= _SYSV_ECHONL; + if (termios_p->c_lflag & NOFLSH) + buf.c_lflag |= _SYSV_NOFLSH; + if (termios_p->c_lflag & TOSTOP) + buf.c_lflag |= _SYSV_TOSTOP; + if (termios_p->c_lflag & ECHOCTL) + buf.c_lflag |= _SYSV_ECHOCTL; + if (termios_p->c_lflag & ECHOPRT) + buf.c_lflag |= _SYSV_ECHOPRT; + if (termios_p->c_lflag & ECHOKE) + buf.c_lflag |= _SYSV_ECHOKE; + if (termios_p->c_lflag & FLUSHO) + buf.c_lflag |= _SYSV_FLUSHO; + if (termios_p->c_lflag & PENDIN) + buf.c_lflag |= _SYSV_PENDIN; + if (termios_p->c_lflag & IEXTEN) + buf.c_lflag |= _SYSV_IEXTEN; + + buf.c_cc[_SYSV_VINTR] = termios_p->c_cc[VINTR]; + buf.c_cc[_SYSV_VQUIT] = termios_p->c_cc[VQUIT]; + buf.c_cc[_SYSV_VERASE] = termios_p->c_cc[VERASE]; + buf.c_cc[_SYSV_VKILL] = termios_p->c_cc[VKILL]; + if (buf.c_lflag & _SYSV_ICANON) + { + buf.c_cc[_SYSV_VEOF] = termios_p->c_cc[VEOF]; + buf.c_cc[_SYSV_VEOL] = termios_p->c_cc[VEOL]; + } + else + { + buf.c_cc[_SYSV_VMIN] = termios_p->c_cc[VMIN]; + buf.c_cc[_SYSV_VTIME] = termios_p->c_cc[VTIME]; + } + buf.c_cc[_SYSV_VEOL2] = termios_p->c_cc[VEOL2]; + + if (__ioctl (fd, ioctl_function, &buf) < 0) + return -1; + return 0; +} From 361684a9a289dda675a9d2af9b949971a854baf8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 17:36:12 +0000 Subject: [PATCH 2082/4487] AIX times implementation. --- sysdeps/unix/sysv/aix/times.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/times.c diff --git a/sysdeps/unix/sysv/aix/times.c b/sysdeps/unix/sysv/aix/times.c new file mode 100644 index 0000000000..c974049738 --- /dev/null +++ b/sysdeps/unix/sysv/aix/times.c @@ -0,0 +1,30 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +/* Store the CPU time used by this process and all its + dead children (and their dead children) in BUFFER. + Return the elapsed real time, or (clock_t) -1 for errors. + All times are in CLK_TCKths of a second. */ +clock_t +__times (buffer) + struct tms *buffer; +{ + return times (buffer); +} From 42ae56646a33902a0e470b5fe65c7d9884679e45 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 17:38:42 +0000 Subject: [PATCH 2083/4487] AIX ulimit implementation. --- sysdeps/unix/sysv/aix/ulimit.c | 37 ++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/ulimit.c diff --git a/sysdeps/unix/sysv/aix/ulimit.c b/sysdeps/unix/sysv/aix/ulimit.c new file mode 100644 index 0000000000..c72a527c0a --- /dev/null +++ b/sysdeps/unix/sysv/aix/ulimit.c @@ -0,0 +1,37 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +long int +__ulimit (int cmd, ...) +{ + va_list va; + long int arg; + long int res; + + va_start (va, cmd); + arg = va_arg (va, long int); + + res = ulimit (cmd, arg); + + va_end (va); + + return res; +} From 49bfeb5b7b28c94c17786b5ab564fc41b26053e4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 17:39:34 +0000 Subject: [PATCH 2084/4487] AIX umask implementation. --- sysdeps/unix/sysv/aix/umask.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/umask.c diff --git a/sysdeps/unix/sysv/aix/umask.c b/sysdeps/unix/sysv/aix/umask.c new file mode 100644 index 0000000000..6bbfdac5e3 --- /dev/null +++ b/sysdeps/unix/sysv/aix/umask.c @@ -0,0 +1,26 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +mode_t +__umask (mask) + mode_t mask; +{ + return umask (mask); +} From 3c6dd57c146299b0af9e8b04b1bd35127a29575a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 17:40:14 +0000 Subject: [PATCH 2085/4487] AIX unlink implementation. --- sysdeps/unix/sysv/aix/unlink.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/unlink.c diff --git a/sysdeps/unix/sysv/aix/unlink.c b/sysdeps/unix/sysv/aix/unlink.c new file mode 100644 index 0000000000..e1bac23f4b --- /dev/null +++ b/sysdeps/unix/sysv/aix/unlink.c @@ -0,0 +1,26 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +__unlink (name) + const char *name; +{ + return unlink (name); +} From 51ce9626814fea274f45c81bff6383cc74d5e10f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 17:40:45 +0000 Subject: [PATCH 2086/4487] AIX ustat implementation. --- sysdeps/unix/sysv/aix/ustat.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/aix/ustat.c diff --git a/sysdeps/unix/sysv/aix/ustat.c b/sysdeps/unix/sysv/aix/ustat.c new file mode 100644 index 0000000000..6036fbbffd --- /dev/null +++ b/sysdeps/unix/sysv/aix/ustat.c @@ -0,0 +1 @@ +/* This is a system call. */ From 6f571f1f690def73406fd6b28dc09a79e7205194 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 17:41:27 +0000 Subject: [PATCH 2087/4487] AIX utimes implementation. --- sysdeps/unix/sysv/aix/utimes.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/utimes.c diff --git a/sysdeps/unix/sysv/aix/utimes.c b/sysdeps/unix/sysv/aix/utimes.c new file mode 100644 index 0000000000..907931ac7e --- /dev/null +++ b/sysdeps/unix/sysv/aix/utimes.c @@ -0,0 +1,27 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +__utimes (file, tvp) + const char *file; + const struct timeval tvp[2]; +{ + return utimes (file, tvp); +} From 19250f4f64565ca8d466a768449960981622afd2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 17:41:57 +0000 Subject: [PATCH 2088/4487] Define STX_NORMAL. --- sysdeps/unix/sysv/aix/xstat.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/aix/xstat.c b/sysdeps/unix/sysv/aix/xstat.c index e053ce7f11..df01afadf9 100644 --- a/sysdeps/unix/sysv/aix/xstat.c +++ b/sysdeps/unix/sysv/aix/xstat.c @@ -19,9 +19,8 @@ #include #include -/* this is #define'd in why #define it here? #define STX_NORMAL 0x00 - */ + extern int statx (const char *pathname, struct stat *st, int len, int cmd); From f7bc29f16fe98297bf39d551ac35407626d22e1d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 17:42:20 +0000 Subject: [PATCH 2089/4487] Define STX_NORMAL and STX_64. --- sysdeps/unix/sysv/aix/xstat64.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/aix/xstat64.c b/sysdeps/unix/sysv/aix/xstat64.c index 07a62fd065..eadf637103 100644 --- a/sysdeps/unix/sysv/aix/xstat64.c +++ b/sysdeps/unix/sysv/aix/xstat64.c @@ -19,10 +19,9 @@ #include #include -/* these are #define'd in , why #define them here? #define STX_NORMAL 0x00 #define STX_64 0x08 - */ + extern int statx (const char *pathname, struct stat64 *st, int len, int cmd); From a24525ca5375efcc3f75105e1b6428815244f7ff Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 17:54:56 +0000 Subject: [PATCH 2090/4487] Fix typo. --- sysdeps/unix/sysv/aix/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/aix/Makefile b/sysdeps/unix/sysv/aix/Makefile index c94b9d45b6..3de7e02f49 100644 --- a/sysdeps/unix/sysv/aix/Makefile +++ b/sysdeps/unix/sysv/aix/Makefile @@ -12,7 +12,7 @@ endif # Don't compile the ctype glue code, since there is no old non-GNU C library. inhibit-glue = yes -# XXX Don"t know yet why this is needed in the moment. +# XXX Don't know yet why this is needed in the moment. ifeq ($(subdir),timezone) CPPFLAGS-zic.c = -Dunix endif From 46737e2def50c93e243f3fc2582c083acda0c4f0 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 17:56:51 +0000 Subject: [PATCH 2091/4487] Don't try to include . --- sysdeps/unix/sysv/aix/getegid.c | 3 --- sysdeps/unix/sysv/aix/geteuid.c | 3 --- 2 files changed, 6 deletions(-) diff --git a/sysdeps/unix/sysv/aix/getegid.c b/sysdeps/unix/sysv/aix/getegid.c index 30a6a995a8..7e88c89360 100644 --- a/sysdeps/unix/sysv/aix/getegid.c +++ b/sysdeps/unix/sysv/aix/getegid.c @@ -17,9 +17,6 @@ Boston, MA 02111-1307, USA. */ #include -/* is there a reason *NOT* to include ? If so #define ID_EFFECTIVE */ -#include - gid_t __getegid (void) diff --git a/sysdeps/unix/sysv/aix/geteuid.c b/sysdeps/unix/sysv/aix/geteuid.c index 4856868445..3c695b28e5 100644 --- a/sysdeps/unix/sysv/aix/geteuid.c +++ b/sysdeps/unix/sysv/aix/geteuid.c @@ -17,9 +17,6 @@ Boston, MA 02111-1307, USA. */ #include -/* is there a reason *NOT* to include ? If so #define ID_EFFECTIVE */ -#include - uid_t __geteuid (void) From 5166e402b8570a481bcf7c10e32632579af04b5e Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 18 Apr 2000 18:31:00 +0000 Subject: [PATCH 2092/4487] 2000-04-18 Andreas Jaeger * sysdeps/mips/dl-machine.h (elf_machine_rel): Fix relocation. --- sysdeps/mips/dl-machine.h | 39 +++++++++++---------------------------- 1 file changed, 11 insertions(+), 28 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index a15b78d52d..de5df0831b 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -428,40 +428,23 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, const ElfW(Sym) *sym, const struct r_found_version *version, ElfW(Addr) *const reloc_addr) { - ElfW(Addr) loadbase; - ElfW(Addr) undo __attribute__ ((unused)); +#ifndef RTLD_BOOTSTRAP + /* This is defined in rtld.c, but nowhere in the static libc.a; + make the reference weak so static programs can still link. This + declaration cannot be done when compiling rtld.c (i.e. #ifdef + RTLD_BOOTSTRAP) because rtld.c contains the common defn for + _dl_rtld_map, which is incompatible with a weak decl in the same + file. */ + weak_extern (_dl_rtld_map); +#endif switch (ELFW(R_TYPE) (reloc->r_info)) { case R_MIPS_REL32: - { - ElfW(Addr) undo = 0; - - if (ELFW(ST_BIND) (sym->st_info) == STB_LOCAL - && (ELFW(ST_TYPE) (sym->st_info) == STT_SECTION - || ELFW(ST_TYPE) (sym->st_info) == STT_NOTYPE)) - { - *reloc_addr += map->l_addr; - break; - } #ifndef RTLD_BOOTSTRAP - /* This is defined in rtld.c, but nowhere in the static libc.a; - make the reference weak so static programs can still link. This - declaration cannot be done when compiling rtld.c (i.e. #ifdef - RTLD_BOOTSTRAP) because rtld.c contains the common defn for - _dl_rtld_map, which is incompatible with a weak decl in the same - file. */ - weak_extern (_dl_rtld_map); - if (map == &_dl_rtld_map) - /* Undo the relocation done here during bootstrapping. Now we will - relocate it anew, possibly using a binding found in the user - program or a loaded library rather than the dynamic linker's - built-in definitions used while loading those libraries. */ - undo = map->l_addr + sym->st_value; + if (map != &_dl_rtld_map) #endif - loadbase = RESOLVE (&sym, version, R_MIPS_REL32); - *reloc_addr += (sym ? (loadbase + sym->st_value) : 0) - undo; - } + *reloc_addr += map->l_addr; break; case R_MIPS_NONE: /* Alright, Wilbur. */ break; From e110de66839a68553910723aed61574f312c80e8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 19:38:24 +0000 Subject: [PATCH 2093/4487] Define ID_EFFECTIVE. --- sysdeps/unix/sysv/aix/getegid.c | 3 +++ sysdeps/unix/sysv/aix/geteuid.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/sysdeps/unix/sysv/aix/getegid.c b/sysdeps/unix/sysv/aix/getegid.c index 7e88c89360..d092fc56f9 100644 --- a/sysdeps/unix/sysv/aix/getegid.c +++ b/sysdeps/unix/sysv/aix/getegid.c @@ -18,6 +18,9 @@ #include +#define ID_EFFECTIVE 0x01 + + gid_t __getegid (void) { diff --git a/sysdeps/unix/sysv/aix/geteuid.c b/sysdeps/unix/sysv/aix/geteuid.c index 3c695b28e5..86034b3fed 100644 --- a/sysdeps/unix/sysv/aix/geteuid.c +++ b/sysdeps/unix/sysv/aix/geteuid.c @@ -18,6 +18,9 @@ #include +#define ID_EFFECTIVE 0x01 + + uid_t __geteuid (void) { From b146f384322aad3acc2ac6d7e76e0b2be54a501e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 19:41:18 +0000 Subject: [PATCH 2094/4487] Define ACC_INVOKER. --- sysdeps/unix/sysv/aix/access.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/unix/sysv/aix/access.c b/sysdeps/unix/sysv/aix/access.c index d46a524180..fb94a5412a 100644 --- a/sysdeps/unix/sysv/aix/access.c +++ b/sysdeps/unix/sysv/aix/access.c @@ -18,6 +18,8 @@ #include +#define ACC_INVOKER 0x01 + extern int accessx (const char *name, int type, int who); int From 5714e995715628372bf20ce16b0332d2b981ceee Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Apr 2000 19:43:07 +0000 Subject: [PATCH 2095/4487] Fix type of len argument. --- sysdeps/unix/sysv/aix/gethostname.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/aix/gethostname.c b/sysdeps/unix/sysv/aix/gethostname.c index b213c6ffd5..76c8c72d87 100644 --- a/sysdeps/unix/sysv/aix/gethostname.c +++ b/sysdeps/unix/sysv/aix/gethostname.c @@ -21,7 +21,7 @@ int __gethostname (name, len) char *name; - size_t len; + socklen_t len; { return gethostname (name, len); } From 5494bc3a50cf2384b965760bd44639cfa4391142 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 21 Apr 2000 16:37:58 +0000 Subject: [PATCH 2096/4487] 2000-04-21 Andreas Jaeger * sysdeps/mips/elf/start.S: Use __PIC__ instead of PIC. * sysdeps/mips/mips64/add_n.S: Likewise. * sysdeps/mips/mips64/bsd-_setjmp.S: Likewise. * sysdeps/mips/mips64/lshift.S: Likewise. * sysdeps/mips/mips64/mul_1.S: Likewise. * sysdeps/mips/mips64/rshift.S: Likewise. * sysdeps/mips/mips64/setjmp.S: Likewise. * sysdeps/mips/mips64/sub_n.S: Likewise. * sysdeps/mips/mips64/submul_1.S: Likewise. * sysdeps/mips/dl-machine.h (elf_machine_got_rel): Remove strtab and update comment. The strtab from _dl_relocate_object can be used. --- sysdeps/mips/dl-machine.h | 12 +++++------- sysdeps/mips/elf/start.S | 5 ++--- sysdeps/mips/mips64/add_n.S | 6 +++--- sysdeps/mips/mips64/bsd-_setjmp.S | 6 +++--- sysdeps/mips/mips64/lshift.S | 6 +++--- sysdeps/mips/mips64/mul_1.S | 6 +++--- sysdeps/mips/mips64/rshift.S | 6 +++--- sysdeps/mips/mips64/setjmp.S | 6 +++--- sysdeps/mips/mips64/sub_n.S | 6 +++--- sysdeps/mips/mips64/submul_1.S | 6 +++--- 10 files changed, 31 insertions(+), 34 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index de5df0831b..a67eface5b 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -218,7 +218,7 @@ int _dl_mips_gnu_objects = 1; \ /* This is called from assembly stubs below which the compiler can't see. */ \ static ElfW(Addr) \ __dl_runtime_resolve (ElfW(Word), ElfW(Word), ElfW(Addr), ElfW(Addr)) \ - __attribute__ ((unused)); \ + __attribute__ ((unused)); \ \ static ElfW(Addr) \ __dl_runtime_resolve (ElfW(Word) sym_index, \ @@ -274,7 +274,7 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \ /* We already found the symbol. The module (and therefore its load \ address) is also known. */ \ value = l->l_addr + sym->st_value; \ - \ + \ /* Apply the relocation with that value. */ \ *(got + local_gotno + sym_index - gotsym) = value; \ \ @@ -297,7 +297,7 @@ _dl_runtime_resolve:\n \ .cpload $25\n \ .set reorder\n \ # Save slot call pc.\n \ - move $2, $31\n \ + move $2, $31\n \ # Save arguments and sp value in stack.\n \ subu $29, 40\n \ .cprestore 32\n \ @@ -468,11 +468,9 @@ elf_machine_got_rel (struct link_map *map, int lazy) ElfW(Addr) *got; ElfW(Sym) *sym; int i, n, symidx; -#ifndef RTLD_BOOTSTRAP - const char *strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]); -#endif /* This function is loaded in dl-reloc as a nested function and can - therefore access the variable scope from _dl_relocate_object. */ + therefore access the variables scope and strtab from + _dl_relocate_object. */ #ifdef RTLD_BOOTSTRAP # define RESOLVE_GOTSYM(sym,sym_index) 0 #else diff --git a/sysdeps/mips/elf/start.S b/sysdeps/mips/elf/start.S index b432953251..7fee4e71c3 100644 --- a/sysdeps/mips/elf/start.S +++ b/sysdeps/mips/elf/start.S @@ -51,7 +51,7 @@ char **argv, void (*init) (void), void (*fini) (void), void (*rtld_fini) (void), void *stack_end) */ -#ifdef PIC +#ifdef __PIC__ /* A macro to (re)initialize gp. We can get the run time address of 0f in ra ($31) by blezal instruction. In this early phase, we can't save gp in stack and .cprestore doesn't work properly. So we set gp by using @@ -67,7 +67,7 @@ .text .globl ENTRY_POINT ENTRY_POINT: -#ifdef PIC +#ifdef __PIC__ SET_GP #endif move $31, $0 @@ -93,7 +93,6 @@ ENTRY_POINT: sw $2, 20($29) /* rtld_fini */ sw $29, 24($29) /* stack_end */ jal __libc_start_main - hlt: b hlt /* Crash if somehow it does return. */ /* Define a symbol for the first piece of initialized data. */ diff --git a/sysdeps/mips/mips64/add_n.S b/sysdeps/mips/mips64/add_n.S index ad93d9d081..1d3f7641e9 100644 --- a/sysdeps/mips/mips64/add_n.S +++ b/sysdeps/mips/mips64/add_n.S @@ -1,7 +1,7 @@ /* MIPS3 __mpn_add_n -- Add two limb vectors of the same length > 0 and * store sum in a third limb vector. * - * Copyright (C) 1995 Free Software Foundation, Inc. + * Copyright (C) 1995, 2000 Free Software Foundation, Inc. * * This file is part of the GNU MP Library. * @@ -30,7 +30,7 @@ * s2_ptr $6 * size $7 */ -#ifdef PIC +#ifdef __PIC__ .option pic2 #endif .text @@ -39,7 +39,7 @@ .ent __mpn_add_n __mpn_add_n: .set noreorder -#ifdef PIC +#ifdef __PIC__ .cpload t9 #endif .set nomacro diff --git a/sysdeps/mips/mips64/bsd-_setjmp.S b/sysdeps/mips/mips64/bsd-_setjmp.S index cd6ec3e196..7c70f5b0bf 100644 --- a/sysdeps/mips/mips64/bsd-_setjmp.S +++ b/sysdeps/mips/mips64/bsd-_setjmp.S @@ -1,5 +1,5 @@ /* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. MIPS64 version. - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 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 @@ -23,11 +23,11 @@ #include -#ifdef PIC +#ifdef __PIC__ .option pic2 #endif ENTRY (_setjmp) -#ifdef PIC +#ifdef __PIC__ .cpload t9 #endif dla t9, C_SYMBOL_NAME (__sigsetjmp) diff --git a/sysdeps/mips/mips64/lshift.S b/sysdeps/mips/mips64/lshift.S index ef403ec25f..37e8489fff 100644 --- a/sysdeps/mips/mips64/lshift.S +++ b/sysdeps/mips/mips64/lshift.S @@ -1,6 +1,6 @@ /* MIPS3 __mpn_lshift -- * - * Copyright (C) 1995 Free Software Foundation, Inc. + * Copyright (C) 1995, 2000 Free Software Foundation, Inc. * * This file is part of the GNU MP Library. * @@ -29,7 +29,7 @@ * cnt $7 */ -#ifdef PIC +#ifdef __PIC__ .option pic2 #endif .text @@ -38,7 +38,7 @@ .ent __mpn_lshift __mpn_lshift: .set noreorder -#ifdef PIC +#ifdef __PIC__ .cpload t9 #endif .set nomacro diff --git a/sysdeps/mips/mips64/mul_1.S b/sysdeps/mips/mips64/mul_1.S index ef0cf36d75..61d06589a6 100644 --- a/sysdeps/mips/mips64/mul_1.S +++ b/sysdeps/mips/mips64/mul_1.S @@ -1,7 +1,7 @@ /* MIPS3 __mpn_mul_1 -- Multiply a limb vector with a single limb and * store the product in a second limb vector. * - * Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc. + * Copyright (C) 1992, 1994, 1995, 2000 Free Software Foundation, Inc. * * This file is part of the GNU MP Library. * @@ -30,7 +30,7 @@ * s2_limb $7 */ -#ifdef PIC +#ifdef __PIC__ .option pic2 #endif .text @@ -39,7 +39,7 @@ .ent __mpn_mul_1 __mpn_mul_1: .set noreorder -#ifdef PIC +#ifdef __PIC__ .cpload t9 #endif .set nomacro diff --git a/sysdeps/mips/mips64/rshift.S b/sysdeps/mips/mips64/rshift.S index bc26f3f360..b013eedfb9 100644 --- a/sysdeps/mips/mips64/rshift.S +++ b/sysdeps/mips/mips64/rshift.S @@ -1,6 +1,6 @@ /* MIPS3 __mpn_rshift -- * - * Copyright (C) 1995 Free Software Foundation, Inc. + * Copyright (C) 1995, 2000 Free Software Foundation, Inc. * * This file is part of the GNU MP Library. * @@ -29,7 +29,7 @@ * cnt $7 */ -#ifdef PIC +#ifdef __PIC__ .option pic2 #endif .text @@ -38,7 +38,7 @@ .ent __mpn_rshift __mpn_rshift: .set noreorder -#ifdef PIC +#ifdef __PIC__ .cpload t9 #endif .set nomacro diff --git a/sysdeps/mips/mips64/setjmp.S b/sysdeps/mips/mips64/setjmp.S index 74214297b8..127ab4298c 100644 --- a/sysdeps/mips/mips64/setjmp.S +++ b/sysdeps/mips/mips64/setjmp.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 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 @@ -21,11 +21,11 @@ /* The function __sigsetjmp_aux saves all the registers, but it can't reliably access the stack or frame pointers, so we pass them in as extra arguments. */ -#ifdef PIC +#ifdef __PIC__ .option pic2 #endif ENTRY (__sigsetjmp) -#ifdef PIC +#ifdef __PIC__ .cpload t9 #endif move a2, sp diff --git a/sysdeps/mips/mips64/sub_n.S b/sysdeps/mips/mips64/sub_n.S index bfcba95afa..16482f1166 100644 --- a/sysdeps/mips/mips64/sub_n.S +++ b/sysdeps/mips/mips64/sub_n.S @@ -1,7 +1,7 @@ /* MIPS3 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and * store difference in a third limb vector. * - * Copyright (C) 1995 Free Software Foundation, Inc. + * Copyright (C) 1995, 2000 Free Software Foundation, Inc. * * This file is part of the GNU MP Library. * @@ -30,7 +30,7 @@ * size $7 */ -#ifdef PIC +#ifdef __PIC__ .option pic2 #endif .text @@ -39,7 +39,7 @@ .ent __mpn_sub_n __mpn_sub_n: .set noreorder -#ifdef PIC +#ifdef __PIC__ .cpload t9 #endif .set nomacro diff --git a/sysdeps/mips/mips64/submul_1.S b/sysdeps/mips/mips64/submul_1.S index 66e634e102..5cb39ac5a6 100644 --- a/sysdeps/mips/mips64/submul_1.S +++ b/sysdeps/mips/mips64/submul_1.S @@ -1,7 +1,7 @@ /* MIPS3 __mpn_submul_1 -- Multiply a limb vector with a single limb and * subtract the product from a second limb vector. * - * Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc. + * Copyright (C) 1992, 1994, 1995, 2000 Free Software Foundation, Inc. * * This file is part of the GNU MP Library. * @@ -30,7 +30,7 @@ * s2_limb $7 */ -#ifdef PIC +#ifdef __PIC__ .option pic2 #endif .text @@ -39,7 +39,7 @@ .ent __mpn_submul_1 __mpn_submul_1: .set noreorder -#ifdef PIC +#ifdef __PIC__ .cpload t9 #endif .set nomacro From 8ef0fc04950110163458b0c18fcf32efb7534e07 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 21 Apr 2000 22:03:39 +0000 Subject: [PATCH 2097/4487] 2000-04-21 Andreas Jaeger * sysdeps/unix/mips/sysdep.S: Use __PIC__ instead of PIC. --- sysdeps/unix/mips/sysdep.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/mips/sysdep.S b/sysdeps/unix/mips/sysdep.S index f3974bf589..d4b9945ed6 100644 --- a/sysdeps/unix/mips/sysdep.S +++ b/sysdeps/unix/mips/sysdep.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1992,93,94,97,98,99 Free Software Foundation, Inc. +/* Copyright (C) 1992,93,94,97,98,99,2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -24,7 +24,7 @@ #ifdef _LIBC_REENTRANT ENTRY(__syscall_error) -#ifdef PIC +#ifdef __PIC__ .set noreorder .set noat move $1, $31 From bce847003be00024466c1bf391eaebeb8f167912 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 22 Apr 2000 06:54:09 +0000 Subject: [PATCH 2098/4487] (__syscall_msgctl): Declare. --- sysdeps/unix/sysv/linux/alpha/msgctl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/msgctl.c b/sysdeps/unix/sysv/linux/alpha/msgctl.c index 693b4d4c2d..709b5c0315 100644 --- a/sysdeps/unix/sysv/linux/alpha/msgctl.c +++ b/sysdeps/unix/sysv/linux/alpha/msgctl.c @@ -44,6 +44,8 @@ struct __old_msqid_ds __ipc_pid_t msg_lrpid; /* pid of last msgrcv() */ }; +extern int __syscall_msgctl (int, int, void *); + /* Allows to control internal state and destruction of message queue objects. */ int __new_msgctl (int, int, struct msqid_ds *); From b6e679a8ac6ad33e7d850e7f4c9000d90b21bb66 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 22 Apr 2000 06:54:21 +0000 Subject: [PATCH 2099/4487] (__syscall_semctl): Declare. --- sysdeps/unix/sysv/linux/alpha/semctl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/alpha/semctl.c b/sysdeps/unix/sysv/linux/alpha/semctl.c index a4534744d3..4be4fb201a 100644 --- a/sysdeps/unix/sysv/linux/alpha/semctl.c +++ b/sysdeps/unix/sysv/linux/alpha/semctl.c @@ -49,6 +49,7 @@ union semun struct seminfo *__buf; /* buffer for IPC_INFO */ }; +extern int __syscall_semctl (int, int, int, void *); /* Return identifier for array of NSEMS semaphores associated with KEY. */ From fa04216d3bf47182ad7461c3bd42192b99861c47 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 22 Apr 2000 06:54:35 +0000 Subject: [PATCH 2100/4487] (__syscall_shmctl): Declare. --- sysdeps/unix/sysv/linux/alpha/shmctl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/shmctl.c b/sysdeps/unix/sysv/linux/alpha/shmctl.c index ebda160d32..70c420dccb 100644 --- a/sysdeps/unix/sysv/linux/alpha/shmctl.c +++ b/sysdeps/unix/sysv/linux/alpha/shmctl.c @@ -52,6 +52,8 @@ struct __old_shminfo int shmall; }; +extern int __syscall_shmctl (int, int, void *); + /* Provide operations to control over shared memory segments. */ int __new_shmctl (int, int, struct shmid_ds *); From 0a5f55b13585960a2e79ac537c1ad302785c5bda Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 22 Apr 2000 06:54:50 +0000 Subject: [PATCH 2101/4487] Surround uses of $f28 with .set noat/at to shut up warnings. --- sysdeps/unix/sysv/linux/alpha/getrusage.S | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/getrusage.S b/sysdeps/unix/sysv/linux/alpha/getrusage.S index 0c7fb1abbd..8d96455ae1 100644 --- a/sysdeps/unix/sysv/linux/alpha/getrusage.S +++ b/sysdeps/unix/sysv/linux/alpha/getrusage.S @@ -99,7 +99,9 @@ $do32: ldi v0, SYS_ify(osf_getrusage) ldt $f25, 96(a1) # ru_msgrcv ldt $f26, 104(a1) # ru_nsignals ldt $f27, 112(a1) # ru_nvcsw + .set noat ldt $f28, 120(a1) # ru_nivcsw + .set at stq t0, 0(a1) stq t1, 8(a1) stq t2, 16(a1) @@ -117,7 +119,9 @@ $do32: ldi v0, SYS_ify(osf_getrusage) stt $f25, 112(a1) stt $f26, 120(a1) stt $f27, 128(a1) + .set noat stt $f28, 136(a1) + .set at addq sp, 16, sp ret From 64fe7d3c70c3b3af978f382d64cd43ad65a0ff83 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 22 Apr 2000 06:55:02 +0000 Subject: [PATCH 2102/4487] (__fstatfs64): Add alias. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 617b6f54ae..d845761a98 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -22,7 +22,7 @@ mmap - mmap 6 __mmap mmap __mmap64 mmap64 llseek EXTRA lseek 3 __libc_lseek64 __llseek llseek __lseek64 lseek64 pread - pread 4 __libc_pread __libc_pread64 __pread pread __pread64 pread64 pwrite - pwrite 4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64 -fstatfs - fstatfs 2 __fstatfs fstatfs fstatfs64 +fstatfs - fstatfs 2 __fstatfs fstatfs __fstatfs64 fstatfs64 statfs - statfs 2 __statfs statfs statfs64 getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64 setrlimit - setrlimit 2 setrlimit setrlimit64 From 9790568c2bfbe0531dd456fb195f6b3964e04e22 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 22 Apr 2000 06:55:19 +0000 Subject: [PATCH 2103/4487] (init_iosys): Allow compilation if __NR_pciconfig_iobase is not defined. --- sysdeps/unix/sysv/linux/alpha/ioperm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c index 310930bc21..98f7163053 100644 --- a/sysdeps/unix/sysv/linux/alpha/ioperm.c +++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c @@ -537,6 +537,7 @@ init_iosys (void) /* First try the pciconfig_iobase syscall added to 2.2.15 and 2.3.99. */ +#ifdef __NR_pciconfig_iobase addr = __pciconfig_iobase (IOBASE_DENSE_MEM, 0, 0); if (addr != -1) { @@ -578,6 +579,7 @@ init_iosys (void) return 0; } +#endif /* Second, collect the contents of /etc/alpha_systype or /proc/cpuinfo. */ From b9a57ab61505a4daf0087fd0ffe7abd23b7b9464 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 28 Apr 2000 03:25:46 +0000 Subject: [PATCH 2104/4487] (_dl_start_user): Fix the _dl_skip_args handling. --- sysdeps/alpha/dl-machine.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index b16e1c884c..7e28d54c20 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -291,7 +291,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) /* See if we were run as a command with the executable file name as an extra leading argument. */ ldl $1, _dl_skip_args - beq $1, $fixup_stack + bne $1, $fixup_stack $fixup_stack_ret: /* The special initializer gets called with the stack just as the application's entry point will see it; it can @@ -316,7 +316,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) ldq $2, 0($sp) subq $2, $1, $2 mov $sp, $4 - s8addq $2, $sp, $3 + s8addq $1, $sp, $3 stq $2, 0($sp) /* Copy down argv. */ 0: ldq $5, 8($3) From db7f627b6e81bb9d996630dfef2c93af3e39a86a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 28 Apr 2000 05:11:59 +0000 Subject: [PATCH 2105/4487] Not needed anymore. --- sysdeps/unix/bsd/osf/.cvsignore | 1 - 1 file changed, 1 deletion(-) delete mode 100644 sysdeps/unix/bsd/osf/.cvsignore diff --git a/sysdeps/unix/bsd/osf/.cvsignore b/sysdeps/unix/bsd/osf/.cvsignore deleted file mode 100644 index c9147fd335..0000000000 --- a/sysdeps/unix/bsd/osf/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -=* From 37dca96f1c226c7d31ad85a7efe968289b4eda14 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 30 Apr 2000 07:12:32 +0000 Subject: [PATCH 2106/4487] (F_SETOWN, F_GETOWN): Make available if __USE_XOPEN2K. --- sysdeps/unix/sysv/aix/bits/fcntl.h | 4 ++-- sysdeps/unix/sysv/linux/alpha/bits/fcntl.h | 2 +- sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/aix/bits/fcntl.h b/sysdeps/unix/sysv/aix/bits/fcntl.h index 039a604b19..048f53a1b5 100644 --- a/sysdeps/unix/sysv/aix/bits/fcntl.h +++ b/sysdeps/unix/sysv/aix/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1995-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 @@ -74,7 +74,7 @@ # define F_SETLKW64 13 /* Set record locking info (blocking). */ #endif -#ifdef __USE_BSD +#if defined __USE_BSD || defined __USE_XOPEN2K # define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */ # define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */ #endif diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h index 7081119a13..7184d08a4a 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h @@ -77,7 +77,7 @@ #define F_SETLK64 8 /* Set record locking info (non-blocking). */ #define F_SETLKW64 9 /* Set record locking info (blocking). */ -#ifdef __USE_BSD +#if defined __USE_BSD || defined __USE_XOPEN2K # define F_SETOWN 5 /* Get owner of socket (receiver of SIGIO). */ # define F_GETOWN 6 /* Set owner of socket (receiver of SIGIO). */ #endif diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index 18035765b1..189601c839 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -75,7 +75,7 @@ #define F_SETLK64 6 /* Set record locking info (non-blocking). */ #define F_SETLKW64 7 /* Set record locking info (blocking). */ -#ifdef __USE_BSD +#if defined __USE_BSD || defined __USE_XOPEN2K # define F_SETOWN 24 /* Get owner of socket (receiver of SIGIO). */ # define F_GETOWN 23 /* Set owner of socket (receiver of SIGIO). */ #endif From 4ca971409e4ec8d195e38d3681b1bd7255437f23 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 1 May 2000 23:43:22 +0000 Subject: [PATCH 2107/4487] Functions to convert AIX dirent structure to Linux form. --- sysdeps/unix/sysv/aix/linux/direntconv.c | 31 ++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/linux/direntconv.c diff --git a/sysdeps/unix/sysv/aix/linux/direntconv.c b/sysdeps/unix/sysv/aix/linux/direntconv.c new file mode 100644 index 0000000000..620a0a0719 --- /dev/null +++ b/sysdeps/unix/sysv/aix/linux/direntconv.c @@ -0,0 +1,31 @@ +#include +#include +#include "linux-dirent.h" + +#ifndef DT_UNKNOWN +# define DT_UNKNOWN 0 +#endif + + +void +__dirent_aix_to_linux (const struct dirent *aixdir, + struct linuxdirent *linuxdir) +{ + linuxdir->d_ino = aixdir->d_ino; + linuxdir->d_off = aixdir->d_off; + linuxdir->d_reclen = aixdir->d_reclen; + linuxdir->d_type = DT_UNKNOWN; + strncpy (linuxdir->d_name, aixdir->d_name, 256); +} + + +void +__dirent64_aix_to_linux (const struct dirent64 *aixdir, + struct linuxdirent64 *linuxdir) +{ + linuxdir->d_ino = aixdir->d_ino; + linuxdir->d_off = aixdir->d_off; + linuxdir->d_reclen = aixdir->d_reclen; + linuxdir->d_type = DT_UNKNOWN; + strncpy (linuxdir->d_name, aixdir->d_name, 256); +} From e72c26d75110c7a33ecc9dbd0daaf99ff4cfade6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 1 May 2000 23:43:43 +0000 Subject: [PATCH 2108/4487] Linux dirent structure definition. --- sysdeps/unix/sysv/aix/linux/linux-dirent.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/linux/linux-dirent.h diff --git a/sysdeps/unix/sysv/aix/linux/linux-dirent.h b/sysdeps/unix/sysv/aix/linux/linux-dirent.h new file mode 100644 index 0000000000..935ffda7a0 --- /dev/null +++ b/sysdeps/unix/sysv/aix/linux/linux-dirent.h @@ -0,0 +1,19 @@ +#include "linuxtypes.h" + +struct linuxdirent + { + __linux_ino_t d_ino; + __linux_off_t d_off; + unsigned short int d_reclen; + unsigned char d_type; + char d_name[256]; /* We must not include limits.h! */ + }; + +struct linuxdirent64 + { + __linux_ino64_t d_ino; + __linux_off64_t d_off; + unsigned short int d_reclen; + unsigned char d_type; + char d_name[256]; /* We must not include limits.h! */ + }; From 408c9db5d39e0398b04986fb3e40e7fa00cb1d19 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 5 May 2000 07:12:09 +0000 Subject: [PATCH 2109/4487] (elf_machine_fixup_plt): Change return valuie to lookup_t and return the value. --- sysdeps/alpha/dl-machine.h | 23 +++++++++++++---------- sysdeps/arm/dl-machine.h | 7 ++++--- sysdeps/m68k/dl-machine.h | 7 ++++--- 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 7e28d54c20..814e3552f1 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -68,7 +68,7 @@ elf_machine_load_address (void) are usually many many terabytes away. */ Elf64_Addr dot; - long zero_disp; + long int zero_disp; asm("br %0, 1f\n\t" ".weak __load_address_undefined\n\t" @@ -119,7 +119,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) /* If the first instruction of the plt entry is not "br $28, plt0", we cannot do lazy relocation. */ - lazy = (*(unsigned *)(plt + 32) == 0xc39ffff7); + lazy = (*(unsigned int *)(plt + 32) == 0xc39ffff7); } return lazy; @@ -363,13 +363,14 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) /* Fix up the instructions of a PLT entry to invoke the function rather than the dynamic linker. */ -static inline void -elf_machine_fixup_plt(struct link_map *l, const Elf64_Rela *reloc, - Elf64_Addr *got_addr, Elf64_Addr value) +static inline Elf64_Addr +elf_machine_fixup_plt (struct link_map *l, lookup_t t, + const Elf64_Rela *reloc, + Elf64_Addr *got_addr, Elf64_Addr value) { const Elf64_Rela *rela_plt; Elf64_Word *plte; - long edisp; + long int edisp; /* Store the value we are going to load. */ *got_addr = value; @@ -381,7 +382,7 @@ elf_machine_fixup_plt(struct link_map *l, const Elf64_Rela *reloc, plte += 3 * (reloc - rela_plt); /* Find the displacement from the plt entry to the function. */ - edisp = (long)(value - (Elf64_Addr)&plte[3]) / 4; + edisp = (long int) (value - (Elf64_Addr)&plte[3]) / 4; if (edisp >= -0x100000 && edisp < 0x100000) { @@ -391,7 +392,7 @@ elf_machine_fixup_plt(struct link_map *l, const Elf64_Rela *reloc, int hi, lo; hi = value - (Elf64_Addr)&plte[0]; - lo = (short)hi; + lo = (short int) hi; hi = (hi - lo) >> 16; /* Emit "lda $27,lo($27)" */ @@ -436,6 +437,8 @@ elf_machine_fixup_plt(struct link_map *l, const Elf64_Rela *reloc, This will be taken care of in _dl_runtime_resolve. If instead we are doing this as part of non-lazy startup relocation, that bit of code hasn't made it into Icache yet, so there's nothing to clean up. */ + + return value; } /* Return the final value of a plt relocation. */ @@ -459,7 +462,7 @@ elf_machine_rela (struct link_map *map, const struct r_found_version *version, Elf64_Addr *const reloc_addr) { - unsigned long const r_type = ELF64_R_TYPE (reloc->r_info); + unsigned long int const r_type = ELF64_R_TYPE (reloc->r_info); #ifndef RTLD_BOOTSTRAP /* This is defined in rtld.c, but nowhere in the static libc.a; make the @@ -525,7 +528,7 @@ elf_machine_lazy_rel (struct link_map *map, Elf64_Addr l_addr, const Elf64_Rela *reloc) { Elf64_Addr * const reloc_addr = (void *)(l_addr + reloc->r_offset); - unsigned long const r_type = ELF64_R_TYPE (reloc->r_info); + unsigned long int const r_type = ELF64_R_TYPE (reloc->r_info); if (r_type == R_ALPHA_JMP_SLOT) { diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 19276abfa1..44087585f0 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -354,11 +354,12 @@ dl_platform_init (void) _dl_platform = NULL; } -static inline void -elf_machine_fixup_plt (struct link_map *map, const Elf32_Rel *reloc, +static inline Elf32_Addr +elf_machine_fixup_plt (struct link_map *map, lookup_t t, + const Elf32_Rel *reloc, Elf32_Addr *reloc_addr, Elf32_Addr value) { - *reloc_addr = value; + return *reloc_addr = value; } /* Return the final value of a plt relocation. */ diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index bf7dede6d2..e4cdf2dd1d 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -209,11 +209,12 @@ asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \ /* The m68k never uses Elf32_Rel relocations. */ #define ELF_MACHINE_NO_REL 1 -static inline void -elf_machine_fixup_plt (struct link_map *map, const Elf32_Rela *reloc, +static inline Elf32_Addr +elf_machine_fixup_plt (struct link_map *map, lookup_t t, + const Elf32_Rela *reloc, Elf32_Addr *reloc_addr, Elf32_Addr value) { - *reloc_addr = value; + return *reloc_addr = value; } /* Return the final value of a plt relocation. On the m68k the JMP_SLOT From 102e7428d38ad6941aeaab86d213b7c4b8d84834 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 5 May 2000 19:54:08 +0000 Subject: [PATCH 2110/4487] Moved to sysdeps/unix/sysv/linux/powerpc/aix. --- sysdeps/unix/sysv/aix/linux/direntconv.c | 31 ----- sysdeps/unix/sysv/aix/linux/errnoconv.c | 125 ------------------- sysdeps/unix/sysv/aix/linux/linux-dirent.h | 19 --- sysdeps/unix/sysv/aix/linux/linux-errno.h | 135 --------------------- sysdeps/unix/sysv/aix/linux/linux-stat.h | 131 -------------------- sysdeps/unix/sysv/aix/linux/statconv.c | 35 ------ 6 files changed, 476 deletions(-) delete mode 100644 sysdeps/unix/sysv/aix/linux/direntconv.c delete mode 100644 sysdeps/unix/sysv/aix/linux/errnoconv.c delete mode 100644 sysdeps/unix/sysv/aix/linux/linux-dirent.h delete mode 100644 sysdeps/unix/sysv/aix/linux/linux-errno.h delete mode 100644 sysdeps/unix/sysv/aix/linux/linux-stat.h delete mode 100644 sysdeps/unix/sysv/aix/linux/statconv.c diff --git a/sysdeps/unix/sysv/aix/linux/direntconv.c b/sysdeps/unix/sysv/aix/linux/direntconv.c deleted file mode 100644 index 620a0a0719..0000000000 --- a/sysdeps/unix/sysv/aix/linux/direntconv.c +++ /dev/null @@ -1,31 +0,0 @@ -#include -#include -#include "linux-dirent.h" - -#ifndef DT_UNKNOWN -# define DT_UNKNOWN 0 -#endif - - -void -__dirent_aix_to_linux (const struct dirent *aixdir, - struct linuxdirent *linuxdir) -{ - linuxdir->d_ino = aixdir->d_ino; - linuxdir->d_off = aixdir->d_off; - linuxdir->d_reclen = aixdir->d_reclen; - linuxdir->d_type = DT_UNKNOWN; - strncpy (linuxdir->d_name, aixdir->d_name, 256); -} - - -void -__dirent64_aix_to_linux (const struct dirent64 *aixdir, - struct linuxdirent64 *linuxdir) -{ - linuxdir->d_ino = aixdir->d_ino; - linuxdir->d_off = aixdir->d_off; - linuxdir->d_reclen = aixdir->d_reclen; - linuxdir->d_type = DT_UNKNOWN; - strncpy (linuxdir->d_name, aixdir->d_name, 256); -} diff --git a/sysdeps/unix/sysv/aix/linux/errnoconv.c b/sysdeps/unix/sysv/aix/linux/errnoconv.c deleted file mode 100644 index 95bd5a32b2..0000000000 --- a/sysdeps/unix/sysv/aix/linux/errnoconv.c +++ /dev/null @@ -1,125 +0,0 @@ -/* Convert the error number the AIX kernel returns to what the Linux - application expects. */ -#include -#include "linux-errno.h" - - -static int mapping[] = -{ - [EPERM] = LINUX_EPERM, - [ENOENT] = LINUX_ENOENT, - [ESRCH] = LINUX_ESRCH, - [EINTR] = LINUX_EINTR, - [EIO] = LINUX_EIO, - [ENXIO] = LINUX_ENXIO, - [E2BIG] = LINUX_E2BIG, - [ENOEXEC] = LINUX_ENOEXEC, - [EBADF] = LINUX_EBADF, - [ECHILD] = LINUX_ECHILD, - [EAGAIN] = LINUX_EAGAIN, - [ENOMEM] = LINUX_ENOMEM, - [EACCES] = LINUX_EACCES, - [EFAULT] = LINUX_EFAULT, - [ENOTBLK] = LINUX_ENOTBLK, - [EBUSY] = LINUX_EBUSY, - [EEXIST] = LINUX_EEXIST, - [EXDEV] = LINUX_EXDEV, - [ENODEV] = LINUX_ENODEV, - [ENOTDIR] = LINUX_ENOTDIR, - [EISDIR] = LINUX_EISDIR, - [EINVAL] = LINUX_EINVAL, - [ENFILE] = LINUX_ENFILE, - [EMFILE] = LINUX_EMFILE, - [ENOTTY] = LINUX_ENOTTY, - [ETXTBSY] = LINUX_ETXTBSY, - [EFBIG] = LINUX_EFBIG, - [ENOSPC] = LINUX_ENOSPC, - [EIDRM] = LINUX_EIDRM, - [ECHRNG] = LINUX_ECHRNG, - [EL2NSYNC] = LINUX_EL2NSYNC, - [EL3HLT] = LINUX_EL3HLT, - [EL3RST] = LINUX_EL3RST, - [ELNRNG] = LINUX_ELNRNG, - [EUNATCH] = LINUX_EUNATCH, - [ENOCSI] = LINUX_ENOCSI, - [EL2HLT] = LINUX_EL2HLT, - [EDEADLK] = LINUX_EDEADLK, - [ENOTREADY] = LINUX_ENOTREADY, - // EWPROTECT: no Linux equivalent - // EFORMAT: no Linux equivalent - [ENOLCK] = LINUX_ENOLCK, - // ENOCONNECT: No Linux equivalent - [ESTALE] = LINUX_ESTALE, - // EDIST: no Linux equivalent - [54] = LINUX_EAGAIN, // EWOULDBLOCK - [EINPROGRESS] = LINUX_EINPROGRESS, - [EALREADY] = LINUX_EALREADY, - [ENOTSOCK] = LINUX_ENOTSOCK, - [EDESTADDRREQ] = LINUX_EDESTADDRREQ, - [EMSGSIZE] = LINUX_EMSGSIZE, - [EPROTOTYPE] = LINUX_EPROTOTYPE, - [ENOPROTOOPT] = LINUX_ENOPROTOOPT, - [EPROTONOSUPPORT] = LINUX_EPROTONOSUPPORT, - [ESOCKTNOSUPPORT] = LINUX_ESOCKTNOSUPPORT, - [EOPNOTSUPP] = LINUX_EOPNOTSUPP, - [EPFNOSUPPORT] = LINUX_EPFNOSUPPORT, - [EAFNOSUPPORT] = LINUX_EAFNOSUPPORT, - [EADDRINUSE] = LINUX_EADDRINUSE, - [EADDRNOTAVAIL] = LINUX_EADDRNOTAVAIL, - [ENETDOWN] = LINUX_ENETDOWN, - [ENETUNREACH] = LINUX_ENETUNREACH, - [ENETRESET] = LINUX_ENETRESET, - [ECONNABORTED] = LINUX_ECONNABORTED, - [ECONNRESET] = LINUX_ECONNRESET, - [ENOBUFS] = LINUX_ENOBUFS, - [EISCONN] = LINUX_EISCONN, - [ENOTCONN] = LINUX_ENOTCONN, - [ESHUTDOWN] = LINUX_ESHUTDOWN, - [ETIMEDOUT] = LINUX_ETIMEDOUT, - [ECONNREFUSED] = LINUX_ECONNREFUSED, - [EHOSTDOWN] = LINUX_EHOSTDOWN, - [EHOSTUNREACH] = LINUX_EHOSTUNREACH, - [ERESTART] = LINUX_ERESTART, - [EPROCLIM] = LINUX_EPROCLIM, - [EUSERS] = LINUX_EUSERS, - [ELOOP] = LINUX_ELOOP, - [ENAMETOOLONG] = LINUX_ENAMETOOLONG, - [87] = LINUX_ENOTEMPTY, // ENOTEMPTY - [EDQUOT] = LINUX_EDQUOT, - [ECORRUPT] = LINUX_ECORRUPT, - [EREMOTE] = LINUX_EREMOTE, - [ENOSYS] = LINUX_ENOSYS, - [EMEDIA] = LINUX_EMEDIA, - [ESOFT] = LINUX_ESOFT, - [ENOATTR] = LINUX_ENOATTR, - [ESAD] = LINUX_ESAD, - // ENOTRUST: no Linux equivalent - [ETOOMANYREFS] = LINUX_ETOOMANYREFS, - [EILSEQ] = LINUX_EILSEQ, - [ECANCELED] = LINUX_ECANCELED, - [ENOSR] = LINUX_ENOSR, - [ETIME] = LINUX_ETIME, - [EBADMSG] = LINUX_EBADMSG, - [EPROTO] = LINUX_EPROTO, - [ENODATA] = LINUX_ENODATA, - [ENOSTR] = LINUX_ENOSTR, - [ENOTSUP] = LINUX_ENOTSUP, - [EMULTIHOP] = LINUX_EMULTIHOP, - [ENOLINK] = LINUX_ENOLINK, - [EOVERFLOW] = LINUX_EOVERFLOW -}; - - -int -__errno_aix_to_linux (int err) -{ - int conv; - - if (err >= 0 && err < (sizeof (mapping) / sizeof (mapping[0])) - && ((conv = mapping[err]) != 0 || err == 0)) - return conv; - - /* The error value is not known. Create a special value which can - be easily recognized as an invalid result. */ - return 512 + err; -} diff --git a/sysdeps/unix/sysv/aix/linux/linux-dirent.h b/sysdeps/unix/sysv/aix/linux/linux-dirent.h deleted file mode 100644 index 935ffda7a0..0000000000 --- a/sysdeps/unix/sysv/aix/linux/linux-dirent.h +++ /dev/null @@ -1,19 +0,0 @@ -#include "linuxtypes.h" - -struct linuxdirent - { - __linux_ino_t d_ino; - __linux_off_t d_off; - unsigned short int d_reclen; - unsigned char d_type; - char d_name[256]; /* We must not include limits.h! */ - }; - -struct linuxdirent64 - { - __linux_ino64_t d_ino; - __linux_off64_t d_off; - unsigned short int d_reclen; - unsigned char d_type; - char d_name[256]; /* We must not include limits.h! */ - }; diff --git a/sysdeps/unix/sysv/aix/linux/linux-errno.h b/sysdeps/unix/sysv/aix/linux/linux-errno.h deleted file mode 100644 index b7cf0a5c5f..0000000000 --- a/sysdeps/unix/sysv/aix/linux/linux-errno.h +++ /dev/null @@ -1,135 +0,0 @@ -#ifndef _LINUX_ERRNO_H -#define _LINUX_ERRNO_H - -#define LINUX_EPERM 1 -#define LINUX_ENOENT 2 -#define LINUX_ESRCH 3 -#define LINUX_EINTR 4 -#define LINUX_EIO 5 -#define LINUX_ENXIO 6 -#define LINUX_E2BIG 7 -#define LINUX_ENOEXEC 8 -#define LINUX_EBADF 9 -#define LINUX_ECHILD 10 -#define LINUX_EAGAIN 11 -#define LINUX_ENOMEM 12 -#define LINUX_EACCES 13 -#define LINUX_EFAULT 14 -#define LINUX_ENOTBLK 15 -#define LINUX_EBUSY 16 -#define LINUX_EEXIST 17 -#define LINUX_EXDEV 18 -#define LINUX_ENODEV 19 -#define LINUX_ENOTDIR 20 -#define LINUX_EISDIR 21 -#define LINUX_EINVAL 22 -#define LINUX_ENFILE 23 -#define LINUX_EMFILE 24 -#define LINUX_ENOTTY 25 -#define LINUX_ETXTBSY 26 -#define LINUX_EFBIG 27 -#define LINUX_ENOSPC 28 -#define LINUX_ESPIPE 29 -#define LINUX_EROFS 30 -#define LINUX_EMLINK 31 -#define LINUX_EPIPE 32 -#define LINUX_EDOM 33 -#define LINUX_ERANGE 34 -#define LINUX_EDEADLK 35 -#define LINUX_ENAMETOOLONG 36 -#define LINUX_ENOLCK 37 -#define LINUX_ENOSYS 38 -#define LINUX_ENOTEMPTY 39 -#define LINUX_ELOOP 40 -#define LINUX_ENOMSG 42 -#define LINUX_EIDRM 43 -#define LINUX_ECHRNG 44 -#define LINUX_EL2NSYNC 45 -#define LINUX_EL3HLT 46 -#define LINUX_EL3RST 47 -#define LINUX_ELNRNG 48 -#define LINUX_EUNATCH 49 -#define LINUX_ENOCSI 50 -#define LINUX_EL2HLT 51 -#define LINUX_EBADE 52 -#define LINUX_EBADR 53 -#define LINUX_EXFULL 54 -#define LINUX_ENOANO 55 -#define LINUX_EBADRQC 56 -#define LINUX_EBADSLT 57 -#define LINUX_EDEADLOCK 58 -#define LINUX_EBFONT 59 -#define LINUX_ENOSTR 60 -#define LINUX_ENODATA 61 -#define LINUX_ETIME 62 -#define LINUX_ENOSR 63 -#define LINUX_ENONET 64 -#define LINUX_ENOPKG 65 -#define LINUX_EREMOTE 66 -#define LINUX_ENOLINK 67 -#define LINUX_EADV 68 -#define LINUX_ESRMNT 69 -#define LINUX_ECOMM 70 -#define LINUX_EPROTO 71 -#define LINUX_EMULTIHOP 72 -#define LINUX_EDOTDOT 73 -#define LINUX_EBADMSG 74 -#define LINUX_EOVERFLOW 75 -#define LINUX_ENOTUNIQ 76 -#define LINUX_EBADFD 77 -#define LINUX_EREMCHG 78 -#define LINUX_ELIBACC 79 -#define LINUX_ELIBBAD 80 -#define LINUX_ELIBSCN 81 -#define LINUX_ELIBMAX 82 -#define LINUX_ELIBEXEC 83 -#define LINUX_EILSEQ 84 -#define LINUX_ERESTART 85 -#define LINUX_ESTRPIPE 86 -#define LINUX_EUSERS 87 -#define LINUX_ENOTSOCK 88 -#define LINUX_EDESTADDRREQ 89 -#define LINUX_EMSGSIZE 90 -#define LINUX_EPROTOTYPE 91 -#define LINUX_ENOPROTOOPT 92 -#define LINUX_EPROTONOSUPPORT 93 -#define LINUX_ESOCKTNOSUPPORT 94 -#define LINUX_EOPNOTSUPP 95 -#define LINUX_EPFNOSUPPORT 96 -#define LINUX_EAFNOSUPPORT 97 -#define LINUX_EADDRINUSE 98 -#define LINUX_EADDRNOTAVAIL 99 -#define LINUX_ENETDOWN 100 -#define LINUX_ENETUNREACH 101 -#define LINUX_ENETRESET 102 -#define LINUX_ECONNABORTED 103 -#define LINUX_ECONNRESET 104 -#define LINUX_ENOBUFS 105 -#define LINUX_EISCONN 106 -#define LINUX_ENOTCONN 107 -#define LINUX_ESHUTDOWN 108 -#define LINUX_ETOOMANYREFS 109 -#define LINUX_ETIMEDOUT 110 -#define LINUX_ECONNREFUSED 111 -#define LINUX_EHOSTDOWN 112 -#define LINUX_EHOSTUNREACH 113 -#define LINUX_EALREADY 114 -#define LINUX_EINPROGRESS 115 -#define LINUX_ESTALE 116 -#define LINUX_EUCLEAN 117 -#define LINUX_ENOTNAM 118 -#define LINUX_ENAVAIL 119 -#define LINUX_EISNAM 120 -#define LINUX_EREMOTEIO 121 -#define LINUX_EDQUOT 122 - -#define LINUX_ENOMEDIUM 123 -#define LINUX_EMEDIUMTYPE 124 - -/* Should never be seen by user programs */ -#define LINUX_ERESTARTSYS 512 -#define LINUX_ERESTARTNOINTR 513 -#define LINUX_ERESTARTNOHAND 514 -#define LINUX_ENOIOCTLCMD 515 - -#endif diff --git a/sysdeps/unix/sysv/aix/linux/linux-stat.h b/sysdeps/unix/sysv/aix/linux/linux-stat.h deleted file mode 100644 index 01a2d4d253..0000000000 --- a/sysdeps/unix/sysv/aix/linux/linux-stat.h +++ /dev/null @@ -1,131 +0,0 @@ -/* Copyright (C) 1992, 95, 96, 97, 98, 99, 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 - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _SYS_STAT_H -# error "Never include directly; use instead." -#endif - -/* Versions of the `struct stat' data structure. */ -#define _STAT_VER_LINUX_OLD 1 -#define _STAT_VER_KERNEL 1 -#define _STAT_VER_SVR4 2 -#define _STAT_VER_LINUX 3 -#define _STAT_VER _STAT_VER_LINUX /* The one defined below. */ - -/* Versions of the `xmknod' interface. */ -#define _MKNOD_VER_LINUX 1 -#define _MKNOD_VER_SVR4 2 -#define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */ - - -struct stat - { - __dev_t st_dev; /* Device. */ - unsigned short int __pad1; -#ifndef __USE_FILE_OFFSET64 - __ino_t st_ino; /* File serial number. */ -#else - __ino64_t st_ino; /* File serial number. */ -#endif - __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. */ - unsigned short int __pad2; -#ifndef __USE_FILE_OFFSET64 - __off_t st_size; /* Size of file, in bytes. */ -#else - __off64_t st_size; /* Size of file, in bytes. */ -#endif - __blksize_t st_blksize; /* Optimal block size for I/O. */ - -#ifndef __USE_FILE_OFFSET64 - __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ -#else - __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ -#endif - __time_t st_atime; /* Time of last access. */ - unsigned long int __unused1; - __time_t st_mtime; /* Time of last modification. */ - unsigned long int __unused2; - __time_t st_ctime; /* Time of last status change. */ - unsigned long int __unused3; - unsigned long int __unused4; - unsigned long int __unused5; - }; - -#ifdef __USE_LARGEFILE64 -struct stat64 - { - __dev_t st_dev; /* Device. */ - unsigned short int __pad1; - - __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. */ - unsigned short int __pad2; - __off64_t st_size; /* Size of file, in bytes. */ - __blksize_t st_blksize; /* Optimal block size for I/O. */ - - __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ - __time_t st_atime; /* Time of last access. */ - unsigned long int __unused1; - __time_t st_mtime; /* Time of last modification. */ - unsigned long int __unused2; - __time_t st_ctime; /* Time of last status change. */ - unsigned long int __unused3; - unsigned long int __unused4; - unsigned long int __unused5; - }; -#endif - -/* Tell code we have these members. */ -#define _STATBUF_ST_BLKSIZE -#define _STATBUF_ST_RDEV - -/* Encoding of the file mode. */ - -#define __S_IFMT 0170000 /* These bits determine file type. */ - -/* File types. */ -#define __S_IFDIR 0040000 /* Directory. */ -#define __S_IFCHR 0020000 /* Character device. */ -#define __S_IFBLK 0060000 /* Block device. */ -#define __S_IFREG 0100000 /* Regular file. */ -#define __S_IFIFO 0010000 /* FIFO. */ - -/* These don't actually exist on System V, but having them doesn't hurt. */ -#define __S_IFLNK 0120000 /* Symbolic link. */ -#define __S_IFSOCK 0140000 /* Socket. */ - -/* Protection bits. */ - -#define __S_ISUID 04000 /* Set user ID on execution. */ -#define __S_ISGID 02000 /* Set group ID on execution. */ -#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ -#define __S_IREAD 0400 /* Read by owner. */ -#define __S_IWRITE 0200 /* Write by owner. */ -#define __S_IEXEC 0100 /* Execute by owner. */ - - -/* Thi macro (with a different name) is normally in . */ -#define linux_makedev(major, minor) (((major) << 8 | (minor))) diff --git a/sysdeps/unix/sysv/aix/linux/statconv.c b/sysdeps/unix/sysv/aix/linux/statconv.c deleted file mode 100644 index 5333e23d7b..0000000000 --- a/sysdeps/unix/sysv/aix/linux/statconv.c +++ /dev/null @@ -1,35 +0,0 @@ -void -__stat_aix_to_linux (const struct stat *aixstat, struct stat *linuxstat) -{ - linuxstat->st_dev = linux_makedev (major (aixstat->st_dev), - minor (aixstat->st_dev)); - linuxstat->st_ino = aixstat->st_ino; - /* The following assumes that the mode values are the same on AIX - and Linux which is true in the moment. */ - linuxstat->st_mode = aixstat->st_mode; - linuxstat->st_nlink = aixstat->st_nlink; - /* There is no st_flag field in Linux. */ - linuxstat->st_uid = aixstat->st_uid; - linuxstat->st_gid = aixstat->st_gid; - linuxstat->st_rdev = linux_makedev (major (aixstat->st_rdev), - minor (aixstat->st_rdev)); - linuxstat->st_size = aixstat->st_size; - linuxstat->st_atime = aixstat->st_atime; - linuxstat->st_mtime = aixstat->st_mtime; - linuxstat->st_ctime = aixstat->st_ctime; - linuxstat->st_blksize = aixstat->st_blksize; - linuxstat->st_blocks = aixstat->st_blocks; - /* There is no st_vfstype in Linux. */ - /* There is no st_vfs in Linux. */ - /* There is no st_type in Linux. */ - /* There is no st_gen in Linux. */ - - /* File in the padding values with repeatable values. */ - linuxstat->__pad1 = 0; - linuxstat->__pad2 = 0; - linuxstat->__unused1 = 0; - linuxstat->__unused2 = 0; - linuxstat->__unused3 = 0; - linuxstat->__unused4 = 0; - linuxstat->__unused5 = 0; -} From bb0607a2aaa43dd9a8e081eec48be923323cef25 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 8 May 2000 15:01:07 +0000 Subject: [PATCH 2111/4487] New file. Use getpagesize syscall if available. --- sysdeps/unix/sysv/linux/m68k/getpagesize.c | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/getpagesize.c diff --git a/sysdeps/unix/sysv/linux/m68k/getpagesize.c b/sysdeps/unix/sysv/linux/m68k/getpagesize.c new file mode 100644 index 0000000000..0e2ba10804 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/getpagesize.c @@ -0,0 +1,43 @@ +/* Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Schwab . + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include + +#include +#include + +/* Return the system page size. */ +int +__getpagesize () +{ +#ifdef __NR_getpagesize + int result; + + result = INLINE_SYSCALL (getpagesize, 0); + /* The only possible error is ENOSYS. */ + if (result != -1) + return result; +#endif + + return EXEC_PAGESIZE; +} + +weak_alias (__getpagesize, getpagesize) From 21dd216cd4ee9400ac9c286ff5758bc595dd41b7 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 8 May 2000 15:40:26 +0000 Subject: [PATCH 2112/4487] 2000-05-08 Jakub Jelinek * sysdeps/alpha/dl-machine.h (elf_machine_rela): Fix arguments in call to elf_machine_fixup_plt. * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela): Likewise. * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela): Likewise. --- sysdeps/alpha/dl-machine.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 814e3552f1..e20493b33f 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -252,7 +252,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) .end " #tramp_name) #ifndef PROF -#define ELF_MACHINE_RUNTIME_TRAMPOLINE \ +#define ELF_MACHINE_RUNTIME_TRAMPOLINE \ TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup, imb); \ TRAMPOLINE_TEMPLATE (_dl_runtime_profile, profile_fixup, /* nop */); #else @@ -497,7 +497,7 @@ elf_machine_rela (struct link_map *map, if (r_type == R_ALPHA_GLOB_DAT) *reloc_addr = sym_value; else if (r_type == R_ALPHA_JMP_SLOT) - elf_machine_fixup_plt (map, reloc, reloc_addr, sym_value); + elf_machine_fixup_plt (map, NULL, reloc, reloc_addr, sym_value); else if (r_type == R_ALPHA_REFQUAD) { sym_value += *reloc_addr; From 3a1e20c64a237b9041a53ea166a837d92ebc19cf Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sat, 13 May 2000 18:18:03 +0000 Subject: [PATCH 2113/4487] 2000-05-13 Andreas Jaeger * sysdeps/unix/sysv/linux/bits/socket.h (PF_PPPOX): New, from Linux 2.3.99pre7. (AF_PPPOX): Likewise. * sysdeps/unix/sysv/linux/mips/bits/socket.h (PF_PPPOX): Likewise. (AF_PPPOX): Likewise. --- sysdeps/unix/sysv/linux/mips/bits/socket.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h index 1462331ff7..299215aee7 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/socket.h +++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h @@ -85,7 +85,8 @@ enum __socket_type #define PF_ECONET 19 /* Acorn Econet. */ #define PF_ATMSVC 20 /* ATM SVCs. */ #define PF_SNA 22 /* Linux SNA Project */ -#define PF_IRDA 23 /* IRDA sockets. */ +#define PF_IRDA 23 /* IRDA sockets. */ +#define PF_PPPOX 24 /* PPPoX sockets. */ #define PF_MAX 32 /* For now.. */ /* Address families. */ @@ -114,7 +115,8 @@ enum __socket_type #define AF_ECONET PF_ECONET #define AF_ATMSVC PF_ATMSVC #define AF_SNA PF_SNA -#define AF_IRDA PF_IRDA +#define AF_IRDA PF_IRDA +#define AF_PPPOX PF_PPPOX #define AF_MAX PF_MAX /* Socket level values. Others are defined in the appropriate headers. From 5d1aa2e61b56bf76f7a8444305e3c0d8a004e554 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 17 May 2000 17:18:49 +0000 Subject: [PATCH 2114/4487] 2000-05-17 Jakub Jelinek * sysdeps/arm/bits/huge_val.h (HUGE_VAL, HUGE_VALF): Add __extension__ to hexadecimal floating constant notation. * sysdeps/i386/bits/huge_val.h (HUGE_VAL, HUGE_VALF, HUGE_VALL): Likewise. * sysdeps/ieee754/bits/huge_val.h (HUGE_VAL, HUGE_VALF): Likewise. * sysdeps/m68k/bits/huge_val.h (HUGE_VAL, HUGE_VALF, HUGE_VALL): Likewise. * sysdeps/sparc/sparc64/bits/huge_val.h (HUGE_VAL, HUGE_VALF, HUGE_VALL): Likewise. * sysdeps/sparc/sparc32/bits/huge_val.h (HUGE_VAL, HUGE_VALF, HUGE_VALL): Likewise. (HUGE_VALL): Set to HUGE_VAL on sparc32. --- sysdeps/arm/bits/huge_val.h | 6 +++--- sysdeps/m68k/bits/huge_val.h | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sysdeps/arm/bits/huge_val.h b/sysdeps/arm/bits/huge_val.h index 398476cf72..44db4bdd58 100644 --- a/sysdeps/arm/bits/huge_val.h +++ b/sysdeps/arm/bits/huge_val.h @@ -1,7 +1,7 @@ /* `HUGE_VAL' constants for IEEE 754 machines (where it is infinity). Used by and functions for overflow. ARM version. - Copyright (C) 1992, 95, 96, 97, 98, 99 Free Software Foundation, Inc. + Copyright (C) 1992, 95, 96, 97, 98, 99, 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 @@ -31,7 +31,7 @@ # if __GNUC_PREREQ(2,95) -# define HUGE_VAL (0x1.0p2047) +# define HUGE_VAL (__extension__ 0x1.0p2047) # else @@ -69,7 +69,7 @@ static __huge_val_t __huge_val = { __HUGE_VAL_bytes }; # if __GNUC_PREREQ(2,95) -# define HUGE_VALF (0x1.0p255f) +# define HUGE_VALF (__extension__ 0x1.0p255f) # else diff --git a/sysdeps/m68k/bits/huge_val.h b/sysdeps/m68k/bits/huge_val.h index 339f374d68..d191042835 100644 --- a/sysdeps/m68k/bits/huge_val.h +++ b/sysdeps/m68k/bits/huge_val.h @@ -1,6 +1,6 @@ /* `HUGE_VAL' constants for m68k (where it is infinity). Used by and functions for overflow. - Copyright (C) 1992, 1995, 1996, 1997, 1999 Free Software Foundation, Inc. + Copyright (C) 1992, 1995, 1996, 1997, 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 @@ -32,7 +32,7 @@ # if __GNUC_PREREQ(2,95) -# define HUGE_VAL (0x1.0p2047) +# define HUGE_VAL (__extension__ 0x1.0p2047) # else @@ -58,8 +58,8 @@ static union { unsigned char __c[8]; double __d; } __huge_val = # if __GNUC_PREREQ(2,95) -# define HUGE_VALF (0x1.0p255f) -# define HUGE_VALL (0x1.0p32767L) +# define HUGE_VALF (__extension__ 0x1.0p255f) +# define HUGE_VALL (__extension__ 0x1.0p32767L) # else From e4a8c0f3325efcc34bb26fa28cebb8f1901d818b Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 22 May 2000 09:25:13 +0000 Subject: [PATCH 2115/4487] 2000-05-21 Jakub Jelinek * sysdeps/arm/bits/huge_val.h: Prereq gcc 2.96+, not 2.95. * sysdeps/i386/bits/huge_val.h: Likewise. * sysdeps/ieee754/bits/huge_val.h: Likewise. * sysdeps/m68k/bits/huge_val.h: Likewise. * sysdeps/sparc/sparc32/bits/huge_val.h: Likewise. * sysdeps/sparc/sparc64/bits/huge_val.h: Likewise. --- sysdeps/arm/bits/huge_val.h | 4 ++-- sysdeps/m68k/bits/huge_val.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/arm/bits/huge_val.h b/sysdeps/arm/bits/huge_val.h index 44db4bdd58..841b4b0d68 100644 --- a/sysdeps/arm/bits/huge_val.h +++ b/sysdeps/arm/bits/huge_val.h @@ -29,7 +29,7 @@ #ifdef __GNUC__ -# if __GNUC_PREREQ(2,95) +# if __GNUC_PREREQ(2,96) # define HUGE_VAL (__extension__ 0x1.0p2047) @@ -67,7 +67,7 @@ static __huge_val_t __huge_val = { __HUGE_VAL_bytes }; # ifdef __GNUC__ -# if __GNUC_PREREQ(2,95) +# if __GNUC_PREREQ(2,96) # define HUGE_VALF (__extension__ 0x1.0p255f) diff --git a/sysdeps/m68k/bits/huge_val.h b/sysdeps/m68k/bits/huge_val.h index d191042835..9e1589157c 100644 --- a/sysdeps/m68k/bits/huge_val.h +++ b/sysdeps/m68k/bits/huge_val.h @@ -30,7 +30,7 @@ #ifdef __GNUC__ -# if __GNUC_PREREQ(2,95) +# if __GNUC_PREREQ(2,96) # define HUGE_VAL (__extension__ 0x1.0p2047) @@ -56,7 +56,7 @@ static union { unsigned char __c[8]; double __d; } __huge_val = #ifdef __USE_ISOC99 -# if __GNUC_PREREQ(2,95) +# if __GNUC_PREREQ(2,96) # define HUGE_VALF (__extension__ 0x1.0p255f) # define HUGE_VALL (__extension__ 0x1.0p32767L) From d41b66ce6a6995707478119ed286ee6ba94581eb Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 23 May 2000 08:42:59 +0000 Subject: [PATCH 2116/4487] Remove K&R support, use ANSI C prototypes. --- sysdeps/alpha/fpu/bits/fenv.h | 6 +++--- sysdeps/m68k/fpu/switch/68881-sw.h | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sysdeps/alpha/fpu/bits/fenv.h b/sysdeps/alpha/fpu/bits/fenv.h index 8e7b6ece5b..82b85debcd 100644 --- a/sysdeps/alpha/fpu/bits/fenv.h +++ b/sysdeps/alpha/fpu/bits/fenv.h @@ -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 @@ -99,5 +99,5 @@ typedef unsigned long int fenv_t; #endif /* The system calls to talk to the kernel's FP code. */ -extern unsigned long int __ieee_get_fp_control __P ((void)); -extern void __ieee_set_fp_control __P ((unsigned long int __value)); +extern unsigned long int __ieee_get_fp_control (void) __THROW; +extern void __ieee_set_fp_control (unsigned long int __value) __THROW; diff --git a/sysdeps/m68k/fpu/switch/68881-sw.h b/sysdeps/m68k/fpu/switch/68881-sw.h index 89bf65cb69..2f38aacbb3 100644 --- a/sysdeps/m68k/fpu/switch/68881-sw.h +++ b/sysdeps/m68k/fpu/switch/68881-sw.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1997, 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 @@ -33,9 +33,9 @@ struct switch_caller { unsigned short int insn; /* The `jsr' or `jmp' instruction. */ - __ptr_t target; /* The target of the instruction. */ - __ptr_t soft; /* The address of the soft function. */ - __ptr_t fpu; /* The address of the 68881 function. */ + void *target; /* The target of the instruction. */ + void *soft; /* The address of the soft function. */ + void *fpu; /* The address of the 68881 function. */ }; /* These are opcodes (values for `insn', above) for `jmp' and `jsr' @@ -47,12 +47,12 @@ struct switch_caller /* Function to determine whether or not a 68881 is available, and modify its caller (which must be a `struct switch_caller', above, in data space) to use the appropriate version. */ -extern void __68881_switch __P ((int __dummy)); +extern void __68881_switch (int __dummy) __THROW; /* Define FUNCTION as a `struct switch_caller' which will call `__FUNCTION_68881' if a 68881 is present, and `__FUNCTION_soft' if not. -#define switching_function(FUNCTION) \ +#define switching_function(FUNCTION) \ struct switch_caller FUNCTION = \ { \ JSR, (__ptr_t) __68881_switch, \ From cf0d650794e9ba75842f8a1feb8ff31b13b586f5 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 23 May 2000 09:07:17 +0000 Subject: [PATCH 2117/4487] Remove K&R support. --- sysdeps/unix/sysv/linux/alpha/sys/acct.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/sys/acct.h b/sysdeps/unix/sysv/linux/alpha/sys/acct.h index 6dda5f4922..2ddf44ad43 100644 --- a/sysdeps/unix/sysv/linux/alpha/sys/acct.h +++ b/sysdeps/unix/sysv/linux/alpha/sys/acct.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 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 @@ -59,7 +59,7 @@ enum /* Switch process accounting on and off. */ -extern int acct __P ((__const char *__filename)); +extern int acct (__const char *__filename) __THROW; __END_DECLS From 4decd16ab5ff514ed18d0abb7aefb86fa693b66d Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 24 May 2000 16:16:17 +0000 Subject: [PATCH 2118/4487] * sysdeps/mips/elf/start.S (ENTRY_POINT): Align stack for double words. --- sysdeps/mips/elf/start.S | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sysdeps/mips/elf/start.S b/sysdeps/mips/elf/start.S index 7fee4e71c3..064fe7e6f4 100644 --- a/sysdeps/mips/elf/start.S +++ b/sysdeps/mips/elf/start.S @@ -27,7 +27,7 @@ segment. The SVR4/Mips ABI (pages 3-31, 3-32) says that when the entry point runs, most registers' values are unspecified, except for: - v1 ($2) Contains a function pointer to be registered with `atexit'. + v0 ($2) Contains a function pointer to be registered with `atexit'. This is how the dynamic linker arranges to have DT_FINI functions called for shared libraries that have been loaded before this code runs. @@ -76,7 +76,9 @@ ENTRY_POINT: dla $4, main /* main */ lw $5, 0($29) /* argc */ addu $6, $29, 4 /* argv */ - /* Allocate space on the stack for seven arguments but align to 32. */ + /* Allocate space on the stack for seven arguments and make sure + the stack is aligned to double words (8 bytes). */ + and $29, 0xfffffff8 subu $29, 32 dla $7, _init /* init */ dla $8, _fini @@ -84,7 +86,9 @@ ENTRY_POINT: la $4, main /* main */ lw $5, 0($29) /* argc */ addu $6, $29, 4 /* argv */ - /* Allocate space on the stack for seven arguments but align to 32. */ + /* Allocate space on the stack for seven arguments and make sure + the stack is aligned to double words (8 bytes). */ + and $29, 0xfffffff8 subu $29, 32 la $7, _init /* init */ la $8, _fini From 438c13509424f0530157284474cecbe153e2f03b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 25 May 2000 05:28:08 +0000 Subject: [PATCH 2119/4487] Linux/Arm spinlock implementation. --- sysdeps/arm/linuxthreads/pspinlock.c | 81 ++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 sysdeps/arm/linuxthreads/pspinlock.c diff --git a/sysdeps/arm/linuxthreads/pspinlock.c b/sysdeps/arm/linuxthreads/pspinlock.c new file mode 100644 index 0000000000..a56881adfd --- /dev/null +++ b/sysdeps/arm/linuxthreads/pspinlock.c @@ -0,0 +1,81 @@ +/* POSIX spinlock implementation. Arm version. + Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + + +int +__pthread_spin_lock (pthread_spinlock_t *lock) +{ + unsigned int val; + + do + asm volatile ("swp %0, %1, [%2]" + : "=r" (val) + : "0" (1), "r" (lock) + : "memory"); + while (val != 0); + + return 0; +} +weak_alias (__pthread_spin_lock, pthread_spin_lock) + + +int +__pthread_spin_trylock (pthread_spinlock_t *lock) +{ + unsigned int val; + + asm volatile ("swp %0, %1, [%2]" + : "=r" (val) + : "0" (1), "r" (lock) + : "memory"); + + return val ? EBUSY : 0; +} +weak_alias (__pthread_spin_trylock, pthread_spin_trylock) + + +int +__pthread_spin_unlock (pthread_spinlock_t *lock) +{ + return *lock = 0; +} +weak_alias (__pthread_spin_unlock, pthread_spin_unlock) + + +int +__pthread_spin_init (pthread_spinlock_t *lock, int pshared) +{ + /* We can ignore the `pshared' parameter. Since we are busy-waiting + all processes which can access the memory location `lock' points + to can use the spinlock. */ + return *lock = 0; +} +weak_alias (__pthread_spin_init, pthread_spin_init) + + +int +__pthread_spin_destroy (pthread_spinlock_t *lock) +{ + /* Nothing to do. */ + return 0; +} +weak_alias (__pthread_spin_destroy, pthread_spin_destroy) From cd60509b8f56b407463f3e80512a64e0d09ce80d Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 26 May 2000 15:45:57 +0000 Subject: [PATCH 2120/4487] * sysdeps/unix/sysv/linux/i386/pread64.c: Removed, we can use the normal version now. * sysdeps/unix/sysv/linux/arm/pread64.c: Likewise. * sysdeps/unix/sysv/linux/arm/pwrite64.c: Likewise. * sysdeps/unix/sysv/linux/mips/pread64.c: Likewise. * sysdeps/unix/sysv/linux/mips/pwrite64.c: Likewise. --- sysdeps/unix/sysv/linux/arm/pread64.c | 1 - sysdeps/unix/sysv/linux/arm/pwrite64.c | 1 - sysdeps/unix/sysv/linux/mips/pread64.c | 75 ------------------------- sysdeps/unix/sysv/linux/mips/pwrite64.c | 75 ------------------------- 4 files changed, 152 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/arm/pread64.c delete mode 100644 sysdeps/unix/sysv/linux/arm/pwrite64.c delete mode 100644 sysdeps/unix/sysv/linux/mips/pread64.c delete mode 100644 sysdeps/unix/sysv/linux/mips/pwrite64.c diff --git a/sysdeps/unix/sysv/linux/arm/pread64.c b/sysdeps/unix/sysv/linux/arm/pread64.c deleted file mode 100644 index c567fc530a..0000000000 --- a/sysdeps/unix/sysv/linux/arm/pread64.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/arm/pwrite64.c b/sysdeps/unix/sysv/linux/arm/pwrite64.c deleted file mode 100644 index 4993830d26..0000000000 --- a/sysdeps/unix/sysv/linux/arm/pwrite64.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/mips/pread64.c b/sysdeps/unix/sysv/linux/mips/pread64.c deleted file mode 100644 index d17dbeb396..0000000000 --- a/sysdeps/unix/sysv/linux/mips/pread64.c +++ /dev/null @@ -1,75 +0,0 @@ -/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 1997. - - 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 - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include -#include - -#include -#include - -#include - -#if defined __NR_pread || __ASSUME_PREAD_SYSCALL > 0 - -# if __ASSUME_PREAD_SYSCALL == 0 -static ssize_t __emulate_pread64 (int fd, void *buf, size_t count, - off64_t offset) internal_function; -# endif - -extern ssize_t __syscall_pread (int fd, void *buf, size_t count, int dummy, - off_t offset_hi, off_t offset_lo); - - - -ssize_t -__libc_pread64 (fd, buf, count, offset) - int fd; - void *buf; - size_t count; - off64_t offset; -{ - ssize_t result; - - /* First try the syscall. */ -# if defined(__MIPSEB__) - result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, (off_t) (offset >> 32), - (off_t) (offset & 0xffffffff)); -# elif defined(__MIPSEL__) - result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, - (off_t) (offset & 0xffffffff), - (off_t) (offset >> 32)); -# endif -# if __ASSUME_PREAD_SYSCALL == 0 - if (result == -1 && errno == ENOSYS) - /* No system call available. Use the emulation. */ - result = __emulate_pread64 (fd, buf, count, offset); -# endif - return result; -} - -weak_alias (__libc_pread64, __pread64) -weak_alias (__libc_pread64, pread64) - -# define __libc_pread64(fd, buf, count, offset) \ - static internal_function __emulate_pread64 (fd, buf, count, offset) -#endif - -#if __ASSUME_PREAD_SYSCALL == 0 -# include -#endif diff --git a/sysdeps/unix/sysv/linux/mips/pwrite64.c b/sysdeps/unix/sysv/linux/mips/pwrite64.c deleted file mode 100644 index 295a1754b6..0000000000 --- a/sysdeps/unix/sysv/linux/mips/pwrite64.c +++ /dev/null @@ -1,75 +0,0 @@ -/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ralf Baechle , 1998. - - 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 - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include -#include - -#include -#include - -#include - -#if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0 - -extern ssize_t __syscall_pwrite (int fd, const void *buf, size_t count, - int dummy, off_t offset_hi, off_t offset_lo); - -# if __ASSUME_PWRITE_SYSCALL == 0 -static ssize_t __emulate_pwrite64 (int fd, const void *buf, size_t count, - off64_t offset) internal_function; -# endif - -ssize_t -__libc_pwrite64 (fd, buf, count, offset) - int fd; - const void *buf; - size_t count; - off64_t offset; -{ - ssize_t result; - - /* First try the syscall. */ -# if defined(__MIPSEB__) - result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, (off_t) (offset >> 32), - (off_t) (offset & 0xffffffff)); -# elif defined(__MIPSEL__) - result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, - (off_t) (offset & 0xffffffff), - (off_t) (offset >> 32)); -# endif - -# if __ASSUME_PWRITE_SYSCALL == 0 - if (result == -1 && errno == ENOSYS) - /* No system call available. Use the emulation. */ - result = __emulate_pwrite64 (fd, buf, count, offset); -# endif - - return result; -} - -weak_alias (__libc_pwrite64, __pwrite64) -weak_alias (__libc_pwrite64, pwrite64) - -# define __libc_pwrite64(fd, buf, count, offset) \ - static internal_function __emulate_pwrite64 (fd, buf, count, offset) -#endif - -#if __ASSUME_PWRITE_SYSCALL == 0 -# include -#endif From 00842512db6b975176bcca6964bfa3a4b97050e6 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sat, 27 May 2000 16:49:02 +0000 Subject: [PATCH 2121/4487] * sysdeps/unix/sysv/linux/mips/pread.c: Removed, we can use the normal version now. * sysdeps/unix/sysv/linux/mips/pwrite.c: Likewise. --- sysdeps/unix/sysv/linux/mips/pread.c | 71 --------------------------- sysdeps/unix/sysv/linux/mips/pwrite.c | 71 --------------------------- 2 files changed, 142 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/mips/pread.c delete mode 100644 sysdeps/unix/sysv/linux/mips/pwrite.c diff --git a/sysdeps/unix/sysv/linux/mips/pread.c b/sysdeps/unix/sysv/linux/mips/pread.c deleted file mode 100644 index d926a06508..0000000000 --- a/sysdeps/unix/sysv/linux/mips/pread.c +++ /dev/null @@ -1,71 +0,0 @@ -/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 1997. - - 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 - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include -#include - -#include -#include - -#include - -#if defined __NR_pread || __ASSUME_PREAD_SYSCALL > 0 - -# if __ASSUME_PREAD_SYSCALL == 0 -static ssize_t __emulate_pread (int fd, void *buf, size_t count, - off_t offset) internal_function; -# endif -extern ssize_t __syscall_pread (int fd, void *buf, size_t count, int dummy, - off_t offset_hi, off_t offset_lo); - - - -ssize_t -__libc_pread (fd, buf, count, offset) - int fd; - void *buf; - size_t count; - off_t offset; -{ - ssize_t result; - - /* First try the syscall. */ -# if defined(__MIPSEB__) - result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, 0, offset); -# elif defined(__MIPSEL__) - result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, offset, 0); -# endif -# if __ASSUME_PREAD_SYSCALL == 0 - if (result == -1 && errno == ENOSYS) - /* No system call available. Use the emulation. */ - result = __emulate_pread (fd, buf, count, offset); -# endif - return result; -} - -strong_alias (__libc_pread, __pread) -weak_alias (__libc_pread, pread) - -# define __libc_pread(fd, buf, count, offset) \ - static internal_function __emulate_pread (fd, buf, count, offset) -#endif - -#if __ASSUME_PREAD_SYSCALL == 0 -# include -#endif diff --git a/sysdeps/unix/sysv/linux/mips/pwrite.c b/sysdeps/unix/sysv/linux/mips/pwrite.c deleted file mode 100644 index a83df31ca4..0000000000 --- a/sysdeps/unix/sysv/linux/mips/pwrite.c +++ /dev/null @@ -1,71 +0,0 @@ -/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 1997. - - 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 - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include -#include - -#include -#include - -#include - -#if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0 - -extern ssize_t __syscall_pwrite (int fd, const void *buf, size_t count, - int dummy, off_t offset_hi, off_t offset_lo); - -# if __ASSUME_PWRITE_SYSCALL == 0 -static ssize_t __emulate_pwrite (int fd, const void *buf, size_t count, - off_t offset) internal_function; -# endif - -ssize_t -__libc_pwrite (fd, buf, count, offset) - int fd; - const void *buf; - size_t count; - off_t offset; -{ - ssize_t result; - - /* First try the syscall. */ -# if defined(__MIPSEB__) - result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, 0, offset); -# elif defined(__MIPSEL__) - result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, offset, 0); -# endif -# if __ASSUME_PWRITE_SYSCALL == 0 - if (result == -1 && errno == ENOSYS) - /* No system call available. Use the emulation. */ - result = __emulate_pwrite (fd, buf, count, offset); -# endif - - return result; -} - -strong_alias (__libc_pwrite, __pwrite) -weak_alias (__libc_pwrite, pwrite) - -# define __libc_pwrite(fd, buf, count, offset) \ - static internal_function __emulate_pwrite (fd, buf, count, offset) -#endif - -#if __ASSUME_PWRITE_SYSCALL == 0 -# include -#endif From dae4f11aacf22e69b8cf71b2d2b59758c090fa5d Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sat, 27 May 2000 16:49:57 +0000 Subject: [PATCH 2122/4487] * sysdeps/unix/sysv/linux/arm/pread.c: Removed, we can use the normal version now. * sysdeps/unix/sysv/linux/arm/pwrite.c: Likewise. --- sysdeps/unix/sysv/linux/arm/pread.c | 1 - sysdeps/unix/sysv/linux/arm/pwrite.c | 1 - 2 files changed, 2 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/arm/pread.c delete mode 100644 sysdeps/unix/sysv/linux/arm/pwrite.c diff --git a/sysdeps/unix/sysv/linux/arm/pread.c b/sysdeps/unix/sysv/linux/arm/pread.c deleted file mode 100644 index 06bc6010a8..0000000000 --- a/sysdeps/unix/sysv/linux/arm/pread.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/arm/pwrite.c b/sysdeps/unix/sysv/linux/arm/pwrite.c deleted file mode 100644 index b9b5e35107..0000000000 --- a/sysdeps/unix/sysv/linux/arm/pwrite.c +++ /dev/null @@ -1 +0,0 @@ -#include From a07cbd18941f3437723f9ec88a6a392a78aee649 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 29 May 2000 00:59:18 +0000 Subject: [PATCH 2123/4487] (compare_and_swap): Return result. --- sysdeps/arm/atomicity.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/arm/atomicity.h b/sysdeps/arm/atomicity.h index 01bd64e465..c1f3b038ef 100644 --- a/sysdeps/arm/atomicity.h +++ b/sysdeps/arm/atomicity.h @@ -81,6 +81,7 @@ compare_and_swap (volatile long int *p, long int oldval, long int newval) : "=&r" (result), "=&r" (tmp) : "r" (p), "r" (newval), "r" (oldval) : "cc", "memory"); + return result; } #endif /* atomicity.h */ From 245061db80961b1b9bf0a8cf059d63399e2983ca Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 30 May 2000 12:50:17 +0000 Subject: [PATCH 2124/4487] * sysdeps/unix/sysv/linux/mips/truncate64.c: New file. * sysdeps/unix/sysv/linux/mips/ftruncate64.c: New file. * sysdeps/unix/sysv/linux/mips/pread64.c: Readded file. * sysdeps/unix/sysv/linux/mips/pwrite64.c: Readded file. * sysdeps/unix/sysv/linux/mips/pread.c: Readded file. * sysdeps/unix/sysv/linux/mips/pwrite.c: Readded file. --- sysdeps/unix/sysv/linux/mips/ftruncate64.c | 83 +++++++++++++++++++++ sysdeps/unix/sysv/linux/mips/pread.c | 71 ++++++++++++++++++ sysdeps/unix/sysv/linux/mips/pread64.c | 75 +++++++++++++++++++ sysdeps/unix/sysv/linux/mips/pwrite.c | 71 ++++++++++++++++++ sysdeps/unix/sysv/linux/mips/pwrite64.c | 75 +++++++++++++++++++ sysdeps/unix/sysv/linux/mips/truncate64.c | 84 ++++++++++++++++++++++ 6 files changed, 459 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/mips/ftruncate64.c create mode 100644 sysdeps/unix/sysv/linux/mips/pread.c create mode 100644 sysdeps/unix/sysv/linux/mips/pread64.c create mode 100644 sysdeps/unix/sysv/linux/mips/pwrite.c create mode 100644 sysdeps/unix/sysv/linux/mips/pwrite64.c create mode 100644 sysdeps/unix/sysv/linux/mips/truncate64.c diff --git a/sysdeps/unix/sysv/linux/mips/ftruncate64.c b/sysdeps/unix/sysv/linux/mips/ftruncate64.c new file mode 100644 index 0000000000..66c6548ee8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/ftruncate64.c @@ -0,0 +1,83 @@ +/* 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include +#include + +#include +#include + +#include "kernel-features.h" + +#ifdef __NR_ftruncate64 +#ifndef __ASSUME_TRUNCATE64_SYSCALL +/* The variable is shared between all wrappers around *truncate64 calls. */ +extern int __have_no_truncate64; +#endif + +/* The order of hight, low depends on endianness. */ +extern int __syscall_ftruncate64 (int fd, int high_length, int low_length); + + +/* Truncate the file FD refers to to LENGTH bytes. */ +int +ftruncate64 (int fd, off64_t length) +{ +#ifndef __ASSUME_TRUNCATE64_SYSCALL + if (! __have_no_truncate64) +#endif + { + unsigned int low = length & 0xffffffff; + unsigned int high = length >> 32; +#ifndef __ASSUME_TRUNCATE64_SYSCALL + int saved_errno = errno; +#endif +#if __BYTE_ORDER == __LITTLE_ENDIAN + /* Use a fill argument to pass low, high in an aligned pair of + arguments (here 2/3). */ + int result = INLINE_SYSCALL (ftruncate64, 3, fd, 0, low, high); +#elif __BYTE_ORDER == __BIG_ENDIAN + int result = INLINE_SYSCALL (ftruncate64, 3, fd, 0, high, low); +#endif +#ifndef __ASSUME_TRUNCATE64_SYSCALL + if (result != -1 || errno != ENOSYS) +#endif + return result; + +#ifndef __ASSUME_TRUNCATE64_SYSCALL + __set_errno (saved_errno); + __have_no_truncate64 = 1; +#endif + } + +#ifndef __ASSUME_TRUNCATE64_SYSCALL + if ((off_t) length != length) + { + __set_errno (EINVAL); + return -1; + } + return __ftruncate (fd, (off_t) length); +#endif +} + +#else +/* Use the generic implementation. */ +# include +#endif diff --git a/sysdeps/unix/sysv/linux/mips/pread.c b/sysdeps/unix/sysv/linux/mips/pread.c new file mode 100644 index 0000000000..d926a06508 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/pread.c @@ -0,0 +1,71 @@ +/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1997. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +#include +#include + +#include + +#if defined __NR_pread || __ASSUME_PREAD_SYSCALL > 0 + +# if __ASSUME_PREAD_SYSCALL == 0 +static ssize_t __emulate_pread (int fd, void *buf, size_t count, + off_t offset) internal_function; +# endif +extern ssize_t __syscall_pread (int fd, void *buf, size_t count, int dummy, + off_t offset_hi, off_t offset_lo); + + + +ssize_t +__libc_pread (fd, buf, count, offset) + int fd; + void *buf; + size_t count; + off_t offset; +{ + ssize_t result; + + /* First try the syscall. */ +# if defined(__MIPSEB__) + result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, 0, offset); +# elif defined(__MIPSEL__) + result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, offset, 0); +# endif +# if __ASSUME_PREAD_SYSCALL == 0 + if (result == -1 && errno == ENOSYS) + /* No system call available. Use the emulation. */ + result = __emulate_pread (fd, buf, count, offset); +# endif + return result; +} + +strong_alias (__libc_pread, __pread) +weak_alias (__libc_pread, pread) + +# define __libc_pread(fd, buf, count, offset) \ + static internal_function __emulate_pread (fd, buf, count, offset) +#endif + +#if __ASSUME_PREAD_SYSCALL == 0 +# include +#endif diff --git a/sysdeps/unix/sysv/linux/mips/pread64.c b/sysdeps/unix/sysv/linux/mips/pread64.c new file mode 100644 index 0000000000..d17dbeb396 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/pread64.c @@ -0,0 +1,75 @@ +/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1997. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +#include +#include + +#include + +#if defined __NR_pread || __ASSUME_PREAD_SYSCALL > 0 + +# if __ASSUME_PREAD_SYSCALL == 0 +static ssize_t __emulate_pread64 (int fd, void *buf, size_t count, + off64_t offset) internal_function; +# endif + +extern ssize_t __syscall_pread (int fd, void *buf, size_t count, int dummy, + off_t offset_hi, off_t offset_lo); + + + +ssize_t +__libc_pread64 (fd, buf, count, offset) + int fd; + void *buf; + size_t count; + off64_t offset; +{ + ssize_t result; + + /* First try the syscall. */ +# if defined(__MIPSEB__) + result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, (off_t) (offset >> 32), + (off_t) (offset & 0xffffffff)); +# elif defined(__MIPSEL__) + result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, + (off_t) (offset & 0xffffffff), + (off_t) (offset >> 32)); +# endif +# if __ASSUME_PREAD_SYSCALL == 0 + if (result == -1 && errno == ENOSYS) + /* No system call available. Use the emulation. */ + result = __emulate_pread64 (fd, buf, count, offset); +# endif + return result; +} + +weak_alias (__libc_pread64, __pread64) +weak_alias (__libc_pread64, pread64) + +# define __libc_pread64(fd, buf, count, offset) \ + static internal_function __emulate_pread64 (fd, buf, count, offset) +#endif + +#if __ASSUME_PREAD_SYSCALL == 0 +# include +#endif diff --git a/sysdeps/unix/sysv/linux/mips/pwrite.c b/sysdeps/unix/sysv/linux/mips/pwrite.c new file mode 100644 index 0000000000..a83df31ca4 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/pwrite.c @@ -0,0 +1,71 @@ +/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1997. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +#include +#include + +#include + +#if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0 + +extern ssize_t __syscall_pwrite (int fd, const void *buf, size_t count, + int dummy, off_t offset_hi, off_t offset_lo); + +# if __ASSUME_PWRITE_SYSCALL == 0 +static ssize_t __emulate_pwrite (int fd, const void *buf, size_t count, + off_t offset) internal_function; +# endif + +ssize_t +__libc_pwrite (fd, buf, count, offset) + int fd; + const void *buf; + size_t count; + off_t offset; +{ + ssize_t result; + + /* First try the syscall. */ +# if defined(__MIPSEB__) + result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, 0, offset); +# elif defined(__MIPSEL__) + result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, offset, 0); +# endif +# if __ASSUME_PWRITE_SYSCALL == 0 + if (result == -1 && errno == ENOSYS) + /* No system call available. Use the emulation. */ + result = __emulate_pwrite (fd, buf, count, offset); +# endif + + return result; +} + +strong_alias (__libc_pwrite, __pwrite) +weak_alias (__libc_pwrite, pwrite) + +# define __libc_pwrite(fd, buf, count, offset) \ + static internal_function __emulate_pwrite (fd, buf, count, offset) +#endif + +#if __ASSUME_PWRITE_SYSCALL == 0 +# include +#endif diff --git a/sysdeps/unix/sysv/linux/mips/pwrite64.c b/sysdeps/unix/sysv/linux/mips/pwrite64.c new file mode 100644 index 0000000000..295a1754b6 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/pwrite64.c @@ -0,0 +1,75 @@ +/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ralf Baechle , 1998. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +#include +#include + +#include + +#if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0 + +extern ssize_t __syscall_pwrite (int fd, const void *buf, size_t count, + int dummy, off_t offset_hi, off_t offset_lo); + +# if __ASSUME_PWRITE_SYSCALL == 0 +static ssize_t __emulate_pwrite64 (int fd, const void *buf, size_t count, + off64_t offset) internal_function; +# endif + +ssize_t +__libc_pwrite64 (fd, buf, count, offset) + int fd; + const void *buf; + size_t count; + off64_t offset; +{ + ssize_t result; + + /* First try the syscall. */ +# if defined(__MIPSEB__) + result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, (off_t) (offset >> 32), + (off_t) (offset & 0xffffffff)); +# elif defined(__MIPSEL__) + result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, + (off_t) (offset & 0xffffffff), + (off_t) (offset >> 32)); +# endif + +# if __ASSUME_PWRITE_SYSCALL == 0 + if (result == -1 && errno == ENOSYS) + /* No system call available. Use the emulation. */ + result = __emulate_pwrite64 (fd, buf, count, offset); +# endif + + return result; +} + +weak_alias (__libc_pwrite64, __pwrite64) +weak_alias (__libc_pwrite64, pwrite64) + +# define __libc_pwrite64(fd, buf, count, offset) \ + static internal_function __emulate_pwrite64 (fd, buf, count, offset) +#endif + +#if __ASSUME_PWRITE_SYSCALL == 0 +# include +#endif diff --git a/sysdeps/unix/sysv/linux/mips/truncate64.c b/sysdeps/unix/sysv/linux/mips/truncate64.c new file mode 100644 index 0000000000..08d9667612 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/truncate64.c @@ -0,0 +1,84 @@ +/* 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include +#include + +#include +#include + +#include "kernel-features.h" + +#ifdef __NR_truncate64 +#ifndef __ASSUME_TRUNCATE64_SYSCALL +/* The variable is shared between all wrappers around *truncate64 calls. */ +int __have_no_truncate64; +#endif + +/* The order of hight, low depends on endianness. */ +extern int __syscall_truncate64 (const char *path, int high_length, int low_length); + + +/* Truncate the file FD refers to to LENGTH bytes. */ +int +truncate64 (const char *path, off64_t length) +{ +#ifndef __ASSUME_TRUNCATE64_SYSCALL + if (! __have_no_truncate64) +#endif + { + unsigned int low = length & 0xffffffff; + unsigned int high = length >> 32; +#ifndef __ASSUME_TRUNCATE64_SYSCALL + int saved_errno = errno; +#endif +#if __BYTE_ORDER == __LITTLE_ENDIAN + /* Use a fill argument to pass low, high in an aligned pair of + arguments (here 2/3). */ + int result = INLINE_SYSCALL (truncate64, 3, path, 0, low, high); +#elif __BYTE_ORDER == __BIG_ENDIAN + int result = INLINE_SYSCALL (truncate64, 3, path, 0, high, low); +#endif + +#ifndef __ASSUME_TRUNCATE64_SYSCALL + if (result != -1 || errno != ENOSYS) +#endif + return result; + +#ifndef __ASSUME_TRUNCATE64_SYSCALL + __set_errno (saved_errno); + __have_no_truncate64 = 1; +#endif + } + +#ifndef __ASSUME_TRUNCATE64_SYSCALL + if ((off_t) length != length) + { + __set_errno (EINVAL); + return -1; + } + return truncate (path, (off_t) length); +#endif +} + +#else +/* Use the generic implementation. */ +# include +#endif From f41d856feb4376a224ad06226239ef06b03af352 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 30 May 2000 23:44:42 +0000 Subject: [PATCH 2125/4487] (__old_glob): Loose __P. --- sysdeps/unix/sysv/linux/alpha/oldglob.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/oldglob.c b/sysdeps/unix/sysv/linux/alpha/oldglob.c index d85c50e769..728f1fe664 100644 --- a/sysdeps/unix/sysv/linux/alpha/oldglob.c +++ b/sysdeps/unix/sysv/linux/alpha/oldglob.c @@ -44,7 +44,7 @@ typedef struct int __old_glob (const char *pattern, int flags, - int (*errfunc) __P ((const char *, int)), + int (*errfunc) (const char *, int), old_glob_t *pglob) { glob_t correct; From 6d5a02529ded7342f05a01d360e03e3ab7613f99 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 31 May 2000 12:00:45 +0000 Subject: [PATCH 2126/4487] * sysdeps/unix/sysv/linux/mips/ftruncate64.c: Fix prototype of syscall. * sysdeps/unix/sysv/linux/mips/truncate64.c: Likewise. --- sysdeps/unix/sysv/linux/mips/ftruncate64.c | 3 ++- sysdeps/unix/sysv/linux/mips/truncate64.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/ftruncate64.c b/sysdeps/unix/sysv/linux/mips/ftruncate64.c index 66c6548ee8..768946e9fa 100644 --- a/sysdeps/unix/sysv/linux/mips/ftruncate64.c +++ b/sysdeps/unix/sysv/linux/mips/ftruncate64.c @@ -33,7 +33,8 @@ extern int __have_no_truncate64; #endif /* The order of hight, low depends on endianness. */ -extern int __syscall_ftruncate64 (int fd, int high_length, int low_length); +extern int __syscall_ftruncate64 (int fd, int dummy, int high_length, + int low_length); /* Truncate the file FD refers to to LENGTH bytes. */ diff --git a/sysdeps/unix/sysv/linux/mips/truncate64.c b/sysdeps/unix/sysv/linux/mips/truncate64.c index 08d9667612..bcdb9ddf98 100644 --- a/sysdeps/unix/sysv/linux/mips/truncate64.c +++ b/sysdeps/unix/sysv/linux/mips/truncate64.c @@ -33,7 +33,8 @@ int __have_no_truncate64; #endif /* The order of hight, low depends on endianness. */ -extern int __syscall_truncate64 (const char *path, int high_length, int low_length); +extern int __syscall_truncate64 (const char *path, int dummy, + int high_length, int low_length); /* Truncate the file FD refers to to LENGTH bytes. */ From ba747ea1614fa4309648c42477acf5629a2263d3 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 31 May 2000 12:03:35 +0000 Subject: [PATCH 2127/4487] * sysdeps/unix/sysv/linux/mips/sys/ucontext.h: Use array for gregset_t. * sysdeps/unix/sysv/linux/mips/Versions: Export _flush_cache. --- sysdeps/unix/sysv/linux/mips/Versions | 3 +++ sysdeps/unix/sysv/linux/mips/sys/ucontext.h | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/Versions b/sysdeps/unix/sysv/linux/mips/Versions index 11614a4cd5..519295ffa2 100644 --- a/sysdeps/unix/sysv/linux/mips/Versions +++ b/sysdeps/unix/sysv/linux/mips/Versions @@ -1,5 +1,8 @@ libc { GLIBC_2.0 { + # Needed by gcc: + _flush_cache; + # c* cachectl; cacheflush; diff --git a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h index e9a4fbc366..84c6d02297 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h @@ -37,13 +37,15 @@ typedef unsigned long int greg_t; #define NFPREG 33 /* Container for all general registers. */ +typedef greg_t gregset_t[NGREG]; +/* gregset_t must be an array. The array correspondends to: typedef struct gregset { greg_t g_regs[32]; greg_t g_hi; greg_t g_lo; greg_t g_pad[3]; } gregset_t; - +*/ /* Container for all FPU registers. */ typedef struct fpregset { union { @@ -57,6 +59,7 @@ typedef struct fpregset { unsigned int fp_pad; } fpregset_t; + /* Context to describe whole processor state. */ typedef struct { From c3b737cb0d63c4b4f0e3fc22219d771c3e6f08da Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 2 Jun 2000 13:10:38 +0000 Subject: [PATCH 2128/4487] * sysdeps/unix/sysv/linux/mips/sys/ucontext.h: Fix typo. Reported by Maciej W. Rozycki . --- sysdeps/unix/sysv/linux/mips/sys/ucontext.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h index 84c6d02297..b015898c2d 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h @@ -37,15 +37,15 @@ typedef unsigned long int greg_t; #define NFPREG 33 /* Container for all general registers. */ -typedef greg_t gregset_t[NGREG]; -/* gregset_t must be an array. The array correspondends to: +/* gregset_t must be an array. The below declared array corresponds to: typedef struct gregset { greg_t g_regs[32]; greg_t g_hi; greg_t g_lo; greg_t g_pad[3]; -} gregset_t; -*/ +} gregset_t; */ +typedef greg_t gregset_t[NGREG]; + /* Container for all FPU registers. */ typedef struct fpregset { union { From eb29107be81b4fe8c2126a00833e55bb07d024cd Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 4 Jun 2000 16:10:51 +0000 Subject: [PATCH 2129/4487] Add __THROW to all inlines to match prototypes in mathcalls.h. --- sysdeps/alpha/fpu/bits/mathinline.h | 30 ++++++++++++------------- sysdeps/m68k/fpu/bits/mathinline.h | 34 ++++++++++++++--------------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h index 87765d2389..c0911ecb71 100644 --- a/sysdeps/alpha/fpu/bits/mathinline.h +++ b/sysdeps/alpha/fpu/bits/mathinline.h @@ -1,5 +1,5 @@ /* Inline math functions for Alpha. - Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger-Tang. @@ -60,7 +60,7 @@ #define __inline_copysign(NAME, TYPE) \ __MATH_INLINE TYPE \ -NAME (TYPE __x, TYPE __y) \ +NAME (TYPE __x, TYPE __y) __THROW \ { \ TYPE __z; \ __asm ("cpys %1, %2, %0" : "=f" (__z) : "f" (__y), "f" (__x)); \ @@ -76,14 +76,14 @@ __inline_copysign(copysign, double) #if __GNUC_PREREQ (2, 8) -__MATH_INLINE float __fabsf (float __x) { return __builtin_fabsf (__x); } -__MATH_INLINE float fabsf (float __x) { return __builtin_fabsf (__x); } -__MATH_INLINE double __fabs (double __x) { return __builtin_fabs (__x); } -__MATH_INLINE double fabs (double __x) { return __builtin_fabs (__x); } +__MATH_INLINE float __fabsf (float __x) __THROW { return __builtin_fabsf (__x); } +__MATH_INLINE float fabsf (float __x) __THROW { return __builtin_fabsf (__x); } +__MATH_INLINE double __fabs (double __x) __THROW { return __builtin_fabs (__x); } +__MATH_INLINE double fabs (double __x) __THROW { return __builtin_fabs (__x); } #else #define __inline_fabs(NAME, TYPE) \ __MATH_INLINE TYPE \ -NAME (TYPE __x) \ +NAME (TYPE __x) __THROW \ { \ TYPE __z; \ __asm ("cpys $f31, %1, %0" : "=f" (__z) : "f" (__x)); \ @@ -104,7 +104,7 @@ __inline_fabs(fabs, double) must be integral, as this avoids unpleasant integer overflows. */ __MATH_INLINE float -__floorf (float __x) +__floorf (float __x) __THROW { /* Check not zero since floor(-0) == -0. */ if (__x != 0 && fabsf (__x) < 16777216.0f) /* 1 << FLT_MANT_DIG */ @@ -130,7 +130,7 @@ __floorf (float __x) } __MATH_INLINE double -__floor (double __x) +__floor (double __x) __THROW { if (__x != 0 && fabs (__x) < 9007199254740992.0) /* 1 << DBL_MANT_DIG */ { @@ -148,26 +148,26 @@ __floor (double __x) return __x; } -__MATH_INLINE float floorf (float __x) { return __floorf(__x); } -__MATH_INLINE double floor (double __x) { return __floor(__x); } +__MATH_INLINE float floorf (float __x) __THROW { return __floorf(__x); } +__MATH_INLINE double floor (double __x) __THROW { return __floor(__x); } -__MATH_INLINE float __fdimf (float __x, float __y) +__MATH_INLINE float __fdimf (float __x, float __y) __THROW { return __x < __y ? 0.0f : __x - __y; } -__MATH_INLINE float fdimf (float __x, float __y) +__MATH_INLINE float fdimf (float __x, float __y) __THROW { return __x < __y ? 0.0f : __x - __y; } -__MATH_INLINE double __fdim (double __x, double __y) +__MATH_INLINE double __fdim (double __x, double __y) __THROW { return __x < __y ? 0.0 : __x - __y; } -__MATH_INLINE double fdim (double __x, double __y) +__MATH_INLINE double fdim (double __x, double __y) __THROW { return __x < __y ? 0.0 : __x - __y; } diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/fpu/bits/mathinline.h index 9dad4c69cc..82446d27d9 100644 --- a/sysdeps/m68k/fpu/bits/mathinline.h +++ b/sysdeps/m68k/fpu/bits/mathinline.h @@ -1,5 +1,5 @@ /* Definitions of inline math functions implemented by the m68881/2. - Copyright (C) 1991,92,93,94,96,97,98,99 Free Software Foundation, Inc. + Copyright (C) 1991,92,93,94,96,97,98,99,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 @@ -109,7 +109,7 @@ #endif #define __inline_mathop1(float_type,func, op) \ - __m81_defun (float_type, func, (float_type __mathop_x)) \ + __m81_defun (float_type, func, (float_type __mathop_x)) __THROW \ { \ float_type __result; \ __asm("f" __STRING(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x));\ @@ -169,7 +169,7 @@ __inline_mathop(trunc, intrz) #define __inline_functions(float_type, s) \ __m81_inline float_type \ -__m81_u(__CONCAT(__frexp,s))(float_type __value, int *__expptr) \ +__m81_u(__CONCAT(__frexp,s))(float_type __value, int *__expptr) __THROW \ { \ float_type __mantissa, __exponent; \ int __iexponent; \ @@ -190,7 +190,7 @@ __m81_u(__CONCAT(__frexp,s))(float_type __value, int *__expptr) \ return __mantissa; \ } \ \ -__m81_defun (float_type, __CONCAT(__floor,s), (float_type __x)) \ +__m81_defun (float_type, __CONCAT(__floor,s), (float_type __x)) __THROW \ { \ float_type __result; \ unsigned long int __ctrl_reg; \ @@ -206,7 +206,7 @@ __m81_defun (float_type, __CONCAT(__floor,s), (float_type __x)) \ return __result; \ } \ \ -__m81_defun (float_type, __CONCAT(__ceil,s), (float_type __x)) \ +__m81_defun (float_type, __CONCAT(__ceil,s), (float_type __x)) __THROW \ { \ float_type __result; \ unsigned long int __ctrl_reg; \ @@ -232,7 +232,7 @@ __inline_functions(long double,l) #ifdef __USE_MISC # define __inline_functions(float_type, s) \ -__m81_defun (int, __CONCAT(__isinf,s), (float_type __value)) \ +__m81_defun (int, __CONCAT(__isinf,s), (float_type __value)) __THROW \ { \ /* There is no branch-condition for infinity, \ so we must extract and examine the condition codes manually. */ \ @@ -242,7 +242,7 @@ __m81_defun (int, __CONCAT(__isinf,s), (float_type __value)) \ return (__fpsr & (2 << 24)) ? (__fpsr & (8 << 24) ? -1 : 1) : 0; \ } \ \ -__m81_defun (int, __CONCAT(__finite,s), (float_type __value)) \ +__m81_defun (int, __CONCAT(__finite,s), (float_type __value)) __THROW \ { \ /* There is no branch-condition for infinity, so we must extract and \ examine the condition codes manually. */ \ @@ -253,7 +253,7 @@ __m81_defun (int, __CONCAT(__finite,s), (float_type __value)) \ } \ \ __m81_defun (float_type, __CONCAT(__scalbn,s), \ - (float_type __x, int __n)) \ + (float_type __x, int __n)) __THROW \ { \ float_type __result; \ __asm ("fscale%.l %1, %0" : "=f" (__result) : "dmi" (__n), "0" (__x)); \ @@ -270,7 +270,7 @@ __inline_functions(long double,l) #if defined __USE_MISC || defined __USE_XOPEN # define __inline_functions(float_type, s) \ -__m81_defun (int, __CONCAT(__isnan,s), (float_type __value)) \ +__m81_defun (int, __CONCAT(__isnan,s), (float_type __value)) __THROW \ { \ char __result; \ __asm("ftst%.x %1\n" \ @@ -290,7 +290,7 @@ __inline_functions(long double,l) #ifdef __USE_ISOC99 # define __inline_functions(float_type, s) \ -__m81_defun (int, __CONCAT(__signbit,s), (float_type __value)) \ +__m81_defun (int, __CONCAT(__signbit,s), (float_type __value)) __THROW \ { \ /* There is no branch-condition for the sign bit, so we must extract \ and examine the condition codes manually. */ \ @@ -301,12 +301,12 @@ __m81_defun (int, __CONCAT(__signbit,s), (float_type __value)) \ } \ \ __m81_defun (float_type, __CONCAT(__scalbln,s), \ - (float_type __x, long int __n)) \ + (float_type __x, long int __n)) __THROW \ { \ return __CONCAT(__scalbn,s) (__x, __n); \ } \ \ -__m81_defun (float_type, __CONCAT(__nearbyint,s), (float_type __x)) \ +__m81_defun (float_type, __CONCAT(__nearbyint,s), (float_type __x)) __THROW \ { \ float_type __result; \ unsigned long int __ctrl_reg; \ @@ -320,7 +320,7 @@ __m81_defun (float_type, __CONCAT(__nearbyint,s), (float_type __x)) \ return __result; \ } \ \ -__m81_defun (long int, __CONCAT(__lrint,s), (float_type __x)) \ +__m81_defun (long int, __CONCAT(__lrint,s), (float_type __x)) __THROW \ { \ long int __result; \ __asm ("fmove%.l %1, %0" : "=dm" (__result) : "f" (__x)); \ @@ -329,7 +329,7 @@ __m81_defun (long int, __CONCAT(__lrint,s), (float_type __x)) \ \ __m81_inline float_type \ __m81_u(__CONCAT(__fma,s))(float_type __x, float_type __y, \ - float_type __z) \ + float_type __z) __THROW \ { \ return (__x * __y) + __z; \ } @@ -346,7 +346,7 @@ __inline_functions (long double,l) # define __inline_functions(float_type, s) \ __m81_inline void \ __m81_u(__CONCAT(__sincos,s))(float_type __x, float_type *__sinx, \ - float_type *__cosx) \ + float_type *__cosx) __THROW \ { \ __asm ("fsincos%.x %2,%1:%0" \ : "=f" (*__sinx), "=f" (*__cosx) : "f" (__x)); \ @@ -367,13 +367,13 @@ __inline_functions (long double,l) NAME, to make token pasting work correctly with -traditional. */ # define __inline_forward_c(rettype, name, args1, args2) \ extern __inline rettype __attribute__((__const__)) \ -name args1 \ +name args1 __THROW \ { \ return __CONCAT(__,name) args2; \ } # define __inline_forward(rettype, name, args1, args2) \ -extern __inline rettype name args1 \ +extern __inline rettype name args1 __THROW \ { \ return __CONCAT(__,name) args2; \ } From fa39016a273e4dc5f0202d430ee4b5b50a8cc077 Mon Sep 17 00:00:00 2001 From: Greg McGary Date: Wed, 7 Jun 2000 00:30:05 +0000 Subject: [PATCH 2130/4487] * sysdeps/mips/elf/start.S: Trim redundant code. --- sysdeps/mips/elf/start.S | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/sysdeps/mips/elf/start.S b/sysdeps/mips/elf/start.S index 064fe7e6f4..f2df8a5676 100644 --- a/sysdeps/mips/elf/start.S +++ b/sysdeps/mips/elf/start.S @@ -73,16 +73,8 @@ ENTRY_POINT: move $31, $0 #if (__mips64) - dla $4, main /* main */ - lw $5, 0($29) /* argc */ - addu $6, $29, 4 /* argv */ - /* Allocate space on the stack for seven arguments and make sure - the stack is aligned to double words (8 bytes). */ - and $29, 0xfffffff8 - subu $29, 32 - dla $7, _init /* init */ - dla $8, _fini -#else +# define la dla +#endif la $4, main /* main */ lw $5, 0($29) /* argc */ addu $6, $29, 4 /* argv */ @@ -92,7 +84,6 @@ ENTRY_POINT: subu $29, 32 la $7, _init /* init */ la $8, _fini -#endif sw $8, 16($29) /* fini */ sw $2, 20($29) /* rtld_fini */ sw $29, 24($29) /* stack_end */ From d3d5b656c5a04d4f539c1c03e58ef86b94849d1e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 7 Jun 2000 16:53:09 +0000 Subject: [PATCH 2131/4487] (__fdimf): Only declare if __USE_ISOC99. (fdimf, __fdim, fdim): Likewise. --- sysdeps/alpha/fpu/bits/mathinline.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h index c0911ecb71..065009c626 100644 --- a/sysdeps/alpha/fpu/bits/mathinline.h +++ b/sysdeps/alpha/fpu/bits/mathinline.h @@ -152,6 +152,8 @@ __MATH_INLINE float floorf (float __x) __THROW { return __floorf(__x); } __MATH_INLINE double floor (double __x) __THROW { return __floor(__x); } +#ifdef __USE_ISOC99 + __MATH_INLINE float __fdimf (float __x, float __y) __THROW { return __x < __y ? 0.0f : __x - __y; @@ -171,3 +173,5 @@ __MATH_INLINE double fdim (double __x, double __y) __THROW { return __x < __y ? 0.0 : __x - __y; } + +#endif From 959c224a4a030269347bec6af21e2455cd92a727 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 8 Jun 2000 04:48:05 +0000 Subject: [PATCH 2132/4487] DT_THISPROCNUM definition for MIPS. --- sysdeps/mips/dl-dtprocnum.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 sysdeps/mips/dl-dtprocnum.h diff --git a/sysdeps/mips/dl-dtprocnum.h b/sysdeps/mips/dl-dtprocnum.h new file mode 100644 index 0000000000..bff02c8412 --- /dev/null +++ b/sysdeps/mips/dl-dtprocnum.h @@ -0,0 +1,22 @@ +/* Configuration of lookup functions. MIPS version. + Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* Number of extra dynamic section entries for this architecture. By + default there are none. */ +#define DT_THISPROCNUM DT_MIPS_NUM From 66268e64b98e7d2a51ba76bb226e444f39eee972 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 13 Jun 2000 14:33:22 +0000 Subject: [PATCH 2133/4487] * sysdeps/mips/elf/start.S (ENTRY_POINT): Remove mips64 defines. Patch by Ralf Baechle . --- sysdeps/mips/elf/start.S | 3 --- 1 file changed, 3 deletions(-) diff --git a/sysdeps/mips/elf/start.S b/sysdeps/mips/elf/start.S index f2df8a5676..ad7976e70d 100644 --- a/sysdeps/mips/elf/start.S +++ b/sysdeps/mips/elf/start.S @@ -72,9 +72,6 @@ ENTRY_POINT: #endif move $31, $0 -#if (__mips64) -# define la dla -#endif la $4, main /* main */ lw $5, 0($29) /* argc */ addu $6, $29, 4 /* argv */ From 91931049ec36214b26fa80a4e71325f50ab27d96 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 14 Jun 2000 00:32:09 +0000 Subject: [PATCH 2134/4487] Add oldgetrlimit64.c. --- sysdeps/unix/sysv/linux/arm/Dist | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/arm/Dist b/sysdeps/unix/sysv/linux/arm/Dist index 49bdaf3636..60513f7c46 100644 --- a/sysdeps/unix/sysv/linux/arm/Dist +++ b/sysdeps/unix/sysv/linux/arm/Dist @@ -10,3 +10,4 @@ sys/elf.h sys/io.h sys/procfs.h sys/user.h +oldgetrlimit64.c From a759aecd6b274b8832ee49cbe4c62165116f567d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 14 Jun 2000 00:44:54 +0000 Subject: [PATCH 2135/4487] Additional files to distribute for AIX. --- sysdeps/unix/sysv/aix/Dist | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/Dist diff --git a/sysdeps/unix/sysv/aix/Dist b/sysdeps/unix/sysv/aix/Dist new file mode 100644 index 0000000000..9db1d7446d --- /dev/null +++ b/sysdeps/unix/sysv/aix/Dist @@ -0,0 +1,6 @@ +dl-sym.c +dl-open.c +dl-close.c +kernel_proto.h +bits/utmpx.h +gnu/lib-names.h From 49e1806ccb8e5dc0bdf9a1dedbd3f3f42a7cfe67 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 14 Jun 2000 13:13:58 +0000 Subject: [PATCH 2136/4487] * sysdeps/mips/dl-machine.h: Pass finalizer correctly to user entry point. Reported by Jim Pick . --- sysdeps/mips/dl-machine.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index a67eface5b..322add2e08 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -400,15 +400,10 @@ _dl_start_user:\n\ # Call the function to run the initializers.\n\ jal _dl_init addiu $29, 16\n\ - # Pass our finalizer function to the user in ra.\n\ - la $31, _dl_fini\n\ + # Pass our finalizer function to the user in $2 as per ELF ABI.\n\ + la $2, _dl_fini\n\ # Jump to the user entry point.\n\ - move $25, $17\n\ - lw $4, 0($29)\n\ - lw $5, 4($29)\n\ - lw $6, 8($29)\n\ - lw $7, 12($29)\n\ - jr $25\n"\ + jr $17\n"\ _RTLD_EPILOGUE(ENTRY_POINT)\ "\n.previous"\ ); From 91f51e028bf1185317705bb4e3968c504ac61af4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 15 Jun 2000 06:59:07 +0000 Subject: [PATCH 2137/4487] Add libgcc frame handling functions here. --- sysdeps/unix/sysv/linux/alpha/Versions | 5 +++++ sysdeps/unix/sysv/linux/arm/Versions | 6 ++++++ sysdeps/unix/sysv/linux/m68k/Versions | 5 +++++ 3 files changed, 16 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/Versions b/sysdeps/unix/sysv/linux/alpha/Versions index 7eee0f76fa..ac21c9f038 100644 --- a/sysdeps/unix/sysv/linux/alpha/Versions +++ b/sysdeps/unix/sysv/linux/alpha/Versions @@ -4,6 +4,11 @@ libc { _inb; _inw; _inl; _outb; _outw; _outl; _bus_base; _bus_base_sparse; _hae_shift; + # Exception handling support functions from libgcc + __register_frame; __register_frame_table; __deregister_frame; + __register_frame_info; __deregister_frame_info; __frame_state_for; + __register_frame_info_table; + # b* bus_base; bus_base_sparse; diff --git a/sysdeps/unix/sysv/linux/arm/Versions b/sysdeps/unix/sysv/linux/arm/Versions index 7e71a8604d..4ac5b58a9b 100644 --- a/sysdeps/unix/sysv/linux/arm/Versions +++ b/sysdeps/unix/sysv/linux/arm/Versions @@ -1,4 +1,10 @@ libc { + GLIBC_2.0 { + # Exception handling support functions from libgcc + __register_frame; __register_frame_table; __deregister_frame; + __register_frame_info; __deregister_frame_info; __frame_state_for; + __register_frame_info_table; + } GLIBC_2.1 { ioperm; iopl; inb; inw; inl; diff --git a/sysdeps/unix/sysv/linux/m68k/Versions b/sysdeps/unix/sysv/linux/m68k/Versions index d996b2478e..b70d1d1c45 100644 --- a/sysdeps/unix/sysv/linux/m68k/Versions +++ b/sysdeps/unix/sysv/linux/m68k/Versions @@ -1,5 +1,10 @@ libc { GLIBC_2.0 { + # Exception handling support functions from libgcc + __register_frame; __register_frame_table; __deregister_frame; + __register_frame_info; __deregister_frame_info; __frame_state_for; + __register_frame_info_table; + # c* cacheflush; } From 821954bf6cb8216551aa2e249f61d0e6ad26151a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 18 Jun 2000 05:19:19 +0000 Subject: [PATCH 2138/4487] Define LINK_MAX. --- sysdeps/unix/sysv/linux/alpha/pathconf.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/pathconf.c b/sysdeps/unix/sysv/linux/alpha/pathconf.c index 24d6880523..df5d72ab5e 100644 --- a/sysdeps/unix/sysv/linux/alpha/pathconf.c +++ b/sysdeps/unix/sysv/linux/alpha/pathconf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1995, 1996, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1995, 1996, 1998, 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 @@ -25,6 +25,10 @@ #include + +/* The Linux kernel header mentioned this as a kind of generic value. */ +#define LINUX_LINK_MAX 127 + static long int default_pathconf (const char *path, int name); /* Get file-specific information about PATH. */ From 0d1cec93d5578d41e851de82eba97a48740281f1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 18 Jun 2000 05:21:59 +0000 Subject: [PATCH 2139/4487] Define LINUX_LINK_MAX. --- sysdeps/unix/sysv/linux/alpha/fpathconf.c | 10 +++++++--- sysdeps/unix/sysv/linux/alpha/pathconf.c | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/fpathconf.c b/sysdeps/unix/sysv/linux/alpha/fpathconf.c index b822daaf39..235c02c8f8 100644 --- a/sysdeps/unix/sysv/linux/alpha/fpathconf.c +++ b/sysdeps/unix/sysv/linux/alpha/fpathconf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1995, 1996, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1995, 1996, 1998, 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 @@ -24,6 +24,10 @@ #include + +/* The Linux kernel header mentioned this as a kind of generic value. */ +#define LINUX_LINK_MAX 127 + static long int default_fpathconf (int fd, int name); /* Get file-specific information about descriptor FD. */ @@ -60,7 +64,7 @@ __fpathconf (fd, name) /* Determine the filesystem type. */ if (__fstatfs (fd, &fsbuf) < 0) /* not possible, return the default value. */ - return LINK_MAX; + return LINUX_LINK_MAX; switch (fsbuf.f_type) { @@ -90,7 +94,7 @@ __fpathconf (fd, name) return UFS_LINK_MAX; default: - return LINK_MAX; + return LINUX_LINK_MAX; } } diff --git a/sysdeps/unix/sysv/linux/alpha/pathconf.c b/sysdeps/unix/sysv/linux/alpha/pathconf.c index df5d72ab5e..be5e938783 100644 --- a/sysdeps/unix/sysv/linux/alpha/pathconf.c +++ b/sysdeps/unix/sysv/linux/alpha/pathconf.c @@ -57,7 +57,7 @@ __pathconf (const char *path, int name) /* Determine the filesystem type. */ if (__statfs (path, &fsbuf) < 0) /* not possible, return the default value. */ - return LINK_MAX; + return LINUX_LINK_MAX; switch (fsbuf.f_type) { @@ -87,7 +87,7 @@ __pathconf (const char *path, int name) return UFS_LINK_MAX; default: - return LINK_MAX; + return LINUX_LINK_MAX; } } From feaff189768381cd8703665cd22411f6ba90bf2b Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sun, 18 Jun 2000 17:20:01 +0000 Subject: [PATCH 2140/4487] * sysdeps/mips/dl-machine.h: Always use $25 as jump register. Patch by Ralf Baechle . --- sysdeps/mips/dl-machine.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 322add2e08..f08afa9c7f 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -403,7 +403,8 @@ _dl_start_user:\n\ # Pass our finalizer function to the user in $2 as per ELF ABI.\n\ la $2, _dl_fini\n\ # Jump to the user entry point.\n\ - jr $17\n"\ + move $25, $17\n\ + jr $25\n"\ _RTLD_EPILOGUE(ENTRY_POINT)\ "\n.previous"\ ); From 3f56045a39c8cef606000cfc98c70ae4b94035f7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 20 Jun 2000 06:29:15 +0000 Subject: [PATCH 2141/4487] Renamed to memusage.h. --- sysdeps/alpha/memprof.h | 21 --------------------- sysdeps/arm/memprof.h | 21 --------------------- sysdeps/m68k/memprof.h | 22 ---------------------- sysdeps/mips/memprof.h | 21 --------------------- 4 files changed, 85 deletions(-) delete mode 100644 sysdeps/alpha/memprof.h delete mode 100644 sysdeps/arm/memprof.h delete mode 100644 sysdeps/m68k/memprof.h delete mode 100644 sysdeps/mips/memprof.h diff --git a/sysdeps/alpha/memprof.h b/sysdeps/alpha/memprof.h deleted file mode 100644 index 462b5ce1c2..0000000000 --- a/sysdeps/alpha/memprof.h +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (C) 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 - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#define GETSP() ({ register uintptr_t stack_ptr asm ("$30"); stack_ptr; }) - -#include diff --git a/sysdeps/arm/memprof.h b/sysdeps/arm/memprof.h deleted file mode 100644 index 4e5081c167..0000000000 --- a/sysdeps/arm/memprof.h +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (C) 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 - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#define GETSP() ({ register uintptr_t stack_ptr asm ("sp"); stack_ptr; }) - -#include diff --git a/sysdeps/m68k/memprof.h b/sysdeps/m68k/memprof.h deleted file mode 100644 index 5fd1cf4282..0000000000 --- a/sysdeps/m68k/memprof.h +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright (C) 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 - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - -#define GETSP() ({ register uintptr_t stack_ptr asm ("%sp"); stack_ptr; }) - -#include diff --git a/sysdeps/mips/memprof.h b/sysdeps/mips/memprof.h deleted file mode 100644 index 93f2917d8c..0000000000 --- a/sysdeps/mips/memprof.h +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (C) 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 - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#define GETSP() ({ register uintptr_t stack_ptr asm ("$29"); stack_ptr; }) - -#include From 949eb60694c7e044852603705b56af6d83884a10 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 20 Jun 2000 06:29:45 +0000 Subject: [PATCH 2142/4487] Macro to allow memory usage tracking. --- sysdeps/alpha/memusage.h | 21 +++++++++++++++++++++ sysdeps/arm/memusage.h | 21 +++++++++++++++++++++ sysdeps/m68k/memusage.h | 22 ++++++++++++++++++++++ sysdeps/mips/memusage.h | 21 +++++++++++++++++++++ 4 files changed, 85 insertions(+) create mode 100644 sysdeps/alpha/memusage.h create mode 100644 sysdeps/arm/memusage.h create mode 100644 sysdeps/m68k/memusage.h create mode 100644 sysdeps/mips/memusage.h diff --git a/sysdeps/alpha/memusage.h b/sysdeps/alpha/memusage.h new file mode 100644 index 0000000000..462b5ce1c2 --- /dev/null +++ b/sysdeps/alpha/memusage.h @@ -0,0 +1,21 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#define GETSP() ({ register uintptr_t stack_ptr asm ("$30"); stack_ptr; }) + +#include diff --git a/sysdeps/arm/memusage.h b/sysdeps/arm/memusage.h new file mode 100644 index 0000000000..4e5081c167 --- /dev/null +++ b/sysdeps/arm/memusage.h @@ -0,0 +1,21 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#define GETSP() ({ register uintptr_t stack_ptr asm ("sp"); stack_ptr; }) + +#include diff --git a/sysdeps/m68k/memusage.h b/sysdeps/m68k/memusage.h new file mode 100644 index 0000000000..5fd1cf4282 --- /dev/null +++ b/sysdeps/m68k/memusage.h @@ -0,0 +1,22 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + +#define GETSP() ({ register uintptr_t stack_ptr asm ("%sp"); stack_ptr; }) + +#include diff --git a/sysdeps/mips/memusage.h b/sysdeps/mips/memusage.h new file mode 100644 index 0000000000..93f2917d8c --- /dev/null +++ b/sysdeps/mips/memusage.h @@ -0,0 +1,21 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#define GETSP() ({ register uintptr_t stack_ptr asm ("$29"); stack_ptr; }) + +#include From c92d72a8fef237d5383b4866c31cab45d28547f7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 20 Jun 2000 06:33:57 +0000 Subject: [PATCH 2143/4487] Include . --- sysdeps/alpha/memusage.h | 2 +- sysdeps/arm/memusage.h | 2 +- sysdeps/m68k/memusage.h | 2 +- sysdeps/mips/memusage.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/alpha/memusage.h b/sysdeps/alpha/memusage.h index 462b5ce1c2..4b8f455601 100644 --- a/sysdeps/alpha/memusage.h +++ b/sysdeps/alpha/memusage.h @@ -18,4 +18,4 @@ #define GETSP() ({ register uintptr_t stack_ptr asm ("$30"); stack_ptr; }) -#include +#include diff --git a/sysdeps/arm/memusage.h b/sysdeps/arm/memusage.h index 4e5081c167..86ab085ef2 100644 --- a/sysdeps/arm/memusage.h +++ b/sysdeps/arm/memusage.h @@ -18,4 +18,4 @@ #define GETSP() ({ register uintptr_t stack_ptr asm ("sp"); stack_ptr; }) -#include +#include diff --git a/sysdeps/m68k/memusage.h b/sysdeps/m68k/memusage.h index 5fd1cf4282..72138e2180 100644 --- a/sysdeps/m68k/memusage.h +++ b/sysdeps/m68k/memusage.h @@ -19,4 +19,4 @@ #define GETSP() ({ register uintptr_t stack_ptr asm ("%sp"); stack_ptr; }) -#include +#include diff --git a/sysdeps/mips/memusage.h b/sysdeps/mips/memusage.h index 93f2917d8c..8e421e4c24 100644 --- a/sysdeps/mips/memusage.h +++ b/sysdeps/mips/memusage.h @@ -18,4 +18,4 @@ #define GETSP() ({ register uintptr_t stack_ptr asm ("$29"); stack_ptr; }) -#include +#include From d9560fca3ddbd41b4dd8d048af58903f861055ad Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 20 Jun 2000 13:05:21 +0000 Subject: [PATCH 2144/4487] * sysdeps/mips/fpu/fesetenv.c (__fesetenv): Flush fpu pipeline first. * sysdeps/mips/fpu/feholdexcpt.c: New file. * sysdeps/mips/fpu/fraiseexcpt.c: New file. --- sysdeps/mips/fpu/feholdexcpt.c | 38 ++++++++++++++++++++++++++++ sysdeps/mips/fpu/fesetenv.c | 6 +++++ sysdeps/mips/fpu/fraiseexcpt.c | 46 ++++++++++++++++++++++++++++++++++ 3 files changed, 90 insertions(+) create mode 100644 sysdeps/mips/fpu/feholdexcpt.c create mode 100644 sysdeps/mips/fpu/fraiseexcpt.c diff --git a/sysdeps/mips/fpu/feholdexcpt.c b/sysdeps/mips/fpu/feholdexcpt.c new file mode 100644 index 0000000000..ab92a71e0d --- /dev/null +++ b/sysdeps/mips/fpu/feholdexcpt.c @@ -0,0 +1,38 @@ +/* Store current floating-point environment and clear exceptions. + Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Jaeger , 2000. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +int +feholdexcept (fenv_t *envp) +{ + fpu_control_t cw; + + /* Save the current state. */ + _FPU_GETCW (cw); + envp->__fp_control_register = cw; + + /* Clear all exception enable bits and flags. */ + cw &= ~(_FPU_MASK_V|_FPU_MASK_Z|_FPU_MASK_O|_FPU_MASK_U|_FPU_MASK_I|FE_ALL_EXCEPT); + _FPU_SETCW (cw); + + return 0; +} diff --git a/sysdeps/mips/fpu/fesetenv.c b/sysdeps/mips/fpu/fesetenv.c index 7ae688a6b1..ab90e4d022 100644 --- a/sysdeps/mips/fpu/fesetenv.c +++ b/sysdeps/mips/fpu/fesetenv.c @@ -25,6 +25,11 @@ int __fesetenv (const fenv_t *envp) { + fpu_control_t cw; + + /* Read first current state to flush fpu pipeline. */ + _FPU_GETCW (cw); + if (envp == FE_DFL_ENV) _FPU_SETCW (_FPU_DEFAULT); else @@ -33,6 +38,7 @@ __fesetenv (const fenv_t *envp) /* Success. */ return 0; } + #if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__fesetenv, __old_fesetenv) compat_symbol (libm, __old_fesetenv, fesetenv, GLIBC_2_1); diff --git a/sysdeps/mips/fpu/fraiseexcpt.c b/sysdeps/mips/fpu/fraiseexcpt.c new file mode 100644 index 0000000000..25c09e3912 --- /dev/null +++ b/sysdeps/mips/fpu/fraiseexcpt.c @@ -0,0 +1,46 @@ +/* Raise given exceptions. + Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Jaeger , 2000. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include + +int +__feraiseexcept (int excepts) +{ + fpu_control_t cw; + + /* Get current state. */ + _FPU_GETCW (cw); + + /* Set exceptions bits. */ + cw |= (excepts & FE_ALL_EXCEPT); + + /* Set new state. */ + _FPU_SETCW (cw); + + return 0; +} + +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) +strong_alias (__feraiseexcept, __old_feraiseexcept) +compat_symbol (libm, __old_feraiseexcept, feraiseexcept, GLIBC_2_1); +#endif +versioned_symbol (libm, __feraiseexcept, feraiseexcept, GLIBC_2_2); From 0a725b6114a77a1f36cd7ae2ddd129aebd5bddd0 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 20 Jun 2000 14:16:21 +0000 Subject: [PATCH 2145/4487] Deltas for math test suite on MIPS --- sysdeps/mips/fpu/libm-test-ulps | 1079 +++++++++++++++++++++++++++++++ 1 file changed, 1079 insertions(+) create mode 100644 sysdeps/mips/fpu/libm-test-ulps diff --git a/sysdeps/mips/fpu/libm-test-ulps b/sysdeps/mips/fpu/libm-test-ulps new file mode 100644 index 0000000000..515d07169c --- /dev/null +++ b/sysdeps/mips/fpu/libm-test-ulps @@ -0,0 +1,1079 @@ +# Begin of automatic generation + +# asin +Test "asin (-0.5) == -pi/6": +float: 2 +ifloat: 2 +Test "asin (0.5) == pi/6": +float: 2 +ifloat: 2 +Test "asin (0.7) == 0.7753974966107530637": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +# atanh +Test "atanh (0.7) == 0.8673005276940531944": +double: 1 +idouble: 1 + +# cabs +Test "cabs (-0.7 + 12.4 i) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "cabs (-0.7 - 12.4 i) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "cabs (-12.4 + 0.7 i) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "cabs (-12.4 - 0.7 i) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508": +double: 1 +idouble: 1 +Test "cabs (0.7 + 12.4 i) == 12.41974234837422060118": +float: 1 +ifloat: 1 + +# cacos +Test "Real part of: cacos (0.7 + 1.2 i) == 1.1351827477151551089 - 1.0927647857577371459 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: cacos (0.7 + 1.2 i) == 1.1351827477151551089 - 1.0927647857577371459 i": +float: 1 +ifloat: 1 + +# cacosh +Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323 + 2.1414491111159960199 i": +double: 1 +float: 7 +idouble: 1 +ifloat: 7 +Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323 + 2.1414491111159960199 i": +double: 1 +float: 3 +idouble: 1 +ifloat: 3 +Test "Real part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459 + 1.1351827477151551089 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# casin +Test "Real part of: casin (0.7 + 1.2 i) == 0.4356135790797415103 + 1.0927647857577371459 i": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 +Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103 + 1.0927647857577371459 i": +float: 1 +ifloat: 1 + +# casinh +Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917 - 0.9646585044076027920 i": +double: 5 +float: 1 +idouble: 5 +ifloat: 1 +Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917 - 0.9646585044076027920 i": +double: 3 +float: 6 +idouble: 3 +ifloat: 6 +Test "Real part of: casinh (0.7 + 1.2 i) == 0.9786545955936738768 + 0.9113541895315601156 i": +double: 1 +idouble: 1 +Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.9786545955936738768 + 0.9113541895315601156 i": +float: 1 +ifloat: 1 + +# catan +Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225 - 0.2290726829685387662 i": +float: 3 +ifloat: 3 +Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225 - 0.2290726829685387662 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: catan (0.7 + 1.2 i) == 1.0785743834118921877 + 0.5770573776534306764 i": +float: 4 +ifloat: 4 +Test "Imaginary part of: catan (0.7 + 1.2 i) == 1.0785743834118921877 + 0.5770573776534306764 i": +double: 1 +idouble: 1 + +# catanh +Test "Real part of: catanh (-2 - 3 i) == -0.1469466662255297520 - 1.3389725222944935611 i": +double: 4 +idouble: 4 +Test "Imaginary part of: catanh (-2 - 3 i) == -0.1469466662255297520 - 1.3389725222944935611 i": +float: 4 +ifloat: 4 +Test "Real part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959 + 0.9702403077950989849 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959 + 0.9702403077950989849 i": +double: 1 +float: 6 +idouble: 1 +ifloat: 6 + +# cbrt +Test "cbrt (-27.0) == -3.0": +double: 1 +idouble: 1 +Test "cbrt (0.970299) == 0.99": +double: 1 +idouble: 1 + +# ccos +Test "Imaginary part of: ccos (-2 - 3 i) == -4.1896256909688072301 - 9.1092278937553365979 i": +float: 1 +ifloat: 1 +Test "Real part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i": +double: 1 +idouble: 1 + +# ccosh +Test "Real part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i": +float: 1 +ifloat: 1 +Test "Real part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i": +double: 1 +idouble: 1 + +# cexp +Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.1339809149295426134 - 0.0190985162611351964 i": +float: 1 +ifloat: 1 +Test "Real part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i": +float: 1 +ifloat: 1 + +# clog +Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680 - 2.1587989303424641704 i": +double: 1 +float: 3 +idouble: 1 +ifloat: 3 + +# clog10 +Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-2 - 3 i) == 0.5569716761534183846 - 0.9375544629863747085 i": +double: 1 +float: 5 +idouble: 1 +ifloat: 5 +Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Real part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i": +double: 1 +idouble: 1 +Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i": +float: 1 +ifloat: 1 + +# cos +Test "cos (0.7) == 0.7648421872844884262": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "cos (M_PI_6l * 2.0) == 0.5": +double: 1 +float: 0.5 +idouble: 1 +ifloat: 0.5 +Test "cos (M_PI_6l * 4.0) == -0.5": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "cos (pi/2) == 0": +double: 0.2758 +float: 0.3667 +idouble: 0.2758 +ifloat: 0.3667 + +# cpow +Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": +double: 1 +float: 4 +idouble: 1 +ifloat: 4 +Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": +float: 2 +ifloat: 2 +Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + +# csin +Test "Imaginary part of: csin (0.7 + 1.2 i) == 1.1664563419657581376 + 1.1544997246948547371 i": +float: 1 +ifloat: 1 + +# csinh +Test "Imaginary part of: csinh (-2 - 3 i) == 3.5905645899857799520 - 0.5309210862485198052 i": +double: 1 +idouble: 1 +Test "Real part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i": +float: 1 +ifloat: 1 + +# csqrt +Test "Real part of: csqrt (-2 + 3 i) == 0.8959774761298381247 + 1.6741492280355400404 i": +float: 1 +ifloat: 1 +Test "Real part of: csqrt (-2 - 3 i) == 0.8959774761298381247 - 1.6741492280355400404 i": +float: 1 +ifloat: 1 +Test "Real part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i": +float: 1 +ifloat: 1 + +# ctan +Test "Real part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i": +double: 1 +idouble: 1 +Test "Real part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# ctanh +Test "Real part of: ctanh (-2 - 3 i) == -0.9653858790221331242 + 0.0098843750383224937 i": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i": +float: 1 +ifloat: 1 +Test "Real part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Imaginary part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + +# erfc +Test "erfc (0.7) == 0.32219880616258152702": +double: 1 +idouble: 1 +Test "erfc (1.2) == 0.089686021770364619762": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +Test "erfc (2.0) == 0.0046777349810472658379": +double: 1 +idouble: 1 +Test "erfc (4.1) == 0.67000276540848983727e-8": +double: 24 +float: 12 +idouble: 24 +ifloat: 12 + +# exp10 +Test "exp10 (-1) == 0.1": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "exp10 (0.7) == 5.0118723362727228500": +float: 1 +ifloat: 1 +Test "exp10 (3) == 1000": +double: 6 +float: 2 +idouble: 6 +ifloat: 2 + +# expm1 +Test "expm1 (1) == M_El - 1.0": +float: 1 +ifloat: 1 + +# fmod +Test "fmod (-6.5, -2.3) == -1.9": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "fmod (-6.5, 2.3) == -1.9": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "fmod (6.5, -2.3) == 1.9": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "fmod (6.5, 2.3) == 1.9": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + +# hypot +Test "hypot (-0.7, -12.4) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "hypot (-0.7, 12.4) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "hypot (-12.4, -0.7) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "hypot (-12.4, 0.7) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "hypot (0.7, -12.4) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "hypot (0.7, 1.2) == 1.3892443989449804508": +double: 1 +idouble: 1 +Test "hypot (0.7, 12.4) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "hypot (12.4, -0.7) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "hypot (12.4, 0.7) == 12.41974234837422060118": +float: 1 +ifloat: 1 + +# j0 +Test "j0 (10.0) == -0.24593576445134833520": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "j0 (2.0) == 0.22389077914123566805": +float: 2 +ifloat: 2 +Test "j0 (8.0) == 0.17165080713755390609": +float: 1 +ifloat: 1 + +# j1 +Test "j1 (10.0) == 0.043472746168861436670": +float: 2 +ifloat: 2 +Test "j1 (2.0) == 0.57672480775687338720": +double: 1 +idouble: 1 +Test "j1 (8.0) == 0.23463634685391462438": +double: 1 +idouble: 1 + +# jn +Test "jn (0, 10.0) == -0.24593576445134833520": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "jn (0, 2.0) == 0.22389077914123566805": +float: 2 +ifloat: 2 +Test "jn (0, 8.0) == 0.17165080713755390609": +float: 1 +ifloat: 1 +Test "jn (1, 10.0) == 0.043472746168861436670": +float: 2 +ifloat: 2 +Test "jn (1, 2.0) == 0.57672480775687338720": +double: 1 +idouble: 1 +Test "jn (1, 8.0) == 0.23463634685391462438": +double: 1 +idouble: 1 +Test "jn (10, 0.1) == 0.26905328954342155795e-19": +double: 6 +float: 4 +idouble: 6 +ifloat: 4 +Test "jn (10, 0.7) == 0.75175911502153953928e-11": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "jn (10, 10.0) == 0.20748610663335885770": +double: 4 +float: 3 +idouble: 4 +ifloat: 3 +Test "jn (10, 2.0) == 0.25153862827167367096e-6": +float: 4 +ifloat: 4 +Test "jn (3, 0.1) == 0.000020820315754756261429": +double: 1 +idouble: 1 +Test "jn (3, 0.7) == 0.0069296548267508408077": +float: 1 +ifloat: 1 +Test "jn (3, 10.0) == 0.058379379305186812343": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "jn (3, 2.0) == 0.12894324947440205110": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +# lgamma +Test "lgamma (0.7) == 0.26086724653166651439": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "lgamma (1.2) == -0.853740900033158497197e-1": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +# log +Test "log (0.7) == -0.35667494393873237891": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# log10 +Test "log10 (0.7) == -0.15490195998574316929": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "log10 (e) == log10(e)": +float: 1 +ifloat: 1 + +# log1p +Test "log1p (-0.3) == -0.35667494393873237891": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# log2 +Test "log2 (0.7) == -0.51457317282975824043": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# sincos +Test "sincos (0.7, &sin_res, &cos_res) puts 0.76484218728448842626 in cos_res": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": +double: 1 +float: 0.5 +idouble: 1 +ifloat: 0.5 +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.866025403784438646764 in sin_res": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res": +double: 0.2758 +float: 0.3667 +idouble: 0.2758 +ifloat: 0.3667 +Test "sincos (pi/6, &sin_res, &cos_res) puts 0.866025403784438646764 in cos_res": +float: 1 +ifloat: 1 + +# sinh +Test "sinh (0.7) == 0.75858370183953350346": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# tan +Test "tan (pi/4) == 1": +double: 0.5 +idouble: 0.5 + +# tanh +Test "tanh (0.7) == 0.60436777711716349631": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# tgamma +Test "tgamma (-0.5) == -2 sqrt (pi)": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "tgamma (0.5) == sqrt (pi)": +float: 1 +ifloat: 1 +Test "tgamma (0.7) == 1.29805533264755778568": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# y0 +Test "y0 (0.7) == -0.19066492933739506743": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "y0 (1.0) == 0.088256964215676957983": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "y0 (1.5) == 0.38244892379775884396": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "y0 (10.0) == 0.055671167283599391424": +float: 1 +ifloat: 1 +Test "y0 (8.0) == 0.22352148938756622053": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# y1 +Test "y1 (0.1) == -6.4589510947020269877": +double: 1 +idouble: 1 +Test "y1 (0.7) == -1.1032498719076333697": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "y1 (1.5) == -0.41230862697391129595": +float: 1 +ifloat: 1 +Test "y1 (10.0) == 0.24901542420695388392": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "y1 (2.0) == -0.10703243154093754689": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "y1 (8.0) == -0.15806046173124749426": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +# yn +Test "yn (0, 0.7) == -0.19066492933739506743": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "yn (0, 1.0) == 0.088256964215676957983": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "yn (0, 1.5) == 0.38244892379775884396": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "yn (0, 10.0) == 0.055671167283599391424": +float: 1 +ifloat: 1 +Test "yn (0, 8.0) == 0.22352148938756622053": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (1, 0.1) == -6.4589510947020269877": +double: 1 +idouble: 1 +Test "yn (1, 0.7) == -1.1032498719076333697": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (1, 1.5) == -0.41230862697391129595": +float: 1 +ifloat: 1 +Test "yn (1, 10.0) == 0.24901542420695388392": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "yn (1, 2.0) == -0.10703243154093754689": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (1, 8.0) == -0.15806046173124749426": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +Test "yn (10, 0.1) == -0.11831335132045197885e19": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +Test "yn (10, 0.7) == -0.42447194260703866924e10": +double: 3 +idouble: 3 +Test "yn (10, 1.0) == -0.12161801427868918929e9": +double: 1 +idouble: 1 +Test "yn (10, 10.0) == -0.35981415218340272205": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (10, 2.0) == -129184.54220803928264": +double: 2 +idouble: 2 +Test "yn (3, 0.1) == -5099.3323786129048894": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (3, 0.7) == -15.819479052819633505": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "yn (3, 10.0) == -0.25136265718383732978": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (3, 2.0) == -1.1277837768404277861": +double: 1 +idouble: 1 + +# Maximal error of functions: +Function: "asin": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +Function: "atanh": +double: 1 +idouble: 1 + +Function: "cabs": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "cacos": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "cacos": +float: 1 +ifloat: 1 + +Function: Real part of "cacosh": +double: 1 +float: 7 +idouble: 1 +ifloat: 7 + +Function: Imaginary part of "cacosh": +double: 1 +float: 3 +idouble: 1 +ifloat: 3 + +Function: Real part of "casin": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 + +Function: Imaginary part of "casin": +float: 1 +ifloat: 1 + +Function: Real part of "casinh": +double: 5 +float: 1 +idouble: 5 +ifloat: 1 + +Function: Imaginary part of "casinh": +double: 3 +float: 6 +idouble: 3 +ifloat: 6 + +Function: Real part of "catan": +float: 4 +ifloat: 4 + +Function: Imaginary part of "catan": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "catanh": +double: 4 +float: 1 +idouble: 4 +ifloat: 1 + +Function: Imaginary part of "catanh": +double: 1 +float: 6 +idouble: 1 +ifloat: 6 + +Function: "cbrt": +double: 1 +idouble: 1 + +Function: Real part of "ccos": +double: 1 +idouble: 1 + +Function: Imaginary part of "ccos": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "ccosh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "ccosh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "cexp": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "cexp": +float: 1 +ifloat: 1 + +Function: Imaginary part of "clog": +double: 1 +float: 3 +idouble: 1 +ifloat: 3 + +Function: Real part of "clog10": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "clog10": +double: 1 +float: 5 +idouble: 1 +ifloat: 5 + +Function: "cos": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + +Function: Real part of "cpow": +double: 1 +float: 4 +idouble: 1 +ifloat: 4 + +Function: Imaginary part of "cpow": +double: 1.1031 +float: 2 +idouble: 1.1031 +ifloat: 2 + +Function: Imaginary part of "csin": +float: 1 +ifloat: 1 + +Function: Real part of "csinh": +float: 1 +ifloat: 1 + +Function: Imaginary part of "csinh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "csqrt": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "csqrt": +float: 1 +ifloat: 1 + +Function: Real part of "ctan": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "ctan": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "ctanh": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + +Function: Imaginary part of "ctanh": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + +Function: "erfc": +double: 24 +float: 12 +idouble: 24 +ifloat: 12 + +Function: "exp10": +double: 6 +float: 2 +idouble: 6 +ifloat: 2 + +Function: "expm1": +float: 1 +ifloat: 1 + +Function: "fmod": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + +Function: "hypot": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "j0": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + +Function: "j1": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +Function: "jn": +double: 6 +float: 4 +idouble: 6 +ifloat: 4 + +Function: "lgamma": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +Function: "log": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "log10": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "log1p": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "log2": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "sincos": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "sinh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "tan": +double: 0.5 +idouble: 0.5 + +Function: "tanh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "tgamma": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "y0": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + +Function: "y1": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 + +Function: "yn": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 + +# end of automatic generation From 41c427da070c8683d11ea52e119d085fcdb5afcc Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 22 Jun 2000 13:38:05 +0000 Subject: [PATCH 2146/4487] Fix sysctl entry. --- sysdeps/unix/sysv/linux/mips/syscalls.list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index d8c5afa571..125f23bf99 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -73,7 +73,7 @@ s_stat64 xstat64 stat64 2 __syscall_stat64 s_truncate64 truncate64 truncate64 3 __syscall_truncate64 # Todo: we can pass 6 args in registers, no need for the wrapper -sysctl sysctl _sysctl 1 __syscall_sysctl +sys_sysctl sysctl _sysctl 1 __syscall_sysctl sys_fstat fxstat fstat 2 __syscall_fstat sys_lstat lxstat lstat 2 __syscall_lstat sys_readv readv readv 3 __syscall_readv From 52783ef8b62808bf8e9f2797aea597182ee24c97 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 22 Jun 2000 13:50:01 +0000 Subject: [PATCH 2147/4487] Fix one more typoe for sysctl. --- sysdeps/unix/sysv/linux/mips/syscalls.list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index 125f23bf99..7ed897c5c8 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -73,7 +73,7 @@ s_stat64 xstat64 stat64 2 __syscall_stat64 s_truncate64 truncate64 truncate64 3 __syscall_truncate64 # Todo: we can pass 6 args in registers, no need for the wrapper -sys_sysctl sysctl _sysctl 1 __syscall_sysctl +sys_sysctl sysctl _sysctl 1 __syscall__sysctl sys_fstat fxstat fstat 2 __syscall_fstat sys_lstat lxstat lstat 2 __syscall_lstat sys_readv readv readv 3 __syscall_readv From afda99352ce0a6720033a5c4decc94c1dfb9143b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 22 Jun 2000 17:58:17 +0000 Subject: [PATCH 2148/4487] Define __S_TYPEISMQ, __S_TYPEISSEM, and __S_TYPEISSHM. --- sysdeps/unix/bsd/osf/alpha/bits/stat.h | 7 ++++++- sysdeps/unix/sysv/aix/bits/stat.h | 9 ++++++--- sysdeps/unix/sysv/hpux/bits/stat.h | 7 ++++++- sysdeps/unix/sysv/irix4/bits/stat.h | 7 ++++++- sysdeps/unix/sysv/linux/alpha/bits/stat.h | 9 ++++++--- sysdeps/unix/sysv/linux/mips/bits/stat.h | 9 ++++++--- sysdeps/unix/sysv/sysv4/i386/bits/stat.h | 7 ++++++- sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h | 7 ++++++- 8 files changed, 48 insertions(+), 14 deletions(-) diff --git a/sysdeps/unix/bsd/osf/alpha/bits/stat.h b/sysdeps/unix/bsd/osf/alpha/bits/stat.h index b73c23ae96..6fad8cfd0c 100644 --- a/sysdeps/unix/bsd/osf/alpha/bits/stat.h +++ b/sysdeps/unix/bsd/osf/alpha/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1996, 1997, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1996, 1997, 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 @@ -64,6 +64,11 @@ struct stat #define __S_IFLNK 0120000 /* Symbolic link. */ #define __S_IFSOCK 0140000 /* Socket. */ +/* POSIX.1b objects. */ +#define __S_TYPEISMQ(buf) (0) +#define __S_TYPEISSEM(buf) (0) +#define __S_TYPEISSHM(buf) (0) + /* Protection bits. */ #define __S_ISUID 04000 /* Set user ID on execution. */ diff --git a/sysdeps/unix/sysv/aix/bits/stat.h b/sysdeps/unix/sysv/aix/bits/stat.h index 252662e062..2d5585debb 100644 --- a/sysdeps/unix/sysv/aix/bits/stat.h +++ b/sysdeps/unix/sysv/aix/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1999 Free Software Foundation, Inc. +/* Copyright (C) 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 @@ -109,11 +109,14 @@ struct stat64 #define __S_IFBLK 0060000 /* Block device. */ #define __S_IFREG 0100000 /* Regular file. */ #define __S_IFIFO 0010000 /* FIFO. */ - -/* These don't actually exist on System V, but having them doesn't hurt. */ #define __S_IFLNK 0120000 /* Symbolic link. */ #define __S_IFSOCK 0140000 /* Socket. */ +/* POSIX.1b objects. */ +#define __S_TYPEISMQ(buf) (0) +#define __S_TYPEISSEM(buf) (0) +#define __S_TYPEISSHM(buf) (0) + /* Protection bits. */ #define __S_ISUID 04000 /* Set user ID on execution. */ diff --git a/sysdeps/unix/sysv/hpux/bits/stat.h b/sysdeps/unix/sysv/hpux/bits/stat.h index 4ef5e7263c..1875742ecc 100644 --- a/sysdeps/unix/sysv/hpux/bits/stat.h +++ b/sysdeps/unix/sysv/hpux/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1992, 95, 96, 97, 98, 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 @@ -113,6 +113,11 @@ struct stat64 #define __S_IFLNK 0120000 /* Symbolic link. */ #define __S_IFSOCK 0140000 /* Socket. */ +/* POSIX.1b objects. */ +#define __S_TYPEISMQ(buf) (0) +#define __S_TYPEISSEM(buf) (0) +#define __S_TYPEISSHM(buf) (0) + /* Protection bits. */ #define __S_ISUID 04000 /* Set user ID on execution. */ diff --git a/sysdeps/unix/sysv/irix4/bits/stat.h b/sysdeps/unix/sysv/irix4/bits/stat.h index 633f2618ec..522842147d 100644 --- a/sysdeps/unix/sysv/irix4/bits/stat.h +++ b/sysdeps/unix/sysv/irix4/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1996, 1997, 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 @@ -50,6 +50,11 @@ struct stat #define __S_IFLNK 0120000 /* Symbolic link. */ #define __S_IFSOCK 0140000 /* Socket. */ +/* POSIX.1b objects. */ +#define __S_TYPEISMQ(buf) (0) +#define __S_TYPEISSEM(buf) (0) +#define __S_TYPEISSHM(buf) (0) + /* Protection bits. */ #define __S_ISUID 04000 /* Set user ID on execution. */ diff --git a/sysdeps/unix/sysv/linux/alpha/bits/stat.h b/sysdeps/unix/sysv/linux/alpha/bits/stat.h index e1dad323b1..dbb79383ea 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/stat.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1996, 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 @@ -98,11 +98,14 @@ struct stat64 #define __S_IFBLK 0060000 /* Block device. */ #define __S_IFREG 0100000 /* Regular file. */ #define __S_IFIFO 0010000 /* FIFO. */ - -/* These don't actually exist on System V, but having them doesn't hurt. */ #define __S_IFLNK 0120000 /* Symbolic link. */ #define __S_IFSOCK 0140000 /* Socket. */ +/* POSIX.1b objects. */ +#define __S_TYPEISMQ(buf) (0) +#define __S_TYPEISSEM(buf) (0) +#define __S_TYPEISSHM(buf) (0) + /* Protection bits. */ #define __S_ISUID 04000 /* Set user ID on execution. */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h index 1379ea7a6b..a01e85745d 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/stat.h +++ b/sysdeps/unix/sysv/linux/mips/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 95, 96, 97, 98, 99 Free Software Foundation, Inc. +/* Copyright (C) 1992, 95, 96, 97, 98, 99, 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 @@ -128,11 +128,14 @@ struct stat64 #define __S_IFBLK 0060000 /* Block device. */ #define __S_IFREG 0100000 /* Regular file. */ #define __S_IFIFO 0010000 /* FIFO. */ - -/* These don't actually exist on System V, but having them doesn't hurt. */ #define __S_IFLNK 0120000 /* Symbolic link. */ #define __S_IFSOCK 0140000 /* Socket. */ +/* POSIX.1b objects. */ +#define __S_TYPEISMQ(buf) (0) +#define __S_TYPEISSEM(buf) (0) +#define __S_TYPEISSHM(buf) (0) + /* Protection bits. */ #define __S_ISUID 04000 /* Set user ID on execution. */ diff --git a/sysdeps/unix/sysv/sysv4/i386/bits/stat.h b/sysdeps/unix/sysv/sysv4/i386/bits/stat.h index 4c6b729579..8204f5541d 100644 --- a/sysdeps/unix/sysv/sysv4/i386/bits/stat.h +++ b/sysdeps/unix/sysv/sysv4/i386/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1996, 1997, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1996, 1997, 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 @@ -78,6 +78,11 @@ struct stat #define __S_IFLNK 0120000 /* Symbolic link. */ #define __S_IFSOCK 0140000 /* Socket. */ +/* POSIX.1b objects. */ +#define __S_TYPEISMQ(buf) (0) +#define __S_TYPEISSEM(buf) (0) +#define __S_TYPEISSHM(buf) (0) + /* Protection bits. */ #define __S_ISUID 04000 /* Set user ID on execution. */ diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h index 34cc328b51..091f5ba39a 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1993, 96, 97, 98, 99, 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 @@ -104,6 +104,11 @@ struct stat64 #define __S_IFLNK 0120000 /* Symbolic link. */ #define __S_IFSOCK 0140000 /* Socket. */ +/* POSIX.1b objects. */ +#define __S_TYPEISMQ(buf) (0) +#define __S_TYPEISSEM(buf) (0) +#define __S_TYPEISSHM(buf) (0) + /* Protection bits. */ #define __S_ISUID 04000 /* Set user ID on execution. */ From b63d27b615b8b176d3e173cb5eef98718acf5f03 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 22 Jun 2000 21:12:27 +0000 Subject: [PATCH 2149/4487] Replace arg-count with signatures. --- sysdeps/unix/sysv/linux/mips/syscalls.list | 122 ++++++++++----------- 1 file changed, 61 insertions(+), 61 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index 7ed897c5c8..398bded742 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -1,81 +1,81 @@ -# File name Caller Syscall name # args Strong name Weak names +# File name Caller Syscall name Args Strong name Weak names # # Calls for compatibility with existing MIPS OS implementations and # compilers. # -cachectl - cachectl 3 __cachectl cachectl -cacheflush - cacheflush 3 _flush_cache cacheflush -sysmips - sysmips 4 __sysmips sysmips +cachectl - cachectl i:pii __cachectl cachectl +cacheflush - cacheflush i:pii _flush_cache cacheflush +sysmips - sysmips i:iiii __sysmips sysmips # override select.S in parent directory: -select - select 5 __select select -sigsuspend - sigsuspend 1 __sigsuspend sigsuspend +select - select i:ipppp __select select +sigsuspend - sigsuspend i:p __sigsuspend sigsuspend # # Socket functions; Linux/MIPS doesn't use the socketcall(2) wrapper; # it's provided for compatibility, though. # -accept - accept 3 __libc_accept __accept accept -bind - bind 3 __bind bind -connect - connect 3 __libc_connect __connect connect -getpeername - getpeername 3 __getpeername getpeername -getsockname - getsockname 3 __getsockname getsockname -getsockopt - getsockopt 5 __getsockopt getsockopt -listen - listen 2 __listen listen -recv - recv 4 __libc_recv __recv recv -recvfrom - recvfrom 6 __libc_recvfrom __recvfrom recvfrom -recvmsg - recvmsg 3 __libc_recvmsg __recvmsg recvmsg -send - send 4 __libc_send __send send -sendmsg - sendmsg 3 __libc_sendmsg __sendmsg sendmsg -sendto - sendto 6 __libc_sendto __sendto sendto -setsockopt - setsockopt 5 __setsockopt setsockopt -shutdown - shutdown 2 __shutdown shutdown -socket - socket 3 __socket socket -socketpair - socketpair 4 __socketpair socketpair +accept - accept i:ipp __libc_accept __accept accept +bind - bind i:ipi __bind bind +connect - connect i:ipi __libc_connect __connect connect +getpeername - getpeername i:ipp __getpeername getpeername +getsockname - getsockname i:ipp __getsockname getsockname +getsockopt - getsockopt i:iiipp __getsockopt getsockopt +listen - listen i:ii __listen listen +recv - recv i:ipii __libc_recv __recv recv +recvfrom - recvfrom i:ipiipp __libc_recvfrom __recvfrom recvfrom +recvmsg - recvmsg i:ipi __libc_recvmsg __recvmsg recvmsg +send - send i:ipii __libc_send __send send +sendmsg - sendmsg i:ipi __libc_sendmsg __sendmsg sendmsg +sendto - sendto i:ipiipi __libc_sendto __sendto sendto +setsockopt - setsockopt i:iiipi __setsockopt setsockopt +shutdown - shutdown i:ii __shutdown shutdown +socket - socket i:iii __socket socket +socketpair - socketpair i:iiip __socketpair socketpair # # These are defined locally because the caller is also defined in this dir. # -s_llseek llseek _llseek 5 __syscall__llseek -s_sigaction sigaction sigaction 3 __syscall_sigaction -s_ustat ustat ustat 2 __syscall_ustat -sys_mknod xmknod mknod 3 __syscall_mknod +s_llseek llseek _llseek i:iiipi __syscall__llseek +s_sigaction sigaction sigaction i:ipp __syscall_sigaction +s_ustat ustat ustat i:ip __syscall_ustat +sys_mknod xmknod mknod i:sii __syscall_mknod # System calls with wrappers. -rt_sigaction - rt_sigaction 4 __syscall_rt_sigaction -rt_sigpending - rt_sigpending 2 __syscall_rt_sigpending -rt_sigprocmask - rt_sigprocmask 4 __syscall_rt_sigprocmask -rt_sigqueueinfo - rt_sigqueueinfo 3 __syscall_rt_sigqueueinfo -rt_sigsuspend - rt_sigsuspend 2 __syscall_rt_sigsuspend -rt_sigtimedwait - rt_sigtimedwait 4 __syscall_rt_sigtimedwait -s_execve execve execve 3 __syscall_execve -s_fstat64 fxstat64 fstat64 2 __syscall_fstat64 -s_ftruncate64 ftruncate64 ftruncate64 3 __syscall_ftruncate64 -s_getcwd getcwd getcwd 2 __syscall_getcwd -s_getdents getdents getdents 3 __syscall_getdents -s_getpmsg getpmsg getpmsg 5 __syscall_getpmsg -s_getpriority getpriority getpriority 2 __syscall_getpriority -getresgid - getresgid 3 getresgid -getresuid - getresuid 3 getresuid -s_ipc msgget ipc 5 __syscall_ipc -s_lstat64 lxstat64 lstat64 2 __syscall_lstat64 -s_poll poll poll 3 __syscall_poll -s_pread64 pread64 pread 6 __syscall_pread -s_putpmsg putpmsg putpmsg 5 __syscall_putpmsg -s_ptrace ptrace ptrace 4 __syscall_ptrace -s_pwrite64 pwrite64 pwrite 6 __syscall_pwrite -s_reboot reboot reboot 3 __syscall_reboot -s_setrlimit setrlimit setrlimit 3 __syscall_setrlimit -s_sigpending sigpending sigpending 1 __syscall_sigpending -s_sigprocmask sigprocmask sigprocmask 3 __syscall_sigprocmask -s_stat64 xstat64 stat64 2 __syscall_stat64 -s_truncate64 truncate64 truncate64 3 __syscall_truncate64 +rt_sigaction - rt_sigaction i:ippi __syscall_rt_sigaction +rt_sigpending - rt_sigpending i:pi __syscall_rt_sigpending +rt_sigprocmask - rt_sigprocmask i:ippi __syscall_rt_sigprocmask +rt_sigqueueinfo - rt_sigqueueinfo i:iip __syscall_rt_sigqueueinfo +rt_sigsuspend - rt_sigsuspend i:pi __syscall_rt_sigsuspend +rt_sigtimedwait - rt_sigtimedwait i:pppi __syscall_rt_sigtimedwait +s_execve execve execve i:sss __syscall_execve +s_fstat64 fxstat64 fstat64 i:ip __syscall_fstat64 +s_ftruncate64 ftruncate64 ftruncate64 i:iiii __syscall_ftruncate64 +s_getcwd getcwd getcwd i:pi __syscall_getcwd +s_getdents getdents getdents i:ipi __syscall_getdents +s_getpmsg getpmsg getpmsg i:ipppp __syscall_getpmsg +s_getpriority getpriority getpriority i:ii __syscall_getpriority +getresgid - getresgid i:ppp getresgid +getresuid - getresuid i:ppp getresuid +s_ipc msgget ipc i:iiiip __syscall_ipc +s_lstat64 lxstat64 lstat64 i:sp __syscall_lstat64 +s_poll poll poll i:pii __syscall_poll +s_pread64 pread64 pread i:ipiiii __syscall_pread +s_putpmsg putpmsg putpmsg i:ippii __syscall_putpmsg +s_ptrace ptrace ptrace i:iipp __syscall_ptrace +s_pwrite64 pwrite64 pwrite i:ipiiii __syscall_pwrite +s_reboot reboot reboot i:iii __syscall_reboot +s_setrlimit setrlimit setrlimit i:ip __syscall_setrlimit +s_sigpending sigpending sigpending i:p __syscall_sigpending +s_sigprocmask sigprocmask sigprocmask i:ipp __syscall_sigprocmask +s_stat64 xstat64 stat64 i:sp __syscall_stat64 +s_truncate64 truncate64 truncate64 i:siii __syscall_truncate64 # Todo: we can pass 6 args in registers, no need for the wrapper -sys_sysctl sysctl _sysctl 1 __syscall__sysctl -sys_fstat fxstat fstat 2 __syscall_fstat -sys_lstat lxstat lstat 2 __syscall_lstat -sys_readv readv readv 3 __syscall_readv -sys_stat xstat stat 2 __syscall_stat -sys_writev writev writev 3 __syscall_writev +sys_sysctl sysctl _sysctl i:p __syscall__sysctl +sys_fstat fxstat fstat i:ip __syscall_fstat +sys_lstat lxstat lstat i:sp __syscall_lstat +sys_readv readv readv i:ipi __syscall_readv +sys_stat xstat stat i:sp __syscall_stat +sys_writev writev writev i:ipi __syscall_writev From d0371ae0a3047fb43a296f7dba31b6a14b128696 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 23 Jun 2000 06:26:24 +0000 Subject: [PATCH 2150/4487] Fix signature of execve. --- sysdeps/unix/sysv/linux/mips/syscalls.list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index 398bded742..575d4c4bf1 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -49,7 +49,7 @@ rt_sigprocmask - rt_sigprocmask i:ippi __syscall_rt_sigprocmask rt_sigqueueinfo - rt_sigqueueinfo i:iip __syscall_rt_sigqueueinfo rt_sigsuspend - rt_sigsuspend i:pi __syscall_rt_sigsuspend rt_sigtimedwait - rt_sigtimedwait i:pppi __syscall_rt_sigtimedwait -s_execve execve execve i:sss __syscall_execve +s_execve execve execve i:spp __syscall_execve s_fstat64 fxstat64 fstat64 i:ip __syscall_fstat64 s_ftruncate64 ftruncate64 ftruncate64 i:iiii __syscall_ftruncate64 s_getcwd getcwd getcwd i:pi __syscall_getcwd From e4586ea96c4a1a8926ab667fff77eec98f296f7b Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 23 Jun 2000 07:55:36 +0000 Subject: [PATCH 2151/4487] * sysdeps/unix/sysv/linux/mips/sys/syscall.h (SYS_pivot_root, SYS_mincore, SYS_madvise): Added. --- sysdeps/unix/sysv/linux/mips/sys/syscall.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/sys/syscall.h b/sysdeps/unix/sysv/linux/mips/sys/syscall.h index 27dc08aa5b..ccbacd73ad 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/syscall.h +++ b/sysdeps/unix/sysv/linux/mips/sys/syscall.h @@ -84,7 +84,7 @@ #define SYS_SVR4_semsys (SYS_SVR4 + 53) #define SYS_SVR4_ioctl (SYS_SVR4 + 54) #define SYS_SVR4_uadmin (SYS_SVR4 + 55) -#define SYS_SVR4_exch (SYS_SVR4 + 56) +#define SYS_SVR4_exch (SYS_SVR4 + 56) #define SYS_SVR4_utssys (SYS_SVR4 + 57) #define SYS_SVR4_fsync (SYS_SVR4 + 58) #define SYS_SVR4_exece (SYS_SVR4 + 59) @@ -1209,6 +1209,9 @@ #define SYS_stat64 (SYS_Linux + 213) #define SYS_lstat64 (SYS_Linux + 214) #define SYS_fstat64 (SYS_Linux + 215) +#define SYS_pivot_root (SYS_Linux + 216) +#define SYS_mincore (SYS_Linux + 217) +#define SYS_madvise (SYS_Linux + 218) #endif /* sys/syscall.h */ From 7228f3cac1460418ea004a960201a2925c8060b9 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 23 Jun 2000 11:09:25 +0000 Subject: [PATCH 2152/4487] Replace arg-count with signatures. --- sysdeps/unix/sysv/linux/m68k/syscalls.list | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/m68k/syscalls.list b/sysdeps/unix/sysv/linux/m68k/syscalls.list index 9ae4f73757..5367ef0d0b 100644 --- a/sysdeps/unix/sysv/linux/m68k/syscalls.list +++ b/sysdeps/unix/sysv/linux/m68k/syscalls.list @@ -1,3 +1,3 @@ -# File name Caller Syscall name # args Strong name Weak names +# File name Caller Syscall name Args Strong name Weak names -cacheflush EXTRA cacheflush 4 __cacheflush cacheflush +cacheflush EXTRA cacheflush i:iiii __cacheflush cacheflush From 22fb102e6bc2734a077d722461fde3e9a733a150 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 1 Jul 2000 05:08:03 +0000 Subject: [PATCH 2153/4487] (elf_machine_rela) [r_type == R_ALPHA_REFQUAD]: Use memcpy to load and store value from relocation address to prevent unaligned trap. --- sysdeps/alpha/dl-machine.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index e20493b33f..a7f13e0192 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -500,7 +500,12 @@ elf_machine_rela (struct link_map *map, elf_machine_fixup_plt (map, NULL, reloc, reloc_addr, sym_value); else if (r_type == R_ALPHA_REFQUAD) { - sym_value += *reloc_addr; + void *reloc_addr_1 = reloc_addr; + Elf64_Addr reloc_addr_val; + + /* Load value without causing unaligned trap. */ + memcpy (&reloc_addr_val, reloc_addr_1, 8); + sym_value += reloc_addr_val; #ifndef RTLD_BOOTSTRAP if (map == &_dl_rtld_map) { @@ -516,7 +521,8 @@ elf_machine_rela (struct link_map *map, sym_value -= reloc->r_addend; } #endif - *reloc_addr = sym_value; + /* Store value without causing unaligned trap. */ + memcpy (reloc_addr_1, &sym_value, 8); } else _dl_reloc_bad_type (map, r_type, 0); From 6964aca34a98c4b78128b5c973840de973e87848 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 5 Jul 2000 15:37:11 +0000 Subject: [PATCH 2154/4487] Fix type of fpu_control_t. (_FPU_GETCW): Remove extra colon. Patch by Ralf Baechle . --- sysdeps/mips/fpu_control.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/mips/fpu_control.h b/sysdeps/mips/fpu_control.h index 789a614973..c5c83e0442 100644 --- a/sysdeps/mips/fpu_control.h +++ b/sysdeps/mips/fpu_control.h @@ -1,5 +1,5 @@ /* FPU control word bits. Mips version. - Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Olaf Flebbe and Ralf Baechle. @@ -86,10 +86,10 @@ #define _FPU_IEEE 0x00000F80 /* Type of the control word. */ -typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__HI__))); +typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__SI__))); /* Macros for accessing the hardware control word. */ -#define _FPU_GETCW(cw) __asm__ ("cfc1 %0,$31" : "=r" (cw) : ) +#define _FPU_GETCW(cw) __asm__ ("cfc1 %0,$31" : "=r" (cw)) #define _FPU_SETCW(cw) __asm__ ("ctc1 %0,$31" : : "r" (cw)) /* Default control word set at startup. */ From 573d31d4d36b2cdcb7676dfe5274c2312241349c Mon Sep 17 00:00:00 2001 From: Greg McGary Date: Thu, 6 Jul 2000 00:48:39 +0000 Subject: [PATCH 2155/4487] * sysdeps/generic/bp-checks.h: New file. * sysdeps/generic/bp-thunks.h: Replace generic thunk definitions with list of #include files. * sysdeps/unix/make-syscalls.sh: Handle new arg signature keyletters a, b, B, f, n, N, P, v, V. Fixup some indentation. Don't generate BP thunk if `V' appears in signature. Generate thunks with complete bounds checks. * sysdeps/unix/syscalls.list: Refine signatures using new keyletters. * sysdeps/unix/inet/syscalls.list: Likewise. * sysdeps/unix/mman/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/mips/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/powerpc/syscalls.list: Likewise. --- sysdeps/unix/sysv/linux/mips/syscalls.list | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index 575d4c4bf1..117e7dd0fa 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -21,18 +21,18 @@ bind - bind i:ipi __bind bind connect - connect i:ipi __libc_connect __connect connect getpeername - getpeername i:ipp __getpeername getpeername getsockname - getsockname i:ipp __getsockname getsockname -getsockopt - getsockopt i:iiipp __getsockopt getsockopt +getsockopt - getsockopt i:iiiBN __getsockopt getsockopt listen - listen i:ii __listen listen -recv - recv i:ipii __libc_recv __recv recv -recvfrom - recvfrom i:ipiipp __libc_recvfrom __recvfrom recvfrom +recv - recv i:ibni __libc_recv __recv recv +recvfrom - recvfrom i:ibnibN __libc_recvfrom __recvfrom recvfrom recvmsg - recvmsg i:ipi __libc_recvmsg __recvmsg recvmsg -send - send i:ipii __libc_send __send send +send - send i:ibni __libc_send __send send sendmsg - sendmsg i:ipi __libc_sendmsg __sendmsg sendmsg -sendto - sendto i:ipiipi __libc_sendto __sendto sendto -setsockopt - setsockopt i:iiipi __setsockopt setsockopt +sendto - sendto i:ibnibn __libc_sendto __sendto sendto +setsockopt - setsockopt i:iiibn __setsockopt setsockopt shutdown - shutdown i:ii __shutdown shutdown socket - socket i:iii __socket socket -socketpair - socketpair i:iiip __socketpair socketpair +socketpair - socketpair i:iiif __socketpair socketpair # # These are defined locally because the caller is also defined in this dir. @@ -61,10 +61,10 @@ getresuid - getresuid i:ppp getresuid s_ipc msgget ipc i:iiiip __syscall_ipc s_lstat64 lxstat64 lstat64 i:sp __syscall_lstat64 s_poll poll poll i:pii __syscall_poll -s_pread64 pread64 pread i:ipiiii __syscall_pread +s_pread64 pread64 pread i:ibniii __syscall_pread s_putpmsg putpmsg putpmsg i:ippii __syscall_putpmsg s_ptrace ptrace ptrace i:iipp __syscall_ptrace -s_pwrite64 pwrite64 pwrite i:ipiiii __syscall_pwrite +s_pwrite64 pwrite64 pwrite i:ibniii __syscall_pwrite s_reboot reboot reboot i:iii __syscall_reboot s_setrlimit setrlimit setrlimit i:ip __syscall_setrlimit s_sigpending sigpending sigpending i:p __syscall_sigpending From 6f5d6cb60dce78885a09547b0974ffde7defe78c Mon Sep 17 00:00:00 2001 From: Greg McGary Date: Thu, 6 Jul 2000 23:42:33 +0000 Subject: [PATCH 2156/4487] * string/endian.h (__LONG_LONG_PAIR): New macro. * sysdeps/unix/sysv/linux/ftruncate64.c: Use it. * sysdeps/unix/sysv/linux/pread.c: Likewise. * sysdeps/unix/sysv/linux/pread64.c: Likewise. * sysdeps/unix/sysv/linux/pwrite.c: Likewise. * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. * sysdeps/unix/sysv/linux/truncate64.c: Likewise. * sysdeps/unix/sysv/linux/mips/ftruncate64.c: Likewise. * sysdeps/unix/sysv/linux/mips/pread.c: Likewise. * sysdeps/unix/sysv/linux/mips/pread64.c: Likewise. * sysdeps/unix/sysv/linux/mips/pwrite.c: Likewise. * sysdeps/unix/sysv/linux/mips/pwrite64.c: Likewise. * sysdeps/unix/sysv/linux/mips/truncate64.c: Likewise. --- sysdeps/unix/sysv/linux/mips/ftruncate64.c | 9 ++------- sysdeps/unix/sysv/linux/mips/pread.c | 8 +++----- sysdeps/unix/sysv/linux/mips/pread64.c | 10 +++------- sysdeps/unix/sysv/linux/mips/pwrite.c | 8 +++----- sysdeps/unix/sysv/linux/mips/pwrite64.c | 11 +++-------- sysdeps/unix/sysv/linux/mips/truncate64.c | 10 ++-------- 6 files changed, 16 insertions(+), 40 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/ftruncate64.c b/sysdeps/unix/sysv/linux/mips/ftruncate64.c index 768946e9fa..e45afbad7d 100644 --- a/sysdeps/unix/sysv/linux/mips/ftruncate64.c +++ b/sysdeps/unix/sysv/linux/mips/ftruncate64.c @@ -50,13 +50,8 @@ ftruncate64 (int fd, off64_t length) #ifndef __ASSUME_TRUNCATE64_SYSCALL int saved_errno = errno; #endif -#if __BYTE_ORDER == __LITTLE_ENDIAN - /* Use a fill argument to pass low, high in an aligned pair of - arguments (here 2/3). */ - int result = INLINE_SYSCALL (ftruncate64, 3, fd, 0, low, high); -#elif __BYTE_ORDER == __BIG_ENDIAN - int result = INLINE_SYSCALL (ftruncate64, 3, fd, 0, high, low); -#endif + int result = INLINE_SYSCALL (ftruncate64, 3, fd, 0, + __LONG_LONG_PAIR (high, low)); #ifndef __ASSUME_TRUNCATE64_SYSCALL if (result != -1 || errno != ENOSYS) #endif diff --git a/sysdeps/unix/sysv/linux/mips/pread.c b/sysdeps/unix/sysv/linux/mips/pread.c index d926a06508..dd1e5d8a05 100644 --- a/sysdeps/unix/sysv/linux/mips/pread.c +++ b/sysdeps/unix/sysv/linux/mips/pread.c @@ -19,6 +19,7 @@ #include #include +#include #include #include @@ -46,11 +47,8 @@ __libc_pread (fd, buf, count, offset) ssize_t result; /* First try the syscall. */ -# if defined(__MIPSEB__) - result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, 0, offset); -# elif defined(__MIPSEL__) - result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, offset, 0); -# endif + result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, + __LONG_LONG_PAIR (0, offset)); # if __ASSUME_PREAD_SYSCALL == 0 if (result == -1 && errno == ENOSYS) /* No system call available. Use the emulation. */ diff --git a/sysdeps/unix/sysv/linux/mips/pread64.c b/sysdeps/unix/sysv/linux/mips/pread64.c index d17dbeb396..06a992e1cb 100644 --- a/sysdeps/unix/sysv/linux/mips/pread64.c +++ b/sysdeps/unix/sysv/linux/mips/pread64.c @@ -19,6 +19,7 @@ #include #include +#include #include #include @@ -47,14 +48,9 @@ __libc_pread64 (fd, buf, count, offset) ssize_t result; /* First try the syscall. */ -# if defined(__MIPSEB__) - result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, (off_t) (offset >> 32), - (off_t) (offset & 0xffffffff)); -# elif defined(__MIPSEL__) result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, - (off_t) (offset & 0xffffffff), - (off_t) (offset >> 32)); -# endif + __LONG_LONG_PAIR ((off_t) (offset >> 32), + (off_t) (offset & 0xffffffff))); # if __ASSUME_PREAD_SYSCALL == 0 if (result == -1 && errno == ENOSYS) /* No system call available. Use the emulation. */ diff --git a/sysdeps/unix/sysv/linux/mips/pwrite.c b/sysdeps/unix/sysv/linux/mips/pwrite.c index a83df31ca4..b45bb84f4d 100644 --- a/sysdeps/unix/sysv/linux/mips/pwrite.c +++ b/sysdeps/unix/sysv/linux/mips/pwrite.c @@ -19,6 +19,7 @@ #include #include +#include #include #include @@ -45,11 +46,8 @@ __libc_pwrite (fd, buf, count, offset) ssize_t result; /* First try the syscall. */ -# if defined(__MIPSEB__) - result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, 0, offset); -# elif defined(__MIPSEL__) - result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, offset, 0); -# endif + result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, + __LONG_LONG_PAIR (0, offset)); # if __ASSUME_PWRITE_SYSCALL == 0 if (result == -1 && errno == ENOSYS) /* No system call available. Use the emulation. */ diff --git a/sysdeps/unix/sysv/linux/mips/pwrite64.c b/sysdeps/unix/sysv/linux/mips/pwrite64.c index 295a1754b6..0481064500 100644 --- a/sysdeps/unix/sysv/linux/mips/pwrite64.c +++ b/sysdeps/unix/sysv/linux/mips/pwrite64.c @@ -19,6 +19,7 @@ #include #include +#include #include #include @@ -45,15 +46,9 @@ __libc_pwrite64 (fd, buf, count, offset) ssize_t result; /* First try the syscall. */ -# if defined(__MIPSEB__) - result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, (off_t) (offset >> 32), - (off_t) (offset & 0xffffffff)); -# elif defined(__MIPSEL__) result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, - (off_t) (offset & 0xffffffff), - (off_t) (offset >> 32)); -# endif - + __LONG_LONG_PAIR ((off_t) (offset >> 32), + (off_t) (offset & 0xffffffff))); # if __ASSUME_PWRITE_SYSCALL == 0 if (result == -1 && errno == ENOSYS) /* No system call available. Use the emulation. */ diff --git a/sysdeps/unix/sysv/linux/mips/truncate64.c b/sysdeps/unix/sysv/linux/mips/truncate64.c index bcdb9ddf98..7a446194d3 100644 --- a/sysdeps/unix/sysv/linux/mips/truncate64.c +++ b/sysdeps/unix/sysv/linux/mips/truncate64.c @@ -50,14 +50,8 @@ truncate64 (const char *path, off64_t length) #ifndef __ASSUME_TRUNCATE64_SYSCALL int saved_errno = errno; #endif -#if __BYTE_ORDER == __LITTLE_ENDIAN - /* Use a fill argument to pass low, high in an aligned pair of - arguments (here 2/3). */ - int result = INLINE_SYSCALL (truncate64, 3, path, 0, low, high); -#elif __BYTE_ORDER == __BIG_ENDIAN - int result = INLINE_SYSCALL (truncate64, 3, path, 0, high, low); -#endif - + int result = INLINE_SYSCALL (truncate64, 3, path, 0, + __LONG_LONG_PAIR (high, low)); #ifndef __ASSUME_TRUNCATE64_SYSCALL if (result != -1 || errno != ENOSYS) #endif From 71005584b8e929b8b28bf847171a7209c9d42243 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 7 Jul 2000 00:47:05 +0000 Subject: [PATCH 2157/4487] Add __libc_sigaction. --- sysdeps/unix/sysv/linux/arm/sigaction.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/sigaction.c b/sysdeps/unix/sysv/linux/arm/sigaction.c index 2e70b321ef..ae8b7f8e72 100644 --- a/sysdeps/unix/sysv/linux/arm/sigaction.c +++ b/sysdeps/unix/sysv/linux/arm/sigaction.c @@ -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 @@ -55,7 +55,7 @@ extern void __default_rt_sa_restorer(void); /* If ACT is not NULL, change the action for SIG to *ACT. If OACT is not NULL, put the old action for SIG in *OACT. */ int -__sigaction (sig, act, oact) +__libc_sigaction (sig, act, oact) int sig; const struct sigaction *act; struct sigaction *oact; @@ -147,4 +147,5 @@ __sigaction (sig, act, oact) return result; } -weak_alias (__sigaction, sigaction) +strong_alias (__libc_sigaction, __sigaction) +weak_alias (__libc_sigaction, sigaction) From e3d6c5810b0a1bbbc225e5b83ecfb90d8afa9a7d Mon Sep 17 00:00:00 2001 From: Greg McGary Date: Fri, 7 Jul 2000 02:19:05 +0000 Subject: [PATCH 2158/4487] * sysdeps/generic/bp-checks.h (CHECK_SIGSET, CHECK_SIGSETopt): New macros. * sysdeps/generic/strcpy.c: Add bounds checks. * sysdeps/unix/fxstat.c: Likewise. * sysdeps/unix/xstat.c: Likewise. * sysdeps/unix/common/lxstat.c: Likewise. * sysdeps/unix/sysv/linux/aio_sigqueue.c: Likewise. * sysdeps/unix/sysv/linux/execve.c: Likewise. * sysdeps/unix/sysv/linux/fxstat.c: Likewise. * sysdeps/unix/sysv/linux/fxstat64.c: Likewise. * sysdeps/unix/sysv/linux/getcwd.c: Likewise. * sysdeps/unix/sysv/linux/getdents.c: Likewise. * sysdeps/unix/sysv/linux/llseek.c: Likewise. * sysdeps/unix/sysv/linux/lxstat.c: Likewise. * sysdeps/unix/sysv/linux/lxstat64.c: Likewise. * sysdeps/unix/sysv/linux/poll.c: Likewise. * sysdeps/unix/sysv/linux/pread.c: Likewise. * sysdeps/unix/sysv/linux/pread64.c: Likewise. * sysdeps/unix/sysv/linux/ptrace.c: Likewise. * sysdeps/unix/sysv/linux/pwrite.c: Likewise. * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. * sysdeps/unix/sysv/linux/readv.c: Likewise. * sysdeps/unix/sysv/linux/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/sigpending.c: Likewise. * sysdeps/unix/sysv/linux/sigprocmask.c: Likewise. * sysdeps/unix/sysv/linux/sigqueue.c: Likewise. * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. * sysdeps/unix/sysv/linux/sysctl.c: Likewise. * sysdeps/unix/sysv/linux/truncate64.c: Likewise. * sysdeps/unix/sysv/linux/ustat.c: Likewise. * sysdeps/unix/sysv/linux/writev.c: Likewise. * sysdeps/unix/sysv/linux/xmknod.c: Likewise. * sysdeps/unix/sysv/linux/xstat.c: Likewise. * sysdeps/unix/sysv/linux/xstat64.c: Likewise. * sysdeps/unix/sysv/linux/arm/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/i386/brk.c: Likewise. * sysdeps/unix/sysv/linux/i386/chown.c: Likewise. * sysdeps/unix/sysv/linux/i386/fxstat.c: Likewise. * sysdeps/unix/sysv/linux/i386/getgroups.c: Likewise. * sysdeps/unix/sysv/linux/i386/getresgid.c: Likewise. * sysdeps/unix/sysv/linux/i386/getresuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/getrlimit.c: Likewise. * sysdeps/unix/sysv/linux/i386/lchown.c: Likewise. * sysdeps/unix/sysv/linux/i386/lxstat.c: Likewise. * sysdeps/unix/sysv/linux/i386/setgroups.c: Likewise. * sysdeps/unix/sysv/linux/i386/setrlimit.c: Likewise. * sysdeps/unix/sysv/linux/i386/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/i386/xstat.c: Likewise. * sysdeps/unix/sysv/linux/ia64/fxstat.c: Likewise. * sysdeps/unix/sysv/linux/ia64/lxstat.c: Likewise. * sysdeps/unix/sysv/linux/ia64/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/ia64/sigpending.c: Likewise. * sysdeps/unix/sysv/linux/ia64/sigprocmask.c: Likewise. * sysdeps/unix/sysv/linux/ia64/sigsuspend.c: Likewise. * sysdeps/unix/sysv/linux/ia64/xstat.c: Likewise. * sysdeps/unix/sysv/linux/m68k/chown.c: Likewise. * sysdeps/unix/sysv/linux/mips/pread.c: Likewise. * sysdeps/unix/sysv/linux/mips/pread64.c: Likewise. * sysdeps/unix/sysv/linux/mips/pwrite.c: Likewise. * sysdeps/unix/sysv/linux/mips/pwrite64.c: Likewise. * sysdeps/unix/sysv/linux/mips/truncate64.c: Likewise. * sysdeps/unix/sysv/linux/mips/ustat.c: Likewise. * sysdeps/unix/sysv/linux/mips/xmknod.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/mmap64.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/sigpending.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/sigprocmask.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/sigsuspend.c: Likewise. --- sysdeps/unix/sysv/linux/arm/sigaction.c | 18 ++++++++++-------- sysdeps/unix/sysv/linux/m68k/chown.c | 11 ++++++----- sysdeps/unix/sysv/linux/mips/pread.c | 7 ++++--- sysdeps/unix/sysv/linux/mips/pread64.c | 7 ++++--- sysdeps/unix/sysv/linux/mips/pwrite.c | 5 +++-- sysdeps/unix/sysv/linux/mips/pwrite64.c | 5 +++-- sysdeps/unix/sysv/linux/mips/truncate64.c | 5 +++-- sysdeps/unix/sysv/linux/mips/ustat.c | 7 ++++--- sysdeps/unix/sysv/linux/mips/xmknod.c | 7 ++++--- 9 files changed, 41 insertions(+), 31 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/sigaction.c b/sysdeps/unix/sysv/linux/arm/sigaction.c index ae8b7f8e72..5be2fff69c 100644 --- a/sysdeps/unix/sysv/linux/arm/sigaction.c +++ b/sysdeps/unix/sysv/linux/arm/sigaction.c @@ -28,10 +28,10 @@ translate it here. */ #include -extern int __syscall_sigaction (int, const struct old_kernel_sigaction *, - struct old_kernel_sigaction *); -extern int __syscall_rt_sigaction (int, const struct kernel_sigaction *, - struct kernel_sigaction *, size_t); +extern int __syscall_sigaction (int, const struct old_kernel_sigaction *__unbounded, + struct old_kernel_sigaction *__unbounded); +extern int __syscall_rt_sigaction (int, const struct kernel_sigaction *__unbounded, + struct kernel_sigaction *__unbounded, size_t); /* The variable is shared between all wrappers around signal handling functions which have RT equivalents. */ @@ -95,8 +95,9 @@ __libc_sigaction (sig, act, oact) /* XXX The size argument hopefully will have to be changed to the real size of the user-level sigset_t. */ - result = INLINE_SYSCALL (rt_sigaction, 4, sig, act ? &kact : NULL, - oact ? &koact : NULL, _NSIG / 8); + result = INLINE_SYSCALL (rt_sigaction, 4, sig, + act ? __ptrvalue (&kact) : NULL, + oact ? __ptrvalue (&koact) : NULL, _NSIG / 8); if (result >= 0 || errno != ENOSYS) { @@ -133,8 +134,9 @@ __libc_sigaction (sig, act, oact) } #endif } - result = INLINE_SYSCALL (sigaction, 3, sig, act ? &k_sigact : NULL, - oact ? &k_osigact : NULL); + result = INLINE_SYSCALL (sigaction, 3, sig, + act ? __ptrvalue (&k_sigact) : NULL, + oact ? __ptrvalue (&k_osigact) : NULL); if (oact && result >= 0) { oact->sa_handler = k_osigact.k_sa_handler; diff --git a/sysdeps/unix/sysv/linux/m68k/chown.c b/sysdeps/unix/sysv/linux/m68k/chown.c index 79701ee6ff..e97c14834e 100644 --- a/sysdeps/unix/sysv/linux/m68k/chown.c +++ b/sysdeps/unix/sysv/linux/m68k/chown.c @@ -21,14 +21,15 @@ #include #include +#include #include -extern int __syscall_chown (const char *__file, +extern int __syscall_chown (const char *__unbounded __file, __kernel_uid_t __owner, __kernel_gid_t __group); #ifdef __NR_chown32 -extern int __syscall_chown32 (const char *__file, +extern int __syscall_chown32 (const char *__unbounded __file, __kernel_uid32_t owner, __kernel_gid32_t group); # if __ASSUME_32BITUIDS == 0 @@ -42,7 +43,7 @@ int __chown (const char *file, uid_t owner, gid_t group) { #if __ASSUME_32BITUIDS - return INLINE_SYSCALL (chown32, 3, file, owner, group); + return INLINE_SYSCALL (chown32, 3, CHECK_STRING (file), owner, group); #else # ifdef __NR_chown32 if (__libc_missing_32bit_uids <= 0) @@ -50,7 +51,7 @@ __chown (const char *file, uid_t owner, gid_t group) int result; int saved_errno = errno; - result = INLINE_SYSCALL (chown32, 3, file, owner, group); + result = INLINE_SYSCALL (chown32, 3, CHECK_STRING (file), owner, group); if (result == 0 || errno != ENOSYS) return result; @@ -66,7 +67,7 @@ __chown (const char *file, uid_t owner, gid_t group) return -1; } - return INLINE_SYSCALL (chown, 3, file, owner, group); + return INLINE_SYSCALL (chown, 3, CHECK_STRING (file), owner, group); #endif } weak_alias (__chown, chown) diff --git a/sysdeps/unix/sysv/linux/mips/pread.c b/sysdeps/unix/sysv/linux/mips/pread.c index dd1e5d8a05..93f19f4237 100644 --- a/sysdeps/unix/sysv/linux/mips/pread.c +++ b/sysdeps/unix/sysv/linux/mips/pread.c @@ -23,6 +23,7 @@ #include #include +#include #include @@ -32,8 +33,8 @@ static ssize_t __emulate_pread (int fd, void *buf, size_t count, off_t offset) internal_function; # endif -extern ssize_t __syscall_pread (int fd, void *buf, size_t count, int dummy, - off_t offset_hi, off_t offset_lo); +extern ssize_t __syscall_pread (int fd, void *__unbounded buf, size_t count, + int dummy, off_t offset_hi, off_t offset_lo); @@ -47,7 +48,7 @@ __libc_pread (fd, buf, count, offset) ssize_t result; /* First try the syscall. */ - result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, + result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, __LONG_LONG_PAIR (0, offset)); # if __ASSUME_PREAD_SYSCALL == 0 if (result == -1 && errno == ENOSYS) diff --git a/sysdeps/unix/sysv/linux/mips/pread64.c b/sysdeps/unix/sysv/linux/mips/pread64.c index 06a992e1cb..6482ce45ad 100644 --- a/sysdeps/unix/sysv/linux/mips/pread64.c +++ b/sysdeps/unix/sysv/linux/mips/pread64.c @@ -23,6 +23,7 @@ #include #include +#include #include @@ -33,8 +34,8 @@ static ssize_t __emulate_pread64 (int fd, void *buf, size_t count, off64_t offset) internal_function; # endif -extern ssize_t __syscall_pread (int fd, void *buf, size_t count, int dummy, - off_t offset_hi, off_t offset_lo); +extern ssize_t __syscall_pread (int fd, void *__unbounded buf, size_t count, + int dummy, off_t offset_hi, off_t offset_lo); @@ -48,7 +49,7 @@ __libc_pread64 (fd, buf, count, offset) ssize_t result; /* First try the syscall. */ - result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, + result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, __LONG_LONG_PAIR ((off_t) (offset >> 32), (off_t) (offset & 0xffffffff))); # if __ASSUME_PREAD_SYSCALL == 0 diff --git a/sysdeps/unix/sysv/linux/mips/pwrite.c b/sysdeps/unix/sysv/linux/mips/pwrite.c index b45bb84f4d..8283896d1a 100644 --- a/sysdeps/unix/sysv/linux/mips/pwrite.c +++ b/sysdeps/unix/sysv/linux/mips/pwrite.c @@ -23,12 +23,13 @@ #include #include +#include #include #if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0 -extern ssize_t __syscall_pwrite (int fd, const void *buf, size_t count, +extern ssize_t __syscall_pwrite (int fd, const void *__unbounded buf, size_t count, int dummy, off_t offset_hi, off_t offset_lo); # if __ASSUME_PWRITE_SYSCALL == 0 @@ -46,7 +47,7 @@ __libc_pwrite (fd, buf, count, offset) ssize_t result; /* First try the syscall. */ - result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, + result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0, __LONG_LONG_PAIR (0, offset)); # if __ASSUME_PWRITE_SYSCALL == 0 if (result == -1 && errno == ENOSYS) diff --git a/sysdeps/unix/sysv/linux/mips/pwrite64.c b/sysdeps/unix/sysv/linux/mips/pwrite64.c index 0481064500..af07f608d2 100644 --- a/sysdeps/unix/sysv/linux/mips/pwrite64.c +++ b/sysdeps/unix/sysv/linux/mips/pwrite64.c @@ -23,12 +23,13 @@ #include #include +#include #include #if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0 -extern ssize_t __syscall_pwrite (int fd, const void *buf, size_t count, +extern ssize_t __syscall_pwrite (int fd, const void *__unbounded buf, size_t count, int dummy, off_t offset_hi, off_t offset_lo); # if __ASSUME_PWRITE_SYSCALL == 0 @@ -46,7 +47,7 @@ __libc_pwrite64 (fd, buf, count, offset) ssize_t result; /* First try the syscall. */ - result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, + result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0, __LONG_LONG_PAIR ((off_t) (offset >> 32), (off_t) (offset & 0xffffffff))); # if __ASSUME_PWRITE_SYSCALL == 0 diff --git a/sysdeps/unix/sysv/linux/mips/truncate64.c b/sysdeps/unix/sysv/linux/mips/truncate64.c index 7a446194d3..09a27556e5 100644 --- a/sysdeps/unix/sysv/linux/mips/truncate64.c +++ b/sysdeps/unix/sysv/linux/mips/truncate64.c @@ -23,6 +23,7 @@ #include #include +#include #include "kernel-features.h" @@ -33,7 +34,7 @@ int __have_no_truncate64; #endif /* The order of hight, low depends on endianness. */ -extern int __syscall_truncate64 (const char *path, int dummy, +extern int __syscall_truncate64 (const char *__unbounded path, int dummy, int high_length, int low_length); @@ -50,7 +51,7 @@ truncate64 (const char *path, off64_t length) #ifndef __ASSUME_TRUNCATE64_SYSCALL int saved_errno = errno; #endif - int result = INLINE_SYSCALL (truncate64, 3, path, 0, + int result = INLINE_SYSCALL (truncate64, 3, CHECK_STRING (path), 0, __LONG_LONG_PAIR (high, low)); #ifndef __ASSUME_TRUNCATE64_SYSCALL if (result != -1 || errno != ENOSYS) diff --git a/sysdeps/unix/sysv/linux/mips/ustat.c b/sysdeps/unix/sysv/linux/mips/ustat.c index 63eb68c602..2afc3e7ae1 100644 --- a/sysdeps/unix/sysv/linux/mips/ustat.c +++ b/sysdeps/unix/sysv/linux/mips/ustat.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -23,8 +23,9 @@ #include #include +#include -extern int __syscall_ustat (unsigned long dev, struct ustat *ubuf); +extern int __syscall_ustat (unsigned long dev, struct ustat *__unbounded ubuf); int ustat (dev_t dev, struct ustat *ubuf) @@ -34,5 +35,5 @@ ustat (dev_t dev, struct ustat *ubuf) /* We must convert the value to dev_t type used by the kernel. */ k_dev = ((major (dev) & 0xff) << 8) | (minor (dev) & 0xff); - return INLINE_SYSCALL (ustat, 2, k_dev, ubuf); + return INLINE_SYSCALL (ustat, 2, k_dev, CHECK_1 (ubuf)); } diff --git a/sysdeps/unix/sysv/linux/mips/xmknod.c b/sysdeps/unix/sysv/linux/mips/xmknod.c index ba1b468b78..2fed00dbf6 100644 --- a/sysdeps/unix/sysv/linux/mips/xmknod.c +++ b/sysdeps/unix/sysv/linux/mips/xmknod.c @@ -1,5 +1,5 @@ /* xmknod call using old-style Unix mknod system call. - Copyright (C) 1991, 93, 95, 96, 97, 98 Free Software Foundation, Inc. + Copyright (C) 1991, 93, 95, 96, 97, 98, 00 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 @@ -24,8 +24,9 @@ #include #include +#include -extern int __syscall_mknod (const char *, unsigned long, unsigned int); +extern int __syscall_mknod (const char *__unbounded, unsigned long, unsigned int); /* Create a device file named PATH, with permission and special bits MODE and device number DEV (which can be constructed from major and minor @@ -44,7 +45,7 @@ __xmknod (int vers, const char *path, mode_t mode, dev_t *dev) /* We must convert the value to dev_t type used by the kernel. */ k_dev = ((major (*dev) & 0xff) << 8) | (minor (*dev) & 0xff); - return INLINE_SYSCALL (mknod, 3, path, mode, k_dev); + return INLINE_SYSCALL (mknod, 3, CHECK_STRING (path), mode, k_dev); } weak_alias (__xmknod, _xmknod) From 74cb5b6093708f2368253cedf65b555c165ed558 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 10 Jul 2000 13:51:45 +0000 Subject: [PATCH 2159/4487] 2000-07-10 Maciej W. Rozycki * sysdeps/mips/dl-machine.h (elf_machine_runtime_link_map): Verify that gpreg really points to the GOT section of the calling object. Scan all PT_LOAD segments of objects for stub_pc, instead of only checking a start address of first one. Fix typos. * sysdeps/mips/mips64/dl-machine.h (elf_machine_runtime_link_map): Likewise. * sysdeps/mips/dl-machine.h (__dl_runtime_resolve): Fix a typo. --- sysdeps/mips/dl-machine.h | 64 +++++++++++++++++--------------- sysdeps/mips/mips64/dl-machine.h | 61 ++++++++++++++++-------------- 2 files changed, 69 insertions(+), 56 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index f08afa9c7f..e1b9163526 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -141,9 +141,9 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc) extern int _dl_mips_gnu_objects; /* got[1] is reserved to keep its link map address for the shared - object generated by gnu linker. If all are such object, we can - find link map from current GPREG simply. If not so, get link map - for callers object containing STUB_PC. */ + object generated by the gnu linker. If all are such objects, we + can find the link map from current GPREG simply. If not so, get + the link map for caller's object containing STUB_PC. */ if (_dl_mips_gnu_objects) { @@ -153,45 +153,51 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc) g1 = ((ElfW(Word) *) got)[1]; if ((g1 & ELF_MIPS_GNU_GOT1_MASK) != 0) - return (struct link_map *) (g1 & ~ELF_MIPS_GNU_GOT1_MASK); + { + struct link_map *l = + (struct link_map *) (g1 & ~ELF_MIPS_GNU_GOT1_MASK); + ElfW(Addr) base, limit; + const ElfW(Phdr) *p = l->l_phdr; + ElfW(Half) this, nent = l->l_phnum; + + /* For the common case of a stub being called from the containing + object, STUB_PC will point to somewhere within the object that + is described by the link map fetched via got[1]. Otherwise we + have to scan all maps. */ + for (this = 0; this < nent; this++) + { + if (p[this].p_type == PT_LOAD) + { + base = p[this].p_vaddr + l->l_addr; + limit = base + p[this].p_memsz; + if (stub_pc >= base && stub_pc < limit) + return l; + } + } + } } { struct link_map *l = _dl_loaded; - struct link_map *ret = 0; - ElfW(Addr) candidate = 0; while (l) { - ElfW(Addr) base = 0; + ElfW(Addr) base, limit; const ElfW(Phdr) *p = l->l_phdr; ElfW(Half) this, nent = l->l_phnum; - /* Get the base. */ - for (this = 0; this < nent; this++) - if (p[this].p_type == PT_LOAD) - { - base = p[this].p_vaddr + l->l_addr; - break; - } - if (! base) - { - l = l->l_next; - continue; - } - - /* Find closest link base addr. */ - if ((base < stub_pc) && (candidate < base)) + for (this = 0; this < nent; ++this) { - candidate = base; - ret = l; + if (p[this].p_type == PT_LOAD) + { + base = p[this].p_vaddr + l->l_addr; + limit = base + p[this].p_memsz; + if (stub_pc >= base && stub_pc < limit) + return l; + } } l = l->l_next; } - if (candidate && ret && (candidate < stub_pc)) - return ret; - else if (!candidate) - return _dl_loaded; } _dl_signal_error (0, NULL, "cannot find runtime link map"); @@ -208,7 +214,7 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc) Other architectures call fixup from dl-runtime.c in _dl_runtime_resolve. MIPS instead calls __dl_runtime_resolve. We have to use our own version because of the way the got section is - treaded on MIPS (we've also got ELF_MACHINE_PLT defined). */ + treated on MIPS (we've also got ELF_MACHINE_PLT defined). */ #define ELF_MACHINE_RUNTIME_TRAMPOLINE \ /* The flag _dl_mips_gnu_objects is set if all dynamic objects are \ diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h index c2f2f6e939..024476b66b 100644 --- a/sysdeps/mips/mips64/dl-machine.h +++ b/sysdeps/mips/mips64/dl-machine.h @@ -252,9 +252,9 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc) extern int _dl_mips_gnu_objects; /* got[1] is reserved to keep its link map address for the shared - object generated by gnu linker. If all are such object, we can - find link map from current GPREG simply. If not so, get link map - for callers object containing STUB_PC. */ + object generated by the gnu linker. If all are such objects, we + can find the link map from current GPREG simply. If not so, get + the link map for caller's object containing STUB_PC. */ if (_dl_mips_gnu_objects) { @@ -264,45 +264,52 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc) g1 = ((ElfW(Word) *) got)[1]; if ((g1 & ELF_MIPS_GNU_GOT1_MASK) != 0) - return (struct link_map *) (g1 & ~ELF_MIPS_GNU_GOT1_MASK); + { + struct link_map *l = + (struct link_map *) (g1 & ~ELF_MIPS_GNU_GOT1_MASK); + ElfW(Addr) base, limit; + const ElfW(Phdr) *p = l->l_phdr; + ElfW(Half) this, nent = l->l_phnum; + + /* For the common case of a stub being called from the containing + object, STUB_PC will point to somewhere within the object that + is described by the link map fetched via got[1]. Otherwise we + have to scan all maps. */ + for (this = 0; this < nent; this++) + { + if (p[this].p_type == PT_LOAD) + { + base = p[this].p_vaddr + l->l_addr; + limit = base + p[this].p_memsz; + if (stub_pc >= base && stub_pc < limit) + return l; + } + this++; + } + } } { struct link_map *l = _dl_loaded; - struct link_map *ret = 0; - ElfW(Addr) candidate = 0; while (l) { - ElfW(Addr) base = 0; + ElfW(Addr) base, limit; const ElfW(Phdr) *p = l->l_phdr; ElfW(Half) this, nent = l->l_phnum; - /* Get the base. */ for (this = 0; this < nent; this++) - if (p[this].p_type == PT_LOAD) - { - base = p[this].p_vaddr + l->l_addr; - break; - } - if (! base) - { - l = l->l_next; - continue; - } - - /* Find closest link base addr. */ - if ((base < stub_pc) && (candidate < base)) { - candidate = base; - ret = l; + if (p[this].p_type == PT_LOAD) + { + base = p[this].p_vaddr + l->l_addr; + limit = base + p[this].p_memsz; + if (stub_pc >= base && stub_pc < limit) + return l; + } } l = l->l_next; } - if (candidate && ret && (candidate < stub_pc)) - return ret; - else if (!candidate) - return _dl_loaded; } _dl_signal_error (0, NULL, "cannot find runtime link map"); From cc5d8c397bcfb79eeda19ba74dd9f14fa61c129e Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 10 Jul 2000 16:23:37 +0000 Subject: [PATCH 2160/4487] * sysdeps/unix/sysv/linux/i386/sigaction.c: Make alias weak since it's overridden by libpthreads. * sysdeps/unix/sysv/linux/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/arm/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/ia64/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c: Likewise. --- sysdeps/unix/sysv/linux/arm/sigaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/arm/sigaction.c b/sysdeps/unix/sysv/linux/arm/sigaction.c index 5be2fff69c..53f24c4992 100644 --- a/sysdeps/unix/sysv/linux/arm/sigaction.c +++ b/sysdeps/unix/sysv/linux/arm/sigaction.c @@ -149,5 +149,5 @@ __libc_sigaction (sig, act, oact) return result; } -strong_alias (__libc_sigaction, __sigaction) +weak_alias (__libc_sigaction, __sigaction) weak_alias (__libc_sigaction, sigaction) From 8af640138799df47b32c737d60d17aa0ecf8985b Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 13 Jul 2000 11:46:49 +0000 Subject: [PATCH 2161/4487] Add libgcc frame handling functions. --- sysdeps/unix/sysv/linux/mips/Versions | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sysdeps/unix/sysv/linux/mips/Versions b/sysdeps/unix/sysv/linux/mips/Versions index 519295ffa2..b5cb918d9d 100644 --- a/sysdeps/unix/sysv/linux/mips/Versions +++ b/sysdeps/unix/sysv/linux/mips/Versions @@ -1,5 +1,10 @@ libc { GLIBC_2.0 { + # Exception handling support functions from libgcc + __register_frame; __register_frame_table; __deregister_frame; + __register_frame_info; __deregister_frame_info; __frame_state_for; + __register_frame_info_table; + # Needed by gcc: _flush_cache; From 84b5ff5c97132de45106fcb0f14d83497db8c228 Mon Sep 17 00:00:00 2001 From: Greg McGary Date: Mon, 17 Jul 2000 22:28:59 +0000 Subject: [PATCH 2162/4487] * sysdeps/unix/make-syscalls.sh: Handle new arg signature keyletters F, I, S, W. Remove unused keyletter V. Surround signature argnames with angle-brackets for use as word delimiters, and to induce syntax errors for any args not handled. Split multi-echo echoes and comment each stage. * sysdeps/unix/common/syscalls.list: Refine & correct signatures. * sysdeps/unix/inet/syscalls.list: Likewise. * sysdeps/unix/mman/syscalls.list: Likewise. * sysdeps/unix/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/mips/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/syscalls.list: Likewise. * sysdeps/unix/sysv/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/powerpc/syscalls.list --- sysdeps/unix/sysv/linux/mips/syscalls.list | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index 117e7dd0fa..71a1aa28f0 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -9,14 +9,14 @@ cacheflush - cacheflush i:pii _flush_cache cacheflush sysmips - sysmips i:iiii __sysmips sysmips # override select.S in parent directory: -select - select i:ipppp __select select +select - select i:iPPPP __select select sigsuspend - sigsuspend i:p __sigsuspend sigsuspend # # Socket functions; Linux/MIPS doesn't use the socketcall(2) wrapper; # it's provided for compatibility, though. # -accept - accept i:ipp __libc_accept __accept accept +accept - accept i:iBN __libc_accept __accept accept bind - bind i:ipi __bind bind connect - connect i:ipi __libc_connect __connect connect getpeername - getpeername i:ipp __getpeername getpeername @@ -24,7 +24,7 @@ getsockname - getsockname i:ipp __getsockname getsockname getsockopt - getsockopt i:iiiBN __getsockopt getsockopt listen - listen i:ii __listen listen recv - recv i:ibni __libc_recv __recv recv -recvfrom - recvfrom i:ibnibN __libc_recvfrom __recvfrom recvfrom +recvfrom - recvfrom i:ibniBN __libc_recvfrom __recvfrom recvfrom recvmsg - recvmsg i:ipi __libc_recvmsg __recvmsg recvmsg send - send i:ibni __libc_send __send send sendmsg - sendmsg i:ipi __libc_sendmsg __sendmsg sendmsg From 23e6128c4e01c989025f64d56809ce3c51226c82 Mon Sep 17 00:00:00 2001 From: Greg McGary Date: Mon, 17 Jul 2000 22:36:16 +0000 Subject: [PATCH 2163/4487] * sysdeps/generic/bp-checks.h: Use unbounded __memchr rather than non-existent __ubp_memchr. (CHECK_STRINGopt, CHECK_FCNTL, BOUNDED_N, BOUNDED_1): New macros. (_CHECK_STRING, _CHECK_N): New macros. (CHECK_STRING, CHECK_N, CHECK_Nopt): Rewrite in terms of _CHECK_*. (CHECK_IOCTL): Move inside `#if !__ASSEMBLER__'. * sysdeps/alpha/memchr.S: Change strong name to "__memchr". Add weak alias "memchr". * sysdeps/generic/memchr.c: Likewise. * sysdeps/i386/memchr.S: Likewise. * sysdeps/ia64/memchr.S: Likewise. * sysdeps/m68k/memchr.S: Likewise. * sysdeps/sparc/sparc32/memchr.S: Likewise. * sysdeps/sparc/sparc64/memchr.S: Likewise. * sysdeps/vax/memchr.s: Likewise. --- sysdeps/alpha/memchr.S | 8 +++++--- sysdeps/m68k/memchr.S | 8 ++++---- sysdeps/vax/memchr.s | 5 ++++- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/sysdeps/alpha/memchr.S b/sysdeps/alpha/memchr.S index 0ea4aa1b3d..58899f346b 100644 --- a/sysdeps/alpha/memchr.S +++ b/sysdeps/alpha/memchr.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. +/* Copyright (C) 1996, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger (davidm@cs.arizona.edu). @@ -37,7 +37,7 @@ For correctness consider that: .set noreorder .set noat -ENTRY(memchr) +ENTRY(__memchr) #ifdef PROF ldgp gp, 0(pv) lda AT, _mcount @@ -167,4 +167,6 @@ $not_found: mov zero, v0 #-e0 : ret # .. e1 : - END(memchr) + END(__memchr) + +weak_alias (__stpcpy, stpcpy) diff --git a/sysdeps/m68k/memchr.S b/sysdeps/m68k/memchr.S index a1599f8d89..968c129eb3 100644 --- a/sysdeps/m68k/memchr.S +++ b/sysdeps/m68k/memchr.S @@ -1,7 +1,7 @@ /* memchr (str, ch, n) -- Return pointer to first occurrence of CH in the first N bytes of STR. For Motorola 68000. - 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 Andreas Schwab . @@ -24,7 +24,7 @@ #include "asm-syntax.h" TEXT -ENTRY(memchr) +ENTRY(__memchr) /* Save the callee-saved registers we use. */ moveml R(d2)-R(d4),MEM_PREDEC(sp) @@ -223,6 +223,6 @@ L(L9:) movel R(a0),R(d0) moveml MEM_POSTINC(sp),R(d2)-R(d4) rts -END(strchr) +END(__memchr) -weak_alias (strchr, index) +weak_alias (__memchr, memchr) diff --git a/sysdeps/vax/memchr.s b/sysdeps/vax/memchr.s index 18120b06ac..22a8c2dc73 100644 --- a/sysdeps/vax/memchr.s +++ b/sysdeps/vax/memchr.s @@ -45,7 +45,7 @@ #include "DEFS.h" -ENTRY(memchr, 0) +ENTRY(__memchr, 0) movq 4(ap),r1 # r1 = cp; r2 = c movl 12(ap),r0 # r0 = n movzwl $65535,r4 # handy constant @@ -67,3 +67,6 @@ ENTRY(memchr, 0) decw r0 # from 0 to 65535 subl2 r0,r4 # adjust n brb 0b # and loop + +weak_alias (__memchr, memchr) + \ No newline at end of file From f37f52a54658b7b2e85687b9604e3ef255a40bb8 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 18 Jul 2000 08:40:57 +0000 Subject: [PATCH 2164/4487] Fix copy & error in weak_alias. --- sysdeps/alpha/memchr.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/alpha/memchr.S b/sysdeps/alpha/memchr.S index 58899f346b..5947a0bdef 100644 --- a/sysdeps/alpha/memchr.S +++ b/sysdeps/alpha/memchr.S @@ -169,4 +169,4 @@ $not_found: END(__memchr) -weak_alias (__stpcpy, stpcpy) +weak_alias (__memchr, memchr) From 4ce0ef7a866f767adefa3c1b62874f18f0406d21 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 18 Jul 2000 14:14:51 +0000 Subject: [PATCH 2165/4487] (elf_machine_rela): Pass 0 instead of NULL to elf_machine_fixup_plt t argument to silence GCC. --- sysdeps/alpha/dl-machine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index a7f13e0192..33c32fa5e8 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -497,7 +497,7 @@ elf_machine_rela (struct link_map *map, if (r_type == R_ALPHA_GLOB_DAT) *reloc_addr = sym_value; else if (r_type == R_ALPHA_JMP_SLOT) - elf_machine_fixup_plt (map, NULL, reloc, reloc_addr, sym_value); + elf_machine_fixup_plt (map, 0, reloc, reloc_addr, sym_value); else if (r_type == R_ALPHA_REFQUAD) { void *reloc_addr_1 = reloc_addr; From f8bc20d3faa862b89cb04b77b2de3d4aec65ca92 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 20 Jul 2000 22:52:53 +0000 Subject: [PATCH 2166/4487] Define RTLD_NOLOAD and RTLD_NODELETE. --- sysdeps/mips/bits/dlfcn.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/sysdeps/mips/bits/dlfcn.h b/sysdeps/mips/bits/dlfcn.h index 0da3a67a92..006eeb6838 100644 --- a/sysdeps/mips/bits/dlfcn.h +++ b/sysdeps/mips/bits/dlfcn.h @@ -22,20 +22,24 @@ #endif /* The MODE argument to `dlopen' contains one of the following: */ -#define RTLD_LAZY 0x001 /* Lazy function call binding. */ -#define RTLD_NOW 0x002 /* Immediate function call binding. */ -#define RTLD_BINDING_MASK 0x3 /* Mask of binding time value. */ +#define RTLD_LAZY 0x0001 /* Lazy function call binding. */ +#define RTLD_NOW 0x0002 /* Immediate function call binding. */ +#define RTLD_BINDING_MASK 0x3 /* Mask of binding time value. */ +#define RTLD_NOLOAD 0x00008 /* Do not load the object. */ /* If the following bit is set in the MODE argument to `dlopen', the symbols of the loaded object and its dependencies are made visible as if the object were linked directly into the program. */ -#define RTLD_GLOBAL 0x004 +#define RTLD_GLOBAL 0x0004 /* Unix98 demands the following flag which is the inverse to RTLD_GLOBAL. The implementation does this by default and so we can define the value to zero. */ #define RTLD_LOCAL 0 +/* Do not delete object when closed. */ +#define RTLD_NODELETE 0x01000 + #ifdef __USE_GNU /* To support profiling of shared objects it is a good idea to call the function found using `dlsym' using the following macro since From b297c341de8a2baf1f9cbbd85bc00fcd402148b2 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 24 Jul 2000 13:33:15 +0000 Subject: [PATCH 2167/4487] Remove mmap64 alias. --- sysdeps/unix/sysv/linux/m68k/mmap.S | 1 - 1 file changed, 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/m68k/mmap.S b/sysdeps/unix/sysv/linux/m68k/mmap.S index c7015ae8b0..94578311b3 100644 --- a/sysdeps/unix/sysv/linux/m68k/mmap.S +++ b/sysdeps/unix/sysv/linux/m68k/mmap.S @@ -41,4 +41,3 @@ ENTRY (__mmap) PSEUDO_END (__mmap) weak_alias (__mmap, mmap) -weak_alias (__mmap, mmap64) From c52761c183c4d9912a27751869a0e326ae3de49e Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 25 Jul 2000 10:32:02 +0000 Subject: [PATCH 2168/4487] * sysdeps/mips/dl-machine.h (_RTLD_PROLOGUE): Stringify using __STRING(entry) and not #entry. (_RTLD_EPILOGUE): Likewise. * sysdeps/mips/mips64/dl-machine.h: Likewise. --- sysdeps/mips/dl-machine.h | 8 ++++---- sysdeps/mips/mips64/dl-machine.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index e1b9163526..d1ac5ccfb7 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -37,13 +37,13 @@ #define OFFSET_GP_GOT 0x7ff0 #ifndef _RTLD_PROLOGUE -# define _RTLD_PROLOGUE(entry) "\n\t.globl " #entry \ - "\n\t.ent " #entry \ - "\n\t" #entry ":\n\t" +# define _RTLD_PROLOGUE(entry) "\n\t.globl " __STRING(entry) \ + "\n\t.ent " __STRING(entry) \ + "\n\t" __STRING(entry) ":\n\t" #endif #ifndef _RTLD_EPILOGUE -# define _RTLD_EPILOGUE(entry) "\t.end " #entry "\n" +# define _RTLD_EPILOGUE(entry) "\t.end " __STRING(entry) "\n" #endif /* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h index 024476b66b..195a1d3634 100644 --- a/sysdeps/mips/mips64/dl-machine.h +++ b/sysdeps/mips/mips64/dl-machine.h @@ -32,13 +32,13 @@ #endif #ifndef _RTLD_PROLOGUE -# define _RTLD_PROLOGUE(entry) "\n\t.globl " #entry \ - "\n\t.ent " #entry \ - "\n\t" #entry ":\n\t" +# define _RTLD_PROLOGUE(entry) "\n\t.globl " __STRING(entry) \ + "\n\t.ent " __STRING(entry) \ + "\n\t" __STRING(entry) ":\n\t" #endif #ifndef _RTLD_EPILOGUE -# define _RTLD_EPILOGUE(entry) "\t.end " #entry "\n" +# define _RTLD_EPILOGUE(entry) "\t.end " __STRING(entry) "\n" #endif /* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. From ca67152c2a58c20470ed73721f4df1a6235e89dc Mon Sep 17 00:00:00 2001 From: Greg McGary Date: Wed, 26 Jul 2000 18:21:15 +0000 Subject: [PATCH 2169/4487] * sysdeps/generic/bp-checks.h (__memchr): Remove incorrect decl. (__ubp_memchr): Add correct decl. (_CHECK_STRING): Use __ubp_memchr. * sysdeps/alpha/memchr.S [!__BOUNDED_POINTERS__] (__ubp_memchr): New alias for unbounded-pointer __memchr. * sysdeps/i386/memchr.S: Likewise. * sysdeps/ia64/memchr.S: Likewise. * sysdeps/m68k/memchr.S: Likewise. * sysdeps/sparc/sparc32/memchr.S: Likewise. * sysdeps/sparc/sparc64/memchr.S: Likewise. * sysdeps/vax/memchr.s: Likewise. --- sysdeps/alpha/memchr.S | 5 ++++- sysdeps/m68k/memchr.S | 3 +++ sysdeps/vax/memchr.s | 4 +++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/memchr.S b/sysdeps/alpha/memchr.S index 5947a0bdef..c4e1d5e7aa 100644 --- a/sysdeps/alpha/memchr.S +++ b/sysdeps/alpha/memchr.S @@ -67,7 +67,7 @@ ENTRY(__memchr) unop # : sll a1, 32, t1 #-e0 : t1 = chchchch00000000 or t1, a1, a1 # e1 : a1 = chchchchchchchch - extql t0, a0, t6 # e0 : + extql t0, a0, t6 # e0 : beq t3, $first_quad # .. e1 : ldq_u t5, -1(t4) #-e1 : eight or less bytes to search @@ -170,3 +170,6 @@ $not_found: END(__memchr) weak_alias (__memchr, memchr) +#if !__BOUNDED_POINTERS__ +weak_alias (__memchr, __ubp_memchr) +#endif diff --git a/sysdeps/m68k/memchr.S b/sysdeps/m68k/memchr.S index 968c129eb3..d69b806667 100644 --- a/sysdeps/m68k/memchr.S +++ b/sysdeps/m68k/memchr.S @@ -226,3 +226,6 @@ L(L9:) END(__memchr) weak_alias (__memchr, memchr) +#if !__BOUNDED_POINTERS__ +weak_alias (__memchr, __ubp_memchr) +#endif diff --git a/sysdeps/vax/memchr.s b/sysdeps/vax/memchr.s index 22a8c2dc73..5c54ba8e79 100644 --- a/sysdeps/vax/memchr.s +++ b/sysdeps/vax/memchr.s @@ -69,4 +69,6 @@ ENTRY(__memchr, 0) brb 0b # and loop weak_alias (__memchr, memchr) - \ No newline at end of file +#if !__BOUNDED_POINTERS__ +weak_alias (__memchr, __ubp_memchr) +#endif From 1e43162758b695b846ebaa61700f543cee8790f4 Mon Sep 17 00:00:00 2001 From: Greg McGary Date: Thu, 27 Jul 2000 06:13:09 +0000 Subject: [PATCH 2170/4487] * sysdeps/gnu/bits/msq.h: Qualify kernel's data structure pointers as __unbounded. * sysdeps/unix/sysv/linux/mips/bits/shm.h: Likewise. * sysdeps/generic/bp-semctl.h: New file. * sysdeps/unix/sysv/linux/msgctl.c: Qualify kernel's data structure pointers as __unbounded. Check bounds of syscall args. * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. * sysdeps/unix/sysv/linux/semctl.c: Likewise. * sysdeps/unix/sysv/linux/semop.c: Likewise. * sysdeps/unix/sysv/linux/shmat.c: Likewise. * sysdeps/unix/sysv/linux/shmctl.c: Likewise. * sysdeps/unix/sysv/linux/shmdt.c: Likewise. * sysdeps/unix/sysv/linux/alpha/msgctl.c: Likewise. * sysdeps/unix/sysv/linux/alpha/semctl.c: Likewise. * sysdeps/unix/sysv/linux/alpha/shmctl.c: Likewise. * sysdeps/unix/sysv/linux/i386/msgctl.c: Likewise. * sysdeps/unix/sysv/linux/i386/semctl.c: Likewise. * sysdeps/unix/sysv/linux/i386/shmctl.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/msgctl.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/semctl.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/shmctl.c: Likewise. --- sysdeps/unix/sysv/linux/alpha/msgctl.c | 18 +++++++++--------- sysdeps/unix/sysv/linux/alpha/semctl.c | 15 +++++++++++---- sysdeps/unix/sysv/linux/alpha/shmctl.c | 13 +++++++------ sysdeps/unix/sysv/linux/mips/bits/shm.h | 6 +++--- 4 files changed, 30 insertions(+), 22 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/msgctl.c b/sysdeps/unix/sysv/linux/alpha/msgctl.c index 709b5c0315..c56829937b 100644 --- a/sysdeps/unix/sysv/linux/alpha/msgctl.c +++ b/sysdeps/unix/sysv/linux/alpha/msgctl.c @@ -24,19 +24,20 @@ #include #include #include +#include #include "kernel-features.h" struct __old_msqid_ds { struct __old_ipc_perm msg_perm; /* structure describing operation permission */ - struct msg *__msg_first; /* pointer to first message on queue */ - struct msg *__msg_last; /* pointer to last message on queue */ + struct msg *__unbounded __msg_first; /* pointer to first message on queue */ + struct msg *__unbounded __msg_last; /* pointer to last message on queue */ __time_t msg_stime; /* time of last msgsnd command */ __time_t msg_rtime; /* time of last msgrcv command */ __time_t msg_ctime; /* time of last change */ - struct wait_queue *__wwait; /* ??? */ - struct wait_queue *__rwait; /* ??? */ + struct wait_queue *__unbounded __wwait; /* ??? */ + struct wait_queue *__unbounded __rwait; /* ??? */ unsigned short int __msg_cbytes; /* current number of bytes on queue */ unsigned short int msg_qnum; /* number of messages currently on queue */ unsigned short int msg_qbytes; /* max number of bytes allowed on queue */ @@ -57,7 +58,7 @@ __new_msgctl (int msqid, int cmd, struct msqid_ds *buf) of time. However, msg_qnum and msg_qbytes changed size at the same time the size of uid changed elsewhere. */ #if __ASSUME_32BITUIDS > 0 - return INLINE_SYSCALL (msgctl, 3, msqid, cmd | __IPC_64, buf); + return INLINE_SYSCALL (msgctl, 3, msqid, cmd | __IPC_64, CHECK_1 (buf)); #else switch (cmd) { case MSG_STAT: @@ -65,7 +66,7 @@ __new_msgctl (int msqid, int cmd, struct msqid_ds *buf) case IPC_SET: break; default: - return INLINE_SYSCALL (msgctl, 3, msqid, cmd, buf); + return INLINE_SYSCALL (msgctl, 3, msqid, cmd, CHECK_1 (buf)); } { @@ -74,7 +75,7 @@ __new_msgctl (int msqid, int cmd, struct msqid_ds *buf) /* Unfortunately there is no way how to find out for sure whether we should use old or new msgctl. */ - result = INLINE_SYSCALL (msgctl, 3, msqid, cmd | __IPC_64, buf); + result = INLINE_SYSCALL (msgctl, 3, msqid, cmd | __IPC_64, CHECK_1 (buf)); if (result != -1 || errno != EINVAL) return result; @@ -93,7 +94,7 @@ __new_msgctl (int msqid, int cmd, struct msqid_ds *buf) return -1; } } - result = INLINE_SYSCALL (msgctl, 3, msqid, cmd, &old); + result = INLINE_SYSCALL (msgctl, 3, msqid, cmd, __ptrvalue (&old)); if (result != -1 && cmd != IPC_SET) { memset(buf, 0, sizeof(*buf)); @@ -120,4 +121,3 @@ __new_msgctl (int msqid, int cmd, struct msqid_ds *buf) #include versioned_symbol (libc, __new_msgctl, msgctl, GLIBC_2_2); - diff --git a/sysdeps/unix/sysv/linux/alpha/semctl.c b/sysdeps/unix/sysv/linux/alpha/semctl.c index 4be4fb201a..48bc2d45cf 100644 --- a/sysdeps/unix/sysv/linux/alpha/semctl.c +++ b/sysdeps/unix/sysv/linux/alpha/semctl.c @@ -49,6 +49,9 @@ union semun struct seminfo *__buf; /* buffer for IPC_INFO */ }; +#include +#include /* definition of CHECK_SEMCTL needs union semum */ + extern int __syscall_semctl (int, int, int, void *); /* Return identifier for array of NSEMS semaphores associated with @@ -69,7 +72,8 @@ __new_semctl (int semid, int semnum, int cmd, ...) va_end (ap); #if __ASSUME_32BITUIDS > 0 - return INLINE_SYSCALL (semctl, 4, semid, semnum, cmd | __IPC_64, &arg); + return INLINE_SYSCALL (semctl, 4, semid, semnum, cmd | __IPC_64, + CHECK_SEMCTL (&arg, semid, cmd | __IPC_64)); #else switch (cmd) { case SEM_STAT: @@ -77,7 +81,8 @@ __new_semctl (int semid, int semnum, int cmd, ...) case IPC_SET: break; default: - return INLINE_SYSCALL (semctl, 4, semid, semnum, cmd, &arg); + return INLINE_SYSCALL (semctl, 4, semid, semnum, cmd, + CHECK_SEMCTL (&arg, semid, cmd)); } { @@ -87,7 +92,8 @@ __new_semctl (int semid, int semnum, int cmd, ...) /* Unfortunately there is no way how to find out for sure whether we should use old or new semctl. */ - result = INLINE_SYSCALL (semctl, 4, semid, semnum, cmd | __IPC_64, &arg); + result = INLINE_SYSCALL (semctl, 4, semid, semnum, cmd | __IPC_64, + CHECK_SEMCTL (&arg, semid, cmd | __IPC_64)); if (result != -1 || errno != EINVAL) return result; @@ -106,7 +112,8 @@ __new_semctl (int semid, int semnum, int cmd, ...) return -1; } } - result = INLINE_SYSCALL (semctl, 4, semid, semnum, cmd, &arg); + result = INLINE_SYSCALL (semctl, 4, semid, semnum, cmd, + CHECK_SEMCTL (&arg, semid, cmd)); if (result != -1 && cmd != IPC_SET) { memset(buf, 0, sizeof(*buf)); diff --git a/sysdeps/unix/sysv/linux/alpha/shmctl.c b/sysdeps/unix/sysv/linux/alpha/shmctl.c index 70c420dccb..bd5b881651 100644 --- a/sysdeps/unix/sysv/linux/alpha/shmctl.c +++ b/sysdeps/unix/sysv/linux/alpha/shmctl.c @@ -25,6 +25,7 @@ #include #include #include +#include #include "kernel-features.h" @@ -39,8 +40,8 @@ struct __old_shmid_ds __ipc_pid_t shm_lpid; /* pid of last shmop */ unsigned short int shm_nattch; /* number of current attaches */ unsigned short int __shm_npages; /* size of segment (pages) */ - unsigned long int *__shm_pages; /* array of ptrs to frames -> SHMMAX */ - struct vm_area_struct *__attaches; /* descriptors for attaches */ + unsigned long int *__unbounded __shm_pages; /* array of ptrs to frames -> SHMMAX */ + struct vm_area_struct *__unbounded __attaches; /* descriptors for attaches */ }; struct __old_shminfo @@ -61,7 +62,7 @@ int __new_shmctl (int shmid, int cmd, struct shmid_ds *buf) { #if __ASSUME_32BITUIDS > 0 - return INLINE_SYSCALL (shmctl, 3, shmid, cmd | __IPC_64, buf); + return INLINE_SYSCALL (shmctl, 3, shmid, cmd | __IPC_64, CHECK_1 (buf)); #else switch (cmd) { case SHM_STAT: @@ -70,7 +71,7 @@ __new_shmctl (int shmid, int cmd, struct shmid_ds *buf) case IPC_INFO: break; default: - return INLINE_SYSCALL (shmctl, 3, shmid, cmd, buf); + return INLINE_SYSCALL (shmctl, 3, shmid, cmd, CHECK_1 (buf)); } { @@ -79,7 +80,7 @@ __new_shmctl (int shmid, int cmd, struct shmid_ds *buf) /* Unfortunately there is no way how to find out for sure whether we should use old or new shmctl. */ - result = INLINE_SYSCALL (shmctl, 3, shmid, cmd | __IPC_64, buf); + result = INLINE_SYSCALL (shmctl, 3, shmid, cmd | __IPC_64, CHECK_1 (buf)); if (result != -1 || errno != EINVAL) return result; @@ -96,7 +97,7 @@ __new_shmctl (int shmid, int cmd, struct shmid_ds *buf) return -1; } } - result = INLINE_SYSCALL (shmctl, 3, shmid, cmd, &old); + result = INLINE_SYSCALL (shmctl, 3, shmid, cmd, __ptrvalue (&old)); if (result != -1 && (cmd == SHM_STAT || cmd == IPC_STAT)) { memset(buf, 0, sizeof(*buf)); diff --git a/sysdeps/unix/sysv/linux/mips/bits/shm.h b/sysdeps/unix/sysv/linux/mips/bits/shm.h index 20e75e009b..31c65a91a0 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/shm.h +++ b/sysdeps/unix/sysv/linux/mips/bits/shm.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 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 @@ -48,8 +48,8 @@ struct shmid_ds long int shm_lpid; /* pid of last shmop */ unsigned short int shm_nattch; /* number of current attaches */ unsigned short int __shm_npages; /* size of segment (pages) */ - unsigned long int *__shm_pages; /* array of ptrs to frames -> SHMMAX */ - struct vm_area_struct *__attaches; /* descriptors for attaches */ + unsigned long int *__unbounded __shm_pages; /* array of ptrs to frames -> SHMMAX */ + struct vm_area_struct *__unbounded __attaches; /* descriptors for attaches */ }; #ifdef __USE_MISC From 797c09d821d7e54e1faa5f1fe88e86e4ff18e19e Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 27 Jul 2000 15:12:23 +0000 Subject: [PATCH 2171/4487] Rename MSG_URG TO MSG_CONFIRM following kernel 2.4.0 (MSG_URG was never used). --- sysdeps/unix/sysv/linux/mips/bits/socket.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h index 299215aee7..d8626c2749 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/socket.h +++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h @@ -193,8 +193,8 @@ enum #define MSG_FIN MSG_FIN MSG_SYN = 0x400, #define MSG_SYN MSG_SYN - MSG_URG = 0x800, -#define MSG_URG MSG_URG + MSG_CONFIRM = 0x800, /* Confirm path validity. */ +#define MSG_CONFIRM MSG_CONFIRM MSG_RST = 0x1000, #define MSG_RST MSG_RST MSG_ERRQUEUE = 0x2000, /* Fetch message from error queue. */ From da671ea07a5fc4510abc569276c665f26a2c1b97 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 28 Jul 2000 13:37:26 +0000 Subject: [PATCH 2172/4487] * sysdeps/unix/sysv/linux/mips/Dist: Add sys/tas.h. * sysdeps/unix/sysv/linux/mips/Makefile (sysdep_routines): Add _test_and_set. (headers): Add sys/tas.h. * sysdeps/unix/sysv/linux/mips/Versions: Export _test_and_set for GLIBC_2.2 from libc. * sysdeps/unix/sysv/linux/mips/_test_and_set.c: New file. * sysdeps/unix/sysv/linux/mips/sys/tas.h: New file for _test_and_set. --- sysdeps/unix/sysv/linux/mips/Dist | 5 +- sysdeps/unix/sysv/linux/mips/Makefile | 4 +- sysdeps/unix/sysv/linux/mips/Versions | 4 ++ sysdeps/unix/sysv/linux/mips/_test_and_set.c | 30 ++++++++ sysdeps/unix/sysv/linux/mips/sys/tas.h | 76 ++++++++++++++++++++ 5 files changed, 115 insertions(+), 4 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/mips/_test_and_set.c create mode 100644 sysdeps/unix/sysv/linux/mips/sys/tas.h diff --git a/sysdeps/unix/sysv/linux/mips/Dist b/sysdeps/unix/sysv/linux/mips/Dist index 576aef8046..4675db6793 100644 --- a/sysdeps/unix/sysv/linux/mips/Dist +++ b/sysdeps/unix/sysv/linux/mips/Dist @@ -1,10 +1,11 @@ clone.S +entry.h kernel_sigaction.h kernel_stat.h kernel_termios.h -entry.h -xstatconv.c sys/acct.h sys/cachectl.h sys/procfs.h sys/sysmips.h +sys/tas.h +xstatconv.c diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile index 41451ca7d1..65365e129a 100644 --- a/sysdeps/unix/sysv/linux/mips/Makefile +++ b/sysdeps/unix/sysv/linux/mips/Makefile @@ -5,7 +5,7 @@ sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \ endif ifeq ($(subdir),misc) -sysdep_routines += cachectl cacheflush sysmips +sysdep_routines += cachectl cacheflush sysmips _test_and_set -headers += sys/cachectl.h sys/sysmips.h +headers += sys/cachectl.h sys/sysmips.h sys/tas.h endif diff --git a/sysdeps/unix/sysv/linux/mips/Versions b/sysdeps/unix/sysv/linux/mips/Versions index b5cb918d9d..d65bf18cb0 100644 --- a/sysdeps/unix/sysv/linux/mips/Versions +++ b/sysdeps/unix/sysv/linux/mips/Versions @@ -14,4 +14,8 @@ libc { # s* sysmips; } + GLIBC_2.2 { + # _* + _test_and_set; + } } diff --git a/sysdeps/unix/sysv/linux/mips/_test_and_set.c b/sysdeps/unix/sysv/linux/mips/_test_and_set.c new file mode 100644 index 0000000000..870b12a142 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/_test_and_set.c @@ -0,0 +1,30 @@ +/* Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Maciej W. Rozycki , 2000. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* Define the real-function versions of all inline functions + defined in sys/tas.h */ + +#include + +#define _EXTERN_INLINE +#ifndef __USE_EXTERN_INLINES +# define __USE_EXTERN_INLINES 1 +#endif + +#include "sys/tas.h" diff --git a/sysdeps/unix/sysv/linux/mips/sys/tas.h b/sysdeps/unix/sysv/linux/mips/sys/tas.h new file mode 100644 index 0000000000..b24aabb46a --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/sys/tas.h @@ -0,0 +1,76 @@ +/* Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Maciej W. Rozycki , 2000. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_TAS_H +#define _SYS_TAS_H 1 + +#include +#include +#include + +__BEGIN_DECLS + +extern int _test_and_set (int *p, int v) __THROW; + +#ifdef __USE_EXTERN_INLINES + +# ifndef _EXTERN_INLINE +# define _EXTERN_INLINE extern __inline +# endif + +# if (_MIPS_ISA >= _MIPS_ISA_MIPS2) + +_EXTERN_INLINE int +_test_and_set (int *p, int v) __THROW +{ + int r, t; + + __asm__ __volatile__ + ("1:\n\t" + "ll %0,%3\n\t" + ".set push\n\t" + ".set noreorder\n\t" + "beq %0,%4,2f\n\t" + " move %1,%4\n\t" + ".set pop\n\t" + "sc %1,%2\n\t" + "beqz %1,1b\n" + "2:" + : "=&r" (r), "=&r" (t), "=m" (*p) + : "m" (*p), "r" (v) + : "memory"); + + return r; +} + +# else /* !(_MIPS_ISA >= _MIPS_ISA_MIPS2) */ + +_EXTERN_INLINE int +_test_and_set (int *p, int v) __THROW +{ + return sysmips (MIPS_ATOMIC_SET, (int) p, v, 0); +} + +# endif /* !(_MIPS_ISA >= _MIPS_ISA_MIPS2) */ + +#endif /* __USE_EXTERN_INLINES */ + +__END_DECLS + +#endif /* sys/tas.h */ From e6bd4dbf3ad4eeaea903d3e271150b73f3af4a8a Mon Sep 17 00:00:00 2001 From: Greg McGary Date: Sat, 29 Jul 2000 08:09:56 +0000 Subject: [PATCH 2173/4487] * sysdeps/arm/frame.h (struct layout): Make pointers __unbounded. * sysdeps/generic/frame.h: Likewise. * sysdeps/generic/backtrace.c (ADVANCE_STACK_FRAME): Wrap bounds around return value. (__backtrace): Qualify frame-pointer chain and return address pointers as __unbounded. Wrap bounds around variable `current'. * sysdeps/generic/segfault.c (ADVANCE_STACK_FRAME): Wrap bounds around return value. (catch_segfault): Qualify frame-pointer chain and return address pointers as __unbounded. Wrap bounds around variable `current'. * sysdeps/i386/backtrace.c (struct layout): Make pointers __unbounded. (ADVANCE_STACK_FRAME): Wrap bounds around return value. * sysdeps/powerpc/backtrace.c (struct layout): Make pointers __unbounded. (__backtrace): Qualify frame-pointer chain and return address pointers as __unbounded. Wrap bounds around variable `current'. --- sysdeps/arm/frame.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/arm/frame.h b/sysdeps/arm/frame.h index 16f329c0e5..5d7ac0fb55 100644 --- a/sysdeps/arm/frame.h +++ b/sysdeps/arm/frame.h @@ -20,7 +20,7 @@ /* This is the APCS stack backtrace structure. */ struct layout { - struct layout *next; - void *sp; - void *return_address; + struct layout *__unbounded next; + void *__unbounded sp; + void *__unbounded return_address; }; From 63ac74aa9483fa76197f5e369bdfb3ac7677cd05 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 29 Jul 2000 18:03:21 +0000 Subject: [PATCH 2174/4487] (PSEUDO_RET): New macro. (ret): Redefine to PSEUDO_RET. (PSEUDO): Remove jump to syscall_error. --- sysdeps/unix/sysv/linux/arm/sysdep.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index c337af2b14..1413a48736 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -52,8 +52,13 @@ .type syscall_error,%function; \ ENTRY (name); \ DO_CALL (args, syscall_name); \ - cmn r0, $4096; \ - bhs PLTJMP(C_SYMBOL_NAME(__syscall_error)); + cmn r0, $4096; + +#define PSEUDO_RET \ + RETINSTR(movcc, pc, lr); \ + b PLTJMP(__syscall_error) +#undef ret +#define ret PSEUDO_RET #undef PSEUDO_END #define PSEUDO_END(name) \ From a27fd4306aa290fa0d61b14e0191709bb0cd31ef Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 29 Jul 2000 19:32:27 +0000 Subject: [PATCH 2175/4487] (fix_bad_pc24): New function. (elf_machine_rel): Use it for out-of-range PC24 relocs. --- sysdeps/arm/dl-machine.h | 46 ++++++++++++++++++++++++++++++++++------ 1 file changed, 39 insertions(+), 7 deletions(-) diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 44087585f0..cbef92f3ae 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -376,6 +376,37 @@ elf_machine_plt_value (struct link_map *map, const Elf32_Rel *reloc, extern char **_dl_argv; +/* Deal with an out-of-range PC24 reloc. */ +static Elf32_Addr +fix_bad_pc24 (Elf32_Addr *const reloc_addr, Elf32_Addr value) +{ + static void *fix_page; + static unsigned int fix_offset; + static size_t pagesize; + Elf32_Word *fix_address; + + if (! fix_page) + { + if (! pagesize) + pagesize = getpagesize (); + fix_page = mmap (NULL, pagesize, PROT_READ | PROT_WRITE | PROT_EXEC, + MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); + if (! fix_page) + assert (! "could not map page for fixup"); + fix_offset = 0; + } + + fix_address = (Elf32_Word *)(fix_page + fix_offset); + fix_address[0] = 0xe51ff004; /* ldr pc, [pc, #-4] */ + fix_address[1] = value; + + fix_offset += 8; + if (fix_offset >= pagesize) + fix_page = NULL; + + return (Elf32_Addr)fix_address; +} + /* Perform the relocation specified by RELOC and SYM (which is fully resolved). MAP is the object containing the reloc. */ @@ -452,18 +483,19 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, } case R_ARM_PC24: { - signed int addend; + Elf32_Sword addend; + Elf32_Addr newvalue; addend = *reloc_addr & 0x00ffffff; if (addend & 0x00800000) addend |= 0xff000000; - value = value - (unsigned int)reloc_addr + (addend << 2); - if (value & 0xfc000003) - _dl_signal_error (0, map->l_name, - "R_ARM_PC24 relocation out of range"); + newvalue = value - (Elf32_Addr)reloc_addr + (addend << 2); + if (newvalue & 0xfc000003) + newvalue = fix_bad_pc24(reloc_addr, value) + - (Elf32_Addr)reloc_addr + (addend << 2); - value = value >> 2; - value = (*reloc_addr & 0xff000000) | (value & 0x00ffffff); + newvalue = newvalue >> 2; + value = (*reloc_addr & 0xff000000) | (newvalue & 0x00ffffff); *reloc_addr = value; } break; From 69a935560b360253435c11a7f1dd75869b5c8076 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 30 Jul 2000 16:07:40 +0000 Subject: [PATCH 2176/4487] fcntl.h definitions for Linux/Arm. --- sysdeps/unix/sysv/linux/arm/bits/fcntl.h | 151 +++++++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/bits/fcntl.h diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h new file mode 100644 index 0000000000..de1dd4ab63 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h @@ -0,0 +1,151 @@ +/* O_*, F_*, FD_* bit values for Linux. + Copyright (C) 1995-1998, 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _FCNTL_H +# error "Never use directly; include instead." +#endif + + +#include + +/* open/fcntl - O_SYNC is only implemented on blocks devices and on files + located on an ext2 file system */ +#define O_ACCMODE 0003 +#define O_RDONLY 00 +#define O_WRONLY 01 +#define O_RDWR 02 +#define O_CREAT 0100 /* not fcntl */ +#define O_EXCL 0200 /* not fcntl */ +#define O_NOCTTY 0400 /* not fcntl */ +#define O_TRUNC 01000 /* not fcntl */ +#define O_APPEND 02000 +#define O_NONBLOCK 04000 +#define O_NDELAY O_NONBLOCK +#define O_SYNC 010000 +#define O_FSYNC O_SYNC +#define O_ASYNC 020000 + +#ifdef __USE_GNU +# define O_DIRECTORY 040000 /* Must be a directory. */ +# define O_NOFOLLOW 0100000 /* Do not follow links. */ +# define O_DIRECT 0200000 /* Direct disk access. */ +#endif + +#ifdef __USE_LARGEFILE64 +# define O_LARGEFILE 0400000 +#endif + +/* For now Linux has synchronisity options for data and read operations. + We define the symbols here but let them do the same as O_SYNC since + this is a superset. */ +#if defined __USE_POSIX199309 || defined __USE_UNIX98 +# define O_DSYNC O_SYNC /* Synchronize data. */ +# define O_RSYNC O_SYNC /* Synchronize read operations. */ +#endif + +/* Values for the second argument to `fcntl'. */ +#define F_DUPFD 0 /* Duplicate file descriptor. */ +#define F_GETFD 1 /* Get file descriptor flags. */ +#define F_SETFD 2 /* Set file descriptor flags. */ +#define F_GETFL 3 /* Get file status flags. */ +#define F_SETFL 4 /* Set file status flags. */ +#define F_GETLK 5 /* Get record locking info. */ +#define F_SETLK 6 /* Set record locking info (non-blocking). */ +#define F_SETLKW 7 /* Set record locking info (blocking). */ + +/* XXX missing */ +#define F_GETLK64 5 /* Get record locking info. */ +#define F_SETLK64 6 /* Set record locking info (non-blocking). */ +#define F_SETLKW64 7 /* Set record locking info (blocking). */ + +#if defined __USE_BSD || defined __USE_XOPEN2K +# define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */ +# define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */ +#endif + +#ifdef __USE_GNU +# define F_SETSIG 10 /* Set number of signal to be sent. */ +# define F_GETSIG 11 /* Get number of signal to be sent. */ +#endif + +/* For F_[GET|SET]FL. */ +#define FD_CLOEXEC 1 /* actually anything with low bit set goes */ + +/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */ +#define F_RDLCK 0 /* Read lock. */ +#define F_WRLCK 1 /* Write lock. */ +#define F_UNLCK 2 /* Remove lock. */ + +/* for old implementation of bsd flock () */ +#define F_EXLCK 4 /* or 3 */ +#define F_SHLCK 8 /* or 4 */ + +#ifdef __USE_BSD +/* Operations for bsd flock(), also used by the kernel implementation */ +# define LOCK_SH 1 /* shared lock */ +# define LOCK_EX 2 /* exclusive lock */ +# define LOCK_NB 4 /* or'd with one of the above to prevent + blocking */ +# define LOCK_UN 8 /* remove lock */ +#endif + +struct flock + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ +#ifndef __USE_FILE_OFFSET64 + __off_t l_start; /* Offset where the lock begins. */ + __off_t l_len; /* Size of the locked area; zero means until EOF. */ +#else + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ +#endif + __pid_t l_pid; /* Process holding the lock. */ + }; + +#ifdef __USE_LARGEFILE64 +struct flock64 + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ + __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. */ + }; +#endif + +/* Define some more compatibility macros to be backward compatible with + BSD systems which did not managed to hide these kernel macros. */ +#ifdef __USE_BSD +# define FAPPEND O_APPEND +# define FFSYNC O_FSYNC +# define FASYNC O_ASYNC +# define FNONBLOCK O_NONBLOCK +# define FNDELAY O_NDELAY +#endif /* Use BSD. */ + +/* Advise to `posix_fadvise'. */ +#ifdef __USE_XOPEN2K +# define POSIX_FADV_NORMAL 0 /* No further special treatment. */ +# define POSIX_FADV_RANDOM 1 /* Expect random page references. */ +# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */ +# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */ +# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ +#endif From 156a8cfcd42a907d368a331898b6b1431c42ebe4 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 31 Jul 2000 08:19:13 +0000 Subject: [PATCH 2177/4487] * sysdeps/unix/sysv/linux/mips/bits/sigstack.h: New file. On MIPS the order of struct sigaltstack members is different. --- sysdeps/unix/sysv/linux/mips/bits/sigstack.h | 55 ++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/mips/bits/sigstack.h diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigstack.h b/sysdeps/unix/sysv/linux/mips/bits/sigstack.h new file mode 100644 index 0000000000..a0f1ba67e8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/bits/sigstack.h @@ -0,0 +1,55 @@ +/* sigstack, sigaltstack definitions. + Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SIGNAL_H +# error "Never include this file directly. Use instead" +#endif + + +/* Structure describing a signal stack (obsolete). */ +struct sigstack + { + void *ss_sp; /* Signal stack pointer. */ + int ss_onstack; /* Nonzero if executing on this stack. */ + }; + + +/* Possible values for `ss_flags.'. */ +enum +{ + SS_ONSTACK = 1, +#define SS_ONSTACK SS_ONSTACK + SS_DISABLE +#define SS_DISABLE SS_DISABLE +}; + +/* Minimum stack size for a signal handler. */ +#define MINSIGSTKSZ 2048 + +/* System default stack size. */ +#define SIGSTKSZ 8192 + + +/* Alternate, preferred interface. */ +typedef struct sigaltstack + { + void *ss_sp; + size_t ss_size; + int ss_flags; + } stack_t; From 55fc2728f57697dff645a14e7bcd5aff2713bc6a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 1 Aug 2000 19:10:53 +0000 Subject: [PATCH 2178/4487] Add oldgetrlimit, oldsetrlimit for GLIBC_2.0. --- sysdeps/unix/sysv/linux/arm/syscalls.list | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/unix/sysv/linux/arm/syscalls.list b/sysdeps/unix/sysv/linux/arm/syscalls.list index 60303d3df7..61ac69948f 100644 --- a/sysdeps/unix/sysv/linux/arm/syscalls.list +++ b/sysdeps/unix/sysv/linux/arm/syscalls.list @@ -12,3 +12,5 @@ s_setresuid setresuid setresuid 3 __syscall_setresuid s_setreuid setreuid setreuid 2 __syscall_setreuid s_setuid setuid setuid 1 __syscall_setuid syscall - syscall 7 syscall +oldgetrlimit EXTRA getrlimit i:ip __old_getrlimit getrlimit@GLIBC_2.0 +oldsetrlimit EXTRA setrlimit i:ip __old_setrlimit setrlimit@GLIBC_2.0 From 305f4d2cd147d24c67edaabda857754b0a86e1a6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 1 Aug 2000 19:11:07 +0000 Subject: [PATCH 2179/4487] [subdir=resource] (sysdep_routines): Add oldgetrlimit, oldsetrlimit. --- sysdeps/unix/sysv/linux/arm/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile index 939c74cea7..f1b237dbe3 100644 --- a/sysdeps/unix/sysv/linux/arm/Makefile +++ b/sysdeps/unix/sysv/linux/arm/Makefile @@ -8,3 +8,7 @@ sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \ rt_sigqueueinfo rt_sigaction rt_sigpending \ sigrestorer endif + +ifeq ($(subdir),resource) +sysdep_routines += oldgetrlimit oldsetrlimit +endif From 8efcd38cde845b9324e419bed353ecfcc104a7f3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 2 Aug 2000 15:27:16 +0000 Subject: [PATCH 2180/4487] Undo last change. --- sysdeps/unix/sysv/linux/arm/Makefile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile index f1b237dbe3..939c74cea7 100644 --- a/sysdeps/unix/sysv/linux/arm/Makefile +++ b/sysdeps/unix/sysv/linux/arm/Makefile @@ -8,7 +8,3 @@ sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \ rt_sigqueueinfo rt_sigaction rt_sigpending \ sigrestorer endif - -ifeq ($(subdir),resource) -sysdep_routines += oldgetrlimit oldsetrlimit -endif From d4e2464608ec9de44e55efadca3bf840d1a095ec Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 2 Aug 2000 22:41:58 +0000 Subject: [PATCH 2181/4487] Add _test_and_set.c. --- sysdeps/unix/sysv/linux/mips/Dist | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/mips/Dist b/sysdeps/unix/sysv/linux/mips/Dist index 4675db6793..d8943b6a10 100644 --- a/sysdeps/unix/sysv/linux/mips/Dist +++ b/sysdeps/unix/sysv/linux/mips/Dist @@ -1,3 +1,4 @@ +_test_and_set.c clone.S entry.h kernel_sigaction.h From 031a1712e49e5923aca0d080f679b3943194b0eb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 10 Aug 2000 04:21:28 +0000 Subject: [PATCH 2182/4487] Include kernel-features.h. --- sysdeps/unix/sysv/linux/m68k/chown.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/m68k/chown.c b/sysdeps/unix/sysv/linux/m68k/chown.c index e97c14834e..1ea7e264c9 100644 --- a/sysdeps/unix/sysv/linux/m68k/chown.c +++ b/sysdeps/unix/sysv/linux/m68k/chown.c @@ -24,6 +24,7 @@ #include #include +#include "kernel-features.h" extern int __syscall_chown (const char *__unbounded __file, __kernel_uid_t __owner, __kernel_gid_t __group); @@ -42,7 +43,7 @@ extern int __libc_missing_32bit_uids; int __chown (const char *file, uid_t owner, gid_t group) { -#if __ASSUME_32BITUIDS +#if __ASSUME_32BITUIDS > 0 return INLINE_SYSCALL (chown32, 3, CHECK_STRING (file), owner, group); #else # ifdef __NR_chown32 From 2489c7f179b7a36d1cf07357be1f7549c4c2a691 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 10 Aug 2000 12:39:48 +0000 Subject: [PATCH 2183/4487] Synch struct stat64 and stat with current MIPS kernel. --- sysdeps/unix/sysv/linux/mips/bits/stat.h | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h index a01e85745d..7c6f4aa822 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/stat.h +++ b/sysdeps/unix/sysv/linux/mips/bits/stat.h @@ -51,11 +51,11 @@ struct stat long int st_pad2[2]; #ifndef __USE_FILE_OFFSET64 __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 __off64_t st_size; /* Size of file, in bytes. */ #endif - /* SVR4 added this extra long to allow for expansion of off_t. */ - long int st_pad3; /* * Actually this should be timestruc_t st_atime, st_mtime and * st_ctime but we don't have it under Linux. @@ -70,13 +70,10 @@ struct stat #ifndef __USE_FILE_OFFSET64 __blkcnt_t st_blocks; /* Number of 512-byte blocks allocated. */ #else + long int st_pad4; __blkcnt64_t st_blocks; /* Number of 512-byte blocks allocated. */ #endif - char st_fstype[16]; /* Filesystem type name */ - long int st_pad4[8]; - /* Linux specific fields */ - unsigned int st_flags; - unsigned int st_gen; + long int st_pad4[14]; }; #ifdef __USE_LARGEFILE64 @@ -92,8 +89,6 @@ struct stat64 unsigned long int st_rdev; /* Device number, if device. */ long int st_pad2[2]; __off64_t st_size; /* Size of file, in bytes. */ - /* SVR4 added this extra long to allow for expansion of off_t. */ - long int st_pad3; /* * Actually this should be timestruc_t st_atime, st_mtime and * st_ctime but we don't have it under Linux. @@ -105,12 +100,9 @@ struct stat64 __time_t st_ctime; /* Time of last status change. */ long int __reserved2; __blksize_t st_blksize; /* Optimal block size for I/O. */ + long int st_pad3; __blkcnt64_t st_blocks; /* Number of 512-byte blocks allocated. */ - char st_fstype[16]; /* Filesystem type name */ - long int st_pad4[8]; - /* Linux specific fields */ - unsigned int st_flags; - unsigned int st_gen; + long int st_pad4[14]; }; #endif From b2db50fd18c1026993505327a428560e3a231060 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 12 Aug 2000 04:48:19 +0000 Subject: [PATCH 2184/4487] Linux/Alpha egtdents implementation. --- sysdeps/unix/sysv/linux/alpha/getdents.c | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/getdents.c diff --git a/sysdeps/unix/sysv/linux/alpha/getdents.c b/sysdeps/unix/sysv/linux/alpha/getdents.c new file mode 100644 index 0000000000..6deb87e2e4 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/getdents.c @@ -0,0 +1,6 @@ +#define DIRENT_SET_DP_INO(dp, value) \ + do { (dp)->d_ino = (value); (dp)->__pad = 0; } while (0) +#define __getdents64 __no___getdents64_decl +#include +#undef __getdents64 +weak_alias(__getdents, __getdents64); From a510d2b69ce56ddfece86be1081874cc57740056 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 12 Aug 2000 04:48:27 +0000 Subject: [PATCH 2185/4487] Linux/Alpha getdents64 implementation. --- sysdeps/unix/sysv/linux/alpha/getdents64.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/getdents64.c diff --git a/sysdeps/unix/sysv/linux/alpha/getdents64.c b/sysdeps/unix/sysv/linux/alpha/getdents64.c new file mode 100644 index 0000000000..0df2c8f4c6 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/getdents64.c @@ -0,0 +1 @@ +/* getdents64 is in getdents.c */ From 3579fe4e8af2ec3b21832f185204053f222010c6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 12 Aug 2000 04:48:40 +0000 Subject: [PATCH 2186/4487] (__xstat_conv): Remove unused prototype. --- sysdeps/unix/sysv/linux/alpha/kernel_stat.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/kernel_stat.h b/sysdeps/unix/sysv/linux/alpha/kernel_stat.h index 2633b42525..75540c0a6d 100644 --- a/sysdeps/unix/sysv/linux/alpha/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/alpha/kernel_stat.h @@ -38,6 +38,4 @@ struct glibc2_stat unsigned int st_gen; }; -extern int __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf); - #define XSTAT_IS_XSTAT64 1 From 7c27fb615e4930653708a637991137e8d44674c6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 12 Aug 2000 05:07:57 +0000 Subject: [PATCH 2187/4487] (__ino64_t): Change to __u_quad_t. --- sysdeps/unix/sysv/linux/mips/bits/types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h index 6bb07e7b13..379f2bcd32 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/types.h +++ b/sysdeps/unix/sysv/linux/mips/bits/types.h @@ -137,7 +137,7 @@ typedef __u_long __fsfilcnt_t; typedef __u_quad_t __fsfilcnt64_t; /* Type of file serial numbers. */ -typedef __u_long __ino64_t; +typedef __u_quad_t __ino64_t; /* Type of file sizes and offsets. */ typedef __loff_t __off64_t; From adb0bd509b2df3d207b592fc61dfc946323e73bf Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 12 Aug 2000 08:20:21 +0000 Subject: [PATCH 2188/4487] Linux/Arm implementation of alphasort64. --- sysdeps/unix/sysv/linux/arm/alphasort64.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/arm/alphasort64.c diff --git a/sysdeps/unix/sysv/linux/arm/alphasort64.c b/sysdeps/unix/sysv/linux/arm/alphasort64.c new file mode 100644 index 0000000000..0b5ae47d2f --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/alphasort64.c @@ -0,0 +1 @@ +#include From f5d4fa3fe46fa97be8b9814ab13d73f84437fc74 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 12 Aug 2000 08:20:30 +0000 Subject: [PATCH 2189/4487] Linux/Arm implementation of getdents64. --- sysdeps/unix/sysv/linux/arm/getdents64.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/arm/getdents64.c diff --git a/sysdeps/unix/sysv/linux/arm/getdents64.c b/sysdeps/unix/sysv/linux/arm/getdents64.c new file mode 100644 index 0000000000..0c75fb5a06 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/getdents64.c @@ -0,0 +1 @@ +#include From f4e95ada8a488f05a0301a67c3b5ed0c23dd746c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 12 Aug 2000 08:20:37 +0000 Subject: [PATCH 2190/4487] Linux/Arm implementation of readdir64. --- sysdeps/unix/sysv/linux/arm/readdir64.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/arm/readdir64.c diff --git a/sysdeps/unix/sysv/linux/arm/readdir64.c b/sysdeps/unix/sysv/linux/arm/readdir64.c new file mode 100644 index 0000000000..2ea26dd409 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/readdir64.c @@ -0,0 +1 @@ +#include From fe8e1d5f915bd192254024b12f1224ba99548996 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 12 Aug 2000 08:20:43 +0000 Subject: [PATCH 2191/4487] Linux/Arm implementation of readdir64_r. --- sysdeps/unix/sysv/linux/arm/readdir64_r.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/arm/readdir64_r.c diff --git a/sysdeps/unix/sysv/linux/arm/readdir64_r.c b/sysdeps/unix/sysv/linux/arm/readdir64_r.c new file mode 100644 index 0000000000..9f54f897e3 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/readdir64_r.c @@ -0,0 +1 @@ +#include From 7e626298f0208aae1be47e9f2b4bf6ff999f7975 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 12 Aug 2000 08:20:53 +0000 Subject: [PATCH 2192/4487] Linux/Arm implementation of scandir64. --- sysdeps/unix/sysv/linux/arm/scandir64.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/arm/scandir64.c diff --git a/sysdeps/unix/sysv/linux/arm/scandir64.c b/sysdeps/unix/sysv/linux/arm/scandir64.c new file mode 100644 index 0000000000..506fd8877c --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/scandir64.c @@ -0,0 +1 @@ +#include From 206065a1179f21b5bbe4246397580555283d0a83 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 12 Aug 2000 08:21:01 +0000 Subject: [PATCH 2193/4487] Linux/Arm implementation of versionsort64. --- sysdeps/unix/sysv/linux/arm/versionsort64.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/arm/versionsort64.c diff --git a/sysdeps/unix/sysv/linux/arm/versionsort64.c b/sysdeps/unix/sysv/linux/arm/versionsort64.c new file mode 100644 index 0000000000..144b691e56 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/versionsort64.c @@ -0,0 +1 @@ +#include From 56cb41faed44797cf9b1822bd7cbeb9011d955dc Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sat, 12 Aug 2000 09:29:03 +0000 Subject: [PATCH 2194/4487] * sysdeps/unix/sysv/linux/mips/sys/tas.h (_test_and_set): Add .set mips2 for assembler. * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for assembler. (__compare_and_swap): Likewise. * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise. --- sysdeps/unix/sysv/linux/mips/sys/tas.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/sys/tas.h b/sysdeps/unix/sysv/linux/mips/sys/tas.h index b24aabb46a..bc7f52a206 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/tas.h +++ b/sysdeps/unix/sysv/linux/mips/sys/tas.h @@ -42,7 +42,8 @@ _test_and_set (int *p, int v) __THROW int r, t; __asm__ __volatile__ - ("1:\n\t" + (".set\tmips2\n" + "1:\n\t" "ll %0,%3\n\t" ".set push\n\t" ".set noreorder\n\t" From 1ce1bc0d3dda9cadead5e544f78c84af649c1c3f Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sat, 12 Aug 2000 09:59:40 +0000 Subject: [PATCH 2195/4487] (F_GETLK64, F_SETLK64, F_SETLKW64): Define with F_GETLK etc. --- sysdeps/unix/sysv/linux/alpha/bits/fcntl.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h index 7184d08a4a..2b879dcd8f 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h @@ -71,11 +71,9 @@ #define F_GETLK 7 /* Get record locking info. */ #define F_SETLK 8 /* Set record locking info (non-blocking). */ #define F_SETLKW 9 /* Set record locking info (blocking). */ - -/* XXX missing */ -#define F_GETLK64 7 /* Get record locking info. */ -#define F_SETLK64 8 /* Set record locking info (non-blocking). */ -#define F_SETLKW64 9 /* Set record locking info (blocking). */ +#define F_GETLK64 F_GETLK /* Get record locking info. */ +#define F_SETLK64 F_SETLK /* Set record locking info (non-blocking). */ +#define F_SETLKW64 F_SETLKW /* Set record locking info (blocking). */ #if defined __USE_BSD || defined __USE_XOPEN2K # define F_SETOWN 5 /* Get owner of socket (receiver of SIGIO). */ From 9ff6d9a06773b7115c0d3c24e771c2544301585b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 14 Aug 2000 04:50:13 +0000 Subject: [PATCH 2196/4487] Define thread types also for POSIX95. --- sysdeps/unix/sysv/linux/alpha/bits/types.h | 2 +- sysdeps/unix/sysv/linux/mips/bits/types.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h index 722db9e230..445ca94e8f 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/types.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h @@ -128,7 +128,7 @@ typedef unsigned int __socklen_t; /* Now add the thread types. */ -#ifdef __USE_UNIX98 +#if defined __USE_POSIX199506 || defined __USE_UNIX98 # include #endif diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h index 379f2bcd32..818b9479c3 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/types.h +++ b/sysdeps/unix/sysv/linux/mips/bits/types.h @@ -154,7 +154,7 @@ typedef unsigned int __socklen_t; /* Now add the thread types. */ -#ifdef __USE_UNIX98 +#if defined __USE_POSIX199506 || defined __USE_UNIX98 # include #endif From 8a632183fba433b452e3ab72b1d35809d3251f49 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 14 Aug 2000 05:22:20 +0000 Subject: [PATCH 2197/4487] __clockid_t and __timer_t are now defined in bits/types.h. --- sysdeps/unix/sysv/linux/alpha/bits/time.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/time.h b/sysdeps/unix/sysv/linux/alpha/bits/time.h index bbf93f6952..ed9382bda6 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/time.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/time.h @@ -1,5 +1,5 @@ /* System-dependent timing definitions. Linux/Alpha version. - Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1996, 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 @@ -39,12 +39,6 @@ # define CLK_TCK 1024 # endif -/* Clock ID used in clock and timer functions. */ -typedef int __clockid_t; - -/* Timer ID returned by `timer_create'. */ -typedef int __timer_t; - # ifdef __USE_POSIX199309 /* Identifier for system-wide realtime clock. */ # define CLOCK_REALTIME 0 From 5b5a4299b4138f06063856307b04fd34d78419fe Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 14 Aug 2000 05:23:10 +0000 Subject: [PATCH 2198/4487] Define __clockid_t and __timer_t. --- sysdeps/unix/sysv/linux/alpha/bits/types.h | 6 ++++++ sysdeps/unix/sysv/linux/mips/bits/types.h | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h index 445ca94e8f..13c389846f 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/types.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h @@ -83,6 +83,12 @@ typedef long int __swblk_t; /* Type of a swap block maybe? */ typedef long int __clock_t; typedef int __key_t; /* Type of a SYSV IPC key. */ +/* Clock ID used in clock and timer functions. */ +typedef int __clockid_t; + +/* Timer ID returned by `timer_create'. */ +typedef int __timer_t; + /* Used in `struct shmid_ds'. */ typedef int __ipc_pid_t; diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h index 818b9479c3..927d6098dc 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/types.h +++ b/sysdeps/unix/sysv/linux/mips/bits/types.h @@ -87,6 +87,12 @@ typedef long int __swblk_t; /* Type of a swap block maybe? */ typedef long int __clock_t; +/* Clock ID used in clock and timer functions. */ +typedef int __clockid_t; + +/* Timer ID returned by `timer_create'. */ +typedef int __timer_t; + /* One element in the file descriptor mask array. */ typedef unsigned long int __fd_mask; From 8f7d68ab0464b6893ca8fe30f9981f4cb38db24b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 14 Aug 2000 17:39:31 +0000 Subject: [PATCH 2199/4487] (DIRENT_TYPE): Define. --- sysdeps/unix/sysv/linux/alpha/getdents.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/alpha/getdents.c b/sysdeps/unix/sysv/linux/alpha/getdents.c index 6deb87e2e4..175be9df85 100644 --- a/sysdeps/unix/sysv/linux/alpha/getdents.c +++ b/sysdeps/unix/sysv/linux/alpha/getdents.c @@ -1,3 +1,4 @@ +#define DIRENT_TYPE struct dirent64 #define DIRENT_SET_DP_INO(dp, value) \ do { (dp)->d_ino = (value); (dp)->__pad = 0; } while (0) #define __getdents64 __no___getdents64_decl From eb76534ecc045319d48b1589e07352303b08fac2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 14 Aug 2000 17:39:48 +0000 Subject: [PATCH 2200/4487] (__xstat64, __fxstat64, __lxstat64): Export at GLIBC_2.2. (alphasort64, readdir64, readdir64_r, scandir64, versionsort64): Likewise. --- sysdeps/unix/sysv/linux/arm/Versions | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/sysdeps/unix/sysv/linux/arm/Versions b/sysdeps/unix/sysv/linux/arm/Versions index 4ac5b58a9b..5498086253 100644 --- a/sysdeps/unix/sysv/linux/arm/Versions +++ b/sysdeps/unix/sysv/linux/arm/Versions @@ -11,7 +11,22 @@ libc { outb; outw; outl; } GLIBC_2.2 { + # functions used in other libraries + __xstat64; __fxstat64; __lxstat64; + + # a* + alphasort64; + # New rlimit interface getrlimit; setrlimit; getrlimit64; + + # r* + readdir64; readdir64_r; + + # s* + scandir64; + + # v* + versionsort64; } } From f10fa39cc760911e425c000833f700c59308cebd Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 16 Aug 2000 15:08:45 +0000 Subject: [PATCH 2201/4487] * sysdeps/m68k/fpu/fegetexcept.c: New file. * sysdeps/m68k/fpu/fedisblxcpt.c: New file. * sysdeps/m68k/fpu/feenablxcpt.c: New file. --- sysdeps/m68k/fpu/fedisblxcpt.c | 39 ++++++++++++++++++++++++++++++++++ sysdeps/m68k/fpu/feenablxcpt.c | 39 ++++++++++++++++++++++++++++++++++ sysdeps/m68k/fpu/fegetexcept.c | 32 ++++++++++++++++++++++++++++ 3 files changed, 110 insertions(+) create mode 100644 sysdeps/m68k/fpu/fedisblxcpt.c create mode 100644 sysdeps/m68k/fpu/feenablxcpt.c create mode 100644 sysdeps/m68k/fpu/fegetexcept.c diff --git a/sysdeps/m68k/fpu/fedisblxcpt.c b/sysdeps/m68k/fpu/fedisblxcpt.c new file mode 100644 index 0000000000..ad97e86a9b --- /dev/null +++ b/sysdeps/m68k/fpu/fedisblxcpt.c @@ -0,0 +1,39 @@ +/* Disable floating-point exceptions. + Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Schwab , 2000. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +fedisableexcept (int excepts) +{ + unsigned int old_exc, new_exc; + + /* Get the current control register contents. */ + __asm__ ("fmove%.l %!,%0" : "=dm" (new_exc)); + + old_exc = (new_exc >> 6) & FE_ALL_EXCEPT; + + excepts &= FE_ALL_EXCEPT; + + new_exc &= ~(excepts << 6); + __asm__ ("fmove%.l %0,%!" : : "dm" (new_exc)); + + return old_exc; +} diff --git a/sysdeps/m68k/fpu/feenablxcpt.c b/sysdeps/m68k/fpu/feenablxcpt.c new file mode 100644 index 0000000000..7be0705213 --- /dev/null +++ b/sysdeps/m68k/fpu/feenablxcpt.c @@ -0,0 +1,39 @@ +/* Enable floating-point exceptions. + Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Schwab , 2000. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +feenableexcept (int excepts) +{ + unsigned int new_exc, old_exc; + + /* Get the current control register contents. */ + __asm__ ("fmove%.l %!,%0" : "=dm" (new_exc)); + + old_exc = (new_exc >> 6) & FE_ALL_EXCEPT; + + excepts &= FE_ALL_EXCEPT; + + new_exc |= excepts << 6; + __asm__ ("fmove%.l %0,%!" : : "dm" (new_exc)); + + return old_exc; +} diff --git a/sysdeps/m68k/fpu/fegetexcept.c b/sysdeps/m68k/fpu/fegetexcept.c new file mode 100644 index 0000000000..03b8735c11 --- /dev/null +++ b/sysdeps/m68k/fpu/fegetexcept.c @@ -0,0 +1,32 @@ +/* Get enabled floating-point exceptions. + Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Schwab , 2000. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +fegetexcept (void) +{ + unsigned int exc; + + /* Get the current control register contents. */ + __asm__ ("fmove%.l %!,%0" : "=dm" (exc)); + + return (exc >> 6) & FE_ALL_EXCEPT; +} From 35781b9dd67f709fa78d4c4c1d8ab57bffaef1ab Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 17 Aug 2000 18:45:35 +0000 Subject: [PATCH 2202/4487] Apha fegetexcept implementation. --- sysdeps/alpha/fpu/fegetexcept.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 sysdeps/alpha/fpu/fegetexcept.c diff --git a/sysdeps/alpha/fpu/fegetexcept.c b/sysdeps/alpha/fpu/fegetexcept.c new file mode 100644 index 0000000000..e4d5e784ea --- /dev/null +++ b/sysdeps/alpha/fpu/fegetexcept.c @@ -0,0 +1,31 @@ +/* Get enabled floating-point exceptions. + Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek , 2000. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +fegetexcept (void) +{ + unsigned long int exc; + + exc = __ieee_get_fp_control (); + + return (exc << 16) & FE_ALL_EXCEPT; +} From cd290faab1b1ca66f22e42c67792170e6d6db69c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 17 Aug 2000 18:45:58 +0000 Subject: [PATCH 2203/4487] Alpha feenableexcept implementation. --- sysdeps/alpha/fpu/feenablxcpt.c | 36 +++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 sysdeps/alpha/fpu/feenablxcpt.c diff --git a/sysdeps/alpha/fpu/feenablxcpt.c b/sysdeps/alpha/fpu/feenablxcpt.c new file mode 100644 index 0000000000..d2b0f2e5e5 --- /dev/null +++ b/sysdeps/alpha/fpu/feenablxcpt.c @@ -0,0 +1,36 @@ +/* Enable floating-point exceptions. + Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek , 2000. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +feenableexcept (int excepts) +{ + unsigned long int new_exc, old_exc; + + new_exc = __ieee_get_fp_control (); + + old_exc = (new_exc << 16) & FE_ALL_EXCEPT; + new_exc |= (excepts & FE_ALL_EXCEPT) >> 16; + + __ieee_set_fp_control (new_exc); + + return old_exc; +} From 17193a21d638d8a5fe6306f01ae693144e61d6bf Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 17 Aug 2000 18:46:15 +0000 Subject: [PATCH 2204/4487] Alpha fedisableexcept implementaton. --- sysdeps/alpha/fpu/fedisblxcpt.c | 36 +++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 sysdeps/alpha/fpu/fedisblxcpt.c diff --git a/sysdeps/alpha/fpu/fedisblxcpt.c b/sysdeps/alpha/fpu/fedisblxcpt.c new file mode 100644 index 0000000000..ab0630c084 --- /dev/null +++ b/sysdeps/alpha/fpu/fedisblxcpt.c @@ -0,0 +1,36 @@ +/* Disable floating-point exceptions. + Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek , 2000. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +fedisableexcept (int excepts) +{ + unsigned long int new_exc, old_exc; + + new_exc = __ieee_get_fp_control (); + + old_exc = (new_exc << 16) & FE_ALL_EXCEPT; + new_exc &= ~((excepts & FE_ALL_EXCEPT) >> 16); + + __ieee_set_fp_control (new_exc); + + return old_exc; +} From cc9ced979202f032e43a55183eef6b88ebd9f9ff Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 18 Aug 2000 00:09:47 +0000 Subject: [PATCH 2205/4487] Remove special d_ino handling. --- sysdeps/unix/sysv/linux/alpha/getdents.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/getdents.c b/sysdeps/unix/sysv/linux/alpha/getdents.c index 175be9df85..f127cd8aad 100644 --- a/sysdeps/unix/sysv/linux/alpha/getdents.c +++ b/sysdeps/unix/sysv/linux/alpha/getdents.c @@ -1,6 +1,4 @@ #define DIRENT_TYPE struct dirent64 -#define DIRENT_SET_DP_INO(dp, value) \ - do { (dp)->d_ino = (value); (dp)->__pad = 0; } while (0) #define __getdents64 __no___getdents64_decl #include #undef __getdents64 From 546afa8c7be7200de3be9afce1ec4edd77e897c3 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 18 Aug 2000 06:11:11 +0000 Subject: [PATCH 2206/4487] Add pads to show alignment for structs stat and stat64. Patch by Maciej W. Rozycki . --- sysdeps/unix/sysv/linux/mips/bits/stat.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h index 7c6f4aa822..40f42f1df3 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/stat.h +++ b/sysdeps/unix/sysv/linux/mips/bits/stat.h @@ -48,12 +48,13 @@ struct stat __uid_t st_uid; /* User ID of the file's owner. */ __gid_t st_gid; /* Group ID of the file's group.*/ unsigned long int st_rdev; /* Device number, if device. */ - long int st_pad2[2]; #ifndef __USE_FILE_OFFSET64 + long int st_pad2[2]; __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]; __off64_t st_size; /* Size of file, in bytes. */ #endif /* @@ -87,7 +88,7 @@ struct stat64 __uid_t st_uid; /* User ID of the file's owner. */ __gid_t st_gid; /* Group ID of the file's group.*/ unsigned long int st_rdev; /* Device number, if device. */ - long int st_pad2[2]; + long int st_pad2[3]; __off64_t st_size; /* Size of file, in bytes. */ /* * Actually this should be timestruc_t st_atime, st_mtime and From 4b84abdd3e3944de5284964a32ab835c80c2f642 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 19 Aug 2000 16:06:09 +0000 Subject: [PATCH 2207/4487] fenv definitions for Linux/Alpha. --- sysdeps/alpha/fpu/fenv_libc.h | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 sysdeps/alpha/fpu/fenv_libc.h diff --git a/sysdeps/alpha/fpu/fenv_libc.h b/sysdeps/alpha/fpu/fenv_libc.h new file mode 100644 index 0000000000..7c58be50eb --- /dev/null +++ b/sysdeps/alpha/fpu/fenv_libc.h @@ -0,0 +1,36 @@ +/* Internal libc stuff for floating point environment routines. + Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _FENV_LIBC_H +#define _FENV_LIBC_H 1 + +#include + +#define FPCR_ROUND_MASK (3UL << 58) +#define FPCR_ROUND_SHIFT 58 + +#define SWCR_MAP_MASK (3UL << 12) +#define SWCR_ENABLE_SHIFT 16 +#define SWCR_ENABLE_MASK (FE_ALL_EXCEPT >> SWCR_ENABLE_SHIFT) +#define SWCR_STATUS_MASK (FE_ALL_EXCEPT) +#define SWCR_ALL_MASK (SWCR_ENABLE_MASK \ + | SWCR_MAP_MASK \ + | SWCR_STATUS_MASK) + +#endif /* fenv_libc.h */ From c9bca5114f951f7168b0f401c60bdf56eb1a8906 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 19 Aug 2000 16:07:37 +0000 Subject: [PATCH 2208/4487] Use . --- sysdeps/alpha/fpu/fclrexcpt.c | 4 ++-- sysdeps/alpha/fpu/fedisblxcpt.c | 6 +++--- sysdeps/alpha/fpu/feenablxcpt.c | 6 +++--- sysdeps/alpha/fpu/fegetenv.c | 8 +++----- sysdeps/alpha/fpu/fegetexcept.c | 4 ++-- sysdeps/alpha/fpu/fegetround.c | 6 +++--- sysdeps/alpha/fpu/feholdexcpt.c | 6 +++--- sysdeps/alpha/fpu/fesetenv.c | 6 +++--- sysdeps/alpha/fpu/fesetround.c | 7 ++++--- sysdeps/alpha/fpu/feupdateenv.c | 4 ++-- sysdeps/alpha/fpu/fgetexcptflg.c | 4 ++-- sysdeps/alpha/fpu/fraiseexcpt.c | 5 ++--- sysdeps/alpha/fpu/fsetexcptflg.c | 4 ++-- sysdeps/alpha/fpu/ftestexcept.c | 6 +++--- 14 files changed, 37 insertions(+), 39 deletions(-) diff --git a/sysdeps/alpha/fpu/fclrexcpt.c b/sysdeps/alpha/fpu/fclrexcpt.c index 006f50613d..71ff748f73 100644 --- a/sysdeps/alpha/fpu/fclrexcpt.c +++ b/sysdeps/alpha/fpu/fclrexcpt.c @@ -18,7 +18,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include +#include int __feclearexcept (int excepts) @@ -29,7 +29,7 @@ __feclearexcept (int excepts) swcr = __ieee_get_fp_control (); /* Clear the relevant bits. */ - swcr &= ~((unsigned long int) excepts & FE_ALL_EXCEPT); + swcr &= ~((unsigned long int) excepts & SWCR_STATUS_MASK); /* Put the new state in effect. */ __ieee_set_fp_control (swcr); diff --git a/sysdeps/alpha/fpu/fedisblxcpt.c b/sysdeps/alpha/fpu/fedisblxcpt.c index ab0630c084..7359e144b7 100644 --- a/sysdeps/alpha/fpu/fedisblxcpt.c +++ b/sysdeps/alpha/fpu/fedisblxcpt.c @@ -18,7 +18,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include +#include int fedisableexcept (int excepts) @@ -27,8 +27,8 @@ fedisableexcept (int excepts) new_exc = __ieee_get_fp_control (); - old_exc = (new_exc << 16) & FE_ALL_EXCEPT; - new_exc &= ~((excepts & FE_ALL_EXCEPT) >> 16); + old_exc = (new_exc & SWCR_ENABLE_MASK) << SWCR_ENABLE_SHIFT; + new_exc &= ~((excepts >> SWCR_ENABLE_SHIFT) & SWCR_ENABLE_MASK); __ieee_set_fp_control (new_exc); diff --git a/sysdeps/alpha/fpu/feenablxcpt.c b/sysdeps/alpha/fpu/feenablxcpt.c index d2b0f2e5e5..b36e84680c 100644 --- a/sysdeps/alpha/fpu/feenablxcpt.c +++ b/sysdeps/alpha/fpu/feenablxcpt.c @@ -18,7 +18,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include +#include int feenableexcept (int excepts) @@ -27,8 +27,8 @@ feenableexcept (int excepts) new_exc = __ieee_get_fp_control (); - old_exc = (new_exc << 16) & FE_ALL_EXCEPT; - new_exc |= (excepts & FE_ALL_EXCEPT) >> 16; + old_exc = (new_exc & SWCR_ENABLE_MASK) << SWCR_ENABLE_SHIFT; + new_exc |= (excepts >> SWCR_ENABLE_SHIFT) & SWCR_ENABLE_MASK; __ieee_set_fp_control (new_exc); diff --git a/sysdeps/alpha/fpu/fegetenv.c b/sysdeps/alpha/fpu/fegetenv.c index 51ce1c21ab..d6b3f70897 100644 --- a/sysdeps/alpha/fpu/fegetenv.c +++ b/sysdeps/alpha/fpu/fegetenv.c @@ -18,7 +18,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include +#include int __fegetenv (fenv_t *envp) @@ -31,10 +31,8 @@ __fegetenv (fenv_t *envp) swcr = __ieee_get_fp_control (); __asm__ __volatile__ ("mf_fpcr %0" : "=f" (fpcr)); - /* Merge the two bits of information. The magic number at the end is - the exception enable mask. */ - - *envp = (fpcr & (3UL << 58)) | (swcr & (FE_ALL_EXCEPT | 0x3e)); + /* Merge the two bits of information. */ + *envp = ((fpcr & FPCR_ROUND_MASK) | (swcr & SWCR_ALL_MASK)); /* Success. */ return 0; diff --git a/sysdeps/alpha/fpu/fegetexcept.c b/sysdeps/alpha/fpu/fegetexcept.c index e4d5e784ea..c0de38f8aa 100644 --- a/sysdeps/alpha/fpu/fegetexcept.c +++ b/sysdeps/alpha/fpu/fegetexcept.c @@ -18,7 +18,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include +#include int fegetexcept (void) @@ -27,5 +27,5 @@ fegetexcept (void) exc = __ieee_get_fp_control (); - return (exc << 16) & FE_ALL_EXCEPT; + return (exc & SWCR_ENABLE_MASK) << SWCR_ENABLE_SHIFT; } diff --git a/sysdeps/alpha/fpu/fegetround.c b/sysdeps/alpha/fpu/fegetround.c index 623e2ce358..f64fee7def 100644 --- a/sysdeps/alpha/fpu/fegetround.c +++ b/sysdeps/alpha/fpu/fegetround.c @@ -1,5 +1,5 @@ /* Return current rounding direction. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1997 @@ -18,7 +18,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include +#include int fegetround (void) @@ -27,5 +27,5 @@ fegetround (void) __asm__ __volatile__("excb; mf_fpcr %0" : "=f"(fpcr)); - return (fpcr >> 58) & 3; + return (fpcr >> FPCR_ROUND_SHIFT) & 3; } diff --git a/sysdeps/alpha/fpu/feholdexcpt.c b/sysdeps/alpha/fpu/feholdexcpt.c index a179366cbf..d683a37bdc 100644 --- a/sysdeps/alpha/fpu/feholdexcpt.c +++ b/sysdeps/alpha/fpu/feholdexcpt.c @@ -1,5 +1,5 @@ /* Store current floating-point environment and clear exceptions. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1997 @@ -18,7 +18,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include +#include int feholdexcept (fenv_t *envp) @@ -27,7 +27,7 @@ feholdexcept (fenv_t *envp) fegetenv(envp); /* Clear all exception status bits and exception enable bits. */ - __ieee_set_fp_control(0); + __ieee_set_fp_control(*envp & SWCR_MAP_MASK); return 0; } diff --git a/sysdeps/alpha/fpu/fesetenv.c b/sysdeps/alpha/fpu/fesetenv.c index 58bc13aaf2..5bf3b5e59a 100644 --- a/sysdeps/alpha/fpu/fesetenv.c +++ b/sysdeps/alpha/fpu/fesetenv.c @@ -18,7 +18,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include +#include int __fesetenv (const fenv_t *envp) @@ -37,11 +37,11 @@ __fesetenv (const fenv_t *envp) /* Reset the rounding mode with the hardware fpcr. Note that the following system call is an implied trap barrier for our modification. */ __asm__ __volatile__ ("excb; mf_fpcr %0" : "=f" (fpcr)); - fpcr = (fpcr & ~(3UL << 58)) | (env & (3UL << 58)); + fpcr = (fpcr & ~FPCR_ROUND_MASK) | (env & FPCR_ROUND_MASK); __asm__ __volatile__ ("mt_fpcr %0" : : "f" (fpcr)); /* Reset the exception status and mask with the kernel's FP code. */ - __ieee_set_fp_control (env & (FE_ALL_EXCEPT | 0x3e)); + __ieee_set_fp_control (env & SWCR_ALL_MASK); /* Success. */ return 0; diff --git a/sysdeps/alpha/fpu/fesetround.c b/sysdeps/alpha/fpu/fesetround.c index f0aaaa2c88..42a8b62f49 100644 --- a/sysdeps/alpha/fpu/fesetround.c +++ b/sysdeps/alpha/fpu/fesetround.c @@ -1,5 +1,5 @@ /* Set current rounding direction. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1997 @@ -18,7 +18,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include +#include int fesetround (int round) @@ -32,7 +32,8 @@ fesetround (int round) __asm__ __volatile__("excb; mf_fpcr %0" : "=f"(fpcr)); /* Set the relevant bits. */ - fpcr = (fpcr & ~(3UL << 58)) | ((unsigned long)round << 58); + fpcr = ((fpcr & ~FPCR_ROUND_MASK) + | ((unsigned long)round << FPCR_ROUND_SHIFT)); /* Put the new state in effect. */ __asm__ __volatile__("mt_fpcr %0; excb" : : "f"(fpcr)); diff --git a/sysdeps/alpha/fpu/feupdateenv.c b/sysdeps/alpha/fpu/feupdateenv.c index 61226c6b44..b9f1c5b69e 100644 --- a/sysdeps/alpha/fpu/feupdateenv.c +++ b/sysdeps/alpha/fpu/feupdateenv.c @@ -18,7 +18,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include +#include int __feupdateenv (const fenv_t *envp) @@ -34,7 +34,7 @@ __feupdateenv (const fenv_t *envp) /* Raise the saved exception. Incidently for us the implementation defined format of the values in objects of type fexcept_t is the same as the ones specified using the FE_* constants. */ - feraiseexcept ((int) tmp & FE_ALL_EXCEPT); + feraiseexcept (tmp & SWCR_STATUS_MASK); /* Success. */ return 0; diff --git a/sysdeps/alpha/fpu/fgetexcptflg.c b/sysdeps/alpha/fpu/fgetexcptflg.c index bd47535be8..bae1556f5d 100644 --- a/sysdeps/alpha/fpu/fgetexcptflg.c +++ b/sysdeps/alpha/fpu/fgetexcptflg.c @@ -18,7 +18,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include +#include int __fegetexceptflag (fexcept_t *flagp, int excepts) @@ -29,7 +29,7 @@ __fegetexceptflag (fexcept_t *flagp, int excepts) tmp = __ieee_get_fp_control(); /* Return that portion that corresponds to the requested exceptions. */ - *flagp = tmp & excepts & FE_ALL_EXCEPT; + *flagp = tmp & excepts & SWCR_STATUS_MASK; /* Success. */ return 0; diff --git a/sysdeps/alpha/fpu/fraiseexcpt.c b/sysdeps/alpha/fpu/fraiseexcpt.c index b0eab000cb..1f72ebaf6a 100644 --- a/sysdeps/alpha/fpu/fraiseexcpt.c +++ b/sysdeps/alpha/fpu/fraiseexcpt.c @@ -18,8 +18,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include -#include +#include int __feraiseexcept (int excepts) @@ -30,7 +29,7 @@ __feraiseexcept (int excepts) tmp = __ieee_get_fp_control (); /* Set all the bits that were called for. */ - tmp |= (excepts & FE_ALL_EXCEPT); + tmp |= (excepts & SWCR_STATUS_MASK); /* And store it back. */ __ieee_set_fp_control (tmp); diff --git a/sysdeps/alpha/fpu/fsetexcptflg.c b/sysdeps/alpha/fpu/fsetexcptflg.c index eb74defb5a..57531a4aa0 100644 --- a/sysdeps/alpha/fpu/fsetexcptflg.c +++ b/sysdeps/alpha/fpu/fsetexcptflg.c @@ -18,7 +18,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include +#include int __fesetexceptflag (const fexcept_t *flagp, int excepts) @@ -29,7 +29,7 @@ __fesetexceptflag (const fexcept_t *flagp, int excepts) tmp = __ieee_get_fp_control (); /* Set all the bits that were called for. */ - tmp = (tmp & ~FE_ALL_EXCEPT) | (*flagp & excepts & FE_ALL_EXCEPT); + tmp = (tmp & ~SWCR_STATUS_MASK) | (*flagp & excepts & SWCR_STATUS_MASK); /* And store it back. */ __ieee_set_fp_control (tmp); diff --git a/sysdeps/alpha/fpu/ftestexcept.c b/sysdeps/alpha/fpu/ftestexcept.c index 9ee9dc9c55..9c006de79e 100644 --- a/sysdeps/alpha/fpu/ftestexcept.c +++ b/sysdeps/alpha/fpu/ftestexcept.c @@ -1,5 +1,5 @@ /* Test exception in current environment. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1997. @@ -18,7 +18,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include +#include int fetestexcept (int excepts) @@ -28,5 +28,5 @@ fetestexcept (int excepts) /* Get current exceptions. */ tmp = __ieee_get_fp_control(); - return tmp & excepts & FE_ALL_EXCEPT; + return tmp & excepts & SWCR_STATUS_MASK; } From 1829753231592488f783252e4646d0111f306f92 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 19 Aug 2000 16:07:53 +0000 Subject: [PATCH 2209/4487] (FE_DENORMAL): New. (FE_MAP_DMZ, FE_MAP_UMZ, FE_NONIEEE_ENV): New. --- sysdeps/alpha/fpu/bits/fenv.h | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/sysdeps/alpha/fpu/bits/fenv.h b/sysdeps/alpha/fpu/bits/fenv.h index 82b85debcd..b6d9b98c86 100644 --- a/sysdeps/alpha/fpu/bits/fenv.h +++ b/sysdeps/alpha/fpu/bits/fenv.h @@ -36,6 +36,11 @@ enum { +#ifdef __USE_GNU + FE_DENORMAL = 1UL << 22, +#define FE_DENORMAL FE_DENORMAL +#endif + FE_INEXACT = 1UL << 21, #define FE_INEXACT FE_INEXACT @@ -51,12 +56,10 @@ enum FE_INVALID = 1UL << 17, #define FE_INVALID FE_INVALID - FE_ALL_EXCEPT = - (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID) + FE_ALL_EXCEPT = 0x3f << 17 #define FE_ALL_EXCEPT FE_ALL_EXCEPT }; - /* Alpha chips support all four defined rouding modes. Note that code must be compiled to use dynamic rounding (/d) instructions @@ -81,6 +84,19 @@ enum #define FE_UPWARD FE_UPWARD }; +#ifdef __USE_GNU +/* On later hardware, and later kernels for earlier hardware, we can forcibly + underflow denormal inputs and outputs. This can speed up certain programs + significantly, usually without affecting accuracy. */ +enum + { + FE_MAP_DMZ = 1UL << 12, /* Map denorm inputs to zero */ +#define FE_MAP_DMZ FE_MAP_DMZ + + FE_MAP_UMZ = 1UL << 13, /* Map underflowed outputs to zero */ +#define FE_MAP_UMZ FE_MAP_UMZ + }; +#endif /* Type representing exception flags. */ typedef unsigned long int fexcept_t; @@ -96,6 +112,10 @@ typedef unsigned long int fenv_t; #ifdef __USE_GNU /* Floating-point environment where none of the exceptions are masked. */ # define FE_NOMASK_ENV ((fenv_t *) 0x880000000000003eUL) + +/* Floating-point environment with (processor-dependent) non-IEEE floating + point. In this case, mapping denormals to zero. */ +# define FE_NONIEEE_ENV ((fenv_t *) 0x8800000000003000UL) #endif /* The system calls to talk to the kernel's FP code. */ From 3c5926692836694126029fe68ec91d24eb85b53e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 19 Aug 2000 16:14:18 +0000 Subject: [PATCH 2210/4487] Add glob64@@GLIBC_2.2. --- sysdeps/unix/sysv/linux/arm/Versions | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysdeps/unix/sysv/linux/arm/Versions b/sysdeps/unix/sysv/linux/arm/Versions index 5498086253..aeda9fa5fb 100644 --- a/sysdeps/unix/sysv/linux/arm/Versions +++ b/sysdeps/unix/sysv/linux/arm/Versions @@ -17,6 +17,9 @@ libc { # a* alphasort64; + # g* + glob64; + # New rlimit interface getrlimit; setrlimit; getrlimit64; From 9e89ae2f4c2e598a1f1f800a99a48e9656b74440 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 19 Aug 2000 16:14:56 +0000 Subject: [PATCH 2211/4487] Linux/Arm version of glob64. --- sysdeps/unix/sysv/linux/arm/glob64.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/arm/glob64.c diff --git a/sysdeps/unix/sysv/linux/arm/glob64.c b/sysdeps/unix/sysv/linux/arm/glob64.c new file mode 100644 index 0000000000..82a9a296a7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/glob64.c @@ -0,0 +1 @@ +#include From 51977e0692ebbe16288c9414bc2149c0b4c25ec1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 19 Aug 2000 16:37:40 +0000 Subject: [PATCH 2212/4487] Only use for non-LFS getdents. --- sysdeps/unix/sysv/linux/alpha/getdents.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/getdents.c b/sysdeps/unix/sysv/linux/alpha/getdents.c index f127cd8aad..dfecfef924 100644 --- a/sysdeps/unix/sysv/linux/alpha/getdents.c +++ b/sysdeps/unix/sysv/linux/alpha/getdents.c @@ -1,5 +1,3 @@ -#define DIRENT_TYPE struct dirent64 -#define __getdents64 __no___getdents64_decl +#define DIRENT_SET_DP_INO(dp, value) \ + do { (dp)->d_ino = (value); (dp)->__pad = 0; } while (0) #include -#undef __getdents64 -weak_alias(__getdents, __getdents64); From 142652edb260b9ca68a0a108c2ba9c5dfce56303 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 19 Aug 2000 16:38:21 +0000 Subject: [PATCH 2213/4487] Not needed anymore. --- sysdeps/unix/sysv/linux/alpha/getdents64.c | 1 - sysdeps/unix/sysv/linux/alpha/readdir.c | 7 ------- sysdeps/unix/sysv/linux/alpha/readdir64.c | 1 - sysdeps/unix/sysv/linux/alpha/readdir64_r.c | 1 - sysdeps/unix/sysv/linux/alpha/readdir_r.c | 4 ---- 5 files changed, 14 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/alpha/getdents64.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/readdir.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/readdir64.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/readdir64_r.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/readdir_r.c diff --git a/sysdeps/unix/sysv/linux/alpha/getdents64.c b/sysdeps/unix/sysv/linux/alpha/getdents64.c deleted file mode 100644 index 0df2c8f4c6..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/getdents64.c +++ /dev/null @@ -1 +0,0 @@ -/* getdents64 is in getdents.c */ diff --git a/sysdeps/unix/sysv/linux/alpha/readdir.c b/sysdeps/unix/sysv/linux/alpha/readdir.c deleted file mode 100644 index 300ebb2629..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/readdir.c +++ /dev/null @@ -1,7 +0,0 @@ -#define readdir64 __no_readdir64_decl -#define __readdir64 __no___readdir64_decl -#include -#undef __readdir64 -strong_alias (__readdir, __readdir64) -#undef readdir64 -weak_alias (__readdir, readdir64) diff --git a/sysdeps/unix/sysv/linux/alpha/readdir64.c b/sysdeps/unix/sysv/linux/alpha/readdir64.c deleted file mode 100644 index 9796431dc4..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/readdir64.c +++ /dev/null @@ -1 +0,0 @@ -/* readdir64 is in readdir.c */ diff --git a/sysdeps/unix/sysv/linux/alpha/readdir64_r.c b/sysdeps/unix/sysv/linux/alpha/readdir64_r.c deleted file mode 100644 index b8fe9a31b4..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/readdir64_r.c +++ /dev/null @@ -1 +0,0 @@ -/* readdir64_r is in readdir_r.c */ diff --git a/sysdeps/unix/sysv/linux/alpha/readdir_r.c b/sysdeps/unix/sysv/linux/alpha/readdir_r.c deleted file mode 100644 index adb92db6af..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/readdir_r.c +++ /dev/null @@ -1,4 +0,0 @@ -#define readdir64_r __no_readdir64_r_decl -#include -#undef readdir64_r -weak_alias (__readdir_r, readdir64_r) From ec8cf3da88dd97ba28cc11414bb92cc31ebfe7d9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 22 Aug 2000 09:08:48 +0000 Subject: [PATCH 2214/4487] (sysctl): Remove. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 1 - 1 file changed, 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index d845761a98..df680cecb5 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -52,7 +52,6 @@ setsockopt - setsockopt 5 __setsockopt setsockopt shutdown - shutdown 2 __shutdown shutdown socket - socket 3 __socket socket socketpair - socketpair 4 __socketpair socketpair -sysctl - _sysctl 6 __sysctl sysctl getresuid - getresuid 3 getresuid getresgid - getresgid 3 getresgid From a58f487d7eda292dfb25dae8a11418f6d777fbed Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 23 Aug 2000 06:54:33 +0000 Subject: [PATCH 2215/4487] Use __setrlimit as strong name. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index df680cecb5..f695145dfa 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -25,7 +25,7 @@ pwrite - pwrite 4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwr fstatfs - fstatfs 2 __fstatfs fstatfs __fstatfs64 fstatfs64 statfs - statfs 2 __statfs statfs statfs64 getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64 -setrlimit - setrlimit 2 setrlimit setrlimit64 +setrlimit - setrlimit 2 __setrlimit setrlimit64 setrlimit ftruncate - ftruncate 2 __ftruncate ftruncate ftruncate64 truncate - truncate 2 truncate truncate64 From cdf9c9a59044dcb8b654ea7b932b9b106c8eed13 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 24 Aug 2000 07:39:29 +0000 Subject: [PATCH 2216/4487] Add fpu/fenv_libc.h. --- sysdeps/alpha/Dist | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/alpha/Dist b/sysdeps/alpha/Dist index 46cf351e82..034f0b03d2 100644 --- a/sysdeps/alpha/Dist +++ b/sysdeps/alpha/Dist @@ -6,3 +6,4 @@ remq.S _mcount.S stxcpy.S stxncpy.S +fpu/fenv_libc.h From ce5c1dab0dff8d85589639a27ff740fe85113103 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 27 Aug 2000 01:01:17 +0000 Subject: [PATCH 2217/4487] [$(subdir)==resource] (sysdep_routines): Add oldgetrlimit64. --- sysdeps/unix/sysv/linux/arm/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile index 939c74cea7..6040b20193 100644 --- a/sysdeps/unix/sysv/linux/arm/Makefile +++ b/sysdeps/unix/sysv/linux/arm/Makefile @@ -8,3 +8,7 @@ sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \ rt_sigqueueinfo rt_sigaction rt_sigpending \ sigrestorer endif + +ifeq ($(subdir),resource) +sysdep_routines += oldgetrlimit64 +endif From 858db9cbc8e3286694a6874c282b759ddbe90a1f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 1 Sep 2000 04:41:12 +0000 Subject: [PATCH 2218/4487] Change type of FE_*_ENV macros to const fenv_t*. --- sysdeps/alpha/fpu/bits/fenv.h | 6 +++--- sysdeps/m68k/fpu/bits/fenv.h | 6 +++--- sysdeps/mips/bits/fenv.h | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sysdeps/alpha/fpu/bits/fenv.h b/sysdeps/alpha/fpu/bits/fenv.h index b6d9b98c86..fe6c253f25 100644 --- a/sysdeps/alpha/fpu/bits/fenv.h +++ b/sysdeps/alpha/fpu/bits/fenv.h @@ -107,15 +107,15 @@ typedef unsigned long int fenv_t; /* If the default argument is used we use this value. Note that due to architecture-specified page mappings, no user-space pointer will ever have its two high bits set. Co-opt one. */ -#define FE_DFL_ENV ((fenv_t *) 0x8800000000000000UL) +#define FE_DFL_ENV ((__const fenv_t *) 0x8800000000000000UL) #ifdef __USE_GNU /* Floating-point environment where none of the exceptions are masked. */ -# define FE_NOMASK_ENV ((fenv_t *) 0x880000000000003eUL) +# define FE_NOMASK_ENV ((__const fenv_t *) 0x880000000000003eUL) /* Floating-point environment with (processor-dependent) non-IEEE floating point. In this case, mapping denormals to zero. */ -# define FE_NONIEEE_ENV ((fenv_t *) 0x8800000000003000UL) +# define FE_NONIEEE_ENV ((__const fenv_t *) 0x8800000000003000UL) #endif /* The system calls to talk to the kernel's FP code. */ diff --git a/sysdeps/m68k/fpu/bits/fenv.h b/sysdeps/m68k/fpu/bits/fenv.h index 3138fefe66..7d489b32b3 100644 --- a/sysdeps/m68k/fpu/bits/fenv.h +++ b/sysdeps/m68k/fpu/bits/fenv.h @@ -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 @@ -71,9 +71,9 @@ typedef struct fenv_t; /* If the default argument is used we use this value. */ -#define FE_DFL_ENV ((fenv_t *) -1) +#define FE_DFL_ENV ((__const fenv_t *) -1) #ifdef __USE_GNU /* Floating-point environment where none of the exceptions are masked. */ -# define FE_NOMASK_ENV ((fenv_t *) -2) +# define FE_NOMASK_ENV ((__const fenv_t *) -2) #endif diff --git a/sysdeps/mips/bits/fenv.h b/sysdeps/mips/bits/fenv.h index efa90b6dbd..72dd281b9d 100644 --- a/sysdeps/mips/bits/fenv.h +++ b/sysdeps/mips/bits/fenv.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 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 @@ -69,4 +69,4 @@ typedef struct fenv_t; /* If the default argument is used we use this value. */ -#define FE_DFL_ENV ((fenv_t *) -1) +#define FE_DFL_ENV ((__const fenv_t *) -1) From d31dde9292544dcbed4a9fbde00125ee13b0c8c8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 1 Sep 2000 06:32:15 +0000 Subject: [PATCH 2219/4487] Make FP_ILOGB0 and FP_ILOGBNAN int values. --- sysdeps/alpha/fpu/bits/mathdef.h | 6 +++--- sysdeps/arm/fpu/bits/mathdef.h | 4 ++-- sysdeps/m68k/fpu/bits/mathdef.h | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sysdeps/alpha/fpu/bits/mathdef.h b/sysdeps/alpha/fpu/bits/mathdef.h index 30f93dda1c..3b80e82475 100644 --- a/sysdeps/alpha/fpu/bits/mathdef.h +++ b/sysdeps/alpha/fpu/bits/mathdef.h @@ -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 @@ -67,8 +67,8 @@ typedef double double_t; # endif /* The values returned by `ilogb' for 0 and NaN respectively. */ -# define FP_ILOGB0 0x80000001 -# define FP_ILOGBNAN 0x7fffffff +# define FP_ILOGB0 (-2147483647) +# define FP_ILOGBNAN (2147483647) /* Number of decimal digits for the `double' type. */ # define DECIMAL_DIG 15 diff --git a/sysdeps/arm/fpu/bits/mathdef.h b/sysdeps/arm/fpu/bits/mathdef.h index cb0c348374..374ad674c3 100644 --- a/sysdeps/arm/fpu/bits/mathdef.h +++ b/sysdeps/arm/fpu/bits/mathdef.h @@ -37,8 +37,8 @@ typedef double double_t; /* `double' expressions are evaluated as /* The values returned by `ilogb' for 0 and NaN respectively. */ -# define FP_ILOGB0 0x80000001 -# define FP_ILOGBNAN 0x7fffffff +# define FP_ILOGB0 (-2147483647) +# define FP_ILOGBNAN (2147483647) /* Number of decimal digits for the `double' type. */ # define DECIMAL_DIG 15 diff --git a/sysdeps/m68k/fpu/bits/mathdef.h b/sysdeps/m68k/fpu/bits/mathdef.h index c80dad3fe1..7b09882e12 100644 --- a/sysdeps/m68k/fpu/bits/mathdef.h +++ b/sysdeps/m68k/fpu/bits/mathdef.h @@ -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 @@ -38,8 +38,8 @@ typedef long double double_t; /* `double' expressions are evaluated as # define INFINITY HUGE_VALF /* The values returned by `ilogb' for 0 and NaN respectively. */ -# define FP_ILOGB0 0x80000000 -# define FP_ILOGBNAN 0x7fffffff +# define FP_ILOGB0 (-2147483648) +# define FP_ILOGBNAN (2147483647) /* Number of decimal digits for the `long double' type. */ # define DECIMAL_DIG 18 From 03a34c9bc21203699e0f6499247c9c791e3cebcb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 1 Sep 2000 06:57:40 +0000 Subject: [PATCH 2220/4487] (FP_ILOGB0): Use values which don't produce warnings. --- sysdeps/m68k/fpu/bits/mathdef.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/m68k/fpu/bits/mathdef.h b/sysdeps/m68k/fpu/bits/mathdef.h index 7b09882e12..c3365a7ff2 100644 --- a/sysdeps/m68k/fpu/bits/mathdef.h +++ b/sysdeps/m68k/fpu/bits/mathdef.h @@ -38,7 +38,7 @@ typedef long double double_t; /* `double' expressions are evaluated as # define INFINITY HUGE_VALF /* The values returned by `ilogb' for 0 and NaN respectively. */ -# define FP_ILOGB0 (-2147483648) +# define FP_ILOGB0 (-2147483647 - 1) # define FP_ILOGBNAN (2147483647) /* Number of decimal digits for the `long double' type. */ From f727031ab28729e177e0019081ba97a69575db34 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sat, 2 Sep 2000 15:03:41 +0000 Subject: [PATCH 2221/4487] Fixes for fcntl64. --- sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 27 ++++++++++++++--------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index 189601c839..853599f283 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -66,14 +66,19 @@ #define F_SETFD 2 /* Set file descriptor flags. */ #define F_GETFL 3 /* Get file status flags. */ #define F_SETFL 4 /* Set file status flags. */ -#define F_GETLK 14 /* Get record locking info. */ -#define F_SETLK 6 /* Set record locking info (non-blocking). */ -#define F_SETLKW 7 /* Set record locking info (blocking). */ +#ifndef __USE_FILE_OFFSET64 +# define F_GETLK 14 /* Get record locking info. */ +# define F_SETLK 6 /* Set record locking info (non-blocking). */ +# define F_SETLKW 7 /* Set record locking info (blocking). */ +#else +# define F_GETLK F_GETLK64 /* Get record locking info. */ +# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/ +# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */ +#endif -/* XXX missing */ -#define F_GETLK64 14 /* Get record locking info. */ -#define F_SETLK64 6 /* Set record locking info (non-blocking). */ -#define F_SETLKW64 7 /* Set record locking info (blocking). */ +#define F_GETLK64 33 /* Get record locking info. */ +#define F_SETLK64 34 /* Set record locking info (non-blocking). */ +#define F_SETLKW64 35 /* Set record locking info (blocking). */ #if defined __USE_BSD || defined __USE_XOPEN2K # define F_SETOWN 24 /* Get owner of socket (receiver of SIGIO). */ @@ -113,14 +118,16 @@ typedef struct flock #ifndef __USE_FILE_OFFSET64 __off_t l_start; /* Offset where the lock begins. */ __off_t l_len; /* Size of the locked area; zero means until EOF. */ + long int l_sysid; /* XXX */ #else __off64_t l_start; /* Offset where the lock begins. */ __off64_t l_len; /* Size of the locked area; zero means until EOF. */ #endif - long int l_sysid; /* XXX */ __pid_t l_pid; /* Process holding the lock. */ +#ifndef __USE_FILE_OFFSET64 long int pad[4]; /* XXX */ - } flock_t; +#endif +} flock_t; #ifdef __USE_LARGEFILE64 struct flock64 @@ -129,9 +136,7 @@ struct flock64 short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ __off64_t l_start; /* Offset where the lock begins. */ __off64_t l_len; /* Size of the locked area; zero means until EOF. */ - long int l_sysid; /* XXX */ __pid_t l_pid; /* Process holding the lock. */ - long int pad[4]; /* XXX */ }; #endif From 1db6393c86325da3f43b502d321ffa52e0fc2a9e Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 5 Sep 2000 08:37:09 +0000 Subject: [PATCH 2222/4487] Moved from soft-fp/sysdeps/mips/mips64/sfp-machine.h --- sysdeps/mips/mips64/soft-fp/sfp-machine.h | 47 +++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 sysdeps/mips/mips64/soft-fp/sfp-machine.h diff --git a/sysdeps/mips/mips64/soft-fp/sfp-machine.h b/sysdeps/mips/mips64/soft-fp/sfp-machine.h new file mode 100644 index 0000000000..730deae872 --- /dev/null +++ b/sysdeps/mips/mips64/soft-fp/sfp-machine.h @@ -0,0 +1,47 @@ +#define _FP_W_TYPE_SIZE 64 +#define _FP_W_TYPE unsigned long +#define _FP_WS_TYPE signed long +#define _FP_I_TYPE long + +#define _FP_MUL_MEAT_S(R,X,Y) \ + _FP_MUL_MEAT_1_imm(_FP_WFRACBITS_S,R,X,Y) +#define _FP_MUL_MEAT_D(R,X,Y) \ + _FP_MUL_MEAT_1_wide(_FP_WFRACBITS_D,R,X,Y,umul_ppmm) +#define _FP_MUL_MEAT_Q(R,X,Y) \ + _FP_MUL_MEAT_2_wide_3mul(_FP_WFRACBITS_Q,R,X,Y,umul_ppmm) + +#define _FP_DIV_MEAT_S(R,X,Y) _FP_DIV_MEAT_1_imm(S,R,X,Y,_FP_DIV_HELP_imm) +#define _FP_DIV_MEAT_D(R,X,Y) _FP_DIV_MEAT_1_udiv_norm(D,R,X,Y) +#define _FP_DIV_MEAT_Q(R,X,Y) _FP_DIV_MEAT_2_udiv(Q,R,X,Y) + +#define _FP_NANFRAC_S ((_FP_QNANBIT_S << 1) - 1) +#define _FP_NANFRAC_D ((_FP_QNANBIT_D << 1) - 1) +#define _FP_NANFRAC_Q ((_FP_QNANBIT_Q << 1) - 1), -1 +#define _FP_NANSIGN_S 0 +#define _FP_NANSIGN_D 0 +#define _FP_NANSIGN_Q 0 + +#define _FP_KEEPNANFRACP 1 +/* From my experiments it seems X is chosen unless one of the + NaNs is sNaN, in which case the result is NANSIGN/NANFRAC. */ +#define _FP_CHOOSENAN(fs, wc, R, X, Y, OP) \ + do { \ + if ((_FP_FRAC_HIGH_RAW_##fs(X) | \ + _FP_FRAC_HIGH_RAW_##fs(Y)) & _FP_QNANBIT_##fs) \ + { \ + R##_s = _FP_NANSIGN_##fs; \ + _FP_FRAC_SET_##wc(R,_FP_NANFRAC_##fs); \ + } \ + else \ + { \ + R##_s = X##_s; \ + _FP_FRAC_COPY_##wc(R,X); \ + } \ + R##_c = FP_CLS_NAN; \ + } while (0) + +#define FP_EX_INVALID (1 << 4) +#define FP_EX_DIVZERO (1 << 3) +#define FP_EX_OVERFLOW (1 << 2) +#define FP_EX_UNDERFLOW (1 << 1) +#define FP_EX_INEXACT (1 << 0) From 97d95c734da006e8ab49878b1e1fdbd69c01dd3c Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 5 Sep 2000 08:40:54 +0000 Subject: [PATCH 2223/4487] Moved from soft-fp/sysdeps/alpha/sfp-machine.h. --- sysdeps/alpha/soft-fp/sfp-machine.h | 35 +++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 sysdeps/alpha/soft-fp/sfp-machine.h diff --git a/sysdeps/alpha/soft-fp/sfp-machine.h b/sysdeps/alpha/soft-fp/sfp-machine.h new file mode 100644 index 0000000000..73b934ddce --- /dev/null +++ b/sysdeps/alpha/soft-fp/sfp-machine.h @@ -0,0 +1,35 @@ +#define _FP_W_TYPE_SIZE 64 +#define _FP_W_TYPE unsigned long +#define _FP_WS_TYPE signed long +#define _FP_I_TYPE long + +#define _alpha_mul_64_128(rhi, rlo, x, y) \ + __asm__("umulh %2,%3,%0; mulq %2,%3,%1" \ + : "=&r"(rhi), "=r"(rlo) : "r"(x), "r"(y)) + +#define _FP_MUL_MEAT_S(R,X,Y) \ + _FP_MUL_MEAT_1_imm(_FP_WFRACBITS_S,R,X,Y) +#define _FP_MUL_MEAT_D(R,X,Y) \ + _FP_MUL_MEAT_1_wide(_FP_WFRACBITS_D,R,X,Y,_alpha_mul_64_128) +#define _FP_MUL_MEAT_Q(R,X,Y) \ + _FP_MUL_MEAT_2_wide(_FP_WFRACBITS_Q,R,X,Y,_alpha_mul_64_128) + +#define _FP_DIV_MEAT_S(R,X,Y) _FP_DIV_MEAT_1_imm(S,R,X,Y,_FP_DIV_HELP_imm) +#define _FP_DIV_MEAT_D(R,X,Y) _FP_DIV_MEAT_1_udiv(D,R,X,Y) +#define _FP_DIV_MEAT_Q(R,X,Y) _FP_DIV_MEAT_2_udiv(Q,R,X,Y) + +#define _FP_NANFRAC_S _FP_QNANBIT_S +#define _FP_NANFRAC_D _FP_QNANBIT_D +#define _FP_NANFRAC_Q _FP_QNANBIT_Q, 0 +/* FIXME: This is just a wild guess */ +#define _FP_NANSIGN_S 1 +#define _FP_NANSIGN_D 1 +#define _FP_NANSIGN_Q 1 + +#define _FP_KEEPNANFRACP 1 +#define _FP_CHOOSENAN(fs, wc, R, X, Y, OP) \ + do { \ + R##_s = Y##_s; \ + _FP_FRAC_COPY_##wc(R,Y); \ + R##_c = FP_CLS_NAN; \ + } while (0) From 8025e8342763bb7937bc982e88e47e62fc8dd47f Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 5 Sep 2000 08:41:37 +0000 Subject: [PATCH 2224/4487] Moved from soft-fp/sysdeps/mips/sfp-machine.h. --- sysdeps/mips/soft-fp/sfp-machine.h | 47 ++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 sysdeps/mips/soft-fp/sfp-machine.h diff --git a/sysdeps/mips/soft-fp/sfp-machine.h b/sysdeps/mips/soft-fp/sfp-machine.h new file mode 100644 index 0000000000..3b2a40f0e2 --- /dev/null +++ b/sysdeps/mips/soft-fp/sfp-machine.h @@ -0,0 +1,47 @@ +#define _FP_W_TYPE_SIZE 32 +#define _FP_W_TYPE unsigned long +#define _FP_WS_TYPE signed long +#define _FP_I_TYPE long + +#define _FP_MUL_MEAT_S(R,X,Y) \ + _FP_MUL_MEAT_1_wide(_FP_WFRACBITS_S,R,X,Y,umul_ppmm) +#define _FP_MUL_MEAT_D(R,X,Y) \ + _FP_MUL_MEAT_2_wide(_FP_WFRACBITS_D,R,X,Y,umul_ppmm) +#define _FP_MUL_MEAT_Q(R,X,Y) \ + _FP_MUL_MEAT_4_wide(_FP_WFRACBITS_Q,R,X,Y,umul_ppmm) + +#define _FP_DIV_MEAT_S(R,X,Y) _FP_DIV_MEAT_1_udiv_norm(S,R,X,Y) +#define _FP_DIV_MEAT_D(R,X,Y) _FP_DIV_MEAT_2_udiv(D,R,X,Y) +#define _FP_DIV_MEAT_Q(R,X,Y) _FP_DIV_MEAT_4_udiv(Q,R,X,Y) + +#define _FP_NANFRAC_S ((_FP_QNANBIT_S << 1) - 1) +#define _FP_NANFRAC_D ((_FP_QNANBIT_D << 1) - 1), -1 +#define _FP_NANFRAC_Q ((_FP_QNANBIT_Q << 1) - 1), -1, -1, -1 +#define _FP_NANSIGN_S 0 +#define _FP_NANSIGN_D 0 +#define _FP_NANSIGN_Q 0 + +#define _FP_KEEPNANFRACP 1 +/* From my experiments it seems X is chosen unless one of the + NaNs is sNaN, in which case the result is NANSIGN/NANFRAC. */ +#define _FP_CHOOSENAN(fs, wc, R, X, Y, OP) \ + do { \ + if ((_FP_FRAC_HIGH_RAW_##fs(X) | \ + _FP_FRAC_HIGH_RAW_##fs(Y)) & _FP_QNANBIT_##fs) \ + { \ + R##_s = _FP_NANSIGN_##fs; \ + _FP_FRAC_SET_##wc(R,_FP_NANFRAC_##fs); \ + } \ + else \ + { \ + R##_s = X##_s; \ + _FP_FRAC_COPY_##wc(R,X); \ + } \ + R##_c = FP_CLS_NAN; \ + } while (0) + +#define FP_EX_INVALID (1 << 4) +#define FP_EX_DIVZERO (1 << 3) +#define FP_EX_OVERFLOW (1 << 2) +#define FP_EX_UNDERFLOW (1 << 1) +#define FP_EX_INEXACT (1 << 0) From 6ef46d7cc8b867c6c6c2cc5b4f8f0f469a0fdcbc Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 5 Sep 2000 15:17:27 +0000 Subject: [PATCH 2225/4487] New file. --- sysdeps/unix/sysv/linux/m68k/bits/fcntl.h | 155 ++++++++++++++++++++++ 1 file changed, 155 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/bits/fcntl.h diff --git a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h new file mode 100644 index 0000000000..99c068a898 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h @@ -0,0 +1,155 @@ +/* O_*, F_*, FD_* bit values for Linux. + Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _FCNTL_H +# error "Never use directly; include instead." +#endif + + +#include + +/* open/fcntl - O_SYNC is only implemented on blocks devices and on files + located on an ext2 file system */ +#define O_ACCMODE 0003 +#define O_RDONLY 00 +#define O_WRONLY 01 +#define O_RDWR 02 +#define O_CREAT 0100 /* not fcntl */ +#define O_EXCL 0200 /* not fcntl */ +#define O_NOCTTY 0400 /* not fcntl */ +#define O_TRUNC 01000 /* not fcntl */ +#define O_APPEND 02000 +#define O_NONBLOCK 04000 +#define O_NDELAY O_NONBLOCK +#define O_SYNC 010000 +#define O_FSYNC O_SYNC +#define O_ASYNC 020000 + +#ifdef __USE_GNU +# define O_DIRECTORY 040000 /* Must be a directory. */ +# define O_NOFOLLOW 0100000 /* Do not follow links. */ +# define O_DIRECT 0200000 /* Direct disk access. */ +#endif + +/* For now Linux has synchronisity options for data and read operations. + We define the symbols here but let them do the same as O_SYNC since + this is a superset. */ +#if defined __USE_POSIX199309 || defined __USE_UNIX98 +# define O_DSYNC O_SYNC /* Synchronize data. */ +# define O_RSYNC O_SYNC /* Synchronize read operations. */ +#endif + +#ifdef __USE_LARGEFILE64 +# define O_LARGEFILE 0400000 +#endif + +/* Values for the second argument to `fcntl'. */ +#define F_DUPFD 0 /* Duplicate file descriptor. */ +#define F_GETFD 1 /* Get file descriptor flags. */ +#define F_SETFD 2 /* Set file descriptor flags. */ +#define F_GETFL 3 /* Get file status flags. */ +#define F_SETFL 4 /* Set file status flags. */ +#ifndef __USE_FILE_OFFSET64 +# define F_GETLK 5 /* Get record locking info. */ +# define F_SETLK 6 /* Set record locking info (non-blocking). */ +# define F_SETLKW 7 /* Set record locking info (blocking). */ +#else +# define F_GETLK F_GETLK64 /* Get record locking info. */ +# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/ +# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */ +#endif +#define F_GETLK64 12 /* Get record locking info. */ +#define F_SETLK64 13 /* Set record locking info (non-blocking). */ +#define F_SETLKW64 14 /* Set record locking info (blocking). */ + +#if defined __USE_BSD || defined __USE_XOPEN2K +# define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */ +# define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */ +#endif + +#ifdef __USE_GNU +# define F_SETSIG 10 /* Set number of signal to be sent. */ +# define F_GETSIG 11 /* Get number of signal to be sent. */ +#endif + +/* For F_[GET|SET]FL. */ +#define FD_CLOEXEC 1 /* actually anything with low bit set goes */ + +/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */ +#define F_RDLCK 0 /* Read lock. */ +#define F_WRLCK 1 /* Write lock. */ +#define F_UNLCK 2 /* Remove lock. */ + +/* For old implementation of bsd flock(). */ +#define F_EXLCK 4 /* or 3 */ +#define F_SHLCK 8 /* or 4 */ + +#ifdef __USE_BSD +/* Operations for bsd flock(), also used by the kernel implementation. */ +# define LOCK_SH 1 /* shared lock */ +# define LOCK_EX 2 /* exclusive lock */ +# define LOCK_NB 4 /* or'd with one of the above to prevent + blocking */ +# define LOCK_UN 8 /* remove lock */ +#endif + +struct flock + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ +#ifndef __USE_FILE_OFFSET64 + __off_t l_start; /* Offset where the lock begins. */ + __off_t l_len; /* Size of the locked area; zero means until EOF. */ +#else + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ +#endif + __pid_t l_pid; /* Process holding the lock. */ + }; + +#ifdef __USE_LARGEFILE64 +struct flock64 + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ + __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. */ + }; +#endif + +/* Define some more compatibility macros to be backward compatible with + BSD systems which did not managed to hide these kernel macros. */ +#ifdef __USE_BSD +# define FAPPEND O_APPEND +# define FFSYNC O_FSYNC +# define FASYNC O_ASYNC +# define FNONBLOCK O_NONBLOCK +# define FNDELAY O_NDELAY +#endif /* Use BSD. */ + +/* Advise to `posix_fadvise'. */ +#ifdef __USE_XOPEN2K +# define POSIX_FADV_NORMAL 0 /* No further special treatment. */ +# define POSIX_FADV_RANDOM 1 /* Expect random page references. */ +# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */ +# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */ +# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ +#endif From 90d3df7387bc22fd080cb8bf73056e9578a2a2d2 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 5 Sep 2000 19:33:13 +0000 Subject: [PATCH 2226/4487] Use st_pad5. --- sysdeps/unix/sysv/linux/mips/bits/stat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h index 40f42f1df3..37c303b4d0 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/stat.h +++ b/sysdeps/unix/sysv/linux/mips/bits/stat.h @@ -74,7 +74,7 @@ struct stat long int st_pad4; __blkcnt64_t st_blocks; /* Number of 512-byte blocks allocated. */ #endif - long int st_pad4[14]; + long int st_pad5[14]; }; #ifdef __USE_LARGEFILE64 From e739de1170607e948d663a300e9329e0881d2dd7 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 5 Sep 2000 19:33:23 +0000 Subject: [PATCH 2227/4487] Follow changes for --- sysdeps/unix/sysv/linux/mips/xstatconv.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/xstatconv.c b/sysdeps/unix/sysv/linux/mips/xstatconv.c index 356235ace7..583b1eccf1 100644 --- a/sysdeps/unix/sysv/linux/mips/xstatconv.c +++ b/sysdeps/unix/sysv/linux/mips/xstatconv.c @@ -1,5 +1,5 @@ /* Convert between the kernel's `struct stat' format, and libc's. - Copyright (C) 1991, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1991,1995,1996,1997,1998,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 @@ -38,7 +38,7 @@ xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf) /* Convert to current kernel version of `struct stat'. */ buf->st_dev = kbuf->st_dev; - buf->st_pad1[0] = 0; buf->st_pad1[1] = 0; buf->st_pad1[2] = 0; + buf->st_pad1[0] = 0; buf->st_pad1[1] = 0; buf->st_pad1[2] = 0; buf->st_ino = kbuf->st_ino; buf->st_mode = kbuf->st_mode; buf->st_nlink = kbuf->st_nlink; @@ -50,15 +50,15 @@ xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf) buf->st_size = kbuf->st_size; buf->st_blksize = kbuf->st_blksize; buf->st_blocks = kbuf->st_blocks; - + buf->st_atime = kbuf->st_atime; buf->__reserved0 = 0; buf->st_mtime = kbuf->st_mtime; buf->__reserved1 = 0; buf->st_ctime = kbuf->st_ctime; buf->__reserved2 = 0; - - buf->st_pad4[0] = 0; buf->st_pad4[1] = 0; - buf->st_pad4[2] = 0; buf->st_pad4[3] = 0; - buf->st_pad4[4] = 0; buf->st_pad4[5] = 0; - buf->st_pad4[6] = 0; buf->st_pad4[7] = 0; + + buf->st_pad5[0] = 0; buf->st_pad5[1] = 0; + buf->st_pad5[2] = 0; buf->st_pad5[3] = 0; + buf->st_pad5[4] = 0; buf->st_pad5[5] = 0; + buf->st_pad5[6] = 0; buf->st_pad5[7] = 0; } break; @@ -83,14 +83,14 @@ xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf) struct stat64 *buf = ubuf; buf->st_dev = kbuf->st_dev; - buf->st_pad1[0] = 0; buf->st_pad1[1] = 0; buf->st_pad1[2] = 0; + buf->st_pad1[0] = 0; buf->st_pad1[1] = 0; buf->st_pad1[2] = 0; buf->st_ino = kbuf->st_ino; buf->st_mode = kbuf->st_mode; buf->st_nlink = kbuf->st_nlink; buf->st_uid = kbuf->st_uid; buf->st_gid = kbuf->st_gid; buf->st_rdev = kbuf->st_rdev; - buf->st_pad2[0] = 0; buf->st_pad2[1] = 0; + buf->st_pad2[0] = 0; buf->st_pad2[1] = 0; buf->st_pad2[2] = 0; buf->st_pad3 = 0; buf->st_size = kbuf->st_size; buf->st_blksize = kbuf->st_blksize; From 7e54ab950c879c7dec4f3d2f95b49cc77b5784ce Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 6 Sep 2000 08:21:55 +0000 Subject: [PATCH 2228/4487] [$(subdir) = misc]: Use sysdep_headers instead of headers for make dist. --- sysdeps/mips/Makefile | 3 ++- sysdeps/unix/sysv/linux/mips/Makefile | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sysdeps/mips/Makefile b/sysdeps/mips/Makefile index 54b3520c84..849785a550 100644 --- a/sysdeps/mips/Makefile +++ b/sysdeps/mips/Makefile @@ -1,5 +1,6 @@ ifeq ($(subdir),misc) -headers += regdef.h fpregdef.h sys/regdef.h sys/fpregdef.h sys/asm.h sgidefs.h +sysdep_headers += regdef.h fpregdef.h sys/regdef.h sys/fpregdef.h \ + sys/asm.h sgidefs.h endif ifeq ($(subdir),setjmp) diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile index 65365e129a..1f9fc2dd03 100644 --- a/sysdeps/unix/sysv/linux/mips/Makefile +++ b/sysdeps/unix/sysv/linux/mips/Makefile @@ -7,5 +7,5 @@ endif ifeq ($(subdir),misc) sysdep_routines += cachectl cacheflush sysmips _test_and_set -headers += sys/cachectl.h sys/sysmips.h sys/tas.h +sysdep_headers += sys/cachectl.h sys/sysmips.h sys/tas.h endif From 610bd8dec7f52d6cf20ff89f8f27955c31bc02f6 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 6 Sep 2000 10:52:05 +0000 Subject: [PATCH 2229/4487] New file with soft-fp specific files. --- sysdeps/alpha/soft-fp/Dist | 1 + sysdeps/mips/mips64/soft-fp/Dist | 1 + sysdeps/mips/soft-fp/Dist | 1 + 3 files changed, 3 insertions(+) create mode 100644 sysdeps/alpha/soft-fp/Dist create mode 100644 sysdeps/mips/mips64/soft-fp/Dist create mode 100644 sysdeps/mips/soft-fp/Dist diff --git a/sysdeps/alpha/soft-fp/Dist b/sysdeps/alpha/soft-fp/Dist new file mode 100644 index 0000000000..7e9914fe58 --- /dev/null +++ b/sysdeps/alpha/soft-fp/Dist @@ -0,0 +1 @@ +sfp-machine.h diff --git a/sysdeps/mips/mips64/soft-fp/Dist b/sysdeps/mips/mips64/soft-fp/Dist new file mode 100644 index 0000000000..7e9914fe58 --- /dev/null +++ b/sysdeps/mips/mips64/soft-fp/Dist @@ -0,0 +1 @@ +sfp-machine.h diff --git a/sysdeps/mips/soft-fp/Dist b/sysdeps/mips/soft-fp/Dist new file mode 100644 index 0000000000..7e9914fe58 --- /dev/null +++ b/sysdeps/mips/soft-fp/Dist @@ -0,0 +1 @@ +sfp-machine.h From b42bd0f5909c7d04ae60a9eebee5a0c27307811d Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 7 Sep 2000 08:17:04 +0000 Subject: [PATCH 2230/4487] (SYS_getdents64): New. (SYS_fcntl64): New. --- sysdeps/unix/sysv/linux/mips/sys/syscall.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/sys/syscall.h b/sysdeps/unix/sysv/linux/mips/sys/syscall.h index ccbacd73ad..78248a13bd 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/syscall.h +++ b/sysdeps/unix/sysv/linux/mips/sys/syscall.h @@ -19,11 +19,6 @@ #ifndef _SYSCALL_H #define _SYSCALL_H 1 -/* This file should list the numbers of the system the system knows. - But instead of duplicating this we use the information available - from the kernel sources. */ -#include - /* * SVR4 syscalls are in the range from 1 to 999 */ @@ -1212,6 +1207,8 @@ #define SYS_pivot_root (SYS_Linux + 216) #define SYS_mincore (SYS_Linux + 217) #define SYS_madvise (SYS_Linux + 218) +#define SYS_getdents64 (SYS_Linux + 219) +#define SYS_fcntl64 (SYS_Linux + 220) #endif /* sys/syscall.h */ From a20032ae23a2bbce9f9a60faf642ce146dcd0787 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 7 Sep 2000 08:17:25 +0000 Subject: [PATCH 2231/4487] Add getdents64. --- sysdeps/unix/sysv/linux/mips/syscalls.list | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index 71a1aa28f0..1dfd983da4 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -54,6 +54,7 @@ s_fstat64 fxstat64 fstat64 i:ip __syscall_fstat64 s_ftruncate64 ftruncate64 ftruncate64 i:iiii __syscall_ftruncate64 s_getcwd getcwd getcwd i:pi __syscall_getcwd s_getdents getdents getdents i:ipi __syscall_getdents +s_getdents64 getdents getdents64 i:ipi __syscall_getdents64 s_getpmsg getpmsg getpmsg i:ipppp __syscall_getpmsg s_getpriority getpriority getpriority i:ii __syscall_getpriority getresgid - getresgid i:ppp getresgid From 5274d0e37c3d56018d30fa31c100217dc5791eab Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 7 Sep 2000 11:56:20 +0000 Subject: [PATCH 2232/4487] fcntl/fcntl64 for Linux/MIPS. --- sysdeps/unix/sysv/linux/mips/fcntl.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/mips/fcntl.c diff --git a/sysdeps/unix/sysv/linux/mips/fcntl.c b/sysdeps/unix/sysv/linux/mips/fcntl.c new file mode 100644 index 0000000000..ea951bc4f9 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/fcntl.c @@ -0,0 +1 @@ +#include From f8915f93dda631a48e8938224fe38717b673b1a2 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 7 Sep 2000 14:51:43 +0000 Subject: [PATCH 2233/4487] Add __syscall_fcntl. --- sysdeps/unix/sysv/linux/mips/syscalls.list | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index 1dfd983da4..c182f6c4eb 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -50,6 +50,7 @@ rt_sigqueueinfo - rt_sigqueueinfo i:iip __syscall_rt_sigqueueinfo rt_sigsuspend - rt_sigsuspend i:pi __syscall_rt_sigsuspend rt_sigtimedwait - rt_sigtimedwait i:pppi __syscall_rt_sigtimedwait s_execve execve execve i:spp __syscall_execve +s_fcntl - fcntl i:iiF __syscall_fcntl s_fstat64 fxstat64 fstat64 i:ip __syscall_fstat64 s_ftruncate64 ftruncate64 ftruncate64 i:iiii __syscall_ftruncate64 s_getcwd getcwd getcwd i:pi __syscall_getcwd From 5e817c4e870ecbb3e50d469b4b8e2020373fb91c Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 7 Sep 2000 14:53:05 +0000 Subject: [PATCH 2234/4487] * sysdeps/mips/dl-machine.h (RESOLVE_GOTSYM): Fix calls to dl_lookup. (ELF_MACHINE_RUNTIME_TRAMPOLINE): Likewise. --- sysdeps/mips/dl-machine.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index d1ac5ccfb7..0d2bf9d6b6 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -262,14 +262,14 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \ { \ value = _dl_lookup_versioned_symbol(strtab + sym->st_name, l, \ &sym, l->l_scope, version,\ - R_MIPS_REL32); \ + R_MIPS_REL32, 0); \ break; \ } \ /* Fall through. */ \ } \ case 0: \ value = _dl_lookup_symbol (strtab + sym->st_name, l, &sym, \ - l->l_scope, R_MIPS_REL32); \ + l->l_scope, R_MIPS_REL32, 0); \ } \ \ /* Currently value contains the base load address of the object \ @@ -495,14 +495,14 @@ elf_machine_got_rel (struct link_map *map, int lazy) value = _dl_lookup_versioned_symbol(strtab + sym->st_name,\ map, \ &ref, scope, version, \ - R_MIPS_REL32); \ + R_MIPS_REL32, 0); \ break; \ } \ /* Fall through. */ \ } \ case 0: \ value = _dl_lookup_symbol (strtab + sym->st_name, map, &ref, \ - scope, R_MIPS_REL32); \ + scope, R_MIPS_REL32, 0); \ } \ \ (ref)? value + ref->st_value: 0; \ From d767c6f449f20903c19d1931b1e15dd6f3419a4f Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 7 Sep 2000 15:44:15 +0000 Subject: [PATCH 2235/4487] Linux/MIPS specific lockf64 version. --- sysdeps/unix/sysv/linux/mips/lockf64.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/mips/lockf64.c diff --git a/sysdeps/unix/sysv/linux/mips/lockf64.c b/sysdeps/unix/sysv/linux/mips/lockf64.c new file mode 100644 index 0000000000..a88f5a784a --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/lockf64.c @@ -0,0 +1 @@ +#include From fafed084cd81d76ddc4fadea848c94f7b965eca7 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 7 Sep 2000 15:44:36 +0000 Subject: [PATCH 2236/4487] Fix last checkin. --- sysdeps/unix/sysv/linux/mips/syscalls.list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index c182f6c4eb..67f3cd259d 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -50,7 +50,7 @@ rt_sigqueueinfo - rt_sigqueueinfo i:iip __syscall_rt_sigqueueinfo rt_sigsuspend - rt_sigsuspend i:pi __syscall_rt_sigsuspend rt_sigtimedwait - rt_sigtimedwait i:pppi __syscall_rt_sigtimedwait s_execve execve execve i:spp __syscall_execve -s_fcntl - fcntl i:iiF __syscall_fcntl +s_fcntl fcntl fcntl i:iiF __syscall_fcntl s_fstat64 fxstat64 fstat64 i:ip __syscall_fstat64 s_ftruncate64 ftruncate64 ftruncate64 i:iiii __syscall_ftruncate64 s_getcwd getcwd getcwd i:pi __syscall_getcwd From 2747c0eab5e85418498def16aa91f36bd9855808 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 8 Sep 2000 08:12:57 +0000 Subject: [PATCH 2237/4487] * sysdeps/unix/sysv/linux/arm/lockf64.c: New file. * sysdeps/unix/sysv/linux/arm/fcntl.c: New file. * sysdeps/unix/sysv/linux/arm/bits/fcntl.h (F_GETLK64,F_SETLK64,F_SETLKW64): Use values from 2.4.0-test8. (F_GETLK,F_SETLK,F_SETLKW): Handle __USE_FILE_OFFSET64 correctly. --- sysdeps/unix/sysv/linux/arm/bits/fcntl.h | 21 +++++++++++++-------- sysdeps/unix/sysv/linux/arm/fcntl.c | 1 + sysdeps/unix/sysv/linux/arm/lockf64.c | 1 + 3 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/arm/fcntl.c create mode 100644 sysdeps/unix/sysv/linux/arm/lockf64.c diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h index de1dd4ab63..deaa183d51 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h @@ -65,14 +65,19 @@ #define F_SETFD 2 /* Set file descriptor flags. */ #define F_GETFL 3 /* Get file status flags. */ #define F_SETFL 4 /* Set file status flags. */ -#define F_GETLK 5 /* Get record locking info. */ -#define F_SETLK 6 /* Set record locking info (non-blocking). */ -#define F_SETLKW 7 /* Set record locking info (blocking). */ - -/* XXX missing */ -#define F_GETLK64 5 /* Get record locking info. */ -#define F_SETLK64 6 /* Set record locking info (non-blocking). */ -#define F_SETLKW64 7 /* Set record locking info (blocking). */ + +#ifndef __USE_FILE_OFFSET64 +# define F_GETLK 5 /* Get record locking info. */ +# define F_SETLK 6 /* Set record locking info (non-blocking). */ +# define F_SETLKW 7 /* Set record locking info (blocking). */ +#else +# define F_GETLK F_GETLK64 /* Get record locking info. */ +# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/ +# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */ +#endif +#define F_GETLK64 12 /* Get record locking info. */ +#define F_SETLK64 13 /* Set record locking info (non-blocking). */ +#define F_SETLKW64 14 /* Set record locking info (blocking). */ #if defined __USE_BSD || defined __USE_XOPEN2K # define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */ diff --git a/sysdeps/unix/sysv/linux/arm/fcntl.c b/sysdeps/unix/sysv/linux/arm/fcntl.c new file mode 100644 index 0000000000..ea951bc4f9 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/fcntl.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/arm/lockf64.c b/sysdeps/unix/sysv/linux/arm/lockf64.c new file mode 100644 index 0000000000..a88f5a784a --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/lockf64.c @@ -0,0 +1 @@ +#include From 2b5887d3e4e7e09d11e77a0b2f7a08e4ef686952 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 13 Sep 2000 21:46:56 +0000 Subject: [PATCH 2238/4487] (CLOCKS_PER_SEC): Make a long int constant since this is what clock_t is. --- sysdeps/unix/sysv/linux/alpha/bits/time.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/time.h b/sysdeps/unix/sysv/linux/alpha/bits/time.h index ed9382bda6..a0eddbeeca 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/time.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/time.h @@ -31,7 +31,7 @@ /* CAE XSH, Issue 4, Version 2: The value of CLOCKS_PER_SEC is required to be 1 million on all XSI-conformant systems. */ -# define CLOCKS_PER_SEC 1000000 +# define CLOCKS_PER_SEC 1000000l # ifndef __STRICT_ANSI__ /* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK From 37b1259bd55f1e156578367406e1ba3220fcba2f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 14 Sep 2000 01:40:14 +0000 Subject: [PATCH 2239/4487] (__cmsg_nxthdr): Fix test for no more entries. --- sysdeps/unix/sysv/aix/bits/socket.h | 2 +- sysdeps/unix/sysv/linux/mips/bits/socket.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/aix/bits/socket.h b/sysdeps/unix/sysv/aix/bits/socket.h index eb5b766e24..febfc7298d 100644 --- a/sysdeps/unix/sysv/aix/bits/socket.h +++ b/sysdeps/unix/sysv/aix/bits/socket.h @@ -243,7 +243,7 @@ __cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW if ((unsigned char *) (__cmsg + 1) >= ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen) || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len) - >= ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen))) + > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen))) /* No more entries. */ return 0; return __cmsg; diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h index d8626c2749..ac7ff0795d 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/socket.h +++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h @@ -267,7 +267,7 @@ __cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW if ((unsigned char *) (__cmsg + 1) >= ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen) || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len) - >= ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen))) + > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen))) /* No more entries. */ return 0; return __cmsg; From 09ab85fedc0941186f03fea7be10956828ac2902 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 15 Sep 2000 12:24:49 +0000 Subject: [PATCH 2240/4487] MIPS specific version s of feenableexcept, fedisableexcept, fegetexcept. --- sysdeps/mips/fpu/fedisblxcpt.c | 44 ++++++++++++++++++++++++++++++++++ sysdeps/mips/fpu/feenablxcpt.c | 44 ++++++++++++++++++++++++++++++++++ sysdeps/mips/fpu/fegetexcept.c | 37 ++++++++++++++++++++++++++++ 3 files changed, 125 insertions(+) create mode 100644 sysdeps/mips/fpu/fedisblxcpt.c create mode 100644 sysdeps/mips/fpu/feenablxcpt.c create mode 100644 sysdeps/mips/fpu/fegetexcept.c diff --git a/sysdeps/mips/fpu/fedisblxcpt.c b/sysdeps/mips/fpu/fedisblxcpt.c new file mode 100644 index 0000000000..1ca229f22d --- /dev/null +++ b/sysdeps/mips/fpu/fedisblxcpt.c @@ -0,0 +1,44 @@ +/* Disable floating-point exceptions. + Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Jaeger , 2000. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +#define ENABLE_MASK 0xF80U +#define ENABLE_SHIFT 5 + +int +fedisableexcept (int excepts) +{ + unsigned int new_exc, old_exc; + + /* Get the current control word. */ + _FPU_GETCW (new_exc); + + old_exc = (new_exc & ENABLE_MASK) >> ENABLE_SHIFT; + + excepts &= FE_ALL_EXCEPT; + + new_exc &= ~(excepts << ENABLE_SHIFT); + new_exc &= ~_FPU_RESERVED; + _FPU_SETCW (new_exc); + + return old_exc; +} diff --git a/sysdeps/mips/fpu/feenablxcpt.c b/sysdeps/mips/fpu/feenablxcpt.c new file mode 100644 index 0000000000..e6175ddfbe --- /dev/null +++ b/sysdeps/mips/fpu/feenablxcpt.c @@ -0,0 +1,44 @@ +/* Enable floating-point exceptions. + Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Jaeger , 2000. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +#define ENABLE_MASK 0xF80U +#define ENABLE_SHIFT 5 + +int +feenableexcept (int excepts) +{ + unsigned int new_exc, old_exc; + + /* Get the current control word. */ + _FPU_GETCW (new_exc); + + old_exc = (new_exc & ENABLE_MASK) >> ENABLE_SHIFT; + + excepts &= FE_ALL_EXCEPT; + + new_exc |= excepts << ENABLE_SHIFT; + new_exc &= ~_FPU_RESERVED; + _FPU_SETCW (new_exc); + + return old_exc; +} diff --git a/sysdeps/mips/fpu/fegetexcept.c b/sysdeps/mips/fpu/fegetexcept.c new file mode 100644 index 0000000000..23da9f3729 --- /dev/null +++ b/sysdeps/mips/fpu/fegetexcept.c @@ -0,0 +1,37 @@ +/* Get enabled floating-point exceptions. + Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Jaeger , 2000. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +#define ENABLE_MASK 0xF80U +#define ENABLE_SHIFT 5 + + +int +fegetexcept (void) +{ + unsigned int exc; + + /* Get the current control word. */ + _FPU_GETCW (exc); + + return (exc & ENABLE_MASK) >> ENABLE_SHIFT; +} From 73675ea1ecd283a172d6a26869ae26a1ed9bdd95 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 15 Sep 2000 12:57:14 +0000 Subject: [PATCH 2241/4487] New file, common definitions for feenableexcept/fedisableexcept/fegetexcept. --- sysdeps/mips/fpu/fenv_libc.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 sysdeps/mips/fpu/fenv_libc.h diff --git a/sysdeps/mips/fpu/fenv_libc.h b/sysdeps/mips/fpu/fenv_libc.h new file mode 100644 index 0000000000..4d8d3eb4a7 --- /dev/null +++ b/sysdeps/mips/fpu/fenv_libc.h @@ -0,0 +1,29 @@ +/* Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Jaeger . + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _FENV_LIBC_H +#define _FENV_LIBC_H 1 + +/* Mask for enabling exceptions. */ +#define ENABLE_MASK 0xF80U + +/* Shift for FE_* flags. */ +#define ENABLE_SHIFT 5 + +#endif /* _FENV_LIBC_H */ From d9bfc800ccc07e0c007f172de6bee53e19f78de8 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 15 Sep 2000 12:57:40 +0000 Subject: [PATCH 2242/4487] Use fenv_libc.h --- sysdeps/mips/fpu/fedisblxcpt.c | 4 +--- sysdeps/mips/fpu/feenablxcpt.c | 4 +--- sysdeps/mips/fpu/fegetexcept.c | 5 +---- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/sysdeps/mips/fpu/fedisblxcpt.c b/sysdeps/mips/fpu/fedisblxcpt.c index 1ca229f22d..2d2ec8c86c 100644 --- a/sysdeps/mips/fpu/fedisblxcpt.c +++ b/sysdeps/mips/fpu/fedisblxcpt.c @@ -19,11 +19,9 @@ Boston, MA 02111-1307, USA. */ #include +#include #include -#define ENABLE_MASK 0xF80U -#define ENABLE_SHIFT 5 - int fedisableexcept (int excepts) { diff --git a/sysdeps/mips/fpu/feenablxcpt.c b/sysdeps/mips/fpu/feenablxcpt.c index e6175ddfbe..4e63c6669c 100644 --- a/sysdeps/mips/fpu/feenablxcpt.c +++ b/sysdeps/mips/fpu/feenablxcpt.c @@ -19,11 +19,9 @@ Boston, MA 02111-1307, USA. */ #include +#include #include -#define ENABLE_MASK 0xF80U -#define ENABLE_SHIFT 5 - int feenableexcept (int excepts) { diff --git a/sysdeps/mips/fpu/fegetexcept.c b/sysdeps/mips/fpu/fegetexcept.c index 23da9f3729..c065398a64 100644 --- a/sysdeps/mips/fpu/fegetexcept.c +++ b/sysdeps/mips/fpu/fegetexcept.c @@ -19,12 +19,9 @@ Boston, MA 02111-1307, USA. */ #include +#include #include -#define ENABLE_MASK 0xF80U -#define ENABLE_SHIFT 5 - - int fegetexcept (void) { From 6e228438b9e93edc807e78c283db0ed1bc56da25 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 15 Sep 2000 17:48:15 +0000 Subject: [PATCH 2243/4487] (inline_syscall_clobbers): Add memory clobber. --- sysdeps/unix/alpha/sysdep.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h index 80cb3e2486..5bedcf95ca 100644 --- a/sysdeps/unix/alpha/sysdep.h +++ b/sysdeps/unix/alpha/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1995, 1996 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995, 1996, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -131,7 +131,7 @@ __LABEL(name) \ #define inline_syscall_clobbers \ "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8", \ - "$22", "$23", "$24", "$25", "$27", "$28" + "$22", "$23", "$24", "$25", "$27", "$28", "memory" /* It is moderately important optimization-wise to limit the lifetime of the hard-register variables as much as possible. Thus we copy From c09c05d8279659b06ac6ef26641b01be071f289c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 15 Sep 2000 17:48:53 +0000 Subject: [PATCH 2244/4487] (INLINE_SYSCALL): Add memory clobber. --- sysdeps/unix/sysv/linux/arm/sysdep.h | 2 +- sysdeps/unix/sysv/linux/m68k/sysdep.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index 1413a48736..1fae6c1f43 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -131,7 +131,7 @@ asm volatile ("swi %1 @ syscall " #name \ : "=r" (_a1) \ : "i" (SYS_ify(name)) ASM_ARGS_##nr \ - : "a1"); \ + : "a1" : "memory"); \ _sys_result = _a1; \ } \ if (_sys_result >= (unsigned int) -4095) \ diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h index d445471440..e10c78862b 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Andreas Schwab, , December 1995. @@ -171,7 +171,7 @@ SYSCALL_ERROR_LABEL: \ asm volatile ("trap #0" \ : "=d" (_d0) \ : "0" (_d0) ASM_ARGS_##nr \ - : "d0"); \ + : "d0" : "memory"); \ _sys_result = _d0; \ } \ if (_sys_result >= (unsigned int) -4095) \ From 5898ca31ae0dabd2513eb5f3a66789a2f2a4ce2b Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 15 Sep 2000 18:15:31 +0000 Subject: [PATCH 2245/4487] (__fesetenv): Handle FE_NOMASK_ENV. --- sysdeps/mips/fpu/fesetenv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/mips/fpu/fesetenv.c b/sysdeps/mips/fpu/fesetenv.c index ab90e4d022..ff84a412a5 100644 --- a/sysdeps/mips/fpu/fesetenv.c +++ b/sysdeps/mips/fpu/fesetenv.c @@ -32,6 +32,8 @@ __fesetenv (const fenv_t *envp) if (envp == FE_DFL_ENV) _FPU_SETCW (_FPU_DEFAULT); + else if (envp == FE_NOMASK_ENV) + _FPU_SETCW (_FPU_IEEE); else _FPU_SETCW (envp->__fp_control_register); From 8ebc36ad77d3370e2fa2b69c0be4440f690797f8 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 15 Sep 2000 18:15:57 +0000 Subject: [PATCH 2246/4487] (FE_NOMASK_ENV): Define. --- sysdeps/mips/bits/fenv.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sysdeps/mips/bits/fenv.h b/sysdeps/mips/bits/fenv.h index 72dd281b9d..4e740365b9 100644 --- a/sysdeps/mips/bits/fenv.h +++ b/sysdeps/mips/bits/fenv.h @@ -70,3 +70,8 @@ fenv_t; /* If the default argument is used we use this value. */ #define FE_DFL_ENV ((__const fenv_t *) -1) + +#ifdef __USE_GNU +/* Floating-point environment where none of the exception is masked. */ +# define FE_NOMASK_ENV ((__const fenv_t *) -2) +#endif From efc4903b91333d74ebf1fadbd9e881874267891d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 16 Sep 2000 22:59:10 +0000 Subject: [PATCH 2247/4487] Reorder ieee754 implies so that ldbl-* comes first. --- sysdeps/m68k/Implies | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/m68k/Implies b/sysdeps/m68k/Implies index b64e753525..5c778d4fbc 100644 --- a/sysdeps/m68k/Implies +++ b/sysdeps/m68k/Implies @@ -1,5 +1,5 @@ wordsize-32 # 68k uses IEEE 754 floating point. -ieee754/flt-32 -ieee754/dbl-64 ieee754/ldbl-96 +ieee754/dbl-64 +ieee754/flt-32 From 62f2f67818894354cbe6ff6dfaa0cc6b7868abee Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 17 Sep 2000 19:54:50 +0000 Subject: [PATCH 2248/4487] (INLINE_SYSCALL): Fix last patch. --- sysdeps/unix/sysv/linux/arm/sysdep.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index 1fae6c1f43..79453f8fe9 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -131,7 +131,7 @@ asm volatile ("swi %1 @ syscall " #name \ : "=r" (_a1) \ : "i" (SYS_ify(name)) ASM_ARGS_##nr \ - : "a1" : "memory"); \ + : "a1", "memory"); \ _sys_result = _a1; \ } \ if (_sys_result >= (unsigned int) -4095) \ From e69ea461c50d0cd38c812dd3fef898fc49a40f5d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 18 Sep 2000 00:28:16 +0000 Subject: [PATCH 2249/4487] (INLINE_SYSCALL): Fix last patch. --- sysdeps/unix/sysv/linux/m68k/sysdep.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h index e10c78862b..39b7bda1bb 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -171,7 +171,7 @@ SYSCALL_ERROR_LABEL: \ asm volatile ("trap #0" \ : "=d" (_d0) \ : "0" (_d0) ASM_ARGS_##nr \ - : "d0" : "memory"); \ + : "d0", "memory"); \ _sys_result = _d0; \ } \ if (_sys_result >= (unsigned int) -4095) \ From 9128d5fd877503ec7fef5069f03d5c02f02bc656 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 18 Sep 2000 16:39:27 +0000 Subject: [PATCH 2250/4487] MIPS specific file. MIPS always had 32 bit uids. --- sysdeps/unix/sysv/linux/mips/ipc_priv.h | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/mips/ipc_priv.h diff --git a/sysdeps/unix/sysv/linux/mips/ipc_priv.h b/sysdeps/unix/sysv/linux/mips/ipc_priv.h new file mode 100644 index 0000000000..9b85386a7c --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/ipc_priv.h @@ -0,0 +1 @@ +#include From 56eb5d143239d9e1b586081d878c1910174a33b4 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 18 Sep 2000 16:39:45 +0000 Subject: [PATCH 2251/4487] Add ipc_priv.h. --- sysdeps/unix/sysv/linux/mips/Dist | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/mips/Dist b/sysdeps/unix/sysv/linux/mips/Dist index d8943b6a10..a983244372 100644 --- a/sysdeps/unix/sysv/linux/mips/Dist +++ b/sysdeps/unix/sysv/linux/mips/Dist @@ -1,6 +1,7 @@ _test_and_set.c clone.S entry.h +ipc_priv.h kernel_sigaction.h kernel_stat.h kernel_termios.h From 921bb2c3002fea36e16cc2c96e67411fb48c6c8d Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 18 Sep 2000 16:40:35 +0000 Subject: [PATCH 2252/4487] * sysdeps/mips/dl-machine.h (_RTLD_PROLOGUE): Reformat. Declare as function. (_RTLD_EPILOGUE): Reformat. Declare size of entry function. (ELF_MACHINE_BEFORE_RTLD_RELOC): Relocate the dynamic linker itself so it will even work when not loaded to the standard address. (RTLD_START): Reformat. Call _dl_start in a way that is safe even before the dynamic linker itself is relocated. --- sysdeps/mips/dl-machine.h | 93 +++++++++++++++++++++++++++++++++------ 1 file changed, 80 insertions(+), 13 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 0d2bf9d6b6..6d9570542b 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -37,13 +37,17 @@ #define OFFSET_GP_GOT 0x7ff0 #ifndef _RTLD_PROLOGUE -# define _RTLD_PROLOGUE(entry) "\n\t.globl " __STRING(entry) \ - "\n\t.ent " __STRING(entry) \ - "\n\t" __STRING(entry) ":\n\t" +# define _RTLD_PROLOGUE(entry) \ + ".globl\t" __STRING(entry) "\n\t" \ + ".ent\t" __STRING(entry) "\n\t" \ + ".type\t" __STRING(entry) ", @function\n" \ + __STRING(entry) ":\n\t" #endif #ifndef _RTLD_EPILOGUE -# define _RTLD_EPILOGUE(entry) "\t.end " __STRING(entry) "\n" +# define _RTLD_EPILOGUE(entry) \ + ".end\t" __STRING(entry) "\n\t" \ + ".size\t" __STRING(entry) ", . - " __STRING(entry) "\n\t" #endif /* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. @@ -134,6 +138,60 @@ elf_machine_load_address (void) /* The MSB of got[1] of a gnu object is set to identify gnu objects. */ #define ELF_MIPS_GNU_GOT1_MASK 0x80000000 +/* We can't rely on elf_machine_got_rel because _dl_object_relocation_scope + fiddles with global data. */ +#define ELF_MACHINE_BEFORE_RTLD_RELOC(dynamic_info) \ +do { \ + struct link_map *map = &bootstrap_map; \ + ElfW(Sym) *sym; \ + ElfW(Addr) *got; \ + int i, n; \ + \ + got = (ElfW(Addr) *) D_PTR (map, l_info[DT_PLTGOT]); \ + \ + \ + if (__builtin_expect (map->l_addr == 0, 1)) \ + goto done; \ + \ + /* got[0] is reserved. got[1] is also reserved for the dynamic object \ + generated by gnu ld. Skip these reserved entries from \ + relocation. */ \ + i = (got[1] & ELF_MIPS_GNU_GOT1_MASK)? 2 : 1; \ + n = map->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; \ + \ + /* Add the run-time display to all local got entries. */ \ + while (i < n) \ + got[i++] += map->l_addr; \ + \ + /* Handle global got entries. */ \ + got += n; \ + sym = (ElfW(Sym) *) D_PTR(map, l_info[DT_SYMTAB]) \ + + map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val; \ + i = (map->l_info[DT_MIPS (SYMTABNO)]->d_un.d_val \ + - map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val); \ + \ + while (i--) \ + { \ + if (sym->st_shndx == SHN_UNDEF || sym->st_shndx == SHN_COMMON) \ + *got = map->l_addr + sym->st_value; \ + else if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC \ + && *got != sym->st_value) \ + *got += map->l_addr; \ + else if (ELFW(ST_TYPE) (sym->st_info) == STT_SECTION) \ + { \ + if (sym->st_other == 0) \ + *got += map->l_addr; \ + } \ + else \ + *got = map->l_addr + sym->st_value; \ + \ + got++; \ + sym++; \ + } \ +done: \ +} while(0) + + /* Get link map for callers object containing STUB_PC. */ static inline struct link_map * elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc) @@ -354,10 +412,10 @@ _dl_runtime_resolve:\n \ 2) That under Linux the entry is named __start and not just plain _start. */ -#define RTLD_START asm ("\ - .text\n"\ -_RTLD_PROLOGUE(ENTRY_POINT)\ -" .globl _dl_start_user\n\ +#define RTLD_START asm (\ + ".text\n"\ + _RTLD_PROLOGUE(ENTRY_POINT)\ + ".set noreorder\n\ .set noreorder\n\ bltzal $0, 0f\n\ nop\n\ @@ -371,10 +429,19 @@ _RTLD_PROLOGUE(ENTRY_POINT)\ sw $4, -0x7ff0($28)\n\ move $4, $29\n\ subu $29, 16\n\ - jal _dl_start\n\ + \n\ + la $8, coff\n\ + bltzal $8, coff\n\ +coff: subu $8, $31, $8\n\ + \n\ + la $25, _dl_start\n\ + addu $25, $8\n\ + jalr $25\n\ + \n\ addiu $29, 16\n\ # Get the value of label '_dl_start_user' in t9 ($25).\n\ la $25, _dl_start_user\n\ + .globl _dl_start_user\n\ _dl_start_user:\n\ .set noreorder\n\ .cpload $25\n\ @@ -410,9 +477,9 @@ _dl_start_user:\n\ la $2, _dl_fini\n\ # Jump to the user entry point.\n\ move $25, $17\n\ - jr $25\n"\ -_RTLD_EPILOGUE(ENTRY_POINT)\ - "\n.previous"\ + jr $25\n\t"\ + _RTLD_EPILOGUE(ENTRY_POINT)\ + ".previous"\ ); /* The MIPS never uses Elfxx_Rela relocations. */ @@ -513,7 +580,7 @@ elf_machine_got_rel (struct link_map *map, int lazy) /* got[0] is reserved. got[1] is also reserved for the dynamic object generated by gnu ld. Skip these reserved entries from relocation. */ - i = (got[1] & ELF_MIPS_GNU_GOT1_MASK)? 2: 1; + i = (got[1] & ELF_MIPS_GNU_GOT1_MASK)? 2 : 1; n = map->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; /* Add the run-time display to all local got entries if needed. */ if (__builtin_expect (map->l_addr != 0, 0)) From f8f2a6fa36ef418ce6fc10883911d4209a84dab2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 19 Sep 2000 00:18:10 +0000 Subject: [PATCH 2253/4487] Add fpu/fenv_libc.h. --- sysdeps/mips/Dist | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/mips/Dist b/sysdeps/mips/Dist index 7c7e545ca4..5ad586dbff 100644 --- a/sysdeps/mips/Dist +++ b/sysdeps/mips/Dist @@ -4,6 +4,7 @@ rtld-parms regdef.h sgidefs.h fpregdef.h +fpu/fenv_libc.h sys/fpregdef.h sys/regdef.h sys/asm.h From d2fb0972b5448ada7128009ea484b5b35e3bc090 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 22 Sep 2000 07:35:56 +0000 Subject: [PATCH 2254/4487] Alpha specific ulps. --- sysdeps/alpha/fpu/libm-test-ulps | 1079 ++++++++++++++++++++++++++++++ 1 file changed, 1079 insertions(+) create mode 100644 sysdeps/alpha/fpu/libm-test-ulps diff --git a/sysdeps/alpha/fpu/libm-test-ulps b/sysdeps/alpha/fpu/libm-test-ulps new file mode 100644 index 0000000000..515d07169c --- /dev/null +++ b/sysdeps/alpha/fpu/libm-test-ulps @@ -0,0 +1,1079 @@ +# Begin of automatic generation + +# asin +Test "asin (-0.5) == -pi/6": +float: 2 +ifloat: 2 +Test "asin (0.5) == pi/6": +float: 2 +ifloat: 2 +Test "asin (0.7) == 0.7753974966107530637": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +# atanh +Test "atanh (0.7) == 0.8673005276940531944": +double: 1 +idouble: 1 + +# cabs +Test "cabs (-0.7 + 12.4 i) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "cabs (-0.7 - 12.4 i) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "cabs (-12.4 + 0.7 i) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "cabs (-12.4 - 0.7 i) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508": +double: 1 +idouble: 1 +Test "cabs (0.7 + 12.4 i) == 12.41974234837422060118": +float: 1 +ifloat: 1 + +# cacos +Test "Real part of: cacos (0.7 + 1.2 i) == 1.1351827477151551089 - 1.0927647857577371459 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: cacos (0.7 + 1.2 i) == 1.1351827477151551089 - 1.0927647857577371459 i": +float: 1 +ifloat: 1 + +# cacosh +Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323 + 2.1414491111159960199 i": +double: 1 +float: 7 +idouble: 1 +ifloat: 7 +Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323 + 2.1414491111159960199 i": +double: 1 +float: 3 +idouble: 1 +ifloat: 3 +Test "Real part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459 + 1.1351827477151551089 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# casin +Test "Real part of: casin (0.7 + 1.2 i) == 0.4356135790797415103 + 1.0927647857577371459 i": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 +Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103 + 1.0927647857577371459 i": +float: 1 +ifloat: 1 + +# casinh +Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917 - 0.9646585044076027920 i": +double: 5 +float: 1 +idouble: 5 +ifloat: 1 +Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917 - 0.9646585044076027920 i": +double: 3 +float: 6 +idouble: 3 +ifloat: 6 +Test "Real part of: casinh (0.7 + 1.2 i) == 0.9786545955936738768 + 0.9113541895315601156 i": +double: 1 +idouble: 1 +Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.9786545955936738768 + 0.9113541895315601156 i": +float: 1 +ifloat: 1 + +# catan +Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225 - 0.2290726829685387662 i": +float: 3 +ifloat: 3 +Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225 - 0.2290726829685387662 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: catan (0.7 + 1.2 i) == 1.0785743834118921877 + 0.5770573776534306764 i": +float: 4 +ifloat: 4 +Test "Imaginary part of: catan (0.7 + 1.2 i) == 1.0785743834118921877 + 0.5770573776534306764 i": +double: 1 +idouble: 1 + +# catanh +Test "Real part of: catanh (-2 - 3 i) == -0.1469466662255297520 - 1.3389725222944935611 i": +double: 4 +idouble: 4 +Test "Imaginary part of: catanh (-2 - 3 i) == -0.1469466662255297520 - 1.3389725222944935611 i": +float: 4 +ifloat: 4 +Test "Real part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959 + 0.9702403077950989849 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959 + 0.9702403077950989849 i": +double: 1 +float: 6 +idouble: 1 +ifloat: 6 + +# cbrt +Test "cbrt (-27.0) == -3.0": +double: 1 +idouble: 1 +Test "cbrt (0.970299) == 0.99": +double: 1 +idouble: 1 + +# ccos +Test "Imaginary part of: ccos (-2 - 3 i) == -4.1896256909688072301 - 9.1092278937553365979 i": +float: 1 +ifloat: 1 +Test "Real part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i": +double: 1 +idouble: 1 + +# ccosh +Test "Real part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i": +float: 1 +ifloat: 1 +Test "Real part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i": +double: 1 +idouble: 1 + +# cexp +Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.1339809149295426134 - 0.0190985162611351964 i": +float: 1 +ifloat: 1 +Test "Real part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i": +float: 1 +ifloat: 1 + +# clog +Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680 - 2.1587989303424641704 i": +double: 1 +float: 3 +idouble: 1 +ifloat: 3 + +# clog10 +Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-2 - 3 i) == 0.5569716761534183846 - 0.9375544629863747085 i": +double: 1 +float: 5 +idouble: 1 +ifloat: 5 +Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Real part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i": +double: 1 +idouble: 1 +Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i": +float: 1 +ifloat: 1 + +# cos +Test "cos (0.7) == 0.7648421872844884262": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "cos (M_PI_6l * 2.0) == 0.5": +double: 1 +float: 0.5 +idouble: 1 +ifloat: 0.5 +Test "cos (M_PI_6l * 4.0) == -0.5": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "cos (pi/2) == 0": +double: 0.2758 +float: 0.3667 +idouble: 0.2758 +ifloat: 0.3667 + +# cpow +Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": +double: 1 +float: 4 +idouble: 1 +ifloat: 4 +Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": +float: 2 +ifloat: 2 +Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + +# csin +Test "Imaginary part of: csin (0.7 + 1.2 i) == 1.1664563419657581376 + 1.1544997246948547371 i": +float: 1 +ifloat: 1 + +# csinh +Test "Imaginary part of: csinh (-2 - 3 i) == 3.5905645899857799520 - 0.5309210862485198052 i": +double: 1 +idouble: 1 +Test "Real part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i": +float: 1 +ifloat: 1 + +# csqrt +Test "Real part of: csqrt (-2 + 3 i) == 0.8959774761298381247 + 1.6741492280355400404 i": +float: 1 +ifloat: 1 +Test "Real part of: csqrt (-2 - 3 i) == 0.8959774761298381247 - 1.6741492280355400404 i": +float: 1 +ifloat: 1 +Test "Real part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i": +float: 1 +ifloat: 1 + +# ctan +Test "Real part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i": +double: 1 +idouble: 1 +Test "Real part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# ctanh +Test "Real part of: ctanh (-2 - 3 i) == -0.9653858790221331242 + 0.0098843750383224937 i": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i": +float: 1 +ifloat: 1 +Test "Real part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Imaginary part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + +# erfc +Test "erfc (0.7) == 0.32219880616258152702": +double: 1 +idouble: 1 +Test "erfc (1.2) == 0.089686021770364619762": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +Test "erfc (2.0) == 0.0046777349810472658379": +double: 1 +idouble: 1 +Test "erfc (4.1) == 0.67000276540848983727e-8": +double: 24 +float: 12 +idouble: 24 +ifloat: 12 + +# exp10 +Test "exp10 (-1) == 0.1": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "exp10 (0.7) == 5.0118723362727228500": +float: 1 +ifloat: 1 +Test "exp10 (3) == 1000": +double: 6 +float: 2 +idouble: 6 +ifloat: 2 + +# expm1 +Test "expm1 (1) == M_El - 1.0": +float: 1 +ifloat: 1 + +# fmod +Test "fmod (-6.5, -2.3) == -1.9": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "fmod (-6.5, 2.3) == -1.9": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "fmod (6.5, -2.3) == 1.9": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "fmod (6.5, 2.3) == 1.9": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + +# hypot +Test "hypot (-0.7, -12.4) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "hypot (-0.7, 12.4) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "hypot (-12.4, -0.7) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "hypot (-12.4, 0.7) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "hypot (0.7, -12.4) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "hypot (0.7, 1.2) == 1.3892443989449804508": +double: 1 +idouble: 1 +Test "hypot (0.7, 12.4) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "hypot (12.4, -0.7) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "hypot (12.4, 0.7) == 12.41974234837422060118": +float: 1 +ifloat: 1 + +# j0 +Test "j0 (10.0) == -0.24593576445134833520": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "j0 (2.0) == 0.22389077914123566805": +float: 2 +ifloat: 2 +Test "j0 (8.0) == 0.17165080713755390609": +float: 1 +ifloat: 1 + +# j1 +Test "j1 (10.0) == 0.043472746168861436670": +float: 2 +ifloat: 2 +Test "j1 (2.0) == 0.57672480775687338720": +double: 1 +idouble: 1 +Test "j1 (8.0) == 0.23463634685391462438": +double: 1 +idouble: 1 + +# jn +Test "jn (0, 10.0) == -0.24593576445134833520": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "jn (0, 2.0) == 0.22389077914123566805": +float: 2 +ifloat: 2 +Test "jn (0, 8.0) == 0.17165080713755390609": +float: 1 +ifloat: 1 +Test "jn (1, 10.0) == 0.043472746168861436670": +float: 2 +ifloat: 2 +Test "jn (1, 2.0) == 0.57672480775687338720": +double: 1 +idouble: 1 +Test "jn (1, 8.0) == 0.23463634685391462438": +double: 1 +idouble: 1 +Test "jn (10, 0.1) == 0.26905328954342155795e-19": +double: 6 +float: 4 +idouble: 6 +ifloat: 4 +Test "jn (10, 0.7) == 0.75175911502153953928e-11": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "jn (10, 10.0) == 0.20748610663335885770": +double: 4 +float: 3 +idouble: 4 +ifloat: 3 +Test "jn (10, 2.0) == 0.25153862827167367096e-6": +float: 4 +ifloat: 4 +Test "jn (3, 0.1) == 0.000020820315754756261429": +double: 1 +idouble: 1 +Test "jn (3, 0.7) == 0.0069296548267508408077": +float: 1 +ifloat: 1 +Test "jn (3, 10.0) == 0.058379379305186812343": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "jn (3, 2.0) == 0.12894324947440205110": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +# lgamma +Test "lgamma (0.7) == 0.26086724653166651439": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "lgamma (1.2) == -0.853740900033158497197e-1": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +# log +Test "log (0.7) == -0.35667494393873237891": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# log10 +Test "log10 (0.7) == -0.15490195998574316929": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "log10 (e) == log10(e)": +float: 1 +ifloat: 1 + +# log1p +Test "log1p (-0.3) == -0.35667494393873237891": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# log2 +Test "log2 (0.7) == -0.51457317282975824043": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# sincos +Test "sincos (0.7, &sin_res, &cos_res) puts 0.76484218728448842626 in cos_res": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": +double: 1 +float: 0.5 +idouble: 1 +ifloat: 0.5 +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.866025403784438646764 in sin_res": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res": +double: 0.2758 +float: 0.3667 +idouble: 0.2758 +ifloat: 0.3667 +Test "sincos (pi/6, &sin_res, &cos_res) puts 0.866025403784438646764 in cos_res": +float: 1 +ifloat: 1 + +# sinh +Test "sinh (0.7) == 0.75858370183953350346": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# tan +Test "tan (pi/4) == 1": +double: 0.5 +idouble: 0.5 + +# tanh +Test "tanh (0.7) == 0.60436777711716349631": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# tgamma +Test "tgamma (-0.5) == -2 sqrt (pi)": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "tgamma (0.5) == sqrt (pi)": +float: 1 +ifloat: 1 +Test "tgamma (0.7) == 1.29805533264755778568": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# y0 +Test "y0 (0.7) == -0.19066492933739506743": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "y0 (1.0) == 0.088256964215676957983": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "y0 (1.5) == 0.38244892379775884396": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "y0 (10.0) == 0.055671167283599391424": +float: 1 +ifloat: 1 +Test "y0 (8.0) == 0.22352148938756622053": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# y1 +Test "y1 (0.1) == -6.4589510947020269877": +double: 1 +idouble: 1 +Test "y1 (0.7) == -1.1032498719076333697": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "y1 (1.5) == -0.41230862697391129595": +float: 1 +ifloat: 1 +Test "y1 (10.0) == 0.24901542420695388392": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "y1 (2.0) == -0.10703243154093754689": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "y1 (8.0) == -0.15806046173124749426": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +# yn +Test "yn (0, 0.7) == -0.19066492933739506743": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "yn (0, 1.0) == 0.088256964215676957983": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "yn (0, 1.5) == 0.38244892379775884396": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "yn (0, 10.0) == 0.055671167283599391424": +float: 1 +ifloat: 1 +Test "yn (0, 8.0) == 0.22352148938756622053": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (1, 0.1) == -6.4589510947020269877": +double: 1 +idouble: 1 +Test "yn (1, 0.7) == -1.1032498719076333697": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (1, 1.5) == -0.41230862697391129595": +float: 1 +ifloat: 1 +Test "yn (1, 10.0) == 0.24901542420695388392": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "yn (1, 2.0) == -0.10703243154093754689": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (1, 8.0) == -0.15806046173124749426": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +Test "yn (10, 0.1) == -0.11831335132045197885e19": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +Test "yn (10, 0.7) == -0.42447194260703866924e10": +double: 3 +idouble: 3 +Test "yn (10, 1.0) == -0.12161801427868918929e9": +double: 1 +idouble: 1 +Test "yn (10, 10.0) == -0.35981415218340272205": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (10, 2.0) == -129184.54220803928264": +double: 2 +idouble: 2 +Test "yn (3, 0.1) == -5099.3323786129048894": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (3, 0.7) == -15.819479052819633505": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "yn (3, 10.0) == -0.25136265718383732978": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (3, 2.0) == -1.1277837768404277861": +double: 1 +idouble: 1 + +# Maximal error of functions: +Function: "asin": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +Function: "atanh": +double: 1 +idouble: 1 + +Function: "cabs": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "cacos": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "cacos": +float: 1 +ifloat: 1 + +Function: Real part of "cacosh": +double: 1 +float: 7 +idouble: 1 +ifloat: 7 + +Function: Imaginary part of "cacosh": +double: 1 +float: 3 +idouble: 1 +ifloat: 3 + +Function: Real part of "casin": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 + +Function: Imaginary part of "casin": +float: 1 +ifloat: 1 + +Function: Real part of "casinh": +double: 5 +float: 1 +idouble: 5 +ifloat: 1 + +Function: Imaginary part of "casinh": +double: 3 +float: 6 +idouble: 3 +ifloat: 6 + +Function: Real part of "catan": +float: 4 +ifloat: 4 + +Function: Imaginary part of "catan": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "catanh": +double: 4 +float: 1 +idouble: 4 +ifloat: 1 + +Function: Imaginary part of "catanh": +double: 1 +float: 6 +idouble: 1 +ifloat: 6 + +Function: "cbrt": +double: 1 +idouble: 1 + +Function: Real part of "ccos": +double: 1 +idouble: 1 + +Function: Imaginary part of "ccos": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "ccosh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "ccosh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "cexp": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "cexp": +float: 1 +ifloat: 1 + +Function: Imaginary part of "clog": +double: 1 +float: 3 +idouble: 1 +ifloat: 3 + +Function: Real part of "clog10": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "clog10": +double: 1 +float: 5 +idouble: 1 +ifloat: 5 + +Function: "cos": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + +Function: Real part of "cpow": +double: 1 +float: 4 +idouble: 1 +ifloat: 4 + +Function: Imaginary part of "cpow": +double: 1.1031 +float: 2 +idouble: 1.1031 +ifloat: 2 + +Function: Imaginary part of "csin": +float: 1 +ifloat: 1 + +Function: Real part of "csinh": +float: 1 +ifloat: 1 + +Function: Imaginary part of "csinh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "csqrt": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "csqrt": +float: 1 +ifloat: 1 + +Function: Real part of "ctan": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "ctan": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "ctanh": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + +Function: Imaginary part of "ctanh": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + +Function: "erfc": +double: 24 +float: 12 +idouble: 24 +ifloat: 12 + +Function: "exp10": +double: 6 +float: 2 +idouble: 6 +ifloat: 2 + +Function: "expm1": +float: 1 +ifloat: 1 + +Function: "fmod": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + +Function: "hypot": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "j0": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + +Function: "j1": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +Function: "jn": +double: 6 +float: 4 +idouble: 6 +ifloat: 4 + +Function: "lgamma": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +Function: "log": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "log10": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "log1p": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "log2": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "sincos": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "sinh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "tan": +double: 0.5 +idouble: 0.5 + +Function: "tanh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "tgamma": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "y0": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + +Function: "y1": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 + +Function: "yn": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 + +# end of automatic generation From f7a43cc94a913e61c64e09f88652ad3e9c8a9319 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 26 Sep 2000 17:34:57 +0000 Subject: [PATCH 2255/4487] Ulps for m68k. --- sysdeps/m68k/fpu/libm-test-ulps | 1301 +++++++++++++++++++++++++++++++ 1 file changed, 1301 insertions(+) create mode 100644 sysdeps/m68k/fpu/libm-test-ulps diff --git a/sysdeps/m68k/fpu/libm-test-ulps b/sysdeps/m68k/fpu/libm-test-ulps new file mode 100644 index 0000000000..e3d42abf10 --- /dev/null +++ b/sysdeps/m68k/fpu/libm-test-ulps @@ -0,0 +1,1301 @@ +# Begin of automatic generation + +# acos +Test "acos (0.7) == 0.7953988301841435554": +ildouble: 1150 +ldouble: 1150 + +# acosh +Test "acosh (7) == 2.6339157938496334172": +ildouble: 1 +ldouble: 1 + +# asin +Test "asin (0.7) == 0.7753974966107530637": +double: 1 +idouble: 1 +ildouble: 1147 +ldouble: 1147 + +# asinh +Test "asinh (0.7) == 0.652666566082355786": +ildouble: 656 +ldouble: 656 + +# atan +Test "atan (0.7) == 0.6107259643892086165": +ildouble: 549 +ldouble: 549 + +# atan2 +Test "atan2 (0.4, 0.0003) == 1.5700463269355215718": +ildouble: 1 +ldouble: 1 +Test "atan2 (0.7, 1) == 0.6107259643892086165": +ildouble: 549 +ldouble: 549 + +# atanh +Test "atanh (0.7) == 0.8673005276940531944": +double: 1 +idouble: 1 +ildouble: 1606 +ldouble: 1606 + +# cabs +Test "cabs (-0.7 + 12.4 i) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "cabs (-0.7 - 12.4 i) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "cabs (-12.4 + 0.7 i) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "cabs (-12.4 - 0.7 i) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508": +ildouble: 560 +ldouble: 560 +Test "cabs (0.7 + 12.4 i) == 12.41974234837422060118": +float: 1 +ifloat: 1 + +# cacos +Test "Imaginary part of: cacos (-2 - 3 i) == 2.1414491111159960199 + 1.9833870299165354323 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (0.7 + 1.2 i) == 1.1351827477151551089 - 1.0927647857577371459 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 151 +ldouble: 151 +Test "Imaginary part of: cacos (0.7 + 1.2 i) == 1.1351827477151551089 - 1.0927647857577371459 i": +float: 2 +ifloat: 2 +ildouble: 329 +ldouble: 329 + +# cacosh +Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323 + 2.1414491111159960199 i": +double: 1 +float: 7 +idouble: 1 +ifloat: 7 +ildouble: 5 +ldouble: 5 +Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323 + 2.1414491111159960199 i": +double: 1 +idouble: 1 +ildouble: 2 +ldouble: 2 +Test "Real part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459 + 1.1351827477151551089 i": +double: 1 +idouble: 1 +ildouble: 328 +ldouble: 328 +Test "Imaginary part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459 + 1.1351827477151551089 i": +ildouble: 151 +ldouble: 151 + +# casin +Test "Imaginary part of: casin (-2 - 3 i) == -0.5706527843210994007 - 1.9833870299165354323 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (0.7 + 1.2 i) == 0.4356135790797415103 + 1.0927647857577371459 i": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 +ildouble: 603 +ldouble: 603 +Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103 + 1.0927647857577371459 i": +float: 2 +ifloat: 2 +ildouble: 329 +ldouble: 329 + +# casinh +Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917 - 0.9646585044076027920 i": +double: 6 +float: 19 +idouble: 6 +ifloat: 19 +ildouble: 6 +ldouble: 6 +Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917 - 0.9646585044076027920 i": +double: 13 +float: 1 +idouble: 13 +ifloat: 1 +ildouble: 7 +ldouble: 7 +Test "Real part of: casinh (0.7 + 1.2 i) == 0.9786545955936738768 + 0.9113541895315601156 i": +double: 1 +idouble: 1 +ildouble: 891 +ldouble: 891 +Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.9786545955936738768 + 0.9113541895315601156 i": +float: 2 +ifloat: 2 +ildouble: 11 +ldouble: 11 + +# catan +Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225 - 0.2290726829685387662 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 7 +ldouble: 7 +Test "Real part of: catan (0.7 + 1.2 i) == 1.0785743834118921877 + 0.5770573776534306764 i": +ildouble: 250 +ldouble: 250 +Test "Imaginary part of: catan (0.7 + 1.2 i) == 1.0785743834118921877 + 0.5770573776534306764 i": +float: 1 +ifloat: 1 +ildouble: 474 +ldouble: 474 + +# catanh +Test "Real part of: catanh (-2 - 3 i) == -0.1469466662255297520 - 1.3389725222944935611 i": +ildouble: 2 +ldouble: 2 +Test "Real part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959 + 0.9702403077950989849 i": +ildouble: 66 +ldouble: 66 +Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959 + 0.9702403077950989849 i": +ildouble: 447 +ldouble: 447 + +# cbrt +Test "cbrt (-0.001) == -0.1": +ildouble: 717 +ldouble: 717 +Test "cbrt (-27.0) == -3.0": +ildouble: 948 +ldouble: 948 +Test "cbrt (0.7) == 0.8879040017426007084": +double: 1 +idouble: 1 +ildouble: 345 +ldouble: 345 +Test "cbrt (0.970299) == 0.99": +ildouble: 306 +ldouble: 306 +Test "cbrt (8) == 2": +ildouble: 191 +ldouble: 191 + +# ccos +Test "Real part of: ccos (-2 - 3 i) == -4.1896256909688072301 - 9.1092278937553365979 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: ccos (-2 - 3 i) == -4.1896256909688072301 - 9.1092278937553365979 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i": +ildouble: 5 +ldouble: 5 +Test "Imaginary part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i": +double: 1 +idouble: 1 +ildouble: 1901 +ldouble: 1901 + +# ccosh +Test "Real part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i": +double: 1 +float: 3 +idouble: 1 +ifloat: 3 +ildouble: 1467 +ldouble: 1467 +Test "Imaginary part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i": +ildouble: 1182 +ldouble: 1182 + +# cexp +Test "Real part of: cexp (-2.0 - 3.0 i) == -0.1339809149295426134 - 0.0190985162611351964 i": +float: 1 +ifloat: 1 +ildouble: 5 +ldouble: 5 +Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.1339809149295426134 - 0.0190985162611351964 i": +float: 1 +ifloat: 1 +ildouble: 19 +ldouble: 19 +Test "Real part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i": +float: 3 +ifloat: 3 +ildouble: 940 +ldouble: 940 +Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i": +float: 2 +ifloat: 2 +ildouble: 1067 +ldouble: 1067 + +# clog +Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680 - 2.1587989303424641704 i": +ildouble: 1 +ldouble: 1 + +# clog10 +Test "Real part of: clog10 (-2 - 3 i) == 0.5569716761534183846 - 0.9375544629863747085 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: clog10 (-2 - 3 i) == 0.5569716761534183846 - 0.9375544629863747085 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: clog10 (-inf + inf i) == inf + 3/4 pi*log10(e) i": +double: 1 +idouble: 1 +Test "Real part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1402 +ldouble: 1402 +Test "Imaginary part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i": +float: 1 +ifloat: 1 +ildouble: 187 +ldouble: 187 + +# cos +Test "cos (0.7) == 0.7648421872844884262": +double: 1 +idouble: 1 +ildouble: 529 +ldouble: 529 +Test "cos (M_PI_6l * 2.0) == 0.5": +double: 1 +float: 0.5 +idouble: 1 +ifloat: 0.5 +ildouble: 1 +ldouble: 1 +Test "cos (M_PI_6l * 4.0) == -0.5": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos (pi/2) == 0": +double: 0.2758 +float: 0.3667 +idouble: 0.2758 +ifloat: 0.3667 +ildouble: 0.25 +ldouble: 0.25 + +# cosh +Test "cosh (0.7) == 1.255169005630943018": +ildouble: 309 +ldouble: 309 + +# cpow +Test "Real part of: cpow (2 + 0 i, 10 + 0 i) == 1024.0 + 0.0 i": +ildouble: 5 +ldouble: 5 +Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 4 +ldouble: 4 +Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": +float: 6 +ifloat: 6 +ildouble: 2 +ldouble: 2 +Test "Real part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i": +float: 0.5 +ifloat: 0.5 +Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i": +double: 1.103 +float: 2.5333 +idouble: 1.103 +ifloat: 2.5333 +ildouble: 1 +ldouble: 1 + +# csin +Test "Real part of: csin (-2 - 3 i) == -9.1544991469114295734 + 4.1689069599665643507 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: csin (-2 - 3 i) == -9.1544991469114295734 + 4.1689069599665643507 i": +float: 1 +ifloat: 1 +Test "Real part of: csin (0.7 + 1.2 i) == 1.1664563419657581376 + 1.1544997246948547371 i": +ildouble: 966 +ldouble: 966 +Test "Imaginary part of: csin (0.7 + 1.2 i) == 1.1664563419657581376 + 1.1544997246948547371 i": +float: 1 +ifloat: 1 +ildouble: 168 +ldouble: 168 + +# csinh +Test "Real part of: csinh (-2 - 3 i) == 3.5905645899857799520 - 0.5309210862485198052 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: csinh (-2 - 3 i) == 3.5905645899857799520 - 0.5309210862485198052 i": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "Real part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i": +float: 1 +ifloat: 1 +ildouble: 413 +ldouble: 413 +Test "Imaginary part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i": +float: 1 +ifloat: 1 +ildouble: 477 +ldouble: 477 + +# csqrt +Test "Real part of: csqrt (-2 + 3 i) == 0.8959774761298381247 + 1.6741492280355400404 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: csqrt (-2 - 3 i) == 0.8959774761298381247 - 1.6741492280355400404 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i": +float: 1 +ifloat: 1 +ildouble: 237 +ldouble: 237 +Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i": +ildouble: 128 +ldouble: 128 + +# ctan +Test "Real part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i": +ildouble: 439 +ldouble: 439 +Test "Imaginary part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 689 +ldouble: 689 +Test "Imaginary part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i": +ildouble: 367 +ldouble: 367 + +# ctanh +Test "Real part of: ctanh (-2 - 3 i) == -0.9653858790221331242 + 0.0098843750383224937 i": +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: ctanh (-2 - 3 i) == -0.9653858790221331242 + 0.0098843750383224937 i": +ildouble: 25 +ldouble: 25 +Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i": +double: 0.5 +idouble: 0.5 +Test "Real part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i": +float: 1 +ifloat: 1 +ildouble: 285 +ldouble: 285 +Test "Imaginary part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i": +double: 1 +idouble: 1 +ildouble: 3074 +ldouble: 3074 + +# erfc +Test "erfc (0.7) == 0.32219880616258152702": +double: 1 +idouble: 1 +Test "erfc (1.2) == 0.089686021770364619762": +float: 2 +ifloat: 2 +Test "erfc (2.0) == 0.0046777349810472658379": +double: 1 +idouble: 1 +Test "erfc (4.1) == 0.67000276540848983727e-8": +double: 24 +float: 11 +idouble: 24 +ifloat: 11 + +# exp +Test "exp (0.7) == 2.0137527074704765216": +ildouble: 412 +ldouble: 412 + +# exp10 +Test "exp10 (-1) == 0.1": +ildouble: 819 +ldouble: 819 +Test "exp10 (0.7) == 5.0118723362727228500": +double: 1 +idouble: 1 +ildouble: 1182 +ldouble: 1182 + +# exp2 +Test "exp2 (0.7) == 1.6245047927124710452": +ildouble: 461 +ldouble: 461 + +# expm1 +Test "expm1 (0.7) == 1.0137527074704765216": +ildouble: 825 +ldouble: 825 +Test "expm1 (1) == M_El - 1.0": +ildouble: 1 +ldouble: 1 + +# fmod +Test "fmod (-6.5, -2.3) == -1.9": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 4096 +ldouble: 4096 +Test "fmod (-6.5, 2.3) == -1.9": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 4096 +ldouble: 4096 +Test "fmod (6.5, -2.3) == 1.9": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 4096 +ldouble: 4096 +Test "fmod (6.5, 2.3) == 1.9": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 4096 +ldouble: 4096 + +# hypot +Test "hypot (-0.7, -12.4) == 12.41974234837422060118": +float: 1 +ifloat: 1 +ildouble: 406 +ldouble: 406 +Test "hypot (-0.7, 12.4) == 12.41974234837422060118": +float: 1 +ifloat: 1 +ildouble: 406 +ldouble: 406 +Test "hypot (-12.4, -0.7) == 12.41974234837422060118": +float: 1 +ifloat: 1 +ildouble: 406 +ldouble: 406 +Test "hypot (-12.4, 0.7) == 12.41974234837422060118": +float: 1 +ifloat: 1 +ildouble: 406 +ldouble: 406 +Test "hypot (0.7, -12.4) == 12.41974234837422060118": +float: 1 +ifloat: 1 +ildouble: 406 +ldouble: 406 +Test "hypot (0.7, 1.2) == 1.3892443989449804508": +ildouble: 560 +ldouble: 560 +Test "hypot (0.7, 12.4) == 12.41974234837422060118": +float: 1 +ifloat: 1 +ildouble: 406 +ldouble: 406 +Test "hypot (12.4, -0.7) == 12.41974234837422060118": +float: 1 +ifloat: 1 +ildouble: 406 +ldouble: 406 +Test "hypot (12.4, 0.7) == 12.41974234837422060118": +float: 1 +ifloat: 1 +ildouble: 406 +ldouble: 406 + +# j0 +Test "j0 (1.5) == 0.51182767173591812875": +float: 1 +ifloat: 1 +Test "j0 (10.0) == -0.24593576445134833520": +float: 3 +ifloat: 3 + +# j1 +Test "j1 (-1.0) == -0.44005058574493351596": +float: 1 +ifloat: 1 +Test "j1 (1.0) == 0.44005058574493351596": +float: 1 +ifloat: 1 +Test "j1 (1.5) == 0.55793650791009964199": +float: 1 +ifloat: 1 +Test "j1 (10.0) == 0.043472746168861436670": +float: 2 +ifloat: 2 + +# jn +Test "jn (0, 1.5) == 0.51182767173591812875": +float: 1 +ifloat: 1 +Test "jn (0, 10.0) == -0.24593576445134833520": +float: 3 +ifloat: 3 +Test "jn (1, -1.0) == -0.44005058574493351596": +float: 1 +ifloat: 1 +Test "jn (1, 1.0) == 0.44005058574493351596": +float: 1 +ifloat: 1 +Test "jn (1, 1.5) == 0.55793650791009964199": +float: 1 +ifloat: 1 +Test "jn (1, 10.0) == 0.043472746168861436670": +float: 2 +ifloat: 2 +Test "jn (10, -1.0) == 0.26306151236874532070e-9": +float: 2 +ifloat: 2 +Test "jn (10, 0.1) == 0.26905328954342155795e-19": +double: 4 +float: 6 +idouble: 4 +ifloat: 6 +Test "jn (10, 0.7) == 0.75175911502153953928e-11": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 +Test "jn (10, 1.0) == 0.26306151236874532070e-9": +float: 2 +ifloat: 2 +Test "jn (10, 10.0) == 0.20748610663335885770": +float: 9 +ifloat: 9 +Test "jn (10, 2.0) == 0.25153862827167367096e-6": +float: 2 +ifloat: 2 +Test "jn (3, -1.0) == -0.019563353982668405919": +float: 1 +ifloat: 1 +Test "jn (3, 0.1) == 0.000020820315754756261429": +double: 1 +idouble: 1 +Test "jn (3, 0.7) == 0.0069296548267508408077": +double: 2 +idouble: 2 +Test "jn (3, 1.0) == 0.019563353982668405919": +float: 1 +ifloat: 1 +Test "jn (3, 10.0) == 0.058379379305186812343": +float: 5 +ifloat: 5 + +# lgamma +Test "lgamma (0.7) == 0.26086724653166651439": +float: 1 +ifloat: 1 +Test "lgamma (1.2) == -0.853740900033158497197e-1": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +# log +Test "log (0.7) == -0.35667494393873237891": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2342 +ldouble: 2342 +Test "log (2) == M_LN2l": +ildouble: 1 +ldouble: 1 +Test "log (e) == 1": +float: 0.5 +ifloat: 0.5 + +# log10 +Test "log10 (0.7) == -0.15490195998574316929": +double: 1 +idouble: 1 +ildouble: 2033 +ldouble: 2033 +Test "log10 (e) == log10(e)": +float: 1 +ifloat: 1 + +# log1p +Test "log1p (-0.3) == -0.35667494393873237891": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 584 +ldouble: 584 + +# log2 +Test "log2 (0.7) == -0.51457317282975824043": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1689 +ldouble: 1689 + +# pow +Test "pow (0.7, 1.2) == 0.65180494056638638188": +ildouble: 725 +ldouble: 725 + +# sin +Test "sin (0.7) == 0.64421768723769105367": +ildouble: 627 +ldouble: 627 + +# sincos +Test "sincos (0.7, &sin_res, &cos_res) puts 0.64421768723769105367 in sin_res": +ildouble: 627 +ldouble: 627 +Test "sincos (0.7, &sin_res, &cos_res) puts 0.76484218728448842626 in cos_res": +double: 1 +idouble: 1 +ildouble: 528 +ldouble: 528 +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": +double: 1 +float: 0.5 +idouble: 1 +ifloat: 0.5 +ildouble: 1 +ldouble: 1 +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.866025403784438646764 in sin_res": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res": +double: 0.2758 +float: 0.3667 +idouble: 0.2758 +ifloat: 0.3667 +ildouble: 0.25 +ldouble: 0.25 + +# sinh +Test "sinh (0.7) == 0.75858370183953350346": +float: 1 +ifloat: 1 +ildouble: 1028 +ldouble: 1028 + +# sqrt +Test "sqrt (0.7) == 0.83666002653407554798": +ildouble: 489 +ldouble: 489 +Test "sqrt (15239.9025) == 123.45": +ildouble: 325 +ldouble: 325 + +# tan +Test "tan (0.7) == 0.84228838046307944813": +ildouble: 1401 +ldouble: 1401 +Test "tan (pi/4) == 1": +double: 0.5 +idouble: 0.5 + +# tanh +Test "tanh (0.7) == 0.60436777711716349631": +ildouble: 519 +ldouble: 519 + +# tgamma +Test "tgamma (-0.5) == -2 sqrt (pi)": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "tgamma (0.5) == sqrt (pi)": +float: 1 +ifloat: 1 +Test "tgamma (0.7) == 1.29805533264755778568": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# y0 +Test "y0 (0.1) == -1.5342386513503668441": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +Test "y0 (0.7) == -0.19066492933739506743": +double: 2 +idouble: 2 +Test "y0 (10.0) == 0.055671167283599391424": +float: 1 +ifloat: 1 +Test "y0 (2.0) == 0.51037567264974511960": +float: 1 +ifloat: 1 +Test "y0 (8.0) == 0.22352148938756622053": +float: 1 +ifloat: 1 + +# y1 +Test "y1 (0.1) == -6.4589510947020269877": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +Test "y1 (0.7) == -1.1032498719076333697": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "y1 (1.0) == -0.78121282130028871655": +double: 1 +idouble: 1 +Test "y1 (1.5) == -0.41230862697391129595": +float: 2 +ifloat: 2 +Test "y1 (10.0) == 0.24901542420695388392": +float: 2 +ifloat: 2 +Test "y1 (2.0) == -0.10703243154093754689": +float: 2 +ifloat: 2 + +# yn +Test "yn (0, 0.1) == -1.5342386513503668441": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +Test "yn (0, 0.7) == -0.19066492933739506743": +double: 2 +idouble: 2 +Test "yn (0, 10.0) == 0.055671167283599391424": +float: 1 +ifloat: 1 +Test "yn (0, 2.0) == 0.51037567264974511960": +float: 1 +ifloat: 1 +Test "yn (0, 8.0) == 0.22352148938756622053": +float: 1 +ifloat: 1 +Test "yn (1, 0.1) == -6.4589510947020269877": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +Test "yn (1, 0.7) == -1.1032498719076333697": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (1, 1.0) == -0.78121282130028871655": +double: 1 +idouble: 1 +Test "yn (1, 1.5) == -0.41230862697391129595": +float: 1 +ifloat: 1 +Test "yn (1, 10.0) == 0.24901542420695388392": +float: 2 +ifloat: 2 +Test "yn (1, 2.0) == -0.10703243154093754689": +float: 2 +ifloat: 2 +Test "yn (10, 0.1) == -0.11831335132045197885e19": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +Test "yn (10, 0.7) == -0.42447194260703866924e10": +double: 6 +idouble: 6 +Test "yn (10, 10.0) == -0.35981415218340272205": +float: 1 +ifloat: 1 +Test "yn (10, 2.0) == -129184.54220803928264": +double: 1 +idouble: 1 +Test "yn (3, 0.1) == -5099.3323786129048894": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +Test "yn (3, 0.7) == -15.819479052819633505": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "yn (3, 10.0) == -0.25136265718383732978": +float: 1 +ifloat: 1 +Test "yn (3, 2.0) == -1.1277837768404277861": +float: 1 +ifloat: 1 + +# Maximal error of functions: +Function: "acos": +ildouble: 1150 +ldouble: 1150 + +Function: "acosh": +ildouble: 1 +ldouble: 1 + +Function: "asin": +double: 1 +idouble: 1 +ildouble: 1147 +ldouble: 1147 + +Function: "asinh": +ildouble: 656 +ldouble: 656 + +Function: "atan": +ildouble: 549 +ldouble: 549 + +Function: "atan2": +ildouble: 549 +ldouble: 549 + +Function: "atanh": +double: 1 +idouble: 1 +ildouble: 1606 +ldouble: 1606 + +Function: "cabs": +float: 1 +ifloat: 1 +ildouble: 560 +ldouble: 560 + +Function: Real part of "cacos": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 151 +ldouble: 151 + +Function: Imaginary part of "cacos": +float: 2 +ifloat: 2 +ildouble: 329 +ldouble: 329 + +Function: Real part of "cacosh": +double: 1 +float: 7 +idouble: 1 +ifloat: 7 +ildouble: 328 +ldouble: 328 + +Function: Imaginary part of "cacosh": +double: 1 +idouble: 1 +ildouble: 151 +ldouble: 151 + +Function: Real part of "casin": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 +ildouble: 603 +ldouble: 603 + +Function: Imaginary part of "casin": +float: 2 +ifloat: 2 +ildouble: 329 +ldouble: 329 + +Function: Real part of "casinh": +double: 6 +float: 19 +idouble: 6 +ifloat: 19 +ildouble: 891 +ldouble: 891 + +Function: Imaginary part of "casinh": +double: 13 +float: 2 +idouble: 13 +ifloat: 2 +ildouble: 11 +ldouble: 11 + +Function: Real part of "catan": +ildouble: 250 +ldouble: 250 + +Function: Imaginary part of "catan": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 474 +ldouble: 474 + +Function: Real part of "catanh": +ildouble: 66 +ldouble: 66 + +Function: Imaginary part of "catanh": +ildouble: 447 +ldouble: 447 + +Function: "cbrt": +double: 1 +idouble: 1 +ildouble: 948 +ldouble: 948 + +Function: Real part of "ccos": +float: 1 +ifloat: 1 +ildouble: 5 +ldouble: 5 + +Function: Imaginary part of "ccos": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1901 +ldouble: 1901 + +Function: Real part of "ccosh": +double: 1 +float: 3 +idouble: 1 +ifloat: 3 +ildouble: 1467 +ldouble: 1467 + +Function: Imaginary part of "ccosh": +float: 1 +ifloat: 1 +ildouble: 1182 +ldouble: 1182 + +Function: Real part of "cexp": +float: 3 +ifloat: 3 +ildouble: 940 +ldouble: 940 + +Function: Imaginary part of "cexp": +float: 2 +ifloat: 2 +ildouble: 1067 +ldouble: 1067 + +Function: Imaginary part of "clog": +ildouble: 1 +ldouble: 1 + +Function: Real part of "clog10": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1402 +ldouble: 1402 + +Function: Imaginary part of "clog10": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 187 +ldouble: 187 + +Function: "cos": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 529 +ldouble: 529 + +Function: "cosh": +ildouble: 309 +ldouble: 309 + +Function: Real part of "cpow": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 5 +ldouble: 5 + +Function: Imaginary part of "cpow": +double: 1.103 +float: 6 +idouble: 1.103 +ifloat: 6 +ildouble: 2 +ldouble: 2 + +Function: Real part of "csin": +float: 1 +ifloat: 1 +ildouble: 966 +ldouble: 966 + +Function: Imaginary part of "csin": +float: 1 +ifloat: 1 +ildouble: 168 +ldouble: 168 + +Function: Real part of "csinh": +float: 1 +ifloat: 1 +ildouble: 413 +ldouble: 413 + +Function: Imaginary part of "csinh": +float: 1 +ifloat: 1 +ildouble: 477 +ldouble: 477 + +Function: Real part of "csqrt": +float: 1 +ifloat: 1 +ildouble: 237 +ldouble: 237 + +Function: Imaginary part of "csqrt": +ildouble: 128 +ldouble: 128 + +Function: Real part of "ctan": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 689 +ldouble: 689 + +Function: Imaginary part of "ctan": +ildouble: 367 +ldouble: 367 + +Function: Real part of "ctanh": +float: 1 +ifloat: 1 +ildouble: 285 +ldouble: 285 + +Function: Imaginary part of "ctanh": +double: 1 +idouble: 1 +ildouble: 3074 +ldouble: 3074 + +Function: "erfc": +double: 24 +float: 11 +idouble: 24 +ifloat: 11 + +Function: "exp": +ildouble: 412 +ldouble: 412 + +Function: "exp10": +double: 1 +idouble: 1 +ildouble: 1182 +ldouble: 1182 + +Function: "exp2": +ildouble: 461 +ldouble: 461 + +Function: "expm1": +ildouble: 825 +ldouble: 825 + +Function: "fmod": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 4096 +ldouble: 4096 + +Function: "hypot": +float: 1 +ifloat: 1 +ildouble: 560 +ldouble: 560 + +Function: "j0": +float: 3 +ifloat: 3 + +Function: "j1": +float: 2 +ifloat: 2 + +Function: "jn": +double: 4 +float: 9 +idouble: 4 +ifloat: 9 + +Function: "lgamma": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +Function: "log": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2342 +ldouble: 2342 + +Function: "log10": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2033 +ldouble: 2033 + +Function: "log1p": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 584 +ldouble: 584 + +Function: "log2": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1689 +ldouble: 1689 + +Function: "pow": +ildouble: 725 +ldouble: 725 + +Function: "sin": +ildouble: 627 +ldouble: 627 + +Function: "sincos": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 627 +ldouble: 627 + +Function: "sinh": +float: 1 +ifloat: 1 +ildouble: 1028 +ldouble: 1028 + +Function: "sqrt": +ildouble: 489 +ldouble: 489 + +Function: "tan": +double: 0.5 +idouble: 0.5 +ildouble: 1401 +ldouble: 1401 + +Function: "tanh": +ildouble: 519 +ldouble: 519 + +Function: "tgamma": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "y0": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + +Function: "y1": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +Function: "yn": +double: 6 +float: 2 +idouble: 6 +ifloat: 2 + +# end of automatic generation From 73b240facaffa86a7fcfa69f7f21a67ae043cde5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 29 Sep 2000 01:30:19 +0000 Subject: [PATCH 2256/4487] Add RLIMIT_LOCKS. --- sysdeps/unix/sysv/linux/arm/bits/resource.h | 10 +++++++--- sysdeps/unix/sysv/linux/mips/bits/resource.h | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/bits/resource.h b/sysdeps/unix/sysv/linux/arm/bits/resource.h index 710f1119c0..db3848b267 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/resource.h +++ b/sysdeps/unix/sysv/linux/arm/bits/resource.h @@ -1,5 +1,5 @@ -/* Bit values & structures for resource limits. Linux version. - Copyright (C) 1994, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. +/* Bit values & structures for resource limits. Linux/Arm version. + Copyright (C) 1994,1996,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 @@ -76,7 +76,11 @@ enum __rlimit_resource RLIMIT_MEMLOCK = 8, #define RLIMIT_MEMLOCK RLIMIT_MEMLOCK - RLIMIT_NLIMITS = 10, + /* Maximum number of file locks. */ + RLIMIT_LOCKS = 10, +#define RLIMIT_LOCKS RLIMIT_LOCKS + + RLIMIT_NLIMITS = 11, RLIM_NLIMITS = RLIMIT_NLIMITS #define RLIMIT_NLIMITS RLIMIT_NLIMITS #define RLIM_NLIMITS RLIM_NLIMITS diff --git a/sysdeps/unix/sysv/linux/mips/bits/resource.h b/sysdeps/unix/sysv/linux/mips/bits/resource.h index 613b6bcc4c..ced5c5e4ea 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/resource.h +++ b/sysdeps/unix/sysv/linux/mips/bits/resource.h @@ -1,5 +1,5 @@ -/* Bit values & structures for resource limits. MIPS/Linux version. - Copyright (C) 1994, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. +/* Bit values & structures for resource limits. Linux/MIPS version. + Copyright (C) 1994,1996,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 @@ -76,7 +76,11 @@ enum __rlimit_resource RLIMIT_MEMLOCK = 9, #define RLIMIT_MEMLOCK RLIMIT_MEMLOCK - RLIM_NLIMITS = 10 + /* Maximum number of file locks. */ + RLIMIT_LOCKS = 10, +#define RLIMIT_LOCKS RLIMIT_LOCKS + + RLIM_NLIMITS = 11 #define RLIMIT_NLIMITS RLIMIT_NLIMITS #define RLIM_NLIMITS RLIM_NLIMITS }; From 8da28deb78419944dce38dd9c2bc8ff8058b1ca0 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 29 Sep 2000 06:50:53 +0000 Subject: [PATCH 2257/4487] (elf_machine_rela): Handle unaligned relocation also for R_ALPHA_RELATIVE. --- sysdeps/alpha/dl-machine.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 33c32fa5e8..69845b4b01 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -482,7 +482,19 @@ elf_machine_rela (struct link_map *map, /* Already done in dynamic linker. */ if (map != &_dl_rtld_map) #endif - *reloc_addr += map->l_addr; + { + /* XXX Make some timings. Maybe it's preverable to test for + unaligned access and only do it the complex way if necessary. */ + void *reloc_addr_1 = reloc_addr; + Elf64_Addr reloc_addr_val; + + /* Load value without causing unaligned trap. */ + memcpy (&reloc_addr_val, reloc_addr_1, 8); + reloc_addr_val += map->l_addr; + + /* Store value without causing unaligned trap. */ + memcpy (reloc_addr_1, &reloc_addr_val, 8); + } } else if (r_type == R_ALPHA_NONE) return; From d867f21971ee98fdceb53ecfacd3afc31c61f912 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 29 Sep 2000 19:07:03 +0000 Subject: [PATCH 2258/4487] Synch with Linux 2.4.0-test9-pre7. --- sysdeps/unix/sysv/linux/arm/bits/fcntl.h | 22 ++++++++++++++++++++++ sysdeps/unix/sysv/linux/m68k/bits/fcntl.h | 22 ++++++++++++++++++++++ sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 22 ++++++++++++++++++++++ 3 files changed, 66 insertions(+) diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h index deaa183d51..5211998a91 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h @@ -89,6 +89,12 @@ # define F_GETSIG 11 /* Get number of signal to be sent. */ #endif +#ifdef __USE_GNU +# 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. */ +#endif + /* For F_[GET|SET]FL. */ #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ @@ -110,6 +116,22 @@ # define LOCK_UN 8 /* remove lock */ #endif +#ifdef __USE_GNU +# define LOCK_MAND 32 /* This is a mandatory flock: */ +# define LOCK_READ 64 /* ... which allows concurrent read operations. */ +# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */ +# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */ +#endif + +/* Types of directory notifications that may be requested with F_NOTIFY. */ +#define DN_ACCESS 0x00000001 /* File accessed. */ +#define DN_MODIFY 0x00000002 /* File modified. */ +#define DN_CREATE 0x00000004 /* File created. */ +#define DN_DELETE 0x00000008 /* File removed. */ +#define DN_RENAME 0x00000010 /* File renamed. */ +#define DN_ATTRIB 0x00000020 /* File changed attibutes. */ +#define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */ + struct flock { short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ diff --git a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h index 99c068a898..c0786f3cfb 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h @@ -88,6 +88,12 @@ # define F_GETSIG 11 /* Get number of signal to be sent. */ #endif +#ifdef __USE_GNU +# 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. */ +#endif + /* For F_[GET|SET]FL. */ #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ @@ -109,6 +115,22 @@ # define LOCK_UN 8 /* remove lock */ #endif +#ifdef __USE_GNU +# define LOCK_MAND 32 /* This is a mandatory flock: */ +# define LOCK_READ 64 /* ... which allows concurrent read operations. */ +# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */ +# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */ +#endif + +/* Types of directory notifications that may be requested with F_NOTIFY. */ +#define DN_ACCESS 0x00000001 /* File accessed. */ +#define DN_MODIFY 0x00000002 /* File modified. */ +#define DN_CREATE 0x00000004 /* File created. */ +#define DN_DELETE 0x00000008 /* File removed. */ +#define DN_RENAME 0x00000010 /* File renamed. */ +#define DN_ATTRIB 0x00000020 /* File changed attibutes. */ +#define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */ + struct flock { short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index 853599f283..a7892cd903 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -90,6 +90,12 @@ # define F_GETSIG 11 /* Get number of signal to be sent. */ #endif +#ifdef __USE_GNU +# 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. */ +#endif + /* for F_[GET|SET]FL */ #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ @@ -111,6 +117,22 @@ # define LOCK_UN 8 /* remove lock */ #endif +#ifdef __USE_GNU +# define LOCK_MAND 32 /* This is a mandatory flock: */ +# define LOCK_READ 64 /* ... which allows concurrent read operations. */ +# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */ +# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */ +#endif + +/* Types of directory notifications that may be requested with F_NOTIFY. */ +#define DN_ACCESS 0x00000001 /* File accessed. */ +#define DN_MODIFY 0x00000002 /* File modified. */ +#define DN_CREATE 0x00000004 /* File created. */ +#define DN_DELETE 0x00000008 /* File removed. */ +#define DN_RENAME 0x00000010 /* File renamed. */ +#define DN_ATTRIB 0x00000020 /* File changed attibutes. */ +#define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */ + typedef struct flock { short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ From 5e9880e0b5db7cd3ce6433e57a4f5ea19e60f97d Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 29 Sep 2000 20:24:30 +0000 Subject: [PATCH 2259/4487] Protect DN_* by __USE_GNU. --- sysdeps/unix/sysv/linux/arm/bits/fcntl.h | 56 +++++++++++----------- sysdeps/unix/sysv/linux/m68k/bits/fcntl.h | 58 ++++++++++++----------- sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 56 +++++++++++----------- 3 files changed, 88 insertions(+), 82 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h index 5211998a91..776ee29e5b 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h @@ -9,13 +9,13 @@ 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 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + Boston, MA 02111-1307, USA. */ #ifndef _FCNTL_H # error "Never use directly; include instead." @@ -42,9 +42,9 @@ #define O_ASYNC 020000 #ifdef __USE_GNU -# define O_DIRECTORY 040000 /* Must be a directory. */ -# define O_NOFOLLOW 0100000 /* Do not follow links. */ -# define O_DIRECT 0200000 /* Direct disk access. */ +# define O_DIRECTORY 040000 /* Must be a directory. */ +# define O_NOFOLLOW 0100000 /* Do not follow links. */ +# define O_DIRECT 0200000 /* Direct disk access. */ #endif #ifdef __USE_LARGEFILE64 @@ -53,10 +53,10 @@ /* For now Linux has synchronisity options for data and read operations. We define the symbols here but let them do the same as O_SYNC since - this is a superset. */ + this is a superset. */ #if defined __USE_POSIX199309 || defined __USE_UNIX98 # define O_DSYNC O_SYNC /* Synchronize data. */ -# define O_RSYNC O_SYNC /* Synchronize read operations. */ +# define O_RSYNC O_SYNC /* Synchronize read operations. */ #endif /* Values for the second argument to `fcntl'. */ @@ -69,15 +69,15 @@ #ifndef __USE_FILE_OFFSET64 # define F_GETLK 5 /* Get record locking info. */ # define F_SETLK 6 /* Set record locking info (non-blocking). */ -# define F_SETLKW 7 /* Set record locking info (blocking). */ +# define F_SETLKW 7 /* Set record locking info (blocking). */ #else -# define F_GETLK F_GETLK64 /* Get record locking info. */ +# define F_GETLK F_GETLK64 /* Get record locking info. */ # define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/ # define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */ #endif #define F_GETLK64 12 /* Get record locking info. */ #define F_SETLK64 13 /* Set record locking info (non-blocking). */ -#define F_SETLKW64 14 /* Set record locking info (blocking). */ +#define F_SETLKW64 14 /* Set record locking info (blocking). */ #if defined __USE_BSD || defined __USE_XOPEN2K # define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */ @@ -90,9 +90,9 @@ #endif #ifdef __USE_GNU -# 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_SETLEASE 1024 /* Set a lease. */ +# define F_GETLEASE 1025 /* Enquire what lease is active. */ +# define F_NOTIFY 1026 /* Request notfications on a directory. */ #endif /* For F_[GET|SET]FL. */ @@ -100,8 +100,8 @@ /* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */ #define F_RDLCK 0 /* Read lock. */ -#define F_WRLCK 1 /* Write lock. */ -#define F_UNLCK 2 /* Remove lock. */ +#define F_WRLCK 1 /* Write lock. */ +#define F_UNLCK 2 /* Remove lock. */ /* for old implementation of bsd flock () */ #define F_EXLCK 4 /* or 3 */ @@ -118,23 +118,25 @@ #ifdef __USE_GNU # define LOCK_MAND 32 /* This is a mandatory flock: */ -# define LOCK_READ 64 /* ... which allows concurrent read operations. */ +# define LOCK_READ 64 /* ... which allows concurrent read operations. */ # define LOCK_WRITE 128 /* ... which allows concurrent write operations. */ -# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */ +# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */ #endif +#ifdef __USE_GNU /* Types of directory notifications that may be requested with F_NOTIFY. */ -#define DN_ACCESS 0x00000001 /* File accessed. */ -#define DN_MODIFY 0x00000002 /* File modified. */ -#define DN_CREATE 0x00000004 /* File created. */ -#define DN_DELETE 0x00000008 /* File removed. */ -#define DN_RENAME 0x00000010 /* File renamed. */ -#define DN_ATTRIB 0x00000020 /* File changed attibutes. */ -#define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */ +# define DN_ACCESS 0x00000001 /* File accessed. */ +# define DN_MODIFY 0x00000002 /* File modified. */ +# define DN_CREATE 0x00000004 /* File created. */ +# define DN_DELETE 0x00000008 /* File removed. */ +# define DN_RENAME 0x00000010 /* File renamed. */ +# define DN_ATTRIB 0x00000020 /* File changed attibutes. */ +# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */ +#endif struct flock { - short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ #ifndef __USE_FILE_OFFSET64 __off_t l_start; /* Offset where the lock begins. */ @@ -149,7 +151,7 @@ struct flock #ifdef __USE_LARGEFILE64 struct flock64 { - short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ __off64_t l_start; /* Offset where the lock begins. */ __off64_t l_len; /* Size of the locked area; zero means until EOF. */ @@ -171,7 +173,7 @@ struct flock64 #ifdef __USE_XOPEN2K # define POSIX_FADV_NORMAL 0 /* No further special treatment. */ # define POSIX_FADV_RANDOM 1 /* Expect random page references. */ -# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */ # define POSIX_FADV_WILLNEED 3 /* Will need these pages. */ # define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */ # define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ diff --git a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h index c0786f3cfb..0afadf6e81 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h @@ -9,13 +9,13 @@ 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 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + Boston, MA 02111-1307, USA. */ #ifndef _FCNTL_H # error "Never use directly; include instead." @@ -42,17 +42,17 @@ #define O_ASYNC 020000 #ifdef __USE_GNU -# define O_DIRECTORY 040000 /* Must be a directory. */ -# define O_NOFOLLOW 0100000 /* Do not follow links. */ -# define O_DIRECT 0200000 /* Direct disk access. */ +# define O_DIRECTORY 040000 /* Must be a directory. */ +# define O_NOFOLLOW 0100000 /* Do not follow links. */ +# define O_DIRECT 0200000 /* Direct disk access. */ #endif /* For now Linux has synchronisity options for data and read operations. We define the symbols here but let them do the same as O_SYNC since - this is a superset. */ + this is a superset. */ #if defined __USE_POSIX199309 || defined __USE_UNIX98 # define O_DSYNC O_SYNC /* Synchronize data. */ -# define O_RSYNC O_SYNC /* Synchronize read operations. */ +# define O_RSYNC O_SYNC /* Synchronize read operations. */ #endif #ifdef __USE_LARGEFILE64 @@ -68,15 +68,15 @@ #ifndef __USE_FILE_OFFSET64 # define F_GETLK 5 /* Get record locking info. */ # define F_SETLK 6 /* Set record locking info (non-blocking). */ -# define F_SETLKW 7 /* Set record locking info (blocking). */ +# define F_SETLKW 7 /* Set record locking info (blocking). */ #else -# define F_GETLK F_GETLK64 /* Get record locking info. */ +# define F_GETLK F_GETLK64 /* Get record locking info. */ # define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/ # define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */ #endif #define F_GETLK64 12 /* Get record locking info. */ #define F_SETLK64 13 /* Set record locking info (non-blocking). */ -#define F_SETLKW64 14 /* Set record locking info (blocking). */ +#define F_SETLKW64 14 /* Set record locking info (blocking). */ #if defined __USE_BSD || defined __USE_XOPEN2K # define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */ @@ -89,9 +89,9 @@ #endif #ifdef __USE_GNU -# 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_SETLEASE 1024 /* Set a lease. */ +# define F_GETLEASE 1025 /* Enquire what lease is active. */ +# define F_NOTIFY 1026 /* Request notfications on a directory. */ #endif /* For F_[GET|SET]FL. */ @@ -99,15 +99,15 @@ /* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */ #define F_RDLCK 0 /* Read lock. */ -#define F_WRLCK 1 /* Write lock. */ -#define F_UNLCK 2 /* Remove lock. */ +#define F_WRLCK 1 /* Write lock. */ +#define F_UNLCK 2 /* Remove lock. */ /* For old implementation of bsd flock(). */ #define F_EXLCK 4 /* or 3 */ #define F_SHLCK 8 /* or 4 */ #ifdef __USE_BSD -/* Operations for bsd flock(), also used by the kernel implementation. */ +/* Operations for bsd flock(), also used by the kernel implementation. */ # define LOCK_SH 1 /* shared lock */ # define LOCK_EX 2 /* exclusive lock */ # define LOCK_NB 4 /* or'd with one of the above to prevent @@ -117,23 +117,25 @@ #ifdef __USE_GNU # define LOCK_MAND 32 /* This is a mandatory flock: */ -# define LOCK_READ 64 /* ... which allows concurrent read operations. */ +# define LOCK_READ 64 /* ... which allows concurrent read operations. */ # define LOCK_WRITE 128 /* ... which allows concurrent write operations. */ -# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */ +# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */ #endif +#ifdef __USE_GNU /* Types of directory notifications that may be requested with F_NOTIFY. */ -#define DN_ACCESS 0x00000001 /* File accessed. */ -#define DN_MODIFY 0x00000002 /* File modified. */ -#define DN_CREATE 0x00000004 /* File created. */ -#define DN_DELETE 0x00000008 /* File removed. */ -#define DN_RENAME 0x00000010 /* File renamed. */ -#define DN_ATTRIB 0x00000020 /* File changed attibutes. */ -#define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */ +# define DN_ACCESS 0x00000001 /* File accessed. */ +# define DN_MODIFY 0x00000002 /* File modified. */ +# define DN_CREATE 0x00000004 /* File created. */ +# define DN_DELETE 0x00000008 /* File removed. */ +# define DN_RENAME 0x00000010 /* File renamed. */ +# define DN_ATTRIB 0x00000020 /* File changed attibutes. */ +# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */ +#endif struct flock { - short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ #ifndef __USE_FILE_OFFSET64 __off_t l_start; /* Offset where the lock begins. */ @@ -148,7 +150,7 @@ struct flock #ifdef __USE_LARGEFILE64 struct flock64 { - short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ __off64_t l_start; /* Offset where the lock begins. */ __off64_t l_len; /* Size of the locked area; zero means until EOF. */ @@ -170,7 +172,7 @@ struct flock64 #ifdef __USE_XOPEN2K # define POSIX_FADV_NORMAL 0 /* No further special treatment. */ # define POSIX_FADV_RANDOM 1 /* Expect random page references. */ -# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */ # define POSIX_FADV_WILLNEED 3 /* Will need these pages. */ # define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */ # define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index a7892cd903..14593da5ab 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -9,13 +9,13 @@ 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 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + Boston, MA 02111-1307, USA. */ #ifndef _FCNTL_H # error "Never use directly; include instead." @@ -33,7 +33,7 @@ #define O_APPEND 0x0008 #define O_SYNC 0x0010 #define O_NONBLOCK 0x0080 -#define O_CREAT 0x0100 /* not fcntl */ +#define O_CREAT 0x0100 /* not fcntl */ #define O_TRUNC 0x0200 /* not fcntl */ #define O_EXCL 0x0400 /* not fcntl */ #define O_NOCTTY 0x0800 /* not fcntl */ @@ -45,19 +45,19 @@ #endif #ifdef __USE_GNU -# define O_NOFOLLOW 0x4000 /* Do not follow links. */ +# define O_NOFOLLOW 0x4000 /* Do not follow links. */ # define O_DIRECT 0x8000 /* Direct disk access hint. */ -# define O_DIRECTORY 0x10000 /* Must be a directory. */ +# define O_DIRECTORY 0x10000 /* Must be a directory. */ #endif #define O_NDELAY O_NONBLOCK /* For now Linux has no synchronisity options for data and read - operations. We define the symbols here but let them do the same as + operations. We define the symbols here but let them do the same as O_SYNC since this is a superset. */ #if defined __USE_POSIX199309 || defined __USE_UNIX98 # define O_DSYNC O_SYNC /* Synchronize data. */ -# define O_RSYNC O_SYNC /* Synchronize read operations. */ +# define O_RSYNC O_SYNC /* Synchronize read operations. */ #endif /* Values for the second argument to `fcntl'. */ @@ -69,16 +69,16 @@ #ifndef __USE_FILE_OFFSET64 # define F_GETLK 14 /* Get record locking info. */ # define F_SETLK 6 /* Set record locking info (non-blocking). */ -# define F_SETLKW 7 /* Set record locking info (blocking). */ +# define F_SETLKW 7 /* Set record locking info (blocking). */ #else -# define F_GETLK F_GETLK64 /* Get record locking info. */ +# define F_GETLK F_GETLK64 /* Get record locking info. */ # define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/ # define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */ #endif #define F_GETLK64 33 /* Get record locking info. */ #define F_SETLK64 34 /* Set record locking info (non-blocking). */ -#define F_SETLKW64 35 /* Set record locking info (blocking). */ +#define F_SETLKW64 35 /* Set record locking info (blocking). */ #if defined __USE_BSD || defined __USE_XOPEN2K # define F_SETOWN 24 /* Get owner of socket (receiver of SIGIO). */ @@ -91,9 +91,9 @@ #endif #ifdef __USE_GNU -# 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_SETLEASE 1024 /* Set a lease. */ +# define F_GETLEASE 1025 /* Enquire what lease is active. */ +# define F_NOTIFY 1026 /* Request notfications on a directory. */ #endif /* for F_[GET|SET]FL */ @@ -101,8 +101,8 @@ /* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */ #define F_RDLCK 0 /* Read lock. */ -#define F_WRLCK 1 /* Write lock. */ -#define F_UNLCK 2 /* Remove lock. */ +#define F_WRLCK 1 /* Write lock. */ +#define F_UNLCK 2 /* Remove lock. */ /* for old implementation of bsd flock () */ #define F_EXLCK 4 /* or 3 */ @@ -119,23 +119,25 @@ #ifdef __USE_GNU # define LOCK_MAND 32 /* This is a mandatory flock: */ -# define LOCK_READ 64 /* ... which allows concurrent read operations. */ +# define LOCK_READ 64 /* ... which allows concurrent read operations. */ # define LOCK_WRITE 128 /* ... which allows concurrent write operations. */ -# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */ +# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */ #endif +#ifdef __USE_GNU /* Types of directory notifications that may be requested with F_NOTIFY. */ -#define DN_ACCESS 0x00000001 /* File accessed. */ -#define DN_MODIFY 0x00000002 /* File modified. */ -#define DN_CREATE 0x00000004 /* File created. */ -#define DN_DELETE 0x00000008 /* File removed. */ -#define DN_RENAME 0x00000010 /* File renamed. */ -#define DN_ATTRIB 0x00000020 /* File changed attibutes. */ -#define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */ +# define DN_ACCESS 0x00000001 /* File accessed. */ +# define DN_MODIFY 0x00000002 /* File modified. */ +# define DN_CREATE 0x00000004 /* File created. */ +# define DN_DELETE 0x00000008 /* File removed. */ +# define DN_RENAME 0x00000010 /* File renamed. */ +# define DN_ATTRIB 0x00000020 /* File changed attibutes. */ +# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */ +#endif typedef struct flock { - short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ #ifndef __USE_FILE_OFFSET64 __off_t l_start; /* Offset where the lock begins. */ @@ -154,7 +156,7 @@ typedef struct flock #ifdef __USE_LARGEFILE64 struct flock64 { - short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ __off64_t l_start; /* Offset where the lock begins. */ __off64_t l_len; /* Size of the locked area; zero means until EOF. */ @@ -177,7 +179,7 @@ struct flock64 #ifdef __USE_XOPEN2K # define POSIX_FADV_NORMAL 0 /* No further special treatment. */ # define POSIX_FADV_RANDOM 1 /* Expect random page references. */ -# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */ # define POSIX_FADV_WILLNEED 3 /* Will need these pages. */ # define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */ # define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ From bcafa19eb35f98d653ff662a9b7cd5ecdfbb69f4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 29 Sep 2000 22:02:28 +0000 Subject: [PATCH 2260/4487] Type definitions for nscd on Alpha. --- sysdeps/alpha/nscd-types.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 sysdeps/alpha/nscd-types.h diff --git a/sysdeps/alpha/nscd-types.h b/sysdeps/alpha/nscd-types.h new file mode 100644 index 0000000000..9096081eaa --- /dev/null +++ b/sysdeps/alpha/nscd-types.h @@ -0,0 +1,22 @@ +/* Types for the NSCD implementation. Alpha version. + Copyright (c) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +typedef int64_t nscd_ssize_t; From d89e0413b2053e4cf302601e002597915dac8901 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 1 Oct 2000 22:36:00 +0000 Subject: [PATCH 2261/4487] (RTLD_START): Fix computation of envp argument passed to _dl_init. --- sysdeps/mips/dl-machine.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 6d9570542b..2a19126208 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -468,7 +468,9 @@ _dl_start_user:\n\ lw $4, _dl_loaded\n\ lw $5, 0($29)\n\ la $6, 4($29)\n\ - la $7, 8($29)\n\ + sll $7, $5, 2\n\ + addu $7, $7, $6\n\ + addu $7, $7, 4\n\ subu $29, 16\n\ # Call the function to run the initializers.\n\ jal _dl_init From 671b38f832dfd033df06a98491b23249c680c644 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 2 Oct 2000 08:47:39 +0000 Subject: [PATCH 2262/4487] Synch with Linux 2.4.0-test9-pre8. --- sysdeps/unix/sysv/linux/alpha/bits/fcntl.h | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h index 2b879dcd8f..55f8e74fc9 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h @@ -85,6 +85,12 @@ # define F_GETSIG 11 /* Get number of signal to be sent. */ #endif +#ifdef __USE_GNU +# 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. */ +#endif + /* for F_[GET|SET]FL */ #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ @@ -106,6 +112,24 @@ # define LOCK_UN 8 /* remove lock */ #endif +#ifdef __USE_GNU +# define LOCK_MAND 32 /* This is a mandatory flock: */ +# define LOCK_READ 64 /* ... which allows concurrent read operations. */ +# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */ +# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */ +#endif + +#ifdef __USE_GNU +/* Types of directory notifications that may be requested with F_NOTIFY. */ +# define DN_ACCESS 0x00000001 /* File accessed. */ +# define DN_MODIFY 0x00000002 /* File modified. */ +# define DN_CREATE 0x00000004 /* File created. */ +# define DN_DELETE 0x00000008 /* File removed. */ +# define DN_RENAME 0x00000010 /* File renamed. */ +# define DN_ATTRIB 0x00000020 /* File changed attibutes. */ +# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */ +#endif + /* We don't need to support __USE_FILE_OFFSET64. */ struct flock { From f0cd8b6f6d2c0626be90ca96fe88a31c6a107e31 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 2 Oct 2000 08:49:05 +0000 Subject: [PATCH 2263/4487] Add RLIMIT_LOCKS. --- sysdeps/unix/sysv/linux/alpha/bits/resource.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/resource.h b/sysdeps/unix/sysv/linux/alpha/bits/resource.h index c89f5a0639..a97c96c2ed 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/resource.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/resource.h @@ -1,5 +1,5 @@ /* Bit values & structures for resource limits. Alpha/Linux version. - Copyright (C) 1994, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1994,96,97,98,99,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 @@ -76,7 +76,11 @@ enum __rlimit_resource RLIMIT_MEMLOCK = 9, #define RLIMIT_MEMLOCK RLIMIT_MEMLOCK - RLIM_NLIMITS = 10 + /* Maximum number of file locks. */ + RLIMIT_LOCKS = 10, +#define RLIMIT_LOCKS RLIMIT_LOCKS + + RLIM_NLIMITS = 11 #define RLIMIT_NLIMITS RLIMIT_NLIMITS #define RLIM_NLIMITS RLIM_NLIMITS }; From 979b9fea6f11f29c683d029865367bccaac35bfa Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 2 Oct 2000 22:04:18 +0000 Subject: [PATCH 2264/4487] Add missing .mips0 at the end of inline assembler code. --- sysdeps/unix/sysv/linux/mips/sys/tas.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/sys/tas.h b/sysdeps/unix/sysv/linux/mips/sys/tas.h index bc7f52a206..8409535943 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/tas.h +++ b/sysdeps/unix/sysv/linux/mips/sys/tas.h @@ -52,7 +52,8 @@ _test_and_set (int *p, int v) __THROW ".set pop\n\t" "sc %1,%2\n\t" "beqz %1,1b\n" - "2:" + "2:\n\t" + ".set\tmips0" : "=&r" (r), "=&r" (t), "=m" (*p) : "m" (*p), "r" (v) : "memory"); From e2d6906870eb5ae1c04b62421ec3d3edd934f8c8 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 3 Oct 2000 11:55:32 +0000 Subject: [PATCH 2265/4487] Fix padding in struct stat for LARGEFILE64_SOURCE. --- sysdeps/unix/sysv/linux/m68k/bits/stat.h | 135 +++++++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/bits/stat.h diff --git a/sysdeps/unix/sysv/linux/m68k/bits/stat.h b/sysdeps/unix/sysv/linux/m68k/bits/stat.h new file mode 100644 index 0000000000..cc93e4941e --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/bits/stat.h @@ -0,0 +1,135 @@ +/* Copyright (C) 1992, 95, 96, 97, 98, 99, 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_STAT_H +# error "Never include directly; use instead." +#endif + +/* Versions of the `struct stat' data structure. */ +#define _STAT_VER_LINUX_OLD 1 +#define _STAT_VER_KERNEL 1 +#define _STAT_VER_SVR4 2 +#define _STAT_VER_LINUX 3 +#define _STAT_VER _STAT_VER_LINUX /* The one defined below. */ + +/* Versions of the `xmknod' interface. */ +#define _MKNOD_VER_LINUX 1 +#define _MKNOD_VER_SVR4 2 +#define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */ + + +struct stat + { + __dev_t st_dev; /* Device. */ +#ifndef __USE_FILE_OFFSET64 + unsigned short int __pad1; + __ino_t st_ino; /* File serial number. */ +#else + unsigned int __pad1; + __ino_t __st_ino; /* 32bit file serial number. */ +#endif + __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. */ +#ifndef __USE_FILE_OFFSET64 + unsigned short int __pad2; + __off_t st_size; /* Size of file, in bytes. */ +#else + unsigned int __pad2; + __off64_t st_size; /* Size of file, in bytes. */ +#endif + __blksize_t st_blksize; /* Optimal block size for I/O. */ + +#ifndef __USE_FILE_OFFSET64 + __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ +#else + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ +#endif + __time_t st_atime; /* Time of last access. */ + unsigned long int __unused1; + __time_t st_mtime; /* Time of last modification. */ + unsigned long int __unused2; + __time_t st_ctime; /* Time of last status change. */ + unsigned long int __unused3; +#ifndef __USE_FILE_OFFSET64 + unsigned long int __unused4; + unsigned long int __unused5; +#else + __ino64_t st_ino; /* File serial number. */ +#endif + }; + +#ifdef __USE_LARGEFILE64 +struct stat64 + { + __dev_t st_dev; /* Device. */ + unsigned int __pad1; + + __ino_t __st_ino; /* 32bit 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. */ + unsigned int __pad2; + __off64_t st_size; /* Size of file, in bytes. */ + __blksize_t st_blksize; /* Optimal block size for I/O. */ + + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ + __time_t st_atime; /* Time of last access. */ + unsigned long int __unused1; + __time_t st_mtime; /* Time of last modification. */ + unsigned long int __unused2; + __time_t st_ctime; /* Time of last status change. */ + unsigned long int __unused3; + __ino64_t st_ino; /* File serial number. */ + }; +#endif + +/* Tell code we have these members. */ +#define _STATBUF_ST_BLKSIZE +#define _STATBUF_ST_RDEV + +/* Encoding of the file mode. */ + +#define __S_IFMT 0170000 /* These bits determine file type. */ + +/* File types. */ +#define __S_IFDIR 0040000 /* Directory. */ +#define __S_IFCHR 0020000 /* Character device. */ +#define __S_IFBLK 0060000 /* Block device. */ +#define __S_IFREG 0100000 /* Regular file. */ +#define __S_IFIFO 0010000 /* FIFO. */ +#define __S_IFLNK 0120000 /* Symbolic link. */ +#define __S_IFSOCK 0140000 /* Socket. */ + +/* POSIX.1b objects. */ +#define __S_TYPEISMQ(buf) (0) +#define __S_TYPEISSEM(buf) (0) +#define __S_TYPEISSHM(buf) (0) + +/* Protection bits. */ + +#define __S_ISUID 04000 /* Set user ID on execution. */ +#define __S_ISGID 02000 /* Set group ID on execution. */ +#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ +#define __S_IREAD 0400 /* Read by owner. */ +#define __S_IWRITE 0200 /* Write by owner. */ +#define __S_IEXEC 0100 /* Execute by owner. */ From 79e6a4e059050ac1d3f5f033588bf659adebd136 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 3 Oct 2000 15:11:28 +0000 Subject: [PATCH 2266/4487] Make struct stat64 backward compatible. --- sysdeps/unix/sysv/linux/m68k/bits/stat.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sysdeps/unix/sysv/linux/m68k/bits/stat.h b/sysdeps/unix/sysv/linux/m68k/bits/stat.h index cc93e4941e..1676f17b62 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/stat.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/stat.h @@ -36,11 +36,10 @@ struct stat { __dev_t st_dev; /* Device. */ -#ifndef __USE_FILE_OFFSET64 unsigned short int __pad1; +#ifndef __USE_FILE_OFFSET64 __ino_t st_ino; /* File serial number. */ #else - unsigned int __pad1; __ino_t __st_ino; /* 32bit file serial number. */ #endif __mode_t st_mode; /* File mode. */ @@ -48,11 +47,10 @@ struct stat __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. */ -#ifndef __USE_FILE_OFFSET64 unsigned short int __pad2; +#ifndef __USE_FILE_OFFSET64 __off_t st_size; /* Size of file, in bytes. */ #else - unsigned int __pad2; __off64_t st_size; /* Size of file, in bytes. */ #endif __blksize_t st_blksize; /* Optimal block size for I/O. */ @@ -80,7 +78,7 @@ struct stat struct stat64 { __dev_t st_dev; /* Device. */ - unsigned int __pad1; + unsigned short int __pad1; __ino_t __st_ino; /* 32bit file serial number. */ __mode_t st_mode; /* File mode. */ @@ -88,7 +86,7 @@ struct stat64 __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. */ - unsigned int __pad2; + unsigned short int __pad2; __off64_t st_size; /* Size of file, in bytes. */ __blksize_t st_blksize; /* Optimal block size for I/O. */ From b57d767cf46a8895cb01bd63f07be0b926fe1493 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 14 Oct 2000 12:43:00 +0000 Subject: [PATCH 2267/4487] 2000-10-13 Michael Fedrowitz * sysdeps/m68k/dl-machine.h (_dl_start_user): Pass correct arguments to _dl_init. --- sysdeps/m68k/dl-machine.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index e4cdf2dd1d..29267af968 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -180,9 +180,9 @@ asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \ move.l %d1, -(%sp) # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env) pea 8(%sp, %d1*4) - pea 4(%sp) + pea 8(%sp) move.l %d1, -(%sp) - move.l _dl_loaded@GOT.w(%a5), -(%sp) + move.l ([_dl_loaded@GOT.w(%a5)]), -(%sp) jbsr _dl_init@PLTPC addq.l #8, %sp addq.l #8, %sp From adf9969ce1940edd58c90990d42f3f6893d5cdff Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 14 Oct 2000 17:50:13 +0000 Subject: [PATCH 2268/4487] 2000-10-13 Michael Fedrowitz * sysdeps/unix/sysv/linux/m68k/alphasort64.c: New file. * sysdeps/unix/sysv/linux/m68k/fcntl.c: New file. * sysdeps/unix/sysv/linux/m68k/getdents64.c: New file. * sysdeps/unix/sysv/linux/m68k/getrlimit.c: New file. * sysdeps/unix/sysv/linux/m68k/getrlimit64.c: New file. * sysdeps/unix/sysv/linux/m68k/glob64.c: New file. * sysdeps/unix/sysv/linux/m68k/lockf64.c: New file. * sysdeps/unix/sysv/linux/m68k/oldgetrlimit64.c: New file. * sysdeps/unix/sysv/linux/m68k/readdir64.c: New file. * sysdeps/unix/sysv/linux/m68k/readdir64_r.c: New file. * sysdeps/unix/sysv/linux/m68k/scandir64.c: New file. * sysdeps/unix/sysv/linux/m68k/setrlimit.c: New file. * sysdeps/unix/sysv/linux/m68k/versionsort64.c: New file. * sysdeps/unix/sysv/linux/m68k/Dist: Add oldgetrlimit64.c. * sysdeps/unix/sysv/linux/m68k/Makefile: Add oldgetrlimit64. * sysdeps/unix/sysv/linux/m68k/Versions: Export __xstat64, __fxstat64, __lxstat64, alphasort64, glob64, getrlimit, setrlimit, getrlimit64, readdir64, readdir64_r, scandir64, versionsort64 at GLIBC_2.2. * sysdeps/unix/sysv/linux/m68k/syscalls.list: Add oldgetrlimit, oldsetrlimit for GLIBC_2.0. --- sysdeps/unix/sysv/linux/m68k/Dist | 1 + sysdeps/unix/sysv/linux/m68k/Makefile | 4 ++++ sysdeps/unix/sysv/linux/m68k/Versions | 22 +++++++++++++++++++ sysdeps/unix/sysv/linux/m68k/alphasort64.c | 1 + sysdeps/unix/sysv/linux/m68k/fcntl.c | 1 + sysdeps/unix/sysv/linux/m68k/getdents64.c | 1 + sysdeps/unix/sysv/linux/m68k/getrlimit.c | 1 + sysdeps/unix/sysv/linux/m68k/getrlimit64.c | 1 + sysdeps/unix/sysv/linux/m68k/glob64.c | 1 + sysdeps/unix/sysv/linux/m68k/lockf64.c | 1 + sysdeps/unix/sysv/linux/m68k/oldgetrlimit64.c | 1 + sysdeps/unix/sysv/linux/m68k/readdir64.c | 1 + sysdeps/unix/sysv/linux/m68k/readdir64_r.c | 1 + sysdeps/unix/sysv/linux/m68k/scandir64.c | 1 + sysdeps/unix/sysv/linux/m68k/setrlimit.c | 1 + sysdeps/unix/sysv/linux/m68k/syscalls.list | 2 ++ sysdeps/unix/sysv/linux/m68k/versionsort64.c | 1 + 17 files changed, 42 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/alphasort64.c create mode 100644 sysdeps/unix/sysv/linux/m68k/fcntl.c create mode 100644 sysdeps/unix/sysv/linux/m68k/getdents64.c create mode 100644 sysdeps/unix/sysv/linux/m68k/getrlimit.c create mode 100644 sysdeps/unix/sysv/linux/m68k/getrlimit64.c create mode 100644 sysdeps/unix/sysv/linux/m68k/glob64.c create mode 100644 sysdeps/unix/sysv/linux/m68k/lockf64.c create mode 100644 sysdeps/unix/sysv/linux/m68k/oldgetrlimit64.c create mode 100644 sysdeps/unix/sysv/linux/m68k/readdir64.c create mode 100644 sysdeps/unix/sysv/linux/m68k/readdir64_r.c create mode 100644 sysdeps/unix/sysv/linux/m68k/scandir64.c create mode 100644 sysdeps/unix/sysv/linux/m68k/setrlimit.c create mode 100644 sysdeps/unix/sysv/linux/m68k/versionsort64.c diff --git a/sysdeps/unix/sysv/linux/m68k/Dist b/sysdeps/unix/sysv/linux/m68k/Dist index c28074fb5b..41d521b13f 100644 --- a/sysdeps/unix/sysv/linux/m68k/Dist +++ b/sysdeps/unix/sysv/linux/m68k/Dist @@ -1,5 +1,6 @@ clone.S mremap.S +oldgetrlimit64.c setresuid.c setresgid.c setfsuid.c diff --git a/sysdeps/unix/sysv/linux/m68k/Makefile b/sysdeps/unix/sysv/linux/m68k/Makefile index 7e46d51b86..55eeeabe10 100644 --- a/sysdeps/unix/sysv/linux/m68k/Makefile +++ b/sysdeps/unix/sysv/linux/m68k/Makefile @@ -11,3 +11,7 @@ ifeq ($(subdir),elf) sysdep-others += lddlibc4 install-bin += lddlibc4 endif + +ifeq ($(subdir),resource) +sysdep_routines += oldgetrlimit64 +endif diff --git a/sysdeps/unix/sysv/linux/m68k/Versions b/sysdeps/unix/sysv/linux/m68k/Versions index b70d1d1c45..6c650e2ce2 100644 --- a/sysdeps/unix/sysv/linux/m68k/Versions +++ b/sysdeps/unix/sysv/linux/m68k/Versions @@ -8,4 +8,26 @@ libc { # c* cacheflush; } + GLIBC_2.2 { + # functions used in other libraries + __xstat64; __fxstat64; __lxstat64; + + # a* + alphasort64; + + # g* + glob64; + + # New rlimit interface + getrlimit; setrlimit; getrlimit64; + + # r* + readdir64; readdir64_r; + + # s* + scandir64; + + # v* + versionsort64; + } } diff --git a/sysdeps/unix/sysv/linux/m68k/alphasort64.c b/sysdeps/unix/sysv/linux/m68k/alphasort64.c new file mode 100644 index 0000000000..0b5ae47d2f --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/alphasort64.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/m68k/fcntl.c b/sysdeps/unix/sysv/linux/m68k/fcntl.c new file mode 100644 index 0000000000..ea951bc4f9 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/fcntl.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/m68k/getdents64.c b/sysdeps/unix/sysv/linux/m68k/getdents64.c new file mode 100644 index 0000000000..0c75fb5a06 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/getdents64.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/m68k/getrlimit.c b/sysdeps/unix/sysv/linux/m68k/getrlimit.c new file mode 100644 index 0000000000..fc06dbd641 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/getrlimit.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/m68k/getrlimit64.c b/sysdeps/unix/sysv/linux/m68k/getrlimit64.c new file mode 100644 index 0000000000..fef018f471 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/getrlimit64.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/m68k/glob64.c b/sysdeps/unix/sysv/linux/m68k/glob64.c new file mode 100644 index 0000000000..82a9a296a7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/glob64.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/m68k/lockf64.c b/sysdeps/unix/sysv/linux/m68k/lockf64.c new file mode 100644 index 0000000000..a88f5a784a --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/lockf64.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/m68k/oldgetrlimit64.c b/sysdeps/unix/sysv/linux/m68k/oldgetrlimit64.c new file mode 100644 index 0000000000..4c27e957bf --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/oldgetrlimit64.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/m68k/readdir64.c b/sysdeps/unix/sysv/linux/m68k/readdir64.c new file mode 100644 index 0000000000..2ea26dd409 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/readdir64.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/m68k/readdir64_r.c b/sysdeps/unix/sysv/linux/m68k/readdir64_r.c new file mode 100644 index 0000000000..9f54f897e3 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/readdir64_r.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/m68k/scandir64.c b/sysdeps/unix/sysv/linux/m68k/scandir64.c new file mode 100644 index 0000000000..506fd8877c --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/scandir64.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/m68k/setrlimit.c b/sysdeps/unix/sysv/linux/m68k/setrlimit.c new file mode 100644 index 0000000000..bfaef74c38 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/setrlimit.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/m68k/syscalls.list b/sysdeps/unix/sysv/linux/m68k/syscalls.list index 5367ef0d0b..98d30667bd 100644 --- a/sysdeps/unix/sysv/linux/m68k/syscalls.list +++ b/sysdeps/unix/sysv/linux/m68k/syscalls.list @@ -1,3 +1,5 @@ # File name Caller Syscall name Args Strong name Weak names cacheflush EXTRA cacheflush i:iiii __cacheflush cacheflush +oldgetrlimit EXTRA getrlimit i:ip __old_getrlimit getrlimit@GLIBC_2.0 +oldsetrlimit EXTRA setrlimit i:ip __old_setrlimit setrlimit@GLIBC_2.0 diff --git a/sysdeps/unix/sysv/linux/m68k/versionsort64.c b/sysdeps/unix/sysv/linux/m68k/versionsort64.c new file mode 100644 index 0000000000..144b691e56 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/versionsort64.c @@ -0,0 +1 @@ +#include From 5b1705c09822a88e66dd64cfd446df9adc6c9303 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:16:57 +0000 Subject: [PATCH 2269/4487] HP/PA specific Makefile. --- sysdeps/hppa/Makefile | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 sysdeps/hppa/Makefile diff --git a/sysdeps/hppa/Makefile b/sysdeps/hppa/Makefile new file mode 100644 index 0000000000..f6ad84358a --- /dev/null +++ b/sysdeps/hppa/Makefile @@ -0,0 +1,26 @@ +# Copyright (C) 2000 Free Software Foundation, Inc. +# This file is part of the GNU C Library. +# Contributed by David Huggins-Daines (dhd@debian.org) + +# 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 published by the Free Software Foundation; either version 2 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 +# Library General Public License for more details. + +# You should have received a copy of the GNU Library General Public +# License along with the GNU C Library; see the file COPYING.LIB. If not, +# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +# We need this for all shared objects since the build process uses ld -r +CFLAGS-.os += -ffunction-sections + +ifeq ($(subdir),elf) +dl-routines += dl-symaddr dl-fptr +rtld-routines += dl-symaddr dl-fptr +endif From 6d049e72a0acdd736e645082250548f6de2fb269 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:17:19 +0000 Subject: [PATCH 2270/4487] HP/PA specific Version definitions. --- sysdeps/hppa/Versions | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sysdeps/hppa/Versions diff --git a/sysdeps/hppa/Versions b/sysdeps/hppa/Versions new file mode 100644 index 0000000000..0c447d9f28 --- /dev/null +++ b/sysdeps/hppa/Versions @@ -0,0 +1,6 @@ +ld { + GLIBC_2.2 { + # hppa specific functions in the dynamic linker, but used by libc.so. + _dl_symbol_address; _dl_unmap; _dl_lookup_address; + } +} From 12ffa85366ee2160966646eab8648c46dc0632b6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:17:31 +0000 Subject: [PATCH 2271/4487] HP/PA specific __longjmp implementation. --- sysdeps/hppa/__longjmp.S | 72 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 sysdeps/hppa/__longjmp.S diff --git a/sysdeps/hppa/__longjmp.S b/sysdeps/hppa/__longjmp.S new file mode 100644 index 0000000000..418a0b48ce --- /dev/null +++ b/sysdeps/hppa/__longjmp.S @@ -0,0 +1,72 @@ +/* longjmp for PA-RISC. + Copyright (C) 1997, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#define _SETJMP_H +#define _ASM +#include + +/* __longjmp(jmpbuf, val) */ + + .text + .align 4 + .globl __longjmp + .export __longjmp, code + .proc + .callinfo +__longjmp: + /* set return value */ + copy %r25, %r28 + + ldw 0(%r26), %r3 + ldw 8(%r26), %r4 + ldw 12(%r26), %r5 + ldw 16(%r26), %r6 + ldw 20(%r26), %r7 + ldw 24(%r26), %r8 + ldw 28(%r26), %r9 + ldw 32(%r26), %r10 + ldw 36(%r26), %r11 + ldw 40(%r26), %r12 + ldw 44(%r26), %r13 + ldw 48(%r26), %r14 + ldw 52(%r26), %r15 + ldw 56(%r26), %r16 + ldw 60(%r26), %r17 + ldw 64(%r26), %r18 + ldw 68(%r26), %r19 + ldw 72(%r26), %r27 + ldw 76(%r26), %r30 + + ldw 80(%r26), %rp + + ldo 88(%r26),%r20 + fldds,ma 8(%r20), %fr12 + fldds,ma 8(%r20), %fr13 + fldds,ma 8(%r20), %fr14 + fldds,ma 8(%r20), %fr15 + fldds,ma 8(%r20), %fr16 + fldds,ma 8(%r20), %fr17 + fldds,ma 8(%r20), %fr18 + fldds,ma 8(%r20), %fr19 + fldds,ma 8(%r20), %fr20 + fldds 0(%r20), %fr21 + + bv,n %r0(%r2) + .procend From 472803265cdda7cd84e0fa08dbc18587529a50fd Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:17:46 +0000 Subject: [PATCH 2272/4487] HP/PA specific MP add_n implementation. --- sysdeps/hppa/add_n.s | 68 ++++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/sysdeps/hppa/add_n.s b/sysdeps/hppa/add_n.s index b4a1428362..87b7cd7131 100644 --- a/sysdeps/hppa/add_n.s +++ b/sysdeps/hppa/add_n.s @@ -1,56 +1,56 @@ -; HP-PA __mpn_add_n -- Add two limb vectors of the same length > 0 and store -; sum in a third limb vector. +;! HP-PA __mpn_add_n -- Add two limb vectors of the same length > 0 and store +;! sum in a third limb vector. -; Copyright (C) 1992, 1994 Free Software Foundation, Inc. +;! Copyright (C) 1992, 1994 Free Software Foundation, Inc. -; This file is part of the GNU MP Library. +;! This file is part of the GNU MP Library. -; The GNU MP Library is free software; you can redistribute it and/or modify -; it under the terms of the GNU Library General Public License as published by -; the Free Software Foundation; either version 2 of the License, or (at your -; option) any later version. +;! The GNU MP Library is free software; you can redistribute it and/or modify +;! it under the terms of the GNU Library General Public License as published by +;! the Free Software Foundation; either version 2 of the License, or (at your +;! option) any later version. -; The GNU MP 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 Library General Public -; License for more details. +;! The GNU MP 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 Library General Public +;! License for more details. -; You should have received a copy of the GNU Library General Public License -; along with the GNU MP Library; see the file COPYING.LIB. If not, write to -; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -; MA 02111-1307, USA. +;! You should have received a copy of the GNU Library General Public License +;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to +;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +;! MA 02111-1307, USA. -; INPUT PARAMETERS -; res_ptr gr26 -; s1_ptr gr25 -; s2_ptr gr24 -; size gr23 +;! INPUT PARAMETERS +;! res_ptr gr26 +;! s1_ptr gr25 +;! s2_ptr gr24 +;! size gr23 -; One might want to unroll this as for other processors, but it turns -; out that the data cache contention after a store makes such -; unrolling useless. We can't come under 5 cycles/limb anyway. +;! One might want to unroll this as for other processors, but it turns +;! out that the data cache contention after a store makes such +;! unrolling useless. We can't come under 5 cycles/limb anyway. - .code + .text .export __mpn_add_n -__mpn_add_n +__mpn_add_n: .proc .callinfo frame=0,no_calls .entry - ldws,ma 4(0,%r25),%r20 - ldws,ma 4(0,%r24),%r19 + ldws,ma 4(0,%r25),%r21 + ldws,ma 4(0,%r24),%r20 - addib,= -1,%r23,L$end ; check for (SIZE == 1) - add %r20,%r19,%r28 ; add first limbs ignoring cy + addib,= -1,%r23,L$end ;! check for (SIZE == 1) + add %r21,%r20,%r28 ;! add first limbs ignoring cy -L$loop ldws,ma 4(0,%r25),%r20 - ldws,ma 4(0,%r24),%r19 +L$loop: ldws,ma 4(0,%r25),%r21 + ldws,ma 4(0,%r24),%r20 stws,ma %r28,4(0,%r26) addib,<> -1,%r23,L$loop - addc %r20,%r19,%r28 + addc %r21,%r20,%r28 -L$end stws %r28,0(0,%r26) +L$end: stws %r28,0(0,%r26) bv 0(%r2) addc %r0,%r0,%r28 From 256c860a4c05dc290bf9b230ef9f13530429c587 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:18:05 +0000 Subject: [PATCH 2273/4487] HP/PA specific function pointer handling for ld.so. --- sysdeps/hppa/dl-fptr.c | 212 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 212 insertions(+) create mode 100644 sysdeps/hppa/dl-fptr.c diff --git a/sysdeps/hppa/dl-fptr.c b/sysdeps/hppa/dl-fptr.c new file mode 100644 index 0000000000..8a2c1c214d --- /dev/null +++ b/sysdeps/hppa/dl-fptr.c @@ -0,0 +1,212 @@ +/* Make dynamic PLABELs for function pointers. HPPA version. + Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef _LIBC_REENTRANT +# include + +/* Remember, we use 0 to mean that a lock is taken on PA-RISC. */ +static int __hppa_fptr_lock = 1; +#endif + +/* Because ld.so is now versioned, these functions can be in their own + file; no relocations need to be done to call them. Of course, if + ld.so is not versioned... */ +#if 0 +#ifndef DO_VERSIONING +# error "This will not work with versioning turned off, sorry." +#endif +#endif + +#ifdef MAP_ANON +/* The fd is not examined when using MAP_ANON. */ +#define ANONFD -1 +#else +extern int _dl_zerofd; +#define ANONFD _dl_zerofd +#endif + +struct hppa_fptr __boot_ldso_fptr[HPPA_BOOT_FPTR_SIZE]; +struct hppa_fptr *__fptr_root = NULL; +struct hppa_fptr *__fptr_next = __boot_ldso_fptr; +static struct hppa_fptr *__fptr_free = NULL; +int __fptr_count = HPPA_BOOT_FPTR_SIZE; + +Elf32_Addr +__hppa_make_fptr (const struct link_map *sym_map, Elf32_Addr value, + struct hppa_fptr **root, struct hppa_fptr *mem) +{ + struct hppa_fptr **loc; + struct hppa_fptr *f; + +#ifdef _LIBC_REENTRANT + /* Make sure we are alone. We don't need a lock during bootstrap. */ + if (mem == NULL) + while (testandset (&__hppa_fptr_lock)); +#endif + + /* Search the sorted linked list for an existing entry for this + symbol. */ + loc = root; + f = *loc; + while (f != NULL && f->func <= value) + { + if (f->func == value) + goto found; + loc = &f->next; + f = *loc; + } + + /* Not found. Create a new one. */ + if (mem != NULL) + f = mem; + else if (__fptr_free != NULL) + { + f = __fptr_free; + __fptr_free = f->next; + } + else + { + if (__fptr_count == 0) + { +#ifndef MAP_ANON +# define MAP_ANON 0 + if (_dl_zerofd == -1) + { + _dl_zerofd = _dl_sysdep_open_zero_fill (); + if (_dl_zerofd == -1) + { + __close (fd); + _dl_signal_error (errno, NULL, + "cannot open zero fill device"); + } + } +#endif + + __fptr_next = __mmap (0, _dl_pagesize, PROT_READ | PROT_WRITE, + MAP_ANON | MAP_PRIVATE, ANONFD, 0); + if (__fptr_next == MAP_FAILED) + _dl_signal_error(errno, NULL, "cannot map page for fptr"); + __fptr_count = _dl_pagesize / sizeof (struct hppa_fptr); + } + f = __fptr_next++; + __fptr_count--; + } + + f->func = value; + /* GOT has already been relocated in elf_get_dynamic_info - don't + try to relocate it again. */ + f->gp = sym_map->l_info[DT_PLTGOT]->d_un.d_ptr; + f->next = *loc; + *loc = f; + +found: +#ifdef _LIBC_REENTRANT + /* Release the lock. Again, remember, zero means the lock is taken! */ + if (mem == NULL) + __hppa_fptr_lock = 1; +#endif + + /* Set bit 30 to indicate to $$dyncall that this is a PLABEL. */ + return (Elf32_Addr) f | 2; +} + +void +_dl_unmap (struct link_map *map) +{ + struct hppa_fptr **floc; + struct hppa_fptr *f; + struct hppa_fptr **lloc; + struct hppa_fptr *l; + + __munmap ((void *) map->l_map_start, map->l_map_end - map->l_map_start); + +#ifdef _LIBC_REENTRANT + /* Make sure we are alone. */ + while (testandset (&__hppa_fptr_lock)); +#endif + + /* Search the sorted linked list for the first entry for this object. */ + floc = &__fptr_root; + f = *floc; + while (f != NULL && f->func < map->l_map_start) + { + floc = &f->next; + f = *floc; + } + + /* We found one. */ + if (f != NULL && f->func < map->l_map_end) + { + /* Get the last entry. */ + lloc = floc; + l = f; + while (l && l->func < map->l_map_end) + { + lloc = &l->next; + l = *lloc; + } + + /* Updated FPTR. */ + *floc = l; + + /* Prepend them to the free list. */ + *lloc = __fptr_free; + __fptr_free = f; + } + +#ifdef _LIBC_REENTRANT + /* Release the lock. */ + __hppa_fptr_lock = 1; +#endif +} + +Elf32_Addr +_dl_lookup_address (const void *address) +{ + Elf32_Addr addr = (Elf32_Addr) address; + struct hppa_fptr *f; + +#ifdef _LIBC_REENTRANT + /* Make sure we are alone. */ + while (testandset (&__hppa_fptr_lock)); +#endif + + for (f = __fptr_root; f != NULL; f = f->next) + if (f == address) + { + addr = f->func; + break; + } + +#ifdef _LIBC_REENTRANT + /* Release the lock. */ + __hppa_fptr_lock = 1; +#endif + + return addr; +} From 6f8cfde3afb6fdcbd42befe6bc18a0bc8f433f87 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:19:45 +0000 Subject: [PATCH 2274/4487] HP/PA specific lookup configuration. --- sysdeps/hppa/dl-lookupcfg.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 sysdeps/hppa/dl-lookupcfg.h diff --git a/sysdeps/hppa/dl-lookupcfg.h b/sysdeps/hppa/dl-lookupcfg.h new file mode 100644 index 0000000000..4f5f8998a7 --- /dev/null +++ b/sysdeps/hppa/dl-lookupcfg.h @@ -0,0 +1,36 @@ +/* Configuration of lookup functions. + Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* Like IA-64, PA-RISC needs more information from the symbol lookup + function than just the address. */ +#define DL_LOOKUP_RETURNS_MAP +#define ELF_FUNCTION_PTR_IS_SPECIAL +#define DL_UNMAP_IS_SPECIAL + +void *_dl_symbol_address (const struct link_map *map, const ElfW(Sym) *ref); + +#define DL_SYMBOL_ADDRESS(map, ref) _dl_symbol_address(map, ref) + +Elf32_Addr _dl_lookup_address (const void *address); + +#define DL_LOOKUP_ADDRESS(addr) _dl_lookup_address (addr) + +void _dl_unmap (struct link_map *map); + +#define DL_UNMAP(map) _dl_unmap (map) From 3eb9e70628f283b3987db708d244d01f81106131 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:20:01 +0000 Subject: [PATCH 2275/4487] HP/PA specific dynamic linker internals. --- sysdeps/hppa/dl-machine.h | 605 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 605 insertions(+) create mode 100644 sysdeps/hppa/dl-machine.h diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h new file mode 100644 index 0000000000..e6782b3481 --- /dev/null +++ b/sysdeps/hppa/dl-machine.h @@ -0,0 +1,605 @@ +/* Machine-dependent ELF dynamic relocation inline functions. PA-RISC version. + Copyright (C) 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc. + Contributed by David Huggins-Daines + 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If + not, write to the Free Software Foundation, Inc., + 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifndef dl_machine_h +#define dl_machine_h 1 + +#define ELF_MACHINE_NAME "hppa" + +#include +#include +#include +#include + +/* These must match the definition of the stub in bfd/elf32-hppa.c. */ +#define SIZEOF_PLT_STUB (4*4) +#define GOT_FROM_PLT_STUB (4*4) + +/* A PLABEL is a function descriptor. Properly they consist of just + FUNC and GP. But we want to traverse a binary tree too. See + dl-fptr.c for the code (it may be made common between HPPA and + IA-64 in the future). + + We call these 'fptr' to make it easier to steal code from IA-64. */ + +/* ld.so currently has 12 PLABEL32 relocs. We'll keep this constant + large for now in case we require more, as the rest of these will be + used by the dynamic program itself (libc.so has quite a few + PLABEL32 relocs in it). */ +#define HPPA_BOOT_FPTR_SIZE 256 + +struct hppa_fptr +{ + Elf32_Addr func; + Elf32_Addr gp; + struct hppa_fptr *next; +}; + +extern struct hppa_fptr __boot_ldso_fptr[]; +extern struct hppa_fptr *__fptr_root; +extern int __fptr_count; + +extern Elf32_Addr __hppa_make_fptr (const struct link_map *, Elf32_Addr, + struct hppa_fptr **, struct hppa_fptr *); + +/* Return nonzero iff E_MACHINE is compatible with the running host. */ +static inline int +elf_machine_matches_host (Elf32_Half e_machine) +{ + return e_machine == EM_PARISC; +} + + +/* Return the link-time address of _DYNAMIC. */ +static inline Elf32_Addr +elf_machine_dynamic (void) +{ + Elf32_Addr dynamic; + +#if 0 + /* Use this method if GOT address not yet set up. */ + asm ("\ + b,l 1f,%0 + depi 0,31,2,%0 +1: addil L'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 8),%0 + ldw R'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 12)(%%r1),%0" + : "=r" (dynamic) : : "r1"); +#else + /* This works because we already have our GOT address available. */ + dynamic = (Elf32_Addr) &_DYNAMIC; +#endif + + return dynamic; +} + +/* Return the run-time load address of the shared object. */ +static inline Elf32_Addr +elf_machine_load_address (void) +{ + Elf32_Addr dynamic, dynamic_linkaddress; + + asm ("\ + b,l 1f,%0 + depi 0,31,2,%0 +1: addil L'_DYNAMIC - ($PIC_pcrel$0 - 8),%0 + ldo R'_DYNAMIC - ($PIC_pcrel$0 - 12)(%%r1),%1 + addil L'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 16),%0 + ldw R'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 20)(%%r1),%0" + : "=r" (dynamic_linkaddress), "=r" (dynamic) : : "r1"); + + return dynamic - dynamic_linkaddress; +} + +/* Fixup a PLT entry to bounce directly to the function at VALUE. */ +static inline Elf32_Addr +elf_machine_fixup_plt (struct link_map *map, lookup_t t, + const Elf32_Rela *reloc, + Elf32_Addr *reloc_addr, Elf32_Addr value) +{ + /* l is the link_map for the caller, t is the link_map for the object + * being called */ + reloc_addr[1] = D_PTR (t, l_info[DT_PLTGOT]); + reloc_addr[0] = value; + /* Return the PLT slot rather than the function value so that the + trampoline can load the new LTP. */ + return (Elf32_Addr) reloc_addr; +} + +/* Return the final value of a plt relocation. */ +static inline Elf32_Addr +elf_machine_plt_value (struct link_map *map, const Elf32_Rela *reloc, + Elf32_Addr value) +{ + /* We are rela only */ + return value + reloc->r_addend; +} + +/* Set up the loaded object described by L so its unrelocated PLT + entries will jump to the on-demand fixup code in dl-runtime.c. */ + +static inline int +elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) +{ + extern void _dl_runtime_resolve (void); + extern void _dl_runtime_profile (void); + Elf32_Addr jmprel = D_PTR(l, l_info[DT_JMPREL]); + + if (lazy && jmprel) + { + Elf32_Addr *got = NULL; + Elf32_Addr l_addr; + Elf32_Addr end_jmprel; + Elf32_Addr iplt; + + /* Relocate all the PLT slots. */ + l_addr = l->l_addr; + end_jmprel = jmprel + l->l_info[DT_PLTRELSZ]->d_un.d_val; + for (iplt = jmprel; iplt < end_jmprel; iplt += sizeof (Elf32_Rela)) + { + const Elf32_Rela *reloc; + Elf32_Word r_type; + Elf32_Word r_sym; + struct hppa_fptr *fptr; + + reloc = (const Elf32_Rela *) iplt; + r_type = ELF32_R_TYPE (reloc->r_info); + r_sym = ELF32_R_SYM (reloc->r_info); + + if (__builtin_expect (r_type == R_PARISC_IPLT, 1)) + { + fptr = (struct hppa_fptr *) (reloc->r_offset + l_addr); + if (r_sym != 0) + { + /* Relocate the pointer to the stub. */ + fptr->func += l_addr; + /* Instead of the LTP value, we put the reloc offset + here. The trampoline code will load the proper + LTP and pass the reloc offset to the fixup + function. */ + fptr->gp = iplt - jmprel; + if (!got) + { + static union { + unsigned char c[8]; + Elf32_Addr i[2]; + } sig = {{0x00,0xc0,0xff,0xee, 0xde,0xad,0xbe,0xef}}; + + /* Find our .got section. It's right after the + stub. */ + got = (Elf32_Addr *) (fptr->func + GOT_FROM_PLT_STUB); + + /* Sanity check to see if the address we are + going to check below is within a reasonable + approximation of the bounds of the PLT (or, + at least, is at an address that won't fault + on read). Then check for the magic signature + above. */ + if (fptr->func < (Elf32_Addr) fptr + sizeof(*fptr)) + return 0; + if (fptr->func > + ((Elf32_Addr) fptr + + SIZEOF_PLT_STUB + + ((l->l_info[DT_PLTRELSZ]->d_un.d_val / sizeof (Elf32_Rela)) + * 8))) + return 0; + if (got[-2] != sig.i[0] || got[-1] != sig.i[1]) + return 0; /* No lazy linking for you! */ + } + } + else + { + /* Relocate this *ABS* entry. */ + fptr->func = reloc->r_addend + l_addr; + fptr->gp = D_PTR (l, l_info[DT_PLTGOT]); + } + } + else if (__builtin_expect (r_type != R_PARISC_NONE, 0)) + _dl_reloc_bad_type (l, r_type, 1); + } + + if (got) + { + register Elf32_Addr ltp __asm__ ("%r19"); + /* Identify this shared object. */ + got[1] = (Elf32_Addr) l; + + /* This function will be called to perform the relocation. */ + if (__builtin_expect (!profile, 1)) + got[-2] = + (Elf32_Addr) ((struct hppa_fptr *) + ((unsigned long) &_dl_runtime_resolve & ~3))->func; + else + { + if (_dl_name_match_p (_dl_profile, l)) + { + /* This is the object we are looking for. Say that + we really want profiling and the timers are + started. */ + _dl_profile_map = l; + } + got[-2] = + (Elf32_Addr) ((struct hppa_fptr *) + ((unsigned long) &_dl_runtime_profile & ~3))->func; + } + got[-1] = ltp; + } + } + return lazy; +} + +/* Initial entry point code for the dynamic linker. + The C function `_dl_start' is the real entry point; + its return value is the user program's entry point. */ + +#define RTLD_START asm ("\ + .text + .globl _start + .type _start,@function +_start: + /* The kernel does not give us an initial stack frame. */ + ldo 64(%sp),%sp + /* Save the relevant arguments (yes, those are the correct + registers, the kernel is weird) in their stack slots. */ + stw %r25,-40(%sp) /* argc */ + stw %r24,-44(%sp) /* argv */ + + /* We need the LTP, and we need it now. */ + /* $PIC_pcrel$0 points 8 bytes past the current instruction, + just like a branch reloc. This sequence gets us the runtime + address of _DYNAMIC. */ + bl 0f,%r19 + depi 0,31,2,%r19 /* clear priviledge bits */ +0: addil L'_DYNAMIC - ($PIC_pcrel$0 - 8),%r19 + ldo R'_DYNAMIC - ($PIC_pcrel$0 - 12)(%r1),%r26 + + /* Also get the link time address from the first entry of the GOT. */ + addil L'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 16),%r19 + ldw R'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 20)(%r1),%r20 + + sub %r26,%r20,%r20 /* Calculate load offset */ + + /* Rummage through the dynamic entries, looking for DT_PLTGOT. */ + ldw,ma 8(%r26),%r19 +1: cmpib,=,n 3,%r19,2f /* tag == DT_PLTGOT? */ + cmpib,<>,n 0,%r19,1b + ldw,ma 8(%r26),%r19 + + /* Uh oh! We didn't find one. Abort. */ + iitlbp %r0,(%r0) + +2: ldw -4(%r26),%r19 /* Found it, load value. */ + add %r19,%r20,%r19 /* And add the load offset. */ + + /* Our initial stack layout is rather different from everyone + else's due to the unique PA-RISC ABI. As far as I know it + looks like this: + + ----------------------------------- (this frame created above) + | 32 bytes of magic | + |---------------------------------| + | 32 bytes argument/sp save area | + |---------------------------------| ((current->mm->env_end) + 63 & ~63) + | N bytes of slack | + |---------------------------------| + | envvar and arg strings | + |---------------------------------| + | ELF auxiliary info | + | (up to 28 words) | + |---------------------------------| + | Environment variable pointers | + | upwards to NULL | + |---------------------------------| + | Argument pointers | + | upwards to NULL | + |---------------------------------| + | argc (1 word) | + ----------------------------------- + + So, obviously, we can't just pass %sp to _dl_start. That's + okay, argv-4 will do just fine. + + The pleasant part of this is that if we need to skip + arguments we can just decrement argc and move argv, because + the stack pointer is utterly unrelated to the location of + the environment and argument vectors. */ + + /* This is always within range so we'll be okay. */ + bl _dl_start,%rp + ldo -4(%r24),%r26 + + /* FALLTHRU */ + .globl _dl_start_user + .type _dl_start_user,@function +_dl_start_user: + /* Save the entry point in %r3. */ + copy %ret0,%r3 + + /* Remember the lowest stack address. */ + addil LT'__libc_stack_end,%r19 + ldw RT'__libc_stack_end(%r1),%r20 + stw %sp,0(%r20) + + /* See if we were called as a command with the executable file + name as an extra leading argument. */ + addil LT'_dl_skip_args,%r19 + ldw RT'_dl_skip_args(%r1),%r20 + ldw 0(%r20),%r20 + + ldw -40(%sp),%r25 /* argc */ + comib,= 0,%r20,.Lnofix /* FIXME: will be mispredicted */ + ldw -44(%sp),%r24 /* argv (delay slot) */ + + sub %r25,%r20,%r25 + stw %r25,-40(%sp) + sh2add %r20,%r24,%r24 + stw %r24,-44(%sp) + +.Lnofix: + /* Call _dl_init(_dl_loaded, argc, argv, envp). */ + addil LT'_dl_loaded,%r19 + ldw RT'_dl_loaded(%r1),%r26 + ldw 0(%r26),%r26 + /* envp = argv + argc + 1 */ + sh2add %r25,%r24,%r23 + bl _dl_init,%r2 + ldo 4(%r23),%r23 /* delay slot */ + + /* Reload argc, argv to the registers start.S expects them in (feh) */ + ldw -40(%sp),%r25 + ldw -44(%sp),%r24 + + /* _dl_fini does have a PLT slot now. I don't know how to get + to it though, so this hack will remain. */ + .section .data +__dl_fini_plabel: + .word _dl_fini + .word 0xdeadbeef + .previous + + addil LT'__dl_fini_plabel,%r19 + ldw RT'__dl_fini_plabel(%r1),%r23 + stw %r19,4(%r23) + bv %r0(%r3) + depi 2,31,2,%r23 /* delay slot */"); + +/* This code gets called via the .plt stub, and is used in + dl-runtime.c to call the `fixup' function and then redirect to the + address it returns. + Enter with r19 = reloc offset, r20 = got-8, r21 = fixup ltp. */ +#define TRAMPOLINE_TEMPLATE(tramp_name, fixup_name) \ + extern void tramp_name (void); \ + asm ( "\ + /* Trampoline for " #tramp_name " */ + .globl " #tramp_name " + .type " #tramp_name ",@function +" #tramp_name ": + /* Save return pointer */ + stw %r2,-20(%sp) + /* Save argument registers in the call stack frame. */ + stw %r26,-36(%sp) + stw %r25,-40(%sp) + stw %r24,-44(%sp) + stw %r23,-48(%sp) + /* Build a call frame. */ + stwm %sp,64(%sp) + + /* Set up args to fixup func. */ + ldw 8+4(%r20),%r26 /* got[1] == struct link_map * */ + copy %r19,%r25 /* reloc offset */ + + /* Call the real address resolver. */ + bl " #fixup_name ",%r2 + copy %r21,%r19 /* delay slot, set fixup func ltp */ + + ldwm -64(%sp),%sp + /* Arguments. */ + ldw -36(%sp),%r26 + ldw -40(%sp),%r25 + ldw -44(%sp),%r24 + ldw -48(%sp),%r23 + /* Return pointer. */ + ldw -20(%sp),%r2 + /* Call the real function. */ + ldw 0(%r28),%r22 + bv %r0(%r22) + ldw 4(%r28),%r19 +"); + +#ifndef PROF +#define ELF_MACHINE_RUNTIME_TRAMPOLINE \ + TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup); \ + TRAMPOLINE_TEMPLATE (_dl_runtime_profile, profile_fixup); +#else +#define ELF_MACHINE_RUNTIME_TRAMPOLINE \ + TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup); \ + strong_alias (_dl_runtime_resolve, _dl_runtime_profile); +#endif + + +/* Nonzero iff TYPE describes a relocation that should + skip the executable when looking up the symbol value. */ +#define elf_machine_lookup_noexec_p(type) ((type) == R_PARISC_COPY) + +/* Nonzero iff TYPE describes relocation of a PLT entry, so + PLT entries should not be allowed to define the value. */ +#define elf_machine_lookup_noplt_p(type) ((type) == R_PARISC_IPLT \ + || (type) == R_PARISC_EPLT) + +/* Used by ld.so for ... something ... */ +#define ELF_MACHINE_JMP_SLOT R_PARISC_IPLT + +/* We only use RELA. */ +#define ELF_MACHINE_NO_REL 1 + +#endif /* !dl_machine_h */ + +/* These are only actually used where RESOLVE_MAP is defined, anyway. */ +#ifdef RESOLVE_MAP + +static inline void +elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, + const Elf32_Sym *sym, const struct r_found_version *version, + Elf32_Addr *const reloc_addr) +{ + const Elf32_Sym *const refsym = sym; + unsigned long const r_type = ELF32_R_TYPE (reloc->r_info); + struct link_map *sym_map; + Elf32_Addr value; + +#ifndef RTLD_BOOTSTRAP + /* This is defined in rtld.c, but nowhere in the static libc.a; make the + reference weak so static programs can still link. This declaration + cannot be done when compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP) + because rtld.c contains the common defn for _dl_rtld_map, which is + incompatible with a weak decl in the same file. */ + weak_extern (_dl_rtld_map); +#endif + + /* RESOLVE_MAP will return a null value for undefined syms, and + non-null for all other syms. In particular, relocs with no + symbol (symbol index of zero), also called *ABS* relocs, will be + resolved to MAP. (The first entry in a symbol table is all + zeros, and an all zero Elf32_Sym has a binding of STB_LOCAL.) + See RESOLVE_MAP definition in elf/dl-reloc.c */ +#ifdef RTLD_BOOTSTRAP + /* RESOLVE_MAP in rtld.c doesn't have the local sym test. */ + sym_map = (ELF32_ST_BIND (sym->st_info) != STB_LOCAL + ? RESOLVE_MAP (&sym, version, r_type) : map); +#else + sym_map = RESOLVE_MAP (&sym, version, r_type); +#endif + if (sym_map) + { + value = sym ? sym_map->l_addr + sym->st_value : 0; + value += reloc->r_addend; + } + else + value = 0; + + switch (r_type) + { + case R_PARISC_DIR32: +#ifndef RTLD_BOOTSTRAP + /* All hell breaks loose if we try to relocate these twice, + because any initialized variables in ld.so that refer to + other ones will have their values reset. In particular, + __fptr_next will be reset, sometimes causing endless loops in + __hppa_make_fptr(). So don't do that. */ + if (map == &_dl_rtld_map) + return; +#endif + /* Otherwise, nothing more to do here. */ + break; + + case R_PARISC_PLABEL32: + /* Easy rule: If there is a symbol and it is global, then we + need to make a dynamic function descriptor. Otherwise we + have the address of a PLT slot for a local symbol which we + know to be unique. */ + if (sym == NULL + || sym_map == NULL + || ELF32_ST_BIND (sym->st_info) == STB_LOCAL) + break; + + /* Okay, we need to make ourselves a PLABEL then. See the IA64 + code for an explanation of how this works. */ +#ifndef RTLD_BOOTSTRAP + value = __hppa_make_fptr (sym_map, value, &__fptr_root, NULL); +#else + { + struct hppa_fptr *p_boot_ldso_fptr; + struct hppa_fptr **p_fptr_root; + int *p_fptr_count; + unsigned long dot; + + /* Go from the top of __boot_ldso_fptr. As on IA64, we + probably haven't relocated the necessary values by this + point so we have to find them ourselves. */ + + asm ("bl 0f,%0 + depi 0,31,2,%0 +0: addil L'__boot_ldso_fptr - ($PIC_pcrel$0 - 8),%0 + ldo R'__boot_ldso_fptr - ($PIC_pcrel$0 - 12)(%%r1),%1 + addil L'__fptr_root - ($PIC_pcrel$0 - 16),%0 + ldo R'__fptr_root - ($PIC_pcrel$0 - 20)(%%r1),%2 + addil L'__fptr_count - ($PIC_pcrel$0 - 24),%0 + ldo R'__fptr_count - ($PIC_pcrel$0 - 28)(%%r1),%3" + : + "=r" (dot), + "=r" (p_boot_ldso_fptr), + "=r" (p_fptr_root), + "=r" (p_fptr_count)); + + value = __hppa_make_fptr (sym_map, value, p_fptr_root, + &p_boot_ldso_fptr[--*p_fptr_count]); + } +#endif + break; + + case R_PARISC_IPLT: + if (__builtin_expect (sym_map != NULL, 1)) + elf_machine_fixup_plt (NULL, sym_map, reloc, reloc_addr, value); + else + { + /* If we get here, it's a (weak) undefined sym. */ + elf_machine_fixup_plt (NULL, map, reloc, reloc_addr, value); + } + return; + + case R_PARISC_COPY: + if (__builtin_expect (sym == NULL, 0)) + /* This can happen in trace mode if an object could not be + found. */ + break; + if (__builtin_expect (sym->st_size > refsym->st_size, 0) + || (__builtin_expect (sym->st_size < refsym->st_size, 0) + && __builtin_expect (_dl_verbose, 0))) + { + const char *strtab; + + strtab = (const char *) D_PTR (map, l_info[DT_STRTAB]); + _dl_sysdep_error (_dl_argv[0] ?: "", + ": Symbol `", strtab + refsym->st_name, + "' has different size in shared object, " + "consider re-linking\n", NULL); + } + memcpy (reloc_addr, (void *) value, + MIN (sym->st_size, refsym->st_size)); + return; + + case R_PARISC_NONE: /* Alright, Wilbur. */ + return; + + default: + _dl_reloc_bad_type (map, r_type, 0); + } + + *reloc_addr = value; +} + +static inline void +elf_machine_lazy_rel (struct link_map *map, + Elf32_Addr l_addr, const Elf32_Rela *reloc) +{ + /* We don't have anything to do here. elf_machine_runtime_setup has + done all the relocs already. */ +} + +#endif /* RESOLVE_MAP */ From 00186dff491ebd73ff517d0395fc9774dc267177 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:21:04 +0000 Subject: [PATCH 2276/4487] HP/PA specific handling of symbol references. --- sysdeps/hppa/dl-symaddr.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 sysdeps/hppa/dl-symaddr.c diff --git a/sysdeps/hppa/dl-symaddr.c b/sysdeps/hppa/dl-symaddr.c new file mode 100644 index 0000000000..038404a48b --- /dev/null +++ b/sysdeps/hppa/dl-symaddr.c @@ -0,0 +1,39 @@ +/* Get the symbol address. HPPA version. + Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +void * +_dl_symbol_address (const struct link_map *map, const ElfW(Sym) *ref) +{ + Elf32_Addr value = (map ? map->l_addr : 0) + ref->st_value; + + /* On hppa, we have to return the pointer to function descriptor. */ + if (ELFW(ST_TYPE) (ref->st_info) == STT_FUNC) + return (void *) __hppa_make_fptr (map, value, &__fptr_root, NULL); + else + return (void *) value; +} + +ElfW(Addr) +_dl_start_address (const struct link_map *map, ElfW(Addr) start) +{ + return __hppa_make_fptr (map, start, &__fptr_root, NULL); +} From 257c3b5223b77543fc21a3366171cb5cb51f9b5b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:21:39 +0000 Subject: [PATCH 2277/4487] HP/PA specific call frame definition. --- sysdeps/hppa/frame.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 sysdeps/hppa/frame.h diff --git a/sysdeps/hppa/frame.h b/sysdeps/hppa/frame.h new file mode 100644 index 0000000000..e6764daa24 --- /dev/null +++ b/sysdeps/hppa/frame.h @@ -0,0 +1,28 @@ +/* Definition of stack frame structure. HPPA version. + Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* PA stacks grow upwards. */ +#define INNER_THAN > + +/* FIXME: will verify this later */ +struct layout +{ + void *next; + void *return_address; +}; From acc97172a1324c1d407b91b3ad3ee8977551e743 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:22:34 +0000 Subject: [PATCH 2278/4487] Don't use %r19 (linkage table pointer). --- sysdeps/hppa/hppa1.1/addmul_1.s | 100 +++++++++++++++-------------- sysdeps/hppa/hppa1.1/mul_1.s | 100 +++++++++++++++-------------- sysdeps/hppa/hppa1.1/submul_1.s | 102 +++++++++++++++--------------- sysdeps/hppa/hppa1.1/udiv_qrnnd.s | 69 ++++++++++---------- sysdeps/hppa/lshift.s | 54 ++++++++-------- sysdeps/hppa/rshift.s | 54 ++++++++-------- sysdeps/hppa/sub_n.s | 68 ++++++++++---------- sysdeps/hppa/udiv_qrnnd.s | 82 ++++++++++++------------ 8 files changed, 319 insertions(+), 310 deletions(-) diff --git a/sysdeps/hppa/hppa1.1/addmul_1.s b/sysdeps/hppa/hppa1.1/addmul_1.s index 0fdcb3cb20..5b3e0482a5 100644 --- a/sysdeps/hppa/hppa1.1/addmul_1.s +++ b/sysdeps/hppa/hppa1.1/addmul_1.s @@ -1,71 +1,72 @@ -; HP-PA-1.1 __mpn_addmul_1 -- Multiply a limb vector with a limb and -; add the result to a second limb vector. +;! HP-PA-1.1 __mpn_addmul_1 -- Multiply a limb vector with a limb and +;! add the result to a second limb vector. -; Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. +;! Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. -; This file is part of the GNU MP Library. +;! This file is part of the GNU MP Library. -; The GNU MP Library is free software; you can redistribute it and/or modify -; it under the terms of the GNU Library General Public License as published by -; the Free Software Foundation; either version 2 of the License, or (at your -; option) any later version. +;! The GNU MP Library is free software; you can redistribute it and/or modify +;! it under the terms of the GNU Library General Public License as published by +;! the Free Software Foundation; either version 2 of the License, or (at your +;! option) any later version. -; The GNU MP 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 Library General Public -; License for more details. +;! The GNU MP 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 Library General Public +;! License for more details. -; You should have received a copy of the GNU Library General Public License -; along with the GNU MP Library; see the file COPYING.LIB. If not, write to -; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -; MA 02111-1307, USA. +;! You should have received a copy of the GNU Library General Public License +;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to +;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +;! MA 02111-1307, USA. -; INPUT PARAMETERS -; res_ptr r26 -; s1_ptr r25 -; size r24 -; s2_limb r23 +;! INPUT PARAMETERS +;! res_ptr r26 +;! s1_ptr r25 +;! size r24 +;! s2_limb r23 -; This runs at 11 cycles/limb on a PA7000. With the used instructions, it -; can not become faster due to data cache contention after a store. On the -; PA7100 it runs at 10 cycles/limb, and that can not be improved either, -; since only the xmpyu does not need the integer pipeline, so the only -; dual-issue we will get are addc+xmpyu. Unrolling could gain a cycle/limb -; on the PA7100. +;! This runs at 11 cycles/limb on a PA7000. With the used instructions, it +;! can not become faster due to data cache contention after a store. On the +;! PA7100 it runs at 10 cycles/limb, and that can not be improved either, +;! since only the xmpyu does not need the integer pipeline, so the only +;! dual-issue we will get are addc+xmpyu. Unrolling could gain a cycle/limb +;! on the PA7100. -; There are some ideas described in mul_1.s that applies to this code too. +;! There are some ideas described in mul_1.s that applies to this code too. - .code + .text .export __mpn_addmul_1 -__mpn_addmul_1 +__mpn_addmul_1: .proc .callinfo frame=64,no_calls .entry ldo 64(%r30),%r30 fldws,ma 4(%r25),%fr5 - stw %r23,-16(%r30) ; move s2_limb ... + stw %r23,-16(%r30) ;! move s2_limb ... addib,= -1,%r24,L$just_one_limb - fldws -16(%r30),%fr4 ; ... into fr4 - add %r0,%r0,%r0 ; clear carry + fldws -16(%r30),%fr4 ;! ... into fr4 + add %r0,%r0,%r0 ;! clear carry xmpyu %fr4,%fr5,%fr6 fldws,ma 4(%r25),%fr7 fstds %fr6,-16(%r30) xmpyu %fr4,%fr7,%fr8 - ldw -12(%r30),%r19 ; least significant limb in product + ldw -12(%r30),%r20 ;! least significant limb in product ldw -16(%r30),%r28 fstds %fr8,-16(%r30) addib,= -1,%r24,L$end ldw -12(%r30),%r1 -; Main loop -L$loop ldws 0(%r26),%r29 +;! Main loop +L$loop: + ldws 0(%r26),%r29 fldws,ma 4(%r25),%fr5 - add %r29,%r19,%r19 - stws,ma %r19,4(%r26) - addc %r28,%r1,%r19 + add %r29,%r20,%r20 + stws,ma %r20,4(%r26) + addc %r28,%r1,%r20 xmpyu %fr4,%fr5,%fr6 ldw -16(%r30),%r28 fstds %fr6,-16(%r30) @@ -73,27 +74,28 @@ L$loop ldws 0(%r26),%r29 addib,<> -1,%r24,L$loop ldw -12(%r30),%r1 -L$end ldw 0(%r26),%r29 - add %r29,%r19,%r19 - stws,ma %r19,4(%r26) - addc %r28,%r1,%r19 +L$end: + ldw 0(%r26),%r29 + add %r29,%r20,%r20 + stws,ma %r20,4(%r26) + addc %r28,%r1,%r20 ldw -16(%r30),%r28 ldws 0(%r26),%r29 addc %r0,%r28,%r28 - add %r29,%r19,%r19 - stws,ma %r19,4(%r26) + add %r29,%r20,%r20 + stws,ma %r20,4(%r26) addc %r0,%r28,%r28 bv 0(%r2) - ldo -64(%r30),%r30 + ldo -64(%r30),%r30 -L$just_one_limb +L$just_one_limb: xmpyu %fr4,%fr5,%fr6 ldw 0(%r26),%r29 fstds %fr6,-16(%r30) ldw -12(%r30),%r1 ldw -16(%r30),%r28 - add %r29,%r1,%r19 - stw %r19,0(%r26) + add %r29,%r1,%r20 + stw %r20,0(%r26) addc %r0,%r28,%r28 bv 0(%r2) ldo -64(%r30),%r30 diff --git a/sysdeps/hppa/hppa1.1/mul_1.s b/sysdeps/hppa/hppa1.1/mul_1.s index cdd0c1d7fa..7f53916e83 100644 --- a/sysdeps/hppa/hppa1.1/mul_1.s +++ b/sysdeps/hppa/hppa1.1/mul_1.s @@ -1,92 +1,94 @@ -; HP-PA-1.1 __mpn_mul_1 -- Multiply a limb vector with a limb and store -; the result in a second limb vector. +;! HP-PA-1.1 __mpn_mul_1 -- Multiply a limb vector with a limb and store +;! the result in a second limb vector. -; Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. +;! Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. -; This file is part of the GNU MP Library. +;! This file is part of the GNU MP Library. -; The GNU MP Library is free software; you can redistribute it and/or modify -; it under the terms of the GNU Library General Public License as published by -; the Free Software Foundation; either version 2 of the License, or (at your -; option) any later version. +;! The GNU MP Library is free software; you can redistribute it and/or modify +;! it under the terms of the GNU Library General Public License as published by +;! the Free Software Foundation; either version 2 of the License, or (at your +;! option) any later version. -; The GNU MP 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 Library General Public -; License for more details. +;! The GNU MP 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 Library General Public +;! License for more details. -; You should have received a copy of the GNU Library General Public License -; along with the GNU MP Library; see the file COPYING.LIB. If not, write to -; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -; MA 02111-1307, USA. +;! You should have received a copy of the GNU Library General Public License +;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to +;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +;! MA 02111-1307, USA. -; INPUT PARAMETERS -; res_ptr r26 -; s1_ptr r25 -; size r24 -; s2_limb r23 +;! INPUT PARAMETERS +;! res_ptr r26 +;! s1_ptr r25 +;! size r24 +;! s2_limb r23 -; This runs at 9 cycles/limb on a PA7000. With the used instructions, it can -; not become faster due to data cache contention after a store. On the -; PA7100 it runs at 7 cycles/limb, and that can not be improved either, since -; only the xmpyu does not need the integer pipeline, so the only dual-issue -; we will get are addc+xmpyu. Unrolling would not help either CPU. +;! This runs at 9 cycles/limb on a PA7000. With the used instructions, it can +;! not become faster due to data cache contention after a store. On the +;! PA7100 it runs at 7 cycles/limb, and that can not be improved either, since +;! only the xmpyu does not need the integer pipeline, so the only dual-issue +;! we will get are addc+xmpyu. Unrolling would not help either CPU. -; We could use fldds to read two limbs at a time from the S1 array, and that -; could bring down the times to 8.5 and 6.5 cycles/limb for the PA7000 and -; PA7100, respectively. We don't do that since it does not seem worth the -; (alignment) troubles... +;! We could use fldds to read two limbs at a time from the S1 array, and that +;! could bring down the times to 8.5 and 6.5 cycles/limb for the PA7000 and +;! PA7100, respectively. We don't do that since it does not seem worth the +;! (alignment) troubles... -; At least the PA7100 is rumored to be able to deal with cache-misses -; without stalling instruction issue. If this is true, and the cache is -; actually also lockup-free, we should use a deeper software pipeline, and -; load from S1 very early! (The loads and stores to -12(sp) will surely be -; in the cache.) +;! At least the PA7100 is rumored to be able to deal with cache-misses +;! without stalling instruction issue. If this is true, and the cache is +;! actually also lockup-free, we should use a deeper software pipeline, and +;! load from S1 very early; (The loads and stores to -12(sp) will surely be +;! in the cache.) - .code + .text .export __mpn_mul_1 -__mpn_mul_1 +__mpn_mul_1: .proc .callinfo frame=64,no_calls .entry ldo 64(%r30),%r30 fldws,ma 4(%r25),%fr5 - stw %r23,-16(%r30) ; move s2_limb ... + stw %r23,-16(%r30) ;! move s2_limb ... addib,= -1,%r24,L$just_one_limb - fldws -16(%r30),%fr4 ; ... into fr4 - add %r0,%r0,%r0 ; clear carry + fldws -16(%r30),%fr4 ;! ... into fr4 + add %r0,%r0,%r0 ;! clear carry xmpyu %fr4,%fr5,%fr6 fldws,ma 4(%r25),%fr7 fstds %fr6,-16(%r30) xmpyu %fr4,%fr7,%fr8 - ldw -12(%r30),%r19 ; least significant limb in product + ldw -12(%r30),%r20 ;! least significant limb in product ldw -16(%r30),%r28 fstds %fr8,-16(%r30) addib,= -1,%r24,L$end ldw -12(%r30),%r1 -; Main loop -L$loop fldws,ma 4(%r25),%fr5 - stws,ma %r19,4(%r26) - addc %r28,%r1,%r19 +;! Main loop +L$loop: + fldws,ma 4(%r25),%fr5 + stws,ma %r20,4(%r26) + addc %r28,%r1,%r20 xmpyu %fr4,%fr5,%fr6 ldw -16(%r30),%r28 fstds %fr6,-16(%r30) addib,<> -1,%r24,L$loop ldw -12(%r30),%r1 -L$end stws,ma %r19,4(%r26) - addc %r28,%r1,%r19 +L$end: + stws,ma %r20,4(%r26) + addc %r28,%r1,%r20 ldw -16(%r30),%r28 - stws,ma %r19,4(%r26) + stws,ma %r20,4(%r26) addc %r0,%r28,%r28 bv 0(%r2) ldo -64(%r30),%r30 -L$just_one_limb +L$just_one_limb: xmpyu %fr4,%fr5,%fr6 fstds %fr6,-16(%r30) ldw -16(%r30),%r28 diff --git a/sysdeps/hppa/hppa1.1/submul_1.s b/sysdeps/hppa/hppa1.1/submul_1.s index a4a385467e..f2c19c7bc8 100644 --- a/sysdeps/hppa/hppa1.1/submul_1.s +++ b/sysdeps/hppa/hppa1.1/submul_1.s @@ -1,77 +1,78 @@ -; HP-PA-1.1 __mpn_submul_1 -- Multiply a limb vector with a limb and -; subtract the result from a second limb vector. +;! HP-PA-1.1 __mpn_submul_1 -- Multiply a limb vector with a limb and +;! subtract the result from a second limb vector. -; Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. +;! Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. -; This file is part of the GNU MP Library. +;! This file is part of the GNU MP Library. -; The GNU MP Library is free software; you can redistribute it and/or modify -; it under the terms of the GNU Library General Public License as published by -; the Free Software Foundation; either version 2 of the License, or (at your -; option) any later version. +;! The GNU MP Library is free software; you can redistribute it and/or modify +;! it under the terms of the GNU Library General Public License as published by +;! the Free Software Foundation; either version 2 of the License, or (at your +;! option) any later version. -; The GNU MP 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 Library General Public -; License for more details. +;! The GNU MP 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 Library General Public +;! License for more details. -; You should have received a copy of the GNU Library General Public License -; along with the GNU MP Library; see the file COPYING.LIB. If not, write to -; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -; MA 02111-1307, USA. +;! You should have received a copy of the GNU Library General Public License +;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to +;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +;! MA 02111-1307, USA. -; INPUT PARAMETERS -; res_ptr r26 -; s1_ptr r25 -; size r24 -; s2_limb r23 +;! INPUT PARAMETERS +;! res_ptr r26 +;! s1_ptr r25 +;! size r24 +;! s2_limb r23 -; This runs at 12 cycles/limb on a PA7000. With the used instructions, it -; can not become faster due to data cache contention after a store. On the -; PA7100 it runs at 11 cycles/limb, and that can not be improved either, -; since only the xmpyu does not need the integer pipeline, so the only -; dual-issue we will get are addc+xmpyu. Unrolling could gain a cycle/limb -; on the PA7100. +;! This runs at 12 cycles/limb on a PA7000. With the used instructions, it +;! can not become faster due to data cache contention after a store. On the +;! PA7100 it runs at 11 cycles/limb, and that can not be improved either, +;! since only the xmpyu does not need the integer pipeline, so the only +;! dual-issue we will get are addc+xmpyu. Unrolling could gain a cycle/limb +;! on the PA7100. -; There are some ideas described in mul_1.s that applies to this code too. +;! There are some ideas described in mul_1.s that applies to this code too. -; It seems possible to make this run as fast as __mpn_addmul_1, if we use -; sub,>>= %r29,%r19,%r22 -; addi 1,%r28,%r28 -; but that requires reworking the hairy software pipeline... +;! It seems possible to make this run as fast as __mpn_addmul_1, if we use +;! sub,>>= %r29,%r20,%r22 +;! addi 1,%r28,%r28 +;! but that requires reworking the hairy software pipeline... - .code + .text .export __mpn_submul_1 -__mpn_submul_1 +__mpn_submul_1: .proc .callinfo frame=64,no_calls .entry ldo 64(%r30),%r30 fldws,ma 4(%r25),%fr5 - stw %r23,-16(%r30) ; move s2_limb ... + stw %r23,-16(%r30) ;! move s2_limb ... addib,= -1,%r24,L$just_one_limb - fldws -16(%r30),%fr4 ; ... into fr4 - add %r0,%r0,%r0 ; clear carry + fldws -16(%r30),%fr4 ;! ... into fr4 + add %r0,%r0,%r0 ;! clear carry xmpyu %fr4,%fr5,%fr6 fldws,ma 4(%r25),%fr7 fstds %fr6,-16(%r30) xmpyu %fr4,%fr7,%fr8 - ldw -12(%r30),%r19 ; least significant limb in product + ldw -12(%r30),%r20 ;! least significant limb in product ldw -16(%r30),%r28 fstds %fr8,-16(%r30) addib,= -1,%r24,L$end ldw -12(%r30),%r1 -; Main loop -L$loop ldws 0(%r26),%r29 +;! Main loop +L$loop: + ldws 0(%r26),%r29 fldws,ma 4(%r25),%fr5 - sub %r29,%r19,%r22 - add %r22,%r19,%r0 + sub %r29,%r20,%r22 + add %r22,%r20,%r0 stws,ma %r22,4(%r26) - addc %r28,%r1,%r19 + addc %r28,%r1,%r20 xmpyu %fr4,%fr5,%fr6 ldw -16(%r30),%r28 fstds %fr6,-16(%r30) @@ -79,22 +80,23 @@ L$loop ldws 0(%r26),%r29 addib,<> -1,%r24,L$loop ldw -12(%r30),%r1 -L$end ldw 0(%r26),%r29 - sub %r29,%r19,%r22 - add %r22,%r19,%r0 +L$end: + ldw 0(%r26),%r29 + sub %r29,%r20,%r22 + add %r22,%r20,%r0 stws,ma %r22,4(%r26) - addc %r28,%r1,%r19 + addc %r28,%r1,%r20 ldw -16(%r30),%r28 ldws 0(%r26),%r29 addc %r0,%r28,%r28 - sub %r29,%r19,%r22 - add %r22,%r19,%r0 + sub %r29,%r20,%r22 + add %r22,%r20,%r0 stws,ma %r22,4(%r26) addc %r0,%r28,%r28 bv 0(%r2) ldo -64(%r30),%r30 -L$just_one_limb +L$just_one_limb: xmpyu %fr4,%fr5,%fr6 ldw 0(%r26),%r29 fstds %fr6,-16(%r30) diff --git a/sysdeps/hppa/hppa1.1/udiv_qrnnd.s b/sysdeps/hppa/hppa1.1/udiv_qrnnd.s index bf7dc70cd7..c0a02d89ad 100644 --- a/sysdeps/hppa/hppa1.1/udiv_qrnnd.s +++ b/sysdeps/hppa/hppa1.1/udiv_qrnnd.s @@ -1,53 +1,55 @@ -; HP-PA __udiv_qrnnd division support, used from longlong.h. -; This version runs fast on PA 7000 and later. +;! HP-PA __udiv_qrnnd division support, used from longlong.h. +;! This version runs fast on PA 7000 and later. -; Copyright (C) 1993, 1994 Free Software Foundation, Inc. +;! Copyright (C) 1993, 1994 Free Software Foundation, Inc. -; This file is part of the GNU MP Library. +;! This file is part of the GNU MP Library. -; The GNU MP Library is free software; you can redistribute it and/or modify -; it under the terms of the GNU Library General Public License as published by -; the Free Software Foundation; either version 2 of the License, or (at your -; option) any later version. +;! The GNU MP Library is free software; you can redistribute it and/or modify +;! it under the terms of the GNU Library General Public License as published by +;! the Free Software Foundation; either version 2 of the License, or (at your +;! option) any later version. -; The GNU MP 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 Library General Public -; License for more details. +;! The GNU MP 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 Library General Public +;! License for more details. -; You should have received a copy of the GNU Library General Public License -; along with the GNU MP Library; see the file COPYING.LIB. If not, write to -; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -; MA 02111-1307, USA. +;! You should have received a copy of the GNU Library General Public License +;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to +;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +;! MA 02111-1307, USA. -; INPUT PARAMETERS -; rem_ptr gr26 -; n1 gr25 -; n0 gr24 -; d gr23 +;! INPUT PARAMETERS +;! rem_ptr gr26 +;! n1 gr25 +;! n0 gr24 +;! d gr23 - .code -L$0000 .word 0x43f00000 + .text +L$0000: + .word 0x43f00000 .word 0x0 .export __udiv_qrnnd -__udiv_qrnnd +__udiv_qrnnd: .proc .callinfo frame=64,no_calls .entry ldo 64(%r30),%r30 - stws %r25,-16(0,%r30) ; n_hi - stws %r24,-12(0,%r30) ; n_lo - ldil L'L$0000,%r19 - ldo R'L$0000(%r19),%r19 + stws %r25,-16(0,%r30) ;! n_hi + stws %r24,-12(0,%r30) ;! n_lo + b,l L$0,%r1 + ldo L$0000-L$0(%r1),%r1 +L$0: fldds -16(0,%r30),%fr5 stws %r23,-12(0,%r30) comib,<= 0,%r25,L$1 fcnvxf,dbl,dbl %fr5,%fr5 - fldds 0(0,%r19),%fr4 + fldds 0(0,%r1),%fr4 fadd,dbl %fr4,%fr5,%fr5 -L$1 +L$1: fcpy,sgl %fr0,%fr6L fldws -12(0,%r30),%fr6R fcnvxf,dbl,dbl %fr6,%fr4 @@ -62,13 +64,14 @@ L$1 ldws -12(0,%r30),%r21 ldws -16(0,%r30),%r20 sub %r24,%r21,%r22 - subb %r25,%r20,%r19 - comib,= 0,%r19,L$2 + subb %r25,%r20,%r1 + comib,= 0,%r1,L$2 ldo -64(%r30),%r30 add %r22,%r23,%r22 ldo -1(%r28),%r28 -L$2 bv 0(%r2) +L$2: + bv 0(%r2) stws %r22,0(0,%r26) .exit diff --git a/sysdeps/hppa/lshift.s b/sysdeps/hppa/lshift.s index abac6ec201..de6dd761ca 100644 --- a/sysdeps/hppa/lshift.s +++ b/sysdeps/hppa/lshift.s @@ -1,34 +1,34 @@ -; HP-PA __mpn_lshift -- +;! HP-PA __mpn_lshift -- -; Copyright (C) 1992, 1994 Free Software Foundation, Inc. +;! Copyright (C) 1992, 1994 Free Software Foundation, Inc. -; This file is part of the GNU MP Library. +;! This file is part of the GNU MP Library. -; The GNU MP Library is free software; you can redistribute it and/or modify -; it under the terms of the GNU Library General Public License as published by -; the Free Software Foundation; either version 2 of the License, or (at your -; option) any later version. +;! The GNU MP Library is free software; you can redistribute it and/or modify +;! it under the terms of the GNU Library General Public License as published by +;! the Free Software Foundation; either version 2 of the License, or (at your +;! option) any later version. -; The GNU MP 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 Library General Public -; License for more details. +;! The GNU MP 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 Library General Public +;! License for more details. -; You should have received a copy of the GNU Library General Public License -; along with the GNU MP Library; see the file COPYING.LIB. If not, write to -; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -; MA 02111-1307, USA. +;! You should have received a copy of the GNU Library General Public License +;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to +;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +;! MA 02111-1307, USA. -; INPUT PARAMETERS -; res_ptr gr26 -; s_ptr gr25 -; size gr24 -; cnt gr23 +;! INPUT PARAMETERS +;! res_ptr gr26 +;! s_ptr gr25 +;! size gr24 +;! cnt gr23 - .code + .text .export __mpn_lshift -__mpn_lshift +__mpn_lshift: .proc .callinfo frame=64,no_calls .entry @@ -39,12 +39,12 @@ __mpn_lshift subi 32,%r23,%r1 mtsar %r1 addib,= -1,%r24,L$0004 - vshd %r0,%r22,%r28 ; compute carry out limb + vshd %r0,%r22,%r28 ;! compute carry out limb ldws,mb -4(0,%r25),%r29 addib,= -1,%r24,L$0002 vshd %r22,%r29,%r20 -L$loop ldws,mb -4(0,%r25),%r22 +L$loop: ldws,mb -4(0,%r25),%r22 stws,mb %r20,-4(0,%r26) addib,= -1,%r24,L$0003 vshd %r29,%r22,%r20 @@ -53,12 +53,12 @@ L$loop ldws,mb -4(0,%r25),%r22 addib,<> -1,%r24,L$loop vshd %r22,%r29,%r20 -L$0002 stws,mb %r20,-4(0,%r26) +L$0002: stws,mb %r20,-4(0,%r26) vshd %r29,%r0,%r20 bv 0(%r2) stw %r20,-4(0,%r26) -L$0003 stws,mb %r20,-4(0,%r26) -L$0004 vshd %r22,%r0,%r20 +L$0003: stws,mb %r20,-4(0,%r26) +L$0004: vshd %r22,%r0,%r20 bv 0(%r2) stw %r20,-4(0,%r26) diff --git a/sysdeps/hppa/rshift.s b/sysdeps/hppa/rshift.s index c1480e5abf..bba60cf2c4 100644 --- a/sysdeps/hppa/rshift.s +++ b/sysdeps/hppa/rshift.s @@ -1,34 +1,34 @@ -; HP-PA __mpn_rshift -- +;! HP-PA __mpn_rshift -- -; Copyright (C) 1992, 1994 Free Software Foundation, Inc. +;! Copyright (C) 1992, 1994 Free Software Foundation, Inc. -; This file is part of the GNU MP Library. +;! This file is part of the GNU MP Library. -; The GNU MP Library is free software; you can redistribute it and/or modify -; it under the terms of the GNU Library General Public License as published by -; the Free Software Foundation; either version 2 of the License, or (at your -; option) any later version. +;! The GNU MP Library is free software; you can redistribute it and/or modify +;! it under the terms of the GNU Library General Public License as published by +;! the Free Software Foundation; either version 2 of the License, or (at your +;! option) any later version. -; The GNU MP 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 Library General Public -; License for more details. +;! The GNU MP 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 Library General Public +;! License for more details. -; You should have received a copy of the GNU Library General Public License -; along with the GNU MP Library; see the file COPYING.LIB. If not, write to -; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -; MA 02111-1307, USA. +;! You should have received a copy of the GNU Library General Public License +;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to +;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +;! MA 02111-1307, USA. -; INPUT PARAMETERS -; res_ptr gr26 -; s_ptr gr25 -; size gr24 -; cnt gr23 +;! INPUT PARAMETERS +;! res_ptr gr26 +;! s_ptr gr25 +;! size gr24 +;! cnt gr23 - .code + .text .export __mpn_rshift -__mpn_rshift +__mpn_rshift: .proc .callinfo frame=64,no_calls .entry @@ -36,12 +36,12 @@ __mpn_rshift ldws,ma 4(0,%r25),%r22 mtsar %r23 addib,= -1,%r24,L$0004 - vshd %r22,%r0,%r28 ; compute carry out limb + vshd %r22,%r0,%r28 ;! compute carry out limb ldws,ma 4(0,%r25),%r29 addib,= -1,%r24,L$0002 vshd %r29,%r22,%r20 -L$loop ldws,ma 4(0,%r25),%r22 +L$loop: ldws,ma 4(0,%r25),%r22 stws,ma %r20,4(0,%r26) addib,= -1,%r24,L$0003 vshd %r22,%r29,%r20 @@ -50,12 +50,12 @@ L$loop ldws,ma 4(0,%r25),%r22 addib,<> -1,%r24,L$loop vshd %r29,%r22,%r20 -L$0002 stws,ma %r20,4(0,%r26) +L$0002: stws,ma %r20,4(0,%r26) vshd %r0,%r29,%r20 bv 0(%r2) stw %r20,0(0,%r26) -L$0003 stws,ma %r20,4(0,%r26) -L$0004 vshd %r0,%r22,%r20 +L$0003: stws,ma %r20,4(0,%r26) +L$0004: vshd %r0,%r22,%r20 bv 0(%r2) stw %r20,0(0,%r26) diff --git a/sysdeps/hppa/sub_n.s b/sysdeps/hppa/sub_n.s index 04fa3e1e33..b50bb11e51 100644 --- a/sysdeps/hppa/sub_n.s +++ b/sysdeps/hppa/sub_n.s @@ -1,56 +1,56 @@ -; HP-PA __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and -; store difference in a third limb vector. +;! HP-PA __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and +;! store difference in a third limb vector. -; Copyright (C) 1992, 1994 Free Software Foundation, Inc. +;! Copyright (C) 1992, 1994 Free Software Foundation, Inc. -; This file is part of the GNU MP Library. +;! This file is part of the GNU MP Library. -; The GNU MP Library is free software; you can redistribute it and/or modify -; it under the terms of the GNU Library General Public License as published by -; the Free Software Foundation; either version 2 of the License, or (at your -; option) any later version. +;! The GNU MP Library is free software; you can redistribute it and/or modify +;! it under the terms of the GNU Library General Public License as published by +;! the Free Software Foundation; either version 2 of the License, or (at your +;! option) any later version. -; The GNU MP 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 Library General Public -; License for more details. +;! The GNU MP 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 Library General Public +;! License for more details. -; You should have received a copy of the GNU Library General Public License -; along with the GNU MP Library; see the file COPYING.LIB. If not, write to -; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -; MA 02111-1307, USA. +;! You should have received a copy of the GNU Library General Public License +;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to +;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +;! MA 02111-1307, USA. -; INPUT PARAMETERS -; res_ptr gr26 -; s1_ptr gr25 -; s2_ptr gr24 -; size gr23 +;! INPUT PARAMETERS +;! res_ptr gr26 +;! s1_ptr gr25 +;! s2_ptr gr24 +;! size gr23 -; One might want to unroll this as for other processors, but it turns -; out that the data cache contention after a store makes such -; unrolling useless. We can't come under 5 cycles/limb anyway. +;! One might want to unroll this as for other processors, but it turns +;! out that the data cache contention after a store makes such +;! unrolling useless. We can't come under 5 cycles/limb anyway. - .code + .text .export __mpn_sub_n -__mpn_sub_n +__mpn_sub_n: .proc .callinfo frame=0,no_calls .entry - ldws,ma 4(0,%r25),%r20 - ldws,ma 4(0,%r24),%r19 + ldws,ma 4(0,%r25),%r21 + ldws,ma 4(0,%r24),%r20 - addib,= -1,%r23,L$end ; check for (SIZE == 1) - sub %r20,%r19,%r28 ; subtract first limbs ignoring cy + addib,= -1,%r23,L$end ;! check for (SIZE == 1) + sub %r21,%r20,%r28 ;! subtract first limbs ignoring cy -L$loop ldws,ma 4(0,%r25),%r20 - ldws,ma 4(0,%r24),%r19 +L$loop: ldws,ma 4(0,%r25),%r21 + ldws,ma 4(0,%r24),%r20 stws,ma %r28,4(0,%r26) addib,<> -1,%r23,L$loop - subb %r20,%r19,%r28 + subb %r21,%r20,%r28 -L$end stws %r28,0(0,%r26) +L$end: stws %r28,0(0,%r26) addc %r0,%r0,%r28 bv 0(%r2) subi 1,%r28,%r28 diff --git a/sysdeps/hppa/udiv_qrnnd.s b/sysdeps/hppa/udiv_qrnnd.s index 9b45eb40df..053205720b 100644 --- a/sysdeps/hppa/udiv_qrnnd.s +++ b/sysdeps/hppa/udiv_qrnnd.s @@ -1,45 +1,45 @@ -; HP-PA __udiv_qrnnd division support, used from longlong.h. -; This version runs fast on pre-PA7000 CPUs. +;! HP-PA __udiv_qrnnd division support, used from longlong.h. +;! This version runs fast on pre-PA7000 CPUs. -; Copyright (C) 1993, 1994 Free Software Foundation, Inc. +;! Copyright (C) 1993, 1994 Free Software Foundation, Inc. -; This file is part of the GNU MP Library. +;! This file is part of the GNU MP Library. -; The GNU MP Library is free software; you can redistribute it and/or modify -; it under the terms of the GNU Library General Public License as published by -; the Free Software Foundation; either version 2 of the License, or (at your -; option) any later version. +;! The GNU MP Library is free software; you can redistribute it and/or modify +;! it under the terms of the GNU Library General Public License as published by +;! the Free Software Foundation; either version 2 of the License, or (at your +;! option) any later version. -; The GNU MP 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 Library General Public -; License for more details. +;! The GNU MP 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 Library General Public +;! License for more details. -; You should have received a copy of the GNU Library General Public License -; along with the GNU MP Library; see the file COPYING.LIB. If not, write to -; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -; MA 02111-1307, USA. +;! You should have received a copy of the GNU Library General Public License +;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to +;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +;! MA 02111-1307, USA. -; INPUT PARAMETERS -; rem_ptr gr26 -; n1 gr25 -; n0 gr24 -; d gr23 +;! INPUT PARAMETERS +;! rem_ptr gr26 +;! n1 gr25 +;! n0 gr24 +;! d gr23 -; The code size is a bit excessive. We could merge the last two ds;addc -; sequences by simply moving the "bb,< Odd" instruction down. The only -; trouble is the FFFFFFFF code that would need some hacking. +;! The code size is a bit excessive. We could merge the last two ds;addc +;! sequences by simply moving the "bb,< Odd" instruction down. The only +;! trouble is the FFFFFFFF code that would need some hacking. - .code + .text .export __udiv_qrnnd -__udiv_qrnnd +__udiv_qrnnd: .proc .callinfo frame=0,no_calls .entry comb,< %r23,0,L$largedivisor - sub %r0,%r23,%r1 ; clear cy as side-effect + sub %r0,%r23,%r1 ;! clear cy as side-effect ds %r0,%r1,%r0 addc %r24,%r24,%r24 ds %r25,%r23,%r25 @@ -111,12 +111,12 @@ __udiv_qrnnd bv 0(%r2) addc %r28,%r28,%r28 -L$largedivisor - extru %r24,31,1,%r19 ; r19 = n0 & 1 +L$largedivisor: + extru %r24,31,1,%r20 ;! r20 = n0 & 1 bb,< %r23,31,L$odd - extru %r23,30,31,%r22 ; r22 = d >> 1 - shd %r25,%r24,1,%r24 ; r24 = new n0 - extru %r25,30,31,%r25 ; r25 = new n1 + extru %r23,30,31,%r22 ;! r22 = d >> 1 + shd %r25,%r24,1,%r24 ;! r24 = new n0 + extru %r25,30,31,%r25 ;! r25 = new n1 sub %r0,%r22,%r21 ds %r0,%r21,%r0 addc %r24,%r24,%r24 @@ -185,14 +185,14 @@ L$largedivisor ds %r25,%r22,%r25 comclr,>= %r25,%r0,%r0 addl %r25,%r22,%r25 - sh1addl %r25,%r19,%r25 + sh1addl %r25,%r20,%r25 stws %r25,0(0,%r26) bv 0(%r2) addc %r24,%r24,%r28 -L$odd addib,sv,n 1,%r22,L$FF.. ; r22 = (d / 2 + 1) - shd %r25,%r24,1,%r24 ; r24 = new n0 - extru %r25,30,31,%r25 ; r25 = new n1 +L$odd: addib,sv,n 1,%r22,L$FF.. ;! r22 = (d / 2 + 1) + shd %r25,%r24,1,%r24 ;! r24 = new n0 + extru %r25,30,31,%r25 ;! r25 = new n1 sub %r0,%r22,%r21 ds %r0,%r21,%r0 addc %r24,%r24,%r24 @@ -262,8 +262,8 @@ L$odd addib,sv,n 1,%r22,L$FF.. ; r22 = (d / 2 + 1) addc %r24,%r24,%r28 comclr,>= %r25,%r0,%r0 addl %r25,%r22,%r25 - sh1addl %r25,%r19,%r25 -; We have computed (n1,,n0) / (d + 1), q' = r28, r' = r25 + sh1addl %r25,%r20,%r25 +;! We have computed (n1,,n0) / (d + 1), q' = r28, r' = r25 add,nuv %r28,%r25,%r25 addl %r25,%r1,%r25 addc %r0,%r28,%r28 @@ -273,9 +273,9 @@ L$odd addib,sv,n 1,%r22,L$FF.. ; r22 = (d / 2 + 1) bv 0(%r2) addc %r0,%r28,%r28 -; This is just a special case of the code above. -; We come here when d == 0xFFFFFFFF -L$FF.. add,uv %r25,%r24,%r24 +;! This is just a special case of the code above. +;! We come here when d == 0xFFFFFFFF +L$FF..: add,uv %r25,%r24,%r24 sub,<< %r24,%r23,%r0 ldo 1(%r24),%r24 stws %r24,0(0,%r26) From 1ca92d75ff2e082d746051583398453d08d6e28a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:24:14 +0000 Subject: [PATCH 2279/4487] Add support for ASM_LINE_SEP. --- sysdeps/hppa/sysdep.h | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/sysdeps/hppa/sysdep.h b/sysdeps/hppa/sysdep.h index 735882da09..2ac9840355 100644 --- a/sysdeps/hppa/sysdep.h +++ b/sysdeps/hppa/sysdep.h @@ -20,6 +20,11 @@ #include #include +#include "config.h" + +#ifndef ASM_LINE_SEP +#define ASM_LINE_SEP ; +#endif #ifdef __ASSEMBLER__ @@ -34,13 +39,12 @@ incomplete stabs information. Fake some entries here which specify the current source file. */ #define ENTRY(name) \ - .SPACE $TEXT$; \ - .SUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY; \ - .align ALIGNARG(4); \ - .NSUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY; \ - .EXPORT C_SYMBOL_NAME(name),ENTRY,PRIV_LEV=3,ARGW0=GR,RTNVAL=GR; \ + .SPACE $TEXT$ ASM_LINE_SEP \ + .SUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY ASM_LINE_SEP \ + .align ALIGNARG(4) ASM_LINE_SEP \ + .NSUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY ASM_LINE_SEP \ + .EXPORT C_SYMBOL_NAME(name),ENTRY,PRIV_LEV=3,ARGW0=GR,RTNVAL=GR ASM_LINE_SEP\ C_LABEL(name) \ - CALL_MCOUNT #undef END @@ -53,7 +57,7 @@ /* The mcount code relies on a normal frame pointer being on the stack to locate our caller, so push one just for its benefit. */ #define CALL_MCOUNT \ - XXX + XXX ASM_LINE_SEP #else #define CALL_MCOUNT /* Do nothing. */ #endif From 0edd90f64519cdfe568cd3121469f3937cff9444 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:24:40 +0000 Subject: [PATCH 2280/4487] HP/PA specific setjmp implementation. --- sysdeps/hppa/setjmp.S | 69 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 sysdeps/hppa/setjmp.S diff --git a/sysdeps/hppa/setjmp.S b/sysdeps/hppa/setjmp.S new file mode 100644 index 0000000000..0890975b88 --- /dev/null +++ b/sysdeps/hppa/setjmp.S @@ -0,0 +1,69 @@ +/* setjmp for HPPA. + Copyright (C) 1995, 1996, 1997, 1999 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#define _ASM +#define _SETJMP_H +#include + + + .text + .align 4 + .import __sigjmp_save, code + .globl __sigsetjmp + .export __sigsetjmp, code + .proc + .callinfo +__sigsetjmp: + stw %r3, 0(%r26) + stw %r4, 8(%r26) + stw %r5, 12(%r26) + stw %r6, 16(%r26) + stw %r7, 20(%r26) + stw %r8, 24(%r26) + stw %r9, 28(%r26) + stw %r10, 32(%r26) + stw %r11, 36(%r26) + stw %r12, 40(%r26) + stw %r13, 44(%r26) + stw %r14, 48(%r26) + stw %r15, 52(%r26) + stw %r16, 56(%r26) + stw %r17, 60(%r26) + stw %r18, 64(%r26) + stw %r19, 68(%r26) + stw %r27, 72(%r26) + stw %r30, 76(%r26) + + stw %rp, 80(%r26) + + ldo 88(%r26),%r19 + fstds,ma %fr12, 8(%r19) /* 88 */ + fstds,ma %fr13, 8(%r19) /* 96 */ + fstds,ma %fr14, 8(%r19) /* 104 */ + fstds,ma %fr15, 8(%r19) /* 112 */ + fstds,ma %fr16, 8(%r19) /* 120 */ + fstds,ma %fr17, 8(%r19) /* 128 */ + fstds,ma %fr18, 8(%r19) /* 136 */ + fstds,ma %fr19, 8(%r19) /* 144 */ + fstds,ma %fr20, 8(%r19) /* 152 */ + fstds %fr21, 0(%r19) /* 160 */ + b __sigjmp_save + nop + .procend From a4f4ba75e9541cdacc024a13f9528011f13bb07e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:24:53 +0000 Subject: [PATCH 2281/4487] HP/PA specific memusage definitions. --- sysdeps/hppa/memusage.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 sysdeps/hppa/memusage.h diff --git a/sysdeps/hppa/memusage.h b/sysdeps/hppa/memusage.h new file mode 100644 index 0000000000..5a06b7b656 --- /dev/null +++ b/sysdeps/hppa/memusage.h @@ -0,0 +1,22 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#define GETSP() ({ register uintptr_t stack_ptr asm ("%r30"); stack_ptr; }) +#define STACK_GROWS_UPWARD 1 + +#include From c6d53d276edfa59a71808f64439a7d85510ebfc9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:25:11 +0000 Subject: [PATCH 2282/4487] HP/PA specific setjmp header definitions. --- sysdeps/hppa/bits/setjmp.h | 41 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 sysdeps/hppa/bits/setjmp.h diff --git a/sysdeps/hppa/bits/setjmp.h b/sysdeps/hppa/bits/setjmp.h new file mode 100644 index 0000000000..f72cdb5d86 --- /dev/null +++ b/sysdeps/hppa/bits/setjmp.h @@ -0,0 +1,41 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* Define the machine-dependent type `jmp_buf'. HPPA version. */ + +#ifndef _SETJMP_H +# error "Never include directly; use instead." +#endif + +/* The previous bits/setjmp.h had __jmp_buf defined as a structure. + We use an array of 'double' instead, to make writing the assembler + easier, and to ensure proper alignment. Naturally, user code should + not depend on either representation. */ + +#if defined __USE_MISC || defined _ASM +#define JB_SP (76/4) +#endif + +#ifndef _ASM +typedef double __jmp_buf[21]; +#endif + +/* Test if longjmp to JMPBUF would unwind the frame containing a local + variable at ADDRESS. */ +#define _JMPBUF_UNWINDS(_jmpbuf, _address) \ + ((void *)(_address) > (void *)(((unsigned long *) _jmpbuf)[JB_SP])) From 06fbf18c58ac2a4cb908928fe377e884cb599900 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:25:29 +0000 Subject: [PATCH 2283/4487] Additional directories for HPPA1.1 machines. --- sysdeps/hppa/hppa1.1/Implies | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 sysdeps/hppa/hppa1.1/Implies diff --git a/sysdeps/hppa/hppa1.1/Implies b/sysdeps/hppa/hppa1.1/Implies new file mode 100644 index 0000000000..5f935a299c --- /dev/null +++ b/sysdeps/hppa/hppa1.1/Implies @@ -0,0 +1,4 @@ +wordsize-32 +ieee754/flt-32 +ieee754/dbl-64 +ieee754/ldbl-128 From b8829d504f61bf736244a1c455b14dbf8961cdec Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:25:52 +0000 Subject: [PATCH 2284/4487] Linux/HPPA specific Makefile. --- sysdeps/unix/sysv/linux/hppa/Makefile | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/hppa/Makefile diff --git a/sysdeps/unix/sysv/linux/hppa/Makefile b/sysdeps/unix/sysv/linux/hppa/Makefile new file mode 100644 index 0000000000..1c93ec52d9 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/Makefile @@ -0,0 +1,2 @@ +# linux/hppa does not use -lmilli anymore +gnulib := -lgcc From 6d9ee983177f45c0a7e316b9c1170b54e3ed114f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:26:01 +0000 Subject: [PATCH 2285/4487] Linux/HPPA specific Versions. --- sysdeps/unix/sysv/linux/hppa/Versions | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/hppa/Versions diff --git a/sysdeps/unix/sysv/linux/hppa/Versions b/sysdeps/unix/sysv/linux/hppa/Versions new file mode 100644 index 0000000000..475fbe1721 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/Versions @@ -0,0 +1,6 @@ +libc { + GLIBC_2.2 { + # New rlimit interface + getrlimit; setrlimit; getrlimit64; setrlimit64; + } +} \ No newline at end of file From 2d9665cddcc379d0dd2deadbf82375baed08f0f3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:26:10 +0000 Subject: [PATCH 2286/4487] Linux/HPPA specific brk implementation. --- sysdeps/unix/sysv/linux/hppa/brk.c | 47 ++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/hppa/brk.c diff --git a/sysdeps/unix/sysv/linux/hppa/brk.c b/sysdeps/unix/sysv/linux/hppa/brk.c new file mode 100644 index 0000000000..9ed6c4f1f7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/brk.c @@ -0,0 +1,47 @@ +/* brk system call for Linux/i386. + Copyright (C) 1995, 1996 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include + +/* This must be initialized data because commons can't have aliases. */ +void *__curbrk = 0; + +/* Old braindamage in GCC's crtstuff.c requires this symbol in an attempt + to work around different old braindamage in the old Linux ELF dynamic + linker. */ +weak_alias (__curbrk, ___brk_addr) + +int +__brk (void *addr) +{ + void *newbrk, *scratch; + + __curbrk = newbrk = INLINE_SYSCALL(brk, 1, addr); + + if (newbrk < addr) + { + __set_errno (ENOMEM); + return -1; + } + + return 0; +} +weak_alias (__brk, brk) From b35e240743eed04486e401463ef4abce5b93e5f9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:26:18 +0000 Subject: [PATCH 2287/4487] Linux/HPPA specific clone implementation. --- sysdeps/unix/sysv/linux/hppa/clone.S | 82 ++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/hppa/clone.S diff --git a/sysdeps/unix/sysv/linux/hppa/clone.S b/sysdeps/unix/sysv/linux/hppa/clone.S new file mode 100644 index 0000000000..510e0ff799 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/clone.S @@ -0,0 +1,82 @@ +/* Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Huggins-Daines , 2000. + Based on the Alpha version by Richard Henderson , 1996. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* clone() is even more special than fork() as it mucks with stacks + and invokes a function in the right context after its all over. */ + +#include +#include +#define _ERRNO_H 1 +#include + +/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg) */ + + .text +ENTRY(__clone) + /* FIXME: I have no idea how profiling works on hppa. */ + + /* Sanity check arguments. */ + comib,<> 0,%arg0,.Lerror /* no NULL function pointers */ + ldi EINVAL,%ret0 + comib,<> 0,%arg1,.Lerror /* no NULL stack pointers */ + nop + + /* Save the fn ptr and arg on the new stack. */ + stwm %arg3,64(%arg1) + stw %arg3,-60(%arg1) + + /* Do the system call */ + copy %arg2,%arg0 + ble 0x100(%sr7,%r0) + ldi __NR_clone,%r20 + + ldi -4096,%r1 + comclr,>>= %r1,%ret0,%r0 /* Note: unsigned compare. */ + b,n .Lerror + + comib,=,n 0,%ret0,thread_start + + /* Successful return from the parent */ + bv %r0(%rp) + nop + + /* Something bad happened -- no child created */ +.Lerror: + b __syscall_error + nop + +thread_start: + /* Load up the arguments. */ + ldw -60(%sp),%arg0 + ldwm -64(%sp),%r22 + + /* Call the user's function */ + bl $$dyncall,%r31 + copy %r31,%rp + + bl _exit,%rp + copy %ret0,%arg0 + + /* Die horribly. */ + iitlbp %r0,(%r0) + +PSEUDO_END(__clone) + +weak_alias(__clone, clone) From f0fb7e01e5ff987a859a19b7ef1791b9796fca77 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:26:27 +0000 Subject: [PATCH 2288/4487] Linux/HPPA specific getrlimit implementation. --- sysdeps/unix/sysv/linux/hppa/getrlimit.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/hppa/getrlimit.c diff --git a/sysdeps/unix/sysv/linux/hppa/getrlimit.c b/sysdeps/unix/sysv/linux/hppa/getrlimit.c new file mode 100644 index 0000000000..fc06dbd641 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/getrlimit.c @@ -0,0 +1 @@ +#include From 18a940ad384c2c9fb22a9e2feb840f50cc40f54c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:26:34 +0000 Subject: [PATCH 2289/4487] Linux/HPPA specific getrlimit64 implementation. --- sysdeps/unix/sysv/linux/hppa/getrlimit64.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/hppa/getrlimit64.c diff --git a/sysdeps/unix/sysv/linux/hppa/getrlimit64.c b/sysdeps/unix/sysv/linux/hppa/getrlimit64.c new file mode 100644 index 0000000000..fef018f471 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/getrlimit64.c @@ -0,0 +1 @@ +#include From 3a13cef1c25fba6dad61223cdc799dbb3065d744 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:26:50 +0000 Subject: [PATCH 2290/4487] Linux/HPPA kernel specific sigaction definitions. --- .../unix/sysv/linux/hppa/kernel_sigaction.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/hppa/kernel_sigaction.h diff --git a/sysdeps/unix/sysv/linux/hppa/kernel_sigaction.h b/sysdeps/unix/sysv/linux/hppa/kernel_sigaction.h new file mode 100644 index 0000000000..af048cbe7d --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/kernel_sigaction.h @@ -0,0 +1,18 @@ +/* We have a separate header file here because we do not support + SA_RESTORER on hppa. */ + +/* This is the sigaction struction from the Linux 2.1.20 kernel. */ +/* Blah. This is bogus. We don't ever use it. */ +struct old_kernel_sigaction { + __sighandler_t k_sa_handler; + unsigned long sa_mask; + unsigned long sa_flags; +}; + +/* This is the sigaction structure from the Linux 2.1.68 kernel. */ + +struct kernel_sigaction { + __sighandler_t k_sa_handler; + unsigned long sa_flags; + sigset_t sa_mask; +}; From f67381e6d5ad0b4f3bc0715a56183c4fb11c17fc Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:26:58 +0000 Subject: [PATCH 2291/4487] Linux/HPPA kernel specific stat definitions. --- sysdeps/unix/sysv/linux/hppa/kernel_stat.h | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/hppa/kernel_stat.h diff --git a/sysdeps/unix/sysv/linux/hppa/kernel_stat.h b/sysdeps/unix/sysv/linux/hppa/kernel_stat.h new file mode 100644 index 0000000000..a1fa3779a8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/kernel_stat.h @@ -0,0 +1,32 @@ +/* definition of "struct stat" from the kernel */ +struct kernel_stat { + unsigned long st_dev; /* dev_t is 32 bits on parisc */ + unsigned long st_ino; /* 32 bits */ + unsigned short st_mode; /* 16 bits */ + unsigned short st_nlink; /* 16 bits */ + unsigned short st_reserved1; /* old st_uid */ + unsigned short st_reserved2; /* old st_gid */ + unsigned long st_rdev; + unsigned long st_size; + unsigned long st_atime; + unsigned long st_spare1; + unsigned long st_mtime; + unsigned long st_spare2; + unsigned long st_ctime; + unsigned long st_spare3; + long st_blksize; + long st_blocks; + unsigned long __unused1; /* ACL stuff */ + unsigned long __unused2; /* network */ + unsigned long __unused3; /* network */ + unsigned long __unused4; /* cnodes */ + unsigned short __unused5; /* netsite */ + short st_fstype; + unsigned long st_realdev; + unsigned short st_basemode; + unsigned short st_spareshort; + unsigned long st_uid; + unsigned long st_gid; + unsigned long st_spare4[3]; +}; + From e4dccb0b6a1cf0b07b90830530bf88e589a7d065 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:27:14 +0000 Subject: [PATCH 2292/4487] Linux/HPPA specific mmap implementation. --- sysdeps/unix/sysv/linux/hppa/mmap.c | 50 +++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/hppa/mmap.c diff --git a/sysdeps/unix/sysv/linux/hppa/mmap.c b/sysdeps/unix/sysv/linux/hppa/mmap.c new file mode 100644 index 0000000000..333d848c0d --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/mmap.c @@ -0,0 +1,50 @@ +/* Copyright (C) 1994, 1995, 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include + +/* Map addresses starting near ADDR and extending for LEN bytes. From + OFFSET into the file FD describes according to PROT and FLAGS. If ADDR + is nonzero, it is the desired mapping address. If the MAP_FIXED bit is + set in FLAGS, the mapping will be at ADDR exactly (which must be + page-aligned); otherwise the system chooses a convenient nearby address. + The return value is the actual mapping address chosen or MAP_FAILED + for errors (in which case `errno' is set). A successful `mmap' call + deallocates any previous mapping for the affected region. */ + +#include + +__ptr_t +__mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset) +{ + + __ptr_t ret; + + ret = INLINE_SYSCALL(mmap, 6, addr, len, prot, flags, fd, offset); + + /* check if it's really a negative number */ + if(((unsigned long)ret & 0xfffff000) == 0xfffff000) + return MAP_FAILED; + + return ret; + +} + +strong_alias (__mmap, mmap) From b60369154c01d14b883aa92c70b2d9e0bf15aad1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:27:46 +0000 Subject: [PATCH 2293/4487] Linux/HPPA specific entry point for profiling. --- sysdeps/unix/sysv/linux/hppa/profil-counter.h | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/hppa/profil-counter.h diff --git a/sysdeps/unix/sysv/linux/hppa/profil-counter.h b/sysdeps/unix/sysv/linux/hppa/profil-counter.h new file mode 100644 index 0000000000..8a6a0bcf3d --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/profil-counter.h @@ -0,0 +1,2 @@ +/* We can use the ix86 version. */ +#include From 93309db87cd0e1cd7f421cff72bb054a13b806b2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:27:57 +0000 Subject: [PATCH 2294/4487] Linux/HPPA specific setrlimit implementation. --- sysdeps/unix/sysv/linux/hppa/setrlimit.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/hppa/setrlimit.c diff --git a/sysdeps/unix/sysv/linux/hppa/setrlimit.c b/sysdeps/unix/sysv/linux/hppa/setrlimit.c new file mode 100644 index 0000000000..bfaef74c38 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/setrlimit.c @@ -0,0 +1 @@ +#include From 7e61a792a4dee20664e395e0db19708b9d093629 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:28:06 +0000 Subject: [PATCH 2295/4487] Linux/HPPA specific socket implementation. --- sysdeps/unix/sysv/linux/hppa/socket.S | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/hppa/socket.S diff --git a/sysdeps/unix/sysv/linux/hppa/socket.S b/sysdeps/unix/sysv/linux/hppa/socket.S new file mode 100644 index 0000000000..dfbb721a82 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/socket.S @@ -0,0 +1,10 @@ +#include + + .globl __socket +PSEUDO(__socket, socket, 3) + +PSEUDO_END(__socket) + +#ifndef NO_WEAK_ALIAS +weak_alias (__socket, socket) +#endif From 6357ebdf00f03552ff09e697284891be297d0cb1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:28:15 +0000 Subject: [PATCH 2296/4487] Linux/HPPA specific syscall implementation. --- sysdeps/unix/sysv/linux/hppa/syscall.S | 28 ++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/hppa/syscall.S diff --git a/sysdeps/unix/sysv/linux/hppa/syscall.S b/sysdeps/unix/sysv/linux/hppa/syscall.S new file mode 100644 index 0000000000..413c572c34 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/syscall.S @@ -0,0 +1,28 @@ +/* Copyright (C) 1995, 1996, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +/* Please consult the file sysdeps/unix/sysv/linux/i386/sysdep.h for + more information about the value -4095 used below.*/ + + .text +ENTRY (syscall) + b . + nop + From 19cf2cc288eefa1bf935b7b69f324ac15b5e67d3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:28:22 +0000 Subject: [PATCH 2297/4487] Linux/HPPA specific syscall list. --- sysdeps/unix/sysv/linux/hppa/syscalls.list | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/hppa/syscalls.list diff --git a/sysdeps/unix/sysv/linux/hppa/syscalls.list b/sysdeps/unix/sysv/linux/hppa/syscalls.list new file mode 100644 index 0000000000..f0d6431abe --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/syscalls.list @@ -0,0 +1,39 @@ +# File name Caller Syscall name # args Strong name Weak names + +# semaphore and shm system calls +msgctl - msgctl i:iip __msgctl msgctl +msgget - msgget i:ii __msgget msgget +msgrcv - msgrcv i:ibnii __msgrcv msgrcv +msgsnd - msgsnd i:ibni __msgsnd msgsnd +shmat - shmat i:ipi __shmat shmat +shmctl - shmctl i:iip __shmctl shmctl +shmdt - shmdt i:s __shmdt shmdt +shmget - shmget i:iii __shmget shmget +semop - semop i:ipi __semop semop +semget - semget i:iii __semget semget +semctl - semctl i:iiii __semctl semctl + +# proper socket implementations: +accept - accept i:iBN __libc_accept __accept accept +bind - bind i:ipi __bind bind +connect - connect i:ipi __libc_connect __connect connect +getpeername - getpeername i:ipp __getpeername getpeername +getsockname - getsockname i:ipp __getsockname getsockname +getsockopt - getsockopt i:iiiBN __getsockopt getsockopt +listen - listen i:ii __listen listen +recv - recv i:ibni __libc_recv __recv recv +recvfrom - recvfrom i:ibniBN __libc_recvfrom __recvfrom recvfrom +recvmsg - recvmsg i:ipi __libc_recvmsg recvmsg +send - send i:ibni __libc_send __send send +sendmsg - sendmsg i:ipi __libc_sendmsg sendmsg +sendto - sendto i:ibnibn __libc_sendto __sendto sendto +setsockopt - setsockopt i:iiibn __setsockopt setsockopt +shutdown - shutdown i:ii __shutdown shutdown +socket - socket i:iii __socket socket +socketpair - socketpair i:iiif __socketpair socketpair + +ptrace - ptrace 4 __ptrace ptrace + +getresuid - getresuid i:ppp getresuid +getresgid - getresgid i:ppp getresgid + From a61e86b079f662333e5a6512ff0ecdf72a999826 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:28:38 +0000 Subject: [PATCH 2298/4487] Linux/HPPA specific low-level object definitions. --- sysdeps/unix/sysv/linux/hppa/sysdep.c | 34 +++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/hppa/sysdep.c diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.c b/sysdeps/unix/sysv/linux/hppa/sysdep.c new file mode 100644 index 0000000000..0559cc7065 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/sysdep.c @@ -0,0 +1,34 @@ +/* Copyright (C) 1997, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +/* This routine is jumped to by all the syscall handlers, to stash + an error number into errno. */ +int +__syscall_error (int err_no) +{ + __set_errno (err_no); + return -1; +} + +/* We also have to have a 'real' definition of errno. */ +#undef errno +int errno = 0; +weak_alias (errno, _errno) From a30ba90d2e9bec44a3a6f6e083f28b3104926f5a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:28:47 +0000 Subject: [PATCH 2299/4487] Linux/HPPA specific low-level definitions. --- sysdeps/unix/sysv/linux/hppa/sysdep.h | 242 ++++++++++++++++++++++++++ 1 file changed, 242 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/hppa/sysdep.h diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.h b/sysdeps/unix/sysv/linux/hppa/sysdep.h new file mode 100644 index 0000000000..73d9a38b1a --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/sysdep.h @@ -0,0 +1,242 @@ +/* Assembler macros for PA-RISC. + Copyright (C) 1999 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper, , August 1999. + Linux/PA-RISC changes by Philipp Rumpf, , March 2000. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include +#include "config.h" + +#ifndef ASM_LINE_SEP +#define ASM_LINE_SEP ; +#endif + +#undef SYS_ify +#define SYS_ify(syscall_name) (__NR_##syscall_name) + + +#ifdef __ASSEMBLER__ + +/* Syntactic details of assembler. */ + +#define ALIGNARG(log2) log2 + +/* For Linux we can use the system call table in the header file + /usr/include/asm/unistd.h + of the kernel. But these symbols do not follow the SYS_* syntax + so we have to redefine the `SYS_ify' macro here. */ +#undef SYS_ify +#define SYS_ify(syscall_name) __NR_##syscall_name + +/* ELF-like local names start with `.L'. */ +#undef L +#define L(name) .L##name + +/* Linux uses a negative return value to indicate syscall errors, + unlike most Unices, which use the condition codes' carry flag. + + Since version 2.1 the return value of a system call might be + negative even if the call succeeded. E.g., the `lseek' system call + might return a large offset. Therefore we must not anymore test + for < 0, but test for a real error by making sure the value in %eax + is a real error number. Linus said he will make sure the no syscall + returns a value in -1 .. -4095 as a valid result so we can safely + test with -4095. */ + +/* We don't want the label for the error handle to be global when we define + it here. */ +#ifdef PIC +# define SYSCALL_ERROR_LABEL 0f +#else +# define SYSCALL_ERROR_LABEL syscall_error +#endif + +/* Define an entry point visible from C. + + There is currently a bug in gdb which prevents us from specifying + incomplete stabs information. Fake some entries here which specify + the current source file. */ +#define ENTRY(name) \ + .text ASM_LINE_SEP \ + .export C_SYMBOL_NAME(name) ASM_LINE_SEP \ + .type C_SYMBOL_NAME(name),@function ASM_LINE_SEP \ + C_LABEL(name) \ + CALL_MCOUNT + +#define ret \ + bv 0(2) ASM_LINE_SEP \ + nop + +#undef END +#define END(name) \ +1: .size C_SYMBOL_NAME(name),1b-C_SYMBOL_NAME(name) + +/* If compiled for profiling, call `mcount' at the start of each function. */ +#ifdef PROF +/* The mcount code relies on a normal frame pointer being on the stack + to locate our caller, so push one just for its benefit. */ +#define CALL_MCOUNT /* XXX */ +#else +#define CALL_MCOUNT /* Do nothing. */ +#endif + +/* syscall wrappers consist of + #include + PSEUDO(...) + ret + PSEUDO_END(...) + + which means + ENTRY(name) + DO_CALL(...) + nop + bv 0(2) + nop +*/ + +#define PSEUDO(name, syscall_name, args) \ + ENTRY (name) \ + DO_CALL(args, syscall_name) ASM_LINE_SEP \ + nop + +#undef PSEUDO_END +#define PSEUDO_END(name) \ + END (name) + +#define JUMPTARGET(name) name +#define SYSCALL_PIC_SETUP /* Nothing. */ + +/* Linux takes system call arguments in registers: + syscall number gr20 + arg 1 gr26 + arg 2 gr25 + arg 3 gr24 + arg 4 gr23 + arg 5 gr22 + arg 6 gr21 + + The compiler calls us by the C convention: + syscall number in the DO_CALL macro + arg 1 gr26 + arg 2 gr25 + arg 3 gr24 + arg 4 gr23 + arg 5 -52(gr30) + arg 6 -56(gr30) + + gr22 and gr21 are caller-saves, so we can just load the arguments + there and generally be happy. */ + +/* the cmpb...no_error code below inside DO_CALL + * is intended to mimic the if (__sys_res...) + * code inside INLINE_SYSCALL + */ + +#undef DO_CALL +#define DO_CALL(args, syscall_name) \ + DOARGS_##args \ + ble 0x100(%sr2,%r0) ASM_LINE_SEP \ + ldi SYS_ify (syscall_name), %r20 ASM_LINE_SEP \ + ldi -0x1000,%r1 ASM_LINE_SEP \ + cmpb,>>=,n %r1,%ret0,0f ASM_LINE_SEP \ + stw %rp, -20(%sr0,%r30) ASM_LINE_SEP \ + stw %ret0, -24(%sr0,%r30) ASM_LINE_SEP \ + .import __errno_location,code ASM_LINE_SEP \ + bl __errno_location,%rp ASM_LINE_SEP \ + ldo 64(%r30), %r30 ASM_LINE_SEP \ + ldo -64(%r30), %r30 ASM_LINE_SEP \ + ldw -24(%r30), %r26 ASM_LINE_SEP \ + sub %r0, %r26, %r26 ASM_LINE_SEP \ + stw %r26, 0(%sr0,%ret0) ASM_LINE_SEP \ + ldo -1(%r0), %ret0 ASM_LINE_SEP \ + ldw -20(%r30), %rp ASM_LINE_SEP \ +0: ASM_LINE_SEP \ + UNDOARGS_##args + +#define DOARGS_0 /* nothing */ +#define DOARGS_1 /* nothing */ +#define DOARGS_2 /* nothing */ +#define DOARGS_3 /* nothing */ +#define DOARGS_4 /* nothing */ +#define DOARGS_5 ldw -52(%r30), %r22 ASM_LINE_SEP +#define DOARGS_6 ldw -52(%r30), %r22 ASM_LINE_SEP \ + ldw -56(%r30), %r21 ASM_LINE_SEP + + +#define UNDOARGS_0 /* nothing */ +#define UNDOARGS_1 /* nothing */ +#define UNDOARGS_2 /* nothing */ +#define UNDOARGS_3 /* nothing */ +#define UNDOARGS_4 /* nothing */ +#define UNDOARGS_5 /* nothing */ +#define UNDOARGS_6 /* nothing */ + +#else + +#undef INLINE_SYSCALL +#define INLINE_SYSCALL(name, nr, args...) ({ \ + unsigned long __sys_res; \ + { \ + register unsigned long __res asm("r28"); \ + LOAD_ARGS_##nr(args) \ + asm volatile( \ + "ble 0x100(%%sr2, %%r0)\n\t" \ + " ldi %1, %%r20" \ + : "=r" (__res) \ + : "i" (SYS_ify(name)) ASM_ARGS_##nr \ + ); \ + __sys_res = __res; \ + } \ + if (__sys_res >= (unsigned long)-4095) { \ + __set_errno(-__sys_res); \ + __sys_res == (unsigned long)-1; \ + } \ + __sys_res; \ +}) + +#define LOAD_ARGS_0() +#define LOAD_ARGS_1(r26) \ + register unsigned long __r26 __asm__("r26") = (unsigned long)r26; \ + LOAD_ARGS_0() +#define LOAD_ARGS_2(r26,r25) \ + register unsigned long __r25 __asm__("r25") = (unsigned long)r25; \ + LOAD_ARGS_1(r26) +#define LOAD_ARGS_3(r26,r25,r24) \ + register unsigned long __r24 __asm__("r24") = (unsigned long)r24; \ + LOAD_ARGS_2(r26,r25) +#define LOAD_ARGS_4(r26,r25,r24,r23) \ + register unsigned long __r23 __asm__("r23") = (unsigned long)r23; \ + LOAD_ARGS_3(r26,r25,r24) +#define LOAD_ARGS_5(r26,r25,r24,r23,r22) \ + register unsigned long __r22 __asm__("r22") = (unsigned long)r22; \ + LOAD_ARGS_4(r26,r25,r24,r23) +#define LOAD_ARGS_6(r26,r25,r24,r23,r22,r21) \ + register unsigned long __r21 __asm__("r21") = (unsigned long)r21; \ + LOAD_ARGS_5(r26,r25,r24,r23,r22) + +#define ASM_ARGS_0 +#define ASM_ARGS_1 , "r" (__r26) +#define ASM_ARGS_2 , "r" (__r26), "r" (__r25) +#define ASM_ARGS_3 , "r" (__r26), "r" (__r25), "r" (__r24) +#define ASM_ARGS_4 , "r" (__r26), "r" (__r25), "r" (__r24), "r" (__r23) +#define ASM_ARGS_5 , "r" (__r26), "r" (__r25), "r" (__r24), "r" (__r23), "r" (__r22) +#define ASM_ARGS_6 , "r" (__r26), "r" (__r25), "r" (__r24), "r" (__r23), "r" (__r22), "r" (__r21) + +#endif /* __ASSEMBLER__ */ From a22a888980dcaf66b61e8e89905ddda7bfe6bf17 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:28:55 +0000 Subject: [PATCH 2300/4487] Linux/HPPA specific umount definition. --- sysdeps/unix/sysv/linux/hppa/umount.c | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/hppa/umount.c diff --git a/sysdeps/unix/sysv/linux/hppa/umount.c b/sysdeps/unix/sysv/linux/hppa/umount.c new file mode 100644 index 0000000000..39cb251030 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/umount.c @@ -0,0 +1,9 @@ +/* since we don't have an oldumount system call, do what the kernel + does down here */ + +long __umount(char *name) +{ + return __umount2(name, 0); +} + +weak_alias(__umount, umount); From f7c460d411f0cd3ec14c001c1eab605d33894ed7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:29:10 +0000 Subject: [PATCH 2301/4487] Linux/HPPA specific fcntl definitions. --- sysdeps/unix/sysv/linux/hppa/bits/fcntl.h | 148 ++++++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/hppa/bits/fcntl.h diff --git a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h new file mode 100644 index 0000000000..687ffc8582 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h @@ -0,0 +1,148 @@ +/* O_*, F_*, FD_* bit values for Linux/HPPA. + Copyright (C) 1995-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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _FCNTL_H +# error "Never use directly; include instead." +#endif + +#include + + +/* open/fcntl - O_SYNC is only implemented on blocks devices and on files + located on an ext2 file system */ +#define O_RDONLY 00000000 +#define O_WRONLY 00000001 +#define O_RDWR 00000002 +#define O_ACCMODE 00000003 +#define O_APPEND 00000010 +#define O_BLKSEEK 00000100 /* HPUX only */ +#define O_CREAT 00000400 /* not fcntl */ +#define O_TRUNC 00001000 /* not fcntl */ +#define O_EXCL 00002000 /* not fcntl */ +#define O_ASYNC 00020000 +#define O_SYNC 00100000 +#define O_NONBLOCK 00200004 /* HPUX has separate NDELAY & NONBLOCK */ +#define O_NDELAY O_NONBLOCK +#define O_NOCTTY 00400000 /* not fcntl */ + + +#ifdef __USE_GNU +# define O_DIRECT 00040000 /* direct disk access hint - currently ignored */ +# define O_DIRECTORY 00010000 /* must be a directory */ +# define O_NOFOLLOW 00000200 /* don't follow links */ +#endif + +#ifdef __USE_LARGEFILE64 +# define O_LARGEFILE 00004000 +#endif + +#if defined __USE_POSIX199309 || defined __USE_UNIX98 +# define O_DSYNC 01000000 /* HPUX only */ +# define O_RSYNC 02000000 /* HPUX only */ +#endif + +/* Values for the second argument to `fcntl'. */ +#define F_DUPFD 0 /* Duplicate file descriptor. */ +#define F_GETFD 1 /* Get file descriptor flags. */ +#define F_SETFD 2 /* Set file descriptor flags. */ +#define F_GETFL 3 /* Get file status flags. */ +#define F_SETFL 4 /* Set file status flags. */ +#define F_GETLK 5 /* Get record locking info. */ +#define F_SETLK 6 /* Set record locking info (non-blocking). */ +#define F_SETLKW 7 /* Set record locking info (blocking). */ + +#define F_GETLK64 8 /* Get record locking info. */ +#define F_SETLK64 9 /* Set record locking info (non-blocking). */ +#define F_SETLKW64 10 /* Set record locking info (blocking). */ + +#if defined __USE_BSD || defined __USE_XOPEN2K +# define F_GETOWN 11 /* Get owner of socket (receiver of SIGIO). */ +# define F_SETOWN 12 /* Set owner of socket (receiver of SIGIO). */ +#endif + +#ifdef __USE_GNU +# define F_SETSIG 13 /* Set number of signal to be sent. */ +# define F_GETSIG 14 /* Get number of signal to be sent. */ +#endif + +/* for F_[GET|SET]FL */ +#define FD_CLOEXEC 1 /* actually anything with low bit set goes */ + +/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */ +#define F_RDLCK 1 /* Read lock. */ +#define F_WRLCK 2 /* Write lock. */ +#define F_UNLCK 3 /* Remove lock. */ + +/* for old implementation of bsd flock () */ +#define F_EXLCK 4 /* or 3 */ +#define F_SHLCK 8 /* or 4 */ + +#ifdef __USE_BSD +/* operations for bsd flock(), also used by the kernel implementation */ +# define LOCK_SH 1 /* shared lock */ +# define LOCK_EX 2 /* exclusive lock */ +# define LOCK_NB 4 /* or'd with one of the above to prevent + blocking */ +# define LOCK_UN 8 /* remove lock */ +#endif + +struct flock + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ +#ifndef __USE_FILE_OFFSET64 + __off_t l_start; /* Offset where the lock begins. */ + __off_t l_len; /* Size of the locked area; zero means until EOF. */ +#else + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ +#endif + __pid_t l_pid; /* Process holding the lock. */ + }; + +#ifdef __USE_LARGEFILE64 +struct flock64 + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ + __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. */ + }; +#endif + +/* Define some more compatibility macros to be backward compatible with + BSD systems which did not managed to hide these kernel macros. */ +#ifdef __USE_BSD +# define FAPPEND O_APPEND +# define FFSYNC O_FSYNC +# define FASYNC O_ASYNC +# define FNONBLOCK O_NONBLOCK +# define FNDELAY O_NDELAY +#endif /* Use BSD. */ + +/* Advise to `posix_fadvise'. */ +#ifdef __USE_XOPEN2K +# define POSIX_FADV_NORMAL 0 /* No further special treatment. */ +# define POSIX_FADV_RANDOM 1 /* Expect random page references. */ +# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */ +# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */ +# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ +#endif From 5b8483160d610b9b7e5729734da6cb114c00967d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:29:17 +0000 Subject: [PATCH 2302/4487] Linux/HPPA specific ioctl definitions. --- sysdeps/unix/sysv/linux/hppa/bits/ioctls.h | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/hppa/bits/ioctls.h diff --git a/sysdeps/unix/sysv/linux/hppa/bits/ioctls.h b/sysdeps/unix/sysv/linux/hppa/bits/ioctls.h new file mode 100644 index 0000000000..bad78b60e8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/bits/ioctls.h @@ -0,0 +1,37 @@ +/* Copyright (C) 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_IOCTL_H +# error "Never use directly; include instead." +#endif + +/* Use the definitions from the kernel header files. */ +#include + +/* Oh well, this is necessary since the kernel data structure is + different from the user-level version. */ +#undef TCGETS +#undef TCSETS +#undef TCSETSW +#undef TCSETSF +#define TCGETS _IOR ('T', 16, char[36]) +#define TCSETS _IOW ('T', 17, char[36]) +#define TCSETSW _IOW ('T', 18, char[36]) +#define TCSETSF _IOW ('T', 19, char[36]) + +#include From aed80203670e5ad274423ef3da67030384ef4f70 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:29:27 +0000 Subject: [PATCH 2303/4487] Linux/HPPA specific mman definitions. --- sysdeps/unix/sysv/linux/hppa/bits/mman.h | 61 ++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/hppa/bits/mman.h diff --git a/sysdeps/unix/sysv/linux/hppa/bits/mman.h b/sysdeps/unix/sysv/linux/hppa/bits/mman.h new file mode 100644 index 0000000000..78c0171fae --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/bits/mman.h @@ -0,0 +1,61 @@ +/* Definitions for POSIX memory map interface. Insert rest of disclaimer here */ + +#ifndef _SYS_MMAN_H +# error "Never use directly; include instead." +#endif + +/* these are basically taken from the kernel definitions */ + +#define PROT_READ 0x1 /* page can be read */ +#define PROT_WRITE 0x2 /* page can be written */ +#define PROT_EXEC 0x4 /* page can be executed */ +#define PROT_NONE 0x0 /* page can not be accessed */ + +#define MAP_SHARED 0x01 /* Share changes */ +#define MAP_PRIVATE 0x02 /* Changes are private */ +#define MAP_TYPE 0x03 /* Mask for type of mapping */ +#define MAP_FIXED 0x04 /* Interpret addr exactly */ +#define MAP_ANONYMOUS 0x10 /* don't use a file */ + +#define MAP_DENYWRITE 0x0800 /* ETXTBSY */ +#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ +#define MAP_LOCKED 0x2000 /* pages are locked */ +#define MAP_NORESERVE 0x4000 /* don't check for reservations */ +#define MAP_GROWSDOWN 0x8000 /* stack-like segment */ + +#define MS_SYNC 1 /* synchronous memory sync */ +#define MS_ASYNC 2 /* sync memory asynchronously */ +#define MS_INVALIDATE 4 /* invalidate the caches */ + +#define MCL_CURRENT 1 /* lock all current mappings */ +#define MCL_FUTURE 2 /* lock all future mappings */ + +#define MADV_NORMAL 0 /* no further special treatment */ +#define MADV_RANDOM 1 /* expect random page references */ +#define MADV_SEQUENTIAL 2 /* expect sequential page references */ +#define MADV_WILLNEED 3 /* will need these pages */ +#define MADV_DONTNEED 4 /* dont need these pages */ +#define MADV_SPACEAVAIL 5 /* insure that resources are reserved */ +#define MADV_VPS_PURGE 6 /* Purge pages from VM page cache */ +#define MADV_VPS_INHERIT 7 /* Inherit parents page size */ + +/* The range 12-64 is reserved for page size specification. */ +#define MADV_4K_PAGES 12 /* Use 4K pages */ +#define MADV_16K_PAGES 14 /* Use 16K pages */ +#define MADV_64K_PAGES 16 /* Use 64K pages */ +#define MADV_256K_PAGES 18 /* Use 256K pages */ +#define MADV_1M_PAGES 20 /* Use 1 Megabyte pages */ +#define MADV_4M_PAGES 22 /* Use 4 Megabyte pages */ +#define MADV_16M_PAGES 24 /* Use 16 Megabyte pages */ +#define MADV_64M_PAGES 26 /* Use 64 Megabyte pages */ + +/* compatibility flags */ +#define MAP_ANON MAP_ANONYMOUS +#define MAP_FILE 0 +#define MAP_VARIABLE 0 + +/* Flags for `mremap'. */ +#ifdef __USE_GNU +# define MREMAP_MAYMOVE 1 +#endif + From e7f6c890c33f3a251b733a4cd74e2c90bc3fef98 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:29:35 +0000 Subject: [PATCH 2304/4487] Linux/HPPA specific sigaction definitions. --- sysdeps/unix/sysv/linux/hppa/bits/sigaction.h | 75 +++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/hppa/bits/sigaction.h diff --git a/sysdeps/unix/sysv/linux/hppa/bits/sigaction.h b/sysdeps/unix/sysv/linux/hppa/bits/sigaction.h new file mode 100644 index 0000000000..cec71b294e --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/bits/sigaction.h @@ -0,0 +1,75 @@ +/* Definitions for Linux/hppa sigaction. + Copyright (C) 1996, 1997, 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SIGNAL_H +# error "Never include directly; use instead." +#endif + +/* Structure describing the action to be taken when a signal arrives. */ +struct sigaction + { + /* Signal handler. */ +#ifdef __USE_POSIX199309 + union + { + /* Used if SA_SIGINFO is not set. */ + __sighandler_t sa_handler; + /* Used if SA_SIGINFO is set. */ + void (*sa_sigaction) (int, siginfo_t *, void *); + } + __sigaction_handler; +# define sa_handler __sigaction_handler.sa_handler +# define sa_sigaction __sigaction_handler.sa_sigaction +#else + __sighandler_t sa_handler; +#endif + + /* Special flags. */ + unsigned long int sa_flags; + + /* Additional set of signals to be blocked. */ + __sigset_t sa_mask; + }; + +/* Bits in `sa_flags'. */ + +#define SA_NOCLDSTOP 0x00000008 /* Don't send SIGCHLD when children stop. */ +#define SA_NOCLDWAIT 0x00000080 /* Don't create zombie on child death. */ +#define SA_SIGINFO 0x00000010 /* Invoke signal-catching function with + three arguments instead of one. */ +#if defined __USE_UNIX98 || defined __USE_MISC +# define SA_ONSTACK 0x00000001 /* Use signal stack by using `sa_restorer'. */ +# define SA_RESETHAND 0x00000004 /* Reset to SIG_DFL on entry to handler. */ +# define SA_NODEFER 0x00000020 /* Don't automatically block the signal + when its handler is being executed. */ +# define SA_RESTART 0x00000040 /* Restart syscall on signal return. */ +#endif +#ifdef __USE_MISC +# define SA_INTERRUPT 0x20000000 /* Historic no-op. */ + +/* Some aliases for the SA_ constants. */ +# define SA_NOMASK SA_NODEFER +# define SA_ONESHOT SA_RESETHAND +# define SA_STACK SA_ONSTACK +#endif + +/* Values for the HOW argument to `sigprocmask'. */ +#define SIG_BLOCK 0 /* for blocking signals */ +#define SIG_UNBLOCK 1 /* for unblocking signals */ +#define SIG_SETMASK 2 /* for setting the signal mask */ From 58a36ea30395b857bbf9cb5a1da8ad46ab080f70 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:29:47 +0000 Subject: [PATCH 2305/4487] Linux/HPPA specific signal number definitions. --- sysdeps/unix/sysv/linux/hppa/bits/signum.h | 82 ++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/hppa/bits/signum.h diff --git a/sysdeps/unix/sysv/linux/hppa/bits/signum.h b/sysdeps/unix/sysv/linux/hppa/bits/signum.h new file mode 100644 index 0000000000..45ed06ae14 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/bits/signum.h @@ -0,0 +1,82 @@ +/* Signal number definitions. Linux version. + Copyright (C) 1995, 1996, 1997, 1998, 1999 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifdef _SIGNAL_H + +/* Fake signal functions. */ +#define SIG_ERR ((__sighandler_t) -1) /* Error return. */ +#define SIG_DFL ((__sighandler_t) 0) /* Default action. */ +#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */ + +#ifdef __USE_UNIX98 +# define SIG_HOLD ((__sighandler_t) 2) /* Add signal to hold mask. */ +#endif + + +/* Signals. */ +#define SIGHUP 1 /* Hangup (POSIX). */ +#define SIGINT 2 /* Interrupt (ANSI). */ +#define SIGQUIT 3 /* Quit (POSIX). */ +#define SIGILL 4 /* Illegal instruction (ANSI). */ +#define SIGTRAP 5 /* Trace trap (POSIX). */ +#define SIGABRT 6 /* Abort (ANSI). */ +#define SIGIOT 6 /* IOT trap (4.2 BSD). */ +#define SIGEMT 7 +#define SIGFPE 8 /* Floating-point exception (ANSI). */ +#define SIGKILL 9 /* Kill, unblockable (POSIX). */ +#define SIGBUS 10 /* BUS error (4.2 BSD). */ +#define SIGSEGV 11 /* Segmentation violation (ANSI). */ +#define SIGSYS 12 /* Bad system call. */ +#define SIGPIPE 13 /* Broken pipe (POSIX). */ +#define SIGALRM 14 /* Alarm clock (POSIX). */ +#define SIGTERM 15 /* Termination (ANSI). */ +#define SIGUSR1 16 /* User-defined signal 1 (POSIX). */ +#define SIGUSR2 17 /* User-defined signal 2 (POSIX). */ +#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */ +#define SIGCHLD 18 /* Child status has changed (POSIX). */ +#define SIGPWR 19 /* Power failure restart (System V). */ +#define SIGVTALRM 20 /* Virtual alarm clock (4.2 BSD). */ +#define SIGPROF 21 /* Profiling alarm clock (4.2 BSD). */ +#define SIGPOLL SIGIO /* Pollable event occurred (System V). */ +#define SIGIO 22 /* I/O now possible (4.2 BSD). */ +#define SIGWINCH 23 /* Window size change (4.3 BSD, Sun). */ +#define SIGSTOP 24 /* Stop, unblockable (POSIX). */ +#define SIGTSTP 25 /* Keyboard stop (POSIX). */ +#define SIGCONT 26 /* Continue (POSIX). */ +#define SIGTTIN 27 /* Background read from tty (POSIX). */ +#define SIGTTOU 28 /* Background write to tty (POSIX). */ +#define SIGURG 29 /* Urgent condition on socket (4.2 BSD). */ +#define SIGLOST 30 /* Operating System Has Lost (HP/UX). */ +#define SIGUNUSED 31 +#define SIGXCPU 33 /* CPU limit exceeded (4.2 BSD). */ +#define SIGXFSZ 34 /* File size limit exceeded (4.2 BSD). */ +#define SIGSTKFLT 36 /* Stack fault. */ + +#define _NSIG 64 /* Biggest signal number + 1 + (including real-time signals). */ + +#define SIGRTMIN (__libc_current_sigrtmin ()) +#define SIGRTMAX (__libc_current_sigrtmax ()) + +/* These are the hard limits of the kernel. These values should not be + used directly at user level. */ +#define __SIGRTMIN 37 +#define __SIGRTMAX (_NSIG - 1) + +#endif /* included. */ From 06a5b96db38785d2a54002feb2283f2a72dfcb88 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:30:16 +0000 Subject: [PATCH 2306/4487] Linux/HPPA specific debugging data structures. --- sysdeps/unix/sysv/linux/hppa/sys/procfs.h | 113 ++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/hppa/sys/procfs.h diff --git a/sysdeps/unix/sysv/linux/hppa/sys/procfs.h b/sysdeps/unix/sysv/linux/hppa/sys/procfs.h new file mode 100644 index 0000000000..b6c756f7c0 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/sys/procfs.h @@ -0,0 +1,113 @@ +/* Copyright (C) 1996, 1997, 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_PROCFS_H +#define _SYS_PROCFS_H 1 + +/* This is somewhat modelled after the file of the same name on SVR4 + systems. It provides a definition of the core file format for ELF + used on Linux. It doesn't have anything to do with the /proc file + system, even though Linux has one. + + Anyway, the whole purpose of this file is for GDB and GDB only. + Don't read too much into it. Don't use it for anything other than + GDB unless you know what you are doing. */ + +#include +#include +#include +#include +#include +#include +#include + +__BEGIN_DECLS + +struct elf_siginfo + { + int si_signo; /* Signal number. */ + int si_code; /* Extra code. */ + int si_errno; /* Errno. */ + }; + +/* Definitions to generate Intel SVR4-like core files. These mostly + have the same names as the SVR4 types with "elf_" tacked on the + front to prevent clashes with Linux definitions, and the typedef + forms have been avoided. This is mostly like the SVR4 structure, + but more Linuxy, with things that Linux does not support and which + GDB doesn't really use excluded. */ + +struct elf_prstatus + { + struct elf_siginfo pr_info; /* Info associated with signal. */ + short int pr_cursig; /* Current signal. */ + unsigned long int pr_sigpend; /* Set of pending signals. */ + unsigned long int pr_sighold; /* Set of held signals. */ + __pid_t pr_pid; + __pid_t pr_ppid; + __pid_t pr_pgrp; + __pid_t pr_sid; + struct timeval pr_utime; /* User time. */ + struct timeval pr_stime; /* System time. */ + struct timeval pr_cutime; /* Cumulative user time. */ + struct timeval pr_cstime; /* Cumulative system time. */ + elf_gregset_t pr_reg; /* GP registers. */ + int pr_fpvalid; /* True if math copro being used. */ + }; + + +#define ELF_PRARGSZ (80) /* Number of chars for args. */ + +struct elf_prpsinfo + { + char pr_state; /* Numeric process state. */ + char pr_sname; /* Char for pr_state. */ + char pr_zomb; /* Zombie. */ + char pr_nice; /* Nice val. */ + unsigned long int pr_flag; /* Flags. */ + unsigned int pr_uid; + unsigned int pr_gid; + int pr_pid, pr_ppid, pr_pgrp, pr_sid; + /* Lots missing */ + char pr_fname[16]; /* Filename of executable. */ + char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ + }; + + +/* The rest of this file provides the types for emulation of the + Solaris interfaces that should be implemented by + users of libthread_db. */ + +/* Addresses. */ +typedef void *psaddr_t; + +/* Register sets. Linux has different names. */ +typedef elf_gregset_t prgregset_t; +typedef elf_fpregset_t prfpregset_t; + +/* We don't have any differences between processes and threads, + therefore have only one PID type. */ +typedef __pid_t lwpid_t; + +/* Process status and info. In the end we do provide typedefs for them. */ +typedef struct elf_prstatus prstatus_t; +typedef struct elf_prpsinfo prpsinfo_t; + +__END_DECLS + +#endif /* sys/procfs.h */ From ff3e49693014750a3c4b68f50151089132891e98 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:30:29 +0000 Subject: [PATCH 2307/4487] Linux/HPPA specific ucontext definitions. --- sysdeps/unix/sysv/linux/hppa/sys/ucontext.h | 68 +++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/hppa/sys/ucontext.h diff --git a/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h b/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h new file mode 100644 index 0000000000..60022f951f --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h @@ -0,0 +1,68 @@ +/* Copyright (C) 1997, 1998, 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* Don't rely on this, the interface is currently messed up and may need to + be broken to be fixed. */ +#ifndef _SYS_UCONTEXT_H +#define _SYS_UCONTEXT_H 1 + +#include +#include + +/* We need the signal context definitions even if they are not used + included in . */ +#include + + +/* Type for general register. */ +typedef unsigned long int greg_t; + +/* Number of general registers. */ +#define NGREG 42 +#define NFPREG 33 + +/* Container for all general registers. */ +typedef struct gregset { + greg_t g_regs[32]; + greg_t sr_regs[5]; + greg_t g_pad[5]; +} gregset_t; + +/* Container for all FPU registers. */ +typedef struct fpregset { + double fp_dregs[32]; +} fpregset_t; + +/* Context to describe whole processor state. */ +typedef struct + { + gregset_t gregs; + fpregset_t fpregs; + } mcontext_t; + +/* Userlevel context. */ +typedef struct ucontext + { + unsigned long int uc_flags; + struct ucontext *uc_link; + stack_t uc_stack; + mcontext_t uc_mcontext; + __sigset_t uc_sigmask; + } ucontext_t; + +#endif /* sys/ucontext.h */ From aa4ee8e2274b32c446deda7e6c0701a1bae8d4ff Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:33:24 +0000 Subject: [PATCH 2308/4487] Linux/HPPA specific startup code. --- sysdeps/hppa/elf/initfini.c | 117 ++++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 sysdeps/hppa/elf/initfini.c diff --git a/sysdeps/hppa/elf/initfini.c b/sysdeps/hppa/elf/initfini.c new file mode 100644 index 0000000000..c058ed0425 --- /dev/null +++ b/sysdeps/hppa/elf/initfini.c @@ -0,0 +1,117 @@ +/* Special .init and .fini section support for HPPA + Copyright (C) 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 modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + In addition to the permissions in the GNU Library General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The Library General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + 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 Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* This file is compiled into assembly code which is then munged by a sed + script into two files: crti.s and crtn.s. + + * crti.s puts a function prologue at the beginning of the + .init and .fini sections and defines global symbols for + those addresses, so they can be called as functions. + + * crtn.s puts the corresponding function epilogues + in the .init and .fini sections. */ + +/* If we use the standard C version, the linkage table pointer won't + be properly preserved due to the splitting up of function prologues + and epilogues. Therefore we write these in assembly to make sure + they do the right thing. + + Note that we cannot have a weak undefined __gmon_start__, because + that would require this to be PIC, and the linker is currently not + able to generate a proper procedure descriptor for _init. Sad but + true. Anyway, HPPA is one of those horrible architectures where + making the comparison and indirect call is quite expensive (see the + comment in sysdeps/generic/initfini.c). */ + +__asm__ (" + +#include \"defs.h\" + +/*@HEADER_ENDS*/ + +/*@_init_PROLOG_BEGINS*/ + .section .init + .align 4 + .globl _init + .type _init,@function + .proc + .callinfo +_init: + stw %rp,-20(%sp) + stwm %r4,64(%sp) + stw %r19,-32(%sp) + bl __gmon_start__,%rp + copy %r19,%r4 /* delay slot */ + copy %r4,%r19 + .align 4 + .procend +/*@_init_PROLOG_ENDS*/ + +/*@_init_EPILOG_BEGINS*/ + .section .init + copy %r4,%r19 + ldw -84(%sp),%rp + bv %r0(%rp) + ldwm -64(%sp),%r4 + .text + .align 4 + .weak __gmon_start__ + .type __gmon_start__,@function + .proc + .callinfo +__gmon_start__: + bv,n %r0(%r2) + .procend +/*@_init_EPILOG_ENDS*/ + +/*@_fini_PROLOG_BEGINS*/ + .section .fini + .align 4 + .globl _fini + .type _fini,@function + .proc + .callinfo +_fini: + stw %rp,-20(%sp) + stwm %r4,64(%sp) + stw %r19,-32(%sp) + copy %r19,%r4 + .align 4 + .procend +/*@_fini_PROLOG_ENDS*/ + +/*@_fini_EPILOG_BEGINS*/ + .section .fini + copy %r4,%r19 + ldw -84(%sp),%rp + bv %r0(%rp) + ldwm -64(%sp),%r4 +/*@_fini_EPILOG_ENDS*/ + +/*@TRAILER_BEGINS*/ +"); From 1f07ba01b99a8e2bb817e4e68888156280ac7436 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:33:33 +0000 Subject: [PATCH 2309/4487] Linux/HPPA specific ld.so startup code. --- sysdeps/hppa/elf/start.S | 58 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 sysdeps/hppa/elf/start.S diff --git a/sysdeps/hppa/elf/start.S b/sysdeps/hppa/elf/start.S new file mode 100644 index 0000000000..88bb790be2 --- /dev/null +++ b/sysdeps/hppa/elf/start.S @@ -0,0 +1,58 @@ + + .text + + .align 4 + + .import main, code + .import $global$, data + .import __libc_start_main, code + .import _fini, code + .import _init, code + + + + + .globl _start + .export _start, ENTRY + +_start: + + .proc + .callinfo + + /* load main */ + ldil LP%main, %r26 + ldo RP%main(%r26), %r26 + + /* argc and argv should be in 25 and 24 */ + + /* Expand the stack to store the 5th through 7th args */ + ldo 64(%sp), %sp + + /* void (*rtld_fini) (void) (actually the 6th arg) */ + stw %r23, -56(%sp) + + /* void (*init) (void) */ + ldil LP%_init, %r23 + ldo RP%_init(%r23), %r23 + + /* void (*fini) (void) */ + ldil LP%_fini, %r22 + ldo RP%_fini(%r22), %r22 + stw %r22, -52(%sp) + + /* void *stack_end */ + stw %sp, -60(%sp) + + /* load global */ + ldil L%$global$, %dp + ldo R%$global$(%dp), %dp + + bl __libc_start_main,%r2 + nop + /* die horribly if it returned (it shouldn't) */ + iitlbp %r0,(%r0) + nop + + .procend + From e7cbd4517248678358562e1edcde2d16ee760409 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:33:51 +0000 Subject: [PATCH 2310/4487] Linux/HPPA specific feclearexcept implementation. --- sysdeps/hppa/fpu/fclrexcpt.c | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 sysdeps/hppa/fpu/fclrexcpt.c diff --git a/sysdeps/hppa/fpu/fclrexcpt.c b/sysdeps/hppa/fpu/fclrexcpt.c new file mode 100644 index 0000000000..4c64027310 --- /dev/null +++ b/sysdeps/hppa/fpu/fclrexcpt.c @@ -0,0 +1,37 @@ +/* Clear given exceptions in current floating-point environment. + Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Huggins-Daines , 2000 + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +feclearexcept (int excepts) +{ + unsigned int sw[2]; + + /* Get the current status word. */ + __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw)); + + /* Clear all the relevant bits. */ + sw[0] &= ~(excepts & FE_ALL_EXCEPT); + __asm__ ("fldd 0(%0),%%fr0" : : "r" (sw)); + + /* Success. */ + return 0; +} From 8ebd5d830b34b01469ebe73ba8b73c8ebd58c74f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:34:04 +0000 Subject: [PATCH 2311/4487] Linux/HPPA specific fedisableexcept implementation. --- sysdeps/hppa/fpu/fedisblxcpt.c | 37 ++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 sysdeps/hppa/fpu/fedisblxcpt.c diff --git a/sysdeps/hppa/fpu/fedisblxcpt.c b/sysdeps/hppa/fpu/fedisblxcpt.c new file mode 100644 index 0000000000..95c362a263 --- /dev/null +++ b/sysdeps/hppa/fpu/fedisblxcpt.c @@ -0,0 +1,37 @@ +/* Disable floating-point exceptions. + Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Huggins-Daines , 2000 + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +fedisableexcept (int excepts) +{ + unsigned int sw[2], old_exc; + + /* Get the current status word. */ + __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw)); + + old_exc = sw[0] & FE_ALL_EXCEPT; + + sw[0] &= ~(excepts & FE_ALL_EXCEPT); + __asm__ ("fldd 0(%0),%%fr0" : : "r" (sw)); + + return old_exc; +} From 839151ff976bbdfe47ce478d3b10b185d6f49b4f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:34:22 +0000 Subject: [PATCH 2312/4487] Linux/HPPA specific fegetenv implementation. --- sysdeps/hppa/fpu/feenablxcpt.c | 37 ++++++++++++++++++++++++++++++++++ sysdeps/hppa/fpu/fegetenv.c | 33 ++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 sysdeps/hppa/fpu/feenablxcpt.c create mode 100644 sysdeps/hppa/fpu/fegetenv.c diff --git a/sysdeps/hppa/fpu/feenablxcpt.c b/sysdeps/hppa/fpu/feenablxcpt.c new file mode 100644 index 0000000000..ac46722767 --- /dev/null +++ b/sysdeps/hppa/fpu/feenablxcpt.c @@ -0,0 +1,37 @@ +/* Enable floating-point exceptions. + Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Huggins-Daines , 2000 + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +feenableexcept (int excepts) +{ + unsigned int sw[2], old_exc; + + /* Get the current status word. */ + __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw)); + + old_exc = sw[0] & FE_ALL_EXCEPT; + + sw[0] |= (excepts & FE_ALL_EXCEPT); + __asm__ ("fldd 0(%0),%%fr0" : : "r" (sw)); + + return old_exc; +} diff --git a/sysdeps/hppa/fpu/fegetenv.c b/sysdeps/hppa/fpu/fegetenv.c new file mode 100644 index 0000000000..0fe9773bb7 --- /dev/null +++ b/sysdeps/hppa/fpu/fegetenv.c @@ -0,0 +1,33 @@ +/* Store current floating-point environment. + Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Huggins-Daines , 2000 + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +fegetenv (fenv_t *envp) +{ + __asm__ ( + "fstd %%fr0,0(%2)\n" + "fstd,ma %%fr1,8(%2)\n" + "fstd,ma %%fr2,8(%2)\n" + "fstd %%fr3,0(%2)\n" + : "=m" (*envp), "=r" (envp) : "1" (envp)); + return 0; +} From 1b2b6656a92c83066b1177e81abe24d72d7657ed Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:34:32 +0000 Subject: [PATCH 2313/4487] Linux/HPPA specific fegetexcept implementation. --- sysdeps/hppa/fpu/fegetexcept.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 sysdeps/hppa/fpu/fegetexcept.c diff --git a/sysdeps/hppa/fpu/fegetexcept.c b/sysdeps/hppa/fpu/fegetexcept.c new file mode 100644 index 0000000000..6bf3f6446e --- /dev/null +++ b/sysdeps/hppa/fpu/fegetexcept.c @@ -0,0 +1,32 @@ +/* Get enabled floating-point exceptions. + Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Huggins-Daines , 2000 + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +fegetexcept (void) +{ + unsigned int sw[2]; + + /* Get the current status word. */ + __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw)); + + return sw[0] & FE_ALL_EXCEPT; +} From 0ea85d5c2f36b5d57641329a9fa2c1c7ef38a21a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:34:41 +0000 Subject: [PATCH 2314/4487] Linux/HPPA specific fegetround implementation. --- sysdeps/hppa/fpu/fegetround.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 sysdeps/hppa/fpu/fegetround.c diff --git a/sysdeps/hppa/fpu/fegetround.c b/sysdeps/hppa/fpu/fegetround.c new file mode 100644 index 0000000000..6e07f8654f --- /dev/null +++ b/sysdeps/hppa/fpu/fegetround.c @@ -0,0 +1,32 @@ +/* Return current rounding direction. + Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Huggins-Daines , 2000 + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +fegetround (void) +{ + unsigned int sw[2]; + + /* Get the current status word. */ + __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw)); + + return sw[0] & FE_DOWNWARD; +} From 1f8d3bd8e7c7ca6999cecec0d203f089b6457bde Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:34:49 +0000 Subject: [PATCH 2315/4487] Linux/HPPA specific feholdexcept implementation. --- sysdeps/hppa/fpu/feholdexcpt.c | 60 ++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 sysdeps/hppa/fpu/feholdexcpt.c diff --git a/sysdeps/hppa/fpu/feholdexcpt.c b/sysdeps/hppa/fpu/feholdexcpt.c new file mode 100644 index 0000000000..10621786eb --- /dev/null +++ b/sysdeps/hppa/fpu/feholdexcpt.c @@ -0,0 +1,60 @@ +/* Store current floating-point environment and clear exceptions. + Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Huggins-Daines , 2000 + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +int +feholdexcept (fenv_t *envp) +{ + fenv_t clear; + + /* Store the environment. */ + { + fenv_t * _regs = envp; + __asm__ ( + "fstd %%fr0,0(%2)\n" + "fstd,ma %%fr1,8(%2)\n" + "fstd,ma %%fr2,8(%2)\n" + "fstd %%fr3,0(%2)\n" + : "=m" (*_regs), "=r" (_regs) : "1" (_regs)); + memcpy (&clear, envp, sizeof (clear)); + } + + /* Now clear all exceptions. */ + clear.__status_word &= ~(FE_ALL_EXCEPT << 27); + memset (clear.__exception, 0, sizeof (clear.__exception)); + + /* And set all exceptions to non-stop. */ + clear.__status_word &= ~FE_ALL_EXCEPT; + + /* Load the new environment. */ + { + fenv_t * _regs = &clear + 1; + __asm__ ( + "fldd,mb -8(%2),%%fr3\n" + "fldd,mb -8(%2),%%fr2\n" + "fldd,mb -8(%2),%%fr1\n" + "fldd -8(%2),%%fr0\n" + : "=m" (*_regs), "=r" (_regs) : "1" (_regs)); + } + + return 0; +} From 1d53eb01efe186e3b0859028dc4afaef6791e60e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:34:57 +0000 Subject: [PATCH 2316/4487] Linux/HPPA specific fesetenv implementation. --- sysdeps/hppa/fpu/fesetenv.c | 70 +++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 sysdeps/hppa/fpu/fesetenv.c diff --git a/sysdeps/hppa/fpu/fesetenv.c b/sysdeps/hppa/fpu/fesetenv.c new file mode 100644 index 0000000000..4bfbefdd9b --- /dev/null +++ b/sysdeps/hppa/fpu/fesetenv.c @@ -0,0 +1,70 @@ +/* Install given floating-point environment. + Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Huggins-Daines , 2000 + Based on the m68k version by + Andreas Schwab + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +fesetenv (const fenv_t *envp) +{ + fenv_t temp; + + /* Install the environment specified by ENVP. But there are a few + values which we do not want to come from the saved environment. + Therefore, we get the current environment and replace the values + we want to use from the environment specified by the parameter. */ + { + fenv_t * _regs = &temp; + __asm__ ( + "fstd %%fr0,0(%2)\n" + "fstd,ma %%fr1,8(%2)\n" + "fstd,ma %%fr2,8(%2)\n" + "fstd %%fr3,0(%2)\n" + : "=m" (*_regs), "=r" (_regs) : "1" (_regs)); + } + + temp.__status_word &= ~(FE_ALL_EXCEPT + | (FE_ALL_EXCEPT << 27) + | FE_DOWNWARD); + if (envp == FE_DFL_ENV) + ; + else if (envp == FE_NOMASK_ENV) + temp.__status_word |= FE_ALL_EXCEPT; + else + temp.__status_word |= (envp->__status_word + & (FE_ALL_EXCEPT + | FE_DOWNWARD + | (FE_ALL_EXCEPT << 27))); + + /* Load the new environment. */ + { + fenv_t * _regs = &temp + 1; + __asm__ ( + "fldd,mb -8(%2),%%fr3\n" + "fldd,mb -8(%2),%%fr2\n" + "fldd,mb -8(%2),%%fr1\n" + "fldd -8(%2),%%fr0\n" + : "=m" (*_regs), "=r" (_regs) : "1" (_regs)); + } + + /* Success. */ + return 0; +} From 8c34028d3e197956caa1c786b45eff871ed9792e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:35:05 +0000 Subject: [PATCH 2317/4487] Linux/HPPA specific fesetround implementation. --- sysdeps/hppa/fpu/fesetround.c | 39 +++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 sysdeps/hppa/fpu/fesetround.c diff --git a/sysdeps/hppa/fpu/fesetround.c b/sysdeps/hppa/fpu/fesetround.c new file mode 100644 index 0000000000..0d5858f263 --- /dev/null +++ b/sysdeps/hppa/fpu/fesetround.c @@ -0,0 +1,39 @@ +/* Set current rounding direction. + Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Huggins-Daines , 2000 + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +fesetround (int round) +{ + unsigned int sw[2]; + + if (round & ~FE_DOWNWARD) + /* ROUND is not a valid rounding mode. */ + return 1; + + /* Get the current status word. */ + __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw)); + sw[0] &= ~FE_UPWARD; + sw[0] |= round; + __asm__ ("fldd 0(%0),%%fr0" : : "r" (sw)); + + return 0; +} From 318eb46070f17c67b8827befe75e6b63affbcc56 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:35:14 +0000 Subject: [PATCH 2318/4487] Linux/HPPA specific feupdateenv implementation. --- sysdeps/hppa/fpu/feupdateenv.c | 40 ++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 sysdeps/hppa/fpu/feupdateenv.c diff --git a/sysdeps/hppa/fpu/feupdateenv.c b/sysdeps/hppa/fpu/feupdateenv.c new file mode 100644 index 0000000000..7e2d715e25 --- /dev/null +++ b/sysdeps/hppa/fpu/feupdateenv.c @@ -0,0 +1,40 @@ +/* Install given floating-point environment and raise exceptions. + Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Huggins-Daines , 2000 + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +feupdateenv (const fenv_t *envp) +{ + unsigned int sw[2]; + + /* Get the current exception status. */ + __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw)); + sw[0] &= (FE_ALL_EXCEPT << 27); + + /* Install new environment. */ + fesetenv (envp); + + /* Raise the saved exception. */ + feraiseexcept (sw[0] >> 27); + + /* Success. */ + return 0; +} From 9bb9060790776dcd278578ac0958ef6300f8d8f9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:35:48 +0000 Subject: [PATCH 2319/4487] Linux/HPPA specific fegetexceptflag implementation. --- sysdeps/hppa/fpu/fgetexcptflg.c | 36 +++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 sysdeps/hppa/fpu/fgetexcptflg.c diff --git a/sysdeps/hppa/fpu/fgetexcptflg.c b/sysdeps/hppa/fpu/fgetexcptflg.c new file mode 100644 index 0000000000..800b1f4014 --- /dev/null +++ b/sysdeps/hppa/fpu/fgetexcptflg.c @@ -0,0 +1,36 @@ +/* Store current representation for exceptions. + Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Huggins-Daines , 2000 + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +fegetexceptflag (fexcept_t *flagp, int excepts) +{ + unsigned int sw[2]; + + /* Get the current status word. */ + __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw)); + + *flagp = (sw[0] >> 27) & excepts & FE_ALL_EXCEPT; + + /* Success. */ + return 0; +} + From 84e1099f7894d1ece7f5b843f87c962743b3ecd0 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:36:03 +0000 Subject: [PATCH 2320/4487] Linux/HPPA specific feraiseexcept implementation. --- sysdeps/hppa/fpu/fraiseexcpt.c | 89 ++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 sysdeps/hppa/fpu/fraiseexcpt.c diff --git a/sysdeps/hppa/fpu/fraiseexcpt.c b/sysdeps/hppa/fpu/fraiseexcpt.c new file mode 100644 index 0000000000..7feeb9946f --- /dev/null +++ b/sysdeps/hppa/fpu/fraiseexcpt.c @@ -0,0 +1,89 @@ +/* Raise given exceptions. + Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Huggins-Daines + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +int +feraiseexcept (int excepts) +{ + /* Raise exceptions represented by EXCEPTS. But we must raise only one + signal at a time. It is important that if the overflow/underflow + exception and the divide by zero exception are given at the same + time, the overflow/underflow exception follows the divide by zero + exception. */ + + /* We do these bits in assembly to be certain GCC doesn't optimize + away something important, and so we can force delayed traps to + occur. */ + + /* FIXME: These all need verification! */ + + /* First: invalid exception. */ + if (excepts & FE_INVALID) + { + /* One example of a invalid operation is 0 * Infinity. */ + double d = HUGE_VAL; + __asm__ __volatile__ ("fmpy,dbl %1,%%fr0,%0\n\t" + /* FIXME: is this a proper trap barrier? */ + "fcpy,dbl %%fr0,%%fr0" : "=f" (d) : "0" (d)); + } + + /* Next: division by zero. */ + if (excepts & FE_DIVBYZERO) + { + double d = 1.0; + __asm__ __volatile__ ("fdiv,dbl %1,%%fr0,%0\n\t" + "fcpy,dbl %%fr0,%%fr0" : "=f" (d) : "0" (d)); + } + + /* Next: overflow. */ + /* FIXME: Compare with IA-64 - do we have the same problem? */ + if (excepts & FE_OVERFLOW) + { + double d = DBL_MAX; + + __asm__ __volatile__ ("fmpy,dbl %1,%1,%0\n\t" + "fcpy,dbl %%fr0,%%fr0" : "=f" (d) : "0" (d)); + } + + /* Next: underflow. */ + if (excepts & FE_UNDERFLOW) + { + double d = DBL_MIN; + double e = 69.69; + + __asm__ __volatile__ ("fdiv,dbl %1,%2,%0\n\t" + "fcpy,dbl %%fr0,%%fr0" : "=f" (d) : "0" (d), "f" (e)); + } + + /* Last: inexact. */ + if (excepts & FE_INEXACT) + { + double d = 1.0; + double e = M_PI; + + __asm__ __volatile__ ("fdiv,dbl %1,%2,%0\n\t" + "fcpy,dbl %%fr0,%%fr0" : "=f" (d) : "0" (d), "f" (e)); + } + + /* Success. */ + return 0; +} From 32b9e00b121486d7eb6de334df6a4828cf7a751e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:36:16 +0000 Subject: [PATCH 2321/4487] Linux/HPPA specific fesetexceptflag implementation. --- sysdeps/hppa/fpu/fsetexcptflg.c | 41 +++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 sysdeps/hppa/fpu/fsetexcptflg.c diff --git a/sysdeps/hppa/fpu/fsetexcptflg.c b/sysdeps/hppa/fpu/fsetexcptflg.c new file mode 100644 index 0000000000..2e369ea721 --- /dev/null +++ b/sysdeps/hppa/fpu/fsetexcptflg.c @@ -0,0 +1,41 @@ +/* Set floating-point environment exception handling. + Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Huggins-Daines , 2000 + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +int +fesetexceptflag (const fexcept_t *flagp, int excepts) +{ + unsigned int sw[2]; + + /* Get the current status word. */ + __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw)); + + /* Install the new exception flags bits. */ + sw[0] &= ~(excepts & (FE_ALL_EXCEPT >> 27)); + sw[0] |= (*flagp & excepts & FE_ALL_EXCEPT) << 27; + + /* Store the new status word. */ + __asm__ ("fldd 0(%0),%%fr0" : : "r" (sw)); + + /* Success. */ + return 0; +} From 2db1ce26dac360a878ce00879916ef52d3ab3e91 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:36:28 +0000 Subject: [PATCH 2322/4487] Linux/HPPA specific fetestexcept implementation. --- sysdeps/hppa/fpu/ftestexcept.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 sysdeps/hppa/fpu/ftestexcept.c diff --git a/sysdeps/hppa/fpu/ftestexcept.c b/sysdeps/hppa/fpu/ftestexcept.c new file mode 100644 index 0000000000..15d149193f --- /dev/null +++ b/sysdeps/hppa/fpu/ftestexcept.c @@ -0,0 +1,32 @@ +/* Test exception in current environment. + Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Huggins-Daines , 2000 + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +fetestexcept (int excepts) +{ + unsigned int sw[2]; + + /* Get the current status word. */ + __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw)); + + return (sw[0] >> 27) & excepts & FE_ALL_EXCEPT; +} From fb0f005337cb31a747875bbca3006810d09ef25f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:37:33 +0000 Subject: [PATCH 2323/4487] Linux/HPPA specific fenv definitions. --- sysdeps/hppa/fpu/bits/fenv.h | 78 ++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 sysdeps/hppa/fpu/bits/fenv.h diff --git a/sysdeps/hppa/fpu/bits/fenv.h b/sysdeps/hppa/fpu/bits/fenv.h new file mode 100644 index 0000000000..7d25b9947c --- /dev/null +++ b/sysdeps/hppa/fpu/bits/fenv.h @@ -0,0 +1,78 @@ +/* Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Huggins-Daines + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _FENV_H +# error "Never use directly; include instead." +#endif + +/* Define bits representing the exception. We use the values of the + appropriate enable bits in the FPU status word (which, + coincidentally, are the same as the flag bits, but shifted right by + 27 bits). */ +enum +{ + FE_INVALID = 1<<4, /* V */ +#define FE_INVALID FE_INVALID + FE_DIVBYZERO = 1<<3, /* Z */ +#define FE_DIVBYZERO FE_DIVBYZERO + FE_OVERFLOW = 1<<2, /* O */ +#define FE_OVERFLOW FE_OVERFLOW + FE_UNDERFLOW = 1<<1, /* U */ +#define FE_UNDERFLOW FE_UNDERFLOW + FE_INEXACT = 1<<0, /* I */ +#define FE_INEXACT FE_INEXACT +}; + +#define FE_ALL_EXCEPT \ + (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID) + +/* The PA-RISC FPU supports all of the four defined rounding modes. + We use the values of the RM field in the floating point status + register for the appropriate macros. */ +enum + { + FE_TONEAREST = 0 << 9, +#define FE_TONEAREST FE_TONEAREST + FE_TOWARDZERO = 1 << 9, +#define FE_TOWARDZERO FE_TOWARDZERO + FE_UPWARD = 2 << 9, +#define FE_UPWARD FE_UPWARD + FE_DOWNWARD = 3 << 9, +#define FE_DOWNWARD FE_DOWNWARD + }; + +/* Type representing exception flags. */ +typedef unsigned int fexcept_t; + +/* Type representing floating-point environment. This structure + corresponds to the layout of the status and exception words in the + register file. */ +typedef struct +{ + unsigned int __status_word; + unsigned int __exception[7]; +} fenv_t; + +/* If the default argument is used we use this value. */ +#define FE_DFL_ENV ((fenv_t *) -1) + +#ifdef __USE_GNU +/* Floating-point environment where none of the exceptions are masked. */ +# define FE_NOMASK_ENV ((fenv_t *) -2) +#endif From 37374d91acb5e6b76b5d0f4b6519098d61e5af81 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 03:58:58 +0000 Subject: [PATCH 2324/4487] Linux/HPPA errno definitions. --- sysdeps/unix/sysv/linux/hppa/bits/errno.h | 57 +++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/hppa/bits/errno.h diff --git a/sysdeps/unix/sysv/linux/hppa/bits/errno.h b/sysdeps/unix/sysv/linux/hppa/bits/errno.h new file mode 100644 index 0000000000..db4eaf6364 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/bits/errno.h @@ -0,0 +1,57 @@ +/* Error constants. Linux/HPPA specific version. + Copyright (C) 1996, 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifdef _ERRNO_H + +# undef EDOM +# undef EILSEQ +# undef ERANGE +# include + +/* Linux also has no ECANCELED error code. Since it is not used here + we define it to an invalid value. */ +# define ECANCELED 125 + +# ifndef __ASSEMBLER__ +/* We now need a declaration of the `errno' variable. */ +extern int errno; + +/* Function to get address of global `errno' variable. */ +extern int *__errno_location (void) __THROW __attribute__ ((__const__)); + +# if defined _LIBC +/* We wouldn't need a special macro anymore but it is history. */ +# define __set_errno(val) (*__errno_location ()) = (val) +# endif /* _LIBC */ + +# if !defined _LIBC || defined _LIBC_REENTRANT +/* When using threads, errno is a per-thread value. */ +# define errno (*__errno_location ()) +# endif +# endif /* !__ASSEMBLER__ */ +#endif /* _ERRNO_H */ + +#if !defined _ERRNO_H && defined __need_Emath +/* This is ugly but the kernel header is not clean enough. We must + define only the values EDOM, EILSEQ and ERANGE in case __need_Emath is + defined. */ +# define EDOM 33 /* Math argument out of domain of function. */ +# define EILSEQ 84 /* Illegal byte sequence. */ +# define ERANGE 34 /* Math result not representable. */ +#endif /* !_ERRNO_H && __need_Emath */ From 2d4515fc575748519e3ea8f55c06fdc1b392a536 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Oct 2000 18:37:53 +0000 Subject: [PATCH 2325/4487] Cleanup. --- sysdeps/unix/sysv/linux/hppa/bits/sigaction.h | 2 +- sysdeps/unix/sysv/linux/hppa/bits/signum.h | 2 +- sysdeps/unix/sysv/linux/hppa/brk.c | 2 +- sysdeps/unix/sysv/linux/hppa/sys/ucontext.h | 18 ++++++----- sysdeps/unix/sysv/linux/hppa/umount.c | 30 +++++++++++++++---- 5 files changed, 38 insertions(+), 16 deletions(-) diff --git a/sysdeps/unix/sysv/linux/hppa/bits/sigaction.h b/sysdeps/unix/sysv/linux/hppa/bits/sigaction.h index cec71b294e..bdded3d6d3 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/sigaction.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/sigaction.h @@ -1,4 +1,4 @@ -/* Definitions for Linux/hppa sigaction. +/* Definitions for Linux/HPPA sigaction. Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/sysdeps/unix/sysv/linux/hppa/bits/signum.h b/sysdeps/unix/sysv/linux/hppa/bits/signum.h index 45ed06ae14..a475004029 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/signum.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/signum.h @@ -1,4 +1,4 @@ -/* Signal number definitions. Linux version. +/* Signal number definitions. Linux/HPPA version. Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/sysdeps/unix/sysv/linux/hppa/brk.c b/sysdeps/unix/sysv/linux/hppa/brk.c index 9ed6c4f1f7..129c2bea25 100644 --- a/sysdeps/unix/sysv/linux/hppa/brk.c +++ b/sysdeps/unix/sysv/linux/hppa/brk.c @@ -1,4 +1,4 @@ -/* brk system call for Linux/i386. +/* brk system call for Linux/HPPA. Copyright (C) 1995, 1996 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h b/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h index 60022f951f..c819ab1627 100644 --- a/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h @@ -37,16 +37,18 @@ typedef unsigned long int greg_t; #define NFPREG 33 /* Container for all general registers. */ -typedef struct gregset { - greg_t g_regs[32]; - greg_t sr_regs[5]; - greg_t g_pad[5]; -} gregset_t; +typedef struct gregset + { + greg_t g_regs[32]; + greg_t sr_regs[5]; + greg_t g_pad[5]; + } gregset_t; /* Container for all FPU registers. */ -typedef struct fpregset { - double fp_dregs[32]; -} fpregset_t; +typedef struct fpregset + { + double fp_dregs[32]; + } fpregset_t; /* Context to describe whole processor state. */ typedef struct diff --git a/sysdeps/unix/sysv/linux/hppa/umount.c b/sysdeps/unix/sysv/linux/hppa/umount.c index 39cb251030..515467b1c5 100644 --- a/sysdeps/unix/sysv/linux/hppa/umount.c +++ b/sysdeps/unix/sysv/linux/hppa/umount.c @@ -1,9 +1,29 @@ -/* since we don't have an oldumount system call, do what the kernel - does down here */ +/* Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Huggins-Daines , 2000. -long __umount(char *name) + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* Since we don't have an oldumount system call, do what the kernel + does down here. */ + +long int +__umount (const char *name) { - return __umount2(name, 0); + return __umount2 (name, 0); } -weak_alias(__umount, umount); +weak_alias (__umount, umount); From ef892797eea8d39504ebf304ba31a1882b7a31ec Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 16 Oct 2000 09:21:25 +0000 Subject: [PATCH 2326/4487] Fix last change (misapplied). --- sysdeps/m68k/dl-machine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index 29267af968..06c9db64a8 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -182,7 +182,7 @@ asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \ pea 8(%sp, %d1*4) pea 8(%sp) move.l %d1, -(%sp) - move.l ([_dl_loaded@GOT.w(%a5)]), -(%sp) + move.l ([_dl_loaded@GOT.w, %a5]), -(%sp) jbsr _dl_init@PLTPC addq.l #8, %sp addq.l #8, %sp From 09ac296dc4a7aa2b79ab3747a3603a16377f6763 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 17 Oct 2000 13:24:28 +0000 Subject: [PATCH 2327/4487] Update for changes in libm-test.inc. --- sysdeps/m68k/fpu/libm-test-ulps | 585 ++++++++------------------------ 1 file changed, 137 insertions(+), 448 deletions(-) diff --git a/sysdeps/m68k/fpu/libm-test-ulps b/sysdeps/m68k/fpu/libm-test-ulps index e3d42abf10..ba14c9a6fb 100644 --- a/sysdeps/m68k/fpu/libm-test-ulps +++ b/sysdeps/m68k/fpu/libm-test-ulps @@ -1,9 +1,9 @@ # Begin of automatic generation # acos -Test "acos (0.7) == 0.7953988301841435554": -ildouble: 1150 -ldouble: 1150 +Test "acos (0.7) == 0.79539883018414355549096833892476432": +ildouble: 1 +ldouble: 1 # acosh Test "acosh (7) == 2.6339157938496334172": @@ -11,36 +11,21 @@ ildouble: 1 ldouble: 1 # asin -Test "asin (0.7) == 0.7753974966107530637": +Test "asin (0.7) == 0.77539749661075306374035335271498708": double: 1 idouble: 1 -ildouble: 1147 -ldouble: 1147 +ildouble: 1 +ldouble: 1 # asinh Test "asinh (0.7) == 0.652666566082355786": -ildouble: 656 -ldouble: 656 - -# atan -Test "atan (0.7) == 0.6107259643892086165": -ildouble: 549 -ldouble: 549 - -# atan2 -Test "atan2 (0.4, 0.0003) == 1.5700463269355215718": -ildouble: 1 -ldouble: 1 -Test "atan2 (0.7, 1) == 0.6107259643892086165": -ildouble: 549 -ldouble: 549 +ildouble: 14 +ldouble: 14 # atanh Test "atanh (0.7) == 0.8673005276940531944": double: 1 idouble: 1 -ildouble: 1606 -ldouble: 1606 # cabs Test "cabs (-0.7 + 12.4 i) == 12.41974234837422060118": @@ -56,8 +41,8 @@ Test "cabs (-12.4 - 0.7 i) == 12.41974234837422060118": float: 1 ifloat: 1 Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508": -ildouble: 560 -ldouble: 560 +ildouble: 1 +ldouble: 1 Test "cabs (0.7 + 12.4 i) == 12.41974234837422060118": float: 1 ifloat: 1 @@ -71,13 +56,13 @@ double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 151 -ldouble: 151 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: cacos (0.7 + 1.2 i) == 1.1351827477151551089 - 1.0927647857577371459 i": float: 2 ifloat: 2 -ildouble: 329 -ldouble: 329 +ildouble: 1 +ldouble: 1 # cacosh Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323 + 2.1414491111159960199 i": @@ -95,11 +80,11 @@ ldouble: 2 Test "Real part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459 + 1.1351827477151551089 i": double: 1 idouble: 1 -ildouble: 328 -ldouble: 328 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459 + 1.1351827477151551089 i": -ildouble: 151 -ldouble: 151 +ildouble: 1 +ldouble: 1 # casin Test "Imaginary part of: casin (-2 - 3 i) == -0.5706527843210994007 - 1.9833870299165354323 i": @@ -110,13 +95,13 @@ double: 3 float: 2 idouble: 3 ifloat: 2 -ildouble: 603 -ldouble: 603 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103 + 1.0927647857577371459 i": float: 2 ifloat: 2 -ildouble: 329 -ldouble: 329 +ildouble: 1 +ldouble: 1 # casinh Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917 - 0.9646585044076027920 i": @@ -136,13 +121,13 @@ ldouble: 7 Test "Real part of: casinh (0.7 + 1.2 i) == 0.9786545955936738768 + 0.9113541895315601156 i": double: 1 idouble: 1 -ildouble: 891 -ldouble: 891 +ildouble: 3 +ldouble: 3 Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.9786545955936738768 + 0.9113541895315601156 i": float: 2 ifloat: 2 -ildouble: 11 -ldouble: 11 +ildouble: 3 +ldouble: 3 # catan Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225 - 0.2290726829685387662 i": @@ -153,29 +138,26 @@ ifloat: 1 ildouble: 7 ldouble: 7 Test "Real part of: catan (0.7 + 1.2 i) == 1.0785743834118921877 + 0.5770573776534306764 i": -ildouble: 250 -ldouble: 250 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: catan (0.7 + 1.2 i) == 1.0785743834118921877 + 0.5770573776534306764 i": float: 1 ifloat: 1 -ildouble: 474 -ldouble: 474 +ildouble: 1 +ldouble: 1 # catanh Test "Real part of: catanh (-2 - 3 i) == -0.1469466662255297520 - 1.3389725222944935611 i": ildouble: 2 ldouble: 2 -Test "Real part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959 + 0.9702403077950989849 i": -ildouble: 66 -ldouble: 66 Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959 + 0.9702403077950989849 i": -ildouble: 447 -ldouble: 447 +ildouble: 2 +ldouble: 2 # cbrt Test "cbrt (-0.001) == -0.1": -ildouble: 717 -ldouble: 717 +ildouble: 102 +ldouble: 102 Test "cbrt (-27.0) == -3.0": ildouble: 948 ldouble: 948 @@ -185,8 +167,8 @@ idouble: 1 ildouble: 345 ldouble: 345 Test "cbrt (0.970299) == 0.99": -ildouble: 306 -ldouble: 306 +ildouble: 142 +ldouble: 142 Test "cbrt (8) == 2": ildouble: 191 ldouble: 191 @@ -200,14 +182,11 @@ float: 1 ifloat: 1 ildouble: 1 ldouble: 1 -Test "Real part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i": -ildouble: 5 -ldouble: 5 Test "Imaginary part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i": double: 1 idouble: 1 -ildouble: 1901 -ldouble: 1901 +ildouble: 1 +ldouble: 1 # ccosh Test "Real part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i": @@ -223,11 +202,11 @@ double: 1 float: 3 idouble: 1 ifloat: 3 -ildouble: 1467 -ldouble: 1467 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i": -ildouble: 1182 -ldouble: 1182 +ildouble: 2 +ldouble: 2 # cexp Test "Real part of: cexp (-2.0 - 3.0 i) == -0.1339809149295426134 - 0.0190985162611351964 i": @@ -241,15 +220,17 @@ ifloat: 1 ildouble: 19 ldouble: 19 Test "Real part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i": -float: 3 ifloat: 3 -ildouble: 940 -ldouble: 940 Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i": +ifloat: 2 +Test "Real part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i": +float: 3 +ifloat: 3 +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i": float: 2 ifloat: 2 -ildouble: 1067 -ldouble: 1067 # clog Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680 - 2.1587989303424641704 i": @@ -271,20 +252,18 @@ double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 1402 -ldouble: 1402 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i": float: 1 ifloat: 1 -ildouble: 187 -ldouble: 187 +ildouble: 3 +ldouble: 3 # cos -Test "cos (0.7) == 0.7648421872844884262": +Test "cos (0.7) == 0.76484218728448842625585999019186495": double: 1 idouble: 1 -ildouble: 529 -ldouble: 529 Test "cos (M_PI_6l * 2.0) == 0.5": double: 1 float: 0.5 @@ -309,8 +288,8 @@ ldouble: 0.25 # cosh Test "cosh (0.7) == 1.255169005630943018": -ildouble: 309 -ldouble: 309 +ildouble: 2 +ldouble: 2 # cpow Test "Real part of: cpow (2 + 0 i, 10 + 0 i) == 1024.0 + 0.0 i": @@ -346,14 +325,9 @@ ifloat: 1 Test "Imaginary part of: csin (-2 - 3 i) == -9.1544991469114295734 + 4.1689069599665643507 i": float: 1 ifloat: 1 -Test "Real part of: csin (0.7 + 1.2 i) == 1.1664563419657581376 + 1.1544997246948547371 i": -ildouble: 966 -ldouble: 966 Test "Imaginary part of: csin (0.7 + 1.2 i) == 1.1664563419657581376 + 1.1544997246948547371 i": float: 1 ifloat: 1 -ildouble: 168 -ldouble: 168 # csinh Test "Real part of: csinh (-2 - 3 i) == 3.5905645899857799520 - 0.5309210862485198052 i": @@ -367,13 +341,11 @@ ldouble: 2 Test "Real part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i": float: 1 ifloat: 1 -ildouble: 413 -ldouble: 413 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i": float: 1 ifloat: 1 -ildouble: 477 -ldouble: 477 # csqrt Test "Real part of: csqrt (-2 + 3 i) == 0.8959774761298381247 + 1.6741492280355400404 i": @@ -385,11 +357,9 @@ ldouble: 1 Test "Real part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i": float: 1 ifloat: 1 -ildouble: 237 -ldouble: 237 Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i": -ildouble: 128 -ldouble: 128 +ildouble: 1 +ldouble: 1 # ctan Test "Real part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i": @@ -403,11 +373,11 @@ double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 689 -ldouble: 689 +ildouble: 2 +ldouble: 2 Test "Imaginary part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i": -ildouble: 367 -ldouble: 367 +ildouble: 2 +ldouble: 2 # ctanh Test "Real part of: ctanh (-2 - 3 i) == -0.9653858790221331242 + 0.0098843750383224937 i": @@ -422,13 +392,11 @@ idouble: 0.5 Test "Real part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i": float: 1 ifloat: 1 -ildouble: 285 -ldouble: 285 Test "Imaginary part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i": double: 1 idouble: 1 -ildouble: 3074 -ldouble: 3074 +ildouble: 1 +ldouble: 1 # erfc Test "erfc (0.7) == 0.32219880616258152702": @@ -446,30 +414,14 @@ float: 11 idouble: 24 ifloat: 11 -# exp -Test "exp (0.7) == 2.0137527074704765216": -ildouble: 412 -ldouble: 412 - # exp10 -Test "exp10 (-1) == 0.1": -ildouble: 819 -ldouble: 819 -Test "exp10 (0.7) == 5.0118723362727228500": +Test "exp10 (0.7) == 5.0118723362727228500155418688494574": double: 1 idouble: 1 -ildouble: 1182 -ldouble: 1182 - -# exp2 -Test "exp2 (0.7) == 1.6245047927124710452": -ildouble: 461 -ldouble: 461 +ildouble: 1 +ldouble: 1 # expm1 -Test "expm1 (0.7) == 1.0137527074704765216": -ildouble: 825 -ldouble: 825 Test "expm1 (1) == M_El - 1.0": ildouble: 1 ldouble: 1 @@ -480,74 +432,58 @@ double: 2 float: 1 idouble: 2 ifloat: 1 -ildouble: 4096 -ldouble: 4096 +ildouble: 1 +ldouble: 1 Test "fmod (-6.5, 2.3) == -1.9": double: 2 float: 1 idouble: 2 ifloat: 1 -ildouble: 4096 -ldouble: 4096 +ildouble: 1 +ldouble: 1 Test "fmod (6.5, -2.3) == 1.9": double: 2 float: 1 idouble: 2 ifloat: 1 -ildouble: 4096 -ldouble: 4096 +ildouble: 1 +ldouble: 1 Test "fmod (6.5, 2.3) == 1.9": double: 2 float: 1 idouble: 2 ifloat: 1 -ildouble: 4096 -ldouble: 4096 +ildouble: 1 +ldouble: 1 # hypot Test "hypot (-0.7, -12.4) == 12.41974234837422060118": float: 1 ifloat: 1 -ildouble: 406 -ldouble: 406 Test "hypot (-0.7, 12.4) == 12.41974234837422060118": float: 1 ifloat: 1 -ildouble: 406 -ldouble: 406 Test "hypot (-12.4, -0.7) == 12.41974234837422060118": float: 1 ifloat: 1 -ildouble: 406 -ldouble: 406 Test "hypot (-12.4, 0.7) == 12.41974234837422060118": float: 1 ifloat: 1 -ildouble: 406 -ldouble: 406 Test "hypot (0.7, -12.4) == 12.41974234837422060118": float: 1 ifloat: 1 -ildouble: 406 -ldouble: 406 Test "hypot (0.7, 1.2) == 1.3892443989449804508": -ildouble: 560 -ldouble: 560 +ildouble: 1 +ldouble: 1 Test "hypot (0.7, 12.4) == 12.41974234837422060118": float: 1 ifloat: 1 -ildouble: 406 -ldouble: 406 Test "hypot (12.4, -0.7) == 12.41974234837422060118": float: 1 ifloat: 1 -ildouble: 406 -ldouble: 406 Test "hypot (12.4, 0.7) == 12.41974234837422060118": float: 1 ifloat: 1 -ildouble: 406 -ldouble: 406 # j0 Test "j0 (1.5) == 0.51182767173591812875": @@ -644,8 +580,8 @@ double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 2342 -ldouble: 2342 +ildouble: 2 +ldouble: 2 Test "log (2) == M_LN2l": ildouble: 1 ldouble: 1 @@ -657,8 +593,8 @@ ifloat: 0.5 Test "log10 (0.7) == -0.15490195998574316929": double: 1 idouble: 1 -ildouble: 2033 -ldouble: 2033 +ildouble: 1 +ldouble: 1 Test "log10 (e) == log10(e)": float: 1 ifloat: 1 @@ -669,8 +605,8 @@ double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 584 -ldouble: 584 +ildouble: 2 +ldouble: 2 # log2 Test "log2 (0.7) == -0.51457317282975824043": @@ -678,28 +614,26 @@ double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 1689 -ldouble: 1689 +ildouble: 1 +ldouble: 1 # pow Test "pow (0.7, 1.2) == 0.65180494056638638188": -ildouble: 725 -ldouble: 725 +ildouble: 1 +ldouble: 1 # sin -Test "sin (0.7) == 0.64421768723769105367": -ildouble: 627 -ldouble: 627 +Test "sin (0.7) == 0.64421768723769105367261435139872014": +ildouble: 1 +ldouble: 1 # sincos -Test "sincos (0.7, &sin_res, &cos_res) puts 0.64421768723769105367 in sin_res": -ildouble: 627 -ldouble: 627 -Test "sincos (0.7, &sin_res, &cos_res) puts 0.76484218728448842626 in cos_res": +Test "sincos (0.7, &sin_res, &cos_res) puts 0.64421768723769105367261435139872014 in sin_res": +ildouble: 1 +ldouble: 1 +Test "sincos (0.7, &sin_res, &cos_res) puts 0.76484218728448842625585999019186495 in cos_res": double: 1 idouble: 1 -ildouble: 528 -ldouble: 528 Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": double: 1 float: 0.5 @@ -707,13 +641,15 @@ idouble: 1 ifloat: 0.5 ildouble: 1 ldouble: 1 -Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.866025403784438646764 in sin_res": +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res": double: 1 float: 1 idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.866025403784438646764 in sin_res": +ifloat: 1 Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res": double: 0.2758 float: 0.3667 @@ -726,30 +662,15 @@ ldouble: 0.25 Test "sinh (0.7) == 0.75858370183953350346": float: 1 ifloat: 1 -ildouble: 1028 -ldouble: 1028 - -# sqrt -Test "sqrt (0.7) == 0.83666002653407554798": -ildouble: 489 -ldouble: 489 -Test "sqrt (15239.9025) == 123.45": -ildouble: 325 -ldouble: 325 # tan Test "tan (0.7) == 0.84228838046307944813": -ildouble: 1401 -ldouble: 1401 +ildouble: 1 +ldouble: 1 Test "tan (pi/4) == 1": double: 0.5 idouble: 0.5 -# tanh -Test "tanh (0.7) == 0.60436777711716349631": -ildouble: 519 -ldouble: 519 - # tgamma Test "tgamma (-0.5) == -2 sqrt (pi)": double: 1 @@ -881,8 +802,8 @@ ifloat: 1 # Maximal error of functions: Function: "acos": -ildouble: 1150 -ldouble: 1150 +ildouble: 1 +ldouble: 1 Function: "acosh": ildouble: 1 @@ -891,110 +812,22 @@ ldouble: 1 Function: "asin": double: 1 idouble: 1 -ildouble: 1147 -ldouble: 1147 +ildouble: 1 +ldouble: 1 Function: "asinh": -ildouble: 656 -ldouble: 656 - -Function: "atan": -ildouble: 549 -ldouble: 549 - -Function: "atan2": -ildouble: 549 -ldouble: 549 +ildouble: 14 +ldouble: 14 Function: "atanh": double: 1 idouble: 1 -ildouble: 1606 -ldouble: 1606 Function: "cabs": float: 1 ifloat: 1 -ildouble: 560 -ldouble: 560 - -Function: Real part of "cacos": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 151 -ldouble: 151 - -Function: Imaginary part of "cacos": -float: 2 -ifloat: 2 -ildouble: 329 -ldouble: 329 - -Function: Real part of "cacosh": -double: 1 -float: 7 -idouble: 1 -ifloat: 7 -ildouble: 328 -ldouble: 328 - -Function: Imaginary part of "cacosh": -double: 1 -idouble: 1 -ildouble: 151 -ldouble: 151 - -Function: Real part of "casin": -double: 3 -float: 2 -idouble: 3 -ifloat: 2 -ildouble: 603 -ldouble: 603 - -Function: Imaginary part of "casin": -float: 2 -ifloat: 2 -ildouble: 329 -ldouble: 329 - -Function: Real part of "casinh": -double: 6 -float: 19 -idouble: 6 -ifloat: 19 -ildouble: 891 -ldouble: 891 - -Function: Imaginary part of "casinh": -double: 13 -float: 2 -idouble: 13 -ifloat: 2 -ildouble: 11 -ldouble: 11 - -Function: Real part of "catan": -ildouble: 250 -ldouble: 250 - -Function: Imaginary part of "catan": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 474 -ldouble: 474 - -Function: Real part of "catanh": -ildouble: 66 -ldouble: 66 - -Function: Imaginary part of "catanh": -ildouble: 447 -ldouble: 447 +ildouble: 1 +ldouble: 1 Function: "cbrt": double: 1 @@ -1002,151 +835,25 @@ idouble: 1 ildouble: 948 ldouble: 948 -Function: Real part of "ccos": -float: 1 -ifloat: 1 -ildouble: 5 -ldouble: 5 - -Function: Imaginary part of "ccos": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1901 -ldouble: 1901 - -Function: Real part of "ccosh": -double: 1 -float: 3 -idouble: 1 -ifloat: 3 -ildouble: 1467 -ldouble: 1467 - -Function: Imaginary part of "ccosh": -float: 1 -ifloat: 1 -ildouble: 1182 -ldouble: 1182 - -Function: Real part of "cexp": -float: 3 -ifloat: 3 -ildouble: 940 -ldouble: 940 - -Function: Imaginary part of "cexp": -float: 2 -ifloat: 2 -ildouble: 1067 -ldouble: 1067 - -Function: Imaginary part of "clog": -ildouble: 1 -ldouble: 1 - -Function: Real part of "clog10": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1402 -ldouble: 1402 - -Function: Imaginary part of "clog10": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 187 -ldouble: 187 - Function: "cos": double: 2 float: 1 idouble: 2 ifloat: 1 -ildouble: 529 -ldouble: 529 +ildouble: 1 +ldouble: 1 Function: "cosh": -ildouble: 309 -ldouble: 309 +ildouble: 2 +ldouble: 2 Function: Real part of "cpow": double: 1 -float: 1 idouble: 1 -ifloat: 1 -ildouble: 5 -ldouble: 5 Function: Imaginary part of "cpow": double: 1.103 -float: 6 idouble: 1.103 -ifloat: 6 -ildouble: 2 -ldouble: 2 - -Function: Real part of "csin": -float: 1 -ifloat: 1 -ildouble: 966 -ldouble: 966 - -Function: Imaginary part of "csin": -float: 1 -ifloat: 1 -ildouble: 168 -ldouble: 168 - -Function: Real part of "csinh": -float: 1 -ifloat: 1 -ildouble: 413 -ldouble: 413 - -Function: Imaginary part of "csinh": -float: 1 -ifloat: 1 -ildouble: 477 -ldouble: 477 - -Function: Real part of "csqrt": -float: 1 -ifloat: 1 -ildouble: 237 -ldouble: 237 - -Function: Imaginary part of "csqrt": -ildouble: 128 -ldouble: 128 - -Function: Real part of "ctan": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 689 -ldouble: 689 - -Function: Imaginary part of "ctan": -ildouble: 367 -ldouble: 367 - -Function: Real part of "ctanh": -float: 1 -ifloat: 1 -ildouble: 285 -ldouble: 285 - -Function: Imaginary part of "ctanh": -double: 1 -idouble: 1 -ildouble: 3074 -ldouble: 3074 Function: "erfc": double: 24 @@ -1154,37 +861,29 @@ float: 11 idouble: 24 ifloat: 11 -Function: "exp": -ildouble: 412 -ldouble: 412 - Function: "exp10": double: 1 idouble: 1 -ildouble: 1182 -ldouble: 1182 - -Function: "exp2": -ildouble: 461 -ldouble: 461 +ildouble: 1 +ldouble: 1 Function: "expm1": -ildouble: 825 -ldouble: 825 +ildouble: 1 +ldouble: 1 Function: "fmod": double: 2 float: 1 idouble: 2 ifloat: 1 -ildouble: 4096 -ldouble: 4096 +ildouble: 1 +ldouble: 1 Function: "hypot": float: 1 ifloat: 1 -ildouble: 560 -ldouble: 560 +ildouble: 1 +ldouble: 1 Function: "j0": float: 3 @@ -1211,68 +910,58 @@ double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 2342 -ldouble: 2342 +ildouble: 2 +ldouble: 2 Function: "log10": double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 2033 -ldouble: 2033 +ildouble: 1 +ldouble: 1 Function: "log1p": double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 584 -ldouble: 584 +ildouble: 2 +ldouble: 2 Function: "log2": double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 1689 -ldouble: 1689 +ildouble: 1 +ldouble: 1 Function: "pow": -ildouble: 725 -ldouble: 725 +ildouble: 1 +ldouble: 1 Function: "sin": -ildouble: 627 -ldouble: 627 +ildouble: 1 +ldouble: 1 Function: "sincos": double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 627 -ldouble: 627 +ildouble: 1 +ldouble: 1 Function: "sinh": float: 1 ifloat: 1 -ildouble: 1028 -ldouble: 1028 - -Function: "sqrt": -ildouble: 489 -ldouble: 489 Function: "tan": double: 0.5 idouble: 0.5 -ildouble: 1401 -ldouble: 1401 - -Function: "tanh": -ildouble: 519 -ldouble: 519 +ildouble: 1 +ldouble: 1 Function: "tgamma": double: 1 From d9c1416a4a5b9b3da5f90eabae5d7cecfd3b6986 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 18 Oct 2000 10:21:16 +0000 Subject: [PATCH 2328/4487] 2000-10-18 Andreas Jaeger * sysdeps/mips/dl-machine.h (ELF_MIPS_GNU_GOT1_OK): New. (ELF_MACHINE_BEFORE_RTLD_RELOC): Handle newer linkers. (elf_machine_runtime_link_map): Likewise. (elf_machine_runtime_setup): Likewise. Handle dynamic linker's local got entries. Patches by Ralf Baechle . 2000-10-09 Maciej W. Rozycki * sysdeps/mips/dl-machine.h (_dl_runtime_resolve): Define $sp as the frame pointer. Allocate stack space for $a0 for __dl_runtime_resolve(). Do not save $sp in $s0 as it's callee-saved anyway. --- sysdeps/mips/dl-machine.h | 60 +++++++++++++++++++++++---------------- 1 file changed, 35 insertions(+), 25 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 2a19126208..c0ece38719 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -136,7 +136,11 @@ elf_machine_load_address (void) } /* The MSB of got[1] of a gnu object is set to identify gnu objects. */ -#define ELF_MIPS_GNU_GOT1_MASK 0x80000000 +#define ELF_MIPS_GNU_GOT1_MASK 0x80000000 + +/* GNU Binutils upto 2.10 produce a wrong relocations. Bit 30 of + got[1] marks good objects. */ +#define ELF_MIPS_GNU_GOT1_OK 0x00000001 /* We can't rely on elf_machine_got_rel because _dl_object_relocation_scope fiddles with global data. */ @@ -149,6 +153,9 @@ do { \ \ got = (ElfW(Addr) *) D_PTR (map, l_info[DT_PLTGOT]); \ \ + if ((got[1] & ELF_MIPS_GNU_GOT1_MASK) != 0) \ + got[1] = (ElfW(Addr)) ELF_MIPS_GNU_GOT1_MASK \ + | (got[1] & ELF_MIPS_GNU_GOT1_OK); \ \ if (__builtin_expect (map->l_addr == 0, 1)) \ goto done; \ @@ -212,8 +219,8 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc) if ((g1 & ELF_MIPS_GNU_GOT1_MASK) != 0) { - struct link_map *l = - (struct link_map *) (g1 & ~ELF_MIPS_GNU_GOT1_MASK); + struct link_map *l = (struct link_map *) + (g1 & ~(ELF_MIPS_GNU_GOT1_MASK|ELF_MIPS_GNU_GOT1_OK)); ElfW(Addr) base, limit; const ElfW(Phdr) *p = l->l_phdr; ElfW(Half) this, nent = l->l_phnum; @@ -352,11 +359,12 @@ asm ("\n \ .type _dl_runtime_resolve,@function\n \ .ent _dl_runtime_resolve\n \ _dl_runtime_resolve:\n \ + .frame $29, 40, $31\n \ .set noreorder\n \ - # Save GP.\n \ + # Save GP.\n \ move $3, $28\n \ # Modify t9 ($25) so as to point .cpload instruction.\n \ - addu $25,8\n \ + addu $25, 8\n \ # Compute GP.\n \ .cpload $25\n \ .set reorder\n \ @@ -366,24 +374,20 @@ _dl_runtime_resolve:\n \ subu $29, 40\n \ .cprestore 32\n \ sw $15, 36($29)\n \ - sw $4, 12($29)\n \ - sw $5, 16($29)\n \ - sw $6, 20($29)\n \ - sw $7, 24($29)\n \ - sw $16, 28($29)\n \ - move $16, $29\n \ + sw $4, 16($29)\n \ + sw $5, 20($29)\n \ + sw $6, 24($29)\n \ + sw $7, 28($29)\n \ move $4, $24\n \ move $5, $15\n \ move $6, $3\n \ move $7, $2\n \ jal __dl_runtime_resolve\n \ - move $29, $16\n \ lw $31, 36($29)\n \ - lw $4, 12($29)\n \ - lw $5, 16($29)\n \ - lw $6, 20($29)\n \ - lw $7, 24($29)\n \ - lw $16, 28($29)\n \ + lw $4, 16($29)\n \ + lw $5, 20($29)\n \ + lw $6, 24($29)\n \ + lw $7, 28($29)\n \ addu $29, 40\n \ move $25, $2\n \ jr $25\n \ @@ -580,15 +584,20 @@ elf_machine_got_rel (struct link_map *map, int lazy) got = (ElfW(Addr) *) D_PTR (map, l_info[DT_PLTGOT]); - /* got[0] is reserved. got[1] is also reserved for the dynamic object - generated by gnu ld. Skip these reserved entries from relocation. */ - i = (got[1] & ELF_MIPS_GNU_GOT1_MASK)? 2 : 1; n = map->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; - /* Add the run-time display to all local got entries if needed. */ - if (__builtin_expect (map->l_addr != 0, 0)) + /* The dynamic linker's local got entries have already been relocated. */ + if (map != &_dl_rtld_map) { - while (i < n) - got[i++] += map->l_addr; + /* got[0] is reserved. got[1] is also reserved for the dynamic object + generated by gnu ld. Skip these reserved entries from relocation. */ + i = (got[1] & ELF_MIPS_GNU_GOT1_MASK)? 2 : 1; + + /* Add the run-time display to all local got entries if needed. */ + if (__builtin_expect (map->l_addr != 0, 0)) + { + while (i < n) + got[i++] += map->l_addr; + } } /* Handle global got entries. */ @@ -661,7 +670,8 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) of got[1] of a gnu object is set to identify gnu objects. Where we can store l for non gnu objects? XXX */ if ((got[1] & ELF_MIPS_GNU_GOT1_MASK) != 0) - got[1] = (ElfW(Addr)) ((unsigned) l | ELF_MIPS_GNU_GOT1_MASK); + got[1] = (ElfW(Addr)) ((unsigned) l | ELF_MIPS_GNU_GOT1_MASK + | (got[1] & ELF_MIPS_GNU_GOT1_OK)); else _dl_mips_gnu_objects = 0; } From d0168cc0992a79245c17d892a622fec527b1fb03 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 20 Oct 2000 06:14:58 +0000 Subject: [PATCH 2329/4487] (__new_semctl): Pass union semun as 4th argument to semctl syscall, not address of it. --- sysdeps/unix/sysv/linux/alpha/semctl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/semctl.c b/sysdeps/unix/sysv/linux/alpha/semctl.c index 48bc2d45cf..ea1a1e4d71 100644 --- a/sysdeps/unix/sysv/linux/alpha/semctl.c +++ b/sysdeps/unix/sysv/linux/alpha/semctl.c @@ -73,7 +73,7 @@ __new_semctl (int semid, int semnum, int cmd, ...) #if __ASSUME_32BITUIDS > 0 return INLINE_SYSCALL (semctl, 4, semid, semnum, cmd | __IPC_64, - CHECK_SEMCTL (&arg, semid, cmd | __IPC_64)); + CHECK_SEMCTL (&arg, semid, cmd | __IPC_64)->array); #else switch (cmd) { case SEM_STAT: @@ -82,7 +82,7 @@ __new_semctl (int semid, int semnum, int cmd, ...) break; default: return INLINE_SYSCALL (semctl, 4, semid, semnum, cmd, - CHECK_SEMCTL (&arg, semid, cmd)); + CHECK_SEMCTL (&arg, semid, cmd)->array); } { @@ -93,7 +93,7 @@ __new_semctl (int semid, int semnum, int cmd, ...) /* Unfortunately there is no way how to find out for sure whether we should use old or new semctl. */ result = INLINE_SYSCALL (semctl, 4, semid, semnum, cmd | __IPC_64, - CHECK_SEMCTL (&arg, semid, cmd | __IPC_64)); + CHECK_SEMCTL (&arg, semid, cmd | __IPC_64)->array); if (result != -1 || errno != EINVAL) return result; @@ -113,7 +113,7 @@ __new_semctl (int semid, int semnum, int cmd, ...) } } result = INLINE_SYSCALL (semctl, 4, semid, semnum, cmd, - CHECK_SEMCTL (&arg, semid, cmd)); + CHECK_SEMCTL (&arg, semid, cmd)->array); if (result != -1 && cmd != IPC_SET) { memset(buf, 0, sizeof(*buf)); From 8a02fd962edbf30c6da5a13bd6a0cd4a7e70fc93 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 20 Oct 2000 07:02:12 +0000 Subject: [PATCH 2330/4487] Include . --- sysdeps/unix/sysv/linux/mips/sys/syscall.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sysdeps/unix/sysv/linux/mips/sys/syscall.h b/sysdeps/unix/sysv/linux/mips/sys/syscall.h index 78248a13bd..fbfe128ec5 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/syscall.h +++ b/sysdeps/unix/sysv/linux/mips/sys/syscall.h @@ -19,6 +19,18 @@ #ifndef _SYSCALL_H #define _SYSCALL_H 1 +/* This file should list the numbers of the system the system knows. + But instead of duplicating this we use the information available + from the kernel sources. */ +#include + +/* The Linux kernel header file defines macros `__NR_', but some + programs expect the traditional form `SYS_'. So in building libc + we scan the kernel's list and produce with macros for + all the `SYS_' names. On MIPS the program which generates + on the other ports fails, so do this manually. */ + + /* * SVR4 syscalls are in the range from 1 to 999 */ From f1dba30859338176d3440a7d68fac14d392c9f49 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 20 Oct 2000 17:04:28 +0000 Subject: [PATCH 2331/4487] (elf_machine_matches_host): Parameter is now pointer to ELF header. --- sysdeps/alpha/dl-machine.h | 6 +++--- sysdeps/arm/dl-machine.h | 14 ++++---------- sysdeps/hppa/dl-machine.h | 10 +++++----- sysdeps/m68k/dl-machine.h | 12 +++--------- sysdeps/mips/dl-machine.h | 6 +++--- sysdeps/mips/mips64/dl-machine.h | 6 +++--- 6 files changed, 21 insertions(+), 33 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 69845b4b01..d9aeb18764 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -29,11 +29,11 @@ #include -/* Return nonzero iff E_MACHINE is compatible with the running host. */ +/* Return nonzero iff ELF header is compatible with the running host. */ static inline int -elf_machine_matches_host (Elf64_Word e_machine) +elf_machine_matches_host (const Elf64_Ehdr *ehdr) { - return e_machine == EM_ALPHA; + return ehdr->e_machine == EM_ALPHA; } /* Return the link-time address of _DYNAMIC. The multiple-got-capable diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index cbef92f3ae..9b40e6f98b 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -43,17 +43,11 @@ : "a1"); \ } -/* Return nonzero iff E_MACHINE is compatible with the running host. */ +/* Return nonzero iff ELF header is compatible with the running host. */ static inline int __attribute__ ((unused)) -elf_machine_matches_host (Elf32_Half e_machine) +elf_machine_matches_host (const Elf32_Ehdr *ehdr) { - switch (e_machine) - { - case EM_ARM: - return 1; - default: - return 0; - } + return ehdr->e_machine == EM_ARM; } @@ -491,7 +485,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, newvalue = value - (Elf32_Addr)reloc_addr + (addend << 2); if (newvalue & 0xfc000003) - newvalue = fix_bad_pc24(reloc_addr, value) + newvalue = fix_bad_pc24(reloc_addr, value) - (Elf32_Addr)reloc_addr + (addend << 2); newvalue = newvalue >> 2; diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h index e6782b3481..89ad542cdd 100644 --- a/sysdeps/hppa/dl-machine.h +++ b/sysdeps/hppa/dl-machine.h @@ -59,11 +59,11 @@ extern int __fptr_count; extern Elf32_Addr __hppa_make_fptr (const struct link_map *, Elf32_Addr, struct hppa_fptr **, struct hppa_fptr *); -/* Return nonzero iff E_MACHINE is compatible with the running host. */ +/* Return nonzero iff ELF header is compatible with the running host. */ static inline int -elf_machine_matches_host (Elf32_Half e_machine) +elf_machine_matches_host (const Elf32_Ehdr *ehdr) { - return e_machine == EM_PARISC; + return ehdr->e_machine == EM_PARISC; } @@ -252,7 +252,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) .text .globl _start .type _start,@function -_start: +_start: /* The kernel does not give us an initial stack frame. */ ldo 64(%sp),%sp /* Save the relevant arguments (yes, those are the correct @@ -357,7 +357,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) ldw RT'_dl_loaded(%r1),%r26 ldw 0(%r26),%r26 /* envp = argv + argc + 1 */ - sh2add %r25,%r24,%r23 + sh2add %r25,%r24,%r23 bl _dl_init,%r2 ldo 4(%r23),%r23 /* delay slot */ diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index 06c9db64a8..3381d6f25e 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -24,17 +24,11 @@ #include -/* Return nonzero iff E_MACHINE is compatible with the running host. */ +/* Return nonzero iff ELF header is compatible with the running host. */ static inline int -elf_machine_matches_host (Elf32_Half e_machine) +elf_machine_matches_host (const Elf32_Ehdr *ehdr) { - switch (e_machine) - { - case EM_68K: - return 1; - default: - return 0; - } + return ehdr->e_machine == EM_68K; } diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index c0ece38719..8051dc670c 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -86,11 +86,11 @@ do { if ((l)->l_info[DT_MIPS (RLD_MAP)]) \ (ElfW(Addr)) (r); \ } while (0) -/* Return nonzero iff E_MACHINE is compatible with the running host. */ +/* Return nonzero iff ELF header is compatible with the running host. */ static inline int __attribute__ ((unused)) -elf_machine_matches_host (ElfW(Half) e_machine) +elf_machine_matches_host (const ElfW(Ehdr) *ehdr) { - switch (e_machine) + switch (ehdr->e_machine) { case EM_MIPS: case EM_MIPS_RS3_LE: diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h index 195a1d3634..59bd581eae 100644 --- a/sysdeps/mips/mips64/dl-machine.h +++ b/sysdeps/mips/mips64/dl-machine.h @@ -77,11 +77,11 @@ do { if ((l)->l_info[DT_MIPS (RLD_MAP)]) \ (ElfW(Addr)) (r); \ } while (0) -/* Return nonzero iff E_MACHINE is compatible with the running host. */ +/* Return nonzero iff ELF header is compatible with the running host. */ static inline int __attribute__ ((unused)) -elf_machine_matches_host (ElfW(Half) e_machine) +elf_machine_matches_host (const ElfW(Ehdr) *ehdr) { - switch (e_machine) + switch (ehdr->e_machine) { case EM_MIPS: case EM_MIPS_RS3_LE: From eed537401d39fdf82d4fde6eac7277933ccd318f Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 23 Oct 2000 06:26:50 +0000 Subject: [PATCH 2332/4487] Add fcntl64. --- sysdeps/unix/sysv/linux/mips/syscalls.list | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index 67f3cd259d..ae0f33af1b 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -51,6 +51,7 @@ rt_sigsuspend - rt_sigsuspend i:pi __syscall_rt_sigsuspend rt_sigtimedwait - rt_sigtimedwait i:pppi __syscall_rt_sigtimedwait s_execve execve execve i:spp __syscall_execve s_fcntl fcntl fcntl i:iiF __syscall_fcntl +s_fcntl64 fcntl64 fcntl64 i:iiF __syscall_fcntl64 s_fstat64 fxstat64 fstat64 i:ip __syscall_fstat64 s_ftruncate64 ftruncate64 ftruncate64 i:iiii __syscall_ftruncate64 s_getcwd getcwd getcwd i:pi __syscall_getcwd From ee44fc4b607b8a2198d927ba3a0bcbdada822e19 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 23 Oct 2000 19:14:22 +0000 Subject: [PATCH 2333/4487] Updated. --- sysdeps/m68k/fpu/libm-test-ulps | 204 +++++++++++++++++++++++++++++++- 1 file changed, 198 insertions(+), 6 deletions(-) diff --git a/sysdeps/m68k/fpu/libm-test-ulps b/sysdeps/m68k/fpu/libm-test-ulps index ba14c9a6fb..ddbf3077e3 100644 --- a/sysdeps/m68k/fpu/libm-test-ulps +++ b/sysdeps/m68k/fpu/libm-test-ulps @@ -219,10 +219,6 @@ float: 1 ifloat: 1 ildouble: 19 ldouble: 19 -Test "Real part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i": -ifloat: 3 -Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i": -ifloat: 2 Test "Real part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i": float: 3 ifloat: 3 @@ -648,8 +644,6 @@ idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 -Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.866025403784438646764 in sin_res": -ifloat: 1 Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res": double: 0.2758 float: 0.3667 @@ -829,12 +823,148 @@ ifloat: 1 ildouble: 1 ldouble: 1 +Function: Real part of "cacos": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "cacos": +float: 2 +ifloat: 2 +ildouble: 1 +ldouble: 1 + +Function: Real part of "cacosh": +double: 1 +float: 7 +idouble: 1 +ifloat: 7 +ildouble: 5 +ldouble: 5 + +Function: Imaginary part of "cacosh": +double: 1 +idouble: 1 +ildouble: 2 +ldouble: 2 + +Function: Real part of "casin": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "casin": +float: 2 +ifloat: 2 +ildouble: 1 +ldouble: 1 + +Function: Real part of "casinh": +double: 6 +float: 19 +idouble: 6 +ifloat: 19 +ildouble: 6 +ldouble: 6 + +Function: Imaginary part of "casinh": +double: 13 +float: 2 +idouble: 13 +ifloat: 2 +ildouble: 7 +ldouble: 7 + +Function: Real part of "catan": +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "catan": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 7 +ldouble: 7 + +Function: Real part of "catanh": +ildouble: 2 +ldouble: 2 + +Function: Imaginary part of "catanh": +ildouble: 2 +ldouble: 2 + Function: "cbrt": double: 1 idouble: 1 ildouble: 948 ldouble: 948 +Function: Real part of "ccos": +float: 1 +ifloat: 1 + +Function: Imaginary part of "ccos": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "ccosh": +double: 1 +float: 3 +idouble: 1 +ifloat: 3 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "ccosh": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: Real part of "cexp": +float: 3 +ifloat: 3 +ildouble: 5 +ldouble: 5 + +Function: Imaginary part of "cexp": +float: 2 +ifloat: 2 +ildouble: 19 +ldouble: 19 + +Function: Imaginary part of "clog": +ildouble: 1 +ldouble: 1 + +Function: Real part of "clog10": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "clog10": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 3 +ldouble: 3 + Function: "cos": double: 2 float: 1 @@ -849,11 +979,73 @@ ldouble: 2 Function: Real part of "cpow": double: 1 +float: 1 idouble: 1 +ifloat: 1 +ildouble: 5 +ldouble: 5 Function: Imaginary part of "cpow": double: 1.103 +float: 6 idouble: 1.103 +ifloat: 6 +ildouble: 2 +ldouble: 2 + +Function: Real part of "csin": +float: 1 +ifloat: 1 + +Function: Imaginary part of "csin": +float: 1 +ifloat: 1 + +Function: Real part of "csinh": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "csinh": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: Real part of "csqrt": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "csqrt": +ildouble: 1 +ldouble: 1 + +Function: Real part of "ctan": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 439 +ldouble: 439 + +Function: Imaginary part of "ctan": +ildouble: 2 +ldouble: 2 + +Function: Real part of "ctanh": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: Imaginary part of "ctanh": +double: 1 +idouble: 1 +ildouble: 25 +ldouble: 25 Function: "erfc": double: 24 From 67d3dc3d796de3e0ba23cf522bed99677df2b760 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 24 Oct 2000 07:01:37 +0000 Subject: [PATCH 2334/4487] Partly revert patch from 2000-10-18. --- sysdeps/mips/dl-machine.h | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 8051dc670c..7c27de04b6 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -138,10 +138,6 @@ elf_machine_load_address (void) /* The MSB of got[1] of a gnu object is set to identify gnu objects. */ #define ELF_MIPS_GNU_GOT1_MASK 0x80000000 -/* GNU Binutils upto 2.10 produce a wrong relocations. Bit 30 of - got[1] marks good objects. */ -#define ELF_MIPS_GNU_GOT1_OK 0x00000001 - /* We can't rely on elf_machine_got_rel because _dl_object_relocation_scope fiddles with global data. */ #define ELF_MACHINE_BEFORE_RTLD_RELOC(dynamic_info) \ @@ -153,10 +149,6 @@ do { \ \ got = (ElfW(Addr) *) D_PTR (map, l_info[DT_PLTGOT]); \ \ - if ((got[1] & ELF_MIPS_GNU_GOT1_MASK) != 0) \ - got[1] = (ElfW(Addr)) ELF_MIPS_GNU_GOT1_MASK \ - | (got[1] & ELF_MIPS_GNU_GOT1_OK); \ - \ if (__builtin_expect (map->l_addr == 0, 1)) \ goto done; \ \ @@ -219,8 +211,8 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc) if ((g1 & ELF_MIPS_GNU_GOT1_MASK) != 0) { - struct link_map *l = (struct link_map *) - (g1 & ~(ELF_MIPS_GNU_GOT1_MASK|ELF_MIPS_GNU_GOT1_OK)); + struct link_map *l = + (struct link_map *) (g1 & ~ELF_MIPS_GNU_GOT1_MASK); ElfW(Addr) base, limit; const ElfW(Phdr) *p = l->l_phdr; ElfW(Half) this, nent = l->l_phnum; @@ -670,8 +662,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) of got[1] of a gnu object is set to identify gnu objects. Where we can store l for non gnu objects? XXX */ if ((got[1] & ELF_MIPS_GNU_GOT1_MASK) != 0) - got[1] = (ElfW(Addr)) ((unsigned) l | ELF_MIPS_GNU_GOT1_MASK - | (got[1] & ELF_MIPS_GNU_GOT1_OK)); + got[1] = (ElfW(Addr)) ((unsigned) l | ELF_MIPS_GNU_GOT1_MASK); else _dl_mips_gnu_objects = 0; } From fbbf3667bfb2f61a7d911c7e4736695413eb18b6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 25 Oct 2000 16:56:34 +0000 Subject: [PATCH 2335/4487] Updated. --- sysdeps/arm/libm-test-ulps | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sysdeps/arm/libm-test-ulps b/sysdeps/arm/libm-test-ulps index 4737025991..439c487e83 100644 --- a/sysdeps/arm/libm-test-ulps +++ b/sysdeps/arm/libm-test-ulps @@ -7,7 +7,7 @@ ifloat: 2 Test "asin (0.5) == pi/6": float: 2 ifloat: 2 -Test "asin (0.7) == 0.7753974966107530637": +Test "asin (0.7) == 0.77539749661075306374035335271498708": double: 1 float: 2 idouble: 1 @@ -164,12 +164,12 @@ idouble: 1 Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.1339809149295426134 - 0.0190985162611351964 i": float: 1 ifloat: 1 -Test "Real part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i": +Test "Real part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i": +Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i": float: 1 ifloat: 1 @@ -238,7 +238,7 @@ float: 1 ifloat: 1 # cos -Test "cos (0.7) == 0.7648421872844884262": +Test "cos (0.7) == 0.76484218728448842625585999019186495": double: 1 float: 1 idouble: 1 @@ -363,7 +363,7 @@ double: 2 float: 1 idouble: 2 ifloat: 1 -Test "exp10 (0.7) == 5.0118723362727228500": +Test "exp10 (0.7) == 5.0118723362727228500155418688494574": float: 1 ifloat: 1 Test "exp10 (3) == 1000": @@ -552,7 +552,7 @@ idouble: 1 ifloat: 1 # sincos -Test "sincos (0.7, &sin_res, &cos_res) puts 0.76484218728448842626 in cos_res": +Test "sincos (0.7, &sin_res, &cos_res) puts 0.76484218728448842625585999019186495 in cos_res": double: 1 float: 1 idouble: 1 @@ -562,7 +562,7 @@ double: 1 float: 0.5 idouble: 1 ifloat: 0.5 -Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.866025403784438646764 in sin_res": +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res": double: 1 float: 1 idouble: 1 From ff86bfcd6bede63f5399a9707b78acd303b80f60 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 26 Oct 2000 17:23:46 +0000 Subject: [PATCH 2336/4487] Update after libm-test.inc change. --- sysdeps/alpha/fpu/libm-test-ulps | 40 +++++++++++++++--------------- sysdeps/arm/libm-test-ulps | 40 +++++++++++++++--------------- sysdeps/m68k/fpu/libm-test-ulps | 42 ++++++++++++++++---------------- sysdeps/mips/fpu/libm-test-ulps | 40 +++++++++++++++--------------- 4 files changed, 81 insertions(+), 81 deletions(-) diff --git a/sysdeps/alpha/fpu/libm-test-ulps b/sysdeps/alpha/fpu/libm-test-ulps index 515d07169c..a36dacf17f 100644 --- a/sysdeps/alpha/fpu/libm-test-ulps +++ b/sysdeps/alpha/fpu/libm-test-ulps @@ -19,22 +19,22 @@ double: 1 idouble: 1 # cabs -Test "cabs (-0.7 + 12.4 i) == 12.41974234837422060118": +Test "cabs (-0.7 + 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-0.7 - 12.4 i) == 12.41974234837422060118": +Test "cabs (-0.7 - 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-12.4 + 0.7 i) == 12.41974234837422060118": +Test "cabs (-12.4 + 0.7 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-12.4 - 0.7 i) == 12.41974234837422060118": +Test "cabs (-12.4 - 0.7 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508": +Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508432547041028554": double: 1 idouble: 1 -Test "cabs (0.7 + 12.4 i) == 12.41974234837422060118": +Test "cabs (0.7 + 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 @@ -161,7 +161,7 @@ double: 1 idouble: 1 # cexp -Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.1339809149295426134 - 0.0190985162611351964 i": +Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": float: 1 ifloat: 1 Test "Real part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i": @@ -291,18 +291,18 @@ float: 1 ifloat: 1 # csqrt -Test "Real part of: csqrt (-2 + 3 i) == 0.8959774761298381247 + 1.6741492280355400404 i": +Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": float: 1 ifloat: 1 -Test "Real part of: csqrt (-2 - 3 i) == 0.8959774761298381247 - 1.6741492280355400404 i": +Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i": float: 1 ifloat: 1 -Test "Real part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i": +Test "Real part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i": +Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i": float: 1 ifloat: 1 @@ -400,31 +400,31 @@ idouble: 2 ifloat: 1 # hypot -Test "hypot (-0.7, -12.4) == 12.41974234837422060118": +Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (-0.7, 12.4) == 12.41974234837422060118": +Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (-12.4, -0.7) == 12.41974234837422060118": +Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (-12.4, 0.7) == 12.41974234837422060118": +Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (0.7, -12.4) == 12.41974234837422060118": +Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (0.7, 1.2) == 1.3892443989449804508": +Test "hypot (0.7, 1.2) == 1.3892443989449804508432547041028554": double: 1 idouble: 1 -Test "hypot (0.7, 12.4) == 12.41974234837422060118": +Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (12.4, -0.7) == 12.41974234837422060118": +Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (12.4, 0.7) == 12.41974234837422060118": +Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 diff --git a/sysdeps/arm/libm-test-ulps b/sysdeps/arm/libm-test-ulps index 439c487e83..23a0f35702 100644 --- a/sysdeps/arm/libm-test-ulps +++ b/sysdeps/arm/libm-test-ulps @@ -19,22 +19,22 @@ double: 1 idouble: 1 # cabs -Test "cabs (-0.7 + 12.4 i) == 12.41974234837422060118": +Test "cabs (-0.7 + 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-0.7 - 12.4 i) == 12.41974234837422060118": +Test "cabs (-0.7 - 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-12.4 + 0.7 i) == 12.41974234837422060118": +Test "cabs (-12.4 + 0.7 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-12.4 - 0.7 i) == 12.41974234837422060118": +Test "cabs (-12.4 - 0.7 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508": +Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508432547041028554": double: 1 idouble: 1 -Test "cabs (0.7 + 12.4 i) == 12.41974234837422060118": +Test "cabs (0.7 + 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 @@ -161,7 +161,7 @@ double: 1 idouble: 1 # cexp -Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.1339809149295426134 - 0.0190985162611351964 i": +Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": float: 1 ifloat: 1 Test "Real part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i": @@ -291,18 +291,18 @@ float: 1 ifloat: 1 # csqrt -Test "Real part of: csqrt (-2 + 3 i) == 0.8959774761298381247 + 1.6741492280355400404 i": +Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": float: 1 ifloat: 1 -Test "Real part of: csqrt (-2 - 3 i) == 0.8959774761298381247 - 1.6741492280355400404 i": +Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i": float: 1 ifloat: 1 -Test "Real part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i": +Test "Real part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i": +Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i": float: 1 ifloat: 1 @@ -400,31 +400,31 @@ idouble: 2 ifloat: 1 # hypot -Test "hypot (-0.7, -12.4) == 12.41974234837422060118": +Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (-0.7, 12.4) == 12.41974234837422060118": +Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (-12.4, -0.7) == 12.41974234837422060118": +Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (-12.4, 0.7) == 12.41974234837422060118": +Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (0.7, -12.4) == 12.41974234837422060118": +Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (0.7, 1.2) == 1.3892443989449804508": +Test "hypot (0.7, 1.2) == 1.3892443989449804508432547041028554": double: 1 idouble: 1 -Test "hypot (0.7, 12.4) == 12.41974234837422060118": +Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (12.4, -0.7) == 12.41974234837422060118": +Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (12.4, 0.7) == 12.41974234837422060118": +Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 diff --git a/sysdeps/m68k/fpu/libm-test-ulps b/sysdeps/m68k/fpu/libm-test-ulps index ddbf3077e3..8351aaf3e9 100644 --- a/sysdeps/m68k/fpu/libm-test-ulps +++ b/sysdeps/m68k/fpu/libm-test-ulps @@ -28,22 +28,22 @@ double: 1 idouble: 1 # cabs -Test "cabs (-0.7 + 12.4 i) == 12.41974234837422060118": +Test "cabs (-0.7 + 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-0.7 - 12.4 i) == 12.41974234837422060118": +Test "cabs (-0.7 - 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-12.4 + 0.7 i) == 12.41974234837422060118": +Test "cabs (-12.4 + 0.7 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-12.4 - 0.7 i) == 12.41974234837422060118": +Test "cabs (-12.4 - 0.7 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508": +Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508432547041028554": ildouble: 1 ldouble: 1 -Test "cabs (0.7 + 12.4 i) == 12.41974234837422060118": +Test "cabs (0.7 + 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 @@ -209,12 +209,12 @@ ildouble: 2 ldouble: 2 # cexp -Test "Real part of: cexp (-2.0 - 3.0 i) == -0.1339809149295426134 - 0.0190985162611351964 i": +Test "Real part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": float: 1 ifloat: 1 ildouble: 5 ldouble: 5 -Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.1339809149295426134 - 0.0190985162611351964 i": +Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": float: 1 ifloat: 1 ildouble: 19 @@ -344,16 +344,16 @@ float: 1 ifloat: 1 # csqrt -Test "Real part of: csqrt (-2 + 3 i) == 0.8959774761298381247 + 1.6741492280355400404 i": +Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": ildouble: 1 ldouble: 1 -Test "Real part of: csqrt (-2 - 3 i) == 0.8959774761298381247 - 1.6741492280355400404 i": +Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i": ildouble: 1 ldouble: 1 -Test "Real part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i": +Test "Real part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i": float: 1 ifloat: 1 -Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i": +Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i": ildouble: 1 ldouble: 1 @@ -453,31 +453,31 @@ ildouble: 1 ldouble: 1 # hypot -Test "hypot (-0.7, -12.4) == 12.41974234837422060118": +Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (-0.7, 12.4) == 12.41974234837422060118": +Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (-12.4, -0.7) == 12.41974234837422060118": +Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (-12.4, 0.7) == 12.41974234837422060118": +Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (0.7, -12.4) == 12.41974234837422060118": +Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (0.7, 1.2) == 1.3892443989449804508": +Test "hypot (0.7, 1.2) == 1.3892443989449804508432547041028554": ildouble: 1 ldouble: 1 -Test "hypot (0.7, 12.4) == 12.41974234837422060118": +Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (12.4, -0.7) == 12.41974234837422060118": +Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (12.4, 0.7) == 12.41974234837422060118": +Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 diff --git a/sysdeps/mips/fpu/libm-test-ulps b/sysdeps/mips/fpu/libm-test-ulps index 515d07169c..a36dacf17f 100644 --- a/sysdeps/mips/fpu/libm-test-ulps +++ b/sysdeps/mips/fpu/libm-test-ulps @@ -19,22 +19,22 @@ double: 1 idouble: 1 # cabs -Test "cabs (-0.7 + 12.4 i) == 12.41974234837422060118": +Test "cabs (-0.7 + 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-0.7 - 12.4 i) == 12.41974234837422060118": +Test "cabs (-0.7 - 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-12.4 + 0.7 i) == 12.41974234837422060118": +Test "cabs (-12.4 + 0.7 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-12.4 - 0.7 i) == 12.41974234837422060118": +Test "cabs (-12.4 - 0.7 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508": +Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508432547041028554": double: 1 idouble: 1 -Test "cabs (0.7 + 12.4 i) == 12.41974234837422060118": +Test "cabs (0.7 + 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 @@ -161,7 +161,7 @@ double: 1 idouble: 1 # cexp -Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.1339809149295426134 - 0.0190985162611351964 i": +Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": float: 1 ifloat: 1 Test "Real part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i": @@ -291,18 +291,18 @@ float: 1 ifloat: 1 # csqrt -Test "Real part of: csqrt (-2 + 3 i) == 0.8959774761298381247 + 1.6741492280355400404 i": +Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": float: 1 ifloat: 1 -Test "Real part of: csqrt (-2 - 3 i) == 0.8959774761298381247 - 1.6741492280355400404 i": +Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i": float: 1 ifloat: 1 -Test "Real part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i": +Test "Real part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i": +Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i": float: 1 ifloat: 1 @@ -400,31 +400,31 @@ idouble: 2 ifloat: 1 # hypot -Test "hypot (-0.7, -12.4) == 12.41974234837422060118": +Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (-0.7, 12.4) == 12.41974234837422060118": +Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (-12.4, -0.7) == 12.41974234837422060118": +Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (-12.4, 0.7) == 12.41974234837422060118": +Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (0.7, -12.4) == 12.41974234837422060118": +Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (0.7, 1.2) == 1.3892443989449804508": +Test "hypot (0.7, 1.2) == 1.3892443989449804508432547041028554": double: 1 idouble: 1 -Test "hypot (0.7, 12.4) == 12.41974234837422060118": +Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (12.4, -0.7) == 12.41974234837422060118": +Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (12.4, 0.7) == 12.41974234837422060118": +Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 From f7319991c9bffd80a4ed655f4c91c13acfb7a757 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 27 Oct 2000 06:38:28 +0000 Subject: [PATCH 2337/4487] Additional files to distribute in sysdeps/hppa. --- sysdeps/hppa/Dist | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sysdeps/hppa/Dist diff --git a/sysdeps/hppa/Dist b/sysdeps/hppa/Dist new file mode 100644 index 0000000000..9fc1de291a --- /dev/null +++ b/sysdeps/hppa/Dist @@ -0,0 +1,2 @@ +dl-symaddr.c +dl-fptr.c From b2746c3a1679288243558b97de8a57802e0ebc83 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 27 Oct 2000 06:40:17 +0000 Subject: [PATCH 2338/4487] Additional files to distribute in sysdeps/unix/sysv/linux/hppa. --- sysdeps/unix/sysv/linux/hppa/Dist | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/hppa/Dist diff --git a/sysdeps/unix/sysv/linux/hppa/Dist b/sysdeps/unix/sysv/linux/hppa/Dist new file mode 100644 index 0000000000..2954d3c4bf --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/Dist @@ -0,0 +1,5 @@ +umount.c +kernel_stat.h +kernel_sigaction.h +clone.S +sys/procfs.h From e4b950346fafe9ad6568473b98fdffde2d708dec Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 27 Oct 2000 06:48:36 +0000 Subject: [PATCH 2339/4487] Not needed. --- sysdeps/unix/bsd/osf/=dirstream.h | 44 ------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 sysdeps/unix/bsd/osf/=dirstream.h diff --git a/sysdeps/unix/bsd/osf/=dirstream.h b/sysdeps/unix/bsd/osf/=dirstream.h deleted file mode 100644 index c37610e258..0000000000 --- a/sysdeps/unix/bsd/osf/=dirstream.h +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@zen.org). - -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 -published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#ifndef _DIRSTREAM_H - -#define _DIRSTREAM_H 1 - -#define __need_size_t -#include - -/* Directory stream type. */ - -typedef struct - { - int __fd; /* File descriptor. */ - - size_t __offset; /* Current offset into the block. */ - size_t __size; /* Total valid data in the block. */ - char *__data; /* Directory block. */ - - int __allocation; /* Space allocated for the block. */ - - int __data_len; /* Size of __data. */ - long __dd_seek; /* OSF/1 magic cookie returned by getdents. */ - void *dd_lock; /* Used by OSF/1 for inter-thread locking. */ - - } DIR; - -#endif /* dirstream.h */ From a873180d70596717818009259419b895bcc32f9e Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 27 Oct 2000 16:22:44 +0000 Subject: [PATCH 2340/4487] Add some more ulps. --- sysdeps/m68k/fpu/libm-test-ulps | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sysdeps/m68k/fpu/libm-test-ulps b/sysdeps/m68k/fpu/libm-test-ulps index 8351aaf3e9..99965f8e06 100644 --- a/sysdeps/m68k/fpu/libm-test-ulps +++ b/sysdeps/m68k/fpu/libm-test-ulps @@ -499,6 +499,9 @@ ifloat: 1 Test "j1 (1.5) == 0.55793650791009964199": float: 1 ifloat: 1 +Test "j1 (2.0) == 0.57672480775687338720": +float: 1 +ifloat: 1 Test "j1 (10.0) == 0.043472746168861436670": float: 2 ifloat: 2 @@ -519,6 +522,9 @@ ifloat: 1 Test "jn (1, 1.5) == 0.55793650791009964199": float: 1 ifloat: 1 +Test "jn (1, 2.0) == 0.57672480775687338720": +float: 1 +ifloat: 1 Test "jn (1, 10.0) == 0.043472746168861436670": float: 2 ifloat: 2 @@ -772,8 +778,8 @@ Test "yn (10, 0.7) == -0.42447194260703866924e10": double: 6 idouble: 6 Test "yn (10, 10.0) == -0.35981415218340272205": -float: 1 -ifloat: 1 +float: 2 +ifloat: 2 Test "yn (10, 2.0) == -129184.54220803928264": double: 1 idouble: 1 From abde23bdcff8263785b3eac42e25f89e61a8cf27 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 1 Nov 2000 08:06:06 +0000 Subject: [PATCH 2341/4487] Linux/Alpha version of function to get CLK_TCK value. --- sysdeps/unix/sysv/linux/alpha/getclktck.c | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/getclktck.c diff --git a/sysdeps/unix/sysv/linux/alpha/getclktck.c b/sysdeps/unix/sysv/linux/alpha/getclktck.c new file mode 100644 index 0000000000..6636bbe689 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/getclktck.c @@ -0,0 +1,2 @@ +#define SYSTEM_CLK_TCK 1024 +#include From 374305ef4267cbb4265036774fc96bab3fb364e5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 1 Nov 2000 08:07:45 +0000 Subject: [PATCH 2342/4487] Use __sysconf to for CLK_TCK. --- sysdeps/unix/sysv/linux/alpha/bits/time.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/time.h b/sysdeps/unix/sysv/linux/alpha/bits/time.h index a0eddbeeca..b9d9f3f8d5 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/time.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/time.h @@ -36,7 +36,8 @@ # ifndef __STRICT_ANSI__ /* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK presents the real value for clock ticks per second for the system. */ -# define CLK_TCK 1024 +extern long int __sysconf (int); +# define CLK_TCK (__sysconf (2)) /* 2 is _SC_CLK_TCK */ # endif # ifdef __USE_POSIX199309 From e569ff55acc5e81e203d1397eb9a146fe26563e6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 1 Nov 2000 20:59:56 +0000 Subject: [PATCH 2343/4487] (CLK_TCK): Cast sysconf result to __clock_t. --- sysdeps/unix/sysv/linux/alpha/bits/time.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/time.h b/sysdeps/unix/sysv/linux/alpha/bits/time.h index b9d9f3f8d5..93c01c09c0 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/time.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/time.h @@ -36,8 +36,9 @@ # ifndef __STRICT_ANSI__ /* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK presents the real value for clock ticks per second for the system. */ +# include extern long int __sysconf (int); -# define CLK_TCK (__sysconf (2)) /* 2 is _SC_CLK_TCK */ +# define CLK_TCK ((__clock_t) __sysconf (2)) /* 2 is _SC_CLK_TCK */ # endif # ifdef __USE_POSIX199309 From 9285ecc8a1af8ce6916696bff58bd2bfd616b8ad Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 2 Nov 2000 09:32:30 +0000 Subject: [PATCH 2344/4487] (elf_machine_rel): Add the symbol's value plus the run-time displacement to the relocation for non-GOT symbols. Set the relocation to the GOT entry for GOT symbols. --- sysdeps/mips/dl-machine.h | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 7c27de04b6..cd8ee3c0e1 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -158,7 +158,7 @@ do { \ i = (got[1] & ELF_MIPS_GNU_GOT1_MASK)? 2 : 1; \ n = map->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; \ \ - /* Add the run-time display to all local got entries. */ \ + /* Add the run-time displacement to all local got entries. */ \ while (i < n) \ got[i++] += map->l_addr; \ \ @@ -508,10 +508,40 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, switch (ELFW(R_TYPE) (reloc->r_info)) { case R_MIPS_REL32: + { + int symidx = ELFW(R_SYM) (reloc->r_info); + + if (symidx) + { + const ElfW(Word) gotsym + = (const ElfW(Word)) map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val; + + if (symidx < gotsym) + { +#ifndef RTLD_BOOTSTRAP + if (map != &_dl_rtld_map) +#endif + *reloc_addr += sym->st_value + map->l_addr; + } + else + { +#ifndef RTLD_BOOTSTRAP + const ElfW(Addr) *got + = (const ElfW(Addr) *) D_PTR (map, l_info[DT_PLTGOT]); + const ElfW(Word) local_gotno + = (const ElfW(Word)) + map->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; + + *reloc_addr += got[symidx + local_gotno - gotsym]; +#endif + } + } + else #ifndef RTLD_BOOTSTRAP - if (map != &_dl_rtld_map) + if (map != &_dl_rtld_map) #endif - *reloc_addr += map->l_addr; + *reloc_addr += map->l_addr; + } break; case R_MIPS_NONE: /* Alright, Wilbur. */ break; @@ -584,7 +614,8 @@ elf_machine_got_rel (struct link_map *map, int lazy) generated by gnu ld. Skip these reserved entries from relocation. */ i = (got[1] & ELF_MIPS_GNU_GOT1_MASK)? 2 : 1; - /* Add the run-time display to all local got entries if needed. */ + /* Add the run-time displacement to all local got entries if + needed. */ if (__builtin_expect (map->l_addr != 0, 0)) { while (i < n) From a632433d283762306e995c9f69fc9936c30ce1b1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 10 Nov 2000 05:00:14 +0000 Subject: [PATCH 2345/4487] (GLIBC_2.1.1): Add getitimer. --- sysdeps/unix/sysv/linux/alpha/Versions | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/Versions b/sysdeps/unix/sysv/linux/alpha/Versions index ac21c9f038..3837b1afc6 100644 --- a/sysdeps/unix/sysv/linux/alpha/Versions +++ b/sysdeps/unix/sysv/linux/alpha/Versions @@ -51,6 +51,9 @@ libc { # w* wait4; } + GLIBC_2.1.1 { + getitimer; + } GLIBC_2.1.4 { pciconfig_iobase; } From 7f10098010d55bbeb1dc0bf6a4fc3b9e16cd9bd4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 10 Nov 2000 05:06:34 +0000 Subject: [PATCH 2346/4487] Correct last patch. --- sysdeps/unix/sysv/linux/alpha/Versions | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/Versions b/sysdeps/unix/sysv/linux/alpha/Versions index 3837b1afc6..0e6e519dd2 100644 --- a/sysdeps/unix/sysv/linux/alpha/Versions +++ b/sysdeps/unix/sysv/linux/alpha/Versions @@ -37,7 +37,7 @@ libc { getrusage; # time type change - gettimeofday; + gettimeofday; getitimer; # i* ieee_get_fp_control; ieee_set_fp_control; @@ -51,9 +51,6 @@ libc { # w* wait4; } - GLIBC_2.1.1 { - getitimer; - } GLIBC_2.1.4 { pciconfig_iobase; } From 90d62a5cb250e1d51180944375aefbf1cc7c7f71 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 13 Nov 2000 16:53:57 +0000 Subject: [PATCH 2347/4487] Update. --- sysdeps/alpha/fpu/libm-test-ulps | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sysdeps/alpha/fpu/libm-test-ulps b/sysdeps/alpha/fpu/libm-test-ulps index a36dacf17f..c278128ff4 100644 --- a/sysdeps/alpha/fpu/libm-test-ulps +++ b/sysdeps/alpha/fpu/libm-test-ulps @@ -7,7 +7,7 @@ ifloat: 2 Test "asin (0.5) == pi/6": float: 2 ifloat: 2 -Test "asin (0.7) == 0.7753974966107530637": +Test "asin (0.7) == 0.77539749661075306374035335271498708": double: 1 float: 2 idouble: 1 @@ -164,12 +164,12 @@ idouble: 1 Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": float: 1 ifloat: 1 -Test "Real part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i": +Test "Real part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i": +Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i": float: 1 ifloat: 1 @@ -238,7 +238,7 @@ float: 1 ifloat: 1 # cos -Test "cos (0.7) == 0.7648421872844884262": +Test "cos (0.7) == 0.76484218728448842625585999019186495": double: 1 float: 1 idouble: 1 @@ -363,7 +363,7 @@ double: 2 float: 1 idouble: 2 ifloat: 1 -Test "exp10 (0.7) == 5.0118723362727228500": +Test "exp10 (0.7) == 5.0118723362727228500155418688494574": float: 1 ifloat: 1 Test "exp10 (3) == 1000": @@ -552,7 +552,7 @@ idouble: 1 ifloat: 1 # sincos -Test "sincos (0.7, &sin_res, &cos_res) puts 0.76484218728448842626 in cos_res": +Test "sincos (0.7, &sin_res, &cos_res) puts 0.76484218728448842625585999019186495 in cos_res": double: 1 float: 1 idouble: 1 @@ -562,7 +562,7 @@ double: 1 float: 0.5 idouble: 1 ifloat: 0.5 -Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.866025403784438646764 in sin_res": +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res": double: 1 float: 1 idouble: 1 @@ -572,7 +572,7 @@ double: 0.2758 float: 0.3667 idouble: 0.2758 ifloat: 0.3667 -Test "sincos (pi/6, &sin_res, &cos_res) puts 0.866025403784438646764 in cos_res": +Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res": float: 1 ifloat: 1 From 3f95e592cb8d9742fe54e650c514951361d379a5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 16 Nov 2000 02:07:02 +0000 Subject: [PATCH 2348/4487] (RTLD_START): Update _dl_argv. --- sysdeps/alpha/dl-machine.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index d9aeb18764..73c6cbde19 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -314,10 +314,14 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) involves copying everything down, since the stack pointer must always be 16-byte aligned. */ ldq $2, 0($sp) + ldq $5, _dl_argv + subq $31, $1, $6 subq $2, $1, $2 + s8addq $6, $5, $5 mov $sp, $4 s8addq $1, $sp, $3 stq $2, 0($sp) + stq $5, _dl_argv /* Copy down argv. */ 0: ldq $5, 8($3) addq $4, 8, $4 From 081c74d4ccf166fa54127935c792eab253fb5362 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 20 Nov 2000 07:54:19 +0000 Subject: [PATCH 2349/4487] Fix comments --- sysdeps/unix/sysv/linux/mips/clone.S | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/clone.S b/sysdeps/unix/sysv/linux/mips/clone.S index cee391305c..dd7a1f56fe 100644 --- a/sysdeps/unix/sysv/linux/mips/clone.S +++ b/sysdeps/unix/sysv/linux/mips/clone.S @@ -82,15 +82,13 @@ error: /* Load up the arguments to the function. Put this block of code in its own function so that we can terminate the stack trace with our - debug info. - - At this point we have s0=arg, s1=fn. */ + debug info. */ ENTRY(__thread_start) /* cp is already loaded. */ .cprestore 16 /* The stackframe has been created on entry of clone(). */ - /* Resort the arg for user's function. */ + /* Restore the arg for user's function. */ lw t9,0(sp) /* Function pointer. */ lw a0,4(sp) /* Argument pointer. */ From bddc20b59aa5756a4bdcf33d557ee915e0252c3e Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 20 Nov 2000 07:55:06 +0000 Subject: [PATCH 2350/4487] (kernel_stat): Expand time_t to 'long int' not, 'unsigned int'. Use 'long int' for __unused? members. --- sysdeps/unix/sysv/linux/mips/kernel_stat.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/kernel_stat.h b/sysdeps/unix/sysv/linux/mips/kernel_stat.h index c6419baf37..41137b4fc7 100644 --- a/sysdeps/unix/sysv/linux/mips/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/mips/kernel_stat.h @@ -12,12 +12,12 @@ struct kernel_stat long int __pad2[2]; long int st_size; long int __pad3; - unsigned int st_atime; - unsigned int __unused1; - unsigned int st_mtime; - unsigned int __unused2; - unsigned int st_ctime; - unsigned int __unused3; + long int st_atime; + long int __unused1; + long int st_mtime; + long int __unused2; + long int st_ctime; + long int __unused3; long int st_blksize; long int st_blocks; char st_fstype[16]; /* Filesystem type name, unsupported */ From ec5d5a4d92e5f1bece6dc066248f9102951ae9af Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 20 Nov 2000 07:55:22 +0000 Subject: [PATCH 2351/4487] (O_NOFOLLOW): Use same value defined in /usr/include/asm-mips/fcntl.h. --- sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index 14593da5ab..5657c32c44 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -45,7 +45,7 @@ #endif #ifdef __USE_GNU -# define O_NOFOLLOW 0x4000 /* Do not follow links. */ +# define O_NOFOLLOW 0x20000 /* Do not follow links. */ # define O_DIRECT 0x8000 /* Direct disk access hint. */ # define O_DIRECTORY 0x10000 /* Must be a directory. */ #endif From 0abafb2042845d033b51faeebc31a5a556eb0f25 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 21 Nov 2000 20:55:38 +0000 Subject: [PATCH 2352/4487] * sysdeps/alpha/setjmp.S: Remove __setjmp entry point. * sysdeps/arm/setjmp.S: Likewise. * sysdeps/arm/fpu/setjmp.S: Likewise. * sysdeps/i386/setjmp.S: Likewise. * sysdeps/i386/elf/setjmp.S: Likewise. * sysdeps/s390/setjmp.S: Likewise. * sysdeps/s390/elf/setjmp.S: Likewise. * sysdeps/sh/sh3/setjmp.S: Likewise. * sysdeps/sh/sh4/setjmp.S: Likewise. * sysdeps/sparc/sparc32/setjmp.S: Likewise. * sysdeps/unix/sysv/linux/ia64/setjmp.S: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/setjmp.S: Likewise. * sysdeps/unix/sysv/linux/m68k/setjmp.c: Removed. --- sysdeps/alpha/setjmp.S | 6 +- sysdeps/arm/fpu/setjmp.S | 5 +- sysdeps/arm/setjmp.S | 5 +- sysdeps/unix/sysv/linux/m68k/setjmp.c | 81 --------------------------- 4 files changed, 5 insertions(+), 92 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/m68k/setjmp.c diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S index 894bb9ecf0..299bd4dd4a 100644 --- a/sysdeps/alpha/setjmp.S +++ b/sysdeps/alpha/setjmp.S @@ -72,11 +72,11 @@ END(__sigsetjmp) /* Put these traditional entry points in the same file so that we can elide much of the nonsense in trying to jmp to the real function. */ -ENTRY(__setjmp) +ENTRY(_setjmp) ldgp gp, 0(pv) mov 0, a1 br $sigsetjmp_local -END(__setjmp) +END(_setjmp) ENTRY(setjmp) ldgp gp, 0(pv) @@ -84,5 +84,5 @@ ENTRY(setjmp) br $sigsetjmp_local END(setjmp) -weak_alias(__setjmp, _setjmp) +weak_extern(_setjmp) weak_extern(setjmp) diff --git a/sysdeps/arm/fpu/setjmp.S b/sysdeps/arm/fpu/setjmp.S index 6ee53c57b0..b72900c89c 100644 --- a/sysdeps/arm/fpu/setjmp.S +++ b/sysdeps/arm/fpu/setjmp.S @@ -22,9 +22,6 @@ #define _ASM #include - /* Binary compatibility entry point. */ -ENTRY (__setjmp) - mov r1, #0 ENTRY (__sigsetjmp) /* Save registers */ sfmea f4, 4, [r0]! @@ -35,4 +32,4 @@ ENTRY (__sigsetjmp) /* Make a tail call to __sigjmp_save; it takes the same args. */ B PLTJMP(C_SYMBOL_NAME(__sigjmp_save)) -END (__setjmp) +END (__sigsetjmp) diff --git a/sysdeps/arm/setjmp.S b/sysdeps/arm/setjmp.S index 237cc0addd..97f76cd853 100644 --- a/sysdeps/arm/setjmp.S +++ b/sysdeps/arm/setjmp.S @@ -22,13 +22,10 @@ #define _ASM #include - /* Binary compatibility entry point. */ -ENTRY (__setjmp) - mov r1, #0 ENTRY (__sigsetjmp) /* Save registers */ stmia r0, {v1-v6, sl, fp, sp, lr} /* Make a tail call to __sigjmp_save; it takes the same args. */ B PLTJMP(C_SYMBOL_NAME(__sigjmp_save)) -END (__setjmp) +END (__sigsetjmp) diff --git a/sysdeps/unix/sysv/linux/m68k/setjmp.c b/sysdeps/unix/sysv/linux/m68k/setjmp.c deleted file mode 100644 index 477e8960c6..0000000000 --- a/sysdeps/unix/sysv/linux/m68k/setjmp.c +++ /dev/null @@ -1,81 +0,0 @@ -/* Copyright (C) 1991, 1992, 1994, 1996 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include - -/* Save the current program position in ENV and return 0. */ -int -__sigsetjmp (jmp_buf env, int savemask) -{ - /* Save data registers D1 through D7. */ - asm volatile ("movem%.l %/d1-%/d7, %0" - : : "m" (env[0].__jmpbuf[0].__dregs[0])); - - /* Save return address in place of register A0. */ - env[0].__jmpbuf[0].__aregs[0] = ((void **) &env)[-1]; - - /* Save address registers A1 through A5. */ - asm volatile ("movem%.l %/a1-%/a5, %0" - : : "m" (env[0].__jmpbuf[0].__aregs[1])); - - /* Save caller's FP, not our own. */ - env[0].__jmpbuf[0].__fp = ((void **) &env)[-2]; - - /* Save caller's SP, not our own. */ - env[0].__jmpbuf[0].__sp = (void *) &env; - -#if defined (__HAVE_68881__) || defined (__HAVE_FPU__) - /* Save floating-point (68881) registers FP0 through FP7. */ - asm volatile ("fmovem%.x %/fp0-%/fp7, %0" - : : "m" (env[0].__jmpbuf[0].__fpregs[0])); -#endif - - /* Save the signal mask if requested. */ - return __sigjmp_save (env, savemask); -} - -/* Binary compatibility entry point. */ -int -__setjmp (jmp_buf env) -{ - /* Save data registers D1 through D7. */ - asm volatile ("movem%.l %/d1-%/d7, %0" - : : "m" (env[0].__jmpbuf[0].__dregs[0])); - - /* Save return address in place of register A0. */ - env[0].__jmpbuf[0].__aregs[0] = ((void **) &env)[-1]; - - /* Save address registers A1 through A5. */ - asm volatile ("movem%.l %/a1-%/a5, %0" - : : "m" (env[0].__jmpbuf[0].__aregs[1])); - - /* Save caller's FP, not our own. */ - env[0].__jmpbuf[0].__fp = ((void **) &env)[-2]; - - /* Save caller's SP, not our own. */ - env[0].__jmpbuf[0].__sp = (void *) &env; - -#if defined (__HAVE_68881__) || defined (__HAVE_FPU__) - /* Save floating-point (68881) registers FP0 through FP7. */ - asm volatile ("fmovem%.x %/fp0-%/fp7, %0" - : : "m" (env[0].__jmpbuf[0].__fpregs[0])); -#endif - - /* The signal mask has already been dealt with. */ - return 0; -} From a9a575e676714657eae291655c6a72eb557e2c6b Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 27 Nov 2000 14:40:15 +0000 Subject: [PATCH 2353/4487] (__longjmp): Restore SP and FP last and in a single asm as they may be used to access other stored registers. --- sysdeps/mips/__longjmp.c | 14 +++++++------- sysdeps/mips/mips64/__longjmp.c | 15 ++++++++------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/sysdeps/mips/__longjmp.c b/sysdeps/mips/__longjmp.c index a1920ca257..66810a51ed 100644 --- a/sysdeps/mips/__longjmp.c +++ b/sysdeps/mips/__longjmp.c @@ -45,16 +45,10 @@ __longjmp (env, val_arg) asm volatile ("l.d $f28, %0" : : "m" (env[0].__fpregs[4])); asm volatile ("l.d $f30, %0" : : "m" (env[0].__fpregs[5])); - /* Restore the stack pointer. */ - asm volatile ("lw $29, %0" : : "m" (env[0].__sp)); - /* Get and reconstruct the floating point csr. */ asm volatile ("lw $2, %0" : : "m" (env[0].__fpc_csr)); asm volatile ("ctc1 $2, $31"); - /* Get the FP. */ - asm volatile ("lw $30, %0" : : "m" (env[0].__fp)); - /* Get the GP. */ asm volatile ("lw $gp, %0" : : "m" (env[0].__gp)); @@ -71,7 +65,13 @@ __longjmp (env, val_arg) /* Get the PC. */ asm volatile ("lw $25, %0" : : "m" (env[0].__pc)); - /* Give setjmp 1 if given a 0, or what they gave us if non-zero. */ + /* Restore the stack pointer and the FP. They have to be restored + last and in a single asm as gcc, depending on options used, may + use either of them to access env. */ + asm volatile ("lw $29, %0\n\t" + "lw $30, %1\n\t" : : "m" (env[0].__sp), "m" (env[0].__fp)); + +/* Give setjmp 1 if given a 0, or what they gave us if non-zero. */ if (val == 0) asm volatile ("li $2, 1"); else diff --git a/sysdeps/mips/mips64/__longjmp.c b/sysdeps/mips/mips64/__longjmp.c index 28fef4720b..3527be5e95 100644 --- a/sysdeps/mips/mips64/__longjmp.c +++ b/sysdeps/mips/mips64/__longjmp.c @@ -47,16 +47,10 @@ __longjmp (env, val_arg) asm volatile ("l.d $f30, %0" : : "m" (env[0].__fpregs[6])); asm volatile ("l.d $f31, %0" : : "m" (env[0].__fpregs[7])); - /* Restore the stack pointer. */ - asm volatile ("ld $29, %0" : : "m" (env[0].__sp)); - /* Get and reconstruct the floating point csr. */ asm volatile ("lw $2, %0" : : "m" (env[0].__fpc_csr)); asm volatile ("ctc1 $2, $31"); - /* Get the FP. */ - asm volatile ("ld $30, %0" : : "m" (env[0].__fp)); - /* Get the GP. */ asm volatile ("ld $gp, %0" : : "m" (env[0].__gp)); @@ -73,7 +67,14 @@ __longjmp (env, val_arg) /* Get the PC. */ asm volatile ("ld $31, %0" : : "m" (env[0].__pc)); - /* Give setjmp 1 if given a 0, or what they gave us if non-zero. */ + + /* Restore the stack pointer and the FP. They have to be restored + last and in a single asm as gcc, depending on options used, may + use either of them to access env. */ + asm volatile ("ld $29, %0\n\t" + "ld $30, %1\n\t" : : "m" (env[0].__sp), "m" (env[0].__fp)); + +/* Give setjmp 1 if given a 0, or what they gave us if non-zero. */ if (val == 0) asm volatile ("dli $2, 1"); else From 6e6f5adcfb61585744c2fd4e1cca44b4034400ca Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 28 Nov 2000 08:05:11 +0000 Subject: [PATCH 2354/4487] (struct cmsghdr): Use __flexarr. --- sysdeps/unix/sysv/linux/mips/bits/socket.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h index ac7ff0795d..ce6fa88c04 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/socket.h +++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h @@ -227,10 +227,8 @@ struct cmsghdr of cmsghdr structure. */ int cmsg_level; /* Originating protocol. */ int cmsg_type; /* Protocol specific type. */ -#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2 - unsigned char __cmsg_data[0]; /* Ancillary data. */ + unsigned char __cmsg_data __flexarr; /* Ancillary data. */ /* XXX Perhaps this should be removed. */ -#endif }; /* Ancillary data object manipulation macros. */ From 9ae8d03731d0ba960082c4f5a92aa0204e1eb319 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 28 Nov 2000 09:17:38 +0000 Subject: [PATCH 2355/4487] Synch with generic Linux version. --- sysdeps/unix/sysv/linux/mips/bits/socket.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h index ce6fa88c04..ae6832860d 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/socket.h +++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h @@ -214,7 +214,7 @@ struct msghdr struct iovec *msg_iov; /* Vector of data to send/receive into. */ size_t msg_iovlen; /* Number of elements in the vector. */ - void *msg_control; /* Ancillary data (eg BSD filedesc passing). */ + void *msg_control; /* Ancillary data (eg BSD filedesc passing). */ size_t msg_controllen; /* Ancillary data buffer length. */ int msg_flags; /* Flags on received message. */ @@ -227,7 +227,7 @@ struct cmsghdr of cmsghdr structure. */ int cmsg_level; /* Originating protocol. */ int cmsg_type; /* Protocol specific type. */ - unsigned char __cmsg_data __flexarr; /* Ancillary data. */ + __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */ /* XXX Perhaps this should be removed. */ }; @@ -242,7 +242,7 @@ struct cmsghdr ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \ ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL) #define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \ - & ~(sizeof (size_t) - 1)) + & (size_t) ~(sizeof (size_t) - 1)) #define CMSG_SPACE(len) (CMSG_ALIGN (len) \ + CMSG_ALIGN (sizeof (struct cmsghdr))) #define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len)) From 832725ccb4e850412a993ec181526600aefce7d2 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 29 Nov 2000 09:24:50 +0000 Subject: [PATCH 2356/4487] Remove unused variable. --- sysdeps/unix/sysv/linux/hppa/brk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/hppa/brk.c b/sysdeps/unix/sysv/linux/hppa/brk.c index 129c2bea25..c12608c6ee 100644 --- a/sysdeps/unix/sysv/linux/hppa/brk.c +++ b/sysdeps/unix/sysv/linux/hppa/brk.c @@ -1,5 +1,5 @@ /* brk system call for Linux/HPPA. - Copyright (C) 1995, 1996 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 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 @@ -32,7 +32,7 @@ weak_alias (__curbrk, ___brk_addr) int __brk (void *addr) { - void *newbrk, *scratch; + void *newbrk; __curbrk = newbrk = INLINE_SYSCALL(brk, 1, addr); From e9a0b83c8faab558e38fa317961f931c1c1d3cca Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 4 Dec 2000 08:37:22 +0000 Subject: [PATCH 2357/4487] Remove FLT_EVAL_METHOD and DECIMAL_DIG definitions. --- sysdeps/alpha/fpu/bits/mathdef.h | 6 ------ sysdeps/arm/fpu/bits/mathdef.h | 6 ------ sysdeps/m68k/fpu/bits/mathdef.h | 6 ------ 3 files changed, 18 deletions(-) diff --git a/sysdeps/alpha/fpu/bits/mathdef.h b/sysdeps/alpha/fpu/bits/mathdef.h index 3b80e82475..2750af8cd8 100644 --- a/sysdeps/alpha/fpu/bits/mathdef.h +++ b/sysdeps/alpha/fpu/bits/mathdef.h @@ -58,9 +58,6 @@ typedef double double_t; typedef double float_t; typedef double double_t; -/* Strange compiler, we don't know how it works. */ -# define FLT_EVAL_METHOD -1 - /* Define `INFINITY' as value of type `float'. */ # define INFINITY HUGE_VALF @@ -70,9 +67,6 @@ typedef double double_t; # define FP_ILOGB0 (-2147483647) # define FP_ILOGBNAN (2147483647) -/* Number of decimal digits for the `double' type. */ -# define DECIMAL_DIG 15 - #endif /* ISO C99 */ #ifndef __NO_LONG_DOUBLE_MATH diff --git a/sysdeps/arm/fpu/bits/mathdef.h b/sysdeps/arm/fpu/bits/mathdef.h index 374ad674c3..426fec7247 100644 --- a/sysdeps/arm/fpu/bits/mathdef.h +++ b/sysdeps/arm/fpu/bits/mathdef.h @@ -29,9 +29,6 @@ typedef float float_t; /* `float' expressions are evaluated as typedef double double_t; /* `double' expressions are evaluated as `double'. */ -/* Signal that types stay as they were declared. */ -# define FLT_EVAL_METHOD 0 - /* Define `INFINITY' as value of type `float'. */ # define INFINITY HUGE_VALF @@ -40,9 +37,6 @@ typedef double double_t; /* `double' expressions are evaluated as # define FP_ILOGB0 (-2147483647) # define FP_ILOGBNAN (2147483647) -/* Number of decimal digits for the `double' type. */ -# define DECIMAL_DIG 15 - #endif /* ISO C99 */ #ifndef __NO_LONG_DOUBLE_MATH diff --git a/sysdeps/m68k/fpu/bits/mathdef.h b/sysdeps/m68k/fpu/bits/mathdef.h index c3365a7ff2..4eec5d8cc4 100644 --- a/sysdeps/m68k/fpu/bits/mathdef.h +++ b/sysdeps/m68k/fpu/bits/mathdef.h @@ -31,9 +31,6 @@ typedef long double float_t; /* `float' expressions are evaluated as typedef long double double_t; /* `double' expressions are evaluated as `long double'. */ -/* Signal that both types are `long double'. */ -# define FLT_EVAL_METHOD 2 - /* Define `INFINITY' as value of type `float'. */ # define INFINITY HUGE_VALF @@ -41,7 +38,4 @@ typedef long double double_t; /* `double' expressions are evaluated as # define FP_ILOGB0 (-2147483647 - 1) # define FP_ILOGBNAN (2147483647) -/* Number of decimal digits for the `long double' type. */ -# define DECIMAL_DIG 18 - #endif /* ISO C99 */ From aa2f92db993b94d1bd632e0dee5abbd1f1388c56 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 5 Dec 2000 03:46:39 +0000 Subject: [PATCH 2358/4487] [$(subdir)==login] (sysdep_routines): Add setutxent, getutxent, endutxent, getutxid, getutxline, pututxline, and utmpxname. --- sysdeps/unix/sysv/aix/Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sysdeps/unix/sysv/aix/Makefile b/sysdeps/unix/sysv/aix/Makefile index 3de7e02f49..b49b56267e 100644 --- a/sysdeps/unix/sysv/aix/Makefile +++ b/sysdeps/unix/sysv/aix/Makefile @@ -9,6 +9,13 @@ ifeq ($(subdir),misc) sysdep_routines += dl-open dl-sym dl-close endif +ifeq ($(subdir),login) +sysdep_routines += setutxent getutxent endutxent getutxid getutxline \ + pututxline utmpxname + +sysdep_headers += utmpx.h bits/utmpx.h +endif + # Don't compile the ctype glue code, since there is no old non-GNU C library. inhibit-glue = yes From 74c9e7dc5aa97f7df031ab387571f0a9bda0469c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 5 Dec 2000 03:48:38 +0000 Subject: [PATCH 2359/4487] Define __fchdir. --- sysdeps/unix/sysv/aix/fchdir.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/aix/fchdir.c b/sysdeps/unix/sysv/aix/fchdir.c index 6036fbbffd..97d31714f5 100644 --- a/sysdeps/unix/sysv/aix/fchdir.c +++ b/sysdeps/unix/sysv/aix/fchdir.c @@ -1 +1,26 @@ -/* This is a system call. */ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +int +__fchdir (fd) + int fd; +{ + return fchdir (fd); +} From c4aa3b70bc4dbc7e23a4d6025af5b61e1d6095c9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 5 Dec 2000 03:55:49 +0000 Subject: [PATCH 2360/4487] Define __libc_lseek alias. --- sysdeps/unix/sysv/aix/lseek.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/aix/lseek.c b/sysdeps/unix/sysv/aix/lseek.c index 99a6fb50b1..387ebd0de8 100644 --- a/sysdeps/unix/sysv/aix/lseek.c +++ b/sysdeps/unix/sysv/aix/lseek.c @@ -6,3 +6,4 @@ __lseek (int fd, off_t offset, int whence) { return lseek (fd, offset, whence); } +strong_alias (__lseek, __libc_lseek) From ba2df8a93410c4da3a241980985b689d62eaad0b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 5 Dec 2000 03:57:00 +0000 Subject: [PATCH 2361/4487] Define __libc_open alias. --- sysdeps/unix/sysv/aix/open.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/aix/open.c b/sysdeps/unix/sysv/aix/open.c index 7bab537154..89cd955c38 100644 --- a/sysdeps/unix/sysv/aix/open.c +++ b/sysdeps/unix/sysv/aix/open.c @@ -35,3 +35,4 @@ __open (const char *file, int oflag, ...) return open (file, oflag, mode); } +strong_alias (__open, __libc_open) From 42696fe77fb1ac9b110d145a025b0bf34b5f9657 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 5 Dec 2000 03:57:44 +0000 Subject: [PATCH 2362/4487] Define pread alias. --- sysdeps/unix/sysv/aix/pread.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/aix/pread.c b/sysdeps/unix/sysv/aix/pread.c index 35fd7ca398..137fc3485c 100644 --- a/sysdeps/unix/sysv/aix/pread.c +++ b/sysdeps/unix/sysv/aix/pread.c @@ -25,3 +25,4 @@ __pread (int fd, void *buf, size_t len, off_t off) { return kpread (fd, buf, len, off); } +weak_alias (__pread, pread) From 6e7c7c2186b3485963d1f832280f59d0aedc0248 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 5 Dec 2000 03:58:15 +0000 Subject: [PATCH 2363/4487] Define pread64 alias. --- sysdeps/unix/sysv/aix/pread64.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/aix/pread64.c b/sysdeps/unix/sysv/aix/pread64.c index 428fc63321..1a88a7caa7 100644 --- a/sysdeps/unix/sysv/aix/pread64.c +++ b/sysdeps/unix/sysv/aix/pread64.c @@ -25,3 +25,4 @@ __pread64 (int fd, void *buf, size_t len, off64_t off) { return kpread (fd, buf, len, off); } +weak_alias (__pread64, pread64) From d4810d08f247473b6fc49312651441abb8d2b4b5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 5 Dec 2000 04:00:48 +0000 Subject: [PATCH 2364/4487] (JUMPTARGET): Use C_TEXT. --- sysdeps/unix/sysv/aix/sysdep.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/aix/sysdep.h b/sysdeps/unix/sysv/aix/sysdep.h index 182e324dfc..1a43f96bc3 100644 --- a/sysdeps/unix/sysv/aix/sysdep.h +++ b/sysdeps/unix/sysv/aix/sysdep.h @@ -85,4 +85,4 @@ C_TEXT (name): /* Jumping to another function. We are jumping to the TOC entry. */ -#define JUMPTARGET(name) name +#define JUMPTARGET(name) C_TEXT (name) From b75905aee7f0ed09640f3e43618da7b28e8959f5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 5 Dec 2000 04:03:03 +0000 Subject: [PATCH 2365/4487] Nothing. --- sysdeps/unix/sysv/aix/write.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/aix/write.c b/sysdeps/unix/sysv/aix/write.c index 6a43fb1290..c872e04810 100644 --- a/sysdeps/unix/sysv/aix/write.c +++ b/sysdeps/unix/sysv/aix/write.c @@ -1,4 +1,4 @@ -/* 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 Ulrich Drepper , 1999. From d84fcdf42a8e350d58d04a615372c52689f9ee57 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 5 Dec 2000 04:05:25 +0000 Subject: [PATCH 2366/4487] Define __clockid_t and __timer_t. --- sysdeps/unix/sysv/aix/bits/types.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sysdeps/unix/sysv/aix/bits/types.h b/sysdeps/unix/sysv/aix/bits/types.h index 830dcea7b0..a89393d704 100644 --- a/sysdeps/unix/sysv/aix/bits/types.h +++ b/sysdeps/unix/sysv/aix/bits/types.h @@ -87,6 +87,12 @@ typedef long int __swblk_t; /* Type of a swap block maybe? */ typedef int __clock_t; +/* Clock ID used in clock and timer functions. */ +typedef int __clockid_t; + +/* Timer ID returned by `timer_create'. */ +typedef int __timer_t; + /* One element in the file descriptor mask array. */ typedef unsigned long int __fd_mask; From 07aef1acd4a276ef839a506a3727634716a82172 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 5 Dec 2000 04:13:34 +0000 Subject: [PATCH 2367/4487] Cleanup. Add comments. --- sysdeps/unix/sysv/aix/bits/utmp.h | 40 +++++++++++++++---------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/sysdeps/unix/sysv/aix/bits/utmp.h b/sysdeps/unix/sysv/aix/bits/utmp.h index 04844096b0..38cf31e6ed 100644 --- a/sysdeps/unix/sysv/aix/bits/utmp.h +++ b/sysdeps/unix/sysv/aix/bits/utmp.h @@ -1,5 +1,5 @@ /* The `struct utmp' type, describing entries in the utmp file. AIX. - Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 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 @@ -21,12 +21,9 @@ # error "Never include directly; use instead." #endif - -#include - -#define _PATH_UTMP "/etc/utmp" -#define _PATH_WTMP "/var/adm/wtmp" -#define _PATH_LASTLOG "/var/adm/lastlog" +#include +#include +#include #define UT_LINESIZE 12 @@ -52,22 +49,25 @@ struct utmp }; +/* Values for the `ut_type' field of a `struct utmp'. */ +#define EMPTY 0 /* No valid user accounting information. */ + +#define RUN_LVL 1 /* The system's runlevel. */ +#define BOOT_TIME 2 /* Time of system boot. */ +#define OLD_TIME 3 /* Time when system clock changed. */ +#define NEW_TIME 4 /* Time after system clock changed. */ + +#define INIT_PROCESS 5 /* Process spawned by the init process. */ +#define LOGIN_PROCESS 6 /* Session leader of a logged in user. */ +#define USER_PROCESS 7 /* Normal process. */ +#define DEAD_PROCESS 8 /* Terminated process. */ + +#define ACCOUNTING 9 + + /* Tell the user that we have a modern system with UT_HOST, UT_TYPE, and UT_ID fields. */ #define _HAVE_UT_TYPE 1 #define _HAVE_UT_PID 1 #define _HAVE_UT_ID 1 #define _HAVE_UT_HOST 1 - - -/* Values for the `ut_type' field of a `struct utmp'. */ -#define EMPTY 0 -#define RUN_LVL 1 -#define BOOT_TIME 2 -#define OLD_TIME 3 -#define NEW_TIME 4 -#define INIT_PROCESS 5 -#define LOGIN_PROCESS 6 -#define USER_PROCESS 7 -#define DEAD_PROCESS 8 -#define ACCOUNTING 9 From bbeb0a2e8e5b8801ff29c0d177fb4b350b39c0c6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 5 Dec 2000 04:17:58 +0000 Subject: [PATCH 2368/4487] AIX/PPC implementation of lrintf. --- sysdeps/unix/sysv/aix/powerpc/s_lrint.c | 29 +++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/powerpc/s_lrint.c diff --git a/sysdeps/unix/sysv/aix/powerpc/s_lrint.c b/sysdeps/unix/sysv/aix/powerpc/s_lrint.c new file mode 100644 index 0000000000..18c42d5c4d --- /dev/null +++ b/sysdeps/unix/sysv/aix/powerpc/s_lrint.c @@ -0,0 +1,29 @@ +/* Round floating-point to integer. AIX/PowerPC version. + Copyright (C) 1997, 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +/* This code will also work for a 'float' argument. */ +asm ("\ + .globl .__lrintf + .globl .lrintf + .weak .lrintf + .set .__lrintf,.__lrint + .set .lrintf,.__lrint +"); From 3f4be017d81b23583836dad286ce70b98d73578f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 5 Dec 2000 16:18:48 +0000 Subject: [PATCH 2369/4487] Define MAXHOSTNAMELEN. --- sysdeps/unix/sysv/aix/sys/param.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/sysdeps/unix/sysv/aix/sys/param.h b/sysdeps/unix/sysv/aix/sys/param.h index 66f2127fbe..1f52c39311 100644 --- a/sysdeps/unix/sysv/aix/sys/param.h +++ b/sysdeps/unix/sysv/aix/sys/param.h @@ -1,3 +1,24 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_PARAM_H +#define _SYS_PARAM_H 1 + /* This file should contain various parameter macros appropriate for the machine and operating system. There is no standard set of macros; this file is just for compatibility with programs written for Unix that @@ -19,3 +40,9 @@ /* Macros for min/max. */ #define MIN(a,b) (((a)<(b))?(a):(b)) #define MAX(a,b) (((a)>(b))?(a):(b)) + + +/* Maximum length of hostname. */ +#define MAXHOSTNAMELEN 256 + +#endif /* sys/param.h */ From 6943ccb42b48c067355ec1c582b7e1f9d166acee Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 5 Dec 2000 17:39:49 +0000 Subject: [PATCH 2370/4487] Removed. --- sysdeps/unix/sysv/linux/mips/sys/syscall.h | 1226 -------------------- 1 file changed, 1226 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/mips/sys/syscall.h diff --git a/sysdeps/unix/sysv/linux/mips/sys/syscall.h b/sysdeps/unix/sysv/linux/mips/sys/syscall.h deleted file mode 100644 index fbfe128ec5..0000000000 --- a/sysdeps/unix/sysv/linux/mips/sys/syscall.h +++ /dev/null @@ -1,1226 +0,0 @@ -/* Copyright (C) 1995,1996,1997,1998,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 - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _SYSCALL_H -#define _SYSCALL_H 1 - -/* This file should list the numbers of the system the system knows. - But instead of duplicating this we use the information available - from the kernel sources. */ -#include - -/* The Linux kernel header file defines macros `__NR_', but some - programs expect the traditional form `SYS_'. So in building libc - we scan the kernel's list and produce with macros for - all the `SYS_' names. On MIPS the program which generates - on the other ports fails, so do this manually. */ - - -/* - * SVR4 syscalls are in the range from 1 to 999 - */ -#define SYS_SVR4 0 -#define SYS_SVR4_syscall (SYS_SVR4 + 0) -#define SYS_SVR4_exit (SYS_SVR4 + 1) -#define SYS_SVR4_fork (SYS_SVR4 + 2) -#define SYS_SVR4_read (SYS_SVR4 + 3) -#define SYS_SVR4_write (SYS_SVR4 + 4) -#define SYS_SVR4_open (SYS_SVR4 + 5) -#define SYS_SVR4_close (SYS_SVR4 + 6) -#define SYS_SVR4_wait (SYS_SVR4 + 7) -#define SYS_SVR4_creat (SYS_SVR4 + 8) -#define SYS_SVR4_link (SYS_SVR4 + 9) -#define SYS_SVR4_unlink (SYS_SVR4 + 10) -#define SYS_SVR4_exec (SYS_SVR4 + 11) -#define SYS_SVR4_chdir (SYS_SVR4 + 12) -#define SYS_SVR4_gtime (SYS_SVR4 + 13) -#define SYS_SVR4_mknod (SYS_SVR4 + 14) -#define SYS_SVR4_chmod (SYS_SVR4 + 15) -#define SYS_SVR4_chown (SYS_SVR4 + 16) -#define SYS_SVR4_sbreak (SYS_SVR4 + 17) -#define SYS_SVR4_stat (SYS_SVR4 + 18) -#define SYS_SVR4_lseek (SYS_SVR4 + 19) -#define SYS_SVR4_getpid (SYS_SVR4 + 20) -#define SYS_SVR4_mount (SYS_SVR4 + 21) -#define SYS_SVR4_umount (SYS_SVR4 + 22) -#define SYS_SVR4_setuid (SYS_SVR4 + 23) -#define SYS_SVR4_getuid (SYS_SVR4 + 24) -#define SYS_SVR4_stime (SYS_SVR4 + 25) -#define SYS_SVR4_ptrace (SYS_SVR4 + 26) -#define SYS_SVR4_alarm (SYS_SVR4 + 27) -#define SYS_SVR4_fstat (SYS_SVR4 + 28) -#define SYS_SVR4_pause (SYS_SVR4 + 29) -#define SYS_SVR4_utime (SYS_SVR4 + 30) -#define SYS_SVR4_stty (SYS_SVR4 + 31) -#define SYS_SVR4_gtty (SYS_SVR4 + 32) -#define SYS_SVR4_access (SYS_SVR4 + 33) -#define SYS_SVR4_nice (SYS_SVR4 + 34) -#define SYS_SVR4_statfs (SYS_SVR4 + 35) -#define SYS_SVR4_sync (SYS_SVR4 + 36) -#define SYS_SVR4_kill (SYS_SVR4 + 37) -#define SYS_SVR4_fstatfs (SYS_SVR4 + 38) -#define SYS_SVR4_setpgrp (SYS_SVR4 + 39) -#define SYS_SVR4_cxenix (SYS_SVR4 + 40) -#define SYS_SVR4_dup (SYS_SVR4 + 41) -#define SYS_SVR4_pipe (SYS_SVR4 + 42) -#define SYS_SVR4_times (SYS_SVR4 + 43) -#define SYS_SVR4_profil (SYS_SVR4 + 44) -#define SYS_SVR4_plock (SYS_SVR4 + 45) -#define SYS_SVR4_setgid (SYS_SVR4 + 46) -#define SYS_SVR4_getgid (SYS_SVR4 + 47) -#define SYS_SVR4_sig (SYS_SVR4 + 48) -#define SYS_SVR4_msgsys (SYS_SVR4 + 49) -#define SYS_SVR4_sysmips (SYS_SVR4 + 50) -#define SYS_SVR4_sysacct (SYS_SVR4 + 51) -#define SYS_SVR4_shmsys (SYS_SVR4 + 52) -#define SYS_SVR4_semsys (SYS_SVR4 + 53) -#define SYS_SVR4_ioctl (SYS_SVR4 + 54) -#define SYS_SVR4_uadmin (SYS_SVR4 + 55) -#define SYS_SVR4_exch (SYS_SVR4 + 56) -#define SYS_SVR4_utssys (SYS_SVR4 + 57) -#define SYS_SVR4_fsync (SYS_SVR4 + 58) -#define SYS_SVR4_exece (SYS_SVR4 + 59) -#define SYS_SVR4_umask (SYS_SVR4 + 60) -#define SYS_SVR4_chroot (SYS_SVR4 + 61) -#define SYS_SVR4_fcntl (SYS_SVR4 + 62) -#define SYS_SVR4_ulimit (SYS_SVR4 + 63) -#define SYS_SVR4_reserved1 (SYS_SVR4 + 64) -#define SYS_SVR4_reserved2 (SYS_SVR4 + 65) -#define SYS_SVR4_reserved3 (SYS_SVR4 + 66) -#define SYS_SVR4_reserved4 (SYS_SVR4 + 67) -#define SYS_SVR4_reserved5 (SYS_SVR4 + 68) -#define SYS_SVR4_reserved6 (SYS_SVR4 + 69) -#define SYS_SVR4_advfs (SYS_SVR4 + 70) -#define SYS_SVR4_unadvfs (SYS_SVR4 + 71) -#define SYS_SVR4_unused1 (SYS_SVR4 + 72) -#define SYS_SVR4_unused2 (SYS_SVR4 + 73) -#define SYS_SVR4_rfstart (SYS_SVR4 + 74) -#define SYS_SVR4_unused3 (SYS_SVR4 + 75) -#define SYS_SVR4_rdebug (SYS_SVR4 + 76) -#define SYS_SVR4_rfstop (SYS_SVR4 + 77) -#define SYS_SVR4_rfsys (SYS_SVR4 + 78) -#define SYS_SVR4_rmdir (SYS_SVR4 + 79) -#define SYS_SVR4_mkdir (SYS_SVR4 + 80) -#define SYS_SVR4_getdents (SYS_SVR4 + 81) -#define SYS_SVR4_libattach (SYS_SVR4 + 82) -#define SYS_SVR4_libdetach (SYS_SVR4 + 83) -#define SYS_SVR4_sysfs (SYS_SVR4 + 84) -#define SYS_SVR4_getmsg (SYS_SVR4 + 85) -#define SYS_SVR4_putmsg (SYS_SVR4 + 86) -#define SYS_SVR4_poll (SYS_SVR4 + 87) -#define SYS_SVR4_lstat (SYS_SVR4 + 88) -#define SYS_SVR4_symlink (SYS_SVR4 + 89) -#define SYS_SVR4_readlink (SYS_SVR4 + 90) -#define SYS_SVR4_setgroups (SYS_SVR4 + 91) -#define SYS_SVR4_getgroups (SYS_SVR4 + 92) -#define SYS_SVR4_fchmod (SYS_SVR4 + 93) -#define SYS_SVR4_fchown (SYS_SVR4 + 94) -#define SYS_SVR4_sigprocmask (SYS_SVR4 + 95) -#define SYS_SVR4_sigsuspend (SYS_SVR4 + 96) -#define SYS_SVR4_sigaltstack (SYS_SVR4 + 97) -#define SYS_SVR4_sigaction (SYS_SVR4 + 98) -#define SYS_SVR4_sigpending (SYS_SVR4 + 99) -#define SYS_SVR4_setcontext (SYS_SVR4 + 100) -#define SYS_SVR4_evsys (SYS_SVR4 + 101) -#define SYS_SVR4_evtrapret (SYS_SVR4 + 102) -#define SYS_SVR4_statvfs (SYS_SVR4 + 103) -#define SYS_SVR4_fstatvfs (SYS_SVR4 + 104) -#define SYS_SVR4_reserved7 (SYS_SVR4 + 105) -#define SYS_SVR4_nfssys (SYS_SVR4 + 106) -#define SYS_SVR4_waitid (SYS_SVR4 + 107) -#define SYS_SVR4_sigsendset (SYS_SVR4 + 108) -#define SYS_SVR4_hrtsys (SYS_SVR4 + 109) -#define SYS_SVR4_acancel (SYS_SVR4 + 110) -#define SYS_SVR4_async (SYS_SVR4 + 111) -#define SYS_SVR4_priocntlset (SYS_SVR4 + 112) -#define SYS_SVR4_pathconf (SYS_SVR4 + 113) -#define SYS_SVR4_mincore (SYS_SVR4 + 114) -#define SYS_SVR4_mmap (SYS_SVR4 + 115) -#define SYS_SVR4_mprotect (SYS_SVR4 + 116) -#define SYS_SVR4_munmap (SYS_SVR4 + 117) -#define SYS_SVR4_fpathconf (SYS_SVR4 + 118) -#define SYS_SVR4_vfork (SYS_SVR4 + 119) -#define SYS_SVR4_fchdir (SYS_SVR4 + 120) -#define SYS_SVR4_readv (SYS_SVR4 + 121) -#define SYS_SVR4_writev (SYS_SVR4 + 122) -#define SYS_SVR4_xstat (SYS_SVR4 + 123) -#define SYS_SVR4_lxstat (SYS_SVR4 + 124) -#define SYS_SVR4_fxstat (SYS_SVR4 + 125) -#define SYS_SVR4_xmknod (SYS_SVR4 + 126) -#define SYS_SVR4_clocal (SYS_SVR4 + 127) -#define SYS_SVR4_setrlimit (SYS_SVR4 + 128) -#define SYS_SVR4_getrlimit (SYS_SVR4 + 129) -#define SYS_SVR4_lchown (SYS_SVR4 + 130) -#define SYS_SVR4_memcntl (SYS_SVR4 + 131) -#define SYS_SVR4_getpmsg (SYS_SVR4 + 132) -#define SYS_SVR4_putpmsg (SYS_SVR4 + 133) -#define SYS_SVR4_rename (SYS_SVR4 + 134) -#define SYS_SVR4_nuname (SYS_SVR4 + 135) -#define SYS_SVR4_setegid (SYS_SVR4 + 136) -#define SYS_SVR4_sysconf (SYS_SVR4 + 137) -#define SYS_SVR4_adjtime (SYS_SVR4 + 138) -#define SYS_SVR4_sysinfo (SYS_SVR4 + 139) -#define SYS_SVR4_reserved8 (SYS_SVR4 + 140) -#define SYS_SVR4_seteuid (SYS_SVR4 + 141) -#define SYS_SVR4_PYRAMID_statis (SYS_SVR4 + 142) -#define SYS_SVR4_PYRAMID_tuning (SYS_SVR4 + 143) -#define SYS_SVR4_PYRAMID_forcerr (SYS_SVR4 + 144) -#define SYS_SVR4_PYRAMID_mpcntl (SYS_SVR4 + 145) -#define SYS_SVR4_reserved9 (SYS_SVR4 + 146) -#define SYS_SVR4_reserved10 (SYS_SVR4 + 147) -#define SYS_SVR4_reserved11 (SYS_SVR4 + 148) -#define SYS_SVR4_reserved12 (SYS_SVR4 + 149) -#define SYS_SVR4_reserved13 (SYS_SVR4 + 150) -#define SYS_SVR4_reserved14 (SYS_SVR4 + 151) -#define SYS_SVR4_reserved15 (SYS_SVR4 + 152) -#define SYS_SVR4_reserved16 (SYS_SVR4 + 153) -#define SYS_SVR4_reserved17 (SYS_SVR4 + 154) -#define SYS_SVR4_reserved18 (SYS_SVR4 + 155) -#define SYS_SVR4_reserved19 (SYS_SVR4 + 156) -#define SYS_SVR4_reserved20 (SYS_SVR4 + 157) -#define SYS_SVR4_reserved21 (SYS_SVR4 + 158) -#define SYS_SVR4_reserved22 (SYS_SVR4 + 159) -#define SYS_SVR4_reserved23 (SYS_SVR4 + 160) -#define SYS_SVR4_reserved24 (SYS_SVR4 + 161) -#define SYS_SVR4_reserved25 (SYS_SVR4 + 162) -#define SYS_SVR4_reserved26 (SYS_SVR4 + 163) -#define SYS_SVR4_reserved27 (SYS_SVR4 + 164) -#define SYS_SVR4_reserved28 (SYS_SVR4 + 165) -#define SYS_SVR4_reserved29 (SYS_SVR4 + 166) -#define SYS_SVR4_reserved30 (SYS_SVR4 + 167) -#define SYS_SVR4_reserved31 (SYS_SVR4 + 168) -#define SYS_SVR4_reserved32 (SYS_SVR4 + 169) -#define SYS_SVR4_reserved33 (SYS_SVR4 + 170) -#define SYS_SVR4_reserved34 (SYS_SVR4 + 171) -#define SYS_SVR4_reserved35 (SYS_SVR4 + 172) -#define SYS_SVR4_reserved36 (SYS_SVR4 + 173) -#define SYS_SVR4_reserved37 (SYS_SVR4 + 174) -#define SYS_SVR4_reserved38 (SYS_SVR4 + 175) -#define SYS_SVR4_reserved39 (SYS_SVR4 + 176) -#define SYS_SVR4_reserved40 (SYS_SVR4 + 177) -#define SYS_SVR4_reserved41 (SYS_SVR4 + 178) -#define SYS_SVR4_reserved42 (SYS_SVR4 + 179) -#define SYS_SVR4_reserved43 (SYS_SVR4 + 180) -#define SYS_SVR4_reserved44 (SYS_SVR4 + 181) -#define SYS_SVR4_reserved45 (SYS_SVR4 + 182) -#define SYS_SVR4_reserved46 (SYS_SVR4 + 183) -#define SYS_SVR4_reserved47 (SYS_SVR4 + 184) -#define SYS_SVR4_reserved48 (SYS_SVR4 + 185) -#define SYS_SVR4_reserved49 (SYS_SVR4 + 186) -#define SYS_SVR4_reserved50 (SYS_SVR4 + 187) -#define SYS_SVR4_reserved51 (SYS_SVR4 + 188) -#define SYS_SVR4_reserved52 (SYS_SVR4 + 189) -#define SYS_SVR4_reserved53 (SYS_SVR4 + 190) -#define SYS_SVR4_reserved54 (SYS_SVR4 + 191) -#define SYS_SVR4_reserved55 (SYS_SVR4 + 192) -#define SYS_SVR4_reserved56 (SYS_SVR4 + 193) -#define SYS_SVR4_reserved57 (SYS_SVR4 + 194) -#define SYS_SVR4_reserved58 (SYS_SVR4 + 195) -#define SYS_SVR4_reserved59 (SYS_SVR4 + 196) -#define SYS_SVR4_reserved60 (SYS_SVR4 + 197) -#define SYS_SVR4_reserved61 (SYS_SVR4 + 198) -#define SYS_SVR4_reserved62 (SYS_SVR4 + 199) -#define SYS_SVR4_reserved63 (SYS_SVR4 + 200) -#define SYS_SVR4_aread (SYS_SVR4 + 201) -#define SYS_SVR4_awrite (SYS_SVR4 + 202) -#define SYS_SVR4_listio (SYS_SVR4 + 203) -#define SYS_SVR4_mips_acancel (SYS_SVR4 + 204) -#define SYS_SVR4_astatus (SYS_SVR4 + 205) -#define SYS_SVR4_await (SYS_SVR4 + 206) -#define SYS_SVR4_areadv (SYS_SVR4 + 207) -#define SYS_SVR4_awritev (SYS_SVR4 + 208) -#define SYS_SVR4_MIPS_reserved1 (SYS_SVR4 + 209) -#define SYS_SVR4_MIPS_reserved2 (SYS_SVR4 + 210) -#define SYS_SVR4_MIPS_reserved3 (SYS_SVR4 + 211) -#define SYS_SVR4_MIPS_reserved4 (SYS_SVR4 + 212) -#define SYS_SVR4_MIPS_reserved5 (SYS_SVR4 + 213) -#define SYS_SVR4_MIPS_reserved6 (SYS_SVR4 + 214) -#define SYS_SVR4_MIPS_reserved7 (SYS_SVR4 + 215) -#define SYS_SVR4_MIPS_reserved8 (SYS_SVR4 + 216) -#define SYS_SVR4_MIPS_reserved9 (SYS_SVR4 + 217) -#define SYS_SVR4_MIPS_reserved10 (SYS_SVR4 + 218) -#define SYS_SVR4_MIPS_reserved11 (SYS_SVR4 + 219) -#define SYS_SVR4_MIPS_reserved12 (SYS_SVR4 + 220) -#define SYS_SVR4_CDC_reserved1 (SYS_SVR4 + 221) -#define SYS_SVR4_CDC_reserved2 (SYS_SVR4 + 222) -#define SYS_SVR4_CDC_reserved3 (SYS_SVR4 + 223) -#define SYS_SVR4_CDC_reserved4 (SYS_SVR4 + 224) -#define SYS_SVR4_CDC_reserved5 (SYS_SVR4 + 225) -#define SYS_SVR4_CDC_reserved6 (SYS_SVR4 + 226) -#define SYS_SVR4_CDC_reserved7 (SYS_SVR4 + 227) -#define SYS_SVR4_CDC_reserved8 (SYS_SVR4 + 228) -#define SYS_SVR4_CDC_reserved9 (SYS_SVR4 + 229) -#define SYS_SVR4_CDC_reserved10 (SYS_SVR4 + 230) -#define SYS_SVR4_CDC_reserved11 (SYS_SVR4 + 231) -#define SYS_SVR4_CDC_reserved12 (SYS_SVR4 + 232) -#define SYS_SVR4_CDC_reserved13 (SYS_SVR4 + 233) -#define SYS_SVR4_CDC_reserved14 (SYS_SVR4 + 234) -#define SYS_SVR4_CDC_reserved15 (SYS_SVR4 + 235) -#define SYS_SVR4_CDC_reserved16 (SYS_SVR4 + 236) -#define SYS_SVR4_CDC_reserved17 (SYS_SVR4 + 237) -#define SYS_SVR4_CDC_reserved18 (SYS_SVR4 + 238) -#define SYS_SVR4_CDC_reserved19 (SYS_SVR4 + 239) -#define SYS_SVR4_CDC_reserved20 (SYS_SVR4 + 240) - -/* - * SYS V syscalls are in the range from 1000 to 1999 - */ -#define SYS_SYSV 1000 -#define SYS_SYSV_syscall (SYS_SYSV + 0) -#define SYS_SYSV_exit (SYS_SYSV + 1) -#define SYS_SYSV_fork (SYS_SYSV + 2) -#define SYS_SYSV_read (SYS_SYSV + 3) -#define SYS_SYSV_write (SYS_SYSV + 4) -#define SYS_SYSV_open (SYS_SYSV + 5) -#define SYS_SYSV_close (SYS_SYSV + 6) -#define SYS_SYSV_wait (SYS_SYSV + 7) -#define SYS_SYSV_creat (SYS_SYSV + 8) -#define SYS_SYSV_link (SYS_SYSV + 9) -#define SYS_SYSV_unlink (SYS_SYSV + 10) -#define SYS_SYSV_execv (SYS_SYSV + 11) -#define SYS_SYSV_chdir (SYS_SYSV + 12) -#define SYS_SYSV_time (SYS_SYSV + 13) -#define SYS_SYSV_mknod (SYS_SYSV + 14) -#define SYS_SYSV_chmod (SYS_SYSV + 15) -#define SYS_SYSV_chown (SYS_SYSV + 16) -#define SYS_SYSV_brk (SYS_SYSV + 17) -#define SYS_SYSV_stat (SYS_SYSV + 18) -#define SYS_SYSV_lseek (SYS_SYSV + 19) -#define SYS_SYSV_getpid (SYS_SYSV + 20) -#define SYS_SYSV_mount (SYS_SYSV + 21) -#define SYS_SYSV_umount (SYS_SYSV + 22) -#define SYS_SYSV_setuid (SYS_SYSV + 23) -#define SYS_SYSV_getuid (SYS_SYSV + 24) -#define SYS_SYSV_stime (SYS_SYSV + 25) -#define SYS_SYSV_ptrace (SYS_SYSV + 26) -#define SYS_SYSV_alarm (SYS_SYSV + 27) -#define SYS_SYSV_fstat (SYS_SYSV + 28) -#define SYS_SYSV_pause (SYS_SYSV + 29) -#define SYS_SYSV_utime (SYS_SYSV + 30) -#define SYS_SYSV_stty (SYS_SYSV + 31) -#define SYS_SYSV_gtty (SYS_SYSV + 32) -#define SYS_SYSV_access (SYS_SYSV + 33) -#define SYS_SYSV_nice (SYS_SYSV + 34) -#define SYS_SYSV_statfs (SYS_SYSV + 35) -#define SYS_SYSV_sync (SYS_SYSV + 36) -#define SYS_SYSV_kill (SYS_SYSV + 37) -#define SYS_SYSV_fstatfs (SYS_SYSV + 38) -#define SYS_SYSV_setpgrp (SYS_SYSV + 39) -#define SYS_SYSV_syssgi (SYS_SYSV + 40) -#define SYS_SYSV_dup (SYS_SYSV + 41) -#define SYS_SYSV_pipe (SYS_SYSV + 42) -#define SYS_SYSV_times (SYS_SYSV + 43) -#define SYS_SYSV_profil (SYS_SYSV + 44) -#define SYS_SYSV_plock (SYS_SYSV + 45) -#define SYS_SYSV_setgid (SYS_SYSV + 46) -#define SYS_SYSV_getgid (SYS_SYSV + 47) -#define SYS_SYSV_sig (SYS_SYSV + 48) -#define SYS_SYSV_msgsys (SYS_SYSV + 49) -#define SYS_SYSV_sysmips (SYS_SYSV + 50) -#define SYS_SYSV_acct (SYS_SYSV + 51) -#define SYS_SYSV_shmsys (SYS_SYSV + 52) -#define SYS_SYSV_semsys (SYS_SYSV + 53) -#define SYS_SYSV_ioctl (SYS_SYSV + 54) -#define SYS_SYSV_uadmin (SYS_SYSV + 55) -#define SYS_SYSV_sysmp (SYS_SYSV + 56) -#define SYS_SYSV_utssys (SYS_SYSV + 57) -#define SYS_SYSV_USG_reserved1 (SYS_SYSV + 58) -#define SYS_SYSV_execve (SYS_SYSV + 59) -#define SYS_SYSV_umask (SYS_SYSV + 60) -#define SYS_SYSV_chroot (SYS_SYSV + 61) -#define SYS_SYSV_fcntl (SYS_SYSV + 62) -#define SYS_SYSV_ulimit (SYS_SYSV + 63) -#define SYS_SYSV_SAFARI4_reserved1 (SYS_SYSV + 64) -#define SYS_SYSV_SAFARI4_reserved2 (SYS_SYSV + 65) -#define SYS_SYSV_SAFARI4_reserved3 (SYS_SYSV + 66) -#define SYS_SYSV_SAFARI4_reserved4 (SYS_SYSV + 67) -#define SYS_SYSV_SAFARI4_reserved5 (SYS_SYSV + 68) -#define SYS_SYSV_SAFARI4_reserved6 (SYS_SYSV + 69) -#define SYS_SYSV_advfs (SYS_SYSV + 70) -#define SYS_SYSV_unadvfs (SYS_SYSV + 71) -#define SYS_SYSV_rmount (SYS_SYSV + 72) -#define SYS_SYSV_rumount (SYS_SYSV + 73) -#define SYS_SYSV_rfstart (SYS_SYSV + 74) -#define SYS_SYSV_getrlimit64 (SYS_SYSV + 75) -#define SYS_SYSV_setrlimit64 (SYS_SYSV + 76) -#define SYS_SYSV_nanosleep (SYS_SYSV + 77) -#define SYS_SYSV_lseek64 (SYS_SYSV + 78) -#define SYS_SYSV_rmdir (SYS_SYSV + 79) -#define SYS_SYSV_mkdir (SYS_SYSV + 80) -#define SYS_SYSV_getdents (SYS_SYSV + 81) -#define SYS_SYSV_sginap (SYS_SYSV + 82) -#define SYS_SYSV_sgikopt (SYS_SYSV + 83) -#define SYS_SYSV_sysfs (SYS_SYSV + 84) -#define SYS_SYSV_getmsg (SYS_SYSV + 85) -#define SYS_SYSV_putmsg (SYS_SYSV + 86) -#define SYS_SYSV_poll (SYS_SYSV + 87) -#define SYS_SYSV_sigreturn (SYS_SYSV + 88) -#define SYS_SYSV_accept (SYS_SYSV + 89) -#define SYS_SYSV_bind (SYS_SYSV + 90) -#define SYS_SYSV_connect (SYS_SYSV + 91) -#define SYS_SYSV_gethostid (SYS_SYSV + 92) -#define SYS_SYSV_getpeername (SYS_SYSV + 93) -#define SYS_SYSV_getsockname (SYS_SYSV + 94) -#define SYS_SYSV_getsockopt (SYS_SYSV + 95) -#define SYS_SYSV_listen (SYS_SYSV + 96) -#define SYS_SYSV_recv (SYS_SYSV + 97) -#define SYS_SYSV_recvfrom (SYS_SYSV + 98) -#define SYS_SYSV_recvmsg (SYS_SYSV + 99) -#define SYS_SYSV_select (SYS_SYSV + 100) -#define SYS_SYSV_send (SYS_SYSV + 101) -#define SYS_SYSV_sendmsg (SYS_SYSV + 102) -#define SYS_SYSV_sendto (SYS_SYSV + 103) -#define SYS_SYSV_sethostid (SYS_SYSV + 104) -#define SYS_SYSV_setsockopt (SYS_SYSV + 105) -#define SYS_SYSV_shutdown (SYS_SYSV + 106) -#define SYS_SYSV_socket (SYS_SYSV + 107) -#define SYS_SYSV_gethostname (SYS_SYSV + 108) -#define SYS_SYSV_sethostname (SYS_SYSV + 109) -#define SYS_SYSV_getdomainname (SYS_SYSV + 110) -#define SYS_SYSV_setdomainname (SYS_SYSV + 111) -#define SYS_SYSV_truncate (SYS_SYSV + 112) -#define SYS_SYSV_ftruncate (SYS_SYSV + 113) -#define SYS_SYSV_rename (SYS_SYSV + 114) -#define SYS_SYSV_symlink (SYS_SYSV + 115) -#define SYS_SYSV_readlink (SYS_SYSV + 116) -#define SYS_SYSV_lstat (SYS_SYSV + 117) -#define SYS_SYSV_nfsmount (SYS_SYSV + 118) -#define SYS_SYSV_nfssvc (SYS_SYSV + 119) -#define SYS_SYSV_getfh (SYS_SYSV + 120) -#define SYS_SYSV_async_daemon (SYS_SYSV + 121) -#define SYS_SYSV_exportfs (SYS_SYSV + 122) -#define SYS_SYSV_setregid (SYS_SYSV + 123) -#define SYS_SYSV_setreuid (SYS_SYSV + 124) -#define SYS_SYSV_getitimer (SYS_SYSV + 125) -#define SYS_SYSV_setitimer (SYS_SYSV + 126) -#define SYS_SYSV_adjtime (SYS_SYSV + 127) -#define SYS_SYSV_BSD_getime (SYS_SYSV + 128) -#define SYS_SYSV_sproc (SYS_SYSV + 129) -#define SYS_SYSV_prctl (SYS_SYSV + 130) -#define SYS_SYSV_procblk (SYS_SYSV + 131) -#define SYS_SYSV_sprocsp (SYS_SYSV + 132) -#define SYS_SYSV_sgigsc (SYS_SYSV + 133) -#define SYS_SYSV_mmap (SYS_SYSV + 134) -#define SYS_SYSV_munmap (SYS_SYSV + 135) -#define SYS_SYSV_mprotect (SYS_SYSV + 136) -#define SYS_SYSV_msync (SYS_SYSV + 137) -#define SYS_SYSV_madvise (SYS_SYSV + 138) -#define SYS_SYSV_pagelock (SYS_SYSV + 139) -#define SYS_SYSV_getpagesize (SYS_SYSV + 140) -#define SYS_SYSV_quotactl (SYS_SYSV + 141) -#define SYS_SYSV_libdetach (SYS_SYSV + 142) -#define SYS_SYSV_BSDgetpgrp (SYS_SYSV + 143) -#define SYS_SYSV_BSDsetpgrp (SYS_SYSV + 144) -#define SYS_SYSV_vhangup (SYS_SYSV + 145) -#define SYS_SYSV_fsync (SYS_SYSV + 146) -#define SYS_SYSV_fchdir (SYS_SYSV + 147) -#define SYS_SYSV_getrlimit (SYS_SYSV + 148) -#define SYS_SYSV_setrlimit (SYS_SYSV + 149) -#define SYS_SYSV_cacheflush (SYS_SYSV + 150) -#define SYS_SYSV_cachectl (SYS_SYSV + 151) -#define SYS_SYSV_fchown (SYS_SYSV + 152) -#define SYS_SYSV_fchmod (SYS_SYSV + 153) -#define SYS_SYSV_wait3 (SYS_SYSV + 154) -#define SYS_SYSV_socketpair (SYS_SYSV + 155) -#define SYS_SYSV_sysinfo (SYS_SYSV + 156) -#define SYS_SYSV_nuname (SYS_SYSV + 157) -#define SYS_SYSV_xstat (SYS_SYSV + 158) -#define SYS_SYSV_lxstat (SYS_SYSV + 159) -#define SYS_SYSV_fxstat (SYS_SYSV + 160) -#define SYS_SYSV_xmknod (SYS_SYSV + 161) -#define SYS_SYSV_ksigaction (SYS_SYSV + 162) -#define SYS_SYSV_sigpending (SYS_SYSV + 163) -#define SYS_SYSV_sigprocmask (SYS_SYSV + 164) -#define SYS_SYSV_sigsuspend (SYS_SYSV + 165) -#define SYS_SYSV_sigpoll (SYS_SYSV + 166) -#define SYS_SYSV_swapctl (SYS_SYSV + 167) -#define SYS_SYSV_getcontext (SYS_SYSV + 168) -#define SYS_SYSV_setcontext (SYS_SYSV + 169) -#define SYS_SYSV_waitsys (SYS_SYSV + 170) -#define SYS_SYSV_sigstack (SYS_SYSV + 171) -#define SYS_SYSV_sigaltstack (SYS_SYSV + 172) -#define SYS_SYSV_sigsendset (SYS_SYSV + 173) -#define SYS_SYSV_statvfs (SYS_SYSV + 174) -#define SYS_SYSV_fstatvfs (SYS_SYSV + 175) -#define SYS_SYSV_getpmsg (SYS_SYSV + 176) -#define SYS_SYSV_putpmsg (SYS_SYSV + 177) -#define SYS_SYSV_lchown (SYS_SYSV + 178) -#define SYS_SYSV_priocntl (SYS_SYSV + 179) -#define SYS_SYSV_ksigqueue (SYS_SYSV + 180) -#define SYS_SYSV_readv (SYS_SYSV + 181) -#define SYS_SYSV_writev (SYS_SYSV + 182) -#define SYS_SYSV_truncate64 (SYS_SYSV + 183) -#define SYS_SYSV_ftruncate64 (SYS_SYSV + 184) -#define SYS_SYSV_mmap64 (SYS_SYSV + 185) -#define SYS_SYSV_dmi (SYS_SYSV + 186) -#define SYS_SYSV_pread (SYS_SYSV + 187) -#define SYS_SYSV_pwrite (SYS_SYSV + 188) - -/* - * BSD 4.3 syscalls are in the range from 2000 to 2999 - */ -#define SYS_BSD43 2000 -#define SYS_BSD43_syscall (SYS_BSD43 + 0) -#define SYS_BSD43_exit (SYS_BSD43 + 1) -#define SYS_BSD43_fork (SYS_BSD43 + 2) -#define SYS_BSD43_read (SYS_BSD43 + 3) -#define SYS_BSD43_write (SYS_BSD43 + 4) -#define SYS_BSD43_open (SYS_BSD43 + 5) -#define SYS_BSD43_close (SYS_BSD43 + 6) -#define SYS_BSD43_wait (SYS_BSD43 + 7) -#define SYS_BSD43_creat (SYS_BSD43 + 8) -#define SYS_BSD43_link (SYS_BSD43 + 9) -#define SYS_BSD43_unlink (SYS_BSD43 + 10) -#define SYS_BSD43_exec (SYS_BSD43 + 11) -#define SYS_BSD43_chdir (SYS_BSD43 + 12) -#define SYS_BSD43_time (SYS_BSD43 + 13) -#define SYS_BSD43_mknod (SYS_BSD43 + 14) -#define SYS_BSD43_chmod (SYS_BSD43 + 15) -#define SYS_BSD43_chown (SYS_BSD43 + 16) -#define SYS_BSD43_sbreak (SYS_BSD43 + 17) -#define SYS_BSD43_oldstat (SYS_BSD43 + 18) -#define SYS_BSD43_lseek (SYS_BSD43 + 19) -#define SYS_BSD43_getpid (SYS_BSD43 + 20) -#define SYS_BSD43_oldmount (SYS_BSD43 + 21) -#define SYS_BSD43_umount (SYS_BSD43 + 22) -#define SYS_BSD43_setuid (SYS_BSD43 + 23) -#define SYS_BSD43_getuid (SYS_BSD43 + 24) -#define SYS_BSD43_stime (SYS_BSD43 + 25) -#define SYS_BSD43_ptrace (SYS_BSD43 + 26) -#define SYS_BSD43_alarm (SYS_BSD43 + 27) -#define SYS_BSD43_oldfstat (SYS_BSD43 + 28) -#define SYS_BSD43_pause (SYS_BSD43 + 29) -#define SYS_BSD43_utime (SYS_BSD43 + 30) -#define SYS_BSD43_stty (SYS_BSD43 + 31) -#define SYS_BSD43_gtty (SYS_BSD43 + 32) -#define SYS_BSD43_access (SYS_BSD43 + 33) -#define SYS_BSD43_nice (SYS_BSD43 + 34) -#define SYS_BSD43_ftime (SYS_BSD43 + 35) -#define SYS_BSD43_sync (SYS_BSD43 + 36) -#define SYS_BSD43_kill (SYS_BSD43 + 37) -#define SYS_BSD43_stat (SYS_BSD43 + 38) -#define SYS_BSD43_oldsetpgrp (SYS_BSD43 + 39) -#define SYS_BSD43_lstat (SYS_BSD43 + 40) -#define SYS_BSD43_dup (SYS_BSD43 + 41) -#define SYS_BSD43_pipe (SYS_BSD43 + 42) -#define SYS_BSD43_times (SYS_BSD43 + 43) -#define SYS_BSD43_profil (SYS_BSD43 + 44) -#define SYS_BSD43_msgsys (SYS_BSD43 + 45) -#define SYS_BSD43_setgid (SYS_BSD43 + 46) -#define SYS_BSD43_getgid (SYS_BSD43 + 47) -#define SYS_BSD43_ssig (SYS_BSD43 + 48) -#define SYS_BSD43_reserved1 (SYS_BSD43 + 49) -#define SYS_BSD43_reserved2 (SYS_BSD43 + 50) -#define SYS_BSD43_sysacct (SYS_BSD43 + 51) -#define SYS_BSD43_phys (SYS_BSD43 + 52) -#define SYS_BSD43_lock (SYS_BSD43 + 53) -#define SYS_BSD43_ioctl (SYS_BSD43 + 54) -#define SYS_BSD43_reboot (SYS_BSD43 + 55) -#define SYS_BSD43_mpxchan (SYS_BSD43 + 56) -#define SYS_BSD43_symlink (SYS_BSD43 + 57) -#define SYS_BSD43_readlink (SYS_BSD43 + 58) -#define SYS_BSD43_execve (SYS_BSD43 + 59) -#define SYS_BSD43_umask (SYS_BSD43 + 60) -#define SYS_BSD43_chroot (SYS_BSD43 + 61) -#define SYS_BSD43_fstat (SYS_BSD43 + 62) -#define SYS_BSD43_reserved3 (SYS_BSD43 + 63) -#define SYS_BSD43_getpagesize (SYS_BSD43 + 64) -#define SYS_BSD43_mremap (SYS_BSD43 + 65) -#define SYS_BSD43_vfork (SYS_BSD43 + 66) -#define SYS_BSD43_vread (SYS_BSD43 + 67) -#define SYS_BSD43_vwrite (SYS_BSD43 + 68) -#define SYS_BSD43_sbrk (SYS_BSD43 + 69) -#define SYS_BSD43_sstk (SYS_BSD43 + 70) -#define SYS_BSD43_mmap (SYS_BSD43 + 71) -#define SYS_BSD43_vadvise (SYS_BSD43 + 72) -#define SYS_BSD43_munmap (SYS_BSD43 + 73) -#define SYS_BSD43_mprotect (SYS_BSD43 + 74) -#define SYS_BSD43_madvise (SYS_BSD43 + 75) -#define SYS_BSD43_vhangup (SYS_BSD43 + 76) -#define SYS_BSD43_vlimit (SYS_BSD43 + 77) -#define SYS_BSD43_mincore (SYS_BSD43 + 78) -#define SYS_BSD43_getgroups (SYS_BSD43 + 79) -#define SYS_BSD43_setgroups (SYS_BSD43 + 80) -#define SYS_BSD43_getpgrp (SYS_BSD43 + 81) -#define SYS_BSD43_setpgrp (SYS_BSD43 + 82) -#define SYS_BSD43_setitimer (SYS_BSD43 + 83) -#define SYS_BSD43_wait3 (SYS_BSD43 + 84) -#define SYS_BSD43_swapon (SYS_BSD43 + 85) -#define SYS_BSD43_getitimer (SYS_BSD43 + 86) -#define SYS_BSD43_gethostname (SYS_BSD43 + 87) -#define SYS_BSD43_sethostname (SYS_BSD43 + 88) -#define SYS_BSD43_getdtablesize (SYS_BSD43 + 89) -#define SYS_BSD43_dup2 (SYS_BSD43 + 90) -#define SYS_BSD43_getdopt (SYS_BSD43 + 91) -#define SYS_BSD43_fcntl (SYS_BSD43 + 92) -#define SYS_BSD43_select (SYS_BSD43 + 93) -#define SYS_BSD43_setdopt (SYS_BSD43 + 94) -#define SYS_BSD43_fsync (SYS_BSD43 + 95) -#define SYS_BSD43_setpriority (SYS_BSD43 + 96) -#define SYS_BSD43_socket (SYS_BSD43 + 97) -#define SYS_BSD43_connect (SYS_BSD43 + 98) -#define SYS_BSD43_oldaccept (SYS_BSD43 + 99) -#define SYS_BSD43_getpriority (SYS_BSD43 + 100) -#define SYS_BSD43_send (SYS_BSD43 + 101) -#define SYS_BSD43_recv (SYS_BSD43 + 102) -#define SYS_BSD43_sigreturn (SYS_BSD43 + 103) -#define SYS_BSD43_bind (SYS_BSD43 + 104) -#define SYS_BSD43_setsockopt (SYS_BSD43 + 105) -#define SYS_BSD43_listen (SYS_BSD43 + 106) -#define SYS_BSD43_vtimes (SYS_BSD43 + 107) -#define SYS_BSD43_sigvec (SYS_BSD43 + 108) -#define SYS_BSD43_sigblock (SYS_BSD43 + 109) -#define SYS_BSD43_sigsetmask (SYS_BSD43 + 110) -#define SYS_BSD43_sigpause (SYS_BSD43 + 111) -#define SYS_BSD43_sigstack (SYS_BSD43 + 112) -#define SYS_BSD43_oldrecvmsg (SYS_BSD43 + 113) -#define SYS_BSD43_oldsendmsg (SYS_BSD43 + 114) -#define SYS_BSD43_vtrace (SYS_BSD43 + 115) -#define SYS_BSD43_gettimeofday (SYS_BSD43 + 116) -#define SYS_BSD43_getrusage (SYS_BSD43 + 117) -#define SYS_BSD43_getsockopt (SYS_BSD43 + 118) -#define SYS_BSD43_reserved4 (SYS_BSD43 + 119) -#define SYS_BSD43_readv (SYS_BSD43 + 120) -#define SYS_BSD43_writev (SYS_BSD43 + 121) -#define SYS_BSD43_settimeofday (SYS_BSD43 + 122) -#define SYS_BSD43_fchown (SYS_BSD43 + 123) -#define SYS_BSD43_fchmod (SYS_BSD43 + 124) -#define SYS_BSD43_oldrecvfrom (SYS_BSD43 + 125) -#define SYS_BSD43_setreuid (SYS_BSD43 + 126) -#define SYS_BSD43_setregid (SYS_BSD43 + 127) -#define SYS_BSD43_rename (SYS_BSD43 + 128) -#define SYS_BSD43_truncate (SYS_BSD43 + 129) -#define SYS_BSD43_ftruncate (SYS_BSD43 + 130) -#define SYS_BSD43_flock (SYS_BSD43 + 131) -#define SYS_BSD43_semsys (SYS_BSD43 + 132) -#define SYS_BSD43_sendto (SYS_BSD43 + 133) -#define SYS_BSD43_shutdown (SYS_BSD43 + 134) -#define SYS_BSD43_socketpair (SYS_BSD43 + 135) -#define SYS_BSD43_mkdir (SYS_BSD43 + 136) -#define SYS_BSD43_rmdir (SYS_BSD43 + 137) -#define SYS_BSD43_utimes (SYS_BSD43 + 138) -#define SYS_BSD43_sigcleanup (SYS_BSD43 + 139) -#define SYS_BSD43_adjtime (SYS_BSD43 + 140) -#define SYS_BSD43_oldgetpeername (SYS_BSD43 + 141) -#define SYS_BSD43_gethostid (SYS_BSD43 + 142) -#define SYS_BSD43_sethostid (SYS_BSD43 + 143) -#define SYS_BSD43_getrlimit (SYS_BSD43 + 144) -#define SYS_BSD43_setrlimit (SYS_BSD43 + 145) -#define SYS_BSD43_killpg (SYS_BSD43 + 146) -#define SYS_BSD43_shmsys (SYS_BSD43 + 147) -#define SYS_BSD43_quota (SYS_BSD43 + 148) -#define SYS_BSD43_qquota (SYS_BSD43 + 149) -#define SYS_BSD43_oldgetsockname (SYS_BSD43 + 150) -#define SYS_BSD43_sysmips (SYS_BSD43 + 151) -#define SYS_BSD43_cacheflush (SYS_BSD43 + 152) -#define SYS_BSD43_cachectl (SYS_BSD43 + 153) -#define SYS_BSD43_debug (SYS_BSD43 + 154) -#define SYS_BSD43_reserved5 (SYS_BSD43 + 155) -#define SYS_BSD43_reserved6 (SYS_BSD43 + 156) -#define SYS_BSD43_nfs_mount (SYS_BSD43 + 157) -#define SYS_BSD43_nfs_svc (SYS_BSD43 + 158) -#define SYS_BSD43_getdirentries (SYS_BSD43 + 159) -#define SYS_BSD43_statfs (SYS_BSD43 + 160) -#define SYS_BSD43_fstatfs (SYS_BSD43 + 161) -#define SYS_BSD43_unmount (SYS_BSD43 + 162) -#define SYS_BSD43_async_daemon (SYS_BSD43 + 163) -#define SYS_BSD43_nfs_getfh (SYS_BSD43 + 164) -#define SYS_BSD43_getdomainname (SYS_BSD43 + 165) -#define SYS_BSD43_setdomainname (SYS_BSD43 + 166) -#define SYS_BSD43_pcfs_mount (SYS_BSD43 + 167) -#define SYS_BSD43_quotactl (SYS_BSD43 + 168) -#define SYS_BSD43_oldexportfs (SYS_BSD43 + 169) -#define SYS_BSD43_smount (SYS_BSD43 + 170) -#define SYS_BSD43_mipshwconf (SYS_BSD43 + 171) -#define SYS_BSD43_exportfs (SYS_BSD43 + 172) -#define SYS_BSD43_nfsfh_open (SYS_BSD43 + 173) -#define SYS_BSD43_libattach (SYS_BSD43 + 174) -#define SYS_BSD43_libdetach (SYS_BSD43 + 175) -#define SYS_BSD43_accept (SYS_BSD43 + 176) -#define SYS_BSD43_reserved7 (SYS_BSD43 + 177) -#define SYS_BSD43_reserved8 (SYS_BSD43 + 178) -#define SYS_BSD43_recvmsg (SYS_BSD43 + 179) -#define SYS_BSD43_recvfrom (SYS_BSD43 + 180) -#define SYS_BSD43_sendmsg (SYS_BSD43 + 181) -#define SYS_BSD43_getpeername (SYS_BSD43 + 182) -#define SYS_BSD43_getsockname (SYS_BSD43 + 183) -#define SYS_BSD43_aread (SYS_BSD43 + 184) -#define SYS_BSD43_awrite (SYS_BSD43 + 185) -#define SYS_BSD43_listio (SYS_BSD43 + 186) -#define SYS_BSD43_acancel (SYS_BSD43 + 187) -#define SYS_BSD43_astatus (SYS_BSD43 + 188) -#define SYS_BSD43_await (SYS_BSD43 + 189) -#define SYS_BSD43_areadv (SYS_BSD43 + 190) -#define SYS_BSD43_awritev (SYS_BSD43 + 191) - -/* - * POSIX syscalls are in the range from 3000 to 3999 - */ -#define SYS_POSIX 3000 -#define SYS_POSIX_syscall (SYS_POSIX + 0) -#define SYS_POSIX_exit (SYS_POSIX + 1) -#define SYS_POSIX_fork (SYS_POSIX + 2) -#define SYS_POSIX_read (SYS_POSIX + 3) -#define SYS_POSIX_write (SYS_POSIX + 4) -#define SYS_POSIX_open (SYS_POSIX + 5) -#define SYS_POSIX_close (SYS_POSIX + 6) -#define SYS_POSIX_wait (SYS_POSIX + 7) -#define SYS_POSIX_creat (SYS_POSIX + 8) -#define SYS_POSIX_link (SYS_POSIX + 9) -#define SYS_POSIX_unlink (SYS_POSIX + 10) -#define SYS_POSIX_exec (SYS_POSIX + 11) -#define SYS_POSIX_chdir (SYS_POSIX + 12) -#define SYS_POSIX_gtime (SYS_POSIX + 13) -#define SYS_POSIX_mknod (SYS_POSIX + 14) -#define SYS_POSIX_chmod (SYS_POSIX + 15) -#define SYS_POSIX_chown (SYS_POSIX + 16) -#define SYS_POSIX_sbreak (SYS_POSIX + 17) -#define SYS_POSIX_stat (SYS_POSIX + 18) -#define SYS_POSIX_lseek (SYS_POSIX + 19) -#define SYS_POSIX_getpid (SYS_POSIX + 20) -#define SYS_POSIX_mount (SYS_POSIX + 21) -#define SYS_POSIX_umount (SYS_POSIX + 22) -#define SYS_POSIX_setuid (SYS_POSIX + 23) -#define SYS_POSIX_getuid (SYS_POSIX + 24) -#define SYS_POSIX_stime (SYS_POSIX + 25) -#define SYS_POSIX_ptrace (SYS_POSIX + 26) -#define SYS_POSIX_alarm (SYS_POSIX + 27) -#define SYS_POSIX_fstat (SYS_POSIX + 28) -#define SYS_POSIX_pause (SYS_POSIX + 29) -#define SYS_POSIX_utime (SYS_POSIX + 30) -#define SYS_POSIX_stty (SYS_POSIX + 31) -#define SYS_POSIX_gtty (SYS_POSIX + 32) -#define SYS_POSIX_access (SYS_POSIX + 33) -#define SYS_POSIX_nice (SYS_POSIX + 34) -#define SYS_POSIX_statfs (SYS_POSIX + 35) -#define SYS_POSIX_sync (SYS_POSIX + 36) -#define SYS_POSIX_kill (SYS_POSIX + 37) -#define SYS_POSIX_fstatfs (SYS_POSIX + 38) -#define SYS_POSIX_getpgrp (SYS_POSIX + 39) -#define SYS_POSIX_syssgi (SYS_POSIX + 40) -#define SYS_POSIX_dup (SYS_POSIX + 41) -#define SYS_POSIX_pipe (SYS_POSIX + 42) -#define SYS_POSIX_times (SYS_POSIX + 43) -#define SYS_POSIX_profil (SYS_POSIX + 44) -#define SYS_POSIX_lock (SYS_POSIX + 45) -#define SYS_POSIX_setgid (SYS_POSIX + 46) -#define SYS_POSIX_getgid (SYS_POSIX + 47) -#define SYS_POSIX_sig (SYS_POSIX + 48) -#define SYS_POSIX_msgsys (SYS_POSIX + 49) -#define SYS_POSIX_sysmips (SYS_POSIX + 50) -#define SYS_POSIX_sysacct (SYS_POSIX + 51) -#define SYS_POSIX_shmsys (SYS_POSIX + 52) -#define SYS_POSIX_semsys (SYS_POSIX + 53) -#define SYS_POSIX_ioctl (SYS_POSIX + 54) -#define SYS_POSIX_uadmin (SYS_POSIX + 55) -#define SYS_POSIX_exch (SYS_POSIX + 56) -#define SYS_POSIX_utssys (SYS_POSIX + 57) -#define SYS_POSIX_USG_reserved1 (SYS_POSIX + 58) -#define SYS_POSIX_exece (SYS_POSIX + 59) -#define SYS_POSIX_umask (SYS_POSIX + 60) -#define SYS_POSIX_chroot (SYS_POSIX + 61) -#define SYS_POSIX_fcntl (SYS_POSIX + 62) -#define SYS_POSIX_ulimit (SYS_POSIX + 63) -#define SYS_POSIX_SAFARI4_reserved1 (SYS_POSIX + 64) -#define SYS_POSIX_SAFARI4_reserved2 (SYS_POSIX + 65) -#define SYS_POSIX_SAFARI4_reserved3 (SYS_POSIX + 66) -#define SYS_POSIX_SAFARI4_reserved4 (SYS_POSIX + 67) -#define SYS_POSIX_SAFARI4_reserved5 (SYS_POSIX + 68) -#define SYS_POSIX_SAFARI4_reserved6 (SYS_POSIX + 69) -#define SYS_POSIX_advfs (SYS_POSIX + 70) -#define SYS_POSIX_unadvfs (SYS_POSIX + 71) -#define SYS_POSIX_rmount (SYS_POSIX + 72) -#define SYS_POSIX_rumount (SYS_POSIX + 73) -#define SYS_POSIX_rfstart (SYS_POSIX + 74) -#define SYS_POSIX_reserved1 (SYS_POSIX + 75) -#define SYS_POSIX_rdebug (SYS_POSIX + 76) -#define SYS_POSIX_rfstop (SYS_POSIX + 77) -#define SYS_POSIX_rfsys (SYS_POSIX + 78) -#define SYS_POSIX_rmdir (SYS_POSIX + 79) -#define SYS_POSIX_mkdir (SYS_POSIX + 80) -#define SYS_POSIX_getdents (SYS_POSIX + 81) -#define SYS_POSIX_sginap (SYS_POSIX + 82) -#define SYS_POSIX_sgikopt (SYS_POSIX + 83) -#define SYS_POSIX_sysfs (SYS_POSIX + 84) -#define SYS_POSIX_getmsg (SYS_POSIX + 85) -#define SYS_POSIX_putmsg (SYS_POSIX + 86) -#define SYS_POSIX_poll (SYS_POSIX + 87) -#define SYS_POSIX_sigreturn (SYS_POSIX + 88) -#define SYS_POSIX_accept (SYS_POSIX + 89) -#define SYS_POSIX_bind (SYS_POSIX + 90) -#define SYS_POSIX_connect (SYS_POSIX + 91) -#define SYS_POSIX_gethostid (SYS_POSIX + 92) -#define SYS_POSIX_getpeername (SYS_POSIX + 93) -#define SYS_POSIX_getsockname (SYS_POSIX + 94) -#define SYS_POSIX_getsockopt (SYS_POSIX + 95) -#define SYS_POSIX_listen (SYS_POSIX + 96) -#define SYS_POSIX_recv (SYS_POSIX + 97) -#define SYS_POSIX_recvfrom (SYS_POSIX + 98) -#define SYS_POSIX_recvmsg (SYS_POSIX + 99) -#define SYS_POSIX_select (SYS_POSIX + 100) -#define SYS_POSIX_send (SYS_POSIX + 101) -#define SYS_POSIX_sendmsg (SYS_POSIX + 102) -#define SYS_POSIX_sendto (SYS_POSIX + 103) -#define SYS_POSIX_sethostid (SYS_POSIX + 104) -#define SYS_POSIX_setsockopt (SYS_POSIX + 105) -#define SYS_POSIX_shutdown (SYS_POSIX + 106) -#define SYS_POSIX_socket (SYS_POSIX + 107) -#define SYS_POSIX_gethostname (SYS_POSIX + 108) -#define SYS_POSIX_sethostname (SYS_POSIX + 109) -#define SYS_POSIX_getdomainname (SYS_POSIX + 110) -#define SYS_POSIX_setdomainname (SYS_POSIX + 111) -#define SYS_POSIX_truncate (SYS_POSIX + 112) -#define SYS_POSIX_ftruncate (SYS_POSIX + 113) -#define SYS_POSIX_rename (SYS_POSIX + 114) -#define SYS_POSIX_symlink (SYS_POSIX + 115) -#define SYS_POSIX_readlink (SYS_POSIX + 116) -#define SYS_POSIX_lstat (SYS_POSIX + 117) -#define SYS_POSIX_nfs_mount (SYS_POSIX + 118) -#define SYS_POSIX_nfs_svc (SYS_POSIX + 119) -#define SYS_POSIX_nfs_getfh (SYS_POSIX + 120) -#define SYS_POSIX_async_daemon (SYS_POSIX + 121) -#define SYS_POSIX_exportfs (SYS_POSIX + 122) -#define SYS_POSIX_SGI_setregid (SYS_POSIX + 123) -#define SYS_POSIX_SGI_setreuid (SYS_POSIX + 124) -#define SYS_POSIX_getitimer (SYS_POSIX + 125) -#define SYS_POSIX_setitimer (SYS_POSIX + 126) -#define SYS_POSIX_adjtime (SYS_POSIX + 127) -#define SYS_POSIX_SGI_bsdgettime (SYS_POSIX + 128) -#define SYS_POSIX_SGI_sproc (SYS_POSIX + 129) -#define SYS_POSIX_SGI_prctl (SYS_POSIX + 130) -#define SYS_POSIX_SGI_blkproc (SYS_POSIX + 131) -#define SYS_POSIX_SGI_reserved1 (SYS_POSIX + 132) -#define SYS_POSIX_SGI_sgigsc (SYS_POSIX + 133) -#define SYS_POSIX_SGI_mmap (SYS_POSIX + 134) -#define SYS_POSIX_SGI_munmap (SYS_POSIX + 135) -#define SYS_POSIX_SGI_mprotect (SYS_POSIX + 136) -#define SYS_POSIX_SGI_msync (SYS_POSIX + 137) -#define SYS_POSIX_SGI_madvise (SYS_POSIX + 138) -#define SYS_POSIX_SGI_mpin (SYS_POSIX + 139) -#define SYS_POSIX_SGI_getpagesize (SYS_POSIX + 140) -#define SYS_POSIX_SGI_libattach (SYS_POSIX + 141) -#define SYS_POSIX_SGI_libdetach (SYS_POSIX + 142) -#define SYS_POSIX_SGI_getpgrp (SYS_POSIX + 143) -#define SYS_POSIX_SGI_setpgrp (SYS_POSIX + 144) -#define SYS_POSIX_SGI_reserved2 (SYS_POSIX + 145) -#define SYS_POSIX_SGI_reserved3 (SYS_POSIX + 146) -#define SYS_POSIX_SGI_reserved4 (SYS_POSIX + 147) -#define SYS_POSIX_SGI_reserved5 (SYS_POSIX + 148) -#define SYS_POSIX_SGI_reserved6 (SYS_POSIX + 149) -#define SYS_POSIX_cacheflush (SYS_POSIX + 150) -#define SYS_POSIX_cachectl (SYS_POSIX + 151) -#define SYS_POSIX_fchown (SYS_POSIX + 152) -#define SYS_POSIX_fchmod (SYS_POSIX + 153) -#define SYS_POSIX_wait3 (SYS_POSIX + 154) -#define SYS_POSIX_mmap (SYS_POSIX + 155) -#define SYS_POSIX_munmap (SYS_POSIX + 156) -#define SYS_POSIX_madvise (SYS_POSIX + 157) -#define SYS_POSIX_BSD_getpagesize (SYS_POSIX + 158) -#define SYS_POSIX_setreuid (SYS_POSIX + 159) -#define SYS_POSIX_setregid (SYS_POSIX + 160) -#define SYS_POSIX_setpgid (SYS_POSIX + 161) -#define SYS_POSIX_getgroups (SYS_POSIX + 162) -#define SYS_POSIX_setgroups (SYS_POSIX + 163) -#define SYS_POSIX_gettimeofday (SYS_POSIX + 164) -#define SYS_POSIX_getrusage (SYS_POSIX + 165) -#define SYS_POSIX_getrlimit (SYS_POSIX + 166) -#define SYS_POSIX_setrlimit (SYS_POSIX + 167) -#define SYS_POSIX_waitpid (SYS_POSIX + 168) -#define SYS_POSIX_dup2 (SYS_POSIX + 169) -#define SYS_POSIX_reserved2 (SYS_POSIX + 170) -#define SYS_POSIX_reserved3 (SYS_POSIX + 171) -#define SYS_POSIX_reserved4 (SYS_POSIX + 172) -#define SYS_POSIX_reserved5 (SYS_POSIX + 173) -#define SYS_POSIX_reserved6 (SYS_POSIX + 174) -#define SYS_POSIX_reserved7 (SYS_POSIX + 175) -#define SYS_POSIX_reserved8 (SYS_POSIX + 176) -#define SYS_POSIX_reserved9 (SYS_POSIX + 177) -#define SYS_POSIX_reserved10 (SYS_POSIX + 178) -#define SYS_POSIX_reserved11 (SYS_POSIX + 179) -#define SYS_POSIX_reserved12 (SYS_POSIX + 180) -#define SYS_POSIX_reserved13 (SYS_POSIX + 181) -#define SYS_POSIX_reserved14 (SYS_POSIX + 182) -#define SYS_POSIX_reserved15 (SYS_POSIX + 183) -#define SYS_POSIX_reserved16 (SYS_POSIX + 184) -#define SYS_POSIX_reserved17 (SYS_POSIX + 185) -#define SYS_POSIX_reserved18 (SYS_POSIX + 186) -#define SYS_POSIX_reserved19 (SYS_POSIX + 187) -#define SYS_POSIX_reserved20 (SYS_POSIX + 188) -#define SYS_POSIX_reserved21 (SYS_POSIX + 189) -#define SYS_POSIX_reserved22 (SYS_POSIX + 190) -#define SYS_POSIX_reserved23 (SYS_POSIX + 191) -#define SYS_POSIX_reserved24 (SYS_POSIX + 192) -#define SYS_POSIX_reserved25 (SYS_POSIX + 193) -#define SYS_POSIX_reserved26 (SYS_POSIX + 194) -#define SYS_POSIX_reserved27 (SYS_POSIX + 195) -#define SYS_POSIX_reserved28 (SYS_POSIX + 196) -#define SYS_POSIX_reserved29 (SYS_POSIX + 197) -#define SYS_POSIX_reserved30 (SYS_POSIX + 198) -#define SYS_POSIX_reserved31 (SYS_POSIX + 199) -#define SYS_POSIX_reserved32 (SYS_POSIX + 200) -#define SYS_POSIX_reserved33 (SYS_POSIX + 201) -#define SYS_POSIX_reserved34 (SYS_POSIX + 202) -#define SYS_POSIX_reserved35 (SYS_POSIX + 203) -#define SYS_POSIX_reserved36 (SYS_POSIX + 204) -#define SYS_POSIX_reserved37 (SYS_POSIX + 205) -#define SYS_POSIX_reserved38 (SYS_POSIX + 206) -#define SYS_POSIX_reserved39 (SYS_POSIX + 207) -#define SYS_POSIX_reserved40 (SYS_POSIX + 208) -#define SYS_POSIX_reserved41 (SYS_POSIX + 209) -#define SYS_POSIX_reserved42 (SYS_POSIX + 210) -#define SYS_POSIX_reserved43 (SYS_POSIX + 211) -#define SYS_POSIX_reserved44 (SYS_POSIX + 212) -#define SYS_POSIX_reserved45 (SYS_POSIX + 213) -#define SYS_POSIX_reserved46 (SYS_POSIX + 214) -#define SYS_POSIX_reserved47 (SYS_POSIX + 215) -#define SYS_POSIX_reserved48 (SYS_POSIX + 216) -#define SYS_POSIX_reserved49 (SYS_POSIX + 217) -#define SYS_POSIX_reserved50 (SYS_POSIX + 218) -#define SYS_POSIX_reserved51 (SYS_POSIX + 219) -#define SYS_POSIX_reserved52 (SYS_POSIX + 220) -#define SYS_POSIX_reserved53 (SYS_POSIX + 221) -#define SYS_POSIX_reserved54 (SYS_POSIX + 222) -#define SYS_POSIX_reserved55 (SYS_POSIX + 223) -#define SYS_POSIX_reserved56 (SYS_POSIX + 224) -#define SYS_POSIX_reserved57 (SYS_POSIX + 225) -#define SYS_POSIX_reserved58 (SYS_POSIX + 226) -#define SYS_POSIX_reserved59 (SYS_POSIX + 227) -#define SYS_POSIX_reserved60 (SYS_POSIX + 228) -#define SYS_POSIX_reserved61 (SYS_POSIX + 229) -#define SYS_POSIX_reserved62 (SYS_POSIX + 230) -#define SYS_POSIX_reserved63 (SYS_POSIX + 231) -#define SYS_POSIX_reserved64 (SYS_POSIX + 232) -#define SYS_POSIX_reserved65 (SYS_POSIX + 233) -#define SYS_POSIX_reserved66 (SYS_POSIX + 234) -#define SYS_POSIX_reserved67 (SYS_POSIX + 235) -#define SYS_POSIX_reserved68 (SYS_POSIX + 236) -#define SYS_POSIX_reserved69 (SYS_POSIX + 237) -#define SYS_POSIX_reserved70 (SYS_POSIX + 238) -#define SYS_POSIX_reserved71 (SYS_POSIX + 239) -#define SYS_POSIX_reserved72 (SYS_POSIX + 240) -#define SYS_POSIX_reserved73 (SYS_POSIX + 241) -#define SYS_POSIX_reserved74 (SYS_POSIX + 242) -#define SYS_POSIX_reserved75 (SYS_POSIX + 243) -#define SYS_POSIX_reserved76 (SYS_POSIX + 244) -#define SYS_POSIX_reserved77 (SYS_POSIX + 245) -#define SYS_POSIX_reserved78 (SYS_POSIX + 246) -#define SYS_POSIX_reserved79 (SYS_POSIX + 247) -#define SYS_POSIX_reserved80 (SYS_POSIX + 248) -#define SYS_POSIX_reserved81 (SYS_POSIX + 249) -#define SYS_POSIX_reserved82 (SYS_POSIX + 250) -#define SYS_POSIX_reserved83 (SYS_POSIX + 251) -#define SYS_POSIX_reserved84 (SYS_POSIX + 252) -#define SYS_POSIX_reserved85 (SYS_POSIX + 253) -#define SYS_POSIX_reserved86 (SYS_POSIX + 254) -#define SYS_POSIX_reserved87 (SYS_POSIX + 255) -#define SYS_POSIX_reserved88 (SYS_POSIX + 256) -#define SYS_POSIX_reserved89 (SYS_POSIX + 257) -#define SYS_POSIX_reserved90 (SYS_POSIX + 258) -#define SYS_POSIX_reserved91 (SYS_POSIX + 259) -#define SYS_POSIX_netboot (SYS_POSIX + 260) -#define SYS_POSIX_netunboot (SYS_POSIX + 261) -#define SYS_POSIX_rdump (SYS_POSIX + 262) -#define SYS_POSIX_setsid (SYS_POSIX + 263) -#define SYS_POSIX_getmaxsig (SYS_POSIX + 264) -#define SYS_POSIX_sigpending (SYS_POSIX + 265) -#define SYS_POSIX_sigprocmask (SYS_POSIX + 266) -#define SYS_POSIX_sigsuspend (SYS_POSIX + 267) -#define SYS_POSIX_sigaction (SYS_POSIX + 268) -#define SYS_POSIX_MIPS_reserved1 (SYS_POSIX + 269) -#define SYS_POSIX_MIPS_reserved2 (SYS_POSIX + 270) -#define SYS_POSIX_MIPS_reserved3 (SYS_POSIX + 271) -#define SYS_POSIX_MIPS_reserved4 (SYS_POSIX + 272) -#define SYS_POSIX_MIPS_reserved5 (SYS_POSIX + 273) -#define SYS_POSIX_MIPS_reserved6 (SYS_POSIX + 274) -#define SYS_POSIX_MIPS_reserved7 (SYS_POSIX + 275) -#define SYS_POSIX_MIPS_reserved8 (SYS_POSIX + 276) -#define SYS_POSIX_MIPS_reserved9 (SYS_POSIX + 277) -#define SYS_POSIX_MIPS_reserved10 (SYS_POSIX + 278) -#define SYS_POSIX_MIPS_reserved11 (SYS_POSIX + 279) -#define SYS_POSIX_TANDEM_reserved1 (SYS_POSIX + 280) -#define SYS_POSIX_TANDEM_reserved2 (SYS_POSIX + 281) -#define SYS_POSIX_TANDEM_reserved3 (SYS_POSIX + 282) -#define SYS_POSIX_TANDEM_reserved4 (SYS_POSIX + 283) -#define SYS_POSIX_TANDEM_reserved5 (SYS_POSIX + 284) -#define SYS_POSIX_TANDEM_reserved6 (SYS_POSIX + 285) -#define SYS_POSIX_TANDEM_reserved7 (SYS_POSIX + 286) -#define SYS_POSIX_TANDEM_reserved8 (SYS_POSIX + 287) -#define SYS_POSIX_TANDEM_reserved9 (SYS_POSIX + 288) -#define SYS_POSIX_TANDEM_reserved10 (SYS_POSIX + 289) -#define SYS_POSIX_TANDEM_reserved11 (SYS_POSIX + 290) -#define SYS_POSIX_TANDEM_reserved12 (SYS_POSIX + 291) -#define SYS_POSIX_TANDEM_reserved13 (SYS_POSIX + 292) -#define SYS_POSIX_TANDEM_reserved14 (SYS_POSIX + 293) -#define SYS_POSIX_TANDEM_reserved15 (SYS_POSIX + 294) -#define SYS_POSIX_TANDEM_reserved16 (SYS_POSIX + 295) -#define SYS_POSIX_TANDEM_reserved17 (SYS_POSIX + 296) -#define SYS_POSIX_TANDEM_reserved18 (SYS_POSIX + 297) -#define SYS_POSIX_TANDEM_reserved19 (SYS_POSIX + 298) -#define SYS_POSIX_TANDEM_reserved20 (SYS_POSIX + 299) -#define SYS_POSIX_SGI_reserved7 (SYS_POSIX + 300) -#define SYS_POSIX_SGI_reserved8 (SYS_POSIX + 301) -#define SYS_POSIX_SGI_reserved9 (SYS_POSIX + 302) -#define SYS_POSIX_SGI_reserved10 (SYS_POSIX + 303) -#define SYS_POSIX_SGI_reserved11 (SYS_POSIX + 304) -#define SYS_POSIX_SGI_reserved12 (SYS_POSIX + 305) -#define SYS_POSIX_SGI_reserved13 (SYS_POSIX + 306) -#define SYS_POSIX_SGI_reserved14 (SYS_POSIX + 307) -#define SYS_POSIX_SGI_reserved15 (SYS_POSIX + 308) -#define SYS_POSIX_SGI_reserved16 (SYS_POSIX + 309) -#define SYS_POSIX_SGI_reserved17 (SYS_POSIX + 310) -#define SYS_POSIX_SGI_reserved18 (SYS_POSIX + 311) -#define SYS_POSIX_SGI_reserved19 (SYS_POSIX + 312) -#define SYS_POSIX_SGI_reserved20 (SYS_POSIX + 313) -#define SYS_POSIX_SGI_reserved21 (SYS_POSIX + 314) -#define SYS_POSIX_SGI_reserved22 (SYS_POSIX + 315) -#define SYS_POSIX_SGI_reserved23 (SYS_POSIX + 316) -#define SYS_POSIX_SGI_reserved24 (SYS_POSIX + 317) -#define SYS_POSIX_SGI_reserved25 (SYS_POSIX + 318) -#define SYS_POSIX_SGI_reserved26 (SYS_POSIX + 319) - -/* - * Linux syscalls are in the range from 4000 to 4999 - * Hopefully these syscall numbers are unused ... If not everyone using - * statically linked binaries is pretty . You've - * been warned. - */ -#define SYS_Linux 4000 -#define SYS_syscall (SYS_Linux + 0) -#define SYS_exit (SYS_Linux + 1) -#define SYS_fork (SYS_Linux + 2) -#define SYS_read (SYS_Linux + 3) -#define SYS_write (SYS_Linux + 4) -#define SYS_open (SYS_Linux + 5) -#define SYS_close (SYS_Linux + 6) -#define SYS_waitpid (SYS_Linux + 7) -#define SYS_creat (SYS_Linux + 8) -#define SYS_link (SYS_Linux + 9) -#define SYS_unlink (SYS_Linux + 10) -#define SYS_execve (SYS_Linux + 11) -#define SYS_chdir (SYS_Linux + 12) -#define SYS_time (SYS_Linux + 13) -#define SYS_mknod (SYS_Linux + 14) -#define SYS_chmod (SYS_Linux + 15) -#define SYS_lchown (SYS_Linux + 16) -#define SYS_break (SYS_Linux + 17) -#define SYS_oldstat (SYS_Linux + 18) -#define SYS_lseek (SYS_Linux + 19) -#define SYS_getpid (SYS_Linux + 20) -#define SYS_mount (SYS_Linux + 21) -#define SYS_umount (SYS_Linux + 22) -#define SYS_setuid (SYS_Linux + 23) -#define SYS_getuid (SYS_Linux + 24) -#define SYS_stime (SYS_Linux + 25) -#define SYS_ptrace (SYS_Linux + 26) -#define SYS_alarm (SYS_Linux + 27) -#define SYS_oldfstat (SYS_Linux + 28) -#define SYS_pause (SYS_Linux + 29) -#define SYS_utime (SYS_Linux + 30) -#define SYS_stty (SYS_Linux + 31) -#define SYS_gtty (SYS_Linux + 32) -#define SYS_access (SYS_Linux + 33) -#define SYS_nice (SYS_Linux + 34) -#define SYS_ftime (SYS_Linux + 35) -#define SYS_sync (SYS_Linux + 36) -#define SYS_kill (SYS_Linux + 37) -#define SYS_rename (SYS_Linux + 38) -#define SYS_mkdir (SYS_Linux + 39) -#define SYS_rmdir (SYS_Linux + 40) -#define SYS_dup (SYS_Linux + 41) -#define SYS_pipe (SYS_Linux + 42) -#define SYS_times (SYS_Linux + 43) -#define SYS_prof (SYS_Linux + 44) -#define SYS_brk (SYS_Linux + 45) -#define SYS_setgid (SYS_Linux + 46) -#define SYS_getgid (SYS_Linux + 47) -#define SYS_signal (SYS_Linux + 48) -#define SYS_geteuid (SYS_Linux + 49) -#define SYS_getegid (SYS_Linux + 50) -#define SYS_acct (SYS_Linux + 51) -#define SYS_umount2 (SYS_Linux + 52) -#define SYS_lock (SYS_Linux + 53) -#define SYS_ioctl (SYS_Linux + 54) -#define SYS_fcntl (SYS_Linux + 55) -#define SYS_mpx (SYS_Linux + 56) -#define SYS_setpgid (SYS_Linux + 57) -#define SYS_ulimit (SYS_Linux + 58) -#define SYS_oldolduname (SYS_Linux + 59) -#define SYS_umask (SYS_Linux + 60) -#define SYS_chroot (SYS_Linux + 61) -#define SYS_ustat (SYS_Linux + 62) -#define SYS_dup2 (SYS_Linux + 63) -#define SYS_getppid (SYS_Linux + 64) -#define SYS_getpgrp (SYS_Linux + 65) -#define SYS_setsid (SYS_Linux + 66) -#define SYS_sigaction (SYS_Linux + 67) -#define SYS_sgetmask (SYS_Linux + 68) -#define SYS_ssetmask (SYS_Linux + 69) -#define SYS_setreuid (SYS_Linux + 70) -#define SYS_setregid (SYS_Linux + 71) -#define SYS_sigsuspend (SYS_Linux + 72) -#define SYS_sigpending (SYS_Linux + 73) -#define SYS_sethostname (SYS_Linux + 74) -#define SYS_setrlimit (SYS_Linux + 75) -#define SYS_getrlimit (SYS_Linux + 76) -#define SYS_getrusage (SYS_Linux + 77) -#define SYS_gettimeofday (SYS_Linux + 78) -#define SYS_settimeofday (SYS_Linux + 79) -#define SYS_getgroups (SYS_Linux + 80) -#define SYS_setgroups (SYS_Linux + 81) -#define SYS_reserved82 (SYS_Linux + 82) -#define SYS_symlink (SYS_Linux + 83) -#define SYS_oldlstat (SYS_Linux + 84) -#define SYS_readlink (SYS_Linux + 85) -#define SYS_uselib (SYS_Linux + 86) -#define SYS_swapon (SYS_Linux + 87) -#define SYS_reboot (SYS_Linux + 88) -#define SYS_readdir (SYS_Linux + 89) -#define SYS_mmap (SYS_Linux + 90) -#define SYS_munmap (SYS_Linux + 91) -#define SYS_truncate (SYS_Linux + 92) -#define SYS_ftruncate (SYS_Linux + 93) -#define SYS_fchmod (SYS_Linux + 94) -#define SYS_fchown (SYS_Linux + 95) -#define SYS_getpriority (SYS_Linux + 96) -#define SYS_setpriority (SYS_Linux + 97) -#define SYS_profil (SYS_Linux + 98) -#define SYS_statfs (SYS_Linux + 99) -#define SYS_fstatfs (SYS_Linux + 100) -#define SYS_ioperm (SYS_Linux + 101) -#define SYS_socketcall (SYS_Linux + 102) -#define SYS_syslog (SYS_Linux + 103) -#define SYS_setitimer (SYS_Linux + 104) -#define SYS_getitimer (SYS_Linux + 105) -#define SYS_stat (SYS_Linux + 106) -#define SYS_lstat (SYS_Linux + 107) -#define SYS_fstat (SYS_Linux + 108) -#define SYS_olduname (SYS_Linux + 109) -#define SYS_iopl (SYS_Linux + 110) -#define SYS_vhangup (SYS_Linux + 111) -#define SYS_idle (SYS_Linux + 112) -#define SYS_vm86 (SYS_Linux + 113) -#define SYS_wait4 (SYS_Linux + 114) -#define SYS_swapoff (SYS_Linux + 115) -#define SYS_sysinfo (SYS_Linux + 116) -#define SYS_ipc (SYS_Linux + 117) -#define SYS_fsync (SYS_Linux + 118) -#define SYS_sigreturn (SYS_Linux + 119) -#define SYS_clone (SYS_Linux + 120) -#define SYS_setdomainname (SYS_Linux + 121) -#define SYS_uname (SYS_Linux + 122) -#define SYS_modify_ldt (SYS_Linux + 123) -#define SYS_adjtimex (SYS_Linux + 124) -#define SYS_mprotect (SYS_Linux + 125) -#define SYS_sigprocmask (SYS_Linux + 126) -#define SYS_create_module (SYS_Linux + 127) -#define SYS_init_module (SYS_Linux + 128) -#define SYS_delete_module (SYS_Linux + 129) -#define SYS_get_kernel_syms (SYS_Linux + 130) -#define SYS_quotactl (SYS_Linux + 131) -#define SYS_getpgid (SYS_Linux + 132) -#define SYS_fchdir (SYS_Linux + 133) -#define SYS_bdflush (SYS_Linux + 134) -#define SYS_sysfs (SYS_Linux + 135) -#define SYS_personality (SYS_Linux + 136) -#define SYS_afs_syscall (SYS_Linux + 137) /* Syscall for Andrew File System */ -#define SYS_setfsuid (SYS_Linux + 138) -#define SYS_setfsgid (SYS_Linux + 139) -#define SYS__llseek (SYS_Linux + 140) -#define SYS_getdents (SYS_Linux + 141) -#define SYS__newselect (SYS_Linux + 142) -#define SYS_syscall_flock (SYS_Linux + 143) -#define SYS_msync (SYS_Linux + 144) -#define SYS_readv (SYS_Linux + 145) -#define SYS_writev (SYS_Linux + 146) -#define SYS_cacheflush (SYS_Linux + 147) -#define SYS_cachectl (SYS_Linux + 148) -#define SYS_sysmips (SYS_Linux + 149) -#define SYS_setup (SYS_Linux + 150) /* used only by init, to get system going */ -#define SYS_getsid (SYS_Linux + 151) -#define SYS_fdatasync (SYS_Linux + 152) -#define SYS__sysctl (SYS_Linux + 153) -#define SYS_mlock (SYS_Linux + 154) -#define SYS_munlock (SYS_Linux + 155) -#define SYS_mlockall (SYS_Linux + 156) -#define SYS_munlockall (SYS_Linux + 157) -#define SYS_sched_setparam (SYS_Linux + 158) -#define SYS_sched_getparam (SYS_Linux + 159) -#define SYS_sched_setscheduler (SYS_Linux + 160) -#define SYS_sched_getscheduler (SYS_Linux + 161) -#define SYS_sched_yield (SYS_Linux + 162) -#define SYS_sched_get_priority_max (SYS_Linux + 163) -#define SYS_sched_get_priority_min (SYS_Linux + 164) -#define SYS_sched_rr_get_interval (SYS_Linux + 165) -#define SYS_nanosleep (SYS_Linux + 166) -#define SYS_mremap (SYS_Linux + 167) -#define SYS_accept (SYS_Linux + 168) -#define SYS_bind (SYS_Linux + 169) -#define SYS_connect (SYS_Linux + 170) -#define SYS_getpeername (SYS_Linux + 171) -#define SYS_getsockname (SYS_Linux + 172) -#define SYS_getsockopt (SYS_Linux + 173) -#define SYS_listen (SYS_Linux + 174) -#define SYS_recv (SYS_Linux + 175) -#define SYS_recvfrom (SYS_Linux + 176) -#define SYS_recvmsg (SYS_Linux + 177) -#define SYS_send (SYS_Linux + 178) -#define SYS_sendmsg (SYS_Linux + 179) -#define SYS_sendto (SYS_Linux + 180) -#define SYS_setsockopt (SYS_Linux + 181) -#define SYS_shutdown (SYS_Linux + 182) -#define SYS_socket (SYS_Linux + 183) -#define SYS_socketpair (SYS_Linux + 184) -#define SYS_setresuid (SYS_Linux + 185) -#define SYS_getresuid (SYS_Linux + 186) -#define SYS_query_module (SYS_Linux + 187) -#define SYS_poll (SYS_Linux + 188) -#define SYS_nfsservctl (SYS_Linux + 189) -#define SYS_setresgid (SYS_Linux + 190) -#define SYS_getresgid (SYS_Linux + 191) -#define SYS_prctl (SYS_Linux + 192) -#define SYS_rt_sigreturn (SYS_Linux + 193) -#define SYS_rt_sigaction (SYS_Linux + 194) -#define SYS_rt_sigprocmask (SYS_Linux + 195) -#define SYS_rt_sigpending (SYS_Linux + 196) -#define SYS_rt_sigtimedwait (SYS_Linux + 197) -#define SYS_rt_sigqueueinfo (SYS_Linux + 198) -#define SYS_rt_sigsuspend (SYS_Linux + 199) -#define SYS_pread (SYS_Linux + 200) -#define SYS_pwrite (SYS_Linux + 201) -#define SYS_chown (SYS_Linux + 202) -#define SYS_getcwd (SYS_Linux + 203) -#define SYS_capget (SYS_Linux + 204) -#define SYS_capset (SYS_Linux + 205) -#define SYS_sigaltstack (SYS_Linux + 206) -#define SYS_sendfile (SYS_Linux + 207) -#define SYS_putpmsg (SYS_Linux + 208) -#define SYS_getpmsg (SYS_Linux + 209) -#define SYS_mmap2 (SYS_Linux + 210) -#define SYS_truncate64 (SYS_Linux + 211) -#define SYS_ftruncate64 (SYS_Linux + 212) -#define SYS_stat64 (SYS_Linux + 213) -#define SYS_lstat64 (SYS_Linux + 214) -#define SYS_fstat64 (SYS_Linux + 215) -#define SYS_pivot_root (SYS_Linux + 216) -#define SYS_mincore (SYS_Linux + 217) -#define SYS_madvise (SYS_Linux + 218) -#define SYS_getdents64 (SYS_Linux + 219) -#define SYS_fcntl64 (SYS_Linux + 220) - - -#endif /* sys/syscall.h */ From 87af90e7c33e38c1958ee0a49a26ab8af8c0fc08 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 5 Dec 2000 17:40:39 +0000 Subject: [PATCH 2371/4487] Linux/MIPS specific version. --- sysdeps/unix/sysv/linux/mips/sysdep.h | 36 +++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/mips/sysdep.h diff --git a/sysdeps/unix/sysv/linux/mips/sysdep.h b/sysdeps/unix/sysv/linux/mips/sysdep.h new file mode 100644 index 0000000000..f01a195870 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/sysdep.h @@ -0,0 +1,36 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _LINUX_MIPS_SYSDEP_H +#define _LINUX_MIPS_SYSDEP_H 1 + +/* There is some commonality. */ +#include + +/* For Linux we can use the system call table in the header file + /usr/include/asm/unistd.h + of the kernel. But these symbols do not follow the SYS_* syntax + so we have to redefine the `SYS_ify' macro here. */ +#undef SYS_ify +#ifdef __STDC__ +# define SYS_ify(syscall_name) __NR_##syscall_name +#else +# define SYS_ify(syscall_name) __NR_/**/syscall_name +#endif + +#endif /* linux/mips/sysdep.h */ From 94f1fa3185248ee05a26c42243a8ff2b93bae0f4 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 5 Dec 2000 17:41:00 +0000 Subject: [PATCH 2372/4487] Use SYS_ify. --- sysdeps/unix/mips/sysdep.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/mips/sysdep.h b/sysdeps/unix/mips/sysdep.h index 2ba1dea897..a5a3e5589e 100644 --- a/sysdeps/unix/mips/sysdep.h +++ b/sysdeps/unix/mips/sysdep.h @@ -40,7 +40,7 @@ ENTRY(name) \ .set noreorder; \ .cpload t9; \ - li v0, SYS_##syscall_name; \ + li v0, SYS_ify(syscall_name); \ syscall; \ .set reorder; \ bne a3, zero, 99b; \ @@ -52,7 +52,7 @@ 99: j __syscall_error; \ ENTRY(name) \ .set noreorder; \ - li v0, SYS_##syscall_name; \ + li v0, SYS_ify(syscall_name); \ syscall; \ .set reorder; \ bne a3, zero, 99b; \ From ae8186b5e30447264701604b22092260d6d72e2d Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 5 Dec 2000 17:59:58 +0000 Subject: [PATCH 2373/4487] (_test_and_set): Don't set mips2. --- sysdeps/unix/sysv/linux/mips/sys/tas.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/sys/tas.h b/sysdeps/unix/sysv/linux/mips/sys/tas.h index 8409535943..757b8bc1ea 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/tas.h +++ b/sysdeps/unix/sysv/linux/mips/sys/tas.h @@ -42,8 +42,7 @@ _test_and_set (int *p, int v) __THROW int r, t; __asm__ __volatile__ - (".set\tmips2\n" - "1:\n\t" + ("1:\n\t" "ll %0,%3\n\t" ".set push\n\t" ".set noreorder\n\t" @@ -52,8 +51,7 @@ _test_and_set (int *p, int v) __THROW ".set pop\n\t" "sc %1,%2\n\t" "beqz %1,1b\n" - "2:\n\t" - ".set\tmips0" + "2:\n" : "=&r" (r), "=&r" (t), "=m" (*p) : "m" (*p), "r" (v) : "memory"); From dcd9300681f7704b664b5d361ec35cf86ae58d3d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 6 Dec 2000 03:12:51 +0000 Subject: [PATCH 2374/4487] [$(subdir)==misc] (sysdep_routines): Add restf and savef. --- sysdeps/unix/sysv/aix/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/aix/Makefile b/sysdeps/unix/sysv/aix/Makefile index b49b56267e..cb8683bee5 100644 --- a/sysdeps/unix/sysv/aix/Makefile +++ b/sysdeps/unix/sysv/aix/Makefile @@ -6,7 +6,7 @@ static-start-installed-name = /usr/lib/crt0.o ifeq ($(subdir),misc) -sysdep_routines += dl-open dl-sym dl-close +sysdep_routines += dl-open dl-sym dl-close restf savef endif ifeq ($(subdir),login) From e198e3e80edda1ac746d34284c577298c10c4824 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 6 Dec 2000 03:13:59 +0000 Subject: [PATCH 2375/4487] Floating point register saving functions. --- sysdeps/unix/sysv/aix/savef.S | 58 +++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/savef.S diff --git a/sysdeps/unix/sysv/aix/savef.S b/sysdeps/unix/sysv/aix/savef.S new file mode 100644 index 0000000000..4c10d6ec85 --- /dev/null +++ b/sysdeps/unix/sysv/aix/savef.S @@ -0,0 +1,58 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +ENTRY(_savef_all) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef14) +C_TEXT(_savef14): stfd fp14,-144(r11) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef15) +C_TEXT(_savef15): stfd fp15,-136(r11) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef16) +C_TEXT(_savef16): stfd fp16,-128(r11) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef17) +C_TEXT(_savef17): stfd fp17,-120(r11) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef18) +C_TEXT(_savef18): stfd fp18,-112(r11) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef19) +C_TEXT(_savef19): stfd fp19,-104(r11) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef20) +C_TEXT(_savef20): stfd fp20,-96(r11) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef21) +C_TEXT(_savef21): stfd fp21,-88(r11) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef22) +C_TEXT(_savef22): stfd fp22,-80(r11) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef23) +C_TEXT(_savef23): stfd fp23,-72(r11) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef24) +C_TEXT(_savef24): stfd fp24,-64(r11) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef25) +C_TEXT(_savef25): stfd fp25,-56(r11) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef26) +C_TEXT(_savef26): stfd fp26,-48(r11) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef27) +C_TEXT(_savef27): stfd fp27,-40(r11) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef28) +C_TEXT(_savef28): stfd fp28,-32(r11) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef29) +C_TEXT(_savef29): stfd fp29,-24(r11) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef30) +C_TEXT(_savef30): stfd fp30,-16(r11) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef31) +C_TEXT(_savef31): stfd fp31,-8(r11) + blr From 66c776d7184831deed683b1e87b2eea9446a43b9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 6 Dec 2000 03:14:16 +0000 Subject: [PATCH 2376/4487] Floating point register restore functions. --- sysdeps/unix/sysv/aix/restf.S | 58 +++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/restf.S diff --git a/sysdeps/unix/sysv/aix/restf.S b/sysdeps/unix/sysv/aix/restf.S new file mode 100644 index 0000000000..049627e5c4 --- /dev/null +++ b/sysdeps/unix/sysv/aix/restf.S @@ -0,0 +1,58 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +ENTRY(_restf_all) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf14) +C_TEXT(_restf14): lfd fp14,-144(r11) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf15) +C_TEXT(_restf15): lfd fp15,-136(r11) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf16) +C_TEXT(_restf16): lfd fp16,-128(r11) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf17) +C_TEXT(_restf17): lfd fp17,-120(r11) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf18) +C_TEXT(_restf18): lfd fp18,-112(r11) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf19) +C_TEXT(_restf19): lfd fp19,-104(r11) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf20) +C_TEXT(_restf20): lfd fp20,-96(r11) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf21) +C_TEXT(_restf21): lfd fp21,-88(r11) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf22) +C_TEXT(_restf22): lfd fp22,-80(r11) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf23) +C_TEXT(_restf23): lfd fp23,-72(r11) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf24) +C_TEXT(_restf24): lfd fp24,-64(r11) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf25) +C_TEXT(_restf25): lfd fp25,-56(r11) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf26) +C_TEXT(_restf26): lfd fp26,-48(r11) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf27) +C_TEXT(_restf27): lfd fp27,-40(r11) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf28) +C_TEXT(_restf28): lfd fp28,-32(r11) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf29) +C_TEXT(_restf29): lfd fp29,-24(r11) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf30) +C_TEXT(_restf30): lfd fp30,-16(r11) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf31) +C_TEXT(_restf31): lfd fp31,-8(r11) + blr From d284ba97fbe3482a2b0231478f31e1dae6a1a949 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 6 Dec 2000 04:05:25 +0000 Subject: [PATCH 2377/4487] (__data_start): Define. --- sysdeps/alpha/elf/start.S | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sysdeps/alpha/elf/start.S b/sysdeps/alpha/elf/start.S index b5e5df102a..90f59f0452 100644 --- a/sysdeps/alpha/elf/start.S +++ b/sysdeps/alpha/elf/start.S @@ -1,5 +1,5 @@ /* Startup code for Alpha/ELF. - Copyright (C) 1993, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1993,1995,1996,1997,1998,2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson @@ -59,3 +59,11 @@ _start: /* For ECOFF backwards compatibility. */ weak_alias(_start, __start) + +/* Define a symbol for the first piece of initialized data. */ + .data + .globl __data_start +__data_start: + .long 0 + .weak data_start + data_start = __data_start From a8028612ca7f7b5f61ccd5b71ffa9d7fe26ff2ed Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 7 Dec 2000 00:31:48 +0000 Subject: [PATCH 2378/4487] __uitrunc implementation. --- sysdeps/unix/sysv/aix/uitrunc.c | 42 +++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/uitrunc.c diff --git a/sysdeps/unix/sysv/aix/uitrunc.c b/sysdeps/unix/sysv/aix/uitrunc.c new file mode 100644 index 0000000000..34a109b409 --- /dev/null +++ b/sysdeps/unix/sysv/aix/uitrunc.c @@ -0,0 +1,42 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +/* The uitrunc function returns the nearest unsigned integer + to the x parameter in the direction of 0. This actions is + equivalent to truncation off the fraction bits of the x + parameter and then converting x to an unsigned integer. */ +unsigned int +__uitrunc (double x) +{ + double xrf; + unsigned int xr; + xr = (unsigned int) x; + xrf = (double) xr; + if (x >= 0.0) + if (x - xrf >= 0.5 && x - xrf < 1.0 && x + 1 > 0) + return x + 1; + else + return x; + else + if (xrf - x >= 0.5 && xrf - x < 1.0 && x - 1 < 0) + return x - 1; + else + return x; +} From f26c98f0d41604663ac5868d67f22251bbef380b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 7 Dec 2000 00:32:26 +0000 Subject: [PATCH 2379/4487] [$(subdir)==misc] (sysdep_routines): Add uitrunc. --- sysdeps/unix/sysv/aix/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/aix/Makefile b/sysdeps/unix/sysv/aix/Makefile index cb8683bee5..6c9ce1113e 100644 --- a/sysdeps/unix/sysv/aix/Makefile +++ b/sysdeps/unix/sysv/aix/Makefile @@ -6,7 +6,7 @@ static-start-installed-name = /usr/lib/crt0.o ifeq ($(subdir),misc) -sysdep_routines += dl-open dl-sym dl-close restf savef +sysdep_routines += dl-open dl-sym dl-close restf savef uitrunc endif ifeq ($(subdir),login) From 4ba8e511ff2c0e7a087c304c9ece62b006c62d9e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 8 Dec 2000 17:16:05 +0000 Subject: [PATCH 2380/4487] Use a shorter sequence. --- sysdeps/alpha/htonl.S | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/sysdeps/alpha/htonl.S b/sysdeps/alpha/htonl.S index a4e39cee1b..2358861300 100644 --- a/sysdeps/alpha/htonl.S +++ b/sysdeps/alpha/htonl.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998, 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 @@ -30,15 +30,13 @@ ENTRY(htonl) .prologue 0 #endif - extlh a0, 5, t1 # t1 = dd000000 - zap a0, 0xfd, t2 # t2 = 0000cc00 - sll t2, 5, t2 # t2 = 00198000 - s8addl t2, t1, t1 # t1 = ddcc0000 - zap a0, 0xfb, t2 # t2 = 00bb0000 - srl t2, 8, t2 # t2 = 0000bb00 - extbl a0, 3, v0 # v0 = 000000aa - or t1, v0, v0 # v0 = ddcc00aa - or t2, v0, v0 # v0 = ddccbbaa + inslh a0, 7, t0 # t0 = 0000000000AABBCC + inswl a0, 3, t1 # t1 = 000000CCDD000000 + or t1, t0, t1 # t1 = 000000CCDDAABBCC + sll t1, 16, t2 # t2 = 0000000000CCDDAA + zapnot t1, 0x0A, t0 # t0 = 00000000DD00BB00 + zapnot t2, 0x05, t3 # t3 = 0000000000CC00AA + addl t0, t3, v0 # v0 = ssssssssDDCCBBAA ret END(htonl) From fa6dc9e01ee994296afbf60ea4401ef7dd464940 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 8 Dec 2000 17:16:25 +0000 Subject: [PATCH 2381/4487] Alpha rawmemchr implementation. --- sysdeps/alpha/rawmemchr.S | 89 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 sysdeps/alpha/rawmemchr.S diff --git a/sysdeps/alpha/rawmemchr.S b/sysdeps/alpha/rawmemchr.S new file mode 100644 index 0000000000..bbf54a9af4 --- /dev/null +++ b/sysdeps/alpha/rawmemchr.S @@ -0,0 +1,89 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* Return pointer to first occurrence of CH in STR. */ + +#include + + .set noreorder + .set noat + +ENTRY(__rawmemchr) +#ifdef PROF + ldgp gp, 0(pv) + lda AT, _mcount + jsr AT, (AT), _mcount + .prologue 1 +#else + .prologue 0 +#endif + + zapnot a1, 1, a1 # e0 : zero extend the search character + ldq_u t0, 0(a0) # .. e1 : load first quadword + sll a1, 8, t5 # e0 : replicate the search character + andnot a0, 7, v0 # .. e1 : align our loop pointer + + or t5, a1, a1 # e0 : + lda t4, -1 # .. e1 : build garbage mask + sll a1, 16, t5 # e0 : + unop # : + + mskqh t4, a0, t4 # e0 : + or t5, a1, a1 # .. e1 : + sll a1, 32, t5 # e0 : + cmpbge zero, t4, t4 # .. e1 : bits set iff byte is garbage + + or t5, a1, a1 # e0 : + xor t0, a1, t1 # .. e1 : make bytes == c zero + cmpbge zero, t1, t3 # e0 : bits set iff byte == c + unop # : + + andnot t3, t4, t0 # e0 : clear garbage bits + fnop # .. fa : + unop # : + bne t0, $found # .. e1 (zdb) + + .align 4 +$loop: + ldq t0, 8(v0) # e0 : + addq v0, 8, v0 # .. e1 : + nop # e0 : + xor t0, a1, t1 # .. e1 (ev5 data stall) + + cmpbge zero, t1, t0 # e0 : bits set iff byte == c + beq t0, $loop # .. e1 (zdb) + +$found: + negq t0, t1 # e0 : clear all but least set bit + and t0, t1, t0 # e1 (stall) + and t0, 0xf0, t2 # e0 : binary search for that set bit + and t0, 0xcc, t3 # .. e1 : + + and t0, 0xaa, t4 # e0 : + cmovne t2, 4, t2 # .. e1 : + cmovne t3, 2, t3 # e0 : + cmovne t4, 1, t4 # .. e1 : + + addq t2, t3, t2 # e0 : + addq v0, t4, v0 # .. e1 : + addq v0, t2, v0 # e0 : + ret # .. e1 : + + END(__rawmemchr) + +weak_alias (__rawmemchr, rawmemchr) From de55c82792509d1df67e0e8a4c18d4fff741d7ab Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 8 Dec 2000 17:16:42 +0000 Subject: [PATCH 2382/4487] Tail call to __stxcpy. --- sysdeps/alpha/strcat.S | 4 ++-- sysdeps/alpha/strcpy.S | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/alpha/strcat.S b/sysdeps/alpha/strcat.S index ddc15d9ca6..433ca9fe64 100644 --- a/sysdeps/alpha/strcat.S +++ b/sysdeps/alpha/strcat.S @@ -65,7 +65,7 @@ $found: negq t1, t2 # clear all but least set bit /* Now do the append. */ - jsr t9, __stxcpy - ret + mov ra, t9 + jmp $31, __stxcpy END(strcat) diff --git a/sysdeps/alpha/strcpy.S b/sysdeps/alpha/strcpy.S index 24c827b10f..2fa631868f 100644 --- a/sysdeps/alpha/strcpy.S +++ b/sysdeps/alpha/strcpy.S @@ -35,7 +35,7 @@ ENTRY(strcpy) .prologue 1 mov a0, v0 # set up return value - jsr t9, __stxcpy # do the copy - ret + mov ra, t9 + jmp $31, __stxcpy # do the copy END(strcpy) From ebc9cec7b73153e782100ea03fb884426245a04a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 8 Dec 2000 17:16:52 +0000 Subject: [PATCH 2383/4487] Fix typo. --- sysdeps/alpha/_mcount.S | 2 +- sysdeps/alpha/strncpy.S | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/sysdeps/alpha/_mcount.S b/sysdeps/alpha/_mcount.S index f4c234db38..615f43938d 100644 --- a/sysdeps/alpha/_mcount.S +++ b/sysdeps/alpha/_mcount.S @@ -27,7 +27,7 @@ compiler treats those calls as if they were instructions. In particular, it doesn't save any of the temporary registers (caller saved registers). It is therefore necessary to preserve all - caller-saved registers as well + caller-saved registers as well. Upon entering _mcount, register $at holds the return address and ra holds the return address of the function's caller (selfpc and frompc, diff --git a/sysdeps/alpha/strncpy.S b/sysdeps/alpha/strncpy.S index 91bf928542..97d741606a 100644 --- a/sysdeps/alpha/strncpy.S +++ b/sysdeps/alpha/strncpy.S @@ -53,7 +53,6 @@ ENTRY(strncpy) ret # .. e1 : $multiword: - subq t8, 1, t7 # e0 : clear the final bits in the prev or t7, t8, t7 # e1 : word zapnot t0, t7, t0 # e0 : From 8e8e600ed7c7c27f5aa6181d82850692592fac10 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 8 Dec 2000 17:17:08 +0000 Subject: [PATCH 2384/4487] Implied directories for alpha/alphaev6. --- sysdeps/alpha/alphaev6/Implies | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/alpha/alphaev6/Implies diff --git a/sysdeps/alpha/alphaev6/Implies b/sysdeps/alpha/alphaev6/Implies new file mode 100644 index 0000000000..0e7fc170ba --- /dev/null +++ b/sysdeps/alpha/alphaev6/Implies @@ -0,0 +1 @@ +alpha/alphaev5 From 5ab79e974f71566a6e22abcc5de3693a997c4dc5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 8 Dec 2000 17:17:16 +0000 Subject: [PATCH 2385/4487] Implied directories for alpha/alphaev67. --- sysdeps/alpha/alphaev67/Implies | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/alpha/alphaev67/Implies diff --git a/sysdeps/alpha/alphaev67/Implies b/sysdeps/alpha/alphaev67/Implies new file mode 100644 index 0000000000..49d19c4ad8 --- /dev/null +++ b/sysdeps/alpha/alphaev67/Implies @@ -0,0 +1 @@ +alpha/alphaev6 From a1225f9a32cd000a7d52d6924c41c466d772c0e2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 8 Dec 2000 17:18:04 +0000 Subject: [PATCH 2386/4487] Alpha ev6 addmul_1 implementation. --- sysdeps/alpha/alphaev6/addmul_1.s | 479 ++++++++++++++++++++++++++++++ 1 file changed, 479 insertions(+) create mode 100644 sysdeps/alpha/alphaev6/addmul_1.s diff --git a/sysdeps/alpha/alphaev6/addmul_1.s b/sysdeps/alpha/alphaev6/addmul_1.s new file mode 100644 index 0000000000..a061fb9edb --- /dev/null +++ b/sysdeps/alpha/alphaev6/addmul_1.s @@ -0,0 +1,479 @@ + # Alpha ev6 mpn_addmul_1 -- Multiply a limb vector with a limb and add + # the result to a second limb vector. + # + # Copyright (C) 2000 Free Software Foundation, Inc. + # + # This file is part of the GNU MP Library. + # + # The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to + # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + # MA 02111-1307, USA. + + # INPUT PARAMETERS + # res_ptr $16 + # s1_ptr $17 + # size $18 + # s2_limb $19 + # + # This code runs at 42 cycles/limb on EV4, 18 cycles/limb on EV5, and + # exactly 3.625 cycles/limb on EV6... + # + # This code was written in close cooperation with ev6 pipeline expert + # Steve Root (root@toober.hlo.dec.com). Any errors are tege's fault, though. + # + # Register usages for unrolled loop: + # 0-3 mul's + # 4-7 acc's + # 8-15 mul results + # 20,21 carry's + # 22,23 save for stores + # + # Sustains 8 mul-adds in 29 cycles in the unrolled inner loop. + # + # The stores can issue a cycle late so we have paired no-op's to 'catch' + # them, so that further disturbance to the schedule is damped. + # + # We couldn't pair the loads, because the entangled schedule of the + # carry's has to happen on one side {0} of the machine. Note, the total + # use of U0, and the total use of L0 (after attending to the stores). + # which is part of the reason why.... + # + # This is a great schedule for the d_cache, a poor schedule for the + # b_cache. The lockup on U0 means that any stall can't be recovered + # from. Consider a ldq in L1. say that load gets stalled because it + # collides with a fill from the b_Cache. On the next cycle, this load + # gets priority. If first looks at L0, and goes there. The instruction + # we intended for L0 gets to look at L1, which is NOT where we want + # it. It either stalls 1, because it can't go in L0, or goes there, and + # causes a further instruction to stall. + # + # So for b_cache, we're likely going to want to put one or more cycles + # back into the code! And, of course, put in prefetches. For the + # accumulator, lds, intent to modify. For the multiplier, you might + # want ldq, evict next, if you're not wanting to use it again soon. Use + # 256 ahead of present pointer value. At a place where we have an mt + # followed by a bookkeeping, put the bookkeeping in upper, and the + # prefetch into lower. + # + # Note, the usage of physical registers per cycle is smoothed off, as + # much as possible. + # + # Note, the ldq's and stq's are at the end of the quadpacks. note, we'd + # like not to have a ldq or stq to preceded a conditional branch in a + # quadpack. The conditional branch moves the retire pointer one cycle + # later. + # + # Optimization notes: + # Callee-saves regs: $9 $10 $11 $12 $13 $14 $15 $26 ?$27? + # Reserved regs: $29 $30 $31 + # Free caller-saves regs in unrolled code: $24 $25 $28 + # We should swap some of the callee-saves regs for some of the free + # caller-saves regs, saving some overhead cycles. + # Most importantly, we should write fast code for the 0-7 case. + # The code we use there are for the 21164, and runs at 7 cycles/limb + # on the 21264. Should not be hard, if we write specialized code for + # 1-7 limbs (the one for 0 limbs should be straightforward). We then just + # need a jump table indexed by the low 3 bits of the count argument. + + .set noreorder + .set noat + .text + + .globl __mpn_addmul_1 + .ent __mpn_addmul_1 +__mpn_addmul_1: + .frame $30,0,$26,0 + .prologue 0 + + cmpult $18, 8, $1 + beq $1, $Large + + ldq $2, 0($17) # $2 = s1_limb + addq $17, 8, $17 # s1_ptr++ + subq $18, 1, $18 # size-- + mulq $2, $19, $3 # $3 = prod_low + ldq $5, 0($16) # $5 = *res_ptr + umulh $2, $19, $0 # $0 = prod_high + beq $18, $Lend0b # jump if size was == 1 + ldq $2, 0($17) # $2 = s1_limb + addq $17, 8, $17 # s1_ptr++ + subq $18, 1, $18 # size-- + addq $5, $3, $3 + cmpult $3, $5, $4 + stq $3, 0($16) + addq $16, 8, $16 # res_ptr++ + beq $18, $Lend0a # jump if size was == 2 + + .align 3 +$Loop0: mulq $2, $19, $3 # $3 = prod_low + ldq $5, 0($16) # $5 = *res_ptr + addq $4, $0, $0 # cy_limb = cy_limb + 'cy' + subq $18, 1, $18 # size-- + umulh $2, $19, $4 # $4 = cy_limb + ldq $2, 0($17) # $2 = s1_limb + addq $17, 8, $17 # s1_ptr++ + addq $3, $0, $3 # $3 = cy_limb + prod_low + cmpult $3, $0, $0 # $0 = carry from (cy_limb + prod_low) + addq $5, $3, $3 + cmpult $3, $5, $5 + stq $3, 0($16) + addq $16, 8, $16 # res_ptr++ + addq $5, $0, $0 # combine carries + bne $18, $Loop0 +$Lend0a: + mulq $2, $19, $3 # $3 = prod_low + ldq $5, 0($16) # $5 = *res_ptr + addq $4, $0, $0 # cy_limb = cy_limb + 'cy' + umulh $2, $19, $4 # $4 = cy_limb + addq $3, $0, $3 # $3 = cy_limb + prod_low + cmpult $3, $0, $0 # $0 = carry from (cy_limb + prod_low) + addq $5, $3, $3 + cmpult $3, $5, $5 + stq $3, 0($16) + addq $5, $0, $0 # combine carries + addq $4, $0, $0 # cy_limb = prod_high + cy + ret $31, ($26), 1 +$Lend0b: + addq $5, $3, $3 + cmpult $3, $5, $5 + stq $3, 0($16) + addq $0, $5, $0 + ret $31, ($26), 1 + +$Large: + lda $30, -240($30) + stq $9, 8($30) + stq $10, 16($30) + stq $11, 24($30) + stq $12, 32($30) + stq $13, 40($30) + stq $14, 48($30) + stq $15, 56($30) + + and $18, 7, $20 # count for the first loop, 0-7 + srl $18, 3, $18 # count for unrolled loop + bis $31, $31, $0 + beq $20, $Lunroll + ldq $2, 0($17) # $2 = s1_limb + addq $17, 8, $17 # s1_ptr++ + subq $20, 1, $20 # size-- + mulq $2, $19, $3 # $3 = prod_low + ldq $5, 0($16) # $5 = *res_ptr + umulh $2, $19, $0 # $0 = prod_high + beq $20, $Lend1b # jump if size was == 1 + ldq $2, 0($17) # $2 = s1_limb + addq $17, 8, $17 # s1_ptr++ + subq $20, 1, $20 # size-- + addq $5, $3, $3 + cmpult $3, $5, $4 + stq $3, 0($16) + addq $16, 8, $16 # res_ptr++ + beq $20, $Lend1a # jump if size was == 2 + + .align 3 +$Loop1: mulq $2, $19, $3 # $3 = prod_low + ldq $5, 0($16) # $5 = *res_ptr + addq $4, $0, $0 # cy_limb = cy_limb + 'cy' + subq $20, 1, $20 # size-- + umulh $2, $19, $4 # $4 = cy_limb + ldq $2, 0($17) # $2 = s1_limb + addq $17, 8, $17 # s1_ptr++ + addq $3, $0, $3 # $3 = cy_limb + prod_low + cmpult $3, $0, $0 # $0 = carry from (cy_limb + prod_low) + addq $5, $3, $3 + cmpult $3, $5, $5 + stq $3, 0($16) + addq $16, 8, $16 # res_ptr++ + addq $5, $0, $0 # combine carries + bne $20, $Loop1 + +$Lend1a: + mulq $2, $19, $3 # $3 = prod_low + ldq $5, 0($16) # $5 = *res_ptr + addq $4, $0, $0 # cy_limb = cy_limb + 'cy' + umulh $2, $19, $4 # $4 = cy_limb + addq $3, $0, $3 # $3 = cy_limb + prod_low + cmpult $3, $0, $0 # $0 = carry from (cy_limb + prod_low) + addq $5, $3, $3 + cmpult $3, $5, $5 + stq $3, 0($16) + addq $16, 8, $16 # res_ptr++ + addq $5, $0, $0 # combine carries + addq $4, $0, $0 # cy_limb = prod_high + cy + br $31, $Lunroll +$Lend1b: + addq $5, $3, $3 + cmpult $3, $5, $5 + stq $3, 0($16) + addq $16, 8, $16 # res_ptr++ + addq $0, $5, $0 + +$Lunroll: + lda $17, -16($17) # L1 bookkeeping + lda $16, -16($16) # L1 bookkeeping + bis $0, $31, $12 + + # ____ UNROLLED LOOP SOFTWARE PIPELINE STARTUP ____ + + ldq $2, 16($17) # L1 + ldq $3, 24($17) # L1 + lda $18, -1($18) # L1 bookkeeping + ldq $6, 16($16) # L1 + ldq $7, 24($16) # L1 + ldq $0, 32($17) # L1 + mulq $19, $2, $13 # U1 + ldq $1, 40($17) # L1 + umulh $19, $2, $14 # U1 + mulq $19, $3, $15 # U1 + lda $17, 64($17) # L1 bookkeeping + ldq $4, 32($16) # L1 + ldq $5, 40($16) # L1 + umulh $19, $3, $8 # U1 + ldq $2, -16($17) # L1 + mulq $19, $0, $9 # U1 + ldq $3, -8($17) # L1 + umulh $19, $0, $10 # U1 + addq $6, $13, $6 # L0 lo + acc + mulq $19, $1, $11 # U1 + cmpult $6, $13, $20 # L0 lo add => carry + lda $16, 64($16) # L1 bookkeeping + addq $6, $12, $22 # U0 hi add => answer + cmpult $22, $12, $21 # L0 hi add => carry + addq $14, $20, $14 # U0 hi mul + carry + ldq $6, -16($16) # L1 + addq $7, $15, $23 # L0 lo + acc + addq $14, $21, $14 # U0 hi mul + carry + ldq $7, -8($16) # L1 + umulh $19, $1, $12 # U1 + cmpult $23, $15, $20 # L0 lo add => carry + addq $23, $14, $23 # U0 hi add => answer + ldq $0, 0($17) # L1 + mulq $19, $2, $13 # U1 + cmpult $23, $14, $21 # L0 hi add => carry + addq $8, $20, $8 # U0 hi mul + carry + ldq $1, 8($17) # L1 + umulh $19, $2, $14 # U1 + addq $4, $9, $4 # L0 lo + acc + stq $22, -48($16) # L0 + stq $23, -40($16) # L1 + mulq $19, $3, $15 # U1 + addq $8, $21, $8 # U0 hi mul + carry + cmpult $4, $9, $20 # L0 lo add => carry + addq $4, $8, $22 # U0 hi add => answer + ble $18, $Lend # U1 bookkeeping + + # ____ MAIN UNROLLED LOOP ____ + .align 4 +$Loop: + bis $31, $31, $31 # U1 mt + cmpult $22, $8, $21 # L0 hi add => carry + addq $10, $20, $10 # U0 hi mul + carry + ldq $4, 0($16) # L1 + + bis $31, $31, $31 # U1 mt + addq $5, $11, $23 # L0 lo + acc + addq $10, $21, $10 # L0 hi mul + carry + ldq $5, 8($16) # L1 + + umulh $19, $3, $8 # U1 + cmpult $23, $11, $20 # L0 lo add => carry + addq $23, $10, $23 # U0 hi add => answer + ldq $2, 16($17) # L1 + + mulq $19, $0, $9 # U1 + cmpult $23, $10, $21 # L0 hi add => carry + addq $12, $20, $12 # U0 hi mul + carry + ldq $3, 24($17) # L1 + + umulh $19, $0, $10 # U1 + addq $6, $13, $6 # L0 lo + acc + stq $22, -32($16) # L0 + stq $23, -24($16) # L1 + + bis $31, $31, $31 # L0 st slosh + mulq $19, $1, $11 # U1 + bis $31, $31, $31 # L1 st slosh + addq $12, $21, $12 # U0 hi mul + carry + + cmpult $6, $13, $20 # L0 lo add => carry + bis $31, $31, $31 # U1 mt + lda $18, -1($18) # L1 bookkeeping + addq $6, $12, $22 # U0 hi add => answer + + bis $31, $31, $31 # U1 mt + cmpult $22, $12, $21 # L0 hi add => carry + addq $14, $20, $14 # U0 hi mul + carry + ldq $6, 16($16) # L1 + + bis $31, $31, $31 # U1 mt + addq $7, $15, $23 # L0 lo + acc + addq $14, $21, $14 # U0 hi mul + carry + ldq $7, 24($16) # L1 + + umulh $19, $1, $12 # U1 + cmpult $23, $15, $20 # L0 lo add => carry + addq $23, $14, $23 # U0 hi add => answer + ldq $0, 32($17) # L1 + + mulq $19, $2, $13 # U1 + cmpult $23, $14, $21 # L0 hi add => carry + addq $8, $20, $8 # U0 hi mul + carry + ldq $1, 40($17) # L1 + + umulh $19, $2, $14 # U1 + addq $4, $9, $4 # U0 lo + acc + stq $22, -16($16) # L0 + stq $23, -8($16) # L1 + + bis $31, $31, $31 # L0 st slosh + mulq $19, $3, $15 # U1 + bis $31, $31, $31 # L1 st slosh + addq $8, $21, $8 # L0 hi mul + carry + + cmpult $4, $9, $20 # L0 lo add => carry + bis $31, $31, $31 # U1 mt + lda $17, 64($17) # L1 bookkeeping + addq $4, $8, $22 # U0 hi add => answer + + bis $31, $31, $31 # U1 mt + cmpult $22, $8, $21 # L0 hi add => carry + addq $10, $20, $10 # U0 hi mul + carry + ldq $4, 32($16) # L1 + + bis $31, $31, $31 # U1 mt + addq $5, $11, $23 # L0 lo + acc + addq $10, $21, $10 # L0 hi mul + carry + ldq $5, 40($16) # L1 + + umulh $19, $3, $8 # U1 + cmpult $23, $11, $20 # L0 lo add => carry + addq $23, $10, $23 # U0 hi add => answer + ldq $2, -16($17) # L1 + + mulq $19, $0, $9 # U1 + cmpult $23, $10, $21 # L0 hi add => carry + addq $12, $20, $12 # U0 hi mul + carry + ldq $3, -8($17) # L1 + + umulh $19, $0, $10 # U1 + addq $6, $13, $6 # L0 lo + acc + stq $22, 0($16) # L0 + stq $23, 8($16) # L1 + + bis $31, $31, $31 # L0 st slosh + mulq $19, $1, $11 # U1 + bis $31, $31, $31 # L1 st slosh + addq $12, $21, $12 # U0 hi mul + carry + + cmpult $6, $13, $20 # L0 lo add => carry + bis $31, $31, $31 # U1 mt + lda $16, 64($16) # L1 bookkeeping + addq $6, $12, $22 # U0 hi add => answer + + bis $31, $31, $31 # U1 mt + cmpult $22, $12, $21 # L0 hi add => carry + addq $14, $20, $14 # U0 hi mul + carry + ldq $6, -16($16) # L1 + + bis $31, $31, $31 # U1 mt + addq $7, $15, $23 # L0 lo + acc + addq $14, $21, $14 # U0 hi mul + carry + ldq $7, -8($16) # L1 + + umulh $19, $1, $12 # U1 + cmpult $23, $15, $20 # L0 lo add => carry + addq $23, $14, $23 # U0 hi add => answer + ldq $0, 0($17) # L1 + + mulq $19, $2, $13 # U1 + cmpult $23, $14, $21 # L0 hi add => carry + addq $8, $20, $8 # U0 hi mul + carry + ldq $1, 8($17) # L1 + + umulh $19, $2, $14 # U1 + addq $4, $9, $4 # L0 lo + acc + stq $22, -48($16) # L0 + stq $23, -40($16) # L1 + + bis $31, $31, $31 # L0 st slosh + mulq $19, $3, $15 # U1 + bis $31, $31, $31 # L1 st slosh + addq $8, $21, $8 # U0 hi mul + carry + + cmpult $4, $9, $20 # L0 lo add => carry + addq $4, $8, $22 # U0 hi add => answer + bis $31, $31, $31 # L1 mt + bgt $18, $Loop # U1 bookkeeping + +# ____ UNROLLED LOOP SOFTWARE PIPELINE FINISH ____ +$Lend: + cmpult $22, $8, $21 # L0 hi add => carry + addq $10, $20, $10 # U0 hi mul + carry + ldq $4, 0($16) # L1 + addq $5, $11, $23 # L0 lo + acc + addq $10, $21, $10 # L0 hi mul + carry + ldq $5, 8($16) # L1 + umulh $19, $3, $8 # U1 + cmpult $23, $11, $20 # L0 lo add => carry + addq $23, $10, $23 # U0 hi add => answer + mulq $19, $0, $9 # U1 + cmpult $23, $10, $21 # L0 hi add => carry + addq $12, $20, $12 # U0 hi mul + carry + umulh $19, $0, $10 # U1 + addq $6, $13, $6 # L0 lo + acc + stq $22, -32($16) # L0 + stq $23, -24($16) # L1 + mulq $19, $1, $11 # U1 + addq $12, $21, $12 # U0 hi mul + carry + cmpult $6, $13, $20 # L0 lo add => carry + addq $6, $12, $22 # U0 hi add => answer + cmpult $22, $12, $21 # L0 hi add => carry + addq $14, $20, $14 # U0 hi mul + carry + addq $7, $15, $23 # L0 lo + acc + addq $14, $21, $14 # U0 hi mul + carry + umulh $19, $1, $12 # U1 + cmpult $23, $15, $20 # L0 lo add => carry + addq $23, $14, $23 # U0 hi add => answer + cmpult $23, $14, $21 # L0 hi add => carry + addq $8, $20, $8 # U0 hi mul + carry + addq $4, $9, $4 # U0 lo + acc + stq $22, -16($16) # L0 + stq $23, -8($16) # L1 + bis $31, $31, $31 # L0 st slosh + addq $8, $21, $8 # L0 hi mul + carry + cmpult $4, $9, $20 # L0 lo add => carry + addq $4, $8, $22 # U0 hi add => answer + cmpult $22, $8, $21 # L0 hi add => carry + addq $10, $20, $10 # U0 hi mul + carry + addq $5, $11, $23 # L0 lo + acc + addq $10, $21, $10 # L0 hi mul + carry + cmpult $23, $11, $20 # L0 lo add => carry + addq $23, $10, $23 # U0 hi add => answer + cmpult $23, $10, $21 # L0 hi add => carry + addq $12, $20, $12 # U0 hi mul + carry + stq $22, 0($16) # L0 + stq $23, 8($16) # L1 + addq $12, $21, $0 # U0 hi mul + carry + + ldq $9, 8($30) + ldq $10, 16($30) + ldq $11, 24($30) + ldq $12, 32($30) + ldq $13, 40($30) + ldq $14, 48($30) + ldq $15, 56($30) + lda $30, 240($30) + ret $31, ($26), 1 + + .end __mpn_addmul_1 From 6ec379e7289ec53c6892cffe8dd7880d1208f7f4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 8 Dec 2000 17:18:13 +0000 Subject: [PATCH 2387/4487] Alpha ev6 memchr implementation. --- sysdeps/alpha/alphaev6/memchr.S | 192 ++++++++++++++++++++++++++++++++ 1 file changed, 192 insertions(+) create mode 100644 sysdeps/alpha/alphaev6/memchr.S diff --git a/sysdeps/alpha/alphaev6/memchr.S b/sysdeps/alpha/alphaev6/memchr.S new file mode 100644 index 0000000000..0dfcbea76a --- /dev/null +++ b/sysdeps/alpha/alphaev6/memchr.S @@ -0,0 +1,192 @@ +/* Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Mosberger (davidm@cs.arizona.edu). + EV6 optimized by Rick Gorton . + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + + .arch ev6 + .set noreorder + .set noat + +ENTRY(__memchr) +#ifdef PROF + ldgp gp, 0(pv) + lda AT, _mcount + jsr AT, (AT), _mcount + .prologue 1 +#else + .prologue 0 +#endif + + # Hack -- if someone passes in (size_t)-1, hoping to just + # search til the end of the address space, we will overflow + # below when we find the address of the last byte. Given + # that we will never have a 56-bit address space, cropping + # the length is the easiest way to avoid trouble. + zap $18, 0x80, $5 # U : Bound length + beq $18, $not_found # U : + ldq_u $1, 0($16) # L : load first quadword Latency=3 + and $17, 0xff, $17 # E : L L U U : 00000000000000ch + + insbl $17, 1, $2 # U : 000000000000ch00 + cmpult $18, 9, $4 # E : small (< 1 quad) string? + or $2, $17, $17 # E : 000000000000chch + lda $3, -1($31) # E : U L L U + + sll $17, 16, $2 # U : 00000000chch0000 + addq $16, $5, $5 # E : Max search address + or $2, $17, $17 # E : 00000000chchchch + sll $17, 32, $2 # U : U L L U : chchchch00000000 + + or $2, $17, $17 # E : chchchchchchchch + extql $1, $16, $7 # U : $7 is upper bits + beq $4, $first_quad # U : + ldq_u $6, -1($5) # L : L U U L : eight or less bytes to search Latency=3 + + extqh $6, $16, $6 # U : 2 cycle stall for $6 + mov $16, $0 # E : + nop # E : + or $7, $6, $1 # E : L U L U $1 = quadword starting at $16 + + # Deal with the case where at most 8 bytes remain to be searched + # in $1. E.g.: + # $18 = 6 + # $1 = ????c6c5c4c3c2c1 +$last_quad: + negq $18, $6 # E : + xor $17, $1, $1 # E : + srl $3, $6, $6 # U : $6 = mask of $18 bits set + cmpbge $31, $1, $2 # E : L U L U + + nop + nop + and $2, $6, $2 # E : + beq $2, $not_found # U : U L U L + +$found_it: +#if defined(__alpha_fix__) && defined(__alpha_cix__) + /* + * Since we are guaranteed to have set one of the bits, we don't + * have to worry about coming back with a 0x40 out of cttz... + */ + cttz $2, $3 # U0 : + addq $0, $3, $0 # E : All done + nop # E : + ret # L0 : L U L U +#else + /* + * Slow and clunky. It can probably be improved. + * An exercise left for others. + */ + negq $2, $3 # E : + and $2, $3, $2 # E : + and $2, 0x0f, $1 # E : + addq $0, 4, $3 # E : + + cmoveq $1, $3, $0 # E : Latency 2, extra map cycle + nop # E : keep with cmov + and $2, 0x33, $1 # E : + addq $0, 2, $3 # E : U L U L : 2 cycle stall on $0 + + cmoveq $1, $3, $0 # E : Latency 2, extra map cycle + nop # E : keep with cmov + and $2, 0x55, $1 # E : + addq $0, 1, $3 # E : U L U L : 2 cycle stall on $0 + + cmoveq $1, $3, $0 # E : Latency 2, extra map cycle + nop + nop + ret # L0 : L U L U +#endif + + # Deal with the case where $18 > 8 bytes remain to be + # searched. $16 may not be aligned. + .align 4 +$first_quad: + andnot $16, 0x7, $0 # E : + insqh $3, $16, $2 # U : $2 = 0000ffffffffffff ($16<0:2> ff) + xor $1, $17, $1 # E : + or $1, $2, $1 # E : U L U L $1 = ====ffffffffffff + + cmpbge $31, $1, $2 # E : + bne $2, $found_it # U : + # At least one byte left to process. + ldq $1, 8($0) # L : + subq $5, 1, $18 # E : U L U L + + addq $0, 8, $0 # E : + # Make $18 point to last quad to be accessed (the + # last quad may or may not be partial). + andnot $18, 0x7, $18 # E : + cmpult $0, $18, $2 # E : + beq $2, $final # U : U L U L + + # At least two quads remain to be accessed. + + subq $18, $0, $4 # E : $4 <- nr quads to be processed + and $4, 8, $4 # E : odd number of quads? + bne $4, $odd_quad_count # U : + # At least three quads remain to be accessed + mov $1, $4 # E : L U L U : move prefetched value to correct reg + + .align 4 +$unrolled_loop: + ldq $1, 8($0) # L : prefetch $1 + xor $17, $4, $2 # E : + cmpbge $31, $2, $2 # E : + bne $2, $found_it # U : U L U L + + addq $0, 8, $0 # E : + nop # E : + nop # E : + nop # E : + +$odd_quad_count: + xor $17, $1, $2 # E : + ldq $4, 8($0) # L : prefetch $4 + cmpbge $31, $2, $2 # E : + addq $0, 8, $6 # E : + + bne $2, $found_it # U : + cmpult $6, $18, $6 # E : + addq $0, 8, $0 # E : + nop # E : + + bne $6, $unrolled_loop # U : + mov $4, $1 # E : move prefetched value into $1 + nop # E : + nop # E : + +$final: subq $5, $0, $18 # E : $18 <- number of bytes left to do + nop # E : + nop # E : + bne $18, $last_quad # U : + +$not_found: + mov $31, $0 # E : + nop # E : + nop # E : + ret # L0 : + + END(__memchr) + +weak_alias (__memchr, memchr) +#if !__BOUNDED_POINTERS__ +weak_alias (__memchr, __ubp_memchr) +#endif From ba26d0334e2e7286410e74d77fa189d4e2cf31fe Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 8 Dec 2000 17:18:22 +0000 Subject: [PATCH 2388/4487] Alpha ev6 memcpy implementation. --- sysdeps/alpha/alphaev6/memcpy.S | 254 ++++++++++++++++++++++++++++++++ 1 file changed, 254 insertions(+) create mode 100644 sysdeps/alpha/alphaev6/memcpy.S diff --git a/sysdeps/alpha/alphaev6/memcpy.S b/sysdeps/alpha/alphaev6/memcpy.S new file mode 100644 index 0000000000..35f17e7f9e --- /dev/null +++ b/sysdeps/alpha/alphaev6/memcpy.S @@ -0,0 +1,254 @@ +/* Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + EV6 optimized by Rick Gorton . + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* + * Much of the information about 21264 scheduling/coding comes from: + * Compiler Writer's Guide for the Alpha 21264 + * abbreviated as 'CWG' in other comments here + * ftp.digital.com/pub/Digital/info/semiconductor/literature/dsc-library.html + * Scheduling notation: + * E - either cluster + * U - upper subcluster; U0 - subcluster U0; U1 - subcluster U1 + * L - lower subcluster; L0 - subcluster L0; L1 - subcluster L1 + * + * Temp usage notes: + * $0 - destination address + * $1,$2, - scratch + */ + +#include + + .arch ev6 + .set noreorder + .set noat + +ENTRY(memcpy) + + mov $16, $0 # E : copy dest to return + ble $18, $nomoredata # U : done with the copy? + xor $16, $17, $1 # E : are source and dest alignments the same? + and $1, 7, $1 # E : are they the same mod 8? + + bne $1, $misaligned # U : Nope - gotta do this the slow way + /* source and dest are same mod 8 address */ + and $16, 7, $1 # E : Are both 0mod8? + beq $1, $both_0mod8 # U : Yes + nop # E : + + /* + * source and dest are same misalignment. move a byte at a time + * until a 0mod8 alignment for both is reached. + * At least one byte more to move + */ + +$head_align: + ldbu $1, 0($17) # L : grab a byte + subq $18, 1, $18 # E : count-- + addq $17, 1, $17 # E : src++ + stb $1, 0($16) # L : + addq $16, 1, $16 # E : dest++ + and $16, 7, $1 # E : Are we at 0mod8 yet? + ble $18, $nomoredata # U : done with the copy? + bne $1, $head_align # U : + +$both_0mod8: + cmple $18, 127, $1 # E : Can we unroll the loop? + bne $1, $no_unroll # U : + and $16, 63, $1 # E : get mod64 alignment + beq $1, $do_unroll # U : no single quads to fiddle + +$single_head_quad: + ldq $1, 0($17) # L : get 8 bytes + subq $18, 8, $18 # E : count -= 8 + addq $17, 8, $17 # E : src += 8 + nop # E : + + stq $1, 0($16) # L : store + addq $16, 8, $16 # E : dest += 8 + and $16, 63, $1 # E : get mod64 alignment + bne $1, $single_head_quad # U : still not fully aligned + +$do_unroll: + addq $16, 64, $7 # E : Initial (+1 trip) wh64 address + cmple $18, 63, $1 # E : Can we go through the unrolled loop? + bne $1, $tail_quads # U : Nope + nop # E : + +$unroll_body: + wh64 ($7) # L1 : memory subsystem hint: 64 bytes at + # ($7) are about to be over-written + ldq $6, 0($17) # L0 : bytes 0..7 + nop # E : + nop # E : + + ldq $4, 8($17) # L : bytes 8..15 + ldq $5, 16($17) # L : bytes 16..23 + addq $7, 64, $7 # E : Update next wh64 address + nop # E : + + ldq $3, 24($17) # L : bytes 24..31 + addq $16, 64, $1 # E : fallback value for wh64 + nop # E : + nop # E : + + addq $17, 32, $17 # E : src += 32 bytes + stq $6, 0($16) # L : bytes 0..7 + nop # E : + nop # E : + + stq $4, 8($16) # L : bytes 8..15 + stq $5, 16($16) # L : bytes 16..23 + subq $18, 192, $2 # E : At least two more trips to go? + nop # E : + + stq $3, 24($16) # L : bytes 24..31 + addq $16, 32, $16 # E : dest += 32 bytes + nop # E : + nop # E : + + ldq $6, 0($17) # L : bytes 0..7 + ldq $4, 8($17) # L : bytes 8..15 + cmovlt $2, $1, $7 # E : Latency 2, extra map slot - Use + # fallback wh64 address if < 2 more trips + nop # E : + + ldq $5, 16($17) # L : bytes 16..23 + ldq $3, 24($17) # L : bytes 24..31 + addq $16, 32, $16 # E : dest += 32 + subq $18, 64, $18 # E : count -= 64 + + addq $17, 32, $17 # E : src += 32 + stq $6, -32($16) # L : bytes 0..7 + stq $4, -24($16) # L : bytes 8..15 + cmple $18, 63, $1 # E : At least one more trip? + + stq $5, -16($16) # L : bytes 16..23 + stq $3, -8($16) # L : bytes 24..31 + nop # E : + beq $1, $unroll_body + +$tail_quads: +$no_unroll: + .align 4 + subq $18, 8, $18 # E : At least a quad left? + blt $18, $less_than_8 # U : Nope + nop # E : + nop # E : + +$move_a_quad: + ldq $1, 0($17) # L : fetch 8 + subq $18, 8, $18 # E : count -= 8 + addq $17, 8, $17 # E : src += 8 + nop # E : + + stq $1, 0($16) # L : store 8 + addq $16, 8, $16 # E : dest += 8 + bge $18, $move_a_quad # U : + nop # E : + +$less_than_8: + .align 4 + addq $18, 8, $18 # E : add back for trailing bytes + ble $18, $nomoredata # U : All-done + nop # E : + nop # E : + + /* Trailing bytes */ +$tail_bytes: + subq $18, 1, $18 # E : count-- + ldbu $1, 0($17) # L : fetch a byte + addq $17, 1, $17 # E : src++ + nop # E : + + stb $1, 0($16) # L : store a byte + addq $16, 1, $16 # E : dest++ + bgt $18, $tail_bytes # U : more to be done? + nop # E : + + /* branching to exit takes 3 extra cycles, so replicate exit here */ + ret $31, ($26), 1 # L0 : + nop # E : + nop # E : + nop # E : + +$misaligned: + mov $0, $4 # E : dest temp + and $0, 7, $1 # E : dest alignment mod8 + beq $1, $dest_0mod8 # U : life doesnt totally suck + nop + +$aligndest: + ble $18, $nomoredata # U : + ldbu $1, 0($17) # L : fetch a byte + subq $18, 1, $18 # E : count-- + addq $17, 1, $17 # E : src++ + + stb $1, 0($4) # L : store it + addq $4, 1, $4 # E : dest++ + and $4, 7, $1 # E : dest 0mod8 yet? + bne $1, $aligndest # U : go until we are aligned. + + /* Source has unknown alignment, but dest is known to be 0mod8 */ +$dest_0mod8: + subq $18, 8, $18 # E : At least a quad left? + blt $18, $misalign_tail # U : Nope + ldq_u $3, 0($17) # L : seed (rotating load) of 8 bytes + nop # E : + +$mis_quad: + ldq_u $16, 8($17) # L : Fetch next 8 + extql $3, $17, $3 # U : masking + extqh $16, $17, $1 # U : masking + bis $3, $1, $1 # E : merged bytes to store + + subq $18, 8, $18 # E : count -= 8 + addq $17, 8, $17 # E : src += 8 + stq $1, 0($4) # L : store 8 (aligned) + mov $16, $3 # E : "rotate" source data + + addq $4, 8, $4 # E : dest += 8 + bge $18, $mis_quad # U : More quads to move + nop + nop + +$misalign_tail: + addq $18, 8, $18 # E : account for tail stuff + ble $18, $nomoredata # U : + nop + nop + +$misalign_byte: + ldbu $1, 0($17) # L : fetch 1 + subq $18, 1, $18 # E : count-- + addq $17, 1, $17 # E : src++ + nop # E : + + stb $1, 0($4) # L : store + addq $4, 1, $4 # E : dest++ + bgt $18, $misalign_byte # U : more to go? + nop + + +$nomoredata: + ret $31, ($26), 1 # L0 : + nop # E : + nop # E : + nop # E : + +END(memcpy) From 7c688d010018a35457c2e9c705f4c2cf46158803 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 8 Dec 2000 17:18:30 +0000 Subject: [PATCH 2389/4487] Alpha ev6 memset implementation. --- sysdeps/alpha/alphaev6/memset.S | 224 ++++++++++++++++++++++++++++++++ 1 file changed, 224 insertions(+) create mode 100644 sysdeps/alpha/alphaev6/memset.S diff --git a/sysdeps/alpha/alphaev6/memset.S b/sysdeps/alpha/alphaev6/memset.S new file mode 100644 index 0000000000..363b3a588b --- /dev/null +++ b/sysdeps/alpha/alphaev6/memset.S @@ -0,0 +1,224 @@ +/* Copyright (C) 2000 Free Software Foundation, Inc. + Contributed by Richard Henderson (rth@tamu.edu) + EV6 optimized by Rick Gorton . + + 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + + .arch ev6 + .set noat + .set noreorder + +ENTRY(memset) +#ifdef PROF + ldgp gp, 0(pv) + lda AT, _mcount + jsr AT, (AT), _mcount + .prologue 1 +#else + .prologue 0 +#endif + + /* + * Serious stalling happens. The only way to mitigate this is to + * undertake a major re-write to interleave the constant materialization + * with other parts of the fall-through code. This is important, even + * though it makes maintenance tougher. + * Do this later. + */ + and $17, 255, $1 # E : 00000000000000ch + insbl $17, 1, $2 # U : 000000000000ch00 + mov $16, $0 # E : return value + ble $18, $end # U : zero length requested? + + addq $18, $16, $6 # E : max address to write to + or $1, $2, $17 # E : 000000000000chch + insbl $1, 2, $3 # U : 0000000000ch0000 + insbl $1, 3, $4 # U : 00000000ch000000 + + or $3, $4, $3 # E : 00000000chch0000 + inswl $17, 4, $5 # U : 0000chch00000000 + xor $16, $6, $1 # E : will complete write be within one quadword? + inswl $17, 6, $2 # U : chch000000000000 + + or $17, $3, $17 # E : 00000000chchchch + or $2, $5, $2 # E : chchchch00000000 + bic $1, 7, $1 # E : fit within a single quadword? + and $16, 7, $3 # E : Target addr misalignment + + or $17, $2, $17 # E : chchchchchchchch + beq $1, $within_quad # U : + nop # E : + beq $3, $aligned # U : target is 0mod8 + + /* + * Target address is misaligned, and won't fit within a quadword. + */ + ldq_u $4, 0($16) # L : Fetch first partial + mov $16, $5 # E : Save the address + insql $17, $16, $2 # U : Insert new bytes + subq $3, 8, $3 # E : Invert (for addressing uses) + + addq $18, $3, $18 # E : $18 is new count ($3 is negative) + mskql $4, $16, $4 # U : clear relevant parts of the quad + subq $16, $3, $16 # E : $16 is new aligned destination + or $2, $4, $1 # E : Final bytes + + nop + stq_u $1,0($5) # L : Store result + nop + nop + + .align 4 +$aligned: + /* + * We are now guaranteed to be quad aligned, with at least + * one partial quad to write. + */ + + sra $18, 3, $3 # U : Number of remaining quads to write + and $18, 7, $18 # E : Number of trailing bytes to write + mov $16, $5 # E : Save dest address + beq $3, $no_quad # U : tail stuff only + + /* + * It's worth the effort to unroll this and use wh64 if possible. + * At this point, entry values are: + * $16 Current destination address + * $5 A copy of $16 + * $6 The max quadword address to write to + * $18 Number trailer bytes + * $3 Number quads to write + */ + + and $16, 0x3f, $2 # E : Forward work (only useful for unrolled loop) + subq $3, 16, $4 # E : Only try to unroll if > 128 bytes + subq $2, 0x40, $1 # E : bias counter (aligning stuff 0mod64) + blt $4, $loop # U : + + /* + * We know we've got at least 16 quads, minimum of one trip + * through unrolled loop. Do a quad at a time to get us 0mod64 + * aligned. + */ + + nop # E : + nop # E : + nop # E : + beq $1, $bigalign # U : + +$alignmod64: + stq $17, 0($5) # L : + subq $3, 1, $3 # E : For consistency later + addq $1, 8, $1 # E : Increment towards zero for alignment + addq $5, 8, $4 # E : Initial wh64 address (filler instruction) + + nop + nop + addq $5, 8, $5 # E : Inc address + blt $1, $alignmod64 # U : + +$bigalign: + /* + * $3 - number quads left to go + * $5 - target address (aligned 0mod64) + * $17 - mask of stuff to store + * Scratch registers available: $7, $2, $4, $1 + * We know that we'll be taking a minimum of one trip through. + * CWG Section 3.7.6: do not expect a sustained store rate of > 1/cycle + * Assumes the wh64 needs to be for 2 trips through the loop in the future. + * The wh64 is issued on for the starting destination address for trip +2 + * through the loop, and if there are less than two trips left, the target + * address will be for the current trip. + */ + +$do_wh64: + wh64 ($4) # L1 : memory subsystem write hint + subq $3, 24, $2 # E : For determining future wh64 addresses + stq $17, 0($5) # L : + nop # E : + + addq $5, 128, $4 # E : speculative target of next wh64 + stq $17, 8($5) # L : + stq $17, 16($5) # L : + addq $5, 64, $7 # E : Fallback address for wh64 (== next trip addr) + + stq $17, 24($5) # L : + stq $17, 32($5) # L : + cmovlt $2, $7, $4 # E : Latency 2, extra mapping cycle + nop + + stq $17, 40($5) # L : + stq $17, 48($5) # L : + subq $3, 16, $2 # E : Repeat the loop at least once more? + nop + + stq $17, 56($5) # L : + addq $5, 64, $5 # E : + subq $3, 8, $3 # E : + bge $2, $do_wh64 # U : + + nop + nop + nop + beq $3, $no_quad # U : Might have finished already + + .align 4 + /* + * Simple loop for trailing quadwords, or for small amounts + * of data (where we can't use an unrolled loop and wh64) + */ +$loop: + stq $17, 0($5) # L : + subq $3, 1, $3 # E : Decrement number quads left + addq $5, 8, $5 # E : Inc address + bne $3, $loop # U : more? + +$no_quad: + /* + * Write 0..7 trailing bytes. + */ + nop # E : + beq $18, $end # U : All done? + ldq $7, 0($5) # L : + mskqh $7, $6, $2 # U : Mask final quad + + insqh $17, $6, $4 # U : New bits + or $2, $4, $1 # E : Put it all together + stq $1, 0($5) # L : And back to memory + ret $31,($26),1 # L0 : + +$within_quad: + ldq_u $1, 0($16) # L : + insql $17, $16, $2 # U : New bits + mskql $1, $16, $4 # U : Clear old + or $2, $4, $2 # E : New result + + mskql $2, $6, $4 # U : + mskqh $1, $6, $2 # U : + or $2, $4, $1 # E : + stq_u $1, 0($16) # L : + +$end: + nop + nop + nop + ret $31,($26),1 # L0 : + + END(memset) From d692c1e71c76dde5ed3d68f614cd9839b93f36ba Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 8 Dec 2000 17:18:40 +0000 Subject: [PATCH 2390/4487] Alpha ev6 stxcpy implementation. --- sysdeps/alpha/alphaev6/stxcpy.S | 329 ++++++++++++++++++++++++++++++++ 1 file changed, 329 insertions(+) create mode 100644 sysdeps/alpha/alphaev6/stxcpy.S diff --git a/sysdeps/alpha/alphaev6/stxcpy.S b/sysdeps/alpha/alphaev6/stxcpy.S new file mode 100644 index 0000000000..0df20438fc --- /dev/null +++ b/sysdeps/alpha/alphaev6/stxcpy.S @@ -0,0 +1,329 @@ +/* Copyright (C) 2000 Free Software Foundation, Inc. + Contributed by Richard Henderson (rth@tamu.edu) + EV6 optimized by Rick Gorton . + + 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* Copy a null-terminated string from SRC to DST. + + This is an internal routine used by strcpy, stpcpy, and strcat. + As such, it uses special linkage conventions to make implementation + of these public functions more efficient. + + On input: + t9 = return address + a0 = DST + a1 = SRC + + On output: + t8 = bitmask (with one bit set) indicating the last byte written + a0 = unaligned address of the last *word* written + + Furthermore, v0, a3-a5, t11, and t12 are untouched. +*/ + + +#include + + .arch ev6 + .set noat + .set noreorder + .text + +/* There is a problem with either gdb (as of 4.16) or gas (as of 2.7) that + doesn't like putting the entry point for a procedure somewhere in the + middle of the procedure descriptor. Work around this by putting the + aligned copy in its own procedure descriptor */ + + + .ent stxcpy_aligned + .align 4 +stxcpy_aligned: + .frame sp, 0, t9 + .prologue 0 + + /* On entry to this basic block: + t0 == the first destination word for masking back in + t1 == the first source word. */ + + /* Create the 1st output word and detect 0's in the 1st input word. */ + lda t2, -1 # E : build a mask against false zero + mskqh t2, a1, t2 # U : detection in the src word (stall) + mskqh t1, a1, t3 # U : + ornot t1, t2, t2 # E : (stall) + + mskql t0, a1, t0 # U : assemble the first output word + cmpbge zero, t2, t8 # E : bits set iff null found + or t0, t3, t1 # E : (stall) + bne t8, $a_eos # U : (stall) + + /* On entry to this basic block: + t0 == the first destination word for masking back in + t1 == a source word not containing a null. */ + /* Nops here to separate store quads from load quads */ + +$a_loop: + stq_u t1, 0(a0) # L : + addq a0, 8, a0 # E : + nop + nop + + ldq_u t1, 0(a1) # L : Latency=3 + addq a1, 8, a1 # E : + cmpbge zero, t1, t8 # E : (3 cycle stall) + beq t8, $a_loop # U : (stall for t8) + + /* Take care of the final (partial) word store. + On entry to this basic block we have: + t1 == the source word containing the null + t8 == the cmpbge mask that found it. */ +$a_eos: + negq t8, t6 # E : find low bit set + and t8, t6, t10 # E : (stall) + /* For the sake of the cache, don't read a destination word + if we're not going to need it. */ + and t10, 0x80, t6 # E : (stall) + bne t6, 1f # U : (stall) + + /* We're doing a partial word store and so need to combine + our source and original destination words. */ + ldq_u t0, 0(a0) # L : Latency=3 + subq t10, 1, t6 # E : + zapnot t1, t6, t1 # U : clear src bytes >= null (stall) + or t10, t6, t8 # E : (stall) + + zap t0, t8, t0 # E : clear dst bytes <= null + or t0, t1, t1 # E : (stall) + nop + nop + +1: stq_u t1, 0(a0) # L : + ret (t9) # L0 : Latency=3 + nop + nop + + .end stxcpy_aligned + + .align 4 + .ent __stxcpy + .globl __stxcpy +__stxcpy: + .frame sp, 0, t9 + .prologue 0 + + /* Are source and destination co-aligned? */ + xor a0, a1, t0 # E : + unop # E : + and t0, 7, t0 # E : (stall) + bne t0, $unaligned # U : (stall) + + /* We are co-aligned; take care of a partial first word. */ + ldq_u t1, 0(a1) # L : load first src word + and a0, 7, t0 # E : take care not to load a word ... + addq a1, 8, a1 # E : + beq t0, stxcpy_aligned # U : ... if we wont need it (stall) + + ldq_u t0, 0(a0) # L : + br stxcpy_aligned # L0 : Latency=3 + nop + nop + + +/* The source and destination are not co-aligned. Align the destination + and cope. We have to be very careful about not reading too much and + causing a SEGV. */ + + .align 4 +$u_head: + /* We know just enough now to be able to assemble the first + full source word. We can still find a zero at the end of it + that prevents us from outputting the whole thing. + + On entry to this basic block: + t0 == the first dest word, for masking back in, if needed else 0 + t1 == the low bits of the first source word + t6 == bytemask that is -1 in dest word bytes */ + + ldq_u t2, 8(a1) # L : + addq a1, 8, a1 # E : + extql t1, a1, t1 # U : (stall on a1) + extqh t2, a1, t4 # U : (stall on a1) + + mskql t0, a0, t0 # U : + or t1, t4, t1 # E : + mskqh t1, a0, t1 # U : (stall on t1) + or t0, t1, t1 # E : (stall on t1) + + or t1, t6, t6 # E : + cmpbge zero, t6, t8 # E : (stall) + lda t6, -1 # E : for masking just below + bne t8, $u_final # U : (stall) + + mskql t6, a1, t6 # U : mask out the bits we have + or t6, t2, t2 # E : already extracted before (stall) + cmpbge zero, t2, t8 # E : testing eos (stall) + bne t8, $u_late_head_exit # U : (stall) + + /* Finally, we've got all the stupid leading edge cases taken care + of and we can set up to enter the main loop. */ + + stq_u t1, 0(a0) # L : store first output word + addq a0, 8, a0 # E : + extql t2, a1, t0 # U : position ho-bits of lo word + ldq_u t2, 8(a1) # U : read next high-order source word + + addq a1, 8, a1 # E : + cmpbge zero, t2, t8 # E : (stall for t2) + nop # E : + bne t8, $u_eos # U : (stall) + + /* Unaligned copy main loop. In order to avoid reading too much, + the loop is structured to detect zeros in aligned source words. + This has, unfortunately, effectively pulled half of a loop + iteration out into the head and half into the tail, but it does + prevent nastiness from accumulating in the very thing we want + to run as fast as possible. + + On entry to this basic block: + t0 == the shifted high-order bits from the previous source word + t2 == the unshifted current source word + + We further know that t2 does not contain a null terminator. */ + + .align 3 +$u_loop: + extqh t2, a1, t1 # U : extract high bits for current word + addq a1, 8, a1 # E : (stall) + extql t2, a1, t3 # U : extract low bits for next time (stall) + addq a0, 8, a0 # E : + + or t0, t1, t1 # E : current dst word now complete + ldq_u t2, 0(a1) # L : Latency=3 load high word for next time + stq_u t1, -8(a0) # L : save the current word (stall) + mov t3, t0 # E : + + cmpbge zero, t2, t8 # E : test new word for eos + beq t8, $u_loop # U : (stall) + nop + nop + + /* We've found a zero somewhere in the source word we just read. + If it resides in the lower half, we have one (probably partial) + word to write out, and if it resides in the upper half, we + have one full and one partial word left to write out. + + On entry to this basic block: + t0 == the shifted high-order bits from the previous source word + t2 == the unshifted current source word. */ +$u_eos: + extqh t2, a1, t1 # U : + or t0, t1, t1 # E : first (partial) source word complete (stall) + cmpbge zero, t1, t8 # E : is the null in this first bit? (stall) + bne t8, $u_final # U : (stall) + +$u_late_head_exit: + stq_u t1, 0(a0) # L : the null was in the high-order bits + addq a0, 8, a0 # E : + extql t2, a1, t1 # U : + cmpbge zero, t1, t8 # E : (stall) + + /* Take care of a final (probably partial) result word. + On entry to this basic block: + t1 == assembled source word + t8 == cmpbge mask that found the null. */ +$u_final: + negq t8, t6 # E : isolate low bit set + and t6, t8, t10 # E : (stall) + and t10, 0x80, t6 # E : avoid dest word load if we can (stall) + bne t6, 1f # U : (stall) + + ldq_u t0, 0(a0) # E : + subq t10, 1, t6 # E : + or t6, t10, t8 # E : (stall) + zapnot t1, t6, t1 # U : kill source bytes >= null (stall) + + zap t0, t8, t0 # U : kill dest bytes <= null (2 cycle data stall) + or t0, t1, t1 # E : (stall) + nop + nop + +1: stq_u t1, 0(a0) # L : + ret (t9) # L0 : Latency=3 + nop + nop + + /* Unaligned copy entry point. */ + .align 4 +$unaligned: + + ldq_u t1, 0(a1) # L : load first source word + and a0, 7, t4 # E : find dest misalignment + and a1, 7, t5 # E : find src misalignment + /* Conditionally load the first destination word and a bytemask + with 0xff indicating that the destination byte is sacrosanct. */ + mov zero, t0 # E : + + mov zero, t6 # E : + beq t4, 1f # U : + ldq_u t0, 0(a0) # L : + lda t6, -1 # E : + + mskql t6, a0, t6 # U : + nop + nop + nop +1: + subq a1, t4, a1 # E : sub dest misalignment from src addr + /* If source misalignment is larger than dest misalignment, we need + extra startup checks to avoid SEGV. */ + cmplt t4, t5, t10 # E : + beq t10, $u_head # U : + lda t2, -1 # E : mask out leading garbage in source + + mskqh t2, t5, t2 # U : + ornot t1, t2, t3 # E : (stall) + cmpbge zero, t3, t8 # E : is there a zero? (stall) + beq t8, $u_head # U : (stall) + + /* At this point we've found a zero in the first partial word of + the source. We need to isolate the valid source data and mask + it into the original destination data. (Incidentally, we know + that we'll need at least one byte of that original dest word.) */ + + ldq_u t0, 0(a0) # L : + negq t8, t6 # E : build bitmask of bytes <= zero + and t6, t8, t10 # E : (stall) + and a1, 7, t5 # E : + + subq t10, 1, t6 # E : + or t6, t10, t8 # E : (stall) + srl t10, t5, t10 # U : adjust final null return value + zapnot t2, t8, t2 # U : prepare source word; mirror changes (stall) + + and t1, t2, t1 # E : to source validity mask + extql t2, a1, t2 # U : + extql t1, a1, t1 # U : (stall) + andnot t0, t2, t0 # .. e1 : zero place for source to reside (stall) + + or t0, t1, t1 # e1 : and put it there + stq_u t1, 0(a0) # .. e0 : (stall) + ret (t9) # e1 : + nop + + .end __stxcpy + From 6e6bafa8267f55d8ac19d3a01e67b1ae35251d2a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 8 Dec 2000 17:18:50 +0000 Subject: [PATCH 2391/4487] Alpha ev6 stxncpy implementation. --- sysdeps/alpha/alphaev6/stxncpy.S | 405 +++++++++++++++++++++++++++++++ 1 file changed, 405 insertions(+) create mode 100644 sysdeps/alpha/alphaev6/stxncpy.S diff --git a/sysdeps/alpha/alphaev6/stxncpy.S b/sysdeps/alpha/alphaev6/stxncpy.S new file mode 100644 index 0000000000..140279106a --- /dev/null +++ b/sysdeps/alpha/alphaev6/stxncpy.S @@ -0,0 +1,405 @@ +/* Copyright (C) 2000 Free Software Foundation, Inc. + Contributed by Richard Henderson (rth@tamu.edu) + EV6 optimized by Rick Gorton . + + 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* Copy no more than COUNT bytes of the null-terminated string from + SRC to DST. + + This is an internal routine used by strncpy, stpncpy, and strncat. + As such, it uses special linkage conventions to make implementation + of these public functions more efficient. + + On input: + t9 = return address + a0 = DST + a1 = SRC + a2 = COUNT + + Furthermore, COUNT may not be zero. + + On output: + t0 = last word written + t8 = bitmask (with one bit set) indicating the last byte written + t10 = bitmask (with one bit set) indicating the byte position of + the end of the range specified by COUNT + a0 = unaligned address of the last *word* written + a2 = the number of full words left in COUNT + + Furthermore, v0, a3-a5, t11, and t12 are untouched. +*/ + +#include + + .arch ev6 + .set noat + .set noreorder + +/* There is a problem with either gdb (as of 4.16) or gas (as of 2.7) that + doesn't like putting the entry point for a procedure somewhere in the + middle of the procedure descriptor. Work around this by putting the + aligned copy in its own procedure descriptor */ + + + .ent stxncpy_aligned + .align 4 +stxncpy_aligned: + .frame sp, 0, t9, 0 + .prologue 0 + + /* On entry to this basic block: + t0 == the first destination word for masking back in + t1 == the first source word. */ + + /* Create the 1st output word and detect 0's in the 1st input word. */ + lda t2, -1 # E : build a mask against false zero + mskqh t2, a1, t2 # U : detection in the src word (stall) + mskqh t1, a1, t3 # U : + ornot t1, t2, t2 # E : (stall) + + mskql t0, a1, t0 # U : assemble the first output word + cmpbge zero, t2, t7 # E : bits set iff null found + or t0, t3, t0 # E : (stall) + beq a2, $a_eoc # U : + + bne t7, $a_eos # U : + nop + nop + nop + + /* On entry to this basic block: + t0 == a source word not containing a null. */ + + /* + * nops here to: + * separate store quads from load quads + * limit of 1 bcond/quad to permit training + */ +$a_loop: + stq_u t0, 0(a0) # L : + addq a0, 8, a0 # E : + subq a2, 1, a2 # E : + nop + + ldq_u t0, 0(a1) # L : + addq a1, 8, a1 # E : + cmpbge zero, t0, t7 # E : + beq a2, $a_eoc # U : + + beq t7, $a_loop # U : + nop + nop + nop + + /* Take care of the final (partial) word store. At this point + the end-of-count bit is set in t7 iff it applies. + + On entry to this basic block we have: + t0 == the source word containing the null + t7 == the cmpbge mask that found it. */ + +$a_eos: + negq t7, t8 # E : find low bit set + and t7, t8, t8 # E : (stall) + /* For the sake of the cache, don't read a destination word + if we're not going to need it. */ + and t8, 0x80, t6 # E : (stall) + bne t6, 1f # U : (stall) + + /* We're doing a partial word store and so need to combine + our source and original destination words. */ + ldq_u t1, 0(a0) # L : + subq t8, 1, t6 # E : + or t8, t6, t7 # E : (stall) + zapnot t0, t7, t0 # U : clear src bytes > null (stall) + + zap t1, t7, t1 # .. e1 : clear dst bytes <= null + or t0, t1, t0 # e1 : (stall) + nop + nop + +1: stq_u t0, 0(a0) # L : + ret (t9) # L0 : Latency=3 + nop + nop + + /* Add the end-of-count bit to the eos detection bitmask. */ +$a_eoc: + or t10, t7, t7 # E : + br $a_eos # L0 : Latency=3 + nop + nop + + .end stxncpy_aligned + + .align 4 + .ent __stxncpy + .globl __stxncpy +__stxncpy: + .frame sp, 0, t9, 0 + .prologue 0 + + /* Are source and destination co-aligned? */ + xor a0, a1, t1 # E : + and a0, 7, t0 # E : find dest misalignment + and t1, 7, t1 # E : (stall) + addq a2, t0, a2 # E : bias count by dest misalignment (stall) + + subq a2, 1, a2 # E : + and a2, 7, t2 # E : (stall) + srl a2, 3, a2 # U : a2 = loop counter = (count - 1)/8 (stall) + addq zero, 1, t10 # E : + + sll t10, t2, t10 # U : t10 = bitmask of last count byte + bne t1, $unaligned # U : + /* We are co-aligned; take care of a partial first word. */ + ldq_u t1, 0(a1) # L : load first src word + addq a1, 8, a1 # E : + + beq t0, stxncpy_aligned # U : avoid loading dest word if not needed + ldq_u t0, 0(a0) # L : + nop + nop + + br stxncpy_aligned # .. e1 : + nop + nop + nop + + + +/* The source and destination are not co-aligned. Align the destination + and cope. We have to be very careful about not reading too much and + causing a SEGV. */ + + .align 4 +$u_head: + /* We know just enough now to be able to assemble the first + full source word. We can still find a zero at the end of it + that prevents us from outputting the whole thing. + + On entry to this basic block: + t0 == the first dest word, unmasked + t1 == the shifted low bits of the first source word + t6 == bytemask that is -1 in dest word bytes */ + + ldq_u t2, 8(a1) # L : Latency=3 load second src word + addq a1, 8, a1 # E : + mskql t0, a0, t0 # U : mask trailing garbage in dst + extqh t2, a1, t4 # U : (3 cycle stall on t2) + + or t1, t4, t1 # E : first aligned src word complete (stall) + mskqh t1, a0, t1 # U : mask leading garbage in src (stall) + or t0, t1, t0 # E : first output word complete (stall) + or t0, t6, t6 # E : mask original data for zero test (stall) + + cmpbge zero, t6, t7 # E : + beq a2, $u_eocfin # U : + nop + nop + + bne t7, $u_final # U : + lda t6, -1 # E : mask out the bits we have + mskql t6, a1, t6 # U : already seen (stall) + stq_u t0, 0(a0) # L : store first output word + + or t6, t2, t2 # E : + cmpbge zero, t2, t7 # E : find nulls in second partial (stall) + addq a0, 8, a0 # E : + subq a2, 1, a2 # E : + + bne t7, $u_late_head_exit # U : + /* Finally, we've got all the stupid leading edge cases taken care + of and we can set up to enter the main loop. */ + extql t2, a1, t1 # U : position hi-bits of lo word + ldq_u t2, 8(a1) # L : read next high-order source word + addq a1, 8, a1 # E : + + cmpbge zero, t2, t7 # E : (stall) + beq a2, $u_eoc # U : + nop + nop + + bne t7, $u_eos # e1 : + nop + nop + nop + + /* Unaligned copy main loop. In order to avoid reading too much, + the loop is structured to detect zeros in aligned source words. + This has, unfortunately, effectively pulled half of a loop + iteration out into the head and half into the tail, but it does + prevent nastiness from accumulating in the very thing we want + to run as fast as possible. + + On entry to this basic block: + t1 == the shifted high-order bits from the previous source word + t2 == the unshifted current source word + + We further know that t2 does not contain a null terminator. */ + + .align 4 +$u_loop: + extqh t2, a1, t0 # U : extract high bits for current word + addq a1, 8, a1 # E : + extql t2, a1, t3 # U : extract low bits for next time + addq a0, 8, a0 # E : + + or t0, t1, t0 # E : current dst word now complete + ldq_u t2, 0(a1) # U : Latency=3 load high word for next time + stq_u t0, -8(a0) # U : save the current word (stall) + mov t3, t1 # E : + + subq a2, 1, a2 # E : + cmpbge zero, t2, t7 # E : test new word for eos (2 cycle stall for data) + beq a2, $u_eoc # U : (stall) + nop + + beq t7, $u_loop # U : + nop + nop + nop + + /* We've found a zero somewhere in the source word we just read. + If it resides in the lower half, we have one (probably partial) + word to write out, and if it resides in the upper half, we + have one full and one partial word left to write out. + + On entry to this basic block: + t1 == the shifted high-order bits from the previous source word + t2 == the unshifted current source word. */ +$u_eos: + extqh t2, a1, t0 # U : + or t0, t1, t0 # E : first (partial) source word complete (stall) + cmpbge zero, t0, t7 # E : is the null in this first bit? (stall) + bne t7, $u_final # U : (stall) + + stq_u t0, 0(a0) # L : the null was in the high-order bits + addq a0, 8, a0 # E : + subq a2, 1, a2 # E : + nop + +$u_late_head_exit: + extql t2, a1, t0 # U : + cmpbge zero, t0, t7 # E : + or t7, t10, t6 # E : (stall) + cmoveq a2, t6, t7 # E : Latency=2, extra map slot (stall) + + /* Take care of a final (probably partial) result word. + On entry to this basic block: + t0 == assembled source word + t7 == cmpbge mask that found the null. */ +$u_final: + negq t7, t6 # E : isolate low bit set + and t6, t7, t8 # E : (stall) + and t8, 0x80, t6 # E : avoid dest word load if we can (stall) + bne t6, 1f # U : (stall) + + ldq_u t1, 0(a0) # L : + subq t8, 1, t6 # E : + or t6, t8, t7 # E : (stall) + zapnot t0, t7, t0 # U : kill source bytes > null + + zap t1, t7, t1 # U : kill dest bytes <= null + or t0, t1, t0 # E : (stall) + nop + nop + +1: stq_u t0, 0(a0) # L : + ret (t9) # L0 : Latency=3 + +$u_eoc: # end-of-count + extqh t2, a1, t0 # U : + or t0, t1, t0 # E : (stall) + cmpbge zero, t0, t7 # E : (stall) + nop + +$u_eocfin: # end-of-count, final word + or t10, t7, t7 # E : + br $u_final # L0 : Latency=3 + nop + nop + + /* Unaligned copy entry point. */ + .align 4 +$unaligned: + + ldq_u t1, 0(a1) # L : load first source word + and a0, 7, t4 # E : find dest misalignment + and a1, 7, t5 # E : find src misalignment + /* Conditionally load the first destination word and a bytemask + with 0xff indicating that the destination byte is sacrosanct. */ + mov zero, t0 # E : + + mov zero, t6 # E : + beq t4, 1f # U : + ldq_u t0, 0(a0) # L : + lda t6, -1 # E : + + mskql t6, a0, t6 # U : + nop + nop + nop +1: + subq a1, t4, a1 # E : sub dest misalignment from src addr + + /* If source misalignment is larger than dest misalignment, we need + extra startup checks to avoid SEGV. */ + + cmplt t4, t5, t8 # E : + extql t1, a1, t1 # U : shift src into place + lda t2, -1 # E : for creating masks later + beq t8, $u_head # U : (stall) + + mskqh t2, t5, t2 # U : begin src byte validity mask + cmpbge zero, t1, t7 # E : is there a zero? + extql t2, a1, t2 # U : + or t7, t10, t5 # E : test for end-of-count too + + cmpbge zero, t2, t3 # E : + cmoveq a2, t5, t7 # E : Latency=2, extra map slot + nop # E : keep with cmoveq + andnot t7, t3, t7 # E : (stall) + + beq t7, $u_head # U : + /* At this point we've found a zero in the first partial word of + the source. We need to isolate the valid source data and mask + it into the original destination data. (Incidentally, we know + that we'll need at least one byte of that original dest word.) */ + ldq_u t0, 0(a0) # L : + negq t7, t6 # E : build bitmask of bytes <= zero + mskqh t1, t4, t1 # U : + + and t6, t7, t8 # E : + subq t8, 1, t6 # E : (stall) + or t6, t8, t7 # E : (stall) + zapnot t2, t7, t2 # U : prepare source word; mirror changes (stall) + + zapnot t1, t7, t1 # U : to source validity mask + andnot t0, t2, t0 # E : zero place for source to reside + or t0, t1, t0 # E : and put it there (stall both t0, t1) + stq_u t0, 0(a0) # L : (stall) + + ret (t9) # L0 : Latency=3 + nop + nop + nop + + .end __stxncpy + From bccd062874921a878f886822774ff3f430291019 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 8 Dec 2000 17:19:03 +0000 Subject: [PATCH 2392/4487] Alpha ev67 ffs implementation. --- sysdeps/alpha/alphaev67/ffs.S | 50 +++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 sysdeps/alpha/alphaev67/ffs.S diff --git a/sysdeps/alpha/alphaev67/ffs.S b/sysdeps/alpha/alphaev67/ffs.S new file mode 100644 index 0000000000..a6e887766d --- /dev/null +++ b/sysdeps/alpha/alphaev67/ffs.S @@ -0,0 +1,50 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* Finds the first bit set in an integer. */ + +#include + + .arch ev6 + .set noreorder + .set noat + + +ENTRY(__ffs) +#ifdef PROF + ldgp gp, 0(pv) + lda AT, _mcount + jsr AT, (AT), _mcount + .prologue 1 +#else + .prologue 0 +#endif + + zap $16, 0xF0, $16 + cttz $16, $0 + addq $0, 1, $0 + cmoveq $16, 0, $0 + + nop + nop + nop + ret + +END(__ffs) + +weak_alias (__ffs, ffs) From 7a3b0b275e4bc7c184271cd28c9c99ac8ce08fd7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 8 Dec 2000 17:19:13 +0000 Subject: [PATCH 2393/4487] Alpha ev67 ffsll implementation. --- sysdeps/alpha/alphaev67/ffsll.S | 45 +++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 sysdeps/alpha/alphaev67/ffsll.S diff --git a/sysdeps/alpha/alphaev67/ffsll.S b/sysdeps/alpha/alphaev67/ffsll.S new file mode 100644 index 0000000000..b7556496a3 --- /dev/null +++ b/sysdeps/alpha/alphaev67/ffsll.S @@ -0,0 +1,45 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* Finds the first bit set in a long. */ + +#include + + .arch ev6 + .set noreorder + .set noat + +ENTRY(ffsl) +#ifdef PROF + ldgp gp, 0(pv) + lda AT, _mcount + jsr AT, (AT), _mcount + .prologue 1 +#else + .prologue 0 +#endif + + cttz $16, $0 + addq $0, 1, $0 + cmoveq $16, 0, $0 + ret + +END(ffsl) + +weak_extern (ffsl) +weak_alias (ffsl, ffsll) From f345d77fb7c4cd00511b4848137654903fdfb8f5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 8 Dec 2000 17:19:22 +0000 Subject: [PATCH 2394/4487] Alpha ev67 rawmemchr implementation. --- sysdeps/alpha/alphaev67/rawmemchr.S | 93 +++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 sysdeps/alpha/alphaev67/rawmemchr.S diff --git a/sysdeps/alpha/alphaev67/rawmemchr.S b/sysdeps/alpha/alphaev67/rawmemchr.S new file mode 100644 index 0000000000..6626ecc892 --- /dev/null +++ b/sysdeps/alpha/alphaev67/rawmemchr.S @@ -0,0 +1,93 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* Return pointer to first occurrence of CH in STR. */ + +#include + + .arch ev6 + .set noreorder + .set noat + +ENTRY(__rawmemchr) +#ifdef PROF + ldgp gp, 0(pv) + lda AT, _mcount + jsr AT, (AT), _mcount + .prologue 1 +#else + .prologue 0 +#endif + + ldq_u t0, 0(a0) # L : load first quadword Latency=3 + and a1, 0xff, t3 # E : 00000000000000ch + insbl a1, 1, t5 # U : 000000000000ch00 + insbl a1, 7, a2 # U : ch00000000000000 + + insbl t3, 6, a3 # U : 00ch000000000000 + or t5, t3, a1 # E : 000000000000chch + andnot a0, 7, v0 # E : align our loop pointer + lda t4, -1 # E : build garbage mask + + mskqh t4, a0, t4 # U : only want relevant part of first quad + or a2, a3, a2 # E : chch000000000000 + inswl a1, 2, t5 # E : 00000000chch0000 + inswl a1, 4, a3 # E : 0000chch00000000 + + or a1, a2, a1 # E : chch00000000chch + or a3, t5, t5 # E : 0000chchchch0000 + cmpbge zero, t4, t4 # E : bits set iff byte is garbage + nop # E : + + /* This quad is _very_ serialized. Lots of stalling happens */ + or t5, a1, a1 # E : chchchchchchchch + xor t0, a1, t1 # E : make bytes == c zero + cmpbge zero, t1, t0 # E : bits set iff byte == c + andnot t0, t4, t0 # E : clear garbage bits + + cttz t0, a2 # U0 : speculative (in case we get a match) + nop # E : + nop # E : + bne t0, $found # U : + + /* + * Yuk. This loop is going to stall like crazy waiting for the + * data to be loaded. Not much can be done about it unless it's + * unrolled multiple times, which is generally unsafe. + */ +$loop: + ldq t0, 8(v0) # L : Latency=3 + addq v0, 8, v0 # E : + xor t0, a1, t1 # E : + cmpbge zero, t1, t0 # E : bits set iff byte == c + + cttz t0, a2 # U0 : speculative (in case we get a match) + nop # E : + nop # E : + beq t0, $loop # U : + +$found: + negq t0, t1 # E : clear all but least set bit + and t0, t1, t0 # E : + addq v0, a2, v0 # E : Add in the bit number from above + ret # L0 : + + END(__rawmemchr) + +weak_alias (__rawmemchr, rawmemchr) From 6b2cc2fa966d942c6fb9677acbbfc4da1be21549 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 8 Dec 2000 17:19:31 +0000 Subject: [PATCH 2395/4487] Alpha ev67 stpcpyrawmemchr implementation. --- sysdeps/alpha/alphaev67/stpcpy.S | 52 ++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 sysdeps/alpha/alphaev67/stpcpy.S diff --git a/sysdeps/alpha/alphaev67/stpcpy.S b/sysdeps/alpha/alphaev67/stpcpy.S new file mode 100644 index 0000000000..6dcb36659a --- /dev/null +++ b/sysdeps/alpha/alphaev67/stpcpy.S @@ -0,0 +1,52 @@ +/* Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson . + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* Copy SRC to DEST returning the address of the terminating 0 in DEST. */ + +#include + + .arch ev6 + .set noreorder + .set noat + .text + +ENTRY(__stpcpy) + ldgp gp, 0(pv) +#ifdef PROF + lda AT, _mcount + jsr AT, (AT), _mcount +#endif + .prologue 1 + + .align 4 + mov a0, v0 + nop + jsr t9, __stxcpy + + # t8 = bitmask (with one bit set) indicating the last byte written + # a0 = unaligned address of the last *word* written + + cttz t8, t8 + andnot a0, 7, a0 + addq a0, t8, v0 + ret + + END(__stpcpy) + +weak_alias (__stpcpy, stpcpy) From 9bf55e62a3729f3862bfdada1c9b6cee5933c8cc Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 8 Dec 2000 17:19:44 +0000 Subject: [PATCH 2396/4487] Alpha ev67 stpncpy implementation. --- sysdeps/alpha/alphaev67/stpncpy.S | 116 ++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 sysdeps/alpha/alphaev67/stpncpy.S diff --git a/sysdeps/alpha/alphaev67/stpncpy.S b/sysdeps/alpha/alphaev67/stpncpy.S new file mode 100644 index 0000000000..d648b4db8b --- /dev/null +++ b/sysdeps/alpha/alphaev67/stpncpy.S @@ -0,0 +1,116 @@ +/* Copyright (C) 2000 Free Software Foundation, Inc. + Contributed by Richard Henderson (rth@redhat.com) + + 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* Copy no more then N bytes from SRC to DEST, returning the address of + the terminating '\0' in DEST. */ + +#include + + .arch ev6 + .set noat + .set noreorder + .text + +ENTRY(__stpncpy) + ldgp gp, 0(pv) +#ifdef PROF + lda AT, _mcount + jsr AT, (AT), _mcount +#endif + .prologue 1 + + mov a0, v0 + beq a2, $zerocount + + .align 4 + nop + nop + jsr t9, __stxncpy # do the work of the copy + + cttz t8, t4 + zapnot t0, t8, t5 + andnot a0, 7, a0 + bne a2, $multiword # do we have full words left? + + subq t8, 1, t2 + subq t10, 1, t3 + cmpult zero, t5, t5 + addq a0, t4, v0 + + or t2, t8, t2 + or t3, t10, t3 + addq v0, t5, v0 + andnot t3, t2, t3 + + zap t0, t3, t0 + nop + stq t0, 0(a0) + ret + +$multiword: + subq t8, 1, t7 # clear the final bits in the prev word + cmpult zero, t5, t5 + or t7, t8, t7 + zapnot t0, t7, t0 + + subq a2, 1, a2 + stq t0, 0(a0) + addq a0, 8, a1 + beq a2, 1f # loop over full words remaining + + nop + nop + nop + blbc a2, 0f + + stq zero, 0(a1) + subq a2, 1, a2 + addq a1, 8, a1 + beq a2, 1f + +0: stq zero, 0(a1) + subq a2, 2, a2 + nop + nop + + stq zero, 8(a1) + addq a1, 16, a1 + nop + bne a2, 0b + +1: ldq t0, 0(a1) # clear the leading bits in the final word + subq t10, 1, t7 + addq a0, t4, v0 + nop + + or t7, t10, t7 + addq v0, t5, v0 + zap t0, t7, t0 + stq t0, 0(a1) + +$zerocount: + nop + nop + nop + ret + + END(__stpncpy) + +weak_alias (__stpncpy, stpncpy) From 45327bf72db9f92a37db054d23674c463acc942b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 8 Dec 2000 17:19:54 +0000 Subject: [PATCH 2397/4487] Alpha ev67 strcat implementation. --- sysdeps/alpha/alphaev67/strcat.S | 62 ++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 sysdeps/alpha/alphaev67/strcat.S diff --git a/sysdeps/alpha/alphaev67/strcat.S b/sysdeps/alpha/alphaev67/strcat.S new file mode 100644 index 0000000000..88e48cec71 --- /dev/null +++ b/sysdeps/alpha/alphaev67/strcat.S @@ -0,0 +1,62 @@ +/* Copyright (C) 2000 Free Software Foundation, Inc. + Contributed by Richard Henderson , 1996. + EV67 optimized by Rick Gorton . + + 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* Append a null-terminated string from SRC to DST. */ + +#include + + .arch ev6 + .set noreorder + .text + +ENTRY(strcat) + ldgp gp, 0(pv) +#ifdef PROF + .set noat + lda AT, _mcount + jsr AT, (AT), _mcount + .set at +#endif + .prologue 1 + + mov $16, $0 # E : set up return value + /* Find the end of the string. */ + ldq_u $1, 0($16) # L : load first quadword (a0 may be misaligned) + lda $2, -1 # E : + insqh $2, $16, $2 # U : + + andnot $16, 7, $16 # E : + or $2, $1, $1 # E : + cmpbge $31, $1, $2 # E : bits set iff byte == 0 + bne $2, $found # U : + +$loop: ldq $1, 8($16) # L : + addq $16, 8, $16 # E : + cmpbge $31, $1, $2 # E : + beq $2, $loop # U : + +$found: cttz $2, $3 # U0 : + addq $16, $3, $16 # E : + /* Now do the append. */ + mov $26, $23 # E : + jmp $31, __stxcpy # L0 : + + END(strcat) From 63b2d532aa71f5ce10c0026eb3766577c5ddc2cf Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 8 Dec 2000 17:20:02 +0000 Subject: [PATCH 2398/4487] Alpha ev67 strchr implementation. --- sysdeps/alpha/alphaev67/strchr.S | 101 +++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 sysdeps/alpha/alphaev67/strchr.S diff --git a/sysdeps/alpha/alphaev67/strchr.S b/sysdeps/alpha/alphaev67/strchr.S new file mode 100644 index 0000000000..3ab26556cd --- /dev/null +++ b/sysdeps/alpha/alphaev67/strchr.S @@ -0,0 +1,101 @@ +/* Copyright (C) 2000 Free Software Foundation, Inc. + Contributed by Richard Henderson , 1996. + EV67 optimized by Rick Gorton . + + 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* Return the address of a given character within a null-terminated + string, or null if it is not found. */ + +#include + + .arch ev6 + .set noreorder + .set noat + +ENTRY(strchr) +#ifdef PROF + ldgp gp, 0(pv) + lda AT, _mcount + jsr AT, (AT), _mcount + .prologue 1 +#else + .prologue 0 +#endif + + ldq_u t0, 0(a0) # L : load first quadword Latency=3 + and a1, 0xff, t3 # E : 00000000000000ch + insbl a1, 1, t5 # U : 000000000000ch00 + insbl a1, 7, a2 # U : ch00000000000000 + + insbl t3, 6, a3 # U : 00ch000000000000 + or t5, t3, a1 # E : 000000000000chch + andnot a0, 7, v0 # E : align our loop pointer + lda t4, -1 # E : build garbage mask + + mskqh t4, a0, t4 # U : only want relevant part of first quad + or a2, a3, a2 # E : chch000000000000 + inswl a1, 2, t5 # E : 00000000chch0000 + inswl a1, 4, a3 # E : 0000chch00000000 + + or a1, a2, a1 # E : chch00000000chch + or a3, t5, t5 # E : 0000chchchch0000 + cmpbge zero, t0, t2 # E : bits set iff byte == zero + cmpbge zero, t4, t4 # E : bits set iff byte is garbage + + /* This quad is _very_ serialized. Lots of stalling happens */ + or t5, a1, a1 # E : chchchchchchchch + xor t0, a1, t1 # E : make bytes == c zero + cmpbge zero, t1, t3 # E : bits set iff byte == c + or t2, t3, t0 # E : bits set iff char match or zero match + + andnot t0, t4, t0 # E : clear garbage bits + cttz t0, a2 # U0 : speculative (in case we get a match) + nop # E : + bne t0, $found # U : + + /* + * Yuk. This loop is going to stall like crazy waiting for the + * data to be loaded. Not much can be done about it unless it's + * unrolled multiple times, which is generally unsafe. + */ +$loop: + ldq t0, 8(v0) # L : Latency=3 + addq v0, 8, v0 # E : + xor t0, a1, t1 # E : + cmpbge zero, t0, t2 # E : bits set iff byte == 0 + + cmpbge zero, t1, t3 # E : bits set iff byte == c + or t2, t3, t0 # E : + cttz t3, a2 # U0 : speculative (in case we get a match) + beq t0, $loop # U : + +$found: + negq t0, t1 # E : clear all but least set bit + and t0, t1, t0 # E : + and t0, t3, t1 # E : bit set iff byte was the char + addq v0, a2, v0 # E : Add in the bit number from above + + cmoveq t1, $31, v0 # E : Two mapping slots, latency = 2 + nop + nop + ret # L0 : + + END(strchr) + +weak_alias (strchr, index) From 19db7d8141db6d6ae429fb635fe201a9a3166644 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 8 Dec 2000 17:20:12 +0000 Subject: [PATCH 2399/4487] Alpha ev67 strlen implementation. --- sysdeps/alpha/alphaev67/strlen.S | 61 ++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 sysdeps/alpha/alphaev67/strlen.S diff --git a/sysdeps/alpha/alphaev67/strlen.S b/sysdeps/alpha/alphaev67/strlen.S new file mode 100644 index 0000000000..ac8740fb09 --- /dev/null +++ b/sysdeps/alpha/alphaev67/strlen.S @@ -0,0 +1,61 @@ +/* Copyright (C) 2000 Free Software Foundation, Inc. + Contributed by David Mosberger (davidm@cs.arizona.edu). + EV67 optimized by Rick Gorton . + + 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* Finds length of a 0-terminated string. */ + +#include + + .arch ev6 + .set noreorder + .set noat + +ENTRY(strlen) +#ifdef PROF + ldgp gp, 0(pv) + lda AT, _mcount + jsr AT, (AT), _mcount + .prologue 1 +#else + .prologue 0 +#endif + + ldq_u $1, 0($16) # L : load first quadword ($16 may be misaligned) + lda $2, -1($31) # E : + insqh $2, $16, $2 # U : + andnot $16, 7, $0 # E : + + or $2, $1, $1 # E : + cmpbge $31, $1, $2 # E : $2 <- bitmask: bit i == 1 <==> i-th byte == 0 + nop # E : + bne $2, $found # U : + +$loop: ldq $1, 8($0) # L : + addq $0, 8, $0 # E : addr += 8 + cmpbge $31, $1, $2 # E : + beq $2, $loop # U : + +$found: + cttz $2, $3 # U0 : + addq $0, $3, $0 # E : + subq $0, $16, $0 # E : + ret $31, ($26) # L0 : + + END(strlen) From 4eae4d050d5bdfe806f0dae0e56c63d6f7caaf37 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 8 Dec 2000 17:20:22 +0000 Subject: [PATCH 2400/4487] Alpha ev67 strncat implementation. --- sysdeps/alpha/alphaev67/strncat.S | 101 ++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 sysdeps/alpha/alphaev67/strncat.S diff --git a/sysdeps/alpha/alphaev67/strncat.S b/sysdeps/alpha/alphaev67/strncat.S new file mode 100644 index 0000000000..4d199d95fe --- /dev/null +++ b/sysdeps/alpha/alphaev67/strncat.S @@ -0,0 +1,101 @@ +/* Copyright (C) 2000 Free Software Foundation, Inc. + Contributed by Richard Henderson , 1996. + EV67 optimized by Rick Gorton . + + 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* Append no more than COUNT characters from the null-terminated string SRC + to the null-terminated string DST. Always null-terminate the new DST. */ + +#include + + .arch ev6 + .set noreorder + .text + +ENTRY(strncat) + ldgp gp, 0(pv) +#ifdef PROF + .set noat + lda AT, _mcount + jsr AT, (AT), _mcount + .set at +#endif + .prologue 1 + + mov $16, $0 # set up return value + beq $18, $zerocount # U : + /* Find the end of the string. */ + ldq_u $1, 0($16) # L : load first quadword ($16 may be misaligned) + lda $2, -1($31) # E : + + insqh $2, $0, $2 # U : + andnot $16, 7, $16 # E : + nop # E : + or $2, $1, $1 # E : + + nop # E : + nop # E : + cmpbge $31, $1, $2 # E : bits set iff byte == 0 + bne $2, $found # U : + +$loop: ldq $1, 8($16) # L : + addq $16, 8, $16 # E : + cmpbge $31, $1, $2 # E : + beq $2, $loop # U : + +$found: cttz $2, $3 # U0 : + addq $16, $3, $16 # E : + jsr $23, __stxncpy # L0 :/* Now do the append. */ + + /* Worry about the null termination. */ + + zapnot $1, $27, $2 # U : was last byte a null? + cmplt $27, $24, $5 # E : did we fill the buffer completely? + bne $2, 0f # U : + ret # L0 : + +0: or $5, $18, $2 # E : + nop + bne $2, 2f # U : + and $24, 0x80, $3 # E : no zero next byte + + nop # E : + bne $3, 1f # U : + /* Here there are bytes left in the current word. Clear one. */ + addq $24, $24, $24 # E : end-of-count bit <<= 1 + nop # E : + +2: zap $1, $24, $1 # U : + nop # E : + stq_u $1, 0($16) # L : + ret # L0 : + +1: /* Here we must clear the first byte of the next DST word */ + stb $31, 8($16) # L : + nop # E : + nop # E : + ret # L0 : + +$zerocount: + nop # E : + nop # E : + nop # E : + ret # L0 : + + END(strncat) From 1f8a9b39de8330055a20cfc11c48d264ed1ae0a4 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sat, 9 Dec 2000 18:31:01 +0000 Subject: [PATCH 2401/4487] Removed, we can use the generic version. --- sysdeps/unix/sysv/linux/mips/sys/acct.h | 66 ------------------------- 1 file changed, 66 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/mips/sys/acct.h diff --git a/sysdeps/unix/sysv/linux/mips/sys/acct.h b/sysdeps/unix/sysv/linux/mips/sys/acct.h deleted file mode 100644 index a17153c217..0000000000 --- a/sysdeps/unix/sysv/linux/mips/sys/acct.h +++ /dev/null @@ -1,66 +0,0 @@ -/* Copyright (C) 1997, 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 - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _SYS_ACCT_H - -#define _SYS_ACCT_H 1 -#include - -#define __need_time_t -#include - - -__BEGIN_DECLS - -#define ACCT_COMM 16 - -struct acct - { - char ac_comm[ACCT_COMM]; /* Accounting command name. */ - time_t ac_utime; /* Accounting user time. */ - time_t ac_stime; /* Accounting system time. */ - time_t ac_etime; /* Accounting elapsed time. */ - time_t ac_btime; /* Beginning time. */ - long int ac_uid; /* Accounting user ID. */ - long int ac_gid; /* Accounting group ID. */ - unsigned long int ac_tty; /* Controlling tty. */ - /* Please note that the value of the `ac_tty' field, a device number, - is encoded differently in the kernel and for the libc dev_t type. */ - char ac_flag; /* Accounting flag. */ - long int ac_minflt; /* Accounting minor pagefaults. */ - long int ac_majflt; /* Accounting major pagefaults. */ - long int ac_exitcode; /* Accounting process exitcode. */ - }; - -enum - { - AFORK = 0001, /* Has executed fork, but no exec. */ - ASU = 0002, /* Used super-user privileges. */ - ACORE = 0004, /* Dumped core. */ - AXSIG = 0010 /* Killed by a signal. */ - }; - -#define AHZ 100 - - -/* Switch process accounting on and off. */ -extern int acct (__const char *__filename) __THROW; - -__END_DECLS - -#endif /* sys/acct.h */ From f0fe91e7724c208992b6fbed86920c2584cc3f65 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sat, 9 Dec 2000 18:32:00 +0000 Subject: [PATCH 2402/4487] New file, copy from generic linux version with small changes due to different sigset_t. --- sysdeps/unix/sysv/linux/mips/sigaction.c | 139 +++++++++++++++++++++++ 1 file changed, 139 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/mips/sigaction.c diff --git a/sysdeps/unix/sysv/linux/mips/sigaction.c b/sysdeps/unix/sysv/linux/mips/sigaction.c new file mode 100644 index 0000000000..36265d1891 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/sigaction.c @@ -0,0 +1,139 @@ +/* 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include + +#include +#include + +#include "kernel-features.h" + +/* The difference here is that the sigaction structure used in the + kernel is not the same as we use in the libc. Therefore we must + translate it here. */ +#include + +#if __ASSUME_REALTIME_SIGNALS == 0 +/* The variable is shared between all wrappers around signal handling + functions which have RT equivalents. This is the definition. */ +int __libc_missing_rt_sigs; + +extern int __syscall_sigaction (int, const struct old_kernel_sigaction *__unbounded, + struct old_kernel_sigaction *__unbounded); +#endif +extern int __syscall_rt_sigaction (int, const struct kernel_sigaction *__unbounded, + struct kernel_sigaction *__unbounded, size_t); + + +/* If ACT is not NULL, change the action for SIG to *ACT. + If OACT is not NULL, put the old action for SIG in *OACT. */ +int +__libc_sigaction (sig, act, oact) + int sig; + const struct sigaction *act; + struct sigaction *oact; +{ +#if __ASSUME_REALTIME_SIGNALS == 0 + struct old_kernel_sigaction k_sigact, k_osigact; +#endif + int result; + +#if defined __NR_rt_sigaction || __ASSUME_REALTIME_SIGNALS > 0 + /* First try the RT signals. */ +# if __ASSUME_REALTIME_SIGNALS == 0 + if (!__libc_missing_rt_sigs) +# endif + { + struct kernel_sigaction kact, koact; + /* Save the current error value for later. We need not do this + if we are guaranteed to have realtime signals. */ +# if __ASSUME_REALTIME_SIGNALS == 0 + int saved_errno = errno; +# endif + + if (act) + { + kact.k_sa_handler = act->sa_handler; + memcpy (&kact.sa_mask, &act->sa_mask, sizeof (kernel_sigset_t)); + kact.sa_flags = act->sa_flags; +# ifdef HAVE_SA_RESTORER + kact.sa_restorer = act->sa_restorer; +# endif + } + + /* XXX The size argument hopefully will have to be changed to the + real size of the user-level sigset_t. */ + result = INLINE_SYSCALL (rt_sigaction, 4, sig, + act ? __ptrvalue (&kact) : NULL, + oact ? __ptrvalue (&koact) : NULL, + sizeof (kernel_sigset_t)); + +# if __ASSUME_REALTIME_SIGNALS == 0 + if (result >= 0 || errno != ENOSYS) +# endif + { + if (oact && result >= 0) + { + oact->sa_handler = koact.k_sa_handler; + memcpy (&oact->sa_mask, &koact.sa_mask, + sizeof (kernel_sigset_t)); + oact->sa_flags = koact.sa_flags; +# ifdef HAVE_SA_RESTORER + oact->sa_restorer = koact.sa_restorer; +# endif + } + return result; + } + +# if __ASSUME_REALTIME_SIGNALS == 0 + __set_errno (saved_errno); + __libc_missing_rt_sigs = 1; +# endif + } +#endif + +#if __ASSUME_REALTIME_SIGNALS == 0 + if (act) + { + k_sigact.k_sa_handler = act->sa_handler; + k_sigact.sa_mask = act->sa_mask.__val[0]; + k_sigact.sa_flags = act->sa_flags; +# ifdef HAVE_SA_RESTORER + k_sigact.sa_restorer = act->sa_restorer; +# endif + } + result = INLINE_SYSCALL (sigaction, 3, sig, + act ? __ptrvalue (&k_sigact) : NULL, + oact ? __ptrvalue (&k_osigact) : NULL); + if (oact && result >= 0) + { + oact->sa_handler = k_osigact.k_sa_handler; + oact->sa_mask.__val[0] = k_osigact.sa_mask; + oact->sa_flags = k_osigact.sa_flags; +# ifdef HAVE_SA_RESTORER + oact->sa_restorer = k_osigact.sa_restorer; +# endif + } + return result; +#endif +} + +weak_alias (__libc_sigaction, __sigaction) +weak_alias (__libc_sigaction, sigaction) From e102bd25d37a05b381c3f997e1fbf291c2621790 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 10 Dec 2000 22:27:31 +0000 Subject: [PATCH 2403/4487] Exchange t8 with t10. --- sysdeps/alpha/alphaev6/stxcpy.S | 78 ++++++++++++++++----------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/sysdeps/alpha/alphaev6/stxcpy.S b/sysdeps/alpha/alphaev6/stxcpy.S index 0df20438fc..39d731d8e2 100644 --- a/sysdeps/alpha/alphaev6/stxcpy.S +++ b/sysdeps/alpha/alphaev6/stxcpy.S @@ -68,9 +68,9 @@ stxcpy_aligned: ornot t1, t2, t2 # E : (stall) mskql t0, a1, t0 # U : assemble the first output word - cmpbge zero, t2, t8 # E : bits set iff null found + cmpbge zero, t2, t10 # E : bits set iff null found or t0, t3, t1 # E : (stall) - bne t8, $a_eos # U : (stall) + bne t10, $a_eos # U : (stall) /* On entry to this basic block: t0 == the first destination word for masking back in @@ -85,29 +85,29 @@ $a_loop: ldq_u t1, 0(a1) # L : Latency=3 addq a1, 8, a1 # E : - cmpbge zero, t1, t8 # E : (3 cycle stall) - beq t8, $a_loop # U : (stall for t8) + cmpbge zero, t1, t10 # E : (3 cycle stall) + beq t10, $a_loop # U : (stall for t10) /* Take care of the final (partial) word store. On entry to this basic block we have: t1 == the source word containing the null - t8 == the cmpbge mask that found it. */ + t10 == the cmpbge mask that found it. */ $a_eos: - negq t8, t6 # E : find low bit set - and t8, t6, t10 # E : (stall) + negq t10, t6 # E : find low bit set + and t10, t6, t8 # E : (stall) /* For the sake of the cache, don't read a destination word if we're not going to need it. */ - and t10, 0x80, t6 # E : (stall) + and t8, 0x80, t6 # E : (stall) bne t6, 1f # U : (stall) /* We're doing a partial word store and so need to combine our source and original destination words. */ ldq_u t0, 0(a0) # L : Latency=3 - subq t10, 1, t6 # E : + subq t8, 1, t6 # E : zapnot t1, t6, t1 # U : clear src bytes >= null (stall) - or t10, t6, t8 # E : (stall) + or t8, t6, t10 # E : (stall) - zap t0, t8, t0 # E : clear dst bytes <= null + zap t0, t10, t0 # E : clear dst bytes <= null or t0, t1, t1 # E : (stall) nop nop @@ -170,14 +170,14 @@ $u_head: or t0, t1, t1 # E : (stall on t1) or t1, t6, t6 # E : - cmpbge zero, t6, t8 # E : (stall) + cmpbge zero, t6, t10 # E : (stall) lda t6, -1 # E : for masking just below - bne t8, $u_final # U : (stall) + bne t10, $u_final # U : (stall) mskql t6, a1, t6 # U : mask out the bits we have or t6, t2, t2 # E : already extracted before (stall) - cmpbge zero, t2, t8 # E : testing eos (stall) - bne t8, $u_late_head_exit # U : (stall) + cmpbge zero, t2, t10 # E : testing eos (stall) + bne t10, $u_late_head_exit # U : (stall) /* Finally, we've got all the stupid leading edge cases taken care of and we can set up to enter the main loop. */ @@ -188,9 +188,9 @@ $u_head: ldq_u t2, 8(a1) # U : read next high-order source word addq a1, 8, a1 # E : - cmpbge zero, t2, t8 # E : (stall for t2) + cmpbge zero, t2, t10 # E : (stall for t2) nop # E : - bne t8, $u_eos # U : (stall) + bne t10, $u_eos # U : (stall) /* Unaligned copy main loop. In order to avoid reading too much, the loop is structured to detect zeros in aligned source words. @@ -217,8 +217,8 @@ $u_loop: stq_u t1, -8(a0) # L : save the current word (stall) mov t3, t0 # E : - cmpbge zero, t2, t8 # E : test new word for eos - beq t8, $u_loop # U : (stall) + cmpbge zero, t2, t10 # E : test new word for eos + beq t10, $u_loop # U : (stall) nop nop @@ -233,31 +233,31 @@ $u_loop: $u_eos: extqh t2, a1, t1 # U : or t0, t1, t1 # E : first (partial) source word complete (stall) - cmpbge zero, t1, t8 # E : is the null in this first bit? (stall) - bne t8, $u_final # U : (stall) + cmpbge zero, t1, t10 # E : is the null in this first bit? (stall) + bne t10, $u_final # U : (stall) $u_late_head_exit: stq_u t1, 0(a0) # L : the null was in the high-order bits addq a0, 8, a0 # E : extql t2, a1, t1 # U : - cmpbge zero, t1, t8 # E : (stall) + cmpbge zero, t1, t10 # E : (stall) /* Take care of a final (probably partial) result word. On entry to this basic block: t1 == assembled source word - t8 == cmpbge mask that found the null. */ + t10 == cmpbge mask that found the null. */ $u_final: - negq t8, t6 # E : isolate low bit set - and t6, t8, t10 # E : (stall) - and t10, 0x80, t6 # E : avoid dest word load if we can (stall) + negq t10, t6 # E : isolate low bit set + and t6, t10, t8 # E : (stall) + and t8, 0x80, t6 # E : avoid dest word load if we can (stall) bne t6, 1f # U : (stall) ldq_u t0, 0(a0) # E : - subq t10, 1, t6 # E : - or t6, t10, t8 # E : (stall) + subq t8, 1, t6 # E : + or t6, t8, t10 # E : (stall) zapnot t1, t6, t1 # U : kill source bytes >= null (stall) - zap t0, t8, t0 # U : kill dest bytes <= null (2 cycle data stall) + zap t0, t10, t0 # U : kill dest bytes <= null (2 cycle data stall) or t0, t1, t1 # E : (stall) nop nop @@ -291,14 +291,14 @@ $unaligned: subq a1, t4, a1 # E : sub dest misalignment from src addr /* If source misalignment is larger than dest misalignment, we need extra startup checks to avoid SEGV. */ - cmplt t4, t5, t10 # E : - beq t10, $u_head # U : + cmplt t4, t5, t8 # E : + beq t8, $u_head # U : lda t2, -1 # E : mask out leading garbage in source mskqh t2, t5, t2 # U : ornot t1, t2, t3 # E : (stall) - cmpbge zero, t3, t8 # E : is there a zero? (stall) - beq t8, $u_head # U : (stall) + cmpbge zero, t3, t10 # E : is there a zero? (stall) + beq t10, $u_head # U : (stall) /* At this point we've found a zero in the first partial word of the source. We need to isolate the valid source data and mask @@ -306,14 +306,14 @@ $unaligned: that we'll need at least one byte of that original dest word.) */ ldq_u t0, 0(a0) # L : - negq t8, t6 # E : build bitmask of bytes <= zero - and t6, t8, t10 # E : (stall) + negq t10, t6 # E : build bitmask of bytes <= zero + and t6, t10, t8 # E : (stall) and a1, 7, t5 # E : - subq t10, 1, t6 # E : - or t6, t10, t8 # E : (stall) - srl t10, t5, t10 # U : adjust final null return value - zapnot t2, t8, t2 # U : prepare source word; mirror changes (stall) + subq t8, 1, t6 # E : + or t6, t8, t10 # E : (stall) + srl t8, t5, t8 # U : adjust final null return value + zapnot t2, t10, t2 # U : prepare source word; mirror changes (stall) and t1, t2, t1 # E : to source validity mask extql t2, a1, t2 # U : From 02bfc2835e896c850a958bd06387e33706f437c5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 10 Dec 2000 22:34:40 +0000 Subject: [PATCH 2404/4487] Fix a typo. --- sysdeps/alpha/htonl.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/alpha/htonl.S b/sysdeps/alpha/htonl.S index 2358861300..193986e7c3 100644 --- a/sysdeps/alpha/htonl.S +++ b/sysdeps/alpha/htonl.S @@ -33,7 +33,7 @@ ENTRY(htonl) inslh a0, 7, t0 # t0 = 0000000000AABBCC inswl a0, 3, t1 # t1 = 000000CCDD000000 or t1, t0, t1 # t1 = 000000CCDDAABBCC - sll t1, 16, t2 # t2 = 0000000000CCDDAA + srl t1, 16, t2 # t2 = 0000000000CCDDAA zapnot t1, 0x0A, t0 # t0 = 00000000DD00BB00 zapnot t2, 0x05, t3 # t3 = 0000000000CC00AA addl t0, t3, v0 # v0 = ssssssssDDCCBBAA From 033dff7d46574a2b75c8b50d289f6858c9853551 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 11 Dec 2000 04:35:34 +0000 Subject: [PATCH 2405/4487] Additional directory searched for alphaev67. --- sysdeps/alpha/alphaev67/fpu/Implies | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/alpha/alphaev67/fpu/Implies diff --git a/sysdeps/alpha/alphaev67/fpu/Implies b/sysdeps/alpha/alphaev67/fpu/Implies new file mode 100644 index 0000000000..9e3f12d0ac --- /dev/null +++ b/sysdeps/alpha/alphaev67/fpu/Implies @@ -0,0 +1 @@ +alpha/alphaev6/fpu From 678cf91b266822f24fb8450d4f1b9f9baa497cb1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 11 Dec 2000 04:36:20 +0000 Subject: [PATCH 2406/4487] Alpha ev6 sqrt functions. --- sysdeps/alpha/alphaev6/fpu/e_sqrt.S | 46 +++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 sysdeps/alpha/alphaev6/fpu/e_sqrt.S diff --git a/sysdeps/alpha/alphaev6/fpu/e_sqrt.S b/sysdeps/alpha/alphaev6/fpu/e_sqrt.S new file mode 100644 index 0000000000..5bf040a216 --- /dev/null +++ b/sysdeps/alpha/alphaev6/fpu/e_sqrt.S @@ -0,0 +1,46 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + + .arch ev6 + .set noreorder + .set noat + +ENTRY(__ieee754_sqrt) +#ifdef PROF + ldgp gp, 0(pv) + lda AT, _mcount + jsr AT, (AT), _mcount + .prologue 1 +#else + .prologue 0 +#endif + + .align 4 +#ifdef _IEEE_FP_INEXACT + sqrtt/sui $f16, $f0 +#else + sqrtt/su $f16, $f0 +#endif + ret + nop + nop + +END(__ieee754_sqrt) From 3289a30e7f3e4f5e9cc768905b775c80a6ff1d24 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 11 Dec 2000 04:36:35 +0000 Subject: [PATCH 2407/4487] Alpha ev6 sqrtf function. --- sysdeps/alpha/alphaev6/fpu/e_sqrtf.S | 46 ++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 sysdeps/alpha/alphaev6/fpu/e_sqrtf.S diff --git a/sysdeps/alpha/alphaev6/fpu/e_sqrtf.S b/sysdeps/alpha/alphaev6/fpu/e_sqrtf.S new file mode 100644 index 0000000000..410aff4287 --- /dev/null +++ b/sysdeps/alpha/alphaev6/fpu/e_sqrtf.S @@ -0,0 +1,46 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + + .arch ev6 + .set noreorder + .set noat + +ENTRY(__ieee754_sqrtf) +#ifdef PROF + ldgp gp, 0(pv) + lda AT, _mcount + jsr AT, (AT), _mcount + .prologue 1 +#else + .prologue 0 +#endif + + .align 4 +#ifdef _IEEE_FP_INEXACT + sqrts/sui $f16, $f0 +#else + sqrts/su $f16, $f0 +#endif + ret + nop + nop + +END(__ieee754_sqrtf) From f1ae27dd2fa3d1845c35b59c5929ef87c48b3dc0 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 11 Dec 2000 19:27:03 +0000 Subject: [PATCH 2408/4487] Declare kernel_sigset_t and use it. Patch by Hiroyuki Machida . --- sysdeps/unix/sysv/linux/mips/kernel_sigaction.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h b/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h index 3742d54b0e..861866db9a 100644 --- a/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h +++ b/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h @@ -21,11 +21,20 @@ struct old_kernel_sigaction { #endif }; + +#define _KERNEL_NSIG 128 +#define _KERNEL_NSIG_BPW 32 +#define _KERNEL_NSIG_WORDS (_KERNEL_NSIG / _KERNEL_NSIG_BPW) + +typedef struct { + unsigned long sig[_KERNEL_NSIG_WORDS]; +} kernel_sigset_t; + /* This is the sigaction structure from the Linux 2.1.68 kernel. */ struct kernel_sigaction { unsigned int sa_flags; __sighandler_t k_sa_handler; - sigset_t sa_mask; + kernel_sigset_t sa_mask; void (*sa_restorer)(void); int s_resv[1]; /* reserved */ }; From 74b113601f687be0774b7f273d6287b1c5aa0206 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 16 Dec 2000 18:15:32 +0000 Subject: [PATCH 2409/4487] (struct stat): Align with AIX version. (struct stat64): Likewise. --- sysdeps/unix/sysv/aix/bits/stat.h | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/sysdeps/unix/sysv/aix/bits/stat.h b/sysdeps/unix/sysv/aix/bits/stat.h index 2d5585debb..0b818795e7 100644 --- a/sysdeps/unix/sysv/aix/bits/stat.h +++ b/sysdeps/unix/sysv/aix/bits/stat.h @@ -23,11 +23,7 @@ struct stat { __dev_t st_dev; /* Device. */ -#ifndef __USE_FILE_OFFSET64 __ino_t st_ino; /* File serial number. */ -#else - __ino64_t st_ino; /* File serial number. */ -#endif __mode_t st_mode; /* File mode. */ __nlink_t st_nlink; /* Link count. */ unsigned short int st_flag; /* Flag word. */ @@ -46,11 +42,7 @@ struct stat __time_t st_ctime; /* Time of last status change. */ unsigned long int __unused3; __blksize_t st_blksize; /* Optimal block size for I/O. */ -#ifndef __USE_FILE_OFFSET64 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ -#else - __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ -#endif int st_vfstype; /* Type of the filesystem. */ unsigned int st_vfs; /* Vfs number. */ unsigned int st_type; /* Vnode type. */ @@ -69,7 +61,7 @@ struct stat struct stat64 { __dev_t st_dev; /* Device. */ - __ino64_t st_ino; /* File serial number. */ + __ino_t st_ino; /* File serial number. */ __mode_t st_mode; /* File mode. */ __nlink_t st_nlink; /* Link count. */ unsigned short int st_flag; /* Flag word. */ @@ -84,7 +76,7 @@ struct stat64 __time_t st_ctime; /* Time of last status change. */ unsigned long int __unused3; __blksize_t st_blksize; /* Optimal block size for I/O. */ - __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ + __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ int st_vfstype; /* Type of the filesystem. */ unsigned int st_vfs; /* Vfs number. */ unsigned int st_type; /* Vnode type. */ From 726d3efe36f7a7b6bba6a60232396be20171476d Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 18 Dec 2000 05:55:14 +0000 Subject: [PATCH 2410/4487] * sysdeps/s390/pt-machine.h (testandset): Use long int as return value. * sysdeps/arm/pt-machine.h (testandset): Likewise. * sysdeps/hppa/pt-machine.h (testandset): Likewise. * sysdeps/m68k/pt-machine.h (testandset): Likewise. * sysdeps/sh/pt-machine.h (testandset): Likewise. * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise. * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise. --- sysdeps/arm/linuxthreads/pt-machine.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/arm/linuxthreads/pt-machine.h b/sysdeps/arm/linuxthreads/pt-machine.h index d4dc4c4ed9..1079de4a41 100644 --- a/sysdeps/arm/linuxthreads/pt-machine.h +++ b/sysdeps/arm/linuxthreads/pt-machine.h @@ -1,6 +1,6 @@ /* Machine-dependent pthreads configuration and inline functions. ARM version. - Copyright (C) 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Philip Blundell . @@ -29,7 +29,7 @@ time; let's hope nobody tries to use one. */ /* Spinlock implementation; required. */ -PT_EI int +PT_EI long int testandset (int *spinlock) { register unsigned int ret; From f77b82e81bb22ff2d20bcb08c5bb1bf82ee86f8b Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 27 Dec 2000 17:17:14 +0000 Subject: [PATCH 2411/4487] Include internals.h to get prototypes. --- sysdeps/arm/linuxthreads/pspinlock.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/arm/linuxthreads/pspinlock.c b/sysdeps/arm/linuxthreads/pspinlock.c index a56881adfd..010ad33259 100644 --- a/sysdeps/arm/linuxthreads/pspinlock.c +++ b/sysdeps/arm/linuxthreads/pspinlock.c @@ -19,6 +19,7 @@ #include #include +#include "internals.h" int From 22fea1a1b600c68a96aa5f0edc4329b239900a65 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 27 Dec 2000 23:29:08 +0000 Subject: [PATCH 2412/4487] Interpret numeric parameter correctly. --- sysdeps/alpha/alphaev67/strncat.S | 56 ++++++++++++------------------- 1 file changed, 22 insertions(+), 34 deletions(-) diff --git a/sysdeps/alpha/alphaev67/strncat.S b/sysdeps/alpha/alphaev67/strncat.S index 4d199d95fe..31ca19d299 100644 --- a/sysdeps/alpha/alphaev67/strncat.S +++ b/sysdeps/alpha/alphaev67/strncat.S @@ -38,57 +38,45 @@ ENTRY(strncat) #endif .prologue 1 - mov $16, $0 # set up return value - beq $18, $zerocount # U : + mov a0, v0 # set up return value + beq a2, $zerocount # U : /* Find the end of the string. */ - ldq_u $1, 0($16) # L : load first quadword ($16 may be misaligned) - lda $2, -1($31) # E : + ldq_u t0, 0(a0) # L : load first quadword (a0 may be misaligned) + lda t1, -1 # E : - insqh $2, $0, $2 # U : - andnot $16, 7, $16 # E : + insqh t1, v0, t1 # U : + andnot a0, 7, a0 # E : nop # E : - or $2, $1, $1 # E : + or t1, t0, t0 # E : nop # E : nop # E : - cmpbge $31, $1, $2 # E : bits set iff byte == 0 - bne $2, $found # U : + cmpbge zero, t0, t1 # E : bits set iff byte == 0 + bne t1, $found # U : -$loop: ldq $1, 8($16) # L : - addq $16, 8, $16 # E : - cmpbge $31, $1, $2 # E : - beq $2, $loop # U : +$loop: ldq t0, 8(a0) # L : + addq a0, 8, a0 # E : + cmpbge zero, t0, t1 # E : + beq t1, $loop # U : -$found: cttz $2, $3 # U0 : - addq $16, $3, $16 # E : - jsr $23, __stxncpy # L0 :/* Now do the append. */ +$found: cttz t1, t2 # U0 : + addq a0, t2, a0 # E : + jsr t9, __stxncpy # L0 : Now do the append. /* Worry about the null termination. */ - zapnot $1, $27, $2 # U : was last byte a null? - cmplt $27, $24, $5 # E : did we fill the buffer completely? - bne $2, 0f # U : - ret # L0 : - -0: or $5, $18, $2 # E : - nop - bne $2, 2f # U : - and $24, 0x80, $3 # E : no zero next byte - + cttz t10, t2 # U0: byte offset of end-of-count. nop # E : - bne $3, 1f # U : - /* Here there are bytes left in the current word. Clear one. */ - addq $24, $24, $24 # E : end-of-count bit <<= 1 + zapnot t0, t8, t1 # U : was last byte a null? nop # E : -2: zap $1, $24, $1 # U : + bne t1, 0f # U : + nop # E : nop # E : - stq_u $1, 0($16) # L : ret # L0 : -1: /* Here we must clear the first byte of the next DST word */ - stb $31, 8($16) # L : - nop # E : +0: addq t2, a0, a0 # E : address of end-of-count + stb zero, 1(a0) # L : nop # E : ret # L0 : From 1c7f9c93959671fe4c7884991238b8f7fcb08a22 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 27 Dec 2000 23:31:49 +0000 Subject: [PATCH 2413/4487] Don't go through unrolled loop if we would go through it only once. --- sysdeps/alpha/alphaev6/memcpy.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/alpha/alphaev6/memcpy.S b/sysdeps/alpha/alphaev6/memcpy.S index 35f17e7f9e..e3af259f8c 100644 --- a/sysdeps/alpha/alphaev6/memcpy.S +++ b/sysdeps/alpha/alphaev6/memcpy.S @@ -16,7 +16,7 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - + /* * Much of the information about 21264 scheduling/coding comes from: * Compiler Writer's Guide for the Alpha 21264 @@ -86,9 +86,9 @@ $single_head_quad: $do_unroll: addq $16, 64, $7 # E : Initial (+1 trip) wh64 address - cmple $18, 63, $1 # E : Can we go through the unrolled loop? + cmple $18, 127, $1 # E : Can we go through the unrolled loop? bne $1, $tail_quads # U : Nope - nop # E : + nop # E : $unroll_body: wh64 ($7) # L1 : memory subsystem hint: 64 bytes at From cce723df0109388649db45928dea0f5c6128d9fa Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 7 Jan 2001 07:03:36 +0000 Subject: [PATCH 2414/4487] Remove sys/acct.h. --- sysdeps/unix/sysv/linux/mips/Dist | 1 - 1 file changed, 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/Dist b/sysdeps/unix/sysv/linux/mips/Dist index a983244372..dd43ebc5ba 100644 --- a/sysdeps/unix/sysv/linux/mips/Dist +++ b/sysdeps/unix/sysv/linux/mips/Dist @@ -5,7 +5,6 @@ ipc_priv.h kernel_sigaction.h kernel_stat.h kernel_termios.h -sys/acct.h sys/cachectl.h sys/procfs.h sys/sysmips.h From 03b5cbd57dc79782980745a6dd869086139aabb7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 7 Jan 2001 07:31:02 +0000 Subject: [PATCH 2415/4487] Add alphaev6/stxncpy.S and alphaev6/stxcpy.S. --- sysdeps/alpha/Dist | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/alpha/Dist b/sysdeps/alpha/Dist index 034f0b03d2..7cf49111e4 100644 --- a/sysdeps/alpha/Dist +++ b/sysdeps/alpha/Dist @@ -7,3 +7,5 @@ _mcount.S stxcpy.S stxncpy.S fpu/fenv_libc.h +alphaev6/stxncpy.S +alphaev6/stxcpy.S From 601ce732020d522494d6895e61739240dd6092d8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 7 Jan 2001 07:32:00 +0000 Subject: [PATCH 2416/4487] Add uitrunc.c, savef.S, and restf.S. --- sysdeps/unix/sysv/aix/Dist | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysdeps/unix/sysv/aix/Dist b/sysdeps/unix/sysv/aix/Dist index 9db1d7446d..bce7330830 100644 --- a/sysdeps/unix/sysv/aix/Dist +++ b/sysdeps/unix/sysv/aix/Dist @@ -4,3 +4,6 @@ dl-close.c kernel_proto.h bits/utmpx.h gnu/lib-names.h +uitrunc.c +savef.S +restf.S From 722a930901a6bc5fd223aad4fed9e7c17ecb4634 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 15 Jan 2001 07:02:28 +0000 Subject: [PATCH 2417/4487] * sysdeps/unix/sysv/linux/mips/register-dump.h (REGISTER_DUMP): Change type of CTX to (struct sigcontext *). * sysdeps/unix/sysv/linux/mips/sigcontextinfo.h (GET_PC): Likewise. (GET_FRAME): Likewise. (GET_STACK): Likewise. (SIGCONTEXT): Likewise. Add 2nd arg _code. (SIGCONTEXT_EXTRA_ARGS): Add 2nd arg _code. --- sysdeps/unix/sysv/linux/mips/register-dump.h | 4 ++-- sysdeps/unix/sysv/linux/mips/sigcontextinfo.h | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/register-dump.h b/sysdeps/unix/sysv/linux/mips/register-dump.h index e204223054..53c59c8423 100644 --- a/sysdeps/unix/sysv/linux/mips/register-dump.h +++ b/sysdeps/unix/sysv/linux/mips/register-dump.h @@ -1,5 +1,5 @@ /* Dump registers. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright (C) 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger , 2000. @@ -105,4 +105,4 @@ register_dump (int fd, struct sigcontext *ctx) } -#define REGISTER_DUMP register_dump (fd, &ctx) +#define REGISTER_DUMP register_dump (fd, ctx) diff --git a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h index 9b3e7ea3a6..e1ee528c17 100644 --- a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h +++ b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger , 2000. @@ -18,8 +18,8 @@ Boston, MA 02111-1307, USA. */ -#define SIGCONTEXT struct sigcontext -#define SIGCONTEXT_EXTRA_ARGS -#define GET_PC(ctx) ((void *) ctx.sc_pc) -#define GET_FRAME(ctx) ((void *) ctx.sc_regs[30]) -#define GET_STACK(ctx) ((void *) ctx.sc_regs[29]) +#define SIGCONTEXT unsigned long _code, struct sigcontext +#define SIGCONTEXT_EXTRA_ARGS _code, +#define GET_PC(ctx) ((void *) ctx->sc_pc) +#define GET_FRAME(ctx) ((void *) ctx->sc_regs[30]) +#define GET_STACK(ctx) ((void *) ctx->sc_regs[29]) From b4b331c7120daec890791308714276679b6f135f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 15 Jan 2001 20:29:25 +0000 Subject: [PATCH 2418/4487] Remove select syscall handling. The generic Linux version should work. --- sysdeps/unix/sysv/linux/mips/syscalls.list | 2 -- 1 file changed, 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index ae0f33af1b..c36d071979 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -8,8 +8,6 @@ cachectl - cachectl i:pii __cachectl cachectl cacheflush - cacheflush i:pii _flush_cache cacheflush sysmips - sysmips i:iiii __sysmips sysmips -# override select.S in parent directory: -select - select i:iPPPP __select select sigsuspend - sigsuspend i:p __sigsuspend sigsuspend # From ea3e9a37c0aa68d1b92eaf327761458f0044b93a Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 16 Jan 2001 06:38:37 +0000 Subject: [PATCH 2419/4487] Fix typo in last patch. --- sysdeps/unix/sysv/linux/mips/sigcontextinfo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h index e1ee528c17..1b67ce39af 100644 --- a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h +++ b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h @@ -18,7 +18,7 @@ Boston, MA 02111-1307, USA. */ -#define SIGCONTEXT unsigned long _code, struct sigcontext +#define SIGCONTEXT unsigned long _code, struct sigcontext * #define SIGCONTEXT_EXTRA_ARGS _code, #define GET_PC(ctx) ((void *) ctx->sc_pc) #define GET_FRAME(ctx) ((void *) ctx->sc_regs[30]) From 582f2b191d98af28ed3dfaa2cfb5058179a67b92 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 17 Jan 2001 15:54:57 +0000 Subject: [PATCH 2420/4487] (__bswap_32): Add cast to avoid invalid asm. --- sysdeps/m68k/bits/byteswap.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/sysdeps/m68k/bits/byteswap.h b/sysdeps/m68k/bits/byteswap.h index e828fc6554..efdc7af0df 100644 --- a/sysdeps/m68k/bits/byteswap.h +++ b/sysdeps/m68k/bits/byteswap.h @@ -34,16 +34,16 @@ #if defined __GNUC__ && __GNUC__ >= 2 # define __bswap_32(x) \ - __extension__ \ - ({ unsigned int __bswap_32_v; \ - if (__builtin_constant_p (x)) \ - __bswap_32_v = __bswap_constant_32 (x); \ - else \ - __asm__ __volatile__ ("ror%.w %#8, %0;" \ - "swap %0;" \ - "ror%.w %#8, %0" \ - : "=d" (__bswap_32_v) \ - : "0" (x)); \ + __extension__ \ + ({ unsigned int __bswap_32_v; \ + if (__builtin_constant_p (x)) \ + __bswap_32_v = __bswap_constant_32 (x); \ + else \ + __asm__ __volatile__ ("ror%.w %#8, %0;" \ + "swap %0;" \ + "ror%.w %#8, %0" \ + : "=d" (__bswap_32_v) \ + : "0" ((unsigned int) (x))); \ __bswap_32_v; }) #else # define __bswap_32(x) __bswap_constant_32 (x) From 2b0edb5a1e058bd4ffe41f12cc4e60516f8c270b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 26 Jan 2001 02:16:03 +0000 Subject: [PATCH 2421/4487] Correct definition of wordexp_t. --- sysdeps/unix/sysv/linux/alpha/wordexp.c | 59 +++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/wordexp.c diff --git a/sysdeps/unix/sysv/linux/alpha/wordexp.c b/sysdeps/unix/sysv/linux/alpha/wordexp.c new file mode 100644 index 0000000000..d7ae6dd1a9 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/wordexp.c @@ -0,0 +1,59 @@ +/* Copyright (C) 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +/* For Linux/Alpha we have to make the wordexp symbols versioned. */ +#define wordexp(words, pwordexp, flags) \ + __new_wordexp (words, pwordexp, flags) + +#include + +versioned_symbol (libc, __new_wordexp, wordexp, GLIBC_2_2_2); + + +#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2_2) +/* The old, incorrect wordexp_t definition. */ +typedef struct + { + int we_wordc; /* Count of words matched. */ + char **we_wordv; /* List of expanded words. */ + int we_offs; /* Slots to reserve in `we_wordv'. */ + } old_wordexp_t; + + +int +__old_wordexp (const char *words, old_wordexp_t *pwordexp, int flags) +{ + wordexp_t we; + int result; + + we.we_wordc = pwordexp->we_wordc; + we.we_wordv = pwordexp->we_wordv; + we.we_offs = pwordexp->we_offs; + + result = __new_wordexp (words, &we, flags); + + pwordexp->we_wordc = we.we_wordc; + pwordexp->we_wordv = we.we_wordv; + pwordexp->we_offs = we.we_offs; + + return result; +} +compat_symbol (libc, __old_wordexp, wordexp, GLIBC_2_1); +#endif From 274a3ffc63c4ffb98b12bdf25b286cb485dd6fcb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 26 Jan 2001 02:16:41 +0000 Subject: [PATCH 2422/4487] [libc] (GLIBC_2.2.2): Add wordexp. --- sysdeps/unix/sysv/linux/alpha/Versions | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/Versions b/sysdeps/unix/sysv/linux/alpha/Versions index 0e6e519dd2..d89ef6a061 100644 --- a/sysdeps/unix/sysv/linux/alpha/Versions +++ b/sysdeps/unix/sysv/linux/alpha/Versions @@ -54,4 +54,8 @@ libc { GLIBC_2.1.4 { pciconfig_iobase; } + GLIBC_2.2.2 { + # w* + wordexp; + } } From 76d981d3a6d8e6e73e02e61abc4553743846cad4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 27 Jan 2001 04:58:11 +0000 Subject: [PATCH 2423/4487] Use nfds_t type in function definition. --- sysdeps/unix/sysv/aix/poll.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/aix/poll.c b/sysdeps/unix/sysv/aix/poll.c index ae041a852f..bd1967600a 100644 --- a/sysdeps/unix/sysv/aix/poll.c +++ b/sysdeps/unix/sysv/aix/poll.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2001 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 @@ -21,7 +21,7 @@ int __poll (fds, nfds, timeout) struct pollfd *fds; - unsigned long int nfds; + nfds_t nfds; int timeout; { return poll (fds, nfds, timeout); From cb25fffef1fb2654f037b8250cb539f3d8f0b969 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 27 Jan 2001 04:59:52 +0000 Subject: [PATCH 2424/4487] Define NPOLLFILE only if __USE_MISC. --- sysdeps/unix/sysv/linux/m68k/bits/poll.h | 6 ++++-- sysdeps/unix/sysv/linux/mips/bits/poll.h | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/m68k/bits/poll.h b/sysdeps/unix/sysv/linux/m68k/bits/poll.h index 2d4e6f6f01..7472a8005c 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/poll.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/poll.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997 Free Software Foundation, Inc. +/* Copyright (C) 1997, 2001 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 @@ -42,5 +42,7 @@ #define POLLHUP 0x010 /* Hung up. */ #define POLLNVAL 0x020 /* Invalid polling request. */ +#ifdef __USE_MISC /* Canonical number of polling requests to read in at a time in poll. */ -#define NPOLLFILE 30 +# define NPOLLFILE 30 +#endif diff --git a/sysdeps/unix/sysv/linux/mips/bits/poll.h b/sysdeps/unix/sysv/linux/mips/bits/poll.h index 9b7826af6c..b0ef0788d7 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/poll.h +++ b/sysdeps/unix/sysv/linux/mips/bits/poll.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997 Free Software Foundation, Inc. +/* Copyright (C) 1997, 2001 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 @@ -47,5 +47,7 @@ #define POLLHUP 0x010 /* Hung up. */ #define POLLNVAL 0x020 /* Invalid polling request. */ +#ifdef __USE_MISC /* Canonical number of polling requests to read in at a time in poll. */ -#define NPOLLFILE 30 +# define NPOLLFILE 30 +#endif From 1ae7e5b69595e122548882d790684e1be903cefb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 27 Jan 2001 06:29:16 +0000 Subject: [PATCH 2425/4487] Define sigev_notify_attr with real type. --- sysdeps/unix/sysv/linux/alpha/bits/siginfo.h | 9 ++++++--- sysdeps/unix/sysv/linux/mips/bits/siginfo.h | 11 +++++++---- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h b/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h index 9426c13ee7..ca0a4fccda 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h @@ -1,5 +1,5 @@ -/* siginfo_t, sigevent and constants. Linux/SPARC version. - Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +/* siginfo_t, sigevent and constants. Linux/Alpha version. + Copyright (C) 1997, 1998, 1999, 2000, 2001 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 @@ -257,6 +257,9 @@ enum # define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3) # endif +/* Forward declaration of the `pthread_attr_t' type. */ +struct __pthread_attr_s; + typedef struct sigevent { sigval_t sigev_value; @@ -270,7 +273,7 @@ typedef struct sigevent struct { void (*_function) (sigval_t); /* Function to start. */ - void *_attribute; /* Really pthread_attr_t. */ + struct __pthread_attr_s *_attribute; /* Really pthread_attr_t. */ } _sigev_thread; } _sigev_un; } sigevent_t; diff --git a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h index 9d348acb99..6bebeb2bac 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h +++ b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h @@ -1,5 +1,5 @@ -/* siginfo_t, sigevent and constants. Linux version. - Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. +/* siginfo_t, sigevent and constants. Linux/MIPS version. + Copyright (C) 1997, 1998, 2000, 2001 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 @@ -245,6 +245,9 @@ enum # define __SIGEV_MAX_SIZE 64 # define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3) +/* Forward declaration of the `pthread_attr_t' type. */ +struct __pthread_attr_s; + /* XXX This one might need to change!!! */ typedef struct sigevent { @@ -258,8 +261,8 @@ typedef struct sigevent struct { - void (*_function) (sigval_t); /* Function to start. */ - void *_attribute; /* Really pthread_attr_t. */ + void (*_function) (sigval_t); /* Function to start. */ + struct __pthread_attr_s *_attribute; /* Really pthread_attr_t. */ } _sigev_thread; } _sigev_un; } sigevent_t; From 0361ba30466a05705c920924bed382f89dc366a5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 27 Jan 2001 19:27:16 +0000 Subject: [PATCH 2426/4487] Don't define __fd_mask, __NFDBITS, __FDELT, __FDMASK, and __fd_set here. --- sysdeps/unix/sysv/aix/bits/types.h | 24 +--------------- sysdeps/unix/sysv/hpux/bits/types.h | 24 +--------------- sysdeps/unix/sysv/linux/alpha/bits/types.h | 28 +------------------ sysdeps/unix/sysv/linux/mips/bits/types.h | 24 +--------------- sysdeps/unix/sysv/sysv4/solaris2/bits/types.h | 22 +-------------- 5 files changed, 5 insertions(+), 117 deletions(-) diff --git a/sysdeps/unix/sysv/aix/bits/types.h b/sysdeps/unix/sysv/aix/bits/types.h index a89393d704..cd57291051 100644 --- a/sysdeps/unix/sysv/aix/bits/types.h +++ b/sysdeps/unix/sysv/aix/bits/types.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,92,94,95,96,97,98,99, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,1994-1999,2000,2001 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 @@ -93,31 +93,9 @@ typedef int __clockid_t; /* Timer ID returned by `timer_create'. */ typedef int __timer_t; -/* One element in the file descriptor mask array. */ -typedef unsigned long int __fd_mask; - /* Number of descriptors that can fit in an `fd_set'. */ #define __FD_SETSIZE 1024 -/* It's easier to assume 8-bit bytes than to get CHAR_BIT. */ -#define __NFDBITS (8 * sizeof (__fd_mask)) -#define __FDELT(d) ((d) / __NFDBITS) -#define __FDMASK(d) ((__fd_mask) 1 << ((d) % __NFDBITS)) - -/* fd_set for select and pselect. */ -typedef struct - { - /* XPG4.2 requires this member name. Otherwise avoid the name - from the global namespace. */ -#ifdef __USE_XOPEN - __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS]; -# define __FDS_BITS(set) ((set)->fds_bits) -#else - __fd_mask __fds_bits[__FD_SETSIZE / __NFDBITS]; -# define __FDS_BITS(set) ((set)->__fds_bits) -#endif - } __fd_set; - typedef long int __key_t; diff --git a/sysdeps/unix/sysv/hpux/bits/types.h b/sysdeps/unix/sysv/hpux/bits/types.h index e95892eda3..88ae1a9e9a 100644 --- a/sysdeps/unix/sysv/hpux/bits/types.h +++ b/sysdeps/unix/sysv/hpux/bits/types.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1994-1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1991,1992,1994-1998,2000,2001 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 @@ -85,31 +85,9 @@ typedef long int __swblk_t; /* Type of a swap block maybe? */ typedef __u_long __clock_t; -/* One element in the file descriptor mask array. */ -typedef long int __fd_mask; - /* Number of descriptors that can fit in an `fd_set'. */ #define __FD_SETSIZE 2048 -/* It's easier to assume 8-bit bytes than to get CHAR_BIT. */ -#define __NFDBITS (8 * sizeof (__fd_mask)) -#define __FDELT(d) ((d) / __NFDBITS) -#define __FDMASK(d) ((__fd_mask) 1 << ((d) % __NFDBITS)) - -/* fd_set for select and pselect. */ -typedef struct - { - /* XPG4.2 requires this member name. Otherwise avoid the name - from the global namespace. */ -#ifdef __USE_XOPEN - __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS]; -# define __FDS_BITS(set) ((set)->fds_bits) -#else - __fd_mask __fds_bits[__FD_SETSIZE / __NFDBITS]; -# define __FDS_BITS(set) ((set)->__fds_bits) -#endif - } __fd_set; - typedef long int __key_t; diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h index 13c389846f..b357994090 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/types.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,92,94,95,96,97,98,99, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,1994-1999,2000,2001 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 @@ -92,35 +92,9 @@ typedef int __timer_t; /* Used in `struct shmid_ds'. */ typedef int __ipc_pid_t; -/* One element in the file descriptor mask array. */ -typedef unsigned long int __fd_mask; - -/* Due to incaution, we may have gotten these from a kernel header file. */ -#undef __FD_SETSIZE -#undef __NFDBITS -#undef __FDMASK - /* Number of descriptors that can fit in an `fd_set'. */ #define __FD_SETSIZE 1024 -/* It's easier to assume 8-bit bytes than to get CHAR_BIT. */ -#define __NFDBITS (8 * sizeof (__fd_mask)) -#define __FDELT(d) ((d) / __NFDBITS) -#define __FDMASK(d) ((__fd_mask) 1 << ((d) % __NFDBITS)) - -/* fd_set for select and pselect. */ -typedef struct - { - /* XPG4.2 requires this member name. Otherwise avoid the name - from the user namespace. */ -#ifdef __USE_XOPEN - __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS]; -# define __FDS_BITS(set) ((set)->fds_bits) -#else - __fd_mask __fds_bits[__FD_SETSIZE / __NFDBITS]; -# define __FDS_BITS(set) ((set)->__fds_bits) -#endif - } __fd_set; /* Used in XTI. */ typedef long int __t_scalar_t; diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h index 927d6098dc..c3b93e3ac7 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/types.h +++ b/sysdeps/unix/sysv/linux/mips/bits/types.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,92,94,95,96,97,98,99, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,1994-1999,2000,2001 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 @@ -93,31 +93,9 @@ typedef int __clockid_t; /* Timer ID returned by `timer_create'. */ typedef int __timer_t; -/* One element in the file descriptor mask array. */ -typedef unsigned long int __fd_mask; - /* Number of descriptors that can fit in an `fd_set'. */ #define __FD_SETSIZE 1024 -/* It's easier to assume 8-bit bytes than to get CHAR_BIT. */ -#define __NFDBITS (8 * sizeof (__fd_mask)) -#define __FDELT(d) ((d) / __NFDBITS) -#define __FDMASK(d) ((__fd_mask) 1 << ((d) % __NFDBITS)) - -/* fd_set for select and pselect. */ -typedef struct - { - /* XPG4.2 requires this member name. Otherwise avoid the name - from the user namespace. */ -#ifdef __USE_XOPEN - __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS]; -# define __FDS_BITS(set) ((set)->fds_bits) -#else - __fd_mask __fds_bits[__FD_SETSIZE / __NFDBITS]; -# define __FDS_BITS(set) ((set)->__fds_bits) -#endif - } __fd_set; - typedef int __key_t; diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h index 65ad002f79..7765fa45b2 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,92,94,95,96,97,98,99, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,1994-1999,2000,2001 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 @@ -89,26 +89,6 @@ typedef int __key_t; /* Type of an IPC key */ /* Number of descriptors that can fit in an `fd_set'. */ #define __FD_SETSIZE 1024 -/* It's easier to assume 8-bit bytes than to get CHAR_BIT. */ -#define __NFDBITS (sizeof (unsigned long int) * 8) -#define __FDELT(d) ((d) / __NFDBITS) -#define __FDMASK(d) ((unsigned long int) 1 << ((d) % __NFDBITS)) - -typedef struct - { - /* XPG4.2 requires this member name. Otherwise avoid the name - from the user namespace. */ -#ifdef __USE_XOPEN - unsigned long int fds_bits[(__FD_SETSIZE + (__NFDBITS - 1)) / __NFDBITS]; -# define __FDS_BITS(set) ((set)->fds_bits) -#else - unsigned long int __fds_bits[(__FD_SETSIZE + (__NFDBITS - 1)) / __NFDBITS]; -# define __FDS_BITS(set) ((set)->__fds_bits) -#endif - } __fd_set; - -typedef unsigned long int __fd_mask; - /* Type to represent block size. */ typedef long int __blksize_t; From f2018ae11c904e25b5b5ebe452d857b5761dfc55 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 27 Jan 2001 21:23:07 +0000 Subject: [PATCH 2427/4487] (struct sockaddr_storage): Define ss_family and __ss_family. --- sysdeps/unix/sysv/aix/bits/socket.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/aix/bits/socket.h b/sysdeps/unix/sysv/aix/bits/socket.h index febfc7298d..f080c6ac23 100644 --- a/sysdeps/unix/sysv/aix/bits/socket.h +++ b/sysdeps/unix/sysv/aix/bits/socket.h @@ -1,5 +1,5 @@ /* System-specific socket constants and types. AIX version. - Copyright (C) 1991,92,94,95,96,97,98,99, 2000 Free Software Foundation, Inc. + Copyright (C) 1991,92,1994-1999,2000,2001 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 @@ -152,7 +152,7 @@ struct sockaddr struct sockaddr_storage { - __SOCKADDR_COMMON (__ss_); /* Address family, etc. */ + __SOCKADDR_COMMON (ss_); /* Address family, etc. */ __ss_aligntype __ss_align; /* Force desired alignment. */ char __ss_padding[_SS_PADSIZE]; }; From 72f561b477e19bccf9fb04dcdcb5d387305421b3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 27 Jan 2001 21:23:45 +0000 Subject: [PATCH 2428/4487] Linux/Alpha specific socket.h definitions. --- sysdeps/unix/sysv/linux/alpha/bits/socket.h | 308 ++++++++++++++++++++ 1 file changed, 308 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/socket.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/socket.h b/sysdeps/unix/sysv/linux/alpha/bits/socket.h new file mode 100644 index 0000000000..8efdacabeb --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/bits/socket.h @@ -0,0 +1,308 @@ +/* System-specific socket constants and types. Linux/Alpha version. + Copyright (C) 1991,1992,1994-1999,2000,2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef __BITS_SOCKET_H +#define __BITS_SOCKET_H + +#if !defined _SYS_SOCKET_H && !defined _NETINET_IN_H +# error "Never include directly; use instead." +#endif + +#define __need_size_t +#define __need_NULL +#include + +#include +#include + +/* Type for length arguments in socket calls. */ +#ifndef __socklen_t_defined +typedef __socklen_t socklen_t; +# define __socklen_t_defined +#endif + +/* Types of sockets. */ +enum __socket_type +{ + SOCK_STREAM = 1, /* Sequenced, reliable, connection-based + byte streams. */ +#define SOCK_STREAM SOCK_STREAM + SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams + of fixed maximum length. */ +#define SOCK_DGRAM SOCK_DGRAM + SOCK_RAW = 3, /* Raw protocol interface. */ +#define SOCK_RAW SOCK_RAW + SOCK_RDM = 4, /* Reliably-delivered messages. */ +#define SOCK_RDM SOCK_RDM + SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, + datagrams of fixed maximum length. */ +#define SOCK_SEQPACKET SOCK_SEQPACKET + SOCK_PACKET = 10 /* Linux specific way of getting packets + at the dev level. For writing rarp and + other similar things on the user level. */ +#define SOCK_PACKET SOCK_PACKET +}; + +/* Protocol families. */ +#define PF_UNSPEC 0 /* Unspecified. */ +#define PF_LOCAL 1 /* Local to host (pipes and file-domain). */ +#define PF_UNIX PF_LOCAL /* Old BSD name for PF_LOCAL. */ +#define PF_FILE PF_LOCAL /* Another non-standard name for PF_LOCAL. */ +#define PF_INET 2 /* IP protocol family. */ +#define PF_AX25 3 /* Amateur Radio AX.25. */ +#define PF_IPX 4 /* Novell Internet Protocol. */ +#define PF_APPLETALK 5 /* Appletalk DDP. */ +#define PF_NETROM 6 /* Amateur radio NetROM. */ +#define PF_BRIDGE 7 /* Multiprotocol bridge. */ +#define PF_ATMPVC 8 /* ATM PVCs. */ +#define PF_X25 9 /* Reserved for X.25 project. */ +#define PF_INET6 10 /* IP version 6. */ +#define PF_ROSE 11 /* Amateur Radio X.25 PLP. */ +#define PF_DECnet 12 /* Reserved for DECnet project. */ +#define PF_NETBEUI 13 /* Reserved for 802.2LLC project. */ +#define PF_SECURITY 14 /* Security callback pseudo AF. */ +#define PF_KEY 15 /* PF_KEY key management API. */ +#define PF_NETLINK 16 +#define PF_ROUTE PF_NETLINK /* Alias to emulate 4.4BSD. */ +#define PF_PACKET 17 /* Packet family. */ +#define PF_ASH 18 /* Ash. */ +#define PF_ECONET 19 /* Acorn Econet. */ +#define PF_ATMSVC 20 /* ATM SVCs. */ +#define PF_SNA 22 /* Linux SNA Project */ +#define PF_IRDA 23 /* IRDA sockets. */ +#define PF_PPPOX 24 /* PPPoX sockets. */ +#define PF_MAX 32 /* For now.. */ + +/* Address families. */ +#define AF_UNSPEC PF_UNSPEC +#define AF_LOCAL PF_LOCAL +#define AF_UNIX PF_UNIX +#define AF_FILE PF_FILE +#define AF_INET PF_INET +#define AF_AX25 PF_AX25 +#define AF_IPX PF_IPX +#define AF_APPLETALK PF_APPLETALK +#define AF_NETROM PF_NETROM +#define AF_BRIDGE PF_BRIDGE +#define AF_ATMPVC PF_ATMPVC +#define AF_X25 PF_X25 +#define AF_INET6 PF_INET6 +#define AF_ROSE PF_ROSE +#define AF_DECnet PF_DECnet +#define AF_NETBEUI PF_NETBEUI +#define AF_SECURITY PF_SECURITY +#define AF_KEY PF_KEY +#define AF_NETLINK PF_NETLINK +#define AF_ROUTE PF_ROUTE +#define AF_PACKET PF_PACKET +#define AF_ASH PF_ASH +#define AF_ECONET PF_ECONET +#define AF_ATMSVC PF_ATMSVC +#define AF_SNA PF_SNA +#define AF_IRDA PF_IRDA +#define AF_PPPOX PF_PPPOX +#define AF_MAX PF_MAX + +/* Socket level values. Others are defined in the appropriate headers. + + XXX These definitions also should go into the appropriate headers as + far as they are available. */ +#define SOL_RAW 255 +#define SOL_DECNET 261 +#define SOL_X25 262 +#define SOL_PACKET 263 +#define SOL_ATM 264 /* ATM layer (cell level). */ +#define SOL_AAL 265 /* ATM Adaption Layer (packet level). */ +#define SOL_IRDA 266 + +/* Maximum queue length specifiable by listen. */ +#define SOMAXCONN 128 + +/* Get the definition of the macro to define the common sockaddr members. */ +#include + +/* Structure describing a generic socket address. */ +struct sockaddr + { + __SOCKADDR_COMMON (sa_); /* Common data: address family and length. */ + char sa_data[14]; /* Address data. */ + }; + + +/* Structure large enough to hold any socket address (with the historical + exception of AF_UNIX). We reserve 128 bytes. */ +#if ULONG_MAX > 0xffffffff +# define __ss_aligntype __uint64_t +#else +# define __ss_aligntype __uint32_t +#endif +#define _SS_SIZE 128 +#define _SS_PADSIZE (_SS_SIZE - (2 * sizeof (__ss_aligntype))) + +struct sockaddr_storage + { + __SOCKADDR_COMMON (ss_); /* Address family, etc. */ + __ss_aligntype __ss_align; /* Force desired alignment. */ + char __ss_padding[_SS_PADSIZE]; + }; + + +/* Bits in the FLAGS argument to `send', `recv', et al. */ +enum + { + MSG_OOB = 0x01, /* Process out-of-band data. */ +#define MSG_OOB MSG_OOB + MSG_PEEK = 0x02, /* Peek at incoming messages. */ +#define MSG_PEEK MSG_PEEK + MSG_DONTROUTE = 0x04, /* Don't use local routing. */ +#define MSG_DONTROUTE MSG_DONTROUTE +#ifdef __USE_GNU + /* DECnet uses a different name. */ + MSG_TRYHARD = MSG_DONTROUTE, +# define MSG_TRYHARD MSG_DONTROUTE +#endif + MSG_CTRUNC = 0x08, /* Control data lost before delivery. */ +#define MSG_CTRUNC MSG_CTRUNC + MSG_PROXY = 0x10, /* Supply or ask second address. */ +#define MSG_PROXY MSG_PROXY + MSG_TRUNC = 0x20, +#define MSG_TRUNC MSG_TRUNC + MSG_DONTWAIT = 0x40, /* Nonblocking IO. */ +#define MSG_DONTWAIT MSG_DONTWAIT + MSG_EOR = 0x80, /* End of record. */ +#define MSG_EOR MSG_EOR + MSG_WAITALL = 0x100, /* Wait for a full request. */ +#define MSG_WAITALL MSG_WAITALL + MSG_FIN = 0x200, +#define MSG_FIN MSG_FIN + MSG_SYN = 0x400, +#define MSG_SYN MSG_SYN + MSG_CONFIRM = 0x800, /* Confirm path validity. */ +#define MSG_CONFIRM MSG_CONFIRM + MSG_RST = 0x1000, +#define MSG_RST MSG_RST + MSG_ERRQUEUE = 0x2000, /* Fetch message from error queue. */ +#define MSG_ERRQUEUE MSG_ERRQUEUE + MSG_NOSIGNAL = 0x4000 /* Do not generate SIGPIPE. */ +#define MSG_NOSIGNAL MSG_NOSIGNAL + }; + + +/* Structure describing messages sent by + `sendmsg' and received by `recvmsg'. */ +struct msghdr + { + void *msg_name; /* Address to send to/receive from. */ + socklen_t msg_namelen; /* Length of address data. */ + + struct iovec *msg_iov; /* Vector of data to send/receive into. */ + size_t msg_iovlen; /* Number of elements in the vector. */ + + void *msg_control; /* Ancillary data (eg BSD filedesc passing). */ + size_t msg_controllen; /* Ancillary data buffer length. */ + + int msg_flags; /* Flags on received message. */ + }; + +/* Structure used for storage of ancillary data object information. */ +struct cmsghdr + { + size_t cmsg_len; /* Length of data in cmsg_data plus length + of cmsghdr structure. */ + int cmsg_level; /* Originating protocol. */ + int cmsg_type; /* Protocol specific type. */ + __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */ + /* XXX Perhaps this should be removed. */ + }; + +/* Ancillary data object manipulation macros. */ +#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2 +# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data) +#else +# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1)) +#endif +#define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg) +#define CMSG_FIRSTHDR(mhdr) \ + ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \ + ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL) +#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \ + & (size_t) ~(sizeof (size_t) - 1)) +#define CMSG_SPACE(len) (CMSG_ALIGN (len) \ + + CMSG_ALIGN (sizeof (struct cmsghdr))) +#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len)) + +extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr, + struct cmsghdr *__cmsg) __THROW; +#ifdef __USE_EXTERN_INLINES +# ifndef _EXTERN_INLINE +# define _EXTERN_INLINE extern __inline +# endif +_EXTERN_INLINE struct cmsghdr * +__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW +{ + if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr)) + /* The kernel header does this so there may be a reason. */ + return 0; + + __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg + + CMSG_ALIGN (__cmsg->cmsg_len)); + if ((unsigned char *) (__cmsg + 1) >= ((unsigned char *) __mhdr->msg_control + + __mhdr->msg_controllen) + || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len) + > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen))) + /* No more entries. */ + return 0; + return __cmsg; +} +#endif /* Use `extern inline'. */ + +/* Socket level message types. This must match the definitions in + . */ +enum + { + SCM_RIGHTS = 0x01, /* Transfer file descriptors. */ +#define SCM_RIGHTS SCM_RIGHTS +#ifdef __USE_BSD + SCM_CREDENTIALS = 0x02, /* Credentials passing. */ +# define SCM_CREDENTIALS SCM_CREDENTIALS +#endif + __SCM_CONNECT = 0x03 /* Data array is `struct scm_connect'. */ + }; + +/* User visible structure for SCM_CREDENTIALS message */ + +struct ucred +{ + pid_t pid; /* PID of sending process. */ + uid_t uid; /* UID of sending process. */ + gid_t gid; /* GID of sending process. */ +}; + +/* Get socket manipulation related informations from kernel headers. */ +#include + + +/* Structure used to manipulate the SO_LINGER option. */ +struct linger + { + int l_onoff; /* Nonzero to linger on close. */ + int l_linger; /* Time to linger. */ + }; + +#endif /* bits/socket.h */ From 0688457b472129a9ad6835109515736224d3dba1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 27 Jan 2001 21:25:38 +0000 Subject: [PATCH 2429/4487] (struct sockaddr_storage): Define ss_family and __ss_family. (struct msghdr): Change type of msg_iovlen to int and type of msg_controllen to socklen_t. --- sysdeps/unix/sysv/linux/mips/bits/socket.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h index ae6832860d..2d6ded905d 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/socket.h +++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h @@ -1,5 +1,5 @@ /* System-specific socket constants and types. Linux/MIPS version. - Copyright (C) 1991,92,94,95,96,97,98,99,2000 Free Software Foundation, Inc. + Copyright (C) 1991,92,1994-1999,2000,2001 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 @@ -157,7 +157,7 @@ struct sockaddr struct sockaddr_storage { - __SOCKADDR_COMMON (__ss_); /* Address family, etc. */ + __SOCKADDR_COMMON (ss_); /* Address family, etc. */ __ss_aligntype __ss_align; /* Force desired alignment. */ char __ss_padding[_SS_PADSIZE]; }; @@ -212,10 +212,10 @@ struct msghdr socklen_t msg_namelen; /* Length of address data. */ struct iovec *msg_iov; /* Vector of data to send/receive into. */ - size_t msg_iovlen; /* Number of elements in the vector. */ + int msg_iovlen; /* Number of elements in the vector. */ void *msg_control; /* Ancillary data (eg BSD filedesc passing). */ - size_t msg_controllen; /* Ancillary data buffer length. */ + socklen_t msg_controllen; /* Ancillary data buffer length. */ int msg_flags; /* Flags on received message. */ }; From 8032f91d4c4a9cc8767c289bdbab7e9a3510ce46 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 27 Jan 2001 22:41:42 +0000 Subject: [PATCH 2430/4487] Liunx/Alpha version of statvfs definitions. --- sysdeps/unix/sysv/linux/alpha/bits/statvfs.h | 96 ++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/statvfs.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/statvfs.h b/sysdeps/unix/sysv/linux/alpha/bits/statvfs.h new file mode 100644 index 0000000000..747dc1ba9f --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/bits/statvfs.h @@ -0,0 +1,96 @@ +/* Copyright (C) 1997, 1998, 2000, 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_STATVFS_H +# error "Never include directly; use instead." +#endif + +#include /* For __fsblkcnt_t and __fsfilcnt_t. */ + +struct statvfs + { + unsigned long int f_bsize; + unsigned long int f_frsize; +#ifndef __USE_FILE_OFFSET64 + __fsblkcnt_t f_blocks; + __fsblkcnt_t f_bfree; + __fsblkcnt_t f_bavail; + __fsfilcnt_t f_files; + __fsfilcnt_t f_ffree; + __fsfilcnt_t f_favail; +#else + __fsblkcnt64_t f_blocks; + __fsblkcnt64_t f_bfree; + __fsblkcnt64_t f_bavail; + __fsfilcnt64_t f_files; + __fsfilcnt64_t f_ffree; + __fsfilcnt64_t f_favail; +#endif + unsigned long int f_fsid; + unsigned long int f_flag; + unsigned long int f_namemax; + int __f_spare[6]; + }; + +#ifdef __USE_LARGEFILE64 +struct statvfs64 + { + unsigned long int f_bsize; + unsigned long int f_frsize; + __fsblkcnt64_t f_blocks; + __fsblkcnt64_t f_bfree; + __fsblkcnt64_t f_bavail; + __fsfilcnt64_t f_files; + __fsfilcnt64_t f_ffree; + __fsfilcnt64_t f_favail; + unsigned long int f_fsid; + unsigned long int f_flag; + unsigned long int f_namemax; + int __f_spare[6]; + }; +#endif + +/* Definitions for the flag in `f_flag'. These definitions should be + kept in sync which the definitions in . */ +enum +{ + ST_RDONLY = 1, /* Mount read-only. */ +#define ST_RDONLY ST_RDONLY + ST_NOSUID = 2, /* Ignore suid and sgid bits. */ +#define ST_NOSUID ST_NOSUID +#ifdef __USE_GNU + ST_NODEV = 4, /* Disallow access to device special files. */ +# define ST_NODEV ST_NODEV + ST_NOEXEC = 8, /* Disallow program execution. */ +# define ST_NOEXEC ST_NOEXEC + ST_SYNCHRONOUS = 16, /* Writes are synced at once. */ +# define ST_SYNCHRONOUS ST_SYNCHRONOUS + ST_MANDLOCK = 64, /* Allow mandatory locks on an FS. */ +# define ST_MANDLOCK ST_MANDLOCK + ST_WRITE = 128, /* Write on file/directory/symlink. */ +# define ST_WRITE ST_WRITE + ST_APPEND = 256, /* Append-only file. */ +# define ST_APPEND ST_APPEND + ST_IMMUTABLE = 512, /* Immutable file. */ +# define ST_IMMUTABLE ST_IMMUTABLE + ST_NOATIME = 1024, /* Do not update access times. */ +# define ST_NOATIME ST_NOATIME + ST_NODIRATIME /* Do not update directory access times. */ +# define ST_NODIRATIME ST_NODIRATIME +#endif /* Use GNU. */ +}; From 4b3d3c61d40368ca4a8c637b357bf040cdd46f0c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 28 Jan 2001 05:37:10 +0000 Subject: [PATCH 2431/4487] Don't define CLK_TCK for XPG6. --- sysdeps/unix/sysv/linux/alpha/bits/time.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/time.h b/sysdeps/unix/sysv/linux/alpha/bits/time.h index 93c01c09c0..e0e0104a34 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/time.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/time.h @@ -1,5 +1,5 @@ /* System-dependent timing definitions. Linux/Alpha version. - Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1996,1997,1998,1999,2000,2001 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 @@ -33,7 +33,7 @@ XSI-conformant systems. */ # define CLOCKS_PER_SEC 1000000l -# ifndef __STRICT_ANSI__ +# if !defined __STRICT_ANSI__ && !defined __USE_XOPEN2K /* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK presents the real value for clock ticks per second for the system. */ # include From e8fcfc26e437cafdc86ec452ec1ee54006418b6f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 31 Jan 2001 06:34:29 +0000 Subject: [PATCH 2432/4487] Include . --- sysdeps/hppa/fpu/fraiseexcpt.c | 1 + sysdeps/m68k/fpu/fraiseexcpt.c | 1 + 2 files changed, 2 insertions(+) diff --git a/sysdeps/hppa/fpu/fraiseexcpt.c b/sysdeps/hppa/fpu/fraiseexcpt.c index 7feeb9946f..c0cce6e7ce 100644 --- a/sysdeps/hppa/fpu/fraiseexcpt.c +++ b/sysdeps/hppa/fpu/fraiseexcpt.c @@ -19,6 +19,7 @@ Boston, MA 02111-1307, USA. */ #include +#include #include int diff --git a/sysdeps/m68k/fpu/fraiseexcpt.c b/sysdeps/m68k/fpu/fraiseexcpt.c index dcdd6c9131..1c559c2b26 100644 --- a/sysdeps/m68k/fpu/fraiseexcpt.c +++ b/sysdeps/m68k/fpu/fraiseexcpt.c @@ -19,6 +19,7 @@ Boston, MA 02111-1307, USA. */ #include +#include #include int From 77e906bb3aa714c8580cf0c871d651f20c50891b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 3 Feb 2001 17:04:37 +0000 Subject: [PATCH 2433/4487] File was using crlf. --- sysdeps/unix/sysv/linux/arm/sys/ucontext.h | 188 ++++++++++----------- 1 file changed, 94 insertions(+), 94 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/sys/ucontext.h b/sysdeps/unix/sysv/linux/arm/sys/ucontext.h index 6e51efec99..f33d8639a1 100644 --- a/sysdeps/unix/sysv/linux/arm/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/arm/sys/ucontext.h @@ -1,94 +1,94 @@ -/* Copyright (C) 1998, 1999 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* System V/ARM ABI compliant context switching support. */ - -#ifndef _SYS_UCONTEXT_H -#define _SYS_UCONTEXT_H 1 - -#include -#include -#include - -typedef int greg_t; - -/* Number of general registers. */ -#define NGREG 16 - -/* Container for all general registers. */ -typedef elf_gregset_t gregset_t; - -/* Number of each register is the `gregset_t' array. */ -enum -{ - R0 = 0, -#define R0 R0 - R1 = 1, -#define R1 R1 - R2 = 2, -#define R2 R2 - R3 = 3, -#define R3 R3 - R4 = 4, -#define R4 R4 - R5 = 5, -#define R5 R5 - R6 = 6, -#define R6 R6 - R7 = 7, -#define R7 R7 - R8 = 8, -#define R8 R8 - R9 = 9, -#define R9 R9 - R10 = 10, -#define R10 R10 - R11 = 11, -#define R11 R11 - R12 = 12, -#define R12 R12 - R13 = 13, -#define R13 R13 - R14 = 14, -#define R14 R14 - R15 = 15, -#define R15 R15 -}; - -/* Structure to describe FPU registers. */ -typedef elf_fpregset_t fpregset_t; - -/* Context to describe whole processor state. */ -typedef struct - { - gregset_t gregs; - fpregset_t fpregs; - } mcontext_t; - -/* Userlevel context. */ -typedef struct ucontext - { - unsigned long int uc_flags; - struct ucontext *uc_link; - __sigset_t uc_sigmask; - stack_t uc_stack; - mcontext_t uc_mcontext; - long int uc_filler[5]; - } ucontext_t; - -#endif /* sys/ucontext.h */ +/* Copyright (C) 1998, 1999, 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* System V/ARM ABI compliant context switching support. */ + +#ifndef _SYS_UCONTEXT_H +#define _SYS_UCONTEXT_H 1 + +#include +#include +#include + +typedef int greg_t; + +/* Number of general registers. */ +#define NGREG 16 + +/* Container for all general registers. */ +typedef elf_gregset_t gregset_t; + +/* Number of each register is the `gregset_t' array. */ +enum +{ + R0 = 0, +#define R0 R0 + R1 = 1, +#define R1 R1 + R2 = 2, +#define R2 R2 + R3 = 3, +#define R3 R3 + R4 = 4, +#define R4 R4 + R5 = 5, +#define R5 R5 + R6 = 6, +#define R6 R6 + R7 = 7, +#define R7 R7 + R8 = 8, +#define R8 R8 + R9 = 9, +#define R9 R9 + R10 = 10, +#define R10 R10 + R11 = 11, +#define R11 R11 + R12 = 12, +#define R12 R12 + R13 = 13, +#define R13 R13 + R14 = 14, +#define R14 R14 + R15 = 15, +#define R15 R15 +}; + +/* Structure to describe FPU registers. */ +typedef elf_fpregset_t fpregset_t; + +/* Context to describe whole processor state. */ +typedef struct + { + gregset_t gregs; + fpregset_t fpregs; + } mcontext_t; + +/* Userlevel context. */ +typedef struct ucontext + { + unsigned long int uc_flags; + struct ucontext *uc_link; + __sigset_t uc_sigmask; + stack_t uc_stack; + mcontext_t uc_mcontext; + long int uc_filler[5]; + } ucontext_t; + +#endif /* sys/ucontext.h */ From 1ed6488cdb8fbdfd0b00e237e234b778cdd1aa7d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 3 Feb 2001 17:05:56 +0000 Subject: [PATCH 2434/4487] Remove comma at end of enum. --- sysdeps/unix/sysv/linux/arm/sys/ucontext.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/arm/sys/ucontext.h b/sysdeps/unix/sysv/linux/arm/sys/ucontext.h index f33d8639a1..b858cf8c61 100644 --- a/sysdeps/unix/sysv/linux/arm/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/arm/sys/ucontext.h @@ -66,7 +66,7 @@ enum #define R13 R13 R14 = 14, #define R14 R14 - R15 = 15, + R15 = 15 #define R15 R15 }; From b8f7c6f761f47c68d757a211505827020c71c4f9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 5 Feb 2001 05:59:49 +0000 Subject: [PATCH 2435/4487] (elf_machine_rel): Correct handling of PC24 relocs with negative value. --- sysdeps/arm/dl-machine.h | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 9b40e6f98b..36ae4cf47c 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -478,17 +478,25 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, case R_ARM_PC24: { Elf32_Sword addend; - Elf32_Addr newvalue; + Elf32_Addr newvalue, topbits; addend = *reloc_addr & 0x00ffffff; if (addend & 0x00800000) addend |= 0xff000000; newvalue = value - (Elf32_Addr)reloc_addr + (addend << 2); - if (newvalue & 0xfc000003) - newvalue = fix_bad_pc24(reloc_addr, value) - - (Elf32_Addr)reloc_addr + (addend << 2); - - newvalue = newvalue >> 2; + topbits = newvalue & 0xfe000000; + if (topbits != 0xfe000000 && topbits != 0x00000000) + { + newvalue = fix_bad_pc24(reloc_addr, value) + - (Elf32_Addr)reloc_addr + (addend << 2); + topbits = newvalue & 0xfe000000; + if (topbits != 0xfe000000 && topbits != 0x00000000) + { + _dl_signal_error (0, map->l_name, + "R_ARM_PC24 relocation out of range"); + } + } + newvalue >>= 2; value = (*reloc_addr & 0xff000000) | (newvalue & 0x00ffffff); *reloc_addr = value; } From b72a1aa920f3a62e51bb553d4d569ab3800a2c85 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 7 Feb 2001 18:20:36 +0000 Subject: [PATCH 2436/4487] Honour __NO_MATH_INLINES. --- sysdeps/alpha/fpu/bits/mathinline.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h index 065009c626..b7d5c3c95e 100644 --- a/sysdeps/alpha/fpu/bits/mathinline.h +++ b/sysdeps/alpha/fpu/bits/mathinline.h @@ -1,5 +1,5 @@ /* Inline math functions for Alpha. - Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger-Tang. @@ -58,6 +58,8 @@ !isunordered(__x, __y) && __x != __y; })) #endif /* ISO C99 */ +#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__ + #define __inline_copysign(NAME, TYPE) \ __MATH_INLINE TYPE \ NAME (TYPE __x, TYPE __y) __THROW \ @@ -174,4 +176,6 @@ __MATH_INLINE double fdim (double __x, double __y) __THROW return __x < __y ? 0.0 : __x - __y; } -#endif +#endif /* C99 */ + +#endif /* __NO_MATH_INLINES */ From d335db0ecc328e77648d0f3867e86e957297a868 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 7 Feb 2001 19:18:58 +0000 Subject: [PATCH 2437/4487] Add missing word alignment. --- sysdeps/alpha/alphaev67/strncat.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/alphaev67/strncat.S b/sysdeps/alpha/alphaev67/strncat.S index 31ca19d299..4e16f83824 100644 --- a/sysdeps/alpha/alphaev67/strncat.S +++ b/sysdeps/alpha/alphaev67/strncat.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2001 Free Software Foundation, Inc. Contributed by Richard Henderson , 1996. EV67 optimized by Rick Gorton . @@ -66,7 +66,7 @@ $found: cttz t1, t2 # U0 : /* Worry about the null termination. */ cttz t10, t2 # U0: byte offset of end-of-count. - nop # E : + bic a0, 7, a0 # E : word align the last write address. zapnot t0, t8, t1 # U : was last byte a null? nop # E : From 5f5831bee52f6b66d0832c94ec1a22eb6f714e76 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 9 Feb 2001 05:27:14 +0000 Subject: [PATCH 2438/4487] Alpha ev67 optimized implementation for strrchr. --- sysdeps/alpha/alphaev67/strrchr.S | 117 ++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 sysdeps/alpha/alphaev67/strrchr.S diff --git a/sysdeps/alpha/alphaev67/strrchr.S b/sysdeps/alpha/alphaev67/strrchr.S new file mode 100644 index 0000000000..68874c966e --- /dev/null +++ b/sysdeps/alpha/alphaev67/strrchr.S @@ -0,0 +1,117 @@ +/* Copyright (C) 2000 Free Software Foundation, Inc. + EV67 optimized by Rick Gorton . + + 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* Return the address of the last occurrence of a given character + within a null-terminated string, or null if it is not found. */ + +#include + + .arch ev6 + .set noreorder + .set noat + +ENTRY(strrchr) +#ifdef PROF + ldgp gp, 0(pv) + lda AT, _mcount + jsr AT, (AT), _mcount + .prologue 1 +#else + .prologue 0 +#endif + + and a1, 0xff, t2 # E : 00000000000000ch + insbl a1, 1, t4 # U : 000000000000ch00 + insbl a1, 2, t5 # U : 0000000000ch0000 + ldq_u t0, 0(a0) # L : load first quadword Latency=3 + + mov zero, t6 # E : t6 is last match aligned addr + or t2, t4, a1 # E : 000000000000chch + sll t5, 8, t3 # U : 00000000ch000000 + mov zero, t8 # E : t8 is last match byte compare mask + + andnot a0, 7, v0 # E : align source addr + or t5, t3, t3 # E : 00000000chch0000 + sll a1, 32, t2 # U : 0000chch00000000 + sll a1, 48, t4 # U : chch000000000000 + + or t4, a1, a1 # E : chch00000000chch + or t2, t3, t2 # E : 0000chchchch0000 + or a1, t2, a1 # E : chchchchchchchch + lda t5, -1 # E : build garbage mask + + cmpbge zero, t0, t1 # E : bits set iff byte == zero + mskqh t5, a0, t4 # E : Complete garbage mask + xor t0, a1, t2 # E : make bytes == c zero + cmpbge zero, t4, t4 # E : bits set iff byte is garbage + + cmpbge zero, t2, t3 # E : bits set iff byte == c + andnot t1, t4, t1 # E : clear garbage from null test + andnot t3, t4, t3 # E : clear garbage from char test + bne t1, $eos # U : did we already hit the terminator? + + /* Character search main loop */ +$loop: + ldq t0, 8(v0) # L : load next quadword + cmovne t3, v0, t6 # E : save previous comparisons match + nop # : Latency=2, extra map slot (keep nop with cmov) + nop + + cmovne t3, t3, t8 # E : Latency=2, extra map slot + nop # : keep with cmovne + addq v0, 8, v0 # E : + xor t0, a1, t2 # E : + + cmpbge zero, t0, t1 # E : bits set iff byte == zero + cmpbge zero, t2, t3 # E : bits set iff byte == c + beq t1, $loop # U : if we havnt seen a null, loop + nop + + /* Mask out character matches after terminator */ +$eos: + negq t1, t4 # E : isolate first null byte match + and t1, t4, t4 # E : + subq t4, 1, t5 # E : build a mask of the bytes upto... + or t4, t5, t4 # E : ... and including the null + + and t3, t4, t3 # E : mask out char matches after null + cmovne t3, t3, t8 # E : save it, if match found Latency=2, extra map slot + nop # : Keep with cmovne + nop + + cmovne t3, v0, t6 # E : + nop # : Keep with cmovne + /* Locate the address of the last matched character */ + ctlz t8, t2 # U0 : Latency=3 (0x40 for t8=0) + nop + + cmoveq t8, 0x3f, t2 # E : Compensate for case when no match is seen + nop # E : hide the cmov latency (2) behind ctlz latency + lda t5, 0x3f($31) # E : + subq t5, t2, t5 # E : Normalize leading zero count + + addq t6, t5, v0 # E : and add to quadword address + ret # L0 : Latency=3 + nop + nop + +END(strrchr) + +weak_alias (strrchr, rindex) From 6a0148d1cfea32ebbe1fedc98d71ba38286f634e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 9 Feb 2001 05:27:34 +0000 Subject: [PATCH 2439/4487] Little optimization. --- sysdeps/alpha/strrchr.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/alpha/strrchr.S b/sysdeps/alpha/strrchr.S index 9997961c60..0faa8cc55f 100644 --- a/sysdeps/alpha/strrchr.S +++ b/sysdeps/alpha/strrchr.S @@ -39,7 +39,7 @@ ENTRY(strrchr) .prologue 0 #endif - zapnot a1, 1, a1 # e0 : zero extend our test character + and a1, 0xff, a1 # e0 : zero extend our test character mov zero, t6 # .. e1 : t6 is last match aligned addr sll a1, 8, t5 # e0 : replicate our test character mov zero, t7 # .. e1 : t7 is last match byte compare mask From 305f83de532e095bf6f2caf57f6a3b30209974d0 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 13 Feb 2001 22:09:09 +0000 Subject: [PATCH 2440/4487] Define __ftruncate64 and make old name a weak alias. --- sysdeps/unix/sysv/aix/ftruncate64.c | 5 +++-- sysdeps/unix/sysv/linux/mips/ftruncate64.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/aix/ftruncate64.c b/sysdeps/unix/sysv/aix/ftruncate64.c index 56a5ed58c1..f2c1578a18 100644 --- a/sysdeps/unix/sysv/aix/ftruncate64.c +++ b/sysdeps/unix/sysv/aix/ftruncate64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2001 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 @@ -21,7 +21,8 @@ extern int kftruncate (int fd, long long int length); int -ftruncate64 (int fd, off64_t length) +__ftruncate64 (int fd, off64_t length) { return kftruncate (fd, length); } +weak_alias (__ftruncate64, ftruncate64) diff --git a/sysdeps/unix/sysv/linux/mips/ftruncate64.c b/sysdeps/unix/sysv/linux/mips/ftruncate64.c index e45afbad7d..bc03e0c550 100644 --- a/sysdeps/unix/sysv/linux/mips/ftruncate64.c +++ b/sysdeps/unix/sysv/linux/mips/ftruncate64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999, 2000, 2001 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 @@ -39,7 +39,7 @@ extern int __syscall_ftruncate64 (int fd, int dummy, int high_length, /* Truncate the file FD refers to to LENGTH bytes. */ int -ftruncate64 (int fd, off64_t length) +__ftruncate64 (int fd, off64_t length) { #ifndef __ASSUME_TRUNCATE64_SYSCALL if (! __have_no_truncate64) @@ -72,6 +72,7 @@ ftruncate64 (int fd, off64_t length) return __ftruncate (fd, (off_t) length); #endif } +weak_alias (__ftruncate64, ftruncate64) #else /* Use the generic implementation. */ From ca50de95e84f52bddca21db0708410d8087a9159 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 16 Feb 2001 13:40:22 +0000 Subject: [PATCH 2441/4487] Correctly handle m68k long double format. --- sysdeps/m68k/fpu/s_fpclassifyl.c | 43 ++++++++++++ sysdeps/m68k/fpu/s_nextafterl.c | 109 +++++++++++++++++++++++++++++++ 2 files changed, 152 insertions(+) create mode 100644 sysdeps/m68k/fpu/s_fpclassifyl.c create mode 100644 sysdeps/m68k/fpu/s_nextafterl.c diff --git a/sysdeps/m68k/fpu/s_fpclassifyl.c b/sysdeps/m68k/fpu/s_fpclassifyl.c new file mode 100644 index 0000000000..74aa720813 --- /dev/null +++ b/sysdeps/m68k/fpu/s_fpclassifyl.c @@ -0,0 +1,43 @@ +/* Return classification value corresponding to argument. m68k version. + Copyright (C) 1997,2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1997. + Fixed for m68k by Andreas Schwab . + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +#include "math_private.h" + + +int +__fpclassifyl (long double x) +{ + u_int32_t ex, hx, lx; + int retval = FP_NORMAL; + + GET_LDOUBLE_WORDS (ex, hx, lx, x); + ex &= 0x7fff; + if ((ex | hx | lx) == 0) + retval = FP_ZERO; + else if (ex == 0 && (hx & 0x80000000) == 0) + retval = FP_SUBNORMAL; + else if (ex == 0x7fff) + retval = ((hx & 0x7fffffff) | lx) != 0 ? FP_NAN : FP_INFINITE; + + return retval; +} diff --git a/sysdeps/m68k/fpu/s_nextafterl.c b/sysdeps/m68k/fpu/s_nextafterl.c new file mode 100644 index 0000000000..70ab5a4784 --- /dev/null +++ b/sysdeps/m68k/fpu/s_nextafterl.c @@ -0,0 +1,109 @@ +/* s_nextafterl.c -- long double version of s_nextafter.c. + * Conversion to long double by Ulrich Drepper, + * Cygnus Support, drepper@cygnus.com. + * Fixed for m68k by Andreas Schwab . + */ + +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +#if defined(LIBM_SCCS) && !defined(lint) +static char rcsid[] = "$NetBSD: $"; +#endif + +/* IEEE functions + * nextafterl(x,y) + * return the next machine floating-point number of x in the + * direction toward y. + * Special cases: + */ + +#include "math.h" +#include "math_private.h" + +#ifdef __STDC__ + long double __nextafterl(long double x, long double y) +#else + long double __nextafterl(x,y) + long double x,y; +#endif +{ + int32_t ix,iy,esx,esy; + u_int32_t hx,hy,lx,ly; + + GET_LDOUBLE_WORDS(esx,hx,lx,x); + GET_LDOUBLE_WORDS(esy,hy,ly,y); + ix = esx&0x7fff; /* |x| */ + iy = esy&0x7fff; /* |y| */ + + if(((ix==0x7fff)&&((hx&0x7fffffff)|lx)!=0) || /* x is nan */ + ((iy==0x7fff)&&((hy&0x7fffffff)|ly)!=0)) /* y is nan */ + return x+y; + if(x==y) return y; /* x=y, return y */ + if((ix|hx|lx)==0) { /* x == 0 */ + SET_LDOUBLE_WORDS(x,esy&0x8000,0,1);/* return +-minsubnormal */ + y = x*x; + if(y==x) return y; else return x; /* raise underflow flag */ + } + if(esx>=0) { /* x > 0 */ + if(esx>esy||((esx==esy) && (hx>hy||((hx==hy)&&(lx>ly))))) { + /* x > y, x -= ulp */ + if(lx==0) { + if (ix != 0 && hx == 0x80000000) hx = 0; + if (hx==0) esx -= 1; + hx -= 1; + } + lx -= 1; + } else { /* x < y, x += ulp */ + lx += 1; + if(lx==0) { + hx += 1; + if (hx==0) { + hx = 0x80000000; + esx += 1; + } + } + } + } else { /* x < 0 */ + if(esy>=0||esx>esy||((esx==esy) && (hx>hy||((hx==hy)&&(lx>ly))))){ + /* x < y, x -= ulp */ + if(lx==0) { + if (ix != 0 && hx == 0x80000000) hx = 0; + if (hx==0) esx -= 1; + hx -= 1; + } + lx -= 1; + } else { /* x > y, x += ulp */ + lx += 1; + if(lx==0) { + hx += 1; + if (hx==0) { + hx = 0x80000000; + esx += 1; + } + } + } + } + esy = esx&0x7fff; + if(esy==0x7fff) return x+x; /* overflow */ + if(esy==0 && (hx & 0x80000000) == 0) { /* underflow */ + y = x*x; + if(y!=x) { /* raise underflow flag */ + SET_LDOUBLE_WORDS(y,esx,hx,lx); + return y; + } + } + SET_LDOUBLE_WORDS(x,esx,hx,lx); + return x; +} +weak_alias (__nextafterl, nextafterl) +strong_alias (__nextafterl, __nexttowardl) +weak_alias (__nextafterl, nexttowardl) From 84a29bc1f548197a4c8c8ec05a21e5fcd5e5e66c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 16 Feb 2001 18:12:10 +0000 Subject: [PATCH 2442/4487] (ftruncate): Add __ftruncate64 alias. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index f695145dfa..651398c9d2 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -26,7 +26,7 @@ fstatfs - fstatfs 2 __fstatfs fstatfs __fstatfs64 fstatfs64 statfs - statfs 2 __statfs statfs statfs64 getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64 setrlimit - setrlimit 2 __setrlimit setrlimit64 setrlimit -ftruncate - ftruncate 2 __ftruncate ftruncate ftruncate64 +ftruncate - ftruncate 2 __ftruncate ftruncate __ftruncate64 ftruncate64 truncate - truncate 2 truncate truncate64 # these are actually common with the x86: From 00ec1b7df91a5999aa132719fd058b7aed90d86f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 17 Feb 2001 16:46:12 +0000 Subject: [PATCH 2443/4487] Renamed to e_exp2. --- sysdeps/m68k/fpu/s_exp2.c | 2 -- sysdeps/m68k/fpu/s_exp2f.c | 2 -- sysdeps/m68k/fpu/s_exp2l.c | 2 -- 3 files changed, 6 deletions(-) delete mode 100644 sysdeps/m68k/fpu/s_exp2.c delete mode 100644 sysdeps/m68k/fpu/s_exp2f.c delete mode 100644 sysdeps/m68k/fpu/s_exp2l.c diff --git a/sysdeps/m68k/fpu/s_exp2.c b/sysdeps/m68k/fpu/s_exp2.c deleted file mode 100644 index 24fac4fce6..0000000000 --- a/sysdeps/m68k/fpu/s_exp2.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC __ieee754_exp2 -#include diff --git a/sysdeps/m68k/fpu/s_exp2f.c b/sysdeps/m68k/fpu/s_exp2f.c deleted file mode 100644 index 593842e4e5..0000000000 --- a/sysdeps/m68k/fpu/s_exp2f.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC __ieee754_exp2f -#include diff --git a/sysdeps/m68k/fpu/s_exp2l.c b/sysdeps/m68k/fpu/s_exp2l.c deleted file mode 100644 index 0ab2a428c0..0000000000 --- a/sysdeps/m68k/fpu/s_exp2l.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC __ieee754_exp2l -#include From f1ba5c30fc2bca08828435d005c004352a807405 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 17 Feb 2001 16:49:17 +0000 Subject: [PATCH 2444/4487] m68k exp2 implementation. --- sysdeps/m68k/fpu/e_exp2.c | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sysdeps/m68k/fpu/e_exp2.c diff --git a/sysdeps/m68k/fpu/e_exp2.c b/sysdeps/m68k/fpu/e_exp2.c new file mode 100644 index 0000000000..24fac4fce6 --- /dev/null +++ b/sysdeps/m68k/fpu/e_exp2.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_exp2 +#include From c79b4fded19f55fa35631fb02fa9b7e574949991 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 17 Feb 2001 16:49:28 +0000 Subject: [PATCH 2445/4487] m68k exp2f implementation. --- sysdeps/m68k/fpu/e_exp2f.c | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sysdeps/m68k/fpu/e_exp2f.c diff --git a/sysdeps/m68k/fpu/e_exp2f.c b/sysdeps/m68k/fpu/e_exp2f.c new file mode 100644 index 0000000000..593842e4e5 --- /dev/null +++ b/sysdeps/m68k/fpu/e_exp2f.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_exp2f +#include From 191b842dfe7931a9c74348ffa6684846ff5884ea Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 17 Feb 2001 16:49:41 +0000 Subject: [PATCH 2446/4487] m68k exp2l implementation. --- sysdeps/m68k/fpu/e_exp2l.c | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sysdeps/m68k/fpu/e_exp2l.c diff --git a/sysdeps/m68k/fpu/e_exp2l.c b/sysdeps/m68k/fpu/e_exp2l.c new file mode 100644 index 0000000000..0ab2a428c0 --- /dev/null +++ b/sysdeps/m68k/fpu/e_exp2l.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_exp2l +#include From e33c3af9cbf70192b8f185cfa84ba1e98deab50a Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 22 Feb 2001 08:27:50 +0000 Subject: [PATCH 2447/4487] * sysdeps/mips/bsd-_setjmp.S (_setjmp): Reorder instructions to avoid problems on MIPS I. * sysdeps/mips/bsd-setjmp.S (setjmp): Likewise. * sysdeps/mips/dl-machine.h (RTLD_START): Remove duplicate ".set noreorder". --- sysdeps/mips/bsd-_setjmp.S | 8 +++++--- sysdeps/mips/bsd-setjmp.S | 6 ++++-- sysdeps/mips/dl-machine.h | 1 - 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/sysdeps/mips/bsd-_setjmp.S b/sysdeps/mips/bsd-_setjmp.S index bf7cb159fa..919c8a28f8 100644 --- a/sysdeps/mips/bsd-_setjmp.S +++ b/sysdeps/mips/bsd-_setjmp.S @@ -27,14 +27,16 @@ .option pic2 #endif ENTRY (_setjmp) - .set noreorder #ifdef __PIC__ + .set noreorder .cpload t9 + .set reorder la t9, C_SYMBOL_NAME (__sigsetjmp) +#endif + move a1,zero /* Pass a second argument of zero. */ +#ifdef __PIC__ jr t9 #else j C_SYMBOL_NAME (__sigsetjmp) #endif - move a1,zero /* Pass a second argument of zero. */ - .set reorder .end _setjmp diff --git a/sysdeps/mips/bsd-setjmp.S b/sysdeps/mips/bsd-setjmp.S index bab312b0df..66a0daa23e 100644 --- a/sysdeps/mips/bsd-setjmp.S +++ b/sysdeps/mips/bsd-setjmp.S @@ -30,11 +30,13 @@ ENTRY (setjmp) .set noreorder #ifdef __PIC__ .cpload t9 + .set reorder la t9, C_SYMBOL_NAME (__sigsetjmp) +#endif + li a1, 1 /* Pass a second argument of one. */ +#ifdef __PIC__ jr t9 #else j C_SYMBOL_NAME (__sigsetjmp) #endif - li a1, 1 /* Pass a second argument of one. */ - .set reorder .end setjmp diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index cd8ee3c0e1..6a7d66c5b3 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -412,7 +412,6 @@ _dl_runtime_resolve:\n \ ".text\n"\ _RTLD_PROLOGUE(ENTRY_POINT)\ ".set noreorder\n\ - .set noreorder\n\ bltzal $0, 0f\n\ nop\n\ 0: .cpload $31\n\ From 70f970dfee211301b7e2efa03e9f7801215ba88a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 23 Feb 2001 20:15:23 +0000 Subject: [PATCH 2448/4487] [$(subdir) == misc] (sysdep_routines): Remove restf.S and savef.S. --- sysdeps/unix/sysv/aix/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/aix/Makefile b/sysdeps/unix/sysv/aix/Makefile index 6c9ce1113e..9aa48d1680 100644 --- a/sysdeps/unix/sysv/aix/Makefile +++ b/sysdeps/unix/sysv/aix/Makefile @@ -6,7 +6,7 @@ static-start-installed-name = /usr/lib/crt0.o ifeq ($(subdir),misc) -sysdep_routines += dl-open dl-sym dl-close restf savef uitrunc +sysdep_routines += dl-open dl-sym dl-close uitrunc endif ifeq ($(subdir),login) From 76b92c87ab7dd6668e8a182448897cc3c0803616 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 23 Feb 2001 20:15:49 +0000 Subject: [PATCH 2449/4487] Remove restf.S and savef.S. --- sysdeps/unix/sysv/aix/Dist | 2 -- 1 file changed, 2 deletions(-) diff --git a/sysdeps/unix/sysv/aix/Dist b/sysdeps/unix/sysv/aix/Dist index bce7330830..0482d24d38 100644 --- a/sysdeps/unix/sysv/aix/Dist +++ b/sysdeps/unix/sysv/aix/Dist @@ -5,5 +5,3 @@ kernel_proto.h bits/utmpx.h gnu/lib-names.h uitrunc.c -savef.S -restf.S From 8cc9fd41c375e3bc6f5d347aa54140192dc6c6aa Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 23 Feb 2001 20:16:31 +0000 Subject: [PATCH 2450/4487] Not needed anymore. --- sysdeps/unix/sysv/aix/restf.S | 58 ----------------------------------- sysdeps/unix/sysv/aix/savef.S | 58 ----------------------------------- 2 files changed, 116 deletions(-) delete mode 100644 sysdeps/unix/sysv/aix/restf.S delete mode 100644 sysdeps/unix/sysv/aix/savef.S diff --git a/sysdeps/unix/sysv/aix/restf.S b/sysdeps/unix/sysv/aix/restf.S deleted file mode 100644 index 049627e5c4..0000000000 --- a/sysdeps/unix/sysv/aix/restf.S +++ /dev/null @@ -1,58 +0,0 @@ -/* Copyright (C) 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 - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include - -ENTRY(_restf_all) - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf14) -C_TEXT(_restf14): lfd fp14,-144(r11) - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf15) -C_TEXT(_restf15): lfd fp15,-136(r11) - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf16) -C_TEXT(_restf16): lfd fp16,-128(r11) - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf17) -C_TEXT(_restf17): lfd fp17,-120(r11) - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf18) -C_TEXT(_restf18): lfd fp18,-112(r11) - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf19) -C_TEXT(_restf19): lfd fp19,-104(r11) - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf20) -C_TEXT(_restf20): lfd fp20,-96(r11) - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf21) -C_TEXT(_restf21): lfd fp21,-88(r11) - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf22) -C_TEXT(_restf22): lfd fp22,-80(r11) - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf23) -C_TEXT(_restf23): lfd fp23,-72(r11) - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf24) -C_TEXT(_restf24): lfd fp24,-64(r11) - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf25) -C_TEXT(_restf25): lfd fp25,-56(r11) - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf26) -C_TEXT(_restf26): lfd fp26,-48(r11) - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf27) -C_TEXT(_restf27): lfd fp27,-40(r11) - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf28) -C_TEXT(_restf28): lfd fp28,-32(r11) - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf29) -C_TEXT(_restf29): lfd fp29,-24(r11) - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf30) -C_TEXT(_restf30): lfd fp30,-16(r11) - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf31) -C_TEXT(_restf31): lfd fp31,-8(r11) - blr diff --git a/sysdeps/unix/sysv/aix/savef.S b/sysdeps/unix/sysv/aix/savef.S deleted file mode 100644 index 4c10d6ec85..0000000000 --- a/sysdeps/unix/sysv/aix/savef.S +++ /dev/null @@ -1,58 +0,0 @@ -/* Copyright (C) 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 - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include - -ENTRY(_savef_all) - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef14) -C_TEXT(_savef14): stfd fp14,-144(r11) - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef15) -C_TEXT(_savef15): stfd fp15,-136(r11) - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef16) -C_TEXT(_savef16): stfd fp16,-128(r11) - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef17) -C_TEXT(_savef17): stfd fp17,-120(r11) - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef18) -C_TEXT(_savef18): stfd fp18,-112(r11) - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef19) -C_TEXT(_savef19): stfd fp19,-104(r11) - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef20) -C_TEXT(_savef20): stfd fp20,-96(r11) - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef21) -C_TEXT(_savef21): stfd fp21,-88(r11) - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef22) -C_TEXT(_savef22): stfd fp22,-80(r11) - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef23) -C_TEXT(_savef23): stfd fp23,-72(r11) - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef24) -C_TEXT(_savef24): stfd fp24,-64(r11) - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef25) -C_TEXT(_savef25): stfd fp25,-56(r11) - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef26) -C_TEXT(_savef26): stfd fp26,-48(r11) - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef27) -C_TEXT(_savef27): stfd fp27,-40(r11) - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef28) -C_TEXT(_savef28): stfd fp28,-32(r11) - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef29) -C_TEXT(_savef29): stfd fp29,-24(r11) - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef30) -C_TEXT(_savef30): stfd fp30,-16(r11) - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef31) -C_TEXT(_savef31): stfd fp31,-8(r11) - blr From dcab999777898a50c3e567449d27f8e166e7b100 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 23 Feb 2001 20:24:20 +0000 Subject: [PATCH 2451/4487] Define __need_NULL before including . --- sysdeps/unix/sysv/aix/bits/types.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/aix/bits/types.h b/sysdeps/unix/sysv/aix/bits/types.h index cd57291051..df75454af1 100644 --- a/sysdeps/unix/sysv/aix/bits/types.h +++ b/sysdeps/unix/sysv/aix/bits/types.h @@ -25,6 +25,7 @@ #include +#define __need_NULL #define __need_size_t #include From 5f1644d26e6406bffb52f8c93fb8883773e861e9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 23 Feb 2001 20:24:40 +0000 Subject: [PATCH 2452/4487] Define alias __libc_write. --- sysdeps/unix/sysv/aix/write.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/aix/write.c b/sysdeps/unix/sysv/aix/write.c index c872e04810..82c2bf6861 100644 --- a/sysdeps/unix/sysv/aix/write.c +++ b/sysdeps/unix/sysv/aix/write.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1999. @@ -32,3 +32,4 @@ __write (fd, ptr, n) } /* AIX has no weak aliases (yet) but let's hope for better times. */ weak_alias (__write, write) +strong_alias (__write, __libc_write) From 773b640096dc53e9052ee2385bb82687d6dd485f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 28 Feb 2001 06:35:24 +0000 Subject: [PATCH 2453/4487] Replace use of old output functions with the new ones. --- sysdeps/arm/dl-machine.h | 10 +++++----- sysdeps/hppa/dl-machine.h | 10 +++++----- sysdeps/m68k/dl-machine.h | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 36ae4cf47c..75c37c59ac 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. ARM version. - Copyright (C) 1995,96,97,98,99,2000 Free Software Foundation, Inc. + Copyright (C) 1995,96,97,98,99,2000,2001 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 @@ -436,10 +436,10 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, const char *strtab; strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]); - _dl_sysdep_error (_dl_argv[0] ?: "", - ": Symbol `", strtab + refsym->st_name, - "' has different size in shared object, " - "consider re-linking\n", NULL); + _dl_error_printf ("\ +%s: Symbol `%s' has different size in shared object, consider re-linking\n", + _dl_argv[0] ?: "", + strtab + refsym->st_name); } memcpy (reloc_addr, (void *) value, MIN (sym->st_size, refsym->st_size)); diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h index 89ad542cdd..f8a8e7bcee 100644 --- a/sysdeps/hppa/dl-machine.h +++ b/sysdeps/hppa/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. PA-RISC version. - Copyright (C) 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1995,1996,1997,1999,2000,2001 Free Software Foundation, Inc. Contributed by David Huggins-Daines This file is part of the GNU C Library. @@ -575,10 +575,10 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, const char *strtab; strtab = (const char *) D_PTR (map, l_info[DT_STRTAB]); - _dl_sysdep_error (_dl_argv[0] ?: "", - ": Symbol `", strtab + refsym->st_name, - "' has different size in shared object, " - "consider re-linking\n", NULL); + _dl_error_printf ("\ +%s: Symbol `%s' has different size in shared object, consider re-linking\n", + _dl_argv[0] ?: "", + strtab + refsym->st_name); } memcpy (reloc_addr, (void *) value, MIN (sym->st_size, refsym->st_size)); diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index 3381d6f25e..e2a12cb03a 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. m68k version. - Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1996,1997,1998,1999,2000,2001 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 @@ -255,10 +255,10 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, const char *strtab; strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]); - _dl_sysdep_error (_dl_argv[0] ?: "", - ": Symbol `", strtab + refsym->st_name, - "' has different size in shared object, " - "consider re-linking\n", NULL); + _dl_error_printf ("\ +%s: Symbol `%s' has different size in shared object, consider re-linking\n", + _dl_argv[0] ?: "", + strtab + refsym->st_name); } memcpy (reloc_addr, (void *) value, MIN (sym->st_size, refsym->st_size)); From cb8023f9389a8311dff4917b0496a5a34aa1c3c3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 28 Feb 2001 15:23:48 +0000 Subject: [PATCH 2454/4487] (elf_machine_rela): Don't handle relocations which are not in ld.so if RTLD_BOOTSTRAP is defined. --- sysdeps/alpha/dl-machine.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 73c6cbde19..5a17ca230d 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. Alpha version. - Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson . @@ -500,8 +500,10 @@ elf_machine_rela (struct link_map *map, memcpy (reloc_addr_1, &reloc_addr_val, 8); } } +#ifndef RTLD_BOOTSTRAP else if (r_type == R_ALPHA_NONE) return; +#endif else { Elf64_Addr loadbase, sym_value; @@ -512,8 +514,9 @@ elf_machine_rela (struct link_map *map, if (r_type == R_ALPHA_GLOB_DAT) *reloc_addr = sym_value; - else if (r_type == R_ALPHA_JMP_SLOT) + else if (r_type == R_ALPHA_JMP_SLOT) elf_machine_fixup_plt (map, 0, reloc, reloc_addr, sym_value); +#ifndef RTLD_BOOTSTRAP else if (r_type == R_ALPHA_REFQUAD) { void *reloc_addr_1 = reloc_addr; @@ -522,7 +525,6 @@ elf_machine_rela (struct link_map *map, /* Load value without causing unaligned trap. */ memcpy (&reloc_addr_val, reloc_addr_1, 8); sym_value += reloc_addr_val; -#ifndef RTLD_BOOTSTRAP if (map == &_dl_rtld_map) { /* Undo the relocation done here during bootstrapping. @@ -536,10 +538,10 @@ elf_machine_rela (struct link_map *map, sym_value -= dlsymtab[ELF64_R_SYM(reloc->r_info)].st_value; sym_value -= reloc->r_addend; } -#endif /* Store value without causing unaligned trap. */ memcpy (reloc_addr_1, &sym_value, 8); } +#endif else _dl_reloc_bad_type (map, r_type, 0); } From abb2a703aac48691fca21f0366f754a9e769cf4c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 3 Mar 2001 18:15:33 +0000 Subject: [PATCH 2455/4487] Allow __need_sigevent_t being defined and provide only that definition. --- sysdeps/unix/sysv/linux/alpha/bits/siginfo.h | 18 +++++++++++++----- sysdeps/unix/sysv/linux/mips/bits/siginfo.h | 18 +++++++++++++----- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h b/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h index ca0a4fccda..25360a1e19 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h @@ -17,15 +17,17 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#if !defined _SIGNAL_H && !defined __need_siginfo_t +#if !defined _SIGNAL_H && !defined __need_siginfo_t \ + && !defined __need_sigevent_t # error "Never include this file directly. Use instead" #endif #include -#if (!defined __have_siginfo_t \ - && (defined _SIGNAL_H || defined __need_siginfo_t)) -# define __have_siginfo_t 1 +#if (!defined __have_sigval_t \ + && (defined _SIGNAL_H || defined __need_siginfo_t \ + || defined __need_sigevent_t)) +# define __have_sigval_t 1 /* Type for data associated with a signal. */ typedef union sigval @@ -33,6 +35,11 @@ typedef union sigval int sival_int; void *sival_ptr; } sigval_t; +#endif + +#if (!defined __have_siginfo_t \ + && (defined _SIGNAL_H || defined __need_siginfo_t)) +# define __have_siginfo_t 1 # define __SI_MAX_SIZE 128 # if __WORDSIZE == 64 @@ -246,7 +253,8 @@ enum #endif /* !have siginfo_t && (have _SIGNAL_H || need siginfo_t). */ -#if defined _SIGNAL_H && !defined __have_sigevent_t +#if (defined _SIGNAL_H || defined __need_sigevent_t) \ + && !defined __have_sigevent_t # define __have_sigevent_t 1 /* Structure to transport application-defined values with signals. */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h index 6bebeb2bac..03f5b3e172 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h +++ b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h @@ -17,13 +17,15 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#if !defined _SIGNAL_H && !defined __need_siginfo_t +#if !defined _SIGNAL_H && !defined __need_siginfo_t \ + && !defined __need_sigevent_t # error "Never include this file directly. Use instead" #endif -#if (!defined __have_siginfo_t \ - && (defined _SIGNAL_H || defined __need_siginfo_t)) -# define __have_siginfo_t 1 +#if (!defined __have_sigval_t \ + && (defined _SIGNAL_H || defined __need_siginfo_t \ + || defined __need_sigevent_t)) +# define __have_sigval_t 1 /* Type for data associated with a signal. */ typedef union sigval @@ -31,6 +33,11 @@ typedef union sigval int sival_int; void *sival_ptr; } sigval_t; +#endif + +#if (!defined __have_siginfo_t \ + && (defined _SIGNAL_H || defined __need_siginfo_t)) +# define __have_siginfo_t 1 # define __SI_MAX_SIZE 128 # define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3) @@ -238,7 +245,8 @@ enum #endif /* !have siginfo_t && (have _SIGNAL_H || need siginfo_t). */ -#if defined _SIGNAL_H && !defined __have_sigevent_t +#if (defined _SIGNAL_H || defined __need_sigevent_t) \ + && !defined __have_sigevent_t # define __have_sigevent_t 1 /* Structure to transport application-defined values with signals. */ From 1052cd9dacb8527b1e2c8b2f5aad56230480c3de Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 4 Mar 2001 19:28:52 +0000 Subject: [PATCH 2456/4487] Define SI_ASYNCNL. --- sysdeps/unix/sysv/linux/alpha/bits/siginfo.h | 4 +++- sysdeps/unix/sysv/linux/mips/bits/siginfo.h | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h b/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h index 25360a1e19..6e1634080e 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h @@ -127,7 +127,9 @@ typedef struct siginfo signals. */ enum { - SI_SIGIO = -5, /* Sent by queued SIGIO. */ + SI_ASYNCNL = -6, /* Sent by asynch name lookup completion. */ +# define SI_ASYNCNL SI_ASYNCNL + SI_SIGIO, /* Sent by queued SIGIO. */ # define SI_SIGIO SI_SIGIO SI_ASYNCIO, /* Sent by AIO completion. */ # define SI_ASYNCIO SI_ASYNCIO diff --git a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h index 03f5b3e172..6e6f70b8ae 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h +++ b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h @@ -119,7 +119,9 @@ typedef struct siginfo signals. */ enum { - SI_SIGIO = -5, /* Sent by queued SIGIO. */ + SI_ASYNCNL = -6, /* Sent by asynch name lookup completion. */ +# define SI_ASYNCNL SI_ASYNCNL + SI_SIGIO, /* Sent by queued SIGIO. */ # define SI_SIGIO SI_SIGIO SI_MESGQ, /* Sent by real time mesq state change. */ # define SI_MESGQ SI_MESGQ From 5c4a64619959b5aa60d2ad16aebaa496881f161f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 5 Mar 2001 18:28:40 +0000 Subject: [PATCH 2457/4487] (__S_TYPEISMQ, __S_TYPEISSEM, __S_TYPEISSHM): Rewrite to enforce correct use the macros. They still always return zero. --- sysdeps/unix/sysv/linux/alpha/bits/stat.h | 11 ++++++----- sysdeps/unix/sysv/linux/m68k/bits/stat.h | 11 ++++++----- sysdeps/unix/sysv/linux/mips/bits/stat.h | 11 ++++++----- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/stat.h b/sysdeps/unix/sysv/linux/alpha/bits/stat.h index dbb79383ea..60a61601e9 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/stat.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1996,1997,1998,1999,2000,2001 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 @@ -101,10 +101,11 @@ struct stat64 #define __S_IFLNK 0120000 /* Symbolic link. */ #define __S_IFSOCK 0140000 /* Socket. */ -/* POSIX.1b objects. */ -#define __S_TYPEISMQ(buf) (0) -#define __S_TYPEISSEM(buf) (0) -#define __S_TYPEISSHM(buf) (0) +/* POSIX.1b objects. Note that these macros always evaluate to zero. But + they do it by enforcing the correct use of the macros. */ +#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode) /* Protection bits. */ diff --git a/sysdeps/unix/sysv/linux/m68k/bits/stat.h b/sysdeps/unix/sysv/linux/m68k/bits/stat.h index 1676f17b62..f360e7f829 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/stat.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1992,95,96,97,98,99,2000,2001 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 @@ -118,10 +118,11 @@ struct stat64 #define __S_IFLNK 0120000 /* Symbolic link. */ #define __S_IFSOCK 0140000 /* Socket. */ -/* POSIX.1b objects. */ -#define __S_TYPEISMQ(buf) (0) -#define __S_TYPEISSEM(buf) (0) -#define __S_TYPEISSHM(buf) (0) +/* POSIX.1b objects. Note that these macros always evaluate to zero. But + they do it by enforcing the correct use of the macros. */ +#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode) /* Protection bits. */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h index 37c303b4d0..9210cae7f3 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/stat.h +++ b/sysdeps/unix/sysv/linux/mips/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1992,95,96,97,98,99,2000,2001 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 @@ -124,10 +124,11 @@ struct stat64 #define __S_IFLNK 0120000 /* Symbolic link. */ #define __S_IFSOCK 0140000 /* Socket. */ -/* POSIX.1b objects. */ -#define __S_TYPEISMQ(buf) (0) -#define __S_TYPEISSEM(buf) (0) -#define __S_TYPEISSHM(buf) (0) +/* POSIX.1b objects. Note that these macros always evaluate to zero. But + they do it by enforcing the correct use of the macros. */ +#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode) /* Protection bits. */ From e3a9f6bb3980b8be41d505fd9c4385b90d5732ff Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 10 Mar 2001 06:35:45 +0000 Subject: [PATCH 2458/4487] Handling processor specific features for Linux/Arm. --- sysdeps/unix/sysv/linux/arm/dl-procinfo.c | 31 +++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/dl-procinfo.c diff --git a/sysdeps/unix/sysv/linux/arm/dl-procinfo.c b/sysdeps/unix/sysv/linux/arm/dl-procinfo.c new file mode 100644 index 0000000000..564d7d153a --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/dl-procinfo.c @@ -0,0 +1,31 @@ +/* Data for Linux/ARM version of processor capability information. + Copyright (C) 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Philip Blundell , 2001. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* This information must be kept in sync with the _DL_HWCAP_COUNT and + _DL_PLATFORM_COUNT definitions in procinfo.h. */ + + +/* If anything should be added here check whether the size of each string + is still ok with the given array size. */ +const char _dl_arm_cap_flags[][10] = + { + "swp", "half", "thumb", "26bit", "fast-mult", "fpa", "vfp", "edsp", + }; + From 807c3437eb3d178fe6fb57d048ce69c79b6ad8c7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 10 Mar 2001 06:36:09 +0000 Subject: [PATCH 2459/4487] Interface definitions for functions to handle processor specific features on Linux/Arm. --- sysdeps/unix/sysv/linux/arm/dl-procinfo.h | 89 +++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/dl-procinfo.h diff --git a/sysdeps/unix/sysv/linux/arm/dl-procinfo.h b/sysdeps/unix/sysv/linux/arm/dl-procinfo.h new file mode 100644 index 0000000000..9f4c83e5c1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/dl-procinfo.h @@ -0,0 +1,89 @@ +/* Linux/ARM version of processor capability information handling macros. + Copyright (C) 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Philip Blundell , 2001. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _DL_PROCINFO_H +#define _DL_PROCINFO_H 1 + +#include + +/* If anything should be added here check whether the size of each string + is still ok with the given array size. */ +extern const char _dl_arm_cap_flags[][10]; +#define _DL_HWCAP_COUNT 32 + +/* The kernel provides platform data but it is not interesting. */ +#define _DL_HWCAP_PLATFORM 0 + + +static inline int +__attribute__ ((unused)) +_dl_procinfo (int word) +{ + int i; + + _dl_printf ("AT_HWCAP: "); + + for (i = 0; i < _DL_HWCAP_COUNT; ++i) + if (word & (1 << i)) + _dl_printf (" %s", _dl_arm_cap_flags[i]); + + _dl_printf ("\n"); + + return 0; +} + +static inline const char * +__attribute__ ((unused)) +_dl_hwcap_string (int idx) +{ + return _dl_arm_cap_flags[idx]; +}; + +enum +{ + HWCAP_ARM_SWP = 1 << 0, + HWCAP_ARM_HALF = 1 << 1, + HWCAP_ARM_THUMB = 1 << 2, + HWCAP_ARM_26BIT = 1 << 3, + HWCAP_ARM_FAST_MULT = 1 << 4, + HWCAP_ARM_FPA = 1 << 5, + HWCAP_ARM_VFP = 1 << 6, + HWCAP_ARM_EDSP = 1 << 7, + + HWCAP_IMPORTANT = (HWCAP_ARM_HALF | HWCAP_ARM_FAST_MULT) +}; + +static inline int +__attribute__ ((unused)) +_dl_string_hwcap (const char *str) +{ + int i; + + for (i = 0; i < _DL_HWCAP_COUNT; i++) + { + if (strcmp (str, _dl_arm_cap_flags[i]) == 0) + return i; + } + return -1; +}; + +#define _dl_string_platform(str) (-1) + +#endif /* dl-procinfo.h */ From ce56b0a81ad9b43313f69eefbed1eaf7ebad2042 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 10 Mar 2001 06:36:31 +0000 Subject: [PATCH 2460/4487] [subdir=elf] (sysdep-dl-routines, sysdep_routines, sysdep-rtld-routines): Add dl-procinfo. --- sysdeps/unix/sysv/linux/arm/Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile index 6040b20193..aeaaa39fce 100644 --- a/sysdeps/unix/sysv/linux/arm/Makefile +++ b/sysdeps/unix/sysv/linux/arm/Makefile @@ -12,3 +12,11 @@ endif ifeq ($(subdir),resource) sysdep_routines += oldgetrlimit64 endif + +ifeq ($(subdir),elf) +# extra shared linker files to link into dl-allobjs.so and libc +sysdep-dl-routines += dl-procinfo +sysdep_routines += dl-procinfo +# extra shared linker files to link only into dl-allobjs.so +sysdep-rtld-routines += dl-procinfo +endif From 10e506a635d9ec0ce80bf96a462494b5fbfc2c0d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 10 Mar 2001 06:37:12 +0000 Subject: [PATCH 2461/4487] Add dl-procinfo.c and dl-procinfo.h. --- sysdeps/unix/sysv/linux/arm/Dist | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/unix/sysv/linux/arm/Dist b/sysdeps/unix/sysv/linux/arm/Dist index 60513f7c46..83f87192d6 100644 --- a/sysdeps/unix/sysv/linux/arm/Dist +++ b/sysdeps/unix/sysv/linux/arm/Dist @@ -1,4 +1,6 @@ clone.S +dl-procinfo.c +dl-procinfo.h ioperm.c setresuid.c setresgid.c From 7f21c16fbf68501b335cc9971f0cc85c9fa039e1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 10 Mar 2001 16:16:44 +0000 Subject: [PATCH 2462/4487] m68k-specific definitions for ldconfig. --- sysdeps/unix/sysv/linux/m68k/ldconfig.h | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/ldconfig.h diff --git a/sysdeps/unix/sysv/linux/m68k/ldconfig.h b/sysdeps/unix/sysv/linux/m68k/ldconfig.h new file mode 100644 index 0000000000..953f192bcd --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/ldconfig.h @@ -0,0 +1 @@ +#include From b33675cd5eee0ae26ed9d11173fd0bded655d542 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 11 Mar 2001 23:25:54 +0000 Subject: [PATCH 2463/4487] Dummy replacement for code not needed here. --- sysdeps/m68k/fpu/branred.c | 1 + sysdeps/m68k/fpu/doasin.c | 1 + sysdeps/m68k/fpu/dosincos.c | 1 + sysdeps/m68k/fpu/halfulp.c | 1 + sysdeps/m68k/fpu/mpa.c | 1 + sysdeps/m68k/fpu/mpatan.c | 1 + sysdeps/m68k/fpu/mpatan2.c | 1 + sysdeps/m68k/fpu/mpexp.c | 1 + sysdeps/m68k/fpu/mplog.c | 1 + sysdeps/m68k/fpu/mpsqrt.c | 1 + sysdeps/m68k/fpu/mptan.c | 1 + sysdeps/m68k/fpu/sincos32.c | 1 + sysdeps/m68k/fpu/slowexp.c | 1 + sysdeps/m68k/fpu/slowpow.c | 1 + 14 files changed, 14 insertions(+) create mode 100644 sysdeps/m68k/fpu/branred.c create mode 100644 sysdeps/m68k/fpu/doasin.c create mode 100644 sysdeps/m68k/fpu/dosincos.c create mode 100644 sysdeps/m68k/fpu/halfulp.c create mode 100644 sysdeps/m68k/fpu/mpa.c create mode 100644 sysdeps/m68k/fpu/mpatan.c create mode 100644 sysdeps/m68k/fpu/mpatan2.c create mode 100644 sysdeps/m68k/fpu/mpexp.c create mode 100644 sysdeps/m68k/fpu/mplog.c create mode 100644 sysdeps/m68k/fpu/mpsqrt.c create mode 100644 sysdeps/m68k/fpu/mptan.c create mode 100644 sysdeps/m68k/fpu/sincos32.c create mode 100644 sysdeps/m68k/fpu/slowexp.c create mode 100644 sysdeps/m68k/fpu/slowpow.c diff --git a/sysdeps/m68k/fpu/branred.c b/sysdeps/m68k/fpu/branred.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/m68k/fpu/branred.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/m68k/fpu/doasin.c b/sysdeps/m68k/fpu/doasin.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/m68k/fpu/doasin.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/m68k/fpu/dosincos.c b/sysdeps/m68k/fpu/dosincos.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/m68k/fpu/dosincos.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/m68k/fpu/halfulp.c b/sysdeps/m68k/fpu/halfulp.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/m68k/fpu/halfulp.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/m68k/fpu/mpa.c b/sysdeps/m68k/fpu/mpa.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/m68k/fpu/mpa.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/m68k/fpu/mpatan.c b/sysdeps/m68k/fpu/mpatan.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/m68k/fpu/mpatan.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/m68k/fpu/mpatan2.c b/sysdeps/m68k/fpu/mpatan2.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/m68k/fpu/mpatan2.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/m68k/fpu/mpexp.c b/sysdeps/m68k/fpu/mpexp.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/m68k/fpu/mpexp.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/m68k/fpu/mplog.c b/sysdeps/m68k/fpu/mplog.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/m68k/fpu/mplog.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/m68k/fpu/mpsqrt.c b/sysdeps/m68k/fpu/mpsqrt.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/m68k/fpu/mpsqrt.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/m68k/fpu/mptan.c b/sysdeps/m68k/fpu/mptan.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/m68k/fpu/mptan.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/m68k/fpu/sincos32.c b/sysdeps/m68k/fpu/sincos32.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/m68k/fpu/sincos32.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/m68k/fpu/slowexp.c b/sysdeps/m68k/fpu/slowexp.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/m68k/fpu/slowexp.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/m68k/fpu/slowpow.c b/sysdeps/m68k/fpu/slowpow.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/m68k/fpu/slowpow.c @@ -0,0 +1 @@ +/* Not needed. */ From d76aa2b87e9bbb6e02beffe5d8746de0cf023129 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 16 Mar 2001 23:52:16 +0000 Subject: [PATCH 2464/4487] (CALL_SIGHANDLER): Define. --- sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h | 2 ++ sysdeps/unix/sysv/linux/arm/sigcontextinfo.h | 2 ++ sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h | 4 +++- sysdeps/unix/sysv/linux/mips/sigcontextinfo.h | 2 ++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h b/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h index 19c35a4624..4613bd51ac 100644 --- a/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h +++ b/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h @@ -21,3 +21,5 @@ #define GET_PC(ctx) ((void *) (ctx).sc_pc) #define GET_FRAME(ctx) ((void *) (ctx).sc_regs[15]) #define GET_STACK(ctx) ((void *) (ctx).sc_regs[30]) +#define CALL_SIGHANDLER(handler, signo, ctx) \ + (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx)) diff --git a/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h b/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h index 1aaca1e155..cc8f2f765c 100644 --- a/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h +++ b/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h @@ -31,3 +31,5 @@ ctx.v20.reg.ARM_sp : ctx.v21.arm_sp)) #define ADVANCE_STACK_FRAME(frm) \ ((struct layout *)frm - 1) +#define CALL_SIGHANDLER(handler, signo, ctx) \ + (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx)) diff --git a/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h b/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h index 86bf934c51..b7e6f375e5 100644 --- a/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h +++ b/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab , 1998. @@ -22,3 +22,5 @@ #define GET_PC(ctx) ((void *) (ctx)->sc_pc) #define GET_FRAME(ctx) ((void *) __builtin_frame_address (1)) #define GET_STACK(ctx) ((void *) (ctx)->sc_usp) +#define CALL_SIGHANDLER(handler, signo, ctx) \ + (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx)) diff --git a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h index 1b67ce39af..36d57dcabf 100644 --- a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h +++ b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h @@ -23,3 +23,5 @@ #define GET_PC(ctx) ((void *) ctx->sc_pc) #define GET_FRAME(ctx) ((void *) ctx->sc_regs[30]) #define GET_STACK(ctx) ((void *) ctx->sc_regs[29]) +#define CALL_SIGHANDLER(handler, signo, ctx) \ + (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx)) From e46c35fd6bfb1bc357749c8c0ffbe19b4fa79216 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 17 Mar 2001 08:27:45 +0000 Subject: [PATCH 2465/4487] Change type of second parameter back to size_t as per upcoming XPG6. --- sysdeps/unix/sysv/aix/gethostname.c | 4 ++-- sysdeps/unix/sysv/sysv4/gethostname.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/aix/gethostname.c b/sysdeps/unix/sysv/aix/gethostname.c index 76c8c72d87..9482058854 100644 --- a/sysdeps/unix/sysv/aix/gethostname.c +++ b/sysdeps/unix/sysv/aix/gethostname.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2001 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 @@ -21,7 +21,7 @@ int __gethostname (name, len) char *name; - socklen_t len; + size_t len; { return gethostname (name, len); } diff --git a/sysdeps/unix/sysv/sysv4/gethostname.c b/sysdeps/unix/sysv/sysv4/gethostname.c index 3f967e15d4..1a1440f079 100644 --- a/sysdeps/unix/sysv/sysv4/gethostname.c +++ b/sysdeps/unix/sysv/sysv4/gethostname.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1995, 1997, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995, 1997, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -27,7 +27,7 @@ extern int __sysinfo (int command, char *buf, long int count); int __gethostname (name, namelen) char *name; - socklen_t namelen; + size_t namelen; { return __sysinfo (SI_HOSTNAME, name, namelen); } From e8d795b0770a737f3471bccf75063c510550d4cf Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 27 Mar 2001 02:43:47 +0000 Subject: [PATCH 2466/4487] Add MAP_* and MADV_* defines to match other architectures. --- sysdeps/unix/sysv/linux/mips/bits/mman.h | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/mman.h b/sysdeps/unix/sysv/linux/mips/bits/mman.h index 5b8c752ccd..f6c5094f87 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/mman.h +++ b/sysdeps/unix/sysv/linux/mips/bits/mman.h @@ -53,10 +53,12 @@ /* These are Linux-specific. */ #ifdef __USE_MISC -# define MAP_GROWSDOWN 0x1000 /* Stack-like segment. */ +# define MAP_NORESERVE 0x0400 /* don't check for reservations */ +# define MAP_ANONYMOUS 0x0800 /* don't use a file */ +# define MAP_GROWSDOWN 0x1000 /* stack-like segment */ # define MAP_DENYWRITE 0x2000 /* ETXTBSY */ -# define MAP_EXECUTABLE 0x4000 /* Mark it as an executable. */ -# define MAP_NORESERVE 0x0400 /* Don't check for reservations. */ +# define MAP_EXECUTABLE 0x4000 /* mark it as an executable */ +# define MAP_LOCKED 0x8000 /* pages are locked */ #endif /* Flags to `msync'. */ @@ -69,6 +71,15 @@ #define MCL_FUTURE 2 /* Lock all additions to address space. */ +/* Advice to `madvise'. */ +#ifdef __USE_BSD +#define MADV_NORMAL 0 /* default page-in behavior */ +#define MADV_RANDOM 1 /* page-in minimum required */ +#define MADV_SEQUENTIAL 2 /* read-ahead aggressively */ +#define MADV_WILLNEED 3 /* pre-fault pages */ +#define MADV_DONTNEED 4 /* discard these pages */ +#endif + /* Flags for `mremap'. */ #ifdef __USE_GNU # define MREMAP_MAYMOVE 1 From a46a95b7e4cd9c7f05c96306fa6762cd7be0f47c Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 30 Mar 2001 06:57:48 +0000 Subject: [PATCH 2467/4487] Add alias for imaxdiv. --- sysdeps/alpha/ldiv.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/alpha/ldiv.S b/sysdeps/alpha/ldiv.S index 08bf8eb08d..c705d1eb16 100644 --- a/sysdeps/alpha/ldiv.S +++ b/sysdeps/alpha/ldiv.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson . @@ -106,3 +106,4 @@ $divbyzero: .end ldiv weak_alias(ldiv, lldiv) +weak_alias(ldiv, imaxdiv) From 0b3ec5b0289df05538aa3d938562ebf009e73be5 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 2 Apr 2001 12:32:51 +0000 Subject: [PATCH 2468/4487] Add prototype for __umount2. --- sysdeps/unix/sysv/linux/hppa/umount.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/hppa/umount.c b/sysdeps/unix/sysv/linux/hppa/umount.c index 515467b1c5..29633f56fb 100644 --- a/sysdeps/unix/sysv/linux/hppa/umount.c +++ b/sysdeps/unix/sysv/linux/hppa/umount.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Huggins-Daines , 2000. @@ -20,6 +20,8 @@ /* Since we don't have an oldumount system call, do what the kernel does down here. */ +extern log int __umount2 (char * name, int flags); + long int __umount (const char *name) { From 1abb612d81d8563512285c268694f92c8e560283 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 4 Apr 2001 01:17:41 +0000 Subject: [PATCH 2469/4487] Remove /usr/lib/crt0.o added dl-libc, dl-open,dl-sym, dl-close to misc. --- sysdeps/unix/sysv/aix/Makefile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sysdeps/unix/sysv/aix/Makefile b/sysdeps/unix/sysv/aix/Makefile index 9aa48d1680..dc91f8f241 100644 --- a/sysdeps/unix/sysv/aix/Makefile +++ b/sysdeps/unix/sysv/aix/Makefile @@ -2,18 +2,16 @@ # This is a hack until the import/export stuff is worked out. +postctor += /lib/syscalls.exp -# XXX This is a hack until we have the possibility to generate out own crt0. -static-start-installed-name = /usr/lib/crt0.o - ifeq ($(subdir),misc) -sysdep_routines += dl-open dl-sym dl-close uitrunc +sysdep_routines += dl-libc dl-open dl-sym dl-close uitrunc endif ifeq ($(subdir),login) sysdep_routines += setutxent getutxent endutxent getutxid getutxline \ pututxline utmpxname -sysdep_headers += utmpx.h bits/utmpx.h +#sysdep_headers += utmpx.h bits/utmpx.h +#sysdep_headers += bits/utmp.h bits/utmpx.h endif # Don't compile the ctype glue code, since there is no old non-GNU C library. From 4b159c0223e580c6f3f18499978c4b31b3b94186 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 4 Apr 2001 01:18:11 +0000 Subject: [PATCH 2470/4487] Removed temp code and made stub. --- sysdeps/unix/sysv/aix/libc-start.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/sysdeps/unix/sysv/aix/libc-start.c b/sysdeps/unix/sysv/aix/libc-start.c index f7eb65e8b4..2dfc0251ba 100644 --- a/sysdeps/unix/sysv/aix/libc-start.c +++ b/sysdeps/unix/sysv/aix/libc-start.c @@ -1,20 +1 @@ -/* We don't need the usual code since we are using the AIX crt code. */ - -/* This function is called in the AIX crt0. */ -void -__mod_init (void) -{ - /* XXX What has to be done? */ -} - -/* This variable is reference in the AIX crt0 code. - XXX Since I don't know how it is used make it a pointer to a function. */ -void *__crt0v = __mod_init; - - -/* XXX Another weird function from the C library. I have no idea what - it does but it is needed by libgcc. */ -void -_savef14 (void) -{ -} +/* stub libc-start.c */ From c8bf86d074829faaaae8315f2d787670e581e565 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 4 Apr 2001 01:26:49 +0000 Subject: [PATCH 2471/4487] Added _HAVE_UT_TYPE/PID/ID/TV/HOST defines. --- sysdeps/unix/sysv/aix/bits/utmpx.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sysdeps/unix/sysv/aix/bits/utmpx.h b/sysdeps/unix/sysv/aix/bits/utmpx.h index 7a7bce2f70..f8bd66574f 100644 --- a/sysdeps/unix/sysv/aix/bits/utmpx.h +++ b/sysdeps/unix/sysv/aix/bits/utmpx.h @@ -65,3 +65,10 @@ struct utmpx #ifdef __USE_GNU # define ACCOUNTING 9 /* System accounting. */ #endif + +#define _HAVE_UT_TYPE 1 +#define _HAVE_UT_PID 1 +#define _HAVE_UT_ID 1 +#define _HAVE_UT_TV 1 +#define _HAVE_UT_HOST 1 + From 42f86baa0d01b14fdda123ff938d5ea71b5f9358 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 4 Apr 2001 01:28:41 +0000 Subject: [PATCH 2472/4487] AIX utmpx.h definitions. --- sysdeps/unix/sysv/aix/utmpx.h | 89 +++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/utmpx.h diff --git a/sysdeps/unix/sysv/aix/utmpx.h b/sysdeps/unix/sysv/aix/utmpx.h new file mode 100644 index 0000000000..f7a7a3eeb0 --- /dev/null +++ b/sysdeps/unix/sysv/aix/utmpx.h @@ -0,0 +1,89 @@ +/* Copyright (C) 1997, 1998, 1999 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _UTMPX_H +#define _UTMPX_H 1 + +#include +#include + +/* Required according to Unix98. */ +#ifndef __pid_t_defined +typedef __pid_t pid_t; +# define __pid_t_defined +#endif + +/* Get system dependent values and data structures. */ +#include + +#ifdef __USE_GNU +/* Compatibility names for the strings of the canonical file names. */ +# define UTMPX_FILE _PATH_UTMPX +# define UTMPX_FILENAME _PATH_UTMPX +# define WTMPX_FILE _PATH_WTMPX +# define WTMPX_FILENAME _PATH_WTMPX +#endif + +/* For the getutmp{,x} functions we need the `struct utmp'. */ +#ifdef __USE_GNU +struct utmp; +#endif + + +__BEGIN_DECLS + +/* Open user accounting database. */ +extern void setutxent (void) __THROW; + +/* Close user accounting database. */ +extern void endutxent (void) __THROW; + +/* Get the next entry from the user accounting database. */ +extern struct utmpx *getutxent (void) __THROW; + +/* Get the user accounting database entry corresponding to ID. */ +extern struct utmpx *getutxid (__const struct utmpx *__id) __THROW; + +/* Get the user accounting database entry corresponding to LINE. */ +extern struct utmpx *getutxline (__const struct utmpx *__line) __THROW; + +/* Write the entry UTMPX into the user accounting database. */ +extern struct utmpx *pututxline (__const struct utmpx *__utmpx) __THROW; + + +#ifdef __USE_GNU +/* Change name of the utmpx file to be examined. */ +extern int utmpxname (__const char *__file) __THROW; + +/* Append entry UTMP to the wtmpx-like file WTMPX_FILE. */ +extern void updwtmpx (__const char *__wtmpx_file, + __const struct utmpx *__utmpx) __THROW; + + +/* Copy the information in UTMPX to UTMP. */ +extern void getutmp (__const struct utmpx *__utmpx, + struct utmp *__utmp) __THROW; + +/* Copy the information in UTMP to UTMPX. */ +extern void getutmpx (__const struct utmp *__utmp, + struct utmpx *__utmpx) __THROW; +#endif + +__END_DECLS + +#endif /* utmpx.h */ From 7fac016cfa47e47d9c2a861602d82b826edd807b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 4 Apr 2001 01:32:14 +0000 Subject: [PATCH 2473/4487] AIX gettimeofday implementation. --- sysdeps/unix/sysv/aix/gettimeofday.c | 94 ++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/gettimeofday.c diff --git a/sysdeps/unix/sysv/aix/gettimeofday.c b/sysdeps/unix/sysv/aix/gettimeofday.c new file mode 100644 index 0000000000..6b5bd48085 --- /dev/null +++ b/sysdeps/unix/sysv/aix/gettimeofday.c @@ -0,0 +1,94 @@ +/* Copyright (C) 1991, 92, 94, 95, 96, 97 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include + +#ifndef HAVE_GNU_LD +#define __daylight daylight +#define __timezone timezone +#define __tzname tzname +#endif + +/* Assembler Routines to access the timer registers */ +asm(" +.rtc_upper: mfspr 3,4 # copy RTCU to return register + blr + +.rtc_lower: mfspr 3,5 # copy RTCL to return register + blr +"); + +/* Get the current time of day and timezone information, + putting it into *TV and *TZ. If TZ is NULL, *TZ is not filled. + Returns 0 on success, -1 on errors. */ +int +__gettimeofday (tv, tz) + struct timeval *tv; + struct timezone *tz; +{ + int ts, tl, tu; + + if (tv == NULL) + { + __set_errno (EINVAL); + return -1; + } + + ts = rtc_upper(); /* seconds */ + tl = rtc_lower(); /* nanoseconds */ + tu = rtc_upper(); /* Check for a carry from */ + if (ts != tu) /* the lower reg to the upper */ + tl = rtc_lower(); /* Recover from the race condition */ + + tv->tv_sec = (long int) (tu + (double)tl/1000000000); + tv->tv_usec = (long int) ((double)tl/1000); + +#if 0 + if (tz != NULL) + { + const time_t timer = tv->tv_sec; + struct tm tm; + const struct tm *tmp; + + const long int save_timezone = __timezone; + const long int save_daylight = __daylight; + char *save_tzname[2]; + save_tzname[0] = __tzname[0]; + save_tzname[1] = __tzname[1]; + + tmp = localtime_r (&timer, &tm); + + tz->tz_minuteswest = __timezone / 60; + tz->tz_dsttime = __daylight; + + __timezone = save_timezone; + __daylight = save_daylight; + __tzname[0] = save_tzname[0]; + __tzname[1] = save_tzname[1]; + + if (tmp == NULL) + return -1; + } +#endif + + return 0; +} + +weak_alias (__gettimeofday, gettimeofday) From 5f55815d275ca237592b5766e24fd30fac770c38 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 4 Apr 2001 01:33:04 +0000 Subject: [PATCH 2474/4487] AIX startup code. --- sysdeps/unix/sysv/aix/start.c | 290 ++++++++++++++++++++++++++++++++++ 1 file changed, 290 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/start.c diff --git a/sysdeps/unix/sysv/aix/start.c b/sysdeps/unix/sysv/aix/start.c new file mode 100644 index 0000000000..d854a55f42 --- /dev/null +++ b/sysdeps/unix/sysv/aix/start.c @@ -0,0 +1,290 @@ +/* Copyright (C) 1991, 93, 1995-1998, 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + + +/* Old compatibility names for C types. */ +typedef unsigned char uchar; /* sb in libc/posix/types.h */ + +#include +#include +#include +#include +#include +#include +#include + +/* The first piece of initialized data. */ +int __data_start = 0; + +extern int errno; + +/* extern __pthread_init; */ + +typedef void (*FPV)(void); + +typedef struct crt0_info +{ + int *p_argc; + FPV threads_init; +} INFO; + + +INFO crt0_info; +int argc; +char **argv; +char **__environ; +int module_count; +caddr_t text_origin; +caddr_t data_origin; + +asm(" + .toc +LL..0: .tc argc[TC],argc +LL..1: .tc argv[TC],argv +LL..2: .tc __environ[TC],__environ +LL..3: .tc module_count[TC],module_count +LL..4: .tc text_origin[TC],text_origin +LL..5: .tc data_origin[TC],data_origin +"); + +int main (int argc,char **argv,char **__environ); +int modinit(int argc,INFO *crt0_info, int module_count, + caddr_t text_origin, caddr_t data_origin); + +void mod_init1(void *handler,__RTINIT *rti); + +__RTINIT *find_rtinit(caddr_t text_origin,caddr_t data_origin, int module_count); + +extern int *__loadx(); + +void __start(void) +{ +#ifdef __64BIT__ +asm(" + ld 17,LL..0(2) # argc + std 14,0(17) # copy reg14 to argc + ld 17,LL..1(2) # argv + std 15,0(17) # copy reg15 to argv + ld 17,LL..2(2) # envp + std 16,0(17) # copy reg16 to envp + ld 17,LL..3(2) # module_count + std 30,0(17) # copy reg30 to module_count + ld 17,LL..4(2) # text_origin + std 29,0(17) # copy reg29 to text_origin + ld 17,LL..5(2) # data_origin + std 28,0(17) # copy reg28 to data_origin +"); +#else +asm(" + lwz 17,LL..0(2) # argc + stw 3,0(17) # copy reg3 to argc + lwz 17,LL..1(2) # argv + stw 4,0(17) # copy reg4 to argv + lwz 17,LL..2(2) # envp + stw 5,0(17) # copy reg5 to envp + lwz 17,LL..3(2) # module_count + stw 30,0(17) # copy reg30 to module_count + lwz 17,LL..4(2) # text_origin + stw 29,0(17) # copy reg29 to text_origin + lwz 17,LL..5(2) # data_origin + stw 28,0(17) # copy reg28 to data_origin +"); +#endif + crt0_info.p_argc = (int*)&argc; + +/* crt0_info.threads_init = (FPV) &__pthread_init; */ + + /* + * Do run-time linking, if enabled and call the init() + * for all loaded modules. + */ + argc = modinit(argc,&crt0_info,module_count,text_origin,data_origin); + + errno=0; + /* + * Call the user program. + */ + exit (main (argc, argv, __environ)); +} + +/* + * The modinit() function performs run-time linking, + * if enabled, and calling the init() function for + * all loaded modules. + * + * int modinit(argc,crt0_info,module_count,text,data) + * + * argc - current value of argc. + * info - crt0 information passed + * module_count - number of modules loaded. + * text - Beginning of text address + * data - Beginning of data address + */ + +#define DL_BUFFER_SIZE 1000 + +int modinit(int argc,INFO *crt0_info, int module_count, + caddr_t text_origin, caddr_t data_origin) +{ + int *handler = 0; + __RTINIT *rtinit_info = 0; + int flag; + DL_INFO dl_buffer[DL_BUFFER_SIZE]; + DL_INFO *dl_info = dl_buffer; + int i; + FPV p; + __libc_lock_define_initialized(static,modinit_lock); + + /* + * try to find __rtinit symbols + */ + rtinit_info = find_rtinit(text_origin,data_origin,module_count); + + flag = DL_EXECQ; + if (rtinit_info && rtinit_info->rtl) flag |= DL_LOAD_RTL; + + /* + * get a list of modules that have __rtinit + */ + if (__loadx(flag, dl_info, sizeof(dl_buffer))) exit(0x90); + + if (( dl_info[0].dlinfo_xflags & DL_INFO_OK)) + { + rtinit_info = find_rtinit(dl_info[1].dlinfo_textorg, + dl_info[1].dlinfo_dataorg, + module_count); + if ((rtinit_info != NULL) & (rtinit_info->rtl != NULL)) + { + if((*rtinit_info->rtl)(dl_info,0)) exit(0x90); + } + } + + /* + * initialize threads in case any init + * functions need thread functions + */ + if (crt0_info->threads_init) + (*crt0_info->threads_init)(); + + p = (FPV) __loadx(DL_GLOBALSYM | DL_SRCHLOADLIST,"pthread_init"); + if (p) + (*p)(); + + __libc_lock_lock(modinit_lock); + + /* + * initialization each module loaded that has __rtinit. + */ + if (( dl_info[0].dlinfo_xflags & DL_INFO_OK)) + { + for (i=1; i < dl_info[0].dlinfo_arraylen + 1; i++) + { + if (dl_info[i].dlinfo_flags & DL_HAS_RTINIT) + { + rtinit_info = find_rtinit(dl_info[i].dlinfo_textorg, + dl_info[i].dlinfo_dataorg, + module_count); + if (rtinit_info) + { + mod_init1(handler,rtinit_info); + } + } + } + } + + __libc_lock_unlock(modinit_lock); + /* + * reload argc if needed. + */ + return((int) (*crt0_info->p_argc)); +} + +/* + * The mod_init1 calls every initialization function + * for a given module. + * + * void mod_init1(handler, rti) + * + * void *handler - if NULL init funtions for modules loaded at exec time + * are being executed. Otherwise, the handler points to the + * module loaded. + * + * __RTINIT *rti - pointer to __rtinit data structure (with rti->init_offset + * not equal to zero) + */ + +void mod_init1(void *handler,__RTINIT *rtl) +{ + __RTINIT_DESCRIPTOR *descriptor; + + descriptor =(__RTINIT_DESCRIPTOR *) ((caddr_t)&rtl->rtl + rtl->init_offset); + while (descriptor->f) + { + if (!(descriptor->flags & _RT_CALLED)) + { + descriptor->flags |= _RT_CALLED; + ( descriptor->f )(handler,rtl,descriptor); /* execute init/fini */ + } + descriptor = (__RTINIT_DESCRIPTOR *) ((caddr_t)descriptor + + rtl->__rtinit_descriptor_size); + } +} + + +/* + * Find __rtinit symbol + * + * __RTINIT *find_rtinit(caddr_t text_origin) + * + * caddr_t text_origin - Beginning of text area + * caddr_t data_origin - Beginning of data area + * int module_count - Number of modules loaded + * __RTINIT *rti - pointer to __rtinit data structure + */ + +__RTINIT *find_rtinit(caddr_t text_origin, caddr_t data_origin, int module_count) +{ + struct xcoffhdr *xcoff_hdr; + SCNHDR *sec_hdr; + SCNHDR *ldr_sec_hdr; + SCNHDR *data_sec_hdr; + LDSYM *ldsym_hdr; + __RTINIT *rtl; + + xcoff_hdr = (struct xcoffhdr *) text_origin; + sec_hdr = (SCNHDR *) ((caddr_t)&xcoff_hdr->aouthdr + + xcoff_hdr->filehdr.f_opthdr); + ldr_sec_hdr = (SCNHDR *) (sec_hdr + (xcoff_hdr->aouthdr.o_snloader - 1)); + ldsym_hdr = (LDSYM *) ((caddr_t)xcoff_hdr + ldr_sec_hdr->s_scnptr + + LDHDRSZ); + + if ( module_count <= 0) + { + if ( !(ldr_sec_hdr->s_scnptr) ) return ((__RTINIT *) 0); + + if ( memcmp(ldsym_hdr,RTINIT_NAME,sizeof(RTINIT_NAME)-1)) + return ((__RTINIT *) 0); + } + + data_sec_hdr = (SCNHDR *) (sec_hdr + (xcoff_hdr->aouthdr.o_sndata - 1)); + rtl = (__RTINIT *) (ldsym_hdr->l_value + + (data_origin - data_sec_hdr->s_vaddr)); + return(rtl); +} + From 852702b5c160a6152f4a56941980aefa9977d3d1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 4 Apr 2001 01:34:38 +0000 Subject: [PATCH 2475/4487] AIX __loadx defines. --- sysdeps/unix/sysv/aix/dlldr.h | 112 ++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/dlldr.h diff --git a/sysdeps/unix/sysv/aix/dlldr.h b/sysdeps/unix/sysv/aix/dlldr.h new file mode 100644 index 0000000000..d729244c52 --- /dev/null +++ b/sysdeps/unix/sysv/aix/dlldr.h @@ -0,0 +1,112 @@ +/* Copyright (C) 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + + +/* + + int __loadx(flag, module, arg1, arg2, arg3) + + The __loadx() is a call to ld_loadutil() kernel function, which + does the real work. Note ld_loadutil() is not exported an cannot be + called directly from user space. + + void *ld_loadutil() call is a utility function used for loader extensions + supporting run-time linking and dl*() functions. + + void * - will return the modules entry point if it succeds of NULL + on failure. + + int flag - the flag field performas a dual role: the top 8 bits specify + the work for __loadx() to perform, the bottom 8 bits are + used to pass flags to the work routines, all other bits are + reserved. + +*/ + +#define DL_LOAD 0x1000000 /* __loadx(flag,buf, buf_len, filename, libr_path) */ +#define DL_POSTLOADQ 0x2000000 /* __loadx(flag,buf, buf_len, module_handle) */ +#define DL_EXECQ 0x3000000 /* __loadx(flag,buf, buf_len) */ +#define DL_EXITQ 0x4000000 /* __loadx(flag,buf, buf_len) */ +#define DL_PREUNLOADQ 0x5000000 /* __loadx(flag,buf, buf_len, module_handle) */ +#define DL_INIT 0x6000000 /* __loadx(flag,NULL) */ +#define DL_GETSYM 0x7000000 /* __loadx(flag,symbol, index, modules_data_origin) */ +#define DL_SETDEPEND 0x8000000 /* __loadx(flag,import_data_org, import_index, */ + /* export_data_org, export_index) */ +#define DL_DELDEPEND 0x9000000 /* __loadx(flag,import_data_org, import_index, */ + /* export_data_org, export_index) */ +#define DL_GLOBALSYM 0xA000000 /* __loadx(flag,symbol_name, ptr_to_rec_index, */ + /* ptr_to_rec_data_org) */ +#define DL_UNIX_SYSCALL 0xB000000 /* __loadx(flag,syscall_symbol_name) */ + +#define DL_FUNCTION_MASK 0xFF000000 +#define DL_SRCHDEPENDS 0x00100000 +#define DL_SRCHMODULE 0x00080000 +#define DL_SRCHLOADLIST 0x00040000 +#define DL_LOAD_LDX1 0x00040000 +#define DL_LOAD_RTL 0x00020000 +#define DL_HASHSTRING 0x00020000 +#define DL_INFO_OK 0x00010000 +#define DL_LOAD_DLINFO 0x00010000 +#define DL_UNLOADED 0x00020000 + +typedef union _dl_info +{ + struct { + uint _xflags; /* flag bits in the array */ + uint _size; /* size of this structure */ + uint _arraylen; /* number of following elements */ + } _dl_stat; + struct { + caddr_t _textorg; /* start of loaded program image */ + caddr_t _dataorg; /* start of data instance */ + uint _datasize; /* size of data instance */ + ushort _index; /* index of this le in la_dynlist */ + ushort _mflags; /* info about module from load() */ + } _dl_array; +} DL_INFO; + +#define dlinfo_xflags _dl_stat._xflags +#define dlinfo_arraylen _dl_stat._arraylen +#define dlinfo_size _dl_stat._size + +#define dlinfo_textorg _dl_array._textorg +#define dlinfo_datasize _dl_array._datasize +#define dlinfo_dataorg _dl_array._dataorg +#define dlinfo_index _dl_array._index +#define dlinfo_flags _dl_array._mflags + +#define DL_HAS_RTINIT 0x1 /* indicates the module __rtinit symbols */ +#define DL_IS_NEW 0x2 /* indicates that the module is newly loaded */ + +struct _xArgs +{ + char *libpath; + DL_INFO *info; + uint infosize; +}; + +/* Shared Object DATA used for dl-open,dl-sym & dl-close support */ +typedef struct +{ + void *handle; /* handle for __loadx */ + uint type; /* type of __loadx flag */ + ushort index; /* dlinfo_index */ + caddr_t dataorg; /* dlinfo_dataorg */ +} DL_SODATA; + From bbee9a4145e708a1b5ccc65aadd5385e1b3509e6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 4 Apr 2001 01:36:43 +0000 Subject: [PATCH 2476/4487] AIX dl-close. --- sysdeps/unix/sysv/aix/dl-close.c | 47 ++++++++++++++++++++++++++++---- 1 file changed, 42 insertions(+), 5 deletions(-) diff --git a/sysdeps/unix/sysv/aix/dl-close.c b/sysdeps/unix/sysv/aix/dl-close.c index a9a492a9c7..50986d5528 100644 --- a/sysdeps/unix/sysv/aix/dl-close.c +++ b/sysdeps/unix/sysv/aix/dl-close.c @@ -1,9 +1,46 @@ -/* XXX The implementation of dlopen should somehow use the __loadx system - call but how? */ +/* Copyright (C) 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include +#include #include +#include -int -__libc_dlclose (void *handle) +extern int _dl_numso; +extern DL_SODATA *_dl_sotable; + +void +_dl_close (void *handle) { - return 0; + if ((int) handle < 0 || (int) handle >= _dl_numso || _dl_sotable == NULL) + { + errno = EINVAL; + return; + } + + if (_dl_sotable[(int) handle].handle != 0) + __unload (_dl_sotable[(int) handle].handle); + + _dl_sotable[(int) handle].index = 0; + _dl_sotable[(int) handle].dataorg = 0; + _dl_sotable[(int) handle].handle = 0; + _dl_sotable[(int) handle].type = 0; } + From dfb0b211c146c65ceb67f3f6803f115809a69d19 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 4 Apr 2001 01:48:10 +0000 Subject: [PATCH 2477/4487] AIX dl-open. --- sysdeps/unix/sysv/aix/dl-open.c | 132 +++++++++++++++++++++++++++++++- 1 file changed, 128 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/aix/dl-open.c b/sysdeps/unix/sysv/aix/dl-open.c index 50fd7120c5..0189ab465d 100644 --- a/sysdeps/unix/sysv/aix/dl-open.c +++ b/sysdeps/unix/sysv/aix/dl-open.c @@ -1,9 +1,133 @@ -/* XXX The implementation of dlopen should somehow use the __loadx system - call but how? */ +/* Copyright (C) 1999, 2000, 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include +#include +#include #include +#include + +#define NUM_SHARED_OBJECTS 32 + +int _dl_numso = NUM_SHARED_OBJECTS; +DL_SODATA *_dl_sotable = NULL; void * -__libc_dlopen (const char *file) +_dl_open (const char *file, int mode, const void *caller) { - return (void *) 0; + DL_SODATA *new_so; + void *handle; + int entry; + int bsize = _dl_numso * sizeof (DL_INFO); + DL_INFO *dl_info = malloc (bsize); + + if (dl_info == NULL) + return NULL; + + /* 1st time thru initial shared object data table. */ + if (_dl_sotable == NULL) + { + _dl_sotable = (DL_SODATA *) calloc (_dl_numso, sizeof (DL_SODATA)); + if (_dl_sotable == NULL) + return NULL; + + __loadx (DL_POSTLOADQ, dl_info, bsize, NULL); + while (!(dl_info[0].dlinfo_xflags & DL_INFO_OK) + || dl_info[0].dlinfo_arraylen == 0) + { + bsize *= 2; + dl_info = realloc (dl_info, bsize); + if (dl_info == NULL) + return NULL; + + __loadx (DL_POSTLOADQ, dl_info, bsize, NULL); + } + } + + /* Validate mode bits. */ + if (!(mode & RTLD_NOW) && !(mode & RTLD_LAZY)) + { + free (dl_info); + errno = EINVAL; + return NULL; + } + + /* Load the module. */ + handle = (void *) __loadx (DL_LOAD | DL_LOAD_RTL | DL_LOAD_LDX1, + dl_info, bsize, file, NULL); + if (handle == NULL) + { + free (dl_info); + errno = EINVAL; + return NULL; + } + + /* Was dl_info buffer to small to get info. */ + while (!(dl_info[0].dlinfo_xflags & DL_INFO_OK) + || dl_info[0].dlinfo_arraylen == 0) + { + bsize *= 2; + dl_info = realloc (dl_info, bsize); + if (new_dl_info == NULL) + { + (void) __unload ((void *) handle); + errno = ENOMEM; + return NULL; + } + __loadx (DL_POSTLOADQ | DL_LOAD_RTL, dl_info, bsize, handle); + } + + /* Get an empty entry in the shared object table. */ + for (entry = 0; entry < _dl_numso; ++entry) + if (_dl_sotable[entry].type == 0) + break; + + /* See if the table needs to be increased. */ + if (entry == _dl_numso) + { + new_so = (DL_SODATA *) realloc (_dl_sotable, + _dl_numso * 2 * sizeof (DL_SODATA)); + if (new_so == NULL) + return NULL; + + memset (new_so + _dl_numso, '\0', _dl_numso * sizeof (DL_SODATA)); + _dl_numso *= 2; + _dl_sotable = new_so; + } + + /* See if this is syscall (look for /unix in file). */ + if (strcmp ("/unix", file) == 0) + { + _dl_sotable[entry].index = dl_info[1].dlinfo_index; + _dl_sotable[entry].dataorg = dl_info[1].dlinfo_dataorg; + _dl_sotable[entry].handle = handle; + _dl_sotable[entry].type = DL_UNIX_SYSCALL; + } + else + { + _dl_sotable[entry].index = dl_info[1].dlinfo_index; + _dl_sotable[entry].dataorg = dl_info[1].dlinfo_dataorg; + _dl_sotable[entry].handle = handle; + _dl_sotable[entry].type = DL_GETSYM; + } + + free (dl_info); + return (void *) entry; } From aceb4f8d277813b87f7d8b9aa368a0a7315ad023 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 4 Apr 2001 01:49:24 +0000 Subject: [PATCH 2478/4487] libc_dl-xxx support. --- sysdeps/unix/sysv/aix/dl-libc.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/aix/dl-libc.c diff --git a/sysdeps/unix/sysv/aix/dl-libc.c b/sysdeps/unix/sysv/aix/dl-libc.c new file mode 100644 index 0000000000..9a25fc809e --- /dev/null +++ b/sysdeps/unix/sysv/aix/dl-libc.c @@ -0,0 +1 @@ +#include From 32cb7502fd95920c89d642e04d9f0b0bd2a66ee5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 4 Apr 2001 01:51:14 +0000 Subject: [PATCH 2479/4487] AIX dl-sym. --- sysdeps/unix/sysv/aix/dl-sym.c | 57 +++++++++++++++++++++++++++++++--- 1 file changed, 53 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/aix/dl-sym.c b/sysdeps/unix/sysv/aix/dl-sym.c index 7e10ba10b0..642c2e2ad4 100644 --- a/sysdeps/unix/sysv/aix/dl-sym.c +++ b/sysdeps/unix/sysv/aix/dl-sym.c @@ -1,9 +1,58 @@ -/* XXX The implementation of dlopen should somehow use the __loadx system - call but how? */ +/* Copyright (C) 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include +#include #include +#include + +extern int _dl_numso; +extern DL_SODATA *_dl_sotable; void * -__libc_dlsym (void *handle, const char *name) +_dl_sym (void *handle, const char *symbol, void *who) { - return (void *) 0; + void *rt_function; + + if ((int) handle < 0 || (int) handle >= _dl_numso || _dl_sotable == NULL) + { + errno = EINVAL; + return NULL; + } + + switch (_dl_sotable[(int) handle].type) + { + case DL_UNIX_SYSCALL: + rt_function = (void *) __loadx (DL_UNIX_SYSCALL, (void *) symbol); + break; + + case DL_GETSYM: + rt_function = (void *) __loadx (DL_GETSYM, (void *) symbol, + _dl_sotable[(int) handle].index, + _dl_sotable[(int) handle].dataorg); + break; + + default: + errno = EINVAL; + return NULL; + } + + return rt_function; } From 21be1647f1940b4da82fa27d2e72141af6ab1ae7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 4 Apr 2001 01:52:37 +0000 Subject: [PATCH 2480/4487] AIX PPC memset implementation. --- sysdeps/unix/sysv/aix/powerpc/memset.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/powerpc/memset.c diff --git a/sysdeps/unix/sysv/aix/powerpc/memset.c b/sysdeps/unix/sysv/aix/powerpc/memset.c new file mode 100644 index 0000000000..ef04283430 --- /dev/null +++ b/sysdeps/unix/sysv/aix/powerpc/memset.c @@ -0,0 +1,21 @@ +/* Copyright (C) 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + +/* Until the cache line issues are resolved use the generic implementation. */ +#include From ebe30a97c996be2b55d41129c575ed3c4c58c9a9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 4 Apr 2001 01:54:28 +0000 Subject: [PATCH 2481/4487] Define __getpeername. --- sysdeps/unix/sysv/aix/getpeername.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/aix/getpeername.c b/sysdeps/unix/sysv/aix/getpeername.c index d227e286cd..82a9941ebf 100644 --- a/sysdeps/unix/sysv/aix/getpeername.c +++ b/sysdeps/unix/sysv/aix/getpeername.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2001 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,3 +25,4 @@ getpeername (int fd, __SOCKADDR_ARG addr, socklen_t *len) { return ngetpeername (fd, addr.__sockaddr__, len); } +weak_alias (getpeername,__getpeername) From 2fc87911c77d04928a3b50e3b034be0be5dbca5a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 5 Apr 2001 04:19:17 +0000 Subject: [PATCH 2482/4487] (_dl_open): Fix typo in last change. --- sysdeps/unix/sysv/aix/dl-open.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/aix/dl-open.c b/sysdeps/unix/sysv/aix/dl-open.c index 0189ab465d..ba8e2bf298 100644 --- a/sysdeps/unix/sysv/aix/dl-open.c +++ b/sysdeps/unix/sysv/aix/dl-open.c @@ -85,7 +85,7 @@ _dl_open (const char *file, int mode, const void *caller) { bsize *= 2; dl_info = realloc (dl_info, bsize); - if (new_dl_info == NULL) + if (dl_info == NULL) { (void) __unload ((void *) handle); errno = ENOMEM; From 5e9cba30619516af56d976512592bbd19e668f31 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 5 Apr 2001 05:28:23 +0000 Subject: [PATCH 2483/4487] Don't use the ELF version, define simple replacements here. --- sysdeps/unix/sysv/aix/dl-libc.c | 42 ++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/aix/dl-libc.c b/sysdeps/unix/sysv/aix/dl-libc.c index 9a25fc809e..a555559ce8 100644 --- a/sysdeps/unix/sysv/aix/dl-libc.c +++ b/sysdeps/unix/sysv/aix/dl-libc.c @@ -1 +1,41 @@ -#include +/* Handle loading and unloading shared objects for internal libc purposes. + Copyright (C) 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include + +void * +__libc_dlopen (const char *name) +{ + return _dl_open (name, RTLD_LAZY, NULL); +} + +void * +__libc_dlsym (void *map, const char *name) +{ + return _dl_sym (map, name, NULL); +} + +int +__libc_dlclose (void *map) +{ + _dl_close (__map); + return 0; +} From 4adec71eab5d67e036233ff2ec8d5edcd13ea713 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 6 Apr 2001 22:37:39 +0000 Subject: [PATCH 2484/4487] (GET_NPROCS_PARSER): added code to parse new 2.4 format. (GET_NPROCS_CONF_PARSER): likewise. --- sysdeps/unix/sysv/linux/alpha/getsysstats.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/getsysstats.c b/sysdeps/unix/sysv/linux/alpha/getsysstats.c index 27355b5fe4..d86fc213bf 100644 --- a/sysdeps/unix/sysv/linux/alpha/getsysstats.c +++ b/sysdeps/unix/sysv/linux/alpha/getsysstats.c @@ -29,7 +29,9 @@ If there is no "CPUs ..." line then we are on a UP system. */ \ (RESULT) = 1; \ while (fgets_unlocked (BUFFER, sizeof (BUFFER), FP) != NULL) \ - if (sscanf (BUFFER, "CPUs probed %*d active %d", &(RESULT)) == 1) \ + if ((sscanf (BUFFER, "cpus active : %d", &(RESULT)) == 1) \ + || (sscanf (BUFFER, "CPUs probed %*d active %d", \ + &(RESULT)) == 1)) \ break; \ } \ while (0) @@ -46,7 +48,8 @@ If there is no "CPUs ..." line then we are on a UP system. */ \ (RESULT) = 1; \ while (fgets_unlocked ((BUFFER), sizeof (BUFFER), (FP)) != NULL) \ - if (sscanf (buffer, "CPUs probed %d", &(RESULT)) == 1) \ + if ((sscanf (buffer, "cpus detected : %d", &(RESULT)) == 1) \ + || (sscanf (buffer, "CPUs probed %d", &(RESULT)) == 1)) \ break; \ } \ while (0) From 6b8a08a9d6604a64393e3e14a8f8bed40173be4a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 7 Apr 2001 23:36:25 +0000 Subject: [PATCH 2485/4487] Add a few new files. --- sysdeps/unix/sysv/aix/Dist | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysdeps/unix/sysv/aix/Dist b/sysdeps/unix/sysv/aix/Dist index 0482d24d38..4d0cb14afb 100644 --- a/sysdeps/unix/sysv/aix/Dist +++ b/sysdeps/unix/sysv/aix/Dist @@ -1,7 +1,10 @@ dl-sym.c dl-open.c dl-close.c +dl-libc.c +dlldr.h kernel_proto.h bits/utmpx.h gnu/lib-names.h uitrunc.c +utmpx.h From fefb54b6d61afd2970ade60d05a321a740a0b84a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 03:58:11 +0000 Subject: [PATCH 2486/4487] (INLINE_SYSCALL): Fix typo; s/==/=/ for assignment. --- sysdeps/unix/sysv/linux/hppa/sysdep.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.h b/sysdeps/unix/sysv/linux/hppa/sysdep.h index 73d9a38b1a..10e360dfd5 100644 --- a/sysdeps/unix/sysv/linux/hppa/sysdep.h +++ b/sysdeps/unix/sysv/linux/hppa/sysdep.h @@ -1,5 +1,5 @@ /* Assembler macros for PA-RISC. - Copyright (C) 1999 Free Software Foundation, Inc. + Copyright (C) 1999, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, , August 1999. Linux/PA-RISC changes by Philipp Rumpf, , March 2000. @@ -206,7 +206,7 @@ } \ if (__sys_res >= (unsigned long)-4095) { \ __set_errno(-__sys_res); \ - __sys_res == (unsigned long)-1; \ + __sys_res = (unsigned long)-1; \ } \ __sys_res; \ }) From 693ba46706f3d77bcc53bafa5c7013af911f1370 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:30:48 +0000 Subject: [PATCH 2487/4487] Additional files to distribute for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/Dist | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/cris/Dist diff --git a/sysdeps/unix/sysv/linux/cris/Dist b/sysdeps/unix/sysv/linux/cris/Dist new file mode 100644 index 0000000000..1b8a7e61a4 --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/Dist @@ -0,0 +1,5 @@ +clone.S +setresuid.c +setresgid.c +setfsuid.c +setfsgid.c From 58dc8bd3f5c25ec32196c30a84611ad68289e253 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:31:00 +0000 Subject: [PATCH 2488/4487] Additional rules for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/cris/Makefile diff --git a/sysdeps/unix/sysv/linux/cris/Makefile b/sysdeps/unix/sysv/linux/cris/Makefile new file mode 100644 index 0000000000..cebaa94134 --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/Makefile @@ -0,0 +1,8 @@ +ifeq ($(subdir),misc) +sysdep_routines += setfsgid setfsuid setresgid setresuid +endif + +ifeq ($(subdir),signal) +sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \ + rt_sigqueueinfo rt_sigaction rt_sigpending +endif From 2e3938d45f04364f2f97dc3c149441a9149c12b8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:31:15 +0000 Subject: [PATCH 2489/4487] libio config for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/_G_config.h | 105 +++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/cris/_G_config.h diff --git a/sysdeps/unix/sysv/linux/cris/_G_config.h b/sysdeps/unix/sysv/linux/cris/_G_config.h new file mode 100644 index 0000000000..42fef4d288 --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/_G_config.h @@ -0,0 +1,105 @@ +/* This file is needed by libio to define various configuration parameters. + These are always the same in the GNU C library. */ + +/* We have to keep a separate copy for CRIS, because we don't use thunks, + and libstdc++-v2 (which we currently use) cares. The C++ ABI is + changed totally with GCC 3.0, where we should not need a separate file. */ + +#ifndef _G_config_h +#define _G_config_h 1 + +/* Define types for libio in terms of the standard internal type names. */ + +#include +#define __need_size_t +#define __need_wchar_t +#define __need_wint_t +#define __need_NULL +#include +#ifndef _WINT_T +/* Integral type unchanged by default argument promotions that can + hold any value corresponding to members of the extended character + set, as well as at least one value that does not correspond to any + member of the extended character set. */ +# define _WINT_T +typedef unsigned int wint_t; +#endif +#define __need_mbstate_t +#include +#define _G_size_t size_t +typedef struct +{ + __off_t __pos; + __mbstate_t __state; +} _G_fpos_t; +typedef struct +{ + __off64_t __pos; + __mbstate_t __state; +} _G_fpos64_t; +#define _G_ssize_t __ssize_t +#define _G_off_t __off_t +#define _G_off64_t __off64_t +#define _G_pid_t __pid_t +#define _G_uid_t __uid_t +#define _G_wchar_t wchar_t +#define _G_wint_t wint_t +#define _G_stat64 stat64 +#include +typedef union +{ + struct __gconv_info __cd; + struct + { + struct __gconv_info __cd; + struct __gconv_step_data __data; + } __combined; +} _G_iconv_t; + +typedef int _G_int16_t __attribute__ ((__mode__ (__HI__))); +typedef int _G_int32_t __attribute__ ((__mode__ (__SI__))); +typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__))); +typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__))); + +#define _G_HAVE_BOOL 1 + + +/* These library features are always available in the GNU C library. */ +#define _G_HAVE_ATEXIT 1 +#define _G_HAVE_SYS_CDEFS 1 +#define _G_HAVE_SYS_WAIT 1 +#define _G_NEED_STDARG_H 1 +#define _G_va_list __gnuc_va_list + +#define _G_HAVE_PRINTF_FP 1 +#define _G_HAVE_MMAP 1 +#define _G_HAVE_LONG_DOUBLE_IO 1 +#define _G_HAVE_IO_FILE_OPEN 1 +#define _G_HAVE_IO_GETLINE_INFO 1 + +#define _G_IO_IO_FILE_VERSION 0x20001 + +#define _G_OPEN64 __open64 +#define _G_LSEEK64 __lseek64 +#define _G_FSTAT64(fd,buf) __fxstat64 (_STAT_VER, fd, buf) + +/* This is defined by if `st_blksize' exists. */ +#define _G_HAVE_ST_BLKSIZE defined (_STATBUF_ST_BLKSIZE) + +#define _G_BUFSIZ 8192 + +/* These are the vtbl details for ELF. */ +#define _G_NAMES_HAVE_UNDERSCORE 0 +#define _G_VTABLE_LABEL_HAS_LENGTH 1 +#undef _G_USING_THUNKS +#define _G_VTABLE_LABEL_PREFIX "_vt." +#define _G_VTABLE_LABEL_PREFIX_ID _vt. + + +#if defined __cplusplus || defined __STDC__ +# define _G_ARGS(ARGLIST) ARGLIST +#else +# define _G_ARGS(ARGLIST) () +#endif + +#endif /* _G_config.h */ From d2d1cc6e893ef4f449924c7bb1f3201483eaf743 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:31:35 +0000 Subject: [PATCH 2490/4487] definitions for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/bits/fcntl.h | 179 ++++++++++++++++++++++ 1 file changed, 179 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/cris/bits/fcntl.h diff --git a/sysdeps/unix/sysv/linux/cris/bits/fcntl.h b/sysdeps/unix/sysv/linux/cris/bits/fcntl.h new file mode 100644 index 0000000000..87c6c1950c --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/bits/fcntl.h @@ -0,0 +1,179 @@ +/* O_*, F_*, FD_* bit values for Linux. + Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _FCNTL_H +# error "Never use directly; include instead." +#endif + + +#include + +/* open/fcntl - O_SYNC is only implemented on blocks devices and on files + located on an ext2 file system */ +#define O_ACCMODE 0003 +#define O_RDONLY 00 +#define O_WRONLY 01 +#define O_RDWR 02 +#define O_CREAT 0100 /* not fcntl */ +#define O_EXCL 0200 /* not fcntl */ +#define O_NOCTTY 0400 /* not fcntl */ +#define O_TRUNC 01000 /* not fcntl */ +#define O_APPEND 02000 +#define O_NONBLOCK 04000 +#define O_NDELAY O_NONBLOCK +#define O_SYNC 010000 +#define O_FSYNC O_SYNC +#define O_ASYNC 020000 + +#ifdef __USE_GNU +# define O_DIRECT 040000 /* Direct disk access. */ +# define O_DIRECTORY 0200000 /* Must be a directory. */ +# define O_NOFOLLOW 0400000 /* Do not follow links. */ +#endif + +/* For now Linux has synchronisity options for data and read operations. + We define the symbols here but let them do the same as O_SYNC since + this is a superset. */ +#if defined __USE_POSIX199309 || defined __USE_UNIX98 +# define O_DSYNC O_SYNC /* Synchronize data. */ +# define O_RSYNC O_SYNC /* Synchronize read operations. */ +#endif + +#ifdef __USE_LARGEFILE64 +# define O_LARGEFILE 0100000 +#endif + +/* Values for the second argument to `fcntl'. */ +#define F_DUPFD 0 /* Duplicate file descriptor. */ +#define F_GETFD 1 /* Get file descriptor flags. */ +#define F_SETFD 2 /* Set file descriptor flags. */ +#define F_GETFL 3 /* Get file status flags. */ +#define F_SETFL 4 /* Set file status flags. */ +#ifndef __USE_FILE_OFFSET64 +# define F_GETLK 5 /* Get record locking info. */ +# define F_SETLK 6 /* Set record locking info (non-blocking). */ +# define F_SETLKW 7 /* Set record locking info (blocking). */ +#else +# define F_GETLK F_GETLK64 /* Get record locking info. */ +# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/ +# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */ +#endif +#define F_GETLK64 12 /* Get record locking info. */ +#define F_SETLK64 13 /* Set record locking info (non-blocking). */ +#define F_SETLKW64 14 /* Set record locking info (blocking). */ + +#if defined __USE_BSD || defined __USE_XOPEN2K +# define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */ +# define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */ +#endif + +#ifdef __USE_GNU +# define F_SETSIG 10 /* Set number of signal to be sent. */ +# define F_GETSIG 11 /* Get number of signal to be sent. */ +#endif + +#ifdef __USE_GNU +# 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. */ +#endif + +/* For F_[GET|SET]FL. */ +#define FD_CLOEXEC 1 /* actually anything with low bit set goes */ + +/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */ +#define F_RDLCK 0 /* Read lock. */ +#define F_WRLCK 1 /* Write lock. */ +#define F_UNLCK 2 /* Remove lock. */ + +/* For old implementation of bsd flock(). */ +#define F_EXLCK 4 /* or 3 */ +#define F_SHLCK 8 /* or 4 */ + +#ifdef __USE_BSD +/* Operations for bsd flock(), also used by the kernel implementation. */ +# define LOCK_SH 1 /* shared lock */ +# define LOCK_EX 2 /* exclusive lock */ +# define LOCK_NB 4 /* or'd with one of the above to prevent + blocking */ +# define LOCK_UN 8 /* remove lock */ +#endif + +#ifdef __USE_GNU +# define LOCK_MAND 32 /* This is a mandatory flock: */ +# define LOCK_READ 64 /* ... which allows concurrent read operations. */ +# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */ +# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */ +#endif + +#ifdef __USE_GNU +/* Types of directory notifications that may be requested with F_NOTIFY. */ +# define DN_ACCESS 0x00000001 /* File accessed. */ +# define DN_MODIFY 0x00000002 /* File modified. */ +# define DN_CREATE 0x00000004 /* File created. */ +# define DN_DELETE 0x00000008 /* File removed. */ +# define DN_RENAME 0x00000010 /* File renamed. */ +# define DN_ATTRIB 0x00000020 /* File changed attibutes. */ +# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */ +#endif + +struct flock + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ +#ifndef __USE_FILE_OFFSET64 + __off_t l_start; /* Offset where the lock begins. */ + __off_t l_len; /* Size of the locked area; zero means until EOF. */ +#else + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ +#endif + __pid_t l_pid; /* Process holding the lock. */ + }; + +#ifdef __USE_LARGEFILE64 +struct flock64 + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ + __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. */ + }; +#endif + +/* Define some more compatibility macros to be backward compatible with + BSD systems which did not managed to hide these kernel macros. */ +#ifdef __USE_BSD +# define FAPPEND O_APPEND +# define FFSYNC O_FSYNC +# define FASYNC O_ASYNC +# define FNONBLOCK O_NONBLOCK +# define FNDELAY O_NDELAY +#endif /* Use BSD. */ + +/* Advise to `posix_fadvise'. */ +#ifdef __USE_XOPEN2K +# define POSIX_FADV_NORMAL 0 /* No further special treatment. */ +# define POSIX_FADV_RANDOM 1 /* Expect random page references. */ +# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */ +# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */ +# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ +#endif From 187454c6423985cb0ebf48bd760fbab6a52f34ac Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:31:50 +0000 Subject: [PATCH 2491/4487] definitions for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/bits/mman.h | 93 ++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/cris/bits/mman.h diff --git a/sysdeps/unix/sysv/linux/cris/bits/mman.h b/sysdeps/unix/sysv/linux/cris/bits/mman.h new file mode 100644 index 0000000000..f97e84183b --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/bits/mman.h @@ -0,0 +1,93 @@ +/* Definitions for POSIX memory map interface. Linux/CRIS version. + Copyright (C) 1997, 2000, 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_MMAN_H +# error "Never use directly; include instead." +#endif + +/* The following definitions basically come from the kernel headers. + But the kernel header is not namespace clean. */ + + +/* Protections are chosen from these bits, OR'd together. The + implementation does not necessarily support PROT_EXEC or PROT_WRITE + without PROT_READ. The only guarantees are that no writing will be + allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ + +#define PROT_READ 0x1 /* Page can be read. */ +#define PROT_WRITE 0x2 /* Page can be written. */ +#define PROT_EXEC 0x4 /* Page can be executed. */ +#define PROT_NONE 0x0 /* Page can not be accessed. */ + +/* Sharing types (must choose one and only one of these). */ +#define MAP_SHARED 0x01 /* Share changes. */ +#define MAP_PRIVATE 0x02 /* Changes are private. */ +#ifdef __USE_MISC +# define MAP_TYPE 0x0f /* Mask for type of mapping. */ +#endif + +/* Other flags. */ +#define MAP_FIXED 0x10 /* Interpret addr exactly. */ +#ifdef __USE_MISC +# define MAP_FILE 0 +# define MAP_ANONYMOUS 0x20 /* Don't use a file. */ +# define MAP_ANON MAP_ANONYMOUS +#endif + +/* These are Linux-specific. */ +#ifdef __USE_MISC +# define MAP_GROWSDOWN 0x0100 /* Stack-like segment. */ +# define MAP_DENYWRITE 0x0800 /* ETXTBSY */ +# define MAP_EXECUTABLE 0x1000 /* Mark it as an executable. */ +# define MAP_LOCKED 0x2000 /* Lock the mapping. */ +# define MAP_NORESERVE 0x4000 /* Don't check for reservations. */ +#endif + +/* Flags to `msync'. */ +#define MS_ASYNC 1 /* Sync memory asynchronously. */ +#define MS_SYNC 4 /* Synchronous memory sync. */ +#define MS_INVALIDATE 2 /* Invalidate the caches. */ + +/* Flags for `mlockall'. */ +#define MCL_CURRENT 1 /* Lock all currently mapped pages. */ +#define MCL_FUTURE 2 /* Lock all additions to address + space. */ + +/* Flags for `mremap'. */ +#ifdef __USE_GNU +# define MREMAP_MAYMOVE 1 +#endif + +/* Advice to `madvise'. */ +#ifdef __USE_BSD +# define MADV_NORMAL 0 /* No further special treatment. */ +# define MADV_RANDOM 1 /* Expect random page references. */ +# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define MADV_WILLNEED 3 /* Will need these pages. */ +# define MADV_DONTNEED 4 /* Don't need these pages. */ +#endif + +/* The POSIX people had to invent similar names for the same things. */ +#ifdef __USE_XOPEN2K +# define POSIX_MADV_NORMAL 0 /* No further special treatment. */ +# define POSIX_MADV_RANDOM 1 /* Expect random page references. */ +# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */ +# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */ +#endif From e1eebead7a3bfeec63aae5fc6a26d4f877017164 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:32:15 +0000 Subject: [PATCH 2492/4487] definitions for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/bits/resource.h | 209 +++++++++++++++++++ 1 file changed, 209 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/cris/bits/resource.h diff --git a/sysdeps/unix/sysv/linux/cris/bits/resource.h b/sysdeps/unix/sysv/linux/cris/bits/resource.h new file mode 100644 index 0000000000..f7bfe424e2 --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/bits/resource.h @@ -0,0 +1,209 @@ +/* Bit values & structures for resource limits. Linux/CRIS version. + Copyright (C) 1994,1996,1997,1998,1999,2000, 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_RESOURCE_H +# error "Never use directly; include instead." +#endif + +#include + +/* Transmute defines to enumerations. The macro re-definitions are + necessary because some programs want to test for operating system + features with #ifdef RUSAGE_SELF. In ISO C the reflexive + definition is a no-op. */ + +/* Kinds of resource limit. */ +enum __rlimit_resource +{ + /* Per-process CPU limit, in seconds. */ + RLIMIT_CPU = 0, +#define RLIMIT_CPU RLIMIT_CPU + + /* Largest file that can be created, in bytes. */ + RLIMIT_FSIZE = 1, +#define RLIMIT_FSIZE RLIMIT_FSIZE + + /* Maximum size of data segment, in bytes. */ + RLIMIT_DATA = 2, +#define RLIMIT_DATA RLIMIT_DATA + + /* Maximum size of stack segment, in bytes. */ + RLIMIT_STACK = 3, +#define RLIMIT_STACK RLIMIT_STACK + + /* Largest core file that can be created, in bytes. */ + RLIMIT_CORE = 4, +#define RLIMIT_CORE RLIMIT_CORE + + /* Largest resident set size, in bytes. + This affects swapping; processes that are exceeding their + resident set size will be more likely to have physical memory + taken from them. */ + RLIMIT_RSS = 5, +#define RLIMIT_RSS RLIMIT_RSS + + /* Number of open files. */ + RLIMIT_NOFILE = 7, + RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */ +#define RLIMIT_NOFILE RLIMIT_NOFILE +#define RLIMIT_OFILE RLIMIT_OFILE + + /* Address space limit. */ + RLIMIT_AS = 9, +#define RLIMIT_AS RLIMIT_AS + + /* Number of processes. */ + RLIMIT_NPROC = 6, +#define RLIMIT_NPROC RLIMIT_NPROC + + /* Locked-in-memory address space. */ + RLIMIT_MEMLOCK = 8, +#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK + + /* Maximum number of file locks. */ + RLIMIT_LOCKS = 10, +#define RLIMIT_LOCKS RLIMIT_LOCKS + + RLIMIT_NLIMITS = 11, + RLIM_NLIMITS = RLIMIT_NLIMITS +#define RLIMIT_NLIMITS RLIMIT_NLIMITS +#define RLIM_NLIMITS RLIM_NLIMITS +}; + +/* Value to indicate that there is no limit. */ +#ifndef __USE_FILE_OFFSET64 +# define RLIM_INFINITY ((unsigned long int)(~0UL)) +#else +# define RLIM_INFINITY 0xffffffffffffffffuLL +#endif + +#ifdef __USE_LARGEFILE64 +# define RLIM64_INFINITY 0xffffffffffffffffuLL +#endif + +/* We can represent all limits. */ +#define RLIM_SAVED_MAX RLIM_INFINITY +#define RLIM_SAVED_CUR RLIM_INFINITY + + +/* Type for resource quantity measurement. */ +#ifndef __USE_FILE_OFFSET64 +typedef __rlim_t rlim_t; +#else +typedef __rlim64_t rlim_t; +#endif +#ifdef __USE_LARGEFILE64 +typedef __rlim64_t rlim64_t; +#endif + +struct rlimit + { + /* The current (soft) limit. */ + rlim_t rlim_cur; + /* The hard limit. */ + rlim_t rlim_max; + }; + +#ifdef __USE_LARGEFILE64 +struct rlimit64 + { + /* The current (soft) limit. */ + rlim64_t rlim_cur; + /* The hard limit. */ + rlim64_t rlim_max; + }; +#endif + +/* Whose usage statistics do you want? */ +enum __rusage_who +{ + /* The calling process. */ + RUSAGE_SELF = 0, +#define RUSAGE_SELF RUSAGE_SELF + + /* All of its terminated child processes. */ + RUSAGE_CHILDREN = -1, +#define RUSAGE_CHILDREN RUSAGE_CHILDREN + + /* Both. */ + RUSAGE_BOTH = -2 +#define RUSAGE_BOTH RUSAGE_BOTH +}; + +#define __need_timeval +#include /* For `struct timeval'. */ + +/* Structure which says how much of each resource has been used. */ +struct rusage + { + /* Total amount of user time used. */ + struct timeval ru_utime; + /* Total amount of system time used. */ + struct timeval ru_stime; + /* Maximum resident set size (in kilobytes). */ + long int ru_maxrss; + /* Amount of sharing of text segment memory + with other processes (kilobyte-seconds). */ + long int ru_ixrss; + /* Amount of data segment memory used (kilobyte-seconds). */ + long int ru_idrss; + /* Amount of stack memory used (kilobyte-seconds). */ + long int ru_isrss; + /* Number of soft page faults (i.e. those serviced by reclaiming + a page from the list of pages awaiting reallocation. */ + long int ru_minflt; + /* Number of hard page faults (i.e. those that required I/O). */ + long int ru_majflt; + /* Number of times a process was swapped out of physical memory. */ + long int ru_nswap; + /* Number of input operations via the file system. Note: This + and `ru_oublock' do not include operations with the cache. */ + long int ru_inblock; + /* Number of output operations via the file system. */ + long int ru_oublock; + /* Number of IPC messages sent. */ + long int ru_msgsnd; + /* Number of IPC messages received. */ + long int ru_msgrcv; + /* Number of signals delivered. */ + long int ru_nsignals; + /* Number of voluntary context switches, i.e. because the process + gave up the process before it had to (usually to wait for some + resource to be available). */ + long int ru_nvcsw; + /* Number of involuntary context switches, i.e. a higher priority process + became runnable or the current process used up its time slice. */ + long int ru_nivcsw; + }; + +/* Priority limits. */ +#define PRIO_MIN -20 /* Minimum priority a process can have. */ +#define PRIO_MAX 20 /* Maximum priority a process can have. */ + +/* The type of the WHICH argument to `getpriority' and `setpriority', + indicating what flavor of entity the WHO argument specifies. */ +enum __priority_which +{ + PRIO_PROCESS = 0, /* WHO is a process ID. */ +#define PRIO_PROCESS PRIO_PROCESS + PRIO_PGRP = 1, /* WHO is a process group ID. */ +#define PRIO_PGRP PRIO_PGRP + PRIO_USER = 2 /* WHO is a user ID. */ +#define PRIO_USER PRIO_USER +}; From 223bf226827099ff6d9e01dcbb548e829287fa32 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:32:28 +0000 Subject: [PATCH 2493/4487] brk implementation for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/brk.c | 44 ++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/cris/brk.c diff --git a/sysdeps/unix/sysv/linux/cris/brk.c b/sysdeps/unix/sysv/linux/cris/brk.c new file mode 100644 index 0000000000..32a514523d --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/brk.c @@ -0,0 +1,44 @@ +/* brk system call for Linux/CRIS. + Copyright (C) 1995, 1996, 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include + +/* This must be initialized data because commons can't have aliases. */ +void *__curbrk = 0; + +int +__brk (void *addr) +{ + unsigned char *newbrk; + + newbrk = (unsigned char *) INLINE_SYSCALL (brk, 1, addr); + + __curbrk = newbrk; + + if (newbrk < (unsigned char *) addr) + { + __set_errno (ENOMEM); + return -1; + } + + return 0; +} +weak_alias (__brk, brk) From 2a509b902ed3e6074f37e1067c649ed27de1ab90 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:32:41 +0000 Subject: [PATCH 2494/4487] chown implementation for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/chown.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/cris/chown.c diff --git a/sysdeps/unix/sysv/linux/cris/chown.c b/sysdeps/unix/sysv/linux/cris/chown.c new file mode 100644 index 0000000000..1961622564 --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/chown.c @@ -0,0 +1 @@ +#include From 0f5e0abce9ce00848de580c799e9dcdb1102fa90 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:32:55 +0000 Subject: [PATCH 2495/4487] clone implementation for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/clone.S | 88 ++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/cris/clone.S diff --git a/sysdeps/unix/sysv/linux/cris/clone.S b/sysdeps/unix/sysv/linux/cris/clone.S new file mode 100644 index 0000000000..c501c86627 --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/clone.S @@ -0,0 +1,88 @@ +/* Copyright (C) 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#define _ERRNO_H 1 +#include + +/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg); */ + + .syntax no_register_prefix + + .text +ENTRY (__clone) + /* Sanity check arguments: No NULL function pointers. Allow a NULL + stack pointer though; it makes the kernel allocate stack. */ + test.d r10 + beq 1f + nop + + /* We need to muck with a few registers. */ + movem r1,[sp=sp-8] + + /* Save the function pointer and argument. We can't save them + onto the new stack since it can be NULL. */ + move.d r10,r0 + move.d r13,r1 + + /* Move the other arguments into place for the system call. */ + move.d r11,r10 + move.d r12,r11 + + /* Do the system call. */ + movu.w SYS_ify (clone),r9 + break 13 + test.d r10 + beq .Lthread_start + nop + + /* Jump to error handler if we get (unsigned) -4096 .. 0xffffffff. */ + cmps.w -4096,r10 + bhs 0f + movem [sp+],r1 + + /* In parent, successful return. (Avoid using "ret" - it's a macro.) */ + Ret + nop + +.Lthread_start: + /* Terminate frame pointers here. */ + moveq 0,r8 + + /* I've told you once. */ + move.d r1,r10 + jsr r0 + + SETUP_PIC + PLTCALL (_exit) + + /* Die horribly. */ + test.d [6809] + + /* Stop the unstoppable. */ +9: + ba 9b + nop + +/* Local error handler. */ +1: + movs.w -EINVAL,r10 + /* Drop through into the ordinary error handler. */ +PSEUDO_END (__clone) + +weak_alias (__clone, clone) From dc778674f387153910d411cc8a4a98afc23a8f4a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:33:08 +0000 Subject: [PATCH 2496/4487] fchown implementation for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/fchown.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/cris/fchown.c diff --git a/sysdeps/unix/sysv/linux/cris/fchown.c b/sysdeps/unix/sysv/linux/cris/fchown.c new file mode 100644 index 0000000000..3a69ecc9e7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/fchown.c @@ -0,0 +1 @@ +#include From d00b608d09b0c99942d3336e1fdd9a9e724bb4fb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:33:52 +0000 Subject: [PATCH 2497/4487] fcntl implementation for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/fcntl.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/cris/fcntl.c diff --git a/sysdeps/unix/sysv/linux/cris/fcntl.c b/sysdeps/unix/sysv/linux/cris/fcntl.c new file mode 100644 index 0000000000..ea951bc4f9 --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/fcntl.c @@ -0,0 +1 @@ +#include From 49b99835586012375c066280f02c2e576a1c10fe Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:34:09 +0000 Subject: [PATCH 2498/4487] __fxstat implementation for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/fxstat.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/cris/fxstat.c diff --git a/sysdeps/unix/sysv/linux/cris/fxstat.c b/sysdeps/unix/sysv/linux/cris/fxstat.c new file mode 100644 index 0000000000..4f219f0b9d --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/fxstat.c @@ -0,0 +1 @@ +#include From f96ae8fee8eec80c92ffa6c309e16e4c21435cd7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:34:34 +0000 Subject: [PATCH 2499/4487] getegid implementation for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/getegid.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/cris/getegid.c diff --git a/sysdeps/unix/sysv/linux/cris/getegid.c b/sysdeps/unix/sysv/linux/cris/getegid.c new file mode 100644 index 0000000000..37b4b4a530 --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/getegid.c @@ -0,0 +1 @@ +#include From ac9292a1344eff6991c5b792650349c510094584 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:34:52 +0000 Subject: [PATCH 2500/4487] geteuid implementation for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/geteuid.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/cris/geteuid.c diff --git a/sysdeps/unix/sysv/linux/cris/geteuid.c b/sysdeps/unix/sysv/linux/cris/geteuid.c new file mode 100644 index 0000000000..ebcb555b5e --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/geteuid.c @@ -0,0 +1 @@ +#include From 58e6c6c2537d58a152f3cd33f984518fca4cc0c5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:35:05 +0000 Subject: [PATCH 2501/4487] getgid implementation for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/getgid.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/cris/getgid.c diff --git a/sysdeps/unix/sysv/linux/cris/getgid.c b/sysdeps/unix/sysv/linux/cris/getgid.c new file mode 100644 index 0000000000..0a4d6061f0 --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/getgid.c @@ -0,0 +1 @@ +#include From 77e0283665150b44e913fe111279f19f44d40678 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:35:21 +0000 Subject: [PATCH 2502/4487] getgroups implementation for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/getgroups.c | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/cris/getgroups.c diff --git a/sysdeps/unix/sysv/linux/cris/getgroups.c b/sysdeps/unix/sysv/linux/cris/getgroups.c new file mode 100644 index 0000000000..102ea24e14 --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/getgroups.c @@ -0,0 +1,2 @@ +/* We also have to rewrite the kernel gid_t to the user land type. */ +#include From 7663b23c29d9638a7cb6b33cbc45526579b935cf Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:35:40 +0000 Subject: [PATCH 2503/4487] getresgid implementation for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/getresgid.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/cris/getresgid.c diff --git a/sysdeps/unix/sysv/linux/cris/getresgid.c b/sysdeps/unix/sysv/linux/cris/getresgid.c new file mode 100644 index 0000000000..b703a414cc --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/getresgid.c @@ -0,0 +1 @@ +#include From ca9495b62e0b3fa5d2a3c7ba8621db0517f62646 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:35:56 +0000 Subject: [PATCH 2504/4487] getresuid implementation for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/getresuid.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/cris/getresuid.c diff --git a/sysdeps/unix/sysv/linux/cris/getresuid.c b/sysdeps/unix/sysv/linux/cris/getresuid.c new file mode 100644 index 0000000000..0b14cefe34 --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/getresuid.c @@ -0,0 +1 @@ +#include From 4fa149869549b96f15ef7099ae0a2ed5dc40e99b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:36:16 +0000 Subject: [PATCH 2505/4487] getrlimit implementation for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/getrlimit.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/cris/getrlimit.c diff --git a/sysdeps/unix/sysv/linux/cris/getrlimit.c b/sysdeps/unix/sysv/linux/cris/getrlimit.c new file mode 100644 index 0000000000..fc06dbd641 --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/getrlimit.c @@ -0,0 +1 @@ +#include From b7119d5193948d8a9c5461a7f9f381b587d51ea0 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:36:29 +0000 Subject: [PATCH 2506/4487] getrlimit64 implementation for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/getrlimit64.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/cris/getrlimit64.c diff --git a/sysdeps/unix/sysv/linux/cris/getrlimit64.c b/sysdeps/unix/sysv/linux/cris/getrlimit64.c new file mode 100644 index 0000000000..fef018f471 --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/getrlimit64.c @@ -0,0 +1 @@ +#include From d4c00be41b28010c2f11668e406a889affb0fc36 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:36:48 +0000 Subject: [PATCH 2507/4487] getuid implementation for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/getuid.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/cris/getuid.c diff --git a/sysdeps/unix/sysv/linux/cris/getuid.c b/sysdeps/unix/sysv/linux/cris/getuid.c new file mode 100644 index 0000000000..d682c79a49 --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/getuid.c @@ -0,0 +1 @@ +#include From 1e1229ee3d6b86e02b7c13506db2b0e9a8a1a041 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:42:48 +0000 Subject: [PATCH 2508/4487] lchown implementation for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/lchown.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/cris/lchown.c diff --git a/sysdeps/unix/sysv/linux/cris/lchown.c b/sysdeps/unix/sysv/linux/cris/lchown.c new file mode 100644 index 0000000000..c89de99ba2 --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/lchown.c @@ -0,0 +1 @@ +#include From 0ef01ce34a3d923c0f6a3cf515695fa3e110829d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:43:05 +0000 Subject: [PATCH 2509/4487] lockf64 implementation for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/lockf64.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/cris/lockf64.c diff --git a/sysdeps/unix/sysv/linux/cris/lockf64.c b/sysdeps/unix/sysv/linux/cris/lockf64.c new file mode 100644 index 0000000000..a88f5a784a --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/lockf64.c @@ -0,0 +1 @@ +#include From 9783a2c16bef1c8f27e6a9d8a44e638418cbe7ca Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:43:24 +0000 Subject: [PATCH 2510/4487] __lxstat implementation for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/lxstat.c | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/cris/lxstat.c diff --git a/sysdeps/unix/sysv/linux/cris/lxstat.c b/sysdeps/unix/sysv/linux/cris/lxstat.c new file mode 100644 index 0000000000..2371cd9719 --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/lxstat.c @@ -0,0 +1,2 @@ +#include + From 1e9050b191fcf985d72c825ca0251e570c2745d6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:43:42 +0000 Subject: [PATCH 2511/4487] mmap implementation for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/mmap.S | 68 +++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/cris/mmap.S diff --git a/sysdeps/unix/sysv/linux/cris/mmap.S b/sysdeps/unix/sysv/linux/cris/mmap.S new file mode 100644 index 0000000000..33030f4ee4 --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/mmap.S @@ -0,0 +1,68 @@ +/* Copyright (C) 1995, 96, 97, 98, 99, 2000, 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +#include "kernel-features.h" + +#include + +/* Rather than dragging in yet another kernel file, , we + define it here. Provide for easy override. */ +#ifndef PAGE_SHIFT +#define PAGE_SHIFT 13 +#endif + + .syntax no_register_prefix + +/* This is __ptr_t + __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset) */ + + ENTRY (__mmap) + + /* Only accept a offset (and address) being a multiple of PAGE_SIZE, + since we only pass the page part in the system call. */ + move.d [sp+4],r9 + btstq (PAGE_SHIFT - 1),r9 + bne 1f + btstq (PAGE_SHIFT - 1),r10 + + bne 1f + lsrq PAGE_SHIFT,r9 + + move [sp],mof + move srp,[sp] + move r9,srp + + movu.b SYS_ify (mmap2),r9 + break 13 + + cmps.w -4096,r10 + bhs 0f + move [sp],srp + + Ret + nop + +/* Local error handler. */ +1: + movs.w -EINVAL,r10 + /* Drop through into the ordinary error handler. */ +PSEUDO_END (__mmap) + +weak_alias (__mmap, mmap) From 83fcbc9f9c570a419e3cc4f9de87e2666e76b70a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:44:45 +0000 Subject: [PATCH 2512/4487] mmap64 implementation for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/mmap64.S | 91 +++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/cris/mmap64.S diff --git a/sysdeps/unix/sysv/linux/cris/mmap64.S b/sysdeps/unix/sysv/linux/cris/mmap64.S new file mode 100644 index 0000000000..acf6ca33bf --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/mmap64.S @@ -0,0 +1,91 @@ +/* Copyright (C) 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +#include "kernel-features.h" + +#include + +/* Rather than dragging in yet another kernel file, , we + define it here. Provide for easy override. */ +#ifndef PAGE_SHIFT +#define PAGE_SHIFT 13 +#endif + +/* This is: __ptr_t + __mmap64 (__ptr_t addr, size_t len, int prot, int flags, int fd, + off64_t offset); */ + +/* This was done in C, but the resulting code didn't look anywhere near + nice, and mmap64 is important enough to have fast code. Rather than + fixing (the generic bits in) gcc, we make sure not to depend on it by + writing code that GCC cannot reasonably generate. */ + + .syntax no_register_prefix + +ENTRY (__mmap64) + + move [sp],mof + move.d [sp+4],r9 + + /* Only accept an offset being a multiple of PAGE_SIZE, ditto address. */ + btstq (PAGE_SHIFT - 1),r9 + bne 1f + lsrq PAGE_SHIFT,r9 + + btstq (PAGE_SHIFT - 1),r10 + bne 1f + move.d r9,[sp] + + /* We have to store the adjusted part somewhere we can "or" from. + No registers available, so let's re-use the incoming low-part + parameter location. */ + move.d [sp+8],r9 + + swapwbr r9 + /* Check if the highest bits (now the lowest bits) are zero. They + must be, since we're actually calling a system function + specifying the size in *pages* in a single dword. Thus you can + mmap64 PAGE_SIZE * 4 Gbyte. */ + btstq (PAGE_SHIFT - 1),r9 + bne 1f + swapwbr r9 + + lslq (32 - PAGE_SHIFT),r9 + or.d [sp],r9 + move srp,[sp] + move r9,srp + + movu.b SYS_ify (mmap2),r9 + break 13 + + cmps.w -4096,r10 + bhs 0f + move [sp],srp + + Ret + nop + +/* Local error handler. */ +1: + movs.w -EINVAL,r10 + /* Drop through into the ordinary error handler. */ +PSEUDO_END (__mmap64) + +weak_alias (__mmap64, mmap64) From 6f41227c00aa842f5f93376455fe515bb13fb00b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:45:00 +0000 Subject: [PATCH 2513/4487] msgctl implementation for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/msgctl.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/cris/msgctl.c diff --git a/sysdeps/unix/sysv/linux/cris/msgctl.c b/sysdeps/unix/sysv/linux/cris/msgctl.c new file mode 100644 index 0000000000..9f9b8431a3 --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/msgctl.c @@ -0,0 +1 @@ +#include From efe7db140e5f055d63fb894750befc02ea0eceba Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:45:23 +0000 Subject: [PATCH 2514/4487] Profile helper definitions for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/profil-counter.h | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/cris/profil-counter.h diff --git a/sysdeps/unix/sysv/linux/cris/profil-counter.h b/sysdeps/unix/sysv/linux/cris/profil-counter.h new file mode 100644 index 0000000000..8bbce544d1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/profil-counter.h @@ -0,0 +1,26 @@ +/* Low-level statistical profiling support function. Linux/CRIS version. + Copyright (C) 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +static void +profil_counter (int signo, struct sigcontext *scp) +{ + profil_count ((void *) scp->regs.irp); +} From 0cfe451872bc8c5aa67c421d0f8bc8ece3a936ae Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:45:39 +0000 Subject: [PATCH 2515/4487] Register dump code for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/register-dump.h | 117 +++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/cris/register-dump.h diff --git a/sysdeps/unix/sysv/linux/cris/register-dump.h b/sysdeps/unix/sysv/linux/cris/register-dump.h new file mode 100644 index 0000000000..e8a52f73fc --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/register-dump.h @@ -0,0 +1,117 @@ +/* Dump registers. + Copyright (C) 1998, 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include + +/* We will print the register dump in this format: + + R0: XXXXXXXX R1: XXXXXXXX R2: XXXXXXXX R3: XXXXXXXX + R4: XXXXXXXX R5: XXXXXXXX R6: XXXXXXXX R7: XXXXXXXX + R8: XXXXXXXX R9: XXXXXXXX R10: XXXXXXXX R11: XXXXXXXX + R12: XXXXXXXX R13: XXXXXXXX SP: XXXXXXXX PC: XXXXXXXX +DCCR: XXXXXXXX SRP: XXXXXXXX */ + +static void +hexvalue (unsigned long int value, char *buf, size_t len) +{ + char *cp = _itoa_word (value, buf + len, 16, 0); + while (cp > buf) + *--cp = '0'; +} + +static void register_dump (int fd, struct sigcontext *ctx) +{ + char regs[18][8]; + struct iovec iov[36], *next_iov = iov; + struct pt_regs *rx = &ctx->regs; + +#define ADD_STRING(str) \ + next_iov->iov_base = (char *) (str); \ + next_iov->iov_len = strlen (str); \ + ++next_iov +#define ADD_MEM(str, len) \ + next_iov->iov_base = (str); \ + next_iov->iov_len = (len); \ + ++next_iov + + /* Generate strings of register contents. */ + hexvalue (rx->r0, regs[0], 8); + hexvalue (rx->r1, regs[1], 8); + hexvalue (rx->r2, regs[2], 8); + hexvalue (rx->r3, regs[3], 8); + hexvalue (rx->r4, regs[4], 8); + hexvalue (rx->r5, regs[5], 8); + hexvalue (rx->r6, regs[6], 8); + hexvalue (rx->r7, regs[7], 8); + hexvalue (rx->r8, regs[8], 8); + hexvalue (rx->r9, regs[9], 8); + hexvalue (rx->r10, regs[10], 8); + hexvalue (rx->r11, regs[11], 8); + hexvalue (rx->r12, regs[12], 8); + hexvalue (rx->r13, regs[13], 8); + hexvalue (ctx->usp, regs[14], 8); + hexvalue (rx->irp, regs[17], 8); + hexvalue (rx->dccr, regs[15], 8); + hexvalue (rx->srp, regs[16], 8); + + /* Generate the output. */ + ADD_STRING ("Register dump:\n\n R0: "); + ADD_MEM (regs[0], 8); + ADD_STRING (" R1: "); + ADD_MEM (regs[1], 8); + ADD_STRING (" R2: "); + ADD_MEM (regs[2], 8); + ADD_STRING (" R3: "); + ADD_MEM (regs[3], 8); + ADD_STRING ("\n R4: "); + ADD_MEM (regs[4], 8); + ADD_STRING (" R5: "); + ADD_MEM (regs[5], 8); + ADD_STRING (" R6: "); + ADD_MEM (regs[6], 8); + ADD_STRING (" R7: "); + ADD_MEM (regs[7], 8); + ADD_STRING ("\n R8: "); + ADD_MEM (regs[8], 8); + ADD_STRING (" R9: "); + ADD_MEM (regs[9], 8); + ADD_STRING (" R10: "); + ADD_MEM (regs[10], 8); + ADD_STRING (" R11: "); + ADD_MEM (regs[11], 8); + ADD_STRING ("\n R12: "); + ADD_MEM (regs[12], 8); + ADD_STRING (" R13: "); + ADD_MEM (regs[13], 8); + ADD_STRING (" SP: "); + ADD_MEM (regs[14], 8); + ADD_STRING (" PC: "); + ADD_MEM (regs[17], 8); + ADD_STRING ("\nDCCR: "); + ADD_MEM (regs[15], 8); + ADD_STRING (" SRP: "); + ADD_MEM (regs[16], 4); + + /* Write the stuff out. */ + writev (fd, iov, next_iov - iov); +} + +#define REGISTER_DUMP register_dump (fd, ctx) From f63b7c8b197006e847f5dbfaf1eadaa01065ea36 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:46:05 +0000 Subject: [PATCH 2516/4487] semctl implementation for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/semctl.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/cris/semctl.c diff --git a/sysdeps/unix/sysv/linux/cris/semctl.c b/sysdeps/unix/sysv/linux/cris/semctl.c new file mode 100644 index 0000000000..e9b1a483c9 --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/semctl.c @@ -0,0 +1 @@ +#include From b074d424bd3f4e41230aa4e4e10624de40bf323a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:46:28 +0000 Subject: [PATCH 2517/4487] setegid implementation for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/setegid.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/cris/setegid.c diff --git a/sysdeps/unix/sysv/linux/cris/setegid.c b/sysdeps/unix/sysv/linux/cris/setegid.c new file mode 100644 index 0000000000..2e3a54c893 --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/setegid.c @@ -0,0 +1 @@ +#include From abf44d012840ab5cce08c7d763b6146eabb5b07f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:46:45 +0000 Subject: [PATCH 2518/4487] seteuid implementation for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/seteuid.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/cris/seteuid.c diff --git a/sysdeps/unix/sysv/linux/cris/seteuid.c b/sysdeps/unix/sysv/linux/cris/seteuid.c new file mode 100644 index 0000000000..18e41d08c1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/seteuid.c @@ -0,0 +1 @@ +#include From 70f5c90d37afde4814b0f0d26dc1c4a1b07697db Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:47:13 +0000 Subject: [PATCH 2519/4487] setfsgid implementation for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/setfsgid.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/cris/setfsgid.c diff --git a/sysdeps/unix/sysv/linux/cris/setfsgid.c b/sysdeps/unix/sysv/linux/cris/setfsgid.c new file mode 100644 index 0000000000..0886712569 --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/setfsgid.c @@ -0,0 +1 @@ +#include From 75938458d77e7d246388f4d068057d46823163d8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:47:29 +0000 Subject: [PATCH 2520/4487] setfsuid implementation for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/setfsuid.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/cris/setfsuid.c diff --git a/sysdeps/unix/sysv/linux/cris/setfsuid.c b/sysdeps/unix/sysv/linux/cris/setfsuid.c new file mode 100644 index 0000000000..a9f22eb8ab --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/setfsuid.c @@ -0,0 +1 @@ +#include From e1cb46ec7a3cf832739168c86f2fb8d15f9a0af2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:47:52 +0000 Subject: [PATCH 2521/4487] setgid implementation for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/setgid.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/cris/setgid.c diff --git a/sysdeps/unix/sysv/linux/cris/setgid.c b/sysdeps/unix/sysv/linux/cris/setgid.c new file mode 100644 index 0000000000..377021d9ec --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/setgid.c @@ -0,0 +1 @@ +#include From f79e192ba634b184d41ba7ce02ae76d578026146 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:48:09 +0000 Subject: [PATCH 2522/4487] setgroups implementation for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/setgroups.c | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/cris/setgroups.c diff --git a/sysdeps/unix/sysv/linux/cris/setgroups.c b/sysdeps/unix/sysv/linux/cris/setgroups.c new file mode 100644 index 0000000000..0e7086278f --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/setgroups.c @@ -0,0 +1,2 @@ +/* We also have to rewrite the kernel gid_t to the user land type. */ +#include From 4c8b7016a86446012aeeb77efd7f62e3a0ee8a50 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:48:27 +0000 Subject: [PATCH 2523/4487] setregid implementation for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/setregid.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/cris/setregid.c diff --git a/sysdeps/unix/sysv/linux/cris/setregid.c b/sysdeps/unix/sysv/linux/cris/setregid.c new file mode 100644 index 0000000000..99c57ad20f --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/setregid.c @@ -0,0 +1 @@ +#include From 382b7b89952db88ca94fd386aa1c9526d6a80074 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:48:41 +0000 Subject: [PATCH 2524/4487] setreuid implementation for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/setreuid.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/cris/setreuid.c diff --git a/sysdeps/unix/sysv/linux/cris/setreuid.c b/sysdeps/unix/sysv/linux/cris/setreuid.c new file mode 100644 index 0000000000..8ad61226e9 --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/setreuid.c @@ -0,0 +1 @@ +#include From a6aa3792be5ebe1e7bd22b1f79b2a167d33fa504 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:48:56 +0000 Subject: [PATCH 2525/4487] setrlimit implementation for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/setrlimit.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/cris/setrlimit.c diff --git a/sysdeps/unix/sysv/linux/cris/setrlimit.c b/sysdeps/unix/sysv/linux/cris/setrlimit.c new file mode 100644 index 0000000000..bfaef74c38 --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/setrlimit.c @@ -0,0 +1 @@ +#include From 1157fe0248ac6c94a64b34fcfc151126b8a9283f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:49:10 +0000 Subject: [PATCH 2526/4487] setuid implementation for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/setuid.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/cris/setuid.c diff --git a/sysdeps/unix/sysv/linux/cris/setuid.c b/sysdeps/unix/sysv/linux/cris/setuid.c new file mode 100644 index 0000000000..de394379be --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/setuid.c @@ -0,0 +1 @@ +#include From 25a87ddfb0b6090cc79b5ff3cbd4bdbb49a6cb97 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:49:25 +0000 Subject: [PATCH 2527/4487] shmctl implementation for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/shmctl.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/cris/shmctl.c diff --git a/sysdeps/unix/sysv/linux/cris/shmctl.c b/sysdeps/unix/sysv/linux/cris/shmctl.c new file mode 100644 index 0000000000..7eac6380dd --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/shmctl.c @@ -0,0 +1 @@ +#include From 22ebc6a15fc569daaadc0eed42cd097120177ff8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:49:41 +0000 Subject: [PATCH 2528/4487] socket implementation for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/socket.S | 96 +++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/cris/socket.S diff --git a/sysdeps/unix/sysv/linux/cris/socket.S b/sysdeps/unix/sysv/linux/cris/socket.S new file mode 100644 index 0000000000..06832ec395 --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/socket.S @@ -0,0 +1,96 @@ +/* Copyright (C) 1995, 1996, 1997, 1999, 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +#define P(a, b) P2(a, b) +#define P2(a, b) a##b + +/* The socket-oriented system calls are handled unusally in Linux. + They are all gated through the single `socketcall' system call number. + `socketcall' takes two arguments: the first is the subcode, specifying + which socket function is being called; and the second is a pointer to + the arguments to the specific function. + + The .S files for the other calls just #define socket and #include this. + They also #define a 'number-of-arguments' word in NARGS, which + defaults to 3. */ + +#ifndef NARGS +#ifdef socket +#error NARGS not defined +#endif +#define NARGS 3 +#endif + + .syntax no_register_prefix + +#ifndef __socket +#define __socket P(__,socket) +#endif + +ENTRY(__socket) + subq NARGS*4,sp + +#if NARGS >= 2 + move.d sp,r9 + move.d r10,[r9+] +#else + move.d r10,[sp] +#endif +#if NARGS >= 2 + move.d r11,[r9+] +#endif +#if NARGS >= 3 + move.d r12,[r9+] +#endif +#if NARGS >= 4 + move.d r13,[r9+] +#endif +#if NARGS >= 5 + move.d [sp+NARGS*4],r13 + move.d r13,[r9+] +#endif +#if NARGS >= 6 + move.d [sp+NARGS*4+4],r13 + move.d r13,[r9+] +#endif +#if NARGS >= 7 + move.d [sp+NARGS*4+8],r13 + move.d r13,[r9+] +#endif +#if NARGS >= 8 + move.d [sp+NARGS*4+12],r13 + move.d r13,[r9+] +#endif +#if NARGS >= 9 +#error Too many arguments! +#endif + moveq P(SOCKOP_,socket),r10 + move.d sp,r11 + movu.w SYS_ify(socketcall),r9 + break 13 + cmps.w -4096,r10 + bhs 0f + addq NARGS*4,sp + Ret + nop +PSEUDO_END (__socket) + +weak_alias (__socket, socket) From b660421d48ee0e1a2eafc8e9a52ef1e035f50b40 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:49:56 +0000 Subject: [PATCH 2529/4487] ucontext definitions for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/sys/ucontext.h | 56 +++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/cris/sys/ucontext.h diff --git a/sysdeps/unix/sysv/linux/cris/sys/ucontext.h b/sysdeps/unix/sysv/linux/cris/sys/ucontext.h new file mode 100644 index 0000000000..fe4dc7b5c4 --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/sys/ucontext.h @@ -0,0 +1,56 @@ +/* Copyright (C) 1998, 1999, 2000, 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_UCONTEXT_H +#define _SYS_UCONTEXT_H 1 + +#include +#include + +#include + + +/* Type for general register. */ +typedef long int greg_t; + +/* Number of general registers. */ +#define NGREG 20 + +/* Container for all general registers. */ +typedef greg_t gregset_t[NGREG]; + +/* A placeholder type for floating-point register. */ +typedef long int fpreg_t; + +/* A placeholder; CRIS does not have any fp regs. */ +typedef unsigned long fpregset_t; + +/* A machine context is exactly a sigcontext. */ +typedef struct sigcontext mcontext_t; + +/* Userlevel context. */ +typedef struct ucontext + { + unsigned long int uc_flags; + struct ucontext *uc_link; + stack_t uc_stack; + mcontext_t uc_mcontext; + __sigset_t uc_sigmask; + } ucontext_t; + +#endif /* sys/ucontext.h */ From c8e66742e2d999bf479600421dcb74deb0e06d22 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:50:08 +0000 Subject: [PATCH 2530/4487] syscall implementation for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/syscall.S | 40 ++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/cris/syscall.S diff --git a/sysdeps/unix/sysv/linux/cris/syscall.S b/sysdeps/unix/sysv/linux/cris/syscall.S new file mode 100644 index 0000000000..eb5cdcccf9 --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/syscall.S @@ -0,0 +1,40 @@ +/* Copyright (C) 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + + .syntax no_register_prefix + +/* Make syscall (callno, ...) into a system call. */ + +ENTRY (syscall) + move.d r10,r9 + move.d r11,r10 + move.d r12,r11 + move.d r13,r12 + move.d [sp],r13 + move srp,[sp] + move [sp+4],mof + move [sp+8],srp + break 13 + cmps.w -4096,r10 + bhs 0f + move [sp],srp + Ret + nop +PSEUDO_END (syscall) From a2c5e2b43a15c16f13e59d1073267537e19da971 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:50:27 +0000 Subject: [PATCH 2531/4487] System specific definitions for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/sysdep.h | 214 ++++++++++++++++++++++++++ 1 file changed, 214 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/cris/sysdep.h diff --git a/sysdeps/unix/sysv/linux/cris/sysdep.h b/sysdeps/unix/sysv/linux/cris/sysdep.h new file mode 100644 index 0000000000..d388665286 --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/sysdep.h @@ -0,0 +1,214 @@ +/* Assembler macros for CRIS. + Copyright (C) 1999, 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include +#include "config.h" + +#undef SYS_ify +#define SYS_ify(syscall_name) (__NR_##syscall_name) + + +#ifdef __ASSEMBLER__ + +/* For Linux we can use the system call table in the header file + /usr/include/asm/unistd.h + of the kernel. But these symbols do not follow the SYS_* syntax + so we have to redefine the `SYS_ify' macro here. */ +#undef SYS_ify +#define SYS_ify(syscall_name) __NR_##syscall_name + +/* ELF-like local names start with `.L'. */ +#undef L +#define L(name) .L##name + +/* Linux uses a negative return value to indicate syscall errors, + unlike most Unices, which use the condition codes' carry flag. + + Since version 2.1 the return value of a system call might be + negative even if the call succeeded. E.g., the `lseek' system call + might return a large offset. Therefore we must not anymore test + for < 0, but test for a real error by making sure the value in %eax + is a real error number. Linus said he will make sure the no syscall + returns a value in -1 .. -4095 as a valid result so we can safely + test with -4095. */ + +/* Syscall wrappers consist of + #include + PSEUDO (...) + ret + PSEUDO_END (...) + + which expand to the following. */ + +/* Linux takes system call arguments in registers: + syscall number R9 + arg 1 R10 + arg 2 R11 + arg 3 R12 + arg 4 R13 + arg 5 MOF + arg 6 SRP + + The compiler calls us by the C convention: + syscall number in the DO_CALL macro + arg 1 R10 + arg 2 R11 + arg 3 R12 + arg 4 R13 + arg 5 [SP] + arg 6 [SP + 4] + */ + +/* Note that we use "bhs", since we want to match + (unsigned) -4096 .. 0xffffffff. Using "ble" would match + -4096 .. -2**31. */ +#define PSEUDO(name, syscall_name, args) \ + ENTRY (name) @ \ + DOARGS_##args @ \ + movu.w SYS_ify (syscall_name),$r9 @ \ + break 13 @ \ + cmps.w -4096,$r10 @ \ + bhs 0f @ \ + nop @ \ + UNDOARGS_return_##args + +/* Ouch! We have to remember not to use "ret" in assembly-code. + ("Luckily", mnemonics are case-insensitive.) + Note that we assume usage is exactly: + PSEUDO (...) + ret + PSEUDO_END (...) + so we can put all payload into PSEUDO (except for error handling). */ + +#define ret + +#define PSEUDO_END(name) \ +0: @ \ + SETUP_PIC @ \ + PLTJUMP (syscall_error) @ \ + END (name) + +#define DOARGS_0 +#define DOARGS_1 +#define DOARGS_2 +#define DOARGS_3 +#define DOARGS_4 +#define DOARGS_5 \ + move [$sp],$mof + +/* To avoid allocating stack-space, we re-use the arg 5 (MOF) entry by + storing SRP into it. If called with too-few arguments, we will crash, + but that will happen in the general case too. */ +#define DOARGS_6 \ + DOARGS_5 @ \ + move $srp,[$sp] @ \ + move [$sp+4],$srp + +#define UNDOARGS_return_0 \ + Ret @ \ + nop + +#define UNDOARGS_return_1 UNDOARGS_return_0 +#define UNDOARGS_return_2 UNDOARGS_return_0 +#define UNDOARGS_return_3 UNDOARGS_return_0 +#define UNDOARGS_return_4 UNDOARGS_return_0 +#define UNDOARGS_return_5 UNDOARGS_return_0 + +/* We assume the following code will be "ret" and "PSEUDO_END". */ +#define UNDOARGS_return_return_6 \ + jump [$sp] + +#else /* not __ASSEMBLER__ */ + +#undef INLINE_SYSCALL +#define INLINE_SYSCALL(name, nr, args...) \ + ({ \ + unsigned long __sys_res; \ + register unsigned long __res asm ("r10"); \ + LOAD_ARGS_c_##nr (args) \ + register unsigned long __callno asm ("r9") \ + = SYS_ify (name); \ + asm volatile (LOAD_ARGS_asm_##nr (args) \ + "break 13" \ + : "=r" (__res) \ + : ASM_ARGS_##nr (args) \ + : ASM_CLOBBER_##nr); \ + __sys_res = __res; \ + \ + if (__sys_res >= (unsigned long) -4096) \ + { \ + __set_errno (- __sys_res); \ + __sys_res = (unsigned long) -1; \ + } \ + __sys_res; \ + }) + +#define LOAD_ARGS_c_0() +#define LOAD_ARGS_asm_0() +#define ASM_CLOBBER_0 "memory" +#define ASM_ARGS_0() "r" (__callno) + +#define LOAD_ARGS_c_1(r10) \ + LOAD_ARGS_c_0() \ + register unsigned long __r10 __asm__ ("r10") = (unsigned long) (r10); +#define LOAD_ARGS_asm_1(r10) LOAD_ARGS_asm_0 () +#define ASM_CLOBBER_1 ASM_CLOBBER_0 +#define ASM_ARGS_1(r10) ASM_ARGS_0 (), "0" (__r10) + +#define LOAD_ARGS_c_2(r10, r11) \ + LOAD_ARGS_c_1(r10) \ + register unsigned long __r11 __asm__ ("r11") = (unsigned long) (r11); +#define LOAD_ARGS_asm_2(r10, r11) LOAD_ARGS_asm_1 (r10) +#define ASM_CLOBBER_2 ASM_CLOBBER_1 +#define ASM_ARGS_2(r10, r11) ASM_ARGS_1 (r10), "r" (__r11) + +#define LOAD_ARGS_c_3(r10, r11, r12) \ + LOAD_ARGS_c_2(r10, r11) \ + register unsigned long __r12 __asm__ ("r12") = (unsigned long) (r12); +#define LOAD_ARGS_asm_3(r10, r11, r12) LOAD_ARGS_asm_2 (r10, r11) +#define ASM_CLOBBER_3 ASM_CLOBBER_2 +#define ASM_ARGS_3(r10, r11, r12) ASM_ARGS_2 (r10, r11), "r" (__r12) + +#define LOAD_ARGS_c_4(r10, r11, r12, r13) \ + LOAD_ARGS_c_3(r10, r11, r12) \ + register unsigned long __r13 __asm__ ("r13") = (unsigned long) (r13); +#define LOAD_ARGS_asm_4(r10, r11, r12, r13) LOAD_ARGS_asm_3 (r10, r11, r12) +#define ASM_CLOBBER_4 ASM_CLOBBER_3 +#define ASM_ARGS_4(r10, r11, r12, r13) ASM_ARGS_3 (r10, r11, r12), "r" (__r13) + +#define LOAD_ARGS_c_5(r10, r11, r12, r13, mof) \ + LOAD_ARGS_c_4(r10, r11, r12, r13) +#define LOAD_ARGS_asm_5(r10, r11, r12, r13, mof) \ + LOAD_ARGS_asm_4 (r10, r11, r12, r13) "move %5,$mof\n\t" +#define ASM_CLOBBER_5 ASM_CLOBBER_4 +#define ASM_ARGS_5(r10, r11, r12, r13, mof) \ + ASM_ARGS_4 (r10, r11, r12, r13), "g" (mof) + +#define LOAD_ARGS_c_6(r10, r11, r12, r13, mof, srp) \ + LOAD_ARGS_c_5(r10, r11, r12, r13, mof) +#define LOAD_ARGS_asm_6(r10, r11, r12, r13, mof, srp) \ + LOAD_ARGS_asm_5(r10, r11, r12, r13, mof) \ + "move %6,$srp\n\t" +#define ASM_CLOBBER_6 ASM_CLOBBER_5, "srp" +#define ASM_ARGS_6(r10, r11, r12, r13, mof, srp) \ + ASM_ARGS_5 (r10, r11, r12, r13, mof), "g" (srp) + +#endif /* not __ASSEMBLER__ */ From c2e42b7134c05d4354257d9eddbc928e26415b83 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:50:44 +0000 Subject: [PATCH 2532/4487] System specific code for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/sysdep.S | 74 +++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/cris/sysdep.S diff --git a/sysdeps/unix/sysv/linux/cris/sysdep.S b/sysdeps/unix/sysv/linux/cris/sysdep.S new file mode 100644 index 0000000000..4a108db1f7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/sysdep.S @@ -0,0 +1,74 @@ +/* Copyright (C) 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +/* Make space for the errno variable. */ + + .globl C_SYMBOL_NAME(errno) + .type C_SYMBOL_NAME(errno),@object + .lcomm C_SYMBOL_NAME(errno),4 + +weak_alias (errno, _errno) + +/* The syscall stubs jump here when they detect an error, bot for PIC and + non-PIC. */ + + .syntax no_register_prefix + +ENTRY (__syscall_error) + neg.d r10,r10 + +#ifdef _LIBC_REENTRANT + push r10 + push srp + + /* Note that __syscall_error is only visible within this library, + and no-one passes it on as a pointer, so can assume that R0 (GOT + pointer) is correctly set up. */ + PLTCALL (__errno_location) + + pop srp + pop r11 + move.d r11,[r10] + +#else /* not _LIBC_REENTRANT */ +# ifdef __PIC__ + move.d [r0+C_SYMBOL_NAME(errno:GOT)],r9 + move.d r10,[r9] +# else + move.d r10,[C_SYMBOL_NAME(errno)] +# endif +#endif /* _LIBC_REENTRANT */ + +#ifdef __PIC__ +/* PIC callers are supposed to have R0 on stack, ready for us to restore. + Callers are only allowed from within this DSO, so the GOT in r0 is the + one we want to use. + + (Don't use "ret" - it's a macro). */ + + moveq -1,r10 + Ret + pop r0 +#else + Ret + moveq -1,r10 +#endif + +END (__syscall_error) From b13de4a8b7e976124b6cff35f698ef5b9ad33456 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:50:57 +0000 Subject: [PATCH 2533/4487] vfork implementation for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/vfork.S | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/cris/vfork.S diff --git a/sysdeps/unix/sysv/linux/cris/vfork.S b/sysdeps/unix/sysv/linux/cris/vfork.S new file mode 100644 index 0000000000..bb4072f3f6 --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/vfork.S @@ -0,0 +1,26 @@ +/* Copyright (C) 1999, 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +PSEUDO (__vfork, vfork, 0) + Ret + nop +PSEUDO_END (__vfork) + +weak_alias (__vfork, vfork) From 12d6ab7b1038a3b6db58b436b5d6de8b1bcf19ee Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 04:51:09 +0000 Subject: [PATCH 2534/4487] __xstat implementation for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/xstat.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/cris/xstat.c diff --git a/sysdeps/unix/sysv/linux/cris/xstat.c b/sysdeps/unix/sysv/linux/cris/xstat.c new file mode 100644 index 0000000000..e9869f5508 --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/xstat.c @@ -0,0 +1 @@ +#include From 51610bc7b3a1fce88cc618d80fd3fc9c34842c8f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 05:08:17 +0000 Subject: [PATCH 2535/4487] setresgid implementation for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/setresgid.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/cris/setresgid.c diff --git a/sysdeps/unix/sysv/linux/cris/setresgid.c b/sysdeps/unix/sysv/linux/cris/setresgid.c new file mode 100644 index 0000000000..daca1a4833 --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/setresgid.c @@ -0,0 +1 @@ +#include From fe4dd66ed7ec515ab6c633c38d1f4a2e7b156340 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Apr 2001 05:08:36 +0000 Subject: [PATCH 2536/4487] setresuid implementation for Linux/CRIS. --- sysdeps/unix/sysv/linux/cris/setresuid.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/cris/setresuid.c diff --git a/sysdeps/unix/sysv/linux/cris/setresuid.c b/sysdeps/unix/sysv/linux/cris/setresuid.c new file mode 100644 index 0000000000..3aeabe9ad7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/cris/setresuid.c @@ -0,0 +1 @@ +#include From 35fee9f0dd8799206f9c340562dd16e03fc11818 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 10 Apr 2001 00:18:50 +0000 Subject: [PATCH 2537/4487] Extra files to distribute for CRIS. --- sysdeps/cris/Dist | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/cris/Dist diff --git a/sysdeps/cris/Dist b/sysdeps/cris/Dist new file mode 100644 index 0000000000..cf1ffb6a08 --- /dev/null +++ b/sysdeps/cris/Dist @@ -0,0 +1 @@ +_mcount.S From 675fffd21d1f38dd329d32aef99a4cd434b3cf49 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 10 Apr 2001 00:19:20 +0000 Subject: [PATCH 2538/4487] Other implied directories to use. --- sysdeps/cris/Implies | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sysdeps/cris/Implies diff --git a/sysdeps/cris/Implies b/sysdeps/cris/Implies new file mode 100644 index 0000000000..780c4e2467 --- /dev/null +++ b/sysdeps/cris/Implies @@ -0,0 +1,3 @@ +wordsize-32 +ieee754/flt-32 +ieee754/dbl-64 From 291195e9a86765a225dfe1227488a2199ee27663 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 10 Apr 2001 00:19:49 +0000 Subject: [PATCH 2539/4487] Additional make rules for CRIS. --- sysdeps/cris/Makefile | 44 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 sysdeps/cris/Makefile diff --git a/sysdeps/cris/Makefile b/sysdeps/cris/Makefile new file mode 100644 index 0000000000..3df21b9a30 --- /dev/null +++ b/sysdeps/cris/Makefile @@ -0,0 +1,44 @@ +# Copyright (C) 1999, 2000, 2001 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 Library General Public License +# as published by the Free Software Foundation; either version 2 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 +# Library General Public License for more details. + +# You should have received a copy of the GNU Library General Public +# License along with the GNU C Library; see the file COPYING.LIB. If not, +# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +# We don't support long doubles as a distinct type. We don't need to set +# this variable; it's here mostly for documentational purposes. + +long-double-fcts = no + +# FIXME: Note that this is a machine-specific stub; profiling is not +# implemented. +ifeq ($(subdir),gmon) +sysdep_routines += _mcount +endif + +# FIXME: This test seems generally bogus. Wrong types in function calls +# and assumes FE_TONEAREST is defined. Does it work somewhere? +# Presumably it does, so let's settle for filtering it out target-wise +# until it's agreed what should be done. +ifeq ($(subdir),math) +tests := $(filter-out test-fenv, $(tests)) +endif + +# PIC code must be assembled with special options, passed on by gcc when +# given the -fpic option. +ASFLAGS-.os = -fpic + +# Overflow occurs at 2**15/4 (8192) symbols. Glibc uses about 2000. +# So use -fpic: smaller-size relocs; smaller, faster code. +pic-ccflag = -fpic From 848b98a109011eaad607dd705cf469da650d96d7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 10 Apr 2001 00:20:03 +0000 Subject: [PATCH 2540/4487] __longjmp implementation for CRIS. --- sysdeps/cris/__longjmp.S | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 sysdeps/cris/__longjmp.S diff --git a/sysdeps/cris/__longjmp.S b/sysdeps/cris/__longjmp.S new file mode 100644 index 0000000000..a6188d02f2 --- /dev/null +++ b/sysdeps/cris/__longjmp.S @@ -0,0 +1,38 @@ +/* longjmp for CRIS. + Copyright (C) 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#define _SETJMP_H +#define _ASM +#include + + .syntax no_register_prefix + +/* Saving and restoring CCR is meaningless, so we don't do it. */ +ENTRY (__longjmp) + /* Note that r10 = jmp_buf, r11 = retval. */ + move [r10+16*4],srp + test.d r11 + beq 0f /* Already a 1 in place. */ + nop + /* Offset for r9, the return value (see setjmp). */ + move.d r11,[r10+6*4] +0: + movem [r10],pc +END (__longjmp) From 83f091042ecc9b6e50898a21a85c66d60a711a72 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 10 Apr 2001 00:20:23 +0000 Subject: [PATCH 2541/4487] _mcount implementation for CRIS. --- sysdeps/cris/_mcount.S | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 sysdeps/cris/_mcount.S diff --git a/sysdeps/cris/_mcount.S b/sysdeps/cris/_mcount.S new file mode 100644 index 0000000000..d6e5f74c33 --- /dev/null +++ b/sysdeps/cris/_mcount.S @@ -0,0 +1,36 @@ +/* Machine-specific calling sequence for `mcount' profiling function for CRIS. + Copyright (C) 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* FIXME: This isn't implemented yet. This is just a machine-specific + stub. Perhaps a real implementation can make use of it. */ + +#include + +#undef CALL_MCOUNT +#define CALL_MCOUNT + +ENTRY (_mcount) + SETUP_PIC + /* Sorry, isn't implemented yet. + Can't call abort; that will recurse. Force SEGV instead. */ + test.d [99] +1: + ba 1b + nop +END (_mcount) From 469020c10b466748519942f47370e1f7d482f5d7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 10 Apr 2001 00:20:57 +0000 Subject: [PATCH 2542/4487] definitions for CRIS. --- sysdeps/cris/bits/endian.h | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 sysdeps/cris/bits/endian.h diff --git a/sysdeps/cris/bits/endian.h b/sysdeps/cris/bits/endian.h new file mode 100644 index 0000000000..034307e395 --- /dev/null +++ b/sysdeps/cris/bits/endian.h @@ -0,0 +1,7 @@ +/* CRIS is little-endian. */ + +#ifndef _ENDIAN_H +# error "Never use directly; include instead." +#endif + +#define __BYTE_ORDER __LITTLE_ENDIAN From 0f6b2125412077be1d7f897b512d0d2237c99c05 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 10 Apr 2001 00:21:13 +0000 Subject: [PATCH 2543/4487] definitions for CRIS. --- sysdeps/cris/bits/setjmp.h | 54 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 sysdeps/cris/bits/setjmp.h diff --git a/sysdeps/cris/bits/setjmp.h b/sysdeps/cris/bits/setjmp.h new file mode 100644 index 0000000000..9b0b2a18eb --- /dev/null +++ b/sysdeps/cris/bits/setjmp.h @@ -0,0 +1,54 @@ +/* Copyright (C) 1997, 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* Define the machine-dependent type `jmp_buf', CRIS version. */ + +/* Note that saving and restoring CCR has no meaning in user mode, so we + don't actually do it; the slot is now reserved. + + jmp_buf[0] - PC + jmp_buf[1] - SP (R14) + jmp_buf[2] - R13 + jmp_buf[3] - R12 + jmp_buf[4] - R11 + jmp_buf[5] - R10 + jmp_buf[6] - R9 + jmp_buf[7] - R8 + jmp_buf[8] - R7 + jmp_buf[9] - R6 + jmp_buf[10] - R5 + jmp_buf[11] - R4 + jmp_buf[12] - R3 + jmp_buf[13] - R2 + jmp_buf[14] - R1 + jmp_buf[15] - R0 + jmp_buf[16] - SRP + jmp_buf[17] - CCR */ + +#ifndef _ASM +typedef unsigned long int __jmp_buf[18]; +#endif + +#if defined (__USE_MISC) || defined (_ASM) +#define JB_SP 1 +#endif + +/* Test if longjmp to JMPBUF would unwind the frame + containing a local variable at ADDRESS. */ +#define _JMPBUF_UNWINDS(jmpbuf, address) \ + ((unsigned long int) (address) < (jmpbuf)[JB_SP]) From 233922db0fc8e4a94f0ac1f1a42e7ac1c4e3d80a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 10 Apr 2001 00:21:27 +0000 Subject: [PATCH 2544/4487] optimizations for CRIS. --- sysdeps/cris/bits/string.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 sysdeps/cris/bits/string.h diff --git a/sysdeps/cris/bits/string.h b/sysdeps/cris/bits/string.h new file mode 100644 index 0000000000..9e4e6d58d6 --- /dev/null +++ b/sysdeps/cris/bits/string.h @@ -0,0 +1,26 @@ +/* Optimized, inlined string functions. CRIS version. + Copyright (C) 1997, 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _STRING_H +# error "Never use directly; include instead." +#endif + +/* Currently the only purpose of this file is to tell the generic inline + macros that unaligned memory access is possible. */ +#define _STRING_ARCH_unaligned 1 From 26414026ac08c905f305e43ae6a0a843c7d590ab Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 10 Apr 2001 00:22:01 +0000 Subject: [PATCH 2545/4487] CRIS-specific part of ELF dynamic loader. --- sysdeps/cris/dl-machine.h | 392 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 392 insertions(+) create mode 100644 sysdeps/cris/dl-machine.h diff --git a/sysdeps/cris/dl-machine.h b/sysdeps/cris/dl-machine.h new file mode 100644 index 0000000000..beec38184d --- /dev/null +++ b/sysdeps/cris/dl-machine.h @@ -0,0 +1,392 @@ +/* Machine-dependent ELF dynamic relocation inline functions. CRIS version. + Copyright (C) 1996,1997,1998,1999,2000,2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If + not, write to the Free Software Foundation, Inc., + 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifndef dl_machine_h +#define dl_machine_h + +#define ELF_MACHINE_NAME "CRIS" + +#include + +#ifdef __PIC__ +# define CALL_FN(x) \ + "move.d $pc,$r9\n\t" \ + "add.d " #x " - .,$r9\n\t" \ + "jsr $r9" +#else +# define CALL_FN(x) "jsr " #x +#endif + +/* Return nonzero iff ELF header is compatible with the running host. */ + +static inline int +elf_machine_matches_host (const Elf32_Ehdr *ehdr) +{ + return ehdr->e_machine == EM_CRIS; +} + +/* Return the link-time address of _DYNAMIC. Conveniently, this is the + first element of the GOT. This must be inlined in a function which + uses global data. */ + +static inline Elf32_Addr +elf_machine_dynamic (void) +{ + /* Don't just set this to an asm variable "r0" since that's not logical + (like, the variable is uninitialized and the register is fixed) and + may make GCC trip over itself doing register allocation. Yes, I'm + paranoid. Why do you ask? */ + Elf32_Addr *got; + + __asm__ ("move.d $r0,%0" : "=rm" (got)); + return *got; +} + +/* Return the run-time load address of the shared object. We do it like + m68k and i386, by taking an arbitrary local symbol, forcing a GOT entry + for it, and peeking into the GOT table, which is set to the link-time + file-relative symbol value (regardless of whether the target is REL or + RELA). We subtract this link-time file-relative value from the "local" + value we calculate from GOT position and GOT offset. FIXME: Perhaps + there's some other symbol we could use, that we don't *have* to force a + GOT entry for. */ + +static inline Elf32_Addr +elf_machine_load_address (void) +{ + Elf32_Addr gotaddr_diff; + __asm__ ("sub.d [$r0+_dl_start:GOT16],$r0,%0\n\t" + "add.d _dl_start:GOTOFF,%0" : "=r" (gotaddr_diff)); + return gotaddr_diff; +} + +/* Set up the loaded object described by L so its unrelocated PLT + entries will jump to the on-demand fixup code in dl-runtime.c. */ + +static inline int +elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) +{ + Elf32_Addr *got; + extern void _dl_runtime_resolve (Elf32_Word); + extern void _dl_runtime_profile (Elf32_Word); + + if (l->l_info[DT_JMPREL] && lazy) + { + /* The GOT entries for functions in the PLT have not yet been + filled in. Their initial contents will arrange when called + to push an offset into the .rela.plt section, push + _GLOBAL_OFFSET_TABLE_[1], and then jump to + _GLOBAL_OFFSET_TABLE_[2]. */ + got = (Elf32_Addr *) D_PTR (l, l_info[DT_PLTGOT]); + got[1] = (Elf32_Addr) l; /* Identify this shared object. */ + + /* The got[2] entry contains the address of a function which gets + called to get the address of a so far unresolved function and + jump to it. The profiling extension of the dynamic linker allows + to intercept the calls to collect information. In this case we + don't store the address in the GOT so that all future calls also + end in this function. */ + if (__builtin_expect (profile, 0)) + { + got[2] = (Elf32_Addr) &_dl_runtime_profile; + + if (_dl_name_match_p (_dl_profile, l)) + { + /* This is the object we are looking for. Say that we really + want profiling and the timers are started. */ + _dl_profile_map = l; + } + } + else + /* This function will get called to fix up the GOT entry indicated by + the offset on the stack, and then jump to the resolved address. */ + got[2] = (Elf32_Addr) &_dl_runtime_resolve; + } + + return lazy; +} + +/* This code is used in dl-runtime.c to call the `fixup' function + and then redirect to the address it returns. + + We get here with the offset into the relocation table pushed on stack, + and the link map in MOF. */ + +#define TRAMPOLINE_TEMPLATE(tramp_name, fixup_name) \ +"; Trampoline for " #fixup_name " + .globl " #tramp_name " + .type " #tramp_name ", @function +" #tramp_name ": + push $r13 + push $r12 + push $r11 + push $r10 + push $r9 + push $srp + move.d [$sp+6*4],$r11 + move $mof,$r10 + " CALL_FN (fixup_name) " + move.d $r10,[$sp+6*4] + pop $srp + pop $r9 + pop $r10 + pop $r11 + pop $r12 + pop $r13 + jump [$sp+] + .size " #tramp_name ", . - " #tramp_name "\n" +#ifndef PROF +#define ELF_MACHINE_RUNTIME_TRAMPOLINE \ +asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \ + TRAMPOLINE_TEMPLATE (_dl_runtime_profile, profile_fixup)); +#else +#define ELF_MACHINE_RUNTIME_TRAMPOLINE \ +asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \ + ".globl _dl_runtime_profile\n" \ + ".set _dl_runtime_profile, _dl_runtime_resolve"); +#endif + + +/* Mask identifying addresses reserved for the user program, + where the dynamic linker should not map anything. */ +#define ELF_MACHINE_USER_ADDRESS_MASK 0xf8000000UL + +/* Initial entry point code for the dynamic linker. + The C function `_dl_start' is the real entry point; + its return value is the user program's entry point. */ + +#define RTLD_START asm ("\ + .text + .globl _start + .type _start,@function +_start: + move.d $sp,$r10 + " CALL_FN (_dl_start) " + /* FALLTHRU */ + + .globl _dl_start_user + .type _dl_start_user,@function +_dl_start_user: + ; Save the user entry point address in R1. + move.d $r10,$r1 + ; Point R0 at the GOT. + move.d $pc,$r0 + sub.d .:GOTOFF,$r0 + ; Remember the highest stack address. + move.d [$r0+__libc_stack_end:GOT16],$r13 + move.d $sp,[$r13] + ; See if we were run as a command with the executable file + ; name as an extra leading argument. + move.d [$r0+_dl_skip_args:GOT16],$r13 + move.d [$r13],$r9 + ; Get the original argument count + move.d [$sp],$r11 + ; Subtract _dl_skip_args from it. + sub.d $r9,$r11 + ; Adjust the stack pointer to skip _dl_skip_args words. + addi $r9.d,$sp + ; Put the new argc in place as expected by the user entry. + move.d $r11,[$sp] + ; Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env) + ; env: skip scaled argc and skip stored argc and NULL at end of argv[]. + move.d $sp,$r13 + addi $r11.d,$r13 + addq 8,$r13 + ; argv: skip stored argc. + move.d $sp,$r12 + addq 4,$r12 + ; main_map: at _dl_loaded. + move.d [$r0+_dl_loaded:GOT16],$r9 + move.d [$r9],$r10 + move.d _dl_init:PLTG,$r9 + add.d $r0,$r9 + jsr $r9 + ; Pass our finalizer function to the user in R10. + move.d [$r0+_dl_fini:GOT16],$r10 + ; Terminate the frame-pointer. + moveq 0,$r8 + ; Cause SEGV if user entry returns. + move $r8,$srp + ; Jump to the user's entry point. + jump $r1 + .size _dl_start_user, . - _dl_start_user + .previous"); + +/* Nonzero iff TYPE describes a relocation that should + skip the executable when looking up the symbol value. */ +#define elf_machine_lookup_noexec_p(type) ((type) == R_CRIS_COPY) + +/* Nonzero iff TYPE describes relocation of a PLT entry, so + PLT entries should not be allowed to define the value. */ +#define elf_machine_lookup_noplt_p(type) ((type) == R_CRIS_JUMP_SLOT) + +/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */ +#define ELF_MACHINE_JMP_SLOT R_CRIS_JUMP_SLOT + +/* CRIS never uses Elf32_Rel relocations. */ +#define ELF_MACHINE_NO_REL 1 + +/* We define an initialization functions. This is called very early in + _dl_sysdep_start. */ +#define DL_PLATFORM_INIT dl_platform_init () + +extern const char *_dl_platform; + +static inline void __attribute__ ((unused)) +dl_platform_init (void) +{ + if (_dl_platform != NULL && *_dl_platform == '\0') + /* Avoid an empty string which would disturb us. */ + _dl_platform = NULL; +} + +static inline Elf32_Addr +elf_machine_fixup_plt (struct link_map *map, lookup_t t, + const Elf32_Rela *reloc, + Elf32_Addr *reloc_addr, Elf32_Addr value) +{ + return *reloc_addr = value; +} + +/* Return the final value of a plt relocation. */ +static inline Elf32_Addr +elf_machine_plt_value (struct link_map *map, const Elf32_Rela *reloc, + Elf32_Addr value) +{ + return value + reloc->r_addend; +} + +#endif /* !dl_machine_h */ + +#ifdef RESOLVE + +/* Perform the relocation specified by RELOC and SYM (which is fully resolved). + MAP is the object containing the reloc. */ + +static inline void +elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, + const Elf32_Sym *sym, const struct r_found_version *version, + Elf32_Addr *const reloc_addr) +{ +#ifndef RTLD_BOOTSTRAP + /* This is defined in rtld.c, but nowhere in the static libc.a; make the + reference weak so static programs can still link. This declaration + cannot be done when compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP) + because rtld.c contains the common defn for _dl_rtld_map, which is + incompatible with a weak decl in the same file. */ + weak_extern (_dl_rtld_map); +#endif + + if (ELF32_R_TYPE (reloc->r_info) == R_CRIS_RELATIVE) + { +#ifndef RTLD_BOOTSTRAP + if (map != &_dl_rtld_map) /* Already done in rtld itself. */ +#endif + *reloc_addr = map->l_addr + reloc->r_addend; + } + else + { +#ifndef RTLD_BOOTSTRAP + const Elf32_Sym *const refsym = sym; +#endif + Elf32_Addr value; + if (sym->st_shndx != SHN_UNDEF && + ELF32_ST_BIND (sym->st_info) == STB_LOCAL) + value = map->l_addr; + else + { + value = RESOLVE (&sym, version, ELF32_R_TYPE (reloc->r_info)); + if (sym) + value += sym->st_value; + } + value += reloc->r_addend; /* Assume copy relocs have zero addend. */ + + switch (ELF32_R_TYPE (reloc->r_info)) + { +#ifndef RTLD_BOOTSTRAP + case R_CRIS_COPY: + if (sym == NULL) + /* This can happen in trace mode if an object could not be + found. */ + break; + if (sym->st_size > refsym->st_size + || (_dl_verbose && sym->st_size < refsym->st_size)) + { + extern char **_dl_argv; + const char *strtab; + + strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]); + _dl_error_printf ("\ +%s: Symbol `%s' has different size in shared object, consider re-linking\n", + _dl_argv[0] ?: "", + strtab + refsym->st_name); + } + memcpy (reloc_addr, (void *) value, MIN (sym->st_size, + refsym->st_size)); + break; + + case R_CRIS_32: +#endif + case R_CRIS_GLOB_DAT: + case R_CRIS_JUMP_SLOT: + *reloc_addr = value; + break; +#ifndef RTLD_BOOTSTRAP + case R_CRIS_8: + *(char *) reloc_addr = value; + break; + case R_CRIS_16: + *(short *) reloc_addr = value; + break; + case R_CRIS_8_PCREL: + *(char *) reloc_addr + = value + reloc->r_addend - (Elf32_Addr) reloc_addr - 1; + break; + case R_CRIS_16_PCREL: + *(short *) reloc_addr + = value + reloc->r_addend - (Elf32_Addr) reloc_addr - 2; + break; + case R_CRIS_32_PCREL: + *reloc_addr = value + reloc->r_addend - (Elf32_Addr) reloc_addr - 4; + break; +#endif + case R_CRIS_NONE: + break; +#if !defined RTLD_BOOTSTRAP || defined _NDEBUG + default: + _dl_reloc_bad_type (map, ELFW(R_TYPE) (reloc->r_info), 0); + break; +#endif + } + } +} + +static inline void +elf_machine_lazy_rel (struct link_map *map, + Elf32_Addr l_addr, const Elf32_Rela *reloc) +{ + Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset); + if (__builtin_expect (ELF32_R_TYPE (reloc->r_info), R_CRIS_JUMP_SLOT) + == R_CRIS_JUMP_SLOT) + *reloc_addr += l_addr; + else + _dl_reloc_bad_type (map, ELF32_R_TYPE (reloc->r_info), 1); +} + +#endif /* RESOLVE */ From cdda3fc7f04f830ba5bdec85786ec079970e2f92 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 10 Apr 2001 00:22:36 +0000 Subject: [PATCH 2546/4487] Startup code for ELF binaries on CRIS. --- sysdeps/cris/elf/start.S | 123 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 sysdeps/cris/elf/start.S diff --git a/sysdeps/cris/elf/start.S b/sysdeps/cris/elf/start.S new file mode 100644 index 0000000000..f6336d2dab --- /dev/null +++ b/sysdeps/cris/elf/start.S @@ -0,0 +1,123 @@ +/* Startup code compliant to the ELF CRIS ABI (to-be-written). + Copyright (C) 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +/* This is the canonical entry point, usually the first thing in the text + segment. When the entry point runs, most registers' values are + unspecified, except for: + + R10 Contains a function pointer to be registered with `atexit'. + This is how the dynamic linker arranges to have DT_FINI + functions called for shared libraries that have been loaded + before this code runs. + + SP The stack contains the arguments and environment: + [SP] argc + [SP+4] argv[0] + ... + [SP+4*argc] NULL + [SP+4*(argc+1)] envp[0] + ... + NULL +*/ + + .syntax no_register_prefix + + .text + .globl _start +_start: + /* Clear the frame pointer, to mark the outermost frame. */ + moveq 0,r8 + + /* Move the shared library termination function to the right place + for __libc_main. */ + move.d r10,r9 + + /* Extract the arguments as encoded on the stack and set up the + arguments for `main': argc, argv. envp will be determined + later in __libc_start_main. */ + + /* Get the argument count. */ + move.d [sp],r11 + + /* Store the stack pointer as end of stack. We overwrite + the incoming argc. */ + move.d sp,[sp] + + /* The argument vector starts just after the argument count. */ + move.d sp,r12 + addq 4,r12 + + /* There are seven arguments to __libc_start_main: + r10: main - Address of it. + r11: argc + r12: argv + r13: init - Function to call. + + [sp]: fini - Function to register with atexit. + [sp+4]: rtld_fini - Another function to register with atexit. + [sp+8]: stack_end - Top of stack (actually same as argv). + + The last two are passed on stack. */ + + /* Store the fini function coming from the dynamic loader. */ + push r9 + + /* Get the addresses of our own entry points to `.fini' and + `.init'. */ + +#ifdef __PIC__ + /* If for some reason this program is compiled as PIC, set up R0. */ + move.d pc,r0 + sub.d .:GOTOFF,r0 + + move.d _init:PLTG,r13 + add.d r0,r13 + move.d _fini:PLTG,r9 + add.d r0,r9 + move.d main:PLTG,r10 + add.d r0,r10 +#else + move.d _init,r13 + move.d _fini,r9 + move.d main,r10 +#endif + push r9 + + /* Call the user's main function, and exit with its value. But + let the libc call main. */ + PLTCALL (__libc_start_main) + + /* Crash if somehow `exit' does return. We have at least 8192 + invalid addresses to choose from. */ + test.d [6502] + + /* Stop the unstoppable. */ +0: + ba 0b + nop + +/* Define a symbol for the first piece of initialized data. */ + .data + .globl __data_start +__data_start: + .long 0 + .weak data_start + data_start = __data_start From 9c266efdcdac6b2417c58ab46dec48d3ebff9135 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 10 Apr 2001 00:22:52 +0000 Subject: [PATCH 2547/4487] Profiling definitions for CRIS. --- sysdeps/cris/machine-gmon.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 sysdeps/cris/machine-gmon.h diff --git a/sysdeps/cris/machine-gmon.h b/sysdeps/cris/machine-gmon.h new file mode 100644 index 0000000000..5455c82f70 --- /dev/null +++ b/sysdeps/cris/machine-gmon.h @@ -0,0 +1,28 @@ +/* PowerPC-specific implementation of profiling support. + Copyright (C) 1997, 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +void __mcount_internal (unsigned long frompc, unsigned long selfpc); + +#define _MCOUNT_DECL(frompc, selfpc) \ +void __mcount_internal (unsigned long frompc, unsigned long selfpc) + + +/* Define MCOUNT as empty since we have the implementation in another + file. FIXME: Just stubs, currently. */ +#define MCOUNT From e9ca92e3b227617f9717bc784c3dafc532f555e4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 10 Apr 2001 00:23:12 +0000 Subject: [PATCH 2548/4487] Definitions for efficient copying on CRIS. --- sysdeps/cris/memcopy.h | 57 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 sysdeps/cris/memcopy.h diff --git a/sysdeps/cris/memcopy.h b/sysdeps/cris/memcopy.h new file mode 100644 index 0000000000..7bcf63451d --- /dev/null +++ b/sysdeps/cris/memcopy.h @@ -0,0 +1,57 @@ +/* Copyright (C) 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +/* We override the word-copying macros, partly because misalignment in one + pointer isn't cause for a special function, partly because we want to + get rid of wordcopy.c; these macros are only used in memmove.c (and + it's sibling bcopy) since we have arch-specific mempcpy, memcpy and + memset. */ + +#undef OP_T_THRES +#define OP_T_THRES OPSIZ + +#define WORD_COPY_FWD(dst_bp, src_bp, nbytes_left, nbytes) \ + do \ + { \ + unsigned long enddst_bp = dst_bp + nbytes - (nbytes % OPSIZ); \ + nbytes_left = (nbytes % OPSIZ); \ + while (dst_bp < (unsigned long) enddst_bp) \ + { \ + op_t x = *(op_t *) src_bp; \ + src_bp += sizeof x; \ + *(op_t *) dst_bp = x; \ + dst_bp += sizeof x; \ + } \ + } while (0) + +#define WORD_COPY_BWD(dst_bp, src_bp, nbytes_left, nbytes) \ + do \ + { \ + unsigned long enddst_bp = dst_bp - nbytes + (nbytes % OPSIZ); \ + nbytes_left = (nbytes % OPSIZ); \ + while (dst_bp > enddst_bp) \ + { \ + op_t x; \ + src_bp -= sizeof x; \ + x = *(op_t *) src_bp; \ + dst_bp -= sizeof x; \ + *(op_t *) dst_bp = x; \ + } \ + } while (0) From 050eb091f792dc41eabaab62f5adcc4fbbc80236 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 10 Apr 2001 00:23:30 +0000 Subject: [PATCH 2549/4487] Macros to help memusage program on CRIS. --- sysdeps/cris/memusage.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 sysdeps/cris/memusage.h diff --git a/sysdeps/cris/memusage.h b/sysdeps/cris/memusage.h new file mode 100644 index 0000000000..696c56e561 --- /dev/null +++ b/sysdeps/cris/memusage.h @@ -0,0 +1,27 @@ +/* Copyright (C) 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* No asm variables, just for reasons of solid healthy paranoia. */ +#define GETSP() \ + ({ \ + uintptr_t stack_ptr; \ + __asm__ ("move.d $sp,%0" : "=rm" (stack_ptr)); \ + stack_ptr; \ + }) + +#include From 5cb610484fd5b1a2e78781aaf8de25f0648e552b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 10 Apr 2001 00:23:44 +0000 Subject: [PATCH 2550/4487] setjmp implementation on CRIS. --- sysdeps/cris/setjmp.S | 66 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 sysdeps/cris/setjmp.S diff --git a/sysdeps/cris/setjmp.S b/sysdeps/cris/setjmp.S new file mode 100644 index 0000000000..d773ac94d6 --- /dev/null +++ b/sysdeps/cris/setjmp.S @@ -0,0 +1,66 @@ +/* setjmp for CRIS. + Copyright (C) 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#define _SETJMP_H +#define _ASM +#include + + .syntax no_register_prefix + +ENTRY (__sigsetjmp) +.Local__sigsetjmp: + moveq 1,r9 + movem sp,[r10+1*4] +#ifdef __PIC__ + move.d pc,r9 + addq 0f-.,r9 +#else + move.d 0f,r9 +#endif + move.d r9,[r10] + move srp,[r10+16*4] + move ccr,[r10+17*4] + PLTJUMP (__sigjmp_save) +0: /* This is where longjmp returns. (Don't use "ret" - it's a macro. */ + Ret + move.d r9,r10 +END (__sigsetjmp) + +/* Binary compatibility entry points. Having these in separate files + is not meaningful and just adds library overhead. */ + +ENTRY (__setjmp) + ba .Local__sigsetjmp + moveq 0,r11 +END (__setjmp) + +ENTRY (_setjmp) + ba .Local__sigsetjmp + moveq 0,r11 +END (_setjmp) + +ENTRY (setjmp) + ba .Local__sigsetjmp + moveq 1,r11 +END (setjmp) + +weak_extern (__setjmp) +weak_extern (_setjmp) +weak_extern (setjmp) From fdac9b9648799b57f1d8ed40f18140822e9b0396 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 10 Apr 2001 00:23:59 +0000 Subject: [PATCH 2551/4487] CRIS-specific low-level definitions. --- sysdeps/cris/sysdep.h | 114 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 sysdeps/cris/sysdep.h diff --git a/sysdeps/cris/sysdep.h b/sysdeps/cris/sysdep.h new file mode 100644 index 0000000000..ada5de350c --- /dev/null +++ b/sysdeps/cris/sysdep.h @@ -0,0 +1,114 @@ +/* Assembler macros for CRIS. + Copyright (C) 1999, 2000, 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +#ifndef HAVE_ELF +# error ELF is assumed. Generalize the code and retry. +#endif + +#ifndef NO_UNDERSCORES +# error User-label prefix (underscore) assumed absent. Generalize the code and retry. +#endif + +#ifdef __ASSEMBLER__ + +/* Syntactic details of assembly-code. */ + +/* It is *not* generally true that "ELF uses byte-counts for .align, most + others use log2 of count of bytes", like some neighboring configs say. + See "align" in gas/read.c which is not overridden by + gas/config/obj-elf.c. It takes a log2 argument. *Some* targets + override it to take a byte argument. People should read source instead + of relying on hearsay. */ +# define ALIGNARG(log2) log2 + +# define ASM_TYPE_DIRECTIVE(name,typearg) .type name,typearg +# define ASM_SIZE_DIRECTIVE(name) .size name,.-name + +/* The non-PIC jump is preferred, since it does not stall, and does not + invoke generation of a PLT. These macros assume that $r0 is set up as + GOT register. */ +# ifdef __PIC__ +# define PLTJUMP(_x) \ + add.d C_SYMBOL_NAME (_x):PLT,$pc + +# define PLTCALL(_x) \ + move.d C_SYMBOL_NAME (_x):PLTG,$r9 @ \ + add.d $r0,$r9 @ \ + jsr $r9 + +# define SETUP_PIC \ + push $r0 @ \ + move.d $pc,$r0 @ \ + sub.d .:GOTOFF,$r0 + +# define TEARDOWN_PIC pop $r0 +# else +# define PLTJUMP(_x) jump C_SYMBOL_NAME (_x) +# define PLTCALL(_x) jsr C_SYMBOL_NAME (_x) +# define SETUP_PIC +# define TEARDOWN_PIC +# endif + +/* Define an entry point visible from C. */ +# define ENTRY(name) \ + .text @ \ + ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (name) @ \ + ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME (name), function) @ \ + .align ALIGNARG (2) @ \ + C_LABEL(name) @ \ + CALL_MCOUNT + +# undef END +# define END(name) \ + ASM_SIZE_DIRECTIVE (C_SYMBOL_NAME (name)) + +/* If compiled for profiling, call `mcount' at the start of each function. + FIXME: Note that profiling is not actually implemented. This is just + example code which might not even compile, though it is believed to be + correct. */ +# ifdef PROF +# define CALL_MCOUNT \ + push $srp @ \ + push $r9 @ \ + push $r10 @ \ + push $r11 @ \ + push $r12 @ \ + push $r13 @ \ + SETUP_PIC @ \ + PLTCALL (mcount) @ \ + TEARDOWN_PIC @ \ + pop $r13 @ \ + pop $r12 @ \ + pop $r11 @ \ + pop $r10 @ \ + pop $r9 @ \ + pop $srp +# else +# define CALL_MCOUNT /* Do nothing. */ +# endif + +/* Since C identifiers are not normally prefixed with an underscore + on this system, the asm identifier `syscall_error' intrudes on the + C name space. Make sure we use an innocuous name. */ +# define syscall_error __syscall_error +# define mcount _mcount + +#endif /* __ASSEMBLER__ */ From e555ed65154f4dc05d5b097d8e81817b2f7917ea Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 10 Apr 2001 00:24:23 +0000 Subject: [PATCH 2552/4487] CRIS-specific memory copying code. --- sysdeps/cris/wordcopy.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/cris/wordcopy.c diff --git a/sysdeps/cris/wordcopy.c b/sysdeps/cris/wordcopy.c new file mode 100644 index 0000000000..6525e9f035 --- /dev/null +++ b/sysdeps/cris/wordcopy.c @@ -0,0 +1 @@ +/* Empty; not needed. */ From 5d0b153553538b6fb2200dc33772e8f97d9e1367 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 10 Apr 2001 19:58:52 +0000 Subject: [PATCH 2553/4487] * sysdeps/m68k/fpu/e_pow.c: Correct handling of some exceptional values. * sysdeps/m68k/fpu/e_scalb.c: Likewise. --- sysdeps/m68k/fpu/e_pow.c | 14 ++++++++------ sysdeps/m68k/fpu/e_scalb.c | 5 ++--- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/sysdeps/m68k/fpu/e_pow.c b/sysdeps/m68k/fpu/e_pow.c index 3dc3d819ab..b461ad86c4 100644 --- a/sysdeps/m68k/fpu/e_pow.c +++ b/sysdeps/m68k/fpu/e_pow.c @@ -41,23 +41,25 @@ s(__ieee754_pow) (float_type x, float_type y) y_cond = __m81_test (y); if (y_cond & __M81_COND_ZERO) return 1.0; + if (y_cond & __M81_COND_NAN) + return x == 1.0 ? x : x + y; x_cond = __m81_test (x); - if ((x_cond | y_cond) & __M81_COND_NAN) + if (x_cond & __M81_COND_NAN) return x + y; if (y_cond & __M81_COND_INF) { ax = s(fabs) (x); - if (ax == 1) - return y - y; - if (ax > 1) + if (ax == 1.0) + return ax; + if (ax > 1.0) return y_cond & __M81_COND_NEG ? 0 : y; else return y_cond & __M81_COND_NEG ? -y : 0; } - if (s(fabs) (y) == 1) + if (s(fabs) (y) == 1.0) return y_cond & __M81_COND_NEG ? 1 / x : x; if (y == 2) @@ -77,7 +79,7 @@ s(__ieee754_pow) (float_type x, float_type y) } ax = s(fabs) (x); - if (x_cond & (__M81_COND_INF | __M81_COND_ZERO) || ax == 1) + if (x_cond & (__M81_COND_INF | __M81_COND_ZERO) || ax == 1.0) { z = ax; if (y_cond & __M81_COND_NEG) diff --git a/sysdeps/m68k/fpu/e_scalb.c b/sysdeps/m68k/fpu/e_scalb.c index 22332ca3ad..7f56199a9a 100644 --- a/sysdeps/m68k/fpu/e_scalb.c +++ b/sysdeps/m68k/fpu/e_scalb.c @@ -18,6 +18,7 @@ Boston, MA 02111-1307, USA. */ #include +#include "math_private.h" #include "mathimpl.h" #ifndef SUFF @@ -47,14 +48,12 @@ s(__ieee754_scalb) (float_type x, float_type fn) return x * fn; else if (x_cond & __M81_COND_ZERO) return x; - else if (x_cond & __M81_COND_INF) - return 0.0/0.0; else return x / -fn; } if (m81(__rint) (fn) != fn) - return 0.0/0.0; + return (x - x) / (x - x); __asm ("fscale%.x %1, %0" : "=f" (retval) : "f" (fn), "0" (x)); return retval; From 1bdc6e7d384c569bcf44462cc6f61c81e3257bf1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 10 Apr 2001 20:50:54 +0000 Subject: [PATCH 2554/4487] Stack information for Alpha. --- sysdeps/alpha/stackinfo.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 sysdeps/alpha/stackinfo.h diff --git a/sysdeps/alpha/stackinfo.h b/sysdeps/alpha/stackinfo.h new file mode 100644 index 0000000000..dfaafb04b6 --- /dev/null +++ b/sysdeps/alpha/stackinfo.h @@ -0,0 +1,28 @@ +/* Copyright (C) 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* This file contains a bit of information about the stack allocation + of the processor. */ + +#ifndef _STACKINFO_H +#define _STACKINFO_H 1 + +/* On Alpha the stack grows down. */ +#define _STACK_GROWS_DOWN 1 + +#endif /* stackinfo.h */ From a7d0b32d5f9fcfd7106533becb85c9c3c3f38b83 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 10 Apr 2001 22:32:04 +0000 Subject: [PATCH 2555/4487] [!__ASSEMBLY__]: Declare __start. --- sysdeps/unix/sysv/linux/mips/entry.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysdeps/unix/sysv/linux/mips/entry.h b/sysdeps/unix/sysv/linux/mips/entry.h index 3db6d93636..04d05d2b0a 100644 --- a/sysdeps/unix/sysv/linux/mips/entry.h +++ b/sysdeps/unix/sysv/linux/mips/entry.h @@ -1 +1,5 @@ +#ifndef __ASSEMBLY__ +extern void __start (void); +#endif + #define ENTRY_POINT __start From 0a5b388e1f8b12177cd50708b5653b939136af18 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 11 Apr 2001 07:34:36 +0000 Subject: [PATCH 2556/4487] Stack information for Arm. --- sysdeps/arm/stackinfo.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 sysdeps/arm/stackinfo.h diff --git a/sysdeps/arm/stackinfo.h b/sysdeps/arm/stackinfo.h new file mode 100644 index 0000000000..b746e08e55 --- /dev/null +++ b/sysdeps/arm/stackinfo.h @@ -0,0 +1,28 @@ +/* Copyright (C) 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* This file contains a bit of information about the stack allocation + of the processor. */ + +#ifndef _STACKINFO_H +#define _STACKINFO_H 1 + +/* On Arm the stack grows down. */ +#define _STACK_GROWS_DOWN 1 + +#endif /* stackinfo.h */ From 910250c5756930c3ddd9922b9376f72e55ec860f Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 11 Apr 2001 08:33:14 +0000 Subject: [PATCH 2557/4487] Adjusted. --- sysdeps/m68k/fpu/libm-test-ulps | 217 ++++++++++++++++++++++++-------- 1 file changed, 162 insertions(+), 55 deletions(-) diff --git a/sysdeps/m68k/fpu/libm-test-ulps b/sysdeps/m68k/fpu/libm-test-ulps index 99965f8e06..f8911527dd 100644 --- a/sysdeps/m68k/fpu/libm-test-ulps +++ b/sysdeps/m68k/fpu/libm-test-ulps @@ -212,13 +212,9 @@ ldouble: 2 Test "Real part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": float: 1 ifloat: 1 -ildouble: 5 -ldouble: 5 Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": float: 1 ifloat: 1 -ildouble: 19 -ldouble: 19 Test "Real part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i": float: 3 ifloat: 3 @@ -344,18 +340,9 @@ float: 1 ifloat: 1 # csqrt -Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": -ildouble: 1 -ldouble: 1 -Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i": -ildouble: 1 -ldouble: 1 Test "Real part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i": float: 1 ifloat: 1 -Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i": -ildouble: 1 -ldouble: 1 # ctan Test "Real part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i": @@ -398,9 +385,13 @@ ldouble: 1 Test "erfc (0.7) == 0.32219880616258152702": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 Test "erfc (1.2) == 0.089686021770364619762": float: 2 ifloat: 2 +ildouble: 3 +ldouble: 3 Test "erfc (2.0) == 0.0046777349810472658379": double: 1 idouble: 1 @@ -409,6 +400,8 @@ double: 24 float: 11 idouble: 24 ifloat: 11 +ildouble: 12 +ldouble: 12 # exp10 Test "exp10 (0.7) == 5.0118723362727228500155418688494574": @@ -452,6 +445,17 @@ ifloat: 1 ildouble: 1 ldouble: 1 +# gamma +Test "gamma (-0.5) == log(2*sqrt(pi))": +ildouble: 1 +ldouble: 1 +Test "gamma (0.5) == log(sqrt(pi))": +ildouble: 1 +ldouble: 1 +Test "gamma (3) == M_LN2l": +ildouble: 1 +ldouble: 1 + # hypot Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271": float: 1 @@ -486,8 +490,8 @@ Test "j0 (1.5) == 0.51182767173591812875": float: 1 ifloat: 1 Test "j0 (10.0) == -0.24593576445134833520": -float: 3 -ifloat: 3 +double: 1 +idouble: 1 # j1 Test "j1 (-1.0) == -0.44005058574493351596": @@ -499,20 +503,25 @@ ifloat: 1 Test "j1 (1.5) == 0.55793650791009964199": float: 1 ifloat: 1 -Test "j1 (2.0) == 0.57672480775687338720": -float: 1 -ifloat: 1 Test "j1 (10.0) == 0.043472746168861436670": float: 2 ifloat: 2 +ildouble: 2 +ldouble: 2 +Test "j1 (2.0) == 0.57672480775687338720": +float: 1 +ifloat: 1 +Test "j1 (8.0) == 0.23463634685391462438": +ildouble: 1 +ldouble: 1 # jn Test "jn (0, 1.5) == 0.51182767173591812875": float: 1 ifloat: 1 Test "jn (0, 10.0) == -0.24593576445134833520": -float: 3 -ifloat: 3 +double: 1 +idouble: 1 Test "jn (1, -1.0) == -0.44005058574493351596": float: 1 ifloat: 1 @@ -522,59 +531,101 @@ ifloat: 1 Test "jn (1, 1.5) == 0.55793650791009964199": float: 1 ifloat: 1 -Test "jn (1, 2.0) == 0.57672480775687338720": -float: 1 -ifloat: 1 Test "jn (1, 10.0) == 0.043472746168861436670": float: 2 ifloat: 2 +ildouble: 2 +ldouble: 2 +Test "jn (1, 2.0) == 0.57672480775687338720": +float: 1 +ifloat: 1 +Test "jn (1, 8.0) == 0.23463634685391462438": +ildouble: 1 +ldouble: 1 Test "jn (10, -1.0) == 0.26306151236874532070e-9": float: 2 ifloat: 2 +ildouble: 1 +ldouble: 1 Test "jn (10, 0.1) == 0.26905328954342155795e-19": double: 4 float: 6 idouble: 4 ifloat: 6 +ildouble: 1 +ldouble: 1 Test "jn (10, 0.7) == 0.75175911502153953928e-11": double: 3 float: 2 idouble: 3 ifloat: 2 +ildouble: 2 +ldouble: 2 Test "jn (10, 1.0) == 0.26306151236874532070e-9": float: 2 ifloat: 2 +ildouble: 1 +ldouble: 1 Test "jn (10, 10.0) == 0.20748610663335885770": -float: 9 -ifloat: 9 +double: 1 +float: 11 +idouble: 1 +ifloat: 11 +ildouble: 2 +ldouble: 2 Test "jn (10, 2.0) == 0.25153862827167367096e-6": float: 2 ifloat: 2 +ildouble: 1 +ldouble: 1 Test "jn (3, -1.0) == -0.019563353982668405919": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "jn (3, 0.1) == 0.000020820315754756261429": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 Test "jn (3, 0.7) == 0.0069296548267508408077": double: 2 idouble: 2 Test "jn (3, 1.0) == 0.019563353982668405919": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "jn (3, 10.0) == 0.058379379305186812343": -float: 5 -ifloat: 5 +double: 1 +float: 3 +idouble: 1 +ifloat: 3 +ildouble: 1 +ldouble: 1 # lgamma +Test "lgamma (-0.5) == log(2*sqrt(pi))": +ildouble: 1 +ldouble: 1 +Test "lgamma (0.5) == log(sqrt(pi))": +ildouble: 1 +ldouble: 1 Test "lgamma (0.7) == 0.26086724653166651439": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "lgamma (1.2) == -0.853740900033158497197e-1": double: 1 float: 2 idouble: 1 ifloat: 2 +ildouble: 1 +ldouble: 1 +Test "lgamma (3) == M_LN2l": +ildouble: 1 +ldouble: 1 # log Test "log (0.7) == -0.35667494393873237891": @@ -677,14 +728,21 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "tgamma (0.5) == sqrt (pi)": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "tgamma (0.7) == 1.29805533264755778568": double: 1 float: 1 idouble: 1 ifloat: 1 +Test "tgamma (4) == 6": +ildouble: 1 +ldouble: 1 # y0 Test "y0 (0.1) == -1.5342386513503668441": @@ -695,15 +753,22 @@ ifloat: 2 Test "y0 (0.7) == -0.19066492933739506743": double: 2 idouble: 2 +ildouble: 2 +ldouble: 2 +Test "y0 (1.5) == 0.38244892379775884396": +ildouble: 1 +ldouble: 1 Test "y0 (10.0) == 0.055671167283599391424": -float: 1 -ifloat: 1 +ildouble: 1 +ldouble: 1 Test "y0 (2.0) == 0.51037567264974511960": float: 1 ifloat: 1 Test "y0 (8.0) == 0.22352148938756622053": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 # y1 Test "y1 (0.1) == -6.4589510947020269877": @@ -711,6 +776,8 @@ double: 1 float: 2 idouble: 1 ifloat: 2 +ildouble: 1 +ldouble: 1 Test "y1 (0.7) == -1.1032498719076333697": double: 1 float: 1 @@ -723,11 +790,16 @@ Test "y1 (1.5) == -0.41230862697391129595": float: 2 ifloat: 2 Test "y1 (10.0) == 0.24901542420695388392": -float: 2 -ifloat: 2 +float: 1 +ifloat: 1 Test "y1 (2.0) == -0.10703243154093754689": float: 2 ifloat: 2 +ildouble: 1 +ldouble: 1 +Test "y1 (8.0) == -0.15806046173124749426": +ildouble: 2 +ldouble: 2 # yn Test "yn (0, 0.1) == -1.5342386513503668441": @@ -738,20 +810,29 @@ ifloat: 2 Test "yn (0, 0.7) == -0.19066492933739506743": double: 2 idouble: 2 +ildouble: 2 +ldouble: 2 +Test "yn (0, 1.5) == 0.38244892379775884396": +ildouble: 1 +ldouble: 1 Test "yn (0, 10.0) == 0.055671167283599391424": -float: 1 -ifloat: 1 +ildouble: 1 +ldouble: 1 Test "yn (0, 2.0) == 0.51037567264974511960": float: 1 ifloat: 1 Test "yn (0, 8.0) == 0.22352148938756622053": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "yn (1, 0.1) == -6.4589510947020269877": double: 1 float: 2 idouble: 1 ifloat: 2 +ildouble: 1 +ldouble: 1 Test "yn (1, 0.7) == -1.1032498719076333697": double: 1 float: 1 @@ -764,38 +845,50 @@ Test "yn (1, 1.5) == -0.41230862697391129595": float: 1 ifloat: 1 Test "yn (1, 10.0) == 0.24901542420695388392": -float: 2 -ifloat: 2 +float: 1 +ifloat: 1 Test "yn (1, 2.0) == -0.10703243154093754689": float: 2 ifloat: 2 +ildouble: 1 +ldouble: 1 +Test "yn (1, 8.0) == -0.15806046173124749426": +ildouble: 2 +ldouble: 2 Test "yn (10, 0.1) == -0.11831335132045197885e19": double: 2 float: 2 idouble: 2 ifloat: 2 +ildouble: 2 +ldouble: 2 Test "yn (10, 0.7) == -0.42447194260703866924e10": double: 6 idouble: 6 +ildouble: 7 +ldouble: 7 Test "yn (10, 10.0) == -0.35981415218340272205": -float: 2 -ifloat: 2 -Test "yn (10, 2.0) == -129184.54220803928264": double: 1 +float: 1 idouble: 1 +ifloat: 1 +Test "yn (10, 2.0) == -129184.54220803928264": +ildouble: 1 +ldouble: 1 Test "yn (3, 0.1) == -5099.3323786129048894": double: 1 float: 2 idouble: 1 ifloat: 2 +ildouble: 2 +ldouble: 2 Test "yn (3, 0.7) == -15.819479052819633505": double: 2 float: 1 idouble: 2 ifloat: 1 -Test "yn (3, 10.0) == -0.25136265718383732978": -float: 1 -ifloat: 1 +ildouble: 2 +ldouble: 2 Test "yn (3, 2.0) == -1.1277837768404277861": float: 1 ifloat: 1 @@ -942,14 +1035,12 @@ ldouble: 2 Function: Real part of "cexp": float: 3 ifloat: 3 -ildouble: 5 -ldouble: 5 +ildouble: 2 +ldouble: 2 Function: Imaginary part of "cexp": float: 2 ifloat: 2 -ildouble: 19 -ldouble: 19 Function: Imaginary part of "clog": ildouble: 1 @@ -1022,12 +1113,6 @@ ldouble: 2 Function: Real part of "csqrt": float: 1 ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Imaginary part of "csqrt": -ildouble: 1 -ldouble: 1 Function: Real part of "ctan": double: 1 @@ -1058,6 +1143,8 @@ double: 24 float: 11 idouble: 24 ifloat: 11 +ildouble: 12 +ldouble: 12 Function: "exp10": double: 1 @@ -1077,6 +1164,10 @@ ifloat: 1 ildouble: 1 ldouble: 1 +Function: "gamma": +ildouble: 1 +ldouble: 1 + Function: "hypot": float: 1 ifloat: 1 @@ -1084,24 +1175,32 @@ ildouble: 1 ldouble: 1 Function: "j0": -float: 3 -ifloat: 3 +double: 1 +float: 1 +idouble: 1 +ifloat: 1 Function: "j1": float: 2 ifloat: 2 +ildouble: 2 +ldouble: 2 Function: "jn": double: 4 -float: 9 +float: 11 idouble: 4 -ifloat: 9 +ifloat: 11 +ildouble: 2 +ldouble: 2 Function: "lgamma": double: 1 float: 2 idouble: 1 ifloat: 2 +ildouble: 1 +ldouble: 1 Function: "log": double: 1 @@ -1166,23 +1265,31 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: "y0": double: 2 float: 2 idouble: 2 ifloat: 2 +ildouble: 2 +ldouble: 2 Function: "y1": double: 1 float: 2 idouble: 1 ifloat: 2 +ildouble: 2 +ldouble: 2 Function: "yn": double: 6 float: 2 idouble: 6 ifloat: 2 +ildouble: 7 +ldouble: 7 # end of automatic generation From 5c8f22b4fbec1b95e10439f51a11d49b625e6c33 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 11 Apr 2001 11:56:35 +0000 Subject: [PATCH 2558/4487] [__ASSEMBLY__]: Define it. --- sysdeps/mips/elf/start.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/mips/elf/start.S b/sysdeps/mips/elf/start.S index ad7976e70d..a5ae48048a 100644 --- a/sysdeps/mips/elf/start.S +++ b/sysdeps/mips/elf/start.S @@ -1,5 +1,5 @@ /* Startup code compliant to the ELF Mips ABI. - Copyright (C) 1995, 1997, 2000 Free Software Foundation, Inc. + Copyright (C) 1995, 1997, 2000, 2001 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 @@ -17,6 +17,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#define __ASSEMBLY__ 1 #include #ifndef ENTRY_POINT From b0b7e44c7557c6c20d5f70c40c3c7c7f3f770de8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 17 Apr 2001 18:59:43 +0000 Subject: [PATCH 2559/4487] Adjust for increased precision in result of several tests. --- sysdeps/alpha/fpu/libm-test-ulps | 44 ++++++++++++++--------------- sysdeps/arm/libm-test-ulps | 44 ++++++++++++++--------------- sysdeps/m68k/fpu/libm-test-ulps | 48 ++++++++++++++++---------------- sysdeps/mips/fpu/libm-test-ulps | 44 ++++++++++++++--------------- 4 files changed, 90 insertions(+), 90 deletions(-) diff --git a/sysdeps/alpha/fpu/libm-test-ulps b/sysdeps/alpha/fpu/libm-test-ulps index c278128ff4..5169a3e763 100644 --- a/sysdeps/alpha/fpu/libm-test-ulps +++ b/sysdeps/alpha/fpu/libm-test-ulps @@ -39,87 +39,87 @@ float: 1 ifloat: 1 # cacos -Test "Real part of: cacos (0.7 + 1.2 i) == 1.1351827477151551089 - 1.0927647857577371459 i": +Test "Real part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Imaginary part of: cacos (0.7 + 1.2 i) == 1.1351827477151551089 - 1.0927647857577371459 i": +Test "Imaginary part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i": float: 1 ifloat: 1 # cacosh -Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323 + 2.1414491111159960199 i": +Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i": double: 1 float: 7 idouble: 1 ifloat: 7 -Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323 + 2.1414491111159960199 i": +Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i": double: 1 float: 3 idouble: 1 ifloat: 3 -Test "Real part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459 + 1.1351827477151551089 i": +Test "Real part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459105272080819308 + 1.1351827477151551088992008271819053 i": double: 1 float: 1 idouble: 1 ifloat: 1 # casin -Test "Real part of: casin (0.7 + 1.2 i) == 0.4356135790797415103 + 1.0927647857577371459 i": +Test "Real part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i": double: 3 float: 2 idouble: 3 ifloat: 2 -Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103 + 1.0927647857577371459 i": +Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i": float: 1 ifloat: 1 # casinh -Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917 - 0.9646585044076027920 i": +Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": double: 5 float: 1 idouble: 5 ifloat: 1 -Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917 - 0.9646585044076027920 i": +Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": double: 3 float: 6 idouble: 3 ifloat: 6 -Test "Real part of: casinh (0.7 + 1.2 i) == 0.9786545955936738768 + 0.9113541895315601156 i": +Test "Real part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i": double: 1 idouble: 1 -Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.9786545955936738768 + 0.9113541895315601156 i": +Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i": float: 1 ifloat: 1 # catan -Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225 - 0.2290726829685387662 i": +Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": float: 3 ifloat: 3 -Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225 - 0.2290726829685387662 i": +Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Real part of: catan (0.7 + 1.2 i) == 1.0785743834118921877 + 0.5770573776534306764 i": +Test "Real part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i": float: 4 ifloat: 4 -Test "Imaginary part of: catan (0.7 + 1.2 i) == 1.0785743834118921877 + 0.5770573776534306764 i": +Test "Imaginary part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i": double: 1 idouble: 1 # catanh -Test "Real part of: catanh (-2 - 3 i) == -0.1469466662255297520 - 1.3389725222944935611 i": +Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": double: 4 idouble: 4 -Test "Imaginary part of: catanh (-2 - 3 i) == -0.1469466662255297520 - 1.3389725222944935611 i": +Test "Imaginary part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": float: 4 ifloat: 4 -Test "Real part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959 + 0.9702403077950989849 i": +Test "Real part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i": float: 1 ifloat: 1 -Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959 + 0.9702403077950989849 i": +Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i": double: 1 float: 6 idouble: 1 @@ -174,7 +174,7 @@ float: 1 ifloat: 1 # clog -Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680 - 2.1587989303424641704 i": +Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i": double: 1 float: 3 idouble: 1 @@ -521,7 +521,7 @@ idouble: 1 ifloat: 2 # log -Test "log (0.7) == -0.35667494393873237891": +Test "log (0.7) == -0.35667494393873237891263871124118447": double: 1 float: 1 idouble: 1 @@ -538,7 +538,7 @@ float: 1 ifloat: 1 # log1p -Test "log1p (-0.3) == -0.35667494393873237891": +Test "log1p (-0.3) == -0.35667494393873237891263871124118447": double: 1 float: 1 idouble: 1 diff --git a/sysdeps/arm/libm-test-ulps b/sysdeps/arm/libm-test-ulps index 23a0f35702..260ba58127 100644 --- a/sysdeps/arm/libm-test-ulps +++ b/sysdeps/arm/libm-test-ulps @@ -39,87 +39,87 @@ float: 1 ifloat: 1 # cacos -Test "Real part of: cacos (0.7 + 1.2 i) == 1.1351827477151551089 - 1.0927647857577371459 i": +Test "Real part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Imaginary part of: cacos (0.7 + 1.2 i) == 1.1351827477151551089 - 1.0927647857577371459 i": +Test "Imaginary part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i": float: 1 ifloat: 1 # cacosh -Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323 + 2.1414491111159960199 i": +Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i": double: 1 float: 7 idouble: 1 ifloat: 7 -Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323 + 2.1414491111159960199 i": +Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i": double: 1 float: 3 idouble: 1 ifloat: 3 -Test "Real part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459 + 1.1351827477151551089 i": +Test "Real part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459105272080819308 + 1.1351827477151551088992008271819053 i": double: 1 float: 1 idouble: 1 ifloat: 1 # casin -Test "Real part of: casin (0.7 + 1.2 i) == 0.4356135790797415103 + 1.0927647857577371459 i": +Test "Real part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i": double: 3 float: 2 idouble: 3 ifloat: 2 -Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103 + 1.0927647857577371459 i": +Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i": float: 1 ifloat: 1 # casinh -Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917 - 0.9646585044076027920 i": +Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": double: 5 float: 1 idouble: 5 ifloat: 1 -Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917 - 0.9646585044076027920 i": +Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": double: 3 float: 6 idouble: 3 ifloat: 6 -Test "Real part of: casinh (0.7 + 1.2 i) == 0.9786545955936738768 + 0.9113541895315601156 i": +Test "Real part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i": double: 1 idouble: 1 -Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.9786545955936738768 + 0.9113541895315601156 i": +Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i": float: 1 ifloat: 1 # catan -Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225 - 0.2290726829685387662 i": +Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": float: 3 ifloat: 3 -Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225 - 0.2290726829685387662 i": +Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Real part of: catan (0.7 + 1.2 i) == 1.0785743834118921877 + 0.5770573776534306764 i": +Test "Real part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i": float: 4 ifloat: 4 -Test "Imaginary part of: catan (0.7 + 1.2 i) == 1.0785743834118921877 + 0.5770573776534306764 i": +Test "Imaginary part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i": double: 1 idouble: 1 # catanh -Test "Real part of: catanh (-2 - 3 i) == -0.1469466662255297520 - 1.3389725222944935611 i": +Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": double: 4 idouble: 4 -Test "Imaginary part of: catanh (-2 - 3 i) == -0.1469466662255297520 - 1.3389725222944935611 i": +Test "Imaginary part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": float: 4 ifloat: 4 -Test "Real part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959 + 0.9702403077950989849 i": +Test "Real part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i": float: 1 ifloat: 1 -Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959 + 0.9702403077950989849 i": +Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i": double: 1 float: 6 idouble: 1 @@ -174,7 +174,7 @@ float: 1 ifloat: 1 # clog -Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680 - 2.1587989303424641704 i": +Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i": double: 1 float: 3 idouble: 1 @@ -521,7 +521,7 @@ idouble: 1 ifloat: 2 # log -Test "log (0.7) == -0.35667494393873237891": +Test "log (0.7) == -0.35667494393873237891263871124118447": double: 1 float: 1 idouble: 1 @@ -538,7 +538,7 @@ float: 1 ifloat: 1 # log1p -Test "log1p (-0.3) == -0.35667494393873237891": +Test "log1p (-0.3) == -0.35667494393873237891263871124118447": double: 1 float: 1 idouble: 1 diff --git a/sysdeps/m68k/fpu/libm-test-ulps b/sysdeps/m68k/fpu/libm-test-ulps index f8911527dd..cf12777419 100644 --- a/sysdeps/m68k/fpu/libm-test-ulps +++ b/sysdeps/m68k/fpu/libm-test-ulps @@ -6,7 +6,7 @@ ildouble: 1 ldouble: 1 # acosh -Test "acosh (7) == 2.6339157938496334172": +Test "acosh (7) == 2.633915793849633417250092694615937": ildouble: 1 ldouble: 1 @@ -48,109 +48,109 @@ float: 1 ifloat: 1 # cacos -Test "Imaginary part of: cacos (-2 - 3 i) == 2.1414491111159960199 + 1.9833870299165354323 i": +Test "Imaginary part of: cacos (-2 - 3 i) == 2.1414491111159960199416055713254211 + 1.9833870299165354323470769028940395 i": ildouble: 1 ldouble: 1 -Test "Real part of: cacos (0.7 + 1.2 i) == 1.1351827477151551089 - 1.0927647857577371459 i": +Test "Real part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i": double: 1 float: 1 idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 -Test "Imaginary part of: cacos (0.7 + 1.2 i) == 1.1351827477151551089 - 1.0927647857577371459 i": +Test "Imaginary part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i": float: 2 ifloat: 2 ildouble: 1 ldouble: 1 # cacosh -Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323 + 2.1414491111159960199 i": +Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i": double: 1 float: 7 idouble: 1 ifloat: 7 ildouble: 5 ldouble: 5 -Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323 + 2.1414491111159960199 i": +Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i": double: 1 idouble: 1 ildouble: 2 ldouble: 2 -Test "Real part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459 + 1.1351827477151551089 i": +Test "Real part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459105272080819308 + 1.1351827477151551088992008271819053 i": double: 1 idouble: 1 ildouble: 1 ldouble: 1 -Test "Imaginary part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459 + 1.1351827477151551089 i": +Test "Imaginary part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459105272080819308 + 1.1351827477151551088992008271819053 i": ildouble: 1 ldouble: 1 # casin -Test "Imaginary part of: casin (-2 - 3 i) == -0.5706527843210994007 - 1.9833870299165354323 i": +Test "Imaginary part of: casin (-2 - 3 i) == -0.57065278432109940071028387968566963 - 1.9833870299165354323470769028940395 i": ildouble: 1 ldouble: 1 -Test "Real part of: casin (0.7 + 1.2 i) == 0.4356135790797415103 + 1.0927647857577371459 i": +Test "Real part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i": double: 3 float: 2 idouble: 3 ifloat: 2 ildouble: 1 ldouble: 1 -Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103 + 1.0927647857577371459 i": +Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i": float: 2 ifloat: 2 ildouble: 1 ldouble: 1 # casinh -Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917 - 0.9646585044076027920 i": +Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": double: 6 float: 19 idouble: 6 ifloat: 19 ildouble: 6 ldouble: 6 -Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917 - 0.9646585044076027920 i": +Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": double: 13 float: 1 idouble: 13 ifloat: 1 ildouble: 7 ldouble: 7 -Test "Real part of: casinh (0.7 + 1.2 i) == 0.9786545955936738768 + 0.9113541895315601156 i": +Test "Real part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i": double: 1 idouble: 1 ildouble: 3 ldouble: 3 -Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.9786545955936738768 + 0.9113541895315601156 i": +Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i": float: 2 ifloat: 2 ildouble: 3 ldouble: 3 # catan -Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225 - 0.2290726829685387662 i": +Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": double: 1 float: 1 idouble: 1 ifloat: 1 ildouble: 7 ldouble: 7 -Test "Real part of: catan (0.7 + 1.2 i) == 1.0785743834118921877 + 0.5770573776534306764 i": +Test "Real part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i": ildouble: 1 ldouble: 1 -Test "Imaginary part of: catan (0.7 + 1.2 i) == 1.0785743834118921877 + 0.5770573776534306764 i": +Test "Imaginary part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i": float: 1 ifloat: 1 ildouble: 1 ldouble: 1 # catanh -Test "Real part of: catanh (-2 - 3 i) == -0.1469466662255297520 - 1.3389725222944935611 i": +Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": ildouble: 2 ldouble: 2 -Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959 + 0.9702403077950989849 i": +Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i": ildouble: 2 ldouble: 2 @@ -225,7 +225,7 @@ float: 2 ifloat: 2 # clog -Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680 - 2.1587989303424641704 i": +Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i": ildouble: 1 ldouble: 1 @@ -628,7 +628,7 @@ ildouble: 1 ldouble: 1 # log -Test "log (0.7) == -0.35667494393873237891": +Test "log (0.7) == -0.35667494393873237891263871124118447": double: 1 float: 1 idouble: 1 @@ -653,7 +653,7 @@ float: 1 ifloat: 1 # log1p -Test "log1p (-0.3) == -0.35667494393873237891": +Test "log1p (-0.3) == -0.35667494393873237891263871124118447": double: 1 float: 1 idouble: 1 @@ -715,7 +715,7 @@ float: 1 ifloat: 1 # tan -Test "tan (0.7) == 0.84228838046307944813": +Test "tan (0.7) == 0.84228838046307944812813500221293775": ildouble: 1 ldouble: 1 Test "tan (pi/4) == 1": diff --git a/sysdeps/mips/fpu/libm-test-ulps b/sysdeps/mips/fpu/libm-test-ulps index a36dacf17f..78cedbcb2e 100644 --- a/sysdeps/mips/fpu/libm-test-ulps +++ b/sysdeps/mips/fpu/libm-test-ulps @@ -39,87 +39,87 @@ float: 1 ifloat: 1 # cacos -Test "Real part of: cacos (0.7 + 1.2 i) == 1.1351827477151551089 - 1.0927647857577371459 i": +Test "Real part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Imaginary part of: cacos (0.7 + 1.2 i) == 1.1351827477151551089 - 1.0927647857577371459 i": +Test "Imaginary part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i": float: 1 ifloat: 1 # cacosh -Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323 + 2.1414491111159960199 i": +Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i": double: 1 float: 7 idouble: 1 ifloat: 7 -Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323 + 2.1414491111159960199 i": +Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i": double: 1 float: 3 idouble: 1 ifloat: 3 -Test "Real part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459 + 1.1351827477151551089 i": +Test "Real part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459105272080819308 + 1.1351827477151551088992008271819053 i": double: 1 float: 1 idouble: 1 ifloat: 1 # casin -Test "Real part of: casin (0.7 + 1.2 i) == 0.4356135790797415103 + 1.0927647857577371459 i": +Test "Real part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i": double: 3 float: 2 idouble: 3 ifloat: 2 -Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103 + 1.0927647857577371459 i": +Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i": float: 1 ifloat: 1 # casinh -Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917 - 0.9646585044076027920 i": +Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": double: 5 float: 1 idouble: 5 ifloat: 1 -Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917 - 0.9646585044076027920 i": +Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": double: 3 float: 6 idouble: 3 ifloat: 6 -Test "Real part of: casinh (0.7 + 1.2 i) == 0.9786545955936738768 + 0.9113541895315601156 i": +Test "Real part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i": double: 1 idouble: 1 -Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.9786545955936738768 + 0.9113541895315601156 i": +Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i": float: 1 ifloat: 1 # catan -Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225 - 0.2290726829685387662 i": +Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": float: 3 ifloat: 3 -Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225 - 0.2290726829685387662 i": +Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Real part of: catan (0.7 + 1.2 i) == 1.0785743834118921877 + 0.5770573776534306764 i": +Test "Real part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i": float: 4 ifloat: 4 -Test "Imaginary part of: catan (0.7 + 1.2 i) == 1.0785743834118921877 + 0.5770573776534306764 i": +Test "Imaginary part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i": double: 1 idouble: 1 # catanh -Test "Real part of: catanh (-2 - 3 i) == -0.1469466662255297520 - 1.3389725222944935611 i": +Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": double: 4 idouble: 4 -Test "Imaginary part of: catanh (-2 - 3 i) == -0.1469466662255297520 - 1.3389725222944935611 i": +Test "Imaginary part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": float: 4 ifloat: 4 -Test "Real part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959 + 0.9702403077950989849 i": +Test "Real part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i": float: 1 ifloat: 1 -Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959 + 0.9702403077950989849 i": +Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i": double: 1 float: 6 idouble: 1 @@ -174,7 +174,7 @@ float: 1 ifloat: 1 # clog -Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680 - 2.1587989303424641704 i": +Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i": double: 1 float: 3 idouble: 1 @@ -521,7 +521,7 @@ idouble: 1 ifloat: 2 # log -Test "log (0.7) == -0.35667494393873237891": +Test "log (0.7) == -0.35667494393873237891263871124118447": double: 1 float: 1 idouble: 1 @@ -538,7 +538,7 @@ float: 1 ifloat: 1 # log1p -Test "log1p (-0.3) == -0.35667494393873237891": +Test "log1p (-0.3) == -0.35667494393873237891263871124118447": double: 1 float: 1 idouble: 1 From 5e6947e36466d6791d83b3e0be75bb47b524148e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 18 Apr 2001 00:19:18 +0000 Subject: [PATCH 2560/4487] Adjust error values for atan2f. --- sysdeps/alpha/fpu/libm-test-ulps | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/sysdeps/alpha/fpu/libm-test-ulps b/sysdeps/alpha/fpu/libm-test-ulps index 5169a3e763..6d664c8a53 100644 --- a/sysdeps/alpha/fpu/libm-test-ulps +++ b/sysdeps/alpha/fpu/libm-test-ulps @@ -13,6 +13,17 @@ float: 2 idouble: 1 ifloat: 2 +# atan2 +Test "atan2 (0.7, -1.0) == 2.530866689200584621918884506789267": +float: 3 +ifloat: 3 +Test "atan2 (-0.7, -1.0) == -2.530866689200584621918884506789267": +float: 3 +ifloat: 3 +Test "atan2 (1.4, -0.93) == 2.1571487668237843754887415992772736": +float: 4 +ifloat: 4 + # atanh Test "atanh (0.7) == 0.8673005276940531944": double: 1 @@ -758,6 +769,10 @@ float: 2 idouble: 1 ifloat: 2 +Function: "atan2": +float: 3 +ifloat: 3 + Function: "atanh": double: 1 idouble: 1 From f6bd63ae2162f5faec2625a6b3909a816201b7e6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 18 Apr 2001 00:22:15 +0000 Subject: [PATCH 2561/4487] Maximum error for atan2f is 4. --- sysdeps/alpha/fpu/libm-test-ulps | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/fpu/libm-test-ulps b/sysdeps/alpha/fpu/libm-test-ulps index 6d664c8a53..70a0f0897f 100644 --- a/sysdeps/alpha/fpu/libm-test-ulps +++ b/sysdeps/alpha/fpu/libm-test-ulps @@ -770,8 +770,8 @@ idouble: 1 ifloat: 2 Function: "atan2": -float: 3 -ifloat: 3 +float: 4 +ifloat: 4 Function: "atanh": double: 1 From 070b2d2a8e6f21020c17bb029fb061521b09b5f5 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 19 Apr 2001 09:33:50 +0000 Subject: [PATCH 2562/4487] Fix typos in last patch. --- sysdeps/unix/sysv/linux/hppa/umount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/hppa/umount.c b/sysdeps/unix/sysv/linux/hppa/umount.c index 29633f56fb..a401f6b146 100644 --- a/sysdeps/unix/sysv/linux/hppa/umount.c +++ b/sysdeps/unix/sysv/linux/hppa/umount.c @@ -20,7 +20,7 @@ /* Since we don't have an oldumount system call, do what the kernel does down here. */ -extern log int __umount2 (char * name, int flags); +extern long int __umount2 (char *name, int flags); long int __umount (const char *name) From 6f66c56d4e6122b127f4aa2c3c97657e396df39a Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 19 Apr 2001 09:35:01 +0000 Subject: [PATCH 2563/4487] Fix typos in last patch. --- sysdeps/unix/sysv/linux/hppa/umount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/hppa/umount.c b/sysdeps/unix/sysv/linux/hppa/umount.c index a401f6b146..3d4c18cd4c 100644 --- a/sysdeps/unix/sysv/linux/hppa/umount.c +++ b/sysdeps/unix/sysv/linux/hppa/umount.c @@ -20,7 +20,7 @@ /* Since we don't have an oldumount system call, do what the kernel does down here. */ -extern long int __umount2 (char *name, int flags); +extern long int __umount2 (const char *name, int flags); long int __umount (const char *name) From 964b686b757d0d0e40fb6e2fd29472f90fc7b534 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 19 Apr 2001 21:23:49 +0000 Subject: [PATCH 2564/4487] (INLINE_SYSCALL): Change to return a signed result for compatibility with other architectures, and correctness. --- sysdeps/unix/sysv/linux/hppa/sysdep.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.h b/sysdeps/unix/sysv/linux/hppa/sysdep.h index 10e360dfd5..1430642612 100644 --- a/sysdeps/unix/sysv/linux/hppa/sysdep.h +++ b/sysdeps/unix/sysv/linux/hppa/sysdep.h @@ -192,21 +192,21 @@ #undef INLINE_SYSCALL #define INLINE_SYSCALL(name, nr, args...) ({ \ - unsigned long __sys_res; \ + long __sys_res; \ { \ register unsigned long __res asm("r28"); \ LOAD_ARGS_##nr(args) \ asm volatile( \ - "ble 0x100(%%sr2, %%r0)\n\t" \ + "ble 0x100(%%sr2, %%r0)\n\t" \ " ldi %1, %%r20" \ : "=r" (__res) \ : "i" (SYS_ify(name)) ASM_ARGS_##nr \ ); \ __sys_res = __res; \ } \ - if (__sys_res >= (unsigned long)-4095) { \ + if ((unsigned long)__sys_res >= (unsigned long)-4095) { \ __set_errno(-__sys_res); \ - __sys_res = (unsigned long)-1; \ + __sys_res = -1; \ } \ __sys_res; \ }) From 70d533e66bc0349c8e22566ec52a8efdae7d862b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 20 Apr 2001 05:58:49 +0000 Subject: [PATCH 2565/4487] Change dlt reg save to r3 and generate unwind info by hand. --- sysdeps/hppa/elf/initfini.c | 44 ++++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/sysdeps/hppa/elf/initfini.c b/sysdeps/hppa/elf/initfini.c index c058ed0425..d2e07ea373 100644 --- a/sysdeps/hppa/elf/initfini.c +++ b/sysdeps/hppa/elf/initfini.c @@ -59,8 +59,6 @@ __asm__ (" .align 4 .globl _init .type _init,@function - .proc - .callinfo _init: stw %rp,-20(%sp) stwm %r4,64(%sp) @@ -68,25 +66,38 @@ __asm__ (" bl __gmon_start__,%rp copy %r19,%r4 /* delay slot */ copy %r4,%r19 - .align 4 - .procend /*@_init_PROLOG_ENDS*/ /*@_init_EPILOG_BEGINS*/ - .section .init - copy %r4,%r19 - ldw -84(%sp),%rp - bv %r0(%rp) - ldwm -64(%sp),%r4 .text .align 4 .weak __gmon_start__ .type __gmon_start__,@function +__gmon_start__: .proc .callinfo -__gmon_start__: + .entry bv,n %r0(%r2) + .exit .procend + +/* Here is the tail end of _init. We put __gmon_start before this so + that the assembler creates the .PARISC.unwind section for us, ie. + with the right attributes. */ + .section .init + ldw -84(%sp),%rp + copy %r4,%r19 + bv %r0(%rp) +_end_init: + ldwm -64(%sp),%r4 + +/* Our very own unwind info, because the assembler can't handle + functions split into two or more pieces. */ + .section .PARISC.unwind + .extern _init + .word _init, _end_init + .byte 0x08, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08 + /*@_init_EPILOG_ENDS*/ /*@_fini_PROLOG_BEGINS*/ @@ -94,23 +105,26 @@ __asm__ (" .align 4 .globl _fini .type _fini,@function - .proc - .callinfo _fini: stw %rp,-20(%sp) stwm %r4,64(%sp) stw %r19,-32(%sp) copy %r19,%r4 - .align 4 - .procend /*@_fini_PROLOG_ENDS*/ /*@_fini_EPILOG_BEGINS*/ .section .fini - copy %r4,%r19 ldw -84(%sp),%rp + copy %r4,%r19 bv %r0(%rp) +_end_fini: ldwm -64(%sp),%r4 + + .section .PARISC.unwind + .extern _fini + .word _fini, _end_fini + .byte 0x08, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08 + /*@_fini_EPILOG_ENDS*/ /*@TRAILER_BEGINS*/ From ee6d867525ae476ad1f62c93e8179edc2c91ec60 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 20 Apr 2001 06:03:07 +0000 Subject: [PATCH 2566/4487] (LDFLAGS-c_pic.os): Define. (CFLAGS-.os): Remove. --- sysdeps/hppa/Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sysdeps/hppa/Makefile b/sysdeps/hppa/Makefile index f6ad84358a..e6fb771c7d 100644 --- a/sysdeps/hppa/Makefile +++ b/sysdeps/hppa/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 2000 Free Software Foundation, Inc. +# Copyright (C) 2000, 2001 Free Software Foundation, Inc. # This file is part of the GNU C Library. # Contributed by David Huggins-Daines (dhd@debian.org) @@ -17,8 +17,10 @@ # write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. -# We need this for all shared objects since the build process uses ld -r -CFLAGS-.os += -ffunction-sections +# We used to need this since the build process uses ld -r. Now we use +# ld -r --unique=.text* which does more or less the same thing, but better. +# CFLAGS-.os += -ffunction-sections +LDFLAGS-c_pic.os += -Wl,--unique=.text* ifeq ($(subdir),elf) dl-routines += dl-symaddr dl-fptr From 6e3bde59b4f5aa56e5a384c092fc06fbe31cf84b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 20 Apr 2001 06:05:04 +0000 Subject: [PATCH 2567/4487] (CALL_MCOUNT): Update comment. --- sysdeps/unix/sysv/linux/hppa/sysdep.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.h b/sysdeps/unix/sysv/linux/hppa/sysdep.h index 1430642612..20ec736123 100644 --- a/sysdeps/unix/sysv/linux/hppa/sysdep.h +++ b/sysdeps/unix/sysv/linux/hppa/sysdep.h @@ -89,13 +89,8 @@ 1: .size C_SYMBOL_NAME(name),1b-C_SYMBOL_NAME(name) /* If compiled for profiling, call `mcount' at the start of each function. */ -#ifdef PROF -/* The mcount code relies on a normal frame pointer being on the stack - to locate our caller, so push one just for its benefit. */ -#define CALL_MCOUNT /* XXX */ -#else +/* No, don't bother. gcc will put the call in for us. */ #define CALL_MCOUNT /* Do nothing. */ -#endif /* syscall wrappers consist of #include @@ -231,7 +226,7 @@ register unsigned long __r21 __asm__("r21") = (unsigned long)r21; \ LOAD_ARGS_5(r26,r25,r24,r23,r22) -#define ASM_ARGS_0 +#define ASM_ARGS_0 #define ASM_ARGS_1 , "r" (__r26) #define ASM_ARGS_2 , "r" (__r26), "r" (__r25) #define ASM_ARGS_3 , "r" (__r26), "r" (__r25), "r" (__r24) From 21e7ad57abfc434e724f1f486e0d5f82b2bd4969 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 20 Apr 2001 06:05:52 +0000 Subject: [PATCH 2568/4487] (NGREG, NFPREG, gregset): Correct for new kernel definitions. --- sysdeps/unix/sysv/linux/hppa/sys/ucontext.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h b/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h index c819ab1627..44108f0c54 100644 --- a/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2000, 2001 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 @@ -33,15 +33,16 @@ typedef unsigned long int greg_t; /* Number of general registers. */ -#define NGREG 42 -#define NFPREG 33 +#define NGREG 80 +#define NFPREG 32 /* Container for all general registers. */ typedef struct gregset { greg_t g_regs[32]; - greg_t sr_regs[5]; - greg_t g_pad[5]; + greg_t sr_regs[8]; + greg_t cr_regs[24]; + greg_t g_pad[16]; } gregset_t; /* Container for all FPU registers. */ From efaa6dd8a230457fa2bf238aaf3efe74298dcb28 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 20 Apr 2001 13:02:01 +0000 Subject: [PATCH 2569/4487] * sysdeps/m68k/fpu/libm-test-ulps: Update. --- sysdeps/m68k/fpu/libm-test-ulps | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sysdeps/m68k/fpu/libm-test-ulps b/sysdeps/m68k/fpu/libm-test-ulps index cf12777419..ea8789f4bd 100644 --- a/sysdeps/m68k/fpu/libm-test-ulps +++ b/sysdeps/m68k/fpu/libm-test-ulps @@ -70,8 +70,8 @@ double: 1 float: 7 idouble: 1 ifloat: 7 -ildouble: 5 -ldouble: 5 +ildouble: 6 +ldouble: 6 Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i": double: 1 idouble: 1 @@ -150,6 +150,9 @@ ldouble: 1 Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": ildouble: 2 ldouble: 2 +Test "Real part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i": +ildouble: 1 +ldouble: 2 Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i": ildouble: 2 ldouble: 2 @@ -941,8 +944,8 @@ double: 1 float: 7 idouble: 1 ifloat: 7 -ildouble: 5 -ldouble: 5 +ildouble: 6 +ldouble: 6 Function: Imaginary part of "cacosh": double: 1 From 85ff0834bb7b1ff476fcf3bcfd66a6f06bcc79f8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 22 Apr 2001 03:21:34 +0000 Subject: [PATCH 2570/4487] (_dl_function_address): Prototype. (DL_FUNCTION_ADDRESS): Define. (DL_DT_INIT_ADDRESS): Define. (DL_DT_FINI_ADDRESS): Define. --- sysdeps/hppa/dl-lookupcfg.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sysdeps/hppa/dl-lookupcfg.h b/sysdeps/hppa/dl-lookupcfg.h index 4f5f8998a7..118c4d0c58 100644 --- a/sysdeps/hppa/dl-lookupcfg.h +++ b/sysdeps/hppa/dl-lookupcfg.h @@ -34,3 +34,16 @@ Elf32_Addr _dl_lookup_address (const void *address); void _dl_unmap (struct link_map *map); #define DL_UNMAP(map) _dl_unmap (map) + +extern Elf32_Addr _dl_function_address (const struct link_map *map, + Elf32_Addr start); + +#define DL_FUNCTION_ADDRESS(map, addr) _dl_function_address (map, addr) + +/* The test for "addr & 2" below is to accomodate old binaries which + violated the ELF ABI by pointing DT_INIT and DT_FINI at a function + pointer. */ +#define DL_DT_INIT_ADDRESS(map, addr) \ + ((Elf32_Addr)(addr) & 2 ? (addr) : DL_FUNCTION_ADDRESS (map, addr)) +#define DL_DT_FINI_ADDRESS(map, addr) \ + ((Elf32_Addr)(addr) & 2 ? (addr) : DL_FUNCTION_ADDRESS (map, addr)) From e40ba2ccb8cc4d54b59c8928925b50def0b85ed6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 22 Apr 2001 03:21:47 +0000 Subject: [PATCH 2571/4487] Add _dl_function_address. --- sysdeps/hppa/Versions | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/hppa/Versions b/sysdeps/hppa/Versions index 0c447d9f28..c5f35d4971 100644 --- a/sysdeps/hppa/Versions +++ b/sysdeps/hppa/Versions @@ -2,5 +2,6 @@ ld { GLIBC_2.2 { # hppa specific functions in the dynamic linker, but used by libc.so. _dl_symbol_address; _dl_unmap; _dl_lookup_address; + _dl_function_address; } } From 9c56436673f636ce14a298c43a2c0b84101c3fec Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 22 Apr 2001 03:22:03 +0000 Subject: [PATCH 2572/4487] (ELF_MACHINE_START_ADDRESS): Define. --- sysdeps/hppa/dl-machine.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h index f8a8e7bcee..a3437b557a 100644 --- a/sysdeps/hppa/dl-machine.h +++ b/sysdeps/hppa/dl-machine.h @@ -448,6 +448,10 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) /* We only use RELA. */ #define ELF_MACHINE_NO_REL 1 +/* Return the address of the entry point. */ +#define ELF_MACHINE_START_ADDRESS(map, start) \ + DL_FUNCTION_ADDRESS (map, start) + #endif /* !dl_machine_h */ /* These are only actually used where RESOLVE_MAP is defined, anyway. */ From c358f9f7878269fbd60fb524e5255ddf975d1a62 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 22 Apr 2001 03:22:20 +0000 Subject: [PATCH 2573/4487] (_dl_start_address): Rename to _dl_function_address. --- sysdeps/hppa/dl-symaddr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/hppa/dl-symaddr.c b/sysdeps/hppa/dl-symaddr.c index 038404a48b..49c1216664 100644 --- a/sysdeps/hppa/dl-symaddr.c +++ b/sysdeps/hppa/dl-symaddr.c @@ -33,7 +33,7 @@ _dl_symbol_address (const struct link_map *map, const ElfW(Sym) *ref) } ElfW(Addr) -_dl_start_address (const struct link_map *map, ElfW(Addr) start) +_dl_function_address (const struct link_map *map, ElfW(Addr) start) { return __hppa_make_fptr (map, start, &__fptr_root, NULL); } From fe6fac68513d047b11c9f3dbd132b5b682b9df87 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 22 Apr 2001 03:23:45 +0000 Subject: [PATCH 2574/4487] Removed ptrace entry so the ptrace.c wrapper is used. --- sysdeps/unix/sysv/linux/hppa/syscalls.list | 2 -- 1 file changed, 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/hppa/syscalls.list b/sysdeps/unix/sysv/linux/hppa/syscalls.list index f0d6431abe..6d7cd6a23f 100644 --- a/sysdeps/unix/sysv/linux/hppa/syscalls.list +++ b/sysdeps/unix/sysv/linux/hppa/syscalls.list @@ -32,8 +32,6 @@ shutdown - shutdown i:ii __shutdown shutdown socket - socket i:iii __socket socket socketpair - socketpair i:iiif __socketpair socketpair -ptrace - ptrace 4 __ptrace ptrace - getresuid - getresuid i:ppp getresuid getresgid - getresgid i:ppp getresgid From 15a25bb641e39e528fc209de38697e8ecaa006f0 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 22 Apr 2001 03:24:39 +0000 Subject: [PATCH 2575/4487] Fix clone system call entry point stub. --- sysdeps/unix/sysv/linux/hppa/clone.S | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sysdeps/unix/sysv/linux/hppa/clone.S b/sysdeps/unix/sysv/linux/hppa/clone.S index 510e0ff799..b902ff7669 100644 --- a/sysdeps/unix/sysv/linux/hppa/clone.S +++ b/sysdeps/unix/sysv/linux/hppa/clone.S @@ -33,18 +33,18 @@ ENTRY(__clone) /* FIXME: I have no idea how profiling works on hppa. */ /* Sanity check arguments. */ - comib,<> 0,%arg0,.Lerror /* no NULL function pointers */ - ldi EINVAL,%ret0 - comib,<> 0,%arg1,.Lerror /* no NULL stack pointers */ + comib,= 0,%arg0,.Lerror /* no NULL function pointers */ + ldi -EINVAL,%ret0 + comib,= 0,%arg1,.Lerror /* no NULL stack pointers */ nop /* Save the fn ptr and arg on the new stack. */ - stwm %arg3,64(%arg1) + stwm %arg0,64(%arg1) stw %arg3,-60(%arg1) /* Do the system call */ copy %arg2,%arg0 - ble 0x100(%sr7,%r0) + ble 0x100(%sr2,%r0) ldi __NR_clone,%r20 ldi -4096,%r1 @@ -60,12 +60,12 @@ ENTRY(__clone) /* Something bad happened -- no child created */ .Lerror: b __syscall_error - nop + sub %r0,%ret0,%arg0 thread_start: /* Load up the arguments. */ ldw -60(%sp),%arg0 - ldwm -64(%sp),%r22 + ldw -64(%sp),%r22 /* Call the user's function */ bl $$dyncall,%r31 From 48d32c2da938b2ff920565be2200b9c0d22962d7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 22 Apr 2001 04:55:54 +0000 Subject: [PATCH 2576/4487] Add atan2f deltas. --- sysdeps/mips/fpu/libm-test-ulps | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/sysdeps/mips/fpu/libm-test-ulps b/sysdeps/mips/fpu/libm-test-ulps index 78cedbcb2e..d7711e5558 100644 --- a/sysdeps/mips/fpu/libm-test-ulps +++ b/sysdeps/mips/fpu/libm-test-ulps @@ -13,6 +13,17 @@ float: 2 idouble: 1 ifloat: 2 +# atan2 +Test "atan2 (0.7, -1.0) == 2.530866689200584621918884506789267": +float: 3 +ifloat: 3 +Test "atan2 (-0.7, -1.0) == -2.530866689200584621918884506789267": +float: 3 +ifloat: 3 +Test "atan2 (1.4, -0.93) == 2.1571487668237843754887415992772736": +float: 4 +ifloat: 4 + # atanh Test "atanh (0.7) == 0.8673005276940531944": double: 1 @@ -758,6 +769,10 @@ float: 2 idouble: 1 ifloat: 2 +Function: "atan2": +float: 4 +ifloat: 4 + Function: "atanh": double: 1 idouble: 1 From 7ace52d01fcf04259d0b39e25eb629194b1668f3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 22 Apr 2001 14:02:39 +0000 Subject: [PATCH 2577/4487] Also print the address that faulted. --- sysdeps/unix/sysv/linux/arm/register-dump.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/register-dump.h b/sysdeps/unix/sysv/linux/arm/register-dump.h index 4ccd9e2e4c..25036df41d 100644 --- a/sysdeps/unix/sysv/linux/arm/register-dump.h +++ b/sysdeps/unix/sysv/linux/arm/register-dump.h @@ -1,5 +1,5 @@ /* Dump registers. - Copyright (C) 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Philip Blundell , 1998. @@ -32,6 +32,7 @@ CPSR: XXXXXXXX Trap: XXXXXXXX Error: XXXXXXXX OldMask: XXXXXXXX + Addr: XXXXXXXX */ @@ -46,7 +47,7 @@ hexvalue (unsigned long int value, char *buf, size_t len) static void register_dump (int fd, union k_sigcontext *ctx) { - char regs[20][8]; + char regs[21][8]; struct iovec iov[97]; size_t nr = 0; @@ -105,6 +106,7 @@ register_dump (int fd, union k_sigcontext *ctx) hexvalue (ctx->v21.trap_no, regs[17], 8); hexvalue (ctx->v21.error_code, regs[18], 8); hexvalue (ctx->v21.oldmask, regs[19], 8); + hexvalue (ctx->v21.fault_address, regs[20], 8); } /* Generate the output. */ @@ -148,6 +150,11 @@ register_dump (int fd, union k_sigcontext *ctx) ADD_MEM (regs[18], 8); ADD_STRING (" OldMask: "); ADD_MEM (regs[19], 8); + if (ctx->v20.magic != SIGCONTEXT_2_0_MAGIC) + { + ADD_STRING ("\n Addr: "); + ADD_MEM (regs[20], 8); + } ADD_STRING ("\n"); From c2a38d017e619204e38b18fcc98c469bfeac723d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 22 Apr 2001 14:07:25 +0000 Subject: [PATCH 2578/4487] Remove old cruft surrounded with #if 0. (elf_greg_t, ELF_NGREG, elf_gregset_t, elf_fpregset_t): Moved here from sys/elf.h. (prgregset_t, prfpregset_t): Define in terms of elf_gregset_t and elf_fpregset_t respectively. --- sysdeps/unix/sysv/linux/arm/sys/procfs.h | 63 ++++++++++++++---------- 1 file changed, 38 insertions(+), 25 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/sys/procfs.h b/sysdeps/unix/sysv/linux/arm/sys/procfs.h index 5198033ba0..ddce965711 100644 --- a/sysdeps/unix/sysv/linux/arm/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/arm/sys/procfs.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1999, 2001 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 @@ -19,20 +19,36 @@ #ifndef _SYS_PROCFS_H #define _SYS_PROCFS_H 1 -/* This is somehow modelled after the file of the same name on SysVr4 +/* This is somewhat modelled after the file of the same name on SVR4 systems. It provides a definition of the core file format for ELF - used on Linux. */ + used on Linux. It doesn't have anything to do with the /proc file + system, even though Linux has one. + + Anyway, the whole purpose of this file is for GDB and GDB only. + Don't read too much into it. Don't use it for anything other than + GDB unless you know what you are doing. */ #include -#include #include #include -#include #include -#include __BEGIN_DECLS +/* Type for a general-purpose register. */ +typedef unsigned long elf_greg_t; + +/* And the whole bunch of them. We could have used `struct + user_regs' directly in the typedef, but tradition says that + the register set is an array, which does have some peculiar + semantics, so leave it that way. */ +#define ELF_NGREG (sizeof (struct user_regs) / sizeof(elf_greg_t)) +typedef elf_greg_t elf_gregset_t[ELF_NGREG]; + +/* Register set for the floating-point registers. */ +typedef struct user_fpregs elf_fpregset_t; + +/* Signal info. */ struct elf_siginfo { int si_signo; /* Signal number. */ @@ -40,23 +56,19 @@ struct elf_siginfo int si_errno; /* Errno. */ }; -/* Definitions to generate core files. Fields present but not used are - marked with "XXX". */ +/* Definitions to generate Intel SVR4-like core files. These mostly + have the same names as the SVR4 types with "elf_" tacked on the + front to prevent clashes with Linux definitions, and the typedef + forms have been avoided. This is mostly like the SVR4 structure, + but more Linuxy, with things that Linux does not support and which + GDB doesn't really use excluded. */ + struct elf_prstatus { -#if 0 - long int pr_flags; /* XXX Process flags. */ - short int pr_why; /* XXX Reason for process halt. */ - short int pr_what; /* XXX More detailed reason. */ -#endif struct elf_siginfo pr_info; /* Info associated with signal. */ short int pr_cursig; /* Current signal. */ unsigned long int pr_sigpend; /* Set of pending signals. */ unsigned long int pr_sighold; /* Set of held signals. */ -#if 0 - struct sigaltstack pr_altstack; /* Alternate stack info. */ - struct sigaction pr_action; /* Signal action for current sig. */ -#endif __pid_t pr_pid; __pid_t pr_ppid; __pid_t pr_pgrp; @@ -65,15 +77,12 @@ struct elf_prstatus struct timeval pr_stime; /* System time. */ struct timeval pr_cutime; /* Cumulative user time. */ struct timeval pr_cstime; /* Cumulative system time. */ -#if 0 - long int pr_instr; /* Current instruction. */ -#endif elf_gregset_t pr_reg; /* GP registers. */ int pr_fpvalid; /* True if math copro being used. */ }; -#define ELF_PRARGSZ (80) /* Number of chars for args */ +#define ELF_PRARGSZ (80) /* Number of chars for args. */ struct elf_prpsinfo { @@ -90,18 +99,22 @@ struct elf_prpsinfo char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ }; +/* The rest of this file provides the types for emulation of the + Solaris interfaces that should be implemented by + users of libthread_db. */ + /* Addresses. */ typedef void *psaddr_t; /* Register sets. Linux has different names. */ -typedef gregset_t prgregset_t; -typedef fpregset_t prfpregset_t; +typedef elf_gregset_t prgregset_t; +typedef elf_fpregset_t prfpregset_t; /* We don't have any differences between processes and threads, - therefore habe only ine PID type. */ + therefore have only one PID type. */ typedef __pid_t lwpid_t; - +/* Process status and info. In the end we do provide typedefs for them. */ typedef struct elf_prstatus prstatus_t; typedef struct elf_prpsinfo prpsinfo_t; From ace45f1fd05130b43a1c7eac39e655ee7f7b7d3e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 22 Apr 2001 14:08:57 +0000 Subject: [PATCH 2579/4487] Move contents to sys/procfs.h, and tell the user to include that file instead. --- sysdeps/unix/sysv/linux/arm/sys/elf.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/sys/elf.h b/sysdeps/unix/sysv/linux/arm/sys/elf.h index 83658c3c27..ffd3b46ee6 100644 --- a/sysdeps/unix/sysv/linux/arm/sys/elf.h +++ b/sysdeps/unix/sysv/linux/arm/sys/elf.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1999, 2001 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 @@ -19,12 +19,8 @@ #ifndef _SYS_ELF_H #define _SYS_ELF_H 1 -#include +#warning "This header is obsolete; use instead." -typedef unsigned long int elf_greg_t; -#define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t)) - -typedef elf_greg_t elf_gregset_t[ELF_NGREG]; -typedef struct user_fp elf_fpregset_t; +#include #endif /* sys/elf.h */ From e8551fba7fa2d3d2b8c5604fcf08b40feda0f6bc Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 22 Apr 2001 14:10:14 +0000 Subject: [PATCH 2580/4487] (struct user_fpregs): Renamed from struct user_fp. (struct user_regs): New. (struct user): Use struct user_regs rather than struct pt_regs to avoid dependency on asm/ptrace.h. Use struct user_fpregs in place of struct user_fp and struct user_fp_struct. --- sysdeps/unix/sysv/linux/arm/sys/user.h | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/sys/user.h b/sysdeps/unix/sysv/linux/arm/sys/user.h index 253b0f5ea9..e47c42c976 100644 --- a/sysdeps/unix/sysv/linux/arm/sys/user.h +++ b/sysdeps/unix/sysv/linux/arm/sys/user.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999, 2000, 2001 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 @@ -19,14 +19,11 @@ #ifndef _SYS_USER_H #define _SYS_USER_H 1 -#include +/* The whole purpose of this file is for GDB and GDB only. Don't read + too much into it. Don't use it for anything other than GDB unless + you know what you are doing. */ -/* and both define the PTRACE_* macros. - This leads to compilation problems with programs which include both - user.h and ptrace.h (eg: GDB). Do not include here. */ -#include - -struct user_fp +struct user_fpregs { struct fp_reg { @@ -44,9 +41,14 @@ struct user_fp unsigned int init_flag; }; +struct user_regs +{ + unsigned long int uregs[18]; +}; + struct user { - struct pt_regs regs; /* General registers */ + struct user_regs regs; /* General registers */ int u_fpvalid; /* True if math co-processor being used. */ unsigned long int u_tsize; /* Text segment size (pages). */ @@ -58,13 +60,13 @@ struct user long int signal; /* Signal that caused the core dump. */ int reserved; /* No longer used */ - struct pt_regs *u_ar0; /* help gdb to find the general registers. */ + struct user_regs *u_ar0; /* help gdb to find the general registers. */ unsigned long magic; /* uniquely identify a core file */ char u_comm[32]; /* User command that was responsible */ int u_debugreg[8]; - struct user_fp u_fp; /* Floating point registers */ - struct user_fp_struct *u_fp0; /* help gdb to find the FP registers. */ + struct user_fpregs u_fp; /* Floating point registers */ + struct user_fpregs *u_fp0; /* help gdb to find the FP registers. */ }; #endif /* sys/user.h */ From 90256e473e481263b811b474b39d9b505e11d8d2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 22 Apr 2001 14:10:28 +0000 Subject: [PATCH 2581/4487] Include sys/procfs.h not sys/elf.h. --- sysdeps/unix/sysv/linux/arm/sys/ucontext.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/arm/sys/ucontext.h b/sysdeps/unix/sysv/linux/arm/sys/ucontext.h index b858cf8c61..c94c6c6ba1 100644 --- a/sysdeps/unix/sysv/linux/arm/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/arm/sys/ucontext.h @@ -23,7 +23,7 @@ #include #include -#include +#include typedef int greg_t; From 984dfe12663873b13bad49fc06141807dc826d1d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 22 Apr 2001 14:31:25 +0000 Subject: [PATCH 2582/4487] fedisableexcept implementation for Arm. --- sysdeps/arm/fpu/fedisblxcpt.c | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 sysdeps/arm/fpu/fedisblxcpt.c diff --git a/sysdeps/arm/fpu/fedisblxcpt.c b/sysdeps/arm/fpu/fedisblxcpt.c new file mode 100644 index 0000000000..e41bd52ed7 --- /dev/null +++ b/sysdeps/arm/fpu/fedisblxcpt.c @@ -0,0 +1,40 @@ +/* Disable floating-point exceptions. + Copyright (C) 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Philip Blundell , 2001. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +int +fedisableexcept (int excepts) +{ + unsigned long int new_exc, old_exc; + + _FPU_GETCW(new_exc); + + old_exc = (new_exc >> FE_EXCEPT_SHIFT) & FE_ALL_EXCEPT; + + excepts &= FE_ALL_EXCEPT; + + new_exc &= ~(excepts << FE_EXCEPT_SHIFT); + + _FPU_SETCW(new_exc); + + return old_exc; +} From 285e7aeefddf469006e24e852f8c793c11041a32 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 22 Apr 2001 14:31:51 +0000 Subject: [PATCH 2583/4487] feenableexcept implementation for Arm. --- sysdeps/arm/fpu/feenablxcpt.c | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 sysdeps/arm/fpu/feenablxcpt.c diff --git a/sysdeps/arm/fpu/feenablxcpt.c b/sysdeps/arm/fpu/feenablxcpt.c new file mode 100644 index 0000000000..24c4363b24 --- /dev/null +++ b/sysdeps/arm/fpu/feenablxcpt.c @@ -0,0 +1,40 @@ +/* Enable floating-point exceptions. + Copyright (C) 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Philip Blundell , 2001. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +int +feenableexcept (int excepts) +{ + unsigned long int new_exc, old_exc; + + _FPU_GETCW(new_exc); + + old_exc = (new_exc >> FE_EXCEPT_SHIFT) & FE_ALL_EXCEPT; + + excepts &= FE_ALL_EXCEPT; + + new_exc |= (excepts << FE_EXCEPT_SHIFT); + + _FPU_SETCW(new_exc); + + return old_exc; +} From dd69124f25f6ed81287bfd3ce18ee22a90971b69 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 22 Apr 2001 14:32:20 +0000 Subject: [PATCH 2584/4487] fegetexcept implementation for Arm. --- sysdeps/arm/fpu/fegetexcept.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 sysdeps/arm/fpu/fegetexcept.c diff --git a/sysdeps/arm/fpu/fegetexcept.c b/sysdeps/arm/fpu/fegetexcept.c new file mode 100644 index 0000000000..eda7b6ddcc --- /dev/null +++ b/sysdeps/arm/fpu/fegetexcept.c @@ -0,0 +1,32 @@ +/* Get floating-point exceptions. + Copyright (C) 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Philip Blundell , 2001 + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +int +fegetexcept (void) +{ + unsigned long temp; + + _FPU_GETCW (temp); + + return (temp >> FE_EXCEPT_SHIFT) & FE_ALL_EXCEPT; +} From c9ae5095a4d3c9001de05bee0e21a5d681f5c2e2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 24 Apr 2001 19:38:55 +0000 Subject: [PATCH 2585/4487] (RTLD_START): Set up dp with DT_PLTGOT value from application so that constructors in non-PIC libs work. (RTLD_START): _dl_init now returns a function pointer, hence load the jump address and gp from the function pointer before jumping. --- sysdeps/hppa/dl-machine.h | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h index a3437b557a..6f2020c071 100644 --- a/sysdeps/hppa/dl-machine.h +++ b/sysdeps/hppa/dl-machine.h @@ -248,7 +248,17 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) The C function `_dl_start' is the real entry point; its return value is the user program's entry point. */ -#define RTLD_START asm ("\ +#define RTLD_START \ +/* Set up dp for any non-PIC lib constructors that may be called. */ \ +static struct link_map * set_dp (struct link_map *map) \ +{ \ + register Elf32_Addr dp asm ("%r27"); \ + dp = D_PTR (map, l_info[DT_PLTGOT]); \ + asm volatile ("" : : "r" (dp)); \ + return map; \ +} \ + \ +asm ("\ .text .globl _start .type _start,@function @@ -324,7 +334,6 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) bl _dl_start,%rp ldo -4(%r24),%r26 - /* FALLTHRU */ .globl _dl_start_user .type _dl_start_user,@function _dl_start_user: @@ -352,10 +361,14 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) stw %r24,-44(%sp) .Lnofix: - /* Call _dl_init(_dl_loaded, argc, argv, envp). */ addil LT'_dl_loaded,%r19 ldw RT'_dl_loaded(%r1),%r26 + bl set_dp, %r2 ldw 0(%r26),%r26 + + /* Call _dl_init(_dl_loaded, argc, argv, envp). */ + copy %r28,%r26 + /* envp = argv + argc + 1 */ sh2add %r25,%r24,%r23 bl _dl_init,%r2 @@ -373,11 +386,18 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) .word 0xdeadbeef .previous + /* %r3 contains a function pointer, we need to mask out the lower + * bits and load the gp and jump address. */ + depi 0,31,2,%r3 + ldw 0(%r3),%r2 addil LT'__dl_fini_plabel,%r19 ldw RT'__dl_fini_plabel(%r1),%r23 stw %r19,4(%r23) - bv %r0(%r3) - depi 2,31,2,%r23 /* delay slot */"); + ldw 4(%r3),%r19 /* load the object's gp */ + bv %r0(%r2) + depi 2,31,2,%r23 /* delay slot */ +"); + /* This code gets called via the .plt stub, and is used in dl-runtime.c to call the `fixup' function and then redirect to the From aad4bb3a11398b8c9f579d1eb8a2aa9dbb8cfcea Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 25 Apr 2001 18:27:55 +0000 Subject: [PATCH 2586/4487] Clear the exception flags, not the enable flags. --- sysdeps/hppa/fpu/fclrexcpt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/hppa/fpu/fclrexcpt.c b/sysdeps/hppa/fpu/fclrexcpt.c index 4c64027310..e8049e6b44 100644 --- a/sysdeps/hppa/fpu/fclrexcpt.c +++ b/sysdeps/hppa/fpu/fclrexcpt.c @@ -29,7 +29,7 @@ feclearexcept (int excepts) __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw)); /* Clear all the relevant bits. */ - sw[0] &= ~(excepts & FE_ALL_EXCEPT); + sw[0] &= ~(excepts & FE_ALL_EXCEPT) << 27; __asm__ ("fldd 0(%0),%%fr0" : : "r" (sw)); /* Success. */ From f2e1be7965c6996cefe27f9fccc3de9bb5e29e0c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 25 Apr 2001 20:17:26 +0000 Subject: [PATCH 2587/4487] Information about stack layout for HPPA. --- sysdeps/hppa/stackinfo.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 sysdeps/hppa/stackinfo.h diff --git a/sysdeps/hppa/stackinfo.h b/sysdeps/hppa/stackinfo.h new file mode 100644 index 0000000000..e446c42471 --- /dev/null +++ b/sysdeps/hppa/stackinfo.h @@ -0,0 +1,28 @@ +/* Copyright (C) 1999 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* This file contains a bit of information about the stack allocation + of the processor. */ + +#ifndef _STACKINFO_H +#define _STACKINFO_H 1 + +/* On PA the stack grows up. */ +#define _STACK_GROWS_UP 1 + +#endif /* stackinfo.h */ From 353e429d9625d98426ae435f3982688053b9e591 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 25 Apr 2001 20:18:14 +0000 Subject: [PATCH 2588/4487] getdents64 implementation for Linux/HPPA. --- sysdeps/unix/sysv/linux/hppa/getdents64.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/hppa/getdents64.c diff --git a/sysdeps/unix/sysv/linux/hppa/getdents64.c b/sysdeps/unix/sysv/linux/hppa/getdents64.c new file mode 100644 index 0000000000..0c75fb5a06 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/getdents64.c @@ -0,0 +1 @@ +#include From 179c96ec73726bdbdc332ec202b05a58455b769e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 25 Apr 2001 20:19:03 +0000 Subject: [PATCH 2589/4487] mmap64 implementation for Linux/HPPA. --- sysdeps/unix/sysv/linux/hppa/mmap64.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/hppa/mmap64.c diff --git a/sysdeps/unix/sysv/linux/hppa/mmap64.c b/sysdeps/unix/sysv/linux/hppa/mmap64.c new file mode 100644 index 0000000000..cf7a5dc8f8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/mmap64.c @@ -0,0 +1 @@ +#include From b390705b1c7f3d289cabc8739719f283c9fba586 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 25 Apr 2001 20:19:39 +0000 Subject: [PATCH 2590/4487] definitions for Linux/HPPA. --- sysdeps/unix/sysv/linux/hppa/bits/resource.h | 209 +++++++++++++++++++ 1 file changed, 209 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/hppa/bits/resource.h diff --git a/sysdeps/unix/sysv/linux/hppa/bits/resource.h b/sysdeps/unix/sysv/linux/hppa/bits/resource.h new file mode 100644 index 0000000000..be4b53a1be --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/bits/resource.h @@ -0,0 +1,209 @@ +/* Bit values & structures for resource limits. Linux/HPPA version. + Copyright (C) 1994-99, 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_RESOURCE_H +# error "Never use directly; include instead." +#endif + +#include + +/* Transmute defines to enumerations. The macro re-definitions are + necessary because some programs want to test for operating system + features with #ifdef RUSAGE_SELF. In ISO C the reflexive + definition is a no-op. */ + +/* Kinds of resource limit. */ +enum __rlimit_resource +{ + /* Per-process CPU limit, in seconds. */ + RLIMIT_CPU = 0, +#define RLIMIT_CPU RLIMIT_CPU + + /* Largest file that can be created, in bytes. */ + RLIMIT_FSIZE = 1, +#define RLIMIT_FSIZE RLIMIT_FSIZE + + /* Maximum size of data segment, in bytes. */ + RLIMIT_DATA = 2, +#define RLIMIT_DATA RLIMIT_DATA + + /* Maximum size of stack segment, in bytes. */ + RLIMIT_STACK = 3, +#define RLIMIT_STACK RLIMIT_STACK + + /* Largest core file that can be created, in bytes. */ + RLIMIT_CORE = 4, +#define RLIMIT_CORE RLIMIT_CORE + + /* Largest resident set size, in bytes. + This affects swapping; processes that are exceeding their + resident set size will be more likely to have physical memory + taken from them. */ + RLIMIT_RSS = 5, +#define RLIMIT_RSS RLIMIT_RSS + + /* Number of open files. */ + RLIMIT_NOFILE = 7, + RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */ +#define RLIMIT_NOFILE RLIMIT_NOFILE +#define RLIMIT_OFILE RLIMIT_OFILE + + /* Address space limit. */ + RLIMIT_AS = 9, +#define RLIMIT_AS RLIMIT_AS + + /* Number of processes. */ + RLIMIT_NPROC = 6, +#define RLIMIT_NPROC RLIMIT_NPROC + + /* Locked-in-memory address space. */ + RLIMIT_MEMLOCK = 8, +#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK + + /* Maximum number of file locks. */ + RLIMIT_LOCKS = 10, +#define RLIMIT_LOCKS RLIMIT_LOCKS + + RLIMIT_NLIMITS = 11, + RLIM_NLIMITS = RLIMIT_NLIMITS +#define RLIMIT_NLIMITS RLIMIT_NLIMITS +#define RLIM_NLIMITS RLIM_NLIMITS +}; + +/* Value to indicate that there is no limit. */ +#ifndef __USE_FILE_OFFSET64 +# define RLIM_INFINITY ((unsigned long int)(~0UL)) +#else +# define RLIM_INFINITY 0xffffffffffffffffuLL +#endif + +#ifdef __USE_LARGEFILE64 +# define RLIM64_INFINITY 0xffffffffffffffffuLL +#endif + +/* We can represent all limits. */ +#define RLIM_SAVED_MAX RLIM_INFINITY +#define RLIM_SAVED_CUR RLIM_INFINITY + + +/* Type for resource quantity measurement. */ +#ifndef __USE_FILE_OFFSET64 +typedef __rlim_t rlim_t; +#else +typedef __rlim64_t rlim_t; +#endif +#ifdef __USE_LARGEFILE64 +typedef __rlim64_t rlim64_t; +#endif + +struct rlimit + { + /* The current (soft) limit. */ + rlim_t rlim_cur; + /* The hard limit. */ + rlim_t rlim_max; + }; + +#ifdef __USE_LARGEFILE64 +struct rlimit64 + { + /* The current (soft) limit. */ + rlim64_t rlim_cur; + /* The hard limit. */ + rlim64_t rlim_max; + }; +#endif + +/* Whose usage statistics do you want? */ +enum __rusage_who +{ + /* The calling process. */ + RUSAGE_SELF = 0, +#define RUSAGE_SELF RUSAGE_SELF + + /* All of its terminated child processes. */ + RUSAGE_CHILDREN = -1, +#define RUSAGE_CHILDREN RUSAGE_CHILDREN + + /* Both. */ + RUSAGE_BOTH = -2 +#define RUSAGE_BOTH RUSAGE_BOTH +}; + +#define __need_timeval +#include /* For `struct timeval'. */ + +/* Structure which says how much of each resource has been used. */ +struct rusage + { + /* Total amount of user time used. */ + struct timeval ru_utime; + /* Total amount of system time used. */ + struct timeval ru_stime; + /* Maximum resident set size (in kilobytes). */ + long int ru_maxrss; + /* Amount of sharing of text segment memory + with other processes (kilobyte-seconds). */ + long int ru_ixrss; + /* Amount of data segment memory used (kilobyte-seconds). */ + long int ru_idrss; + /* Amount of stack memory used (kilobyte-seconds). */ + long int ru_isrss; + /* Number of soft page faults (i.e. those serviced by reclaiming + a page from the list of pages awaiting reallocation. */ + long int ru_minflt; + /* Number of hard page faults (i.e. those that required I/O). */ + long int ru_majflt; + /* Number of times a process was swapped out of physical memory. */ + long int ru_nswap; + /* Number of input operations via the file system. Note: This + and `ru_oublock' do not include operations with the cache. */ + long int ru_inblock; + /* Number of output operations via the file system. */ + long int ru_oublock; + /* Number of IPC messages sent. */ + long int ru_msgsnd; + /* Number of IPC messages received. */ + long int ru_msgrcv; + /* Number of signals delivered. */ + long int ru_nsignals; + /* Number of voluntary context switches, i.e. because the process + gave up the process before it had to (usually to wait for some + resource to be available). */ + long int ru_nvcsw; + /* Number of involuntary context switches, i.e. a higher priority process + became runnable or the current process used up its time slice. */ + long int ru_nivcsw; + }; + +/* Priority limits. */ +#define PRIO_MIN -20 /* Minimum priority a process can have. */ +#define PRIO_MAX 20 /* Maximum priority a process can have. */ + +/* The type of the WHICH argument to `getpriority' and `setpriority', + indicating what flavor of entity the WHO argument specifies. */ +enum __priority_which +{ + PRIO_PROCESS = 0, /* WHO is a process ID. */ +#define PRIO_PROCESS PRIO_PROCESS + PRIO_PGRP = 1, /* WHO is a process group ID. */ +#define PRIO_PGRP PRIO_PGRP + PRIO_USER = 2 /* WHO is a user ID. */ +#define PRIO_USER PRIO_USER +}; From ee1bb98bde26f2dd16a0060b961d6c3ba3255532 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 26 Apr 2001 00:03:25 +0000 Subject: [PATCH 2591/4487] Add -DMALLOC_ALIGNMENT=16 to compiler command line for malloc.c. --- sysdeps/hppa/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysdeps/hppa/Makefile b/sysdeps/hppa/Makefile index e6fb771c7d..744c89c3ea 100644 --- a/sysdeps/hppa/Makefile +++ b/sysdeps/hppa/Makefile @@ -22,6 +22,10 @@ # CFLAGS-.os += -ffunction-sections LDFLAGS-c_pic.os += -Wl,--unique=.text* +ifeq ($(subdir),malloc) +CFLAGS-malloc.c += -DMALLOC_ALIGNMENT=16 +endif + ifeq ($(subdir),elf) dl-routines += dl-symaddr dl-fptr rtld-routines += dl-symaddr dl-fptr From 30ecc70c4085dfbd076d5df32ee23969614f2103 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sun, 29 Apr 2001 12:30:59 +0000 Subject: [PATCH 2592/4487] * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_FCNTL64): Define for Arm, PowerPC and SH if kernel is 2.4.4 or newer. * sysdeps/unix/sysv/linux/bits/socket.h (PF_WANPIPE): New, from Linux 2.4.4. (AF_WANPIPE): Likewise. (MSG_MORE): New. * sysdeps/unix/sysv/linux/alpha/bits/socket.h: Add same changes as for Linux generic version. * sysdeps/unix/sysv/linux/s390/s390-64/bits/socket.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/socket.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/socket.h: Likewise. * sysdeps/unix/sysv/linux/ia64/bits/socket.h: Likewise. * sysdeps/gnu/netinet/tcp.h (TCP_QUICKACK): New. --- sysdeps/unix/sysv/linux/alpha/bits/socket.h | 6 +++++- sysdeps/unix/sysv/linux/mips/bits/socket.h | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/socket.h b/sysdeps/unix/sysv/linux/alpha/bits/socket.h index 8efdacabeb..cf8e5a1b0a 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/socket.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/socket.h @@ -87,6 +87,7 @@ enum __socket_type #define PF_SNA 22 /* Linux SNA Project */ #define PF_IRDA 23 /* IRDA sockets. */ #define PF_PPPOX 24 /* PPPoX sockets. */ +#define PF_WANPIPE 25 /* Wanpipe API sockets. */ #define PF_MAX 32 /* For now.. */ /* Address families. */ @@ -117,6 +118,7 @@ enum __socket_type #define AF_SNA PF_SNA #define AF_IRDA PF_IRDA #define AF_PPPOX PF_PPPOX +#define AF_WANPIPE PF_WANPIPE #define AF_MAX PF_MAX /* Socket level values. Others are defined in the appropriate headers. @@ -199,8 +201,10 @@ enum #define MSG_RST MSG_RST MSG_ERRQUEUE = 0x2000, /* Fetch message from error queue. */ #define MSG_ERRQUEUE MSG_ERRQUEUE - MSG_NOSIGNAL = 0x4000 /* Do not generate SIGPIPE. */ + MSG_NOSIGNAL = 0x4000, /* Do not generate SIGPIPE. */ #define MSG_NOSIGNAL MSG_NOSIGNAL + MSG_MORE = 0x8000 /* Sender will send more. */ +#define MSG_MORE MSG_MORE }; diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h index 2d6ded905d..eaf8ccc3d2 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/socket.h +++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h @@ -87,6 +87,7 @@ enum __socket_type #define PF_SNA 22 /* Linux SNA Project */ #define PF_IRDA 23 /* IRDA sockets. */ #define PF_PPPOX 24 /* PPPoX sockets. */ +#define PF_WANPIPE 25 /* Wanpipe API sockets. */ #define PF_MAX 32 /* For now.. */ /* Address families. */ @@ -117,6 +118,7 @@ enum __socket_type #define AF_SNA PF_SNA #define AF_IRDA PF_IRDA #define AF_PPPOX PF_PPPOX +#define AF_WANPIPE PF_WANPIPE #define AF_MAX PF_MAX /* Socket level values. Others are defined in the appropriate headers. @@ -199,8 +201,10 @@ enum #define MSG_RST MSG_RST MSG_ERRQUEUE = 0x2000, /* Fetch message from error queue. */ #define MSG_ERRQUEUE MSG_ERRQUEUE - MSG_NOSIGNAL = 0x4000 /* Do not generate SIGPIPE. */ + MSG_NOSIGNAL = 0x4000, /* Do not generate SIGPIPE. */ #define MSG_NOSIGNAL MSG_NOSIGNAL + MSG_MORE = 0x8000 /* Sender will send more. */ +#define MSG_MORE MSG_MORE }; From 979dedac4fa78aff5447d859fa3319bb128afaa2 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 30 Apr 2001 07:20:38 +0000 Subject: [PATCH 2593/4487] Make structure definitions match the kernel definitions. --- sysdeps/unix/sysv/linux/mips/bits/ipc.h | 54 +++++----------- sysdeps/unix/sysv/linux/mips/bits/sem.h | 85 +++++++++++++++++++++++++ sysdeps/unix/sysv/linux/mips/bits/shm.h | 51 ++++++++------- 3 files changed, 129 insertions(+), 61 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/mips/bits/sem.h diff --git a/sysdeps/unix/sysv/linux/mips/bits/ipc.h b/sysdeps/unix/sysv/linux/mips/bits/ipc.h index 8364dca56e..04a1231bfd 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/ipc.h +++ b/sysdeps/unix/sysv/linux/mips/bits/ipc.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1995, 96, 97, 98, 99, 2000, 2001 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 @@ -8,23 +8,23 @@ 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 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + Boston, MA 02111-1307, USA. */ #ifndef _SYS_IPC_H # error "Never use directly; include instead." #endif -#include +#include /* Mode bits for `msgget', `semget', and `shmget'. */ #define IPC_CREAT 01000 /* Create key if key does not exist. */ -#define IPC_EXCL 02000 /* Fail if key exists. */ +#define IPC_EXCL 02000 /* Fail if key exists. */ #define IPC_NOWAIT 04000 /* Return error on wait. */ /* Control commands for `msgctl', `semctl', and `shmctl'. */ @@ -35,42 +35,20 @@ # define IPC_INFO 3 /* See ipcs. */ #endif -/* Special key values. */ -#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ +/* Special key values. */ +#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ /* Data structure used to pass permission information to IPC operations. */ struct ipc_perm { - __key_t __key; /* Key. */ - long int uid; /* Owner's user ID. */ - long int gid; /* Owner's group ID. */ - long int cuid; /* Creator's user ID. */ - long int cgid; /* Creator's group ID. */ - unsigned long int mode; /* Read/write permission. */ + unsigned int uid; /* Owner's user ID. */ + unsigned int gid; /* Owner's group ID. */ + unsigned int cuid; /* Creator's user ID. */ + unsigned int cgid; /* Creator's group ID. */ + unsigned int mode; /* Read/write permission. */ unsigned short int __seq; /* Sequence number. */ - }; - - -__BEGIN_DECLS - -/* The actual system call: all functions are multiplexed by this. */ -extern int __ipc (int __call, int __first, int __second, int __third, - void *__ptr) __THROW; - -__END_DECLS - -#ifdef __USE_GNU -/* The codes for the functions to use the multiplexer `__ipc'. */ -# define IPCOP_semop 1 -# define IPCOP_semget 2 -# define IPCOP_semctl 3 -# define IPCOP_msgsnd 11 -# define IPCOP_msgrcv 12 -# define IPCOP_msgget 13 -# define IPCOP_msgctl 14 -# define IPCOP_shmat 21 -# define IPCOP_shmdt 22 -# define IPCOP_shmget 23 -# define IPCOP_shmctl 24 -#endif + unsigned short int __pad1; + unsigned long int __unused1; + unsigned long int __unused2; +}; diff --git a/sysdeps/unix/sysv/linux/mips/bits/sem.h b/sysdeps/unix/sysv/linux/mips/bits/sem.h new file mode 100644 index 0000000000..5f7b0a944d --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/bits/sem.h @@ -0,0 +1,85 @@ +/* Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_SEM_H +# error "Never include directly; use instead." +#endif + +#include + +/* Flags for `semop'. */ +#define SEM_UNDO 0x1000 /* undo the operation on exit */ + +/* Commands for `semctl'. */ +#define GETPID 11 /* get sempid */ +#define GETVAL 12 /* get semval */ +#define GETALL 13 /* get all semval's */ +#define GETNCNT 14 /* get semncnt */ +#define GETZCNT 15 /* get semzcnt */ +#define SETVAL 16 /* set semval */ +#define SETALL 17 /* set all semval's */ + + +/* Data structure describing a set of semaphores. */ +struct semid_ds +{ + struct ipc_perm sem_perm; /* operation permission struct */ + __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; +}; + +/* The user should define a union like the following to use it for arguments + for `semctl'. + + union semun + { + int val; <= value for SETVAL + struct semid_ds *buf; <= buffer for IPC_STAT & IPC_SET + unsigned short int *array; <= array for GETALL & SETALL + struct seminfo *__buf; <= buffer for IPC_INFO + }; + + Previous versions of this file used to define this union but this is + incorrect. One can test the macro _SEM_SEMUN_UNDEFINED to see whether + one must define the union or not. */ +#define _SEM_SEMUN_UNDEFINED 1 + +#ifdef __USE_MISC + +/* ipcs ctl cmds */ +# define SEM_STAT 18 +# define SEM_INFO 19 + +struct seminfo +{ + int semmap; + int semmni; + int semmns; + int semmnu; + int semmsl; + int semopm; + int semume; + int semusz; + int semvmx; + int semaem; +}; + +#endif /* __USE_MISC */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/shm.h b/sysdeps/unix/sysv/linux/mips/bits/shm.h index 31c65a91a0..02fabb70b1 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/shm.h +++ b/sysdeps/unix/sysv/linux/mips/bits/shm.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 2000, 2001 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,7 +20,7 @@ # error "Never include directly; use instead." #endif -#include +#include /* Permission flag for shmget. */ #define SHM_R 0400 /* or S_IRUGO from */ @@ -35,50 +35,55 @@ #define SHM_LOCK 11 /* lock segment (root only) */ #define SHM_UNLOCK 12 /* unlock segment (root only) */ +/* Type to count number of attaches. */ +typedef unsigned long int shmatt_t; /* Data structure describing a set of semaphores. */ struct shmid_ds { struct ipc_perm shm_perm; /* operation permission struct */ - int shm_segsz; /* size of segment in bytes */ + size_t shm_segsz; /* size of segment in bytes */ __time_t shm_atime; /* time of last shmat() */ __time_t shm_dtime; /* time of last shmdt() */ __time_t shm_ctime; /* time of last change by shmctl() */ - long int shm_cpid; /* pid of creator */ - long int shm_lpid; /* pid of last shmop */ - unsigned short int shm_nattch; /* number of current attaches */ - unsigned short int __shm_npages; /* size of segment (pages) */ - unsigned long int *__unbounded __shm_pages; /* array of ptrs to frames -> SHMMAX */ - struct vm_area_struct *__unbounded __attaches; /* descriptors for attaches */ + __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; }; #ifdef __USE_MISC /* ipcs ctl commands */ -# define SHM_STAT 13 -# define SHM_INFO 14 +# define SHM_STAT 13 +# define SHM_INFO 14 /* shm_mode upper byte flags */ # define SHM_DEST 01000 /* segment will be destroyed on last detach */ # define SHM_LOCKED 02000 /* segment will not be swapped */ -struct shminfo +struct shminfo { - int shmmax; - int shmmin; - int shmmni; - int shmseg; - int shmall; + unsigned long int shmmax; + unsigned long int shmmin; + unsigned long int shmmni; + unsigned long int shmseg; + unsigned long int shmall; + unsigned long int __unused1; + unsigned long int __unused2; + unsigned long int __unused3; + unsigned long int __unused4; }; struct shm_info { - int used_ids; - ulong shm_tot; /* total allocated shm */ - ulong shm_rss; /* total resident shm */ - ulong shm_swp; /* total swapped shm */ - ulong swap_attempts; - ulong swap_successes; + int used_ids; + unsigned long int shm_tot; /* total allocated shm */ + unsigned long int shm_rss; /* total resident shm */ + unsigned long int shm_swp; /* total swapped shm */ + unsigned long int swap_attempts; + unsigned long int swap_successes; }; #endif /* __USE_MISC */ From 3eca48468911a4e37b298f9e2ce6a35835d9bf7c Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 11 May 2001 13:09:04 +0000 Subject: [PATCH 2594/4487] Removed unneeded binary output format directive. --- sysdeps/mips/rtld-ldscript.in | 1 - 1 file changed, 1 deletion(-) diff --git a/sysdeps/mips/rtld-ldscript.in b/sysdeps/mips/rtld-ldscript.in index 7c9f65f3e7..c9b5e71195 100644 --- a/sysdeps/mips/rtld-ldscript.in +++ b/sysdeps/mips/rtld-ldscript.in @@ -1,4 +1,3 @@ -OUTPUT_FORMAT("@@rtld-oformat@@") OUTPUT_ARCH(@@rtld-arch@@) ENTRY(@@rtld-entry@@) SECTIONS From b5cd3bfc6386931ef99f4b512f64d17d4b3d2935 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 11 May 2001 16:48:37 +0000 Subject: [PATCH 2595/4487] * sysdeps/unix/sysv/linux/configure.in: Move binutils check to... * sysdeps/unix/sysv/linux/mips/configure.in: ...here. New file. --- sysdeps/unix/sysv/linux/mips/configure | 59 +++++++++++++++++++++++ sysdeps/unix/sysv/linux/mips/configure.in | 10 ++++ 2 files changed, 69 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/mips/configure create mode 100644 sysdeps/unix/sysv/linux/mips/configure.in diff --git a/sysdeps/unix/sysv/linux/mips/configure b/sysdeps/unix/sysv/linux/mips/configure new file mode 100644 index 0000000000..38a9374875 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/configure @@ -0,0 +1,59 @@ + # Local configure fragment for sysdeps/unix/sysv/linux/mips. + +for ac_prog in $AS +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:9: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$AS"; then + ac_cv_prog_AS="$AS" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_AS="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +AS="$ac_cv_prog_AS" +if test -n "$AS"; then + echo "$ac_t""$AS" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$AS" && break +done + +if test -z "$AS"; then + ac_verc_fail=yes +else + # Found it, now check the version. + echo $ac_n "checking version of $AS""... $ac_c" 1>&6 +echo "configure:43: checking version of $AS" >&5 + ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\(-ia64-[0-9]*\)*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; + 2.11.90.0.[5-9]* | 2.11.90.[1-9]* | 2.11.9[1-9]* | 2.11.[1-9]* | 2.1[2-9]*| 2.[2-9]*) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + + esac + echo "$ac_t""$ac_prog_version" 1>&6 +fi +if test $ac_verc_fail = yes; then + echo "configure: warning: *** Your binutils versions are too old. +*** We strongly advise to update binutils. For details check +*** the FAQ and INSTALL documents." 1>&2 +fi + +s%@AS@%$AS%g diff --git a/sysdeps/unix/sysv/linux/mips/configure.in b/sysdeps/unix/sysv/linux/mips/configure.in new file mode 100644 index 0000000000..e5c301db48 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/configure.in @@ -0,0 +1,10 @@ +sinclude(./aclocal.m4)dnl Autoconf lossage +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/unix/sysv/linux/mips. + +AC_CHECK_PROG_VER(AS, $AS, --version, + [GNU assembler.* \([0-9]*\.[0-9.]*\(-ia64-[0-9]*\)*\)], + [2.11.90.0.[5-9]* | 2.11.90.[1-9]* | 2.11.9[1-9]* | 2.11.[1-9]* | 2.1[2-9]*| 2.[2-9]*], +AC_MSG_WARN([*** Your binutils versions are too old. +*** We strongly advise to update binutils. For details check +*** the FAQ and INSTALL documents.])) From fc0f915617383810727317713771e064ae97acc1 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sun, 27 May 2001 08:34:45 +0000 Subject: [PATCH 2596/4487] (ipc_perm): Put back __key. --- sysdeps/unix/sysv/linux/mips/bits/ipc.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/mips/bits/ipc.h b/sysdeps/unix/sysv/linux/mips/bits/ipc.h index 04a1231bfd..0cdd232fe6 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/ipc.h +++ b/sysdeps/unix/sysv/linux/mips/bits/ipc.h @@ -42,6 +42,7 @@ /* Data structure used to pass permission information to IPC operations. */ struct ipc_perm { + __key_t __key; /* Key. */ unsigned int uid; /* Owner's user ID. */ unsigned int gid; /* Owner's group ID. */ unsigned int cuid; /* Creator's user ID. */ From 3901129ce480c57c1216744b623b427997708477 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sun, 27 May 2001 08:39:56 +0000 Subject: [PATCH 2597/4487] Change sigsuspend to s_sigsuspend. Add s_mmap2. --- sysdeps/unix/sysv/linux/mips/syscalls.list | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index c36d071979..25e31d1714 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -8,7 +8,7 @@ cachectl - cachectl i:pii __cachectl cachectl cacheflush - cacheflush i:pii _flush_cache cacheflush sysmips - sysmips i:iiii __sysmips sysmips -sigsuspend - sigsuspend i:p __sigsuspend sigsuspend +s_sigsuspend sigsuspend sigsuspend i:p __syscall_sigsuspend # # Socket functions; Linux/MIPS doesn't use the socketcall(2) wrapper; @@ -61,6 +61,7 @@ getresgid - getresgid i:ppp getresgid getresuid - getresuid i:ppp getresuid s_ipc msgget ipc i:iiiip __syscall_ipc s_lstat64 lxstat64 lstat64 i:sp __syscall_lstat64 +s_mmap2 mmap64 mmap2 b:aniiii __syscall_mmap2 s_poll poll poll i:pii __syscall_poll s_pread64 pread64 pread i:ibniii __syscall_pread s_putpmsg putpmsg putpmsg i:ippii __syscall_putpmsg From b81e88a0558355d2496844e2268ace04f6f3bf97 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sun, 27 May 2001 08:40:14 +0000 Subject: [PATCH 2598/4487] Linux/MIPS specific version. --- sysdeps/unix/sysv/linux/mips/getsysstats.c | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/mips/getsysstats.c diff --git a/sysdeps/unix/sysv/linux/mips/getsysstats.c b/sysdeps/unix/sysv/linux/mips/getsysstats.c new file mode 100644 index 0000000000..799a733ea5 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/getsysstats.c @@ -0,0 +1,36 @@ +/* Determine various system internal values, Linux/MIPS version. + Copyright (C) 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + +/* We need to define a special parser for /proc/cpuinfo. */ +#define GET_NPROCS_PARSER(FP, BUFFER, RESULT) \ + do \ + { \ + (RESULT) = 0; \ + /* Read all lines and count the lines starting with the string \ + "cpu model". We don't have to fear extremely long lines since \ + the kernel will not generate them. 8192 bytes are really \ + enough. */ \ + while (fgets_unlocked (BUFFER, sizeof (BUFFER), FP) != NULL) \ + if (strncmp (BUFFER, "cpu model", 9) == 0) \ + ++(RESULT); \ + } \ + while (0) + +#include From 3a97df5aa5323dc8f266f9cba59950517ae57d54 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sun, 27 May 2001 08:41:04 +0000 Subject: [PATCH 2599/4487] MIPS specific atomicity functions. --- sysdeps/mips/atomicity.h | 128 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 sysdeps/mips/atomicity.h diff --git a/sysdeps/mips/atomicity.h b/sysdeps/mips/atomicity.h new file mode 100644 index 0000000000..d6e1767d8c --- /dev/null +++ b/sysdeps/mips/atomicity.h @@ -0,0 +1,128 @@ +/* Low-level functions for atomic operations. Mips version. + + Copyright (C) 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If + not, write to the Free Software Foundation, Inc., + 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifndef _MIPS_ATOMICITY_H +#define _MIPS_ATOMICITY_H 1 + +#include +#include + +#if (_MIPS_ISA >= _MIPS_ISA_MIPS2) + +static inline int +__attribute__ ((unused)) +exchange_and_add (volatile uint32_t *mem, int val) +{ + int result, tmp; + + __asm__ __volatile__ + ("/* Inline exchange & add */\n\t" + "1:\n\t" + "ll %0,%3\n\t" + "addu %1,%4,%0\n\t" + "sc %1,%2\n\t" + "beqz %1,1b\n\t" + "/* End exchange & add */" + : "=&r"(result), "=&r"(tmp), "=m"(*mem) + : "m" (*mem), "r"(val) + : "memory"); + + return result; +} + +static inline void +__attribute__ ((unused)) +atomic_add (volatile uint32_t *mem, int val) +{ + int result; + + __asm__ __volatile__ + ("/* Inline atomic add */\n\t" + "1:\n\t" + "ll %0,%2\n\t" + "addu %0,%3,%0\n\t" + "sc %0,%1\n\t" + "beqz %0,1b\n\t" + "/* End atomic add */" + : "=&r"(result), "=m"(*mem) + : "m" (*mem), "r"(val) + : "memory"); +} + +static inline int +__attribute__ ((unused)) +compare_and_swap (volatile long int *p, long int oldval, long int newval) +{ + long int ret; + + __asm__ __volatile__ + ("/* Inline compare & swap */\n\t" + "1:\n\t" + "ll %0,%4\n\t" + ".set push\n" + ".set noreorder\n\t" + "bne %0,%2,2f\n\t" + "move %0,%3\n\t" + ".set pop\n\t" + "sc %0,%1\n\t" + "beqz %0,1b\n" + "2:\n\t" + "/* End compare & swap */" + : "=&r" (ret), "=m" (*p) + : "r" (oldval), "r" (newval), "m" (*p) + : "memory"); + + return ret; +} + +#else /* (_MIPS_ISA >= _MIPS_ISA_MIPS2) */ + +#warning MIPS I atomicity functions are not atomic + +static inline int +__attribute__ ((unused)) +exchange_and_add (volatile uint32_t *mem, int val) +{ + int result = *mem; + *mem += val; + return result; +} + +static inline void +__attribute__ ((unused)) +atomic_add (volatile uint32_t *mem, int val) +{ + *mem += val; +} + +static inline int +__attribute__ ((unused)) +compare_and_swap (volatile long int *p, long int oldval, long int newval) +{ + if (*p != oldval) + return 0; + + *p = newval; + return 1; +} + +#endif /* !(_MIPS_ISA >= _MIPS_ISA_MIPS2) */ + +#endif /* atomicity.h */ From 60446d7a54b34c468e69fb61d04697c5a9790517 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 2 Jun 2001 05:58:29 +0000 Subject: [PATCH 2600/4487] 2001-06-01 Roland McGrath * sysdeps/alpha/fpu/fclrexcpt.c: #include and use compat_symbol/versioned_symbol instead of plain symbol_version/default_symbol_version. * sysdeps/alpha/fpu/fegetenv.c: Likewise. * sysdeps/alpha/fpu/fesetenv.c: Likewise. * sysdeps/alpha/fpu/feupdateenv.c: Likewise. * sysdeps/alpha/fpu/fgetexcptflg.c: Likewise. * sysdeps/alpha/fpu/fraiseexcpt.c: Likewise. * sysdeps/alpha/fpu/fsetexcptflg.c: Likewise. * sysdeps/arm/fpu/fclrexcpt.c: Likewise. * sysdeps/arm/fpu/fegetenv.c: Likewise. * sysdeps/arm/fpu/fesetenv.c: Likewise. * sysdeps/arm/fpu/fraiseexcpt.c: Likewise. * sysdeps/arm/fpu/fsetexcptflg.c: Likewise. * sysdeps/i386/fpu/fclrexcpt.c: Likewise. * sysdeps/i386/fpu/fegetenv.c: Likewise. * sysdeps/i386/fpu/fesetenv.c: Likewise. * sysdeps/i386/fpu/feupdateenv.c: Likewise. * sysdeps/i386/fpu/fgetexcptflg.c: Likewise. * sysdeps/i386/fpu/fraiseexcpt.c: Likewise. * sysdeps/i386/fpu/fsetexcptflg.c: Likewise. * sysdeps/m68k/fpu/fclrexcpt.c: Likewise. * sysdeps/m68k/fpu/fegetenv.c: Likewise. * sysdeps/m68k/fpu/fesetenv.c: Likewise. * sysdeps/m68k/fpu/feupdateenv.c: Likewise. * sysdeps/m68k/fpu/fgetexcptflg.c: Likewise. * sysdeps/m68k/fpu/fraiseexcpt.c: Likewise. * sysdeps/m68k/fpu/fsetexcptflg.c: Likewise. * sysdeps/powerpc/fclrexcpt.c: Likewise. * sysdeps/powerpc/fpu/fegetenv.c: Likewise. * sysdeps/powerpc/fpu/fesetenv.c: Likewise. * sysdeps/powerpc/fpu/feupdateenv.c: Likewise. * sysdeps/powerpc/fpu/fgetexcptflg.c: Likewise. * sysdeps/powerpc/fpu/fraiseexcpt.c: Likewise. * sysdeps/powerpc/fpu/fsetexcptflg.c: Likewise. --- sysdeps/alpha/fpu/fclrexcpt.c | 11 ++++++++--- sysdeps/alpha/fpu/fegetenv.c | 11 ++++++++--- sysdeps/alpha/fpu/fesetenv.c | 11 ++++++++--- sysdeps/alpha/fpu/feupdateenv.c | 11 ++++++++--- sysdeps/alpha/fpu/fgetexcptflg.c | 11 ++++++++--- sysdeps/alpha/fpu/fraiseexcpt.c | 11 ++++++++--- sysdeps/alpha/fpu/fsetexcptflg.c | 11 ++++++++--- sysdeps/arm/fpu/fclrexcpt.c | 11 ++++++++--- sysdeps/arm/fpu/fegetenv.c | 11 ++++++++--- sysdeps/arm/fpu/fesetenv.c | 11 ++++++++--- sysdeps/arm/fpu/fraiseexcpt.c | 11 ++++++++--- sysdeps/arm/fpu/fsetexcptflg.c | 11 ++++++++--- sysdeps/m68k/fpu/fclrexcpt.c | 11 ++++++++--- sysdeps/m68k/fpu/fegetenv.c | 11 ++++++++--- sysdeps/m68k/fpu/fesetenv.c | 11 ++++++++--- sysdeps/m68k/fpu/feupdateenv.c | 11 ++++++++--- sysdeps/m68k/fpu/fgetexcptflg.c | 11 ++++++++--- sysdeps/m68k/fpu/fraiseexcpt.c | 11 ++++++++--- sysdeps/m68k/fpu/fsetexcptflg.c | 11 ++++++++--- 19 files changed, 152 insertions(+), 57 deletions(-) diff --git a/sysdeps/alpha/fpu/fclrexcpt.c b/sysdeps/alpha/fpu/fclrexcpt.c index 71ff748f73..7777416911 100644 --- a/sysdeps/alpha/fpu/fclrexcpt.c +++ b/sysdeps/alpha/fpu/fclrexcpt.c @@ -1,5 +1,5 @@ /* Clear given exceptions in current floating-point environment. - Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1997. @@ -37,6 +37,11 @@ __feclearexcept (int excepts) /* Success. */ return 0; } + +#include +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__feclearexcept, __old_feclearexcept) -symbol_version (__old_feclearexcept, feclearexcept, GLIBC_2.1); -default_symbol_version (__feclearexcept, feclearexcept, GLIBC_2.2); +compat_symbol (libm, __old_feclearexcept, feclearexcept, GLIBC_2_1); +#endif + +versioned_symbol (libm, __feclearexcept, feclearexcept, GLIBC_2_2); diff --git a/sysdeps/alpha/fpu/fegetenv.c b/sysdeps/alpha/fpu/fegetenv.c index d6b3f70897..c96674fd90 100644 --- a/sysdeps/alpha/fpu/fegetenv.c +++ b/sysdeps/alpha/fpu/fegetenv.c @@ -1,5 +1,5 @@ /* Store current floating-point environment. - Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1997 @@ -37,6 +37,11 @@ __fegetenv (fenv_t *envp) /* Success. */ return 0; } + +#include +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__fegetenv, __old_fegetenv) -symbol_version (__old_fegetenv, fegetenv, GLIBC_2.1); -default_symbol_version (__fegetenv, fegetenv, GLIBC_2.2); +compat_symbol (libm, __old_fegetenv, fegetenv, GLIBC_2_1); +#endif + +versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2); diff --git a/sysdeps/alpha/fpu/fesetenv.c b/sysdeps/alpha/fpu/fesetenv.c index 5bf3b5e59a..45d25bb2af 100644 --- a/sysdeps/alpha/fpu/fesetenv.c +++ b/sysdeps/alpha/fpu/fesetenv.c @@ -1,5 +1,5 @@ /* Install given floating-point environment. - Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1997 @@ -46,6 +46,11 @@ __fesetenv (const fenv_t *envp) /* Success. */ return 0; } + +#include +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__fesetenv, __old_fesetenv) -symbol_version (__old_fesetenv, fesetenv, GLIBC_2.1); -default_symbol_version (__fesetenv, fesetenv, GLIBC_2.2); +compat_symbol (libm, __old_fesetenv, fesetenv, GLIBC_2_1); +#endif + +versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2); diff --git a/sysdeps/alpha/fpu/feupdateenv.c b/sysdeps/alpha/fpu/feupdateenv.c index b9f1c5b69e..69044066eb 100644 --- a/sysdeps/alpha/fpu/feupdateenv.c +++ b/sysdeps/alpha/fpu/feupdateenv.c @@ -1,5 +1,5 @@ /* Install given floating-point environment and raise exceptions. - Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1997. @@ -39,6 +39,11 @@ __feupdateenv (const fenv_t *envp) /* Success. */ return 0; } + +#include +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__feupdateenv, __old_feupdateenv) -symbol_version (__old_feupdateenv, feupdateenv, GLIBC_2.1); -default_symbol_version (__feupdateenv, feupdateenv, GLIBC_2.2); +compat_symbol (libm, __old_feupdateenv, feupdateenv, GLIBC_2_1); +#endif + +versioned_symbol (libm, __feupdateenv, feupdateenv, GLIBC_2_2); diff --git a/sysdeps/alpha/fpu/fgetexcptflg.c b/sysdeps/alpha/fpu/fgetexcptflg.c index bae1556f5d..f85d7a2a92 100644 --- a/sysdeps/alpha/fpu/fgetexcptflg.c +++ b/sysdeps/alpha/fpu/fgetexcptflg.c @@ -1,5 +1,5 @@ /* Store current representation for exceptions. - Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1997. @@ -34,6 +34,11 @@ __fegetexceptflag (fexcept_t *flagp, int excepts) /* Success. */ return 0; } + +#include +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__fegetexceptflag, __old_fegetexceptflag) -symbol_version (__old_fegetexceptflag, fegetexceptflag, GLIBC_2.1); -default_symbol_version (__fegetexceptflag, fegetexceptflag, GLIBC_2.2); +compat_symbol (libm, __old_fegetexceptflag, fegetexceptflag, GLIBC_2_1); +#endif + +versioned_symbol (libm, __fegetexceptflag, fegetexceptflag, GLIBC_2_2); diff --git a/sysdeps/alpha/fpu/fraiseexcpt.c b/sysdeps/alpha/fpu/fraiseexcpt.c index 1f72ebaf6a..3e8ce76a58 100644 --- a/sysdeps/alpha/fpu/fraiseexcpt.c +++ b/sysdeps/alpha/fpu/fraiseexcpt.c @@ -1,5 +1,5 @@ /* Raise given exceptions. - Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1997,98,99,2000,01 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1997. @@ -37,6 +37,11 @@ __feraiseexcept (int excepts) /* Success. */ return 0; } + +#include +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__feraiseexcept, __old_feraiseexcept) -symbol_version (__old_feraiseexcept, feraiseexcept, GLIBC_2.1); -default_symbol_version (__feraiseexcept, feraiseexcept, GLIBC_2.2); +compat_symbol (libm, __old_feraiseexcept, feraiseexcept, GLIBC_2_1); +#endif + +versioned_symbol (libm, __feraiseexcept, feraiseexcept, GLIBC_2_2); diff --git a/sysdeps/alpha/fpu/fsetexcptflg.c b/sysdeps/alpha/fpu/fsetexcptflg.c index 57531a4aa0..25f5138db3 100644 --- a/sysdeps/alpha/fpu/fsetexcptflg.c +++ b/sysdeps/alpha/fpu/fsetexcptflg.c @@ -1,5 +1,5 @@ /* Set floating-point environment exception handling. - Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1997,98,99,2000,01 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1997. @@ -37,6 +37,11 @@ __fesetexceptflag (const fexcept_t *flagp, int excepts) /* Success. */ return 0; } + +#include +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__fesetexceptflag, __old_fesetexceptflag) -symbol_version (__old_fesetexceptflag, fesetexceptflag, GLIBC_2.1); -default_symbol_version (__fesetexceptflag, fesetexceptflag, GLIBC_2.2); +compat_symbol (libm, __old_fesetexceptflag, fesetexceptflag, GLIBC_2_1); +#endif + +versioned_symbol (libm, __fesetexceptflag, fesetexceptflag, GLIBC_2_2); diff --git a/sysdeps/arm/fpu/fclrexcpt.c b/sysdeps/arm/fpu/fclrexcpt.c index 11fb0f84ec..319eed81d7 100644 --- a/sysdeps/arm/fpu/fclrexcpt.c +++ b/sysdeps/arm/fpu/fclrexcpt.c @@ -1,5 +1,5 @@ /* Clear given exceptions in current floating-point environment. - Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1997,98,99,2000,01 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 @@ -40,6 +40,11 @@ __feclearexcept (int excepts) /* Success. */ return 0; } + +#include +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__feclearexcept, __old_feclearexcept) -symbol_version (__old_feclearexcept, feclearexcept, GLIBC_2.1); -default_symbol_version (__feclearexcept, feclearexcept, GLIBC_2.2); +compat_symbol (libm, __old_feclearexcept, feclearexcept, GLIBC_2_1); +#endif + +versioned_symbol (libm, __feclearexcept, feclearexcept, GLIBC_2_2); diff --git a/sysdeps/arm/fpu/fegetenv.c b/sysdeps/arm/fpu/fegetenv.c index 53d20897aa..17ed990e77 100644 --- a/sysdeps/arm/fpu/fegetenv.c +++ b/sysdeps/arm/fpu/fegetenv.c @@ -1,5 +1,5 @@ /* Store current floating-point environment. - Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1997,98,99,2000,01 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 @@ -30,6 +30,11 @@ __fegetenv (fenv_t *envp) /* Success. */ return 0; } + +#include +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__fegetenv, __old_fegetenv) -symbol_version (__old_fegetenv, fegetenv, GLIBC_2.1); -default_symbol_version (__fegetenv, fegetenv, GLIBC_2.2); +compat_symbol (libm, __old_fegetenv, fegetenv, GLIBC_2_1); +#endif + +versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2); diff --git a/sysdeps/arm/fpu/fesetenv.c b/sysdeps/arm/fpu/fesetenv.c index fd2040d205..09d5f39246 100644 --- a/sysdeps/arm/fpu/fesetenv.c +++ b/sysdeps/arm/fpu/fesetenv.c @@ -1,5 +1,5 @@ /* Install given floating-point environment. - Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1997,98,99,2000,01 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 @@ -34,6 +34,11 @@ __fesetenv (const fenv_t *envp) /* Success. */ return 0; } + +#include +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__fesetenv, __old_fesetenv) -symbol_version (__old_fesetenv, fesetenv, GLIBC_2.1); -default_symbol_version (__fesetenv, fesetenv, GLIBC_2.2); +compat_symbol (libm, __old_fesetenv, fesetenv, GLIBC_2_1); +#endif + +versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2); diff --git a/sysdeps/arm/fpu/fraiseexcpt.c b/sysdeps/arm/fpu/fraiseexcpt.c index 9163744ecb..4e8a546bbf 100644 --- a/sysdeps/arm/fpu/fraiseexcpt.c +++ b/sysdeps/arm/fpu/fraiseexcpt.c @@ -1,5 +1,5 @@ /* Raise given exceptions. - Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1997,98,99,2000,01 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 @@ -33,6 +33,11 @@ __feraiseexcept (int excepts) /* Success. */ return 0; } + +#include +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__feraiseexcept, __old_feraiseexcept) -symbol_version (__old_feraiseexcept, feraiseexcept, GLIBC_2.1); -default_symbol_version (__feraiseexcept, feraiseexcept, GLIBC_2.2); +compat_symbol (libm, __old_feraiseexcept, feraiseexcept, GLIBC_2_1); +#endif + +versioned_symbol (libm, __feraiseexcept, feraiseexcept, GLIBC_2_2); diff --git a/sysdeps/arm/fpu/fsetexcptflg.c b/sysdeps/arm/fpu/fsetexcptflg.c index 960ca2b360..485781e2ad 100644 --- a/sysdeps/arm/fpu/fsetexcptflg.c +++ b/sysdeps/arm/fpu/fsetexcptflg.c @@ -1,5 +1,5 @@ /* Set floating-point environment exception handling. - Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1997,98,99,2000,01 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 @@ -39,6 +39,11 @@ __fesetexceptflag (const fexcept_t *flagp, int excepts) /* Success. */ return 0; } + +#include +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__fesetexceptflag, __old_fesetexceptflag) -symbol_version (__old_fesetexceptflag, fesetexceptflag, GLIBC_2.1); -default_symbol_version (__fesetexceptflag, fesetexceptflag, GLIBC_2.2); +compat_symbol (libm, __old_fesetexceptflag, fesetexceptflag, GLIBC_2_1); +#endif + +versioned_symbol (libm, __fesetexceptflag, fesetexceptflag, GLIBC_2_2); diff --git a/sysdeps/m68k/fpu/fclrexcpt.c b/sysdeps/m68k/fpu/fclrexcpt.c index a2f144bea9..f35bb12479 100644 --- a/sysdeps/m68k/fpu/fclrexcpt.c +++ b/sysdeps/m68k/fpu/fclrexcpt.c @@ -1,5 +1,5 @@ /* Clear given exceptions in current floating-point environment. - Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab @@ -40,6 +40,11 @@ __feclearexcept (int excepts) /* Success. */ return 0; } + +#include +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__feclearexcept, __old_feclearexcept) -symbol_version (__old_feclearexcept, feclearexcept, GLIBC_2.1); -default_symbol_version (__feclearexcept, feclearexcept, GLIBC_2.2); +compat_symbol (libm, __old_feclearexcept, feclearexcept, GLIBC_2_1); +#endif + +versioned_symbol (libm, __feclearexcept, feclearexcept, GLIBC_2_2); diff --git a/sysdeps/m68k/fpu/fegetenv.c b/sysdeps/m68k/fpu/fegetenv.c index 60226ffcc0..7a5a28bbab 100644 --- a/sysdeps/m68k/fpu/fegetenv.c +++ b/sysdeps/m68k/fpu/fegetenv.c @@ -1,5 +1,5 @@ /* Store current floating-point environment. - Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab @@ -28,6 +28,11 @@ __fegetenv (fenv_t *envp) /* Success. */ return 0; } + +#include +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__fegetenv, __old_fegetenv) -symbol_version (__old_fegetenv, fegetenv, GLIBC_2.1); -default_symbol_version (__fegetenv, fegetenv, GLIBC_2.2); +compat_symbol (libm, __old_fegetenv, fegetenv, GLIBC_2_1); +#endif + +versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2); diff --git a/sysdeps/m68k/fpu/fesetenv.c b/sysdeps/m68k/fpu/fesetenv.c index e780fe8320..9149c72435 100644 --- a/sysdeps/m68k/fpu/fesetenv.c +++ b/sysdeps/m68k/fpu/fesetenv.c @@ -1,5 +1,5 @@ /* Install given floating-point environment. - Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab @@ -49,6 +49,11 @@ __fesetenv (const fenv_t *envp) /* Success. */ return 0; } + +#include +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__fesetenv, __old_fesetenv) -symbol_version (__old_fesetenv, fesetenv, GLIBC_2.1); -default_symbol_version (__fesetenv, fesetenv, GLIBC_2.2); +compat_symbol (libm, __old_fesetenv, fesetenv, GLIBC_2_1); +#endif + +versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2); diff --git a/sysdeps/m68k/fpu/feupdateenv.c b/sysdeps/m68k/fpu/feupdateenv.c index 7115f8b5cf..6ebc0c6afa 100644 --- a/sysdeps/m68k/fpu/feupdateenv.c +++ b/sysdeps/m68k/fpu/feupdateenv.c @@ -1,5 +1,5 @@ /* Install given floating-point environment and raise exceptions. - Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab @@ -40,6 +40,11 @@ __feupdateenv (const fenv_t *envp) /* Success. */ return 0; } + +#include +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__feupdateenv, __old_feupdateenv) -symbol_version (__old_feupdateenv, feupdateenv, GLIBC_2.1); -default_symbol_version (__feupdateenv, feupdateenv, GLIBC_2.2); +compat_symbol (libm, __old_feupdateenv, feupdateenv, GLIBC_2_1); +#endif + +versioned_symbol (libm, __feupdateenv, feupdateenv, GLIBC_2_2); diff --git a/sysdeps/m68k/fpu/fgetexcptflg.c b/sysdeps/m68k/fpu/fgetexcptflg.c index 8a56e209b0..a0d1ec5846 100644 --- a/sysdeps/m68k/fpu/fgetexcptflg.c +++ b/sysdeps/m68k/fpu/fgetexcptflg.c @@ -1,5 +1,5 @@ /* Store current representation for exceptions. - Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab @@ -33,6 +33,11 @@ __fegetexceptflag (fexcept_t *flagp, int excepts) /* Success. */ return 0; } + +#include +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__fegetexceptflag, __old_fegetexceptflag) -symbol_version (__old_fegetexceptflag, fegetexceptflag, GLIBC_2.1); -default_symbol_version (__fegetexceptflag, fegetexceptflag, GLIBC_2.2); +compat_symbol (libm, __old_fegetexceptflag, fegetexceptflag, GLIBC_2_1); +#endif + +versioned_symbol (libm, __fegetexceptflag, fegetexceptflag, GLIBC_2_2); diff --git a/sysdeps/m68k/fpu/fraiseexcpt.c b/sysdeps/m68k/fpu/fraiseexcpt.c index 1c559c2b26..592cc5a517 100644 --- a/sysdeps/m68k/fpu/fraiseexcpt.c +++ b/sysdeps/m68k/fpu/fraiseexcpt.c @@ -1,5 +1,5 @@ /* Raise given exceptions. - Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab @@ -72,6 +72,11 @@ __feraiseexcept (int excepts) /* Success. */ return 0; } + +#include +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__feraiseexcept, __old_feraiseexcept) -symbol_version (__old_feraiseexcept, feraiseexcept, GLIBC_2.1); -default_symbol_version (__feraiseexcept, feraiseexcept, GLIBC_2.2); +compat_symbol (libm, __old_feraiseexcept, feraiseexcept, GLIBC_2_1); +#endif + +versioned_symbol (libm, __feraiseexcept, feraiseexcept, GLIBC_2_2); diff --git a/sysdeps/m68k/fpu/fsetexcptflg.c b/sysdeps/m68k/fpu/fsetexcptflg.c index 04ecf66c9c..51892a7d98 100644 --- a/sysdeps/m68k/fpu/fsetexcptflg.c +++ b/sysdeps/m68k/fpu/fsetexcptflg.c @@ -1,5 +1,5 @@ /* Set floating-point environment exception handling. - Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab @@ -39,6 +39,11 @@ __fesetexceptflag (const fexcept_t *flagp, int excepts) /* Success. */ return 0; } + +#include +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__fesetexceptflag, __old_fesetexceptflag) -symbol_version (__old_fesetexceptflag, fesetexceptflag, GLIBC_2.1); -default_symbol_version (__fesetexceptflag, fesetexceptflag, GLIBC_2.2); +compat_symbol (libm, __old_fesetexceptflag, fesetexceptflag, GLIBC_2_1); +#endif + +versioned_symbol (libm, __fesetexceptflag, fesetexceptflag, GLIBC_2_2); From 13906e12b9b21467d4e6a9f7cfe698d7361e5f7f Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 5 Jun 2001 06:20:45 +0000 Subject: [PATCH 2601/4487] Add .type for the entry point. --- sysdeps/alpha/elf/start.S | 3 ++- sysdeps/arm/elf/start.S | 7 ++++--- sysdeps/cris/elf/start.S | 1 + sysdeps/hppa/elf/start.S | 2 +- sysdeps/m68k/elf/start.S | 3 ++- sysdeps/mips/elf/start.S | 1 + 6 files changed, 11 insertions(+), 6 deletions(-) diff --git a/sysdeps/alpha/elf/start.S b/sysdeps/alpha/elf/start.S index 90f59f0452..54eaab6353 100644 --- a/sysdeps/alpha/elf/start.S +++ b/sysdeps/alpha/elf/start.S @@ -1,5 +1,5 @@ /* Startup code for Alpha/ELF. - Copyright (C) 1993,1995,1996,1997,1998,2000 Free Software Foundation, Inc. + Copyright (C) 1993,1995,1996,1997,1998,2000,2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson @@ -24,6 +24,7 @@ .align 3 .globl _start .ent _start, 0 + .type _start,@function _start: .frame fp, 0, zero mov zero, fp diff --git a/sysdeps/arm/elf/start.S b/sysdeps/arm/elf/start.S index 13b9c780ef..4d841c82d9 100644 --- a/sysdeps/arm/elf/start.S +++ b/sysdeps/arm/elf/start.S @@ -1,5 +1,5 @@ /* Startup code for ARM & ELF - Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997, 1998, 2001 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 @@ -27,12 +27,12 @@ At this entry point, most registers' values are unspecified, except: a1 Contains a function pointer to be registered with `atexit'. - This is how the dynamic linker arranges to have DT_FINI + This is how the dynamic linker arranges to have DT_FINI functions called for shared libraries that have been loaded before this code runs. sp The stack contains the arguments and environment: - 0(sp) argc + 0(sp) argc 4(sp) argv[0] ... (4*argc)(sp) NULL @@ -43,6 +43,7 @@ .text .globl _start + .type _start,@function _start: /* Clear the frame pointer since this is the outermost frame. */ mov fp, #0 diff --git a/sysdeps/cris/elf/start.S b/sysdeps/cris/elf/start.S index f6336d2dab..eef5c7543b 100644 --- a/sysdeps/cris/elf/start.S +++ b/sysdeps/cris/elf/start.S @@ -42,6 +42,7 @@ .text .globl _start + type _start,@function _start: /* Clear the frame pointer, to mark the outermost frame. */ moveq 0,r8 diff --git a/sysdeps/hppa/elf/start.S b/sysdeps/hppa/elf/start.S index 88bb790be2..a5c3e521dd 100644 --- a/sysdeps/hppa/elf/start.S +++ b/sysdeps/hppa/elf/start.S @@ -14,7 +14,7 @@ .globl _start .export _start, ENTRY - + .type _start,@function _start: .proc diff --git a/sysdeps/m68k/elf/start.S b/sysdeps/m68k/elf/start.S index eefe75286e..cf286f1ced 100644 --- a/sysdeps/m68k/elf/start.S +++ b/sysdeps/m68k/elf/start.S @@ -1,5 +1,5 @@ /* Startup code compliant to the ELF m68k ABI. - Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 2001 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 @@ -38,6 +38,7 @@ .text .globl _start + .type _start,@function _start: /* Clear the frame pointer. The ABI suggests this be done, to mark the outermost frame obviously. */ diff --git a/sysdeps/mips/elf/start.S b/sysdeps/mips/elf/start.S index a5ae48048a..19bf93a643 100644 --- a/sysdeps/mips/elf/start.S +++ b/sysdeps/mips/elf/start.S @@ -67,6 +67,7 @@ .text .globl ENTRY_POINT + .type ENTRY_POINT,@function ENTRY_POINT: #ifdef __PIC__ SET_GP From b496bd686c3a6fe68397e86937dc0517c1c64823 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 6 Jun 2001 11:35:25 +0000 Subject: [PATCH 2602/4487] Removed. --- sysdeps/unix/sysv/linux/hppa/getrlimit.c | 1 - sysdeps/unix/sysv/linux/hppa/setrlimit.c | 1 - 2 files changed, 2 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/hppa/getrlimit.c delete mode 100644 sysdeps/unix/sysv/linux/hppa/setrlimit.c diff --git a/sysdeps/unix/sysv/linux/hppa/getrlimit.c b/sysdeps/unix/sysv/linux/hppa/getrlimit.c deleted file mode 100644 index fc06dbd641..0000000000 --- a/sysdeps/unix/sysv/linux/hppa/getrlimit.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/hppa/setrlimit.c b/sysdeps/unix/sysv/linux/hppa/setrlimit.c deleted file mode 100644 index bfaef74c38..0000000000 --- a/sysdeps/unix/sysv/linux/hppa/setrlimit.c +++ /dev/null @@ -1 +0,0 @@ -#include From ed48681558f81d55714f40efb096a917a571a02e Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 6 Jun 2001 11:44:24 +0000 Subject: [PATCH 2603/4487] Call getrlimit, setrlimit directly instead of using wrappers. --- sysdeps/unix/sysv/linux/hppa/syscalls.list | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/unix/sysv/linux/hppa/syscalls.list b/sysdeps/unix/sysv/linux/hppa/syscalls.list index 6d7cd6a23f..ed9f1a3982 100644 --- a/sysdeps/unix/sysv/linux/hppa/syscalls.list +++ b/sysdeps/unix/sysv/linux/hppa/syscalls.list @@ -35,3 +35,5 @@ socketpair - socketpair i:iiif __socketpair socketpair getresuid - getresuid i:ppp getresuid getresgid - getresgid i:ppp getresgid +setrlimit - setrlimit i:ip __setrlimit setrlimit +getrlimit - getrlimit i:ip __getrlimit getrlimit From 97b30982cefabcd50007467df1336fb40fa4200f Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 6 Jun 2001 11:49:17 +0000 Subject: [PATCH 2604/4487] Remove dummy syscall. --- sysdeps/unix/sysv/linux/hppa/syscall.S | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/sysdeps/unix/sysv/linux/hppa/syscall.S b/sysdeps/unix/sysv/linux/hppa/syscall.S index 413c572c34..96b5b922b2 100644 --- a/sysdeps/unix/sysv/linux/hppa/syscall.S +++ b/sysdeps/unix/sysv/linux/hppa/syscall.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1998, 2001 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 @@ -16,13 +16,4 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include - -/* Please consult the file sysdeps/unix/sysv/linux/i386/sysdep.h for - more information about the value -4095 used below.*/ - - .text -ENTRY (syscall) - b . - nop - +/* HPPA implements syscall() in 'C'; see sysdep.c. */ From f325056f095c24a3ebf60707b2cc39859ea72019 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 6 Jun 2001 11:49:29 +0000 Subject: [PATCH 2605/4487] Implement syscall. --- sysdeps/unix/sysv/linux/hppa/sysdep.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.c b/sysdeps/unix/sysv/linux/hppa/sysdep.c index 0559cc7065..e185da5f34 100644 --- a/sysdeps/unix/sysv/linux/hppa/sysdep.c +++ b/sysdeps/unix/sysv/linux/hppa/sysdep.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2001 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 @@ -32,3 +32,28 @@ __syscall_error (int err_no) #undef errno int errno = 0; weak_alias (errno, _errno) + + +/* HPPA implements syscall() in 'C'; the assembler version would + typically be in syscall.S. */ + +int +syscall (int sysnum, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5) +{ + long __sys_res; + { + register unsigned long __res asm("r28"); + LOAD_ARGS_6(arg0, arg1, arg2, arg3, arg4, arg5) + asm volatile ("ble 0x100(%%sr2, %%r0)\n\t" + "copy %1, %%r20" + : "=r" (__res) + : "r" (sysnum) ASM_ARGS_6); + __sys_res = __res; + } + if ((unsigned long) __sys_res >= (unsigned long)-4095) + { + __set_errno(-__sys_res); + __sys_res = -1; + } + return __sys_res; +} From 1e48d4f660728b953712ef7084e940d35bfeca8e Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 6 Jun 2001 11:52:59 +0000 Subject: [PATCH 2606/4487] Reformat asm statements to remove new gcc warning about multi-line strings. --- sysdeps/hppa/dl-machine.h | 319 +++++++++++++++++++------------------- 1 file changed, 160 insertions(+), 159 deletions(-) diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h index 6f2020c071..46163345fa 100644 --- a/sysdeps/hppa/dl-machine.h +++ b/sysdeps/hppa/dl-machine.h @@ -75,11 +75,11 @@ elf_machine_dynamic (void) #if 0 /* Use this method if GOT address not yet set up. */ - asm ("\ - b,l 1f,%0 - depi 0,31,2,%0 -1: addil L'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 8),%0 - ldw R'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 12)(%%r1),%0" + asm ( +" b,l 1f,%0\n" +" depi 0,31,2,%0\n" +"1: addil L'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 8),%0\n" +" ldw R'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 12)(%%r1),%0\n" : "=r" (dynamic) : : "r1"); #else /* This works because we already have our GOT address available. */ @@ -95,13 +95,13 @@ elf_machine_load_address (void) { Elf32_Addr dynamic, dynamic_linkaddress; - asm ("\ - b,l 1f,%0 - depi 0,31,2,%0 -1: addil L'_DYNAMIC - ($PIC_pcrel$0 - 8),%0 - ldo R'_DYNAMIC - ($PIC_pcrel$0 - 12)(%%r1),%1 - addil L'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 16),%0 - ldw R'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 20)(%%r1),%0" + asm ( +" b,l 1f,%0\n" +" depi 0,31,2,%0\n" +"1: addil L'_DYNAMIC - ($PIC_pcrel$0 - 8),%0\n" +" ldo R'_DYNAMIC - ($PIC_pcrel$0 - 12)(%%r1),%1\n" +" addil L'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 16),%0\n" +" ldw R'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 20)(%%r1),%0\n" : "=r" (dynamic_linkaddress), "=r" (dynamic) : : "r1"); return dynamic - dynamic_linkaddress; @@ -250,153 +250,154 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) #define RTLD_START \ /* Set up dp for any non-PIC lib constructors that may be called. */ \ -static struct link_map * set_dp (struct link_map *map) \ -{ \ - register Elf32_Addr dp asm ("%r27"); \ - dp = D_PTR (map, l_info[DT_PLTGOT]); \ - asm volatile ("" : : "r" (dp)); \ - return map; \ -} \ - \ -asm ("\ - .text - .globl _start - .type _start,@function -_start: - /* The kernel does not give us an initial stack frame. */ - ldo 64(%sp),%sp - /* Save the relevant arguments (yes, those are the correct - registers, the kernel is weird) in their stack slots. */ - stw %r25,-40(%sp) /* argc */ - stw %r24,-44(%sp) /* argv */ - - /* We need the LTP, and we need it now. */ - /* $PIC_pcrel$0 points 8 bytes past the current instruction, - just like a branch reloc. This sequence gets us the runtime - address of _DYNAMIC. */ - bl 0f,%r19 - depi 0,31,2,%r19 /* clear priviledge bits */ -0: addil L'_DYNAMIC - ($PIC_pcrel$0 - 8),%r19 - ldo R'_DYNAMIC - ($PIC_pcrel$0 - 12)(%r1),%r26 - - /* Also get the link time address from the first entry of the GOT. */ - addil L'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 16),%r19 - ldw R'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 20)(%r1),%r20 - - sub %r26,%r20,%r20 /* Calculate load offset */ - - /* Rummage through the dynamic entries, looking for DT_PLTGOT. */ - ldw,ma 8(%r26),%r19 -1: cmpib,=,n 3,%r19,2f /* tag == DT_PLTGOT? */ - cmpib,<>,n 0,%r19,1b - ldw,ma 8(%r26),%r19 - - /* Uh oh! We didn't find one. Abort. */ - iitlbp %r0,(%r0) - -2: ldw -4(%r26),%r19 /* Found it, load value. */ - add %r19,%r20,%r19 /* And add the load offset. */ - - /* Our initial stack layout is rather different from everyone - else's due to the unique PA-RISC ABI. As far as I know it - looks like this: - - ----------------------------------- (this frame created above) - | 32 bytes of magic | - |---------------------------------| - | 32 bytes argument/sp save area | - |---------------------------------| ((current->mm->env_end) + 63 & ~63) - | N bytes of slack | - |---------------------------------| - | envvar and arg strings | - |---------------------------------| - | ELF auxiliary info | - | (up to 28 words) | - |---------------------------------| - | Environment variable pointers | - | upwards to NULL | - |---------------------------------| - | Argument pointers | - | upwards to NULL | - |---------------------------------| - | argc (1 word) | - ----------------------------------- - - So, obviously, we can't just pass %sp to _dl_start. That's - okay, argv-4 will do just fine. - - The pleasant part of this is that if we need to skip - arguments we can just decrement argc and move argv, because - the stack pointer is utterly unrelated to the location of - the environment and argument vectors. */ - - /* This is always within range so we'll be okay. */ - bl _dl_start,%rp - ldo -4(%r24),%r26 - - .globl _dl_start_user - .type _dl_start_user,@function -_dl_start_user: - /* Save the entry point in %r3. */ - copy %ret0,%r3 - - /* Remember the lowest stack address. */ - addil LT'__libc_stack_end,%r19 - ldw RT'__libc_stack_end(%r1),%r20 - stw %sp,0(%r20) - - /* See if we were called as a command with the executable file - name as an extra leading argument. */ - addil LT'_dl_skip_args,%r19 - ldw RT'_dl_skip_args(%r1),%r20 - ldw 0(%r20),%r20 - - ldw -40(%sp),%r25 /* argc */ - comib,= 0,%r20,.Lnofix /* FIXME: will be mispredicted */ - ldw -44(%sp),%r24 /* argv (delay slot) */ - - sub %r25,%r20,%r25 - stw %r25,-40(%sp) - sh2add %r20,%r24,%r24 - stw %r24,-44(%sp) - -.Lnofix: - addil LT'_dl_loaded,%r19 - ldw RT'_dl_loaded(%r1),%r26 - bl set_dp, %r2 - ldw 0(%r26),%r26 - - /* Call _dl_init(_dl_loaded, argc, argv, envp). */ - copy %r28,%r26 - - /* envp = argv + argc + 1 */ - sh2add %r25,%r24,%r23 - bl _dl_init,%r2 - ldo 4(%r23),%r23 /* delay slot */ - - /* Reload argc, argv to the registers start.S expects them in (feh) */ - ldw -40(%sp),%r25 - ldw -44(%sp),%r24 - - /* _dl_fini does have a PLT slot now. I don't know how to get - to it though, so this hack will remain. */ - .section .data -__dl_fini_plabel: - .word _dl_fini - .word 0xdeadbeef - .previous - - /* %r3 contains a function pointer, we need to mask out the lower - * bits and load the gp and jump address. */ - depi 0,31,2,%r3 - ldw 0(%r3),%r2 - addil LT'__dl_fini_plabel,%r19 - ldw RT'__dl_fini_plabel(%r1),%r23 - stw %r19,4(%r23) - ldw 4(%r3),%r19 /* load the object's gp */ - bv %r0(%r2) - depi 2,31,2,%r23 /* delay slot */ -"); +static struct link_map * \ +set_dp (struct link_map *map) \ +{ \ + register Elf32_Addr dp asm ("%r27"); \ + dp = D_PTR (map, l_info[DT_PLTGOT]); \ + asm volatile ("" : : "r" (dp)); \ + return map; \ +} \ + \ +asm ( \ +" .text\n" \ +" .globl _start\n" \ +" .type _start,@function\n" \ +"_start:\n" \ + /* The kernel does not give us an initial stack frame. */ \ +" ldo 64(%sp),%sp\n" \ + /* Save the relevant arguments (yes, those are the correct \ + registers, the kernel is weird) in their stack slots. */ \ +" stw %r25,-40(%sp)\n" /* argc */ \ +" stw %r24,-44(%sp)\n" /* argv */ \ + \ + /* We need the LTP, and we need it now. */ \ + /* $PIC_pcrel$0 points 8 bytes past the current instruction, \ + just like a branch reloc. This sequence gets us the runtime \ + address of _DYNAMIC. */ \ +" bl 0f,%r19\n" \ +" depi 0,31,2,%r19\n" /* clear priviledge bits */ \ +"0: addil L'_DYNAMIC - ($PIC_pcrel$0 - 8),%r19\n" \ +" ldo R'_DYNAMIC - ($PIC_pcrel$0 - 12)(%r1),%r26\n" \ + \ + /* Also get the link time address from the first entry of the GOT. */ \ +" addil L'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 16),%r19\n" \ +" ldw R'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 20)(%r1),%r20\n" \ + \ +" sub %r26,%r20,%r20\n" /* Calculate load offset */ \ + \ + /* Rummage through the dynamic entries, looking for DT_PLTGOT. */ \ +" ldw,ma 8(%r26),%r19\n" \ +"1: cmpib,=,n 3,%r19,2f\n" /* tag == DT_PLTGOT? */ \ +" cmpib,<>,n 0,%r19,1b\n" \ +" ldw,ma 8(%r26),%r19\n" \ + \ + /* Uh oh! We didn't find one. Abort. */ \ +" iitlbp %r0,(%r0)\n" \ + \ +"2: ldw -4(%r26),%r19\n" /* Found it, load value. */ \ +" add %r19,%r20,%r19\n" /* And add the load offset. */ \ + \ + /* Our initial stack layout is rather different from everyone \ + else's due to the unique PA-RISC ABI. As far as I know it \ + looks like this: \ + \ + ----------------------------------- (this frame created above) \ + | 32 bytes of magic | \ + |---------------------------------| \ + | 32 bytes argument/sp save area | \ + |---------------------------------| ((current->mm->env_end) + 63 & ~63) \ + | N bytes of slack | \ + |---------------------------------| \ + | envvar and arg strings | \ + |---------------------------------| \ + | ELF auxiliary info | \ + | (up to 28 words) | \ + |---------------------------------| \ + | Environment variable pointers | \ + | upwards to NULL | \ + |---------------------------------| \ + | Argument pointers | \ + | upwards to NULL | \ + |---------------------------------| \ + | argc (1 word) | \ + ----------------------------------- \ + \ + So, obviously, we can't just pass %sp to _dl_start. That's \ + okay, argv-4 will do just fine. \ + \ + The pleasant part of this is that if we need to skip \ + arguments we can just decrement argc and move argv, because \ + the stack pointer is utterly unrelated to the location of \ + the environment and argument vectors. */ \ + \ + /* This is always within range so we'll be okay. */ \ +" bl _dl_start,%rp\n" \ +" ldo -4(%r24),%r26\n" \ + \ +" .globl _dl_start_user\n" \ +" .type _dl_start_user,@function\n" \ +"_dl_start_user:\n" \ + /* Save the entry point in %r3. */ \ +" copy %ret0,%r3\n" \ + \ + /* Remember the lowest stack address. */ \ +" addil LT'__libc_stack_end,%r19\n" \ +" ldw RT'__libc_stack_end(%r1),%r20\n" \ +" stw %sp,0(%r20)\n" \ + \ + /* See if we were called as a command with the executable file \ + name as an extra leading argument. */ \ +" addil LT'_dl_skip_args,%r19\n" \ +" ldw RT'_dl_skip_args(%r1),%r20\n" \ +" ldw 0(%r20),%r20\n" \ + \ +" ldw -40(%sp),%r25\n" /* argc */ \ +" comib,= 0,%r20,.Lnofix\n" /* FIXME: will be mispredicted */ \ +" ldw -44(%sp),%r24\n" /* argv (delay slot) */ \ + \ +" sub %r25,%r20,%r25\n" \ +" stw %r25,-40(%sp)\n" \ +" sh2add %r20,%r24,%r24\n" \ +" stw %r24,-44(%sp)\n" \ + \ +".Lnofix:\n" \ +" addil LT'_dl_loaded,%r19\n" \ +" ldw RT'_dl_loaded(%r1),%r26\n" \ +" bl set_dp, %r2\n" \ +" ldw 0(%r26),%r26\n" \ + \ + /* Call _dl_init(_dl_loaded, argc, argv, envp). */ \ +" copy %r28,%r26\n" \ + \ + /* envp = argv + argc + 1 */ \ +" sh2add %r25,%r24,%r23\n" \ +" bl _dl_init,%r2\n" \ +" ldo 4(%r23),%r23\n" /* delay slot */ \ + \ + /* Reload argc, argv to the registers start.S expects them in (feh) */ \ +" ldw -40(%sp),%r25\n" \ +" ldw -44(%sp),%r24\n" \ + \ + /* _dl_fini does have a PLT slot now. I don't know how to get \ + to it though, so this hack will remain. */ \ +" .section .data\n" \ +"__dl_fini_plabel:\n" \ +" .word _dl_fini\n" \ +" .word 0xdeadbeef\n" \ +" .previous\n" \ + \ + /* %r3 contains a function pointer, we need to mask out the lower \ + * bits and load the gp and jump address. */ \ +" depi 0,31,2,%r3\n" \ +" ldw 0(%r3),%r2\n" \ +" addil LT'__dl_fini_plabel,%r19\n" \ +" ldw RT'__dl_fini_plabel(%r1),%r23\n" \ +" stw %r19,4(%r23)\n" \ +" ldw 4(%r3),%r19\n" /* load the object's gp */ \ +" bv %r0(%r2)\n" \ +" depi 2,31,2,%r23\n" /* delay slot */ \ + ); /* This code gets called via the .plt stub, and is used in From 5d7fedc9986f9122e7f69fb53716ec11a917920e Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 6 Jun 2001 11:57:49 +0000 Subject: [PATCH 2607/4487] HPPA setjmp implementation. --- sysdeps/hppa/bsd-_setjmp.S | 36 ++++++++++++++++++++++++++++++++++++ sysdeps/hppa/bsd-setjmp.S | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 sysdeps/hppa/bsd-_setjmp.S create mode 100644 sysdeps/hppa/bsd-setjmp.S diff --git a/sysdeps/hppa/bsd-_setjmp.S b/sysdeps/hppa/bsd-_setjmp.S new file mode 100644 index 0000000000..487e8c7c23 --- /dev/null +++ b/sysdeps/hppa/bsd-_setjmp.S @@ -0,0 +1,36 @@ +/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. HPPA version. + Copyright (C) 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* This just does a tail-call to `__sigsetjmp (ARG, 1)'. + We cannot do it in C because it must be a tail-call, so frame-unwinding + in setjmp doesn't clobber the state restored by longjmp. */ + + .text + .align 4 + .globl _setjmp + .export _setjmp, code + .level 2.0 + .proc + .callinfo + .import __sigsetjmp +_setjmp: + b __sigsetjmp + ldi 0, %r25 + + .procend diff --git a/sysdeps/hppa/bsd-setjmp.S b/sysdeps/hppa/bsd-setjmp.S new file mode 100644 index 0000000000..2614b49358 --- /dev/null +++ b/sysdeps/hppa/bsd-setjmp.S @@ -0,0 +1,36 @@ +/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. HPPA version. + Copyright (C) 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* This just does a tail-call to `__sigsetjmp (ARG, 1)'. + We cannot do it in C because it must be a tail-call, so frame-unwinding + in setjmp doesn't clobber the state restored by longjmp. */ + + .text + .align 4 + .globl setjmp + .export setjmp, code + .level 2.0 + .proc + .callinfo + .import __sigsetjmp +setjmp: + b __sigsetjmp + ldi 1, %r25 + + .procend From 0182de12e0acc5e4a757400602d9918b0acbad05 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 6 Jun 2001 12:54:01 +0000 Subject: [PATCH 2608/4487] Renamed. --- sysdeps/m68k/fpu/s_log2.c | 2 -- sysdeps/m68k/fpu/s_log2f.c | 2 -- sysdeps/m68k/fpu/s_log2l.c | 2 -- 3 files changed, 6 deletions(-) delete mode 100644 sysdeps/m68k/fpu/s_log2.c delete mode 100644 sysdeps/m68k/fpu/s_log2f.c delete mode 100644 sysdeps/m68k/fpu/s_log2l.c diff --git a/sysdeps/m68k/fpu/s_log2.c b/sysdeps/m68k/fpu/s_log2.c deleted file mode 100644 index 26e26bae95..0000000000 --- a/sysdeps/m68k/fpu/s_log2.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC log2 -#include diff --git a/sysdeps/m68k/fpu/s_log2f.c b/sysdeps/m68k/fpu/s_log2f.c deleted file mode 100644 index 68494322b8..0000000000 --- a/sysdeps/m68k/fpu/s_log2f.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC log2f -#include diff --git a/sysdeps/m68k/fpu/s_log2l.c b/sysdeps/m68k/fpu/s_log2l.c deleted file mode 100644 index c4eb06332b..0000000000 --- a/sysdeps/m68k/fpu/s_log2l.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC log2l -#include From 27b26c503a22e3fd1791ac14cfd885af32b07879 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 6 Jun 2001 12:54:31 +0000 Subject: [PATCH 2609/4487] M68k log2 implementation. --- sysdeps/m68k/fpu/e_log2.c | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sysdeps/m68k/fpu/e_log2.c diff --git a/sysdeps/m68k/fpu/e_log2.c b/sysdeps/m68k/fpu/e_log2.c new file mode 100644 index 0000000000..5528922b9c --- /dev/null +++ b/sysdeps/m68k/fpu/e_log2.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_log2 +#include From 34583d4c479adee7cc04f5eff2f3eb50953a2b27 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 6 Jun 2001 12:54:45 +0000 Subject: [PATCH 2610/4487] M68k log2f implementation. --- sysdeps/m68k/fpu/e_log2f.c | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sysdeps/m68k/fpu/e_log2f.c diff --git a/sysdeps/m68k/fpu/e_log2f.c b/sysdeps/m68k/fpu/e_log2f.c new file mode 100644 index 0000000000..ed74933631 --- /dev/null +++ b/sysdeps/m68k/fpu/e_log2f.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_log10f +#include From 356aba5785c17e44148821a34156bacb521ad553 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 6 Jun 2001 12:54:56 +0000 Subject: [PATCH 2611/4487] M68k log2l implementation. --- sysdeps/m68k/fpu/e_log2l.c | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sysdeps/m68k/fpu/e_log2l.c diff --git a/sysdeps/m68k/fpu/e_log2l.c b/sysdeps/m68k/fpu/e_log2l.c new file mode 100644 index 0000000000..795cfba8c5 --- /dev/null +++ b/sysdeps/m68k/fpu/e_log2l.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_log10l +#include From 163f71bf7802a4deabe5b066dcdf9f5bfda8bff5 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 6 Jun 2001 18:01:52 +0000 Subject: [PATCH 2612/4487] Fix a typo introduced by last patch. --- sysdeps/cris/elf/start.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/cris/elf/start.S b/sysdeps/cris/elf/start.S index eef5c7543b..e740aaa83c 100644 --- a/sysdeps/cris/elf/start.S +++ b/sysdeps/cris/elf/start.S @@ -42,7 +42,7 @@ .text .globl _start - type _start,@function + .type _start,@function _start: /* Clear the frame pointer, to mark the outermost frame. */ moveq 0,r8 From 791746df786eed14b94c57d266e82b353ed0090b Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 11 Jun 2001 07:44:41 +0000 Subject: [PATCH 2613/4487] Use #function, not @function, for .type of _start. --- sysdeps/arm/elf/start.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/arm/elf/start.S b/sysdeps/arm/elf/start.S index 4d841c82d9..089591f468 100644 --- a/sysdeps/arm/elf/start.S +++ b/sysdeps/arm/elf/start.S @@ -43,7 +43,7 @@ .text .globl _start - .type _start,@function + .type _start,#function _start: /* Clear the frame pointer since this is the outermost frame. */ mov fp, #0 From 99e859a48847cdec924cf5d4b201c8c496bba69c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 14 Jun 2001 00:21:01 +0000 Subject: [PATCH 2614/4487] Define __MAX_BAUD. --- sysdeps/unix/sysv/linux/alpha/bits/termios.h | 2 ++ sysdeps/unix/sysv/linux/mips/bits/termios.h | 1 + 2 files changed, 3 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/termios.h b/sysdeps/unix/sysv/linux/alpha/bits/termios.h index bfd64ee99a..13e17b7b43 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/termios.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/termios.h @@ -150,6 +150,8 @@ struct termios #define B3500000 00035 #define B4000000 00036 +#define __MAX_BAUD B4000000 + #define CSIZE 00001400 #define CS5 00000000 #define CS6 00000400 diff --git a/sysdeps/unix/sysv/linux/mips/bits/termios.h b/sysdeps/unix/sysv/linux/mips/bits/termios.h index f7abe474df..ca6b648548 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/termios.h +++ b/sysdeps/unix/sysv/linux/mips/bits/termios.h @@ -214,6 +214,7 @@ struct termios # define B3000000 0010015 # define B3500000 0010016 # define B4000000 0010017 +# define __MAX_BAUD B4000000 # define CIBAUD 002003600000 /* input baud rate (not used) */ # define CRTSCTS 020000000000 /* flow control */ #endif From 2535264f9425942522bd4f714bcc8a65dc178c8f Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Thu, 14 Jun 2001 14:17:49 +0000 Subject: [PATCH 2615/4487] Fix typo. --- sysdeps/m68k/fpu/e_log2f.c | 2 +- sysdeps/m68k/fpu/e_log2l.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/m68k/fpu/e_log2f.c b/sysdeps/m68k/fpu/e_log2f.c index ed74933631..6b4907686d 100644 --- a/sysdeps/m68k/fpu/e_log2f.c +++ b/sysdeps/m68k/fpu/e_log2f.c @@ -1,2 +1,2 @@ -#define FUNC __ieee754_log10f +#define FUNC __ieee754_log2f #include diff --git a/sysdeps/m68k/fpu/e_log2l.c b/sysdeps/m68k/fpu/e_log2l.c index 795cfba8c5..4c92a11acf 100644 --- a/sysdeps/m68k/fpu/e_log2l.c +++ b/sysdeps/m68k/fpu/e_log2l.c @@ -1,2 +1,2 @@ -#define FUNC __ieee754_log10l +#define FUNC __ieee754_log2l #include From f702391cdd140f19ae5aff7d5aeda9ef948a3624 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 15 Jun 2001 13:59:28 +0000 Subject: [PATCH 2616/4487] * sysdeps/m68k/fpu/bits/mathinline.h: Don't define log2 as inline. * sysdeps/m68k/fpu/mathimpl.h: Define __ieee754_log2 as inline. --- sysdeps/m68k/fpu/bits/mathinline.h | 2 -- sysdeps/m68k/fpu/mathimpl.h | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/fpu/bits/mathinline.h index 82446d27d9..cb59773f16 100644 --- a/sysdeps/m68k/fpu/bits/mathinline.h +++ b/sysdeps/m68k/fpu/bits/mathinline.h @@ -134,7 +134,6 @@ __inline_mathop(__significand, getman) #endif #ifdef __USE_ISOC99 -__inline_mathop(__log2, log2) __inline_mathop(__trunc, intrz) #endif @@ -157,7 +156,6 @@ __inline_mathop(significand, getman) # endif # ifdef __USE_ISOC99 -__inline_mathop(log2, log2) __inline_mathop(trunc, intrz) # endif diff --git a/sysdeps/m68k/fpu/mathimpl.h b/sysdeps/m68k/fpu/mathimpl.h index a2785b21b4..7fa8144118 100644 --- a/sysdeps/m68k/fpu/mathimpl.h +++ b/sysdeps/m68k/fpu/mathimpl.h @@ -29,6 +29,7 @@ __inline_mathop (__ieee754_exp, etox) __inline_mathop (__ieee754_exp2, twotox) __inline_mathop (__ieee754_exp10, tentox) __inline_mathop (__ieee754_log10, log10) +__inline_mathop (__ieee754_log2, log2) __inline_mathop (__ieee754_log, logn) __inline_mathop (__ieee754_sqrt, sqrt) __inline_mathop (__ieee754_atanh, atanh) From 69ab1cbb296811726bf82af3339a699d10650bc9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 19 Jun 2001 00:42:10 +0000 Subject: [PATCH 2617/4487] (elf_machine_rela): handle relocs at unaligned address. --- sysdeps/hppa/dl-machine.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h index 46163345fa..f0c1b13ef4 100644 --- a/sysdeps/hppa/dl-machine.h +++ b/sysdeps/hppa/dl-machine.h @@ -530,7 +530,16 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, if (map == &_dl_rtld_map) return; #endif - /* Otherwise, nothing more to do here. */ + /* .eh_frame can have unaligned relocs. */ + if (reloc_addr & 3) + { + char *rel_addr = (char *) reloc_addr; + rel_addr[0] = value >> 24; + rel_addr[1] = value >> 16; + rel_addr[2] = value >> 8; + rel_addr[3] = value; + return; + } break; case R_PARISC_PLABEL32: From 58e6e5bfc6735a4bfc53bd3af32de51bf41e9eb9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 20 Jun 2001 07:03:22 +0000 Subject: [PATCH 2618/4487] Added dl-support.c and dl-error.c. --- sysdeps/unix/sysv/aix/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/aix/Makefile b/sysdeps/unix/sysv/aix/Makefile index dc91f8f241..19ec885473 100644 --- a/sysdeps/unix/sysv/aix/Makefile +++ b/sysdeps/unix/sysv/aix/Makefile @@ -3,7 +3,10 @@ +postctor += /lib/syscalls.exp ifeq ($(subdir),misc) -sysdep_routines += dl-libc dl-open dl-sym dl-close uitrunc +sysdep_routines += dl-error dl-support dl-libc dl-open dl-sym \ + dl-close dl-addr uitrunc + +static-only-routines = gprsave0 gprrest0 gprsave1 gprrest1 fprsave fprrest endif ifeq ($(subdir),login) From ed556c3c9987244a8ff3d1236be6ba0e703d37a6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 20 Jun 2001 07:04:05 +0000 Subject: [PATCH 2619/4487] Removed #if 0. --- sysdeps/unix/sysv/aix/gettimeofday.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/aix/gettimeofday.c b/sysdeps/unix/sysv/aix/gettimeofday.c index 6b5bd48085..e85bd05f5e 100644 --- a/sysdeps/unix/sysv/aix/gettimeofday.c +++ b/sysdeps/unix/sysv/aix/gettimeofday.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 92, 94, 95, 96, 97 Free Software Foundation, Inc. +/* Copyright (C) 1991, 92, 94, 95, 96, 97, 2001 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 @@ -57,10 +57,9 @@ __gettimeofday (tv, tz) if (ts != tu) /* the lower reg to the upper */ tl = rtc_lower(); /* Recover from the race condition */ - tv->tv_sec = (long int) (tu + (double)tl/1000000000); + tv->tv_sec = (long int) (tu + (double)tl/1000000000); tv->tv_usec = (long int) ((double)tl/1000); -#if 0 if (tz != NULL) { const time_t timer = tv->tv_sec; @@ -86,7 +85,6 @@ __gettimeofday (tv, tz) if (tmp == NULL) return -1; } -#endif return 0; } From b9823d7f912e43f9ed064a3c72f997537e760aad Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 20 Jun 2001 07:04:35 +0000 Subject: [PATCH 2620/4487] Define __dso_handle if not ELF but shared. --- sysdeps/unix/sysv/aix/start.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/sysdeps/unix/sysv/aix/start.c b/sysdeps/unix/sysv/aix/start.c index d854a55f42..eee21966ef 100644 --- a/sysdeps/unix/sysv/aix/start.c +++ b/sysdeps/unix/sysv/aix/start.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 93, 1995-1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1991, 93, 1995-1998, 2000, 2001 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 @@ -32,6 +32,12 @@ typedef unsigned char uchar; /* sb in libc/posix/types.h */ /* The first piece of initialized data. */ int __data_start = 0; ++#ifndef HAVE_ELF +/* Since gcc/crtstuff.c won't define it unless the ELF format is used + we will need to define it here. */ +void *__dso_handle = NULL; +#endif + extern int errno; /* extern __pthread_init; */ @@ -108,12 +114,12 @@ asm(" #endif crt0_info.p_argc = (int*)&argc; -/* crt0_info.threads_init = (FPV) &__pthread_init; */ +/* crt0_info.threads_init = (FPV) &__pthread_init; */ /* * Do run-time linking, if enabled and call the init() * for all loaded modules. - */ + */ argc = modinit(argc,&crt0_info,module_count,text_origin,data_origin); errno=0; @@ -131,9 +137,9 @@ asm(" * int modinit(argc,crt0_info,module_count,text,data) * * argc - current value of argc. - * info - crt0 information passed + * info - crt0 information passed * module_count - number of modules loaded. - * text - Beginning of text address + * text - Beginning of text address * data - Beginning of data address */ @@ -287,4 +293,3 @@ __RTINIT *find_rtinit(caddr_t text_origin, caddr_t data_origin, int module_count (data_origin - data_sec_hdr->s_vaddr)); return(rtl); } - From 6fb75a646966108e851c7cc6b1443588d09e6b8b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 20 Jun 2001 07:05:44 +0000 Subject: [PATCH 2621/4487] _dl_addr implementation for AIX. --- sysdeps/unix/sysv/aix/dl-addr.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/dl-addr.c diff --git a/sysdeps/unix/sysv/aix/dl-addr.c b/sysdeps/unix/sysv/aix/dl-addr.c new file mode 100644 index 0000000000..928b76eda0 --- /dev/null +++ b/sysdeps/unix/sysv/aix/dl-addr.c @@ -0,0 +1,30 @@ +/* + Copyright (C) 1996, 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include + +int +internal_function +_dl_addr (const void *address, Dl_info *info) +{ + return 0; +} + From dc0664c1297cbf87b2be9ff3b57b9beae2e43d98 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 20 Jun 2001 07:06:11 +0000 Subject: [PATCH 2622/4487] _dl_error implementation for AIX. --- sysdeps/unix/sysv/aix/dl-error.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/dl-error.c diff --git a/sysdeps/unix/sysv/aix/dl-error.c b/sysdeps/unix/sysv/aix/dl-error.c new file mode 100644 index 0000000000..069596e323 --- /dev/null +++ b/sysdeps/unix/sysv/aix/dl-error.c @@ -0,0 +1,20 @@ +/* Copyright (C) 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + +#include From 68dbc1fdab716d68083c928d9951abc03e20ad9e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 20 Jun 2001 07:07:10 +0000 Subject: [PATCH 2623/4487] Various helper functions for dynamic loader code. --- sysdeps/unix/sysv/aix/dl-support.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/dl-support.c diff --git a/sysdeps/unix/sysv/aix/dl-support.c b/sysdeps/unix/sysv/aix/dl-support.c new file mode 100644 index 0000000000..a641370883 --- /dev/null +++ b/sysdeps/unix/sysv/aix/dl-support.c @@ -0,0 +1,20 @@ +/* Copyright (C) 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + +#include From 55f326305c8e8fe91c52d38857b5ffc025836cd4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 20 Jun 2001 07:07:41 +0000 Subject: [PATCH 2624/4487] setitimer implementation for AIX. --- sysdeps/unix/sysv/aix/setitimer.c | 68 +++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/setitimer.c diff --git a/sysdeps/unix/sysv/aix/setitimer.c b/sysdeps/unix/sysv/aix/setitimer.c new file mode 100644 index 0000000000..444900b99c --- /dev/null +++ b/sysdeps/unix/sysv/aix/setitimer.c @@ -0,0 +1,68 @@ +/* Copyright (C) 1991, 1994, 1995, 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include +#include +#include + +extern int __libc_nanosleep (const struct timespec *requested_time, + struct timespec *remaining); +int +__setitimer (which, new, old) + enum __itimer_which which; + const struct itimerval *new; + struct itimerval *old; +{ + if (new == NULL) + { + __set_errno (EINVAL); + return -1; + } + + switch (which) + { + default: + __set_errno (EINVAL); + return -1; + + case ITIMER_VIRTUAL: + case ITIMER_PROF: + __set_errno (ENOSYS); + return -1; + + case ITIMER_REAL: + break; + } + + switch (__fork()) + { + case -1: exit(-1); + case 0: + { + struct timespec ts ={tv_sec:(long int)new->it_value.tv_sec,tv_nsec:0}; + __libc_nanosleep(&ts,&ts); + __kill(getppid(), SIGALRM); + exit(0); + } + default: + } + return 0; +} +weak_alias (__setitimer, setitimer) From cc811924cdebd00f0ab1befc864e6d9ddecca96e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 20 Jun 2001 07:08:13 +0000 Subject: [PATCH 2625/4487] sleep implementation for AIX. --- sysdeps/unix/sysv/aix/sleep.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/sleep.c diff --git a/sysdeps/unix/sysv/aix/sleep.c b/sysdeps/unix/sysv/aix/sleep.c new file mode 100644 index 0000000000..3ac5952b3a --- /dev/null +++ b/sysdeps/unix/sysv/aix/sleep.c @@ -0,0 +1,34 @@ +/* Copyright (C) 1991, 1992, 1995, 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include + +extern int __libc_nanosleep (const struct timespec *requested_time, + struct timespec *remaining); + +unsigned int +__sleep (seconds) + unsigned int seconds; +{ + struct timespec ts ={tv_sec:(long int)seconds,tv_nsec:0}; + __libc_nanosleep(&ts,&ts); + return 0; +} +weak_alias (__sleep, sleep) From aa21e7c94ff32bff1d4e9373a13ca67bc6308002 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 20 Jun 2001 07:08:26 +0000 Subject: [PATCH 2626/4487] usleep implementation for AIX. --- sysdeps/unix/sysv/aix/usleep.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/usleep.c diff --git a/sysdeps/unix/sysv/aix/usleep.c b/sysdeps/unix/sysv/aix/usleep.c new file mode 100644 index 0000000000..19d57737bc --- /dev/null +++ b/sysdeps/unix/sysv/aix/usleep.c @@ -0,0 +1,34 @@ +/* Copyright (C) 1991, 1992, 1995, 1996, 1997 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include + +extern int __libc_nanosleep (const struct timespec *requested_time, + struct timespec *remaining); + +/* Sleep USECONDS microseconds, or until a previously set timer goes off. */ +int +usleep (useconds) + useconds_t useconds; +{ + struct timespec ts ={tv_sec:0,tv_nsec:(long int)useconds * 1000}; + __libc_nanosleep(&ts,&ts); + return 0; +} From 3553aef88614693e9f6ce50ba9e22ed3baa9941a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 20 Jun 2001 07:08:58 +0000 Subject: [PATCH 2627/4487] Register dump function implementation for AIX/PPC. --- sysdeps/unix/sysv/aix/powerpc/register-dump.h | 281 ++++++++++++++++++ 1 file changed, 281 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/powerpc/register-dump.h diff --git a/sysdeps/unix/sysv/aix/powerpc/register-dump.h b/sysdeps/unix/sysv/aix/powerpc/register-dump.h new file mode 100644 index 0000000000..3f308e6856 --- /dev/null +++ b/sysdeps/unix/sysv/aix/powerpc/register-dump.h @@ -0,0 +1,281 @@ +/* Dump registers. + Copyright (C) 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include + +/* We will print the register dump in this format: + +Register dump: +fp0-3: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 +fp4-7: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 +fp8-11: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 +fp12-15: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 +fp16-19: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 +fp20-23: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 +fp24-27: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 +fp28-31: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 + +r00-07 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 +r08-15 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 +r16-23 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 +r24-31 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 + + trap 00000000 iar 00000000 msr 00000000 cr 00000000 + lr 00000000 ctr 00000000 xer 00000000 mq 00000000 + tid 00000000 fpscr 00000000 + +*/ + + +static void +hexvalue (unsigned long int value, char *buf, size_t len) +{ + char *cp = _itoa_word (value, buf + len, 16, 0); + while (cp > buf) + *--cp = '0'; +} + + +static void +register_dump (int fd, struct sigcontext *ctx) +{ + char regs[108][8]; + struct iovec iov[38]; + struct __mstsafe *reg_state; + int i; + int ii; + size_t nr = 0; + +#define ADD_STRING(str) \ + iov[nr].iov_base = (char *) str; \ + iov[nr].iov_len = strlen (str); \ + ++nr +#define ADD_MEM(str, len) \ + iov[nr].iov_base = str; \ + iov[nr].iov_len = len; \ + ++nr + + reg_state = (struct __mstsafe *)&ctx->sc_jmpbuf.__jmp_context; + + hexvalue (reg_state->__excp_type, regs[0], 8); + hexvalue (reg_state->__iar, regs[1], 8); + hexvalue (reg_state->__msr, regs[2], 8); + hexvalue (reg_state->__cr, regs[3], 8); + hexvalue (reg_state->__lr, regs[4], 8); + hexvalue (reg_state->__ctr, regs[5], 8); + hexvalue (reg_state->__xer, regs[6], 8); + hexvalue (reg_state->__mq, regs[7], 8); + hexvalue (reg_state->__tid, regs[8], 8); + hexvalue (reg_state->__fpscr, regs[9], 8); + + ii=10; + for (i = 0; i <= 96; i++,ii++) + hexvalue (reg_state->__gpr[i], regs[ii], 8); + + /* Generate the output. */ + ADD_STRING ("Register dump:\n\nfp0-3: "); + ADD_MEM (regs[42], 8); + ADD_MEM (regs[43], 8); + ADD_STRING (" "); + ADD_MEM (regs[44], 8); + ADD_MEM (regs[45], 8); + ADD_STRING (" "); + ADD_MEM (regs[46], 8); + ADD_MEM (regs[47], 8); + ADD_STRING (" "); + ADD_MEM (regs[48], 8); + ADD_MEM (regs[49], 8); + ADD_STRING ("\nfp4-7: "); + ADD_MEM (regs[50], 8); + ADD_MEM (regs[51], 8); + ADD_STRING (" "); + ADD_MEM (regs[52], 8); + ADD_MEM (regs[53], 8); + ADD_STRING (" "); + ADD_MEM (regs[54], 8); + ADD_MEM (regs[55], 8); + ADD_STRING (" "); + ADD_MEM (regs[56], 8); + ADD_MEM (regs[57], 8); + ADD_STRING ("\nfp8-11: "); + ADD_MEM (regs[58], 8); + ADD_MEM (regs[59], 8); + ADD_STRING (" "); + ADD_MEM (regs[60], 8); + ADD_MEM (regs[61], 8); + ADD_STRING (" "); + ADD_MEM (regs[62], 8); + ADD_MEM (regs[63], 8); + ADD_STRING (" "); + ADD_MEM (regs[64], 8); + ADD_MEM (regs[65], 8); + ADD_STRING ("\nfp12-15: "); + ADD_MEM (regs[66], 8); + ADD_MEM (regs[67], 8); + ADD_STRING (" "); + ADD_MEM (regs[68], 8); + ADD_MEM (regs[69], 8); + ADD_STRING (" "); + ADD_MEM (regs[70], 8); + ADD_MEM (regs[71], 8); + ADD_STRING (" "); + ADD_MEM (regs[72], 8); + ADD_MEM (regs[73], 8); + ADD_STRING ("\nfp16-19: "); + ADD_MEM (regs[74], 8); + ADD_MEM (regs[75], 8); + ADD_STRING (" "); + ADD_MEM (regs[76], 8); + ADD_MEM (regs[78], 8); + ADD_STRING (" "); + ADD_MEM (regs[79], 8); + ADD_MEM (regs[80], 8); + ADD_STRING (" "); + ADD_MEM (regs[81], 8); + ADD_MEM (regs[82], 8); + ADD_STRING ("\nfp20-23: "); + ADD_MEM (regs[83], 8); + ADD_MEM (regs[84], 8); + ADD_STRING (" "); + ADD_MEM (regs[85], 8); + ADD_MEM (regs[86], 8); + ADD_STRING (" "); + ADD_MEM (regs[87], 8); + ADD_MEM (regs[88], 8); + ADD_STRING (" "); + ADD_MEM (regs[89], 8); + ADD_MEM (regs[90], 8); + ADD_STRING ("\nfp24-27: "); + ADD_MEM (regs[91], 8); + ADD_MEM (regs[92], 8); + ADD_STRING (" "); + ADD_MEM (regs[93], 8); + ADD_MEM (regs[94], 8); + ADD_STRING (" "); + ADD_MEM (regs[95], 8); + ADD_MEM (regs[96], 8); + ADD_STRING (" "); + ADD_MEM (regs[97], 8); + ADD_MEM (regs[98], 8); + ADD_STRING ("\nfp28-31: "); + ADD_MEM (regs[99], 8); + ADD_MEM (regs[100], 8); + ADD_STRING (" "); + ADD_MEM (regs[101], 8); + ADD_MEM (regs[102], 8); + ADD_STRING (" "); + ADD_MEM (regs[103], 8); + ADD_MEM (regs[104], 8); + ADD_STRING (" "); + ADD_MEM (regs[105], 8); + ADD_MEM (regs[106], 8); + ADD_STRING ("\n\nr00-07 "); + ADD_MEM (regs[10], 8); + ADD_STRING (" "); + ADD_MEM (regs[11], 8); + ADD_STRING (" "); + ADD_MEM (regs[12], 8); + ADD_STRING (" "); + ADD_MEM (regs[13], 8); + ADD_STRING (" "); + ADD_MEM (regs[14], 8); + ADD_STRING (" "); + ADD_MEM (regs[15], 8); + ADD_STRING (" "); + ADD_MEM (regs[16], 8); + ADD_STRING (" "); + ADD_MEM (regs[17], 8); + ADD_STRING ("\nr08-15 "); + ADD_MEM (regs[18], 8); + ADD_STRING (" "); + ADD_MEM (regs[19], 8); + ADD_STRING (" "); + ADD_MEM (regs[20], 8); + ADD_STRING (" "); + ADD_MEM (regs[21], 8); + ADD_STRING (" "); + ADD_MEM (regs[22], 8); + ADD_STRING (" "); + ADD_MEM (regs[23], 8); + ADD_STRING (" "); + ADD_MEM (regs[24], 8); + ADD_STRING (" "); + ADD_MEM (regs[25], 8); + ADD_STRING ("\nr16-23 "); + ADD_MEM (regs[26], 8); + ADD_STRING (" "); + ADD_MEM (regs[27], 8); + ADD_STRING (" "); + ADD_MEM (regs[28], 8); + ADD_STRING (" "); + ADD_MEM (regs[29], 8); + ADD_STRING (" "); + ADD_MEM (regs[30], 8); + ADD_STRING (" "); + ADD_MEM (regs[31], 8); + ADD_STRING (" "); + ADD_MEM (regs[32], 8); + ADD_STRING (" "); + ADD_MEM (regs[33], 8); + ADD_STRING ("\nr24-31 "); + ADD_MEM (regs[34], 8); + ADD_STRING (" "); + ADD_MEM (regs[35], 8); + ADD_STRING (" "); + ADD_MEM (regs[36], 8); + ADD_STRING (" "); + ADD_MEM (regs[37], 8); + ADD_STRING (" "); + ADD_MEM (regs[38], 8); + ADD_STRING (" "); + ADD_MEM (regs[39], 8); + ADD_STRING (" "); + ADD_MEM (regs[40], 8); + ADD_STRING (" "); + ADD_MEM (regs[41], 8); + ADD_STRING ("\n\n trap "); + ADD_MEM (regs[0], 8); + ADD_STRING (" iar "); + ADD_MEM (regs[1], 8); + ADD_STRING (" msr "); + ADD_MEM (regs[2], 8); + ADD_STRING (" cr "); + ADD_MEM (regs[3], 8); + ADD_STRING ("\n lr "); + ADD_MEM (regs[4], 8); + ADD_STRING (" ctr "); + ADD_MEM (regs[5], 8); + ADD_STRING (" xer "); + ADD_MEM (regs[6], 8); + ADD_STRING (" mq "); + ADD_MEM (regs[7], 8); + ADD_STRING ("\n tid "); + ADD_MEM (regs[8], 8); + ADD_STRING (" fpscr "); + ADD_MEM (regs[9], 8); + ADD_STRING ("\n"); + + /* Write the stuff out. */ + writev (fd, iov, nr); +} + +#define REGISTER_DUMP register_dump (fd, ctx) + From a5bebe4c22d9e992acaf844580148a217d4ab7d8 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 3 Jul 2001 16:50:33 +0000 Subject: [PATCH 2628/4487] Remove check for crypt add-on. --- sysdeps/unix/sysv/sysv4/solaris2/configure | 27 ------------------- sysdeps/unix/sysv/sysv4/solaris2/configure.in | 27 ------------------- 2 files changed, 54 deletions(-) diff --git a/sysdeps/unix/sysv/sysv4/solaris2/configure b/sysdeps/unix/sysv/sysv4/solaris2/configure index 9dc976812c..b5675df0bf 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/configure +++ b/sysdeps/unix/sysv/sysv4/solaris2/configure @@ -2,30 +2,3 @@ # Concensus on stdio is that it's broken. test $stdio = default && stdio=libio - -# Crypt is your friend. -case $add_ons in - *crypt*) - message= - ;; - *) - message="\ -*** WARNING: -*** Are you sure you do not want to use the \`crypt' add-on?" - ;; -esac - -if test "$message"; then - if test $enable_sanity = yes; then - echo "\ -*** You should not compile the GNU libc without the \`crypt' add-on. -*** Not using them risks to be incompatible with the libraries of -*** other systems. Consider getting the add-on and restart the -*** configuration. -*** If you reall mean to avoid this add-on run configure again, now -*** using the extra parameter \`--disable-sanity-checks'." - exit 1 - else - echo "$message" - fi -fi diff --git a/sysdeps/unix/sysv/sysv4/solaris2/configure.in b/sysdeps/unix/sysv/sysv4/solaris2/configure.in index 1c02fbb499..76f3109f71 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/configure.in +++ b/sysdeps/unix/sysv/sysv4/solaris2/configure.in @@ -4,30 +4,3 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. # Concensus on stdio is that it's broken. test $stdio = default && stdio=libio - -# Crypt is your friend. -case $add_ons in - *crypt*) - message= - ;; - *) - message="\ -*** WARNING: -*** Are you sure you do not want to use the \`crypt' add-on?" - ;; -esac - -if test "$message"; then - if test $enable_sanity = yes; then - echo "\ -*** You should not compile the GNU libc without the \`crypt' add-on. -*** Not using them risks to be incompatible with the libraries of -*** other systems. Consider getting the add-on and restart the -*** configuration. -*** If you reall mean to avoid this add-on run configure again, now -*** using the extra parameter \`--disable-sanity-checks'." - exit 1 - else - echo "$message" - fi -fi From 6fbcd2261e9bd5deee3d8b31f4d00412e0a5650e Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 5 Jul 2001 08:46:28 +0000 Subject: [PATCH 2629/4487] Synch with Linux 2.4.5: * sysdeps/unix/sysv/linux/sparc/bits/socket.h (PF_BLUETOOTH): New. (AF_BLUETOOTH): New. * sysdeps/unix/sysv/linux/s390/s390-64/bits/socket.h (PF_BLUETOOTH): New. (AF_BLUETOOTH): New. * sysdeps/unix/sysv/linux/mips/bits/socket.h (AF_BLUETOOTH): New. (PF_BLUETOOTH): New. * sysdeps/unix/sysv/linux/ia64/bits/socket.h (AF_BLUETOOTH): New. (PF_BLUETOOTH): New. * sysdeps/unix/sysv/linux/alpha/bits/socket.h (PF_BLUETOOTH): New. (AF_BLUETOOTH): New. * sysdeps/unix/sysv/linux/bits/socket.h (PF_BLUETOOTH): New. (AF_BLUETOOTH): New. * sysdeps/unix/sysv/linux/net/if_arp.h (ARPHRD_IEEE80211): New. * sysdeps/unix/sysv/linux/powerpc/bits/termios.h (N_HCI): New. * sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h (N_HCI): New. * sysdeps/unix/sysv/linux/bits/ioctl-types.h (N_HCI): New. --- sysdeps/unix/sysv/linux/alpha/bits/socket.h | 2 ++ sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h | 3 ++- sysdeps/unix/sysv/linux/mips/bits/socket.h | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/socket.h b/sysdeps/unix/sysv/linux/alpha/bits/socket.h index cf8e5a1b0a..a5c7e95d3c 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/socket.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/socket.h @@ -88,6 +88,7 @@ enum __socket_type #define PF_IRDA 23 /* IRDA sockets. */ #define PF_PPPOX 24 /* PPPoX sockets. */ #define PF_WANPIPE 25 /* Wanpipe API sockets. */ +#define PF_BLUETOOTH 31 /* Bluetooth sockets. */ #define PF_MAX 32 /* For now.. */ /* Address families. */ @@ -119,6 +120,7 @@ enum __socket_type #define AF_IRDA PF_IRDA #define AF_PPPOX PF_PPPOX #define AF_WANPIPE PF_WANPIPE +#define AF_BLUETOOTH PF_BLUETOOTH #define AF_MAX PF_MAX /* Socket level values. Others are defined in the appropriate headers. diff --git a/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h b/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h index 573f9e7ca3..e40a0ad96e 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h +++ b/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h @@ -1,5 +1,5 @@ /* Structure types for pre-termios terminal ioctls. Linux/MIPS version. - Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1997, 1999, 2000, 2001 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 @@ -73,3 +73,4 @@ struct termio #define N_SMSBLOCK 12 /* SMS block mode */ #define N_HDLC 13 /* synchronous HDLC */ #define N_SYNC_PPP 14 /* synchronous PPP */ +#define N_HCI 15 /* Bluetooth HCI UART */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h index eaf8ccc3d2..9e38d288b7 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/socket.h +++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h @@ -88,6 +88,7 @@ enum __socket_type #define PF_IRDA 23 /* IRDA sockets. */ #define PF_PPPOX 24 /* PPPoX sockets. */ #define PF_WANPIPE 25 /* Wanpipe API sockets. */ +#define PF_BLUETOOTH 31 /* Bluetooth sockets. */ #define PF_MAX 32 /* For now.. */ /* Address families. */ @@ -119,6 +120,7 @@ enum __socket_type #define AF_IRDA PF_IRDA #define AF_PPPOX PF_PPPOX #define AF_WANPIPE PF_WANPIPE +#define AF_BLUETOOTH PF_BLUETOOTH #define AF_MAX PF_MAX /* Socket level values. Others are defined in the appropriate headers. From 3214b89b3288616539a8d64fd3b03ad4e24ea19e Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 6 Jul 2001 04:56:23 +0000 Subject: [PATCH 2630/4487] Update to LGPL v2.1. --- bare/Makefile | 21 +++++------ sysdeps/alpha/Makefile | 16 ++++----- sysdeps/alpha/__longjmp.S | 16 ++++----- sysdeps/alpha/_mcount.S | 16 ++++----- sysdeps/alpha/alphaev6/fpu/e_sqrt.S | 17 +++++---- sysdeps/alpha/alphaev6/fpu/e_sqrtf.S | 17 +++++---- sysdeps/alpha/alphaev6/memchr.S | 16 ++++----- sysdeps/alpha/alphaev6/memcpy.S | 16 ++++----- sysdeps/alpha/alphaev6/memset.S | 17 +++++---- sysdeps/alpha/alphaev6/stxcpy.S | 17 +++++---- sysdeps/alpha/alphaev6/stxncpy.S | 17 +++++---- sysdeps/alpha/alphaev67/ffs.S | 16 ++++----- sysdeps/alpha/alphaev67/ffsll.S | 16 ++++----- sysdeps/alpha/alphaev67/rawmemchr.S | 17 +++++---- sysdeps/alpha/alphaev67/stpcpy.S | 16 ++++----- sysdeps/alpha/alphaev67/stpncpy.S | 17 +++++---- sysdeps/alpha/alphaev67/strcat.S | 17 +++++---- sysdeps/alpha/alphaev67/strchr.S | 17 +++++---- sysdeps/alpha/alphaev67/strlen.S | 17 +++++---- sysdeps/alpha/alphaev67/strncat.S | 17 +++++---- sysdeps/alpha/alphaev67/strrchr.S | 17 +++++---- sysdeps/alpha/atomicity.h | 16 ++++----- sysdeps/alpha/bb_init_func.S | 16 ++++----- sysdeps/alpha/bits/setjmp.h | 16 ++++----- sysdeps/alpha/bzero.S | 16 ++++----- sysdeps/alpha/div.S | 16 ++++----- sysdeps/alpha/divrem.h | 16 ++++----- sysdeps/alpha/dl-machine.h | 16 ++++----- sysdeps/alpha/elf/crtbegin.S | 17 ++++----- sysdeps/alpha/elf/crtend.S | 17 ++++----- sysdeps/alpha/elf/start.S | 16 ++++----- sysdeps/alpha/ffs.S | 16 ++++----- sysdeps/alpha/fpu/bits/fenv.h | 16 ++++----- sysdeps/alpha/fpu/bits/mathdef.h | 16 ++++----- sysdeps/alpha/fpu/bits/mathinline.h | 16 ++++----- sysdeps/alpha/fpu/e_sqrt.c | 17 +++++---- sysdeps/alpha/fpu/fclrexcpt.c | 16 ++++----- sysdeps/alpha/fpu/fedisblxcpt.c | 16 ++++----- sysdeps/alpha/fpu/feenablxcpt.c | 16 ++++----- sysdeps/alpha/fpu/fegetenv.c | 16 ++++----- sysdeps/alpha/fpu/fegetexcept.c | 16 ++++----- sysdeps/alpha/fpu/fegetround.c | 16 ++++----- sysdeps/alpha/fpu/feholdexcpt.c | 16 ++++----- sysdeps/alpha/fpu/fenv_libc.h | 16 ++++----- sysdeps/alpha/fpu/fesetenv.c | 16 ++++----- sysdeps/alpha/fpu/fesetround.c | 16 ++++----- sysdeps/alpha/fpu/feupdateenv.c | 16 ++++----- sysdeps/alpha/fpu/fgetexcptflg.c | 16 ++++----- sysdeps/alpha/fpu/fpu_control.h | 16 ++++----- sysdeps/alpha/fpu/fraiseexcpt.c | 16 ++++----- sysdeps/alpha/fpu/fsetexcptflg.c | 16 ++++----- sysdeps/alpha/fpu/ftestexcept.c | 16 ++++----- sysdeps/alpha/fpu/s_ceil.c | 16 ++++----- sysdeps/alpha/fpu/s_ceilf.c | 16 ++++----- sysdeps/alpha/fpu/s_copysign.c | 16 ++++----- sysdeps/alpha/fpu/s_copysignf.c | 16 ++++----- sysdeps/alpha/fpu/s_fabs.c | 16 ++++----- sysdeps/alpha/fpu/s_fabsf.c | 16 ++++----- sysdeps/alpha/fpu/s_floor.c | 16 ++++----- sysdeps/alpha/fpu/s_floorf.c | 16 ++++----- sysdeps/alpha/fpu/s_rint.c | 16 ++++----- sysdeps/alpha/fpu/s_rintf.c | 16 ++++----- sysdeps/alpha/htonl.S | 16 ++++----- sysdeps/alpha/htons.S | 16 ++++----- sysdeps/alpha/ldiv.S | 16 ++++----- sysdeps/alpha/machine-gmon.h | 16 ++++----- sysdeps/alpha/memchr.S | 16 ++++----- sysdeps/alpha/memset.S | 16 ++++----- sysdeps/alpha/memusage.h | 16 ++++----- sysdeps/alpha/nscd-types.h | 16 ++++----- sysdeps/alpha/rawmemchr.S | 16 ++++----- sysdeps/alpha/s_copysign.S | 16 ++++----- sysdeps/alpha/s_fabs.S | 16 ++++----- sysdeps/alpha/setjmp.S | 16 ++++----- sysdeps/alpha/stackinfo.h | 16 ++++----- sysdeps/alpha/stpcpy.S | 16 ++++----- sysdeps/alpha/stpncpy.S | 16 ++++----- sysdeps/alpha/strcat.S | 16 ++++----- sysdeps/alpha/strchr.S | 16 ++++----- sysdeps/alpha/strcmp.S | 16 ++++----- sysdeps/alpha/strcpy.S | 16 ++++----- sysdeps/alpha/strlen.S | 16 ++++----- sysdeps/alpha/strncat.S | 16 ++++----- sysdeps/alpha/strncmp.S | 16 ++++----- sysdeps/alpha/strncpy.S | 16 ++++----- sysdeps/alpha/strrchr.S | 16 ++++----- sysdeps/alpha/stxcpy.S | 16 ++++----- sysdeps/alpha/stxncpy.S | 16 ++++----- sysdeps/am29k/ffs.c | 16 ++++----- sysdeps/arm/__longjmp.S | 16 ++++----- sysdeps/arm/atomicity.h | 16 ++++----- sysdeps/arm/bits/huge_val.h | 16 ++++----- sysdeps/arm/bits/setjmp.h | 16 ++++----- sysdeps/arm/bits/string.h | 16 ++++----- sysdeps/arm/bsd-_setjmp.S | 16 ++++----- sysdeps/arm/bsd-setjmp.S | 16 ++++----- sysdeps/arm/dl-machine.h | 16 ++++----- sysdeps/arm/elf/start.S | 16 ++++----- sysdeps/arm/fpu/__longjmp.S | 16 ++++----- sysdeps/arm/fpu/bits/fenv.h | 16 ++++----- sysdeps/arm/fpu/bits/mathdef.h | 16 ++++----- sysdeps/arm/fpu/bits/setjmp.h | 16 ++++----- sysdeps/arm/fpu/fclrexcpt.c | 16 ++++----- sysdeps/arm/fpu/fedisblxcpt.c | 16 ++++----- sysdeps/arm/fpu/feenablxcpt.c | 16 ++++----- sysdeps/arm/fpu/fegetenv.c | 16 ++++----- sysdeps/arm/fpu/fegetexcept.c | 16 ++++----- sysdeps/arm/fpu/fegetround.c | 16 ++++----- sysdeps/arm/fpu/feholdexcpt.c | 16 ++++----- sysdeps/arm/fpu/fesetenv.c | 16 ++++----- sysdeps/arm/fpu/fesetround.c | 16 ++++----- sysdeps/arm/fpu/fpu_control.h | 16 ++++----- sysdeps/arm/fpu/fraiseexcpt.c | 16 ++++----- sysdeps/arm/fpu/fsetexcptflg.c | 16 ++++----- sysdeps/arm/fpu/ftestexcept.c | 16 ++++----- sysdeps/arm/fpu/setjmp.S | 16 ++++----- sysdeps/arm/frame.h | 16 ++++----- sysdeps/arm/ieee754.h | 16 ++++----- sysdeps/arm/init-first.c | 16 ++++----- sysdeps/arm/machine-gmon.h | 16 ++++----- sysdeps/arm/memset.S | 16 ++++----- sysdeps/arm/memusage.h | 16 ++++----- sysdeps/arm/setjmp.S | 16 ++++----- sysdeps/arm/stackinfo.h | 16 ++++----- sysdeps/arm/strlen.S | 16 ++++----- sysdeps/arm/sys/ucontext.h | 16 ++++----- sysdeps/arm/sysdep.h | 16 ++++----- sysdeps/cris/Makefile | 16 ++++----- sysdeps/cris/__longjmp.S | 16 ++++----- sysdeps/cris/_mcount.S | 16 ++++----- sysdeps/cris/bits/setjmp.h | 16 ++++----- sysdeps/cris/bits/string.h | 16 ++++----- sysdeps/cris/dl-machine.h | 16 ++++----- sysdeps/cris/elf/start.S | 16 ++++----- sysdeps/cris/machine-gmon.h | 16 ++++----- sysdeps/cris/memcopy.h | 16 ++++----- sysdeps/cris/memusage.h | 16 ++++----- sysdeps/cris/setjmp.S | 16 ++++----- sysdeps/cris/sysdep.h | 16 ++++----- sysdeps/hppa/Makefile | 16 ++++----- sysdeps/hppa/__longjmp.S | 16 ++++----- sysdeps/hppa/bits/setjmp.h | 16 ++++----- sysdeps/hppa/bsd-_setjmp.S | 16 ++++----- sysdeps/hppa/bsd-setjmp.S | 16 ++++----- sysdeps/hppa/dl-fptr.c | 16 ++++----- sysdeps/hppa/dl-lookupcfg.h | 16 ++++----- sysdeps/hppa/dl-machine.h | 16 ++++----- sysdeps/hppa/dl-symaddr.c | 16 ++++----- sysdeps/hppa/elf/initfini.c | 35 +++++++------------ sysdeps/hppa/fpu/bits/fenv.h | 16 ++++----- sysdeps/hppa/fpu/fclrexcpt.c | 16 ++++----- sysdeps/hppa/fpu/fedisblxcpt.c | 16 ++++----- sysdeps/hppa/fpu/feenablxcpt.c | 16 ++++----- sysdeps/hppa/fpu/fegetenv.c | 16 ++++----- sysdeps/hppa/fpu/fegetexcept.c | 16 ++++----- sysdeps/hppa/fpu/fegetround.c | 16 ++++----- sysdeps/hppa/fpu/feholdexcpt.c | 16 ++++----- sysdeps/hppa/fpu/fesetenv.c | 16 ++++----- sysdeps/hppa/fpu/fesetround.c | 16 ++++----- sysdeps/hppa/fpu/feupdateenv.c | 16 ++++----- sysdeps/hppa/fpu/fgetexcptflg.c | 16 ++++----- sysdeps/hppa/fpu/fraiseexcpt.c | 16 ++++----- sysdeps/hppa/fpu/fsetexcptflg.c | 16 ++++----- sysdeps/hppa/fpu/ftestexcept.c | 16 ++++----- sysdeps/hppa/frame.h | 16 ++++----- sysdeps/hppa/memusage.h | 16 ++++----- sysdeps/hppa/setjmp.S | 16 ++++----- sysdeps/hppa/stackinfo.h | 16 ++++----- sysdeps/hppa/sysdep.h | 16 ++++----- sysdeps/i860/memcopy.h | 16 ++++----- sysdeps/i960/ffs.c | 16 ++++----- sysdeps/m68k/Makefile | 16 ++++----- sysdeps/m68k/__longjmp.c | 16 ++++----- sysdeps/m68k/asm-syntax.h | 17 +++++---- sysdeps/m68k/bits/byteswap.h | 16 ++++----- sysdeps/m68k/bits/huge_val.h | 16 ++++----- sysdeps/m68k/bits/setjmp.h | 16 ++++----- sysdeps/m68k/bsd-_setjmp.S | 16 ++++----- sysdeps/m68k/bsd-setjmp.S | 16 ++++----- sysdeps/m68k/dl-machine.h | 16 ++++----- sysdeps/m68k/elf/start.S | 16 ++++----- sysdeps/m68k/ffs.c | 16 ++++----- sysdeps/m68k/fpu/bits/fenv.h | 16 ++++----- sysdeps/m68k/fpu/bits/mathdef.h | 16 ++++----- sysdeps/m68k/fpu/bits/mathinline.h | 16 ++++----- sysdeps/m68k/fpu/e_acos.c | 16 ++++----- sysdeps/m68k/fpu/e_atan2.c | 16 ++++----- sysdeps/m68k/fpu/e_fmod.c | 16 ++++----- sysdeps/m68k/fpu/e_pow.c | 16 ++++----- sysdeps/m68k/fpu/e_scalb.c | 16 ++++----- sysdeps/m68k/fpu/fclrexcpt.c | 16 ++++----- sysdeps/m68k/fpu/fedisblxcpt.c | 16 ++++----- sysdeps/m68k/fpu/feenablxcpt.c | 16 ++++----- sysdeps/m68k/fpu/fegetenv.c | 16 ++++----- sysdeps/m68k/fpu/fegetexcept.c | 16 ++++----- sysdeps/m68k/fpu/fegetround.c | 16 ++++----- sysdeps/m68k/fpu/feholdexcpt.c | 16 ++++----- sysdeps/m68k/fpu/fesetenv.c | 16 ++++----- sysdeps/m68k/fpu/fesetround.c | 16 ++++----- sysdeps/m68k/fpu/feupdateenv.c | 16 ++++----- sysdeps/m68k/fpu/fgetexcptflg.c | 16 ++++----- sysdeps/m68k/fpu/fraiseexcpt.c | 16 ++++----- sysdeps/m68k/fpu/fsetexcptflg.c | 16 ++++----- sysdeps/m68k/fpu/ftestexcept.c | 16 ++++----- sysdeps/m68k/fpu/k_cos.c | 16 ++++----- sysdeps/m68k/fpu/k_sin.c | 16 ++++----- sysdeps/m68k/fpu/k_tan.c | 16 ++++----- sysdeps/m68k/fpu/mathimpl.h | 16 ++++----- sysdeps/m68k/fpu/s_atan.c | 16 ++++----- sysdeps/m68k/fpu/s_ccos.c | 16 ++++----- sysdeps/m68k/fpu/s_ccosh.c | 16 ++++----- sysdeps/m68k/fpu/s_cexp.c | 16 ++++----- sysdeps/m68k/fpu/s_csin.c | 16 ++++----- sysdeps/m68k/fpu/s_csinh.c | 16 ++++----- sysdeps/m68k/fpu/s_fpclassifyl.c | 16 ++++----- sysdeps/m68k/fpu/s_frexp.c | 16 ++++----- sysdeps/m68k/fpu/s_ilogb.c | 16 ++++----- sysdeps/m68k/fpu/s_isinf.c | 16 ++++----- sysdeps/m68k/fpu/s_llrint.c | 16 ++++----- sysdeps/m68k/fpu/s_llrintf.c | 16 ++++----- sysdeps/m68k/fpu/s_llrintl.c | 16 ++++----- sysdeps/m68k/fpu/s_lrint.c | 16 ++++----- sysdeps/m68k/fpu/s_modf.c | 16 ++++----- sysdeps/m68k/fpu/s_remquo.c | 16 ++++----- sysdeps/m68k/fpu/s_scalbn.c | 16 ++++----- sysdeps/m68k/fpu/s_sincos.c | 16 ++++----- sysdeps/m68k/fpu/switch/68881-sw.h | 16 ++++----- sysdeps/m68k/fpu/switch/Makefile | 16 ++++----- sysdeps/m68k/fpu/switch/switch.c | 16 ++++----- sysdeps/m68k/fpu_control.h | 16 ++++----- sysdeps/m68k/m68020/atomicity.h | 17 +++++---- sysdeps/m68k/m68020/bits/string.h | 16 ++++----- sysdeps/m68k/memchr.S | 16 ++++----- sysdeps/m68k/memcopy.h | 16 ++++----- sysdeps/m68k/memusage.h | 16 ++++----- sysdeps/m68k/rawmemchr.S | 16 ++++----- sysdeps/m68k/s_isinfl.c | 16 ++++----- sysdeps/m68k/s_isnanl.c | 16 ++++----- sysdeps/m68k/setjmp.c | 16 ++++----- sysdeps/m68k/stackinfo.h | 16 ++++----- sysdeps/m68k/strchr.S | 16 ++++----- sysdeps/m68k/strchrnul.S | 16 ++++----- sysdeps/m68k/sys/ucontext.h | 16 ++++----- sysdeps/m68k/sysdep.h | 16 ++++----- sysdeps/m88k/ffs.c | 16 ++++----- sysdeps/mach/alpha/machine-lock.h | 16 ++++----- sysdeps/mach/alpha/machine-sp.h | 16 ++++----- sysdeps/mach/alpha/syscall.S | 16 ++++----- sysdeps/mach/alpha/sysdep.h | 16 ++++----- sysdeps/mach/alpha/thread_state.h | 16 ++++----- sysdeps/mach/hppa/machine-lock.h | 16 ++++----- sysdeps/mach/hurd/alpha/bits/sigcontext.h | 16 ++++----- sysdeps/mach/hurd/alpha/exc2signal.c | 16 ++++----- sysdeps/mach/hurd/alpha/longjmp-ts.c | 16 ++++----- sysdeps/mach/hurd/alpha/sigreturn.c | 16 ++++----- sysdeps/mach/hurd/alpha/trampoline.c | 16 ++++----- sysdeps/mach/hurd/hppa/bits/sigcontext.h | 16 ++++----- sysdeps/mach/hurd/hppa/trampoline.c | 16 ++++----- sysdeps/mach/hurd/mips/bits/sigcontext.h | 16 ++++----- sysdeps/mach/hurd/mips/dl-machine.c | 16 ++++----- sysdeps/mach/hurd/mips/exc2signal.c | 16 ++++----- sysdeps/mach/hurd/mips/init-fault.c | 16 ++++----- sysdeps/mach/hurd/mips/init-first.c | 16 ++++----- sysdeps/mach/hurd/mips/intr-msg.h | 16 ++++----- sysdeps/mach/hurd/mips/longjmp-ctx.c | 16 ++++----- sysdeps/mach/hurd/mips/longjmp-ts.c | 16 ++++----- sysdeps/mach/hurd/mips/sigreturn.c | 16 ++++----- sysdeps/mach/hurd/mips/trampoline.c | 16 ++++----- sysdeps/mach/mips/cacheflush.c | 16 ++++----- sysdeps/mach/mips/machine-lock.h | 16 ++++----- sysdeps/mach/mips/machine-sp.h | 16 ++++----- sysdeps/mach/mips/syscall.S | 16 ++++----- sysdeps/mach/mips/sysdep.h | 16 ++++----- sysdeps/mach/mips/thread_state.h | 16 ++++----- sysdeps/mips/__longjmp.c | 16 ++++----- sysdeps/mips/atomicity.h | 17 +++++---- sysdeps/mips/bits/dlfcn.h | 16 ++++----- sysdeps/mips/bits/fenv.h | 16 ++++----- sysdeps/mips/bits/setjmp.h | 17 ++++----- sysdeps/mips/bsd-_setjmp.S | 16 ++++----- sysdeps/mips/bsd-setjmp.S | 16 ++++----- sysdeps/mips/dl-dtprocnum.h | 16 ++++----- sysdeps/mips/dl-machine.h | 16 ++++----- sysdeps/mips/elf/ldsodefs.h | 16 ++++----- sysdeps/mips/elf/start.S | 16 ++++----- sysdeps/mips/fpregdef.h | 16 ++++----- sysdeps/mips/fpu/fclrexcpt.c | 16 ++++----- sysdeps/mips/fpu/fedisblxcpt.c | 16 ++++----- sysdeps/mips/fpu/feenablxcpt.c | 16 ++++----- sysdeps/mips/fpu/fegetenv.c | 16 ++++----- sysdeps/mips/fpu/fegetexcept.c | 16 ++++----- sysdeps/mips/fpu/fegetround.c | 16 ++++----- sysdeps/mips/fpu/feholdexcpt.c | 16 ++++----- sysdeps/mips/fpu/fenv_libc.h | 16 ++++----- sysdeps/mips/fpu/fesetenv.c | 16 ++++----- sysdeps/mips/fpu/fesetround.c | 16 ++++----- sysdeps/mips/fpu/feupdateenv.c | 16 ++++----- sysdeps/mips/fpu/fgetexcptflg.c | 16 ++++----- sysdeps/mips/fpu/fraiseexcpt.c | 16 ++++----- sysdeps/mips/fpu/ftestexcept.c | 16 ++++----- sysdeps/mips/fpu_control.h | 16 ++++----- sysdeps/mips/init-first.c | 16 ++++----- sysdeps/mips/machine-gmon.h | 16 ++++----- sysdeps/mips/memusage.h | 16 ++++----- sysdeps/mips/mips64/__longjmp.c | 16 ++++----- sysdeps/mips/mips64/bits/setjmp.h | 16 ++++----- sysdeps/mips/mips64/bsd-_setjmp.S | 16 ++++----- sysdeps/mips/mips64/bsd-setjmp.S | 16 ++++----- sysdeps/mips/mips64/dl-machine.h | 16 ++++----- sysdeps/mips/mips64/setjmp.S | 16 ++++----- sysdeps/mips/mips64/setjmp_aux.c | 16 ++++----- sysdeps/mips/regdef.h | 16 ++++----- sysdeps/mips/setjmp.S | 16 ++++----- sysdeps/mips/setjmp_aux.c | 16 ++++----- sysdeps/mips/sgidefs.h | 16 ++++----- sysdeps/mips/stackinfo.h | 16 ++++----- sysdeps/mips/sys/asm.h | 16 ++++----- sysdeps/mips/sys/fpregdef.h | 16 ++++----- sysdeps/mips/sys/regdef.h | 16 ++++----- sysdeps/mips/sys/ucontext.h | 16 ++++----- sysdeps/rs6000/ffs.c | 16 ++++----- sysdeps/rs6000/memcopy.h | 16 ++++----- sysdeps/standalone/arm/bits/errno.h | 16 ++++----- sysdeps/standalone/arm/sysdep.c | 16 ++++----- sysdeps/standalone/bits/errno.h | 16 ++++----- sysdeps/standalone/brk.c | 16 ++++----- sysdeps/standalone/close.c | 16 ++++----- sysdeps/standalone/dirstream.h | 16 ++++----- sysdeps/standalone/filedesc.h | 16 ++++----- sysdeps/standalone/i386/force_cpu386/Makefile | 16 ++++----- sysdeps/standalone/i386/force_cpu386/_exit.c | 16 ++++----- .../standalone/i386/force_cpu386/brdinit.c | 16 ++++----- .../standalone/i386/force_cpu386/console.c | 16 ++++----- .../standalone/i386/force_cpu386/strtsupp.S | 16 ++++----- .../standalone/i386/force_cpu386/target.ld | 16 ++++----- sysdeps/standalone/i386/i386.h | 16 ++++----- sysdeps/standalone/i386/start.S | 16 ++++----- sysdeps/standalone/i960/i960ca.h | 16 ++++----- sysdeps/standalone/i960/nindy960/Makefile | 16 ++++----- sysdeps/standalone/i960/nindy960/_exit.c | 16 ++++----- sysdeps/standalone/i960/nindy960/brdinit.c | 16 ++++----- sysdeps/standalone/i960/nindy960/console.c | 16 ++++----- sysdeps/standalone/i960/start.S | 16 ++++----- sysdeps/standalone/m68k/m68020/m68020.h | 16 ++++----- .../standalone/m68k/m68020/mvme136/Makefile | 16 ++++----- .../standalone/m68k/m68020/mvme136/_exit.c | 16 ++++----- .../standalone/m68k/m68020/mvme136/brdinit.c | 16 ++++----- .../standalone/m68k/m68020/mvme136/console.c | 16 ++++----- .../standalone/m68k/m68020/mvme136/mvme136.ld | 16 ++++----- sysdeps/standalone/m68k/m68020/start.S | 16 ++++----- sysdeps/standalone/open.c | 16 ++++----- sysdeps/standalone/read.c | 16 ++++----- sysdeps/standalone/standalone.h | 16 ++++----- sysdeps/standalone/write.c | 16 ++++----- sysdeps/unix/alpha/sysdep.S | 17 ++++----- sysdeps/unix/alpha/sysdep.h | 16 ++++----- sysdeps/unix/arm/brk.S | 16 ++++----- sysdeps/unix/arm/fork.S | 16 ++++----- sysdeps/unix/arm/start.c | 16 ++++----- sysdeps/unix/arm/sysdep.S | 16 ++++----- sysdeps/unix/arm/sysdep.h | 16 ++++----- sysdeps/unix/bsd/hp/m68k/brk.S | 16 ++++----- sysdeps/unix/bsd/hp/m68k/sysdep.h | 16 ++++----- sysdeps/unix/bsd/hp/m68k/vfork.S | 16 ++++----- sysdeps/unix/bsd/hp/m68k/wait3.S | 16 ++++----- sysdeps/unix/bsd/m68k/pipe.S | 16 ++++----- sysdeps/unix/bsd/m68k/syscall.S | 16 ++++----- sysdeps/unix/bsd/m68k/sysdep.S | 16 ++++----- sysdeps/unix/bsd/m68k/wait.S | 16 ++++----- sysdeps/unix/bsd/osf/alpha/bits/stat.h | 16 ++++----- sysdeps/unix/bsd/osf/alpha/brk.S | 16 ++++----- sysdeps/unix/bsd/osf/alpha/fork.S | 16 ++++----- sysdeps/unix/bsd/osf/alpha/killpg.S | 16 ++++----- sysdeps/unix/bsd/osf/alpha/pipe.S | 16 ++++----- sysdeps/unix/bsd/osf/alpha/recv.S | 16 ++++----- sysdeps/unix/bsd/osf/alpha/send.S | 16 ++++----- sysdeps/unix/bsd/osf/alpha/sigblock.S | 16 ++++----- sysdeps/unix/bsd/osf/alpha/sigpause.S | 16 ++++----- sysdeps/unix/bsd/osf/alpha/sigsetmask.S | 16 ++++----- sysdeps/unix/bsd/osf/alpha/sigvec.S | 16 ++++----- sysdeps/unix/bsd/osf/alpha/start.S | 16 ++++----- sysdeps/unix/bsd/osf/alpha/sysdep.h | 16 ++++----- sysdeps/unix/bsd/osf/alpha/vhangup.S | 16 ++++----- sysdeps/unix/bsd/osf/bits/mman.h | 16 ++++----- sysdeps/unix/bsd/osf/bits/sigaction.h | 16 ++++----- sysdeps/unix/bsd/sequent/i386/getgroups.S | 16 ++++----- sysdeps/unix/bsd/sequent/i386/sigvec.S | 16 ++++----- sysdeps/unix/bsd/sequent/i386/syscall.S | 16 ++++----- sysdeps/unix/bsd/sequent/i386/sysdep.h | 16 ++++----- sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h | 16 ++++----- sysdeps/unix/bsd/sun/bits/signum.h | 16 ++++----- sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h | 16 ++++----- sysdeps/unix/bsd/sun/m68k/brk.S | 16 ++++----- sysdeps/unix/bsd/sun/m68k/sethostid.S | 16 ++++----- sysdeps/unix/bsd/sun/m68k/sigtramp.c | 16 ++++----- sysdeps/unix/bsd/sun/m68k/syscall.S | 16 ++++----- sysdeps/unix/bsd/sun/m68k/sysdep.h | 16 ++++----- sysdeps/unix/bsd/sun/m68k/vfork.S | 16 ++++----- sysdeps/unix/bsd/sun/sigreturn.S | 16 ++++----- sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h | 16 ++++----- sysdeps/unix/bsd/sun/sparc/sethostid.S | 16 ++++----- sysdeps/unix/bsd/sun/sparc/sigtramp.c | 16 ++++----- sysdeps/unix/bsd/sun/sunos4/bits/fcntl.h | 16 ++++----- sysdeps/unix/bsd/sun/sunos4/bits/mman.h | 16 ++++----- sysdeps/unix/bsd/sun/sunos4/bits/resource.h | 16 ++++----- sysdeps/unix/bsd/sun/sunos4/bits/termios.h | 16 ++++----- sysdeps/unix/bsd/sun/sunos4/bits/utsname.h | 16 ++++----- sysdeps/unix/bsd/sun/sunos4/mmap.c | 16 ++++----- sysdeps/unix/bsd/sun/sunos4/speed.c | 16 ++++----- sysdeps/unix/bsd/sun/sunos4/tcflow.c | 16 ++++----- sysdeps/unix/bsd/sun/sunos4/tcflush.c | 16 ++++----- sysdeps/unix/bsd/sun/sunos4/tcgetattr.c | 16 ++++----- sysdeps/unix/bsd/sun/sunos4/tcsendbrk.c | 16 ++++----- sysdeps/unix/bsd/sun/sunos4/tcsetattr.c | 16 ++++----- sysdeps/unix/bsd/sun/sunos4/wait4.c | 16 ++++----- sysdeps/unix/bsd/ultrix4/bits/fcntl.h | 16 ++++----- sysdeps/unix/bsd/ultrix4/bits/mman.h | 16 ++++----- sysdeps/unix/bsd/ultrix4/bits/posix_opt.h | 16 ++++----- sysdeps/unix/bsd/ultrix4/bits/utsname.h | 16 ++++----- sysdeps/unix/bsd/ultrix4/mips/__handler.S | 16 ++++----- .../unix/bsd/ultrix4/mips/bits/sigcontext.h | 16 ++++----- sysdeps/unix/bsd/ultrix4/mips/sigvec.c | 16 ++++----- sysdeps/unix/bsd/ultrix4/mips/start.S | 16 ++++----- sysdeps/unix/bsd/ultrix4/mips/vfork.S | 16 ++++----- sysdeps/unix/bsd/ultrix4/sysconf.c | 16 ++++----- sysdeps/unix/bsd/ultrix4/wait3.S | 16 ++++----- sysdeps/unix/bsd/vax/brk.S | 16 ++++----- sysdeps/unix/bsd/vax/pipe.S | 16 ++++----- sysdeps/unix/bsd/vax/sysdep.S | 16 ++++----- sysdeps/unix/bsd/vax/sysdep.h | 16 ++++----- sysdeps/unix/bsd/vax/vfork.S | 16 ++++----- sysdeps/unix/bsd/vax/wait.S | 16 ++++----- sysdeps/unix/bsd/vax/wait3.S | 16 ++++----- sysdeps/unix/mips/brk.S | 16 ++++----- sysdeps/unix/mips/fork.S | 16 ++++----- sysdeps/unix/mips/pipe.S | 16 ++++----- sysdeps/unix/mips/sigreturn.S | 16 ++++----- sysdeps/unix/mips/sysdep.S | 16 ++++----- sysdeps/unix/mips/sysdep.h | 16 ++++----- sysdeps/unix/mips/wait.S | 16 ++++----- sysdeps/unix/sysv/aix/_exit.c | 16 ++++----- sysdeps/unix/sysv/aix/accept.c | 16 ++++----- sysdeps/unix/sysv/aix/access.c | 16 ++++----- sysdeps/unix/sysv/aix/bits/dirent.h | 16 ++++----- sysdeps/unix/sysv/aix/bits/dlfcn.h | 16 ++++----- sysdeps/unix/sysv/aix/bits/endian.h | 16 ++++----- sysdeps/unix/sysv/aix/bits/errno.h | 16 ++++----- sysdeps/unix/sysv/aix/bits/fcntl.h | 16 ++++----- sysdeps/unix/sysv/aix/bits/ioctl-types.h | 16 ++++----- sysdeps/unix/sysv/aix/bits/ioctls.h | 16 ++++----- sysdeps/unix/sysv/aix/bits/poll.h | 16 ++++----- sysdeps/unix/sysv/aix/bits/resource.h | 16 ++++----- sysdeps/unix/sysv/aix/bits/setjmp.h | 16 ++++----- sysdeps/unix/sysv/aix/bits/sigaction.h | 16 ++++----- sysdeps/unix/sysv/aix/bits/sigcontext.h | 16 ++++----- sysdeps/unix/sysv/aix/bits/signum.h | 16 ++++----- sysdeps/unix/sysv/aix/bits/sigset.h | 16 ++++----- sysdeps/unix/sysv/aix/bits/sigstack.h | 16 ++++----- sysdeps/unix/sysv/aix/bits/socket.h | 16 ++++----- sysdeps/unix/sysv/aix/bits/stat.h | 16 ++++----- sysdeps/unix/sysv/aix/bits/statfs.h | 16 ++++----- sysdeps/unix/sysv/aix/bits/termios.h | 16 ++++----- sysdeps/unix/sysv/aix/bits/types.h | 16 ++++----- sysdeps/unix/sysv/aix/bits/uio.h | 16 ++++----- sysdeps/unix/sysv/aix/bits/utmp.h | 16 ++++----- sysdeps/unix/sysv/aix/bits/utmpx.h | 17 ++++----- sysdeps/unix/sysv/aix/bits/utsname.h | 16 ++++----- sysdeps/unix/sysv/aix/brk.c | 16 ++++----- sysdeps/unix/sysv/aix/chdir.c | 16 ++++----- sysdeps/unix/sysv/aix/chmod.c | 16 ++++----- sysdeps/unix/sysv/aix/chown.c | 16 ++++----- sysdeps/unix/sysv/aix/close.c | 16 ++++----- sysdeps/unix/sysv/aix/dl-addr.c | 16 ++++----- sysdeps/unix/sysv/aix/dl-close.c | 16 ++++----- sysdeps/unix/sysv/aix/dl-error.c | 16 ++++----- sysdeps/unix/sysv/aix/dl-libc.c | 16 ++++----- sysdeps/unix/sysv/aix/dl-open.c | 16 ++++----- sysdeps/unix/sysv/aix/dl-support.c | 16 ++++----- sysdeps/unix/sysv/aix/dl-sym.c | 16 ++++----- sysdeps/unix/sysv/aix/dlldr.h | 17 +++++---- sysdeps/unix/sysv/aix/euidaccess.c | 16 ++++----- sysdeps/unix/sysv/aix/execve.c | 16 ++++----- sysdeps/unix/sysv/aix/fchdir.c | 16 ++++----- sysdeps/unix/sysv/aix/fchmod.c | 16 ++++----- sysdeps/unix/sysv/aix/fchown.c | 16 ++++----- sysdeps/unix/sysv/aix/fcntl.c | 16 ++++----- sysdeps/unix/sysv/aix/fdatasync.c | 16 ++++----- sysdeps/unix/sysv/aix/fork.c | 16 ++++----- sysdeps/unix/sysv/aix/fstatfs.c | 16 ++++----- sysdeps/unix/sysv/aix/fsync.c | 16 ++++----- sysdeps/unix/sysv/aix/ftruncate.c | 16 ++++----- sysdeps/unix/sysv/aix/ftruncate64.c | 16 ++++----- sysdeps/unix/sysv/aix/fxstat.c | 16 ++++----- sysdeps/unix/sysv/aix/fxstat64.c | 16 ++++----- sysdeps/unix/sysv/aix/getdents.c | 16 ++++----- sysdeps/unix/sysv/aix/getegid.c | 16 ++++----- sysdeps/unix/sysv/aix/geteuid.c | 16 ++++----- sysdeps/unix/sysv/aix/getgid.c | 16 ++++----- sysdeps/unix/sysv/aix/getgroups.c | 16 ++++----- sysdeps/unix/sysv/aix/gethostname.c | 16 ++++----- sysdeps/unix/sysv/aix/getpeername.c | 16 ++++----- sysdeps/unix/sysv/aix/getpgid.c | 16 ++++----- sysdeps/unix/sysv/aix/getrlimit.c | 16 ++++----- sysdeps/unix/sysv/aix/getrlimit64.c | 16 ++++----- sysdeps/unix/sysv/aix/getrusage.c | 16 ++++----- sysdeps/unix/sysv/aix/getsid.c | 16 ++++----- sysdeps/unix/sysv/aix/getsockname.c | 16 ++++----- sysdeps/unix/sysv/aix/gettimeofday.c | 16 ++++----- sysdeps/unix/sysv/aix/getuid.c | 16 ++++----- sysdeps/unix/sysv/aix/ioctl.c | 16 ++++----- sysdeps/unix/sysv/aix/kernel_proto.h | 16 ++++----- sysdeps/unix/sysv/aix/kill.c | 16 ++++----- sysdeps/unix/sysv/aix/lchown.c | 16 ++++----- sysdeps/unix/sysv/aix/link.c | 16 ++++----- sysdeps/unix/sysv/aix/lockf.c | 16 ++++----- sysdeps/unix/sysv/aix/lockf64.c | 16 ++++----- sysdeps/unix/sysv/aix/lseek64.c | 16 ++++----- sysdeps/unix/sysv/aix/lxstat.c | 16 ++++----- sysdeps/unix/sysv/aix/lxstat64.c | 16 ++++----- sysdeps/unix/sysv/aix/mkdir.c | 16 ++++----- sysdeps/unix/sysv/aix/mknod.c | 16 ++++----- sysdeps/unix/sysv/aix/mmap64.c | 16 ++++----- sysdeps/unix/sysv/aix/mprotect.c | 16 ++++----- sysdeps/unix/sysv/aix/nanosleep.c | 16 ++++----- sysdeps/unix/sysv/aix/net/if.h | 16 ++++----- sysdeps/unix/sysv/aix/open.c | 16 ++++----- sysdeps/unix/sysv/aix/pipe.c | 16 ++++----- sysdeps/unix/sysv/aix/poll.c | 16 ++++----- sysdeps/unix/sysv/aix/powerpc/memset.c | 16 ++++----- sysdeps/unix/sysv/aix/powerpc/register-dump.h | 16 ++++----- sysdeps/unix/sysv/aix/powerpc/s_lrint.c | 16 ++++----- sysdeps/unix/sysv/aix/pread.c | 16 ++++----- sysdeps/unix/sysv/aix/pread64.c | 16 ++++----- sysdeps/unix/sysv/aix/profil-counter.h | 16 ++++----- sysdeps/unix/sysv/aix/read.c | 16 ++++----- sysdeps/unix/sysv/aix/readv.c | 16 ++++----- sysdeps/unix/sysv/aix/recvfrom.c | 16 ++++----- sysdeps/unix/sysv/aix/recvmsg.c | 16 ++++----- sysdeps/unix/sysv/aix/revoke.c | 16 ++++----- sysdeps/unix/sysv/aix/rmdir.c | 16 ++++----- sysdeps/unix/sysv/aix/sbrk.c | 16 ++++----- sysdeps/unix/sysv/aix/sched_yield.c | 16 ++++----- sysdeps/unix/sysv/aix/select.c | 16 ++++----- sysdeps/unix/sysv/aix/sendmsg.c | 16 ++++----- sysdeps/unix/sysv/aix/setegid.c | 16 ++++----- sysdeps/unix/sysv/aix/seteuid.c | 16 ++++----- sysdeps/unix/sysv/aix/setgid.c | 16 ++++----- sysdeps/unix/sysv/aix/setitimer.c | 16 ++++----- sysdeps/unix/sysv/aix/setpgid.c | 16 ++++----- sysdeps/unix/sysv/aix/setregid.c | 16 ++++----- sysdeps/unix/sysv/aix/setreuid.c | 16 ++++----- sysdeps/unix/sysv/aix/setrlimit.c | 16 ++++----- sysdeps/unix/sysv/aix/setrlimit64.c | 16 ++++----- sysdeps/unix/sysv/aix/setsid.c | 16 ++++----- sysdeps/unix/sysv/aix/setuid.c | 16 ++++----- sysdeps/unix/sysv/aix/sigaction.c | 16 ++++----- sysdeps/unix/sysv/aix/sigpending.c | 16 ++++----- sysdeps/unix/sysv/aix/sigset-cvt-mask.h | 16 ++++----- sysdeps/unix/sysv/aix/sigsuspend.c | 16 ++++----- sysdeps/unix/sysv/aix/sleep.c | 16 ++++----- sysdeps/unix/sysv/aix/socket.c | 16 ++++----- sysdeps/unix/sysv/aix/socketpair.c | 16 ++++----- sysdeps/unix/sysv/aix/speed.c | 16 ++++----- sysdeps/unix/sysv/aix/start.c | 17 +++++---- sysdeps/unix/sysv/aix/statfs.c | 16 ++++----- sysdeps/unix/sysv/aix/symlink.c | 16 ++++----- sysdeps/unix/sysv/aix/sys/param.h | 16 ++++----- sysdeps/unix/sysv/aix/sys/ucontext.h | 16 ++++----- sysdeps/unix/sysv/aix/sysdep.h | 16 ++++----- sysdeps/unix/sysv/aix/tcgetattr.c | 16 ++++----- sysdeps/unix/sysv/aix/tcsetattr.c | 16 ++++----- sysdeps/unix/sysv/aix/times.c | 16 ++++----- sysdeps/unix/sysv/aix/truncate.c | 16 ++++----- sysdeps/unix/sysv/aix/truncate64.c | 16 ++++----- sysdeps/unix/sysv/aix/uitrunc.c | 16 ++++----- sysdeps/unix/sysv/aix/ulimit.c | 16 ++++----- sysdeps/unix/sysv/aix/umask.c | 16 ++++----- sysdeps/unix/sysv/aix/unlink.c | 16 ++++----- sysdeps/unix/sysv/aix/usleep.c | 16 ++++----- sysdeps/unix/sysv/aix/utimes.c | 16 ++++----- sysdeps/unix/sysv/aix/utmpx.h | 16 ++++----- sysdeps/unix/sysv/aix/wait3.c | 16 ++++----- sysdeps/unix/sysv/aix/wait4.c | 16 ++++----- sysdeps/unix/sysv/aix/waitid.c | 16 ++++----- sysdeps/unix/sysv/aix/waitpid.c | 16 ++++----- sysdeps/unix/sysv/aix/write.c | 16 ++++----- sysdeps/unix/sysv/aix/writev.c | 16 ++++----- sysdeps/unix/sysv/aix/xstat.c | 16 ++++----- sysdeps/unix/sysv/aix/xstat64.c | 16 ++++----- sysdeps/unix/sysv/hpux/bits/errno.h | 16 ++++----- sysdeps/unix/sysv/hpux/bits/stat.h | 16 ++++----- sysdeps/unix/sysv/hpux/bits/types.h | 16 ++++----- sysdeps/unix/sysv/hpux/sysdep.h | 16 ++++----- sysdeps/unix/sysv/i386/signal.S | 16 ++++----- sysdeps/unix/sysv/i386/sigreturn.S | 16 ++++----- sysdeps/unix/sysv/irix4/Makefile | 16 ++++----- sysdeps/unix/sysv/irix4/__handler.S | 16 ++++----- sysdeps/unix/sysv/irix4/bits/confname.h | 16 ++++----- sysdeps/unix/sysv/irix4/bits/fcntl.h | 16 ++++----- sysdeps/unix/sysv/irix4/bits/mman.h | 16 ++++----- sysdeps/unix/sysv/irix4/bits/signum.h | 17 ++++----- sysdeps/unix/sysv/irix4/bits/stat.h | 16 ++++----- sysdeps/unix/sysv/irix4/fpathconf.c | 16 ++++----- sysdeps/unix/sysv/irix4/getgroups.c | 16 ++++----- sysdeps/unix/sysv/irix4/getpriority.c | 16 ++++----- sysdeps/unix/sysv/irix4/getrusage.c | 16 ++++----- sysdeps/unix/sysv/irix4/pathconf.c | 16 ++++----- sysdeps/unix/sysv/irix4/setgroups.c | 16 ++++----- sysdeps/unix/sysv/irix4/setpriority.c | 16 ++++----- sysdeps/unix/sysv/irix4/sigreturn.S | 16 ++++----- sysdeps/unix/sysv/irix4/sigtramp.c | 16 ++++----- sysdeps/unix/sysv/irix4/start.c | 16 ++++----- sysdeps/unix/sysv/irix4/sysconf.c | 16 ++++----- sysdeps/unix/sysv/irix4/uname.S | 16 ++++----- sysdeps/unix/sysv/irix4/wait.S | 16 ++++----- sysdeps/unix/sysv/linux/alpha/adjtime.c | 16 ++++----- sysdeps/unix/sysv/linux/alpha/bits/dirent.h | 16 ++++----- sysdeps/unix/sysv/linux/alpha/bits/fcntl.h | 16 ++++----- sysdeps/unix/sysv/linux/alpha/bits/ioctls.h | 16 ++++----- sysdeps/unix/sysv/linux/alpha/bits/ipc.h | 16 ++++----- sysdeps/unix/sysv/linux/alpha/bits/mman.h | 16 ++++----- sysdeps/unix/sysv/linux/alpha/bits/msq.h | 16 ++++----- sysdeps/unix/sysv/linux/alpha/bits/netdb.h | 22 ++++++------ sysdeps/unix/sysv/linux/alpha/bits/resource.h | 16 ++++----- sysdeps/unix/sysv/linux/alpha/bits/sem.h | 16 ++++----- sysdeps/unix/sysv/linux/alpha/bits/shm.h | 16 ++++----- .../unix/sysv/linux/alpha/bits/sigaction.h | 16 ++++----- sysdeps/unix/sysv/linux/alpha/bits/siginfo.h | 16 ++++----- sysdeps/unix/sysv/linux/alpha/bits/signum.h | 16 ++++----- sysdeps/unix/sysv/linux/alpha/bits/sigstack.h | 16 ++++----- sysdeps/unix/sysv/linux/alpha/bits/socket.h | 16 ++++----- sysdeps/unix/sysv/linux/alpha/bits/stat.h | 16 ++++----- sysdeps/unix/sysv/linux/alpha/bits/statvfs.h | 16 ++++----- sysdeps/unix/sysv/linux/alpha/bits/termios.h | 16 ++++----- sysdeps/unix/sysv/linux/alpha/bits/time.h | 16 ++++----- sysdeps/unix/sysv/linux/alpha/bits/types.h | 16 ++++----- sysdeps/unix/sysv/linux/alpha/brk.S | 16 ++++----- sysdeps/unix/sysv/linux/alpha/clone.S | 16 ++++----- sysdeps/unix/sysv/linux/alpha/fpathconf.c | 16 ++++----- sysdeps/unix/sysv/linux/alpha/getitimer.S | 16 ++++----- sysdeps/unix/sysv/linux/alpha/getrusage.S | 16 ++++----- sysdeps/unix/sysv/linux/alpha/getsysstats.c | 16 ++++----- sysdeps/unix/sysv/linux/alpha/gettimeofday.S | 16 ++++----- sysdeps/unix/sysv/linux/alpha/glob.c | 21 +++++------ .../sysv/linux/alpha/ieee_get_fp_control.S | 16 ++++----- .../sysv/linux/alpha/ieee_set_fp_control.S | 16 ++++----- sysdeps/unix/sysv/linux/alpha/ioperm.c | 16 ++++----- sysdeps/unix/sysv/linux/alpha/ipc_priv.h | 16 ++++----- .../unix/sysv/linux/alpha/kernel_termios.h | 16 ++++----- sysdeps/unix/sysv/linux/alpha/msgctl.c | 16 ++++----- sysdeps/unix/sysv/linux/alpha/net/route.h | 16 ++++----- sysdeps/unix/sysv/linux/alpha/oldglob.c | 21 +++++------ sysdeps/unix/sysv/linux/alpha/pathconf.c | 16 ++++----- sysdeps/unix/sysv/linux/alpha/pipe.S | 16 ++++----- sysdeps/unix/sysv/linux/alpha/rt_sigaction.S | 16 ++++----- sysdeps/unix/sysv/linux/alpha/select.S | 16 ++++----- sysdeps/unix/sysv/linux/alpha/semctl.c | 16 ++++----- sysdeps/unix/sysv/linux/alpha/setfpucw.c | 16 ++++----- sysdeps/unix/sysv/linux/alpha/setitimer.S | 16 ++++----- sysdeps/unix/sysv/linux/alpha/settimeofday.S | 16 ++++----- sysdeps/unix/sysv/linux/alpha/shmctl.c | 16 ++++----- .../unix/sysv/linux/alpha/sigcontextinfo.h | 16 ++++----- sysdeps/unix/sysv/linux/alpha/sigprocmask.c | 16 ++++----- sysdeps/unix/sysv/linux/alpha/sigsuspend.S | 16 ++++----- sysdeps/unix/sysv/linux/alpha/sizes.h | 16 ++++----- sysdeps/unix/sysv/linux/alpha/sys/acct.h | 16 ++++----- sysdeps/unix/sysv/linux/alpha/sys/io.h | 16 ++++----- sysdeps/unix/sysv/linux/alpha/sys/procfs.h | 16 ++++----- sysdeps/unix/sysv/linux/alpha/sys/sysmacros.h | 16 ++++----- sysdeps/unix/sysv/linux/alpha/sys/ucontext.h | 16 ++++----- sysdeps/unix/sysv/linux/alpha/sys/user.h | 16 ++++----- sysdeps/unix/sysv/linux/alpha/syscall.S | 16 ++++----- sysdeps/unix/sysv/linux/alpha/sysdep.h | 16 ++++----- sysdeps/unix/sysv/linux/alpha/ustat.c | 16 ++++----- sysdeps/unix/sysv/linux/alpha/utimes.S | 16 ++++----- sysdeps/unix/sysv/linux/alpha/wait4.S | 16 ++++----- sysdeps/unix/sysv/linux/alpha/wordexp.c | 16 ++++----- sysdeps/unix/sysv/linux/alpha/xmknod.c | 16 ++++----- sysdeps/unix/sysv/linux/alpha/xstatconv.c | 16 ++++----- sysdeps/unix/sysv/linux/arm/bits/armsigctx.h | 16 ++++----- sysdeps/unix/sysv/linux/arm/bits/fcntl.h | 18 +++++----- sysdeps/unix/sysv/linux/arm/bits/mman.h | 16 ++++----- sysdeps/unix/sysv/linux/arm/bits/resource.h | 16 ++++----- sysdeps/unix/sysv/linux/arm/brk.c | 16 ++++----- sysdeps/unix/sysv/linux/arm/clone.S | 16 ++++----- sysdeps/unix/sysv/linux/arm/dl-procinfo.c | 16 ++++----- sysdeps/unix/sysv/linux/arm/dl-procinfo.h | 16 ++++----- sysdeps/unix/sysv/linux/arm/errlist.c | 16 ++++----- sysdeps/unix/sysv/linux/arm/ioperm.c | 16 ++++----- sysdeps/unix/sysv/linux/arm/mmap.S | 16 ++++----- sysdeps/unix/sysv/linux/arm/mmap64.S | 16 ++++----- sysdeps/unix/sysv/linux/arm/profil-counter.h | 16 ++++----- sysdeps/unix/sysv/linux/arm/register-dump.h | 16 ++++----- sysdeps/unix/sysv/linux/arm/sigaction.c | 16 ++++----- sysdeps/unix/sysv/linux/arm/sigcontextinfo.h | 16 ++++----- sysdeps/unix/sysv/linux/arm/siglist.c | 16 ++++----- sysdeps/unix/sysv/linux/arm/sigrestorer.S | 16 ++++----- sysdeps/unix/sysv/linux/arm/socket.S | 16 ++++----- sysdeps/unix/sysv/linux/arm/sys/elf.h | 16 ++++----- sysdeps/unix/sysv/linux/arm/sys/io.h | 16 ++++----- sysdeps/unix/sysv/linux/arm/sys/procfs.h | 16 ++++----- sysdeps/unix/sysv/linux/arm/sys/ucontext.h | 16 ++++----- sysdeps/unix/sysv/linux/arm/sys/user.h | 16 ++++----- sysdeps/unix/sysv/linux/arm/sysdep.S | 16 ++++----- sysdeps/unix/sysv/linux/arm/sysdep.h | 16 ++++----- sysdeps/unix/sysv/linux/arm/vfork.S | 16 ++++----- sysdeps/unix/sysv/linux/cris/bits/fcntl.h | 18 +++++----- sysdeps/unix/sysv/linux/cris/bits/mman.h | 16 ++++----- sysdeps/unix/sysv/linux/cris/bits/resource.h | 16 ++++----- sysdeps/unix/sysv/linux/cris/brk.c | 16 ++++----- sysdeps/unix/sysv/linux/cris/clone.S | 16 ++++----- sysdeps/unix/sysv/linux/cris/mmap.S | 16 ++++----- sysdeps/unix/sysv/linux/cris/mmap64.S | 16 ++++----- sysdeps/unix/sysv/linux/cris/profil-counter.h | 16 ++++----- sysdeps/unix/sysv/linux/cris/register-dump.h | 16 ++++----- sysdeps/unix/sysv/linux/cris/socket.S | 16 ++++----- sysdeps/unix/sysv/linux/cris/sys/ucontext.h | 16 ++++----- sysdeps/unix/sysv/linux/cris/syscall.S | 16 ++++----- sysdeps/unix/sysv/linux/cris/sysdep.S | 16 ++++----- sysdeps/unix/sysv/linux/cris/sysdep.h | 16 ++++----- sysdeps/unix/sysv/linux/cris/vfork.S | 16 ++++----- sysdeps/unix/sysv/linux/hppa/bits/errno.h | 16 ++++----- sysdeps/unix/sysv/linux/hppa/bits/fcntl.h | 16 ++++----- sysdeps/unix/sysv/linux/hppa/bits/ioctls.h | 16 ++++----- sysdeps/unix/sysv/linux/hppa/bits/resource.h | 16 ++++----- sysdeps/unix/sysv/linux/hppa/bits/sigaction.h | 16 ++++----- sysdeps/unix/sysv/linux/hppa/bits/signum.h | 16 ++++----- sysdeps/unix/sysv/linux/hppa/brk.c | 16 ++++----- sysdeps/unix/sysv/linux/hppa/clone.S | 16 ++++----- sysdeps/unix/sysv/linux/hppa/mmap.c | 16 ++++----- sysdeps/unix/sysv/linux/hppa/sys/procfs.h | 16 ++++----- sysdeps/unix/sysv/linux/hppa/sys/ucontext.h | 16 ++++----- sysdeps/unix/sysv/linux/hppa/syscall.S | 16 ++++----- sysdeps/unix/sysv/linux/hppa/sysdep.c | 16 ++++----- sysdeps/unix/sysv/linux/hppa/sysdep.h | 16 ++++----- sysdeps/unix/sysv/linux/hppa/umount.c | 16 ++++----- sysdeps/unix/sysv/linux/m68k/bits/fcntl.h | 18 +++++----- sysdeps/unix/sysv/linux/m68k/bits/mman.h | 16 ++++----- sysdeps/unix/sysv/linux/m68k/bits/poll.h | 16 ++++----- sysdeps/unix/sysv/linux/m68k/bits/stat.h | 16 ++++----- sysdeps/unix/sysv/linux/m68k/brk.c | 16 ++++----- sysdeps/unix/sysv/linux/m68k/chown.c | 16 ++++----- sysdeps/unix/sysv/linux/m68k/clone.S | 17 ++++----- sysdeps/unix/sysv/linux/m68k/getpagesize.c | 16 ++++----- sysdeps/unix/sysv/linux/m68k/mmap.S | 16 ++++----- sysdeps/unix/sysv/linux/m68k/mremap.S | 16 ++++----- sysdeps/unix/sysv/linux/m68k/register-dump.h | 16 ++++----- sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h | 16 ++++----- sysdeps/unix/sysv/linux/m68k/socket.S | 16 ++++----- sysdeps/unix/sysv/linux/m68k/sys/reg.h | 16 ++++----- sysdeps/unix/sysv/linux/m68k/syscall.S | 16 ++++----- sysdeps/unix/sysv/linux/m68k/sysdep.S | 16 ++++----- sysdeps/unix/sysv/linux/m68k/sysdep.h | 16 ++++----- sysdeps/unix/sysv/linux/m68k/vfork.S | 16 ++++----- sysdeps/unix/sysv/linux/mips/_test_and_set.c | 16 ++++----- sysdeps/unix/sysv/linux/mips/bits/errno.h | 16 ++++----- sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 18 +++++----- .../unix/sysv/linux/mips/bits/ioctl-types.h | 16 ++++----- sysdeps/unix/sysv/linux/mips/bits/ipc.h | 18 +++++----- sysdeps/unix/sysv/linux/mips/bits/mman.h | 16 ++++----- sysdeps/unix/sysv/linux/mips/bits/poll.h | 16 ++++----- sysdeps/unix/sysv/linux/mips/bits/resource.h | 16 ++++----- sysdeps/unix/sysv/linux/mips/bits/sem.h | 16 ++++----- sysdeps/unix/sysv/linux/mips/bits/shm.h | 16 ++++----- sysdeps/unix/sysv/linux/mips/bits/sigaction.h | 16 ++++----- sysdeps/unix/sysv/linux/mips/bits/siginfo.h | 16 ++++----- sysdeps/unix/sysv/linux/mips/bits/signum.h | 16 ++++----- sysdeps/unix/sysv/linux/mips/bits/sigstack.h | 16 ++++----- sysdeps/unix/sysv/linux/mips/bits/socket.h | 16 ++++----- sysdeps/unix/sysv/linux/mips/bits/stat.h | 16 ++++----- sysdeps/unix/sysv/linux/mips/bits/statfs.h | 16 ++++----- sysdeps/unix/sysv/linux/mips/bits/termios.h | 16 ++++----- sysdeps/unix/sysv/linux/mips/bits/types.h | 16 ++++----- sysdeps/unix/sysv/linux/mips/brk.c | 16 ++++----- sysdeps/unix/sysv/linux/mips/clone.S | 16 ++++----- sysdeps/unix/sysv/linux/mips/ftruncate64.c | 16 ++++----- sysdeps/unix/sysv/linux/mips/getsysstats.c | 16 ++++----- sysdeps/unix/sysv/linux/mips/kernel_termios.h | 18 +++++----- sysdeps/unix/sysv/linux/mips/pread.c | 16 ++++----- sysdeps/unix/sysv/linux/mips/pread64.c | 16 ++++----- sysdeps/unix/sysv/linux/mips/pwrite.c | 16 ++++----- sysdeps/unix/sysv/linux/mips/pwrite64.c | 16 ++++----- sysdeps/unix/sysv/linux/mips/register-dump.h | 16 ++++----- sysdeps/unix/sysv/linux/mips/sigaction.c | 18 +++++----- sysdeps/unix/sysv/linux/mips/sigcontextinfo.h | 16 ++++----- sysdeps/unix/sysv/linux/mips/sys/cachectl.h | 16 ++++----- sysdeps/unix/sysv/linux/mips/sys/procfs.h | 16 ++++----- sysdeps/unix/sysv/linux/mips/sys/sysmips.h | 16 ++++----- sysdeps/unix/sysv/linux/mips/sys/tas.h | 16 ++++----- sysdeps/unix/sysv/linux/mips/sys/ucontext.h | 16 ++++----- sysdeps/unix/sysv/linux/mips/sysdep.S | 16 ++++----- sysdeps/unix/sysv/linux/mips/sysdep.h | 16 ++++----- sysdeps/unix/sysv/linux/mips/truncate64.c | 16 ++++----- sysdeps/unix/sysv/linux/mips/ustat.c | 16 ++++----- sysdeps/unix/sysv/linux/mips/xmknod.c | 16 ++++----- sysdeps/unix/sysv/linux/mips/xstatconv.c | 16 ++++----- sysdeps/unix/sysv/minix/bits/sigaction.h | 16 ++++----- sysdeps/unix/sysv/sco3.2.4/__setpgid.c | 16 ++++----- sysdeps/unix/sysv/sco3.2.4/bits/confname.h | 16 ++++----- sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h | 16 ++++----- sysdeps/unix/sysv/sco3.2.4/getgroups.c | 16 ++++----- sysdeps/unix/sysv/sco3.2.4/sigaction.S | 16 ++++----- sysdeps/unix/sysv/sco3.2.4/sys/syscall.h | 16 ++++----- sysdeps/unix/sysv/sco3.2.4/sysconf.S | 16 ++++----- sysdeps/unix/sysv/sco3.2.4/uname.S | 16 ++++----- sysdeps/unix/sysv/sco3.2.4/waitpid.S | 16 ++++----- sysdeps/unix/sysv/sco3.2/Makefile | 16 ++++----- sysdeps/unix/sysv/sco3.2/bits/local_lim.h | 16 ++++----- sysdeps/unix/sysv/sysv4/Makefile | 16 ++++----- sysdeps/unix/sysv/sysv4/__getpgid.c | 16 ++++----- sysdeps/unix/sysv/sysv4/__setpgid.c | 16 ++++----- sysdeps/unix/sysv/sysv4/bits/sigaction.h | 16 ++++----- sysdeps/unix/sysv/sysv4/bits/signum.h | 16 ++++----- sysdeps/unix/sysv/sysv4/bits/sigset.h | 16 ++++----- sysdeps/unix/sysv/sysv4/bits/utsname.h | 16 ++++----- sysdeps/unix/sysv/sysv4/bits/waitflags.h | 16 ++++----- sysdeps/unix/sysv/sysv4/ftruncate.c | 16 ++++----- sysdeps/unix/sysv/sysv4/gethostname.c | 16 ++++----- sysdeps/unix/sysv/sysv4/getpgid.c | 16 ++++----- sysdeps/unix/sysv/sysv4/i386/bits/stat.h | 16 ++++----- sysdeps/unix/sysv/sysv4/i386/sys-sig.S | 16 ++++----- sysdeps/unix/sysv/sysv4/i386/sysdep.h | 16 ++++----- sysdeps/unix/sysv/sysv4/sethostname.c | 16 ++++----- sysdeps/unix/sysv/sysv4/setpgid.c | 16 ++++----- sysdeps/unix/sysv/sysv4/setsid.c | 16 ++++----- sysdeps/unix/sysv/sysv4/sigaction.c | 16 ++++----- sysdeps/unix/sysv/sysv4/siginfo.h | 16 ++++----- sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h | 16 ++++----- .../unix/sysv/sysv4/solaris2/bits/dirent.h | 16 ++++----- sysdeps/unix/sysv/sysv4/solaris2/bits/errno.h | 16 ++++----- .../unix/sysv/sysv4/solaris2/bits/signum.h | 16 ++++----- .../unix/sysv/sysv4/solaris2/bits/sigstack.h | 16 ++++----- sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h | 16 ++++----- sysdeps/unix/sysv/sysv4/solaris2/bits/types.h | 16 ++++----- sysdeps/unix/sysv/sysv4/solaris2/fsync.S | 16 ++++----- sysdeps/unix/sysv/sysv4/solaris2/getdents.c | 16 ++++----- sysdeps/unix/sysv/sysv4/solaris2/sigpending.c | 16 ++++----- .../sysv4/solaris2/sparc/bits/sigcontext.h | 16 ++++----- .../unix/sysv/sysv4/solaris2/sparc/errlist.c | 16 ++++----- .../unix/sysv/sysv4/solaris2/sparc/sys/trap.h | 16 ++++----- .../sysv/sysv4/solaris2/sparc/sys/ucontext.h | 16 ++++----- .../unix/sysv/sysv4/solaris2/sparc/sysdep.S | 16 ++++----- .../unix/sysv/sysv4/solaris2/sparc/sysdep.h | 16 ++++----- sysdeps/unix/sysv/sysv4/solaris2/sys/param.h | 16 ++++----- .../unix/sysv/sysv4/solaris2/sys/syscall.h | 16 ++++----- sysdeps/unix/sysv/sysv4/sysconf.c | 16 ++++----- sysdeps/unix/sysv/sysv4/sysconfig.h | 16 ++++----- sysdeps/unix/sysv/sysv4/waitpid.c | 16 ++++----- sysdeps/vax/Makefile | 16 ++++----- sysdeps/vax/__longjmp.c | 18 +++++----- sysdeps/vax/bits/huge_val.h | 16 ++++----- sysdeps/vax/bsd-_setjmp.S | 16 ++++----- sysdeps/vax/bsd-setjmp.S | 16 ++++----- sysdeps/vax/fl.h | 16 ++++----- sysdeps/vax/memccpy.c | 16 ++++----- sysdeps/vax/setjmp.c | 16 ++++----- 856 files changed, 6881 insertions(+), 6896 deletions(-) diff --git a/bare/Makefile b/bare/Makefile index 0407c230de..ddfa6ac5e9 100644 --- a/bare/Makefile +++ b/bare/Makefile @@ -3,20 +3,21 @@ # Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), # On-Line Applications Research Corporation. # + # 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 -# published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version. -# +# 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 -# Library General Public License for more details. -# -# You should have received a copy of the GNU Library General Public -# License along with the GNU C Library; see the file COPYING.LIB. If not, -# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. +# 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. subdir := bare diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile index 63c7d4bba0..49659844aa 100644 --- a/sysdeps/alpha/Makefile +++ b/sysdeps/alpha/Makefile @@ -3,19 +3,19 @@ # Contributed by Brendan Kehoe (brendan@zen.org). # 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 published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. +# 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 -# Library General Public License for more details. +# Lesser General Public License for more details. -# You should have received a copy of the GNU Library General Public -# License along with the GNU C Library; see the file COPYING.LIB. If not, -# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. +# 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. ifeq ($(subdir),db2) CPPFLAGS += -DHAVE_SPINLOCKS=1 -DHAVE_ASSEM_ALPHA=1 diff --git a/sysdeps/alpha/__longjmp.S b/sysdeps/alpha/__longjmp.S index 7b639f5155..40d50312a3 100644 --- a/sysdeps/alpha/__longjmp.S +++ b/sysdeps/alpha/__longjmp.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #define __ASSEMBLY__ diff --git a/sysdeps/alpha/_mcount.S b/sysdeps/alpha/_mcount.S index 615f43938d..c4c921b4f7 100644 --- a/sysdeps/alpha/_mcount.S +++ b/sysdeps/alpha/_mcount.S @@ -4,19 +4,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Assembly stub to invoke _mcount(). Compiler generated code calls this stub after executing a function's prologue and without saving any diff --git a/sysdeps/alpha/alphaev6/fpu/e_sqrt.S b/sysdeps/alpha/alphaev6/fpu/e_sqrt.S index 5bf040a216..64a08826f6 100644 --- a/sysdeps/alpha/alphaev6/fpu/e_sqrt.S +++ b/sysdeps/alpha/alphaev6/fpu/e_sqrt.S @@ -1,21 +1,20 @@ /* Copyright (C) 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 - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/alpha/alphaev6/fpu/e_sqrtf.S b/sysdeps/alpha/alphaev6/fpu/e_sqrtf.S index 410aff4287..3500e832c1 100644 --- a/sysdeps/alpha/alphaev6/fpu/e_sqrtf.S +++ b/sysdeps/alpha/alphaev6/fpu/e_sqrtf.S @@ -1,21 +1,20 @@ /* Copyright (C) 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 - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/alpha/alphaev6/memchr.S b/sysdeps/alpha/alphaev6/memchr.S index 0dfcbea76a..05e00dd9b5 100644 --- a/sysdeps/alpha/alphaev6/memchr.S +++ b/sysdeps/alpha/alphaev6/memchr.S @@ -4,19 +4,19 @@ EV6 optimized by Rick Gorton . 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/alpha/alphaev6/memcpy.S b/sysdeps/alpha/alphaev6/memcpy.S index e3af259f8c..5e59a04ff1 100644 --- a/sysdeps/alpha/alphaev6/memcpy.S +++ b/sysdeps/alpha/alphaev6/memcpy.S @@ -3,19 +3,19 @@ EV6 optimized by Rick Gorton . 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* * Much of the information about 21264 scheduling/coding comes from: diff --git a/sysdeps/alpha/alphaev6/memset.S b/sysdeps/alpha/alphaev6/memset.S index 363b3a588b..e700d3dc9f 100644 --- a/sysdeps/alpha/alphaev6/memset.S +++ b/sysdeps/alpha/alphaev6/memset.S @@ -1,23 +1,22 @@ /* Copyright (C) 2000 Free Software Foundation, Inc. Contributed by Richard Henderson (rth@tamu.edu) EV6 optimized by Rick Gorton . - 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/alpha/alphaev6/stxcpy.S b/sysdeps/alpha/alphaev6/stxcpy.S index 39d731d8e2..3c3e7d72bf 100644 --- a/sysdeps/alpha/alphaev6/stxcpy.S +++ b/sysdeps/alpha/alphaev6/stxcpy.S @@ -1,23 +1,22 @@ /* Copyright (C) 2000 Free Software Foundation, Inc. Contributed by Richard Henderson (rth@tamu.edu) EV6 optimized by Rick Gorton . - 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Copy a null-terminated string from SRC to DST. diff --git a/sysdeps/alpha/alphaev6/stxncpy.S b/sysdeps/alpha/alphaev6/stxncpy.S index 140279106a..21e94ba7e2 100644 --- a/sysdeps/alpha/alphaev6/stxncpy.S +++ b/sysdeps/alpha/alphaev6/stxncpy.S @@ -1,23 +1,22 @@ /* Copyright (C) 2000 Free Software Foundation, Inc. Contributed by Richard Henderson (rth@tamu.edu) EV6 optimized by Rick Gorton . - 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Copy no more than COUNT bytes of the null-terminated string from SRC to DST. diff --git a/sysdeps/alpha/alphaev67/ffs.S b/sysdeps/alpha/alphaev67/ffs.S index a6e887766d..6d87008988 100644 --- a/sysdeps/alpha/alphaev67/ffs.S +++ b/sysdeps/alpha/alphaev67/ffs.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Finds the first bit set in an integer. */ diff --git a/sysdeps/alpha/alphaev67/ffsll.S b/sysdeps/alpha/alphaev67/ffsll.S index b7556496a3..72ef094189 100644 --- a/sysdeps/alpha/alphaev67/ffsll.S +++ b/sysdeps/alpha/alphaev67/ffsll.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Finds the first bit set in a long. */ diff --git a/sysdeps/alpha/alphaev67/rawmemchr.S b/sysdeps/alpha/alphaev67/rawmemchr.S index 6626ecc892..0d60afe023 100644 --- a/sysdeps/alpha/alphaev67/rawmemchr.S +++ b/sysdeps/alpha/alphaev67/rawmemchr.S @@ -1,21 +1,20 @@ /* Copyright (C) 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 - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Return pointer to first occurrence of CH in STR. */ diff --git a/sysdeps/alpha/alphaev67/stpcpy.S b/sysdeps/alpha/alphaev67/stpcpy.S index 6dcb36659a..bb9da0c73d 100644 --- a/sysdeps/alpha/alphaev67/stpcpy.S +++ b/sysdeps/alpha/alphaev67/stpcpy.S @@ -3,19 +3,19 @@ Contributed by Richard Henderson . 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Copy SRC to DEST returning the address of the terminating 0 in DEST. */ diff --git a/sysdeps/alpha/alphaev67/stpncpy.S b/sysdeps/alpha/alphaev67/stpncpy.S index d648b4db8b..4b23731b8a 100644 --- a/sysdeps/alpha/alphaev67/stpncpy.S +++ b/sysdeps/alpha/alphaev67/stpncpy.S @@ -1,22 +1,21 @@ /* Copyright (C) 2000 Free Software Foundation, Inc. Contributed by Richard Henderson (rth@redhat.com) - 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Copy no more then N bytes from SRC to DEST, returning the address of the terminating '\0' in DEST. */ diff --git a/sysdeps/alpha/alphaev67/strcat.S b/sysdeps/alpha/alphaev67/strcat.S index 88e48cec71..3bd4789f74 100644 --- a/sysdeps/alpha/alphaev67/strcat.S +++ b/sysdeps/alpha/alphaev67/strcat.S @@ -1,23 +1,22 @@ /* Copyright (C) 2000 Free Software Foundation, Inc. Contributed by Richard Henderson , 1996. EV67 optimized by Rick Gorton . - 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Append a null-terminated string from SRC to DST. */ diff --git a/sysdeps/alpha/alphaev67/strchr.S b/sysdeps/alpha/alphaev67/strchr.S index 3ab26556cd..9c1e88b8d3 100644 --- a/sysdeps/alpha/alphaev67/strchr.S +++ b/sysdeps/alpha/alphaev67/strchr.S @@ -1,23 +1,22 @@ /* Copyright (C) 2000 Free Software Foundation, Inc. Contributed by Richard Henderson , 1996. EV67 optimized by Rick Gorton . - 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Return the address of a given character within a null-terminated string, or null if it is not found. */ diff --git a/sysdeps/alpha/alphaev67/strlen.S b/sysdeps/alpha/alphaev67/strlen.S index ac8740fb09..bbe7cfc24d 100644 --- a/sysdeps/alpha/alphaev67/strlen.S +++ b/sysdeps/alpha/alphaev67/strlen.S @@ -1,23 +1,22 @@ /* Copyright (C) 2000 Free Software Foundation, Inc. Contributed by David Mosberger (davidm@cs.arizona.edu). EV67 optimized by Rick Gorton . - 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Finds length of a 0-terminated string. */ diff --git a/sysdeps/alpha/alphaev67/strncat.S b/sysdeps/alpha/alphaev67/strncat.S index 4e16f83824..ae3257ca42 100644 --- a/sysdeps/alpha/alphaev67/strncat.S +++ b/sysdeps/alpha/alphaev67/strncat.S @@ -1,23 +1,22 @@ /* Copyright (C) 2000, 2001 Free Software Foundation, Inc. Contributed by Richard Henderson , 1996. EV67 optimized by Rick Gorton . - 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Append no more than COUNT characters from the null-terminated string SRC to the null-terminated string DST. Always null-terminate the new DST. */ diff --git a/sysdeps/alpha/alphaev67/strrchr.S b/sysdeps/alpha/alphaev67/strrchr.S index 68874c966e..cb51d2140c 100644 --- a/sysdeps/alpha/alphaev67/strrchr.S +++ b/sysdeps/alpha/alphaev67/strrchr.S @@ -1,22 +1,21 @@ /* Copyright (C) 2000 Free Software Foundation, Inc. EV67 optimized by Rick Gorton . - 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Return the address of the last occurrence of a given character within a null-terminated string, or null if it is not found. */ diff --git a/sysdeps/alpha/atomicity.h b/sysdeps/alpha/atomicity.h index 6ed2ee61ed..9388f2384a 100644 --- a/sysdeps/alpha/atomicity.h +++ b/sysdeps/alpha/atomicity.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _ATOMICITY_H #define _ATOMICITY_H 1 diff --git a/sysdeps/alpha/bb_init_func.S b/sysdeps/alpha/bb_init_func.S index 779cd25a16..f711c8cb74 100644 --- a/sysdeps/alpha/bb_init_func.S +++ b/sysdeps/alpha/bb_init_func.S @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* __bb_init_func is invoked at the beginning of each function, before any registers have been saved. It is therefore safe to use any diff --git a/sysdeps/alpha/bits/setjmp.h b/sysdeps/alpha/bits/setjmp.h index a15ab31b47..fcd57d61d1 100644 --- a/sysdeps/alpha/bits/setjmp.h +++ b/sysdeps/alpha/bits/setjmp.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SETJMP_H # error "Never include directly; use instead." diff --git a/sysdeps/alpha/bzero.S b/sysdeps/alpha/bzero.S index a2aa3a5213..87e575babb 100644 --- a/sysdeps/alpha/bzero.S +++ b/sysdeps/alpha/bzero.S @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Fill a block of memory with zeros. Optimized for the Alpha architecture: diff --git a/sysdeps/alpha/div.S b/sysdeps/alpha/div.S index 6a5c4429e8..2bc3d56a11 100644 --- a/sysdeps/alpha/div.S +++ b/sysdeps/alpha/div.S @@ -3,19 +3,19 @@ Contributed by Richard Henderson . 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/alpha/divrem.h b/sysdeps/alpha/divrem.h index 881b324a61..9e0d591111 100644 --- a/sysdeps/alpha/divrem.h +++ b/sysdeps/alpha/divrem.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* The current Alpha chips don't provide hardware for integer division. The C compiler expects the functions diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 5a17ca230d..1634e96950 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -4,19 +4,19 @@ Contributed by Richard Henderson . 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* This was written in the absence of an ABI -- don't expect it to remain unchanged. */ diff --git a/sysdeps/alpha/elf/crtbegin.S b/sysdeps/alpha/elf/crtbegin.S index 25ddaafd6e..08f6c04f0a 100644 --- a/sysdeps/alpha/elf/crtbegin.S +++ b/sysdeps/alpha/elf/crtbegin.S @@ -1,20 +1,21 @@ /* Copyright (C) 1996 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Richard Henderson (rth@tamu.edu) 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If - not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + 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. */ /* diff --git a/sysdeps/alpha/elf/crtend.S b/sysdeps/alpha/elf/crtend.S index 198aba8a5b..576b8689e2 100644 --- a/sysdeps/alpha/elf/crtend.S +++ b/sysdeps/alpha/elf/crtend.S @@ -1,20 +1,21 @@ /* Copyright (C) 1996 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Richard Henderson (rth@tamu.edu) 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If - not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + 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. */ /* diff --git a/sysdeps/alpha/elf/start.S b/sysdeps/alpha/elf/start.S index 54eaab6353..b0cf119feb 100644 --- a/sysdeps/alpha/elf/start.S +++ b/sysdeps/alpha/elf/start.S @@ -4,19 +4,19 @@ Contributed by Richard Henderson 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/alpha/ffs.S b/sysdeps/alpha/ffs.S index 91cce4182b..c73d822841 100644 --- a/sysdeps/alpha/ffs.S +++ b/sysdeps/alpha/ffs.S @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Finds the first bit set in an integer. Optimized for the Alpha architecture. */ diff --git a/sysdeps/alpha/fpu/bits/fenv.h b/sysdeps/alpha/fpu/bits/fenv.h index fe6c253f25..a9e89b498e 100644 --- a/sysdeps/alpha/fpu/bits/fenv.h +++ b/sysdeps/alpha/fpu/bits/fenv.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _FENV_H # error "Never use directly; include instead." diff --git a/sysdeps/alpha/fpu/bits/mathdef.h b/sysdeps/alpha/fpu/bits/mathdef.h index 2750af8cd8..5e962c8d31 100644 --- a/sysdeps/alpha/fpu/bits/mathdef.h +++ b/sysdeps/alpha/fpu/bits/mathdef.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #if !defined _MATH_H && !defined _COMPLEX_H # error "Never use directly; include instead" diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h index b7d5c3c95e..3fb6ec2f24 100644 --- a/sysdeps/alpha/fpu/bits/mathinline.h +++ b/sysdeps/alpha/fpu/bits/mathinline.h @@ -4,19 +4,19 @@ Contributed by David Mosberger-Tang. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _MATH_H # error "Never use directly; include instead." diff --git a/sysdeps/alpha/fpu/e_sqrt.c b/sysdeps/alpha/fpu/e_sqrt.c index 295a1c3692..a74e353a1e 100644 --- a/sysdeps/alpha/fpu/e_sqrt.c +++ b/sysdeps/alpha/fpu/e_sqrt.c @@ -1,22 +1,21 @@ /* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. Contributed by David Mosberger (davidm@cs.arizona.edu). - 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #if !defined(_IEEE_FP_INEXACT) diff --git a/sysdeps/alpha/fpu/fclrexcpt.c b/sysdeps/alpha/fpu/fclrexcpt.c index 7777416911..b7176e0979 100644 --- a/sysdeps/alpha/fpu/fclrexcpt.c +++ b/sysdeps/alpha/fpu/fclrexcpt.c @@ -4,19 +4,19 @@ Contributed by Richard Henderson , 1997. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/alpha/fpu/fedisblxcpt.c b/sysdeps/alpha/fpu/fedisblxcpt.c index 7359e144b7..98c33ca842 100644 --- a/sysdeps/alpha/fpu/fedisblxcpt.c +++ b/sysdeps/alpha/fpu/fedisblxcpt.c @@ -4,19 +4,19 @@ Contributed by Jakub Jelinek , 2000. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/alpha/fpu/feenablxcpt.c b/sysdeps/alpha/fpu/feenablxcpt.c index b36e84680c..80d657e4bd 100644 --- a/sysdeps/alpha/fpu/feenablxcpt.c +++ b/sysdeps/alpha/fpu/feenablxcpt.c @@ -4,19 +4,19 @@ Contributed by Jakub Jelinek , 2000. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/alpha/fpu/fegetenv.c b/sysdeps/alpha/fpu/fegetenv.c index c96674fd90..c1950fa3b9 100644 --- a/sysdeps/alpha/fpu/fegetenv.c +++ b/sysdeps/alpha/fpu/fegetenv.c @@ -4,19 +4,19 @@ Contributed by Richard Henderson , 1997 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/alpha/fpu/fegetexcept.c b/sysdeps/alpha/fpu/fegetexcept.c index c0de38f8aa..ccc79e405d 100644 --- a/sysdeps/alpha/fpu/fegetexcept.c +++ b/sysdeps/alpha/fpu/fegetexcept.c @@ -4,19 +4,19 @@ Contributed by Jakub Jelinek , 2000. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/alpha/fpu/fegetround.c b/sysdeps/alpha/fpu/fegetround.c index f64fee7def..995aee80da 100644 --- a/sysdeps/alpha/fpu/fegetround.c +++ b/sysdeps/alpha/fpu/fegetround.c @@ -4,19 +4,19 @@ Contributed by Richard Henderson , 1997 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/alpha/fpu/feholdexcpt.c b/sysdeps/alpha/fpu/feholdexcpt.c index d683a37bdc..77d4cc1180 100644 --- a/sysdeps/alpha/fpu/feholdexcpt.c +++ b/sysdeps/alpha/fpu/feholdexcpt.c @@ -4,19 +4,19 @@ Contributed by Richard Henderson , 1997 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/alpha/fpu/fenv_libc.h b/sysdeps/alpha/fpu/fenv_libc.h index 7c58be50eb..f1d187d9e2 100644 --- a/sysdeps/alpha/fpu/fenv_libc.h +++ b/sysdeps/alpha/fpu/fenv_libc.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _FENV_LIBC_H #define _FENV_LIBC_H 1 diff --git a/sysdeps/alpha/fpu/fesetenv.c b/sysdeps/alpha/fpu/fesetenv.c index 45d25bb2af..63b724065a 100644 --- a/sysdeps/alpha/fpu/fesetenv.c +++ b/sysdeps/alpha/fpu/fesetenv.c @@ -4,19 +4,19 @@ Contributed by Richard Henderson , 1997 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/alpha/fpu/fesetround.c b/sysdeps/alpha/fpu/fesetround.c index 42a8b62f49..c4dc196016 100644 --- a/sysdeps/alpha/fpu/fesetround.c +++ b/sysdeps/alpha/fpu/fesetround.c @@ -4,19 +4,19 @@ Contributed by Richard Henderson , 1997 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/alpha/fpu/feupdateenv.c b/sysdeps/alpha/fpu/feupdateenv.c index 69044066eb..c798070bbb 100644 --- a/sysdeps/alpha/fpu/feupdateenv.c +++ b/sysdeps/alpha/fpu/feupdateenv.c @@ -4,19 +4,19 @@ Contributed by Richard Henderson , 1997. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/alpha/fpu/fgetexcptflg.c b/sysdeps/alpha/fpu/fgetexcptflg.c index f85d7a2a92..c28e913359 100644 --- a/sysdeps/alpha/fpu/fgetexcptflg.c +++ b/sysdeps/alpha/fpu/fgetexcptflg.c @@ -4,19 +4,19 @@ Contributed by Richard Henderson , 1997. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/alpha/fpu/fpu_control.h b/sysdeps/alpha/fpu/fpu_control.h index a2cf936cd2..f2214cb3ae 100644 --- a/sysdeps/alpha/fpu/fpu_control.h +++ b/sysdeps/alpha/fpu/fpu_control.h @@ -4,19 +4,19 @@ Contributed by Olaf Flebbe. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _ALPHA_FPU_CONTROL_H #define _ALPHA_FPU_CONTROL_H diff --git a/sysdeps/alpha/fpu/fraiseexcpt.c b/sysdeps/alpha/fpu/fraiseexcpt.c index 3e8ce76a58..7f18f3969f 100644 --- a/sysdeps/alpha/fpu/fraiseexcpt.c +++ b/sysdeps/alpha/fpu/fraiseexcpt.c @@ -4,19 +4,19 @@ Contributed by Richard Henderson , 1997. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/alpha/fpu/fsetexcptflg.c b/sysdeps/alpha/fpu/fsetexcptflg.c index 25f5138db3..d198731861 100644 --- a/sysdeps/alpha/fpu/fsetexcptflg.c +++ b/sysdeps/alpha/fpu/fsetexcptflg.c @@ -4,19 +4,19 @@ Contributed by Richard Henderson , 1997. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/alpha/fpu/ftestexcept.c b/sysdeps/alpha/fpu/ftestexcept.c index 9c006de79e..a4b3081875 100644 --- a/sysdeps/alpha/fpu/ftestexcept.c +++ b/sysdeps/alpha/fpu/ftestexcept.c @@ -4,19 +4,19 @@ Contributed by Richard Henderson , 1997. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/alpha/fpu/s_ceil.c b/sysdeps/alpha/fpu/s_ceil.c index f30db008ce..a7a46bb2b4 100644 --- a/sysdeps/alpha/fpu/s_ceil.c +++ b/sysdeps/alpha/fpu/s_ceil.c @@ -3,19 +3,19 @@ Contributed by Richard Henderson. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/alpha/fpu/s_ceilf.c b/sysdeps/alpha/fpu/s_ceilf.c index 35c51a2766..aba1697a55 100644 --- a/sysdeps/alpha/fpu/s_ceilf.c +++ b/sysdeps/alpha/fpu/s_ceilf.c @@ -3,19 +3,19 @@ Contributed by Richard Henderson. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/alpha/fpu/s_copysign.c b/sysdeps/alpha/fpu/s_copysign.c index 5c8d827018..e86778e840 100644 --- a/sysdeps/alpha/fpu/s_copysign.c +++ b/sysdeps/alpha/fpu/s_copysign.c @@ -3,19 +3,19 @@ Contributed by Richard Henderson. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/alpha/fpu/s_copysignf.c b/sysdeps/alpha/fpu/s_copysignf.c index d2c5d886d0..f4b846bcbe 100644 --- a/sysdeps/alpha/fpu/s_copysignf.c +++ b/sysdeps/alpha/fpu/s_copysignf.c @@ -3,19 +3,19 @@ Contributed by Richard Henderson. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/alpha/fpu/s_fabs.c b/sysdeps/alpha/fpu/s_fabs.c index fb446d8cb9..f7a2f9353b 100644 --- a/sysdeps/alpha/fpu/s_fabs.c +++ b/sysdeps/alpha/fpu/s_fabs.c @@ -3,19 +3,19 @@ Contributed by Richard Henderson. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/alpha/fpu/s_fabsf.c b/sysdeps/alpha/fpu/s_fabsf.c index ec5390747f..35e16bf65d 100644 --- a/sysdeps/alpha/fpu/s_fabsf.c +++ b/sysdeps/alpha/fpu/s_fabsf.c @@ -3,19 +3,19 @@ Contributed by Richard Henderson. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/alpha/fpu/s_floor.c b/sysdeps/alpha/fpu/s_floor.c index b6d01f5947..c6872f5fcf 100644 --- a/sysdeps/alpha/fpu/s_floor.c +++ b/sysdeps/alpha/fpu/s_floor.c @@ -3,19 +3,19 @@ Contributed by Richard Henderson. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/alpha/fpu/s_floorf.c b/sysdeps/alpha/fpu/s_floorf.c index 624e7c87b8..fd1ddab6be 100644 --- a/sysdeps/alpha/fpu/s_floorf.c +++ b/sysdeps/alpha/fpu/s_floorf.c @@ -3,19 +3,19 @@ Contributed by Richard Henderson. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/alpha/fpu/s_rint.c b/sysdeps/alpha/fpu/s_rint.c index 7309b4134e..61cba04c27 100644 --- a/sysdeps/alpha/fpu/s_rint.c +++ b/sysdeps/alpha/fpu/s_rint.c @@ -3,19 +3,19 @@ Contributed by Richard Henderson. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/alpha/fpu/s_rintf.c b/sysdeps/alpha/fpu/s_rintf.c index 044f7e5f7a..d5d019d709 100644 --- a/sysdeps/alpha/fpu/s_rintf.c +++ b/sysdeps/alpha/fpu/s_rintf.c @@ -3,19 +3,19 @@ Contributed by Richard Henderson. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/alpha/htonl.S b/sysdeps/alpha/htonl.S index 193986e7c3..eb4fbd2ab4 100644 --- a/sysdeps/alpha/htonl.S +++ b/sysdeps/alpha/htonl.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/alpha/htons.S b/sysdeps/alpha/htons.S index d5d4467359..f1ef754814 100644 --- a/sysdeps/alpha/htons.S +++ b/sysdeps/alpha/htons.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/alpha/ldiv.S b/sysdeps/alpha/ldiv.S index c705d1eb16..81b48cd559 100644 --- a/sysdeps/alpha/ldiv.S +++ b/sysdeps/alpha/ldiv.S @@ -3,19 +3,19 @@ Contributed by Richard Henderson . 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/alpha/machine-gmon.h b/sysdeps/alpha/machine-gmon.h index 5014acd69b..5f5522c0b4 100644 --- a/sysdeps/alpha/machine-gmon.h +++ b/sysdeps/alpha/machine-gmon.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #define _MCOUNT_DECL(from, self) \ void __mcount (u_long from, u_long self) diff --git a/sysdeps/alpha/memchr.S b/sysdeps/alpha/memchr.S index c4e1d5e7aa..b50b69a2cd 100644 --- a/sysdeps/alpha/memchr.S +++ b/sysdeps/alpha/memchr.S @@ -3,19 +3,19 @@ Contributed by David Mosberger (davidm@cs.arizona.edu). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Finds characters in a memory area. Optimized for the Alpha: diff --git a/sysdeps/alpha/memset.S b/sysdeps/alpha/memset.S index 6ee99c204d..d621aeed19 100644 --- a/sysdeps/alpha/memset.S +++ b/sysdeps/alpha/memset.S @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Fill a block of memory with a character. Optimized for the Alpha architecture: diff --git a/sysdeps/alpha/memusage.h b/sysdeps/alpha/memusage.h index 4b8f455601..3d84160338 100644 --- a/sysdeps/alpha/memusage.h +++ b/sysdeps/alpha/memusage.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #define GETSP() ({ register uintptr_t stack_ptr asm ("$30"); stack_ptr; }) diff --git a/sysdeps/alpha/nscd-types.h b/sysdeps/alpha/nscd-types.h index 9096081eaa..957edaf297 100644 --- a/sysdeps/alpha/nscd-types.h +++ b/sysdeps/alpha/nscd-types.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/alpha/rawmemchr.S b/sysdeps/alpha/rawmemchr.S index bbf54a9af4..521feafdac 100644 --- a/sysdeps/alpha/rawmemchr.S +++ b/sysdeps/alpha/rawmemchr.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Return pointer to first occurrence of CH in STR. */ diff --git a/sysdeps/alpha/s_copysign.S b/sysdeps/alpha/s_copysign.S index be5b1d07ac..51a5e22f93 100644 --- a/sysdeps/alpha/s_copysign.S +++ b/sysdeps/alpha/s_copysign.S @@ -3,19 +3,19 @@ Contributed by David Mosberger , 1996. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/alpha/s_fabs.S b/sysdeps/alpha/s_fabs.S index 00698d6bd5..dd3b58456a 100644 --- a/sysdeps/alpha/s_fabs.S +++ b/sysdeps/alpha/s_fabs.S @@ -3,19 +3,19 @@ Contributed by David Mosberger 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S index 299bd4dd4a..b3bc38c455 100644 --- a/sysdeps/alpha/setjmp.S +++ b/sysdeps/alpha/setjmp.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #define __ASSEMBLY__ diff --git a/sysdeps/alpha/stackinfo.h b/sysdeps/alpha/stackinfo.h index dfaafb04b6..0a281bd435 100644 --- a/sysdeps/alpha/stackinfo.h +++ b/sysdeps/alpha/stackinfo.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* This file contains a bit of information about the stack allocation of the processor. */ diff --git a/sysdeps/alpha/stpcpy.S b/sysdeps/alpha/stpcpy.S index 46b09d5ac5..1ed74421e8 100644 --- a/sysdeps/alpha/stpcpy.S +++ b/sysdeps/alpha/stpcpy.S @@ -3,19 +3,19 @@ Contributed by Richard Henderson , 1996. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Copy a null-terminated string from SRC to DST. Return a pointer to the null-terminator in the source. */ diff --git a/sysdeps/alpha/stpncpy.S b/sysdeps/alpha/stpncpy.S index 90470cf95c..0a32356fa5 100644 --- a/sysdeps/alpha/stpncpy.S +++ b/sysdeps/alpha/stpncpy.S @@ -3,19 +3,19 @@ Contributed by Richard Henderson (rth@tamu.edu) 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Copy no more than COUNT bytes of the null-terminated string from SRC to DST. If SRC does not cover all of COUNT, the balance is diff --git a/sysdeps/alpha/strcat.S b/sysdeps/alpha/strcat.S index 433ca9fe64..d385c83875 100644 --- a/sysdeps/alpha/strcat.S +++ b/sysdeps/alpha/strcat.S @@ -3,19 +3,19 @@ Contributed by Richard Henderson , 1996. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Append a null-terminated string from SRC to DST. */ diff --git a/sysdeps/alpha/strchr.S b/sysdeps/alpha/strchr.S index e35b44ad6c..5643df4dfe 100644 --- a/sysdeps/alpha/strchr.S +++ b/sysdeps/alpha/strchr.S @@ -3,19 +3,19 @@ Contributed by Richard Henderson (rth@tamu.edu) 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Return the address of a given character within a null-terminated string, or null if it is not found. diff --git a/sysdeps/alpha/strcmp.S b/sysdeps/alpha/strcmp.S index 8633a6cb56..ee87b4fb37 100644 --- a/sysdeps/alpha/strcmp.S +++ b/sysdeps/alpha/strcmp.S @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Bytewise compare two null-terminated strings. */ diff --git a/sysdeps/alpha/strcpy.S b/sysdeps/alpha/strcpy.S index 2fa631868f..11dc8e1982 100644 --- a/sysdeps/alpha/strcpy.S +++ b/sysdeps/alpha/strcpy.S @@ -3,19 +3,19 @@ Contributed by Richard Henderson , 1996. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Copy a null-terminated string from SRC to DST. Return a pointer to the null-terminator in the source. */ diff --git a/sysdeps/alpha/strlen.S b/sysdeps/alpha/strlen.S index 60be29cf8b..66b17314a8 100644 --- a/sysdeps/alpha/strlen.S +++ b/sysdeps/alpha/strlen.S @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Finds length of a 0-terminated string. Optimized for the Alpha architecture: diff --git a/sysdeps/alpha/strncat.S b/sysdeps/alpha/strncat.S index 2c39cc0232..ddf686f578 100644 --- a/sysdeps/alpha/strncat.S +++ b/sysdeps/alpha/strncat.S @@ -3,19 +3,19 @@ Contributed by Richard Henderson , 1996. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Append no more than COUNT characters from the null-terminated string SRC to the null-terminated string DST. Always null-terminate the new DST. */ diff --git a/sysdeps/alpha/strncmp.S b/sysdeps/alpha/strncmp.S index 12e44e4405..f0dcfb9409 100644 --- a/sysdeps/alpha/strncmp.S +++ b/sysdeps/alpha/strncmp.S @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Bytewise compare two null-terminated strings of length no longer than N. */ diff --git a/sysdeps/alpha/strncpy.S b/sysdeps/alpha/strncpy.S index 97d741606a..575c907d7e 100644 --- a/sysdeps/alpha/strncpy.S +++ b/sysdeps/alpha/strncpy.S @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Copy no more than COUNT bytes of the null-terminated string from SRC to DST. If SRC does not cover all of COUNT, the balance is diff --git a/sysdeps/alpha/strrchr.S b/sysdeps/alpha/strrchr.S index 0faa8cc55f..e5e847f2bf 100644 --- a/sysdeps/alpha/strrchr.S +++ b/sysdeps/alpha/strrchr.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Return the address of the last occurrence of a given character within a null-terminated string, or null if it is not found. diff --git a/sysdeps/alpha/stxcpy.S b/sysdeps/alpha/stxcpy.S index dd5ea806bf..5ba2d43e54 100644 --- a/sysdeps/alpha/stxcpy.S +++ b/sysdeps/alpha/stxcpy.S @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Copy a null-terminated string from SRC to DST. diff --git a/sysdeps/alpha/stxncpy.S b/sysdeps/alpha/stxncpy.S index b1be778f45..9330f6d3e6 100644 --- a/sysdeps/alpha/stxncpy.S +++ b/sysdeps/alpha/stxncpy.S @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Copy no more than COUNT bytes of the null-terminated string from SRC to DST. diff --git a/sysdeps/am29k/ffs.c b/sysdeps/am29k/ffs.c index bccec883df..a1a74445c7 100644 --- a/sysdeps/am29k/ffs.c +++ b/sysdeps/am29k/ffs.c @@ -5,19 +5,19 @@ Contributed by Torbjorn Granlund (tege@sics.se). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/arm/__longjmp.S b/sysdeps/arm/__longjmp.S index 742e0baa16..7b30160047 100644 --- a/sysdeps/arm/__longjmp.S +++ b/sysdeps/arm/__longjmp.S @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #define _SETJMP_H diff --git a/sysdeps/arm/atomicity.h b/sysdeps/arm/atomicity.h index c1f3b038ef..1a437a6d35 100644 --- a/sysdeps/arm/atomicity.h +++ b/sysdeps/arm/atomicity.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _ATOMICITY_H #define _ATOMICITY_H 1 diff --git a/sysdeps/arm/bits/huge_val.h b/sysdeps/arm/bits/huge_val.h index 841b4b0d68..625cdc5c37 100644 --- a/sysdeps/arm/bits/huge_val.h +++ b/sysdeps/arm/bits/huge_val.h @@ -5,19 +5,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _MATH_H # error "Never use directly; include instead." diff --git a/sysdeps/arm/bits/setjmp.h b/sysdeps/arm/bits/setjmp.h index 6d8737970b..e0a4657b47 100644 --- a/sysdeps/arm/bits/setjmp.h +++ b/sysdeps/arm/bits/setjmp.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Define the machine-dependent type `jmp_buf'. ARM version. */ diff --git a/sysdeps/arm/bits/string.h b/sysdeps/arm/bits/string.h index 094f90192d..206f956dfd 100644 --- a/sysdeps/arm/bits/string.h +++ b/sysdeps/arm/bits/string.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _STRING_H # error "Never use directly; include instead." diff --git a/sysdeps/arm/bsd-_setjmp.S b/sysdeps/arm/bsd-_setjmp.S index 5cecc2a0be..649e89e20e 100644 --- a/sysdeps/arm/bsd-_setjmp.S +++ b/sysdeps/arm/bsd-_setjmp.S @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* This just does a tail-call to `__sigsetjmp (ARG, 1)'. We cannot do it in C because it must be a tail-call, so frame-unwinding diff --git a/sysdeps/arm/bsd-setjmp.S b/sysdeps/arm/bsd-setjmp.S index bfa9552afb..d227ba68a6 100644 --- a/sysdeps/arm/bsd-setjmp.S +++ b/sysdeps/arm/bsd-setjmp.S @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* This just does a tail-call to `__sigsetjmp (ARG, 1)'. We cannot do it in C because it must be a tail-call, so frame-unwinding diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 75c37c59ac..ba515ebec4 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 dl_machine_h #define dl_machine_h diff --git a/sysdeps/arm/elf/start.S b/sysdeps/arm/elf/start.S index 089591f468..8d60b3d8d5 100644 --- a/sysdeps/arm/elf/start.S +++ b/sysdeps/arm/elf/start.S @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* This is the canonical entry point, usually the first thing in the text segment. diff --git a/sysdeps/arm/fpu/__longjmp.S b/sysdeps/arm/fpu/__longjmp.S index 2972ff6f5c..90efeec1eb 100644 --- a/sysdeps/arm/fpu/__longjmp.S +++ b/sysdeps/arm/fpu/__longjmp.S @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #define _SETJMP_H diff --git a/sysdeps/arm/fpu/bits/fenv.h b/sysdeps/arm/fpu/bits/fenv.h index 3c9e2861c7..7bd242385f 100644 --- a/sysdeps/arm/fpu/bits/fenv.h +++ b/sysdeps/arm/fpu/bits/fenv.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _FENV_H # error "Never use directly; include instead." diff --git a/sysdeps/arm/fpu/bits/mathdef.h b/sysdeps/arm/fpu/bits/mathdef.h index 426fec7247..44d7f0ddea 100644 --- a/sysdeps/arm/fpu/bits/mathdef.h +++ b/sysdeps/arm/fpu/bits/mathdef.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #if !defined _MATH_H && !defined _COMPLEX_H # error "Never use directly; include instead" diff --git a/sysdeps/arm/fpu/bits/setjmp.h b/sysdeps/arm/fpu/bits/setjmp.h index a9fb9f32b3..dd85243032 100644 --- a/sysdeps/arm/fpu/bits/setjmp.h +++ b/sysdeps/arm/fpu/bits/setjmp.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Define the machine-dependent type `jmp_buf'. ARM version. */ diff --git a/sysdeps/arm/fpu/fclrexcpt.c b/sysdeps/arm/fpu/fclrexcpt.c index 319eed81d7..c6a53df45a 100644 --- a/sysdeps/arm/fpu/fclrexcpt.c +++ b/sysdeps/arm/fpu/fclrexcpt.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/arm/fpu/fedisblxcpt.c b/sysdeps/arm/fpu/fedisblxcpt.c index e41bd52ed7..91f60a9c90 100644 --- a/sysdeps/arm/fpu/fedisblxcpt.c +++ b/sysdeps/arm/fpu/fedisblxcpt.c @@ -4,19 +4,19 @@ Contributed by Philip Blundell , 2001. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/arm/fpu/feenablxcpt.c b/sysdeps/arm/fpu/feenablxcpt.c index 24c4363b24..e77e45a523 100644 --- a/sysdeps/arm/fpu/feenablxcpt.c +++ b/sysdeps/arm/fpu/feenablxcpt.c @@ -4,19 +4,19 @@ Contributed by Philip Blundell , 2001. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/arm/fpu/fegetenv.c b/sysdeps/arm/fpu/fegetenv.c index 17ed990e77..0b40f183e2 100644 --- a/sysdeps/arm/fpu/fegetenv.c +++ b/sysdeps/arm/fpu/fegetenv.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/arm/fpu/fegetexcept.c b/sysdeps/arm/fpu/fegetexcept.c index eda7b6ddcc..653c8d5a0d 100644 --- a/sysdeps/arm/fpu/fegetexcept.c +++ b/sysdeps/arm/fpu/fegetexcept.c @@ -4,19 +4,19 @@ Contributed by Philip Blundell , 2001 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/arm/fpu/fegetround.c b/sysdeps/arm/fpu/fegetround.c index 5f354bb4bb..6bf65f5b5e 100644 --- a/sysdeps/arm/fpu/fegetround.c +++ b/sysdeps/arm/fpu/fegetround.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/arm/fpu/feholdexcpt.c b/sysdeps/arm/fpu/feholdexcpt.c index 3422d54bb8..203b068aae 100644 --- a/sysdeps/arm/fpu/feholdexcpt.c +++ b/sysdeps/arm/fpu/feholdexcpt.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/arm/fpu/fesetenv.c b/sysdeps/arm/fpu/fesetenv.c index 09d5f39246..5bc19787d3 100644 --- a/sysdeps/arm/fpu/fesetenv.c +++ b/sysdeps/arm/fpu/fesetenv.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/arm/fpu/fesetround.c b/sysdeps/arm/fpu/fesetround.c index 04eb09c413..bdb849ff60 100644 --- a/sysdeps/arm/fpu/fesetround.c +++ b/sysdeps/arm/fpu/fesetround.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/arm/fpu/fpu_control.h b/sysdeps/arm/fpu/fpu_control.h index dfcfaabfcd..65912e4962 100644 --- a/sysdeps/arm/fpu/fpu_control.h +++ b/sysdeps/arm/fpu/fpu_control.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _FPU_CONTROL_H #define _FPU_CONTROL_H diff --git a/sysdeps/arm/fpu/fraiseexcpt.c b/sysdeps/arm/fpu/fraiseexcpt.c index 4e8a546bbf..75cd1baf34 100644 --- a/sysdeps/arm/fpu/fraiseexcpt.c +++ b/sysdeps/arm/fpu/fraiseexcpt.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/arm/fpu/fsetexcptflg.c b/sysdeps/arm/fpu/fsetexcptflg.c index 485781e2ad..4e1d2cba4a 100644 --- a/sysdeps/arm/fpu/fsetexcptflg.c +++ b/sysdeps/arm/fpu/fsetexcptflg.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/arm/fpu/ftestexcept.c b/sysdeps/arm/fpu/ftestexcept.c index 691d3e1c8e..328bcb05fd 100644 --- a/sysdeps/arm/fpu/ftestexcept.c +++ b/sysdeps/arm/fpu/ftestexcept.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/arm/fpu/setjmp.S b/sysdeps/arm/fpu/setjmp.S index b72900c89c..84328369ac 100644 --- a/sysdeps/arm/fpu/setjmp.S +++ b/sysdeps/arm/fpu/setjmp.S @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #define _SETJMP_H diff --git a/sysdeps/arm/frame.h b/sysdeps/arm/frame.h index 5d7ac0fb55..2a3f29709f 100644 --- a/sysdeps/arm/frame.h +++ b/sysdeps/arm/frame.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* This is the APCS stack backtrace structure. */ struct layout diff --git a/sysdeps/arm/ieee754.h b/sysdeps/arm/ieee754.h index 73f7d6a376..629b97fb1b 100644 --- a/sysdeps/arm/ieee754.h +++ b/sysdeps/arm/ieee754.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _IEEE754_H diff --git a/sysdeps/arm/init-first.c b/sysdeps/arm/init-first.c index 1e90c849a1..cc8da31edb 100644 --- a/sysdeps/arm/init-first.c +++ b/sysdeps/arm/init-first.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/arm/machine-gmon.h b/sysdeps/arm/machine-gmon.h index 3909b5e0c3..039dfd9514 100644 --- a/sysdeps/arm/machine-gmon.h +++ b/sysdeps/arm/machine-gmon.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* GCC for the ARM cannot compile __builtin_return_address(N) for N != 0, so we must use an assembly stub. */ diff --git a/sysdeps/arm/memset.S b/sysdeps/arm/memset.S index 567cc39c23..6ba8486971 100644 --- a/sysdeps/arm/memset.S +++ b/sysdeps/arm/memset.S @@ -3,19 +3,19 @@ Contributed by Philip Blundell 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/arm/memusage.h b/sysdeps/arm/memusage.h index 86ab085ef2..c558a06b5d 100644 --- a/sysdeps/arm/memusage.h +++ b/sysdeps/arm/memusage.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #define GETSP() ({ register uintptr_t stack_ptr asm ("sp"); stack_ptr; }) diff --git a/sysdeps/arm/setjmp.S b/sysdeps/arm/setjmp.S index 97f76cd853..2e8c6940f4 100644 --- a/sysdeps/arm/setjmp.S +++ b/sysdeps/arm/setjmp.S @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #define _SETJMP_H diff --git a/sysdeps/arm/stackinfo.h b/sysdeps/arm/stackinfo.h index b746e08e55..2410ba9bd9 100644 --- a/sysdeps/arm/stackinfo.h +++ b/sysdeps/arm/stackinfo.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* This file contains a bit of information about the stack allocation of the processor. */ diff --git a/sysdeps/arm/strlen.S b/sysdeps/arm/strlen.S index 0e360e2653..7ebfe63e94 100644 --- a/sysdeps/arm/strlen.S +++ b/sysdeps/arm/strlen.S @@ -3,19 +3,19 @@ Code contributed by Matthew Wilcox 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/arm/sys/ucontext.h b/sysdeps/arm/sys/ucontext.h index 999c01c417..9c800bfa9f 100644 --- a/sysdeps/arm/sys/ucontext.h +++ b/sysdeps/arm/sys/ucontext.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* System V/ARM ABI compliant context switching support. */ diff --git a/sysdeps/arm/sysdep.h b/sysdeps/arm/sysdep.h index 6247f9c94b..8d5ab95348 100644 --- a/sysdeps/arm/sysdep.h +++ b/sysdeps/arm/sysdep.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/cris/Makefile b/sysdeps/cris/Makefile index 3df21b9a30..1ecb78c3e0 100644 --- a/sysdeps/cris/Makefile +++ b/sysdeps/cris/Makefile @@ -2,19 +2,19 @@ # 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 Library General Public License -# as published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. +# 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 -# Library General Public License for more details. +# Lesser General Public License for more details. -# You should have received a copy of the GNU Library General Public -# License along with the GNU C Library; see the file COPYING.LIB. If not, -# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. +# 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. # We don't support long doubles as a distinct type. We don't need to set # this variable; it's here mostly for documentational purposes. diff --git a/sysdeps/cris/__longjmp.S b/sysdeps/cris/__longjmp.S index a6188d02f2..cce27ca25e 100644 --- a/sysdeps/cris/__longjmp.S +++ b/sysdeps/cris/__longjmp.S @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #define _SETJMP_H diff --git a/sysdeps/cris/_mcount.S b/sysdeps/cris/_mcount.S index d6e5f74c33..a939131645 100644 --- a/sysdeps/cris/_mcount.S +++ b/sysdeps/cris/_mcount.S @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* FIXME: This isn't implemented yet. This is just a machine-specific stub. Perhaps a real implementation can make use of it. */ diff --git a/sysdeps/cris/bits/setjmp.h b/sysdeps/cris/bits/setjmp.h index 9b0b2a18eb..0d7825bc86 100644 --- a/sysdeps/cris/bits/setjmp.h +++ b/sysdeps/cris/bits/setjmp.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Define the machine-dependent type `jmp_buf', CRIS version. */ diff --git a/sysdeps/cris/bits/string.h b/sysdeps/cris/bits/string.h index 9e4e6d58d6..fa893d3653 100644 --- a/sysdeps/cris/bits/string.h +++ b/sysdeps/cris/bits/string.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _STRING_H # error "Never use directly; include instead." diff --git a/sysdeps/cris/dl-machine.h b/sysdeps/cris/dl-machine.h index beec38184d..c6d2558e6f 100644 --- a/sysdeps/cris/dl-machine.h +++ b/sysdeps/cris/dl-machine.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If - not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + 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 dl_machine_h #define dl_machine_h diff --git a/sysdeps/cris/elf/start.S b/sysdeps/cris/elf/start.S index e740aaa83c..e7f1d6750d 100644 --- a/sysdeps/cris/elf/start.S +++ b/sysdeps/cris/elf/start.S @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/cris/machine-gmon.h b/sysdeps/cris/machine-gmon.h index 5455c82f70..2f36a34d67 100644 --- a/sysdeps/cris/machine-gmon.h +++ b/sysdeps/cris/machine-gmon.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ void __mcount_internal (unsigned long frompc, unsigned long selfpc); diff --git a/sysdeps/cris/memcopy.h b/sysdeps/cris/memcopy.h index 7bcf63451d..134d361217 100644 --- a/sysdeps/cris/memcopy.h +++ b/sysdeps/cris/memcopy.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/cris/memusage.h b/sysdeps/cris/memusage.h index 696c56e561..58b57ff370 100644 --- a/sysdeps/cris/memusage.h +++ b/sysdeps/cris/memusage.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* No asm variables, just for reasons of solid healthy paranoia. */ #define GETSP() \ diff --git a/sysdeps/cris/setjmp.S b/sysdeps/cris/setjmp.S index d773ac94d6..c5a512f49b 100644 --- a/sysdeps/cris/setjmp.S +++ b/sysdeps/cris/setjmp.S @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #define _SETJMP_H diff --git a/sysdeps/cris/sysdep.h b/sysdeps/cris/sysdep.h index ada5de350c..913d5ad9b7 100644 --- a/sysdeps/cris/sysdep.h +++ b/sysdeps/cris/sysdep.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/hppa/Makefile b/sysdeps/hppa/Makefile index 744c89c3ea..22be575abd 100644 --- a/sysdeps/hppa/Makefile +++ b/sysdeps/hppa/Makefile @@ -3,19 +3,19 @@ # Contributed by David Huggins-Daines (dhd@debian.org) # 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 published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. +# 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 -# Library General Public License for more details. +# Lesser General Public License for more details. -# You should have received a copy of the GNU Library General Public -# License along with the GNU C Library; see the file COPYING.LIB. If not, -# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. +# 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. # We used to need this since the build process uses ld -r. Now we use # ld -r --unique=.text* which does more or less the same thing, but better. diff --git a/sysdeps/hppa/__longjmp.S b/sysdeps/hppa/__longjmp.S index 418a0b48ce..dee4d9f7b5 100644 --- a/sysdeps/hppa/__longjmp.S +++ b/sysdeps/hppa/__longjmp.S @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #define _SETJMP_H diff --git a/sysdeps/hppa/bits/setjmp.h b/sysdeps/hppa/bits/setjmp.h index f72cdb5d86..7fb2af77d0 100644 --- a/sysdeps/hppa/bits/setjmp.h +++ b/sysdeps/hppa/bits/setjmp.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Define the machine-dependent type `jmp_buf'. HPPA version. */ diff --git a/sysdeps/hppa/bsd-_setjmp.S b/sysdeps/hppa/bsd-_setjmp.S index 487e8c7c23..6aacd4888b 100644 --- a/sysdeps/hppa/bsd-_setjmp.S +++ b/sysdeps/hppa/bsd-_setjmp.S @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* This just does a tail-call to `__sigsetjmp (ARG, 1)'. We cannot do it in C because it must be a tail-call, so frame-unwinding diff --git a/sysdeps/hppa/bsd-setjmp.S b/sysdeps/hppa/bsd-setjmp.S index 2614b49358..04ddba4652 100644 --- a/sysdeps/hppa/bsd-setjmp.S +++ b/sysdeps/hppa/bsd-setjmp.S @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* This just does a tail-call to `__sigsetjmp (ARG, 1)'. We cannot do it in C because it must be a tail-call, so frame-unwinding diff --git a/sysdeps/hppa/dl-fptr.c b/sysdeps/hppa/dl-fptr.c index 8a2c1c214d..6cf8d37275 100644 --- a/sysdeps/hppa/dl-fptr.c +++ b/sysdeps/hppa/dl-fptr.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/hppa/dl-lookupcfg.h b/sysdeps/hppa/dl-lookupcfg.h index 118c4d0c58..d15732b56d 100644 --- a/sysdeps/hppa/dl-lookupcfg.h +++ b/sysdeps/hppa/dl-lookupcfg.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Like IA-64, PA-RISC needs more information from the symbol lookup function than just the address. */ diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h index f0c1b13ef4..e8e2ab20a1 100644 --- a/sysdeps/hppa/dl-machine.h +++ b/sysdeps/hppa/dl-machine.h @@ -4,19 +4,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If - not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + 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 dl_machine_h #define dl_machine_h 1 diff --git a/sysdeps/hppa/dl-symaddr.c b/sysdeps/hppa/dl-symaddr.c index 49c1216664..1aec19ab19 100644 --- a/sysdeps/hppa/dl-symaddr.c +++ b/sysdeps/hppa/dl-symaddr.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/hppa/elf/initfini.c b/sysdeps/hppa/elf/initfini.c index d2e07ea373..d325d53787 100644 --- a/sysdeps/hppa/elf/initfini.c +++ b/sysdeps/hppa/elf/initfini.c @@ -2,29 +2,20 @@ Copyright (C) 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 modify it under the terms of the GNU Library General Public + 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 of the License, or (at your option) any later version. - - In addition to the permissions in the GNU Library General Public - License, the Free Software Foundation gives you unlimited - permission to link the compiled version of this file with other - programs, and to distribute those programs without any restriction - coming from the use of this file. (The Library General Public - License restrictions do apply in other respects; for example, they - cover modification of the file, and distribution when not linked - into another program.) - - 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 Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* This file is compiled into assembly code which is then munged by a sed script into two files: crti.s and crtn.s. diff --git a/sysdeps/hppa/fpu/bits/fenv.h b/sysdeps/hppa/fpu/bits/fenv.h index 7d25b9947c..c5f8c43459 100644 --- a/sysdeps/hppa/fpu/bits/fenv.h +++ b/sysdeps/hppa/fpu/bits/fenv.h @@ -3,19 +3,19 @@ Contributed by David Huggins-Daines 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _FENV_H # error "Never use directly; include instead." diff --git a/sysdeps/hppa/fpu/fclrexcpt.c b/sysdeps/hppa/fpu/fclrexcpt.c index e8049e6b44..8ad67b9698 100644 --- a/sysdeps/hppa/fpu/fclrexcpt.c +++ b/sysdeps/hppa/fpu/fclrexcpt.c @@ -4,19 +4,19 @@ Contributed by David Huggins-Daines , 2000 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/hppa/fpu/fedisblxcpt.c b/sysdeps/hppa/fpu/fedisblxcpt.c index 95c362a263..aac6bbfa2a 100644 --- a/sysdeps/hppa/fpu/fedisblxcpt.c +++ b/sysdeps/hppa/fpu/fedisblxcpt.c @@ -4,19 +4,19 @@ Contributed by David Huggins-Daines , 2000 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/hppa/fpu/feenablxcpt.c b/sysdeps/hppa/fpu/feenablxcpt.c index ac46722767..9ce3ca82cc 100644 --- a/sysdeps/hppa/fpu/feenablxcpt.c +++ b/sysdeps/hppa/fpu/feenablxcpt.c @@ -4,19 +4,19 @@ Contributed by David Huggins-Daines , 2000 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/hppa/fpu/fegetenv.c b/sysdeps/hppa/fpu/fegetenv.c index 0fe9773bb7..1ed18daa2c 100644 --- a/sysdeps/hppa/fpu/fegetenv.c +++ b/sysdeps/hppa/fpu/fegetenv.c @@ -4,19 +4,19 @@ Contributed by David Huggins-Daines , 2000 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/hppa/fpu/fegetexcept.c b/sysdeps/hppa/fpu/fegetexcept.c index 6bf3f6446e..efd1d7df05 100644 --- a/sysdeps/hppa/fpu/fegetexcept.c +++ b/sysdeps/hppa/fpu/fegetexcept.c @@ -4,19 +4,19 @@ Contributed by David Huggins-Daines , 2000 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/hppa/fpu/fegetround.c b/sysdeps/hppa/fpu/fegetround.c index 6e07f8654f..aefedbc071 100644 --- a/sysdeps/hppa/fpu/fegetround.c +++ b/sysdeps/hppa/fpu/fegetround.c @@ -4,19 +4,19 @@ Contributed by David Huggins-Daines , 2000 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/hppa/fpu/feholdexcpt.c b/sysdeps/hppa/fpu/feholdexcpt.c index 10621786eb..27133365bc 100644 --- a/sysdeps/hppa/fpu/feholdexcpt.c +++ b/sysdeps/hppa/fpu/feholdexcpt.c @@ -4,19 +4,19 @@ Contributed by David Huggins-Daines , 2000 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/hppa/fpu/fesetenv.c b/sysdeps/hppa/fpu/fesetenv.c index 4bfbefdd9b..f0c68560c0 100644 --- a/sysdeps/hppa/fpu/fesetenv.c +++ b/sysdeps/hppa/fpu/fesetenv.c @@ -6,19 +6,19 @@ Andreas Schwab 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/hppa/fpu/fesetround.c b/sysdeps/hppa/fpu/fesetround.c index 0d5858f263..7634b1e1d7 100644 --- a/sysdeps/hppa/fpu/fesetround.c +++ b/sysdeps/hppa/fpu/fesetround.c @@ -4,19 +4,19 @@ Contributed by David Huggins-Daines , 2000 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/hppa/fpu/feupdateenv.c b/sysdeps/hppa/fpu/feupdateenv.c index 7e2d715e25..c61b7b298a 100644 --- a/sysdeps/hppa/fpu/feupdateenv.c +++ b/sysdeps/hppa/fpu/feupdateenv.c @@ -4,19 +4,19 @@ Contributed by David Huggins-Daines , 2000 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/hppa/fpu/fgetexcptflg.c b/sysdeps/hppa/fpu/fgetexcptflg.c index 800b1f4014..27766ecf58 100644 --- a/sysdeps/hppa/fpu/fgetexcptflg.c +++ b/sysdeps/hppa/fpu/fgetexcptflg.c @@ -4,19 +4,19 @@ Contributed by David Huggins-Daines , 2000 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/hppa/fpu/fraiseexcpt.c b/sysdeps/hppa/fpu/fraiseexcpt.c index c0cce6e7ce..5164bc413c 100644 --- a/sysdeps/hppa/fpu/fraiseexcpt.c +++ b/sysdeps/hppa/fpu/fraiseexcpt.c @@ -4,19 +4,19 @@ Contributed by David Huggins-Daines 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/hppa/fpu/fsetexcptflg.c b/sysdeps/hppa/fpu/fsetexcptflg.c index 2e369ea721..343ddad943 100644 --- a/sysdeps/hppa/fpu/fsetexcptflg.c +++ b/sysdeps/hppa/fpu/fsetexcptflg.c @@ -4,19 +4,19 @@ Contributed by David Huggins-Daines , 2000 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/hppa/fpu/ftestexcept.c b/sysdeps/hppa/fpu/ftestexcept.c index 15d149193f..d08d4d6eb9 100644 --- a/sysdeps/hppa/fpu/ftestexcept.c +++ b/sysdeps/hppa/fpu/ftestexcept.c @@ -4,19 +4,19 @@ Contributed by David Huggins-Daines , 2000 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/hppa/frame.h b/sysdeps/hppa/frame.h index e6764daa24..0a234f1aa7 100644 --- a/sysdeps/hppa/frame.h +++ b/sysdeps/hppa/frame.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* PA stacks grow upwards. */ #define INNER_THAN > diff --git a/sysdeps/hppa/memusage.h b/sysdeps/hppa/memusage.h index 5a06b7b656..d3dd10e10b 100644 --- a/sysdeps/hppa/memusage.h +++ b/sysdeps/hppa/memusage.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #define GETSP() ({ register uintptr_t stack_ptr asm ("%r30"); stack_ptr; }) #define STACK_GROWS_UPWARD 1 diff --git a/sysdeps/hppa/setjmp.S b/sysdeps/hppa/setjmp.S index 0890975b88..f10a7a304d 100644 --- a/sysdeps/hppa/setjmp.S +++ b/sysdeps/hppa/setjmp.S @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #define _ASM diff --git a/sysdeps/hppa/stackinfo.h b/sysdeps/hppa/stackinfo.h index e446c42471..318de7143b 100644 --- a/sysdeps/hppa/stackinfo.h +++ b/sysdeps/hppa/stackinfo.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* This file contains a bit of information about the stack allocation of the processor. */ diff --git a/sysdeps/hppa/sysdep.h b/sysdeps/hppa/sysdep.h index 2ac9840355..1f47fadb3f 100644 --- a/sysdeps/hppa/sysdep.h +++ b/sysdeps/hppa/sysdep.h @@ -4,19 +4,19 @@ Contributed by Ulrich Drepper, , August 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/i860/memcopy.h b/sysdeps/i860/memcopy.h index d381acdaaf..3bb9ba5138 100644 --- a/sysdeps/i860/memcopy.h +++ b/sysdeps/i860/memcopy.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/i960/ffs.c b/sysdeps/i960/ffs.c index dc09ba90e8..979696ec19 100644 --- a/sysdeps/i960/ffs.c +++ b/sysdeps/i960/ffs.c @@ -6,19 +6,19 @@ On-Line Applications Research Corporation. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile index a056360ac6..c44b2d196c 100644 --- a/sysdeps/m68k/Makefile +++ b/sysdeps/m68k/Makefile @@ -2,19 +2,19 @@ # 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 Library General Public License -# as published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. +# 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 -# Library General Public License for more details. +# Lesser General Public License for more details. -# You should have received a copy of the GNU Library General Public -# License along with the GNU C Library; see the file COPYING.LIB. If not, -# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. +# 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. # The mpn functions need this. All existing 68k ports use MIT syntax. If # a new port wants to use Motorola or Sony syntax, it can redefine this diff --git a/sysdeps/m68k/__longjmp.c b/sysdeps/m68k/__longjmp.c index e6ec43c465..89ff5bab56 100644 --- a/sysdeps/m68k/__longjmp.c +++ b/sysdeps/m68k/__longjmp.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/m68k/asm-syntax.h b/sysdeps/m68k/asm-syntax.h index fbb0e2f5d2..8e2a4ca2ca 100644 --- a/sysdeps/m68k/asm-syntax.h +++ b/sysdeps/m68k/asm-syntax.h @@ -1,23 +1,22 @@ /* Definitions for 68k syntax variations. Copyright (C) 1992, 1994, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. Its master source is NOT part of the C library, however. The master source lives in the GNU MP Library. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #ifdef HAVE_ELF diff --git a/sysdeps/m68k/bits/byteswap.h b/sysdeps/m68k/bits/byteswap.h index efdc7af0df..ea6aa964b0 100644 --- a/sysdeps/m68k/bits/byteswap.h +++ b/sysdeps/m68k/bits/byteswap.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #if !defined _BYTESWAP_H && !defined _NETINET_IN_H # error "Never use directly; include instead." diff --git a/sysdeps/m68k/bits/huge_val.h b/sysdeps/m68k/bits/huge_val.h index 9e1589157c..ad5253429f 100644 --- a/sysdeps/m68k/bits/huge_val.h +++ b/sysdeps/m68k/bits/huge_val.h @@ -4,19 +4,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _MATH_H # error "Never use directly; include instead." diff --git a/sysdeps/m68k/bits/setjmp.h b/sysdeps/m68k/bits/setjmp.h index aa376a0925..2c2b3ee15a 100644 --- a/sysdeps/m68k/bits/setjmp.h +++ b/sysdeps/m68k/bits/setjmp.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Define the machine-dependent type `jmp_buf'. m68k version. */ diff --git a/sysdeps/m68k/bsd-_setjmp.S b/sysdeps/m68k/bsd-_setjmp.S index f1551521d3..a0e32bd0e1 100644 --- a/sysdeps/m68k/bsd-_setjmp.S +++ b/sysdeps/m68k/bsd-_setjmp.S @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* This just does a tail-call to `__sigsetjmp (ARG, 0)'. We cannot do it in C because it must be a tail-call, so frame-unwinding diff --git a/sysdeps/m68k/bsd-setjmp.S b/sysdeps/m68k/bsd-setjmp.S index 8074719639..e1462476a5 100644 --- a/sysdeps/m68k/bsd-setjmp.S +++ b/sysdeps/m68k/bsd-setjmp.S @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* This just does a tail-call to `__sigsetjmp (ARG, 1)'. We cannot do it in C because it must be a tail-call, so frame-unwinding diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index e2a12cb03a..c4849b078c 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If - not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + 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 dl_machine_h #define dl_machine_h diff --git a/sysdeps/m68k/elf/start.S b/sysdeps/m68k/elf/start.S index cf286f1ced..eda735583d 100644 --- a/sysdeps/m68k/elf/start.S +++ b/sysdeps/m68k/elf/start.S @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* This is the canonical entry point, usually the first thing in the text segment. The SVR4/m68k ABI says that when the entry point runs, diff --git a/sysdeps/m68k/ffs.c b/sysdeps/m68k/ffs.c index bed3f46866..a296121333 100644 --- a/sysdeps/m68k/ffs.c +++ b/sysdeps/m68k/ffs.c @@ -5,19 +5,19 @@ Contributed by Torbjorn Granlund (tege@sics.se). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #define ffsl __something_else #include diff --git a/sysdeps/m68k/fpu/bits/fenv.h b/sysdeps/m68k/fpu/bits/fenv.h index 7d489b32b3..7c0bcb6697 100644 --- a/sysdeps/m68k/fpu/bits/fenv.h +++ b/sysdeps/m68k/fpu/bits/fenv.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _FENV_H # error "Never use directly; include instead." diff --git a/sysdeps/m68k/fpu/bits/mathdef.h b/sysdeps/m68k/fpu/bits/mathdef.h index 4eec5d8cc4..90146f17a9 100644 --- a/sysdeps/m68k/fpu/bits/mathdef.h +++ b/sysdeps/m68k/fpu/bits/mathdef.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #if !defined _MATH_H && !defined _COMPLEX_H # error "Never use directly; include instead" diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/fpu/bits/mathinline.h index cb59773f16..dec89d8306 100644 --- a/sysdeps/m68k/fpu/bits/mathinline.h +++ b/sysdeps/m68k/fpu/bits/mathinline.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #ifdef __GNUC__ diff --git a/sysdeps/m68k/fpu/e_acos.c b/sysdeps/m68k/fpu/e_acos.c index 4226b73265..c9f6c6a162 100644 --- a/sysdeps/m68k/fpu/e_acos.c +++ b/sysdeps/m68k/fpu/e_acos.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include "math_private.h" diff --git a/sysdeps/m68k/fpu/e_atan2.c b/sysdeps/m68k/fpu/e_atan2.c index 6a5af2a9c0..551b14db81 100644 --- a/sysdeps/m68k/fpu/e_atan2.c +++ b/sysdeps/m68k/fpu/e_atan2.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include "math_private.h" diff --git a/sysdeps/m68k/fpu/e_fmod.c b/sysdeps/m68k/fpu/e_fmod.c index 9695a863ff..bd229ae4b0 100644 --- a/sysdeps/m68k/fpu/e_fmod.c +++ b/sysdeps/m68k/fpu/e_fmod.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include "math_private.h" diff --git a/sysdeps/m68k/fpu/e_pow.c b/sysdeps/m68k/fpu/e_pow.c index b461ad86c4..0b6cee6f15 100644 --- a/sysdeps/m68k/fpu/e_pow.c +++ b/sysdeps/m68k/fpu/e_pow.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include "math_private.h" diff --git a/sysdeps/m68k/fpu/e_scalb.c b/sysdeps/m68k/fpu/e_scalb.c index 7f56199a9a..88edba1ca8 100644 --- a/sysdeps/m68k/fpu/e_scalb.c +++ b/sysdeps/m68k/fpu/e_scalb.c @@ -3,19 +3,19 @@ Contributed by Andreas Schwab . 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include "math_private.h" diff --git a/sysdeps/m68k/fpu/fclrexcpt.c b/sysdeps/m68k/fpu/fclrexcpt.c index f35bb12479..bcd7a3fe52 100644 --- a/sysdeps/m68k/fpu/fclrexcpt.c +++ b/sysdeps/m68k/fpu/fclrexcpt.c @@ -4,19 +4,19 @@ Contributed by Andreas Schwab 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/m68k/fpu/fedisblxcpt.c b/sysdeps/m68k/fpu/fedisblxcpt.c index ad97e86a9b..416e0ba464 100644 --- a/sysdeps/m68k/fpu/fedisblxcpt.c +++ b/sysdeps/m68k/fpu/fedisblxcpt.c @@ -4,19 +4,19 @@ Contributed by Andreas Schwab , 2000. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/m68k/fpu/feenablxcpt.c b/sysdeps/m68k/fpu/feenablxcpt.c index 7be0705213..f963acf01d 100644 --- a/sysdeps/m68k/fpu/feenablxcpt.c +++ b/sysdeps/m68k/fpu/feenablxcpt.c @@ -4,19 +4,19 @@ Contributed by Andreas Schwab , 2000. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/m68k/fpu/fegetenv.c b/sysdeps/m68k/fpu/fegetenv.c index 7a5a28bbab..6c94b07318 100644 --- a/sysdeps/m68k/fpu/fegetenv.c +++ b/sysdeps/m68k/fpu/fegetenv.c @@ -4,19 +4,19 @@ Contributed by Andreas Schwab 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/m68k/fpu/fegetexcept.c b/sysdeps/m68k/fpu/fegetexcept.c index 03b8735c11..b34b2c1e20 100644 --- a/sysdeps/m68k/fpu/fegetexcept.c +++ b/sysdeps/m68k/fpu/fegetexcept.c @@ -4,19 +4,19 @@ Contributed by Andreas Schwab , 2000. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/m68k/fpu/fegetround.c b/sysdeps/m68k/fpu/fegetround.c index 1837a84271..74fc56f745 100644 --- a/sysdeps/m68k/fpu/fegetround.c +++ b/sysdeps/m68k/fpu/fegetround.c @@ -4,19 +4,19 @@ Contributed by Andreas Schwab 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/m68k/fpu/feholdexcpt.c b/sysdeps/m68k/fpu/feholdexcpt.c index 44a7c7d9fd..88fb1c59ac 100644 --- a/sysdeps/m68k/fpu/feholdexcpt.c +++ b/sysdeps/m68k/fpu/feholdexcpt.c @@ -4,19 +4,19 @@ Contributed by Andreas Schwab 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/m68k/fpu/fesetenv.c b/sysdeps/m68k/fpu/fesetenv.c index 9149c72435..d3cac1ca8c 100644 --- a/sysdeps/m68k/fpu/fesetenv.c +++ b/sysdeps/m68k/fpu/fesetenv.c @@ -4,19 +4,19 @@ Contributed by Andreas Schwab 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/m68k/fpu/fesetround.c b/sysdeps/m68k/fpu/fesetround.c index 8e06a15f03..956325de8a 100644 --- a/sysdeps/m68k/fpu/fesetround.c +++ b/sysdeps/m68k/fpu/fesetround.c @@ -4,19 +4,19 @@ Contributed by Andreas Schwab 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/m68k/fpu/feupdateenv.c b/sysdeps/m68k/fpu/feupdateenv.c index 6ebc0c6afa..2a6831387e 100644 --- a/sysdeps/m68k/fpu/feupdateenv.c +++ b/sysdeps/m68k/fpu/feupdateenv.c @@ -4,19 +4,19 @@ Contributed by Andreas Schwab 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/m68k/fpu/fgetexcptflg.c b/sysdeps/m68k/fpu/fgetexcptflg.c index a0d1ec5846..764b900c0b 100644 --- a/sysdeps/m68k/fpu/fgetexcptflg.c +++ b/sysdeps/m68k/fpu/fgetexcptflg.c @@ -4,19 +4,19 @@ Contributed by Andreas Schwab 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/m68k/fpu/fraiseexcpt.c b/sysdeps/m68k/fpu/fraiseexcpt.c index 592cc5a517..d410fde07e 100644 --- a/sysdeps/m68k/fpu/fraiseexcpt.c +++ b/sysdeps/m68k/fpu/fraiseexcpt.c @@ -4,19 +4,19 @@ Contributed by Andreas Schwab 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/m68k/fpu/fsetexcptflg.c b/sysdeps/m68k/fpu/fsetexcptflg.c index 51892a7d98..51b086a8f2 100644 --- a/sysdeps/m68k/fpu/fsetexcptflg.c +++ b/sysdeps/m68k/fpu/fsetexcptflg.c @@ -4,19 +4,19 @@ Contributed by Andreas Schwab 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/m68k/fpu/ftestexcept.c b/sysdeps/m68k/fpu/ftestexcept.c index c092ce18e3..3157c90d1a 100644 --- a/sysdeps/m68k/fpu/ftestexcept.c +++ b/sysdeps/m68k/fpu/ftestexcept.c @@ -4,19 +4,19 @@ Contributed by Andreas Schwab 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/m68k/fpu/k_cos.c b/sysdeps/m68k/fpu/k_cos.c index 85f744f984..dd6c215c23 100644 --- a/sysdeps/m68k/fpu/k_cos.c +++ b/sysdeps/m68k/fpu/k_cos.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include "math_private.h" diff --git a/sysdeps/m68k/fpu/k_sin.c b/sysdeps/m68k/fpu/k_sin.c index 05cdceedc8..652ca0e131 100644 --- a/sysdeps/m68k/fpu/k_sin.c +++ b/sysdeps/m68k/fpu/k_sin.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include "math_private.h" diff --git a/sysdeps/m68k/fpu/k_tan.c b/sysdeps/m68k/fpu/k_tan.c index 09e5ac83bc..28f6a80cf5 100644 --- a/sysdeps/m68k/fpu/k_tan.c +++ b/sysdeps/m68k/fpu/k_tan.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include "math_private.h" diff --git a/sysdeps/m68k/fpu/mathimpl.h b/sysdeps/m68k/fpu/mathimpl.h index 7fa8144118..bbcaf84859 100644 --- a/sysdeps/m68k/fpu/mathimpl.h +++ b/sysdeps/m68k/fpu/mathimpl.h @@ -4,19 +4,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* This file contains the definitions of the inline math functions that are only used internally inside libm, not visible to the user. */ diff --git a/sysdeps/m68k/fpu/s_atan.c b/sysdeps/m68k/fpu/s_atan.c index 29f2eca77d..8cca490d2a 100644 --- a/sysdeps/m68k/fpu/s_atan.c +++ b/sysdeps/m68k/fpu/s_atan.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/m68k/fpu/s_ccos.c b/sysdeps/m68k/fpu/s_ccos.c index 6f1232f99a..d302d3d86b 100644 --- a/sysdeps/m68k/fpu/s_ccos.c +++ b/sysdeps/m68k/fpu/s_ccos.c @@ -4,19 +4,19 @@ Contributed by Andreas Schwab . 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/m68k/fpu/s_ccosh.c b/sysdeps/m68k/fpu/s_ccosh.c index 437d42dfe8..1698881b9f 100644 --- a/sysdeps/m68k/fpu/s_ccosh.c +++ b/sysdeps/m68k/fpu/s_ccosh.c @@ -4,19 +4,19 @@ Contributed by Andreas Schwab . 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/m68k/fpu/s_cexp.c b/sysdeps/m68k/fpu/s_cexp.c index 899fdc4785..4babf12685 100644 --- a/sysdeps/m68k/fpu/s_cexp.c +++ b/sysdeps/m68k/fpu/s_cexp.c @@ -4,19 +4,19 @@ Contributed by Andreas Schwab 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/m68k/fpu/s_csin.c b/sysdeps/m68k/fpu/s_csin.c index 11e217b9b6..7c590e4af6 100644 --- a/sysdeps/m68k/fpu/s_csin.c +++ b/sysdeps/m68k/fpu/s_csin.c @@ -4,19 +4,19 @@ Contributed by Andreas Schwab . 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/m68k/fpu/s_csinh.c b/sysdeps/m68k/fpu/s_csinh.c index 4dfbe129b4..dafb82af1a 100644 --- a/sysdeps/m68k/fpu/s_csinh.c +++ b/sysdeps/m68k/fpu/s_csinh.c @@ -4,19 +4,19 @@ Contributed by Andreas Schwab . 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/m68k/fpu/s_fpclassifyl.c b/sysdeps/m68k/fpu/s_fpclassifyl.c index 74aa720813..9a38900ef0 100644 --- a/sysdeps/m68k/fpu/s_fpclassifyl.c +++ b/sysdeps/m68k/fpu/s_fpclassifyl.c @@ -5,19 +5,19 @@ Fixed for m68k by Andreas Schwab . 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/m68k/fpu/s_frexp.c b/sysdeps/m68k/fpu/s_frexp.c index 61e3298e97..0cdb5778ee 100644 --- a/sysdeps/m68k/fpu/s_frexp.c +++ b/sysdeps/m68k/fpu/s_frexp.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/m68k/fpu/s_ilogb.c b/sysdeps/m68k/fpu/s_ilogb.c index 15cff29c60..ee1e3975f0 100644 --- a/sysdeps/m68k/fpu/s_ilogb.c +++ b/sysdeps/m68k/fpu/s_ilogb.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include "mathimpl.h" diff --git a/sysdeps/m68k/fpu/s_isinf.c b/sysdeps/m68k/fpu/s_isinf.c index 03dc26dc60..e654e880e3 100644 --- a/sysdeps/m68k/fpu/s_isinf.c +++ b/sysdeps/m68k/fpu/s_isinf.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/m68k/fpu/s_llrint.c b/sysdeps/m68k/fpu/s_llrint.c index b733d77260..8f2442982a 100644 --- a/sysdeps/m68k/fpu/s_llrint.c +++ b/sysdeps/m68k/fpu/s_llrint.c @@ -5,19 +5,19 @@ Contributed by Andreas Schwab 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include "math_private.h" diff --git a/sysdeps/m68k/fpu/s_llrintf.c b/sysdeps/m68k/fpu/s_llrintf.c index b9ba5a0148..bd573b2579 100644 --- a/sysdeps/m68k/fpu/s_llrintf.c +++ b/sysdeps/m68k/fpu/s_llrintf.c @@ -5,19 +5,19 @@ Contributed by Andreas Schwab 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include "math_private.h" diff --git a/sysdeps/m68k/fpu/s_llrintl.c b/sysdeps/m68k/fpu/s_llrintl.c index c874bfdde0..d749f3515f 100644 --- a/sysdeps/m68k/fpu/s_llrintl.c +++ b/sysdeps/m68k/fpu/s_llrintl.c @@ -5,19 +5,19 @@ Contributed by Andreas Schwab 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include "math_private.h" diff --git a/sysdeps/m68k/fpu/s_lrint.c b/sysdeps/m68k/fpu/s_lrint.c index 89e9dba9cf..0a23f29eeb 100644 --- a/sysdeps/m68k/fpu/s_lrint.c +++ b/sysdeps/m68k/fpu/s_lrint.c @@ -5,19 +5,19 @@ Contributed by Andreas Schwab 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/m68k/fpu/s_modf.c b/sysdeps/m68k/fpu/s_modf.c index d19f2a7f89..2f5a83dea7 100644 --- a/sysdeps/m68k/fpu/s_modf.c +++ b/sysdeps/m68k/fpu/s_modf.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include "mathimpl.h" diff --git a/sysdeps/m68k/fpu/s_remquo.c b/sysdeps/m68k/fpu/s_remquo.c index 10be1aec6d..5b65f85fbc 100644 --- a/sysdeps/m68k/fpu/s_remquo.c +++ b/sysdeps/m68k/fpu/s_remquo.c @@ -4,19 +4,19 @@ Contributed by Andreas Schwab 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/m68k/fpu/s_scalbn.c b/sysdeps/m68k/fpu/s_scalbn.c index c151b2a0ef..d76d94d946 100644 --- a/sysdeps/m68k/fpu/s_scalbn.c +++ b/sysdeps/m68k/fpu/s_scalbn.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #define scalbln __no_scalbln_decl #define scalblnf __no_scalblnf_decl diff --git a/sysdeps/m68k/fpu/s_sincos.c b/sysdeps/m68k/fpu/s_sincos.c index 8d84ece380..5df4a5a1c0 100644 --- a/sysdeps/m68k/fpu/s_sincos.c +++ b/sysdeps/m68k/fpu/s_sincos.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/m68k/fpu/switch/68881-sw.h b/sysdeps/m68k/fpu/switch/68881-sw.h index 2f38aacbb3..c5a0f71fa6 100644 --- a/sysdeps/m68k/fpu/switch/68881-sw.h +++ b/sysdeps/m68k/fpu/switch/68881-sw.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _68881_SWITCH_H diff --git a/sysdeps/m68k/fpu/switch/Makefile b/sysdeps/m68k/fpu/switch/Makefile index 67218e7681..c04107163c 100644 --- a/sysdeps/m68k/fpu/switch/Makefile +++ b/sysdeps/m68k/fpu/switch/Makefile @@ -2,19 +2,19 @@ # 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 Library General Public License as -# published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version. +# 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 -# Library General Public License for more details. +# Lesser General Public License for more details. -# You should have received a copy of the GNU Library General Public -# License along with the GNU C Library; see the file COPYING.LIB. If not, -# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. +# 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. ifeq ($(subdir),math) diff --git a/sysdeps/m68k/fpu/switch/switch.c b/sysdeps/m68k/fpu/switch/switch.c index 44e2b4d2d9..e0558176dc 100644 --- a/sysdeps/m68k/fpu/switch/switch.c +++ b/sysdeps/m68k/fpu/switch/switch.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include <68881-sw.h> diff --git a/sysdeps/m68k/fpu_control.h b/sysdeps/m68k/fpu_control.h index 28405b6a3b..86358e6559 100644 --- a/sysdeps/m68k/fpu_control.h +++ b/sysdeps/m68k/fpu_control.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _FPU_CONTROL_H #define _FPU_CONTROL_H diff --git a/sysdeps/m68k/m68020/atomicity.h b/sysdeps/m68k/m68020/atomicity.h index d74b8194ad..4639b015c2 100644 --- a/sysdeps/m68k/m68020/atomicity.h +++ b/sysdeps/m68k/m68020/atomicity.h @@ -1,23 +1,22 @@ /* Low-level functions for atomic operations. m680x0 version, x >= 2. Copyright (C) 1997 Free Software Foundation, Inc. Contributed by Andreas Schwab . - 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _ATOMICITY_H #define _ATOMICITY_H 1 diff --git a/sysdeps/m68k/m68020/bits/string.h b/sysdeps/m68k/m68020/bits/string.h index 6462ef0d83..84be224b73 100644 --- a/sysdeps/m68k/m68020/bits/string.h +++ b/sysdeps/m68k/m68020/bits/string.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _STRING_H # error "Never use directly; include instead." diff --git a/sysdeps/m68k/memchr.S b/sysdeps/m68k/memchr.S index d69b806667..bd4da6a931 100644 --- a/sysdeps/m68k/memchr.S +++ b/sysdeps/m68k/memchr.S @@ -6,19 +6,19 @@ Contributed by Andreas Schwab . 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include "asm-syntax.h" diff --git a/sysdeps/m68k/memcopy.h b/sysdeps/m68k/memcopy.h index b4d4614381..cdc268ad51 100644 --- a/sysdeps/m68k/memcopy.h +++ b/sysdeps/m68k/memcopy.h @@ -4,19 +4,19 @@ Contributed by Torbjorn Granlund (tege@sics.se). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/m68k/memusage.h b/sysdeps/m68k/memusage.h index 72138e2180..bb22c0acc0 100644 --- a/sysdeps/m68k/memusage.h +++ b/sysdeps/m68k/memusage.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #define GETSP() ({ register uintptr_t stack_ptr asm ("%sp"); stack_ptr; }) diff --git a/sysdeps/m68k/rawmemchr.S b/sysdeps/m68k/rawmemchr.S index 74eb1cab29..f52b74b8cd 100644 --- a/sysdeps/m68k/rawmemchr.S +++ b/sysdeps/m68k/rawmemchr.S @@ -5,19 +5,19 @@ Contributed by Andreas Schwab . 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include "asm-syntax.h" diff --git a/sysdeps/m68k/s_isinfl.c b/sysdeps/m68k/s_isinfl.c index c94104d6e0..40e0b791d5 100644 --- a/sysdeps/m68k/s_isinfl.c +++ b/sysdeps/m68k/s_isinfl.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include "ieee754.h" diff --git a/sysdeps/m68k/s_isnanl.c b/sysdeps/m68k/s_isnanl.c index a2858509b0..0a9ddf9814 100644 --- a/sysdeps/m68k/s_isnanl.c +++ b/sysdeps/m68k/s_isnanl.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include "ieee754.h" diff --git a/sysdeps/m68k/setjmp.c b/sysdeps/m68k/setjmp.c index 1de9f68579..04568623f9 100644 --- a/sysdeps/m68k/setjmp.c +++ b/sysdeps/m68k/setjmp.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/m68k/stackinfo.h b/sysdeps/m68k/stackinfo.h index a1b8e06a89..66e5a17fb4 100644 --- a/sysdeps/m68k/stackinfo.h +++ b/sysdeps/m68k/stackinfo.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* This file contains a bit of information about the stack allocation of the processor. */ diff --git a/sysdeps/m68k/strchr.S b/sysdeps/m68k/strchr.S index 45d02d0831..af91dc72f4 100644 --- a/sysdeps/m68k/strchr.S +++ b/sysdeps/m68k/strchr.S @@ -5,19 +5,19 @@ Contributed by Andreas Schwab . 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include "asm-syntax.h" diff --git a/sysdeps/m68k/strchrnul.S b/sysdeps/m68k/strchrnul.S index 45e7616e1a..3fee2b236c 100644 --- a/sysdeps/m68k/strchrnul.S +++ b/sysdeps/m68k/strchrnul.S @@ -6,19 +6,19 @@ Contributed by Andreas Schwab . 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include "asm-syntax.h" diff --git a/sysdeps/m68k/sys/ucontext.h b/sysdeps/m68k/sys/ucontext.h index 1acfee41df..857ed6b42a 100644 --- a/sysdeps/m68k/sys/ucontext.h +++ b/sysdeps/m68k/sys/ucontext.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* System V/m68k ABI compliant context switching support. */ diff --git a/sysdeps/m68k/sysdep.h b/sysdeps/m68k/sysdep.h index 1770a09410..554b92d334 100644 --- a/sysdeps/m68k/sysdep.h +++ b/sysdeps/m68k/sysdep.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/m88k/ffs.c b/sysdeps/m88k/ffs.c index 7aac897735..fe78ebc154 100644 --- a/sysdeps/m88k/ffs.c +++ b/sysdeps/m88k/ffs.c @@ -5,19 +5,19 @@ Contributed by Torbjorn Granlund (tege@sics.se). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/mach/alpha/machine-lock.h b/sysdeps/mach/alpha/machine-lock.h index 1da8b25584..80f8750c87 100644 --- a/sysdeps/mach/alpha/machine-lock.h +++ b/sysdeps/mach/alpha/machine-lock.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _MACHINE_LOCK_H #define _MACHINE_LOCK_H diff --git a/sysdeps/mach/alpha/machine-sp.h b/sysdeps/mach/alpha/machine-sp.h index d12e734d25..b737525574 100644 --- a/sysdeps/mach/alpha/machine-sp.h +++ b/sysdeps/mach/alpha/machine-sp.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _MACHINE_SP_H #define _MACHINE_SP_H diff --git a/sysdeps/mach/alpha/syscall.S b/sysdeps/mach/alpha/syscall.S index 615357d3f6..8cb85bff55 100644 --- a/sysdeps/mach/alpha/syscall.S +++ b/sysdeps/mach/alpha/syscall.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/mach/alpha/sysdep.h b/sysdeps/mach/alpha/sysdep.h index 55130754aa..9e7ace0eed 100644 --- a/sysdeps/mach/alpha/sysdep.h +++ b/sysdeps/mach/alpha/sysdep.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #define MOVE(x,y) mov x, y diff --git a/sysdeps/mach/alpha/thread_state.h b/sysdeps/mach/alpha/thread_state.h index dc30a79926..0c9527bd26 100644 --- a/sysdeps/mach/alpha/thread_state.h +++ b/sysdeps/mach/alpha/thread_state.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/mach/hppa/machine-lock.h b/sysdeps/mach/hppa/machine-lock.h index 8b425d2c6d..8c71d40a5a 100644 --- a/sysdeps/mach/hppa/machine-lock.h +++ b/sysdeps/mach/hppa/machine-lock.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _MACHINE_LOCK_H #define _MACHINE_LOCK_H diff --git a/sysdeps/mach/hurd/alpha/bits/sigcontext.h b/sysdeps/mach/hurd/alpha/bits/sigcontext.h index a2c8163599..158db61876 100644 --- a/sysdeps/mach/hurd/alpha/bits/sigcontext.h +++ b/sysdeps/mach/hurd/alpha/bits/sigcontext.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SIGNAL_H # error "Never use directly; include instead." diff --git a/sysdeps/mach/hurd/alpha/exc2signal.c b/sysdeps/mach/hurd/alpha/exc2signal.c index 072db334e0..3bceb64b22 100644 --- a/sysdeps/mach/hurd/alpha/exc2signal.c +++ b/sysdeps/mach/hurd/alpha/exc2signal.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/mach/hurd/alpha/longjmp-ts.c b/sysdeps/mach/hurd/alpha/longjmp-ts.c index 07dff563fb..eb2764977c 100644 --- a/sysdeps/mach/hurd/alpha/longjmp-ts.c +++ b/sysdeps/mach/hurd/alpha/longjmp-ts.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/mach/hurd/alpha/sigreturn.c b/sysdeps/mach/hurd/alpha/sigreturn.c index 102b0231d8..e520b35e73 100644 --- a/sysdeps/mach/hurd/alpha/sigreturn.c +++ b/sysdeps/mach/hurd/alpha/sigreturn.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/mach/hurd/alpha/trampoline.c b/sysdeps/mach/hurd/alpha/trampoline.c index a1d0dfb5a7..152f935b13 100644 --- a/sysdeps/mach/hurd/alpha/trampoline.c +++ b/sysdeps/mach/hurd/alpha/trampoline.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include "thread_state.h" diff --git a/sysdeps/mach/hurd/hppa/bits/sigcontext.h b/sysdeps/mach/hurd/hppa/bits/sigcontext.h index f0b4ff7a9b..0042359562 100644 --- a/sysdeps/mach/hurd/hppa/bits/sigcontext.h +++ b/sysdeps/mach/hurd/hppa/bits/sigcontext.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SIGNAL_H # error "Never use directly; include instead." diff --git a/sysdeps/mach/hurd/hppa/trampoline.c b/sysdeps/mach/hurd/hppa/trampoline.c index b046b945a4..bbb5b960ac 100644 --- a/sysdeps/mach/hurd/hppa/trampoline.c +++ b/sysdeps/mach/hurd/hppa/trampoline.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include "thread_state.h" diff --git a/sysdeps/mach/hurd/mips/bits/sigcontext.h b/sysdeps/mach/hurd/mips/bits/sigcontext.h index 910618e32a..deea841b62 100644 --- a/sysdeps/mach/hurd/mips/bits/sigcontext.h +++ b/sysdeps/mach/hurd/mips/bits/sigcontext.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SIGNAL_H # error "Never use directly; include instead." diff --git a/sysdeps/mach/hurd/mips/dl-machine.c b/sysdeps/mach/hurd/mips/dl-machine.c index e4955e441d..ce2d5db510 100644 --- a/sysdeps/mach/hurd/mips/dl-machine.c +++ b/sysdeps/mach/hurd/mips/dl-machine.c @@ -4,19 +4,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/mach/hurd/mips/exc2signal.c b/sysdeps/mach/hurd/mips/exc2signal.c index 235b2e2947..c505ae5b22 100644 --- a/sysdeps/mach/hurd/mips/exc2signal.c +++ b/sysdeps/mach/hurd/mips/exc2signal.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/mach/hurd/mips/init-fault.c b/sysdeps/mach/hurd/mips/init-fault.c index 619ef996a9..05f48a3a56 100644 --- a/sysdeps/mach/hurd/mips/init-fault.c +++ b/sysdeps/mach/hurd/mips/init-fault.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/mach/hurd/mips/init-first.c b/sysdeps/mach/hurd/mips/init-first.c index 72c7a61cb0..b81fe3cc3c 100644 --- a/sysdeps/mach/hurd/mips/init-first.c +++ b/sysdeps/mach/hurd/mips/init-first.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/mach/hurd/mips/intr-msg.h b/sysdeps/mach/hurd/mips/intr-msg.h index 7d155f63f3..16c78972ac 100644 --- a/sysdeps/mach/hurd/mips/intr-msg.h +++ b/sysdeps/mach/hurd/mips/intr-msg.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #ifdef __mips64 diff --git a/sysdeps/mach/hurd/mips/longjmp-ctx.c b/sysdeps/mach/hurd/mips/longjmp-ctx.c index df04900e78..66ee7b6fb8 100644 --- a/sysdeps/mach/hurd/mips/longjmp-ctx.c +++ b/sysdeps/mach/hurd/mips/longjmp-ctx.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/mach/hurd/mips/longjmp-ts.c b/sysdeps/mach/hurd/mips/longjmp-ts.c index ea62bb1bf3..4c69e4e2b9 100644 --- a/sysdeps/mach/hurd/mips/longjmp-ts.c +++ b/sysdeps/mach/hurd/mips/longjmp-ts.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/mach/hurd/mips/sigreturn.c b/sysdeps/mach/hurd/mips/sigreturn.c index 0e775736bd..a9f7673eb5 100644 --- a/sysdeps/mach/hurd/mips/sigreturn.c +++ b/sysdeps/mach/hurd/mips/sigreturn.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/mach/hurd/mips/trampoline.c b/sysdeps/mach/hurd/mips/trampoline.c index 284b95c330..dd42dfc1c6 100644 --- a/sysdeps/mach/hurd/mips/trampoline.c +++ b/sysdeps/mach/hurd/mips/trampoline.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/mach/mips/cacheflush.c b/sysdeps/mach/mips/cacheflush.c index de2ec58bff..2a283e3e89 100644 --- a/sysdeps/mach/mips/cacheflush.c +++ b/sysdeps/mach/mips/cacheflush.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/mach/mips/machine-lock.h b/sysdeps/mach/mips/machine-lock.h index 91d39e3753..eccc720dfa 100644 --- a/sysdeps/mach/mips/machine-lock.h +++ b/sysdeps/mach/mips/machine-lock.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _MACHINE_LOCK_H #define _MACHINE_LOCK_H diff --git a/sysdeps/mach/mips/machine-sp.h b/sysdeps/mach/mips/machine-sp.h index e1217c31f3..144356a39f 100644 --- a/sysdeps/mach/mips/machine-sp.h +++ b/sysdeps/mach/mips/machine-sp.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _MACHINE_SP_H #define _MACHINE_SP_H diff --git a/sysdeps/mach/mips/syscall.S b/sysdeps/mach/mips/syscall.S index 9936772295..f2fc29df15 100644 --- a/sysdeps/mach/mips/syscall.S +++ b/sysdeps/mach/mips/syscall.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/mach/mips/sysdep.h b/sysdeps/mach/mips/sysdep.h index 45cbf6920c..8136f95bf2 100644 --- a/sysdeps/mach/mips/sysdep.h +++ b/sysdeps/mach/mips/sysdep.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #define LOSE asm volatile ("1: b 1b") diff --git a/sysdeps/mach/mips/thread_state.h b/sysdeps/mach/mips/thread_state.h index 7aa5598f2b..a0800de2d0 100644 --- a/sysdeps/mach/mips/thread_state.h +++ b/sysdeps/mach/mips/thread_state.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #define MACHINE_THREAD_STATE_FLAVOR MIPS_THREAD_STATE #define MACHINE_THREAD_STATE_COUNT MIPS_THREAD_STATE_COUNT diff --git a/sysdeps/mips/__longjmp.c b/sysdeps/mips/__longjmp.c index 66810a51ed..750a71fd1e 100644 --- a/sysdeps/mips/__longjmp.c +++ b/sysdeps/mips/__longjmp.c @@ -3,19 +3,19 @@ Contributed by Brendan Kehoe (brendan@zen.org). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/mips/atomicity.h b/sysdeps/mips/atomicity.h index d6e1767d8c..1fe1b7aebb 100644 --- a/sysdeps/mips/atomicity.h +++ b/sysdeps/mips/atomicity.h @@ -1,22 +1,21 @@ /* Low-level functions for atomic operations. Mips version. - Copyright (C) 2001 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If - not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + 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 _MIPS_ATOMICITY_H #define _MIPS_ATOMICITY_H 1 diff --git a/sysdeps/mips/bits/dlfcn.h b/sysdeps/mips/bits/dlfcn.h index 006eeb6838..2380caa9d4 100644 --- a/sysdeps/mips/bits/dlfcn.h +++ b/sysdeps/mips/bits/dlfcn.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _DLFCN_H # error "Never use directly; include instead." diff --git a/sysdeps/mips/bits/fenv.h b/sysdeps/mips/bits/fenv.h index 4e740365b9..24e0694ca5 100644 --- a/sysdeps/mips/bits/fenv.h +++ b/sysdeps/mips/bits/fenv.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _FENV_H # error "Never use directly; include instead." diff --git a/sysdeps/mips/bits/setjmp.h b/sysdeps/mips/bits/setjmp.h index 908b6d5935..8cb53ee291 100644 --- a/sysdeps/mips/bits/setjmp.h +++ b/sysdeps/mips/bits/setjmp.h @@ -1,20 +1,21 @@ /* Define the machine-dependent type `jmp_buf'. MIPS version. Copyright (C) 1992,93,95,97,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 - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SETJMP_H # error "Never include directly; use instead." diff --git a/sysdeps/mips/bsd-_setjmp.S b/sysdeps/mips/bsd-_setjmp.S index 919c8a28f8..2a4e32111a 100644 --- a/sysdeps/mips/bsd-_setjmp.S +++ b/sysdeps/mips/bsd-_setjmp.S @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* This just does a tail-call to `__sigsetjmp (ARG, 0)'. We cannot do it in C because it must be a tail-call, so frame-unwinding diff --git a/sysdeps/mips/bsd-setjmp.S b/sysdeps/mips/bsd-setjmp.S index 66a0daa23e..0aea011328 100644 --- a/sysdeps/mips/bsd-setjmp.S +++ b/sysdeps/mips/bsd-setjmp.S @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* This just does a tail-call to `__sigsetjmp (ARG, 1)'. We cannot do it in C because it must be a tail-call, so frame-unwinding diff --git a/sysdeps/mips/dl-dtprocnum.h b/sysdeps/mips/dl-dtprocnum.h index bff02c8412..dfd03ba317 100644 --- a/sysdeps/mips/dl-dtprocnum.h +++ b/sysdeps/mips/dl-dtprocnum.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Number of extra dynamic section entries for this architecture. By default there are none. */ diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 6a7d66c5b3..4e0b591d8e 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -4,19 +4,19 @@ Contributed by Kazumoto Kojima . 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* FIXME: Profiling of shared libraries is not implemented yet. */ #ifndef dl_machine_h diff --git a/sysdeps/mips/elf/ldsodefs.h b/sysdeps/mips/elf/ldsodefs.h index 2dc783b57e..4054391814 100644 --- a/sysdeps/mips/elf/ldsodefs.h +++ b/sysdeps/mips/elf/ldsodefs.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* The MIPS ABI specifies that the dynamic section has to be read-only. */ diff --git a/sysdeps/mips/elf/start.S b/sysdeps/mips/elf/start.S index 19bf93a643..e129930505 100644 --- a/sysdeps/mips/elf/start.S +++ b/sysdeps/mips/elf/start.S @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #define __ASSEMBLY__ 1 #include diff --git a/sysdeps/mips/fpregdef.h b/sysdeps/mips/fpregdef.h index 25b93cade4..6f76d1183d 100644 --- a/sysdeps/mips/fpregdef.h +++ b/sysdeps/mips/fpregdef.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _FPREGDEF_H #define _FPREGDEF_H diff --git a/sysdeps/mips/fpu/fclrexcpt.c b/sysdeps/mips/fpu/fclrexcpt.c index 9ed8486f6f..9fb2d7e803 100644 --- a/sysdeps/mips/fpu/fclrexcpt.c +++ b/sysdeps/mips/fpu/fclrexcpt.c @@ -4,19 +4,19 @@ Contributed by Andreas Jaeger , 1998. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/mips/fpu/fedisblxcpt.c b/sysdeps/mips/fpu/fedisblxcpt.c index 2d2ec8c86c..62e1a7130a 100644 --- a/sysdeps/mips/fpu/fedisblxcpt.c +++ b/sysdeps/mips/fpu/fedisblxcpt.c @@ -4,19 +4,19 @@ Contributed by Andreas Jaeger , 2000. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/mips/fpu/feenablxcpt.c b/sysdeps/mips/fpu/feenablxcpt.c index 4e63c6669c..4c285811db 100644 --- a/sysdeps/mips/fpu/feenablxcpt.c +++ b/sysdeps/mips/fpu/feenablxcpt.c @@ -4,19 +4,19 @@ Contributed by Andreas Jaeger , 2000. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/mips/fpu/fegetenv.c b/sysdeps/mips/fpu/fegetenv.c index 5882305566..1edb815fad 100644 --- a/sysdeps/mips/fpu/fegetenv.c +++ b/sysdeps/mips/fpu/fegetenv.c @@ -4,19 +4,19 @@ Contributed by Andreas Jaeger , 1998. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/mips/fpu/fegetexcept.c b/sysdeps/mips/fpu/fegetexcept.c index c065398a64..14b1241294 100644 --- a/sysdeps/mips/fpu/fegetexcept.c +++ b/sysdeps/mips/fpu/fegetexcept.c @@ -4,19 +4,19 @@ Contributed by Andreas Jaeger , 2000. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/mips/fpu/fegetround.c b/sysdeps/mips/fpu/fegetround.c index e2e51ae64d..efb1ba0dcc 100644 --- a/sysdeps/mips/fpu/fegetround.c +++ b/sysdeps/mips/fpu/fegetround.c @@ -4,19 +4,19 @@ Contributed by Andreas Jaeger , 1998. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/mips/fpu/feholdexcpt.c b/sysdeps/mips/fpu/feholdexcpt.c index ab92a71e0d..bb37148fff 100644 --- a/sysdeps/mips/fpu/feholdexcpt.c +++ b/sysdeps/mips/fpu/feholdexcpt.c @@ -4,19 +4,19 @@ Contributed by Andreas Jaeger , 2000. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/mips/fpu/fenv_libc.h b/sysdeps/mips/fpu/fenv_libc.h index 4d8d3eb4a7..dc30888ada 100644 --- a/sysdeps/mips/fpu/fenv_libc.h +++ b/sysdeps/mips/fpu/fenv_libc.h @@ -3,19 +3,19 @@ Contributed by Andreas Jaeger . 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _FENV_LIBC_H #define _FENV_LIBC_H 1 diff --git a/sysdeps/mips/fpu/fesetenv.c b/sysdeps/mips/fpu/fesetenv.c index ff84a412a5..6bd894a95f 100644 --- a/sysdeps/mips/fpu/fesetenv.c +++ b/sysdeps/mips/fpu/fesetenv.c @@ -4,19 +4,19 @@ Contributed by Andreas Jaeger , 1998. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/mips/fpu/fesetround.c b/sysdeps/mips/fpu/fesetround.c index ae6ae86bb1..af73a720f8 100644 --- a/sysdeps/mips/fpu/fesetround.c +++ b/sysdeps/mips/fpu/fesetround.c @@ -4,19 +4,19 @@ Contributed by Andreas Jaeger , 1998. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/mips/fpu/feupdateenv.c b/sysdeps/mips/fpu/feupdateenv.c index 86ba6f90e1..c883d07b1b 100644 --- a/sysdeps/mips/fpu/feupdateenv.c +++ b/sysdeps/mips/fpu/feupdateenv.c @@ -4,19 +4,19 @@ Contributed by Andreas Jaeger , 1998. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/mips/fpu/fgetexcptflg.c b/sysdeps/mips/fpu/fgetexcptflg.c index 0f7fea3941..d4bbfc3a2a 100644 --- a/sysdeps/mips/fpu/fgetexcptflg.c +++ b/sysdeps/mips/fpu/fgetexcptflg.c @@ -4,19 +4,19 @@ Contributed by Andreas Jaeger , 1998. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/mips/fpu/fraiseexcpt.c b/sysdeps/mips/fpu/fraiseexcpt.c index 25c09e3912..582210aca3 100644 --- a/sysdeps/mips/fpu/fraiseexcpt.c +++ b/sysdeps/mips/fpu/fraiseexcpt.c @@ -4,19 +4,19 @@ Contributed by Andreas Jaeger , 2000. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/mips/fpu/ftestexcept.c b/sysdeps/mips/fpu/ftestexcept.c index f348258318..6a833f7563 100644 --- a/sysdeps/mips/fpu/ftestexcept.c +++ b/sysdeps/mips/fpu/ftestexcept.c @@ -4,19 +4,19 @@ Contributed by Andreas Jaeger , 1998. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/mips/fpu_control.h b/sysdeps/mips/fpu_control.h index c5c83e0442..da18deab5a 100644 --- a/sysdeps/mips/fpu_control.h +++ b/sysdeps/mips/fpu_control.h @@ -4,19 +4,19 @@ Contributed by Olaf Flebbe and Ralf Baechle. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _FPU_CONTROL_H #define _FPU_CONTROL_H diff --git a/sysdeps/mips/init-first.c b/sysdeps/mips/init-first.c index 309ff8bcf1..b67a44431c 100644 --- a/sysdeps/mips/init-first.c +++ b/sysdeps/mips/init-first.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/mips/machine-gmon.h b/sysdeps/mips/machine-gmon.h index 8b35a9194d..8a56c76689 100644 --- a/sysdeps/mips/machine-gmon.h +++ b/sysdeps/mips/machine-gmon.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #define _MCOUNT_DECL static void __mcount diff --git a/sysdeps/mips/memusage.h b/sysdeps/mips/memusage.h index 8e421e4c24..dc1cc9ca14 100644 --- a/sysdeps/mips/memusage.h +++ b/sysdeps/mips/memusage.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #define GETSP() ({ register uintptr_t stack_ptr asm ("$29"); stack_ptr; }) diff --git a/sysdeps/mips/mips64/__longjmp.c b/sysdeps/mips/mips64/__longjmp.c index 3527be5e95..6523d49d9c 100644 --- a/sysdeps/mips/mips64/__longjmp.c +++ b/sysdeps/mips/mips64/__longjmp.c @@ -3,19 +3,19 @@ Contributed by Brendan Kehoe (brendan@zen.org). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/mips/mips64/bits/setjmp.h b/sysdeps/mips/mips64/bits/setjmp.h index 9f08f4e1af..e126427dbd 100644 --- a/sysdeps/mips/mips64/bits/setjmp.h +++ b/sysdeps/mips/mips64/bits/setjmp.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SETJMP_H # error "Never include directly; use instead." diff --git a/sysdeps/mips/mips64/bsd-_setjmp.S b/sysdeps/mips/mips64/bsd-_setjmp.S index 7c70f5b0bf..b92ac98505 100644 --- a/sysdeps/mips/mips64/bsd-_setjmp.S +++ b/sysdeps/mips/mips64/bsd-_setjmp.S @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* This just does a tail-call to `__sigsetjmp (ARG, 0)'. We cannot do it in C because it must be a tail-call, so frame-unwinding diff --git a/sysdeps/mips/mips64/bsd-setjmp.S b/sysdeps/mips/mips64/bsd-setjmp.S index b37031679d..ee8678728c 100644 --- a/sysdeps/mips/mips64/bsd-setjmp.S +++ b/sysdeps/mips/mips64/bsd-setjmp.S @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* This just does a tail-call to `__sigsetjmp (ARG, 1)'. We cannot do it in C because it must be a tail-call, so frame-unwinding diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h index 59bd581eae..3ecb3c2afc 100644 --- a/sysdeps/mips/mips64/dl-machine.h +++ b/sysdeps/mips/mips64/dl-machine.h @@ -4,19 +4,19 @@ Contributed by Kazumoto Kojima . 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 dl_machine_h #define dl_machine_h diff --git a/sysdeps/mips/mips64/setjmp.S b/sysdeps/mips/mips64/setjmp.S index 127ab4298c..5e18897d88 100644 --- a/sysdeps/mips/mips64/setjmp.S +++ b/sysdeps/mips/mips64/setjmp.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/mips/mips64/setjmp_aux.c b/sysdeps/mips/mips64/setjmp_aux.c index 19d06e9999..6d1c9390bb 100644 --- a/sysdeps/mips/mips64/setjmp_aux.c +++ b/sysdeps/mips/mips64/setjmp_aux.c @@ -3,19 +3,19 @@ Contributed by Brendan Kehoe (brendan@zen.org). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/mips/regdef.h b/sysdeps/mips/regdef.h index 0fa50f0926..bc7f13b4b5 100644 --- a/sysdeps/mips/regdef.h +++ b/sysdeps/mips/regdef.h @@ -3,19 +3,19 @@ Contributed by Ralf Baechle . 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _REGDEF_H #define _REGDEF_H diff --git a/sysdeps/mips/setjmp.S b/sysdeps/mips/setjmp.S index 804b27e897..01ef313995 100644 --- a/sysdeps/mips/setjmp.S +++ b/sysdeps/mips/setjmp.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/mips/setjmp_aux.c b/sysdeps/mips/setjmp_aux.c index e7b83c4d3c..1cd2b2155e 100644 --- a/sysdeps/mips/setjmp_aux.c +++ b/sysdeps/mips/setjmp_aux.c @@ -3,19 +3,19 @@ Contributed by Brendan Kehoe (brendan@zen.org). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/mips/sgidefs.h b/sysdeps/mips/sgidefs.h index 56567e884e..16b7c8ccc9 100644 --- a/sysdeps/mips/sgidefs.h +++ b/sysdeps/mips/sgidefs.h @@ -3,19 +3,19 @@ Contributed by Ralf Baechle . 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SGIDEFS_H #define _SGIDEFS_H 1 diff --git a/sysdeps/mips/stackinfo.h b/sysdeps/mips/stackinfo.h index 612d251807..86e3d621ba 100644 --- a/sysdeps/mips/stackinfo.h +++ b/sysdeps/mips/stackinfo.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* This file contains a bit of information about the stack allocation of the processor. */ diff --git a/sysdeps/mips/sys/asm.h b/sysdeps/mips/sys/asm.h index b90a331ab7..1e5ea9a9b7 100644 --- a/sysdeps/mips/sys/asm.h +++ b/sysdeps/mips/sys/asm.h @@ -3,19 +3,19 @@ Contributed by Ralf Baechle . 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_ASM_H #define _SYS_ASM_H diff --git a/sysdeps/mips/sys/fpregdef.h b/sysdeps/mips/sys/fpregdef.h index ef7309c454..378115274f 100644 --- a/sysdeps/mips/sys/fpregdef.h +++ b/sysdeps/mips/sys/fpregdef.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_FPREGDEF_H #define _SYS_FPREGDEF_H diff --git a/sysdeps/mips/sys/regdef.h b/sysdeps/mips/sys/regdef.h index 9f7b3181c0..c4df603836 100644 --- a/sysdeps/mips/sys/regdef.h +++ b/sysdeps/mips/sys/regdef.h @@ -3,19 +3,19 @@ Contributed by Ralf Baechle . 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_REGDEF_H #define _SYS_REGDEF_H diff --git a/sysdeps/mips/sys/ucontext.h b/sysdeps/mips/sys/ucontext.h index 741fb28df7..90c992dae6 100644 --- a/sysdeps/mips/sys/ucontext.h +++ b/sysdeps/mips/sys/ucontext.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* System V/mips ABI compliant context switching support. */ diff --git a/sysdeps/rs6000/ffs.c b/sysdeps/rs6000/ffs.c index 2cf2302605..802bbc8c31 100644 --- a/sysdeps/rs6000/ffs.c +++ b/sysdeps/rs6000/ffs.c @@ -5,19 +5,19 @@ Contributed by Torbjorn Granlund (tege@sics.se). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/rs6000/memcopy.h b/sysdeps/rs6000/memcopy.h index 7f84f8807d..8bdb6e9766 100644 --- a/sysdeps/rs6000/memcopy.h +++ b/sysdeps/rs6000/memcopy.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/standalone/arm/bits/errno.h b/sysdeps/standalone/arm/bits/errno.h index 7d628b1a2d..2700c17338 100644 --- a/sysdeps/standalone/arm/bits/errno.h +++ b/sysdeps/standalone/arm/bits/errno.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* This file defines the `errno' constants for standalone ARM machines. These constants are essentially arbitrary. */ diff --git a/sysdeps/standalone/arm/sysdep.c b/sysdeps/standalone/arm/sysdep.c index d2564204ea..8c17234226 100644 --- a/sysdeps/standalone/arm/sysdep.c +++ b/sysdeps/standalone/arm/sysdep.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/standalone/bits/errno.h b/sysdeps/standalone/bits/errno.h index d4f7879280..c7d3755a15 100644 --- a/sysdeps/standalone/bits/errno.h +++ b/sysdeps/standalone/bits/errno.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* This file defines the `errno' constants. */ diff --git a/sysdeps/standalone/brk.c b/sysdeps/standalone/brk.c index 6ee9935092..32e148edcc 100644 --- a/sysdeps/standalone/brk.c +++ b/sysdeps/standalone/brk.c @@ -4,19 +4,19 @@ On-Line Applications Research Corporation. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/standalone/close.c b/sysdeps/standalone/close.c index 114d726c6d..b0fa5f0c8b 100644 --- a/sysdeps/standalone/close.c +++ b/sysdeps/standalone/close.c @@ -4,19 +4,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/standalone/dirstream.h b/sysdeps/standalone/dirstream.h index d7cb9bc471..6f58294b4c 100644 --- a/sysdeps/standalone/dirstream.h +++ b/sysdeps/standalone/dirstream.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _DIRSTREAM_H diff --git a/sysdeps/standalone/filedesc.h b/sysdeps/standalone/filedesc.h index 088c3bbacb..b7c15b5010 100644 --- a/sysdeps/standalone/filedesc.h +++ b/sysdeps/standalone/filedesc.h @@ -4,19 +4,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* * This is the file descriptor used by the no OS implementation diff --git a/sysdeps/standalone/i386/force_cpu386/Makefile b/sysdeps/standalone/i386/force_cpu386/Makefile index 3ed09643b2..5cb4f2819d 100644 --- a/sysdeps/standalone/i386/force_cpu386/Makefile +++ b/sysdeps/standalone/i386/force_cpu386/Makefile @@ -4,19 +4,19 @@ # On-Line Applications Research Corporation. # 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 published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. +# 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 -# Library General Public License for more details. +# Lesser General Public License for more details. -# You should have received a copy of the GNU Library General Public -# License along with the GNU C Library; see the file COPYING.LIB. If not, -# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. +# 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. ifeq (bare,$(subdir)) install-others += $(inst_libdir)/force_cpu386.ld diff --git a/sysdeps/standalone/i386/force_cpu386/_exit.c b/sysdeps/standalone/i386/force_cpu386/_exit.c index 5f9e5e3116..2b1d090fa8 100644 --- a/sysdeps/standalone/i386/force_cpu386/_exit.c +++ b/sysdeps/standalone/i386/force_cpu386/_exit.c @@ -4,19 +4,19 @@ On-Line Applications Research Corporation. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/standalone/i386/force_cpu386/brdinit.c b/sysdeps/standalone/i386/force_cpu386/brdinit.c index c16aa6029a..e94dc35f63 100644 --- a/sysdeps/standalone/i386/force_cpu386/brdinit.c +++ b/sysdeps/standalone/i386/force_cpu386/brdinit.c @@ -4,19 +4,19 @@ On-Line Applications Research Corporation. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include "i386.h" diff --git a/sysdeps/standalone/i386/force_cpu386/console.c b/sysdeps/standalone/i386/force_cpu386/console.c index d0fd35fd06..4c7271b660 100644 --- a/sysdeps/standalone/i386/force_cpu386/console.c +++ b/sysdeps/standalone/i386/force_cpu386/console.c @@ -4,19 +4,19 @@ On-Line Applications Research Corporation. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include "i386.h" diff --git a/sysdeps/standalone/i386/force_cpu386/strtsupp.S b/sysdeps/standalone/i386/force_cpu386/strtsupp.S index 4016c81c90..5d9ac5c4a1 100644 --- a/sysdeps/standalone/i386/force_cpu386/strtsupp.S +++ b/sysdeps/standalone/i386/force_cpu386/strtsupp.S @@ -4,19 +4,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* This file assists the board independent startup code by * loading the proper segment register values. The values diff --git a/sysdeps/standalone/i386/force_cpu386/target.ld b/sysdeps/standalone/i386/force_cpu386/target.ld index 09252cc783..d040cf9784 100644 --- a/sysdeps/standalone/i386/force_cpu386/target.ld +++ b/sysdeps/standalone/i386/force_cpu386/target.ld @@ -4,19 +4,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* This file contains directives for the GNU linker which are specific to the FORCE CPU386 board. */ diff --git a/sysdeps/standalone/i386/i386.h b/sysdeps/standalone/i386/i386.h index d76f4815cc..364e8abb3d 100644 --- a/sysdeps/standalone/i386/i386.h +++ b/sysdeps/standalone/i386/i386.h @@ -4,19 +4,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* i386.h * diff --git a/sysdeps/standalone/i386/start.S b/sysdeps/standalone/i386/start.S index 41e0bfb135..d0037638da 100644 --- a/sysdeps/standalone/i386/start.S +++ b/sysdeps/standalone/i386/start.S @@ -4,19 +4,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* entry.s * diff --git a/sysdeps/standalone/i960/i960ca.h b/sysdeps/standalone/i960/i960ca.h index 253d5d932f..0dcf5c374a 100644 --- a/sysdeps/standalone/i960/i960ca.h +++ b/sysdeps/standalone/i960/i960ca.h @@ -4,19 +4,19 @@ On-Line Applications Research Corporation. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* i960ca.h * diff --git a/sysdeps/standalone/i960/nindy960/Makefile b/sysdeps/standalone/i960/nindy960/Makefile index aab52dcb76..40ead970ad 100644 --- a/sysdeps/standalone/i960/nindy960/Makefile +++ b/sysdeps/standalone/i960/nindy960/Makefile @@ -4,19 +4,19 @@ # On-Line Applications Research Corporation. # 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 published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. +# 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 -# Library General Public License for more details. +# Lesser General Public License for more details. -# You should have received a copy of the GNU Library General Public -# License along with the GNU C Library; see the file COPYING.LIB. If not, -# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. +# 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. # The nindy960 support has only been tested on the following boards: diff --git a/sysdeps/standalone/i960/nindy960/_exit.c b/sysdeps/standalone/i960/nindy960/_exit.c index 8ca6e78e80..9cd3f8519e 100644 --- a/sysdeps/standalone/i960/nindy960/_exit.c +++ b/sysdeps/standalone/i960/nindy960/_exit.c @@ -4,19 +4,19 @@ On-Line Applications Research Corporation. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/standalone/i960/nindy960/brdinit.c b/sysdeps/standalone/i960/nindy960/brdinit.c index 9cc916882d..9985a9930e 100644 --- a/sysdeps/standalone/i960/nindy960/brdinit.c +++ b/sysdeps/standalone/i960/nindy960/brdinit.c @@ -4,19 +4,19 @@ On-Line Applications Research Corporation. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include "i960ca.h" diff --git a/sysdeps/standalone/i960/nindy960/console.c b/sysdeps/standalone/i960/nindy960/console.c index cf52ec6035..b062d9215b 100644 --- a/sysdeps/standalone/i960/nindy960/console.c +++ b/sysdeps/standalone/i960/nindy960/console.c @@ -4,19 +4,19 @@ On-Line Applications Research Corporation. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include "i960ca.h" diff --git a/sysdeps/standalone/i960/start.S b/sysdeps/standalone/i960/start.S index d86fb1440f..993a3f2949 100644 --- a/sysdeps/standalone/i960/start.S +++ b/sysdeps/standalone/i960/start.S @@ -4,19 +4,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* entry.s * diff --git a/sysdeps/standalone/m68k/m68020/m68020.h b/sysdeps/standalone/m68k/m68020/m68020.h index 8fce423f96..8eee00753e 100644 --- a/sysdeps/standalone/m68k/m68020/m68020.h +++ b/sysdeps/standalone/m68k/m68020/m68020.h @@ -4,19 +4,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* m68020.h * diff --git a/sysdeps/standalone/m68k/m68020/mvme136/Makefile b/sysdeps/standalone/m68k/m68020/mvme136/Makefile index 11c0620123..122c1b183e 100644 --- a/sysdeps/standalone/m68k/m68020/mvme136/Makefile +++ b/sysdeps/standalone/m68k/m68020/mvme136/Makefile @@ -4,19 +4,19 @@ # On-Line Applications Research Corporation. # 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 published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. +# 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 -# Library General Public License for more details. +# Lesser General Public License for more details. -# You should have received a copy of the GNU Library General Public -# License along with the GNU C Library; see the file COPYING.LIB. If not, -# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. +# 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. ifeq (bare,$(subdir)) install-lib += mvme136.ld diff --git a/sysdeps/standalone/m68k/m68020/mvme136/_exit.c b/sysdeps/standalone/m68k/m68020/mvme136/_exit.c index ecd93db129..e5e078c198 100644 --- a/sysdeps/standalone/m68k/m68020/mvme136/_exit.c +++ b/sysdeps/standalone/m68k/m68020/mvme136/_exit.c @@ -4,19 +4,19 @@ On-Line Applications Research Corporation. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/standalone/m68k/m68020/mvme136/brdinit.c b/sysdeps/standalone/m68k/m68020/mvme136/brdinit.c index c477441104..95b81c1e1b 100644 --- a/sysdeps/standalone/m68k/m68020/mvme136/brdinit.c +++ b/sysdeps/standalone/m68k/m68020/mvme136/brdinit.c @@ -4,19 +4,19 @@ On-Line Applications Research Corporation. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include "m68020.h" diff --git a/sysdeps/standalone/m68k/m68020/mvme136/console.c b/sysdeps/standalone/m68k/m68020/mvme136/console.c index cafb1abfe7..85dee983bf 100644 --- a/sysdeps/standalone/m68k/m68020/mvme136/console.c +++ b/sysdeps/standalone/m68k/m68020/mvme136/console.c @@ -4,19 +4,19 @@ On-Line Applications Research Corporation. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include "m68020.h" diff --git a/sysdeps/standalone/m68k/m68020/mvme136/mvme136.ld b/sysdeps/standalone/m68k/m68020/mvme136/mvme136.ld index e25492a235..9a352f0095 100644 --- a/sysdeps/standalone/m68k/m68020/mvme136/mvme136.ld +++ b/sysdeps/standalone/m68k/m68020/mvme136/mvme136.ld @@ -4,19 +4,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* This file contains directives for the GNU linker which are specific to the Motorola MVME136/MVME135 boards. */ diff --git a/sysdeps/standalone/m68k/m68020/start.S b/sysdeps/standalone/m68k/m68020/start.S index fb6fd3eb1a..855652b854 100644 --- a/sysdeps/standalone/m68k/m68020/start.S +++ b/sysdeps/standalone/m68k/m68020/start.S @@ -4,19 +4,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* entry.s * diff --git a/sysdeps/standalone/open.c b/sysdeps/standalone/open.c index 25e26104c6..2be04f4b26 100644 --- a/sysdeps/standalone/open.c +++ b/sysdeps/standalone/open.c @@ -4,19 +4,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/standalone/read.c b/sysdeps/standalone/read.c index 43bc0d6666..2daee870d0 100644 --- a/sysdeps/standalone/read.c +++ b/sysdeps/standalone/read.c @@ -4,19 +4,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/standalone/standalone.h b/sysdeps/standalone/standalone.h index 57687da0f4..4a881991a7 100644 --- a/sysdeps/standalone/standalone.h +++ b/sysdeps/standalone/standalone.h @@ -4,19 +4,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _STANDALONE_H #define _STANDALONE_H diff --git a/sysdeps/standalone/write.c b/sysdeps/standalone/write.c index 9226bccc62..a5fe44ea26 100644 --- a/sysdeps/standalone/write.c +++ b/sysdeps/standalone/write.c @@ -4,19 +4,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S index 53fc454eb6..5279b86076 100644 --- a/sysdeps/unix/alpha/sysdep.S +++ b/sysdeps/unix/alpha/sysdep.S @@ -1,20 +1,21 @@ /* Copyright (C) 1993, 1996, 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If - not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h index 5bedcf95ca..7da33c87f2 100644 --- a/sysdeps/unix/alpha/sysdep.h +++ b/sysdeps/unix/alpha/sysdep.h @@ -3,19 +3,19 @@ Contributed by Brendan Kehoe (brendan@zen.org). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/arm/brk.S b/sysdeps/unix/arm/brk.S index b3924a3d6d..c68fec6266 100644 --- a/sysdeps/unix/arm/brk.S +++ b/sysdeps/unix/arm/brk.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/arm/fork.S b/sysdeps/unix/arm/fork.S index b70d15747b..a03fbe242e 100644 --- a/sysdeps/unix/arm/fork.S +++ b/sysdeps/unix/arm/fork.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/arm/start.c b/sysdeps/unix/arm/start.c index 772384727a..a8fea14b9f 100644 --- a/sysdeps/unix/arm/start.c +++ b/sysdeps/unix/arm/start.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/arm/sysdep.S b/sysdeps/unix/arm/sysdep.S index 5795f5e5d3..6487caa919 100644 --- a/sysdeps/unix/arm/sysdep.S +++ b/sysdeps/unix/arm/sysdep.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #define _ERRNO_H diff --git a/sysdeps/unix/arm/sysdep.h b/sysdeps/unix/arm/sysdep.h index 6f0efc0c73..d776b45aa2 100644 --- a/sysdeps/unix/arm/sysdep.h +++ b/sysdeps/unix/arm/sysdep.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/bsd/hp/m68k/brk.S b/sysdeps/unix/bsd/hp/m68k/brk.S index a474eb5be6..037d4d0d07 100644 --- a/sysdeps/unix/bsd/hp/m68k/brk.S +++ b/sysdeps/unix/bsd/hp/m68k/brk.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/bsd/hp/m68k/sysdep.h b/sysdeps/unix/bsd/hp/m68k/sysdep.h index f173ce4d0d..75aee674f5 100644 --- a/sysdeps/unix/bsd/hp/m68k/sysdep.h +++ b/sysdeps/unix/bsd/hp/m68k/sysdep.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* This code wants to be run through m4. */ diff --git a/sysdeps/unix/bsd/hp/m68k/vfork.S b/sysdeps/unix/bsd/hp/m68k/vfork.S index 33af14e06a..4bb5939dbe 100644 --- a/sysdeps/unix/bsd/hp/m68k/vfork.S +++ b/sysdeps/unix/bsd/hp/m68k/vfork.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/bsd/hp/m68k/wait3.S b/sysdeps/unix/bsd/hp/m68k/wait3.S index d106feafe4..5b63191827 100644 --- a/sysdeps/unix/bsd/hp/m68k/wait3.S +++ b/sysdeps/unix/bsd/hp/m68k/wait3.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/bsd/m68k/pipe.S b/sysdeps/unix/bsd/m68k/pipe.S index 2a4134a338..93db95e149 100644 --- a/sysdeps/unix/bsd/m68k/pipe.S +++ b/sysdeps/unix/bsd/m68k/pipe.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/bsd/m68k/syscall.S b/sysdeps/unix/bsd/m68k/syscall.S index a85a898f2c..eb1a8ec7a9 100644 --- a/sysdeps/unix/bsd/m68k/syscall.S +++ b/sysdeps/unix/bsd/m68k/syscall.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/bsd/m68k/sysdep.S b/sysdeps/unix/bsd/m68k/sysdep.S index f43240cf44..90f35c9bcc 100644 --- a/sysdeps/unix/bsd/m68k/sysdep.S +++ b/sysdeps/unix/bsd/m68k/sysdep.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #define _ERRNO_H #include diff --git a/sysdeps/unix/bsd/m68k/wait.S b/sysdeps/unix/bsd/m68k/wait.S index 0b502c4742..9fb4fd93bd 100644 --- a/sysdeps/unix/bsd/m68k/wait.S +++ b/sysdeps/unix/bsd/m68k/wait.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/bsd/osf/alpha/bits/stat.h b/sysdeps/unix/bsd/osf/alpha/bits/stat.h index 6fad8cfd0c..20f358f70a 100644 --- a/sysdeps/unix/bsd/osf/alpha/bits/stat.h +++ b/sysdeps/unix/bsd/osf/alpha/bits/stat.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_STAT_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/bsd/osf/alpha/brk.S b/sysdeps/unix/bsd/osf/alpha/brk.S index 394cd3a74e..51abaa6c1b 100644 --- a/sysdeps/unix/bsd/osf/alpha/brk.S +++ b/sysdeps/unix/bsd/osf/alpha/brk.S @@ -3,19 +3,19 @@ Contributed by Brendan Kehoe (brendan@zen.org). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/bsd/osf/alpha/fork.S b/sysdeps/unix/bsd/osf/alpha/fork.S index 139676104a..90cf4bd9c8 100644 --- a/sysdeps/unix/bsd/osf/alpha/fork.S +++ b/sysdeps/unix/bsd/osf/alpha/fork.S @@ -3,19 +3,19 @@ Contributed by Brendan Kehoe (brendan@zen.org). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/bsd/osf/alpha/killpg.S b/sysdeps/unix/bsd/osf/alpha/killpg.S index 92ba1beffe..741616bc76 100644 --- a/sysdeps/unix/bsd/osf/alpha/killpg.S +++ b/sysdeps/unix/bsd/osf/alpha/killpg.S @@ -3,19 +3,19 @@ Contributed by Brendan Kehoe (brendan@zen.org). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/bsd/osf/alpha/pipe.S b/sysdeps/unix/bsd/osf/alpha/pipe.S index 05736a8dd5..0916ff4e74 100644 --- a/sysdeps/unix/bsd/osf/alpha/pipe.S +++ b/sysdeps/unix/bsd/osf/alpha/pipe.S @@ -3,19 +3,19 @@ Contributed by Brendan Kehoe (brendan@zen.org). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/bsd/osf/alpha/recv.S b/sysdeps/unix/bsd/osf/alpha/recv.S index 914b6ebb0e..92a273d150 100644 --- a/sysdeps/unix/bsd/osf/alpha/recv.S +++ b/sysdeps/unix/bsd/osf/alpha/recv.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/bsd/osf/alpha/send.S b/sysdeps/unix/bsd/osf/alpha/send.S index 8a56d8284f..7d61d46a1b 100644 --- a/sysdeps/unix/bsd/osf/alpha/send.S +++ b/sysdeps/unix/bsd/osf/alpha/send.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/bsd/osf/alpha/sigblock.S b/sysdeps/unix/bsd/osf/alpha/sigblock.S index cdb3788127..5db55f4474 100644 --- a/sysdeps/unix/bsd/osf/alpha/sigblock.S +++ b/sysdeps/unix/bsd/osf/alpha/sigblock.S @@ -3,19 +3,19 @@ Contributed by Brendan Kehoe (brendan@zen.org). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/bsd/osf/alpha/sigpause.S b/sysdeps/unix/bsd/osf/alpha/sigpause.S index 59d048dee7..021e6036e2 100644 --- a/sysdeps/unix/bsd/osf/alpha/sigpause.S +++ b/sysdeps/unix/bsd/osf/alpha/sigpause.S @@ -3,19 +3,19 @@ Contributed by Brendan Kehoe (brendan@zen.org). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/bsd/osf/alpha/sigsetmask.S b/sysdeps/unix/bsd/osf/alpha/sigsetmask.S index 04bf694770..93333aa0b6 100644 --- a/sysdeps/unix/bsd/osf/alpha/sigsetmask.S +++ b/sysdeps/unix/bsd/osf/alpha/sigsetmask.S @@ -3,19 +3,19 @@ Contributed by Brendan Kehoe (brendan@zen.org). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/bsd/osf/alpha/sigvec.S b/sysdeps/unix/bsd/osf/alpha/sigvec.S index 1090cdc687..45fcc58a03 100644 --- a/sysdeps/unix/bsd/osf/alpha/sigvec.S +++ b/sysdeps/unix/bsd/osf/alpha/sigvec.S @@ -3,19 +3,19 @@ Contributed by Brendan Kehoe (brendan@zen.org). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/bsd/osf/alpha/start.S b/sysdeps/unix/bsd/osf/alpha/start.S index 0321f56c1d..ffe6651f7d 100644 --- a/sysdeps/unix/bsd/osf/alpha/start.S +++ b/sysdeps/unix/bsd/osf/alpha/start.S @@ -3,19 +3,19 @@ Contributed by Brendan Kehoe (brendan@zen.org). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/bsd/osf/alpha/sysdep.h b/sysdeps/unix/bsd/osf/alpha/sysdep.h index 929dfc4013..84ac541aa1 100644 --- a/sysdeps/unix/bsd/osf/alpha/sysdep.h +++ b/sysdeps/unix/bsd/osf/alpha/sysdep.h @@ -3,19 +3,19 @@ Contributed by Brendan Kehoe (brendan@zen.org). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* OSF/1 does not precede the asm names of C symbols with a `_'. */ #define NO_UNDERSCORES diff --git a/sysdeps/unix/bsd/osf/alpha/vhangup.S b/sysdeps/unix/bsd/osf/alpha/vhangup.S index 2fc4094fee..3c2b04af7d 100644 --- a/sysdeps/unix/bsd/osf/alpha/vhangup.S +++ b/sysdeps/unix/bsd/osf/alpha/vhangup.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/bsd/osf/bits/mman.h b/sysdeps/unix/bsd/osf/bits/mman.h index fd5d79deef..d4672cccab 100644 --- a/sysdeps/unix/bsd/osf/bits/mman.h +++ b/sysdeps/unix/bsd/osf/bits/mman.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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_MMAN_H #define _BITS_MMAN_H 1 diff --git a/sysdeps/unix/bsd/osf/bits/sigaction.h b/sysdeps/unix/bsd/osf/bits/sigaction.h index 6bf030793e..13f9144fa2 100644 --- a/sysdeps/unix/bsd/osf/bits/sigaction.h +++ b/sysdeps/unix/bsd/osf/bits/sigaction.h @@ -4,19 +4,19 @@ Contributed by Brendan Kehoe (brendan@zen.org). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SIGNAL_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/bsd/sequent/i386/getgroups.S b/sysdeps/unix/bsd/sequent/i386/getgroups.S index fe8f58d8e1..55fa7288d4 100644 --- a/sysdeps/unix/bsd/sequent/i386/getgroups.S +++ b/sysdeps/unix/bsd/sequent/i386/getgroups.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/bsd/sequent/i386/sigvec.S b/sysdeps/unix/bsd/sequent/i386/sigvec.S index 9647849509..62373e1315 100644 --- a/sysdeps/unix/bsd/sequent/i386/sigvec.S +++ b/sysdeps/unix/bsd/sequent/i386/sigvec.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/bsd/sequent/i386/syscall.S b/sysdeps/unix/bsd/sequent/i386/syscall.S index 45c920c1f1..9ff189885b 100644 --- a/sysdeps/unix/bsd/sequent/i386/syscall.S +++ b/sysdeps/unix/bsd/sequent/i386/syscall.S @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/bsd/sequent/i386/sysdep.h b/sysdeps/unix/bsd/sequent/i386/sysdep.h index 90f2ed09d4..c3d9d919b7 100644 --- a/sysdeps/unix/bsd/sequent/i386/sysdep.h +++ b/sysdeps/unix/bsd/sequent/i386/sysdep.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h b/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h index 28cf9e22d1..db124fa15f 100644 --- a/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h +++ b/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/bsd/sun/bits/signum.h b/sysdeps/unix/bsd/sun/bits/signum.h index a327401d0b..c13e7cd742 100644 --- a/sysdeps/unix/bsd/sun/bits/signum.h +++ b/sysdeps/unix/bsd/sun/bits/signum.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #ifdef _SIGNAL_H diff --git a/sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h b/sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h index f637efa6cd..99a0506a8d 100644 --- a/sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h +++ b/sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SIGNAL_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/bsd/sun/m68k/brk.S b/sysdeps/unix/bsd/sun/m68k/brk.S index 4c460174fe..07af96d23c 100644 --- a/sysdeps/unix/bsd/sun/m68k/brk.S +++ b/sysdeps/unix/bsd/sun/m68k/brk.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/bsd/sun/m68k/sethostid.S b/sysdeps/unix/bsd/sun/m68k/sethostid.S index a3654bfcc3..73ee79682e 100644 --- a/sysdeps/unix/bsd/sun/m68k/sethostid.S +++ b/sysdeps/unix/bsd/sun/m68k/sethostid.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/bsd/sun/m68k/sigtramp.c b/sysdeps/unix/bsd/sun/m68k/sigtramp.c index f5133dbdb3..bb10848beb 100644 --- a/sysdeps/unix/bsd/sun/m68k/sigtramp.c +++ b/sysdeps/unix/bsd/sun/m68k/sigtramp.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 __GNUC__ #error This file uses GNU C extensions; you must compile with GCC. diff --git a/sysdeps/unix/bsd/sun/m68k/syscall.S b/sysdeps/unix/bsd/sun/m68k/syscall.S index 76bac4d905..1d4d5be42f 100644 --- a/sysdeps/unix/bsd/sun/m68k/syscall.S +++ b/sysdeps/unix/bsd/sun/m68k/syscall.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/bsd/sun/m68k/sysdep.h b/sysdeps/unix/bsd/sun/m68k/sysdep.h index 8bd3861e91..e51ab0a8e4 100644 --- a/sysdeps/unix/bsd/sun/m68k/sysdep.h +++ b/sysdeps/unix/bsd/sun/m68k/sysdep.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/bsd/sun/m68k/vfork.S b/sysdeps/unix/bsd/sun/m68k/vfork.S index 5b15db66c7..fe0309e3aa 100644 --- a/sysdeps/unix/bsd/sun/m68k/vfork.S +++ b/sysdeps/unix/bsd/sun/m68k/vfork.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/bsd/sun/sigreturn.S b/sysdeps/unix/bsd/sun/sigreturn.S index 7a3f8dbada..a3ea8e3fae 100644 --- a/sysdeps/unix/bsd/sun/sigreturn.S +++ b/sysdeps/unix/bsd/sun/sigreturn.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h b/sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h index 29d2d87b26..7c4bca6049 100644 --- a/sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h +++ b/sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SIGNAL_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/bsd/sun/sparc/sethostid.S b/sysdeps/unix/bsd/sun/sparc/sethostid.S index fc3fc04917..d07fd3800c 100644 --- a/sysdeps/unix/bsd/sun/sparc/sethostid.S +++ b/sysdeps/unix/bsd/sun/sparc/sethostid.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/bsd/sun/sparc/sigtramp.c b/sysdeps/unix/bsd/sun/sparc/sigtramp.c index 5c0dcf2ba6..2b0be13159 100644 --- a/sysdeps/unix/bsd/sun/sparc/sigtramp.c +++ b/sysdeps/unix/bsd/sun/sparc/sigtramp.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 __GNUC__ #error This file uses GNU C extensions; you must compile with GCC. diff --git a/sysdeps/unix/bsd/sun/sunos4/bits/fcntl.h b/sysdeps/unix/bsd/sun/sunos4/bits/fcntl.h index b74c80e170..e09fa333e5 100644 --- a/sysdeps/unix/bsd/sun/sunos4/bits/fcntl.h +++ b/sysdeps/unix/bsd/sun/sunos4/bits/fcntl.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _FCNTL_H #error "Never use directly; include instead." diff --git a/sysdeps/unix/bsd/sun/sunos4/bits/mman.h b/sysdeps/unix/bsd/sun/sunos4/bits/mman.h index ed80baf2e3..fdef46522a 100644 --- a/sysdeps/unix/bsd/sun/sunos4/bits/mman.h +++ b/sysdeps/unix/bsd/sun/sunos4/bits/mman.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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_MMAN_H #define _BITS_MMAN_H 1 diff --git a/sysdeps/unix/bsd/sun/sunos4/bits/resource.h b/sysdeps/unix/bsd/sun/sunos4/bits/resource.h index c0b40ba0d1..2f0d2dc73f 100644 --- a/sysdeps/unix/bsd/sun/sunos4/bits/resource.h +++ b/sysdeps/unix/bsd/sun/sunos4/bits/resource.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_RESOURCE_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/bsd/sun/sunos4/bits/termios.h b/sysdeps/unix/bsd/sun/sunos4/bits/termios.h index 15aaab795a..97612c8f0b 100644 --- a/sysdeps/unix/bsd/sun/sunos4/bits/termios.h +++ b/sysdeps/unix/bsd/sun/sunos4/bits/termios.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _TERMIOS_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/bsd/sun/sunos4/bits/utsname.h b/sysdeps/unix/bsd/sun/sunos4/bits/utsname.h index 5a03bab0c2..08848f35ce 100644 --- a/sysdeps/unix/bsd/sun/sunos4/bits/utsname.h +++ b/sysdeps/unix/bsd/sun/sunos4/bits/utsname.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _UTSNAME_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/bsd/sun/sunos4/mmap.c b/sysdeps/unix/bsd/sun/sunos4/mmap.c index 8400aaa1db..c513ae27eb 100644 --- a/sysdeps/unix/bsd/sun/sunos4/mmap.c +++ b/sysdeps/unix/bsd/sun/sunos4/mmap.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/bsd/sun/sunos4/speed.c b/sysdeps/unix/bsd/sun/sunos4/speed.c index 8d929bc6dc..dca3468929 100644 --- a/sysdeps/unix/bsd/sun/sunos4/speed.c +++ b/sysdeps/unix/bsd/sun/sunos4/speed.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/bsd/sun/sunos4/tcflow.c b/sysdeps/unix/bsd/sun/sunos4/tcflow.c index 3e54c1e44b..6fcc606f61 100644 --- a/sysdeps/unix/bsd/sun/sunos4/tcflow.c +++ b/sysdeps/unix/bsd/sun/sunos4/tcflow.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/bsd/sun/sunos4/tcflush.c b/sysdeps/unix/bsd/sun/sunos4/tcflush.c index 8c8fdf897e..9e78aadd07 100644 --- a/sysdeps/unix/bsd/sun/sunos4/tcflush.c +++ b/sysdeps/unix/bsd/sun/sunos4/tcflush.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/bsd/sun/sunos4/tcgetattr.c b/sysdeps/unix/bsd/sun/sunos4/tcgetattr.c index 69a8fb29a7..ab74fddf24 100644 --- a/sysdeps/unix/bsd/sun/sunos4/tcgetattr.c +++ b/sysdeps/unix/bsd/sun/sunos4/tcgetattr.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/bsd/sun/sunos4/tcsendbrk.c b/sysdeps/unix/bsd/sun/sunos4/tcsendbrk.c index 2953f45662..db5ea8c831 100644 --- a/sysdeps/unix/bsd/sun/sunos4/tcsendbrk.c +++ b/sysdeps/unix/bsd/sun/sunos4/tcsendbrk.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c b/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c index da30f7b4c2..d61e39284b 100644 --- a/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c +++ b/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/bsd/sun/sunos4/wait4.c b/sysdeps/unix/bsd/sun/sunos4/wait4.c index ffffc7ad70..a12823467d 100644 --- a/sysdeps/unix/bsd/sun/sunos4/wait4.c +++ b/sysdeps/unix/bsd/sun/sunos4/wait4.c @@ -5,19 +5,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/bsd/ultrix4/bits/fcntl.h b/sysdeps/unix/bsd/ultrix4/bits/fcntl.h index 1398b811ce..9dbd7ba269 100644 --- a/sysdeps/unix/bsd/ultrix4/bits/fcntl.h +++ b/sysdeps/unix/bsd/ultrix4/bits/fcntl.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _FCNTL_H #error "Never use directly; include instead." diff --git a/sysdeps/unix/bsd/ultrix4/bits/mman.h b/sysdeps/unix/bsd/ultrix4/bits/mman.h index 9acb6ceed5..918b535634 100644 --- a/sysdeps/unix/bsd/ultrix4/bits/mman.h +++ b/sysdeps/unix/bsd/ultrix4/bits/mman.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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_MMAN_H #define _BITS_MMAN_H 1 diff --git a/sysdeps/unix/bsd/ultrix4/bits/posix_opt.h b/sysdeps/unix/bsd/ultrix4/bits/posix_opt.h index 7736504e1c..aba6852e1f 100644 --- a/sysdeps/unix/bsd/ultrix4/bits/posix_opt.h +++ b/sysdeps/unix/bsd/ultrix4/bits/posix_opt.h @@ -3,19 +3,19 @@ Contributed by Ian Lance Taylor (ian@airs.com). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #define _POSIX_JOB_CONTROL 1 #define _POSIX_SAVED_IDS 1 diff --git a/sysdeps/unix/bsd/ultrix4/bits/utsname.h b/sysdeps/unix/bsd/ultrix4/bits/utsname.h index a9f36ab3d1..47d46ff859 100644 --- a/sysdeps/unix/bsd/ultrix4/bits/utsname.h +++ b/sysdeps/unix/bsd/ultrix4/bits/utsname.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _UTSNAME_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/bsd/ultrix4/mips/__handler.S b/sysdeps/unix/bsd/ultrix4/mips/__handler.S index 19d795a6b4..2b815c46dd 100644 --- a/sysdeps/unix/bsd/ultrix4/mips/__handler.S +++ b/sysdeps/unix/bsd/ultrix4/mips/__handler.S @@ -4,19 +4,19 @@ Also hacked by Ian Lance Taylor (ian@airs.com). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/bsd/ultrix4/mips/bits/sigcontext.h b/sysdeps/unix/bsd/ultrix4/mips/bits/sigcontext.h index cb66517eef..3674651372 100644 --- a/sysdeps/unix/bsd/ultrix4/mips/bits/sigcontext.h +++ b/sysdeps/unix/bsd/ultrix4/mips/bits/sigcontext.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SIGNAL_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/bsd/ultrix4/mips/sigvec.c b/sysdeps/unix/bsd/ultrix4/mips/sigvec.c index 4ecce54ae0..f6c8f1fe95 100644 --- a/sysdeps/unix/bsd/ultrix4/mips/sigvec.c +++ b/sysdeps/unix/bsd/ultrix4/mips/sigvec.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* The sigvec system call on MIPS Ultrix takes an additional parameter, which is the address that is actually called when the diff --git a/sysdeps/unix/bsd/ultrix4/mips/start.S b/sysdeps/unix/bsd/ultrix4/mips/start.S index dfb06c22b5..df86229ea5 100644 --- a/sysdeps/unix/bsd/ultrix4/mips/start.S +++ b/sysdeps/unix/bsd/ultrix4/mips/start.S @@ -3,19 +3,19 @@ Contributed by Brendan Kehoe (brendan@zen.org). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/bsd/ultrix4/mips/vfork.S b/sysdeps/unix/bsd/ultrix4/mips/vfork.S index 84a2fde160..9541eafbae 100644 --- a/sysdeps/unix/bsd/ultrix4/mips/vfork.S +++ b/sysdeps/unix/bsd/ultrix4/mips/vfork.S @@ -3,19 +3,19 @@ Contributed by Brendan Kehoe (brendan@zen.org). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/bsd/ultrix4/sysconf.c b/sysdeps/unix/bsd/ultrix4/sysconf.c index 6bf8ca4cb3..39e77301b0 100644 --- a/sysdeps/unix/bsd/ultrix4/sysconf.c +++ b/sysdeps/unix/bsd/ultrix4/sysconf.c @@ -3,19 +3,19 @@ Contributed by Ian Lance Taylor (ian@airs.com). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* On Ultrix we can use the getsysinfo call to get the right return value for _SC_CHILD_MAX. Everything else is from , diff --git a/sysdeps/unix/bsd/ultrix4/wait3.S b/sysdeps/unix/bsd/ultrix4/wait3.S index 5659872d69..b20ecfa242 100644 --- a/sysdeps/unix/bsd/ultrix4/wait3.S +++ b/sysdeps/unix/bsd/ultrix4/wait3.S @@ -3,19 +3,19 @@ Contributed by Brendan Kehoe (brendan@zen.org). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/bsd/vax/brk.S b/sysdeps/unix/bsd/vax/brk.S index c9590737bf..52377bc43e 100644 --- a/sysdeps/unix/bsd/vax/brk.S +++ b/sysdeps/unix/bsd/vax/brk.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/bsd/vax/pipe.S b/sysdeps/unix/bsd/vax/pipe.S index 8a83e0cf91..691cf3c390 100644 --- a/sysdeps/unix/bsd/vax/pipe.S +++ b/sysdeps/unix/bsd/vax/pipe.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/bsd/vax/sysdep.S b/sysdeps/unix/bsd/vax/sysdep.S index 6809b6edea..786aed2d1a 100644 --- a/sysdeps/unix/bsd/vax/sysdep.S +++ b/sysdeps/unix/bsd/vax/sysdep.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #define _ERRNO_H #include diff --git a/sysdeps/unix/bsd/vax/sysdep.h b/sysdeps/unix/bsd/vax/sysdep.h index 19ab59b615..563ad26c18 100644 --- a/sysdeps/unix/bsd/vax/sysdep.h +++ b/sysdeps/unix/bsd/vax/sysdep.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/bsd/vax/vfork.S b/sysdeps/unix/bsd/vax/vfork.S index b2458cb3df..8098b0eca6 100644 --- a/sysdeps/unix/bsd/vax/vfork.S +++ b/sysdeps/unix/bsd/vax/vfork.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/bsd/vax/wait.S b/sysdeps/unix/bsd/vax/wait.S index 9effe92b62..19396f06e8 100644 --- a/sysdeps/unix/bsd/vax/wait.S +++ b/sysdeps/unix/bsd/vax/wait.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/bsd/vax/wait3.S b/sysdeps/unix/bsd/vax/wait3.S index 52b8694859..e0ceec1de0 100644 --- a/sysdeps/unix/bsd/vax/wait3.S +++ b/sysdeps/unix/bsd/vax/wait3.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/mips/brk.S b/sysdeps/unix/mips/brk.S index e38f735b92..9674571d80 100644 --- a/sysdeps/unix/mips/brk.S +++ b/sysdeps/unix/mips/brk.S @@ -3,19 +3,19 @@ Contributed by Brendan Kehoe (brendan@zen.org). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/mips/fork.S b/sysdeps/unix/mips/fork.S index ffaf40ba6a..3273216030 100644 --- a/sysdeps/unix/mips/fork.S +++ b/sysdeps/unix/mips/fork.S @@ -3,19 +3,19 @@ Contributed by Brendan Kehoe (brendan@zen.org). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/mips/pipe.S b/sysdeps/unix/mips/pipe.S index 7066ac71ce..a2f4ec7ead 100644 --- a/sysdeps/unix/mips/pipe.S +++ b/sysdeps/unix/mips/pipe.S @@ -3,19 +3,19 @@ Contributed by Brendan Kehoe (brendan@zen.org). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/mips/sigreturn.S b/sysdeps/unix/mips/sigreturn.S index ddb6c70d51..2cb3adb6de 100644 --- a/sysdeps/unix/mips/sigreturn.S +++ b/sysdeps/unix/mips/sigreturn.S @@ -3,19 +3,19 @@ Contributed by Brendan Kehoe (brendan@zen.org). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/mips/sysdep.S b/sysdeps/unix/mips/sysdep.S index d4b9945ed6..fa1bfa1722 100644 --- a/sysdeps/unix/mips/sysdep.S +++ b/sysdeps/unix/mips/sysdep.S @@ -3,19 +3,19 @@ Contributed by Brendan Kehoe (brendan@zen.org). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #define _ERRNO_H diff --git a/sysdeps/unix/mips/sysdep.h b/sysdeps/unix/mips/sysdep.h index a5a3e5589e..c25969610a 100644 --- a/sysdeps/unix/mips/sysdep.h +++ b/sysdeps/unix/mips/sysdep.h @@ -3,19 +3,19 @@ Contributed by Brendan Kehoe (brendan@zen.org). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/mips/wait.S b/sysdeps/unix/mips/wait.S index 9ea55bc7d0..4f4f84a4af 100644 --- a/sysdeps/unix/mips/wait.S +++ b/sysdeps/unix/mips/wait.S @@ -3,19 +3,19 @@ Contributed by Brendan Kehoe (brendan@zen.org). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/_exit.c b/sysdeps/unix/sysv/aix/_exit.c index f4654c1d3a..510f3ae88b 100644 --- a/sysdeps/unix/sysv/aix/_exit.c +++ b/sysdeps/unix/sysv/aix/_exit.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/accept.c b/sysdeps/unix/sysv/aix/accept.c index 364f02b4f8..0e8f67e15b 100644 --- a/sysdeps/unix/sysv/aix/accept.c +++ b/sysdeps/unix/sysv/aix/accept.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/aix/access.c b/sysdeps/unix/sysv/aix/access.c index fb94a5412a..97f8e68799 100644 --- a/sysdeps/unix/sysv/aix/access.c +++ b/sysdeps/unix/sysv/aix/access.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/bits/dirent.h b/sysdeps/unix/sysv/aix/bits/dirent.h index 48fb1b220f..48eeb32887 100644 --- a/sysdeps/unix/sysv/aix/bits/dirent.h +++ b/sysdeps/unix/sysv/aix/bits/dirent.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _DIRENT_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/aix/bits/dlfcn.h b/sysdeps/unix/sysv/aix/bits/dlfcn.h index e67c9a8c7c..e184175275 100644 --- a/sysdeps/unix/sysv/aix/bits/dlfcn.h +++ b/sysdeps/unix/sysv/aix/bits/dlfcn.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _DLFCN_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/aix/bits/endian.h b/sysdeps/unix/sysv/aix/bits/endian.h index a86de7e502..8e9b98ef78 100644 --- a/sysdeps/unix/sysv/aix/bits/endian.h +++ b/sysdeps/unix/sysv/aix/bits/endian.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _ENDIAN_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/aix/bits/errno.h b/sysdeps/unix/sysv/aix/bits/errno.h index d14e3299d4..f2cdba8d64 100644 --- a/sysdeps/unix/sysv/aix/bits/errno.h +++ b/sysdeps/unix/sysv/aix/bits/errno.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* This file defines the `errno' constants. */ diff --git a/sysdeps/unix/sysv/aix/bits/fcntl.h b/sysdeps/unix/sysv/aix/bits/fcntl.h index 048f53a1b5..28a8fae0f2 100644 --- a/sysdeps/unix/sysv/aix/bits/fcntl.h +++ b/sysdeps/unix/sysv/aix/bits/fcntl.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _FCNTL_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/aix/bits/ioctl-types.h b/sysdeps/unix/sysv/aix/bits/ioctl-types.h index ecc4cac1ff..109aa05adf 100644 --- a/sysdeps/unix/sysv/aix/bits/ioctl-types.h +++ b/sysdeps/unix/sysv/aix/bits/ioctl-types.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_IOCTL_H # error "Never use directly; include instead diff --git a/sysdeps/unix/sysv/aix/bits/ioctls.h b/sysdeps/unix/sysv/aix/bits/ioctls.h index 39e093b1bb..8023c144df 100644 --- a/sysdeps/unix/sysv/aix/bits/ioctls.h +++ b/sysdeps/unix/sysv/aix/bits/ioctls.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_IOCTL_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/aix/bits/poll.h b/sysdeps/unix/sysv/aix/bits/poll.h index 431c8a6c4e..b9f2f71558 100644 --- a/sysdeps/unix/sysv/aix/bits/poll.h +++ b/sysdeps/unix/sysv/aix/bits/poll.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_POLL_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/aix/bits/resource.h b/sysdeps/unix/sysv/aix/bits/resource.h index 823a5f0659..cc851e8a06 100644 --- a/sysdeps/unix/sysv/aix/bits/resource.h +++ b/sysdeps/unix/sysv/aix/bits/resource.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_RESOURCE_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/aix/bits/setjmp.h b/sysdeps/unix/sysv/aix/bits/setjmp.h index 675ed62e3f..82a58ae069 100644 --- a/sysdeps/unix/sysv/aix/bits/setjmp.h +++ b/sysdeps/unix/sysv/aix/bits/setjmp.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Define the machine-dependent type `jmp_buf'. PowerPC version. */ diff --git a/sysdeps/unix/sysv/aix/bits/sigaction.h b/sysdeps/unix/sysv/aix/bits/sigaction.h index 75c35e5b32..55414b8f1f 100644 --- a/sysdeps/unix/sysv/aix/bits/sigaction.h +++ b/sysdeps/unix/sysv/aix/bits/sigaction.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SIGNAL_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/aix/bits/sigcontext.h b/sysdeps/unix/sysv/aix/bits/sigcontext.h index 86b3c24910..40bec1b710 100644 --- a/sysdeps/unix/sysv/aix/bits/sigcontext.h +++ b/sysdeps/unix/sysv/aix/bits/sigcontext.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/aix/bits/signum.h b/sysdeps/unix/sysv/aix/bits/signum.h index b4397448b2..67eb949600 100644 --- a/sysdeps/unix/sysv/aix/bits/signum.h +++ b/sysdeps/unix/sysv/aix/bits/signum.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #ifdef _SIGNAL_H diff --git a/sysdeps/unix/sysv/aix/bits/sigset.h b/sysdeps/unix/sysv/aix/bits/sigset.h index 4735796259..0dc6b40a7c 100644 --- a/sysdeps/unix/sysv/aix/bits/sigset.h +++ b/sysdeps/unix/sysv/aix/bits/sigset.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SIGSET_H_types # define _SIGSET_H_types 1 diff --git a/sysdeps/unix/sysv/aix/bits/sigstack.h b/sysdeps/unix/sysv/aix/bits/sigstack.h index c229cc03f7..cefd33c231 100644 --- a/sysdeps/unix/sysv/aix/bits/sigstack.h +++ b/sysdeps/unix/sysv/aix/bits/sigstack.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SIGNAL_H # error "Never include this file directly. Use instead" diff --git a/sysdeps/unix/sysv/aix/bits/socket.h b/sysdeps/unix/sysv/aix/bits/socket.h index f080c6ac23..45877fade4 100644 --- a/sysdeps/unix/sysv/aix/bits/socket.h +++ b/sysdeps/unix/sysv/aix/bits/socket.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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_SOCKET_H #define __BITS_SOCKET_H diff --git a/sysdeps/unix/sysv/aix/bits/stat.h b/sysdeps/unix/sysv/aix/bits/stat.h index 0b818795e7..adcb1d1019 100644 --- a/sysdeps/unix/sysv/aix/bits/stat.h +++ b/sysdeps/unix/sysv/aix/bits/stat.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_STAT_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/aix/bits/statfs.h b/sysdeps/unix/sysv/aix/bits/statfs.h index 2877339e74..0a1c0a5e65 100644 --- a/sysdeps/unix/sysv/aix/bits/statfs.h +++ b/sysdeps/unix/sysv/aix/bits/statfs.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_STATFS_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/aix/bits/termios.h b/sysdeps/unix/sysv/aix/bits/termios.h index 96e65d1e3d..b178d9c1b3 100644 --- a/sysdeps/unix/sysv/aix/bits/termios.h +++ b/sysdeps/unix/sysv/aix/bits/termios.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _TERMIOS_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/aix/bits/types.h b/sysdeps/unix/sysv/aix/bits/types.h index df75454af1..4beff41891 100644 --- a/sysdeps/unix/sysv/aix/bits/types.h +++ b/sysdeps/unix/sysv/aix/bits/types.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* * Never include this file directly; use instead. diff --git a/sysdeps/unix/sysv/aix/bits/uio.h b/sysdeps/unix/sysv/aix/bits/uio.h index 5868ccc257..60781532ab 100644 --- a/sysdeps/unix/sysv/aix/bits/uio.h +++ b/sysdeps/unix/sysv/aix/bits/uio.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_UIO_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/aix/bits/utmp.h b/sysdeps/unix/sysv/aix/bits/utmp.h index 38cf31e6ed..b78a2afdaf 100644 --- a/sysdeps/unix/sysv/aix/bits/utmp.h +++ b/sysdeps/unix/sysv/aix/bits/utmp.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _UTMP_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/aix/bits/utmpx.h b/sysdeps/unix/sysv/aix/bits/utmpx.h index f8bd66574f..438b5f3a51 100644 --- a/sysdeps/unix/sysv/aix/bits/utmpx.h +++ b/sysdeps/unix/sysv/aix/bits/utmpx.h @@ -1,20 +1,21 @@ /* Structures and defenitions for the user accounting database. AIX. Copyright (C) 1997, 1998, 1999 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _UTMPX_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/aix/bits/utsname.h b/sysdeps/unix/sysv/aix/bits/utsname.h index e6958f0783..d238f5efda 100644 --- a/sysdeps/unix/sysv/aix/bits/utsname.h +++ b/sysdeps/unix/sysv/aix/bits/utsname.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_UTSNAME_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/aix/brk.c b/sysdeps/unix/sysv/aix/brk.c index f736e28724..66707fe60f 100644 --- a/sysdeps/unix/sysv/aix/brk.c +++ b/sysdeps/unix/sysv/aix/brk.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/chdir.c b/sysdeps/unix/sysv/aix/chdir.c index 17d46f7b53..153084eb60 100644 --- a/sysdeps/unix/sysv/aix/chdir.c +++ b/sysdeps/unix/sysv/aix/chdir.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/chmod.c b/sysdeps/unix/sysv/aix/chmod.c index dbbe84e8f1..628d09cceb 100644 --- a/sysdeps/unix/sysv/aix/chmod.c +++ b/sysdeps/unix/sysv/aix/chmod.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/chown.c b/sysdeps/unix/sysv/aix/chown.c index 902d410449..568c26ac77 100644 --- a/sysdeps/unix/sysv/aix/chown.c +++ b/sysdeps/unix/sysv/aix/chown.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/close.c b/sysdeps/unix/sysv/aix/close.c index e32b4fd10a..f1b9a01eb8 100644 --- a/sysdeps/unix/sysv/aix/close.c +++ b/sysdeps/unix/sysv/aix/close.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/dl-addr.c b/sysdeps/unix/sysv/aix/dl-addr.c index 928b76eda0..b8dbddfe41 100644 --- a/sysdeps/unix/sysv/aix/dl-addr.c +++ b/sysdeps/unix/sysv/aix/dl-addr.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/aix/dl-close.c b/sysdeps/unix/sysv/aix/dl-close.c index 50986d5528..edd45851f6 100644 --- a/sysdeps/unix/sysv/aix/dl-close.c +++ b/sysdeps/unix/sysv/aix/dl-close.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/aix/dl-error.c b/sysdeps/unix/sysv/aix/dl-error.c index 069596e323..9c6335b591 100644 --- a/sysdeps/unix/sysv/aix/dl-error.c +++ b/sysdeps/unix/sysv/aix/dl-error.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/dl-libc.c b/sysdeps/unix/sysv/aix/dl-libc.c index a555559ce8..0506d11ef7 100644 --- a/sysdeps/unix/sysv/aix/dl-libc.c +++ b/sysdeps/unix/sysv/aix/dl-libc.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/aix/dl-open.c b/sysdeps/unix/sysv/aix/dl-open.c index ba8e2bf298..070471d513 100644 --- a/sysdeps/unix/sysv/aix/dl-open.c +++ b/sysdeps/unix/sysv/aix/dl-open.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/aix/dl-support.c b/sysdeps/unix/sysv/aix/dl-support.c index a641370883..6172c853d4 100644 --- a/sysdeps/unix/sysv/aix/dl-support.c +++ b/sysdeps/unix/sysv/aix/dl-support.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/dl-sym.c b/sysdeps/unix/sysv/aix/dl-sym.c index 642c2e2ad4..3f48b12cd9 100644 --- a/sysdeps/unix/sysv/aix/dl-sym.c +++ b/sysdeps/unix/sysv/aix/dl-sym.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/aix/dlldr.h b/sysdeps/unix/sysv/aix/dlldr.h index d729244c52..e0f3740d26 100644 --- a/sysdeps/unix/sysv/aix/dlldr.h +++ b/sysdeps/unix/sysv/aix/dlldr.h @@ -2,20 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -*/ + 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. */ /* diff --git a/sysdeps/unix/sysv/aix/euidaccess.c b/sysdeps/unix/sysv/aix/euidaccess.c index 55e28230b1..c666af5fd0 100644 --- a/sysdeps/unix/sysv/aix/euidaccess.c +++ b/sysdeps/unix/sysv/aix/euidaccess.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #define ACC_SELF 0 diff --git a/sysdeps/unix/sysv/aix/execve.c b/sysdeps/unix/sysv/aix/execve.c index 968dc21169..f8cc07d556 100644 --- a/sysdeps/unix/sysv/aix/execve.c +++ b/sysdeps/unix/sysv/aix/execve.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/fchdir.c b/sysdeps/unix/sysv/aix/fchdir.c index 97d31714f5..9fe7e8bec9 100644 --- a/sysdeps/unix/sysv/aix/fchdir.c +++ b/sysdeps/unix/sysv/aix/fchdir.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/fchmod.c b/sysdeps/unix/sysv/aix/fchmod.c index 49fc92d074..d4f0ac9580 100644 --- a/sysdeps/unix/sysv/aix/fchmod.c +++ b/sysdeps/unix/sysv/aix/fchmod.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/fchown.c b/sysdeps/unix/sysv/aix/fchown.c index de51384493..64252c038b 100644 --- a/sysdeps/unix/sysv/aix/fchown.c +++ b/sysdeps/unix/sysv/aix/fchown.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/fcntl.c b/sysdeps/unix/sysv/aix/fcntl.c index 5a4bb8a1bb..196bbf52cd 100644 --- a/sysdeps/unix/sysv/aix/fcntl.c +++ b/sysdeps/unix/sysv/aix/fcntl.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/aix/fdatasync.c b/sysdeps/unix/sysv/aix/fdatasync.c index 177260daa2..851f2e5701 100644 --- a/sysdeps/unix/sysv/aix/fdatasync.c +++ b/sysdeps/unix/sysv/aix/fdatasync.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/fork.c b/sysdeps/unix/sysv/aix/fork.c index 9c84fb0684..f31f3428a9 100644 --- a/sysdeps/unix/sysv/aix/fork.c +++ b/sysdeps/unix/sysv/aix/fork.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/fstatfs.c b/sysdeps/unix/sysv/aix/fstatfs.c index 3b92b9e0f5..3f531f2a84 100644 --- a/sysdeps/unix/sysv/aix/fstatfs.c +++ b/sysdeps/unix/sysv/aix/fstatfs.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/fsync.c b/sysdeps/unix/sysv/aix/fsync.c index 6ad1dac333..58734b6e89 100644 --- a/sysdeps/unix/sysv/aix/fsync.c +++ b/sysdeps/unix/sysv/aix/fsync.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/ftruncate.c b/sysdeps/unix/sysv/aix/ftruncate.c index 5ad14cbb6b..758f2a423b 100644 --- a/sysdeps/unix/sysv/aix/ftruncate.c +++ b/sysdeps/unix/sysv/aix/ftruncate.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/ftruncate64.c b/sysdeps/unix/sysv/aix/ftruncate64.c index f2c1578a18..5e7e4be4ca 100644 --- a/sysdeps/unix/sysv/aix/ftruncate64.c +++ b/sysdeps/unix/sysv/aix/ftruncate64.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/fxstat.c b/sysdeps/unix/sysv/aix/fxstat.c index 9f5a477590..e1f546d8c9 100644 --- a/sysdeps/unix/sysv/aix/fxstat.c +++ b/sysdeps/unix/sysv/aix/fxstat.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/aix/fxstat64.c b/sysdeps/unix/sysv/aix/fxstat64.c index 5d2f22bde9..39f8cd9e11 100644 --- a/sysdeps/unix/sysv/aix/fxstat64.c +++ b/sysdeps/unix/sysv/aix/fxstat64.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/aix/getdents.c b/sysdeps/unix/sysv/aix/getdents.c index fd45199851..ca896c3323 100644 --- a/sysdeps/unix/sysv/aix/getdents.c +++ b/sysdeps/unix/sysv/aix/getdents.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/aix/getegid.c b/sysdeps/unix/sysv/aix/getegid.c index d092fc56f9..c24692502c 100644 --- a/sysdeps/unix/sysv/aix/getegid.c +++ b/sysdeps/unix/sysv/aix/getegid.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/geteuid.c b/sysdeps/unix/sysv/aix/geteuid.c index 86034b3fed..b0722134b4 100644 --- a/sysdeps/unix/sysv/aix/geteuid.c +++ b/sysdeps/unix/sysv/aix/geteuid.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/getgid.c b/sysdeps/unix/sysv/aix/getgid.c index 6f2df60b50..8b102b137f 100644 --- a/sysdeps/unix/sysv/aix/getgid.c +++ b/sysdeps/unix/sysv/aix/getgid.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/getgroups.c b/sysdeps/unix/sysv/aix/getgroups.c index 37ace340ed..f7c813b190 100644 --- a/sysdeps/unix/sysv/aix/getgroups.c +++ b/sysdeps/unix/sysv/aix/getgroups.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/gethostname.c b/sysdeps/unix/sysv/aix/gethostname.c index 9482058854..a42384059c 100644 --- a/sysdeps/unix/sysv/aix/gethostname.c +++ b/sysdeps/unix/sysv/aix/gethostname.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/getpeername.c b/sysdeps/unix/sysv/aix/getpeername.c index 82a9941ebf..bec9bac2ae 100644 --- a/sysdeps/unix/sysv/aix/getpeername.c +++ b/sysdeps/unix/sysv/aix/getpeername.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/getpgid.c b/sysdeps/unix/sysv/aix/getpgid.c index 53f2e1accf..297fccc854 100644 --- a/sysdeps/unix/sysv/aix/getpgid.c +++ b/sysdeps/unix/sysv/aix/getpgid.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/getrlimit.c b/sysdeps/unix/sysv/aix/getrlimit.c index 2658f7ee4a..0699cec644 100644 --- a/sysdeps/unix/sysv/aix/getrlimit.c +++ b/sysdeps/unix/sysv/aix/getrlimit.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/getrlimit64.c b/sysdeps/unix/sysv/aix/getrlimit64.c index 8f46c5fff3..dd33ca9c73 100644 --- a/sysdeps/unix/sysv/aix/getrlimit64.c +++ b/sysdeps/unix/sysv/aix/getrlimit64.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/getrusage.c b/sysdeps/unix/sysv/aix/getrusage.c index aa80adecc6..b578b75aa7 100644 --- a/sysdeps/unix/sysv/aix/getrusage.c +++ b/sysdeps/unix/sysv/aix/getrusage.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/getsid.c b/sysdeps/unix/sysv/aix/getsid.c index 88b9daa8e5..6994eb8dda 100644 --- a/sysdeps/unix/sysv/aix/getsid.c +++ b/sysdeps/unix/sysv/aix/getsid.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/getsockname.c b/sysdeps/unix/sysv/aix/getsockname.c index c1a561428e..822f9e98cd 100644 --- a/sysdeps/unix/sysv/aix/getsockname.c +++ b/sysdeps/unix/sysv/aix/getsockname.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/gettimeofday.c b/sysdeps/unix/sysv/aix/gettimeofday.c index e85bd05f5e..c7a4a01c08 100644 --- a/sysdeps/unix/sysv/aix/gettimeofday.c +++ b/sysdeps/unix/sysv/aix/gettimeofday.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/aix/getuid.c b/sysdeps/unix/sysv/aix/getuid.c index 8d5f07098f..e042666fe9 100644 --- a/sysdeps/unix/sysv/aix/getuid.c +++ b/sysdeps/unix/sysv/aix/getuid.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/ioctl.c b/sysdeps/unix/sysv/aix/ioctl.c index 6e1445d946..f47b699be4 100644 --- a/sysdeps/unix/sysv/aix/ioctl.c +++ b/sysdeps/unix/sysv/aix/ioctl.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/aix/kernel_proto.h b/sysdeps/unix/sysv/aix/kernel_proto.h index d3ddfa6a0a..e9ad06dc3a 100644 --- a/sysdeps/unix/sysv/aix/kernel_proto.h +++ b/sysdeps/unix/sysv/aix/kernel_proto.h @@ -3,19 +3,19 @@ Contributed by Ulrich Drepper , 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* This file contains prototypes for the "functions" exported by /unix on AIX. */ diff --git a/sysdeps/unix/sysv/aix/kill.c b/sysdeps/unix/sysv/aix/kill.c index 861cff3360..8538e29f81 100644 --- a/sysdeps/unix/sysv/aix/kill.c +++ b/sysdeps/unix/sysv/aix/kill.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/lchown.c b/sysdeps/unix/sysv/aix/lchown.c index 57a83b5f6e..44e3b749e4 100644 --- a/sysdeps/unix/sysv/aix/lchown.c +++ b/sysdeps/unix/sysv/aix/lchown.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/link.c b/sysdeps/unix/sysv/aix/link.c index bb650cc476..2cacbebc37 100644 --- a/sysdeps/unix/sysv/aix/link.c +++ b/sysdeps/unix/sysv/aix/link.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/lockf.c b/sysdeps/unix/sysv/aix/lockf.c index 43ac1af4b4..4a8c14fd6e 100644 --- a/sysdeps/unix/sysv/aix/lockf.c +++ b/sysdeps/unix/sysv/aix/lockf.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/lockf64.c b/sysdeps/unix/sysv/aix/lockf64.c index ad4840bc0a..529c2b4473 100644 --- a/sysdeps/unix/sysv/aix/lockf64.c +++ b/sysdeps/unix/sysv/aix/lockf64.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/lseek64.c b/sysdeps/unix/sysv/aix/lseek64.c index 621cdaee70..5892663d8f 100644 --- a/sysdeps/unix/sysv/aix/lseek64.c +++ b/sysdeps/unix/sysv/aix/lseek64.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/lxstat.c b/sysdeps/unix/sysv/aix/lxstat.c index 58d8710a4a..bd6f6534a8 100644 --- a/sysdeps/unix/sysv/aix/lxstat.c +++ b/sysdeps/unix/sysv/aix/lxstat.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/aix/lxstat64.c b/sysdeps/unix/sysv/aix/lxstat64.c index 4741da0e52..d6376bd260 100644 --- a/sysdeps/unix/sysv/aix/lxstat64.c +++ b/sysdeps/unix/sysv/aix/lxstat64.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/aix/mkdir.c b/sysdeps/unix/sysv/aix/mkdir.c index f7c358af42..4a4e5ceefe 100644 --- a/sysdeps/unix/sysv/aix/mkdir.c +++ b/sysdeps/unix/sysv/aix/mkdir.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/mknod.c b/sysdeps/unix/sysv/aix/mknod.c index d724595e1f..8ed3d6b53e 100644 --- a/sysdeps/unix/sysv/aix/mknod.c +++ b/sysdeps/unix/sysv/aix/mknod.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/mmap64.c b/sysdeps/unix/sysv/aix/mmap64.c index 9f2a277faf..ae70ef4acb 100644 --- a/sysdeps/unix/sysv/aix/mmap64.c +++ b/sysdeps/unix/sysv/aix/mmap64.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/aix/mprotect.c b/sysdeps/unix/sysv/aix/mprotect.c index 30374bbd5d..8bf95abb0e 100644 --- a/sysdeps/unix/sysv/aix/mprotect.c +++ b/sysdeps/unix/sysv/aix/mprotect.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/nanosleep.c b/sysdeps/unix/sysv/aix/nanosleep.c index e39606f9c5..3c6e5082e6 100644 --- a/sysdeps/unix/sysv/aix/nanosleep.c +++ b/sysdeps/unix/sysv/aix/nanosleep.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/aix/net/if.h b/sysdeps/unix/sysv/aix/net/if.h index c950d35294..20256d3adb 100644 --- a/sysdeps/unix/sysv/aix/net/if.h +++ b/sysdeps/unix/sysv/aix/net/if.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _NET_IF_H diff --git a/sysdeps/unix/sysv/aix/open.c b/sysdeps/unix/sysv/aix/open.c index 89cd955c38..4116c4ebdc 100644 --- a/sysdeps/unix/sysv/aix/open.c +++ b/sysdeps/unix/sysv/aix/open.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/aix/pipe.c b/sysdeps/unix/sysv/aix/pipe.c index b3a7ec94cf..385e0be4cb 100644 --- a/sysdeps/unix/sysv/aix/pipe.c +++ b/sysdeps/unix/sysv/aix/pipe.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/poll.c b/sysdeps/unix/sysv/aix/poll.c index bd1967600a..890dcd0dbc 100644 --- a/sysdeps/unix/sysv/aix/poll.c +++ b/sysdeps/unix/sysv/aix/poll.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/powerpc/memset.c b/sysdeps/unix/sysv/aix/powerpc/memset.c index ef04283430..6955ef5e91 100644 --- a/sysdeps/unix/sysv/aix/powerpc/memset.c +++ b/sysdeps/unix/sysv/aix/powerpc/memset.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Until the cache line issues are resolved use the generic implementation. */ diff --git a/sysdeps/unix/sysv/aix/powerpc/register-dump.h b/sysdeps/unix/sysv/aix/powerpc/register-dump.h index 3f308e6856..f0d8b99837 100644 --- a/sysdeps/unix/sysv/aix/powerpc/register-dump.h +++ b/sysdeps/unix/sysv/aix/powerpc/register-dump.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/aix/powerpc/s_lrint.c b/sysdeps/unix/sysv/aix/powerpc/s_lrint.c index 18c42d5c4d..1a8b590d23 100644 --- a/sysdeps/unix/sysv/aix/powerpc/s_lrint.c +++ b/sysdeps/unix/sysv/aix/powerpc/s_lrint.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/pread.c b/sysdeps/unix/sysv/aix/pread.c index 137fc3485c..8d8bfd741e 100644 --- a/sysdeps/unix/sysv/aix/pread.c +++ b/sysdeps/unix/sysv/aix/pread.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/pread64.c b/sysdeps/unix/sysv/aix/pread64.c index 1a88a7caa7..0d4df22634 100644 --- a/sysdeps/unix/sysv/aix/pread64.c +++ b/sysdeps/unix/sysv/aix/pread64.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/profil-counter.h b/sysdeps/unix/sysv/aix/profil-counter.h index f58f1b6431..2492a63ba3 100644 --- a/sysdeps/unix/sysv/aix/profil-counter.h +++ b/sysdeps/unix/sysv/aix/profil-counter.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* In many Unix systems signal handlers are called like this and the interrupted PC is easily findable in the `struct sigcontext'. */ diff --git a/sysdeps/unix/sysv/aix/read.c b/sysdeps/unix/sysv/aix/read.c index 556f7c6b67..50b59a3af7 100644 --- a/sysdeps/unix/sysv/aix/read.c +++ b/sysdeps/unix/sysv/aix/read.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/readv.c b/sysdeps/unix/sysv/aix/readv.c index 67d54c997c..8c12690993 100644 --- a/sysdeps/unix/sysv/aix/readv.c +++ b/sysdeps/unix/sysv/aix/readv.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/recvfrom.c b/sysdeps/unix/sysv/aix/recvfrom.c index 88f042a360..723a2c893a 100644 --- a/sysdeps/unix/sysv/aix/recvfrom.c +++ b/sysdeps/unix/sysv/aix/recvfrom.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/recvmsg.c b/sysdeps/unix/sysv/aix/recvmsg.c index baecd5a40b..0b695b34da 100644 --- a/sysdeps/unix/sysv/aix/recvmsg.c +++ b/sysdeps/unix/sysv/aix/recvmsg.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/revoke.c b/sysdeps/unix/sysv/aix/revoke.c index 2a81080489..8f6a4848d5 100644 --- a/sysdeps/unix/sysv/aix/revoke.c +++ b/sysdeps/unix/sysv/aix/revoke.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/aix/rmdir.c b/sysdeps/unix/sysv/aix/rmdir.c index 6b659ecb51..91c600694b 100644 --- a/sysdeps/unix/sysv/aix/rmdir.c +++ b/sysdeps/unix/sysv/aix/rmdir.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/sbrk.c b/sysdeps/unix/sysv/aix/sbrk.c index 09ba0b1062..af56c4b1e8 100644 --- a/sysdeps/unix/sysv/aix/sbrk.c +++ b/sysdeps/unix/sysv/aix/sbrk.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/sched_yield.c b/sysdeps/unix/sysv/aix/sched_yield.c index 0820c9a4f8..b5fbc07535 100644 --- a/sysdeps/unix/sysv/aix/sched_yield.c +++ b/sysdeps/unix/sysv/aix/sched_yield.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/select.c b/sysdeps/unix/sysv/aix/select.c index 34df22fc5c..e5c48dcde9 100644 --- a/sysdeps/unix/sysv/aix/select.c +++ b/sysdeps/unix/sysv/aix/select.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/sendmsg.c b/sysdeps/unix/sysv/aix/sendmsg.c index 6dbbf5e8c1..9ab19a9dbf 100644 --- a/sysdeps/unix/sysv/aix/sendmsg.c +++ b/sysdeps/unix/sysv/aix/sendmsg.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/setegid.c b/sysdeps/unix/sysv/aix/setegid.c index eedc71a54c..75e96e387c 100644 --- a/sysdeps/unix/sysv/aix/setegid.c +++ b/sysdeps/unix/sysv/aix/setegid.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/seteuid.c b/sysdeps/unix/sysv/aix/seteuid.c index c2fb9483dc..17738e78b7 100644 --- a/sysdeps/unix/sysv/aix/seteuid.c +++ b/sysdeps/unix/sysv/aix/seteuid.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/setgid.c b/sysdeps/unix/sysv/aix/setgid.c index ba1b01ef35..5b8038110b 100644 --- a/sysdeps/unix/sysv/aix/setgid.c +++ b/sysdeps/unix/sysv/aix/setgid.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/setitimer.c b/sysdeps/unix/sysv/aix/setitimer.c index 444900b99c..e40a075fa9 100644 --- a/sysdeps/unix/sysv/aix/setitimer.c +++ b/sysdeps/unix/sysv/aix/setitimer.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/aix/setpgid.c b/sysdeps/unix/sysv/aix/setpgid.c index cee16464fd..5150929aaf 100644 --- a/sysdeps/unix/sysv/aix/setpgid.c +++ b/sysdeps/unix/sysv/aix/setpgid.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/setregid.c b/sysdeps/unix/sysv/aix/setregid.c index b747b6c266..35812300b9 100644 --- a/sysdeps/unix/sysv/aix/setregid.c +++ b/sysdeps/unix/sysv/aix/setregid.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/setreuid.c b/sysdeps/unix/sysv/aix/setreuid.c index eafc764942..430d2fedc7 100644 --- a/sysdeps/unix/sysv/aix/setreuid.c +++ b/sysdeps/unix/sysv/aix/setreuid.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/setrlimit.c b/sysdeps/unix/sysv/aix/setrlimit.c index d7480e3b6c..818819d8ec 100644 --- a/sysdeps/unix/sysv/aix/setrlimit.c +++ b/sysdeps/unix/sysv/aix/setrlimit.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/setrlimit64.c b/sysdeps/unix/sysv/aix/setrlimit64.c index bfb1594ae0..f305c6f82f 100644 --- a/sysdeps/unix/sysv/aix/setrlimit64.c +++ b/sysdeps/unix/sysv/aix/setrlimit64.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/setsid.c b/sysdeps/unix/sysv/aix/setsid.c index 980649bbbf..c017c122bf 100644 --- a/sysdeps/unix/sysv/aix/setsid.c +++ b/sysdeps/unix/sysv/aix/setsid.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/setuid.c b/sysdeps/unix/sysv/aix/setuid.c index a86343a602..1772fc797a 100644 --- a/sysdeps/unix/sysv/aix/setuid.c +++ b/sysdeps/unix/sysv/aix/setuid.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/sigaction.c b/sysdeps/unix/sysv/aix/sigaction.c index 65801f4746..272c271db8 100644 --- a/sysdeps/unix/sysv/aix/sigaction.c +++ b/sysdeps/unix/sysv/aix/sigaction.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/aix/sigpending.c b/sysdeps/unix/sysv/aix/sigpending.c index a6add428e2..729b75a3be 100644 --- a/sysdeps/unix/sysv/aix/sigpending.c +++ b/sysdeps/unix/sysv/aix/sigpending.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/sigset-cvt-mask.h b/sysdeps/unix/sysv/aix/sigset-cvt-mask.h index 5a01212473..762144e3ed 100644 --- a/sysdeps/unix/sysv/aix/sigset-cvt-mask.h +++ b/sysdeps/unix/sysv/aix/sigset-cvt-mask.h @@ -4,19 +4,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #define sigset_set_old_mask(set, mask) \ do { \ diff --git a/sysdeps/unix/sysv/aix/sigsuspend.c b/sysdeps/unix/sysv/aix/sigsuspend.c index 123728114e..afca6b793e 100644 --- a/sysdeps/unix/sysv/aix/sigsuspend.c +++ b/sysdeps/unix/sysv/aix/sigsuspend.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/sleep.c b/sysdeps/unix/sysv/aix/sleep.c index 3ac5952b3a..17a9702633 100644 --- a/sysdeps/unix/sysv/aix/sleep.c +++ b/sysdeps/unix/sysv/aix/sleep.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/aix/socket.c b/sysdeps/unix/sysv/aix/socket.c index 8e409cb0a3..236b1b1686 100644 --- a/sysdeps/unix/sysv/aix/socket.c +++ b/sysdeps/unix/sysv/aix/socket.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/socketpair.c b/sysdeps/unix/sysv/aix/socketpair.c index b4dda7fef1..8adeac97ff 100644 --- a/sysdeps/unix/sysv/aix/socketpair.c +++ b/sysdeps/unix/sysv/aix/socketpair.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/speed.c b/sysdeps/unix/sysv/aix/speed.c index 06934fef25..c7fa51bb90 100644 --- a/sysdeps/unix/sysv/aix/speed.c +++ b/sysdeps/unix/sysv/aix/speed.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/aix/start.c b/sysdeps/unix/sysv/aix/start.c index eee21966ef..6c784f5dbf 100644 --- a/sysdeps/unix/sysv/aix/start.c +++ b/sysdeps/unix/sysv/aix/start.c @@ -2,20 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -*/ + 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. */ /* Old compatibility names for C types. */ diff --git a/sysdeps/unix/sysv/aix/statfs.c b/sysdeps/unix/sysv/aix/statfs.c index c0c966c890..f44a1c6a27 100644 --- a/sysdeps/unix/sysv/aix/statfs.c +++ b/sysdeps/unix/sysv/aix/statfs.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/symlink.c b/sysdeps/unix/sysv/aix/symlink.c index a70f103450..cb24965952 100644 --- a/sysdeps/unix/sysv/aix/symlink.c +++ b/sysdeps/unix/sysv/aix/symlink.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/sys/param.h b/sysdeps/unix/sysv/aix/sys/param.h index 1f52c39311..7448f1a6eb 100644 --- a/sysdeps/unix/sysv/aix/sys/param.h +++ b/sysdeps/unix/sysv/aix/sys/param.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_PARAM_H #define _SYS_PARAM_H 1 diff --git a/sysdeps/unix/sysv/aix/sys/ucontext.h b/sysdeps/unix/sysv/aix/sys/ucontext.h index c2ebf0cf13..ddb3f010c9 100644 --- a/sysdeps/unix/sysv/aix/sys/ucontext.h +++ b/sysdeps/unix/sysv/aix/sys/ucontext.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_UCONTEXT_H #define _SYS_UCONTEXT_H 1 diff --git a/sysdeps/unix/sysv/aix/sysdep.h b/sysdeps/unix/sysv/aix/sysdep.h index 1a43f96bc3..dcf37f2533 100644 --- a/sysdeps/unix/sysv/aix/sysdep.h +++ b/sysdeps/unix/sysv/aix/sysdep.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/tcgetattr.c b/sysdeps/unix/sysv/aix/tcgetattr.c index b994f178bd..01ffd55eff 100644 --- a/sysdeps/unix/sysv/aix/tcgetattr.c +++ b/sysdeps/unix/sysv/aix/tcgetattr.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/aix/tcsetattr.c b/sysdeps/unix/sysv/aix/tcsetattr.c index 516bcfb635..b11676e4c3 100644 --- a/sysdeps/unix/sysv/aix/tcsetattr.c +++ b/sysdeps/unix/sysv/aix/tcsetattr.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/aix/times.c b/sysdeps/unix/sysv/aix/times.c index c974049738..8ebc40b021 100644 --- a/sysdeps/unix/sysv/aix/times.c +++ b/sysdeps/unix/sysv/aix/times.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/truncate.c b/sysdeps/unix/sysv/aix/truncate.c index 78f20fad13..247aebb330 100644 --- a/sysdeps/unix/sysv/aix/truncate.c +++ b/sysdeps/unix/sysv/aix/truncate.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/truncate64.c b/sysdeps/unix/sysv/aix/truncate64.c index 6582a458b1..3a219c0184 100644 --- a/sysdeps/unix/sysv/aix/truncate64.c +++ b/sysdeps/unix/sysv/aix/truncate64.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/uitrunc.c b/sysdeps/unix/sysv/aix/uitrunc.c index 34a109b409..54cdc3af76 100644 --- a/sysdeps/unix/sysv/aix/uitrunc.c +++ b/sysdeps/unix/sysv/aix/uitrunc.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/ulimit.c b/sysdeps/unix/sysv/aix/ulimit.c index c72a527c0a..44fef64493 100644 --- a/sysdeps/unix/sysv/aix/ulimit.c +++ b/sysdeps/unix/sysv/aix/ulimit.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/aix/umask.c b/sysdeps/unix/sysv/aix/umask.c index 6bbfdac5e3..e8c45e40b6 100644 --- a/sysdeps/unix/sysv/aix/umask.c +++ b/sysdeps/unix/sysv/aix/umask.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/unlink.c b/sysdeps/unix/sysv/aix/unlink.c index e1bac23f4b..6fe9b59c61 100644 --- a/sysdeps/unix/sysv/aix/unlink.c +++ b/sysdeps/unix/sysv/aix/unlink.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/usleep.c b/sysdeps/unix/sysv/aix/usleep.c index 19d57737bc..e34fd0882d 100644 --- a/sysdeps/unix/sysv/aix/usleep.c +++ b/sysdeps/unix/sysv/aix/usleep.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/aix/utimes.c b/sysdeps/unix/sysv/aix/utimes.c index 907931ac7e..9bef02ae03 100644 --- a/sysdeps/unix/sysv/aix/utimes.c +++ b/sysdeps/unix/sysv/aix/utimes.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/utmpx.h b/sysdeps/unix/sysv/aix/utmpx.h index f7a7a3eeb0..1647bfe681 100644 --- a/sysdeps/unix/sysv/aix/utmpx.h +++ b/sysdeps/unix/sysv/aix/utmpx.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _UTMPX_H #define _UTMPX_H 1 diff --git a/sysdeps/unix/sysv/aix/wait3.c b/sysdeps/unix/sysv/aix/wait3.c index 0e37f80d5d..b0f7faa150 100644 --- a/sysdeps/unix/sysv/aix/wait3.c +++ b/sysdeps/unix/sysv/aix/wait3.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/aix/wait4.c b/sysdeps/unix/sysv/aix/wait4.c index 1a5f58f8d1..dd08f42782 100644 --- a/sysdeps/unix/sysv/aix/wait4.c +++ b/sysdeps/unix/sysv/aix/wait4.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/aix/waitid.c b/sysdeps/unix/sysv/aix/waitid.c index a1fcae0059..36a012ef02 100644 --- a/sysdeps/unix/sysv/aix/waitid.c +++ b/sysdeps/unix/sysv/aix/waitid.c @@ -4,19 +4,19 @@ Contributed by Zack Weinberg , 1997. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/aix/waitpid.c b/sysdeps/unix/sysv/aix/waitpid.c index 10befc39be..4875612327 100644 --- a/sysdeps/unix/sysv/aix/waitpid.c +++ b/sysdeps/unix/sysv/aix/waitpid.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/aix/write.c b/sysdeps/unix/sysv/aix/write.c index 82c2bf6861..727ec82cfb 100644 --- a/sysdeps/unix/sysv/aix/write.c +++ b/sysdeps/unix/sysv/aix/write.c @@ -3,19 +3,19 @@ Contributed by Ulrich Drepper , 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/writev.c b/sysdeps/unix/sysv/aix/writev.c index a8f9cf55b4..0d5a3335af 100644 --- a/sysdeps/unix/sysv/aix/writev.c +++ b/sysdeps/unix/sysv/aix/writev.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/aix/xstat.c b/sysdeps/unix/sysv/aix/xstat.c index df01afadf9..bf901e2f47 100644 --- a/sysdeps/unix/sysv/aix/xstat.c +++ b/sysdeps/unix/sysv/aix/xstat.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/aix/xstat64.c b/sysdeps/unix/sysv/aix/xstat64.c index eadf637103..91f83175f3 100644 --- a/sysdeps/unix/sysv/aix/xstat64.c +++ b/sysdeps/unix/sysv/aix/xstat64.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/hpux/bits/errno.h b/sysdeps/unix/sysv/hpux/bits/errno.h index 9414fc792a..acae4848f8 100644 --- a/sysdeps/unix/sysv/hpux/bits/errno.h +++ b/sysdeps/unix/sysv/hpux/bits/errno.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* This file defines the `errno' constants. */ diff --git a/sysdeps/unix/sysv/hpux/bits/stat.h b/sysdeps/unix/sysv/hpux/bits/stat.h index 1875742ecc..845b29765f 100644 --- a/sysdeps/unix/sysv/hpux/bits/stat.h +++ b/sysdeps/unix/sysv/hpux/bits/stat.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_STAT_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/hpux/bits/types.h b/sysdeps/unix/sysv/hpux/bits/types.h index 88ae1a9e9a..e231841a83 100644 --- a/sysdeps/unix/sysv/hpux/bits/types.h +++ b/sysdeps/unix/sysv/hpux/bits/types.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* * Never include this file directly; use instead. diff --git a/sysdeps/unix/sysv/hpux/sysdep.h b/sysdeps/unix/sysv/hpux/sysdep.h index 88c2dcf6aa..89a3377116 100644 --- a/sysdeps/unix/sysv/hpux/sysdep.h +++ b/sysdeps/unix/sysv/hpux/sysdep.h @@ -3,19 +3,19 @@ Contributed by Ulrich Drepper, , August 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* No underscores necessary. */ #define NO_UNDERSCORES diff --git a/sysdeps/unix/sysv/i386/signal.S b/sysdeps/unix/sysv/i386/signal.S index 1ccd9d39a9..af51bc5182 100644 --- a/sysdeps/unix/sysv/i386/signal.S +++ b/sysdeps/unix/sysv/i386/signal.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/i386/sigreturn.S b/sysdeps/unix/sysv/i386/sigreturn.S index 8477bbd075..edf4418c5b 100644 --- a/sysdeps/unix/sysv/i386/sigreturn.S +++ b/sysdeps/unix/sysv/i386/sigreturn.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/irix4/Makefile b/sysdeps/unix/sysv/irix4/Makefile index b24278a34e..d07981e8f7 100644 --- a/sysdeps/unix/sysv/irix4/Makefile +++ b/sysdeps/unix/sysv/irix4/Makefile @@ -2,19 +2,19 @@ # 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 Library General Public License -# as published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. +# 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 -# Library General Public License for more details. +# Lesser General Public License for more details. -# You should have received a copy of the GNU Library General Public -# License along with the GNU C Library; see the file COPYING.LIB. If not, -# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. +# 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. ifeq ($(subdir),signal) sysdep_routines := $(sysdep_routines) sigtramp __handler diff --git a/sysdeps/unix/sysv/irix4/__handler.S b/sysdeps/unix/sysv/irix4/__handler.S index 5d0e16947a..f02121a0c2 100644 --- a/sysdeps/unix/sysv/irix4/__handler.S +++ b/sysdeps/unix/sysv/irix4/__handler.S @@ -4,19 +4,19 @@ Also hacked by Ian Lance Taylor (ian@airs.com). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/irix4/bits/confname.h b/sysdeps/unix/sysv/irix4/bits/confname.h index 89fca07fe5..ed334694cd 100644 --- a/sysdeps/unix/sysv/irix4/bits/confname.h +++ b/sysdeps/unix/sysv/irix4/bits/confname.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _UNISTD_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/irix4/bits/fcntl.h b/sysdeps/unix/sysv/irix4/bits/fcntl.h index a926d049ec..dcba25fbc8 100644 --- a/sysdeps/unix/sysv/irix4/bits/fcntl.h +++ b/sysdeps/unix/sysv/irix4/bits/fcntl.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _FCNTL_H #error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/irix4/bits/mman.h b/sysdeps/unix/sysv/irix4/bits/mman.h index c378cce648..1549ff01c7 100644 --- a/sysdeps/unix/sysv/irix4/bits/mman.h +++ b/sysdeps/unix/sysv/irix4/bits/mman.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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_MMAN_H #define _BITS_MMAN_H 1 diff --git a/sysdeps/unix/sysv/irix4/bits/signum.h b/sysdeps/unix/sysv/irix4/bits/signum.h index 13314cff42..c96ab9d2b9 100644 --- a/sysdeps/unix/sysv/irix4/bits/signum.h +++ b/sysdeps/unix/sysv/irix4/bits/signum.h @@ -1,20 +1,21 @@ /* Signal number definitions. Irix4 version. Copyright (C) 1994, 1996 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #ifdef _SIGNAL_H diff --git a/sysdeps/unix/sysv/irix4/bits/stat.h b/sysdeps/unix/sysv/irix4/bits/stat.h index 522842147d..33f575db1c 100644 --- a/sysdeps/unix/sysv/irix4/bits/stat.h +++ b/sysdeps/unix/sysv/irix4/bits/stat.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_STAT_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/irix4/fpathconf.c b/sysdeps/unix/sysv/irix4/fpathconf.c index 5d4d2c3bde..dbee0bbe0a 100644 --- a/sysdeps/unix/sysv/irix4/fpathconf.c +++ b/sysdeps/unix/sysv/irix4/fpathconf.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/irix4/getgroups.c b/sysdeps/unix/sysv/irix4/getgroups.c index b68fe28be7..520805314b 100644 --- a/sysdeps/unix/sysv/irix4/getgroups.c +++ b/sysdeps/unix/sysv/irix4/getgroups.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/irix4/getpriority.c b/sysdeps/unix/sysv/irix4/getpriority.c index 5203b42ac9..9fc2be963e 100644 --- a/sysdeps/unix/sysv/irix4/getpriority.c +++ b/sysdeps/unix/sysv/irix4/getpriority.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/irix4/getrusage.c b/sysdeps/unix/sysv/irix4/getrusage.c index 95f4773b02..8d0c4008c9 100644 --- a/sysdeps/unix/sysv/irix4/getrusage.c +++ b/sysdeps/unix/sysv/irix4/getrusage.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/irix4/pathconf.c b/sysdeps/unix/sysv/irix4/pathconf.c index 12518ab296..7439c73157 100644 --- a/sysdeps/unix/sysv/irix4/pathconf.c +++ b/sysdeps/unix/sysv/irix4/pathconf.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/irix4/setgroups.c b/sysdeps/unix/sysv/irix4/setgroups.c index 69e668966e..57f0ed5c25 100644 --- a/sysdeps/unix/sysv/irix4/setgroups.c +++ b/sysdeps/unix/sysv/irix4/setgroups.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/irix4/setpriority.c b/sysdeps/unix/sysv/irix4/setpriority.c index 8e2c8ec943..9254ed4268 100644 --- a/sysdeps/unix/sysv/irix4/setpriority.c +++ b/sysdeps/unix/sysv/irix4/setpriority.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/irix4/sigreturn.S b/sysdeps/unix/sysv/irix4/sigreturn.S index c56738ce79..296db1d47d 100644 --- a/sysdeps/unix/sysv/irix4/sigreturn.S +++ b/sysdeps/unix/sysv/irix4/sigreturn.S @@ -3,19 +3,19 @@ Contributed by Brendan Kehoe (brendan@cs.widener.edu). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/irix4/sigtramp.c b/sysdeps/unix/sysv/irix4/sigtramp.c index 5411595c41..d6cfd33915 100644 --- a/sysdeps/unix/sysv/irix4/sigtramp.c +++ b/sysdeps/unix/sysv/irix4/sigtramp.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* The sigvec system call on MIPS Ultrix takes an additional parameter, which is the address that is actually called when the diff --git a/sysdeps/unix/sysv/irix4/start.c b/sysdeps/unix/sysv/irix4/start.c index 0977642920..719d017993 100644 --- a/sysdeps/unix/sysv/irix4/start.c +++ b/sysdeps/unix/sysv/irix4/start.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/irix4/sysconf.c b/sysdeps/unix/sysv/irix4/sysconf.c index 2e409eed20..3f350b5cb2 100644 --- a/sysdeps/unix/sysv/irix4/sysconf.c +++ b/sysdeps/unix/sysv/irix4/sysconf.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/irix4/uname.S b/sysdeps/unix/sysv/irix4/uname.S index f0464d3d88..0b6536fd29 100644 --- a/sysdeps/unix/sysv/irix4/uname.S +++ b/sysdeps/unix/sysv/irix4/uname.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/irix4/wait.S b/sysdeps/unix/sysv/irix4/wait.S index 82fdee5098..90cd5948e7 100644 --- a/sysdeps/unix/sysv/irix4/wait.S +++ b/sysdeps/unix/sysv/irix4/wait.S @@ -3,19 +3,19 @@ Contributed by Brendan Kehoe (brendan@cs.widener.edu). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/linux/alpha/adjtime.c b/sysdeps/unix/sysv/linux/alpha/adjtime.c index 560cb2771c..d613ff0ff1 100644 --- a/sysdeps/unix/sysv/linux/alpha/adjtime.c +++ b/sysdeps/unix/sysv/linux/alpha/adjtime.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/linux/alpha/bits/dirent.h b/sysdeps/unix/sysv/linux/alpha/bits/dirent.h index a371a552ff..6ed74783ad 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/dirent.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/dirent.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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_DIRENT_H #define _BITS_DIRENT_H 1 diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h index 55f8e74fc9..8aee77f1a0 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _FCNTL_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h b/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h index 7c1e0f7960..c525046e5c 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_IOCTL_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/alpha/bits/ipc.h b/sysdeps/unix/sysv/linux/alpha/bits/ipc.h index 004a683112..77f3c938d4 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/ipc.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/ipc.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_IPC_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/alpha/bits/mman.h b/sysdeps/unix/sysv/linux/alpha/bits/mman.h index 31e39a8af5..77b595a0e5 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/mman.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/mman.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_MMAN_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/alpha/bits/msq.h b/sysdeps/unix/sysv/linux/alpha/bits/msq.h index 9271ce69d7..ab251eaf76 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/msq.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/msq.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_MSG_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/alpha/bits/netdb.h b/sysdeps/unix/sysv/linux/alpha/bits/netdb.h index f5a33d998d..e3664fd292 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/netdb.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/netdb.h @@ -1,20 +1,20 @@ /* Copyright (C) 1996, 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 modify it under the terms of the GNU Library General Public + 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 of the License, or (at your option) any later version. + 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 Library General Public License for more details. + 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 Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If - not, write to the Free Software Foundation, Inc., 59 Temple Place - - Suite 330, Boston, MA 02111-1307, USA. */ + 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 _NETDB_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/alpha/bits/resource.h b/sysdeps/unix/sysv/linux/alpha/bits/resource.h index a97c96c2ed..3f4e72ccb1 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/resource.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/resource.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_RESOURCE_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sem.h b/sysdeps/unix/sysv/linux/alpha/bits/sem.h index 5236d57984..f63360b2bc 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/sem.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/sem.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_SEM_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/alpha/bits/shm.h b/sysdeps/unix/sysv/linux/alpha/bits/shm.h index acd479de57..8559ce33d4 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/shm.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/shm.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_SHM_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h index 605c4f3fa3..80feb2fa2d 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SIGNAL_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h b/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h index 6e1634080e..2cc92babba 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #if !defined _SIGNAL_H && !defined __need_siginfo_t \ && !defined __need_sigevent_t diff --git a/sysdeps/unix/sysv/linux/alpha/bits/signum.h b/sysdeps/unix/sysv/linux/alpha/bits/signum.h index 0d5452dc30..44c96a2045 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/signum.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/signum.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #ifdef _SIGNAL_H diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sigstack.h b/sysdeps/unix/sysv/linux/alpha/bits/sigstack.h index bc993d130a..7faaf98d54 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/sigstack.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/sigstack.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SIGNAL_H # error "Never include this file directly. Use instead" diff --git a/sysdeps/unix/sysv/linux/alpha/bits/socket.h b/sysdeps/unix/sysv/linux/alpha/bits/socket.h index a5c7e95d3c..2d57128231 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/socket.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/socket.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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_SOCKET_H #define __BITS_SOCKET_H diff --git a/sysdeps/unix/sysv/linux/alpha/bits/stat.h b/sysdeps/unix/sysv/linux/alpha/bits/stat.h index 60a61601e9..921283a511 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/stat.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/stat.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_STAT_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/alpha/bits/statvfs.h b/sysdeps/unix/sysv/linux/alpha/bits/statvfs.h index 747dc1ba9f..d37d0ffcb6 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/statvfs.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/statvfs.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_STATVFS_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/alpha/bits/termios.h b/sysdeps/unix/sysv/linux/alpha/bits/termios.h index 13e17b7b43..079073dd54 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/termios.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/termios.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _TERMIOS_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/alpha/bits/time.h b/sysdeps/unix/sysv/linux/alpha/bits/time.h index e0e0104a34..dd4dfaf967 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/time.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/time.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* * Never include this file directly; use instead. diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h index b357994090..1b809e235e 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/types.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* * Never include this file directly; use instead. diff --git a/sysdeps/unix/sysv/linux/alpha/brk.S b/sysdeps/unix/sysv/linux/alpha/brk.S index 9ecd0d47a1..3cd1ae0fbd 100644 --- a/sysdeps/unix/sysv/linux/alpha/brk.S +++ b/sysdeps/unix/sysv/linux/alpha/brk.S @@ -3,19 +3,19 @@ Contributed by Brendan Kehoe , 1993. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* __brk is a special syscall under Linux since it never returns an error. Instead, the error condition is indicated by returning the old diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S index a8bd7f1b33..f1f62146ac 100644 --- a/sysdeps/unix/sysv/linux/alpha/clone.S +++ b/sysdeps/unix/sysv/linux/alpha/clone.S @@ -3,19 +3,19 @@ Contributed by Richard Henderson , 1996. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* clone() is even more special than fork() as it mucks with stacks and invokes a function in the right context after its all over. */ diff --git a/sysdeps/unix/sysv/linux/alpha/fpathconf.c b/sysdeps/unix/sysv/linux/alpha/fpathconf.c index 235c02c8f8..a7425d7f09 100644 --- a/sysdeps/unix/sysv/linux/alpha/fpathconf.c +++ b/sysdeps/unix/sysv/linux/alpha/fpathconf.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/linux/alpha/getitimer.S b/sysdeps/unix/sysv/linux/alpha/getitimer.S index 08a3e1c94b..03ceea10f0 100644 --- a/sysdeps/unix/sysv/linux/alpha/getitimer.S +++ b/sysdeps/unix/sysv/linux/alpha/getitimer.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #define _ERRNO_H 1 diff --git a/sysdeps/unix/sysv/linux/alpha/getrusage.S b/sysdeps/unix/sysv/linux/alpha/getrusage.S index 8d96455ae1..13762a87b1 100644 --- a/sysdeps/unix/sysv/linux/alpha/getrusage.S +++ b/sysdeps/unix/sysv/linux/alpha/getrusage.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #define _ERRNO_H 1 diff --git a/sysdeps/unix/sysv/linux/alpha/getsysstats.c b/sysdeps/unix/sysv/linux/alpha/getsysstats.c index d86fc213bf..0e49a84526 100644 --- a/sysdeps/unix/sysv/linux/alpha/getsysstats.c +++ b/sysdeps/unix/sysv/linux/alpha/getsysstats.c @@ -4,19 +4,19 @@ Contributed by Andreas Schwab 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* We need to define a special parser for /proc/cpuinfo. */ diff --git a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S index e56893b121..22f3bb7bc2 100644 --- a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S +++ b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #define _ERRNO_H 1 diff --git a/sysdeps/unix/sysv/linux/alpha/glob.c b/sysdeps/unix/sysv/linux/alpha/glob.c index 10b10e4033..9a52ae87e9 100644 --- a/sysdeps/unix/sysv/linux/alpha/glob.c +++ b/sysdeps/unix/sysv/linux/alpha/glob.c @@ -1,19 +1,20 @@ /* Copyright (C) 1998, 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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. - This library is distributed in the hope that it will be useful, + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with this library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #define glob64 __no_glob64_decl #define globfree64 __no_globfree64_decl diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S index ae559d9851..650f7c0715 100644 --- a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S +++ b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S @@ -3,19 +3,19 @@ Contributed by David Mosberger , 1995. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S index 779dc0b203..53838fe84e 100644 --- a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S +++ b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S @@ -3,19 +3,19 @@ Contributed by David Mosberger , 1995. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c index 98f7163053..6c4115d1c8 100644 --- a/sysdeps/unix/sysv/linux/alpha/ioperm.c +++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c @@ -3,19 +3,19 @@ Contributed by David Mosberger. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* I/O access is restricted to ISA port space (ports 0..65535). Modern devices hopefully are sane enough not to put any performance diff --git a/sysdeps/unix/sysv/linux/alpha/ipc_priv.h b/sysdeps/unix/sysv/linux/alpha/ipc_priv.h index cc69795745..b754a1fd51 100644 --- a/sysdeps/unix/sysv/linux/alpha/ipc_priv.h +++ b/sysdeps/unix/sysv/linux/alpha/ipc_priv.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/linux/alpha/kernel_termios.h b/sysdeps/unix/sysv/linux/alpha/kernel_termios.h index 6a99146b5a..c38f1fac1a 100644 --- a/sysdeps/unix/sysv/linux/alpha/kernel_termios.h +++ b/sysdeps/unix/sysv/linux/alpha/kernel_termios.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _KERNEL_TERMIOS_H #define _KERNEL_TERMIOS_H 1 diff --git a/sysdeps/unix/sysv/linux/alpha/msgctl.c b/sysdeps/unix/sysv/linux/alpha/msgctl.c index c56829937b..d543fe3b9b 100644 --- a/sysdeps/unix/sysv/linux/alpha/msgctl.c +++ b/sysdeps/unix/sysv/linux/alpha/msgctl.c @@ -3,19 +3,19 @@ Contributed by Ulrich Drepper , August 1995. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/linux/alpha/net/route.h b/sysdeps/unix/sysv/linux/alpha/net/route.h index 6c7d8dd015..98df75f3aa 100644 --- a/sysdeps/unix/sysv/linux/alpha/net/route.h +++ b/sysdeps/unix/sysv/linux/alpha/net/route.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Based on the 4.4BSD and Linux version of this file. */ diff --git a/sysdeps/unix/sysv/linux/alpha/oldglob.c b/sysdeps/unix/sysv/linux/alpha/oldglob.c index 728f1fe664..68cda76c97 100644 --- a/sysdeps/unix/sysv/linux/alpha/oldglob.c +++ b/sysdeps/unix/sysv/linux/alpha/oldglob.c @@ -1,19 +1,20 @@ /* Copyright (C) 1998, 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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. - This library is distributed in the hope that it will be useful, + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with this library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* This file contains only wrappers around the real glob functions. It became necessary since the glob_t structure changed. */ diff --git a/sysdeps/unix/sysv/linux/alpha/pathconf.c b/sysdeps/unix/sysv/linux/alpha/pathconf.c index be5e938783..45c1724dcf 100644 --- a/sysdeps/unix/sysv/linux/alpha/pathconf.c +++ b/sysdeps/unix/sysv/linux/alpha/pathconf.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/linux/alpha/pipe.S b/sysdeps/unix/sysv/linux/alpha/pipe.S index 6a2bcf31ce..5d2905a8dc 100644 --- a/sysdeps/unix/sysv/linux/alpha/pipe.S +++ b/sysdeps/unix/sysv/linux/alpha/pipe.S @@ -3,19 +3,19 @@ Contributed by David Mosberger (davidm@cs.arizona.edu). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* __pipe is a special syscall since it returns two values. */ diff --git a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S index 5697584914..e3d01af928 100644 --- a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S +++ b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S @@ -3,19 +3,19 @@ Contributed by Richard Henderson , 1998 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/linux/alpha/select.S b/sysdeps/unix/sysv/linux/alpha/select.S index 1876e2f947..40c0f9fb40 100644 --- a/sysdeps/unix/sysv/linux/alpha/select.S +++ b/sysdeps/unix/sysv/linux/alpha/select.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #define _ERRNO_H 1 diff --git a/sysdeps/unix/sysv/linux/alpha/semctl.c b/sysdeps/unix/sysv/linux/alpha/semctl.c index ea1a1e4d71..6f164b4942 100644 --- a/sysdeps/unix/sysv/linux/alpha/semctl.c +++ b/sysdeps/unix/sysv/linux/alpha/semctl.c @@ -3,19 +3,19 @@ Contributed by Ulrich Drepper , August 1995. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/linux/alpha/setfpucw.c b/sysdeps/unix/sysv/linux/alpha/setfpucw.c index 5e74c35d88..5622d8425c 100644 --- a/sysdeps/unix/sysv/linux/alpha/setfpucw.c +++ b/sysdeps/unix/sysv/linux/alpha/setfpucw.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/linux/alpha/setitimer.S b/sysdeps/unix/sysv/linux/alpha/setitimer.S index 0fc5fe7f8a..2cc126337d 100644 --- a/sysdeps/unix/sysv/linux/alpha/setitimer.S +++ b/sysdeps/unix/sysv/linux/alpha/setitimer.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #define _ERRNO_H 1 diff --git a/sysdeps/unix/sysv/linux/alpha/settimeofday.S b/sysdeps/unix/sysv/linux/alpha/settimeofday.S index 35c56020be..03e9206d48 100644 --- a/sysdeps/unix/sysv/linux/alpha/settimeofday.S +++ b/sysdeps/unix/sysv/linux/alpha/settimeofday.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #define _ERRNO_H 1 diff --git a/sysdeps/unix/sysv/linux/alpha/shmctl.c b/sysdeps/unix/sysv/linux/alpha/shmctl.c index bd5b881651..0a6cdf170c 100644 --- a/sysdeps/unix/sysv/linux/alpha/shmctl.c +++ b/sysdeps/unix/sysv/linux/alpha/shmctl.c @@ -3,19 +3,19 @@ Contributed by Ulrich Drepper , August 1995. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h b/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h index 4613bd51ac..eb6f4f0758 100644 --- a/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h +++ b/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #define SIGCONTEXT struct sigcontext #define SIGCONTEXT_EXTRA_ARGS diff --git a/sysdeps/unix/sysv/linux/alpha/sigprocmask.c b/sysdeps/unix/sysv/linux/alpha/sigprocmask.c index 7fb58f1d80..4d2219213a 100644 --- a/sysdeps/unix/sysv/linux/alpha/sigprocmask.c +++ b/sysdeps/unix/sysv/linux/alpha/sigprocmask.c @@ -3,19 +3,19 @@ Contributed by David Mosberger (davidm@azstarnet.com). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S index 3036b2f8ed..7aa851e9ea 100644 --- a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S +++ b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S @@ -3,19 +3,19 @@ Contributed by David Mosberger , 1995. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* sigsuspend is a special syscall since it needs to dereference the sigset. This will have to change when we have more than 64 signals. */ diff --git a/sysdeps/unix/sysv/linux/alpha/sizes.h b/sysdeps/unix/sysv/linux/alpha/sizes.h index a1335868a2..0c7f4d5d2a 100644 --- a/sysdeps/unix/sysv/linux/alpha/sizes.h +++ b/sysdeps/unix/sysv/linux/alpha/sizes.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SIZES_H #define _SIZES_H 1 diff --git a/sysdeps/unix/sysv/linux/alpha/sys/acct.h b/sysdeps/unix/sysv/linux/alpha/sys/acct.h index 2ddf44ad43..1e00006ef7 100644 --- a/sysdeps/unix/sysv/linux/alpha/sys/acct.h +++ b/sysdeps/unix/sysv/linux/alpha/sys/acct.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_ACCT_H diff --git a/sysdeps/unix/sysv/linux/alpha/sys/io.h b/sysdeps/unix/sysv/linux/alpha/sys/io.h index d98430baa9..4334c63925 100644 --- a/sysdeps/unix/sysv/linux/alpha/sys/io.h +++ b/sysdeps/unix/sysv/linux/alpha/sys/io.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_IO_H diff --git a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h index a9ae104e56..bee51f94e2 100644 --- a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_PROCFS_H #define _SYS_PROCFS_H 1 diff --git a/sysdeps/unix/sysv/linux/alpha/sys/sysmacros.h b/sysdeps/unix/sysv/linux/alpha/sys/sysmacros.h index ca5d44ffb9..43ec376c04 100644 --- a/sysdeps/unix/sysv/linux/alpha/sys/sysmacros.h +++ b/sysdeps/unix/sysv/linux/alpha/sys/sysmacros.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_SYSMACROS_H #define _SYS_SYSMACROS_H 1 diff --git a/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h b/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h index 50c643ae06..438293c62b 100644 --- a/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_UCONTEXT_H #define _SYS_UCONTEXT_H 1 diff --git a/sysdeps/unix/sysv/linux/alpha/sys/user.h b/sysdeps/unix/sysv/linux/alpha/sys/user.h index fe6acb2247..4cd29d2ff8 100644 --- a/sysdeps/unix/sysv/linux/alpha/sys/user.h +++ b/sysdeps/unix/sysv/linux/alpha/sys/user.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_USER_H #define _SYS_USER_H 1 diff --git a/sysdeps/unix/sysv/linux/alpha/syscall.S b/sysdeps/unix/sysv/linux/alpha/syscall.S index 7f8a33f304..c354bb6161 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscall.S +++ b/sysdeps/unix/sysv/linux/alpha/syscall.S @@ -3,19 +3,19 @@ Contributed by David Mosberger , 1996. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h index 1a3cf37c6d..05a4c3a94a 100644 --- a/sysdeps/unix/sysv/linux/alpha/sysdep.h +++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h @@ -3,19 +3,19 @@ Contributed by Ulrich Drepper, , August 1995. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #ifdef __ASSEMBLER__ diff --git a/sysdeps/unix/sysv/linux/alpha/ustat.c b/sysdeps/unix/sysv/linux/alpha/ustat.c index 6c64d31edc..5fe25ff2c1 100644 --- a/sysdeps/unix/sysv/linux/alpha/ustat.c +++ b/sysdeps/unix/sysv/linux/alpha/ustat.c @@ -3,19 +3,19 @@ Contributed by Ulrich Drepper , 1997. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/linux/alpha/utimes.S b/sysdeps/unix/sysv/linux/alpha/utimes.S index 959ec859c5..e9c16db39d 100644 --- a/sysdeps/unix/sysv/linux/alpha/utimes.S +++ b/sysdeps/unix/sysv/linux/alpha/utimes.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #define _ERRNO_H 1 diff --git a/sysdeps/unix/sysv/linux/alpha/wait4.S b/sysdeps/unix/sysv/linux/alpha/wait4.S index 08b3a09b53..b695047890 100644 --- a/sysdeps/unix/sysv/linux/alpha/wait4.S +++ b/sysdeps/unix/sysv/linux/alpha/wait4.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #define _ERRNO_H 1 diff --git a/sysdeps/unix/sysv/linux/alpha/wordexp.c b/sysdeps/unix/sysv/linux/alpha/wordexp.c index d7ae6dd1a9..1027204071 100644 --- a/sysdeps/unix/sysv/linux/alpha/wordexp.c +++ b/sysdeps/unix/sysv/linux/alpha/wordexp.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/linux/alpha/xmknod.c b/sysdeps/unix/sysv/linux/alpha/xmknod.c index 25de60ce63..a659c1f5ce 100644 --- a/sysdeps/unix/sysv/linux/alpha/xmknod.c +++ b/sysdeps/unix/sysv/linux/alpha/xmknod.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/linux/alpha/xstatconv.c b/sysdeps/unix/sysv/linux/alpha/xstatconv.c index cb0269b8af..31fe7a52ec 100644 --- a/sysdeps/unix/sysv/linux/alpha/xstatconv.c +++ b/sysdeps/unix/sysv/linux/alpha/xstatconv.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h b/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h index 636a93bd95..4530cdbda9 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h +++ b/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* The format of struct sigcontext changed between 2.0 and 2.1 kernels. Fortunately 2.0 puts a magic number in the first word and this is not diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h index 776ee29e5b..152858d9f6 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + 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 Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _FCNTL_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/arm/bits/mman.h b/sysdeps/unix/sysv/linux/arm/bits/mman.h index fbb58c89dd..715e0f04c9 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/mman.h +++ b/sysdeps/unix/sysv/linux/arm/bits/mman.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_MMAN_H # error "Never include this file directly. Use instead" diff --git a/sysdeps/unix/sysv/linux/arm/bits/resource.h b/sysdeps/unix/sysv/linux/arm/bits/resource.h index db3848b267..3da13beb23 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/resource.h +++ b/sysdeps/unix/sysv/linux/arm/bits/resource.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_RESOURCE_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/arm/brk.c b/sysdeps/unix/sysv/linux/arm/brk.c index 560e5a8337..153d89358a 100644 --- a/sysdeps/unix/sysv/linux/arm/brk.c +++ b/sysdeps/unix/sysv/linux/arm/brk.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/linux/arm/clone.S b/sysdeps/unix/sysv/linux/arm/clone.S index 94aed12b47..c9a1ec23ac 100644 --- a/sysdeps/unix/sysv/linux/arm/clone.S +++ b/sysdeps/unix/sysv/linux/arm/clone.S @@ -3,19 +3,19 @@ Contributed by Pat Beirne 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* clone() is even more special than fork() as it mucks with stacks and invokes a function in the right context after its all over. */ diff --git a/sysdeps/unix/sysv/linux/arm/dl-procinfo.c b/sysdeps/unix/sysv/linux/arm/dl-procinfo.c index 564d7d153a..8bc18bf8a7 100644 --- a/sysdeps/unix/sysv/linux/arm/dl-procinfo.c +++ b/sysdeps/unix/sysv/linux/arm/dl-procinfo.c @@ -4,19 +4,19 @@ Contributed by Philip Blundell , 2001. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* This information must be kept in sync with the _DL_HWCAP_COUNT and _DL_PLATFORM_COUNT definitions in procinfo.h. */ diff --git a/sysdeps/unix/sysv/linux/arm/dl-procinfo.h b/sysdeps/unix/sysv/linux/arm/dl-procinfo.h index 9f4c83e5c1..87d114c39c 100644 --- a/sysdeps/unix/sysv/linux/arm/dl-procinfo.h +++ b/sysdeps/unix/sysv/linux/arm/dl-procinfo.h @@ -4,19 +4,19 @@ Contributed by Philip Blundell , 2001. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _DL_PROCINFO_H #define _DL_PROCINFO_H 1 diff --git a/sysdeps/unix/sysv/linux/arm/errlist.c b/sysdeps/unix/sysv/linux/arm/errlist.c index 63bf8e916c..ba5e699eed 100644 --- a/sysdeps/unix/sysv/linux/arm/errlist.c +++ b/sysdeps/unix/sysv/linux/arm/errlist.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/linux/arm/ioperm.c b/sysdeps/unix/sysv/linux/arm/ioperm.c index 3c51540ffe..40ac8e6038 100644 --- a/sysdeps/unix/sysv/linux/arm/ioperm.c +++ b/sysdeps/unix/sysv/linux/arm/ioperm.c @@ -4,19 +4,19 @@ David Mosberger. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* I/O port access on the ARM is something of a fiction. What we do is to map an appropriate area of /dev/mem into user space so that a program diff --git a/sysdeps/unix/sysv/linux/arm/mmap.S b/sysdeps/unix/sysv/linux/arm/mmap.S index 31d57e4a4d..af93c7bce7 100644 --- a/sysdeps/unix/sysv/linux/arm/mmap.S +++ b/sysdeps/unix/sysv/linux/arm/mmap.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/linux/arm/mmap64.S b/sysdeps/unix/sysv/linux/arm/mmap64.S index 57b1d8ace2..1f19bf02e1 100644 --- a/sysdeps/unix/sysv/linux/arm/mmap64.S +++ b/sysdeps/unix/sysv/linux/arm/mmap64.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/linux/arm/profil-counter.h b/sysdeps/unix/sysv/linux/arm/profil-counter.h index a1a4fc9d7f..5d8be9dba6 100644 --- a/sysdeps/unix/sysv/linux/arm/profil-counter.h +++ b/sysdeps/unix/sysv/linux/arm/profil-counter.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/linux/arm/register-dump.h b/sysdeps/unix/sysv/linux/arm/register-dump.h index 25036df41d..2baccb2cb7 100644 --- a/sysdeps/unix/sysv/linux/arm/register-dump.h +++ b/sysdeps/unix/sysv/linux/arm/register-dump.h @@ -4,19 +4,19 @@ Contributed by Philip Blundell , 1998. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/linux/arm/sigaction.c b/sysdeps/unix/sysv/linux/arm/sigaction.c index 53f24c4992..f39665f3c4 100644 --- a/sysdeps/unix/sysv/linux/arm/sigaction.c +++ b/sysdeps/unix/sysv/linux/arm/sigaction.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h b/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h index cc8f2f765c..aebc3cfd52 100644 --- a/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h +++ b/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h @@ -3,19 +3,19 @@ Contributed by Philip Blundell , 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/linux/arm/siglist.c b/sysdeps/unix/sysv/linux/arm/siglist.c index 3d7464e3e4..e053339908 100644 --- a/sysdeps/unix/sysv/linux/arm/siglist.c +++ b/sysdeps/unix/sysv/linux/arm/siglist.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/linux/arm/sigrestorer.S b/sysdeps/unix/sysv/linux/arm/sigrestorer.S index 8d32e4ce9c..98e33cb8bc 100644 --- a/sysdeps/unix/sysv/linux/arm/sigrestorer.S +++ b/sysdeps/unix/sysv/linux/arm/sigrestorer.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/linux/arm/socket.S b/sysdeps/unix/sysv/linux/arm/socket.S index 92c7e907a2..a672413d12 100644 --- a/sysdeps/unix/sysv/linux/arm/socket.S +++ b/sysdeps/unix/sysv/linux/arm/socket.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/linux/arm/sys/elf.h b/sysdeps/unix/sysv/linux/arm/sys/elf.h index ffd3b46ee6..faa7310682 100644 --- a/sysdeps/unix/sysv/linux/arm/sys/elf.h +++ b/sysdeps/unix/sysv/linux/arm/sys/elf.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_ELF_H #define _SYS_ELF_H 1 diff --git a/sysdeps/unix/sysv/linux/arm/sys/io.h b/sysdeps/unix/sysv/linux/arm/sys/io.h index 96d54cd337..68639902c7 100644 --- a/sysdeps/unix/sysv/linux/arm/sys/io.h +++ b/sysdeps/unix/sysv/linux/arm/sys/io.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_IO_H diff --git a/sysdeps/unix/sysv/linux/arm/sys/procfs.h b/sysdeps/unix/sysv/linux/arm/sys/procfs.h index ddce965711..3b3736324f 100644 --- a/sysdeps/unix/sysv/linux/arm/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/arm/sys/procfs.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_PROCFS_H #define _SYS_PROCFS_H 1 diff --git a/sysdeps/unix/sysv/linux/arm/sys/ucontext.h b/sysdeps/unix/sysv/linux/arm/sys/ucontext.h index c94c6c6ba1..6d6c8e3990 100644 --- a/sysdeps/unix/sysv/linux/arm/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/arm/sys/ucontext.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* System V/ARM ABI compliant context switching support. */ diff --git a/sysdeps/unix/sysv/linux/arm/sys/user.h b/sysdeps/unix/sysv/linux/arm/sys/user.h index e47c42c976..3fae43f83f 100644 --- a/sysdeps/unix/sysv/linux/arm/sys/user.h +++ b/sysdeps/unix/sysv/linux/arm/sys/user.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_USER_H #define _SYS_USER_H 1 diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.S b/sysdeps/unix/sysv/linux/arm/sysdep.S index 3e3c853c78..48dcffae13 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.S +++ b/sysdeps/unix/sysv/linux/arm/sysdep.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index 79453f8fe9..89ad1948a7 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -4,19 +4,19 @@ ARM changes by Philip Blundell, , May 1997. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _LINUX_ARM_SYSDEP_H #define _LINUX_ARM_SYSDEP_H 1 diff --git a/sysdeps/unix/sysv/linux/arm/vfork.S b/sysdeps/unix/sysv/linux/arm/vfork.S index 3d5bd95300..b10117e9f8 100644 --- a/sysdeps/unix/sysv/linux/arm/vfork.S +++ b/sysdeps/unix/sysv/linux/arm/vfork.S @@ -3,19 +3,19 @@ Contributed by Philip Blundell . 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #define _ERRNO_H 1 diff --git a/sysdeps/unix/sysv/linux/cris/bits/fcntl.h b/sysdeps/unix/sysv/linux/cris/bits/fcntl.h index 87c6c1950c..7e841f831a 100644 --- a/sysdeps/unix/sysv/linux/cris/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/cris/bits/fcntl.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + 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 Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _FCNTL_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/cris/bits/mman.h b/sysdeps/unix/sysv/linux/cris/bits/mman.h index f97e84183b..2813f0947d 100644 --- a/sysdeps/unix/sysv/linux/cris/bits/mman.h +++ b/sysdeps/unix/sysv/linux/cris/bits/mman.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_MMAN_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/cris/bits/resource.h b/sysdeps/unix/sysv/linux/cris/bits/resource.h index f7bfe424e2..09c1b7e43b 100644 --- a/sysdeps/unix/sysv/linux/cris/bits/resource.h +++ b/sysdeps/unix/sysv/linux/cris/bits/resource.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_RESOURCE_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/cris/brk.c b/sysdeps/unix/sysv/linux/cris/brk.c index 32a514523d..ce49445122 100644 --- a/sysdeps/unix/sysv/linux/cris/brk.c +++ b/sysdeps/unix/sysv/linux/cris/brk.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/linux/cris/clone.S b/sysdeps/unix/sysv/linux/cris/clone.S index c501c86627..b2016438a3 100644 --- a/sysdeps/unix/sysv/linux/cris/clone.S +++ b/sysdeps/unix/sysv/linux/cris/clone.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #define _ERRNO_H 1 diff --git a/sysdeps/unix/sysv/linux/cris/mmap.S b/sysdeps/unix/sysv/linux/cris/mmap.S index 33030f4ee4..3c74d590fa 100644 --- a/sysdeps/unix/sysv/linux/cris/mmap.S +++ b/sysdeps/unix/sysv/linux/cris/mmap.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/linux/cris/mmap64.S b/sysdeps/unix/sysv/linux/cris/mmap64.S index acf6ca33bf..d71114454b 100644 --- a/sysdeps/unix/sysv/linux/cris/mmap64.S +++ b/sysdeps/unix/sysv/linux/cris/mmap64.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/linux/cris/profil-counter.h b/sysdeps/unix/sysv/linux/cris/profil-counter.h index 8bbce544d1..37adc1fee7 100644 --- a/sysdeps/unix/sysv/linux/cris/profil-counter.h +++ b/sysdeps/unix/sysv/linux/cris/profil-counter.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/linux/cris/register-dump.h b/sysdeps/unix/sysv/linux/cris/register-dump.h index e8a52f73fc..309728bf96 100644 --- a/sysdeps/unix/sysv/linux/cris/register-dump.h +++ b/sysdeps/unix/sysv/linux/cris/register-dump.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/linux/cris/socket.S b/sysdeps/unix/sysv/linux/cris/socket.S index 06832ec395..38b4ac5fb4 100644 --- a/sysdeps/unix/sysv/linux/cris/socket.S +++ b/sysdeps/unix/sysv/linux/cris/socket.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/linux/cris/sys/ucontext.h b/sysdeps/unix/sysv/linux/cris/sys/ucontext.h index fe4dc7b5c4..2d3aee076e 100644 --- a/sysdeps/unix/sysv/linux/cris/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/cris/sys/ucontext.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_UCONTEXT_H #define _SYS_UCONTEXT_H 1 diff --git a/sysdeps/unix/sysv/linux/cris/syscall.S b/sysdeps/unix/sysv/linux/cris/syscall.S index eb5cdcccf9..03626b0946 100644 --- a/sysdeps/unix/sysv/linux/cris/syscall.S +++ b/sysdeps/unix/sysv/linux/cris/syscall.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/linux/cris/sysdep.S b/sysdeps/unix/sysv/linux/cris/sysdep.S index 4a108db1f7..64fb8505af 100644 --- a/sysdeps/unix/sysv/linux/cris/sysdep.S +++ b/sysdeps/unix/sysv/linux/cris/sysdep.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/linux/cris/sysdep.h b/sysdeps/unix/sysv/linux/cris/sysdep.h index d388665286..4446b26f50 100644 --- a/sysdeps/unix/sysv/linux/cris/sysdep.h +++ b/sysdeps/unix/sysv/linux/cris/sysdep.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/linux/cris/vfork.S b/sysdeps/unix/sysv/linux/cris/vfork.S index bb4072f3f6..39985a08a5 100644 --- a/sysdeps/unix/sysv/linux/cris/vfork.S +++ b/sysdeps/unix/sysv/linux/cris/vfork.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/linux/hppa/bits/errno.h b/sysdeps/unix/sysv/linux/hppa/bits/errno.h index db4eaf6364..8b1fa44e98 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/errno.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/errno.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #ifdef _ERRNO_H diff --git a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h index 687ffc8582..d8b110c28a 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _FCNTL_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/hppa/bits/ioctls.h b/sysdeps/unix/sysv/linux/hppa/bits/ioctls.h index bad78b60e8..6f4e05fcc8 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/ioctls.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/ioctls.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_IOCTL_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/hppa/bits/resource.h b/sysdeps/unix/sysv/linux/hppa/bits/resource.h index be4b53a1be..2e4958bb12 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/resource.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/resource.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_RESOURCE_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/hppa/bits/sigaction.h b/sysdeps/unix/sysv/linux/hppa/bits/sigaction.h index bdded3d6d3..33f2b237b7 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/sigaction.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/sigaction.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SIGNAL_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/hppa/bits/signum.h b/sysdeps/unix/sysv/linux/hppa/bits/signum.h index a475004029..14346bf065 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/signum.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/signum.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #ifdef _SIGNAL_H diff --git a/sysdeps/unix/sysv/linux/hppa/brk.c b/sysdeps/unix/sysv/linux/hppa/brk.c index c12608c6ee..b534b17710 100644 --- a/sysdeps/unix/sysv/linux/hppa/brk.c +++ b/sysdeps/unix/sysv/linux/hppa/brk.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/linux/hppa/clone.S b/sysdeps/unix/sysv/linux/hppa/clone.S index b902ff7669..459eaff195 100644 --- a/sysdeps/unix/sysv/linux/hppa/clone.S +++ b/sysdeps/unix/sysv/linux/hppa/clone.S @@ -4,19 +4,19 @@ Based on the Alpha version by Richard Henderson , 1996. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* clone() is even more special than fork() as it mucks with stacks and invokes a function in the right context after its all over. */ diff --git a/sysdeps/unix/sysv/linux/hppa/mmap.c b/sysdeps/unix/sysv/linux/hppa/mmap.c index 333d848c0d..6f4bfdce2a 100644 --- a/sysdeps/unix/sysv/linux/hppa/mmap.c +++ b/sysdeps/unix/sysv/linux/hppa/mmap.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/linux/hppa/sys/procfs.h b/sysdeps/unix/sysv/linux/hppa/sys/procfs.h index b6c756f7c0..2e6d10956d 100644 --- a/sysdeps/unix/sysv/linux/hppa/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/hppa/sys/procfs.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_PROCFS_H #define _SYS_PROCFS_H 1 diff --git a/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h b/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h index 44108f0c54..0f14b46adb 100644 --- a/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Don't rely on this, the interface is currently messed up and may need to be broken to be fixed. */ diff --git a/sysdeps/unix/sysv/linux/hppa/syscall.S b/sysdeps/unix/sysv/linux/hppa/syscall.S index 96b5b922b2..b333487c99 100644 --- a/sysdeps/unix/sysv/linux/hppa/syscall.S +++ b/sysdeps/unix/sysv/linux/hppa/syscall.S @@ -2,18 +2,18 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* HPPA implements syscall() in 'C'; see sysdep.c. */ diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.c b/sysdeps/unix/sysv/linux/hppa/sysdep.c index e185da5f34..b333b7013d 100644 --- a/sysdeps/unix/sysv/linux/hppa/sysdep.c +++ b/sysdeps/unix/sysv/linux/hppa/sysdep.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.h b/sysdeps/unix/sysv/linux/hppa/sysdep.h index 20ec736123..af255e1137 100644 --- a/sysdeps/unix/sysv/linux/hppa/sysdep.h +++ b/sysdeps/unix/sysv/linux/hppa/sysdep.h @@ -5,19 +5,19 @@ Linux/PA-RISC changes by Philipp Rumpf, , March 2000. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/linux/hppa/umount.c b/sysdeps/unix/sysv/linux/hppa/umount.c index 3d4c18cd4c..e7c5690890 100644 --- a/sysdeps/unix/sysv/linux/hppa/umount.c +++ b/sysdeps/unix/sysv/linux/hppa/umount.c @@ -3,19 +3,19 @@ Contributed by David Huggins-Daines , 2000. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Since we don't have an oldumount system call, do what the kernel does down here. */ diff --git a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h index 0afadf6e81..7de111adb7 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + 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 Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _FCNTL_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/m68k/bits/mman.h b/sysdeps/unix/sysv/linux/m68k/bits/mman.h index bca1dae960..34f14ee5bf 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/mman.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/mman.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_MMAN_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/m68k/bits/poll.h b/sysdeps/unix/sysv/linux/m68k/bits/poll.h index 7472a8005c..17adb4de47 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/poll.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/poll.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_POLL_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/m68k/bits/stat.h b/sysdeps/unix/sysv/linux/m68k/bits/stat.h index f360e7f829..213dbe267a 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/stat.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/stat.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_STAT_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/m68k/brk.c b/sysdeps/unix/sysv/linux/m68k/brk.c index bbbcf84188..10a82aaf2f 100644 --- a/sysdeps/unix/sysv/linux/m68k/brk.c +++ b/sysdeps/unix/sysv/linux/m68k/brk.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/linux/m68k/chown.c b/sysdeps/unix/sysv/linux/m68k/chown.c index 1ea7e264c9..50e11c1aa9 100644 --- a/sysdeps/unix/sysv/linux/m68k/chown.c +++ b/sysdeps/unix/sysv/linux/m68k/chown.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/linux/m68k/clone.S b/sysdeps/unix/sysv/linux/m68k/clone.S index 622f8117ac..9ca789d4a4 100644 --- a/sysdeps/unix/sysv/linux/m68k/clone.S +++ b/sysdeps/unix/sysv/linux/m68k/clone.S @@ -1,20 +1,21 @@ /* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Andreas Schwab (schwab@issan.informatik.uni-dortmund.de) 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* clone is even more special than fork as it mucks with stacks and invokes a function in the right context after its all over. */ diff --git a/sysdeps/unix/sysv/linux/m68k/getpagesize.c b/sysdeps/unix/sysv/linux/m68k/getpagesize.c index 0e2ba10804..cfe98fc5ad 100644 --- a/sysdeps/unix/sysv/linux/m68k/getpagesize.c +++ b/sysdeps/unix/sysv/linux/m68k/getpagesize.c @@ -3,19 +3,19 @@ Contributed by Andreas Schwab . 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/linux/m68k/mmap.S b/sysdeps/unix/sysv/linux/m68k/mmap.S index 94578311b3..086212a42b 100644 --- a/sysdeps/unix/sysv/linux/m68k/mmap.S +++ b/sysdeps/unix/sysv/linux/m68k/mmap.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/linux/m68k/mremap.S b/sysdeps/unix/sysv/linux/m68k/mremap.S index 2fec9aab7b..68d961b553 100644 --- a/sysdeps/unix/sysv/linux/m68k/mremap.S +++ b/sysdeps/unix/sysv/linux/m68k/mremap.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/linux/m68k/register-dump.h b/sysdeps/unix/sysv/linux/m68k/register-dump.h index 6e66b62f5b..ab9a155121 100644 --- a/sysdeps/unix/sysv/linux/m68k/register-dump.h +++ b/sysdeps/unix/sysv/linux/m68k/register-dump.h @@ -4,19 +4,19 @@ Contributed by Andreas Schwab . 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h b/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h index b7e6f375e5..b7e08cfc95 100644 --- a/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h +++ b/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h @@ -3,19 +3,19 @@ Contributed by Andreas Schwab , 1998. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #define SIGCONTEXT int _code, struct sigcontext * #define SIGCONTEXT_EXTRA_ARGS _code, diff --git a/sysdeps/unix/sysv/linux/m68k/socket.S b/sysdeps/unix/sysv/linux/m68k/socket.S index 767665cac7..3592d2a580 100644 --- a/sysdeps/unix/sysv/linux/m68k/socket.S +++ b/sysdeps/unix/sysv/linux/m68k/socket.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/linux/m68k/sys/reg.h b/sysdeps/unix/sysv/linux/m68k/sys/reg.h index 0f3a13382d..418f8323f1 100644 --- a/sysdeps/unix/sysv/linux/m68k/sys/reg.h +++ b/sysdeps/unix/sysv/linux/m68k/sys/reg.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_REG_H #define _SYS_REG_H 1 diff --git a/sysdeps/unix/sysv/linux/m68k/syscall.S b/sysdeps/unix/sysv/linux/m68k/syscall.S index f34c07600f..4f2c747c27 100644 --- a/sysdeps/unix/sysv/linux/m68k/syscall.S +++ b/sysdeps/unix/sysv/linux/m68k/syscall.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.S b/sysdeps/unix/sysv/linux/m68k/sysdep.S index 717122ca01..30beaf233f 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.S +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h index 39b7bda1bb..23fcc55f31 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -4,19 +4,19 @@ December 1995. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/linux/m68k/vfork.S b/sysdeps/unix/sysv/linux/m68k/vfork.S index d5b321dff6..b77a7bd15f 100644 --- a/sysdeps/unix/sysv/linux/m68k/vfork.S +++ b/sysdeps/unix/sysv/linux/m68k/vfork.S @@ -3,19 +3,19 @@ Contributed by Andreas Schwab . 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #define _ERRNO_H 1 diff --git a/sysdeps/unix/sysv/linux/mips/_test_and_set.c b/sysdeps/unix/sysv/linux/mips/_test_and_set.c index 870b12a142..9fd48f753e 100644 --- a/sysdeps/unix/sysv/linux/mips/_test_and_set.c +++ b/sysdeps/unix/sysv/linux/mips/_test_and_set.c @@ -3,19 +3,19 @@ Contributed by Maciej W. Rozycki , 2000. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Define the real-function versions of all inline functions defined in sys/tas.h */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/errno.h b/sysdeps/unix/sysv/linux/mips/bits/errno.h index c45829a18c..29ba9807a5 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/errno.h +++ b/sysdeps/unix/sysv/linux/mips/bits/errno.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #ifdef _ERRNO_H diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index 5657c32c44..6a09a09ece 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + 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 Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _FCNTL_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h b/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h index e40a0ad96e..a8dcf242d3 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h +++ b/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_IOCTL_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/mips/bits/ipc.h b/sysdeps/unix/sysv/linux/mips/bits/ipc.h index 0cdd232fe6..1f629ce665 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/ipc.h +++ b/sysdeps/unix/sysv/linux/mips/bits/ipc.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + 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 Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_IPC_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/mips/bits/mman.h b/sysdeps/unix/sysv/linux/mips/bits/mman.h index f6c5094f87..61886e27ee 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/mman.h +++ b/sysdeps/unix/sysv/linux/mips/bits/mman.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_MMAN_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/mips/bits/poll.h b/sysdeps/unix/sysv/linux/mips/bits/poll.h index b0ef0788d7..825d073df3 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/poll.h +++ b/sysdeps/unix/sysv/linux/mips/bits/poll.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_POLL_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/mips/bits/resource.h b/sysdeps/unix/sysv/linux/mips/bits/resource.h index ced5c5e4ea..b8551a2395 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/resource.h +++ b/sysdeps/unix/sysv/linux/mips/bits/resource.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_RESOURCE_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/mips/bits/sem.h b/sysdeps/unix/sysv/linux/mips/bits/sem.h index 5f7b0a944d..6282de9cc8 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/sem.h +++ b/sysdeps/unix/sysv/linux/mips/bits/sem.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_SEM_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/mips/bits/shm.h b/sysdeps/unix/sysv/linux/mips/bits/shm.h index 02fabb70b1..ddae6b01c2 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/shm.h +++ b/sysdeps/unix/sysv/linux/mips/bits/shm.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_SHM_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h index 0225078652..93a7598173 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h +++ b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SIGNAL_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h index 6e6f70b8ae..04c5f40d90 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h +++ b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #if !defined _SIGNAL_H && !defined __need_siginfo_t \ && !defined __need_sigevent_t diff --git a/sysdeps/unix/sysv/linux/mips/bits/signum.h b/sysdeps/unix/sysv/linux/mips/bits/signum.h index 2cf5814739..a9b6848346 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/signum.h +++ b/sysdeps/unix/sysv/linux/mips/bits/signum.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #ifdef _SIGNAL_H diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigstack.h b/sysdeps/unix/sysv/linux/mips/bits/sigstack.h index a0f1ba67e8..d2c8552209 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/sigstack.h +++ b/sysdeps/unix/sysv/linux/mips/bits/sigstack.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SIGNAL_H # error "Never include this file directly. Use instead" diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h index 9e38d288b7..482eefe257 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/socket.h +++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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_SOCKET_H #define __BITS_SOCKET_H diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h index 9210cae7f3..c0e6984d11 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/stat.h +++ b/sysdeps/unix/sysv/linux/mips/bits/stat.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_STAT_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/mips/bits/statfs.h b/sysdeps/unix/sysv/linux/mips/bits/statfs.h index 1099ae1f5e..2f9bd54edc 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/statfs.h +++ b/sysdeps/unix/sysv/linux/mips/bits/statfs.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_STATFS_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/mips/bits/termios.h b/sysdeps/unix/sysv/linux/mips/bits/termios.h index ca6b648548..87d0eae222 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/termios.h +++ b/sysdeps/unix/sysv/linux/mips/bits/termios.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _TERMIOS_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h index c3b93e3ac7..141f0b29e4 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/types.h +++ b/sysdeps/unix/sysv/linux/mips/bits/types.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* * Never include this file directly; use instead. diff --git a/sysdeps/unix/sysv/linux/mips/brk.c b/sysdeps/unix/sysv/linux/mips/brk.c index ce8561797d..4be88a9c5f 100644 --- a/sysdeps/unix/sysv/linux/mips/brk.c +++ b/sysdeps/unix/sysv/linux/mips/brk.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/linux/mips/clone.S b/sysdeps/unix/sysv/linux/mips/clone.S index dd7a1f56fe..1e029687cf 100644 --- a/sysdeps/unix/sysv/linux/mips/clone.S +++ b/sysdeps/unix/sysv/linux/mips/clone.S @@ -3,19 +3,19 @@ Contributed by Ralf Baechle , 1996. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* clone() is even more special than fork() as it mucks with stacks and invokes a function in the right context after its all over. */ diff --git a/sysdeps/unix/sysv/linux/mips/ftruncate64.c b/sysdeps/unix/sysv/linux/mips/ftruncate64.c index bc03e0c550..047bcb5061 100644 --- a/sysdeps/unix/sysv/linux/mips/ftruncate64.c +++ b/sysdeps/unix/sysv/linux/mips/ftruncate64.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/linux/mips/getsysstats.c b/sysdeps/unix/sysv/linux/mips/getsysstats.c index 799a733ea5..9b521ac76a 100644 --- a/sysdeps/unix/sysv/linux/mips/getsysstats.c +++ b/sysdeps/unix/sysv/linux/mips/getsysstats.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* We need to define a special parser for /proc/cpuinfo. */ diff --git a/sysdeps/unix/sysv/linux/mips/kernel_termios.h b/sysdeps/unix/sysv/linux/mips/kernel_termios.h index e8768627fc..9b622f4d1f 100644 --- a/sysdeps/unix/sysv/linux/mips/kernel_termios.h +++ b/sysdeps/unix/sysv/linux/mips/kernel_termios.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _KERNEL_TERMIOS_H #define _KERNEL_TERMIOS_H 1 diff --git a/sysdeps/unix/sysv/linux/mips/pread.c b/sysdeps/unix/sysv/linux/mips/pread.c index 93f19f4237..b1c1c0d871 100644 --- a/sysdeps/unix/sysv/linux/mips/pread.c +++ b/sysdeps/unix/sysv/linux/mips/pread.c @@ -3,19 +3,19 @@ Contributed by Ulrich Drepper , 1997. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/linux/mips/pread64.c b/sysdeps/unix/sysv/linux/mips/pread64.c index 6482ce45ad..d36d68967b 100644 --- a/sysdeps/unix/sysv/linux/mips/pread64.c +++ b/sysdeps/unix/sysv/linux/mips/pread64.c @@ -3,19 +3,19 @@ Contributed by Ulrich Drepper , 1997. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/linux/mips/pwrite.c b/sysdeps/unix/sysv/linux/mips/pwrite.c index 8283896d1a..40b2c8b23c 100644 --- a/sysdeps/unix/sysv/linux/mips/pwrite.c +++ b/sysdeps/unix/sysv/linux/mips/pwrite.c @@ -3,19 +3,19 @@ Contributed by Ulrich Drepper , 1997. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/linux/mips/pwrite64.c b/sysdeps/unix/sysv/linux/mips/pwrite64.c index af07f608d2..a655d6e795 100644 --- a/sysdeps/unix/sysv/linux/mips/pwrite64.c +++ b/sysdeps/unix/sysv/linux/mips/pwrite64.c @@ -3,19 +3,19 @@ Contributed by Ralf Baechle , 1998. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/linux/mips/register-dump.h b/sysdeps/unix/sysv/linux/mips/register-dump.h index 53c59c8423..f5fb34472f 100644 --- a/sysdeps/unix/sysv/linux/mips/register-dump.h +++ b/sysdeps/unix/sysv/linux/mips/register-dump.h @@ -4,19 +4,19 @@ Contributed by Andreas Jaeger , 2000. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/linux/mips/sigaction.c b/sysdeps/unix/sysv/linux/mips/sigaction.c index 36265d1891..fb32b50888 100644 --- a/sysdeps/unix/sysv/linux/mips/sigaction.c +++ b/sysdeps/unix/sysv/linux/mips/sigaction.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + 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 Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h index 36d57dcabf..a51c6f043c 100644 --- a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h +++ b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h @@ -3,19 +3,19 @@ Contributed by Andreas Jaeger , 2000. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #define SIGCONTEXT unsigned long _code, struct sigcontext * diff --git a/sysdeps/unix/sysv/linux/mips/sys/cachectl.h b/sysdeps/unix/sysv/linux/mips/sys/cachectl.h index 3bbd47cfb4..a93e1fb6d1 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/cachectl.h +++ b/sysdeps/unix/sysv/linux/mips/sys/cachectl.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_CACHECTL_H #define _SYS_CACHECTL_H 1 diff --git a/sysdeps/unix/sysv/linux/mips/sys/procfs.h b/sysdeps/unix/sysv/linux/mips/sys/procfs.h index 414e60e4d9..76dd2bbeb8 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/mips/sys/procfs.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_PROCFS_H #define _SYS_PROCFS_H 1 diff --git a/sysdeps/unix/sysv/linux/mips/sys/sysmips.h b/sysdeps/unix/sysv/linux/mips/sys/sysmips.h index 8afb149eb9..642a31629d 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/sysmips.h +++ b/sysdeps/unix/sysv/linux/mips/sys/sysmips.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_SYSMIPS_H #define _SYS_SYSMIPS_H 1 diff --git a/sysdeps/unix/sysv/linux/mips/sys/tas.h b/sysdeps/unix/sysv/linux/mips/sys/tas.h index 757b8bc1ea..0c81dc2de2 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/tas.h +++ b/sysdeps/unix/sysv/linux/mips/sys/tas.h @@ -3,19 +3,19 @@ Contributed by Maciej W. Rozycki , 2000. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_TAS_H #define _SYS_TAS_H 1 diff --git a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h index b015898c2d..f57b91e4f2 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Don't rely on this, the interface is currently messed up and may need to be broken to be fixed. */ diff --git a/sysdeps/unix/sysv/linux/mips/sysdep.S b/sysdeps/unix/sysv/linux/mips/sysdep.S index c7bc193a40..d051c4fe6e 100644 --- a/sysdeps/unix/sysv/linux/mips/sysdep.S +++ b/sysdeps/unix/sysv/linux/mips/sysdep.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/linux/mips/sysdep.h b/sysdeps/unix/sysv/linux/mips/sysdep.h index f01a195870..be88479e61 100644 --- a/sysdeps/unix/sysv/linux/mips/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/sysdep.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _LINUX_MIPS_SYSDEP_H #define _LINUX_MIPS_SYSDEP_H 1 diff --git a/sysdeps/unix/sysv/linux/mips/truncate64.c b/sysdeps/unix/sysv/linux/mips/truncate64.c index 09a27556e5..6f870b847d 100644 --- a/sysdeps/unix/sysv/linux/mips/truncate64.c +++ b/sysdeps/unix/sysv/linux/mips/truncate64.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/linux/mips/ustat.c b/sysdeps/unix/sysv/linux/mips/ustat.c index 2afc3e7ae1..8f5002ce92 100644 --- a/sysdeps/unix/sysv/linux/mips/ustat.c +++ b/sysdeps/unix/sysv/linux/mips/ustat.c @@ -3,19 +3,19 @@ Contributed by Ulrich Drepper , 1997. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/linux/mips/xmknod.c b/sysdeps/unix/sysv/linux/mips/xmknod.c index 2fed00dbf6..d2a02f512b 100644 --- a/sysdeps/unix/sysv/linux/mips/xmknod.c +++ b/sysdeps/unix/sysv/linux/mips/xmknod.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/linux/mips/xstatconv.c b/sysdeps/unix/sysv/linux/mips/xstatconv.c index 583b1eccf1..b3b7634d3e 100644 --- a/sysdeps/unix/sysv/linux/mips/xstatconv.c +++ b/sysdeps/unix/sysv/linux/mips/xstatconv.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/minix/bits/sigaction.h b/sysdeps/unix/sysv/minix/bits/sigaction.h index 96f14d17af..4b04b7b559 100644 --- a/sysdeps/unix/sysv/minix/bits/sigaction.h +++ b/sysdeps/unix/sysv/minix/bits/sigaction.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SIGNAL_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/sco3.2.4/__setpgid.c b/sysdeps/unix/sysv/sco3.2.4/__setpgid.c index d8ad98f159..2064e67cc9 100644 --- a/sysdeps/unix/sysv/sco3.2.4/__setpgid.c +++ b/sysdeps/unix/sysv/sco3.2.4/__setpgid.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/sco3.2.4/bits/confname.h b/sysdeps/unix/sysv/sco3.2.4/bits/confname.h index 3c549dd4b3..42e6ed0ead 100644 --- a/sysdeps/unix/sysv/sco3.2.4/bits/confname.h +++ b/sysdeps/unix/sysv/sco3.2.4/bits/confname.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _UNISTD_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h b/sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h index eaa52bee2f..f087388556 100644 --- a/sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h +++ b/sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SIGNAL_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/sco3.2.4/getgroups.c b/sysdeps/unix/sysv/sco3.2.4/getgroups.c index aaf0e63f8a..ef27df2a76 100644 --- a/sysdeps/unix/sysv/sco3.2.4/getgroups.c +++ b/sysdeps/unix/sysv/sco3.2.4/getgroups.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/sco3.2.4/sigaction.S b/sysdeps/unix/sysv/sco3.2.4/sigaction.S index 3367ec7a9a..05f33338a8 100644 --- a/sysdeps/unix/sysv/sco3.2.4/sigaction.S +++ b/sysdeps/unix/sysv/sco3.2.4/sigaction.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/sco3.2.4/sys/syscall.h b/sysdeps/unix/sysv/sco3.2.4/sys/syscall.h index 9c03f89759..05bbb89f34 100644 --- a/sysdeps/unix/sysv/sco3.2.4/sys/syscall.h +++ b/sysdeps/unix/sysv/sco3.2.4/sys/syscall.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* From Scott Bartram. */ diff --git a/sysdeps/unix/sysv/sco3.2.4/sysconf.S b/sysdeps/unix/sysv/sco3.2.4/sysconf.S index 55db86be8a..9780bd4881 100644 --- a/sysdeps/unix/sysv/sco3.2.4/sysconf.S +++ b/sysdeps/unix/sysv/sco3.2.4/sysconf.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/sco3.2.4/uname.S b/sysdeps/unix/sysv/sco3.2.4/uname.S index c56dd4dc08..bc61089d65 100644 --- a/sysdeps/unix/sysv/sco3.2.4/uname.S +++ b/sysdeps/unix/sysv/sco3.2.4/uname.S @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/sco3.2.4/waitpid.S b/sysdeps/unix/sysv/sco3.2.4/waitpid.S index ae1e9a1783..53e08cfa9b 100644 --- a/sysdeps/unix/sysv/sco3.2.4/waitpid.S +++ b/sysdeps/unix/sysv/sco3.2.4/waitpid.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/sco3.2/Makefile b/sysdeps/unix/sysv/sco3.2/Makefile index ff3a6fb4f1..c4d9da7a06 100644 --- a/sysdeps/unix/sysv/sco3.2/Makefile +++ b/sysdeps/unix/sysv/sco3.2/Makefile @@ -2,19 +2,19 @@ # 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 Library General Public License -# as published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. +# 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 -# Library General Public License for more details. +# Lesser General Public License for more details. -# You should have received a copy of the GNU Library General Public -# License along with the GNU C Library; see the file COPYING.LIB. If not, -# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. +# 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. ifeq ($(subdir),misc) diff --git a/sysdeps/unix/sysv/sco3.2/bits/local_lim.h b/sysdeps/unix/sysv/sco3.2/bits/local_lim.h index 365858c6f8..b4141d0dbf 100644 --- a/sysdeps/unix/sysv/sco3.2/bits/local_lim.h +++ b/sysdeps/unix/sysv/sco3.2/bits/local_lim.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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_LOCAL_LIM_H #define _BITS_LOCAL_LIM_H 1 diff --git a/sysdeps/unix/sysv/sysv4/Makefile b/sysdeps/unix/sysv/sysv4/Makefile index 7507fbfc1c..6f7155c716 100644 --- a/sysdeps/unix/sysv/sysv4/Makefile +++ b/sysdeps/unix/sysv/sysv4/Makefile @@ -2,19 +2,19 @@ # 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 Library General Public License -# as published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. +# 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 -# Library General Public License for more details. +# Lesser General Public License for more details. -# You should have received a copy of the GNU Library General Public -# License along with the GNU C Library; see the file COPYING.LIB. If not, -# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. +# 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. ifeq ($(subdir),posix) diff --git a/sysdeps/unix/sysv/sysv4/__getpgid.c b/sysdeps/unix/sysv/sysv4/__getpgid.c index 9fc221b259..4ee0e7483f 100644 --- a/sysdeps/unix/sysv/sysv4/__getpgid.c +++ b/sysdeps/unix/sysv/sysv4/__getpgid.c @@ -3,19 +3,19 @@ Contributed by Brendan Kehoe (brendan@zen.org). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/sysv4/__setpgid.c b/sysdeps/unix/sysv/sysv4/__setpgid.c index 3a034154ec..b497d7e26b 100644 --- a/sysdeps/unix/sysv/sysv4/__setpgid.c +++ b/sysdeps/unix/sysv/sysv4/__setpgid.c @@ -3,19 +3,19 @@ Contributed by Brendan Kehoe (brendan@zen.org). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/sysv4/bits/sigaction.h b/sysdeps/unix/sysv/sysv4/bits/sigaction.h index 07d5554921..faf07e5ff5 100644 --- a/sysdeps/unix/sysv/sysv4/bits/sigaction.h +++ b/sysdeps/unix/sysv/sysv4/bits/sigaction.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SIGNAL_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/sysv4/bits/signum.h b/sysdeps/unix/sysv/sysv4/bits/signum.h index f11c731a42..07f900a78b 100644 --- a/sysdeps/unix/sysv/sysv4/bits/signum.h +++ b/sysdeps/unix/sysv/sysv4/bits/signum.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #ifdef _SIGNAL_H diff --git a/sysdeps/unix/sysv/sysv4/bits/sigset.h b/sysdeps/unix/sysv/sysv4/bits/sigset.h index c5d596dad8..bf0cae2101 100644 --- a/sysdeps/unix/sysv/sysv4/bits/sigset.h +++ b/sysdeps/unix/sysv/sysv4/bits/sigset.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SIGSET_H_types #define _SIGSET_H_types 1 diff --git a/sysdeps/unix/sysv/sysv4/bits/utsname.h b/sysdeps/unix/sysv/sysv4/bits/utsname.h index dfe46b851b..891ae68628 100644 --- a/sysdeps/unix/sysv/sysv4/bits/utsname.h +++ b/sysdeps/unix/sysv/sysv4/bits/utsname.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_UTSNAME_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/sysv4/bits/waitflags.h b/sysdeps/unix/sysv/sysv4/bits/waitflags.h index 841f8a303b..40bc823de6 100644 --- a/sysdeps/unix/sysv/sysv4/bits/waitflags.h +++ b/sysdeps/unix/sysv/sysv4/bits/waitflags.h @@ -4,19 +4,19 @@ Contributed by Brendan Kehoe (brendan@zen.org). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #if !defined _SYS_WAIT_H && !defined _STDLIB_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/sysv4/ftruncate.c b/sysdeps/unix/sysv/sysv4/ftruncate.c index 5c9d87421a..47e040eb2c 100644 --- a/sysdeps/unix/sysv/sysv4/ftruncate.c +++ b/sysdeps/unix/sysv/sysv4/ftruncate.c @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/sysv4/gethostname.c b/sysdeps/unix/sysv/sysv4/gethostname.c index 1a1440f079..4a058b51c1 100644 --- a/sysdeps/unix/sysv/sysv4/gethostname.c +++ b/sysdeps/unix/sysv/sysv4/gethostname.c @@ -3,19 +3,19 @@ Contributed by Brendan Kehoe (brendan@zen.org). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/sysv4/getpgid.c b/sysdeps/unix/sysv/sysv4/getpgid.c index d2b27cb060..0d4e4caa73 100644 --- a/sysdeps/unix/sysv/sysv4/getpgid.c +++ b/sysdeps/unix/sysv/sysv4/getpgid.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/sysv4/i386/bits/stat.h b/sysdeps/unix/sysv/sysv4/i386/bits/stat.h index 8204f5541d..c1016a9228 100644 --- a/sysdeps/unix/sysv/sysv4/i386/bits/stat.h +++ b/sysdeps/unix/sysv/sysv4/i386/bits/stat.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_STAT_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/sysv4/i386/sys-sig.S b/sysdeps/unix/sysv/sysv4/i386/sys-sig.S index 35cd16ad91..6e2d1abde3 100644 --- a/sysdeps/unix/sysv/sysv4/i386/sys-sig.S +++ b/sysdeps/unix/sysv/sysv4/i386/sys-sig.S @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/sysv4/i386/sysdep.h b/sysdeps/unix/sysv/sysv4/i386/sysdep.h index 77ee6a02ed..daecdb6222 100644 --- a/sysdeps/unix/sysv/sysv4/i386/sysdep.h +++ b/sysdeps/unix/sysv/sysv4/i386/sysdep.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/sysv4/sethostname.c b/sysdeps/unix/sysv/sysv4/sethostname.c index 10fb5ffe81..f4e7b4e936 100644 --- a/sysdeps/unix/sysv/sysv4/sethostname.c +++ b/sysdeps/unix/sysv/sysv4/sethostname.c @@ -3,19 +3,19 @@ Contributed by Brendan Kehoe (brendan@zen.org). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/sysv4/setpgid.c b/sysdeps/unix/sysv/sysv4/setpgid.c index d9d3e8f306..27f4967e40 100644 --- a/sysdeps/unix/sysv/sysv4/setpgid.c +++ b/sysdeps/unix/sysv/sysv4/setpgid.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/sysv4/setsid.c b/sysdeps/unix/sysv/sysv4/setsid.c index 638ab73889..44cbaf07cb 100644 --- a/sysdeps/unix/sysv/sysv4/setsid.c +++ b/sysdeps/unix/sysv/sysv4/setsid.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/sysv4/sigaction.c b/sysdeps/unix/sysv/sysv4/sigaction.c index 4cd4150855..de0f5afc16 100644 --- a/sysdeps/unix/sysv/sysv4/sigaction.c +++ b/sysdeps/unix/sysv/sysv4/sigaction.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/sysv4/siginfo.h b/sysdeps/unix/sysv/sysv4/siginfo.h index 316cd4734b..2bb925738c 100644 --- a/sysdeps/unix/sysv/sysv4/siginfo.h +++ b/sysdeps/unix/sysv/sysv4/siginfo.h @@ -4,19 +4,19 @@ Contributed by Brendan Kehoe (brendan@zen.org). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SIGINFO_H #define _SIGINFO_H 1 diff --git a/sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h b/sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h index 4daab22bc5..7b082f746d 100644 --- a/sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h +++ b/sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h @@ -5,19 +5,19 @@ Contributed by Joe Keane . 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #define sigset_set_old_mask(set, mask) \ do { \ diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/dirent.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/dirent.h index cc6c999549..fa0250eb3e 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/bits/dirent.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/dirent.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _DIRENT_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/errno.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/errno.h index 4065bfbfac..8d5d49e42b 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/bits/errno.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/errno.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* This file defines the `errno' constants. */ diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/signum.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/signum.h index 33a040b529..a2659530b6 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/bits/signum.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/signum.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #ifdef _SIGNAL_H diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/sigstack.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/sigstack.h index 905e87fd95..753caac8a8 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/bits/sigstack.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/sigstack.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SIGNAL_H # error "Never include this file directly. Use instead" diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h index 091f5ba39a..22c1c1f855 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_STAT_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h index 7765fa45b2..a9ce216c69 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* * Never include this file directly; use instead. diff --git a/sysdeps/unix/sysv/sysv4/solaris2/fsync.S b/sysdeps/unix/sysv/sysv4/solaris2/fsync.S index 3f4d7d69a4..493926a98c 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/fsync.S +++ b/sysdeps/unix/sysv/sysv4/solaris2/fsync.S @@ -3,19 +3,19 @@ Contributed by Brendan Kehoe (brendan@zen.org). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/sysv4/solaris2/getdents.c b/sysdeps/unix/sysv/sysv4/solaris2/getdents.c index 2cf2a5784e..8627245542 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/getdents.c +++ b/sysdeps/unix/sysv/sysv4/solaris2/getdents.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sigpending.c b/sysdeps/unix/sysv/sysv4/solaris2/sigpending.c index 4e1ce0eb58..2723d79f7a 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/sigpending.c +++ b/sysdeps/unix/sysv/sysv4/solaris2/sigpending.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/bits/sigcontext.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/bits/sigcontext.h index 29d2d87b26..7c4bca6049 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/bits/sigcontext.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/bits/sigcontext.h @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SIGNAL_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c b/sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c index fd8a503ef4..3c75e3f011 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys/trap.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys/trap.h index 411d23e5bd..39d2645973 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys/trap.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys/trap.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_TRAP_H #define _SYS_TRAP_H 1 diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys/ucontext.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys/ucontext.h index 4a32f816c9..6e9f69067d 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys/ucontext.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys/ucontext.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_UCONTEXT_H #define _SYS_UCONTEXT_H 1 diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S index de3735b289..2ac767c987 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S @@ -3,19 +3,19 @@ Contributed by Brendan Kehoe (brendan@zen.org). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #define _ERRNO_H diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h index a21672b115..d9badf74d9 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h @@ -3,19 +3,19 @@ Contributed by Brendan Kehoe (brendan@zen.org). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* Solaris 2 does not precede the asm names of C symbols with a `_'. */ #ifndef NO_UNDERSCORES diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sys/param.h b/sysdeps/unix/sysv/sysv4/solaris2/sys/param.h index 3afb17a03c..bbd7b06a11 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/sys/param.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/sys/param.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYS_PARAM_H #define _SYS_PARAM_H 1 diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sys/syscall.h b/sysdeps/unix/sysv/sysv4/solaris2/sys/syscall.h index 2c071a76ea..15c43a3c33 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/sys/syscall.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/sys/syscall.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _SYSCALL_H #define _SYSCALL_H 1 diff --git a/sysdeps/unix/sysv/sysv4/sysconf.c b/sysdeps/unix/sysv/sysv4/sysconf.c index 98fdbb125a..77ce2d87d4 100644 --- a/sysdeps/unix/sysv/sysv4/sysconf.c +++ b/sysdeps/unix/sysv/sysv4/sysconf.c @@ -3,19 +3,19 @@ Contributed by Brendan Kehoe (brendan@zen.org). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/unix/sysv/sysv4/sysconfig.h b/sysdeps/unix/sysv/sysv4/sysconfig.h index 6af9cb8fb4..b51a3649a4 100644 --- a/sysdeps/unix/sysv/sysv4/sysconfig.h +++ b/sysdeps/unix/sysv/sysv4/sysconfig.h @@ -4,19 +4,19 @@ Contributed by Brendan Kehoe (brendan@zen.org). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 __SYSCONFIG_H #define __SYSCONFIG_H diff --git a/sysdeps/unix/sysv/sysv4/waitpid.c b/sysdeps/unix/sysv/sysv4/waitpid.c index 4f43527f67..8b899a75ff 100644 --- a/sysdeps/unix/sysv/sysv4/waitpid.c +++ b/sysdeps/unix/sysv/sysv4/waitpid.c @@ -3,19 +3,19 @@ Contributed by Brendan Kehoe (brendan@zen.org). 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include #include diff --git a/sysdeps/vax/Makefile b/sysdeps/vax/Makefile index b27d65d10c..909fc29f33 100644 --- a/sysdeps/vax/Makefile +++ b/sysdeps/vax/Makefile @@ -2,19 +2,19 @@ # 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 Library General Public License as -# published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version. +# 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 -# Library General Public License for more details. +# Lesser General Public License for more details. -# You should have received a copy of the GNU Library General Public -# License along with the GNU C Library; see the file COPYING.LIB. If not, -# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. +# 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. ifeq ($(subdir),math) ifndef math-twiddled diff --git a/sysdeps/vax/__longjmp.c b/sysdeps/vax/__longjmp.c index e795c42da9..0ab593f56a 100644 --- a/sysdeps/vax/__longjmp.c +++ b/sysdeps/vax/__longjmp.c @@ -1,21 +1,23 @@ /* Copyright (C) 1991, 1992, 1994, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Derived from @(#)_setjmp.s 5.7 (Berkeley) 6/27/88, Copyright (c) 1980 Regents of the University of California. + 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/vax/bits/huge_val.h b/sysdeps/vax/bits/huge_val.h index 74930be56a..63395b15e3 100644 --- a/sysdeps/vax/bits/huge_val.h +++ b/sysdeps/vax/bits/huge_val.h @@ -4,19 +4,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _MATH_H # error "Never use directly; include instead." diff --git a/sysdeps/vax/bsd-_setjmp.S b/sysdeps/vax/bsd-_setjmp.S index ce324e486d..58204d262c 100644 --- a/sysdeps/vax/bsd-_setjmp.S +++ b/sysdeps/vax/bsd-_setjmp.S @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* This just does a tail-call to `__sigsetjmp (ARG, 0)'. We cannot do it in C because it must be a tail-call, so frame-unwinding diff --git a/sysdeps/vax/bsd-setjmp.S b/sysdeps/vax/bsd-setjmp.S index b6eadb77c0..792fcf7a69 100644 --- a/sysdeps/vax/bsd-setjmp.S +++ b/sysdeps/vax/bsd-setjmp.S @@ -3,19 +3,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ /* This just does a tail-call to `__sigsetjmp (ARG, 1)'. We cannot do it in C because it must be a tail-call, so frame-unwinding diff --git a/sysdeps/vax/fl.h b/sysdeps/vax/fl.h index abf6662c67..79cbeb247a 100644 --- a/sysdeps/vax/fl.h +++ b/sysdeps/vax/fl.h @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 __need_HUGE_VAL diff --git a/sysdeps/vax/memccpy.c b/sysdeps/vax/memccpy.c index 97fa3a0fe6..9a459ff5eb 100644 --- a/sysdeps/vax/memccpy.c +++ b/sysdeps/vax/memccpy.c @@ -2,19 +2,19 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include diff --git a/sysdeps/vax/setjmp.c b/sysdeps/vax/setjmp.c index 43a80c1887..c57e914890 100644 --- a/sysdeps/vax/setjmp.c +++ b/sysdeps/vax/setjmp.c @@ -4,19 +4,19 @@ Copyright (c) 1980 Regents of the University of California. 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 - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ #include From 6b440a5c6e91b29986fe2a772e76cd5e5b686c8d Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 6 Jul 2001 07:14:28 +0000 Subject: [PATCH 2631/4487] Removed, we can use the generic Linux version. --- sysdeps/unix/sysv/linux/alpha/configure | 51 ---------------------- sysdeps/unix/sysv/linux/alpha/configure.in | 36 --------------- 2 files changed, 87 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/alpha/configure delete mode 100644 sysdeps/unix/sysv/linux/alpha/configure.in diff --git a/sysdeps/unix/sysv/linux/alpha/configure b/sysdeps/unix/sysv/linux/alpha/configure deleted file mode 100644 index 5b36e71719..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/configure +++ /dev/null @@ -1,51 +0,0 @@ - # Local configure fragment for sysdeps/unix/sysv/linux/alpha. - -# Don't bother trying to generate any glue code to be compatible with the -# existing system library, because we are the only system library. -inhibit_glue=yes - -if test -n "$sysheaders"; then - OLD_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS $SYSINCLUDES" -fi -echo $ac_n "checking installed Linux kernel header files""... $ac_c" 1>&6 -echo "configure:13: checking installed Linux kernel header files" >&5 -if eval "test \"`echo '$''{'libc_cv_linux21100'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -int main() { -#if LINUX_VERSION_CODE < (2 *65536+ 1 *256+ 100) /* 2.1.100 */ -eat flaming death -#endif -; return 0; } -EOF -if { (eval echo configure:27: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - libc_cv_linux21100='2.1.100 or later' -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - libc_cv_linux21100='TOO OLD!' -fi -rm -f conftest* -fi - -echo "$ac_t""$libc_cv_linux21100" 1>&6 -if test "$libc_cv_linux21100" != '2.1.100 or later'; then - { echo "configure: error: GNU libc requires kernel header files from -Linux 2.1.100 or later to be installed before configuring. -The kernel header files are found usually in /usr/include/asm and -/usr/include/linux; make sure these directories use files from -Linux 2.1.100 or later. This check uses , so -make sure that file was built correctly when installing the kernel header -files. To use kernel headers not from /usr/include/linux, use the -configure option --with-headers." 1>&2; exit 1; } -fi -if test -n "$sysheaders"; then - CFLAGS=$OLD_CFLAGS -fi diff --git a/sysdeps/unix/sysv/linux/alpha/configure.in b/sysdeps/unix/sysv/linux/alpha/configure.in deleted file mode 100644 index 690defa98b..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/configure.in +++ /dev/null @@ -1,36 +0,0 @@ -sinclude(./aclocal.m4)dnl Autoconf lossage -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/unix/sysv/linux/alpha. - -# Don't bother trying to generate any glue code to be compatible with the -# existing system library, because we are the only system library. -inhibit_glue=yes - -define([LIBC_LINUX_VERSION],[2.1.100])dnl -if test -n "$sysheaders"; then - OLD_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS $SYSINCLUDES" -fi -define([libc_cv_linuxVER], [libc_cv_linux]patsubst(LIBC_LINUX_VERSION,[\.]))dnl -AC_CACHE_CHECK(installed Linux kernel header files, libc_cv_linuxVER, [dnl -AC_TRY_COMPILE([#include ], -[#if LINUX_VERSION_CODE < ]dnl -patsubst(LIBC_LINUX_VERSION,[^\([^.]*\)\.\([^.]*\)\.\([^.]*\)$],dnl -[ (\1 *65536+ \2 *256+ \3) /* \1.\2.\3 */])[ -eat flaming death -#endif], - libc_cv_linuxVER='LIBC_LINUX_VERSION or later', - libc_cv_linuxVER='TOO OLD!')]) -if test "$libc_cv_linuxVER" != 'LIBC_LINUX_VERSION or later'; then - AC_MSG_ERROR([GNU libc requires kernel header files from -Linux LIBC_LINUX_VERSION or later to be installed before configuring. -The kernel header files are found usually in /usr/include/asm and -/usr/include/linux; make sure these directories use files from -Linux LIBC_LINUX_VERSION or later. This check uses , so -make sure that file was built correctly when installing the kernel header -files. To use kernel headers not from /usr/include/linux, use the -configure option --with-headers.]) -fi -if test -n "$sysheaders"; then - CFLAGS=$OLD_CFLAGS -fi From f01ec4673b3b979edfa00aca0ab5a2be35fa2637 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sat, 7 Jul 2001 10:13:33 +0000 Subject: [PATCH 2632/4487] Put under LGPL v2.1. --- sysdeps/alpha/add_n.s | 8 ++++---- sysdeps/alpha/addmul_1.s | 8 ++++---- sysdeps/alpha/alphaev5/add_n.s | 8 ++++---- sysdeps/alpha/alphaev5/lshift.s | 8 ++++---- sysdeps/alpha/alphaev5/rshift.s | 8 ++++---- sysdeps/alpha/alphaev5/sub_n.s | 8 ++++---- sysdeps/alpha/gmp-mparam.h | 8 ++++---- sysdeps/alpha/lshift.s | 8 ++++---- sysdeps/alpha/mul_1.s | 8 ++++---- sysdeps/alpha/rshift.s | 8 ++++---- sysdeps/alpha/sub_n.s | 8 ++++---- sysdeps/alpha/submul_1.s | 8 ++++---- sysdeps/alpha/udiv_qrnnd.S | 8 ++++---- sysdeps/arm/gmp-mparam.h | 8 ++++---- sysdeps/hppa/add_n.s | 8 ++++---- sysdeps/hppa/hppa1.1/addmul_1.s | 8 ++++---- sysdeps/hppa/hppa1.1/mul_1.s | 8 ++++---- sysdeps/hppa/hppa1.1/submul_1.s | 8 ++++---- sysdeps/hppa/hppa1.1/udiv_qrnnd.s | 8 ++++---- sysdeps/hppa/lshift.s | 8 ++++---- sysdeps/hppa/rshift.s | 8 ++++---- sysdeps/hppa/sub_n.s | 8 ++++---- sysdeps/hppa/udiv_qrnnd.s | 8 ++++---- sysdeps/m68k/add_n.S | 8 ++++---- sysdeps/m68k/lshift.S | 8 ++++---- sysdeps/m68k/m68020/addmul_1.S | 8 ++++---- sysdeps/m68k/m68020/mul_1.S | 8 ++++---- sysdeps/m68k/m68020/submul_1.S | 8 ++++---- sysdeps/m68k/rshift.S | 8 ++++---- sysdeps/m68k/sub_n.S | 8 ++++---- sysdeps/m88k/add_n.s | 8 ++++---- sysdeps/m88k/m88100/add_n.s | 8 ++++---- sysdeps/m88k/m88100/mul_1.s | 8 ++++---- sysdeps/m88k/m88100/sub_n.s | 8 ++++---- sysdeps/m88k/m88110/add_n.S | 8 ++++---- sysdeps/m88k/m88110/addmul_1.s | 8 ++++---- sysdeps/m88k/m88110/mul_1.s | 8 ++++---- sysdeps/m88k/m88110/sub_n.S | 8 ++++---- sysdeps/m88k/mul_1.s | 8 ++++---- sysdeps/m88k/sub_n.s | 8 ++++---- sysdeps/mips/add_n.S | 8 ++++---- sysdeps/mips/addmul_1.S | 8 ++++---- sysdeps/mips/lshift.S | 8 ++++---- sysdeps/mips/mips3/add_n.s | 8 ++++---- sysdeps/mips/mips3/addmul_1.s | 8 ++++---- sysdeps/mips/mips3/gmp-mparam.h | 8 ++++---- sysdeps/mips/mips3/lshift.s | 8 ++++---- sysdeps/mips/mips3/mul_1.s | 8 ++++---- sysdeps/mips/mips3/rshift.s | 8 ++++---- sysdeps/mips/mips3/sub_n.s | 8 ++++---- sysdeps/mips/mips3/submul_1.s | 8 ++++---- sysdeps/mips/mips64/add_n.S | 8 ++++---- sysdeps/mips/mips64/addmul_1.S | 8 ++++---- sysdeps/mips/mips64/gmp-mparam.h | 8 ++++---- sysdeps/mips/mips64/lshift.S | 8 ++++---- sysdeps/mips/mips64/mul_1.S | 8 ++++---- sysdeps/mips/mips64/rshift.S | 8 ++++---- sysdeps/mips/mips64/sub_n.S | 8 ++++---- sysdeps/mips/mips64/submul_1.S | 8 ++++---- sysdeps/mips/mul_1.S | 8 ++++---- sysdeps/mips/rshift.S | 8 ++++---- sysdeps/mips/sub_n.S | 8 ++++---- sysdeps/mips/submul_1.S | 8 ++++---- sysdeps/rs6000/add_n.s | 8 ++++---- sysdeps/rs6000/addmul_1.s | 8 ++++---- sysdeps/rs6000/lshift.s | 8 ++++---- sysdeps/rs6000/mul_1.s | 8 ++++---- sysdeps/rs6000/rshift.s | 8 ++++---- sysdeps/rs6000/sub_n.s | 8 ++++---- sysdeps/rs6000/submul_1.s | 8 ++++---- sysdeps/vax/add_n.s | 8 ++++---- sysdeps/vax/addmul_1.s | 8 ++++---- sysdeps/vax/gmp-mparam.h | 8 ++++---- sysdeps/vax/mul_1.s | 8 ++++---- sysdeps/vax/sub_n.s | 8 ++++---- sysdeps/vax/submul_1.s | 8 ++++---- sysdeps/z8000/add_n.s | 8 ++++---- sysdeps/z8000/gmp-mparam.h | 8 ++++---- sysdeps/z8000/mul_1.s | 8 ++++---- sysdeps/z8000/sub_n.s | 8 ++++---- 80 files changed, 320 insertions(+), 320 deletions(-) diff --git a/sysdeps/alpha/add_n.s b/sysdeps/alpha/add_n.s index 426556e398..e0dc2fd0c4 100644 --- a/sysdeps/alpha/add_n.s +++ b/sysdeps/alpha/add_n.s @@ -6,16 +6,16 @@ # This file is part of the GNU MP Library. # The GNU MP Library is free software; you can redistribute it and/or modify - # it under the terms of the GNU Library General Public License as published by - # the Free Software Foundation; either version 2 of the License, or (at your + # 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 MP 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 Library General Public + # 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 Library General Public License + # You should have received a copy of the GNU Lesser General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA. diff --git a/sysdeps/alpha/addmul_1.s b/sysdeps/alpha/addmul_1.s index 048238ae9d..da26c692ae 100644 --- a/sysdeps/alpha/addmul_1.s +++ b/sysdeps/alpha/addmul_1.s @@ -6,16 +6,16 @@ # This file is part of the GNU MP Library. # The GNU MP Library is free software; you can redistribute it and/or modify - # it under the terms of the GNU Library General Public License as published by - # the Free Software Foundation; either version 2 of the License, or (at your + # 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 MP 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 Library General Public + # 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 Library General Public License + # You should have received a copy of the GNU Lesser General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA. diff --git a/sysdeps/alpha/alphaev5/add_n.s b/sysdeps/alpha/alphaev5/add_n.s index 1251a1fb71..1ff8e9543f 100644 --- a/sysdeps/alpha/alphaev5/add_n.s +++ b/sysdeps/alpha/alphaev5/add_n.s @@ -6,16 +6,16 @@ # This file is part of the GNU MP Library. # The GNU MP Library is free software; you can redistribute it and/or modify - # it under the terms of the GNU Library General Public License as published by - # the Free Software Foundation; either version 2 of the License, or (at your + # 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 MP 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 Library General Public + # 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 Library General Public License + # You should have received a copy of the GNU Lesser General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA. diff --git a/sysdeps/alpha/alphaev5/lshift.s b/sysdeps/alpha/alphaev5/lshift.s index ced55b7203..e41ce9a91e 100644 --- a/sysdeps/alpha/alphaev5/lshift.s +++ b/sysdeps/alpha/alphaev5/lshift.s @@ -5,16 +5,16 @@ # This file is part of the GNU MP Library. # The GNU MP Library is free software; you can redistribute it and/or modify - # it under the terms of the GNU Library General Public License as published by - # the Free Software Foundation; either version 2 of the License, or (at your + # 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 MP 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 Library General Public + # 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 Library General Public License + # You should have received a copy of the GNU Lesser General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA. diff --git a/sysdeps/alpha/alphaev5/rshift.s b/sysdeps/alpha/alphaev5/rshift.s index 6e24fef965..9948e50002 100644 --- a/sysdeps/alpha/alphaev5/rshift.s +++ b/sysdeps/alpha/alphaev5/rshift.s @@ -5,16 +5,16 @@ # This file is part of the GNU MP Library. # The GNU MP Library is free software; you can redistribute it and/or modify - # it under the terms of the GNU Library General Public License as published by - # the Free Software Foundation; either version 2 of the License, or (at your + # 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 MP 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 Library General Public + # 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 Library General Public License + # You should have received a copy of the GNU Lesser General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA. diff --git a/sysdeps/alpha/alphaev5/sub_n.s b/sysdeps/alpha/alphaev5/sub_n.s index 6743af50b8..3c706cf237 100644 --- a/sysdeps/alpha/alphaev5/sub_n.s +++ b/sysdeps/alpha/alphaev5/sub_n.s @@ -6,16 +6,16 @@ # This file is part of the GNU MP Library. # The GNU MP Library is free software; you can redistribute it and/or modify - # it under the terms of the GNU Library General Public License as published by - # the Free Software Foundation; either version 2 of the License, or (at your + # 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 MP 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 Library General Public + # 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 Library General Public License + # You should have received a copy of the GNU Lesser General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA. diff --git a/sysdeps/alpha/gmp-mparam.h b/sysdeps/alpha/gmp-mparam.h index a3c66974de..f565f0f7c8 100644 --- a/sysdeps/alpha/gmp-mparam.h +++ b/sysdeps/alpha/gmp-mparam.h @@ -5,16 +5,16 @@ Copyright (C) 1991, 1993, 1994 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Library General Public License as published by -the Free Software Foundation; either version 2 of the License, or (at your +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 MP 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 Library General Public +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 Library General Public License +You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ diff --git a/sysdeps/alpha/lshift.s b/sysdeps/alpha/lshift.s index 13bd24a427..42fb430dd4 100644 --- a/sysdeps/alpha/lshift.s +++ b/sysdeps/alpha/lshift.s @@ -5,16 +5,16 @@ # This file is part of the GNU MP Library. # The GNU MP Library is free software; you can redistribute it and/or modify - # it under the terms of the GNU Library General Public License as published by - # the Free Software Foundation; either version 2 of the License, or (at your + # 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 MP 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 Library General Public + # 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 Library General Public License + # You should have received a copy of the GNU Lesser General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA. diff --git a/sysdeps/alpha/mul_1.s b/sysdeps/alpha/mul_1.s index a1f5a94b9e..165c281ac6 100644 --- a/sysdeps/alpha/mul_1.s +++ b/sysdeps/alpha/mul_1.s @@ -6,16 +6,16 @@ # This file is part of the GNU MP Library. # The GNU MP Library is free software; you can redistribute it and/or modify - # it under the terms of the GNU Library General Public License as published by - # the Free Software Foundation; either version 2 of the License, or (at your + # 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 MP 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 Library General Public + # 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 Library General Public License + # You should have received a copy of the GNU Lesser General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA. diff --git a/sysdeps/alpha/rshift.s b/sysdeps/alpha/rshift.s index 389054ab0e..7c230f1933 100644 --- a/sysdeps/alpha/rshift.s +++ b/sysdeps/alpha/rshift.s @@ -5,16 +5,16 @@ # This file is part of the GNU MP Library. # The GNU MP Library is free software; you can redistribute it and/or modify - # it under the terms of the GNU Library General Public License as published by - # the Free Software Foundation; either version 2 of the License, or (at your + # 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 MP 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 Library General Public + # 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 Library General Public License + # You should have received a copy of the GNU Lesser General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA. diff --git a/sysdeps/alpha/sub_n.s b/sysdeps/alpha/sub_n.s index 3c90c11697..e0a6d5c6bd 100644 --- a/sysdeps/alpha/sub_n.s +++ b/sysdeps/alpha/sub_n.s @@ -6,16 +6,16 @@ # This file is part of the GNU MP Library. # The GNU MP Library is free software; you can redistribute it and/or modify - # it under the terms of the GNU Library General Public License as published by - # the Free Software Foundation; either version 2 of the License, or (at your + # 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 MP 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 Library General Public + # 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 Library General Public License + # You should have received a copy of the GNU Lesser General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA. diff --git a/sysdeps/alpha/submul_1.s b/sysdeps/alpha/submul_1.s index 1ed0c6a8d9..5343f67d81 100644 --- a/sysdeps/alpha/submul_1.s +++ b/sysdeps/alpha/submul_1.s @@ -6,16 +6,16 @@ # This file is part of the GNU MP Library. # The GNU MP Library is free software; you can redistribute it and/or modify - # it under the terms of the GNU Library General Public License as published by - # the Free Software Foundation; either version 2 of the License, or (at your + # 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 MP 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 Library General Public + # 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 Library General Public License + # You should have received a copy of the GNU Lesser General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA. diff --git a/sysdeps/alpha/udiv_qrnnd.S b/sysdeps/alpha/udiv_qrnnd.S index 75d11827f9..d4ca795aae 100644 --- a/sysdeps/alpha/udiv_qrnnd.S +++ b/sysdeps/alpha/udiv_qrnnd.S @@ -5,16 +5,16 @@ # This file is part of the GNU MP Library. # The GNU MP Library is free software; you can redistribute it and/or modify - # it under the terms of the GNU Library General Public License as published by - # the Free Software Foundation; either version 2 of the License, or (at your + # 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 MP 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 Library General Public + # 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 Library General Public License + # You should have received a copy of the GNU Lesser General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA. diff --git a/sysdeps/arm/gmp-mparam.h b/sysdeps/arm/gmp-mparam.h index e57f39cc1a..c880be33a4 100644 --- a/sysdeps/arm/gmp-mparam.h +++ b/sysdeps/arm/gmp-mparam.h @@ -5,16 +5,16 @@ Copyright (C) 1991, 1993, 1994, 1995 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Library General Public License as published by -the Free Software Foundation; either version 2 of the License, or (at your +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 MP 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 Library General Public +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 Library General Public License +You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ diff --git a/sysdeps/hppa/add_n.s b/sysdeps/hppa/add_n.s index 87b7cd7131..aaabd72e20 100644 --- a/sysdeps/hppa/add_n.s +++ b/sysdeps/hppa/add_n.s @@ -6,16 +6,16 @@ ;! This file is part of the GNU MP Library. ;! The GNU MP Library is free software; you can redistribute it and/or modify -;! it under the terms of the GNU Library General Public License as published by -;! the Free Software Foundation; either version 2 of the License, or (at your +;! 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 MP 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 Library General Public +;! 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 Library General Public License +;! You should have received a copy of the GNU Lesser General Public License ;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to ;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ;! MA 02111-1307, USA. diff --git a/sysdeps/hppa/hppa1.1/addmul_1.s b/sysdeps/hppa/hppa1.1/addmul_1.s index 5b3e0482a5..a1fb083a83 100644 --- a/sysdeps/hppa/hppa1.1/addmul_1.s +++ b/sysdeps/hppa/hppa1.1/addmul_1.s @@ -6,16 +6,16 @@ ;! This file is part of the GNU MP Library. ;! The GNU MP Library is free software; you can redistribute it and/or modify -;! it under the terms of the GNU Library General Public License as published by -;! the Free Software Foundation; either version 2 of the License, or (at your +;! 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 MP 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 Library General Public +;! 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 Library General Public License +;! You should have received a copy of the GNU Lesser General Public License ;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to ;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ;! MA 02111-1307, USA. diff --git a/sysdeps/hppa/hppa1.1/mul_1.s b/sysdeps/hppa/hppa1.1/mul_1.s index 7f53916e83..00c770f272 100644 --- a/sysdeps/hppa/hppa1.1/mul_1.s +++ b/sysdeps/hppa/hppa1.1/mul_1.s @@ -6,16 +6,16 @@ ;! This file is part of the GNU MP Library. ;! The GNU MP Library is free software; you can redistribute it and/or modify -;! it under the terms of the GNU Library General Public License as published by -;! the Free Software Foundation; either version 2 of the License, or (at your +;! 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 MP 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 Library General Public +;! 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 Library General Public License +;! You should have received a copy of the GNU Lesser General Public License ;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to ;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ;! MA 02111-1307, USA. diff --git a/sysdeps/hppa/hppa1.1/submul_1.s b/sysdeps/hppa/hppa1.1/submul_1.s index f2c19c7bc8..997bd6d521 100644 --- a/sysdeps/hppa/hppa1.1/submul_1.s +++ b/sysdeps/hppa/hppa1.1/submul_1.s @@ -6,16 +6,16 @@ ;! This file is part of the GNU MP Library. ;! The GNU MP Library is free software; you can redistribute it and/or modify -;! it under the terms of the GNU Library General Public License as published by -;! the Free Software Foundation; either version 2 of the License, or (at your +;! 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 MP 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 Library General Public +;! 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 Library General Public License +;! You should have received a copy of the GNU Lesser General Public License ;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to ;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ;! MA 02111-1307, USA. diff --git a/sysdeps/hppa/hppa1.1/udiv_qrnnd.s b/sysdeps/hppa/hppa1.1/udiv_qrnnd.s index c0a02d89ad..fdc63e59e5 100644 --- a/sysdeps/hppa/hppa1.1/udiv_qrnnd.s +++ b/sysdeps/hppa/hppa1.1/udiv_qrnnd.s @@ -6,16 +6,16 @@ ;! This file is part of the GNU MP Library. ;! The GNU MP Library is free software; you can redistribute it and/or modify -;! it under the terms of the GNU Library General Public License as published by -;! the Free Software Foundation; either version 2 of the License, or (at your +;! 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 MP 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 Library General Public +;! 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 Library General Public License +;! You should have received a copy of the GNU Lesser General Public License ;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to ;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ;! MA 02111-1307, USA. diff --git a/sysdeps/hppa/lshift.s b/sysdeps/hppa/lshift.s index de6dd761ca..400fbcf6dd 100644 --- a/sysdeps/hppa/lshift.s +++ b/sysdeps/hppa/lshift.s @@ -5,16 +5,16 @@ ;! This file is part of the GNU MP Library. ;! The GNU MP Library is free software; you can redistribute it and/or modify -;! it under the terms of the GNU Library General Public License as published by -;! the Free Software Foundation; either version 2 of the License, or (at your +;! 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 MP 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 Library General Public +;! 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 Library General Public License +;! You should have received a copy of the GNU Lesser General Public License ;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to ;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ;! MA 02111-1307, USA. diff --git a/sysdeps/hppa/rshift.s b/sysdeps/hppa/rshift.s index bba60cf2c4..acb772f523 100644 --- a/sysdeps/hppa/rshift.s +++ b/sysdeps/hppa/rshift.s @@ -5,16 +5,16 @@ ;! This file is part of the GNU MP Library. ;! The GNU MP Library is free software; you can redistribute it and/or modify -;! it under the terms of the GNU Library General Public License as published by -;! the Free Software Foundation; either version 2 of the License, or (at your +;! 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 MP 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 Library General Public +;! 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 Library General Public License +;! You should have received a copy of the GNU Lesser General Public License ;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to ;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ;! MA 02111-1307, USA. diff --git a/sysdeps/hppa/sub_n.s b/sysdeps/hppa/sub_n.s index b50bb11e51..34f196826d 100644 --- a/sysdeps/hppa/sub_n.s +++ b/sysdeps/hppa/sub_n.s @@ -6,16 +6,16 @@ ;! This file is part of the GNU MP Library. ;! The GNU MP Library is free software; you can redistribute it and/or modify -;! it under the terms of the GNU Library General Public License as published by -;! the Free Software Foundation; either version 2 of the License, or (at your +;! 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 MP 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 Library General Public +;! 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 Library General Public License +;! You should have received a copy of the GNU Lesser General Public License ;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to ;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ;! MA 02111-1307, USA. diff --git a/sysdeps/hppa/udiv_qrnnd.s b/sysdeps/hppa/udiv_qrnnd.s index 053205720b..cd2b58ddec 100644 --- a/sysdeps/hppa/udiv_qrnnd.s +++ b/sysdeps/hppa/udiv_qrnnd.s @@ -6,16 +6,16 @@ ;! This file is part of the GNU MP Library. ;! The GNU MP Library is free software; you can redistribute it and/or modify -;! it under the terms of the GNU Library General Public License as published by -;! the Free Software Foundation; either version 2 of the License, or (at your +;! 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 MP 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 Library General Public +;! 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 Library General Public License +;! You should have received a copy of the GNU Lesser General Public License ;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to ;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ;! MA 02111-1307, USA. diff --git a/sysdeps/m68k/add_n.S b/sysdeps/m68k/add_n.S index c993c2aeb8..a9558491e8 100644 --- a/sysdeps/m68k/add_n.S +++ b/sysdeps/m68k/add_n.S @@ -6,16 +6,16 @@ Copyright (C) 1992, 1994, 1996, 1998 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Library General Public License as published by -the Free Software Foundation; either version 2 of the License, or (at your +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 MP 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 Library General Public +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 Library General Public License +You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ diff --git a/sysdeps/m68k/lshift.S b/sysdeps/m68k/lshift.S index a1d6690bd5..434b344bd4 100644 --- a/sysdeps/m68k/lshift.S +++ b/sysdeps/m68k/lshift.S @@ -5,16 +5,16 @@ Copyright (C) 1996, 1998 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Library General Public License as published by -the Free Software Foundation; either version 2 of the License, or (at your +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 MP 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 Library General Public +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 Library General Public License +You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ diff --git a/sysdeps/m68k/m68020/addmul_1.S b/sysdeps/m68k/m68020/addmul_1.S index 7f885575c8..05d1d8a804 100644 --- a/sysdeps/m68k/m68020/addmul_1.S +++ b/sysdeps/m68k/m68020/addmul_1.S @@ -6,16 +6,16 @@ Copyright (C) 1992, 1994, 1996, 1998 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Library General Public License as published by -the Free Software Foundation; either version 2 of the License, or (at your +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 MP 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 Library General Public +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 Library General Public License +You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ diff --git a/sysdeps/m68k/m68020/mul_1.S b/sysdeps/m68k/m68020/mul_1.S index 367f77faf9..f3e450ed93 100644 --- a/sysdeps/m68k/m68020/mul_1.S +++ b/sysdeps/m68k/m68020/mul_1.S @@ -6,16 +6,16 @@ Copyright (C) 1992, 1994, 1996, 1998 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Library General Public License as published by -the Free Software Foundation; either version 2 of the License, or (at your +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 MP 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 Library General Public +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 Library General Public License +You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ diff --git a/sysdeps/m68k/m68020/submul_1.S b/sysdeps/m68k/m68020/submul_1.S index 2710045c13..7522046b43 100644 --- a/sysdeps/m68k/m68020/submul_1.S +++ b/sysdeps/m68k/m68020/submul_1.S @@ -6,16 +6,16 @@ Copyright (C) 1992, 1994, 1996, 1998 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Library General Public License as published by -the Free Software Foundation; either version 2 of the License, or (at your +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 MP 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 Library General Public +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 Library General Public License +You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ diff --git a/sysdeps/m68k/rshift.S b/sysdeps/m68k/rshift.S index 3b7a24b363..5e6abceb97 100644 --- a/sysdeps/m68k/rshift.S +++ b/sysdeps/m68k/rshift.S @@ -5,16 +5,16 @@ Copyright (C) 1996, 1998 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Library General Public License as published by -the Free Software Foundation; either version 2 of the License, or (at your +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 MP 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 Library General Public +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 Library General Public License +You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ diff --git a/sysdeps/m68k/sub_n.S b/sysdeps/m68k/sub_n.S index 92fb47a4c3..5833dd2719 100644 --- a/sysdeps/m68k/sub_n.S +++ b/sysdeps/m68k/sub_n.S @@ -6,16 +6,16 @@ Copyright (C) 1992, 1994, 1996, 1998 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Library General Public License as published by -the Free Software Foundation; either version 2 of the License, or (at your +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 MP 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 Library General Public +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 Library General Public License +You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ diff --git a/sysdeps/m88k/add_n.s b/sysdeps/m88k/add_n.s index 1b09ccef8f..a10730d7c4 100644 --- a/sysdeps/m88k/add_n.s +++ b/sysdeps/m88k/add_n.s @@ -6,16 +6,16 @@ ; This file is part of the GNU MP Library. ; The GNU MP Library is free software; you can redistribute it and/or modify -; it under the terms of the GNU Library General Public License as published by -; the Free Software Foundation; either version 2 of the License, or (at your +; 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 MP 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 Library General Public +; 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 Library General Public License +; You should have received a copy of the GNU Lesser General Public License ; along with the GNU MP Library; see the file COPYING.LIB. If not, write to ; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ; MA 02111-1307, USA. diff --git a/sysdeps/m88k/m88100/add_n.s b/sysdeps/m88k/m88100/add_n.s index 7e4ccccb90..0741ec91de 100644 --- a/sysdeps/m88k/m88100/add_n.s +++ b/sysdeps/m88k/m88100/add_n.s @@ -6,16 +6,16 @@ ; This file is part of the GNU MP Library. ; The GNU MP Library is free software; you can redistribute it and/or modify -; it under the terms of the GNU Library General Public License as published by -; the Free Software Foundation; either version 2 of the License, or (at your +; 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 MP 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 Library General Public +; 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 Library General Public License +; You should have received a copy of the GNU Lesser General Public License ; along with the GNU MP Library; see the file COPYING.LIB. If not, write to ; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. diff --git a/sysdeps/m88k/m88100/mul_1.s b/sysdeps/m88k/m88100/mul_1.s index 35c238d570..77242778d7 100644 --- a/sysdeps/m88k/m88100/mul_1.s +++ b/sysdeps/m88k/m88100/mul_1.s @@ -6,16 +6,16 @@ ; This file is part of the GNU MP Library. ; The GNU MP Library is free software; you can redistribute it and/or modify -; it under the terms of the GNU Library General Public License as published by -; the Free Software Foundation; either version 2 of the License, or (at your +; 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 MP 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 Library General Public +; 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 Library General Public License +; You should have received a copy of the GNU Lesser General Public License ; along with the GNU MP Library; see the file COPYING.LIB. If not, write to ; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. diff --git a/sysdeps/m88k/m88100/sub_n.s b/sysdeps/m88k/m88100/sub_n.s index 3963cd5479..a132c212a6 100644 --- a/sysdeps/m88k/m88100/sub_n.s +++ b/sysdeps/m88k/m88100/sub_n.s @@ -6,16 +6,16 @@ ; This file is part of the GNU MP Library. ; The GNU MP Library is free software; you can redistribute it and/or modify -; it under the terms of the GNU Library General Public License as published by -; the Free Software Foundation; either version 2 of the License, or (at your +; 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 MP 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 Library General Public +; 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 Library General Public License +; You should have received a copy of the GNU Lesser General Public License ; along with the GNU MP Library; see the file COPYING.LIB. If not, write to ; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. diff --git a/sysdeps/m88k/m88110/add_n.S b/sysdeps/m88k/m88110/add_n.S index 39a44e5579..3c90674483 100644 --- a/sysdeps/m88k/m88110/add_n.S +++ b/sysdeps/m88k/m88110/add_n.S @@ -6,16 +6,16 @@ ; This file is part of the GNU MP Library. ; The GNU MP Library is free software; you can redistribute it and/or modify -; it under the terms of the GNU Library General Public License as published by -; the Free Software Foundation; either version 2 of the License, or (at your +; 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 MP 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 Library General Public +; 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 Library General Public License +; You should have received a copy of the GNU Lesser General Public License ; along with the GNU MP Library; see the file COPYING.LIB. If not, write to ; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ; MA 02111-1307, USA. diff --git a/sysdeps/m88k/m88110/addmul_1.s b/sysdeps/m88k/m88110/addmul_1.s index 2bd6f21aff..a9845efa38 100644 --- a/sysdeps/m88k/m88110/addmul_1.s +++ b/sysdeps/m88k/m88110/addmul_1.s @@ -6,16 +6,16 @@ ; This file is part of the GNU MP Library. ; The GNU MP Library is free software; you can redistribute it and/or modify -; it under the terms of the GNU Library General Public License as published by -; the Free Software Foundation; either version 2 of the License, or (at your +; 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 MP 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 Library General Public +; 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 Library General Public License +; You should have received a copy of the GNU Lesser General Public License ; along with the GNU MP Library; see the file COPYING.LIB. If not, write to ; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ; MA 02111-1307, USA. diff --git a/sysdeps/m88k/m88110/mul_1.s b/sysdeps/m88k/m88110/mul_1.s index 151890060d..103869dc42 100644 --- a/sysdeps/m88k/m88110/mul_1.s +++ b/sysdeps/m88k/m88110/mul_1.s @@ -6,16 +6,16 @@ ; This file is part of the GNU MP Library. ; The GNU MP Library is free software; you can redistribute it and/or modify -; it under the terms of the GNU Library General Public License as published by -; the Free Software Foundation; either version 2 of the License, or (at your +; 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 MP 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 Library General Public +; 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 Library General Public License +; You should have received a copy of the GNU Lesser General Public License ; along with the GNU MP Library; see the file COPYING.LIB. If not, write to ; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ; MA 02111-1307, USA. diff --git a/sysdeps/m88k/m88110/sub_n.S b/sysdeps/m88k/m88110/sub_n.S index 685f024fd4..a937882dbd 100644 --- a/sysdeps/m88k/m88110/sub_n.S +++ b/sysdeps/m88k/m88110/sub_n.S @@ -6,16 +6,16 @@ ; This file is part of the GNU MP Library. ; The GNU MP Library is free software; you can redistribute it and/or modify -; it under the terms of the GNU Library General Public License as published by -; the Free Software Foundation; either version 2 of the License, or (at your +; 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 MP 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 Library General Public +; 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 Library General Public License +; You should have received a copy of the GNU Lesser General Public License ; along with the GNU MP Library; see the file COPYING.LIB. If not, write to ; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ; MA 02111-1307, USA. diff --git a/sysdeps/m88k/mul_1.s b/sysdeps/m88k/mul_1.s index 26626bf959..7aa6d64064 100644 --- a/sysdeps/m88k/mul_1.s +++ b/sysdeps/m88k/mul_1.s @@ -6,16 +6,16 @@ ; This file is part of the GNU MP Library. ; The GNU MP Library is free software; you can redistribute it and/or modify -; it under the terms of the GNU Library General Public License as published by -; the Free Software Foundation; either version 2 of the License, or (at your +; 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 MP 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 Library General Public +; 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 Library General Public License +; You should have received a copy of the GNU Lesser General Public License ; along with the GNU MP Library; see the file COPYING.LIB. If not, write to ; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ; MA 02111-1307, USA. diff --git a/sysdeps/m88k/sub_n.s b/sysdeps/m88k/sub_n.s index 7dfffc980b..7616dc46b4 100644 --- a/sysdeps/m88k/sub_n.s +++ b/sysdeps/m88k/sub_n.s @@ -6,16 +6,16 @@ ; This file is part of the GNU MP Library. ; The GNU MP Library is free software; you can redistribute it and/or modify -; it under the terms of the GNU Library General Public License as published by -; the Free Software Foundation; either version 2 of the License, or (at your +; 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 MP 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 Library General Public +; 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 Library General Public License +; You should have received a copy of the GNU Lesser General Public License ; along with the GNU MP Library; see the file COPYING.LIB. If not, write to ; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ; MA 02111-1307, USA. diff --git a/sysdeps/mips/add_n.S b/sysdeps/mips/add_n.S index 823166535b..da7b2d456d 100644 --- a/sysdeps/mips/add_n.S +++ b/sysdeps/mips/add_n.S @@ -6,16 +6,16 @@ Copyright (C) 1995, 2000 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Library General Public License as published by -the Free Software Foundation; either version 2 of the License, or (at your +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 MP 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 Library General Public +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 Library General Public License +You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ diff --git a/sysdeps/mips/addmul_1.S b/sysdeps/mips/addmul_1.S index 3bcc11c528..32df1d780b 100644 --- a/sysdeps/mips/addmul_1.S +++ b/sysdeps/mips/addmul_1.S @@ -6,16 +6,16 @@ Copyright (C) 1995, 2000 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Library General Public License as published by -the Free Software Foundation; either version 2 of the License, or (at your +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 MP 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 Library General Public +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 Library General Public License +You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ diff --git a/sysdeps/mips/lshift.S b/sysdeps/mips/lshift.S index a163559c03..b1a858dd9a 100644 --- a/sysdeps/mips/lshift.S +++ b/sysdeps/mips/lshift.S @@ -5,16 +5,16 @@ Copyright (C) 1995, 2000 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Library General Public License as published by -the Free Software Foundation; either version 2 of the License, or (at your +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 MP 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 Library General Public +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 Library General Public License +You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ diff --git a/sysdeps/mips/mips3/add_n.s b/sysdeps/mips/mips3/add_n.s index 996a449ebd..7a25341cd6 100644 --- a/sysdeps/mips/mips3/add_n.s +++ b/sysdeps/mips/mips3/add_n.s @@ -6,16 +6,16 @@ # This file is part of the GNU MP Library. # The GNU MP Library is free software; you can redistribute it and/or modify - # it under the terms of the GNU Library General Public License as published by - # the Free Software Foundation; either version 2 of the License, or (at your + # 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 MP 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 Library General Public + # 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 Library General Public License + # You should have received a copy of the GNU Lesser General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA. diff --git a/sysdeps/mips/mips3/addmul_1.s b/sysdeps/mips/mips3/addmul_1.s index cd75c18013..9a87c3ff2a 100644 --- a/sysdeps/mips/mips3/addmul_1.s +++ b/sysdeps/mips/mips3/addmul_1.s @@ -6,16 +6,16 @@ # This file is part of the GNU MP Library. # The GNU MP Library is free software; you can redistribute it and/or modify - # it under the terms of the GNU Library General Public License as published by - # the Free Software Foundation; either version 2 of the License, or (at your + # 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 MP 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 Library General Public + # 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 Library General Public License + # You should have received a copy of the GNU Lesser General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA. diff --git a/sysdeps/mips/mips3/gmp-mparam.h b/sysdeps/mips/mips3/gmp-mparam.h index f3df7ff6e0..0d36735b7f 100644 --- a/sysdeps/mips/mips3/gmp-mparam.h +++ b/sysdeps/mips/mips3/gmp-mparam.h @@ -5,16 +5,16 @@ Copyright (C) 1991, 1993, 1994 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Library General Public License as published by -the Free Software Foundation; either version 2 of the License, or (at your +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 MP 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 Library General Public +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 Library General Public License +You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ diff --git a/sysdeps/mips/mips3/lshift.s b/sysdeps/mips/mips3/lshift.s index 324a6020c8..2c39a1c91e 100644 --- a/sysdeps/mips/mips3/lshift.s +++ b/sysdeps/mips/mips3/lshift.s @@ -5,16 +5,16 @@ # This file is part of the GNU MP Library. # The GNU MP Library is free software; you can redistribute it and/or modify - # it under the terms of the GNU Library General Public License as published by - # the Free Software Foundation; either version 2 of the License, or (at your + # 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 MP 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 Library General Public + # 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 Library General Public License + # You should have received a copy of the GNU Lesser General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA. diff --git a/sysdeps/mips/mips3/mul_1.s b/sysdeps/mips/mips3/mul_1.s index 281d0574aa..d65e65c426 100644 --- a/sysdeps/mips/mips3/mul_1.s +++ b/sysdeps/mips/mips3/mul_1.s @@ -6,16 +6,16 @@ # This file is part of the GNU MP Library. # The GNU MP Library is free software; you can redistribute it and/or modify - # it under the terms of the GNU Library General Public License as published by - # the Free Software Foundation; either version 2 of the License, or (at your + # 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 MP 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 Library General Public + # 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 Library General Public License + # You should have received a copy of the GNU Lesser General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA. diff --git a/sysdeps/mips/mips3/rshift.s b/sysdeps/mips/mips3/rshift.s index 9920e1a9e3..fc4790a4e4 100644 --- a/sysdeps/mips/mips3/rshift.s +++ b/sysdeps/mips/mips3/rshift.s @@ -5,16 +5,16 @@ # This file is part of the GNU MP Library. # The GNU MP Library is free software; you can redistribute it and/or modify - # it under the terms of the GNU Library General Public License as published by - # the Free Software Foundation; either version 2 of the License, or (at your + # 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 MP 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 Library General Public + # 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 Library General Public License + # You should have received a copy of the GNU Lesser General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA. diff --git a/sysdeps/mips/mips3/sub_n.s b/sysdeps/mips/mips3/sub_n.s index 56c77d8bc4..0ea9413082 100644 --- a/sysdeps/mips/mips3/sub_n.s +++ b/sysdeps/mips/mips3/sub_n.s @@ -6,16 +6,16 @@ # This file is part of the GNU MP Library. # The GNU MP Library is free software; you can redistribute it and/or modify - # it under the terms of the GNU Library General Public License as published by - # the Free Software Foundation; either version 2 of the License, or (at your + # 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 MP 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 Library General Public + # 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 Library General Public License + # You should have received a copy of the GNU Lesser General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA. diff --git a/sysdeps/mips/mips3/submul_1.s b/sysdeps/mips/mips3/submul_1.s index a9c9fa2514..60153da9fc 100644 --- a/sysdeps/mips/mips3/submul_1.s +++ b/sysdeps/mips/mips3/submul_1.s @@ -6,16 +6,16 @@ # This file is part of the GNU MP Library. # The GNU MP Library is free software; you can redistribute it and/or modify - # it under the terms of the GNU Library General Public License as published by - # the Free Software Foundation; either version 2 of the License, or (at your + # 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 MP 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 Library General Public + # 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 Library General Public License + # You should have received a copy of the GNU Lesser General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA. diff --git a/sysdeps/mips/mips64/add_n.S b/sysdeps/mips/mips64/add_n.S index 1d3f7641e9..771d51981a 100644 --- a/sysdeps/mips/mips64/add_n.S +++ b/sysdeps/mips/mips64/add_n.S @@ -6,16 +6,16 @@ * This file is part of the GNU MP Library. * * The GNU MP Library is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at your + * 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 MP 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 Library General Public + * 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 Library General Public License + * You should have received a copy of the GNU Lesser General Public License * along with the GNU MP Library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. diff --git a/sysdeps/mips/mips64/addmul_1.S b/sysdeps/mips/mips64/addmul_1.S index 58eff8c889..f6cf428315 100644 --- a/sysdeps/mips/mips64/addmul_1.S +++ b/sysdeps/mips/mips64/addmul_1.S @@ -6,16 +6,16 @@ * This file is part of the GNU MP Library. * * The GNU MP Library is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at your + * 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 MP 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 Library General Public + * 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 Library General Public License + * You should have received a copy of the GNU Lesser General Public License * along with the GNU MP Library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. diff --git a/sysdeps/mips/mips64/gmp-mparam.h b/sysdeps/mips/mips64/gmp-mparam.h index 38872ec5bc..3779d1de95 100644 --- a/sysdeps/mips/mips64/gmp-mparam.h +++ b/sysdeps/mips/mips64/gmp-mparam.h @@ -5,16 +5,16 @@ Copyright (C) 1991, 1993, 1994 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Library General Public License as published by -the Free Software Foundation; either version 2 of the License, or (at your +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 MP 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 Library General Public +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 Library General Public License +You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ diff --git a/sysdeps/mips/mips64/lshift.S b/sysdeps/mips/mips64/lshift.S index 37e8489fff..d06ba0d309 100644 --- a/sysdeps/mips/mips64/lshift.S +++ b/sysdeps/mips/mips64/lshift.S @@ -5,16 +5,16 @@ * This file is part of the GNU MP Library. * * The GNU MP Library is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at your + * 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 MP 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 Library General Public + * 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 Library General Public License + * You should have received a copy of the GNU Lesser General Public License * along with the GNU MP Library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. diff --git a/sysdeps/mips/mips64/mul_1.S b/sysdeps/mips/mips64/mul_1.S index 61d06589a6..bf32953f43 100644 --- a/sysdeps/mips/mips64/mul_1.S +++ b/sysdeps/mips/mips64/mul_1.S @@ -6,16 +6,16 @@ * This file is part of the GNU MP Library. * * The GNU MP Library is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at your + * 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 MP 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 Library General Public + * 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 Library General Public License + * You should have received a copy of the GNU Lesser General Public License * along with the GNU MP Library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. diff --git a/sysdeps/mips/mips64/rshift.S b/sysdeps/mips/mips64/rshift.S index b013eedfb9..f39c1b3314 100644 --- a/sysdeps/mips/mips64/rshift.S +++ b/sysdeps/mips/mips64/rshift.S @@ -5,16 +5,16 @@ * This file is part of the GNU MP Library. * * The GNU MP Library is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at your + * 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 MP 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 Library General Public + * 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 Library General Public License + * You should have received a copy of the GNU Lesser General Public License * along with the GNU MP Library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. diff --git a/sysdeps/mips/mips64/sub_n.S b/sysdeps/mips/mips64/sub_n.S index 16482f1166..d566658bfd 100644 --- a/sysdeps/mips/mips64/sub_n.S +++ b/sysdeps/mips/mips64/sub_n.S @@ -6,16 +6,16 @@ * This file is part of the GNU MP Library. * * The GNU MP Library is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at your + * 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 MP 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 Library General Public + * 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 Library General Public License + * You should have received a copy of the GNU Lesser General Public License * along with the GNU MP Library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. diff --git a/sysdeps/mips/mips64/submul_1.S b/sysdeps/mips/mips64/submul_1.S index 5cb39ac5a6..510923f366 100644 --- a/sysdeps/mips/mips64/submul_1.S +++ b/sysdeps/mips/mips64/submul_1.S @@ -6,16 +6,16 @@ * This file is part of the GNU MP Library. * * The GNU MP Library is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at your + * 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 MP 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 Library General Public + * 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 Library General Public License + * You should have received a copy of the GNU Lesser General Public License * along with the GNU MP Library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. diff --git a/sysdeps/mips/mul_1.S b/sysdeps/mips/mul_1.S index 7ba435362f..255623edeb 100644 --- a/sysdeps/mips/mul_1.S +++ b/sysdeps/mips/mul_1.S @@ -6,16 +6,16 @@ Copyright (C) 1995, 1998, 2000 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Library General Public License as published by -the Free Software Foundation; either version 2 of the License, or (at your +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 MP 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 Library General Public +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 Library General Public License +You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ diff --git a/sysdeps/mips/rshift.S b/sysdeps/mips/rshift.S index 112982adbf..46df86b5dc 100644 --- a/sysdeps/mips/rshift.S +++ b/sysdeps/mips/rshift.S @@ -5,16 +5,16 @@ Copyright (C) 1995, 2000 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Library General Public License as published by -the Free Software Foundation; either version 2 of the License, or (at your +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 MP 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 Library General Public +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 Library General Public License +You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ diff --git a/sysdeps/mips/sub_n.S b/sysdeps/mips/sub_n.S index 75d80c19f0..633f3e3143 100644 --- a/sysdeps/mips/sub_n.S +++ b/sysdeps/mips/sub_n.S @@ -6,16 +6,16 @@ Copyright (C) 1995, 2000 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Library General Public License as published by -the Free Software Foundation; either version 2 of the License, or (at your +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 MP 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 Library General Public +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 Library General Public License +You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ diff --git a/sysdeps/mips/submul_1.S b/sysdeps/mips/submul_1.S index 1aae1ed5e2..7de9ca74f8 100644 --- a/sysdeps/mips/submul_1.S +++ b/sysdeps/mips/submul_1.S @@ -6,16 +6,16 @@ Copyright (C) 1995, 2000 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Library General Public License as published by -the Free Software Foundation; either version 2 of the License, or (at your +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 MP 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 Library General Public +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 Library General Public License +You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ diff --git a/sysdeps/rs6000/add_n.s b/sysdeps/rs6000/add_n.s index 9e1c948974..216874e7a4 100644 --- a/sysdeps/rs6000/add_n.s +++ b/sysdeps/rs6000/add_n.s @@ -5,16 +5,16 @@ # This file is part of the GNU MP Library. # The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of the GNU Library General Public License as published by -# the Free Software Foundation; either version 2 of the License, or (at your +# 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 MP 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 Library General Public +# 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 Library General Public License +# You should have received a copy of the GNU Lesser General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA. diff --git a/sysdeps/rs6000/addmul_1.s b/sysdeps/rs6000/addmul_1.s index 2db69841c7..7cd743cede 100644 --- a/sysdeps/rs6000/addmul_1.s +++ b/sysdeps/rs6000/addmul_1.s @@ -6,16 +6,16 @@ # This file is part of the GNU MP Library. # The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of the GNU Library General Public License as published by -# the Free Software Foundation; either version 2 of the License, or (at your +# 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 MP 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 Library General Public +# 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 Library General Public License +# You should have received a copy of the GNU Lesser General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA. diff --git a/sysdeps/rs6000/lshift.s b/sysdeps/rs6000/lshift.s index 38169bf53f..8ccba7407e 100644 --- a/sysdeps/rs6000/lshift.s +++ b/sysdeps/rs6000/lshift.s @@ -5,16 +5,16 @@ # This file is part of the GNU MP Library. # The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of the GNU Library General Public License as published by -# the Free Software Foundation; either version 2 of the License, or (at your +# 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 MP 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 Library General Public +# 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 Library General Public License +# You should have received a copy of the GNU Lesser General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA. diff --git a/sysdeps/rs6000/mul_1.s b/sysdeps/rs6000/mul_1.s index a72bce660c..c0feef4b72 100644 --- a/sysdeps/rs6000/mul_1.s +++ b/sysdeps/rs6000/mul_1.s @@ -6,16 +6,16 @@ # This file is part of the GNU MP Library. # The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of the GNU Library General Public License as published by -# the Free Software Foundation; either version 2 of the License, or (at your +# 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 MP 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 Library General Public +# 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 Library General Public License +# You should have received a copy of the GNU Lesser General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA. diff --git a/sysdeps/rs6000/rshift.s b/sysdeps/rs6000/rshift.s index 30d408a24b..145218fabd 100644 --- a/sysdeps/rs6000/rshift.s +++ b/sysdeps/rs6000/rshift.s @@ -5,16 +5,16 @@ # This file is part of the GNU MP Library. # The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of the GNU Library General Public License as published by -# the Free Software Foundation; either version 2 of the License, or (at your +# 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 MP 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 Library General Public +# 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 Library General Public License +# You should have received a copy of the GNU Lesser General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA. diff --git a/sysdeps/rs6000/sub_n.s b/sysdeps/rs6000/sub_n.s index 30d4fee861..d931870935 100644 --- a/sysdeps/rs6000/sub_n.s +++ b/sysdeps/rs6000/sub_n.s @@ -5,16 +5,16 @@ # This file is part of the GNU MP Library. # The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of the GNU Library General Public License as published by -# the Free Software Foundation; either version 2 of the License, or (at your +# 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 MP 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 Library General Public +# 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 Library General Public License +# You should have received a copy of the GNU Lesser General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA. diff --git a/sysdeps/rs6000/submul_1.s b/sysdeps/rs6000/submul_1.s index 8e5946fe18..41095ab001 100644 --- a/sysdeps/rs6000/submul_1.s +++ b/sysdeps/rs6000/submul_1.s @@ -6,16 +6,16 @@ # This file is part of the GNU MP Library. # The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of the GNU Library General Public License as published by -# the Free Software Foundation; either version 2 of the License, or (at your +# 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 MP 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 Library General Public +# 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 Library General Public License +# You should have received a copy of the GNU Lesser General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA. diff --git a/sysdeps/vax/add_n.s b/sysdeps/vax/add_n.s index d4764e23a2..265a8c7881 100644 --- a/sysdeps/vax/add_n.s +++ b/sysdeps/vax/add_n.s @@ -6,16 +6,16 @@ # This file is part of the GNU MP Library. # The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of the GNU Library General Public License as published by -# the Free Software Foundation; either version 2 of the License, or (at your +# 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 MP 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 Library General Public +# 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 Library General Public License +# You should have received a copy of the GNU Lesser General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA. diff --git a/sysdeps/vax/addmul_1.s b/sysdeps/vax/addmul_1.s index 746d95ba7a..c6d657dcf3 100644 --- a/sysdeps/vax/addmul_1.s +++ b/sysdeps/vax/addmul_1.s @@ -6,16 +6,16 @@ # This file is part of the GNU MP Library. # The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of the GNU Library General Public License as published by -# the Free Software Foundation; either version 2 of the License, or (at your +# 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 MP 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 Library General Public +# 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 Library General Public License +# You should have received a copy of the GNU Lesser General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA. diff --git a/sysdeps/vax/gmp-mparam.h b/sysdeps/vax/gmp-mparam.h index d909cd2a54..1ebfa19c5f 100644 --- a/sysdeps/vax/gmp-mparam.h +++ b/sysdeps/vax/gmp-mparam.h @@ -5,16 +5,16 @@ Copyright (C) 1991, 1993, 1994, 1995 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Library General Public License as published by -the Free Software Foundation; either version 2 of the License, or (at your +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 MP 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 Library General Public +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 Library General Public License +You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ diff --git a/sysdeps/vax/mul_1.s b/sysdeps/vax/mul_1.s index e2ff5a1bc1..295638b06e 100644 --- a/sysdeps/vax/mul_1.s +++ b/sysdeps/vax/mul_1.s @@ -6,16 +6,16 @@ # This file is part of the GNU MP Library. # The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of the GNU Library General Public License as published by -# the Free Software Foundation; either version 2 of the License, or (at your +# 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 MP 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 Library General Public +# 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 Library General Public License +# You should have received a copy of the GNU Lesser General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA. diff --git a/sysdeps/vax/sub_n.s b/sysdeps/vax/sub_n.s index a891c4425a..14ba343f96 100644 --- a/sysdeps/vax/sub_n.s +++ b/sysdeps/vax/sub_n.s @@ -6,16 +6,16 @@ # This file is part of the GNU MP Library. # The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of the GNU Library General Public License as published by -# the Free Software Foundation; either version 2 of the License, or (at your +# 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 MP 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 Library General Public +# 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 Library General Public License +# You should have received a copy of the GNU Lesser General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA. diff --git a/sysdeps/vax/submul_1.s b/sysdeps/vax/submul_1.s index c473937caf..5ff8d016ce 100644 --- a/sysdeps/vax/submul_1.s +++ b/sysdeps/vax/submul_1.s @@ -6,16 +6,16 @@ # This file is part of the GNU MP Library. # The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of the GNU Library General Public License as published by -# the Free Software Foundation; either version 2 of the License, or (at your +# 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 MP 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 Library General Public +# 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 Library General Public License +# You should have received a copy of the GNU Lesser General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA. diff --git a/sysdeps/z8000/add_n.s b/sysdeps/z8000/add_n.s index a50fc3ef5f..4d290265a5 100644 --- a/sysdeps/z8000/add_n.s +++ b/sysdeps/z8000/add_n.s @@ -5,16 +5,16 @@ ! This file is part of the GNU MP Library. ! The GNU MP Library is free software; you can redistribute it and/or modify -! it under the terms of the GNU Library General Public License as published by -! the Free Software Foundation; either version 2 of the License, or (at your +! 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 MP 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 Library General Public +! 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 Library General Public License +! You should have received a copy of the GNU Lesser General Public License ! along with the GNU MP Library; see the file COPYING.LIB. If not, write to ! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ! MA 02111-1307, USA. diff --git a/sysdeps/z8000/gmp-mparam.h b/sysdeps/z8000/gmp-mparam.h index e0a303e979..4216df673c 100644 --- a/sysdeps/z8000/gmp-mparam.h +++ b/sysdeps/z8000/gmp-mparam.h @@ -5,16 +5,16 @@ Copyright (C) 1991, 1993, 1994 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Library General Public License as published by -the Free Software Foundation; either version 2 of the License, or (at your +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 MP 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 Library General Public +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 Library General Public License +You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ diff --git a/sysdeps/z8000/mul_1.s b/sysdeps/z8000/mul_1.s index f1126b5ab3..e449dfacb0 100644 --- a/sysdeps/z8000/mul_1.s +++ b/sysdeps/z8000/mul_1.s @@ -6,16 +6,16 @@ ! This file is part of the GNU MP Library. ! The GNU MP Library is free software; you can redistribute it and/or modify -! it under the terms of the GNU Library General Public License as published by -! the Free Software Foundation; either version 2 of the License, or (at your +! 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 MP 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 Library General Public +! 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 Library General Public License +! You should have received a copy of the GNU Lesser General Public License ! along with the GNU MP Library; see the file COPYING.LIB. If not, write to ! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ! MA 02111-1307, USA. diff --git a/sysdeps/z8000/sub_n.s b/sysdeps/z8000/sub_n.s index 272c671bd1..c0787755c6 100644 --- a/sysdeps/z8000/sub_n.s +++ b/sysdeps/z8000/sub_n.s @@ -6,16 +6,16 @@ ! This file is part of the GNU MP Library. ! The GNU MP Library is free software; you can redistribute it and/or modify -! it under the terms of the GNU Library General Public License as published by -! the Free Software Foundation; either version 2 of the License, or (at your +! 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 MP 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 Library General Public +! 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 Library General Public License +! You should have received a copy of the GNU Lesser General Public License ! along with the GNU MP Library; see the file COPYING.LIB. If not, write to ! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ! MA 02111-1307, USA. From af9dfe869fbdb9824521c3a17ae7b79999f7e3d9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 7 Jul 2001 19:19:16 +0000 Subject: [PATCH 2633/4487] Fix typo. --- sysdeps/unix/sysv/aix/start.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/aix/start.c b/sysdeps/unix/sysv/aix/start.c index 6c784f5dbf..fd4d695eaa 100644 --- a/sysdeps/unix/sysv/aix/start.c +++ b/sysdeps/unix/sysv/aix/start.c @@ -31,7 +31,7 @@ typedef unsigned char uchar; /* sb in libc/posix/types.h */ /* The first piece of initialized data. */ int __data_start = 0; -+#ifndef HAVE_ELF +#ifndef HAVE_ELF /* Since gcc/crtstuff.c won't define it unless the ELF format is used we will need to define it here. */ void *__dso_handle = NULL; From ae58a106a1fd583433f8505af38fbc0af554bf39 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 8 Jul 2001 05:56:24 +0000 Subject: [PATCH 2634/4487] Add deltas for tanh(-0.7). --- sysdeps/alpha/fpu/libm-test-ulps | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sysdeps/alpha/fpu/libm-test-ulps b/sysdeps/alpha/fpu/libm-test-ulps index 70a0f0897f..ce16391105 100644 --- a/sysdeps/alpha/fpu/libm-test-ulps +++ b/sysdeps/alpha/fpu/libm-test-ulps @@ -600,6 +600,11 @@ double: 0.5 idouble: 0.5 # tanh +Test "tanh (-0.7) == -0.60436777711716349631": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 Test "tanh (0.7) == 0.60436777711716349631": double: 1 float: 1 From da48cd782fafade16e1894fe18915a2e8ad97ad2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 8 Jul 2001 06:47:53 +0000 Subject: [PATCH 2635/4487] (__gettimeofday): Add declarations for asm functions. --- sysdeps/unix/sysv/aix/gettimeofday.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/sysdeps/unix/sysv/aix/gettimeofday.c b/sysdeps/unix/sysv/aix/gettimeofday.c index c7a4a01c08..031a84ebb6 100644 --- a/sysdeps/unix/sysv/aix/gettimeofday.c +++ b/sysdeps/unix/sysv/aix/gettimeofday.c @@ -21,11 +21,14 @@ #include #ifndef HAVE_GNU_LD -#define __daylight daylight -#define __timezone timezone -#define __tzname tzname +# define __daylight daylight +# define __timezone timezone +# define __tzname tzname #endif +extern int rtc_upper (void); +extern int rtc_lower (void); + /* Assembler Routines to access the timer registers */ asm(" .rtc_upper: mfspr 3,4 # copy RTCU to return register @@ -51,14 +54,14 @@ __gettimeofday (tv, tz) return -1; } - ts = rtc_upper(); /* seconds */ - tl = rtc_lower(); /* nanoseconds */ - tu = rtc_upper(); /* Check for a carry from */ - if (ts != tu) /* the lower reg to the upper */ - tl = rtc_lower(); /* Recover from the race condition */ + ts = rtc_upper (); /* Seconds. */ + tl = rtc_lower (); /* Nanoseconds. */ + tu = rtc_upper (); /* Check for a carry from. */ + if (ts != tu) /* The lower reg to the upper. */ + tl = rtc_lower (); /* Recover from the race condition. */ - tv->tv_sec = (long int) (tu + (double)tl/1000000000); - tv->tv_usec = (long int) ((double)tl/1000); + tv->tv_sec = (long int) (tu + (double) tl / 1000000000); + tv->tv_usec = (long int) ((double) tl / 1000); if (tz != NULL) { From 0312b508ac574e280d8f04514e8d4e70e9da5b46 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 8 Jul 2001 06:55:42 +0000 Subject: [PATCH 2636/4487] (__libc_dlclose): Fix typo. --- sysdeps/unix/sysv/aix/dl-libc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/aix/dl-libc.c b/sysdeps/unix/sysv/aix/dl-libc.c index 0506d11ef7..69c627c19c 100644 --- a/sysdeps/unix/sysv/aix/dl-libc.c +++ b/sysdeps/unix/sysv/aix/dl-libc.c @@ -36,6 +36,6 @@ __libc_dlsym (void *map, const char *name) int __libc_dlclose (void *map) { - _dl_close (__map); + _dl_close (map); return 0; } From a207bef32fdf9807e79f3f9a3a39842dd43a6d23 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 8 Jul 2001 07:02:19 +0000 Subject: [PATCH 2637/4487] Fix various types. --- sysdeps/unix/sysv/aix/recvfrom.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/aix/recvfrom.c b/sysdeps/unix/sysv/aix/recvfrom.c index 723a2c893a..08264288d1 100644 --- a/sysdeps/unix/sysv/aix/recvfrom.c +++ b/sysdeps/unix/sysv/aix/recvfrom.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2001 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 @@ -18,10 +18,10 @@ #include -extern int nrecvfrom (int s, void *uap_buf, int len, int flags, - void *uap_from, int *uap_fromlenaddr); +extern ssize_t nrecvfrom (int s, void *uap_buf, size_t len, int flags, + void *uap_from, socklen_t *uap_fromlenaddr); -int +ssize_t recvfrom (int fd, void *buf, size_t n, int flags, __SOCKADDR_ARG addr, socklen_t *addr_len) { From 097cf6fa038abf5acd38eaa4a47df12a41fbbd4f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 8 Jul 2001 07:05:51 +0000 Subject: [PATCH 2638/4487] AIX recv implementation. --- sysdeps/unix/sysv/aix/recv.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/recv.c diff --git a/sysdeps/unix/sysv/aix/recv.c b/sysdeps/unix/sysv/aix/recv.c new file mode 100644 index 0000000000..9e8e447655 --- /dev/null +++ b/sysdeps/unix/sysv/aix/recv.c @@ -0,0 +1,28 @@ +/* Copyright (C) 2000, 2001 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. */ + +#include + +extern ssize_t recv (int fd, void *buf, size_t n, int flags); + + +ssize_t +__recv (int fd, void *buf, size_t n, int flags); +{ + return recv (fd, buf, n, flags); +} From 7f82b7444cb93d475933313661eda9261a084e26 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 8 Jul 2001 07:09:12 +0000 Subject: [PATCH 2639/4487] (__recv): Fix typo. --- sysdeps/unix/sysv/aix/recv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/aix/recv.c b/sysdeps/unix/sysv/aix/recv.c index 9e8e447655..b8ae73e200 100644 --- a/sysdeps/unix/sysv/aix/recv.c +++ b/sysdeps/unix/sysv/aix/recv.c @@ -22,7 +22,7 @@ extern ssize_t recv (int fd, void *buf, size_t n, int flags); ssize_t -__recv (int fd, void *buf, size_t n, int flags); +__recv (int fd, void *buf, size_t n, int flags) { return recv (fd, buf, n, flags); } From c96d6988abb8bbbd11d39da8b028c78cc1b01b19 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 8 Jul 2001 07:11:53 +0000 Subject: [PATCH 2640/4487] (recvmsg): Fix return type. --- sysdeps/unix/sysv/aix/recvmsg.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/aix/recvmsg.c b/sysdeps/unix/sysv/aix/recvmsg.c index 0b695b34da..ea5af3557c 100644 --- a/sysdeps/unix/sysv/aix/recvmsg.c +++ b/sysdeps/unix/sysv/aix/recvmsg.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2001 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 @@ -18,9 +18,9 @@ #include -extern int nrecvmsg (int s, struct msghdr *uap_msg, int flags); +extern ssize_t nrecvmsg (int s, struct msghdr *uap_msg, int flags); -int +ssize_t recvmsg (int fd, struct msghdr *message, int flags) { return nrecvmsg (fd, message, flags); From f89b56b804ce6fee16bc1d436d0133e0908ee3e9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 8 Jul 2001 07:14:06 +0000 Subject: [PATCH 2641/4487] (sendmsg): Fix return type. --- sysdeps/unix/sysv/aix/sendmsg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/aix/sendmsg.c b/sysdeps/unix/sysv/aix/sendmsg.c index 9ab19a9dbf..952bb06627 100644 --- a/sysdeps/unix/sysv/aix/sendmsg.c +++ b/sysdeps/unix/sysv/aix/sendmsg.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2001 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,7 +20,7 @@ extern int nsendmsg (int s, void *uap_msg, int flags); -int +ssize_t sendmsg (int fd, const struct msghdr *message, int flags) { return nsendmsg (fd, message, flags); From 655f4b14c86a98082cb358559ec4c188f8661b38 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 8 Jul 2001 07:15:01 +0000 Subject: [PATCH 2642/4487] Improve nsendmsg prototype. --- sysdeps/unix/sysv/aix/sendmsg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/aix/sendmsg.c b/sysdeps/unix/sysv/aix/sendmsg.c index 952bb06627..054d374393 100644 --- a/sysdeps/unix/sysv/aix/sendmsg.c +++ b/sysdeps/unix/sysv/aix/sendmsg.c @@ -18,7 +18,7 @@ #include -extern int nsendmsg (int s, void *uap_msg, int flags); +extern int nsendmsg (int s, const void *uap_msg, int flags); ssize_t sendmsg (int fd, const struct msghdr *message, int flags) From f476000f876da8865b224211b8bb286593dc7e80 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 15 Jul 2001 15:25:11 +0000 Subject: [PATCH 2643/4487] Check _dl_pagesize first. Default to 4096, not EXEC_PAGESIZE. --- sysdeps/unix/sysv/linux/m68k/getpagesize.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/m68k/getpagesize.c b/sysdeps/unix/sysv/linux/m68k/getpagesize.c index cfe98fc5ad..009f7f1cca 100644 --- a/sysdeps/unix/sysv/linux/m68k/getpagesize.c +++ b/sysdeps/unix/sysv/linux/m68k/getpagesize.c @@ -28,8 +28,13 @@ int __getpagesize () { + extern size_t _dl_pagesize; #ifdef __NR_getpagesize int result; +#endif + + if (_dl_pagesize != 0) + return _dl_pagesize; result = INLINE_SYSCALL (getpagesize, 0); /* The only possible error is ENOSYS. */ @@ -37,7 +42,7 @@ __getpagesize () return result; #endif - return EXEC_PAGESIZE; + return 4096; } weak_alias (__getpagesize, getpagesize) From b5f709a1fffe5b3e579a3a1228914d3b00d5368e Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 15 Jul 2001 15:30:50 +0000 Subject: [PATCH 2644/4487] Special versions for Linux/m68k. --- sysdeps/unix/sysv/linux/m68k/sys/procfs.h | 126 ++++++++++++++++++++ sysdeps/unix/sysv/linux/m68k/sys/ucontext.h | 109 +++++++++++++++++ 2 files changed, 235 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/sys/procfs.h create mode 100644 sysdeps/unix/sysv/linux/m68k/sys/ucontext.h diff --git a/sysdeps/unix/sysv/linux/m68k/sys/procfs.h b/sysdeps/unix/sysv/linux/m68k/sys/procfs.h new file mode 100644 index 0000000000..27abf8ef52 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/sys/procfs.h @@ -0,0 +1,126 @@ +/* Copyright (C) 1996, 1997, 1999, 2000, 2001 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 _SYS_PROCFS_H +#define _SYS_PROCFS_H 1 + +/* This is somewhat modelled after the file of the same name on SVR4 + systems. It provides a definition of the core file format for ELF + used on Linux. It doesn't have anything to do with the /proc file + system, even though Linux has one. + + Anyway, the whole purpose of this file is for GDB and GDB only. + Don't read too much into it. Don't use it for anything other than + GDB unless you know what you are doing. */ + +#include +#include +#include +#include + +__BEGIN_DECLS + +/* Type for a general-purpose register. */ +typedef unsigned long elf_greg_t; + +/* And the whole bunch of them. We could have used `struct + user_regs_struct' directly in the typedef, but tradition says that + the register set is an array, which does have some peculiar + semantics, so leave it that way. */ +#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t)) +typedef elf_greg_t elf_gregset_t[ELF_NGREG]; + +/* Register set for the floating-point registers. */ +typedef struct user_m68kfp_struct elf_fpregset_t; + + +/* Signal info. */ +struct elf_siginfo + { + int si_signo; /* Signal number. */ + int si_code; /* Extra code. */ + int si_errno; /* Errno. */ + }; + + +/* Definitions to generate Intel SVR4-like core files. These mostly + have the same names as the SVR4 types with "elf_" tacked on the + front to prevent clashes with Linux definitions, and the typedef + forms have been avoided. This is mostly like the SVR4 structure, + but more Linuxy, with things that Linux does not support and which + GDB doesn't really use excluded. */ + +struct elf_prstatus + { + struct elf_siginfo pr_info; /* Info associated with signal. */ + short int pr_cursig; /* Current signal. */ + unsigned long int pr_sigpend; /* Set of pending signals. */ + unsigned long int pr_sighold; /* Set of held signals. */ + __pid_t pr_pid; + __pid_t pr_ppid; + __pid_t pr_pgrp; + __pid_t pr_sid; + struct timeval pr_utime; /* User time. */ + struct timeval pr_stime; /* System time. */ + struct timeval pr_cutime; /* Cumulative user time. */ + struct timeval pr_cstime; /* Cumulative system time. */ + elf_gregset_t pr_reg; /* GP registers. */ + int pr_fpvalid; /* True if math copro being used. */ + }; + + +#define ELF_PRARGSZ (80) /* Number of chars for args. */ + +struct elf_prpsinfo + { + char pr_state; /* Numeric process state. */ + char pr_sname; /* Char for pr_state. */ + char pr_zomb; /* Zombie. */ + char pr_nice; /* Nice val. */ + unsigned long int pr_flag; /* Flags. */ + unsigned short int pr_uid; + unsigned short int pr_gid; + int pr_pid, pr_ppid, pr_pgrp, pr_sid; + /* Lots missing */ + char pr_fname[16]; /* Filename of executable. */ + char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ + }; + + +/* The rest of this file provides the types for emulation of the + Solaris interfaces that should be implemented by + users of libthread_db. */ + +/* Addresses. */ +typedef void *psaddr_t; + +/* Register sets. Linux has different names. */ +typedef elf_gregset_t prgregset_t; +typedef elf_fpregset_t prfpregset_t; + +/* We don't have any differences between processes and threads, + therefore have only one PID type. */ +typedef __pid_t lwpid_t; + +/* Process status and info. In the end we do provide typedefs for them. */ +typedef struct elf_prstatus prstatus_t; +typedef struct elf_prpsinfo prpsinfo_t; + +__END_DECLS + +#endif /* sys/procfs.h */ diff --git a/sysdeps/unix/sysv/linux/m68k/sys/ucontext.h b/sysdeps/unix/sysv/linux/m68k/sys/ucontext.h new file mode 100644 index 0000000000..3c441dc5ce --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/sys/ucontext.h @@ -0,0 +1,109 @@ +/* Copyright (C) 1997, 1999, 2001 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. */ + +/* System V/m68k ABI compliant context switching support. */ + +#ifndef _SYS_UCONTEXT_H +#define _SYS_UCONTEXT_H 1 + +#include +#include + +/* Type for general register. */ +typedef int greg_t; + +/* Number of general registers. */ +#define NGREG 18 + +/* Container for all general registers. */ +typedef greg_t gregset_t[NGREG]; + +/* Number of each register is the `gregset_t' array. */ +enum +{ + R_D0 = 0, +#define R_D0 R_D0 + R_D1 = 1, +#define R_D1 R_D1 + R_D2 = 2, +#define R_D2 R_D2 + R_D3 = 3, +#define R_D3 R_D3 + R_D4 = 4, +#define R_D4 R_D4 + R_D5 = 5, +#define R_D5 R_D5 + R_D6 = 6, +#define R_D6 R_D6 + R_D7 = 7, +#define R_D7 R_D7 + R_A0 = 8, +#define R_A0 R_A0 + R_A1 = 9, +#define R_A1 R_A1 + R_A2 = 10, +#define R_A2 R_A2 + R_A3 = 11, +#define R_A3 R_A3 + R_A4 = 12, +#define R_A4 R_A4 + R_A5 = 13, +#define R_A5 R_A5 + R_A6 = 14, +#define R_A6 R_A6 + R_A7 = 15, +#define R_A7 R_A7 + R_SP = 15, +#define R_SP R_SP + R_PC = 16, +#define R_PC R_PC + R_PS = 17 +#define R_PS R_PS +}; + +/* Structure to describe FPU registers. */ +typedef struct fpregset +{ + int f_fpregs[8][3]; + int f_pcr; + int f_psr; + int f_fpiaddr; +} fpregset_t; + +/* Context to describe whole processor state. */ +typedef struct +{ + int version; + gregset_t gregs; + fpregset_t fpregs; +} mcontext_t; + +#define MCONTEXT_VERSION 2 + +/* Userlevel context. */ +typedef struct ucontext +{ + unsigned long int uc_flags; + struct ucontext *uc_link; + __sigset_t uc_sigmask; + stack_t uc_stack; + mcontext_t uc_mcontext; + long int uc_filler[174]; +} ucontext_t; + +#endif /* sys/ucontext.h */ From 760ab2840baf479daef89311fa9e58425909afe3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 16 Jul 2001 22:26:12 +0000 Subject: [PATCH 2645/4487] (MAP_BASE_ADDR): Removed. (elf_machine_got_rel): Defined only if RTLD_BOOTSTRAP is not defined. (RESOLVE_GOTSYM): Rewrite to use RESOLVE. --- sysdeps/mips/dl-machine.h | 71 +++++++++------------------------------ 1 file changed, 16 insertions(+), 55 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 4e0b591d8e..87d7cbb5d5 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -61,23 +61,6 @@ in l_info array. */ #define DT_MIPS(x) (DT_MIPS_##x - DT_LOPROC + DT_NUM) -/* - * MIPS libraries are usually linked to a non-zero base address. We - * subtract the base address from the address where we map the object - * to. This results in more efficient address space usage. - * - * FIXME: By the time when MAP_BASE_ADDR is called we don't have the - * DYNAMIC section read. Until this is fixed make the assumption that - * libraries have their base address at 0x5ffe0000. This needs to be - * fixed before we can safely get rid of this MIPSism. - */ -#if 0 -#define MAP_BASE_ADDR(l) ((l)->l_info[DT_MIPS(BASE_ADDRESS)] ? \ - (l)->l_info[DT_MIPS(BASE_ADDRESS)]->d_un.d_ptr : 0) -#else -#define MAP_BASE_ADDR(l) 0x5ffe0000 -#endif - /* If there is a DT_MIPS_RLD_MAP entry in the dynamic section, fill it in with the run-time address of the r_debug structure */ #define ELF_MACHINE_DEBUG_SETUP(l,r) \ @@ -557,51 +540,30 @@ elf_machine_lazy_rel (struct link_map *map, /* Do nothing. */ } +#ifndef RTLD_BOOTSTRAP /* Relocate GOT. */ static inline void elf_machine_got_rel (struct link_map *map, int lazy) { ElfW(Addr) *got; ElfW(Sym) *sym; + const ElfW(Half) *vernum; int i, n, symidx; - /* This function is loaded in dl-reloc as a nested function and can - therefore access the variables scope and strtab from - _dl_relocate_object. */ -#ifdef RTLD_BOOTSTRAP -# define RESOLVE_GOTSYM(sym,sym_index) 0 -#else -# define RESOLVE_GOTSYM(sym,sym_index) \ + +#define RESOLVE_GOTSYM(sym,vernum,sym_index) \ ({ \ const ElfW(Sym) *ref = sym; \ + const struct r_found_version *version \ + = vernum ? &map->l_versions [vernum [sym_index]] : NULL; \ ElfW(Addr) value; \ - \ - switch (map->l_info[VERSYMIDX (DT_VERSYM)] != NULL) \ - { \ - default: \ - { \ - const ElfW(Half) *vernum = \ - (const void *) D_PTR (map, l_info[VERSYMIDX (DT_VERSYM)]); \ - ElfW(Half) ndx = vernum[sym_index]; \ - const struct r_found_version *version = &l->l_versions[ndx]; \ - \ - if (version->hash != 0) \ - { \ - value = _dl_lookup_versioned_symbol(strtab + sym->st_name,\ - map, \ - &ref, scope, version, \ - R_MIPS_REL32, 0); \ - break; \ - } \ - /* Fall through. */ \ - } \ - case 0: \ - value = _dl_lookup_symbol (strtab + sym->st_name, map, &ref, \ - scope, R_MIPS_REL32, 0); \ - } \ - \ + value = RESOLVE (&ref, version, R_MIPS_REL32); \ (ref)? value + ref->st_value: 0; \ }) -#endif /* RTLD_BOOTSTRAP */ + + if (map->l_info[VERSYMIDX (DT_VERSYM)] != NULL) + vernum = (const void *) D_PTR (map, l_info[VERSYMIDX (DT_VERSYM)]); + else + vernum = NULL; got = (ElfW(Addr) *) D_PTR (map, l_info[DT_PLTGOT]); @@ -639,10 +601,10 @@ elf_machine_got_rel (struct link_map *map, int lazy) && sym->st_value && lazy) *got = sym->st_value + map->l_addr; else - *got = RESOLVE_GOTSYM (sym, symidx); + *got = RESOLVE_GOTSYM (sym, vernum, symidx); } else if (sym->st_shndx == SHN_COMMON) - *got = RESOLVE_GOTSYM (sym, symidx); + *got = RESOLVE_GOTSYM (sym, vernum, symidx); else if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC && *got != sym->st_value && lazy) @@ -653,7 +615,7 @@ elf_machine_got_rel (struct link_map *map, int lazy) *got += map->l_addr; } else - *got = RESOLVE_GOTSYM (sym, symidx); + *got = RESOLVE_GOTSYM (sym, vernum, symidx); ++got; ++sym; @@ -661,9 +623,8 @@ elf_machine_got_rel (struct link_map *map, int lazy) } #undef RESOLVE_GOTSYM - - return; } +#endif /* Set up the loaded object described by L so its stub function will jump to the on-demand fixup code __dl_runtime_resolve. */ From b04f70b77dc295bfdeff1fd33b3686cebd4a3b80 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 16 Jul 2001 22:30:06 +0000 Subject: [PATCH 2646/4487] Not needed anymore. --- sysdeps/mips/mips64/rtld-parms | 3 - sysdeps/mips/mipsel/rtld-parms | 3 - sysdeps/mips/rtld-ldscript.in | 105 --------------------------------- sysdeps/mips/rtld-parms | 15 ----- 4 files changed, 126 deletions(-) delete mode 100644 sysdeps/mips/mips64/rtld-parms delete mode 100644 sysdeps/mips/mipsel/rtld-parms delete mode 100644 sysdeps/mips/rtld-ldscript.in delete mode 100644 sysdeps/mips/rtld-parms diff --git a/sysdeps/mips/mips64/rtld-parms b/sysdeps/mips/mips64/rtld-parms deleted file mode 100644 index 77dfc39ef4..0000000000 --- a/sysdeps/mips/mips64/rtld-parms +++ /dev/null @@ -1,3 +0,0 @@ -ifndef rtld-wordsize -rtld-wordsize = 64 -endif diff --git a/sysdeps/mips/mipsel/rtld-parms b/sysdeps/mips/mipsel/rtld-parms deleted file mode 100644 index 07fac51647..0000000000 --- a/sysdeps/mips/mipsel/rtld-parms +++ /dev/null @@ -1,3 +0,0 @@ -ifndef rtld-oformat -rtld-oformat = elf32-littlemips -endif diff --git a/sysdeps/mips/rtld-ldscript.in b/sysdeps/mips/rtld-ldscript.in deleted file mode 100644 index c9b5e71195..0000000000 --- a/sysdeps/mips/rtld-ldscript.in +++ /dev/null @@ -1,105 +0,0 @@ -OUTPUT_ARCH(@@rtld-arch@@) -ENTRY(@@rtld-entry@@) -SECTIONS -{ - /* Read-only sections, merged into text segment: */ - . = @@rtld-base@@; - .reginfo : { *(.reginfo) } - .dynamic : { *(.dynamic) } - .dynstr : { *(.dynstr) } - .dynsym : { *(.dynsym) } - .hash : { *(.hash) } - .rel.text : { *(.rel.text) } - .rela.text : { *(.rela.text) } - .rel.data : { *(.rel.data) } - .rela.data : { *(.rela.data) } - .rel.rodata : { *(.rel.rodata) } - .rela.rodata : { *(.rela.rodata) } - .rel.got : { *(.rel.got) } - .rela.got : { *(.rela.got) } - .rel.ctors : { *(.rel.ctors) } - .rela.ctors : { *(.rela.ctors) } - .rel.dtors : { *(.rel.dtors) } - .rela.dtors : { *(.rela.dtors) } - .rel.init : { *(.rel.init) } - .rela.init : { *(.rela.init) } - .rel.fini : { *(.rel.fini) } - .rela.fini : { *(.rela.fini) } - .rel.bss : { *(.rel.bss) } - .rela.bss : { *(.rela.bss) } - .rel.plt : { *(.rel.plt) } - .rela.plt : { *(.rela.plt) } - .rodata : { *(.rodata) } - .rodata1 : { *(.rodata1) } - .init : { *(.init) } =0 - .text : - { - *(.text) - *(.stub) - /* .gnu.warning sections are handled specially by elf32.em. */ - *(.gnu.warning) - } =0 - .fini : { *(.fini) } =0 - /* Adjust the address for the data segment. We want to adjust up to - the same address within the page on the next page up. It would - be more correct to do this: - . = 0x10000000; - The current expression does not correctly handle the case of a - text segment ending precisely at the end of a page; it causes the - data segment to skip a page. The above expression does not have - this problem, but it will currently (2/95) cause BFD to allocate - a single segment, combining both text and data, for this case. - This will prevent the text segment from being shared among - multiple executions of the program; I think that is more - important than losing a page of the virtual address space (note - that no actual memory is lost; the page which is skipped can not - be referenced). */ - . += 0x10000; - .data : - { - *(.data) - CONSTRUCTORS - } - .data1 : { *(.data1) } - .ctors : { *(.ctors) } - .dtors : { *(.dtors) } - _gp = ALIGN(16) + 0x7ff0; - .got : - { - *(.got.plt) *(.got) - } - /* We want the small data sections together, so single-instruction offsets - can access them all, and initialized data all before uninitialized, so - we can shorten the on-disk segment size. */ - .sdata : { *(.sdata) } - .lit8 : { *(.lit8) } - .lit4 : { *(.lit4) } - .sbss : { *(.sbss) *(.scommon) } - .bss : - { - *(.dynbss) - *(.bss) - *(COMMON) - } - /* The normal linker scripts created by the binutils doesn't have the - symbols end and _end which breaks ld.so's dl-minimal.c. */ - _end = . ; - PROVIDE (end = .); - /* These are needed for ELF backends which have not yet been - converted to the new style linker. */ - .stab 0 : { *(.stab) } - .stabstr 0 : { *(.stabstr) } - /* DWARF debug sections. - Symbols in the .debug DWARF section are relative to the beginning of the - section so we begin .debug at 0. It's not clear yet what needs to happen - for the others. */ - .debug 0 : { *(.debug) } - .debug_srcinfo 0 : { *(.debug_srcinfo) } - .debug_aranges 0 : { *(.debug_aranges) } - .debug_pubnames 0 : { *(.debug_pubnames) } - .debug_sfnames 0 : { *(.debug_sfnames) } - .line 0 : { *(.line) } - /* These must appear regardless of . */ - .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) } - .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) } -} diff --git a/sysdeps/mips/rtld-parms b/sysdeps/mips/rtld-parms deleted file mode 100644 index 72f09e7341..0000000000 --- a/sysdeps/mips/rtld-parms +++ /dev/null @@ -1,15 +0,0 @@ -ifndef rtld-wordsize -rtld-wordsize = 32 -endif -ifndef rtld-oformat -rtld-oformat = elf$(rtld-wordsize)-bigmips -endif -ifndef rtld-arch -rtld-arch = mips -endif -ifndef rtld-entry -rtld-entry = __start -endif -ifndef rtld-base -rtld-base = 0x0fb60000 + SIZEOF_HEADERS -endif From 44dce3919220dae3d1ec6f604d8b1fe2e39815d1 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 17 Jul 2001 17:12:10 +0000 Subject: [PATCH 2647/4487] Fix last change. --- sysdeps/unix/sysv/linux/m68k/getpagesize.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/m68k/getpagesize.c b/sysdeps/unix/sysv/linux/m68k/getpagesize.c index 009f7f1cca..bbabbb1773 100644 --- a/sysdeps/unix/sysv/linux/m68k/getpagesize.c +++ b/sysdeps/unix/sysv/linux/m68k/getpagesize.c @@ -36,6 +36,7 @@ __getpagesize () if (_dl_pagesize != 0) return _dl_pagesize; +#ifdef __NR_getpagesize result = INLINE_SYSCALL (getpagesize, 0); /* The only possible error is ENOSYS. */ if (result != -1) From c1babb4b9d2ce6cf409783c74807f6294e18bcfa Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 20 Jul 2001 06:05:16 +0000 Subject: [PATCH 2648/4487] Synch with kernel. --- sysdeps/unix/sysv/linux/mips/bits/siginfo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h index 04c5f40d90..f385372bd0 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h +++ b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h @@ -45,9 +45,9 @@ typedef union sigval typedef struct siginfo { int si_signo; /* Signal number. */ + int si_code; /* Signal code. */ int si_errno; /* If non-zero, an errno value associated with this signal, as defined in . */ - int si_code; /* Signal code. */ union { From 48bfe44538446fbbdb517cf0ea1d2385849c7507 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 22 Jul 2001 18:18:34 +0000 Subject: [PATCH 2649/4487] (INLINE_SYSCALL): Don't mark asm input operand as clobbered. --- sysdeps/unix/sysv/linux/m68k/sysdep.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h index 23fcc55f31..6d0817cf2e 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -171,7 +171,7 @@ SYSCALL_ERROR_LABEL: \ asm volatile ("trap #0" \ : "=d" (_d0) \ : "0" (_d0) ASM_ARGS_##nr \ - : "d0", "memory"); \ + : "memory"); \ _sys_result = _d0; \ } \ if (_sys_result >= (unsigned int) -4095) \ From db08f905e80c83d4aafdf439225f56c9b2a19b70 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 22 Jul 2001 18:18:48 +0000 Subject: [PATCH 2650/4487] Don't mark asm input operand as clobbered. --- sysdeps/unix/sysv/linux/m68k/brk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/m68k/brk.c b/sysdeps/unix/sysv/linux/m68k/brk.c index 10a82aaf2f..d02b1f9a29 100644 --- a/sysdeps/unix/sysv/linux/m68k/brk.c +++ b/sysdeps/unix/sysv/linux/m68k/brk.c @@ -40,7 +40,7 @@ __brk (void *addr) "trap #0" /* Perform the system call. */ : "=d" (d0) : "0" (SYS_ify (brk)), "g" (addr) - : "%d0", "%d1"); + : "%d1"); newbrk = (void *) d0; } __curbrk = newbrk; From d6df8f49fdea74aeb69d3765a4876fdb8af72ade Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 28 Jul 2001 05:53:37 +0000 Subject: [PATCH 2651/4487] Remove non-existing files. --- sysdeps/mips/Dist | 2 -- sysdeps/mips/mips64/Dist | 1 - 2 files changed, 3 deletions(-) diff --git a/sysdeps/mips/Dist b/sysdeps/mips/Dist index 5ad586dbff..1fbf36aaad 100644 --- a/sysdeps/mips/Dist +++ b/sysdeps/mips/Dist @@ -1,6 +1,4 @@ setjmp_aux.c -rtld-ldscript.in -rtld-parms regdef.h sgidefs.h fpregdef.h diff --git a/sysdeps/mips/mips64/Dist b/sysdeps/mips/mips64/Dist index 4cde3d0e5d..ad6ea0313a 100644 --- a/sysdeps/mips/mips64/Dist +++ b/sysdeps/mips/mips64/Dist @@ -1,2 +1 @@ setjmp_aux.c -rtld-parms From 0b3cda64b8378b2c78e4a86405ed8e0ecd5b4e9a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 28 Jul 2001 05:53:57 +0000 Subject: [PATCH 2652/4487] Not needed anymore. --- sysdeps/mips/mipsel/Dist | 1 - 1 file changed, 1 deletion(-) delete mode 100644 sysdeps/mips/mipsel/Dist diff --git a/sysdeps/mips/mipsel/Dist b/sysdeps/mips/mipsel/Dist deleted file mode 100644 index 98a10ec269..0000000000 --- a/sysdeps/mips/mipsel/Dist +++ /dev/null @@ -1 +0,0 @@ -rtld-parms From 2b948198f186a5ea1485f5cd10c2a7981cc1ea68 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 28 Jul 2001 06:07:40 +0000 Subject: [PATCH 2653/4487] Add sys/procfs.h. --- sysdeps/unix/sysv/linux/m68k/Dist | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/m68k/Dist b/sysdeps/unix/sysv/linux/m68k/Dist index 41d521b13f..35fad7ff0e 100644 --- a/sysdeps/unix/sysv/linux/m68k/Dist +++ b/sysdeps/unix/sysv/linux/m68k/Dist @@ -6,3 +6,4 @@ setresgid.c setfsuid.c setfsgid.c sys/reg.h +sys/procfs.h From 1e0904c1c1412ddbe1be72aaa3e5835ef0391848 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 28 Jul 2001 06:08:50 +0000 Subject: [PATCH 2654/4487] Add dl-support.c, dl-addr.c, and dl-error.c. --- sysdeps/unix/sysv/aix/Dist | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysdeps/unix/sysv/aix/Dist b/sysdeps/unix/sysv/aix/Dist index 4d0cb14afb..2698761f19 100644 --- a/sysdeps/unix/sysv/aix/Dist +++ b/sysdeps/unix/sysv/aix/Dist @@ -1,3 +1,6 @@ +dl-support.c +dl-error.c +dl-addr.c dl-sym.c dl-open.c dl-close.c From a4f1359e63415357e41123ccddb34395622ce5c7 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 31 Jul 2001 07:46:06 +0000 Subject: [PATCH 2655/4487] * sysdeps/unix/sysv/linux/sparc/bits/poll.h (NPOLLFILE): Removed. * sysdeps/unix/sysv/linux/mips/bits/poll.h (NPOLLFILE): Removed. * sysdeps/unix/sysv/linux/m68k/bits/poll.h (NPOLLFILE): Removed. * sysdeps/unix/sysv/linux/bits/poll.h (NPOLLFILE): Removed. * sysdeps/generic/bits/poll.h (NPOLLFILE): Removed. --- sysdeps/unix/sysv/linux/m68k/bits/poll.h | 5 ----- sysdeps/unix/sysv/linux/mips/bits/poll.h | 5 ----- 2 files changed, 10 deletions(-) diff --git a/sysdeps/unix/sysv/linux/m68k/bits/poll.h b/sysdeps/unix/sysv/linux/m68k/bits/poll.h index 17adb4de47..f7a7393154 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/poll.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/poll.h @@ -41,8 +41,3 @@ #define POLLERR 0x008 /* Error condition. */ #define POLLHUP 0x010 /* Hung up. */ #define POLLNVAL 0x020 /* Invalid polling request. */ - -#ifdef __USE_MISC -/* Canonical number of polling requests to read in at a time in poll. */ -# define NPOLLFILE 30 -#endif diff --git a/sysdeps/unix/sysv/linux/mips/bits/poll.h b/sysdeps/unix/sysv/linux/mips/bits/poll.h index 825d073df3..f62b9c3948 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/poll.h +++ b/sysdeps/unix/sysv/linux/mips/bits/poll.h @@ -46,8 +46,3 @@ #define POLLERR 0x008 /* Error condition. */ #define POLLHUP 0x010 /* Hung up. */ #define POLLNVAL 0x020 /* Invalid polling request. */ - -#ifdef __USE_MISC -/* Canonical number of polling requests to read in at a time in poll. */ -# define NPOLLFILE 30 -#endif From 17f56d2f9c5893afc919e9a7666962cdfc99354a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 11 Aug 2001 08:54:29 +0000 Subject: [PATCH 2656/4487] (elf_machine_runtime_setup): Only set _dl_profile_map for the right object. --- sysdeps/arm/dl-machine.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index ba515ebec4..24fe366784 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -103,8 +103,11 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) if (profile) { got[2] = (Elf32_Addr) &_dl_runtime_profile; - /* Say that we really want profiling and the timers are started. */ - _dl_profile_map = l; + + if (_dl_name_match_p (_dl_profile, l)) + /* Say that we really want profiling and the timers are + started. */ + _dl_profile_map = l; } else /* This function will get called to fix up the GOT entry indicated by From cf9fe93f07ccafc4130ecd3a641b9d5f01afb208 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 11 Aug 2001 20:31:07 +0000 Subject: [PATCH 2657/4487] Use __getopt_clean_environment only if USE_NONOPTION_FLAGS is defined. --- sysdeps/arm/init-first.c | 6 +++++- sysdeps/mach/hurd/mips/init-first.c | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/sysdeps/arm/init-first.c b/sysdeps/arm/init-first.c index cc8da31edb..6856314c83 100644 --- a/sysdeps/arm/init-first.c +++ b/sysdeps/arm/init-first.c @@ -1,5 +1,5 @@ /* Initialization code run first thing by the ELF startup code. For ARM. - Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997, 1998, 2001 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,7 +20,9 @@ #include extern void __libc_init (int, char **, char **); +#ifdef USE_NONOPTION_FLAGS extern void __getopt_clean_environment (char **); +#endif extern void __libc_global_ctors (void); int __libc_multiple_libcs = 1; @@ -35,8 +37,10 @@ init (int *data) __environ = envp; __libc_init (argc, argv, envp); +#ifdef USE_NONOPTION_FLAGS /* This is a hack to make the special getopt in GNU libc working. */ __getopt_clean_environment (envp); +#endif } #ifdef SHARED diff --git a/sysdeps/mach/hurd/mips/init-first.c b/sysdeps/mach/hurd/mips/init-first.c index b81fe3cc3c..d0ab593404 100644 --- a/sysdeps/mach/hurd/mips/init-first.c +++ b/sysdeps/mach/hurd/mips/init-first.c @@ -1,5 +1,5 @@ /* Initialization code run first thing by the ELF startup code. For Mips/Hurd. - Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 2000, 2001 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 @@ -27,7 +27,9 @@ extern void __mach_init (void); extern void __libc_init (int, char **, char **); +#ifdef USE_NONOPTION_FLAGS extern void __getopt_clean_environment (char **); +#endif extern void __libc_global_ctors (void); unsigned int __hurd_threadvar_max; @@ -106,8 +108,10 @@ init1 (int argc, char *arg0, ...) __libc_init (argc, argv, __environ); +#ifdef USE_NONOPTION_FLAGS /* This is a hack to make the special getopt in GNU libc working. */ __getopt_clean_environment (envp); +#endif #ifdef SHARED __libc_global_ctors (); From 3b402ca813ce9ac4b689b4b41ccc2e43bb5e6b1d Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 13 Aug 2001 08:42:44 +0000 Subject: [PATCH 2658/4487] (MCOUNT): Don't use delay slot for jal since jal is a macro. --- sysdeps/mips/machine-gmon.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sysdeps/mips/machine-gmon.h b/sysdeps/mips/machine-gmon.h index 8a56c76689..4b6a939a0a 100644 --- a/sysdeps/mips/machine-gmon.h +++ b/sysdeps/mips/machine-gmon.h @@ -1,5 +1,5 @@ /* Machine-specific calling sequence for `mcount' profiling function. MIPS - Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 2000, 2001 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 @@ -42,8 +42,9 @@ "sw $1,0($29);" \ "sw $31,4($29);" \ "move $5,$31;" \ - "jal __mcount;" \ "move $4,$1;" \ + "jal __mcount;" \ + "nop;" \ "lw $4,8($29);" \ "lw $5,12($29);" \ "lw $6,16($29);" \ From 4afac624ab0856b3b9e13c48343369935b4e20e4 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 15 Aug 2001 13:09:16 +0000 Subject: [PATCH 2659/4487] (atomic_add): Don't allow address register for operand 0. --- sysdeps/m68k/m68020/atomicity.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/m68k/m68020/atomicity.h b/sysdeps/m68k/m68020/atomicity.h index 4639b015c2..4649480867 100644 --- a/sysdeps/m68k/m68020/atomicity.h +++ b/sysdeps/m68k/m68020/atomicity.h @@ -45,7 +45,7 @@ atomic_add (volatile uint32_t *mem, int val) { /* XXX Use cas here as well? */ __asm__ __volatile__ ("add%.l %0,%1" - : : "ir" (val), "m" (*mem) : "memory"); + : : "id" (val), "m" (*mem) : "memory"); } static inline int From 85e36b09226c35613a758ebb57f3fed78dbc3f18 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 16 Aug 2001 05:32:30 +0000 Subject: [PATCH 2660/4487] Add rule to import kernel symbols. --- sysdeps/unix/sysv/aix/Makefile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sysdeps/unix/sysv/aix/Makefile b/sysdeps/unix/sysv/aix/Makefile index 19ec885473..3fcf4bb3e9 100644 --- a/sysdeps/unix/sysv/aix/Makefile +++ b/sysdeps/unix/sysv/aix/Makefile @@ -2,6 +2,21 @@ # This is a hack until the import/export stuff is worked out. +postctor += /lib/syscalls.exp +ifeq ($(subdir),csu) + +sysdep_routines += aix-syscalls + +# +# The foo.c is a workaround for the linker complaining about no input files. +$(objpfx)aix-syscalls.o : /lib/syscalls.exp + echo "static int a;" > foo.c + $(CC) -c foo.c + ld -bM:SRE -bnoentry -bI:/lib/syscalls.exp -bE:/lib/syscalls.exp foo.o -o $@ + rm foo.c foo.o + + +endif + ifeq ($(subdir),misc) sysdep_routines += dl-error dl-support dl-libc dl-open dl-sym \ dl-close dl-addr uitrunc @@ -24,3 +39,4 @@ inhibit-glue = yes ifeq ($(subdir),timezone) CPPFLAGS-zic.c = -Dunix endif + From 4435779790a1edb87554a26bbbb9c603bc775d73 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 16 Aug 2001 05:32:49 +0000 Subject: [PATCH 2661/4487] Fix type of __id_t, __useconds_t and __intptr_t. --- sysdeps/unix/sysv/aix/bits/types.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/aix/bits/types.h b/sysdeps/unix/sysv/aix/bits/types.h index 4beff41891..12c3be730e 100644 --- a/sysdeps/unix/sysv/aix/bits/types.h +++ b/sysdeps/unix/sysv/aix/bits/types.h @@ -71,7 +71,7 @@ typedef int __pid_t; /* Type of process identifications. */ typedef long int __ssize_t; /* Type of a byte count, or error. */ typedef __u_long __rlim_t; /* Type of resource counts. */ typedef __u_quad_t __rlim64_t; /* Type of resource counts (LFS). */ -typedef __u_long __id_t; /* General type for ID. */ +typedef unsigned int __id_t; /* General type for ID. */ typedef struct { @@ -82,7 +82,7 @@ typedef struct typedef long int __daddr_t; /* The type of a disk address. */ typedef char *__caddr_t; typedef long int __time_t; -typedef __u_long __useconds_t; +typedef unsigned int __useconds_t; typedef int __suseconds_t; typedef long int __swblk_t; /* Type of a swap block maybe? */ @@ -128,7 +128,7 @@ typedef int __t_scalar_t; typedef unsigned int __t_uscalar_t; /* Duplicates info from stdint.h but this is used in unistd.h. */ -typedef int __intptr_t; +typedef signed long __intptr_t; /* Duplicate info from sys/socket.h. */ typedef unsigned int __socklen_t; From 85bdccdbd293eb72027ac5705c5f33cdbd243180 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 24 Aug 2001 08:43:21 +0000 Subject: [PATCH 2662/4487] Define elf_machine_rel_relative. Minor optimizations. --- sysdeps/alpha/dl-machine.h | 21 +++++++++++++++++-- sysdeps/arm/dl-machine.h | 28 +++++++++++++++++++------- sysdeps/cris/dl-machine.h | 41 +++++++++++++++++--------------------- sysdeps/hppa/dl-machine.h | 7 +++++++ sysdeps/m68k/dl-machine.h | 17 ++++++++++++---- sysdeps/mips/dl-machine.h | 15 +++++++++++--- 6 files changed, 90 insertions(+), 39 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 1634e96950..e16f046cb7 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -480,7 +480,7 @@ elf_machine_rela (struct link_map *map, /* We cannot use a switch here because we cannot locate the switch jump table until we've self-relocated. */ - if (r_type == R_ALPHA_RELATIVE) + if (__builtin_expect (r_type == R_ALPHA_RELATIVE, 0)) { #ifndef RTLD_BOOTSTRAP /* Already done in dynamic linker. */ @@ -501,7 +501,7 @@ elf_machine_rela (struct link_map *map, } } #ifndef RTLD_BOOTSTRAP - else if (r_type == R_ALPHA_NONE) + else if (__builtin_expect (r_type == R_ALPHA_NONE, 0)) return; #endif else @@ -547,6 +547,23 @@ elf_machine_rela (struct link_map *map, } } +static inline void +elf_machine_rel_relative (Elf64_Addr l_addr, const Elf64_Rel *reloc, + Elf64_Addr *const reloc_addr) +{ + /* XXX Make some timings. Maybe it's preverable to test for + unaligned access and only do it the complex way if necessary. */ + void *reloc_addr_1 = reloc_addr; + Elf64_Addr reloc_addr_val; + + /* Load value without causing unaligned trap. */ + memcpy (&reloc_addr_val, reloc_addr_1, 8); + reloc_addr_val += l_addr; + + /* Store value without causing unaligned trap. */ + memcpy (reloc_addr_1, &reloc_addr_val, 8); +} + static inline void elf_machine_lazy_rel (struct link_map *map, Elf64_Addr l_addr, const Elf64_Rela *reloc) diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 24fe366784..7dfed999d0 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -412,21 +412,27 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, const Elf32_Sym *sym, const struct r_found_version *version, Elf32_Addr *const reloc_addr) { - if (ELF32_R_TYPE (reloc->r_info) == R_ARM_RELATIVE) + const unsigned int r_type = ELF32_R_TYPE (reloc->r_info); + + if (__builtin_expect (r_type == R_ARM_RELATIVE, 0)) { #ifndef RTLD_BOOTSTRAP if (map != &_dl_rtld_map) /* Already done in rtld itself. */ #endif *reloc_addr += map->l_addr; } - else if (ELF32_R_TYPE (reloc->r_info) != R_ARM_NONE) +#ifndef RTLD_BOOTSTRAP + else if (__builtin_expect (r_type == R_ARM_NONE, 0)) + return; +#endif + else { const Elf32_Sym *const refsym = sym; - Elf32_Addr value = RESOLVE (&sym, version, ELF32_R_TYPE (reloc->r_info)); + Elf32_Addr value = RESOLVE (&sym, version, reloc->r_type); if (sym) value += sym->st_value; - switch (ELF32_R_TYPE (reloc->r_info)) + switch (r_type) { case R_ARM_COPY: if (sym == NULL) @@ -505,22 +511,30 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, } break; default: - _dl_reloc_bad_type (map, ELF32_R_TYPE (reloc->r_info), 0); + _dl_reloc_bad_type (map, r_type, 0); break; } } } +static inline void +elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rel *reloc, + Elf32_Addr *const reloc_addr) +{ + *reloc_addr += l_addr; +} + static inline void elf_machine_lazy_rel (struct link_map *map, Elf32_Addr l_addr, const Elf32_Rel *reloc) { Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset); + const unsigned int r_type = ELF32_R_TYPE (reloc->r_info); /* Check for unexpected PLT reloc type. */ - if (ELF32_R_TYPE (reloc->r_info) == R_ARM_JUMP_SLOT) + if (__builtin_expect (r_type == R_ARM_JUMP_SLOT, 1)) *reloc_addr += l_addr; else - _dl_reloc_bad_type (map, ELF32_R_TYPE (reloc->r_info), 1); + _dl_reloc_bad_type (map, r_type, 1); } #endif /* RESOLVE */ diff --git a/sysdeps/cris/dl-machine.h b/sysdeps/cris/dl-machine.h index c6d2558e6f..0813f70ec6 100644 --- a/sysdeps/cris/dl-machine.h +++ b/sysdeps/cris/dl-machine.h @@ -284,40 +284,28 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, const Elf32_Sym *sym, const struct r_found_version *version, Elf32_Addr *const reloc_addr) { -#ifndef RTLD_BOOTSTRAP - /* This is defined in rtld.c, but nowhere in the static libc.a; make the - reference weak so static programs can still link. This declaration - cannot be done when compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP) - because rtld.c contains the common defn for _dl_rtld_map, which is - incompatible with a weak decl in the same file. */ - weak_extern (_dl_rtld_map); -#endif + const unsigned int r_type = ELF32_R_TYPE (reloc->r_info); - if (ELF32_R_TYPE (reloc->r_info) == R_CRIS_RELATIVE) - { -#ifndef RTLD_BOOTSTRAP - if (map != &_dl_rtld_map) /* Already done in rtld itself. */ -#endif - *reloc_addr = map->l_addr + reloc->r_addend; - } + if (__builtin_expect (r_type == R_CRIS_RELATIVE, 0)) + *reloc_addr = map->l_addr + reloc->r_addend; else { #ifndef RTLD_BOOTSTRAP const Elf32_Sym *const refsym = sym; #endif Elf32_Addr value; - if (sym->st_shndx != SHN_UNDEF && - ELF32_ST_BIND (sym->st_info) == STB_LOCAL) + if (sym->st_shndx != SHN_UNDEF + && ELF32_ST_BIND (sym->st_info) == STB_LOCAL) value = map->l_addr; else { - value = RESOLVE (&sym, version, ELF32_R_TYPE (reloc->r_info)); + value = RESOLVE (&sym, version, r_type); if (sym) value += sym->st_value; } value += reloc->r_addend; /* Assume copy relocs have zero addend. */ - switch (ELF32_R_TYPE (reloc->r_info)) + switch (r_type) { #ifndef RTLD_BOOTSTRAP case R_CRIS_COPY: @@ -370,23 +358,30 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, break; #if !defined RTLD_BOOTSTRAP || defined _NDEBUG default: - _dl_reloc_bad_type (map, ELFW(R_TYPE) (reloc->r_info), 0); + _dl_reloc_bad_type (map, r_type, 0); break; #endif } } } +static inline void +elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, + Elf32_Addr *const reloc_addr) +{ + *reloc_addr = l_addr + reloc->r_addend; +} + static inline void elf_machine_lazy_rel (struct link_map *map, Elf32_Addr l_addr, const Elf32_Rela *reloc) { Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset); - if (__builtin_expect (ELF32_R_TYPE (reloc->r_info), R_CRIS_JUMP_SLOT) - == R_CRIS_JUMP_SLOT) + const unsigned int r_type = ELF32_R_TYPE (reloc->r_info); + if (__builtin_expect (r_type == R_CRIS_JUMP_SLOT, 1)) *reloc_addr += l_addr; else - _dl_reloc_bad_type (map, ELF32_R_TYPE (reloc->r_info), 1); + _dl_reloc_bad_type (map, r_type, 1); } #endif /* RESOLVE */ diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h index e8e2ab20a1..bc37986082 100644 --- a/sysdeps/hppa/dl-machine.h +++ b/sysdeps/hppa/dl-machine.h @@ -628,6 +628,13 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, *reloc_addr = value; } +static inline void +elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, + Elf32_Addr *const reloc_addr) +{ + /* XXX Nothing to do. There is no relative relocation, right? */ +} + static inline void elf_machine_lazy_rel (struct link_map *map, Elf32_Addr l_addr, const Elf32_Rela *reloc) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index c4849b078c..e3a5a24586 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -232,16 +232,18 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, const Elf32_Sym *sym, const struct r_found_version *version, Elf32_Addr *const reloc_addr) { - if (ELF32_R_TYPE (reloc->r_info) == R_68K_RELATIVE) + const unsigned int r_type = ELF32_R_TYPE (reloc->r_info); + + if (__builtin_expect (r_type == R_68K_RELATIVE, 0)) *reloc_addr = map->l_addr + reloc->r_addend; else { const Elf32_Sym *const refsym = sym; - Elf32_Addr value = RESOLVE (&sym, version, ELF32_R_TYPE (reloc->r_info)); + Elf32_Addr value = RESOLVE (&sym, version, r_type); if (sym) value += sym->st_value; - switch (ELF32_R_TYPE (reloc->r_info)) + switch (r_type) { case R_68K_COPY: if (sym == NULL) @@ -290,12 +292,19 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, case R_68K_NONE: /* Alright, Wilbur. */ break; default: - _dl_reloc_bad_type (map, ELF32_R_TYPE (reloc->r_info), 0); + _dl_reloc_bad_type (map, r_type, 0); break; } } } +static inline void +elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, + Elf32_Addr *const reloc_addr) +{ + *reloc_addr = l_addr + reloc->r_addend; +} + static inline void elf_machine_lazy_rel (struct link_map *map, Elf32_Addr l_addr, const Elf32_Rela *reloc) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 87d7cbb5d5..340cd1750a 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. MIPS version. - Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Kazumoto Kojima . @@ -477,6 +477,8 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, const ElfW(Sym) *sym, const struct r_found_version *version, ElfW(Addr) *const reloc_addr) { + const unsigned long int r_type = ELFW(R_TYPE) (reloc->r_info); + #ifndef RTLD_BOOTSTRAP /* This is defined in rtld.c, but nowhere in the static libc.a; make the reference weak so static programs can still link. This @@ -487,7 +489,7 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, weak_extern (_dl_rtld_map); #endif - switch (ELFW(R_TYPE) (reloc->r_info)) + switch (r_type) { case R_MIPS_REL32: { @@ -528,11 +530,18 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, case R_MIPS_NONE: /* Alright, Wilbur. */ break; default: - _dl_reloc_bad_type (map, ELFW(R_TYPE) (reloc->r_info), 0); + _dl_reloc_bad_type (map, r_type, 0); break; } } +static inline void +elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, + Elf32_Addr *const reloc_addr) +{ + /* XXX Nothing to do. There is no relative relocation, right? */ +} + static inline void elf_machine_lazy_rel (struct link_map *map, ElfW(Addr) l_addr, const ElfW(Rel) *reloc) From 638c8659a785692618b0134622b53d76a15554e9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 24 Aug 2001 14:51:50 +0000 Subject: [PATCH 2663/4487] (elf_machine_rela_relative): Rename from elf_machine_rel_relative. --- sysdeps/cris/dl-machine.h | 4 ++-- sysdeps/hppa/dl-machine.h | 4 ++-- sysdeps/m68k/dl-machine.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sysdeps/cris/dl-machine.h b/sysdeps/cris/dl-machine.h index 0813f70ec6..ce8dfc6d4e 100644 --- a/sysdeps/cris/dl-machine.h +++ b/sysdeps/cris/dl-machine.h @@ -366,8 +366,8 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, } static inline void -elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, - Elf32_Addr *const reloc_addr) +elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, + Elf32_Addr *const reloc_addr) { *reloc_addr = l_addr + reloc->r_addend; } diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h index bc37986082..15e1c85b39 100644 --- a/sysdeps/hppa/dl-machine.h +++ b/sysdeps/hppa/dl-machine.h @@ -629,8 +629,8 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, } static inline void -elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, - Elf32_Addr *const reloc_addr) +elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, + Elf32_Addr *const reloc_addr) { /* XXX Nothing to do. There is no relative relocation, right? */ } diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index e3a5a24586..b0e29274cc 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -299,8 +299,8 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, } static inline void -elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, - Elf32_Addr *const reloc_addr) +elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, + Elf32_Addr *const reloc_addr) { *reloc_addr = l_addr + reloc->r_addend; } From b934c935cba113b39e42586c4376aa5cdde2e256 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 24 Aug 2001 14:53:03 +0000 Subject: [PATCH 2664/4487] (elf_machine_rela_relative): Rename from elf_machine_rel_relative. Fix argument types. --- sysdeps/alpha/dl-machine.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index e16f046cb7..37e8136be8 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -548,8 +548,8 @@ elf_machine_rela (struct link_map *map, } static inline void -elf_machine_rel_relative (Elf64_Addr l_addr, const Elf64_Rel *reloc, - Elf64_Addr *const reloc_addr) +elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc, + Elf64_Addr *const reloc_addr) { /* XXX Make some timings. Maybe it's preverable to test for unaligned access and only do it the complex way if necessary. */ From 335e9a00db5d553e44e71dcc47686a1658259ef9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 24 Aug 2001 14:53:23 +0000 Subject: [PATCH 2665/4487] (elf_machine_rel_relative): Use ElfW(Rel) in argument. --- sysdeps/mips/dl-machine.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 340cd1750a..878e27d317 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -536,8 +536,8 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, } static inline void -elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, - Elf32_Addr *const reloc_addr) +elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc, + ElfW(Addr) *const reloc_addr) { /* XXX Nothing to do. There is no relative relocation, right? */ } From 4b5c9edf2eee697919af6e77c221f3a28798ac4c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 24 Aug 2001 14:57:45 +0000 Subject: [PATCH 2666/4487] (elf_machine_rel_relative): New function. --- sysdeps/mips/mips64/dl-machine.h | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h index 3ecb3c2afc..eda94c2203 100644 --- a/sysdeps/mips/mips64/dl-machine.h +++ b/sysdeps/mips/mips64/dl-machine.h @@ -1,5 +1,5 @@ -/* Machine-dependent ELF dynamic relocation inline functions. MIPS version. - Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc. +/* Machine-dependent ELF dynamic relocation inline functions. MIPS64 version. + Copyright (C) 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Kazumoto Kojima . @@ -530,10 +530,11 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, const ElfW(Sym) *sym, const struct r_found_version *version, ElfW(Addr) *const reloc_addr) { + const unsigned long int r_type = ELFW(R_TYPE) (reloc->r_info); ElfW(Addr) loadbase; ElfW(Addr) undo __attribute__ ((unused)); - switch (ELFW(R_TYPE) (reloc->r_info)) + switch (r_type) { case R_MIPS_REL32: { @@ -565,14 +566,23 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, *reloc_addr += (sym ? (loadbase + sym->st_value) : 0) - undo; } break; +#ifndef RTLD_BOOTSTRAP case R_MIPS_NONE: /* Alright, Wilbur. */ break; +#endif default: - _dl_reloc_bad_type (map, ELFW(R_TYPE) (reloc->r_info), 0); + _dl_reloc_bad_type (map, r_type, 0); break; } } +static inline void +elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc, + ElfW(Addr) *const reloc_addr) +{ + /* XXX Nothing to do. There is no relative relocation, right? */ +} + static inline void elf_machine_lazy_rel (struct link_map *map, ElfW(Addr) l_addr, const ElfW(Rel) *reloc) From fa5c1c570d1f689d53c6d4c1b5f2dc6acd712978 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 24 Aug 2001 18:27:55 +0000 Subject: [PATCH 2667/4487] 2001-08-24 Maciej W. Rozycki macro@ds2.pg.gda.pl * sysdeps/unix/sysv/linux/mips/configure.in: Define AC_SUBST to empty to prevent junk from being generated. sysdeps/unix/sysv/linux/mips/configure: Regenerated. --- sysdeps/unix/sysv/linux/mips/configure | 1 - sysdeps/unix/sysv/linux/mips/configure.in | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/configure b/sysdeps/unix/sysv/linux/mips/configure index 38a9374875..fb71310a1f 100644 --- a/sysdeps/unix/sysv/linux/mips/configure +++ b/sysdeps/unix/sysv/linux/mips/configure @@ -56,4 +56,3 @@ if test $ac_verc_fail = yes; then *** the FAQ and INSTALL documents." 1>&2 fi -s%@AS@%$AS%g diff --git a/sysdeps/unix/sysv/linux/mips/configure.in b/sysdeps/unix/sysv/linux/mips/configure.in index e5c301db48..81515a52f5 100644 --- a/sysdeps/unix/sysv/linux/mips/configure.in +++ b/sysdeps/unix/sysv/linux/mips/configure.in @@ -2,6 +2,7 @@ sinclude(./aclocal.m4)dnl Autoconf lossage GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. # Local configure fragment for sysdeps/unix/sysv/linux/mips. +define([AC_SUBST])dnl Prevent junk from being appended due to no AC_OUTPUT AC_CHECK_PROG_VER(AS, $AS, --version, [GNU assembler.* \([0-9]*\.[0-9.]*\(-ia64-[0-9]*\)*\)], [2.11.90.0.[5-9]* | 2.11.90.[1-9]* | 2.11.9[1-9]* | 2.11.[1-9]* | 2.1[2-9]*| 2.[2-9]*], From 5c6029e5c0afae4758af285e8a6bcac43ea24fe7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 26 Aug 2001 22:26:38 +0000 Subject: [PATCH 2668/4487] (elf_machine_lookup_noplt_p, elf_machine_lookup_noexec_p): Remove. (elf_machine_type_class): Define. --- sysdeps/alpha/dl-machine.h | 14 +++++++------- sysdeps/arm/dl-machine.h | 14 +++++++------- sysdeps/cris/dl-machine.h | 14 +++++++------- sysdeps/hppa/dl-machine.h | 16 ++++++++-------- sysdeps/m68k/dl-machine.h | 14 +++++++------- sysdeps/mips/dl-machine.h | 3 +-- sysdeps/mips/mips64/dl-machine.h | 3 +-- 7 files changed, 38 insertions(+), 40 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 37e8136be8..64cca5c1fd 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -351,13 +351,13 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) #define RTLD_START_SPECIAL_INIT /* nothing */ #endif -/* Nonzero iff TYPE describes relocation of a PLT entry, so - PLT entries should not be allowed to define the value. */ -#define elf_machine_lookup_noplt_p(type) ((type) == R_ALPHA_JMP_SLOT) - -/* Nonzero iff TYPE should not be allowed to resolve to one of - the main executable's symbols, as for a COPY reloc, which we don't use. */ -#define elf_machine_lookup_noexec_p(type) (0) +/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so + PLT entries should not be allowed to define the value. + ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one + of the main executable's symbols, as for a COPY reloc, which we don't + use. */ +#define elf_machine_type_class(type) \ + (((type) == R_ALPHA_JMP_SLOT) * ELF_RTYPE_CLASS_PLT) /* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */ #define ELF_MACHINE_JMP_SLOT R_ALPHA_JMP_SLOT diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 7dfed999d0..2a4ce9fb01 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -323,13 +323,13 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) .previous\n\ "); -/* Nonzero iff TYPE should not be allowed to resolve to one of - the main executable's symbols, as for a COPY reloc. */ -#define elf_machine_lookup_noexec_p(type) ((type) == R_ARM_COPY) - -/* Nonzero iff TYPE describes relocation of a PLT entry, so - PLT entries should not be allowed to define the value. */ -#define elf_machine_lookup_noplt_p(type) ((type) == R_ARM_JUMP_SLOT) +/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so + PLT entries should not be allowed to define the value. + ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one + of the main executable's symbols, as for a COPY reloc. */ +#define elf_machine_type_class(type) \ + ((((type) == R_ARM_JUMP_SLOT) * ELF_RTYPE_CLASS_PLT) \ + | (((type) == R_ARM_COPY) * ELF_RTYPE_CLASS_COPY)) /* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */ #define ELF_MACHINE_JMP_SLOT R_ARM_JUMP_SLOT diff --git a/sysdeps/cris/dl-machine.h b/sysdeps/cris/dl-machine.h index ce8dfc6d4e..e4778e38a1 100644 --- a/sysdeps/cris/dl-machine.h +++ b/sysdeps/cris/dl-machine.h @@ -228,13 +228,13 @@ asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \ .size _dl_start_user, . - _dl_start_user .previous"); -/* Nonzero iff TYPE describes a relocation that should - skip the executable when looking up the symbol value. */ -#define elf_machine_lookup_noexec_p(type) ((type) == R_CRIS_COPY) - -/* Nonzero iff TYPE describes relocation of a PLT entry, so - PLT entries should not be allowed to define the value. */ -#define elf_machine_lookup_noplt_p(type) ((type) == R_CRIS_JUMP_SLOT) +/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so + PLT entries should not be allowed to define the value. + ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one + of the main executable's symbols, as for a COPY reloc. */ +#define elf_machine_type_class(type) \ + ((((type) == R_CRIS_JUMP_SLOT) * ELF_RTYPE_CLASS_PLT) \ + | (((type) == R_CRIS_COPY) * ELF_RTYPE_CLASS_COPY)) /* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */ #define ELF_MACHINE_JMP_SLOT R_CRIS_JUMP_SLOT diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h index 15e1c85b39..d13f15b3e5 100644 --- a/sysdeps/hppa/dl-machine.h +++ b/sysdeps/hppa/dl-machine.h @@ -454,14 +454,14 @@ asm ( \ #endif -/* Nonzero iff TYPE describes a relocation that should - skip the executable when looking up the symbol value. */ -#define elf_machine_lookup_noexec_p(type) ((type) == R_PARISC_COPY) - -/* Nonzero iff TYPE describes relocation of a PLT entry, so - PLT entries should not be allowed to define the value. */ -#define elf_machine_lookup_noplt_p(type) ((type) == R_PARISC_IPLT \ - || (type) == R_PARISC_EPLT) +/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so + PLT entries should not be allowed to define the value. + ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one + of the main executable's symbols, as for a COPY reloc. */ +#define elf_machine_type_class(type) \ + ((((type) == R_PARISC_IPLT || (type) == R_PARISC_EPLT) \ + * ELF_RTYPE_CLASS_PLT) \ + | (((type) == R_PARISC_COPY) * ELF_RTYPE_CLASS_COPY)) /* Used by ld.so for ... something ... */ #define ELF_MACHINE_JMP_SLOT R_PARISC_IPLT diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index b0e29274cc..d9c819429b 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -189,13 +189,13 @@ asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \ .size _dl_start_user, . - _dl_start_user .previous"); -/* Nonzero iff TYPE describes a relocation that should - skip the executable when looking up the symbol value. */ -#define elf_machine_lookup_noexec_p(type) ((type) == R_68K_COPY) - -/* Nonzero iff TYPE describes relocation of a PLT entry, so - PLT entries should not be allowed to define the value. */ -#define elf_machine_lookup_noplt_p(type) ((type) == R_68K_JMP_SLOT) +/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so + PLT entries should not be allowed to define the value. + ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one + of the main executable's symbols, as for a COPY reloc. */ +#define elf_machine_type_class(type) \ + ((((type) == R_68K_JMP_SLOT) * ELF_RTYPE_CLASS_PLT) \ + | (((type) == R_68K_COPY) * ELF_RTYPE_CLASS_COPY)) /* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */ #define ELF_MACHINE_JMP_SLOT R_68K_JMP_SLOT diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 878e27d317..cb3fc1c51e 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -54,8 +54,7 @@ This makes no sense on MIPS but we have to define this to R_MIPS_REL32 to avoid the asserts in dl-lookup.c from blowing. */ #define ELF_MACHINE_JMP_SLOT R_MIPS_REL32 -#define elf_machine_lookup_noplt_p(type) (1) -#define elf_machine_lookup_noexec_p(type) (0) +#define elf_machine_type_class(type) ELF_RTYPE_CLASS_PLT /* Translate a processor specific dynamic tag to the index in l_info array. */ diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h index eda94c2203..34a81615bb 100644 --- a/sysdeps/mips/mips64/dl-machine.h +++ b/sysdeps/mips/mips64/dl-machine.h @@ -45,8 +45,7 @@ This makes no sense on MIPS but we have to define this to R_MIPS_REL32 to avoid the asserts in dl-lookup.c from blowing. */ #define ELF_MACHINE_JMP_SLOT R_MIPS_REL32 -#define elf_machine_lookup_noplt_p(type) (1) -#define elf_machine_lookup_noexec_p(type) (0) +#define elf_machine_type_class(type) ELF_RTYPE_CLASS_PLT /* Translate a processor specific dynamic tag to the index in l_info array. */ From 560c47613914822c4107d4a93ba48ed0e93829f6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 29 Aug 2001 18:48:49 +0000 Subject: [PATCH 2669/4487] (__dl_runtime_resolve): Pass ELF_RTYPE_CLASS_PLT, instead of R_MIPS_REL32, to _dl_lookup_versioned_symbol () and _dl_lookup_symbol (). --- sysdeps/mips/dl-machine.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index cb3fc1c51e..e066aad015 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -301,14 +301,14 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \ { \ value = _dl_lookup_versioned_symbol(strtab + sym->st_name, l, \ &sym, l->l_scope, version,\ - R_MIPS_REL32, 0); \ + ELF_RTYPE_CLASS_PLT, 0); \ break; \ } \ /* Fall through. */ \ } \ case 0: \ value = _dl_lookup_symbol (strtab + sym->st_name, l, &sym, \ - l->l_scope, R_MIPS_REL32, 0); \ + l->l_scope, ELF_RTYPE_CLASS_PLT, 0); \ } \ \ /* Currently value contains the base load address of the object \ From 2d61dc3cdfe94557b83a7eca1b81ebc241697b12 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 29 Aug 2001 21:12:09 +0000 Subject: [PATCH 2670/4487] Updated. --- sysdeps/m68k/fpu/libm-test-ulps | 86 +++++++++++++-------------------- 1 file changed, 33 insertions(+), 53 deletions(-) diff --git a/sysdeps/m68k/fpu/libm-test-ulps b/sysdeps/m68k/fpu/libm-test-ulps index ea8789f4bd..a7372ab46b 100644 --- a/sysdeps/m68k/fpu/libm-test-ulps +++ b/sysdeps/m68k/fpu/libm-test-ulps @@ -48,9 +48,6 @@ float: 1 ifloat: 1 # cacos -Test "Imaginary part of: cacos (-2 - 3 i) == 2.1414491111159960199416055713254211 + 1.9833870299165354323470769028940395 i": -ildouble: 1 -ldouble: 1 Test "Real part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i": double: 1 float: 1 @@ -87,16 +84,11 @@ ildouble: 1 ldouble: 1 # casin -Test "Imaginary part of: casin (-2 - 3 i) == -0.57065278432109940071028387968566963 - 1.9833870299165354323470769028940395 i": -ildouble: 1 -ldouble: 1 Test "Real part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i": double: 3 float: 2 idouble: 3 ifloat: 2 -ildouble: 1 -ldouble: 1 Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i": float: 2 ifloat: 2 @@ -109,25 +101,25 @@ double: 6 float: 19 idouble: 6 ifloat: 19 -ildouble: 6 -ldouble: 6 +ildouble: 5 +ldouble: 5 Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": double: 13 float: 1 idouble: 13 ifloat: 1 -ildouble: 7 -ldouble: 7 +ildouble: 6 +ldouble: 6 Test "Real part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i": double: 1 idouble: 1 -ildouble: 3 -ldouble: 3 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i": float: 2 ifloat: 2 -ildouble: 3 -ldouble: 3 +ildouble: 2 +ldouble: 2 # catan Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": @@ -135,27 +127,20 @@ double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 7 -ldouble: 7 Test "Real part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i": ildouble: 1 ldouble: 1 Test "Imaginary part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i": float: 1 ifloat: 1 -ildouble: 1 -ldouble: 1 # catanh Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": -ildouble: 2 -ldouble: 2 +ildouble: 1 +ldouble: 1 Test "Real part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i": ildouble: 1 -ldouble: 2 -Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i": -ildouble: 2 -ldouble: 2 +ldouble: 1 # cbrt Test "cbrt (-0.001) == -0.1": @@ -227,11 +212,6 @@ Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012345168864293 float: 2 ifloat: 2 -# clog -Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i": -ildouble: 1 -ldouble: 1 - # clog10 Test "Real part of: clog10 (-2 - 3 i) == 0.5569716761534183846 - 0.9375544629863747085 i": ildouble: 1 @@ -306,9 +286,9 @@ Test "Real part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i": float: 0.5 ifloat: 0.5 Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i": -double: 1.103 +double: 1.1031 float: 2.5333 -idouble: 1.103 +idouble: 1.1031 ifloat: 2.5333 ildouble: 1 ldouble: 1 @@ -489,12 +469,22 @@ float: 1 ifloat: 1 # j0 +Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 Test "j0 (1.5) == 0.51182767173591812875": float: 1 ifloat: 1 Test "j0 (10.0) == -0.24593576445134833520": double: 1 idouble: 1 +Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 # j1 Test "j1 (-1.0) == -0.44005058574493351596": @@ -958,8 +948,6 @@ double: 3 float: 2 idouble: 3 ifloat: 2 -ildouble: 1 -ldouble: 1 Function: Imaginary part of "casin": float: 2 @@ -972,16 +960,16 @@ double: 6 float: 19 idouble: 6 ifloat: 19 -ildouble: 6 -ldouble: 6 +ildouble: 5 +ldouble: 5 Function: Imaginary part of "casinh": double: 13 float: 2 idouble: 13 ifloat: 2 -ildouble: 7 -ldouble: 7 +ildouble: 6 +ldouble: 6 Function: Real part of "catan": ildouble: 1 @@ -992,16 +980,10 @@ double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 7 -ldouble: 7 Function: Real part of "catanh": -ildouble: 2 -ldouble: 2 - -Function: Imaginary part of "catanh": -ildouble: 2 -ldouble: 2 +ildouble: 1 +ldouble: 1 Function: "cbrt": double: 1 @@ -1045,10 +1027,6 @@ Function: Imaginary part of "cexp": float: 2 ifloat: 2 -Function: Imaginary part of "clog": -ildouble: 1 -ldouble: 1 - Function: Real part of "clog10": double: 1 float: 1 @@ -1086,9 +1064,9 @@ ildouble: 5 ldouble: 5 Function: Imaginary part of "cpow": -double: 1.103 +double: 1.1031 float: 6 -idouble: 1.103 +idouble: 1.1031 ifloat: 6 ildouble: 2 ldouble: 2 @@ -1182,6 +1160,8 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: "j1": float: 2 From b5fdbb191af1be2be4f3a40e02588ee584542c91 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 30 Aug 2001 20:04:34 +0000 Subject: [PATCH 2671/4487] Adjust j0 ULPs. --- sysdeps/alpha/fpu/libm-test-ulps | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sysdeps/alpha/fpu/libm-test-ulps b/sysdeps/alpha/fpu/libm-test-ulps index ce16391105..9c57a322da 100644 --- a/sysdeps/alpha/fpu/libm-test-ulps +++ b/sysdeps/alpha/fpu/libm-test-ulps @@ -448,6 +448,12 @@ ifloat: 1 Test "j0 (2.0) == 0.22389077914123566805": float: 2 ifloat: 2 +Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1" +double: 1 +idouble: 1 +Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1" +double: 1 +idouble: 1 Test "j0 (8.0) == 0.17165080713755390609": float: 1 ifloat: 1 From 703aebdd7be35bd96f2f3705aa93ec651c2f6f4e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 30 Aug 2001 20:22:48 +0000 Subject: [PATCH 2672/4487] Adjust j0 ULPs. --- sysdeps/alpha/fpu/libm-test-ulps | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysdeps/alpha/fpu/libm-test-ulps b/sysdeps/alpha/fpu/libm-test-ulps index 9c57a322da..eac5e8b7ad 100644 --- a/sysdeps/alpha/fpu/libm-test-ulps +++ b/sysdeps/alpha/fpu/libm-test-ulps @@ -451,9 +451,13 @@ ifloat: 2 Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1" double: 1 idouble: 1 +float: 1 +ifloat: 1 Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1" double: 1 idouble: 1 +float: 1 +ifloat: 1 Test "j0 (8.0) == 0.17165080713755390609": float: 1 ifloat: 1 From 952ec50e9effdc09317b31491969dfce04d76661 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 30 Aug 2001 23:09:10 +0000 Subject: [PATCH 2673/4487] (elf_machine_rela): Don't handle R_ALPHA_RELATIVE if RTLD_BOOTSTRAP and HAVE_Z_COMBRELOC. Only check for rtld map if RTLD_BOOTSTRAP nor HAVE_Z_COMBRELOC is defined. --- sysdeps/alpha/dl-machine.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 64cca5c1fd..a97bdf4501 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -468,7 +468,7 @@ elf_machine_rela (struct link_map *map, { unsigned long int const r_type = ELF64_R_TYPE (reloc->r_info); -#ifndef RTLD_BOOTSTRAP +#if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC /* This is defined in rtld.c, but nowhere in the static libc.a; make the reference weak so static programs can still link. This declaration cannot be done when compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP) @@ -480,12 +480,13 @@ elf_machine_rela (struct link_map *map, /* We cannot use a switch here because we cannot locate the switch jump table until we've self-relocated. */ +#if !defined RTLD_BOOTSTRAP || !defined HAVE_Z_COMBRELOC if (__builtin_expect (r_type == R_ALPHA_RELATIVE, 0)) { -#ifndef RTLD_BOOTSTRAP +# if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC /* Already done in dynamic linker. */ if (map != &_dl_rtld_map) -#endif +# endif { /* XXX Make some timings. Maybe it's preverable to test for unaligned access and only do it the complex way if necessary. */ @@ -500,11 +501,12 @@ elf_machine_rela (struct link_map *map, memcpy (reloc_addr_1, &reloc_addr_val, 8); } } -#ifndef RTLD_BOOTSTRAP +# ifndef RTLD_BOOTSTRAP else if (__builtin_expect (r_type == R_ALPHA_NONE, 0)) return; -#endif +# endif else +#endif { Elf64_Addr loadbase, sym_value; From 6222fd02e797178bf371dfd696693f935eb96068 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 1 Sep 2001 05:32:08 +0000 Subject: [PATCH 2674/4487] (elf_machine_rela): Remove unused code. Don't add old memory content for R_ALPHA_REFQUAD. --- sysdeps/alpha/dl-machine.h | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index a97bdf4501..2a414ca448 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -522,24 +522,7 @@ elf_machine_rela (struct link_map *map, else if (r_type == R_ALPHA_REFQUAD) { void *reloc_addr_1 = reloc_addr; - Elf64_Addr reloc_addr_val; - /* Load value without causing unaligned trap. */ - memcpy (&reloc_addr_val, reloc_addr_1, 8); - sym_value += reloc_addr_val; - if (map == &_dl_rtld_map) - { - /* Undo the relocation done here during bootstrapping. - Now we will relocate anew, possibly using a binding - found in the user program or a loaded library rather - than the dynamic linker's built-in definitions used - while loading those libraries. */ - const Elf64_Sym *const dlsymtab - = (void *) D_PTR (map, l_info[DT_SYMTAB]); - sym_value -= map->l_addr; - sym_value -= dlsymtab[ELF64_R_SYM(reloc->r_info)].st_value; - sym_value -= reloc->r_addend; - } /* Store value without causing unaligned trap. */ memcpy (reloc_addr_1, &sym_value, 8); } From 9f888890dee20fef939b7645395d373c01c3db9f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 1 Sep 2001 06:08:44 +0000 Subject: [PATCH 2675/4487] Support for high-precision timers on Alpha. --- sysdeps/alpha/hp-timing.h | 118 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 sysdeps/alpha/hp-timing.h diff --git a/sysdeps/alpha/hp-timing.h b/sysdeps/alpha/hp-timing.h new file mode 100644 index 0000000000..ccae06b487 --- /dev/null +++ b/sysdeps/alpha/hp-timing.h @@ -0,0 +1,118 @@ +/* High precision, low overhead timing functions. Alpha version. + Copyright (C) 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson , 2001. + + 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 _HP_TIMING_H +#define _HP_TIMING_H 1 + +#include +#include +#include + +/* The macros defined here use the timestamp counter in IA-64. They + provide a very accurate way to measure the time with very little + overhead. The time values themself have no real meaning, only + differences are interesting. + + The list of macros we need includes the following: + + - HP_TIMING_AVAIL: test for availability. + + - HP_TIMING_INLINE: this macro is non-zero if the functionality is not + implemented using function calls but instead uses some inlined code + which might simply consist of a few assembler instructions. We have to + know this since we might want to use the macros here in places where we + cannot make function calls. + + - hp_timing_t: This is the type for variables used to store the time + values. + + - HP_TIMING_ZERO: clear `hp_timing_t' object. + + - HP_TIMING_NOW: place timestamp for current time in variable given as + parameter. + + - HP_TIMING_DIFF_INIT: do whatever is necessary to be able to use the + HP_TIMING_DIFF macro. + + - HP_TIMING_DIFF: compute difference between two times and store it + in a third. Source and destination might overlap. + + - HP_TIMING_ACCUM: add time difference to another variable. This might + be a bit more complicated to implement for some platforms as the + operation should be thread-safe and 64bit arithmetic on 32bit platforms + is not. + + - HP_TIMING_ACCUM_NT: this is the variant for situations where we know + there are no threads involved. + + - HP_TIMING_PRINT: write decimal representation of the timing value into + the given string. This operation need not be inline even though + HP_TIMING_INLINE is specified. +*/ + +/* We always have the timestamp register, but it's got only a 4 second + range. Use it for ld.so profiling only. */ +#define HP_TIMING_AVAIL (0) +#define HP_SMALL_TIMING_AVAIL (1) + +/* We indeed have inlined functions. */ +#define HP_TIMING_INLINE (1) + +/* We use 32 bit values for the times. */ +typedef unsigned int hp_timing_t; + +/* Set timestamp value to zero. */ +#define HP_TIMING_ZERO(VAR) (VAR) = (0) + +/* The "rpcc" instruction returns a 32-bit counting half and a 32-bit + "virtual cycle counter displacement". Subtracting the two gives us + a virtual cycle count. */ +#define HP_TIMING_NOW(VAR) \ + do { \ + unsigned long int x_; \ + asm volatile ("rpcc %0" : "=r"(x_)); \ + (VAR) = (int) (x_) - (int) (x_ >> 32); \ + } while (0) + +/* ??? Two rpcc instructions can be scheduled simultaneously. */ +#define HP_TIMING_DIFF_INIT() do { } while (0) + +/* It's simple arithmetic for us. */ +#define HP_TIMING_DIFF(Diff, Start, End) (Diff) = ((End) - (Start)) + +/* ??? Don't bother, since we're only used for ld.so. */ +#define HP_TIMING_ACCUM(Sum, Diff) not implemented + +/* No threads, no extra work. */ +#define HP_TIMING_ACCUM_NT(Sum, Diff) (Sum) += (Diff) + +/* Print the time value. */ +#define HP_TIMING_PRINT(Buf, Len, Val) \ + do { \ + char __buf[20]; \ + char *__cp = _itoa_word (Val, __buf + sizeof (__buf), 10, 0); \ + int __len = (Len); \ + char *__dest = (Buf); \ + while (__len-- > 0 && __cp < __buf + sizeof (__buf)) \ + *__dest++ = *__cp++; \ + memcpy (__dest, " clock cycles", MIN (__len, sizeof (" clock cycles"))); \ + } while (0) + +#endif /* hp-timing.h */ From fed1030448c03fe4f9bdcc197deb23aa04b9e976 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 1 Sep 2001 19:23:47 +0000 Subject: [PATCH 2676/4487] Not needed anymore. --- sysdeps/alpha/elf/Dist | 2 - sysdeps/alpha/elf/Makefile | 4 -- sysdeps/alpha/elf/crtbegin.S | 92 ----------------------------------- sysdeps/alpha/elf/crtend.S | 93 ------------------------------------ 4 files changed, 191 deletions(-) delete mode 100644 sysdeps/alpha/elf/Dist delete mode 100644 sysdeps/alpha/elf/Makefile delete mode 100644 sysdeps/alpha/elf/crtbegin.S delete mode 100644 sysdeps/alpha/elf/crtend.S diff --git a/sysdeps/alpha/elf/Dist b/sysdeps/alpha/elf/Dist deleted file mode 100644 index 3e7010182b..0000000000 --- a/sysdeps/alpha/elf/Dist +++ /dev/null @@ -1,2 +0,0 @@ -crtbegin.S -crtend.S diff --git a/sysdeps/alpha/elf/Makefile b/sysdeps/alpha/elf/Makefile deleted file mode 100644 index db849bd9bf..0000000000 --- a/sysdeps/alpha/elf/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -ifeq ($(subdir), csu) -extra-objs += crtbegin.o crtend.o -install-lib += crtbegin.o crtend.o -endif diff --git a/sysdeps/alpha/elf/crtbegin.S b/sysdeps/alpha/elf/crtbegin.S deleted file mode 100644 index 08f6c04f0a..0000000000 --- a/sysdeps/alpha/elf/crtbegin.S +++ /dev/null @@ -1,92 +0,0 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Richard Henderson (rth@tamu.edu) - - 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. */ - - -/* - * Heads of the constructor/destructor lists. - */ - -/* The __*TOR_LIST__ symbols are not global because when this file is used - in a shared library, we do not want the symbol to fall over to the - application's lists. */ - -.section .ctors,"aw" - - .align 3 -__CTOR_LIST__: - .quad -1 - -.section .dtors,"aw" - - .align 3 -__DTOR_LIST__: - .quad -1 - - -/* - * Fragment of the ELF _fini routine that invokes our dtor cleanup. - */ - -.section .fini,"ax" - - /* Since the bits of the _fini function are spread across many - object files, each potentially with its own GP, we must - assume we need to load ours. Further, our .fini section - can easily be more than 4MB away from our .text bits so we - can't use bsr. */ - - br $gp,1f -1: ldgp $gp,0($gp) - jsr $26,__do_global_dtors_aux - - /* Must match the alignment we got from crti.o else we get - zero-filled holes in our _fini function and then SIGILL. */ - .align 3 - -/* - * Invoke our destructors in order. - */ - -.text - - .align 3 - .ent __do_global_dtors_aux - -__do_global_dtors_aux: - .frame $sp,16,$26,0 - /* GP already loaded in .fini */ - lda $sp,-16($sp) - stq $9,8($sp) - stq $26,0($sp) - .mask (1<<26)|(1<<9), -16 - .prologue 0 - - lda $9,__DTOR_LIST__ - br 1f -0: jsr $26,($27) -1: ldq $27,8($9) - addq $9,8,$9 - bne $27,0b - - ldq $26,0($sp) - ldq $9,8($sp) - lda $sp,16($sp) - ret - - .end __do_global_dtors_aux diff --git a/sysdeps/alpha/elf/crtend.S b/sysdeps/alpha/elf/crtend.S deleted file mode 100644 index 576b8689e2..0000000000 --- a/sysdeps/alpha/elf/crtend.S +++ /dev/null @@ -1,93 +0,0 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Richard Henderson (rth@tamu.edu) - - 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. */ - - -/* - * Tails of the constructor/destructor lists. - */ - -/* The __*TOR_END__ symbols are not global because when this file is used - in a shared library, we do not want the symbol to fall over to the - application's lists. */ - -.section .ctors,"aw" - - .align 3 -__CTOR_END__: - .quad 0 - -.section .dtors,"aw" - - .align 3 -__DTOR_END__: - .quad 0 - - -/* - * Fragment of the ELF _init routine that invokes our ctor startup - */ - -.section .init,"ax" - - /* Since the bits of the _init function are spread across many - object files, each potentially with its own GP, we must - assume we need to load ours. Further, our .init section - can easily be more than 4MB away from our .text bits so we - can't use bsr. */ - - br $gp,1f -1: ldgp $gp,0($gp) - jsr $26,__do_global_ctors_aux - - /* Must match the alignment we got from crti.o else we get - zero-filled holes in our _init function and thense SIGILL. */ - .align 3 - -/* - * Invoke our destructors in order. - */ - -.text - - .align 3 - .ent __do_global_ctors_aux - -__do_global_ctors_aux: - .frame $sp,16,$26,0 - /* GP already loaded in .init. */ - lda $sp,-16($sp) - stq $9,8($sp) - stq $26,0($sp) - .mask (1<<26)|(1<<9), -16 - .prologue 0 - - lda $9,__CTOR_END__ - br 1f -0: jsr $26,($27) -1: ldq $27,-8($9) - subq $9,8,$9 - not $27,$0 - bne $0,0b - - ldq $26,0($sp) - ldq $9,8($sp) - lda $sp,16($sp) - ret - - .end __do_global_ctors_aux From 00268a805ba7953080e5bca63d7fddf7dad94496 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 1 Sep 2001 19:24:46 +0000 Subject: [PATCH 2677/4487] Startup code for Alpha/ELF. --- sysdeps/alpha/elf/initfini.c | 98 ++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 sysdeps/alpha/elf/initfini.c diff --git a/sysdeps/alpha/elf/initfini.c b/sysdeps/alpha/elf/initfini.c new file mode 100644 index 0000000000..e1c0f1c4d6 --- /dev/null +++ b/sysdeps/alpha/elf/initfini.c @@ -0,0 +1,98 @@ +/* Special .init and .fini section support for Alpha. + Copyright (C) 2001 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. */ + +/* This file is compiled into assembly code which is then munged by a sed + script into two files: crti.s and crtn.s. + + * crti.s puts a function prologue at the beginning of the .init and .fini + sections and defines global symbols for those addresses, so they can be + called as functions. + + * crtn.s puts the corresponding function epilogues in the .init and .fini + sections. + + This differs from what would be generated by the generic code in that + we save and restore the GP within the function. In order for linker + relaxation to work, the value in the GP register on exit from a function + must be valid for the function entry point. Normally, a function is + contained within one object file and this is not an issue, provided + that the function reloads the gp after making any function calls. + However, _init and _fini are constructed from pieces of many object + files, all of which may have different GP values. So we must reload + the GP value from crti.o in crtn.o. */ + +__asm__ (" + +#include \"defs.h\" + +/*@HEADER_ENDS*/ + +/*@_init_PROLOG_BEGINS*/ + .section .init, \"ax\", @progbits + .globl _init + .ent _init +_init: + ldgp $29, 0($27) + subq $30, 16, $30 + lda $27, __gmon_start__ + stq $26, 0($30) + stq $29, 8($30) + .prologue 1 + beq $27, 1f + jsr $26, ($27), __gmon_start__ + ldq $29, 8($30) +1: + .align 3 + .end _init + .size _init, 0 +/*@_init_PROLOG_ENDS*/ + +/*@_init_EPILOG_BEGINS*/ + .section .init, \"ax\", @progbits + ldq $26, 0($30) + ldq $29, 8($30) + addq $30, 16, $30 + ret +/*@_init_EPILOG_ENDS*/ + +/*@_fini_PROLOG_BEGINS*/ + .section .fini, \"ax\", @progbits + .globl _fini + .ent _fini +_fini: + ldgp $29, 0($27) + subq $30, 16, $30 + stq $26, 0($30) + stq $29, 8($30) + .prologue 1 + .align 3 + .end _fini + .size _fini, 0 +/*@_fini_PROLOG_ENDS*/ + +/*@_fini_EPILOG_BEGINS*/ + .section .fini, \"ax\", @progbits + ldq $26, 0($30) + ldq $29, 8($30) + addq $30, 16, $30 + ret +/*@_fini_EPILOG_ENDS*/ + +/*@TRAILER_BEGINS*/ +"); From 19635181ccbadd9e1e82fc0eb99dd01bb5aa7615 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 3 Sep 2001 17:10:56 +0000 Subject: [PATCH 2678/4487] gethostname implementation for Linux/Alpha. --- sysdeps/unix/sysv/linux/alpha/gethostname.c | 47 +++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/gethostname.c diff --git a/sysdeps/unix/sysv/linux/alpha/gethostname.c b/sysdeps/unix/sysv/linux/alpha/gethostname.c new file mode 100644 index 0000000000..28846efe57 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/gethostname.c @@ -0,0 +1,47 @@ +/* Copyright (C) 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2001 + + 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. */ + +#include +#include + +#include +#include +#include + + +int +__gethostname (char *name, size_t len) +{ + int result; + + result = INLINE_SYSCALL (gethostname, 2, CHECK_N (name, len), len); + + if (result == 0 + /* See whether the string is terminated. If not we will return + an error. */ + && memchr (name, '\0', len) == NULL) + { + __set_errno (EOVERFLOW); + result = -1; + } + + return result; +} + +weak_alias (__gethostname, gethostname) From 8c2b0506ec9e5df69fd79def88de2601e12c24d8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 5 Sep 2001 00:08:11 +0000 Subject: [PATCH 2679/4487] Include . (__syscall_gethostname): Add prototype. --- sysdeps/unix/sysv/linux/alpha/gethostname.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/gethostname.c b/sysdeps/unix/sysv/linux/alpha/gethostname.c index 28846efe57..3a48afccd3 100644 --- a/sysdeps/unix/sysv/linux/alpha/gethostname.c +++ b/sysdeps/unix/sysv/linux/alpha/gethostname.c @@ -17,6 +17,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include #include #include @@ -24,6 +25,8 @@ #include #include +extern int __syscall_gethostname (char *name, size_t len); + int __gethostname (char *name, size_t len) From a3a247a8b1035bde21be868d4ef4e5cea5baed69 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 8 Sep 2001 17:13:52 +0000 Subject: [PATCH 2680/4487] Forward declare struct link_map. --- sysdeps/hppa/dl-lookupcfg.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysdeps/hppa/dl-lookupcfg.h b/sysdeps/hppa/dl-lookupcfg.h index d15732b56d..d76ea1221d 100644 --- a/sysdeps/hppa/dl-lookupcfg.h +++ b/sysdeps/hppa/dl-lookupcfg.h @@ -23,6 +23,9 @@ #define ELF_FUNCTION_PTR_IS_SPECIAL #define DL_UNMAP_IS_SPECIAL +/* Forward declaration. */ +struct link_map; + void *_dl_symbol_address (const struct link_map *map, const ElfW(Sym) *ref); #define DL_SYMBOL_ADDRESS(map, ref) _dl_symbol_address(map, ref) From 09d4f65308744ab3c2a42f4d8d29524e629f1851 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 8 Sep 2001 17:16:44 +0000 Subject: [PATCH 2681/4487] Fix usage of new _dl_signal_error() format. --- sysdeps/arm/dl-machine.h | 2 +- sysdeps/hppa/dl-fptr.c | 4 ++-- sysdeps/mips/dl-machine.h | 2 +- sysdeps/mips/mips64/dl-machine.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 2a4ce9fb01..6abac52c90 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -501,7 +501,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, topbits = newvalue & 0xfe000000; if (topbits != 0xfe000000 && topbits != 0x00000000) { - _dl_signal_error (0, map->l_name, + _dl_signal_error (0, map->l_name, NULL, "R_ARM_PC24 relocation out of range"); } } diff --git a/sysdeps/hppa/dl-fptr.c b/sysdeps/hppa/dl-fptr.c index 6cf8d37275..4f8cc8b5d1 100644 --- a/sysdeps/hppa/dl-fptr.c +++ b/sysdeps/hppa/dl-fptr.c @@ -101,7 +101,7 @@ __hppa_make_fptr (const struct link_map *sym_map, Elf32_Addr value, if (_dl_zerofd == -1) { __close (fd); - _dl_signal_error (errno, NULL, + _dl_signal_error (errno, NULL, NULL, "cannot open zero fill device"); } } @@ -110,7 +110,7 @@ __hppa_make_fptr (const struct link_map *sym_map, Elf32_Addr value, __fptr_next = __mmap (0, _dl_pagesize, PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, ANONFD, 0); if (__fptr_next == MAP_FAILED) - _dl_signal_error(errno, NULL, "cannot map page for fptr"); + _dl_signal_error(errno, NULL, NULL, "cannot map page for fptr"); __fptr_count = _dl_pagesize / sizeof (struct hppa_fptr); } f = __fptr_next++; diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index e066aad015..da9a5d3279 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -239,7 +239,7 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc) } } - _dl_signal_error (0, NULL, "cannot find runtime link map"); + _dl_signal_error (0, NULL, NULL, "cannot find runtime link map"); return NULL; } diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h index 34a81615bb..d51f1e3cb1 100644 --- a/sysdeps/mips/mips64/dl-machine.h +++ b/sysdeps/mips/mips64/dl-machine.h @@ -311,7 +311,7 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc) } } - _dl_signal_error (0, NULL, "cannot find runtime link map"); + _dl_signal_error (0, NULL, NULL, "cannot find runtime link map"); return NULL; } From 3dd5528154c385c56a34e356101cfeaf96ef603c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 8 Sep 2001 17:22:27 +0000 Subject: [PATCH 2682/4487] (aix-syscalls.o): More linker command line options. --- sysdeps/unix/sysv/aix/Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/aix/Makefile b/sysdeps/unix/sysv/aix/Makefile index 3fcf4bb3e9..2da5311091 100644 --- a/sysdeps/unix/sysv/aix/Makefile +++ b/sysdeps/unix/sysv/aix/Makefile @@ -11,11 +11,11 @@ sysdep_routines += aix-syscalls $(objpfx)aix-syscalls.o : /lib/syscalls.exp echo "static int a;" > foo.c $(CC) -c foo.c - ld -bM:SRE -bnoentry -bI:/lib/syscalls.exp -bE:/lib/syscalls.exp foo.o -o $@ + ld -bM:SRE -bpT:0x00000000 -bpD:0x00000000 -bnoentry -bI:/lib/syscalls.exp -bE:/lib/syscalls.exp foo.o -o $@ rm foo.c foo.o -endif +endif ifeq ($(subdir),misc) sysdep_routines += dl-error dl-support dl-libc dl-open dl-sym \ @@ -39,4 +39,3 @@ inhibit-glue = yes ifeq ($(subdir),timezone) CPPFLAGS-zic.c = -Dunix endif - From 51ca795a3ccc4873260aaea02daa210571152ee6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 8 Sep 2001 17:23:45 +0000 Subject: [PATCH 2683/4487] Not needed anymore. --- sysdeps/unix/sysv/aix/start.c | 294 ---------------------------------- 1 file changed, 294 deletions(-) delete mode 100644 sysdeps/unix/sysv/aix/start.c diff --git a/sysdeps/unix/sysv/aix/start.c b/sysdeps/unix/sysv/aix/start.c deleted file mode 100644 index fd4d695eaa..0000000000 --- a/sysdeps/unix/sysv/aix/start.c +++ /dev/null @@ -1,294 +0,0 @@ -/* Copyright (C) 1991, 93, 1995-1998, 2000, 2001 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. */ - - -/* Old compatibility names for C types. */ -typedef unsigned char uchar; /* sb in libc/posix/types.h */ - -#include -#include -#include -#include -#include -#include -#include - -/* The first piece of initialized data. */ -int __data_start = 0; - -#ifndef HAVE_ELF -/* Since gcc/crtstuff.c won't define it unless the ELF format is used - we will need to define it here. */ -void *__dso_handle = NULL; -#endif - -extern int errno; - -/* extern __pthread_init; */ - -typedef void (*FPV)(void); - -typedef struct crt0_info -{ - int *p_argc; - FPV threads_init; -} INFO; - - -INFO crt0_info; -int argc; -char **argv; -char **__environ; -int module_count; -caddr_t text_origin; -caddr_t data_origin; - -asm(" - .toc -LL..0: .tc argc[TC],argc -LL..1: .tc argv[TC],argv -LL..2: .tc __environ[TC],__environ -LL..3: .tc module_count[TC],module_count -LL..4: .tc text_origin[TC],text_origin -LL..5: .tc data_origin[TC],data_origin -"); - -int main (int argc,char **argv,char **__environ); -int modinit(int argc,INFO *crt0_info, int module_count, - caddr_t text_origin, caddr_t data_origin); - -void mod_init1(void *handler,__RTINIT *rti); - -__RTINIT *find_rtinit(caddr_t text_origin,caddr_t data_origin, int module_count); - -extern int *__loadx(); - -void __start(void) -{ -#ifdef __64BIT__ -asm(" - ld 17,LL..0(2) # argc - std 14,0(17) # copy reg14 to argc - ld 17,LL..1(2) # argv - std 15,0(17) # copy reg15 to argv - ld 17,LL..2(2) # envp - std 16,0(17) # copy reg16 to envp - ld 17,LL..3(2) # module_count - std 30,0(17) # copy reg30 to module_count - ld 17,LL..4(2) # text_origin - std 29,0(17) # copy reg29 to text_origin - ld 17,LL..5(2) # data_origin - std 28,0(17) # copy reg28 to data_origin -"); -#else -asm(" - lwz 17,LL..0(2) # argc - stw 3,0(17) # copy reg3 to argc - lwz 17,LL..1(2) # argv - stw 4,0(17) # copy reg4 to argv - lwz 17,LL..2(2) # envp - stw 5,0(17) # copy reg5 to envp - lwz 17,LL..3(2) # module_count - stw 30,0(17) # copy reg30 to module_count - lwz 17,LL..4(2) # text_origin - stw 29,0(17) # copy reg29 to text_origin - lwz 17,LL..5(2) # data_origin - stw 28,0(17) # copy reg28 to data_origin -"); -#endif - crt0_info.p_argc = (int*)&argc; - -/* crt0_info.threads_init = (FPV) &__pthread_init; */ - - /* - * Do run-time linking, if enabled and call the init() - * for all loaded modules. - */ - argc = modinit(argc,&crt0_info,module_count,text_origin,data_origin); - - errno=0; - /* - * Call the user program. - */ - exit (main (argc, argv, __environ)); -} - -/* - * The modinit() function performs run-time linking, - * if enabled, and calling the init() function for - * all loaded modules. - * - * int modinit(argc,crt0_info,module_count,text,data) - * - * argc - current value of argc. - * info - crt0 information passed - * module_count - number of modules loaded. - * text - Beginning of text address - * data - Beginning of data address - */ - -#define DL_BUFFER_SIZE 1000 - -int modinit(int argc,INFO *crt0_info, int module_count, - caddr_t text_origin, caddr_t data_origin) -{ - int *handler = 0; - __RTINIT *rtinit_info = 0; - int flag; - DL_INFO dl_buffer[DL_BUFFER_SIZE]; - DL_INFO *dl_info = dl_buffer; - int i; - FPV p; - __libc_lock_define_initialized(static,modinit_lock); - - /* - * try to find __rtinit symbols - */ - rtinit_info = find_rtinit(text_origin,data_origin,module_count); - - flag = DL_EXECQ; - if (rtinit_info && rtinit_info->rtl) flag |= DL_LOAD_RTL; - - /* - * get a list of modules that have __rtinit - */ - if (__loadx(flag, dl_info, sizeof(dl_buffer))) exit(0x90); - - if (( dl_info[0].dlinfo_xflags & DL_INFO_OK)) - { - rtinit_info = find_rtinit(dl_info[1].dlinfo_textorg, - dl_info[1].dlinfo_dataorg, - module_count); - if ((rtinit_info != NULL) & (rtinit_info->rtl != NULL)) - { - if((*rtinit_info->rtl)(dl_info,0)) exit(0x90); - } - } - - /* - * initialize threads in case any init - * functions need thread functions - */ - if (crt0_info->threads_init) - (*crt0_info->threads_init)(); - - p = (FPV) __loadx(DL_GLOBALSYM | DL_SRCHLOADLIST,"pthread_init"); - if (p) - (*p)(); - - __libc_lock_lock(modinit_lock); - - /* - * initialization each module loaded that has __rtinit. - */ - if (( dl_info[0].dlinfo_xflags & DL_INFO_OK)) - { - for (i=1; i < dl_info[0].dlinfo_arraylen + 1; i++) - { - if (dl_info[i].dlinfo_flags & DL_HAS_RTINIT) - { - rtinit_info = find_rtinit(dl_info[i].dlinfo_textorg, - dl_info[i].dlinfo_dataorg, - module_count); - if (rtinit_info) - { - mod_init1(handler,rtinit_info); - } - } - } - } - - __libc_lock_unlock(modinit_lock); - /* - * reload argc if needed. - */ - return((int) (*crt0_info->p_argc)); -} - -/* - * The mod_init1 calls every initialization function - * for a given module. - * - * void mod_init1(handler, rti) - * - * void *handler - if NULL init funtions for modules loaded at exec time - * are being executed. Otherwise, the handler points to the - * module loaded. - * - * __RTINIT *rti - pointer to __rtinit data structure (with rti->init_offset - * not equal to zero) - */ - -void mod_init1(void *handler,__RTINIT *rtl) -{ - __RTINIT_DESCRIPTOR *descriptor; - - descriptor =(__RTINIT_DESCRIPTOR *) ((caddr_t)&rtl->rtl + rtl->init_offset); - while (descriptor->f) - { - if (!(descriptor->flags & _RT_CALLED)) - { - descriptor->flags |= _RT_CALLED; - ( descriptor->f )(handler,rtl,descriptor); /* execute init/fini */ - } - descriptor = (__RTINIT_DESCRIPTOR *) ((caddr_t)descriptor + - rtl->__rtinit_descriptor_size); - } -} - - -/* - * Find __rtinit symbol - * - * __RTINIT *find_rtinit(caddr_t text_origin) - * - * caddr_t text_origin - Beginning of text area - * caddr_t data_origin - Beginning of data area - * int module_count - Number of modules loaded - * __RTINIT *rti - pointer to __rtinit data structure - */ - -__RTINIT *find_rtinit(caddr_t text_origin, caddr_t data_origin, int module_count) -{ - struct xcoffhdr *xcoff_hdr; - SCNHDR *sec_hdr; - SCNHDR *ldr_sec_hdr; - SCNHDR *data_sec_hdr; - LDSYM *ldsym_hdr; - __RTINIT *rtl; - - xcoff_hdr = (struct xcoffhdr *) text_origin; - sec_hdr = (SCNHDR *) ((caddr_t)&xcoff_hdr->aouthdr + - xcoff_hdr->filehdr.f_opthdr); - ldr_sec_hdr = (SCNHDR *) (sec_hdr + (xcoff_hdr->aouthdr.o_snloader - 1)); - ldsym_hdr = (LDSYM *) ((caddr_t)xcoff_hdr + ldr_sec_hdr->s_scnptr + - LDHDRSZ); - - if ( module_count <= 0) - { - if ( !(ldr_sec_hdr->s_scnptr) ) return ((__RTINIT *) 0); - - if ( memcmp(ldsym_hdr,RTINIT_NAME,sizeof(RTINIT_NAME)-1)) - return ((__RTINIT *) 0); - } - - data_sec_hdr = (SCNHDR *) (sec_hdr + (xcoff_hdr->aouthdr.o_sndata - 1)); - rtl = (__RTINIT *) (ldsym_hdr->l_value + - (data_origin - data_sec_hdr->s_vaddr)); - return(rtl); -} From c25168ce575e68cac1a1de2f9d8f1d386048af5b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 8 Sep 2001 17:24:19 +0000 Subject: [PATCH 2684/4487] Startup code for glibc on AIX. --- sysdeps/unix/sysv/aix/start.s | 109 ++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/start.s diff --git a/sysdeps/unix/sysv/aix/start.s b/sysdeps/unix/sysv/aix/start.s new file mode 100644 index 0000000000..bf17b8ce5c --- /dev/null +++ b/sysdeps/unix/sysv/aix/start.s @@ -0,0 +1,109 @@ +/* Copyright (C) 2001 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. */ + + .file "start.s" + .toc +T.lsd: .tc __libc_start_data[tc], __libc_start_data[rw] +T.main: .tc main[tc], main[rw] +T.init: .tc __libc_start_init[tc], __libc_start_init[rw] +T.fini: .tc __libc_start_fini[tc], __libc_start_init[rw] +T.rtld_fini : .tc __libc_start_rtld_fini[tc], __libc_start_rtld_fini[rw] + + .globl __start + .globl .__start + .globl __libc_start_data + + .extern .__libc_start_main + .extern .main + .extern main + .extern __libc_start_init + .extern __libc_start_fini + .extern __libc_start_rtld_fini + +/* Text */ + + .csect __start[ds] +__start: + .long .__start, TOC[tc0], 0 + + .csect .text[pr] +.__start: + +/* No prologue needed, __start does not have to follow the ABI. + + Input from kernel/loader + r1 : stack + r2 : TOC + r3 : argc + r4 : argv + r5 : envp + r28 : data origin + r29 : text origin + r30 : module count + r31 : default processing flag + + If r31 == r30, no special processing is needed, ie r28, r29 & r30 + are not used + + Save input in __libc_start_data */ + l 16, T.lsd(2) + st 1, 0(16) /* stack */ + st 2, 4(16) /* toc */ + st 3, 8(16) /* argc */ + st 4, 12(16) /* argv */ + st 5, 16(16) /* envp */ + st 28, 20(16) /* data origin */ + st 29, 24(16) /* text origin */ + st 30, 28(16) /* module count */ + st 31, 32(16) /* special */ + +/* Call __libc_start_main() */ + + bl .__libc_start_main + nop + +/* No epilog needed, __start does not have to follow the ABI */ + +/* Trace back */ +TB.__start: + .long 0x0 + .long 0xc2040 + .long 0x0 + .long TB.__start - .__start + .short 7 + .byte "__start" + .byte 0,0,0 + +/* Data + __libc_start_data + Space to keep libc initialization information */ + + .csect __libc_start_data[rw] +__libc_start_data: +/* For kernel/loader input args */ + .space 36 + +/* Externs */ + .long main +init: + .long __libc_start_init +fini: + .long __libc_start_fini +rtld_fini: + .long __libc_start_rtld_fini + .space 0x1000 + (4 + rtld_fini - __libc_start_data) From de447e48ce0f6caa89599429ba0e27d7154a9732 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 8 Sep 2001 17:40:41 +0000 Subject: [PATCH 2685/4487] Alias __libc_fcntl to __fcntl. --- sysdeps/unix/sysv/aix/fcntl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/aix/fcntl.c b/sysdeps/unix/sysv/aix/fcntl.c index 196bbf52cd..8c5ba154c2 100644 --- a/sysdeps/unix/sysv/aix/fcntl.c +++ b/sysdeps/unix/sysv/aix/fcntl.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2001 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 @@ -38,3 +38,4 @@ __fcntl (int fdes, int cmd, ...) return res; } strong_alias (__fcntl, fcntl) +strong_alias (__fcntl, __libc_fcntl) From 48255f4c66c0e244b7d1d846b860720a4e5dd010 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 8 Sep 2001 17:41:25 +0000 Subject: [PATCH 2686/4487] Program startup code for AIX. --- sysdeps/unix/sysv/aix/start-libc.c | 271 +++++++++++++++++++++++++++++ 1 file changed, 271 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/start-libc.c diff --git a/sysdeps/unix/sysv/aix/start-libc.c b/sysdeps/unix/sysv/aix/start-libc.c new file mode 100644 index 0000000000..e3582e3892 --- /dev/null +++ b/sysdeps/unix/sysv/aix/start-libc.c @@ -0,0 +1,271 @@ +/* Initialization code run first thing by the XCOFF startup code. AIX version. + Copyright (C) 2001 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. */ + +#include +#include +#include + +/* hack to use uchar's */ +typedef unsigned char uchar; +#include +#include +#include +#include + +extern void __libc_init_first (int argc, char **argv, char **envp); + +/* XXX disable for now +extern int _dl_starting_up; +weak_extern (_dl_starting_up) +extern int __libc_multiple_libcs; */ + +/* XXX normally defined in generic/dl-sydep.c, hack it into existance +extern void *__libc_stack_end; */ +void *__libc_stack_end; + +struct __libc_start_data_rec +{ + void *stack; + void *toc; + int argc; + char **argv; + char **envp; + char *data; + char *text; + unsigned int mcount; + unsigned int special; + int (*main) (int, char **, char **); + void (*init) (void); + void (*fini) (void); + void (*rtld_fini) (void); +}; + +extern struct __libc_start_data_rec __libc_start_data; +extern int errno; + +/* The first piece of initialized data. */ +int __data_start = 0; + +#ifndef HAVE_ELF +/* Since gcc/crtstuff.c won't define it unless the ELF format is used + we will need to define it here. */ +void *__dso_handle = NULL; +#endif + +/* AIX kernel function */ +extern int __loadx (int flag, void *module, void *arg1, void *arg2, + void *arg3); +/* Needed by setenv */ +char **__environ; + +/* Needed by dl-support.c */ +/* XXX stubbing out dl-support.c for now.. + size_t _dl_pagesize = 0; */ + +/* + Find __rtinit symbol + + __RTINIT *find_rtinit() + + __RTINIT *rti - pointer to __rtinit data structure + */ + +static __RTINIT * +find_rtinit (void) +{ + struct xcoffhdr *xcoff_hdr; + SCNHDR *sec_hdr; + SCNHDR *ldr_sec_hdr; + SCNHDR *data_sec_hdr; + LDSYM *ldsym_hdr; + __RTINIT *rtl; + + xcoff_hdr = (struct xcoffhdr *) __libc_start_data.text; + sec_hdr = (SCNHDR *) ((caddr_t) &xcoff_hdr->aouthdr + + xcoff_hdr->filehdr.f_opthdr); + ldr_sec_hdr = (SCNHDR *) (sec_hdr + (xcoff_hdr->aouthdr.o_snloader - 1)); + ldsym_hdr = (LDSYM *) ((caddr_t)xcoff_hdr + ldr_sec_hdr->s_scnptr + + LDHDRSZ); + + if ( __libc_start_data.mcount <= 0) + { + if (!ldr_sec_hdr->s_scnptr) + return (__RTINIT *) 0; + + if (memcmp (ldsym_hdr, RTINIT_NAME, sizeof (RTINIT_NAME) - 1)) + return (__RTINIT *) 0; + } + + data_sec_hdr = (SCNHDR *) (sec_hdr + (xcoff_hdr->aouthdr.o_sndata - 1)); + rtl = (__RTINIT *) (ldsym_hdr->l_value + + (__libc_start_data.data - data_sec_hdr->s_vaddr)); + return rtl; +} + +/* + The mod_init1 calls every initialization function for a given module. + + void mod_init1(handler, rti) + + void *handler - if NULL init funtions for modules loaded at exec time + are being executed. Otherwise, the handler points to the + module loaded. + + __RTINIT *rti - pointer to __rtinit data structure (with rti->init_offset + not equal to zero) + */ + +static void +mod_init1 (void *handler,__RTINIT *rtl) +{ + __RTINIT_DESCRIPTOR *descriptor; + + descriptor = (__RTINIT_DESCRIPTOR *) ((caddr_t) &rtl->rtl + + rtl->init_offset); + while (descriptor->f != NULL) + { + if (!(descriptor->flags & _RT_CALLED)) + { + descriptor->flags |= _RT_CALLED; + (descriptor->f) (handler, rtl, descriptor); /* execute init/fini */ + } + descriptor = (__RTINIT_DESCRIPTOR *) ((caddr_t) descriptor + + rtl->__rtinit_descriptor_size); + } +} + +/* The modinit() function performs run-time linking, if enabled, and calling + the init() function for all loaded modules. */ + +#define DL_BUFFER_SIZE 1000 + +static int +modinit (void) +{ + int *handler = 0; + __RTINIT *rtinit_info = 0; + int flag; + DL_INFO dl_buffer[DL_BUFFER_SIZE]; + DL_INFO *dl_info = dl_buffer; + int i; + + /* Find __rtinit symbols */ + rtinit_info = find_rtinit (); + + flag = DL_EXECQ; + if (rtinit_info && rtinit_info->rtl) + flag |= DL_LOAD_RTL; + + /* Get a list of modules that have __rtinit */ + if (__loadx (flag, dl_info, (void *) sizeof (dl_buffer), NULL, NULL)) + exit (0x90); + + if (dl_info[0].dlinfo_xflags & DL_INFO_OK) + { + rtinit_info = find_rtinit (); + if ((rtinit_info != NULL) & (rtinit_info->rtl != NULL)) + { + if ((*rtinit_info->rtl) (dl_info, 0)) + exit (0x90); + } + } + + /* Initialization each module loaded that has __rtinit. */ + if (dl_info[0].dlinfo_xflags & DL_INFO_OK) + { + for (i = 1; i < dl_info[0].dlinfo_arraylen + 1; ++i) + if (dl_info[i].dlinfo_flags & DL_HAS_RTINIT) + { + rtinit_info = find_rtini t(); + if (rtinit_info) + mod_init1 (handler, rtinit_info); + } + } + + return 0; +} + + +void +__libc_start_init (void) +{ + /* Do run-time linking, if enabled and call the init() + for all loaded modules. */ + if (__libc_start_data.mcount != __libc_start_data.special) + modinit (); +} + +/* For now these are just stubs. */ +void +__libc_start_fini (void) +{ +} + +void +__libc_start_rtld_fini (void) +{ +} + + +int +__libc_start_main (void) +{ + /* Store the lowest stack address. */ + __libc_stack_end = __libc_start_data.stack; + + /* Used by setenv */ + __environ = __libc_start_data.envp; + +#ifndef SHARED + /* Clear errno. */ + errno = 0; + + /* Some security at this point. Prevent starting a SUID binary where + the standard file descriptors are not opened. We have to do this + only for statically linked applications since otherwise the dynamic + loader did the work already. */ + if (__builtin_expect (__libc_enable_secure, 0)) + __libc_check_standard_fds (); + +#endif + + /* Register the destructor of the dynamic linker if there is any. */ + if (__builtin_expect (__libc_start_data.rtld_fini != NULL, 1)) + __cxa_atexit ((void (*) (void *)) __libc_start_data.rtld_fini, NULL, NULL); + + /* Call the initializer of the libc. This is only needed here if we + are compiling for the static library in which case we haven't + run the constructors in `_dl_start_user'. */ +#ifndef SHARED + __libc_init_first (__libc_start_data.argc, __libc_start_data.argv, + __libc_start_data.envp); +#endif + + /* Register the destructor of the program, if any. */ + if (__libc_start_data.fini) + __cxa_atexit ((void (*) (void *)) __libc_start_data.fini, NULL, NULL); + + /* Call the initializer of the program, if any. */ + if (__libc_start_data.init) + (*__libc_start_data.init) (); + + exit ((*__libc_start_data.main) (__libc_start_data.argc, + __libc_start_data.argv, + __libc_start_data.envp)); +} From e2cf1dd41de78e9a2a314d39b20d4e5fbc913766 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 8 Sep 2001 17:44:33 +0000 Subject: [PATCH 2687/4487] Library startup code for AIX. --- sysdeps/unix/sysv/aix/init-first.c | 107 +++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/init-first.c diff --git a/sysdeps/unix/sysv/aix/init-first.c b/sysdeps/unix/sysv/aix/init-first.c new file mode 100644 index 0000000000..2c8e0b1900 --- /dev/null +++ b/sysdeps/unix/sysv/aix/init-first.c @@ -0,0 +1,107 @@ +/* Initialization code run first thing by the XCOFF startup code. AIX version. + Copyright (C) 2001 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. */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef SHARED +# include +# include "dl-osinfo.h" +#endif + +extern void __libc_init (int, char **, char **); + +/* The function is called from assembly stubs the compiler can't see. */ +static void init (int, char **, char **) __attribute__ ((unused)); + +extern int _dl_starting_up; +weak_extern (_dl_starting_up) + +extern fpu_control_t _dl_fpu_control; +extern int _dl_fpu_control_set; + +/* Set nonzero if we have to be prepared for more then one libc being + used in the process. Safe assumption if initializer never runs. */ +int __libc_multiple_libcs = 1; + +/* Remember the command line argument and enviroment contents for + later calls of initializers for dynamic libraries. */ +int __libc_argc; +char **__libc_argv; + + +static void +init (int argc, char **argv, char **envp) +{ + extern void __getopt_clean_environment (char **); + /* The next variable is only here to work around a bug in gcc <= 2.7.2.2. + If the address would be taken inside the expression the optimizer + would try to be too smart and throws it away. Grrr. */ + + /* XXX disable dl for now + int *dummy_addr = &_dl_starting_up; + + __libc_multiple_libcs = dummy_addr && !_dl_starting_up; */ + + /* Save the command-line arguments. */ + __libc_argc = argc; + __libc_argv = argv; + __environ = envp; + +#ifndef SHARED + __libc_init_secure (); +#endif + + __libc_init (argc, argv, envp); + + /* This is a hack to make the special getopt in GNU libc working. */ + __getopt_clean_environment (envp); + +#ifdef SHARED + __libc_global_ctors (); +#endif +} + +#ifdef SHARED + +strong_alias (init, _init); + +extern void __libc_init_first (void); + +void +__libc_init_first (void) +{ +} + +#else +extern void __libc_init_first (int argc, char **argv, char **envp); + +void +__libc_init_first (int argc, char **argv, char **envp) +{ + init (argc, argv, envp); +} +#endif From 7a250cfd1e85bf6f6d622aa82e950bd8a32c6526 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 8 Sep 2001 17:45:10 +0000 Subject: [PATCH 2688/4487] termio definitions for AIX. --- sysdeps/unix/sysv/aix/sysv_termio.h | 155 ++++++++++++++++++++++++++++ 1 file changed, 155 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/sysv_termio.h diff --git a/sysdeps/unix/sysv/aix/sysv_termio.h b/sysdeps/unix/sysv/aix/sysv_termio.h new file mode 100644 index 0000000000..f314c0e16f --- /dev/null +++ b/sysdeps/unix/sysv/aix/sysv_termio.h @@ -0,0 +1,155 @@ +/* Copyright (C) 1992, 1997, 2001 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. */ + +/* In various parts of this file we define the System V values for + things as _SYSV_. Those are the values that System V + uses for termio, and also (SVR4) termios. Not necessarily the + same as the GNU termios that the library user sees. */ + +/* Number of elements of c_cc. termio only. */ +#define _SYSV_NCC 8 + +#define _SYSV_VINTR 0 +#define _SYSV_VQUIT 1 +#define _SYSV_VERASE 2 +#define _SYSV_VKILL 3 +#define _SYSV_VEOF 4 +/* This field means VEOF if ICANON, VMIN if not. */ +#define _SYSV_VMIN 4 +#define _SYSV_VEOL 5 +/* This field means VEOL if ICANON, VTIME if not. */ +#define _SYSV_VTIME 5 +#define _SYSV_VEOL2 6 + +/* Flags in c_iflag. */ +#define _SYSV_IGNBRK 1 +#define _SYSV_BRKINT 2 +#define _SYSV_IGNPAR 4 +#define _SYSV_PARMRK 8 +#define _SYSV_INPCK 0x10 +#define _SYSV_ISTRIP 0x20 +#define _SYSV_INLCR 0x40 +#define _SYSV_IGNCR 0x80 +#define _SYSV_ICRNL 0x100 +#define _SYSV_IUCLC 0x200 +#define _SYSV_IXON 0x400 +#define _SYSV_IXANY 0x800 +#define _SYSV_IXOFF 0x1000 +#define _SYSV_IMAXBEL 0x2000 + +/* Flags in c_cflag. */ +#define _SYSV_CBAUD 0xf +#define _SYSV_CIBAUD 0xf0000 /* termios only. */ +#define _SYSV_IBSHIFT 16 +/* Values for CBAUD and CIBAUD. */ +#define _SYSV_B0 0 +#define _SYSV_B50 1 +#define _SYSV_B75 2 +#define _SYSV_B110 3 +#define _SYSV_B134 4 +#define _SYSV_B150 5 +#define _SYSV_B200 6 +#define _SYSV_B300 7 +#define _SYSV_B600 8 +#define _SYSV_B1200 9 +#define _SYSV_B1800 10 +#define _SYSV_B2400 11 +#define _SYSV_B4800 12 +#define _SYSV_B9600 13 +#define _SYSV_B19200 14 +#define _SYSV_B38400 15 + +#define _SYSV_CS5 0 +#define _SYSV_CS6 0x10 +#define _SYSV_CS7 0x20 +#define _SYSV_CS8 0x30 +#define _SYSV_CSIZE 0x30 +#define _SYSV_CSTOPB 0x40 +#define _SYSV_CREAD 0x80 +#define _SYSV_PARENB 0x100 +#define _SYSV_PARODD 0x200 +#define _SYSV_HUPCL 0x400 +#define _SYSV_CLOCAL 0x800 + +/* Flags in c_lflag. */ +#define _SYSV_ISIG 1 +#define _SYSV_ICANON 2 +#define _SYSV_ECHO 8 +#define _SYSV_ECHOE 0x10 +#define _SYSV_ECHOK 0x20 +#define _SYSV_ECHONL 0x40 +#define _SYSV_NOFLSH 0x80 +#define _SYSV_TOSTOP 0x100 +#define _SYSV_ECHOCTL 0x200 +#define _SYSV_ECHOPRT 0x400 +#define _SYSV_ECHOKE 0x800 +#define _SYSV_FLUSHO 0x2000 +#define _SYSV_PENDIN 0x4000 +#define _SYSV_IEXTEN 0x8000 + +/* Flags in c_oflag. */ +#define _SYSV_OPOST 1 +#define _SYSV_OLCUC 2 +#define _SYSV_ONLCR 4 +#define _SYSV_NLDLY 0x100 +#define _SYSV_NL0 0 +#define _SYSV_NL1 0x100 +#define _SYSV_CRDLY 0x600 +#define _SYSV_CR0 0 +#define _SYSV_CR1 0x200 +#define _SYSV_CR2 0x400 +#define _SYSV_CR3 0x600 +#define _SYSV_TABDLY 0x1800 +#define _SYSV_TAB0 0 +#define _SYSV_TAB1 0x0800 +#define _SYSV_TAB2 0x1000 +/* TAB3 is an obsolete name for XTABS. But we provide it since some + programs expect it to exist. */ +#define _SYSV_TAB3 0x1800 +#define _SYSV_XTABS 0x1800 +#define _SYSV_BSDLY 0x2000 +#define _SYSV_BS0 0 +#define _SYSV_BS1 0x2000 +#define _SYSV_VTDLY 0x4000 +#define _SYSV_VT0 0 +#define _SYSV_VT1 0x4000 +#define _SYSV_FFDLY 0x8000 +#define _SYSV_FF0 0 +#define _SYSV_FF1 0x8000 + +/* ioctl's. */ + +#define _TCGETA 0x5405 +#define _TCSETA 0x5406 +#define _TCSETAW 0x5407 +#define _TCSETAF 0x5408 +#define _TCSBRK 0x5409 +#define _TCXONC 0x540B +#define _TCFLSH 0x540C +#define _TIOCGPGRP 0x7414 +#define _TIOCSPGRP 0x7415 + +struct __sysv_termio + { + unsigned short c_iflag; + unsigned short c_oflag; + unsigned short c_cflag; + unsigned short c_lflag; + char c_line; + unsigned char c_cc[_SYSV_NCC]; + }; From d4ef613a245d48d5a4382b86ae5b3f6e59cffa94 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 8 Sep 2001 21:31:40 +0000 Subject: [PATCH 2689/4487] (elf_machine_rel): Fix thinko in usage of RESOLVE() (r_type, not reloc->r_type). --- sysdeps/arm/dl-machine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 6abac52c90..2d802b7e9b 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -428,7 +428,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, else { const Elf32_Sym *const refsym = sym; - Elf32_Addr value = RESOLVE (&sym, version, reloc->r_type); + Elf32_Addr value = RESOLVE (&sym, version, r_type); if (sym) value += sym->st_value; From fe166e9e571c4ada40d081be27668f3de6584c98 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 15 Sep 2001 03:01:21 +0000 Subject: [PATCH 2690/4487] Updated. --- sysdeps/mips/fpu/libm-test-ulps | 38 ++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/sysdeps/mips/fpu/libm-test-ulps b/sysdeps/mips/fpu/libm-test-ulps index d7711e5558..1c189098a8 100644 --- a/sysdeps/mips/fpu/libm-test-ulps +++ b/sysdeps/mips/fpu/libm-test-ulps @@ -7,7 +7,7 @@ ifloat: 2 Test "asin (0.5) == pi/6": float: 2 ifloat: 2 -Test "asin (0.7) == 0.7753974966107530637": +Test "asin (0.7) == 0.77539749661075306374035335271498708": double: 1 float: 2 idouble: 1 @@ -175,12 +175,12 @@ idouble: 1 Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": float: 1 ifloat: 1 -Test "Real part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i": +Test "Real part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i": +Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i": float: 1 ifloat: 1 @@ -249,7 +249,7 @@ float: 1 ifloat: 1 # cos -Test "cos (0.7) == 0.7648421872844884262": +Test "cos (0.7) == 0.76484218728448842625585999019186495": double: 1 float: 1 idouble: 1 @@ -374,7 +374,7 @@ double: 2 float: 1 idouble: 2 ifloat: 1 -Test "exp10 (0.7) == 5.0118723362727228500": +Test "exp10 (0.7) == 5.0118723362727228500155418688494574": float: 1 ifloat: 1 Test "exp10 (3) == 1000": @@ -451,6 +451,21 @@ ifloat: 2 Test "j0 (8.0) == 0.17165080713755390609": float: 1 ifloat: 1 +Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + # j1 Test "j1 (10.0) == 0.043472746168861436670": @@ -563,7 +578,7 @@ idouble: 1 ifloat: 1 # sincos -Test "sincos (0.7, &sin_res, &cos_res) puts 0.76484218728448842626 in cos_res": +Test "sincos (0.7, &sin_res, &cos_res) puts 0.76484218728448842625585999019186495 in cos_res": double: 1 float: 1 idouble: 1 @@ -573,7 +588,7 @@ double: 1 float: 0.5 idouble: 1 ifloat: 0.5 -Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.866025403784438646764 in sin_res": +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res": double: 1 float: 1 idouble: 1 @@ -583,7 +598,7 @@ double: 0.2758 float: 0.3667 idouble: 0.2758 ifloat: 0.3667 -Test "sincos (pi/6, &sin_res, &cos_res) puts 0.866025403784438646764 in cos_res": +Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res": float: 1 ifloat: 1 @@ -605,6 +620,13 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +Test "tanh (-0.7) == -0.60436777711716349631": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 # tgamma Test "tgamma (-0.5) == -2 sqrt (pi)": From 3805349500b991b580f141dcb0e97b718c6b4939 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 22 Sep 2001 21:19:47 +0000 Subject: [PATCH 2691/4487] (init): Use USE_NONONPTION_FLAG ifdef for __getopt_clean_environment. --- sysdeps/unix/sysv/aix/init-first.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysdeps/unix/sysv/aix/init-first.c b/sysdeps/unix/sysv/aix/init-first.c index 2c8e0b1900..f87e5c875c 100644 --- a/sysdeps/unix/sysv/aix/init-first.c +++ b/sysdeps/unix/sysv/aix/init-first.c @@ -56,7 +56,9 @@ char **__libc_argv; static void init (int argc, char **argv, char **envp) { +#ifdef USE_NONOPTION_FLAGS extern void __getopt_clean_environment (char **); +#endif /* The next variable is only here to work around a bug in gcc <= 2.7.2.2. If the address would be taken inside the expression the optimizer would try to be too smart and throws it away. Grrr. */ @@ -77,8 +79,10 @@ init (int argc, char **argv, char **envp) __libc_init (argc, argv, envp); +#ifdef USE_NONOPTION_FLAGS /* This is a hack to make the special getopt in GNU libc working. */ __getopt_clean_environment (envp); +#endif #ifdef SHARED __libc_global_ctors (); From 177ac300b9ed6d3515994c245b2528dd4745ec78 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 22 Sep 2001 21:28:25 +0000 Subject: [PATCH 2692/4487] Add real implementation. --- sysdeps/unix/sysv/aix/libc-start.c | 297 ++++++++++++++++++++++++++++- 1 file changed, 296 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/aix/libc-start.c b/sysdeps/unix/sysv/aix/libc-start.c index 2dfc0251ba..1184664b57 100644 --- a/sysdeps/unix/sysv/aix/libc-start.c +++ b/sysdeps/unix/sysv/aix/libc-start.c @@ -1 +1,296 @@ -/* stub libc-start.c */ +/* Initialization code run first thing by the XCOFF startup code. AIX version. + Copyright (C) 2001 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. */ + +#include +#include +#include + +/* hack to use uchar's */ +typedef unsigned char uchar; +#include +#include +#include +#include + +extern void __libc_init_first (int argc, char **argv, char **envp); + +/* XXX disable for now +extern int _dl_starting_up; +weak_extern (_dl_starting_up) +extern int __libc_multiple_libcs; */ + +/* XXX normally defined in generic/dl-sydep.c, hack it into existance +extern void *__libc_stack_end; */ +void *__libc_stack_end; + + struct __libc_start_data_rec { + void *stack; + void *toc; + int argc; + char **argv; + char **envp; + char *data; + char *text; + unsigned mcount; + unsigned special; + int (*main)(int, char **, char **); + void (*init)(void); + void (*fini)(void); + void (*rtld_fini)(void); + }; + +extern struct __libc_start_data_rec __libc_start_data; +extern int errno; + +/* The first piece of initialized data. */ +int __data_start = 0; + +#ifndef HAVE_ELF +/* Since gcc/crtstuff.c won't define it unless the ELF format is used + we will need to define it here. */ +void *__dso_handle = NULL; +#endif + +/* AIX kernel function */ +extern int __loadx (int flag, void *module, void *arg1, void *arg2, + void *arg3); +/* Needed by setenv */ +char **__environ; + +/* Needed by dl-support.c */ +/* XXX stubbing out dl-support.c for now.. + size_t _dl_pagesize = 0; */ + +/* + * Find __rtinit symbol + * + * __RTINIT *find_rtinit() + * + * __RTINIT *rti - pointer to __rtinit data structure + */ + +static __RTINIT * +find_rtinit (void) +{ + struct xcoffhdr *xcoff_hdr; + SCNHDR *sec_hdr; + SCNHDR *ldr_sec_hdr; + SCNHDR *data_sec_hdr; + LDSYM *ldsym_hdr; + __RTINIT *rtl; + + xcoff_hdr = (struct xcoffhdr *) __libc_start_data.text; + sec_hdr = (SCNHDR *) ((caddr_t) &xcoff_hdr->aouthdr + + xcoff_hdr->filehdr.f_opthdr); + ldr_sec_hdr = (SCNHDR *) (sec_hdr + (xcoff_hdr->aouthdr.o_snloader - 1)); + ldsym_hdr = (LDSYM *) ((caddr_t) xcoff_hdr + ldr_sec_hdr->s_scnptr + + LDHDRSZ); + + if (__libc_start_data.mcount <= 0) + { + if (!ldr_sec_hdr->s_scnptr) + return NULL; + + if (memcmp (ldsym_hdr, RTINIT_NAME, sizeof(RTINIT_NAME) - 1) != 0) + return NULL; + } + + data_sec_hdr = (SCNHDR *) (sec_hdr + (xcoff_hdr->aouthdr.o_sndata - 1)); + rtl = (__RTINIT *) (ldsym_hdr->l_value + + (__libc_start_data.data - data_sec_hdr->s_vaddr)); + return rtl; +} + +/* The mod_init1 calls every initialization function + for a given module. + + void mod_init1(handler, rti) + + void *handler - if NULL init funtions for modules loaded at exec time + are being executed. Otherwise, the handler points to the + module loaded. + + __RTINIT *rti - pointer to __rtinit data structure (with rti->init_offset + not equal to zero) + */ + +static void +mod_init1 (void *handler,__RTINIT *rtl) +{ + __RTINIT_DESCRIPTOR *descriptor; + + descriptor = (__RTINIT_DESCRIPTOR *) ((caddr_t) &rtl->rtl + + rtl->init_offset); + while (descriptor->f != NULL) + { + if (!(descriptor->flags & _RT_CALLED)) + { + descriptor->flags |= _RT_CALLED; + /* Execute init/fini. */ + descriptor->f (handler, rtl, descriptor); + } + descriptor = (__RTINIT_DESCRIPTOR *) ((caddr_t) descriptor + + rtl->__rtinit_descriptor_size); + } +} + +/* The modinit() function performs run-time linking, if enabled, and calling + the init() function for all loaded modules. + + int modinit() + */ + +#define DL_BUFFER_SIZE 1000 + +static int +modinit (void) +{ + int *handler = NULL; + __RTINIT *rtinit_info = NULL; + int flag; + DL_INFO dl_buffer[DL_BUFFER_SIZE]; + DL_INFO *dl_info = dl_buffer; + int i; + + /* Find __rtinit symbols */ + rtinit_info = find_rtinit (); + + flag = DL_EXECQ; + if (rtinit_info && rtinit_info->rtl) + flag |= DL_LOAD_RTL; + + /* Get a list of modules that have __rtinit. */ + if (__loadx (flag, dl_info, (void *) sizeof (dl_buffer), NULL, NULL)) + exit (0x90); + + if (( dl_info[0].dlinfo_xflags & DL_INFO_OK)) + { + rtinit_info = find_rtinit (); + if ((rtinit_info != NULL) & (rtinit_info->rtl != NULL)) + { + if ((*rtinit_info->rtl) (dl_info, 0)) + exit (0x90); + } + } + + /* Initialization each module loaded that has __rtinit. */ + if (dl_info[0].dlinfo_xflags & DL_INFO_OK) + { + for (i = 1; i < dl_info[0].dlinfo_arraylen + 1; ++i) + if (dl_info[i].dlinfo_flags & DL_HAS_RTINIT) + { + rtinit_info = find_rtinit (); + if (rtinit_info) + mod_init1 (handler, rtinit_info); + } + } + + return 0; +} + + +void +__libc_start_init (void) +{ + /* Do run-time linking, if enabled and call the init() + for all loaded modules. */ + if (__libc_start_data.mcount != __libc_start_data.special) + modinit (); +} + +/* For now these are just stubs. */ +void +__libc_start_fini (void) +{ +} + +void +__libc_start_rtld_fini (void) +{ +} + +void +__libc_start_main (void) +{ +#ifndef SHARED + + /* The next variable is only here to work around a bug in gcc <= 2.7.2.2. + If the address would be taken inside the expression the optimizer + would try to be too smart and throws it away. Grrr. */ + + /* XXX disable for now + int *dummy_addr = &_dl_starting_up; + + __libc_multiple_libcs = dummy_addr && !_dl_starting_up; */ +#endif + + /* Store the lowest stack address. */ + __libc_stack_end = __libc_start_data.stack; + + /* Used by setenv */ + __environ = __libc_start_data.envp; + +#ifndef SHARED + /* Clear errno. */ + errno = 0; + + /* Some security at this point. Prevent starting a SUID binary where + the standard file descriptors are not opened. We have to do this + only for statically linked applications since otherwise the dynamic + loader did the work already. */ + if (__builtin_expect (__libc_enable_secure, 0)) + __libc_check_standard_fds (); + +#endif + + /* Register the destructor of the dynamic linker if there is any. */ + if (__builtin_expect (__libc_start_data.rtld_fini != NULL, 1)) + __cxa_atexit ((void (*) (void *)) __libc_start_data.rtld_fini, NULL, NULL); + + /* Call the initializer of the libc. This is only needed here if we + are compiling for the static library in which case we haven't + run the constructors in `_dl_start_user'. */ +#ifndef SHARED + __libc_init_first (__libc_start_data.argc, __libc_start_data.argv, + __libc_start_data.envp); +#endif + + /* Register the destructor of the program, if any. */ + if (__libc_start_data.fini) + __cxa_atexit ((void (*) (void *)) __libc_start_data.fini, NULL, NULL); + + /* Call the initializer of the program, if any. */ +#ifdef SHARED + if (__builtin_expect (_dl_debug_mask & DL_DEBUG_IMPCALLS, 0)) + _dl_debug_printf ("\ninitialize program: %s\n\n", + __libc_start_data.argv[0]); +#endif + if (__libc_start_data.init) + (*__libc_start_data.init) (); + +#ifdef SHARED + if (__builtin_expect (_dl_debug_mask & DL_DEBUG_IMPCALLS, 0)) + _dl_debug_printf ("\ntransferring control: %s\n\n", + __libc_start_data.argv[0]); +#endif + + exit ((*__libc_start_data.main) (__libc_start_data.argc, + __libc_start_data.argv, + __libc_start_data.envp)); +} From 8755441d32dec7eb305bdfe8eb50a8712c265f2c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 22 Sep 2001 21:32:57 +0000 Subject: [PATCH 2693/4487] (elf_machine_load_address): Compute the difference between base address and first PT_LOAD's virtual address, not the base address. --- sysdeps/alpha/dl-machine.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 2a414ca448..a039f245db 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -70,16 +70,20 @@ elf_machine_load_address (void) Elf64_Addr dot; long int zero_disp; - asm("br %0, 1f\n\t" - ".weak __load_address_undefined\n\t" - "br $0, __load_address_undefined\n" - "1:" + asm("br %0, 1f\n" + "0:\n\t" + "br $0, 2f\n" + "1:\n\t" + ".data\n" + "2:\n\t" + ".quad 0b\n\t" + ".previous" : "=r"(dot)); - zero_disp = *(int *)dot; + zero_disp = *(int *) dot; zero_disp = (zero_disp << 43) >> 41; - return dot + 4 + zero_disp; + return dot - *(Elf64_Addr *) (dot + 4 + zero_disp); } /* Set up the loaded object described by L so its unrelocated PLT From 916ea7e833299175911244898bf6665aaea7c166 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 26 Sep 2001 05:23:10 +0000 Subject: [PATCH 2694/4487] (struct cmsghdr): Don't declare __cmsg_data field if its size would be bigger than 0. (CMSG_DATA): Adjust accordingly. --- sysdeps/unix/sysv/aix/bits/socket.h | 7 +++---- sysdeps/unix/sysv/linux/alpha/bits/socket.h | 5 +++-- sysdeps/unix/sysv/linux/mips/bits/socket.h | 5 +++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/sysdeps/unix/sysv/aix/bits/socket.h b/sysdeps/unix/sysv/aix/bits/socket.h index 45877fade4..1fdadfe082 100644 --- a/sysdeps/unix/sysv/aix/bits/socket.h +++ b/sysdeps/unix/sysv/aix/bits/socket.h @@ -203,14 +203,13 @@ struct cmsghdr of cmsghdr structure. */ int cmsg_level; /* Originating protocol. */ int cmsg_type; /* Protocol specific type. */ -#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2 - unsigned char __cmsg_data[0]; /* Ancillary data. */ - /* XXX Perhaps this should be removed. */ +#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L + __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */ #endif }; /* Ancillary data object manipulation macros. */ -#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2 +#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L # define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data) #else # define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1)) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/socket.h b/sysdeps/unix/sysv/linux/alpha/bits/socket.h index 2d57128231..82c4302ed5 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/socket.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/socket.h @@ -233,12 +233,13 @@ struct cmsghdr of cmsghdr structure. */ int cmsg_level; /* Originating protocol. */ int cmsg_type; /* Protocol specific type. */ +#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */ - /* XXX Perhaps this should be removed. */ +#endif }; /* Ancillary data object manipulation macros. */ -#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2 +#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L # define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data) #else # define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1)) diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h index 482eefe257..a10c3a711a 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/socket.h +++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h @@ -233,12 +233,13 @@ struct cmsghdr of cmsghdr structure. */ int cmsg_level; /* Originating protocol. */ int cmsg_type; /* Protocol specific type. */ +#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */ - /* XXX Perhaps this should be removed. */ +#endif }; /* Ancillary data object manipulation macros. */ -#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2 +#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L # define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data) #else # define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1)) From f255cc121833849a9cc0fb112c898db14601d749 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 15 Oct 2001 11:55:20 +0000 Subject: [PATCH 2695/4487] General cleanup, use __USE_MISC / __USE_XOPEN not __USE_BSD where appropriate. --- sysdeps/unix/sysv/linux/mips/bits/termios.h | 187 ++++++++------------ 1 file changed, 70 insertions(+), 117 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/termios.h b/sysdeps/unix/sysv/linux/mips/bits/termios.h index 87d0eae222..546faa020e 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/termios.h +++ b/sysdeps/unix/sysv/linux/mips/bits/termios.h @@ -25,40 +25,6 @@ typedef unsigned char cc_t; typedef unsigned int speed_t; typedef unsigned int tcflag_t; - -#ifdef __USE_BSD - -struct sgttyb - { - char sg_ispeed; - char sg_ospeed; - char sg_erase; - char sg_kill; - int sg_flags; /* SGI special - int, not short */ - }; - -struct tchars - { - char t_intrc; - char t_quitc; - char t_startc; - char t_stopc; - char t_eofc; - char t_brkc; - }; - -struct ltchars - { - char t_suspc; /* stop process signal */ - char t_dsuspc; /* delayed stop process signal */ - char t_rprntc; /* reprint line */ - char t_flushc; /* flush output (toggles) */ - char t_werasc; /* word erase */ - char t_lnextc; /* literal next character */ - }; - -#endif /* defined(__BSD) */ - #define NCCS 32 struct termios { @@ -66,44 +32,31 @@ struct termios tcflag_t c_oflag; /* output mode flags */ tcflag_t c_cflag; /* control mode flags */ tcflag_t c_lflag; /* local mode flags */ - cc_t c_line; /* line discipline */ + cc_t c_line; /* line discipline */ cc_t c_cc[NCCS]; /* control characters */ }; /* c_cc characters */ -#define VINTR 0 /* Interrupt character [ISIG]. */ -#define VQUIT 1 /* Quit character [ISIG]. */ -#define VERASE 2 /* Erase character [ICANON]. */ -#define VKILL 3 /* Kill-line character [ICANON]. */ -#define VMIN 4 /* Minimum number of bytes read at once [!ICANON]. */ -#define VTIME 5 /* Time-out value (tenths of a second) [!ICANON]. */ -#ifdef __USE_BSD -# define VEOL2 6 /* Second EOL character [ICANON]. */ -/* The next two are guesses ... */ -# define VSWTC 7 /* ??? */ -#endif +#define VINTR 0 /* Interrupt character [ISIG]. */ +#define VQUIT 1 /* Quit character [ISIG]. */ +#define VERASE 2 /* Erase character [ICANON]. */ +#define VKILL 3 /* Kill-line character [ICANON]. */ +#define VMIN 4 /* Minimum number of bytes read at once [!ICANON]. */ +#define VTIME 5 /* Time-out value (tenths of a second) [!ICANON]. */ +#define VEOL2 6 /* Second EOL character [ICANON]. */ +#define VSWTC 7 #define VSWTCH VSWTC -#define VSTART 8 /* Start (X-ON) character [IXON, IXOFF]. */ -#define VSTOP 9 /* Stop (X-OFF) character [IXON, IXOFF]. */ -#define VSUSP 10 /* Suspend character [ISIG]. */ -#if 0 -/* - * VDSUSP is not supported - */ -#if defined __USE_BSD -# define VDSUSP 11 /* Delayed suspend character [ISIG]. */ -#endif -#endif -#ifdef __USE_BSD -# define VREPRINT 12 /* Reprint-line character [ICANON]. */ -#endif -#ifdef __USE_BSD -# define VDISCARD 13 /* Discard character [IEXTEN]. */ -# define VWERASE 14 /* Word-erase character [ICANON]. */ -# define VLNEXT 15 /* Literal-next character [IEXTEN]. */ -#endif -#define VEOF 16 /* End-of-file character [ICANON]. */ -#define VEOL 17 /* End-of-line character [ICANON]. */ +#define VSTART 8 /* Start (X-ON) character [IXON, IXOFF]. */ +#define VSTOP 9 /* Stop (X-OFF) character [IXON, IXOFF]. */ +#define VSUSP 10 /* Suspend character [ISIG]. */ + /* VDSUSP is not supported on Linux. */ +/* #define VDSUSP 11 / * Delayed suspend character [ISIG]. */ +#define VREPRINT 12 /* Reprint-line character [ICANON]. */ +#define VDISCARD 13 /* Discard character [IEXTEN]. */ +#define VWERASE 14 /* Word-erase character [ICANON]. */ +#define VLNEXT 15 /* Literal-next character [IEXTEN]. */ +#define VEOF 16 /* End-of-file character [ICANON]. */ +#define VEOL 17 /* End-of-line character [ICANON]. */ /* c_iflag bits */ #define IGNBRK 0000001 /* Ignore break condition. */ @@ -115,28 +68,22 @@ struct termios #define INLCR 0000100 /* Map NL to CR on input. */ #define IGNCR 0000200 /* Ignore CR. */ #define ICRNL 0000400 /* Map CR to NL on input. */ -#ifdef __USE_BSD -# define IUCLC 0001000 /* Map upper case to lower case on input. */ -#endif +#define IUCLC 0001000 /* Map upper case to lower case on input. */ #define IXON 0002000 /* Enable start/stop output control. */ -#ifdef __USE_BSD -# define IXANY 0004000 /* Any character will restart after stop. */ -#endif +#define IXANY 0004000 /* Any character will restart after stop. */ #define IXOFF 0010000 /* Enable start/stop input control. */ -#ifdef __USE_BSD -# define IMAXBEL 0020000 /* Ring bell when input queue is full. */ -#endif +#define IMAXBEL 0020000 /* Ring bell when input queue is full. */ /* c_oflag bits */ #define OPOST 0000001 /* Perform output processing. */ -#ifdef __USE_BSD -# define OLCUC 0000002 /* Map lower case to upper case on output. */ -# define ONLCR 0000004 /* Map NL to CR-NL on output. */ -# define OCRNL 0000010 -# define ONOCR 0000020 -# define ONLRET 0000040 -# define OFILL 0000100 -# define OFDEL 0000200 +#define OLCUC 0000002 /* Map lower case to upper case on output. */ +#define ONLCR 0000004 /* Map NL to CR-NL on output. */ +#define OCRNL 0000010 +#define ONOCR 0000020 +#define ONLRET 0000040 +#define OFILL 0000100 +#define OFDEL 0000200 +#if defined __USE_MISC || defined __USE_XOPEN # define NLDLY 0000400 # define NL0 0000000 # define NL1 0000400 @@ -150,24 +97,26 @@ struct termios # define TAB1 0004000 # define TAB2 0010000 # define TAB3 0014000 -# define XTABS 0014000 # define BSDLY 0020000 # define BS0 0000000 # define BS1 0020000 -# define VTDLY 0040000 -# define VT0 0000000 -# define VT1 0040000 # define FFDLY 0100000 # define FF0 0000000 # define FF1 0100000 -/* -#define PAGEOUT ??? -#define WRAP ??? - */ +#endif + +#define VTDLY 0040000 +#define VT0 0000000 +#define VT1 0040000 + +#ifdef __USE_MISC +# define XTABS 0014000 #endif /* c_cflag bit meaning */ -#define CBAUD 0010017 +#ifdef __USE_MISC +# define CBAUD 0010017 +#endif #define B0 0000000 /* hang up */ #define B50 0000001 #define B75 0000002 @@ -184,8 +133,10 @@ struct termios #define B9600 0000015 #define B19200 0000016 #define B38400 0000017 -#define EXTA B19200 -#define EXTB B38400 +#ifdef __USE_MISC +# define EXTA B19200 +# define EXTB B38400 +#endif #define CSIZE 0000060 /* Number of bits per byte (mask). */ #define CS5 0000000 /* 5 bits per byte. */ #define CS6 0000020 /* 6 bits per byte. */ @@ -197,24 +148,26 @@ struct termios #define PARODD 0001000 /* Odd parity instead of even. */ #define HUPCL 0002000 /* Hang up on last close. */ #define CLOCAL 0004000 /* Ignore modem status lines. */ -#ifdef __USE_BSD +#ifdef __USE_MISC # define CBAUDEX 0010000 -# define B57600 0010001 -# define B115200 0010002 -# define B230400 0010003 -# define B460800 0010004 -# define B500000 0010005 -# define B576000 0010006 -# define B921600 0010007 -# define B1000000 0010010 -# define B1152000 0010011 -# define B1500000 0010012 -# define B2000000 0010013 -# define B2500000 0010014 -# define B3000000 0010015 -# define B3500000 0010016 -# define B4000000 0010017 -# define __MAX_BAUD B4000000 +#endif +#define B57600 0010001 +#define B115200 0010002 +#define B230400 0010003 +#define B460800 0010004 +#define B500000 0010005 +#define B576000 0010006 +#define B921600 0010007 +#define B1000000 0010010 +#define B1152000 0010011 +#define B1500000 0010012 +#define B2000000 0010013 +#define B2500000 0010014 +#define B3000000 0010015 +#define B3500000 0010016 +#define B4000000 0010017 +#define __MAX_BAUD B4000000 +#ifdef __USE_MISC # define CIBAUD 002003600000 /* input baud rate (not used) */ # define CRTSCTS 020000000000 /* flow control */ #endif @@ -222,20 +175,20 @@ struct termios /* c_lflag bits */ #define ISIG 0000001 /* Enable signals. */ #define ICANON 0000002 /* Do erase and kill processing. */ -#define XCASE 0000004 +#if defined __USE_MISC || defined __USE_XOPEN +# define XCASE 0000004 +#endif #define ECHO 0000010 /* Enable echo. */ #define ECHOE 0000020 /* Visual erase for ERASE. */ #define ECHOK 0000040 /* Echo NL after KILL. */ #define ECHONL 0000100 /* Echo NL even if ECHO is off. */ #define NOFLSH 0000200 /* Disable flush after interrupt. */ #define IEXTEN 0000400 /* Enable DISCARD and LNEXT. */ -#ifdef __USE_BSD +#ifdef __USE_MISC # define ECHOCTL 0001000 /* Echo control characters as ^X. */ # define ECHOPRT 0002000 /* Hardcopy visual erase. */ # define ECHOKE 0004000 /* Visual erase for KILL. */ -#endif -#define FLUSHO 0020000 -#ifdef __USE_BSD +# define FLUSHO 0020000 # define PENDIN 0040000 /* Retype pending input (state). */ #endif #define TOSTOP 0100000 /* Send SIGTTOU for background output. */ From 35b1d4b18efa11251adaaeca25f3b2983147734e Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 15 Oct 2001 11:56:11 +0000 Subject: [PATCH 2696/4487] Make sysmips() prototype a varargs prototype. Remove dependency from kernel header files. --- sysdeps/unix/sysv/linux/mips/sys/sysmips.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/sys/sysmips.h b/sysdeps/unix/sysv/linux/mips/sys/sysmips.h index 642a31629d..0677cafaa4 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/sysmips.h +++ b/sysdeps/unix/sysv/linux/mips/sys/sysmips.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 92, 94, 95, 96, 97, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1997, 2000, 2001 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 @@ -22,14 +22,21 @@ #include /* - * Get the kernel definition for sysmips(2) + * Commands for the sysmips(2) call + * + * sysmips(2) is deprecated - though some existing software uses it. + * We only support the following commands. Sysmips exists for compatibility + * purposes only so new software should avoid it. */ -#include +#define SETNAME 1 /* set hostname */ +#define FLUSH_CACHE 3 /* writeback and invalidate caches */ +#define MIPS_FIXADE 7 /* control address error fixing */ +#define MIPS_RDNVRAM 10 /* read NVRAM */ +#define MIPS_ATOMIC_SET 2001 /* atomically set variable */ __BEGIN_DECLS -extern int sysmips (__const int cmd, __const int arg1, - __const int arg2, __const int arg3) __THROW; +extern int sysmips (__const int cmd, ...) __THROW; __END_DECLS From c70d76bb8e489b6a6855a43fd92cf66f0f6b249b Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 16 Oct 2001 14:20:17 +0000 Subject: [PATCH 2697/4487] * sysdeps/m68k/setjmp.c: Also define setjmp and _setjmp if BSD_SETJMP or BSD__SETJMP is defined, resp. * sysdeps/m68k/bsd-setjmp.c: Inline setjmp code instead of making a tail call to __sigsetjmp that would require extending the caller's frame. * sysdeps/m68k/bsd-_setjmp.c: Likewise. * sysdeps/m68k/bsd-setjmp.S: Deleted. * sysdeps/m68k/bsd-_setjmp.S: Deleted. --- sysdeps/m68k/{bsd-_setjmp.S => bsd-_setjmp.c} | 34 ++----------------- sysdeps/m68k/{bsd-setjmp.S => bsd-setjmp.c} | 32 ++--------------- sysdeps/m68k/setjmp.c | 16 +++++++-- 3 files changed, 20 insertions(+), 62 deletions(-) rename sysdeps/m68k/{bsd-_setjmp.S => bsd-_setjmp.c} (50%) rename sysdeps/m68k/{bsd-setjmp.S => bsd-setjmp.c} (51%) diff --git a/sysdeps/m68k/bsd-_setjmp.S b/sysdeps/m68k/bsd-_setjmp.c similarity index 50% rename from sysdeps/m68k/bsd-_setjmp.S rename to sysdeps/m68k/bsd-_setjmp.c index a0e32bd0e1..ee2964e3be 100644 --- a/sysdeps/m68k/bsd-_setjmp.S +++ b/sysdeps/m68k/bsd-_setjmp.c @@ -1,5 +1,5 @@ /* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. m68k version. - Copyright (C) 1994, 1997 Free Software Foundation, Inc. + Copyright (C) 1994, 1997, 2001 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 @@ -17,33 +17,5 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -/* This just does a tail-call to `__sigsetjmp (ARG, 0)'. - We cannot do it in C because it must be a tail-call, so frame-unwinding - in setjmp doesn't clobber the state restored by longjmp. */ - -#include - -#ifdef MOTOROLA_SYNTAX -#define d0 %d0 -#define d1 %d1 -#define PUSH(reg) move.l reg, -(%sp) -#define POP(reg) move.l (%sp)+, reg -#define PUSH0 clr.l -(%sp) -#else -#define PUSH(reg) movel reg, sp@- -#define POP(reg) movel sp@+, reg -#define PUSH0 clrl sp@- -#endif - -ENTRY (_setjmp) - POP (d0) /* Pop return PC. */ - POP (d1) /* Pop jmp_buf argument. */ - PUSH0 /* Push second argument of zero. */ - PUSH (d1) /* Push back first argument. */ - PUSH (d0) /* Push back return PC. */ -#ifdef PIC - bra.l C_SYMBOL_NAME (__sigsetjmp@PLTPC) -#else - jmp C_SYMBOL_NAME (__sigsetjmp) -#endif -END (_setjmp) +#define BSD__SETJMP +#include diff --git a/sysdeps/m68k/bsd-setjmp.S b/sysdeps/m68k/bsd-setjmp.c similarity index 51% rename from sysdeps/m68k/bsd-setjmp.S rename to sysdeps/m68k/bsd-setjmp.c index e1462476a5..59b5acfeeb 100644 --- a/sysdeps/m68k/bsd-setjmp.S +++ b/sysdeps/m68k/bsd-setjmp.c @@ -1,5 +1,5 @@ /* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. m68k version. - Copyright (C) 1994, 1997 Free Software Foundation, Inc. + Copyright (C) 1994, 1997, 2001 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 @@ -17,31 +17,5 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -/* This just does a tail-call to `__sigsetjmp (ARG, 1)'. - We cannot do it in C because it must be a tail-call, so frame-unwinding - in setjmp doesn't clobber the state restored by longjmp. */ - -#include - -#ifdef MOTOROLA_SYNTAX -#define d0 %d0 -#define d1 %d1 -#define PUSH(reg) move.l reg, -(%sp) -#define POP(reg) move.l (%sp)+, reg -#else -#define PUSH(reg) movel reg, sp@- -#define POP(reg) movel sp@+, reg -#endif - -ENTRY (setjmp) - POP (d0) /* Pop return PC. */ - POP (d1) /* Pop jmp_buf argument. */ - pea 1 /* Push second argument of one. */ - PUSH (d1) /* Push back first argument. */ - PUSH (d0) /* Push back return PC. */ -#ifdef PIC - bra.l C_SYMBOL_NAME (__sigsetjmp@PLTPC) -#else - jmp C_SYMBOL_NAME (__sigsetjmp) -#endif -END (setjmp) +#define BSD_SETJMP +#include diff --git a/sysdeps/m68k/setjmp.c b/sysdeps/m68k/setjmp.c index 04568623f9..80672ad4db 100644 --- a/sysdeps/m68k/setjmp.c +++ b/sysdeps/m68k/setjmp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1994, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1994, 1997, 2001 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,7 +20,15 @@ /* Save the current program position in ENV and return 0. */ int +#if defined BSD_SETJMP +# undef setjmp +setjmp (jmp_buf env) +#elif defined BSD__SETJMP +# undef _setjmp +_setjmp (jmp_buf env) +#else __sigsetjmp (jmp_buf env, int savemask) +#endif { /* Save data registers D1 through D7. */ asm volatile ("movem%.l %/d1-%/d7, %0" @@ -39,12 +47,16 @@ __sigsetjmp (jmp_buf env, int savemask) /* Save caller's SP, not our own. */ env[0].__jmpbuf[0].__sp = (void *) &env; -#if defined(__HAVE_68881__) || defined(__HAVE_FPU__) +#if defined __HAVE_68881__ || defined __HAVE_FPU__ /* Save floating-point (68881) registers FP0 through FP7. */ asm volatile ("fmovem%.x %/fp0-%/fp7, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[0])); #endif +#if defined BSD_SETJMP || defined BSD__SETJMP + return 0; +#else /* Save the signal mask if requested. */ return __sigjmp_save (env, savemask); +#endif } From dfc1be7af0c5c28db0118a6af9b2462ca99e7fda Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 16 Oct 2001 15:31:18 +0000 Subject: [PATCH 2698/4487] Fix braino in last change. --- sysdeps/m68k/setjmp.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sysdeps/m68k/setjmp.c b/sysdeps/m68k/setjmp.c index 80672ad4db..19aa131a45 100644 --- a/sysdeps/m68k/setjmp.c +++ b/sysdeps/m68k/setjmp.c @@ -22,9 +22,11 @@ int #if defined BSD_SETJMP # undef setjmp +# define savemask 1 setjmp (jmp_buf env) #elif defined BSD__SETJMP # undef _setjmp +# define savemask 0 _setjmp (jmp_buf env) #else __sigsetjmp (jmp_buf env, int savemask) @@ -53,10 +55,6 @@ __sigsetjmp (jmp_buf env, int savemask) : : "m" (env[0].__jmpbuf[0].__fpregs[0])); #endif -#if defined BSD_SETJMP || defined BSD__SETJMP - return 0; -#else /* Save the signal mask if requested. */ return __sigjmp_save (env, savemask); -#endif } From dcac2c1ec862e6e3417a27154a2dbcd75a0e5cb7 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 16 Oct 2001 20:21:38 +0000 Subject: [PATCH 2699/4487] Updated for fixed cbrtl implementation. --- sysdeps/m68k/fpu/libm-test-ulps | 83 ++++++++++++++------------------- 1 file changed, 36 insertions(+), 47 deletions(-) diff --git a/sysdeps/m68k/fpu/libm-test-ulps b/sysdeps/m68k/fpu/libm-test-ulps index a7372ab46b..c6c3ffa596 100644 --- a/sysdeps/m68k/fpu/libm-test-ulps +++ b/sysdeps/m68k/fpu/libm-test-ulps @@ -144,22 +144,11 @@ ldouble: 1 # cbrt Test "cbrt (-0.001) == -0.1": -ildouble: 102 -ldouble: 102 -Test "cbrt (-27.0) == -3.0": -ildouble: 948 -ldouble: 948 +ildouble: 1 +ldouble: 1 Test "cbrt (0.7) == 0.8879040017426007084": double: 1 idouble: 1 -ildouble: 345 -ldouble: 345 -Test "cbrt (0.970299) == 0.99": -ildouble: 142 -ldouble: 142 -Test "cbrt (8) == 2": -ildouble: 191 -ldouble: 191 # ccos Test "Real part of: ccos (-2 - 3 i) == -4.1896256909688072301 - 9.1092278937553365979 i": @@ -241,9 +230,9 @@ double: 1 idouble: 1 Test "cos (M_PI_6l * 2.0) == 0.5": double: 1 -float: 0.5 +float: 1 idouble: 1 -ifloat: 0.5 +ifloat: 1 ildouble: 1 ldouble: 1 Test "cos (M_PI_6l * 4.0) == -0.5": @@ -254,12 +243,12 @@ ifloat: 1 ildouble: 1 ldouble: 1 Test "cos (pi/2) == 0": -double: 0.2758 -float: 0.3667 -idouble: 0.2758 -ifloat: 0.3667 -ildouble: 0.25 -ldouble: 0.25 +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 # cosh Test "cosh (0.7) == 1.255169005630943018": @@ -283,13 +272,13 @@ ifloat: 6 ildouble: 2 ldouble: 2 Test "Real part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i": -float: 0.5 -ifloat: 0.5 +float: 1 +ifloat: 1 Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i": -double: 1.1031 -float: 2.5333 -idouble: 1.1031 -ifloat: 2.5333 +double: 2 +float: 3 +idouble: 2 +ifloat: 3 ildouble: 1 ldouble: 1 @@ -353,8 +342,8 @@ Test "Imaginary part of: ctanh (-2 - 3 i) == -0.9653858790221331242 + 0.00988437 ildouble: 25 ldouble: 25 Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i": -double: 0.5 -idouble: 0.5 +double: 1 +idouble: 1 Test "Real part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i": float: 1 ifloat: 1 @@ -632,8 +621,8 @@ Test "log (2) == M_LN2l": ildouble: 1 ldouble: 1 Test "log (e) == 1": -float: 0.5 -ifloat: 0.5 +float: 1 +ifloat: 1 # log10 Test "log10 (0.7) == -0.15490195998574316929": @@ -682,9 +671,9 @@ double: 1 idouble: 1 Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": double: 1 -float: 0.5 +float: 1 idouble: 1 -ifloat: 0.5 +ifloat: 1 ildouble: 1 ldouble: 1 Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res": @@ -695,12 +684,12 @@ ifloat: 1 ildouble: 1 ldouble: 1 Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res": -double: 0.2758 -float: 0.3667 -idouble: 0.2758 -ifloat: 0.3667 -ildouble: 0.25 -ldouble: 0.25 +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 # sinh Test "sinh (0.7) == 0.75858370183953350346": @@ -712,8 +701,8 @@ Test "tan (0.7) == 0.84228838046307944812813500221293775": ildouble: 1 ldouble: 1 Test "tan (pi/4) == 1": -double: 0.5 -idouble: 0.5 +double: 1 +idouble: 1 # tgamma Test "tgamma (-0.5) == -2 sqrt (pi)": @@ -988,8 +977,8 @@ ldouble: 1 Function: "cbrt": double: 1 idouble: 1 -ildouble: 948 -ldouble: 948 +ildouble: 1 +ldouble: 1 Function: Real part of "ccos": float: 1 @@ -1064,9 +1053,9 @@ ildouble: 5 ldouble: 5 Function: Imaginary part of "cpow": -double: 1.1031 +double: 2 float: 6 -idouble: 1.1031 +idouble: 2 ifloat: 6 ildouble: 2 ldouble: 2 @@ -1238,8 +1227,8 @@ float: 1 ifloat: 1 Function: "tan": -double: 0.5 -idouble: 0.5 +double: 1 +idouble: 1 ildouble: 1 ldouble: 1 From 80ad17cac244c108fdccbe2fd10eaed91aa71e6c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 27 Oct 2001 00:03:32 +0000 Subject: [PATCH 2700/4487] (DL_CALL_FCT): Cast to void *. Use __BEGIN_DECLS/__END_DECLS around prototypes. --- sysdeps/mips/bits/dlfcn.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sysdeps/mips/bits/dlfcn.h b/sysdeps/mips/bits/dlfcn.h index 2380caa9d4..c5b4c5950b 100644 --- a/sysdeps/mips/bits/dlfcn.h +++ b/sysdeps/mips/bits/dlfcn.h @@ -1,5 +1,5 @@ /* System dependent definitions for run-time dynamic loading. - Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1999, 2000, 2001 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 @@ -52,8 +52,13 @@ foo = DL_CALL_FCT (fctp, (arg1, arg2)); */ # define DL_CALL_FCT(fctp, args) \ - (_dl_mcount_wrapper_check (fctp), (*(fctp)) args) + (_dl_mcount_wrapper_check ((void *) (fctp)), (*(fctp)) args) + +__BEGIN_DECLS /* This function calls the profiling functions. */ extern void _dl_mcount_wrapper_check (void *__selfpc) __THROW; + +__END_DECLS + #endif From ffd88164dcad8dc9620c3d2cb3aa9bd154af1a7b Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 9 Nov 2001 19:57:55 +0000 Subject: [PATCH 2701/4487] New file to fix RLIM_INFINITY. --- sysdeps/unix/sysv/linux/m68k/bits/resource.h | 209 +++++++++++++++++++ 1 file changed, 209 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/bits/resource.h diff --git a/sysdeps/unix/sysv/linux/m68k/bits/resource.h b/sysdeps/unix/sysv/linux/m68k/bits/resource.h new file mode 100644 index 0000000000..e6fa04abcc --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/bits/resource.h @@ -0,0 +1,209 @@ +/* Bit values & structures for resource limits. Linux/m68k version. + Copyright (C) 1994,1996,1997,1998,1999,2000,2001 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 _SYS_RESOURCE_H +# error "Never use directly; include instead." +#endif + +#include + +/* Transmute defines to enumerations. The macro re-definitions are + necessary because some programs want to test for operating system + features with #ifdef RUSAGE_SELF. In ISO C the reflexive + definition is a no-op. */ + +/* Kinds of resource limit. */ +enum __rlimit_resource +{ + /* Per-process CPU limit, in seconds. */ + RLIMIT_CPU = 0, +#define RLIMIT_CPU RLIMIT_CPU + + /* Largest file that can be created, in bytes. */ + RLIMIT_FSIZE = 1, +#define RLIMIT_FSIZE RLIMIT_FSIZE + + /* Maximum size of data segment, in bytes. */ + RLIMIT_DATA = 2, +#define RLIMIT_DATA RLIMIT_DATA + + /* Maximum size of stack segment, in bytes. */ + RLIMIT_STACK = 3, +#define RLIMIT_STACK RLIMIT_STACK + + /* Largest core file that can be created, in bytes. */ + RLIMIT_CORE = 4, +#define RLIMIT_CORE RLIMIT_CORE + + /* Largest resident set size, in bytes. + This affects swapping; processes that are exceeding their + resident set size will be more likely to have physical memory + taken from them. */ + RLIMIT_RSS = 5, +#define RLIMIT_RSS RLIMIT_RSS + + /* Number of open files. */ + RLIMIT_NOFILE = 7, + RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */ +#define RLIMIT_NOFILE RLIMIT_NOFILE +#define RLIMIT_OFILE RLIMIT_OFILE + + /* Address space limit. */ + RLIMIT_AS = 9, +#define RLIMIT_AS RLIMIT_AS + + /* Number of processes. */ + RLIMIT_NPROC = 6, +#define RLIMIT_NPROC RLIMIT_NPROC + + /* Locked-in-memory address space. */ + RLIMIT_MEMLOCK = 8, +#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK + + /* Maximum number of file locks. */ + RLIMIT_LOCKS = 10, +#define RLIMIT_LOCKS RLIMIT_LOCKS + + RLIMIT_NLIMITS = 11, + RLIM_NLIMITS = RLIMIT_NLIMITS +#define RLIMIT_NLIMITS RLIMIT_NLIMITS +#define RLIM_NLIMITS RLIM_NLIMITS +}; + +/* Value to indicate that there is no limit. */ +#ifndef __USE_FILE_OFFSET64 +# define RLIM_INFINITY ((unsigned long int)(~0UL)) +#else +# define RLIM_INFINITY 0xffffffffffffffffuLL +#endif + +#ifdef __USE_LARGEFILE64 +# define RLIM64_INFINITY 0xffffffffffffffffuLL +#endif + +/* We can represent all limits. */ +#define RLIM_SAVED_MAX RLIM_INFINITY +#define RLIM_SAVED_CUR RLIM_INFINITY + + +/* Type for resource quantity measurement. */ +#ifndef __USE_FILE_OFFSET64 +typedef __rlim_t rlim_t; +#else +typedef __rlim64_t rlim_t; +#endif +#ifdef __USE_LARGEFILE64 +typedef __rlim64_t rlim64_t; +#endif + +struct rlimit + { + /* The current (soft) limit. */ + rlim_t rlim_cur; + /* The hard limit. */ + rlim_t rlim_max; + }; + +#ifdef __USE_LARGEFILE64 +struct rlimit64 + { + /* The current (soft) limit. */ + rlim64_t rlim_cur; + /* The hard limit. */ + rlim64_t rlim_max; + }; +#endif + +/* Whose usage statistics do you want? */ +enum __rusage_who +{ + /* The calling process. */ + RUSAGE_SELF = 0, +#define RUSAGE_SELF RUSAGE_SELF + + /* All of its terminated child processes. */ + RUSAGE_CHILDREN = -1, +#define RUSAGE_CHILDREN RUSAGE_CHILDREN + + /* Both. */ + RUSAGE_BOTH = -2 +#define RUSAGE_BOTH RUSAGE_BOTH +}; + +#define __need_timeval +#include /* For `struct timeval'. */ + +/* Structure which says how much of each resource has been used. */ +struct rusage + { + /* Total amount of user time used. */ + struct timeval ru_utime; + /* Total amount of system time used. */ + struct timeval ru_stime; + /* Maximum resident set size (in kilobytes). */ + long int ru_maxrss; + /* Amount of sharing of text segment memory + with other processes (kilobyte-seconds). */ + long int ru_ixrss; + /* Amount of data segment memory used (kilobyte-seconds). */ + long int ru_idrss; + /* Amount of stack memory used (kilobyte-seconds). */ + long int ru_isrss; + /* Number of soft page faults (i.e. those serviced by reclaiming + a page from the list of pages awaiting reallocation. */ + long int ru_minflt; + /* Number of hard page faults (i.e. those that required I/O). */ + long int ru_majflt; + /* Number of times a process was swapped out of physical memory. */ + long int ru_nswap; + /* Number of input operations via the file system. Note: This + and `ru_oublock' do not include operations with the cache. */ + long int ru_inblock; + /* Number of output operations via the file system. */ + long int ru_oublock; + /* Number of IPC messages sent. */ + long int ru_msgsnd; + /* Number of IPC messages received. */ + long int ru_msgrcv; + /* Number of signals delivered. */ + long int ru_nsignals; + /* Number of voluntary context switches, i.e. because the process + gave up the process before it had to (usually to wait for some + resource to be available). */ + long int ru_nvcsw; + /* Number of involuntary context switches, i.e. a higher priority process + became runnable or the current process used up its time slice. */ + long int ru_nivcsw; + }; + +/* Priority limits. */ +#define PRIO_MIN -20 /* Minimum priority a process can have. */ +#define PRIO_MAX 20 /* Maximum priority a process can have. */ + +/* The type of the WHICH argument to `getpriority' and `setpriority', + indicating what flavor of entity the WHO argument specifies. */ +enum __priority_which +{ + PRIO_PROCESS = 0, /* WHO is a process ID. */ +#define PRIO_PROCESS PRIO_PROCESS + PRIO_PGRP = 1, /* WHO is a process group ID. */ +#define PRIO_PGRP PRIO_PGRP + PRIO_USER = 2 /* WHO is a user ID. */ +#define PRIO_USER PRIO_USER +}; From 89a817b0877b97fc93792f2387ad9b29c338fb7c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 16 Nov 2001 01:06:40 +0000 Subject: [PATCH 2702/4487] GCC frame description for Alpha. --- sysdeps/alpha/gccframe.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 sysdeps/alpha/gccframe.h diff --git a/sysdeps/alpha/gccframe.h b/sysdeps/alpha/gccframe.h new file mode 100644 index 0000000000..b67022548f --- /dev/null +++ b/sysdeps/alpha/gccframe.h @@ -0,0 +1,22 @@ +/* Definition of object in frame unwind info. alpha version. + Copyright (C) 2001 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. */ + +#define FIRST_PSEUDO_REGISTER 64 + +#include From ee448304d68ead71a666fa5d8553362980bb41f8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 16 Nov 2001 01:07:20 +0000 Subject: [PATCH 2703/4487] GCC frame description for Arm. --- sysdeps/arm/gccframe.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 sysdeps/arm/gccframe.h diff --git a/sysdeps/arm/gccframe.h b/sysdeps/arm/gccframe.h new file mode 100644 index 0000000000..ef8df2630e --- /dev/null +++ b/sysdeps/arm/gccframe.h @@ -0,0 +1,22 @@ +/* Definition of object in frame unwind info. arm version. + Copyright (C) 2001 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. */ + +#define FIRST_PSEUDO_REGISTER 27 + +#include From b72b3cc5af1b32c96d4b36949a761dded0eca503 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 16 Nov 2001 01:07:57 +0000 Subject: [PATCH 2704/4487] GCC frame description for PA. --- sysdeps/hppa/gccframe.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 sysdeps/hppa/gccframe.h diff --git a/sysdeps/hppa/gccframe.h b/sysdeps/hppa/gccframe.h new file mode 100644 index 0000000000..65e44dfd73 --- /dev/null +++ b/sysdeps/hppa/gccframe.h @@ -0,0 +1,23 @@ +/* Definition of object in frame unwind info. hppa version. + Copyright (C) 2001 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. */ + +/* Note: For hppa64 this is 61 */ +#define DWARF_FRAME_REGISTERS 89 + +#include From 03012549bd3408b5b72026a94d596f133086b000 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 16 Nov 2001 01:11:16 +0000 Subject: [PATCH 2705/4487] GCC frame description for m68k. --- sysdeps/m68k/gccframe.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 sysdeps/m68k/gccframe.h diff --git a/sysdeps/m68k/gccframe.h b/sysdeps/m68k/gccframe.h new file mode 100644 index 0000000000..452f53f626 --- /dev/null +++ b/sysdeps/m68k/gccframe.h @@ -0,0 +1,22 @@ +/* Definition of object in frame unwind info. m68k version. + Copyright (C) 2001 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. */ + +#define FIRST_PSEUDO_REGISTER 24 + +#include From 532e4e4b65ba45a15bff60ba2d3f1e3ddd07fa29 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 16 Nov 2001 01:12:04 +0000 Subject: [PATCH 2706/4487] GCC frame description for MIPS. --- sysdeps/mips/gccframe.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 sysdeps/mips/gccframe.h diff --git a/sysdeps/mips/gccframe.h b/sysdeps/mips/gccframe.h new file mode 100644 index 0000000000..ec9311caca --- /dev/null +++ b/sysdeps/mips/gccframe.h @@ -0,0 +1,22 @@ +/* Definition of object in frame unwind info. mips version. + Copyright (C) 2001 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. */ + +#define FIRST_PSEUDO_REGISTER 76 + +#include From 816763d76a19946824c1518deb25e0bf209feab4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 16 Nov 2001 01:14:52 +0000 Subject: [PATCH 2707/4487] GCC frame description for VAX. --- sysdeps/vax/gccframe.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 sysdeps/vax/gccframe.h diff --git a/sysdeps/vax/gccframe.h b/sysdeps/vax/gccframe.h new file mode 100644 index 0000000000..323d5115d4 --- /dev/null +++ b/sysdeps/vax/gccframe.h @@ -0,0 +1,22 @@ +/* Definition of object in frame unwind info. vax version. + Copyright (C) 2001 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. */ + +#define DWARF_FRAME_REGISTERS 16 + +#include From 9bfdd6609c500814cd604460017214948628849d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 16 Nov 2001 01:22:33 +0000 Subject: [PATCH 2708/4487] (__register_frame_info, __deregister_frame_info): Move to elf/Versions. --- sysdeps/unix/sysv/linux/alpha/Versions | 3 +-- sysdeps/unix/sysv/linux/arm/Versions | 3 +-- sysdeps/unix/sysv/linux/m68k/Versions | 3 +-- sysdeps/unix/sysv/linux/mips/Versions | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/Versions b/sysdeps/unix/sysv/linux/alpha/Versions index d89ef6a061..c18816ca6f 100644 --- a/sysdeps/unix/sysv/linux/alpha/Versions +++ b/sysdeps/unix/sysv/linux/alpha/Versions @@ -6,8 +6,7 @@ libc { # Exception handling support functions from libgcc __register_frame; __register_frame_table; __deregister_frame; - __register_frame_info; __deregister_frame_info; __frame_state_for; - __register_frame_info_table; + __frame_state_for; __register_frame_info_table; # b* bus_base; bus_base_sparse; diff --git a/sysdeps/unix/sysv/linux/arm/Versions b/sysdeps/unix/sysv/linux/arm/Versions index aeda9fa5fb..32cb185505 100644 --- a/sysdeps/unix/sysv/linux/arm/Versions +++ b/sysdeps/unix/sysv/linux/arm/Versions @@ -2,8 +2,7 @@ libc { GLIBC_2.0 { # Exception handling support functions from libgcc __register_frame; __register_frame_table; __deregister_frame; - __register_frame_info; __deregister_frame_info; __frame_state_for; - __register_frame_info_table; + __frame_state_for; __register_frame_info_table; } GLIBC_2.1 { ioperm; iopl; diff --git a/sysdeps/unix/sysv/linux/m68k/Versions b/sysdeps/unix/sysv/linux/m68k/Versions index 6c650e2ce2..0799bf310e 100644 --- a/sysdeps/unix/sysv/linux/m68k/Versions +++ b/sysdeps/unix/sysv/linux/m68k/Versions @@ -2,8 +2,7 @@ libc { GLIBC_2.0 { # Exception handling support functions from libgcc __register_frame; __register_frame_table; __deregister_frame; - __register_frame_info; __deregister_frame_info; __frame_state_for; - __register_frame_info_table; + __frame_state_for; __register_frame_info_table; # c* cacheflush; diff --git a/sysdeps/unix/sysv/linux/mips/Versions b/sysdeps/unix/sysv/linux/mips/Versions index d65bf18cb0..f71d9b5d88 100644 --- a/sysdeps/unix/sysv/linux/mips/Versions +++ b/sysdeps/unix/sysv/linux/mips/Versions @@ -2,8 +2,7 @@ libc { GLIBC_2.0 { # Exception handling support functions from libgcc __register_frame; __register_frame_table; __deregister_frame; - __register_frame_info; __deregister_frame_info; __frame_state_for; - __register_frame_info_table; + __frame_state_for; __register_frame_info_table; # Needed by gcc: _flush_cache; From decdce5e7c400d1dd0f8564642f50c36cc24bff1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 16 Nov 2001 01:24:04 +0000 Subject: [PATCH 2709/4487] (sysdep-routines): Add framestate. --- sysdeps/unix/sysv/linux/alpha/Makefile | 8 ++++++++ sysdeps/unix/sysv/linux/arm/Makefile | 6 ++++++ sysdeps/unix/sysv/linux/m68k/Makefile | 6 ++++++ sysdeps/unix/sysv/linux/mips/Makefile | 8 ++++++++ 4 files changed, 28 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile index 62536ae1ae..5c04677086 100644 --- a/sysdeps/unix/sysv/linux/alpha/Makefile +++ b/sysdeps/unix/sysv/linux/alpha/Makefile @@ -23,3 +23,11 @@ ifeq ($(subdir),signal) sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \ rt_sigqueueinfo rt_sigaction rt_sigpending endif + +ifeq ($(subdir),elf) +ifeq (yes,$(build-shared)) +# This is needed to support g++ v2 and v3. +sysdep_routines += framestate +shared-only-routines += framestate +endif +endif diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile index aeaaa39fce..66a93ba8f3 100644 --- a/sysdeps/unix/sysv/linux/arm/Makefile +++ b/sysdeps/unix/sysv/linux/arm/Makefile @@ -19,4 +19,10 @@ sysdep-dl-routines += dl-procinfo sysdep_routines += dl-procinfo # extra shared linker files to link only into dl-allobjs.so sysdep-rtld-routines += dl-procinfo + +ifeq (yes,$(build-shared)) +# This is needed to support g++ v2 and v3. +sysdep_routines += framestate +shared-only-routines += framestate +endif endif diff --git a/sysdeps/unix/sysv/linux/m68k/Makefile b/sysdeps/unix/sysv/linux/m68k/Makefile index 55eeeabe10..83ea370afa 100644 --- a/sysdeps/unix/sysv/linux/m68k/Makefile +++ b/sysdeps/unix/sysv/linux/m68k/Makefile @@ -10,6 +10,12 @@ endif ifeq ($(subdir),elf) sysdep-others += lddlibc4 install-bin += lddlibc4 + +ifeq (yes,$(build-shared)) +# This is needed to support g++ v2 and v3. +sysdep_routines += framestate +shared-only-routines += framestate +endif endif ifeq ($(subdir),resource) diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile index 1f9fc2dd03..e46cfef7a5 100644 --- a/sysdeps/unix/sysv/linux/mips/Makefile +++ b/sysdeps/unix/sysv/linux/mips/Makefile @@ -9,3 +9,11 @@ sysdep_routines += cachectl cacheflush sysmips _test_and_set sysdep_headers += sys/cachectl.h sys/sysmips.h sys/tas.h endif + +ifeq ($(subdir),elf) +ifeq (yes,$(build-shared)) +# This is needed to support g++ v2 and v3. +sysdep_routines += framestate +shared-only-routines += framestate +endif +endif From 90a0de032a66d57d13508f2f3883dd106da8abef Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 26 Nov 2001 08:37:35 +0000 Subject: [PATCH 2710/4487] Remove __brk_addr alias, avoid warning. --- sysdeps/unix/sysv/linux/hppa/brk.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/sysdeps/unix/sysv/linux/hppa/brk.c b/sysdeps/unix/sysv/linux/hppa/brk.c index b534b17710..a4b4df2831 100644 --- a/sysdeps/unix/sysv/linux/hppa/brk.c +++ b/sysdeps/unix/sysv/linux/hppa/brk.c @@ -1,5 +1,5 @@ /* brk system call for Linux/HPPA. - Copyright (C) 1995, 1996, 2000 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 2000, 2001 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 @@ -24,17 +24,12 @@ /* This must be initialized data because commons can't have aliases. */ void *__curbrk = 0; -/* Old braindamage in GCC's crtstuff.c requires this symbol in an attempt - to work around different old braindamage in the old Linux ELF dynamic - linker. */ -weak_alias (__curbrk, ___brk_addr) - int __brk (void *addr) { void *newbrk; - __curbrk = newbrk = INLINE_SYSCALL(brk, 1, addr); + __curbrk = newbrk = (void *) INLINE_SYSCALL (brk, 1, addr); if (newbrk < addr) { From d70bbfe3bec9fa9a1402d76f8b8a1316d96183dd Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 12 Dec 2001 00:10:27 +0000 Subject: [PATCH 2711/4487] (elf_machine_runtime_setup): Reinitialize .plt for prelinked libraries where prelinking info cannot be used. (elf_machine_rela): If relocating R_ALPHA_JMP_SLOT in .gnu.conflict section, use RESOLVE_CONFLICT_FIND_MAP to find out reloc's link_map. --- sysdeps/alpha/dl-machine.h | 43 +++++++++++++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 3 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index a039f245db..c93da661bf 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -122,8 +122,30 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) *(Elf64_Addr *)(plt + 24) = (Elf64_Addr) l; /* If the first instruction of the plt entry is not - "br $28, plt0", we cannot do lazy relocation. */ - lazy = (*(unsigned int *)(plt + 32) == 0xc39ffff7); + "br $28, plt0", we have to reinitialize .plt for lazy relocation. */ + if (*(unsigned int *)(plt + 32) != 0xc39ffff7) + { + unsigned int val = 0xc39ffff7; + unsigned int *slot, *end; + const Elf64_Rela *rela = D_PTR (l, l_info[DT_JMPREL]); + Elf64_Addr l_addr = l->l_addr; + + /* br t12,.+4; ldq t12,12(t12); nop; jmp t12,(t12),.+4 */ + *(unsigned long *)plt = 0xa77b000cc3600000; + *(unsigned long *)(plt + 8) = 0x6b7b000047ff041f; + slot = (unsigned int *)(plt + 32); + end = (unsigned int *)(plt + 32 + + l->l_info[DT_PLTRELSZ]->d_un.d_val / 2); + while (slot < end) + { + /* br at,.plt+0 */ + *slot = val; + *(Elf64_Addr *) rela->r_offset = (Elf64_Addr) slot - l_addr; + val -= 3; + slot += 3; + ++rela; + } + } } return lazy; @@ -520,8 +542,23 @@ elf_machine_rela (struct link_map *map, if (r_type == R_ALPHA_GLOB_DAT) *reloc_addr = sym_value; - else if (r_type == R_ALPHA_JMP_SLOT) +#ifdef RESOLVE_CONFLICT_FIND_MAP + /* In .gnu.conflict section, R_ALPHA_JMP_SLOT relocations have + R_ALPHA_JMP_SLOT in lower 8 bits and the remaining 24 bits + are .rela.plt index. */ + else if ((r_type & 0xff) == R_ALPHA_JMP_SLOT) + { + /* elf_machine_fixup_plt needs the map reloc_addr points into, + while in _dl_resolve_conflicts map is _dl_loaded. */ + RESOLVE_CONFLICT_FIND_MAP (map, reloc_addr); + reloc = ((const Elf64_Rela *) D_PTR (map, l_info[DT_JMPREL])) + + (r_type >> 8); + elf_machine_fixup_plt (map, 0, reloc, reloc_addr, sym_value); + } +#else + else if (r_type == R_ALPHA_JMP_SLOT) elf_machine_fixup_plt (map, 0, reloc, reloc_addr, sym_value); +#endif #ifndef RTLD_BOOTSTRAP else if (r_type == R_ALPHA_REFQUAD) { From ef5f0af552ba4df453312b02ebedbbbf4bdbaaa3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 12 Dec 2001 00:11:15 +0000 Subject: [PATCH 2712/4487] Arm specific additions to struct link. --- sysdeps/arm/bits/link.h | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 sysdeps/arm/bits/link.h diff --git a/sysdeps/arm/bits/link.h b/sysdeps/arm/bits/link.h new file mode 100644 index 0000000000..648976d7d2 --- /dev/null +++ b/sysdeps/arm/bits/link.h @@ -0,0 +1,4 @@ +struct link_map_machine + { + Elf32_Addr plt; /* Address of .plt */ + }; From bcb5a520da93a21866233006feb20fc099384400 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 12 Dec 2001 00:11:47 +0000 Subject: [PATCH 2713/4487] (elf_machine_runtime_setup): Save original content of .got[1]. (ELF_MACHINE_NO_RELA): Only define if RTLD_BOOTSTRAP. (ELF_MACHINE_PLT_REL): Define. (elf_machine_rela, elf_machine_rela_relative): New. (elf_machine_lazy_rel): Reinitialize R_ARM_JUMP_SLOT address instead of adjusting it if prelinked and prelinking cannot be used. --- sysdeps/arm/dl-machine.h | 90 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 87 insertions(+), 3 deletions(-) diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 2d802b7e9b..cda424757b 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -92,6 +92,11 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) index into the .got section, load ip with &_GLOBAL_OFFSET_TABLE_[3], and then jump to _GLOBAL_OFFSET_TABLE[2]. */ got = (Elf32_Addr *) D_PTR (l, l_info[DT_PLTGOT]); + /* If a library is prelinked but we have to relocate anyway, + we have to be able to undo the prelinking of .got.plt. + The prelinker saved us here address of .plt. */ + if (got[1]) + l->l_mach.plt = got[1] + l->l_addr; got[1] = (Elf32_Addr) l; /* Identify this shared object. */ /* The got[2] entry contains the address of a function which gets @@ -334,8 +339,9 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) /* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */ #define ELF_MACHINE_JMP_SLOT R_ARM_JUMP_SLOT -/* The ARM never uses Elf32_Rela relocations. */ -#define ELF_MACHINE_NO_RELA 1 +/* ARM never uses Elf32_Rela relocations for the dynamic linker. + Prelinked libraries may use Elf32_Rela though. */ +#define ELF_MACHINE_PLT_REL 1 /* We define an initialization functions. This is called very early in _dl_sysdep_start. */ @@ -371,6 +377,12 @@ elf_machine_plt_value (struct link_map *map, const Elf32_Rel *reloc, #ifdef RESOLVE +/* ARM never uses Elf32_Rela relocations for the dynamic linker. + Prelinked libraries may use Elf32_Rela though. */ +#ifdef RTLD_BOOTSTRAP +#define ELF_MACHINE_NO_RELA 1 +#endif + extern char **_dl_argv; /* Deal with an out-of-range PC24 reloc. */ @@ -517,6 +529,64 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, } } +#ifndef RTLD_BOOTSTRAP +static inline void +elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, + const Elf32_Sym *sym, const struct r_found_version *version, + Elf32_Addr *const reloc_addr) +{ + const unsigned int r_type = ELF32_R_TYPE (reloc->r_info); + + if (__builtin_expect (r_type == R_ARM_RELATIVE, 0)) + *reloc_addr = map->l_addr + reloc->r_addend; +#ifndef RTLD_BOOTSTRAP + else if (__builtin_expect (r_type == R_ARM_NONE, 0)) + return; +#endif + else + { + const Elf32_Sym *const refsym = sym; + Elf32_Addr value = RESOLVE (&sym, version, r_type); + if (sym) + value += sym->st_value; + + switch (r_type) + { + case R_ARM_GLOB_DAT: + case R_ARM_JUMP_SLOT: + case R_ARM_ABS32: + *reloc_addr = value + reloc->r_addend; + break; + case R_ARM_PC24: + { + Elf32_Addr newvalue, topbits; + + newvalue = value + reloc->r_addend - (Elf32_Addr)reloc_addr; + topbits = newvalue & 0xfe000000; + if (topbits != 0xfe000000 && topbits != 0x00000000) + { + newvalue = fix_bad_pc24(reloc_addr, value) + - (Elf32_Addr)reloc_addr + (addend << 2); + topbits = newvalue & 0xfe000000; + if (topbits != 0xfe000000 && topbits != 0x00000000) + { + _dl_signal_error (0, map->l_name, NULL, + "R_ARM_PC24 relocation out of range"); + } + } + newvalue >>= 2; + value = (*reloc_addr & 0xff000000) | (newvalue & 0x00ffffff); + *reloc_addr = value; + } + break; + default: + _dl_reloc_bad_type (map, r_type, 0); + break; + } + } +} +#endif + static inline void elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rel *reloc, Elf32_Addr *const reloc_addr) @@ -524,6 +594,15 @@ elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rel *reloc, *reloc_addr += l_addr; } +#ifndef RTLD_BOOTSTRAP +static inline void +elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, + Elf32_Addr *const reloc_addr) +{ + *reloc_addr = l_addr + reloc->r_addend; +} +#endif + static inline void elf_machine_lazy_rel (struct link_map *map, Elf32_Addr l_addr, const Elf32_Rel *reloc) @@ -532,7 +611,12 @@ elf_machine_lazy_rel (struct link_map *map, const unsigned int r_type = ELF32_R_TYPE (reloc->r_info); /* Check for unexpected PLT reloc type. */ if (__builtin_expect (r_type == R_ARM_JUMP_SLOT, 1)) - *reloc_addr += l_addr; + { + if (__builtin_expect (map->l_mach.plt, 0) == 0) + *reloc_addr += l_addr; + else + *reloc_addr = map->l_mach.plt; + } else _dl_reloc_bad_type (map, r_type, 1); } From b6845b6741608ddac553065a7665d4795a9b5b4c Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 12 Dec 2001 09:02:09 +0000 Subject: [PATCH 2714/4487] (elf_machine_rela): Fix typo in last patch. --- sysdeps/arm/dl-machine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index cda424757b..73edd776ee 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -566,7 +566,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, if (topbits != 0xfe000000 && topbits != 0x00000000) { newvalue = fix_bad_pc24(reloc_addr, value) - - (Elf32_Addr)reloc_addr + (addend << 2); + - (Elf32_Addr)reloc_addr + (reloc->r_addend << 2); topbits = newvalue & 0xfe000000; if (topbits != 0xfe000000 && topbits != 0x00000000) { From 0a6fc182da4237428ce6f622a43c8290369b88f9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 31 Dec 2001 17:33:59 +0000 Subject: [PATCH 2715/4487] (elf_machine_runtime_setup): Avoid warning. (TRAMPOLINE_TEMPLATE, RTLD_START): Don't use multi-line string literals to avoid warnings. --- sysdeps/alpha/dl-machine.h | 402 +++++++++++++++++++------------------ 1 file changed, 203 insertions(+), 199 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index c93da661bf..7b6dcec746 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -127,7 +127,8 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) { unsigned int val = 0xc39ffff7; unsigned int *slot, *end; - const Elf64_Rela *rela = D_PTR (l, l_info[DT_JMPREL]); + const Elf64_Rela *rela = (const Elf64_Rela *) + D_PTR (l, l_info[DT_JMPREL]); Elf64_Addr l_addr = l->l_addr; /* br t12,.+4; ldq t12,12(t12); nop; jmp t12,(t12),.+4 */ @@ -156,125 +157,126 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) #define TRAMPOLINE_TEMPLATE(tramp_name, fixup_name, IMB) \ extern void tramp_name (void); \ asm ( "\ - .globl " #tramp_name " - .ent " #tramp_name " -" #tramp_name ": - lda $sp, -44*8($sp) - .frame $sp, 44*8, $26 - /* Preserve all integer registers that C normally doesn't. */ - stq $26, 0*8($sp) - stq $0, 1*8($sp) - stq $1, 2*8($sp) - stq $2, 3*8($sp) - stq $3, 4*8($sp) - stq $4, 5*8($sp) - stq $5, 6*8($sp) - stq $6, 7*8($sp) - stq $7, 8*8($sp) - stq $8, 9*8($sp) - stq $16, 10*8($sp) - stq $17, 11*8($sp) - stq $18, 12*8($sp) - stq $19, 13*8($sp) - stq $20, 14*8($sp) - stq $21, 15*8($sp) - stq $22, 16*8($sp) - stq $23, 17*8($sp) - stq $24, 18*8($sp) - stq $25, 19*8($sp) - stq $29, 20*8($sp) - stt $f0, 21*8($sp) - stt $f1, 22*8($sp) - stt $f10, 23*8($sp) - stt $f11, 24*8($sp) - stt $f12, 25*8($sp) - stt $f13, 26*8($sp) - stt $f14, 27*8($sp) - stt $f15, 28*8($sp) - stt $f16, 29*8($sp) - stt $f17, 30*8($sp) - stt $f18, 31*8($sp) - stt $f19, 32*8($sp) - stt $f20, 33*8($sp) - stt $f21, 34*8($sp) - stt $f22, 35*8($sp) - stt $f23, 36*8($sp) - stt $f24, 37*8($sp) - stt $f25, 38*8($sp) - stt $f26, 39*8($sp) - stt $f27, 40*8($sp) - stt $f28, 41*8($sp) - stt $f29, 42*8($sp) - stt $f30, 43*8($sp) - .mask 0x27ff01ff, -44*8 - .fmask 0xfffffc03, -(44-21)*8 - /* Set up our $gp */ - br $gp, .+4 - ldgp $gp, 0($gp) - .prologue 0 - /* Set up the arguments for fixup: */ - /* $16 = link_map out of plt0 */ - /* $17 = offset of reloc entry = ($28 - $27 - 20) /12 * 24 */ - /* $18 = return address */ - subq $28, $27, $17 - ldq $16, 8($27) - subq $17, 20, $17 - mov $26, $18 - addq $17, $17, $17 - /* Do the fixup */ - bsr $26, " ASM_ALPHA_NG_SYMBOL_PREFIX #fixup_name "..ng - /* Move the destination address into position. */ - mov $0, $27 - /* Restore program registers. */ - ldq $26, 0*8($sp) - ldq $0, 1*8($sp) - ldq $1, 2*8($sp) - ldq $2, 3*8($sp) - ldq $3, 4*8($sp) - ldq $4, 5*8($sp) - ldq $5, 6*8($sp) - ldq $6, 7*8($sp) - ldq $7, 8*8($sp) - ldq $8, 9*8($sp) - ldq $16, 10*8($sp) - ldq $17, 11*8($sp) - ldq $18, 12*8($sp) - ldq $19, 13*8($sp) - ldq $20, 14*8($sp) - ldq $21, 15*8($sp) - ldq $22, 16*8($sp) - ldq $23, 17*8($sp) - ldq $24, 18*8($sp) - ldq $25, 19*8($sp) - ldq $29, 20*8($sp) - ldt $f0, 21*8($sp) - ldt $f1, 22*8($sp) - ldt $f10, 23*8($sp) - ldt $f11, 24*8($sp) - ldt $f12, 25*8($sp) - ldt $f13, 26*8($sp) - ldt $f14, 27*8($sp) - ldt $f15, 28*8($sp) - ldt $f16, 29*8($sp) - ldt $f17, 30*8($sp) - ldt $f18, 31*8($sp) - ldt $f19, 32*8($sp) - ldt $f20, 33*8($sp) - ldt $f21, 34*8($sp) - ldt $f22, 35*8($sp) - ldt $f23, 36*8($sp) - ldt $f24, 37*8($sp) - ldt $f25, 38*8($sp) - ldt $f26, 39*8($sp) - ldt $f27, 40*8($sp) - ldt $f28, 41*8($sp) - ldt $f29, 42*8($sp) - ldt $f30, 43*8($sp) - /* Flush the Icache after having modified the .plt code. */ - " #IMB " - /* Clean up and turn control to the destination */ - lda $sp, 44*8($sp) - jmp $31, ($27) + .globl " #tramp_name " \n\ + .ent " #tramp_name " \n\ +" #tramp_name ": \n\ + lda $sp, -44*8($sp) \n\ + .frame $sp, 44*8, $26 \n\ + /* Preserve all integer registers that C normally \n\ + doesn't. */ \n\ + stq $26, 0*8($sp) \n\ + stq $0, 1*8($sp) \n\ + stq $1, 2*8($sp) \n\ + stq $2, 3*8($sp) \n\ + stq $3, 4*8($sp) \n\ + stq $4, 5*8($sp) \n\ + stq $5, 6*8($sp) \n\ + stq $6, 7*8($sp) \n\ + stq $7, 8*8($sp) \n\ + stq $8, 9*8($sp) \n\ + stq $16, 10*8($sp) \n\ + stq $17, 11*8($sp) \n\ + stq $18, 12*8($sp) \n\ + stq $19, 13*8($sp) \n\ + stq $20, 14*8($sp) \n\ + stq $21, 15*8($sp) \n\ + stq $22, 16*8($sp) \n\ + stq $23, 17*8($sp) \n\ + stq $24, 18*8($sp) \n\ + stq $25, 19*8($sp) \n\ + stq $29, 20*8($sp) \n\ + stt $f0, 21*8($sp) \n\ + stt $f1, 22*8($sp) \n\ + stt $f10, 23*8($sp) \n\ + stt $f11, 24*8($sp) \n\ + stt $f12, 25*8($sp) \n\ + stt $f13, 26*8($sp) \n\ + stt $f14, 27*8($sp) \n\ + stt $f15, 28*8($sp) \n\ + stt $f16, 29*8($sp) \n\ + stt $f17, 30*8($sp) \n\ + stt $f18, 31*8($sp) \n\ + stt $f19, 32*8($sp) \n\ + stt $f20, 33*8($sp) \n\ + stt $f21, 34*8($sp) \n\ + stt $f22, 35*8($sp) \n\ + stt $f23, 36*8($sp) \n\ + stt $f24, 37*8($sp) \n\ + stt $f25, 38*8($sp) \n\ + stt $f26, 39*8($sp) \n\ + stt $f27, 40*8($sp) \n\ + stt $f28, 41*8($sp) \n\ + stt $f29, 42*8($sp) \n\ + stt $f30, 43*8($sp) \n\ + .mask 0x27ff01ff, -44*8 \n\ + .fmask 0xfffffc03, -(44-21)*8 \n\ + /* Set up our $gp */ \n\ + br $gp, .+4 \n\ + ldgp $gp, 0($gp) \n\ + .prologue 0 \n\ + /* Set up the arguments for fixup: */ \n\ + /* $16 = link_map out of plt0 */ \n\ + /* $17 = offset of reloc entry = ($28 - $27 - 20) /12 * 24 */\n\ + /* $18 = return address */ \n\ + subq $28, $27, $17 \n\ + ldq $16, 8($27) \n\ + subq $17, 20, $17 \n\ + mov $26, $18 \n\ + addq $17, $17, $17 \n\ + /* Do the fixup */ \n\ + bsr $26, " ASM_ALPHA_NG_SYMBOL_PREFIX #fixup_name "..ng\n\ + /* Move the destination address into position. */ \n\ + mov $0, $27 \n\ + /* Restore program registers. */ \n\ + ldq $26, 0*8($sp) \n\ + ldq $0, 1*8($sp) \n\ + ldq $1, 2*8($sp) \n\ + ldq $2, 3*8($sp) \n\ + ldq $3, 4*8($sp) \n\ + ldq $4, 5*8($sp) \n\ + ldq $5, 6*8($sp) \n\ + ldq $6, 7*8($sp) \n\ + ldq $7, 8*8($sp) \n\ + ldq $8, 9*8($sp) \n\ + ldq $16, 10*8($sp) \n\ + ldq $17, 11*8($sp) \n\ + ldq $18, 12*8($sp) \n\ + ldq $19, 13*8($sp) \n\ + ldq $20, 14*8($sp) \n\ + ldq $21, 15*8($sp) \n\ + ldq $22, 16*8($sp) \n\ + ldq $23, 17*8($sp) \n\ + ldq $24, 18*8($sp) \n\ + ldq $25, 19*8($sp) \n\ + ldq $29, 20*8($sp) \n\ + ldt $f0, 21*8($sp) \n\ + ldt $f1, 22*8($sp) \n\ + ldt $f10, 23*8($sp) \n\ + ldt $f11, 24*8($sp) \n\ + ldt $f12, 25*8($sp) \n\ + ldt $f13, 26*8($sp) \n\ + ldt $f14, 27*8($sp) \n\ + ldt $f15, 28*8($sp) \n\ + ldt $f16, 29*8($sp) \n\ + ldt $f17, 30*8($sp) \n\ + ldt $f18, 31*8($sp) \n\ + ldt $f19, 32*8($sp) \n\ + ldt $f20, 33*8($sp) \n\ + ldt $f21, 34*8($sp) \n\ + ldt $f22, 35*8($sp) \n\ + ldt $f23, 36*8($sp) \n\ + ldt $f24, 37*8($sp) \n\ + ldt $f25, 38*8($sp) \n\ + ldt $f26, 39*8($sp) \n\ + ldt $f27, 40*8($sp) \n\ + ldt $f28, 41*8($sp) \n\ + ldt $f29, 42*8($sp) \n\ + ldt $f30, 43*8($sp) \n\ + /* Flush the Icache after having modified the .plt code. */\n\ + " #IMB " \n\ + /* Clean up and turn control to the destination */ \n\ + lda $sp, 44*8($sp) \n\ + jmp $31, ($27) \n\ .end " #tramp_name) #ifndef PROF @@ -292,85 +294,87 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) its return value is the user program's entry point. */ #define RTLD_START asm ("\ -.text - .set at - .globl _start - .ent _start -_start: - br $gp, 0f -0: ldgp $gp, 0($gp) - .prologue 0 - /* Pass pointer to argument block to _dl_start. */ - mov $sp, $16 - bsr $26, "ASM_ALPHA_NG_SYMBOL_PREFIX"_dl_start..ng - .end _start - /* FALLTHRU */ - .globl _dl_start_user - .ent _dl_start_user -_dl_start_user: - .frame $30,0,$31,0 - .prologue 0 - /* Save the user entry point address in s0. */ - mov $0, $9 - /* Store the highest stack address. */ - stq $30, __libc_stack_end - /* See if we were run as a command with the executable file - name as an extra leading argument. */ - ldl $1, _dl_skip_args - bne $1, $fixup_stack -$fixup_stack_ret: - /* The special initializer gets called with the stack just - as the application's entry point will see it; it can - switch stacks if it moves these contents over. */ -" RTLD_START_SPECIAL_INIT " - /* Call _dl_init(_dl_loaded, argc, argv, envp) to run initializers. */ - ldq $16, _dl_loaded - ldq $17, 0($sp) - lda $18, 8($sp) - s8addq $17, 8, $19 - addq $19, $18, $19 - jsr $26, _dl_init - /* Pass our finalizer function to the user in $0. */ - lda $0, _dl_fini - /* Jump to the user's entry point. */ - mov $9, $27 - jmp ($9) -$fixup_stack: - /* Adjust the stack pointer to skip _dl_skip_args words. This - involves copying everything down, since the stack pointer must - always be 16-byte aligned. */ - ldq $2, 0($sp) - ldq $5, _dl_argv - subq $31, $1, $6 - subq $2, $1, $2 - s8addq $6, $5, $5 - mov $sp, $4 - s8addq $1, $sp, $3 - stq $2, 0($sp) - stq $5, _dl_argv - /* Copy down argv. */ -0: ldq $5, 8($3) - addq $4, 8, $4 - addq $3, 8, $3 - stq $5, 0($4) - bne $5, 0b - /* Copy down envp. */ -1: ldq $5, 8($3) - addq $4, 8, $4 - addq $3, 8, $3 - stq $5, 0($4) - bne $5, 1b - /* Copy down auxiliary table. */ -2: ldq $5, 8($3) - ldq $6, 16($3) - addq $4, 16, $4 - addq $3, 16, $3 - stq $5, -8($4) - stq $6, 0($4) - bne $5, 2b - br $fixup_stack_ret - .end _dl_start_user - .set noat +.text \n\ + .set at \n\ + .globl _start \n\ + .ent _start \n\ +_start: \n\ + br $gp, 0f \n\ +0: ldgp $gp, 0($gp) \n\ + .prologue 0 \n\ + /* Pass pointer to argument block to _dl_start. */ \n\ + mov $sp, $16 \n\ + bsr $26, "ASM_ALPHA_NG_SYMBOL_PREFIX"_dl_start..ng \n\ + .end _start \n\ + /* FALLTHRU */ \n\ + .globl _dl_start_user \n\ + .ent _dl_start_user \n\ +_dl_start_user: \n\ + .frame $30,0,$31,0 \n\ + .prologue 0 \n\ + /* Save the user entry point address in s0. */ \n\ + mov $0, $9 \n\ + /* Store the highest stack address. */ \n\ + stq $30, __libc_stack_end \n\ + /* See if we were run as a command with the executable \n\ + file name as an extra leading argument. */ \n\ + ldl $1, _dl_skip_args \n\ + bne $1, $fixup_stack \n\ +$fixup_stack_ret: \n\ + /* The special initializer gets called with the stack \n\ + just as the application's entry point will see it; \n\ + it can switch stacks if it moves these contents \n\ + over. */ \n\ +" RTLD_START_SPECIAL_INIT " \n\ + /* Call _dl_init(_dl_loaded, argc, argv, envp) to run \n\ + initializers. */ \n\ + ldq $16, _dl_loaded \n\ + ldq $17, 0($sp) \n\ + lda $18, 8($sp) \n\ + s8addq $17, 8, $19 \n\ + addq $19, $18, $19 \n\ + jsr $26, _dl_init \n\ + /* Pass our finalizer function to the user in $0. */ \n\ + lda $0, _dl_fini \n\ + /* Jump to the user's entry point. */ \n\ + mov $9, $27 \n\ + jmp ($9) \n\ +$fixup_stack: \n\ + /* Adjust the stack pointer to skip _dl_skip_args words.\n\ + This involves copying everything down, since the \n\ + stack pointer must always be 16-byte aligned. */ \n\ + ldq $2, 0($sp) \n\ + ldq $5, _dl_argv \n\ + subq $31, $1, $6 \n\ + subq $2, $1, $2 \n\ + s8addq $6, $5, $5 \n\ + mov $sp, $4 \n\ + s8addq $1, $sp, $3 \n\ + stq $2, 0($sp) \n\ + stq $5, _dl_argv \n\ + /* Copy down argv. */ \n\ +0: ldq $5, 8($3) \n\ + addq $4, 8, $4 \n\ + addq $3, 8, $3 \n\ + stq $5, 0($4) \n\ + bne $5, 0b \n\ + /* Copy down envp. */ \n\ +1: ldq $5, 8($3) \n\ + addq $4, 8, $4 \n\ + addq $3, 8, $3 \n\ + stq $5, 0($4) \n\ + bne $5, 1b \n\ + /* Copy down auxiliary table. */ \n\ +2: ldq $5, 8($3) \n\ + ldq $6, 16($3) \n\ + addq $4, 16, $4 \n\ + addq $3, 16, $3 \n\ + stq $5, -8($4) \n\ + stq $6, 0($4) \n\ + bne $5, 2b \n\ + br $fixup_stack_ret \n\ + .end _dl_start_user \n\ + .set noat \n\ .previous"); #ifndef RTLD_START_SPECIAL_INIT From ca439e9a54f07bc2010162f27900c2be9f082217 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 2 Jan 2002 09:52:27 +0000 Subject: [PATCH 2716/4487] 2002-01-02 Roland McGrath * sysdeps/mach/hurd/i386/bits/sigcontext.h: Protect from multiple inclusion. Inhibit #error under [_SYS_UCONTEXT_H]. * sysdeps/mach/hurd/alpha/bits/sigcontext.h: Likewise. * sysdeps/mach/hurd/hppa/bits/sigcontext.h: Likewise. * sysdeps/mach/hurd/mips/bits/sigcontext.h: Likewise. * sysdeps/mach/hurd/powerpc/bits/sigcontext.h: Likewise. --- sysdeps/mach/hurd/alpha/bits/sigcontext.h | 8 ++++++-- sysdeps/mach/hurd/hppa/bits/sigcontext.h | 8 ++++++-- sysdeps/mach/hurd/mips/bits/sigcontext.h | 9 +++++++-- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/sysdeps/mach/hurd/alpha/bits/sigcontext.h b/sysdeps/mach/hurd/alpha/bits/sigcontext.h index 158db61876..4f13a2c9b2 100644 --- a/sysdeps/mach/hurd/alpha/bits/sigcontext.h +++ b/sysdeps/mach/hurd/alpha/bits/sigcontext.h @@ -1,5 +1,5 @@ /* Machine-dependent signal context structure for GNU Hurd. Alpha version. - Copyright (C) 1994, 1997 Free Software Foundation, Inc. + Copyright (C) 1994,97,2001 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 @@ -17,10 +17,12 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#ifndef _SIGNAL_H +#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H # error "Never use directly; include instead." #endif +#ifndef sc_alpha_thread_state + /* Signal handlers are actually called: void handler (int sig, int code, struct sigcontext *scp); */ @@ -67,3 +69,5 @@ struct sigcontext double sc_fpregs[31]; /* Floating point registers $f0..$f30. */ long int sc_fpcsr; /* Floating point control/status register. */ }; + +#endif /* sc_alpha_thread_state */ diff --git a/sysdeps/mach/hurd/hppa/bits/sigcontext.h b/sysdeps/mach/hurd/hppa/bits/sigcontext.h index 0042359562..5db43fc22c 100644 --- a/sysdeps/mach/hurd/hppa/bits/sigcontext.h +++ b/sysdeps/mach/hurd/hppa/bits/sigcontext.h @@ -1,5 +1,5 @@ /* Machine-dependent signal context structure for GNU Hurd. HPPA version. - Copyright (C) 1995, 1997 Free Software Foundation, Inc. + Copyright (C) 1995,97,2001 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 @@ -17,10 +17,12 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#ifndef _SIGNAL_H +#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H # error "Never use directly; include instead." #endif +#ifndef sc_parisc_thread_state + /* Signal handlers are actually called: void handler (int sig, int code, struct sigcontext *scp); */ @@ -88,3 +90,5 @@ struct sigcontext /* Floating point registers $f0..$f31. */ double sc_fpregs[32]; }; + +#endif /* sc_parisc_thread_state */ diff --git a/sysdeps/mach/hurd/mips/bits/sigcontext.h b/sysdeps/mach/hurd/mips/bits/sigcontext.h index deea841b62..14c618857e 100644 --- a/sysdeps/mach/hurd/mips/bits/sigcontext.h +++ b/sysdeps/mach/hurd/mips/bits/sigcontext.h @@ -1,4 +1,5 @@ -/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. +/* Machine-dependent signal context structure for GNU Hurd. MIPS version. + Copyright (C) 1994,97,2001 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 @@ -16,10 +17,12 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#ifndef _SIGNAL_H +#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H # error "Never use directly; include instead." #endif +#ifndef sc_mips_thread_state + /* Signal handlers are actually called: void handler (int sig, int code, struct sigcontext *scp); */ @@ -73,3 +76,5 @@ struct sigcontext int sc_fpcsr; /* FPU status register. */ int sc_fpeir; /* FP exception instruction register. */ }; + +#endif /* sc_mips_thread_state */ From 3c2105f0b07f490cd67d482c3b1bc442d8c8fab3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 7 Jan 2002 09:18:53 +0000 Subject: [PATCH 2717/4487] Define _G_MMAP64. --- sysdeps/unix/sysv/linux/cris/_G_config.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/cris/_G_config.h b/sysdeps/unix/sysv/linux/cris/_G_config.h index 42fef4d288..083a00abfb 100644 --- a/sysdeps/unix/sysv/linux/cris/_G_config.h +++ b/sysdeps/unix/sysv/linux/cris/_G_config.h @@ -81,6 +81,7 @@ typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__))); #define _G_OPEN64 __open64 #define _G_LSEEK64 __lseek64 +#define _G_MMAP64 __mmap64 #define _G_FSTAT64(fd,buf) __fxstat64 (_STAT_VER, fd, buf) /* This is defined by if `st_blksize' exists. */ From 5374babef37bf3aa6fd8f200d912035407abe77c Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 8 Jan 2002 10:19:33 +0000 Subject: [PATCH 2718/4487] Prevent double inclusion. --- sysdeps/m68k/bits/byteswap.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sysdeps/m68k/bits/byteswap.h b/sysdeps/m68k/bits/byteswap.h index ea6aa964b0..549d4452ef 100644 --- a/sysdeps/m68k/bits/byteswap.h +++ b/sysdeps/m68k/bits/byteswap.h @@ -1,5 +1,5 @@ /* Macros to swap the order of bytes in integer values. m68k version. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 2002 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 @@ -21,6 +21,9 @@ # error "Never use directly; include instead." #endif +#ifndef _BITS_BYTESWAP_H +#define _BITS_BYTESWAP_H 1 + /* Swap bytes in 16 bit value. We don't provide an assembler version because GCC is smart enough to generate optimal assembler output, and this allows for better cse. */ @@ -60,3 +63,5 @@ __bswap_64_r.__l[1] = __bswap_32 (__bswap_64_v.__l[0]); \ __bswap_64_r.__ll; }) #endif + +#endif /* _BITS_BYTESWAP_H */ From 51e7253b8427d37178009f68639f8e45082a6d4d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 8 Jan 2002 21:54:58 +0000 Subject: [PATCH 2719/4487] Add sysv_termio.h and start-libc.c. --- sysdeps/unix/sysv/aix/Dist | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/unix/sysv/aix/Dist b/sysdeps/unix/sysv/aix/Dist index 2698761f19..609fd778e9 100644 --- a/sysdeps/unix/sysv/aix/Dist +++ b/sysdeps/unix/sysv/aix/Dist @@ -7,6 +7,8 @@ dl-close.c dl-libc.c dlldr.h kernel_proto.h +start-libc.c +sysv_termio.h bits/utmpx.h gnu/lib-names.h uitrunc.c From 18328fa8da6acc476cbdf9d2ccc2b37c9f8d8fa3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 11 Jan 2002 01:03:15 +0000 Subject: [PATCH 2720/4487] (__ieee754_sqrt): Don't use multi-line string literals. (__full_ieee754_sqrt): Add __attribute_used__. --- sysdeps/alpha/fpu/e_sqrt.c | 199 +++++++++++++++++++------------------ 1 file changed, 100 insertions(+), 99 deletions(-) diff --git a/sysdeps/alpha/fpu/e_sqrt.c b/sysdeps/alpha/fpu/e_sqrt.c index a74e353a1e..c6262c8f69 100644 --- a/sysdeps/alpha/fpu/e_sqrt.c +++ b/sysdeps/alpha/fpu/e_sqrt.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998, 2002 Free Software Foundation, Inc. Contributed by David Mosberger (davidm@cs.arizona.edu). This file is part of the GNU C Library. @@ -17,6 +17,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include #if !defined(_IEEE_FP_INEXACT) @@ -53,110 +54,110 @@ const static struct sqrt_data_struct { }; asm ("\ - /* Define offsets into the structure defined in C above. */ - $DN = 0*8 - $UP = 1*8 - $HALF = 2*8 - $ALMOST_THREE_HALF = 3*8 - $NAN = 7*8 - $T2 = 8*8 - - /* Stack variables. */ - $K = 0 - $Y = 8 - - .text - .align 5 - .globl __ieee754_sqrt - .ent __ieee754_sqrt -__ieee754_sqrt: - ldgp $29, 0($27) - subq $sp, 16, $sp + /* Define offsets into the structure defined in C above. */ \n\ + $DN = 0*8 \n\ + $UP = 1*8 \n\ + $HALF = 2*8 \n\ + $ALMOST_THREE_HALF = 3*8 \n\ + $NAN = 7*8 \n\ + $T2 = 8*8 \n\ + \n\ + /* Stack variables. */ \n\ + $K = 0 \n\ + $Y = 8 \n\ + \n\ + .text \n\ + .align 5 \n\ + .globl __ieee754_sqrt \n\ + .ent __ieee754_sqrt \n\ +__ieee754_sqrt: \n\ + ldgp $29, 0($27) \n\ + subq $sp, 16, $sp \n\ .frame $sp, 16, $26, 0\n" #ifdef PROF -" lda $28, _mcount +" lda $28, _mcount \n\ jsr $28, ($28), _mcount\n" #endif -" .prologue 1 - - .align 4 - stt $f16, $K($sp) # e0 : - mult $f31, $f31, $f31 # .. fm : - lda $4, sqrt_data # e0 : - fblt $f16, $fixup # .. fa : - - ldah $2, 0x5fe8 # e0 : - ldq $3, $K($sp) # .. e1 : - ldt $f12, $HALF($4) # e0 : - ldt $f18, $ALMOST_THREE_HALF($4) # .. e1 : - - sll $3, 52, $5 # e0 : - lda $6, 0x7fd # .. e1 : - fnop # .. fa : - fnop # .. fm : - - subq $5, 1, $5 # e1 : - srl $3, 33, $1 # .. e0 : - cmpule $5, $6, $5 # e0 : - beq $5, $fixup # .. e1 : - - mult $f16, $f12, $f11 # fm : $f11 = x * 0.5 - subl $2, $1, $2 # .. e0 : - addt $f12, $f12, $f17 # .. fa : $f17 = 1.0 - srl $2, 12, $1 # e0 : - - and $1, 0xfc, $1 # e0 : - addq $1, $4, $1 # e1 : - ldl $1, $T2($1) # e0 : - addt $f12, $f17, $f15 # .. fa : $f15 = 1.5 - - subl $2, $1, $2 # e0 : - ldt $f14, $DN($4) # .. e1 : - sll $2, 32, $2 # e0 : - stq $2, $Y($sp) # e0 : - - ldt $f13, $Y($sp) # e0 : - mult/su $f11, $f13, $f10 # fm 2: $f10 = (x * 0.5) * y - mult $f10, $f13, $f10 # fm 4: $f10 = ((x * 0.5) * y) * y - subt $f15, $f10, $f1 # fa 4: $f1 = (1.5 - 0.5*x*y*y) - - mult $f13, $f1, $f13 # fm 4: yp = y*(1.5 - 0.5*x*y*y) - mult/su $f11, $f13, $f1 # fm 4: $f11 = x * 0.5 * yp - mult $f1, $f13, $f11 # fm 4: $f11 = (x * 0.5 * yp) * yp - subt $f18, $f11, $f1 # fa 4: $f1= (1.5-2^-30) - 0.5*x*yp*yp - - mult $f13, $f1, $f13 # fm 4: ypp = $f13 = yp*$f1 - subt $f15, $f12, $f1 # .. fa : $f1 = (1.5 - 0.5) - ldt $f15, $UP($4) # .. e0 : - mult/su $f16, $f13, $f10 # fm 4: z = $f10 = x * ypp - - mult $f10, $f13, $f11 # fm 4: $f11 = z*ypp - mult $f10, $f12, $f12 # fm : $f12 = z*0.5 - subt $f1, $f11, $f1 # fa 4: $f1 = 1 - z*ypp - mult $f12, $f1, $f12 # fm 4: $f12 = z*0.5*(1 - z*ypp) - - addt $f10, $f12, $f0 # fa 4: zp=res= z + z*0.5*(1 - z*ypp) - mult/c $f0, $f14, $f12 # fm 4: zmi = zp * DN - mult/c $f0, $f15, $f11 # fm : zpl = zp * UP - mult/c $f0, $f12, $f1 # fm : $f1 = zp * zmi - - mult/c $f0, $f11, $f15 # fm : $f15 = zp * zpl - subt/su $f1, $f16, $f13 # .. fa : y1 = zp*zmi - x - subt/su $f15, $f16, $f14 # fa 4: y2 = zp*zpl - x - fcmovge $f13, $f12, $f0 # fa 3: res = (y1 >= 0) ? zmi : res - - fcmovlt $f14, $f11, $f0 # fa 4: res = (y2 < 0) ? zpl : res - addq $sp, 16, $sp # .. e0 : - ret # .. e1 : - - .align 4 -$fixup: - addq $sp, 16, $sp - br "ASM_ALPHA_NG_SYMBOL_PREFIX"__full_ieee754_sqrt..ng - +" .prologue 1 \n\ + \n\ + .align 4 \n\ + stt $f16, $K($sp) # e0 : \n\ + mult $f31, $f31, $f31 # .. fm : \n\ + lda $4, sqrt_data # e0 : \n\ + fblt $f16, $fixup # .. fa : \n\ + \n\ + ldah $2, 0x5fe8 # e0 : \n\ + ldq $3, $K($sp) # .. e1 : \n\ + ldt $f12, $HALF($4) # e0 : \n\ + ldt $f18, $ALMOST_THREE_HALF($4) # .. e1 : \n\ + \n\ + sll $3, 52, $5 # e0 : \n\ + lda $6, 0x7fd # .. e1 : \n\ + fnop # .. fa : \n\ + fnop # .. fm : \n\ + \n\ + subq $5, 1, $5 # e1 : \n\ + srl $3, 33, $1 # .. e0 : \n\ + cmpule $5, $6, $5 # e0 : \n\ + beq $5, $fixup # .. e1 : \n\ + \n\ + mult $f16, $f12, $f11 # fm : $f11 = x * 0.5 \n\ + subl $2, $1, $2 # .. e0 : \n\ + addt $f12, $f12, $f17 # .. fa : $f17 = 1.0 \n\ + srl $2, 12, $1 # e0 : \n\ + \n\ + and $1, 0xfc, $1 # e0 : \n\ + addq $1, $4, $1 # e1 : \n\ + ldl $1, $T2($1) # e0 : \n\ + addt $f12, $f17, $f15 # .. fa : $f15 = 1.5 \n\ + \n\ + subl $2, $1, $2 # e0 : \n\ + ldt $f14, $DN($4) # .. e1 : \n\ + sll $2, 32, $2 # e0 : \n\ + stq $2, $Y($sp) # e0 : \n\ + \n\ + ldt $f13, $Y($sp) # e0 : \n\ + mult/su $f11, $f13, $f10 # fm 2: $f10 = (x * 0.5) * y \n\ + mult $f10, $f13, $f10 # fm 4: $f10 = ((x*0.5)*y)*y \n\ + subt $f15, $f10, $f1 # fa 4: $f1 = (1.5-0.5*x*y*y) \n\ + \n\ + mult $f13, $f1, $f13 # fm 4: yp = y*(1.5-0.5*x*y^2)\n\ + mult/su $f11, $f13, $f1 # fm 4: $f11 = x * 0.5 * yp \n\ + mult $f1, $f13, $f11 # fm 4: $f11 = (x*0.5*yp)*yp \n\ + subt $f18, $f11, $f1 # fa 4: $f1=(1.5-2^-30)-x/2*yp^2\n\ + \n\ + mult $f13, $f1, $f13 # fm 4: ypp = $f13 = yp*$f1 \n\ + subt $f15, $f12, $f1 # .. fa : $f1 = (1.5 - 0.5) \n\ + ldt $f15, $UP($4) # .. e0 : \n\ + mult/su $f16, $f13, $f10 # fm 4: z = $f10 = x * ypp \n\ + \n\ + mult $f10, $f13, $f11 # fm 4: $f11 = z*ypp \n\ + mult $f10, $f12, $f12 # fm : $f12 = z*0.5 \n\ + subt $f1, $f11, $f1 # fa 4: $f1 = 1 - z*ypp \n\ + mult $f12, $f1, $f12 # fm 4: $f12 = z/2*(1 - z*ypp)\n\ + \n\ + addt $f10, $f12, $f0 # fa 4: zp=res= z+z/2*(1-z*ypp)\n\ + mult/c $f0, $f14, $f12 # fm 4: zmi = zp * DN \n\ + mult/c $f0, $f15, $f11 # fm : zpl = zp * UP \n\ + mult/c $f0, $f12, $f1 # fm : $f1 = zp * zmi \n\ + \n\ + mult/c $f0, $f11, $f15 # fm : $f15 = zp * zpl \n\ + subt/su $f1, $f16, $f13 # .. fa : y1 = zp*zmi - x \n\ + subt/su $f15, $f16, $f14 # fa 4: y2 = zp*zpl - x \n\ + fcmovge $f13, $f12, $f0 # fa 3: res = (y1>=0)?zmi:res \n\ + \n\ + fcmovlt $f14, $f11, $f0 # fa 4: res = (y2<0)?zpl:res \n\ + addq $sp, 16, $sp # .. e0 : \n\ + ret # .. e1 : \n\ + \n\ + .align 4 \n\ +$fixup: \n\ + addq $sp, 16, $sp \n\ + br "ASM_ALPHA_NG_SYMBOL_PREFIX"__full_ieee754_sqrt..ng \n\ + \n\ .end __ieee754_sqrt"); -static double __full_ieee754_sqrt(double) __attribute__((unused)); +static double __full_ieee754_sqrt(double) __attribute_used__; #define __ieee754_sqrt __full_ieee754_sqrt #endif /* _IEEE_FP_INEXACT */ From 046f02be6f9c5d813a32dea6c1c0cdf49706f18a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 17 Jan 2002 23:21:33 +0000 Subject: [PATCH 2721/4487] (__dl_runtime_resolve): Remove `const' from `got'. --- sysdeps/mips/dl-machine.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index da9a5d3279..1dc225ed4b 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -276,8 +276,8 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \ = (const void *) D_PTR (l, l_info[DT_SYMTAB]); \ const char *strtab \ = (const void *) D_PTR (l, l_info[DT_STRTAB]); \ - const ElfW(Addr) *got \ - = (const ElfW(Addr) *) D_PTR (l, l_info[DT_PLTGOT]); \ + ElfW(Addr) *got \ + = (ElfW(Addr) *) D_PTR (l, l_info[DT_PLTGOT]); \ const ElfW(Word) local_gotno \ = (const ElfW(Word)) l->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; \ const ElfW(Word) gotsym \ From 6f68ec79d24c6b364c3b97d45133b8ee419c752b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 18 Jan 2002 23:37:53 +0000 Subject: [PATCH 2722/4487] Avoid warning about comma at end of enum for !_GNU_SOURCE. --- sysdeps/unix/sysv/linux/alpha/bits/statvfs.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/statvfs.h b/sysdeps/unix/sysv/linux/alpha/bits/statvfs.h index d37d0ffcb6..6120cf7a1d 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/statvfs.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/statvfs.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2000, 2001, 2002 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 @@ -71,9 +71,10 @@ enum { ST_RDONLY = 1, /* Mount read-only. */ #define ST_RDONLY ST_RDONLY - ST_NOSUID = 2, /* Ignore suid and sgid bits. */ + ST_NOSUID = 2 /* Ignore suid and sgid bits. */ #define ST_NOSUID ST_NOSUID #ifdef __USE_GNU + , ST_NODEV = 4, /* Disallow access to device special files. */ # define ST_NODEV ST_NODEV ST_NOEXEC = 8, /* Disallow program execution. */ From 872cf89f66ac40b9e9ad3f9c2093c31909bf3f4c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 29 Jan 2002 02:58:00 +0000 Subject: [PATCH 2723/4487] (ELF_MACHINE_BEFORE_RTLD_RELOC): Don't use label at end of compound statement. --- sysdeps/mips/dl-machine.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 1dc225ed4b..de5106914c 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. MIPS version. - Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc. + Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Kazumoto Kojima . @@ -132,7 +132,7 @@ do { \ got = (ElfW(Addr) *) D_PTR (map, l_info[DT_PLTGOT]); \ \ if (__builtin_expect (map->l_addr == 0, 1)) \ - goto done; \ + break; \ \ /* got[0] is reserved. got[1] is also reserved for the dynamic object \ generated by gnu ld. Skip these reserved entries from \ @@ -169,7 +169,6 @@ do { \ got++; \ sym++; \ } \ -done: \ } while(0) From 6fbd2f3d0c69c94feaaf1df3d937aa1347f9f08f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 29 Jan 2002 03:53:32 +0000 Subject: [PATCH 2724/4487] (pic-ccflag): New variable. --- sysdeps/alpha/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile index 49659844aa..ce8f9b3fef 100644 --- a/sysdeps/alpha/Makefile +++ b/sysdeps/alpha/Makefile @@ -43,3 +43,7 @@ divrem := divl divq reml remq # For now, build everything with full IEEE math support. # TODO: build separate libm and libm-ieee. sysdep-CFLAGS += -mieee + +# libc.so requires about 16k for the small data area, which is well +# below the 64k maximum. +pic-ccflag = -fpic From f71d7f5726d075f16096b7e18d633db1bd3a85e9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 1 Feb 2002 01:32:06 +0000 Subject: [PATCH 2725/4487] Move global variables for SHARED code in struct _rtld_global. Export this struct, remove all exports for the signal variables. --- sysdeps/alpha/dl-machine.h | 12 ++++++------ sysdeps/arm/dl-machine.h | 18 +++++++++--------- sysdeps/cris/dl-machine.h | 16 +++++++--------- sysdeps/hppa/dl-fptr.c | 17 ++++++++--------- sysdeps/hppa/dl-machine.h | 18 +++++++++--------- sysdeps/m68k/dl-machine.h | 10 +++++----- sysdeps/mips/dl-machine.h | 16 ++++++++-------- sysdeps/mips/mips64/dl-machine.h | 14 ++++++++------ sysdeps/unix/sysv/aix/libc-start.c | 10 +++------- sysdeps/unix/sysv/aix/start-libc.c | 6 +----- sysdeps/unix/sysv/linux/m68k/getpagesize.c | 8 ++++---- 11 files changed, 68 insertions(+), 77 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 7b6dcec746..9e4c6f4ebf 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. Alpha version. - Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc. + Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson . @@ -110,11 +110,11 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) { *(Elf64_Addr *)(plt + 16) = (Elf64_Addr) &_dl_runtime_profile; - if (_dl_name_match_p (_dl_profile, l)) + if (_dl_name_match_p (GL(dl_profile), l)) { /* This is the object we are looking for. Say that we really want profiling and the timers are started. */ - _dl_profile_map = l; + GL(dl_profile_map) = l; } } @@ -328,7 +328,7 @@ _dl_start_user: \n\ " RTLD_START_SPECIAL_INIT " \n\ /* Call _dl_init(_dl_loaded, argc, argv, envp) to run \n\ initializers. */ \n\ - ldq $16, _dl_loaded \n\ + ldq $16, _rtld_global \n\ ldq $17, 0($sp) \n\ lda $18, 8($sp) \n\ s8addq $17, 8, $19 \n\ @@ -498,7 +498,7 @@ elf_machine_rela (struct link_map *map, { unsigned long int const r_type = ELF64_R_TYPE (reloc->r_info); -#if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC +#if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC && !defined SHARED /* This is defined in rtld.c, but nowhere in the static libc.a; make the reference weak so static programs can still link. This declaration cannot be done when compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP) @@ -515,7 +515,7 @@ elf_machine_rela (struct link_map *map, { # if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC /* Already done in dynamic linker. */ - if (map != &_dl_rtld_map) + if (map != &GL(dl_rtld_map)) # endif { /* XXX Make some timings. Maybe it's preverable to test for diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 73edd776ee..4c302b5bf5 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. ARM version. - Copyright (C) 1995,96,97,98,99,2000,2001 Free Software Foundation, Inc. + Copyright (C) 1995,96,97,98,99,2000,2001,2002 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 @@ -109,10 +109,10 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) { got[2] = (Elf32_Addr) &_dl_runtime_profile; - if (_dl_name_match_p (_dl_profile, l)) + if (_dl_name_match_p (GL(dl_profile), l)) /* Say that we really want profiling and the timers are started. */ - _dl_profile_map = l; + GL(dl_profile_map) = l; } else /* This function will get called to fix up the GOT entry indicated by @@ -324,7 +324,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) .L_STACK_END: .word __libc_stack_end(GOT) .L_LOADED: - .word _dl_loaded(GOT) + .word _rtld_global(GOT) .previous\n\ "); @@ -347,14 +347,12 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) _dl_sysdep_start. */ #define DL_PLATFORM_INIT dl_platform_init () -extern const char *_dl_platform; - static inline void __attribute__ ((unused)) dl_platform_init (void) { - if (_dl_platform != NULL && *_dl_platform == '\0') + if (GL(dl_platform) != NULL && *GL(dl_platform) == '\0') /* Avoid an empty string which would disturb us. */ - _dl_platform = NULL; + GL(dl_platform) = NULL; } static inline Elf32_Addr @@ -452,7 +450,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, found. */ break; if (sym->st_size > refsym->st_size - || (_dl_verbose && sym->st_size < refsym->st_size)) + || (GL(dl_verbose) && sym->st_size < refsym->st_size)) { const char *strtab; @@ -484,7 +482,9 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP) because rtld.c contains the common defn for _dl_rtld_map, which is incompatible with a weak decl in the same file. */ +# ifndef SHARED weak_extern (_dl_rtld_map); +# endif if (map == &_dl_rtld_map) /* Undo the relocation done here during bootstrapping. Now we will relocate it anew, possibly using a diff --git a/sysdeps/cris/dl-machine.h b/sysdeps/cris/dl-machine.h index e4778e38a1..ff27005f2a 100644 --- a/sysdeps/cris/dl-machine.h +++ b/sysdeps/cris/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. CRIS version. - Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc. + Copyright (C) 1996-2001, 2002 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 @@ -106,11 +106,11 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) { got[2] = (Elf32_Addr) &_dl_runtime_profile; - if (_dl_name_match_p (_dl_profile, l)) + if (_dl_name_match_p (GL(dl_profile), l)) { /* This is the object we are looking for. Say that we really want profiling and the timers are started. */ - _dl_profile_map = l; + GL(dl_profile_map) = l; } } else @@ -212,7 +212,7 @@ asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \ move.d $sp,$r12 addq 4,$r12 ; main_map: at _dl_loaded. - move.d [$r0+_dl_loaded:GOT16],$r9 + move.d [$r0+_rtld_global:GOT16],$r9 move.d [$r9],$r10 move.d _dl_init:PLTG,$r9 add.d $r0,$r9 @@ -246,14 +246,12 @@ asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \ _dl_sysdep_start. */ #define DL_PLATFORM_INIT dl_platform_init () -extern const char *_dl_platform; - static inline void __attribute__ ((unused)) dl_platform_init (void) { - if (_dl_platform != NULL && *_dl_platform == '\0') + if (GL(dl_platform) != NULL && *GL(dl_platform) == '\0') /* Avoid an empty string which would disturb us. */ - _dl_platform = NULL; + GL(dl_platform) = NULL; } static inline Elf32_Addr @@ -314,7 +312,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, found. */ break; if (sym->st_size > refsym->st_size - || (_dl_verbose && sym->st_size < refsym->st_size)) + || (GL(dl_verbose) && sym->st_size < refsym->st_size)) { extern char **_dl_argv; const char *strtab; diff --git a/sysdeps/hppa/dl-fptr.c b/sysdeps/hppa/dl-fptr.c index 4f8cc8b5d1..f8b6424abf 100644 --- a/sysdeps/hppa/dl-fptr.c +++ b/sysdeps/hppa/dl-fptr.c @@ -1,5 +1,5 @@ /* Make dynamic PLABELs for function pointers. HPPA version. - Copyright (C) 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2002 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 @@ -44,10 +44,9 @@ static int __hppa_fptr_lock = 1; #ifdef MAP_ANON /* The fd is not examined when using MAP_ANON. */ -#define ANONFD -1 +# define ANONFD -1 #else -extern int _dl_zerofd; -#define ANONFD _dl_zerofd +# define ANONFD GL(dl_zerofd) #endif struct hppa_fptr __boot_ldso_fptr[HPPA_BOOT_FPTR_SIZE]; @@ -95,10 +94,10 @@ __hppa_make_fptr (const struct link_map *sym_map, Elf32_Addr value, { #ifndef MAP_ANON # define MAP_ANON 0 - if (_dl_zerofd == -1) + if (GL(dl_zerofd) == -1) { - _dl_zerofd = _dl_sysdep_open_zero_fill (); - if (_dl_zerofd == -1) + GL(dl_zerofd) = _dl_sysdep_open_zero_fill (); + if (GL(dl_zerofd) == -1) { __close (fd); _dl_signal_error (errno, NULL, NULL, @@ -107,11 +106,11 @@ __hppa_make_fptr (const struct link_map *sym_map, Elf32_Addr value, } #endif - __fptr_next = __mmap (0, _dl_pagesize, PROT_READ | PROT_WRITE, + __fptr_next = __mmap (0, GL(dl_pagesize), PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, ANONFD, 0); if (__fptr_next == MAP_FAILED) _dl_signal_error(errno, NULL, NULL, "cannot map page for fptr"); - __fptr_count = _dl_pagesize / sizeof (struct hppa_fptr); + __fptr_count = GL(dl_pagesize) / sizeof (struct hppa_fptr); } f = __fptr_next++; __fptr_count--; diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h index d13f15b3e5..449fa9dbef 100644 --- a/sysdeps/hppa/dl-machine.h +++ b/sysdeps/hppa/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. PA-RISC version. - Copyright (C) 1995,1996,1997,1999,2000,2001 Free Software Foundation, Inc. + Copyright (C) 1995-1997,1999,2000,2001,2002 Free Software Foundation, Inc. Contributed by David Huggins-Daines This file is part of the GNU C Library. @@ -227,12 +227,12 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) ((unsigned long) &_dl_runtime_resolve & ~3))->func; else { - if (_dl_name_match_p (_dl_profile, l)) + if (_dl_name_match_p (GL(dl_profile), l)) { /* This is the object we are looking for. Say that we really want profiling and the timers are started. */ - _dl_profile_map = l; + GL(dl_profile_map) = l; } got[-2] = (Elf32_Addr) ((struct hppa_fptr *) @@ -362,8 +362,8 @@ asm ( \ " stw %r24,-44(%sp)\n" \ \ ".Lnofix:\n" \ -" addil LT'_dl_loaded,%r19\n" \ -" ldw RT'_dl_loaded(%r1),%r26\n" \ +" addil LT'_rtld_global,%r19\n" \ +" ldw RT'_rtld_global(%r1),%r26\n" \ " bl set_dp, %r2\n" \ " ldw 0(%r26),%r26\n" \ \ @@ -488,13 +488,13 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, struct link_map *sym_map; Elf32_Addr value; -#ifndef RTLD_BOOTSTRAP +#if !defined RTLD_BOOTSTRAP && !defined SHARED /* This is defined in rtld.c, but nowhere in the static libc.a; make the reference weak so static programs can still link. This declaration cannot be done when compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP) because rtld.c contains the common defn for _dl_rtld_map, which is incompatible with a weak decl in the same file. */ - weak_extern (_dl_rtld_map); + weak_extern (GL(dl_rtld_map)); #endif /* RESOLVE_MAP will return a null value for undefined syms, and @@ -527,7 +527,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, other ones will have their values reset. In particular, __fptr_next will be reset, sometimes causing endless loops in __hppa_make_fptr(). So don't do that. */ - if (map == &_dl_rtld_map) + if (map == &GL(dl_rtld_map)) return; #endif /* .eh_frame can have unaligned relocs. */ @@ -604,7 +604,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, break; if (__builtin_expect (sym->st_size > refsym->st_size, 0) || (__builtin_expect (sym->st_size < refsym->st_size, 0) - && __builtin_expect (_dl_verbose, 0))) + && __builtin_expect (GL(dl_verbose), 0))) { const char *strtab; diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index d9c819429b..bd2d1e255b 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. m68k version. - Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc. + Copyright (C) 1996-2001, 2002 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 @@ -85,11 +85,11 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) { got[2] = (Elf32_Addr) &_dl_runtime_profile; - if (_dl_name_match_p (_dl_profile, l)) + if (_dl_name_match_p (GL(dl_profile), l)) { /* This is the object we are looking for. Say that we really want profiling and the timers are started. */ - _dl_profile_map = l; + GL(dl_profile_map) = l; } } else @@ -176,7 +176,7 @@ asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \ pea 8(%sp, %d1*4) pea 8(%sp) move.l %d1, -(%sp) - move.l ([_dl_loaded@GOT.w, %a5]), -(%sp) + move.l ([_rtld_global@GOT.w, %a5]), -(%sp) jbsr _dl_init@PLTPC addq.l #8, %sp addq.l #8, %sp @@ -251,7 +251,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, found. */ break; if (sym->st_size > refsym->st_size - || (sym->st_size < refsym->st_size && _dl_verbose)) + || (sym->st_size < refsym->st_size && GL(dl_verbose))) { extern char **_dl_argv; const char *strtab; diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index de5106914c..4c28e17c9f 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -216,7 +216,7 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc) } { - struct link_map *l = _dl_loaded; + struct link_map *l = GL(dl_loaded); while (l) { @@ -441,7 +441,7 @@ _dl_start_user:\n\ # Save back the modified argument count.\n\ sw $4, 0($29)\n\ 1: # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env) \n\ - lw $4, _dl_loaded\n\ + lw $4, _rtld_global\n\ lw $5, 0($29)\n\ la $6, 4($29)\n\ sll $7, $5, 2\n\ @@ -477,14 +477,14 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, { const unsigned long int r_type = ELFW(R_TYPE) (reloc->r_info); -#ifndef RTLD_BOOTSTRAP +#if !defined RTLD_BOOTSTRAP && !defined SHARED /* This is defined in rtld.c, but nowhere in the static libc.a; make the reference weak so static programs can still link. This declaration cannot be done when compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP) because rtld.c contains the common defn for _dl_rtld_map, which is incompatible with a weak decl in the same file. */ - weak_extern (_dl_rtld_map); + weak_extern (GL(dl_rtld_map)); #endif switch (r_type) @@ -501,7 +501,7 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, if (symidx < gotsym) { #ifndef RTLD_BOOTSTRAP - if (map != &_dl_rtld_map) + if (map != &GL(dl_rtld_map)) #endif *reloc_addr += sym->st_value + map->l_addr; } @@ -520,7 +520,7 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, } else #ifndef RTLD_BOOTSTRAP - if (map != &_dl_rtld_map) + if (map != &GL(dl_rtld_map)) #endif *reloc_addr += map->l_addr; } @@ -561,7 +561,7 @@ elf_machine_got_rel (struct link_map *map, int lazy) ({ \ const ElfW(Sym) *ref = sym; \ const struct r_found_version *version \ - = vernum ? &map->l_versions [vernum [sym_index]] : NULL; \ + = vernum ? &map->l_versions[vernum[sym_index]] : NULL; \ ElfW(Addr) value; \ value = RESOLVE (&ref, version, R_MIPS_REL32); \ (ref)? value + ref->st_value: 0; \ @@ -576,7 +576,7 @@ elf_machine_got_rel (struct link_map *map, int lazy) n = map->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; /* The dynamic linker's local got entries have already been relocated. */ - if (map != &_dl_rtld_map) + if (map != &GL(dl_rtld_map)) { /* got[0] is reserved. got[1] is also reserved for the dynamic object generated by gnu ld. Skip these reserved entries from relocation. */ diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h index d51f1e3cb1..7ee3cf52aa 100644 --- a/sysdeps/mips/mips64/dl-machine.h +++ b/sysdeps/mips/mips64/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. MIPS64 version. - Copyright (C) 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1996,1997,1999,2000,2001,2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Kazumoto Kojima . @@ -289,7 +289,7 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc) } { - struct link_map *l = _dl_loaded; + struct link_map *l = GL(dl_loaded); while (l) { @@ -480,7 +480,7 @@ _dl_start_user:\n\ # Save back the modified argument count.\n\ sd $4, 0($29)\n\ 1: # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env) \n\ - ld $4, _dl_loaded\n\ + ld $4, _rtld_global\n\ ld $5, 0($29)\n\ dla $6, 4($29)\n\ dla $7, 8($29)\n\ @@ -492,7 +492,7 @@ _dl_start_user:\n\ dla $31, _dl_fini\n\ # Jump to the user entry point.\n\ 1: # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env) \n\ - lw $4, _dl_loaded\n\ + lw $4, _rtld_global\n\ lw $5, 0($29)\n\ la $6, 4($29)\n\ la $7, 8($29)\n\ @@ -553,8 +553,10 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, RTLD_BOOTSTRAP) because rtld.c contains the common defn for _dl_rtld_map, which is incompatible with a weak decl in the same file. */ - weak_extern (_dl_rtld_map); - if (map == &_dl_rtld_map) +# ifndef SHARED + weak_extern (GL(dl_rtld_map)); +# endif + if (map == &GL(dl_rtld_map)) /* Undo the relocation done here during bootstrapping. Now we will relocate it anew, possibly using a binding found in the user program or a loaded library rather than the dynamic linker's diff --git a/sysdeps/unix/sysv/aix/libc-start.c b/sysdeps/unix/sysv/aix/libc-start.c index 1184664b57..757b34975c 100644 --- a/sysdeps/unix/sysv/aix/libc-start.c +++ b/sysdeps/unix/sysv/aix/libc-start.c @@ -1,5 +1,5 @@ /* Initialization code run first thing by the XCOFF startup code. AIX version. - Copyright (C) 2001 Free Software Foundation, Inc. + Copyright (C) 2001, 2002 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 @@ -73,10 +73,6 @@ extern int __loadx (int flag, void *module, void *arg1, void *arg2, /* Needed by setenv */ char **__environ; -/* Needed by dl-support.c */ -/* XXX stubbing out dl-support.c for now.. - size_t _dl_pagesize = 0; */ - /* * Find __rtinit symbol * @@ -277,7 +273,7 @@ __libc_start_main (void) /* Call the initializer of the program, if any. */ #ifdef SHARED - if (__builtin_expect (_dl_debug_mask & DL_DEBUG_IMPCALLS, 0)) + if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_IMPCALLS, 0)) _dl_debug_printf ("\ninitialize program: %s\n\n", __libc_start_data.argv[0]); #endif @@ -285,7 +281,7 @@ __libc_start_main (void) (*__libc_start_data.init) (); #ifdef SHARED - if (__builtin_expect (_dl_debug_mask & DL_DEBUG_IMPCALLS, 0)) + if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_IMPCALLS, 0)) _dl_debug_printf ("\ntransferring control: %s\n\n", __libc_start_data.argv[0]); #endif diff --git a/sysdeps/unix/sysv/aix/start-libc.c b/sysdeps/unix/sysv/aix/start-libc.c index e3582e3892..303caa7078 100644 --- a/sysdeps/unix/sysv/aix/start-libc.c +++ b/sysdeps/unix/sysv/aix/start-libc.c @@ -1,5 +1,5 @@ /* Initialization code run first thing by the XCOFF startup code. AIX version. - Copyright (C) 2001 Free Software Foundation, Inc. + Copyright (C) 2001, 2002 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 @@ -74,10 +74,6 @@ extern int __loadx (int flag, void *module, void *arg1, void *arg2, /* Needed by setenv */ char **__environ; -/* Needed by dl-support.c */ -/* XXX stubbing out dl-support.c for now.. - size_t _dl_pagesize = 0; */ - /* Find __rtinit symbol diff --git a/sysdeps/unix/sysv/linux/m68k/getpagesize.c b/sysdeps/unix/sysv/linux/m68k/getpagesize.c index bbabbb1773..ce1048b47d 100644 --- a/sysdeps/unix/sysv/linux/m68k/getpagesize.c +++ b/sysdeps/unix/sysv/linux/m68k/getpagesize.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab . @@ -21,6 +21,7 @@ #include #include +#include #include #include @@ -28,13 +29,12 @@ int __getpagesize () { - extern size_t _dl_pagesize; #ifdef __NR_getpagesize int result; #endif - if (_dl_pagesize != 0) - return _dl_pagesize; + if (GL(dl_pagesize) != 0) + return GL(dl_pagesize); #ifdef __NR_getpagesize result = INLINE_SYSCALL (getpagesize, 0); From 8bd56b60c47a3664e5179e523bcb6c0547d4fd26 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 1 Feb 2002 07:48:43 +0000 Subject: [PATCH 2726/4487] Move _dl_hp_timing_overhead and procinfo-related variables in rtld_global struct. --- sysdeps/unix/sysv/linux/arm/dl-procinfo.c | 45 +++++++++++++++++++---- sysdeps/unix/sysv/linux/arm/dl-procinfo.h | 11 ++---- 2 files changed, 42 insertions(+), 14 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/dl-procinfo.c b/sysdeps/unix/sysv/linux/arm/dl-procinfo.c index 8bc18bf8a7..9c6476cb59 100644 --- a/sysdeps/unix/sysv/linux/arm/dl-procinfo.c +++ b/sysdeps/unix/sysv/linux/arm/dl-procinfo.c @@ -1,5 +1,5 @@ /* Data for Linux/ARM version of processor capability information. - Copyright (C) 2001 Free Software Foundation, Inc. + Copyright (C) 2001, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Philip Blundell , 2001. @@ -19,13 +19,44 @@ 02111-1307 USA. */ /* This information must be kept in sync with the _DL_HWCAP_COUNT and - _DL_PLATFORM_COUNT definitions in procinfo.h. */ + _DL_PLATFORM_COUNT definitions in procinfo.h. + If anything should be added here check whether the size of each string + is still ok with the given array size. -/* If anything should be added here check whether the size of each string - is still ok with the given array size. */ -const char _dl_arm_cap_flags[][10] = - { + All the #ifdefs in the definitions ar equite irritating but + necessary if we want to avoid duplicating the information. There + are three different modes: + + - PROCINFO_DECL is defined. This means we are only interested in + declarations. + + - PROCINFO_DECL is not defined: + + + if SHARED is defined the file is included in an array + initializer. The .element = { ... } syntax is needed. + + + if SHARED is not defined a normal array initialization is + needed. + */ + +#ifdef PROCINFO_DECL +EXTERN +#endif +#if !defined PROCINFO_DECL && defined SHARED + ._dl_arm_cap_flags +#else +const char _dl_arm_cap_flags[][10] +#endif +#ifndef PROCINFO_DECL += { "swp", "half", "thumb", "26bit", "fast-mult", "fpa", "vfp", "edsp", - }; + } +#endif +#if !defined SHARED || defined PROCINFO_DECL +; +#else +, +#endif +#undef PROCINFO_DECL diff --git a/sysdeps/unix/sysv/linux/arm/dl-procinfo.h b/sysdeps/unix/sysv/linux/arm/dl-procinfo.h index 87d114c39c..7e7e66e727 100644 --- a/sysdeps/unix/sysv/linux/arm/dl-procinfo.h +++ b/sysdeps/unix/sysv/linux/arm/dl-procinfo.h @@ -1,5 +1,5 @@ /* Linux/ARM version of processor capability information handling macros. - Copyright (C) 2001 Free Software Foundation, Inc. + Copyright (C) 2001, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Philip Blundell , 2001. @@ -23,9 +23,6 @@ #include -/* If anything should be added here check whether the size of each string - is still ok with the given array size. */ -extern const char _dl_arm_cap_flags[][10]; #define _DL_HWCAP_COUNT 32 /* The kernel provides platform data but it is not interesting. */ @@ -42,7 +39,7 @@ _dl_procinfo (int word) for (i = 0; i < _DL_HWCAP_COUNT; ++i) if (word & (1 << i)) - _dl_printf (" %s", _dl_arm_cap_flags[i]); + _dl_printf (" %s", GL(dl_arm_cap_flags)[i]); _dl_printf ("\n"); @@ -53,7 +50,7 @@ static inline const char * __attribute__ ((unused)) _dl_hwcap_string (int idx) { - return _dl_arm_cap_flags[idx]; + return GL(dl_arm_cap_flags)[idx]; }; enum @@ -78,7 +75,7 @@ _dl_string_hwcap (const char *str) for (i = 0; i < _DL_HWCAP_COUNT; i++) { - if (strcmp (str, _dl_arm_cap_flags[i]) == 0) + if (strcmp (str, GL(dl_arm_cap_flags)[i]) == 0) return i; } return -1; From d09d6903edb3a5276d3cc22242fefb0783e00adb Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 1 Feb 2002 10:28:20 +0000 Subject: [PATCH 2727/4487] Don't use multi-line string literals. --- sysdeps/m68k/dl-machine.h | 120 +++++++++++++++++++------------------- 1 file changed, 60 insertions(+), 60 deletions(-) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index bd2d1e255b..3b99978554 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -104,22 +104,22 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) /* This code is used in dl-runtime.c to call the `fixup' function and then redirect to the address it returns. */ #define TRAMPOLINE_TEMPLATE(tramp_name, fixup_name) \ -"| Trampoline for " #fixup_name " - .globl " #tramp_name " - .type " #tramp_name ", @function -" #tramp_name ": - | Save %a0 (struct return address) and %a1. - move.l %a0, -(%sp) - move.l %a1, -(%sp) - | Call the real address resolver. - jbsr " #fixup_name " - | Restore register %a0 and %a1. - move.l (%sp)+, %a1 - move.l (%sp)+, %a0 - | Pop parameters - addq.l #8, %sp - | Call real function. - jmp (%d0) +"| Trampoline for " #fixup_name "\n\ + .globl " #tramp_name "\n\ + .type " #tramp_name ", @function\n\ +" #tramp_name ":\n\ + | Save %a0 (struct return address) and %a1.\n\ + move.l %a0, -(%sp)\n\ + move.l %a1, -(%sp)\n\ + | Call the real address resolver.\n\ + jbsr " #fixup_name "\n\ + | Restore register %a0 and %a1.\n\ + move.l (%sp)+, %a1\n\ + move.l (%sp)+, %a0\n\ + | Pop parameters\n\ + addq.l #8, %sp\n\ + | Call real function.\n\ + jmp (%d0)\n\ .size " #tramp_name ", . - " #tramp_name "\n" #ifndef PROF #define ELF_MACHINE_RUNTIME_TRAMPOLINE \ @@ -143,50 +143,50 @@ asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \ its return value is the user program's entry point. */ #define RTLD_START asm ("\ - .text - .globl _start - .type _start,@function -_start: - move.l %sp, -(%sp) - jbsr _dl_start - addq.l #4, %sp - /* FALLTHRU */ - - .globl _dl_start_user - .type _dl_start_user,@function -_dl_start_user: - | Save the user entry point address in %a4. - move.l %d0, %a4 - | Point %a5 at the GOT. - lea _GLOBAL_OFFSET_TABLE_@GOTPC(%pc), %a5 - | Remember the highest stack address. - move.l %sp, ([__libc_stack_end@GOT.w, %a5]) - | See if we were run as a command with the executable file - | name as an extra leading argument. - move.l ([_dl_skip_args@GOT.w, %a5]), %d0 - | Pop the original argument count - move.l (%sp)+, %d1 - | Subtract _dl_skip_args from it. - sub.l %d0, %d1 - | Adjust the stack pointer to skip _dl_skip_args words. - lea (%sp, %d0*4), %sp - | Push back the modified argument count. - move.l %d1, -(%sp) - # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env) - pea 8(%sp, %d1*4) - pea 8(%sp) - move.l %d1, -(%sp) - move.l ([_rtld_global@GOT.w, %a5]), -(%sp) - jbsr _dl_init@PLTPC - addq.l #8, %sp - addq.l #8, %sp - | Pass our finalizer function to the user in %a1. - move.l _dl_fini@GOT.w(%a5), %a1 - | Initialize %fp with the stack pointer. - move.l %sp, %fp - | Jump to the user's entry point. - jmp (%a4) - .size _dl_start_user, . - _dl_start_user + .text\n\ + .globl _start\n\ + .type _start,@function\n\ +_start:\n\ + move.l %sp, -(%sp)\n\ + jbsr _dl_start\n\ + addq.l #4, %sp\n\ + /* FALLTHRU */\n\ +\n\ + .globl _dl_start_user\n\ + .type _dl_start_user,@function\n\ +_dl_start_user:\n\ + | Save the user entry point address in %a4.\n\ + move.l %d0, %a4\n\ + | Point %a5 at the GOT.\n\ + lea _GLOBAL_OFFSET_TABLE_@GOTPC(%pc), %a5\n\ + | Remember the highest stack address.\n\ + move.l %sp, ([__libc_stack_end@GOT.w, %a5])\n\ + | See if we were run as a command with the executable file\n\ + | name as an extra leading argument.\n\ + move.l ([_dl_skip_args@GOT.w, %a5]), %d0\n\ + | Pop the original argument count\n\ + move.l (%sp)+, %d1\n\ + | Subtract _dl_skip_args from it.\n\ + sub.l %d0, %d1\n\ + | Adjust the stack pointer to skip _dl_skip_args words.\n\ + lea (%sp, %d0*4), %sp\n\ + | Push back the modified argument count.\n\ + move.l %d1, -(%sp)\n\ + # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env)\n\ + pea 8(%sp, %d1*4)\n\ + pea 8(%sp)\n\ + move.l %d1, -(%sp)\n\ + move.l ([_rtld_global@GOT.w, %a5]), -(%sp)\n\ + jbsr _dl_init@PLTPC\n\ + addq.l #8, %sp\n\ + addq.l #8, %sp\n\ + | Pass our finalizer function to the user in %a1.\n\ + move.l _dl_fini@GOT.w(%a5), %a1\n\ + | Initialize %fp with the stack pointer.\n\ + move.l %sp, %fp\n\ + | Jump to the user's entry point.\n\ + jmp (%a4)\n\ + .size _dl_start_user, . - _dl_start_user\n\ .previous"); /* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so From 8badabd8491773ea9cec0569d86a2c594171bbfd Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 1 Feb 2002 19:03:37 +0000 Subject: [PATCH 2728/4487] _dl_fpu_control, _dl_fpu_control_set): Remove unused externs. --- sysdeps/unix/sysv/aix/init-first.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/aix/init-first.c b/sysdeps/unix/sysv/aix/init-first.c index f87e5c875c..2a60a927fc 100644 --- a/sysdeps/unix/sysv/aix/init-first.c +++ b/sysdeps/unix/sysv/aix/init-first.c @@ -1,5 +1,5 @@ /* Initialization code run first thing by the XCOFF startup code. AIX version. - Copyright (C) 2001 Free Software Foundation, Inc. + Copyright (C) 2001, 2002 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 @@ -40,9 +40,6 @@ static void init (int, char **, char **) __attribute__ ((unused)); extern int _dl_starting_up; weak_extern (_dl_starting_up) -extern fpu_control_t _dl_fpu_control; -extern int _dl_fpu_control_set; - /* Set nonzero if we have to be prepared for more then one libc being used in the process. Safe assumption if initializer never runs. */ int __libc_multiple_libcs = 1; From a242df8440aed93d43c573b82ad712c77aea7a0d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 1 Feb 2002 19:11:08 +0000 Subject: [PATCH 2729/4487] Remove dl-procinfo.c. --- sysdeps/unix/sysv/linux/arm/Dist | 1 - 1 file changed, 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/arm/Dist b/sysdeps/unix/sysv/linux/arm/Dist index 83f87192d6..aa9eb1a227 100644 --- a/sysdeps/unix/sysv/linux/arm/Dist +++ b/sysdeps/unix/sysv/linux/arm/Dist @@ -1,5 +1,4 @@ clone.S -dl-procinfo.c dl-procinfo.h ioperm.c setresuid.c From ae6cfd8bc146d34e8aae762d2d26164aa88385ed Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 1 Feb 2002 23:14:50 +0000 Subject: [PATCH 2730/4487] Move all symbols to GLIBC_PRIVATE. --- sysdeps/hppa/Versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/hppa/Versions b/sysdeps/hppa/Versions index c5f35d4971..909d50bbf5 100644 --- a/sysdeps/hppa/Versions +++ b/sysdeps/hppa/Versions @@ -1,5 +1,5 @@ ld { - GLIBC_2.2 { + GLIBC_PRIVATE { # hppa specific functions in the dynamic linker, but used by libc.so. _dl_symbol_address; _dl_unmap; _dl_lookup_address; _dl_function_address; From c577723005382e6b1a4421f0dc2d27c856fa7099 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 3 Feb 2002 00:29:15 +0000 Subject: [PATCH 2731/4487] (RTLD_START): Call _dl_init_internal instead of _dl_init. --- sysdeps/alpha/dl-machine.h | 2 +- sysdeps/arm/dl-machine.h | 2 +- sysdeps/cris/dl-machine.h | 2 +- sysdeps/hppa/dl-machine.h | 2 +- sysdeps/m68k/dl-machine.h | 2 +- sysdeps/mips/dl-machine.h | 2 +- sysdeps/mips/mips64/dl-machine.h | 4 ++-- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 9e4c6f4ebf..5feb46d69c 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -333,7 +333,7 @@ _dl_start_user: \n\ lda $18, 8($sp) \n\ s8addq $17, 8, $19 \n\ addq $19, $18, $19 \n\ - jsr $26, _dl_init \n\ + jsr $26, _dl_init_internal \n\ /* Pass our finalizer function to the user in $0. */ \n\ lda $0, _dl_fini \n\ /* Jump to the user's entry point. */ \n\ diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 4c302b5bf5..5d1656480d 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -302,7 +302,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) ldr r0, [sl, r0] ldr r0, [r0] @ call _dl_init - bl _dl_init(PLT) + bl _dl_init_internal(PLT) @ clear the startup flag ldr r2, .L_STARTUP_FLAG ldr r1, [sl, r2] diff --git a/sysdeps/cris/dl-machine.h b/sysdeps/cris/dl-machine.h index ff27005f2a..34d29fa3ac 100644 --- a/sysdeps/cris/dl-machine.h +++ b/sysdeps/cris/dl-machine.h @@ -214,7 +214,7 @@ asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \ ; main_map: at _dl_loaded. move.d [$r0+_rtld_global:GOT16],$r9 move.d [$r9],$r10 - move.d _dl_init:PLTG,$r9 + move.d _dl_init_internal:PLTG,$r9 add.d $r0,$r9 jsr $r9 ; Pass our finalizer function to the user in R10. diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h index 449fa9dbef..bc3a9839f7 100644 --- a/sysdeps/hppa/dl-machine.h +++ b/sysdeps/hppa/dl-machine.h @@ -372,7 +372,7 @@ asm ( \ \ /* envp = argv + argc + 1 */ \ " sh2add %r25,%r24,%r23\n" \ -" bl _dl_init,%r2\n" \ +" bl _dl_init_internal,%r2\n" \ " ldo 4(%r23),%r23\n" /* delay slot */ \ \ /* Reload argc, argv to the registers start.S expects them in (feh) */ \ diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index 3b99978554..1645d83888 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -177,7 +177,7 @@ _dl_start_user:\n\ pea 8(%sp)\n\ move.l %d1, -(%sp)\n\ move.l ([_rtld_global@GOT.w, %a5]), -(%sp)\n\ - jbsr _dl_init@PLTPC\n\ + jbsr _dl_init_internal@PLTPC\n\ addq.l #8, %sp\n\ addq.l #8, %sp\n\ | Pass our finalizer function to the user in %a1.\n\ diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 4c28e17c9f..18eb3eb377 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -449,7 +449,7 @@ _dl_start_user:\n\ addu $7, $7, 4\n\ subu $29, 16\n\ # Call the function to run the initializers.\n\ - jal _dl_init + jal _dl_init_internal\n\ addiu $29, 16\n\ # Pass our finalizer function to the user in $2 as per ELF ABI.\n\ la $2, _dl_fini\n\ diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h index 7ee3cf52aa..6f89c0bb11 100644 --- a/sysdeps/mips/mips64/dl-machine.h +++ b/sysdeps/mips/mips64/dl-machine.h @@ -486,7 +486,7 @@ _dl_start_user:\n\ dla $7, 8($29)\n\ dsubu $29, 16\n\ # Call the function to run the initializers.\n\ - jal _dl_init + jal _dl_init_internal\n\ daddiu $29, 16\n\ # Pass our finalizer function to the user in ra.\n\ dla $31, _dl_fini\n\ @@ -498,7 +498,7 @@ _dl_start_user:\n\ la $7, 8($29)\n\ subu $29, 16\n\ # Call the function to run the initializers.\n\ - jal _dl_init + jal _dl_init_internal\n\ addiu $29, 16\n\ # Pass our finalizer function to the user in ra.\n\ dla $31, _dl_fini\n\ From f295ff32125aa9edb6d042e80295cf4c31b590ec Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 3 Feb 2002 02:24:53 +0000 Subject: [PATCH 2732/4487] (exchange_and_add): Use branch likely. (atomic_add): Likewise. (compare_and_swap): Return 0 only when failed to compare. Use branch likely. --- sysdeps/mips/atomicity.h | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/sysdeps/mips/atomicity.h b/sysdeps/mips/atomicity.h index 1fe1b7aebb..4d185075c4 100644 --- a/sysdeps/mips/atomicity.h +++ b/sysdeps/mips/atomicity.h @@ -33,11 +33,15 @@ exchange_and_add (volatile uint32_t *mem, int val) __asm__ __volatile__ ("/* Inline exchange & add */\n\t" + "ll %0,%3\n" "1:\n\t" - "ll %0,%3\n\t" "addu %1,%4,%0\n\t" "sc %1,%2\n\t" - "beqz %1,1b\n\t" + ".set push\n\t" + ".set noreorder\n\t" + "beqzl %1,1b\n\t" + " ll %0,%3\n\t" + ".set pop\n\t" "/* End exchange & add */" : "=&r"(result), "=&r"(tmp), "=m"(*mem) : "m" (*mem), "r"(val) @@ -54,11 +58,15 @@ atomic_add (volatile uint32_t *mem, int val) __asm__ __volatile__ ("/* Inline atomic add */\n\t" + "ll %0,%2\n" "1:\n\t" - "ll %0,%2\n\t" "addu %0,%3,%0\n\t" "sc %0,%1\n\t" - "beqz %0,1b\n\t" + ".set push\n\t" + ".set noreorder\n\t" + "beqzl %0,1b\n\t" + " ll %0,%2\n\t" + ".set pop\n\t" "/* End atomic add */" : "=&r"(result), "=m"(*mem) : "m" (*mem), "r"(val) @@ -69,22 +77,24 @@ static inline int __attribute__ ((unused)) compare_and_swap (volatile long int *p, long int oldval, long int newval) { - long int ret; + long int ret, temp; __asm__ __volatile__ ("/* Inline compare & swap */\n\t" + "ll %1,%5\n" "1:\n\t" - "ll %0,%4\n\t" - ".set push\n" + ".set push\n\t" ".set noreorder\n\t" - "bne %0,%2,2f\n\t" - "move %0,%3\n\t" - ".set pop\n\t" - "sc %0,%1\n\t" - "beqz %0,1b\n" + "bne %1,%3,2f\n\t" + " move %0,$0\n\t" + "move %0,%4\n\t" + "sc %0,%2\n\t" + "beqzl %0,1b\n\t" + " ll %1,%5\n\t" + ".set pop\n" "2:\n\t" "/* End compare & swap */" - : "=&r" (ret), "=m" (*p) + : "=&r" (ret), "=&r" (temp), "=m" (*p) : "r" (oldval), "r" (newval), "m" (*p) : "memory"); From d7d16bb3eaf17a21fafe25cdf0e8feba52f0cf63 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 3 Feb 2002 02:25:17 +0000 Subject: [PATCH 2733/4487] (_test_and_set): Use branch likely. --- sysdeps/unix/sysv/linux/mips/sys/tas.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/sys/tas.h b/sysdeps/unix/sysv/linux/mips/sys/tas.h index 0c81dc2de2..339670894f 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/tas.h +++ b/sysdeps/unix/sysv/linux/mips/sys/tas.h @@ -42,16 +42,19 @@ _test_and_set (int *p, int v) __THROW int r, t; __asm__ __volatile__ - ("1:\n\t" - "ll %0,%3\n\t" + ("/* Inline test and set */\n\t" + "ll %0,%3\n" + "1:\n\t" ".set push\n\t" ".set noreorder\n\t" "beq %0,%4,2f\n\t" " move %1,%4\n\t" - ".set pop\n\t" "sc %1,%2\n\t" - "beqz %1,1b\n" - "2:\n" + "beqzl %1,1b\n\t" + " ll %0,%3\n\t" + ".set pop\n" + "2:\n\t" + "/* End test and set */" : "=&r" (r), "=&r" (t), "=m" (*p) : "m" (*p), "r" (v) : "memory"); From 9ff2687616dbedeade97869db460be7cd8e94f31 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 6 Feb 2002 22:48:35 +0000 Subject: [PATCH 2734/4487] Make sure the right is included. --- sysdeps/mips/elf/ldsodefs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/mips/elf/ldsodefs.h b/sysdeps/mips/elf/ldsodefs.h index 4054391814..cabc51d796 100644 --- a/sysdeps/mips/elf/ldsodefs.h +++ b/sysdeps/mips/elf/ldsodefs.h @@ -1,5 +1,5 @@ /* Run-time dynamic linker data structures for loaded ELF shared objects. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright (C) 2000, 2002 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 @@ -22,4 +22,4 @@ #define DL_RO_DYN_SECTION 1 -#include +#include_next From 6d1e7ba62393aa514c3f122d4263f00426a2e47e Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 7 Feb 2002 10:39:06 +0000 Subject: [PATCH 2735/4487] Do not use branch likely. --- sysdeps/mips/atomicity.h | 31 +++++++++----------------- sysdeps/unix/sysv/linux/mips/sys/tas.h | 11 +++++---- 2 files changed, 16 insertions(+), 26 deletions(-) diff --git a/sysdeps/mips/atomicity.h b/sysdeps/mips/atomicity.h index 4d185075c4..a1a7761d3c 100644 --- a/sysdeps/mips/atomicity.h +++ b/sysdeps/mips/atomicity.h @@ -1,5 +1,5 @@ /* Low-level functions for atomic operations. Mips version. - Copyright (C) 2001 Free Software Foundation, Inc. + Copyright (C) 2001, 2002 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 @@ -32,16 +32,12 @@ exchange_and_add (volatile uint32_t *mem, int val) int result, tmp; __asm__ __volatile__ - ("/* Inline exchange & add */\n\t" - "ll %0,%3\n" + ("/* Inline exchange & add */\n" "1:\n\t" + "ll %0,%3\n\t" "addu %1,%4,%0\n\t" "sc %1,%2\n\t" - ".set push\n\t" - ".set noreorder\n\t" - "beqzl %1,1b\n\t" - " ll %0,%3\n\t" - ".set pop\n\t" + "beqz %1,1b\n\t" "/* End exchange & add */" : "=&r"(result), "=&r"(tmp), "=m"(*mem) : "m" (*mem), "r"(val) @@ -57,16 +53,12 @@ atomic_add (volatile uint32_t *mem, int val) int result; __asm__ __volatile__ - ("/* Inline atomic add */\n\t" - "ll %0,%2\n" + ("/* Inline atomic add */\n" "1:\n\t" + "ll %0,%2\n\t" "addu %0,%3,%0\n\t" "sc %0,%1\n\t" - ".set push\n\t" - ".set noreorder\n\t" - "beqzl %0,1b\n\t" - " ll %0,%2\n\t" - ".set pop\n\t" + "beqz %0,1b\n\t" "/* End atomic add */" : "=&r"(result), "=m"(*mem) : "m" (*mem), "r"(val) @@ -80,18 +72,17 @@ compare_and_swap (volatile long int *p, long int oldval, long int newval) long int ret, temp; __asm__ __volatile__ - ("/* Inline compare & swap */\n\t" - "ll %1,%5\n" + ("/* Inline compare & swap */\n" "1:\n\t" + "ll %1,%5\n\t" ".set push\n\t" ".set noreorder\n\t" "bne %1,%3,2f\n\t" " move %0,$0\n\t" + ".set pop\n\t" "move %0,%4\n\t" "sc %0,%2\n\t" - "beqzl %0,1b\n\t" - " ll %1,%5\n\t" - ".set pop\n" + "beqz %0,1b\n" "2:\n\t" "/* End compare & swap */" : "=&r" (ret), "=&r" (temp), "=m" (*p) diff --git a/sysdeps/unix/sysv/linux/mips/sys/tas.h b/sysdeps/unix/sysv/linux/mips/sys/tas.h index 339670894f..1bfbbcf2de 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/tas.h +++ b/sysdeps/unix/sysv/linux/mips/sys/tas.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Maciej W. Rozycki , 2000. @@ -42,17 +42,16 @@ _test_and_set (int *p, int v) __THROW int r, t; __asm__ __volatile__ - ("/* Inline test and set */\n\t" - "ll %0,%3\n" + ("/* Inline test and set */\n" "1:\n\t" + "ll %0,%3\n\t" ".set push\n\t" ".set noreorder\n\t" "beq %0,%4,2f\n\t" " move %1,%4\n\t" + ".set pop\n\t" "sc %1,%2\n\t" - "beqzl %1,1b\n\t" - " ll %0,%3\n\t" - ".set pop\n" + "beqz %1,1b\n" "2:\n\t" "/* End test and set */" : "=&r" (r), "=&r" (t), "=m" (*p) From c149ac8f45398b0fffaa7d33192baabac1de0056 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 8 Feb 2002 16:15:32 +0000 Subject: [PATCH 2736/4487] * sysdeps/mips/atomicity.h (compare_and_swap): Remove ".set noreorder". * sysdeps/unix/sysv/linux/mips/sys/tas.h (_test_and_set): Likewise. --- sysdeps/mips/atomicity.h | 5 +---- sysdeps/unix/sysv/linux/mips/sys/tas.h | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/sysdeps/mips/atomicity.h b/sysdeps/mips/atomicity.h index a1a7761d3c..b4b7b64dd0 100644 --- a/sysdeps/mips/atomicity.h +++ b/sysdeps/mips/atomicity.h @@ -75,11 +75,8 @@ compare_and_swap (volatile long int *p, long int oldval, long int newval) ("/* Inline compare & swap */\n" "1:\n\t" "ll %1,%5\n\t" - ".set push\n\t" - ".set noreorder\n\t" + "move %0,$0\n\t" "bne %1,%3,2f\n\t" - " move %0,$0\n\t" - ".set pop\n\t" "move %0,%4\n\t" "sc %0,%2\n\t" "beqz %0,1b\n" diff --git a/sysdeps/unix/sysv/linux/mips/sys/tas.h b/sysdeps/unix/sysv/linux/mips/sys/tas.h index 1bfbbcf2de..2a1a04546e 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/tas.h +++ b/sysdeps/unix/sysv/linux/mips/sys/tas.h @@ -45,11 +45,8 @@ _test_and_set (int *p, int v) __THROW ("/* Inline test and set */\n" "1:\n\t" "ll %0,%3\n\t" - ".set push\n\t" - ".set noreorder\n\t" + "move %1,%4\n\t" "beq %0,%4,2f\n\t" - " move %1,%4\n\t" - ".set pop\n\t" "sc %1,%2\n\t" "beqz %1,1b\n" "2:\n\t" From b16fd2b0509ef10bdfd363ff325f99b941552d14 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 8 Feb 2002 16:21:00 +0000 Subject: [PATCH 2737/4487] * sysdeps/unix/sysv/linux/mips/sys/procfs.h: Don't include , nor . Updated for gdb. * sysdeps/unix/sysv/linux/mips/sys/user.h: New. --- sysdeps/unix/sysv/linux/mips/sys/procfs.h | 31 ++++++-------- sysdeps/unix/sysv/linux/mips/sys/user.h | 52 +++++++++++++++++++++++ 2 files changed, 65 insertions(+), 18 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/mips/sys/user.h diff --git a/sysdeps/unix/sysv/linux/mips/sys/procfs.h b/sysdeps/unix/sysv/linux/mips/sys/procfs.h index 76dd2bbeb8..a21652e1ce 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/mips/sys/procfs.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1999, 2000, 2002 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 @@ -24,12 +24,19 @@ used on Linux. */ #include -#include #include #include -#include #include -#include + +/* ELF register definitions */ +#define ELF_NGREG 45 +#define ELF_NFPREG 33 + +typedef unsigned long elf_greg_t; +typedef elf_greg_t elf_gregset_t[ELF_NGREG]; + +typedef double elf_fpreg_t; +typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; __BEGIN_DECLS @@ -50,19 +57,10 @@ struct elf_siginfo marked with "XXX". */ struct elf_prstatus { -#if 0 - long int pr_flags; /* XXX Process flags. */ - short int pr_why; /* XXX Reason for process halt. */ - short int pr_what; /* XXX More detailed reason. */ -#endif struct elf_siginfo pr_info; /* Info associated with signal. */ short int pr_cursig; /* Current signal. */ unsigned long int pr_sigpend; /* Set of pending signals. */ unsigned long int pr_sighold; /* Set of held signals. */ -#if 0 - struct sigaltstack pr_altstack; /* Alternate stack info. */ - struct sigaction pr_action; /* Signal action for current sig. */ -#endif __pid_t pr_pid; __pid_t pr_ppid; __pid_t pr_pgrp; @@ -71,9 +69,6 @@ struct elf_prstatus struct timeval pr_stime; /* System time. */ struct timeval pr_cutime; /* Cumulative user time. */ struct timeval pr_cstime; /* Cumulative system time. */ -#if 0 - long int pr_instr; /* Current instruction. */ -#endif elf_gregset_t pr_reg; /* GP registers. */ int pr_fpvalid; /* True if math copro being used. */ }; @@ -101,8 +96,8 @@ struct elf_prpsinfo typedef void *psaddr_t; /* Register sets. Linux has different names. */ -typedef gregset_t prgregset_t; -typedef fpregset_t prfpregset_t; +typedef elf_gregset_t prgregset_t; +typedef elf_fpregset_t prfpregset_t; /* We don't have any differences between processes and threads, therefore habe only ine PID type. */ diff --git a/sysdeps/unix/sysv/linux/mips/sys/user.h b/sysdeps/unix/sysv/linux/mips/sys/user.h new file mode 100644 index 0000000000..21f7b28ca1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/sys/user.h @@ -0,0 +1,52 @@ +/* Copyright (C) 2002 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 _SYS_USER_H +#define _SYS_USER_H 1 + +/* The whole purpose of this file is for GDB and GDB only. Don't read + too much into it. Don't use it for anything other than GDB unless + you know what you are doing. */ + +#include + +struct user +{ + unsigned long regs[EF_SIZE/4+64]; /* integer and fp regs */ + size_t u_tsize; /* text size (pages) */ + size_t u_dsize; /* data size (pages) */ + size_t u_ssize; /* stack size (pages) */ + unsigned long start_code; /* text starting address */ + unsigned long start_data; /* data starting address */ + unsigned long start_stack; /* stack starting address */ + long int signal; /* signal causing core dump */ + void* u_ar0; /* help gdb find registers */ + unsigned long magic; /* identifies a core file */ + char u_comm[32]; /* user command name */ +}; + +#define PAGE_SHIFT 12 +#define PAGE_SIZE (1UL << PAGE_SHIFT) +#define PAGE_MASK (~(PAGE_SIZE-1)) +#define NBPG PAGE_SIZE +#define UPAGES 1 +#define HOST_TEXT_START_ADDR (u.start_code) +#define HOST_DATA_START_ADDR (u.start_data) +#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) + +#endif /* _SYS_USER_H */ From 4bf39226fac5704a1736b43704b97b177ba393cc Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 8 Feb 2002 18:56:57 +0000 Subject: [PATCH 2738/4487] * sysdeps/mips/dl-machine.h (elf_machine_matches_host): Use __attribute_used__. (__dl_runtime_resolve): Likewise. * sysdeps/mips/machine-gmon.h (_MCOUNT_DECL): Make it a real declaration. --- sysdeps/mips/dl-machine.h | 4 ++-- sysdeps/mips/machine-gmon.h | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 18eb3eb377..893f1047e8 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -69,7 +69,7 @@ do { if ((l)->l_info[DT_MIPS (RLD_MAP)]) \ } while (0) /* Return nonzero iff ELF header is compatible with the running host. */ -static inline int __attribute__ ((unused)) +static inline int __attribute_used__ elf_machine_matches_host (const ElfW(Ehdr) *ehdr) { switch (ehdr->e_machine) @@ -262,7 +262,7 @@ int _dl_mips_gnu_objects = 1; \ /* This is called from assembly stubs below which the compiler can't see. */ \ static ElfW(Addr) \ __dl_runtime_resolve (ElfW(Word), ElfW(Word), ElfW(Addr), ElfW(Addr)) \ - __attribute__ ((unused)); \ + __attribute_used__; \ \ static ElfW(Addr) \ __dl_runtime_resolve (ElfW(Word) sym_index, \ diff --git a/sysdeps/mips/machine-gmon.h b/sysdeps/mips/machine-gmon.h index 4b6a939a0a..f9bd2b4d14 100644 --- a/sysdeps/mips/machine-gmon.h +++ b/sysdeps/mips/machine-gmon.h @@ -1,5 +1,5 @@ /* Machine-specific calling sequence for `mcount' profiling function. MIPS - Copyright (C) 1996, 1997, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 2000, 2001, 2002 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 @@ -17,7 +17,8 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#define _MCOUNT_DECL static void __mcount +#define _MCOUNT_DECL(frompc,selfpc) \ +static void __attribute_used__ __mcount (u_long frompc, u_long selfpc) /* Call __mcount with our the return PC for our caller, and the return PC our caller will return to. */ From 64e7a2bf11cfd39c9069bc9901fabbc1d369b7a2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 9 Feb 2002 01:58:16 +0000 Subject: [PATCH 2739/4487] Use \n\ for multiline string. --- sysdeps/alpha/elf/initfini.c | 117 +++++++++++++++++------------------ 1 file changed, 58 insertions(+), 59 deletions(-) diff --git a/sysdeps/alpha/elf/initfini.c b/sysdeps/alpha/elf/initfini.c index e1c0f1c4d6..6c4d04b38c 100644 --- a/sysdeps/alpha/elf/initfini.c +++ b/sysdeps/alpha/elf/initfini.c @@ -1,5 +1,5 @@ /* Special .init and .fini section support for Alpha. - Copyright (C) 2001 Free Software Foundation, Inc. + Copyright (C) 2001, 2002 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,62 +37,61 @@ files, all of which may have different GP values. So we must reload the GP value from crti.o in crtn.o. */ -__asm__ (" - -#include \"defs.h\" - -/*@HEADER_ENDS*/ - -/*@_init_PROLOG_BEGINS*/ - .section .init, \"ax\", @progbits - .globl _init - .ent _init -_init: - ldgp $29, 0($27) - subq $30, 16, $30 - lda $27, __gmon_start__ - stq $26, 0($30) - stq $29, 8($30) - .prologue 1 - beq $27, 1f - jsr $26, ($27), __gmon_start__ - ldq $29, 8($30) -1: - .align 3 - .end _init - .size _init, 0 -/*@_init_PROLOG_ENDS*/ - -/*@_init_EPILOG_BEGINS*/ - .section .init, \"ax\", @progbits - ldq $26, 0($30) - ldq $29, 8($30) - addq $30, 16, $30 - ret -/*@_init_EPILOG_ENDS*/ - -/*@_fini_PROLOG_BEGINS*/ - .section .fini, \"ax\", @progbits - .globl _fini - .ent _fini -_fini: - ldgp $29, 0($27) - subq $30, 16, $30 - stq $26, 0($30) - stq $29, 8($30) - .prologue 1 - .align 3 - .end _fini - .size _fini, 0 -/*@_fini_PROLOG_ENDS*/ - -/*@_fini_EPILOG_BEGINS*/ - .section .fini, \"ax\", @progbits - ldq $26, 0($30) - ldq $29, 8($30) - addq $30, 16, $30 - ret -/*@_fini_EPILOG_ENDS*/ - -/*@TRAILER_BEGINS*/ +__asm__ (" \n\ +#include \"defs.h\" \n\ + \n\ +/*@HEADER_ENDS*/ \n\ + \n\ +/*@_init_PROLOG_BEGINS*/ \n\ + .section .init, \"ax\", @progbits \n\ + .globl _init \n\ + .ent _init \n\ +_init: \n\ + ldgp $29, 0($27) \n\ + subq $30, 16, $30 \n\ + lda $27, __gmon_start__ \n\ + stq $26, 0($30) \n\ + stq $29, 8($30) \n\ + .prologue 1 \n\ + beq $27, 1f \n\ + jsr $26, ($27), __gmon_start__ \n\ + ldq $29, 8($30) \n\ + .align 3 \n\ +1: \n\ + .end _init \n\ + .size _init, 0 \n\ +/*@_init_PROLOG_ENDS*/ \n\ + \n\ +/*@_init_EPILOG_BEGINS*/ \n\ + .section .init, \"ax\", @progbits \n\ + ldq $26, 0($30) \n\ + ldq $29, 8($30) \n\ + addq $30, 16, $30 \n\ + ret \n\ +/*@_init_EPILOG_ENDS*/ \n\ + \n\ +/*@_fini_PROLOG_BEGINS*/ \n\ + .section .fini, \"ax\", @progbits \n\ + .globl _fini \n\ + .ent _fini \n\ +_fini: \n\ + ldgp $29, 0($27) \n\ + subq $30, 16, $30 \n\ + stq $26, 0($30) \n\ + stq $29, 8($30) \n\ + .prologue 1 \n\ + .align 3 \n\ + .end _fini \n\ + .size _fini, 0 \n\ +/*@_fini_PROLOG_ENDS*/ \n\ + \n\ +/*@_fini_EPILOG_BEGINS*/ \n\ + .section .fini, \"ax\", @progbits \n\ + ldq $26, 0($30) \n\ + ldq $29, 8($30) \n\ + addq $30, 16, $30 \n\ + ret \n\ +/*@_fini_EPILOG_ENDS*/ \n\ + \n\ +/*@TRAILER_BEGINS*/ \n\ "); From c8523a3c743ddf213ada026e8973b8e2c9c94026 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 11 Feb 2002 10:23:36 +0000 Subject: [PATCH 2740/4487] Update MCOUNT for current GCC behavior. --- sysdeps/mips/machine-gmon.h | 63 +++++++++++++++++++++---------------- 1 file changed, 36 insertions(+), 27 deletions(-) diff --git a/sysdeps/mips/machine-gmon.h b/sysdeps/mips/machine-gmon.h index f9bd2b4d14..102da2c36d 100644 --- a/sysdeps/mips/machine-gmon.h +++ b/sysdeps/mips/machine-gmon.h @@ -24,36 +24,45 @@ static void __attribute_used__ __mcount (u_long frompc, u_long selfpc) and the return PC our caller will return to. */ #ifdef __PIC__ #define CPLOAD ".cpload $25;" +#define CPRESTORE ".cprestore 44\n\t" #else #define CPLOAD +#define CPRESTORE #endif #define MCOUNT asm(\ - ".globl _mcount;" \ - ".align 2;" \ - ".type _mcount,@function;" \ - "_mcount:;" \ - ".set noreorder;" \ - ".set noat;" \ + ".globl _mcount;\n\t" \ + ".align 2;\n\t" \ + ".type _mcount,@function;\n\t" \ + ".ent _mcount\n\t" \ + "_mcount:\n\t" \ + ".frame $sp,44,$31\n\t" \ + ".set noreorder;\n\t" \ + ".set noat;\n\t" \ CPLOAD \ - "sw $4,8($29);" \ - "sw $5,12($29);" \ - "sw $6,16($29);" \ - "sw $7,20($29);" \ - "sw $1,0($29);" \ - "sw $31,4($29);" \ - "move $5,$31;" \ - "move $4,$1;" \ - "jal __mcount;" \ - "nop;" \ - "lw $4,8($29);" \ - "lw $5,12($29);" \ - "lw $6,16($29);" \ - "lw $7,20($29);" \ - "lw $31,4($29);" \ - "lw $1,0($29);" \ - "addu $29,$29,8;" \ - "j $31;" \ - "move $31,$1;" \ - ".set reorder;" \ - ".set at"); + "subu $29,$29,48;\n\t" \ + CPRESTORE \ + "sw $4,24($29);\n\t" \ + "sw $5,28($29);\n\t" \ + "sw $6,32($29);\n\t" \ + "sw $7,36($29);\n\t" \ + "sw $2,40($29);\n\t" \ + "sw $1,16($29);\n\t" \ + "sw $31,20($29);\n\t" \ + "move $5,$31;\n\t" \ + "move $4,$1;\n\t" \ + "jal __mcount;\n\t" \ + "nop;\n\t" \ + "lw $4,24($29);\n\t" \ + "lw $5,28($29);\n\t" \ + "lw $6,32($29);\n\t" \ + "lw $7,36($29);\n\t" \ + "lw $2,40($29);\n\t" \ + "lw $31,20($29);\n\t" \ + "lw $1,16($29);\n\t" \ + "addu $29,$29,56;\n\t" \ + "j $31;\n\t" \ + "move $31,$1;\n\t" \ + ".set reorder;\n\t" \ + ".set at\n\t" \ + ".end _mcount"); From 1bb0396702e9bdfcd124da2ca95897586a8dc6ee Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 23 Feb 2002 08:45:12 +0000 Subject: [PATCH 2741/4487] Call __init_misc in addition to __libc_init. --- sysdeps/mach/hurd/mips/init-first.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysdeps/mach/hurd/mips/init-first.c b/sysdeps/mach/hurd/mips/init-first.c index d0ab593404..525f510cc1 100644 --- a/sysdeps/mach/hurd/mips/init-first.c +++ b/sysdeps/mach/hurd/mips/init-first.c @@ -1,5 +1,5 @@ /* Initialization code run first thing by the ELF startup code. For Mips/Hurd. - Copyright (C) 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1996,1997,1998,2000,2001,2002 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 @@ -27,6 +27,7 @@ extern void __mach_init (void); extern void __libc_init (int, char **, char **); +extern void __init_misc (int, char **, char **); #ifdef USE_NONOPTION_FLAGS extern void __getopt_clean_environment (char **); #endif @@ -106,6 +107,7 @@ init1 (int argc, char *arg0, ...) d->portarray, d->portarraysize, d->intarray, d->intarraysize); + __init_misc (argc, argv, __environ); __libc_init (argc, argv, __environ); #ifdef USE_NONOPTION_FLAGS From 53ea1a569ed53210d9ca041b555596c8bd66e005 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 24 Feb 2002 08:33:08 +0000 Subject: [PATCH 2742/4487] Call _dl_non_dynamic_init for !SHARED. --- sysdeps/mach/hurd/mips/init-first.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sysdeps/mach/hurd/mips/init-first.c b/sysdeps/mach/hurd/mips/init-first.c index 525f510cc1..07b8e9e38c 100644 --- a/sysdeps/mach/hurd/mips/init-first.c +++ b/sysdeps/mach/hurd/mips/init-first.c @@ -31,6 +31,9 @@ extern void __init_misc (int, char **, char **); #ifdef USE_NONOPTION_FLAGS extern void __getopt_clean_environment (char **); #endif +#ifndef SHARED +extern void _dl_non_dynamic_init (void) internal_function; +#endif extern void __libc_global_ctors (void); unsigned int __hurd_threadvar_max; @@ -107,6 +110,9 @@ init1 (int argc, char *arg0, ...) d->portarray, d->portarraysize, d->intarray, d->intarraysize); +#ifndef SHARED + _dl_non_dynamic_init (); +#endif __init_misc (argc, argv, __environ); __libc_init (argc, argv, __environ); From 88706a4c849e4262dc4ec6911c3eecf61940056e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 27 Feb 2002 18:10:53 +0000 Subject: [PATCH 2743/4487] (elf_machine_load_address, RTLD_START): Work around an Alpha gas bug. --- sysdeps/alpha/dl-machine.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 5feb46d69c..6024f135b7 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -74,7 +74,7 @@ elf_machine_load_address (void) "0:\n\t" "br $0, 2f\n" "1:\n\t" - ".data\n" + ".section\t.data\n" "2:\n\t" ".quad 0b\n\t" ".previous" @@ -294,7 +294,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) its return value is the user program's entry point. */ #define RTLD_START asm ("\ -.text \n\ + .section .text \n\ .set at \n\ .globl _start \n\ .ent _start \n\ From 23f357ebe1719e42453b95e99f7907200847d534 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 28 Feb 2002 19:37:12 +0000 Subject: [PATCH 2744/4487] (sysdep_routines): Add divdi3 in csu dir. (shared-only-routines): Likewise. --- sysdeps/m68k/Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile index c44b2d196c..2515df7324 100644 --- a/sysdeps/m68k/Makefile +++ b/sysdeps/m68k/Makefile @@ -33,6 +33,14 @@ CFLAGS-setjmp.c := -fno-omit-frame-pointer # The 68k `long double' is a distinct type we support. long-double-fcts = yes +ifeq ($(subdir),csu) +ifeq (yes,$(build-shared)) +# Compatibility +sysdep_routines += divdi3 +shared-only-routines += divdi3 +endif +endif + ifeq ($(subdir),elf) CFLAGS-rtld.c += -Wno-uninitialized -Wno-unused endif From dca9c7304b376285b255cd3b87f85eb62d029e5b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 28 Feb 2002 22:36:33 +0000 Subject: [PATCH 2745/4487] Add HAVE_VISIBILITY_ATTRIBUTE and HAVE_SDATA_SECTION. --- sysdeps/alpha/dl-machine.h | 2 +- sysdeps/arm/dl-machine.h | 2 +- sysdeps/cris/dl-machine.h | 2 +- sysdeps/hppa/dl-machine.h | 4 ++-- sysdeps/m68k/dl-machine.h | 2 +- sysdeps/mips/dl-machine.h | 2 +- sysdeps/mips/mips64/dl-machine.h | 4 ++-- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 6024f135b7..490f1f1754 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -328,7 +328,7 @@ _dl_start_user: \n\ " RTLD_START_SPECIAL_INIT " \n\ /* Call _dl_init(_dl_loaded, argc, argv, envp) to run \n\ initializers. */ \n\ - ldq $16, _rtld_global \n\ + ldq $16, _rtld_local \n\ ldq $17, 0($sp) \n\ lda $18, 8($sp) \n\ s8addq $17, 8, $19 \n\ diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 5d1656480d..177a375be5 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -324,7 +324,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) .L_STACK_END: .word __libc_stack_end(GOT) .L_LOADED: - .word _rtld_global(GOT) + .word _rtld_local(GOT) .previous\n\ "); diff --git a/sysdeps/cris/dl-machine.h b/sysdeps/cris/dl-machine.h index 34d29fa3ac..966d86b27b 100644 --- a/sysdeps/cris/dl-machine.h +++ b/sysdeps/cris/dl-machine.h @@ -212,7 +212,7 @@ asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \ move.d $sp,$r12 addq 4,$r12 ; main_map: at _dl_loaded. - move.d [$r0+_rtld_global:GOT16],$r9 + move.d [$r0+_rtld_local:GOT16],$r9 move.d [$r9],$r10 move.d _dl_init_internal:PLTG,$r9 add.d $r0,$r9 diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h index bc3a9839f7..6d4249437d 100644 --- a/sysdeps/hppa/dl-machine.h +++ b/sysdeps/hppa/dl-machine.h @@ -362,8 +362,8 @@ asm ( \ " stw %r24,-44(%sp)\n" \ \ ".Lnofix:\n" \ -" addil LT'_rtld_global,%r19\n" \ -" ldw RT'_rtld_global(%r1),%r26\n" \ +" addil LT'_rtld_local,%r19\n" \ +" ldw RT'_rtld_local(%r1),%r26\n" \ " bl set_dp, %r2\n" \ " ldw 0(%r26),%r26\n" \ \ diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index 1645d83888..b2e1c6b8b4 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -176,7 +176,7 @@ _dl_start_user:\n\ pea 8(%sp, %d1*4)\n\ pea 8(%sp)\n\ move.l %d1, -(%sp)\n\ - move.l ([_rtld_global@GOT.w, %a5]), -(%sp)\n\ + move.l ([_rtld_local@GOT.w, %a5]), -(%sp)\n\ jbsr _dl_init_internal@PLTPC\n\ addq.l #8, %sp\n\ addq.l #8, %sp\n\ diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 893f1047e8..fcf37f6569 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -441,7 +441,7 @@ _dl_start_user:\n\ # Save back the modified argument count.\n\ sw $4, 0($29)\n\ 1: # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env) \n\ - lw $4, _rtld_global\n\ + lw $4, _rtld_local\n\ lw $5, 0($29)\n\ la $6, 4($29)\n\ sll $7, $5, 2\n\ diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h index 6f89c0bb11..64731b863a 100644 --- a/sysdeps/mips/mips64/dl-machine.h +++ b/sysdeps/mips/mips64/dl-machine.h @@ -480,7 +480,7 @@ _dl_start_user:\n\ # Save back the modified argument count.\n\ sd $4, 0($29)\n\ 1: # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env) \n\ - ld $4, _rtld_global\n\ + ld $4, _rtld_local\n\ ld $5, 0($29)\n\ dla $6, 4($29)\n\ dla $7, 8($29)\n\ @@ -492,7 +492,7 @@ _dl_start_user:\n\ dla $31, _dl_fini\n\ # Jump to the user entry point.\n\ 1: # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env) \n\ - lw $4, _rtld_global\n\ + lw $4, _rtld_local\n\ lw $5, 0($29)\n\ la $6, 4($29)\n\ la $7, 8($29)\n\ From ceb7d0bbbe3741d7bfdf1d8b30e1979e9aacc0c7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 1 Mar 2002 09:43:36 +0000 Subject: [PATCH 2746/4487] Use rtld_progrname instead of _dl_argv[0]. --- sysdeps/arm/dl-machine.h | 40 ++++++++++++++++++--------------------- sysdeps/cris/dl-machine.h | 3 +-- sysdeps/hppa/dl-machine.h | 2 +- sysdeps/m68k/dl-machine.h | 3 +-- 4 files changed, 21 insertions(+), 27 deletions(-) diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 177a375be5..4a7ab3867c 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -377,11 +377,9 @@ elf_machine_plt_value (struct link_map *map, const Elf32_Rel *reloc, /* ARM never uses Elf32_Rela relocations for the dynamic linker. Prelinked libraries may use Elf32_Rela though. */ -#ifdef RTLD_BOOTSTRAP -#define ELF_MACHINE_NO_RELA 1 -#endif - -extern char **_dl_argv; +# ifdef RTLD_BOOTSTRAP +# define ELF_MACHINE_NO_RELA 1 +# endif /* Deal with an out-of-range PC24 reloc. */ static Elf32_Addr @@ -426,15 +424,15 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, if (__builtin_expect (r_type == R_ARM_RELATIVE, 0)) { -#ifndef RTLD_BOOTSTRAP +# ifndef RTLD_BOOTSTRAP if (map != &_dl_rtld_map) /* Already done in rtld itself. */ -#endif +# endif *reloc_addr += map->l_addr; } -#ifndef RTLD_BOOTSTRAP +# ifndef RTLD_BOOTSTRAP else if (__builtin_expect (r_type == R_ARM_NONE, 0)) return; -#endif +# endif else { const Elf32_Sym *const refsym = sym; @@ -457,7 +455,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]); _dl_error_printf ("\ %s: Symbol `%s' has different size in shared object, consider re-linking\n", - _dl_argv[0] ?: "", + rtld_progname ?: "", strtab + refsym->st_name); } memcpy (reloc_addr, (void *) value, MIN (sym->st_size, @@ -465,26 +463,26 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, break; case R_ARM_GLOB_DAT: case R_ARM_JUMP_SLOT: -#ifdef RTLD_BOOTSTRAP +# ifdef RTLD_BOOTSTRAP /* Fix weak undefined references. */ if (sym != NULL && sym->st_value == 0) *reloc_addr = 0; else -#endif +# endif *reloc_addr = value; break; case R_ARM_ABS32: { -#ifndef RTLD_BOOTSTRAP +# ifndef RTLD_BOOTSTRAP /* This is defined in rtld.c, but nowhere in the static libc.a; make the reference weak so static programs can still link. This declaration cannot be done when compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP) because rtld.c contains the common defn for _dl_rtld_map, which is incompatible with a weak decl in the same file. */ -# ifndef SHARED +# ifndef SHARED weak_extern (_dl_rtld_map); -# endif +# endif if (map == &_dl_rtld_map) /* Undo the relocation done here during bootstrapping. Now we will relocate it anew, possibly using a @@ -492,7 +490,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, rather than the dynamic linker's built-in definitions used while loading those libraries. */ value -= map->l_addr + refsym->st_value; -#endif +# endif *reloc_addr += value; break; } @@ -529,7 +527,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, } } -#ifndef RTLD_BOOTSTRAP +# ifndef RTLD_BOOTSTRAP static inline void elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, const Elf32_Sym *sym, const struct r_found_version *version, @@ -539,10 +537,8 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, if (__builtin_expect (r_type == R_ARM_RELATIVE, 0)) *reloc_addr = map->l_addr + reloc->r_addend; -#ifndef RTLD_BOOTSTRAP else if (__builtin_expect (r_type == R_ARM_NONE, 0)) return; -#endif else { const Elf32_Sym *const refsym = sym; @@ -585,7 +581,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, } } } -#endif +# endif static inline void elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rel *reloc, @@ -594,14 +590,14 @@ elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rel *reloc, *reloc_addr += l_addr; } -#ifndef RTLD_BOOTSTRAP +# ifndef RTLD_BOOTSTRAP static inline void elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, Elf32_Addr *const reloc_addr) { *reloc_addr = l_addr + reloc->r_addend; } -#endif +# endif static inline void elf_machine_lazy_rel (struct link_map *map, diff --git a/sysdeps/cris/dl-machine.h b/sysdeps/cris/dl-machine.h index 966d86b27b..51ae43d096 100644 --- a/sysdeps/cris/dl-machine.h +++ b/sysdeps/cris/dl-machine.h @@ -314,13 +314,12 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, if (sym->st_size > refsym->st_size || (GL(dl_verbose) && sym->st_size < refsym->st_size)) { - extern char **_dl_argv; const char *strtab; strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]); _dl_error_printf ("\ %s: Symbol `%s' has different size in shared object, consider re-linking\n", - _dl_argv[0] ?: "", + rtld_progname ?: "", strtab + refsym->st_name); } memcpy (reloc_addr, (void *) value, MIN (sym->st_size, diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h index 6d4249437d..b30a3ba62d 100644 --- a/sysdeps/hppa/dl-machine.h +++ b/sysdeps/hppa/dl-machine.h @@ -611,7 +611,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, strtab = (const char *) D_PTR (map, l_info[DT_STRTAB]); _dl_error_printf ("\ %s: Symbol `%s' has different size in shared object, consider re-linking\n", - _dl_argv[0] ?: "", + rtld_progname ?: "", strtab + refsym->st_name); } memcpy (reloc_addr, (void *) value, diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index b2e1c6b8b4..ce80aad8fa 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -253,13 +253,12 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, if (sym->st_size > refsym->st_size || (sym->st_size < refsym->st_size && GL(dl_verbose))) { - extern char **_dl_argv; const char *strtab; strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]); _dl_error_printf ("\ %s: Symbol `%s' has different size in shared object, consider re-linking\n", - _dl_argv[0] ?: "", + rtld_progname ?: "", strtab + refsym->st_name); } memcpy (reloc_addr, (void *) value, MIN (sym->st_size, From b5f72d715efd5715986fdce112be4bf59ca4de2f Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sat, 2 Mar 2002 13:14:40 +0000 Subject: [PATCH 2747/4487] Added initialization of GP (to _gp) if compiled non-PIC. --- sysdeps/mips/elf/start.S | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysdeps/mips/elf/start.S b/sysdeps/mips/elf/start.S index e129930505..01908e28db 100644 --- a/sysdeps/mips/elf/start.S +++ b/sysdeps/mips/elf/start.S @@ -1,5 +1,5 @@ /* Startup code compliant to the ELF Mips ABI. - Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1995, 1997, 2000, 2001, 2002 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 @@ -71,6 +71,8 @@ ENTRY_POINT: #ifdef __PIC__ SET_GP +#else + la $28, _gp /* Setup GP correctly if we're non-PIC. */ #endif move $31, $0 From 48e6095f0e7dcc0827d6c1ccb1b5bf461ae323b7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 12 Mar 2002 21:37:08 +0000 Subject: [PATCH 2748/4487] Define __libc_argc and __libc_argv as hidden. --- sysdeps/mach/hurd/mips/init-first.c | 6 +++--- sysdeps/unix/sysv/aix/init-first.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sysdeps/mach/hurd/mips/init-first.c b/sysdeps/mach/hurd/mips/init-first.c index 07b8e9e38c..dbcad4b481 100644 --- a/sysdeps/mach/hurd/mips/init-first.c +++ b/sysdeps/mach/hurd/mips/init-first.c @@ -31,7 +31,7 @@ extern void __init_misc (int, char **, char **); #ifdef USE_NONOPTION_FLAGS extern void __getopt_clean_environment (char **); #endif -#ifndef SHARED +#ifndef SHARED extern void _dl_non_dynamic_init (void) internal_function; #endif extern void __libc_global_ctors (void); @@ -42,8 +42,8 @@ unsigned long int __hurd_threadvar_stack_mask; int __libc_multiple_libcs = 1; -int __libc_argc; -char **__libc_argv; +int __libc_argc attribute_hidden; +char **__libc_argv attribute_hidden; void *(*_cthread_init_routine) (void); /* Returns new SP to use. */ void (*_cthread_exit_routine) (int status) __attribute__ ((__noreturn__)); diff --git a/sysdeps/unix/sysv/aix/init-first.c b/sysdeps/unix/sysv/aix/init-first.c index 2a60a927fc..7b4773b633 100644 --- a/sysdeps/unix/sysv/aix/init-first.c +++ b/sysdeps/unix/sysv/aix/init-first.c @@ -46,8 +46,8 @@ int __libc_multiple_libcs = 1; /* Remember the command line argument and enviroment contents for later calls of initializers for dynamic libraries. */ -int __libc_argc; -char **__libc_argv; +int __libc_argc attribute_hidden; +char **__libc_argv attribute_hidden; static void From 15a7702daabad96042e780ff545da1e360b98ead Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 13 Mar 2002 03:49:52 +0000 Subject: [PATCH 2749/4487] (__libc_multiple_libcs): Define as hidden. --- sysdeps/arm/init-first.c | 4 ++-- sysdeps/mach/hurd/mips/init-first.c | 2 +- sysdeps/unix/sysv/aix/init-first.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/arm/init-first.c b/sysdeps/arm/init-first.c index 6856314c83..652cf95d14 100644 --- a/sysdeps/arm/init-first.c +++ b/sysdeps/arm/init-first.c @@ -1,5 +1,5 @@ /* Initialization code run first thing by the ELF startup code. For ARM. - Copyright (C) 1995, 1996, 1997, 1998, 2001 Free Software Foundation, Inc. + Copyright (C) 1995,1996,1997,1998,2001,2002 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,7 +25,7 @@ extern void __getopt_clean_environment (char **); #endif extern void __libc_global_ctors (void); -int __libc_multiple_libcs = 1; +int __libc_multiple_libcs attribute_hidden = 1; static void init (int *data) diff --git a/sysdeps/mach/hurd/mips/init-first.c b/sysdeps/mach/hurd/mips/init-first.c index dbcad4b481..5adba3be17 100644 --- a/sysdeps/mach/hurd/mips/init-first.c +++ b/sysdeps/mach/hurd/mips/init-first.c @@ -40,7 +40,7 @@ unsigned int __hurd_threadvar_max; unsigned long int __hurd_threadvar_stack_offset; unsigned long int __hurd_threadvar_stack_mask; -int __libc_multiple_libcs = 1; +int __libc_multiple_libcs attribute_hidden = 1; int __libc_argc attribute_hidden; char **__libc_argv attribute_hidden; diff --git a/sysdeps/unix/sysv/aix/init-first.c b/sysdeps/unix/sysv/aix/init-first.c index 7b4773b633..4c6768b8ad 100644 --- a/sysdeps/unix/sysv/aix/init-first.c +++ b/sysdeps/unix/sysv/aix/init-first.c @@ -42,7 +42,7 @@ weak_extern (_dl_starting_up) /* Set nonzero if we have to be prepared for more then one libc being used in the process. Safe assumption if initializer never runs. */ -int __libc_multiple_libcs = 1; +int __libc_multiple_libcs attribute_hidden = 1; /* Remember the command line argument and enviroment contents for later calls of initializers for dynamic libraries. */ From 7862ef805bcf3c052f3d3a2eef49c0de56abd9ea Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 14 Mar 2002 20:44:11 +0000 Subject: [PATCH 2750/4487] Dummy file fo rnot needed __clz_tab table. --- sysdeps/hppa/mp_clz_tab.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/hppa/mp_clz_tab.c diff --git a/sysdeps/hppa/mp_clz_tab.c b/sysdeps/hppa/mp_clz_tab.c new file mode 100644 index 0000000000..52d06383c1 --- /dev/null +++ b/sysdeps/hppa/mp_clz_tab.c @@ -0,0 +1 @@ +/* __clz_tab not needed on hppa. */ From f1cdba97f5000b0b436acff729008520e6a657a8 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sun, 17 Mar 2002 12:07:44 +0000 Subject: [PATCH 2751/4487] * sysdeps/mips/fpu/fraiseexcpt.c (__feraiseexcept): Set cause bits. * sysdeps/mips/fpu/fgetexcptflg.c (__fegetexceptflag): Add comment. * sysdeps/mips/fpu/fclrexcpt.c (__feclearexcept): Clear also cause bits. * sysdeps/mips/fpu/fenv_libc.h (CAUSE_MASK): New. (CAUSE_SHIFT): New. --- sysdeps/mips/fpu/fclrexcpt.c | 11 ++++++++--- sysdeps/mips/fpu/fenv_libc.h | 13 ++++++++----- sysdeps/mips/fpu/fgetexcptflg.c | 6 +++++- sysdeps/mips/fpu/fraiseexcpt.c | 12 +++++++++--- 4 files changed, 30 insertions(+), 12 deletions(-) diff --git a/sysdeps/mips/fpu/fclrexcpt.c b/sysdeps/mips/fpu/fclrexcpt.c index 9fb2d7e803..2c35047a8c 100644 --- a/sysdeps/mips/fpu/fclrexcpt.c +++ b/sysdeps/mips/fpu/fclrexcpt.c @@ -1,5 +1,5 @@ /* Clear given exceptions in current floating-point environment. - Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger , 1998. @@ -19,6 +19,7 @@ 02111-1307 USA. */ #include +#include #include #include @@ -33,8 +34,11 @@ __feclearexcept (int excepts) /* Read the complete control word. */ _FPU_GETCW (cw); - /* Clear exception bits. */ - cw &= ~excepts; + /* Clear exception flag bits and cause bits. If the cause bit is not + cleared, the next CTC instruction (just below) will re-generate + the exception. */ + + cw &= ~(excepts | (excepts << CAUSE_SHIFT)); /* Put the new data in effect. */ _FPU_SETCW (cw); @@ -42,6 +46,7 @@ __feclearexcept (int excepts) /* Success. */ return 0; } + #if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__feclearexcept, __old_feclearexcept) compat_symbol (libm, __old_feclearexcept, feclearexcept, GLIBC_2_1); diff --git a/sysdeps/mips/fpu/fenv_libc.h b/sysdeps/mips/fpu/fenv_libc.h index dc30888ada..d971d2c711 100644 --- a/sysdeps/mips/fpu/fenv_libc.h +++ b/sysdeps/mips/fpu/fenv_libc.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger . @@ -20,10 +20,13 @@ #ifndef _FENV_LIBC_H #define _FENV_LIBC_H 1 -/* Mask for enabling exceptions. */ -#define ENABLE_MASK 0xF80U +/* Mask for enabling exceptions and for the CAUSE bits. */ +#define ENABLE_MASK 0x00F80U +#define CAUSE_MASK 0x1F000U + +/* Shift for FE_* flags to get up to the ENABLE bits and the CAUSE bits. */ +#define ENABLE_SHIFT 5 +#define CAUSE_SHIFT 10 -/* Shift for FE_* flags. */ -#define ENABLE_SHIFT 5 #endif /* _FENV_LIBC_H */ diff --git a/sysdeps/mips/fpu/fgetexcptflg.c b/sysdeps/mips/fpu/fgetexcptflg.c index d4bbfc3a2a..4f802afb40 100644 --- a/sysdeps/mips/fpu/fgetexcptflg.c +++ b/sysdeps/mips/fpu/fgetexcptflg.c @@ -1,5 +1,5 @@ /* Store current representation for exceptions. - Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger , 1998. @@ -30,6 +30,10 @@ __fegetexceptflag (fexcept_t *flagp, int excepts) /* Get the current exceptions. */ _FPU_GETCW (temp); + /* It is important that the CAUSE bits are not saved here. If they + were, a call to fesetexceptflag() would generate an + exception. */ + *flagp = temp & excepts & FE_ALL_EXCEPT; /* Success. */ diff --git a/sysdeps/mips/fpu/fraiseexcpt.c b/sysdeps/mips/fpu/fraiseexcpt.c index 582210aca3..e2472e35f2 100644 --- a/sysdeps/mips/fpu/fraiseexcpt.c +++ b/sysdeps/mips/fpu/fraiseexcpt.c @@ -1,5 +1,5 @@ /* Raise given exceptions. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright (C) 2000, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger , 2000. @@ -19,6 +19,7 @@ 02111-1307 USA. */ #include +#include #include #include @@ -30,8 +31,13 @@ __feraiseexcept (int excepts) /* Get current state. */ _FPU_GETCW (cw); - /* Set exceptions bits. */ - cw |= (excepts & FE_ALL_EXCEPT); + /* Set flag bits (which are accumulative), and *also* set the cause + bits. The setting of the cause bits is what actually causes the + hardware to generate the exception, if the corresponding enable + bit is set as well. */ + + excepts &= FE_ALL_EXCEPT; + cw |= excepts | (excepts << CAUSE_SHIFT); /* Set new state. */ _FPU_SETCW (cw); From d61bf265110367d74e39c5133fd0e4cbe2d2d90a Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sun, 17 Mar 2002 12:09:54 +0000 Subject: [PATCH 2752/4487] * sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap prototpyes. * sysdeps/alpha/pt-machine.h: Likewise. * sysdeps/arm/pt-machine.h: Likewise. * sysdeps/cris/pt-machine.h: Likewise. * sysdeps/hppa/pt-machine.h: Likewise. * sysdeps/i386/i686/pt-machine.h: Likewise. * sysdeps/ia64/pt-machine.h: Likewise. * sysdeps/m68k/pt-machine.h: Likewise. * sysdeps/mips/pt-machine.h: Likewise. * sysdeps/powerpc/pt-machine.h: Likewise. * sysdeps/s390/s390-32/pt-machine.h: Likewise. * sysdeps/s390/s390-64/pt-machine.h: Likewise. * sysdeps/sh/pt-machine.h: Likewise. * sysdeps/sparc/sparc32/pt-machine.h: Likewise. * sysdeps/sparc/sparc64/pt-machine.h: Likewise. * sysdeps/x86_64/pt-machine.h: Likewise. * internals.h: Move testandset and __compare_and_swap prototypes to pt-machine.h. --- sysdeps/arm/linuxthreads/pt-machine.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sysdeps/arm/linuxthreads/pt-machine.h b/sysdeps/arm/linuxthreads/pt-machine.h index 1079de4a41..cab724a668 100644 --- a/sysdeps/arm/linuxthreads/pt-machine.h +++ b/sysdeps/arm/linuxthreads/pt-machine.h @@ -1,6 +1,6 @@ /* Machine-dependent pthreads configuration and inline functions. ARM version. - Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 2000, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Philip Blundell . @@ -19,10 +19,13 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + #ifndef PT_EI # define PT_EI extern inline #endif +extern long int testandset (int *spinlock); +extern int __compare_and_swap (long int *p, long int oldval, long int newval); /* This will not work on ARM1 or ARM2 because SWP is lacking on those machines. Unfortunately we have no way to detect this at compile From 5a484daec03981669852dceeb63fade7fec25a54 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 22 Mar 2002 10:10:19 +0000 Subject: [PATCH 2753/4487] Copy from generic file with changes for NaNs on MIPS. --- sysdeps/mips/bits/nan.h | 51 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 sysdeps/mips/bits/nan.h diff --git a/sysdeps/mips/bits/nan.h b/sysdeps/mips/bits/nan.h new file mode 100644 index 0000000000..193ab3ccad --- /dev/null +++ b/sysdeps/mips/bits/nan.h @@ -0,0 +1,51 @@ +/* `NAN' constant for IEEE 754 machines. + Copyright (C) 1992, 1996, 1997, 1999, 2002 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 _MATH_H +# error "Never use directly; include instead." +#endif + + +/* IEEE Not A Number (QNaN). Note that MIPS has the QNaN and SNaN patterns + reversed compared to most other architectures. The IEEE spec left + the definition of this open to implementations, and for MIPS the top + bit of the mantissa must be SET to indicate a SNaN. */ + +#ifdef __GNUC__ + +# define NAN \ + (__extension__ \ + ((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; }) \ + { __l: 0x7fbfffffUL }).__d) + +#else + +# include + +# if __BYTE_ORDER == __BIG_ENDIAN +# define __nan_bytes { 0x7f, 0xbf, 0xff, 0xff } +# endif +# if __BYTE_ORDER == __LITTLE_ENDIAN +# define __nan_bytes { 0xff, 0xff, 0xbf, 0x7f } +# endif + +static union { unsigned char __c[4]; float __d; } __nan_union = { __nan_bytes }; +# define NAN (__nan_union.__d) + +#endif /* GCC. */ From 2d5fe9e39b6700763b2337f1f7ed55eeae8e75bb Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 24 Mar 2002 01:55:18 +0000 Subject: [PATCH 2754/4487] 2002-03-23 Roland McGrath * sysdeps/mach/hurd/i386/Makefile (sysdep_routines, shared-only-routines): Don't add framestate, reverting 2001-10-02 change. * sysdeps/unix/sysv/linux/arm/Makefile: Likewise. * sysdeps/unix/sysv/linux/alpha/Makefile: Likewise. * sysdeps/unix/sysv/linux/i386/Makefile: Likewise. * sysdeps/unix/sysv/linux/m68k/Makefile: Likewise. * sysdeps/unix/sysv/linux/mips/Makefile: Likewise. * sysdeps/unix/sysv/linux/powerpc/Makefile: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/Makefile: Likewise. * sysdeps/unix/sysv/linux/sparc/Makefile: Likewise. * sysdeps/generic/Makefile (sysdep_routines, shared-only-routines): Do it here instead, only if [$(unwind-find-fde) = yes]. --- sysdeps/unix/sysv/linux/alpha/Makefile | 8 -------- sysdeps/unix/sysv/linux/arm/Makefile | 6 ------ sysdeps/unix/sysv/linux/m68k/Makefile | 6 ------ sysdeps/unix/sysv/linux/mips/Makefile | 8 -------- 4 files changed, 28 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile index 5c04677086..62536ae1ae 100644 --- a/sysdeps/unix/sysv/linux/alpha/Makefile +++ b/sysdeps/unix/sysv/linux/alpha/Makefile @@ -23,11 +23,3 @@ ifeq ($(subdir),signal) sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \ rt_sigqueueinfo rt_sigaction rt_sigpending endif - -ifeq ($(subdir),elf) -ifeq (yes,$(build-shared)) -# This is needed to support g++ v2 and v3. -sysdep_routines += framestate -shared-only-routines += framestate -endif -endif diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile index 66a93ba8f3..aeaaa39fce 100644 --- a/sysdeps/unix/sysv/linux/arm/Makefile +++ b/sysdeps/unix/sysv/linux/arm/Makefile @@ -19,10 +19,4 @@ sysdep-dl-routines += dl-procinfo sysdep_routines += dl-procinfo # extra shared linker files to link only into dl-allobjs.so sysdep-rtld-routines += dl-procinfo - -ifeq (yes,$(build-shared)) -# This is needed to support g++ v2 and v3. -sysdep_routines += framestate -shared-only-routines += framestate -endif endif diff --git a/sysdeps/unix/sysv/linux/m68k/Makefile b/sysdeps/unix/sysv/linux/m68k/Makefile index 83ea370afa..55eeeabe10 100644 --- a/sysdeps/unix/sysv/linux/m68k/Makefile +++ b/sysdeps/unix/sysv/linux/m68k/Makefile @@ -10,12 +10,6 @@ endif ifeq ($(subdir),elf) sysdep-others += lddlibc4 install-bin += lddlibc4 - -ifeq (yes,$(build-shared)) -# This is needed to support g++ v2 and v3. -sysdep_routines += framestate -shared-only-routines += framestate -endif endif ifeq ($(subdir),resource) diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile index e46cfef7a5..1f9fc2dd03 100644 --- a/sysdeps/unix/sysv/linux/mips/Makefile +++ b/sysdeps/unix/sysv/linux/mips/Makefile @@ -9,11 +9,3 @@ sysdep_routines += cachectl cacheflush sysmips _test_and_set sysdep_headers += sys/cachectl.h sys/sysmips.h sys/tas.h endif - -ifeq ($(subdir),elf) -ifeq (yes,$(build-shared)) -# This is needed to support g++ v2 and v3. -sysdep_routines += framestate -shared-only-routines += framestate -endif -endif From 9a168f2b421743741f44ea082bd0214713ec9eb7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 3 Apr 2002 06:54:28 +0000 Subject: [PATCH 2755/4487] Completely specify size of _dl_arm_cap_flags. --- sysdeps/unix/sysv/linux/arm/dl-procinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/arm/dl-procinfo.c b/sysdeps/unix/sysv/linux/arm/dl-procinfo.c index 9c6476cb59..9acd07962b 100644 --- a/sysdeps/unix/sysv/linux/arm/dl-procinfo.c +++ b/sysdeps/unix/sysv/linux/arm/dl-procinfo.c @@ -46,7 +46,7 @@ EXTERN #if !defined PROCINFO_DECL && defined SHARED ._dl_arm_cap_flags #else -const char _dl_arm_cap_flags[][10] +const char _dl_arm_cap_flags[8][10] #endif #ifndef PROCINFO_DECL = { From ef8af250ffeaf49b025dd34650ff0357ef840124 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 3 Apr 2002 06:55:14 +0000 Subject: [PATCH 2756/4487] (_DL_HWCAP_COUNT): Define as 8. --- sysdeps/unix/sysv/linux/arm/dl-procinfo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/arm/dl-procinfo.h b/sysdeps/unix/sysv/linux/arm/dl-procinfo.h index 7e7e66e727..0ced27489f 100644 --- a/sysdeps/unix/sysv/linux/arm/dl-procinfo.h +++ b/sysdeps/unix/sysv/linux/arm/dl-procinfo.h @@ -23,7 +23,7 @@ #include -#define _DL_HWCAP_COUNT 32 +#define _DL_HWCAP_COUNT 8 /* The kernel provides platform data but it is not interesting. */ #define _DL_HWCAP_PLATFORM 0 From a4007d1f0ad6380f934f6a07aabbc718ab63ff32 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 4 Apr 2002 08:53:30 +0000 Subject: [PATCH 2757/4487] Remove, the archs are not supported anymore. --- sysdeps/mips/dec/bits/endian.h | 8 -------- sysdeps/mips/p40/bits/endian.h | 8 -------- 2 files changed, 16 deletions(-) delete mode 100644 sysdeps/mips/dec/bits/endian.h delete mode 100644 sysdeps/mips/p40/bits/endian.h diff --git a/sysdeps/mips/dec/bits/endian.h b/sysdeps/mips/dec/bits/endian.h deleted file mode 100644 index 0bdb378944..0000000000 --- a/sysdeps/mips/dec/bits/endian.h +++ /dev/null @@ -1,8 +0,0 @@ -/* The MIPS architecture has selectable endianness. - The DECstation uses little-endian mode. */ - -#ifndef _ENDIAN_H -# error "Never use directly; include instead." -#endif - -#define __BYTE_ORDER __LITTLE_ENDIAN diff --git a/sysdeps/mips/p40/bits/endian.h b/sysdeps/mips/p40/bits/endian.h deleted file mode 100644 index f6cdde2cb3..0000000000 --- a/sysdeps/mips/p40/bits/endian.h +++ /dev/null @@ -1,8 +0,0 @@ -/* The MIPS has selectable endianness. - The Japanese homebrew P40 architecture uses big-endian mode. */ - -#ifndef _ENDIAN_H -# error "Never use directly; include instead." -#endif - -#define __BYTE_ORDER __BIG_ENDIAN From 9db53b0f7f1e8342ed5451b80a51f95b3c0c150a Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 4 Apr 2002 08:57:22 +0000 Subject: [PATCH 2758/4487] Remove files since arch is not supported anymore. --- sysdeps/mips/mips3/Implies | 1 - sysdeps/mips/mips3/add_n.s | 120 -------------------------------- sysdeps/mips/mips3/addmul_1.s | 97 -------------------------- sysdeps/mips/mips3/gmp-mparam.h | 27 ------- sysdeps/mips/mips3/lshift.s | 95 ------------------------- sysdeps/mips/mips3/mul_1.s | 85 ---------------------- sysdeps/mips/mips3/rshift.s | 92 ------------------------ sysdeps/mips/mips3/sub_n.s | 120 -------------------------------- sysdeps/mips/mips3/submul_1.s | 97 -------------------------- 9 files changed, 734 deletions(-) delete mode 100644 sysdeps/mips/mips3/Implies delete mode 100644 sysdeps/mips/mips3/add_n.s delete mode 100644 sysdeps/mips/mips3/addmul_1.s delete mode 100644 sysdeps/mips/mips3/gmp-mparam.h delete mode 100644 sysdeps/mips/mips3/lshift.s delete mode 100644 sysdeps/mips/mips3/mul_1.s delete mode 100644 sysdeps/mips/mips3/rshift.s delete mode 100644 sysdeps/mips/mips3/sub_n.s delete mode 100644 sysdeps/mips/mips3/submul_1.s diff --git a/sysdeps/mips/mips3/Implies b/sysdeps/mips/mips3/Implies deleted file mode 100644 index 39a34c5f57..0000000000 --- a/sysdeps/mips/mips3/Implies +++ /dev/null @@ -1 +0,0 @@ -wordsize-32 diff --git a/sysdeps/mips/mips3/add_n.s b/sysdeps/mips/mips3/add_n.s deleted file mode 100644 index 7a25341cd6..0000000000 --- a/sysdeps/mips/mips3/add_n.s +++ /dev/null @@ -1,120 +0,0 @@ - # MIPS3 __mpn_add_n -- Add two limb vectors of the same length > 0 and - # store sum in a third limb vector. - - # Copyright (C) 1995 Free Software Foundation, Inc. - - # This file is part of the GNU MP Library. - - # The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - # MA 02111-1307, USA. - - - # INPUT PARAMETERS - # res_ptr $4 - # s1_ptr $5 - # s2_ptr $6 - # size $7 - - .text - .align 2 - .globl __mpn_add_n - .ent __mpn_add_n -__mpn_add_n: - .set noreorder - .set nomacro - - ld $10,0($5) - ld $11,0($6) - - daddiu $7,$7,-1 - and $9,$7,4-1 # number of limbs in first loop - beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop - move $2,$0 - - dsubu $7,$7,$9 - -.Loop0: daddiu $9,$9,-1 - ld $12,8($5) - daddu $11,$11,$2 - ld $13,8($6) - sltu $8,$11,$2 - daddu $11,$10,$11 - sltu $2,$11,$10 - sd $11,0($4) - or $2,$2,$8 - - daddiu $5,$5,8 - daddiu $6,$6,8 - move $10,$12 - move $11,$13 - bne $9,$0,.Loop0 - daddiu $4,$4,8 - -.L0: beq $7,$0,.Lend - nop - -.Loop: daddiu $7,$7,-4 - - ld $12,8($5) - daddu $11,$11,$2 - ld $13,8($6) - sltu $8,$11,$2 - daddu $11,$10,$11 - sltu $2,$11,$10 - sd $11,0($4) - or $2,$2,$8 - - ld $10,16($5) - daddu $13,$13,$2 - ld $11,16($6) - sltu $8,$13,$2 - daddu $13,$12,$13 - sltu $2,$13,$12 - sd $13,8($4) - or $2,$2,$8 - - ld $12,24($5) - daddu $11,$11,$2 - ld $13,24($6) - sltu $8,$11,$2 - daddu $11,$10,$11 - sltu $2,$11,$10 - sd $11,16($4) - or $2,$2,$8 - - ld $10,32($5) - daddu $13,$13,$2 - ld $11,32($6) - sltu $8,$13,$2 - daddu $13,$12,$13 - sltu $2,$13,$12 - sd $13,24($4) - or $2,$2,$8 - - daddiu $5,$5,32 - daddiu $6,$6,32 - - bne $7,$0,.Loop - daddiu $4,$4,32 - -.Lend: daddu $11,$11,$2 - sltu $8,$11,$2 - daddu $11,$10,$11 - sltu $2,$11,$10 - sd $11,0($4) - j $31 - or $2,$2,$8 - - .end __mpn_add_n diff --git a/sysdeps/mips/mips3/addmul_1.s b/sysdeps/mips/mips3/addmul_1.s deleted file mode 100644 index 9a87c3ff2a..0000000000 --- a/sysdeps/mips/mips3/addmul_1.s +++ /dev/null @@ -1,97 +0,0 @@ - # MIPS3 __mpn_addmul_1 -- Multiply a limb vector with a single limb and - # add the product to a second limb vector. - - # Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc. - - # This file is part of the GNU MP Library. - - # The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - # MA 02111-1307, USA. - - - # INPUT PARAMETERS - # res_ptr $4 - # s1_ptr $5 - # size $6 - # s2_limb $7 - - .text - .align 4 - .globl __mpn_addmul_1 - .ent __mpn_addmul_1 -__mpn_addmul_1: - .set noreorder - .set nomacro - - # warm up phase 0 - ld $8,0($5) - - # warm up phase 1 - daddiu $5,$5,8 - dmultu $8,$7 - - daddiu $6,$6,-1 - beq $6,$0,$LC0 - move $2,$0 # zero cy2 - - daddiu $6,$6,-1 - beq $6,$0,$LC1 - ld $8,0($5) # load new s1 limb as early as possible - -Loop: ld $10,0($4) - mflo $3 - mfhi $9 - daddiu $5,$5,8 - daddu $3,$3,$2 # add old carry limb to low product limb - dmultu $8,$7 - ld $8,0($5) # load new s1 limb as early as possible - daddiu $6,$6,-1 # decrement loop counter - sltu $2,$3,$2 # carry from previous addition -> $2 - daddu $3,$10,$3 - sltu $10,$3,$10 - daddu $2,$2,$10 - sd $3,0($4) - daddiu $4,$4,8 - bne $6,$0,Loop - daddu $2,$9,$2 # add high product limb and carry from addition - - # cool down phase 1 -$LC1: ld $10,0($4) - mflo $3 - mfhi $9 - daddu $3,$3,$2 - sltu $2,$3,$2 - dmultu $8,$7 - daddu $3,$10,$3 - sltu $10,$3,$10 - daddu $2,$2,$10 - sd $3,0($4) - daddiu $4,$4,8 - daddu $2,$9,$2 # add high product limb and carry from addition - - # cool down phase 0 -$LC0: ld $10,0($4) - mflo $3 - mfhi $9 - daddu $3,$3,$2 - sltu $2,$3,$2 - daddu $3,$10,$3 - sltu $10,$3,$10 - daddu $2,$2,$10 - sd $3,0($4) - j $31 - daddu $2,$9,$2 # add high product limb and carry from addition - - .end __mpn_addmul_1 diff --git a/sysdeps/mips/mips3/gmp-mparam.h b/sysdeps/mips/mips3/gmp-mparam.h deleted file mode 100644 index 0d36735b7f..0000000000 --- a/sysdeps/mips/mips3/gmp-mparam.h +++ /dev/null @@ -1,27 +0,0 @@ -/* gmp-mparam.h -- Compiler/machine parameter header file. - -Copyright (C) 1991, 1993, 1994 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -MA 02111-1307, USA. */ - -#define BITS_PER_MP_LIMB 64 -#define BYTES_PER_MP_LIMB 8 -#define BITS_PER_LONGINT 32 -#define BITS_PER_INT 32 -#define BITS_PER_SHORTINT 16 -#define BITS_PER_CHAR 8 diff --git a/sysdeps/mips/mips3/lshift.s b/sysdeps/mips/mips3/lshift.s deleted file mode 100644 index 2c39a1c91e..0000000000 --- a/sysdeps/mips/mips3/lshift.s +++ /dev/null @@ -1,95 +0,0 @@ - # MIPS3 __mpn_lshift -- - - # Copyright (C) 1995 Free Software Foundation, Inc. - - # This file is part of the GNU MP Library. - - # The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - # MA 02111-1307, USA. - - - # INPUT PARAMETERS - # res_ptr $4 - # src_ptr $5 - # size $6 - # cnt $7 - - .text - .align 2 - .globl __mpn_lshift - .ent __mpn_lshift -__mpn_lshift: - .set noreorder - .set nomacro - - dsll $2,$6,3 - daddu $5,$5,$2 # make r5 point at end of src - ld $10,-8($5) # load first limb - dsubu $13,$0,$7 - daddu $4,$4,$2 # make r4 point at end of res - daddiu $6,$6,-1 - and $9,$6,4-1 # number of limbs in first loop - beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop - dsrl $2,$10,$13 # compute function result - - dsubu $6,$6,$9 - -.Loop0: ld $3,-16($5) - daddiu $4,$4,-8 - daddiu $5,$5,-8 - daddiu $9,$9,-1 - dsll $11,$10,$7 - dsrl $12,$3,$13 - move $10,$3 - or $8,$11,$12 - bne $9,$0,.Loop0 - sd $8,0($4) - -.L0: beq $6,$0,.Lend - nop - -.Loop: ld $3,-16($5) - daddiu $4,$4,-32 - daddiu $6,$6,-4 - dsll $11,$10,$7 - dsrl $12,$3,$13 - - ld $10,-24($5) - dsll $14,$3,$7 - or $8,$11,$12 - sd $8,24($4) - dsrl $9,$10,$13 - - ld $3,-32($5) - dsll $11,$10,$7 - or $8,$14,$9 - sd $8,16($4) - dsrl $12,$3,$13 - - ld $10,-40($5) - dsll $14,$3,$7 - or $8,$11,$12 - sd $8,8($4) - dsrl $9,$10,$13 - - daddiu $5,$5,-32 - or $8,$14,$9 - bgtz $6,.Loop - sd $8,0($4) - -.Lend: dsll $8,$10,$7 - j $31 - sd $8,-8($4) - .end __mpn_lshift diff --git a/sysdeps/mips/mips3/mul_1.s b/sysdeps/mips/mips3/mul_1.s deleted file mode 100644 index d65e65c426..0000000000 --- a/sysdeps/mips/mips3/mul_1.s +++ /dev/null @@ -1,85 +0,0 @@ - # MIPS3 __mpn_mul_1 -- Multiply a limb vector with a single limb and - # store the product in a second limb vector. - - # Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc. - - # This file is part of the GNU MP Library. - - # The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - # MA 02111-1307, USA. - - - # INPUT PARAMETERS - # res_ptr $4 - # s1_ptr $5 - # size $6 - # s2_limb $7 - - .text - .align 4 - .globl __mpn_mul_1 - .ent __mpn_mul_1 -__mpn_mul_1: - .set noreorder - .set nomacro - - # warm up phase 0 - ld $8,0($5) - - # warm up phase 1 - daddiu $5,$5,8 - dmultu $8,$7 - - daddiu $6,$6,-1 - beq $6,$0,$LC0 - move $2,$0 # zero cy2 - - daddiu $6,$6,-1 - beq $6,$0,$LC1 - ld $8,0($5) # load new s1 limb as early as possible - -Loop: mflo $10 - mfhi $9 - daddiu $5,$5,8 - daddu $10,$10,$2 # add old carry limb to low product limb - dmultu $8,$7 - ld $8,0($5) # load new s1 limb as early as possible - daddiu $6,$6,-1 # decrement loop counter - sltu $2,$10,$2 # carry from previous addition -> $2 - sd $10,0($4) - daddiu $4,$4,8 - bne $6,$0,Loop - daddu $2,$9,$2 # add high product limb and carry from addition - - # cool down phase 1 -$LC1: mflo $10 - mfhi $9 - daddu $10,$10,$2 - sltu $2,$10,$2 - dmultu $8,$7 - sd $10,0($4) - daddiu $4,$4,8 - daddu $2,$9,$2 # add high product limb and carry from addition - - # cool down phase 0 -$LC0: mflo $10 - mfhi $9 - daddu $10,$10,$2 - sltu $2,$10,$2 - sd $10,0($4) - j $31 - daddu $2,$9,$2 # add high product limb and carry from addition - - .end __mpn_mul_1 diff --git a/sysdeps/mips/mips3/rshift.s b/sysdeps/mips/mips3/rshift.s deleted file mode 100644 index fc4790a4e4..0000000000 --- a/sysdeps/mips/mips3/rshift.s +++ /dev/null @@ -1,92 +0,0 @@ - # MIPS3 __mpn_rshift -- - - # Copyright (C) 1995 Free Software Foundation, Inc. - - # This file is part of the GNU MP Library. - - # The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - # MA 02111-1307, USA. - - - # INPUT PARAMETERS - # res_ptr $4 - # src_ptr $5 - # size $6 - # cnt $7 - - .text - .align 2 - .globl __mpn_rshift - .ent __mpn_rshift -__mpn_rshift: - .set noreorder - .set nomacro - - ld $10,0($5) # load first limb - dsubu $13,$0,$7 - daddiu $6,$6,-1 - and $9,$6,4-1 # number of limbs in first loop - beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop - dsll $2,$10,$13 # compute function result - - dsubu $6,$6,$9 - -.Loop0: ld $3,8($5) - daddiu $4,$4,8 - daddiu $5,$5,8 - daddiu $9,$9,-1 - dsrl $11,$10,$7 - dsll $12,$3,$13 - move $10,$3 - or $8,$11,$12 - bne $9,$0,.Loop0 - sd $8,-8($4) - -.L0: beq $6,$0,.Lend - nop - -.Loop: ld $3,8($5) - daddiu $4,$4,32 - daddiu $6,$6,-4 - dsrl $11,$10,$7 - dsll $12,$3,$13 - - ld $10,16($5) - dsrl $14,$3,$7 - or $8,$11,$12 - sd $8,-32($4) - dsll $9,$10,$13 - - ld $3,24($5) - dsrl $11,$10,$7 - or $8,$14,$9 - sd $8,-24($4) - dsll $12,$3,$13 - - ld $10,32($5) - dsrl $14,$3,$7 - or $8,$11,$12 - sd $8,-16($4) - dsll $9,$10,$13 - - daddiu $5,$5,32 - or $8,$14,$9 - bgtz $6,.Loop - sd $8,-8($4) - -.Lend: dsrl $8,$10,$7 - j $31 - sd $8,0($4) - .end __mpn_rshift diff --git a/sysdeps/mips/mips3/sub_n.s b/sysdeps/mips/mips3/sub_n.s deleted file mode 100644 index 0ea9413082..0000000000 --- a/sysdeps/mips/mips3/sub_n.s +++ /dev/null @@ -1,120 +0,0 @@ - # MIPS3 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and - # store difference in a third limb vector. - - # Copyright (C) 1995 Free Software Foundation, Inc. - - # This file is part of the GNU MP Library. - - # The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - # MA 02111-1307, USA. - - - # INPUT PARAMETERS - # res_ptr $4 - # s1_ptr $5 - # s2_ptr $6 - # size $7 - - .text - .align 2 - .globl __mpn_sub_n - .ent __mpn_sub_n -__mpn_sub_n: - .set noreorder - .set nomacro - - ld $10,0($5) - ld $11,0($6) - - daddiu $7,$7,-1 - and $9,$7,4-1 # number of limbs in first loop - beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop - move $2,$0 - - dsubu $7,$7,$9 - -.Loop0: daddiu $9,$9,-1 - ld $12,8($5) - daddu $11,$11,$2 - ld $13,8($6) - sltu $8,$11,$2 - dsubu $11,$10,$11 - sltu $2,$10,$11 - sd $11,0($4) - or $2,$2,$8 - - daddiu $5,$5,8 - daddiu $6,$6,8 - move $10,$12 - move $11,$13 - bne $9,$0,.Loop0 - daddiu $4,$4,8 - -.L0: beq $7,$0,.Lend - nop - -.Loop: daddiu $7,$7,-4 - - ld $12,8($5) - daddu $11,$11,$2 - ld $13,8($6) - sltu $8,$11,$2 - dsubu $11,$10,$11 - sltu $2,$10,$11 - sd $11,0($4) - or $2,$2,$8 - - ld $10,16($5) - daddu $13,$13,$2 - ld $11,16($6) - sltu $8,$13,$2 - dsubu $13,$12,$13 - sltu $2,$12,$13 - sd $13,8($4) - or $2,$2,$8 - - ld $12,24($5) - daddu $11,$11,$2 - ld $13,24($6) - sltu $8,$11,$2 - dsubu $11,$10,$11 - sltu $2,$10,$11 - sd $11,16($4) - or $2,$2,$8 - - ld $10,32($5) - daddu $13,$13,$2 - ld $11,32($6) - sltu $8,$13,$2 - dsubu $13,$12,$13 - sltu $2,$12,$13 - sd $13,24($4) - or $2,$2,$8 - - daddiu $5,$5,32 - daddiu $6,$6,32 - - bne $7,$0,.Loop - daddiu $4,$4,32 - -.Lend: daddu $11,$11,$2 - sltu $8,$11,$2 - dsubu $11,$10,$11 - sltu $2,$10,$11 - sd $11,0($4) - j $31 - or $2,$2,$8 - - .end __mpn_sub_n diff --git a/sysdeps/mips/mips3/submul_1.s b/sysdeps/mips/mips3/submul_1.s deleted file mode 100644 index 60153da9fc..0000000000 --- a/sysdeps/mips/mips3/submul_1.s +++ /dev/null @@ -1,97 +0,0 @@ - # MIPS3 __mpn_submul_1 -- Multiply a limb vector with a single limb and - # subtract the product from a second limb vector. - - # Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc. - - # This file is part of the GNU MP Library. - - # The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - # MA 02111-1307, USA. - - - # INPUT PARAMETERS - # res_ptr $4 - # s1_ptr $5 - # size $6 - # s2_limb $7 - - .text - .align 4 - .globl __mpn_submul_1 - .ent __mpn_submul_1 -__mpn_submul_1: - .set noreorder - .set nomacro - - # warm up phase 0 - ld $8,0($5) - - # warm up phase 1 - daddiu $5,$5,8 - dmultu $8,$7 - - daddiu $6,$6,-1 - beq $6,$0,$LC0 - move $2,$0 # zero cy2 - - daddiu $6,$6,-1 - beq $6,$0,$LC1 - ld $8,0($5) # load new s1 limb as early as possible - -Loop: ld $10,0($4) - mflo $3 - mfhi $9 - daddiu $5,$5,8 - daddu $3,$3,$2 # add old carry limb to low product limb - dmultu $8,$7 - ld $8,0($5) # load new s1 limb as early as possible - daddiu $6,$6,-1 # decrement loop counter - sltu $2,$3,$2 # carry from previous addition -> $2 - dsubu $3,$10,$3 - sgtu $10,$3,$10 - daddu $2,$2,$10 - sd $3,0($4) - daddiu $4,$4,8 - bne $6,$0,Loop - daddu $2,$9,$2 # add high product limb and carry from addition - - # cool down phase 1 -$LC1: ld $10,0($4) - mflo $3 - mfhi $9 - daddu $3,$3,$2 - sltu $2,$3,$2 - dmultu $8,$7 - dsubu $3,$10,$3 - sgtu $10,$3,$10 - daddu $2,$2,$10 - sd $3,0($4) - daddiu $4,$4,8 - daddu $2,$9,$2 # add high product limb and carry from addition - - # cool down phase 0 -$LC0: ld $10,0($4) - mflo $3 - mfhi $9 - daddu $3,$3,$2 - sltu $2,$3,$2 - dsubu $3,$10,$3 - sgtu $10,$3,$10 - daddu $2,$2,$10 - sd $3,0($4) - j $31 - daddu $2,$9,$2 # add high product limb and carry from addition - - .end __mpn_submul_1 From 2b0a7e122e9100432c4bd1cd46543e46c4ea6fc0 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 6 Apr 2002 00:33:22 +0000 Subject: [PATCH 2759/4487] (ELF_MACHINE_REL_RELATIVE): Define. --- sysdeps/alpha/dl-machine.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 490f1f1754..f6d33739a0 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -577,6 +577,10 @@ elf_machine_rela (struct link_map *map, } } +/* Let do-rel.h know that on Alpha if l_addr is 0, all RELATIVE relocs + can be skipped. */ +#define ELF_MACHINE_REL_RELATIVE 1 + static inline void elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc, Elf64_Addr *const reloc_addr) From 521d1bc7f4e98beee498a839d8d72875fcd394d5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 6 Apr 2002 01:34:06 +0000 Subject: [PATCH 2760/4487] brk implementation for dynamic linker. --- sysdeps/unix/arm/dl-brk.S | 1 + sysdeps/unix/bsd/hp/m68k/dl-brk.S | 1 + sysdeps/unix/bsd/osf/alpha/dl-brk.S | 1 + sysdeps/unix/bsd/sun/m68k/dl-brk.S | 1 + sysdeps/unix/bsd/vax/dl-brk.S | 1 + sysdeps/unix/mips/dl-brk.S | 1 + sysdeps/unix/sysv/linux/alpha/dl-brk.S | 1 + 7 files changed, 7 insertions(+) create mode 100644 sysdeps/unix/arm/dl-brk.S create mode 100644 sysdeps/unix/bsd/hp/m68k/dl-brk.S create mode 100644 sysdeps/unix/bsd/osf/alpha/dl-brk.S create mode 100644 sysdeps/unix/bsd/sun/m68k/dl-brk.S create mode 100644 sysdeps/unix/bsd/vax/dl-brk.S create mode 100644 sysdeps/unix/mips/dl-brk.S create mode 100644 sysdeps/unix/sysv/linux/alpha/dl-brk.S diff --git a/sysdeps/unix/arm/dl-brk.S b/sysdeps/unix/arm/dl-brk.S new file mode 100644 index 0000000000..eeb96544e3 --- /dev/null +++ b/sysdeps/unix/arm/dl-brk.S @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/bsd/hp/m68k/dl-brk.S b/sysdeps/unix/bsd/hp/m68k/dl-brk.S new file mode 100644 index 0000000000..eeb96544e3 --- /dev/null +++ b/sysdeps/unix/bsd/hp/m68k/dl-brk.S @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/bsd/osf/alpha/dl-brk.S b/sysdeps/unix/bsd/osf/alpha/dl-brk.S new file mode 100644 index 0000000000..eeb96544e3 --- /dev/null +++ b/sysdeps/unix/bsd/osf/alpha/dl-brk.S @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/bsd/sun/m68k/dl-brk.S b/sysdeps/unix/bsd/sun/m68k/dl-brk.S new file mode 100644 index 0000000000..eeb96544e3 --- /dev/null +++ b/sysdeps/unix/bsd/sun/m68k/dl-brk.S @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/bsd/vax/dl-brk.S b/sysdeps/unix/bsd/vax/dl-brk.S new file mode 100644 index 0000000000..eeb96544e3 --- /dev/null +++ b/sysdeps/unix/bsd/vax/dl-brk.S @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/mips/dl-brk.S b/sysdeps/unix/mips/dl-brk.S new file mode 100644 index 0000000000..eeb96544e3 --- /dev/null +++ b/sysdeps/unix/mips/dl-brk.S @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/alpha/dl-brk.S b/sysdeps/unix/sysv/linux/alpha/dl-brk.S new file mode 100644 index 0000000000..eeb96544e3 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/dl-brk.S @@ -0,0 +1 @@ +#include From 37296da75ed10e0c9b5fece07e62aa3d7f47b4ec Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 6 Apr 2002 04:05:14 +0000 Subject: [PATCH 2761/4487] Protect against multiple inclusion. --- sysdeps/arm/linuxthreads/pt-machine.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysdeps/arm/linuxthreads/pt-machine.h b/sysdeps/arm/linuxthreads/pt-machine.h index cab724a668..11127eac1a 100644 --- a/sysdeps/arm/linuxthreads/pt-machine.h +++ b/sysdeps/arm/linuxthreads/pt-machine.h @@ -19,6 +19,8 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef _PT_MACHINE_H +#define _PT_MACHINE_H 1 #ifndef PT_EI # define PT_EI extern inline @@ -49,3 +51,5 @@ testandset (int *spinlock) of the stack, just something somewhere in the current frame. */ #define CURRENT_STACK_FRAME stack_pointer register char * stack_pointer __asm__ ("sp"); + +#endif /* pt-machine.h */ From 216190a955975901bc2a64f65334bfe1eef6c408 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 8 Apr 2002 02:16:04 +0000 Subject: [PATCH 2762/4487] 2002-04-06 Roland McGrath * sysdeps/mach/hurd/alpha/sigreturn.c: Pass missing argument to __msg_sig_post RPC. --- sysdeps/mach/hurd/alpha/sigreturn.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sysdeps/mach/hurd/alpha/sigreturn.c b/sysdeps/mach/hurd/alpha/sigreturn.c index e520b35e73..182d4cbd84 100644 --- a/sysdeps/mach/hurd/alpha/sigreturn.c +++ b/sysdeps/mach/hurd/alpha/sigreturn.c @@ -1,5 +1,5 @@ /* Return from signal handler in GNU C library for Hurd. Alpha version. - Copyright (C) 1994, 1995, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1994,95,97,98,2002 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,6 @@ #include #include #include -#include int __sigreturn (struct sigcontext *scp) @@ -58,7 +57,7 @@ __sigreturn (struct sigcontext *scp) thread will examine us while we are blocked in the sig_post RPC. */ ss->intr_port = MACH_PORT_NULL; __spin_unlock (&ss->lock); - __msg_sig_post (_hurd_msgport, 0, __mach_task_self ()); + __msg_sig_post (_hurd_msgport, 0, 0, __mach_task_self ()); /* If a pending signal was handled, sig_post never returned. */ __spin_lock (&ss->lock); } @@ -200,9 +199,9 @@ __sigreturn (struct sigcontext *scp) the user stack and do the magical `rei' PAL call. */ asm volatile ("mov %0, $30\n" "call_pal %1" - : : "r" (rei_frame), "i" (op_rei)); + : : "r" (rei_frame), "i" (63)); /* PAL_rti */ /* Firewall. */ - asm volatile ("call_pal %0" : : "i" (op_halt)); + asm volatile ("halt"); } /* NOTREACHED */ From 83aad43285c19b1ecd1db18385a38721ab5e6f5f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 8 Apr 2002 02:16:12 +0000 Subject: [PATCH 2763/4487] 2002-04-06 Roland McGrath * sysdeps/mach/hurd/alpha/exc2signal.c (_hurd_exception2signal): Rewritten. * sysdeps/mach/hurd/alpha/longjmp-ts.c (_hurd_longjmp_thread_state): Rewritten. --- sysdeps/mach/hurd/alpha/exc2signal.c | 27 +++++++++++++------------- sysdeps/mach/hurd/alpha/longjmp-ts.c | 29 +++++++++++++++++----------- 2 files changed, 31 insertions(+), 25 deletions(-) diff --git a/sysdeps/mach/hurd/alpha/exc2signal.c b/sysdeps/mach/hurd/alpha/exc2signal.c index 3bceb64b22..5f3fbbbbb1 100644 --- a/sysdeps/mach/hurd/alpha/exc2signal.c +++ b/sysdeps/mach/hurd/alpha/exc2signal.c @@ -1,5 +1,5 @@ /* Translate Mach exception codes into signal numbers. Alpha version. - Copyright (C) 1994, 1997 Free Software Foundation, Inc. + Copyright (C) 1994,97,2002 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,52 +25,51 @@ into a signal number and signal subcode. */ void -_hurd_exception2signal (int exception, int code, int subcode, - int *signo, long int *sigcode, int *error) +_hurd_exception2signal (struct hurd_signal_detail *detail, int *signo) { - *error = 0; + detail->error = 0; - switch (exception) + switch (detail->exc) { default: *signo = SIGIOT; - *sigcode = exception; + detail->code = detail->exc; break; case EXC_BAD_ACCESS: - if (code == KERN_PROTECTION_FAILURE) + if (detail->exc_code == KERN_PROTECTION_FAILURE) *signo = SIGSEGV; else *signo = SIGBUS; - *sigcode = subcode; - *error = code; + detail->code = detail->exc_subcode; + detail->error = detail->exc_code; break; case EXC_BAD_INSTRUCTION: *signo = SIGILL; - *sigcode = code; + detail->code = detail->exc_code; break; case EXC_ARITHMETIC: *signo = SIGFPE; - *sigcode = code; + detail->code = detail->exc_code; break; break; case EXC_EMULATION: /* 3.0 doesn't give this one, why, I don't know. */ *signo = SIGEMT; - *sigcode = code; + detail->code = detail->exc_code; break; case EXC_SOFTWARE: *signo = SIGEMT; - *sigcode = code; + detail->code = detail->exc_code; break; case EXC_BREAKPOINT: *signo = SIGTRAP; - *sigcode = code; + detail->code = detail->exc_code; break; } } diff --git a/sysdeps/mach/hurd/alpha/longjmp-ts.c b/sysdeps/mach/hurd/alpha/longjmp-ts.c index eb2764977c..b271d6d2a9 100644 --- a/sysdeps/mach/hurd/alpha/longjmp-ts.c +++ b/sysdeps/mach/hurd/alpha/longjmp-ts.c @@ -1,5 +1,5 @@ /* Perform a `longjmp' on a Mach thread_state. Alpha version. - Copyright (C) 1991, 1994, 1997 Free Software Foundation, Inc. + Copyright (C) 2002 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 @@ -27,15 +27,22 @@ void _hurd_longjmp_thread_state (void *state, jmp_buf env, int val) { - struct alpha_thread_state *ts = state; - - ts->r9 = env[0].__jmpbuf[0].__9; - ts->r11 = env[0].__jmpbuf[0].__11; - ts->r12 = env[0].__jmpbuf[0].__12; - ts->r13 = env[0].__jmpbuf[0].__13; - ts->r14 = env[0].__jmpbuf[0].__14; - ts->r15 = (long int) env[0].__jmpbuf[0].__fp; - ts->r30 = (long int) env[0].__jmpbuf[0].__sp; - ts->pc = (long int) env[0].__jmpbuf[0].__pc; + struct alpha_thread_state *const ts = state; + + ts->r9 = env[0].__jmpbuf[JB_S0]; + ts->r10 = env[0].__jmpbuf[JB_S1]; + ts->r11 = env[0].__jmpbuf[JB_S2]; + ts->r12 = env[0].__jmpbuf[JB_S3]; + ts->r13 = env[0].__jmpbuf[JB_S4]; + ts->r13 = env[0].__jmpbuf[JB_S5]; + ts->pc = env[0].__jmpbuf[JB_PC]; + ts->r15 = env[0].__jmpbuf[JB_FP]; + ts->r30 = env[0].__jmpbuf[JB_SP]; ts->r0 = val ?: 1; + + /* XXX + To mimic longjmp we ought to restore some fp registers too. + But those registers are in struct alpha_float_state. + The only use of this is in fork, and it probably won't matter. + */ } From 4dd357db6a802ad986a17049bcd7a6ffcfef0936 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 8 Apr 2002 07:06:46 +0000 Subject: [PATCH 2764/4487] 2002-04-07 Roland McGrath * sysdeps/mach/alpha/sysdep.h: Include . (ALIGN, at, AT, fp): New macros. --- sysdeps/mach/alpha/sysdep.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/sysdeps/mach/alpha/sysdep.h b/sysdeps/mach/alpha/sysdep.h index 9e7ace0eed..ddd98d666a 100644 --- a/sysdeps/mach/alpha/sysdep.h +++ b/sysdeps/mach/alpha/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1994,97,2002 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 @@ -34,8 +34,17 @@ asm volatile ("mov %0,$30; jmp $31, (%1); ldgp $29, 0(%1)" \ : : "r" (__sp), "r" (__fn)); }) -#define ENTRY(name) LEAF(name, ***loser no arg count***) - #define STACK_GROWTH_DOWN +#define RETURN_TO(sp, pc, retval) \ + asm volatile ("mov %0,$30; jmp $31, (%1); mov %2,$0" \ + : : "r" (sp), "r" (pc), "r" ((long int) (retval))); + +#define ALIGN 3 #include + +#include +#undef at +#define at 28 +#define AT $28 +#define fp s6 From bc1e0ed4b262b79b0799420d0837a76a559022f5 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 8 Apr 2002 07:06:48 +0000 Subject: [PATCH 2765/4487] 2002-04-07 Roland McGrath * sysdeps/mach/hurd/alpha/trampoline.c: Don't include . (_hurd_setup_sighandler): Take proper arguments for current decls. Update code to use _hurdsig_catch_fault. Use `callsys' instruction instead of `call_pal'. * sysdeps/mach/hurd/alpha/intr-msg.h: New file. --- sysdeps/mach/hurd/alpha/intr-msg.h | 100 +++++++++++++++++++++++++++ sysdeps/mach/hurd/alpha/trampoline.c | 30 ++++---- 2 files changed, 113 insertions(+), 17 deletions(-) create mode 100644 sysdeps/mach/hurd/alpha/intr-msg.h diff --git a/sysdeps/mach/hurd/alpha/intr-msg.h b/sysdeps/mach/hurd/alpha/intr-msg.h new file mode 100644 index 0000000000..4f172124e3 --- /dev/null +++ b/sysdeps/mach/hurd/alpha/intr-msg.h @@ -0,0 +1,100 @@ +/* Machine-dependent details of interruptible RPC messaging. Alpha version. + Copyright (C) 2002 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. */ + +#define INTR_MSG_TRAP(msg, option, send_size, rcv_size, rcv_name, timeout, notify) \ +({ \ + error_t err; \ + asm (".globl _hurd_intr_rpc_msg_do_trap\n" \ + ".globl _hurd_intr_rpc_msg_in_trap\n" \ + " mov %1, $16\n" \ + " mov %2, $17\n" \ + " mov %3, $18\n" \ + " mov %4, $19\n" \ + " mov %5, $20\n" \ + " mov %6, $21\n" \ + " mov %7, $1\n" \ + " lda $0, -25\n" \ + "_hurd_intr_rpc_msg_do_trap: callsys\n" \ + "_hurd_intr_rpc_msg_in_trap: ret\n" \ + : "=r" (err) \ + : "r" (msg), "r" (option), "r" (send_size), "r" (rcv_size), \ + "r" (rcv_name), "r" (timeout), "r" (notify) \ + : "16", "17", "18", "19", "20", "21", "1", "0"); \ + err; \ +}) + +static void inline +INTR_MSG_BACK_OUT (struct alpha_thread_state *state) +{ + return; +} + +#include "hurdfault.h" + +/* This cannot be an inline function because it calls setjmp. */ +#define SYSCALL_EXAMINE(state, callno) \ +({ \ + u_int32_t *p = (void *) ((state)->pc - 4); \ + int result; \ + _hurdsig_catch_memory_fault (p) ? 0 : \ + ({ \ + result = (*p == 0x00000083); \ + _hurdsig_end_catch_fault (); \ + if (result) \ + /* The PC is just after a `callsys' instruction. \ + This is a system call in progress; v0 holds the call number. */ \ + *(callno) = (state)->r0; \ + result; \ + }); \ +}) + +struct mach_msg_trap_args + { + /* This is the order of arguments to mach_msg_trap. */ + mach_msg_header_t *msg; + mach_msg_option_t option; + mach_msg_size_t send_size; + mach_msg_size_t rcv_size; + mach_port_t rcv_name; + mach_msg_timeout_t timeout; + mach_port_t notify; + }; + +/* This cannot be an inline function because it calls setjmp. */ +#define MSG_EXAMINE(state, msgid, rcv_name, send_name, option, timeout) \ +({ \ + mach_msg_header_t *msg = (mach_msg_header_t *) (state)->r16; \ + *(option) = (mach_msg_option_t) (state)->r17; \ + *(rcv_name) = (mach_port_t) (state)->r18; \ + *(timeout) = (mach_msg_timeout_t) (state)->r19; \ + (msg == 0) ? \ + ({ \ + *(send_name) = MACH_PORT_NULL; \ + *(msgid) = 0; \ + 0; \ + }) : \ + (_hurdsig_catch_memory_fault (msg) ? -1 : \ + ({ \ + *(send_name) = msg->msgh_remote_port; \ + *(msgid) = msg->msgh_id; \ + _hurdsig_end_catch_fault (); \ + 0; \ + }) \ + ); \ +}) diff --git a/sysdeps/mach/hurd/alpha/trampoline.c b/sysdeps/mach/hurd/alpha/trampoline.c index 152f935b13..2360cbb469 100644 --- a/sysdeps/mach/hurd/alpha/trampoline.c +++ b/sysdeps/mach/hurd/alpha/trampoline.c @@ -1,5 +1,5 @@ /* Set thread_state for sighandler, and sigcontext to recover. Alpha version. - Copyright (C) 1994, 1995, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1994,95,97,98,2002 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 @@ -19,7 +19,6 @@ #include #include "thread_state.h" -#include #include "hurdfault.h" #include @@ -38,9 +37,8 @@ struct mach_msg_trap_args struct sigcontext * _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, - int signo, long int sigcode, - int rpc_wait, - struct machine_thread_all_state *state) + int signo, struct hurd_signal_detail *detail, + int rpc_wait, struct machine_thread_all_state *state) { __label__ trampoline, rpc_wait_trampoline; void *sigsp; @@ -51,10 +49,7 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, /* We have a previous sigcontext that sigreturn was about to restore when another signal arrived. We will just base our setup on that. */ - if (_hurdsig_catch_fault (SIGSEGV)) - assert (_hurdsig_fault_sigcode >= (long int) ss->context && - _hurdsig_fault_sigcode < (long int) (ss->context + 1)); - else + if (! _hurdsig_catch_memory_fault (ss->context)) { memcpy (&state->basic, &ss->context->sc_alpha_thread_state, sizeof (state->basic)); @@ -79,6 +74,8 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, later. */ ss->intr_port = ss->context->sc_intr_port; } + _hurdsig_end_catch_fault (); + /* If the sigreturn context was bogus, just ignore it. */ ss->context = NULL; } @@ -101,10 +98,8 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, sigsp -= sizeof (*scp); scp = sigsp; - if (_hurdsig_catch_fault (SIGSEGV)) + if (_hurdsig_catch_memory_fault (scp)) { - assert (_hurdsig_fault_sigcode >= (long int) scp && - _hurdsig_fault_sigcode < (long int) (scp + 1)); /* We got a fault trying to write the stack frame. We cannot set up the signal handler. Returning NULL tells our caller, who will nuke us with a SIGILL. */ @@ -137,6 +132,8 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, &scp->sc_alpha_float_state, sizeof (state->fpu))) return NULL; + + _hurdsig_end_catch_fault (); } /* Modify the thread state to call the trampoline code on the new stack. */ @@ -176,14 +173,14 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, ($16..$21, $1). Pass the handler args to the trampoline code in t8..t10 ($22.$24). */ state->basic.r22 = signo; - state->basic.r23 = sigcode; + state->basic.r23 = detail->code; state->basic.r24 = (long int) scp; } else { state->basic.pc = (long int) &&trampoline; state->basic.r16 = signo; - state->basic.r17 = sigcode; + state->basic.r17 = detail->code; state->basic.r18 = (long int) scp; } @@ -212,7 +209,7 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, asm volatile (/* Retry the interrupted mach_msg system call. */ "lda $0, -25($31)\n" /* mach_msg_trap */ - "call_pal %0\n" /* Magic system call instruction. */ + "callsys\n" /* Magic system call instruction. */ /* When the sigcontext was saved, v0 was MACH_RCV_INTERRUPTED. But now the message receive has completed and the original caller of the RPC (i.e. the code running when the signal arrived) needs to @@ -225,8 +222,7 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, in registers t8..t10 ($22..$24). */ "mov $22, $16\n" "mov $23, $17\n" - "mov $24, $18\n" - : : "i" (op_chmk)); + "mov $24, $18\n"); trampoline: /* Entry point for running the handler normally. The arguments to the From a4b6834c4f68aaca22152fb2fb70d189c719eb20 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 9 Apr 2002 19:49:11 +0000 Subject: [PATCH 2766/4487] Use INTDEF for __fcntl. --- sysdeps/unix/sysv/aix/fcntl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/aix/fcntl.c b/sysdeps/unix/sysv/aix/fcntl.c index 8c5ba154c2..43f21b6e58 100644 --- a/sysdeps/unix/sysv/aix/fcntl.c +++ b/sysdeps/unix/sysv/aix/fcntl.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2001, 2002 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 @@ -19,6 +19,8 @@ #include #include +#undef __fcntl + extern int kfcntl (int fdes, int cmd, unsigned long int arg); int From db601cfcce3187c04674f6a0574a3bc916714a91 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 9 Apr 2002 20:20:23 +0000 Subject: [PATCH 2767/4487] Use INTDEF for __chown. --- sysdeps/unix/sysv/aix/chown.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/aix/chown.c b/sysdeps/unix/sysv/aix/chown.c index 568c26ac77..037b14b276 100644 --- a/sysdeps/unix/sysv/aix/chown.c +++ b/sysdeps/unix/sysv/aix/chown.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2002 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 @@ -18,8 +18,11 @@ #include +#undef __chown + int __chown (const char *file, uid_t owner, gid_t group) { return chown (file, owner, group); } +INTDEF(__chown) From 1555f102ef6f0a8f080190585c842ba0eba58d63 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 9 Apr 2002 20:21:24 +0000 Subject: [PATCH 2768/4487] Use INTDEF for __connect. --- sysdeps/unix/sysv/aix/connect.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysdeps/unix/sysv/aix/connect.c b/sysdeps/unix/sysv/aix/connect.c index 7fb636dea9..2f58be1ede 100644 --- a/sysdeps/unix/sysv/aix/connect.c +++ b/sysdeps/unix/sysv/aix/connect.c @@ -1,8 +1,11 @@ /* This is a system call. We only have to provide the wrapper. */ #include +#undef __connect + int __connect (int fd, __CONST_SOCKADDR_ARG addr, socklen_t len) { return connect (fd, addr, len); } +INTDEF(__connect) From d6a57cb89405cc626f2bfe7252ff367ed16cb17e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 9 Apr 2002 20:22:09 +0000 Subject: [PATCH 2769/4487] Use INTDEF for __fork. --- sysdeps/unix/sysv/aix/fork.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/aix/fork.c b/sysdeps/unix/sysv/aix/fork.c index f31f3428a9..085342b716 100644 --- a/sysdeps/unix/sysv/aix/fork.c +++ b/sysdeps/unix/sysv/aix/fork.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2002 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 @@ -18,10 +18,12 @@ #include +#undef __fork pid_t __fork (void) { return kfork (); } +INTDEF(__fork) strong_alias (__fork, fork) From e4bf0032b0526769893e6c33a7b4063f28ce9dbb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 9 Apr 2002 20:26:17 +0000 Subject: [PATCH 2770/4487] Use INTUSE for __chown calls. --- sysdeps/unix/sysv/linux/m68k/chown.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/m68k/chown.c b/sysdeps/unix/sysv/linux/m68k/chown.c index 50e11c1aa9..f8f4b5c0af 100644 --- a/sysdeps/unix/sysv/linux/m68k/chown.c +++ b/sysdeps/unix/sysv/linux/m68k/chown.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2000, 2002 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 @@ -71,4 +71,5 @@ __chown (const char *file, uid_t owner, gid_t group) return INLINE_SYSCALL (chown, 3, CHECK_STRING (file), owner, group); #endif } +INTDEF(__chown) weak_alias (__chown, chown) From 3ab5bc8a522cad90d705b0b8de73dd1f133d1b21 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 11 Apr 2002 20:38:52 +0000 Subject: [PATCH 2771/4487] LOC): Don't paste in a token. --- sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h index d9badf74d9..9a0db6afe1 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1994, 1995, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1993,1994,1995,1997,1998,2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -51,6 +51,6 @@ #define r1 %o1 #define MOVE(x,y) mov x, y -#define LOC(name) .##L##name +#define LOC(name) .L##name #endif /* __ASSEMBLER__ */ From 404d6b4b4687ef0d1d975ef458e1a5e8b3cbf9e0 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 13 Apr 2002 07:53:04 +0000 Subject: [PATCH 2772/4487] Adjust all callers of _dl_lookup_symbol and _dl_lookup_versioned_symbol. --- sysdeps/mips/dl-machine.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index fcf37f6569..bc5e84fd86 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -307,7 +307,8 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \ } \ case 0: \ value = _dl_lookup_symbol (strtab + sym->st_name, l, &sym, \ - l->l_scope, ELF_RTYPE_CLASS_PLT, 0); \ + l->l_scope, ELF_RTYPE_CLASS_PLT, \ + DL_LOOKUP_ADD_DEPENDENCY); \ } \ \ /* Currently value contains the base load address of the object \ From e60f3fa19841189c9164a764a7e8448f14664272 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 13 Apr 2002 15:41:53 +0000 Subject: [PATCH 2773/4487] * sysdeps/m68k/fpu/s_finite.c: Add internal alias. * sysdeps/m68k/fpu/s_finitef.c: Likewise. * sysdeps/m68k/fpu/s_finitel.c: Likewise. --- sysdeps/m68k/fpu/s_finite.c | 1 + sysdeps/m68k/fpu/s_finitef.c | 1 + sysdeps/m68k/fpu/s_finitel.c | 1 + 3 files changed, 3 insertions(+) diff --git a/sysdeps/m68k/fpu/s_finite.c b/sysdeps/m68k/fpu/s_finite.c index dafbd5901d..c9e57187ba 100644 --- a/sysdeps/m68k/fpu/s_finite.c +++ b/sysdeps/m68k/fpu/s_finite.c @@ -1,2 +1,3 @@ #define FUNC finite #include +INTDEF(__finite) diff --git a/sysdeps/m68k/fpu/s_finitef.c b/sysdeps/m68k/fpu/s_finitef.c index b81342e5c6..921b2f2e31 100644 --- a/sysdeps/m68k/fpu/s_finitef.c +++ b/sysdeps/m68k/fpu/s_finitef.c @@ -1,2 +1,3 @@ #define FUNC finitef #include +INTDEF(__finitef) diff --git a/sysdeps/m68k/fpu/s_finitel.c b/sysdeps/m68k/fpu/s_finitel.c index bd346a220c..10a18a1e86 100644 --- a/sysdeps/m68k/fpu/s_finitel.c +++ b/sysdeps/m68k/fpu/s_finitel.c @@ -1,2 +1,3 @@ #define FUNC finitel #include +INTDEF(__finitel) From 144484daa4b5f6c61935cc507349f914c7fd1fb4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 14 Apr 2002 08:37:17 +0000 Subject: [PATCH 2774/4487] Use INTDEF for __fxstat. --- sysdeps/unix/sysv/aix/fxstat.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/aix/fxstat.c b/sysdeps/unix/sysv/aix/fxstat.c index e1f546d8c9..4c1e145dcb 100644 --- a/sysdeps/unix/sysv/aix/fxstat.c +++ b/sysdeps/unix/sysv/aix/fxstat.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2002 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,9 +23,12 @@ extern int fstatx (int fd, struct stat *st, int len, int cmd); +#undef __fxstat + int __fxstat (int ver, int fd, struct stat *st) { assert (ver == 0); return fstatx (fd, st, sizeof (*st), STX_NORMAL); } +INTDEF(__fxstat) From 9155b112e9e39428d6ca61cd879082022231a207 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 14 Apr 2002 08:38:17 +0000 Subject: [PATCH 2775/4487] Use INTDEF for __fxstat64. --- sysdeps/unix/sysv/aix/fxstat64.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/aix/fxstat64.c b/sysdeps/unix/sysv/aix/fxstat64.c index 39f8cd9e11..509fb2c0cb 100644 --- a/sysdeps/unix/sysv/aix/fxstat64.c +++ b/sysdeps/unix/sysv/aix/fxstat64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2002 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 @@ -22,11 +22,16 @@ #define STX_NORMAL 0x00 #define STX_64 0x08 +#undef __fxstat64 + extern int fstatx (int fd, struct stat64 *st, int len, int cmd); +#undef __fxstat64 + int __fxstat64 (int ver, int fd, struct stat64 *st) { assert (ver == 0); return fstatx (fd, st, sizeof (*st), STX_NORMAL | STX_64); } +INTDEF(__fxstat64) From a02fe38fa821cfd8f41d949d18ad7dea9e420a0e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 14 Apr 2002 08:41:04 +0000 Subject: [PATCH 2776/4487] Use INTDEF for __getpagesize. --- sysdeps/unix/sysv/linux/m68k/getpagesize.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysdeps/unix/sysv/linux/m68k/getpagesize.c b/sysdeps/unix/sysv/linux/m68k/getpagesize.c index ce1048b47d..026a8943bf 100644 --- a/sysdeps/unix/sysv/linux/m68k/getpagesize.c +++ b/sysdeps/unix/sysv/linux/m68k/getpagesize.c @@ -25,6 +25,8 @@ #include #include +#undef __getpagesize + /* Return the system page size. */ int __getpagesize () @@ -46,4 +48,5 @@ __getpagesize () return 4096; } +INTDEF(__getpagesize) weak_alias (__getpagesize, getpagesize) From 5fe32a10cec103c4fab57bd5d561d9367fd92f81 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 14 Apr 2002 08:42:53 +0000 Subject: [PATCH 2777/4487] Use INTDEF for __getpgid. --- sysdeps/unix/sysv/aix/getpgid.c | 5 ++++- sysdeps/unix/sysv/sysv4/__getpgid.c | 5 ++++- sysdeps/unix/sysv/sysv4/getpgid.c | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/aix/getpgid.c b/sysdeps/unix/sysv/aix/getpgid.c index 297fccc854..889e3e1cac 100644 --- a/sysdeps/unix/sysv/aix/getpgid.c +++ b/sysdeps/unix/sysv/aix/getpgid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2002 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 @@ -18,6 +18,8 @@ #include +#undef __getpgid + extern int kgetpgidx (pid_t pid); int @@ -25,4 +27,5 @@ __getgpid (pid_t pid) { return kgetpgidx (pid); } +INTDEF(__getgpid) strong_alias (__getpgid, getpgid) diff --git a/sysdeps/unix/sysv/sysv4/__getpgid.c b/sysdeps/unix/sysv/sysv4/__getpgid.c index 4ee0e7483f..9313434011 100644 --- a/sysdeps/unix/sysv/sysv4/__getpgid.c +++ b/sysdeps/unix/sysv/sysv4/__getpgid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1997, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -21,6 +21,8 @@ #include #include +#undef __getpgid + extern int __pgrpsys __P ((int type, ...)); /* Get the process group ID of process PID. */ @@ -30,3 +32,4 @@ __getpgid (pid) { return __pgrpsys (4, pid); } +INTDEF(__getpgid) diff --git a/sysdeps/unix/sysv/sysv4/getpgid.c b/sysdeps/unix/sysv/sysv4/getpgid.c index 0d4e4caa73..5ec9e2c1c2 100644 --- a/sysdeps/unix/sysv/sysv4/getpgid.c +++ b/sysdeps/unix/sysv/sysv4/getpgid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1997, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1997, 1999, 2002 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 @@ -19,6 +19,8 @@ #include #include +#undef __getpgid + extern pid_t __pgrpsys __P ((int type, ...)); /* Get the process group ID of process PID. */ @@ -29,4 +31,5 @@ __getpgid (pid) return __pgrpsys (4, pid); } +INTDEF(__getpgid) weak_alias (__getpgid, getpgid) From 4c7b01bd937caa3507a281d3debd6bdf2f5c502c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 14 Apr 2002 09:11:55 +0000 Subject: [PATCH 2778/4487] Use INTEDEF for __gettimeofday. --- sysdeps/unix/sysv/aix/gettimeofday.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/aix/gettimeofday.c b/sysdeps/unix/sysv/aix/gettimeofday.c index 031a84ebb6..a0105ae080 100644 --- a/sysdeps/unix/sysv/aix/gettimeofday.c +++ b/sysdeps/unix/sysv/aix/gettimeofday.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 92, 94, 95, 96, 97, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,94,95,96,97,2001,2002 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 @@ -26,6 +26,8 @@ # define __tzname tzname #endif +#undef __gettimeofday + extern int rtc_upper (void); extern int rtc_lower (void); @@ -92,4 +94,5 @@ __gettimeofday (tv, tz) return 0; } +INTDEF(__gettimeofday) weak_alias (__gettimeofday, gettimeofday) From 016f45be9bb8544dfb622a4f08ab8398d697492e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 14 Apr 2002 09:12:57 +0000 Subject: [PATCH 2779/4487] Define __gettimeofday alias. --- sysdeps/unix/sysv/linux/alpha/gettimeofday.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S index 22f3bb7bc2..60d642a125 100644 --- a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S +++ b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2002 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 @@ -109,3 +109,4 @@ default_symbol_version (__gettimeofday_tv64p, gettimeofday, GLIBC_2.1) #else weak_alias (__gettimeofday, gettimeofday) #endif +strong_alias(GETTIMEOFDAY, __gettimeofday_internal) From 801777ebaf5abd1481913c7e153e46bea2fbcf5c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 14 Apr 2002 17:54:50 +0000 Subject: [PATCH 2780/4487] Also define _internal alias. --- sysdeps/m68k/fpu/s_isinf.c | 3 ++- sysdeps/m68k/s_isinfl.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sysdeps/m68k/fpu/s_isinf.c b/sysdeps/m68k/fpu/s_isinf.c index e654e880e3..98a7c62a91 100644 --- a/sysdeps/m68k/fpu/s_isinf.c +++ b/sysdeps/m68k/fpu/s_isinf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 2002 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 @@ -34,5 +34,6 @@ __CONCATX(__,FUNC) (x) return __m81_u(__CONCATX(__,FUNC))(x); } +INTDEF(__CONCATX(__,FUNC)) #define weak_aliasx(a,b) weak_alias(a,b) weak_aliasx (__CONCATX(__,FUNC), FUNC) diff --git a/sysdeps/m68k/s_isinfl.c b/sysdeps/m68k/s_isinfl.c index 40e0b791d5..89880bc4e4 100644 --- a/sysdeps/m68k/s_isinfl.c +++ b/sysdeps/m68k/s_isinfl.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1995, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1995, 1997, 2002 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 @@ -42,4 +42,5 @@ __isinfl (long double value) return 0; } +INTDEF(__isinfl) weak_alias (__isinfl, isinfl); From d0a1614c810e7aee52bacd5f99733d49680ff21d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 14 Apr 2002 18:34:22 +0000 Subject: [PATCH 2781/4487] Undefine __libc_fcntl as well. --- sysdeps/unix/sysv/aix/fcntl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/aix/fcntl.c b/sysdeps/unix/sysv/aix/fcntl.c index 43f21b6e58..f9bb42a766 100644 --- a/sysdeps/unix/sysv/aix/fcntl.c +++ b/sysdeps/unix/sysv/aix/fcntl.c @@ -19,6 +19,7 @@ #include #include +#undef __libc_fcntl #undef __fcntl extern int kfcntl (int fdes, int cmd, unsigned long int arg); From 0e36d9d57ee268a304016fed53ca1432c328ba9b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 14 Apr 2002 20:12:24 +0000 Subject: [PATCH 2782/4487] Use INTDEF for __open. --- sysdeps/unix/sysv/aix/open.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/aix/open.c b/sysdeps/unix/sysv/aix/open.c index 4116c4ebdc..c41c708564 100644 --- a/sysdeps/unix/sysv/aix/open.c +++ b/sysdeps/unix/sysv/aix/open.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2002 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,6 +20,9 @@ #include #include +#undef __libc_open +#undef __open + int __open (const char *file, int oflag, ...) { @@ -36,3 +39,4 @@ __open (const char *file, int oflag, ...) return open (file, oflag, mode); } strong_alias (__open, __libc_open) +INTDEF(__open) From 2093a68877d5492a0b651ef50060fb5845ca4f41 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 15 Apr 2002 05:27:20 +0000 Subject: [PATCH 2783/4487] Use INTDEF for __lxstat. --- sysdeps/unix/sysv/aix/lxstat.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/aix/lxstat.c b/sysdeps/unix/sysv/aix/lxstat.c index bd6f6534a8..52562bd934 100644 --- a/sysdeps/unix/sysv/aix/lxstat.c +++ b/sysdeps/unix/sysv/aix/lxstat.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2002 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 @@ -21,6 +21,8 @@ #define STX_LINK 0x01 +#undef __lxstat + extern int statx (const char *pathname, struct stat *st, int len, int cmd); int @@ -29,3 +31,5 @@ __lxstat (int ver, const char *pathname, struct stat *st) assert (ver == 0); return statx (pathname, st, sizeof (*st), STX_LINK); } + +INTDEF(__lxstat) From 548fe33d15ff56d40e72f8183176b14222199d8d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 15 Apr 2002 05:28:30 +0000 Subject: [PATCH 2784/4487] Use INTDEF for __lxstat64. --- sysdeps/unix/sysv/aix/lxstat64.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/aix/lxstat64.c b/sysdeps/unix/sysv/aix/lxstat64.c index d6376bd260..d68b4583d2 100644 --- a/sysdeps/unix/sysv/aix/lxstat64.c +++ b/sysdeps/unix/sysv/aix/lxstat64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2002 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 @@ -22,6 +22,8 @@ #define STX_LINK 0x01 #define STX_64 0x08 +#undef __lxstat64 + extern int statx (const char *pathname, struct stat64 *st, int len, int cmd); int @@ -30,3 +32,5 @@ __lxstat64 (int ver, const char *pathname, struct stat64 *st) assert (ver == 0); return statx (pathname, st, sizeof (*st), STX_LINK | STX_64); } + +INTDEF(__lxstat64) From 9d337e61ff171cbc91a88ddc3ba6a360ffb66e37 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 15 Apr 2002 05:30:10 +0000 Subject: [PATCH 2785/4487] Use INTDEF for __write. --- sysdeps/unix/sysv/aix/write.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/aix/write.c b/sysdeps/unix/sysv/aix/write.c index 727ec82cfb..5a1ac101e4 100644 --- a/sysdeps/unix/sysv/aix/write.c +++ b/sysdeps/unix/sysv/aix/write.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1999. @@ -21,6 +21,8 @@ #include "kernel_proto.h" +#undef __libc_write +#undef __write ssize_t __write (fd, ptr, n) @@ -30,6 +32,7 @@ __write (fd, ptr, n) { return kwrite (fd, ptr, n); } +INTDEF(__write) /* AIX has no weak aliases (yet) but let's hope for better times. */ weak_alias (__write, write) strong_alias (__write, __libc_write) From 337ca8062e5bed786b42772fdb17bfa4ffd733d6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 19 Apr 2002 07:56:42 +0000 Subject: [PATCH 2786/4487] Add __connect_internal. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 2 +- sysdeps/unix/sysv/linux/hppa/syscalls.list | 2 +- sysdeps/unix/sysv/linux/mips/syscalls.list | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 651398c9d2..eb64186134 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -36,7 +36,7 @@ sys_mknod xmknod mknod 3 __syscall_mknod # proper socket implementations: accept - accept 3 __libc_accept __accept accept bind - bind 3 __bind bind -connect - connect 3 __libc_connect __connect connect +connect - connect 3 __libc_connect __connect_internal __connect connect getpeername - getpeername 3 __getpeername getpeername getsockname - getsockname 3 __getsockname getsockname getsockopt - getsockopt 5 __getsockopt getsockopt diff --git a/sysdeps/unix/sysv/linux/hppa/syscalls.list b/sysdeps/unix/sysv/linux/hppa/syscalls.list index ed9f1a3982..2c7a63917d 100644 --- a/sysdeps/unix/sysv/linux/hppa/syscalls.list +++ b/sysdeps/unix/sysv/linux/hppa/syscalls.list @@ -16,7 +16,7 @@ semctl - semctl i:iiii __semctl semctl # proper socket implementations: accept - accept i:iBN __libc_accept __accept accept bind - bind i:ipi __bind bind -connect - connect i:ipi __libc_connect __connect connect +connect - connect i:ipi __libc_connect __connect_internal __connect connect getpeername - getpeername i:ipp __getpeername getpeername getsockname - getsockname i:ipp __getsockname getsockname getsockopt - getsockopt i:iiiBN __getsockopt getsockopt diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index 25e31d1714..f7d2e291a5 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -16,7 +16,7 @@ s_sigsuspend sigsuspend sigsuspend i:p __syscall_sigsuspend # accept - accept i:iBN __libc_accept __accept accept bind - bind i:ipi __bind bind -connect - connect i:ipi __libc_connect __connect connect +connect - connect i:ipi __libc_connect __connect_internal __connect connect getpeername - getpeername i:ipp __getpeername getpeername getsockname - getsockname i:ipp __getsockname getsockname getsockopt - getsockopt i:iiiBN __getsockopt getsockopt From 2ee700db50930fd1189407488eb127cb6fdc65fa Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 24 Apr 2002 18:16:54 +0000 Subject: [PATCH 2787/4487] 2002-04-24 Roland McGrath * sysdeps/mach/alpha/sysdep.h (ENTRY): New macro. --- sysdeps/mach/alpha/sysdep.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sysdeps/mach/alpha/sysdep.h b/sysdeps/mach/alpha/sysdep.h index ddd98d666a..84e21c8d5d 100644 --- a/sysdeps/mach/alpha/sysdep.h +++ b/sysdeps/mach/alpha/sysdep.h @@ -43,6 +43,15 @@ #define ALIGN 3 #include +/* Alpha needs the .ent and .frame magic that the generic version lacks. */ +#undef ENTRY +#define ENTRY(name) \ + .globl name; \ + .align 3; \ + .ent name, 0; \ + name##: \ + .frame sp, 0, ra + #include #undef at #define at 28 From 486a12c2265e22022dd02351d6b362db6a9b3fb3 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 24 Apr 2002 18:16:59 +0000 Subject: [PATCH 2788/4487] 2002-04-24 Roland McGrath * sysdeps/mach/alpha/syscall.S: Don't use .frame, ENTRY will have it; use END macro instead of our own .end directive. Use `callsys' insn mnemonic instead of `call_pal'. --- sysdeps/mach/alpha/syscall.S | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sysdeps/mach/alpha/syscall.S b/sysdeps/mach/alpha/syscall.S index 8cb85bff55..15fc5b75b7 100644 --- a/sysdeps/mach/alpha/syscall.S +++ b/sysdeps/mach/alpha/syscall.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1994,97,2002 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 @@ -17,10 +17,8 @@ 02111-1307 USA. */ #include -#include ENTRY (syscall) - .frame sp,0,ra mov a0, v0 /* Load system call number from first arg. */ mov a1, a0 mov a2, a1 @@ -34,6 +32,6 @@ ENTRY (syscall) ldq t2,24(sp) ldq t3,32(sp) ldq t4,40(sp) - call_pal op_chmk - RET - .end syscall + callsys + ret +END (syscall) From 21b4728e4f7408be7a6c0e4072dec8a8d1cc6309 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 24 Apr 2002 18:17:02 +0000 Subject: [PATCH 2789/4487] 2002-04-24 Roland McGrath * sysdeps/alpha/dl-machine.h (ELF_MACHINE_USER_ADDRESS_MASK): New macro; we need this for Hurd. --- sysdeps/alpha/dl-machine.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index f6d33739a0..2b15e33518 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -29,6 +29,10 @@ #include +/* Mask identifying addresses reserved for the user program, + where the dynamic linker should not map anything. */ +#define ELF_MACHINE_USER_ADDRESS_MASK 0x120000000UL + /* Return nonzero iff ELF header is compatible with the running host. */ static inline int elf_machine_matches_host (const Elf64_Ehdr *ehdr) From 942fe80901b6edc2ce0f154bbea7190cb3ceee1d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 30 Apr 2002 22:00:59 +0000 Subject: [PATCH 2790/4487] 2002-04-30 Roland McGrath Removed old GNU stdio implementation; GNU libio is now the only option. * configure.in: Removed --enable-libio option and @stdio@ subst var. Define USE_IN_LIBIO unconditionally. * configure: Regenerated. * Makeconfig (stdio): Set to libio by default. * config.make.in (stdio): Variable removed. * sysdeps/unix/sysv/linux/configure.in: Don't set $stdio. * sysdeps/unix/sysv/linux/configure: Regenerated. * sysdeps/mach/hurd/configure.in: Don't test $stdio. * sysdeps/mach/hurd/configure: Regenerated. * stdio/.cvsignore: File removed. * stdio/Makefile: File removed. * stdio/Versions: File removed. * stdio/__fbufsize.c: File removed. * stdio/__flbf.c: File removed. * stdio/__fpending.c: File removed. * stdio/__fpurge.c: File removed. * stdio/__freadable.c: File removed. * stdio/__freading.c: File removed. * stdio/__fsetlocking.c: File removed. * stdio/__fwritable.c: File removed. * stdio/__fwriting.c: File removed. * stdio/clearerr.c: File removed. * stdio/fclose.c: File removed. * stdio/fcloseall.c: File removed. * stdio/feof.c: File removed. * stdio/ferror.c: File removed. * stdio/fflush.c: File removed. * stdio/fgetc.c: File removed. * stdio/fgetpos.c: File removed. * stdio/fgets.c: File removed. * stdio/fileno.c: File removed. * stdio/fmemopen.c: File removed. * stdio/fopen.c: File removed. * stdio/fopncook.c: File removed. * stdio/fputc.c: File removed. * stdio/fputs.c: File removed. * stdio/fread.c: File removed. * stdio/freopen.c: File removed. * stdio/fseek.c: File removed. * stdio/fsetpos.c: File removed. * stdio/ftell.c: File removed. * stdio/fwrite.c: File removed. * stdio/getc.c: File removed. * stdio/getchar.c: File removed. * stdio/getdelim.c: File removed. * stdio/gets.c: File removed. * stdio/glue.c: File removed. * stdio/internals.c: File removed. * stdio/linewrap.c: File removed. * stdio/linewrap.h: File removed. * stdio/memstream.c: File removed. * stdio/newstream.c: File removed. * stdio/obstream.c: File removed. * stdio/putc.c: File removed. * stdio/putchar.c: File removed. * stdio/puts.c: File removed. * stdio/rewind.c: File removed. * stdio/setbuf.c: File removed. * stdio/setbuffer.c: File removed. * stdio/setlinebuf.c: File removed. * stdio/setvbuf.c: File removed. * stdio/stdio.h: File removed. * stdio/ungetc.c: File removed. * stdio/vasprintf.c: File removed. * stdio/vscanf.c: File removed. * stdio/vsnprintf.c: File removed. * stdio/vsprintf.c: File removed. * stdio/vsscanf.c: File removed. * sysdeps/generic/defs.c: File removed. * sysdeps/generic/fdopen.c: File removed. * sysdeps/generic/pipestream.c: File removed. * sysdeps/generic/stdio_init.c: File removed. * sysdeps/generic/sysd-stdio.c: File removed. * sysdeps/generic/vdprintf.c: File removed. * sysdeps/mach/hurd/defs.c: File removed. * sysdeps/mach/hurd/fdopen.c: File removed. * sysdeps/mach/hurd/pipestream.c: File removed. * sysdeps/mach/hurd/stdio_init.c: File removed. * sysdeps/mach/hurd/sysd-stdio.c: File removed. * sysdeps/mach/hurd/vdprintf.c: File removed. * sysdeps/posix/defs.c: File removed. * sysdeps/posix/fdopen.c: File removed. * sysdeps/posix/pipestream.c: File removed. * sysdeps/posix/stdio_init.c: File removed. * sysdeps/posix/vdprintf.c: File removed. * sysdeps/unix/pipestream.c: File removed. * sysdeps/unix/sysv/sysd-stdio.c: File removed. * sysdeps/unix/sysv/sco3.2.4/pipestream.c: File removed. * sysdeps/unix/sysv/sysv4/pipestream.c: File removed. --- sysdeps/unix/sysv/sco3.2.4/pipestream.c | 3 --- sysdeps/unix/sysv/sysv4/pipestream.c | 2 -- 2 files changed, 5 deletions(-) delete mode 100644 sysdeps/unix/sysv/sco3.2.4/pipestream.c delete mode 100644 sysdeps/unix/sysv/sysv4/pipestream.c diff --git a/sysdeps/unix/sysv/sco3.2.4/pipestream.c b/sysdeps/unix/sysv/sco3.2.4/pipestream.c deleted file mode 100644 index b768e62043..0000000000 --- a/sysdeps/unix/sysv/sco3.2.4/pipestream.c +++ /dev/null @@ -1,3 +0,0 @@ -/* SCO 3.2v4 does have `waitpid'. - Avoid unix/pipestream.c, which says we don't. */ -#include diff --git a/sysdeps/unix/sysv/sysv4/pipestream.c b/sysdeps/unix/sysv/sysv4/pipestream.c deleted file mode 100644 index 6a32f9507c..0000000000 --- a/sysdeps/unix/sysv/sysv4/pipestream.c +++ /dev/null @@ -1,2 +0,0 @@ -/* We deliberately avoid having NO_WAITPID set. */ -#include From 9b282d81219d5abf526c7ef2e50dc177c4c3658c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 2 May 2002 21:13:45 +0000 Subject: [PATCH 2791/4487] 2002-05-01 Roland McGrath * sysdeps/mach/hurd/alpha/static-start.S: New file (unfinished). --- sysdeps/mach/hurd/alpha/static-start.S | 30 ++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 sysdeps/mach/hurd/alpha/static-start.S diff --git a/sysdeps/mach/hurd/alpha/static-start.S b/sysdeps/mach/hurd/alpha/static-start.S new file mode 100644 index 0000000000..a31d0d097a --- /dev/null +++ b/sysdeps/mach/hurd/alpha/static-start.S @@ -0,0 +1,30 @@ +/* Startup code for statically linked Hurd/Alpha binaries. + Copyright (C) 2002 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. */ + +#include + + .text + .align 3 + .globl _start + .type _start,@function +_start: + jsr ra, _hurd_stack_setup + +#define _start _start1 +#include From 7fbbcc094fea6c4bd4972aae132f524cde829a2c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 15 May 2002 00:07:30 +0000 Subject: [PATCH 2792/4487] (__recvmsg): Renamed from recvmsg, add recvmsg as weak alias. --- sysdeps/unix/sysv/aix/recvmsg.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/aix/recvmsg.c b/sysdeps/unix/sysv/aix/recvmsg.c index ea5af3557c..201c26741c 100644 --- a/sysdeps/unix/sysv/aix/recvmsg.c +++ b/sysdeps/unix/sysv/aix/recvmsg.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2001, 2002 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 @@ -21,7 +21,9 @@ extern ssize_t nrecvmsg (int s, struct msghdr *uap_msg, int flags); ssize_t -recvmsg (int fd, struct msghdr *message, int flags) +__recvmsg (int fd, struct msghdr *message, int flags) { return nrecvmsg (fd, message, flags); } + +weak_alias (__recvmsg, recvmsg) From fa87d850d1ff354fb509366cc512b1245ab213e0 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 15 May 2002 00:08:25 +0000 Subject: [PATCH 2793/4487] (__recvfrom): Renamed from recvfrom, add recvfrom as weak alias. --- sysdeps/unix/sysv/aix/recvfrom.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/aix/recvfrom.c b/sysdeps/unix/sysv/aix/recvfrom.c index 08264288d1..08ff1113f4 100644 --- a/sysdeps/unix/sysv/aix/recvfrom.c +++ b/sysdeps/unix/sysv/aix/recvfrom.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2001, 2002 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 @@ -22,8 +22,10 @@ extern ssize_t nrecvfrom (int s, void *uap_buf, size_t len, int flags, void *uap_from, socklen_t *uap_fromlenaddr); ssize_t -recvfrom (int fd, void *buf, size_t n, int flags, __SOCKADDR_ARG addr, - socklen_t *addr_len) +__recvfrom (int fd, void *buf, size_t n, int flags, __SOCKADDR_ARG addr, + socklen_t *addr_len) { return nrecvfrom (fd, buf, n, flags, addr.__sockaddr__, addr_len); } + +weak_alias (__recvfrom, recvfrom) From dd96b0cb1d15fe0fcb49a7bdff81e66b93597436 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 15 May 2002 00:10:13 +0000 Subject: [PATCH 2794/4487] (__sendmsg): Renamed from sendmsg, add sendmsg as weak alias. --- sysdeps/unix/sysv/aix/sendmsg.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/aix/sendmsg.c b/sysdeps/unix/sysv/aix/sendmsg.c index 054d374393..5b1baf63a5 100644 --- a/sysdeps/unix/sysv/aix/sendmsg.c +++ b/sysdeps/unix/sysv/aix/sendmsg.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2001, 2002 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 @@ -21,7 +21,10 @@ extern int nsendmsg (int s, const void *uap_msg, int flags); ssize_t -sendmsg (int fd, const struct msghdr *message, int flags) +__sendmsg (int fd, const struct msghdr *message, int flags) { return nsendmsg (fd, message, flags); } + +weak_alias (__sendmsg, sendmsg) + From 4c68ac2b46b59c20f012ddabb2c56467fe398e4e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 15 May 2002 00:14:45 +0000 Subject: [PATCH 2795/4487] (__getsockname): Renamed from getsockname, add getsockname as weak alias. --- sysdeps/unix/sysv/aix/getsockname.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/aix/getsockname.c b/sysdeps/unix/sysv/aix/getsockname.c index 822f9e98cd..ac1bf34fcb 100644 --- a/sysdeps/unix/sysv/aix/getsockname.c +++ b/sysdeps/unix/sysv/aix/getsockname.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002 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 @@ -21,7 +21,9 @@ extern int ngetsockname (int s, void *uap_asa, int *uap_alen); int -getsockname (int fd, __SOCKADDR_ARG addr, socklen_t *len) +__getsockname (int fd, __SOCKADDR_ARG addr, socklen_t *len) { return ngetsockname (fd, addr.__sockaddr__, len); } + +weak_alias (__getsockname, getsockname) From a51465638191ad1f768816bf85ca6a58e5c9b30f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 15 May 2002 00:20:02 +0000 Subject: [PATCH 2796/4487] (__recvmsg, __sendmsg): Add aliases. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 4 ++-- sysdeps/unix/sysv/linux/hppa/syscalls.list | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index eb64186134..3dc07341e3 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -43,10 +43,10 @@ getsockopt - getsockopt 5 __getsockopt getsockopt listen - listen 2 __listen listen recv - recv 4 __libc_recv __recv recv recvfrom - recvfrom 6 __libc_recvfrom __recvfrom recvfrom -recvmsg - recvmsg 3 __libc_recvmsg recvmsg +recvmsg - recvmsg 3 __libc_recvmsg __recvmsg recvmsg ptrace - ptrace 4 __ptrace ptrace send - send 4 __libc_send __send send -sendmsg - sendmsg 3 __libc_sendmsg sendmsg +sendmsg - sendmsg 3 __libc_sendmsg __sendmsg sendmsg sendto - sendto 6 __libc_sendto __sendto sendto setsockopt - setsockopt 5 __setsockopt setsockopt shutdown - shutdown 2 __shutdown shutdown diff --git a/sysdeps/unix/sysv/linux/hppa/syscalls.list b/sysdeps/unix/sysv/linux/hppa/syscalls.list index 2c7a63917d..1c7a20d241 100644 --- a/sysdeps/unix/sysv/linux/hppa/syscalls.list +++ b/sysdeps/unix/sysv/linux/hppa/syscalls.list @@ -23,9 +23,9 @@ getsockopt - getsockopt i:iiiBN __getsockopt getsockopt listen - listen i:ii __listen listen recv - recv i:ibni __libc_recv __recv recv recvfrom - recvfrom i:ibniBN __libc_recvfrom __recvfrom recvfrom -recvmsg - recvmsg i:ipi __libc_recvmsg recvmsg +recvmsg - recvmsg i:ipi __libc_recvmsg __recvmsg recvmsg send - send i:ibni __libc_send __send send -sendmsg - sendmsg i:ipi __libc_sendmsg sendmsg +sendmsg - sendmsg i:ipi __libc_sendmsg __sendmsg sendmsg sendto - sendto i:ibnibn __libc_sendto __sendto sendto setsockopt - setsockopt i:iiibn __setsockopt setsockopt shutdown - shutdown i:ii __shutdown shutdown From eb7e1f616e25ec85ee8ce49612a0af4e3c6a09d3 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sun, 19 May 2002 16:24:27 +0000 Subject: [PATCH 2797/4487] Don't use multiline string as argument of #error. --- sysdeps/unix/sysv/aix/bits/ioctl-types.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/aix/bits/ioctl-types.h b/sysdeps/unix/sysv/aix/bits/ioctl-types.h index 109aa05adf..d8fe8c8d5b 100644 --- a/sysdeps/unix/sysv/aix/bits/ioctl-types.h +++ b/sysdeps/unix/sysv/aix/bits/ioctl-types.h @@ -1,5 +1,5 @@ /* Structure types for pre-termios terminal ioctls. AIX version. - Copyright (C) 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2002 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 @@ -18,8 +18,7 @@ 02111-1307 USA. */ #ifndef _SYS_IOCTL_H -# error "Never use directly; include instead -" +# error "Never use directly; include instead." #endif /* Constants for use with `ioctl'. */ From 2b2c91151309f6bb952aa72c5526b4c4a9719259 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 29 May 2002 08:09:20 +0000 Subject: [PATCH 2798/4487] 2002-05-28 Roland McGrath * sysdeps/mach/alpha/setfpucw.c: New file. --- sysdeps/mach/alpha/setfpucw.c | 69 +++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 sysdeps/mach/alpha/setfpucw.c diff --git a/sysdeps/mach/alpha/setfpucw.c b/sysdeps/mach/alpha/setfpucw.c new file mode 100644 index 0000000000..a2887c8dfb --- /dev/null +++ b/sysdeps/mach/alpha/setfpucw.c @@ -0,0 +1,69 @@ +/* Set FP exception mask and rounding mode. Mach/Alpha version. + Copyright (C) 2002 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. */ + +#include + + +#define FPCR_DYN_SHIFT 58 /* first dynamic rounding mode bit */ +#define FPCR_DYN_CHOPPED (0x0UL << FPCR_DYN_SHIFT) /* towards 0 */ +#define FPCR_DYN_MINUS (0x1UL << FPCR_DYN_SHIFT) /* towards -INF */ +#define FPCR_DYN_NORMAL (0x2UL << FPCR_DYN_SHIFT) /* towards nearest */ +#define FPCR_DYN_PLUS (0x3UL << FPCR_DYN_SHIFT) /* towards +INF */ +#define FPCR_DYN_MASK (0x3UL << FPCR_DYN_SHIFT) + +static inline unsigned long +rdfpcr (void) +{ + unsigned long fpcr; + asm ("excb; mf_fpcr %0" : "=f"(fpcr)); + return fpcr; +} + +static inline void +wrfpcr (unsigned long fpcr) +{ + asm volatile ("mt_fpcr %0; excb" : : "f"(fpcr)); +} + + +void +__setfpucw (fpu_control_t fpu_control) +{ + unsigned long fpcr; + + if (!fpu_control) + fpu_control = _FPU_DEFAULT; + + /* first, set dynamic rounding mode: */ + + fpcr = rdfpcr(); + fpcr &= ~FPCR_DYN_MASK; + switch (fpu_control & 0xc00) + { + case _FPU_RC_NEAREST: fpcr |= FPCR_DYN_NORMAL; break; + case _FPU_RC_DOWN: fpcr |= FPCR_DYN_MINUS; break; + case _FPU_RC_UP: fpcr |= FPCR_DYN_PLUS; break; + case _FPU_RC_ZERO: fpcr |= FPCR_DYN_CHOPPED; break; + } + wrfpcr(fpcr); + + /* XXX trap bits? */ + + __fpu_control = fpu_control; /* update global copy */ +} From 79c8c187bbbeef4b456b66a12e9dc588f0ddbe3a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 30 May 2002 23:23:09 +0000 Subject: [PATCH 2799/4487] Add readahead syscall. Add sendfile64 alias to sendfile syscall. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 3dc07341e3..28c60bb876 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -28,6 +28,8 @@ getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64 setrlimit - setrlimit 2 __setrlimit setrlimit64 setrlimit ftruncate - ftruncate 2 __ftruncate ftruncate __ftruncate64 ftruncate64 truncate - truncate 2 truncate truncate64 +readahead EXTRA readahead 3 __readahead readahead +sendfile EXTRA sendfile i:iipi sendfile sendfile64 # these are actually common with the x86: sys_ustat ustat ustat 2 __syscall_ustat From 88a34a05ea15e2163978066b050701304950a30f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 4 Jun 2002 18:35:07 +0000 Subject: [PATCH 2800/4487] 2002-06-01 Roland McGrath * sysdeps/mach/hurd/alpha/init-first.c: New file, modified from i386/init-first.c by Andrew M. Miklic . --- sysdeps/mach/hurd/alpha/init-first.c | 304 +++++++++++++++++++++++++++ 1 file changed, 304 insertions(+) create mode 100644 sysdeps/mach/hurd/alpha/init-first.c diff --git a/sysdeps/mach/hurd/alpha/init-first.c b/sysdeps/mach/hurd/alpha/init-first.c new file mode 100644 index 0000000000..bb60cd07d2 --- /dev/null +++ b/sysdeps/mach/hurd/alpha/init-first.c @@ -0,0 +1,304 @@ +/* Initialization code run first thing by the ELF startup code. Alpha/Hurd. + Copyright (C) 1995,96,97,98,99,2000,2001,02 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. */ + +#include +#include +#include +#include +#include +#include +#include +#include "hurdstartup.h" +#include "hurdmalloc.h" /* XXX */ + +extern void __mach_init (void); +extern void __libc_init (int, char **, char **); +extern void __init_misc (int, char **, char **); +#ifdef USE_NONOPTION_FLAGS +extern void __getopt_clean_environment (char **); +#endif +#ifndef SHARED +extern void _dl_non_dynamic_init (void) internal_function; +#endif +extern void __libc_global_ctors (void); + +unsigned int __hurd_threadvar_max; +unsigned long int __hurd_threadvar_stack_offset; +unsigned long int __hurd_threadvar_stack_mask; + +#ifndef SHARED +int __libc_enable_secure; +#endif +int __libc_multiple_libcs attribute_hidden = 1; + +extern int __libc_argc attribute_hidden; +extern char **__libc_argv attribute_hidden; +extern char **_dl_argv; + +void *(*_cthread_init_routine) (void); /* Returns new SP to use. */ +void (*_cthread_exit_routine) (int status) __attribute__ ((__noreturn__)); + +/* Things that want to be run before _hurd_init or much anything else. + Importantly, these are called before anything tries to use malloc. */ +DEFINE_HOOK (_hurd_preinit_hook, (void)); + + +/* We call this once the Hurd magic is all set up and we are ready to be a + Posixoid program. This does the same things the generic version does. */ +static void +posixland_init (int argc, char **argv, char **envp) +{ + __libc_argc = argc; + __libc_argv = argv; + __environ = envp; + +#ifndef SHARED + _dl_non_dynamic_init (); +#endif + __init_misc (argc, argv, envp); + __libc_init (argc, argv, envp); + +#ifdef USE_NONOPTION_FLAGS + /* This is a hack to make the special getopt in GNU libc working. */ + __getopt_clean_environment (envp); +#endif + +#ifdef SHARED + __libc_global_ctors (); +#endif +} + + +static void +init1 (intptr_t *data) +{ + int argc = (intptr_t) *data; + char **argv = &data[1]; + char **envp = &argv[argc + 1]; + struct hurd_startup_data *d; + + while (*envp) + ++envp; + d = (void *) ++envp; + + /* If we are the bootstrap task started by the kernel, + then after the environment pointers there is no Hurd + data block; the argument strings start there. */ + /* OSF Mach starts the bootstrap task with argc == 0. + XXX This fails if a non-bootstrap task gets started + with argc == 0. */ + if (argc && (void *) d != argv[0]) + { + _hurd_init_dtable = d->dtable; + _hurd_init_dtablesize = d->dtablesize; + + { + /* Check if the stack we are now on is different from + the one described by _hurd_stack_{base,size}. */ + + char dummy; + const vm_address_t newsp = (vm_address_t) &dummy; + + if (d->stack_size != 0 && (newsp < d->stack_base || + newsp - d->stack_base > d->stack_size)) + /* The new stack pointer does not intersect with the + stack the exec server set up for us, so free that stack. */ + __vm_deallocate (__mach_task_self (), d->stack_base, d->stack_size); + } + } + + if ((void *) d != argv[0] && (d->portarray || d->intarray)) + /* Initialize library data structures, start signal processing, etc. */ + _hurd_init (d->flags, argv, + d->portarray, d->portarraysize, + d->intarray, d->intarraysize); + +#ifndef SHARED + __libc_enable_secure = d->flags & EXEC_SECURE; +#endif +} + + +static inline void +init (int *data) +{ + int argc = *data; + char **argv = (void *) (data + 1); + char **envp = &argv[argc + 1]; + struct hurd_startup_data *d; + unsigned long int threadvars[_HURD_THREADVAR_MAX]; + + /* Provide temporary storage for thread-specific variables on the + startup stack so the cthreads initialization code can use them + for malloc et al, or so we can use malloc below for the real + threadvars array. */ + memset (threadvars, 0, sizeof threadvars); + __hurd_threadvar_stack_offset = (unsigned long int) threadvars; + + /* Since the cthreads initialization code uses malloc, and the + malloc initialization code needs to get at the environment, make + sure we can find it. We'll need to do this again later on since + switching stacks changes the location where the environment is + stored. */ + __environ = envp; + + while (*envp) + ++envp; + d = (void *) ++envp; + + /* The user might have defined a value for this, to get more variables. + Otherwise it will be zero on startup. We must make sure it is set + properly before before cthreads initialization, so cthreads can know + how much space to leave for thread variables. */ + if (__hurd_threadvar_max < _HURD_THREADVAR_MAX) + __hurd_threadvar_max = _HURD_THREADVAR_MAX; + + + /* After possibly switching stacks, call `init1' (above) with the user + code as the return address, and the argument data immediately above + that on the stack. */ + + if (_cthread_init_routine) + { + /* Initialize cthreads, which will allocate us a new stack to run on. */ + void *newsp = (*_cthread_init_routine) (); + struct hurd_startup_data *od; + + void switch_stacks (void); + + /* Copy per-thread variables from that temporary + area onto the new cthread stack. */ + memcpy (__hurd_threadvar_location_from_sp (0, newsp), + threadvars, sizeof threadvars); + + /* Copy the argdata from the old stack to the new one. */ + newsp = memcpy (newsp - ((char *) &d[1] - (char *) data), data, + (char *) d - (char *) data); + +#ifdef SHARED + /* And readjust the dynamic linker's idea of where the argument + vector lives. */ + assert (_dl_argv == argv); + _dl_argv = (void *) ((int *) newsp + 1); +#endif + + /* Set up the Hurd startup data block immediately following + the argument and environment pointers on the new stack. */ + od = (newsp + ((char *) d - (char *) data)); + if ((void *) argv[0] == d) + /* We were started up by the kernel with arguments on the stack. + There is no Hurd startup data, so zero the block. */ + memset (od, 0, sizeof *od); + else + /* Copy the Hurd startup data block to the new stack. */ + *od = *d; + + /* + Force NEWSP into sp and &init1 into pv, then branch to pv (call init1). + */ + asm volatile ("lda $30,0(%0); lda $27,0(%1); jsr $26,($27)" + : : "r" (newsp), "r" (&init1)); + } + else + { + /* We are not using cthreads, so we will have just a single allocated + area for the per-thread variables of the main user thread. */ + unsigned long int *array; + unsigned int i; + + array = malloc (__hurd_threadvar_max * sizeof (unsigned long int)); + if (array == NULL) + __libc_fatal ("Can't allocate single-threaded thread variables."); + + /* Copy per-thread variables from the temporary array into the + newly malloc'd space. */ + memcpy (array, threadvars, sizeof threadvars); + __hurd_threadvar_stack_offset = (unsigned long int) array; + for (i = _HURD_THREADVAR_MAX; i < __hurd_threadvar_max; ++i) + array[i] = 0; + + init1 (data); + } +} + + +/* Do the first essential initializations that must precede all else. */ +static inline void +first_init (void) +{ + /* Initialize data structures so we can do RPCs. */ + __mach_init (); + + RUN_HOOK (_hurd_preinit_hook, ()); +} + +#ifdef SHARED +/* This function is called specially by the dynamic linker to do early + initialization of the shared C library before normal initializers + expecting a Posixoid environment can run. It gets called with the + stack set up just as the user will see it, so it can switch stacks. */ + +void +_dl_init_first (int argc, ...) +{ + first_init (); + + init (&argc); +} +#endif + + +#ifdef SHARED +/* The regular posixland initialization is what goes into libc's + normal initializer. */ +/* NOTE! The linker notices the magical name `_init' and sets the DT_INIT + pointer in the dynamic section based solely on that. It is convention + for this function to be in the `.init' section, but the symbol name is + the only thing that really matters!! */ +strong_alias (posixland_init, _init); + +void +__libc_init_first (int argc, char **argv, char **envp) +{ + /* Everything was done in the shared library initializer, _init. */ +} +#else +strong_alias (posixland_init, __libc_init_first); + + +void +_hurd_stack_setup (volatile int argc, ...) +{ + first_init (); + + _hurd_startup ((void **) &argc, &init); +} +#endif + + +/* This function is defined here so that if this file ever gets into + ld.so we will get a link error. Having this file silently included + in ld.so causes disaster, because the _init definition above will + cause ld.so to gain an init function, which is not a cool thing. */ + +void +_dl_start (void) +{ + abort (); +} From 3616a53d7d0af9c1606f5bec8adc0bf6d0192850 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 4 Jun 2002 19:02:43 +0000 Subject: [PATCH 2801/4487] 2002-06-04 Roland McGrath * sysdeps/alpha/elf/configure.in: New file. Check for TLS support. * sysdeps/alpha/elf/configure: New file (generated). --- sysdeps/alpha/elf/configure.in | 53 ++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 sysdeps/alpha/elf/configure.in diff --git a/sysdeps/alpha/elf/configure.in b/sysdeps/alpha/elf/configure.in new file mode 100644 index 0000000000..7548046f50 --- /dev/null +++ b/sysdeps/alpha/elf/configure.in @@ -0,0 +1,53 @@ +sinclude(./aclocal.m4)dnl Autoconf lossage +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/alpha/elf. + +if test "$usetls" != no; then +# Check for support of thread-local storage handling in assembler and +# linker. +AC_CACHE_CHECK(for Alpha TLS support, libc_cv_alpha_tls, [dnl +cat > conftest.s <<\EOF + .section ".tdata", "awT", @progbits + .globl foo +foo: .quad 1 + .section ".tbss", "awT", @nobits + .globl bar +bar: .skip 8 + .text +baz: + .set nomacro + ldq $27, __tls_get_addr($29) !literal!1 + ldq $16, a($29) !tlsgd!1 + jsr $26, ($27), __tls_get_addr !lituse_tlsgd!1 + + jsr $26, ($27), __tls_get_addr !lituse_tlsldm!2 + ldq $27, __tls_get_addr($29) !literal!2 + ldq $16, b($29) !tlsldm!2 + + ldq $16, c($29) !tlsgd + ldq $16, d($29) !tlsldm + + ldq $16, e($29) !tlsgd!3 + ldq $16, f($29) !tlsldm!4 + + ldq $16, g($29) !gotdtprel + ldah $16, h($31) !dtprelhi + lda $16, i($16) !dtprello + lda $16, j($31) !dtprel + + ldq $16, k($29) !gottprel + ldah $16, l($31) !tprelhi + lda $16, m($16) !tprello + lda $16, n($31) !tprel +EOF +dnl +if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AC_FD_CC); then + libc_cv_alpha_tls=yes +else + libc_cv_alpha_tls=no +fi +rm -f conftest*]) +if test $libc_cv_alpha_tls = yes; then + AC_DEFINE(HAVE_TLS_SUPPORT) +fi +fi From 5c07e4b79e4d1f8963723bb5f8cec03d47d651c1 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 5 Jun 2002 08:55:48 +0000 Subject: [PATCH 2802/4487] 2002-06-04 Roland McGrath * sysdeps/alpha/elf/configure.in: New file. Check for TLS support. * sysdeps/alpha/elf/configure: New file (generated). --- sysdeps/alpha/elf/configure | 60 +++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 sysdeps/alpha/elf/configure diff --git a/sysdeps/alpha/elf/configure b/sysdeps/alpha/elf/configure new file mode 100644 index 0000000000..3346b8e48d --- /dev/null +++ b/sysdeps/alpha/elf/configure @@ -0,0 +1,60 @@ + # Local configure fragment for sysdeps/alpha/elf. + +if test "$usetls" != no; then +# Check for support of thread-local storage handling in assembler and +# linker. +echo $ac_n "checking for Alpha TLS support""... $ac_c" 1>&6 +echo "configure:8: checking for Alpha TLS support" >&5 +if eval "test \"`echo '$''{'libc_cv_alpha_tls'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.s <<\EOF + .section ".tdata", "awT", @progbits + .globl foo +foo: .quad 1 + .section ".tbss", "awT", @nobits + .globl bar +bar: .skip 8 + .text +baz: + .set nomacro + ldq $27, __tls_get_addr($29) !literal!1 + ldq $16, a($29) !tlsgd!1 + jsr $26, ($27), __tls_get_addr !lituse_tlsgd!1 + + jsr $26, ($27), __tls_get_addr !lituse_tlsldm!2 + ldq $27, __tls_get_addr($29) !literal!2 + ldq $16, b($29) !tlsldm!2 + + ldq $16, c($29) !tlsgd + ldq $16, d($29) !tlsldm + + ldq $16, e($29) !tlsgd!3 + ldq $16, f($29) !tlsldm!4 + + ldq $16, g($29) !gotdtprel + ldah $16, h($31) !dtprelhi + lda $16, i($16) !dtprello + lda $16, j($31) !dtprel + + ldq $16, k($29) !gottprel + ldah $16, l($31) !tprelhi + lda $16, m($16) !tprello + lda $16, n($31) !tprel +EOF +if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:46: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + libc_cv_alpha_tls=yes +else + libc_cv_alpha_tls=no +fi +rm -f conftest* +fi + +echo "$ac_t""$libc_cv_alpha_tls" 1>&6 +if test $libc_cv_alpha_tls = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_TLS_SUPPORT 1 +EOF + +fi +fi From 988c5207b1646a13569f5f0aea601b507a669ac9 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 6 Jun 2002 14:14:17 +0000 Subject: [PATCH 2803/4487] Cris stack information. --- sysdeps/cris/stackinfo.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 sysdeps/cris/stackinfo.h diff --git a/sysdeps/cris/stackinfo.h b/sysdeps/cris/stackinfo.h new file mode 100644 index 0000000000..43c944834f --- /dev/null +++ b/sysdeps/cris/stackinfo.h @@ -0,0 +1,28 @@ +/* Copyright (C) 2002 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. */ + +/* This file contains a bit of information about the stack allocation + of the processor. */ + +#ifndef _STACKINFO_H +#define _STACKINFO_H 1 + +/* On cris the stack grows down. */ +#define _STACK_GROWS_DOWN 1 + +#endif /* stackinfo.h */ From c5f8b1a2620a45643944915f3d66df0f4f6fc232 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 6 Jun 2002 14:16:07 +0000 Subject: [PATCH 2804/4487] (elf_machine_rela): Cast reloc_addr to an integer type before performing bit operations on it. --- sysdeps/hppa/dl-machine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h index b30a3ba62d..18d46e4fc2 100644 --- a/sysdeps/hppa/dl-machine.h +++ b/sysdeps/hppa/dl-machine.h @@ -531,7 +531,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, return; #endif /* .eh_frame can have unaligned relocs. */ - if (reloc_addr & 3) + if ((unsigned long) reloc_addr & 3) { char *rel_addr = (char *) reloc_addr; rel_addr[0] = value >> 24; From 8248bb200e2867eb883b0a0b7f2b255c75864220 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 7 Jun 2002 12:33:51 +0000 Subject: [PATCH 2805/4487] * sysdeps/unix/sysv/linux/alpha/sendfile64.c: New. * sysdeps/unix/sysv/linux/ia64/sendfile64.c: New. * sysdeps/unix/sysv/linux/sparc/sparc64/sendfile64.c: New. * sysdeps/unix/sysv/linux/x86_64/sendfile64.c: New. * sysdeps/unix/sysv/linux/syscalls.list (sendfile): Remove EXTRA. (sendfile64): Likewise. * sysdeps/unix/sysv/linux/alpha/syscalls.list (sendfile): Likewise. * sysdeps/unix/sysv/linux/ia64/syscalls.list (sendfile): Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list (sendfile): Likewise. * sysdeps/unix/sysv/linux/x86_64/syscalls.list (sendfile): Likewise. --- sysdeps/unix/sysv/linux/alpha/sendfile64.c | 1 + sysdeps/unix/sysv/linux/alpha/syscalls.list | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 sysdeps/unix/sysv/linux/alpha/sendfile64.c diff --git a/sysdeps/unix/sysv/linux/alpha/sendfile64.c b/sysdeps/unix/sysv/linux/alpha/sendfile64.c new file mode 100644 index 0000000000..4c451bd093 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/sendfile64.c @@ -0,0 +1 @@ +/* sendfile64 is alias of sendfile syscall. */ diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 28c60bb876..059f753d2b 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -29,7 +29,7 @@ setrlimit - setrlimit 2 __setrlimit setrlimit64 setrlimit ftruncate - ftruncate 2 __ftruncate ftruncate __ftruncate64 ftruncate64 truncate - truncate 2 truncate truncate64 readahead EXTRA readahead 3 __readahead readahead -sendfile EXTRA sendfile i:iipi sendfile sendfile64 +sendfile - sendfile i:iipi sendfile sendfile64 # these are actually common with the x86: sys_ustat ustat ustat 2 __syscall_ustat From 440fb8d5e6d5cd1963eb1d6f6853dfbc2e22a677 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Thu, 13 Jun 2002 07:52:09 +0000 Subject: [PATCH 2806/4487] (INTDEFX): Define to get correct expansion order. --- sysdeps/m68k/fpu/s_isinf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/m68k/fpu/s_isinf.c b/sysdeps/m68k/fpu/s_isinf.c index 98a7c62a91..d87a2317ed 100644 --- a/sysdeps/m68k/fpu/s_isinf.c +++ b/sysdeps/m68k/fpu/s_isinf.c @@ -34,6 +34,7 @@ __CONCATX(__,FUNC) (x) return __m81_u(__CONCATX(__,FUNC))(x); } -INTDEF(__CONCATX(__,FUNC)) +#define INTDEFX(a) INTDEF(a) +INTDEFX(__CONCATX(__,FUNC)) #define weak_aliasx(a,b) weak_alias(a,b) weak_aliasx (__CONCATX(__,FUNC), FUNC) From 4d18187562b4fd728cd86abf35053a74063fcee6 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 13 Jun 2002 08:56:05 +0000 Subject: [PATCH 2807/4487] 2002-06-13 Roland McGrath * hurd/hurdstartup.h (_hurd_startup): int -> intptr_t in MAIN arg type. * hurd/hurdstartup.c (_hurd_startup): Likewise. Use intptr_t instead of int for argc in stack layout. * sysdeps/mach/hurd/alpha/init-first.c (init): Fix argument type. (_dl_init_first): Likewise. (_hurd_stack_setup): Likewise. (init1): Add a cast. --- sysdeps/mach/hurd/alpha/init-first.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/mach/hurd/alpha/init-first.c b/sysdeps/mach/hurd/alpha/init-first.c index bb60cd07d2..e15e2cadef 100644 --- a/sysdeps/mach/hurd/alpha/init-first.c +++ b/sysdeps/mach/hurd/alpha/init-first.c @@ -89,7 +89,7 @@ static void init1 (intptr_t *data) { int argc = (intptr_t) *data; - char **argv = &data[1]; + char **argv = (char **) &data[1]; char **envp = &argv[argc + 1]; struct hurd_startup_data *d; @@ -136,7 +136,7 @@ init1 (intptr_t *data) static inline void -init (int *data) +init (intptr_t *data) { int argc = *data; char **argv = (void *) (data + 1); @@ -255,7 +255,7 @@ first_init (void) stack set up just as the user will see it, so it can switch stacks. */ void -_dl_init_first (int argc, ...) +_dl_init_first (intptr_t argc, ...) { first_init (); @@ -283,7 +283,7 @@ strong_alias (posixland_init, __libc_init_first); void -_hurd_stack_setup (volatile int argc, ...) +_hurd_stack_setup (volatile intptr_t argc, ...) { first_init (); From 0ee46773b963ad3dd2ac6e4b16c17c2f79c30609 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Thu, 13 Jun 2002 12:38:20 +0000 Subject: [PATCH 2808/4487] Remove INTDEF. --- sysdeps/m68k/fpu/s_finite.c | 1 - sysdeps/m68k/fpu/s_finitef.c | 1 - sysdeps/m68k/fpu/s_finitel.c | 1 - 3 files changed, 3 deletions(-) diff --git a/sysdeps/m68k/fpu/s_finite.c b/sysdeps/m68k/fpu/s_finite.c index c9e57187ba..dafbd5901d 100644 --- a/sysdeps/m68k/fpu/s_finite.c +++ b/sysdeps/m68k/fpu/s_finite.c @@ -1,3 +1,2 @@ #define FUNC finite #include -INTDEF(__finite) diff --git a/sysdeps/m68k/fpu/s_finitef.c b/sysdeps/m68k/fpu/s_finitef.c index 921b2f2e31..b81342e5c6 100644 --- a/sysdeps/m68k/fpu/s_finitef.c +++ b/sysdeps/m68k/fpu/s_finitef.c @@ -1,3 +1,2 @@ #define FUNC finitef #include -INTDEF(__finitef) diff --git a/sysdeps/m68k/fpu/s_finitel.c b/sysdeps/m68k/fpu/s_finitel.c index 10a18a1e86..bd346a220c 100644 --- a/sysdeps/m68k/fpu/s_finitel.c +++ b/sysdeps/m68k/fpu/s_finitel.c @@ -1,3 +1,2 @@ #define FUNC finitel #include -INTDEF(__finitel) From dced4334e403f5b4c9b8c03c556df8b51f257c72 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 15 Jun 2002 20:53:37 +0000 Subject: [PATCH 2809/4487] 2002-06-15 Roland McGrath * sysdeps/alpha/divrem.h: Use local label instead of global one for jump to local subroutine. --- sysdeps/alpha/divrem.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/divrem.h b/sysdeps/alpha/divrem.h index 9e0d591111..032308de32 100644 --- a/sysdeps/alpha/divrem.h +++ b/sysdeps/alpha/divrem.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996,97,2002 Free Software Foundation, Inc. Contributed by David Mosberger (davidm@cs.arizona.edu). This file is part of the GNU C Library. @@ -86,6 +86,7 @@ .align 3 UFUNC_NAME: +$udiv_entry: lda sp, -STACK(sp) .frame sp, STACK, retaddr, 0 #ifdef PROF @@ -206,7 +207,7 @@ cmovge AT, AT, arg2 /* Do the unsigned division. */ - bsr retaddr, UFUNC_NAME + bsr retaddr, $udiv_entry /* Restore originals and adjust the sign of the result. */ ldq arg1, 0(sp) From 1b718f413e87a9c3925d56532c144d58e6e04582 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 20 Jun 2002 06:23:14 +0000 Subject: [PATCH 2810/4487] Don't use multi-line string literals. --- sysdeps/hppa/dl-machine.h | 82 +++++++++++++++++++-------------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h index 18d46e4fc2..f70b2b3e5e 100644 --- a/sysdeps/hppa/dl-machine.h +++ b/sysdeps/hppa/dl-machine.h @@ -407,40 +407,40 @@ asm ( \ #define TRAMPOLINE_TEMPLATE(tramp_name, fixup_name) \ extern void tramp_name (void); \ asm ( "\ - /* Trampoline for " #tramp_name " */ - .globl " #tramp_name " - .type " #tramp_name ",@function -" #tramp_name ": - /* Save return pointer */ - stw %r2,-20(%sp) - /* Save argument registers in the call stack frame. */ - stw %r26,-36(%sp) - stw %r25,-40(%sp) - stw %r24,-44(%sp) - stw %r23,-48(%sp) - /* Build a call frame. */ - stwm %sp,64(%sp) - - /* Set up args to fixup func. */ - ldw 8+4(%r20),%r26 /* got[1] == struct link_map * */ - copy %r19,%r25 /* reloc offset */ - - /* Call the real address resolver. */ - bl " #fixup_name ",%r2 - copy %r21,%r19 /* delay slot, set fixup func ltp */ - - ldwm -64(%sp),%sp - /* Arguments. */ - ldw -36(%sp),%r26 - ldw -40(%sp),%r25 - ldw -44(%sp),%r24 - ldw -48(%sp),%r23 - /* Return pointer. */ - ldw -20(%sp),%r2 - /* Call the real function. */ - ldw 0(%r28),%r22 - bv %r0(%r22) - ldw 4(%r28),%r19 + /* Trampoline for " #tramp_name " */ \n\ + .globl " #tramp_name " \n\ + .type " #tramp_name ",@function \n\ +" #tramp_name ": \n\ + /* Save return pointer */ \n\ + stw %r2,-20(%sp) \n\ + /* Save argument registers in the call stack frame. */ \n\ + stw %r26,-36(%sp) \n\ + stw %r25,-40(%sp) \n\ + stw %r24,-44(%sp) \n\ + stw %r23,-48(%sp) \n\ + /* Build a call frame. */ \n\ + stwm %sp,64(%sp) \n\ + \n\ + /* Set up args to fixup func. */ \n\ + ldw 8+4(%r20),%r26 /* got[1] == struct link_map * */ \n\ + copy %r19,%r25 /* reloc offset */ \n\ + \n\ + /* Call the real address resolver. */ \n\ + bl " #fixup_name ",%r2 \n\ + copy %r21,%r19 /* delay slot, set fixup func ltp */ \n\ + \n\ + ldwm -64(%sp),%sp \n\ + /* Arguments. */ \n\ + ldw -36(%sp),%r26 \n\ + ldw -40(%sp),%r25 \n\ + ldw -44(%sp),%r24 \n\ + ldw -48(%sp),%r23 \n\ + /* Return pointer. */ \n\ + ldw -20(%sp),%r2 \n\ + /* Call the real function. */ \n\ + ldw 0(%r28),%r22 \n\ + bv %r0(%r22) \n\ + ldw 4(%r28),%r19 \n\ "); #ifndef PROF @@ -567,13 +567,13 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, probably haven't relocated the necessary values by this point so we have to find them ourselves. */ - asm ("bl 0f,%0 - depi 0,31,2,%0 -0: addil L'__boot_ldso_fptr - ($PIC_pcrel$0 - 8),%0 - ldo R'__boot_ldso_fptr - ($PIC_pcrel$0 - 12)(%%r1),%1 - addil L'__fptr_root - ($PIC_pcrel$0 - 16),%0 - ldo R'__fptr_root - ($PIC_pcrel$0 - 20)(%%r1),%2 - addil L'__fptr_count - ($PIC_pcrel$0 - 24),%0 + asm ("bl 0f,%0 \n\ + depi 0,31,2,%0 \n\ +0: addil L'__boot_ldso_fptr - ($PIC_pcrel$0 - 8),%0 \n\ + ldo R'__boot_ldso_fptr - ($PIC_pcrel$0 - 12)(%%r1),%1 \n\ + addil L'__fptr_root - ($PIC_pcrel$0 - 16),%0 \n\ + ldo R'__fptr_root - ($PIC_pcrel$0 - 20)(%%r1),%2 \n\ + addil L'__fptr_count - ($PIC_pcrel$0 - 24),%0 \n\ ldo R'__fptr_count - ($PIC_pcrel$0 - 28)(%%r1),%3" : "=r" (dot), From ac309f11ea8995cf8323ab81038a72483f3d6af3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 20 Jun 2002 22:43:34 +0000 Subject: [PATCH 2811/4487] (__fork): Remove INTDEF. --- sysdeps/unix/sysv/aix/fork.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sysdeps/unix/sysv/aix/fork.c b/sysdeps/unix/sysv/aix/fork.c index 085342b716..f3b02c9870 100644 --- a/sysdeps/unix/sysv/aix/fork.c +++ b/sysdeps/unix/sysv/aix/fork.c @@ -25,5 +25,4 @@ __fork (void) { return kfork (); } -INTDEF(__fork) strong_alias (__fork, fork) From d7c273360c381c7b0838e8b5a6b4a4a2b543cd38 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sat, 6 Jul 2002 06:36:02 +0000 Subject: [PATCH 2812/4487] * sysdeps/ia64/fpu/e_acos.S: Added text of Intel license. * sysdeps/ia64/fpu/e_acosf.S: Likewise. * sysdeps/ia64/fpu/e_acosl.S: Likewise. * sysdeps/ia64/fpu/e_asin.S: Likewise. * sysdeps/ia64/fpu/e_asinf.S: Likewise. * sysdeps/ia64/fpu/e_asinl.S: Likewise. * sysdeps/ia64/fpu/e_atan2.S: Likewise. * sysdeps/ia64/fpu/e_atan2f.S: Likewise. * sysdeps/ia64/fpu/e_cosh.S: Likewise. * sysdeps/ia64/fpu/e_coshf.S: Likewise. * sysdeps/ia64/fpu/e_coshl.S: Likewise. * sysdeps/ia64/fpu/e_exp.S: Likewise. * sysdeps/ia64/fpu/e_expf.S: Likewise. * sysdeps/ia64/fpu/e_fmod.S: Likewise. * sysdeps/ia64/fpu/e_fmodf.S: Likewise. * sysdeps/ia64/fpu/e_fmodl.S: Likewise. * sysdeps/ia64/fpu/e_hypot.S: Likewise. * sysdeps/ia64/fpu/e_hypotf.S: Likewise. * sysdeps/ia64/fpu/e_hypotl.S: Likewise. * sysdeps/ia64/fpu/e_log.S: Likewise. * sysdeps/ia64/fpu/e_logf.S: Likewise. * sysdeps/ia64/fpu/e_pow.S: Likewise. * sysdeps/ia64/fpu/e_powf.S: Likewise. * sysdeps/ia64/fpu/e_powl.S: Likewise. * sysdeps/ia64/fpu/e_remainder.S: Likewise. * sysdeps/ia64/fpu/e_remainderf.S: Likewise. * sysdeps/ia64/fpu/e_remainderl.S: Likewise. * sysdeps/ia64/fpu/e_scalb.S: Likewise. * sysdeps/ia64/fpu/e_scalbf.S: Likewise. * sysdeps/ia64/fpu/e_scalbl.S: Likewise. * sysdeps/ia64/fpu/e_sinh.S: Likewise. * sysdeps/ia64/fpu/e_sinhf.S: Likewise. * sysdeps/ia64/fpu/e_sinhl.S: Likewise. * sysdeps/ia64/fpu/e_sqrt.S: Likewise. * sysdeps/ia64/fpu/e_sqrtf.S: Likewise. * sysdeps/ia64/fpu/e_sqrtl.S: Likewise. * sysdeps/ia64/fpu/libm_atan2_req.S: Likewise. * sysdeps/ia64/fpu/libm_error.c: Likewise. * sysdeps/ia64/fpu/libm_frexp4.S: Likewise. * sysdeps/ia64/fpu/libm_frexp4f.S: Likewise. * sysdeps/ia64/fpu/s_frexpl.c: Likewise. * sysdeps/ia64/fpu/s_ilogb.S: Likewise. * sysdeps/ia64/fpu/s_ilogbf.S: Likewise. * sysdeps/ia64/fpu/s_ilogbl.S: Likewise. * sysdeps/ia64/fpu/s_ldexp.S: Likewise. * sysdeps/ia64/fpu/s_ldexpf.S: Likewise. * sysdeps/ia64/fpu/s_ldexpl.S: Likewise. * sysdeps/ia64/fpu/s_log1p.S: Likewise. * sysdeps/ia64/fpu/s_log1pf.S: Likewise. * sysdeps/ia64/fpu/s_log1pl.S: Likewise. * sysdeps/ia64/fpu/s_logb.S: Likewise. * sysdeps/ia64/fpu/s_logbf.S: Likewise. * sysdeps/ia64/fpu/s_logbl.S: Likewise. * sysdeps/ia64/fpu/s_modf.S: Likewise. * sysdeps/ia64/fpu/s_modff.S: Likewise. * sysdeps/ia64/fpu/s_modfl.S: Likewise. * sysdeps/ia64/fpu/s_nearbyint.S: Likewise. * sysdeps/ia64/fpu/s_nearbyintf.S: Likewise. * sysdeps/ia64/fpu/s_nearbyintl.S: Likewise. * sysdeps/ia64/fpu/s_rint.S: Likewise. * sysdeps/ia64/fpu/s_rintf.S: Likewise. * sysdeps/ia64/fpu/s_rintl.S: Likewise. * sysdeps/ia64/fpu/s_round.S: Likewise. * sysdeps/ia64/fpu/s_roundf.S: Likewise. * sysdeps/ia64/fpu/s_roundl.S: Likewise. * sysdeps/ia64/fpu/s_scalbn.S: Likewise. * sysdeps/ia64/fpu/s_scalbnf.S: Likewise. * sysdeps/ia64/fpu/s_scalbnl.S: Likewise. * sysdeps/ia64/fpu/s_significand.S: Likewise. * sysdeps/ia64/fpu/s_significandf.S: Likewise. * sysdeps/ia64/fpu/s_significandl.S: Likewise. * sysdeps/ia64/fpu/s_tan.S: Likewise. * sysdeps/ia64/fpu/s_tanf.S: Likewise. * sysdeps/ia64/fpu/s_tanl.S: Likewise. * sysdeps/ia64/fpu/s_trunc.S: Likewise. * sysdeps/ia64/fpu/s_truncf.S: Likewise. * sysdeps/ia64/fpu/s_truncl.S: Likewise. * sysdeps/ieee754/dbl-64/doasin.c: changed copyright notice to reflect IBM donation of math library to FSF * sysdeps/ieee754/dbl-64/dosincos.c: Likewise. * sysdeps/ieee754/dbl-64/e_asin.c: Likewise. * sysdeps/ieee754/dbl-64/e_atan2.c: Likewise. * sysdeps/ieee754/dbl-64/e_exp.c: Likewise. * sysdeps/ieee754/dbl-64/e_log.c: Likewise. * sysdeps/ieee754/dbl-64/e_pow.c: Likewise. * sysdeps/ieee754/dbl-64/e_remainder.c: Likewise. * sysdeps/ieee754/dbl-64/e_sqrt.c: Likewise. * sysdeps/ieee754/dbl-64/halfulp.c: Likewise. * sysdeps/ieee754/dbl-64/mpa.c: Likewise. * sysdeps/ieee754/dbl-64/mpatan.c: Likewise. * sysdeps/ieee754/dbl-64/mpatan2.c: Likewise. * sysdeps/ieee754/dbl-64/mpexp.c: Likewise. * sysdeps/ieee754/dbl-64/mplog.c: Likewise. * sysdeps/ieee754/dbl-64/mpsqrt.c: Likewise. * sysdeps/ieee754/dbl-64/mptan.c: Likewise. * sysdeps/ieee754/dbl-64/s_atan.c: Likewise. * sysdeps/ieee754/dbl-64/s_sin.c: Likewise. * sysdeps/ieee754/dbl-64/s_tan.c: Likewise. * sysdeps/ieee754/dbl-64/sincos32.c: Likewise. * sysdeps/ieee754/dbl-64/slowexp.c: Likewise. * sysdeps/ieee754/dbl-64/slowpow.c: Likewise. * sysdeps/gnu/netinet/udp.h: Added BSD copying permission notice * sysdeps/vax/__longjmp.c: Likewise. * sysdeps/vax/setjmp.c: Likewise. * libio/filedoalloc.c: Fixed BSD copying permission notice to remove advertising clause * sysdeps/vax/htonl.s: Likewise. * sysdeps/vax/htons.s: Likewise. * libio/wfiledoalloc.c: Likewise. * stdlib/random.c: Likewise. * stdlib/random_r.c: Likewise. * sysdeps/mach/sys/reboot.h: Likewise. * inet/getnameinfo.c: Deleted advertising clause from Inner Net License * sysdeps/posix/getaddrinfo.c: Likewise. * sunrpc/des_impl.c: Updated license permission notice to Lesser GPL and corrected pointer to point to the correct license. --- sysdeps/vax/__longjmp.c | 36 +++++++++++++++++++++++++++++++----- sysdeps/vax/htonl.s | 36 ++++++++++++++++++++++++------------ sysdeps/vax/htons.s | 36 ++++++++++++++++++++++++------------ sysdeps/vax/setjmp.c | 34 +++++++++++++++++++++++++++++++--- 4 files changed, 110 insertions(+), 32 deletions(-) diff --git a/sysdeps/vax/__longjmp.c b/sysdeps/vax/__longjmp.c index 0ab593f56a..8ffb8cd4b6 100644 --- a/sysdeps/vax/__longjmp.c +++ b/sysdeps/vax/__longjmp.c @@ -1,9 +1,6 @@ /* Copyright (C) 1991, 1992, 1994, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. - Derived from @(#)_setjmp.s 5.7 (Berkeley) 6/27/88, - Copyright (c) 1980 Regents of the University of California. - 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 @@ -17,7 +14,36 @@ 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. */ + 02111-1307 USA. + + Derived from @(#)_setjmp.s 5.7 (Berkeley) 6/27/88, + Copyright (C) 1980 Regents of the University of California. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 4. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE.*/ #include diff --git a/sysdeps/vax/htonl.s b/sysdeps/vax/htonl.s index ba399865ec..f3e2195c00 100644 --- a/sysdeps/vax/htonl.s +++ b/sysdeps/vax/htonl.s @@ -1,18 +1,30 @@ /* - * Copyright (c) 1983 Regents of the University of California. + * Copyright (C) 1983 Regents of the University of California. * All rights reserved. * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ #if defined(LIBC_SCCS) && !defined(lint) diff --git a/sysdeps/vax/htons.s b/sysdeps/vax/htons.s index 1e781a17c9..5f9ea7384d 100644 --- a/sysdeps/vax/htons.s +++ b/sysdeps/vax/htons.s @@ -1,18 +1,30 @@ /* - * Copyright (c) 1983 Regents of the University of California. + * Copyright (C) 1983 Regents of the University of California. * All rights reserved. * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ #if defined(LIBC_SCCS) && !defined(lint) diff --git a/sysdeps/vax/setjmp.c b/sysdeps/vax/setjmp.c index c57e914890..0e38f3974a 100644 --- a/sysdeps/vax/setjmp.c +++ b/sysdeps/vax/setjmp.c @@ -1,7 +1,5 @@ /* Copyright (C) 1991, 1992, 1994, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. - Derived from @(#)_setjmp.s 5.7 (Berkeley) 6/27/88, - Copyright (c) 1980 Regents of the University of California. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -16,7 +14,37 @@ 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. */ + 02111-1307 USA. + + Derived from @(#)_setjmp.s 5.7 (Berkeley) 6/27/88, + Copyright (C) 1980 Regents of the University of California. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 4. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ #include From 4223e67fa1f398a6a150a7c9e53277ef9b93a39c Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 8 Jul 2002 16:58:14 +0000 Subject: [PATCH 2813/4487] Fix typo. --- sysdeps/unix/sysv/linux/alpha/bits/statvfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/statvfs.h b/sysdeps/unix/sysv/linux/alpha/bits/statvfs.h index 6120cf7a1d..16bb895228 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/statvfs.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/statvfs.h @@ -66,7 +66,7 @@ struct statvfs64 #endif /* Definitions for the flag in `f_flag'. These definitions should be - kept in sync which the definitions in . */ + kept in sync with the definitions in . */ enum { ST_RDONLY = 1, /* Mount read-only. */ From a1950a964a4c42cd275a088b670678ba0fda2b61 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 8 Jul 2002 16:59:14 +0000 Subject: [PATCH 2814/4487] Test for _SYS_UTSNAME_H, not _UTSNAME_H. --- sysdeps/unix/bsd/sun/sunos4/bits/utsname.h | 4 ++-- sysdeps/unix/bsd/ultrix4/bits/utsname.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/bsd/sun/sunos4/bits/utsname.h b/sysdeps/unix/bsd/sun/sunos4/bits/utsname.h index 08848f35ce..a0246c2a36 100644 --- a/sysdeps/unix/bsd/sun/sunos4/bits/utsname.h +++ b/sysdeps/unix/bsd/sun/sunos4/bits/utsname.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997 Free Software Foundation, Inc. +/* Copyright (C) 1997, 2002 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 @@ -16,7 +16,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#ifndef _UTSNAME_H +#ifndef _SYS_UTSNAME_H # error "Never include directly; use instead." #endif diff --git a/sysdeps/unix/bsd/ultrix4/bits/utsname.h b/sysdeps/unix/bsd/ultrix4/bits/utsname.h index 47d46ff859..57820471a2 100644 --- a/sysdeps/unix/bsd/ultrix4/bits/utsname.h +++ b/sysdeps/unix/bsd/ultrix4/bits/utsname.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997 Free Software Foundation, Inc. +/* Copyright (C) 1997, 2002 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 @@ -16,7 +16,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#ifndef _UTSNAME_H +#ifndef _SYS_UTSNAME_H # error "Never include directly; use instead." #endif From 3fb27d8d9a736d42c42f6aaf7a76807c46bf5474 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 9 Jul 2002 06:32:55 +0000 Subject: [PATCH 2815/4487] Linux/MIPS specific file with extra value of SHMLBA. --- sysdeps/unix/sysv/linux/mips/sys/shm.h | 67 ++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/mips/sys/shm.h diff --git a/sysdeps/unix/sysv/linux/mips/sys/shm.h b/sysdeps/unix/sysv/linux/mips/sys/shm.h new file mode 100644 index 0000000000..748c1471c1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/sys/shm.h @@ -0,0 +1,67 @@ +/* Copyright (C) 2002 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 _SYS_SHM_H +#define _SYS_SHM_H 1 + +#include + +#define __need_size_t +#include + +/* Get common definition of System V style IPC. */ +#include + +/* Get system dependent definition of `struct shmid_ds' and more. */ +#include + +/* Define types required by the standard. */ +#define __need_time_t +#include + +#ifdef __USE_XOPEN +# ifndef __pid_t_defined +typedef __pid_t pid_t; +# define __pid_t_defined +# endif +#endif /* X/Open */ + +__BEGIN_DECLS + +/* Segment low boundary address multiple. */ +#define SHMLBA 0x40000 + +/* The following System V style IPC functions implement a shared memory + facility. The definition is found in XPG4.2. */ + +/* Shared memory control operation. */ +extern int shmctl (int __shmid, int __cmd, struct shmid_ds *__buf) __THROW; + +/* Get shared memory segment. */ +extern int shmget (key_t __key, size_t __size, int __shmflg) __THROW; + +/* Attach shared memory segment. */ +extern void *shmat (int __shmid, __const void *__shmaddr, int __shmflg) + __THROW; + +/* Detach shared memory segment. */ +extern int shmdt (__const void *__shmaddr) __THROW; + +__END_DECLS + +#endif /* sys/shm.h */ From 064d652e93e16bb3c4c79030eda1e3b8fe290a66 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 10 Jul 2002 20:22:09 +0000 Subject: [PATCH 2816/4487] Wrong approach. --- sysdeps/unix/sysv/linux/mips/sys/shm.h | 67 -------------------------- 1 file changed, 67 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/mips/sys/shm.h diff --git a/sysdeps/unix/sysv/linux/mips/sys/shm.h b/sysdeps/unix/sysv/linux/mips/sys/shm.h deleted file mode 100644 index 748c1471c1..0000000000 --- a/sysdeps/unix/sysv/linux/mips/sys/shm.h +++ /dev/null @@ -1,67 +0,0 @@ -/* Copyright (C) 2002 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 _SYS_SHM_H -#define _SYS_SHM_H 1 - -#include - -#define __need_size_t -#include - -/* Get common definition of System V style IPC. */ -#include - -/* Get system dependent definition of `struct shmid_ds' and more. */ -#include - -/* Define types required by the standard. */ -#define __need_time_t -#include - -#ifdef __USE_XOPEN -# ifndef __pid_t_defined -typedef __pid_t pid_t; -# define __pid_t_defined -# endif -#endif /* X/Open */ - -__BEGIN_DECLS - -/* Segment low boundary address multiple. */ -#define SHMLBA 0x40000 - -/* The following System V style IPC functions implement a shared memory - facility. The definition is found in XPG4.2. */ - -/* Shared memory control operation. */ -extern int shmctl (int __shmid, int __cmd, struct shmid_ds *__buf) __THROW; - -/* Get shared memory segment. */ -extern int shmget (key_t __key, size_t __size, int __shmflg) __THROW; - -/* Attach shared memory segment. */ -extern void *shmat (int __shmid, __const void *__shmaddr, int __shmflg) - __THROW; - -/* Detach shared memory segment. */ -extern int shmdt (__const void *__shmaddr) __THROW; - -__END_DECLS - -#endif /* sys/shm.h */ From d97abfcbcbc3d3852dbe17a3b0e4e01bc8b81742 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 10 Jul 2002 20:24:32 +0000 Subject: [PATCH 2817/4487] (__NSSBITS): Correct value. --- sysdeps/unix/sysv/sysv4/bits/sigset.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/sysv4/bits/sigset.h b/sysdeps/unix/sysv/sysv4/bits/sigset.h index bf0cae2101..9093c72952 100644 --- a/sysdeps/unix/sysv/sysv4/bits/sigset.h +++ b/sysdeps/unix/sysv/sysv4/bits/sigset.h @@ -1,5 +1,5 @@ /* __sig_atomic_t, __sigset_t, and related definitions. SVR4 version. - Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc. + Copyright (C) 1994-1996, 2002 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 @@ -44,7 +44,7 @@ typedef struct /* It's easier to assume 8-bit bytes than to get CHAR_BIT. */ -#define __NSSBITS (sizeof (__sigset_t) * 8) +#define __NSSBITS (sizeof (unsigned long int) * 8) #define __SSELT(s) ((s) / __NSSBITS) #define __SSMASK(s) (1 << ((s) % __NSSBITS)) From d6749b4a6151914f156d759e303467f61b99ef1c Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 12 Jul 2002 23:25:56 +0000 Subject: [PATCH 2818/4487] * sysdeps/unix/sysv/linux/mips/register-dump.h (register_dump): Use correct indices. Patch by Eliot Dresselhaus . --- sysdeps/unix/sysv/linux/mips/register-dump.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/register-dump.h b/sysdeps/unix/sysv/linux/mips/register-dump.h index f5fb34472f..f5bd3a2735 100644 --- a/sysdeps/unix/sysv/linux/mips/register-dump.h +++ b/sysdeps/unix/sysv/linux/mips/register-dump.h @@ -1,5 +1,5 @@ /* Dump registers. - Copyright (C) 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger , 2000. @@ -43,8 +43,8 @@ hexvalue (unsigned long int value, char *buf, size_t len) static void register_dump (int fd, struct sigcontext *ctx) { - char regs[32][8]; - struct iovec iov[38]; + char regs[38][8]; + struct iovec iov[38 * 2 + 10]; size_t nr = 0; int i; @@ -58,7 +58,7 @@ register_dump (int fd, struct sigcontext *ctx) ++nr /* Generate strings of register contents. */ - for (i = 0; i < 31; i++) + for (i = 0; i < 32; i++) hexvalue (ctx->sc_regs[i], regs[i], 8); hexvalue (ctx->sc_pc, regs[32], 8); hexvalue (ctx->sc_cause, regs[33], 8); From 2aac58fcdf41e5ba15720e7bfd0511e8841dd194 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 15 Jul 2002 02:07:00 +0000 Subject: [PATCH 2819/4487] (elf_machine_rel): Don't handle R_ARM_RELATIVE if RTLD_BOOTSTRAP and HAVE_Z_COMBRELOC. Only check for rtld map if neither RTLD_BOOTSTRAP nor HAVE_Z_COMBRELOC is defined. (elf_machine_rela): Remove unused variable. --- sysdeps/arm/dl-machine.h | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 4a7ab3867c..aeee1d7892 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -422,10 +422,20 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, { const unsigned int r_type = ELF32_R_TYPE (reloc->r_info); +#if !defined RTLD_BOOTSTRAP || !defined HAVE_Z_COMBRELOC if (__builtin_expect (r_type == R_ARM_RELATIVE, 0)) { -# ifndef RTLD_BOOTSTRAP - if (map != &_dl_rtld_map) /* Already done in rtld itself. */ +# if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC + /* This is defined in rtld.c, but nowhere in the static libc.a; + make the reference weak so static programs can still link. + This declaration cannot be done when compiling rtld.c + (i.e. #ifdef RTLD_BOOTSTRAP) because rtld.c contains the + common defn for _dl_rtld_map, which is incompatible with a + weak decl in the same file. */ +# ifndef SHARED + weak_extern (_dl_rtld_map); +# endif + if (map != &GL(dl_rtld_map)) /* Already done in rtld itself. */ # endif *reloc_addr += map->l_addr; } @@ -434,6 +444,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, return; # endif else +#endif { const Elf32_Sym *const refsym = sym; Elf32_Addr value = RESOLVE (&sym, version, r_type); @@ -483,7 +494,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, # ifndef SHARED weak_extern (_dl_rtld_map); # endif - if (map == &_dl_rtld_map) + if (map == &GL(dl_rtld_map)) /* Undo the relocation done here during bootstrapping. Now we will relocate it anew, possibly using a binding found in the user program or a loaded library @@ -541,7 +552,6 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, return; else { - const Elf32_Sym *const refsym = sym; Elf32_Addr value = RESOLVE (&sym, version, r_type); if (sym) value += sym->st_value; From 8310ff42255ede207cab08f04ef76c5d214d9546 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 15 Jul 2002 02:07:17 +0000 Subject: [PATCH 2820/4487] [subdir=elf] (sysdep-rtld-routines, sysdep_routines, sysdep-dl-routines): Don't define. --- sysdeps/unix/sysv/linux/arm/Makefile | 8 -------- 1 file changed, 8 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile index aeaaa39fce..6040b20193 100644 --- a/sysdeps/unix/sysv/linux/arm/Makefile +++ b/sysdeps/unix/sysv/linux/arm/Makefile @@ -12,11 +12,3 @@ endif ifeq ($(subdir),resource) sysdep_routines += oldgetrlimit64 endif - -ifeq ($(subdir),elf) -# extra shared linker files to link into dl-allobjs.so and libc -sysdep-dl-routines += dl-procinfo -sysdep_routines += dl-procinfo -# extra shared linker files to link only into dl-allobjs.so -sysdep-rtld-routines += dl-procinfo -endif From 94c91a35d6b2eaa6313be5876ddf91c91ade6b51 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 15 Jul 2002 02:08:46 +0000 Subject: [PATCH 2821/4487] (FIRST_FRAME_POINTER): Define. --- sysdeps/arm/frame.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysdeps/arm/frame.h b/sysdeps/arm/frame.h index 2a3f29709f..deb46c0135 100644 --- a/sysdeps/arm/frame.h +++ b/sysdeps/arm/frame.h @@ -1,5 +1,5 @@ /* Definition of stack frame structure. ARM/APCS version. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright (C) 2000, 2002 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 @@ -24,3 +24,5 @@ struct layout void *__unbounded sp; void *__unbounded return_address; }; + +#define FIRST_FRAME_POINTER ADVANCE_STACK_FRAME (__builtin_frame_address (0)) From 176b5726d77f172215090df8fe6b1137d63971fa Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 16 Jul 2002 00:58:07 +0000 Subject: [PATCH 2822/4487] Don't include . Always use ll/sc. --- sysdeps/mips/atomicity.h | 45 ++++++-------------------- sysdeps/unix/sysv/linux/mips/sys/tas.h | 17 ++-------- 2 files changed, 12 insertions(+), 50 deletions(-) diff --git a/sysdeps/mips/atomicity.h b/sysdeps/mips/atomicity.h index b4b7b64dd0..bccacd9c90 100644 --- a/sysdeps/mips/atomicity.h +++ b/sysdeps/mips/atomicity.h @@ -20,11 +20,8 @@ #ifndef _MIPS_ATOMICITY_H #define _MIPS_ATOMICITY_H 1 -#include #include -#if (_MIPS_ISA >= _MIPS_ISA_MIPS2) - static inline int __attribute__ ((unused)) exchange_and_add (volatile uint32_t *mem, int val) @@ -34,9 +31,12 @@ exchange_and_add (volatile uint32_t *mem, int val) __asm__ __volatile__ ("/* Inline exchange & add */\n" "1:\n\t" + ".set push\n\t" + ".set mips2\n\t" "ll %0,%3\n\t" "addu %1,%4,%0\n\t" "sc %1,%2\n\t" + ".set pop\n\t" "beqz %1,1b\n\t" "/* End exchange & add */" : "=&r"(result), "=&r"(tmp), "=m"(*mem) @@ -55,9 +55,12 @@ atomic_add (volatile uint32_t *mem, int val) __asm__ __volatile__ ("/* Inline atomic add */\n" "1:\n\t" + ".set push\n\t" + ".set mips2\n\t" "ll %0,%2\n\t" "addu %0,%3,%0\n\t" "sc %0,%1\n\t" + ".set pop\n\t" "beqz %0,1b\n\t" "/* End atomic add */" : "=&r"(result), "=m"(*mem) @@ -74,11 +77,14 @@ compare_and_swap (volatile long int *p, long int oldval, long int newval) __asm__ __volatile__ ("/* Inline compare & swap */\n" "1:\n\t" + ".set push\n\t" + ".set mips2\n\t" "ll %1,%5\n\t" "move %0,$0\n\t" "bne %1,%3,2f\n\t" "move %0,%4\n\t" "sc %0,%2\n\t" + ".set pop\n\t" "beqz %0,1b\n" "2:\n\t" "/* End compare & swap */" @@ -89,37 +95,4 @@ compare_and_swap (volatile long int *p, long int oldval, long int newval) return ret; } -#else /* (_MIPS_ISA >= _MIPS_ISA_MIPS2) */ - -#warning MIPS I atomicity functions are not atomic - -static inline int -__attribute__ ((unused)) -exchange_and_add (volatile uint32_t *mem, int val) -{ - int result = *mem; - *mem += val; - return result; -} - -static inline void -__attribute__ ((unused)) -atomic_add (volatile uint32_t *mem, int val) -{ - *mem += val; -} - -static inline int -__attribute__ ((unused)) -compare_and_swap (volatile long int *p, long int oldval, long int newval) -{ - if (*p != oldval) - return 0; - - *p = newval; - return 1; -} - -#endif /* !(_MIPS_ISA >= _MIPS_ISA_MIPS2) */ - #endif /* atomicity.h */ diff --git a/sysdeps/unix/sysv/linux/mips/sys/tas.h b/sysdeps/unix/sysv/linux/mips/sys/tas.h index 2a1a04546e..7ad916c3c9 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/tas.h +++ b/sysdeps/unix/sysv/linux/mips/sys/tas.h @@ -21,8 +21,6 @@ #define _SYS_TAS_H 1 #include -#include -#include __BEGIN_DECLS @@ -34,8 +32,6 @@ extern int _test_and_set (int *p, int v) __THROW; # define _EXTERN_INLINE extern __inline # endif -# if (_MIPS_ISA >= _MIPS_ISA_MIPS2) - _EXTERN_INLINE int _test_and_set (int *p, int v) __THROW { @@ -44,10 +40,13 @@ _test_and_set (int *p, int v) __THROW __asm__ __volatile__ ("/* Inline test and set */\n" "1:\n\t" + ".set push\n\t" + ".set mips2\n\t" "ll %0,%3\n\t" "move %1,%4\n\t" "beq %0,%4,2f\n\t" "sc %1,%2\n\t" + ".set pop\n\t" "beqz %1,1b\n" "2:\n\t" "/* End test and set */" @@ -58,16 +57,6 @@ _test_and_set (int *p, int v) __THROW return r; } -# else /* !(_MIPS_ISA >= _MIPS_ISA_MIPS2) */ - -_EXTERN_INLINE int -_test_and_set (int *p, int v) __THROW -{ - return sysmips (MIPS_ATOMIC_SET, (int) p, v, 0); -} - -# endif /* !(_MIPS_ISA >= _MIPS_ISA_MIPS2) */ - #endif /* __USE_EXTERN_INLINES */ __END_DECLS From d7fafc1a39a9fe939ab108c47396cce866de812f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 17 Jul 2002 20:42:56 +0000 Subject: [PATCH 2823/4487] Sign extend offset. --- sysdeps/unix/sysv/linux/mips/pread.c | 6 ++++-- sysdeps/unix/sysv/linux/mips/pwrite.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/pread.c b/sysdeps/unix/sysv/linux/mips/pread.c index b1c1c0d871..45305d2ccc 100644 --- a/sysdeps/unix/sysv/linux/mips/pread.c +++ b/sysdeps/unix/sysv/linux/mips/pread.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2000, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -17,6 +17,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include #include #include #include @@ -48,8 +49,9 @@ __libc_pread (fd, buf, count, offset) ssize_t result; /* First try the syscall. */ + assert (sizeof (offset) == 4); result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, - __LONG_LONG_PAIR (0, offset)); + __LONG_LONG_PAIR (offset >> 31, offset)); # if __ASSUME_PREAD_SYSCALL == 0 if (result == -1 && errno == ENOSYS) /* No system call available. Use the emulation. */ diff --git a/sysdeps/unix/sysv/linux/mips/pwrite.c b/sysdeps/unix/sysv/linux/mips/pwrite.c index 40b2c8b23c..44f9d30ebf 100644 --- a/sysdeps/unix/sysv/linux/mips/pwrite.c +++ b/sysdeps/unix/sysv/linux/mips/pwrite.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2000, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -17,6 +17,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include #include #include #include @@ -47,8 +48,9 @@ __libc_pwrite (fd, buf, count, offset) ssize_t result; /* First try the syscall. */ + assert (sizeof (offset) == 4); result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0, - __LONG_LONG_PAIR (0, offset)); + __LONG_LONG_PAIR (offset >> 31, offset)); # if __ASSUME_PWRITE_SYSCALL == 0 if (result == -1 && errno == ENOSYS) /* No system call available. Use the emulation. */ From 841f536f46309c732e5ab8d644c85a826a77f90b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 20 Jul 2002 01:02:01 +0000 Subject: [PATCH 2824/4487] Remove __set_errno definition. --- sysdeps/standalone/arm/bits/errno.h | 1 - sysdeps/standalone/bits/errno.h | 2 -- sysdeps/unix/sysv/aix/bits/errno.h | 4 ---- sysdeps/unix/sysv/hpux/bits/errno.h | 2 -- sysdeps/unix/sysv/linux/hppa/bits/errno.h | 8 -------- sysdeps/unix/sysv/linux/mips/bits/errno.h | 8 -------- sysdeps/unix/sysv/sysv4/solaris2/bits/errno.h | 2 -- 7 files changed, 27 deletions(-) diff --git a/sysdeps/standalone/arm/bits/errno.h b/sysdeps/standalone/arm/bits/errno.h index 2700c17338..d7db91db89 100644 --- a/sysdeps/standalone/arm/bits/errno.h +++ b/sysdeps/standalone/arm/bits/errno.h @@ -60,7 +60,6 @@ # define EOVERFLOW 32 #endif -#define __set_errno(val) errno = (val) /* Function to get address of global `errno' variable. */ extern int *__errno_location __P ((void)) __attribute__ ((__const__)); diff --git a/sysdeps/standalone/bits/errno.h b/sysdeps/standalone/bits/errno.h index c7d3755a15..217c6d5d82 100644 --- a/sysdeps/standalone/bits/errno.h +++ b/sysdeps/standalone/bits/errno.h @@ -57,5 +57,3 @@ # define ENOSPC 31 # define EBUSY 32 #endif - -#define __set_errno(val) errno = (val) diff --git a/sysdeps/unix/sysv/aix/bits/errno.h b/sysdeps/unix/sysv/aix/bits/errno.h index f2cdba8d64..9f22a965e1 100644 --- a/sysdeps/unix/sysv/aix/bits/errno.h +++ b/sysdeps/unix/sysv/aix/bits/errno.h @@ -144,10 +144,6 @@ # define EMULTIHOP 125 /* Multihop is not allowed. */ # define ENOLINK 126 /* The link has been severed. */ # define EOVERFLOW 127 /* Value too large to be stored in data type.*/ - -# ifdef _LIBC -# define __set_errno(val) errno = (val) -# endif #endif #if !defined _ERRNO_H && defined __need_Emath diff --git a/sysdeps/unix/sysv/hpux/bits/errno.h b/sysdeps/unix/sysv/hpux/bits/errno.h index acae4848f8..c9903c6dfe 100644 --- a/sysdeps/unix/sysv/hpux/bits/errno.h +++ b/sysdeps/unix/sysv/hpux/bits/errno.h @@ -32,5 +32,3 @@ #define ENOMSG 35 #define ENOSYS 251 #endif - -#define __set_errno(val) errno = (val) diff --git a/sysdeps/unix/sysv/linux/hppa/bits/errno.h b/sysdeps/unix/sysv/linux/hppa/bits/errno.h index 8b1fa44e98..4d75ff1f61 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/errno.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/errno.h @@ -29,17 +29,9 @@ # define ECANCELED 125 # ifndef __ASSEMBLER__ -/* We now need a declaration of the `errno' variable. */ -extern int errno; - /* Function to get address of global `errno' variable. */ extern int *__errno_location (void) __THROW __attribute__ ((__const__)); -# if defined _LIBC -/* We wouldn't need a special macro anymore but it is history. */ -# define __set_errno(val) (*__errno_location ()) = (val) -# endif /* _LIBC */ - # if !defined _LIBC || defined _LIBC_REENTRANT /* When using threads, errno is a per-thread value. */ # define errno (*__errno_location ()) diff --git a/sysdeps/unix/sysv/linux/mips/bits/errno.h b/sysdeps/unix/sysv/linux/mips/bits/errno.h index 29ba9807a5..8220c2e513 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/errno.h +++ b/sysdeps/unix/sysv/linux/mips/bits/errno.h @@ -28,17 +28,9 @@ # define ENOTSUP EOPNOTSUPP # ifndef __ASSEMBLER__ -/* We now need a declaration of the `errno' variable. */ -extern int errno; - /* Function to get address of global `errno' variable. */ extern int *__errno_location (void) __THROW __attribute__ ((__const__)); -# if defined _LIBC -/* We wouldn't need a special macro anymore but it is history. */ -# define __set_errno(val) (*__errno_location ()) = (val) -# endif /* _LIBC */ - # if !defined _LIBC || defined _LIBC_REENTRANT /* When using threads, errno is a per-thread value. */ # define errno (*__errno_location ()) diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/errno.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/errno.h index 8d5d49e42b..6c0de92151 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/bits/errno.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/errno.h @@ -166,5 +166,3 @@ # define ESTALE 151 /* Stale NFS file handle. */ #endif - -#define __set_errno(val) errno = (val) From b24fa78c3b52bd9414e4025fb01e33a1eae9f172 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 24 Jul 2002 11:17:01 +0000 Subject: [PATCH 2825/4487] Remove extra weak alias definiton of _old_sys_nerr. Define _old_sys_errlist as strong alias. --- sysdeps/unix/sysv/linux/arm/errlist.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/errlist.c b/sysdeps/unix/sysv/linux/arm/errlist.c index ba5e699eed..ba8c44b88c 100644 --- a/sysdeps/unix/sysv/linux/arm/errlist.c +++ b/sysdeps/unix/sysv/linux/arm/errlist.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2000, 2002 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 @@ -38,10 +38,9 @@ extern const char *const *__old_sys_errlist; const int __old_sys_nerr = OLD_ERRLIST_SIZE; strong_alias (__old_sys_nerr, _old_sys_nerr); -weak_alias (__old_sys_nerr, _old_sys_nerr) compat_symbol (libc, __old_sys_nerr, _sys_nerr, GLIBC_2_0); compat_symbol (libc, _old_sys_nerr, sys_nerr, GLIBC_2_0); -weak_alias (__old_sys_errlist, _old_sys_errlist); +strong_alias (__old_sys_errlist, _old_sys_errlist); compat_symbol (libc, __old_sys_errlist, _sys_errlist, GLIBC_2_0); compat_symbol (libc, _old_sys_errlist, sys_errlist, GLIBC_2_0); #endif From 541ee341982f94660a1b6e2e1edd4b3a7bc694c2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 24 Jul 2002 17:36:14 +0000 Subject: [PATCH 2826/4487] Improve schedule. --- sysdeps/unix/arm/brk.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/arm/brk.S b/sysdeps/unix/arm/brk.S index c68fec6266..9e20dc6932 100644 --- a/sysdeps/unix/arm/brk.S +++ b/sysdeps/unix/arm/brk.S @@ -35,8 +35,8 @@ C_LABEL(__curbrk) SYSCALL__ (brk, 1) #ifdef PIC ldr r1, 1f - add r1, r1, pc -2: ldr r2, _cb_addr + ldr r2, _cb_addr +2: add r1, pc, r1 add r1, r1, r2 #else ldr r1, _cb_addr @@ -45,7 +45,7 @@ SYSCALL__ (brk, 1) mov r0, $0 RETINSTR(mov, pc, r14) #ifdef PIC -1: .long _GLOBAL_OFFSET_TABLE_ - 2b - 4 +1: .long _GLOBAL_OFFSET_TABLE_ - 2b - 8 _cb_addr: .long C_SYMBOL_NAME(__curbrk)(GOTOFF) #else From 31db6c4d741c7ea5ea447c8a890994368021345e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 24 Jul 2002 17:36:44 +0000 Subject: [PATCH 2827/4487] (PUSHARGS_1): Use more efficient instruction. (__socket): Optimize return sequence. --- sysdeps/unix/sysv/linux/arm/socket.S | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/socket.S b/sysdeps/unix/sysv/linux/arm/socket.S index a672413d12..2672de7b2c 100644 --- a/sysdeps/unix/sysv/linux/arm/socket.S +++ b/sysdeps/unix/sysv/linux/arm/socket.S @@ -35,7 +35,7 @@ #define __socket P(__,socket) #endif -#define PUSHARGS_1 stmfd sp!, {a1} +#define PUSHARGS_1 str a1, [sp, $-4]! #define PUSHARGS_2 stmfd sp!, {a1, a2} #define PUSHARGS_3 stmfd sp!, {a1, a2, a3} #define PUSHARGS_4 stmfd sp!, {a1, a2, a3, a4} @@ -78,10 +78,8 @@ ENTRY (__socket) /* r0 is < 0 if there was an error. */ cmn r0, $124 - bhs PLTJMP(syscall_error) - - /* Successful; return the syscall's value. */ - ret + RETINSTR(movcc, pc, r14) + b PLTJMP(syscall_error) PSEUDO_END (__socket) From 4def79b563ca76070db7e4da055fe64d6516f1d5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 27 Jul 2002 08:40:18 +0000 Subject: [PATCH 2828/4487] (__adjtimex_internal): Add alias. --- sysdeps/unix/sysv/linux/alpha/adjtime.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/adjtime.c b/sysdeps/unix/sysv/linux/alpha/adjtime.c index d613ff0ff1..2bed884ae4 100644 --- a/sysdeps/unix/sysv/linux/alpha/adjtime.c +++ b/sysdeps/unix/sysv/linux/alpha/adjtime.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2000, 2002 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 @@ -189,6 +189,7 @@ __adjtimex_tv64 (struct timex *tx) return ret; } +strong_alias (__adjtimex_tv64, __adjtimex_internal); strong_alias (__adjtimex_tv64, __adjtimex_tv64p); versioned_symbol (libc, __adjtimex_tv64, __adjtimex, GLIBC_2_1); versioned_symbol (libc, __adjtimex_tv64p, adjtimex, GLIBC_2_1); From d8c656cee5b17bd57ef52e8b99813c16330193d5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 3 Aug 2002 06:30:45 +0000 Subject: [PATCH 2829/4487] (__stpncpy): Add libc_hidden_def. --- sysdeps/alpha/alphaev67/stpncpy.S | 3 ++- sysdeps/alpha/stpncpy.S | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/alphaev67/stpncpy.S b/sysdeps/alpha/alphaev67/stpncpy.S index 4b23731b8a..4d61d71317 100644 --- a/sysdeps/alpha/alphaev67/stpncpy.S +++ b/sysdeps/alpha/alphaev67/stpncpy.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002 Free Software Foundation, Inc. Contributed by Richard Henderson (rth@redhat.com) This file is part of the GNU C Library. @@ -112,4 +112,5 @@ $zerocount: END(__stpncpy) +libc_hidden_def (__stpncpy) weak_alias (__stpncpy, stpncpy) diff --git a/sysdeps/alpha/stpncpy.S b/sysdeps/alpha/stpncpy.S index 0a32356fa5..e877cf176a 100644 --- a/sysdeps/alpha/stpncpy.S +++ b/sysdeps/alpha/stpncpy.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. +/* Copyright (C) 1996, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@tamu.edu) @@ -103,4 +103,5 @@ $zerocount: END(__stpncpy) +libc_hidden_def (__stpncpy) weak_alias (__stpncpy, stpncpy) From b8daff95ddb57a306e28b6d27d8dabb2ce970c24 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 3 Aug 2002 06:41:33 +0000 Subject: [PATCH 2830/4487] (__rawmemchr): Add libc_hidden_def. --- sysdeps/alpha/alphaev67/rawmemchr.S | 3 ++- sysdeps/alpha/rawmemchr.S | 3 ++- sysdeps/m68k/rawmemchr.S | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sysdeps/alpha/alphaev67/rawmemchr.S b/sysdeps/alpha/alphaev67/rawmemchr.S index 0d60afe023..8c7e9423b0 100644 --- a/sysdeps/alpha/alphaev67/rawmemchr.S +++ b/sysdeps/alpha/alphaev67/rawmemchr.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002 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 @@ -89,4 +89,5 @@ $found: END(__rawmemchr) +libc_hidden_def (__rawmemchr) weak_alias (__rawmemchr, rawmemchr) diff --git a/sysdeps/alpha/rawmemchr.S b/sysdeps/alpha/rawmemchr.S index 521feafdac..d3a69fa63c 100644 --- a/sysdeps/alpha/rawmemchr.S +++ b/sysdeps/alpha/rawmemchr.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002 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 @@ -86,4 +86,5 @@ $found: END(__rawmemchr) +libc_hidden_def (__rawmemchr) weak_alias (__rawmemchr, rawmemchr) diff --git a/sysdeps/m68k/rawmemchr.S b/sysdeps/m68k/rawmemchr.S index f52b74b8cd..acd8f76e44 100644 --- a/sysdeps/m68k/rawmemchr.S +++ b/sysdeps/m68k/rawmemchr.S @@ -1,6 +1,6 @@ /* rawmemchr (str, ch) -- Return pointer to first occurrence of CH in STR. For Motorola 68000. - Copyright (C) 1999 Free Software Foundation, Inc. + Copyright (C) 1999, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab . @@ -176,4 +176,5 @@ L(L9:) rts END(__rawmemchr) +libc_hidden_def (__rawmemchr) weak_alias (__rawmemchr, rawmemchr) From da5f5f79867173aa46c6626fe990e26bf4991fef Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 3 Aug 2002 06:57:53 +0000 Subject: [PATCH 2831/4487] Add libc_hidden_def. Remove undef and INTDEF. --- sysdeps/standalone/close.c | 5 ++--- sysdeps/standalone/open.c | 3 ++- sysdeps/standalone/read.c | 5 +++-- sysdeps/standalone/write.c | 4 +++- sysdeps/unix/bsd/m68k/pipe.S | 3 ++- sysdeps/unix/bsd/osf/alpha/pipe.S | 3 ++- sysdeps/unix/bsd/vax/pipe.S | 3 ++- sysdeps/unix/mips/pipe.S | 3 ++- sysdeps/unix/sysv/aix/chown.c | 4 +--- sysdeps/unix/sysv/aix/close.c | 3 ++- sysdeps/unix/sysv/aix/fcntl.c | 5 ++--- sysdeps/unix/sysv/aix/getpgid.c | 4 +--- sysdeps/unix/sysv/aix/getpid.c | 3 +++ sysdeps/unix/sysv/aix/open.c | 6 ++---- sysdeps/unix/sysv/aix/pipe.c | 3 ++- sysdeps/unix/sysv/aix/poll.c | 3 ++- sysdeps/unix/sysv/aix/read.c | 4 +++- sysdeps/unix/sysv/aix/sbrk.c | 3 ++- sysdeps/unix/sysv/aix/select.c | 3 ++- sysdeps/unix/sysv/aix/setpgid.c | 3 ++- sysdeps/unix/sysv/aix/sigaction.c | 3 ++- sysdeps/unix/sysv/aix/sigsuspend.c | 3 ++- sysdeps/unix/sysv/aix/statfs.c | 3 ++- sysdeps/unix/sysv/aix/write.c | 6 ++---- sysdeps/unix/sysv/linux/alpha/pipe.S | 3 ++- sysdeps/unix/sysv/linux/alpha/select.S | 4 +++- sysdeps/unix/sysv/linux/alpha/sigsuspend.S | 3 ++- sysdeps/unix/sysv/linux/arm/sigaction.c | 3 ++- sysdeps/unix/sysv/linux/m68k/chown.c | 2 +- sysdeps/unix/sysv/linux/m68k/getpagesize.c | 5 +---- sysdeps/unix/sysv/linux/mips/pwrite64.c | 3 ++- sysdeps/unix/sysv/linux/mips/sigaction.c | 3 ++- sysdeps/unix/sysv/sco3.2.4/__setpgid.c | 3 ++- sysdeps/unix/sysv/sco3.2.4/sigaction.S | 3 ++- sysdeps/unix/sysv/sysv4/__getpgid.c | 4 +--- sysdeps/unix/sysv/sysv4/__setpgid.c | 3 ++- sysdeps/unix/sysv/sysv4/getpgid.c | 5 +---- sysdeps/unix/sysv/sysv4/setpgid.c | 4 ++-- sysdeps/unix/sysv/sysv4/sigaction.c | 4 ++-- 39 files changed, 77 insertions(+), 63 deletions(-) diff --git a/sysdeps/standalone/close.c b/sysdeps/standalone/close.c index b0fa5f0c8b..8c2caf1975 100644 --- a/sysdeps/standalone/close.c +++ b/sysdeps/standalone/close.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995, 1996, 1997, 2002 Free Software Foundation, Inc. Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil, On-Line Applications Research Corporation. This file is part of the GNU C Library. @@ -39,6 +39,5 @@ __close (fd) __FD_Table[ fd ].in_use = 0; return 0; } - - +libc_hidden_def (__close) weak_alias (__close, close) diff --git a/sysdeps/standalone/open.c b/sysdeps/standalone/open.c index 2be04f4b26..e0a3432415 100644 --- a/sysdeps/standalone/open.c +++ b/sysdeps/standalone/open.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995, 1996, 1997, 2002 Free Software Foundation, Inc. Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil, On-Line Applications Research Corporation. This file is part of the GNU C Library. @@ -82,6 +82,7 @@ __open (file, oflag) return newfd; } +libc_hidden_def (__open) /* Initialization Code for Console I/O */ diff --git a/sysdeps/standalone/read.c b/sysdeps/standalone/read.c index 2daee870d0..0fb9e7a1ec 100644 --- a/sysdeps/standalone/read.c +++ b/sysdeps/standalone/read.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995, 1996, 1997, 2002 Free Software Foundation, Inc. Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil, On-Line Applications Research Corporation. This file is part of the GNU C Library. @@ -80,6 +80,7 @@ __libc_read (int fd, void *buf, size_t nbytes) *buffer = data; return 1; } - +libc_hidden_def (__libc_read) weak_alias (__libc_read, __read) +libc_hidden_weak (__read) weak_alias (__libc_read, read) diff --git a/sysdeps/standalone/write.c b/sysdeps/standalone/write.c index a5fe44ea26..5d3823065f 100644 --- a/sysdeps/standalone/write.c +++ b/sysdeps/standalone/write.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995, 1996, 1997, 2002 Free Software Foundation, Inc. Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil, On-Line Applications Research Corporation. This file is part of the GNU C Library. @@ -67,5 +67,7 @@ __libc_write (int fd, const void *buf, size_t nbytes) return count; } +libc_hidden_def (__libc_write) weak_alias (__libc_write, __write) +libc_hidden_weak (__write) weak_alias (__libc_write, write) diff --git a/sysdeps/unix/bsd/m68k/pipe.S b/sysdeps/unix/bsd/m68k/pipe.S index 93db95e149..d7b8ec28d5 100644 --- a/sysdeps/unix/bsd/m68k/pipe.S +++ b/sysdeps/unix/bsd/m68k/pipe.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1993, 1995, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991,1992,1993,1995,1997,2002 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 @@ -29,4 +29,5 @@ SYSCALL__ (pipe, 1) clrl d0 rts +libc_hidden_def (__pipe) weak_alias (__pipe, pipe) diff --git a/sysdeps/unix/bsd/osf/alpha/pipe.S b/sysdeps/unix/bsd/osf/alpha/pipe.S index 0916ff4e74..b4eb2166e0 100644 --- a/sysdeps/unix/bsd/osf/alpha/pipe.S +++ b/sysdeps/unix/bsd/osf/alpha/pipe.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1997, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -29,4 +29,5 @@ SYSCALL__ (pipe, 1) ret .end __pipe +libc_hidden_def (__pipe) weak_alias (__pipe, pipe) diff --git a/sysdeps/unix/bsd/vax/pipe.S b/sysdeps/unix/bsd/vax/pipe.S index 691cf3c390..3ed784264c 100644 --- a/sysdeps/unix/bsd/vax/pipe.S +++ b/sysdeps/unix/bsd/vax/pipe.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1995, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1995, 1997, 2002 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,4 +25,5 @@ SYSCALL__ (pipe, 1) clrl r0 ret +libc_hidden_def (__pipe) weak_alias (__pipe, pipe) diff --git a/sysdeps/unix/mips/pipe.S b/sysdeps/unix/mips/pipe.S index a2f4ec7ead..1aebb9b81b 100644 --- a/sysdeps/unix/mips/pipe.S +++ b/sysdeps/unix/mips/pipe.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1995, 1997, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995, 1997, 2000, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -29,4 +29,5 @@ SYSCALL__ (pipe, 1) j ra .end __pipe +libc_hidden_def (__pipe) weak_alias (__pipe, pipe) diff --git a/sysdeps/unix/sysv/aix/chown.c b/sysdeps/unix/sysv/aix/chown.c index 037b14b276..2b6e82e739 100644 --- a/sysdeps/unix/sysv/aix/chown.c +++ b/sysdeps/unix/sysv/aix/chown.c @@ -18,11 +18,9 @@ #include -#undef __chown - int __chown (const char *file, uid_t owner, gid_t group) { return chown (file, owner, group); } -INTDEF(__chown) +libc_hidden_def (__chown) diff --git a/sysdeps/unix/sysv/aix/close.c b/sysdeps/unix/sysv/aix/close.c index f1b9a01eb8..7be595643f 100644 --- a/sysdeps/unix/sysv/aix/close.c +++ b/sysdeps/unix/sysv/aix/close.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2002 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,3 +23,4 @@ __close (int fd) { return close (fd); } +libc_hidden_def (__close) diff --git a/sysdeps/unix/sysv/aix/fcntl.c b/sysdeps/unix/sysv/aix/fcntl.c index f9bb42a766..7f16cbe013 100644 --- a/sysdeps/unix/sysv/aix/fcntl.c +++ b/sysdeps/unix/sysv/aix/fcntl.c @@ -19,9 +19,6 @@ #include #include -#undef __libc_fcntl -#undef __fcntl - extern int kfcntl (int fdes, int cmd, unsigned long int arg); int @@ -40,5 +37,7 @@ __fcntl (int fdes, int cmd, ...) return res; } +libc_hidden_def (__fcntl) strong_alias (__fcntl, fcntl) strong_alias (__fcntl, __libc_fcntl) +libc_hidden_def (__libc_fcntl) diff --git a/sysdeps/unix/sysv/aix/getpgid.c b/sysdeps/unix/sysv/aix/getpgid.c index 889e3e1cac..a6e75f3f9c 100644 --- a/sysdeps/unix/sysv/aix/getpgid.c +++ b/sysdeps/unix/sysv/aix/getpgid.c @@ -18,8 +18,6 @@ #include -#undef __getpgid - extern int kgetpgidx (pid_t pid); int @@ -27,5 +25,5 @@ __getgpid (pid_t pid) { return kgetpgidx (pid); } -INTDEF(__getgpid) +libc_hidden_def (__getgpid) strong_alias (__getpgid, getpgid) diff --git a/sysdeps/unix/sysv/aix/getpid.c b/sysdeps/unix/sysv/aix/getpid.c index 67ef7eaf79..8a74e22da7 100644 --- a/sysdeps/unix/sysv/aix/getpid.c +++ b/sysdeps/unix/sysv/aix/getpid.c @@ -1,6 +1,9 @@ /* This is a system call. We only have to provide the wrapper. */ +#include + int __getpid (void) { return getpid (); } +libc_hidden_def (__getpid) diff --git a/sysdeps/unix/sysv/aix/open.c b/sysdeps/unix/sysv/aix/open.c index c41c708564..2b42f8e81b 100644 --- a/sysdeps/unix/sysv/aix/open.c +++ b/sysdeps/unix/sysv/aix/open.c @@ -20,9 +20,6 @@ #include #include -#undef __libc_open -#undef __open - int __open (const char *file, int oflag, ...) { @@ -38,5 +35,6 @@ __open (const char *file, int oflag, ...) return open (file, oflag, mode); } +libc_hidden_def (__open) strong_alias (__open, __libc_open) -INTDEF(__open) +libc_hidden_def (__libc_open) diff --git a/sysdeps/unix/sysv/aix/pipe.c b/sysdeps/unix/sysv/aix/pipe.c index 385e0be4cb..4a3ba1c041 100644 --- a/sysdeps/unix/sysv/aix/pipe.c +++ b/sysdeps/unix/sysv/aix/pipe.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2002 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 @@ -24,3 +24,4 @@ __pipe (pipedes) { return pipe (pipedes); } +libc_hidden_def (__pipe) diff --git a/sysdeps/unix/sysv/aix/poll.c b/sysdeps/unix/sysv/aix/poll.c index 890dcd0dbc..5ce5409914 100644 --- a/sysdeps/unix/sysv/aix/poll.c +++ b/sysdeps/unix/sysv/aix/poll.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2001, 2002 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 @@ -26,3 +26,4 @@ __poll (fds, nfds, timeout) { return poll (fds, nfds, timeout); } +libc_hidden_def (__poll) diff --git a/sysdeps/unix/sysv/aix/read.c b/sysdeps/unix/sysv/aix/read.c index 50b59a3af7..ca0edb30d5 100644 --- a/sysdeps/unix/sysv/aix/read.c +++ b/sysdeps/unix/sysv/aix/read.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2002 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,5 +25,7 @@ __libc_read (int fd, void *buf, size_t len) { return kread (fd, buf, len); } +libc_hidden_def (__libc_read) strong_alias (__libc_read, __read) +libc_hidden_def (__read) strong_alias (__libc_read, read) diff --git a/sysdeps/unix/sysv/aix/sbrk.c b/sysdeps/unix/sysv/aix/sbrk.c index af56c4b1e8..0a590ee8c6 100644 --- a/sysdeps/unix/sysv/aix/sbrk.c +++ b/sysdeps/unix/sysv/aix/sbrk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2002 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,3 +23,4 @@ __sbrk (intptr_t delta) { return sbrk (delta); } +libc_hidden_def (__sbrk) diff --git a/sysdeps/unix/sysv/aix/select.c b/sysdeps/unix/sysv/aix/select.c index e5c48dcde9..9bf5bae47c 100644 --- a/sysdeps/unix/sysv/aix/select.c +++ b/sysdeps/unix/sysv/aix/select.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2002 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,3 +28,4 @@ __select (nfds, readfds, writefds, exceptfds, timeout) { return select (nfds, readfds, writefds, exceptfds, timeout); } +libc_hidden_def (__select) diff --git a/sysdeps/unix/sysv/aix/setpgid.c b/sysdeps/unix/sysv/aix/setpgid.c index 5150929aaf..b076f28ed6 100644 --- a/sysdeps/unix/sysv/aix/setpgid.c +++ b/sysdeps/unix/sysv/aix/setpgid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2002 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,3 +25,4 @@ __setpgid (pid, pgid) { return setpgid (pid, pgid); } +libc_hidden_def (__setpgid) diff --git a/sysdeps/unix/sysv/aix/sigaction.c b/sysdeps/unix/sysv/aix/sigaction.c index 272c271db8..6b48a505c0 100644 --- a/sysdeps/unix/sysv/aix/sigaction.c +++ b/sysdeps/unix/sysv/aix/sigaction.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1995, 1996, 1997, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1991,1995,1996,1997,2000,2002 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 @@ -32,4 +32,5 @@ __sigaction (sig, act, oact) { return _sigaction (sig, act, oact); } +libc_hidden_def (__sigaction) strong_alias (__sigaction, sigaction) diff --git a/sysdeps/unix/sysv/aix/sigsuspend.c b/sysdeps/unix/sysv/aix/sigsuspend.c index afca6b793e..c9120d6e97 100644 --- a/sysdeps/unix/sysv/aix/sigsuspend.c +++ b/sysdeps/unix/sysv/aix/sigsuspend.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1995-1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1995-1998, 2000, 2002 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 @@ -29,4 +29,5 @@ __sigsuspend (set) { return _sigsuspend (set); } +libc_hidden_def (__sigsuspend) weak_alias (__sigsuspend, sigsuspend) diff --git a/sysdeps/unix/sysv/aix/statfs.c b/sysdeps/unix/sysv/aix/statfs.c index f44a1c6a27..1ead597da6 100644 --- a/sysdeps/unix/sysv/aix/statfs.c +++ b/sysdeps/unix/sysv/aix/statfs.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2002 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,3 +25,4 @@ __statfs (const char *file, struct statfs *buf) { return statfs (file, buf); } +libc_hidden_def (__statfs) diff --git a/sysdeps/unix/sysv/aix/write.c b/sysdeps/unix/sysv/aix/write.c index 5a1ac101e4..0cc5d33aca 100644 --- a/sysdeps/unix/sysv/aix/write.c +++ b/sysdeps/unix/sysv/aix/write.c @@ -21,9 +21,6 @@ #include "kernel_proto.h" -#undef __libc_write -#undef __write - ssize_t __write (fd, ptr, n) int fd; @@ -32,7 +29,8 @@ __write (fd, ptr, n) { return kwrite (fd, ptr, n); } -INTDEF(__write) +libc_hidden_def (__write) /* AIX has no weak aliases (yet) but let's hope for better times. */ weak_alias (__write, write) strong_alias (__write, __libc_write) +libc_hidden_def (__libc_write) diff --git a/sysdeps/unix/sysv/linux/alpha/pipe.S b/sysdeps/unix/sysv/linux/alpha/pipe.S index 5d2905a8dc..2da4d78abd 100644 --- a/sysdeps/unix/sysv/linux/alpha/pipe.S +++ b/sysdeps/unix/sysv/linux/alpha/pipe.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1997, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger (davidm@cs.arizona.edu). @@ -28,4 +28,5 @@ PSEUDO (__pipe, pipe, 0) ret PSEUDO_END(__pipe) +libc_hidden_def (__pipe) weak_alias (__pipe, pipe) diff --git a/sysdeps/unix/sysv/linux/alpha/select.S b/sysdeps/unix/sysv/linux/alpha/select.S index 40c0f9fb40..57030aaa4e 100644 --- a/sysdeps/unix/sysv/linux/alpha/select.S +++ b/sysdeps/unix/sysv/linux/alpha/select.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2002 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 @@ -124,6 +124,8 @@ default_symbol_version (__select_tv64, __select, GLIBC_2.1) The 'p' is for 'public'. *Shrug* */ strong_alias (__select_tv64, __select_tv64p) default_symbol_version (__select_tv64p, select, GLIBC_2.1) +libc_hidden_ver (__select_tv64, __select) #else weak_alias (__select, select) +libc_hidden_def (__select) #endif diff --git a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S index 7aa851e9ea..d6a17851ca 100644 --- a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S +++ b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1996, 1997, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger , 1995. @@ -51,4 +51,5 @@ error: END(__sigsuspend) +libc_hidden_def (__sigsuspend) weak_alias(__sigsuspend, sigsuspend) diff --git a/sysdeps/unix/sysv/linux/arm/sigaction.c b/sysdeps/unix/sysv/linux/arm/sigaction.c index f39665f3c4..a137ce7ad1 100644 --- a/sysdeps/unix/sysv/linux/arm/sigaction.c +++ b/sysdeps/unix/sysv/linux/arm/sigaction.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999, 2000, 2002 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 @@ -150,4 +150,5 @@ __libc_sigaction (sig, act, oact) } weak_alias (__libc_sigaction, __sigaction) +libc_hidden_weak (__sigaction) weak_alias (__libc_sigaction, sigaction) diff --git a/sysdeps/unix/sysv/linux/m68k/chown.c b/sysdeps/unix/sysv/linux/m68k/chown.c index f8f4b5c0af..ad0386d1d9 100644 --- a/sysdeps/unix/sysv/linux/m68k/chown.c +++ b/sysdeps/unix/sysv/linux/m68k/chown.c @@ -71,5 +71,5 @@ __chown (const char *file, uid_t owner, gid_t group) return INLINE_SYSCALL (chown, 3, CHECK_STRING (file), owner, group); #endif } -INTDEF(__chown) +libc_hidden_def (__chown) weak_alias (__chown, chown) diff --git a/sysdeps/unix/sysv/linux/m68k/getpagesize.c b/sysdeps/unix/sysv/linux/m68k/getpagesize.c index 026a8943bf..6645e2b472 100644 --- a/sysdeps/unix/sysv/linux/m68k/getpagesize.c +++ b/sysdeps/unix/sysv/linux/m68k/getpagesize.c @@ -25,8 +25,6 @@ #include #include -#undef __getpagesize - /* Return the system page size. */ int __getpagesize () @@ -47,6 +45,5 @@ __getpagesize () return 4096; } - -INTDEF(__getpagesize) +libc_hidden_def (__getpagesize) weak_alias (__getpagesize, getpagesize) diff --git a/sysdeps/unix/sysv/linux/mips/pwrite64.c b/sysdeps/unix/sysv/linux/mips/pwrite64.c index a655d6e795..4f7299ed47 100644 --- a/sysdeps/unix/sysv/linux/mips/pwrite64.c +++ b/sysdeps/unix/sysv/linux/mips/pwrite64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2000, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ralf Baechle , 1998. @@ -60,6 +60,7 @@ __libc_pwrite64 (fd, buf, count, offset) } weak_alias (__libc_pwrite64, __pwrite64) +libc_hidden_weak (__pwrite64) weak_alias (__libc_pwrite64, pwrite64) # define __libc_pwrite64(fd, buf, count, offset) \ diff --git a/sysdeps/unix/sysv/linux/mips/sigaction.c b/sysdeps/unix/sysv/linux/mips/sigaction.c index fb32b50888..17f678c08b 100644 --- a/sysdeps/unix/sysv/linux/mips/sigaction.c +++ b/sysdeps/unix/sysv/linux/mips/sigaction.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999, 2000, 2002 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 @@ -136,4 +136,5 @@ __libc_sigaction (sig, act, oact) } weak_alias (__libc_sigaction, __sigaction) +libc_hidden_weak (__sigaction) weak_alias (__libc_sigaction, sigaction) diff --git a/sysdeps/unix/sysv/sco3.2.4/__setpgid.c b/sysdeps/unix/sysv/sco3.2.4/__setpgid.c index 2064e67cc9..e58f22e7a9 100644 --- a/sysdeps/unix/sysv/sco3.2.4/__setpgid.c +++ b/sysdeps/unix/sysv/sco3.2.4/__setpgid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1997, 2002 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 @@ -30,3 +30,4 @@ __setpgid (pid, pgid) { return __pgrpsys (2, pid, pgid); } +libc_hidden_def (__setpgid) diff --git a/sysdeps/unix/sysv/sco3.2.4/sigaction.S b/sysdeps/unix/sysv/sco3.2.4/sigaction.S index 05f33338a8..ae50c17d93 100644 --- a/sysdeps/unix/sysv/sco3.2.4/sigaction.S +++ b/sysdeps/unix/sysv/sco3.2.4/sigaction.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1994, 1995, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1994, 1995, 1997, 2002 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 @@ -26,4 +26,5 @@ ENTRY (__sigaction) jb syscall_error ret +libc_hidden_def (__sigaction) weak_alias (__sigaction, sigaction) diff --git a/sysdeps/unix/sysv/sysv4/__getpgid.c b/sysdeps/unix/sysv/sysv4/__getpgid.c index 9313434011..ea9a23876c 100644 --- a/sysdeps/unix/sysv/sysv4/__getpgid.c +++ b/sysdeps/unix/sysv/sysv4/__getpgid.c @@ -21,8 +21,6 @@ #include #include -#undef __getpgid - extern int __pgrpsys __P ((int type, ...)); /* Get the process group ID of process PID. */ @@ -32,4 +30,4 @@ __getpgid (pid) { return __pgrpsys (4, pid); } -INTDEF(__getpgid) +libc_hidden_def (__getpgid) diff --git a/sysdeps/unix/sysv/sysv4/__setpgid.c b/sysdeps/unix/sysv/sysv4/__setpgid.c index b497d7e26b..ac096a4516 100644 --- a/sysdeps/unix/sysv/sysv4/__setpgid.c +++ b/sysdeps/unix/sysv/sysv4/__setpgid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1997, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -31,3 +31,4 @@ __setpgid (pid, pgid) { return __pgrpsys (5, pid, pgid); } +libc_hidden_def (__setpgid) diff --git a/sysdeps/unix/sysv/sysv4/getpgid.c b/sysdeps/unix/sysv/sysv4/getpgid.c index 5ec9e2c1c2..39fb728d1b 100644 --- a/sysdeps/unix/sysv/sysv4/getpgid.c +++ b/sysdeps/unix/sysv/sysv4/getpgid.c @@ -19,8 +19,6 @@ #include #include -#undef __getpgid - extern pid_t __pgrpsys __P ((int type, ...)); /* Get the process group ID of process PID. */ @@ -30,6 +28,5 @@ __getpgid (pid) { return __pgrpsys (4, pid); } - -INTDEF(__getpgid) +libc_hidden_def (__getpgid) weak_alias (__getpgid, getpgid) diff --git a/sysdeps/unix/sysv/sysv4/setpgid.c b/sysdeps/unix/sysv/sysv4/setpgid.c index 27f4967e40..1ffb182d4a 100644 --- a/sysdeps/unix/sysv/sysv4/setpgid.c +++ b/sysdeps/unix/sysv/sysv4/setpgid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1996, 1997, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1993,1995,1996,1997,1999,2002 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 @@ -30,5 +30,5 @@ __setpgid (pid, pgid) { return __pgrpsys (5, pid, pgid); } - +libc_hidden_def (__setpgid) weak_alias (__setpgid, setpgid) diff --git a/sysdeps/unix/sysv/sysv4/sigaction.c b/sysdeps/unix/sysv/sysv4/sigaction.c index de0f5afc16..d5926b3d42 100644 --- a/sysdeps/unix/sysv/sysv4/sigaction.c +++ b/sysdeps/unix/sysv/sysv4/sigaction.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1994,1995,1996,1997,2002 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 @@ -76,5 +76,5 @@ __sigaction (sig, act, oact) return 0; } - +libc_hidden_def (__sigaction) weak_alias (__sigaction, sigaction) From 78413eec88754f46de273656df8fdd4c1eeeb8cc Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 3 Aug 2002 06:58:54 +0000 Subject: [PATCH 2832/4487] Add __GI_ aliases. --- sysdeps/unix/sysv/irix4/syscalls.list | 4 ++-- sysdeps/unix/sysv/linux/alpha/syscalls.list | 6 +++--- sysdeps/unix/sysv/linux/hppa/syscalls.list | 2 +- sysdeps/unix/sysv/linux/mips/syscalls.list | 2 +- sysdeps/unix/sysv/sysv4/solaris2/syscalls.list | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sysdeps/unix/sysv/irix4/syscalls.list b/sysdeps/unix/sysv/irix4/syscalls.list index a57529e9ad..eb22a848b2 100644 --- a/sysdeps/unix/sysv/irix4/syscalls.list +++ b/sysdeps/unix/sysv/irix4/syscalls.list @@ -1,8 +1,8 @@ # File name Caller Syscall name # args Strong name Weak names -getpgid - bsdgetpgrp 1 __getpgid getpgid +getpgid - bsdgetpgrp 1 __getpgid getpgid __GI___getpgid msync - msync 3 msync -setpgid - bsdsetpgrp 2 __setpgid setpgid +setpgid - bsdsetpgrp 2 __setpgid setpgid __GI___setpgid signal - signal 3 __raw_signal sysmp - sysmp 4 __sysmp syssgi - syssgi 2 __syssgi diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 059f753d2b..7187f44a03 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -21,9 +21,9 @@ getpriority - getpriority 2 __getpriority getpriority mmap - mmap 6 __mmap mmap __mmap64 mmap64 llseek EXTRA lseek 3 __libc_lseek64 __llseek llseek __lseek64 lseek64 pread - pread 4 __libc_pread __libc_pread64 __pread pread __pread64 pread64 -pwrite - pwrite 4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64 +pwrite - pwrite 4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64 __GI___pwrite64 fstatfs - fstatfs 2 __fstatfs fstatfs __fstatfs64 fstatfs64 -statfs - statfs 2 __statfs statfs statfs64 +statfs - statfs 2 __statfs statfs statfs64 __GI___statfs getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64 setrlimit - setrlimit 2 __setrlimit setrlimit64 setrlimit ftruncate - ftruncate 2 __ftruncate ftruncate __ftruncate64 ftruncate64 @@ -47,7 +47,7 @@ recv - recv 4 __libc_recv __recv recv recvfrom - recvfrom 6 __libc_recvfrom __recvfrom recvfrom recvmsg - recvmsg 3 __libc_recvmsg __recvmsg recvmsg ptrace - ptrace 4 __ptrace ptrace -send - send 4 __libc_send __send send +send - send 4 __libc_send __send send __GI___send sendmsg - sendmsg 3 __libc_sendmsg __sendmsg sendmsg sendto - sendto 6 __libc_sendto __sendto sendto setsockopt - setsockopt 5 __setsockopt setsockopt diff --git a/sysdeps/unix/sysv/linux/hppa/syscalls.list b/sysdeps/unix/sysv/linux/hppa/syscalls.list index 1c7a20d241..0065ff0e29 100644 --- a/sysdeps/unix/sysv/linux/hppa/syscalls.list +++ b/sysdeps/unix/sysv/linux/hppa/syscalls.list @@ -24,7 +24,7 @@ listen - listen i:ii __listen listen recv - recv i:ibni __libc_recv __recv recv recvfrom - recvfrom i:ibniBN __libc_recvfrom __recvfrom recvfrom recvmsg - recvmsg i:ipi __libc_recvmsg __recvmsg recvmsg -send - send i:ibni __libc_send __send send +send - send i:ibni __libc_send __send send __GI___send sendmsg - sendmsg i:ipi __libc_sendmsg __sendmsg sendmsg sendto - sendto i:ibnibn __libc_sendto __sendto sendto setsockopt - setsockopt i:iiibn __setsockopt setsockopt diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index f7d2e291a5..1df662d620 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -24,7 +24,7 @@ listen - listen i:ii __listen listen recv - recv i:ibni __libc_recv __recv recv recvfrom - recvfrom i:ibniBN __libc_recvfrom __recvfrom recvfrom recvmsg - recvmsg i:ipi __libc_recvmsg __recvmsg recvmsg -send - send i:ibni __libc_send __send send +send - send i:ibni __libc_send __send send __GI___send sendmsg - sendmsg i:ipi __libc_sendmsg __sendmsg sendmsg sendto - sendto i:ibnibn __libc_sendto __sendto sendto setsockopt - setsockopt i:iiibn __setsockopt setsockopt diff --git a/sysdeps/unix/sysv/sysv4/solaris2/syscalls.list b/sysdeps/unix/sysv/sysv4/solaris2/syscalls.list index 092d869efc..fb08465b37 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/syscalls.list +++ b/sysdeps/unix/sysv/sysv4/solaris2/syscalls.list @@ -1,6 +1,6 @@ # File name Caller Syscall name # args Strong name Weak names -sigaction - sigaction 3 __sigaction sigaction +sigaction - sigaction 3 __sigaction sigaction __GI___sigaction sigaltstack - sigaltstack 2 sigaltstack sigpending - sigpending 2 __syscall_sigpending sigqueue - sigqueue 3 __sigqueue sigqueue From 9f0c7fbd18f34931a802a6ba9cdae42001771afe Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 3 Aug 2002 19:44:44 +0000 Subject: [PATCH 2833/4487] Remove all __GI_* aliases. --- sysdeps/unix/sysv/irix4/syscalls.list | 4 ++-- sysdeps/unix/sysv/linux/alpha/syscalls.list | 6 +++--- sysdeps/unix/sysv/linux/hppa/syscalls.list | 2 +- sysdeps/unix/sysv/linux/mips/syscalls.list | 2 +- sysdeps/unix/sysv/sysv4/solaris2/syscalls.list | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sysdeps/unix/sysv/irix4/syscalls.list b/sysdeps/unix/sysv/irix4/syscalls.list index eb22a848b2..a57529e9ad 100644 --- a/sysdeps/unix/sysv/irix4/syscalls.list +++ b/sysdeps/unix/sysv/irix4/syscalls.list @@ -1,8 +1,8 @@ # File name Caller Syscall name # args Strong name Weak names -getpgid - bsdgetpgrp 1 __getpgid getpgid __GI___getpgid +getpgid - bsdgetpgrp 1 __getpgid getpgid msync - msync 3 msync -setpgid - bsdsetpgrp 2 __setpgid setpgid __GI___setpgid +setpgid - bsdsetpgrp 2 __setpgid setpgid signal - signal 3 __raw_signal sysmp - sysmp 4 __sysmp syssgi - syssgi 2 __syssgi diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 7187f44a03..059f753d2b 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -21,9 +21,9 @@ getpriority - getpriority 2 __getpriority getpriority mmap - mmap 6 __mmap mmap __mmap64 mmap64 llseek EXTRA lseek 3 __libc_lseek64 __llseek llseek __lseek64 lseek64 pread - pread 4 __libc_pread __libc_pread64 __pread pread __pread64 pread64 -pwrite - pwrite 4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64 __GI___pwrite64 +pwrite - pwrite 4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64 fstatfs - fstatfs 2 __fstatfs fstatfs __fstatfs64 fstatfs64 -statfs - statfs 2 __statfs statfs statfs64 __GI___statfs +statfs - statfs 2 __statfs statfs statfs64 getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64 setrlimit - setrlimit 2 __setrlimit setrlimit64 setrlimit ftruncate - ftruncate 2 __ftruncate ftruncate __ftruncate64 ftruncate64 @@ -47,7 +47,7 @@ recv - recv 4 __libc_recv __recv recv recvfrom - recvfrom 6 __libc_recvfrom __recvfrom recvfrom recvmsg - recvmsg 3 __libc_recvmsg __recvmsg recvmsg ptrace - ptrace 4 __ptrace ptrace -send - send 4 __libc_send __send send __GI___send +send - send 4 __libc_send __send send sendmsg - sendmsg 3 __libc_sendmsg __sendmsg sendmsg sendto - sendto 6 __libc_sendto __sendto sendto setsockopt - setsockopt 5 __setsockopt setsockopt diff --git a/sysdeps/unix/sysv/linux/hppa/syscalls.list b/sysdeps/unix/sysv/linux/hppa/syscalls.list index 0065ff0e29..1c7a20d241 100644 --- a/sysdeps/unix/sysv/linux/hppa/syscalls.list +++ b/sysdeps/unix/sysv/linux/hppa/syscalls.list @@ -24,7 +24,7 @@ listen - listen i:ii __listen listen recv - recv i:ibni __libc_recv __recv recv recvfrom - recvfrom i:ibniBN __libc_recvfrom __recvfrom recvfrom recvmsg - recvmsg i:ipi __libc_recvmsg __recvmsg recvmsg -send - send i:ibni __libc_send __send send __GI___send +send - send i:ibni __libc_send __send send sendmsg - sendmsg i:ipi __libc_sendmsg __sendmsg sendmsg sendto - sendto i:ibnibn __libc_sendto __sendto sendto setsockopt - setsockopt i:iiibn __setsockopt setsockopt diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index 1df662d620..f7d2e291a5 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -24,7 +24,7 @@ listen - listen i:ii __listen listen recv - recv i:ibni __libc_recv __recv recv recvfrom - recvfrom i:ibniBN __libc_recvfrom __recvfrom recvfrom recvmsg - recvmsg i:ipi __libc_recvmsg __recvmsg recvmsg -send - send i:ibni __libc_send __send send __GI___send +send - send i:ibni __libc_send __send send sendmsg - sendmsg i:ipi __libc_sendmsg __sendmsg sendmsg sendto - sendto i:ibnibn __libc_sendto __sendto sendto setsockopt - setsockopt i:iiibn __setsockopt setsockopt diff --git a/sysdeps/unix/sysv/sysv4/solaris2/syscalls.list b/sysdeps/unix/sysv/sysv4/solaris2/syscalls.list index fb08465b37..092d869efc 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/syscalls.list +++ b/sysdeps/unix/sysv/sysv4/solaris2/syscalls.list @@ -1,6 +1,6 @@ # File name Caller Syscall name # args Strong name Weak names -sigaction - sigaction 3 __sigaction sigaction __GI___sigaction +sigaction - sigaction 3 __sigaction sigaction sigaltstack - sigaltstack 2 sigaltstack sigpending - sigpending 2 __syscall_sigpending sigqueue - sigqueue 3 __sigqueue sigqueue From 6af07791756ba2e015d659e268b4a8ff848209c4 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 3 Aug 2002 22:26:02 +0000 Subject: [PATCH 2834/4487] 2002-08-03 Roland McGrath * include/signal.h: Use libc_hidden_proto for raise, sigemptyset, sigfillset, sigismember, __sigpause, __libc_current_sigrtmin, and __libc_current_sigrtmax. * signal/sigismem.c: Add libc_hidden_def. * signal/sigfillset.c: Likewise. * signal/sigempty.c: Likewise. * sysdeps/generic/sigpause.c (__sigpause): Likewise. * sysdeps/posix/sigpause.c (__sigpause): Likewise. * sysdeps/unix/bsd/osf/alpha/sigpause.S: Likewise. --- sysdeps/unix/bsd/osf/alpha/sigpause.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/bsd/osf/alpha/sigpause.S b/sysdeps/unix/bsd/osf/alpha/sigpause.S index 021e6036e2..7646366473 100644 --- a/sysdeps/unix/bsd/osf/alpha/sigpause.S +++ b/sysdeps/unix/bsd/osf/alpha/sigpause.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993,95,97,2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -25,5 +25,6 @@ SYSCALL__ (sigpause, 1) ret .end __sigpause +libc_hidden_def (__sigpause) weak_alias (__sigpause, sigpause) From e5d48d74e6e0ef2dd71fdb5b72b2eb58f90698aa Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 4 Aug 2002 01:22:10 +0000 Subject: [PATCH 2835/4487] (__stpcpy): Add libc_hidden_def. --- sysdeps/alpha/alphaev67/stpcpy.S | 3 ++- sysdeps/alpha/stpcpy.S | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/alphaev67/stpcpy.S b/sysdeps/alpha/alphaev67/stpcpy.S index bb9da0c73d..d09babc8f5 100644 --- a/sysdeps/alpha/alphaev67/stpcpy.S +++ b/sysdeps/alpha/alphaev67/stpcpy.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson . @@ -50,3 +50,4 @@ ENTRY(__stpcpy) END(__stpcpy) weak_alias (__stpcpy, stpcpy) +libc_hidden_def (__stpcpy) diff --git a/sysdeps/alpha/stpcpy.S b/sysdeps/alpha/stpcpy.S index 1ed74421e8..a37a308bb3 100644 --- a/sysdeps/alpha/stpcpy.S +++ b/sysdeps/alpha/stpcpy.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. +/* Copyright (C) 1996, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1996. @@ -52,3 +52,4 @@ ENTRY(__stpcpy) END(__stpcpy) weak_alias (__stpcpy, stpcpy) +libc_hidden_def (__stpcpy) From 237b9f1c7bb44c02712745c02b8b982be442311e Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 4 Aug 2002 01:28:09 +0000 Subject: [PATCH 2836/4487] 2002-08-03 Roland McGrath * sysdeps/unix/sysv/linux/x86_64/clone.S (thread_start): Use HIDDEN_JUMPTARGET for _exit. * sysdeps/unix/sysv/linux/m68k/clone.S (thread_start): Likewise. * sysdeps/unix/sysv/linux/i386/clone.S (thread_start): Likewise. * sysdeps/unix/sysv/linux/powerpc/clone.S: Likewise. * sysdeps/unix/_exit.S (_exit): Add libc_hidden_def. --- sysdeps/unix/sysv/linux/m68k/clone.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/m68k/clone.S b/sysdeps/unix/sysv/linux/m68k/clone.S index 9ca789d4a4..e19172a8f7 100644 --- a/sysdeps/unix/sysv/linux/m68k/clone.S +++ b/sysdeps/unix/sysv/linux/m68k/clone.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1996,97,98,2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab (schwab@issan.informatik.uni-dortmund.de) @@ -58,7 +58,7 @@ thread_start: subl %fp, %fp /* terminate the stack frame */ jsr (%a0) movel %d0, -(%sp) - jbsr JUMPTARGET (_exit) + jbsr HIDDEN_JUMPTARGET (_exit) PSEUDO_END (__clone) From e38327be06ba8d2a726a2e1f3a73ad3dc94e0df0 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 4 Aug 2002 03:50:10 +0000 Subject: [PATCH 2837/4487] 2002-08-03 Roland McGrath * include/sys/resource.h: Use libc_hidden_proto for getpriority, setpriority. * sysdeps/unix/sysv/linux/getpriority.c: Add libc_hidden_def. * sysdeps/unix/sysv/irix4/getpriority.c: Likewise. * sysdeps/mach/hurd/setpriority.c: Likewise. * sysdeps/mach/hurd/getpriority.c: Likewise. * sysdeps/generic/setpriority.c: Likewise. * sysdeps/generic/getpriority.c: Likewise. --- sysdeps/unix/sysv/irix4/getpriority.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/irix4/getpriority.c b/sysdeps/unix/sysv/irix4/getpriority.c index 9fc2be963e..baf945e54c 100644 --- a/sysdeps/unix/sysv/irix4/getpriority.c +++ b/sysdeps/unix/sysv/irix4/getpriority.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1996, 1997, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1994,96,97,2000,02 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 @@ -44,3 +44,4 @@ getpriority (which, who) __set_errno (EINVAL); return -1; } +libc_hidden_def (getpriority) From 1d343348c1caf178c9bd98c3d79302a5c8688c6c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 4 Aug 2002 09:16:35 +0000 Subject: [PATCH 2838/4487] (__sysconf): Add libc_hidden_def. --- sysdeps/unix/sysv/irix4/sysconf.c | 3 ++- sysdeps/unix/sysv/sysv4/sysconf.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/irix4/sysconf.c b/sysdeps/unix/sysv/irix4/sysconf.c index 3f350b5cb2..2f89491fda 100644 --- a/sysdeps/unix/sysv/irix4/sysconf.c +++ b/sysdeps/unix/sysv/irix4/sysconf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995, 1997, 2002 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 @@ -33,3 +33,4 @@ __sysconf (name) } weak_alias (__sysconf, sysconf) +libc_hidden_def (__sysconf) diff --git a/sysdeps/unix/sysv/sysv4/sysconf.c b/sysdeps/unix/sysv/sysv4/sysconf.c index 77ce2d87d4..d8ffafcc41 100644 --- a/sysdeps/unix/sysv/sysv4/sysconf.c +++ b/sysdeps/unix/sysv/sysv4/sysconf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1996, 1997, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -363,3 +363,4 @@ __sysconf (name) } weak_alias (__sysconf, sysconf) +libc_hidden_def (__sysconf) From a42044dc37dca8e6fcbfb196e8922b9cdf664446 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 4 Aug 2002 09:23:46 +0000 Subject: [PATCH 2839/4487] (__xmknod): Add libc_hidden_def. --- sysdeps/unix/sysv/linux/alpha/xmknod.c | 3 ++- sysdeps/unix/sysv/linux/mips/xmknod.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/xmknod.c b/sysdeps/unix/sysv/linux/alpha/xmknod.c index a659c1f5ce..d7e8d2a0a8 100644 --- a/sysdeps/unix/sysv/linux/alpha/xmknod.c +++ b/sysdeps/unix/sysv/linux/alpha/xmknod.c @@ -1,5 +1,5 @@ /* xmknod call using old-style Unix mknod system call. - Copyright (C) 1991, 1993, 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1991,1993,1995,1996,1997,2002 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 @@ -45,3 +45,4 @@ __xmknod (int vers, const char *path, mode_t mode, dev_t *dev) } weak_alias (__xmknod, _xmknod) +libc_hidden_def (__xmknod) diff --git a/sysdeps/unix/sysv/linux/mips/xmknod.c b/sysdeps/unix/sysv/linux/mips/xmknod.c index d2a02f512b..217c9c2111 100644 --- a/sysdeps/unix/sysv/linux/mips/xmknod.c +++ b/sysdeps/unix/sysv/linux/mips/xmknod.c @@ -1,5 +1,5 @@ /* xmknod call using old-style Unix mknod system call. - Copyright (C) 1991, 93, 95, 96, 97, 98, 00 Free Software Foundation, Inc. + Copyright (C) 1991,93,95,96,97,98,00,2002 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 @@ -49,3 +49,4 @@ __xmknod (int vers, const char *path, mode_t mode, dev_t *dev) } weak_alias (__xmknod, _xmknod) +libc_hidden_def (__xmknod) From 9b4c30e300c1531aa76bb52739ea0982d0e6cb11 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 4 Aug 2002 23:26:50 +0000 Subject: [PATCH 2840/4487] Add _sys_siglist_internal alias. --- sysdeps/unix/sysv/linux/arm/siglist.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/arm/siglist.c b/sysdeps/unix/sysv/linux/arm/siglist.c index e053339908..d5fdb5d619 100644 --- a/sysdeps/unix/sysv/linux/arm/siglist.c +++ b/sysdeps/unix/sysv/linux/arm/siglist.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2000, 2002 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 @@ -32,6 +32,7 @@ const char *const __new_sys_siglist[NSIG] = #include "siglist.h" #undef init_sig }; +strong_alias (__new_sys_siglist, _sys_siglist_internal) #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) asm (".type __old_sys_siglist,%object;.size __old_sys_siglist," From 28b5d5afc678994b53a13c83902cac5ab09d85aa Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 5 Aug 2002 00:31:32 +0000 Subject: [PATCH 2841/4487] (glob, globfree, globfree64): Add libc_hidden_ver. --- sysdeps/unix/sysv/linux/alpha/glob.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/glob.c b/sysdeps/unix/sysv/linux/alpha/glob.c index 9a52ae87e9..a51020d51f 100644 --- a/sysdeps/unix/sysv/linux/alpha/glob.c +++ b/sysdeps/unix/sysv/linux/alpha/glob.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2000, 2002 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 @@ -44,6 +44,9 @@ extern void __new_globfree (glob_t *__pglob); versioned_symbol (libc, __new_glob, glob, GLIBC_2_1); versioned_symbol (libc, __new_globfree, globfree, GLIBC_2_1); +libc_hidden_ver (__new_glob, glob) +libc_hidden_ver (__new_globfree, globfree) weak_alias (__new_glob, glob64) weak_alias (__new_globfree, globfree64) +libc_hidden_ver (__new_globfree, globfree64) From 216e12e222d4f0023390ece5cffe2ef392ddb6c8 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 5 Aug 2002 02:18:11 +0000 Subject: [PATCH 2842/4487] 2002-08-03 Roland McGrath * include/sys/resource.h: Use libc_hidden_proto for getpriority, setpriority. * sysdeps/unix/sysv/linux/getpriority.c: Add libc_hidden_def. * sysdeps/unix/sysv/irix4/getpriority.c: Likewise. * sysdeps/unix/sysv/irix4/setpriority.c: Likewise. * sysdeps/mach/hurd/setpriority.c: Likewise. * sysdeps/mach/hurd/getpriority.c: Likewise. * sysdeps/generic/setpriority.c: Likewise. * sysdeps/generic/getpriority.c: Likewise. --- sysdeps/unix/sysv/irix4/setpriority.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/irix4/setpriority.c b/sysdeps/unix/sysv/irix4/setpriority.c index 9254ed4268..99353187f6 100644 --- a/sysdeps/unix/sysv/irix4/setpriority.c +++ b/sysdeps/unix/sysv/irix4/setpriority.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1996, 1997, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1994,96,97,2000,02 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 @@ -39,3 +39,4 @@ setpriority (which, who, prio) __set_errno (EINVAL); return -1; } +libc_hidden_def (setpriority) From 488003cd6b0982e1a97399f5960641d2883e861f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 12 Aug 2002 19:36:38 +0000 Subject: [PATCH 2843/4487] Makefile for arm. --- sysdeps/arm/Makefile | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 sysdeps/arm/Makefile diff --git a/sysdeps/arm/Makefile b/sysdeps/arm/Makefile new file mode 100644 index 0000000000..ccb6b03684 --- /dev/null +++ b/sysdeps/arm/Makefile @@ -0,0 +1,7 @@ +ifeq ($(subdir),csu) +ifeq (yes,$(build-shared)) +# Compatibility +sysdep_routines += divdi3 +shared-only-routines += divdi3 +endif +endif From e0acc021ce7a0f42d455fac3f8874b2e827156b1 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 13 Aug 2002 00:22:48 +0000 Subject: [PATCH 2844/4487] 2002-08-13 Jakub Jelinek * include/unistd.h (seteuid, setegid): Add libc_hidden_proto. * sysdeps/generic/seteuid.c (seteuid): Add libc_hidden_def. * sysdeps/generic/setegid.c (setegid): Likewise. * sysdeps/mach/hurd/seteuid.c (seteuid): Likewise. * sysdeps/mach/hurd/setegid.c (setegid): Likewise. * sysdeps/unix/bsd/seteuid.c (seteuid): Likewise. * sysdeps/unix/bsd/setegid.c (setegid): Likewise. * sysdeps/unix/sysv/aix/seteuid.c (seteuid): Likewise. * sysdeps/unix/sysv/aix/setegid.c (setegid): Likewise. * sysdeps/unix/sysv/linux/i386/setegid.c (setegid): Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/seteuid.c (seteuid): Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/setegid.c (setegid): Likewise. * sysdeps/unix/sysv/linux/seteuid.c (seteuid): Likewise. * sysdeps/unix/sysv/linux/setegid.c (setegid): Likewise. * sysdeps/unix/sysv/linux/i386/seteuid.c (seteuid): Likewise. Remove fallback if __ASSUME_SETRESUID_SYSCALL. --- sysdeps/unix/sysv/aix/setegid.c | 3 ++- sysdeps/unix/sysv/aix/seteuid.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/aix/setegid.c b/sysdeps/unix/sysv/aix/setegid.c index 75e96e387c..75123cedfd 100644 --- a/sysdeps/unix/sysv/aix/setegid.c +++ b/sysdeps/unix/sysv/aix/setegid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002 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 @@ -29,3 +29,4 @@ __setegid (gid_t gid) return setgidx (ID_EFFECTIVE, gid); } strong_alias (__setegid, setegid) +libc_hidden_def (setegid) diff --git a/sysdeps/unix/sysv/aix/seteuid.c b/sysdeps/unix/sysv/aix/seteuid.c index 17738e78b7..6ea7e7ba03 100644 --- a/sysdeps/unix/sysv/aix/seteuid.c +++ b/sysdeps/unix/sysv/aix/seteuid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002 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 @@ -29,3 +29,4 @@ __seteuid (uid_t uid) return setuidx (ID_EFFECTIVE, uid); } strong_alias (__seteuid, seteuid) +libc_hidden_def (seteuid) From 9c1cc5c52c29a8662d64f94a4c84b1d44665c45e Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 13 Aug 2002 00:23:01 +0000 Subject: [PATCH 2845/4487] 2002-08-13 Jakub Jelinek * include/unistd.h (tcgetpgrp): Add libc_hidden_proto. * include/termios.h (tcsetattr, cfsetispeed, cfsetospeed): Likewise. * sysdeps/generic/tcgetpgrp.c (tcgetpgrp): Add libc_hidden_def. * sysdeps/generic/tcsetattr.c (tcsetattr): Likewise. * sysdeps/generic/speed.c (cfsetispeed, cfsetospeed): Likewise. * sysdeps/unix/bsd/bsd4.4/tcsetattr.c (tcgetpgrp): Likewise. * sysdeps/unix/bsd/sun/sunos4/tcsetattr.c (tcsetattr): Likewise. * sysdeps/unix/bsd/sun/sunos4/speed.c (cfsetispeed, cfsetospeed): Likewise. * sysdeps/unix/bsd/tcgetpgrp.c (tcgetpgrp): Likewise. * sysdeps/unix/bsd/tcsetattr.c (tcsetattr): Likewise. * sysdeps/unix/sysv/aix/tcsetattr.c (tcsetattr): Likewise. * sysdeps/unix/sysv/aix/speed.c (cfsetispeed, cfsetospeed): Likewise. * sysdeps/unix/sysv/linux/tcsetattr.c (tcsetattr): Likewise. * sysdeps/unix/sysv/linux/speed.c (cfsetispeed, cfsetospeed): Likewise. * sysdeps/unix/sysv/tcgetpgrp.c (tcgetpgrp): Likewise. * sysdeps/unix/sysv/tcsetattr.c (tcsetattr): Likewise. --- sysdeps/unix/bsd/sun/sunos4/speed.c | 4 +++- sysdeps/unix/bsd/sun/sunos4/tcsetattr.c | 3 ++- sysdeps/unix/sysv/aix/speed.c | 5 ++++- sysdeps/unix/sysv/aix/tcsetattr.c | 3 ++- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/bsd/sun/sunos4/speed.c b/sysdeps/unix/bsd/sun/sunos4/speed.c index dca3468929..262d70fdfb 100644 --- a/sysdeps/unix/bsd/sun/sunos4/speed.c +++ b/sysdeps/unix/bsd/sun/sunos4/speed.c @@ -1,5 +1,5 @@ /* `struct termios' speed frobnication functions. SunOS 4 version. - Copyright (C) 1991, 1992, 1993, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1991,1992,1993,1996,1997,2002 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 @@ -87,6 +87,7 @@ cfsetospeed (termios_p, speed) __set_errno (EINVAL); return -1; } +libc_hidden_def (cfsetospeed) /* Set the input baud rate stored in *TERMIOS_P to SPEED. */ int @@ -114,3 +115,4 @@ cfsetispeed (termios_p, speed) __set_errno (EINVAL); return -1; } +libc_hidden_def (cfsetispeed) diff --git a/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c b/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c index d61e39284b..934c4c8cf8 100644 --- a/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c +++ b/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1996, 1997, 2002 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 @@ -47,3 +47,4 @@ tcsetattr (fd, optional_actions, termios_p) return __ioctl (fd, cmd, termios_p); } +libc_hidden_def (tcsetattr) diff --git a/sysdeps/unix/sysv/aix/speed.c b/sysdeps/unix/sysv/aix/speed.c index c7fa51bb90..3a453a7bef 100644 --- a/sysdeps/unix/sysv/aix/speed.c +++ b/sysdeps/unix/sysv/aix/speed.c @@ -1,5 +1,5 @@ /* `struct termios' speed frobnication functions. AIX version. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright (C) 2000, 2002 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 @@ -53,6 +53,8 @@ cfsetospeed (termios_p, speed) termios_p->c_cflag |= speed & 0x0000000f; return 0; } +libc_hidden_def (cfsetospeed) + /* Set the input baud rate stored in *TERMIOS_P to SPEED. */ int @@ -70,3 +72,4 @@ cfsetispeed (termios_p, speed) termios_p->c_cflag |= (speed << 16) & ~0x000f0000; return 0; } +libc_hidden_def (cfsetispeed) diff --git a/sysdeps/unix/sysv/aix/tcsetattr.c b/sysdeps/unix/sysv/aix/tcsetattr.c index b11676e4c3..8e78da1c2c 100644 --- a/sysdeps/unix/sysv/aix/tcsetattr.c +++ b/sysdeps/unix/sysv/aix/tcsetattr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1995, 1996, 1997, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1992,1995,1996,1997,2000,2002 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 @@ -195,3 +195,4 @@ tcsetattr (fd, optional_actions, termios_p) return -1; return 0; } +libc_hidden_def (tcsetattr) From f994831e93b626d5d87d106ae7826605f9715545 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 13 Aug 2002 00:23:09 +0000 Subject: [PATCH 2846/4487] 2002-08-13 Jakub Jelinek * include/sys/stat.h (__fxstat_internal, __fxstat64_internal, __lxstat_internal, __lxstat64_internal): Remove. (__fxstat, __fxstat64, __lxstat, __lxstat64, __xstat, __xstat64): Add hidden_proto. * sysdeps/generic/fxstat.c (__fxstat): Add hidden_def. Remove INTDEF where present, remove #undef at the beginning. * sysdeps/generic/fxstat64.c (__fxstat64): Likewise. * sysdeps/generic/lxstat.c (__lxstat): Likewise. * sysdeps/generic/lxstat64.c (__lxstat64): Likewise. * sysdeps/generic/xstat.c (__xstat): Likewise. * sysdeps/generic/xstat64.c (__xstat64): Likewise. * sysdeps/mach/hurd/dl-sysdep.c (__xstat64, __fxstat64): Likewise. * sysdeps/mach/hurd/fxstat.c (__fxstat): Likewise. * sysdeps/mach/hurd/fxstat64.c (__fxstat64): Likewise. * sysdeps/mach/hurd/lxstat.c (__lxstat): Likewise. * sysdeps/mach/hurd/lxstat64.c (__lxstat64): Likewise. * sysdeps/mach/hurd/xstat.c (__xstat): Likewise. * sysdeps/mach/hurd/xstat64.c (__xstat64): Likewise. * sysdeps/unix/fxstat.c (__fxstat): Likewise. * sysdeps/unix/common/lxstat.c (__lxstat): Likewise. * sysdeps/unix/sysv/aix/fxstat.c (__fxstat): Likewise. * sysdeps/unix/sysv/aix/fxstat64.c (__fxstat64): Likewise. * sysdeps/unix/sysv/aix/lxstat.c (__lxstat): Likewise. * sysdeps/unix/sysv/aix/lxstat64.c (__lxstat64): Likewise. * sysdeps/unix/sysv/aix/xstat.c (__xstat): Likewise. * sysdeps/unix/sysv/aix/xstat64.c (__xstat64): Likewise. * sysdeps/unix/sysv/linux/ia64/fxstat.c (__fxstat): Likewise. * sysdeps/unix/sysv/linux/ia64/lxstat.c (__lxstat): Likewise. * sysdeps/unix/sysv/linux/ia64/xstat.c (__xstat): Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/fxstat.c (__fxstat): Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/lxstat.c (__lxstat): Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/xstat.c (__xstat): Likewise. * sysdeps/unix/sysv/linux/i386/fxstat.c (__fxstat): Likewise. * sysdeps/unix/sysv/linux/i386/lxstat.c (__lxstat): Likewise. * sysdeps/unix/sysv/linux/i386/xstat.c (__xstat): Likewise. * sysdeps/unix/sysv/linux/xstat.c (__xstat): Likewise. * sysdeps/unix/sysv/linux/xstat64.c (__xstat64): Likewise. * sysdeps/unix/sysv/linux/fxstat.c (__fxstat): Likewise. * sysdeps/unix/sysv/linux/fxstat64.c (__fxstat64): Likewise. * sysdeps/unix/sysv/linux/lxstat.c (__lxstat): Likewise. * sysdeps/unix/sysv/linux/lxstat64.c (__lxstat64): Likewise. * sysdeps/unix/xstat.c (__xstat): Likewise. --- sysdeps/unix/sysv/aix/fxstat.c | 4 +--- sysdeps/unix/sysv/aix/fxstat64.c | 6 +----- sysdeps/unix/sysv/aix/lxstat.c | 5 +---- sysdeps/unix/sysv/aix/lxstat64.c | 5 +---- sysdeps/unix/sysv/aix/xstat.c | 4 ++-- sysdeps/unix/sysv/aix/xstat64.c | 3 ++- 6 files changed, 8 insertions(+), 19 deletions(-) diff --git a/sysdeps/unix/sysv/aix/fxstat.c b/sysdeps/unix/sysv/aix/fxstat.c index 4c1e145dcb..1ba56f690f 100644 --- a/sysdeps/unix/sysv/aix/fxstat.c +++ b/sysdeps/unix/sysv/aix/fxstat.c @@ -23,12 +23,10 @@ extern int fstatx (int fd, struct stat *st, int len, int cmd); -#undef __fxstat - int __fxstat (int ver, int fd, struct stat *st) { assert (ver == 0); return fstatx (fd, st, sizeof (*st), STX_NORMAL); } -INTDEF(__fxstat) +hidden_def (__fxstat) diff --git a/sysdeps/unix/sysv/aix/fxstat64.c b/sysdeps/unix/sysv/aix/fxstat64.c index 509fb2c0cb..5f75e070c4 100644 --- a/sysdeps/unix/sysv/aix/fxstat64.c +++ b/sysdeps/unix/sysv/aix/fxstat64.c @@ -22,16 +22,12 @@ #define STX_NORMAL 0x00 #define STX_64 0x08 -#undef __fxstat64 - extern int fstatx (int fd, struct stat64 *st, int len, int cmd); -#undef __fxstat64 - int __fxstat64 (int ver, int fd, struct stat64 *st) { assert (ver == 0); return fstatx (fd, st, sizeof (*st), STX_NORMAL | STX_64); } -INTDEF(__fxstat64) +hidden_def (__fxstat64) diff --git a/sysdeps/unix/sysv/aix/lxstat.c b/sysdeps/unix/sysv/aix/lxstat.c index 52562bd934..879e80cbe8 100644 --- a/sysdeps/unix/sysv/aix/lxstat.c +++ b/sysdeps/unix/sysv/aix/lxstat.c @@ -21,8 +21,6 @@ #define STX_LINK 0x01 -#undef __lxstat - extern int statx (const char *pathname, struct stat *st, int len, int cmd); int @@ -31,5 +29,4 @@ __lxstat (int ver, const char *pathname, struct stat *st) assert (ver == 0); return statx (pathname, st, sizeof (*st), STX_LINK); } - -INTDEF(__lxstat) +hidden_def (__lxstat) diff --git a/sysdeps/unix/sysv/aix/lxstat64.c b/sysdeps/unix/sysv/aix/lxstat64.c index d68b4583d2..73324fe55b 100644 --- a/sysdeps/unix/sysv/aix/lxstat64.c +++ b/sysdeps/unix/sysv/aix/lxstat64.c @@ -22,8 +22,6 @@ #define STX_LINK 0x01 #define STX_64 0x08 -#undef __lxstat64 - extern int statx (const char *pathname, struct stat64 *st, int len, int cmd); int @@ -32,5 +30,4 @@ __lxstat64 (int ver, const char *pathname, struct stat64 *st) assert (ver == 0); return statx (pathname, st, sizeof (*st), STX_LINK | STX_64); } - -INTDEF(__lxstat64) +hidden_def (__lxstat64) diff --git a/sysdeps/unix/sysv/aix/xstat.c b/sysdeps/unix/sysv/aix/xstat.c index bf901e2f47..c76ad07999 100644 --- a/sysdeps/unix/sysv/aix/xstat.c +++ b/sysdeps/unix/sysv/aix/xstat.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2002 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 @@ -21,7 +21,6 @@ #define STX_NORMAL 0x00 - extern int statx (const char *pathname, struct stat *st, int len, int cmd); int @@ -30,3 +29,4 @@ __xstat (int ver, const char *pathname, struct stat *st) assert (ver == 0); return statx (pathname, st, sizeof (*st), STX_NORMAL); } +hidden_def (__xstat) diff --git a/sysdeps/unix/sysv/aix/xstat64.c b/sysdeps/unix/sysv/aix/xstat64.c index 91f83175f3..cb1bea1182 100644 --- a/sysdeps/unix/sysv/aix/xstat64.c +++ b/sysdeps/unix/sysv/aix/xstat64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2002 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 @@ -31,3 +31,4 @@ __xstat64 (int ver, const char *pathname, struct stat64 *st) assert (ver == 0); return statx (pathname, st, sizeof (*st), STX_NORMAL | STX_64); } +hidden_def (__xstat64) From 84091b65ffc88ca22d6d2410e54f440413400e28 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 13 Aug 2002 01:07:52 +0000 Subject: [PATCH 2847/4487] 2002-08-12 Roland McGrath * include/sys/wait.h (__waitpid): Add libc_hidden_proto. * sysdeps/unix/sysv/sco3.2.4/waitpid.S: Add libc_hidden_def. * sysdeps/unix/sysv/sysv4/waitpid.c: Add libc_hidden_weak. * sysdeps/unix/sysv/linux/waitpid.c: Likewise. * sysdeps/unix/sysv/aix/waitpid.c: Likewise. * sysdeps/unix/bsd/bsd4.4/waitpid.c: Likewise. * sysdeps/generic/waitpid.c: Likewise. --- sysdeps/unix/sysv/aix/waitpid.c | 3 ++- sysdeps/unix/sysv/sco3.2.4/waitpid.S | 3 ++- sysdeps/unix/sysv/sysv4/waitpid.c | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/aix/waitpid.c b/sysdeps/unix/sysv/aix/waitpid.c index 4875612327..19bcbab722 100644 --- a/sysdeps/unix/sysv/aix/waitpid.c +++ b/sysdeps/unix/sysv/aix/waitpid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1995, 1996, 1997, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1991,95,96,97,2000,02 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 @@ -49,4 +49,5 @@ __libc_waitpid (pid_t pid, int *stat_loc, int options) return kwaitpid (stat_loc, pid, options, NULL, NULL); } weak_alias (__libc_waitpid, __waitpid) +libc_hidden_weak (__waitpid) weak_alias (__libc_waitpid, waitpid) diff --git a/sysdeps/unix/sysv/sco3.2.4/waitpid.S b/sysdeps/unix/sysv/sco3.2.4/waitpid.S index 53e08cfa9b..ccbc81274e 100644 --- a/sysdeps/unix/sysv/sco3.2.4/waitpid.S +++ b/sysdeps/unix/sysv/sco3.2.4/waitpid.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1994, 1995, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993,94,95,97,2002 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 @@ -33,4 +33,5 @@ ENTRY (__waitpid) movl r1, (scratch) /* Yes; store the status there. */ null: ret +libc_hidden_def (__waitpid) weak_alias (__waitpid, waitpid) diff --git a/sysdeps/unix/sysv/sysv4/waitpid.c b/sysdeps/unix/sysv/sysv4/waitpid.c index 8b899a75ff..f4700c6cd1 100644 --- a/sysdeps/unix/sysv/sysv4/waitpid.c +++ b/sysdeps/unix/sysv/sysv4/waitpid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993,94,95,96,97,2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -115,6 +115,6 @@ __libc_waitpid (__pid_t pid, int *stat_loc, int options) any PID. */ return infop.__pid; } - weak_alias (__libc_waitpid, __waitpid) weak_alias (__libc_waitpid, waitpid) +libc_hidden_weak (__waitpid) From 94a376cc2cb4d93d0a76d16d6aa296cd18bbab1b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 13 Aug 2002 01:07:58 +0000 Subject: [PATCH 2848/4487] 2002-08-12 Roland McGrath * include/grp.h (setgroups): Add libc_hidden_proto. * sysdeps/generic/setgroups.c: Add libc_hidden_def. * sysdeps/mach/hurd/setgroups.c: Likewise. * sysdeps/unix/sysv/irix4/setgroups.c: Likewise. * sysdeps/unix/sysv/linux/i386/setgroups.c: Likewise. --- sysdeps/unix/sysv/irix4/setgroups.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/irix4/setgroups.c b/sysdeps/unix/sysv/irix4/setgroups.c index 57f0ed5c25..8f5b379ac5 100644 --- a/sysdeps/unix/sysv/irix4/setgroups.c +++ b/sysdeps/unix/sysv/irix4/setgroups.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1994,97,2002 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 @@ -30,3 +30,4 @@ setgroups (n, groups) { return __syssgi (SGI_SETGROUPS, n, groups); } +libc_hidden_def (setgroups) From 074a6e5efa5598aa0197e68b9c05d758bc3fd910 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 15 Aug 2002 09:01:52 +0000 Subject: [PATCH 2849/4487] Add *xattr syscalls with version 2.3. --- sysdeps/unix/sysv/linux/alpha/Versions | 17 +++++++++++++++++ sysdeps/unix/sysv/linux/arm/Versions | 17 +++++++++++++++++ sysdeps/unix/sysv/linux/m68k/Versions | 17 +++++++++++++++++ sysdeps/unix/sysv/linux/mips/Versions | 17 +++++++++++++++++ 4 files changed, 68 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/Versions b/sysdeps/unix/sysv/linux/alpha/Versions index c18816ca6f..688253212f 100644 --- a/sysdeps/unix/sysv/linux/alpha/Versions +++ b/sysdeps/unix/sysv/linux/alpha/Versions @@ -57,4 +57,21 @@ libc { # w* wordexp; } + GLIBC_2.3 { + # f* + fgetxattr; flistxattr; fremovexattr; fsetxattr; + + # g* + getxattr; + + # l* + listxattr; + lgetxattr; llistxattr; lremovexattr; lsetxattr; + + # r* + removexattr; + + # s* + setxattr; + } } diff --git a/sysdeps/unix/sysv/linux/arm/Versions b/sysdeps/unix/sysv/linux/arm/Versions index 32cb185505..df5c9ec26a 100644 --- a/sysdeps/unix/sysv/linux/arm/Versions +++ b/sysdeps/unix/sysv/linux/arm/Versions @@ -31,4 +31,21 @@ libc { # v* versionsort64; } + GLIBC_2.3 { + # f* + fgetxattr; flistxattr; fremovexattr; fsetxattr; + + # g* + getxattr; + + # l* + listxattr; + lgetxattr; llistxattr; lremovexattr; lsetxattr; + + # r* + removexattr; + + # s* + setxattr; + } } diff --git a/sysdeps/unix/sysv/linux/m68k/Versions b/sysdeps/unix/sysv/linux/m68k/Versions index 0799bf310e..62154b9508 100644 --- a/sysdeps/unix/sysv/linux/m68k/Versions +++ b/sysdeps/unix/sysv/linux/m68k/Versions @@ -29,4 +29,21 @@ libc { # v* versionsort64; } + GLIBC_2.3 { + # f* + fgetxattr; flistxattr; fremovexattr; fsetxattr; + + # g* + getxattr; + + # l* + listxattr; + lgetxattr; llistxattr; lremovexattr; lsetxattr; + + # r* + removexattr; + + # s* + setxattr; + } } diff --git a/sysdeps/unix/sysv/linux/mips/Versions b/sysdeps/unix/sysv/linux/mips/Versions index f71d9b5d88..0c5d798b0b 100644 --- a/sysdeps/unix/sysv/linux/mips/Versions +++ b/sysdeps/unix/sysv/linux/mips/Versions @@ -17,4 +17,21 @@ libc { # _* _test_and_set; } + #GLIBC_2.3 { + # # f* + # fgetxattr; flistxattr; fremovexattr; fsetxattr; + # + # # g* + # getxattr; + # + # # l* + # listxattr; + # lgetxattr; llistxattr; lremovexattr; lsetxattr; + # + # # r* + # removexattr; + # + # # s* + # setxattr; + #} } From 978d532dd96f0a33ac2553b1a0851b64467fadb0 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 19 Aug 2002 07:41:58 +0000 Subject: [PATCH 2850/4487] Regenerate. --- sysdeps/alpha/fpu/libm-test-ulps | 617 ++++++++++--------------------- 1 file changed, 199 insertions(+), 418 deletions(-) diff --git a/sysdeps/alpha/fpu/libm-test-ulps b/sysdeps/alpha/fpu/libm-test-ulps index eac5e8b7ad..e2091f8a15 100644 --- a/sysdeps/alpha/fpu/libm-test-ulps +++ b/sysdeps/alpha/fpu/libm-test-ulps @@ -1,61 +1,18 @@ # Begin of automatic generation -# asin -Test "asin (-0.5) == -pi/6": -float: 2 -ifloat: 2 -Test "asin (0.5) == pi/6": -float: 2 -ifloat: 2 -Test "asin (0.7) == 0.77539749661075306374035335271498708": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 - # atan2 -Test "atan2 (0.7, -1.0) == 2.530866689200584621918884506789267": +Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025": float: 3 ifloat: 3 -Test "atan2 (-0.7, -1.0) == -2.530866689200584621918884506789267": +Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025": float: 3 ifloat: 3 -Test "atan2 (1.4, -0.93) == 2.1571487668237843754887415992772736": -float: 4 -ifloat: 4 - -# atanh -Test "atanh (0.7) == 0.8673005276940531944": -double: 1 -idouble: 1 - -# cabs -Test "cabs (-0.7 + 12.4 i) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "cabs (-0.7 - 12.4 i) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "cabs (-12.4 + 0.7 i) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "cabs (-12.4 - 0.7 i) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508432547041028554": -double: 1 -idouble: 1 -Test "cabs (0.7 + 12.4 i) == 12.419742348374220601176836866763271": +Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772": float: 1 ifloat: 1 -# cacos -Test "Real part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i": +# atanh +Test "atanh (0.75) == 0.972955074527656652552676371721589865": float: 1 ifloat: 1 @@ -70,20 +27,12 @@ double: 1 float: 3 idouble: 1 ifloat: 3 -Test "Real part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459105272080819308 + 1.1351827477151551088992008271819053 i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 # casin -Test "Real part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i": -double: 3 -float: 2 -idouble: 3 -ifloat: 2 -Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i": +Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": +double: 1 float: 1 +idouble: 1 ifloat: 1 # casinh @@ -97,11 +46,13 @@ double: 3 float: 6 idouble: 3 ifloat: 6 -Test "Real part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i": +Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": double: 1 -idouble: 1 -Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i": float: 1 +idouble: 1 ifloat: 1 # catan @@ -113,12 +64,9 @@ double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Real part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i": +Test "Real part of: catan (0.75 + 1.25 i) == 1.10714871779409050301706546017853704 + 0.549306144334054845697622618461262852 i": float: 4 ifloat: 4 -Test "Imaginary part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i": -double: 1 -idouble: 1 # catanh Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": @@ -127,20 +75,21 @@ idouble: 4 Test "Imaginary part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": float: 4 ifloat: 4 -Test "Real part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i": -float: 1 -ifloat: 1 -Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i": +Test "Real part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i": double: 1 -float: 6 idouble: 1 +Test "Imaginary part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i": +float: 6 ifloat: 6 # cbrt Test "cbrt (-27.0) == -3.0": double: 1 idouble: 1 -Test "cbrt (0.970299) == 0.99": +Test "cbrt (0.75) == 0.908560296416069829445605878163630251": +double: 1 +idouble: 1 +Test "cbrt (0.9921875) == 0.997389022060725270579075195353955217": double: 1 idouble: 1 @@ -148,12 +97,14 @@ idouble: 1 Test "Imaginary part of: ccos (-2 - 3 i) == -4.1896256909688072301 - 9.1092278937553365979 i": float: 1 ifloat: 1 -Test "Real part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i": -double: 1 -idouble: 1 -Test "Imaginary part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i": +Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": double: 1 +float: 1 idouble: 1 +ifloat: 1 +Test "Imaginary part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": +float: 1 +ifloat: 1 # ccosh Test "Real part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i": @@ -162,34 +113,30 @@ ifloat: 1 Test "Imaginary part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i": float: 1 ifloat: 1 -Test "Real part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i": +Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Imaginary part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i": -double: 1 -idouble: 1 +Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": +float: 1 +ifloat: 1 # cexp Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": float: 1 ifloat: 1 -Test "Real part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i": +Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": float: 1 ifloat: 1 # clog Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i": -double: 1 float: 3 -idouble: 1 ifloat: 3 +Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i": +float: 1 +ifloat: 1 # clog10 Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i": @@ -227,14 +174,9 @@ ifloat: 1 Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i": float: 1 ifloat: 1 -Test "Real part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i": -double: 1 +Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i": float: 1 -idouble: 1 ifloat: 1 -Test "Imaginary part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i": -double: 1 -idouble: 1 Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i": float: 1 ifloat: 1 @@ -249,28 +191,39 @@ float: 1 ifloat: 1 # cos -Test "cos (0.7) == 0.76484218728448842625585999019186495": +Test "cos (M_PI_6l * 2.0) == 0.5": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "cos (M_PI_6l * 2.0) == 0.5": -double: 1 -float: 0.5 -idouble: 1 -ifloat: 0.5 Test "cos (M_PI_6l * 4.0) == -0.5": double: 2 float: 1 idouble: 2 ifloat: 1 Test "cos (pi/2) == 0": -double: 0.2758 -float: 0.3667 -idouble: 0.2758 -ifloat: 0.3667 +double: 1 +float: 1 +idouble: 1 +ifloat: 1 # cpow +Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": +float: 1 +ifloat: 1 +Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i": +double: 1 +float: 4 +idouble: 1 +ifloat: 4 +Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i": +double: 2 +float: 3 +idouble: 2 +ifloat: 3 Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": double: 1 float: 4 @@ -285,19 +238,14 @@ float: 2 idouble: 2 ifloat: 2 -# csin -Test "Imaginary part of: csin (0.7 + 1.2 i) == 1.1664563419657581376 + 1.1544997246948547371 i": -float: 1 -ifloat: 1 - # csinh Test "Imaginary part of: csinh (-2 - 3 i) == 3.5905645899857799520 - 0.5309210862485198052 i": double: 1 idouble: 1 -Test "Real part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i": +Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": float: 1 ifloat: 1 -Test "Imaginary part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i": +Test "Imaginary part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": float: 1 ifloat: 1 @@ -308,27 +256,14 @@ ifloat: 1 Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i": float: 1 ifloat: 1 -Test "Real part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i": -float: 1 -ifloat: 1 # ctan Test "Real part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i": double: 1 idouble: 1 -Test "Real part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i": -float: 1 -ifloat: 1 -Test "Imaginary part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i": +Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i": double: 1 -float: 1 idouble: 1 -ifloat: 1 # ctanh Test "Real part of: ctanh (-2 - 3 i) == -0.9653858790221331242 + 0.0098843750383224937 i": @@ -339,34 +274,22 @@ ifloat: 2 Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i": float: 1 ifloat: 1 -Test "Real part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -Test "Imaginary part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 +Test "Real part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i": +double: 1 +idouble: 1 + +# erf +Test "erf (1.25) == 0.922900128256458230136523481197281140": +double: 1 +idouble: 1 # erfc -Test "erfc (0.7) == 0.32219880616258152702": +Test "erfc (2.0) == 0.00467773498104726583793074363274707139": double: 1 idouble: 1 -Test "erfc (1.2) == 0.089686021770364619762": -double: 2 -float: 2 -idouble: 2 -ifloat: 2 -Test "erfc (2.0) == 0.0046777349810472658379": +Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8": double: 1 idouble: 1 -Test "erfc (4.1) == 0.67000276540848983727e-8": -double: 24 -float: 12 -idouble: 24 -ifloat: 12 # exp10 Test "exp10 (-1) == 0.1": @@ -374,8 +297,10 @@ double: 2 float: 1 idouble: 2 ifloat: 1 -Test "exp10 (0.7) == 5.0118723362727228500155418688494574": +Test "exp10 (0.75) == 5.62341325190349080394951039776481231": +double: 1 float: 1 +idouble: 1 ifloat: 1 Test "exp10 (3) == 1000": double: 6 @@ -384,32 +309,13 @@ idouble: 6 ifloat: 2 # expm1 +Test "expm1 (0.75) == 1.11700001661267466854536981983709561": +double: 1 +idouble: 1 Test "expm1 (1) == M_El - 1.0": float: 1 ifloat: 1 -# fmod -Test "fmod (-6.5, -2.3) == -1.9": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -Test "fmod (-6.5, 2.3) == -1.9": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -Test "fmod (6.5, -2.3) == 1.9": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -Test "fmod (6.5, 2.3) == 1.9": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 - # hypot Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271": float: 1 @@ -426,9 +332,6 @@ ifloat: 1 Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (0.7, 1.2) == 1.3892443989449804508432547041028554": -double: 1 -idouble: 1 Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 @@ -440,90 +343,110 @@ float: 1 ifloat: 1 # j0 -Test "j0 (10.0) == -0.24593576445134833520": +Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "j0 (0.75) == 0.864242275166648623555731103820923211": +float: 1 +ifloat: 1 +Test "j0 (10.0) == -0.245935764451348335197760862485328754": double: 2 float: 1 idouble: 2 ifloat: 1 -Test "j0 (2.0) == 0.22389077914123566805": +Test "j0 (2.0) == 0.223890779141235668051827454649948626": float: 2 ifloat: 2 -Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1" +Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1": double: 1 -idouble: 1 float: 1 -ifloat: 1 -Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1" -double: 1 idouble: 1 -float: 1 ifloat: 1 -Test "j0 (8.0) == 0.17165080713755390609": +Test "j0 (8.0) == 0.171650807137553906090869407851972001": float: 1 ifloat: 1 # j1 -Test "j1 (10.0) == 0.043472746168861436670": +Test "j1 (10.0) == 0.0434727461688614366697487680258592883": float: 2 ifloat: 2 -Test "j1 (2.0) == 0.57672480775687338720": +Test "j1 (2.0) == 0.576724807756873387202448242269137087": double: 1 idouble: 1 -Test "j1 (8.0) == 0.23463634685391462438": +Test "j1 (8.0) == 0.234636346853914624381276651590454612": double: 1 idouble: 1 # jn -Test "jn (0, 10.0) == -0.24593576445134833520": +Test "jn (0, -4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (0, 0.75) == 0.864242275166648623555731103820923211": +float: 1 +ifloat: 1 +Test "jn (0, 10.0) == -0.245935764451348335197760862485328754": double: 2 float: 1 idouble: 2 ifloat: 1 -Test "jn (0, 2.0) == 0.22389077914123566805": +Test "jn (0, 2.0) == 0.223890779141235668051827454649948626": float: 2 ifloat: 2 -Test "jn (0, 8.0) == 0.17165080713755390609": +Test "jn (0, 4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 float: 1 +idouble: 1 ifloat: 1 -Test "jn (1, 10.0) == 0.043472746168861436670": +Test "jn (0, 8.0) == 0.171650807137553906090869407851972001": +float: 1 +ifloat: 1 +Test "jn (1, 10.0) == 0.0434727461688614366697487680258592883": float: 2 ifloat: 2 -Test "jn (1, 2.0) == 0.57672480775687338720": +Test "jn (1, 2.0) == 0.576724807756873387202448242269137087": double: 1 idouble: 1 -Test "jn (1, 8.0) == 0.23463634685391462438": +Test "jn (1, 8.0) == 0.234636346853914624381276651590454612": double: 1 idouble: 1 -Test "jn (10, 0.1) == 0.26905328954342155795e-19": -double: 6 -float: 4 -idouble: 6 -ifloat: 4 -Test "jn (10, 0.7) == 0.75175911502153953928e-11": -double: 3 +Test "jn (10, 0.125) == 0.250543369809369890173993791865771547e-18": +double: 1 float: 1 -idouble: 3 +idouble: 1 ifloat: 1 -Test "jn (10, 10.0) == 0.20748610663335885770": +Test "jn (10, 0.75) == 0.149621713117596814698712483621682835e-10": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (10, 10.0) == 0.207486106633358857697278723518753428": double: 4 float: 3 idouble: 4 ifloat: 3 -Test "jn (10, 2.0) == 0.25153862827167367096e-6": +Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6": float: 4 ifloat: 4 -Test "jn (3, 0.1) == 0.000020820315754756261429": +Test "jn (3, 0.125) == 0.406503832554912875023029337653442868e-4": double: 1 +float: 1 idouble: 1 -Test "jn (3, 0.7) == 0.0069296548267508408077": +ifloat: 1 +Test "jn (3, 0.75) == 0.848438342327410884392755236884386804e-2": +double: 1 float: 1 +idouble: 1 ifloat: 1 -Test "jn (3, 10.0) == 0.058379379305186812343": +Test "jn (3, 10.0) == 0.0583793793051868123429354784103409563": double: 3 float: 1 idouble: 3 ifloat: 1 -Test "jn (3, 2.0) == 0.12894324947440205110": +Test "jn (3, 2.0) == 0.128943249474402051098793332969239835": double: 1 float: 2 idouble: 1 @@ -541,85 +464,45 @@ float: 2 idouble: 1 ifloat: 2 -# log -Test "log (0.7) == -0.35667494393873237891263871124118447": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - # log10 -Test "log10 (0.7) == -0.15490195998574316929": +Test "log10 (0.75) == -0.124938736608299953132449886193870744": double: 1 -float: 1 +float: 2 idouble: 1 -ifloat: 1 +ifloat: 2 Test "log10 (e) == log10(e)": float: 1 ifloat: 1 # log1p -Test "log1p (-0.3) == -0.35667494393873237891263871124118447": -double: 1 +Test "log1p (-0.25) == -0.287682072451780927439219005993827432": float: 1 -idouble: 1 -ifloat: 1 - -# log2 -Test "log2 (0.7) == -0.51457317282975824043": -double: 1 -float: 1 -idouble: 1 ifloat: 1 # sincos -Test "sincos (0.7, &sin_res, &cos_res) puts 0.76484218728448842625585999019186495 in cos_res": +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": -double: 1 -float: 0.5 -idouble: 1 -ifloat: 0.5 Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res": double: 1 float: 1 idouble: 1 ifloat: 1 Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res": -double: 0.2758 -float: 0.3667 -idouble: 0.2758 -ifloat: 0.3667 -Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res": -float: 1 -ifloat: 1 - -# sinh -Test "sinh (0.7) == 0.75858370183953350346": double: 1 float: 1 idouble: 1 ifloat: 1 +Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res": +float: 1 +ifloat: 1 # tan Test "tan (pi/4) == 1": -double: 0.5 -idouble: 0.5 - -# tanh -Test "tanh (-0.7) == -0.60436777711716349631": double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "tanh (0.7) == 0.60436777711716349631": -double: 1 -float: 1 idouble: 1 -ifloat: 1 # tgamma Test "tgamma (-0.5) == -2 sqrt (pi)": @@ -637,174 +520,130 @@ idouble: 1 ifloat: 1 # y0 -Test "y0 (0.7) == -0.19066492933739506743": +Test "y0 (1.0) == 0.0882569642156769579829267660235151628": double: 2 float: 1 idouble: 2 ifloat: 1 -Test "y0 (1.0) == 0.088256964215676957983": +Test "y0 (1.5) == 0.382448923797758843955068554978089862": double: 2 float: 1 idouble: 2 ifloat: 1 -Test "y0 (1.5) == 0.38244892379775884396": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -Test "y0 (10.0) == 0.055671167283599391424": +Test "y0 (10.0) == 0.0556711672835993914244598774101900481": float: 1 ifloat: 1 -Test "y0 (8.0) == 0.22352148938756622053": +Test "y0 (8.0) == 0.223521489387566220527323400498620359": double: 1 float: 1 idouble: 1 ifloat: 1 # y1 -Test "y1 (0.1) == -6.4589510947020269877": +Test "y1 (0.125) == -5.19993611253477499595928744876579921": double: 1 idouble: 1 -Test "y1 (0.7) == -1.1032498719076333697": -double: 1 +Test "y1 (1.5) == -0.412308626973911295952829820633445323": float: 1 -idouble: 1 ifloat: 1 -Test "y1 (1.5) == -0.41230862697391129595": -float: 1 -ifloat: 1 -Test "y1 (10.0) == 0.24901542420695388392": +Test "y1 (10.0) == 0.249015424206953883923283474663222803": double: 3 float: 1 idouble: 3 ifloat: 1 -Test "y1 (2.0) == -0.10703243154093754689": +Test "y1 (2.0) == -0.107032431540937546888370772277476637": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "y1 (8.0) == -0.15806046173124749426": +Test "y1 (8.0) == -0.158060461731247494255555266187483550": double: 1 float: 2 idouble: 1 ifloat: 2 # yn -Test "yn (0, 0.7) == -0.19066492933739506743": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -Test "yn (0, 1.0) == 0.088256964215676957983": +Test "yn (0, 1.0) == 0.0882569642156769579829267660235151628": double: 2 float: 1 idouble: 2 ifloat: 1 -Test "yn (0, 1.5) == 0.38244892379775884396": +Test "yn (0, 1.5) == 0.382448923797758843955068554978089862": double: 2 float: 1 idouble: 2 ifloat: 1 -Test "yn (0, 10.0) == 0.055671167283599391424": +Test "yn (0, 10.0) == 0.0556711672835993914244598774101900481": float: 1 ifloat: 1 -Test "yn (0, 8.0) == 0.22352148938756622053": +Test "yn (0, 8.0) == 0.223521489387566220527323400498620359": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "yn (1, 0.1) == -6.4589510947020269877": -double: 1 -idouble: 1 -Test "yn (1, 0.7) == -1.1032498719076333697": +Test "yn (1, 0.125) == -5.19993611253477499595928744876579921": double: 1 -float: 1 idouble: 1 -ifloat: 1 -Test "yn (1, 1.5) == -0.41230862697391129595": +Test "yn (1, 1.5) == -0.412308626973911295952829820633445323": float: 1 ifloat: 1 -Test "yn (1, 10.0) == 0.24901542420695388392": +Test "yn (1, 10.0) == 0.249015424206953883923283474663222803": double: 3 float: 1 idouble: 3 ifloat: 1 -Test "yn (1, 2.0) == -0.10703243154093754689": +Test "yn (1, 2.0) == -0.107032431540937546888370772277476637": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "yn (1, 8.0) == -0.15806046173124749426": +Test "yn (1, 8.0) == -0.158060461731247494255555266187483550": double: 1 float: 2 idouble: 1 ifloat: 2 -Test "yn (10, 0.1) == -0.11831335132045197885e19": -double: 2 -float: 2 -idouble: 2 -ifloat: 2 -Test "yn (10, 0.7) == -0.42447194260703866924e10": -double: 3 -idouble: 3 -Test "yn (10, 1.0) == -0.12161801427868918929e9": +Test "yn (10, 0.125) == -127057845771019398.252538486899753195": double: 1 idouble: 1 -Test "yn (10, 10.0) == -0.35981415218340272205": +Test "yn (10, 0.75) == -2133501638.90573424452445412893839236": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "yn (10, 2.0) == -129184.54220803928264": -double: 2 -idouble: 2 -Test "yn (3, 0.1) == -5099.3323786129048894": +Test "yn (10, 1.0) == -121618014.278689189288130426667971145": double: 1 -float: 1 idouble: 1 -ifloat: 1 -Test "yn (3, 0.7) == -15.819479052819633505": -double: 3 -float: 1 -idouble: 3 -ifloat: 1 -Test "yn (3, 10.0) == -0.25136265718383732978": +Test "yn (10, 10.0) == -0.359814152183402722051986577343560609": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "yn (3, 2.0) == -1.1277837768404277861": -double: 1 -idouble: 1 - -# Maximal error of functions: -Function: "asin": +Test "yn (10, 2.0) == -129184.542208039282635913145923304214": +double: 2 +idouble: 2 +Test "yn (3, 0.125) == -2612.69757350066712600220955744091741": double: 1 -float: 2 idouble: 1 -ifloat: 2 - -Function: "atan2": -float: 4 -ifloat: 4 - -Function: "atanh": -double: 1 -idouble: 1 - -Function: "cabs": +Test "yn (3, 0.75) == -12.9877176234475433186319774484809207": double: 1 float: 1 idouble: 1 ifloat: 1 - -Function: Real part of "cacos": +Test "yn (3, 10.0) == -0.251362657183837329779204747654240998": double: 1 float: 1 idouble: 1 ifloat: 1 +Test "yn (3, 2.0) == -1.12778377684042778608158395773179238": +double: 1 +idouble: 1 -Function: Imaginary part of "cacos": +# Maximal error of functions: +Function: "atan2": +float: 3 +ifloat: 3 + +Function: "atanh": float: 1 ifloat: 1 @@ -821,13 +660,9 @@ idouble: 1 ifloat: 3 Function: Real part of "casin": -double: 3 -float: 2 -idouble: 3 -ifloat: 2 - -Function: Imaginary part of "casin": +double: 1 float: 1 +idouble: 1 ifloat: 1 Function: Real part of "casinh": @@ -854,14 +689,10 @@ ifloat: 1 Function: Real part of "catanh": double: 4 -float: 1 idouble: 4 -ifloat: 1 Function: Imaginary part of "catanh": -double: 1 float: 6 -idouble: 1 ifloat: 6 Function: "cbrt": @@ -870,12 +701,12 @@ idouble: 1 Function: Real part of "ccos": double: 1 +float: 1 idouble: 1 +ifloat: 1 Function: Imaginary part of "ccos": -double: 1 float: 1 -idouble: 1 ifloat: 1 Function: Real part of "ccosh": @@ -885,31 +716,27 @@ idouble: 1 ifloat: 1 Function: Imaginary part of "ccosh": -double: 1 float: 1 -idouble: 1 ifloat: 1 Function: Real part of "cexp": -double: 1 float: 1 -idouble: 1 ifloat: 1 Function: Imaginary part of "cexp": float: 1 ifloat: 1 +Function: Real part of "clog": +float: 1 +ifloat: 1 + Function: Imaginary part of "clog": -double: 1 float: 3 -idouble: 1 ifloat: 3 Function: Real part of "clog10": -double: 1 float: 1 -idouble: 1 ifloat: 1 Function: Imaginary part of "clog10": @@ -925,21 +752,17 @@ idouble: 2 ifloat: 1 Function: Real part of "cpow": -double: 1 +double: 2 float: 4 -idouble: 1 +idouble: 2 ifloat: 4 Function: Imaginary part of "cpow": -double: 1.1031 +double: 2 float: 2 -idouble: 1.1031 +idouble: 2 ifloat: 2 -Function: Imaginary part of "csin": -float: 1 -ifloat: 1 - Function: Real part of "csinh": float: 1 ifloat: 1 @@ -951,44 +774,34 @@ idouble: 1 ifloat: 1 Function: Real part of "csqrt": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - -Function: Imaginary part of "csqrt": float: 1 ifloat: 1 Function: Real part of "ctan": double: 1 -float: 1 idouble: 1 -ifloat: 1 Function: Imaginary part of "ctan": double: 1 -float: 1 idouble: 1 -ifloat: 1 Function: Real part of "ctanh": -double: 2 +double: 1 float: 2 -idouble: 2 +idouble: 1 ifloat: 2 Function: Imaginary part of "ctanh": -double: 2 float: 1 -idouble: 2 ifloat: 1 +Function: "erf": +double: 1 +idouble: 1 + Function: "erfc": -double: 24 -float: 12 -idouble: 24 -ifloat: 12 +double: 1 +idouble: 1 Function: "exp10": double: 6 @@ -997,19 +810,13 @@ idouble: 6 ifloat: 2 Function: "expm1": +double: 1 float: 1 -ifloat: 1 - -Function: "fmod": -double: 2 -float: 1 -idouble: 2 +idouble: 1 ifloat: 1 Function: "hypot": -double: 1 float: 1 -idouble: 1 ifloat: 1 Function: "j0": @@ -1025,9 +832,9 @@ idouble: 1 ifloat: 2 Function: "jn": -double: 6 +double: 4 float: 4 -idouble: 6 +idouble: 4 ifloat: 4 Function: "lgamma": @@ -1036,28 +843,14 @@ float: 2 idouble: 1 ifloat: 2 -Function: "log": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - Function: "log10": double: 1 -float: 1 +float: 2 idouble: 1 -ifloat: 1 +ifloat: 2 Function: "log1p": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - -Function: "log2": -double: 1 float: 1 -idouble: 1 ifloat: 1 Function: "sincos": @@ -1066,21 +859,9 @@ float: 1 idouble: 1 ifloat: 1 -Function: "sinh": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - Function: "tan": -double: 0.5 -idouble: 0.5 - -Function: "tanh": double: 1 -float: 1 idouble: 1 -ifloat: 1 Function: "tgamma": double: 1 From 1077d52cfb3c2f9e04579dff44074cb2e829530c Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 23 Aug 2002 09:29:00 +0000 Subject: [PATCH 2851/4487] Remove *xattr syscalls. --- sysdeps/unix/sysv/linux/alpha/Versions | 17 ----------------- sysdeps/unix/sysv/linux/arm/Versions | 17 ----------------- sysdeps/unix/sysv/linux/m68k/Versions | 17 ----------------- sysdeps/unix/sysv/linux/mips/Versions | 17 ----------------- 4 files changed, 68 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/Versions b/sysdeps/unix/sysv/linux/alpha/Versions index 688253212f..c18816ca6f 100644 --- a/sysdeps/unix/sysv/linux/alpha/Versions +++ b/sysdeps/unix/sysv/linux/alpha/Versions @@ -57,21 +57,4 @@ libc { # w* wordexp; } - GLIBC_2.3 { - # f* - fgetxattr; flistxattr; fremovexattr; fsetxattr; - - # g* - getxattr; - - # l* - listxattr; - lgetxattr; llistxattr; lremovexattr; lsetxattr; - - # r* - removexattr; - - # s* - setxattr; - } } diff --git a/sysdeps/unix/sysv/linux/arm/Versions b/sysdeps/unix/sysv/linux/arm/Versions index df5c9ec26a..32cb185505 100644 --- a/sysdeps/unix/sysv/linux/arm/Versions +++ b/sysdeps/unix/sysv/linux/arm/Versions @@ -31,21 +31,4 @@ libc { # v* versionsort64; } - GLIBC_2.3 { - # f* - fgetxattr; flistxattr; fremovexattr; fsetxattr; - - # g* - getxattr; - - # l* - listxattr; - lgetxattr; llistxattr; lremovexattr; lsetxattr; - - # r* - removexattr; - - # s* - setxattr; - } } diff --git a/sysdeps/unix/sysv/linux/m68k/Versions b/sysdeps/unix/sysv/linux/m68k/Versions index 62154b9508..0799bf310e 100644 --- a/sysdeps/unix/sysv/linux/m68k/Versions +++ b/sysdeps/unix/sysv/linux/m68k/Versions @@ -29,21 +29,4 @@ libc { # v* versionsort64; } - GLIBC_2.3 { - # f* - fgetxattr; flistxattr; fremovexattr; fsetxattr; - - # g* - getxattr; - - # l* - listxattr; - lgetxattr; llistxattr; lremovexattr; lsetxattr; - - # r* - removexattr; - - # s* - setxattr; - } } diff --git a/sysdeps/unix/sysv/linux/mips/Versions b/sysdeps/unix/sysv/linux/mips/Versions index 0c5d798b0b..f71d9b5d88 100644 --- a/sysdeps/unix/sysv/linux/mips/Versions +++ b/sysdeps/unix/sysv/linux/mips/Versions @@ -17,21 +17,4 @@ libc { # _* _test_and_set; } - #GLIBC_2.3 { - # # f* - # fgetxattr; flistxattr; fremovexattr; fsetxattr; - # - # # g* - # getxattr; - # - # # l* - # listxattr; - # lgetxattr; llistxattr; lremovexattr; lsetxattr; - # - # # r* - # removexattr; - # - # # s* - # setxattr; - #} } From 28fdb447c137f32abb3a95e3bfced78f4de42f25 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 23 Aug 2002 22:26:25 +0000 Subject: [PATCH 2852/4487] Define SHMLBA. --- sysdeps/unix/sysv/linux/alpha/bits/shm.h | 6 +++++- sysdeps/unix/sysv/linux/mips/bits/shm.h | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/shm.h b/sysdeps/unix/sysv/linux/alpha/bits/shm.h index 8559ce33d4..ae51e75452 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/shm.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/shm.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 2000, 2002 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 @@ -35,6 +35,10 @@ #define SHM_LOCK 11 /* lock segment (root only) */ #define SHM_UNLOCK 12 /* unlock segment (root only) */ +/* Segment low boundary address multiple. */ +#define SHMLBA (__getpagesize ()) +extern int __getpagesize (void) __THROW __attribute__ ((__const__)); + /* Type to count number of attaches. */ typedef unsigned long int shmatt_t; diff --git a/sysdeps/unix/sysv/linux/mips/bits/shm.h b/sysdeps/unix/sysv/linux/mips/bits/shm.h index ddae6b01c2..85b286e9de 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/shm.h +++ b/sysdeps/unix/sysv/linux/mips/bits/shm.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,2000,2001,2002 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 @@ -35,6 +35,11 @@ #define SHM_LOCK 11 /* lock segment (root only) */ #define SHM_UNLOCK 12 /* unlock segment (root only) */ +/* Segment low boundary address multiple. */ +#define SHMLBA (__getpagesize ()) +extern int __getpagesize (void) __THROW __attribute__ ((__const__)); + + /* Type to count number of attaches. */ typedef unsigned long int shmatt_t; From 9c3c87e2ec80968eddab2e4e6d548fdeb52ac1ce Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 24 Aug 2002 23:26:47 +0000 Subject: [PATCH 2853/4487] Update comment regarding placement of errno definition. --- sysdeps/unix/sysv/linux/m68k/sysdep.S | 11 +++++------ sysdeps/unix/sysv/linux/mips/sysdep.S | 11 +++++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.S b/sysdeps/unix/sysv/linux/m68k/sysdep.S index 30beaf233f..628335b8d0 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.S +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. +/* Copyright (C) 1996, 2002 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 @@ -18,11 +18,10 @@ #include -/* Because the Linux version is in fact m68k/ELF and the start.? file - for this system (sysdeps/m68k/elf/start.S) is also used by The Hurd - and therefore this files must not contain the definition of the - `errno' variable (I don't know why, ask Roland), we have to define - it somewhere else. +/* The Linux version is in fact m68k/ELF and the start.? file for this + system (sysdeps/m68k/elf/start.S) is also used by The Hurd. This file + must not contain the definition of the `errno' variable, we have to + define it somewhere else. ...and this place is here. */ .bss diff --git a/sysdeps/unix/sysv/linux/mips/sysdep.S b/sysdeps/unix/sysv/linux/mips/sysdep.S index d051c4fe6e..2584982bb0 100644 --- a/sysdeps/unix/sysv/linux/mips/sysdep.S +++ b/sysdeps/unix/sysv/linux/mips/sysdep.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2002 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 @@ -18,11 +18,10 @@ #include -/* Because the Linux version is in fact MIPS/ELF and the start.? file - for this system (sysdeps/mips/elf/start.S) is also used by The Hurd - and therefore this files must not contain the definition of the - `errno' variable (I don't know why, ask Roland), we have to define - it somewhere else. +/* The Linux version is in fact MIPS/ELF and the start.? file for this + system (sysdeps/mips/elf/start.S) is also used by The Hurd. This file + must not contain the definition of the `errno' variable, we have to + define it somewhere else. ...and this place is here. */ .bss From 564fb196d62636ab464c8639a1302e19e362ee6e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 26 Aug 2002 01:49:55 +0000 Subject: [PATCH 2854/4487] SysV message queue definitions for Linux/MIPS. --- sysdeps/unix/sysv/linux/mips/bits/msq.h | 74 +++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/mips/bits/msq.h diff --git a/sysdeps/unix/sysv/linux/mips/bits/msq.h b/sysdeps/unix/sysv/linux/mips/bits/msq.h new file mode 100644 index 0000000000..c2c1dd2e85 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/bits/msq.h @@ -0,0 +1,74 @@ +/* Copyright (C) 2002 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 _SYS_MSG_H +# error "Never use directly; include instead." +#endif + +#include + +/* Define options for message queue functions. */ +#define MSG_NOERROR 010000 /* no error if message is too big */ +#ifdef __USE_GNU +# define MSG_EXCEPT 020000 /* recv any msg except of specified type */ +#endif + +/* Types used in the structure definition. */ +typedef unsigned long int msgqnum_t; +typedef unsigned long int msglen_t; + + +/* Structure of record for one message inside the kernel. + The type `struct msg' is opaque. */ +struct msqid_ds +{ + struct ipc_perm msg_perm; /* structure describing operation permission */ + __time_t msg_stime; /* time of last msgsnd command */ + __time_t msg_rtime; /* time of last msgrcv command */ + __time_t msg_ctime; /* time of last change */ + unsigned long int __msg_cbytes; /* current number of bytes on queue */ + msgqnum_t msg_qnum; /* number of messages currently on queue */ + 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; +}; + +#ifdef __USE_MISC + +# define msg_cbytes __msg_cbytes + +/* ipcs ctl commands */ +# define MSG_STAT 11 +# define MSG_INFO 12 + +/* buffer for msgctl calls IPC_INFO, MSG_INFO */ +struct msginfo + { + int msgpool; + int msgmap; + int msgmax; + int msgmnb; + int msgmni; + int msgssz; + int msgtql; + unsigned short int msgseg; + }; + +#endif /* __USE_MISC */ From 631d94cb300121c9d8a73b0b210cb8ba016290ce Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 26 Aug 2002 11:37:24 +0000 Subject: [PATCH 2855/4487] 2002-07-06 Bruno Haible * sysdeps/unix/sysv/linux/arm/sysdep.h (PSEUDO): Swap DO_CALL arguments. (DO_CALL): Swap argument order. * sysdeps/unix/sysv/linux/hppa/sysdep.h (PSEUDO): Swap DO_CALL arguments. (DO_CALL): Swap argument order. * sysdeps/unix/sysv/linux/i386/sysdep.h (PSEUDO): Swap DO_CALL arguments. (DO_CALL): Swap argument order. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h (PSEUDO): Swap DO_CALL arguments. (DO_CALL): Swap argument order. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h (PSEUDO): Swap DO_CALL arguments. (DO_CALL): Swap argument order. * sysdeps/unix/sysv/linux/sh/sysdep.h (PSEUDO): Swap DO_CALL arguments. (DO_CALL): Swap argument order. * sysdeps/unix/sysv/linux/x86_64/sysdep.h (PSEUDO): Swap DO_CALL arguments. (DO_CALL): Swap argument order. --- sysdeps/unix/sysv/linux/arm/sysdep.h | 6 +++--- sysdeps/unix/sysv/linux/hppa/sysdep.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index 89ad1948a7..cdb1d8ed3b 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 93, 95-99, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1992,93,95-99,2000,02 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, , August 1995. ARM changes by Philip Blundell, , May 1997. @@ -51,7 +51,7 @@ .text; \ .type syscall_error,%function; \ ENTRY (name); \ - DO_CALL (args, syscall_name); \ + DO_CALL (syscall_name, args); \ cmn r0, $4096; #define PSEUDO_RET \ @@ -95,7 +95,7 @@ */ #undef DO_CALL -#define DO_CALL(args, syscall_name) \ +#define DO_CALL(syscall_name, args) \ DOARGS_##args \ swi SYS_ify (syscall_name); \ UNDOARGS_##args diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.h b/sysdeps/unix/sysv/linux/hppa/sysdep.h index af255e1137..4f08cc6e39 100644 --- a/sysdeps/unix/sysv/linux/hppa/sysdep.h +++ b/sysdeps/unix/sysv/linux/hppa/sysdep.h @@ -1,5 +1,5 @@ /* Assembler macros for PA-RISC. - Copyright (C) 1999, 2001 Free Software Foundation, Inc. + Copyright (C) 1999,2001,02 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, , August 1999. Linux/PA-RISC changes by Philipp Rumpf, , March 2000. @@ -108,7 +108,7 @@ #define PSEUDO(name, syscall_name, args) \ ENTRY (name) \ - DO_CALL(args, syscall_name) ASM_LINE_SEP \ + DO_CALL(syscall_name, args) ASM_LINE_SEP \ nop #undef PSEUDO_END @@ -145,7 +145,7 @@ */ #undef DO_CALL -#define DO_CALL(args, syscall_name) \ +#define DO_CALL(syscall_name, args) \ DOARGS_##args \ ble 0x100(%sr2,%r0) ASM_LINE_SEP \ ldi SYS_ify (syscall_name), %r20 ASM_LINE_SEP \ From 13d6ef283d22cb19a187c7c2d9d4e8ebf1d09b24 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 26 Aug 2002 11:37:32 +0000 Subject: [PATCH 2856/4487] 2002-07-06 Bruno Haible * sysdeps/unix/sysv/linux/alpha/pipe.S: Moved to ... * sysdeps/unix/alpha/pipe.S: ... here. * sysdeps/unix/bsd/osf/alpha/pipe.S: File removed. --- sysdeps/unix/{sysv/linux => }/alpha/pipe.S | 0 sysdeps/unix/bsd/osf/alpha/pipe.S | 33 ---------------------- 2 files changed, 33 deletions(-) rename sysdeps/unix/{sysv/linux => }/alpha/pipe.S (100%) delete mode 100644 sysdeps/unix/bsd/osf/alpha/pipe.S diff --git a/sysdeps/unix/sysv/linux/alpha/pipe.S b/sysdeps/unix/alpha/pipe.S similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/pipe.S rename to sysdeps/unix/alpha/pipe.S diff --git a/sysdeps/unix/bsd/osf/alpha/pipe.S b/sysdeps/unix/bsd/osf/alpha/pipe.S deleted file mode 100644 index b4eb2166e0..0000000000 --- a/sysdeps/unix/bsd/osf/alpha/pipe.S +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (C) 1993, 1995, 1997, 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@zen.org). - - 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. */ - -#include - -SYSCALL__ (pipe, 1) - /* Plop in the two descriptors. */ - stl r0, 0(a0) - stl r1, 4(a0) - - /* Go out with a clean status. */ - mov zero, r0 - ret - .end __pipe - -libc_hidden_def (__pipe) -weak_alias (__pipe, pipe) From 12ddb09b0a216d14997bdbca9030e6ed850131f1 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 26 Aug 2002 11:37:35 +0000 Subject: [PATCH 2857/4487] 2002-07-06 Bruno Haible * sysdeps/alpha/fpu/fpu_control.h: Comment fix. --- sysdeps/alpha/fpu/fpu_control.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/alpha/fpu/fpu_control.h b/sysdeps/alpha/fpu/fpu_control.h index f2214cb3ae..28acdf1704 100644 --- a/sysdeps/alpha/fpu/fpu_control.h +++ b/sysdeps/alpha/fpu/fpu_control.h @@ -1,5 +1,5 @@ -/* FPU control word bits. Alpha-maped-to-Intel version. - Copyright (C) 1996, 1998, 2000 Free Software Foundation, Inc. +/* FPU control word bits. Alpha-mapped-to-Intel version. + Copyright (C) 1996, 1998, 2000, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Olaf Flebbe. @@ -65,7 +65,7 @@ #define _FPU_MASK_UM 0x10 #define _FPU_MASK_PM 0x20 -/* precision control */ +/* precision control -- without effect on Alpha */ #define _FPU_EXTENDED 0x300 /* RECOMMENDED */ #define _FPU_DOUBLE 0x200 #define _FPU_SINGLE 0x0 /* DO NOT USE */ From ae287b19004d82be9e5d93b843dc7b642dce3d26 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 26 Aug 2002 11:37:38 +0000 Subject: [PATCH 2858/4487] 2002-07-06 Bruno Haible * sysdeps/unix/fork.S: Fix PSEUDO_END argument. * sysdeps/unix/arm/fork.S: Likewise. --- sysdeps/unix/arm/fork.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/arm/fork.S b/sysdeps/unix/arm/fork.S index a03fbe242e..deb22548e2 100644 --- a/sysdeps/unix/arm/fork.S +++ b/sysdeps/unix/arm/fork.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1994, 1995, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,94,95,97,2002 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,6 +28,6 @@ SYSCALL__ (fork, 0) sub r1, r1, $1 and r0, r0, r1 RETINSTR(mov, pc, r14) -PSEUDO_END(fork) +PSEUDO_END (__fork) weak_alias (__fork, fork) From f22dc06d3d24942b7c65cd6f593d35e18c2f8f32 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 26 Aug 2002 22:39:52 +0000 Subject: [PATCH 2859/4487] 2002-08-26 Brian Youmans <3diff@gnu.org> * crypt/crypt.c: Changed copying permission notice to Lesser GPL from Library GPL. * crypt/crypt_util.c: Likewise. * crypt/ufc.c: Likewise. * elf/dl-conflict.c: Likewise. * elf/dl-iteratephdr.c: Likewise. * iconv/iconvconfig.h: Likewise. * linuxthreads/Examples/ex10.c: Likewise. * linuxthreads/Examples/ex11.c: Likewise. * linuxthreads/Examples/ex13.c: Likewise. * linuxthreads/Examples/ex8.c: Likewise. * linuxthreads/Examples/ex9.c: Likewise. * linuxthreads/barrier.c: Likewise. * linuxthreads/events.c: Likewise. * linuxthreads/lockfile.c: Likewise. * linuxthreads/no-tsd.c: Likewise. * linuxthreads/pt-machine.c: Likewise. * linuxthreads/ptclock_gettime.c: Likewise. * linuxthreads/ptclock_settime.c: Likewise. * linuxthreads/rwlock.c: Likewise. * linuxthreads/sysdeps/alpha/pspinlock.c: Likewise. * linuxthreads/sysdeps/alpha/pt-machine.h: Likewise. * linuxthreads/sysdeps/arm/pspinlock.c: Likewise. * linuxthreads/sysdeps/arm/pt-machine.h: Likewise. * linuxthreads/sysdeps/cris/pspinlock.c: Likewise. * linuxthreads/sysdeps/cris/pt-machine.h: Likewise. * linuxthreads/sysdeps/hppa/pspinlock.c: Likewise. * linuxthreads/sysdeps/hppa/pt-machine.h: Likewise. * linuxthreads/sysdeps/i386/i686/pt-machine.h: Likewise. * linuxthreads/sysdeps/i386/pspinlock.c: Likewise. * linuxthreads/sysdeps/i386/pt-machine.h: Likewise. * linuxthreads/sysdeps/i386/useldt.h: Likewise. * linuxthreads/sysdeps/ia64/pspinlock.c: Likewise. * linuxthreads/sysdeps/ia64/pt-machine.h: Likewise. * linuxthreads/sysdeps/m68k/pspinlock.c: Likewise. * linuxthreads/sysdeps/m68k/pt-machine.h: Likewise. * linuxthreads/sysdeps/mips/pspinlock.c: Likewise. * linuxthreads/sysdeps/mips/pt-machine.h: Likewise. * linuxthreads/sysdeps/powerpc/pspinlock.c: Likewise. * linuxthreads/sysdeps/powerpc/pt-machine.h: Likewise. * linuxthreads/sysdeps/pthread/bits/initspin.h: Likewise. * linuxthreads/sysdeps/pthread/bits/libc-lock.h: Likewise. * linuxthreads/sysdeps/pthread/bits/libc-tsd.h: Likewise. * linuxthreads/sysdeps/pthread/getcpuclockid.c: Likewise. * linuxthreads/sysdeps/pthread/posix-timer.h: Likewise. * linuxthreads/sysdeps/pthread/timer_create.c: Likewise. * linuxthreads/sysdeps/pthread/timer_delete.c: Likewise. * linuxthreads/sysdeps/pthread/timer_getoverr.c: Likewise. * linuxthreads/sysdeps/pthread/timer_gettime.c: Likewise. * linuxthreads/sysdeps/pthread/timer_routines.c: Likewise. * linuxthreads/sysdeps/pthread/timer_settime.c: Likewise. * linuxthreads/sysdeps/pthread/tst-timer.c: Likewise. * linuxthreads/sysdeps/s390/pspinlock.c: Likewise. * linuxthreads/sysdeps/s390/s390-32/pt-machine.h: Likewise. * linuxthreads/sysdeps/s390/s390-64/pt-machine.h: Likewise. * linuxthreads/sysdeps/sh/pspinlock.c: Likewise. * linuxthreads/sysdeps/sh/pt-machine.h: Likewise. * linuxthreads/sysdeps/sparc/sparc32/pspinlock.c: Likewise. * linuxthreads/sysdeps/sparc/sparc32/pt-machine.h: Likewise. * linuxthreads/sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise. * linuxthreads/sysdeps/sparc/sparc64/pspinlock.c: Likewise. * linuxthreads/sysdeps/sparc/sparc64/pt-machine.h: Likewise. * linuxthreads/sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise. * linuxthreads/sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise. * linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise. * linuxthreads/sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise. * linuxthreads/sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise. * linuxthreads/tststack.c: Likewise. * linuxthreads/unload.c: Likewise. * linuxthreads/weaks.c: Likewise. * linuxthreads/wrapsyscall.c: Likewise. * malloc/arena.c: Likewise. * malloc/hooks.c: Likewise. * malloc/malloc.c: Likewise. * posix/glob/Makefile.am: Likewise. * posix/glob/Makefile.in: Likewise. * stdlib/gmp-impl.h: Likewise. * stdlib/gmp.h: Likewise. * sysdeps/generic/dl-iteratephdr-static.c: Likewise. * sysdeps/generic/strnlen.c: Likewise. * sysdeps/mach/hurd/powerpc/bits/sigcontext.h: Likewise. * sysdeps/mach/hurd/recvmsg.c: Likewise. * sysdeps/mach/hurd/sendmsg.c: Likewise. * sysdeps/mach/hurd/spawni.c: Likewise. * sysdeps/mach/powerpc/machine-sp.h: Likewise. * sysdeps/mach/powerpc/sysdep.h: Likewise. * sysdeps/mach/powerpc/thread_state.h: Likewise. * sysdeps/unix/bsd/bsd4.4/bits/socket.h: Likewise. * sysdeps/unix/sysv/linux/ia64/dl-iteratephdr-static.c: Likewise. * sysdeps/x86_64/gmp-mparam.h: Likewise. --- sysdeps/arm/linuxthreads/pspinlock.c | 8 ++++---- sysdeps/arm/linuxthreads/pt-machine.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sysdeps/arm/linuxthreads/pspinlock.c b/sysdeps/arm/linuxthreads/pspinlock.c index 010ad33259..665e270b69 100644 --- a/sysdeps/arm/linuxthreads/pspinlock.c +++ b/sysdeps/arm/linuxthreads/pspinlock.c @@ -3,16 +3,16 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ diff --git a/sysdeps/arm/linuxthreads/pt-machine.h b/sysdeps/arm/linuxthreads/pt-machine.h index 11127eac1a..71001ebc25 100644 --- a/sysdeps/arm/linuxthreads/pt-machine.h +++ b/sysdeps/arm/linuxthreads/pt-machine.h @@ -5,16 +5,16 @@ Contributed by Philip Blundell . 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 - published by the Free Software Foundation; either version 2 of the + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ From 1717fd72fb6af42b85c6bc0612c5c22820dccb0f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 27 Aug 2002 02:43:04 +0000 Subject: [PATCH 2860/4487] 2002-08-26 Roland McGrath * sysdeps/generic/sigset-cvt-mask.h (sigset_set_old_mask): Replace macro with inline function. (sigset_get_old_mask): Likewise. * sysdeps/posix/sigblock.c (__sigblock): Update callers. * sysdeps/posix/sigsetmask.c (__sigsetmask): Likewise. * sysdeps/posix/sigpause.c (__sigpause): Likewise. * sysdeps/posix/sigvec.c (__sigvec, sigvec_wrapper_handler): Likewise. * sysdeps/unix/sysv/aix/sigset-cvt-mask.h (sigset_set_old_mask, sigset_get_old_mask): Make these macros return values. * sysdeps/unix/sysv/linux/sigset-cvt-mask.h: Likewise. * sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h: Likewise. --- sysdeps/unix/sysv/aix/sigset-cvt-mask.h | 9 +++------ sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h | 10 +++++----- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/sysdeps/unix/sysv/aix/sigset-cvt-mask.h b/sysdeps/unix/sysv/aix/sigset-cvt-mask.h index 762144e3ed..50d70ae81a 100644 --- a/sysdeps/unix/sysv/aix/sigset-cvt-mask.h +++ b/sysdeps/unix/sysv/aix/sigset-cvt-mask.h @@ -1,6 +1,6 @@ /* Convert between lowlevel sigmask and libc representation of sigset_t. AIX version. - Copyright (C) 1998, 2000 Free Software Foundation, Inc. + Copyright (C) 1998,2000,02 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 @@ -19,10 +19,7 @@ 02111-1307 USA. */ #define sigset_set_old_mask(set, mask) \ - do { \ - (set)->__losigs = (unsigned int) mask; \ - (set)->__hisigs = 0; \ - } while (0) + ((set)->__losigs = (unsigned int) (mask), (set)->__hisigs = 0, 0) #define sigset_get_old_mask(set, mask) \ - ((mask) = (unsigned int) (set)->__losigs) + ((unsigned int) (set)->__losigs) diff --git a/sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h b/sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h index 7b082f746d..f647dfed86 100644 --- a/sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h +++ b/sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h @@ -1,6 +1,6 @@ /* Convert between lowlevel sigmask and libc representation of sigset_t. SysVr4 version. - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1998, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Joe Keane . @@ -20,14 +20,14 @@ 02111-1307 USA. */ #define sigset_set_old_mask(set, mask) \ - do { \ + ({ \ unsigned long int *__ptr; \ __ptr = &(set)->__sigbits[0]; \ __ptr[0] = (mask); \ __ptr[1] = 0ul; \ __ptr[2] = 0ul; \ __ptr[3] = 0ul; \ - } while (0) + 0; }) -#define sigset_get_old_mask(set, mask) \ - ((mask) = (unsigned int) (set)->__sigbits[0]) +#define sigset_get_old_mask(set) \ + ((unsigned int) (set)->__sigbits[0]) From 0a59ce67bf40b3fda7da104eb39cd094f28d847f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 27 Aug 2002 09:22:36 +0000 Subject: [PATCH 2861/4487] 2002-08-26 Roland McGrath * sysdeps/gnu/Versions: New file. * sysdeps/unix/sysv/linux/Versions (libc: GLIBC_2.1): Remove _sys_errlist; sys_errlist; _sys_nerr; sys_nerr; from here. * sysdeps/gnu/Makefile ($(..)sysdeps/gnu/errlist-compat.c): New target. ($(objpfx)errlist.d): Depend on $(..)sysdeps/gnu/errlist-compat.c. * sysdeps/gnu/errlist.awk: Make output define _sys_errlist_internal and _sys_nerr_internal instead of anything else. Make it include "errlist-compat.c" if [!NOT_IN_libc && !ERRLIST_NO_COMPAT]. Make it emit some asm magic if [EMIT_ERR_MAX]. * sysdeps/gnu/errlist.c: Regenerated. * sysdeps/gnu/errlist-compat.awk: New file. * sysdeps/gnu/errlist-compat.c: New file (generated). * sysdeps/mach/hurd/errlist.c (ERRLIST_NO_COMPAT): New macro. (_sys_errlist_internal): Define this as a macro for _hurd_errlist. (_sys_nerr_internal): Define this is a macro for _hurd_nerr. (SYS_ERRLIST, SYS_NERR): Macros removed. (sys_nerr, _sys_nerr): Remove these weak aliases. * sysdeps/unix/sysv/linux/errlist.c: File removed. * sysdeps/unix/sysv/linux/errlist.h: File removed. * sysdeps/unix/sysv/linux/arm/errlist.c: File removed. --- sysdeps/unix/sysv/linux/arm/errlist.c | 53 --------------------------- 1 file changed, 53 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/arm/errlist.c diff --git a/sysdeps/unix/sysv/linux/arm/errlist.c b/sysdeps/unix/sysv/linux/arm/errlist.c deleted file mode 100644 index ba8c44b88c..0000000000 --- a/sysdeps/unix/sysv/linux/arm/errlist.c +++ /dev/null @@ -1,53 +0,0 @@ -/* Copyright (C) 1998, 2000, 2002 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. */ - -#include -#include -#include - -#define SYS_ERRLIST __new_sys_errlist -#define SYS_NERR __new_sys_nerr - -#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) -asm (".data; .globl __old_sys_errlist; __old_sys_errlist:"); -#endif - -#include - -#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) -asm (".type __old_sys_errlist,%object;.size __old_sys_errlist," - OLD_ERRLIST_SIZE_STR "*" PTR_SIZE_STR); - -extern const char *const *__old_sys_errlist; - -const int __old_sys_nerr = OLD_ERRLIST_SIZE; - -strong_alias (__old_sys_nerr, _old_sys_nerr); -compat_symbol (libc, __old_sys_nerr, _sys_nerr, GLIBC_2_0); -compat_symbol (libc, _old_sys_nerr, sys_nerr, GLIBC_2_0); -strong_alias (__old_sys_errlist, _old_sys_errlist); -compat_symbol (libc, __old_sys_errlist, _sys_errlist, GLIBC_2_0); -compat_symbol (libc, _old_sys_errlist, sys_errlist, GLIBC_2_0); -#endif - -strong_alias (__new_sys_nerr, _new_sys_nerr) -versioned_symbol (libc, __new_sys_nerr, _sys_nerr, GLIBC_2_1); -versioned_symbol (libc, _new_sys_nerr, sys_nerr, GLIBC_2_1); -strong_alias (__new_sys_errlist, _new_sys_errlist) -versioned_symbol (libc, __new_sys_errlist, _sys_errlist, GLIBC_2_1); -versioned_symbol (libc, _new_sys_errlist, sys_errlist, GLIBC_2_1); From bc2a913308e7afa99baed7bc70bdcd29066601c1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 27 Aug 2002 12:07:22 +0000 Subject: [PATCH 2862/4487] Add bits/link.h. --- sysdeps/arm/Dist | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/arm/Dist b/sysdeps/arm/Dist index d78de40205..441c9ba492 100644 --- a/sysdeps/arm/Dist +++ b/sysdeps/arm/Dist @@ -1 +1,2 @@ ieee754.h +bits/link.h From 5e1676a5fd2d482ea21cfed88f01196df1f2a85a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 27 Aug 2002 15:52:10 +0000 Subject: [PATCH 2863/4487] Extra files to distribute for Hurd/Alpha. --- sysdeps/mach/hurd/alpha/Dist | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/mach/hurd/alpha/Dist diff --git a/sysdeps/mach/hurd/alpha/Dist b/sysdeps/mach/hurd/alpha/Dist new file mode 100644 index 0000000000..c58180257e --- /dev/null +++ b/sysdeps/mach/hurd/alpha/Dist @@ -0,0 +1 @@ +static-start.S From b45f2816804954e716bece202614a33e0f31d716 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 27 Aug 2002 16:06:03 +0000 Subject: [PATCH 2864/4487] Add sys/user.h. --- sysdeps/unix/sysv/linux/mips/Dist | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/mips/Dist b/sysdeps/unix/sysv/linux/mips/Dist index dd43ebc5ba..1d74119a6d 100644 --- a/sysdeps/unix/sysv/linux/mips/Dist +++ b/sysdeps/unix/sysv/linux/mips/Dist @@ -9,4 +9,5 @@ sys/cachectl.h sys/procfs.h sys/sysmips.h sys/tas.h +sys/user.h xstatconv.c From 2547aab14a8ae5e92f236eda22b294b1f4a311dd Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 28 Aug 2002 08:30:53 +0000 Subject: [PATCH 2865/4487] Additional files to distribute for Unix on Arm. --- sysdeps/unix/arm/Dist | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/arm/Dist diff --git a/sysdeps/unix/arm/Dist b/sysdeps/unix/arm/Dist new file mode 100644 index 0000000000..7785d5ee70 --- /dev/null +++ b/sysdeps/unix/arm/Dist @@ -0,0 +1 @@ +dl-brk.S From 00167bfefd79c51240e4d6d38f9d3cab4d090ba8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 28 Aug 2002 08:35:02 +0000 Subject: [PATCH 2866/4487] Extra files to distribute on HP. --- sysdeps/unix/bsd/hp/Dist | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/bsd/hp/Dist diff --git a/sysdeps/unix/bsd/hp/Dist b/sysdeps/unix/bsd/hp/Dist new file mode 100644 index 0000000000..ccd3a610ee --- /dev/null +++ b/sysdeps/unix/bsd/hp/Dist @@ -0,0 +1 @@ +m68k/dl-brk.S From bbc364a939134b1a1ecb5440f4ce32d4d982894c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 28 Aug 2002 08:36:00 +0000 Subject: [PATCH 2867/4487] Extra files to distribute for OSF. --- sysdeps/unix/bsd/osf/Dist | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/bsd/osf/Dist diff --git a/sysdeps/unix/bsd/osf/Dist b/sysdeps/unix/bsd/osf/Dist new file mode 100644 index 0000000000..e792f44bd5 --- /dev/null +++ b/sysdeps/unix/bsd/osf/Dist @@ -0,0 +1 @@ +alpha/dl-brk.S From 658e7fb4a4d645c7acefe8a6a0a47ba2ac27970d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 28 Aug 2002 08:39:11 +0000 Subject: [PATCH 2868/4487] Extra files to distribute for SunOS <= 4. --- sysdeps/unix/bsd/sun/Dist | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/bsd/sun/Dist diff --git a/sysdeps/unix/bsd/sun/Dist b/sysdeps/unix/bsd/sun/Dist new file mode 100644 index 0000000000..ccd3a610ee --- /dev/null +++ b/sysdeps/unix/bsd/sun/Dist @@ -0,0 +1 @@ +m68k/dl-brk.S From 48fa58aa122ab1ba5068b8455f7ece92c9767e94 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 28 Aug 2002 08:54:42 +0000 Subject: [PATCH 2869/4487] Add dl-brk.S. --- sysdeps/unix/sysv/linux/alpha/Dist | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist index d80c5c2425..63e68d3d69 100644 --- a/sysdeps/unix/sysv/linux/alpha/Dist +++ b/sysdeps/unix/sysv/linux/alpha/Dist @@ -1,6 +1,7 @@ alpha/ptrace.h alpha/regdef.h clone.S +dl-brk.S ieee_get_fp_control.S ieee_set_fp_control.S ioperm.c From bbb3856d85b5c42826e6172b81991d5fd867f064 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 28 Aug 2002 21:26:20 +0000 Subject: [PATCH 2870/4487] Avoid unescaped newlines in string constants. --- sysdeps/arm/dl-machine.h | 355 ++++++++++--------- sysdeps/cris/dl-machine.h | 150 ++++---- sysdeps/unix/sysv/aix/gettimeofday.c | 12 +- sysdeps/unix/sysv/linux/m68k/register-dump.h | 20 +- 4 files changed, 269 insertions(+), 268 deletions(-) diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index aeee1d7892..9905d15001 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -126,14 +126,15 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) and then redirect to the address it returns. */ // macro for handling PIC situation.... #ifdef PIC -#define CALL_ROUTINE(x) " ldr sl,0f - add sl, pc, sl -1: ldr r2, 2f - mov lr, pc - add pc, sl, r2 - b 3f -0: .word _GLOBAL_OFFSET_TABLE_ - 1b - 4 -2: .word " #x "(GOTOFF) +#define CALL_ROUTINE(x) "\ + ldr sl,0f\n\ + add sl, pc, sl\n\ +1: ldr r2, 2f\n\ + mov lr, pc\n\ + add pc, sl, r2\n\ + b 3f\n\ +0: .word _GLOBAL_OFFSET_TABLE_ - 1b - 4\n\ +2: .word " #x "(GOTOFF)\n\ 3: " #else #define CALL_ROUTINE(x) " bl " #x @@ -141,114 +142,114 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) #ifndef PROF # define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\ - .text - .globl _dl_runtime_resolve - .type _dl_runtime_resolve, #function - .align 2 -_dl_runtime_resolve: - @ we get called with - @ stack[0] contains the return address from this call - @ ip contains &GOT[n+3] (pointer to function) - @ lr points to &GOT[2] - - @ save almost everything; lr is already on the stack - stmdb sp!,{r0-r3,sl,fp} - - @ prepare to call fixup() - @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each - sub r1, ip, lr - sub r1, r1, #4 - add r1, r1, r1 - - @ get pointer to linker struct - ldr r0, [lr, #-4] - - @ call fixup routine - " CALL_ROUTINE(fixup) " - - @ save the return - mov ip, r0 - - @ restore the stack - ldmia sp!,{r0-r3,sl,fp,lr} - - @ jump to the newly found address - mov pc, ip - - .size _dl_runtime_resolve, .-_dl_runtime_resolve - - .globl _dl_runtime_profile - .type _dl_runtime_profile, #function - .align 2 -_dl_runtime_profile: - @ save almost everything; lr is already on the stack - stmdb sp!,{r0-r3,sl,fp} - - @ prepare to call fixup() - @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each - sub r1, ip, lr - sub r1, r1, #4 - add r1, r1, r1 - - @ get pointer to linker struct - ldr r0, [lr, #-4] - - @ call profiling fixup routine - " CALL_ROUTINE(profile_fixup) " - - @ save the return - mov ip, r0 - - @ restore the stack - ldmia sp!,{r0-r3,sl,fp,lr} - - @ jump to the newly found address - mov pc, ip - - .size _dl_runtime_resolve, .-_dl_runtime_resolve - .previous + .text\n\ + .globl _dl_runtime_resolve\n\ + .type _dl_runtime_resolve, #function\n\ + .align 2\n\ +_dl_runtime_resolve:\n\ + @ we get called with\n\ + @ stack[0] contains the return address from this call\n\ + @ ip contains &GOT[n+3] (pointer to function)\n\ + @ lr points to &GOT[2]\n\ +\n\ + @ save almost everything; lr is already on the stack\n\ + stmdb sp!,{r0-r3,sl,fp}\n\ +\n\ + @ prepare to call fixup()\n\ + @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each\n\ + sub r1, ip, lr\n\ + sub r1, r1, #4\n\ + add r1, r1, r1\n\ +\n\ + @ get pointer to linker struct\n\ + ldr r0, [lr, #-4]\n\ +\n\ + @ call fixup routine\n\ + " CALL_ROUTINE(fixup) "\n\ +\n\ + @ save the return\n\ + mov ip, r0\n\ +\n\ + @ restore the stack\n\ + ldmia sp!,{r0-r3,sl,fp,lr}\n\ +\n\ + @ jump to the newly found address\n\ + mov pc, ip\n\ +\n\ + .size _dl_runtime_resolve, .-_dl_runtime_resolve\n\ +\n\ + .globl _dl_runtime_profile\n\ + .type _dl_runtime_profile, #function\n\ + .align 2\n\ +_dl_runtime_profile:\n\ + @ save almost everything; lr is already on the stack\n\ + stmdb sp!,{r0-r3,sl,fp}\n\ +\n\ + @ prepare to call fixup()\n\ + @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each\n\ + sub r1, ip, lr\n\ + sub r1, r1, #4\n\ + add r1, r1, r1\n\ +\n\ + @ get pointer to linker struct\n\ + ldr r0, [lr, #-4]\n\ +\n\ + @ call profiling fixup routine\n\ + " CALL_ROUTINE(profile_fixup) "\n\ +\n\ + @ save the return\n\ + mov ip, r0\n\ +\n\ + @ restore the stack\n\ + ldmia sp!,{r0-r3,sl,fp,lr}\n\ +\n\ + @ jump to the newly found address\n\ + mov pc, ip\n\ +\n\ + .size _dl_runtime_resolve, .-_dl_runtime_resolve\n\ + .previous\n\ "); #else // PROF # define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\ - .text - .globl _dl_runtime_resolve - .globl _dl_runtime_profile - .type _dl_runtime_resolve, #function - .type _dl_runtime_profile, #function - .align 2 -_dl_runtime_resolve: -_dl_runtime_profile: - @ we get called with - @ stack[0] contains the return address from this call - @ ip contains &GOT[n+3] (pointer to function) - @ lr points to &GOT[2] - - @ save almost everything; return add is already on the stack - stmdb sp!,{r0-r3,sl,fp} - - @ prepare to call fixup() - @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each - sub r1, ip, lr - sub r1, r1, #4 - add r1, r1, r1 - - @ get pointer to linker struct - ldr r0, [lr, #-4] - - @ call profiling fixup routine - " CALL_ROUTINE(fixup) " - - @ save the return - mov ip, r0 - - @ restore the stack - ldmia sp!,{r0-r3,sl,fp,lr} - - @ jump to the newly found address - mov pc, ip - - .size _dl_runtime_profile, .-_dl_runtime_profile - .previous + .text\n\ + .globl _dl_runtime_resolve\n\ + .globl _dl_runtime_profile\n\ + .type _dl_runtime_resolve, #function\n\ + .type _dl_runtime_profile, #function\n\ + .align 2\n\ +_dl_runtime_resolve:\n\ +_dl_runtime_profile:\n\ + @ we get called with\n\ + @ stack[0] contains the return address from this call\n\ + @ ip contains &GOT[n+3] (pointer to function)\n\ + @ lr points to &GOT[2]\n\ +\n\ + @ save almost everything; return add is already on the stack\n\ + stmdb sp!,{r0-r3,sl,fp}\n\ +\n\ + @ prepare to call fixup()\n\ + @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each\n\ + sub r1, ip, lr\n\ + sub r1, r1, #4\n\ + add r1, r1, r1\n\ +\n\ + @ get pointer to linker struct\n\ + ldr r0, [lr, #-4]\n\ +\n\ + @ call profiling fixup routine\n\ + " CALL_ROUTINE(fixup) "\n\ +\n\ + @ save the return\n\ + mov ip, r0\n\ +\n\ + @ restore the stack\n\ + ldmia sp!,{r0-r3,sl,fp,lr}\n\ +\n\ + @ jump to the newly found address\n\ + mov pc, ip\n\ +\n\ + .size _dl_runtime_profile, .-_dl_runtime_profile\n\ + .previous\n\ "); #endif //PROF @@ -261,70 +262,70 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) its return value is the user program's entry point. */ #define RTLD_START asm ("\ -.text -.globl _start -.globl _dl_start_user -_start: - @ at start time, all the args are on the stack - mov r0, sp - bl _dl_start - @ returns user entry point in r0 -_dl_start_user: - mov r6, r0 - @ we are PIC code, so get global offset table - ldr sl, .L_GET_GOT - add sl, pc, sl -.L_GOT_GOT: - @ Store the highest stack address - ldr r1, .L_STACK_END - ldr r1, [sl, r1] - str sp, [r1] - @ See if we were run as a command with the executable file - @ name as an extra leading argument. - ldr r4, .L_SKIP_ARGS - ldr r4, [sl, r4] - @ get the original arg count - ldr r1, [sp] - @ subtract _dl_skip_args from it - sub r1, r1, r4 - @ adjust the stack pointer to skip them - add sp, sp, r4, lsl #2 - @ get the argv address - add r2, sp, #4 - @ store the new argc in the new stack location - str r1, [sp] - @ compute envp - add r3, r2, r1, lsl #2 - add r3, r3, #4 - - @ now we call _dl_init - ldr r0, .L_LOADED - ldr r0, [sl, r0] - ldr r0, [r0] - @ call _dl_init - bl _dl_init_internal(PLT) - @ clear the startup flag - ldr r2, .L_STARTUP_FLAG - ldr r1, [sl, r2] - mov r0, #0 - str r0, [r1] - @ load the finalizer function - ldr r0, .L_FINI_PROC - ldr r0, [sl, r0] - @ jump to the user_s entry point - mov pc, r6 -.L_GET_GOT: - .word _GLOBAL_OFFSET_TABLE_ - .L_GOT_GOT - 4 \n\ -.L_SKIP_ARGS: \n\ - .word _dl_skip_args(GOTOFF) \n\ -.L_STARTUP_FLAG: - .word _dl_starting_up(GOT) -.L_FINI_PROC: - .word _dl_fini(GOT) -.L_STACK_END: - .word __libc_stack_end(GOT) -.L_LOADED: - .word _rtld_local(GOT) +.text\n\ +.globl _start\n\ +.globl _dl_start_user\n\ +_start:\n\ + @ at start time, all the args are on the stack\n\ + mov r0, sp\n\ + bl _dl_start\n\ + @ returns user entry point in r0\n\ +_dl_start_user:\n\ + mov r6, r0\n\ + @ we are PIC code, so get global offset table\n\ + ldr sl, .L_GET_GOT\n\ + add sl, pc, sl\n\ +.L_GOT_GOT:\n\ + @ Store the highest stack address\n\ + ldr r1, .L_STACK_END\n\ + ldr r1, [sl, r1]\n\ + str sp, [r1]\n\ + @ See if we were run as a command with the executable file\n\ + @ name as an extra leading argument.\n\ + ldr r4, .L_SKIP_ARGS\n\ + ldr r4, [sl, r4]\n\ + @ get the original arg count\n\ + ldr r1, [sp]\n\ + @ subtract _dl_skip_args from it\n\ + sub r1, r1, r4\n\ + @ adjust the stack pointer to skip them\n\ + add sp, sp, r4, lsl #2\n\ + @ get the argv address\n\ + add r2, sp, #4\n\ + @ store the new argc in the new stack location\n\ + str r1, [sp]\n\ + @ compute envp\n\ + add r3, r2, r1, lsl #2\n\ + add r3, r3, #4\n\ +\n\ + @ now we call _dl_init\n\ + ldr r0, .L_LOADED\n\ + ldr r0, [sl, r0]\n\ + ldr r0, [r0]\n\ + @ call _dl_init\n\ + bl _dl_init_internal(PLT)\n\ + @ clear the startup flag\n\ + ldr r2, .L_STARTUP_FLAG\n\ + ldr r1, [sl, r2]\n\ + mov r0, #0\n\ + str r0, [r1]\n\ + @ load the finalizer function\n\ + ldr r0, .L_FINI_PROC\n\ + ldr r0, [sl, r0]\n\ + @ jump to the user_s entry point\n\ + mov pc, r6\n\ +.L_GET_GOT:\n\ + .word _GLOBAL_OFFSET_TABLE_ - .L_GOT_GOT - 4\n\ +.L_SKIP_ARGS:\n\ + .word _dl_skip_args(GOTOFF)\n\ +.L_STARTUP_FLAG:\n\ + .word _dl_starting_up(GOT)\n\ +.L_FINI_PROC:\n\ + .word _dl_fini(GOT)\n\ +.L_STACK_END:\n\ + .word __libc_stack_end(GOT)\n\ +.L_LOADED:\n\ + .word _rtld_local(GOT)\n\ .previous\n\ "); diff --git a/sysdeps/cris/dl-machine.h b/sysdeps/cris/dl-machine.h index 51ae43d096..0fa13a7967 100644 --- a/sysdeps/cris/dl-machine.h +++ b/sysdeps/cris/dl-machine.h @@ -129,27 +129,27 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) and the link map in MOF. */ #define TRAMPOLINE_TEMPLATE(tramp_name, fixup_name) \ -"; Trampoline for " #fixup_name " - .globl " #tramp_name " - .type " #tramp_name ", @function -" #tramp_name ": - push $r13 - push $r12 - push $r11 - push $r10 - push $r9 - push $srp - move.d [$sp+6*4],$r11 - move $mof,$r10 - " CALL_FN (fixup_name) " - move.d $r10,[$sp+6*4] - pop $srp - pop $r9 - pop $r10 - pop $r11 - pop $r12 - pop $r13 - jump [$sp+] +"; Trampoline for " #fixup_name "\n\ + .globl " #tramp_name "\n\ + .type " #tramp_name ", @function\n\ +" #tramp_name ":\n\ + push $r13\n\ + push $r12\n\ + push $r11\n\ + push $r10\n\ + push $r9\n\ + push $srp\n\ + move.d [$sp+6*4],$r11\n\ + move $mof,$r10\n\ + " CALL_FN (fixup_name) "\n\ + move.d $r10,[$sp+6*4]\n\ + pop $srp\n\ + pop $r9\n\ + pop $r10\n\ + pop $r11\n\ + pop $r12\n\ + pop $r13\n\ + jump [$sp+]\n\ .size " #tramp_name ", . - " #tramp_name "\n" #ifndef PROF #define ELF_MACHINE_RUNTIME_TRAMPOLINE \ @@ -172,60 +172,60 @@ asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \ its return value is the user program's entry point. */ #define RTLD_START asm ("\ - .text - .globl _start - .type _start,@function -_start: - move.d $sp,$r10 - " CALL_FN (_dl_start) " - /* FALLTHRU */ - - .globl _dl_start_user - .type _dl_start_user,@function -_dl_start_user: - ; Save the user entry point address in R1. - move.d $r10,$r1 - ; Point R0 at the GOT. - move.d $pc,$r0 - sub.d .:GOTOFF,$r0 - ; Remember the highest stack address. - move.d [$r0+__libc_stack_end:GOT16],$r13 - move.d $sp,[$r13] - ; See if we were run as a command with the executable file - ; name as an extra leading argument. - move.d [$r0+_dl_skip_args:GOT16],$r13 - move.d [$r13],$r9 - ; Get the original argument count - move.d [$sp],$r11 - ; Subtract _dl_skip_args from it. - sub.d $r9,$r11 - ; Adjust the stack pointer to skip _dl_skip_args words. - addi $r9.d,$sp - ; Put the new argc in place as expected by the user entry. - move.d $r11,[$sp] - ; Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env) - ; env: skip scaled argc and skip stored argc and NULL at end of argv[]. - move.d $sp,$r13 - addi $r11.d,$r13 - addq 8,$r13 - ; argv: skip stored argc. - move.d $sp,$r12 - addq 4,$r12 - ; main_map: at _dl_loaded. - move.d [$r0+_rtld_local:GOT16],$r9 - move.d [$r9],$r10 - move.d _dl_init_internal:PLTG,$r9 - add.d $r0,$r9 - jsr $r9 - ; Pass our finalizer function to the user in R10. - move.d [$r0+_dl_fini:GOT16],$r10 - ; Terminate the frame-pointer. - moveq 0,$r8 - ; Cause SEGV if user entry returns. - move $r8,$srp - ; Jump to the user's entry point. - jump $r1 - .size _dl_start_user, . - _dl_start_user + .text\n\ + .globl _start\n\ + .type _start,@function\n\ +_start:\n\ + move.d $sp,$r10\n\ + " CALL_FN (_dl_start) "\n\ + /* FALLTHRU */\n\ +\n\ + .globl _dl_start_user\n\ + .type _dl_start_user,@function\n\ +_dl_start_user:\n\ + ; Save the user entry point address in R1.\n\ + move.d $r10,$r1\n\ + ; Point R0 at the GOT.\n\ + move.d $pc,$r0\n\ + sub.d .:GOTOFF,$r0\n\ + ; Remember the highest stack address.\n\ + move.d [$r0+__libc_stack_end:GOT16],$r13\n\ + move.d $sp,[$r13]\n\ + ; See if we were run as a command with the executable file\n\ + ; name as an extra leading argument.\n\ + move.d [$r0+_dl_skip_args:GOT16],$r13\n\ + move.d [$r13],$r9\n\ + ; Get the original argument count\n\ + move.d [$sp],$r11\n\ + ; Subtract _dl_skip_args from it.\n\ + sub.d $r9,$r11\n\ + ; Adjust the stack pointer to skip _dl_skip_args words.\n\ + addi $r9.d,$sp\n\ + ; Put the new argc in place as expected by the user entry.\n\ + move.d $r11,[$sp]\n\ + ; Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env)\n\ + ; env: skip scaled argc and skip stored argc and NULL at end of argv[].\n\ + move.d $sp,$r13\n\ + addi $r11.d,$r13\n\ + addq 8,$r13\n\ + ; argv: skip stored argc.\n\ + move.d $sp,$r12\n\ + addq 4,$r12\n\ + ; main_map: at _dl_loaded.\n\ + move.d [$r0+_rtld_local:GOT16],$r9\n\ + move.d [$r9],$r10\n\ + move.d _dl_init_internal:PLTG,$r9\n\ + add.d $r0,$r9\n\ + jsr $r9\n\ + ; Pass our finalizer function to the user in R10.\n\ + move.d [$r0+_dl_fini:GOT16],$r10\n\ + ; Terminate the frame-pointer.\n\ + moveq 0,$r8\n\ + ; Cause SEGV if user entry returns.\n\ + move $r8,$srp\n\ + ; Jump to the user's entry point.\n\ + jump $r1\n\ + .size _dl_start_user, . - _dl_start_user\n\ .previous"); /* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so diff --git a/sysdeps/unix/sysv/aix/gettimeofday.c b/sysdeps/unix/sysv/aix/gettimeofday.c index a0105ae080..34a92eb391 100644 --- a/sysdeps/unix/sysv/aix/gettimeofday.c +++ b/sysdeps/unix/sysv/aix/gettimeofday.c @@ -32,12 +32,12 @@ extern int rtc_upper (void); extern int rtc_lower (void); /* Assembler Routines to access the timer registers */ -asm(" -.rtc_upper: mfspr 3,4 # copy RTCU to return register - blr - -.rtc_lower: mfspr 3,5 # copy RTCL to return register - blr +asm("\n\ +.rtc_upper: mfspr 3,4 # copy RTCU to return register\n\ + blr\n\ +\n\ +.rtc_lower: mfspr 3,5 # copy RTCL to return register\n\ + blr\n\ "); /* Get the current time of day and timezone information, diff --git a/sysdeps/unix/sysv/linux/m68k/register-dump.h b/sysdeps/unix/sysv/linux/m68k/register-dump.h index ab9a155121..bece6d5084 100644 --- a/sysdeps/unix/sysv/linux/m68k/register-dump.h +++ b/sysdeps/unix/sysv/linux/m68k/register-dump.h @@ -1,5 +1,5 @@ /* Dump registers. - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1998, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab . @@ -51,15 +51,15 @@ static void __attribute__ ((unused)) __dummy__ (void) { - asm (" -catch_segfault: - move.l 12(%%sp),%%a0 - lea %c0(%%a0),%%a0 - /* Clear the first 4 bytes to make it a null fp state, just - in case the handler does return. */ - clr.l (%%a0)+ - movem.l %%d2-%%d7/%%a2-%%a6,(%%a0) - fmovem.x %%fp2-%%fp7,11*4(%%a0) + asm ("\n\ +catch_segfault:\n\ + move.l 12(%%sp),%%a0\n\ + lea %c0(%%a0),%%a0\n\ + /* Clear the first 4 bytes to make it a null fp state, just\n\ + in case the handler does return. */\n\ + clr.l (%%a0)+\n\ + movem.l %%d2-%%d7/%%a2-%%a6,(%%a0)\n\ + fmovem.x %%fp2-%%fp7,11*4(%%a0)\n\ jra real_catch_segfault" : : "n" (offsetof (struct sigcontext, sc_fpstate))); } From 9d131243dfcd2c1fedb7b6fa009257ad471d22b4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 28 Aug 2002 22:15:22 +0000 Subject: [PATCH 2871/4487] (libc_cv_alpha_hidden_gprel): New check. (PI_STATIC_AND_HIDDEN): Define if check succeeded. --- sysdeps/alpha/elf/configure.in | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/sysdeps/alpha/elf/configure.in b/sysdeps/alpha/elf/configure.in index 7548046f50..29daf4fc9c 100644 --- a/sysdeps/alpha/elf/configure.in +++ b/sysdeps/alpha/elf/configure.in @@ -51,3 +51,29 @@ if test $libc_cv_alpha_tls = yes; then AC_DEFINE(HAVE_TLS_SUPPORT) fi fi + +AC_CACHE_CHECK(for GP relative module local relocs, libc_cv_alpha_hidden_gprel, [dnl +cat > conftest.c <<\EOF +static int bar; +int baz __attribute__((visibility("hidden"))); + +int foo (void) +{ + return bar + baz; +} +EOF +dnl + +libc_cv_alpha_hidden_gprel=no +if AC_TRY_COMMAND(${CC-cc} -S $CFLAGS -O2 -fpic conftest.c 1>&AC_FD_CC); then + if grep -q 'bar.*!gprel' conftest.s \ + && grep -q 'baz.*!gprel' conftest.s \ + && ! grep -q 'bar.*!literal' conftest.s \ + && ! grep -q 'baz.*!literal' conftest.s; then + libc_cv_alpha_hidden_gprel=yes + fi +fi +rm -f conftest*]) +if test $libc_cv_alpha_hidden_gprel = yes; then + AC_DEFINE(PI_STATIC_AND_HIDDEN) +fi From efd36212ebeebf88a6cd2bb77e726a2787af09f5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 28 Aug 2002 22:15:36 +0000 Subject: [PATCH 2872/4487] Regenerated. --- sysdeps/alpha/elf/configure | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/sysdeps/alpha/elf/configure b/sysdeps/alpha/elf/configure index 3346b8e48d..ab3c0932aa 100644 --- a/sysdeps/alpha/elf/configure +++ b/sysdeps/alpha/elf/configure @@ -58,3 +58,38 @@ EOF fi fi + +echo $ac_n "checking for GP relative module local relocs""... $ac_c" 1>&6 +echo "configure:20: checking for GP relative module local relocs" >&5 +if eval "test \"`echo '$''{'libc_cv_alpha_hidden_gprel'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.c <<\EOF +static int bar; +int baz __attribute__((visibility("hidden"))); + +int foo (void) +{ + return bar + baz; +} +EOF + +libc_cv_alpha_hidden_gprel=no +if { ac_try='${CC-cc} -S $CFLAGS -O2 -fpic conftest.c 1>&5'; { (eval echo configure:35: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + if grep -q 'bar.*!gprel' conftest.s \ + && grep -q 'baz.*!gprel' conftest.s \ + && ! grep -q 'bar.*!literal' conftest.s \ + && ! grep -q 'baz.*!literal' conftest.s; then + libc_cv_alpha_hidden_gprel=yes + fi +fi +rm -f conftest* +fi + +echo "$ac_t""$libc_cv_alpha_hidden_gprel" 1>&6 +if test $libc_cv_alpha_hidden_gprel = yes; then + cat >> confdefs.h <<\EOF +#define PI_STATIC_AND_HIDDEN 1 +EOF + +fi From 0c605f50136059c6084994fc489f3481235e4281 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 28 Aug 2002 23:53:22 +0000 Subject: [PATCH 2873/4487] (libc): Add #errlist-compat comments at GLIBC_2.0, GLIBC_2.1 and GLIBC_2.3. --- sysdeps/unix/sysv/linux/mips/Versions | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sysdeps/unix/sysv/linux/mips/Versions b/sysdeps/unix/sysv/linux/mips/Versions index f71d9b5d88..1569885d56 100644 --- a/sysdeps/unix/sysv/linux/mips/Versions +++ b/sysdeps/unix/sysv/linux/mips/Versions @@ -1,5 +1,13 @@ libc { + # The comment lines with "#errlist-compat" are magic; see errlist-compat.awk. + # When you get an error from errlist-compat.awk, you need to add a new + # version here. Don't do this blindly, since this means changing the ABI + # for all GNU/Linux configurations. + GLIBC_2.0 { + #errlist-compat 1134 + _sys_errlist; sys_errlist; _sys_nerr; sys_nerr; + # Exception handling support functions from libgcc __register_frame; __register_frame_table; __deregister_frame; __frame_state_for; __register_frame_info_table; @@ -13,8 +21,16 @@ libc { # s* sysmips; } + GLIBC_2.1 { + #errlist-compat 1134 + _sys_errlist; sys_errlist; _sys_nerr; sys_nerr; + } GLIBC_2.2 { # _* _test_and_set; } + GLIBC_2.3 { + #errlist-compat 1134 + _sys_errlist; sys_errlist; _sys_nerr; sys_nerr; + } } From 6735862339ddbbd9a4ad1503fa39dd6cc135db6e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 28 Aug 2002 23:55:01 +0000 Subject: [PATCH 2874/4487] (libc): Add #errlist-compat comments at GLIBC_2.0, GLIBC_2.1 and GLIBC_2.3. (librt): Add aio_cancel and aio_cancel64 as GLIBC_2.3. --- sysdeps/unix/sysv/linux/alpha/Versions | 22 ++++++++++++++++++++++ sysdeps/unix/sysv/linux/hppa/Versions | 21 ++++++++++++++++++++- 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/Versions b/sysdeps/unix/sysv/linux/alpha/Versions index c18816ca6f..89ec9db1c4 100644 --- a/sysdeps/unix/sysv/linux/alpha/Versions +++ b/sysdeps/unix/sysv/linux/alpha/Versions @@ -1,5 +1,14 @@ libc { + # The comment lines with "#errlist-compat" are magic; see + # sysdeps/gnu/errlist-compat.awk. + # When you get an error from errlist-compat.awk, you need to add a new + # version here. Don't do this blindly, since this means changing the ABI + # for all GNU/Linux configurations. + GLIBC_2.0 { + #errlist-compat 131 + _sys_errlist; sys_errlist; _sys_nerr; sys_nerr; + # Unfortunately in wider use. _inb; _inw; _inl; _outb; _outw; _outl; _bus_base; _bus_base_sparse; _hae_shift; @@ -24,6 +33,9 @@ libc { pciconfig_read; pciconfig_write; sethae; } GLIBC_2.1 { + #errlist-compat 131 + _sys_errlist; sys_errlist; _sys_nerr; sys_nerr; + # Linux/Alpha 64-bit timeval functions. __select; select; adjtime; adjtimex; __adjtimex; @@ -57,4 +69,14 @@ libc { # w* wordexp; } + GLIBC_2.3 { + #errlist-compat 132 + _sys_errlist; sys_errlist; _sys_nerr; sys_nerr; + } +} +librt { + GLIBC_2.3 { + # AIO functions. + aio_cancel; aio_cancel64; + } } diff --git a/sysdeps/unix/sysv/linux/hppa/Versions b/sysdeps/unix/sysv/linux/hppa/Versions index 475fbe1721..e15c8225fb 100644 --- a/sysdeps/unix/sysv/linux/hppa/Versions +++ b/sysdeps/unix/sysv/linux/hppa/Versions @@ -1,6 +1,25 @@ libc { + # The comment lines with "#errlist-compat" are magic; see errlist-compat.awk. + # When you get an error from errlist-compat.awk, you need to add a new + # version here. Don't do this blindly, since this means changing the ABI + # for all GNU/Linux configurations. + + GLIBC_2.1 { + #errlist-compat 253 + _sys_errlist; sys_errlist; _sys_nerr; sys_nerr; + } GLIBC_2.2 { # New rlimit interface getrlimit; setrlimit; getrlimit64; setrlimit64; } -} \ No newline at end of file + GLIBC_2.3 { + #errlist-compat 254 + _sys_errlist; sys_errlist; _sys_nerr; sys_nerr; + } +} +librt { + GLIBC_2.3 { + # AIO functions. + aio_cancel; aio_cancel64; + } +} From 50d9769d4b242ac20289d0880531cba5f65ed913 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 28 Aug 2002 23:58:00 +0000 Subject: [PATCH 2875/4487] Error codes for Linux/Alpha. --- sysdeps/unix/sysv/linux/alpha/bits/errno.h | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/errno.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/errno.h b/sysdeps/unix/sysv/linux/alpha/bits/errno.h new file mode 100644 index 0000000000..9cdc167bf7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/bits/errno.h @@ -0,0 +1,52 @@ +/* Error constants. Linux/Alpha specific version. + Copyright (C) 1996, 1997, 1998, 1999, 2002 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. */ + +#ifdef _ERRNO_H + +# undef EDOM +# undef EILSEQ +# undef ERANGE +# include + +/* Linux has no ENOTSUP error code. */ +# define ENOTSUP EOPNOTSUPP + +# ifndef ECANCELED +# define ECANCELED 131 +# endif + +# ifndef __ASSEMBLER__ +/* Function to get address of global `errno' variable. */ +extern int *__errno_location (void) __THROW __attribute__ ((__const__)); + +# if !defined _LIBC || defined _LIBC_REENTRANT +/* When using threads, errno is a per-thread value. */ +# define errno (*__errno_location ()) +# endif +# endif /* !__ASSEMBLER__ */ +#endif /* _ERRNO_H */ + +#if !defined _ERRNO_H && defined __need_Emath +/* This is ugly but the kernel header is not clean enough. We must + define only the values EDOM, EILSEQ and ERANGE in case __need_Emath is + defined. */ +# define EDOM 33 /* Math argument out of domain of function. */ +# define EILSEQ 116 /* Illegal byte sequence. */ +# define ERANGE 34 /* Math result not representable. */ +#endif /* !_ERRNO_H && __need_Emath */ From d86c4cf889f58e768d4a1dc25157dc69bfc8d0ef Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 28 Aug 2002 23:58:20 +0000 Subject: [PATCH 2876/4487] (ECANCELED): Define to ECANCELLED if not defined by kernel headers. --- sysdeps/unix/sysv/linux/hppa/bits/errno.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/hppa/bits/errno.h b/sysdeps/unix/sysv/linux/hppa/bits/errno.h index 4d75ff1f61..003d71f622 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/errno.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/errno.h @@ -1,5 +1,5 @@ /* Error constants. Linux/HPPA specific version. - Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1996,1997,1998,1999,2000,2002 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 @@ -26,7 +26,9 @@ /* Linux also has no ECANCELED error code. Since it is not used here we define it to an invalid value. */ -# define ECANCELED 125 +# ifndef ECANCELED +# define ECANCELED ECANCELLED +# endif # ifndef __ASSEMBLER__ /* Function to get address of global `errno' variable. */ @@ -44,6 +46,6 @@ extern int *__errno_location (void) __THROW __attribute__ ((__const__)); define only the values EDOM, EILSEQ and ERANGE in case __need_Emath is defined. */ # define EDOM 33 /* Math argument out of domain of function. */ -# define EILSEQ 84 /* Illegal byte sequence. */ +# define EILSEQ 47 /* Illegal byte sequence. */ # define ERANGE 34 /* Math result not representable. */ #endif /* !_ERRNO_H && __need_Emath */ From 0d272f7da545a5276659f591dcba3243c20df974 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 29 Aug 2002 00:00:38 +0000 Subject: [PATCH 2877/4487] pipe implementation for Linux/Alpha. --- sysdeps/unix/sysv/linux/alpha/pipe.S | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/pipe.S diff --git a/sysdeps/unix/sysv/linux/alpha/pipe.S b/sysdeps/unix/sysv/linux/alpha/pipe.S new file mode 100644 index 0000000000..1e7ec1c199 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/pipe.S @@ -0,0 +1 @@ +#include From e699500013bb17e7cdde5aae9692ee0342ff07a0 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 5 Sep 2002 18:51:44 +0000 Subject: [PATCH 2878/4487] 2002-09-04 Bruno Haible * sysdeps/unix/sysv/linux/sigset-cvt-mask.h (sigset_set_old_mask, sigset_get_old_mask): Turn into inline functions. * sysdeps/unix/sysv/aix/sigset-cvt-mask.h (sigset_set_old_mask, sigset_get_old_mask): Likewise. * sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h (sigset_set_old_mask, sigset_get_old_mask): Likewise. --- sysdeps/unix/sysv/aix/sigset-cvt-mask.h | 16 ++++++++++---- sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h | 26 +++++++++++++---------- 2 files changed, 27 insertions(+), 15 deletions(-) diff --git a/sysdeps/unix/sysv/aix/sigset-cvt-mask.h b/sysdeps/unix/sysv/aix/sigset-cvt-mask.h index 50d70ae81a..cc05fb70fa 100644 --- a/sysdeps/unix/sysv/aix/sigset-cvt-mask.h +++ b/sysdeps/unix/sysv/aix/sigset-cvt-mask.h @@ -18,8 +18,16 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#define sigset_set_old_mask(set, mask) \ - ((set)->__losigs = (unsigned int) (mask), (set)->__hisigs = 0, 0) +static inline int __attribute__ ((unused)) +sigset_set_old_mask (sigset_t *set, int mask) +{ + set->__losigs = (unsigned int) mask; + set->__hisigs = 0; + return 0; +} -#define sigset_get_old_mask(set, mask) \ - ((unsigned int) (set)->__losigs) +static inline int __attribute__ ((unused)) +sigset_get_old_mask (const sigset_t *set) +{ + return (unsigned int) set->__losigs; +} diff --git a/sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h b/sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h index f647dfed86..5b7ea25885 100644 --- a/sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h +++ b/sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h @@ -19,15 +19,19 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#define sigset_set_old_mask(set, mask) \ - ({ \ - unsigned long int *__ptr; \ - __ptr = &(set)->__sigbits[0]; \ - __ptr[0] = (mask); \ - __ptr[1] = 0ul; \ - __ptr[2] = 0ul; \ - __ptr[3] = 0ul; \ - 0; }) +static inline int __attribute__ ((unused)) +sigset_set_old_mask (sigset_t *set, int mask) +{ + set->__sigbits[0] = (unsigned int) mask; + set->__sigbits[1] = 0ul; + set->__sigbits[2] = 0ul; + set->__sigbits[3] = 0ul; -#define sigset_get_old_mask(set) \ - ((unsigned int) (set)->__sigbits[0]) + return 0; +} + +static inline int __attribute__ ((unused)) +sigset_get_old_mask (const sigset_t *set) +{ + return (unsigned int) set->__sigbits[0]; +} From f3a580877e1e14a8390f1e88769362f9aca57f98 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 10 Sep 2002 01:05:50 +0000 Subject: [PATCH 2879/4487] (__isinfl): Remove INTDEF. Add hidden_def. --- sysdeps/m68k/s_isinfl.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sysdeps/m68k/s_isinfl.c b/sysdeps/m68k/s_isinfl.c index 89880bc4e4..2502039087 100644 --- a/sysdeps/m68k/s_isinfl.c +++ b/sysdeps/m68k/s_isinfl.c @@ -19,10 +19,6 @@ #include #include "ieee754.h" -#undef __isinfl -#undef isinfl - - /* Return 0 if VALUE is finite or NaN, +1 if it is +Infinity, -1 if it is -Infinity. */ int @@ -42,5 +38,5 @@ __isinfl (long double value) return 0; } -INTDEF(__isinfl) +hidden_def (__isinfl) weak_alias (__isinfl, isinfl); From 059d7143ed58aebe0b5f90e46d3a3c109e652f77 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 10 Sep 2002 01:10:41 +0000 Subject: [PATCH 2880/4487] (INTDEFX): Remove. (hidden_defx): Define and use. --- sysdeps/m68k/fpu/s_isinf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/m68k/fpu/s_isinf.c b/sysdeps/m68k/fpu/s_isinf.c index d87a2317ed..5fb43ea2a0 100644 --- a/sysdeps/m68k/fpu/s_isinf.c +++ b/sysdeps/m68k/fpu/s_isinf.c @@ -34,7 +34,7 @@ __CONCATX(__,FUNC) (x) return __m81_u(__CONCATX(__,FUNC))(x); } -#define INTDEFX(a) INTDEF(a) -INTDEFX(__CONCATX(__,FUNC)) +#define hidden_defx(a) hidden_def(a) +hidden_defx(__CONCATX(__,FUNC)) #define weak_aliasx(a,b) weak_alias(a,b) weak_aliasx (__CONCATX(__,FUNC), FUNC) From ce73ae2db24e0aa98965e7dd8b031a2f2102dc8e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 10 Sep 2002 01:11:47 +0000 Subject: [PATCH 2881/4487] (__fpclassifyl): Add libm_hidden_def. --- sysdeps/m68k/fpu/s_fpclassifyl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/m68k/fpu/s_fpclassifyl.c b/sysdeps/m68k/fpu/s_fpclassifyl.c index 9a38900ef0..a8cb099927 100644 --- a/sysdeps/m68k/fpu/s_fpclassifyl.c +++ b/sysdeps/m68k/fpu/s_fpclassifyl.c @@ -1,5 +1,5 @@ /* Return classification value corresponding to argument. m68k version. - Copyright (C) 1997,2001 Free Software Foundation, Inc. + Copyright (C) 1997, 2001, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. Fixed for m68k by Andreas Schwab . @@ -41,3 +41,4 @@ __fpclassifyl (long double x) return retval; } +libm_hidden_def (__fpclassifyl) From d9a08fdfeb9a36239eb1096bb54ada35d4fb03ea Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 10 Sep 2002 01:12:49 +0000 Subject: [PATCH 2882/4487] (__expm1l): Add libm_hidden_def. --- sysdeps/m68k/fpu/s_expm1l.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/m68k/fpu/s_expm1l.c b/sysdeps/m68k/fpu/s_expm1l.c index cd62cb3b21..feee07a1d8 100644 --- a/sysdeps/m68k/fpu/s_expm1l.c +++ b/sysdeps/m68k/fpu/s_expm1l.c @@ -1,2 +1,3 @@ #define FUNC expm1l #include +libm_hidden_def (__expm1l) From fd8d18b3d8eccb7985e7a1c780372ef02107ae60 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 10 Sep 2002 01:14:47 +0000 Subject: [PATCH 2883/4487] (__isnanl): Add hidden_def. --- sysdeps/m68k/s_isnanl.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sysdeps/m68k/s_isnanl.c b/sysdeps/m68k/s_isnanl.c index 0a9ddf9814..999746f29c 100644 --- a/sysdeps/m68k/s_isnanl.c +++ b/sysdeps/m68k/s_isnanl.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1995, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1995, 1997, 2002 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 @@ -19,10 +19,6 @@ #include #include "ieee754.h" -#undef __isnanl -#undef isnanl - - /* Return nonzero if VALUE is not a number. */ int __isnanl (long double value) @@ -38,4 +34,5 @@ __isnanl (long double value) ((u.ieee.mantissa0 & 0x7fffffff) != 0 || u.ieee.mantissa1 != 0)); } +hidden_def (__isnanl) weak_alias (__isnanl, isnanl); From 280ad607c77a68e927f03a399f7b8d868f7c5b80 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 10 Sep 2002 01:26:37 +0000 Subject: [PATCH 2884/4487] Add libm_hidden_ver. --- sysdeps/alpha/fpu/fesetenv.c | 3 ++- sysdeps/alpha/fpu/fraiseexcpt.c | 3 ++- sysdeps/arm/fpu/fesetenv.c | 3 ++- sysdeps/arm/fpu/fraiseexcpt.c | 3 ++- sysdeps/hppa/fpu/fesetenv.c | 3 ++- sysdeps/hppa/fpu/fraiseexcpt.c | 3 ++- sysdeps/m68k/fpu/fesetenv.c | 3 ++- sysdeps/m68k/fpu/fraiseexcpt.c | 3 ++- sysdeps/mips/fpu/fesetenv.c | 3 ++- sysdeps/mips/fpu/fraiseexcpt.c | 1 + 10 files changed, 19 insertions(+), 9 deletions(-) diff --git a/sysdeps/alpha/fpu/fesetenv.c b/sysdeps/alpha/fpu/fesetenv.c index 63b724065a..c76e882891 100644 --- a/sysdeps/alpha/fpu/fesetenv.c +++ b/sysdeps/alpha/fpu/fesetenv.c @@ -1,5 +1,5 @@ /* Install given floating-point environment. - Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc. + Copyright (C) 1997,99,2000,01,02 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1997 @@ -53,4 +53,5 @@ strong_alias (__fesetenv, __old_fesetenv) compat_symbol (libm, __old_fesetenv, fesetenv, GLIBC_2_1); #endif +libm_hidden_ver (__fesetenv, fesetenv) versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2); diff --git a/sysdeps/alpha/fpu/fraiseexcpt.c b/sysdeps/alpha/fpu/fraiseexcpt.c index 7f18f3969f..7a589e4598 100644 --- a/sysdeps/alpha/fpu/fraiseexcpt.c +++ b/sysdeps/alpha/fpu/fraiseexcpt.c @@ -1,5 +1,5 @@ /* Raise given exceptions. - Copyright (C) 1997,98,99,2000,01 Free Software Foundation, Inc. + Copyright (C) 1997,98,99,2000,01,02 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1997. @@ -44,4 +44,5 @@ strong_alias (__feraiseexcept, __old_feraiseexcept) compat_symbol (libm, __old_feraiseexcept, feraiseexcept, GLIBC_2_1); #endif +libm_hidden_ver (__feraiseexcept, feraiseexcept) versioned_symbol (libm, __feraiseexcept, feraiseexcept, GLIBC_2_2); diff --git a/sysdeps/arm/fpu/fesetenv.c b/sysdeps/arm/fpu/fesetenv.c index 5bc19787d3..bb8812acaf 100644 --- a/sysdeps/arm/fpu/fesetenv.c +++ b/sysdeps/arm/fpu/fesetenv.c @@ -1,5 +1,5 @@ /* Install given floating-point environment. - Copyright (C) 1997,98,99,2000,01 Free Software Foundation, Inc. + Copyright (C) 1997,98,99,2000,01,02 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 @@ -41,4 +41,5 @@ strong_alias (__fesetenv, __old_fesetenv) compat_symbol (libm, __old_fesetenv, fesetenv, GLIBC_2_1); #endif +libm_hidden_ver (__fesetenv, fesetenv) versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2); diff --git a/sysdeps/arm/fpu/fraiseexcpt.c b/sysdeps/arm/fpu/fraiseexcpt.c index 75cd1baf34..f7dede2fe2 100644 --- a/sysdeps/arm/fpu/fraiseexcpt.c +++ b/sysdeps/arm/fpu/fraiseexcpt.c @@ -1,5 +1,5 @@ /* Raise given exceptions. - Copyright (C) 1997,98,99,2000,01 Free Software Foundation, Inc. + Copyright (C) 1997,98,99,2000,01,02 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 @@ -40,4 +40,5 @@ strong_alias (__feraiseexcept, __old_feraiseexcept) compat_symbol (libm, __old_feraiseexcept, feraiseexcept, GLIBC_2_1); #endif +libm_hidden_ver (__feraiseexcept, feraiseexcept) versioned_symbol (libm, __feraiseexcept, feraiseexcept, GLIBC_2_2); diff --git a/sysdeps/hppa/fpu/fesetenv.c b/sysdeps/hppa/fpu/fesetenv.c index f0c68560c0..2c7986987b 100644 --- a/sysdeps/hppa/fpu/fesetenv.c +++ b/sysdeps/hppa/fpu/fesetenv.c @@ -1,5 +1,5 @@ /* Install given floating-point environment. - Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1997, 1999, 2000, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Huggins-Daines , 2000 Based on the m68k version by @@ -68,3 +68,4 @@ fesetenv (const fenv_t *envp) /* Success. */ return 0; } +libm_hidden_def (fesetenv) diff --git a/sysdeps/hppa/fpu/fraiseexcpt.c b/sysdeps/hppa/fpu/fraiseexcpt.c index 5164bc413c..a13668f954 100644 --- a/sysdeps/hppa/fpu/fraiseexcpt.c +++ b/sysdeps/hppa/fpu/fraiseexcpt.c @@ -1,5 +1,5 @@ /* Raise given exceptions. - Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1997, 1999, 2000, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Huggins-Daines @@ -88,3 +88,4 @@ feraiseexcept (int excepts) /* Success. */ return 0; } +libm_hidden_def (feraiseexcept) diff --git a/sysdeps/m68k/fpu/fesetenv.c b/sysdeps/m68k/fpu/fesetenv.c index d3cac1ca8c..20653f0ddc 100644 --- a/sysdeps/m68k/fpu/fesetenv.c +++ b/sysdeps/m68k/fpu/fesetenv.c @@ -1,5 +1,5 @@ /* Install given floating-point environment. - Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc. + Copyright (C) 1997,99,2000,01,02 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab @@ -56,4 +56,5 @@ strong_alias (__fesetenv, __old_fesetenv) compat_symbol (libm, __old_fesetenv, fesetenv, GLIBC_2_1); #endif +libm_hidden_ver (__fesetenv, fesetenv) versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2); diff --git a/sysdeps/m68k/fpu/fraiseexcpt.c b/sysdeps/m68k/fpu/fraiseexcpt.c index d410fde07e..69f746c9b2 100644 --- a/sysdeps/m68k/fpu/fraiseexcpt.c +++ b/sysdeps/m68k/fpu/fraiseexcpt.c @@ -1,5 +1,5 @@ /* Raise given exceptions. - Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc. + Copyright (C) 1997,99,2000,01,02 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab @@ -79,4 +79,5 @@ strong_alias (__feraiseexcept, __old_feraiseexcept) compat_symbol (libm, __old_feraiseexcept, feraiseexcept, GLIBC_2_1); #endif +libm_hidden_ver (__feraiseexcept, feraiseexcept) versioned_symbol (libm, __feraiseexcept, feraiseexcept, GLIBC_2_2); diff --git a/sysdeps/mips/fpu/fesetenv.c b/sysdeps/mips/fpu/fesetenv.c index 6bd894a95f..197db5e6e0 100644 --- a/sysdeps/mips/fpu/fesetenv.c +++ b/sysdeps/mips/fpu/fesetenv.c @@ -1,5 +1,5 @@ /* Install given floating-point environment. - Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger , 1998. @@ -45,4 +45,5 @@ __fesetenv (const fenv_t *envp) strong_alias (__fesetenv, __old_fesetenv) compat_symbol (libm, __old_fesetenv, fesetenv, GLIBC_2_1); #endif +libm_hidden_ver (__fesetenv, fesetenv) versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2); diff --git a/sysdeps/mips/fpu/fraiseexcpt.c b/sysdeps/mips/fpu/fraiseexcpt.c index e2472e35f2..e3323ddb40 100644 --- a/sysdeps/mips/fpu/fraiseexcpt.c +++ b/sysdeps/mips/fpu/fraiseexcpt.c @@ -49,4 +49,5 @@ __feraiseexcept (int excepts) strong_alias (__feraiseexcept, __old_feraiseexcept) compat_symbol (libm, __old_feraiseexcept, feraiseexcept, GLIBC_2_1); #endif +libm_hidden_ver (__feraiseexcept, feraiseexcept) versioned_symbol (libm, __feraiseexcept, feraiseexcept, GLIBC_2_2); From af43a56542c782dc006f555056f62b15bf732c47 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 10 Sep 2002 11:23:00 +0000 Subject: [PATCH 2885/4487] MIPS specific optimizations. --- sysdeps/mips/fpu/e_sqrt.c | 38 ++++++++++ sysdeps/mips/fpu/e_sqrtf.c | 39 ++++++++++ sysdeps/mips/fpu/fsetexcptflg.c | 43 +++++++++++ sysdeps/mips/memcpy.S | 130 ++++++++++++++++++++++++++++++++ sysdeps/mips/memset.S | 83 ++++++++++++++++++++ 5 files changed, 333 insertions(+) create mode 100644 sysdeps/mips/fpu/e_sqrt.c create mode 100644 sysdeps/mips/fpu/e_sqrtf.c create mode 100644 sysdeps/mips/fpu/fsetexcptflg.c create mode 100644 sysdeps/mips/memcpy.S create mode 100644 sysdeps/mips/memset.S diff --git a/sysdeps/mips/fpu/e_sqrt.c b/sysdeps/mips/fpu/e_sqrt.c new file mode 100644 index 0000000000..5449710aff --- /dev/null +++ b/sysdeps/mips/fpu/e_sqrt.c @@ -0,0 +1,38 @@ +/* Copyright (C) 2002 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Hartvig Ekner , 2002. + + 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. */ + + +#include + + +#if (_MIPS_ISA >= _MIPS_ISA_MIPS2) + +double +__ieee754_sqrt (double x) +{ + double z; + __asm__ ("sqrt.d %0,%1" : "=f" (z) : "f" (x)); + return z; +} + +#else + +#include + +#endif diff --git a/sysdeps/mips/fpu/e_sqrtf.c b/sysdeps/mips/fpu/e_sqrtf.c new file mode 100644 index 0000000000..3590ad46d5 --- /dev/null +++ b/sysdeps/mips/fpu/e_sqrtf.c @@ -0,0 +1,39 @@ +/* Copyright (C) 2002 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Hartvig Ekner , 2002. + + 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. */ + + +#include + + +#if (_MIPS_ISA >= _MIPS_ISA_MIPS2) + +float +__ieee754_sqrtf (float x) +{ + float z; + __asm__ ("sqrt.s %0,%1" : "=f" (z) : "f" (x)); + return z; +} + +#else + +#include + +#endif + diff --git a/sysdeps/mips/fpu/fsetexcptflg.c b/sysdeps/mips/fpu/fsetexcptflg.c new file mode 100644 index 0000000000..c65d793178 --- /dev/null +++ b/sysdeps/mips/fpu/fsetexcptflg.c @@ -0,0 +1,43 @@ +/* Set floating-point environment exception handling. + Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Hartvig Ekner , 2002. + + 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. */ + +#include +#include + +int +fesetexceptflag (const fexcept_t *flagp, int excepts) +{ + fexcept_t temp; + + /* Get the current exceptions. */ + _FPU_GETCW (temp); + + /* Make sure the flags we want restored are legal. */ + excepts &= FE_ALL_EXCEPT; + + /* Now clear the bits called for, and copy them in from flagp. Note that + we ignore all non-flag bits from *flagp, so they don't matter. */ + temp = (temp & ~excepts) | (*flagp & excepts); + + _FPU_SETCW (temp); + + /* Success. */ + return 0; +} diff --git a/sysdeps/mips/memcpy.S b/sysdeps/mips/memcpy.S new file mode 100644 index 0000000000..394265eed7 --- /dev/null +++ b/sysdeps/mips/memcpy.S @@ -0,0 +1,130 @@ +/* Copyright (C) 2002 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Hartvig Ekner , 2002. + + 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. */ + +#include +#include + + +/* void *memcpy(void *s1, const void *s2, size_t n); + + This routine could be optimized further for MIPS64, but this is left + as an exercise for the future. When it is done, the file should be kept + as a sisterfile to this one, and placed in the sysdeps/mips/mips64 + directory. */ + +#if __BYTE_ORDER == __BIG_ENDIAN +# define LWHI lwl /* high part is left in big-endian */ +# define SWHI swl /* high part is left in big-endian */ +# define LWLO lwr /* low part is right in big-endian */ +# define SWLO swr /* low part is right in big-endian */ +#else +# define LWHI lwr /* high part is right in little-endian */ +# define SWHI swr /* high part is right in little-endian */ +# define LWLO lwl /* low part is left in little-endian */ +# define SWLO swl /* low part is left in little-endian */ +#endif + +ENTRY (memcpy) + .set noreorder + + slti t0, a2, 8 # Less than 8? + bne t0, zero, $last8 + move v0, a0 # Setup exit value before too late + + xor t0, a1, a0 # Find a0/a1 displacement + andi t0, 0x3 + bne t0, zero, $shift # Go handle the unaligned case + subu t1, zero, a1 + andi t1, 0x3 # a0/a1 are aligned, but are we + beq t1, zero, $chk8w # starting in the middle of a word? + subu a2, t1 + LWHI t0, 0(a1) # Yes we are... take care of that + addu a1, t1 + SWHI t0, 0(a0) + addu a0, t1 + +$chk8w: andi t0, a2, 0x1f # 32 or more bytes left? + beq t0, a2, $chk1w + subu a3, a2, t0 # Yes + addu a3, a1 # a3 = end address of loop + move a2, t0 # a2 = what will be left after loop +$lop8w: lw t0, 0(a1) # Loop taking 8 words at a time + lw t1, 4(a1) + lw t2, 8(a1) + lw t3, 12(a1) + lw t4, 16(a1) + lw t5, 20(a1) + lw t6, 24(a1) + lw t7, 28(a1) + addiu a0, 32 + addiu a1, 32 + sw t0, -32(a0) + sw t1, -28(a0) + sw t2, -24(a0) + sw t3, -20(a0) + sw t4, -16(a0) + sw t5, -12(a0) + sw t6, -8(a0) + bne a1, a3, $lop8w + sw t7, -4(a0) + +$chk1w: andi t0, a2, 0x3 # 4 or more bytes left? + beq t0, a2, $last8 + subu a3, a2, t0 # Yes, handle them one word at a time + addu a3, a1 # a3 again end address + move a2, t0 +$lop1w: lw t0, 0(a1) + addiu a0, 4 + addiu a1, 4 + bne a1, a3, $lop1w + sw t0, -4(a0) + +$last8: blez a2, $lst8e # Handle last 8 bytes, one at a time + addu a3, a2, a1 +$lst8l: lb t0, 0(a1) + addiu a0, 1 + addiu a1, 1 + bne a1, a3, $lst8l + sb t0, -1(a0) +$lst8e: jr ra # Bye, bye + nop + +$shift: subu a3, zero, a0 # Src and Dest unaligned + andi a3, 0x3 # (unoptimized case...) + beq a3, zero, $shft1 + subu a2, a3 # a2 = bytes left + LWHI t0, 0(a1) # Take care of first odd part + LWLO t0, 3(a1) + addu a1, a3 + SWHI t0, 0(a0) + addu a0, a3 +$shft1: andi t0, a2, 0x3 + subu a3, a2, t0 + addu a3, a1 +$shfth: LWHI t1, 0(a1) # Limp through, word by word + LWLO t1, 3(a1) + addiu a0, 4 + addiu a1, 4 + bne a1, a3, $shfth + sw t1, -4(a0) + b $last8 # Handle anything which may be left + move a2, t0 + + .set reorder +END (memcpy) diff --git a/sysdeps/mips/memset.S b/sysdeps/mips/memset.S new file mode 100644 index 0000000000..7e3f129af9 --- /dev/null +++ b/sysdeps/mips/memset.S @@ -0,0 +1,83 @@ +/* Copyright (C) 2002 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Hartvig Ekner , 2002. + + 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. */ + +#include +#include + + +/* void *memset(void *s, int c, size_t n). + + This routine could be optimized further for MIPS64, but this is left + as an exercise for the future. When it is done, the file should be kept + as a sisterfile to this one, and placed in the sysdeps/mips/mips64 + directory. */ + +#if __BYTE_ORDER == __BIG_ENDIAN +# define SWHI swl /* high part is left in big-endian */ +#else +# define SWHI swr /* high part is right in little-endian */ +#endif + +ENTRY (memset) + .set noreorder + + slti t1, a2, 8 # Less than 8? + bne t1, zero, $last8 + move v0, a0 # Setup exit value before too late + + beq a1, zero, $ueven # If zero pattern, no need to extend + andi a1, 0xff # Avoid problems with bogus arguments + sll t0, a1, 8 + or a1, t0 + sll t0, a1, 16 + or a1, t0 # a1 is now pattern in full word + +$ueven: subu t0, zero, a0 # Unaligned address? + andi t0, 0x3 + beq t0, zero, $chkw + subu a2, t0 + SWHI a1, 0(a0) # Yes, handle first unaligned part + addu a0, t0 # Now both a0 and a2 are updated + +$chkw: andi t0, a2, 0x7 # Enough left for one loop iteration? + beq t0, a2, $chkl + subu a3, a2, t0 + addu a3, a0 # a3 is last loop address +1 + move a2, t0 # a2 is now # of bytes left after loop +$loopw: addiu a0, 8 # Handle 2 words pr. iteration + sw a1, -8(a0) + bne a0, a3, $loopw + sw a1, -4(a0) + +$chkl: andi t0, a2, 0x4 # Check if there is at least a full + beq t0, zero, $last8 # word remaining after the loop + subu a2, t0 + sw a1, 0(a0) # Yes... + addiu a0, 4 + +$last8: blez a2, $exit # Handle last 8 bytes (if cnt>0) + addu a3, a2, a0 # a3 is last address +1 +$lst8l: addiu a0, 1 + bne a0, a3, $lst8l + sb a1, -1(a0) +$exit: j ra # Bye, bye + nop + + .set reorder +END (memset) From 0752643673b8f9f99f4efa14ec80a01bb18e2273 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 10 Sep 2002 11:24:50 +0000 Subject: [PATCH 2886/4487] Cleaned up the FPU exception stuff - was not functional before. Also removed all SHLIB_COMPAT stuff. --- sysdeps/mips/fpu/fclrexcpt.c | 13 +++---------- sysdeps/mips/fpu/fegetenv.c | 10 ++-------- sysdeps/mips/fpu/fesetenv.c | 10 +--------- sysdeps/mips/fpu/feupdateenv.c | 10 ++-------- sysdeps/mips/fpu/fgetexcptflg.c | 14 ++++---------- sysdeps/mips/fpu/fraiseexcpt.c | 16 ++++------------ 6 files changed, 16 insertions(+), 57 deletions(-) diff --git a/sysdeps/mips/fpu/fclrexcpt.c b/sysdeps/mips/fpu/fclrexcpt.c index 2c35047a8c..f773312b34 100644 --- a/sysdeps/mips/fpu/fclrexcpt.c +++ b/sysdeps/mips/fpu/fclrexcpt.c @@ -21,10 +21,9 @@ #include #include #include -#include int -__feclearexcept (int excepts) +feclearexcept (int excepts) { int cw; @@ -35,8 +34,8 @@ __feclearexcept (int excepts) _FPU_GETCW (cw); /* Clear exception flag bits and cause bits. If the cause bit is not - cleared, the next CTC instruction (just below) will re-generate - the exception. */ + cleared, the next CTC instruction (just below) will re-generate the + exception. */ cw &= ~(excepts | (excepts << CAUSE_SHIFT)); @@ -46,9 +45,3 @@ __feclearexcept (int excepts) /* Success. */ return 0; } - -#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) -strong_alias (__feclearexcept, __old_feclearexcept) -compat_symbol (libm, __old_feclearexcept, feclearexcept, GLIBC_2_1); -#endif -versioned_symbol (libm, __feclearexcept, feclearexcept, GLIBC_2_2); diff --git a/sysdeps/mips/fpu/fegetenv.c b/sysdeps/mips/fpu/fegetenv.c index 1edb815fad..c1741385fd 100644 --- a/sysdeps/mips/fpu/fegetenv.c +++ b/sysdeps/mips/fpu/fegetenv.c @@ -1,5 +1,5 @@ /* Store current floating-point environment. - Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger , 1998. @@ -20,18 +20,12 @@ #include #include -#include int -__fegetenv (fenv_t *envp) +fegetenv (fenv_t *envp) { _FPU_GETCW (*envp); /* Success. */ return 0; } -#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) -strong_alias (__fegetenv, __old_fegetenv) -compat_symbol (libm, __old_fegetenv, fegetenv, GLIBC_2_1); -#endif -versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2); diff --git a/sysdeps/mips/fpu/fesetenv.c b/sysdeps/mips/fpu/fesetenv.c index 197db5e6e0..ce7fe2cbff 100644 --- a/sysdeps/mips/fpu/fesetenv.c +++ b/sysdeps/mips/fpu/fesetenv.c @@ -20,10 +20,9 @@ #include #include -#include int -__fesetenv (const fenv_t *envp) +fesetenv (const fenv_t *envp) { fpu_control_t cw; @@ -40,10 +39,3 @@ __fesetenv (const fenv_t *envp) /* Success. */ return 0; } - -#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) -strong_alias (__fesetenv, __old_fesetenv) -compat_symbol (libm, __old_fesetenv, fesetenv, GLIBC_2_1); -#endif -libm_hidden_ver (__fesetenv, fesetenv) -versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2); diff --git a/sysdeps/mips/fpu/feupdateenv.c b/sysdeps/mips/fpu/feupdateenv.c index c883d07b1b..20b20e14c0 100644 --- a/sysdeps/mips/fpu/feupdateenv.c +++ b/sysdeps/mips/fpu/feupdateenv.c @@ -1,5 +1,5 @@ /* Install given floating-point environment and raise exceptions. - Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger , 1998. @@ -20,10 +20,9 @@ #include #include -#include int -__feupdateenv (const fenv_t *envp) +feupdateenv (const fenv_t *envp) { int temp; @@ -42,8 +41,3 @@ __feupdateenv (const fenv_t *envp) /* Success. */ return 0; } -#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) -strong_alias (__feupdateenv, __old_feupdateenv) -compat_symbol (libm, __old_feupdateenv, feupdateenv, GLIBC_2_1); -#endif -versioned_symbol (libm, __feupdateenv, feupdateenv, GLIBC_2_2); diff --git a/sysdeps/mips/fpu/fgetexcptflg.c b/sysdeps/mips/fpu/fgetexcptflg.c index 4f802afb40..3412159816 100644 --- a/sysdeps/mips/fpu/fgetexcptflg.c +++ b/sysdeps/mips/fpu/fgetexcptflg.c @@ -20,27 +20,21 @@ #include #include -#include int -__fegetexceptflag (fexcept_t *flagp, int excepts) +fegetexceptflag (fexcept_t *flagp, int excepts) { fexcept_t temp; /* Get the current exceptions. */ _FPU_GETCW (temp); - /* It is important that the CAUSE bits are not saved here. If they - were, a call to fesetexceptflag() would generate an - exception. */ + /* We only save the relevant bits here. In particular, care has to be + taken with the CAUSE bits, as an inadvertent restore later on could + generate unexpected exceptions. */ *flagp = temp & excepts & FE_ALL_EXCEPT; /* Success. */ return 0; } -#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) -strong_alias (__fegetexceptflag, __old_fegetexceptflag) -compat_symbol (libm, __old_fegetexceptflag, fegetexceptflag, GLIBC_2_1); -#endif -versioned_symbol (libm, __fegetexceptflag, fegetexceptflag, GLIBC_2_2); diff --git a/sysdeps/mips/fpu/fraiseexcpt.c b/sysdeps/mips/fpu/fraiseexcpt.c index e3323ddb40..7f3d977787 100644 --- a/sysdeps/mips/fpu/fraiseexcpt.c +++ b/sysdeps/mips/fpu/fraiseexcpt.c @@ -21,19 +21,18 @@ #include #include #include -#include int -__feraiseexcept (int excepts) +feraiseexcept (int excepts) { fpu_control_t cw; /* Get current state. */ _FPU_GETCW (cw); - /* Set flag bits (which are accumulative), and *also* set the cause - bits. The setting of the cause bits is what actually causes the - hardware to generate the exception, if the corresponding enable + /* Set flag bits (which are accumulative), and *also* set the + cause bits. The setting of the cause bits is what actually causes + the hardware to generate the exception, if the corresponding enable bit is set as well. */ excepts &= FE_ALL_EXCEPT; @@ -44,10 +43,3 @@ __feraiseexcept (int excepts) return 0; } - -#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) -strong_alias (__feraiseexcept, __old_feraiseexcept) -compat_symbol (libm, __old_feraiseexcept, feraiseexcept, GLIBC_2_1); -#endif -libm_hidden_ver (__feraiseexcept, feraiseexcept) -versioned_symbol (libm, __feraiseexcept, feraiseexcept, GLIBC_2_2); From ad9dff54b0683eaf41964511510dbabac047de42 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 13 Sep 2002 07:12:28 +0000 Subject: [PATCH 2887/4487] Add readahead syscall. --- sysdeps/unix/sysv/linux/mips/syscalls.list | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index f7d2e291a5..57237d708a 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -67,6 +67,7 @@ s_pread64 pread64 pread i:ibniii __syscall_pread s_putpmsg putpmsg putpmsg i:ippii __syscall_putpmsg s_ptrace ptrace ptrace i:iipp __syscall_ptrace s_pwrite64 pwrite64 pwrite i:ibniii __syscall_pwrite +s_readahead EXTRA readahead i:iipi __syscall_readahead s_reboot reboot reboot i:iii __syscall_reboot s_setrlimit setrlimit setrlimit i:ip __syscall_setrlimit s_sigpending sigpending sigpending i:p __syscall_sigpending From c5947147ec1c3611a51f4db1da1ea0bc2a8da227 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 18 Sep 2002 17:45:53 +0000 Subject: [PATCH 2888/4487] 2002-09-18 Roland McGrath * sysdeps/unix/sysv/linux/sigaction.c (__libc_sigaction): Add libc_hidden_def. * sysdeps/unix/sysv/linux/arm/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/i386/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/ia64/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/mips/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/x86_64/sigaction.c: Likewise. --- sysdeps/unix/sysv/linux/arm/sigaction.c | 2 +- sysdeps/unix/sysv/linux/mips/sigaction.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/sigaction.c b/sysdeps/unix/sysv/linux/arm/sigaction.c index a137ce7ad1..40ecb3224e 100644 --- a/sysdeps/unix/sysv/linux/arm/sigaction.c +++ b/sysdeps/unix/sysv/linux/arm/sigaction.c @@ -148,7 +148,7 @@ __libc_sigaction (sig, act, oact) } return result; } - +libc_hidden_def (__libc_sigaction) weak_alias (__libc_sigaction, __sigaction) libc_hidden_weak (__sigaction) weak_alias (__libc_sigaction, sigaction) diff --git a/sysdeps/unix/sysv/linux/mips/sigaction.c b/sysdeps/unix/sysv/linux/mips/sigaction.c index 17f678c08b..0e5cfb7569 100644 --- a/sysdeps/unix/sysv/linux/mips/sigaction.c +++ b/sysdeps/unix/sysv/linux/mips/sigaction.c @@ -134,7 +134,7 @@ __libc_sigaction (sig, act, oact) return result; #endif } - +libc_hidden_def (__libc_sigaction) weak_alias (__libc_sigaction, __sigaction) libc_hidden_weak (__sigaction) weak_alias (__libc_sigaction, sigaction) From ce8a8f74e426b18f418ac7a3e90a32d2c874fdb4 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 18 Sep 2002 18:28:43 +0000 Subject: [PATCH 2889/4487] 2002-09-18 Roland McGrath * elf/do-rel.h (elf_dynamic_do_rel): Mask off 0x8000 bit (hidden flag) from the value taken from the DT_VERSYM table. * elf/dl-runtime.c (fixup, profile_fixup): Likewise. * sysdeps/mips/dl-machine.h (__dl_runtime_resolve): Likewise. (RESOLVE_GOTSYM): Likewise. --- sysdeps/mips/dl-machine.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index bc5e84fd86..7dbdd794cf 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -293,7 +293,7 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \ { \ const ElfW(Half) *vernum = \ (const void *) D_PTR (l, l_info[VERSYMIDX (DT_VERSYM)]); \ - ElfW(Half) ndx = vernum[sym_index]; \ + ElfW(Half) ndx = vernum[sym_index & 0x7fff]; \ const struct r_found_version *version = &l->l_versions[ndx]; \ \ if (version->hash != 0) \ @@ -562,7 +562,7 @@ elf_machine_got_rel (struct link_map *map, int lazy) ({ \ const ElfW(Sym) *ref = sym; \ const struct r_found_version *version \ - = vernum ? &map->l_versions[vernum[sym_index]] : NULL; \ + = vernum ? &map->l_versions[vernum[sym_index] & 0x7fff] : NULL; \ ElfW(Addr) value; \ value = RESOLVE (&ref, version, R_MIPS_REL32); \ (ref)? value + ref->st_value: 0; \ From f756cedbffec3dc602c1bde88e5989a94b44975c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 19 Sep 2002 06:44:24 +0000 Subject: [PATCH 2890/4487] Not needed anymore. --- sysdeps/arm/Makefile | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 sysdeps/arm/Makefile diff --git a/sysdeps/arm/Makefile b/sysdeps/arm/Makefile deleted file mode 100644 index ccb6b03684..0000000000 --- a/sysdeps/arm/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -ifeq ($(subdir),csu) -ifeq (yes,$(build-shared)) -# Compatibility -sysdep_routines += divdi3 -shared-only-routines += divdi3 -endif -endif From f4a4647bce31f2cc34c87a1a490add334feae0f8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 19 Sep 2002 06:46:37 +0000 Subject: [PATCH 2891/4487] (sysdep_routines, shared-only-routines): Don't add divdi3 here. --- sysdeps/m68k/Makefile | 8 -------- 1 file changed, 8 deletions(-) diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile index 2515df7324..c44b2d196c 100644 --- a/sysdeps/m68k/Makefile +++ b/sysdeps/m68k/Makefile @@ -33,14 +33,6 @@ CFLAGS-setjmp.c := -fno-omit-frame-pointer # The 68k `long double' is a distinct type we support. long-double-fcts = yes -ifeq ($(subdir),csu) -ifeq (yes,$(build-shared)) -# Compatibility -sysdep_routines += divdi3 -shared-only-routines += divdi3 -endif -endif - ifeq ($(subdir),elf) CFLAGS-rtld.c += -Wno-uninitialized -Wno-unused endif From 93697b95ebf642260e1bd453512f9075e3d249a9 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 20 Sep 2002 21:49:06 +0000 Subject: [PATCH 2892/4487] 2002-09-20 Roland McGrath * sysdeps/generic/gmp-mparam.h: Include . (BITS_PER_MP_LIMB, BYTES_PER_MP_LIMB, BITS_PER_LONGINT): Define in terms of __WORDSIZE. * sysdeps/x86_64/gmp-mparam.h: File removed. * sysdeps/sparc/gmp-mparam.h: File removed. * sysdeps/mips/mips64/gmp-mparam.h: File removed. * sysdeps/ia64/gmp-mparam.h: File removed. * sysdeps/alpha/gmp-mparam.h: File removed. --- sysdeps/alpha/gmp-mparam.h | 27 --------------------------- sysdeps/mips/mips64/gmp-mparam.h | 26 -------------------------- 2 files changed, 53 deletions(-) delete mode 100644 sysdeps/alpha/gmp-mparam.h delete mode 100644 sysdeps/mips/mips64/gmp-mparam.h diff --git a/sysdeps/alpha/gmp-mparam.h b/sysdeps/alpha/gmp-mparam.h deleted file mode 100644 index f565f0f7c8..0000000000 --- a/sysdeps/alpha/gmp-mparam.h +++ /dev/null @@ -1,27 +0,0 @@ -/* gmp-mparam.h -- Compiler/machine parameter header file. - -Copyright (C) 1991, 1993, 1994 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -MA 02111-1307, USA. */ - -#define BITS_PER_MP_LIMB 64 -#define BYTES_PER_MP_LIMB 8 -#define BITS_PER_LONGINT 64 -#define BITS_PER_INT 32 -#define BITS_PER_SHORTINT 16 -#define BITS_PER_CHAR 8 diff --git a/sysdeps/mips/mips64/gmp-mparam.h b/sysdeps/mips/mips64/gmp-mparam.h deleted file mode 100644 index 3779d1de95..0000000000 --- a/sysdeps/mips/mips64/gmp-mparam.h +++ /dev/null @@ -1,26 +0,0 @@ -/* gmp-mparam.h -- Compiler/machine parameter header file. - -Copyright (C) 1991, 1993, 1994 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ - -#define BITS_PER_MP_LIMB 64 -#define BYTES_PER_MP_LIMB 8 -#define BITS_PER_LONGINT 64 -#define BITS_PER_INT 64 -#define BITS_PER_SHORTINT 16 -#define BITS_PER_CHAR 8 From 0220ef788b32d53d68f01b4d952293f30d939ff4 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 22 Sep 2002 16:47:55 +0000 Subject: [PATCH 2893/4487] * sysdeps/m68k/fpu/bits/mathinline.h (isgreater, isgreaterequal) (isless, islessequal, islessgreater, isunordered) [GCC >= 3.1]: Use GCC builtins. --- sysdeps/m68k/fpu/bits/mathinline.h | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/fpu/bits/mathinline.h index dec89d8306..4b1bfeaf13 100644 --- a/sysdeps/m68k/fpu/bits/mathinline.h +++ b/sysdeps/m68k/fpu/bits/mathinline.h @@ -1,5 +1,5 @@ /* Definitions of inline math functions implemented by the m68881/2. - Copyright (C) 1991,92,93,94,96,97,98,99,2000 Free Software Foundation, Inc. + Copyright (C) 1991,92,93,94,96,97,98,99,2000,2002 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 @@ -21,51 +21,61 @@ #ifdef __USE_ISOC99 +# if __GNUC_PREREQ (3,1) +/* GCC 3.1 and up have builtins that actually can be used. */ +# define isgreater(x, y) __builtin_isgreater (x, y) +# define isgreaterequal(x, y) __builtin_isgreaterequal (x, y) +# define isless(x, y) __builtin_isless (x, y) +# define islessequal(x, y) __builtin_islessequal (x, y) +# define islessgreater(x, y) __builtin_islessgreater (x, y) +# define isunordered(x, y) __builtin_isunordered (x, y) +# else /* ISO C99 defines some macros to perform unordered comparisons. The m68k FPU supports this with special opcodes and we should use them. These must not be inline functions since we have to be able to handle all floating-point types. */ -# define isgreater(x, y) \ +# define isgreater(x, y) \ __extension__ \ ({ char __result; \ __asm__ ("fcmp%.x %2,%1; fsogt %0" \ : "=dm" (__result) : "f" (x), "f" (y)); \ __result != 0; }) -# define isgreaterequal(x, y) \ +# define isgreaterequal(x, y) \ __extension__ \ ({ char __result; \ __asm__ ("fcmp%.x %2,%1; fsoge %0" \ : "=dm" (__result) : "f" (x), "f" (y)); \ __result != 0; }) -# define isless(x, y) \ +# define isless(x, y) \ __extension__ \ ({ char __result; \ __asm__ ("fcmp%.x %2,%1; fsolt %0" \ : "=dm" (__result) : "f" (x), "f" (y)); \ __result != 0; }) -# define islessequal(x, y) \ +# define islessequal(x, y) \ __extension__ \ ({ char __result; \ __asm__ ("fcmp%.x %2,%1; fsole %0" \ : "=dm" (__result) : "f" (x), "f" (y)); \ __result != 0; }) -# define islessgreater(x, y) \ +# define islessgreater(x, y) \ __extension__ \ ({ char __result; \ __asm__ ("fcmp%.x %2,%1; fsogl %0" \ : "=dm" (__result) : "f" (x), "f" (y)); \ __result != 0; }) -# define isunordered(x, y) \ +# define isunordered(x, y) \ __extension__ \ ({ char __result; \ __asm__ ("fcmp%.x %2,%1; fsun %0" \ : "=dm" (__result) : "f" (x), "f" (y)); \ __result != 0; }) +# endif /* GCC 3.1 */ #endif From e6697827c9dd2441185ff0aab44aa1b9292dc85c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 23 Sep 2002 03:30:34 +0000 Subject: [PATCH 2894/4487] 2002-09-21 Carlos O'Donell * sysdeps/hppa/abort-instr.h: New file. --- sysdeps/hppa/abort-instr.h | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sysdeps/hppa/abort-instr.h diff --git a/sysdeps/hppa/abort-instr.h b/sysdeps/hppa/abort-instr.h new file mode 100644 index 0000000000..f1afea46de --- /dev/null +++ b/sysdeps/hppa/abort-instr.h @@ -0,0 +1,6 @@ +/* An instruction privileged instruction to crash a userspace program. + + We go with iitlbp because it has a history of being used to crash + programs. */ + +#define ABORT_INSTRUCTION asm ("iitlbp %r0,(%r0)") From 20f7e3e794d10e00c389837af649f1f7b4333152 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 25 Sep 2002 01:57:50 +0000 Subject: [PATCH 2895/4487] 2002-09-24 Roland McGrath * sysdeps/unix/sysv/linux/alpha/bits/time.h: File removed. It was indentical to the linux/bits/time.h file. --- sysdeps/unix/sysv/linux/alpha/bits/time.h | 69 ----------------------- 1 file changed, 69 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/alpha/bits/time.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/time.h b/sysdeps/unix/sysv/linux/alpha/bits/time.h deleted file mode 100644 index dd4dfaf967..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/bits/time.h +++ /dev/null @@ -1,69 +0,0 @@ -/* System-dependent timing definitions. Linux/Alpha version. - Copyright (C) 1996,1997,1998,1999,2000,2001 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. */ - -/* - * Never include this file directly; use instead. - */ - -#ifndef __need_timeval -# ifndef _BITS_TIME_H -# define _BITS_TIME_H 1 - -/* ISO/IEC 9899:1990 7.12.1: - The macro `CLOCKS_PER_SEC' is the number per second of the value - returned by the `clock' function. */ -/* CAE XSH, Issue 4, Version 2: - The value of CLOCKS_PER_SEC is required to be 1 million on all - XSI-conformant systems. */ -# define CLOCKS_PER_SEC 1000000l - -# if !defined __STRICT_ANSI__ && !defined __USE_XOPEN2K -/* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK - presents the real value for clock ticks per second for the system. */ -# include -extern long int __sysconf (int); -# define CLK_TCK ((__clock_t) __sysconf (2)) /* 2 is _SC_CLK_TCK */ -# endif - -# ifdef __USE_POSIX199309 -/* Identifier for system-wide realtime clock. */ -# define CLOCK_REALTIME 0 - -/* Flag to indicate time is absolute. */ -# define TIMER_ABSTIME 1 -# endif - -# endif /* bits/time.h */ -#endif /* !__need_timeval */ - -#ifdef __need_timeval -# undef __need_timeval -# ifndef _STRUCT_TIMEVAL -# define _STRUCT_TIMEVAL 1 -# include - -/* A time value that is accurate to the nearest - microsecond but also has a range of years. */ -struct timeval - { - __time_t tv_sec; /* Seconds. */ - __suseconds_t tv_usec; /* Microseconds. */ - }; -# endif /* struct timeval */ -#endif /* need timeval */ From dafc949f6550bd9a8dbdf6fcf320b021c66c1c5f Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 25 Sep 2002 11:09:55 +0000 Subject: [PATCH 2896/4487] Add syscall_exit. --- sysdeps/unix/sysv/linux/mips/syscalls.list | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index 57237d708a..fe01d76b19 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -48,6 +48,7 @@ rt_sigqueueinfo - rt_sigqueueinfo i:iip __syscall_rt_sigqueueinfo rt_sigsuspend - rt_sigsuspend i:pi __syscall_rt_sigsuspend rt_sigtimedwait - rt_sigtimedwait i:pppi __syscall_rt_sigtimedwait s_execve execve execve i:spp __syscall_execve +s_exit _exit exit i:i __syscall_exit s_fcntl fcntl fcntl i:iiF __syscall_fcntl s_fcntl64 fcntl64 fcntl64 i:iiF __syscall_fcntl64 s_fstat64 fxstat64 fstat64 i:ip __syscall_fstat64 From 53c72cc1d6c3cc45d92d56873f245cd64cdcc1d8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 28 Sep 2002 04:02:56 +0000 Subject: [PATCH 2897/4487] IPC definitions for Linux/PA. --- sysdeps/unix/sysv/linux/hppa/bits/ipc.h | 63 +++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/hppa/bits/ipc.h diff --git a/sysdeps/unix/sysv/linux/hppa/bits/ipc.h b/sysdeps/unix/sysv/linux/hppa/bits/ipc.h new file mode 100644 index 0000000000..d80cf06993 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/bits/ipc.h @@ -0,0 +1,63 @@ +/* Copyright (C) 1995-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 + 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 _SYS_IPC_H +# error "Never use directly; include instead." +#endif + +#include +#include + +/* Mode bits for `msgget', `semget', and `shmget'. */ +#define IPC_CREAT 01000 /* Create key if key does not exist. */ +#define IPC_EXCL 02000 /* Fail if key exists. */ +#define IPC_NOWAIT 04000 /* Return error on wait. */ + +/* Control commands for `msgctl', `semctl', and `shmctl'. */ +#define IPC_RMID 0 /* Remove identifier. */ +#define IPC_SET 1 /* Set `ipc_perm' options. */ +#define IPC_STAT 2 /* Get `ipc_perm' options. */ +#ifdef __USE_GNU +# define IPC_INFO 3 /* See ipcs. */ +#endif + +/* Special key values. */ +#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ + + +/* Data structure used to pass permission information to IPC operations. */ +struct ipc_perm + { + __key_t __key; /* Key. */ + __uid_t uid; /* Owner's user ID. */ + __gid_t gid; /* Owner's group ID. */ + __uid_t cuid; /* Creator's user ID. */ + __gid_t cgid; /* Creator's group ID. */ +#if __WORDSIZE == 32 + unsigned short int __pad1; + unsigned short int mode; /* Read/write permission. */ + unsigned short int __pad2; +#else + __mode_t mode; /* Read/write permission. */ + unsigned short int __pad2; +#endif + unsigned short int __seq; /* Sequence number. */ + unsigned int __pad3; + unsigned long long int __unused1; + unsigned long long int __unused2; + }; From 535cdc5140e2e148f43f417e37fcea8540b4efd4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 28 Sep 2002 04:03:54 +0000 Subject: [PATCH 2898/4487] SysV message queue definitions for Linux/PA. --- sysdeps/unix/sysv/linux/hppa/bits/msq.h | 84 +++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/hppa/bits/msq.h diff --git a/sysdeps/unix/sysv/linux/hppa/bits/msq.h b/sysdeps/unix/sysv/linux/hppa/bits/msq.h new file mode 100644 index 0000000000..1268dc858c --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/bits/msq.h @@ -0,0 +1,84 @@ +/* Copyright (C) 1995, 1996, 1997, 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 + 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 _SYS_MSG_H +# error "Never use directly; include instead." +#endif + +#include +#include + +/* Define options for message queue functions. */ +#define MSG_NOERROR 010000 /* no error if message is too big */ +#ifdef __USE_GNU +# define MSG_EXCEPT 020000 /* recv any msg except of specified type */ +#endif + +/* Types used in the structure definition. */ +typedef unsigned long int msgqnum_t; +typedef unsigned long int msglen_t; + + +/* Structure of record for one message inside the kernel. + The type `struct msg' is opaque. */ +struct msqid_ds +{ + struct ipc_perm msg_perm; /* structure describing operation permission */ +#if __WORDSIZE == 32 + unsigned int __pad1; +#endif + __time_t msg_stime; /* time of last msgsnd command */ +#if __WORDSIZE == 32 + unsigned int __pad2; +#endif + __time_t msg_rtime; /* time of last msgrcv command */ +#if __WORDSIZE == 32 + unsigned int __pad3; +#endif + __time_t msg_ctime; /* time of last change */ + unsigned long int __msg_cbytes; /* current number of bytes on queue */ + msgqnum_t msg_qnum; /* number of messages currently on queue */ + 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; +}; + +#ifdef __USE_MISC + +# define msg_cbytes __msg_cbytes + +/* ipcs ctl commands */ +# define MSG_STAT 11 +# define MSG_INFO 12 + +/* buffer for msgctl calls IPC_INFO, MSG_INFO */ +struct msginfo + { + int msgpool; + int msgmap; + int msgmax; + int msgmnb; + int msgmni; + int msgssz; + int msgtql; + unsigned short int msgseg; + }; + +#endif /* __USE_MISC */ From 895185c62e97e28bc95e23432743f7975d1a9959 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 28 Sep 2002 04:04:44 +0000 Subject: [PATCH 2899/4487] SysV semaphore definitions for Linux/PA. --- sysdeps/unix/sysv/linux/hppa/bits/sem.h | 92 +++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/hppa/bits/sem.h diff --git a/sysdeps/unix/sysv/linux/hppa/bits/sem.h b/sysdeps/unix/sysv/linux/hppa/bits/sem.h new file mode 100644 index 0000000000..2880765108 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/bits/sem.h @@ -0,0 +1,92 @@ +/* Copyright (C) 1995, 1996, 1997, 1998, 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 + 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 _SYS_SEM_H +# error "Never include directly; use instead." +#endif + +#include +#include + +/* Flags for `semop'. */ +#define SEM_UNDO 0x1000 /* undo the operation on exit */ + +/* Commands for `semctl'. */ +#define GETPID 11 /* get sempid */ +#define GETVAL 12 /* get semval */ +#define GETALL 13 /* get all semval's */ +#define GETNCNT 14 /* get semncnt */ +#define GETZCNT 15 /* get semzcnt */ +#define SETVAL 16 /* set semval */ +#define SETALL 17 /* set all semval's */ + + +/* Data structure describing a set of semaphores. */ +struct semid_ds +{ + struct ipc_perm sem_perm; /* operation permission struct */ +#if __WORDSIZE == 32 + unsigned int __pad1; +#endif + __time_t sem_otime; /* last semop() time */ +#if __WORDSIZE == 32 + unsigned int __pad2; +#endif + __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; +}; + +/* The user should define a union like the following to use it for arguments + for `semctl'. + + union semun + { + int val; <= value for SETVAL + struct semid_ds *buf; <= buffer for IPC_STAT & IPC_SET + unsigned short int *array; <= array for GETALL & SETALL + struct seminfo *__buf; <= buffer for IPC_INFO + }; + + Previous versions of this file used to define this union but this is + incorrect. One can test the macro _SEM_SEMUN_UNDEFINED to see whether + one must define the union or not. */ +#define _SEM_SEMUN_UNDEFINED 1 + +#ifdef __USE_MISC + +/* ipcs ctl cmds */ +# define SEM_STAT 18 +# define SEM_INFO 19 + +struct seminfo +{ + int semmap; + int semmni; + int semmns; + int semmnu; + int semmsl; + int semopm; + int semume; + int semusz; + int semvmx; + int semaem; +}; + +#endif /* __USE_MISC */ From 0a398af98d699e9a657ae5236a46545c72f56ff4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 28 Sep 2002 04:05:23 +0000 Subject: [PATCH 2900/4487] SysV shared memory definitions for Linux/PA. --- sysdeps/unix/sysv/linux/hppa/bits/shm.h | 103 ++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/hppa/bits/shm.h diff --git a/sysdeps/unix/sysv/linux/hppa/bits/shm.h b/sysdeps/unix/sysv/linux/hppa/bits/shm.h new file mode 100644 index 0000000000..52b11edfa6 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/bits/shm.h @@ -0,0 +1,103 @@ +/* Copyright (C) 1995, 1996, 1997, 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 + 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 _SYS_SHM_H +# error "Never include directly; use instead." +#endif + +#include +#include + +/* Permission flag for shmget. */ +#define SHM_R 0400 /* or S_IRUGO from */ +#define SHM_W 0200 /* or S_IWUGO from */ + +/* Flags for `shmat'. */ +#define SHM_RDONLY 010000 /* attach read-only else read-write */ +#define SHM_RND 020000 /* round attach address to SHMLBA */ +#define SHM_REMAP 040000 /* take-over region on attach */ + +/* Commands for `shmctl'. */ +#define SHM_LOCK 11 /* lock segment (root only) */ +#define SHM_UNLOCK 12 /* unlock segment (root only) */ + + +/* Type to count number of attaches. */ +typedef unsigned long int shmatt_t; + +/* Data structure describing a set of semaphores. */ +struct shmid_ds + { + struct ipc_perm shm_perm; /* operation permission struct */ +#if __WORDSIZE == 32 + unsigned int __pad1; +#endif + __time_t shm_atime; /* time of last shmat() */ +#if __WORDSIZE == 32 + unsigned int __pad2; +#endif + __time_t shm_dtime; /* time of last shmdt() */ +#if __WORDSIZE == 32 + unsigned int __pad3; +#endif + __time_t shm_ctime; /* time of last change by shmctl() */ +#if __WORDSIZE == 32 + unsigned int __pad4; +#endif + size_t shm_segsz; /* size of segment in bytes */ + __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; + }; + +#ifdef __USE_MISC + +/* ipcs ctl commands */ +# define SHM_STAT 13 +# define SHM_INFO 14 + +/* shm_mode upper byte flags */ +# define SHM_DEST 01000 /* segment will be destroyed on last detach */ +# define SHM_LOCKED 02000 /* segment will not be swapped */ + +struct shminfo + { + unsigned long shmmax; + unsigned long shmmin; + unsigned long shmmni; + unsigned long shmseg; + unsigned long shmall; + unsigned long __unused1; + unsigned long __unused2; + unsigned long __unused3; + unsigned long __unused4; + }; + +struct shm_info + { + int used_ids; + unsigned long int shm_tot; /* total allocated shm */ + unsigned long int shm_rss; /* total resident shm */ + unsigned long int shm_swp; /* total swapped shm */ + unsigned long int swap_attempts; + unsigned long int swap_successes; + }; + +#endif /* __USE_MISC */ From 926092e8079b6a2ad3dd0f839d32dd4bae9e6e6d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 28 Sep 2002 04:34:00 +0000 Subject: [PATCH 2901/4487] Define macro DO_ELF_MACHINE_REL_RELATIVE for 'elf_machine_rel_relative' with extra map parameter required by HPPA. (elf_machine_rela_relative): Add plt relocation changes. --- sysdeps/hppa/dl-machine.h | 48 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h index f70b2b3e5e..9cc10c40f7 100644 --- a/sysdeps/hppa/dl-machine.h +++ b/sysdeps/hppa/dl-machine.h @@ -628,11 +628,55 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, *reloc_addr = value; } +#define DO_ELF_MACHINE_REL_RELATIVE(map, l_addr, relative) \ + elf_machine_rel_relative (map, l_addr, relative, \ + (void *) (l_addr + relative->r_offset)) + +/* hppa doesn't have an R_PARISC_RELATIVE reloc, but uses relocs with + ELF32_R_SYM (info) == 0 for a similar purpose. */ static inline void -elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, +elf_machine_rela_relative (struct link_map *map, Elf32_Addr l_addr, + const Elf32_Rela *reloc, Elf32_Addr *const reloc_addr) { - /* XXX Nothing to do. There is no relative relocation, right? */ + unsigned long const r_type = ELF32_R_TYPE (reloc->r_info); + Elf32_Addr value; + + value = l_addr + reloc->r_addend; + + if (ELF32_R_SYM (reloc->r_info) != 0) + asm volatile ("iitlbp %r0,(%r0)"); /* Crash. */ + + switch (r_type) + { + case R_PARISC_DIR32: + /* .eh_frame can have unaligned relocs. */ + if ((unsigned long) reloc_addr & 3) + { + char *rel_addr = (char *) reloc_addr; + rel_addr[0] = value >> 24; + rel_addr[1] = value >> 16; + rel_addr[2] = value >> 8; + rel_addr[3] = value; + return; + } + break; + + case R_PARISC_PLABEL32: + break; + + case R_PARISC_IPLT: + elf_machine_fixup_plt (NULL, map, reloc, reloc_addr, value); + return; + + case R_PARISC_NONE: + return; + + default: + _dl_reloc_bad_type (map, r_type, 0); + } + + *reloc_addr = value; } static inline void From b1cbca217e82b95d43736e548ccf483070308e38 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sat, 28 Sep 2002 13:40:10 +0000 Subject: [PATCH 2902/4487] Fix number of args to syscall. --- sysdeps/unix/sysv/linux/mips/ftruncate64.c | 4 ++-- sysdeps/unix/sysv/linux/mips/truncate64.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/ftruncate64.c b/sysdeps/unix/sysv/linux/mips/ftruncate64.c index 047bcb5061..fc88539b31 100644 --- a/sysdeps/unix/sysv/linux/mips/ftruncate64.c +++ b/sysdeps/unix/sysv/linux/mips/ftruncate64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 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 @@ -50,7 +50,7 @@ __ftruncate64 (int fd, off64_t length) #ifndef __ASSUME_TRUNCATE64_SYSCALL int saved_errno = errno; #endif - int result = INLINE_SYSCALL (ftruncate64, 3, fd, 0, + int result = INLINE_SYSCALL (ftruncate64, 4, fd, 0, __LONG_LONG_PAIR (high, low)); #ifndef __ASSUME_TRUNCATE64_SYSCALL if (result != -1 || errno != ENOSYS) diff --git a/sysdeps/unix/sysv/linux/mips/truncate64.c b/sysdeps/unix/sysv/linux/mips/truncate64.c index 6f870b847d..3bb73ce96d 100644 --- a/sysdeps/unix/sysv/linux/mips/truncate64.c +++ b/sysdeps/unix/sysv/linux/mips/truncate64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999, 2000, 2002 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 @@ -51,7 +51,7 @@ truncate64 (const char *path, off64_t length) #ifndef __ASSUME_TRUNCATE64_SYSCALL int saved_errno = errno; #endif - int result = INLINE_SYSCALL (truncate64, 3, CHECK_STRING (path), 0, + int result = INLINE_SYSCALL (truncate64, 4, CHECK_STRING (path), 0, __LONG_LONG_PAIR (high, low)); #ifndef __ASSUME_TRUNCATE64_SYSCALL if (result != -1 || errno != ENOSYS) From 8ee7624e8734e2fa80dca8f8dbdff830ad3f0fc1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 28 Sep 2002 18:02:05 +0000 Subject: [PATCH 2903/4487] Not needed anymore. --- sysdeps/unix/sysv/sysv4/solaris2/configure | 4 ---- sysdeps/unix/sysv/sysv4/solaris2/configure.in | 6 ------ 2 files changed, 10 deletions(-) delete mode 100644 sysdeps/unix/sysv/sysv4/solaris2/configure delete mode 100644 sysdeps/unix/sysv/sysv4/solaris2/configure.in diff --git a/sysdeps/unix/sysv/sysv4/solaris2/configure b/sysdeps/unix/sysv/sysv4/solaris2/configure deleted file mode 100644 index b5675df0bf..0000000000 --- a/sysdeps/unix/sysv/sysv4/solaris2/configure +++ /dev/null @@ -1,4 +0,0 @@ - # Local configure fragment for sysdeps/unix/sysv/sysv4/solaris2 - -# Concensus on stdio is that it's broken. -test $stdio = default && stdio=libio diff --git a/sysdeps/unix/sysv/sysv4/solaris2/configure.in b/sysdeps/unix/sysv/sysv4/solaris2/configure.in deleted file mode 100644 index 76f3109f71..0000000000 --- a/sysdeps/unix/sysv/sysv4/solaris2/configure.in +++ /dev/null @@ -1,6 +0,0 @@ -sinclude(./aclocal.m4)dnl Autoconf lossage -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/unix/sysv/sysv4/solaris2 - -# Concensus on stdio is that it's broken. -test $stdio = default && stdio=libio From 9fe8d7ced1cfcb42b28ba5b6dfbd966e8f15f2cf Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 28 Sep 2002 18:03:10 +0000 Subject: [PATCH 2904/4487] Update comment and remove stdio=libio setting. --- sysdeps/unix/sysv/aix/configure.in | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/aix/configure.in b/sysdeps/unix/sysv/aix/configure.in index e3fd4efefb..effa853e0b 100644 --- a/sysdeps/unix/sysv/aix/configure.in +++ b/sysdeps/unix/sysv/aix/configure.in @@ -1,9 +1,6 @@ sinclude(./aclocal.m4)dnl Autoconf lossage GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/unix/sysv/linux. - -# On Linux, the default is to use libio instead of stdio. -test $stdio = default && stdio=libio +# Local configure fragment for sysdeps/unix/sysv/aix. # Don't bother trying to generate any glue code to be compatible with the # existing system library, because we are the only system library. From a30e09230bdde365305fb008f3900ce4b7e8b212 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 28 Sep 2002 19:45:29 +0000 Subject: [PATCH 2905/4487] 2002-09-28 Roland McGrath * sysdeps/mach/hurd/dl-sysdep.c (_dl_important_hwcaps): Use INTUSE for _dl_signal_error. * sysdeps/mips/dl-machine.h (elf_machine_runtime_link_map): Likewise. * sysdeps/powerpc/powerpc64/dl-machine.c (_dl_reloc_overflow): Likewise. * sysdeps/arm/dl-machine.h (elf_machine_rel): Likewise. (elf_machine_rela): Likewise. --- sysdeps/arm/dl-machine.h | 10 ++++++---- sysdeps/mips/dl-machine.h | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 9905d15001..e3e666a42f 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -523,8 +523,9 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, topbits = newvalue & 0xfe000000; if (topbits != 0xfe000000 && topbits != 0x00000000) { - _dl_signal_error (0, map->l_name, NULL, - "R_ARM_PC24 relocation out of range"); + INTUSE (_dl_signal_error) + (0, map->l_name, NULL, + "R_ARM_PC24 relocation out of range"); } } newvalue >>= 2; @@ -577,8 +578,9 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, topbits = newvalue & 0xfe000000; if (topbits != 0xfe000000 && topbits != 0x00000000) { - _dl_signal_error (0, map->l_name, NULL, - "R_ARM_PC24 relocation out of range"); + INTUSE (_dl_signal_error) + (0, map->l_name, NULL, + "R_ARM_PC24 relocation out of range"); } } newvalue >>= 2; diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 7dbdd794cf..08e5a6e562 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -238,7 +238,7 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc) } } - _dl_signal_error (0, NULL, NULL, "cannot find runtime link map"); + INTUSE (_dl_signal_error) (0, NULL, NULL, "cannot find runtime link map"); return NULL; } From 700494fc4b18dda563b9344ab6de9ffc77d2a934 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 1 Oct 2002 19:42:01 +0000 Subject: [PATCH 2906/4487] 2002-10-01 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h [__USE_GNU] (F_SETLEASE, F_GETLEASE, F_NOTIFY): New macros. [__USE_GNU] (DN_ACCESS, DN_MODIFY, DN_CREATE, DN_DELETE, DN_RENAME, DN_ATTRIB, DN_MULTISHOT): New macros. --- sysdeps/unix/sysv/linux/hppa/bits/fcntl.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h index d8b110c28a..dc68122f8f 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h @@ -81,6 +81,12 @@ # define F_GETSIG 14 /* Get number of signal to be sent. */ #endif +#ifdef __USE_GNU +# 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. */ +#endif + /* for F_[GET|SET]FL */ #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ @@ -102,6 +108,17 @@ # define LOCK_UN 8 /* remove lock */ #endif +#ifdef __USE_GNU +/* Types of directory notifications that may be requested with F_NOTIFY. */ +# define DN_ACCESS 0x00000001 /* File accessed. */ +# define DN_MODIFY 0x00000002 /* File modified. */ +# define DN_CREATE 0x00000004 /* File created. */ +# define DN_DELETE 0x00000008 /* File removed. */ +# define DN_RENAME 0x00000010 /* File renamed. */ +# define DN_ATTRIB 0x00000020 /* File changed attibutes. */ +# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */ +#endif + struct flock { short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ From 692e7ab8e19521c4e3fa43b09c6cc0adcc646b49 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 1 Oct 2002 19:42:02 +0000 Subject: [PATCH 2907/4487] 2002-02-08 Randolph Chung * sysdeps/hppa/elf/start.S: Define __data_start. --- sysdeps/hppa/elf/start.S | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sysdeps/hppa/elf/start.S b/sysdeps/hppa/elf/start.S index a5c3e521dd..b2f0bd2ad1 100644 --- a/sysdeps/hppa/elf/start.S +++ b/sysdeps/hppa/elf/start.S @@ -56,3 +56,10 @@ _start: .procend +/* Define a symbol for the first piece of initialized data. */ + .data + .globl __data_start +__data_start: + .long 0 + .weak data_start + data_start = __data_start From cf16933e969c6b859ffc5d7c9324790c931ad043 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 2 Oct 2002 05:07:46 +0000 Subject: [PATCH 2908/4487] Regenerated: autoconf sysdeps/alpha/elf/configure.in --- sysdeps/alpha/elf/configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/elf/configure b/sysdeps/alpha/elf/configure index ab3c0932aa..3ca6793758 100644 --- a/sysdeps/alpha/elf/configure +++ b/sysdeps/alpha/elf/configure @@ -60,7 +60,7 @@ fi fi echo $ac_n "checking for GP relative module local relocs""... $ac_c" 1>&6 -echo "configure:20: checking for GP relative module local relocs" >&5 +echo "configure:64: checking for GP relative module local relocs" >&5 if eval "test \"`echo '$''{'libc_cv_alpha_hidden_gprel'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -75,7 +75,7 @@ int foo (void) EOF libc_cv_alpha_hidden_gprel=no -if { ac_try='${CC-cc} -S $CFLAGS -O2 -fpic conftest.c 1>&5'; { (eval echo configure:35: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then +if { ac_try='${CC-cc} -S $CFLAGS -O2 -fpic conftest.c 1>&5'; { (eval echo configure:79: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then if grep -q 'bar.*!gprel' conftest.s \ && grep -q 'baz.*!gprel' conftest.s \ && ! grep -q 'bar.*!literal' conftest.s \ From 91bd9858387a220d6ad09fd4112812befc42267c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 2 Oct 2002 05:08:36 +0000 Subject: [PATCH 2909/4487] Regenerated: autoconf sysdeps/unix/sysv/aix/configure.in --- sysdeps/unix/sysv/aix/configure | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/aix/configure b/sysdeps/unix/sysv/aix/configure index 7fc920ecaa..fa4a6c987c 100644 --- a/sysdeps/unix/sysv/aix/configure +++ b/sysdeps/unix/sysv/aix/configure @@ -1,7 +1,4 @@ - # Local configure fragment for sysdeps/unix/sysv/linux. - -# On Linux, the default is to use libio instead of stdio. -test $stdio = default && stdio=libio + # Local configure fragment for sysdeps/unix/sysv/aix. # Don't bother trying to generate any glue code to be compatible with the # existing system library, because we are the only system library. From 5e2fa76de29f942b4b0264bd87b9583f32502598 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 2 Oct 2002 11:01:06 +0000 Subject: [PATCH 2910/4487] * sysdeps/mips/fpu/fraiseexcpt.c: Add internal definition. * sysdeps/mips/fpu/fesetenv.c: Likewise. --- sysdeps/mips/fpu/fesetenv.c | 2 ++ sysdeps/mips/fpu/fraiseexcpt.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/sysdeps/mips/fpu/fesetenv.c b/sysdeps/mips/fpu/fesetenv.c index ce7fe2cbff..b71a877ae3 100644 --- a/sysdeps/mips/fpu/fesetenv.c +++ b/sysdeps/mips/fpu/fesetenv.c @@ -39,3 +39,5 @@ fesetenv (const fenv_t *envp) /* Success. */ return 0; } + +libm_hidden_def (fesetenv) diff --git a/sysdeps/mips/fpu/fraiseexcpt.c b/sysdeps/mips/fpu/fraiseexcpt.c index 7f3d977787..3e2ebe0fe7 100644 --- a/sysdeps/mips/fpu/fraiseexcpt.c +++ b/sysdeps/mips/fpu/fraiseexcpt.c @@ -43,3 +43,5 @@ feraiseexcept (int excepts) return 0; } + +libm_hidden_def (feraiseexcept) From d044736b2752433fb87306f04b86c303420eef19 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 2 Oct 2002 20:24:20 +0000 Subject: [PATCH 2911/4487] Temporarily enable R_*_NONE relocs in ld.so. --- sysdeps/alpha/dl-machine.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 2b15e33518..05d988274b 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -522,7 +522,7 @@ elf_machine_rela (struct link_map *map, if (map != &GL(dl_rtld_map)) # endif { - /* XXX Make some timings. Maybe it's preverable to test for + /* XXX Make some timings. Maybe it's preferable to test for unaligned access and only do it the complex way if necessary. */ void *reloc_addr_1 = reloc_addr; Elf64_Addr reloc_addr_val; @@ -535,12 +535,11 @@ elf_machine_rela (struct link_map *map, memcpy (reloc_addr_1, &reloc_addr_val, 8); } } -# ifndef RTLD_BOOTSTRAP - else if (__builtin_expect (r_type == R_ALPHA_NONE, 0)) - return; -# endif else #endif + if (__builtin_expect (r_type == R_ALPHA_NONE, 0)) + return; + else { Elf64_Addr loadbase, sym_value; From 01c4c1c9aa2cab806a1efb3ae51cf0edc0e8237c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 3 Oct 2002 00:17:29 +0000 Subject: [PATCH 2912/4487] Avoid unterminated string literals. --- sysdeps/hppa/elf/initfini.c | 162 ++++++++++++++-------------- sysdeps/mach/hurd/mips/init-first.c | 24 ++--- 2 files changed, 93 insertions(+), 93 deletions(-) diff --git a/sysdeps/hppa/elf/initfini.c b/sysdeps/hppa/elf/initfini.c index d325d53787..4275cd53c6 100644 --- a/sysdeps/hppa/elf/initfini.c +++ b/sysdeps/hppa/elf/initfini.c @@ -1,5 +1,5 @@ /* Special .init and .fini section support for HPPA - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright (C) 2000, 2002 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 @@ -39,84 +39,84 @@ making the comparison and indirect call is quite expensive (see the comment in sysdeps/generic/initfini.c). */ -__asm__ (" - -#include \"defs.h\" - -/*@HEADER_ENDS*/ - -/*@_init_PROLOG_BEGINS*/ - .section .init - .align 4 - .globl _init - .type _init,@function -_init: - stw %rp,-20(%sp) - stwm %r4,64(%sp) - stw %r19,-32(%sp) - bl __gmon_start__,%rp - copy %r19,%r4 /* delay slot */ - copy %r4,%r19 -/*@_init_PROLOG_ENDS*/ - -/*@_init_EPILOG_BEGINS*/ - .text - .align 4 - .weak __gmon_start__ - .type __gmon_start__,@function -__gmon_start__: - .proc - .callinfo - .entry - bv,n %r0(%r2) - .exit - .procend - -/* Here is the tail end of _init. We put __gmon_start before this so - that the assembler creates the .PARISC.unwind section for us, ie. - with the right attributes. */ - .section .init - ldw -84(%sp),%rp - copy %r4,%r19 - bv %r0(%rp) -_end_init: - ldwm -64(%sp),%r4 - -/* Our very own unwind info, because the assembler can't handle - functions split into two or more pieces. */ - .section .PARISC.unwind - .extern _init - .word _init, _end_init - .byte 0x08, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08 - -/*@_init_EPILOG_ENDS*/ - -/*@_fini_PROLOG_BEGINS*/ - .section .fini - .align 4 - .globl _fini - .type _fini,@function -_fini: - stw %rp,-20(%sp) - stwm %r4,64(%sp) - stw %r19,-32(%sp) - copy %r19,%r4 -/*@_fini_PROLOG_ENDS*/ - -/*@_fini_EPILOG_BEGINS*/ - .section .fini - ldw -84(%sp),%rp - copy %r4,%r19 - bv %r0(%rp) -_end_fini: - ldwm -64(%sp),%r4 - - .section .PARISC.unwind - .extern _fini - .word _fini, _end_fini - .byte 0x08, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08 - -/*@_fini_EPILOG_ENDS*/ - -/*@TRAILER_BEGINS*/ +__asm__ ("\ +\n\ +#include \"defs.h\"\n\ +\n\ +/*@HEADER_ENDS*/\n\ +\n\ +/*@_init_PROLOG_BEGINS*/\n\ + .section .init\n\ + .align 4\n\ + .globl _init\n\ + .type _init,@function\n\ +_init:\n\ + stw %rp,-20(%sp)\n\ + stwm %r4,64(%sp)\n\ + stw %r19,-32(%sp)\n\ + bl __gmon_start__,%rp\n\ + copy %r19,%r4 /* delay slot */\n\ + copy %r4,%r19\n\ +/*@_init_PROLOG_ENDS*/\n\ +\n\ +/*@_init_EPILOG_BEGINS*/\n\ + .text\n\ + .align 4\n\ + .weak __gmon_start__\n\ + .type __gmon_start__,@function\n\ +__gmon_start__:\n\ + .proc\n\ + .callinfo\n\ + .entry\n\ + bv,n %r0(%r2)\n\ + .exit\n\ + .procend\n\ +\n\ +/* Here is the tail end of _init. We put __gmon_start before this so\n\ + that the assembler creates the .PARISC.unwind section for us, ie.\n\ + with the right attributes. */\n\ + .section .init\n\ + ldw -84(%sp),%rp\n\ + copy %r4,%r19\n\ + bv %r0(%rp)\n\ +_end_init:\n\ + ldwm -64(%sp),%r4\n\ +\n\ +/* Our very own unwind info, because the assembler can't handle\n\ + functions split into two or more pieces. */\n\ + .section .PARISC.unwind\n\ + .extern _init\n\ + .word _init, _end_init\n\ + .byte 0x08, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08\n\ +\n\ +/*@_init_EPILOG_ENDS*/\n\ +\n\ +/*@_fini_PROLOG_BEGINS*/\n\ + .section .fini\n\ + .align 4\n\ + .globl _fini\n\ + .type _fini,@function\n\ +_fini:\n\ + stw %rp,-20(%sp)\n\ + stwm %r4,64(%sp)\n\ + stw %r19,-32(%sp)\n\ + copy %r19,%r4\n\ +/*@_fini_PROLOG_ENDS*/\n\ +\n\ +/*@_fini_EPILOG_BEGINS*/\n\ + .section .fini\n\ + ldw -84(%sp),%rp\n\ + copy %r4,%r19\n\ + bv %r0(%rp)\n\ +_end_fini:\n\ + ldwm -64(%sp),%r4\n\ +\n\ + .section .PARISC.unwind\n\ + .extern _fini\n\ + .word _fini, _end_fini\n\ + .byte 0x08, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08\n\ +\n\ +/*@_fini_EPILOG_ENDS*/\n\ +\n\ +/*@TRAILER_BEGINS*/\ "); diff --git a/sysdeps/mach/hurd/mips/init-first.c b/sysdeps/mach/hurd/mips/init-first.c index 5adba3be17..5f76de7965 100644 --- a/sysdeps/mach/hurd/mips/init-first.c +++ b/sysdeps/mach/hurd/mips/init-first.c @@ -216,7 +216,7 @@ _init:\n\ jal preinit\n\ sd $28, 6*8($29)\n\ move $16, $29 # Save the old stack pointer to s0 ($16)\n\ - daddu $4, $29, 4*8 + daddu $4, $29, 4*8\n\ jal __init\n\ # Restore saved registers from the old stack.\n\ ld $28, 6*8($16)\n\ @@ -251,7 +251,7 @@ _init:\n\ jal preinit\n\ sw $28, 24($29)\n\ move $16, $29 # Save the old stack pointer to s0 ($16)\n\ - addu $4, $29, 32 + addu $4, $29, 32\n\ jal __init\n\ # Restore saved registers from the old stack.\n\ lw $28, 24($16)\n\ @@ -343,12 +343,12 @@ asm ("\ .globl __libc_init_first\n\ __libc_init_first:\n\ dsubu $29, 8\n\ - sd $31, 0($29) + sd $31, 0($29)\n\ jal __mach_init\n\ - ld $4, 0($29) - ld $5, 1*8($29) - ld $6, 2*8($29) - ld $7, 3*8($29) + ld $4, 0($29)\n\ + ld $5, 1*8($29)\n\ + ld $6, 2*8($29)\n\ + ld $7, 3*8($29)\n\ j ___libc_init_first\n\ "); #else @@ -358,12 +358,12 @@ asm ("\ .globl __libc_init_first\n\ __libc_init_first:\n\ subu $29, 4\n\ - sw $31, 0($29) + sw $31, 0($29)\n\ jal __mach_init\n\ - lw $4, 0($29) - lw $5, 4($29) - lw $6, 8($29) - lw $7, 12($29) + lw $4, 0($29)\n\ + lw $5, 4($29)\n\ + lw $6, 8($29)\n\ + lw $7, 12($29)\n\ j ___libc_init_first\n\ "); #endif From 5a0ab8474e843c7223a2ca87661e843edd6273dd Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 3 Oct 2002 08:54:48 +0000 Subject: [PATCH 2913/4487] Remove net/route.h. --- sysdeps/unix/sysv/linux/alpha/Dist | 1 - 1 file changed, 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist index 63e68d3d69..bba6642b42 100644 --- a/sysdeps/unix/sysv/linux/alpha/Dist +++ b/sysdeps/unix/sysv/linux/alpha/Dist @@ -9,7 +9,6 @@ ipc_priv.h kernel_sigaction.h kernel_stat.h kernel_termios.h -net/route.h oldglob.c rt_sigaction.S sizes.h From 96408c1d8c131a5b87cea783b0e489b0b73b181f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 3 Oct 2002 08:57:30 +0000 Subject: [PATCH 2914/4487] Not needed anymore. The generic version is sufficient. --- sysdeps/unix/sysv/linux/alpha/net/route.h | 140 ---------------------- 1 file changed, 140 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/alpha/net/route.h diff --git a/sysdeps/unix/sysv/linux/alpha/net/route.h b/sysdeps/unix/sysv/linux/alpha/net/route.h deleted file mode 100644 index 98df75f3aa..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/net/route.h +++ /dev/null @@ -1,140 +0,0 @@ -/* Copyright (C) 1997 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. */ - -/* Based on the 4.4BSD and Linux version of this file. */ - -#ifndef _NET_ROUTE_H -#define _NET_ROUTE_H 1 - -#include -#include -#include -#include - - -/* This structure gets passed by the SIOCADDRT and SIOCDELRT calls. */ -struct rtentry - { - unsigned long int rt_pad1; - struct sockaddr rt_dst; /* Target address. */ - struct sockaddr rt_gateway; /* Gateway addr (RTF_GATEWAY). */ - struct sockaddr rt_genmask; /* Target network mask (IP). */ - unsigned short int rt_flags; - short int rt_pad2; - unsigned long int rt_pad3; - unsigned char rt_tos; - unsigned char rt_class; - short int rt_pad4[3]; - short int rt_metric; /* +1 for binary compatibility! */ - char *rt_dev; /* Forcing the device at add. */ - unsigned long int rt_mtu; /* Per route MTU/Window. */ - unsigned long int rt_window; /* Window clamping. */ - unsigned short int rt_irtt; /* Initial RTT. */ - }; -/* Compatibility hack. */ -#define rt_mss rt_mtu - - -struct in6_rtmsg - { - struct in6_addr rtmsg_dst; - struct in6_addr rtmsg_src; - struct in6_addr rtmsg_gateway; - u_int32_t rtmsg_type; - u_int16_t rtmsg_dst_len; - u_int16_t rtmsg_src_len; - u_int32_t rtmsg_metric; - unsigned long int rtmsg_info; - u_int32_t rtmsg_flags; - int rtmsg_ifindex; - }; - - -#define RTF_UP 0x0001 /* Route usable. */ -#define RTF_GATEWAY 0x0002 /* Destination is a gateway. */ - -#define RTF_HOST 0x0004 /* Host entry (net otherwise). */ -#define RTF_REINSTATE 0x0008 /* Reinstate route after timeout. */ -#define RTF_DYNAMIC 0x0010 /* Created dyn. (by redirect). */ -#define RTF_MODIFIED 0x0020 /* Modified dyn. (by redirect). */ -#define RTF_MTU 0x0040 /* Specific MTU for this route. */ -#define RTF_MSS RTF_MTU /* Compatibility. */ -#define RTF_WINDOW 0x0080 /* Per route window clamping. */ -#define RTF_IRTT 0x0100 /* Initial round trip time. */ -#define RTF_REJECT 0x0200 /* Reject route. */ -#define RTF_STATIC 0x0400 /* Manually injected route. */ -#define RTF_XRESOLVE 0x0800 /* External resolver. */ -#define RTF_NOFORWARD 0x1000 /* Forwarding inhibited. */ -#define RTF_THROW 0x2000 /* Go to next class. */ -#define RTF_NOPMTUDISC 0x4000 /* Do not send packets with DF. */ - -/* for IPv6 */ -#define RTF_DEFAULT 0x00010000 /* default - learned via ND */ -#define RTF_ALLONLINK 0x00020000 /* fallback, no routers on link */ -#define RTF_ADDRCONF 0x00040000 /* addrconf route - RA */ - -#define RTF_LINKRT 0x00100000 /* link specific - device match */ -#define RTF_NONEXTHOP 0x00200000 /* route with no nexthop */ - -#define RTF_CACHE 0x01000000 /* cache entry */ -#define RTF_FLOW 0x02000000 /* flow significant route */ -#define RTF_POLICY 0x04000000 /* policy route */ - -#define RTCF_VALVE 0x00200000 -#define RTCF_MASQ 0x00400000 -#define RTCF_NAT 0x00800000 -#define RTCF_DOREDIRECT 0x01000000 -#define RTCF_LOG 0x02000000 -#define RTCF_DIRECTSRC 0x04000000 - -#define RTF_LOCAL 0x80000000 -#define RTF_INTERFACE 0x40000000 -#define RTF_MULTICAST 0x20000000 -#define RTF_BROADCAST 0x10000000 -#define RTF_NAT 0x08000000 - -#define RTF_ADDRCLASSMASK 0xF8000000 -#define RT_ADDRCLASS(flags) ((__u_int32_t) flags >> 23) - -#define RT_TOS(tos) ((tos) & IPTOS_TOS_MASK) - -#define RT_LOCALADDR(flags) ((flags & RTF_ADDRCLASSMASK) \ - == (RTF_LOCAL|RTF_INTERFACE)) - -#define RT_CLASS_UNSPEC 0 -#define RT_CLASS_DEFAULT 253 - -#define RT_CLASS_MAIN 254 -#define RT_CLASS_LOCAL 255 -#define RT_CLASS_MAX 255 - - -#define RTMSG_ACK NLMSG_ACK -#define RTMSG_OVERRUN NLMSG_OVERRUN - -#define RTMSG_NEWDEVICE 0x11 -#define RTMSG_DELDEVICE 0x12 -#define RTMSG_NEWROUTE 0x21 -#define RTMSG_DELROUTE 0x22 -#define RTMSG_NEWRULE 0x31 -#define RTMSG_DELRULE 0x32 -#define RTMSG_CONTROL 0x40 - -#define RTMSG_AR_FAILED 0x51 /* Address Resolution failed. */ - -#endif /* net/route.h */ From d78045b1a279b5fd1de507e6762a14ca07810eb9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 3 Oct 2002 09:14:46 +0000 Subject: [PATCH 2915/4487] Don't access memory beyond the source buffer. --- sysdeps/alpha/alphaev6/stxncpy.S | 85 ++++++++++++++++---------------- sysdeps/alpha/stxncpy.S | 72 ++++++++++++++++----------- 2 files changed, 85 insertions(+), 72 deletions(-) diff --git a/sysdeps/alpha/alphaev6/stxncpy.S b/sysdeps/alpha/alphaev6/stxncpy.S index 21e94ba7e2..f39c23a886 100644 --- a/sysdeps/alpha/alphaev6/stxncpy.S +++ b/sysdeps/alpha/alphaev6/stxncpy.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002 Free Software Foundation, Inc. Contributed by Richard Henderson (rth@tamu.edu) EV6 optimized by Rick Gorton . This file is part of the GNU C Library. @@ -210,35 +210,30 @@ $u_head: cmpbge zero, t6, t7 # E : beq a2, $u_eocfin # U : - nop + lda t6, -1 # E : nop bne t7, $u_final # U : - lda t6, -1 # E : mask out the bits we have - mskql t6, a1, t6 # U : already seen (stall) + mskql t6, a1, t6 # U : mask out bits already seen stq_u t0, 0(a0) # L : store first output word + or t6, t2, t2 # E : - or t6, t2, t2 # E : - cmpbge zero, t2, t7 # E : find nulls in second partial (stall) - addq a0, 8, a0 # E : - subq a2, 1, a2 # E : - + cmpbge zero, t2, t7 # E : find nulls in second partial + addq a0, 8, a0 # E : + subq a2, 1, a2 # E : bne t7, $u_late_head_exit # U : + /* Finally, we've got all the stupid leading edge cases taken care of and we can set up to enter the main loop. */ extql t2, a1, t1 # U : position hi-bits of lo word + beq a2, $u_eoc # U : ldq_u t2, 8(a1) # L : read next high-order source word addq a1, 8, a1 # E : - cmpbge zero, t2, t7 # E : (stall) - beq a2, $u_eoc # U : - nop - nop - - bne t7, $u_eos # e1 : - nop - nop - nop + extqh t2, a1, t0 # U : position lo-bits of hi word (stall) + cmpbge zero, t2, t7 # E : + nop + bne t7, $u_eos # U : /* Unaligned copy main loop. In order to avoid reading too much, the loop is structured to detect zeros in aligned source words. @@ -248,6 +243,7 @@ $u_head: to run as fast as possible. On entry to this basic block: + t0 == the shifted low-order bits from the current source word t1 == the shifted high-order bits from the previous source word t2 == the unshifted current source word @@ -255,25 +251,20 @@ $u_head: .align 4 $u_loop: - extqh t2, a1, t0 # U : extract high bits for current word - addq a1, 8, a1 # E : - extql t2, a1, t3 # U : extract low bits for next time + or t0, t1, t0 # E : current dst word now complete + subq a2, 1, a2 # E : decrement word count + extql t2, a1, t1 # U : extract high bits for next time addq a0, 8, a0 # E : - or t0, t1, t0 # E : current dst word now complete - ldq_u t2, 0(a1) # U : Latency=3 load high word for next time - stq_u t0, -8(a0) # U : save the current word (stall) - mov t3, t1 # E : + stq_u t0, -8(a0) # L : save the current word + beq a2, $u_eoc # U : + ldq_u t2, 8(a1) # L : Latency=3 load high word for next time + addq a1, 8, a1 # E : - subq a2, 1, a2 # E : - cmpbge zero, t2, t7 # E : test new word for eos (2 cycle stall for data) - beq a2, $u_eoc # U : (stall) + extqh t2, a1, t0 # U : extract low bits (2 cycle stall) + cmpbge zero, t2, t7 # E : test new word for eos nop - beq t7, $u_loop # U : - nop - nop - nop /* We've found a zero somewhere in the source word we just read. If it resides in the lower half, we have one (probably partial) @@ -281,11 +272,12 @@ $u_loop: have one full and one partial word left to write out. On entry to this basic block: + t0 == the shifted low-order bits from the current source word t1 == the shifted high-order bits from the previous source word t2 == the unshifted current source word. */ $u_eos: - extqh t2, a1, t0 # U : - or t0, t1, t0 # E : first (partial) source word complete (stall) + or t0, t1, t0 # E : first (partial) source word complete + nop cmpbge zero, t0, t7 # E : is the null in this first bit? (stall) bne t7, $u_final # U : (stall) @@ -323,17 +315,26 @@ $u_final: 1: stq_u t0, 0(a0) # L : ret (t9) # L0 : Latency=3 -$u_eoc: # end-of-count - extqh t2, a1, t0 # U : - or t0, t1, t0 # E : (stall) - cmpbge zero, t0, t7 # E : (stall) + /* Got to end-of-count before end of string. + On entry to this basic block: + t1 == the shifted high-order bits from the previous source word */ +$u_eoc: + and a1, 7, t6 # E : + sll t10, t6, t6 # U : (stall) + and t6, 0xff, t6 # E : (stall) + bne t6, 1f # U : (stall) + + ldq_u t2, 8(a1) # L : load final src word nop + extqh t2, a1, t0 # U : extract low bits for last word (stall) + or t1, t0, t1 # E : (stall) + +1: cmpbge zero, t1, t7 # E : + mov t1, t0 $u_eocfin: # end-of-count, final word or t10, t7, t7 # E : br $u_final # L0 : Latency=3 - nop - nop /* Unaligned copy entry point. */ .align 4 @@ -354,9 +355,7 @@ $unaligned: mskql t6, a0, t6 # U : nop nop - nop -1: - subq a1, t4, a1 # E : sub dest misalignment from src addr +1: subq a1, t4, a1 # E : sub dest misalignment from src addr /* If source misalignment is larger than dest misalignment, we need extra startup checks to avoid SEGV. */ diff --git a/sysdeps/alpha/stxncpy.S b/sysdeps/alpha/stxncpy.S index 9330f6d3e6..73bcd36e47 100644 --- a/sysdeps/alpha/stxncpy.S +++ b/sysdeps/alpha/stxncpy.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 2002 Free Software Foundation, Inc. Contributed by Richard Henderson (rth@tamu.edu) This file is part of the GNU C Library. @@ -183,10 +183,11 @@ $u_head: or t0, t6, t6 # e1 : mask original data for zero test cmpbge zero, t6, t7 # e0 : beq a2, $u_eocfin # .. e1 : - bne t7, $u_final # e1 : + lda t6, -1 # e0 : + bne t7, $u_final # .. e1 : - lda t6, -1 # e1 : mask out the bits we have - mskql t6, a1, t6 # e0 : already seen + mskql t6, a1, t6 # e0 : mask out bits already seen + nop # .. e1 : stq_u t0, 0(a0) # e0 : store first output word or t6, t2, t2 # .. e1 : cmpbge zero, t2, t7 # e0 : find nulls in second partial @@ -198,11 +199,13 @@ $u_head: of and we can set up to enter the main loop. */ extql t2, a1, t1 # e0 : position hi-bits of lo word - ldq_u t2, 8(a1) # .. e1 : read next high-order source word - addq a1, 8, a1 # e0 : - cmpbge zero, t2, t7 # e1 (stall) - beq a2, $u_eoc # e1 : - bne t7, $u_eos # e1 : + beq a2, $u_eoc # .. e1 : + ldq_u t2, 8(a1) # e0 : read next high-order source word + addq a1, 8, a1 # .. e1 : + extqh t2, a1, t0 # e0 : position lo-bits of hi word + cmpbge zero, t2, t7 # .. e1 : test new word for eos + nop # e0 : + bne t7, $u_eos # .. e1 : /* Unaligned copy main loop. In order to avoid reading too much, the loop is structured to detect zeros in aligned source words. @@ -212,6 +215,7 @@ $u_head: to run as fast as possible. On entry to this basic block: + t0 == the shifted low-order bits from the current source word t1 == the shifted high-order bits from the previous source word t2 == the unshifted current source word @@ -219,18 +223,18 @@ $u_head: .align 3 $u_loop: - extqh t2, a1, t0 # e0 : extract high bits for current word - addq a1, 8, a1 # .. e1 : - extql t2, a1, t3 # e0 : extract low bits for next time - addq a0, 8, a0 # .. e1 : or t0, t1, t0 # e0 : current dst word now complete - ldq_u t2, 0(a1) # .. e1 : load high word for next time - stq_u t0, -8(a0) # e0 : save the current word - mov t3, t1 # .. e1 : - subq a2, 1, a2 # e0 : + subq a2, 1, a2 # .. e1 : decrement word count + stq_u t0, 0(a0) # e0 : save the current word + addq a0, 8, a0 # .. e1 : + extql t2, a1, t1 # e0 : extract high bits for next time + beq a2, $u_eoc # .. e1 : + ldq_u t2, 8(a1) # e0 : load high word for next time + addq a1, 8, a1 # .. e1 : + nop # e0 : cmpbge zero, t2, t7 # .. e1 : test new word for eos - beq a2, $u_eoc # e1 : - beq t7, $u_loop # e1 : + extqh t2, a1, t0 # e0 : extract low bits for current word + beq t7, $u_loop # .. e1 : /* We've found a zero somewhere in the source word we just read. If it resides in the lower half, we have one (probably partial) @@ -238,25 +242,23 @@ $u_loop: have one full and one partial word left to write out. On entry to this basic block: + t0 == the shifted low-order bits from the current source word t1 == the shifted high-order bits from the previous source word t2 == the unshifted current source word. */ $u_eos: - extqh t2, a1, t0 # e0 : - or t0, t1, t0 # e1 : first (partial) source word complete - + or t0, t1, t0 # e0 : first (partial) source word complete cmpbge zero, t0, t7 # e0 : is the null in this first bit? bne t7, $u_final # .. e1 (zdb) stq_u t0, 0(a0) # e0 : the null was in the high-order bits addq a0, 8, a0 # .. e1 : - subq a2, 1, a2 # e1 : + subq a2, 1, a2 # e0 : $u_late_head_exit: - extql t2, a1, t0 # .. e0 : + extql t2, a1, t0 # e0 : cmpbge zero, t0, t7 # e0 : or t7, t10, t6 # e1 : cmoveq a2, t6, t7 # e0 : - nop # .. e1 : /* Take care of a final (probably partial) result word. On entry to this basic block: @@ -279,10 +281,22 @@ $u_final: 1: stq_u t0, 0(a0) # e0 : ret (t9) # .. e1 : -$u_eoc: # end-of-count - extqh t2, a1, t0 - or t0, t1, t0 - cmpbge zero, t0, t7 + /* Got to end-of-count before end of string. + On entry to this basic block: + t1 == the shifted high-order bits from the previous source word */ +$u_eoc: + and a1, 7, t6 # e1 : + sll t10, t6, t6 # e0 : + and t6, 0xff, t6 # e0 : + bne t6, 1f # e1 : avoid src word load if we can + + ldq_u t2, 8(a1) # e0 : load final src word + nop # .. e1 : + extqh t2, a1, t0 # e0 : extract high bits for last word + or t1, t0, t1 # e1 : + +1: cmpbge zero, t1, t7 + mov t1, t0 $u_eocfin: # end-of-count, final word or t10, t7, t7 From ce9fa295f04d169f45415c9585eef3bc72f3fe41 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 9 Oct 2002 09:25:29 +0000 Subject: [PATCH 2916/4487] (__readv): Rename to __libc_readv and make old name an alias. --- sysdeps/unix/sysv/aix/readv.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/aix/readv.c b/sysdeps/unix/sysv/aix/readv.c index 8c12690993..eddca0fc87 100644 --- a/sysdeps/unix/sysv/aix/readv.c +++ b/sysdeps/unix/sysv/aix/readv.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1995-1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1995-1998, 2000, 2002 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 @@ -27,11 +27,12 @@ extern ssize_t kreadv (int fd, const struct iovec *iovp, size_t iovcnt, Operates just like `read' (see ) except that data are put in VECTOR instead of a contiguous buffer. */ ssize_t -__readv (fd, vector, count) +__libc_readv (fd, vector, count) int fd; const struct iovec *vector; int count; { return kreadv (fd, vector, count, 0); } -strong_alias (__readv, readv) +strong_alias (__libc_readv, __readv) +weak_alias (__libc_readv, readv) From c45957343f55b91a10bdd376fcbb9ed28eab9c9e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 9 Oct 2002 09:28:58 +0000 Subject: [PATCH 2917/4487] (waitid): Rename to __waitid and make old name an alias. --- sysdeps/unix/sysv/aix/waitid.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/aix/waitid.c b/sysdeps/unix/sysv/aix/waitid.c index 36a012ef02..1d637df76e 100644 --- a/sysdeps/unix/sysv/aix/waitid.c +++ b/sysdeps/unix/sysv/aix/waitid.c @@ -1,5 +1,5 @@ /* Pseudo implementation of waitid. - Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 2000, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Zack Weinberg , 1997. @@ -31,7 +31,7 @@ extern pid_t kwaitpid (int *stat_loc, pid_t pid, int options, struct rusage *ru_loc, siginfo_t *infop); int -waitid (idtype, id, infop, options) +__waitid (idtype, id, infop, options) idtype_t idtype; id_t id; siginfo_t *infop; @@ -80,3 +80,4 @@ waitid (idtype, id, infop, options) return 0; } +weak_alias (__waitid, waitid) From 402dbb2e81f71e5c0f1bbf04b14a82e7e74b4676 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 9 Oct 2002 09:35:00 +0000 Subject: [PATCH 2918/4487] (__writev): Rename to __libc_writev and make old name an alias. --- sysdeps/unix/sysv/aix/writev.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/aix/writev.c b/sysdeps/unix/sysv/aix/writev.c index 0d5a3335af..d0e5741590 100644 --- a/sysdeps/unix/sysv/aix/writev.c +++ b/sysdeps/unix/sysv/aix/writev.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1995-1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1995-1998, 2000, 2002 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 @@ -27,11 +27,12 @@ extern ssize_t kwritev (int fd, const struct iovec *iovp, size_t iovcnt, Operates just like `read' (see ) except that data are put in VECTOR instead of a contiguous buffer. */ ssize_t -__writev (fd, vector, count) +__libc_writev (fd, vector, count) int fd; const struct iovec *vector; int count; { return kwritev (fd, vector, count, 0); } -strong_alias (__writev, writev) +strong_alias (__libc_writev, __writev) +weak_alias (__libc_writev, writev) From d030d52da237cfe4159a06fe78564368bb837d71 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 11 Oct 2002 10:51:31 +0000 Subject: [PATCH 2919/4487] 2002-10-07 Roland McGrath * sysdeps/generic/errno.c: New file. * csu/Makefile (aux): New variable, list errno. * sysdeps/unix/sysv/linux/i386/sysdep.S (errno, _errno): Remove defns. * sysdeps/unix/sysv/linux/m68k/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/arm/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/cris/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/hppa/sysdep.c: Likewise. * sysdeps/unix/sysv/linux/ia64/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/powerpc/sysdep.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/sh/sysdep.S: Likewise. * sysdeps/unix/alpha/sysdep.S: Likewise. * sysdeps/generic/start.c: Likewise. * sysdeps/unix/start.c: Likewise. * sysdeps/unix/arm/start.c: Likewise. * sysdeps/unix/bsd/ultrix4/mips/start.S: Likewise. * sysdeps/unix/sparc/start.c: Likewise. * sysdeps/unix/sysv/irix4/start.c: Likewise. * sysdeps/unix/sysv/linux/mips/sysdep.S: File removed. --- sysdeps/unix/alpha/sysdep.S | 13 ---------- sysdeps/unix/arm/start.c | 5 ---- sysdeps/unix/bsd/ultrix4/mips/start.S | 3 --- sysdeps/unix/sysv/irix4/start.c | 3 --- sysdeps/unix/sysv/linux/arm/sysdep.S | 7 ------ sysdeps/unix/sysv/linux/cris/sysdep.S | 8 ------ sysdeps/unix/sysv/linux/hppa/sysdep.c | 5 ---- sysdeps/unix/sysv/linux/m68k/sysdep.S | 13 ---------- sysdeps/unix/sysv/linux/mips/sysdep.S | 35 --------------------------- 9 files changed, 92 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/mips/sysdep.S diff --git a/sysdeps/unix/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S index 5279b86076..05c00918e6 100644 --- a/sysdeps/unix/alpha/sysdep.S +++ b/sysdeps/unix/alpha/sysdep.S @@ -20,19 +20,6 @@ #include #include - .section .bss - .globl errno - .align 2 -errno: .space 4 -#ifdef __ELF__ - .type errno, @object - .size errno, 4 -#endif - .globl __errno -__errno = errno - .globl _errno -_errno = errno - .text .align 2 diff --git a/sysdeps/unix/arm/start.c b/sysdeps/unix/arm/start.c index a8fea14b9f..6088faaed1 100644 --- a/sysdeps/unix/arm/start.c +++ b/sysdeps/unix/arm/start.c @@ -28,11 +28,6 @@ int __data_start = 0; weak_alias (__data_start, data_start) #endif -#ifndef errno -volatile int __errno; -strong_alias (__errno, errno) -#endif - extern void __libc_init __P ((int argc, char **argv, char **envp)); extern int main __P ((int argc, char **argv, char **envp)); diff --git a/sysdeps/unix/bsd/ultrix4/mips/start.S b/sysdeps/unix/bsd/ultrix4/mips/start.S index df86229ea5..c2fc4882d8 100644 --- a/sysdeps/unix/bsd/ultrix4/mips/start.S +++ b/sysdeps/unix/bsd/ultrix4/mips/start.S @@ -19,9 +19,6 @@ #include -__errno: -.comm errno, 4 - ENTRY(__start) .set noreorder diff --git a/sysdeps/unix/sysv/irix4/start.c b/sysdeps/unix/sysv/irix4/start.c index 719d017993..a88d0d4d1b 100644 --- a/sysdeps/unix/sysv/irix4/start.c +++ b/sysdeps/unix/sysv/irix4/start.c @@ -27,9 +27,6 @@ /* The first piece of initialized data. */ int __data_start = 0; -__volatile int __errno = 0; -strong_alias (__errno, errno) - extern void __libc_init __P ((int argc, char **argv, char **envp)); extern int main __P ((int argc, char **argv, char **envp)); diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.S b/sysdeps/unix/sysv/linux/arm/sysdep.S index 48dcffae13..1a4de2adb3 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.S +++ b/sysdeps/unix/sysv/linux/arm/sysdep.S @@ -18,13 +18,6 @@ #include -/* We define errno here, to be consistent with Linux/i386. */ - .bss - .globl C_SYMBOL_NAME(errno) - .type C_SYMBOL_NAME(errno),%object - .size C_SYMBOL_NAME(errno),4 -C_SYMBOL_NAME(errno): .zero 4 -weak_alias (errno, _errno) .text /* The syscall stubs jump here when they detect an error. diff --git a/sysdeps/unix/sysv/linux/cris/sysdep.S b/sysdeps/unix/sysv/linux/cris/sysdep.S index 64fb8505af..e53e7bbfb9 100644 --- a/sysdeps/unix/sysv/linux/cris/sysdep.S +++ b/sysdeps/unix/sysv/linux/cris/sysdep.S @@ -18,14 +18,6 @@ #include -/* Make space for the errno variable. */ - - .globl C_SYMBOL_NAME(errno) - .type C_SYMBOL_NAME(errno),@object - .lcomm C_SYMBOL_NAME(errno),4 - -weak_alias (errno, _errno) - /* The syscall stubs jump here when they detect an error, bot for PIC and non-PIC. */ diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.c b/sysdeps/unix/sysv/linux/hppa/sysdep.c index b333b7013d..bf4d4af5c7 100644 --- a/sysdeps/unix/sysv/linux/hppa/sysdep.c +++ b/sysdeps/unix/sysv/linux/hppa/sysdep.c @@ -28,11 +28,6 @@ __syscall_error (int err_no) return -1; } -/* We also have to have a 'real' definition of errno. */ -#undef errno -int errno = 0; -weak_alias (errno, _errno) - /* HPPA implements syscall() in 'C'; the assembler version would typically be in syscall.S. */ diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.S b/sysdeps/unix/sysv/linux/m68k/sysdep.S index 628335b8d0..e4ec92d836 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.S +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.S @@ -18,19 +18,6 @@ #include -/* The Linux version is in fact m68k/ELF and the start.? file for this - system (sysdeps/m68k/elf/start.S) is also used by The Hurd. This file - must not contain the definition of the `errno' variable, we have to - define it somewhere else. - - ...and this place is here. */ - .bss - .globl errno - .type errno,@object -errno: .space 4 - .size errno,4 -weak_alias (errno, _errno) - .text /* The following code is only used in the shared library when we compile the reentrant version. Otherwise each system call defines diff --git a/sysdeps/unix/sysv/linux/mips/sysdep.S b/sysdeps/unix/sysv/linux/mips/sysdep.S deleted file mode 100644 index 2584982bb0..0000000000 --- a/sysdeps/unix/sysv/linux/mips/sysdep.S +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright (C) 1998, 2002 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. */ - -#include - -/* The Linux version is in fact MIPS/ELF and the start.? file for this - system (sysdeps/mips/elf/start.S) is also used by The Hurd. This file - must not contain the definition of the `errno' variable, we have to - define it somewhere else. - - ...and this place is here. */ - .bss - .globl errno - .type errno,@object - .size errno,4 -errno: .word 4 - .text -weak_alias(errno, _errno) - -#include From 0a269341005305d69d3f0959b8af9eae9d2e9357 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 14 Oct 2002 01:02:53 +0000 Subject: [PATCH 2920/4487] 2002-10-13 Roland McGrath * posix/unistd.h [__USE_GNU] (getresuid, getresgid, setresuid, setresgid): Declare them. * NEWS: Mention it. * include/unistd.h (__getresuid, __getresgid, __setresuid, __setresgid): Declare them, add libc_hidden_proto. * posix/Versions (libc: GLIBC_2.3.2): New set. Add getresuid, getresgid, setresuid, setresgid here. * Versions.def (libc): Define GLIBC_2.3.2 set. * sysdeps/generic/getresuid.c (__getresuid): Fix argument types. Add libc_hidden_def. * sysdeps/generic/getresgid.c (__getresgid): Likewise. * sysdeps/generic/setresgid.c: New file. * sysdeps/generic/setresuid.c: New file. * sysdeps/unix/sysv/linux/Makefile [$(subdir) = misc] (sysdep_routines): Don't add getresuid and getresgid here. * sysdeps/unix/sysv/linux/arm/Makefile [$(subdir) = misc] (sysdep_routines): Don't add setresuid and setresgid here. * sysdeps/unix/sysv/linux/cris/Makefile: Likewise. * sysdeps/unix/sysv/linux/sh/Makefile: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/Makefile: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/Makefile: Likewise. * sysdeps/unix/sysv/linux/i386/Makefile: Likewise. * sysdeps/unix/sysv/linux/m68k/Makefile: Likewise. * posix/Makefile (routines): Add them all here instead. * sysdeps/unix/sysv/linux/i386/getresuid.c (getresuid): Renamed to __getresuid. Add libc_hidden_def for that, and weak alias to old name. * sysdeps/unix/sysv/linux/i386/getresgid.c (getresgid): Renamed to __getresgid. Add libc_hidden_def for that, and weak alias to old name. * sysdeps/unix/sysv/linux/i386/setresuid.c: Add libc_hidden_def. [! __NR_setresuid]: Include generic file. * sysdeps/unix/sysv/linux/i386/setresgid.c (setresgid): Renamed to __setresgid. Add libc_hidden_def for that, and weak alias to old name. [! __NR_setresuid]: Include generic file. * sysdeps/unix/sysv/linux/syscalls.list (setresuid, setresgid): Caller is - now, not EXTRA. * sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list (setresuid, setresgid, getresuid, getresgid): Likewise. * sysdeps/unix/sysv/linux/syscalls.list (getresuid, getresgid): Add these calls here. * sysdeps/unix/sysv/linux/alpha/syscalls.list: Remove them here. * sysdeps/unix/sysv/linux/hppa/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/x86_64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/mips/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/Makefile [$(subdir) = misc] (sysdep_routines): Add setfsuid and setfsgid here. * sysdeps/unix/sysv/linux/arm/Makefile: Not here. * sysdeps/unix/sysv/linux/sparc/sparc32/Makefile: Likewise. * sysdeps/unix/sysv/linux/cris/Makefile: Likewise. * sysdeps/unix/sysv/linux/sh/Makefile: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/Makefile: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/Makefile: Likewise. * sysdeps/unix/sysv/linux/i386/Makefile: Likewise. * sysdeps/unix/sysv/linux/m68k/Makefile: Likewise. --- sysdeps/unix/sysv/linux/arm/Makefile | 2 +- sysdeps/unix/sysv/linux/cris/Makefile | 4 ---- sysdeps/unix/sysv/linux/m68k/Makefile | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile index 6040b20193..24c7ee99b0 100644 --- a/sysdeps/unix/sysv/linux/arm/Makefile +++ b/sysdeps/unix/sysv/linux/arm/Makefile @@ -1,5 +1,5 @@ ifeq ($(subdir),misc) -sysdep_routines += setfsgid setfsuid setresgid setresuid ioperm +sysdep_routines += ioperm sysdep_headers += sys/elf.h sys/io.h endif diff --git a/sysdeps/unix/sysv/linux/cris/Makefile b/sysdeps/unix/sysv/linux/cris/Makefile index cebaa94134..9d02acecc4 100644 --- a/sysdeps/unix/sysv/linux/cris/Makefile +++ b/sysdeps/unix/sysv/linux/cris/Makefile @@ -1,7 +1,3 @@ -ifeq ($(subdir),misc) -sysdep_routines += setfsgid setfsuid setresgid setresuid -endif - ifeq ($(subdir),signal) sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \ rt_sigqueueinfo rt_sigaction rt_sigpending diff --git a/sysdeps/unix/sysv/linux/m68k/Makefile b/sysdeps/unix/sysv/linux/m68k/Makefile index 55eeeabe10..6bb4f6b816 100644 --- a/sysdeps/unix/sysv/linux/m68k/Makefile +++ b/sysdeps/unix/sysv/linux/m68k/Makefile @@ -3,7 +3,7 @@ m68k-syntax-flag = -DMOTOROLA_SYNTAX ifeq ($(subdir),misc) -sysdep_routines += mremap setfsgid setfsuid setresgid setresuid +sysdep_routines += mremap sysdep_headers += sys/reg.h endif From 506ee216c432722336c59e7ca182d956b9f8d56c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 14 Oct 2002 01:03:03 +0000 Subject: [PATCH 2921/4487] 2002-10-13 Roland McGrath * posix/unistd.h [__USE_GNU] (getresuid, getresgid, setresuid, setresgid): Declare them. * NEWS: Mention it. * include/unistd.h (__getresuid, __getresgid, __setresuid, __setresgid): Declare them, add libc_hidden_proto. * posix/Versions (libc: GLIBC_2.3.2): New set. Add getresuid, getresgid, setresuid, setresgid here. * Versions.def (libc): Define GLIBC_2.3.2 set. * sysdeps/generic/getresuid.c (__getresuid): Fix argument types. Add libc_hidden_def. * sysdeps/generic/getresgid.c (__getresgid): Likewise. * sysdeps/generic/setresgid.c: New file. * sysdeps/generic/setresuid.c: New file. * sysdeps/unix/sysv/linux/Makefile [$(subdir) = misc] (sysdep_routines): Don't add getresuid and getresgid here. * sysdeps/unix/sysv/linux/arm/Makefile [$(subdir) = misc] (sysdep_routines): Don't add setresuid and setresgid here. * sysdeps/unix/sysv/linux/cris/Makefile: Likewise. * sysdeps/unix/sysv/linux/sh/Makefile: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/Makefile: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/Makefile: Likewise. * sysdeps/unix/sysv/linux/i386/Makefile: Likewise. * sysdeps/unix/sysv/linux/m68k/Makefile: Likewise. * posix/Makefile (routines): Add them all here instead. * sysdeps/unix/sysv/linux/i386/getresuid.c (getresuid): Renamed to __getresuid. Add libc_hidden_def for that, and weak alias to old name. * sysdeps/unix/sysv/linux/i386/getresgid.c (getresgid): Renamed to __getresgid. Add libc_hidden_def for that, and weak alias to old name. * sysdeps/unix/sysv/linux/i386/setresuid.c: Add libc_hidden_def. [! __NR_setresuid]: Include generic file. * sysdeps/unix/sysv/linux/i386/setresgid.c (setresgid): Renamed to __setresgid. Add libc_hidden_def for that, and weak alias to old name. [! __NR_setresuid]: Include generic file. * sysdeps/unix/sysv/linux/syscalls.list (setresuid, setresgid): Caller is - now, not EXTRA. * sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list (setresuid, setresgid, getresuid, getresgid): Likewise. * sysdeps/unix/sysv/linux/syscalls.list (getresuid, getresgid): Add these calls here. * sysdeps/unix/sysv/linux/alpha/syscalls.list: Remove them here. * sysdeps/unix/sysv/linux/hppa/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/x86_64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/mips/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewise. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 3 --- sysdeps/unix/sysv/linux/hppa/syscalls.list | 3 --- sysdeps/unix/sysv/linux/mips/syscalls.list | 2 -- 3 files changed, 8 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 059f753d2b..7c1a0bebf2 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -55,9 +55,6 @@ shutdown - shutdown 2 __shutdown shutdown socket - socket 3 __socket socket socketpair - socketpair 4 __socketpair socketpair -getresuid - getresuid 3 getresuid -getresgid - getresgid 3 getresgid - # access pci space protected from machine checks: pciconfig_read EXTRA pciconfig_read 5 pciconfig_read pciconfig_write EXTRA pciconfig_write 5 pciconfig_write diff --git a/sysdeps/unix/sysv/linux/hppa/syscalls.list b/sysdeps/unix/sysv/linux/hppa/syscalls.list index 1c7a20d241..6b18e1f166 100644 --- a/sysdeps/unix/sysv/linux/hppa/syscalls.list +++ b/sysdeps/unix/sysv/linux/hppa/syscalls.list @@ -32,8 +32,5 @@ shutdown - shutdown i:ii __shutdown shutdown socket - socket i:iii __socket socket socketpair - socketpair i:iiif __socketpair socketpair -getresuid - getresuid i:ppp getresuid -getresgid - getresgid i:ppp getresgid - setrlimit - setrlimit i:ip __setrlimit setrlimit getrlimit - getrlimit i:ip __getrlimit getrlimit diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index fe01d76b19..07e942d3cd 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -58,8 +58,6 @@ s_getdents getdents getdents i:ipi __syscall_getdents s_getdents64 getdents getdents64 i:ipi __syscall_getdents64 s_getpmsg getpmsg getpmsg i:ipppp __syscall_getpmsg s_getpriority getpriority getpriority i:ii __syscall_getpriority -getresgid - getresgid i:ppp getresgid -getresuid - getresuid i:ppp getresuid s_ipc msgget ipc i:iiiip __syscall_ipc s_lstat64 lxstat64 lstat64 i:sp __syscall_lstat64 s_mmap2 mmap64 mmap2 b:aniiii __syscall_mmap2 From f51d25319152c18899334ae52045f84578e2ea86 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 14 Oct 2002 08:59:01 +0000 Subject: [PATCH 2922/4487] Regenerated. --- sysdeps/mips/fpu/libm-test-ulps | 630 ++++++++++---------------------- 1 file changed, 202 insertions(+), 428 deletions(-) diff --git a/sysdeps/mips/fpu/libm-test-ulps b/sysdeps/mips/fpu/libm-test-ulps index 1c189098a8..e2091f8a15 100644 --- a/sysdeps/mips/fpu/libm-test-ulps +++ b/sysdeps/mips/fpu/libm-test-ulps @@ -1,61 +1,18 @@ # Begin of automatic generation -# asin -Test "asin (-0.5) == -pi/6": -float: 2 -ifloat: 2 -Test "asin (0.5) == pi/6": -float: 2 -ifloat: 2 -Test "asin (0.7) == 0.77539749661075306374035335271498708": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 - # atan2 -Test "atan2 (0.7, -1.0) == 2.530866689200584621918884506789267": +Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025": float: 3 ifloat: 3 -Test "atan2 (-0.7, -1.0) == -2.530866689200584621918884506789267": +Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025": float: 3 ifloat: 3 -Test "atan2 (1.4, -0.93) == 2.1571487668237843754887415992772736": -float: 4 -ifloat: 4 - -# atanh -Test "atanh (0.7) == 0.8673005276940531944": -double: 1 -idouble: 1 - -# cabs -Test "cabs (-0.7 + 12.4 i) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "cabs (-0.7 - 12.4 i) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "cabs (-12.4 + 0.7 i) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "cabs (-12.4 - 0.7 i) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508432547041028554": -double: 1 -idouble: 1 -Test "cabs (0.7 + 12.4 i) == 12.419742348374220601176836866763271": +Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772": float: 1 ifloat: 1 -# cacos -Test "Real part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i": +# atanh +Test "atanh (0.75) == 0.972955074527656652552676371721589865": float: 1 ifloat: 1 @@ -70,20 +27,12 @@ double: 1 float: 3 idouble: 1 ifloat: 3 -Test "Real part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459105272080819308 + 1.1351827477151551088992008271819053 i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 # casin -Test "Real part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i": -double: 3 -float: 2 -idouble: 3 -ifloat: 2 -Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i": +Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": +double: 1 float: 1 +idouble: 1 ifloat: 1 # casinh @@ -97,11 +46,13 @@ double: 3 float: 6 idouble: 3 ifloat: 6 -Test "Real part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i": +Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": double: 1 -idouble: 1 -Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i": float: 1 +idouble: 1 ifloat: 1 # catan @@ -113,12 +64,9 @@ double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Real part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i": +Test "Real part of: catan (0.75 + 1.25 i) == 1.10714871779409050301706546017853704 + 0.549306144334054845697622618461262852 i": float: 4 ifloat: 4 -Test "Imaginary part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i": -double: 1 -idouble: 1 # catanh Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": @@ -127,20 +75,21 @@ idouble: 4 Test "Imaginary part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": float: 4 ifloat: 4 -Test "Real part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i": -float: 1 -ifloat: 1 -Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i": +Test "Real part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i": double: 1 -float: 6 idouble: 1 +Test "Imaginary part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i": +float: 6 ifloat: 6 # cbrt Test "cbrt (-27.0) == -3.0": double: 1 idouble: 1 -Test "cbrt (0.970299) == 0.99": +Test "cbrt (0.75) == 0.908560296416069829445605878163630251": +double: 1 +idouble: 1 +Test "cbrt (0.9921875) == 0.997389022060725270579075195353955217": double: 1 idouble: 1 @@ -148,12 +97,14 @@ idouble: 1 Test "Imaginary part of: ccos (-2 - 3 i) == -4.1896256909688072301 - 9.1092278937553365979 i": float: 1 ifloat: 1 -Test "Real part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i": -double: 1 -idouble: 1 -Test "Imaginary part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i": +Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": double: 1 +float: 1 idouble: 1 +ifloat: 1 +Test "Imaginary part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": +float: 1 +ifloat: 1 # ccosh Test "Real part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i": @@ -162,34 +113,30 @@ ifloat: 1 Test "Imaginary part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i": float: 1 ifloat: 1 -Test "Real part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i": +Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Imaginary part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i": -double: 1 -idouble: 1 +Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": +float: 1 +ifloat: 1 # cexp Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": float: 1 ifloat: 1 -Test "Real part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i": +Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": float: 1 ifloat: 1 # clog Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i": -double: 1 float: 3 -idouble: 1 ifloat: 3 +Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i": +float: 1 +ifloat: 1 # clog10 Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i": @@ -227,14 +174,9 @@ ifloat: 1 Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i": float: 1 ifloat: 1 -Test "Real part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i": -double: 1 +Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i": float: 1 -idouble: 1 ifloat: 1 -Test "Imaginary part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i": -double: 1 -idouble: 1 Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i": float: 1 ifloat: 1 @@ -249,28 +191,39 @@ float: 1 ifloat: 1 # cos -Test "cos (0.7) == 0.76484218728448842625585999019186495": +Test "cos (M_PI_6l * 2.0) == 0.5": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "cos (M_PI_6l * 2.0) == 0.5": -double: 1 -float: 0.5 -idouble: 1 -ifloat: 0.5 Test "cos (M_PI_6l * 4.0) == -0.5": double: 2 float: 1 idouble: 2 ifloat: 1 Test "cos (pi/2) == 0": -double: 0.2758 -float: 0.3667 -idouble: 0.2758 -ifloat: 0.3667 +double: 1 +float: 1 +idouble: 1 +ifloat: 1 # cpow +Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": +float: 1 +ifloat: 1 +Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i": +double: 1 +float: 4 +idouble: 1 +ifloat: 4 +Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i": +double: 2 +float: 3 +idouble: 2 +ifloat: 3 Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": double: 1 float: 4 @@ -285,19 +238,14 @@ float: 2 idouble: 2 ifloat: 2 -# csin -Test "Imaginary part of: csin (0.7 + 1.2 i) == 1.1664563419657581376 + 1.1544997246948547371 i": -float: 1 -ifloat: 1 - # csinh Test "Imaginary part of: csinh (-2 - 3 i) == 3.5905645899857799520 - 0.5309210862485198052 i": double: 1 idouble: 1 -Test "Real part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i": +Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": float: 1 ifloat: 1 -Test "Imaginary part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i": +Test "Imaginary part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": float: 1 ifloat: 1 @@ -308,27 +256,14 @@ ifloat: 1 Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i": float: 1 ifloat: 1 -Test "Real part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i": -float: 1 -ifloat: 1 # ctan Test "Real part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i": double: 1 idouble: 1 -Test "Real part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i": -float: 1 -ifloat: 1 -Test "Imaginary part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i": +Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i": double: 1 -float: 1 idouble: 1 -ifloat: 1 # ctanh Test "Real part of: ctanh (-2 - 3 i) == -0.9653858790221331242 + 0.0098843750383224937 i": @@ -339,34 +274,22 @@ ifloat: 2 Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i": float: 1 ifloat: 1 -Test "Real part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -Test "Imaginary part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 +Test "Real part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i": +double: 1 +idouble: 1 + +# erf +Test "erf (1.25) == 0.922900128256458230136523481197281140": +double: 1 +idouble: 1 # erfc -Test "erfc (0.7) == 0.32219880616258152702": +Test "erfc (2.0) == 0.00467773498104726583793074363274707139": double: 1 idouble: 1 -Test "erfc (1.2) == 0.089686021770364619762": -double: 2 -float: 2 -idouble: 2 -ifloat: 2 -Test "erfc (2.0) == 0.0046777349810472658379": +Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8": double: 1 idouble: 1 -Test "erfc (4.1) == 0.67000276540848983727e-8": -double: 24 -float: 12 -idouble: 24 -ifloat: 12 # exp10 Test "exp10 (-1) == 0.1": @@ -374,8 +297,10 @@ double: 2 float: 1 idouble: 2 ifloat: 1 -Test "exp10 (0.7) == 5.0118723362727228500155418688494574": +Test "exp10 (0.75) == 5.62341325190349080394951039776481231": +double: 1 float: 1 +idouble: 1 ifloat: 1 Test "exp10 (3) == 1000": double: 6 @@ -384,32 +309,13 @@ idouble: 6 ifloat: 2 # expm1 +Test "expm1 (0.75) == 1.11700001661267466854536981983709561": +double: 1 +idouble: 1 Test "expm1 (1) == M_El - 1.0": float: 1 ifloat: 1 -# fmod -Test "fmod (-6.5, -2.3) == -1.9": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -Test "fmod (-6.5, 2.3) == -1.9": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -Test "fmod (6.5, -2.3) == 1.9": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -Test "fmod (6.5, 2.3) == 1.9": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 - # hypot Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271": float: 1 @@ -426,9 +332,6 @@ ifloat: 1 Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (0.7, 1.2) == 1.3892443989449804508432547041028554": -double: 1 -idouble: 1 Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 @@ -440,95 +343,110 @@ float: 1 ifloat: 1 # j0 -Test "j0 (10.0) == -0.24593576445134833520": +Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "j0 (0.75) == 0.864242275166648623555731103820923211": +float: 1 +ifloat: 1 +Test "j0 (10.0) == -0.245935764451348335197760862485328754": double: 2 float: 1 idouble: 2 ifloat: 1 -Test "j0 (2.0) == 0.22389077914123566805": +Test "j0 (2.0) == 0.223890779141235668051827454649948626": float: 2 ifloat: 2 -Test "j0 (8.0) == 0.17165080713755390609": -float: 1 -ifloat: 1 Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1": double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1": -double: 1 -float: 1 +float: 1 idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - +ifloat: 1 +Test "j0 (8.0) == 0.171650807137553906090869407851972001": +float: 1 +ifloat: 1 # j1 -Test "j1 (10.0) == 0.043472746168861436670": +Test "j1 (10.0) == 0.0434727461688614366697487680258592883": float: 2 ifloat: 2 -Test "j1 (2.0) == 0.57672480775687338720": +Test "j1 (2.0) == 0.576724807756873387202448242269137087": double: 1 idouble: 1 -Test "j1 (8.0) == 0.23463634685391462438": +Test "j1 (8.0) == 0.234636346853914624381276651590454612": double: 1 idouble: 1 # jn -Test "jn (0, 10.0) == -0.24593576445134833520": +Test "jn (0, -4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (0, 0.75) == 0.864242275166648623555731103820923211": +float: 1 +ifloat: 1 +Test "jn (0, 10.0) == -0.245935764451348335197760862485328754": double: 2 float: 1 idouble: 2 ifloat: 1 -Test "jn (0, 2.0) == 0.22389077914123566805": +Test "jn (0, 2.0) == 0.223890779141235668051827454649948626": float: 2 ifloat: 2 -Test "jn (0, 8.0) == 0.17165080713755390609": +Test "jn (0, 4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (0, 8.0) == 0.171650807137553906090869407851972001": float: 1 ifloat: 1 -Test "jn (1, 10.0) == 0.043472746168861436670": +Test "jn (1, 10.0) == 0.0434727461688614366697487680258592883": float: 2 ifloat: 2 -Test "jn (1, 2.0) == 0.57672480775687338720": +Test "jn (1, 2.0) == 0.576724807756873387202448242269137087": double: 1 idouble: 1 -Test "jn (1, 8.0) == 0.23463634685391462438": +Test "jn (1, 8.0) == 0.234636346853914624381276651590454612": double: 1 idouble: 1 -Test "jn (10, 0.1) == 0.26905328954342155795e-19": -double: 6 -float: 4 -idouble: 6 -ifloat: 4 -Test "jn (10, 0.7) == 0.75175911502153953928e-11": -double: 3 +Test "jn (10, 0.125) == 0.250543369809369890173993791865771547e-18": +double: 1 float: 1 -idouble: 3 +idouble: 1 +ifloat: 1 +Test "jn (10, 0.75) == 0.149621713117596814698712483621682835e-10": +double: 1 +float: 1 +idouble: 1 ifloat: 1 -Test "jn (10, 10.0) == 0.20748610663335885770": +Test "jn (10, 10.0) == 0.207486106633358857697278723518753428": double: 4 float: 3 idouble: 4 ifloat: 3 -Test "jn (10, 2.0) == 0.25153862827167367096e-6": +Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6": float: 4 ifloat: 4 -Test "jn (3, 0.1) == 0.000020820315754756261429": +Test "jn (3, 0.125) == 0.406503832554912875023029337653442868e-4": double: 1 +float: 1 idouble: 1 -Test "jn (3, 0.7) == 0.0069296548267508408077": +ifloat: 1 +Test "jn (3, 0.75) == 0.848438342327410884392755236884386804e-2": +double: 1 float: 1 +idouble: 1 ifloat: 1 -Test "jn (3, 10.0) == 0.058379379305186812343": +Test "jn (3, 10.0) == 0.0583793793051868123429354784103409563": double: 3 float: 1 idouble: 3 ifloat: 1 -Test "jn (3, 2.0) == 0.12894324947440205110": +Test "jn (3, 2.0) == 0.128943249474402051098793332969239835": double: 1 float: 2 idouble: 1 @@ -546,87 +464,45 @@ float: 2 idouble: 1 ifloat: 2 -# log -Test "log (0.7) == -0.35667494393873237891263871124118447": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - # log10 -Test "log10 (0.7) == -0.15490195998574316929": +Test "log10 (0.75) == -0.124938736608299953132449886193870744": double: 1 -float: 1 +float: 2 idouble: 1 -ifloat: 1 +ifloat: 2 Test "log10 (e) == log10(e)": float: 1 ifloat: 1 # log1p -Test "log1p (-0.3) == -0.35667494393873237891263871124118447": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - -# log2 -Test "log2 (0.7) == -0.51457317282975824043": -double: 1 +Test "log1p (-0.25) == -0.287682072451780927439219005993827432": float: 1 -idouble: 1 ifloat: 1 # sincos -Test "sincos (0.7, &sin_res, &cos_res) puts 0.76484218728448842625585999019186495 in cos_res": +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": -double: 1 -float: 0.5 -idouble: 1 -ifloat: 0.5 Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res": double: 1 float: 1 idouble: 1 ifloat: 1 Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res": -double: 0.2758 -float: 0.3667 -idouble: 0.2758 -ifloat: 0.3667 -Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res": -float: 1 -ifloat: 1 - -# sinh -Test "sinh (0.7) == 0.75858370183953350346": double: 1 float: 1 idouble: 1 ifloat: 1 +Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res": +float: 1 +ifloat: 1 # tan Test "tan (pi/4) == 1": -double: 0.5 -idouble: 0.5 - -# tanh -Test "tanh (0.7) == 0.60436777711716349631": double: 1 -float: 1 idouble: 1 -ifloat: 1 -Test "tanh (-0.7) == -0.60436777711716349631": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 # tgamma Test "tgamma (-0.5) == -2 sqrt (pi)": @@ -644,174 +520,130 @@ idouble: 1 ifloat: 1 # y0 -Test "y0 (0.7) == -0.19066492933739506743": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -Test "y0 (1.0) == 0.088256964215676957983": +Test "y0 (1.0) == 0.0882569642156769579829267660235151628": double: 2 float: 1 idouble: 2 ifloat: 1 -Test "y0 (1.5) == 0.38244892379775884396": +Test "y0 (1.5) == 0.382448923797758843955068554978089862": double: 2 float: 1 idouble: 2 ifloat: 1 -Test "y0 (10.0) == 0.055671167283599391424": +Test "y0 (10.0) == 0.0556711672835993914244598774101900481": float: 1 ifloat: 1 -Test "y0 (8.0) == 0.22352148938756622053": +Test "y0 (8.0) == 0.223521489387566220527323400498620359": double: 1 float: 1 idouble: 1 ifloat: 1 # y1 -Test "y1 (0.1) == -6.4589510947020269877": +Test "y1 (0.125) == -5.19993611253477499595928744876579921": double: 1 idouble: 1 -Test "y1 (0.7) == -1.1032498719076333697": -double: 1 +Test "y1 (1.5) == -0.412308626973911295952829820633445323": float: 1 -idouble: 1 ifloat: 1 -Test "y1 (1.5) == -0.41230862697391129595": -float: 1 -ifloat: 1 -Test "y1 (10.0) == 0.24901542420695388392": +Test "y1 (10.0) == 0.249015424206953883923283474663222803": double: 3 float: 1 idouble: 3 ifloat: 1 -Test "y1 (2.0) == -0.10703243154093754689": +Test "y1 (2.0) == -0.107032431540937546888370772277476637": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "y1 (8.0) == -0.15806046173124749426": +Test "y1 (8.0) == -0.158060461731247494255555266187483550": double: 1 float: 2 idouble: 1 ifloat: 2 # yn -Test "yn (0, 0.7) == -0.19066492933739506743": +Test "yn (0, 1.0) == 0.0882569642156769579829267660235151628": double: 2 float: 1 idouble: 2 ifloat: 1 -Test "yn (0, 1.0) == 0.088256964215676957983": +Test "yn (0, 1.5) == 0.382448923797758843955068554978089862": double: 2 float: 1 idouble: 2 ifloat: 1 -Test "yn (0, 1.5) == 0.38244892379775884396": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -Test "yn (0, 10.0) == 0.055671167283599391424": +Test "yn (0, 10.0) == 0.0556711672835993914244598774101900481": float: 1 ifloat: 1 -Test "yn (0, 8.0) == 0.22352148938756622053": +Test "yn (0, 8.0) == 0.223521489387566220527323400498620359": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "yn (1, 0.1) == -6.4589510947020269877": +Test "yn (1, 0.125) == -5.19993611253477499595928744876579921": double: 1 idouble: 1 -Test "yn (1, 0.7) == -1.1032498719076333697": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "yn (1, 1.5) == -0.41230862697391129595": +Test "yn (1, 1.5) == -0.412308626973911295952829820633445323": float: 1 ifloat: 1 -Test "yn (1, 10.0) == 0.24901542420695388392": +Test "yn (1, 10.0) == 0.249015424206953883923283474663222803": double: 3 float: 1 idouble: 3 ifloat: 1 -Test "yn (1, 2.0) == -0.10703243154093754689": +Test "yn (1, 2.0) == -0.107032431540937546888370772277476637": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "yn (1, 8.0) == -0.15806046173124749426": +Test "yn (1, 8.0) == -0.158060461731247494255555266187483550": double: 1 float: 2 idouble: 1 ifloat: 2 -Test "yn (10, 0.1) == -0.11831335132045197885e19": -double: 2 -float: 2 -idouble: 2 -ifloat: 2 -Test "yn (10, 0.7) == -0.42447194260703866924e10": -double: 3 -idouble: 3 -Test "yn (10, 1.0) == -0.12161801427868918929e9": +Test "yn (10, 0.125) == -127057845771019398.252538486899753195": double: 1 idouble: 1 -Test "yn (10, 10.0) == -0.35981415218340272205": +Test "yn (10, 0.75) == -2133501638.90573424452445412893839236": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "yn (10, 2.0) == -129184.54220803928264": -double: 2 -idouble: 2 -Test "yn (3, 0.1) == -5099.3323786129048894": +Test "yn (10, 1.0) == -121618014.278689189288130426667971145": double: 1 -float: 1 idouble: 1 -ifloat: 1 -Test "yn (3, 0.7) == -15.819479052819633505": -double: 3 -float: 1 -idouble: 3 -ifloat: 1 -Test "yn (3, 10.0) == -0.25136265718383732978": +Test "yn (10, 10.0) == -0.359814152183402722051986577343560609": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "yn (3, 2.0) == -1.1277837768404277861": -double: 1 -idouble: 1 - -# Maximal error of functions: -Function: "asin": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 - -Function: "atan2": -float: 4 -ifloat: 4 - -Function: "atanh": +Test "yn (10, 2.0) == -129184.542208039282635913145923304214": +double: 2 +idouble: 2 +Test "yn (3, 0.125) == -2612.69757350066712600220955744091741": double: 1 idouble: 1 - -Function: "cabs": +Test "yn (3, 0.75) == -12.9877176234475433186319774484809207": double: 1 float: 1 idouble: 1 ifloat: 1 - -Function: Real part of "cacos": +Test "yn (3, 10.0) == -0.251362657183837329779204747654240998": double: 1 float: 1 idouble: 1 ifloat: 1 +Test "yn (3, 2.0) == -1.12778377684042778608158395773179238": +double: 1 +idouble: 1 + +# Maximal error of functions: +Function: "atan2": +float: 3 +ifloat: 3 -Function: Imaginary part of "cacos": +Function: "atanh": float: 1 ifloat: 1 @@ -828,13 +660,9 @@ idouble: 1 ifloat: 3 Function: Real part of "casin": -double: 3 -float: 2 -idouble: 3 -ifloat: 2 - -Function: Imaginary part of "casin": +double: 1 float: 1 +idouble: 1 ifloat: 1 Function: Real part of "casinh": @@ -861,14 +689,10 @@ ifloat: 1 Function: Real part of "catanh": double: 4 -float: 1 idouble: 4 -ifloat: 1 Function: Imaginary part of "catanh": -double: 1 float: 6 -idouble: 1 ifloat: 6 Function: "cbrt": @@ -877,12 +701,12 @@ idouble: 1 Function: Real part of "ccos": double: 1 +float: 1 idouble: 1 +ifloat: 1 Function: Imaginary part of "ccos": -double: 1 float: 1 -idouble: 1 ifloat: 1 Function: Real part of "ccosh": @@ -892,31 +716,27 @@ idouble: 1 ifloat: 1 Function: Imaginary part of "ccosh": -double: 1 float: 1 -idouble: 1 ifloat: 1 Function: Real part of "cexp": -double: 1 float: 1 -idouble: 1 ifloat: 1 Function: Imaginary part of "cexp": float: 1 ifloat: 1 +Function: Real part of "clog": +float: 1 +ifloat: 1 + Function: Imaginary part of "clog": -double: 1 float: 3 -idouble: 1 ifloat: 3 Function: Real part of "clog10": -double: 1 float: 1 -idouble: 1 ifloat: 1 Function: Imaginary part of "clog10": @@ -932,21 +752,17 @@ idouble: 2 ifloat: 1 Function: Real part of "cpow": -double: 1 +double: 2 float: 4 -idouble: 1 +idouble: 2 ifloat: 4 Function: Imaginary part of "cpow": -double: 1.1031 +double: 2 float: 2 -idouble: 1.1031 +idouble: 2 ifloat: 2 -Function: Imaginary part of "csin": -float: 1 -ifloat: 1 - Function: Real part of "csinh": float: 1 ifloat: 1 @@ -958,44 +774,34 @@ idouble: 1 ifloat: 1 Function: Real part of "csqrt": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - -Function: Imaginary part of "csqrt": float: 1 ifloat: 1 Function: Real part of "ctan": double: 1 -float: 1 idouble: 1 -ifloat: 1 Function: Imaginary part of "ctan": double: 1 -float: 1 idouble: 1 -ifloat: 1 Function: Real part of "ctanh": -double: 2 +double: 1 float: 2 -idouble: 2 +idouble: 1 ifloat: 2 Function: Imaginary part of "ctanh": -double: 2 float: 1 -idouble: 2 ifloat: 1 +Function: "erf": +double: 1 +idouble: 1 + Function: "erfc": -double: 24 -float: 12 -idouble: 24 -ifloat: 12 +double: 1 +idouble: 1 Function: "exp10": double: 6 @@ -1004,19 +810,13 @@ idouble: 6 ifloat: 2 Function: "expm1": +double: 1 float: 1 -ifloat: 1 - -Function: "fmod": -double: 2 -float: 1 -idouble: 2 +idouble: 1 ifloat: 1 Function: "hypot": -double: 1 float: 1 -idouble: 1 ifloat: 1 Function: "j0": @@ -1032,9 +832,9 @@ idouble: 1 ifloat: 2 Function: "jn": -double: 6 +double: 4 float: 4 -idouble: 6 +idouble: 4 ifloat: 4 Function: "lgamma": @@ -1043,28 +843,14 @@ float: 2 idouble: 1 ifloat: 2 -Function: "log": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - Function: "log10": double: 1 -float: 1 +float: 2 idouble: 1 -ifloat: 1 +ifloat: 2 Function: "log1p": -double: 1 float: 1 -idouble: 1 -ifloat: 1 - -Function: "log2": -double: 1 -float: 1 -idouble: 1 ifloat: 1 Function: "sincos": @@ -1073,21 +859,9 @@ float: 1 idouble: 1 ifloat: 1 -Function: "sinh": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - Function: "tan": -double: 0.5 -idouble: 0.5 - -Function: "tanh": double: 1 -float: 1 idouble: 1 -ifloat: 1 Function: "tgamma": double: 1 From 75380e2be2f3dbbc8ba547d77ce22ad70994c202 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 14 Oct 2002 17:26:14 +0000 Subject: [PATCH 2923/4487] (profil_counter): Add hack to prevent the compiler from clobbering the signal context. --- sysdeps/unix/sysv/linux/arm/profil-counter.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/arm/profil-counter.h b/sysdeps/unix/sysv/linux/arm/profil-counter.h index 5d8be9dba6..7639883f10 100644 --- a/sysdeps/unix/sysv/linux/arm/profil-counter.h +++ b/sysdeps/unix/sysv/linux/arm/profil-counter.h @@ -1,5 +1,5 @@ /* Low-level statistical profiling support function. Linux/ARM version. - Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 2002 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 @@ -29,4 +29,9 @@ profil_counter (int signo, int _a2, int _a3, int _a4, union k_sigcontext sc) else pc = (void *) sc.v21.arm_pc; profil_count (pc); + + /* This is a hack to prevent the compiler from implementing the + above function call as a sibcall. The sibcall would overwrite + the signal context. */ + asm volatile (""); } From cd4fba2b2bc20a631839ae39681610201ea2468d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 16 Oct 2002 00:36:59 +0000 Subject: [PATCH 2924/4487] (__fpathconf): Add support for reiserfs and xfs. --- sysdeps/unix/sysv/linux/alpha/fpathconf.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/fpathconf.c b/sysdeps/unix/sysv/linux/alpha/fpathconf.c index a7425d7f09..1820e5b229 100644 --- a/sysdeps/unix/sysv/linux/alpha/fpathconf.c +++ b/sysdeps/unix/sysv/linux/alpha/fpathconf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1995, 1996, 1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1991,1995,1996,1998,2000,2002 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 @@ -93,6 +93,12 @@ __fpathconf (fd, name) case UFS_CIGAM: return UFS_LINK_MAX; + case REISERFS_SUPER_MAGIC: + return REISERFS_LINK_MAX; + + case XFS_SUPER_MAGIC: + return XFS_LINK_MAX; + default: return LINUX_LINK_MAX; } From ac33e75b3e8833e7cb30dacd1813e71ce4a57825 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 16 Oct 2002 01:02:24 +0000 Subject: [PATCH 2925/4487] 2002-10-15 Roland McGrath * sysdeps/unix/sysv/linux/bits/resource.h: Replaced with the contents of the sysdeps/unix/sysv/linux/i386/bits/resource.h file. All the following files were identical or equivalent to it. * sysdeps/unix/sysv/linux/i386/bits/resource.h: File removed. * sysdeps/unix/sysv/linux/arm/bits/resource.h: File removed. * sysdeps/unix/sysv/linux/cris/bits/resource.h: File removed. * sysdeps/unix/sysv/linux/hppa/bits/resource.h: File removed. * sysdeps/unix/sysv/linux/ia64/bits/resource.h: File removed. * sysdeps/unix/sysv/linux/m68k/bits/resource.h: File removed. * sysdeps/unix/sysv/linux/powerpc/bits/resource.h: File removed. * sysdeps/unix/sysv/linux/s390/bits/resource.h: File removed. * sysdeps/unix/sysv/linux/sh/bits/resource.h: File removed. * sysdeps/unix/sysv/linux/x86_64/bits/resource.h: File removed. --- sysdeps/unix/sysv/linux/arm/bits/resource.h | 209 ------------------- sysdeps/unix/sysv/linux/cris/bits/resource.h | 209 ------------------- sysdeps/unix/sysv/linux/hppa/bits/resource.h | 209 ------------------- sysdeps/unix/sysv/linux/m68k/bits/resource.h | 209 ------------------- 4 files changed, 836 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/arm/bits/resource.h delete mode 100644 sysdeps/unix/sysv/linux/cris/bits/resource.h delete mode 100644 sysdeps/unix/sysv/linux/hppa/bits/resource.h delete mode 100644 sysdeps/unix/sysv/linux/m68k/bits/resource.h diff --git a/sysdeps/unix/sysv/linux/arm/bits/resource.h b/sysdeps/unix/sysv/linux/arm/bits/resource.h deleted file mode 100644 index 3da13beb23..0000000000 --- a/sysdeps/unix/sysv/linux/arm/bits/resource.h +++ /dev/null @@ -1,209 +0,0 @@ -/* Bit values & structures for resource limits. Linux/Arm version. - Copyright (C) 1994,1996,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 - 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 _SYS_RESOURCE_H -# error "Never use directly; include instead." -#endif - -#include - -/* Transmute defines to enumerations. The macro re-definitions are - necessary because some programs want to test for operating system - features with #ifdef RUSAGE_SELF. In ISO C the reflexive - definition is a no-op. */ - -/* Kinds of resource limit. */ -enum __rlimit_resource -{ - /* Per-process CPU limit, in seconds. */ - RLIMIT_CPU = 0, -#define RLIMIT_CPU RLIMIT_CPU - - /* Largest file that can be created, in bytes. */ - RLIMIT_FSIZE = 1, -#define RLIMIT_FSIZE RLIMIT_FSIZE - - /* Maximum size of data segment, in bytes. */ - RLIMIT_DATA = 2, -#define RLIMIT_DATA RLIMIT_DATA - - /* Maximum size of stack segment, in bytes. */ - RLIMIT_STACK = 3, -#define RLIMIT_STACK RLIMIT_STACK - - /* Largest core file that can be created, in bytes. */ - RLIMIT_CORE = 4, -#define RLIMIT_CORE RLIMIT_CORE - - /* Largest resident set size, in bytes. - This affects swapping; processes that are exceeding their - resident set size will be more likely to have physical memory - taken from them. */ - RLIMIT_RSS = 5, -#define RLIMIT_RSS RLIMIT_RSS - - /* Number of open files. */ - RLIMIT_NOFILE = 7, - RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */ -#define RLIMIT_NOFILE RLIMIT_NOFILE -#define RLIMIT_OFILE RLIMIT_OFILE - - /* Address space limit. */ - RLIMIT_AS = 9, -#define RLIMIT_AS RLIMIT_AS - - /* Number of processes. */ - RLIMIT_NPROC = 6, -#define RLIMIT_NPROC RLIMIT_NPROC - - /* Locked-in-memory address space. */ - RLIMIT_MEMLOCK = 8, -#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK - - /* Maximum number of file locks. */ - RLIMIT_LOCKS = 10, -#define RLIMIT_LOCKS RLIMIT_LOCKS - - RLIMIT_NLIMITS = 11, - RLIM_NLIMITS = RLIMIT_NLIMITS -#define RLIMIT_NLIMITS RLIMIT_NLIMITS -#define RLIM_NLIMITS RLIM_NLIMITS -}; - -/* Value to indicate that there is no limit. */ -#ifndef __USE_FILE_OFFSET64 -# define RLIM_INFINITY ((unsigned long int)(~0UL)) -#else -# define RLIM_INFINITY 0xffffffffffffffffuLL -#endif - -#ifdef __USE_LARGEFILE64 -# define RLIM64_INFINITY 0xffffffffffffffffuLL -#endif - -/* We can represent all limits. */ -#define RLIM_SAVED_MAX RLIM_INFINITY -#define RLIM_SAVED_CUR RLIM_INFINITY - - -/* Type for resource quantity measurement. */ -#ifndef __USE_FILE_OFFSET64 -typedef __rlim_t rlim_t; -#else -typedef __rlim64_t rlim_t; -#endif -#ifdef __USE_LARGEFILE64 -typedef __rlim64_t rlim64_t; -#endif - -struct rlimit - { - /* The current (soft) limit. */ - rlim_t rlim_cur; - /* The hard limit. */ - rlim_t rlim_max; - }; - -#ifdef __USE_LARGEFILE64 -struct rlimit64 - { - /* The current (soft) limit. */ - rlim64_t rlim_cur; - /* The hard limit. */ - rlim64_t rlim_max; - }; -#endif - -/* Whose usage statistics do you want? */ -enum __rusage_who -{ - /* The calling process. */ - RUSAGE_SELF = 0, -#define RUSAGE_SELF RUSAGE_SELF - - /* All of its terminated child processes. */ - RUSAGE_CHILDREN = -1, -#define RUSAGE_CHILDREN RUSAGE_CHILDREN - - /* Both. */ - RUSAGE_BOTH = -2 -#define RUSAGE_BOTH RUSAGE_BOTH -}; - -#define __need_timeval -#include /* For `struct timeval'. */ - -/* Structure which says how much of each resource has been used. */ -struct rusage - { - /* Total amount of user time used. */ - struct timeval ru_utime; - /* Total amount of system time used. */ - struct timeval ru_stime; - /* Maximum resident set size (in kilobytes). */ - long int ru_maxrss; - /* Amount of sharing of text segment memory - with other processes (kilobyte-seconds). */ - long int ru_ixrss; - /* Amount of data segment memory used (kilobyte-seconds). */ - long int ru_idrss; - /* Amount of stack memory used (kilobyte-seconds). */ - long int ru_isrss; - /* Number of soft page faults (i.e. those serviced by reclaiming - a page from the list of pages awaiting reallocation. */ - long int ru_minflt; - /* Number of hard page faults (i.e. those that required I/O). */ - long int ru_majflt; - /* Number of times a process was swapped out of physical memory. */ - long int ru_nswap; - /* Number of input operations via the file system. Note: This - and `ru_oublock' do not include operations with the cache. */ - long int ru_inblock; - /* Number of output operations via the file system. */ - long int ru_oublock; - /* Number of IPC messages sent. */ - long int ru_msgsnd; - /* Number of IPC messages received. */ - long int ru_msgrcv; - /* Number of signals delivered. */ - long int ru_nsignals; - /* Number of voluntary context switches, i.e. because the process - gave up the process before it had to (usually to wait for some - resource to be available). */ - long int ru_nvcsw; - /* Number of involuntary context switches, i.e. a higher priority process - became runnable or the current process used up its time slice. */ - long int ru_nivcsw; - }; - -/* Priority limits. */ -#define PRIO_MIN -20 /* Minimum priority a process can have. */ -#define PRIO_MAX 20 /* Maximum priority a process can have. */ - -/* The type of the WHICH argument to `getpriority' and `setpriority', - indicating what flavor of entity the WHO argument specifies. */ -enum __priority_which -{ - PRIO_PROCESS = 0, /* WHO is a process ID. */ -#define PRIO_PROCESS PRIO_PROCESS - PRIO_PGRP = 1, /* WHO is a process group ID. */ -#define PRIO_PGRP PRIO_PGRP - PRIO_USER = 2 /* WHO is a user ID. */ -#define PRIO_USER PRIO_USER -}; diff --git a/sysdeps/unix/sysv/linux/cris/bits/resource.h b/sysdeps/unix/sysv/linux/cris/bits/resource.h deleted file mode 100644 index 09c1b7e43b..0000000000 --- a/sysdeps/unix/sysv/linux/cris/bits/resource.h +++ /dev/null @@ -1,209 +0,0 @@ -/* Bit values & structures for resource limits. Linux/CRIS version. - Copyright (C) 1994,1996,1997,1998,1999,2000, 2001 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 _SYS_RESOURCE_H -# error "Never use directly; include instead." -#endif - -#include - -/* Transmute defines to enumerations. The macro re-definitions are - necessary because some programs want to test for operating system - features with #ifdef RUSAGE_SELF. In ISO C the reflexive - definition is a no-op. */ - -/* Kinds of resource limit. */ -enum __rlimit_resource -{ - /* Per-process CPU limit, in seconds. */ - RLIMIT_CPU = 0, -#define RLIMIT_CPU RLIMIT_CPU - - /* Largest file that can be created, in bytes. */ - RLIMIT_FSIZE = 1, -#define RLIMIT_FSIZE RLIMIT_FSIZE - - /* Maximum size of data segment, in bytes. */ - RLIMIT_DATA = 2, -#define RLIMIT_DATA RLIMIT_DATA - - /* Maximum size of stack segment, in bytes. */ - RLIMIT_STACK = 3, -#define RLIMIT_STACK RLIMIT_STACK - - /* Largest core file that can be created, in bytes. */ - RLIMIT_CORE = 4, -#define RLIMIT_CORE RLIMIT_CORE - - /* Largest resident set size, in bytes. - This affects swapping; processes that are exceeding their - resident set size will be more likely to have physical memory - taken from them. */ - RLIMIT_RSS = 5, -#define RLIMIT_RSS RLIMIT_RSS - - /* Number of open files. */ - RLIMIT_NOFILE = 7, - RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */ -#define RLIMIT_NOFILE RLIMIT_NOFILE -#define RLIMIT_OFILE RLIMIT_OFILE - - /* Address space limit. */ - RLIMIT_AS = 9, -#define RLIMIT_AS RLIMIT_AS - - /* Number of processes. */ - RLIMIT_NPROC = 6, -#define RLIMIT_NPROC RLIMIT_NPROC - - /* Locked-in-memory address space. */ - RLIMIT_MEMLOCK = 8, -#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK - - /* Maximum number of file locks. */ - RLIMIT_LOCKS = 10, -#define RLIMIT_LOCKS RLIMIT_LOCKS - - RLIMIT_NLIMITS = 11, - RLIM_NLIMITS = RLIMIT_NLIMITS -#define RLIMIT_NLIMITS RLIMIT_NLIMITS -#define RLIM_NLIMITS RLIM_NLIMITS -}; - -/* Value to indicate that there is no limit. */ -#ifndef __USE_FILE_OFFSET64 -# define RLIM_INFINITY ((unsigned long int)(~0UL)) -#else -# define RLIM_INFINITY 0xffffffffffffffffuLL -#endif - -#ifdef __USE_LARGEFILE64 -# define RLIM64_INFINITY 0xffffffffffffffffuLL -#endif - -/* We can represent all limits. */ -#define RLIM_SAVED_MAX RLIM_INFINITY -#define RLIM_SAVED_CUR RLIM_INFINITY - - -/* Type for resource quantity measurement. */ -#ifndef __USE_FILE_OFFSET64 -typedef __rlim_t rlim_t; -#else -typedef __rlim64_t rlim_t; -#endif -#ifdef __USE_LARGEFILE64 -typedef __rlim64_t rlim64_t; -#endif - -struct rlimit - { - /* The current (soft) limit. */ - rlim_t rlim_cur; - /* The hard limit. */ - rlim_t rlim_max; - }; - -#ifdef __USE_LARGEFILE64 -struct rlimit64 - { - /* The current (soft) limit. */ - rlim64_t rlim_cur; - /* The hard limit. */ - rlim64_t rlim_max; - }; -#endif - -/* Whose usage statistics do you want? */ -enum __rusage_who -{ - /* The calling process. */ - RUSAGE_SELF = 0, -#define RUSAGE_SELF RUSAGE_SELF - - /* All of its terminated child processes. */ - RUSAGE_CHILDREN = -1, -#define RUSAGE_CHILDREN RUSAGE_CHILDREN - - /* Both. */ - RUSAGE_BOTH = -2 -#define RUSAGE_BOTH RUSAGE_BOTH -}; - -#define __need_timeval -#include /* For `struct timeval'. */ - -/* Structure which says how much of each resource has been used. */ -struct rusage - { - /* Total amount of user time used. */ - struct timeval ru_utime; - /* Total amount of system time used. */ - struct timeval ru_stime; - /* Maximum resident set size (in kilobytes). */ - long int ru_maxrss; - /* Amount of sharing of text segment memory - with other processes (kilobyte-seconds). */ - long int ru_ixrss; - /* Amount of data segment memory used (kilobyte-seconds). */ - long int ru_idrss; - /* Amount of stack memory used (kilobyte-seconds). */ - long int ru_isrss; - /* Number of soft page faults (i.e. those serviced by reclaiming - a page from the list of pages awaiting reallocation. */ - long int ru_minflt; - /* Number of hard page faults (i.e. those that required I/O). */ - long int ru_majflt; - /* Number of times a process was swapped out of physical memory. */ - long int ru_nswap; - /* Number of input operations via the file system. Note: This - and `ru_oublock' do not include operations with the cache. */ - long int ru_inblock; - /* Number of output operations via the file system. */ - long int ru_oublock; - /* Number of IPC messages sent. */ - long int ru_msgsnd; - /* Number of IPC messages received. */ - long int ru_msgrcv; - /* Number of signals delivered. */ - long int ru_nsignals; - /* Number of voluntary context switches, i.e. because the process - gave up the process before it had to (usually to wait for some - resource to be available). */ - long int ru_nvcsw; - /* Number of involuntary context switches, i.e. a higher priority process - became runnable or the current process used up its time slice. */ - long int ru_nivcsw; - }; - -/* Priority limits. */ -#define PRIO_MIN -20 /* Minimum priority a process can have. */ -#define PRIO_MAX 20 /* Maximum priority a process can have. */ - -/* The type of the WHICH argument to `getpriority' and `setpriority', - indicating what flavor of entity the WHO argument specifies. */ -enum __priority_which -{ - PRIO_PROCESS = 0, /* WHO is a process ID. */ -#define PRIO_PROCESS PRIO_PROCESS - PRIO_PGRP = 1, /* WHO is a process group ID. */ -#define PRIO_PGRP PRIO_PGRP - PRIO_USER = 2 /* WHO is a user ID. */ -#define PRIO_USER PRIO_USER -}; diff --git a/sysdeps/unix/sysv/linux/hppa/bits/resource.h b/sysdeps/unix/sysv/linux/hppa/bits/resource.h deleted file mode 100644 index 2e4958bb12..0000000000 --- a/sysdeps/unix/sysv/linux/hppa/bits/resource.h +++ /dev/null @@ -1,209 +0,0 @@ -/* Bit values & structures for resource limits. Linux/HPPA version. - Copyright (C) 1994-99, 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 - 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 _SYS_RESOURCE_H -# error "Never use directly; include instead." -#endif - -#include - -/* Transmute defines to enumerations. The macro re-definitions are - necessary because some programs want to test for operating system - features with #ifdef RUSAGE_SELF. In ISO C the reflexive - definition is a no-op. */ - -/* Kinds of resource limit. */ -enum __rlimit_resource -{ - /* Per-process CPU limit, in seconds. */ - RLIMIT_CPU = 0, -#define RLIMIT_CPU RLIMIT_CPU - - /* Largest file that can be created, in bytes. */ - RLIMIT_FSIZE = 1, -#define RLIMIT_FSIZE RLIMIT_FSIZE - - /* Maximum size of data segment, in bytes. */ - RLIMIT_DATA = 2, -#define RLIMIT_DATA RLIMIT_DATA - - /* Maximum size of stack segment, in bytes. */ - RLIMIT_STACK = 3, -#define RLIMIT_STACK RLIMIT_STACK - - /* Largest core file that can be created, in bytes. */ - RLIMIT_CORE = 4, -#define RLIMIT_CORE RLIMIT_CORE - - /* Largest resident set size, in bytes. - This affects swapping; processes that are exceeding their - resident set size will be more likely to have physical memory - taken from them. */ - RLIMIT_RSS = 5, -#define RLIMIT_RSS RLIMIT_RSS - - /* Number of open files. */ - RLIMIT_NOFILE = 7, - RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */ -#define RLIMIT_NOFILE RLIMIT_NOFILE -#define RLIMIT_OFILE RLIMIT_OFILE - - /* Address space limit. */ - RLIMIT_AS = 9, -#define RLIMIT_AS RLIMIT_AS - - /* Number of processes. */ - RLIMIT_NPROC = 6, -#define RLIMIT_NPROC RLIMIT_NPROC - - /* Locked-in-memory address space. */ - RLIMIT_MEMLOCK = 8, -#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK - - /* Maximum number of file locks. */ - RLIMIT_LOCKS = 10, -#define RLIMIT_LOCKS RLIMIT_LOCKS - - RLIMIT_NLIMITS = 11, - RLIM_NLIMITS = RLIMIT_NLIMITS -#define RLIMIT_NLIMITS RLIMIT_NLIMITS -#define RLIM_NLIMITS RLIM_NLIMITS -}; - -/* Value to indicate that there is no limit. */ -#ifndef __USE_FILE_OFFSET64 -# define RLIM_INFINITY ((unsigned long int)(~0UL)) -#else -# define RLIM_INFINITY 0xffffffffffffffffuLL -#endif - -#ifdef __USE_LARGEFILE64 -# define RLIM64_INFINITY 0xffffffffffffffffuLL -#endif - -/* We can represent all limits. */ -#define RLIM_SAVED_MAX RLIM_INFINITY -#define RLIM_SAVED_CUR RLIM_INFINITY - - -/* Type for resource quantity measurement. */ -#ifndef __USE_FILE_OFFSET64 -typedef __rlim_t rlim_t; -#else -typedef __rlim64_t rlim_t; -#endif -#ifdef __USE_LARGEFILE64 -typedef __rlim64_t rlim64_t; -#endif - -struct rlimit - { - /* The current (soft) limit. */ - rlim_t rlim_cur; - /* The hard limit. */ - rlim_t rlim_max; - }; - -#ifdef __USE_LARGEFILE64 -struct rlimit64 - { - /* The current (soft) limit. */ - rlim64_t rlim_cur; - /* The hard limit. */ - rlim64_t rlim_max; - }; -#endif - -/* Whose usage statistics do you want? */ -enum __rusage_who -{ - /* The calling process. */ - RUSAGE_SELF = 0, -#define RUSAGE_SELF RUSAGE_SELF - - /* All of its terminated child processes. */ - RUSAGE_CHILDREN = -1, -#define RUSAGE_CHILDREN RUSAGE_CHILDREN - - /* Both. */ - RUSAGE_BOTH = -2 -#define RUSAGE_BOTH RUSAGE_BOTH -}; - -#define __need_timeval -#include /* For `struct timeval'. */ - -/* Structure which says how much of each resource has been used. */ -struct rusage - { - /* Total amount of user time used. */ - struct timeval ru_utime; - /* Total amount of system time used. */ - struct timeval ru_stime; - /* Maximum resident set size (in kilobytes). */ - long int ru_maxrss; - /* Amount of sharing of text segment memory - with other processes (kilobyte-seconds). */ - long int ru_ixrss; - /* Amount of data segment memory used (kilobyte-seconds). */ - long int ru_idrss; - /* Amount of stack memory used (kilobyte-seconds). */ - long int ru_isrss; - /* Number of soft page faults (i.e. those serviced by reclaiming - a page from the list of pages awaiting reallocation. */ - long int ru_minflt; - /* Number of hard page faults (i.e. those that required I/O). */ - long int ru_majflt; - /* Number of times a process was swapped out of physical memory. */ - long int ru_nswap; - /* Number of input operations via the file system. Note: This - and `ru_oublock' do not include operations with the cache. */ - long int ru_inblock; - /* Number of output operations via the file system. */ - long int ru_oublock; - /* Number of IPC messages sent. */ - long int ru_msgsnd; - /* Number of IPC messages received. */ - long int ru_msgrcv; - /* Number of signals delivered. */ - long int ru_nsignals; - /* Number of voluntary context switches, i.e. because the process - gave up the process before it had to (usually to wait for some - resource to be available). */ - long int ru_nvcsw; - /* Number of involuntary context switches, i.e. a higher priority process - became runnable or the current process used up its time slice. */ - long int ru_nivcsw; - }; - -/* Priority limits. */ -#define PRIO_MIN -20 /* Minimum priority a process can have. */ -#define PRIO_MAX 20 /* Maximum priority a process can have. */ - -/* The type of the WHICH argument to `getpriority' and `setpriority', - indicating what flavor of entity the WHO argument specifies. */ -enum __priority_which -{ - PRIO_PROCESS = 0, /* WHO is a process ID. */ -#define PRIO_PROCESS PRIO_PROCESS - PRIO_PGRP = 1, /* WHO is a process group ID. */ -#define PRIO_PGRP PRIO_PGRP - PRIO_USER = 2 /* WHO is a user ID. */ -#define PRIO_USER PRIO_USER -}; diff --git a/sysdeps/unix/sysv/linux/m68k/bits/resource.h b/sysdeps/unix/sysv/linux/m68k/bits/resource.h deleted file mode 100644 index e6fa04abcc..0000000000 --- a/sysdeps/unix/sysv/linux/m68k/bits/resource.h +++ /dev/null @@ -1,209 +0,0 @@ -/* Bit values & structures for resource limits. Linux/m68k version. - Copyright (C) 1994,1996,1997,1998,1999,2000,2001 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 _SYS_RESOURCE_H -# error "Never use directly; include instead." -#endif - -#include - -/* Transmute defines to enumerations. The macro re-definitions are - necessary because some programs want to test for operating system - features with #ifdef RUSAGE_SELF. In ISO C the reflexive - definition is a no-op. */ - -/* Kinds of resource limit. */ -enum __rlimit_resource -{ - /* Per-process CPU limit, in seconds. */ - RLIMIT_CPU = 0, -#define RLIMIT_CPU RLIMIT_CPU - - /* Largest file that can be created, in bytes. */ - RLIMIT_FSIZE = 1, -#define RLIMIT_FSIZE RLIMIT_FSIZE - - /* Maximum size of data segment, in bytes. */ - RLIMIT_DATA = 2, -#define RLIMIT_DATA RLIMIT_DATA - - /* Maximum size of stack segment, in bytes. */ - RLIMIT_STACK = 3, -#define RLIMIT_STACK RLIMIT_STACK - - /* Largest core file that can be created, in bytes. */ - RLIMIT_CORE = 4, -#define RLIMIT_CORE RLIMIT_CORE - - /* Largest resident set size, in bytes. - This affects swapping; processes that are exceeding their - resident set size will be more likely to have physical memory - taken from them. */ - RLIMIT_RSS = 5, -#define RLIMIT_RSS RLIMIT_RSS - - /* Number of open files. */ - RLIMIT_NOFILE = 7, - RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */ -#define RLIMIT_NOFILE RLIMIT_NOFILE -#define RLIMIT_OFILE RLIMIT_OFILE - - /* Address space limit. */ - RLIMIT_AS = 9, -#define RLIMIT_AS RLIMIT_AS - - /* Number of processes. */ - RLIMIT_NPROC = 6, -#define RLIMIT_NPROC RLIMIT_NPROC - - /* Locked-in-memory address space. */ - RLIMIT_MEMLOCK = 8, -#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK - - /* Maximum number of file locks. */ - RLIMIT_LOCKS = 10, -#define RLIMIT_LOCKS RLIMIT_LOCKS - - RLIMIT_NLIMITS = 11, - RLIM_NLIMITS = RLIMIT_NLIMITS -#define RLIMIT_NLIMITS RLIMIT_NLIMITS -#define RLIM_NLIMITS RLIM_NLIMITS -}; - -/* Value to indicate that there is no limit. */ -#ifndef __USE_FILE_OFFSET64 -# define RLIM_INFINITY ((unsigned long int)(~0UL)) -#else -# define RLIM_INFINITY 0xffffffffffffffffuLL -#endif - -#ifdef __USE_LARGEFILE64 -# define RLIM64_INFINITY 0xffffffffffffffffuLL -#endif - -/* We can represent all limits. */ -#define RLIM_SAVED_MAX RLIM_INFINITY -#define RLIM_SAVED_CUR RLIM_INFINITY - - -/* Type for resource quantity measurement. */ -#ifndef __USE_FILE_OFFSET64 -typedef __rlim_t rlim_t; -#else -typedef __rlim64_t rlim_t; -#endif -#ifdef __USE_LARGEFILE64 -typedef __rlim64_t rlim64_t; -#endif - -struct rlimit - { - /* The current (soft) limit. */ - rlim_t rlim_cur; - /* The hard limit. */ - rlim_t rlim_max; - }; - -#ifdef __USE_LARGEFILE64 -struct rlimit64 - { - /* The current (soft) limit. */ - rlim64_t rlim_cur; - /* The hard limit. */ - rlim64_t rlim_max; - }; -#endif - -/* Whose usage statistics do you want? */ -enum __rusage_who -{ - /* The calling process. */ - RUSAGE_SELF = 0, -#define RUSAGE_SELF RUSAGE_SELF - - /* All of its terminated child processes. */ - RUSAGE_CHILDREN = -1, -#define RUSAGE_CHILDREN RUSAGE_CHILDREN - - /* Both. */ - RUSAGE_BOTH = -2 -#define RUSAGE_BOTH RUSAGE_BOTH -}; - -#define __need_timeval -#include /* For `struct timeval'. */ - -/* Structure which says how much of each resource has been used. */ -struct rusage - { - /* Total amount of user time used. */ - struct timeval ru_utime; - /* Total amount of system time used. */ - struct timeval ru_stime; - /* Maximum resident set size (in kilobytes). */ - long int ru_maxrss; - /* Amount of sharing of text segment memory - with other processes (kilobyte-seconds). */ - long int ru_ixrss; - /* Amount of data segment memory used (kilobyte-seconds). */ - long int ru_idrss; - /* Amount of stack memory used (kilobyte-seconds). */ - long int ru_isrss; - /* Number of soft page faults (i.e. those serviced by reclaiming - a page from the list of pages awaiting reallocation. */ - long int ru_minflt; - /* Number of hard page faults (i.e. those that required I/O). */ - long int ru_majflt; - /* Number of times a process was swapped out of physical memory. */ - long int ru_nswap; - /* Number of input operations via the file system. Note: This - and `ru_oublock' do not include operations with the cache. */ - long int ru_inblock; - /* Number of output operations via the file system. */ - long int ru_oublock; - /* Number of IPC messages sent. */ - long int ru_msgsnd; - /* Number of IPC messages received. */ - long int ru_msgrcv; - /* Number of signals delivered. */ - long int ru_nsignals; - /* Number of voluntary context switches, i.e. because the process - gave up the process before it had to (usually to wait for some - resource to be available). */ - long int ru_nvcsw; - /* Number of involuntary context switches, i.e. a higher priority process - became runnable or the current process used up its time slice. */ - long int ru_nivcsw; - }; - -/* Priority limits. */ -#define PRIO_MIN -20 /* Minimum priority a process can have. */ -#define PRIO_MAX 20 /* Maximum priority a process can have. */ - -/* The type of the WHICH argument to `getpriority' and `setpriority', - indicating what flavor of entity the WHO argument specifies. */ -enum __priority_which -{ - PRIO_PROCESS = 0, /* WHO is a process ID. */ -#define PRIO_PROCESS PRIO_PROCESS - PRIO_PGRP = 1, /* WHO is a process group ID. */ -#define PRIO_PGRP PRIO_PGRP - PRIO_USER = 2 /* WHO is a user ID. */ -#define PRIO_USER PRIO_USER -}; From a52739414798c58bf90239a3b354ed0e948559f7 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 16 Oct 2002 01:02:28 +0000 Subject: [PATCH 2926/4487] 2002-10-15 Roland McGrath * sysdeps/unix/sysv/linux/bits/socket.h (struct msghdr): Use size_t instead of int for msg_iovlen, instead of socklen_t for msg_controllen. Other than the previously incorrect sign of msg_iovlen, this is a no-op on 32-bit platforms. On 64-bit platforms it makes this header match their layouts as well, so the following are now identical to it. * sysdeps/unix/sysv/linux/s390/bits/socket.h: File removed. * sysdeps/unix/sysv/linux/sparc/bits/socket.h: File removed. * sysdeps/unix/sysv/linux/x86_64/bits/socket.h: File removed. * sysdeps/unix/sysv/linux/ia64/bits/socket.h: File removed. * sysdeps/unix/sysv/linux/alpha/bits/socket.h: File removed. --- sysdeps/unix/sysv/linux/alpha/bits/socket.h | 315 -------------------- 1 file changed, 315 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/alpha/bits/socket.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/socket.h b/sysdeps/unix/sysv/linux/alpha/bits/socket.h deleted file mode 100644 index 82c4302ed5..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/bits/socket.h +++ /dev/null @@ -1,315 +0,0 @@ -/* System-specific socket constants and types. Linux/Alpha version. - Copyright (C) 1991,1992,1994-1999,2000,2001 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_SOCKET_H -#define __BITS_SOCKET_H - -#if !defined _SYS_SOCKET_H && !defined _NETINET_IN_H -# error "Never include directly; use instead." -#endif - -#define __need_size_t -#define __need_NULL -#include - -#include -#include - -/* Type for length arguments in socket calls. */ -#ifndef __socklen_t_defined -typedef __socklen_t socklen_t; -# define __socklen_t_defined -#endif - -/* Types of sockets. */ -enum __socket_type -{ - SOCK_STREAM = 1, /* Sequenced, reliable, connection-based - byte streams. */ -#define SOCK_STREAM SOCK_STREAM - SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams - of fixed maximum length. */ -#define SOCK_DGRAM SOCK_DGRAM - SOCK_RAW = 3, /* Raw protocol interface. */ -#define SOCK_RAW SOCK_RAW - SOCK_RDM = 4, /* Reliably-delivered messages. */ -#define SOCK_RDM SOCK_RDM - SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, - datagrams of fixed maximum length. */ -#define SOCK_SEQPACKET SOCK_SEQPACKET - SOCK_PACKET = 10 /* Linux specific way of getting packets - at the dev level. For writing rarp and - other similar things on the user level. */ -#define SOCK_PACKET SOCK_PACKET -}; - -/* Protocol families. */ -#define PF_UNSPEC 0 /* Unspecified. */ -#define PF_LOCAL 1 /* Local to host (pipes and file-domain). */ -#define PF_UNIX PF_LOCAL /* Old BSD name for PF_LOCAL. */ -#define PF_FILE PF_LOCAL /* Another non-standard name for PF_LOCAL. */ -#define PF_INET 2 /* IP protocol family. */ -#define PF_AX25 3 /* Amateur Radio AX.25. */ -#define PF_IPX 4 /* Novell Internet Protocol. */ -#define PF_APPLETALK 5 /* Appletalk DDP. */ -#define PF_NETROM 6 /* Amateur radio NetROM. */ -#define PF_BRIDGE 7 /* Multiprotocol bridge. */ -#define PF_ATMPVC 8 /* ATM PVCs. */ -#define PF_X25 9 /* Reserved for X.25 project. */ -#define PF_INET6 10 /* IP version 6. */ -#define PF_ROSE 11 /* Amateur Radio X.25 PLP. */ -#define PF_DECnet 12 /* Reserved for DECnet project. */ -#define PF_NETBEUI 13 /* Reserved for 802.2LLC project. */ -#define PF_SECURITY 14 /* Security callback pseudo AF. */ -#define PF_KEY 15 /* PF_KEY key management API. */ -#define PF_NETLINK 16 -#define PF_ROUTE PF_NETLINK /* Alias to emulate 4.4BSD. */ -#define PF_PACKET 17 /* Packet family. */ -#define PF_ASH 18 /* Ash. */ -#define PF_ECONET 19 /* Acorn Econet. */ -#define PF_ATMSVC 20 /* ATM SVCs. */ -#define PF_SNA 22 /* Linux SNA Project */ -#define PF_IRDA 23 /* IRDA sockets. */ -#define PF_PPPOX 24 /* PPPoX sockets. */ -#define PF_WANPIPE 25 /* Wanpipe API sockets. */ -#define PF_BLUETOOTH 31 /* Bluetooth sockets. */ -#define PF_MAX 32 /* For now.. */ - -/* Address families. */ -#define AF_UNSPEC PF_UNSPEC -#define AF_LOCAL PF_LOCAL -#define AF_UNIX PF_UNIX -#define AF_FILE PF_FILE -#define AF_INET PF_INET -#define AF_AX25 PF_AX25 -#define AF_IPX PF_IPX -#define AF_APPLETALK PF_APPLETALK -#define AF_NETROM PF_NETROM -#define AF_BRIDGE PF_BRIDGE -#define AF_ATMPVC PF_ATMPVC -#define AF_X25 PF_X25 -#define AF_INET6 PF_INET6 -#define AF_ROSE PF_ROSE -#define AF_DECnet PF_DECnet -#define AF_NETBEUI PF_NETBEUI -#define AF_SECURITY PF_SECURITY -#define AF_KEY PF_KEY -#define AF_NETLINK PF_NETLINK -#define AF_ROUTE PF_ROUTE -#define AF_PACKET PF_PACKET -#define AF_ASH PF_ASH -#define AF_ECONET PF_ECONET -#define AF_ATMSVC PF_ATMSVC -#define AF_SNA PF_SNA -#define AF_IRDA PF_IRDA -#define AF_PPPOX PF_PPPOX -#define AF_WANPIPE PF_WANPIPE -#define AF_BLUETOOTH PF_BLUETOOTH -#define AF_MAX PF_MAX - -/* Socket level values. Others are defined in the appropriate headers. - - XXX These definitions also should go into the appropriate headers as - far as they are available. */ -#define SOL_RAW 255 -#define SOL_DECNET 261 -#define SOL_X25 262 -#define SOL_PACKET 263 -#define SOL_ATM 264 /* ATM layer (cell level). */ -#define SOL_AAL 265 /* ATM Adaption Layer (packet level). */ -#define SOL_IRDA 266 - -/* Maximum queue length specifiable by listen. */ -#define SOMAXCONN 128 - -/* Get the definition of the macro to define the common sockaddr members. */ -#include - -/* Structure describing a generic socket address. */ -struct sockaddr - { - __SOCKADDR_COMMON (sa_); /* Common data: address family and length. */ - char sa_data[14]; /* Address data. */ - }; - - -/* Structure large enough to hold any socket address (with the historical - exception of AF_UNIX). We reserve 128 bytes. */ -#if ULONG_MAX > 0xffffffff -# define __ss_aligntype __uint64_t -#else -# define __ss_aligntype __uint32_t -#endif -#define _SS_SIZE 128 -#define _SS_PADSIZE (_SS_SIZE - (2 * sizeof (__ss_aligntype))) - -struct sockaddr_storage - { - __SOCKADDR_COMMON (ss_); /* Address family, etc. */ - __ss_aligntype __ss_align; /* Force desired alignment. */ - char __ss_padding[_SS_PADSIZE]; - }; - - -/* Bits in the FLAGS argument to `send', `recv', et al. */ -enum - { - MSG_OOB = 0x01, /* Process out-of-band data. */ -#define MSG_OOB MSG_OOB - MSG_PEEK = 0x02, /* Peek at incoming messages. */ -#define MSG_PEEK MSG_PEEK - MSG_DONTROUTE = 0x04, /* Don't use local routing. */ -#define MSG_DONTROUTE MSG_DONTROUTE -#ifdef __USE_GNU - /* DECnet uses a different name. */ - MSG_TRYHARD = MSG_DONTROUTE, -# define MSG_TRYHARD MSG_DONTROUTE -#endif - MSG_CTRUNC = 0x08, /* Control data lost before delivery. */ -#define MSG_CTRUNC MSG_CTRUNC - MSG_PROXY = 0x10, /* Supply or ask second address. */ -#define MSG_PROXY MSG_PROXY - MSG_TRUNC = 0x20, -#define MSG_TRUNC MSG_TRUNC - MSG_DONTWAIT = 0x40, /* Nonblocking IO. */ -#define MSG_DONTWAIT MSG_DONTWAIT - MSG_EOR = 0x80, /* End of record. */ -#define MSG_EOR MSG_EOR - MSG_WAITALL = 0x100, /* Wait for a full request. */ -#define MSG_WAITALL MSG_WAITALL - MSG_FIN = 0x200, -#define MSG_FIN MSG_FIN - MSG_SYN = 0x400, -#define MSG_SYN MSG_SYN - MSG_CONFIRM = 0x800, /* Confirm path validity. */ -#define MSG_CONFIRM MSG_CONFIRM - MSG_RST = 0x1000, -#define MSG_RST MSG_RST - MSG_ERRQUEUE = 0x2000, /* Fetch message from error queue. */ -#define MSG_ERRQUEUE MSG_ERRQUEUE - MSG_NOSIGNAL = 0x4000, /* Do not generate SIGPIPE. */ -#define MSG_NOSIGNAL MSG_NOSIGNAL - MSG_MORE = 0x8000 /* Sender will send more. */ -#define MSG_MORE MSG_MORE - }; - - -/* Structure describing messages sent by - `sendmsg' and received by `recvmsg'. */ -struct msghdr - { - void *msg_name; /* Address to send to/receive from. */ - socklen_t msg_namelen; /* Length of address data. */ - - struct iovec *msg_iov; /* Vector of data to send/receive into. */ - size_t msg_iovlen; /* Number of elements in the vector. */ - - void *msg_control; /* Ancillary data (eg BSD filedesc passing). */ - size_t msg_controllen; /* Ancillary data buffer length. */ - - int msg_flags; /* Flags on received message. */ - }; - -/* Structure used for storage of ancillary data object information. */ -struct cmsghdr - { - size_t cmsg_len; /* Length of data in cmsg_data plus length - of cmsghdr structure. */ - int cmsg_level; /* Originating protocol. */ - int cmsg_type; /* Protocol specific type. */ -#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L - __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */ -#endif - }; - -/* Ancillary data object manipulation macros. */ -#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L -# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data) -#else -# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1)) -#endif -#define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg) -#define CMSG_FIRSTHDR(mhdr) \ - ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \ - ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL) -#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \ - & (size_t) ~(sizeof (size_t) - 1)) -#define CMSG_SPACE(len) (CMSG_ALIGN (len) \ - + CMSG_ALIGN (sizeof (struct cmsghdr))) -#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len)) - -extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr, - struct cmsghdr *__cmsg) __THROW; -#ifdef __USE_EXTERN_INLINES -# ifndef _EXTERN_INLINE -# define _EXTERN_INLINE extern __inline -# endif -_EXTERN_INLINE struct cmsghdr * -__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW -{ - if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr)) - /* The kernel header does this so there may be a reason. */ - return 0; - - __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg - + CMSG_ALIGN (__cmsg->cmsg_len)); - if ((unsigned char *) (__cmsg + 1) >= ((unsigned char *) __mhdr->msg_control - + __mhdr->msg_controllen) - || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len) - > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen))) - /* No more entries. */ - return 0; - return __cmsg; -} -#endif /* Use `extern inline'. */ - -/* Socket level message types. This must match the definitions in - . */ -enum - { - SCM_RIGHTS = 0x01, /* Transfer file descriptors. */ -#define SCM_RIGHTS SCM_RIGHTS -#ifdef __USE_BSD - SCM_CREDENTIALS = 0x02, /* Credentials passing. */ -# define SCM_CREDENTIALS SCM_CREDENTIALS -#endif - __SCM_CONNECT = 0x03 /* Data array is `struct scm_connect'. */ - }; - -/* User visible structure for SCM_CREDENTIALS message */ - -struct ucred -{ - pid_t pid; /* PID of sending process. */ - uid_t uid; /* UID of sending process. */ - gid_t gid; /* GID of sending process. */ -}; - -/* Get socket manipulation related informations from kernel headers. */ -#include - - -/* Structure used to manipulate the SO_LINGER option. */ -struct linger - { - int l_onoff; /* Nonzero to linger on close. */ - int l_linger; /* Time to linger. */ - }; - -#endif /* bits/socket.h */ From cfe08a2c2a29a3b80a3773d649a551973d17a544 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 16 Oct 2002 22:09:41 +0000 Subject: [PATCH 2927/4487] 2002-10-16 Roland McGrath * sysdeps/unix/sysv/linux/fpathconf.c (LINUX_LINK_MAX): Move macro ... * sysdeps/unix/sysv/linux/linux_fsinfo.h (LINUX_LINK_MAX): ... here. * sysdeps/unix/sysv/linux/pathconf.h: New file. (statfs_link_max): New function, guts from fpathconf.c. * sysdeps/unix/sysv/linux/fpathconf.c: Rewritten using that. * sysdeps/unix/sysv/linux/pathconf.c (__pathconf): Likewise. * sysdeps/unix/sysv/linux/alpha/pathconf.c (__pathconf): Rewritten to use the linux/pathconf.c code by #include rather than duplication. * sysdeps/unix/sysv/linux/alpha/fpathconf.c (__pathconf): Likewise. --- sysdeps/unix/sysv/linux/alpha/fpathconf.c | 82 +++-------------------- sysdeps/unix/sysv/linux/alpha/pathconf.c | 68 +++---------------- 2 files changed, 21 insertions(+), 129 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/fpathconf.c b/sysdeps/unix/sysv/linux/alpha/fpathconf.c index 1820e5b229..a8a24de1f8 100644 --- a/sysdeps/unix/sysv/linux/alpha/fpathconf.c +++ b/sysdeps/unix/sysv/linux/alpha/fpathconf.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1991,1995,1996,1998,2000,2002 Free Software Foundation, Inc. +/* Get file-specific information about a descriptor. Linux/Alpha version. + Copyright (C) 1991,95,96,98,99,2000,2001,2002 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 @@ -16,36 +17,25 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include -#include #include -#include #include -#include +static long int linux_fpathconf (int fd, int name); -/* The Linux kernel header mentioned this as a kind of generic value. */ -#define LINUX_LINK_MAX 127 +/* Define this first, so it can be inlined. */ +#define __fpathconf static linux_fpathconf +#include -static long int default_fpathconf (int fd, int name); -/* Get file-specific information about descriptor FD. */ +/* Get file-specific information about FD. */ long int -__fpathconf (fd, name) - int fd; - int name; +__pathconf (int fd, int name) { - if (fd < 0) - { - __set_errno (EBADF); - return -1; - } - if (name == _PC_FILESIZEBITS) { - /* Test whether this is on a ext2 filesystem which supports large - files. */ + /* Test whether this is on a ext2 or UFS filesystem which + support large files. */ struct statfs fs; if (__fstatfs (fd, &fs) < 0 @@ -57,56 +47,6 @@ __fpathconf (fd, name) /* This filesystem supported files >2GB. */ return 64; } - if (name == _PC_LINK_MAX) - { - struct statfs fsbuf; - - /* Determine the filesystem type. */ - if (__fstatfs (fd, &fsbuf) < 0) - /* not possible, return the default value. */ - return LINUX_LINK_MAX; - - switch (fsbuf.f_type) - { - case EXT2_SUPER_MAGIC: - return EXT2_LINK_MAX; - - case MINIX_SUPER_MAGIC: - case MINIX_SUPER_MAGIC2: - return MINIX_LINK_MAX; - - case MINIX2_SUPER_MAGIC: - case MINIX2_SUPER_MAGIC2: - return MINIX2_LINK_MAX; - - case XENIX_SUPER_MAGIC: - return XENIX_LINK_MAX; - case SYSV4_SUPER_MAGIC: - case SYSV2_SUPER_MAGIC: - return SYSV_LINK_MAX; - - case COH_SUPER_MAGIC: - return COH_LINK_MAX; - - case UFS_MAGIC: - case UFS_CIGAM: - return UFS_LINK_MAX; - - case REISERFS_SUPER_MAGIC: - return REISERFS_LINK_MAX; - - case XFS_SUPER_MAGIC: - return XFS_LINK_MAX; - - default: - return LINUX_LINK_MAX; - } - } - - /* Fallback to the generic version. */ - return default_fpathconf (fd, name); + return linux_fpathconf (fd, name); } - -#define __fpathconf static default_fpathconf -#include diff --git a/sysdeps/unix/sysv/linux/alpha/pathconf.c b/sysdeps/unix/sysv/linux/alpha/pathconf.c index 45c1724dcf..1b35dc87cf 100644 --- a/sysdeps/unix/sysv/linux/alpha/pathconf.c +++ b/sysdeps/unix/sysv/linux/alpha/pathconf.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1991, 1995, 1996, 1998, 2000 Free Software Foundation, Inc. +/* Get file-specific information about a file. Linux/Alpha version. + Copyright (C) 1991,95,96,98,99,2000,2001,2002 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 @@ -16,24 +17,19 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include -#include #include -#include -#include #include -#include +static long int linux_pathconf (const char *file, int name); +/* Define this first, so it can be inlined. */ +#define __pathconf static linux_pathconf +#include -/* The Linux kernel header mentioned this as a kind of generic value. */ -#define LINUX_LINK_MAX 127 -static long int default_pathconf (const char *path, int name); - -/* Get file-specific information about PATH. */ +/* Get file-specific information about FILE. */ long int -__pathconf (const char *path, int name) +__pathconf (const char *file, int name) { if (name == _PC_FILESIZEBITS) { @@ -41,7 +37,7 @@ __pathconf (const char *path, int name) support large files. */ struct statfs fs; - if (__statfs (path, &fs) < 0 + if (__statfs (file, &fs) < 0 || (fs.f_type != EXT2_SUPER_MAGIC && fs.f_type != UFS_MAGIC && fs.f_type != UFS_CIGAM)) @@ -50,50 +46,6 @@ __pathconf (const char *path, int name) /* This filesystem supported files >2GB. */ return 64; } - if (name == _PC_LINK_MAX) - { - struct statfs fsbuf; - - /* Determine the filesystem type. */ - if (__statfs (path, &fsbuf) < 0) - /* not possible, return the default value. */ - return LINUX_LINK_MAX; - - switch (fsbuf.f_type) - { - case EXT2_SUPER_MAGIC: - return EXT2_LINK_MAX; - - case MINIX_SUPER_MAGIC: - case MINIX_SUPER_MAGIC2: - return MINIX_LINK_MAX; - - case MINIX2_SUPER_MAGIC: - case MINIX2_SUPER_MAGIC2: - return MINIX2_LINK_MAX; - - case XENIX_SUPER_MAGIC: - return XENIX_LINK_MAX; - case SYSV4_SUPER_MAGIC: - case SYSV2_SUPER_MAGIC: - return SYSV_LINK_MAX; - - case COH_SUPER_MAGIC: - return COH_LINK_MAX; - - case UFS_MAGIC: - case UFS_CIGAM: - return UFS_LINK_MAX; - - default: - return LINUX_LINK_MAX; - } - } - - /* Fallback to the generic version. */ - return default_pathconf (path, name); + return linux_pathconf (file, name); } - -#define __pathconf static default_pathconf -#include From ccc5fdb26b6cb9ea4518794bdd492ed463ca2f48 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 18 Oct 2002 19:03:49 +0000 Subject: [PATCH 2928/4487] 2002-10-18 Jakub Jelinek * sysdeps/unix/sysv/linux/pathconf.h (statfs_link_max): Add inline. (statfs_filesize_max): New function. * sysdeps/unix/sysv/linux/linux_fsinfo.h (JFFS_SUPER_MAGIC, JFFS2_SUPER_MAGIC, JFS_SUPER_MAGIC, NTFS_SUPER_MAGIC, ROMFS_SUPER_MAGIC, UDF_SUPER_MAGIC): Define. * sysdeps/unix/sysv/linux/fpathconf.c (__fpathconf): Use statfs_filesize_max. * sysdeps/unix/sysv/linux/pathconf.c (__pathconf): Likewise. * sysdeps/unix/sysv/linux/alpha/fpathconf.c: Removed. * sysdeps/unix/sysv/linux/alpha/pathconf.c: Removed. --- sysdeps/unix/sysv/linux/alpha/fpathconf.c | 52 ----------------------- sysdeps/unix/sysv/linux/alpha/pathconf.c | 51 ---------------------- 2 files changed, 103 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/alpha/fpathconf.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/pathconf.c diff --git a/sysdeps/unix/sysv/linux/alpha/fpathconf.c b/sysdeps/unix/sysv/linux/alpha/fpathconf.c deleted file mode 100644 index a8a24de1f8..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/fpathconf.c +++ /dev/null @@ -1,52 +0,0 @@ -/* Get file-specific information about a descriptor. Linux/Alpha version. - Copyright (C) 1991,95,96,98,99,2000,2001,2002 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. */ - -#include -#include - - -static long int linux_fpathconf (int fd, int name); - -/* Define this first, so it can be inlined. */ -#define __fpathconf static linux_fpathconf -#include - - -/* Get file-specific information about FD. */ -long int -__pathconf (int fd, int name) -{ - if (name == _PC_FILESIZEBITS) - { - /* Test whether this is on a ext2 or UFS filesystem which - support large files. */ - struct statfs fs; - - if (__fstatfs (fd, &fs) < 0 - || (fs.f_type != EXT2_SUPER_MAGIC - && fs.f_type != UFS_MAGIC - && fs.f_type != UFS_CIGAM)) - return 32; - - /* This filesystem supported files >2GB. */ - return 64; - } - - return linux_fpathconf (fd, name); -} diff --git a/sysdeps/unix/sysv/linux/alpha/pathconf.c b/sysdeps/unix/sysv/linux/alpha/pathconf.c deleted file mode 100644 index 1b35dc87cf..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/pathconf.c +++ /dev/null @@ -1,51 +0,0 @@ -/* Get file-specific information about a file. Linux/Alpha version. - Copyright (C) 1991,95,96,98,99,2000,2001,2002 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. */ - -#include -#include - -static long int linux_pathconf (const char *file, int name); - -/* Define this first, so it can be inlined. */ -#define __pathconf static linux_pathconf -#include - - -/* Get file-specific information about FILE. */ -long int -__pathconf (const char *file, int name) -{ - if (name == _PC_FILESIZEBITS) - { - /* Test whether this is on a ext2 or UFS filesystem which - support large files. */ - struct statfs fs; - - if (__statfs (file, &fs) < 0 - || (fs.f_type != EXT2_SUPER_MAGIC - && fs.f_type != UFS_MAGIC - && fs.f_type != UFS_CIGAM)) - return 32; - - /* This filesystem supported files >2GB. */ - return 64; - } - - return linux_pathconf (file, name); -} From aa858c3e992a028efb7e374b2db6b52fb4711125 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 18 Oct 2002 19:38:00 +0000 Subject: [PATCH 2929/4487] 2002-10-18 Jeff Bailey * sysdeps/alpha/elf/configure.in: Remove unneeded sinclude statement. * sysdeps/generic/configure.in: Likewise. * sysdeps/i386/elf/configure.in: Likewise. * sysdeps/ia64/elf/configure.in: Likewise. * sysdeps/mach/configure.in: Likewise. * sysdeps/mach/hurd/configure.in: Likewise. * sysdeps/unix/configure.in: Likewise. * sysdeps/unix/common/configure.in: Likewise. * sysdeps/unix/sysv/aix/configure.in: Likewise. * sysdeps/unix/sysv/linux/configure.in: Likewise. * sysdeps/unix/sysv/linux/mips/configure.in: Likewise. * sysdeps/x86_64/elf/configure.in: Likewise. --- sysdeps/alpha/elf/configure.in | 1 - sysdeps/unix/sysv/aix/configure.in | 1 - 2 files changed, 2 deletions(-) diff --git a/sysdeps/alpha/elf/configure.in b/sysdeps/alpha/elf/configure.in index 29daf4fc9c..770a95edbb 100644 --- a/sysdeps/alpha/elf/configure.in +++ b/sysdeps/alpha/elf/configure.in @@ -1,4 +1,3 @@ -sinclude(./aclocal.m4)dnl Autoconf lossage GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. # Local configure fragment for sysdeps/alpha/elf. diff --git a/sysdeps/unix/sysv/aix/configure.in b/sysdeps/unix/sysv/aix/configure.in index effa853e0b..bb783fc0ce 100644 --- a/sysdeps/unix/sysv/aix/configure.in +++ b/sysdeps/unix/sysv/aix/configure.in @@ -1,4 +1,3 @@ -sinclude(./aclocal.m4)dnl Autoconf lossage GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. # Local configure fragment for sysdeps/unix/sysv/aix. From 12e56cf46d2a17747b91bc3913c298bcac57d214 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 18 Oct 2002 20:27:53 +0000 Subject: [PATCH 2930/4487] 2002-10-18 Jeff Bailey * configure.in: Replace AC_FD_CC with AS_MESSAGE_LOG_FD. * sysdeps/alpha/elf/configure.in: Likewise. * sysdeps/i386/elf/configure.in: Likewise. * sysdeps/mach/hurd/configure.in: Likewise. * sysdeps/x86_64/elf/configure.in: Likewise. --- sysdeps/alpha/elf/configure.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/elf/configure.in b/sysdeps/alpha/elf/configure.in index 770a95edbb..7986814548 100644 --- a/sysdeps/alpha/elf/configure.in +++ b/sysdeps/alpha/elf/configure.in @@ -40,7 +40,7 @@ baz: lda $16, n($31) !tprel EOF dnl -if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AC_FD_CC); then +if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then libc_cv_alpha_tls=yes else libc_cv_alpha_tls=no @@ -64,7 +64,7 @@ EOF dnl libc_cv_alpha_hidden_gprel=no -if AC_TRY_COMMAND(${CC-cc} -S $CFLAGS -O2 -fpic conftest.c 1>&AC_FD_CC); then +if AC_TRY_COMMAND(${CC-cc} -S $CFLAGS -O2 -fpic conftest.c 1>&AS_MESSAGE_LOG_FD); then if grep -q 'bar.*!gprel' conftest.s \ && grep -q 'baz.*!gprel' conftest.s \ && ! grep -q 'bar.*!literal' conftest.s \ From 6474e421d60c5617d85216b554fea53d31b17cb0 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 18 Oct 2002 22:15:36 +0000 Subject: [PATCH 2931/4487] 2002-10-18 Jeff Bailey * sysdeps/alpha/elf/configure.in: Remove unneeded sinclude statement. * sysdeps/generic/configure.in: Likewise. * sysdeps/i386/elf/configure.in: Likewise. * sysdeps/ia64/elf/configure.in: Likewise. * sysdeps/mach/configure.in: Likewise. * sysdeps/mach/hurd/configure.in: Likewise. * sysdeps/unix/configure.in: Likewise. * sysdeps/unix/common/configure.in: Likewise. * sysdeps/unix/sysv/aix/configure.in: Likewise. * sysdeps/unix/sysv/linux/configure.in: Likewise. * sysdeps/unix/sysv/linux/mips/configure.in: Likewise. * sysdeps/x86_64/elf/configure.in: Likewise. --- sysdeps/unix/sysv/linux/mips/configure.in | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/configure.in b/sysdeps/unix/sysv/linux/mips/configure.in index 81515a52f5..9d000646c4 100644 --- a/sysdeps/unix/sysv/linux/mips/configure.in +++ b/sysdeps/unix/sysv/linux/mips/configure.in @@ -1,11 +1,10 @@ -sinclude(./aclocal.m4)dnl Autoconf lossage GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. # Local configure fragment for sysdeps/unix/sysv/linux/mips. define([AC_SUBST])dnl Prevent junk from being appended due to no AC_OUTPUT AC_CHECK_PROG_VER(AS, $AS, --version, [GNU assembler.* \([0-9]*\.[0-9.]*\(-ia64-[0-9]*\)*\)], - [2.11.90.0.[5-9]* | 2.11.90.[1-9]* | 2.11.9[1-9]* | 2.11.[1-9]* | 2.1[2-9]*| 2.[2-9]*], -AC_MSG_WARN([*** Your binutils versions are too old. -*** We strongly advise to update binutils. For details check + [2.11.90.0.[5-9]* | 2.11.90.[1-9]* | 2.11.9[1-9]* | 2.11.[1-9]* | 2.1[2-9]*| 2.[2-9]*], +AC_MSG_WARN([*** Your binutils versions are too old. +*** We strongly advise to update binutils. For details check *** the FAQ and INSTALL documents.])) From 54df0cf57d86c5158f3d9d6076dc79154c876b2d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 18 Oct 2002 22:37:29 +0000 Subject: [PATCH 2932/4487] 2002-10-18 Roland McGrath * sysdeps/unix/alpha/sysdep.h (INLINE_SYSCALL, INLINE_SYSCALL1) (inline_syscall_clobbers, inline_syscall0, inline_syscall1) (inline_syscall2, inline_syscall3, inline_syscall4, inline_syscall5) (inline_syscall6): Move these macros ... * sysdeps/unix/sysv/linux/alpha/sysdep.h: ... to here. --- sysdeps/unix/alpha/sysdep.h | 163 ------------------------- sysdeps/unix/sysv/linux/alpha/sysdep.h | 157 +++++++++++++++++++++++- 2 files changed, 156 insertions(+), 164 deletions(-) diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h index 7da33c87f2..46b5214987 100644 --- a/sysdeps/unix/alpha/sysdep.h +++ b/sysdeps/unix/alpha/sysdep.h @@ -109,167 +109,4 @@ __LABEL(name) \ #define MOVE(x,y) mov x,y -#else /* !ASSEMBLER */ - -/* Define a macro which expands inline into the wrapper code for a - system call. */ - -#undef INLINE_SYSCALL -#define INLINE_SYSCALL(name, nr, args...) INLINE_SYSCALL1(name, nr, args) - -#define INLINE_SYSCALL1(name, nr, args...) \ -({ \ - long _sc_ret, _sc_err; \ - inline_syscall##nr(name, args); \ - if (_sc_err) \ - { \ - __set_errno (_sc_ret); \ - _sc_ret = -1L; \ - } \ - _sc_ret; \ -}) - -#define inline_syscall_clobbers \ - "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8", \ - "$22", "$23", "$24", "$25", "$27", "$28", "memory" - -/* It is moderately important optimization-wise to limit the lifetime - of the hard-register variables as much as possible. Thus we copy - in/out as close to the asm as possible. */ - -#define inline_syscall0(name) \ -{ \ - register long _sc_0 __asm__("$0"); \ - register long _sc_19 __asm__("$19"); \ - \ - _sc_0 = __NR_##name; \ - __asm__("callsys # %0 %1 <= %2" \ - : "=r"(_sc_0), "=r"(_sc_19) \ - : "0"(_sc_0) \ - : inline_syscall_clobbers); \ - _sc_ret = _sc_0, _sc_err = _sc_19; \ -} - -#define inline_syscall1(name,arg1) \ -{ \ - register long _sc_0 __asm__("$0"); \ - register long _sc_16 __asm__("$16"); \ - register long _sc_19 __asm__("$19"); \ - \ - _sc_0 = __NR_##name; \ - _sc_16 = (long) (arg1); \ - __asm__("callsys # %0 %1 <= %2 %3" \ - : "=r"(_sc_0), "=r"(_sc_19) \ - : "0"(_sc_0), "r"(_sc_16) \ - : inline_syscall_clobbers); \ - _sc_ret = _sc_0, _sc_err = _sc_19; \ -} - -#define inline_syscall2(name,arg1,arg2) \ -{ \ - register long _sc_0 __asm__("$0"); \ - register long _sc_16 __asm__("$16"); \ - register long _sc_17 __asm__("$17"); \ - register long _sc_19 __asm__("$19"); \ - \ - _sc_0 = __NR_##name; \ - _sc_16 = (long) (arg1); \ - _sc_17 = (long) (arg2); \ - __asm__("callsys # %0 %1 <= %2 %3 %4" \ - : "=r"(_sc_0), "=r"(_sc_19) \ - : "0"(_sc_0), "r"(_sc_16), "r"(_sc_17) \ - : inline_syscall_clobbers); \ - _sc_ret = _sc_0, _sc_err = _sc_19; \ -} - -#define inline_syscall3(name,arg1,arg2,arg3) \ -{ \ - register long _sc_0 __asm__("$0"); \ - register long _sc_16 __asm__("$16"); \ - register long _sc_17 __asm__("$17"); \ - register long _sc_18 __asm__("$18"); \ - register long _sc_19 __asm__("$19"); \ - \ - _sc_0 = __NR_##name; \ - _sc_16 = (long) (arg1); \ - _sc_17 = (long) (arg2); \ - _sc_18 = (long) (arg3); \ - __asm__("callsys # %0 %1 <= %2 %3 %4 %5" \ - : "=r"(_sc_0), "=r"(_sc_19) \ - : "0"(_sc_0), "r"(_sc_16), "r"(_sc_17), \ - "r"(_sc_18) \ - : inline_syscall_clobbers); \ - _sc_ret = _sc_0, _sc_err = _sc_19; \ -} - -#define inline_syscall4(name,arg1,arg2,arg3,arg4) \ -{ \ - register long _sc_0 __asm__("$0"); \ - register long _sc_16 __asm__("$16"); \ - register long _sc_17 __asm__("$17"); \ - register long _sc_18 __asm__("$18"); \ - register long _sc_19 __asm__("$19"); \ - \ - _sc_0 = __NR_##name; \ - _sc_16 = (long) (arg1); \ - _sc_17 = (long) (arg2); \ - _sc_18 = (long) (arg3); \ - _sc_19 = (long) (arg4); \ - __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6" \ - : "=r"(_sc_0), "=r"(_sc_19) \ - : "0"(_sc_0), "r"(_sc_16), "r"(_sc_17), \ - "r"(_sc_18), "1"(_sc_19) \ - : inline_syscall_clobbers); \ - _sc_ret = _sc_0, _sc_err = _sc_19; \ -} - -#define inline_syscall5(name,arg1,arg2,arg3,arg4,arg5) \ -{ \ - register long _sc_0 __asm__("$0"); \ - register long _sc_16 __asm__("$16"); \ - register long _sc_17 __asm__("$17"); \ - register long _sc_18 __asm__("$18"); \ - register long _sc_19 __asm__("$19"); \ - register long _sc_20 __asm__("$20"); \ - \ - _sc_0 = __NR_##name; \ - _sc_16 = (long) (arg1); \ - _sc_17 = (long) (arg2); \ - _sc_18 = (long) (arg3); \ - _sc_19 = (long) (arg4); \ - _sc_20 = (long) (arg5); \ - __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7" \ - : "=r"(_sc_0), "=r"(_sc_19) \ - : "0"(_sc_0), "r"(_sc_16), "r"(_sc_17), \ - "r"(_sc_18), "1"(_sc_19), "r"(_sc_20) \ - : inline_syscall_clobbers); \ - _sc_ret = _sc_0, _sc_err = _sc_19; \ -} - -#define inline_syscall6(name,arg1,arg2,arg3,arg4,arg5,arg6) \ -{ \ - register long _sc_0 __asm__("$0"); \ - register long _sc_16 __asm__("$16"); \ - register long _sc_17 __asm__("$17"); \ - register long _sc_18 __asm__("$18"); \ - register long _sc_19 __asm__("$19"); \ - register long _sc_20 __asm__("$20"); \ - register long _sc_21 __asm__("$21"); \ - \ - _sc_0 = __NR_##name; \ - _sc_16 = (long) (arg1); \ - _sc_17 = (long) (arg2); \ - _sc_18 = (long) (arg3); \ - _sc_19 = (long) (arg4); \ - _sc_20 = (long) (arg5); \ - _sc_21 = (long) (arg6); \ - __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7 %8" \ - : "=r"(_sc_0), "=r"(_sc_19) \ - : "0"(_sc_0), "r"(_sc_16), "r"(_sc_17), \ - "r"(_sc_18), "1"(_sc_19), "r"(_sc_20), \ - "r"(_sc_21) \ - : inline_syscall_clobbers); \ - _sc_ret = _sc_0, _sc_err = _sc_19; \ -} - #endif /* ASSEMBLER */ diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h index 05a4c3a94a..e56adca8ed 100644 --- a/sysdeps/unix/sysv/linux/alpha/sysdep.h +++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1993, 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1993, 1995, 1996, 1997, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, , August 1995. @@ -67,3 +67,158 @@ (__NR_##name == __NR_rt_sigaction \ ? __syscall_##name(args) \ : INLINE_SYSCALL1(name, nr, args)) + +#define INLINE_SYSCALL1(name, nr, args...) \ +({ \ + long _sc_ret, _sc_err; \ + inline_syscall##nr(name, args); \ + if (_sc_err) \ + { \ + __set_errno (_sc_ret); \ + _sc_ret = -1L; \ + } \ + _sc_ret; \ +}) + +#define inline_syscall_clobbers \ + "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8", \ + "$22", "$23", "$24", "$25", "$27", "$28", "memory" + +/* It is moderately important optimization-wise to limit the lifetime + of the hard-register variables as much as possible. Thus we copy + in/out as close to the asm as possible. */ + +#define inline_syscall0(name) \ +{ \ + register long _sc_0 __asm__("$0"); \ + register long _sc_19 __asm__("$19"); \ + \ + _sc_0 = __NR_##name; \ + __asm__("callsys # %0 %1 <= %2" \ + : "=r"(_sc_0), "=r"(_sc_19) \ + : "0"(_sc_0) \ + : inline_syscall_clobbers); \ + _sc_ret = _sc_0, _sc_err = _sc_19; \ +} + +#define inline_syscall1(name,arg1) \ +{ \ + register long _sc_0 __asm__("$0"); \ + register long _sc_16 __asm__("$16"); \ + register long _sc_19 __asm__("$19"); \ + \ + _sc_0 = __NR_##name; \ + _sc_16 = (long) (arg1); \ + __asm__("callsys # %0 %1 <= %2 %3" \ + : "=r"(_sc_0), "=r"(_sc_19) \ + : "0"(_sc_0), "r"(_sc_16) \ + : inline_syscall_clobbers); \ + _sc_ret = _sc_0, _sc_err = _sc_19; \ +} + +#define inline_syscall2(name,arg1,arg2) \ +{ \ + register long _sc_0 __asm__("$0"); \ + register long _sc_16 __asm__("$16"); \ + register long _sc_17 __asm__("$17"); \ + register long _sc_19 __asm__("$19"); \ + \ + _sc_0 = __NR_##name; \ + _sc_16 = (long) (arg1); \ + _sc_17 = (long) (arg2); \ + __asm__("callsys # %0 %1 <= %2 %3 %4" \ + : "=r"(_sc_0), "=r"(_sc_19) \ + : "0"(_sc_0), "r"(_sc_16), "r"(_sc_17) \ + : inline_syscall_clobbers); \ + _sc_ret = _sc_0, _sc_err = _sc_19; \ +} + +#define inline_syscall3(name,arg1,arg2,arg3) \ +{ \ + register long _sc_0 __asm__("$0"); \ + register long _sc_16 __asm__("$16"); \ + register long _sc_17 __asm__("$17"); \ + register long _sc_18 __asm__("$18"); \ + register long _sc_19 __asm__("$19"); \ + \ + _sc_0 = __NR_##name; \ + _sc_16 = (long) (arg1); \ + _sc_17 = (long) (arg2); \ + _sc_18 = (long) (arg3); \ + __asm__("callsys # %0 %1 <= %2 %3 %4 %5" \ + : "=r"(_sc_0), "=r"(_sc_19) \ + : "0"(_sc_0), "r"(_sc_16), "r"(_sc_17), \ + "r"(_sc_18) \ + : inline_syscall_clobbers); \ + _sc_ret = _sc_0, _sc_err = _sc_19; \ +} + +#define inline_syscall4(name,arg1,arg2,arg3,arg4) \ +{ \ + register long _sc_0 __asm__("$0"); \ + register long _sc_16 __asm__("$16"); \ + register long _sc_17 __asm__("$17"); \ + register long _sc_18 __asm__("$18"); \ + register long _sc_19 __asm__("$19"); \ + \ + _sc_0 = __NR_##name; \ + _sc_16 = (long) (arg1); \ + _sc_17 = (long) (arg2); \ + _sc_18 = (long) (arg3); \ + _sc_19 = (long) (arg4); \ + __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6" \ + : "=r"(_sc_0), "=r"(_sc_19) \ + : "0"(_sc_0), "r"(_sc_16), "r"(_sc_17), \ + "r"(_sc_18), "1"(_sc_19) \ + : inline_syscall_clobbers); \ + _sc_ret = _sc_0, _sc_err = _sc_19; \ +} + +#define inline_syscall5(name,arg1,arg2,arg3,arg4,arg5) \ +{ \ + register long _sc_0 __asm__("$0"); \ + register long _sc_16 __asm__("$16"); \ + register long _sc_17 __asm__("$17"); \ + register long _sc_18 __asm__("$18"); \ + register long _sc_19 __asm__("$19"); \ + register long _sc_20 __asm__("$20"); \ + \ + _sc_0 = __NR_##name; \ + _sc_16 = (long) (arg1); \ + _sc_17 = (long) (arg2); \ + _sc_18 = (long) (arg3); \ + _sc_19 = (long) (arg4); \ + _sc_20 = (long) (arg5); \ + __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7" \ + : "=r"(_sc_0), "=r"(_sc_19) \ + : "0"(_sc_0), "r"(_sc_16), "r"(_sc_17), \ + "r"(_sc_18), "1"(_sc_19), "r"(_sc_20) \ + : inline_syscall_clobbers); \ + _sc_ret = _sc_0, _sc_err = _sc_19; \ +} + +#define inline_syscall6(name,arg1,arg2,arg3,arg4,arg5,arg6) \ +{ \ + register long _sc_0 __asm__("$0"); \ + register long _sc_16 __asm__("$16"); \ + register long _sc_17 __asm__("$17"); \ + register long _sc_18 __asm__("$18"); \ + register long _sc_19 __asm__("$19"); \ + register long _sc_20 __asm__("$20"); \ + register long _sc_21 __asm__("$21"); \ + \ + _sc_0 = __NR_##name; \ + _sc_16 = (long) (arg1); \ + _sc_17 = (long) (arg2); \ + _sc_18 = (long) (arg3); \ + _sc_19 = (long) (arg4); \ + _sc_20 = (long) (arg5); \ + _sc_21 = (long) (arg6); \ + __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7 %8" \ + : "=r"(_sc_0), "=r"(_sc_19) \ + : "0"(_sc_0), "r"(_sc_16), "r"(_sc_17), \ + "r"(_sc_18), "1"(_sc_19), "r"(_sc_20), \ + "r"(_sc_21) \ + : inline_syscall_clobbers); \ + _sc_ret = _sc_0, _sc_err = _sc_19; \ +} From ea5a0c9530c681608dfa55f637e1dd7767472e07 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 19 Oct 2002 20:03:40 +0000 Subject: [PATCH 2933/4487] 2002-10-19 Roland McGrath * config.make.in: Nix completely-soft nonsense. * configure.in: Likewise. Under --without-fp, use nofpu subdirectory of machine directories instead of fpu subdirectory. * sysdeps/powerpc/soft-fp/Makefile: Remove cruft added in last change. * sysdeps/powerpc/nofpu/Makefile: Put it in this new file instead. * sysdeps/powerpc/soft-fp/sim-full.c: Moved to ../nofpu. * sysdeps/powerpc/soft-fp/fraiseexcpt.c: Moved to ../nofpu. * sysdeps/powerpc/soft-fp/fegetexcept.c: Moved to ../nofpu. * sysdeps/powerpc/soft-fp/fclrexcpt.c: Moved to ../nofpu. * sysdeps/powerpc/soft-fp/ftestexcept.c: Moved to ../nofpu. * sysdeps/powerpc/soft-fp/fgetexcptflg.c: Moved to ../nofpu. * sysdeps/powerpc/soft-fp/fsetexcptflg.c: Moved to ../nofpu. * sysdeps/powerpc/soft-fp/fedisblxcpt.c: Moved to ../nofpu. * sysdeps/powerpc/soft-fp/feenablxcpt.c: Moved to ../nofpu. * sysdeps/powerpc/soft-fp/fegetenv.c: Moved to ../nofpu. * sysdeps/powerpc/soft-fp/fesetenv.c: Moved to ../nofpu. * sysdeps/powerpc/soft-fp/fegetround.c: Moved to ../nofpu. * sysdeps/powerpc/soft-fp/fesetround.c: Moved to ../nofpu. * sysdeps/powerpc/soft-fp/feupdateenv.c: Moved to ../nofpu. * sysdeps/powerpc/soft-fp/feholdexcpt.c: Moved to ../nofpu. * sysdeps/powerpc/soft-fp/fenv_const.c: Moved to ../nofpu. * sysdeps/powerpc/soft-fp/libm-test-ulps: Moved to ../nofpu. * sysdeps/powerpc/soft-fp/soft-supp.h: Moved to ../nofpu. * sysdeps/powerpc/soft-fp/Versions (libc: GLIBC_2.3.2): Moved to ... * sysdeps/powerpc/nofpu/Versions: ... here, new file. --- sysdeps/powerpc/nofpu/Makefile | 9 +++++++++ sysdeps/powerpc/nofpu/Versions | 13 +++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 sysdeps/powerpc/nofpu/Makefile create mode 100644 sysdeps/powerpc/nofpu/Versions diff --git a/sysdeps/powerpc/nofpu/Makefile b/sysdeps/powerpc/nofpu/Makefile new file mode 100644 index 0000000000..f85cb0b7a3 --- /dev/null +++ b/sysdeps/powerpc/nofpu/Makefile @@ -0,0 +1,9 @@ +# Makefile fragment for PowerPC with no FPU. + +ifeq ($(subdir),soft-fp) +sysdep_routines += $(gcc-single-routines) $(gcc-double-routines) sim-full +endif + +ifeq ($(subdir),math) +libm-support += fenv_const fe_nomask +endif diff --git a/sysdeps/powerpc/nofpu/Versions b/sysdeps/powerpc/nofpu/Versions new file mode 100644 index 0000000000..4103db50bf --- /dev/null +++ b/sysdeps/powerpc/nofpu/Versions @@ -0,0 +1,13 @@ +libc { + GLIBC_2.3.2 { + __sim_exceptions; __sim_disabled_exceptions; __sim_round_mode; + __adddf3; __addsf3; __divdf3; __divsf3; __eqdf2; __eqsf2; + __extendsfdf2; __fixdfdi; __fixdfsi; __fixsfdi; __fixsfsi; + __fixtfdi; __fixtfsi; + __fixunsdfdi; __fixunsdfsi; __fixunssfdi; __fixunssfsi; + __floatdidf; __floatdisf; __floatsidf; __floatsisf; + __gedf2; __gesf2; __ledf2; __lesf2; __muldf3; __mulsf3; + __negdf2; __negsf2; __sqrtdf2; __sqrtsf2; __subdf3; + __subsf3; __truncdfsf2; __trunctfsf2; + } +} From 69211cccc68e9dc10476e1ed3486688857deb818 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 19 Oct 2002 20:03:50 +0000 Subject: [PATCH 2934/4487] 2002-10-19 Roland McGrath * configure: Regenerated (using Autoconf 2.54). * sysdeps/alpha/elf/configure: Likewise. * sysdeps/generic/configure: Likewise. * sysdeps/i386/elf/configure: Likewise. * sysdeps/ia64/elf/configure: Likewise. * sysdeps/mach/hurd/configure: Likewise. * sysdeps/mach/configure: Likewise. * sysdeps/unix/configure: Likewise. * sysdeps/unix/common/configure: Likewise. * sysdeps/unix/sysv/aix/configure: Likewise. * sysdeps/unix/sysv/linux/configure: Likewise. * sysdeps/unix/sysv/linux/mips/configure: Likewise. * sysdeps/x86_64/elf/configure: Likewise. --- sysdeps/alpha/elf/configure | 47 ++++++++++++-------- sysdeps/unix/sysv/aix/configure | 1 + sysdeps/unix/sysv/linux/mips/configure | 61 +++++++++++++++----------- 3 files changed, 66 insertions(+), 43 deletions(-) diff --git a/sysdeps/alpha/elf/configure b/sysdeps/alpha/elf/configure index 3ca6793758..ea99e35416 100644 --- a/sysdeps/alpha/elf/configure +++ b/sysdeps/alpha/elf/configure @@ -1,12 +1,13 @@ +# This file is generated from configure.in by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/alpha/elf. if test "$usetls" != no; then # Check for support of thread-local storage handling in assembler and # linker. -echo $ac_n "checking for Alpha TLS support""... $ac_c" 1>&6 -echo "configure:8: checking for Alpha TLS support" >&5 -if eval "test \"`echo '$''{'libc_cv_alpha_tls'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for Alpha TLS support" >&5 +echo $ECHO_N "checking for Alpha TLS support... $ECHO_C" >&6 +if test "${libc_cv_alpha_tls+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat > conftest.s <<\EOF .section ".tdata", "awT", @progbits @@ -42,27 +43,32 @@ baz: lda $16, m($16) !tprello lda $16, n($31) !tprel EOF -if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:46: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then +if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then libc_cv_alpha_tls=yes else libc_cv_alpha_tls=no fi rm -f conftest* fi - -echo "$ac_t""$libc_cv_alpha_tls" 1>&6 +echo "$as_me:$LINENO: result: $libc_cv_alpha_tls" >&5 +echo "${ECHO_T}$libc_cv_alpha_tls" >&6 if test $libc_cv_alpha_tls = yes; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_TLS_SUPPORT 1 -EOF +_ACEOF fi fi -echo $ac_n "checking for GP relative module local relocs""... $ac_c" 1>&6 -echo "configure:64: checking for GP relative module local relocs" >&5 -if eval "test \"`echo '$''{'libc_cv_alpha_hidden_gprel'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for GP relative module local relocs" >&5 +echo $ECHO_N "checking for GP relative module local relocs... $ECHO_C" >&6 +if test "${libc_cv_alpha_hidden_gprel+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat > conftest.c <<\EOF static int bar; @@ -75,7 +81,12 @@ int foo (void) EOF libc_cv_alpha_hidden_gprel=no -if { ac_try='${CC-cc} -S $CFLAGS -O2 -fpic conftest.c 1>&5'; { (eval echo configure:79: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then +if { ac_try='${CC-cc} -S $CFLAGS -O2 -fpic conftest.c 1>&5' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then if grep -q 'bar.*!gprel' conftest.s \ && grep -q 'baz.*!gprel' conftest.s \ && ! grep -q 'bar.*!literal' conftest.s \ @@ -85,11 +96,11 @@ if { ac_try='${CC-cc} -S $CFLAGS -O2 -fpic conftest.c 1>&5'; { (eval echo config fi rm -f conftest* fi - -echo "$ac_t""$libc_cv_alpha_hidden_gprel" 1>&6 +echo "$as_me:$LINENO: result: $libc_cv_alpha_hidden_gprel" >&5 +echo "${ECHO_T}$libc_cv_alpha_hidden_gprel" >&6 if test $libc_cv_alpha_hidden_gprel = yes; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define PI_STATIC_AND_HIDDEN 1 -EOF +_ACEOF fi diff --git a/sysdeps/unix/sysv/aix/configure b/sysdeps/unix/sysv/aix/configure index fa4a6c987c..2c07b415f6 100644 --- a/sysdeps/unix/sysv/aix/configure +++ b/sysdeps/unix/sysv/aix/configure @@ -1,3 +1,4 @@ +# This file is generated from configure.in by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/unix/sysv/aix. # Don't bother trying to generate any glue code to be compatible with the diff --git a/sysdeps/unix/sysv/linux/mips/configure b/sysdeps/unix/sysv/linux/mips/configure index fb71310a1f..bd173ef39d 100644 --- a/sysdeps/unix/sysv/linux/mips/configure +++ b/sysdeps/unix/sysv/linux/mips/configure @@ -1,45 +1,52 @@ +# This file is generated from configure.in by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/unix/sysv/linux/mips. for ac_prog in $AS do -# Extract the first word of "$ac_prog", so it can be a program name with args. + # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:9: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_AS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AS"; then ac_cv_prog_AS="$AS" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_AS="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AS="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + fi fi -AS="$ac_cv_prog_AS" +AS=$ac_cv_prog_AS if test -n "$AS"; then - echo "$ac_t""$AS" 1>&6 + echo "$as_me:$LINENO: result: $AS" >&5 +echo "${ECHO_T}$AS" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -test -n "$AS" && break + test -n "$AS" && break done if test -z "$AS"; then ac_verc_fail=yes else # Found it, now check the version. - echo $ac_n "checking version of $AS""... $ac_c" 1>&6 -echo "configure:43: checking version of $AS" >&5 + echo "$as_me:$LINENO: checking version of $AS" >&5 +echo $ECHO_N "checking version of $AS... $ECHO_C" >&6 ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\(-ia64-[0-9]*\)*\).*$/\1/p'` case $ac_prog_version in '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; @@ -48,11 +55,15 @@ echo "configure:43: checking version of $AS" >&5 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; esac - echo "$ac_t""$ac_prog_version" 1>&6 + echo "$as_me:$LINENO: result: $ac_prog_version" >&5 +echo "${ECHO_T}$ac_prog_version" >&6 fi if test $ac_verc_fail = yes; then - echo "configure: warning: *** Your binutils versions are too old. -*** We strongly advise to update binutils. For details check -*** the FAQ and INSTALL documents." 1>&2 + { echo "$as_me:$LINENO: WARNING: *** Your binutils versions are too old. +*** We strongly advise to update binutils. For details check +*** the FAQ and INSTALL documents." >&5 +echo "$as_me: WARNING: *** Your binutils versions are too old. +*** We strongly advise to update binutils. For details check +*** the FAQ and INSTALL documents." >&2;} fi From 10fdbe1a5b3131878a182c2f1005cea20fee1a04 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 19 Oct 2002 20:06:29 +0000 Subject: [PATCH 2935/4487] 2002-10-19 Roland McGrath * config.make.in: Nix completely-soft nonsense. * configure.in: Likewise. Under --without-fp, use nofpu subdirectory of machine directories instead of fpu subdirectory. * sysdeps/powerpc/soft-fp/Makefile: Remove cruft added in last change. * sysdeps/powerpc/nofpu/Makefile: Put it in this new file instead. * sysdeps/powerpc/soft-fp/sim-full.c: Moved to ... * sysdeps/powerpc/nofpu/sim-full.c: ... here. * sysdeps/powerpc/soft-fp/fraiseexcpt.c: Moved to ... * sysdeps/powerpc/nofpu/fraiseexcpt.c: ... here. * sysdeps/powerpc/soft-fp/fegetexcept.c: Moved to ... * sysdeps/powerpc/nofpu/fegetexcept.c: ... here. * sysdeps/powerpc/soft-fp/fclrexcpt.c: Moved to ... * sysdeps/powerpc/nofpu/fclrexcpt.c: ... here. * sysdeps/powerpc/soft-fp/ftestexcept.c: Moved to ... * sysdeps/powerpc/nofpu/ftestexcept.c: ... here. * sysdeps/powerpc/soft-fp/fgetexcptflg.c: Moved to ... * sysdeps/powerpc/nofpu/fgetexcptflg.c: ... here. * sysdeps/powerpc/soft-fp/fsetexcptflg.c: Moved to ... * sysdeps/powerpc/nofpu/fsetexcptflg.c: ... here. * sysdeps/powerpc/soft-fp/fedisblxcpt.c: Moved to ... * sysdeps/powerpc/nofpu/fedisblxcpt.c: ... here. * sysdeps/powerpc/soft-fp/feenablxcpt.c: Moved to ... * sysdeps/powerpc/nofpu/feenablxcpt.c: ... here. * sysdeps/powerpc/soft-fp/fegetenv.c: Moved to ... * sysdeps/powerpc/nofpu/fegetenv.c: ... here. * sysdeps/powerpc/soft-fp/fesetenv.c: Moved to ... * sysdeps/powerpc/nofpu/fesetenv.c: ... here. * sysdeps/powerpc/soft-fp/fegetround.c: Moved to ... * sysdeps/powerpc/nofpu/fegetround.c: ... here. * sysdeps/powerpc/soft-fp/fesetround.c: Moved to ... * sysdeps/powerpc/nofpu/fesetround.c: ... here. * sysdeps/powerpc/soft-fp/feupdateenv.c: Moved to ... * sysdeps/powerpc/nofpu/feupdateenv.c: ... here. * sysdeps/powerpc/soft-fp/feholdexcpt.c: Moved to ... * sysdeps/powerpc/nofpu/feholdexcpt.c: ... here. * sysdeps/powerpc/soft-fp/fenv_const.c: Moved to ... * sysdeps/powerpc/nofpu/fenv_const.c: ... here. * sysdeps/powerpc/soft-fp/libm-test-ulps: Moved to ... * sysdeps/powerpc/nofpu/libm-test-ulps: ... here. * sysdeps/powerpc/soft-fp/soft-supp.h: Moved to ... * sysdeps/powerpc/nofpu/soft-supp.h: ... here. * sysdeps/powerpc/soft-fp/Versions (libc: GLIBC_2.3.2): Moved to ... * sysdeps/powerpc/nofpu/Versions: ... here, new file. --- sysdeps/powerpc/nofpu/fclrexcpt.c | 37 ++ sysdeps/powerpc/nofpu/fedisblxcpt.c | 33 + sysdeps/powerpc/nofpu/feenablxcpt.c | 33 + sysdeps/powerpc/nofpu/fegetenv.c | 49 ++ sysdeps/powerpc/nofpu/fegetexcept.c | 28 + sysdeps/powerpc/nofpu/fegetround.c | 29 + sysdeps/powerpc/nofpu/feholdexcpt.c | 43 ++ sysdeps/powerpc/nofpu/fenv_const.c | 35 ++ sysdeps/powerpc/nofpu/fesetenv.c | 48 ++ sysdeps/powerpc/nofpu/fesetround.c | 33 + sysdeps/powerpc/nofpu/feupdateenv.c | 50 ++ sysdeps/powerpc/nofpu/fgetexcptflg.c | 38 ++ sysdeps/powerpc/nofpu/fraiseexcpt.c | 46 ++ sysdeps/powerpc/nofpu/fsetexcptflg.c | 40 ++ sysdeps/powerpc/nofpu/ftestexcept.c | 28 + sysdeps/powerpc/nofpu/libm-test-ulps | 890 +++++++++++++++++++++++++++ sysdeps/powerpc/nofpu/sim-full.c | 42 ++ sysdeps/powerpc/nofpu/soft-supp.h | 33 + 18 files changed, 1535 insertions(+) create mode 100644 sysdeps/powerpc/nofpu/fclrexcpt.c create mode 100644 sysdeps/powerpc/nofpu/fedisblxcpt.c create mode 100644 sysdeps/powerpc/nofpu/feenablxcpt.c create mode 100644 sysdeps/powerpc/nofpu/fegetenv.c create mode 100644 sysdeps/powerpc/nofpu/fegetexcept.c create mode 100644 sysdeps/powerpc/nofpu/fegetround.c create mode 100644 sysdeps/powerpc/nofpu/feholdexcpt.c create mode 100644 sysdeps/powerpc/nofpu/fenv_const.c create mode 100644 sysdeps/powerpc/nofpu/fesetenv.c create mode 100644 sysdeps/powerpc/nofpu/fesetround.c create mode 100644 sysdeps/powerpc/nofpu/feupdateenv.c create mode 100644 sysdeps/powerpc/nofpu/fgetexcptflg.c create mode 100644 sysdeps/powerpc/nofpu/fraiseexcpt.c create mode 100644 sysdeps/powerpc/nofpu/fsetexcptflg.c create mode 100644 sysdeps/powerpc/nofpu/ftestexcept.c create mode 100644 sysdeps/powerpc/nofpu/libm-test-ulps create mode 100644 sysdeps/powerpc/nofpu/sim-full.c create mode 100644 sysdeps/powerpc/nofpu/soft-supp.h diff --git a/sysdeps/powerpc/nofpu/fclrexcpt.c b/sysdeps/powerpc/nofpu/fclrexcpt.c new file mode 100644 index 0000000000..16e96baeaf --- /dev/null +++ b/sysdeps/powerpc/nofpu/fclrexcpt.c @@ -0,0 +1,37 @@ +/* Clear floating-point exceptions (soft-float edition). + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Aldy Hernandez , 2002. + 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. */ + +#include "soft-fp.h" +#include "soft-supp.h" + +int +__feclearexcept (int x) +{ + __sim_exceptions &= ~x; + return 0; +} + +#include +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) +strong_alias (__feclearexcept, __old_feclearexcept) +compat_symbol (libm, __old_feclearexcept, feclearexcept, GLIBC_2_1); +#endif + +versioned_symbol (libm, __feclearexcept, feclearexcept, GLIBC_2_2); diff --git a/sysdeps/powerpc/nofpu/fedisblxcpt.c b/sysdeps/powerpc/nofpu/fedisblxcpt.c new file mode 100644 index 0000000000..3d8dd4462f --- /dev/null +++ b/sysdeps/powerpc/nofpu/fedisblxcpt.c @@ -0,0 +1,33 @@ +/* Disable exceptions (soft-float edition). + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Aldy Hernandez , 2002. + 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. */ + +#include "soft-fp.h" +#include "soft-supp.h" +#include + +int +fedisableexcept (int x) +{ + int old_exceptions = ~__sim_disabled_exceptions & FE_ALL_EXCEPT; + + __sim_disabled_exceptions |= x; + + return old_exceptions; +} diff --git a/sysdeps/powerpc/nofpu/feenablxcpt.c b/sysdeps/powerpc/nofpu/feenablxcpt.c new file mode 100644 index 0000000000..060e450590 --- /dev/null +++ b/sysdeps/powerpc/nofpu/feenablxcpt.c @@ -0,0 +1,33 @@ +/* Enable exceptions (soft-float edition). + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Aldy Hernandez , 2002. + 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. */ + +#include + +extern int __sim_disabled_exceptions; + +int +feenableexcept (int exceptions) +{ + int old_exceptions = ~__sim_disabled_exceptions & FE_ALL_EXCEPT; + + __sim_disabled_exceptions &= ~exceptions; + + return old_exceptions; +} diff --git a/sysdeps/powerpc/nofpu/fegetenv.c b/sysdeps/powerpc/nofpu/fegetenv.c new file mode 100644 index 0000000000..3cc8b13dac --- /dev/null +++ b/sysdeps/powerpc/nofpu/fegetenv.c @@ -0,0 +1,49 @@ +/* Store current floating-point environment (soft-float edition). + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Aldy Hernandez , 2002. + 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. */ + +#include "soft-fp.h" +#include "soft-supp.h" +#include + +extern int __sim_exceptions; +extern int __sim_disabled_exceptions; +extern int __sim_round_mode; + +int +__fegetenv (fenv_t *envp) +{ + fenv_union_t u; + + u.l[0] = __sim_exceptions; + u.l[0] |= __sim_round_mode; + u.l[1] = __sim_disabled_exceptions; + + *envp = u.fenv; + + return 0; +} + +#include +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) +strong_alias (__fegetenv, __old_fegetenv) +compat_symbol (libm, BP_SYM (__old_fegetenv), BP_SYM (fegetenv), GLIBC_2_1); +#endif + +versioned_symbol (libm, BP_SYM (__fegetenv), BP_SYM (fegetenv), GLIBC_2_2); diff --git a/sysdeps/powerpc/nofpu/fegetexcept.c b/sysdeps/powerpc/nofpu/fegetexcept.c new file mode 100644 index 0000000000..0a47a09ac0 --- /dev/null +++ b/sysdeps/powerpc/nofpu/fegetexcept.c @@ -0,0 +1,28 @@ +/* Get floating-point exceptions (soft-float edition). + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Aldy Hernandez , 2002. + 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. */ + +#include "soft-fp.h" +#include "soft-supp.h" + +int +fegetexcept (void) +{ + return (__sim_disabled_exceptions ^ FE_ALL_EXCEPT) & FE_ALL_EXCEPT; +} diff --git a/sysdeps/powerpc/nofpu/fegetround.c b/sysdeps/powerpc/nofpu/fegetround.c new file mode 100644 index 0000000000..0d01e4411f --- /dev/null +++ b/sysdeps/powerpc/nofpu/fegetround.c @@ -0,0 +1,29 @@ +/* Return current rounding mode (soft-float edition). + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Aldy Hernandez , 2002. + 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. */ + +#include "soft-fp.h" +#include "soft-supp.h" + +#undef fegetround +int +fegetround (void) +{ + return __sim_round_mode; +} diff --git a/sysdeps/powerpc/nofpu/feholdexcpt.c b/sysdeps/powerpc/nofpu/feholdexcpt.c new file mode 100644 index 0000000000..786c691a4b --- /dev/null +++ b/sysdeps/powerpc/nofpu/feholdexcpt.c @@ -0,0 +1,43 @@ +/* Store current floating-point environment and clear exceptions + (soft-float edition). + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Aldy Hernandez , 2002. + 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. */ + +#include "soft-fp.h" +#include "soft-supp.h" + +int +feholdexcept (fenv_t *envp) +{ + fenv_union_t u; + + /* Get the current state. */ + fegetenv (envp); + + u.fenv = *envp; + /* Clear everything except the rounding mode. */ + u.l[0] &= 0x3; + + /* ?? Should we clear the disabled exceptions as well ?? */ + + /* Put the new state in effect. */ + fesetenv (envp); + + return 0; +} diff --git a/sysdeps/powerpc/nofpu/fenv_const.c b/sysdeps/powerpc/nofpu/fenv_const.c new file mode 100644 index 0000000000..7dc2e817c8 --- /dev/null +++ b/sysdeps/powerpc/nofpu/fenv_const.c @@ -0,0 +1,35 @@ +/* Constants for fenv_bits.h (soft float edition). + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Aldy Hernandez , 2002. + 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. */ + +/* We want to specify the bit pattern of the __fe_*_env constants, so + pretend they're really `long long' instead of `double'. */ + +/* If the default argument is used we use this value. Disable all + signalling exceptions as default. */ +const unsigned long long __fe_dfl_env __attribute__ ((aligned (8))) = +0x000000003e000000ULL; + +/* Floating-point environment where none of the exceptions are masked. */ +const unsigned long long __fe_enabled_env __attribute__ ((aligned (8))) = +0xfff80000000000f8ULL; + +/* Floating-point environment with the NI bit set. */ +const unsigned long long __fe_nonieee_env __attribute__ ((aligned (8))) = +0xfff8000000000004ULL; diff --git a/sysdeps/powerpc/nofpu/fesetenv.c b/sysdeps/powerpc/nofpu/fesetenv.c new file mode 100644 index 0000000000..43d03a45e2 --- /dev/null +++ b/sysdeps/powerpc/nofpu/fesetenv.c @@ -0,0 +1,48 @@ +/* Set floating point environment (soft-float edition). + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Aldy Hernandez , 2002. + 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. */ + +#include "soft-fp.h" +#include "soft-supp.h" +#include + +extern int __sim_exceptions attribute_hidden; +extern int __sim_disabled_exceptions attribute_hidden; +extern int __sim_round_mode attribute_hidden; + +int +__fesetenv (const fenv_t *envp) +{ + fenv_union_t u; + + u.fenv = *envp; + __sim_exceptions = u.l[0] & FE_ALL_EXCEPT; + __sim_round_mode = u.l[0] & 0x3; + __sim_disabled_exceptions = u.l[1]; + return 0; +} + +#include +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) +strong_alias (__fesetenv, __old_fesetenv) +compat_symbol (libm, BP_SYM (__old_fesetenv), BP_SYM (fesetenv), GLIBC_2_1); +#endif + +libm_hidden_ver (__fesetenv, fesetenv) +versioned_symbol (libm, BP_SYM (__fesetenv), BP_SYM (fesetenv), GLIBC_2_2); diff --git a/sysdeps/powerpc/nofpu/fesetround.c b/sysdeps/powerpc/nofpu/fesetround.c new file mode 100644 index 0000000000..842614a974 --- /dev/null +++ b/sysdeps/powerpc/nofpu/fesetround.c @@ -0,0 +1,33 @@ +/* Set rounding mode (soft-float edition). + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Aldy Hernandez , 2002. + 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. */ + +#include "soft-fp.h" +#include "soft-supp.h" + +int +fesetround (int round) +{ + if ((unsigned int) round > FE_DOWNWARD) + return 1; + + __sim_round_mode = round; + + return 0; +} diff --git a/sysdeps/powerpc/nofpu/feupdateenv.c b/sysdeps/powerpc/nofpu/feupdateenv.c new file mode 100644 index 0000000000..5073776e7d --- /dev/null +++ b/sysdeps/powerpc/nofpu/feupdateenv.c @@ -0,0 +1,50 @@ +/* Install given floating-point environment and raise exceptions + (soft-float edition). + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Aldy Hernandez , 2002. + 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. */ + +#include "soft-fp.h" +#include "soft-supp.h" +#include + +int +__feupdateenv (const fenv_t *envp) +{ + fenv_union_t u; + int saved_exceptions; + + /* Save currently set exceptions. */ + saved_exceptions = __sim_exceptions; + + /* Set environment. */ + fesetenv (envp); + + /* Raise old exceptions. */ + __sim_exceptions |= saved_exceptions; + + return 0; +} + +#include +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) +strong_alias (__feupdateenv, __old_feupdateenv) +compat_symbol (libm, BP_SYM (__old_feupdateenv), BP_SYM (feupdateenv), GLIBC_2_1); +#endif + +versioned_symbol (libm, BP_SYM (__feupdateenv), BP_SYM (feupdateenv), GLIBC_2_2); diff --git a/sysdeps/powerpc/nofpu/fgetexcptflg.c b/sysdeps/powerpc/nofpu/fgetexcptflg.c new file mode 100644 index 0000000000..9d4f078d23 --- /dev/null +++ b/sysdeps/powerpc/nofpu/fgetexcptflg.c @@ -0,0 +1,38 @@ +/* Store current representation for exceptions (soft-float edition). + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Aldy Hernandez , 2002. + 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. */ + +#include "soft-fp.h" +#include "soft-supp.h" +#include + +__fegetexceptflag (fexcept_t *flagp, int excepts) +{ + *flagp = (fexcept_t) __sim_exceptions; + + return 0; +} + +#include +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) +strong_alias (__fegetexceptflag, __old_fegetexceptflag) +compat_symbol (libm, BP_SYM (__old_fegetexceptflag), BP_SYM (fegetexceptflag), GLIBC_2_1); +#endif + +versioned_symbol (libm, BP_SYM (__fegetexceptflag), BP_SYM (fegetexceptflag), GLIBC_2_2); diff --git a/sysdeps/powerpc/nofpu/fraiseexcpt.c b/sysdeps/powerpc/nofpu/fraiseexcpt.c new file mode 100644 index 0000000000..cd915027e1 --- /dev/null +++ b/sysdeps/powerpc/nofpu/fraiseexcpt.c @@ -0,0 +1,46 @@ +/* Raise given exceptions (soft-float edition). + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Aldy Hernandez , 2002. + 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. */ + +#include "soft-fp.h" +#include "soft-supp.h" +#include +#include + +#undef feraiseexcept +int +__feraiseexcept (int x) +{ + __sim_exceptions |= x; + if (x == 0 || __sim_disabled_exceptions & x) + /* Ignore exception. */ + ; + else + raise (SIGFPE); + return 0; +} + +#include +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) +strong_alias (__feraiseexcept, __old_feraiseexcept) +compat_symbol (libm, BP_SYM (__old_feraiseexcept), BP_SYM (feraiseexcept), GLIBC_2_1); +#endif + +libm_hidden_ver (__feraiseexcept, feraiseexcept) +versioned_symbol (libm, BP_SYM (__feraiseexcept), BP_SYM (feraiseexcept), GLIBC_2_2); diff --git a/sysdeps/powerpc/nofpu/fsetexcptflg.c b/sysdeps/powerpc/nofpu/fsetexcptflg.c new file mode 100644 index 0000000000..85fd88f01f --- /dev/null +++ b/sysdeps/powerpc/nofpu/fsetexcptflg.c @@ -0,0 +1,40 @@ +/* Set floating-point environment exception handling (soft-float edition). + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Aldy Hernandez , 2002. + 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. */ + +#include "soft-fp.h" +#include "soft-supp.h" +#include + +int +__fesetexceptflag(const fexcept_t *flagp, int excepts) +{ + /* Ignore exceptions not listed in 'excepts'. */ + __sim_exceptions = *flagp & excepts; + + return 0; +} + +#include +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) +strong_alias (__fesetexceptflag, __old_fesetexceptflag) +compat_symbol (libm, BP_SYM (__old_fesetexceptflag), BP_SYM (fesetexceptflag), GLIBC_2_1); +#endif + +versioned_symbol (libm, BP_SYM (__fesetexceptflag), BP_SYM (fesetexceptflag), GLIBC_2_2); diff --git a/sysdeps/powerpc/nofpu/ftestexcept.c b/sysdeps/powerpc/nofpu/ftestexcept.c new file mode 100644 index 0000000000..ce8044fe0a --- /dev/null +++ b/sysdeps/powerpc/nofpu/ftestexcept.c @@ -0,0 +1,28 @@ +/* Test floating-point exceptions (soft-float edition). + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Aldy Hernandez , 2002. + 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. */ + +#include "soft-fp.h" +#include "soft-supp.h" + +int +fetestexcept (int x) +{ + return __sim_exceptions & x; +} diff --git a/sysdeps/powerpc/nofpu/libm-test-ulps b/sysdeps/powerpc/nofpu/libm-test-ulps new file mode 100644 index 0000000000..e2091f8a15 --- /dev/null +++ b/sysdeps/powerpc/nofpu/libm-test-ulps @@ -0,0 +1,890 @@ +# Begin of automatic generation + +# atan2 +Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025": +float: 3 +ifloat: 3 +Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025": +float: 3 +ifloat: 3 +Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772": +float: 1 +ifloat: 1 + +# atanh +Test "atanh (0.75) == 0.972955074527656652552676371721589865": +float: 1 +ifloat: 1 + +# cacosh +Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i": +double: 1 +float: 7 +idouble: 1 +ifloat: 7 +Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i": +double: 1 +float: 3 +idouble: 1 +ifloat: 3 + +# casin +Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# casinh +Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": +double: 5 +float: 1 +idouble: 5 +ifloat: 1 +Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": +double: 3 +float: 6 +idouble: 3 +ifloat: 6 +Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# catan +Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": +float: 3 +ifloat: 3 +Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: catan (0.75 + 1.25 i) == 1.10714871779409050301706546017853704 + 0.549306144334054845697622618461262852 i": +float: 4 +ifloat: 4 + +# catanh +Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": +double: 4 +idouble: 4 +Test "Imaginary part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": +float: 4 +ifloat: 4 +Test "Real part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i": +double: 1 +idouble: 1 +Test "Imaginary part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i": +float: 6 +ifloat: 6 + +# cbrt +Test "cbrt (-27.0) == -3.0": +double: 1 +idouble: 1 +Test "cbrt (0.75) == 0.908560296416069829445605878163630251": +double: 1 +idouble: 1 +Test "cbrt (0.9921875) == 0.997389022060725270579075195353955217": +double: 1 +idouble: 1 + +# ccos +Test "Imaginary part of: ccos (-2 - 3 i) == -4.1896256909688072301 - 9.1092278937553365979 i": +float: 1 +ifloat: 1 +Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": +float: 1 +ifloat: 1 + +# ccosh +Test "Real part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i": +float: 1 +ifloat: 1 +Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": +float: 1 +ifloat: 1 + +# cexp +Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": +float: 1 +ifloat: 1 +Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": +float: 1 +ifloat: 1 + +# clog +Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i": +float: 3 +ifloat: 3 +Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i": +float: 1 +ifloat: 1 + +# clog10 +Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-2 - 3 i) == 0.5569716761534183846 - 0.9375544629863747085 i": +double: 1 +float: 5 +idouble: 1 +ifloat: 5 +Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i": +float: 1 +ifloat: 1 + +# cos +Test "cos (M_PI_6l * 2.0) == 0.5": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "cos (M_PI_6l * 4.0) == -0.5": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "cos (pi/2) == 0": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# cpow +Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": +float: 1 +ifloat: 1 +Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i": +double: 1 +float: 4 +idouble: 1 +ifloat: 4 +Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i": +double: 2 +float: 3 +idouble: 2 +ifloat: 3 +Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": +double: 1 +float: 4 +idouble: 1 +ifloat: 4 +Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": +float: 2 +ifloat: 2 +Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + +# csinh +Test "Imaginary part of: csinh (-2 - 3 i) == 3.5905645899857799520 - 0.5309210862485198052 i": +double: 1 +idouble: 1 +Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": +float: 1 +ifloat: 1 + +# csqrt +Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": +float: 1 +ifloat: 1 +Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i": +float: 1 +ifloat: 1 + +# ctan +Test "Real part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i": +double: 1 +idouble: 1 + +# ctanh +Test "Real part of: ctanh (-2 - 3 i) == -0.9653858790221331242 + 0.0098843750383224937 i": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i": +float: 1 +ifloat: 1 +Test "Real part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i": +double: 1 +idouble: 1 + +# erf +Test "erf (1.25) == 0.922900128256458230136523481197281140": +double: 1 +idouble: 1 + +# erfc +Test "erfc (2.0) == 0.00467773498104726583793074363274707139": +double: 1 +idouble: 1 +Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8": +double: 1 +idouble: 1 + +# exp10 +Test "exp10 (-1) == 0.1": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "exp10 (0.75) == 5.62341325190349080394951039776481231": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "exp10 (3) == 1000": +double: 6 +float: 2 +idouble: 6 +ifloat: 2 + +# expm1 +Test "expm1 (0.75) == 1.11700001661267466854536981983709561": +double: 1 +idouble: 1 +Test "expm1 (1) == M_El - 1.0": +float: 1 +ifloat: 1 + +# hypot +Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 + +# j0 +Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "j0 (0.75) == 0.864242275166648623555731103820923211": +float: 1 +ifloat: 1 +Test "j0 (10.0) == -0.245935764451348335197760862485328754": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "j0 (2.0) == 0.223890779141235668051827454649948626": +float: 2 +ifloat: 2 +Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "j0 (8.0) == 0.171650807137553906090869407851972001": +float: 1 +ifloat: 1 + +# j1 +Test "j1 (10.0) == 0.0434727461688614366697487680258592883": +float: 2 +ifloat: 2 +Test "j1 (2.0) == 0.576724807756873387202448242269137087": +double: 1 +idouble: 1 +Test "j1 (8.0) == 0.234636346853914624381276651590454612": +double: 1 +idouble: 1 + +# jn +Test "jn (0, -4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (0, 0.75) == 0.864242275166648623555731103820923211": +float: 1 +ifloat: 1 +Test "jn (0, 10.0) == -0.245935764451348335197760862485328754": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "jn (0, 2.0) == 0.223890779141235668051827454649948626": +float: 2 +ifloat: 2 +Test "jn (0, 4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (0, 8.0) == 0.171650807137553906090869407851972001": +float: 1 +ifloat: 1 +Test "jn (1, 10.0) == 0.0434727461688614366697487680258592883": +float: 2 +ifloat: 2 +Test "jn (1, 2.0) == 0.576724807756873387202448242269137087": +double: 1 +idouble: 1 +Test "jn (1, 8.0) == 0.234636346853914624381276651590454612": +double: 1 +idouble: 1 +Test "jn (10, 0.125) == 0.250543369809369890173993791865771547e-18": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (10, 0.75) == 0.149621713117596814698712483621682835e-10": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (10, 10.0) == 0.207486106633358857697278723518753428": +double: 4 +float: 3 +idouble: 4 +ifloat: 3 +Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6": +float: 4 +ifloat: 4 +Test "jn (3, 0.125) == 0.406503832554912875023029337653442868e-4": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (3, 0.75) == 0.848438342327410884392755236884386804e-2": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (3, 10.0) == 0.0583793793051868123429354784103409563": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "jn (3, 2.0) == 0.128943249474402051098793332969239835": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +# lgamma +Test "lgamma (0.7) == 0.26086724653166651439": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "lgamma (1.2) == -0.853740900033158497197e-1": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +# log10 +Test "log10 (0.75) == -0.124938736608299953132449886193870744": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +Test "log10 (e) == log10(e)": +float: 1 +ifloat: 1 + +# log1p +Test "log1p (-0.25) == -0.287682072451780927439219005993827432": +float: 1 +ifloat: 1 + +# sincos +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res": +float: 1 +ifloat: 1 + +# tan +Test "tan (pi/4) == 1": +double: 1 +idouble: 1 + +# tgamma +Test "tgamma (-0.5) == -2 sqrt (pi)": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "tgamma (0.5) == sqrt (pi)": +float: 1 +ifloat: 1 +Test "tgamma (0.7) == 1.29805533264755778568": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# y0 +Test "y0 (1.0) == 0.0882569642156769579829267660235151628": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "y0 (1.5) == 0.382448923797758843955068554978089862": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "y0 (10.0) == 0.0556711672835993914244598774101900481": +float: 1 +ifloat: 1 +Test "y0 (8.0) == 0.223521489387566220527323400498620359": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# y1 +Test "y1 (0.125) == -5.19993611253477499595928744876579921": +double: 1 +idouble: 1 +Test "y1 (1.5) == -0.412308626973911295952829820633445323": +float: 1 +ifloat: 1 +Test "y1 (10.0) == 0.249015424206953883923283474663222803": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "y1 (2.0) == -0.107032431540937546888370772277476637": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "y1 (8.0) == -0.158060461731247494255555266187483550": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +# yn +Test "yn (0, 1.0) == 0.0882569642156769579829267660235151628": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "yn (0, 1.5) == 0.382448923797758843955068554978089862": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "yn (0, 10.0) == 0.0556711672835993914244598774101900481": +float: 1 +ifloat: 1 +Test "yn (0, 8.0) == 0.223521489387566220527323400498620359": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (1, 0.125) == -5.19993611253477499595928744876579921": +double: 1 +idouble: 1 +Test "yn (1, 1.5) == -0.412308626973911295952829820633445323": +float: 1 +ifloat: 1 +Test "yn (1, 10.0) == 0.249015424206953883923283474663222803": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "yn (1, 2.0) == -0.107032431540937546888370772277476637": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (1, 8.0) == -0.158060461731247494255555266187483550": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +Test "yn (10, 0.125) == -127057845771019398.252538486899753195": +double: 1 +idouble: 1 +Test "yn (10, 0.75) == -2133501638.90573424452445412893839236": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (10, 1.0) == -121618014.278689189288130426667971145": +double: 1 +idouble: 1 +Test "yn (10, 10.0) == -0.359814152183402722051986577343560609": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (10, 2.0) == -129184.542208039282635913145923304214": +double: 2 +idouble: 2 +Test "yn (3, 0.125) == -2612.69757350066712600220955744091741": +double: 1 +idouble: 1 +Test "yn (3, 0.75) == -12.9877176234475433186319774484809207": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (3, 10.0) == -0.251362657183837329779204747654240998": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (3, 2.0) == -1.12778377684042778608158395773179238": +double: 1 +idouble: 1 + +# Maximal error of functions: +Function: "atan2": +float: 3 +ifloat: 3 + +Function: "atanh": +float: 1 +ifloat: 1 + +Function: Real part of "cacosh": +double: 1 +float: 7 +idouble: 1 +ifloat: 7 + +Function: Imaginary part of "cacosh": +double: 1 +float: 3 +idouble: 1 +ifloat: 3 + +Function: Real part of "casin": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "casinh": +double: 5 +float: 1 +idouble: 5 +ifloat: 1 + +Function: Imaginary part of "casinh": +double: 3 +float: 6 +idouble: 3 +ifloat: 6 + +Function: Real part of "catan": +float: 4 +ifloat: 4 + +Function: Imaginary part of "catan": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "catanh": +double: 4 +idouble: 4 + +Function: Imaginary part of "catanh": +float: 6 +ifloat: 6 + +Function: "cbrt": +double: 1 +idouble: 1 + +Function: Real part of "ccos": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "ccos": +float: 1 +ifloat: 1 + +Function: Real part of "ccosh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "ccosh": +float: 1 +ifloat: 1 + +Function: Real part of "cexp": +float: 1 +ifloat: 1 + +Function: Imaginary part of "cexp": +float: 1 +ifloat: 1 + +Function: Real part of "clog": +float: 1 +ifloat: 1 + +Function: Imaginary part of "clog": +float: 3 +ifloat: 3 + +Function: Real part of "clog10": +float: 1 +ifloat: 1 + +Function: Imaginary part of "clog10": +double: 1 +float: 5 +idouble: 1 +ifloat: 5 + +Function: "cos": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + +Function: Real part of "cpow": +double: 2 +float: 4 +idouble: 2 +ifloat: 4 + +Function: Imaginary part of "cpow": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + +Function: Real part of "csinh": +float: 1 +ifloat: 1 + +Function: Imaginary part of "csinh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "csqrt": +float: 1 +ifloat: 1 + +Function: Real part of "ctan": +double: 1 +idouble: 1 + +Function: Imaginary part of "ctan": +double: 1 +idouble: 1 + +Function: Real part of "ctanh": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +Function: Imaginary part of "ctanh": +float: 1 +ifloat: 1 + +Function: "erf": +double: 1 +idouble: 1 + +Function: "erfc": +double: 1 +idouble: 1 + +Function: "exp10": +double: 6 +float: 2 +idouble: 6 +ifloat: 2 + +Function: "expm1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "hypot": +float: 1 +ifloat: 1 + +Function: "j0": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + +Function: "j1": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +Function: "jn": +double: 4 +float: 4 +idouble: 4 +ifloat: 4 + +Function: "lgamma": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +Function: "log10": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +Function: "log1p": +float: 1 +ifloat: 1 + +Function: "sincos": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "tan": +double: 1 +idouble: 1 + +Function: "tgamma": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "y0": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + +Function: "y1": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 + +Function: "yn": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 + +# end of automatic generation diff --git a/sysdeps/powerpc/nofpu/sim-full.c b/sysdeps/powerpc/nofpu/sim-full.c new file mode 100644 index 0000000000..9f4c96ff20 --- /dev/null +++ b/sysdeps/powerpc/nofpu/sim-full.c @@ -0,0 +1,42 @@ +/* Software floating-point exception handling emulation. + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Aldy Hernandez , 2002. + 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. */ + +#include +#include "soft-fp.h" +#include "soft-supp.h" + +/* Global to store sticky exceptions. */ +int __sim_exceptions; + +/* By default, no exceptions should trap. */ +int __sim_disabled_exceptions = 0xffffffff; + +int __sim_round_mode; + +void +__simulate_exceptions (int x) +{ + __sim_exceptions |= x; + if (x == 0 || __sim_disabled_exceptions & x) + /* Ignore exception. */ + ; + else + raise (SIGFPE); +} diff --git a/sysdeps/powerpc/nofpu/soft-supp.h b/sysdeps/powerpc/nofpu/soft-supp.h new file mode 100644 index 0000000000..e358eda5c7 --- /dev/null +++ b/sysdeps/powerpc/nofpu/soft-supp.h @@ -0,0 +1,33 @@ +/* Internal support stuff for complete soft float. + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Aldy Hernandez , 2002. + 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. */ + +#include + +typedef union +{ + fenv_t fenv; + unsigned int l[2]; +} fenv_union_t; + + +extern int __sim_exceptions attribute_hidden; +extern int __sim_disabled_exceptions attribute_hidden; +extern int __sim_round_mode attribute_hidden; +extern void __simulate_exceptions (int x) attribute_hidden; From c537c914302e8ed8f5e6618747d06a4a1464d662 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 23 Oct 2002 23:48:50 +0000 Subject: [PATCH 2936/4487] 2002-10-23 Roland McGrath Rearranged definitions to reduce duplication. * sysdeps/generic/bits/types.h: Rewritten, using macros from and new header . * posix/Makefile (headers): Add bits/typesizes.h here. * sysdeps/generic/bits/typesizes.h: New file. * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h: New file. * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h: New file. * sysdeps/mach/hurd/bits/typesizes.h: New file. * sysdeps/unix/sysv/linux/alpha/bits/types.h: File removed. * sysdeps/unix/sysv/linux/bits/types.h: File removed. * sysdeps/unix/sysv/linux/ia64/bits/types.h: File removed. * sysdeps/unix/sysv/linux/mips/bits/types.h: File removed. * sysdeps/unix/sysv/linux/s390/bits/types.h: File removed. * sysdeps/unix/sysv/linux/sparc/bits/types.h: File removed. * sysdeps/unix/sysv/linux/x86_64/bits/types.h: File removed. * posix/sys/types.h [__USE_POSIX199506 || __USE_UNIX98]: Include here, not in . * signal/signal.h: Likewise. --- sysdeps/unix/sysv/linux/alpha/bits/types.h | 115 -------------- .../unix/sysv/linux/alpha/bits/typesizes.h | 65 ++++++++ sysdeps/unix/sysv/linux/mips/bits/types.h | 145 ------------------ 3 files changed, 65 insertions(+), 260 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/alpha/bits/types.h create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/typesizes.h delete mode 100644 sysdeps/unix/sysv/linux/mips/bits/types.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h deleted file mode 100644 index 1b809e235e..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/bits/types.h +++ /dev/null @@ -1,115 +0,0 @@ -/* Copyright (C) 1991,92,1994-1999,2000,2001 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. */ - -/* - * Never include this file directly; use instead. - */ - -#ifndef _BITS_TYPES_H -#define _BITS_TYPES_H 1 - -#include - -#define __need_size_t -#include - -/* Convenience types. */ -typedef unsigned char __u_char; -typedef unsigned short int __u_short; -typedef unsigned int __u_int; -typedef unsigned long int __u_long; -typedef unsigned long int __u_quad_t; -typedef long int __quad_t; -typedef signed char __int8_t; -typedef unsigned char __uint8_t; -typedef signed short int __int16_t; -typedef unsigned short int __uint16_t; -typedef signed int __int32_t; -typedef unsigned int __uint32_t; -typedef signed long int __int64_t; -typedef unsigned long int __uint64_t; -typedef __quad_t *__qaddr_t; - -typedef __uint64_t __dev_t; /* Type of device numbers. */ -typedef __uint32_t __uid_t; /* Type of user identifications. */ -typedef __uint32_t __gid_t; /* Type of group identifications. */ -typedef __uint32_t __ino_t; /* Type of file serial numbers. */ -typedef __uint64_t __ino64_t; /* "" (LFS) */ -typedef __uint32_t __mode_t; /* Type of file attribute bitmasks. */ -typedef __uint32_t __nlink_t; /* Type of file link counts. */ -typedef __int64_t __off_t; /* Type of file sizes and offsets. */ -typedef __int64_t __off64_t; /* "" (LFS) */ -typedef __int64_t __loff_t; /* Type of file sizes and offsets. */ -typedef __int32_t __pid_t; /* Type of process identifications. */ -typedef __int64_t __ssize_t; /* Type of a byte count, or error. */ -typedef __uint64_t __rlim_t; /* Type of resource counts. */ -typedef __uint64_t __rlim64_t; /* "" (LFS) */ -typedef __uint32_t __blksize_t; /* Type to represnet block size. */ -typedef __uint32_t __blkcnt_t; /* Type to count nr disk blocks. */ -typedef __uint64_t __blkcnt64_t; /* "" (LFS) */ -typedef __int32_t __fsblkcnt_t; /* Type to count file system blocks. */ -typedef __int64_t __fsblkcnt64_t; /* "" (LFS) */ -typedef __uint32_t __fsfilcnt_t; /* Type to count file system inodes. */ -typedef __uint64_t __fsfilcnt64_t; /* "" (LFS) */ -typedef __uint32_t __id_t; /* General type for IDs. */ - -typedef struct - { - int __val[2]; - } __fsid_t; /* Type of file system IDs. */ - -/* Everythin' else. */ -typedef int __daddr_t; /* Type of a disk address. */ -typedef char *__caddr_t; /* Type of a core address. */ -typedef long int __time_t; -typedef unsigned int __useconds_t; -typedef long int __suseconds_t; -typedef long int __swblk_t; /* Type of a swap block maybe? */ -typedef long int __clock_t; -typedef int __key_t; /* Type of a SYSV IPC key. */ - -/* Clock ID used in clock and timer functions. */ -typedef int __clockid_t; - -/* Timer ID returned by `timer_create'. */ -typedef int __timer_t; - -/* Used in `struct shmid_ds'. */ -typedef int __ipc_pid_t; - -/* Number of descriptors that can fit in an `fd_set'. */ -#define __FD_SETSIZE 1024 - - -/* Used in XTI. */ -typedef long int __t_scalar_t; -typedef unsigned long int __t_uscalar_t; - -/* Duplicates info from stdint.h but this is used in unistd.h. */ -typedef long int __intptr_t; - -/* Duplicate info from sys/socket.h. */ -typedef unsigned int __socklen_t; - - -/* Now add the thread types. */ -#if defined __USE_POSIX199506 || defined __USE_UNIX98 -# include -#endif - -#endif /* bits/types.h */ diff --git a/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h b/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h new file mode 100644 index 0000000000..235acf8a2f --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h @@ -0,0 +1,65 @@ +/* bits/typesizes.h -- underlying types for *_t. Linux/Alpha version. + Copyright (C) 2002 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 directly; use instead." +#endif + +#ifndef _BITS_TYPESIZES_H +#define _BITS_TYPESIZES_H 1 + +/* See for the meaning of these macros. This file exists so + that need not vary across different GNU platforms. */ + +#define __DEV_T_TYPE __U64_TYPE +#define __UID_T_TYPE __U32_TYPE +#define __GID_T_TYPE __U32_TYPE +#define __INO_T_TYPE __U32_TYPE +#define __INO64_T_TYPE __U64_TYPE +#define __MODE_T_TYPE __U32_TYPE +#define __NLINK_T_TYPE __U32_TYPE +#define __OFF_T_TYPE __SLONGWORD_TYPE +#define __OFF64_T_TYPE __S64_TYPE +#define __PID_T_TYPE __S32_TYPE +#define __RLIM_T_TYPE __ULONGWORD_TYPE +#define __RLIM64_T_TYPE __U64_TYPE +#define __BLKCNT_T_TYPE __U32_TYPE +#define __BLKCNT64_T_TYPE __U64_TYPE +#define __FSBLKCNT_T_TYPE __S32_TYPE +#define __FSBLKCNT64_T_TYPE __S64_TYPE +#define __FSFILCNT_T_TYPE __U32_TYPE +#define __FSFILCNT64_T_TYPE __U64_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 __S64_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 __S32_TYPE +#define __BLKSIZE_T_TYPE __U32_TYPE +#define __FSID_T_TYPE struct { int __val[2]; } + +/* Number of descriptors that can fit in an `fd_set'. */ +#define __FD_SETSIZE 1024 + + +#endif /* bits/typesizes.h */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h deleted file mode 100644 index 141f0b29e4..0000000000 --- a/sysdeps/unix/sysv/linux/mips/bits/types.h +++ /dev/null @@ -1,145 +0,0 @@ -/* Copyright (C) 1991,92,1994-1999,2000,2001 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. */ - -/* - * Never include this file directly; use instead. - */ - -#ifndef _BITS_TYPES_H -#define _BITS_TYPES_H 1 - -#include - -#define __need_size_t -#include - -/* Convenience types. */ -typedef unsigned char __u_char; -typedef unsigned short __u_short; -typedef unsigned int __u_int; -typedef unsigned long __u_long; -#ifdef __GNUC__ -__extension__ typedef unsigned long long int __u_quad_t; -__extension__ typedef long long int __quad_t; -#else -typedef struct - { - long int __val[2]; - } __quad_t; -typedef struct - { - __u_long __val[2]; - } __u_quad_t; -#endif -typedef signed char __int8_t; -typedef unsigned char __uint8_t; -typedef signed short int __int16_t; -typedef unsigned short int __uint16_t; -typedef signed int __int32_t; -typedef unsigned int __uint32_t; -#ifdef __GNUC__ -__extension__ typedef signed long long int __int64_t; -__extension__ typedef unsigned long long int __uint64_t; -#endif -typedef __quad_t *__qaddr_t; - -typedef __u_quad_t __dev_t; /* Type of device numbers. */ -typedef __u_int __uid_t; /* Type of user identifications. */ -typedef __u_int __gid_t; /* Type of group identifications. */ -typedef __u_long __ino_t; /* Type of file serial numbers. */ -typedef __u_int __mode_t; /* Type of file attribute bitmasks. */ -typedef __u_int __nlink_t; /* Type of file link counts. */ -typedef long int __off_t; /* Type of file sizes and offsets. */ -typedef __quad_t __loff_t; /* Type of file sizes and offsets. */ -typedef int __pid_t; /* Type of process identifications. */ -typedef int __ssize_t; /* Type of a byte count, or error. */ -typedef __u_long __rlim_t; /* Type of resource counts. */ -typedef __u_quad_t __rlim64_t; /* Type of resource counts (LFS). */ -typedef __u_int __id_t; /* General type for ID. */ - -typedef struct - { - int __val[2]; - } __fsid_t; /* Type of file system IDs. */ - -/* Everythin' else. */ -typedef int __daddr_t; /* The type of a disk address. */ -typedef char *__caddr_t; -typedef long int __time_t; -typedef unsigned int __useconds_t; -typedef long int __suseconds_t; -typedef long int __swblk_t; /* Type of a swap block maybe? */ - -typedef long int __clock_t; - -/* Clock ID used in clock and timer functions. */ -typedef int __clockid_t; - -/* Timer ID returned by `timer_create'. */ -typedef int __timer_t; - -/* Number of descriptors that can fit in an `fd_set'. */ -#define __FD_SETSIZE 1024 - - -typedef int __key_t; - -/* Used in `struct shmid_ds'. */ -typedef long int __ipc_pid_t; - - -/* Type to represent block size. */ -typedef long int __blksize_t; - -/* Types from the Large File Support interface. */ - -/* Type to count number os disk blocks. */ -typedef long int __blkcnt_t; -typedef __quad_t __blkcnt64_t; - -/* Type to count file system blocks. */ -typedef __u_long __fsblkcnt_t; -typedef __u_quad_t __fsblkcnt64_t; - -/* Type to count file system inodes. */ -typedef __u_long __fsfilcnt_t; -typedef __u_quad_t __fsfilcnt64_t; - -/* Type of file serial numbers. */ -typedef __u_quad_t __ino64_t; - -/* Type of file sizes and offsets. */ -typedef __loff_t __off64_t; - -/* Used in XTI. */ -typedef long int __t_scalar_t; -typedef unsigned long int __t_uscalar_t; - -/* Duplicates info from stdint.h but this is used in unistd.h. */ -typedef int __intptr_t; - -/* Duplicate info from sys/socket.h. */ -typedef unsigned int __socklen_t; - - -/* Now add the thread types. */ -#if defined __USE_POSIX199506 || defined __USE_UNIX98 -# include -#endif - -#endif /* bits/types.h */ From 70c6be61653dc3c746059f7d3c2140c458750d0c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 23 Oct 2002 23:48:55 +0000 Subject: [PATCH 2937/4487] 2002-10-23 Roland McGrath * sysdeps/unix/sysv/linux/bits/statfs.h (struct statfs): Use __SWORD_TYPE instead of int for member types. (struct statfs64): Likewise. * sysdeps/unix/sysv/linux/alpha/bits/statfs.h: New file. * sysdeps/unix/sysv/linux/s390/bits/statfs.h: New file. * sysdeps/unix/sysv/linux/ia64/bits/statfs.h: File removed. * sysdeps/unix/sysv/linux/sparc/bits/statfs.h: File removed. * sysdeps/unix/sysv/linux/x86_64/bits/statfs.h: File removed. --- sysdeps/unix/sysv/linux/alpha/bits/statfs.h | 64 +++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/statfs.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/statfs.h b/sysdeps/unix/sysv/linux/alpha/bits/statfs.h new file mode 100644 index 0000000000..b8e37e6102 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/bits/statfs.h @@ -0,0 +1,64 @@ +/* Copyright (C) 1997, 1998, 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 + 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 _SYS_STATFS_H +# error "Never include directly; use instead." +#endif + +#include /* for __fsid_t and __fsblkcnt_t. */ + +struct statfs + { + int f_type; + int f_bsize; +#ifndef __USE_FILE_OFFSET64 + __fsblkcnt_t f_blocks; + __fsblkcnt_t f_bfree; + __fsblkcnt_t f_bavail; + __fsfilcnt_t f_files; + __fsfilcnt_t f_ffree; +#else + __fsblkcnt64_t f_blocks; + __fsblkcnt64_t f_bfree; + __fsblkcnt64_t f_bavail; + __fsfilcnt64_t f_files; + __fsfilcnt64_t f_ffree; +#endif + __fsid_t f_fsid; + int f_namelen; + int f_spare[6]; + }; + +#ifdef __USE_LARGEFILE64 +struct statfs64 + { + int f_type; + int f_bsize; + __fsblkcnt64_t f_blocks; + __fsblkcnt64_t f_bfree; + __fsblkcnt64_t f_bavail; + __fsfilcnt64_t f_files; + __fsfilcnt64_t f_ffree; + __fsid_t f_fsid; + int f_namelen; + int f_spare[6]; + }; +#endif + +/* Tell code we have this member. */ +#define _STATFS_F_NAMELEN From 7bee643ffff23507c0434e7342d9515871551218 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 23 Oct 2002 23:48:58 +0000 Subject: [PATCH 2938/4487] 2002-10-23 Roland McGrath * sysdeps/unix/sysv/linux/sparc/bits/statvfs.h: Moved to ... * sysdeps/unix/sysv/linux/bits/statvfs.h: ... here. (ST_NODIRATIME): Restore fixed value of 2048. * sysdeps/unix/sysv/linux/alpha/bits/statvfs.h: File removed. * sysdeps/unix/sysv/linux/ia64/bits/statvfs.h: File removed. --- sysdeps/unix/sysv/linux/alpha/bits/statvfs.h | 97 -------------------- 1 file changed, 97 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/alpha/bits/statvfs.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/statvfs.h b/sysdeps/unix/sysv/linux/alpha/bits/statvfs.h deleted file mode 100644 index 16bb895228..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/bits/statvfs.h +++ /dev/null @@ -1,97 +0,0 @@ -/* Copyright (C) 1997, 1998, 2000, 2001, 2002 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 _SYS_STATVFS_H -# error "Never include directly; use instead." -#endif - -#include /* For __fsblkcnt_t and __fsfilcnt_t. */ - -struct statvfs - { - unsigned long int f_bsize; - unsigned long int f_frsize; -#ifndef __USE_FILE_OFFSET64 - __fsblkcnt_t f_blocks; - __fsblkcnt_t f_bfree; - __fsblkcnt_t f_bavail; - __fsfilcnt_t f_files; - __fsfilcnt_t f_ffree; - __fsfilcnt_t f_favail; -#else - __fsblkcnt64_t f_blocks; - __fsblkcnt64_t f_bfree; - __fsblkcnt64_t f_bavail; - __fsfilcnt64_t f_files; - __fsfilcnt64_t f_ffree; - __fsfilcnt64_t f_favail; -#endif - unsigned long int f_fsid; - unsigned long int f_flag; - unsigned long int f_namemax; - int __f_spare[6]; - }; - -#ifdef __USE_LARGEFILE64 -struct statvfs64 - { - unsigned long int f_bsize; - unsigned long int f_frsize; - __fsblkcnt64_t f_blocks; - __fsblkcnt64_t f_bfree; - __fsblkcnt64_t f_bavail; - __fsfilcnt64_t f_files; - __fsfilcnt64_t f_ffree; - __fsfilcnt64_t f_favail; - unsigned long int f_fsid; - unsigned long int f_flag; - unsigned long int f_namemax; - int __f_spare[6]; - }; -#endif - -/* Definitions for the flag in `f_flag'. These definitions should be - kept in sync with the definitions in . */ -enum -{ - ST_RDONLY = 1, /* Mount read-only. */ -#define ST_RDONLY ST_RDONLY - ST_NOSUID = 2 /* Ignore suid and sgid bits. */ -#define ST_NOSUID ST_NOSUID -#ifdef __USE_GNU - , - ST_NODEV = 4, /* Disallow access to device special files. */ -# define ST_NODEV ST_NODEV - ST_NOEXEC = 8, /* Disallow program execution. */ -# define ST_NOEXEC ST_NOEXEC - ST_SYNCHRONOUS = 16, /* Writes are synced at once. */ -# define ST_SYNCHRONOUS ST_SYNCHRONOUS - ST_MANDLOCK = 64, /* Allow mandatory locks on an FS. */ -# define ST_MANDLOCK ST_MANDLOCK - ST_WRITE = 128, /* Write on file/directory/symlink. */ -# define ST_WRITE ST_WRITE - ST_APPEND = 256, /* Append-only file. */ -# define ST_APPEND ST_APPEND - ST_IMMUTABLE = 512, /* Immutable file. */ -# define ST_IMMUTABLE ST_IMMUTABLE - ST_NOATIME = 1024, /* Do not update access times. */ -# define ST_NOATIME ST_NOATIME - ST_NODIRATIME /* Do not update directory access times. */ -# define ST_NODIRATIME ST_NODIRATIME -#endif /* Use GNU. */ -}; From c71e9ba7e7e25e30fa3f92c3dbbfc25cf38f44b7 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 23 Oct 2002 23:49:01 +0000 Subject: [PATCH 2939/4487] 2002-10-23 Roland McGrath * sysvipc/Makefile (headers): Add bits/ipctypes.h here. * sysdeps/generic/bits/ipctypes.h: New file. * sysdeps/mips/bits/ipctypes.h: New file. * sysdeps/gnu/bits/shm.h: Include . * sysdeps/gnu/bits/msq.h: Likewise. * sysvipc/sys/ipc.h: Likewise. --- sysdeps/mips/bits/ipctypes.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 sysdeps/mips/bits/ipctypes.h diff --git a/sysdeps/mips/bits/ipctypes.h b/sysdeps/mips/bits/ipctypes.h new file mode 100644 index 0000000000..0956e7d58c --- /dev/null +++ b/sysdeps/mips/bits/ipctypes.h @@ -0,0 +1,32 @@ +/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. MIPS version + Copyright (C) 2002 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. */ + +/* + * Never include directly. + */ + +#ifndef _BITS_IPCTYPES_H +#define _BITS_IPCTYPES_H 1 + +#include + +typedef __SLONG32_TYPE __ipc_pid_t; + + +#endif /* bits/ipctypes.h */ From 35ebee609c908ba06dae83a469df77bcb0a90fa6 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 24 Oct 2002 19:13:38 +0000 Subject: [PATCH 2940/4487] 2002-10-24 Roland McGrath * sysdeps/generic/ldsodefs.h (_dl_starting_up): Declare it here. * sysdeps/unix/sysv/linux/init-first.c: Not here. * sysdeps/powerpc/elf/libc-start.c: Or here. * sysdeps/unix/sysv/aix/libc-start.c: Or here. * sysdeps/unix/sysv/aix/start-libc.c: Or here. * sysdeps/unix/sysv/aix/init-first.c: Or here. * sysdeps/generic/libc-start.c: Or here. * sysdeps/unix/sysv/linux/init-first.c (init): Protect _dl_starting_up access with [! SHARED]. * sysdeps/unix/sysv/aix/init-first.c (init): Likewise. --- sysdeps/unix/sysv/aix/init-first.c | 5 ++--- sysdeps/unix/sysv/aix/libc-start.c | 2 -- sysdeps/unix/sysv/aix/start-libc.c | 2 -- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/sysdeps/unix/sysv/aix/init-first.c b/sysdeps/unix/sysv/aix/init-first.c index 4c6768b8ad..8272a62824 100644 --- a/sysdeps/unix/sysv/aix/init-first.c +++ b/sysdeps/unix/sysv/aix/init-first.c @@ -37,9 +37,6 @@ extern void __libc_init (int, char **, char **); /* The function is called from assembly stubs the compiler can't see. */ static void init (int, char **, char **) __attribute__ ((unused)); -extern int _dl_starting_up; -weak_extern (_dl_starting_up) - /* Set nonzero if we have to be prepared for more then one libc being used in the process. Safe assumption if initializer never runs. */ int __libc_multiple_libcs attribute_hidden = 1; @@ -60,10 +57,12 @@ init (int argc, char **argv, char **envp) If the address would be taken inside the expression the optimizer would try to be too smart and throws it away. Grrr. */ +#ifndef SHARED /* XXX disable dl for now int *dummy_addr = &_dl_starting_up; __libc_multiple_libcs = dummy_addr && !_dl_starting_up; */ +#endif /* Save the command-line arguments. */ __libc_argc = argc; diff --git a/sysdeps/unix/sysv/aix/libc-start.c b/sysdeps/unix/sysv/aix/libc-start.c index 757b34975c..813e28d09b 100644 --- a/sysdeps/unix/sysv/aix/libc-start.c +++ b/sysdeps/unix/sysv/aix/libc-start.c @@ -31,8 +31,6 @@ typedef unsigned char uchar; extern void __libc_init_first (int argc, char **argv, char **envp); /* XXX disable for now -extern int _dl_starting_up; -weak_extern (_dl_starting_up) extern int __libc_multiple_libcs; */ /* XXX normally defined in generic/dl-sydep.c, hack it into existance diff --git a/sysdeps/unix/sysv/aix/start-libc.c b/sysdeps/unix/sysv/aix/start-libc.c index 303caa7078..0cbe79d0b1 100644 --- a/sysdeps/unix/sysv/aix/start-libc.c +++ b/sysdeps/unix/sysv/aix/start-libc.c @@ -31,8 +31,6 @@ typedef unsigned char uchar; extern void __libc_init_first (int argc, char **argv, char **envp); /* XXX disable for now -extern int _dl_starting_up; -weak_extern (_dl_starting_up) extern int __libc_multiple_libcs; */ /* XXX normally defined in generic/dl-sydep.c, hack it into existance From 8b995f35b90a2ffd264aacc2462cf57bbfd2c9b4 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 25 Oct 2002 19:41:24 +0000 Subject: [PATCH 2941/4487] 2002-10-25 Roland McGrath * sysdeps/unix/sysv/linux/init-first.c (init): Remove [! SHARED] conditional from __libc_multiple_libcs access. Remove kludge for weak symbol access with old compilers we no longer support. * sysdeps/unix/sysv/aix/init-first.c (init): Likewise. * sysdeps/generic/libc-start.c (__libc_start_main): Likewise. --- sysdeps/unix/sysv/aix/init-first.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sysdeps/unix/sysv/aix/init-first.c b/sysdeps/unix/sysv/aix/init-first.c index 8272a62824..24ef109dd2 100644 --- a/sysdeps/unix/sysv/aix/init-first.c +++ b/sysdeps/unix/sysv/aix/init-first.c @@ -57,12 +57,8 @@ init (int argc, char **argv, char **envp) If the address would be taken inside the expression the optimizer would try to be too smart and throws it away. Grrr. */ -#ifndef SHARED /* XXX disable dl for now - int *dummy_addr = &_dl_starting_up; - - __libc_multiple_libcs = dummy_addr && !_dl_starting_up; */ -#endif + __libc_multiple_libcs = &_dl_starting_up && !_dl_starting_up; */ /* Save the command-line arguments. */ __libc_argc = argc; From db8eb985106e383c1d582b9c5f4fc5d07847242c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 1 Nov 2002 20:48:33 +0000 Subject: [PATCH 2942/4487] 2002-10-29 Jakub Jelinek * sysdeps/gnu/siglist.c (PTR_SIZE_STR): Remove. (__old_sys_siglist, __old_sys_sigabbrev): Use strong_alias and declare_symbol. * sysdeps/mach/hurd/siglist.h (OLD_SIGLIST_SIZE_STR): Remove. (OLD_SIGLIST_SIZE): Define. * sysdeps/unix/sysv/linux/siglist.h (OLD_SIGLIST_SIZE_STR): Remove. (OLD_SIGLIST_SIZE): Define. * sysdeps/unix/sysv/linux/arm/siglist.c: Remove. --- sysdeps/unix/sysv/linux/arm/siglist.c | 67 --------------------------- 1 file changed, 67 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/arm/siglist.c diff --git a/sysdeps/unix/sysv/linux/arm/siglist.c b/sysdeps/unix/sysv/linux/arm/siglist.c deleted file mode 100644 index d5fdb5d619..0000000000 --- a/sysdeps/unix/sysv/linux/arm/siglist.c +++ /dev/null @@ -1,67 +0,0 @@ -/* Copyright (C) 1997, 1998, 2000, 2002 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. */ - -#include -#include -#include -#include -#include - -#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) -asm (".data; .globl __old_sys_siglist; __old_sys_siglist:"); -#endif - -const char *const __new_sys_siglist[NSIG] = -{ -#define init_sig(sig, abbrev, desc) [sig] desc, -#include "siglist.h" -#undef init_sig -}; -strong_alias (__new_sys_siglist, _sys_siglist_internal) - -#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) -asm (".type __old_sys_siglist,%object;.size __old_sys_siglist," - OLD_SIGLIST_SIZE_STR "*" PTR_SIZE_STR); - -asm (".data; .globl __old_sys_sigabbrev; __old_sys_sigabbrev:"); -#endif - -const char *const __new_sys_sigabbrev[NSIG] = -{ -#define init_sig(sig, abbrev, desc) [sig] abbrev, -#include "siglist.h" -#undef init_sig -}; - -#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) -asm (".type __old_sys_sigabbrev,%object;.size __old_sys_sigabbrev," - OLD_SIGLIST_SIZE_STR "*" PTR_SIZE_STR); - -extern const char *const *__old_sys_siglist; -extern const char *const *__old_sys_sigabbrev; - -strong_alias (__old_sys_siglist, _old_sys_siglist) -compat_symbol (libc, __old_sys_siglist, _sys_siglist, GLIBC_2_0); -compat_symbol (libc, _old_sys_siglist, sys_siglist, GLIBC_2_0); -compat_symbol (libc, __old_sys_sigabbrev, sys_sigabbrev, GLIBC_2_0); -#endif - -strong_alias (__new_sys_siglist, _new_sys_siglist) -versioned_symbol (libc, __new_sys_siglist, _sys_siglist, GLIBC_2_1); -versioned_symbol (libc, _new_sys_siglist, sys_siglist, GLIBC_2_1); -versioned_symbol (libc, __new_sys_sigabbrev, sys_sigabbrev, GLIBC_2_1); From 9cd89c3a1f5faaf6c3f77c45afb446bf5376b060 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 2 Nov 2002 23:13:16 +0000 Subject: [PATCH 2943/4487] 2002-11-02 H.J. Lu * sysdeps/unix/sysv/linux/mips/syscalls.list (s_execve): Set caller to EXTRA instead of execve. --- sysdeps/unix/sysv/linux/mips/syscalls.list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index 07e942d3cd..f12195fa6b 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -47,7 +47,7 @@ rt_sigprocmask - rt_sigprocmask i:ippi __syscall_rt_sigprocmask rt_sigqueueinfo - rt_sigqueueinfo i:iip __syscall_rt_sigqueueinfo rt_sigsuspend - rt_sigsuspend i:pi __syscall_rt_sigsuspend rt_sigtimedwait - rt_sigtimedwait i:pppi __syscall_rt_sigtimedwait -s_execve execve execve i:spp __syscall_execve +s_execve EXTRA execve i:spp __syscall_execve s_exit _exit exit i:i __syscall_exit s_fcntl fcntl fcntl i:iiF __syscall_fcntl s_fcntl64 fcntl64 fcntl64 i:iiF __syscall_fcntl64 From f732ef26a87629981cc209309913899da42a6405 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 6 Nov 2002 02:53:24 +0000 Subject: [PATCH 2944/4487] 2002-11-05 Roland McGrath * sysdeps/unix/sysv/linux/mips/Versions (libc: GLIBC_2.0): Change #errlist-compat magic comment to give 123 as size. (libc: GLIBC_2.1): Remove this set, moving #errlist-compat magic to ... (libc: GLIBC_2.2): ... here. (libc: GLIBC_2.3): Likewise. --- sysdeps/unix/sysv/linux/mips/Versions | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/Versions b/sysdeps/unix/sysv/linux/mips/Versions index 1569885d56..50bfac5599 100644 --- a/sysdeps/unix/sysv/linux/mips/Versions +++ b/sysdeps/unix/sysv/linux/mips/Versions @@ -5,7 +5,7 @@ libc { # for all GNU/Linux configurations. GLIBC_2.0 { - #errlist-compat 1134 + #errlist-compat 123 _sys_errlist; sys_errlist; _sys_nerr; sys_nerr; # Exception handling support functions from libgcc @@ -21,16 +21,11 @@ libc { # s* sysmips; } - GLIBC_2.1 { + GLIBC_2.2 { #errlist-compat 1134 _sys_errlist; sys_errlist; _sys_nerr; sys_nerr; - } - GLIBC_2.2 { + # _* _test_and_set; } - GLIBC_2.3 { - #errlist-compat 1134 - _sys_errlist; sys_errlist; _sys_nerr; sys_nerr; - } } From 9752ed23d7ad94d7539a0ddcd1288687aa5bb2a2 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 6 Nov 2002 03:19:47 +0000 Subject: [PATCH 2945/4487] 2002-11-05 Roland McGrath * sysdeps/unix/mips/sysdep.h [! __PIC__] (PSEUDO): Add nop after jump. From Johannes Stezenbach . --- sysdeps/unix/mips/sysdep.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/mips/sysdep.h b/sysdeps/unix/mips/sysdep.h index c25969610a..fd5191601a 100644 --- a/sysdeps/unix/mips/sysdep.h +++ b/sysdeps/unix/mips/sysdep.h @@ -49,7 +49,8 @@ #define PSEUDO(name, syscall_name, args) \ .set noreorder; \ .align 2; \ - 99: j __syscall_error; \ + 99: j __syscall_error; \ + nop; \ ENTRY(name) \ .set noreorder; \ li v0, SYS_ify(syscall_name); \ From 598b541b8cfd9c4a57d807c8dc3639fd3c0ff570 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 6 Nov 2002 22:14:25 +0000 Subject: [PATCH 2946/4487] 2002-11-06 Roland McGrath * sysdeps/unix/sysv/linux/mips/configure.in: File removed. * sysdeps/unix/sysv/linux/mips/configure: Likewise. --- sysdeps/unix/sysv/linux/mips/configure | 69 ----------------------- sysdeps/unix/sysv/linux/mips/configure.in | 10 ---- 2 files changed, 79 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/mips/configure delete mode 100644 sysdeps/unix/sysv/linux/mips/configure.in diff --git a/sysdeps/unix/sysv/linux/mips/configure b/sysdeps/unix/sysv/linux/mips/configure deleted file mode 100644 index bd173ef39d..0000000000 --- a/sysdeps/unix/sysv/linux/mips/configure +++ /dev/null @@ -1,69 +0,0 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! - # Local configure fragment for sysdeps/unix/sysv/linux/mips. - -for ac_prog in $AS -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_AS+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$AS"; then - ac_cv_prog_AS="$AS" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AS="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -AS=$ac_cv_prog_AS -if test -n "$AS"; then - echo "$as_me:$LINENO: result: $AS" >&5 -echo "${ECHO_T}$AS" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$AS" && break -done - -if test -z "$AS"; then - ac_verc_fail=yes -else - # Found it, now check the version. - echo "$as_me:$LINENO: checking version of $AS" >&5 -echo $ECHO_N "checking version of $AS... $ECHO_C" >&6 - ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\(-ia64-[0-9]*\)*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; - 2.11.90.0.[5-9]* | 2.11.90.[1-9]* | 2.11.9[1-9]* | 2.11.[1-9]* | 2.1[2-9]*| 2.[2-9]*) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - - esac - echo "$as_me:$LINENO: result: $ac_prog_version" >&5 -echo "${ECHO_T}$ac_prog_version" >&6 -fi -if test $ac_verc_fail = yes; then - { echo "$as_me:$LINENO: WARNING: *** Your binutils versions are too old. -*** We strongly advise to update binutils. For details check -*** the FAQ and INSTALL documents." >&5 -echo "$as_me: WARNING: *** Your binutils versions are too old. -*** We strongly advise to update binutils. For details check -*** the FAQ and INSTALL documents." >&2;} -fi - diff --git a/sysdeps/unix/sysv/linux/mips/configure.in b/sysdeps/unix/sysv/linux/mips/configure.in deleted file mode 100644 index 9d000646c4..0000000000 --- a/sysdeps/unix/sysv/linux/mips/configure.in +++ /dev/null @@ -1,10 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/unix/sysv/linux/mips. - -define([AC_SUBST])dnl Prevent junk from being appended due to no AC_OUTPUT -AC_CHECK_PROG_VER(AS, $AS, --version, - [GNU assembler.* \([0-9]*\.[0-9.]*\(-ia64-[0-9]*\)*\)], - [2.11.90.0.[5-9]* | 2.11.90.[1-9]* | 2.11.9[1-9]* | 2.11.[1-9]* | 2.1[2-9]*| 2.[2-9]*], -AC_MSG_WARN([*** Your binutils versions are too old. -*** We strongly advise to update binutils. For details check -*** the FAQ and INSTALL documents.])) From e8b06fdf73f9fcb3cabb42e1f7e1e9b23d31c255 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 8 Nov 2002 02:18:45 +0000 Subject: [PATCH 2947/4487] 2002-11-07 Richard Henderson * elf/tls-macros.h: Add alpha versions. * sysdeps/alpha/dl-machine.h (elf_machine_rela): Handle TLS relocs. * sysdeps/unix/alpha/sysdep.S: Support USE___THREAD. * sysdeps/unix/alpha/sysdep.h: Likewise. Add SYSCALL_ERROR_HANDLER. * sysdeps/unix/sysv/linux/alpha/brk.S: Use it. * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise. * sysdeps/unix/sysv/linux/alpha/getitimer.S: Likewise. * sysdeps/unix/sysv/linux/alpha/getrusage.S: Likewise. * sysdeps/unix/sysv/linux/alpha/gettimeofday.S: Likewise. * sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S: Likewise. * sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S: Likewise. * sysdeps/unix/sysv/linux/alpha/rt_sigaction.S: Likewise. * sysdeps/unix/sysv/linux/alpha/select.S: Likewise. * sysdeps/unix/sysv/linux/alpha/setitimer.S: Likewise. * sysdeps/unix/sysv/linux/alpha/settimeofday.S: Likewise. * sysdeps/unix/sysv/linux/alpha/sigsuspend.S: Likewise. * sysdeps/unix/sysv/linux/alpha/syscall.S: Likewise. * sysdeps/unix/sysv/linux/alpha/utimes.S: Likewise. * sysdeps/unix/sysv/linux/alpha/wait4.S: Likewise. * sysdeps/unix/sysv/linux/alpha/clone.S: Add user_tid and tls args. --- sysdeps/unix/sysv/linux/alpha/clone.S | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S index f1f62146ac..42df98a9b4 100644 --- a/sysdeps/unix/sysv/linux/alpha/clone.S +++ b/sysdeps/unix/sysv/linux/alpha/clone.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1996. @@ -24,7 +24,9 @@ #define _ERRNO_H 1 #include -/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg) */ +/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg, + pid_t *tid, void *tls); + */ .text ENTRY(__clone) @@ -49,24 +51,29 @@ ENTRY(__clone) stq a0,0(a1) stq a3,8(a1) - /* Do the system call */ + /* Shift the flags, tid and tls arguments into place; the + child_stack argument is already correct. */ mov a2,a0 + mov a4,a2 + mov a5,a3 + + /* Do the system call. */ ldiq v0,__NR_clone call_pal PAL_callsys bne a3,$error beq v0,thread_start - /* Successful return from the parent */ + /* Successful return from the parent. */ ret - /* Something bad happened -- no child created */ + /* Something bad happened -- no child created. */ $error: #ifndef PROF br gp,1f 1: ldgp gp,0(gp) #endif - jmp zero,__syscall_error + SYSCALL_ERROR_HANDLER END(__clone) @@ -85,11 +92,11 @@ thread_start: ldq a0,8(sp) addq sp,16,sp - /* Call the user's function */ + /* Call the user's function. */ jsr ra,(pv) ldgp gp,0(ra) - /* Call _exit rather than doing it inline for breakpoint purposes */ + /* Call _exit rather than doing it inline for breakpoint purposes. */ mov v0,a0 jsr ra,_exit From d5a256add301cb3b152901104e612f1040b3dc0a Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 8 Nov 2002 02:18:48 +0000 Subject: [PATCH 2948/4487] 2002-11-07 Richard Henderson * elf/tls-macros.h: Add alpha versions. * sysdeps/alpha/dl-machine.h (elf_machine_rela): Handle TLS relocs. * sysdeps/unix/alpha/sysdep.S: Support USE___THREAD. * sysdeps/unix/alpha/sysdep.h: Likewise. Add SYSCALL_ERROR_HANDLER. * sysdeps/unix/sysv/linux/alpha/brk.S: Use it. * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise. * sysdeps/unix/sysv/linux/alpha/getitimer.S: Likewise. * sysdeps/unix/sysv/linux/alpha/getrusage.S: Likewise. * sysdeps/unix/sysv/linux/alpha/gettimeofday.S: Likewise. * sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S: Likewise. * sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S: Likewise. * sysdeps/unix/sysv/linux/alpha/rt_sigaction.S: Likewise. * sysdeps/unix/sysv/linux/alpha/select.S: Likewise. * sysdeps/unix/sysv/linux/alpha/setitimer.S: Likewise. * sysdeps/unix/sysv/linux/alpha/settimeofday.S: Likewise. * sysdeps/unix/sysv/linux/alpha/sigsuspend.S: Likewise. * sysdeps/unix/sysv/linux/alpha/syscall.S: Likewise. * sysdeps/unix/sysv/linux/alpha/utimes.S: Likewise. * sysdeps/unix/sysv/linux/alpha/wait4.S: Likewise. --- sysdeps/unix/alpha/sysdep.S | 58 +++++++--- sysdeps/unix/alpha/sysdep.h | 100 +++++++++++------- sysdeps/unix/sysv/linux/alpha/brk.S | 2 +- sysdeps/unix/sysv/linux/alpha/getitimer.S | 2 +- sysdeps/unix/sysv/linux/alpha/getrusage.S | 2 +- sysdeps/unix/sysv/linux/alpha/gettimeofday.S | 2 +- .../sysv/linux/alpha/ieee_get_fp_control.S | 2 +- .../sysv/linux/alpha/ieee_set_fp_control.S | 2 +- sysdeps/unix/sysv/linux/alpha/rt_sigaction.S | 4 +- sysdeps/unix/sysv/linux/alpha/select.S | 2 +- sysdeps/unix/sysv/linux/alpha/setitimer.S | 2 +- sysdeps/unix/sysv/linux/alpha/settimeofday.S | 2 +- sysdeps/unix/sysv/linux/alpha/sigsuspend.S | 2 +- sysdeps/unix/sysv/linux/alpha/syscall.S | 2 +- sysdeps/unix/sysv/linux/alpha/utimes.S | 2 +- sysdeps/unix/sysv/linux/alpha/wait4.S | 2 +- 16 files changed, 120 insertions(+), 68 deletions(-) diff --git a/sysdeps/unix/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S index 05c00918e6..50c84c1166 100644 --- a/sysdeps/unix/alpha/sysdep.S +++ b/sysdeps/unix/alpha/sysdep.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1996, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1996, 1998, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -20,24 +20,59 @@ #include #include +#if defined(__ELF__) && defined(PIC) + /* Put this at the end of libc's text segment so that all of + the direct branches from the syscalls are forward, and + thus predicted not taken. */ + .section .text.last, "ax", @progbits +#else .text - .align 2 +#endif -#ifdef _LIBC_REENTRANT +#ifdef PIC + /* When building a shared library, we branch here without + having loaded the GP. Nor, since it was a direct branch, + have we loaded PV with our address. Do both. */ +# define LOADGP br pv, 1f; 1: ldgp gp, 0(pv) +# define PROLOGUE .prologue 0 +#else +# define LOADGP ldgp gp, 0(pv) +# define PROLOGUE .prologue 1 +#endif + .align 4 .globl __syscall_error .ent __syscall_error __syscall_error: - ldgp gp, 0(pv) + +#if defined(_LIBC_REENTRANT) && defined(USE___THREAD) + + LOADGP + PROLOGUE + mov v0, t0 + call_pal PAL_rduniq + ldq t1, __libc_errno(gp) !gottprel + addq v0, t1, v0 + stl t0, 0(v0) + lda v0, -1 + ret + +#elif defined(_LIBC_REENTRANT) + + LOADGP lda sp, -16(sp) .frame sp, 16, ra, 0 stq ra, 0(sp) stq v0, 8(sp) .mask 0x4000001, -16 - .prologue 1 + PROLOGUE /* Find our per-thread errno address */ +#ifdef PIC + bsr ra, __errno_location !samegp +#else jsr ra, __errno_location +#endif /* Store the error value. */ ldq t0, 8(sp) @@ -49,16 +84,15 @@ __syscall_error: ldq ra, 0(sp) lda sp, 16(sp) ret - .end __syscall_error -#else -ENTRY(__syscall_error) - ldgp gp, 0(t12) - .prologue 1 +#else + LOADGP + PROLOGUE stl v0, errno lda v0, -1 ret - END(__syscall_error) -#endif /* _LIBC_REENTRANT */ +#endif + + .end __syscall_error diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h index 46b5214987..f9aba3ffa2 100644 --- a/sysdeps/unix/alpha/sysdep.h +++ b/sysdeps/unix/alpha/sysdep.h @@ -27,6 +27,13 @@ # include #endif +#include /* Defines USE___THREAD. */ + +#ifdef IS_IN_rtld +# include /* Defines RTLD_PRIVATE_ERRNO. */ +#endif + + #ifdef __STDC__ #define __LABEL(x) x##: #else @@ -55,54 +62,65 @@ label of that number between those two macros! */ #ifdef PROF -#define PSEUDO(name, syscall_name, args) \ - .globl name; \ - .align 3; \ - .ent name,0; \ +# define PSEUDO_PROLOGUE \ + .frame sp, 0, ra; \ + ldgp gp,0(pv); \ + .set noat; \ + lda AT,_mcount; \ + jsr AT,(AT),_mcount; \ + .set at; \ + .prologue 1 +# define PSEUDO_LOADGP +#else +# define PSEUDO_PROLOGUE \ + .frame sp, 0, ra; \ + .prologue 0 +# define PSEUDO_LOADGP \ + br gp, 2f; \ +2: ldgp gp, 0(gp) +#endif /* PROF */ + +#if RTLD_PRIVATE_ERRNO +# define SYSCALL_ERROR_HANDLER \ + stl v0, errno(gp) !gprel; \ + lda v0, -1; \ + ret +#else +# define SYSCALL_ERROR_HANDLER \ + jmp $31, __syscall_error +#endif /* RTLD_PRIVATE_ERRNO */ + +#if defined(PIC) && !RTLD_PRIVATE_ERRNO +# define PSEUDO(name, syscall_name, args) \ + .globl name; \ + .align 4; \ + .ent name,0; \ __LABEL(name) \ - .frame sp, 0, ra; \ - ldgp gp,0(pv); \ - .set noat; \ - lda AT,_mcount; \ - jsr AT,(AT),_mcount; \ - .set at; \ - .prologue 1; \ - ldiq v0, SYS_ify(syscall_name); \ - .set noat; \ - call_pal PAL_callsys; \ - .set at; \ - bne a3, 1996f; \ + PSEUDO_PROLOGUE; \ + lda v0, SYS_ify(syscall_name); \ + call_pal PAL_callsys; \ + bne a3, __syscall_error !samegp; \ 3: +# undef PSEUDO_END +# define PSEUDO_END(sym) END(sym) #else -#define PSEUDO(name, syscall_name, args) \ - .globl name; \ - .align 3; \ - .ent name,0; \ +# define PSEUDO(name, syscall_name, args) \ + .globl name; \ + .align 4; \ + .ent name,0; \ __LABEL(name) \ - .frame sp, 0, ra \ - .prologue 0; \ - ldiq v0, SYS_ify(syscall_name); \ - .set noat; \ - call_pal PAL_callsys; \ - .set at; \ - bne a3, 1996f; \ + lda v0, SYS_ify(syscall_name); \ + call_pal PAL_callsys; \ + bne a3, 1996f; \ 3: -#endif -#undef PSEUDO_END -#ifdef PROF -#define PSEUDO_END(sym) \ +# undef PSEUDO_END +# define PSEUDO_END(sym) \ 1996: \ - jmp zero, __syscall_error; \ - END(sym) -#else -#define PSEUDO_END(sym) \ -1996: \ - br gp, 2f; \ -2: ldgp gp, 0(gp); \ - jmp zero, __syscall_error; \ - END(sym) -#endif + PSEUDO_LOADGP; \ + SYSCALL_ERROR_HANDLER; \ + END(sym) +#endif /* PIC && !RTLD_PRIVATE_ERRNO */ #define r0 v0 #define r1 a4 diff --git a/sysdeps/unix/sysv/linux/alpha/brk.S b/sysdeps/unix/sysv/linux/alpha/brk.S index 3cd1ae0fbd..e01abebe0e 100644 --- a/sysdeps/unix/sysv/linux/alpha/brk.S +++ b/sysdeps/unix/sysv/linux/alpha/brk.S @@ -74,7 +74,7 @@ $ok: stq a0, __curbrk /* What a horrible way to die. */ $err0: ldi v0, ENOMEM $err1: addq sp, 8, sp - jmp zero, __syscall_error + SYSCALL_ERROR_HANDLER END(__brk) diff --git a/sysdeps/unix/sysv/linux/alpha/getitimer.S b/sysdeps/unix/sysv/linux/alpha/getitimer.S index 03ceea10f0..543256272c 100644 --- a/sysdeps/unix/sysv/linux/alpha/getitimer.S +++ b/sysdeps/unix/sysv/linux/alpha/getitimer.S @@ -97,7 +97,7 @@ $do32: ldi v0, SYS_ify(osf_getitimer) .align 3 $error: addq sp, 16, sp - jmp zero, __syscall_error + SYSCALL_ERROR_HANDLER END(GETITIMER) diff --git a/sysdeps/unix/sysv/linux/alpha/getrusage.S b/sysdeps/unix/sysv/linux/alpha/getrusage.S index 13762a87b1..dd3eced775 100644 --- a/sysdeps/unix/sysv/linux/alpha/getrusage.S +++ b/sysdeps/unix/sysv/linux/alpha/getrusage.S @@ -129,7 +129,7 @@ $do32: ldi v0, SYS_ify(osf_getrusage) .align 3 $error: addq sp, 16, sp - jmp zero, __syscall_error + SYSCALL_ERROR_HANDLER END(GETRUSAGE) diff --git a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S index 60d642a125..71b8c134dc 100644 --- a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S +++ b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S @@ -94,7 +94,7 @@ $do32: ldi v0, SYS_ify(osf_gettimeofday) .align 3 $error: addq sp, 16, sp - jmp zero, __syscall_error + SYSCALL_ERROR_HANDLER END(GETTIMEOFDAY) diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S index 650f7c0715..89e08b3dc9 100644 --- a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S +++ b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S @@ -53,7 +53,7 @@ $error: 1: ldgp gp, 0(gp) #endif lda sp, 16(sp) - jmp zero, __syscall_error + SYSCALL_ERROR_HANDLER END(__ieee_get_fp_control) diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S index 53838fe84e..dc1bbbb962 100644 --- a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S +++ b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S @@ -52,7 +52,7 @@ $error: 1: ldgp gp, 0(gp) #endif lda sp, 16(sp) - jmp zero, __syscall_error + SYSCALL_ERROR_HANDLER END(__ieee_set_fp_control) diff --git a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S index e3d01af928..5f166a7094 100644 --- a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S +++ b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S @@ -56,7 +56,7 @@ ENTRY(__syscall_rt_sigaction) br gp,2f 2: ldgp gp,0(gp) #endif - jmp __syscall_error + SYSCALL_ERROR_HANDLER END(__syscall_rt_sigaction) @@ -82,6 +82,6 @@ ENTRY(__syscall_rt_sigaction) ldgp $29,0($27) .prologue 1 ldi $0,ENOSYS - jmp __syscall_error + SYSCALL_ERROR_HANDLER END(__syscall_rt_sigaction) #endif diff --git a/sysdeps/unix/sysv/linux/alpha/select.S b/sysdeps/unix/sysv/linux/alpha/select.S index 57030aaa4e..d3b206df6e 100644 --- a/sysdeps/unix/sysv/linux/alpha/select.S +++ b/sysdeps/unix/sysv/linux/alpha/select.S @@ -112,7 +112,7 @@ $do32: .align 3 $error: addq sp, 64, sp - jmp zero, __syscall_error + SYSCALL_ERROR_HANDLER END(SELECT) diff --git a/sysdeps/unix/sysv/linux/alpha/setitimer.S b/sysdeps/unix/sysv/linux/alpha/setitimer.S index 2cc126337d..fdc3d27a8c 100644 --- a/sysdeps/unix/sysv/linux/alpha/setitimer.S +++ b/sysdeps/unix/sysv/linux/alpha/setitimer.S @@ -113,7 +113,7 @@ $do32: .align 3 $error: addq sp, 48, sp - jmp zero, __syscall_error + SYSCALL_ERROR_HANDLER END(SETITIMER) diff --git a/sysdeps/unix/sysv/linux/alpha/settimeofday.S b/sysdeps/unix/sysv/linux/alpha/settimeofday.S index 03e9206d48..339913ff51 100644 --- a/sysdeps/unix/sysv/linux/alpha/settimeofday.S +++ b/sysdeps/unix/sysv/linux/alpha/settimeofday.S @@ -94,7 +94,7 @@ $do32: .align 3 $error: addq sp, 16, sp - jmp zero, __syscall_error + SYSCALL_ERROR_HANDLER END(SETTIMEOFDAY) diff --git a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S index d6a17851ca..955d82ecc8 100644 --- a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S +++ b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S @@ -47,7 +47,7 @@ error: br gp, 1f 1: ldgp gp, 0(gp) #endif - jmp zero, __syscall_error + SYSCALL_ERROR_HANDLER END(__sigsuspend) diff --git a/sysdeps/unix/sysv/linux/alpha/syscall.S b/sysdeps/unix/sysv/linux/alpha/syscall.S index c354bb6161..10a32d5dc8 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscall.S +++ b/sysdeps/unix/sysv/linux/alpha/syscall.S @@ -70,7 +70,7 @@ $error: br gp, 2f 2: ldgp gp, 0(gp) #endif - jmp zero, __syscall_error + SYSCALL_ERROR_HANDLER END(__syscall) diff --git a/sysdeps/unix/sysv/linux/alpha/utimes.S b/sysdeps/unix/sysv/linux/alpha/utimes.S index e9c16db39d..a939255d27 100644 --- a/sysdeps/unix/sysv/linux/alpha/utimes.S +++ b/sysdeps/unix/sysv/linux/alpha/utimes.S @@ -99,7 +99,7 @@ $do32: .align 3 $error: addq sp, 16, sp - jmp zero, __syscall_error + SYSCALL_ERROR_HANDLER END(UTIMES) diff --git a/sysdeps/unix/sysv/linux/alpha/wait4.S b/sysdeps/unix/sysv/linux/alpha/wait4.S index b695047890..17c5a97952 100644 --- a/sysdeps/unix/sysv/linux/alpha/wait4.S +++ b/sysdeps/unix/sysv/linux/alpha/wait4.S @@ -132,7 +132,7 @@ $do32: ldi v0, SYS_ify(osf_wait4) .align 3 $error: addq sp, 32, sp - jmp zero, __syscall_error + SYSCALL_ERROR_HANDLER END(WAIT4) From 543d2ed9aa810aa5ae997eb891ba92cbcf1dbe5a Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 8 Nov 2002 02:18:49 +0000 Subject: [PATCH 2949/4487] 2002-11-07 Richard Henderson * sysdeps/unix/sysv/linux/alpha/sysdep.h: Re-include protect. Kill argument registers across the inline syscall. --- sysdeps/unix/sysv/linux/alpha/sysdep.h | 202 +++++++++++++------------ 1 file changed, 102 insertions(+), 100 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h index e56adca8ed..3bf25e6fd2 100644 --- a/sysdeps/unix/sysv/linux/alpha/sysdep.h +++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h @@ -17,6 +17,9 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#ifndef _LINUX_ALPHA_SYSDEP_H +#define _LINUX_ALPHA_SYSDEP_H 1 + #ifdef __ASSEMBLER__ #include @@ -88,118 +91,114 @@ of the hard-register variables as much as possible. Thus we copy in/out as close to the asm as possible. */ -#define inline_syscall0(name) \ -{ \ - register long _sc_0 __asm__("$0"); \ - register long _sc_19 __asm__("$19"); \ - \ - _sc_0 = __NR_##name; \ - __asm__("callsys # %0 %1 <= %2" \ - : "=r"(_sc_0), "=r"(_sc_19) \ - : "0"(_sc_0) \ - : inline_syscall_clobbers); \ - _sc_ret = _sc_0, _sc_err = _sc_19; \ -} - -#define inline_syscall1(name,arg1) \ -{ \ - register long _sc_0 __asm__("$0"); \ - register long _sc_16 __asm__("$16"); \ - register long _sc_19 __asm__("$19"); \ - \ - _sc_0 = __NR_##name; \ - _sc_16 = (long) (arg1); \ - __asm__("callsys # %0 %1 <= %2 %3" \ - : "=r"(_sc_0), "=r"(_sc_19) \ - : "0"(_sc_0), "r"(_sc_16) \ - : inline_syscall_clobbers); \ - _sc_ret = _sc_0, _sc_err = _sc_19; \ -} - -#define inline_syscall2(name,arg1,arg2) \ +#define inline_syscall0(name) \ { \ - register long _sc_0 __asm__("$0"); \ - register long _sc_16 __asm__("$16"); \ - register long _sc_17 __asm__("$17"); \ register long _sc_19 __asm__("$19"); \ \ - _sc_0 = __NR_##name; \ - _sc_16 = (long) (arg1); \ - _sc_17 = (long) (arg2); \ - __asm__("callsys # %0 %1 <= %2 %3 %4" \ - : "=r"(_sc_0), "=r"(_sc_19) \ - : "0"(_sc_0), "r"(_sc_16), "r"(_sc_17) \ - : inline_syscall_clobbers); \ - _sc_ret = _sc_0, _sc_err = _sc_19; \ + __asm__("callsys # %0 %1 <= %2" \ + : "=v"(_sc_ret), "=r"(_sc_19) \ + : "0"(__NR_##name) \ + : inline_syscall_clobbers, \ + "$16", "$17", "$18", "$20", "$21"); \ + _sc_err = _sc_19; \ } -#define inline_syscall3(name,arg1,arg2,arg3) \ +#define inline_syscall1(name,arg1) \ { \ - register long _sc_0 __asm__("$0"); \ register long _sc_16 __asm__("$16"); \ - register long _sc_17 __asm__("$17"); \ - register long _sc_18 __asm__("$18"); \ register long _sc_19 __asm__("$19"); \ \ - _sc_0 = __NR_##name; \ _sc_16 = (long) (arg1); \ - _sc_17 = (long) (arg2); \ - _sc_18 = (long) (arg3); \ - __asm__("callsys # %0 %1 <= %2 %3 %4 %5" \ - : "=r"(_sc_0), "=r"(_sc_19) \ - : "0"(_sc_0), "r"(_sc_16), "r"(_sc_17), \ - "r"(_sc_18) \ - : inline_syscall_clobbers); \ - _sc_ret = _sc_0, _sc_err = _sc_19; \ + __asm__("callsys # %0 %1 <= %2 %3" \ + : "=v"(_sc_ret), "=r"(_sc_19), \ + "=r"(_sc_16) \ + : "0"(__NR_##name), "2"(_sc_16) \ + : inline_syscall_clobbers, \ + "$17", "$18", "$20", "$21"); \ + _sc_err = _sc_19; \ } -#define inline_syscall4(name,arg1,arg2,arg3,arg4) \ -{ \ - register long _sc_0 __asm__("$0"); \ - register long _sc_16 __asm__("$16"); \ - register long _sc_17 __asm__("$17"); \ - register long _sc_18 __asm__("$18"); \ - register long _sc_19 __asm__("$19"); \ - \ - _sc_0 = __NR_##name; \ - _sc_16 = (long) (arg1); \ - _sc_17 = (long) (arg2); \ - _sc_18 = (long) (arg3); \ - _sc_19 = (long) (arg4); \ - __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6" \ - : "=r"(_sc_0), "=r"(_sc_19) \ - : "0"(_sc_0), "r"(_sc_16), "r"(_sc_17), \ - "r"(_sc_18), "1"(_sc_19) \ - : inline_syscall_clobbers); \ - _sc_ret = _sc_0, _sc_err = _sc_19; \ +#define inline_syscall2(name,arg1,arg2) \ +{ \ + register long _sc_16 __asm__("$16"); \ + register long _sc_17 __asm__("$17"); \ + register long _sc_19 __asm__("$19"); \ + \ + _sc_16 = (long) (arg1); \ + _sc_17 = (long) (arg2); \ + __asm__("callsys # %0 %1 <= %2 %3 %4" \ + : "=v"(_sc_ret), "=r"(_sc_19), \ + "=r"(_sc_16), "=r"(_sc_17) \ + : "0"(__NR_##name), "2"(_sc_16), "3"(_sc_17) \ + : inline_syscall_clobbers, \ + "$18", "$20", "$21"); \ + _sc_err = _sc_19; \ } -#define inline_syscall5(name,arg1,arg2,arg3,arg4,arg5) \ -{ \ - register long _sc_0 __asm__("$0"); \ - register long _sc_16 __asm__("$16"); \ - register long _sc_17 __asm__("$17"); \ - register long _sc_18 __asm__("$18"); \ - register long _sc_19 __asm__("$19"); \ - register long _sc_20 __asm__("$20"); \ - \ - _sc_0 = __NR_##name; \ - _sc_16 = (long) (arg1); \ - _sc_17 = (long) (arg2); \ - _sc_18 = (long) (arg3); \ - _sc_19 = (long) (arg4); \ - _sc_20 = (long) (arg5); \ - __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7" \ - : "=r"(_sc_0), "=r"(_sc_19) \ - : "0"(_sc_0), "r"(_sc_16), "r"(_sc_17), \ - "r"(_sc_18), "1"(_sc_19), "r"(_sc_20) \ - : inline_syscall_clobbers); \ - _sc_ret = _sc_0, _sc_err = _sc_19; \ +#define inline_syscall3(name,arg1,arg2,arg3) \ +{ \ + register long _sc_16 __asm__("$16"); \ + register long _sc_17 __asm__("$17"); \ + register long _sc_18 __asm__("$18"); \ + register long _sc_19 __asm__("$19"); \ + \ + _sc_16 = (long) (arg1); \ + _sc_17 = (long) (arg2); \ + _sc_18 = (long) (arg3); \ + __asm__("callsys # %0 %1 <= %2 %3 %4 %5" \ + : "=v"(_sc_ret), "=r"(_sc_19), \ + "=r"(_sc_16), "=r"(_sc_17), "=r"(_sc_18) \ + : "0"(__NR_##name), "2"(_sc_16), "3"(_sc_17), \ + "4"(_sc_18) \ + : inline_syscall_clobbers, "$20", "$21"); \ + _sc_err = _sc_19; \ +} + +#define inline_syscall4(name,arg1,arg2,arg3,arg4) \ +{ \ + register long _sc_16 __asm__("$16"); \ + register long _sc_17 __asm__("$17"); \ + register long _sc_18 __asm__("$18"); \ + register long _sc_19 __asm__("$19"); \ + \ + _sc_16 = (long) (arg1); \ + _sc_17 = (long) (arg2); \ + _sc_18 = (long) (arg3); \ + _sc_19 = (long) (arg4); \ + __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6" \ + : "=v"(_sc_ret), "=r"(_sc_19), \ + "=r"(_sc_16), "=r"(_sc_17), "=r"(_sc_18) \ + : "0"(__NR_##name), "2"(_sc_16), "3"(_sc_17), \ + "4"(_sc_18), "1"(_sc_19) \ + : inline_syscall_clobbers, "$20", "$21"); \ + _sc_err = _sc_19; \ +} + +#define inline_syscall5(name,arg1,arg2,arg3,arg4,arg5) \ +{ \ + register long _sc_16 __asm__("$16"); \ + register long _sc_17 __asm__("$17"); \ + register long _sc_18 __asm__("$18"); \ + register long _sc_19 __asm__("$19"); \ + register long _sc_20 __asm__("$20"); \ + \ + _sc_16 = (long) (arg1); \ + _sc_17 = (long) (arg2); \ + _sc_18 = (long) (arg3); \ + _sc_19 = (long) (arg4); \ + _sc_20 = (long) (arg5); \ + __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7" \ + : "=v"(_sc_ret), "=r"(_sc_19), \ + "=r"(_sc_16), "=r"(_sc_17), "=r"(_sc_18), \ + "=r"(_sc_20) \ + : "0"(__NR_##name), "2"(_sc_16), "3"(_sc_17), \ + "4"(_sc_18), "1"(_sc_19), "5"(_sc_20) \ + : inline_syscall_clobbers, "$21"); \ + _sc_ret = _sc_0, _sc_err = _sc_19; \ } #define inline_syscall6(name,arg1,arg2,arg3,arg4,arg5,arg6) \ { \ - register long _sc_0 __asm__("$0"); \ register long _sc_16 __asm__("$16"); \ register long _sc_17 __asm__("$17"); \ register long _sc_18 __asm__("$18"); \ @@ -207,7 +206,6 @@ register long _sc_20 __asm__("$20"); \ register long _sc_21 __asm__("$21"); \ \ - _sc_0 = __NR_##name; \ _sc_16 = (long) (arg1); \ _sc_17 = (long) (arg2); \ _sc_18 = (long) (arg3); \ @@ -215,10 +213,14 @@ _sc_20 = (long) (arg5); \ _sc_21 = (long) (arg6); \ __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7 %8" \ - : "=r"(_sc_0), "=r"(_sc_19) \ - : "0"(_sc_0), "r"(_sc_16), "r"(_sc_17), \ - "r"(_sc_18), "1"(_sc_19), "r"(_sc_20), \ - "r"(_sc_21) \ + : "=v"(_sc_ret), "=r"(_sc_19) \ + "=r"(_sc_16), "=r"(_sc_17), "=r"(_sc_18), \ + "=r"(_sc_20), "=r"(_sc_21) \ + : "0"(__NR_##name), "2"(_sc_16), "3"(_sc_17), \ + "4"(_sc_18), "1"(_sc_19), "5"(_sc_20), \ + "6"(_sc_21) \ : inline_syscall_clobbers); \ - _sc_ret = _sc_0, _sc_err = _sc_19; \ + _sc_err = _sc_19; \ } + +#endif /* _LINUX_ALPHA_SYSDEP_H */ From d0d0df1dd367f5021f4f2fe7f59832fc6780127c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 8 Nov 2002 02:18:51 +0000 Subject: [PATCH 2950/4487] 2002-11-07 Richard Henderson * linuxthreads/sysdeps/alpha/tls.h: New file. * sysdeps/alpha/dl-tls.h: New file. --- sysdeps/alpha/dl-tls.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 sysdeps/alpha/dl-tls.h diff --git a/sysdeps/alpha/dl-tls.h b/sysdeps/alpha/dl-tls.h new file mode 100644 index 0000000000..f81f95d75e --- /dev/null +++ b/sysdeps/alpha/dl-tls.h @@ -0,0 +1,29 @@ +/* Thread-local storage handling in the ELF dynamic linker. Alpha version. + Copyright (C) 2002 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. */ + + +/* Type used for the representation of TLS information in the GOT. */ +typedef struct +{ + unsigned long int ti_module; + unsigned long int ti_offset; +} tls_index; + + +extern void *__tls_get_addr (tls_index *ti); From 18fefdbe946acb0f099e1998add076e47c9afba4 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 8 Nov 2002 02:18:58 +0000 Subject: [PATCH 2951/4487] 2002-11-07 Richard Henderson * configure.in (ASM_ALPHA_NG_SYMBOL_PREFIX): Remove test. * configure: Regenerated. * config.h.in (ASM_ALPHA_NG_SYMBOL_PREFIX): Remove #undef. * sysdeps/alpha/dl-machine.h (TRAMPOLINE_TEMPLATE): Use !samegp. (RTLD_START): Likewise. Access _dl_skip_args, _rtld_local, and _dl_fini via gp-relative relocations. * sysdeps/alpha/fpu/e_sqrt.c: Use !samegp. --- sysdeps/alpha/fpu/e_sqrt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/alpha/fpu/e_sqrt.c b/sysdeps/alpha/fpu/e_sqrt.c index c6262c8f69..a371896765 100644 --- a/sysdeps/alpha/fpu/e_sqrt.c +++ b/sysdeps/alpha/fpu/e_sqrt.c @@ -153,7 +153,7 @@ __ieee754_sqrt: \n\ .align 4 \n\ $fixup: \n\ addq $sp, 16, $sp \n\ - br "ASM_ALPHA_NG_SYMBOL_PREFIX"__full_ieee754_sqrt..ng \n\ + br __full_ieee754_sqrt !samegp \n\ \n\ .end __ieee754_sqrt"); From fbd3097515efe928ed8559e6f64c0ebe6661251f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 8 Nov 2002 02:19:00 +0000 Subject: [PATCH 2952/4487] 2002-11-07 Richard Henderson * configure.in (ASM_ALPHA_NG_SYMBOL_PREFIX): Remove test. * configure: Regenerated. * config.h.in (ASM_ALPHA_NG_SYMBOL_PREFIX): Remove #undef. * sysdeps/alpha/dl-machine.h (TRAMPOLINE_TEMPLATE): Use !samegp. (RTLD_START): Likewise. Access _dl_skip_args, _rtld_local, and _dl_fini via gp-relative relocations. * sysdeps/alpha/fpu/e_sqrt.c: Use !samegp. * elf/tls-macros.h: Add alpha versions. * sysdeps/alpha/dl-machine.h (elf_machine_rela): Handle TLS relocs. * sysdeps/unix/alpha/sysdep.S: Support USE___THREAD. * sysdeps/unix/alpha/sysdep.h: Likewise. Add SYSCALL_ERROR_HANDLER. * sysdeps/unix/sysv/linux/alpha/brk.S: Use it. * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise. * sysdeps/unix/sysv/linux/alpha/getitimer.S: Likewise. * sysdeps/unix/sysv/linux/alpha/getrusage.S: Likewise. * sysdeps/unix/sysv/linux/alpha/gettimeofday.S: Likewise. * sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S: Likewise. * sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S: Likewise. * sysdeps/unix/sysv/linux/alpha/rt_sigaction.S: Likewise. * sysdeps/unix/sysv/linux/alpha/select.S: Likewise. * sysdeps/unix/sysv/linux/alpha/setitimer.S: Likewise. * sysdeps/unix/sysv/linux/alpha/settimeofday.S: Likewise. * sysdeps/unix/sysv/linux/alpha/sigsuspend.S: Likewise. * sysdeps/unix/sysv/linux/alpha/syscall.S: Likewise. * sysdeps/unix/sysv/linux/alpha/utimes.S: Likewise. * sysdeps/unix/sysv/linux/alpha/wait4.S: Likewise. --- sysdeps/alpha/dl-machine.h | 57 ++++++++++++++++++++++++++++++++------ 1 file changed, 49 insertions(+), 8 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 05d988274b..711bf10fdd 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -228,7 +228,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) mov $26, $18 \n\ addq $17, $17, $17 \n\ /* Do the fixup */ \n\ - bsr $26, " ASM_ALPHA_NG_SYMBOL_PREFIX #fixup_name "..ng\n\ + bsr $26, " #fixup_name " !samegp \n\ /* Move the destination address into position. */ \n\ mov $0, $27 \n\ /* Restore program registers. */ \n\ @@ -308,7 +308,7 @@ _start: \n\ .prologue 0 \n\ /* Pass pointer to argument block to _dl_start. */ \n\ mov $sp, $16 \n\ - bsr $26, "ASM_ALPHA_NG_SYMBOL_PREFIX"_dl_start..ng \n\ + bsr $26, _dl_start !samegp \n\ .end _start \n\ /* FALLTHRU */ \n\ .globl _dl_start_user \n\ @@ -322,7 +322,7 @@ _dl_start_user: \n\ stq $30, __libc_stack_end \n\ /* See if we were run as a command with the executable \n\ file name as an extra leading argument. */ \n\ - ldl $1, _dl_skip_args \n\ + ldl $1, _dl_skip_args($gp) !gprel \n\ bne $1, $fixup_stack \n\ $fixup_stack_ret: \n\ /* The special initializer gets called with the stack \n\ @@ -332,14 +332,16 @@ _dl_start_user: \n\ " RTLD_START_SPECIAL_INIT " \n\ /* Call _dl_init(_dl_loaded, argc, argv, envp) to run \n\ initializers. */ \n\ - ldq $16, _rtld_local \n\ + ldah $16, _rtld_local($gp) !gprelhigh \n\ + ldq $16, _rtld_local($16) !gprellow \n\ ldq $17, 0($sp) \n\ lda $18, 8($sp) \n\ s8addq $17, 8, $19 \n\ addq $19, $18, $19 \n\ - jsr $26, _dl_init_internal \n\ + bsr $26, _dl_init_internal !samegp \n\ /* Pass our finalizer function to the user in $0. */ \n\ - lda $0, _dl_fini \n\ + ldah $0, _dl_fini($gp) !gprelhigh \n\ + lda $0, _dl_fini($0) !gprellow \n\ /* Jump to the user's entry point. */ \n\ mov $9, $27 \n\ jmp ($9) \n\ @@ -541,10 +543,15 @@ elf_machine_rela (struct link_map *map, return; else { - Elf64_Addr loadbase, sym_value; + Elf64_Addr sym_value; - loadbase = RESOLVE (&sym, version, r_type); +#if defined USE_TLS && !defined RTLD_BOOTSTRAP + struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type); + sym_value = sym ? sym_map->l_addr + sym->st_value : 0; +#else + Elf64_Addr loadbase = RESOLVE (&sym, version, r_type); sym_value = sym ? loadbase + sym->st_value : 0; +#endif sym_value += reloc->r_addend; if (r_type == R_ALPHA_GLOB_DAT) @@ -575,6 +582,40 @@ elf_machine_rela (struct link_map *map, memcpy (reloc_addr_1, &sym_value, 8); } #endif +#if defined USE_TLS && (!defined RTLD_BOOTSTRAP || USE___THREAD) + else if (r_type == R_ALPHA_DTPMOD64) + { +#ifdef RTLD_BOOTSTRAP + /* During startup the dynamic linker is always index 1. */ + *reloc_addr = 1; +#else + /* Get the information from the link map returned by the + resolv function. */ + if (sym_map != NULL) + *reloc_addr = sym_map->l_tls_modid; +#endif + } + else if (r_type == R_ALPHA_DTPREL64) + { +#ifndef RTLD_BOOTSTRAP + /* During relocation all TLS symbols are defined and used. + Therefore the offset is already correct. */ + *reloc_addr = sym_value; +#endif + } + else if (r_type == R_ALPHA_TPREL64) + { +#ifdef RTLD_BOOTSTRAP + *reloc_addr = sym_value - map->l_tls_offset; +#else + if (sym_map) + { + *reloc_addr = sym_value - sym_map->l_tls_offset; + CHECK_STATIC_TLS (map, sym_map); + } +#endif + } +#endif /* USE_TLS */ else _dl_reloc_bad_type (map, r_type, 0); } From b53661761beaf7130ba3f0564c61b8dee63f8650 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 9 Nov 2002 00:36:04 +0000 Subject: [PATCH 2953/4487] 2002-09-22 H.J. Lu * sysdeps/unix/sysv/linux/powerpc/mmap64.c: Moved to ... * sysdeps/unix/sysv/linux/mmap64.c: ... here. * sysdeps/unix/sysv/linux/hppa/mmap64.c: File removed. * sysdeps/unix/sysv/linux/sparc/sparc32/mmap64.c: FIle removed, --- sysdeps/unix/sysv/linux/hppa/mmap64.c | 1 - 1 file changed, 1 deletion(-) delete mode 100644 sysdeps/unix/sysv/linux/hppa/mmap64.c diff --git a/sysdeps/unix/sysv/linux/hppa/mmap64.c b/sysdeps/unix/sysv/linux/hppa/mmap64.c deleted file mode 100644 index cf7a5dc8f8..0000000000 --- a/sysdeps/unix/sysv/linux/hppa/mmap64.c +++ /dev/null @@ -1 +0,0 @@ -#include From d15c9a78561e3a5879e1efdf8b5256ee65a9e431 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 15 Nov 2002 22:51:20 +0000 Subject: [PATCH 2954/4487] 2002-11-15 Jakub Jelinek * sysdeps/i386/dl-machine.h (elf_machine_rela): Handle R_386_COPY. * sysdeps/arm/dl-machine.h (elf_machine_rela): Handle R_ARM_COPY. --- sysdeps/arm/dl-machine.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index e3e666a42f..074762e1f0 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -554,12 +554,37 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, return; else { +# ifndef RESOLVE_CONFLICT_FIND_MAP + const Elf32_Sym *const refsym = sym; +# endif Elf32_Addr value = RESOLVE (&sym, version, r_type); if (sym) value += sym->st_value; switch (r_type) { +# ifndef RESOLVE_CONFLICT_FIND_MAP + /* Not needed for dl-conflict.c. */ + case R_ARM_COPY: + if (sym == NULL) + /* This can happen in trace mode if an object could not be + found. */ + break; + if (sym->st_size > refsym->st_size + || (GL(dl_verbose) && sym->st_size < refsym->st_size)) + { + const char *strtab; + + strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]); + _dl_error_printf ("\ +%s: Symbol `%s' has different size in shared object, consider re-linking\n", + rtld_progname ?: "", + strtab + refsym->st_name); + } + memcpy (reloc_addr, (void *) value, MIN (sym->st_size, + refsym->st_size)); + break; +# endif /* !RESOLVE_CONFLICT_FIND_MAP */ case R_ARM_GLOB_DAT: case R_ARM_JUMP_SLOT: case R_ARM_ABS32: From 1a65a64534ab652117dfea1df2992d9d6b04d0e4 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 19 Nov 2002 06:40:57 +0000 Subject: [PATCH 2955/4487] 2002-11-11 Randolf Chung * sysdeps/hppa/fpu/libm-test-ulps: New file (generated). --- sysdeps/hppa/fpu/libm-test-ulps | 890 ++++++++++++++++++++++++++++++++ 1 file changed, 890 insertions(+) create mode 100644 sysdeps/hppa/fpu/libm-test-ulps diff --git a/sysdeps/hppa/fpu/libm-test-ulps b/sysdeps/hppa/fpu/libm-test-ulps new file mode 100644 index 0000000000..e2091f8a15 --- /dev/null +++ b/sysdeps/hppa/fpu/libm-test-ulps @@ -0,0 +1,890 @@ +# Begin of automatic generation + +# atan2 +Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025": +float: 3 +ifloat: 3 +Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025": +float: 3 +ifloat: 3 +Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772": +float: 1 +ifloat: 1 + +# atanh +Test "atanh (0.75) == 0.972955074527656652552676371721589865": +float: 1 +ifloat: 1 + +# cacosh +Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i": +double: 1 +float: 7 +idouble: 1 +ifloat: 7 +Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i": +double: 1 +float: 3 +idouble: 1 +ifloat: 3 + +# casin +Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# casinh +Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": +double: 5 +float: 1 +idouble: 5 +ifloat: 1 +Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": +double: 3 +float: 6 +idouble: 3 +ifloat: 6 +Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# catan +Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": +float: 3 +ifloat: 3 +Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: catan (0.75 + 1.25 i) == 1.10714871779409050301706546017853704 + 0.549306144334054845697622618461262852 i": +float: 4 +ifloat: 4 + +# catanh +Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": +double: 4 +idouble: 4 +Test "Imaginary part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": +float: 4 +ifloat: 4 +Test "Real part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i": +double: 1 +idouble: 1 +Test "Imaginary part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i": +float: 6 +ifloat: 6 + +# cbrt +Test "cbrt (-27.0) == -3.0": +double: 1 +idouble: 1 +Test "cbrt (0.75) == 0.908560296416069829445605878163630251": +double: 1 +idouble: 1 +Test "cbrt (0.9921875) == 0.997389022060725270579075195353955217": +double: 1 +idouble: 1 + +# ccos +Test "Imaginary part of: ccos (-2 - 3 i) == -4.1896256909688072301 - 9.1092278937553365979 i": +float: 1 +ifloat: 1 +Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": +float: 1 +ifloat: 1 + +# ccosh +Test "Real part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i": +float: 1 +ifloat: 1 +Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": +float: 1 +ifloat: 1 + +# cexp +Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": +float: 1 +ifloat: 1 +Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": +float: 1 +ifloat: 1 + +# clog +Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i": +float: 3 +ifloat: 3 +Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i": +float: 1 +ifloat: 1 + +# clog10 +Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-2 - 3 i) == 0.5569716761534183846 - 0.9375544629863747085 i": +double: 1 +float: 5 +idouble: 1 +ifloat: 5 +Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i": +float: 1 +ifloat: 1 + +# cos +Test "cos (M_PI_6l * 2.0) == 0.5": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "cos (M_PI_6l * 4.0) == -0.5": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "cos (pi/2) == 0": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# cpow +Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": +float: 1 +ifloat: 1 +Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i": +double: 1 +float: 4 +idouble: 1 +ifloat: 4 +Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i": +double: 2 +float: 3 +idouble: 2 +ifloat: 3 +Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": +double: 1 +float: 4 +idouble: 1 +ifloat: 4 +Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": +float: 2 +ifloat: 2 +Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + +# csinh +Test "Imaginary part of: csinh (-2 - 3 i) == 3.5905645899857799520 - 0.5309210862485198052 i": +double: 1 +idouble: 1 +Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": +float: 1 +ifloat: 1 + +# csqrt +Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": +float: 1 +ifloat: 1 +Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i": +float: 1 +ifloat: 1 + +# ctan +Test "Real part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i": +double: 1 +idouble: 1 + +# ctanh +Test "Real part of: ctanh (-2 - 3 i) == -0.9653858790221331242 + 0.0098843750383224937 i": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i": +float: 1 +ifloat: 1 +Test "Real part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i": +double: 1 +idouble: 1 + +# erf +Test "erf (1.25) == 0.922900128256458230136523481197281140": +double: 1 +idouble: 1 + +# erfc +Test "erfc (2.0) == 0.00467773498104726583793074363274707139": +double: 1 +idouble: 1 +Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8": +double: 1 +idouble: 1 + +# exp10 +Test "exp10 (-1) == 0.1": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "exp10 (0.75) == 5.62341325190349080394951039776481231": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "exp10 (3) == 1000": +double: 6 +float: 2 +idouble: 6 +ifloat: 2 + +# expm1 +Test "expm1 (0.75) == 1.11700001661267466854536981983709561": +double: 1 +idouble: 1 +Test "expm1 (1) == M_El - 1.0": +float: 1 +ifloat: 1 + +# hypot +Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 + +# j0 +Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "j0 (0.75) == 0.864242275166648623555731103820923211": +float: 1 +ifloat: 1 +Test "j0 (10.0) == -0.245935764451348335197760862485328754": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "j0 (2.0) == 0.223890779141235668051827454649948626": +float: 2 +ifloat: 2 +Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "j0 (8.0) == 0.171650807137553906090869407851972001": +float: 1 +ifloat: 1 + +# j1 +Test "j1 (10.0) == 0.0434727461688614366697487680258592883": +float: 2 +ifloat: 2 +Test "j1 (2.0) == 0.576724807756873387202448242269137087": +double: 1 +idouble: 1 +Test "j1 (8.0) == 0.234636346853914624381276651590454612": +double: 1 +idouble: 1 + +# jn +Test "jn (0, -4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (0, 0.75) == 0.864242275166648623555731103820923211": +float: 1 +ifloat: 1 +Test "jn (0, 10.0) == -0.245935764451348335197760862485328754": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "jn (0, 2.0) == 0.223890779141235668051827454649948626": +float: 2 +ifloat: 2 +Test "jn (0, 4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (0, 8.0) == 0.171650807137553906090869407851972001": +float: 1 +ifloat: 1 +Test "jn (1, 10.0) == 0.0434727461688614366697487680258592883": +float: 2 +ifloat: 2 +Test "jn (1, 2.0) == 0.576724807756873387202448242269137087": +double: 1 +idouble: 1 +Test "jn (1, 8.0) == 0.234636346853914624381276651590454612": +double: 1 +idouble: 1 +Test "jn (10, 0.125) == 0.250543369809369890173993791865771547e-18": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (10, 0.75) == 0.149621713117596814698712483621682835e-10": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (10, 10.0) == 0.207486106633358857697278723518753428": +double: 4 +float: 3 +idouble: 4 +ifloat: 3 +Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6": +float: 4 +ifloat: 4 +Test "jn (3, 0.125) == 0.406503832554912875023029337653442868e-4": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (3, 0.75) == 0.848438342327410884392755236884386804e-2": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (3, 10.0) == 0.0583793793051868123429354784103409563": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "jn (3, 2.0) == 0.128943249474402051098793332969239835": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +# lgamma +Test "lgamma (0.7) == 0.26086724653166651439": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "lgamma (1.2) == -0.853740900033158497197e-1": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +# log10 +Test "log10 (0.75) == -0.124938736608299953132449886193870744": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +Test "log10 (e) == log10(e)": +float: 1 +ifloat: 1 + +# log1p +Test "log1p (-0.25) == -0.287682072451780927439219005993827432": +float: 1 +ifloat: 1 + +# sincos +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res": +float: 1 +ifloat: 1 + +# tan +Test "tan (pi/4) == 1": +double: 1 +idouble: 1 + +# tgamma +Test "tgamma (-0.5) == -2 sqrt (pi)": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "tgamma (0.5) == sqrt (pi)": +float: 1 +ifloat: 1 +Test "tgamma (0.7) == 1.29805533264755778568": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# y0 +Test "y0 (1.0) == 0.0882569642156769579829267660235151628": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "y0 (1.5) == 0.382448923797758843955068554978089862": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "y0 (10.0) == 0.0556711672835993914244598774101900481": +float: 1 +ifloat: 1 +Test "y0 (8.0) == 0.223521489387566220527323400498620359": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# y1 +Test "y1 (0.125) == -5.19993611253477499595928744876579921": +double: 1 +idouble: 1 +Test "y1 (1.5) == -0.412308626973911295952829820633445323": +float: 1 +ifloat: 1 +Test "y1 (10.0) == 0.249015424206953883923283474663222803": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "y1 (2.0) == -0.107032431540937546888370772277476637": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "y1 (8.0) == -0.158060461731247494255555266187483550": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +# yn +Test "yn (0, 1.0) == 0.0882569642156769579829267660235151628": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "yn (0, 1.5) == 0.382448923797758843955068554978089862": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "yn (0, 10.0) == 0.0556711672835993914244598774101900481": +float: 1 +ifloat: 1 +Test "yn (0, 8.0) == 0.223521489387566220527323400498620359": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (1, 0.125) == -5.19993611253477499595928744876579921": +double: 1 +idouble: 1 +Test "yn (1, 1.5) == -0.412308626973911295952829820633445323": +float: 1 +ifloat: 1 +Test "yn (1, 10.0) == 0.249015424206953883923283474663222803": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "yn (1, 2.0) == -0.107032431540937546888370772277476637": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (1, 8.0) == -0.158060461731247494255555266187483550": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +Test "yn (10, 0.125) == -127057845771019398.252538486899753195": +double: 1 +idouble: 1 +Test "yn (10, 0.75) == -2133501638.90573424452445412893839236": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (10, 1.0) == -121618014.278689189288130426667971145": +double: 1 +idouble: 1 +Test "yn (10, 10.0) == -0.359814152183402722051986577343560609": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (10, 2.0) == -129184.542208039282635913145923304214": +double: 2 +idouble: 2 +Test "yn (3, 0.125) == -2612.69757350066712600220955744091741": +double: 1 +idouble: 1 +Test "yn (3, 0.75) == -12.9877176234475433186319774484809207": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (3, 10.0) == -0.251362657183837329779204747654240998": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (3, 2.0) == -1.12778377684042778608158395773179238": +double: 1 +idouble: 1 + +# Maximal error of functions: +Function: "atan2": +float: 3 +ifloat: 3 + +Function: "atanh": +float: 1 +ifloat: 1 + +Function: Real part of "cacosh": +double: 1 +float: 7 +idouble: 1 +ifloat: 7 + +Function: Imaginary part of "cacosh": +double: 1 +float: 3 +idouble: 1 +ifloat: 3 + +Function: Real part of "casin": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "casinh": +double: 5 +float: 1 +idouble: 5 +ifloat: 1 + +Function: Imaginary part of "casinh": +double: 3 +float: 6 +idouble: 3 +ifloat: 6 + +Function: Real part of "catan": +float: 4 +ifloat: 4 + +Function: Imaginary part of "catan": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "catanh": +double: 4 +idouble: 4 + +Function: Imaginary part of "catanh": +float: 6 +ifloat: 6 + +Function: "cbrt": +double: 1 +idouble: 1 + +Function: Real part of "ccos": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "ccos": +float: 1 +ifloat: 1 + +Function: Real part of "ccosh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "ccosh": +float: 1 +ifloat: 1 + +Function: Real part of "cexp": +float: 1 +ifloat: 1 + +Function: Imaginary part of "cexp": +float: 1 +ifloat: 1 + +Function: Real part of "clog": +float: 1 +ifloat: 1 + +Function: Imaginary part of "clog": +float: 3 +ifloat: 3 + +Function: Real part of "clog10": +float: 1 +ifloat: 1 + +Function: Imaginary part of "clog10": +double: 1 +float: 5 +idouble: 1 +ifloat: 5 + +Function: "cos": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + +Function: Real part of "cpow": +double: 2 +float: 4 +idouble: 2 +ifloat: 4 + +Function: Imaginary part of "cpow": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + +Function: Real part of "csinh": +float: 1 +ifloat: 1 + +Function: Imaginary part of "csinh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "csqrt": +float: 1 +ifloat: 1 + +Function: Real part of "ctan": +double: 1 +idouble: 1 + +Function: Imaginary part of "ctan": +double: 1 +idouble: 1 + +Function: Real part of "ctanh": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +Function: Imaginary part of "ctanh": +float: 1 +ifloat: 1 + +Function: "erf": +double: 1 +idouble: 1 + +Function: "erfc": +double: 1 +idouble: 1 + +Function: "exp10": +double: 6 +float: 2 +idouble: 6 +ifloat: 2 + +Function: "expm1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "hypot": +float: 1 +ifloat: 1 + +Function: "j0": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + +Function: "j1": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +Function: "jn": +double: 4 +float: 4 +idouble: 4 +ifloat: 4 + +Function: "lgamma": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +Function: "log10": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +Function: "log1p": +float: 1 +ifloat: 1 + +Function: "sincos": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "tan": +double: 1 +idouble: 1 + +Function: "tgamma": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "y0": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + +Function: "y1": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 + +Function: "yn": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 + +# end of automatic generation From 4d1f248e713bbd97c9f5e8a183a1d9e9191f4bae Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 19 Nov 2002 06:41:02 +0000 Subject: [PATCH 2956/4487] 2002-11-11 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/sys/ucontext.h: Define mcontext_t as a sigcontext. --- sysdeps/unix/sysv/linux/hppa/sys/ucontext.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h b/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h index 0f14b46adb..1431143849 100644 --- a/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h @@ -52,11 +52,7 @@ typedef struct fpregset } fpregset_t; /* Context to describe whole processor state. */ -typedef struct - { - gregset_t gregs; - fpregset_t fpregs; - } mcontext_t; +typedef struct sigcontext mcontext_t; /* Userlevel context. */ typedef struct ucontext From c4eca6400535e8a1f863122d07a03ed35a078541 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 19 Nov 2002 06:41:05 +0000 Subject: [PATCH 2957/4487] 2002-11-11 Randolf Chung * sysdeps/hppa/Makefile (CFLAGS-rtld.c): New variable. Set -mdisable-fpregs for this file. --- sysdeps/hppa/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/hppa/Makefile b/sysdeps/hppa/Makefile index 22be575abd..170bd07ab3 100644 --- a/sysdeps/hppa/Makefile +++ b/sysdeps/hppa/Makefile @@ -27,6 +27,7 @@ CFLAGS-malloc.c += -DMALLOC_ALIGNMENT=16 endif ifeq ($(subdir),elf) +CFLAGS-rtld.c += -mdisable-fpregs dl-routines += dl-symaddr dl-fptr rtld-routines += dl-symaddr dl-fptr endif From 859f3bbf75677defb0a7a4c757c2989e3d884f6d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 19 Nov 2002 09:26:56 +0000 Subject: [PATCH 2958/4487] 2002-11-11 Randolf Chung * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h [__USE_FILE_OFFSET64] (F_GETLK, F_SETLK, F_SETLKW): Define to F_*64 versions. * sysdeps/unix/sysv/linux/hppa/fcntl.c: New file. --- sysdeps/unix/sysv/linux/hppa/bits/fcntl.h | 15 +++++++++++---- sysdeps/unix/sysv/linux/hppa/fcntl.c | 1 + 2 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/hppa/fcntl.c diff --git a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h index dc68122f8f..fca17b1b77 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h @@ -1,5 +1,6 @@ /* O_*, F_*, FD_* bit values for Linux/HPPA. - Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1995,1996,1997,1998,1999,2000,2002 + 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 @@ -63,9 +64,15 @@ #define F_SETFD 2 /* Set file descriptor flags. */ #define F_GETFL 3 /* Get file status flags. */ #define F_SETFL 4 /* Set file status flags. */ -#define F_GETLK 5 /* Get record locking info. */ -#define F_SETLK 6 /* Set record locking info (non-blocking). */ -#define F_SETLKW 7 /* Set record locking info (blocking). */ +#ifndef __USE_FILE_OFFSET64 +# define F_GETLK 5 /* Get record locking info. */ +# define F_SETLK 6 /* Set record locking info (non-blocking). */ +# define F_SETLKW 7 /* Set record locking info (blocking). */ +#else +# define F_GETLK F_GETLK64 /* Get record locking info. */ +# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking). */ +# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */ +#endif #define F_GETLK64 8 /* Get record locking info. */ #define F_SETLK64 9 /* Set record locking info (non-blocking). */ diff --git a/sysdeps/unix/sysv/linux/hppa/fcntl.c b/sysdeps/unix/sysv/linux/hppa/fcntl.c new file mode 100644 index 0000000000..ea951bc4f9 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/fcntl.c @@ -0,0 +1 @@ +#include From 0798f1ad5e743c5fb5906e9b6e7bb03aa1e5596b Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 24 Nov 2002 19:41:42 +0000 Subject: [PATCH 2959/4487] Support inline syscall with six arguments. --- sysdeps/unix/sysv/linux/m68k/sysdep.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h index 6d0817cf2e..1247cc49f2 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -203,5 +203,9 @@ SYSCALL_ERROR_LABEL: \ register int _d5 asm ("d5") = (int) (a5); \ LOAD_ARGS_4 (a1, a2, a3, a4) #define ASM_ARGS_5 ASM_ARGS_4, "d" (_d5) +#define LOAD_ARGS_6(a1, a2, a3, a4, a5, a6) \ + register int _a0 asm ("a0") = (int) (a6); \ + LOAD_ARGS_5 (a1, a2, a3, a4, a5) +#define ASM_ARGS_6 ASM_ARGS_5, "a" (_a0) #endif /* not __ASSEMBLER__ */ From ab18ecf4a7332ea411536f7ef0cee3ade04ab679 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 28 Nov 2002 22:47:04 +0000 Subject: [PATCH 2960/4487] Change defined(USE___THREAD) to USE___THREAD. --- sysdeps/unix/alpha/sysdep.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S index 50c84c1166..4c7c134333 100644 --- a/sysdeps/unix/alpha/sysdep.S +++ b/sysdeps/unix/alpha/sysdep.S @@ -45,7 +45,7 @@ .ent __syscall_error __syscall_error: -#if defined(_LIBC_REENTRANT) && defined(USE___THREAD) +#if defined(_LIBC_REENTRANT) && USE___THREAD LOADGP PROLOGUE From 8545e2d25e3721319e5f76c65faa0a26a469070c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 28 Nov 2002 22:47:27 +0000 Subject: [PATCH 2961/4487] (inline_syscall*): Avoid "=v" constraints. --- sysdeps/unix/sysv/linux/alpha/sysdep.h | 54 ++++++++++++++++---------- 1 file changed, 34 insertions(+), 20 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h index 3bf25e6fd2..da65caea41 100644 --- a/sysdeps/unix/sysv/linux/alpha/sysdep.h +++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h @@ -93,105 +93,117 @@ #define inline_syscall0(name) \ { \ + register long _sc_0 __asm__("$0"); \ register long _sc_19 __asm__("$19"); \ \ + _sc_0 = __NR_##name; \ __asm__("callsys # %0 %1 <= %2" \ - : "=v"(_sc_ret), "=r"(_sc_19) \ - : "0"(__NR_##name) \ + : "=r"(_sc_0), "=r"(_sc_19) \ + : "0"(_sc_0) \ : inline_syscall_clobbers, \ "$16", "$17", "$18", "$20", "$21"); \ - _sc_err = _sc_19; \ + _sc_ret = _sc_0, _sc_err = _sc_19; \ } #define inline_syscall1(name,arg1) \ { \ + register long _sc_0 __asm__("$0"); \ register long _sc_16 __asm__("$16"); \ register long _sc_19 __asm__("$19"); \ \ + _sc_0 = __NR_##name; \ _sc_16 = (long) (arg1); \ __asm__("callsys # %0 %1 <= %2 %3" \ - : "=v"(_sc_ret), "=r"(_sc_19), \ + : "=r"(_sc_0), "=r"(_sc_19), \ "=r"(_sc_16) \ - : "0"(__NR_##name), "2"(_sc_16) \ + : "0"(_sc_0), "2"(_sc_16) \ : inline_syscall_clobbers, \ "$17", "$18", "$20", "$21"); \ - _sc_err = _sc_19; \ + _sc_ret = _sc_0, _sc_err = _sc_19; \ } #define inline_syscall2(name,arg1,arg2) \ { \ + register long _sc_0 __asm__("$0"); \ register long _sc_16 __asm__("$16"); \ register long _sc_17 __asm__("$17"); \ register long _sc_19 __asm__("$19"); \ \ + _sc_0 = __NR_##name; \ _sc_16 = (long) (arg1); \ _sc_17 = (long) (arg2); \ __asm__("callsys # %0 %1 <= %2 %3 %4" \ - : "=v"(_sc_ret), "=r"(_sc_19), \ + : "=r"(_sc_0), "=r"(_sc_19), \ "=r"(_sc_16), "=r"(_sc_17) \ - : "0"(__NR_##name), "2"(_sc_16), "3"(_sc_17) \ + : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17) \ : inline_syscall_clobbers, \ "$18", "$20", "$21"); \ - _sc_err = _sc_19; \ + _sc_ret = _sc_0, _sc_err = _sc_19; \ } #define inline_syscall3(name,arg1,arg2,arg3) \ { \ + register long _sc_0 __asm__("$0"); \ register long _sc_16 __asm__("$16"); \ register long _sc_17 __asm__("$17"); \ register long _sc_18 __asm__("$18"); \ register long _sc_19 __asm__("$19"); \ \ + _sc_0 = __NR_##name; \ _sc_16 = (long) (arg1); \ _sc_17 = (long) (arg2); \ _sc_18 = (long) (arg3); \ __asm__("callsys # %0 %1 <= %2 %3 %4 %5" \ - : "=v"(_sc_ret), "=r"(_sc_19), \ + : "=r"(_sc_0), "=r"(_sc_19), \ "=r"(_sc_16), "=r"(_sc_17), "=r"(_sc_18) \ - : "0"(__NR_##name), "2"(_sc_16), "3"(_sc_17), \ + : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \ "4"(_sc_18) \ : inline_syscall_clobbers, "$20", "$21"); \ - _sc_err = _sc_19; \ + _sc_ret = _sc_0, _sc_err = _sc_19; \ } #define inline_syscall4(name,arg1,arg2,arg3,arg4) \ { \ + register long _sc_0 __asm__("$0"); \ register long _sc_16 __asm__("$16"); \ register long _sc_17 __asm__("$17"); \ register long _sc_18 __asm__("$18"); \ register long _sc_19 __asm__("$19"); \ \ + _sc_0 = __NR_##name; \ _sc_16 = (long) (arg1); \ _sc_17 = (long) (arg2); \ _sc_18 = (long) (arg3); \ _sc_19 = (long) (arg4); \ __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6" \ - : "=v"(_sc_ret), "=r"(_sc_19), \ + : "=r"(_sc_0), "=r"(_sc_19), \ "=r"(_sc_16), "=r"(_sc_17), "=r"(_sc_18) \ - : "0"(__NR_##name), "2"(_sc_16), "3"(_sc_17), \ + : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \ "4"(_sc_18), "1"(_sc_19) \ : inline_syscall_clobbers, "$20", "$21"); \ - _sc_err = _sc_19; \ + _sc_ret = _sc_0, _sc_err = _sc_19; \ } #define inline_syscall5(name,arg1,arg2,arg3,arg4,arg5) \ { \ + register long _sc_0 __asm__("$0"); \ register long _sc_16 __asm__("$16"); \ register long _sc_17 __asm__("$17"); \ register long _sc_18 __asm__("$18"); \ register long _sc_19 __asm__("$19"); \ register long _sc_20 __asm__("$20"); \ \ + _sc_0 = __NR_##name; \ _sc_16 = (long) (arg1); \ _sc_17 = (long) (arg2); \ _sc_18 = (long) (arg3); \ _sc_19 = (long) (arg4); \ _sc_20 = (long) (arg5); \ __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7" \ - : "=v"(_sc_ret), "=r"(_sc_19), \ + : "=r"(_sc_0), "=r"(_sc_19), \ "=r"(_sc_16), "=r"(_sc_17), "=r"(_sc_18), \ "=r"(_sc_20) \ - : "0"(__NR_##name), "2"(_sc_16), "3"(_sc_17), \ + : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \ "4"(_sc_18), "1"(_sc_19), "5"(_sc_20) \ : inline_syscall_clobbers, "$21"); \ _sc_ret = _sc_0, _sc_err = _sc_19; \ @@ -199,6 +211,7 @@ #define inline_syscall6(name,arg1,arg2,arg3,arg4,arg5,arg6) \ { \ + register long _sc_0 __asm__("$0"); \ register long _sc_16 __asm__("$16"); \ register long _sc_17 __asm__("$17"); \ register long _sc_18 __asm__("$18"); \ @@ -206,6 +219,7 @@ register long _sc_20 __asm__("$20"); \ register long _sc_21 __asm__("$21"); \ \ + _sc_0 = __NR_##name; \ _sc_16 = (long) (arg1); \ _sc_17 = (long) (arg2); \ _sc_18 = (long) (arg3); \ @@ -213,14 +227,14 @@ _sc_20 = (long) (arg5); \ _sc_21 = (long) (arg6); \ __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7 %8" \ - : "=v"(_sc_ret), "=r"(_sc_19) \ + : "=r"(_sc_0), "=r"(_sc_19) \ "=r"(_sc_16), "=r"(_sc_17), "=r"(_sc_18), \ "=r"(_sc_20), "=r"(_sc_21) \ - : "0"(__NR_##name), "2"(_sc_16), "3"(_sc_17), \ + : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \ "4"(_sc_18), "1"(_sc_19), "5"(_sc_20), \ "6"(_sc_21) \ : inline_syscall_clobbers); \ - _sc_err = _sc_19; \ + _sc_ret = _sc_0, _sc_err = _sc_19; \ } #endif /* _LINUX_ALPHA_SYSDEP_H */ From b7d5c13d9d6aad8970dc026183ffed48fc433e66 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 3 Dec 2002 02:50:52 +0000 Subject: [PATCH 2962/4487] 2002-12-02 Carlos O'Donell * sysdeps/hppa/fpu/fesetround.c (fesetround): Use ~FE_DOWNWARD so both bits of RM are cleared. --- sysdeps/hppa/fpu/fesetround.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/hppa/fpu/fesetround.c b/sysdeps/hppa/fpu/fesetround.c index 7634b1e1d7..3687624c2b 100644 --- a/sysdeps/hppa/fpu/fesetround.c +++ b/sysdeps/hppa/fpu/fesetround.c @@ -31,7 +31,7 @@ fesetround (int round) /* Get the current status word. */ __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw)); - sw[0] &= ~FE_UPWARD; + sw[0] &= ~FE_DOWNWARD; sw[0] |= round; __asm__ ("fldd 0(%0),%%fr0" : : "r" (sw)); From 3c49a7f2c2dcd3521d74a572458e739582711180 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 3 Dec 2002 07:28:08 +0000 Subject: [PATCH 2963/4487] 2002-12-02 Roland McGrath * sysdeps/unix/sysv/linux/alpha/syscalls.list (readahead): Change caller from EXTRA to -. * sysdeps/unix/sysv/linux/x86_64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewise. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 7c1a0bebf2..c8ab6ec847 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -28,7 +28,7 @@ getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64 setrlimit - setrlimit 2 __setrlimit setrlimit64 setrlimit ftruncate - ftruncate 2 __ftruncate ftruncate __ftruncate64 ftruncate64 truncate - truncate 2 truncate truncate64 -readahead EXTRA readahead 3 __readahead readahead +readahead - readahead 3 __readahead readahead sendfile - sendfile i:iipi sendfile sendfile64 # these are actually common with the x86: From 3a56243bb0e93c699f46e48efeca06fac139cfd6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 5 Dec 2002 00:23:59 +0000 Subject: [PATCH 2964/4487] (struct sigevent): Change type of _attribute to void*. --- sysdeps/unix/sysv/linux/alpha/bits/siginfo.h | 6 +++--- sysdeps/unix/sysv/linux/mips/bits/siginfo.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h b/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h index 2cc92babba..11da79215e 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h @@ -1,5 +1,5 @@ /* siginfo_t, sigevent and constants. Linux/Alpha version. - Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1997,1998,1999,2000,2001,2002 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 @@ -282,8 +282,8 @@ typedef struct sigevent struct { - void (*_function) (sigval_t); /* Function to start. */ - struct __pthread_attr_s *_attribute; /* Really pthread_attr_t. */ + void (*_function) (sigval_t); /* Function to start. */ + void *_attribute; /* Really pthread_attr_t. */ } _sigev_thread; } _sigev_un; } sigevent_t; diff --git a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h index f385372bd0..7d5cfa9c3d 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h +++ b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h @@ -1,5 +1,5 @@ /* siginfo_t, sigevent and constants. Linux/MIPS version. - Copyright (C) 1997, 1998, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 2000, 2001, 2002 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 @@ -271,8 +271,8 @@ typedef struct sigevent struct { - void (*_function) (sigval_t); /* Function to start. */ - struct __pthread_attr_s *_attribute; /* Really pthread_attr_t. */ + void (*_function) (sigval_t); /* Function to start. */ + void *_attribute; /* Really pthread_attr_t. */ } _sigev_thread; } _sigev_un; } sigevent_t; From fec78d3f4e850cb2ecf2ed11a56077bbfd41f82a Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 5 Dec 2002 23:46:39 +0000 Subject: [PATCH 2965/4487] 2002-12-05 Jakub Jelinek * sysdeps/unix/sysv/linux/x86_64/syscalls.list (sendfile): Change args to i:iipi. (readahead): Change args to i:iii. * sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list (readahead): Change args to i:iii. * sysdeps/unix/sysv/linux/mips/syscalls.list (readahead): Change args to i:iiii. --- sysdeps/unix/sysv/linux/mips/syscalls.list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index f12195fa6b..76b8b0fe15 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -66,7 +66,7 @@ s_pread64 pread64 pread i:ibniii __syscall_pread s_putpmsg putpmsg putpmsg i:ippii __syscall_putpmsg s_ptrace ptrace ptrace i:iipp __syscall_ptrace s_pwrite64 pwrite64 pwrite i:ibniii __syscall_pwrite -s_readahead EXTRA readahead i:iipi __syscall_readahead +s_readahead EXTRA readahead i:iiii __syscall_readahead s_reboot reboot reboot i:iii __syscall_reboot s_setrlimit setrlimit setrlimit i:ip __syscall_setrlimit s_sigpending sigpending sigpending i:p __syscall_sigpending From 99c37bc7d86321f473cf6de7d7bafdea5fc5e88a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 8 Dec 2002 22:53:46 +0000 Subject: [PATCH 2966/4487] Added SHMLBA #define. --- sysdeps/unix/sysv/linux/hppa/bits/shm.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/hppa/bits/shm.h b/sysdeps/unix/sysv/linux/hppa/bits/shm.h index 52b11edfa6..a07213caa8 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/shm.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/shm.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 2000, 2002 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 @@ -36,6 +36,8 @@ #define SHM_LOCK 11 /* lock segment (root only) */ #define SHM_UNLOCK 12 /* unlock segment (root only) */ +/* Segment low boundary address multiple. */ +#define SHMLBA 0x00400000 /* address needs to be 4 Mb aligned */ /* Type to count number of attaches. */ typedef unsigned long int shmatt_t; From f8a26bed6f428d063fb335d3bb5ee51de91779b3 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 9 Dec 2002 20:37:24 +0000 Subject: [PATCH 2967/4487] 2002-12-08 Roland McGrath * elf/Makefile (tests): Uncomment tst-array[123]. * Makeconfig (CPPFLAGS-.oS): Add -DLIBC_NONSHARED=1. * csu/elf-init.c: New file. * csu/Makefile (routines, static-only-routines): Add elf-init. * sysdeps/alpha/elf/start.S: Use __libc_csu_init in place of _init and __libc_csu_fini in place of _fini. * sysdeps/arm/elf/start.S: Likewise. * sysdeps/cris/elf/start.S: Likewise. * sysdeps/hppa/elf/start.S: Likewise. * sysdeps/i386/elf/start.S: Likewise. * sysdeps/ia64/elf/start.S: Likewise. * sysdeps/m68k/elf/start.S: Likewise. * sysdeps/mach/hurd/powerpc/static-start.S: Likewise. * sysdeps/mips/elf/start.S: Likewise. * sysdeps/powerpc/powerpc32/elf/start.S: Likewise. * sysdeps/powerpc/powerpc64/elf/start.S: Likewise. * sysdeps/s390/s390-32/elf/start.S: Likewise. * sysdeps/s390/s390-64/elf/start.S: Likewise. * sysdeps/sh/elf/start.S: Likewise. * sysdeps/sparc/sparc32/elf/start.S: Likewise. * sysdeps/sparc/sparc64/elf/start.S: Likewise. * sysdeps/x86_64/elf/start.S: Likewise. --- sysdeps/alpha/elf/start.S | 6 +++--- sysdeps/arm/elf/start.S | 6 +++--- sysdeps/cris/elf/start.S | 10 +++++----- sysdeps/hppa/elf/start.S | 37 ++++++++++++++++++++++++++----------- sysdeps/m68k/elf/start.S | 6 +++--- sysdeps/mips/elf/start.S | 4 ++-- 6 files changed, 42 insertions(+), 27 deletions(-) diff --git a/sysdeps/alpha/elf/start.S b/sysdeps/alpha/elf/start.S index b0cf119feb..3f98111fd9 100644 --- a/sysdeps/alpha/elf/start.S +++ b/sysdeps/alpha/elf/start.S @@ -1,5 +1,5 @@ /* Startup code for Alpha/ELF. - Copyright (C) 1993,1995,1996,1997,1998,2000,2001 Free Software Foundation, Inc. + Copyright (C) 1993,1995,1996,1997,1998,2000,2001, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson @@ -40,8 +40,8 @@ _start: lda a2, 24(sp) /* get argv */ /* Load address of our own entry points to .fini and .init. */ - lda a3, _init - lda a4, _fini + lda a3, __libc_csu_init + lda a4, __libc_csu_fini /* Store address of the shared library termination function. */ mov v0, a5 diff --git a/sysdeps/arm/elf/start.S b/sysdeps/arm/elf/start.S index 8d60b3d8d5..90a62f6d9a 100644 --- a/sysdeps/arm/elf/start.S +++ b/sysdeps/arm/elf/start.S @@ -1,5 +1,5 @@ /* Startup code for ARM & ELF - Copyright (C) 1995, 1996, 1997, 1998, 2001 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997, 1998, 2001, 2002 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 @@ -54,12 +54,12 @@ _start: /* Push the last arguments to main() onto the stack */ stmfd sp!, {a1} - ldr a1, =_fini + ldr a1, =__libc_csu_fini stmfd sp!, {a1} /* Set up the other arguments for main() that go in registers */ ldr a1, =main - ldr a4, =_init + ldr a4, =__libc_csu_init /* __libc_start_main (main, argc, argv, init, fini, rtld_fini) */ diff --git a/sysdeps/cris/elf/start.S b/sysdeps/cris/elf/start.S index e7f1d6750d..dbe408a076 100644 --- a/sysdeps/cris/elf/start.S +++ b/sysdeps/cris/elf/start.S @@ -1,5 +1,5 @@ /* Startup code compliant to the ELF CRIS ABI (to-be-written). - Copyright (C) 2001 Free Software Foundation, Inc. + Copyright (C) 2001, 2002 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 @@ -89,15 +89,15 @@ _start: move.d pc,r0 sub.d .:GOTOFF,r0 - move.d _init:PLTG,r13 + move.d __libc_csu_init:PLTG,r13 add.d r0,r13 - move.d _fini:PLTG,r9 + move.d __libc_csu_fini:PLTG,r9 add.d r0,r9 move.d main:PLTG,r10 add.d r0,r10 #else - move.d _init,r13 - move.d _fini,r9 + move.d __libc_csu_init,r13 + move.d __libc_csu_fini,r9 move.d main,r10 #endif push r9 diff --git a/sysdeps/hppa/elf/start.S b/sysdeps/hppa/elf/start.S index b2f0bd2ad1..c7e300c543 100644 --- a/sysdeps/hppa/elf/start.S +++ b/sysdeps/hppa/elf/start.S @@ -1,3 +1,21 @@ +/* ELF startup code for HPPA. + Copyright (C) 2002 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. */ .text @@ -6,12 +24,9 @@ .import main, code .import $global$, data .import __libc_start_main, code - .import _fini, code - .import _init, code + .import __libc_csu_fini, code + .import __libc_csu_init, code - - - .globl _start .export _start, ENTRY .type _start,@function @@ -28,17 +43,17 @@ _start: /* Expand the stack to store the 5th through 7th args */ ldo 64(%sp), %sp - + /* void (*rtld_fini) (void) (actually the 6th arg) */ stw %r23, -56(%sp) - + /* void (*init) (void) */ - ldil LP%_init, %r23 - ldo RP%_init(%r23), %r23 + ldil LP%__libc_csu_init, %r23 + ldo RP%__libc_csu_init(%r23), %r23 /* void (*fini) (void) */ - ldil LP%_fini, %r22 - ldo RP%_fini(%r22), %r22 + ldil LP%__libc_csu_fini, %r22 + ldo RP%__libc_csu_fini(%r22), %r22 stw %r22, -52(%sp) /* void *stack_end */ diff --git a/sysdeps/m68k/elf/start.S b/sysdeps/m68k/elf/start.S index eda735583d..f65cda75cd 100644 --- a/sysdeps/m68k/elf/start.S +++ b/sysdeps/m68k/elf/start.S @@ -1,5 +1,5 @@ /* Startup code compliant to the ELF m68k ABI. - Copyright (C) 1996, 1997, 1998, 2001 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 2001, 2002 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 @@ -60,8 +60,8 @@ _start: /* Push the address of our own entry points to `.fini' and `.init'. */ - pea _fini - pea _init + pea __libc_csu_fini + pea __libc_csu_init pea (%a0) /* Push second argument: argv. */ move.l %d0, -(%sp) /* Push first argument: argc. */ diff --git a/sysdeps/mips/elf/start.S b/sysdeps/mips/elf/start.S index 01908e28db..e85e9f535e 100644 --- a/sysdeps/mips/elf/start.S +++ b/sysdeps/mips/elf/start.S @@ -83,8 +83,8 @@ ENTRY_POINT: the stack is aligned to double words (8 bytes). */ and $29, 0xfffffff8 subu $29, 32 - la $7, _init /* init */ - la $8, _fini + la $7, __libc_csu_init /* init */ + la $8, __libc_csu_fini sw $8, 16($29) /* fini */ sw $2, 20($29) /* rtld_fini */ sw $29, 24($29) /* stack_end */ From b344de66b69ca37a1d2b170f4fa67645c418459b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 10 Dec 2002 20:33:12 +0000 Subject: [PATCH 2968/4487] (__libc_select): New alias. --- sysdeps/unix/sysv/linux/alpha/select.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/select.S b/sysdeps/unix/sysv/linux/alpha/select.S index d3b206df6e..7d5282d621 100644 --- a/sysdeps/unix/sysv/linux/alpha/select.S +++ b/sysdeps/unix/sysv/linux/alpha/select.S @@ -125,7 +125,9 @@ default_symbol_version (__select_tv64, __select, GLIBC_2.1) strong_alias (__select_tv64, __select_tv64p) default_symbol_version (__select_tv64p, select, GLIBC_2.1) libc_hidden_ver (__select_tv64, __select) +strong_alias (__select_tv64, __libc_select) #else +strong_alias (__select, __libc_select) weak_alias (__select, select) libc_hidden_def (__select) #endif From 3bfd489bb9293ba9b13cdb29bd082aaa0e7a3ec6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 10 Dec 2002 20:33:27 +0000 Subject: [PATCH 2969/4487] (__libc_sigsuspend): Likewise. --- sysdeps/unix/sysv/linux/alpha/sigsuspend.S | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S index 955d82ecc8..e0f18c26b4 100644 --- a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S +++ b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S @@ -53,3 +53,4 @@ error: libc_hidden_def (__sigsuspend) weak_alias(__sigsuspend, sigsuspend) +strong_alias (__sigsuspend, __libc_sigsuspend) From 9de983ba90721811ea4bb01baf837f17bdf7ca03 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Dec 2002 00:49:51 +0000 Subject: [PATCH 2970/4487] (llseek, pread, pwrite, accept, connect, recv, recvfrom, recvmsg, send, sendmsg, sendto, osf_select): Make cancelable. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 24 ++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index c8ab6ec847..7f5c9d0052 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -19,9 +19,9 @@ vfork - vfork 0 __vfork vfork getpeername - getpeername 3 __getpeername getpeername getpriority - getpriority 2 __getpriority getpriority mmap - mmap 6 __mmap mmap __mmap64 mmap64 -llseek EXTRA lseek 3 __libc_lseek64 __llseek llseek __lseek64 lseek64 -pread - pread 4 __libc_pread __libc_pread64 __pread pread __pread64 pread64 -pwrite - pwrite 4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64 +llseek EXTRA lseek C:3 __libc_lseek64 __llseek llseek __lseek64 lseek64 +pread - pread C:4 __libc_pread __libc_pread64 __pread pread __pread64 pread64 +pwrite - pwrite C:4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64 fstatfs - fstatfs 2 __fstatfs fstatfs __fstatfs64 fstatfs64 statfs - statfs 2 __statfs statfs statfs64 getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64 @@ -36,20 +36,20 @@ sys_ustat ustat ustat 2 __syscall_ustat sys_mknod xmknod mknod 3 __syscall_mknod # proper socket implementations: -accept - accept 3 __libc_accept __accept accept +accept - accept C:3 __libc_accept __accept accept bind - bind 3 __bind bind -connect - connect 3 __libc_connect __connect_internal __connect connect +connect - connect C:3 __libc_connect __connect_internal __connect connect getpeername - getpeername 3 __getpeername getpeername getsockname - getsockname 3 __getsockname getsockname getsockopt - getsockopt 5 __getsockopt getsockopt listen - listen 2 __listen listen -recv - recv 4 __libc_recv __recv recv -recvfrom - recvfrom 6 __libc_recvfrom __recvfrom recvfrom -recvmsg - recvmsg 3 __libc_recvmsg __recvmsg recvmsg +recv - recv C:4 __libc_recv __recv recv +recvfrom - recvfrom C:6 __libc_recvfrom __recvfrom recvfrom +recvmsg - recvmsg C:3 __libc_recvmsg __recvmsg recvmsg ptrace - ptrace 4 __ptrace ptrace -send - send 4 __libc_send __send send -sendmsg - sendmsg 3 __libc_sendmsg __sendmsg sendmsg -sendto - sendto 6 __libc_sendto __sendto sendto +send - send C:4 __libc_send __send send +sendmsg - sendmsg C:3 __libc_sendmsg __sendmsg sendmsg +sendto - sendto C:6 __libc_sendto __sendto sendto setsockopt - setsockopt 5 __setsockopt setsockopt shutdown - shutdown 2 __shutdown shutdown socket - socket 3 __socket socket @@ -64,7 +64,7 @@ pciconfig_iobase EXTRA pciconfig_iobase 3 __pciconfig_iobase pciconfig_iobase adjtimex - syscall_adjtimex 1 __syscall_adjtimex syscall_adjtimex # support old timeval32 entry points -osf_select - osf_select 5 __select_tv32 __select@GLIBC_2.0 select@GLIBC_2.0 +osf_select - osf_select C:5 __select_tv32 __select@GLIBC_2.0 select@GLIBC_2.0 osf_gettimeofday - osf_gettimeofday 2 __gettimeofday_tv32 __gettimeofday@GLIBC_2.0 gettimeofday@GLIBC_2.0 osf_settimeofday - osf_settimeofday 2 __settimeofday_tv32 settimeofday@GLIBC_2.0 osf_getitimer - osf_getitimer 2 __getitimer_tv32 getitimer@GLIBC_2.0 From 8ea965156db39663f7bdf7920e9dc5cd723669a9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 Dec 2002 00:52:49 +0000 Subject: [PATCH 2971/4487] (accept, connect, recv, recvfrom, recvmsg, send, sendmsg, sendto): Make cancelable. --- sysdeps/unix/sysv/linux/hppa/syscalls.list | 16 ++++++++-------- sysdeps/unix/sysv/linux/mips/syscalls.list | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/sysdeps/unix/sysv/linux/hppa/syscalls.list b/sysdeps/unix/sysv/linux/hppa/syscalls.list index 6b18e1f166..6edb2d2b16 100644 --- a/sysdeps/unix/sysv/linux/hppa/syscalls.list +++ b/sysdeps/unix/sysv/linux/hppa/syscalls.list @@ -14,19 +14,19 @@ semget - semget i:iii __semget semget semctl - semctl i:iiii __semctl semctl # proper socket implementations: -accept - accept i:iBN __libc_accept __accept accept +accept - accept Ci:iBN __libc_accept __accept accept bind - bind i:ipi __bind bind -connect - connect i:ipi __libc_connect __connect_internal __connect connect +connect - connect Ci:ipi __libc_connect __connect_internal __connect connect getpeername - getpeername i:ipp __getpeername getpeername getsockname - getsockname i:ipp __getsockname getsockname getsockopt - getsockopt i:iiiBN __getsockopt getsockopt listen - listen i:ii __listen listen -recv - recv i:ibni __libc_recv __recv recv -recvfrom - recvfrom i:ibniBN __libc_recvfrom __recvfrom recvfrom -recvmsg - recvmsg i:ipi __libc_recvmsg __recvmsg recvmsg -send - send i:ibni __libc_send __send send -sendmsg - sendmsg i:ipi __libc_sendmsg __sendmsg sendmsg -sendto - sendto i:ibnibn __libc_sendto __sendto sendto +recv - recv Ci:ibni __libc_recv __recv recv +recvfrom - recvfrom Ci:ibniBN __libc_recvfrom __recvfrom recvfrom +recvmsg - recvmsg Ci:ipi __libc_recvmsg __recvmsg recvmsg +send - send Ci:ibni __libc_send __send send +sendmsg - sendmsg Ci:ipi __libc_sendmsg __sendmsg sendmsg +sendto - sendto Ci:ibnibn __libc_sendto __sendto sendto setsockopt - setsockopt i:iiibn __setsockopt setsockopt shutdown - shutdown i:ii __shutdown shutdown socket - socket i:iii __socket socket diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index 76b8b0fe15..685edc0e65 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -14,19 +14,19 @@ s_sigsuspend sigsuspend sigsuspend i:p __syscall_sigsuspend # Socket functions; Linux/MIPS doesn't use the socketcall(2) wrapper; # it's provided for compatibility, though. # -accept - accept i:iBN __libc_accept __accept accept +accept - accept Ci:iBN __libc_accept __accept accept bind - bind i:ipi __bind bind -connect - connect i:ipi __libc_connect __connect_internal __connect connect +connect - connect Ci:ipi __libc_connect __connect_internal __connect connect getpeername - getpeername i:ipp __getpeername getpeername getsockname - getsockname i:ipp __getsockname getsockname getsockopt - getsockopt i:iiiBN __getsockopt getsockopt listen - listen i:ii __listen listen -recv - recv i:ibni __libc_recv __recv recv -recvfrom - recvfrom i:ibniBN __libc_recvfrom __recvfrom recvfrom -recvmsg - recvmsg i:ipi __libc_recvmsg __recvmsg recvmsg -send - send i:ibni __libc_send __send send -sendmsg - sendmsg i:ipi __libc_sendmsg __sendmsg sendmsg -sendto - sendto i:ibnibn __libc_sendto __sendto sendto +recv - recv Ci:ibni __libc_recv __recv recv +recvfrom - recvfrom Ci:ibniBN __libc_recvfrom __recvfrom recvfrom +recvmsg - recvmsg Ci:ipi __libc_recvmsg __recvmsg recvmsg +send - send Ci:ibni __libc_send __send send +sendmsg - sendmsg Ci:ipi __libc_sendmsg __sendmsg sendmsg +sendto - sendto Ci:ibnibn __libc_sendto __sendto sendto setsockopt - setsockopt i:iiibn __setsockopt setsockopt shutdown - shutdown i:ii __shutdown shutdown socket - socket i:iii __socket socket From e81a170b787272f014375ee70a5e4fb3ec72f2aa Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 15 Dec 2002 21:39:21 +0000 Subject: [PATCH 2972/4487] Make inline syscall to _exit. --- sysdeps/unix/sysv/linux/m68k/clone.S | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/m68k/clone.S b/sysdeps/unix/sysv/linux/m68k/clone.S index e19172a8f7..6baf723d9b 100644 --- a/sysdeps/unix/sysv/linux/m68k/clone.S +++ b/sysdeps/unix/sysv/linux/m68k/clone.S @@ -57,8 +57,9 @@ ENTRY (__clone) thread_start: subl %fp, %fp /* terminate the stack frame */ jsr (%a0) - movel %d0, -(%sp) - jbsr HIDDEN_JUMPTARGET (_exit) + movel %d0, %d1 + movel #SYS_ify (exit), %d0 + trap #0 PSEUDO_END (__clone) From 5a9c8484904f5488f25dd8de5f7c2f2fe3625640 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 16 Dec 2002 10:25:34 +0000 Subject: [PATCH 2973/4487] 2002-12-16 Roland McGrath * sysdeps/unix/sysv/linux/syscalls.list: Add getpmsg, putpmsg. * sysdeps/unix/sysv/linux/mips/syscalls.list: Remove s_getpmsg, s_putpmsg. * sysdeps/unix/sysv/linux/i386/getpmsg.c: File removed. * sysdeps/unix/sysv/linux/i386/putpmsg.c: File removed. * sysdeps/unix/sysv/linux/m68k/getpmsg.c: File removed. * sysdeps/unix/sysv/linux/m68k/putpmsg.c: File removed. * sysdeps/unix/sysv/linux/mips/getpmsg.c: File removed. * sysdeps/unix/sysv/linux/mips/putpmsg.c: File removed. * sysdeps/unix/sysv/linux/powerpc/getpmsg.c: File removed. * sysdeps/unix/sysv/linux/powerpc/putpmsg.c: File removed. --- sysdeps/unix/sysv/linux/m68k/getpmsg.c | 1 - sysdeps/unix/sysv/linux/m68k/putpmsg.c | 1 - sysdeps/unix/sysv/linux/mips/getpmsg.c | 1 - sysdeps/unix/sysv/linux/mips/putpmsg.c | 1 - sysdeps/unix/sysv/linux/mips/syscalls.list | 2 -- 5 files changed, 6 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/m68k/getpmsg.c delete mode 100644 sysdeps/unix/sysv/linux/m68k/putpmsg.c delete mode 100644 sysdeps/unix/sysv/linux/mips/getpmsg.c delete mode 100644 sysdeps/unix/sysv/linux/mips/putpmsg.c diff --git a/sysdeps/unix/sysv/linux/m68k/getpmsg.c b/sysdeps/unix/sysv/linux/m68k/getpmsg.c deleted file mode 100644 index bb65f81bf9..0000000000 --- a/sysdeps/unix/sysv/linux/m68k/getpmsg.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/m68k/putpmsg.c b/sysdeps/unix/sysv/linux/m68k/putpmsg.c deleted file mode 100644 index fbfa59892a..0000000000 --- a/sysdeps/unix/sysv/linux/m68k/putpmsg.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/mips/getpmsg.c b/sysdeps/unix/sysv/linux/mips/getpmsg.c deleted file mode 100644 index bb65f81bf9..0000000000 --- a/sysdeps/unix/sysv/linux/mips/getpmsg.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/mips/putpmsg.c b/sysdeps/unix/sysv/linux/mips/putpmsg.c deleted file mode 100644 index fbfa59892a..0000000000 --- a/sysdeps/unix/sysv/linux/mips/putpmsg.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index 685edc0e65..ec75228ce1 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -56,14 +56,12 @@ s_ftruncate64 ftruncate64 ftruncate64 i:iiii __syscall_ftruncate64 s_getcwd getcwd getcwd i:pi __syscall_getcwd s_getdents getdents getdents i:ipi __syscall_getdents s_getdents64 getdents getdents64 i:ipi __syscall_getdents64 -s_getpmsg getpmsg getpmsg i:ipppp __syscall_getpmsg s_getpriority getpriority getpriority i:ii __syscall_getpriority s_ipc msgget ipc i:iiiip __syscall_ipc s_lstat64 lxstat64 lstat64 i:sp __syscall_lstat64 s_mmap2 mmap64 mmap2 b:aniiii __syscall_mmap2 s_poll poll poll i:pii __syscall_poll s_pread64 pread64 pread i:ibniii __syscall_pread -s_putpmsg putpmsg putpmsg i:ippii __syscall_putpmsg s_ptrace ptrace ptrace i:iipp __syscall_ptrace s_pwrite64 pwrite64 pwrite i:ibniii __syscall_pwrite s_readahead EXTRA readahead i:iiii __syscall_readahead From 519d2b2e9fb85751f46271545d20044a39c1f09d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 16 Dec 2002 23:17:43 +0000 Subject: [PATCH 2974/4487] Convert GCC extension initializer syntax to C99. --- sysdeps/unix/sysv/aix/setitimer.c | 2 +- sysdeps/unix/sysv/aix/sleep.c | 2 +- sysdeps/unix/sysv/aix/usleep.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/aix/setitimer.c b/sysdeps/unix/sysv/aix/setitimer.c index e40a075fa9..d7e741abe7 100644 --- a/sysdeps/unix/sysv/aix/setitimer.c +++ b/sysdeps/unix/sysv/aix/setitimer.c @@ -56,7 +56,7 @@ __setitimer (which, new, old) case -1: exit(-1); case 0: { - struct timespec ts ={tv_sec:(long int)new->it_value.tv_sec,tv_nsec:0}; + struct timespec ts ={.tv_sec = (long int)new->it_value.tv_sec, .tv_nsec = 0}; __libc_nanosleep(&ts,&ts); __kill(getppid(), SIGALRM); exit(0); diff --git a/sysdeps/unix/sysv/aix/sleep.c b/sysdeps/unix/sysv/aix/sleep.c index 17a9702633..aa8d76d3d2 100644 --- a/sysdeps/unix/sysv/aix/sleep.c +++ b/sysdeps/unix/sysv/aix/sleep.c @@ -27,7 +27,7 @@ unsigned int __sleep (seconds) unsigned int seconds; { - struct timespec ts ={tv_sec:(long int)seconds,tv_nsec:0}; + struct timespec ts ={.tv_sec = (long int)seconds, .tv_nsec = 0}; __libc_nanosleep(&ts,&ts); return 0; } diff --git a/sysdeps/unix/sysv/aix/usleep.c b/sysdeps/unix/sysv/aix/usleep.c index e34fd0882d..a1d55eb2bc 100644 --- a/sysdeps/unix/sysv/aix/usleep.c +++ b/sysdeps/unix/sysv/aix/usleep.c @@ -28,7 +28,7 @@ int usleep (useconds) useconds_t useconds; { - struct timespec ts ={tv_sec:0,tv_nsec:(long int)useconds * 1000}; + struct timespec ts ={.tv_sec = 0, .tv_nsec = (long int)useconds * 1000}; __libc_nanosleep(&ts,&ts); return 0; } From 762566f73f51e78e32ed36d51575dd34d88bfde1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 18 Dec 2002 01:27:42 +0000 Subject: [PATCH 2975/4487] (msgrcv, msgsnd): Make cancelable. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 4 ++-- sysdeps/unix/sysv/linux/hppa/syscalls.list | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 7f5c9d0052..6907ef1d2f 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -2,8 +2,8 @@ oldmsgctl EXTRA msgctl 3 __old_msgctl msgctl@GLIBC_2.0 msgget - msgget 2 __msgget msgget -msgrcv - msgrcv 5 __msgrcv msgrcv -msgsnd - msgsnd 4 __msgsnd msgsnd +msgrcv - msgrcv C:5 __msgrcv msgrcv +msgsnd - msgsnd C:4 __msgsnd msgsnd shmat - osf_shmat 3 __shmat shmat oldshmctl EXTRA shmctl 3 __old_shmctl shmctl@GLIBC_2.0 shmdt - shmdt 1 __shmdt shmdt diff --git a/sysdeps/unix/sysv/linux/hppa/syscalls.list b/sysdeps/unix/sysv/linux/hppa/syscalls.list index 6edb2d2b16..bc977e2e30 100644 --- a/sysdeps/unix/sysv/linux/hppa/syscalls.list +++ b/sysdeps/unix/sysv/linux/hppa/syscalls.list @@ -3,8 +3,8 @@ # semaphore and shm system calls msgctl - msgctl i:iip __msgctl msgctl msgget - msgget i:ii __msgget msgget -msgrcv - msgrcv i:ibnii __msgrcv msgrcv -msgsnd - msgsnd i:ibni __msgsnd msgsnd +msgrcv - msgrcv Ci:ibnii __msgrcv msgrcv +msgsnd - msgsnd Ci:ibni __msgsnd msgsnd shmat - shmat i:ipi __shmat shmat shmctl - shmctl i:iip __shmctl shmctl shmdt - shmdt i:s __shmdt shmdt From 9526f1fb77719a87251e78fc3431fa11a6497d30 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 20 Dec 2002 10:31:10 +0000 Subject: [PATCH 2976/4487] Define SHM_HUGETLB. --- sysdeps/unix/sysv/linux/alpha/bits/shm.h | 1 + sysdeps/unix/sysv/linux/hppa/bits/shm.h | 1 + sysdeps/unix/sysv/linux/mips/bits/shm.h | 1 + 3 files changed, 3 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/shm.h b/sysdeps/unix/sysv/linux/alpha/bits/shm.h index ae51e75452..418426511c 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/shm.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/shm.h @@ -67,6 +67,7 @@ struct shmid_ds /* shm_mode upper byte flags */ # define SHM_DEST 01000 /* segment will be destroyed on last detach */ # define SHM_LOCKED 02000 /* segment will not be swapped */ +# define SHM_HUGETLB 04000 /* segment is mapped via hugetlb */ struct shminfo { diff --git a/sysdeps/unix/sysv/linux/hppa/bits/shm.h b/sysdeps/unix/sysv/linux/hppa/bits/shm.h index a07213caa8..1c022fda83 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/shm.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/shm.h @@ -78,6 +78,7 @@ struct shmid_ds /* shm_mode upper byte flags */ # define SHM_DEST 01000 /* segment will be destroyed on last detach */ # define SHM_LOCKED 02000 /* segment will not be swapped */ +# define SHM_HUGETLB 04000 /* segment is mapped via hugetlb */ struct shminfo { diff --git a/sysdeps/unix/sysv/linux/mips/bits/shm.h b/sysdeps/unix/sysv/linux/mips/bits/shm.h index 85b286e9de..a512afeddf 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/shm.h +++ b/sysdeps/unix/sysv/linux/mips/bits/shm.h @@ -67,6 +67,7 @@ struct shmid_ds /* shm_mode upper byte flags */ # define SHM_DEST 01000 /* segment will be destroyed on last detach */ # define SHM_LOCKED 02000 /* segment will not be swapped */ +# define SHM_HUGETLB 04000 /* segment is mapped via hugetlb */ struct shminfo { From a16ce997aa0b6778b9689a49f28dff0da4b7599a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Dec 2002 18:36:32 +0000 Subject: [PATCH 2977/4487] (_start): Optimise a little. Push stack top as seventh arg to __libc_start_main. --- sysdeps/arm/elf/start.S | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/sysdeps/arm/elf/start.S b/sysdeps/arm/elf/start.S index 90a62f6d9a..13d4229b3b 100644 --- a/sysdeps/arm/elf/start.S +++ b/sysdeps/arm/elf/start.S @@ -45,26 +45,34 @@ .globl _start .type _start,#function _start: + /* Fetch address of fini */ + ldr ip, =__libc_csu_fini + /* Clear the frame pointer since this is the outermost frame. */ mov fp, #0 /* Pop argc off the stack and save a pointer to argv */ - ldmfd sp!, {a2} + ldr a2, [sp], #4 mov a3, sp - /* Push the last arguments to main() onto the stack */ - stmfd sp!, {a1} - ldr a1, =__libc_csu_fini - stmfd sp!, {a1} + /* Push stack limit */ + str a3, [sp, #-4]! + + /* Push rtld_fini */ + str a1, [sp, #-4]! - /* Set up the other arguments for main() that go in registers */ + /* Set up the other arguments in registers */ ldr a1, =main ldr a4, =__libc_csu_init - /* __libc_start_main (main, argc, argv, init, fini, rtld_fini) */ + /* Push fini */ + str ip, [sp, #-4]! + + /* __libc_start_main (main, argc, argv, init, fini, rtld_fini, stack_end) */ /* Let the libc call main and exit with its return code. */ bl __libc_start_main + /* should never get here....*/ bl abort From 5b52ee17534e37097660ef44ee351f191cf248ea Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Dec 2002 18:36:55 +0000 Subject: [PATCH 2978/4487] Small optimisation. --- sysdeps/unix/sysv/linux/arm/clone.S | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/clone.S b/sysdeps/unix/sysv/linux/arm/clone.S index c9a1ec23ac..1c6f7861cf 100644 --- a/sysdeps/unix/sysv/linux/arm/clone.S +++ b/sysdeps/unix/sysv/linux/arm/clone.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Pat Beirne @@ -35,10 +35,8 @@ ENTRY(__clone) beq PLTJMP(syscall_error) @ insert the args onto the new stack - sub r1, r1, #8 - str r3, [r1, #4] - @ save the function pointer as the 0th element - str r0, [r1] + str r3, [r1, #-4]! + str r0, [r1, #-4]! @ do the system call @ get flags From c025bbf60963f0d15ee845724a7d9004b5928b2b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Dec 2002 18:37:16 +0000 Subject: [PATCH 2979/4487] Elide compatibility cruft when new enough kernel is assumed. --- sysdeps/unix/sysv/linux/arm/sigcontextinfo.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h b/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h index aebc3cfd52..30c2e3a6ce 100644 --- a/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h +++ b/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1999 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Philip Blundell , 1999. @@ -18,10 +18,22 @@ 02111-1307 USA. */ #include +#include "kernel-features.h" #define SIGCONTEXT int _a2, int _a3, int _a4, union k_sigcontext #define SIGCONTEXT_EXTRA_ARGS _a2, _a3, _a4, +/* The sigcontext structure changed between 2.0 and 2.1 kernels. On any + modern system we should be able to assume that the "new" format will be + in use. */ +#if __LINUX_KERNEL_VERSION > 131328 + +#define GET_PC(ctx) ((void *) ctx.v21.arm_pc) +#define GET_FRAME(ctx) ADVANCE_STACK_FRAME ((void *) ctx.v21.arm_fp) +#define GET_STACK(ctx) ((void *) ctx.v21.arm_sp) + +#else + #define GET_PC(ctx) ((void *)((ctx.v20.magic == SIGCONTEXT_2_0_MAGIC) ? \ ctx.v20.reg.ARM_pc : ctx.v21.arm_pc)) #define GET_FRAME(ctx) \ @@ -29,7 +41,11 @@ ctx.v20.reg.ARM_fp : ctx.v21.arm_fp)) #define GET_STACK(ctx) ((void *)((ctx.v20.magic == SIGCONTEXT_2_0_MAGIC) ? \ ctx.v20.reg.ARM_sp : ctx.v21.arm_sp)) + +#endif + #define ADVANCE_STACK_FRAME(frm) \ ((struct layout *)frm - 1) + #define CALL_SIGHANDLER(handler, signo, ctx) \ (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx)) From d68f861c07cec66da338a7396fccfe28c5187008 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 21 Dec 2002 19:36:29 +0000 Subject: [PATCH 2980/4487] Use INTERNAL_SYSCALL. --- sysdeps/unix/sysv/linux/m68k/brk.c | 11 +---------- sysdeps/unix/sysv/linux/m68k/getpagesize.c | 4 ++-- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/sysdeps/unix/sysv/linux/m68k/brk.c b/sysdeps/unix/sysv/linux/m68k/brk.c index d02b1f9a29..adf6c64854 100644 --- a/sysdeps/unix/sysv/linux/m68k/brk.c +++ b/sysdeps/unix/sysv/linux/m68k/brk.c @@ -33,16 +33,7 @@ __brk (void *addr) { void *newbrk; - { - register long d0 __asm__ ("%d0"); - - asm ("move%.l %2, %%d1\n" - "trap #0" /* Perform the system call. */ - : "=d" (d0) - : "0" (SYS_ify (brk)), "g" (addr) - : "%d1"); - newbrk = (void *) d0; - } + newbrk = INTERNAL_SYSCALL (brk, 1, addr); __curbrk = newbrk; if (newbrk < addr) diff --git a/sysdeps/unix/sysv/linux/m68k/getpagesize.c b/sysdeps/unix/sysv/linux/m68k/getpagesize.c index 6645e2b472..266d81daed 100644 --- a/sysdeps/unix/sysv/linux/m68k/getpagesize.c +++ b/sysdeps/unix/sysv/linux/m68k/getpagesize.c @@ -37,9 +37,9 @@ __getpagesize () return GL(dl_pagesize); #ifdef __NR_getpagesize - result = INLINE_SYSCALL (getpagesize, 0); + result = INTERNAL_SYSCALL (getpagesize, 0); /* The only possible error is ENOSYS. */ - if (result != -1) + if (!INTERNAL_SYSCALL_ERROR_P (result)) return result; #endif From 5d384858ff5a91e1a45b01553f61379178ba5bc1 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 21 Dec 2002 19:36:50 +0000 Subject: [PATCH 2981/4487] (INTERNAL_SYSCALL): Define. (INLINE_SYSCALL): Use it. (INTERNAL_SYSCALL_ERROR_P, INTERNAL_SYSCALL_ERRNO): Define. --- sysdeps/unix/sysv/linux/m68k/sysdep.h | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h index 1247cc49f2..005e60ffe1 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -163,7 +163,21 @@ SYSCALL_ERROR_LABEL: \ /* Define a macro which expands into the inline wrapper code for a system call. */ #undef INLINE_SYSCALL -#define INLINE_SYSCALL(name, nr, args...) \ +#define INLINE_SYSCALL(name, nr, args...) \ + ({ unsigned int _sys_result = INTERNAL_SYSCALL (name, nr, args); \ + if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (_sys_result), 0)) \ + { \ + __set_errno (INTERNAL_SYSCALL_ERRNO (_sys_result)); \ + _sys_result = (unsigned int) -1; \ + } \ + (int) _sys_result; }) + +/* Define a macro which expands inline into the wrapper code for a system + call. This use is for internal calls that do not need to handle errors + normally. It will never touch errno. This returns just what the kernel + gave back. */ +#undef INTERNAL_SYSCALL +#define INTERNAL_SYSCALL(name, nr, args...) \ ({ unsigned int _sys_result; \ { \ LOAD_ARGS_##nr (args) \ @@ -174,13 +188,14 @@ SYSCALL_ERROR_LABEL: \ : "memory"); \ _sys_result = _d0; \ } \ - if (_sys_result >= (unsigned int) -4095) \ - { \ - __set_errno (-_sys_result); \ - _sys_result = (unsigned int) -1; \ - } \ (int) _sys_result; }) +#undef INTERNAL_SYSCALL_ERROR_P +#define INTERNAL_SYSCALL_ERROR_P(val) ((unsigned int) (val) >= -4095U) + +#undef INTERNAL_SYSCALL_ERRNO +#define INTERNAL_SYSCALL_ERRNO(val) (-(val)) + #define LOAD_ARGS_0() #define ASM_ARGS_0 #define LOAD_ARGS_1(a1) \ From fb9016614da8293233f6a0eb8cbcb19f0cfc9b0d Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 21 Dec 2002 20:07:49 +0000 Subject: [PATCH 2982/4487] Fix warning. --- sysdeps/unix/sysv/linux/m68k/brk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/m68k/brk.c b/sysdeps/unix/sysv/linux/m68k/brk.c index adf6c64854..396b97d945 100644 --- a/sysdeps/unix/sysv/linux/m68k/brk.c +++ b/sysdeps/unix/sysv/linux/m68k/brk.c @@ -33,7 +33,7 @@ __brk (void *addr) { void *newbrk; - newbrk = INTERNAL_SYSCALL (brk, 1, addr); + newbrk = (void *) INTERNAL_SYSCALL (brk, 1, addr); __curbrk = newbrk; if (newbrk < addr) From 9d3831f3746528fa23716874f9e6180b1e5e1865 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 21 Dec 2002 20:08:15 +0000 Subject: [PATCH 2983/4487] (SYSCALL_ERROR_HANDLER): Define RTLD_PRIVATE_ERRNO variant. --- sysdeps/unix/sysv/linux/m68k/sysdep.h | 28 +++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h index 005e60ffe1..06033f4756 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -21,6 +21,9 @@ #include #include +/* Defines RTLD_PRIVATE_ERRNO. */ +#include + /* For Linux we can use the system call table in the header file /usr/include/asm/unistd.h of the kernel. But these symbols do not follow the SYS_* syntax @@ -66,9 +69,21 @@ END (name) #ifdef PIC +# ifdef RTLD_PRIVATE_ERRNO +# define SYSCALL_ERROR_HANDLER \ +SYSCALL_ERROR_LABEL: \ + lea (errno, %pc), %a0; \ + neg.l %d0; \ + move.l %d0, (%a0); \ + move.l &-1, %d0; \ + /* Copy return value to %a0 for syscalls that are declared to return \ + a pointer (e.g., mmap). */ \ + move.l %d0, %a0; \ + rts; +# else /* !RTLD_PRIVATE_ERRNO */ /* Store (- %d0) into errno through the GOT. */ -#ifdef _LIBC_REENTRANT -#define SYSCALL_ERROR_HANDLER \ +# if defined _LIBC_REENTRANT +# define SYSCALL_ERROR_HANDLER \ SYSCALL_ERROR_LABEL: \ neg.l %d0; \ move.l %d0, -(%sp); \ @@ -79,8 +94,8 @@ SYSCALL_ERROR_LABEL: \ a pointer (e.g., mmap). */ \ move.l %d0, %a0; \ rts; -#else /* !_LIBC_REENTRANT */ -#define SYSCALL_ERROR_HANDLER \ +# else /* !_LIBC_REENTRANT */ +# define SYSCALL_ERROR_HANDLER \ SYSCALL_ERROR_LABEL: \ move.l (errno@GOTPC, %pc), %a0; \ neg.l %d0; \ @@ -90,9 +105,10 @@ SYSCALL_ERROR_LABEL: \ a pointer (e.g., mmap). */ \ move.l %d0, %a0; \ rts; -#endif /* _LIBC_REENTRANT */ +# endif /* _LIBC_REENTRANT */ +# endif /* RTLD_PRIVATE_ERRNO */ #else -#define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */ +# define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */ #endif /* PIC */ /* Linux takes system call arguments in registers: From 4b5b9a0718ecd714fb0620d5ba0b0b7101277e9b Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 21 Dec 2002 21:05:31 +0000 Subject: [PATCH 2984/4487] Fix thinko. --- sysdeps/unix/sysv/linux/m68k/sysdep.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h index 06033f4756..e6fea788b6 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -69,7 +69,7 @@ END (name) #ifdef PIC -# ifdef RTLD_PRIVATE_ERRNO +# if RTLD_PRIVATE_ERRNO # define SYSCALL_ERROR_HANDLER \ SYSCALL_ERROR_LABEL: \ lea (errno, %pc), %a0; \ @@ -83,7 +83,7 @@ SYSCALL_ERROR_LABEL: \ # else /* !RTLD_PRIVATE_ERRNO */ /* Store (- %d0) into errno through the GOT. */ # if defined _LIBC_REENTRANT -# define SYSCALL_ERROR_HANDLER \ +# define SYSCALL_ERROR_HANDLER \ SYSCALL_ERROR_LABEL: \ neg.l %d0; \ move.l %d0, -(%sp); \ @@ -95,7 +95,7 @@ SYSCALL_ERROR_LABEL: \ move.l %d0, %a0; \ rts; # else /* !_LIBC_REENTRANT */ -# define SYSCALL_ERROR_HANDLER \ +# define SYSCALL_ERROR_HANDLER \ SYSCALL_ERROR_LABEL: \ move.l (errno@GOTPC, %pc), %a0; \ neg.l %d0; \ From e88c122c4f7eb9d46436c0cb607e0f8e585c151b Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 27 Dec 2002 22:15:18 +0000 Subject: [PATCH 2985/4487] Add cancellation support. --- sysdeps/unix/sysv/linux/m68k/socket.S | 42 ++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/m68k/socket.S b/sysdeps/unix/sysv/linux/m68k/socket.S index 3592d2a580..1d10f33e17 100644 --- a/sysdeps/unix/sysv/linux/m68k/socket.S +++ b/sysdeps/unix/sysv/linux/m68k/socket.S @@ -16,7 +16,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include +#include #include #define P(a, b) P2(a, b) @@ -41,6 +41,10 @@ .globl __socket ENTRY (__socket) +#if defined NEED_CANCELLATION && defined CENABLE + SINGLE_THREAD_P + jne 1f +#endif /* Save registers. */ move.l %d2, %a0 @@ -64,6 +68,42 @@ ENTRY (__socket) /* Successful; return the syscall's value. */ rts + +#if defined NEED_CANCELLATION && defined CENABLE +1: /* Enable asynchronous cancellation. */ + CENABLE + + /* Save registers. */ + move.l %d2, -(%sp) + move.l %d0, -(%sp) + + move.l #SYS_ify (socketcall), %d0 /* System call number in %d0. */ + + /* Use ## so `socket' is a separate token that might be #define'd. */ + move.l #P (SOCKOP_,socket), %d1 /* Subcode is first arg to syscall. */ + lea 4+8(%sp), %a1 /* Address of args is 2nd arg. */ + move.l %a1, %d2 + + /* Do the system call trap. */ + trap #0 + + /* Restore cancellation. */ + move.l %d0, %d2 + CDISABLE + addq.l #4, %sp + move.l %d2, %d0 + + /* Restore registers. */ + move.l (%sp)+, %d2 + + /* %d0 is < 0 if there was an error. */ + tst.l %d0 + jmi SYSCALL_ERROR_LABEL + + /* Successful; return the syscall's value. */ + rts +#endif + PSEUDO_END (__socket) #ifndef NO_WEAK_ALIAS From 044758323be3617dfe94bb373423201ce52c83d0 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 31 Dec 2002 09:35:36 +0000 Subject: [PATCH 2986/4487] Add __GI__setjmp alias. --- sysdeps/alpha/setjmp.S | 3 ++- sysdeps/arm/bsd-_setjmp.S | 3 ++- sysdeps/hppa/bsd-_setjmp.S | 5 ++++- sysdeps/m68k/bsd-_setjmp.c | 3 ++- sysdeps/mips/bsd-_setjmp.S | 3 ++- sysdeps/mips/mips64/bsd-_setjmp.S | 3 ++- sysdeps/vax/bsd-_setjmp.S | 5 +++-- 7 files changed, 17 insertions(+), 8 deletions(-) diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S index b3bc38c455..5752da7975 100644 --- a/sysdeps/alpha/setjmp.S +++ b/sysdeps/alpha/setjmp.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1994, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1994, 1996, 1997, 2002 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 @@ -77,6 +77,7 @@ ENTRY(_setjmp) mov 0, a1 br $sigsetjmp_local END(_setjmp) +strong_alias (_setjmp, __GI__setjmp) ENTRY(setjmp) ldgp gp, 0(pv) diff --git a/sysdeps/arm/bsd-_setjmp.S b/sysdeps/arm/bsd-_setjmp.S index 649e89e20e..ac039ca772 100644 --- a/sysdeps/arm/bsd-_setjmp.S +++ b/sysdeps/arm/bsd-_setjmp.S @@ -1,5 +1,5 @@ /* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. ARM version. - Copyright (C) 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 2002 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 @@ -27,3 +27,4 @@ ENTRY (_setjmp) mov r1, #0 b PLTJMP(C_SYMBOL_NAME(__sigsetjmp)) END (_setjmp) +strong_alias (_setjmp, __GI__setjmp) diff --git a/sysdeps/hppa/bsd-_setjmp.S b/sysdeps/hppa/bsd-_setjmp.S index 6aacd4888b..31aceb0703 100644 --- a/sysdeps/hppa/bsd-_setjmp.S +++ b/sysdeps/hppa/bsd-_setjmp.S @@ -1,5 +1,5 @@ /* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. HPPA version. - Copyright (C) 2001 Free Software Foundation, Inc. + Copyright (C) 2001, 2002 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 @@ -17,6 +17,8 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include + /* This just does a tail-call to `__sigsetjmp (ARG, 1)'. We cannot do it in C because it must be a tail-call, so frame-unwinding in setjmp doesn't clobber the state restored by longjmp. */ @@ -34,3 +36,4 @@ _setjmp: ldi 0, %r25 .procend +strong_alias (_setjmp, __GI__setjmp) diff --git a/sysdeps/m68k/bsd-_setjmp.c b/sysdeps/m68k/bsd-_setjmp.c index ee2964e3be..a6b404aebe 100644 --- a/sysdeps/m68k/bsd-_setjmp.c +++ b/sysdeps/m68k/bsd-_setjmp.c @@ -1,5 +1,5 @@ /* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. m68k version. - Copyright (C) 1994, 1997, 2001 Free Software Foundation, Inc. + Copyright (C) 1994, 1997, 2001, 2002 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 @@ -19,3 +19,4 @@ #define BSD__SETJMP #include +libc_hidden_def (_setjmp) diff --git a/sysdeps/mips/bsd-_setjmp.S b/sysdeps/mips/bsd-_setjmp.S index 2a4e32111a..a175a9c820 100644 --- a/sysdeps/mips/bsd-_setjmp.S +++ b/sysdeps/mips/bsd-_setjmp.S @@ -1,5 +1,5 @@ /* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. MIPS version. - Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 2000, 2002 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 @@ -40,3 +40,4 @@ ENTRY (_setjmp) j C_SYMBOL_NAME (__sigsetjmp) #endif .end _setjmp +strong_alias (_setjmp, __GI__setjmp) diff --git a/sysdeps/mips/mips64/bsd-_setjmp.S b/sysdeps/mips/mips64/bsd-_setjmp.S index b92ac98505..489bcef528 100644 --- a/sysdeps/mips/mips64/bsd-_setjmp.S +++ b/sysdeps/mips/mips64/bsd-_setjmp.S @@ -1,5 +1,5 @@ /* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. MIPS64 version. - Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 2000, 2002 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 @@ -34,3 +34,4 @@ ENTRY (_setjmp) nop jr t9 dli a1, 0 /* Pass a second argument of zero. */ +strong_alias (_setjmp, __GI__setjmp) diff --git a/sysdeps/vax/bsd-_setjmp.S b/sysdeps/vax/bsd-_setjmp.S index 58204d262c..68888d48ed 100644 --- a/sysdeps/vax/bsd-_setjmp.S +++ b/sysdeps/vax/bsd-_setjmp.S @@ -1,5 +1,5 @@ /* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. Vax version. - Copyright (C) 1994, 1997 Free Software Foundation, Inc. + Copyright (C) 1994, 1997, 2002 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,10 +23,11 @@ #include -ENTRY (setjmp) +ENTRY (_setjmp) popl r0 /* Pop return PC. */ popl r1 /* Pop jmp_buf argument. */ pushl $0 /* Push second argument of zero. */ pushl r1 /* Push back first argument. */ pushl r0 /* Push back return PC. */ jmp C_SYMBOL_NAME (__sigsetjmp) +strong_alias (_setjmp, __GI__setjmp) From c63e402a1272a0285470a6f86819dcfb7c263485 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 31 Dec 2002 10:22:40 +0000 Subject: [PATCH 2987/4487] Add libc_hidden_def for __nanosleep. --- sysdeps/unix/sysv/aix/nanosleep.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/aix/nanosleep.c b/sysdeps/unix/sysv/aix/nanosleep.c index 3c6e5082e6..842275f77a 100644 --- a/sysdeps/unix/sysv/aix/nanosleep.c +++ b/sysdeps/unix/sysv/aix/nanosleep.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002 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 @@ -36,4 +36,5 @@ __libc_nanosleep (const struct timespec *req, struct timespec *rem) return _nsleep ((struct timestruc_t *) req, (struct timestruc_t *) rem); } strong_alias (__libc_nanosleep, __nanosleep) +libc_hidden_def (__nanosleep) strong_alias (__libc_nanosleep, nanosleep) From 7a077bd196cd60f20298070c37fc6ef620b1aa0a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 31 Dec 2002 11:05:04 +0000 Subject: [PATCH 2988/4487] Add libc_hidden_def for __fork. --- sysdeps/unix/sysv/aix/fork.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/aix/fork.c b/sysdeps/unix/sysv/aix/fork.c index f3b02c9870..478d4afad1 100644 --- a/sysdeps/unix/sysv/aix/fork.c +++ b/sysdeps/unix/sysv/aix/fork.c @@ -25,4 +25,5 @@ __fork (void) { return kfork (); } +libc_hidden_def (__fork) strong_alias (__fork, fork) From 7e587d1822a6f2a0020275c0e855dd9984a6977d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 31 Dec 2002 11:07:26 +0000 Subject: [PATCH 2989/4487] Add __GI___fork alias. --- sysdeps/unix/arm/fork.S | 1 + sysdeps/unix/bsd/osf/alpha/fork.S | 3 ++- sysdeps/unix/mips/fork.S | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/arm/fork.S b/sysdeps/unix/arm/fork.S index deb22548e2..19981451b6 100644 --- a/sysdeps/unix/arm/fork.S +++ b/sysdeps/unix/arm/fork.S @@ -29,5 +29,6 @@ SYSCALL__ (fork, 0) and r0, r0, r1 RETINSTR(mov, pc, r14) PSEUDO_END (__fork) +strong_alias (__fork, __GI___fork) weak_alias (__fork, fork) diff --git a/sysdeps/unix/bsd/osf/alpha/fork.S b/sysdeps/unix/bsd/osf/alpha/fork.S index 90cf4bd9c8..13b12239ba 100644 --- a/sysdeps/unix/bsd/osf/alpha/fork.S +++ b/sysdeps/unix/bsd/osf/alpha/fork.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1997, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -23,5 +23,6 @@ SYSCALL__ (fork, 0) cmovne a4, 0, v0 ret .end __fork +strong_alias (__fork, __GI___fork) weak_alias (__fork, fork) diff --git a/sysdeps/unix/mips/fork.S b/sysdeps/unix/mips/fork.S index 3273216030..dcec965671 100644 --- a/sysdeps/unix/mips/fork.S +++ b/sysdeps/unix/mips/fork.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1995, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995, 1997, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -27,5 +27,6 @@ SYSCALL__ (fork, 0) parent: ret .end __fork +strong_alias (__fork, __GI___fork) weak_alias (__fork, fork) From c505de0a40ab51521571ad9da11fdd387b63ba3a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 31 Dec 2002 11:10:33 +0000 Subject: [PATCH 2990/4487] Add __GI___vfork alias. --- sysdeps/unix/bsd/hp/m68k/vfork.S | 3 ++- sysdeps/unix/bsd/sun/m68k/vfork.S | 3 ++- sysdeps/unix/bsd/ultrix4/mips/vfork.S | 3 ++- sysdeps/unix/bsd/vax/vfork.S | 3 ++- sysdeps/unix/sysv/linux/arm/vfork.S | 5 +++-- sysdeps/unix/sysv/linux/cris/vfork.S | 3 ++- sysdeps/unix/sysv/linux/m68k/vfork.S | 3 ++- 7 files changed, 15 insertions(+), 8 deletions(-) diff --git a/sysdeps/unix/bsd/hp/m68k/vfork.S b/sysdeps/unix/bsd/hp/m68k/vfork.S index 4bb5939dbe..0e15a5089d 100644 --- a/sysdeps/unix/bsd/hp/m68k/vfork.S +++ b/sysdeps/unix/bsd/hp/m68k/vfork.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1994, 1995, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1994, 1995, 1997, 2002 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 @@ -51,5 +51,6 @@ error: movel d0, _errno moveq #-1, d0 jmp a0@ +strong_alias (__vfork, __GI___vfork) weak_alias (__vfork, vfork) diff --git a/sysdeps/unix/bsd/sun/m68k/vfork.S b/sysdeps/unix/bsd/sun/m68k/vfork.S index fe0309e3aa..006688936b 100644 --- a/sysdeps/unix/bsd/sun/m68k/vfork.S +++ b/sysdeps/unix/bsd/sun/m68k/vfork.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 92, 93, 94, 95, 97 Free Software Foundation, Inc. +/* Copyright (C) 1991, 92, 93, 94, 95, 97, 2002 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 @@ -51,5 +51,6 @@ error: movel d0, _errno moveq #-1, d0 jmp a0@ +strong_alias (__vfork, __GI___vfork) weak_alias (__vfork, vfork) diff --git a/sysdeps/unix/bsd/ultrix4/mips/vfork.S b/sysdeps/unix/bsd/ultrix4/mips/vfork.S index 9541eafbae..80e7328c71 100644 --- a/sysdeps/unix/bsd/ultrix4/mips/vfork.S +++ b/sysdeps/unix/bsd/ultrix4/mips/vfork.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1995, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995, 1997, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -31,5 +31,6 @@ parent: ret nop .end __vfork +strong_alias (__vfork, __GI___vfork) weak_alias (__vfork, vfork) diff --git a/sysdeps/unix/bsd/vax/vfork.S b/sysdeps/unix/bsd/vax/vfork.S index 8098b0eca6..16f0e98bb2 100644 --- a/sysdeps/unix/bsd/vax/vfork.S +++ b/sysdeps/unix/bsd/vax/vfork.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1995, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1995, 1997, 2002 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 @@ -52,5 +52,6 @@ error: movl r0, _errno mnegl $1, r0 jmp (r2) +strong_alias (__vfork, __GI___vfork) weak_alias (__vfork, vfork) diff --git a/sysdeps/unix/sysv/linux/arm/vfork.S b/sysdeps/unix/sysv/linux/arm/vfork.S index b10117e9f8..3364c686d6 100644 --- a/sysdeps/unix/sysv/linux/arm/vfork.S +++ b/sysdeps/unix/sysv/linux/arm/vfork.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1999 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Philip Blundell . @@ -44,7 +44,8 @@ ENTRY (__vfork) cmn a1, #4096 RETINSTR(movcc, pc, lr) b PLTJMP(C_SYMBOL_NAME(__syscall_error)) - + PSEUDO_END (__vfork) +strong_alias (__vfork, __GI___vfork) weak_alias (__vfork, vfork) diff --git a/sysdeps/unix/sysv/linux/cris/vfork.S b/sysdeps/unix/sysv/linux/cris/vfork.S index 39985a08a5..f471efe0a5 100644 --- a/sysdeps/unix/sysv/linux/cris/vfork.S +++ b/sysdeps/unix/sysv/linux/cris/vfork.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2001, 2002 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 @@ -22,5 +22,6 @@ PSEUDO (__vfork, vfork, 0) Ret nop PSEUDO_END (__vfork) +strong_alias (__vfork, __GI___vfork) weak_alias (__vfork, vfork) diff --git a/sysdeps/unix/sysv/linux/m68k/vfork.S b/sysdeps/unix/sysv/linux/m68k/vfork.S index b77a7bd15f..8968caece7 100644 --- a/sysdeps/unix/sysv/linux/m68k/vfork.S +++ b/sysdeps/unix/sysv/linux/m68k/vfork.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1999 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab . @@ -62,5 +62,6 @@ ENTRY (__vfork) rts PSEUDO_END (__vfork) +strong_alias (__vfork, __GI___vfork) weak_alias (__vfork, vfork) From 7922283928f90745e840926d005d251c20d9d8c4 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 31 Dec 2002 13:24:33 +0000 Subject: [PATCH 2991/4487] * sysdeps/unix/sysv/linux/powerpc/powerpc32/kernel_stat.h: Sync with Linux kernel. * sysdeps/unix/sysv/linux/sparc/sparc32/kernel_stat.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/kernel_stat.h: Likewise. * sysdeps/unix/sysv/linux/hppa/kernel_stat.h: Likewise. * sysdeps/unix/sysv/linux/kernel_stat.h (_HAVE_STAT_NSEC,_HAVE_STAT_NSEC64): New. * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Readd __unused[1-3] since they're needed by some platforms. Handle _HAVE_STAT_NSEC and _HAVE_STAT_NSEC64. * sysdeps/unix/sysv/linux/x86_64/bits/stat.h: Add nsec resolution for structs stat and stat64. * sysdeps/unix/sysv/linux/ia64/bits/stat.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/stat.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/stat.h: Likewise. * sysdeps/unix/sysv/linux/s390/bits/stat.h: Likewise. --- sysdeps/unix/sysv/linux/hppa/kernel_stat.h | 23 +++++++++++----------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/sysdeps/unix/sysv/linux/hppa/kernel_stat.h b/sysdeps/unix/sysv/linux/hppa/kernel_stat.h index a1fa3779a8..a85c5be464 100644 --- a/sysdeps/unix/sysv/linux/hppa/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/hppa/kernel_stat.h @@ -1,32 +1,31 @@ /* definition of "struct stat" from the kernel */ struct kernel_stat { unsigned long st_dev; /* dev_t is 32 bits on parisc */ - unsigned long st_ino; /* 32 bits */ - unsigned short st_mode; /* 16 bits */ + unsigned long st_ino; /* 32 bits */ + unsigned short st_mode; /* 16 bits */ unsigned short st_nlink; /* 16 bits */ unsigned short st_reserved1; /* old st_uid */ unsigned short st_reserved2; /* old st_gid */ - unsigned long st_rdev; + unsigned long st_rdev; unsigned long st_size; - unsigned long st_atime; - unsigned long st_spare1; - unsigned long st_mtime; - unsigned long st_spare2; - unsigned long st_ctime; - unsigned long st_spare3; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; long st_blksize; long st_blocks; unsigned long __unused1; /* ACL stuff */ unsigned long __unused2; /* network */ - unsigned long __unused3; /* network */ + unsigned long __unused3; /* network */ unsigned long __unused4; /* cnodes */ unsigned short __unused5; /* netsite */ short st_fstype; - unsigned long st_realdev; + unsigned long st_realdev; unsigned short st_basemode; unsigned short st_spareshort; - unsigned long st_uid; + unsigned long st_uid; unsigned long st_gid; unsigned long st_spare4[3]; }; +#define _HAVE_STAT_NSEC +#define _HAVE_STAT64_NSEC From db160231939239df3105b30e86ec0c7dfc8ce85c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 31 Dec 2002 20:37:32 +0000 Subject: [PATCH 2992/4487] Use libc_hidden_def(name) instead of strong_alias (name, __GI_name). --- sysdeps/alpha/setjmp.S | 2 +- sysdeps/arm/bsd-_setjmp.S | 2 +- sysdeps/hppa/bsd-_setjmp.S | 2 +- sysdeps/mips/bsd-_setjmp.S | 2 +- sysdeps/mips/mips64/bsd-_setjmp.S | 2 +- sysdeps/unix/arm/fork.S | 2 +- sysdeps/unix/bsd/hp/m68k/vfork.S | 2 +- sysdeps/unix/bsd/osf/alpha/fork.S | 2 +- sysdeps/unix/bsd/sun/m68k/vfork.S | 2 +- sysdeps/unix/bsd/ultrix4/mips/vfork.S | 2 +- sysdeps/unix/bsd/vax/vfork.S | 2 +- sysdeps/unix/mips/fork.S | 2 +- sysdeps/unix/sysv/linux/arm/vfork.S | 2 +- sysdeps/unix/sysv/linux/cris/vfork.S | 2 +- sysdeps/unix/sysv/linux/m68k/vfork.S | 2 +- sysdeps/vax/bsd-_setjmp.S | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S index 5752da7975..2e38f0031d 100644 --- a/sysdeps/alpha/setjmp.S +++ b/sysdeps/alpha/setjmp.S @@ -77,7 +77,7 @@ ENTRY(_setjmp) mov 0, a1 br $sigsetjmp_local END(_setjmp) -strong_alias (_setjmp, __GI__setjmp) +libc_hidden_def (_setjmp) ENTRY(setjmp) ldgp gp, 0(pv) diff --git a/sysdeps/arm/bsd-_setjmp.S b/sysdeps/arm/bsd-_setjmp.S index ac039ca772..c4a094e505 100644 --- a/sysdeps/arm/bsd-_setjmp.S +++ b/sysdeps/arm/bsd-_setjmp.S @@ -27,4 +27,4 @@ ENTRY (_setjmp) mov r1, #0 b PLTJMP(C_SYMBOL_NAME(__sigsetjmp)) END (_setjmp) -strong_alias (_setjmp, __GI__setjmp) +libc_hidden_def (_setjmp) diff --git a/sysdeps/hppa/bsd-_setjmp.S b/sysdeps/hppa/bsd-_setjmp.S index 31aceb0703..e5ec94c122 100644 --- a/sysdeps/hppa/bsd-_setjmp.S +++ b/sysdeps/hppa/bsd-_setjmp.S @@ -36,4 +36,4 @@ _setjmp: ldi 0, %r25 .procend -strong_alias (_setjmp, __GI__setjmp) +libc_hidden_def (_setjmp) diff --git a/sysdeps/mips/bsd-_setjmp.S b/sysdeps/mips/bsd-_setjmp.S index a175a9c820..5e3ad50305 100644 --- a/sysdeps/mips/bsd-_setjmp.S +++ b/sysdeps/mips/bsd-_setjmp.S @@ -40,4 +40,4 @@ ENTRY (_setjmp) j C_SYMBOL_NAME (__sigsetjmp) #endif .end _setjmp -strong_alias (_setjmp, __GI__setjmp) +libc_hidden_def (_setjmp) diff --git a/sysdeps/mips/mips64/bsd-_setjmp.S b/sysdeps/mips/mips64/bsd-_setjmp.S index 489bcef528..c0ff0d7621 100644 --- a/sysdeps/mips/mips64/bsd-_setjmp.S +++ b/sysdeps/mips/mips64/bsd-_setjmp.S @@ -34,4 +34,4 @@ ENTRY (_setjmp) nop jr t9 dli a1, 0 /* Pass a second argument of zero. */ -strong_alias (_setjmp, __GI__setjmp) +libc_hidden_def (_setjmp) diff --git a/sysdeps/unix/arm/fork.S b/sysdeps/unix/arm/fork.S index 19981451b6..b317b66a97 100644 --- a/sysdeps/unix/arm/fork.S +++ b/sysdeps/unix/arm/fork.S @@ -29,6 +29,6 @@ SYSCALL__ (fork, 0) and r0, r0, r1 RETINSTR(mov, pc, r14) PSEUDO_END (__fork) -strong_alias (__fork, __GI___fork) +libc_hidden_def (__fork) weak_alias (__fork, fork) diff --git a/sysdeps/unix/bsd/hp/m68k/vfork.S b/sysdeps/unix/bsd/hp/m68k/vfork.S index 0e15a5089d..abcc1c3389 100644 --- a/sysdeps/unix/bsd/hp/m68k/vfork.S +++ b/sysdeps/unix/bsd/hp/m68k/vfork.S @@ -51,6 +51,6 @@ error: movel d0, _errno moveq #-1, d0 jmp a0@ -strong_alias (__vfork, __GI___vfork) +libc_hidden_def (__vfork) weak_alias (__vfork, vfork) diff --git a/sysdeps/unix/bsd/osf/alpha/fork.S b/sysdeps/unix/bsd/osf/alpha/fork.S index 13b12239ba..a4ec14b56f 100644 --- a/sysdeps/unix/bsd/osf/alpha/fork.S +++ b/sysdeps/unix/bsd/osf/alpha/fork.S @@ -23,6 +23,6 @@ SYSCALL__ (fork, 0) cmovne a4, 0, v0 ret .end __fork -strong_alias (__fork, __GI___fork) +libc_hidden_def (__fork) weak_alias (__fork, fork) diff --git a/sysdeps/unix/bsd/sun/m68k/vfork.S b/sysdeps/unix/bsd/sun/m68k/vfork.S index 006688936b..cf9e2e9e1a 100644 --- a/sysdeps/unix/bsd/sun/m68k/vfork.S +++ b/sysdeps/unix/bsd/sun/m68k/vfork.S @@ -51,6 +51,6 @@ error: movel d0, _errno moveq #-1, d0 jmp a0@ -strong_alias (__vfork, __GI___vfork) +libc_hidden_def (__vfork) weak_alias (__vfork, vfork) diff --git a/sysdeps/unix/bsd/ultrix4/mips/vfork.S b/sysdeps/unix/bsd/ultrix4/mips/vfork.S index 80e7328c71..d413e45dc1 100644 --- a/sysdeps/unix/bsd/ultrix4/mips/vfork.S +++ b/sysdeps/unix/bsd/ultrix4/mips/vfork.S @@ -31,6 +31,6 @@ parent: ret nop .end __vfork -strong_alias (__vfork, __GI___vfork) +libc_hidden_def (__vfork) weak_alias (__vfork, vfork) diff --git a/sysdeps/unix/bsd/vax/vfork.S b/sysdeps/unix/bsd/vax/vfork.S index 16f0e98bb2..6c7e754ac7 100644 --- a/sysdeps/unix/bsd/vax/vfork.S +++ b/sysdeps/unix/bsd/vax/vfork.S @@ -52,6 +52,6 @@ error: movl r0, _errno mnegl $1, r0 jmp (r2) -strong_alias (__vfork, __GI___vfork) +libc_hidden_def (__vfork) weak_alias (__vfork, vfork) diff --git a/sysdeps/unix/mips/fork.S b/sysdeps/unix/mips/fork.S index dcec965671..1850c17f11 100644 --- a/sysdeps/unix/mips/fork.S +++ b/sysdeps/unix/mips/fork.S @@ -27,6 +27,6 @@ SYSCALL__ (fork, 0) parent: ret .end __fork -strong_alias (__fork, __GI___fork) +libc_hidden_def (__fork) weak_alias (__fork, fork) diff --git a/sysdeps/unix/sysv/linux/arm/vfork.S b/sysdeps/unix/sysv/linux/arm/vfork.S index 3364c686d6..a2c6bf3407 100644 --- a/sysdeps/unix/sysv/linux/arm/vfork.S +++ b/sysdeps/unix/sysv/linux/arm/vfork.S @@ -46,6 +46,6 @@ ENTRY (__vfork) b PLTJMP(C_SYMBOL_NAME(__syscall_error)) PSEUDO_END (__vfork) -strong_alias (__vfork, __GI___vfork) +libc_hidden_def (__vfork) weak_alias (__vfork, vfork) diff --git a/sysdeps/unix/sysv/linux/cris/vfork.S b/sysdeps/unix/sysv/linux/cris/vfork.S index f471efe0a5..74a8556765 100644 --- a/sysdeps/unix/sysv/linux/cris/vfork.S +++ b/sysdeps/unix/sysv/linux/cris/vfork.S @@ -22,6 +22,6 @@ PSEUDO (__vfork, vfork, 0) Ret nop PSEUDO_END (__vfork) -strong_alias (__vfork, __GI___vfork) +libc_hidden_def (__vfork) weak_alias (__vfork, vfork) diff --git a/sysdeps/unix/sysv/linux/m68k/vfork.S b/sysdeps/unix/sysv/linux/m68k/vfork.S index 8968caece7..ed5e1e81d5 100644 --- a/sysdeps/unix/sysv/linux/m68k/vfork.S +++ b/sysdeps/unix/sysv/linux/m68k/vfork.S @@ -62,6 +62,6 @@ ENTRY (__vfork) rts PSEUDO_END (__vfork) -strong_alias (__vfork, __GI___vfork) +libc_hidden_def (__vfork) weak_alias (__vfork, vfork) diff --git a/sysdeps/vax/bsd-_setjmp.S b/sysdeps/vax/bsd-_setjmp.S index 68888d48ed..756e96b707 100644 --- a/sysdeps/vax/bsd-_setjmp.S +++ b/sysdeps/vax/bsd-_setjmp.S @@ -30,4 +30,4 @@ ENTRY (_setjmp) pushl r1 /* Push back first argument. */ pushl r0 /* Push back return PC. */ jmp C_SYMBOL_NAME (__sigsetjmp) -strong_alias (_setjmp, __GI__setjmp) +libc_hidden_def (_setjmp) From ff1d023da3d0354c0cb3e1519dc2c9937b312130 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 31 Dec 2002 20:40:18 +0000 Subject: [PATCH 2993/4487] (__lseek): Add libc_hidden_def. --- sysdeps/unix/sysv/aix/lseek.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/aix/lseek.c b/sysdeps/unix/sysv/aix/lseek.c index 387ebd0de8..d4cbdbe702 100644 --- a/sysdeps/unix/sysv/aix/lseek.c +++ b/sysdeps/unix/sysv/aix/lseek.c @@ -7,3 +7,4 @@ __lseek (int fd, off_t offset, int whence) return lseek (fd, offset, whence); } strong_alias (__lseek, __libc_lseek) +libc_hidden_def (__lseek) From 40efe6690b5e719c647944c0cbf3aaa45fe33ab4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 31 Dec 2002 20:41:23 +0000 Subject: [PATCH 2994/4487] (accept): Add libc_hidden_def. --- sysdeps/unix/sysv/aix/accept.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/aix/accept.c b/sysdeps/unix/sysv/aix/accept.c index 0e8f67e15b..73f11499f2 100644 --- a/sysdeps/unix/sysv/aix/accept.c +++ b/sysdeps/unix/sysv/aix/accept.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002 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 @@ -27,3 +27,4 @@ accept (int fd, __SOCKADDR_ARG addr, socklen_t *addr_len) assert (sizeof (socklen_t) == sizeof (int)); return naccept (fd, addr.__sockaddr__, addr_len); } +libc_hidden_def (accept) From 7de021d5889866579fc78489d4c305d7de35ba4c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 31 Dec 2002 20:44:02 +0000 Subject: [PATCH 2995/4487] (__GI_accept): New alias to accept. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 2 +- sysdeps/unix/sysv/linux/hppa/syscalls.list | 2 +- sysdeps/unix/sysv/linux/mips/syscalls.list | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 6907ef1d2f..a053468b34 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -36,7 +36,7 @@ sys_ustat ustat ustat 2 __syscall_ustat sys_mknod xmknod mknod 3 __syscall_mknod # proper socket implementations: -accept - accept C:3 __libc_accept __accept accept +accept - accept C:3 __libc_accept __accept accept __GI_accept bind - bind 3 __bind bind connect - connect C:3 __libc_connect __connect_internal __connect connect getpeername - getpeername 3 __getpeername getpeername diff --git a/sysdeps/unix/sysv/linux/hppa/syscalls.list b/sysdeps/unix/sysv/linux/hppa/syscalls.list index bc977e2e30..65fc3cba64 100644 --- a/sysdeps/unix/sysv/linux/hppa/syscalls.list +++ b/sysdeps/unix/sysv/linux/hppa/syscalls.list @@ -14,7 +14,7 @@ semget - semget i:iii __semget semget semctl - semctl i:iiii __semctl semctl # proper socket implementations: -accept - accept Ci:iBN __libc_accept __accept accept +accept - accept Ci:iBN __libc_accept __accept accept __GI_accept bind - bind i:ipi __bind bind connect - connect Ci:ipi __libc_connect __connect_internal __connect connect getpeername - getpeername i:ipp __getpeername getpeername diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index ec75228ce1..35666c7a86 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -14,7 +14,7 @@ s_sigsuspend sigsuspend sigsuspend i:p __syscall_sigsuspend # Socket functions; Linux/MIPS doesn't use the socketcall(2) wrapper; # it's provided for compatibility, though. # -accept - accept Ci:iBN __libc_accept __accept accept +accept - accept Ci:iBN __libc_accept __accept accept __GI_accept bind - bind i:ipi __bind bind connect - connect Ci:ipi __libc_connect __connect_internal __connect connect getpeername - getpeername i:ipp __getpeername getpeername From eb22472e6ff8ce112da053851f75a637220bac67 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 3 Jan 2003 00:42:10 +0000 Subject: [PATCH 2996/4487] (__sigaction, sigaction): Protect weak_alias and libc_hidden_weak with #ifndef LIBC_SIGACTION. --- sysdeps/unix/sysv/linux/arm/sigaction.c | 5 ++++- sysdeps/unix/sysv/linux/mips/sigaction.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/sigaction.c b/sysdeps/unix/sysv/linux/arm/sigaction.c index 40ecb3224e..46ff2b1599 100644 --- a/sysdeps/unix/sysv/linux/arm/sigaction.c +++ b/sysdeps/unix/sysv/linux/arm/sigaction.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1997,1998,1999,2000,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 @@ -149,6 +149,9 @@ __libc_sigaction (sig, act, oact) return result; } libc_hidden_def (__libc_sigaction) + +#ifndef LIBC_SIGACTION weak_alias (__libc_sigaction, __sigaction) libc_hidden_weak (__sigaction) weak_alias (__libc_sigaction, sigaction) +#endif diff --git a/sysdeps/unix/sysv/linux/mips/sigaction.c b/sysdeps/unix/sysv/linux/mips/sigaction.c index 0e5cfb7569..0dee8ccc7e 100644 --- a/sysdeps/unix/sysv/linux/mips/sigaction.c +++ b/sysdeps/unix/sysv/linux/mips/sigaction.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1997,1998,1999,2000,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 @@ -135,6 +135,9 @@ __libc_sigaction (sig, act, oact) #endif } libc_hidden_def (__libc_sigaction) + +#ifndef LIBC_SIGACTION weak_alias (__libc_sigaction, __sigaction) libc_hidden_weak (__sigaction) weak_alias (__libc_sigaction, sigaction) +#endif From d0a6689abfcc9edb28ede0f6912a0b446505fed1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 3 Jan 2003 21:59:45 +0000 Subject: [PATCH 2997/4487] (inline_syscall_r0_asm): New. (inline_syscall_r0_constraint): New. (inline_syscall[0-6]): Use them. --- sysdeps/unix/sysv/linux/alpha/sysdep.h | 110 +++++++++++++++---------- 1 file changed, 66 insertions(+), 44 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h index da65caea41..60b6eda4d3 100644 --- a/sysdeps/unix/sysv/linux/alpha/sysdep.h +++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h @@ -87,44 +87,64 @@ "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8", \ "$22", "$23", "$24", "$25", "$27", "$28", "memory" +/* If TLS is in use, we have a conflict between the PAL_rduniq primitive, + as modeled within GCC, and explicit use of the R0 register. If we use + the register via the asm, the scheduler may place the PAL_rduniq insn + before we've copied the data from R0 into _sc_ret. If this happens + we'll get a reload abort, since R0 is live at the same time it is + needed for the PAL_rduniq. + + Solve this by using the "v" constraint instead of an asm for the syscall + output. We don't do this unconditionally to allow compilation with + older compilers. */ + +#ifdef USE_TLS +#define inline_syscall_r0_asm +#define inline_syscall_r0_constraint "v" +#else +#define inline_syscall_r0_asm __asm__("$0") +#define inline_syscall_r0_constraint "r" +#endif + /* It is moderately important optimization-wise to limit the lifetime of the hard-register variables as much as possible. Thus we copy in/out as close to the asm as possible. */ -#define inline_syscall0(name) \ -{ \ - register long _sc_0 __asm__("$0"); \ - register long _sc_19 __asm__("$19"); \ - \ - _sc_0 = __NR_##name; \ - __asm__("callsys # %0 %1 <= %2" \ - : "=r"(_sc_0), "=r"(_sc_19) \ - : "0"(_sc_0) \ - : inline_syscall_clobbers, \ - "$16", "$17", "$18", "$20", "$21"); \ - _sc_ret = _sc_0, _sc_err = _sc_19; \ +#define inline_syscall0(name, args...) \ +{ \ + register long _sc_0 inline_syscall_r0_asm; \ + register long _sc_19 __asm__("$19"); \ + \ + _sc_0 = __NR_##name; \ + __asm__("callsys # %0 %1 <= %2" \ + : "=" inline_syscall_r0_constraint (_sc_0), \ + "=r"(_sc_19) \ + : "0"(_sc_0) \ + : inline_syscall_clobbers, \ + "$16", "$17", "$18", "$20", "$21"); \ + _sc_ret = _sc_0, _sc_err = _sc_19; \ } -#define inline_syscall1(name,arg1) \ -{ \ - register long _sc_0 __asm__("$0"); \ - register long _sc_16 __asm__("$16"); \ - register long _sc_19 __asm__("$19"); \ - \ - _sc_0 = __NR_##name; \ - _sc_16 = (long) (arg1); \ - __asm__("callsys # %0 %1 <= %2 %3" \ - : "=r"(_sc_0), "=r"(_sc_19), \ - "=r"(_sc_16) \ - : "0"(_sc_0), "2"(_sc_16) \ - : inline_syscall_clobbers, \ - "$17", "$18", "$20", "$21"); \ - _sc_ret = _sc_0, _sc_err = _sc_19; \ +#define inline_syscall1(name,arg1) \ +{ \ + register long _sc_0 inline_syscall_r0_asm; \ + register long _sc_16 __asm__("$16"); \ + register long _sc_19 __asm__("$19"); \ + \ + _sc_0 = __NR_##name; \ + _sc_16 = (long) (arg1); \ + __asm__("callsys # %0 %1 <= %2 %3" \ + : "=" inline_syscall_r0_constraint (_sc_0), \ + "=r"(_sc_19), "=r"(_sc_16) \ + : "0"(_sc_0), "2"(_sc_16) \ + : inline_syscall_clobbers, \ + "$17", "$18", "$20", "$21"); \ + _sc_ret = _sc_0, _sc_err = _sc_19; \ } #define inline_syscall2(name,arg1,arg2) \ { \ - register long _sc_0 __asm__("$0"); \ + register long _sc_0 inline_syscall_r0_asm; \ register long _sc_16 __asm__("$16"); \ register long _sc_17 __asm__("$17"); \ register long _sc_19 __asm__("$19"); \ @@ -133,8 +153,8 @@ _sc_16 = (long) (arg1); \ _sc_17 = (long) (arg2); \ __asm__("callsys # %0 %1 <= %2 %3 %4" \ - : "=r"(_sc_0), "=r"(_sc_19), \ - "=r"(_sc_16), "=r"(_sc_17) \ + : "=" inline_syscall_r0_constraint (_sc_0), \ + "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17) \ : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17) \ : inline_syscall_clobbers, \ "$18", "$20", "$21"); \ @@ -143,7 +163,7 @@ #define inline_syscall3(name,arg1,arg2,arg3) \ { \ - register long _sc_0 __asm__("$0"); \ + register long _sc_0 inline_syscall_r0_asm; \ register long _sc_16 __asm__("$16"); \ register long _sc_17 __asm__("$17"); \ register long _sc_18 __asm__("$18"); \ @@ -154,8 +174,9 @@ _sc_17 = (long) (arg2); \ _sc_18 = (long) (arg3); \ __asm__("callsys # %0 %1 <= %2 %3 %4 %5" \ - : "=r"(_sc_0), "=r"(_sc_19), \ - "=r"(_sc_16), "=r"(_sc_17), "=r"(_sc_18) \ + : "=" inline_syscall_r0_constraint (_sc_0), \ + "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \ + "=r"(_sc_18) \ : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \ "4"(_sc_18) \ : inline_syscall_clobbers, "$20", "$21"); \ @@ -164,7 +185,7 @@ #define inline_syscall4(name,arg1,arg2,arg3,arg4) \ { \ - register long _sc_0 __asm__("$0"); \ + register long _sc_0 inline_syscall_r0_asm; \ register long _sc_16 __asm__("$16"); \ register long _sc_17 __asm__("$17"); \ register long _sc_18 __asm__("$18"); \ @@ -176,8 +197,9 @@ _sc_18 = (long) (arg3); \ _sc_19 = (long) (arg4); \ __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6" \ - : "=r"(_sc_0), "=r"(_sc_19), \ - "=r"(_sc_16), "=r"(_sc_17), "=r"(_sc_18) \ + : "=" inline_syscall_r0_constraint (_sc_0), \ + "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \ + "=r"(_sc_18) \ : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \ "4"(_sc_18), "1"(_sc_19) \ : inline_syscall_clobbers, "$20", "$21"); \ @@ -186,7 +208,7 @@ #define inline_syscall5(name,arg1,arg2,arg3,arg4,arg5) \ { \ - register long _sc_0 __asm__("$0"); \ + register long _sc_0 inline_syscall_r0_asm; \ register long _sc_16 __asm__("$16"); \ register long _sc_17 __asm__("$17"); \ register long _sc_18 __asm__("$18"); \ @@ -200,9 +222,9 @@ _sc_19 = (long) (arg4); \ _sc_20 = (long) (arg5); \ __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7" \ - : "=r"(_sc_0), "=r"(_sc_19), \ - "=r"(_sc_16), "=r"(_sc_17), "=r"(_sc_18), \ - "=r"(_sc_20) \ + : "=" inline_syscall_r0_constraint (_sc_0), \ + "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \ + "=r"(_sc_18), "=r"(_sc_20) \ : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \ "4"(_sc_18), "1"(_sc_19), "5"(_sc_20) \ : inline_syscall_clobbers, "$21"); \ @@ -211,7 +233,7 @@ #define inline_syscall6(name,arg1,arg2,arg3,arg4,arg5,arg6) \ { \ - register long _sc_0 __asm__("$0"); \ + register long _sc_0 inline_syscall_r0_asm; \ register long _sc_16 __asm__("$16"); \ register long _sc_17 __asm__("$17"); \ register long _sc_18 __asm__("$18"); \ @@ -227,9 +249,9 @@ _sc_20 = (long) (arg5); \ _sc_21 = (long) (arg6); \ __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7 %8" \ - : "=r"(_sc_0), "=r"(_sc_19) \ - "=r"(_sc_16), "=r"(_sc_17), "=r"(_sc_18), \ - "=r"(_sc_20), "=r"(_sc_21) \ + : "=" inline_syscall_r0_constraint (_sc_0), \ + "=r"(_sc_19) "=r"(_sc_16), "=r"(_sc_17), \ + "=r"(_sc_18), "=r"(_sc_20), "=r"(_sc_21) \ : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \ "4"(_sc_18), "1"(_sc_19), "5"(_sc_20), \ "6"(_sc_21) \ From 2bf8a54e871bb3eebbcbf2293d7b180cf2a153b6 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 4 Jan 2003 22:51:16 +0000 Subject: [PATCH 2998/4487] Add nanosecond fields. --- sysdeps/unix/sysv/linux/m68k/bits/stat.h | 42 ++++++++++++++++++++---- 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/sysdeps/unix/sysv/linux/m68k/bits/stat.h b/sysdeps/unix/sysv/linux/m68k/bits/stat.h index 213dbe267a..3f1f343ad4 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/stat.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/stat.h @@ -1,4 +1,5 @@ -/* Copyright (C) 1992,95,96,97,98,99,2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 1992,95,96,97,98,99,2000,2001,2002 + 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 @@ -60,12 +61,27 @@ struct stat #else __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ #endif +#ifdef __USE_MISC + /* 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 + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +#else __time_t st_atime; /* Time of last access. */ - unsigned long int __unused1; + unsigned long int st_atimensec; /* Nscecs of last access. */ __time_t st_mtime; /* Time of last modification. */ - unsigned long int __unused2; + unsigned long int st_mtimensec; /* Nsecs of last modification. */ __time_t st_ctime; /* Time of last status change. */ - unsigned long int __unused3; + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +#endif #ifndef __USE_FILE_OFFSET64 unsigned long int __unused4; unsigned long int __unused5; @@ -91,12 +107,24 @@ struct stat64 __blksize_t st_blksize; /* Optimal block size for I/O. */ __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ +#ifdef __USE_MISC + /* 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 + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +#else __time_t st_atime; /* Time of last access. */ - unsigned long int __unused1; + unsigned long int st_atimensec; /* Nscecs of last access. */ __time_t st_mtime; /* Time of last modification. */ - unsigned long int __unused2; + unsigned long int st_mtimensec; /* Nsecs of last modification. */ __time_t st_ctime; /* Time of last status change. */ - unsigned long int __unused3; + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +#endif __ino64_t st_ino; /* File serial number. */ }; #endif From c0713cc0e035f0dc7d638102838972fb7f2a746f Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 5 Jan 2003 17:14:17 +0000 Subject: [PATCH 2999/4487] (CFLAGS-.oS): Append -fPIC. --- sysdeps/m68k/Makefile | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile index c44b2d196c..68dc258406 100644 --- a/sysdeps/m68k/Makefile +++ b/sysdeps/m68k/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1993, 1994, 1996, 1997 Free Software Foundation, Inc. +# Copyright (C) 1993, 1994, 1996, 1997, 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 @@ -26,6 +26,7 @@ endif asm-CPPFLAGS += $(m68k-syntax-flag) pic-ccflag = -fpic +CFLAGS-.oS += -fPIC # Make sure setjmp.c is compiled with a frame pointer CFLAGS-setjmp.c := -fno-omit-frame-pointer @@ -36,8 +37,3 @@ long-double-fcts = yes ifeq ($(subdir),elf) CFLAGS-rtld.c += -Wno-uninitialized -Wno-unused endif - -ifeq ($(subdir),math) -# Avoid a bug in gcc -CFLAGS-s_copysignl.c += -mnobitfield -endif From a89c56aac49b2bb7fb9d6572c83fb7462056cb2a Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 6 Jan 2003 18:10:46 +0000 Subject: [PATCH 3000/4487] (elf_machine_runtime_setup): Make sure this is always inlined. (elf_machine_rela): Likewise. --- sysdeps/m68k/dl-machine.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index ce80aad8fa..61027c9bc9 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -58,7 +58,7 @@ elf_machine_load_address (void) /* Set up the loaded object described by L so its unrelocated PLT entries will jump to the on-demand fixup code in dl-runtime.c. */ -static inline int +static inline int __attribute__ ((always_inline)) elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) { Elf32_Addr *got; @@ -227,7 +227,7 @@ elf_machine_plt_value (struct link_map *map, const Elf32_Rela *reloc, /* Perform the relocation specified by RELOC and SYM (which is fully resolved). MAP is the object containing the reloc. */ -static inline void +static inline void __attribute__ ((always_inline)) elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, const Elf32_Sym *sym, const struct r_found_version *version, Elf32_Addr *const reloc_addr) From eff2079d518b6c1e2f5ba9f55e50f8bac8a46717 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 6 Jan 2003 18:11:24 +0000 Subject: [PATCH 3001/4487] (sysdep-CFLAGS): Increase inline limit. --- sysdeps/m68k/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile index 68dc258406..778a222a67 100644 --- a/sysdeps/m68k/Makefile +++ b/sysdeps/m68k/Makefile @@ -37,3 +37,6 @@ long-double-fcts = yes ifeq ($(subdir),elf) CFLAGS-rtld.c += -Wno-uninitialized -Wno-unused endif + +# Use a more reasonable inline limit +sysdep-CFLAGS += --param max-inline-insns-single=4000 From d45a8f827ed0613c211018054ffd1e389aa3d796 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 6 Jan 2003 23:52:06 +0000 Subject: [PATCH 3002/4487] (inline_syscall_r0_constraint): Rename to... (inline_syscall_r0_out_constraint): ... this. Add =. (inline_syscall[0-6]): Use inline_syscall_r0_out_constraint. --- sysdeps/unix/sysv/linux/alpha/sysdep.h | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h index 60b6eda4d3..53af4b7349 100644 --- a/sysdeps/unix/sysv/linux/alpha/sysdep.h +++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h @@ -1,4 +1,5 @@ -/* Copyright (C) 1992, 1993, 1995, 1996, 1997, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1993, 1995, 1996, 1997, 2002, 2003 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, , August 1995. @@ -100,10 +101,10 @@ #ifdef USE_TLS #define inline_syscall_r0_asm -#define inline_syscall_r0_constraint "v" +#define inline_syscall_r0_out_constraint "=v" #else -#define inline_syscall_r0_asm __asm__("$0") -#define inline_syscall_r0_constraint "r" +#define inline_syscall_r0_asm __asm__("$0") +#define inline_syscall_r0_out_constraint "=r" #endif /* It is moderately important optimization-wise to limit the lifetime @@ -117,7 +118,7 @@ \ _sc_0 = __NR_##name; \ __asm__("callsys # %0 %1 <= %2" \ - : "=" inline_syscall_r0_constraint (_sc_0), \ + : inline_syscall_r0_out_constraint (_sc_0), \ "=r"(_sc_19) \ : "0"(_sc_0) \ : inline_syscall_clobbers, \ @@ -134,7 +135,7 @@ _sc_0 = __NR_##name; \ _sc_16 = (long) (arg1); \ __asm__("callsys # %0 %1 <= %2 %3" \ - : "=" inline_syscall_r0_constraint (_sc_0), \ + : inline_syscall_r0_out_constraint (_sc_0), \ "=r"(_sc_19), "=r"(_sc_16) \ : "0"(_sc_0), "2"(_sc_16) \ : inline_syscall_clobbers, \ @@ -153,7 +154,7 @@ _sc_16 = (long) (arg1); \ _sc_17 = (long) (arg2); \ __asm__("callsys # %0 %1 <= %2 %3 %4" \ - : "=" inline_syscall_r0_constraint (_sc_0), \ + : inline_syscall_r0_out_constraint (_sc_0), \ "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17) \ : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17) \ : inline_syscall_clobbers, \ @@ -174,7 +175,7 @@ _sc_17 = (long) (arg2); \ _sc_18 = (long) (arg3); \ __asm__("callsys # %0 %1 <= %2 %3 %4 %5" \ - : "=" inline_syscall_r0_constraint (_sc_0), \ + : inline_syscall_r0_out_constraint (_sc_0), \ "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \ "=r"(_sc_18) \ : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \ @@ -197,7 +198,7 @@ _sc_18 = (long) (arg3); \ _sc_19 = (long) (arg4); \ __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6" \ - : "=" inline_syscall_r0_constraint (_sc_0), \ + : inline_syscall_r0_out_constraint (_sc_0), \ "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \ "=r"(_sc_18) \ : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \ @@ -222,7 +223,7 @@ _sc_19 = (long) (arg4); \ _sc_20 = (long) (arg5); \ __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7" \ - : "=" inline_syscall_r0_constraint (_sc_0), \ + : inline_syscall_r0_out_constraint (_sc_0), \ "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \ "=r"(_sc_18), "=r"(_sc_20) \ : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \ @@ -249,7 +250,7 @@ _sc_20 = (long) (arg5); \ _sc_21 = (long) (arg6); \ __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7 %8" \ - : "=" inline_syscall_r0_constraint (_sc_0), \ + : inline_syscall_r0_out_constraint (_sc_0), \ "=r"(_sc_19) "=r"(_sc_16), "=r"(_sc_17), \ "=r"(_sc_18), "=r"(_sc_20), "=r"(_sc_21) \ : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \ From ddf42be0e23af7a82c129a7d22de10cecd03c306 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 7 Jan 2003 00:39:17 +0000 Subject: [PATCH 3003/4487] Syscall cancellation handling for Arm. --- .../linux/arm/linuxthreads/sysdep-cancel.h | 127 ++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h diff --git a/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h new file mode 100644 index 0000000000..5f3709f742 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h @@ -0,0 +1,127 @@ +/* Copyright (C) 2003 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Phil Blundell , 2003. + + 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. */ + +#include +#ifndef __ASSEMBLER__ +# include +#endif + +#if !defined NOT_IN_libc || defined IS_IN_libpthread + +# undef PSEUDO_RET +# define PSEUDO_RET \ + ldrcc pc, [sp], $4; \ + b PLTJMP(SYSCALL_ERROR) + +# undef PSEUDO +# define PSEUDO(name, syscall_name, args) \ + .section ".text"; \ + PSEUDO_PROLOGUE; \ + ENTRY (name) \ + SINGLE_THREAD_P; \ + bne .Lpseudo_cancel; \ + DO_CALL (syscall_name, args); \ + cmn r0, $4096; \ + PSEUDO_RET_MOV; \ + .Lpseudo_cancel: \ + MAYBE_SAVE_LR; \ + DOCARGS_##args; /* save syscall args around CENABLE. */ \ + CENABLE; \ + mov ip, r0; /* put mask in safe place. */ \ + UNDOCARGS_##args; /* restore syscall args. */ \ + swi SYS_ify (syscall_name); /* do the call. */ \ + str r0, [sp, $-4]!; /* save syscall return value. */ \ + mov r0, ip; /* get mask back. */ \ + CDISABLE; \ + ldr r0, [sp], $4; /* retrieve return value. */ \ + UNDOC2ARGS_##args; /* fix register damage. */ \ + cmn r0, $4096; + +# define DOCARGS_0 +# define UNDOCARGS_0 +# define UNDOC2ARGS_0 + +# define DOCARGS_1 str r0, [sp, #-4]!; +# define UNDOCARGS_1 ldr r0, [sp], #4; +# define UNDOC2ARGS_1 + +# define DOCARGS_2 str r1, [sp, #-4]!; str r0, [sp, #-4]!; +# define UNDOCARGS_2 ldr r0, [sp], #4; ldr r1, [sp], #4; +# define UNDOC2ARGS_2 + +# define DOCARGS_3 str r2, [sp, #-4]!; str r1, [sp, #-4]!; str r0, [sp, #-4]!; +# define UNDOCARGS_3 ldr r0, [sp], #4; ldr r1, [sp], #4; ldr r2, [sp], #4 +# define UNDOC2ARGS_3 + +# define DOCARGS_4 stmfd sp!, {r0-r3} +# define UNDOCARGS_4 ldmfd sp!, {r0-r3} +# define UNDOC2ARGS_4 + +# define DOCARGS_5 stmfd sp!, {r0-r3} +# define UNDOCARGS_5 str r4, [sp, #-4]!; ldmfd sp, {r0-r4} +# define UNDOC2ARGS_5 ldr r4, [sp], #20 + +# ifdef IS_IN_libpthread +# define CENABLE bl PLTJMP(__pthread_enable_asynccancel) +# define CDISABLE bl PLTJMP(__pthread_disable_asynccancel) +# define __local_multiple_threads __pthread_multiple_threads +# else +# define CENABLE bl PLTJMP(__libc_enable_asynccancel) +# define CDISABLE bl PLTJMP(__libc_disable_asynccancel) +# define __local_multiple_threads __libc_multiple_threads +# endif + +# ifndef __ASSEMBLER__ +extern int __local_multiple_threads attribute_hidden; +# define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1) +# else +# if !defined PIC +# define SINGLE_THREAD_P \ + ldr ip, =__local_multiple_threads; \ + ldr ip, [ip]; \ + teq ip, #0; +# define MAYBE_SAVE_LR \ + str lr, [sp, $-4]!; +# define PSEUDO_RET_MOV \ + RETINSTR(movcc, pc, lr); \ + b PLTJMP(SYSCALL_ERROR) +# define PSEUDO_PROLOGUE +# else +# define SINGLE_THREAD_P \ + str lr, [sp, $-4]!; \ + ldr ip, 1b; \ + ldr lr, 2b; \ +3: \ + add ip, pc, ip; \ + ldr ip, [ip, lr]; \ + teq ip, #0; +# define PSEUDO_PROLOGUE \ + 1: .word _GLOBAL_OFFSET_TABLE_ - 3f - 8; \ + 2: .word __local_multiple_threads(GOTOFF); +# define MAYBE_SAVE_LR /* lr already saved */ +# define PSEUDO_RET_MOV PSEUDO_RET +# endif +# endif + +#elif !defined __ASSEMBLER__ + +/* This code should never be used but we define it anyhow. */ +# define SINGLE_THREAD_P (1) + +#endif From 7d983cbb3613d0935e2fde4cf4c2d99fe3ef514c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 7 Jan 2003 00:47:52 +0000 Subject: [PATCH 3004/4487] (PSEUDO): Use PSEUDO_PREPARE_ARGS. --- sysdeps/unix/alpha/sysdep.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h index f9aba3ffa2..9dbcb38521 100644 --- a/sysdeps/unix/alpha/sysdep.h +++ b/sysdeps/unix/alpha/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1995, 1996, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995, 1996, 2000, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -97,6 +97,7 @@ .ent name,0; \ __LABEL(name) \ PSEUDO_PROLOGUE; \ + PSEUDO_PREPARE_ARGS \ lda v0, SYS_ify(syscall_name); \ call_pal PAL_callsys; \ bne a3, __syscall_error !samegp; \ @@ -109,6 +110,7 @@ __LABEL(name) \ .align 4; \ .ent name,0; \ __LABEL(name) \ + PSEUDO_PREPARE_ARGS \ lda v0, SYS_ify(syscall_name); \ call_pal PAL_callsys; \ bne a3, 1996f; \ @@ -122,6 +124,9 @@ __LABEL(name) \ END(sym) #endif /* PIC && !RTLD_PRIVATE_ERRNO */ +#undef PSEUDO_PREPARE_ARGS +#define PSEUDO_PREPARE_ARGS /* Nothing. */ + #define r0 v0 #define r1 a4 From 2e2b5f5622dae199c2bee86d7d3fba9b9187f577 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 7 Jan 2003 00:48:34 +0000 Subject: [PATCH 3005/4487] Add cancellation handling. --- sysdeps/unix/sysv/linux/alpha/select.S | 99 +++++++++++++++++++++- sysdeps/unix/sysv/linux/alpha/sigsuspend.S | 35 ++------ 2 files changed, 103 insertions(+), 31 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/select.S b/sysdeps/unix/sysv/linux/alpha/select.S index 7d5282d621..9cfd63ff93 100644 --- a/sysdeps/unix/sysv/linux/alpha/select.S +++ b/sysdeps/unix/sysv/linux/alpha/select.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1998, 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 @@ -16,7 +16,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include +#include #define _ERRNO_H 1 #include @@ -49,12 +49,20 @@ LEAF(SELECT, 64) #endif .prologue 1 +#ifdef CENABLE + SINGLE_THREAD_P (t1) +#else ldl t0, __libc_missing_axp_tv64 +#endif /* Save timeout early, since we'll need to recover this after the system call. */ stq a4, 48(sp) +#ifdef CENABLE + bne t1, $do_cancel +#endif + bne t0, $do32 /* Save arguments in case we do need to fall back. */ @@ -109,6 +117,93 @@ $do32: 2: addq sp, 64, sp ret +#ifdef CENABLE + .align 3 +$do_cancel: + /* Save arguments. */ + stq a0, 8(sp) + stq a1, 16(sp) + stq a2, 24(sp) + stq a3, 32(sp) + stq ra, 40(sp) + + CENABLE + + ldl t0, __libc_missing_axp_tv64 + bne t0, $do_cancel32 + + /* Recover the saved arguments. */ + ldq a4, 48(sp) + ldq a3, 32(sp) + ldq a2, 24(sp) + ldq a1, 16(sp) + ldq a0, 8(sp) + + ldi v0, SYS_ify(select) + callsys + bne a3, $cancel_err64 + + stq v0, 8(sp) + CDISABLE + ldq v0, 8(sp) + ldq ra, 40(sp) + + /* Everything ok. */ + addq sp, 64, sp + ret + + /* If we didn't get ENOSYS, it is a real error. */ + .align 3 +$cancel_err64: + cmpeq v0, ENOSYS, t0 + beq t0, $cancel_error + stl t0, __libc_missing_axp_tv64 + + /* Recover the saved arguments. */ + .align 3 +$do_cancel32: + ldq a4, 48(sp) + ldq a3, 32(sp) + ldq a2, 24(sp) + ldq a1, 16(sp) + ldq a0, 8(sp) + + /* If the timeout argument is present bounce to the smaller fmt. */ + beq a4, 1f + ldq t0, 0(a4) + ldq t1, 8(a4) + stl t0, 0(sp) + stl t1, 4(sp) + mov sp, a4 + +1: ldi v0, SYS_ify(osf_select) + callsys + bne a3, $cancel_error + + /* ... and bounce the remaining timeout back. */ + ldq a4, 48(sp) + beq a4, 2f + ldl t0, 0(sp) + ldl t1, 4(sp) + stq t0, 0(a4) + stq t1, 8(a4) + +2: stq v0, 8(sp) + CDISABLE + ldq v0, 8(sp) + ldq ra, 40(sp) + + addq sp, 64, sp + ret + + .align 3 +$cancel_error: + stq v0, 8(sp) + CDISABLE + ldq v0, 8(sp) + ldq ra, 40(sp) +#endif + .align 3 $error: addq sp, 64, sp diff --git a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S index e0f18c26b4..e5de55faeb 100644 --- a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S +++ b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1996, 1997, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1993,1995,1996,1997,2002,2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger , 1995. @@ -20,37 +20,14 @@ /* sigsuspend is a special syscall since it needs to dereference the sigset. This will have to change when we have more than 64 signals. */ -#include +#include - .text +#undef PSEUDO_PREPARE_ARGS +#define PSEUDO_PREPARE_ARGS ldq a0, 0(a0); -LEAF(__sigsuspend, 0) -#ifdef PROF - ldgp gp, 0(pv) - .set noat - lda AT, _mcount - jsr AT, (AT), _mcount - .set at - .prologue 1 -#else - .prologue 0 -#endif - - ldq a0, 0(a0) - ldi v0, __NR_sigsuspend - call_pal PAL_callsys - bne a3, error +PSEUDO(__sigsuspend, sigsuspend, 1) ret - -error: -#ifndef PROF - br gp, 1f -1: ldgp gp, 0(gp) -#endif - SYSCALL_ERROR_HANDLER - - END(__sigsuspend) - +PSEUDO_END(__sigsuspend) libc_hidden_def (__sigsuspend) weak_alias(__sigsuspend, sigsuspend) strong_alias (__sigsuspend, __libc_sigsuspend) From b8cce412d2031e81d00167f16b295984c114342d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 7 Jan 2003 23:51:48 +0000 Subject: [PATCH 3006/4487] (ntp_adjtime): New weak alias. --- sysdeps/unix/sysv/linux/alpha/adjtime.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/adjtime.c b/sysdeps/unix/sysv/linux/alpha/adjtime.c index 2bed884ae4..34df942257 100644 --- a/sysdeps/unix/sysv/linux/alpha/adjtime.c +++ b/sysdeps/unix/sysv/linux/alpha/adjtime.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2000, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2000, 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 @@ -191,5 +191,6 @@ __adjtimex_tv64 (struct timex *tx) strong_alias (__adjtimex_tv64, __adjtimex_internal); strong_alias (__adjtimex_tv64, __adjtimex_tv64p); +weak_alias (__adjtimex_tv64, ntp_adjtime); versioned_symbol (libc, __adjtimex_tv64, __adjtimex, GLIBC_2_1); versioned_symbol (libc, __adjtimex_tv64p, adjtimex, GLIBC_2_1); From 721fe4656cd6969fa20e563825c0e0543e90e16b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 8 Jan 2003 00:14:43 +0000 Subject: [PATCH 3007/4487] (syscall_error): Optimise a little. [__LIBC_REENTRANT]: Unify PIC and non-PIC cases. --- sysdeps/unix/arm/sysdep.S | 52 +++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 30 deletions(-) diff --git a/sysdeps/unix/arm/sysdep.S b/sysdeps/unix/arm/sysdep.S index 6487caa919..5fc80a872e 100644 --- a/sysdeps/unix/arm/sysdep.S +++ b/sysdeps/unix/arm/sysdep.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,92,93,94,95,96,97,98 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,93,94,95,96,97,98,2002,03 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,42 +37,34 @@ syscall_error: moveq r0, $EAGAIN /* Yes; translate it to EAGAIN. */ #endif -#ifndef PIC - ldr r1, _errno_loc - str r0, [r1] #ifdef _LIBC_REENTRANT - stmdb sp!, {r0, lr} - /* put another copy of r0 at a specific errno location */ - bl C_SYMBOL_NAME(__errno_location) - ldmia sp!, {r1, lr} + str lr, [sp, #-4]! + str r0, [sp, #-4]! + bl PLTJMP(C_SYMBOL_NAME(__errno_location)) + ldr r1, [sp], #4 str r1, [r0] -#endif + mvn r0, $0 + ldr pc, [sp], #4 #else - stmdb sp!,{r10, lr} - @ we have to establish our PIC register - ldr r10, 1f - add r10, pc, r10 -0: ldr r1, 2f - ldr r1, [r10, r1] - @ store a copy in _errno_loc +#ifndef PIC + ldr r1, 1f str r0, [r1] -#ifdef _LIBC_REENTRANT - @ and another copy in thread copy of _errno_loc - mov r10, r0 - bl __errno_location(PLT) - str r10, [r0] -#endif - ldmia sp!, {r10, lr} - b 4f -1: .word _GLOBAL_OFFSET_TABLE_ - 0b - 4 -2: .word C_SYMBOL_NAME(errno)(GOT) -4: -#endif mvn r0, $0 RETINSTR(mov, pc, r14) -#ifndef PIC -_errno_loc: .long C_SYMBOL_NAME(errno) +1: .long C_SYMBOL_NAME(errno) +#else + @ we have to establish our PIC register + ldr r2, 1f + ldr r1, 2f +0: add r2, pc, r2 + str r0, [r1, r2] + mvn r0, $0 + RETINSTR(mov, pc, r14) + +1: .word _GLOBAL_OFFSET_TABLE_ - 0b - 8 +2: .word C_SYMBOL_NAME(errno)(GOTOFF) +#endif #endif #undef __syscall_error From 2f0910ca969f881cb379e6291f8894de3a7008fc Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 8 Jan 2003 00:15:07 +0000 Subject: [PATCH 3008/4487] (PSEUDO): Remove .type directive. (PSEUDO_RET): Use SYSCALL_ERROR in place of __syscall_error. (SYSCALL_ERROR): New. (SYSCALL_ERROR_HANDLER) [NOT_IN_libc]: Provide local copy of error handling code. (INTERNAL_SYSCALL): Define. (INLINE_SYSCALL): Use it. (INTERNAL_SYSCALL_ERROR_P, INTERNAL_SYSCALL_ERRNO): Define. --- sysdeps/unix/sysv/linux/arm/sysdep.h | 43 ++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 9 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index cdb1d8ed3b..e7caaa1480 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -49,14 +49,13 @@ #undef PSEUDO #define PSEUDO(name, syscall_name, args) \ .text; \ - .type syscall_error,%function; \ ENTRY (name); \ DO_CALL (syscall_name, args); \ cmn r0, $4096; #define PSEUDO_RET \ RETINSTR(movcc, pc, lr); \ - b PLTJMP(__syscall_error) + b PLTJMP(SYSCALL_ERROR) #undef ret #define ret PSEUDO_RET @@ -65,7 +64,22 @@ SYSCALL_ERROR_HANDLER \ END (name) -#define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */ +#if NOT_IN_libc +# define SYSCALL_ERROR __local_syscall_error +# define SYSCALL_ERROR_HANDLER \ +__local_syscall_error: \ + str lr, [sp, #-4]!; \ + str r0, [sp, #-4]!; \ + bl PLTJMP(C_SYMBOL_NAME(__errno_location)); \ + ldr r1, [sp], #4; \ + rsb r1, r1, #0; \ + str r1, [r0]; \ + mvn r0, #0; \ + ldr pc, [sp], #4; +#else +# define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */ +# define SYSCALL_ERROR __syscall_error +#endif /* Linux takes system call args in registers: syscall number in the SWI instruction @@ -123,7 +137,17 @@ /* Define a macro which expands into the inline wrapper code for a system call. */ #undef INLINE_SYSCALL -#define INLINE_SYSCALL(name, nr, args...) \ +#define INLINE_SYSCALL(name, nr, args...) \ + ({ unsigned int _sys_result = INTERNAL_SYSCALL (name, nr, args); \ + if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (_sys_result), 0)) \ + { \ + __set_errno (INTERNAL_SYSCALL_ERRNO (_sys_result)); \ + _sys_result = (unsigned int) -1; \ + } \ + (int) _sys_result; }) + +#undef INTERNAL_SYSCALL +#define INTERNAL_SYSCALL(name, nr, args...) \ ({ unsigned int _sys_result; \ { \ register int _a1 asm ("a1"); \ @@ -134,13 +158,14 @@ : "a1", "memory"); \ _sys_result = _a1; \ } \ - if (_sys_result >= (unsigned int) -4095) \ - { \ - __set_errno (-_sys_result); \ - _sys_result = (unsigned int) -1; \ - } \ (int) _sys_result; }) +#undef INTERNAL_SYSCALL_ERROR_P +#define INTERNAL_SYSCALL_ERROR_P(val) ((unsigned int) (val) >= 0xfffff001u) + +#undef INTERNAL_SYSCALL_ERRNO +#define INTERNAL_SYSCALL_ERRNO(val) (-(val)) + #define LOAD_ARGS_0() #define ASM_ARGS_0 #define LOAD_ARGS_1(a1) \ From c05bc2ca7b996f868046627cb81c8b446c140900 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 8 Jan 2003 00:15:33 +0000 Subject: [PATCH 3009/4487] (__socket): Use SYSCALL_ERROR in place of __syscall_error. --- sysdeps/unix/sysv/linux/arm/socket.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/arm/socket.S b/sysdeps/unix/sysv/linux/arm/socket.S index 2672de7b2c..f4ccc5465d 100644 --- a/sysdeps/unix/sysv/linux/arm/socket.S +++ b/sysdeps/unix/sysv/linux/arm/socket.S @@ -79,7 +79,7 @@ ENTRY (__socket) /* r0 is < 0 if there was an error. */ cmn r0, $124 RETINSTR(movcc, pc, r14) - b PLTJMP(syscall_error) + b PLTJMP(SYSCALL_ERROR) PSEUDO_END (__socket) From 51c050b0f7f8ec865e155cf34e2ace52a175d060 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 9 Jan 2003 04:06:05 +0000 Subject: [PATCH 3010/4487] Add INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros. --- sysdeps/unix/sysv/linux/m68k/brk.c | 5 +++-- sysdeps/unix/sysv/linux/m68k/getpagesize.c | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/sysdeps/unix/sysv/linux/m68k/brk.c b/sysdeps/unix/sysv/linux/m68k/brk.c index 396b97d945..6b2c92852d 100644 --- a/sysdeps/unix/sysv/linux/m68k/brk.c +++ b/sysdeps/unix/sysv/linux/m68k/brk.c @@ -1,5 +1,5 @@ /* brk system call for Linux/m68k. - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 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 @@ -33,7 +33,8 @@ __brk (void *addr) { void *newbrk; - newbrk = (void *) INTERNAL_SYSCALL (brk, 1, addr); + INTERNAL_SYSCALL_DECL (err); + newbrk = (void *) INTERNAL_SYSCALL (brk, err, 1, addr); __curbrk = newbrk; if (newbrk < addr) diff --git a/sysdeps/unix/sysv/linux/m68k/getpagesize.c b/sysdeps/unix/sysv/linux/m68k/getpagesize.c index 266d81daed..10a437b06e 100644 --- a/sysdeps/unix/sysv/linux/m68k/getpagesize.c +++ b/sysdeps/unix/sysv/linux/m68k/getpagesize.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2002 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab . @@ -37,9 +37,10 @@ __getpagesize () return GL(dl_pagesize); #ifdef __NR_getpagesize - result = INTERNAL_SYSCALL (getpagesize, 0); + INTERNAL_SYSCALL_DECL (err); + result = INTERNAL_SYSCALL (getpagesize, err, 0); /* The only possible error is ENOSYS. */ - if (!INTERNAL_SYSCALL_ERROR_P (result)) + if (!INTERNAL_SYSCALL_ERROR_P (result, err)) return result; #endif From aeeec7fb5eda5aaaa94d2e2a66780ef14a2dc57d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 9 Jan 2003 04:09:26 +0000 Subject: [PATCH 3011/4487] (INTERNAL_SYSCALL, INTERNAL_SYSCALL_ERROR_P, INTERNAL_SYSCALL_ERRNO): Add err argument. (INTERNAL_SYSCALL_DECL): Define. --- sysdeps/unix/sysv/linux/arm/sysdep.h | 12 ++++++++---- sysdeps/unix/sysv/linux/m68k/sysdep.h | 18 +++++++++++------- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index e7caaa1480..33ce12342a 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992,93,95-99,2000,02 Free Software Foundation, Inc. +/* Copyright (C) 1992, 93, 1995-2000, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, , August 1995. ARM changes by Philip Blundell, , May 1997. @@ -146,8 +146,11 @@ __local_syscall_error: \ } \ (int) _sys_result; }) +#undef INTERNAL_SYSCALL_DECL +#define INTERNAL_SYSCALL_DECL(err) do { } while (0) + #undef INTERNAL_SYSCALL -#define INTERNAL_SYSCALL(name, nr, args...) \ +#define INTERNAL_SYSCALL(name, err, nr, args...) \ ({ unsigned int _sys_result; \ { \ register int _a1 asm ("a1"); \ @@ -161,10 +164,11 @@ __local_syscall_error: \ (int) _sys_result; }) #undef INTERNAL_SYSCALL_ERROR_P -#define INTERNAL_SYSCALL_ERROR_P(val) ((unsigned int) (val) >= 0xfffff001u) +#define INTERNAL_SYSCALL_ERROR_P(val, err) \ + ((unsigned int) (val) >= 0xfffff001u) #undef INTERNAL_SYSCALL_ERRNO -#define INTERNAL_SYSCALL_ERRNO(val) (-(val)) +#define INTERNAL_SYSCALL_ERRNO(val, err) (-(val)) #define LOAD_ARGS_0() #define ASM_ARGS_0 diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h index e6fea788b6..125c584eb4 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998, 2000, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Andreas Schwab, , December 1995. @@ -180,20 +180,23 @@ SYSCALL_ERROR_LABEL: \ call. */ #undef INLINE_SYSCALL #define INLINE_SYSCALL(name, nr, args...) \ - ({ unsigned int _sys_result = INTERNAL_SYSCALL (name, nr, args); \ - if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (_sys_result), 0)) \ + ({ unsigned int _sys_result = INTERNAL_SYSCALL (name, , nr, args); \ + if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (_sys_result, ), 0))\ { \ - __set_errno (INTERNAL_SYSCALL_ERRNO (_sys_result)); \ + __set_errno (INTERNAL_SYSCALL_ERRNO (_sys_result, )); \ _sys_result = (unsigned int) -1; \ } \ (int) _sys_result; }) +#undef INTERNAL_SYSCALL_DECL +#define INTERNAL_SYSCALL_DECL(err) do { } while (0) + /* Define a macro which expands inline into the wrapper code for a system call. This use is for internal calls that do not need to handle errors normally. It will never touch errno. This returns just what the kernel gave back. */ #undef INTERNAL_SYSCALL -#define INTERNAL_SYSCALL(name, nr, args...) \ +#define INTERNAL_SYSCALL(name, err, nr, args...) \ ({ unsigned int _sys_result; \ { \ LOAD_ARGS_##nr (args) \ @@ -207,10 +210,11 @@ SYSCALL_ERROR_LABEL: \ (int) _sys_result; }) #undef INTERNAL_SYSCALL_ERROR_P -#define INTERNAL_SYSCALL_ERROR_P(val) ((unsigned int) (val) >= -4095U) +#define INTERNAL_SYSCALL_ERROR_P(val, err) \ + ((unsigned int) (val) >= -4095U) #undef INTERNAL_SYSCALL_ERRNO -#define INTERNAL_SYSCALL_ERRNO(val) (-(val)) +#define INTERNAL_SYSCALL_ERRNO(val, err) (-(val)) #define LOAD_ARGS_0() #define ASM_ARGS_0 From f3555d408986b545ef0326d8ef67355778ac9a01 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Thu, 9 Jan 2003 15:30:03 +0000 Subject: [PATCH 3012/4487] Regenerated. --- sysdeps/m68k/fpu/libm-test-ulps | 863 ++++++++++++++------------------ 1 file changed, 388 insertions(+), 475 deletions(-) diff --git a/sysdeps/m68k/fpu/libm-test-ulps b/sysdeps/m68k/fpu/libm-test-ulps index c6c3ffa596..b8b1d26e38 100644 --- a/sysdeps/m68k/fpu/libm-test-ulps +++ b/sysdeps/m68k/fpu/libm-test-ulps @@ -1,65 +1,39 @@ # Begin of automatic generation -# acos -Test "acos (0.7) == 0.79539883018414355549096833892476432": +# acosh +Test "acosh (7) == 2.63391579384963341725009269461593689": ildouble: 1 ldouble: 1 -# acosh -Test "acosh (7) == 2.633915793849633417250092694615937": +# asinh +Test "asinh (0.75) == 0.693147180559945309417232121458176568": ildouble: 1 ldouble: 1 -# asin -Test "asin (0.7) == 0.77539749661075306374035335271498708": -double: 1 -idouble: 1 +# atan2 +Test "atan2 (0.390625, .00029) == 1.57005392693128974780151246612928941": +ildouble: 1 +ldouble: 1 +Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772": ildouble: 1 ldouble: 1 - -# asinh -Test "asinh (0.7) == 0.652666566082355786": -ildouble: 14 -ldouble: 14 # atanh -Test "atanh (0.7) == 0.8673005276940531944": -double: 1 -idouble: 1 - -# cabs -Test "cabs (-0.7 + 12.4 i) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "cabs (-0.7 - 12.4 i) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "cabs (-12.4 + 0.7 i) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "cabs (-12.4 - 0.7 i) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508432547041028554": +Test "atanh (0.75) == 0.972955074527656652552676371721589865": ildouble: 1 ldouble: 1 -Test "cabs (0.7 + 12.4 i) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 # cacos -Test "Real part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i": +Test "Real part of: cacos (0.75 + 1.25 i) == 1.11752014915610270578240049553777969 - 1.13239363160530819522266333696834467 i": float: 2 ifloat: 2 ildouble: 1 ldouble: 1 +Test "Imaginary part of: cacos (0.75 + 1.25 i) == 1.11752014915610270578240049553777969 - 1.13239363160530819522266333696834467 i": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 # cacosh Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i": @@ -74,26 +48,26 @@ double: 1 idouble: 1 ildouble: 2 ldouble: 2 -Test "Real part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459105272080819308 + 1.1351827477151551088992008271819053 i": -double: 1 -idouble: 1 -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459105272080819308 + 1.1351827477151551088992008271819053 i": +Test "Real part of: cacosh (0.75 + 1.25 i) == 1.13239363160530819522266333696834467 + 1.11752014915610270578240049553777969 i": ildouble: 1 ldouble: 1 +Test "Imaginary part of: cacosh (0.75 + 1.25 i) == 1.13239363160530819522266333696834467 + 1.11752014915610270578240049553777969 i": +float: 1 +ifloat: 1 # casin -Test "Real part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i": -double: 3 -float: 2 -idouble: 3 -ifloat: 2 -Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i": -float: 2 -ifloat: 2 -ildouble: 1 -ldouble: 1 +Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": +double: 1 +float: 5 +idouble: 1 +ifloat: 5 +ildouble: 3 +ldouble: 3 +Test "Imaginary part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 # casinh Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": @@ -110,16 +84,16 @@ idouble: 13 ifloat: 1 ildouble: 6 ldouble: 6 -Test "Real part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i": +Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": double: 1 +float: 1 idouble: 1 +ifloat: 1 ildouble: 1 ldouble: 1 -Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i": -float: 2 -ifloat: 2 -ildouble: 2 -ldouble: 2 # catan Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": @@ -127,28 +101,22 @@ double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Real part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i": +Test "Real part of: catan (0.75 + 1.25 i) == 1.10714871779409050301706546017853704 + 0.549306144334054845697622618461262852 i": ildouble: 1 ldouble: 1 -Test "Imaginary part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i": -float: 1 -ifloat: 1 # catanh Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": ildouble: 1 ldouble: 1 -Test "Real part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i": -ildouble: 1 -ldouble: 1 # cbrt Test "cbrt (-0.001) == -0.1": ildouble: 1 ldouble: 1 -Test "cbrt (0.7) == 0.8879040017426007084": -double: 1 -idouble: 1 +Test "cbrt (0.9921875) == 0.997389022060725270579075195353955217": +ildouble: 1 +ldouble: 1 # ccos Test "Real part of: ccos (-2 - 3 i) == -4.1896256909688072301 - 9.1092278937553365979 i": @@ -159,9 +127,14 @@ float: 1 ifloat: 1 ildouble: 1 ldouble: 1 -Test "Imaginary part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i": -double: 1 -idouble: 1 +Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": +float: 1 +ifloat: 1 ildouble: 1 ldouble: 1 @@ -174,16 +147,14 @@ float: 1 ifloat: 1 ildouble: 1 ldouble: 1 -Test "Real part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i": -double: 1 -float: 3 -idouble: 1 -ifloat: 3 +Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": +float: 1 +ifloat: 1 ildouble: 1 ldouble: 1 -Test "Imaginary part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i": -ildouble: 2 -ldouble: 2 # cexp Test "Real part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": @@ -192,42 +163,91 @@ ifloat: 1 Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": float: 1 ifloat: 1 -Test "Real part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i": -float: 3 -ifloat: 3 -ildouble: 2 -ldouble: 2 -Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i": +Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": float: 2 ifloat: 2 +Test "Imaginary part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# clog +Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i": +ildouble: 1 +ldouble: 1 # clog10 +Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i": +float: 1 +ifloat: 1 Test "Real part of: clog10 (-2 - 3 i) == 0.5569716761534183846 - 0.9375544629863747085 i": ildouble: 1 ldouble: 1 Test "Imaginary part of: clog10 (-2 - 3 i) == 0.5569716761534183846 - 0.9375544629863747085 i": ildouble: 1 ldouble: 1 +Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i": +float: 1 +ifloat: 1 Test "Imaginary part of: clog10 (-inf + inf i) == inf + 3/4 pi*log10(e) i": double: 1 idouble: 1 -Test "Real part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i": +Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i": double: 1 float: 1 idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 -Test "Imaginary part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i": +Test "Imaginary part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i": +double: 1 +idouble: 1 +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i": float: 1 ifloat: 1 -ildouble: 3 -ldouble: 3 # cos -Test "cos (0.7) == 0.76484218728448842625585999019186495": -double: 1 -idouble: 1 Test "cos (M_PI_6l * 2.0) == 0.5": double: 1 float: 1 @@ -250,12 +270,45 @@ ifloat: 1 ildouble: 1 ldouble: 1 -# cosh -Test "cosh (0.7) == 1.255169005630943018": +# cpow +Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": +float: 1 +ifloat: 1 +Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i": +float: 1 +ifloat: 1 +ildouble: 9 +ldouble: 9 +Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i": +float: 2 +ifloat: 2 ildouble: 2 ldouble: 2 - -# cpow +Test "Imaginary part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i": +float: 2 +ifloat: 2 +ildouble: 1 +ldouble: 1 +Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 15 +ldouble: 15 +Test "Imaginary part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: cpow (2 + 0 i, 10 + 0 i) == 1024.0 + 0.0 i": ildouble: 5 ldouble: 5 @@ -289,7 +342,12 @@ ifloat: 1 Test "Imaginary part of: csin (-2 - 3 i) == -9.1544991469114295734 + 4.1689069599665643507 i": float: 1 ifloat: 1 -Test "Imaginary part of: csin (0.7 + 1.2 i) == 1.1664563419657581376 + 1.1544997246948547371 i": +Test "Real part of: csin (0.75 + 1.25 i) == 1.28722291002649188575873510790565441 + 1.17210635989270256101081285116138863 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csin (0.75 + 1.25 i) == 1.28722291002649188575873510790565441 + 1.17210635989270256101081285116138863 i": float: 1 ifloat: 1 @@ -302,17 +360,12 @@ float: 1 ifloat: 1 ildouble: 2 ldouble: 2 -Test "Real part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i": +Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": float: 1 ifloat: 1 ildouble: 1 ldouble: 1 -Test "Imaginary part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i": -float: 1 -ifloat: 1 - -# csqrt -Test "Real part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i": +Test "Imaginary part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": float: 1 ifloat: 1 @@ -323,14 +376,10 @@ ldouble: 439 Test "Imaginary part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i": ildouble: 1 ldouble: 1 -Test "Real part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 2 -ldouble: 2 -Test "Imaginary part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i": +Test "Real part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i": ildouble: 2 ldouble: 2 @@ -344,76 +393,27 @@ ldouble: 25 Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i": double: 1 idouble: 1 -Test "Real part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i": -float: 1 -ifloat: 1 -Test "Imaginary part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i": +Test "Imaginary part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i": double: 1 +float: 1 idouble: 1 +ifloat: 1 ildouble: 1 ldouble: 1 # erfc -Test "erfc (0.7) == 0.32219880616258152702": -double: 1 -idouble: 1 -ildouble: 1 -ldouble: 1 -Test "erfc (1.2) == 0.089686021770364619762": -float: 2 -ifloat: 2 -ildouble: 3 -ldouble: 3 -Test "erfc (2.0) == 0.0046777349810472658379": -double: 1 -idouble: 1 -Test "erfc (4.1) == 0.67000276540848983727e-8": -double: 24 -float: 11 -idouble: 24 -ifloat: 11 -ildouble: 12 -ldouble: 12 - -# exp10 -Test "exp10 (0.7) == 5.0118723362727228500155418688494574": -double: 1 -idouble: 1 -ildouble: 1 -ldouble: 1 - -# expm1 -Test "expm1 (1) == M_El - 1.0": -ildouble: 1 -ldouble: 1 - -# fmod -Test "fmod (-6.5, -2.3) == -1.9": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "fmod (-6.5, 2.3) == -1.9": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "fmod (6.5, -2.3) == 1.9": -double: 2 +Test "erfc (0.75) == 0.288844366346484868401062165408589223": float: 1 -idouble: 2 ifloat: 1 +Test "erfc (1.25) == 0.0770998717435417698634765188027188596": ildouble: 1 ldouble: 1 -Test "fmod (6.5, 2.3) == 1.9": -double: 2 +Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8": float: 1 -idouble: 2 ifloat: 1 + +# expm1 +Test "expm1 (1) == M_El - 1.0": ildouble: 1 ldouble: 1 @@ -444,9 +444,6 @@ ifloat: 1 Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (0.7, 1.2) == 1.3892443989449804508432547041028554": -ildouble: 1 -ldouble: 1 Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 @@ -463,10 +460,13 @@ float: 1 ifloat: 1 ildouble: 1 ldouble: 1 -Test "j0 (1.5) == 0.51182767173591812875": +Test "j0 (0.75) == 0.864242275166648623555731103820923211": +float: 1 +ifloat: 1 +Test "j0 (1.5) == 0.511827671735918128749051744283411720": float: 1 ifloat: 1 -Test "j0 (10.0) == -0.24593576445134833520": +Test "j0 (10.0) == -0.245935764451348335197760862485328754": double: 1 idouble: 1 Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1": @@ -476,113 +476,119 @@ ildouble: 1 ldouble: 1 # j1 -Test "j1 (-1.0) == -0.44005058574493351596": +Test "j1 (-1.0) == -0.440050585744933515959682203718914913": float: 1 ifloat: 1 -Test "j1 (1.0) == 0.44005058574493351596": +Test "j1 (1.0) == 0.440050585744933515959682203718914913": float: 1 ifloat: 1 -Test "j1 (1.5) == 0.55793650791009964199": +Test "j1 (1.5) == 0.557936507910099641990121213156089400": float: 1 ifloat: 1 -Test "j1 (10.0) == 0.043472746168861436670": +Test "j1 (10.0) == 0.0434727461688614366697487680258592883": float: 2 ifloat: 2 -ildouble: 2 -ldouble: 2 -Test "j1 (2.0) == 0.57672480775687338720": +ildouble: 1 +ldouble: 1 +Test "j1 (2.0) == 0.576724807756873387202448242269137087": +float: 1 +ifloat: 1 +Test "j1 (8.0) == 0.234636346853914624381276651590454612": float: 1 ifloat: 1 -Test "j1 (8.0) == 0.23463634685391462438": ildouble: 1 ldouble: 1 # jn -Test "jn (0, 1.5) == 0.51182767173591812875": +Test "jn (0, -4.0) == -3.9714980986384737228659076845169804197562E-1": float: 1 ifloat: 1 -Test "jn (0, 10.0) == -0.24593576445134833520": +ildouble: 1 +ldouble: 1 +Test "jn (0, 0.75) == 0.864242275166648623555731103820923211": +float: 1 +ifloat: 1 +Test "jn (0, 1.5) == 0.511827671735918128749051744283411720": +float: 1 +ifloat: 1 +Test "jn (0, 10.0) == -0.245935764451348335197760862485328754": double: 1 idouble: 1 -Test "jn (1, -1.0) == -0.44005058574493351596": +Test "jn (0, 4.0) == -3.9714980986384737228659076845169804197562E-1": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "jn (1, -1.0) == -0.440050585744933515959682203718914913": float: 1 ifloat: 1 -Test "jn (1, 1.0) == 0.44005058574493351596": +Test "jn (1, 1.0) == 0.440050585744933515959682203718914913": float: 1 ifloat: 1 -Test "jn (1, 1.5) == 0.55793650791009964199": +Test "jn (1, 1.5) == 0.557936507910099641990121213156089400": float: 1 ifloat: 1 -Test "jn (1, 10.0) == 0.043472746168861436670": +Test "jn (1, 10.0) == 0.0434727461688614366697487680258592883": float: 2 ifloat: 2 -ildouble: 2 -ldouble: 2 -Test "jn (1, 2.0) == 0.57672480775687338720": +ildouble: 1 +ldouble: 1 +Test "jn (1, 2.0) == 0.576724807756873387202448242269137087": +float: 1 +ifloat: 1 +Test "jn (1, 8.0) == 0.234636346853914624381276651590454612": float: 1 ifloat: 1 -Test "jn (1, 8.0) == 0.23463634685391462438": ildouble: 1 ldouble: 1 -Test "jn (10, -1.0) == 0.26306151236874532070e-9": +Test "jn (10, -1.0) == 0.263061512368745320699785368779050294e-9": float: 2 ifloat: 2 ildouble: 1 ldouble: 1 -Test "jn (10, 0.1) == 0.26905328954342155795e-19": -double: 4 -float: 6 -idouble: 4 -ifloat: 6 -ildouble: 1 -ldouble: 1 -Test "jn (10, 0.7) == 0.75175911502153953928e-11": -double: 3 +Test "jn (10, 0.125) == 0.250543369809369890173993791865771547e-18": +float: 1 +ifloat: 1 +Test "jn (10, 0.75) == 0.149621713117596814698712483621682835e-10": float: 2 -idouble: 3 ifloat: 2 ildouble: 2 ldouble: 2 -Test "jn (10, 1.0) == 0.26306151236874532070e-9": +Test "jn (10, 1.0) == 0.263061512368745320699785368779050294e-9": float: 2 ifloat: 2 ildouble: 1 ldouble: 1 -Test "jn (10, 10.0) == 0.20748610663335885770": +Test "jn (10, 10.0) == 0.207486106633358857697278723518753428": double: 1 -float: 11 +float: 5 idouble: 1 -ifloat: 11 +ifloat: 5 ildouble: 2 ldouble: 2 -Test "jn (10, 2.0) == 0.25153862827167367096e-6": +Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6": float: 2 ifloat: 2 ildouble: 1 ldouble: 1 -Test "jn (3, -1.0) == -0.019563353982668405919": +Test "jn (3, -1.0) == -0.0195633539826684059189053216217515083": float: 1 ifloat: 1 ildouble: 1 ldouble: 1 -Test "jn (3, 0.1) == 0.000020820315754756261429": -double: 1 -idouble: 1 -ildouble: 1 -ldouble: 1 -Test "jn (3, 0.7) == 0.0069296548267508408077": -double: 2 -idouble: 2 -Test "jn (3, 1.0) == 0.019563353982668405919": +Test "jn (3, 1.0) == 0.0195633539826684059189053216217515083": float: 1 ifloat: 1 ildouble: 1 ldouble: 1 -Test "jn (3, 10.0) == 0.058379379305186812343": +Test "jn (3, 10.0) == 0.0583793793051868123429354784103409563": double: 1 -float: 3 +float: 1 idouble: 1 -ifloat: 3 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "jn (3, 2.0) == 0.128943249474402051098793332969239835": ildouble: 1 ldouble: 1 @@ -610,13 +616,9 @@ ildouble: 1 ldouble: 1 # log -Test "log (0.7) == -0.35667494393873237891263871124118447": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 2 -ldouble: 2 +Test "log (0.75) == -0.287682072451780927439219005993827432": +ildouble: 1 +ldouble: 1 Test "log (2) == M_LN2l": ildouble: 1 ldouble: 1 @@ -625,50 +627,29 @@ float: 1 ifloat: 1 # log10 -Test "log10 (0.7) == -0.15490195998574316929": -double: 1 -idouble: 1 -ildouble: 1 -ldouble: 1 +Test "log10 (0.75) == -0.124938736608299953132449886193870744": +ildouble: 2 +ldouble: 2 Test "log10 (e) == log10(e)": float: 1 ifloat: 1 # log1p -Test "log1p (-0.3) == -0.35667494393873237891263871124118447": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 2 -ldouble: 2 - -# log2 -Test "log2 (0.7) == -0.51457317282975824043": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 +Test "log1p (-0.25) == -0.287682072451780927439219005993827432": ildouble: 1 ldouble: 1 -# pow -Test "pow (0.7, 1.2) == 0.65180494056638638188": +# log2 +Test "log2 (0.75) == -.415037499278843818546261056052183492": ildouble: 1 ldouble: 1 -# sin -Test "sin (0.7) == 0.64421768723769105367261435139872014": +# pow +Test "pow (0.75, 1.25) == 0.697953644326574699205914060237425566": ildouble: 1 ldouble: 1 # sincos -Test "sincos (0.7, &sin_res, &cos_res) puts 0.64421768723769105367261435139872014 in sin_res": -ildouble: 1 -ldouble: 1 -Test "sincos (0.7, &sin_res, &cos_res) puts 0.76484218728448842625585999019186495 in cos_res": -double: 1 -idouble: 1 Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": double: 1 float: 1 @@ -692,12 +673,12 @@ ildouble: 1 ldouble: 1 # sinh -Test "sinh (0.7) == 0.75858370183953350346": -float: 1 -ifloat: 1 +Test "sinh (0.75) == 0.822316731935829980703661634446913849": +ildouble: 1 +ldouble: 1 # tan -Test "tan (0.7) == 0.84228838046307944812813500221293775": +Test "tan (0.75) == 0.931596459944072461165202756573936428": ildouble: 1 ldouble: 1 Test "tan (pi/4) == 1": @@ -727,197 +708,165 @@ ildouble: 1 ldouble: 1 # y0 -Test "y0 (0.1) == -1.5342386513503668441": +Test "y0 (0.125) == -1.38968062514384052915582277745018693": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "y0 (0.75) == -0.137172769385772397522814379396581855": double: 1 -float: 2 idouble: 1 -ifloat: 2 -Test "y0 (0.7) == -0.19066492933739506743": -double: 2 -idouble: 2 ildouble: 2 ldouble: 2 -Test "y0 (1.5) == 0.38244892379775884396": +Test "y0 (1.0) == 0.0882569642156769579829267660235151628": ildouble: 1 ldouble: 1 -Test "y0 (10.0) == 0.055671167283599391424": +Test "y0 (1.5) == 0.382448923797758843955068554978089862": ildouble: 1 ldouble: 1 -Test "y0 (2.0) == 0.51037567264974511960": +Test "y0 (10.0) == 0.0556711672835993914244598774101900481": +ildouble: 1 +ldouble: 1 +Test "y0 (2.0) == 0.510375672649745119596606592727157873": float: 1 ifloat: 1 -Test "y0 (8.0) == 0.22352148938756622053": +Test "y0 (8.0) == 0.223521489387566220527323400498620359": float: 1 ifloat: 1 ildouble: 1 ldouble: 1 # y1 -Test "y1 (0.1) == -6.4589510947020269877": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 +Test "y1 (0.125) == -5.19993611253477499595928744876579921": ildouble: 1 ldouble: 1 -Test "y1 (0.7) == -1.1032498719076333697": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "y1 (1.0) == -0.78121282130028871655": +Test "y1 (1.0) == -0.781212821300288716547150000047964821": double: 1 idouble: 1 -Test "y1 (1.5) == -0.41230862697391129595": -float: 2 -ifloat: 2 -Test "y1 (10.0) == 0.24901542420695388392": +Test "y1 (10.0) == 0.249015424206953883923283474663222803": float: 1 ifloat: 1 -Test "y1 (2.0) == -0.10703243154093754689": +Test "y1 (2.0) == -0.107032431540937546888370772277476637": float: 2 ifloat: 2 ildouble: 1 ldouble: 1 -Test "y1 (8.0) == -0.15806046173124749426": -ildouble: 2 -ldouble: 2 +Test "y1 (8.0) == -0.158060461731247494255555266187483550": +ildouble: 1 +ldouble: 1 # yn -Test "yn (0, 0.1) == -1.5342386513503668441": +Test "yn (0, 0.125) == -1.38968062514384052915582277745018693": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "yn (0, 0.75) == -0.137172769385772397522814379396581855": double: 1 -float: 2 idouble: 1 -ifloat: 2 -Test "yn (0, 0.7) == -0.19066492933739506743": -double: 2 -idouble: 2 ildouble: 2 ldouble: 2 -Test "yn (0, 1.5) == 0.38244892379775884396": +Test "yn (0, 1.0) == 0.0882569642156769579829267660235151628": +ildouble: 1 +ldouble: 1 +Test "yn (0, 1.5) == 0.382448923797758843955068554978089862": ildouble: 1 ldouble: 1 -Test "yn (0, 10.0) == 0.055671167283599391424": +Test "yn (0, 10.0) == 0.0556711672835993914244598774101900481": ildouble: 1 ldouble: 1 -Test "yn (0, 2.0) == 0.51037567264974511960": +Test "yn (0, 2.0) == 0.510375672649745119596606592727157873": float: 1 ifloat: 1 -Test "yn (0, 8.0) == 0.22352148938756622053": +Test "yn (0, 8.0) == 0.223521489387566220527323400498620359": float: 1 ifloat: 1 ildouble: 1 ldouble: 1 -Test "yn (1, 0.1) == -6.4589510947020269877": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 +Test "yn (1, 0.125) == -5.19993611253477499595928744876579921": +float: 1 +ifloat: 1 ildouble: 1 ldouble: 1 -Test "yn (1, 0.7) == -1.1032498719076333697": -double: 1 +Test "yn (1, 0.75) == -1.03759455076928541973767132140642198": float: 1 -idouble: 1 ifloat: 1 -Test "yn (1, 1.0) == -0.78121282130028871655": +Test "yn (1, 1.0) == -0.781212821300288716547150000047964821": double: 1 idouble: 1 -Test "yn (1, 1.5) == -0.41230862697391129595": +Test "yn (1, 10.0) == 0.249015424206953883923283474663222803": float: 1 ifloat: 1 -Test "yn (1, 10.0) == 0.24901542420695388392": -float: 1 -ifloat: 1 -Test "yn (1, 2.0) == -0.10703243154093754689": +Test "yn (1, 2.0) == -0.107032431540937546888370772277476637": float: 2 ifloat: 2 ildouble: 1 ldouble: 1 -Test "yn (1, 8.0) == -0.15806046173124749426": -ildouble: 2 -ldouble: 2 -Test "yn (10, 0.1) == -0.11831335132045197885e19": -double: 2 -float: 2 -idouble: 2 -ifloat: 2 +Test "yn (1, 8.0) == -0.158060461731247494255555266187483550": +ildouble: 1 +ldouble: 1 +Test "yn (10, 0.125) == -127057845771019398.252538486899753195": +double: 1 +idouble: 1 ildouble: 2 ldouble: 2 -Test "yn (10, 0.7) == -0.42447194260703866924e10": -double: 6 -idouble: 6 -ildouble: 7 -ldouble: 7 -Test "yn (10, 10.0) == -0.35981415218340272205": +Test "yn (10, 0.75) == -2133501638.90573424452445412893839236": +float: 1 +ifloat: 1 +ildouble: 4 +ldouble: 4 +Test "yn (10, 10.0) == -0.359814152183402722051986577343560609": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "yn (10, 2.0) == -129184.54220803928264": +Test "yn (3, 0.125) == -2612.69757350066712600220955744091741": ildouble: 1 ldouble: 1 -Test "yn (3, 0.1) == -5099.3323786129048894": +Test "yn (3, 0.75) == -12.9877176234475433186319774484809207": double: 1 -float: 2 -idouble: 1 -ifloat: 2 -ildouble: 2 -ldouble: 2 -Test "yn (3, 0.7) == -15.819479052819633505": -double: 2 float: 1 -idouble: 2 +idouble: 1 ifloat: 1 ildouble: 2 ldouble: 2 -Test "yn (3, 2.0) == -1.1277837768404277861": +Test "yn (3, 2.0) == -1.12778377684042778608158395773179238": float: 1 ifloat: 1 # Maximal error of functions: -Function: "acos": +Function: "acosh": ildouble: 1 ldouble: 1 -Function: "acosh": +Function: "asinh": ildouble: 1 ldouble: 1 -Function: "asin": -double: 1 -idouble: 1 +Function: "atan2": ildouble: 1 ldouble: 1 -Function: "asinh": -ildouble: 14 -ldouble: 14 - Function: "atanh": -double: 1 -idouble: 1 - -Function: "cabs": -float: 1 -ifloat: 1 ildouble: 1 ldouble: 1 Function: Real part of "cacos": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Imaginary part of "cacos": float: 2 ifloat: 2 ildouble: 1 ldouble: 1 +Function: Imaginary part of "cacos": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + Function: Real part of "cacosh": double: 1 float: 7 @@ -928,21 +877,25 @@ ldouble: 6 Function: Imaginary part of "cacosh": double: 1 +float: 1 idouble: 1 +ifloat: 1 ildouble: 2 ldouble: 2 Function: Real part of "casin": -double: 3 -float: 2 -idouble: 3 -ifloat: 2 +double: 1 +float: 5 +idouble: 1 +ifloat: 5 +ildouble: 3 +ldouble: 3 Function: Imaginary part of "casin": -float: 2 -ifloat: 2 -ildouble: 1 -ldouble: 1 +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 Function: Real part of "casinh": double: 6 @@ -954,9 +907,9 @@ ldouble: 5 Function: Imaginary part of "casinh": double: 13 -float: 2 +float: 1 idouble: 13 -ifloat: 2 +ifloat: 1 ildouble: 6 ldouble: 6 @@ -975,47 +928,51 @@ ildouble: 1 ldouble: 1 Function: "cbrt": -double: 1 -idouble: 1 ildouble: 1 ldouble: 1 Function: Real part of "ccos": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: Imaginary part of "ccos": -double: 1 float: 1 -idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 Function: Real part of "ccosh": -double: 1 -float: 3 -idouble: 1 -ifloat: 3 -ildouble: 1 -ldouble: 1 +float: 1 +ifloat: 1 Function: Imaginary part of "ccosh": float: 1 ifloat: 1 -ildouble: 2 -ldouble: 2 +ildouble: 1 +ldouble: 1 Function: Real part of "cexp": -float: 3 -ifloat: 3 -ildouble: 2 -ldouble: 2 - -Function: Imaginary part of "cexp": float: 2 ifloat: 2 +Function: Imaginary part of "cexp": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "clog": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "clog": +ildouble: 1 +ldouble: 1 + Function: Real part of "clog10": double: 1 float: 1 @@ -1029,8 +986,8 @@ double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 3 -ldouble: 3 +ildouble: 2 +ldouble: 2 Function: "cos": double: 2 @@ -1040,17 +997,13 @@ ifloat: 1 ildouble: 1 ldouble: 1 -Function: "cosh": -ildouble: 2 -ldouble: 2 - Function: Real part of "cpow": double: 1 -float: 1 +float: 2 idouble: 1 -ifloat: 1 -ildouble: 5 -ldouble: 5 +ifloat: 2 +ildouble: 15 +ldouble: 15 Function: Imaginary part of "cpow": double: 2 @@ -1063,6 +1016,8 @@ ldouble: 2 Function: Real part of "csin": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: Imaginary part of "csin": float: 1 @@ -1080,15 +1035,7 @@ ifloat: 1 ildouble: 2 ldouble: 2 -Function: Real part of "csqrt": -float: 1 -ifloat: 1 - Function: Real part of "ctan": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 ildouble: 439 ldouble: 439 @@ -1097,28 +1044,20 @@ ildouble: 2 ldouble: 2 Function: Real part of "ctanh": -float: 1 -ifloat: 1 ildouble: 2 ldouble: 2 Function: Imaginary part of "ctanh": double: 1 +float: 1 idouble: 1 +ifloat: 1 ildouble: 25 ldouble: 25 Function: "erfc": -double: 24 -float: 11 -idouble: 24 -ifloat: 11 -ildouble: 12 -ldouble: 12 - -Function: "exp10": -double: 1 -idouble: 1 +float: 1 +ifloat: 1 ildouble: 1 ldouble: 1 @@ -1126,14 +1065,6 @@ Function: "expm1": ildouble: 1 ldouble: 1 -Function: "fmod": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -ildouble: 1 -ldouble: 1 - Function: "gamma": ildouble: 1 ldouble: 1 @@ -1141,8 +1072,6 @@ ldouble: 1 Function: "hypot": float: 1 ifloat: 1 -ildouble: 1 -ldouble: 1 Function: "j0": double: 1 @@ -1155,14 +1084,14 @@ ldouble: 1 Function: "j1": float: 2 ifloat: 2 -ildouble: 2 -ldouble: 2 +ildouble: 1 +ldouble: 1 Function: "jn": -double: 4 -float: 11 -idouble: 4 -ifloat: 11 +double: 1 +float: 5 +idouble: 1 +ifloat: 5 ildouble: 2 ldouble: 2 @@ -1175,42 +1104,26 @@ ildouble: 1 ldouble: 1 Function: "log": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 2 -ldouble: 2 - -Function: "log10": -double: 1 float: 1 -idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 -Function: "log1p": -double: 1 +Function: "log10": float: 1 -idouble: 1 ifloat: 1 ildouble: 2 ldouble: 2 -Function: "log2": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 +Function: "log1p": ildouble: 1 ldouble: 1 -Function: "pow": +Function: "log2": ildouble: 1 ldouble: 1 -Function: "sin": +Function: "pow": ildouble: 1 ldouble: 1 @@ -1223,8 +1136,8 @@ ildouble: 1 ldouble: 1 Function: "sinh": -float: 1 -ifloat: 1 +ildouble: 1 +ldouble: 1 Function: "tan": double: 1 @@ -1241,10 +1154,10 @@ ildouble: 1 ldouble: 1 Function: "y0": -double: 2 -float: 2 -idouble: 2 -ifloat: 2 +double: 1 +float: 1 +idouble: 1 +ifloat: 1 ildouble: 2 ldouble: 2 @@ -1253,15 +1166,15 @@ double: 1 float: 2 idouble: 1 ifloat: 2 -ildouble: 2 -ldouble: 2 +ildouble: 1 +ldouble: 1 Function: "yn": -double: 6 +double: 1 float: 2 -idouble: 6 +idouble: 1 ifloat: 2 -ildouble: 7 -ldouble: 7 +ildouble: 4 +ldouble: 4 # end of automatic generation From 2eb74642248f1a77600a6ad0ed01126d0ca3f9a4 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 10 Jan 2003 14:05:26 +0000 Subject: [PATCH 3013/4487] Optimize for kernels which are known to have the vfork syscall. --- sysdeps/unix/sysv/linux/m68k/vfork.S | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/m68k/vfork.S b/sysdeps/unix/sysv/linux/m68k/vfork.S index ed5e1e81d5..8027b2f801 100644 --- a/sysdeps/unix/sysv/linux/m68k/vfork.S +++ b/sysdeps/unix/sysv/linux/m68k/vfork.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab . @@ -20,6 +20,7 @@ #include #define _ERRNO_H 1 #include +#include /* Clone the calling process, but without copying the whole address space. The calling process is suspended until the new process exits or is @@ -46,13 +47,20 @@ ENTRY (__vfork) /* Push back the return PC. */ movel %a0,%sp@- +# ifdef __ASSUME_VFORK_SYSCALL +# ifndef PIC + jbra SYSCALL_ERROR_LABEL +# endif +# else /* Check if vfork syscall is known at all. */ movel #-ENOSYS,%d1 cmpl %d0,%d1 jne SYSCALL_ERROR_LABEL +# endif #endif +#ifndef __ASSUME_VFORK_SYSCALL /* If we don't have vfork, fork is close enough. */ movel #SYS_ify (fork), %d0 @@ -60,6 +68,7 @@ ENTRY (__vfork) tstl %d0 jmi SYSCALL_ERROR_LABEL rts +#endif PSEUDO_END (__vfork) libc_hidden_def (__vfork) From defd0faa3fd70330f8b6bf12680d5cc04e273f53 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 10 Jan 2003 14:08:16 +0000 Subject: [PATCH 3014/4487] (JUMPTARGET): Undefine before defining it. --- sysdeps/m68k/sysdep.h | 65 ++++++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 32 deletions(-) diff --git a/sysdeps/m68k/sysdep.h b/sysdeps/m68k/sysdep.h index 554b92d334..f492ff617c 100644 --- a/sysdeps/m68k/sysdep.h +++ b/sysdeps/m68k/sysdep.h @@ -1,5 +1,5 @@ /* Assembler macros for m68k. - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1998, 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 @@ -23,25 +23,25 @@ /* Syntactic details of assembler. */ -#ifdef HAVE_ELF +# ifdef HAVE_ELF /* ELF uses byte-counts for .align, most others use log2 of count of bytes. */ -#define ALIGNARG(log2) 1< Date: Fri, 10 Jan 2003 15:36:20 +0000 Subject: [PATCH 3015/4487] GET_NPROCS_PARSER for m68k. --- sysdeps/unix/sysv/linux/m68k/getsysstats.c | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/getsysstats.c diff --git a/sysdeps/unix/sysv/linux/m68k/getsysstats.c b/sysdeps/unix/sysv/linux/m68k/getsysstats.c new file mode 100644 index 0000000000..23207e9bcb --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/getsysstats.c @@ -0,0 +1,37 @@ +/* Determine various system internal values, Linux/m68k version. + Copyright (C) 2003 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Schwab + + 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. */ + + +/* We need to define a special parser for /proc/cpuinfo. */ +#define GET_NPROCS_PARSER(FP, BUFFER, RESULT) \ + do \ + { \ + (RESULT) = 0; \ + /* Read all lines and count the lines starting with the string \ + "CPU:". We don't have to fear extremely long lines since \ + the kernel will not generate them. 8192 bytes are really \ + enough. */ \ + while (fgets_unlocked (BUFFER, sizeof (BUFFER), FP) != NULL) \ + if (strncmp (BUFFER, "CPU:", 4) == 0) \ + ++(RESULT); \ + } \ + while (0) + +#include From 9cc157d474ad2cd7bdffd0e5401db477eeb980b2 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sat, 11 Jan 2003 15:26:35 +0000 Subject: [PATCH 3016/4487] * sysdeps/unix/mips/fork.S: add PSEUDO_END. * sysdeps/unix/mips/brk.S: Likewise. * sysdeps/unix/mips/pipe.S: Likewise. --- sysdeps/unix/mips/brk.S | 2 +- sysdeps/unix/mips/fork.S | 4 ++-- sysdeps/unix/mips/pipe.S | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/mips/brk.S b/sysdeps/unix/mips/brk.S index 9674571d80..f094cda19b 100644 --- a/sysdeps/unix/mips/brk.S +++ b/sysdeps/unix/mips/brk.S @@ -42,6 +42,6 @@ SYSCALL__(brk, 1) sw a0, __curbrk move v0, zero jr ra - .end __brk +PSEUDO_END(__brk) weak_alias (__brk, brk) diff --git a/sysdeps/unix/mips/fork.S b/sysdeps/unix/mips/fork.S index 1850c17f11..a7848acb6b 100644 --- a/sysdeps/unix/mips/fork.S +++ b/sysdeps/unix/mips/fork.S @@ -26,7 +26,7 @@ SYSCALL__ (fork, 0) move v0, zero parent: ret - .end __fork -libc_hidden_def (__fork) +PSEUDO_END(__fork) +libc_hidden_def (__fork) weak_alias (__fork, fork) diff --git a/sysdeps/unix/mips/pipe.S b/sysdeps/unix/mips/pipe.S index 1aebb9b81b..ee7b76d635 100644 --- a/sysdeps/unix/mips/pipe.S +++ b/sysdeps/unix/mips/pipe.S @@ -27,7 +27,7 @@ SYSCALL__ (pipe, 1) /* Go out with a clean status. */ move v0, zero j ra - .end __pipe +PSEUDO_END(__pipe) libc_hidden_def (__pipe) weak_alias (__pipe, pipe) From 6ad3dd03b3f5790c75f03dbae653879e090ffd4f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 12 Jan 2003 08:47:37 +0000 Subject: [PATCH 3017/4487] (elf_machine_rela): Move CHECK_STATIC_TLS before l_tls_offset use. --- sysdeps/alpha/dl-machine.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 711bf10fdd..3a182ca99f 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. Alpha version. - Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1996-2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson . @@ -610,8 +610,8 @@ elf_machine_rela (struct link_map *map, #else if (sym_map) { - *reloc_addr = sym_value - sym_map->l_tls_offset; CHECK_STATIC_TLS (map, sym_map); + *reloc_addr = sym_value - sym_map->l_tls_offset; } #endif } From 191cbebf58c0af533ca98c2fc7d4892d4eea66c4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 12 Jan 2003 09:06:28 +0000 Subject: [PATCH 3018/4487] Add cancellation support. --- sysdeps/unix/sysv/linux/arm/socket.S | 41 ++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/socket.S b/sysdeps/unix/sysv/linux/arm/socket.S index f4ccc5465d..3e93ceb6d2 100644 --- a/sysdeps/unix/sysv/linux/arm/socket.S +++ b/sysdeps/unix/sysv/linux/arm/socket.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 1998, 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 @@ -16,7 +16,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include +#include #include #define P(a, b) P2(a, b) @@ -53,6 +53,10 @@ #define NARGS 3 /* If we were called with no wrapper, this is really socket() */ #endif +#if defined NEED_CANCELLATION && defined CENABLE + PSEUDO_PROLOGUE +#endif + .globl __socket ENTRY (__socket) /* This code previously moved sp into ip and stored the args using @@ -68,6 +72,15 @@ ENTRY (__socket) /* Push args onto the stack. */ P(PUSHARGS_,NARGS) +#if defined NEED_CANCELLATION && defined CENABLE +#ifdef PIC + SINGLE_THREAD_P_PIC(r3) +#else + SINGLE_THREAD_P +#endif + bne 1f +#endif + /* Do the system call trap. */ mov a1, $P(SOCKOP_,socket) mov a2, sp @@ -81,6 +94,30 @@ ENTRY (__socket) RETINSTR(movcc, pc, r14) b PLTJMP(SYSCALL_ERROR) +#if defined NEED_CANCELLATION && defined CENABLE +1: + str lr, [sp, #-4]! + CENABLE + mov ip, r0 + + mov r0, #P(SOCKOP_,socket) + add r1, sp, #4 + swi SYS_ify(socketcall) + + str r0, [sp, #-4]! + mov r0, ip + CDISABLE + ldr r0, [sp], #4 + ldr lr, [sp], #4 + + P(POPARGS_,NARGS) + + /* r0 is < 0 if there was an error. */ + cmn r0, $124 + RETINSTR(movcc, pc, r14) + b PLTJMP(SYSCALL_ERROR) +#endif + PSEUDO_END (__socket) weak_alias (__socket, socket) From e62ed29b3b5e1de4df93dd1d54c5fb939834d4b4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 12 Jan 2003 09:14:25 +0000 Subject: [PATCH 3019/4487] (PSEUDO_RET): Correctly unstack lr. (UNDOARGS_5): Fix ordering of pushes and pops. (SINGLE_THREAD_P_PIC): New. (SINGLE_THREAD_P_INT): Likewise. (SINGLE_THREAD_P): Implement in terms of above. Restore lr if it was stacked. (PSEUDO): Use SINGLE_THREAD_P_INT. --- .../linux/arm/linuxthreads/sysdep-cancel.h | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h index 5f3709f742..38e472d2ba 100644 --- a/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h @@ -27,6 +27,7 @@ # undef PSEUDO_RET # define PSEUDO_RET \ ldrcc pc, [sp], $4; \ + ldr lr, [sp], $4; \ b PLTJMP(SYSCALL_ERROR) # undef PSEUDO @@ -34,7 +35,7 @@ .section ".text"; \ PSEUDO_PROLOGUE; \ ENTRY (name) \ - SINGLE_THREAD_P; \ + SINGLE_THREAD_P_INT; \ bne .Lpseudo_cancel; \ DO_CALL (syscall_name, args); \ cmn r0, $4096; \ @@ -74,7 +75,7 @@ # define UNDOC2ARGS_4 # define DOCARGS_5 stmfd sp!, {r0-r3} -# define UNDOCARGS_5 str r4, [sp, #-4]!; ldmfd sp, {r0-r4} +# define UNDOCARGS_5 ldmfd sp, {r0-r3}; str r4, [sp, #-4]!; ldr r4, [sp, #24] # define UNDOC2ARGS_5 ldr r4, [sp], #20 # ifdef IS_IN_libpthread @@ -92,10 +93,11 @@ extern int __local_multiple_threads attribute_hidden; # define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1) # else # if !defined PIC -# define SINGLE_THREAD_P \ +# define SINGLE_THREAD_P_INT \ ldr ip, =__local_multiple_threads; \ ldr ip, [ip]; \ teq ip, #0; +# define SINGLE_THREAD_P SINGLE_THREAD_P_INT # define MAYBE_SAVE_LR \ str lr, [sp, $-4]!; # define PSEUDO_RET_MOV \ @@ -103,14 +105,19 @@ extern int __local_multiple_threads attribute_hidden; b PLTJMP(SYSCALL_ERROR) # define PSEUDO_PROLOGUE # else -# define SINGLE_THREAD_P \ - str lr, [sp, $-4]!; \ +# define SINGLE_THREAD_P_PIC(reg) \ ldr ip, 1b; \ - ldr lr, 2b; \ + ldr reg, 2b; \ 3: \ add ip, pc, ip; \ ldr ip, [ip, lr]; \ teq ip, #0; +# define SINGLE_THREAD_P_INT \ + str lr, [sp, $-4]!; \ + SINGLE_THREAD_P_PIC(lr) +# define SINGLE_THREAD_P \ + SINGLE_THREAD_P_INT; \ + ldr lr, [sp], $4 # define PSEUDO_PROLOGUE \ 1: .word _GLOBAL_OFFSET_TABLE_ - 3f - 8; \ 2: .word __local_multiple_threads(GOTOFF); From f5e2ab0edb7ca64e3682ae305d0c04ef0eb37f6b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 12 Jan 2003 09:16:06 +0000 Subject: [PATCH 3020/4487] vfork implementation for LinuxThreads/Arm. --- .../unix/sysv/linux/arm/linuxthreads/vfork.S | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S diff --git a/sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S b/sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S new file mode 100644 index 0000000000..6092bd9fd4 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S @@ -0,0 +1,57 @@ +/* Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Philip Blundell . + + 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. */ + +#include +#define _ERRNO_H 1 +#include + +/* Clone the calling process, but without copying the whole address +pace. + The calling process is suspended until the new process exits or is + replaced by a call to `execve'. Return -1 for errors, 0 to the new +rocess, + and the process ID of the new process to the old process. */ + + PSEUDO_PROLOGUE + +ENTRY (__vfork) + +#ifdef __NR_vfork + SINGLE_THREAD_P + bne HIDDEN_JUMPTARGET (__fork) + swi __NR_vfork + cmn a1, #4096 + RETINSTR(movcc, pc, lr) + + /* Check if vfork syscall is known at all. */ + ldr a2, =-ENOSYS + teq a1, a2 + bne PLTJMP(C_SYMBOL_NAME(__syscall_error)) +#endif + + /* If we don't have vfork, fork is close enough. */ + swi __NR_fork + cmn a1, #4096 + RETINSTR(movcc, pc, lr) + b PLTJMP(C_SYMBOL_NAME(__syscall_error)) + +PSEUDO_END (__vfork) +libc_hidden_def (__vfork) + +weak_alias (__vfork, vfork) From a48dbdf0443228064c425d5b9909e75f7b3dee0a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 12 Jan 2003 19:22:32 +0000 Subject: [PATCH 3021/4487] (elf_machine_rela): Compute DTPREL64 and TPREL64 without loadbase applied. --- sysdeps/alpha/dl-machine.h | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 3a182ca99f..5016f1353e 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -544,15 +544,25 @@ elf_machine_rela (struct link_map *map, else { Elf64_Addr sym_value; + Elf64_Addr sym_raw_value; #if defined USE_TLS && !defined RTLD_BOOTSTRAP struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type); - sym_value = sym ? sym_map->l_addr + sym->st_value : 0; + sym_raw_value = sym_value = reloc->r_addend; + if (sym) + { + sym_raw_value += sym->st_value; + sym_value = sym_raw_value + sym_map->l_addr; + } #else Elf64_Addr loadbase = RESOLVE (&sym, version, r_type); - sym_value = sym ? loadbase + sym->st_value : 0; + sym_raw_value = sym_value = reloc->r_addend; + if (sym) + { + sym_raw_value += sym->st_value; + sym_value = sym_raw_value + loadbase; + } #endif - sym_value += reloc->r_addend; if (r_type == R_ALPHA_GLOB_DAT) *reloc_addr = sym_value; @@ -600,18 +610,18 @@ elf_machine_rela (struct link_map *map, #ifndef RTLD_BOOTSTRAP /* During relocation all TLS symbols are defined and used. Therefore the offset is already correct. */ - *reloc_addr = sym_value; + *reloc_addr = sym_raw_value; #endif } else if (r_type == R_ALPHA_TPREL64) { #ifdef RTLD_BOOTSTRAP - *reloc_addr = sym_value - map->l_tls_offset; + *reloc_addr = sym_raw_value - map->l_tls_offset; #else if (sym_map) { CHECK_STATIC_TLS (map, sym_map); - *reloc_addr = sym_value - sym_map->l_tls_offset; + *reloc_addr = sym_raw_value - sym_map->l_tls_offset; } #endif } From df162e76028189161ed3d8ccefac6818999478a1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 12 Jan 2003 19:23:03 +0000 Subject: [PATCH 3022/4487] Use correct definition of errno for NOT_IN_libc. --- sysdeps/unix/alpha/sysdep.S | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S index 4c7c134333..c31508bc30 100644 --- a/sysdeps/unix/alpha/sysdep.S +++ b/sysdeps/unix/alpha/sysdep.S @@ -47,11 +47,17 @@ __syscall_error: #if defined(_LIBC_REENTRANT) && USE___THREAD +#ifndef NOT_IN_libc +# define SYSCALL_ERROR_ERRNO __libc_errno +#else +# define SYSCALL_ERROR_ERRNO errno +#endif + LOADGP PROLOGUE mov v0, t0 call_pal PAL_rduniq - ldq t1, __libc_errno(gp) !gottprel + ldq t1, SYSCALL_ERROR_ERRNO(gp) !gottprel addq v0, t1, v0 stl t0, 0(v0) lda v0, -1 From 411c121bce89d50d8354114adc43fc4e91a2cc3d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 12 Jan 2003 19:23:41 +0000 Subject: [PATCH 3023/4487] Move inline syscall bits to sysdeps/unix/alpha/sysdep.h. --- sysdeps/unix/sysv/linux/alpha/sysdep.h | 191 +------------------------ 1 file changed, 5 insertions(+), 186 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h index 53af4b7349..6a079060c7 100644 --- a/sysdeps/unix/sysv/linux/alpha/sysdep.h +++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h @@ -72,192 +72,11 @@ ? __syscall_##name(args) \ : INLINE_SYSCALL1(name, nr, args)) -#define INLINE_SYSCALL1(name, nr, args...) \ -({ \ - long _sc_ret, _sc_err; \ - inline_syscall##nr(name, args); \ - if (_sc_err) \ - { \ - __set_errno (_sc_ret); \ - _sc_ret = -1L; \ - } \ - _sc_ret; \ +#undef INTERNAL_SYSCALL +#define INTERNAL_SYSCALL(name, err_out, nr, args...) \ +({ \ + extern char ChEcK[__NR_##name == __NR_rt_sigaction ? -1 : 1]; \ + INTERNAL_SYSCALL1(name, err_out, nr, args); \ }) -#define inline_syscall_clobbers \ - "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8", \ - "$22", "$23", "$24", "$25", "$27", "$28", "memory" - -/* If TLS is in use, we have a conflict between the PAL_rduniq primitive, - as modeled within GCC, and explicit use of the R0 register. If we use - the register via the asm, the scheduler may place the PAL_rduniq insn - before we've copied the data from R0 into _sc_ret. If this happens - we'll get a reload abort, since R0 is live at the same time it is - needed for the PAL_rduniq. - - Solve this by using the "v" constraint instead of an asm for the syscall - output. We don't do this unconditionally to allow compilation with - older compilers. */ - -#ifdef USE_TLS -#define inline_syscall_r0_asm -#define inline_syscall_r0_out_constraint "=v" -#else -#define inline_syscall_r0_asm __asm__("$0") -#define inline_syscall_r0_out_constraint "=r" -#endif - -/* It is moderately important optimization-wise to limit the lifetime - of the hard-register variables as much as possible. Thus we copy - in/out as close to the asm as possible. */ - -#define inline_syscall0(name, args...) \ -{ \ - register long _sc_0 inline_syscall_r0_asm; \ - register long _sc_19 __asm__("$19"); \ - \ - _sc_0 = __NR_##name; \ - __asm__("callsys # %0 %1 <= %2" \ - : inline_syscall_r0_out_constraint (_sc_0), \ - "=r"(_sc_19) \ - : "0"(_sc_0) \ - : inline_syscall_clobbers, \ - "$16", "$17", "$18", "$20", "$21"); \ - _sc_ret = _sc_0, _sc_err = _sc_19; \ -} - -#define inline_syscall1(name,arg1) \ -{ \ - register long _sc_0 inline_syscall_r0_asm; \ - register long _sc_16 __asm__("$16"); \ - register long _sc_19 __asm__("$19"); \ - \ - _sc_0 = __NR_##name; \ - _sc_16 = (long) (arg1); \ - __asm__("callsys # %0 %1 <= %2 %3" \ - : inline_syscall_r0_out_constraint (_sc_0), \ - "=r"(_sc_19), "=r"(_sc_16) \ - : "0"(_sc_0), "2"(_sc_16) \ - : inline_syscall_clobbers, \ - "$17", "$18", "$20", "$21"); \ - _sc_ret = _sc_0, _sc_err = _sc_19; \ -} - -#define inline_syscall2(name,arg1,arg2) \ -{ \ - register long _sc_0 inline_syscall_r0_asm; \ - register long _sc_16 __asm__("$16"); \ - register long _sc_17 __asm__("$17"); \ - register long _sc_19 __asm__("$19"); \ - \ - _sc_0 = __NR_##name; \ - _sc_16 = (long) (arg1); \ - _sc_17 = (long) (arg2); \ - __asm__("callsys # %0 %1 <= %2 %3 %4" \ - : inline_syscall_r0_out_constraint (_sc_0), \ - "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17) \ - : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17) \ - : inline_syscall_clobbers, \ - "$18", "$20", "$21"); \ - _sc_ret = _sc_0, _sc_err = _sc_19; \ -} - -#define inline_syscall3(name,arg1,arg2,arg3) \ -{ \ - register long _sc_0 inline_syscall_r0_asm; \ - register long _sc_16 __asm__("$16"); \ - register long _sc_17 __asm__("$17"); \ - register long _sc_18 __asm__("$18"); \ - register long _sc_19 __asm__("$19"); \ - \ - _sc_0 = __NR_##name; \ - _sc_16 = (long) (arg1); \ - _sc_17 = (long) (arg2); \ - _sc_18 = (long) (arg3); \ - __asm__("callsys # %0 %1 <= %2 %3 %4 %5" \ - : inline_syscall_r0_out_constraint (_sc_0), \ - "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \ - "=r"(_sc_18) \ - : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \ - "4"(_sc_18) \ - : inline_syscall_clobbers, "$20", "$21"); \ - _sc_ret = _sc_0, _sc_err = _sc_19; \ -} - -#define inline_syscall4(name,arg1,arg2,arg3,arg4) \ -{ \ - register long _sc_0 inline_syscall_r0_asm; \ - register long _sc_16 __asm__("$16"); \ - register long _sc_17 __asm__("$17"); \ - register long _sc_18 __asm__("$18"); \ - register long _sc_19 __asm__("$19"); \ - \ - _sc_0 = __NR_##name; \ - _sc_16 = (long) (arg1); \ - _sc_17 = (long) (arg2); \ - _sc_18 = (long) (arg3); \ - _sc_19 = (long) (arg4); \ - __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6" \ - : inline_syscall_r0_out_constraint (_sc_0), \ - "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \ - "=r"(_sc_18) \ - : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \ - "4"(_sc_18), "1"(_sc_19) \ - : inline_syscall_clobbers, "$20", "$21"); \ - _sc_ret = _sc_0, _sc_err = _sc_19; \ -} - -#define inline_syscall5(name,arg1,arg2,arg3,arg4,arg5) \ -{ \ - register long _sc_0 inline_syscall_r0_asm; \ - register long _sc_16 __asm__("$16"); \ - register long _sc_17 __asm__("$17"); \ - register long _sc_18 __asm__("$18"); \ - register long _sc_19 __asm__("$19"); \ - register long _sc_20 __asm__("$20"); \ - \ - _sc_0 = __NR_##name; \ - _sc_16 = (long) (arg1); \ - _sc_17 = (long) (arg2); \ - _sc_18 = (long) (arg3); \ - _sc_19 = (long) (arg4); \ - _sc_20 = (long) (arg5); \ - __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7" \ - : inline_syscall_r0_out_constraint (_sc_0), \ - "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \ - "=r"(_sc_18), "=r"(_sc_20) \ - : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \ - "4"(_sc_18), "1"(_sc_19), "5"(_sc_20) \ - : inline_syscall_clobbers, "$21"); \ - _sc_ret = _sc_0, _sc_err = _sc_19; \ -} - -#define inline_syscall6(name,arg1,arg2,arg3,arg4,arg5,arg6) \ -{ \ - register long _sc_0 inline_syscall_r0_asm; \ - register long _sc_16 __asm__("$16"); \ - register long _sc_17 __asm__("$17"); \ - register long _sc_18 __asm__("$18"); \ - register long _sc_19 __asm__("$19"); \ - register long _sc_20 __asm__("$20"); \ - register long _sc_21 __asm__("$21"); \ - \ - _sc_0 = __NR_##name; \ - _sc_16 = (long) (arg1); \ - _sc_17 = (long) (arg2); \ - _sc_18 = (long) (arg3); \ - _sc_19 = (long) (arg4); \ - _sc_20 = (long) (arg5); \ - _sc_21 = (long) (arg6); \ - __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7 %8" \ - : inline_syscall_r0_out_constraint (_sc_0), \ - "=r"(_sc_19) "=r"(_sc_16), "=r"(_sc_17), \ - "=r"(_sc_18), "=r"(_sc_20), "=r"(_sc_21) \ - : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \ - "4"(_sc_18), "1"(_sc_19), "5"(_sc_20), \ - "6"(_sc_21) \ - : inline_syscall_clobbers); \ - _sc_ret = _sc_0, _sc_err = _sc_19; \ -} - #endif /* _LINUX_ALPHA_SYSDEP_H */ From aaadd842d8899f70b6ea5b2820f394ffa0d65f4d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 12 Jan 2003 19:25:52 +0000 Subject: [PATCH 3024/4487] Add inline syscall definitions. (PSEUDO_LOADGP): Remove. (PSEUDO_PROLOGUE): Load GP in non-pic case. (SYSCALL_ERROR_LABEL): New. (PSEUDO): Use it in error branch. (PSEUDO_END): Add $syscall_error label. --- sysdeps/unix/alpha/sysdep.h | 265 +++++++++++++++++++++++++++++++----- 1 file changed, 234 insertions(+), 31 deletions(-) diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h index 9dbcb38521..47d5f76833 100644 --- a/sysdeps/unix/alpha/sysdep.h +++ b/sysdeps/unix/alpha/sysdep.h @@ -58,9 +58,6 @@ #undef END #define END(sym) .end sym -/* Note that PSEUDO/PSEUDO_END use label number 1996---do not use a - label of that number between those two macros! */ - #ifdef PROF # define PSEUDO_PROLOGUE \ .frame sp, 0, ra; \ @@ -70,28 +67,38 @@ jsr AT,(AT),_mcount; \ .set at; \ .prologue 1 -# define PSEUDO_LOADGP -#else +#elif defined PIC # define PSEUDO_PROLOGUE \ .frame sp, 0, ra; \ .prologue 0 -# define PSEUDO_LOADGP \ - br gp, 2f; \ -2: ldgp gp, 0(gp) +#else +# define PSEUDO_PROLOGUE \ + .frame sp, 0, ra; \ + ldgp gp,0(pv); \ + .prologue 1 #endif /* PROF */ #if RTLD_PRIVATE_ERRNO +# define SYSCALL_ERROR_LABEL $syscall_error # define SYSCALL_ERROR_HANDLER \ stl v0, errno(gp) !gprel; \ lda v0, -1; \ ret +#elif defined(PIC) +# define SYSCALL_ERROR_LABEL __syscall_error +# define SYSCALL_ERROR_HANDLER \ + br $31, __syscall_error !samegp #else +# define SYSCALL_ERROR_LABEL $syscall_error # define SYSCALL_ERROR_HANDLER \ jmp $31, __syscall_error #endif /* RTLD_PRIVATE_ERRNO */ -#if defined(PIC) && !RTLD_PRIVATE_ERRNO -# define PSEUDO(name, syscall_name, args) \ +/* Overridden by specific syscalls. */ +#undef PSEUDO_PREPARE_ARGS +#define PSEUDO_PREPARE_ARGS /* Nothing. */ + +#define PSEUDO(name, syscall_name, args) \ .globl name; \ .align 4; \ .ent name,0; \ @@ -100,36 +107,232 @@ __LABEL(name) \ PSEUDO_PREPARE_ARGS \ lda v0, SYS_ify(syscall_name); \ call_pal PAL_callsys; \ - bne a3, __syscall_error !samegp; \ -3: -# undef PSEUDO_END + bne a3, SYSCALL_ERROR_LABEL + +#undef PSEUDO_END +#if defined(PIC) && !RTLD_PRIVATE_ERRNO # define PSEUDO_END(sym) END(sym) #else -# define PSEUDO(name, syscall_name, args) \ - .globl name; \ - .align 4; \ - .ent name,0; \ -__LABEL(name) \ - PSEUDO_PREPARE_ARGS \ - lda v0, SYS_ify(syscall_name); \ - call_pal PAL_callsys; \ - bne a3, 1996f; \ -3: - -# undef PSEUDO_END # define PSEUDO_END(sym) \ -1996: \ - PSEUDO_LOADGP; \ +$syscall_error: \ SYSCALL_ERROR_HANDLER; \ END(sym) -#endif /* PIC && !RTLD_PRIVATE_ERRNO */ - -#undef PSEUDO_PREPARE_ARGS -#define PSEUDO_PREPARE_ARGS /* Nothing. */ +#endif #define r0 v0 #define r1 a4 #define MOVE(x,y) mov x,y +#else /* !ASSEMBLER */ + +/* ??? Linux needs to be able to override INLINE_SYSCALL for one + particular special case. Make this easy. */ + +#define INLINE_SYSCALL(name, nr, args...) \ + INLINE_SYSCALL1(name, nr, args) + +#define INLINE_SYSCALL1(name, nr, args...) \ +({ \ + long _sc_ret, _sc_err; \ + inline_syscall##nr(name, args); \ + if (_sc_err) \ + { \ + __set_errno (_sc_ret); \ + _sc_ret = -1L; \ + } \ + _sc_ret; \ +}) + +#define INTERNAL_SYSCALL(name, err_out, nr, args...) \ + INTERNAL_SYSCALL1(name, err_out, nr, args) + +#define INTERNAL_SYSCALL1(name, err_out, nr, args...) \ +({ \ + long _sc_ret, _sc_err; \ + inline_syscall##nr(name, args); \ + err_out = _sc_err; \ + _sc_ret; \ +}) + +#define INTERNAL_SYSCALL_DECL(err) long int err +#define INTERNAL_SYSCALL_ERROR_P(val, err) err +#define INTERNAL_SYSCALL_ERRNO(val, err) val + +#define inline_syscall_clobbers \ + "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8", \ + "$22", "$23", "$24", "$25", "$27", "$28", "memory" + +/* If TLS is in use, we have a conflict between the PAL_rduniq primitive, + as modeled within GCC, and explicit use of the R0 register. If we use + the register via the asm, the scheduler may place the PAL_rduniq insn + before we've copied the data from R0 into _sc_ret. If this happens + we'll get a reload abort, since R0 is live at the same time it is + needed for the PAL_rduniq. + + Solve this by using the "v" constraint instead of an asm for the syscall + output. We don't do this unconditionally to allow compilation with + older compilers. */ + +#ifdef USE_TLS +#define inline_syscall_r0_asm +#define inline_syscall_r0_out_constraint "=v" +#else +#define inline_syscall_r0_asm __asm__("$0") +#define inline_syscall_r0_out_constraint "=r" +#endif + +/* It is moderately important optimization-wise to limit the lifetime + of the hard-register variables as much as possible. Thus we copy + in/out as close to the asm as possible. */ + +#define inline_syscall0(name, args...) \ +{ \ + register long _sc_0 inline_syscall_r0_asm; \ + register long _sc_19 __asm__("$19"); \ + \ + _sc_0 = __NR_##name; \ + __asm__("callsys # %0 %1 <= %2" \ + : inline_syscall_r0_out_constraint (_sc_0), \ + "=r"(_sc_19) \ + : "0"(_sc_0) \ + : inline_syscall_clobbers, \ + "$16", "$17", "$18", "$20", "$21"); \ + _sc_ret = _sc_0, _sc_err = _sc_19; \ +} + +#define inline_syscall1(name,arg1) \ +{ \ + register long _sc_0 inline_syscall_r0_asm; \ + register long _sc_16 __asm__("$16"); \ + register long _sc_19 __asm__("$19"); \ + \ + _sc_0 = __NR_##name; \ + _sc_16 = (long) (arg1); \ + __asm__("callsys # %0 %1 <= %2 %3" \ + : inline_syscall_r0_out_constraint (_sc_0), \ + "=r"(_sc_19), "=r"(_sc_16) \ + : "0"(_sc_0), "2"(_sc_16) \ + : inline_syscall_clobbers, \ + "$17", "$18", "$20", "$21"); \ + _sc_ret = _sc_0, _sc_err = _sc_19; \ +} + +#define inline_syscall2(name,arg1,arg2) \ +{ \ + register long _sc_0 inline_syscall_r0_asm; \ + register long _sc_16 __asm__("$16"); \ + register long _sc_17 __asm__("$17"); \ + register long _sc_19 __asm__("$19"); \ + \ + _sc_0 = __NR_##name; \ + _sc_16 = (long) (arg1); \ + _sc_17 = (long) (arg2); \ + __asm__("callsys # %0 %1 <= %2 %3 %4" \ + : inline_syscall_r0_out_constraint (_sc_0), \ + "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17) \ + : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17) \ + : inline_syscall_clobbers, \ + "$18", "$20", "$21"); \ + _sc_ret = _sc_0, _sc_err = _sc_19; \ +} + +#define inline_syscall3(name,arg1,arg2,arg3) \ +{ \ + register long _sc_0 inline_syscall_r0_asm; \ + register long _sc_16 __asm__("$16"); \ + register long _sc_17 __asm__("$17"); \ + register long _sc_18 __asm__("$18"); \ + register long _sc_19 __asm__("$19"); \ + \ + _sc_0 = __NR_##name; \ + _sc_16 = (long) (arg1); \ + _sc_17 = (long) (arg2); \ + _sc_18 = (long) (arg3); \ + __asm__("callsys # %0 %1 <= %2 %3 %4 %5" \ + : inline_syscall_r0_out_constraint (_sc_0), \ + "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \ + "=r"(_sc_18) \ + : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \ + "4"(_sc_18) \ + : inline_syscall_clobbers, "$20", "$21"); \ + _sc_ret = _sc_0, _sc_err = _sc_19; \ +} + +#define inline_syscall4(name,arg1,arg2,arg3,arg4) \ +{ \ + register long _sc_0 inline_syscall_r0_asm; \ + register long _sc_16 __asm__("$16"); \ + register long _sc_17 __asm__("$17"); \ + register long _sc_18 __asm__("$18"); \ + register long _sc_19 __asm__("$19"); \ + \ + _sc_0 = __NR_##name; \ + _sc_16 = (long) (arg1); \ + _sc_17 = (long) (arg2); \ + _sc_18 = (long) (arg3); \ + _sc_19 = (long) (arg4); \ + __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6" \ + : inline_syscall_r0_out_constraint (_sc_0), \ + "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \ + "=r"(_sc_18) \ + : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \ + "4"(_sc_18), "1"(_sc_19) \ + : inline_syscall_clobbers, "$20", "$21"); \ + _sc_ret = _sc_0, _sc_err = _sc_19; \ +} + +#define inline_syscall5(name,arg1,arg2,arg3,arg4,arg5) \ +{ \ + register long _sc_0 inline_syscall_r0_asm; \ + register long _sc_16 __asm__("$16"); \ + register long _sc_17 __asm__("$17"); \ + register long _sc_18 __asm__("$18"); \ + register long _sc_19 __asm__("$19"); \ + register long _sc_20 __asm__("$20"); \ + \ + _sc_0 = __NR_##name; \ + _sc_16 = (long) (arg1); \ + _sc_17 = (long) (arg2); \ + _sc_18 = (long) (arg3); \ + _sc_19 = (long) (arg4); \ + _sc_20 = (long) (arg5); \ + __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7" \ + : inline_syscall_r0_out_constraint (_sc_0), \ + "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \ + "=r"(_sc_18), "=r"(_sc_20) \ + : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \ + "4"(_sc_18), "1"(_sc_19), "5"(_sc_20) \ + : inline_syscall_clobbers, "$21"); \ + _sc_ret = _sc_0, _sc_err = _sc_19; \ +} + +#define inline_syscall6(name,arg1,arg2,arg3,arg4,arg5,arg6) \ +{ \ + register long _sc_0 inline_syscall_r0_asm; \ + register long _sc_16 __asm__("$16"); \ + register long _sc_17 __asm__("$17"); \ + register long _sc_18 __asm__("$18"); \ + register long _sc_19 __asm__("$19"); \ + register long _sc_20 __asm__("$20"); \ + register long _sc_21 __asm__("$21"); \ + \ + _sc_0 = __NR_##name; \ + _sc_16 = (long) (arg1); \ + _sc_17 = (long) (arg2); \ + _sc_18 = (long) (arg3); \ + _sc_19 = (long) (arg4); \ + _sc_20 = (long) (arg5); \ + _sc_21 = (long) (arg6); \ + __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7 %8" \ + : inline_syscall_r0_out_constraint (_sc_0), \ + "=r"(_sc_19) "=r"(_sc_16), "=r"(_sc_17), \ + "=r"(_sc_18), "=r"(_sc_20), "=r"(_sc_21) \ + : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \ + "4"(_sc_18), "1"(_sc_19), "5"(_sc_20), \ + "6"(_sc_21) \ + : inline_syscall_clobbers); \ + _sc_ret = _sc_0, _sc_err = _sc_19; \ +} + #endif /* ASSEMBLER */ From 259eb5cdb82420ecdc9c1da9445a7dc4fd92496e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 14 Jan 2003 01:23:59 +0000 Subject: [PATCH 3025/4487] (INLINE_SYSCALL): Undefined before defining. --- sysdeps/unix/alpha/sysdep.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h index 47d5f76833..01e7de0d06 100644 --- a/sysdeps/unix/alpha/sysdep.h +++ b/sysdeps/unix/alpha/sysdep.h @@ -129,6 +129,7 @@ __LABEL(name) \ /* ??? Linux needs to be able to override INLINE_SYSCALL for one particular special case. Make this easy. */ +#undef INLINE_SYSCALL #define INLINE_SYSCALL(name, nr, args...) \ INLINE_SYSCALL1(name, nr, args) From 9da3df102148ebd3e371b00886b9a3ffb811ce25 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 15 Jan 2003 01:02:03 +0000 Subject: [PATCH 3026/4487] (INTERNAL_SYSCALL, INTERNAL_SYSCALL_DECL, INTERNAL_SYSCALL_ERRNO, INTERNAL_SYSCALL_ERROR_P, INLINE_SYSCALL): Define. --- sysdeps/unix/sysv/linux/mips/sysdep.h | 238 ++++++++++++++++++++++++++ 1 file changed, 238 insertions(+) diff --git a/sysdeps/unix/sysv/linux/mips/sysdep.h b/sysdeps/unix/sysv/linux/mips/sysdep.h index be88479e61..1fd64e5bd5 100644 --- a/sysdeps/unix/sysv/linux/mips/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/sysdep.h @@ -33,4 +33,242 @@ # define SYS_ify(syscall_name) __NR_/**/syscall_name #endif +#ifndef __ASSEMBLER__ + +/* Define a macro which expands into the inline wrapper code for a system + call. */ +#undef INLINE_SYSCALL +#define INLINE_SYSCALL(name, nr, args...) \ + ({ INTERNAL_SYSCALL_DECL(err); \ + long result_var = INTERNAL_SYSCALL (name, err, nr, args); \ + if ( INTERNAL_SYSCALL_ERROR_P (result_var, err) ) \ + { \ + __set_errno (INTERNAL_SYSCALL_ERRNO (result_var, err)); \ + result_var = -1L; \ + } \ + result_var; }) + +#undef INTERNAL_SYSCALL_DECL +#define INTERNAL_SYSCALL_DECL(err) long err + +#undef INTERNAL_SYSCALL_ERROR_P +#define INTERNAL_SYSCALL_ERROR_P(val, err) ((long) (err)) + +#undef INTERNAL_SYSCALL_ERRNO +#define INTERNAL_SYSCALL_ERRNO(val, err) (val) + +#undef INTERNAL_SYSCALL +#define INTERNAL_SYSCALL(name, err, nr, args...) internal_syscall##nr(name, err, args) + +#define internal_syscall0(name, err, dummy...) \ +({ \ + long _sys_result; \ + \ + { \ + register long __v0 asm("$2"); \ + register long __a3 asm("$7"); \ + __asm__ volatile ( \ + ".set\tnoreorder\n\t" \ + "li\t$2, %2\t\t\t# " #name "\n\t" \ + "syscall\n\t" \ + ".set reorder" \ + : "=r" (__v0), "=r" (__a3) \ + : "i" (SYS_ify(name)) \ + : __SYSCALL_CLOBBERS); \ + err = __a3; \ + _sys_result = __v0; \ + } \ + _sys_result; \ +}) + +#define internal_syscall1(name, err, arg1) \ +({ \ + long _sys_result; \ + \ + { \ + register long __v0 asm("$2"); \ + register long __a0 asm("$4") = (long) arg1; \ + register long __a3 asm("$7"); \ + __asm__ volatile ( \ + ".set\tnoreorder\n\t" \ + "li\t$2, %3\t\t\t# " #name "\n\t" \ + "syscall\n\t" \ + ".set reorder" \ + : "=r" (__v0), "=r" (__a3) \ + : "r" (__a0), "i" (SYS_ify(name)) \ + : __SYSCALL_CLOBBERS); \ + err = __a3; \ + _sys_result = __v0; \ + } \ + _sys_result; \ +}) + +#define internal_syscall2(name, err, arg1, arg2) \ +({ \ + long _sys_result; \ + \ + { \ + register long __v0 asm("$2"); \ + register long __a0 asm("$4") = (long) arg1; \ + register long __a1 asm("$5") = (long) arg2; \ + register long __a3 asm("$7"); \ + __asm__ volatile ( \ + ".set\tnoreorder\n\t" \ + "li\t$2, %4\t\t\t# " #name "\n\t" \ + "syscall\n\t" \ + ".set\treorder" \ + : "=r" (__v0), "=r" (__a3) \ + : "r" (__a0), "r" (__a1), "i" (SYS_ify(name)) \ + : __SYSCALL_CLOBBERS); \ + err = __a3; \ + _sys_result = __v0; \ + } \ + _sys_result; \ +}) + +#define internal_syscall3(name, err, arg1, arg2, arg3) \ +({ \ + long _sys_result; \ + \ + { \ + register long __v0 asm("$2"); \ + register long __a0 asm("$4") = (long) arg1; \ + register long __a1 asm("$5") = (long) arg2; \ + register long __a2 asm("$6") = (long) arg3; \ + register long __a3 asm("$7"); \ + __asm__ volatile ( \ + ".set\tnoreorder\n\t" \ + "li\t$2, %5\t\t\t# " #name "\n\t" \ + "syscall\n\t" \ + ".set\treorder" \ + : "=r" (__v0), "=r" (__a3) \ + : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)) \ + : __SYSCALL_CLOBBERS); \ + err = __a3; \ + _sys_result = __v0; \ + } \ + _sys_result; \ +}) + +#define internal_syscall4(name, err, arg1, arg2, arg3, arg4) \ +({ \ + long _sys_result; \ + \ + { \ + register long __v0 asm("$2"); \ + register long __a0 asm("$4") = (long) arg1; \ + register long __a1 asm("$5") = (long) arg2; \ + register long __a2 asm("$6") = (long) arg3; \ + register long __a3 asm("$7") = (long) arg4; \ + __asm__ volatile ( \ + ".set\tnoreorder\n\t" \ + "li\t$2, %5\t\t\t# " #name "\n\t" \ + "syscall\n\t" \ + ".set\treorder" \ + : "=r" (__v0), "+r" (__a3) \ + : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)) \ + : __SYSCALL_CLOBBERS); \ + err = __a3; \ + _sys_result = __v0; \ + } \ + _sys_result; \ +}) + +#define internal_syscall5(name, err, arg1, arg2, arg3, arg4, arg5) \ +({ \ + long _sys_result; \ + \ + { \ + register long __v0 asm("$2"); \ + register long __a0 asm("$4") = (long) arg1; \ + register long __a1 asm("$5") = (long) arg2; \ + register long __a2 asm("$6") = (long) arg3; \ + register long __a3 asm("$7") = (long) arg4; \ + __asm__ volatile ( \ + ".set\tnoreorder\n\t" \ + "lw\t$2, %6\n\t" \ + "subu\t$29, 32\n\t" \ + "sw\t$2, 16($29)\n\t" \ + "li\t$2, %5\t\t\t# " #name "\n\t" \ + "syscall\n\t" \ + "addiu\t$29, 32\n\t" \ + ".set\treorder" \ + : "=r" (__v0), "+r" (__a3) \ + : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \ + "m" ((long)arg5) \ + : __SYSCALL_CLOBBERS); \ + err = __a3; \ + _sys_result = __v0; \ + } \ + _sys_result; \ +}) + +#define internal_syscall6(name, err, arg1, arg2, arg3, arg4, arg5, arg6)\ +({ \ + long _sys_result; \ + \ + { \ + register long __v0 asm("$2"); \ + register long __a0 asm("$4") = (long) arg1; \ + register long __a1 asm("$5") = (long) arg2; \ + register long __a2 asm("$6") = (long) arg3; \ + register long __a3 asm("$7") = (long) arg4; \ + __asm__ volatile ( \ + ".set\tnoreorder\n\t" \ + "lw\t$2, %6\n\t" \ + "lw\t$8, %7\n\t" \ + "subu\t$29, 32\n\t" \ + "sw\t$2, 16($29)\n\t" \ + "sw\t$8, 20($29)\n\t" \ + "li\t$2, %5\t\t\t# " #name "\n\t" \ + "syscall\n\t" \ + "addiu\t$29, 32\n\t" \ + ".set\treorder" \ + : "=r" (__v0), "+r" (__a3) \ + : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \ + "m" ((long)arg5), "m" ((long)arg6) \ + : __SYSCALL_CLOBBERS); \ + err = __a3; \ + _sys_result = __v0; \ + } \ + _sys_result; \ +}) + +#define internal_syscall7(name, err, arg1, arg2, arg3, arg4, arg5, arg6, arg7)\ +({ \ + long _sys_result; \ + \ + { \ + register long __v0 asm("$2"); \ + register long __a0 asm("$4") = (long) arg1; \ + register long __a1 asm("$5") = (long) arg2; \ + register long __a2 asm("$6") = (long) arg3; \ + register long __a3 asm("$7") = (long) arg4; \ + __asm__ volatile ( \ + ".set\tnoreorder\n\t" \ + "lw\t$2, %6\n\t" \ + "lw\t$8, %7\n\t" \ + "lw\t$9, %8\n\t" \ + "subu\t$29, 32\n\t" \ + "sw\t$2, 16($29)\n\t" \ + "sw\t$8, 20($29)\n\t" \ + "sw\t$9, 24($29)\n\t" \ + "li\t$2, %5\t\t\t# " #name "\n\t" \ + "syscall\n\t" \ + "addiu\t$29, 32\n\t" \ + ".set\treorder" \ + : "=r" (__v0), "+r" (__a3) \ + : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \ + "m" ((long)arg5), "m" ((long)arg6), "m" ((long)arg7) \ + : __SYSCALL_CLOBBERS); \ + err = __a3; \ + _sys_result = __v0; \ + } \ + _sys_result; \ +}) + +#define __SYSCALL_CLOBBERS "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", "$25" + +#endif /* __ASSEMBLER__ */ + #endif /* linux/mips/sysdep.h */ From 0aced2c56994f635df6346e8b9435f4be8355dd1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 15 Jan 2003 01:06:06 +0000 Subject: [PATCH 3027/4487] (__vfork): Conditionally branch to __fork even if __NR_vfork is not defined. --- sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S b/sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S index 6092bd9fd4..8d3338afd0 100644 --- a/sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S +++ b/sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S @@ -32,9 +32,9 @@ rocess, ENTRY (__vfork) -#ifdef __NR_vfork SINGLE_THREAD_P bne HIDDEN_JUMPTARGET (__fork) +#ifdef __NR_vfork swi __NR_vfork cmn a1, #4096 RETINSTR(movcc, pc, lr) From 6edfd8f2f65446fe7c2ed26de4fd9176ddf9690e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 17 Jan 2003 19:18:51 +0000 Subject: [PATCH 3028/4487] (elf_machine_type_class): Add TLS relocs for class PLT. --- sysdeps/alpha/dl-machine.h | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 5016f1353e..25359d883e 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -387,13 +387,24 @@ _dl_start_user: \n\ #define RTLD_START_SPECIAL_INIT /* nothing */ #endif -/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so - PLT entries should not be allowed to define the value. - ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one - of the main executable's symbols, as for a COPY reloc, which we don't - use. */ +/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry + or TLS variables, so undefined references should not be allowed + to define the value. + + ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve + to one of the main executable's symbols, as for a COPY reloc. + This is unused on Alpha. */ + +#if defined USE_TLS && (!defined RTLD_BOOTSTRAP || USE___THREAD) +#define elf_machine_type_class(type) \ + (((type) == R_ALPHA_JMP_SLOT \ + || (type) == R_ALPHA_DTPMOD64 \ + || (type) == R_ALPHA_DTPREL64 \ + || (type) == R_ALPHA_TPREL64) * ELF_RTYPE_CLASS_PLT) +#else #define elf_machine_type_class(type) \ (((type) == R_ALPHA_JMP_SLOT) * ELF_RTYPE_CLASS_PLT) +#endif /* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */ #define ELF_MACHINE_JMP_SLOT R_ALPHA_JMP_SLOT From 2c7ba672ef4c1c7d399fb9e8c5b4a7b9132065ac Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 17 Jan 2003 19:19:37 +0000 Subject: [PATCH 3029/4487] Helper code for TLS setup in static libc. --- sysdeps/alpha/libc-tls.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 sysdeps/alpha/libc-tls.c diff --git a/sysdeps/alpha/libc-tls.c b/sysdeps/alpha/libc-tls.c new file mode 100644 index 0000000000..434d5d9313 --- /dev/null +++ b/sysdeps/alpha/libc-tls.c @@ -0,0 +1,37 @@ +/* Thread-local storage handling in the ELF dynamic linker. Alpha version. + Copyright (C) 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. */ + +#include +#include + +#if USE_TLS + +/* On Alpha, linker optimizations are not required, so __tls_get_addr + can be called even in statically linked binaries. In this case module + must be always 1 and PT_TLS segment exist in the binary, otherwise it + would not link. */ + +void * +__tls_get_addr (tls_index *ti) +{ + dtv_t *dtv = THREAD_DTV (); + return (char *) dtv[1].pointer + ti->ti_offset; +} + +#endif From af215add0a930efd488d0b73c20dfd9ebd1f4c80 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 17 Jan 2003 19:19:55 +0000 Subject: [PATCH 3030/4487] (EPILOGUE, GPSAVEREG): New. (LOADGP) [!PIC]: Rewrite to preserve caller's gp. --- sysdeps/unix/alpha/sysdep.S | 42 +++++++++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 6 deletions(-) diff --git a/sysdeps/unix/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S index c31508bc30..ce848f4e9b 100644 --- a/sysdeps/unix/alpha/sysdep.S +++ b/sysdeps/unix/alpha/sysdep.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1996, 1998, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1996, 1998, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -35,9 +35,26 @@ have we loaded PV with our address. Do both. */ # define LOADGP br pv, 1f; 1: ldgp gp, 0(pv) # define PROLOGUE .prologue 0 +# define EPILOGUE #else -# define LOADGP ldgp gp, 0(pv) + /* When building the static library, we tail call here from + elsewhere, which might use a different GP. The entertaining + part is that we have to return with the GP of our caller + in place, so that linker relaxation works properly. */ + /* ??? This is so ugly. Consider always putting the errno + setting code with the syscall in the static case. */ +# define GPSAVEREG t10 +# define LOADGP ldah t11, 0(pv) !gpdisp!1; \ + br 1f; \ + .subsection 2; \ + 1: mov gp, GPSAVEREG; \ + lda gp, 0(t11) !gpdisp!1; \ + br 2f; \ + .previous; \ + mov gp, GPSAVEREG; \ + 2: # define PROLOGUE .prologue 1 +# define EPILOGUE mov GPSAVEREG, gp #endif .align 4 @@ -61,16 +78,20 @@ __syscall_error: addq v0, t1, v0 stl t0, 0(v0) lda v0, -1 + EPILOGUE ret #elif defined(_LIBC_REENTRANT) LOADGP - lda sp, -16(sp) - .frame sp, 16, ra, 0 + lda sp, -32(sp) + .frame sp, 32, ra, 0 stq ra, 0(sp) stq v0, 8(sp) - .mask 0x4000001, -16 +#ifdef GPSAVEREG + stq GPSAVEREG, 16(sp) +#endif + .mask 0x4000001, -32 PROLOGUE /* Find our per-thread errno address */ @@ -78,6 +99,9 @@ __syscall_error: bsr ra, __errno_location !samegp #else jsr ra, __errno_location +#ifndef GPSAVEREG + ldgp gp, 0(ra) +#endif #endif /* Store the error value. */ @@ -87,8 +111,12 @@ __syscall_error: /* And kick back a -1. */ ldi v0, -1 +#ifdef GPSAVEREG + ldq GPSAVEREG, 16(sp) +#endif ldq ra, 0(sp) - lda sp, 16(sp) + lda sp, 32(sp) + EPILOGUE ret #else @@ -97,8 +125,10 @@ __syscall_error: PROLOGUE stl v0, errno lda v0, -1 + EPILOGUE ret #endif + .subsection 3 .end __syscall_error From 3de1f4af04df8cb81be7315331a20ea8b3190420 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 22 Jan 2003 02:07:54 +0000 Subject: [PATCH 3031/4487] 2003-01-21 Jakub Jelinek * sysdeps/unix/alpha/sysdep.h (inline_syscall0, inline_syscall1, inline_syscall2, inline_syscall3, inline_syscall4, inline_syscall5, inline_syscall6): Add __volatile__. * sysdeps/unix/sysv/linux/alpha/sysdep.h (INTERNAL_SYSCALL): Add __attribute__((unused)) to ChEcK. --- sysdeps/unix/alpha/sysdep.h | 100 +++++++++++++------------ sysdeps/unix/sysv/linux/alpha/sysdep.h | 3 +- 2 files changed, 55 insertions(+), 48 deletions(-) diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h index 01e7de0d06..cb04cec2af 100644 --- a/sysdeps/unix/alpha/sysdep.h +++ b/sysdeps/unix/alpha/sysdep.h @@ -193,12 +193,13 @@ __LABEL(name) \ register long _sc_19 __asm__("$19"); \ \ _sc_0 = __NR_##name; \ - __asm__("callsys # %0 %1 <= %2" \ - : inline_syscall_r0_out_constraint (_sc_0), \ - "=r"(_sc_19) \ - : "0"(_sc_0) \ - : inline_syscall_clobbers, \ - "$16", "$17", "$18", "$20", "$21"); \ + __asm__ __volatile__ \ + ("callsys # %0 %1 <= %2" \ + : inline_syscall_r0_out_constraint (_sc_0), \ + "=r"(_sc_19) \ + : "0"(_sc_0) \ + : inline_syscall_clobbers, \ + "$16", "$17", "$18", "$20", "$21"); \ _sc_ret = _sc_0, _sc_err = _sc_19; \ } @@ -210,12 +211,13 @@ __LABEL(name) \ \ _sc_0 = __NR_##name; \ _sc_16 = (long) (arg1); \ - __asm__("callsys # %0 %1 <= %2 %3" \ - : inline_syscall_r0_out_constraint (_sc_0), \ - "=r"(_sc_19), "=r"(_sc_16) \ - : "0"(_sc_0), "2"(_sc_16) \ - : inline_syscall_clobbers, \ - "$17", "$18", "$20", "$21"); \ + __asm__ __volatile__ \ + ("callsys # %0 %1 <= %2 %3" \ + : inline_syscall_r0_out_constraint (_sc_0), \ + "=r"(_sc_19), "=r"(_sc_16) \ + : "0"(_sc_0), "2"(_sc_16) \ + : inline_syscall_clobbers, \ + "$17", "$18", "$20", "$21"); \ _sc_ret = _sc_0, _sc_err = _sc_19; \ } @@ -229,12 +231,13 @@ __LABEL(name) \ _sc_0 = __NR_##name; \ _sc_16 = (long) (arg1); \ _sc_17 = (long) (arg2); \ - __asm__("callsys # %0 %1 <= %2 %3 %4" \ - : inline_syscall_r0_out_constraint (_sc_0), \ - "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17) \ - : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17) \ - : inline_syscall_clobbers, \ - "$18", "$20", "$21"); \ + __asm__ __volatile__ \ + ("callsys # %0 %1 <= %2 %3 %4" \ + : inline_syscall_r0_out_constraint (_sc_0), \ + "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17) \ + : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17) \ + : inline_syscall_clobbers, \ + "$18", "$20", "$21"); \ _sc_ret = _sc_0, _sc_err = _sc_19; \ } @@ -250,13 +253,14 @@ __LABEL(name) \ _sc_16 = (long) (arg1); \ _sc_17 = (long) (arg2); \ _sc_18 = (long) (arg3); \ - __asm__("callsys # %0 %1 <= %2 %3 %4 %5" \ - : inline_syscall_r0_out_constraint (_sc_0), \ - "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \ - "=r"(_sc_18) \ - : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \ - "4"(_sc_18) \ - : inline_syscall_clobbers, "$20", "$21"); \ + __asm__ __volatile__ \ + ("callsys # %0 %1 <= %2 %3 %4 %5" \ + : inline_syscall_r0_out_constraint (_sc_0), \ + "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \ + "=r"(_sc_18) \ + : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \ + "4"(_sc_18) \ + : inline_syscall_clobbers, "$20", "$21"); \ _sc_ret = _sc_0, _sc_err = _sc_19; \ } @@ -273,13 +277,14 @@ __LABEL(name) \ _sc_17 = (long) (arg2); \ _sc_18 = (long) (arg3); \ _sc_19 = (long) (arg4); \ - __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6" \ - : inline_syscall_r0_out_constraint (_sc_0), \ - "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \ - "=r"(_sc_18) \ - : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \ - "4"(_sc_18), "1"(_sc_19) \ - : inline_syscall_clobbers, "$20", "$21"); \ + __asm__ __volatile__ \ + ("callsys # %0 %1 <= %2 %3 %4 %5 %6" \ + : inline_syscall_r0_out_constraint (_sc_0), \ + "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \ + "=r"(_sc_18) \ + : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \ + "4"(_sc_18), "1"(_sc_19) \ + : inline_syscall_clobbers, "$20", "$21"); \ _sc_ret = _sc_0, _sc_err = _sc_19; \ } @@ -298,13 +303,14 @@ __LABEL(name) \ _sc_18 = (long) (arg3); \ _sc_19 = (long) (arg4); \ _sc_20 = (long) (arg5); \ - __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7" \ - : inline_syscall_r0_out_constraint (_sc_0), \ - "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \ - "=r"(_sc_18), "=r"(_sc_20) \ - : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \ - "4"(_sc_18), "1"(_sc_19), "5"(_sc_20) \ - : inline_syscall_clobbers, "$21"); \ + __asm__ __volatile__ \ + ("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7" \ + : inline_syscall_r0_out_constraint (_sc_0), \ + "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \ + "=r"(_sc_18), "=r"(_sc_20) \ + : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \ + "4"(_sc_18), "1"(_sc_19), "5"(_sc_20) \ + : inline_syscall_clobbers, "$21"); \ _sc_ret = _sc_0, _sc_err = _sc_19; \ } @@ -325,14 +331,14 @@ __LABEL(name) \ _sc_19 = (long) (arg4); \ _sc_20 = (long) (arg5); \ _sc_21 = (long) (arg6); \ - __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7 %8" \ - : inline_syscall_r0_out_constraint (_sc_0), \ - "=r"(_sc_19) "=r"(_sc_16), "=r"(_sc_17), \ - "=r"(_sc_18), "=r"(_sc_20), "=r"(_sc_21) \ - : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \ - "4"(_sc_18), "1"(_sc_19), "5"(_sc_20), \ - "6"(_sc_21) \ - : inline_syscall_clobbers); \ + __asm__ __volatile__ \ + ("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7 %8" \ + : inline_syscall_r0_out_constraint (_sc_0), \ + "=r"(_sc_19) "=r"(_sc_16), "=r"(_sc_17), \ + "=r"(_sc_18), "=r"(_sc_20), "=r"(_sc_21) \ + : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), "4"(_sc_18), \ + "1"(_sc_19), "5"(_sc_20), "6"(_sc_21) \ + : inline_syscall_clobbers); \ _sc_ret = _sc_0, _sc_err = _sc_19; \ } diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h index 6a079060c7..62e308bf5d 100644 --- a/sysdeps/unix/sysv/linux/alpha/sysdep.h +++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h @@ -75,7 +75,8 @@ #undef INTERNAL_SYSCALL #define INTERNAL_SYSCALL(name, err_out, nr, args...) \ ({ \ - extern char ChEcK[__NR_##name == __NR_rt_sigaction ? -1 : 1]; \ + extern char ChEcK[__NR_##name == __NR_rt_sigaction ? -1 : 1] \ + __attribute__((unused)); \ INTERNAL_SYSCALL1(name, err_out, nr, args); \ }) From fab80146edc41050df9ef957729ad233c375b2e7 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 25 Jan 2003 23:07:04 +0000 Subject: [PATCH 3032/4487] (_dl_start_user): Use pc-relative addressing to save GOT entries. --- sysdeps/m68k/dl-machine.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index 61027c9bc9..0fd6495f10 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -157,13 +157,12 @@ _start:\n\ _dl_start_user:\n\ | Save the user entry point address in %a4.\n\ move.l %d0, %a4\n\ - | Point %a5 at the GOT.\n\ - lea _GLOBAL_OFFSET_TABLE_@GOTPC(%pc), %a5\n\ | Remember the highest stack address.\n\ - move.l %sp, ([__libc_stack_end@GOT.w, %a5])\n\ + lea __libc_stack_end(%pc), %a0\n\ + move.l %sp, (%a0)\n\ | See if we were run as a command with the executable file\n\ | name as an extra leading argument.\n\ - move.l ([_dl_skip_args@GOT.w, %a5]), %d0\n\ + move.l _dl_skip_args(%pc), %d0\n\ | Pop the original argument count\n\ move.l (%sp)+, %d1\n\ | Subtract _dl_skip_args from it.\n\ @@ -176,12 +175,12 @@ _dl_start_user:\n\ pea 8(%sp, %d1*4)\n\ pea 8(%sp)\n\ move.l %d1, -(%sp)\n\ - move.l ([_rtld_local@GOT.w, %a5]), -(%sp)\n\ + move.l _rtld_local(%pc), -(%sp)\n\ jbsr _dl_init_internal@PLTPC\n\ addq.l #8, %sp\n\ addq.l #8, %sp\n\ | Pass our finalizer function to the user in %a1.\n\ - move.l _dl_fini@GOT.w(%a5), %a1\n\ + lea _dl_fini(%pc), %a1\n\ | Initialize %fp with the stack pointer.\n\ move.l %sp, %fp\n\ | Jump to the user's entry point.\n\ From 8c5a1c7889c0759c494abf6655b640076d5d870a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 27 Jan 2003 19:00:40 +0000 Subject: [PATCH 3033/4487] Add support for cancellation handling and handle both __NR_pread64 and __NR_pread. --- sysdeps/unix/sysv/linux/mips/pread.c | 28 ++++++++++++++++++++++++- sysdeps/unix/sysv/linux/mips/pread64.c | 29 +++++++++++++++++++++++++- 2 files changed, 55 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/pread.c b/sysdeps/unix/sysv/linux/mips/pread.c index 45305d2ccc..e6cb21ff93 100644 --- a/sysdeps/unix/sysv/linux/mips/pread.c +++ b/sysdeps/unix/sysv/linux/mips/pread.c @@ -22,12 +22,19 @@ #include #include -#include +#include #include #include #include +#ifdef __NR_pread64 /* Newer kernels renamed but it's the same. */ +# ifdef __NR_pread +# error "__NR_pread and __NR_pread64 both defined???" +# endif +# define __NR_pread __NR_pread64 +#endif + #if defined __NR_pread || __ASSUME_PREAD_SYSCALL > 0 # if __ASSUME_PREAD_SYSCALL == 0 @@ -48,6 +55,22 @@ __libc_pread (fd, buf, count, offset) { ssize_t result; + if (SINGLE_THREAD_P) + { + /* First try the syscall. */ + assert (sizeof (offset) == 4); + result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, + __LONG_LONG_PAIR (offset >> 31, offset)); +# if __ASSUME_PREAD_SYSCALL == 0 + if (result == -1 && errno == ENOSYS) + /* No system call available. Use the emulation. */ + result = __emulate_pread (fd, buf, count, offset); +# endif + return result; + } + + int oldtype = LIBC_CANCEL_ASYNC (); + /* First try the syscall. */ assert (sizeof (offset) == 4); result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, @@ -57,6 +80,9 @@ __libc_pread (fd, buf, count, offset) /* No system call available. Use the emulation. */ result = __emulate_pread (fd, buf, count, offset); # endif + + LIBC_CANCEL_RESET (oldtype); + return result; } diff --git a/sysdeps/unix/sysv/linux/mips/pread64.c b/sysdeps/unix/sysv/linux/mips/pread64.c index d36d68967b..36ec100fb3 100644 --- a/sysdeps/unix/sysv/linux/mips/pread64.c +++ b/sysdeps/unix/sysv/linux/mips/pread64.c @@ -21,12 +21,19 @@ #include #include -#include +#include #include #include #include +#ifdef __NR_pread64 /* Newer kernels renamed but it's the same. */ +# ifdef __NR_pread +# error "__NR_pread and __NR_pread64 both defined???" +# endif +# define __NR_pread __NR_pread64 +#endif + #if defined __NR_pread || __ASSUME_PREAD_SYSCALL > 0 # if __ASSUME_PREAD_SYSCALL == 0 @@ -48,6 +55,23 @@ __libc_pread64 (fd, buf, count, offset) { ssize_t result; + + if (SINGLE_THREAD_P) + { + /* First try the syscall. */ + result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, + __LONG_LONG_PAIR ((off_t) (offset >> 32), + (off_t) (offset & 0xffffffff))); +# if __ASSUME_PREAD_SYSCALL == 0 + if (result == -1 && errno == ENOSYS) + /* No system call available. Use the emulation. */ + result = __emulate_pread64 (fd, buf, count, offset); +# endif + return result; + } + + int oldtype = LIBC_CANCEL_ASYNC (); + /* First try the syscall. */ result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, __LONG_LONG_PAIR ((off_t) (offset >> 32), @@ -57,6 +81,9 @@ __libc_pread64 (fd, buf, count, offset) /* No system call available. Use the emulation. */ result = __emulate_pread64 (fd, buf, count, offset); # endif + + LIBC_CANCEL_RESET (oldtype); + return result; } From ca0eea4226dca8f4b6a6ac19b1ae63b454651846 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 27 Jan 2003 19:01:03 +0000 Subject: [PATCH 3034/4487] Add support for cancellation handling and handle both __NR_pwrite64 and __NR_pwrite. --- sysdeps/unix/sysv/linux/mips/pwrite.c | 30 +++++++++++++++++++++++-- sysdeps/unix/sysv/linux/mips/pwrite64.c | 28 ++++++++++++++++++++++- 2 files changed, 55 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/pwrite.c b/sysdeps/unix/sysv/linux/mips/pwrite.c index 44f9d30ebf..f25e327877 100644 --- a/sysdeps/unix/sysv/linux/mips/pwrite.c +++ b/sysdeps/unix/sysv/linux/mips/pwrite.c @@ -22,12 +22,19 @@ #include #include -#include +#include #include #include #include +#ifdef __NR_pwrite64 /* Newer kernels renamed but it's the same. */ +# ifdef __NR_pwrite +# error "__NR_pwrite and __NR_pwrite64 both defined???" +# endif +# define __NR_pwrite __NR_pwrite64 +#endif + #if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0 extern ssize_t __syscall_pwrite (int fd, const void *__unbounded buf, size_t count, @@ -47,16 +54,35 @@ __libc_pwrite (fd, buf, count, offset) { ssize_t result; + if (SINGLE_THREAD_P) + { + /* First try the syscall. */ + assert (sizeof (offset) == 4); + result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0, + __LONG_LONG_PAIR (offset >> 31, offset)); +# if __ASSUME_PWRITE_SYSCALL == 0 + if (result == -1 && errno == ENOSYS) + /* No system call available. Use the emulation. */ + result = __emulate_pwrite (fd, buf, count, offset); +# endif + + return result; + } + + int oldtype = LIBC_CANCEL_ASYNC (); + /* First try the syscall. */ assert (sizeof (offset) == 4); result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0, - __LONG_LONG_PAIR (offset >> 31, offset)); + __LONG_LONG_PAIR (offset >> 31, offset)); # if __ASSUME_PWRITE_SYSCALL == 0 if (result == -1 && errno == ENOSYS) /* No system call available. Use the emulation. */ result = __emulate_pwrite (fd, buf, count, offset); # endif + LIBC_CANCEL_RESET (oldtype); + return result; } diff --git a/sysdeps/unix/sysv/linux/mips/pwrite64.c b/sysdeps/unix/sysv/linux/mips/pwrite64.c index 4f7299ed47..0accc1d37b 100644 --- a/sysdeps/unix/sysv/linux/mips/pwrite64.c +++ b/sysdeps/unix/sysv/linux/mips/pwrite64.c @@ -21,12 +21,19 @@ #include #include -#include +#include #include #include #include +#ifdef __NR_pwrite64 /* Newer kernels renamed but it's the same. */ +# ifdef __NR_pwrite +# error "__NR_pwrite and __NR_pwrite64 both defined???" +# endif +# define __NR_pwrite __NR_pwrite64 +#endif + #if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0 extern ssize_t __syscall_pwrite (int fd, const void *__unbounded buf, size_t count, @@ -46,6 +53,23 @@ __libc_pwrite64 (fd, buf, count, offset) { ssize_t result; + if (SINGLE_THREAD_P) + { + /* First try the syscall. */ + result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0, + __LONG_LONG_PAIR ((off_t) (offset >> 32), + (off_t) (offset & 0xffffffff))); +# if __ASSUME_PWRITE_SYSCALL == 0 + if (result == -1 && errno == ENOSYS) + /* No system call available. Use the emulation. */ + result = __emulate_pwrite64 (fd, buf, count, offset); +# endif + + return result; + } + + int oldtype = LIBC_CANCEL_ASYNC (); + /* First try the syscall. */ result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0, __LONG_LONG_PAIR ((off_t) (offset >> 32), @@ -56,6 +80,8 @@ __libc_pwrite64 (fd, buf, count, offset) result = __emulate_pwrite64 (fd, buf, count, offset); # endif + LIBC_CANCEL_RESET (oldtype); + return result; } From 4f211d17483a13ff9c3f658c8821f0190765b258 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 27 Jan 2003 19:01:25 +0000 Subject: [PATCH 3035/4487] Don't set errno in the _LIBC_REENTRANT case, use register names consistently. --- sysdeps/unix/mips/sysdep.S | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/sysdeps/unix/mips/sysdep.S b/sysdeps/unix/mips/sysdep.S index fa1bfa1722..c710b0c274 100644 --- a/sysdeps/unix/mips/sysdep.S +++ b/sysdeps/unix/mips/sysdep.S @@ -27,11 +27,11 @@ ENTRY(__syscall_error) #ifdef __PIC__ .set noreorder .set noat - move $1, $31 - bltzal $0, 0f + move AT, ra + bltzal zero, 0f nop -0: .cpload $31 - move $31, $1 +0: .cpload ra + move ra, AT .set at .set reorder #endif @@ -51,9 +51,6 @@ ENTRY(__syscall_error) li v0, EAGAIN skip: #endif - /* Store it in the "real" variable ... */ - sw v0, errno - /* Find our per-thread errno address */ jal __errno_location @@ -75,11 +72,11 @@ ENTRY(__syscall_error) #ifdef __PIC__ .set noreorder .set noat - move $1, $31 - bltzal $0, 0f + move AT, ra + bltzal zero, 0f nop -0: .cpload $31 - move $31, $1 +0: .cpload ra + move ra, AT .set at .set reorder #endif From c25d936b99e07f3b6733c483be9936ccbf624c79 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 27 Jan 2003 20:15:03 +0000 Subject: [PATCH 3036/4487] (SYSCALL_ERROR_LABEL): Define. --- sysdeps/unix/sysv/linux/mips/sysdep.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/sysdep.h b/sysdeps/unix/sysv/linux/mips/sysdep.h index 1fd64e5bd5..710479ae18 100644 --- a/sysdeps/unix/sysv/linux/mips/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/sysdep.h @@ -33,7 +33,15 @@ # define SYS_ify(syscall_name) __NR_/**/syscall_name #endif -#ifndef __ASSEMBLER__ +#ifdef __ASSEMBLER__ + +/* We don't want the label for the error handler to be visible in the symbol + table when we define it here. */ +#ifdef __PIC__ +# define SYSCALL_ERROR_LABEL 99b +#endif + +#else /* ! __ASSEMBLER__ */ /* Define a macro which expands into the inline wrapper code for a system call. */ From 7495bfa6003a70ea4fc9e12747a3da81ba42eee8 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Thu, 30 Jan 2003 23:52:52 +0000 Subject: [PATCH 3037/4487] (sysdep-CFLAGS): Don't define, not needed any more. --- sysdeps/m68k/Makefile | 3 --- 1 file changed, 3 deletions(-) diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile index 778a222a67..68dc258406 100644 --- a/sysdeps/m68k/Makefile +++ b/sysdeps/m68k/Makefile @@ -37,6 +37,3 @@ long-double-fcts = yes ifeq ($(subdir),elf) CFLAGS-rtld.c += -Wno-uninitialized -Wno-unused endif - -# Use a more reasonable inline limit -sysdep-CFLAGS += --param max-inline-insns-single=4000 From 94b1e5e52f683fa3d99aee23fcb3f9383c5f9d92 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 31 Jan 2003 03:40:10 +0000 Subject: [PATCH 3038/4487] Remove __GI_* aliases, already added by make-syscalls.sh. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 2 +- sysdeps/unix/sysv/linux/hppa/syscalls.list | 2 +- sysdeps/unix/sysv/linux/mips/syscalls.list | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index a053468b34..6907ef1d2f 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -36,7 +36,7 @@ sys_ustat ustat ustat 2 __syscall_ustat sys_mknod xmknod mknod 3 __syscall_mknod # proper socket implementations: -accept - accept C:3 __libc_accept __accept accept __GI_accept +accept - accept C:3 __libc_accept __accept accept bind - bind 3 __bind bind connect - connect C:3 __libc_connect __connect_internal __connect connect getpeername - getpeername 3 __getpeername getpeername diff --git a/sysdeps/unix/sysv/linux/hppa/syscalls.list b/sysdeps/unix/sysv/linux/hppa/syscalls.list index 65fc3cba64..bc977e2e30 100644 --- a/sysdeps/unix/sysv/linux/hppa/syscalls.list +++ b/sysdeps/unix/sysv/linux/hppa/syscalls.list @@ -14,7 +14,7 @@ semget - semget i:iii __semget semget semctl - semctl i:iiii __semctl semctl # proper socket implementations: -accept - accept Ci:iBN __libc_accept __accept accept __GI_accept +accept - accept Ci:iBN __libc_accept __accept accept bind - bind i:ipi __bind bind connect - connect Ci:ipi __libc_connect __connect_internal __connect connect getpeername - getpeername i:ipp __getpeername getpeername diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index 35666c7a86..ec75228ce1 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -14,7 +14,7 @@ s_sigsuspend sigsuspend sigsuspend i:p __syscall_sigsuspend # Socket functions; Linux/MIPS doesn't use the socketcall(2) wrapper; # it's provided for compatibility, though. # -accept - accept Ci:iBN __libc_accept __accept accept __GI_accept +accept - accept Ci:iBN __libc_accept __accept accept bind - bind i:ipi __bind bind connect - connect Ci:ipi __libc_connect __connect_internal __connect connect getpeername - getpeername i:ipp __getpeername getpeername From 28445fd3b2e24425247d5195115ac8ea707464a3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 5 Feb 2003 23:29:25 +0000 Subject: [PATCH 3039/4487] Add posix_fadvise64 syscall. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 6907ef1d2f..96bc8a5fd3 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -20,6 +20,7 @@ getpeername - getpeername 3 __getpeername getpeername getpriority - getpriority 2 __getpriority getpriority mmap - mmap 6 __mmap mmap __mmap64 mmap64 llseek EXTRA lseek C:3 __libc_lseek64 __llseek llseek __lseek64 lseek64 +posix_fadvise64 - fadvise64 4 posix_fadvise64 posix_fadvise pread - pread C:4 __libc_pread __libc_pread64 __pread pread __pread64 pread64 pwrite - pwrite C:4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64 fstatfs - fstatfs 2 __fstatfs fstatfs __fstatfs64 fstatfs64 From c157224cb867c98f4f171e0da588c23fe588512d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 12 Feb 2003 09:42:48 +0000 Subject: [PATCH 3040/4487] (ELF_MACHINE_RUNTIME_TRAMPOLINE): Fix masking of version index. --- sysdeps/mips/dl-machine.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 08e5a6e562..c4864c21d2 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. MIPS version. - Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1996-2001, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Kazumoto Kojima . @@ -293,7 +293,7 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \ { \ const ElfW(Half) *vernum = \ (const void *) D_PTR (l, l_info[VERSYMIDX (DT_VERSYM)]); \ - ElfW(Half) ndx = vernum[sym_index & 0x7fff]; \ + ElfW(Half) ndx = vernum[sym_index] & 0x7fff; \ const struct r_found_version *version = &l->l_versions[ndx]; \ \ if (version->hash != 0) \ From 6e5bb2d5345f0f69db87c04522360d687ed71991 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 14 Feb 2003 06:02:01 +0000 Subject: [PATCH 3041/4487] (elf_machine_rela): Add instead of subtracting map->l_tls_offset. --- sysdeps/alpha/dl-machine.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 25359d883e..4704428d93 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -627,12 +627,12 @@ elf_machine_rela (struct link_map *map, else if (r_type == R_ALPHA_TPREL64) { #ifdef RTLD_BOOTSTRAP - *reloc_addr = sym_raw_value - map->l_tls_offset; + *reloc_addr = sym_raw_value + map->l_tls_offset; #else if (sym_map) { CHECK_STATIC_TLS (map, sym_map); - *reloc_addr = sym_raw_value - sym_map->l_tls_offset; + *reloc_addr = sym_raw_value + sym_map->l_tls_offset; } #endif } From e96c2b656bdc50391657e24792f4bdf63784ded2 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Thu, 20 Feb 2003 13:23:24 +0000 Subject: [PATCH 3042/4487] Add MADV_* and POSIX_MADV_* constants. --- sysdeps/unix/sysv/linux/m68k/bits/mman.h | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/m68k/bits/mman.h b/sysdeps/unix/sysv/linux/m68k/bits/mman.h index 34f14ee5bf..5c49fc8987 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/mman.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/m68k version. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 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 @@ -73,3 +73,21 @@ #ifdef __USE_GNU # define MREMAP_MAYMOVE 1 #endif + +/* Advice to `madvise'. */ +#ifdef __USE_BSD +# define MADV_NORMAL 0 /* No further special treatment. */ +# define MADV_RANDOM 1 /* Expect random page references. */ +# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define MADV_WILLNEED 3 /* Will need these pages. */ +# define MADV_DONTNEED 4 /* Don't need these pages. */ +#endif + +/* The POSIX people had to invent similar names for the same things. */ +#ifdef __USE_XOPEN2K +# define POSIX_MADV_NORMAL 0 /* No further special treatment. */ +# define POSIX_MADV_RANDOM 1 /* Expect random page references. */ +# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */ +# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */ +#endif From 114e7d500560ce6e2d921e3f5334fcd9ac73916e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 20 Feb 2003 20:22:20 +0000 Subject: [PATCH 3043/4487] (INLINE_SYSCALL): Add missing arguments to INTERNAL_SYSCALL_ERROR_P and INTERNAL_SYSCALL_ERRNO. --- sysdeps/unix/sysv/linux/arm/sysdep.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index 33ce12342a..785d3cf0d8 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -138,10 +138,10 @@ __local_syscall_error: \ call. */ #undef INLINE_SYSCALL #define INLINE_SYSCALL(name, nr, args...) \ - ({ unsigned int _sys_result = INTERNAL_SYSCALL (name, nr, args); \ - if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (_sys_result), 0)) \ + ({ unsigned int _sys_result = INTERNAL_SYSCALL (name, , nr, args); \ + if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (_sys_result, ), 0)) \ { \ - __set_errno (INTERNAL_SYSCALL_ERRNO (_sys_result)); \ + __set_errno (INTERNAL_SYSCALL_ERRNO (_sys_result, )); \ _sys_result = (unsigned int) -1; \ } \ (int) _sys_result; }) From 2299417ee1ea7a5471e6f6990b6f67495bea43e5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 20 Feb 2003 22:19:28 +0000 Subject: [PATCH 3044/4487] Extra files to distribute for powerpc/nofpu. --- sysdeps/powerpc/nofpu/Dist | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sysdeps/powerpc/nofpu/Dist diff --git a/sysdeps/powerpc/nofpu/Dist b/sysdeps/powerpc/nofpu/Dist new file mode 100644 index 0000000000..cd155fdf5a --- /dev/null +++ b/sysdeps/powerpc/nofpu/Dist @@ -0,0 +1,2 @@ +sim-full.c +fenv_const.c From 2b6aa9b399cf5a73137ee13708a301f58cf07ac8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 20 Feb 2003 22:22:35 +0000 Subject: [PATCH 3045/4487] (init_iosys): Yield ENODEV on unknown systems. --- sysdeps/unix/sysv/linux/arm/ioperm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/ioperm.c b/sysdeps/unix/sysv/linux/arm/ioperm.c index 40ac8e6038..558b485b61 100644 --- a/sysdeps/unix/sysv/linux/arm/ioperm.c +++ b/sysdeps/unix/sysv/linux/arm/ioperm.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Phil Blundell, based on the Alpha version by David Mosberger. @@ -166,7 +166,7 @@ init_iosys (void) } /* systype is not a known platform name... */ - __set_errno (EINVAL); + __set_errno (ENODEV); return -1; } @@ -194,8 +194,8 @@ _ioperm (unsigned long int from, unsigned long int num, int turn_on) return -1; io.base = - (unsigned long int) __mmap (0, MAX_PORT << io.shift, - PROT_READ | PROT_WRITE, + (unsigned long int) __mmap (0, MAX_PORT << io.shift, + PROT_READ | PROT_WRITE, MAP_SHARED, fd, io.io_base); close (fd); if ((long) io.base == -1) From cc6a3664ffb416eac5dcee1f5e603b4b91674798 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 21 Feb 2003 06:59:04 +0000 Subject: [PATCH 3046/4487] Add soft-supp.h. --- sysdeps/powerpc/nofpu/Dist | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/powerpc/nofpu/Dist b/sysdeps/powerpc/nofpu/Dist index cd155fdf5a..35a33ab2d5 100644 --- a/sysdeps/powerpc/nofpu/Dist +++ b/sysdeps/powerpc/nofpu/Dist @@ -1,2 +1,3 @@ sim-full.c fenv_const.c +soft-supp.h From b6562e81497a3a5a43df90ec84842b08c5bf24d5 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 25 Feb 2003 23:45:16 +0000 Subject: [PATCH 3047/4487] linuxthreads/ChangeLog --- sysdeps/mach/alpha/machine-lock.h | 10 ++++-- sysdeps/mach/hurd/alpha/tls.h | 53 +++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 3 deletions(-) create mode 100644 sysdeps/mach/hurd/alpha/tls.h diff --git a/sysdeps/mach/alpha/machine-lock.h b/sysdeps/mach/alpha/machine-lock.h index 80f8750c87..363c29e56f 100644 --- a/sysdeps/mach/alpha/machine-lock.h +++ b/sysdeps/mach/alpha/machine-lock.h @@ -1,5 +1,5 @@ /* Machine-specific definition for spin locks. Alpha version. - Copyright (C) 1994, 1997 Free Software Foundation, Inc. + Copyright (C) 1994,97,2002 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 @@ -38,8 +38,8 @@ typedef __volatile long int __spin_lock_t; _EXTERN_INLINE void __spin_unlock (__spin_lock_t *__lock) { - __asm__ __volatile__ ("mb; stq $31, %0; mb" - : "=m" (__lock)); + __asm__ __volatile__ ("mb"); + *__lock = 0; } /* Try to lock LOCK; return nonzero if we locked it, zero if another has. */ @@ -47,6 +47,9 @@ __spin_unlock (__spin_lock_t *__lock) _EXTERN_INLINE int __spin_try_lock (register __spin_lock_t *__lock) { +#if 1 + return 1; +#else register long int __rtn, __tmp; do @@ -66,6 +69,7 @@ __spin_try_lock (register __spin_lock_t *__lock) } while (! __rtn); /* RTN is now nonzero; we have the lock. */ return __rtn; +#endif } /* Return nonzero if LOCK is locked. */ diff --git a/sysdeps/mach/hurd/alpha/tls.h b/sysdeps/mach/hurd/alpha/tls.h new file mode 100644 index 0000000000..e820a013bf --- /dev/null +++ b/sysdeps/mach/hurd/alpha/tls.h @@ -0,0 +1,53 @@ +/* Definition for thread-local data handling. Hurd/Alpha version. + Copyright (C) 2002 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 _TLS_H +#define _TLS_H + +#if defined HAVE_TLS_SUPPORT && 0 + +/* Signal that TLS support is available. */ +# define USE_TLS 1 + +/* Code to initially initialize the thread pointer. This might need + special attention since 'errno' is not yet available and if the + operation can cause a failure 'errno' must not be touched. */ +# define TLS_INIT_TP(descr) \ + do \ + { \ + register tcbhead_t *_a0 __asm__ ("$16") = (descr); \ + __asm__ ("call_pal %0" : : "i" (PAL_wruniq), "r" (_a0)); \ + } while (0) + +# define THREAD_TCB() \ + ({ \ + register tcbhead_t *_rv __asm__ ("$0"); \ + __asm__ ("call_pal %0" : "=r" (rv) : "i" (PAL_rduniq)); \ + _rv; \ + }) + +/* Install new dtv for current thread. */ +# define INSTALL_NEW_DTV(dtv) (THREAD_DTV () = (dtv)) + +/* Return the address of the dtv for the current thread. */ +# define THREAD_DTV() (THREAD_TCB ()->dtv) + +#endif /* HAVE_TLS_SUPPORT */ + +#endif /* tls.h */ From 6fa6c0ca31a613a224398c77ba461377213c68db Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 26 Feb 2003 00:01:15 +0000 Subject: [PATCH 3048/4487] Revert unintentional commits. --- sysdeps/mach/alpha/machine-lock.h | 10 ++---- sysdeps/mach/hurd/alpha/tls.h | 53 ------------------------------- 2 files changed, 3 insertions(+), 60 deletions(-) delete mode 100644 sysdeps/mach/hurd/alpha/tls.h diff --git a/sysdeps/mach/alpha/machine-lock.h b/sysdeps/mach/alpha/machine-lock.h index 363c29e56f..80f8750c87 100644 --- a/sysdeps/mach/alpha/machine-lock.h +++ b/sysdeps/mach/alpha/machine-lock.h @@ -1,5 +1,5 @@ /* Machine-specific definition for spin locks. Alpha version. - Copyright (C) 1994,97,2002 Free Software Foundation, Inc. + Copyright (C) 1994, 1997 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 @@ -38,8 +38,8 @@ typedef __volatile long int __spin_lock_t; _EXTERN_INLINE void __spin_unlock (__spin_lock_t *__lock) { - __asm__ __volatile__ ("mb"); - *__lock = 0; + __asm__ __volatile__ ("mb; stq $31, %0; mb" + : "=m" (__lock)); } /* Try to lock LOCK; return nonzero if we locked it, zero if another has. */ @@ -47,9 +47,6 @@ __spin_unlock (__spin_lock_t *__lock) _EXTERN_INLINE int __spin_try_lock (register __spin_lock_t *__lock) { -#if 1 - return 1; -#else register long int __rtn, __tmp; do @@ -69,7 +66,6 @@ __spin_try_lock (register __spin_lock_t *__lock) } while (! __rtn); /* RTN is now nonzero; we have the lock. */ return __rtn; -#endif } /* Return nonzero if LOCK is locked. */ diff --git a/sysdeps/mach/hurd/alpha/tls.h b/sysdeps/mach/hurd/alpha/tls.h deleted file mode 100644 index e820a013bf..0000000000 --- a/sysdeps/mach/hurd/alpha/tls.h +++ /dev/null @@ -1,53 +0,0 @@ -/* Definition for thread-local data handling. Hurd/Alpha version. - Copyright (C) 2002 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 _TLS_H -#define _TLS_H - -#if defined HAVE_TLS_SUPPORT && 0 - -/* Signal that TLS support is available. */ -# define USE_TLS 1 - -/* Code to initially initialize the thread pointer. This might need - special attention since 'errno' is not yet available and if the - operation can cause a failure 'errno' must not be touched. */ -# define TLS_INIT_TP(descr) \ - do \ - { \ - register tcbhead_t *_a0 __asm__ ("$16") = (descr); \ - __asm__ ("call_pal %0" : : "i" (PAL_wruniq), "r" (_a0)); \ - } while (0) - -# define THREAD_TCB() \ - ({ \ - register tcbhead_t *_rv __asm__ ("$0"); \ - __asm__ ("call_pal %0" : "=r" (rv) : "i" (PAL_rduniq)); \ - _rv; \ - }) - -/* Install new dtv for current thread. */ -# define INSTALL_NEW_DTV(dtv) (THREAD_DTV () = (dtv)) - -/* Return the address of the dtv for the current thread. */ -# define THREAD_DTV() (THREAD_TCB ()->dtv) - -#endif /* HAVE_TLS_SUPPORT */ - -#endif /* tls.h */ From a25ef3f28608efbd4691ae7fda3774d5a31d7c6a Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 1 Mar 2003 15:33:11 +0000 Subject: [PATCH 3049/4487] (_dl_start_user): Access __libc_stack_end through GOT since it is a global symbol. --- sysdeps/m68k/dl-machine.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index 0fd6495f10..a09f61111c 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. m68k version. - Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1996-2001, 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 @@ -158,7 +158,7 @@ _dl_start_user:\n\ | Save the user entry point address in %a4.\n\ move.l %d0, %a4\n\ | Remember the highest stack address.\n\ - lea __libc_stack_end(%pc), %a0\n\ + move.l __libc_stack_end@GOTPC(%pc), %a0\n\ move.l %sp, (%a0)\n\ | See if we were run as a command with the executable file\n\ | name as an extra leading argument.\n\ From aca56a7fa516f3a38c13fe995e0cb5335eef9e60 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 3 Mar 2003 09:58:55 +0000 Subject: [PATCH 3050/4487] Define MAP_POPULATE and MAP_NONBLOCK. --- sysdeps/unix/sysv/linux/alpha/bits/mman.h | 12 +++++++----- sysdeps/unix/sysv/linux/arm/bits/mman.h | 14 ++++++++------ sysdeps/unix/sysv/linux/hppa/bits/mman.h | 22 ++++++++++++++++++++-- sysdeps/unix/sysv/linux/m68k/bits/mman.h | 12 +++++++----- 4 files changed, 42 insertions(+), 18 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/mman.h b/sysdeps/unix/sysv/linux/alpha/bits/mman.h index 77b595a0e5..918043917b 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/mman.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/Alpha version. - Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 2000, 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 @@ -60,11 +60,13 @@ /* These are Linux-specific. */ #ifdef __USE_MISC -# define MAP_GROWSDOWN 0x1000 /* Stack-like segment. */ -# define MAP_DENYWRITE 0x2000 /* ETXTBSY */ -# define MAP_EXECUTABLE 0x4000 /* Mark it as an executable. */ -# define MAP_LOCKED 0x8000 /* Lock the mapping. */ +# define MAP_GROWSDOWN 0x01000 /* Stack-like segment. */ +# define MAP_DENYWRITE 0x02000 /* ETXTBSY */ +# define MAP_EXECUTABLE 0x04000 /* Mark it as an executable. */ +# define MAP_LOCKED 0x08000 /* Lock the mapping. */ # define MAP_NORESERVE 0x10000 /* Don't check for reservations. */ +# define MAP_POPULATE 0x20000 /* Populate (prefault) pagetables. */ +# define MAP_NONBLOCK 0x40000 /* Do not block on IO. */ #endif /* Flags to `msync'. */ diff --git a/sysdeps/unix/sysv/linux/arm/bits/mman.h b/sysdeps/unix/sysv/linux/arm/bits/mman.h index 715e0f04c9..c6d475b4de 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/mman.h +++ b/sysdeps/unix/sysv/linux/arm/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/ARM version. - Copyright (C) 1997, 2000 Free Software Foundation, Inc. + Copyright (C) 1997, 2000, 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 @@ -52,11 +52,13 @@ /* These are Linux-specific. */ #ifdef __USE_MISC -# define MAP_GROWSDOWN 0x0100 /* Stack-like segment. */ -# define MAP_DENYWRITE 0x0800 /* ETXTBSY */ -# define MAP_EXECUTABLE 0x1000 /* Mark it as an executable. */ -# define MAP_LOCKED 0x2000 /* Lock the mapping. */ -# define MAP_NORESERVE 0x4000 /* Don't check for reservations. */ +# define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */ +# define MAP_DENYWRITE 0x00800 /* ETXTBSY */ +# define MAP_EXECUTABLE 0x01000 /* Mark it as an executable. */ +# define MAP_LOCKED 0x02000 /* Lock the mapping. */ +# define MAP_NORESERVE 0x04000 /* Don't check for reservations. */ +# define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */ +# define MAP_NONBLOCK 0x10000 /* Do not block on IO. */ #endif /* Flags to `msync'. */ diff --git a/sysdeps/unix/sysv/linux/hppa/bits/mman.h b/sysdeps/unix/sysv/linux/hppa/bits/mman.h index 78c0171fae..40db9f9b90 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/mman.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/mman.h @@ -1,4 +1,21 @@ -/* Definitions for POSIX memory map interface. Insert rest of disclaimer here */ +/* Definitions for POSIX memory map interface. Linux/HPPA version. + Copyright (C) 1997, 1998, 2000, 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 _SYS_MMAN_H # error "Never use directly; include instead." @@ -22,6 +39,8 @@ #define MAP_LOCKED 0x2000 /* pages are locked */ #define MAP_NORESERVE 0x4000 /* don't check for reservations */ #define MAP_GROWSDOWN 0x8000 /* stack-like segment */ +#define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */ +#define MAP_NONBLOCK 0x20000 /* do not block on IO */ #define MS_SYNC 1 /* synchronous memory sync */ #define MS_ASYNC 2 /* sync memory asynchronously */ @@ -58,4 +77,3 @@ #ifdef __USE_GNU # define MREMAP_MAYMOVE 1 #endif - diff --git a/sysdeps/unix/sysv/linux/m68k/bits/mman.h b/sysdeps/unix/sysv/linux/m68k/bits/mman.h index 5c49fc8987..350ea95bf9 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/mman.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/mman.h @@ -52,11 +52,13 @@ /* These are Linux-specific. */ #ifdef __USE_MISC -# define MAP_GROWSDOWN 0x0100 /* Stack-like segment. */ -# define MAP_DENYWRITE 0x0800 /* ETXTBSY */ -# define MAP_EXECUTABLE 0x1000 /* Mark it as an executable. */ -# define MAP_LOCKED 0x2000 /* Lock the mapping. */ -# define MAP_NORESERVE 0x4000 /* Don't check for reservations. */ +# define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */ +# define MAP_DENYWRITE 0x00800 /* ETXTBSY */ +# define MAP_EXECUTABLE 0x01000 /* Mark it as an executable. */ +# define MAP_LOCKED 0x02000 /* Lock the mapping. */ +# define MAP_NORESERVE 0x04000 /* Don't check for reservations. */ +# define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */ +# define MAP_NONBLOCK 0x10000 /* Do not block on IO. */ #endif /* Flags to `msync'. */ From 3347c3ad39489470f3098edba47f45df76f69d73 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 7 Mar 2003 09:46:33 +0000 Subject: [PATCH 3051/4487] 2003-03-04 Guido Guenther * sysdeps/unix/sysv/linux/mips/syscalls.list: Remove unneeded stubs, we have INLINE_SYSCALL. * sysdeps/unix/sysv/linux/mips/bits/mman.h: Define MAP_POPULATE, MAP_NONBLOCK. --- sysdeps/unix/sysv/linux/mips/bits/mman.h | 4 ++- sysdeps/unix/sysv/linux/mips/syscalls.list | 40 ---------------------- 2 files changed, 3 insertions(+), 41 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/mman.h b/sysdeps/unix/sysv/linux/mips/bits/mman.h index 61886e27ee..e05f2a6d4d 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/mman.h +++ b/sysdeps/unix/sysv/linux/mips/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/MIPS version. - Copyright (C) 1997, 2000 Free Software Foundation, Inc. + Copyright (C) 1997, 2000, 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 @@ -59,6 +59,8 @@ # define MAP_DENYWRITE 0x2000 /* ETXTBSY */ # define MAP_EXECUTABLE 0x4000 /* mark it as an executable */ # define MAP_LOCKED 0x8000 /* pages are locked */ +# define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */ +# define MAP_NONBLOCK 0x20000 /* do not block on IO */ #endif /* Flags to `msync'. */ diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index ec75228ce1..51789a7679 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -32,14 +32,6 @@ shutdown - shutdown i:ii __shutdown shutdown socket - socket i:iii __socket socket socketpair - socketpair i:iiif __socketpair socketpair -# -# These are defined locally because the caller is also defined in this dir. -# -s_llseek llseek _llseek i:iiipi __syscall__llseek -s_sigaction sigaction sigaction i:ipp __syscall_sigaction -s_ustat ustat ustat i:ip __syscall_ustat -sys_mknod xmknod mknod i:sii __syscall_mknod - # System calls with wrappers. rt_sigaction - rt_sigaction i:ippi __syscall_rt_sigaction rt_sigpending - rt_sigpending i:pi __syscall_rt_sigpending @@ -47,35 +39,3 @@ rt_sigprocmask - rt_sigprocmask i:ippi __syscall_rt_sigprocmask rt_sigqueueinfo - rt_sigqueueinfo i:iip __syscall_rt_sigqueueinfo rt_sigsuspend - rt_sigsuspend i:pi __syscall_rt_sigsuspend rt_sigtimedwait - rt_sigtimedwait i:pppi __syscall_rt_sigtimedwait -s_execve EXTRA execve i:spp __syscall_execve -s_exit _exit exit i:i __syscall_exit -s_fcntl fcntl fcntl i:iiF __syscall_fcntl -s_fcntl64 fcntl64 fcntl64 i:iiF __syscall_fcntl64 -s_fstat64 fxstat64 fstat64 i:ip __syscall_fstat64 -s_ftruncate64 ftruncate64 ftruncate64 i:iiii __syscall_ftruncate64 -s_getcwd getcwd getcwd i:pi __syscall_getcwd -s_getdents getdents getdents i:ipi __syscall_getdents -s_getdents64 getdents getdents64 i:ipi __syscall_getdents64 -s_getpriority getpriority getpriority i:ii __syscall_getpriority -s_ipc msgget ipc i:iiiip __syscall_ipc -s_lstat64 lxstat64 lstat64 i:sp __syscall_lstat64 -s_mmap2 mmap64 mmap2 b:aniiii __syscall_mmap2 -s_poll poll poll i:pii __syscall_poll -s_pread64 pread64 pread i:ibniii __syscall_pread -s_ptrace ptrace ptrace i:iipp __syscall_ptrace -s_pwrite64 pwrite64 pwrite i:ibniii __syscall_pwrite -s_readahead EXTRA readahead i:iiii __syscall_readahead -s_reboot reboot reboot i:iii __syscall_reboot -s_setrlimit setrlimit setrlimit i:ip __syscall_setrlimit -s_sigpending sigpending sigpending i:p __syscall_sigpending -s_sigprocmask sigprocmask sigprocmask i:ipp __syscall_sigprocmask -s_stat64 xstat64 stat64 i:sp __syscall_stat64 -s_truncate64 truncate64 truncate64 i:siii __syscall_truncate64 - -# Todo: we can pass 6 args in registers, no need for the wrapper -sys_sysctl sysctl _sysctl i:p __syscall__sysctl -sys_fstat fxstat fstat i:ip __syscall_fstat -sys_lstat lxstat lstat i:sp __syscall_lstat -sys_readv readv readv i:ipi __syscall_readv -sys_stat xstat stat i:sp __syscall_stat -sys_writev writev writev i:ipi __syscall_writev From ced89ec318d6268c8c9d3530b8e57a23ade21b4e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 12 Mar 2003 01:04:51 +0000 Subject: [PATCH 3052/4487] (__thread_start): Use jal instead of jalr to invoke subroutine so restoring the $gp register will work properly. --- sysdeps/unix/sysv/linux/mips/clone.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/clone.S b/sysdeps/unix/sysv/linux/mips/clone.S index 1e029687cf..eba4ad9c3d 100644 --- a/sysdeps/unix/sysv/linux/mips/clone.S +++ b/sysdeps/unix/sysv/linux/mips/clone.S @@ -1,6 +1,6 @@ -/* Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 2000, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. - Contributed by Ralf Baechle , 1996. + Contributed by Ralf Baechle , 1996. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -93,7 +93,7 @@ ENTRY(__thread_start) lw a0,4(sp) /* Argument pointer. */ /* Call the user's function. */ - jalr t9 + jal t9 /* Call _exit rather than doing it inline for breakpoint purposes. */ move a0,v0 From 28a8f6990191a351c4b1330f9d4ef2627b972ccc Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 13 Mar 2003 15:07:13 +0000 Subject: [PATCH 3053/4487] Introduce and use local label .Lthread_start since current binutils don't allow branches to globally visible symbols. --- sysdeps/unix/sysv/linux/mips/clone.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/clone.S b/sysdeps/unix/sysv/linux/mips/clone.S index eba4ad9c3d..00b13170e5 100644 --- a/sysdeps/unix/sysv/linux/mips/clone.S +++ b/sysdeps/unix/sysv/linux/mips/clone.S @@ -63,7 +63,7 @@ NESTED(__clone,4*SZREG,sp) syscall bnez a3,error - beqz v0,__thread_start + beqz v0,.Lthread_start /* Successful return from the parent */ addiu sp,32 @@ -84,7 +84,7 @@ error: its own function so that we can terminate the stack trace with our debug info. */ -ENTRY(__thread_start) +.Lthread_start: /* cp is already loaded. */ .cprestore 16 /* The stackframe has been created on entry of clone(). */ From 3e9a97580aa04fab180261f36bd774b24445d553 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 14 Mar 2003 03:59:37 +0000 Subject: [PATCH 3054/4487] 2003-03-13 Alexandre Oliva * sysdeps/mips/add_n.S: Use L macro for local labels. * sysdeps/mips/addmul_1.S: Likewise. * sysdeps/mips/lshift.S: Likewise. * sysdeps/mips/memcpy.S: Likewise. * sysdeps/mips/memset.S: Likewise. * sysdeps/mips/mul_1.S: Likewise. * sysdeps/mips/rshift.S: Likewise. * sysdeps/mips/sub_n.S: Likewise. * sysdeps/mips/submul_1.S: Likewise. * sysdeps/mips/mips64/add_n.S: Likewise. * sysdeps/mips/mips64/addmul_1.S: Likewise. * sysdeps/mips/mips64/lshift.S: Likewise. * sysdeps/mips/mips64/mul_1.S: Likewise. * sysdeps/mips/mips64/rshift.S: Likewise. * sysdeps/mips/mips64/sub_n.S: Likewise. * sysdeps/mips/mips64/submul_1.S: Likewise. * sysdeps/unix/mips/sysdep.h: Define L() according to ABI conventions. Define END as in sys/asm.h. * sysdeps/unix/mips/sysdep.S: Likewise. * sysdeps/unix/mips/wait.S: Likewise. * sysdeps/unix/sysv/linux/mips/clone.S: Likewise. --- sysdeps/mips/add_n.S | 22 +++++++------- sysdeps/mips/addmul_1.S | 14 ++++----- sysdeps/mips/lshift.S | 24 +++++++-------- sysdeps/mips/memcpy.S | 44 ++++++++++++++-------------- sysdeps/mips/memset.S | 30 +++++++++---------- sysdeps/mips/mips64/add_n.S | 29 +++++++++--------- sysdeps/mips/mips64/addmul_1.S | 23 ++++++++------- sysdeps/mips/mips64/lshift.S | 29 +++++++++--------- sysdeps/mips/mips64/mul_1.S | 24 ++++++++------- sysdeps/mips/mips64/rshift.S | 29 +++++++++--------- sysdeps/mips/mips64/sub_n.S | 29 +++++++++--------- sysdeps/mips/mips64/submul_1.S | 24 ++++++++------- sysdeps/mips/mul_1.S | 14 ++++----- sysdeps/mips/rshift.S | 16 +++++----- sysdeps/mips/sub_n.S | 24 +++++++-------- sysdeps/mips/submul_1.S | 14 ++++----- sysdeps/unix/mips/sysdep.S | 11 +++---- sysdeps/unix/mips/sysdep.h | 19 ++++++++---- sysdeps/unix/mips/wait.S | 11 +++---- sysdeps/unix/sysv/linux/mips/clone.S | 12 ++++---- 20 files changed, 231 insertions(+), 211 deletions(-) diff --git a/sysdeps/mips/add_n.S b/sysdeps/mips/add_n.S index da7b2d456d..c82871f701 100644 --- a/sysdeps/mips/add_n.S +++ b/sysdeps/mips/add_n.S @@ -1,7 +1,7 @@ /* MIPS2 __mpn_add_n -- Add two limb vectors of the same length > 0 and store sum in a third limb vector. -Copyright (C) 1995, 2000 Free Software Foundation, Inc. +Copyright (C) 1995, 2000, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -43,12 +43,12 @@ ENTRY (__mpn_add_n) addiu $7,$7,-1 and $9,$7,4-1 /* number of limbs in first loop */ - beq $9,$0,.L0 /* if multiple of 4 limbs, skip first loop */ + beq $9,$0,L(L0) /* if multiple of 4 limbs, skip first loop */ move $2,$0 subu $7,$7,$9 -.Loop0: addiu $9,$9,-1 +L(Loop0): addiu $9,$9,-1 lw $12,4($5) addu $11,$11,$2 lw $13,4($6) @@ -62,13 +62,13 @@ ENTRY (__mpn_add_n) addiu $6,$6,4 move $10,$12 move $11,$13 - bne $9,$0,.Loop0 - addiu $4,$4,4 + bne $9,$0,L(Loop0) + addiu $4,$4,4 -.L0: beq $7,$0,.Lend - nop +L(L0): beq $7,$0,L(end) + nop -.Loop: addiu $7,$7,-4 +L(Loop): addiu $7,$7,-4 lw $12,4($5) addu $11,$11,$2 @@ -109,10 +109,10 @@ ENTRY (__mpn_add_n) addiu $5,$5,16 addiu $6,$6,16 - bne $7,$0,.Loop - addiu $4,$4,16 + bne $7,$0,L(Loop) + addiu $4,$4,16 -.Lend: addu $11,$11,$2 +L(end): addu $11,$11,$2 sltu $8,$11,$2 addu $11,$10,$11 sltu $2,$11,$10 diff --git a/sysdeps/mips/addmul_1.S b/sysdeps/mips/addmul_1.S index 32df1d780b..3e1fc09d10 100644 --- a/sysdeps/mips/addmul_1.S +++ b/sysdeps/mips/addmul_1.S @@ -1,7 +1,7 @@ /* MIPS __mpn_addmul_1 -- Multiply a limb vector with a single limb and add the product to a second limb vector. -Copyright (C) 1995, 2000 Free Software Foundation, Inc. +Copyright (C) 1995, 2000, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -46,14 +46,14 @@ ENTRY (__mpn_addmul_1) multu $8,$7 addiu $6,$6,-1 - beq $6,$0,$LC0 + beq $6,$0,L(LC0) move $2,$0 /* zero cy2 */ addiu $6,$6,-1 - beq $6,$0,$LC1 + beq $6,$0,L(LC1) lw $8,0($5) /* load new s1 limb as early as possible */ -Loop: lw $10,0($4) +L(Loop): lw $10,0($4) mflo $3 mfhi $9 addiu $5,$5,4 @@ -67,11 +67,11 @@ Loop: lw $10,0($4) addu $2,$2,$10 sw $3,0($4) addiu $4,$4,4 - bne $6,$0,Loop /* should be "bnel" */ + bne $6,$0,L(Loop) /* should be "bnel" */ addu $2,$9,$2 /* add high product limb and carry from addition */ /* cool down phase 1 */ -$LC1: lw $10,0($4) +L(LC1): lw $10,0($4) mflo $3 mfhi $9 addu $3,$3,$2 @@ -85,7 +85,7 @@ $LC1: lw $10,0($4) addu $2,$9,$2 /* add high product limb and carry from addition */ /* cool down phase 0 */ -$LC0: lw $10,0($4) +L(LC0): lw $10,0($4) mflo $3 mfhi $9 addu $3,$3,$2 diff --git a/sysdeps/mips/lshift.S b/sysdeps/mips/lshift.S index b1a858dd9a..0217bfc586 100644 --- a/sysdeps/mips/lshift.S +++ b/sysdeps/mips/lshift.S @@ -1,6 +1,6 @@ /* MIPS2 __mpn_lshift -- -Copyright (C) 1995, 2000 Free Software Foundation, Inc. +Copyright (C) 1995, 2000, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -44,12 +44,12 @@ ENTRY (__mpn_lshift) addu $4,$4,$2 /* make r4 point at end of res */ addiu $6,$6,-1 and $9,$6,4-1 /* number of limbs in first loop */ - beq $9,$0,.L0 /* if multiple of 4 limbs, skip first loop */ - srl $2,$10,$13 /* compute function result */ + beq $9,$0,L(L0) /* if multiple of 4 limbs, skip first loop */ + srl $2,$10,$13 /* compute function result */ subu $6,$6,$9 -.Loop0: lw $3,-8($5) +L(Loop0): lw $3,-8($5) addiu $4,$4,-4 addiu $5,$5,-4 addiu $9,$9,-1 @@ -57,13 +57,13 @@ ENTRY (__mpn_lshift) srl $12,$3,$13 move $10,$3 or $8,$11,$12 - bne $9,$0,.Loop0 - sw $8,0($4) + bne $9,$0,L(Loop0) + sw $8,0($4) -.L0: beq $6,$0,.Lend - nop +L(L0): beq $6,$0,L(Lend) + nop -.Loop: lw $3,-8($5) +L(Loop): lw $3,-8($5) addiu $4,$4,-16 addiu $6,$6,-4 sll $11,$10,$7 @@ -89,10 +89,10 @@ ENTRY (__mpn_lshift) addiu $5,$5,-16 or $8,$14,$9 - bgtz $6,.Loop - sw $8,0($4) + bgtz $6,L(Loop) + sw $8,0($4) -.Lend: sll $8,$10,$7 +L(Lend): sll $8,$10,$7 j $31 sw $8,-4($4) END (__mpn_lshift) diff --git a/sysdeps/mips/memcpy.S b/sysdeps/mips/memcpy.S index 394265eed7..3d49ac976b 100644 --- a/sysdeps/mips/memcpy.S +++ b/sysdeps/mips/memcpy.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Hartvig Ekner , 2002. @@ -44,27 +44,27 @@ ENTRY (memcpy) .set noreorder slti t0, a2, 8 # Less than 8? - bne t0, zero, $last8 + bne t0, zero, L(last8) move v0, a0 # Setup exit value before too late xor t0, a1, a0 # Find a0/a1 displacement andi t0, 0x3 - bne t0, zero, $shift # Go handle the unaligned case + bne t0, zero, L(shift) # Go handle the unaligned case subu t1, zero, a1 andi t1, 0x3 # a0/a1 are aligned, but are we - beq t1, zero, $chk8w # starting in the middle of a word? + beq t1, zero, L(chk8w) # starting in the middle of a word? subu a2, t1 LWHI t0, 0(a1) # Yes we are... take care of that addu a1, t1 SWHI t0, 0(a0) addu a0, t1 -$chk8w: andi t0, a2, 0x1f # 32 or more bytes left? - beq t0, a2, $chk1w +L(chk8w): andi t0, a2, 0x1f # 32 or more bytes left? + beq t0, a2, L(chk1w) subu a3, a2, t0 # Yes addu a3, a1 # a3 = end address of loop move a2, t0 # a2 = what will be left after loop -$lop8w: lw t0, 0(a1) # Loop taking 8 words at a time +L(lop8w): lw t0, 0(a1) # Loop taking 8 words at a time lw t1, 4(a1) lw t2, 8(a1) lw t3, 12(a1) @@ -81,49 +81,49 @@ $lop8w: lw t0, 0(a1) # Loop taking 8 words at a time sw t4, -16(a0) sw t5, -12(a0) sw t6, -8(a0) - bne a1, a3, $lop8w + bne a1, a3, L(lop8w) sw t7, -4(a0) -$chk1w: andi t0, a2, 0x3 # 4 or more bytes left? - beq t0, a2, $last8 +L(chk1w): andi t0, a2, 0x3 # 4 or more bytes left? + beq t0, a2, L(last8) subu a3, a2, t0 # Yes, handle them one word at a time addu a3, a1 # a3 again end address move a2, t0 -$lop1w: lw t0, 0(a1) +L(lop1w): lw t0, 0(a1) addiu a0, 4 addiu a1, 4 - bne a1, a3, $lop1w + bne a1, a3, L(lop1w) sw t0, -4(a0) -$last8: blez a2, $lst8e # Handle last 8 bytes, one at a time +L(last8): blez a2, L(lst8e) # Handle last 8 bytes, one at a time addu a3, a2, a1 -$lst8l: lb t0, 0(a1) +L(lst8l): lb t0, 0(a1) addiu a0, 1 addiu a1, 1 - bne a1, a3, $lst8l + bne a1, a3, L(lst8l) sb t0, -1(a0) -$lst8e: jr ra # Bye, bye +L(lst8e): jr ra # Bye, bye nop -$shift: subu a3, zero, a0 # Src and Dest unaligned +L(shift): subu a3, zero, a0 # Src and Dest unaligned andi a3, 0x3 # (unoptimized case...) - beq a3, zero, $shft1 + beq a3, zero, L(shft1) subu a2, a3 # a2 = bytes left LWHI t0, 0(a1) # Take care of first odd part LWLO t0, 3(a1) addu a1, a3 SWHI t0, 0(a0) addu a0, a3 -$shft1: andi t0, a2, 0x3 +L(shft1): andi t0, a2, 0x3 subu a3, a2, t0 addu a3, a1 -$shfth: LWHI t1, 0(a1) # Limp through, word by word +L(shfth): LWHI t1, 0(a1) # Limp through, word by word LWLO t1, 3(a1) addiu a0, 4 addiu a1, 4 - bne a1, a3, $shfth + bne a1, a3, L(shfth) sw t1, -4(a0) - b $last8 # Handle anything which may be left + b L(last8) # Handle anything which may be left move a2, t0 .set reorder diff --git a/sysdeps/mips/memset.S b/sysdeps/mips/memset.S index 7e3f129af9..7825dea880 100644 --- a/sysdeps/mips/memset.S +++ b/sysdeps/mips/memset.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Hartvig Ekner , 2002. @@ -38,45 +38,45 @@ ENTRY (memset) .set noreorder slti t1, a2, 8 # Less than 8? - bne t1, zero, $last8 + bne t1, zero, L(last8) move v0, a0 # Setup exit value before too late - beq a1, zero, $ueven # If zero pattern, no need to extend + beq a1, zero, L(ueven) # If zero pattern, no need to extend andi a1, 0xff # Avoid problems with bogus arguments sll t0, a1, 8 or a1, t0 sll t0, a1, 16 or a1, t0 # a1 is now pattern in full word -$ueven: subu t0, zero, a0 # Unaligned address? +L(ueven): subu t0, zero, a0 # Unaligned address? andi t0, 0x3 - beq t0, zero, $chkw + beq t0, zero, L(chkw) subu a2, t0 SWHI a1, 0(a0) # Yes, handle first unaligned part addu a0, t0 # Now both a0 and a2 are updated -$chkw: andi t0, a2, 0x7 # Enough left for one loop iteration? - beq t0, a2, $chkl +L(chkw): andi t0, a2, 0x7 # Enough left for one loop iteration? + beq t0, a2, L(chkl) subu a3, a2, t0 addu a3, a0 # a3 is last loop address +1 move a2, t0 # a2 is now # of bytes left after loop -$loopw: addiu a0, 8 # Handle 2 words pr. iteration +L(loopw): addiu a0, 8 # Handle 2 words pr. iteration sw a1, -8(a0) - bne a0, a3, $loopw + bne a0, a3, L(loopw) sw a1, -4(a0) -$chkl: andi t0, a2, 0x4 # Check if there is at least a full - beq t0, zero, $last8 # word remaining after the loop +L(chkl): andi t0, a2, 0x4 # Check if there is at least a full + beq t0, zero, L(last8) # word remaining after the loop subu a2, t0 sw a1, 0(a0) # Yes... addiu a0, 4 -$last8: blez a2, $exit # Handle last 8 bytes (if cnt>0) +L(last8): blez a2, L(exit) # Handle last 8 bytes (if cnt>0) addu a3, a2, a0 # a3 is last address +1 -$lst8l: addiu a0, 1 - bne a0, a3, $lst8l +L(lst8l): addiu a0, 1 + bne a0, a3, L(lst8l) sb a1, -1(a0) -$exit: j ra # Bye, bye +L(exit): j ra # Bye, bye nop .set reorder diff --git a/sysdeps/mips/mips64/add_n.S b/sysdeps/mips/mips64/add_n.S index 771d51981a..072f4f0b73 100644 --- a/sysdeps/mips/mips64/add_n.S +++ b/sysdeps/mips/mips64/add_n.S @@ -1,7 +1,7 @@ /* MIPS3 __mpn_add_n -- Add two limb vectors of the same length > 0 and * store sum in a third limb vector. * - * Copyright (C) 1995, 2000 Free Software Foundation, Inc. + * Copyright (C) 1995, 2000, 2002, 2003 Free Software Foundation, Inc. * * This file is part of the GNU MP Library. * @@ -22,6 +22,7 @@ */ #include +#include /* * INPUT PARAMETERS @@ -38,10 +39,10 @@ .globl __mpn_add_n .ent __mpn_add_n __mpn_add_n: - .set noreorder #ifdef __PIC__ - .cpload t9 + SETUP_GP /* ??? unused */ #endif + .set noreorder .set nomacro ld $10,0($5) @@ -49,12 +50,12 @@ __mpn_add_n: daddiu $7,$7,-1 and $9,$7,4-1 # number of limbs in first loop - beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop - move $2,$0 + beq $9,$0,L(L0) # if multiple of 4 limbs, skip first loop + move $2,$0 dsubu $7,$7,$9 -.Loop0: daddiu $9,$9,-1 +L(Loop0): daddiu $9,$9,-1 ld $12,8($5) daddu $11,$11,$2 ld $13,8($6) @@ -68,13 +69,13 @@ __mpn_add_n: daddiu $6,$6,8 move $10,$12 move $11,$13 - bne $9,$0,.Loop0 - daddiu $4,$4,8 + bne $9,$0,L(Loop0) + daddiu $4,$4,8 -.L0: beq $7,$0,.Lend - nop +L(L0): beq $7,$0,L(Lend) + nop -.Loop: daddiu $7,$7,-4 +L(Loop): daddiu $7,$7,-4 ld $12,8($5) daddu $11,$11,$2 @@ -115,10 +116,10 @@ __mpn_add_n: daddiu $5,$5,32 daddiu $6,$6,32 - bne $7,$0,.Loop - daddiu $4,$4,32 + bne $7,$0,L(Loop) + daddiu $4,$4,32 -.Lend: daddu $11,$11,$2 +L(Lend): daddu $11,$11,$2 sltu $8,$11,$2 daddu $11,$10,$11 sltu $2,$11,$10 diff --git a/sysdeps/mips/mips64/addmul_1.S b/sysdeps/mips/mips64/addmul_1.S index f6cf428315..f5ecd83702 100644 --- a/sysdeps/mips/mips64/addmul_1.S +++ b/sysdeps/mips/mips64/addmul_1.S @@ -1,7 +1,7 @@ /* MIPS3 __mpn_addmul_1 -- Multiply a limb vector with a single limb and * add the product to a second limb vector. * - * Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc. + * Copyright (C) 1992, 1994, 1995, 2002, 2003 Free Software Foundation, Inc. * * This file is part of the GNU MP Library. * @@ -22,6 +22,7 @@ */ #include +#include /* INPUT PARAMETERS * res_ptr $4 @@ -38,10 +39,10 @@ .globl __mpn_addmul_1 .ent __mpn_addmul_1 __mpn_addmul_1: - .set noreorder #ifdef PIC - .cpload t9 + SETUP_GP /* ??? unused */ #endif + .set noreorder .set nomacro # warm up phase 0 @@ -52,14 +53,14 @@ __mpn_addmul_1: dmultu $8,$7 daddiu $6,$6,-1 - beq $6,$0,$LC0 - move $2,$0 # zero cy2 + beq $6,$0,L(LC0) + move $2,$0 # zero cy2 daddiu $6,$6,-1 - beq $6,$0,$LC1 + beq $6,$0,L(LC1) ld $8,0($5) # load new s1 limb as early as possible -Loop: ld $10,0($4) +L(Loop): ld $10,0($4) mflo $3 mfhi $9 daddiu $5,$5,8 @@ -73,11 +74,11 @@ Loop: ld $10,0($4) daddu $2,$2,$10 sd $3,0($4) daddiu $4,$4,8 - bne $6,$0,Loop - daddu $2,$9,$2 # add high product limb and carry from addition + bne $6,$0,L(Loop) + daddu $2,$9,$2 # add high product limb and carry from addition # cool down phase 1 -$LC1: ld $10,0($4) +L(LC1): ld $10,0($4) mflo $3 mfhi $9 daddu $3,$3,$2 @@ -91,7 +92,7 @@ $LC1: ld $10,0($4) daddu $2,$9,$2 # add high product limb and carry from addition # cool down phase 0 -$LC0: ld $10,0($4) +L(LC0): ld $10,0($4) mflo $3 mfhi $9 daddu $3,$3,$2 diff --git a/sysdeps/mips/mips64/lshift.S b/sysdeps/mips/mips64/lshift.S index d06ba0d309..20f9e3da19 100644 --- a/sysdeps/mips/mips64/lshift.S +++ b/sysdeps/mips/mips64/lshift.S @@ -1,6 +1,6 @@ /* MIPS3 __mpn_lshift -- * - * Copyright (C) 1995, 2000 Free Software Foundation, Inc. + * Copyright (C) 1995, 2000, 2002, 2003 Free Software Foundation, Inc. * * This file is part of the GNU MP Library. * @@ -21,6 +21,7 @@ */ #include +#include /* INPUT PARAMETERS * res_ptr $4 @@ -37,10 +38,10 @@ .globl __mpn_lshift .ent __mpn_lshift __mpn_lshift: - .set noreorder #ifdef __PIC__ - .cpload t9 + SETUP_GP /* ??? unused */ #endif + .set noreorder .set nomacro dsll $2,$6,3 @@ -50,12 +51,12 @@ __mpn_lshift: daddu $4,$4,$2 # make r4 point at end of res daddiu $6,$6,-1 and $9,$6,4-1 # number of limbs in first loop - beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop - dsrl $2,$10,$13 # compute function result + beq $9,$0,L(L0) # if multiple of 4 limbs, skip first loop + dsrl $2,$10,$13 # compute function result dsubu $6,$6,$9 -.Loop0: ld $3,-16($5) +L(Loop0): ld $3,-16($5) daddiu $4,$4,-8 daddiu $5,$5,-8 daddiu $9,$9,-1 @@ -63,13 +64,13 @@ __mpn_lshift: dsrl $12,$3,$13 move $10,$3 or $8,$11,$12 - bne $9,$0,.Loop0 - sd $8,0($4) + bne $9,$0,L(Loop0) + sd $8,0($4) -.L0: beq $6,$0,.Lend - nop +L(L0): beq $6,$0,L(Lend) + nop -.Loop: ld $3,-16($5) +L(Loop): ld $3,-16($5) daddiu $4,$4,-32 daddiu $6,$6,-4 dsll $11,$10,$7 @@ -95,10 +96,10 @@ __mpn_lshift: daddiu $5,$5,-32 or $8,$14,$9 - bgtz $6,.Loop - sd $8,0($4) + bgtz $6,L(Loop) + sd $8,0($4) -.Lend: dsll $8,$10,$7 +L(Lend): dsll $8,$10,$7 j $31 sd $8,-8($4) .end __mpn_lshift diff --git a/sysdeps/mips/mips64/mul_1.S b/sysdeps/mips/mips64/mul_1.S index bf32953f43..c711783001 100644 --- a/sysdeps/mips/mips64/mul_1.S +++ b/sysdeps/mips/mips64/mul_1.S @@ -1,7 +1,8 @@ /* MIPS3 __mpn_mul_1 -- Multiply a limb vector with a single limb and * store the product in a second limb vector. * - * Copyright (C) 1992, 1994, 1995, 2000 Free Software Foundation, Inc. + * Copyright (C) 1992, 1994, 1995, 2000, 2002, 2003 + * Free Software Foundation, Inc. * * This file is part of the GNU MP Library. * @@ -22,6 +23,7 @@ */ #include +#include /* INPUT PARAMETERS * res_ptr $4 @@ -38,10 +40,10 @@ .globl __mpn_mul_1 .ent __mpn_mul_1 __mpn_mul_1: - .set noreorder #ifdef __PIC__ - .cpload t9 + SETUP_GP /* ??? unused */ #endif + .set noreorder .set nomacro # warm up phase 0 @@ -52,14 +54,14 @@ __mpn_mul_1: dmultu $8,$7 daddiu $6,$6,-1 - beq $6,$0,$LC0 - move $2,$0 # zero cy2 + beq $6,$0,L(LC0) + move $2,$0 # zero cy2 daddiu $6,$6,-1 - beq $6,$0,$LC1 + beq $6,$0,L(LC1) ld $8,0($5) # load new s1 limb as early as possible -Loop: mflo $10 +L(Loop): mflo $10 mfhi $9 daddiu $5,$5,8 daddu $10,$10,$2 # add old carry limb to low product limb @@ -69,11 +71,11 @@ Loop: mflo $10 sltu $2,$10,$2 # carry from previous addition -> $2 sd $10,0($4) daddiu $4,$4,8 - bne $6,$0,Loop - daddu $2,$9,$2 # add high product limb and carry from addition + bne $6,$0,L(Loop) + daddu $2,$9,$2 # add high product limb and carry from addition # cool down phase 1 -$LC1: mflo $10 +L(LC1): mflo $10 mfhi $9 daddu $10,$10,$2 sltu $2,$10,$2 @@ -83,7 +85,7 @@ $LC1: mflo $10 daddu $2,$9,$2 # add high product limb and carry from addition # cool down phase 0 -$LC0: mflo $10 +L(LC0): mflo $10 mfhi $9 daddu $10,$10,$2 sltu $2,$10,$2 diff --git a/sysdeps/mips/mips64/rshift.S b/sysdeps/mips/mips64/rshift.S index f39c1b3314..e6a8a06d3d 100644 --- a/sysdeps/mips/mips64/rshift.S +++ b/sysdeps/mips/mips64/rshift.S @@ -1,6 +1,6 @@ /* MIPS3 __mpn_rshift -- * - * Copyright (C) 1995, 2000 Free Software Foundation, Inc. + * Copyright (C) 1995, 2000, 2002, 2003 Free Software Foundation, Inc. * * This file is part of the GNU MP Library. * @@ -21,6 +21,7 @@ */ #include +#include /* INPUT PARAMETERS * res_ptr $4 @@ -37,22 +38,22 @@ .globl __mpn_rshift .ent __mpn_rshift __mpn_rshift: - .set noreorder #ifdef __PIC__ - .cpload t9 + SETUP_GP /* ??? unused */ #endif + .set noreorder .set nomacro ld $10,0($5) # load first limb dsubu $13,$0,$7 daddiu $6,$6,-1 and $9,$6,4-1 # number of limbs in first loop - beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop - dsll $2,$10,$13 # compute function result + beq $9,$0,L(L0) # if multiple of 4 limbs, skip first loop + dsll $2,$10,$13 # compute function result dsubu $6,$6,$9 -.Loop0: ld $3,8($5) +L(Loop0): ld $3,8($5) daddiu $4,$4,8 daddiu $5,$5,8 daddiu $9,$9,-1 @@ -60,13 +61,13 @@ __mpn_rshift: dsll $12,$3,$13 move $10,$3 or $8,$11,$12 - bne $9,$0,.Loop0 - sd $8,-8($4) + bne $9,$0,L(Loop0) + sd $8,-8($4) -.L0: beq $6,$0,.Lend - nop +L(L0): beq $6,$0,L(Lend) + nop -.Loop: ld $3,8($5) +L(Loop): ld $3,8($5) daddiu $4,$4,32 daddiu $6,$6,-4 dsrl $11,$10,$7 @@ -92,10 +93,10 @@ __mpn_rshift: daddiu $5,$5,32 or $8,$14,$9 - bgtz $6,.Loop - sd $8,-8($4) + bgtz $6,L(Loop) + sd $8,-8($4) -.Lend: dsrl $8,$10,$7 +L(Lend): dsrl $8,$10,$7 j $31 sd $8,0($4) .end __mpn_rshift diff --git a/sysdeps/mips/mips64/sub_n.S b/sysdeps/mips/mips64/sub_n.S index d566658bfd..aa8b0dcf9a 100644 --- a/sysdeps/mips/mips64/sub_n.S +++ b/sysdeps/mips/mips64/sub_n.S @@ -1,7 +1,7 @@ /* MIPS3 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and * store difference in a third limb vector. * - * Copyright (C) 1995, 2000 Free Software Foundation, Inc. + * Copyright (C) 1995, 2000, 2002, 2003 Free Software Foundation, Inc. * * This file is part of the GNU MP Library. * @@ -22,6 +22,7 @@ */ #include +#include /* INPUT PARAMETERS * res_ptr $4 @@ -38,10 +39,10 @@ .globl __mpn_sub_n .ent __mpn_sub_n __mpn_sub_n: - .set noreorder #ifdef __PIC__ - .cpload t9 + SETUP_GP /* ??? unused */ #endif + .set noreorder .set nomacro ld $10,0($5) @@ -49,12 +50,12 @@ __mpn_sub_n: daddiu $7,$7,-1 and $9,$7,4-1 # number of limbs in first loop - beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop - move $2,$0 + beq $9,$0,L(L0) # if multiple of 4 limbs, skip first loop + move $2,$0 dsubu $7,$7,$9 -.Loop0: daddiu $9,$9,-1 +L(Loop0): daddiu $9,$9,-1 ld $12,8($5) daddu $11,$11,$2 ld $13,8($6) @@ -68,13 +69,13 @@ __mpn_sub_n: daddiu $6,$6,8 move $10,$12 move $11,$13 - bne $9,$0,.Loop0 - daddiu $4,$4,8 + bne $9,$0,L(Loop0) + daddiu $4,$4,8 -.L0: beq $7,$0,.Lend - nop +L(L0): beq $7,$0,L(Lend) + nop -.Loop: daddiu $7,$7,-4 +L(Loop): daddiu $7,$7,-4 ld $12,8($5) daddu $11,$11,$2 @@ -115,10 +116,10 @@ __mpn_sub_n: daddiu $5,$5,32 daddiu $6,$6,32 - bne $7,$0,.Loop - daddiu $4,$4,32 + bne $7,$0,L(Loop) + daddiu $4,$4,32 -.Lend: daddu $11,$11,$2 +L(Lend): daddu $11,$11,$2 sltu $8,$11,$2 dsubu $11,$10,$11 sltu $2,$10,$11 diff --git a/sysdeps/mips/mips64/submul_1.S b/sysdeps/mips/mips64/submul_1.S index 510923f366..4971b992a1 100644 --- a/sysdeps/mips/mips64/submul_1.S +++ b/sysdeps/mips/mips64/submul_1.S @@ -1,7 +1,8 @@ /* MIPS3 __mpn_submul_1 -- Multiply a limb vector with a single limb and * subtract the product from a second limb vector. * - * Copyright (C) 1992, 1994, 1995, 2000 Free Software Foundation, Inc. + * Copyright (C) 1992, 1994, 1995, 2000, 2002, 2003 + * Free Software Foundation, Inc. * * This file is part of the GNU MP Library. * @@ -22,6 +23,7 @@ */ #include +#include /* INPUT PARAMETERS * res_ptr $4 @@ -38,10 +40,10 @@ .globl __mpn_submul_1 .ent __mpn_submul_1 __mpn_submul_1: - .set noreorder #ifdef __PIC__ - .cpload t9 + SETUP_GP /* ??? unused */ #endif + .set noreorder .set nomacro # warm up phase 0 @@ -52,14 +54,14 @@ __mpn_submul_1: dmultu $8,$7 daddiu $6,$6,-1 - beq $6,$0,$LC0 - move $2,$0 # zero cy2 + beq $6,$0,L(LC0) + move $2,$0 # zero cy2 daddiu $6,$6,-1 - beq $6,$0,$LC1 + beq $6,$0,L(LC1) ld $8,0($5) # load new s1 limb as early as possible -Loop: ld $10,0($4) +L(Loop): ld $10,0($4) mflo $3 mfhi $9 daddiu $5,$5,8 @@ -73,11 +75,11 @@ Loop: ld $10,0($4) daddu $2,$2,$10 sd $3,0($4) daddiu $4,$4,8 - bne $6,$0,Loop - daddu $2,$9,$2 # add high product limb and carry from addition + bne $6,$0,L(Loop) + daddu $2,$9,$2 # add high product limb and carry from addition # cool down phase 1 -$LC1: ld $10,0($4) +L(LC1): ld $10,0($4) mflo $3 mfhi $9 daddu $3,$3,$2 @@ -91,7 +93,7 @@ $LC1: ld $10,0($4) daddu $2,$9,$2 # add high product limb and carry from addition # cool down phase 0 -$LC0: ld $10,0($4) +L(LC0): ld $10,0($4) mflo $3 mfhi $9 daddu $3,$3,$2 diff --git a/sysdeps/mips/mul_1.S b/sysdeps/mips/mul_1.S index 255623edeb..72f538670c 100644 --- a/sysdeps/mips/mul_1.S +++ b/sysdeps/mips/mul_1.S @@ -1,7 +1,7 @@ /* MIPS __mpn_mul_1 -- Multiply a limb vector with a single limb and store the product in a second limb vector. -Copyright (C) 1995, 1998, 2000 Free Software Foundation, Inc. +Copyright (C) 1995, 1998, 2000, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -46,14 +46,14 @@ ENTRY (__mpn_mul_1) multu $8,$7 addiu $6,$6,-1 - beq $6,$0,$LC0 + beq $6,$0,L(LC0) move $2,$0 /* zero cy2 */ addiu $6,$6,-1 - beq $6,$0,$LC1 + beq $6,$0,L(LC1) lw $8,0($5) /* load new s1 limb as early as possible */ -Loop: mflo $10 +L(Loop): mflo $10 mfhi $9 addiu $5,$5,4 addu $10,$10,$2 /* add old carry limb to low product limb */ @@ -63,11 +63,11 @@ Loop: mflo $10 sltu $2,$10,$2 /* carry from previous addition -> $2 */ sw $10,0($4) addiu $4,$4,4 - bne $6,$0,Loop /* should be "bnel" */ + bne $6,$0,L(Loop) /* should be "bnel" */ addu $2,$9,$2 /* add high product limb and carry from addition */ /* cool down phase 1 */ -$LC1: mflo $10 +L(LC1): mflo $10 mfhi $9 addu $10,$10,$2 sltu $2,$10,$2 @@ -77,7 +77,7 @@ $LC1: mflo $10 addu $2,$9,$2 /* add high product limb and carry from addition */ /* cool down phase 0 */ -$LC0: mflo $10 +L(LC0): mflo $10 mfhi $9 addu $10,$10,$2 sltu $2,$10,$2 diff --git a/sysdeps/mips/rshift.S b/sysdeps/mips/rshift.S index 46df86b5dc..cb688fe2ac 100644 --- a/sysdeps/mips/rshift.S +++ b/sysdeps/mips/rshift.S @@ -1,6 +1,6 @@ /* MIPS2 __mpn_rshift -- -Copyright (C) 1995, 2000 Free Software Foundation, Inc. +Copyright (C) 1995, 2000, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -41,12 +41,12 @@ ENTRY (__mpn_rshift) subu $13,$0,$7 addiu $6,$6,-1 and $9,$6,4-1 /* number of limbs in first loop */ - beq $9,$0,.L0 /* if multiple of 4 limbs, skip first loop*/ + beq $9,$0,L(L0) /* if multiple of 4 limbs, skip first loop*/ sll $2,$10,$13 /* compute function result */ subu $6,$6,$9 -.Loop0: lw $3,4($5) +L(Loop0): lw $3,4($5) addiu $4,$4,4 addiu $5,$5,4 addiu $9,$9,-1 @@ -54,13 +54,13 @@ ENTRY (__mpn_rshift) sll $12,$3,$13 move $10,$3 or $8,$11,$12 - bne $9,$0,.Loop0 + bne $9,$0,L(Loop0) sw $8,-4($4) -.L0: beq $6,$0,.Lend +L(L0): beq $6,$0,L(Lend) nop -.Loop: lw $3,4($5) +L(Loop): lw $3,4($5) addiu $4,$4,16 addiu $6,$6,-4 srl $11,$10,$7 @@ -86,10 +86,10 @@ ENTRY (__mpn_rshift) addiu $5,$5,16 or $8,$14,$9 - bgtz $6,.Loop + bgtz $6,L(Loop) sw $8,-4($4) -.Lend: srl $8,$10,$7 +L(Lend): srl $8,$10,$7 j $31 sw $8,0($4) END (__mpn_rshift) diff --git a/sysdeps/mips/sub_n.S b/sysdeps/mips/sub_n.S index 633f3e3143..53fa019343 100644 --- a/sysdeps/mips/sub_n.S +++ b/sysdeps/mips/sub_n.S @@ -1,7 +1,7 @@ /* MIPS2 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and store difference in a third limb vector. -Copyright (C) 1995, 2000 Free Software Foundation, Inc. +Copyright (C) 1995, 2000, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -43,12 +43,12 @@ ENTRY (__mpn_sub_n) addiu $7,$7,-1 and $9,$7,4-1 /* number of limbs in first loop */ - beq $9,$0,.L0 /* if multiple of 4 limbs, skip first loop */ - move $2,$0 + beq $9,$0,L(L0) /* if multiple of 4 limbs, skip first loop */ + move $2,$0 subu $7,$7,$9 -.Loop0: addiu $9,$9,-1 +L(Loop0): addiu $9,$9,-1 lw $12,4($5) addu $11,$11,$2 lw $13,4($6) @@ -62,13 +62,13 @@ ENTRY (__mpn_sub_n) addiu $6,$6,4 move $10,$12 move $11,$13 - bne $9,$0,.Loop0 - addiu $4,$4,4 + bne $9,$0,L(Loop0) + addiu $4,$4,4 -.L0: beq $7,$0,.Lend - nop +L(L0): beq $7,$0,L(Lend) + nop -.Loop: addiu $7,$7,-4 +L(Loop): addiu $7,$7,-4 lw $12,4($5) addu $11,$11,$2 @@ -109,10 +109,10 @@ ENTRY (__mpn_sub_n) addiu $5,$5,16 addiu $6,$6,16 - bne $7,$0,.Loop - addiu $4,$4,16 + bne $7,$0,L(Loop) + addiu $4,$4,16 -.Lend: addu $11,$11,$2 +L(Lend): addu $11,$11,$2 sltu $8,$11,$2 subu $11,$10,$11 sltu $2,$10,$11 diff --git a/sysdeps/mips/submul_1.S b/sysdeps/mips/submul_1.S index 7de9ca74f8..4c8a612650 100644 --- a/sysdeps/mips/submul_1.S +++ b/sysdeps/mips/submul_1.S @@ -1,7 +1,7 @@ /* MIPS __mpn_submul_1 -- Multiply a limb vector with a single limb and subtract the product from a second limb vector. -Copyright (C) 1995, 2000 Free Software Foundation, Inc. +Copyright (C) 1995, 2000, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -46,14 +46,14 @@ ENTRY (__mpn_submul_1) multu $8,$7 addiu $6,$6,-1 - beq $6,$0,$LC0 + beq $6,$0,L(LC0) move $2,$0 /* zero cy2 */ addiu $6,$6,-1 - beq $6,$0,$LC1 + beq $6,$0,L(LC1) lw $8,0($5) /* load new s1 limb as early as possible */ -Loop: lw $10,0($4) +L(Loop): lw $10,0($4) mflo $3 mfhi $9 addiu $5,$5,4 @@ -67,11 +67,11 @@ Loop: lw $10,0($4) addu $2,$2,$10 sw $3,0($4) addiu $4,$4,4 - bne $6,$0,Loop /* should be "bnel" */ + bne $6,$0,L(Loop) /* should be "bnel" */ addu $2,$9,$2 /* add high product limb and carry from addition */ /* cool down phase 1 */ -$LC1: lw $10,0($4) +L(LC1): lw $10,0($4) mflo $3 mfhi $9 addu $3,$3,$2 @@ -85,7 +85,7 @@ $LC1: lw $10,0($4) addu $2,$9,$2 /* add high product limb and carry from addition */ /* cool down phase 0 */ -$LC0: lw $10,0($4) +L(LC0): lw $10,0($4) mflo $3 mfhi $9 addu $3,$3,$2 diff --git a/sysdeps/unix/mips/sysdep.S b/sysdeps/unix/mips/sysdep.S index c710b0c274..a1adf677f9 100644 --- a/sysdeps/unix/mips/sysdep.S +++ b/sysdeps/unix/mips/sysdep.S @@ -1,4 +1,5 @@ -/* Copyright (C) 1992,93,94,97,98,99,2000 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1993, 1994, 1997, 1998, 1999, 2000, 2002, 2003 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -46,10 +47,10 @@ ENTRY(__syscall_error) /* We translate the system's EWOULDBLOCK error into EAGAIN. The GNU C library always defines EWOULDBLOCK==EAGAIN. EWOULDBLOCK_sys is the original number. */ - bne v0, EWOULDBLOCK_sys, skip + bne v0, EWOULDBLOCK_sys, L(skip) nop li v0, EAGAIN -skip: +L(skip): #endif /* Find our per-thread errno address */ jal __errno_location @@ -84,9 +85,9 @@ ENTRY(__syscall_error) /* We translate the system's EWOULDBLOCK error into EAGAIN. The GNU C library always defines EWOULDBLOCK==EAGAIN. EWOULDBLOCK_sys is the original number. */ - bne v0, EWOULDBLOCK_sys, skip + bne v0, EWOULDBLOCK_sys, L(skip) li v0, EAGAIN -skip: +L(skip): #endif /* Store it in errno... */ sw v0, errno diff --git a/sysdeps/unix/mips/sysdep.h b/sysdeps/unix/mips/sysdep.h index fd5191601a..8ba84e2083 100644 --- a/sysdeps/unix/mips/sysdep.h +++ b/sysdeps/unix/mips/sysdep.h @@ -1,4 +1,5 @@ -/* Copyright (C) 1992,95,97,99,2000 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995, 1997, 1999, 2000, 2002, 2003 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -33,7 +34,7 @@ can make things confusing if you're debugging---it looks like it's jumping backwards into the previous fn. */ #ifdef __PIC__ - #define PSEUDO(name, syscall_name, args) \ +#define PSEUDO(name, syscall_name, args) \ .align 2; \ 99: la t9,__syscall_error; \ jr t9; \ @@ -44,7 +45,7 @@ syscall; \ .set reorder; \ bne a3, zero, 99b; \ -syse1: +L(syse1): #else #define PSEUDO(name, syscall_name, args) \ .set noreorder; \ @@ -57,7 +58,7 @@ syscall; \ .set reorder; \ bne a3, zero, 99b; \ -syse1: +L(syse1): #endif #undef PSEUDO_END @@ -66,11 +67,19 @@ #define ret j ra ; nop #undef END -#define END(sym) .end sym +#define END(function) \ + .end function; \ + .size function,.-function #define r0 v0 #define r1 v1 /* The mips move insn is d,s. */ #define MOVE(x,y) move y , x +#if _MIPS_SIM == _MIPS_SIM_ABI32 || _MIPS_SIM == _MIPS_SIM_ABIO64 +# define L(label) $L ## label +#else +# define L(label) .L ## label +#endif + #endif diff --git a/sysdeps/unix/mips/wait.S b/sysdeps/unix/mips/wait.S index 4f4f84a4af..de0f6ebfae 100644 --- a/sysdeps/unix/mips/wait.S +++ b/sysdeps/unix/mips/wait.S @@ -1,4 +1,5 @@ -/* Copyright (C) 1992, 1994, 1995, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1994, 1995, 1997, 2002, 2003 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -28,18 +29,18 @@ ENTRY(__wait) li v0, SYS_wait syscall - beqz a3, noerror + beqz a3, L(noerror) nop j __syscall_error nop -noerror: +L(noerror): /* If the arg is not NULL, store v1 there. */ - beqz a0, noarg + beqz a0, L(noarg) nop sw v1, 0(a0) nop -noarg: +L(noarg): ret .end __wait diff --git a/sysdeps/unix/sysv/linux/mips/clone.S b/sysdeps/unix/sysv/linux/mips/clone.S index 00b13170e5..2b02a2ba9b 100644 --- a/sysdeps/unix/sysv/linux/mips/clone.S +++ b/sysdeps/unix/sysv/linux/mips/clone.S @@ -49,8 +49,8 @@ NESTED(__clone,4*SZREG,sp) /* Sanity check arguments. */ li v0,EINVAL - beqz a0,error /* No NULL function pointers. */ - beqz a1,error /* No NULL stack pointers. */ + beqz a0,L(error) /* No NULL function pointers. */ + beqz a1,L(error) /* No NULL stack pointers. */ subu a1,32 /* Reserve argument save space. */ sw a0,0(a1) /* Save function pointer. */ @@ -62,15 +62,15 @@ NESTED(__clone,4*SZREG,sp) li v0,__NR_clone syscall - bnez a3,error - beqz v0,.Lthread_start + bnez a3,L(error) + beqz v0,L(thread_start) /* Successful return from the parent */ addiu sp,32 ret /* Something bad happened -- no child created */ -error: +L(error): addiu sp,32 #ifdef __PIC__ la t9,__syscall_error @@ -84,7 +84,7 @@ error: its own function so that we can terminate the stack trace with our debug info. */ -.Lthread_start: +L(thread_start): /* cp is already loaded. */ .cprestore 16 /* The stackframe has been created on entry of clone(). */ From 04a836884574da485f011830b501601c9e8a6f37 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Fri, 14 Mar 2003 05:30:31 +0000 Subject: [PATCH 3055/4487] * sysdeps/mips/atomicity.h (exchange_and_add, atomic_add): Don't .set mips2 on new abi. (compare_and_swap): Likewise. Support 64-bit longs on n64. --- sysdeps/mips/atomicity.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/sysdeps/mips/atomicity.h b/sysdeps/mips/atomicity.h index bccacd9c90..5148121091 100644 --- a/sysdeps/mips/atomicity.h +++ b/sysdeps/mips/atomicity.h @@ -1,5 +1,5 @@ /* Low-level functions for atomic operations. Mips version. - Copyright (C) 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 2001, 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 @@ -32,7 +32,9 @@ exchange_and_add (volatile uint32_t *mem, int val) ("/* Inline exchange & add */\n" "1:\n\t" ".set push\n\t" +#if _MIPS_SIM == _MIPS_SIM_ABI32 ".set mips2\n\t" +#endif "ll %0,%3\n\t" "addu %1,%4,%0\n\t" "sc %1,%2\n\t" @@ -56,7 +58,9 @@ atomic_add (volatile uint32_t *mem, int val) ("/* Inline atomic add */\n" "1:\n\t" ".set push\n\t" +#if _MIPS_SIM == _MIPS_SIM_ABI32 ".set mips2\n\t" +#endif "ll %0,%2\n\t" "addu %0,%3,%0\n\t" "sc %0,%1\n\t" @@ -78,12 +82,22 @@ compare_and_swap (volatile long int *p, long int oldval, long int newval) ("/* Inline compare & swap */\n" "1:\n\t" ".set push\n\t" +#if _MIPS_SIM == _MIPS_SIM_ABI32 ".set mips2\n\t" +#endif +#if defined _ABI64 && _MIPS_SIM == _ABI64 + "lld %1,%5\n\t" +#else "ll %1,%5\n\t" +#endif "move %0,$0\n\t" "bne %1,%3,2f\n\t" "move %0,%4\n\t" +#if defined _ABI64 && _MIPS_SIM == _ABI64 + "scd %0,%2\n\t" +#else "sc %0,%2\n\t" +#endif ".set pop\n\t" "beqz %0,1b\n" "2:\n\t" From 2b2c3a2a042439f69f5e13a26386d0865f7eb9e9 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Fri, 14 Mar 2003 05:31:28 +0000 Subject: [PATCH 3056/4487] * sysdeps/mips/memcpy.S: Map t0-3 to a4-7 on new abis. * sysdeps/mips/memset.S: Likewise. * sysdeps/mips/sys/regdef.h: Alias a4-7 or t0-3 to $8-11 depending on the ABI. --- sysdeps/mips/memcpy.S | 13 +++++++++++++ sysdeps/mips/memset.S | 7 +++++++ sysdeps/mips/sys/regdef.h | 9 ++++++++- 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/sysdeps/mips/memcpy.S b/sysdeps/mips/memcpy.S index 3d49ac976b..c77f1b8d97 100644 --- a/sysdeps/mips/memcpy.S +++ b/sysdeps/mips/memcpy.S @@ -40,6 +40,19 @@ # define SWLO swl /* low part is left in little-endian */ #endif +#ifndef t0 +# define t0 a4 +#endif +#ifndef t1 +# define t1 a5 +#endif +#ifndef t2 +# define t2 a6 +#endif +#ifndef t3 +# define t3 a7 +#endif + ENTRY (memcpy) .set noreorder diff --git a/sysdeps/mips/memset.S b/sysdeps/mips/memset.S index 7825dea880..46811340ec 100644 --- a/sysdeps/mips/memset.S +++ b/sysdeps/mips/memset.S @@ -34,6 +34,13 @@ # define SWHI swr /* high part is right in little-endian */ #endif +#ifndef t0 +# define t0 a4 +#endif +#ifndef t1 +# define t1 a5 +#endif + ENTRY (memset) .set noreorder diff --git a/sysdeps/mips/sys/regdef.h b/sysdeps/mips/sys/regdef.h index c4df603836..f3a0df5ab4 100644 --- a/sysdeps/mips/sys/regdef.h +++ b/sysdeps/mips/sys/regdef.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ralf Baechle . @@ -31,10 +31,17 @@ #define a1 $5 #define a2 $6 #define a3 $7 +#if _MIPS_SIM != _MIPS_SIM_ABI32 +#define a4 $8 +#define a5 $9 +#define a6 $10 +#define a7 $11 +#else /* if _MIPS_SIM == _MIPS_SIM_ABI32 */ #define t0 $8 /* caller saved */ #define t1 $9 #define t2 $10 #define t3 $11 +#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ #define t4 $12 #define t5 $13 #define t6 $14 From 1dd24665befd04428beb07d8372bf083fe41d85c Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Fri, 14 Mar 2003 07:03:36 +0000 Subject: [PATCH 3057/4487] * sysdeps/unix/sysv/linux/mips/sys/tas.h (_test_and_set): Don't .set mips2 on new abis. --- sysdeps/unix/sysv/linux/mips/sys/tas.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/sys/tas.h b/sysdeps/unix/sysv/linux/mips/sys/tas.h index 7ad916c3c9..a840a9427a 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/tas.h +++ b/sysdeps/unix/sysv/linux/mips/sys/tas.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2002 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Maciej W. Rozycki , 2000. @@ -41,7 +41,9 @@ _test_and_set (int *p, int v) __THROW ("/* Inline test and set */\n" "1:\n\t" ".set push\n\t" +#if _MIPS_SIM == _MIPS_SIM_ABI32 ".set mips2\n\t" +#endif "ll %0,%3\n\t" "move %1,%4\n\t" "beq %0,%4,2f\n\t" From ab35974e216286b0b4097b573a971ae7b258abee Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Fri, 14 Mar 2003 07:49:05 +0000 Subject: [PATCH 3058/4487] * sysdeps/unix/sysv/linux/mips/kernel_sigaction.h (_KERNEL_NSIG_BPW): Define in terms of _MIPS_SZLONG. * sysdeps/unix/sysv/linux/mips/sigaction.c: Define restore and restore_rt functions. Use them. --- .../unix/sysv/linux/mips/kernel_sigaction.h | 2 +- sysdeps/unix/sysv/linux/mips/sigaction.c | 45 +++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h b/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h index 861866db9a..36d2667ec0 100644 --- a/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h +++ b/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h @@ -23,7 +23,7 @@ struct old_kernel_sigaction { #define _KERNEL_NSIG 128 -#define _KERNEL_NSIG_BPW 32 +#define _KERNEL_NSIG_BPW _MIPS_SZLONG #define _KERNEL_NSIG_WORDS (_KERNEL_NSIG / _KERNEL_NSIG_BPW) typedef struct { diff --git a/sysdeps/unix/sysv/linux/mips/sigaction.c b/sysdeps/unix/sysv/linux/mips/sigaction.c index 0dee8ccc7e..2a99bac8fe 100644 --- a/sysdeps/unix/sysv/linux/mips/sigaction.c +++ b/sysdeps/unix/sysv/linux/mips/sigaction.c @@ -41,6 +41,15 @@ extern int __syscall_sigaction (int, const struct old_kernel_sigaction *__unboun extern int __syscall_rt_sigaction (int, const struct kernel_sigaction *__unbounded, struct kernel_sigaction *__unbounded, size_t); +#if _MIPS_SIM != _MIPS_SIM_ABI32 + +# ifdef __NR_rt_sigreturn +static void restore_rt (void) asm ("__restore_rt"); +# endif +# ifdef __NR_sigreturn +static void restore (void) asm ("__restore"); +# endif +#endif /* If ACT is not NULL, change the action for SIG to *ACT. If OACT is not NULL, put the old action for SIG in *OACT. */ @@ -74,7 +83,11 @@ __libc_sigaction (sig, act, oact) memcpy (&kact.sa_mask, &act->sa_mask, sizeof (kernel_sigset_t)); kact.sa_flags = act->sa_flags; # ifdef HAVE_SA_RESTORER +# if _MIPS_SIM == _MIPS_SIM_ABI32 kact.sa_restorer = act->sa_restorer; +# else + kact.sa_restorer = &restore_rt; +# endif # endif } @@ -128,7 +141,11 @@ __libc_sigaction (sig, act, oact) oact->sa_mask.__val[0] = k_osigact.sa_mask; oact->sa_flags = k_osigact.sa_flags; # ifdef HAVE_SA_RESTORER +# if _MIPS_SIM == _MIPS_SIM_ABI32 oact->sa_restorer = k_osigact.sa_restorer; +# else + oact->sa_restorer = &restore; +# endif # endif } return result; @@ -141,3 +158,31 @@ weak_alias (__libc_sigaction, __sigaction) libc_hidden_weak (__sigaction) weak_alias (__libc_sigaction, sigaction) #endif + +/* NOTE: Please think twice before making any changes to the bits of + code below. GDB needs some intimate knowledge about it to + recognize them as signal trampolines, and make backtraces through + signal handlers work right. Important are both the names + (__restore_rt) and the exact instruction sequence. + If you ever feel the need to make any changes, please notify the + appropriate GDB maintainer. */ + +#define RESTORE(name, syscall) RESTORE2 (name, syscall) +#define RESTORE2(name, syscall) \ +asm \ + ( \ + ".align 4\n" \ + "__" #name ":\n" \ + " li $2, " #syscall "\n" \ + " syscall\n" \ + ); + +/* The return code for realtime-signals. */ +#if _MIPS_SIM != _MIPS_SIM_ABI32 +# ifdef __NR_rt_sigreturn +RESTORE (restore_rt, __NR_rt_sigreturn) +# endif +# ifdef __NR_sigreturn +RESTORE (restore, __NR_sigreturn) +# endif +#endif From d2e29db72203632d480042957765a8d6c2a454ee Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Fri, 14 Mar 2003 07:52:05 +0000 Subject: [PATCH 3059/4487] * sysdeps/unix/sysv/linux/mips/readelflib.c: New file. --- sysdeps/unix/sysv/linux/mips/readelflib.c | 71 +++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/mips/readelflib.c diff --git a/sysdeps/unix/sysv/linux/mips/readelflib.c b/sysdeps/unix/sysv/linux/mips/readelflib.c new file mode 100644 index 0000000000..73fd43f46f --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/readelflib.c @@ -0,0 +1,71 @@ +/* Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Alexandre Oliva + Based on work ../x86_64/readelflib.c, + contributed by Andreas Jaeger , 1999 and + Jakub Jelinek , 1999. + + 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. */ + + +int process_elf32_file (const char *file_name, const char *lib, int *flag, + unsigned int *osversion, char **soname, + void *file_contents, size_t file_length); +int process_elf64_file (const char *file_name, const char *lib, int *flag, + unsigned int *osversion, char **soname, + void *file_contents, size_t file_length); + +/* Returns 0 if everything is ok, != 0 in case of error. */ +int +process_elf_file (const char *file_name, const char *lib, int *flag, + unsigned int *osversion, char **soname, void *file_contents, + size_t file_length) +{ + ElfW(Ehdr) *elf_header = (ElfW(Ehdr) *) file_contents; + int ret; + + if (elf_header->e_ident [EI_CLASS] == ELFCLASS32) + { + ret = process_elf32_file (file_name, lib, flag, osversion, soname, + file_contents, file_length); + + /* n32 libraries are always libc.so.6+. */ + if (ret && (elf_header->e_flags & EF_MIPS_ABI2) != 0) + *flag = FLAG_MIPS64_LIBN32|FLAG_ELF_LIBC6; + } + else + { + ret = process_elf64_file (file_name, lib, flag, osversion, soname, + file_contents, file_length); + /* n64 libraries are always libc.so.6+. */ + if (!ret) + *flag = FLAG_MIPS64_LIBN64|FLAG_ELF_LIBC6; + } + + return ret; +} + +#undef __ELF_NATIVE_CLASS +#undef process_elf_file +#define process_elf_file process_elf32_file +#define __ELF_NATIVE_CLASS 32 +#include "sysdeps/generic/readelflib.c" + +#undef __ELF_NATIVE_CLASS +#undef process_elf_file +#define process_elf_file process_elf64_file +#define __ELF_NATIVE_CLASS 64 +#include "sysdeps/generic/readelflib.c" From 0d5b725772d11d8ad335d1948f490a81593cc03d Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Fri, 14 Mar 2003 08:43:13 +0000 Subject: [PATCH 3060/4487] * sysdeps/mips/dl-machine.h: Include sys/asm.h. (elf_machine_matches_host): Prevent linking of o32 and n32 together. (elf_machine_dynamic): Document assumption on $gp. (STRINGXP, STRINGXV, STRINGV_): New macros. (elf_machine_load_address): Use them to stringize PTR_LA and PTR_SUBU. (ELF_DL_FRAME_SIZE, ELF_DL_SAVE_ARG_REGS, ELF_DL_RESTORE_ARG_REGS, IFABIO32): New macros used in... (_dl_runtime_resolve): Adjust it for all 3 ABIs. (__dl_runtime_resolve): Cast the symtab initializer to the right type. (RTLD_START): Use it. Adjust it for all 3 ABIs. (elf_machine_rel): Mark as always_inline in RTLD_BOOTSTRAP. Handle 64-bit R_MIPS_REL composite relocation and accept R_MIPS_64 relocations to shift addend size to 64 bits. Document assumption regarding local GOT entries. Document backward-compatibility departing from the ABI behavior in applying relocations that reference section symbols, no longer used. Support relocations to mis-aligned offsets. * sysdeps/mips/mips64/dl-machine.h: Deleted, obsolete. --- sysdeps/mips/dl-machine.h | 221 ++++++++---- sysdeps/mips/mips64/dl-machine.h | 594 ------------------------------- 2 files changed, 159 insertions(+), 656 deletions(-) delete mode 100644 sysdeps/mips/mips64/dl-machine.h diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index c4864c21d2..62c3f20736 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -32,6 +32,8 @@ #error ENTRY_POINT needs to be defined for MIPS. #endif +#include + /* The offset of gp from GOT might be system-dependent. It's set by ld. The same value is also */ #define OFFSET_GP_GOT 0x7ff0 @@ -72,6 +74,13 @@ do { if ((l)->l_info[DT_MIPS (RLD_MAP)]) \ static inline int __attribute_used__ elf_machine_matches_host (const ElfW(Ehdr) *ehdr) { +#if _MIPS_SIM == _MIPS_SIM_ABI32 || _MIPS_SIM == _MIPS_SIM_NABI32 + /* Don't link o32 and n32 together. */ + if (((ehdr->e_flags & EF_MIPS_ABI2) != 0) + != (_MIPS_SIM != _MIPS_SIM_ABI32)) + return 0; +#endif + switch (ehdr->e_machine) { case EM_MIPS: @@ -91,7 +100,7 @@ elf_mips_got_from_gpreg (ElfW(Addr) gpreg) /* Return the link-time address of _DYNAMIC. Conveniently, this is the first element of the GOT. This must be inlined in a function which - uses global data. */ + uses global data. We assume its $gp points to the primary GOT. */ static inline ElfW(Addr) elf_machine_dynamic (void) { @@ -99,6 +108,9 @@ elf_machine_dynamic (void) return *elf_mips_got_from_gpreg (gp); } +#define STRINGXP(X) __STRING(X) +#define STRINGXV(X) STRINGV_(X) +#define STRINGV_(...) # __VA_ARGS__ /* Return the run-time load address of the shared object. */ static inline ElfW(Addr) @@ -106,10 +118,10 @@ elf_machine_load_address (void) { ElfW(Addr) addr; asm (" .set noreorder\n" - " la %0, here\n" - " bltzal $0, here\n" + " " STRINGXP (PTR_LA) " %0, 0f\n" + " bltzal $0, 0f\n" " nop\n" - "here: subu %0, $31, %0\n" + "0: " STRINGXP (PTR_SUBU) " %0, $31, %0\n" " .set reorder\n" : "=r" (addr) : /* No inputs */ @@ -242,6 +254,55 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc) return NULL; } +#if _MIPS_SIM == _MIPS_SIM_ABI32 +#define ELF_DL_FRAME_SIZE 40 + +#define ELF_DL_SAVE_ARG_REGS "\ + sw $15, 36($29)\n \ + sw $4, 16($29)\n \ + sw $5, 20($29)\n \ + sw $6, 24($29)\n \ + sw $7, 28($29)\n \ +" + +#define ELF_DL_RESTORE_ARG_REGS "\ + lw $31, 36($29)\n \ + lw $4, 16($29)\n \ + lw $5, 20($29)\n \ + lw $6, 24($29)\n \ + lw $7, 28($29)\n \ +" + +#define IFABIO32(X) X + +#else /* _MIPS_SIM == _MIPS_SIM_NABI32 || _MIPS_SIM == _MIPS_SIM_ABI64 */ + +#define ELF_DL_FRAME_SIZE 64 + +#define ELF_DL_SAVE_ARG_REGS "\ + sd $15, 56($29)\n \ + sd $4, 8($29)\n \ + sd $5, 16($29)\n \ + sd $6, 24($29)\n \ + sd $7, 32($29)\n \ + sd $8, 40($29)\n \ + sd $9, 48($29)\n \ +" + +#define ELF_DL_RESTORE_ARG_REGS "\ + ld $31, 56($29)\n \ + ld $4, 8($29)\n \ + ld $5, 16($29)\n \ + ld $6, 24($29)\n \ + ld $7, 32($29)\n \ + ld $8, 40($29)\n \ + ld $9, 48($29)\n \ +" + +#define IFABIO32(X) + +#endif + /* Define mips specific runtime resolver. The function __dl_runtime_resolve is called from assembler function _dl_runtime_resolve which converts special argument registers t7 ($15) and t8 ($24): @@ -272,9 +333,8 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \ { \ struct link_map *l = elf_machine_runtime_link_map (old_gpreg, stub_pc); \ const ElfW(Sym) *const symtab \ - = (const void *) D_PTR (l, l_info[DT_SYMTAB]); \ - const char *strtab \ - = (const void *) D_PTR (l, l_info[DT_STRTAB]); \ + = (const ElfW(Sym) *) D_PTR (l, l_info[DT_SYMTAB]); \ + const char *strtab = (const void *) D_PTR (l, l_info[DT_STRTAB]); \ ElfW(Addr) *got \ = (ElfW(Addr) *) D_PTR (l, l_info[DT_PLTGOT]); \ const ElfW(Word) local_gotno \ @@ -333,36 +393,30 @@ asm ("\n \ .type _dl_runtime_resolve,@function\n \ .ent _dl_runtime_resolve\n \ _dl_runtime_resolve:\n \ - .frame $29, 40, $31\n \ + .frame $29, " STRINGXP(ELF_DL_FRAME_SIZE) ", $31\n \ .set noreorder\n \ # Save GP.\n \ move $3, $28\n \ + # Save arguments and sp value in stack.\n \ + " STRINGXP(PTR_SUBIU) " $29, " STRINGXP(ELF_DL_FRAME_SIZE) "\n \ # Modify t9 ($25) so as to point .cpload instruction.\n \ - addu $25, 8\n \ + " IFABIO32(STRINGXP(PTR_ADDIU) " $25, 12\n") " \ # Compute GP.\n \ - .cpload $25\n \ + " STRINGXP(SETUP_GP) "\n \ + " STRINGXV(SETUP_GP64 (0, _dl_runtime_resolve)) "\n \ .set reorder\n \ # Save slot call pc.\n \ move $2, $31\n \ - # Save arguments and sp value in stack.\n \ - subu $29, 40\n \ - .cprestore 32\n \ - sw $15, 36($29)\n \ - sw $4, 16($29)\n \ - sw $5, 20($29)\n \ - sw $6, 24($29)\n \ - sw $7, 28($29)\n \ + " IFABIO32(STRINGXP(CPRESTORE(32))) "\n \ + " ELF_DL_SAVE_ARG_REGS " \ move $4, $24\n \ move $5, $15\n \ move $6, $3\n \ move $7, $2\n \ jal __dl_runtime_resolve\n \ - lw $31, 36($29)\n \ - lw $4, 16($29)\n \ - lw $5, 20($29)\n \ - lw $6, 24($29)\n \ - lw $7, 28($29)\n \ - addu $29, 40\n \ + " ELF_DL_RESTORE_ARG_REGS " \ + " STRINGXP(RESTORE_GP64) "\n \ + " STRINGXP(PTR_ADDIU) " $29, " STRINGXP(ELF_DL_FRAME_SIZE) "\n \ move $25, $2\n \ jr $25\n \ .end _dl_runtime_resolve\n \ @@ -374,7 +428,6 @@ _dl_runtime_resolve:\n \ #define ELF_MACHINE_USER_ADDRESS_MASK 0x80000000UL - /* Initial entry point code for the dynamic linker. The C function `_dl_start' is the real entry point; its return value is the user program's entry point. @@ -392,71 +445,71 @@ _dl_runtime_resolve:\n \ #define RTLD_START asm (\ ".text\n"\ - _RTLD_PROLOGUE(ENTRY_POINT)\ - ".set noreorder\n\ - bltzal $0, 0f\n\ - nop\n\ -0: .cpload $31\n\ - .set reorder\n\ + _RTLD_PROLOGUE(ENTRY_POINT) "\ + " STRINGXV(SETUP_GPX($25)) "\n\ + " STRINGXV(SETUP_GPX64($18,$25)) "\n\ # i386 ABI book says that the first entry of GOT holds\n\ # the address of the dynamic structure. Though MIPS ABI\n\ # doesn't say nothing about this, I emulate this here.\n\ - la $4, _DYNAMIC\n\ + " STRINGXP(PTR_LA) " $4, _DYNAMIC\n\ # Subtract OFFSET_GP_GOT\n\ - sw $4, -0x7ff0($28)\n\ + " STRINGXP(PTR_S) " $4, -0x7ff0($28)\n\ move $4, $29\n\ - subu $29, 16\n\ + " STRINGXP(PTR_SUBIU) " $29, 16\n\ \n\ - la $8, coff\n\ - bltzal $8, coff\n\ -coff: subu $8, $31, $8\n\ + " STRINGXP(PTR_LA) " $8, .Lcoff\n\ + bltzal $8, .Lcoff\n\ +.Lcoff: " STRINGXP(PTR_SUBU) " $8, $31, $8\n\ \n\ - la $25, _dl_start\n\ - addu $25, $8\n\ + " STRINGXP(PTR_LA) " $25, _dl_start\n\ + " STRINGXP(PTR_ADDU) " $25, $8\n\ jalr $25\n\ \n\ - addiu $29, 16\n\ + " STRINGXP(PTR_ADDIU) " $29, 16\n\ # Get the value of label '_dl_start_user' in t9 ($25).\n\ - la $25, _dl_start_user\n\ + " STRINGXP(PTR_LA) " $25, _dl_start_user\n\ .globl _dl_start_user\n\ + .type _dl_start_user,@function\n\ + .ent _dl_start_user\n\ _dl_start_user:\n\ - .set noreorder\n\ - .cpload $25\n\ - .set reorder\n\ + " STRINGXP(SETUP_GP) "\n\ + " STRINGXV(SETUP_GP64($18,_dl_start_user)) "\n\ move $16, $28\n\ # Save the user entry point address in a saved register.\n\ move $17, $2\n\ # Store the highest stack address\n\ - sw $29, __libc_stack_end\n\ + " STRINGXP(PTR_S) " $29, __libc_stack_end\n\ # See if we were run as a command with the executable file\n\ # name as an extra leading argument.\n\ lw $2, _dl_skip_args\n\ beq $2, $0, 1f\n\ # Load the original argument count.\n\ - lw $4, 0($29)\n\ + " STRINGXP(PTR_L) " $4, 0($29)\n\ # Subtract _dl_skip_args from it.\n\ subu $4, $2\n\ # Adjust the stack pointer to skip _dl_skip_args words.\n\ - sll $2, 2\n\ - addu $29, $2\n\ + sll $2, " STRINGXP (PTRLOG) "\n\ + " STRINGXP(PTR_ADDU) " $29, $2\n\ # Save back the modified argument count.\n\ - sw $4, 0($29)\n\ + " STRINGXP(PTR_S) " $4, 0($29)\n\ 1: # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env) \n\ - lw $4, _rtld_local\n\ - lw $5, 0($29)\n\ - la $6, 4($29)\n\ - sll $7, $5, 2\n\ - addu $7, $7, $6\n\ - addu $7, $7, 4\n\ - subu $29, 16\n\ + " STRINGXP(PTR_L) " $4, _rtld_local\n\ + " STRINGXP(PTR_L) /* or lw??? fixme */ " $5, 0($29)\n\ + " STRINGXP(PTR_LA) " $6, " STRINGXP (PTRSIZE) "($29)\n\ + sll $7, $5, " STRINGXP (PTRLOG) "\n\ + " STRINGXP(PTR_ADDU) " $7, $7, $6\n\ + " STRINGXP(PTR_ADDU) " $7, $7, " STRINGXP (PTRSIZE) " \n\ + " STRINGXP(PTR_SUBIU) " $29, 32\n\ + " STRINGXP(SAVE_GP(16)) "\n\ # Call the function to run the initializers.\n\ jal _dl_init_internal\n\ - addiu $29, 16\n\ + " STRINGXP(PTR_ADDIU) " $29, 32\n\ # Pass our finalizer function to the user in $2 as per ELF ABI.\n\ - la $2, _dl_fini\n\ + " STRINGXP(PTR_LA) " $2, _dl_fini\n\ # Jump to the user entry point.\n\ move $25, $17\n\ - jr $25\n\t"\ + jr $25\n\ + .end _dl_start_user\n\t"\ _RTLD_EPILOGUE(ENTRY_POINT)\ ".previous"\ ); @@ -472,6 +525,9 @@ _dl_start_user:\n\ MAP is the object containing the reloc. */ static inline void +#ifdef RTLD_BOOTSTRAP + __attribute__ ((always_inline)) +#endif elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, const ElfW(Sym) *sym, const struct r_found_version *version, ElfW(Addr) *const reloc_addr) @@ -490,9 +546,19 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, switch (r_type) { +#if _MIPS_SIM == _MIPS_SIM_ABI64 + case (R_MIPS_64 << 8) | R_MIPS_REL32: +#else case R_MIPS_REL32: +#endif { int symidx = ELFW(R_SYM) (reloc->r_info); + ElfW(Addr) reloc_value; + + /* Support relocations on mis-aligned offsets. Should we ever + implement RELA, this should be replaced with an assignment + from reloc->r_addend. */ + __builtin_memcpy (&reloc_value, reloc_addr, sizeof (reloc_value)); if (symidx) { @@ -501,10 +567,25 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, if (symidx < gotsym) { + /* This wouldn't work for a symbol imported from other + libraries for which there's no GOT entry, but MIPS + requires every symbol referenced in a dynamic + relocation to have a GOT entry in the primary GOT, + so we only get here for locally-defined symbols. + For section symbols, we should *NOT* be adding + sym->st_value (per the definition of the meaning of + S in reloc expressions in the ELF64 MIPS ABI), + since it should have already been added to + reloc_value by the linker, but older versions of + GNU ld didn't add it, and newer versions don't emit + useless relocations to section symbols any more, so + it is safe to keep on adding sym->st_value, even + though it's not ABI compliant. Some day we should + bite the bullet and stop doing this. */ #ifndef RTLD_BOOTSTRAP if (map != &GL(dl_rtld_map)) #endif - *reloc_addr += sym->st_value + map->l_addr; + reloc_value += sym->st_value + map->l_addr; } else { @@ -515,7 +596,7 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, = (const ElfW(Word)) map->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; - *reloc_addr += got[symidx + local_gotno - gotsym]; + reloc_value += got[symidx + local_gotno - gotsym]; #endif } } @@ -523,11 +604,27 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, #ifndef RTLD_BOOTSTRAP if (map != &GL(dl_rtld_map)) #endif - *reloc_addr += map->l_addr; + reloc_value += map->l_addr; + + __builtin_memcpy (reloc_addr, &reloc_value, sizeof (reloc_value)); } break; case R_MIPS_NONE: /* Alright, Wilbur. */ break; +#if _MIPS_SIM == _MIPS_SIM_ABI64 + case R_MIPS_64: + /* For full compliance with the ELF64 ABI, one must precede the + _REL32/_64 pair of relocations with a _64 relocation, such + that the in-place addend is read as a 64-bit value. IRIX + didn't pick up on this requirement, so we treat the + _REL32/_64 relocation as a 64-bit relocation even if it's by + itself. For ABI compliance, we ignore such _64 dummy + relocations. For RELA, this may be simply removed, since + it's totally unnecessary. */ + if (ELFW(R_SYM) (reloc->r_info) == 0) + break; + /* Fall through. */ +#endif default: _dl_reloc_bad_type (map, r_type, 0); break; diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h deleted file mode 100644 index 64731b863a..0000000000 --- a/sysdeps/mips/mips64/dl-machine.h +++ /dev/null @@ -1,594 +0,0 @@ -/* Machine-dependent ELF dynamic relocation inline functions. MIPS64 version. - Copyright (C) 1996,1997,1999,2000,2001,2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Kazumoto Kojima . - - 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 dl_machine_h -#define dl_machine_h - -#define ELF_MACHINE_NAME "MIPS" - -#define ELF_MACHINE_NO_PLT - -#include - -#ifndef ENTRY_POINT -#error ENTRY_POINT needs to be defined for MIPS. -#endif - -#ifndef _RTLD_PROLOGUE -# define _RTLD_PROLOGUE(entry) "\n\t.globl " __STRING(entry) \ - "\n\t.ent " __STRING(entry) \ - "\n\t" __STRING(entry) ":\n\t" -#endif - -#ifndef _RTLD_EPILOGUE -# define _RTLD_EPILOGUE(entry) "\t.end " __STRING(entry) "\n" -#endif - -/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. - This makes no sense on MIPS but we have to define this to R_MIPS_REL32 - to avoid the asserts in dl-lookup.c from blowing. */ -#define ELF_MACHINE_JMP_SLOT R_MIPS_REL32 -#define elf_machine_type_class(type) ELF_RTYPE_CLASS_PLT - -/* Translate a processor specific dynamic tag to the index - in l_info array. */ -#define DT_MIPS(x) (DT_MIPS_##x - DT_LOPROC + DT_NUM) - -#if 0 -/* We may need 64k alignment. */ -#define ELF_MACHINE_ALIGN_MASK 0xffff -#endif - -/* - * MIPS libraries are usually linked to a non-zero base address. We - * subtrace the base address from the address where we map the object - * to. This results in more efficient address space usage. - */ -#if 0 -#define MAP_BASE_ADDR(l) ((l)->l_info[DT_MIPS(BASE_ADDRESS)] ? \ - (l)->l_info[DT_MIPS(BASE_ADDRESS)]->d_un.d_ptr : 0) -#else -#define MAP_BASE_ADDR(l) 0x5ffe0000 -#endif - -/* If there is a DT_MIPS_RLD_MAP entry in the dynamic section, fill it in - with the run-time address of the r_debug structure */ -#define ELF_MACHINE_DEBUG_SETUP(l,r) \ -do { if ((l)->l_info[DT_MIPS (RLD_MAP)]) \ - *(ElfW(Addr) *)((l)->l_info[DT_MIPS (RLD_MAP)]->d_un.d_ptr) = \ - (ElfW(Addr)) (r); \ - } while (0) - -/* Return nonzero iff ELF header is compatible with the running host. */ -static inline int __attribute__ ((unused)) -elf_machine_matches_host (const ElfW(Ehdr) *ehdr) -{ - switch (ehdr->e_machine) - { - case EM_MIPS: - case EM_MIPS_RS3_LE: - return 1; - default: - return 0; - } -} - -static inline ElfW(Addr) * -elf_mips_got_from_gpreg (ElfW(Addr) gpreg) -{ - /* FIXME: the offset of gp from GOT may be system-dependent. */ - return (ElfW(Addr) *) (gpreg - 0x7ff0); -} - -/* Return the link-time address of _DYNAMIC. Conveniently, this is the - first element of the GOT. This must be inlined in a function which - uses global data. */ -static inline ElfW(Addr) -elf_machine_dynamic (void) -{ - register ElfW(Addr) gp __asm__ ("$28"); - - return *elf_mips_got_from_gpreg (gp); -} - - -/* Return the run-time load address of the shared object. */ -static inline ElfW(Addr) -elf_machine_load_address (void) -{ - ElfW(Addr) addr; - asm (" .set noreorder\n" - " dla %0, here\n" - " bltzal $0, here\n" - " nop\n" - "here: dsubu %0, $31, %0\n" - " .set reorder\n" - : "=r" (addr) - : /* No inputs */ - : "$31"); - return addr; -} - -/* The MSB of got[1] of a gnu object is set to identify gnu objects. */ -#define ELF_MIPS_GNU_GOT1_MASK 0x80000000 - -/* Relocate GOT. */ -static inline void -elf_machine_got_rel (struct link_map *map, int lazy) -{ - ElfW(Addr) *got; - ElfW(Sym) *sym; - int i, n; - const char *strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]); - -#define RESOLVE_GOTSYM(sym) \ - ({ \ - const ElfW(Sym) *ref = sym; \ - ElfW(Addr) sym_loadaddr; \ - sym_loadaddr = _dl_lookup_symbol (strtab + sym->st_name, &ref, \ - map->l_scope, \ - map->l_name, R_MIPS_REL32);\ - (ref)? sym_loadaddr + ref->st_value: 0; \ - }) - - got = (ElfW(Addr) *) D_PTR (map, l_info[DT_PLTGOT]); - - /* got[0] is reserved. got[1] is also reserved for the dynamic object - generated by gnu ld. Skip these reserved entries from relocation. */ - i = (got[1] & ELF_MIPS_GNU_GOT1_MASK)? 2: 1; - n = map->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; - /* Add the run-time display to all local got entries. */ - while (i < n) - got[i++] += map->l_addr; - - /* Handle global got entries. */ - got += n; - sym = (ElfW(Sym) *) D_PTR (map, l_info[DT_SYMTAB]); - sym += map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val; - i = (map->l_info[DT_MIPS (SYMTABNO)]->d_un.d_val - - map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val); - - while (i--) - { - if (sym->st_shndx == SHN_UNDEF) - { - if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC) - { - if (sym->st_value && lazy) - *got = sym->st_value + map->l_addr; - else - *got = RESOLVE_GOTSYM (sym); - } - else /* if (*got == 0 || *got == QS) */ - *got = RESOLVE_GOTSYM (sym); - } - else if (sym->st_shndx == SHN_COMMON) - *got = RESOLVE_GOTSYM (sym); - else if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC - && *got != sym->st_value - && lazy) - *got += map->l_addr; - else if (ELFW(ST_TYPE) (sym->st_info) == STT_SECTION) - { - if (sym->st_other == 0) - *got += map->l_addr; - } - else - *got = RESOLVE_GOTSYM (sym); - - got++; - sym++; - } - -#undef RESOLVE_GOTSYM - - return; -} - -/* Set up the loaded object described by L so its stub function - will jump to the on-demand fixup code in dl-runtime.c. */ - -static inline int -elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) -{ - ElfW(Addr) *got; - extern void _dl_runtime_resolve (ElfW(Word)); - extern int _dl_mips_gnu_objects; - -#ifdef RTLD_BOOTSTRAP - { - return lazy; - } -#endif - if (lazy) - { - /* The GOT entries for functions have not yet been filled in. - Their initial contents will arrange when called to put an - offset into the .dynsym section in t8, the return address - in t7 and then jump to _GLOBAL_OFFSET_TABLE[0]. */ - got = (ElfW(Addr) *) D_PTR (l, l_info[DT_PLTGOT]); - - /* This function will get called to fix up the GOT entry indicated by - the register t8, and then jump to the resolved address. */ - got[0] = (ElfW(Addr)) &_dl_runtime_resolve; - - /* Store l to _GLOBAL_OFFSET_TABLE[1] for gnu object. The MSB - of got[1] of a gnu object is set to identify gnu objects. - Where we can store l for non gnu objects? XXX */ - if ((got[1] & ELF_MIPS_GNU_GOT1_MASK) != 0) - got[1] = (ElfW(Addr)) ((unsigned) l | ELF_MIPS_GNU_GOT1_MASK); - else - _dl_mips_gnu_objects = 0; - } - - /* Relocate global offset table. */ - elf_machine_got_rel (l, lazy); - - return lazy; -} - -/* Get link_map for this object. */ -static inline struct link_map * -elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc) -{ - extern int _dl_mips_gnu_objects; - - /* got[1] is reserved to keep its link map address for the shared - object generated by the gnu linker. If all are such objects, we - can find the link map from current GPREG simply. If not so, get - the link map for caller's object containing STUB_PC. */ - - if (_dl_mips_gnu_objects) - { - ElfW(Addr) *got = elf_mips_got_from_gpreg (gpreg); - ElfW(Word) g1; - - g1 = ((ElfW(Word) *) got)[1]; - - if ((g1 & ELF_MIPS_GNU_GOT1_MASK) != 0) - { - struct link_map *l = - (struct link_map *) (g1 & ~ELF_MIPS_GNU_GOT1_MASK); - ElfW(Addr) base, limit; - const ElfW(Phdr) *p = l->l_phdr; - ElfW(Half) this, nent = l->l_phnum; - - /* For the common case of a stub being called from the containing - object, STUB_PC will point to somewhere within the object that - is described by the link map fetched via got[1]. Otherwise we - have to scan all maps. */ - for (this = 0; this < nent; this++) - { - if (p[this].p_type == PT_LOAD) - { - base = p[this].p_vaddr + l->l_addr; - limit = base + p[this].p_memsz; - if (stub_pc >= base && stub_pc < limit) - return l; - } - this++; - } - } - } - - { - struct link_map *l = GL(dl_loaded); - - while (l) - { - ElfW(Addr) base, limit; - const ElfW(Phdr) *p = l->l_phdr; - ElfW(Half) this, nent = l->l_phnum; - - for (this = 0; this < nent; this++) - { - if (p[this].p_type == PT_LOAD) - { - base = p[this].p_vaddr + l->l_addr; - limit = base + p[this].p_memsz; - if (stub_pc >= base && stub_pc < limit) - return l; - } - } - l = l->l_next; - } - } - - _dl_signal_error (0, NULL, NULL, "cannot find runtime link map"); - return NULL; -} - -/* Mips has no PLT but define elf_machine_relplt to be elf_machine_rel. */ -#define elf_machine_relplt elf_machine_rel - -/* Define mips specific runtime resolver. The function __dl_runtime_resolve - is called from assembler function _dl_runtime_resolve which converts - special argument registers t7 ($15) and t8 ($24): - t7 address to return to the caller of the function - t8 index for this function symbol in .dynsym - to usual c arguments. */ - -#define ELF_MACHINE_RUNTIME_TRAMPOLINE \ -/* The flag _dl_mips_gnu_objects is set if all dynamic objects are \ - generated by the gnu linker. */ \ -int _dl_mips_gnu_objects = 1; \ - \ -/* This is called from assembly stubs below which the compiler can't see. */ \ -static ElfW(Addr) \ -__dl_runtime_resolve (ElfW(Word), ElfW(Word), ElfW(Addr), ElfW(Addr)) \ - __attribute__ ((unused)); \ - \ -static ElfW(Addr) \ -__dl_runtime_resolve (ElfW(Word) sym_index, \ - ElfW(Word) return_address, \ - ElfW(Addr) old_gpreg, \ - ElfW(Addr) stub_pc) \ -{ \ - struct link_map *l = elf_machine_runtime_link_map (old_gpreg, stub_pc); \ - const ElfW(Sym) *const symtab \ - = (const ElfW(Sym) *) D_PTR (l, l_info[DT_SYMTAB]); \ - const char *strtab = (const void *) D_PTR (l, l_info[DT_STRTAB]); \ - const ElfW(Addr) *got \ - = (const ElfW(Addr) *) D_PTR (l, l_info[DT_PLTGOT]); \ - const ElfW(Word) local_gotno \ - = (const ElfW(Word)) l->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; \ - const ElfW(Word) gotsym \ - = (const ElfW(Word)) l->l_info[DT_MIPS (GOTSYM)]->d_un.d_val; \ - const ElfW(Sym) *definer; \ - ElfW(Addr) loadbase; \ - ElfW(Addr) funcaddr; \ - \ - /* Look up the symbol's run-time value. */ \ - definer = &symtab[sym_index]; \ - \ - loadbase = _dl_lookup_symbol (strtab + definer->st_name, &definer, \ - l->l_scope, l->l_name, \ - R_MIPS_REL32); \ - \ - /* Apply the relocation with that value. */ \ - funcaddr = loadbase + definer->st_value; \ - *(got + local_gotno + sym_index - gotsym) = funcaddr; \ - \ - return funcaddr; \ -} \ - \ -asm ("\n \ - .text\n \ - .align 3\n \ - .globl _dl_runtime_resolve\n \ - .type _dl_runtime_resolve,@function\n \ - .ent _dl_runtime_resolve\n \ -_dl_runtime_resolve:\n \ - .set noreorder\n \ - # Save old GP to $3.\n \ - move $3,$28\n \ - # Modify t9 ($25) so as to point .cpload instruction.\n \ - daddu $25,2*8\n \ - # Compute GP.\n \ - .cpload $25\n \ - .set reorder\n \ - # Save slot call pc.\n \ - move $2, $31\n \ - # Save arguments and sp value in stack.\n \ - dsubu $29, 10*8\n \ - .cprestore 8*8\n \ - sd $15, 9*8($29)\n \ - sd $4, 3*8($29)\n \ - sd $5, 4*8($29)\n \ - sd $6, 5*8($29)\n \ - sd $7, 6*8($29)\n \ - sd $16, 7*8($29)\n \ - move $16, $29\n \ - move $4, $24\n \ - move $5, $15\n \ - move $6, $3\n \ - move $7, $2\n \ - jal __dl_runtime_resolve\n \ - move $29, $16\n \ - ld $31, 9*8($29)\n \ - ld $4, 3*8($29)\n \ - ld $5, 4*8($29)\n \ - ld $6, 5*8($29)\n \ - ld $7, 6*8($29)\n \ - ld $16, 7*8($29)\n \ - daddu $29, 10*8\n \ - move $25, $2\n \ - jr $25\n \ - .end _dl_runtime_resolve\n \ - .previous\n \ -"); - -/* Mask identifying addresses reserved for the user program, - where the dynamic linker should not map anything. */ -#define ELF_MACHINE_USER_ADDRESS_MASK 0x80000000UL - - - -/* Initial entry point code for the dynamic linker. - The C function `_dl_start' is the real entry point; - its return value is the user program's entry point. - Note how we have to be careful about two things: - - 1) That we allocate a minimal stack of 24 bytes for - every function call, the MIPS ABI states that even - if all arguments are passed in registers the procedure - called can use the 16 byte area pointed to by $sp - when it is called to store away the arguments passed - to it. - - 2) That under Linux the entry is named __start - and not just plain _start. */ - -#define RTLD_START asm ("\ - .text\n\ - .align 3\n"\ -_RTLD_PROLOGUE (ENTRY_POINT)\ -" .globl _dl_start_user\n\ - .set noreorder\n\ - bltzal $0, 0f\n\ - nop\n\ -0: .cpload $31\n\ - .set reorder\n\ - # i386 ABI book says that the first entry of GOT holds\n\ - # the address of the dynamic structure. Though MIPS ABI\n\ - # doesn't say nothing about this, I emulate this here.\n\ - dla $4, _DYNAMIC\n\ - sd $4, -0x7ff0($28)\n\ - dsubu $29, 16\n\ - move $4, $29\n\ - jal _dl_start\n\ - daddiu $29, 16\n\ - # Get the value of label '_dl_start_user' in t9 ($25).\n\ - dla $25, _dl_start_user\n\ -_dl_start_user:\n\ - .set noreorder\n\ - .cpload $25\n\ - .set reorder\n\ - move $16, $28\n\ - # Save the user entry point address in saved register.\n\ - move $17, $2\n\ - # Store the highest stack address\n\ - sd $29, __libc_stack_end\n\ - # See if we were run as a command with the executable file\n\ - # name as an extra leading argument.\n\ - ld $2, _dl_skip_args\n\ - beq $2, $0, 1f\n\ - # Load the original argument count.\n\ - ld $4, 0($29)\n\ - # Subtract _dl_skip_args from it.\n\ - dsubu $4, $2\n\ - # Adjust the stack pointer to skip _dl_skip_args words.\n\ - dsll $2,2\n\ - daddu $29, $2\n\ - # Save back the modified argument count.\n\ - sd $4, 0($29)\n\ -1: # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env) \n\ - ld $4, _rtld_local\n\ - ld $5, 0($29)\n\ - dla $6, 4($29)\n\ - dla $7, 8($29)\n\ - dsubu $29, 16\n\ - # Call the function to run the initializers.\n\ - jal _dl_init_internal\n\ - daddiu $29, 16\n\ - # Pass our finalizer function to the user in ra.\n\ - dla $31, _dl_fini\n\ - # Jump to the user entry point.\n\ -1: # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env) \n\ - lw $4, _rtld_local\n\ - lw $5, 0($29)\n\ - la $6, 4($29)\n\ - la $7, 8($29)\n\ - subu $29, 16\n\ - # Call the function to run the initializers.\n\ - jal _dl_init_internal\n\ - addiu $29, 16\n\ - # Pass our finalizer function to the user in ra.\n\ - dla $31, _dl_fini\n\ - # Jump to the user entry point.\n\ - move $25, $17\n\ - ld $4, 0($29)\n\ - ld $5, 1*8($29)\n\ - ld $6, 2*8$29)\n\ - ld $7, 3*8($29)\n\ - jr $25\n"\ -_RTLD_EPILOGUE(ENTRY_POINT) \ - "\n.previous"\ -); - - -/* The MIPS never uses Elfxx_Rela relocations. */ -#define ELF_MACHINE_NO_RELA 1 - -#endif /* !dl_machine_h */ - -#ifdef RESOLVE - -/* Perform the relocation specified by RELOC and SYM (which is fully resolved). - MAP is the object containing the reloc. */ - -static inline void -elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, - const ElfW(Sym) *sym, const struct r_found_version *version, - ElfW(Addr) *const reloc_addr) -{ - const unsigned long int r_type = ELFW(R_TYPE) (reloc->r_info); - ElfW(Addr) loadbase; - ElfW(Addr) undo __attribute__ ((unused)); - - switch (r_type) - { - case R_MIPS_REL32: - { - ElfW(Addr) undo = 0; - - if (ELFW(ST_BIND) (sym->st_info) == STB_LOCAL - && (ELFW(ST_TYPE) (sym->st_info) == STT_SECTION - || ELFW(ST_TYPE) (sym->st_info) == STT_NOTYPE)) - { - *reloc_addr += map->l_addr; - break; - } -#ifndef RTLD_BOOTSTRAP - /* This is defined in rtld.c, but nowhere in the static libc.a; - make the reference weak so static programs can still link. This - declaration cannot be done when compiling rtld.c (i.e. #ifdef - RTLD_BOOTSTRAP) because rtld.c contains the common defn for - _dl_rtld_map, which is incompatible with a weak decl in the same - file. */ -# ifndef SHARED - weak_extern (GL(dl_rtld_map)); -# endif - if (map == &GL(dl_rtld_map)) - /* Undo the relocation done here during bootstrapping. Now we will - relocate it anew, possibly using a binding found in the user - program or a loaded library rather than the dynamic linker's - built-in definitions used while loading those libraries. */ - undo = map->l_addr + sym->st_value; -#endif - loadbase = RESOLVE (&sym, version, 0); - *reloc_addr += (sym ? (loadbase + sym->st_value) : 0) - undo; - } - break; -#ifndef RTLD_BOOTSTRAP - case R_MIPS_NONE: /* Alright, Wilbur. */ - break; -#endif - default: - _dl_reloc_bad_type (map, r_type, 0); - break; - } -} - -static inline void -elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc, - ElfW(Addr) *const reloc_addr) -{ - /* XXX Nothing to do. There is no relative relocation, right? */ -} - -static inline void -elf_machine_lazy_rel (struct link_map *map, ElfW(Addr) l_addr, - const ElfW(Rel) *reloc) -{ - /* Do nothing. */ -} - -#endif /* RESOLVE */ From b1a0b02eb4ac8b89edb7c24598820332052ae982 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Fri, 14 Mar 2003 11:06:32 +0000 Subject: [PATCH 3061/4487] * sysdeps/mips/sys/asm.h: Formatting changes. (PTR, PTRSIZE, PTRLOG): Adjust for all 3 ABIs. (CPADD): Define for all of them. (SETUP_GP, SETUP_GPX, SETUP_GPX_L, SAVE_GP, SETUP_GP64, SETUP_GPX64, SETUP_GPX64_L, RESTORE_GP64, USE_ALT_CP, NARGSAVE): Define per ABI spec. (END): Don't redefine. (LONG_SLL, LONG_SLLV, LONG_SRL, LONG_SRLV, LONG_SRA, LONG_SRAV): Remove duplicate definitions. (PTR_ADD, PTR_ADDI, PTR_ADDU, PTR_ADDIU, PTR_SUB, PTR_SUBI, PTR_SUBU, PTR_SUBIU, PTR_L, PTR_S, PTR_SLL, PTR_SLLV, PTR_SRL, PTR_SRLV, PTR_SRA, PTR_SRAV, PTR_SCALESHIFT): Define for n32. (PTR_LA): Define for all 3 ABIs. --- sysdeps/mips/sys/asm.h | 421 +++++++++++++++++++++++++---------------- 1 file changed, 258 insertions(+), 163 deletions(-) diff --git a/sysdeps/mips/sys/asm.h b/sysdeps/mips/sys/asm.h index 1e5ea9a9b7..0ebf561a15 100644 --- a/sysdeps/mips/sys/asm.h +++ b/sysdeps/mips/sys/asm.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ralf Baechle . @@ -23,12 +23,12 @@ #include #ifndef CAT -#ifdef __STDC__ -#define __CAT(str1,str2) str1##str2 -#else -#define __CAT(str1,str2) str1/**/str2 -#endif -#define CAT(str1,str2) __CAT(str1,str2) +# ifdef __STDC__ +# define __CAT(str1,str2) str1##str2 +# else +# define __CAT(str1,str2) str1/**/str2 +# endif +# define CAT(str1,str2) __CAT(str1,str2) #endif /* @@ -37,25 +37,112 @@ * 64 bit address space isn't used yet, so we may use the R3000 32 bit * defines for now. */ -#define PTR .word -#define PTRSIZE 4 -#define PTRLOG 2 +#if (_MIPS_SIM == _MIPS_SIM_ABI32) || (_MIPS_SIM == _MIPS_SIM_NABI32) +# define PTR .word +# define PTRSIZE 4 +# define PTRLOG 2 +#elif (_MIPS_SIM == _MIPS_SIM_ABI64) +# define PTR .dword +# define PTRSIZE 8 +# define PTRLOG 3 +#endif /* * PIC specific declarations */ -#ifdef __PIC__ -#define CPRESTORE(register) \ +#if (_MIPS_SIM == _MIPS_SIM_ABI32) +# ifdef __PIC__ +# define CPRESTORE(register) \ .cprestore register -#define CPADD(register) \ +# define CPLOAD(register) \ + .cpload register +# else +# define CPRESTORE(register) +# define CPLOAD(register) +# endif + +# define CPADD(register) \ .cpadd register -#define CPLOAD(register) \ - .cpload register -#else -#define CPRESTORE(register) -#define CPADD(register) -#define CPLOAD(register) + +/* + * Set gp when at 1st instruction + */ +# define SETUP_GP \ + .set noreorder; \ + .cpload $25; \ + .set reorder +/* Set gp when not at 1st instruction */ +# define SETUP_GPX(r) \ + .set noreorder; \ + move r, $31; /* Save old ra. */ \ + bal 10f; /* Find addr of cpload. */ \ + nop; \ +10: \ + .cpload $31; \ + move $31, r; \ + .set reorder +# define SETUP_GPX_L(r, l) \ + .set noreorder; \ + move r, $31; /* Save old ra. */ \ + bal l; /* Find addr of cpload. */ \ + nop; \ +l: \ + .cpload $31; \ + move $31, r; \ + .set reorder +# define SAVE_GP(x) \ + .cprestore x /* Save gp trigger t9/jalr conversion. */ +# define SETUP_GP64(a, b) +# define SETUP_GPX64(a, b) +# define SETUP_GPX64_L(cp_reg, ra_save, l) +# define RESTORE_GP64 +# define USE_ALT_CP(a) +#else /* (_MIPS_SIM == _MIPS_SIM_ABI64) || (_MIPS_SIM == _MIPS_SIM_NABI32) */ +/* + * For callee-saved gp calling convention: + */ +# define SETUP_GP +# define SETUP_GPX(r) +# define SETUP_GPX_L(r, l) +# define SAVE_GP(x) + +# define SETUP_GP64(gpoffset, proc) \ + .cpsetup $25, gpoffset, proc +# define SETUP_GPX64(cp_reg, ra_save) \ + move ra_save, $31; /* Save old ra. */ \ + .set noreorder; \ + bal 10f; /* Find addr of .cpsetup. */ \ + nop; \ +10: \ + .set reorder; \ + .cpsetup $31, cp_reg, 10b; \ + move $31, ra_save +# define SETUP_GPX64_L(cp_reg, ra_save, l) \ + move ra_save, $31; /* Save old ra. */ \ + .set noreorder; \ + bal l; /* Find addr of .cpsetup. */ \ + nop; \ +l: \ + .set reorder; \ + .cpsetup $31, cp_reg, l; \ + move $31, ra_save +# define RESTORE_GP64 \ + .cpreturn +/* Use alternate register for context pointer. */ +# define USE_ALT_CP(reg) \ + .cplocal reg +#endif /* _MIPS_SIM != _MIPS_SIM_ABI32 */ + +/* + * Stack Frame Definitions + */ +#if (_MIPS_SIM == _MIPS_SIM_ABI32) +# define NARGSAVE 4 /* Space for 4 argument registers must be allocated. */ #endif +#if (_MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32) +# define NARGSAVE 0 /* No caller responsibilities. */ +#endif + /* * LEAF - declare leaf routine @@ -80,9 +167,11 @@ symbol: .frame sp, framesize, rpc /* * END - mark end of function */ -#define END(function) \ +#ifndef END +# define END(function) \ .end function; \ .size function,.-function +#endif /* * EXPORT - export definition of symbol @@ -142,54 +231,54 @@ symbol = value * is one of them. So we should have an option not to use this instruction. */ #if (_MIPS_ISA == _MIPS_ISA_MIPS4) || (_MIPS_ISA == _MIPS_ISA_MIPS5) -#define PREF(hint,addr) \ +# define PREF(hint,addr) \ pref hint,addr -#define PREFX(hint,addr) \ +# define PREFX(hint,addr) \ prefx hint,addr #else -#define PREF -#define PREFX +# define PREF +# define PREFX #endif /* * MIPS ISA IV/V movn/movz instructions and equivalents for older CPUs. */ #if _MIPS_ISA == _MIPS_ISA_MIPS1 -#define MOVN(rd,rs,rt) \ +# define MOVN(rd,rs,rt) \ .set push; \ .set reorder; \ - beqz rt,9f; \ - move rd,rs; \ + beqz rt,9f; \ + move rd,rs; \ .set pop; \ 9: -#define MOVZ(rd,rs,rt) \ +# define MOVZ(rd,rs,rt) \ .set push; \ .set reorder; \ - bnez rt,9f; \ - move rd,rt; \ + bnez rt,9f; \ + move rd,rt; \ .set pop; \ 9: #endif /* _MIPS_ISA == _MIPS_ISA_MIPS1 */ #if (_MIPS_ISA == _MIPS_ISA_MIPS2) || (_MIPS_ISA == _MIPS_ISA_MIPS3) -#define MOVN(rd,rs,rt) \ +# define MOVN(rd,rs,rt) \ .set push; \ .set noreorder; \ - bnezl rt,9f; \ - move rd,rs; \ + bnezl rt,9f; \ + move rd,rs; \ .set pop; \ 9: -#define MOVZ(rd,rs,rt) \ +# define MOVZ(rd,rs,rt) \ .set push; \ .set noreorder; \ - beqzl rt,9f; \ - movz rd,rs; \ + beqzl rt,9f; \ + movz rd,rs; \ .set pop; \ 9: #endif /* (_MIPS_ISA == _MIPS_ISA_MIPS2) || (_MIPS_ISA == _MIPS_ISA_MIPS3) */ #if (_MIPS_ISA == _MIPS_ISA_MIPS4) || (_MIPS_ISA == _MIPS_ISA_MIPS5) -#define MOVN(rd,rs,rt) \ +# define MOVN(rd,rs,rt) \ movn rd,rs,rt -#define MOVZ(rd,rs,rt) \ +# define MOVZ(rd,rs,rt) \ movz rd,rs,rt #endif /* (_MIPS_ISA == _MIPS_ISA_MIPS4) || (_MIPS_ISA == _MIPS_ISA_MIPS5) */ @@ -197,181 +286,187 @@ symbol = value * Stack alignment */ #if (_MIPS_ISA == _MIPS_ISA_MIPS1) || (_MIPS_ISA == _MIPS_ISA_MIPS2) -#define ALSZ 7 -#define ALMASK ~7 +# define ALSZ 7 +# define ALMASK ~7 #endif #if (_MIPS_ISA == _MIPS_ISA_MIPS3) || (_MIPS_ISA == _MIPS_ISA_MIPS4) || \ (_MIPS_ISA == _MIPS_ISA_MIPS5) -#define ALSZ 15 -#define ALMASK ~15 +# define ALSZ 15 +# define ALMASK ~15 #endif /* * Size of a register */ #ifdef __mips64 -#define SZREG 8 +# define SZREG 8 #else -#define SZREG 4 +# define SZREG 4 #endif /* * Use the following macros in assemblercode to load/store registers, * pointers etc. */ -#if (_MIPS_ISA == _MIPS_ISA_MIPS1) || (_MIPS_ISA == _MIPS_ISA_MIPS2) -#define REG_S sw -#define REG_L lw -#define PTR_SUBU subu -#define PTR_ADDU addu -#endif -#if (_MIPS_ISA == _MIPS_ISA_MIPS3) || (_MIPS_ISA == _MIPS_ISA_MIPS4) || \ - (_MIPS_ISA == _MIPS_ISA_MIPS5) -#define REG_S sd -#define REG_L ld -/* We still live in a 32 bit address space ... */ -#define PTR_SUBU subu -#define PTR_ADDU addu +#if (_MIPS_SIM == _MIPS_SIM_ABI32) +# define REG_S sw +# define REG_L lw +#else +# define REG_S sd +# define REG_L ld #endif /* * How to add/sub/load/store/shift C int variables. */ #if (_MIPS_SZINT == 32) -#define INT_ADD add -#define INT_ADDI addi -#define INT_ADDU addu -#define INT_ADDIU addiu -#define INT_SUB add -#define INT_SUBI subi -#define INT_SUBU subu -#define INT_SUBIU subu -#define INT_L lw -#define INT_S sw -#define LONG_SLL sll -#define LONG_SLLV sllv -#define LONG_SRL srl -#define LONG_SRLV srlv -#define LONG_SRA sra -#define LONG_SRAV srav +# define INT_ADD add +# define INT_ADDI addi +# define INT_ADDU addu +# define INT_ADDIU addiu +# define INT_SUB add +# define INT_SUBI subi +# define INT_SUBU subu +# define INT_SUBIU subu +# define INT_L lw +# define INT_S sw #endif #if (_MIPS_SZINT == 64) -#define INT_ADD dadd -#define INT_ADDI daddi -#define INT_ADDU daddu -#define INT_ADDIU daddiu -#define INT_SUB dadd -#define INT_SUBI dsubi -#define INT_SUBU dsubu -#define INT_SUBIU dsubu -#define INT_L ld -#define INT_S sd -#define LONG_SLL dsll -#define LONG_SLLV dsllv -#define LONG_SRL dsrl -#define LONG_SRLV dsrlv -#define LONG_SRA dsra -#define LONG_SRAV dsrav +# define INT_ADD dadd +# define INT_ADDI daddi +# define INT_ADDU daddu +# define INT_ADDIU daddiu +# define INT_SUB dadd +# define INT_SUBI dsubi +# define INT_SUBU dsubu +# define INT_SUBIU dsubu +# define INT_L ld +# define INT_S sd #endif /* * How to add/sub/load/store/shift C long variables. */ #if (_MIPS_SZLONG == 32) -#define LONG_ADD add -#define LONG_ADDI addi -#define LONG_ADDU addu -#define LONG_ADDIU addiu -#define LONG_SUB add -#define LONG_SUBI subi -#define LONG_SUBU subu -#define LONG_SUBIU subu -#define LONG_L lw -#define LONG_S sw -#define LONG_SLL sll -#define LONG_SLLV sllv -#define LONG_SRL srl -#define LONG_SRLV srlv -#define LONG_SRA sra -#define LONG_SRAV srav +# define LONG_ADD add +# define LONG_ADDI addi +# define LONG_ADDU addu +# define LONG_ADDIU addiu +# define LONG_SUB add +# define LONG_SUBI subi +# define LONG_SUBU subu +# define LONG_SUBIU subu +# define LONG_L lw +# define LONG_S sw +# define LONG_SLL sll +# define LONG_SLLV sllv +# define LONG_SRL srl +# define LONG_SRLV srlv +# define LONG_SRA sra +# define LONG_SRAV srav #endif #if (_MIPS_SZLONG == 64) -#define LONG_ADD dadd -#define LONG_ADDI daddi -#define LONG_ADDU daddu -#define LONG_ADDIU daddiu -#define LONG_SUB dadd -#define LONG_SUBI dsubi -#define LONG_SUBU dsubu -#define LONG_SUBIU dsubu -#define LONG_L ld -#define LONG_S sd -#define LONG_SLL dsll -#define LONG_SLLV dsllv -#define LONG_SRL dsrl -#define LONG_SRLV dsrlv -#define LONG_SRA dsra -#define LONG_SRAV dsrav +# define LONG_ADD dadd +# define LONG_ADDI daddi +# define LONG_ADDU daddu +# define LONG_ADDIU daddiu +# define LONG_SUB dadd +# define LONG_SUBI dsubi +# define LONG_SUBU dsubu +# define LONG_SUBIU dsubu +# define LONG_L ld +# define LONG_S sd +# define LONG_SLL dsll +# define LONG_SLLV dsllv +# define LONG_SRL dsrl +# define LONG_SRLV dsrlv +# define LONG_SRA dsra +# define LONG_SRAV dsrav #endif /* * How to add/sub/load/store/shift pointers. */ -#if (_MIPS_SZLONG == 32) -#define PTR_ADD add -#define PTR_ADDI addi -#define PTR_ADDU addu -#define PTR_ADDIU addiu -#define PTR_SUB add -#define PTR_SUBI subi -#define PTR_SUBU subu -#define PTR_SUBIU subu -#define PTR_L lw -#define PTR_S sw -#define PTR_SLL sll -#define PTR_SLLV sllv -#define PTR_SRL srl -#define PTR_SRLV srlv -#define PTR_SRA sra -#define PTR_SRAV srav - -#define PTR_SCALESHIFT 2 +#if (_MIPS_SIM == _MIPS_SIM_ABI32 && _MIPS_SZLONG == 32) +# define PTR_ADD add +# define PTR_ADDI addi +# define PTR_ADDU addu +# define PTR_ADDIU addiu +# define PTR_SUB add +# define PTR_SUBI subi +# define PTR_SUBU subu +# define PTR_SUBIU subu +# define PTR_L lw +# define PTR_LA la +# define PTR_S sw +# define PTR_SLL sll +# define PTR_SLLV sllv +# define PTR_SRL srl +# define PTR_SRLV srlv +# define PTR_SRA sra +# define PTR_SRAV srav + +# define PTR_SCALESHIFT 2 #endif -#if (_MIPS_SZLONG == 64) -#define PTR_ADD dadd -#define PTR_ADDI daddi -#define PTR_ADDU daddu -#define PTR_ADDIU daddiu -#define PTR_SUB dadd -#define PTR_SUBI dsubi -#define PTR_SUBU dsubu -#define PTR_SUBIU dsubu -#define PTR_L ld -#define PTR_S sd -#define PTR_SLL dsll -#define PTR_SLLV dsllv -#define PTR_SRL dsrl -#define PTR_SRLV dsrlv -#define PTR_SRA dsra -#define PTR_SRAV dsrav - -#define PTR_SCALESHIFT 3 +#if _MIPS_SIM == _MIPS_SIM_NABI32 +# define PTR_ADD add +# define PTR_ADDI addi +# define PTR_ADDU add /* no u */ +# define PTR_ADDIU addi /* no u */ +# define PTR_SUB add +# define PTR_SUBI subi +# define PTR_SUBU sub /* no u */ +# define PTR_SUBIU sub /* no u */ +# define PTR_L lw +# define PTR_LA la +# define PTR_S sw +# define PTR_SLL sll +# define PTR_SLLV sllv +# define PTR_SRL srl +# define PTR_SRLV srlv +# define PTR_SRA sra +# define PTR_SRAV srav + +# define PTR_SCALESHIFT 2 +#endif + +#if (_MIPS_SIM == _MIPS_SIM_ABI32 && _MIPS_SZLONG == 64) \ + || _MIPS_SIM == _MIPS_SIM_ABI64 +# define PTR_ADD dadd +# define PTR_ADDI daddi +# define PTR_ADDU daddu +# define PTR_ADDIU daddiu +# define PTR_SUB dadd +# define PTR_SUBI dsubi +# define PTR_SUBU dsubu +# define PTR_SUBIU dsubu +# define PTR_L ld +# define PTR_LA dla +# define PTR_S sd +# define PTR_SLL dsll +# define PTR_SLLV dsllv +# define PTR_SRL dsrl +# define PTR_SRLV dsrlv +# define PTR_SRA dsra +# define PTR_SRAV dsrav + +# define PTR_SCALESHIFT 3 #endif /* * Some cp0 registers were extended to 64bit for MIPS III. */ #if (_MIPS_ISA == _MIPS_ISA_MIPS1) || (_MIPS_ISA == _MIPS_ISA_MIPS2) -#define MFC0 mfc0 -#define MTC0 mtc0 +# define MFC0 mfc0 +# define MTC0 mtc0 #endif #if (_MIPS_ISA == _MIPS_ISA_MIPS3) || (_MIPS_ISA == _MIPS_ISA_MIPS4) || \ (_MIPS_ISA == _MIPS_ISA_MIPS5) -#define MFC0 dmfc0 -#define MTC0 dmtc0 +# define MFC0 dmfc0 +# define MTC0 dmtc0 #endif #endif /* sys/asm.h */ From e6631ae1acb269c52cd173bd1ad28f98fd55c5dd Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Fri, 14 Mar 2003 15:30:43 +0000 Subject: [PATCH 3062/4487] * sysdeps/mips/fpu/bits/mathdef.h: New. (__NO_LONG_DOUBLE_MATH): Define for o32. --- sysdeps/mips/fpu/bits/mathdef.h | 48 +++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 sysdeps/mips/fpu/bits/mathdef.h diff --git a/sysdeps/mips/fpu/bits/mathdef.h b/sysdeps/mips/fpu/bits/mathdef.h new file mode 100644 index 0000000000..fd73c35e2f --- /dev/null +++ b/sysdeps/mips/fpu/bits/mathdef.h @@ -0,0 +1,48 @@ +/* Copyright (C) 1997, 1998, 1999, 2000, 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. */ + +#if !defined _MATH_H && !defined _COMPLEX_H +# error "Never use directly; include instead" +#endif + +#if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF +# define _MATH_H_MATHDEF 1 + +/* Normally, there is no long double type and the `float' and `double' + expressions are evaluated as `double'. */ +typedef double float_t; /* `float' expressions are evaluated as + `double'. */ +typedef double double_t; /* `double' expressions are evaluated as + `double'. */ + +/* Define `INFINITY' as value of type `float'. */ +# define INFINITY HUGE_VALF + + +/* The values returned by `ilogb' for 0 and NaN respectively. */ +# define FP_ILOGB0 (-2147483647) +# define FP_ILOGBNAN 2147483647 + +#endif /* ISO C99 */ + +#if ! defined __NO_LONG_DOUBLE_MATH && _MIPS_SIM == _MIPS_SIM_ABI32 +/* Signal that we do not really have a `long double'. This disables the + declaration of all the `long double' function variants. */ +# define __NO_LONG_DOUBLE_MATH 1 +#endif From ca2b264c24b12141df2139c8b5d20c0951d1018f Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Mon, 17 Mar 2003 15:47:13 +0000 Subject: [PATCH 3063/4487] * sysdeps/mips/bits/wordsize.h: New file, appropriate for all 3 ABIs. * sysdeps/mips/mips64/gmp-mparam.h: New file. Define BITS_PER_LONGINT to __WORDSIZE, to match all 3 ABIs. * sysdeps/mips/setjmp_aux.c (STRINGXP, REGS, PTRS): New macros. (__sigsetjmp_aux): Use them. Adjust for all 3 ABIs. * sysdeps/mips/elf/start.S: Adjust for all 3 ABIs. * sysdeps/unix/mips/brk.S: Likewise. * sysdeps/unix/mips/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/mips/clone.S: Likewise. * sysdeps/mips/bits/setjmp.h (__jmp_buf): Likewise. * sysdeps/mips/sys/ucontext.h: Likewise. * sysdeps/unix/sysv/linux/mips/sys/profcs.h: Likewise. * sysdeps/unix/sysv/linux/mips/sys/ucontext.h: Likewise. * sysdeps/unix/sysv/linux/mips/kernel_stat.h: Likewise. * sysdeps/mips/mips64/bsd-_setjmp.S: Likewise. * sysdeps/mips/mips64/bsd-setjmp.S: Likewise. * sysdeps/mips/mips64/setjmp.S: Likewise. * sysdeps/mips/mips64/bits/setjmp.h: Deleted, obsolete. * sysdeps/mips/mips64/soft-fp/sfp-machine.h: Use long long for 64-bit types. --- sysdeps/mips/bits/setjmp.h | 19 +++++-- sysdeps/mips/bits/wordsize.h | 19 +++++++ sysdeps/mips/elf/start.S | 59 +++++++++++---------- sysdeps/mips/mips64/bits/setjmp.h | 57 -------------------- sysdeps/mips/mips64/bsd-_setjmp.S | 19 +++++-- sysdeps/mips/mips64/bsd-setjmp.S | 20 +++++-- sysdeps/mips/mips64/gmp-mparam.h | 31 +++++++++++ sysdeps/mips/mips64/setjmp.S | 12 +++-- sysdeps/mips/mips64/soft-fp/sfp-machine.h | 6 +-- sysdeps/mips/setjmp_aux.c | 38 +++++++++---- sysdeps/mips/sys/ucontext.h | 20 +++++-- sysdeps/unix/mips/brk.S | 7 +-- sysdeps/unix/mips/sysdep.S | 52 +++++++++--------- sysdeps/unix/sysv/linux/mips/clone.S | 40 ++++++++------ sysdeps/unix/sysv/linux/mips/kernel_stat.h | 25 +++++++++ sysdeps/unix/sysv/linux/mips/sys/procfs.h | 16 +++++- sysdeps/unix/sysv/linux/mips/sys/ucontext.h | 10 +++- 17 files changed, 281 insertions(+), 169 deletions(-) create mode 100644 sysdeps/mips/bits/wordsize.h delete mode 100644 sysdeps/mips/mips64/bits/setjmp.h create mode 100644 sysdeps/mips/mips64/gmp-mparam.h diff --git a/sysdeps/mips/bits/setjmp.h b/sysdeps/mips/bits/setjmp.h index 8cb53ee291..fa48676445 100644 --- a/sysdeps/mips/bits/setjmp.h +++ b/sysdeps/mips/bits/setjmp.h @@ -1,5 +1,6 @@ /* Define the machine-dependent type `jmp_buf'. MIPS version. - Copyright (C) 1992,93,95,97,2000 Free Software Foundation, Inc. + Copyright (C) 1992, 1993, 1995, 1997, 2000, 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 @@ -24,25 +25,33 @@ typedef struct { /* Program counter. */ - void * __pc; + __ptr_t __pc; /* Stack pointer. */ - void * __sp; + __ptr_t __sp; /* Callee-saved registers s0 through s7. */ +#if _MIPS_SIM == _MIPS_SIM_ABI32 int __regs[8]; +#else + __extension__ long long __regs[8]; +#endif /* The frame pointer. */ - void * __fp; + __ptr_t __fp; /* The global pointer. */ - void * __gp; + __ptr_t __gp; /* Floating point status register. */ int __fpc_csr; /* Callee-saved floating point registers. */ +#if _MIPS_SIM == _MIPS_SIM_ABI32 double __fpregs[6]; +#else + double __fpregs[8]; +#endif } __jmp_buf[1]; #ifdef __USE_MISC diff --git a/sysdeps/mips/bits/wordsize.h b/sysdeps/mips/bits/wordsize.h new file mode 100644 index 0000000000..666c7ad07e --- /dev/null +++ b/sysdeps/mips/bits/wordsize.h @@ -0,0 +1,19 @@ +/* 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. */ + +#define __WORDSIZE _MIPS_SZPTR diff --git a/sysdeps/mips/elf/start.S b/sysdeps/mips/elf/start.S index e85e9f535e..7567423f00 100644 --- a/sysdeps/mips/elf/start.S +++ b/sysdeps/mips/elf/start.S @@ -1,5 +1,6 @@ /* Startup code compliant to the ELF Mips ABI. - Copyright (C) 1995, 1997, 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1995, 1997, 2000, 2001, 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 @@ -19,6 +20,7 @@ #define __ASSEMBLY__ 1 #include +#include #ifndef ENTRY_POINT #error ENTRY_POINT needs to be defined for start.S on MIPS/ELF. @@ -52,42 +54,41 @@ char **argv, void (*init) (void), void (*fini) (void), void (*rtld_fini) (void), void *stack_end) */ -#ifdef __PIC__ -/* A macro to (re)initialize gp. We can get the run time address of 0f in - ra ($31) by blezal instruction. In this early phase, we can't save gp - in stack and .cprestore doesn't work properly. So we set gp by using - this macro. */ -#define SET_GP \ - .set noreorder; \ - bltzal $0,0f; \ - nop; \ -0: .cpload $31; \ - .set reorder; -#endif - + .text .globl ENTRY_POINT .type ENTRY_POINT,@function ENTRY_POINT: #ifdef __PIC__ - SET_GP + SETUP_GPX($0) + SETUP_GPX64($25,$0) #else - la $28, _gp /* Setup GP correctly if we're non-PIC. */ -#endif + PTR_LA $28, _gp /* Setup GP correctly if we're non-PIC. */ move $31, $0 +#endif - la $4, main /* main */ - lw $5, 0($29) /* argc */ - addu $6, $29, 4 /* argv */ - /* Allocate space on the stack for seven arguments and make sure - the stack is aligned to double words (8 bytes). */ - and $29, 0xfffffff8 - subu $29, 32 - la $7, __libc_csu_init /* init */ - la $8, __libc_csu_fini - sw $8, 16($29) /* fini */ - sw $2, 20($29) /* rtld_fini */ - sw $29, 24($29) /* stack_end */ + PTR_LA $4, main /* main */ + PTR_L $5, 0($29) /* argc */ + PTR_ADDIU $6, $29, PTRSIZE /* argv */ + + /* Allocate space on the stack for seven arguments (o32 only) + and make sure the stack is aligned to double words (8 bytes) + on o32 and quad words (16 bytes) on n32 and n64. */ + + and $29, -2 * SZREG +#if _MIPS_SIM == _MIPS_SIM_ABI32 + PTR_SUBIU $29, 32 +#endif + PTR_LA $7, __libc_csu_init /* init */ + PTR_LA $8, __libc_csu_fini +#if _MIPS_SIM == _MIPS_SIM_ABI32 + PTR_S $8, 16($29) /* fini */ + PTR_S $2, 20($29) /* rtld_fini */ + PTR_S $29, 24($29) /* stack_end */ +#else + move $9, $2 /* rtld_fini */ + move $10, $29 /* stack_end */ +#endif jal __libc_start_main hlt: b hlt /* Crash if somehow it does return. */ diff --git a/sysdeps/mips/mips64/bits/setjmp.h b/sysdeps/mips/mips64/bits/setjmp.h deleted file mode 100644 index e126427dbd..0000000000 --- a/sysdeps/mips/mips64/bits/setjmp.h +++ /dev/null @@ -1,57 +0,0 @@ -/* Define the machine-dependent type `jmp_buf'. MIPS version. - Copyright (C) 1996, 1997 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 _SETJMP_H -# error "Never include directly; use instead." -#endif - -typedef struct - { - /* Program counter. */ - __ptr_t __pc; - - /* Stack pointer. */ - __ptr_t __sp; - - /* Callee-saved registers s0 through s7. */ - int __regs[8]; - - /* The frame pointer. */ - __ptr_t __fp; - - /* The global pointer. */ - __ptr_t __gp; - - /* Floating point status register. */ - int __fpc_csr; - - /* Callee-saved floating point registers. */ - double __fpregs[8]; - } __jmp_buf[1]; - -#ifdef __USE_MISC -/* Offset to the program counter in `jmp_buf'. */ -# define JB_PC 0 -#endif - - -/* Test if longjmp to JMPBUF would unwind the frame - containing a local variable at ADDRESS. */ -#define _JMPBUF_UNWINDS(jmpbuf, address) \ - ((__ptr_t) (address) < (jmpbuf)[0].__sp) diff --git a/sysdeps/mips/mips64/bsd-_setjmp.S b/sysdeps/mips/mips64/bsd-_setjmp.S index c0ff0d7621..9d79ab0a2f 100644 --- a/sysdeps/mips/mips64/bsd-_setjmp.S +++ b/sysdeps/mips/mips64/bsd-_setjmp.S @@ -1,5 +1,5 @@ /* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. MIPS64 version. - Copyright (C) 1996, 1997, 2000, 2002 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 2000, 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 @@ -28,10 +28,19 @@ #endif ENTRY (_setjmp) #ifdef __PIC__ - .cpload t9 + SETUP_GP #endif - dla t9, C_SYMBOL_NAME (__sigsetjmp) + SETUP_GP64 (v0, C_SYMBOL_NAME (_setjmp)) + PTR_LA t9, C_SYMBOL_NAME (__sigsetjmp) +#if _MIPS_SIM == _MIPS_SIM_ABI32 nop - jr t9 - dli a1, 0 /* Pass a second argument of zero. */ +#endif + RESTORE_GP64 + move a1, zero /* Pass a second argument of zero. */ +#ifdef __PIC__ + jr t9 +#else + j C_SYMBOL_NAME (__sigsetjmp) +#endif + .end _setjmp libc_hidden_def (_setjmp) diff --git a/sysdeps/mips/mips64/bsd-setjmp.S b/sysdeps/mips/mips64/bsd-setjmp.S index ee8678728c..f542cb565f 100644 --- a/sysdeps/mips/mips64/bsd-setjmp.S +++ b/sysdeps/mips/mips64/bsd-setjmp.S @@ -1,5 +1,5 @@ /* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. MIPS64 version. - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 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 @@ -22,15 +22,25 @@ in setjmp doesn't clobber the state restored by longjmp. */ #include +#include #ifdef PIC .option pic2 #endif ENTRY (setjmp) -#ifdef PIC - .cpload t9 +#ifdef __PIC__ + SETUP_GP #endif - dla t9, C_SYMBOL_NAME (__sigsetjmp) + SETUP_GP64 (v0, C_SYMBOL_NAME (setjmp)) + PTR_LA t9, C_SYMBOL_NAME (__sigsetjmp) +#if _MIPS_SIM == _MIPS_SIM_ABI32 nop - jr t9 +#endif + RESTORE_GP64 dli a1, 1 /* Pass a second argument of one. */ +#ifdef __PIC__ + jr t9 +#else + j C_SYMBOL_NAME (__sigsetjmp) +#endif + .end setjmp diff --git a/sysdeps/mips/mips64/gmp-mparam.h b/sysdeps/mips/mips64/gmp-mparam.h new file mode 100644 index 0000000000..7666137a21 --- /dev/null +++ b/sysdeps/mips/mips64/gmp-mparam.h @@ -0,0 +1,31 @@ +/* gmp-mparam.h -- Compiler/machine parameter header file. + +Copyright (C) 1991, 1993, 1994, 2002, 2003 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to +the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#if defined __GMP_H__ && ! defined _LONG_LONG_LIMB +#error "Included too late for _LONG_LONG_LIMB to take effect" +#endif + +#define _LONG_LONG_LIMB +#define BITS_PER_MP_LIMB 64 +#define BYTES_PER_MP_LIMB 8 +#define BITS_PER_LONGINT __WORDSIZE +#define BITS_PER_INT 32 +#define BITS_PER_SHORTINT 16 +#define BITS_PER_CHAR 8 diff --git a/sysdeps/mips/mips64/setjmp.S b/sysdeps/mips/mips64/setjmp.S index 5e18897d88..3d2bf20e7c 100644 --- a/sysdeps/mips/mips64/setjmp.S +++ b/sysdeps/mips/mips64/setjmp.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 2000, 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 @@ -17,6 +17,7 @@ 02111-1307 USA. */ #include +#include /* The function __sigsetjmp_aux saves all the registers, but it can't reliably access the stack or frame pointers, so we pass them in as @@ -26,10 +27,15 @@ #endif ENTRY (__sigsetjmp) #ifdef __PIC__ - .cpload t9 + SETUP_GP #endif + SETUP_GP64 (v0, C_SYMBOL_NAME (__sigsetjmp)) move a2, sp move a3, fp - dla t9, __sigsetjmp_aux + PTR_LA t9, __sigsetjmp_aux +#if _MIPS_SIM == _MIPS_SIM_ABI32 nop +#endif + RESTORE_GP64 jr t9 + .end __sigsetjmp diff --git a/sysdeps/mips/mips64/soft-fp/sfp-machine.h b/sysdeps/mips/mips64/soft-fp/sfp-machine.h index 730deae872..309a14a5f8 100644 --- a/sysdeps/mips/mips64/soft-fp/sfp-machine.h +++ b/sysdeps/mips/mips64/soft-fp/sfp-machine.h @@ -1,7 +1,7 @@ #define _FP_W_TYPE_SIZE 64 -#define _FP_W_TYPE unsigned long -#define _FP_WS_TYPE signed long -#define _FP_I_TYPE long +#define _FP_W_TYPE unsigned long long +#define _FP_WS_TYPE signed long long +#define _FP_I_TYPE long long #define _FP_MUL_MEAT_S(R,X,Y) \ _FP_MUL_MEAT_1_imm(_FP_WFRACBITS_S,R,X,Y) diff --git a/sysdeps/mips/setjmp_aux.c b/sysdeps/mips/setjmp_aux.c index 1cd2b2155e..9e6766f949 100644 --- a/sysdeps/mips/setjmp_aux.c +++ b/sysdeps/mips/setjmp_aux.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 2000, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -18,6 +18,11 @@ 02111-1307 USA. */ #include +#include + +#define STRINGXP(X) __STRING(X) +#define REGS STRINGXP(REG_S) +#define PTRS STRINGXP(PTR_S) /* This function is only called via the assembly language routine __sigsetjmp, which arranges to pass in the stack pointer and the frame @@ -28,15 +33,26 @@ int __sigsetjmp_aux (jmp_buf env, int savemask, int sp, int fp) { /* Store the floating point callee-saved registers... */ +#if _MIPS_SIM == _MIPS_SIM_ABI32 asm volatile ("s.d $f20, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[0])); asm volatile ("s.d $f22, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[1])); asm volatile ("s.d $f24, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[2])); asm volatile ("s.d $f26, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[3])); asm volatile ("s.d $f28, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[4])); asm volatile ("s.d $f30, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[5])); +#else + asm volatile ("s.d $f24, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[0])); + asm volatile ("s.d $f25, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[1])); + asm volatile ("s.d $f26, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[2])); + asm volatile ("s.d $f27, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[3])); + asm volatile ("s.d $f28, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[4])); + asm volatile ("s.d $f29, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[5])); + asm volatile ("s.d $f30, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[6])); + asm volatile ("s.d $f31, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[7])); +#endif /* .. and the PC; */ - asm volatile ("sw $31, %0" : : "m" (env[0].__jmpbuf[0].__pc)); + asm volatile (PTRS " $31, %0" : : "m" (env[0].__jmpbuf[0].__pc)); /* .. and the stack pointer; */ env[0].__jmpbuf[0].__sp = (void *) sp; @@ -45,17 +61,17 @@ __sigsetjmp_aux (jmp_buf env, int savemask, int sp, int fp) env[0].__jmpbuf[0].__fp = (void *) fp; /* .. and the GP; */ - asm volatile ("sw $gp, %0" : : "m" (env[0].__jmpbuf[0].__gp)); + asm volatile (PTRS " $gp, %0" : : "m" (env[0].__jmpbuf[0].__gp)); /* .. and the callee-saved registers; */ - asm volatile ("sw $16, %0" : : "m" (env[0].__jmpbuf[0].__regs[0])); - asm volatile ("sw $17, %0" : : "m" (env[0].__jmpbuf[0].__regs[1])); - asm volatile ("sw $18, %0" : : "m" (env[0].__jmpbuf[0].__regs[2])); - asm volatile ("sw $19, %0" : : "m" (env[0].__jmpbuf[0].__regs[3])); - asm volatile ("sw $20, %0" : : "m" (env[0].__jmpbuf[0].__regs[4])); - asm volatile ("sw $21, %0" : : "m" (env[0].__jmpbuf[0].__regs[5])); - asm volatile ("sw $22, %0" : : "m" (env[0].__jmpbuf[0].__regs[6])); - asm volatile ("sw $23, %0" : : "m" (env[0].__jmpbuf[0].__regs[7])); + asm volatile (REGS " $16, %0" : : "m" (env[0].__jmpbuf[0].__regs[0])); + asm volatile (REGS " $17, %0" : : "m" (env[0].__jmpbuf[0].__regs[1])); + asm volatile (REGS " $18, %0" : : "m" (env[0].__jmpbuf[0].__regs[2])); + asm volatile (REGS " $19, %0" : : "m" (env[0].__jmpbuf[0].__regs[3])); + asm volatile (REGS " $20, %0" : : "m" (env[0].__jmpbuf[0].__regs[4])); + asm volatile (REGS " $21, %0" : : "m" (env[0].__jmpbuf[0].__regs[5])); + asm volatile (REGS " $22, %0" : : "m" (env[0].__jmpbuf[0].__regs[6])); + asm volatile (REGS " $23, %0" : : "m" (env[0].__jmpbuf[0].__regs[7])); /* .. and finally get and reconstruct the floating point csr. */ asm ("cfc1 %0, $31" : "=r" (env[0].__jmpbuf[0].__fpc_csr)); diff --git a/sysdeps/mips/sys/ucontext.h b/sysdeps/mips/sys/ucontext.h index 90c992dae6..90aa09a80f 100644 --- a/sysdeps/mips/sys/ucontext.h +++ b/sysdeps/mips/sys/ucontext.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999, 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 @@ -25,7 +25,11 @@ #include /* Type for general register. */ -typedef unsigned int greg_t; +#if _MIPS_SIM == _MIPS_SIM_ABI32 +typedef __uint32_t greg_t; +#else +typedef __uint64_t greg_t; +#endif /* Number of general registers. */ #define NGREG 36 @@ -115,9 +119,15 @@ typedef struct fpregset { union { +#if _MIPS_SIM == _MIPS_SIM_ABI32 double fp_dregs[16]; float fp_fregs[32]; unsigned int fp_regs[32]; +#else + double fp_dregs[32]; + /* float fp_fregs[32]; */ + __uint64_t fp_regs[32]; +#endif } fp_r; unsigned int fp_csr; unsigned int fp_pad; @@ -133,12 +143,16 @@ typedef struct /* Userlevel context. */ typedef struct ucontext { +#if _MIPS_SIM == _MIPS_SIM_ABI32 unsigned long int uc_flags; +#else + __uint64_t uc_flags; +#endif struct ucontext *uc_link; __sigset_t uc_sigmask; stack_t uc_stack; mcontext_t uc_mcontext; - long int uc_filler[48]; + int uc_filler[48]; } ucontext_t; #endif /* sys/ucontext.h */ diff --git a/sysdeps/unix/mips/brk.S b/sysdeps/unix/mips/brk.S index f094cda19b..a35b8b9113 100644 --- a/sysdeps/unix/mips/brk.S +++ b/sysdeps/unix/mips/brk.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1995, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995, 1997, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -18,6 +18,7 @@ 02111-1307 USA. */ #include +#include #ifndef SYS_brk #define SYS_brk 17 @@ -37,9 +38,9 @@ SYSCALL__(brk, 1) .set reorder /* Handle the query case. */ bnez a0, 1f - move a0,v0 + move a0, v0 1: /* Update __curbrk and exit cleanly. */ - sw a0, __curbrk + PTR_S a0, __curbrk move v0, zero jr ra PSEUDO_END(__brk) diff --git a/sysdeps/unix/mips/sysdep.S b/sysdeps/unix/mips/sysdep.S index a1adf677f9..09e8a0ac7a 100644 --- a/sysdeps/unix/mips/sysdep.S +++ b/sysdeps/unix/mips/sysdep.S @@ -24,24 +24,27 @@ #ifdef _LIBC_REENTRANT +LOCALSZ= 3 +FRAMESZ= (((NARGSAVE+LOCALSZ)*SZREG)+ALSZ)&ALMASK +RAOFF= FRAMESZ-(1*SZREG) +GPOFF= FRAMESZ-(2*SZREG) +V0OFF= FRAMESZ-(3*SZREG) + ENTRY(__syscall_error) #ifdef __PIC__ - .set noreorder - .set noat - move AT, ra - bltzal zero, 0f - nop -0: .cpload ra - move ra, AT - .set at - .set reorder + .set noat + SETUP_GPX (AT) + .set at #endif - subu sp, 32 + PTR_SUBU sp, FRAMESZ + .set noat + SETUP_GPX64(GPOFF,AT) + .set at #ifdef __PIC__ - .cprestore 16 + SAVE_GP(GPOFF) #endif - sw v0, 20(sp) - sw ra, 24(sp) + REG_S v0, V0OFF(sp) + REG_S ra, RAOFF(sp) #if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN /* We translate the system's EWOULDBLOCK error into EAGAIN. @@ -56,12 +59,13 @@ L(skip): jal __errno_location /* Store the error value. */ - lw t0, 20(sp) - sw t0, 0(v0) + REG_L t4, V0OFF(sp) + sw t4, 0(v0) /* And just kick back a -1. */ - lw ra, 24(sp) - addiu sp, 32 + REG_L ra, RAOFF(sp) + RESTORE_GP64 + PTR_ADDU sp, FRAMESZ li v0, -1 j ra END(__syscall_error) @@ -71,16 +75,10 @@ L(skip): ENTRY(__syscall_error) #ifdef __PIC__ - .set noreorder - .set noat - move AT, ra - bltzal zero, 0f - nop -0: .cpload ra - move ra, AT - .set at - .set reorder + SETUP_GPX (AT) #endif + SETUP_GPX64 (t9, AT) + #if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN /* We translate the system's EWOULDBLOCK error into EAGAIN. The GNU C library always defines EWOULDBLOCK==EAGAIN. @@ -94,6 +92,8 @@ L(skip): /* And just kick back a -1. */ li v0, -1 + + RESTORE_GP64 j ra END(__syscall_error) #endif /* _LIBC_REENTRANT */ diff --git a/sysdeps/unix/sysv/linux/mips/clone.S b/sysdeps/unix/sysv/linux/mips/clone.S index 2b02a2ba9b..7af2a1652a 100644 --- a/sysdeps/unix/sysv/linux/mips/clone.S +++ b/sysdeps/unix/sysv/linux/mips/clone.S @@ -29,15 +29,17 @@ /* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg) */ .text +LOCALSZ= 1 +FRAMESZ= (((NARGSAVE+LOCALSZ)*SZREG)+ALSZ)&ALMASK +GPOFF= FRAMESZ-(1*SZREG) NESTED(__clone,4*SZREG,sp) #ifdef __PIC__ - .set noreorder - .cpload $25 - .set reorder - subu sp,32 - .cprestore 16 -#else - subu sp,32 + SETUP_GP +#endif + PTR_SUBU sp, FRAMESZ + SETUP_GP64 (GPOFF, __clone) +#ifdef __PIC__ + SAVE_GP (GPOFF) #endif #ifdef PROF .set noat @@ -52,9 +54,9 @@ NESTED(__clone,4*SZREG,sp) beqz a0,L(error) /* No NULL function pointers. */ beqz a1,L(error) /* No NULL stack pointers. */ - subu a1,32 /* Reserve argument save space. */ - sw a0,0(a1) /* Save function pointer. */ - sw a3,4(a1) /* Save argument pointer. */ + PTR_SUBU a1,32 /* Reserve argument save space. */ + PTR_S a0,0(a1) /* Save function pointer. */ + PTR_S a3,PTRSIZE(a1) /* Save argument pointer. */ /* Do the system call */ @@ -66,16 +68,20 @@ NESTED(__clone,4*SZREG,sp) beqz v0,L(thread_start) /* Successful return from the parent */ - addiu sp,32 + RESTORE_GP64 + PTR_ADDU sp, FRAMESZ ret /* Something bad happened -- no child created */ L(error): - addiu sp,32 #ifdef __PIC__ - la t9,__syscall_error + PTR_LA t9,__syscall_error + RESTORE_GP64 + PTR_ADDU sp, FRAMESZ jr t9 #else + RESTORE_GP64 + PTR_ADDU sp, FRAMESZ j __syscall_error #endif END(__clone) @@ -86,11 +92,11 @@ L(error): L(thread_start): /* cp is already loaded. */ - .cprestore 16 + SAVE_GP (GPOFF) /* The stackframe has been created on entry of clone(). */ /* Restore the arg for user's function. */ - lw t9,0(sp) /* Function pointer. */ - lw a0,4(sp) /* Argument pointer. */ + PTR_L t9,0(sp) /* Function pointer. */ + PTR_L a0,PTRSIZE(sp) /* Argument pointer. */ /* Call the user's function. */ jal t9 @@ -98,7 +104,7 @@ L(thread_start): /* Call _exit rather than doing it inline for breakpoint purposes. */ move a0,v0 #ifdef __PIC__ - la t9,_exit + PTR_LA t9,_exit jalr t9 #else jal _exit diff --git a/sysdeps/unix/sysv/linux/mips/kernel_stat.h b/sysdeps/unix/sysv/linux/mips/kernel_stat.h index 41137b4fc7..b5fcd008b0 100644 --- a/sysdeps/unix/sysv/linux/mips/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/mips/kernel_stat.h @@ -1,4 +1,28 @@ /* Definition of `struct stat' used in the kernel.. */ +#if defined _ABI64 && _MIPS_SIM == _ABI64 +struct kernel_stat + { + unsigned int st_dev; + unsigned int __pad1[3]; + unsigned long st_ino; + unsigned int st_mode; + unsigned int st_nlink; + int st_uid; + int st_gid; + unsigned int st_rdev; + unsigned int __pad2[3]; + long st_size; + unsigned int st_atime; + unsigned int __unused1; + unsigned int st_mtime; + unsigned int __unused2; + unsigned int st_ctime; + unsigned int __unused3; + unsigned int st_blksize; + unsigned int __pad3; + unsigned long st_blocks; + }; +#else struct kernel_stat { unsigned long int st_dev; @@ -26,3 +50,4 @@ struct kernel_stat unsigned int st_flags; unsigned int st_gen; }; +#endif diff --git a/sysdeps/unix/sysv/linux/mips/sys/procfs.h b/sysdeps/unix/sysv/linux/mips/sys/procfs.h index a21652e1ce..0beb332487 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/mips/sys/procfs.h @@ -1,4 +1,5 @@ -/* Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1999, 2000, 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 @@ -32,7 +33,11 @@ #define ELF_NGREG 45 #define ELF_NFPREG 33 +#if defined _ABIN32 && _MIPS_SIM == _ABIN32 +__extension__ typedef unsigned long long elf_greg_t; +#else typedef unsigned long elf_greg_t; +#endif typedef elf_greg_t elf_gregset_t[ELF_NGREG]; typedef double elf_fpreg_t; @@ -59,8 +64,13 @@ struct elf_prstatus { struct elf_siginfo pr_info; /* Info associated with signal. */ short int pr_cursig; /* Current signal. */ +#if defined _ABIN32 && _MIPS_SIM == _ABIN32 + __extension__ unsigned long long int pr_sigpend; + __extension__ unsigned long long int pr_sighold; +#else unsigned long int pr_sigpend; /* Set of pending signals. */ unsigned long int pr_sighold; /* Set of held signals. */ +#endif __pid_t pr_pid; __pid_t pr_ppid; __pid_t pr_pgrp; @@ -82,7 +92,11 @@ struct elf_prpsinfo char pr_sname; /* Char for pr_state. */ char pr_zomb; /* Zombie. */ char pr_nice; /* Nice val. */ +#if defined _ABIN32 && _MIPS_SIM == _ABIN32 + __extension__ unsigned long long int pr_flag; +#else unsigned long int pr_flag; /* Flags. */ +#endif long pr_uid; long pr_gid; int pr_pid, pr_ppid, pr_pgrp, pr_sid; diff --git a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h index f57b91e4f2..9d80b4086a 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2000, 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 @@ -30,7 +30,11 @@ /* Type for general register. */ +#if defined _ABIN32 && _MIPS_SIM == _ABIN32 +__extension__ typedef unsigned long long int greg_t; +#else typedef unsigned long int greg_t; +#endif /* Number of general registers. */ #define NGREG 37 @@ -70,7 +74,11 @@ typedef struct /* Userlevel context. */ typedef struct ucontext { +#if defined _ABIN32 && _MIPS_SIM == _ABIN32 + __extension__ unsigned long long int uc_flags; +#else unsigned long int uc_flags; +#endif struct ucontext *uc_link; stack_t uc_stack; mcontext_t uc_mcontext; From 77f047e8a44e2b8e9be738eb877960ab900f49a7 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Mon, 17 Mar 2003 15:48:52 +0000 Subject: [PATCH 3064/4487] * sysdeps/unix/sysv/linux/mips/sys/ptrace.h: New file. * sysdeps/unix/sysv/linux/mips/ptrace.c: New file. Use long long type for registers on n32. --- sysdeps/unix/sysv/linux/mips/ptrace.c | 112 ++++++++++++++++++ sysdeps/unix/sysv/linux/mips/sys/ptrace.h | 135 ++++++++++++++++++++++ 2 files changed, 247 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/mips/ptrace.c create mode 100644 sysdeps/unix/sysv/linux/mips/sys/ptrace.h diff --git a/sysdeps/unix/sysv/linux/mips/ptrace.c b/sysdeps/unix/sysv/linux/mips/ptrace.c new file mode 100644 index 0000000000..b67fe83071 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/ptrace.c @@ -0,0 +1,112 @@ +/* Copyright (C) 1995, 1996, 1997, 1998, 2000, 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. */ + +#include +#include +#include +#include +#include + +#include +#include +#include + +#if defined _ABIN32 && _MIPS_SIM == _ABIN32 +__extension__ typedef long long int reg_type; +#else +typedef long int reg_type; +#endif + +extern reg_type __syscall_ptrace (int, pid_t, void *__unbounded, + reg_type __unbounded); + +reg_type +ptrace (enum __ptrace_request request, ...) +{ + reg_type res, ret; + va_list ap; + pid_t pid; + void *addr; + reg_type data; + + va_start (ap, request); + pid = va_arg (ap, pid_t); + addr = va_arg (ap, void *); + data = va_arg (ap, reg_type); + va_end (ap); + + if (request > 0 && request < 4) + data = &ret; + +#if __BOUNDED_POINTERS__ + switch (request) + { + case PTRACE_PEEKTEXT: + case PTRACE_PEEKDATA: + case PTRACE_PEEKUSER: + case PTRACE_POKETEXT: + case PTRACE_POKEDATA: + case PTRACE_POKEUSER: + (void) CHECK_1 ((int *) addr); + (void) CHECK_1 ((int *) data); + break; + + case PTRACE_GETREGS: + case PTRACE_SETREGS: + /* We don't know the size of data, so the best we can do is ensure + that `data' is valid for at least one word. */ + (void) CHECK_1 ((int *) data); + break; + + case PTRACE_GETFPREGS: + case PTRACE_SETFPREGS: + /* We don't know the size of data, so the best we can do is ensure + that `data' is valid for at least one word. */ + (void) CHECK_1 ((int *) data); + break; + + case PTRACE_GETFPXREGS: + case PTRACE_SETFPXREGS: + /* We don't know the size of data, so the best we can do is ensure + that `data' is valid for at least one word. */ + (void) CHECK_1 ((int *) data); + break; + + case PTRACE_TRACEME: + case PTRACE_CONT: + case PTRACE_KILL: + case PTRACE_SINGLESTEP: + case PTRACE_ATTACH: + case PTRACE_DETACH: + case PTRACE_SYSCALL: + /* Neither `data' nor `addr' needs any checks. */ + break; + }; +#endif + + res = INLINE_SYSCALL (ptrace, 4, request, pid, + __ptrvalue (addr), __ptrvalue (data)); + if (res >= 0 && request > 0 && request < 4) + { + __set_errno (0); + return ret; + } + + return res; +} diff --git a/sysdeps/unix/sysv/linux/mips/sys/ptrace.h b/sysdeps/unix/sysv/linux/mips/sys/ptrace.h new file mode 100644 index 0000000000..a8e4a476ec --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/sys/ptrace.h @@ -0,0 +1,135 @@ +/* `ptrace' debugger support interface. Linux version. + Copyright (C) 1996, 1997, 1998, 1999, 2000, 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 _SYS_PTRACE_H +#define _SYS_PTRACE_H 1 + +#include + +__BEGIN_DECLS + +/* Type of the REQUEST argument to `ptrace.' */ +enum __ptrace_request +{ + /* Indicate that the process making this request should be traced. + All signals received by this process can be intercepted by its + parent, and its parent can use the other `ptrace' requests. */ + PTRACE_TRACEME = 0, +#define PT_TRACE_ME PTRACE_TRACEME + + /* Return the word in the process's text space at address ADDR. */ + PTRACE_PEEKTEXT = 1, +#define PT_READ_I PTRACE_PEEKTEXT + + /* Return the word in the process's data space at address ADDR. */ + PTRACE_PEEKDATA = 2, +#define PT_READ_D PTRACE_PEEKDATA + + /* Return the word in the process's user area at offset ADDR. */ + PTRACE_PEEKUSER = 3, +#define PT_READ_U PTRACE_PEEKUSER + + /* Write the word DATA into the process's text space at address ADDR. */ + PTRACE_POKETEXT = 4, +#define PT_WRITE_I PTRACE_POKETEXT + + /* Write the word DATA into the process's data space at address ADDR. */ + PTRACE_POKEDATA = 5, +#define PT_WRITE_D PTRACE_POKEDATA + + /* Write the word DATA into the process's user area at offset ADDR. */ + PTRACE_POKEUSER = 6, +#define PT_WRITE_U PTRACE_POKEUSER + + /* Continue the process. */ + PTRACE_CONT = 7, +#define PT_CONTINUE PTRACE_CONT + + /* Kill the process. */ + PTRACE_KILL = 8, +#define PT_KILL PTRACE_KILL + + /* Single step the process. + This is not supported on all machines. */ + PTRACE_SINGLESTEP = 9, +#define PT_STEP PTRACE_SINGLESTEP + + /* Get all general purpose registers used by a processes. + This is not supported on all machines. */ + PTRACE_GETREGS = 12, +#define PT_GETREGS PTRACE_GETREGS + + /* Set all general purpose registers used by a processes. + This is not supported on all machines. */ + PTRACE_SETREGS = 13, +#define PT_SETREGS PTRACE_SETREGS + + /* Get all floating point registers used by a processes. + This is not supported on all machines. */ + PTRACE_GETFPREGS = 14, +#define PT_GETFPREGS PTRACE_GETFPREGS + + /* Set all floating point registers used by a processes. + This is not supported on all machines. */ + PTRACE_SETFPREGS = 15, +#define PT_SETFPREGS PTRACE_SETFPREGS + + /* Attach to a process that is already running. */ + PTRACE_ATTACH = 16, +#define PT_ATTACH PTRACE_ATTACH + + /* Detach from a process attached to with PTRACE_ATTACH. */ + PTRACE_DETACH = 17, +#define PT_DETACH PTRACE_DETACH + + /* Get all extended floating point registers used by a processes. + This is not supported on all machines. */ + PTRACE_GETFPXREGS = 18, +#define PT_GETFPXREGS PTRACE_GETFPXREGS + + /* Set all extended floating point registers used by a processes. + This is not supported on all machines. */ + PTRACE_SETFPXREGS = 19, +#define PT_SETFPXREGS PTRACE_SETFPXREGS + + /* Continue and stop at the next (return from) syscall. */ + PTRACE_SYSCALL = 24 +#define PT_SYSCALL PTRACE_SYSCALL +}; + +/* Perform process tracing functions. REQUEST is one of the values + above, and determines the action to be taken. + For all requests except PTRACE_TRACEME, PID specifies the process to be + traced. + + PID and the other arguments described above for the various requests should + appear (those that are used for the particular request) as: + pid_t PID, void *ADDR, int DATA, void *ADDR2 + after REQUEST. */ +#if defined _ABIN32 && _MIPS_SIM == _ABIN32 +__extension__ extern long long int ptrace + (enum __ptrace_request __request, ...) __THROW; +#else +extern long int ptrace (enum __ptrace_request __request, ...) __THROW; +#endif + +__END_DECLS + +#endif /* _SYS_PTRACE_H */ From bb4002d6017b0e6c830d3cfd0e87d6ea15e65678 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Mon, 17 Mar 2003 15:50:05 +0000 Subject: [PATCH 3065/4487] * sysdeps/unix/sysv/linux/mips/configure.in: New. Pre-process asm/unistd.h into asm-unistd.h. * sysdeps/unix/sysv/linux/mips/configure: Generated. * sysdeps/unix/sysv/linux/mips/Makefile: Do custom processing of syscall list. * sysdeps/unix/sysv/linux/mips/sys/syscall.h: New file. * sysdeps/unix/sysv/linux/mips/clone.S: Don't include asm/unistd.h. --- sysdeps/unix/sysv/linux/mips/Makefile | 39 +++++++++++ sysdeps/unix/sysv/linux/mips/clone.S | 1 - sysdeps/unix/sysv/linux/mips/configure | 0 sysdeps/unix/sysv/linux/mips/configure.in | 75 ++++++++++++++++++++++ sysdeps/unix/sysv/linux/mips/sys/syscall.h | 42 ++++++++++++ 5 files changed, 156 insertions(+), 1 deletion(-) create mode 100644 sysdeps/unix/sysv/linux/mips/configure create mode 100644 sysdeps/unix/sysv/linux/mips/configure.in create mode 100644 sysdeps/unix/sysv/linux/mips/sys/syscall.h diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile index 1f9fc2dd03..799f5ae0d5 100644 --- a/sysdeps/unix/sysv/linux/mips/Makefile +++ b/sysdeps/unix/sysv/linux/mips/Makefile @@ -8,4 +8,43 @@ ifeq ($(subdir),misc) sysdep_routines += cachectl cacheflush sysmips _test_and_set sysdep_headers += sys/cachectl.h sys/sysmips.h sys/tas.h + +no_syscall_list_h = 1 + +# Generate the list of SYS_* macros for the system calls (__NR_* macros). +# We generate not only SYS_, pointing at SYS__ if +# it exists, but also define SYS__ for all ABIs. +$(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/mips/sys/syscall.h + rm -f $(@:.h=.d)-t + { \ + echo '/* Generated at libc build time from kernel syscall list. */';\ + echo ''; \ + echo '#ifndef _SYSCALL_H'; \ + echo '# error "Never use directly; include instead."'; \ + echo '#endif'; \ + echo ''; \ + rm -f $(@:.d=.h).newt; \ + SUNPRO_DEPENDENCIES='$(@:.h=.d)-t $@' \ + $(CC) -E -x c -I $(common-objdir) $(sysincludes) $< -D_LIBC -dM | \ + sed -n 's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p' > $(@:.d=.h).newt; \ + if grep SYS_O32_ $(@:.d=.h).newt > /dev/null; then \ + echo '#if defined _ABI64 && _MIPS_SIM == _ABI64'; \ + sed -n 's/^\(#define SYS_\)N64_/\1/p' < $(@:.d=.h).newt; \ + echo '#elif defined _ABIN32 && _MIPS_SIM == _ABIN32'; \ + sed -n 's/^\(#define SYS_\)N32_/\1/p' < $(@:.d=.h).newt; \ + echo '#else'; \ + sed -n 's/^\(#define SYS_\)O32_/\1/p' < $(@:.d=.h).newt; \ + echo '#endif'; \ + sed -n '/^#define SYS_\([ON]32\|N64\)_/p' < $(@:.d=.h).newt; \ + else \ + cat $(@:.d=.h).newt; \ + fi; \ + rm $(@:.d=.h).newt; \ + } > $(@:.d=.h).new + mv -f $(@:.d=.h).new $(@:.d=.h) + sed < $(@:.h=.d)-t > $(@:.h=.d)-t2 \ + -e 's,$(subst .,\.,$@),$(patsubst $(objpfx)%,$$(objpfx)%,\ + $(@:.d=.h) $(@:.h=.d)),' + rm -f $(@:.h=.d)-t + mv -f $(@:.h=.d)-t2 $(@:.h=.d) endif diff --git a/sysdeps/unix/sysv/linux/mips/clone.S b/sysdeps/unix/sysv/linux/mips/clone.S index 7af2a1652a..e00351d117 100644 --- a/sysdeps/unix/sysv/linux/mips/clone.S +++ b/sysdeps/unix/sysv/linux/mips/clone.S @@ -21,7 +21,6 @@ and invokes a function in the right context after its all over. */ #include -#include #include #define _ERRNO_H 1 #include diff --git a/sysdeps/unix/sysv/linux/mips/configure b/sysdeps/unix/sysv/linux/mips/configure new file mode 100644 index 0000000000..e69de29bb2 diff --git a/sysdeps/unix/sysv/linux/mips/configure.in b/sysdeps/unix/sysv/linux/mips/configure.in new file mode 100644 index 0000000000..3df0c91b30 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/configure.in @@ -0,0 +1,75 @@ +sinclude(./aclocal.m4)dnl Autoconf lossage +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/unix/sysv/linux/mips. + +case $machine in +mips*64*) + rm -f asm-unistd.h + asm_unistd_h=$sysheaders/asm/unistd.h + if test ! -f $asm_unistd_h; then + # Try to find asm/unistd.h in compiler header search path. + try_asm_unistd_h=`echo '#include ' | $CPP - | + sed -n '/^# 1 "\(\/[^"]*\)".*/{s,,\1,p;q;}'` + if test -n "$try_asm_unistd_h" && + test -f "$try_asm_unistd_h"; then + asm_unistd_h=$try_asm_unistd_h + fi + fi + if test ! -f "$asm_unistd_h"; then + AC_MSG_WARN([*** asm/unistd.h not found, it will not be pre-processed]) + echo '#include ' > asm-unistd.h + else + # The point of this preprocessing is to turn __NR_ into + # __NR_N64_, as well as to define __NR_ to + # __NR__, if __NR__ is defined + # and is the compiler-enabled ABI. + cat "$asm_unistd_h" | + sed -e 's,__NR_,__NR_N64_,g' \ + -e 's,__NR_N64_##,__NR_##,g' \ + -e 's,__NR_N64_O32_,__NR_O32_,g' \ + -e 's,__NR_N64_N32_,__NR_N32_,g' \ + -e 's,__NR_N64_N64_,__NR_N64_,g' \ + | awk > asm-unistd.h ' +/^#define __NR.*unused/ { print; next; } +/^#define __NR_N64__exit __NR_N64_exit/ { + print "#define __NR__exit __NR_exit"; + print "#define __NR_O32__exit __NR_O32_exit"; + print "#define __NR_N32__exit __NR_N32_exit"; + print; next; +} +/^#define __NR_O32_/ { + name = $2; + sub (/_O32_/, "_", name); + print; + print "#if _MIPS_SIM == _MIPS_SIM_ABI32"; + print "# define " name " " $2; + print "#endif"; + next; +} +/^#define __NR_N32_/ { + name = $2; + sub (/_N32_/, "_", name); + print; + print "#if defined _ABIN32 && _MIPS_SIM == _ABIN32"; + print "# define " name " " $2; + print "#endif"; + next; +} +/^#define __NR_N64_/ { + name = $2; + sub (/_N64_/, "_", name); + print; + print "#if defined _ABI64 && _MIPS_SIM == _ABI64"; + print "# define " name " " $2; + print "#endif"; + next; +} +{ + print; +}' + fi ;; +mips*) + rm -f asm-unistd.h + echo '#include ' > asm-unistd.h + ;; +esac diff --git a/sysdeps/unix/sysv/linux/mips/sys/syscall.h b/sysdeps/unix/sysv/linux/mips/sys/syscall.h new file mode 100644 index 0000000000..f6458cd316 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/sys/syscall.h @@ -0,0 +1,42 @@ +/* Copyright (C) 1995, 1996, 1997, 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 _SYSCALL_H +#define _SYSCALL_H 1 + +/* This file should list the numbers of the system the system knows. + But instead of duplicating this we use the information available + from the kernel sources. */ +#ifdef _LIBC +/* Since the kernel doesn't define macro names in a way usable for + glibc, we preprocess this header, and use it during the glibc build + process. */ +# include +#else +# include +#endif + +#ifndef _LIBC +/* The Linux kernel header file defines macros `__NR_', but some + programs expect the traditional form `SYS_'. So in building libc + we scan the kernel's list and produce with macros for + all the `SYS_' names. */ +# include +#endif + +#endif From 7b44519fbc2b4aae4f090d2e5d835640cbbc7eb4 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Mon, 17 Mar 2003 15:53:37 +0000 Subject: [PATCH 3066/4487] * sysdeps/mips/machine-gmon.h (MCOUNT): Define for N32 and N64 as well. --- sysdeps/mips/machine-gmon.h | 83 ++++++++++++++++++++++++++++++++++--- 1 file changed, 77 insertions(+), 6 deletions(-) diff --git a/sysdeps/mips/machine-gmon.h b/sysdeps/mips/machine-gmon.h index 102da2c36d..5a87c85bf0 100644 --- a/sysdeps/mips/machine-gmon.h +++ b/sysdeps/mips/machine-gmon.h @@ -1,5 +1,6 @@ /* Machine-specific calling sequence for `mcount' profiling function. MIPS - Copyright (C) 1996, 1997, 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 2000, 2001, 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 @@ -20,14 +21,17 @@ #define _MCOUNT_DECL(frompc,selfpc) \ static void __attribute_used__ __mcount (u_long frompc, u_long selfpc) -/* Call __mcount with our the return PC for our caller, +/* Call __mcount with the return PC for our caller, and the return PC our caller will return to. */ + +#if _MIPS_SIM == _MIPS_SIM_ABI32 + #ifdef __PIC__ -#define CPLOAD ".cpload $25;" -#define CPRESTORE ".cprestore 44\n\t" +# define CPLOAD ".cpload $25;" +# define CPRESTORE ".cprestore 44\n\t" #else -#define CPLOAD -#define CPRESTORE +# define CPLOAD +# define CPRESTORE #endif #define MCOUNT asm(\ @@ -66,3 +70,70 @@ static void __attribute_used__ __mcount (u_long frompc, u_long selfpc) ".set reorder;\n\t" \ ".set at\n\t" \ ".end _mcount"); + +#else + +#ifdef __PIC__ +# define CPSETUP ".cpsetup $25, 88, _mcount;" +# define CPRETURN ".cpreturn;" +#else +# define CPSETUP +# define CPRETURN +#endif + +#if defined _ABIN32 && _MIPS_SIM == _ABIN32 +# define PTR_ADDU_STRING "add" /* no u */ +# define PTR_SUBU_STRING "sub" /* no u */ +#elif defined _ABI64 && _MIPS_SIM == _ABI64 +# define PTR_ADDU_STRING "daddu" +# define PTR_SUBU_STRING "dsubu" +#else +# error "Unknown ABI" +#endif + +#define MCOUNT asm(\ + ".globl _mcount;\n\t" \ + ".align 3;\n\t" \ + ".type _mcount,@function;\n\t" \ + ".ent _mcount\n\t" \ + "_mcount:\n\t" \ + ".frame $sp,88,$31\n\t" \ + ".set noreorder;\n\t" \ + ".set noat;\n\t" \ + PTR_SUBU_STRING " $29,$29,96;\n\t" \ + CPSETUP \ + "sd $4,24($29);\n\t" \ + "sd $5,32($29);\n\t" \ + "sd $6,40($29);\n\t" \ + "sd $7,48($29);\n\t" \ + "sd $8,56($29);\n\t" \ + "sd $9,64($29);\n\t" \ + "sd $10,72($29);\n\t" \ + "sd $11,80($29);\n\t" \ + "sd $2,16($29);\n\t" \ + "sd $1,0($29);\n\t" \ + "sd $31,8($29);\n\t" \ + "move $5,$31;\n\t" \ + "move $4,$1;\n\t" \ + "jal __mcount;\n\t" \ + "nop;\n\t" \ + "ld $4,24($29);\n\t" \ + "ld $5,32($29);\n\t" \ + "ld $6,40($29);\n\t" \ + "ld $7,48($29);\n\t" \ + "ld $8,56($29);\n\t" \ + "ld $9,64($29);\n\t" \ + "ld $10,72($29);\n\t" \ + "ld $11,80($29);\n\t" \ + "ld $2,16($29);\n\t" \ + "ld $31,8($29);\n\t" \ + "ld $1,0($29);\n\t" \ + CPRETURN \ + PTR_ADDU_STRING " $29,$29,96;\n\t" \ + "j $31;\n\t" \ + "move $31,$1;\n\t" \ + ".set reorder;\n\t" \ + ".set at\n\t" \ + ".end _mcount"); + +#endif From d5510eee99a91000221c7391fa0d96e73f0d6ebc Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Mon, 17 Mar 2003 15:57:19 +0000 Subject: [PATCH 3067/4487] * sysdeps/unix/sysv/linux/configure.in (libc_cv_slibdir): Use lib64 for mips64/n64 and lib32 for mips64/n32. (ldd_rewrite_script): Needed for all mips64 configurations. * sysdeps/unix/sysv/linux/configure: Rebuilt. * sysdeps/unix/sysv/linux/mips/mips64/ldd-rewrite.sed: New file. * sysdeps/unix/sysv/linux/mips/mips64/Dist: New file. --- sysdeps/unix/sysv/linux/mips/mips64/Dist | 1 + sysdeps/unix/sysv/linux/mips/mips64/ldd-rewrite.sed | 1 + 2 files changed, 2 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/Dist create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/ldd-rewrite.sed diff --git a/sysdeps/unix/sysv/linux/mips/mips64/Dist b/sysdeps/unix/sysv/linux/mips/mips64/Dist new file mode 100644 index 0000000000..b8fa28f0a4 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/Dist @@ -0,0 +1 @@ +ldd-rewrite.sed diff --git a/sysdeps/unix/sysv/linux/mips/mips64/ldd-rewrite.sed b/sysdeps/unix/sysv/linux/mips/mips64/ldd-rewrite.sed new file mode 100644 index 0000000000..2c327327e0 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/ldd-rewrite.sed @@ -0,0 +1 @@ +s_^\(RTLDLIST=\)\(.*lib\)\(\|32\|64\)\(/[^/]*\.so\.[0-9.]*\)[ ]*$_\1"\232\4 \264\4 \2\4"_ From be1222911f4d5700d64b006e3c131711c26a9353 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Mon, 17 Mar 2003 16:20:44 +0000 Subject: [PATCH 3068/4487] * sysdeps/mips/mips64/Implies: Move wordsize-64 to... * sysdeps/mips/mips64/n64/Implies: New file. * sysdeps/mips/mips64/n64/Makefile: New file. * sysdeps/mips/mips64/n64/el/bits/endian.h: New file. * sysdeps/mips/mips64/n32/Implies: New file. * sysdeps/mips/mips64/n32/Makefile: New file. * sysdeps/mips/mips64/n32/el/bits/endian.h: New file. * sysdeps/unix/mips/mips64/n32/sysdep.h: New file. * sysdeps/unix/mips/mips64/n64/sysdep.h: New file. * sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h: New file. * sysdeps/unix/sysv/linux/mips/mips64/n64/glob64.c: New file. * sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h: New file. * sysdeps/unix/sysv/linux/mips/mips64/ldconfig.h: New file. * sysdeps/unix/sysv/linux/mips/mips64/llseek.c: New file. * sysdeps/unix/sysv/linux/mips/mips64/recv.c: New file. * sysdeps/unix/sysv/linux/mips/mips64/send.c: New file. * sysdeps/unix/sysv/linux/mips/mips64/syscall.S: New file. * sysdeps/unix/sysv/linux/mips/mips64/syscalls.list: New file. * sysdeps/unix/sysv/linux/mips/mips64/umount.c: New file. * sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S: New file. --- sysdeps/mips/mips64/Implies | 1 - sysdeps/mips/mips64/n32/Implies | 4 + sysdeps/mips/mips64/n32/Makefile | 2 + sysdeps/mips/mips64/n32/el/bits/endian.h | 8 + sysdeps/mips/mips64/n64/Implies | 4 + sysdeps/mips/mips64/n64/Makefile | 2 + sysdeps/mips/mips64/n64/el/bits/endian.h | 8 + sysdeps/unix/mips/mips64/n32/sysdep.h | 58 ++++ sysdeps/unix/mips/mips64/n64/sysdep.h | 58 ++++ .../unix/sysv/linux/mips/mips64/ldconfig.h | 26 ++ sysdeps/unix/sysv/linux/mips/mips64/llseek.c | 1 + .../unix/sysv/linux/mips/mips64/n32/sysdep.h | 263 ++++++++++++++++++ .../unix/sysv/linux/mips/mips64/n64/glob64.c | 1 + .../unix/sysv/linux/mips/mips64/n64/ioctl.S | 43 +++ .../unix/sysv/linux/mips/mips64/n64/sysdep.h | 263 ++++++++++++++++++ sysdeps/unix/sysv/linux/mips/mips64/recv.c | 1 + sysdeps/unix/sysv/linux/mips/mips64/send.c | 1 + sysdeps/unix/sysv/linux/mips/mips64/syscall.S | 53 ++++ .../unix/sysv/linux/mips/mips64/syscalls.list | 20 ++ sysdeps/unix/sysv/linux/mips/mips64/umount.c | 1 + 20 files changed, 817 insertions(+), 1 deletion(-) create mode 100644 sysdeps/mips/mips64/n32/Implies create mode 100644 sysdeps/mips/mips64/n32/Makefile create mode 100644 sysdeps/mips/mips64/n32/el/bits/endian.h create mode 100644 sysdeps/mips/mips64/n64/Implies create mode 100644 sysdeps/mips/mips64/n64/Makefile create mode 100644 sysdeps/mips/mips64/n64/el/bits/endian.h create mode 100644 sysdeps/unix/mips/mips64/n32/sysdep.h create mode 100644 sysdeps/unix/mips/mips64/n64/sysdep.h create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/ldconfig.h create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/llseek.c create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/glob64.c create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/recv.c create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/send.c create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/syscall.S create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/syscalls.list create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/umount.c diff --git a/sysdeps/mips/mips64/Implies b/sysdeps/mips/mips64/Implies index 25106df989..8c18cb3034 100644 --- a/sysdeps/mips/mips64/Implies +++ b/sysdeps/mips/mips64/Implies @@ -1,4 +1,3 @@ -wordsize-64 # MIPS uses IEEE 754 floating point. ieee754/flt-32 ieee754/dbl-64 diff --git a/sysdeps/mips/mips64/n32/Implies b/sysdeps/mips/mips64/n32/Implies new file mode 100644 index 0000000000..b2072befef --- /dev/null +++ b/sysdeps/mips/mips64/n32/Implies @@ -0,0 +1,4 @@ +mips/mips64 +mips +wordsize-32 +ieee754/ldbl-128 diff --git a/sysdeps/mips/mips64/n32/Makefile b/sysdeps/mips/mips64/n32/Makefile new file mode 100644 index 0000000000..26f38570d7 --- /dev/null +++ b/sysdeps/mips/mips64/n32/Makefile @@ -0,0 +1,2 @@ +# `long double' is a distinct type we support. +long-double-fcts = yes diff --git a/sysdeps/mips/mips64/n32/el/bits/endian.h b/sysdeps/mips/mips64/n32/el/bits/endian.h new file mode 100644 index 0000000000..2241190a70 --- /dev/null +++ b/sysdeps/mips/mips64/n32/el/bits/endian.h @@ -0,0 +1,8 @@ +/* The MIPS architecture has selectable endianness. + This file is for a machine using little-endian mode. */ + +#ifndef _ENDIAN_H +# error "Never use directly; include instead." +#endif + +#define __BYTE_ORDER __LITTLE_ENDIAN diff --git a/sysdeps/mips/mips64/n64/Implies b/sysdeps/mips/mips64/n64/Implies new file mode 100644 index 0000000000..5e88e3a03b --- /dev/null +++ b/sysdeps/mips/mips64/n64/Implies @@ -0,0 +1,4 @@ +mips/mips64 +mips +wordsize-64 +ieee754/ldbl-128 diff --git a/sysdeps/mips/mips64/n64/Makefile b/sysdeps/mips/mips64/n64/Makefile new file mode 100644 index 0000000000..26f38570d7 --- /dev/null +++ b/sysdeps/mips/mips64/n64/Makefile @@ -0,0 +1,2 @@ +# `long double' is a distinct type we support. +long-double-fcts = yes diff --git a/sysdeps/mips/mips64/n64/el/bits/endian.h b/sysdeps/mips/mips64/n64/el/bits/endian.h new file mode 100644 index 0000000000..2241190a70 --- /dev/null +++ b/sysdeps/mips/mips64/n64/el/bits/endian.h @@ -0,0 +1,8 @@ +/* The MIPS architecture has selectable endianness. + This file is for a machine using little-endian mode. */ + +#ifndef _ENDIAN_H +# error "Never use directly; include instead." +#endif + +#define __BYTE_ORDER __LITTLE_ENDIAN diff --git a/sysdeps/unix/mips/mips64/n32/sysdep.h b/sysdeps/unix/mips/mips64/n32/sysdep.h new file mode 100644 index 0000000000..3564c6b61e --- /dev/null +++ b/sysdeps/unix/mips/mips64/n32/sysdep.h @@ -0,0 +1,58 @@ +/* Copyright (C) 1992, 1995, 1997, 1999, 2000, 2002, 2003 + Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Alexandre Oliva . + + 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. */ + +#include + +#ifdef __ASSEMBLER__ + +# undef PSEUDO +/* Note that while it's better structurally, going back to call __syscall_error + can make things confusing if you're debugging---it looks like it's jumping + backwards into the previous fn. */ +#ifdef __PIC__ +#define PSEUDO(name, syscall_name, args) \ + .align 2; \ + 99:; \ + .set noat; \ + .cpsetup t9, $1, name; \ + .set at; \ + la t9,__syscall_error; \ + .cpreturn; \ + jr t9; \ + ENTRY(name) \ + li v0, SYS_ify(syscall_name); \ + syscall; \ + bne a3, zero, 99b; \ +L(syse1): +#else +#define PSEUDO(name, syscall_name, args) \ + .set noreorder; \ + .align 2; \ + 99: j __syscall_error; \ + ENTRY(name) \ + .set noreorder; \ + li v0, SYS_ify(syscall_name); \ + syscall; \ + .set reorder; \ + bne a3, zero, 99b; \ +L(syse1): +#endif + +#endif diff --git a/sysdeps/unix/mips/mips64/n64/sysdep.h b/sysdeps/unix/mips/mips64/n64/sysdep.h new file mode 100644 index 0000000000..982d905a43 --- /dev/null +++ b/sysdeps/unix/mips/mips64/n64/sysdep.h @@ -0,0 +1,58 @@ +/* Copyright (C) 1992, 1995, 1997, 1999, 2000, 2002, 2003 + Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Alexandre Oliva . + + 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. */ + +#include + +#ifdef __ASSEMBLER__ + +# undef PSEUDO +/* Note that while it's better structurally, going back to call __syscall_error + can make things confusing if you're debugging---it looks like it's jumping + backwards into the previous fn. */ +#ifdef __PIC__ +#define PSEUDO(name, syscall_name, args) \ + .align 2; \ + 99:; \ + .set noat; \ + .cpsetup t9, $1, name; \ + .set at; \ + dla t9,__syscall_error; \ + .cpreturn; \ + jr t9; \ + ENTRY(name) \ + li v0, SYS_ify(syscall_name); \ + syscall; \ + bne a3, zero, 99b; \ +L(syse1): +#else +#define PSEUDO(name, syscall_name, args) \ + .set noreorder; \ + .align 2; \ + 99: j __syscall_error; \ + ENTRY(name) \ + .set noreorder; \ + li v0, SYS_ify(syscall_name); \ + syscall; \ + .set reorder; \ + bne a3, zero, 99b; \ +L(syse1): +#endif + +#endif diff --git a/sysdeps/unix/sysv/linux/mips/mips64/ldconfig.h b/sysdeps/unix/sysv/linux/mips/mips64/ldconfig.h new file mode 100644 index 0000000000..d490fb95e2 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/ldconfig.h @@ -0,0 +1,26 @@ +/* Copyright (C) 2001, 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. */ + +#include + +#define SYSDEP_KNOWN_INTERPRETER_NAMES \ + { "/lib32/ld.so.1", FLAG_ELF_LIBC6 }, \ + { "/lib64/ld.so.1", FLAG_ELF_LIBC6 }, +#define SYSDEP_KNOWN_LIBRARY_NAMES \ + { "libc.so.6", FLAG_ELF_LIBC6 }, \ + { "libm.so.6", FLAG_ELF_LIBC6 }, diff --git a/sysdeps/unix/sysv/linux/mips/mips64/llseek.c b/sysdeps/unix/sysv/linux/mips/mips64/llseek.c new file mode 100644 index 0000000000..24013a8224 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/llseek.c @@ -0,0 +1 @@ +/* lseek() is 64-bit capable already. */ diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h new file mode 100644 index 0000000000..55a405c87e --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h @@ -0,0 +1,263 @@ +/* Copyright (C) 2000, 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 _LINUX_MIPS_SYSDEP_H +#define _LINUX_MIPS_SYSDEP_H 1 + +/* There is some commonality. */ +#include + +/* For Linux we can use the system call table in the header file + /usr/include/asm/unistd.h + of the kernel. But these symbols do not follow the SYS_* syntax + so we have to redefine the `SYS_ify' macro here. */ +#undef SYS_ify +#ifdef __STDC__ +# define SYS_ify(syscall_name) __NR_N32_##syscall_name +#else +# define SYS_ify(syscall_name) __NR_N32_/**/syscall_name +#endif + + +#ifndef __ASSEMBLER__ +#if 0 /* untested */ +/* Define a macro which expands into the inline wrapper code for a system + call. */ +#undef INLINE_SYSCALL +#define INLINE_SYSCALL(name, nr, args...) \ + ({ INTERNAL_SYSCALL_DECL(err); \ + long result_var = INTERNAL_SYSCALL (name, err, nr, args); \ + if ( INTERNAL_SYSCALL_ERROR_P (result_var, err) ) \ + { \ + __set_errno (INTERNAL_SYSCALL_ERRNO (result_var, err)); \ + result_var = -1L; \ + } \ + result_var; }) + +#undef INTERNAL_SYSCALL_DECL +#define INTERNAL_SYSCALL_DECL(err) long err + +#undef INTERNAL_SYSCALL_ERROR_P +#define INTERNAL_SYSCALL_ERROR_P(val, err) ((long) (err)) + +#undef INTERNAL_SYSCALL_ERRNO +#define INTERNAL_SYSCALL_ERRNO(val, err) (val) + +#undef INTERNAL_SYSCALL +#define INTERNAL_SYSCALL(name, err, nr, args...) internal_syscall##nr(name, err, args) + +#define internal_syscall0(name, err, dummy...) \ +({ \ + long _sys_result; \ + \ + { \ + register long __v0 asm("$2"); \ + register long __a3 asm("$7"); \ + __asm__ volatile ( \ + ".set\tnoreorder\n\t" \ + "li\t$2, %2\t\t\t# " #name "\n\t" \ + "syscall\n\t" \ + ".set reorder" \ + : "=r" (__v0), "=r" (__a3) \ + : "i" (SYS_ify(name)) \ + : __SYSCALL_CLOBBERS); \ + err = __a3; \ + _sys_result = __v0; \ + } \ + _sys_result; \ +}) + +#define internal_syscall1(name, err, arg1) \ +({ \ + long _sys_result; \ + \ + { \ + register long long __v0 asm("$2"); \ + register long long __a0 asm("$4") = (long long) arg1; \ + register long long __a3 asm("$7"); \ + __asm__ volatile ( \ + ".set\tnoreorder\n\t" \ + "li\t$2, %3\t\t\t# " #name "\n\t" \ + "syscall\n\t" \ + ".set reorder" \ + : "=r" (__v0), "=r" (__a3) \ + : "r" (__a0), "i" (SYS_ify(name)) \ + : __SYSCALL_CLOBBERS); \ + err = __a3; \ + _sys_result = __v0; \ + } \ + _sys_result; \ +}) + +#define internal_syscall2(name, err, arg1, arg2) \ +({ \ + long _sys_result; \ + \ + { \ + register long long __v0 asm("$2"); \ + register long long __a0 asm("$4") = (long long) arg1; \ + register long long __a1 asm("$5") = (long long) arg2; \ + register long long __a3 asm("$7"); \ + __asm__ volatile ( \ + ".set\tnoreorder\n\t" \ + "li\t$2, %4\t\t\t# " #name "\n\t" \ + "syscall\n\t" \ + ".set\treorder" \ + : "=r" (__v0), "=r" (__a3) \ + : "r" (__a0), "r" (__a1), "i" (SYS_ify(name)) \ + : __SYSCALL_CLOBBERS); \ + err = __a3; \ + _sys_result = __v0; \ + } \ + _sys_result; \ +}) + +#define internal_syscall3(name, err, arg1, arg2, arg3) \ +({ \ + long _sys_result; \ + \ + { \ + register long long __v0 asm("$2"); \ + register long long __a0 asm("$4") = (long long) arg1; \ + register long long __a1 asm("$5") = (long long) arg2; \ + register long long __a2 asm("$6") = (long long) arg3; \ + register long long __a3 asm("$7"); \ + __asm__ volatile ( \ + ".set\tnoreorder\n\t" \ + "li\t$2, %5\t\t\t# " #name "\n\t" \ + "syscall\n\t" \ + ".set\treorder" \ + : "=r" (__v0), "=r" (__a3) \ + : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)) \ + : __SYSCALL_CLOBBERS); \ + err = __a3; \ + _sys_result = __v0; \ + } \ + _sys_result; \ +}) + +#define internal_syscall4(name, err, arg1, arg2, arg3, arg4) \ +({ \ + long _sys_result; \ + \ + { \ + register long long __v0 asm("$2"); \ + register long long __a0 asm("$4") = (long long) arg1; \ + register long long __a1 asm("$5") = (long long) arg2; \ + register long long __a2 asm("$6") = (long long) arg3; \ + register long long __a3 asm("$7") = (long long) arg4; \ + __asm__ volatile ( \ + ".set\tnoreorder\n\t" \ + "li\t$2, %5\t\t\t# " #name "\n\t" \ + "syscall\n\t" \ + ".set\treorder" \ + : "=r" (__v0), "+r" (__a3) \ + : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)) \ + : __SYSCALL_CLOBBERS); \ + err = __a3; \ + _sys_result = __v0; \ + } \ + _sys_result; \ +}) + +#define internal_syscall5(name, err, arg1, arg2, arg3, arg4, arg5) \ +({ \ + long _sys_result; \ + \ + { \ + register long long __v0 asm("$2"); \ + register long long __a0 asm("$4") = (long long) arg1; \ + register long long __a1 asm("$5") = (long long) arg2; \ + register long long __a2 asm("$6") = (long long) arg3; \ + register long long __a3 asm("$7") = (long long) arg4; \ + register long long __a4 asm("$8") = (long long) arg5; \ + __asm__ volatile ( \ + ".set\tnoreorder\n\t" \ + "li\t$2, %5\t\t\t# " #name "\n\t" \ + "syscall\n\t" \ + ".set\treorder" \ + : "=r" (__v0), "+r" (__a3) \ + : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \ + "r" (__a4) \ + : __SYSCALL_CLOBBERS); \ + err = __a3; \ + _sys_result = __v0; \ + } \ + _sys_result; \ +}) + +#define internal_syscall6(name, err, arg1, arg2, arg3, arg4, arg5, arg6)\ +({ \ + long _sys_result; \ + \ + { \ + register long long __v0 asm("$2"); \ + register long long __a0 asm("$4") = (long long) arg1; \ + register long long __a1 asm("$5") = (long long) arg2; \ + register long long __a2 asm("$6") = (long long) arg3; \ + register long long __a3 asm("$7") = (long long) arg4; \ + register long long __a4 asm("$8") = (long long) arg5; \ + register long long __a5 asm("$9") = (long long) arg6; \ + __asm__ volatile ( \ + ".set\tnoreorder\n\t" \ + "li\t$2, %5\t\t\t# " #name "\n\t" \ + "syscall\n\t" \ + ".set\treorder" \ + : "=r" (__v0), "+r" (__a3) \ + : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \ + "r" (__a5), "r" (__a6) \ + : __SYSCALL_CLOBBERS); \ + err = __a3; \ + _sys_result = __v0; \ + } \ + _sys_result; \ +}) + +#define internal_syscall7(name, err, arg1, arg2, arg3, arg4, arg5, arg6, arg7)\ +({ \ + long _sys_result; \ + \ + { \ + register long long __v0 asm("$2"); \ + register long long __a0 asm("$4") = (long long) arg1; \ + register long long __a1 asm("$5") = (long long) arg2; \ + register long long __a2 asm("$6") = (long long) arg3; \ + register long long __a3 asm("$7") = (long long) arg4; \ + register long long __a4 asm("$8") = (long long) arg5; \ + register long long __a5 asm("$9") = (long long) arg6; \ + register long long __a6 asm("$10") = (long long) arg7; \ + __asm__ volatile ( \ + ".set\tnoreorder\n\t" \ + "li\t$2, %5\t\t\t# " #name "\n\t" \ + "syscall\n\t" \ + ".set\treorder" \ + : "=r" (__v0), "+r" (__a3) \ + : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \ + "r" (__a5), "r" (__a6), "r" (__a7) \ + : __SYSCALL_CLOBBERS); \ + err = __a3; \ + _sys_result = __v0; \ + } \ + _sys_result; \ +}) + +#define __SYSCALL_CLOBBERS "$1", "$3", "$11", "$12", "$13", "$14", "$15", "$24", "$25" +#endif /* untested */ +#endif /* __ASSEMBLER__ */ + +#endif /* linux/mips/sysdep.h */ diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/glob64.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/glob64.c new file mode 100644 index 0000000000..33918ea6a5 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/glob64.c @@ -0,0 +1 @@ +/* glob64 is in glob.c */ diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S b/sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S new file mode 100644 index 0000000000..ed3b4078e4 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S @@ -0,0 +1,43 @@ +/* Copyright 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. */ + +#include + +#include + +/* Sign-extend the ioctl number, since the kernel wants it as a + sign-extended 32-bit value, but our prototype is that of a long. */ + + .text +ENTRY (__ioctl) + li v0, __NR_ioctl + dsll a1,a1,32 + dsra a1,a1,32 + syscall /* Do the system call. */ + bne a3, zero, L(error) + ret + +L(error): + .cpsetup t9, a0, __ioctl + PTR_LA t9,__syscall_error + .cprestore + jr t9 + +PSEUDO_END (__ioctl) + +weak_alias (__ioctl, ioctl) diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h new file mode 100644 index 0000000000..401470ba23 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h @@ -0,0 +1,263 @@ +/* Copyright (C) 2000, 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 _LINUX_MIPS_SYSDEP_H +#define _LINUX_MIPS_SYSDEP_H 1 + +/* There is some commonality. */ +#include + +/* For Linux we can use the system call table in the header file + /usr/include/asm/unistd.h + of the kernel. But these symbols do not follow the SYS_* syntax + so we have to redefine the `SYS_ify' macro here. */ +#undef SYS_ify +#ifdef __STDC__ +# define SYS_ify(syscall_name) __NR_N64_##syscall_name +#else +# define SYS_ify(syscall_name) __NR_N64_/**/syscall_name +#endif + + +#ifndef __ASSEMBLER__ +#if 0 /* untested */ +/* Define a macro which expands into the inline wrapper code for a system + call. */ +#undef INLINE_SYSCALL +#define INLINE_SYSCALL(name, nr, args...) \ + ({ INTERNAL_SYSCALL_DECL(err); \ + long result_var = INTERNAL_SYSCALL (name, err, nr, args); \ + if ( INTERNAL_SYSCALL_ERROR_P (result_var, err) ) \ + { \ + __set_errno (INTERNAL_SYSCALL_ERRNO (result_var, err)); \ + result_var = -1L; \ + } \ + result_var; }) + +#undef INTERNAL_SYSCALL_DECL +#define INTERNAL_SYSCALL_DECL(err) long err + +#undef INTERNAL_SYSCALL_ERROR_P +#define INTERNAL_SYSCALL_ERROR_P(val, err) ((long) (err)) + +#undef INTERNAL_SYSCALL_ERRNO +#define INTERNAL_SYSCALL_ERRNO(val, err) (val) + +#undef INTERNAL_SYSCALL +#define INTERNAL_SYSCALL(name, err, nr, args...) internal_syscall##nr(name, err, args) + +#define internal_syscall0(name, err, dummy...) \ +({ \ + long _sys_result; \ + \ + { \ + register long __v0 asm("$2"); \ + register long __a3 asm("$7"); \ + __asm__ volatile ( \ + ".set\tnoreorder\n\t" \ + "li\t$2, %2\t\t\t# " #name "\n\t" \ + "syscall\n\t" \ + ".set reorder" \ + : "=r" (__v0), "=r" (__a3) \ + : "i" (SYS_ify(name)) \ + : __SYSCALL_CLOBBERS); \ + err = __a3; \ + _sys_result = __v0; \ + } \ + _sys_result; \ +}) + +#define internal_syscall1(name, err, arg1) \ +({ \ + long _sys_result; \ + \ + { \ + register long __v0 asm("$2"); \ + register long __a0 asm("$4") = (long) arg1; \ + register long __a3 asm("$7"); \ + __asm__ volatile ( \ + ".set\tnoreorder\n\t" \ + "li\t$2, %3\t\t\t# " #name "\n\t" \ + "syscall\n\t" \ + ".set reorder" \ + : "=r" (__v0), "=r" (__a3) \ + : "r" (__a0), "i" (SYS_ify(name)) \ + : __SYSCALL_CLOBBERS); \ + err = __a3; \ + _sys_result = __v0; \ + } \ + _sys_result; \ +}) + +#define internal_syscall2(name, err, arg1, arg2) \ +({ \ + long _sys_result; \ + \ + { \ + register long __v0 asm("$2"); \ + register long __a0 asm("$4") = (long) arg1; \ + register long __a1 asm("$5") = (long) arg2; \ + register long __a3 asm("$7"); \ + __asm__ volatile ( \ + ".set\tnoreorder\n\t" \ + "li\t$2, %4\t\t\t# " #name "\n\t" \ + "syscall\n\t" \ + ".set\treorder" \ + : "=r" (__v0), "=r" (__a3) \ + : "r" (__a0), "r" (__a1), "i" (SYS_ify(name)) \ + : __SYSCALL_CLOBBERS); \ + err = __a3; \ + _sys_result = __v0; \ + } \ + _sys_result; \ +}) + +#define internal_syscall3(name, err, arg1, arg2, arg3) \ +({ \ + long _sys_result; \ + \ + { \ + register long __v0 asm("$2"); \ + register long __a0 asm("$4") = (long) arg1; \ + register long __a1 asm("$5") = (long) arg2; \ + register long __a2 asm("$6") = (long) arg3; \ + register long __a3 asm("$7"); \ + __asm__ volatile ( \ + ".set\tnoreorder\n\t" \ + "li\t$2, %5\t\t\t# " #name "\n\t" \ + "syscall\n\t" \ + ".set\treorder" \ + : "=r" (__v0), "=r" (__a3) \ + : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)) \ + : __SYSCALL_CLOBBERS); \ + err = __a3; \ + _sys_result = __v0; \ + } \ + _sys_result; \ +}) + +#define internal_syscall4(name, err, arg1, arg2, arg3, arg4) \ +({ \ + long _sys_result; \ + \ + { \ + register long __v0 asm("$2"); \ + register long __a0 asm("$4") = (long) arg1; \ + register long __a1 asm("$5") = (long) arg2; \ + register long __a2 asm("$6") = (long) arg3; \ + register long __a3 asm("$7") = (long) arg4; \ + __asm__ volatile ( \ + ".set\tnoreorder\n\t" \ + "li\t$2, %5\t\t\t# " #name "\n\t" \ + "syscall\n\t" \ + ".set\treorder" \ + : "=r" (__v0), "+r" (__a3) \ + : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)) \ + : __SYSCALL_CLOBBERS); \ + err = __a3; \ + _sys_result = __v0; \ + } \ + _sys_result; \ +}) + +#define internal_syscall5(name, err, arg1, arg2, arg3, arg4, arg5) \ +({ \ + long _sys_result; \ + \ + { \ + register long __v0 asm("$2"); \ + register long __a0 asm("$4") = (long) arg1; \ + register long __a1 asm("$5") = (long) arg2; \ + register long __a2 asm("$6") = (long) arg3; \ + register long __a3 asm("$7") = (long) arg4; \ + register long __a4 asm("$8") = (long) arg5; \ + __asm__ volatile ( \ + ".set\tnoreorder\n\t" \ + "li\t$2, %5\t\t\t# " #name "\n\t" \ + "syscall\n\t" \ + ".set\treorder" \ + : "=r" (__v0), "+r" (__a3) \ + : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \ + "r" (__a4) \ + : __SYSCALL_CLOBBERS); \ + err = __a3; \ + _sys_result = __v0; \ + } \ + _sys_result; \ +}) + +#define internal_syscall6(name, err, arg1, arg2, arg3, arg4, arg5, arg6)\ +({ \ + long _sys_result; \ + \ + { \ + register long __v0 asm("$2"); \ + register long __a0 asm("$4") = (long) arg1; \ + register long __a1 asm("$5") = (long) arg2; \ + register long __a2 asm("$6") = (long) arg3; \ + register long __a3 asm("$7") = (long) arg4; \ + register long __a4 asm("$8") = (long) arg5; \ + register long __a5 asm("$9") = (long) arg6; \ + __asm__ volatile ( \ + ".set\tnoreorder\n\t" \ + "li\t$2, %5\t\t\t# " #name "\n\t" \ + "syscall\n\t" \ + ".set\treorder" \ + : "=r" (__v0), "+r" (__a3) \ + : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \ + "r" (__a5), "r" (__a6) \ + : __SYSCALL_CLOBBERS); \ + err = __a3; \ + _sys_result = __v0; \ + } \ + _sys_result; \ +}) + +#define internal_syscall7(name, err, arg1, arg2, arg3, arg4, arg5, arg6, arg7)\ +({ \ + long _sys_result; \ + \ + { \ + register long __v0 asm("$2"); \ + register long __a0 asm("$4") = (long) arg1; \ + register long __a1 asm("$5") = (long) arg2; \ + register long __a2 asm("$6") = (long) arg3; \ + register long __a3 asm("$7") = (long) arg4; \ + register long __a4 asm("$8") = (long) arg5; \ + register long __a5 asm("$9") = (long) arg6; \ + register long __a6 asm("$10") = (long) arg7; \ + __asm__ volatile ( \ + ".set\tnoreorder\n\t" \ + "li\t$2, %5\t\t\t# " #name "\n\t" \ + "syscall\n\t" \ + ".set\treorder" \ + : "=r" (__v0), "+r" (__a3) \ + : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \ + "r" (__a5), "r" (__a6), "r" (__a7) \ + : __SYSCALL_CLOBBERS); \ + err = __a3; \ + _sys_result = __v0; \ + } \ + _sys_result; \ +}) + +#define __SYSCALL_CLOBBERS "$1", "$3", "$11", "$12", "$13", "$14", "$15", "$24", "$25" +#endif /* untested */ +#endif /* __ASSEMBLER__ */ + +#endif /* linux/mips/sysdep.h */ diff --git a/sysdeps/unix/sysv/linux/mips/mips64/recv.c b/sysdeps/unix/sysv/linux/mips/mips64/recv.c new file mode 100644 index 0000000000..b910525c92 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/recv.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/mips/mips64/send.c b/sysdeps/unix/sysv/linux/mips/mips64/send.c new file mode 100644 index 0000000000..d2c2996a21 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/send.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/mips/mips64/syscall.S b/sysdeps/unix/sysv/linux/mips/mips64/syscall.S new file mode 100644 index 0000000000..ea5bf491d6 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/syscall.S @@ -0,0 +1,53 @@ +/* Copyright (C) 2001, 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. */ + +#include + +#include + +/* 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) + We need to do some arg shifting, the syscall_number will be in + rax. */ + + + .text +ENTRY (syscall) + move v0, a0 /* Syscall number -> v0 */ + move a0, a1 /* shift arg1 - arg7. */ + move a1, a2 + move a2, a3 + move a3, a4 + move a4, a5 + move a5, a6 + move a6, a7 + + syscall /* Do the system call. */ + bne a3, zero, L(error) + + ret + +L(error): + .cpsetup t9, a0, syscall + PTR_LA t9,__syscall_error + .cprestore + jr t9 + +PSEUDO_END (syscall) diff --git a/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list b/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list new file mode 100644 index 0000000000..14ad564573 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list @@ -0,0 +1,20 @@ +# File name Caller Syscall name Args Strong name Weak names + +lseek - lseek i:iii __libc_lseek __lseek lseek __llseek llseek __libc_lseek64 __lseek64 lseek64 + +# proper socket implementations: +recvfrom - recvfrom i:ibniBN __libc_recvfrom __recvfrom recvfrom __syscall_recvfrom +sendto - sendto i:ibnibn __libc_sendto __sendto sendto __syscall_sendto + +# semaphore and shm system calls +msgctl - msgctl i:iip __msgctl msgctl +msgget - msgget i:ii __msgget msgget +msgrcv - msgrcv i:ibnii __msgrcv msgrcv +msgsnd - msgsnd i:ibni __msgsnd msgsnd +shmat - shmat i:ipi __shmat shmat +shmctl - shmctl i:iip __shmctl shmctl +shmdt - shmdt i:s __shmdt shmdt +shmget - shmget i:iii __shmget shmget +semop - semop i:ipi __semop semop +semget - semget i:iii __semget semget +semctl - semctl i:iiii __semctl semctl diff --git a/sysdeps/unix/sysv/linux/mips/mips64/umount.c b/sysdeps/unix/sysv/linux/mips/mips64/umount.c new file mode 100644 index 0000000000..9a91ba5b2f --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/umount.c @@ -0,0 +1 @@ +#include From 79bd05645769c3494d434977a4672f2a3d67f312 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Thu, 20 Mar 2003 00:39:32 +0000 Subject: [PATCH 3069/4487] * sysdeps/mips/ieee754.h: New file, suitable to replace both ../ieee754/ieee754.h and ../ieee754/ldbl-128/ieee754.h, kept mips-specific for now. --- sysdeps/mips/ieee754.h | 326 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 326 insertions(+) create mode 100644 sysdeps/mips/ieee754.h diff --git a/sysdeps/mips/ieee754.h b/sysdeps/mips/ieee754.h new file mode 100644 index 0000000000..febae1deeb --- /dev/null +++ b/sysdeps/mips/ieee754.h @@ -0,0 +1,326 @@ +/* Copyright (C) 1992, 1995, 1996, 1999, 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 _IEEE754_H + +#define _IEEE754_H 1 +#include + +#include + +#include + +__BEGIN_DECLS + +union ieee754_float + { + float f; + + /* This is the IEEE 754 single-precision format. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:8; + unsigned int mantissa:23; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN + unsigned int mantissa:23; + unsigned int exponent:8; + unsigned int negative:1; +#endif /* Little endian. */ + } ieee; + + /* This format makes it easier to see if a NaN is a signalling NaN. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:8; + unsigned int quiet_nan:1; + unsigned int mantissa:22; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN + unsigned int mantissa:22; + unsigned int quiet_nan:1; + unsigned int exponent:8; + unsigned int negative:1; +#endif /* Little endian. */ + } ieee_nan; + }; + +#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */ + + +union ieee754_double + { + double d; + + /* This is the IEEE 754 double-precision format. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:11; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:20; + unsigned int mantissa1:32; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN +# if __FLOAT_WORD_ORDER == BIG_ENDIAN + unsigned int mantissa0:20; + unsigned int exponent:11; + unsigned int negative:1; + unsigned int mantissa1:32; +# else + /* Together these comprise the mantissa. */ + unsigned int mantissa1:32; + unsigned int mantissa0:20; + unsigned int exponent:11; + unsigned int negative:1; +# endif +#endif /* Little endian. */ + } ieee; + + /* This format makes it easier to see if a NaN is a signalling NaN. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:11; + unsigned int quiet_nan:1; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:19; + unsigned int mantissa1:32; +#else +# if __FLOAT_WORD_ORDER == BIG_ENDIAN + unsigned int mantissa0:19; + unsigned int quiet_nan:1; + unsigned int exponent:11; + unsigned int negative:1; + unsigned int mantissa1:32; +# else + /* Together these comprise the mantissa. */ + unsigned int mantissa1:32; + unsigned int mantissa0:19; + unsigned int quiet_nan:1; + unsigned int exponent:11; + unsigned int negative:1; +# endif +#endif + } ieee_nan; + }; + +#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */ + +#if LDBL_MANT_DIG == 113 + +union ieee854_long_double + { + long double d; + + /* This is the IEEE 854 quad-precision format. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:15; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:16; + unsigned int mantissa1:32; + unsigned int mantissa2:32; + unsigned int mantissa3:32; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN + /* Together these comprise the mantissa. */ + unsigned int mantissa3:32; + unsigned int mantissa2:32; + unsigned int mantissa1:32; + unsigned int mantissa0:16; + unsigned int exponent:15; + unsigned int negative:1; +#endif /* Little endian. */ + } ieee; + + /* This format makes it easier to see if a NaN is a signalling NaN. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:15; + unsigned int quiet_nan:1; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:15; + unsigned int mantissa1:32; + unsigned int mantissa2:32; + unsigned int mantissa3:32; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN + /* Together these comprise the mantissa. */ + unsigned int mantissa3:32; + unsigned int mantissa2:32; + unsigned int mantissa1:32; + unsigned int mantissa0:15; + unsigned int quiet_nan:1; + unsigned int exponent:15; + unsigned int negative:1; +#endif /* Little endian. */ + } ieee_nan; +#endif + }; + +#define IEEE854_LONG_DOUBLE_BIAS 0x3fff /* Added to exponent. */ + +#elif LDBL_MANT_DIG == 64 + +union ieee854_long_double + { + long double d; + + /* This is the IEEE 854 double-extended-precision format. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:15; + unsigned int empty:16; + unsigned int mantissa0:32; + unsigned int mantissa1:32; +#endif +#if __BYTE_ORDER == __LITTLE_ENDIAN +# if __FLOAT_WORD_ORDER == BIG_ENDIAN + unsigned int exponent:15; + unsigned int negative:1; + unsigned int empty:16; + unsigned int mantissa0:32; + unsigned int mantissa1:32; +# else + unsigned int mantissa1:32; + unsigned int mantissa0:32; + unsigned int exponent:15; + unsigned int negative:1; + unsigned int empty:16; +# endif +#endif + } ieee; + + /* This is for NaNs in the IEEE 854 double-extended-precision format. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:15; + unsigned int empty:16; + unsigned int one:1; + unsigned int quiet_nan:1; + unsigned int mantissa0:30; + unsigned int mantissa1:32; +#endif +#if __BYTE_ORDER == __LITTLE_ENDIAN +# if __FLOAT_WORD_ORDER == BIG_ENDIAN + unsigned int exponent:15; + unsigned int negative:1; + unsigned int empty:16; + unsigned int mantissa0:30; + unsigned int quiet_nan:1; + unsigned int one:1; + unsigned int mantissa1:32; +# else + unsigned int mantissa1:32; + unsigned int mantissa0:30; + unsigned int quiet_nan:1; + unsigned int one:1; + unsigned int exponent:15; + unsigned int negative:1; + unsigned int empty:16; +# endif +#endif + } ieee_nan; + }; + +#define IEEE854_LONG_DOUBLE_BIAS 0x3fff + +#elif LDBL_MANT_DIG == 53 + +union ieee854_long_double + { + long double d; + + /* This is the IEEE 754 double-precision format. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:11; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:20; + unsigned int mantissa1:32; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN +# if __FLOAT_WORD_ORDER == BIG_ENDIAN + unsigned int mantissa0:20; + unsigned int exponent:11; + unsigned int negative:1; + unsigned int mantissa1:32; +# else + /* Together these comprise the mantissa. */ + unsigned int mantissa1:32; + unsigned int mantissa0:20; + unsigned int exponent:11; + unsigned int negative:1; +# endif +#endif /* Little endian. */ + } ieee; + + /* This format makes it easier to see if a NaN is a signalling NaN. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:11; + unsigned int quiet_nan:1; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:19; + unsigned int mantissa1:32; +#else +# if __FLOAT_WORD_ORDER == BIG_ENDIAN + unsigned int mantissa0:19; + unsigned int quiet_nan:1; + unsigned int exponent:11; + unsigned int negative:1; + unsigned int mantissa1:32; +# else + /* Together these comprise the mantissa. */ + unsigned int mantissa1:32; + unsigned int mantissa0:19; + unsigned int quiet_nan:1; + unsigned int exponent:11; + unsigned int negative:1; +# endif +#endif + } ieee_nan; + }; + +#define IEEE854_LONG_DOUBLE_BIAS 0x3ff /* Added to exponent. */ + +#endif /* LDBL_MANT_DIG == 53 */ + +__END_DECLS + +#endif /* ieee754.h */ From 3d06657c5313e9b55cd0f3f6580ff3a6d9ca68b2 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Thu, 20 Mar 2003 07:54:21 +0000 Subject: [PATCH 3070/4487] * sysdeps/mips/dl-machine.h (ELF_MIPS_GNU_GOT1_MASK): Define properly for n64. (elf_machine_runtime_setup): Cast link_map pointer to Elf Addr type. (elf_machine_rel, elf_machine_rel_relative): Cast symidx to Elf Word before comparing with gotsym. Take reloc_addr argument as void*. Remove the code added for the compiler to drop any alignment assumptions. --- sysdeps/mips/dl-machine.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 62c3f20736..c7031dce0b 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -130,7 +130,11 @@ elf_machine_load_address (void) } /* The MSB of got[1] of a gnu object is set to identify gnu objects. */ -#define ELF_MIPS_GNU_GOT1_MASK 0x80000000 +#ifdef _ABI64 && _MIPS_SIM == _ABI64 +# define ELF_MIPS_GNU_GOT1_MASK 0x8000000000000000L +#else +# define ELF_MIPS_GNU_GOT1_MASK 0x80000000L +#endif /* We can't rely on elf_machine_got_rel because _dl_object_relocation_scope fiddles with global data. */ @@ -530,7 +534,10 @@ static inline void #endif elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, const ElfW(Sym) *sym, const struct r_found_version *version, - ElfW(Addr) *const reloc_addr) + /* We use void* because the location to be relocated + is not required to be properly aligned for a + ELFW(Addr). */ + void /* ElfW(Addr) */ *const reloc_addr) { const unsigned long int r_type = ELFW(R_TYPE) (reloc->r_info); @@ -565,7 +572,7 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, const ElfW(Word) gotsym = (const ElfW(Word)) map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val; - if (symidx < gotsym) + if ((ElfW(Word))symidx < gotsym) { /* This wouldn't work for a symbol imported from other libraries for which there's no GOT entry, but MIPS @@ -633,7 +640,7 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, static inline void elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc, - ElfW(Addr) *const reloc_addr) + void /* ElfW(Addr) */ *const reloc_addr) { /* XXX Nothing to do. There is no relative relocation, right? */ } @@ -758,7 +765,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) of got[1] of a gnu object is set to identify gnu objects. Where we can store l for non gnu objects? XXX */ if ((got[1] & ELF_MIPS_GNU_GOT1_MASK) != 0) - got[1] = (ElfW(Addr)) ((unsigned) l | ELF_MIPS_GNU_GOT1_MASK); + got[1] = ((ElfW(Addr)) l | ELF_MIPS_GNU_GOT1_MASK); else _dl_mips_gnu_objects = 0; } From a8a1e840a144cad5fed50fa6aed7d0424fceca6b Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Thu, 20 Mar 2003 07:54:56 +0000 Subject: [PATCH 3071/4487] * sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S: Sign-extend with a single instruction. --- sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S b/sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S index ed3b4078e4..7b14089bcb 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S @@ -26,8 +26,7 @@ .text ENTRY (__ioctl) li v0, __NR_ioctl - dsll a1,a1,32 - dsra a1,a1,32 + sll a1,a1,0 syscall /* Do the system call. */ bne a3, zero, L(error) ret From 19ca28fb3fc99b6eb332ecee1d6425827b3301ac Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Thu, 20 Mar 2003 10:27:55 +0000 Subject: [PATCH 3072/4487] * sysdeps/mips/bits/setjmp.h: Store all N32 and N64 registers, including pc, gp, sp and fp, as long long. * sysdeps/mips/mips64/setjmp.S: Pass gp to __sigsetjmp_aux. * sysdeps/mips/mips64/setjmp_aux.c: Adjust type of arguments. Add gp argument, and set gp in the jmpbuf to it. * sysdeps/mips/setjmp_aux.c: Revert to o32-only. --- sysdeps/mips/bits/setjmp.h | 21 +++++++++++++++---- sysdeps/mips/mips64/setjmp.S | 3 +++ sysdeps/mips/mips64/setjmp_aux.c | 7 ++++--- sysdeps/mips/setjmp_aux.c | 36 +++++++++----------------------- 4 files changed, 34 insertions(+), 33 deletions(-) diff --git a/sysdeps/mips/bits/setjmp.h b/sysdeps/mips/bits/setjmp.h index fa48676445..562c13243c 100644 --- a/sysdeps/mips/bits/setjmp.h +++ b/sysdeps/mips/bits/setjmp.h @@ -24,6 +24,7 @@ typedef struct { +#if _MIPS_SIM == _MIPS_SIM_ABI32 /* Program counter. */ __ptr_t __pc; @@ -31,17 +32,29 @@ typedef struct __ptr_t __sp; /* Callee-saved registers s0 through s7. */ -#if _MIPS_SIM == _MIPS_SIM_ABI32 int __regs[8]; -#else - __extension__ long long __regs[8]; -#endif /* The frame pointer. */ __ptr_t __fp; /* The global pointer. */ __ptr_t __gp; +#else + /* Program counter. */ + __extension__ long long __pc; + + /* Stack pointer. */ + __extension__ long long __sp; + + /* Callee-saved registers s0 through s7. */ + __extension__ long long __regs[8]; + + /* The frame pointer. */ + __extension__ long long __fp; + + /* The global pointer. */ + __extension__ long long __gp; +#endif /* Floating point status register. */ int __fpc_csr; diff --git a/sysdeps/mips/mips64/setjmp.S b/sysdeps/mips/mips64/setjmp.S index 3d2bf20e7c..d566921a87 100644 --- a/sysdeps/mips/mips64/setjmp.S +++ b/sysdeps/mips/mips64/setjmp.S @@ -37,5 +37,8 @@ ENTRY (__sigsetjmp) nop #endif RESTORE_GP64 +#if _MIPS_SIM != _MIPS_SIM_ABI32 + move a4, gp +#endif jr t9 .end __sigsetjmp diff --git a/sysdeps/mips/mips64/setjmp_aux.c b/sysdeps/mips/mips64/setjmp_aux.c index 6d1c9390bb..db75a21a30 100644 --- a/sysdeps/mips/mips64/setjmp_aux.c +++ b/sysdeps/mips/mips64/setjmp_aux.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -25,7 +25,8 @@ access them in C. */ int -__sigsetjmp_aux (jmp_buf env, int savemask, int sp, int fp) +__sigsetjmp_aux (jmp_buf env, int savemask, long long sp, long long fp, + long long gp) { /* Store the floating point callee-saved registers... */ asm volatile ("s.d $f24, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[0])); @@ -47,7 +48,7 @@ __sigsetjmp_aux (jmp_buf env, int savemask, int sp, int fp) env[0].__jmpbuf[0].__fp = fp; /* .. and the GP; */ - asm volatile ("sd $gp, %0" : : "m" (env[0].__jmpbuf[0].__gp)); + env[0].__jmpbuf[0].__gp = gp; /* .. and the callee-saved registers; */ asm volatile ("sd $16, %0" : : "m" (env[0].__jmpbuf[0].__regs[0])); diff --git a/sysdeps/mips/setjmp_aux.c b/sysdeps/mips/setjmp_aux.c index 9e6766f949..7125cc4f81 100644 --- a/sysdeps/mips/setjmp_aux.c +++ b/sysdeps/mips/setjmp_aux.c @@ -18,11 +18,6 @@ 02111-1307 USA. */ #include -#include - -#define STRINGXP(X) __STRING(X) -#define REGS STRINGXP(REG_S) -#define PTRS STRINGXP(PTR_S) /* This function is only called via the assembly language routine __sigsetjmp, which arranges to pass in the stack pointer and the frame @@ -33,26 +28,15 @@ int __sigsetjmp_aux (jmp_buf env, int savemask, int sp, int fp) { /* Store the floating point callee-saved registers... */ -#if _MIPS_SIM == _MIPS_SIM_ABI32 asm volatile ("s.d $f20, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[0])); asm volatile ("s.d $f22, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[1])); asm volatile ("s.d $f24, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[2])); asm volatile ("s.d $f26, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[3])); asm volatile ("s.d $f28, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[4])); asm volatile ("s.d $f30, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[5])); -#else - asm volatile ("s.d $f24, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[0])); - asm volatile ("s.d $f25, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[1])); - asm volatile ("s.d $f26, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[2])); - asm volatile ("s.d $f27, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[3])); - asm volatile ("s.d $f28, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[4])); - asm volatile ("s.d $f29, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[5])); - asm volatile ("s.d $f30, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[6])); - asm volatile ("s.d $f31, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[7])); -#endif /* .. and the PC; */ - asm volatile (PTRS " $31, %0" : : "m" (env[0].__jmpbuf[0].__pc)); + asm volatile ("sw $31, %0" : : "m" (env[0].__jmpbuf[0].__pc)); /* .. and the stack pointer; */ env[0].__jmpbuf[0].__sp = (void *) sp; @@ -61,17 +45,17 @@ __sigsetjmp_aux (jmp_buf env, int savemask, int sp, int fp) env[0].__jmpbuf[0].__fp = (void *) fp; /* .. and the GP; */ - asm volatile (PTRS " $gp, %0" : : "m" (env[0].__jmpbuf[0].__gp)); + asm volatile ("sw $gp, %0" : : "m" (env[0].__jmpbuf[0].__gp)); /* .. and the callee-saved registers; */ - asm volatile (REGS " $16, %0" : : "m" (env[0].__jmpbuf[0].__regs[0])); - asm volatile (REGS " $17, %0" : : "m" (env[0].__jmpbuf[0].__regs[1])); - asm volatile (REGS " $18, %0" : : "m" (env[0].__jmpbuf[0].__regs[2])); - asm volatile (REGS " $19, %0" : : "m" (env[0].__jmpbuf[0].__regs[3])); - asm volatile (REGS " $20, %0" : : "m" (env[0].__jmpbuf[0].__regs[4])); - asm volatile (REGS " $21, %0" : : "m" (env[0].__jmpbuf[0].__regs[5])); - asm volatile (REGS " $22, %0" : : "m" (env[0].__jmpbuf[0].__regs[6])); - asm volatile (REGS " $23, %0" : : "m" (env[0].__jmpbuf[0].__regs[7])); + asm volatile ("sw $16, %0" : : "m" (env[0].__jmpbuf[0].__regs[0])); + asm volatile ("sw $17, %0" : : "m" (env[0].__jmpbuf[0].__regs[1])); + asm volatile ("sw $18, %0" : : "m" (env[0].__jmpbuf[0].__regs[2])); + asm volatile ("sw $19, %0" : : "m" (env[0].__jmpbuf[0].__regs[3])); + asm volatile ("sw $20, %0" : : "m" (env[0].__jmpbuf[0].__regs[4])); + asm volatile ("sw $21, %0" : : "m" (env[0].__jmpbuf[0].__regs[5])); + asm volatile ("sw $22, %0" : : "m" (env[0].__jmpbuf[0].__regs[6])); + asm volatile ("sw $23, %0" : : "m" (env[0].__jmpbuf[0].__regs[7])); /* .. and finally get and reconstruct the floating point csr. */ asm ("cfc1 %0, $31" : "=r" (env[0].__jmpbuf[0].__fpc_csr)); From 1a58876cc71bd11da3f8c70c4e0c18d566bd84eb Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Thu, 20 Mar 2003 17:59:45 +0000 Subject: [PATCH 3073/4487] * sysdeps/mips/ieee754.h: Remove excess #endif. --- sysdeps/mips/ieee754.h | 1 - 1 file changed, 1 deletion(-) diff --git a/sysdeps/mips/ieee754.h b/sysdeps/mips/ieee754.h index febae1deeb..ed13de2775 100644 --- a/sysdeps/mips/ieee754.h +++ b/sysdeps/mips/ieee754.h @@ -182,7 +182,6 @@ union ieee854_long_double unsigned int negative:1; #endif /* Little endian. */ } ieee_nan; -#endif }; #define IEEE854_LONG_DOUBLE_BIAS 0x3fff /* Added to exponent. */ From fe638fda3cee91f808b90a371768e3d44bf88245 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Thu, 20 Mar 2003 20:58:02 +0000 Subject: [PATCH 3074/4487] * sysdeps/unix/sysv/linux/mips/pread.c: Don't break up offset into high and low halves on n64. * sysdeps/unix/sysv/linux/mips/pread64.c: Likewise. * sysdeps/unix/sysv/linux/mips/pwrite.c: Likewise. * sysdeps/unix/sysv/linux/mips/pwrite64.c: Likewise. --- sysdeps/unix/sysv/linux/mips/pread.c | 20 ++++++++++++++++++-- sysdeps/unix/sysv/linux/mips/pread64.c | 20 ++++++++++++++++++-- sysdeps/unix/sysv/linux/mips/pwrite.c | 24 ++++++++++++++++++++---- sysdeps/unix/sysv/linux/mips/pwrite64.c | 20 ++++++++++++++++++-- 4 files changed, 74 insertions(+), 10 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/pread.c b/sysdeps/unix/sysv/linux/mips/pread.c index e6cb21ff93..dc278d4401 100644 --- a/sysdeps/unix/sysv/linux/mips/pread.c +++ b/sysdeps/unix/sysv/linux/mips/pread.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 2000, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2000, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -42,7 +42,13 @@ static ssize_t __emulate_pread (int fd, void *buf, size_t count, off_t offset) internal_function; # endif extern ssize_t __syscall_pread (int fd, void *__unbounded buf, size_t count, - int dummy, off_t offset_hi, off_t offset_lo); + int dummy, +#if defined _ABI64 && _MIPS_SIM == _ABI64 + off_t offset +#else + off_t offset_hi, off_t offset_lo +#endif + ); @@ -59,8 +65,13 @@ __libc_pread (fd, buf, count, offset) { /* First try the syscall. */ assert (sizeof (offset) == 4); +#if defined _ABI64 && _MIPS_SIM == _ABI64 + result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, + offset); +#else result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, __LONG_LONG_PAIR (offset >> 31, offset)); +#endif # if __ASSUME_PREAD_SYSCALL == 0 if (result == -1 && errno == ENOSYS) /* No system call available. Use the emulation. */ @@ -73,8 +84,13 @@ __libc_pread (fd, buf, count, offset) /* First try the syscall. */ assert (sizeof (offset) == 4); +#if defined _ABI64 && _MIPS_SIM == _ABI64 + result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, + offset); +#else result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, __LONG_LONG_PAIR (offset >> 31, offset)); +#endif # if __ASSUME_PREAD_SYSCALL == 0 if (result == -1 && errno == ENOSYS) /* No system call available. Use the emulation. */ diff --git a/sysdeps/unix/sysv/linux/mips/pread64.c b/sysdeps/unix/sysv/linux/mips/pread64.c index 36ec100fb3..12c9cc0ba1 100644 --- a/sysdeps/unix/sysv/linux/mips/pread64.c +++ b/sysdeps/unix/sysv/linux/mips/pread64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2000, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -42,7 +42,13 @@ static ssize_t __emulate_pread64 (int fd, void *buf, size_t count, # endif extern ssize_t __syscall_pread (int fd, void *__unbounded buf, size_t count, - int dummy, off_t offset_hi, off_t offset_lo); + int dummy, +#if defined _ABI64 && _MIPS_SIM == _ABI64 + off_t offset +#else + off_t offset_hi, off_t offset_lo +#endif + ); @@ -59,9 +65,14 @@ __libc_pread64 (fd, buf, count, offset) if (SINGLE_THREAD_P) { /* First try the syscall. */ +#if defined _ABI64 && _MIPS_SIM == _ABI64 + result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, + offset); +#else result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, __LONG_LONG_PAIR ((off_t) (offset >> 32), (off_t) (offset & 0xffffffff))); +#endif # if __ASSUME_PREAD_SYSCALL == 0 if (result == -1 && errno == ENOSYS) /* No system call available. Use the emulation. */ @@ -73,9 +84,14 @@ __libc_pread64 (fd, buf, count, offset) int oldtype = LIBC_CANCEL_ASYNC (); /* First try the syscall. */ +#if defined _ABI64 && _MIPS_SIM == _ABI64 + result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, + offset); +#else result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, __LONG_LONG_PAIR ((off_t) (offset >> 32), (off_t) (offset & 0xffffffff))); +#endif # if __ASSUME_PREAD_SYSCALL == 0 if (result == -1 && errno == ENOSYS) /* No system call available. Use the emulation. */ diff --git a/sysdeps/unix/sysv/linux/mips/pwrite.c b/sysdeps/unix/sysv/linux/mips/pwrite.c index f25e327877..1778d077ed 100644 --- a/sysdeps/unix/sysv/linux/mips/pwrite.c +++ b/sysdeps/unix/sysv/linux/mips/pwrite.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 2000, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2000, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -38,7 +38,13 @@ #if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0 extern ssize_t __syscall_pwrite (int fd, const void *__unbounded buf, size_t count, - int dummy, off_t offset_hi, off_t offset_lo); + int dummy, +#if defined _ABI64 && _MIPS_SIM == _ABI64 + off_t offset +#else + off_t offset_hi, off_t offset_lo +#endif + ); # if __ASSUME_PWRITE_SYSCALL == 0 static ssize_t __emulate_pwrite (int fd, const void *buf, size_t count, @@ -58,8 +64,13 @@ __libc_pwrite (fd, buf, count, offset) { /* First try the syscall. */ assert (sizeof (offset) == 4); +#if defined _ABI64 && _MIPS_SIM == _ABI64 result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0, - __LONG_LONG_PAIR (offset >> 31, offset)); + offset); +#else + result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0, + __LONG_LONG_PAIR (offset >> 31, offset)); +#endif # if __ASSUME_PWRITE_SYSCALL == 0 if (result == -1 && errno == ENOSYS) /* No system call available. Use the emulation. */ @@ -73,8 +84,13 @@ __libc_pwrite (fd, buf, count, offset) /* First try the syscall. */ assert (sizeof (offset) == 4); +#if defined _ABI64 && _MIPS_SIM == _ABI64 result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0, - __LONG_LONG_PAIR (offset >> 31, offset)); + offset); +#else + result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0, + __LONG_LONG_PAIR (offset >> 31, offset)); +#endif # if __ASSUME_PWRITE_SYSCALL == 0 if (result == -1 && errno == ENOSYS) /* No system call available. Use the emulation. */ diff --git a/sysdeps/unix/sysv/linux/mips/pwrite64.c b/sysdeps/unix/sysv/linux/mips/pwrite64.c index 0accc1d37b..e43a378467 100644 --- a/sysdeps/unix/sysv/linux/mips/pwrite64.c +++ b/sysdeps/unix/sysv/linux/mips/pwrite64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 2000, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2000, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ralf Baechle , 1998. @@ -37,7 +37,13 @@ #if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0 extern ssize_t __syscall_pwrite (int fd, const void *__unbounded buf, size_t count, - int dummy, off_t offset_hi, off_t offset_lo); + int dummy, +#if defined _ABI64 && _MIPS_SIM == _ABI64 + off_t offset +#else + off_t offset_hi, off_t offset_lo +#endif + ); # if __ASSUME_PWRITE_SYSCALL == 0 static ssize_t __emulate_pwrite64 (int fd, const void *buf, size_t count, @@ -56,9 +62,14 @@ __libc_pwrite64 (fd, buf, count, offset) if (SINGLE_THREAD_P) { /* First try the syscall. */ +#if defined _ABI64 && _MIPS_SIM == _ABI64 + result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0, + offset); +#else result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0, __LONG_LONG_PAIR ((off_t) (offset >> 32), (off_t) (offset & 0xffffffff))); +#endif # if __ASSUME_PWRITE_SYSCALL == 0 if (result == -1 && errno == ENOSYS) /* No system call available. Use the emulation. */ @@ -71,9 +82,14 @@ __libc_pwrite64 (fd, buf, count, offset) int oldtype = LIBC_CANCEL_ASYNC (); /* First try the syscall. */ +#if defined _ABI64 && _MIPS_SIM == _ABI64 + result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0, + offset); +#else result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0, __LONG_LONG_PAIR ((off_t) (offset >> 32), (off_t) (offset & 0xffffffff))); +#endif # if __ASSUME_PWRITE_SYSCALL == 0 if (result == -1 && errno == ENOSYS) /* No system call available. Use the emulation. */ From a5b668cc8ac96ee35372c7e0df114fc76246d0d7 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Thu, 20 Mar 2003 22:29:44 +0000 Subject: [PATCH 3075/4487] * sysdeps/mips/bits/setjmp.h: n32 has only 6 call-saved fpregs. * sysdeps/mips/mips64/setjmp_aux.c (__sigsetjmp_aux): Adjust. * sysdeps/mips/mips64/__longjmp.c (__longjmp): Likewise. --- sysdeps/mips/bits/setjmp.h | 6 +++--- sysdeps/mips/mips64/__longjmp.c | 11 ++++++++++- sysdeps/mips/mips64/setjmp_aux.c | 9 +++++++++ 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/sysdeps/mips/bits/setjmp.h b/sysdeps/mips/bits/setjmp.h index 562c13243c..b2ee3749dd 100644 --- a/sysdeps/mips/bits/setjmp.h +++ b/sysdeps/mips/bits/setjmp.h @@ -60,10 +60,10 @@ typedef struct int __fpc_csr; /* Callee-saved floating point registers. */ -#if _MIPS_SIM == _MIPS_SIM_ABI32 - double __fpregs[6]; -#else +#if defined _ABI64 && _MIPS_SIM == _ABI64 double __fpregs[8]; +#else + double __fpregs[6]; #endif } __jmp_buf[1]; diff --git a/sysdeps/mips/mips64/__longjmp.c b/sysdeps/mips/mips64/__longjmp.c index 6523d49d9c..32587d1c87 100644 --- a/sysdeps/mips/mips64/__longjmp.c +++ b/sysdeps/mips/mips64/__longjmp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1995, 1997, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995, 1997, 2000, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -38,6 +38,7 @@ __longjmp (env, val_arg) register int val asm ("a1"); /* Pull back the floating point callee-saved registers. */ +#if defined _ABI64 && _MIPS_SIM == _ABI64 asm volatile ("l.d $f24, %0" : : "m" (env[0].__fpregs[0])); asm volatile ("l.d $f25, %0" : : "m" (env[0].__fpregs[1])); asm volatile ("l.d $f26, %0" : : "m" (env[0].__fpregs[2])); @@ -46,6 +47,14 @@ __longjmp (env, val_arg) asm volatile ("l.d $f29, %0" : : "m" (env[0].__fpregs[5])); asm volatile ("l.d $f30, %0" : : "m" (env[0].__fpregs[6])); asm volatile ("l.d $f31, %0" : : "m" (env[0].__fpregs[7])); +#else + asm volatile ("l.d $f20, %0" : : "m" (env[0].__fpregs[0])); + asm volatile ("l.d $f22, %0" : : "m" (env[0].__fpregs[1])); + asm volatile ("l.d $f24, %0" : : "m" (env[0].__fpregs[2])); + asm volatile ("l.d $f26, %0" : : "m" (env[0].__fpregs[3])); + asm volatile ("l.d $f28, %0" : : "m" (env[0].__fpregs[4])); + asm volatile ("l.d $f30, %0" : : "m" (env[0].__fpregs[5])); +#endif /* Get and reconstruct the floating point csr. */ asm volatile ("lw $2, %0" : : "m" (env[0].__fpc_csr)); diff --git a/sysdeps/mips/mips64/setjmp_aux.c b/sysdeps/mips/mips64/setjmp_aux.c index db75a21a30..b55a3c6c11 100644 --- a/sysdeps/mips/mips64/setjmp_aux.c +++ b/sysdeps/mips/mips64/setjmp_aux.c @@ -29,6 +29,7 @@ __sigsetjmp_aux (jmp_buf env, int savemask, long long sp, long long fp, long long gp) { /* Store the floating point callee-saved registers... */ +#if defined _ABI64 && _MIPS_SIM == _ABI64 asm volatile ("s.d $f24, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[0])); asm volatile ("s.d $f25, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[1])); asm volatile ("s.d $f26, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[2])); @@ -37,6 +38,14 @@ __sigsetjmp_aux (jmp_buf env, int savemask, long long sp, long long fp, asm volatile ("s.d $f29, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[5])); asm volatile ("s.d $f30, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[6])); asm volatile ("s.d $f31, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[7])); +#else + asm volatile ("s.d $f20, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[0])); + asm volatile ("s.d $f22, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[1])); + asm volatile ("s.d $f24, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[2])); + asm volatile ("s.d $f26, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[3])); + asm volatile ("s.d $f28, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[4])); + asm volatile ("s.d $f30, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[5])); +#endif /* .. and the PC; */ asm volatile ("sd $31, %0" : : "m" (env[0].__jmpbuf[0].__pc)); From 500308e11d71fb512ef05708858f9e8ef66d9a8a Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Fri, 21 Mar 2003 19:44:24 +0000 Subject: [PATCH 3076/4487] * sysdeps/mips/mips64/memcpy.S, sysdeps/mips/mips64/memset.S: New. * sysdeps/mips/memcpy.S, sysdeps/mips/memset.S: Update comments. --- sysdeps/mips/memcpy.S | 20 +---- sysdeps/mips/memset.S | 14 +--- sysdeps/mips/mips64/memcpy.S | 139 +++++++++++++++++++++++++++++++++++ sysdeps/mips/mips64/memset.S | 91 +++++++++++++++++++++++ 4 files changed, 232 insertions(+), 32 deletions(-) create mode 100644 sysdeps/mips/mips64/memcpy.S create mode 100644 sysdeps/mips/mips64/memset.S diff --git a/sysdeps/mips/memcpy.S b/sysdeps/mips/memcpy.S index c77f1b8d97..1e9130f6bd 100644 --- a/sysdeps/mips/memcpy.S +++ b/sysdeps/mips/memcpy.S @@ -21,12 +21,7 @@ #include -/* void *memcpy(void *s1, const void *s2, size_t n); - - This routine could be optimized further for MIPS64, but this is left - as an exercise for the future. When it is done, the file should be kept - as a sisterfile to this one, and placed in the sysdeps/mips/mips64 - directory. */ +/* void *memcpy(void *s1, const void *s2, size_t n); */ #if __BYTE_ORDER == __BIG_ENDIAN # define LWHI lwl /* high part is left in big-endian */ @@ -40,19 +35,6 @@ # define SWLO swl /* low part is left in little-endian */ #endif -#ifndef t0 -# define t0 a4 -#endif -#ifndef t1 -# define t1 a5 -#endif -#ifndef t2 -# define t2 a6 -#endif -#ifndef t3 -# define t3 a7 -#endif - ENTRY (memcpy) .set noreorder diff --git a/sysdeps/mips/memset.S b/sysdeps/mips/memset.S index 46811340ec..b372d292f2 100644 --- a/sysdeps/mips/memset.S +++ b/sysdeps/mips/memset.S @@ -21,12 +21,7 @@ #include -/* void *memset(void *s, int c, size_t n). - - This routine could be optimized further for MIPS64, but this is left - as an exercise for the future. When it is done, the file should be kept - as a sisterfile to this one, and placed in the sysdeps/mips/mips64 - directory. */ +/* void *memset(void *s, int c, size_t n). */ #if __BYTE_ORDER == __BIG_ENDIAN # define SWHI swl /* high part is left in big-endian */ @@ -34,13 +29,6 @@ # define SWHI swr /* high part is right in little-endian */ #endif -#ifndef t0 -# define t0 a4 -#endif -#ifndef t1 -# define t1 a5 -#endif - ENTRY (memset) .set noreorder diff --git a/sysdeps/mips/mips64/memcpy.S b/sysdeps/mips/mips64/memcpy.S new file mode 100644 index 0000000000..3dbb31f49a --- /dev/null +++ b/sysdeps/mips/mips64/memcpy.S @@ -0,0 +1,139 @@ +/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Hartvig Ekner , 2002. + Ported to mips3 n32/n64 by Alexandre Oliva + + 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. */ + +#include +#include +#include + + +/* void *memcpy(void *s1, const void *s2, size_t n); + + This could probably be optimized further. */ + +#if __BYTE_ORDER == __BIG_ENDIAN +# define LDHI ldl /* high part is left in big-endian */ +# define SDHI sdl /* high part is left in big-endian */ +# define LDLO ldr /* low part is right in big-endian */ +# define SDLO sdr /* low part is right in big-endian */ +#else +# define LDHI ldr /* high part is right in little-endian */ +# define SDHI sdr /* high part is right in little-endian */ +# define LDLO ldl /* low part is left in little-endian */ +# define SDLO sdl /* low part is left in little-endian */ +#endif + +ENTRY (memcpy) + .set noreorder + + slti a4, a2, 8 # Less than 8? + bne a4, zero, L(last8) + move v0, a0 # Setup exit value before too late + + xor a4, a1, a0 # Find a0/a1 displacement + andi a4, 0x7 + bne a4, zero, L(shift) # Go handle the unaligned case + PTR_SUBU a5, zero, a1 + andi a5, 0x7 # a0/a1 are aligned, but are we + beq a5, zero, L(chk8w) # starting in the middle of a word? + PTR_SUBU a2, a5 + LDHI a4, 0(a1) # Yes we are... take care of that + PTR_ADDU a1, a5 + SDHI a4, 0(a0) + PTR_ADDU a0, a5 + +L(chk8w): + andi a4, a2, 0x3f # 64 or more bytes left? + beq a4, a2, L(chk1w) + PTR_SUBU a3, a2, a4 # Yes + PTR_ADDU a3, a1 # a3 = end address of loop + move a2, a4 # a2 = what will be left after loop +L(lop8w): + ld a4, 0(a1) # Loop taking 8 words at a time + ld a5, 8(a1) + ld a6, 16(a1) + ld a7, 24(a1) + ld t4, 32(a1) + ld t5, 40(a1) + ld t6, 48(a1) + ld t7, 56(a1) + PTR_ADDIU a0, 64 + PTR_ADDIU a1, 64 + sd a4, -64(a0) + sd a5, -56(a0) + sd a6, -48(a0) + sd a7, -40(a0) + sd t4, -32(a0) + sd t5, -24(a0) + sd t6, -16(a0) + bne a1, a3, L(lop8w) + sd t7, -8(a0) + +L(chk1w): + andi a4, a2, 0x7 # 4 or more bytes left? + beq a4, a2, L(last8) + PTR_SUBU a3, a2, a4 # Yes, handle them one word at a time + PTR_ADDU a3, a1 # a3 again end address + move a2, a4 +L(lop1w): + ld a4, 0(a1) + PTR_ADDIU a0, 8 + PTR_ADDIU a1, 8 + bne a1, a3, L(lop1w) + sd a4, -8(a0) + +L(last8): + blez a2, L(lst8e) # Handle last 8 bytes, one at a time + PTR_ADDU a3, a2, a1 +L(lst8l): + lb a4, 0(a1) + PTR_ADDIU a0, 1 + PTR_ADDIU a1, 1 + bne a1, a3, L(lst8l) + sb a4, -1(a0) +L(lst8e): + jr ra # Bye, bye + nop + +L(shift): + PTR_SUBU a3, zero, a0 # Src and Dest unaligned + andi a3, 0x7 # (unoptimized case...) + beq a3, zero, L(shfa5) + PTR_SUBU a2, a3 # a2 = bytes left + LDHI a4, 0(a1) # Take care of first odd part + LDLO a4, 7(a1) + PTR_ADDU a1, a3 + SDHI a4, 0(a0) + PTR_ADDU a0, a3 +L(shfa5): + andi a4, a2, 0x7 + PTR_SUBU a3, a2, a4 + PTR_ADDU a3, a1 +L(shfth): + LDHI a5, 0(a1) # Limp through, word by word + LDLO a5, 7(a1) + PTR_ADDIU a0, 8 + PTR_ADDIU a1, 8 + bne a1, a3, L(shfth) + sd a5, -8(a0) + b L(last8) # Handle anything which may be left + move a2, a4 + + .set reorder +END (memcpy) diff --git a/sysdeps/mips/mips64/memset.S b/sysdeps/mips/mips64/memset.S new file mode 100644 index 0000000000..6a3b154bad --- /dev/null +++ b/sysdeps/mips/mips64/memset.S @@ -0,0 +1,91 @@ +/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Hartvig Ekner , 2002. + Ported to mips3 n32/n64 by Alexandre Oliva + + 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. */ + +#include +#include +#include + + +/* void *memset(void *s, int c, size_t n); + + This could probably be optimized further. */ + +#if __BYTE_ORDER == __BIG_ENDIAN +# define SDHI sdl /* high part is left in big-endian */ +#else +# define SDHI sdr /* high part is right in little-endian */ +#endif + +ENTRY (memset) + .set noreorder + + slti t5, a2, 8 # Less than 8? + bne t5, zero, L(last8) + move v0, a0 # Setup exit value before too late + + beq a1, zero, L(ueven) # If zero pattern, no need to extend + andi a1, 0xff # Avoid problems with bogus arguments + dsll t4, a1, 8 + or a1, t4 + dsll t4, a1, 16 + or a1, t4 # a1 is now pattern in full word + dsll t4, a1, 32 + or a1, t4 # a1 is now pattern in double word + +L(ueven): + PTR_SUBU t4, zero, a0 # Unaligned address? + andi t4, 0x7 + beq t4, zero, L(chkw) + PTR_SUBU a2, t4 + SDHI a1, 0(a0) # Yes, handle first unaligned part + PTR_ADDU a0, t4 # Now both a0 and a2 are updated + +L(chkw): + andi t4, a2, 0xf # Enough left for one loop iteration? + beq t4, a2, L(chkl) + PTR_SUBU a3, a2, t4 + PTR_ADDU a3, a0 # a3 is last loop address +1 + move a2, t4 # a2 is now # of bytes left after loop +L(loopw): + PTR_ADDIU a0, 16 # Handle 2 words pr. iteration + sd a1, -16(a0) + bne a0, a3, L(loopw) + sd a1, -8(a0) + +L(chkl): + andi t4, a2, 0x8 # Check if there is at least a double + beq t4, zero, L(last8) # word remaining after the loop + PTR_SUBU a2, t4 + sd a1, 0(a0) # Yes... + PTR_ADDIU a0, 8 + +L(last8): + blez a2, L(exit) # Handle last 8 bytes (if cnt>0) + PTR_ADDU a3, a2, a0 # a3 is last address +1 +L(lst8l): + PTR_ADDIU a0, 1 + bne a0, a3, L(lst8l) + sb a1, -1(a0) +L(exit): + j ra # Bye, bye + nop + + .set reorder +END (memset) From 2f15520df9c1dec61192ae3b4c5ac0e42f58af04 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 21 Mar 2003 20:49:58 +0000 Subject: [PATCH 3077/4487] 2003-03-21 Daniel Jacobowitz * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (SINGLE_THREAD_P_PIC): Use "reg" instead of "lr". --- sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h index 38e472d2ba..47af28090b 100644 --- a/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h @@ -110,7 +110,7 @@ extern int __local_multiple_threads attribute_hidden; ldr reg, 2b; \ 3: \ add ip, pc, ip; \ - ldr ip, [ip, lr]; \ + ldr ip, [ip, reg]; \ teq ip, #0; # define SINGLE_THREAD_P_INT \ str lr, [sp, $-4]!; \ From 4208b5c7710e2a6da54f163a173a56393d1ed620 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 21 Mar 2003 20:51:59 +0000 Subject: [PATCH 3078/4487] 2003-03-21 Roland McGrath * sysdeps/arm/sysdep.h (CALL_MCOUNT): Add trailing semicolon. --- sysdeps/arm/sysdep.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/arm/sysdep.h b/sysdeps/arm/sysdep.h index 8d5ab95348..4bc7d827b8 100644 --- a/sysdeps/arm/sysdep.h +++ b/sysdeps/arm/sysdep.h @@ -1,5 +1,5 @@ /* Assembler macros for ARM. - Copyright (C) 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 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 @@ -76,7 +76,7 @@ #define CALL_MCOUNT \ str lr,[sp, #-4]! ; \ bl PLTJMP(mcount) ; \ - ldr lr, [sp], #4 + ldr lr, [sp], #4 ; #else #define CALL_MCOUNT /* Do nothing. */ #endif From 2b15a211808e92234b984fd9c4c71af90eb9ade3 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Fri, 21 Mar 2003 21:39:39 +0000 Subject: [PATCH 3079/4487] * sysdeps/mips/mips64/memcpy.S: Fix porting bug that broke unaligned copying of 8-15 bytes. From Chris Demetriou . Fix label names. * sysdeps/mips/mips64/memset.S: Fix label names. Make similar change as to memcpy.S. * sysdeps/mips/memcpy.S: Formatting changes. * sysdeps/mips/memset.S: Likewise. --- sysdeps/mips/memcpy.S | 32 +++++++++++++++++++++----------- sysdeps/mips/memset.S | 21 ++++++++++++++------- sysdeps/mips/mips64/memcpy.S | 30 +++++++++++++++--------------- sysdeps/mips/mips64/memset.S | 16 ++++++++-------- 4 files changed, 58 insertions(+), 41 deletions(-) diff --git a/sysdeps/mips/memcpy.S b/sysdeps/mips/memcpy.S index 1e9130f6bd..05d209739e 100644 --- a/sysdeps/mips/memcpy.S +++ b/sysdeps/mips/memcpy.S @@ -54,12 +54,14 @@ ENTRY (memcpy) SWHI t0, 0(a0) addu a0, t1 -L(chk8w): andi t0, a2, 0x1f # 32 or more bytes left? +L(chk8w): + andi t0, a2, 0x1f # 32 or more bytes left? beq t0, a2, L(chk1w) subu a3, a2, t0 # Yes addu a3, a1 # a3 = end address of loop move a2, t0 # a2 = what will be left after loop -L(lop8w): lw t0, 0(a1) # Loop taking 8 words at a time +L(lop8w): + lw t0, 0(a1) # Loop taking 8 words at a time lw t1, 4(a1) lw t2, 8(a1) lw t3, 12(a1) @@ -79,28 +81,34 @@ L(lop8w): lw t0, 0(a1) # Loop taking 8 words at a time bne a1, a3, L(lop8w) sw t7, -4(a0) -L(chk1w): andi t0, a2, 0x3 # 4 or more bytes left? +L(chk1w): + andi t0, a2, 0x3 # 4 or more bytes left? beq t0, a2, L(last8) subu a3, a2, t0 # Yes, handle them one word at a time addu a3, a1 # a3 again end address move a2, t0 -L(lop1w): lw t0, 0(a1) +L(lop1w): + lw t0, 0(a1) addiu a0, 4 addiu a1, 4 bne a1, a3, L(lop1w) sw t0, -4(a0) -L(last8): blez a2, L(lst8e) # Handle last 8 bytes, one at a time +L(last8): + blez a2, L(lst8e) # Handle last 8 bytes, one at a time addu a3, a2, a1 -L(lst8l): lb t0, 0(a1) +L(lst8l): + lb t0, 0(a1) addiu a0, 1 addiu a1, 1 bne a1, a3, L(lst8l) sb t0, -1(a0) -L(lst8e): jr ra # Bye, bye +L(lst8e): + jr ra # Bye, bye nop -L(shift): subu a3, zero, a0 # Src and Dest unaligned +L(shift): + subu a3, zero, a0 # Src and Dest unaligned andi a3, 0x3 # (unoptimized case...) beq a3, zero, L(shft1) subu a2, a3 # a2 = bytes left @@ -109,16 +117,18 @@ L(shift): subu a3, zero, a0 # Src and Dest unaligned addu a1, a3 SWHI t0, 0(a0) addu a0, a3 -L(shft1): andi t0, a2, 0x3 +L(shft1): + andi t0, a2, 0x3 subu a3, a2, t0 addu a3, a1 -L(shfth): LWHI t1, 0(a1) # Limp through, word by word +L(shfth): + LWHI t1, 0(a1) # Limp through, word by word LWLO t1, 3(a1) addiu a0, 4 addiu a1, 4 bne a1, a3, L(shfth) sw t1, -4(a0) - b L(last8) # Handle anything which may be left + b L(last8) # Handle anything which may be left move a2, t0 .set reorder diff --git a/sysdeps/mips/memset.S b/sysdeps/mips/memset.S index b372d292f2..f120123544 100644 --- a/sysdeps/mips/memset.S +++ b/sysdeps/mips/memset.S @@ -43,35 +43,42 @@ ENTRY (memset) sll t0, a1, 16 or a1, t0 # a1 is now pattern in full word -L(ueven): subu t0, zero, a0 # Unaligned address? +L(ueven): + subu t0, zero, a0 # Unaligned address? andi t0, 0x3 beq t0, zero, L(chkw) subu a2, t0 SWHI a1, 0(a0) # Yes, handle first unaligned part addu a0, t0 # Now both a0 and a2 are updated -L(chkw): andi t0, a2, 0x7 # Enough left for one loop iteration? +L(chkw): + andi t0, a2, 0x7 # Enough left for one loop iteration? beq t0, a2, L(chkl) subu a3, a2, t0 addu a3, a0 # a3 is last loop address +1 move a2, t0 # a2 is now # of bytes left after loop -L(loopw): addiu a0, 8 # Handle 2 words pr. iteration +L(loopw): + addiu a0, 8 # Handle 2 words pr. iteration sw a1, -8(a0) bne a0, a3, L(loopw) sw a1, -4(a0) -L(chkl): andi t0, a2, 0x4 # Check if there is at least a full +L(chkl): + andi t0, a2, 0x4 # Check if there is at least a full beq t0, zero, L(last8) # word remaining after the loop subu a2, t0 sw a1, 0(a0) # Yes... addiu a0, 4 -L(last8): blez a2, L(exit) # Handle last 8 bytes (if cnt>0) +L(last8): + blez a2, L(exit) # Handle last 8 bytes (if cnt>0) addu a3, a2, a0 # a3 is last address +1 -L(lst8l): addiu a0, 1 +L(lst8l): + addiu a0, 1 bne a0, a3, L(lst8l) sb a1, -1(a0) -L(exit): j ra # Bye, bye +L(exit): + j ra # Bye, bye nop .set reorder diff --git a/sysdeps/mips/mips64/memcpy.S b/sysdeps/mips/mips64/memcpy.S index 3dbb31f49a..c4ba7a8f51 100644 --- a/sysdeps/mips/mips64/memcpy.S +++ b/sysdeps/mips/mips64/memcpy.S @@ -42,8 +42,8 @@ ENTRY (memcpy) .set noreorder - slti a4, a2, 8 # Less than 8? - bne a4, zero, L(last8) + slti a4, a2, 16 # Less than 16? + bne a4, zero, L(last16) move v0, a0 # Setup exit value before too late xor a4, a1, a0 # Find a0/a1 displacement @@ -86,53 +86,53 @@ L(lop8w): sd t7, -8(a0) L(chk1w): - andi a4, a2, 0x7 # 4 or more bytes left? - beq a4, a2, L(last8) - PTR_SUBU a3, a2, a4 # Yes, handle them one word at a time + andi a4, a2, 0x7 # 8 or more bytes left? + beq a4, a2, L(last16) + PTR_SUBU a3, a2, a4 # Yes, handle them one dword at a time PTR_ADDU a3, a1 # a3 again end address move a2, a4 -L(lop1w): +L(lop1w): ld a4, 0(a1) PTR_ADDIU a0, 8 PTR_ADDIU a1, 8 bne a1, a3, L(lop1w) sd a4, -8(a0) -L(last8): - blez a2, L(lst8e) # Handle last 8 bytes, one at a time +L(last16): + blez a2, L(lst16e) # Handle last 16 bytes, one at a time PTR_ADDU a3, a2, a1 -L(lst8l): +L(lst16l): lb a4, 0(a1) PTR_ADDIU a0, 1 PTR_ADDIU a1, 1 - bne a1, a3, L(lst8l) + bne a1, a3, L(lst16l) sb a4, -1(a0) -L(lst8e): +L(lst16e): jr ra # Bye, bye nop L(shift): PTR_SUBU a3, zero, a0 # Src and Dest unaligned andi a3, 0x7 # (unoptimized case...) - beq a3, zero, L(shfa5) + beq a3, zero, L(shft1) PTR_SUBU a2, a3 # a2 = bytes left LDHI a4, 0(a1) # Take care of first odd part LDLO a4, 7(a1) PTR_ADDU a1, a3 SDHI a4, 0(a0) PTR_ADDU a0, a3 -L(shfa5): +L(shft1): andi a4, a2, 0x7 PTR_SUBU a3, a2, a4 PTR_ADDU a3, a1 L(shfth): - LDHI a5, 0(a1) # Limp through, word by word + LDHI a5, 0(a1) # Limp through, dword by dword LDLO a5, 7(a1) PTR_ADDIU a0, 8 PTR_ADDIU a1, 8 bne a1, a3, L(shfth) sd a5, -8(a0) - b L(last8) # Handle anything which may be left + b L(last16) # Handle anything which may be left move a2, a4 .set reorder diff --git a/sysdeps/mips/mips64/memset.S b/sysdeps/mips/mips64/memset.S index 6a3b154bad..d6e1790fbe 100644 --- a/sysdeps/mips/mips64/memset.S +++ b/sysdeps/mips/mips64/memset.S @@ -36,8 +36,8 @@ ENTRY (memset) .set noreorder - slti t5, a2, 8 # Less than 8? - bne t5, zero, L(last8) + slti t5, a2, 16 # Less than 16? + bne t5, zero, L(last16) move v0, a0 # Setup exit value before too late beq a1, zero, L(ueven) # If zero pattern, no need to extend @@ -64,24 +64,24 @@ L(chkw): PTR_ADDU a3, a0 # a3 is last loop address +1 move a2, t4 # a2 is now # of bytes left after loop L(loopw): - PTR_ADDIU a0, 16 # Handle 2 words pr. iteration + PTR_ADDIU a0, 16 # Handle 2 dwords pr. iteration sd a1, -16(a0) bne a0, a3, L(loopw) sd a1, -8(a0) L(chkl): andi t4, a2, 0x8 # Check if there is at least a double - beq t4, zero, L(last8) # word remaining after the loop + beq t4, zero, L(last16) # word remaining after the loop PTR_SUBU a2, t4 sd a1, 0(a0) # Yes... PTR_ADDIU a0, 8 -L(last8): - blez a2, L(exit) # Handle last 8 bytes (if cnt>0) +L(last16): + blez a2, L(exit) # Handle last 16 bytes (if cnt>0) PTR_ADDU a3, a2, a0 # a3 is last address +1 -L(lst8l): +L(lst16l): PTR_ADDIU a0, 1 - bne a0, a3, L(lst8l) + bne a0, a3, L(lst16l) sb a1, -1(a0) L(exit): j ra # Bye, bye From 721e2474d60830416b95a1a73e5d15280210f916 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Sat, 22 Mar 2003 12:50:46 +0000 Subject: [PATCH 3080/4487] * sysdeps/mips/dl-machine.h (ELF_MIPS_GNU_GOT1_MASK): Fix harmless typo in #if test. --- sysdeps/mips/dl-machine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index c7031dce0b..f64444176b 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -130,7 +130,7 @@ elf_machine_load_address (void) } /* The MSB of got[1] of a gnu object is set to identify gnu objects. */ -#ifdef _ABI64 && _MIPS_SIM == _ABI64 +#if defined _ABI64 && _MIPS_SIM == _ABI64 # define ELF_MIPS_GNU_GOT1_MASK 0x8000000000000000L #else # define ELF_MIPS_GNU_GOT1_MASK 0x80000000L From cfd77e42b8fc6021cd7f3a224953b6d4f8fa3802 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Sat, 22 Mar 2003 15:07:05 +0000 Subject: [PATCH 3081/4487] * sysdeps/mips/elf/ldsodefs.h: Add mips-specific elf64 relocation data structures and macros. Protect from multiple inclusion. --- sysdeps/mips/elf/ldsodefs.h | 86 ++++++++++++++++++++++++++++++++++++- 1 file changed, 85 insertions(+), 1 deletion(-) diff --git a/sysdeps/mips/elf/ldsodefs.h b/sysdeps/mips/elf/ldsodefs.h index cabc51d796..3868b50ff6 100644 --- a/sysdeps/mips/elf/ldsodefs.h +++ b/sysdeps/mips/elf/ldsodefs.h @@ -1,5 +1,5 @@ /* Run-time dynamic linker data structures for loaded ELF shared objects. - Copyright (C) 2000, 2002 Free Software Foundation, Inc. + Copyright (C) 2000, 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 @@ -17,9 +17,93 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#ifndef _MIPS_LDSODEFS_H +#define _MIPS_LDSODEFS_H /* The MIPS ABI specifies that the dynamic section has to be read-only. */ #define DL_RO_DYN_SECTION 1 #include_next + +/* The 64-bit MIPS ELF ABI uses an unusual reloc format. Each + relocation entry specifies up to three actual relocations, all at + the same address. The first relocation which required a symbol + uses the symbol in the r_sym field. The second relocation which + requires a symbol uses the symbol in the r_ssym field. If all + three relocations require a symbol, the third one uses a zero + value. + + We define these structures in internal headers because we're not + sure we want to make them part of the ABI yet. Eventually, some of + this may move into elf/elf.h. */ + +/* An entry in a 64 bit SHT_REL section. */ + +typedef struct +{ + Elf32_Word r_sym; /* Symbol index */ + unsigned char r_ssym; /* Special symbol for 2nd relocation */ + unsigned char r_type3; /* 3rd relocation type */ + unsigned char r_type2; /* 2nd relocation type */ + unsigned char r_type1; /* 1st relocation type */ +} _Elf64_Mips_R_Info; + +typedef union +{ + Elf64_Xword r_info_number; + _Elf64_Mips_R_Info r_info_fields; +} _Elf64_Mips_R_Info_union; + +typedef struct +{ + Elf64_Addr r_offset; /* Address */ + _Elf64_Mips_R_Info_union r_info; /* Relocation type and symbol index */ +} Elf64_Mips_Rel; + +typedef struct +{ + Elf64_Addr r_offset; /* Address */ + _Elf64_Mips_R_Info_union r_info; /* Relocation type and symbol index */ + Elf64_Sxword r_addend; /* Addend */ +} Elf64_Mips_Rela; + +#define ELF64_MIPS_R_SYM(i) \ + ((__extension__ (_Elf64_Mips_R_Info_union)(i)).r_info_fields.r_sym) +#define ELF64_MIPS_R_TYPE(i) \ + (((_Elf64_Mips_R_Info_union)(i)).r_info_fields.r_type1 \ + | ((Elf32_Word)(__extension__ (_Elf64_Mips_R_Info_union)(i) \ + ).r_info_fields.r_type2 << 8) \ + | ((Elf32_Word)(__extension__ (_Elf64_Mips_R_Info_union)(i) \ + ).r_info_fields.r_type3 << 16) \ + | ((Elf32_Word)(__extension__ (_Elf64_Mips_R_Info_union)(i) \ + ).r_info_fields.r_ssym << 24)) +#define ELF64_MIPS_R_INFO(sym, type) \ + (__extension__ (_Elf64_Mips_R_Info_union) \ + (__extension__ (_Elf64_Mips_R_Info) \ + { (sym), ELF64_MIPS_R_SSYM (type), \ + ELF64_MIPS_R_TYPE3 (type), \ + ELF64_MIPS_R_TYPE2 (type), \ + ELF64_MIPS_R_TYPE1 (type) \ + }).r_info_number) +/* These macros decompose the value returned by ELF64_MIPS_R_TYPE, and + compose it back into a value that it can be used as an argument to + ELF64_MIPS_R_INFO. */ +#define ELF64_MIPS_R_SSYM(i) (((i) >> 24) & 0xff) +#define ELF64_MIPS_R_TYPE3(i) (((i) >> 16) & 0xff) +#define ELF64_MIPS_R_TYPE2(i) (((i) >> 8) & 0xff) +#define ELF64_MIPS_R_TYPE1(i) ((i) & 0xff) +#define ELF64_MIPS_R_TYPEENC(type1, type2, type3, ssym) \ + ((type1) \ + | ((Elf32_Word)(type2) << 8) \ + | ((Elf32_Word)(type3) << 16) \ + | ((Elf32_Word)(ssym) << 24)) + +#undef ELF64_R_SYM +#define ELF64_R_SYM(i) ELF64_MIPS_R_SYM (i) +#undef ELF64_R_TYPE +#define ELF64_R_TYPE(i) ELF64_MIPS_R_TYPE (i) +#undef ELF64_R_INFO +#define ELF64_R_INFO(sym, type) ELF64_MIPS_R_INFO ((sym), (type)) + +#endif From d9a3227e9cfa3eae979c6a035919ea2b3836c932 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 22 Mar 2003 20:59:49 +0000 Subject: [PATCH 3082/4487] Atomic operations for m68020 and up. --- sysdeps/m68k/m68020/bits/atomic.h | 227 ++++++++++++++++++++++++++++++ 1 file changed, 227 insertions(+) create mode 100644 sysdeps/m68k/m68020/bits/atomic.h diff --git a/sysdeps/m68k/m68020/bits/atomic.h b/sysdeps/m68k/m68020/bits/atomic.h new file mode 100644 index 0000000000..09c33c19c8 --- /dev/null +++ b/sysdeps/m68k/m68020/bits/atomic.h @@ -0,0 +1,227 @@ +/* Copyright (C) 2003 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Schwab , 2003. + + 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. */ + +#include + + +typedef int8_t atomic8_t; +typedef uint8_t uatomic8_t; +typedef int_fast8_t atomic_fast8_t; +typedef uint_fast8_t uatomic_fast8_t; + +typedef int16_t atomic16_t; +typedef uint16_t uatomic16_t; +typedef int_fast16_t atomic_fast16_t; +typedef uint_fast16_t uatomic_fast16_t; + +typedef int32_t atomic32_t; +typedef uint32_t uatomic32_t; +typedef int_fast32_t atomic_fast32_t; +typedef uint_fast32_t uatomic_fast32_t; + +typedef int64_t atomic64_t; +typedef uint64_t uatomic64_t; +typedef int_fast64_t atomic_fast64_t; +typedef uint_fast64_t uatomic_fast64_t; + +typedef intptr_t atomicptr_t; +typedef uintptr_t uatomicptr_t; +typedef intmax_t atomic_max_t; +typedef uintmax_t uatomic_max_t; + +#define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval) \ + ({ __typeof (*(mem)) __ret; \ + __asm __volatile ("cas%.b %0,%2,%1" \ + : "=d" (__ret), "=m" (*(mem)) \ + : "d" (newval), "m" (*(mem)), "0" (oldval)); \ + __ret; }) + +#define __arch_compare_and_exchange_val_16_acq(mem, newval, oldval) \ + ({ __typeof (*(mem)) __ret; \ + __asm __volatile ("cas%.w %0,%2,%1" \ + : "=d" (__ret), "=m" (*(mem)) \ + : "d" (newval), "m" (*(mem)), "0" (oldval)); \ + __ret; }) + +#define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \ + ({ __typeof (*(mem)) __ret; \ + __asm __volatile ("cas%.l %0,%2,%1" \ + : "=d" (__ret), "=m" (*(mem)) \ + : "d" (newval), "m" (*(mem)), "0" (oldval)); \ + __ret; }) + +# define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \ + ({ __typeof (*(mem)) __ret; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile ("cas2%.l %0:%R0,%1:%R1,(%2):(%3)" \ + : "=d" (__ret) \ + : "d" (newval), "r" (__memp), \ + "r" ((char *) __memp + 4), "0" (oldval) \ + : "memory"); \ + __ret; }) + +#define atomic_exchange(mem, newvalue) \ + ({ __typeof (*(mem)) __result = *(mem); \ + if (sizeof (*(mem)) == 1) \ + __asm __volatile ("1: cas%.b %0,%2,%1;" \ + " jbne 1b" \ + : "=d" (__result), "=m" (*(mem)) \ + : "d" (newvalue), "m" (*(mem)), "0" (__result)); \ + else if (sizeof (*(mem)) == 2) \ + __asm __volatile ("1: cas%.w %0,%2,%1;" \ + " jbne 1b" \ + : "=d" (__result), "=m" (*(mem)) \ + : "d" (newvalue), "m" (*(mem)), "0" (__result)); \ + else if (sizeof (*(mem)) == 4) \ + __asm __volatile ("1: cas%.l %0,%2,%1;" \ + " jbne 1b" \ + : "=d" (__result), "=m" (*(mem)) \ + : "d" (newvalue), "m" (*(mem)), "0" (__result)); \ + else \ + { \ + __typeof (mem) __memp = (mem); \ + __asm __volatile ("1: cas2%.l %0:%R0,%1:%R1,(%2):(%3);" \ + " jbne 1b" \ + : "=d" (__result) \ + : "d" (newval), "r" (__memp), \ + "r" ((char *) __memp + 4), "0" (__result) \ + : "memory"); \ + } \ + __result; }) + +#define atomic_exchange_and_add(mem, value) \ + ({ __typeof (*(mem)) __result = *(mem); \ + __typeof (*(mem)) __temp; \ + if (sizeof (*(mem)) == 1) \ + __asm __volatile ("1: move%.b %0,%2;" \ + " add%.b %3,%2;" \ + " cas%.b %0,%2,%1;" \ + " jbne 1b" \ + : "=d" (__result), "=m" (*(mem)), \ + "=&d" (__temp) \ + : "d" (value), "1" (*(mem)), "0" (__result)); \ + else if (sizeof (*(mem)) == 2) \ + __asm __volatile ("1: move%.w %0,%2;" \ + " add%.w %3,%2;" \ + " cas%.w %0,%2,%1;" \ + " jbne 1b" \ + : "=d" (__result), "=m" (*(mem)), \ + "=&d" (__temp) \ + : "d" (value), "1" (*(mem)), "0" (__result)); \ + else if (sizeof (*(mem)) == 4) \ + __asm __volatile ("1: move%.l %0,%2;" \ + " add%.l %3,%2;" \ + " cas%.l %0,%2,%1;" \ + " jbne 1b" \ + : "=d" (__result), "=m" (*(mem)), \ + "=&d" (__temp) \ + : "d" (value), "1" (*(mem)), "0" (__result)); \ + else \ + { \ + __typeof (mem) __memp = (mem); \ + __asm __volatile ("1: move%.l %0,%1;" \ + " move%.l %R0,%R1;" \ + " add%.l %2,%1;" \ + " addx%.l %R2,%R1;" \ + " cas2%.l %0:%R0,%1:%R1,(%3):(%4);" \ + " jbne 1b" \ + : "=d" (__result), "=&d" (__temp) \ + : "d" (value), "r" (__memp), \ + "r" ((char *) __memp + 4), "0" (__result) \ + : "memory"); \ + } \ + __result; }) + +#define atomic_add(mem, value) \ + (void) ({ if (sizeof (*(mem)) == 1) \ + __asm __volatile ("add%.b %1,%0" \ + : "=m" (*(mem)) \ + : "id" (value), "0" (*(mem))); \ + else if (sizeof (*(mem)) == 2) \ + __asm __volatile ("add%.w %1,%0" \ + : "=m" (*(mem)) \ + : "id" (value), "0" (*(mem))); \ + else if (sizeof (*(mem)) == 4) \ + __asm __volatile ("add%.l %1,%0" \ + : "=m" (*(mem)) \ + : "id" (value), "0" (*(mem))); \ + else \ + { \ + __typeof (mem) __memp = (mem); \ + __typeof (*(mem)) __oldval = *__memp; \ + __typeof (*(mem)) __temp; \ + __asm __volatile ("1: move%.l %0,%1;" \ + " move%.l %R0,%R1;" \ + " add%.l %2,%1;" \ + " addx%.l %R2,%R1;" \ + " cas2%.l %0:%R0,%1:%R1,(%3):(%4);" \ + " jbne 1b" \ + : "=d" (__oldval), "=&d" (__temp) \ + : "d" (value), "r" (__memp), \ + "r" ((char *) __memp + 4), "0" (__oldval) \ + : "memory"); \ + } \ + }) + +#define atomic_decrement_and_test(mem) \ + ({ char __result; \ + if (sizeof (*(mem)) == 1) \ + __asm __volatile ("subq%.b %#1,%1; scs %0" \ + : "=dm" (__result), "=m" (*(mem)) \ + : "1" (*(mem))); \ + else if (sizeof (*(mem)) == 2) \ + __asm __volatile ("subq%.w %#1,%1; scs %0" \ + : "=dm" (__result), "=m" (*(mem)) \ + : "1" (*(mem))); \ + else if (sizeof (*(mem)) == 4) \ + __asm __volatile ("subq%.l %#1,%1; scs %0" \ + : "=dm" (__result), "=m" (*(mem)) \ + : "1" (*(mem))); \ + else \ + { \ + __typef (mem) __memp = (mem); \ + __typeof (*(mem)) __oldval = *__memp; \ + __typeof (*(mem)) __temp; \ + __asm __volatile ("1: move%.l %1,%2;" \ + " move%.l %R1,%R2;" \ + " subq%.l %#1,%2;" \ + " subx%.l %5,%R2;" \ + " scs %0;" \ + " cas2%.l %1:%R1,%2:%R2,(%3):(%4);" \ + " jbne 1b" \ + : "=&dm" (__result), "=d" (__oldval), \ + "=&d" (__temp) \ + : "r" (__memp), "r" ((char *) __memp + 4), \ + "d" (0), "1" (__oldval) \ + : "memory"); \ + } \ + __result; }) + +#define atomic_bit_set(mem, bit) \ + __asm __volatile ("bfset %0{%1,#1}" \ + : "=m" (*(mem)) \ + : "di" (sizeof (*(mem)) * 8 - (bit) - 1), "m" (*(mem))) + +#define atomic_bit_test_set(mem, bit) \ + ({ char __result; \ + __asm __volatile ("bfset %1{%2,#1}; sne %0" \ + : "=dm" (__result), "=m" (*(mem)) \ + : "di" (sizeof (*(mem)) * 8 - (bit) - 1), \ + "m" (*(mem))); \ + __result; }) From be1628459d784542a10ab56ca4d6e503b05899f1 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 22 Mar 2003 21:00:48 +0000 Subject: [PATCH 3083/4487] Superceded by atomic.h. --- sysdeps/m68k/m68020/atomicity.h | 64 --------------------------------- 1 file changed, 64 deletions(-) delete mode 100644 sysdeps/m68k/m68020/atomicity.h diff --git a/sysdeps/m68k/m68020/atomicity.h b/sysdeps/m68k/m68020/atomicity.h deleted file mode 100644 index 4649480867..0000000000 --- a/sysdeps/m68k/m68020/atomicity.h +++ /dev/null @@ -1,64 +0,0 @@ -/* Low-level functions for atomic operations. m680x0 version, x >= 2. - Copyright (C) 1997 Free Software Foundation, Inc. - Contributed by Andreas Schwab . - 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 _ATOMICITY_H -#define _ATOMICITY_H 1 - -#include - - -static inline int -__attribute__ ((unused)) -exchange_and_add (volatile uint32_t *mem, int val) -{ - register int result = *mem; - register int temp; - __asm__ __volatile__ ("1: move%.l %0,%1;" - " add%.l %2,%1;" - " cas%.l %0,%1,%3;" - " jbne 1b" - : "=d" (result), "=&d" (temp) - : "d" (val), "m" (*mem), "0" (result) : "memory"); - return result; -} - -static inline void -__attribute__ ((unused)) -atomic_add (volatile uint32_t *mem, int val) -{ - /* XXX Use cas here as well? */ - __asm__ __volatile__ ("add%.l %0,%1" - : : "id" (val), "m" (*mem) : "memory"); -} - -static inline int -__attribute__ ((unused)) -compare_and_swap (volatile long int *p, long int oldval, long int newval) -{ - char ret; - long int readval; - - __asm__ __volatile__ ("cas%.l %2,%3,%1; seq %0" - : "=dm" (ret), "=m" (*p), "=d" (readval) - : "d" (newval), "m" (*p), "2" (oldval)); - return ret; -} - -#endif /* atomicity.h */ From c33a5b512436e87dd1f5aa52748fcbce5f23a250 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 22 Mar 2003 21:17:47 +0000 Subject: [PATCH 3084/4487] Update. --- sysdeps/m68k/fpu/libm-test-ulps | 34 ++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/sysdeps/m68k/fpu/libm-test-ulps b/sysdeps/m68k/fpu/libm-test-ulps index b8b1d26e38..b4749d0b56 100644 --- a/sysdeps/m68k/fpu/libm-test-ulps +++ b/sysdeps/m68k/fpu/libm-test-ulps @@ -119,10 +119,10 @@ ildouble: 1 ldouble: 1 # ccos -Test "Real part of: ccos (-2 - 3 i) == -4.1896256909688072301 - 9.1092278937553365979 i": +Test "Real part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i": float: 1 ifloat: 1 -Test "Imaginary part of: ccos (-2 - 3 i) == -4.1896256909688072301 - 9.1092278937553365979 i": +Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i": float: 1 ifloat: 1 ildouble: 1 @@ -139,10 +139,10 @@ ildouble: 1 ldouble: 1 # ccosh -Test "Real part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i": +Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": float: 1 ifloat: 1 -Test "Imaginary part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i": +Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": float: 1 ifloat: 1 ildouble: 1 @@ -189,10 +189,10 @@ ifloat: 1 Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i": float: 1 ifloat: 1 -Test "Real part of: clog10 (-2 - 3 i) == 0.5569716761534183846 - 0.9375544629863747085 i": +Test "Real part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i": ildouble: 1 ldouble: 1 -Test "Imaginary part of: clog10 (-2 - 3 i) == 0.5569716761534183846 - 0.9375544629863747085 i": +Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i": ildouble: 1 ldouble: 1 Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i": @@ -336,10 +336,10 @@ ildouble: 1 ldouble: 1 # csin -Test "Real part of: csin (-2 - 3 i) == -9.1544991469114295734 + 4.1689069599665643507 i": +Test "Real part of: csin (-2 - 3 i) == -9.15449914691142957346729954460983256 + 4.16890695996656435075481305885375484 i": float: 1 ifloat: 1 -Test "Imaginary part of: csin (-2 - 3 i) == -9.1544991469114295734 + 4.1689069599665643507 i": +Test "Imaginary part of: csin (-2 - 3 i) == -9.15449914691142957346729954460983256 + 4.16890695996656435075481305885375484 i": float: 1 ifloat: 1 Test "Real part of: csin (0.75 + 1.25 i) == 1.28722291002649188575873510790565441 + 1.17210635989270256101081285116138863 i": @@ -352,10 +352,10 @@ float: 1 ifloat: 1 # csinh -Test "Real part of: csinh (-2 - 3 i) == 3.5905645899857799520 - 0.5309210862485198052 i": +Test "Real part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i": float: 1 ifloat: 1 -Test "Imaginary part of: csinh (-2 - 3 i) == 3.5905645899857799520 - 0.5309210862485198052 i": +Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i": float: 1 ifloat: 1 ildouble: 2 @@ -370,10 +370,10 @@ float: 1 ifloat: 1 # ctan -Test "Real part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i": +Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": ildouble: 439 ldouble: 439 -Test "Imaginary part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i": +Test "Imaginary part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": ildouble: 1 ldouble: 1 Test "Real part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i": @@ -384,10 +384,10 @@ ildouble: 2 ldouble: 2 # ctanh -Test "Real part of: ctanh (-2 - 3 i) == -0.9653858790221331242 + 0.0098843750383224937 i": +Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": ildouble: 2 ldouble: 2 -Test "Imaginary part of: ctanh (-2 - 3 i) == -0.9653858790221331242 + 0.0098843750383224937 i": +Test "Imaginary part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": ildouble: 25 ldouble: 25 Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i": @@ -599,12 +599,12 @@ ldouble: 1 Test "lgamma (0.5) == log(sqrt(pi))": ildouble: 1 ldouble: 1 -Test "lgamma (0.7) == 0.26086724653166651439": +Test "lgamma (0.7) == 0.260867246531666514385732417016759578": float: 1 ifloat: 1 ildouble: 1 ldouble: 1 -Test "lgamma (1.2) == -0.853740900033158497197e-1": +Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1": double: 1 float: 2 idouble: 1 @@ -698,7 +698,7 @@ float: 1 ifloat: 1 ildouble: 1 ldouble: 1 -Test "tgamma (0.7) == 1.29805533264755778568": +Test "tgamma (0.7) == 1.29805533264755778568117117915281162": double: 1 float: 1 idouble: 1 From fad367110e49bb8a732a307db499b2a637b3f4d2 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 23 Mar 2003 00:52:10 +0000 Subject: [PATCH 3085/4487] 2003-03-23 Jakub Jelinek * sysdeps/alpha/fpu/libm-test-ulps: Update. * sysdeps/arm/libm-test-ulps: Update. * sysdeps/hppa/fpu/libm-test-ulps: Update. * sysdeps/ia64/fpu/libm-test-ulps: Update. * sysdeps/mips/fpu/libm-test-ulps: Update. * sysdeps/powerpc/nofpu/libm-test-ulps: Update. * sysdeps/powerpc/fpu/libm-test-ulps: Update. * sysdeps/sparc/sparc32/fpu/libm-test-ulps: Update. * sysdeps/sparc/sparc64/fpu/libm-test-ulps: Update. * sysdeps/sh/sh4/fpu/libm-test-ulps: Update. * sysdeps/s390/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Update. --- sysdeps/alpha/fpu/libm-test-ulps | 20 ++++++++++---------- sysdeps/arm/libm-test-ulps | 20 ++++++++++---------- sysdeps/hppa/fpu/libm-test-ulps | 20 ++++++++++---------- sysdeps/mips/fpu/libm-test-ulps | 20 ++++++++++---------- sysdeps/powerpc/nofpu/libm-test-ulps | 20 ++++++++++---------- 5 files changed, 50 insertions(+), 50 deletions(-) diff --git a/sysdeps/alpha/fpu/libm-test-ulps b/sysdeps/alpha/fpu/libm-test-ulps index e2091f8a15..73172b49a0 100644 --- a/sysdeps/alpha/fpu/libm-test-ulps +++ b/sysdeps/alpha/fpu/libm-test-ulps @@ -94,7 +94,7 @@ double: 1 idouble: 1 # ccos -Test "Imaginary part of: ccos (-2 - 3 i) == -4.1896256909688072301 - 9.1092278937553365979 i": +Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i": float: 1 ifloat: 1 Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": @@ -107,10 +107,10 @@ float: 1 ifloat: 1 # ccosh -Test "Real part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i": +Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": float: 1 ifloat: 1 -Test "Imaginary part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i": +Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": float: 1 ifloat: 1 Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": @@ -145,7 +145,7 @@ ifloat: 1 Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i": float: 1 ifloat: 1 -Test "Imaginary part of: clog10 (-2 - 3 i) == 0.5569716761534183846 - 0.9375544629863747085 i": +Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i": double: 1 float: 5 idouble: 1 @@ -239,7 +239,7 @@ idouble: 2 ifloat: 2 # csinh -Test "Imaginary part of: csinh (-2 - 3 i) == 3.5905645899857799520 - 0.5309210862485198052 i": +Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i": double: 1 idouble: 1 Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": @@ -258,7 +258,7 @@ float: 1 ifloat: 1 # ctan -Test "Real part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i": +Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": double: 1 idouble: 1 Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i": @@ -266,7 +266,7 @@ double: 1 idouble: 1 # ctanh -Test "Real part of: ctanh (-2 - 3 i) == -0.9653858790221331242 + 0.0098843750383224937 i": +Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": double: 1 float: 2 idouble: 1 @@ -453,12 +453,12 @@ idouble: 1 ifloat: 2 # lgamma -Test "lgamma (0.7) == 0.26086724653166651439": +Test "lgamma (0.7) == 0.260867246531666514385732417016759578": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "lgamma (1.2) == -0.853740900033158497197e-1": +Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1": double: 1 float: 2 idouble: 1 @@ -513,7 +513,7 @@ ifloat: 1 Test "tgamma (0.5) == sqrt (pi)": float: 1 ifloat: 1 -Test "tgamma (0.7) == 1.29805533264755778568": +Test "tgamma (0.7) == 1.29805533264755778568117117915281162": double: 1 float: 1 idouble: 1 diff --git a/sysdeps/arm/libm-test-ulps b/sysdeps/arm/libm-test-ulps index 260ba58127..6a4bcc6147 100644 --- a/sysdeps/arm/libm-test-ulps +++ b/sysdeps/arm/libm-test-ulps @@ -134,7 +134,7 @@ double: 1 idouble: 1 # ccos -Test "Imaginary part of: ccos (-2 - 3 i) == -4.1896256909688072301 - 9.1092278937553365979 i": +Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i": float: 1 ifloat: 1 Test "Real part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i": @@ -145,10 +145,10 @@ double: 1 idouble: 1 # ccosh -Test "Real part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i": +Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": float: 1 ifloat: 1 -Test "Imaginary part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i": +Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": float: 1 ifloat: 1 Test "Real part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i": @@ -187,7 +187,7 @@ ifloat: 1 Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i": float: 1 ifloat: 1 -Test "Imaginary part of: clog10 (-2 - 3 i) == 0.5569716761534183846 - 0.9375544629863747085 i": +Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i": double: 1 float: 5 idouble: 1 @@ -280,7 +280,7 @@ float: 1 ifloat: 1 # csinh -Test "Imaginary part of: csinh (-2 - 3 i) == 3.5905645899857799520 - 0.5309210862485198052 i": +Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i": double: 1 idouble: 1 Test "Real part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i": @@ -307,7 +307,7 @@ float: 1 ifloat: 1 # ctan -Test "Real part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i": +Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": double: 1 idouble: 1 Test "Real part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i": @@ -320,7 +320,7 @@ idouble: 1 ifloat: 1 # ctanh -Test "Real part of: ctanh (-2 - 3 i) == -0.9653858790221331242 + 0.0098843750383224937 i": +Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": double: 1 float: 2 idouble: 1 @@ -509,12 +509,12 @@ idouble: 1 ifloat: 2 # lgamma -Test "lgamma (0.7) == 0.26086724653166651439": +Test "lgamma (0.7) == 0.260867246531666514385732417016759578": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "lgamma (1.2) == -0.853740900033158497197e-1": +Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1": double: 1 float: 2 idouble: 1 @@ -604,7 +604,7 @@ ifloat: 1 Test "tgamma (0.5) == sqrt (pi)": float: 1 ifloat: 1 -Test "tgamma (0.7) == 1.29805533264755778568": +Test "tgamma (0.7) == 1.29805533264755778568117117915281162": double: 1 float: 1 idouble: 1 diff --git a/sysdeps/hppa/fpu/libm-test-ulps b/sysdeps/hppa/fpu/libm-test-ulps index e2091f8a15..73172b49a0 100644 --- a/sysdeps/hppa/fpu/libm-test-ulps +++ b/sysdeps/hppa/fpu/libm-test-ulps @@ -94,7 +94,7 @@ double: 1 idouble: 1 # ccos -Test "Imaginary part of: ccos (-2 - 3 i) == -4.1896256909688072301 - 9.1092278937553365979 i": +Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i": float: 1 ifloat: 1 Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": @@ -107,10 +107,10 @@ float: 1 ifloat: 1 # ccosh -Test "Real part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i": +Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": float: 1 ifloat: 1 -Test "Imaginary part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i": +Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": float: 1 ifloat: 1 Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": @@ -145,7 +145,7 @@ ifloat: 1 Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i": float: 1 ifloat: 1 -Test "Imaginary part of: clog10 (-2 - 3 i) == 0.5569716761534183846 - 0.9375544629863747085 i": +Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i": double: 1 float: 5 idouble: 1 @@ -239,7 +239,7 @@ idouble: 2 ifloat: 2 # csinh -Test "Imaginary part of: csinh (-2 - 3 i) == 3.5905645899857799520 - 0.5309210862485198052 i": +Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i": double: 1 idouble: 1 Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": @@ -258,7 +258,7 @@ float: 1 ifloat: 1 # ctan -Test "Real part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i": +Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": double: 1 idouble: 1 Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i": @@ -266,7 +266,7 @@ double: 1 idouble: 1 # ctanh -Test "Real part of: ctanh (-2 - 3 i) == -0.9653858790221331242 + 0.0098843750383224937 i": +Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": double: 1 float: 2 idouble: 1 @@ -453,12 +453,12 @@ idouble: 1 ifloat: 2 # lgamma -Test "lgamma (0.7) == 0.26086724653166651439": +Test "lgamma (0.7) == 0.260867246531666514385732417016759578": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "lgamma (1.2) == -0.853740900033158497197e-1": +Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1": double: 1 float: 2 idouble: 1 @@ -513,7 +513,7 @@ ifloat: 1 Test "tgamma (0.5) == sqrt (pi)": float: 1 ifloat: 1 -Test "tgamma (0.7) == 1.29805533264755778568": +Test "tgamma (0.7) == 1.29805533264755778568117117915281162": double: 1 float: 1 idouble: 1 diff --git a/sysdeps/mips/fpu/libm-test-ulps b/sysdeps/mips/fpu/libm-test-ulps index e2091f8a15..73172b49a0 100644 --- a/sysdeps/mips/fpu/libm-test-ulps +++ b/sysdeps/mips/fpu/libm-test-ulps @@ -94,7 +94,7 @@ double: 1 idouble: 1 # ccos -Test "Imaginary part of: ccos (-2 - 3 i) == -4.1896256909688072301 - 9.1092278937553365979 i": +Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i": float: 1 ifloat: 1 Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": @@ -107,10 +107,10 @@ float: 1 ifloat: 1 # ccosh -Test "Real part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i": +Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": float: 1 ifloat: 1 -Test "Imaginary part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i": +Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": float: 1 ifloat: 1 Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": @@ -145,7 +145,7 @@ ifloat: 1 Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i": float: 1 ifloat: 1 -Test "Imaginary part of: clog10 (-2 - 3 i) == 0.5569716761534183846 - 0.9375544629863747085 i": +Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i": double: 1 float: 5 idouble: 1 @@ -239,7 +239,7 @@ idouble: 2 ifloat: 2 # csinh -Test "Imaginary part of: csinh (-2 - 3 i) == 3.5905645899857799520 - 0.5309210862485198052 i": +Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i": double: 1 idouble: 1 Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": @@ -258,7 +258,7 @@ float: 1 ifloat: 1 # ctan -Test "Real part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i": +Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": double: 1 idouble: 1 Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i": @@ -266,7 +266,7 @@ double: 1 idouble: 1 # ctanh -Test "Real part of: ctanh (-2 - 3 i) == -0.9653858790221331242 + 0.0098843750383224937 i": +Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": double: 1 float: 2 idouble: 1 @@ -453,12 +453,12 @@ idouble: 1 ifloat: 2 # lgamma -Test "lgamma (0.7) == 0.26086724653166651439": +Test "lgamma (0.7) == 0.260867246531666514385732417016759578": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "lgamma (1.2) == -0.853740900033158497197e-1": +Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1": double: 1 float: 2 idouble: 1 @@ -513,7 +513,7 @@ ifloat: 1 Test "tgamma (0.5) == sqrt (pi)": float: 1 ifloat: 1 -Test "tgamma (0.7) == 1.29805533264755778568": +Test "tgamma (0.7) == 1.29805533264755778568117117915281162": double: 1 float: 1 idouble: 1 diff --git a/sysdeps/powerpc/nofpu/libm-test-ulps b/sysdeps/powerpc/nofpu/libm-test-ulps index e2091f8a15..73172b49a0 100644 --- a/sysdeps/powerpc/nofpu/libm-test-ulps +++ b/sysdeps/powerpc/nofpu/libm-test-ulps @@ -94,7 +94,7 @@ double: 1 idouble: 1 # ccos -Test "Imaginary part of: ccos (-2 - 3 i) == -4.1896256909688072301 - 9.1092278937553365979 i": +Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i": float: 1 ifloat: 1 Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": @@ -107,10 +107,10 @@ float: 1 ifloat: 1 # ccosh -Test "Real part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i": +Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": float: 1 ifloat: 1 -Test "Imaginary part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i": +Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": float: 1 ifloat: 1 Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": @@ -145,7 +145,7 @@ ifloat: 1 Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i": float: 1 ifloat: 1 -Test "Imaginary part of: clog10 (-2 - 3 i) == 0.5569716761534183846 - 0.9375544629863747085 i": +Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i": double: 1 float: 5 idouble: 1 @@ -239,7 +239,7 @@ idouble: 2 ifloat: 2 # csinh -Test "Imaginary part of: csinh (-2 - 3 i) == 3.5905645899857799520 - 0.5309210862485198052 i": +Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i": double: 1 idouble: 1 Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": @@ -258,7 +258,7 @@ float: 1 ifloat: 1 # ctan -Test "Real part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i": +Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": double: 1 idouble: 1 Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i": @@ -266,7 +266,7 @@ double: 1 idouble: 1 # ctanh -Test "Real part of: ctanh (-2 - 3 i) == -0.9653858790221331242 + 0.0098843750383224937 i": +Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": double: 1 float: 2 idouble: 1 @@ -453,12 +453,12 @@ idouble: 1 ifloat: 2 # lgamma -Test "lgamma (0.7) == 0.26086724653166651439": +Test "lgamma (0.7) == 0.260867246531666514385732417016759578": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "lgamma (1.2) == -0.853740900033158497197e-1": +Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1": double: 1 float: 2 idouble: 1 @@ -513,7 +513,7 @@ ifloat: 1 Test "tgamma (0.5) == sqrt (pi)": float: 1 ifloat: 1 -Test "tgamma (0.7) == 1.29805533264755778568": +Test "tgamma (0.7) == 1.29805533264755778568117117915281162": double: 1 float: 1 idouble: 1 From 98f7320f0780d3238f8196c6f03c0cf256e7d6fb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 23 Mar 2003 19:42:23 +0000 Subject: [PATCH 3086/4487] Define PSEUDO_NOERRNO, PSEUDO_END_NOERRNO, and ret_NOERRNO. --- sysdeps/unix/alpha/sysdep.h | 19 +++++++++++++++++-- sysdeps/unix/sysv/linux/arm/sysdep.h | 16 ++++++++++++++++ sysdeps/unix/sysv/linux/cris/sysdep.h | 14 +++++++++++++- sysdeps/unix/sysv/linux/hppa/sysdep.h | 15 ++++++++++++++- sysdeps/unix/sysv/linux/m68k/sysdep.h | 10 ++++++++++ 5 files changed, 70 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h index cb04cec2af..6e55061515 100644 --- a/sysdeps/unix/alpha/sysdep.h +++ b/sysdeps/unix/alpha/sysdep.h @@ -119,6 +119,21 @@ __LABEL(name) \ END(sym) #endif +#define PSEUDO_NOERRNO(name, syscall_name, args) \ + .globl name; \ + .align 4; \ + .ent name,0; \ +__LABEL(name) \ + PSEUDO_PROLOGUE; \ + PSEUDO_PREPARE_ARGS \ + lda v0, SYS_ify(syscall_name); \ + call_pal PAL_callsys; + +#undef PSEUDO_END_NOERRNO +#define PSEUDO_END_NOERRNO(sym) END(sym) + +#define ret_NOERRNO ret + #define r0 v0 #define r1 a4 @@ -167,8 +182,8 @@ __LABEL(name) \ /* If TLS is in use, we have a conflict between the PAL_rduniq primitive, as modeled within GCC, and explicit use of the R0 register. If we use the register via the asm, the scheduler may place the PAL_rduniq insn - before we've copied the data from R0 into _sc_ret. If this happens - we'll get a reload abort, since R0 is live at the same time it is + before we've copied the data from R0 into _sc_ret. If this happens + we'll get a reload abort, since R0 is live at the same time it is needed for the PAL_rduniq. Solve this by using the "v" constraint instead of an asm for the syscall diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index 785d3cf0d8..3e3c874e04 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -64,6 +64,22 @@ SYSCALL_ERROR_HANDLER \ END (name) +#undef PSEUDO_NOERRNO +#define PSEUDO_NOERRNO(name, syscall_name, args) \ + .text; \ + ENTRY (name); \ + DO_CALL (syscall_name, args); + +#define PSEUDO_RET_NOERRNO \ + RETINSTR(movcc, pc, lr); \ + nop +#undef ret_NOERRNO +#define ret_NOERRNO PSEUDO_RET_NOERRNO + +#undef PSEUDO_END_NOERRNO +#define PSEUDO_END_NOERRNO(name) \ + END (name) + #if NOT_IN_libc # define SYSCALL_ERROR __local_syscall_error # define SYSCALL_ERROR_HANDLER \ diff --git a/sysdeps/unix/sysv/linux/cris/sysdep.h b/sysdeps/unix/sysv/linux/cris/sysdep.h index 4446b26f50..f22a3d24e8 100644 --- a/sysdeps/unix/sysv/linux/cris/sysdep.h +++ b/sysdeps/unix/sysv/linux/cris/sysdep.h @@ -1,5 +1,5 @@ /* Assembler macros for CRIS. - Copyright (C) 1999, 2001 Free Software Foundation, Inc. + Copyright (C) 1999, 2001, 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 @@ -106,6 +106,18 @@ PLTJUMP (syscall_error) @ \ END (name) +#define PSEUDO_NOERRNO(name, syscall_name, args) \ + ENTRY (name) @ \ + DOARGS_##args @ \ + movu.w SYS_ify (syscall_name),$r9 @ \ + break 13 @ \ + UNDOARGS_return_##args + +#define ret_NOERRNO + +#define PSEUDO_END_NOERRNO(name) \ + END (name) + #define DOARGS_0 #define DOARGS_1 #define DOARGS_2 diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.h b/sysdeps/unix/sysv/linux/hppa/sysdep.h index 4f08cc6e39..771c55c400 100644 --- a/sysdeps/unix/sysv/linux/hppa/sysdep.h +++ b/sysdeps/unix/sysv/linux/hppa/sysdep.h @@ -1,5 +1,5 @@ /* Assembler macros for PA-RISC. - Copyright (C) 1999,2001,02 Free Software Foundation, Inc. + Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, , August 1999. Linux/PA-RISC changes by Philipp Rumpf, , March 2000. @@ -84,6 +84,10 @@ bv 0(2) ASM_LINE_SEP \ nop +#define ret_NOERRNO \ + bv 0(2) ASM_LINE_SEP \ + nop + #undef END #define END(name) \ 1: .size C_SYMBOL_NAME(name),1b-C_SYMBOL_NAME(name) @@ -115,6 +119,15 @@ #define PSEUDO_END(name) \ END (name) +#define PSEUDO_NOERRNO(name, syscall_name, args) \ + ENTRY (name) \ + DO_CALL(syscall_name, args) ASM_LINE_SEP \ + nop + +#undef PSEUDO_END_NOERRNO +#define PSEUDO_END_NOERRNO(name) \ + END (name) + #define JUMPTARGET(name) name #define SYSCALL_PIC_SETUP /* Nothing. */ diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h index 125c584eb4..23e4202e8b 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -68,6 +68,16 @@ SYSCALL_ERROR_HANDLER; \ END (name) +#undef PSEUDO_NOERRNO +#define PSEUDO_NOERRNO(name, syscall_name, args) \ + .text; \ + ENTRY (name) \ + DO_CALL (syscall_name, args) + +#undef PSEUDO_END_NOERRNO +#define PSEUDO_END_NOERRNO(name) \ + END (name) + #ifdef PIC # if RTLD_PRIVATE_ERRNO # define SYSCALL_ERROR_HANDLER \ From cf666e4bf936c0a1528172d56c95067006a7612c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 24 Mar 2003 19:00:28 +0000 Subject: [PATCH 3087/4487] INTERNAL_SYSCALL): Remove a1 from clobber list. --- sysdeps/unix/sysv/linux/arm/sysdep.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index 3e3c874e04..1b1fc51cd2 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -174,7 +174,7 @@ __local_syscall_error: \ asm volatile ("swi %1 @ syscall " #name \ : "=r" (_a1) \ : "i" (SYS_ify(name)) ASM_ARGS_##nr \ - : "a1", "memory"); \ + : "memory"); \ _sys_result = _a1; \ } \ (int) _sys_result; }) From e0dc73c1e33bec0274474b85a12d544cbdd90b2b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 25 Mar 2003 09:44:29 +0000 Subject: [PATCH 3088/4487] 2003-03-24 Daniel Jacobowitz * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (DOARGS_5, DOARGS_6, DOARGS_7): Rewritten. --- sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h index 47af28090b..25dbb9e565 100644 --- a/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h @@ -24,6 +24,15 @@ #if !defined NOT_IN_libc || defined IS_IN_libpthread +/* We push lr onto the stack, so we have to use ldmib instead of ldmia + to find the saved arguments. */ +#undef DOARGS_5 +#undef DOARGS_6 +#undef DOARGS_7 +#define DOARGS_5 str r4, [sp, $-4]!; ldr r4, [sp, $8]; +#define DOARGS_6 mov ip, sp; stmfd sp!, {r4, r5}; ldmib ip, {r4, r5}; +#define DOARGS_7 mov ip, sp; stmfd sp!, {r4, r5, r6}; ldmib ip, {r4, r5, r6}; + # undef PSEUDO_RET # define PSEUDO_RET \ ldrcc pc, [sp], $4; \ From f4e9c08c590b37a11562513f69708683a4ffd1a2 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Tue, 25 Mar 2003 21:51:53 +0000 Subject: [PATCH 3089/4487] * sysdeps/mips/sgidefs.h (_MIPS_ISA_MIPS32, _MIPS_ISA_MIPS64): Define. * sysdeps/mips/sys/asm.h: Test _MIPS_ISA against them on all ISA tests. (ALSZ, ALMASK, SZREG, REG_S, REG_L): Define based on ABI, not ISA. (PTR_ADD, etc): Test _MIPS_SZPTR instead of _MIPS_SZLONG. * sysdeps/unix/sysv/linux/mips/bits/sigaction.h: Use _MIPS_SZPTR to decide whether to add padding. * sysdeps/unix/sysv/linux/mips/bits/sigaction.h: Use _MIPS_SZPTR to decide whether to add padding. * sysdeps/unix/sysv/linux/mips/kernel_sigaction.h (struct old_kernel_sigaction): Likewise. --- sysdeps/mips/sgidefs.h | 4 ++- sysdeps/mips/sys/asm.h | 29 ++++++++++--------- sysdeps/unix/sysv/linux/mips/bits/sigaction.h | 5 ++-- .../unix/sysv/linux/mips/kernel_sigaction.h | 2 +- 4 files changed, 22 insertions(+), 18 deletions(-) diff --git a/sysdeps/mips/sgidefs.h b/sysdeps/mips/sgidefs.h index 16b7c8ccc9..1d4893501e 100644 --- a/sysdeps/mips/sgidefs.h +++ b/sysdeps/mips/sgidefs.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ralf Baechle . @@ -28,6 +28,8 @@ #define _MIPS_ISA_MIPS3 3 #define _MIPS_ISA_MIPS4 4 #define _MIPS_ISA_MIPS5 5 +#define _MIPS_ISA_MIPS32 6 +#define _MIPS_ISA_MIPS64 7 /* * Subprogram calling convention diff --git a/sysdeps/mips/sys/asm.h b/sysdeps/mips/sys/asm.h index 0ebf561a15..76f6af3e15 100644 --- a/sysdeps/mips/sys/asm.h +++ b/sysdeps/mips/sys/asm.h @@ -230,7 +230,8 @@ symbol = value * MIPS IV implementations are free to treat this as a nop. The R5000 * is one of them. So we should have an option not to use this instruction. */ -#if (_MIPS_ISA == _MIPS_ISA_MIPS4) || (_MIPS_ISA == _MIPS_ISA_MIPS5) +#if (_MIPS_ISA == _MIPS_ISA_MIPS4) || (_MIPS_ISA == _MIPS_ISA_MIPS5) || \ + (_MIPS_ISA == _MIPS_ISA_MIPS32) || (_MIPS_ISA == _MIPS_ISA_MIPS64) # define PREF(hint,addr) \ pref hint,addr # define PREFX(hint,addr) \ @@ -275,7 +276,8 @@ symbol = value .set pop; \ 9: #endif /* (_MIPS_ISA == _MIPS_ISA_MIPS2) || (_MIPS_ISA == _MIPS_ISA_MIPS3) */ -#if (_MIPS_ISA == _MIPS_ISA_MIPS4) || (_MIPS_ISA == _MIPS_ISA_MIPS5) +#if (_MIPS_ISA == _MIPS_ISA_MIPS4) || (_MIPS_ISA == _MIPS_ISA_MIPS5) || \ + (_MIPS_ISA == _MIPS_ISA_MIPS32) || (_MIPS_ISA == _MIPS_ISA_MIPS64) # define MOVN(rd,rs,rt) \ movn rd,rs,rt # define MOVZ(rd,rs,rt) \ @@ -285,20 +287,18 @@ symbol = value /* * Stack alignment */ -#if (_MIPS_ISA == _MIPS_ISA_MIPS1) || (_MIPS_ISA == _MIPS_ISA_MIPS2) -# define ALSZ 7 -# define ALMASK ~7 -#endif -#if (_MIPS_ISA == _MIPS_ISA_MIPS3) || (_MIPS_ISA == _MIPS_ISA_MIPS4) || \ - (_MIPS_ISA == _MIPS_ISA_MIPS5) +#if (_MIPS_SIM == _MIPS_SIM_ABI64) || (_MIPS_SIM == _MIPS_SIM_NABI32) # define ALSZ 15 # define ALMASK ~15 +#else +# define ALSZ 7 +# define ALMASK ~7 #endif /* * Size of a register */ -#ifdef __mips64 +#if (_MIPS_SIM == _MIPS_SIM_ABI64) || (_MIPS_SIM == _MIPS_SIM_NABI32) # define SZREG 8 #else # define SZREG 4 @@ -308,7 +308,7 @@ symbol = value * Use the following macros in assemblercode to load/store registers, * pointers etc. */ -#if (_MIPS_SIM == _MIPS_SIM_ABI32) +#if (SZREG == 4) # define REG_S sw # define REG_L lw #else @@ -389,7 +389,7 @@ symbol = value /* * How to add/sub/load/store/shift pointers. */ -#if (_MIPS_SIM == _MIPS_SIM_ABI32 && _MIPS_SZLONG == 32) +#if (_MIPS_SIM == _MIPS_SIM_ABI32 && _MIPS_SZPTR == 32) # define PTR_ADD add # define PTR_ADDI addi # define PTR_ADDU addu @@ -433,7 +433,7 @@ symbol = value # define PTR_SCALESHIFT 2 #endif -#if (_MIPS_SIM == _MIPS_SIM_ABI32 && _MIPS_SZLONG == 64) \ +#if (_MIPS_SIM == _MIPS_SIM_ABI32 && _MIPS_SZPTR == 64 /* o64??? */) \ || _MIPS_SIM == _MIPS_SIM_ABI64 # define PTR_ADD dadd # define PTR_ADDI daddi @@ -459,12 +459,13 @@ symbol = value /* * Some cp0 registers were extended to 64bit for MIPS III. */ -#if (_MIPS_ISA == _MIPS_ISA_MIPS1) || (_MIPS_ISA == _MIPS_ISA_MIPS2) +#if (_MIPS_ISA == _MIPS_ISA_MIPS1) || (_MIPS_ISA == _MIPS_ISA_MIPS2) || \ + (_MIPS_ISA == _MIPS_ISA_MIPS32) # define MFC0 mfc0 # define MTC0 mtc0 #endif #if (_MIPS_ISA == _MIPS_ISA_MIPS3) || (_MIPS_ISA == _MIPS_ISA_MIPS4) || \ - (_MIPS_ISA == _MIPS_ISA_MIPS5) + (_MIPS_ISA == _MIPS_ISA_MIPS5) || (_MIPS_ISA == _MIPS_ISA_MIPS64) # define MFC0 dmfc0 # define MTC0 dmtc0 #endif diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h index 93a7598173..d04e25f76f 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h +++ b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h @@ -1,5 +1,6 @@ /* The proper definitions for Linux/MIPS's sigaction. - Copyright (C) 1993,94,95,97,98,99,2000 Free Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1997, 1998, 1999, 2000, 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 @@ -49,7 +50,7 @@ struct sigaction /* Restore handler. */ void (*sa_restorer) (void); -#if _MIPS_ISA == _MIPS_ISA_MIPS1 || _MIPS_ISA == _MIPS_ISA_MIPS2 +#if _MIPS_SZPTR < 64 int sa_resv[1]; #endif }; diff --git a/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h b/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h index 36d2667ec0..b6f52cc9c9 100644 --- a/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h +++ b/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h @@ -12,7 +12,7 @@ struct old_kernel_sigaction { /* Abi says here follows reserved int[2] */ void (*sa_restorer)(void); -#if (_MIPS_ISA == _MIPS_ISA_MIPS1) || (_MIPS_ISA == _MIPS_ISA_MIPS2) +#if (_MIPS_SZPTR < 64) /* * For 32 bit code we have to pad struct sigaction to get * constant size for the ABI From f30a759d97a1b845476644bba4d73aa83fecabc9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 25 Mar 2003 21:59:17 +0000 Subject: [PATCH 3090/4487] (__TIMER_T_TYPE): Define as void*. --- sysdeps/unix/sysv/linux/alpha/bits/typesizes.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h b/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h index 235acf8a2f..2fb0388ffd 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h @@ -1,5 +1,5 @@ /* bits/typesizes.h -- underlying types for *_t. Linux/Alpha version. - Copyright (C) 2002 Free Software Foundation, Inc. + 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 @@ -54,7 +54,7 @@ #define __SWBLK_T_TYPE __SLONGWORD_TYPE #define __KEY_T_TYPE __S32_TYPE #define __CLOCKID_T_TYPE __S32_TYPE -#define __TIMER_T_TYPE __S32_TYPE +#define __TIMER_T_TYPE void * #define __BLKSIZE_T_TYPE __U32_TYPE #define __FSID_T_TYPE struct { int __val[2]; } From 64928a88897688dad9ee4067cab448b063f57502 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 25 Mar 2003 23:15:40 +0000 Subject: [PATCH 3091/4487] Define ret_NOERRNO. --- sysdeps/unix/sysv/linux/m68k/sysdep.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h index 23e4202e8b..aabd46fe0d 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -78,6 +78,8 @@ #define PSEUDO_END_NOERRNO(name) \ END (name) +#define ret_NOERRNO ret + #ifdef PIC # if RTLD_PRIVATE_ERRNO # define SYSCALL_ERROR_HANDLER \ From 97b729d37998e877123d68cd9faf458cb19a6380 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 25 Mar 2003 23:40:18 +0000 Subject: [PATCH 3092/4487] Fix typos. --- sysdeps/m68k/m68020/bits/atomic.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/m68k/m68020/bits/atomic.h b/sysdeps/m68k/m68020/bits/atomic.h index 09c33c19c8..80b5b8f3bf 100644 --- a/sysdeps/m68k/m68020/bits/atomic.h +++ b/sysdeps/m68k/m68020/bits/atomic.h @@ -99,7 +99,7 @@ typedef uintmax_t uatomic_max_t; __asm __volatile ("1: cas2%.l %0:%R0,%1:%R1,(%2):(%3);" \ " jbne 1b" \ : "=d" (__result) \ - : "d" (newval), "r" (__memp), \ + : "d" (newvalue), "r" (__memp), \ "r" ((char *) __memp + 4), "0" (__result) \ : "memory"); \ } \ @@ -195,7 +195,7 @@ typedef uintmax_t uatomic_max_t; : "1" (*(mem))); \ else \ { \ - __typef (mem) __memp = (mem); \ + __typeof (mem) __memp = (mem); \ __typeof (*(mem)) __oldval = *__memp; \ __typeof (*(mem)) __temp; \ __asm __volatile ("1: move%.l %1,%2;" \ From 8eecb601ef48ada27ca1c87bf4281025472d40e1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 26 Mar 2003 04:48:10 +0000 Subject: [PATCH 3093/4487] (struct siginfo): Adjust timer info for what the kernel provides these days. (struct sigevent): Add _tid field. Define SIGEV_THREAD_ID. Remove struct __pthread_attr_s forward declaration. --- sysdeps/unix/sysv/linux/alpha/bits/siginfo.h | 38 +++++++++----------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h b/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h index 11da79215e..d2e72c8cc5 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h @@ -1,5 +1,5 @@ /* siginfo_t, sigevent and constants. Linux/Alpha version. - Copyright (C) 1997,1998,1999,2000,2001,2002 Free Software Foundation, Inc. + Copyright (C) 1997-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 @@ -22,8 +22,6 @@ # error "Never include this file directly. Use instead" #endif -#include - #if (!defined __have_sigval_t \ && (defined _SIGNAL_H || defined __need_siginfo_t \ || defined __need_sigevent_t)) @@ -42,11 +40,7 @@ typedef union sigval # define __have_siginfo_t 1 # define __SI_MAX_SIZE 128 -# if __WORDSIZE == 64 -# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 4) -# else -# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3) -# endif +# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 4) typedef struct siginfo { @@ -69,8 +63,10 @@ typedef struct siginfo /* POSIX.1b timers. */ struct { - unsigned int _timer1; - unsigned int _timer2; + int si_tid; /* Timer ID. */ + int si_overrun; /* Overrun count. */ + char _pad[sizeof (__uid_t) - sizeof (int)]; + sigval_t si_sigval; /* Signal value. */ } _timer; /* POSIX.1b signals. */ @@ -110,8 +106,8 @@ typedef struct siginfo /* X/Open requires some more fields with fixed names. */ # define si_pid _sifields._kill.si_pid # define si_uid _sifields._kill.si_uid -# define si_timer1 _sifields._timer._timer1 -# define si_timer2 _sifields._timer._timer2 +# define si_timerid _sifields._timer.si_tid +# define si_overrun _sifields._timer.si_overrun # define si_status _sifields._sigchld.si_status # define si_utime _sifields._sigchld.si_utime # define si_stime _sifields._sigchld.si_stime @@ -261,14 +257,7 @@ enum /* Structure to transport application-defined values with signals. */ # define __SIGEV_MAX_SIZE 64 -# if __WORDSIZE == 64 -# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4) -# else -# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3) -# endif - -/* Forward declaration of the `pthread_attr_t' type. */ -struct __pthread_attr_s; +# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4) typedef struct sigevent { @@ -280,6 +269,10 @@ typedef struct sigevent { int _pad[__SIGEV_PAD_SIZE]; + /* When SIGEV_SIGNAL and SIGEV_THREAD_ID set, LWP ID of the + thread to receive the signal. */ + __pid_t _tid; + struct { void (*_function) (sigval_t); /* Function to start. */ @@ -299,8 +292,11 @@ enum # define SIGEV_SIGNAL SIGEV_SIGNAL SIGEV_NONE, /* Other notification: meaningless. */ # define SIGEV_NONE SIGEV_NONE - SIGEV_THREAD /* Deliver via thread creation. */ + SIGEV_THREAD, /* Deliver via thread creation. */ # define SIGEV_THREAD SIGEV_THREAD + + SIGEV_THREAD_ID = 4 /* Send signal to specific thread. */ +#define SIGEV_THREAD_ID SIGEV_THREAD_ID }; #endif /* have _SIGNAL_H. */ From 49d354ccdccd9ce09104f39ed79304f671294265 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 26 Mar 2003 23:41:57 +0000 Subject: [PATCH 3094/4487] (struct siginfo): Avoid no-op padding element. --- sysdeps/unix/sysv/linux/alpha/bits/siginfo.h | 1 - 1 file changed, 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h b/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h index d2e72c8cc5..446394f0db 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h @@ -65,7 +65,6 @@ typedef struct siginfo { int si_tid; /* Timer ID. */ int si_overrun; /* Overrun count. */ - char _pad[sizeof (__uid_t) - sizeof (int)]; sigval_t si_sigval; /* Signal value. */ } _timer; From 227de9dd23296efa12c9e4e0d0ee5c1d32805d05 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 27 Mar 2003 02:45:46 +0000 Subject: [PATCH 3095/4487] 2003-03-27 Philip Blundell * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_VFORK_SYSCALL): Define for kernel 2.4 on arm. * sysdeps/unix/sysv/linux/arm/vfork.S: Elide compatibility code when __ASSUME_VFORK_SYSCALL is defined. * sysdeps/unix/sysv/linux/arm/mmap64.S: Likewise for __ASSUME_MMAP2_SYSCALL. * sysdeps/unix/sysv/linux/arm/sigaction.c: Likewise for __ASSUME_REALTIME_SIGNALS. --- sysdeps/unix/sysv/linux/arm/mmap64.S | 9 ++++++++- sysdeps/unix/sysv/linux/arm/sigaction.c | 21 +++++++++++++++++---- sysdeps/unix/sysv/linux/arm/vfork.S | 9 ++++++++- 3 files changed, 33 insertions(+), 6 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/mmap64.S b/sysdeps/unix/sysv/linux/arm/mmap64.S index 1f19bf02e1..3936e25d26 100644 --- a/sysdeps/unix/sysv/linux/arm/mmap64.S +++ b/sysdeps/unix/sysv/linux/arm/mmap64.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 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 @@ -21,6 +21,8 @@ #define EINVAL 22 #define ENOSYS 38 +#include "kernel-features.h" + /* The mmap2 system call takes six arguments, all in registers. */ .text ENTRY (__mmap64) @@ -39,6 +41,10 @@ ENTRY (__mmap64) swi SYS_ify (mmap2) cmn r0, $4096 LOADREGS(ccfd, sp!, {r4, r5, pc}) +# ifdef __ASSUME_MMAP2_SYSCALL + ldmfd sp!, {r4, r5, lr} + b PLTJMP(syscall_error) +# else cmn r0, $ENOSYS ldmnefd sp!, {r4, r5, lr} bne PLTJMP(syscall_error) @@ -49,6 +55,7 @@ ENTRY (__mmap64) teq r5, $0 ldmeqfd sp!, {r4, r5, lr} beq PLTJMP(__mmap) +# endif .Linval: mov r0, $-EINVAL ldmfd sp!, {r4, r5, lr} diff --git a/sysdeps/unix/sysv/linux/arm/sigaction.c b/sysdeps/unix/sysv/linux/arm/sigaction.c index 46ff2b1599..82e22b679a 100644 --- a/sysdeps/unix/sysv/linux/arm/sigaction.c +++ b/sysdeps/unix/sysv/linux/arm/sigaction.c @@ -22,6 +22,7 @@ #include #include +#include /* The difference here is that the sigaction structure used in the kernel is not the same as we use in the libc. Therefore we must @@ -60,15 +61,21 @@ __libc_sigaction (sig, act, oact) const struct sigaction *act; struct sigaction *oact; { +#ifndef __ASSUME_REALTIME_SIGNALS struct old_kernel_sigaction k_sigact, k_osigact; +#endif int result; #ifdef __NR_rt_sigaction /* First try the RT signals. */ +# ifndef __ASSUME_REALTIME_SIGNALS if (!__libc_missing_rt_sigs) +# endif { struct kernel_sigaction kact, koact; +# ifndef __ASSUME_REALTIME_SIGNALS int saved_errno = errno; +# endif if (act) { @@ -99,7 +106,9 @@ __libc_sigaction (sig, act, oact) act ? __ptrvalue (&kact) : NULL, oact ? __ptrvalue (&koact) : NULL, _NSIG / 8); +# ifndef __ASSUME_REALTIME_SIGNALS if (result >= 0 || errno != ENOSYS) +# endif { if (oact && result >= 0) { @@ -113,17 +122,20 @@ __libc_sigaction (sig, act, oact) return result; } +# ifndef __ASSUME_REALTIME_SIGNALS __set_errno (saved_errno); __libc_missing_rt_sigs = 1; +# endif } #endif +#ifndef __ASSUME_REALTIME_SIGNALS if (act) { k_sigact.k_sa_handler = act->sa_handler; k_sigact.sa_mask = act->sa_mask.__val[0]; k_sigact.sa_flags = act->sa_flags; -#ifdef HAVE_SA_RESTORER +# ifdef HAVE_SA_RESTORER /* See the comments above for why we test SA_ONSTACK. */ if (k_sigact.sa_flags & (SA_RESTORER | SA_ONSTACK)) k_sigact.sa_restorer = act->sa_restorer; @@ -132,7 +144,7 @@ __libc_sigaction (sig, act, oact) k_sigact.sa_restorer = choose_restorer (k_sigact.sa_flags); k_sigact.sa_flags |= SA_RESTORER; } -#endif +# endif } result = INLINE_SYSCALL (sigaction, 3, sig, act ? __ptrvalue (&k_sigact) : NULL, @@ -142,11 +154,12 @@ __libc_sigaction (sig, act, oact) oact->sa_handler = k_osigact.k_sa_handler; oact->sa_mask.__val[0] = k_osigact.sa_mask; oact->sa_flags = k_osigact.sa_flags; -#ifdef HAVE_SA_RESTORER +# ifdef HAVE_SA_RESTORER oact->sa_restorer = k_osigact.sa_restorer; -#endif +# endif } return result; +#endif } libc_hidden_def (__libc_sigaction) diff --git a/sysdeps/unix/sysv/linux/arm/vfork.S b/sysdeps/unix/sysv/linux/arm/vfork.S index a2c6bf3407..0630c7ff06 100644 --- a/sysdeps/unix/sysv/linux/arm/vfork.S +++ b/sysdeps/unix/sysv/linux/arm/vfork.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Philip Blundell . @@ -20,6 +20,7 @@ #include #define _ERRNO_H 1 #include +#include /* Clone the calling process, but without copying the whole address space. The calling process is suspended until the new process exits or is @@ -33,17 +34,23 @@ ENTRY (__vfork) cmn a1, #4096 RETINSTR(movcc, pc, lr) +# ifdef __ASSUME_VFORK_SYSCALL + b PLTJMP(C_SYMBOL_NAME(__syscall_error)) +# else /* Check if vfork syscall is known at all. */ ldr a2, =-ENOSYS teq a1, a2 bne PLTJMP(C_SYMBOL_NAME(__syscall_error)) +# endif #endif +#ifndef __ASSUME_VFORK_SYSCALL /* If we don't have vfork, fork is close enough. */ swi __NR_fork cmn a1, #4096 RETINSTR(movcc, pc, lr) b PLTJMP(C_SYMBOL_NAME(__syscall_error)) +#endif PSEUDO_END (__vfork) libc_hidden_def (__vfork) From 44acff5d0433510d3d530d18a6b61e4f79070434 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 27 Mar 2003 02:45:49 +0000 Subject: [PATCH 3096/4487] 2003-03-27 Philip Blundell * sysdeps/unix/sysv/linux/arm/sysdep.h (PSEUDO_RET_NOERRNO): Use unconditional mov. Remove nop. --- sysdeps/unix/sysv/linux/arm/sysdep.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index 1b1fc51cd2..47383aa788 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -71,8 +71,8 @@ DO_CALL (syscall_name, args); #define PSEUDO_RET_NOERRNO \ - RETINSTR(movcc, pc, lr); \ - nop + RETINSTR(mov, pc, lr); + #undef ret_NOERRNO #define ret_NOERRNO PSEUDO_RET_NOERRNO From faef8a3c25baf8678aa89d9241e2385a4269dacb Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Fri, 28 Mar 2003 06:11:03 +0000 Subject: [PATCH 3097/4487] * sysdeps/unix/sysv/linux/mips/configure: Rebuilt. --- sysdeps/unix/sysv/linux/mips/configure | 75 ++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/sysdeps/unix/sysv/linux/mips/configure b/sysdeps/unix/sysv/linux/mips/configure index e69de29bb2..9a7b423962 100644 --- a/sysdeps/unix/sysv/linux/mips/configure +++ b/sysdeps/unix/sysv/linux/mips/configure @@ -0,0 +1,75 @@ +# This file is generated from configure.in by Autoconf. DO NOT EDIT! + # Local configure fragment for sysdeps/unix/sysv/linux/mips. + +case $machine in +mips*64*) + rm -f asm-unistd.h + asm_unistd_h=$sysheaders/asm/unistd.h + if test ! -f $asm_unistd_h; then + # Try to find asm/unistd.h in compiler header search path. + try_asm_unistd_h=`echo '#include ' | $CPP - | + sed -n '/^# 1 "\(\/[^"]*\)".*/{s,,\1,p;q;}'` + if test -n "$try_asm_unistd_h" && + test -f "$try_asm_unistd_h"; then + asm_unistd_h=$try_asm_unistd_h + fi + fi + if test ! -f "$asm_unistd_h"; then + { echo "$as_me:$LINENO: WARNING: *** asm/unistd.h not found, it will not be pre-processed" >&5 +echo "$as_me: WARNING: *** asm/unistd.h not found, it will not be pre-processed" >&2;} + echo '#include ' > asm-unistd.h + else + # The point of this preprocessing is to turn __NR_ into + # __NR_N64_, as well as to define __NR_ to + # __NR__, if __NR__ is defined + # and is the compiler-enabled ABI. + cat "$asm_unistd_h" | + sed -e 's,__NR_,__NR_N64_,g' \ + -e 's,__NR_N64_##,__NR_##,g' \ + -e 's,__NR_N64_O32_,__NR_O32_,g' \ + -e 's,__NR_N64_N32_,__NR_N32_,g' \ + -e 's,__NR_N64_N64_,__NR_N64_,g' \ + | awk > asm-unistd.h ' +/^#define __NR.*unused/ { print; next; } +/^#define __NR_N64__exit __NR_N64_exit/ { + print "#define __NR__exit __NR_exit"; + print "#define __NR_O32__exit __NR_O32_exit"; + print "#define __NR_N32__exit __NR_N32_exit"; + print; next; +} +/^#define __NR_O32_/ { + name = $2; + sub (/_O32_/, "_", name); + print; + print "#if _MIPS_SIM == _MIPS_SIM_ABI32"; + print "# define " name " " $2; + print "#endif"; + next; +} +/^#define __NR_N32_/ { + name = $2; + sub (/_N32_/, "_", name); + print; + print "#if defined _ABIN32 && _MIPS_SIM == _ABIN32"; + print "# define " name " " $2; + print "#endif"; + next; +} +/^#define __NR_N64_/ { + name = $2; + sub (/_N64_/, "_", name); + print; + print "#if defined _ABI64 && _MIPS_SIM == _ABI64"; + print "# define " name " " $2; + print "#endif"; + next; +} +{ + print; +}' + fi ;; +mips*) + rm -f asm-unistd.h + echo '#include ' > asm-unistd.h + ;; +esac From a9b0e91911513043188c9590acd305982fd6b1c4 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Fri, 28 Mar 2003 07:02:35 +0000 Subject: [PATCH 3098/4487] * sysdeps/unix/mips/sysdep.S: Include sys/asm.h. --- sysdeps/unix/mips/sysdep.S | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/mips/sysdep.S b/sysdeps/unix/mips/sysdep.S index 09e8a0ac7a..8c23b4f1e2 100644 --- a/sysdeps/unix/mips/sysdep.S +++ b/sysdeps/unix/mips/sysdep.S @@ -21,6 +21,7 @@ #include #define _ERRNO_H #include +#include #ifdef _LIBC_REENTRANT From 7f3bcde0d1b6312799e7769afdc0f9066d1a410e Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Sat, 29 Mar 2003 08:01:57 +0000 Subject: [PATCH 3099/4487] * sysdeps/unix/sysv/linux/mips/clone.S (__thread_start): Re-introduce ENTRY. --- sysdeps/unix/sysv/linux/mips/clone.S | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/mips/clone.S b/sysdeps/unix/sysv/linux/mips/clone.S index e00351d117..043f5921cb 100644 --- a/sysdeps/unix/sysv/linux/mips/clone.S +++ b/sysdeps/unix/sysv/linux/mips/clone.S @@ -89,6 +89,7 @@ L(error): its own function so that we can terminate the stack trace with our debug info. */ +ENTRY(__thread_start) L(thread_start): /* cp is already loaded. */ SAVE_GP (GPOFF) From ef055a744e3f0fd916b71400e768a060b58ba989 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Sat, 29 Mar 2003 08:15:29 +0000 Subject: [PATCH 3100/4487] * configure.in: Add mips64* support. * configure: Rebuilt. * sysdeps/mips/bits/endian.h: Make it bi-endian. * sysdeps/mips/mipsel/bits/endian.h: Removed. * sysdeps/mips/mips64/n32/el/bits/endian.h: Removed. * sysdeps/mips/mips64/n64/el/bits/endian.h: Removed. * sysdeps/mips/mips32/Makefile (CC): Add -mabi=32. * sysdeps/mips/mips64/n32/Makefile (CC): Add -mabi=n32. * sysdeps/mips/mips64/n64/Makefile (CC): Add -mabi=64. * sysdeps/mips/Implies: Moved wordsize-32 to... * sysdeps/mips/mips32/Implies: New file. * sysdeps/unix/mips/sysdep.h (PSEUDO_NOERRNO, PSEUDO_END_NOERRNO, ret_NOERRNO): New. (ret, PSEUDO_END): Moved past END. (PSEUDO): Moved to... * sysdeps/unix/mips/mips32/sysdep.h: New file. * sysdeps/unix/mips/mips64/n32/sysdep.h: Removed #undef PSEUDO. * sysdeps/unix/mips/mips64/n64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/mips/sysdep.h: Move to... * sysdeps/unix/sysv/linux/mips/mips32/sysdep.h: New file. * sysdeps/unix/sysv/linux/mips/mips32/kern64/sysdep.h: New file. --- sysdeps/mips/Implies | 1 - sysdeps/mips/bits/endian.h | 7 ++- sysdeps/mips/mips32/Implies | 2 + sysdeps/mips/mips32/Makefile | 3 ++ sysdeps/mips/mips64/n32/Makefile | 4 ++ sysdeps/mips/mips64/n32/el/bits/endian.h | 8 --- sysdeps/mips/mips64/n64/Makefile | 4 ++ sysdeps/mips/mips64/n64/el/bits/endian.h | 8 --- sysdeps/mips/mipsel/bits/endian.h | 8 --- sysdeps/unix/mips/mips32/sysdep.h | 52 +++++++++++++++++++ sysdeps/unix/mips/mips64/n32/sysdep.h | 1 - sysdeps/unix/mips/mips64/n64/sysdep.h | 1 - sysdeps/unix/mips/sysdep.h | 52 ++++++------------- .../sysv/linux/mips/mips32/kern64/sysdep.h | 36 +++++++++++++ .../sysv/linux/mips/{ => mips32}/sysdep.h | 10 ++-- 15 files changed, 128 insertions(+), 69 deletions(-) create mode 100644 sysdeps/mips/mips32/Implies create mode 100644 sysdeps/mips/mips32/Makefile delete mode 100644 sysdeps/mips/mips64/n32/el/bits/endian.h delete mode 100644 sysdeps/mips/mips64/n64/el/bits/endian.h delete mode 100644 sysdeps/mips/mipsel/bits/endian.h create mode 100644 sysdeps/unix/mips/mips32/sysdep.h create mode 100644 sysdeps/unix/sysv/linux/mips/mips32/kern64/sysdep.h rename sysdeps/unix/sysv/linux/mips/{ => mips32}/sysdep.h (97%) diff --git a/sysdeps/mips/Implies b/sysdeps/mips/Implies index 9f60963329..8c18cb3034 100644 --- a/sysdeps/mips/Implies +++ b/sysdeps/mips/Implies @@ -1,4 +1,3 @@ -wordsize-32 # MIPS uses IEEE 754 floating point. ieee754/flt-32 ieee754/dbl-64 diff --git a/sysdeps/mips/bits/endian.h b/sysdeps/mips/bits/endian.h index 40321a2866..9586104ccd 100644 --- a/sysdeps/mips/bits/endian.h +++ b/sysdeps/mips/bits/endian.h @@ -5,4 +5,9 @@ # error "Never use directly; include instead." #endif -#define __BYTE_ORDER __BIG_ENDIAN +#if __MIPSEB +# define __BYTE_ORDER __BIG_ENDIAN +#endif +#if __MIPSEL +# define __BYTE_ORDER __LITTLE_ENDIAN +#endif diff --git a/sysdeps/mips/mips32/Implies b/sysdeps/mips/mips32/Implies new file mode 100644 index 0000000000..fab98d7312 --- /dev/null +++ b/sysdeps/mips/mips32/Implies @@ -0,0 +1,2 @@ +mips +wordsize-32 diff --git a/sysdeps/mips/mips32/Makefile b/sysdeps/mips/mips32/Makefile new file mode 100644 index 0000000000..dec0b024c3 --- /dev/null +++ b/sysdeps/mips/mips32/Makefile @@ -0,0 +1,3 @@ +ifeq ($(filter -mabi=32,$(CC)),) +CC += -mabi=32 +endif diff --git a/sysdeps/mips/mips64/n32/Makefile b/sysdeps/mips/mips64/n32/Makefile index 26f38570d7..a84d2a51bd 100644 --- a/sysdeps/mips/mips64/n32/Makefile +++ b/sysdeps/mips/mips64/n32/Makefile @@ -1,2 +1,6 @@ # `long double' is a distinct type we support. long-double-fcts = yes + +ifeq ($(filter -mabi=n32,$(CC)),) +CC += -mabi=n32 +endif diff --git a/sysdeps/mips/mips64/n32/el/bits/endian.h b/sysdeps/mips/mips64/n32/el/bits/endian.h deleted file mode 100644 index 2241190a70..0000000000 --- a/sysdeps/mips/mips64/n32/el/bits/endian.h +++ /dev/null @@ -1,8 +0,0 @@ -/* The MIPS architecture has selectable endianness. - This file is for a machine using little-endian mode. */ - -#ifndef _ENDIAN_H -# error "Never use directly; include instead." -#endif - -#define __BYTE_ORDER __LITTLE_ENDIAN diff --git a/sysdeps/mips/mips64/n64/Makefile b/sysdeps/mips/mips64/n64/Makefile index 26f38570d7..a823f32b53 100644 --- a/sysdeps/mips/mips64/n64/Makefile +++ b/sysdeps/mips/mips64/n64/Makefile @@ -1,2 +1,6 @@ # `long double' is a distinct type we support. long-double-fcts = yes + +ifeq ($(filter -mabi=64,$(CC)),) +CC += -mabi=64 +endif diff --git a/sysdeps/mips/mips64/n64/el/bits/endian.h b/sysdeps/mips/mips64/n64/el/bits/endian.h deleted file mode 100644 index 2241190a70..0000000000 --- a/sysdeps/mips/mips64/n64/el/bits/endian.h +++ /dev/null @@ -1,8 +0,0 @@ -/* The MIPS architecture has selectable endianness. - This file is for a machine using little-endian mode. */ - -#ifndef _ENDIAN_H -# error "Never use directly; include instead." -#endif - -#define __BYTE_ORDER __LITTLE_ENDIAN diff --git a/sysdeps/mips/mipsel/bits/endian.h b/sysdeps/mips/mipsel/bits/endian.h deleted file mode 100644 index 2241190a70..0000000000 --- a/sysdeps/mips/mipsel/bits/endian.h +++ /dev/null @@ -1,8 +0,0 @@ -/* The MIPS architecture has selectable endianness. - This file is for a machine using little-endian mode. */ - -#ifndef _ENDIAN_H -# error "Never use directly; include instead." -#endif - -#define __BYTE_ORDER __LITTLE_ENDIAN diff --git a/sysdeps/unix/mips/mips32/sysdep.h b/sysdeps/unix/mips/mips32/sysdep.h new file mode 100644 index 0000000000..0b5d1186bb --- /dev/null +++ b/sysdeps/unix/mips/mips32/sysdep.h @@ -0,0 +1,52 @@ +/* Copyright (C) 1992, 1995, 1997, 1999, 2000, 2002, 2003 + Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Brendan Kehoe (brendan@zen.org). + + 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. */ + +#include + +/* Note that while it's better structurally, going back to call __syscall_error + can make things confusing if you're debugging---it looks like it's jumping + backwards into the previous fn. */ +#ifdef __PIC__ +#define PSEUDO(name, syscall_name, args) \ + .align 2; \ + 99: la t9,__syscall_error; \ + jr t9; \ + ENTRY(name) \ + .set noreorder; \ + .cpload t9; \ + li v0, SYS_ify(syscall_name); \ + syscall; \ + .set reorder; \ + bne a3, zero, 99b; \ +L(syse1): +#else +#define PSEUDO(name, syscall_name, args) \ + .set noreorder; \ + .align 2; \ + 99: j __syscall_error; \ + nop; \ + ENTRY(name) \ + .set noreorder; \ + li v0, SYS_ify(syscall_name); \ + syscall; \ + .set reorder; \ + bne a3, zero, 99b; \ +L(syse1): +#endif diff --git a/sysdeps/unix/mips/mips64/n32/sysdep.h b/sysdeps/unix/mips/mips64/n32/sysdep.h index 3564c6b61e..ec93fadc04 100644 --- a/sysdeps/unix/mips/mips64/n32/sysdep.h +++ b/sysdeps/unix/mips/mips64/n32/sysdep.h @@ -22,7 +22,6 @@ #ifdef __ASSEMBLER__ -# undef PSEUDO /* Note that while it's better structurally, going back to call __syscall_error can make things confusing if you're debugging---it looks like it's jumping backwards into the previous fn. */ diff --git a/sysdeps/unix/mips/mips64/n64/sysdep.h b/sysdeps/unix/mips/mips64/n64/sysdep.h index 982d905a43..502b66797b 100644 --- a/sysdeps/unix/mips/mips64/n64/sysdep.h +++ b/sysdeps/unix/mips/mips64/n64/sysdep.h @@ -22,7 +22,6 @@ #ifdef __ASSEMBLER__ -# undef PSEUDO /* Note that while it's better structurally, going back to call __syscall_error can make things confusing if you're debugging---it looks like it's jumping backwards into the previous fn. */ diff --git a/sysdeps/unix/mips/sysdep.h b/sysdeps/unix/mips/sysdep.h index 8ba84e2083..13a3752dc8 100644 --- a/sysdeps/unix/mips/sysdep.h +++ b/sysdeps/unix/mips/sysdep.h @@ -30,47 +30,27 @@ .ent name,0; \ name##: -/* Note that while it's better structurally, going back to call __syscall_error - can make things confusing if you're debugging---it looks like it's jumping - backwards into the previous fn. */ -#ifdef __PIC__ -#define PSEUDO(name, syscall_name, args) \ - .align 2; \ - 99: la t9,__syscall_error; \ - jr t9; \ - ENTRY(name) \ - .set noreorder; \ - .cpload t9; \ - li v0, SYS_ify(syscall_name); \ - syscall; \ - .set reorder; \ - bne a3, zero, 99b; \ -L(syse1): -#else -#define PSEUDO(name, syscall_name, args) \ - .set noreorder; \ - .align 2; \ - 99: j __syscall_error; \ - nop; \ - ENTRY(name) \ - .set noreorder; \ - li v0, SYS_ify(syscall_name); \ - syscall; \ - .set reorder; \ - bne a3, zero, 99b; \ -L(syse1): -#endif - -#undef PSEUDO_END -#define PSEUDO_END(sym) .end sym - -#define ret j ra ; nop - #undef END #define END(function) \ .end function; \ .size function,.-function +#define ret j ra ; nop + +#define PSEUDO_END(sym) .end sym; .size sym,.-sym + +#define PSEUDO_NOERRNO(name, syscall_name, args) \ + .align 2; \ + ENTRY(name) \ + .set noreorder; \ + li v0, SYS_ify(syscall_name); \ + syscall + +#undef PSEUDO_END_NOERRNO +#define PSEUDO_END_NOERRNO(sym) .end sym; .size sym,.-sym + +#define ret_NOERRNO ret + #define r0 v0 #define r1 v1 /* The mips move insn is d,s. */ diff --git a/sysdeps/unix/sysv/linux/mips/mips32/kern64/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips32/kern64/sysdep.h new file mode 100644 index 0000000000..b0316b657b --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips32/kern64/sysdep.h @@ -0,0 +1,36 @@ +/* Copyright (C) 2000, 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 _LINUX_MIPS_MIPS32_KERN64_SYSDEP_H +#define _LINUX_MIPS_MIPS32_KERN64_SYSDEP_H 1 + +/* There is some commonality. */ +#include + +/* For Linux we can use the system call table in the header file + /usr/include/asm/unistd.h + of the kernel. But these symbols do not follow the SYS_* syntax + so we have to redefine the `SYS_ify' macro here. */ +#undef SYS_ify +#ifdef __STDC__ +# define SYS_ify(syscall_name) __NR_O32_##syscall_name +#else +# define SYS_ify(syscall_name) __NR_O32_/**/syscall_name +#endif + +#endif /* linux/mips/mips32/kern64/sysdep.h */ diff --git a/sysdeps/unix/sysv/linux/mips/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h similarity index 97% rename from sysdeps/unix/sysv/linux/mips/sysdep.h rename to sysdeps/unix/sysv/linux/mips/mips32/sysdep.h index 710479ae18..1f56671ba0 100644 --- a/sysdeps/unix/sysv/linux/mips/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 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 @@ -16,11 +16,11 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#ifndef _LINUX_MIPS_SYSDEP_H -#define _LINUX_MIPS_SYSDEP_H 1 +#ifndef _LINUX_MIPS_MIPS32_SYSDEP_H +#define _LINUX_MIPS_MIPS32_SYSDEP_H 1 /* There is some commonality. */ -#include +#include /* For Linux we can use the system call table in the header file /usr/include/asm/unistd.h @@ -279,4 +279,4 @@ #endif /* __ASSEMBLER__ */ -#endif /* linux/mips/sysdep.h */ +#endif /* linux/mips/mips32/sysdep.h */ From 28d6ca4b60ef362dd30f28ed9a48f6d36c9741af Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 31 Mar 2003 16:01:09 +0000 Subject: [PATCH 3101/4487] (atomic_increment_and_test): Define. (atomic_decrement_and_test): Fix test. --- sysdeps/m68k/m68020/bits/atomic.h | 42 ++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/sysdeps/m68k/m68020/bits/atomic.h b/sysdeps/m68k/m68020/bits/atomic.h index 80b5b8f3bf..6978b27cde 100644 --- a/sysdeps/m68k/m68020/bits/atomic.h +++ b/sysdeps/m68k/m68020/bits/atomic.h @@ -179,18 +179,52 @@ typedef uintmax_t uatomic_max_t; } \ }) +#define atomic_increment_and_test(mem) \ + ({ char __result; \ + if (sizeof (*(mem)) == 1) \ + __asm __volatile ("addq%.b %#1,%1; seq %0" \ + : "=dm" (__result), "=m" (*(mem)) \ + : "1" (*(mem))); \ + else if (sizeof (*(mem)) == 2) \ + __asm __volatile ("addq%.w %#1,%1; seq %0" \ + : "=dm" (__result), "=m" (*(mem)) \ + : "1" (*(mem))); \ + else if (sizeof (*(mem)) == 4) \ + __asm __volatile ("addq%.l %#1,%1; seq %0" \ + : "=dm" (__result), "=m" (*(mem)) \ + : "1" (*(mem))); \ + else \ + { \ + __typeof (mem) __memp = (mem); \ + __typeof (*(mem)) __oldval = *__memp; \ + __typeof (*(mem)) __temp; \ + __asm __volatile ("1: move%.l %1,%2;" \ + " move%.l %R1,%R2;" \ + " addq%.l %#1,%2;" \ + " addx%.l %5,%R2;" \ + " seq %0;" \ + " cas2%.l %1:%R1,%2:%R2,(%3):(%4);" \ + " jbne 1b" \ + : "=&dm" (__result), "=d" (__oldval), \ + "=&d" (__temp) \ + : "r" (__memp), "r" ((char *) __memp + 4), \ + "d" (0), "1" (__oldval) \ + : "memory"); \ + } \ + __result; }) + #define atomic_decrement_and_test(mem) \ ({ char __result; \ if (sizeof (*(mem)) == 1) \ - __asm __volatile ("subq%.b %#1,%1; scs %0" \ + __asm __volatile ("subq%.b %#1,%1; seq %0" \ : "=dm" (__result), "=m" (*(mem)) \ : "1" (*(mem))); \ else if (sizeof (*(mem)) == 2) \ - __asm __volatile ("subq%.w %#1,%1; scs %0" \ + __asm __volatile ("subq%.w %#1,%1; seq %0" \ : "=dm" (__result), "=m" (*(mem)) \ : "1" (*(mem))); \ else if (sizeof (*(mem)) == 4) \ - __asm __volatile ("subq%.l %#1,%1; scs %0" \ + __asm __volatile ("subq%.l %#1,%1; seq %0" \ : "=dm" (__result), "=m" (*(mem)) \ : "1" (*(mem))); \ else \ @@ -202,7 +236,7 @@ typedef uintmax_t uatomic_max_t; " move%.l %R1,%R2;" \ " subq%.l %#1,%2;" \ " subx%.l %5,%R2;" \ - " scs %0;" \ + " seq %0;" \ " cas2%.l %1:%R1,%2:%R2,(%3):(%4);" \ " jbne 1b" \ : "=&dm" (__result), "=d" (__oldval), \ From 614ba8f7495a24ad4a7d62fd074cb43b75cea6d6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 1 Apr 2003 06:16:53 +0000 Subject: [PATCH 3102/4487] (_NSIG): Define to 65. --- sysdeps/unix/sysv/linux/alpha/bits/signum.h | 4 ++-- sysdeps/unix/sysv/linux/hppa/bits/signum.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/signum.h b/sysdeps/unix/sysv/linux/alpha/bits/signum.h index 44c96a2045..477c13175d 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/signum.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/signum.h @@ -1,5 +1,5 @@ /* Signal number definitions. Linux/Alpha version. - Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 1999, 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 @@ -69,7 +69,7 @@ #define SIGPWR SIGINFO #define SIGIOT SIGABRT -#define _NSIG 64 /* Biggest signal number + 1. */ +#define _NSIG 65 /* Biggest signal number + 1. */ #define SIGRTMIN (__libc_current_sigrtmin ()) #define SIGRTMAX (__libc_current_sigrtmax ()) diff --git a/sysdeps/unix/sysv/linux/hppa/bits/signum.h b/sysdeps/unix/sysv/linux/hppa/bits/signum.h index 14346bf065..bf46006c8d 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/signum.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/signum.h @@ -1,5 +1,5 @@ /* Signal number definitions. Linux/HPPA version. - Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1995,1996,1997,1998,1999,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 @@ -68,7 +68,7 @@ #define SIGXFSZ 34 /* File size limit exceeded (4.2 BSD). */ #define SIGSTKFLT 36 /* Stack fault. */ -#define _NSIG 64 /* Biggest signal number + 1 +#define _NSIG 65 /* Biggest signal number + 1 (including real-time signals). */ #define SIGRTMIN (__libc_current_sigrtmin ()) From 97012650e20a55130c734af68d7a5d5ab16d71f7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 3 Apr 2003 19:32:34 +0000 Subject: [PATCH 3103/4487] (PSEUDO): Add missing ; after ENTRY use. --- sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h index 25dbb9e565..d2043aad91 100644 --- a/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h @@ -43,7 +43,7 @@ # define PSEUDO(name, syscall_name, args) \ .section ".text"; \ PSEUDO_PROLOGUE; \ - ENTRY (name) \ + ENTRY (name); \ SINGLE_THREAD_P_INT; \ bne .Lpseudo_cancel; \ DO_CALL (syscall_name, args); \ From f7277ebafe5b3855bd1dd7142a867f2899ed4922 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Fri, 4 Apr 2003 05:12:00 +0000 Subject: [PATCH 3104/4487] * sysdeps/unix/sysv/linux/mips/bits/fcntl.h (struct flock): Adjust for n64 abi. --- sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index 6a09a09ece..97e1867729 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -1,5 +1,6 @@ /* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997, 1998, 2000, 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 @@ -142,14 +143,20 @@ typedef struct flock #ifndef __USE_FILE_OFFSET64 __off_t l_start; /* Offset where the lock begins. */ __off_t l_len; /* Size of the locked area; zero means until EOF. */ - long int l_sysid; /* XXX */ +#if ! (defined _ABI64 && _MIPS_SIM == _ABI64) + /* The 64-bit flock structure, used by the n64 ABI, and for 64-bit + fcntls in o32 and n32, never has this field. */ + long int l_sysid; +#endif #else __off64_t l_start; /* Offset where the lock begins. */ __off64_t l_len; /* Size of the locked area; zero means until EOF. */ #endif __pid_t l_pid; /* Process holding the lock. */ -#ifndef __USE_FILE_OFFSET64 - long int pad[4]; /* XXX */ +#if ! defined __USE_FILE_OFFSET64 && ! (defined _ABI64 && _MIPS_SIM == _ABI64) + /* The 64-bit flock structure, used by the n64 ABI, and for 64-bit + flock in o32 and n32, never has this field. */ + long int pad[4]; #endif } flock_t; From e635cc8cc2d8fd1f76a8affbab9a031367fb141a Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Sat, 5 Apr 2003 19:57:35 +0000 Subject: [PATCH 3105/4487] * sysdeps/unix/sysv/linux/mips/mips64/n32/ftruncate64.c: New. * sysdeps/unix/sysv/linux/mips/mips64/n32/truncate64.c: New. * sysdeps/unix/sysv/linux/kernel-features.h: fcntl64 is available on mips n32. * sysdeps/unix/sysv/linux/mips/kernel_stat.h: Explain why XSTAT_IS_XSTAT64 must not be used for mips n64. Use 64-bit data structure on n32 as well. * sysdeps/unix/sysv/linux/mips/bits/stat.h: Use POSIX-compliant data types on n32 and n64. --- sysdeps/unix/sysv/linux/mips/bits/stat.h | 69 ++++++++++++++++++- sysdeps/unix/sysv/linux/mips/kernel_stat.h | 13 ++-- .../sysv/linux/mips/mips64/n32/ftruncate64.c | 28 ++++++++ .../sysv/linux/mips/mips64/n32/truncate64.c | 30 ++++++++ 4 files changed, 134 insertions(+), 6 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n32/ftruncate64.c create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n32/truncate64.c diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h index c0e6984d11..c3819d3981 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/stat.h +++ b/sysdeps/unix/sysv/linux/mips/bits/stat.h @@ -1,4 +1,5 @@ -/* Copyright (C) 1992,95,96,97,98,99,2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 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 @@ -33,6 +34,7 @@ #define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */ +#if _MIPS_SIM == _MIPS_SIM_ABI32 /* Structure describing file characteristics. */ struct stat { @@ -106,6 +108,71 @@ struct stat64 long int st_pad4[14]; }; #endif +#else +struct stat + { + __dev_t st_dev; + int st_pad1[3]; /* Reserved for st_dev expansion */ +#ifndef __USE_FILE_OFFSET64 + __ino_t st_ino; +#else + __ino64_t st_ino; +#endif + __mode_t st_mode; + __nlink_t st_nlink; + __uid_t st_uid; + __gid_t st_gid; + __dev_t st_rdev; +#if !defined __USE_FILE_OFFSET64 + unsigned int st_pad2[2]; /* Reserved for st_rdev expansion */ + __off_t st_size; + int st_pad3; +#else + unsigned int st_pad2[3]; /* Reserved for st_rdev expansion */ + __off64_t st_size; +#endif + __time_t st_atime; + int __reserved0; + __time_t st_mtime; + int __reserved1; + __time_t st_ctime; + int __reserved2; + __blksize_t st_blksize; + unsigned int st_pad4; +#ifndef __USE_FILE_OFFSET64 + __blkcnt_t st_blocks; +#else + __blkcnt64_t st_blocks; +#endif + int st_pad5[14]; + }; + +#ifdef __USE_LARGEFILE64 +struct stat64 + { + __dev_t st_dev; + unsigned int st_pad1[3]; /* Reserved for st_dev expansion */ + __ino64_t st_ino; + __mode_t st_mode; + __nlink_t st_nlink; + __uid_t st_uid; + __gid_t st_gid; + __dev_t st_rdev; + unsigned int st_pad2[3]; /* Reserved for st_rdev expansion */ + __off64_t st_size; + __time_t st_atime; + int __reserved0; + __time_t st_mtime; + int __reserved1; + __time_t st_ctime; + int __reserved2; + __blksize_t st_blksize; + unsigned int st_pad3; + __blkcnt64_t st_blocks; + int st_pad4[14]; +}; +#endif +#endif /* Tell code we have these members. */ #define _STATBUF_ST_BLKSIZE diff --git a/sysdeps/unix/sysv/linux/mips/kernel_stat.h b/sysdeps/unix/sysv/linux/mips/kernel_stat.h index b5fcd008b0..3f1bce57c5 100644 --- a/sysdeps/unix/sysv/linux/mips/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/mips/kernel_stat.h @@ -1,17 +1,20 @@ -/* Definition of `struct stat' used in the kernel.. */ -#if defined _ABI64 && _MIPS_SIM == _ABI64 +/* As tempting as it is to define XSTAT_IS_XSTAT64 for n64, the + userland data structures are not identical, because of different + padding. */ +/* Definition of `struct stat' used in the kernel. */ +#if _MIPS_SIM != _MIPS_SIM_ABI32 struct kernel_stat { unsigned int st_dev; unsigned int __pad1[3]; - unsigned long st_ino; + unsigned long long st_ino; unsigned int st_mode; unsigned int st_nlink; int st_uid; int st_gid; unsigned int st_rdev; unsigned int __pad2[3]; - long st_size; + long long st_size; unsigned int st_atime; unsigned int __unused1; unsigned int st_mtime; @@ -20,7 +23,7 @@ struct kernel_stat unsigned int __unused3; unsigned int st_blksize; unsigned int __pad3; - unsigned long st_blocks; + unsigned long long st_blocks; }; #else struct kernel_stat diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/ftruncate64.c b/sysdeps/unix/sysv/linux/mips/mips64/n32/ftruncate64.c new file mode 100644 index 0000000000..42efcba315 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/ftruncate64.c @@ -0,0 +1,28 @@ +/* Copyright (C) 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. */ + +#include + +#include + +extern int ftruncate (int fd, off64_t length); + +int __ftruncate64 (int fd, off64_t length) { + return ftruncate (fd, length); +} +weak_alias (__ftruncate64, ftruncate64) diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/truncate64.c b/sysdeps/unix/sysv/linux/mips/mips64/n32/truncate64.c new file mode 100644 index 0000000000..339023f14f --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/truncate64.c @@ -0,0 +1,30 @@ +/* Copyright (C) 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. */ + +#include + +#include +#include + +extern int truncate (const char *__unbounded path, int dummy, + off64_t length); + +int truncate64 (const char *__unbounded path, int dummy, + off64_t length) { + return truncate (path, dummy, length); +} From 96c095cf0db4e0960a6fcb58bc5f786fdf78e028 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Wed, 9 Apr 2003 02:51:04 +0000 Subject: [PATCH 3106/4487] * sysdeps/mips/sys/regdef.h (t4,t5,t6,t7): Renamed to t0..t3 on NewABI. (ta0, ta1, ta2, ta3): Defined to t4..t7 on o32, and a4..a7 on NewABI. * sysdeps/mips/mips64/memcpy.S: Adjust register naming conventions. * sysdeps/mips/mips64/memset.S: Likewise. * sysdeps/unix/mips/sysdep.S (__syscall_error) [_LIBC_REENTRANT]: Use t0 instead of t4 as temporary. --- sysdeps/mips/mips64/memcpy.S | 100 +++++++++++++++++------------------ sysdeps/mips/mips64/memset.S | 40 +++++++------- sysdeps/mips/sys/regdef.h | 22 ++++++-- sysdeps/unix/mips/sysdep.S | 4 +- 4 files changed, 89 insertions(+), 77 deletions(-) diff --git a/sysdeps/mips/mips64/memcpy.S b/sysdeps/mips/mips64/memcpy.S index c4ba7a8f51..e9fc2b712a 100644 --- a/sysdeps/mips/mips64/memcpy.S +++ b/sysdeps/mips/mips64/memcpy.S @@ -42,71 +42,71 @@ ENTRY (memcpy) .set noreorder - slti a4, a2, 16 # Less than 16? - bne a4, zero, L(last16) + slti t0, a2, 16 # Less than 16? + bne t0, zero, L(last16) move v0, a0 # Setup exit value before too late - xor a4, a1, a0 # Find a0/a1 displacement - andi a4, 0x7 - bne a4, zero, L(shift) # Go handle the unaligned case - PTR_SUBU a5, zero, a1 - andi a5, 0x7 # a0/a1 are aligned, but are we - beq a5, zero, L(chk8w) # starting in the middle of a word? - PTR_SUBU a2, a5 - LDHI a4, 0(a1) # Yes we are... take care of that - PTR_ADDU a1, a5 - SDHI a4, 0(a0) - PTR_ADDU a0, a5 + xor t0, a1, a0 # Find a0/a1 displacement + andi t0, 0x7 + bne t0, zero, L(shift) # Go handle the unaligned case + PTR_SUBU t1, zero, a1 + andi t1, 0x7 # a0/a1 are aligned, but are we + beq t1, zero, L(chk8w) # starting in the middle of a word? + PTR_SUBU a2, t1 + LDHI t0, 0(a1) # Yes we are... take care of that + PTR_ADDU a1, t1 + SDHI t0, 0(a0) + PTR_ADDU a0, t1 L(chk8w): - andi a4, a2, 0x3f # 64 or more bytes left? - beq a4, a2, L(chk1w) - PTR_SUBU a3, a2, a4 # Yes + andi t0, a2, 0x3f # 64 or more bytes left? + beq t0, a2, L(chk1w) + PTR_SUBU a3, a2, t0 # Yes PTR_ADDU a3, a1 # a3 = end address of loop - move a2, a4 # a2 = what will be left after loop + move a2, t0 # a2 = what will be left after loop L(lop8w): - ld a4, 0(a1) # Loop taking 8 words at a time - ld a5, 8(a1) - ld a6, 16(a1) - ld a7, 24(a1) - ld t4, 32(a1) - ld t5, 40(a1) - ld t6, 48(a1) - ld t7, 56(a1) + ld t0, 0(a1) # Loop taking 8 words at a time + ld t1, 8(a1) + ld t2, 16(a1) + ld t3, 24(a1) + ld ta0, 32(a1) + ld ta1, 40(a1) + ld ta2, 48(a1) + ld ta3, 56(a1) PTR_ADDIU a0, 64 PTR_ADDIU a1, 64 - sd a4, -64(a0) - sd a5, -56(a0) - sd a6, -48(a0) - sd a7, -40(a0) - sd t4, -32(a0) - sd t5, -24(a0) - sd t6, -16(a0) + sd t0, -64(a0) + sd t1, -56(a0) + sd t2, -48(a0) + sd t3, -40(a0) + sd ta0, -32(a0) + sd ta1, -24(a0) + sd ta2, -16(a0) bne a1, a3, L(lop8w) - sd t7, -8(a0) + sd ta3, -8(a0) L(chk1w): - andi a4, a2, 0x7 # 8 or more bytes left? - beq a4, a2, L(last16) - PTR_SUBU a3, a2, a4 # Yes, handle them one dword at a time + andi t0, a2, 0x7 # 8 or more bytes left? + beq t0, a2, L(last16) + PTR_SUBU a3, a2, t0 # Yes, handle them one dword at a time PTR_ADDU a3, a1 # a3 again end address - move a2, a4 + move a2, t0 L(lop1w): - ld a4, 0(a1) + ld t0, 0(a1) PTR_ADDIU a0, 8 PTR_ADDIU a1, 8 bne a1, a3, L(lop1w) - sd a4, -8(a0) + sd t0, -8(a0) L(last16): blez a2, L(lst16e) # Handle last 16 bytes, one at a time PTR_ADDU a3, a2, a1 L(lst16l): - lb a4, 0(a1) + lb t0, 0(a1) PTR_ADDIU a0, 1 PTR_ADDIU a1, 1 bne a1, a3, L(lst16l) - sb a4, -1(a0) + sb t0, -1(a0) L(lst16e): jr ra # Bye, bye nop @@ -116,24 +116,24 @@ L(shift): andi a3, 0x7 # (unoptimized case...) beq a3, zero, L(shft1) PTR_SUBU a2, a3 # a2 = bytes left - LDHI a4, 0(a1) # Take care of first odd part - LDLO a4, 7(a1) + LDHI t0, 0(a1) # Take care of first odd part + LDLO t0, 7(a1) PTR_ADDU a1, a3 - SDHI a4, 0(a0) + SDHI t0, 0(a0) PTR_ADDU a0, a3 L(shft1): - andi a4, a2, 0x7 - PTR_SUBU a3, a2, a4 + andi t0, a2, 0x7 + PTR_SUBU a3, a2, t0 PTR_ADDU a3, a1 L(shfth): - LDHI a5, 0(a1) # Limp through, dword by dword - LDLO a5, 7(a1) + LDHI t1, 0(a1) # Limp through, dword by dword + LDLO t1, 7(a1) PTR_ADDIU a0, 8 PTR_ADDIU a1, 8 bne a1, a3, L(shfth) - sd a5, -8(a0) + sd t1, -8(a0) b L(last16) # Handle anything which may be left - move a2, a4 + move a2, t0 .set reorder END (memcpy) diff --git a/sysdeps/mips/mips64/memset.S b/sysdeps/mips/mips64/memset.S index d6e1790fbe..784fa5deee 100644 --- a/sysdeps/mips/mips64/memset.S +++ b/sysdeps/mips/mips64/memset.S @@ -36,33 +36,33 @@ ENTRY (memset) .set noreorder - slti t5, a2, 16 # Less than 16? - bne t5, zero, L(last16) + slti ta1, a2, 16 # Less than 16? + bne ta1, zero, L(last16) move v0, a0 # Setup exit value before too late beq a1, zero, L(ueven) # If zero pattern, no need to extend andi a1, 0xff # Avoid problems with bogus arguments - dsll t4, a1, 8 - or a1, t4 - dsll t4, a1, 16 - or a1, t4 # a1 is now pattern in full word - dsll t4, a1, 32 - or a1, t4 # a1 is now pattern in double word + dsll ta0, a1, 8 + or a1, ta0 + dsll ta0, a1, 16 + or a1, ta0 # a1 is now pattern in full word + dsll ta0, a1, 32 + or a1, ta0 # a1 is now pattern in double word L(ueven): - PTR_SUBU t4, zero, a0 # Unaligned address? - andi t4, 0x7 - beq t4, zero, L(chkw) - PTR_SUBU a2, t4 + PTR_SUBU ta0, zero, a0 # Unaligned address? + andi ta0, 0x7 + beq ta0, zero, L(chkw) + PTR_SUBU a2, ta0 SDHI a1, 0(a0) # Yes, handle first unaligned part - PTR_ADDU a0, t4 # Now both a0 and a2 are updated + PTR_ADDU a0, ta0 # Now both a0 and a2 are updated L(chkw): - andi t4, a2, 0xf # Enough left for one loop iteration? - beq t4, a2, L(chkl) - PTR_SUBU a3, a2, t4 + andi ta0, a2, 0xf # Enough left for one loop iteration? + beq ta0, a2, L(chkl) + PTR_SUBU a3, a2, ta0 PTR_ADDU a3, a0 # a3 is last loop address +1 - move a2, t4 # a2 is now # of bytes left after loop + move a2, ta0 # a2 is now # of bytes left after loop L(loopw): PTR_ADDIU a0, 16 # Handle 2 dwords pr. iteration sd a1, -16(a0) @@ -70,9 +70,9 @@ L(loopw): sd a1, -8(a0) L(chkl): - andi t4, a2, 0x8 # Check if there is at least a double - beq t4, zero, L(last16) # word remaining after the loop - PTR_SUBU a2, t4 + andi ta0, a2, 0x8 # Check if there is at least a double + beq ta0, zero, L(last16) # word remaining after the loop + PTR_SUBU a2, ta0 sd a1, 0(a0) # Yes... PTR_ADDIU a0, 8 diff --git a/sysdeps/mips/sys/regdef.h b/sysdeps/mips/sys/regdef.h index f3a0df5ab4..9d2c4c1c4c 100644 --- a/sysdeps/mips/sys/regdef.h +++ b/sysdeps/mips/sys/regdef.h @@ -32,20 +32,32 @@ #define a2 $6 #define a3 $7 #if _MIPS_SIM != _MIPS_SIM_ABI32 -#define a4 $8 -#define a5 $9 -#define a6 $10 -#define a7 $11 +#define a4 $8 +#define a5 $9 +#define a6 $10 +#define a7 $11 +#define t0 $12 +#define t1 $13 +#define t2 $14 +#define t3 $15 +#define ta0 a4 +#define ta1 a5 +#define ta2 a6 +#define ta3 a7 #else /* if _MIPS_SIM == _MIPS_SIM_ABI32 */ #define t0 $8 /* caller saved */ #define t1 $9 #define t2 $10 #define t3 $11 -#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ #define t4 $12 #define t5 $13 #define t6 $14 #define t7 $15 +#define ta0 t4 +#define ta1 t5 +#define ta2 t6 +#define ta3 t7 +#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ #define s0 $16 /* callee saved */ #define s1 $17 #define s2 $18 diff --git a/sysdeps/unix/mips/sysdep.S b/sysdeps/unix/mips/sysdep.S index 8c23b4f1e2..8c172db190 100644 --- a/sysdeps/unix/mips/sysdep.S +++ b/sysdeps/unix/mips/sysdep.S @@ -60,8 +60,8 @@ L(skip): jal __errno_location /* Store the error value. */ - REG_L t4, V0OFF(sp) - sw t4, 0(v0) + REG_L t0, V0OFF(sp) + sw t0, 0(v0) /* And just kick back a -1. */ REG_L ra, RAOFF(sp) From be3abeade22e92bb360cf1f3bf505c60da80d0e4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 9 Apr 2003 07:39:17 +0000 Subject: [PATCH 3107/4487] Remove FLT_EVAL_METHOD definition. --- sysdeps/alpha/fpu/bits/mathdef.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/sysdeps/alpha/fpu/bits/mathdef.h b/sysdeps/alpha/fpu/bits/mathdef.h index 5e962c8d31..515b93a562 100644 --- a/sysdeps/alpha/fpu/bits/mathdef.h +++ b/sysdeps/alpha/fpu/bits/mathdef.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999, 2000, 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 @@ -33,9 +33,6 @@ typedef float float_t; typedef double double_t; -/* Signal that types stay as they were declared. */ -# define FLT_EVAL_METHOD 0 - /* Define `INFINITY' as value of type `float'. */ # define INFINITY HUGE_VALF @@ -45,9 +42,6 @@ typedef double double_t; typedef double float_t; typedef double double_t; -/* Signal that both types are `double'. */ -# define FLT_EVAL_METHOD 1 - /* Define `INFINITY' as value of type `float'. */ # define INFINITY HUGE_VALF From 4caa0b1c3e1c26113d29c2bdaef7791109dc6670 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 12 Apr 2003 00:51:50 +0000 Subject: [PATCH 3108/4487] Allow file to be included multiple times. --- sysdeps/alpha/bits/setjmp.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/bits/setjmp.h b/sysdeps/alpha/bits/setjmp.h index fcd57d61d1..c603a35554 100644 --- a/sysdeps/alpha/bits/setjmp.h +++ b/sysdeps/alpha/bits/setjmp.h @@ -1,5 +1,5 @@ /* Define the machine-dependent type `jmp_buf'. Alpha version. - Copyright (C) 1992, 1997 Free Software Foundation, Inc. + Copyright (C) 1992, 1997, 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 @@ -17,7 +17,10 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#ifndef _SETJMP_H +#ifndef _BITS_SETJMP_H +#define _BITS_SETJMP_H 1 + +#if !defined _SETJMP_H && !defined _PTHREAD_H # error "Never include directly; use instead." #endif @@ -80,3 +83,5 @@ typedef long int __jmp_buf[17]; #define _JMPBUF_UNWINDS(_jmpbuf, _address) \ ((void *)(_address) < (void *)((_jmpbuf)[JB_SP])) #endif + +#endif /* bits/setjmp.h */ From d25102aa735f78a5cd9b0920db66ab12c703891a Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Sun, 13 Apr 2003 11:36:32 +0000 Subject: [PATCH 3109/4487] * sysdeps/unix/sysv/linux/mips/profil-counter: New. * sysdeps/unix/sysv/linux/mips/sigcontextinfo.h: Port to n32/n64. * sysdeps/unix/sysv/linux/mips/bits/sigcontext.h: New. * sysdeps/unix/sysv/linux/mips/sys/ucontext.h: Port to n32/n64. (mcontext_t): Make it match the 32-bit mips kernel in o32. * sysdeps/unix/sysv/linux/mips/sys/user.h: Bring in constants from the mips and mips64 headers. (struct user): Port to n32/n64. --- .../unix/sysv/linux/mips/bits/sigcontext.h | 103 +++++++++++ sysdeps/unix/sysv/linux/mips/profil-counter.h | 2 + sysdeps/unix/sysv/linux/mips/sigcontextinfo.h | 16 +- sysdeps/unix/sysv/linux/mips/sys/ucontext.h | 61 +++++-- sysdeps/unix/sysv/linux/mips/sys/user.h | 169 +++++++++++++++++- 5 files changed, 330 insertions(+), 21 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/mips/bits/sigcontext.h create mode 100644 sysdeps/unix/sysv/linux/mips/profil-counter.h diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h b/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h new file mode 100644 index 0000000000..888c05f6b6 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h @@ -0,0 +1,103 @@ +/* Copyright (C) 1996, 1997, 1998, 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. */ + +#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H +# error "Never use directly; include instead." +#endif + +#ifndef sigcontext_struct +/* Kernel headers before 2.1.1 define a struct sigcontext_struct, but + we need sigcontext. */ +# define sigcontext_struct sigcontext + +/* # include */ +/* Instead of including the kernel header, that will vary depending on + whether the 32- or the 64-bit kernel is installed, we paste the + contents here. In case you're wondering about the different + licenses, the fact that the file is pasted, instead of included, + doesn't really make any difference for the program that includes + this header. */ +#if _MIPS_SIM == _MIPS_SIM_ABI32 +/* + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (C) 1996, 1997, 2000 by Ralf Baechle + */ +#ifndef _ASM_SIGCONTEXT_H +#define _ASM_SIGCONTEXT_H + +/* + * Keep this struct definition in sync with the sigcontext fragment + * in arch/mips/tools/offset.c + */ +struct sigcontext { + unsigned int sc_regmask; /* Unused */ + unsigned int sc_status; + unsigned long long sc_pc; + unsigned long long sc_regs[32]; + unsigned long long sc_fpregs[32]; + unsigned int sc_ownedfp; /* Unused */ + unsigned int sc_fpc_csr; + unsigned int sc_fpc_eir; /* Unused */ + unsigned int sc_used_math; + unsigned int sc_ssflags; /* Unused */ + unsigned long long sc_mdhi; + unsigned long long sc_mdlo; + + unsigned int sc_cause; /* Unused */ + unsigned int sc_badvaddr; /* Unused */ + + unsigned long sc_sigset[4]; /* kernel's sigset_t */ +}; + +#endif /* _ASM_SIGCONTEXT_H */ +#else /* _MIPS_SIM != _MIPS_SIM_ABI32 */ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (C) 1996, 1997, 1999 by Ralf Baechle + * Copyright (C) 1999 Silicon Graphics, Inc. + */ +#ifndef _ASM_SIGCONTEXT_H +#define _ASM_SIGCONTEXT_H + +/* + * Keep this struct definition in sync with the sigcontext fragment + * in arch/mips/tools/offset.c + */ +struct sigcontext { + unsigned long long sc_regs[32]; + unsigned long long sc_fpregs[32]; + unsigned long long sc_mdhi; + unsigned long long sc_mdlo; + unsigned long long sc_pc; + unsigned int sc_status; + unsigned int sc_fpc_csr; + unsigned int sc_fpc_eir; + unsigned int sc_used_math; + unsigned int sc_cause; + unsigned int sc_badvaddr; +}; + +#endif /* _ASM_SIGCONTEXT_H */ +#endif /* _MIPS_SIM != _MIPS_SIM_ABI32 */ +#endif diff --git a/sysdeps/unix/sysv/linux/mips/profil-counter.h b/sysdeps/unix/sysv/linux/mips/profil-counter.h new file mode 100644 index 0000000000..8a6a0bcf3d --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/profil-counter.h @@ -0,0 +1,2 @@ +/* We can use the ix86 version. */ +#include diff --git a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h index a51c6f043c..3ab6d99e75 100644 --- a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h +++ b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger , 2000. @@ -18,6 +18,8 @@ 02111-1307 USA. */ +#if _MIPS_SIM == _MIPS_SIM_ABI32 + #define SIGCONTEXT unsigned long _code, struct sigcontext * #define SIGCONTEXT_EXTRA_ARGS _code, #define GET_PC(ctx) ((void *) ctx->sc_pc) @@ -25,3 +27,15 @@ #define GET_STACK(ctx) ((void *) ctx->sc_regs[29]) #define CALL_SIGHANDLER(handler, signo, ctx) \ (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx)) + +#else + +#define SIGCONTEXT unsigned long _code, ucontext_t * +#define SIGCONTEXT_EXTRA_ARGS _code, +#define GET_PC(ctx) ((void *) ctx->uc_mcontext.pc) +#define GET_FRAME(ctx) ((void *) ctx->uc_mcontext.gregs[30]) +#define GET_STACK(ctx) ((void *) ctx->uc_mcontext.gregs[29]) +#define CALL_SIGHANDLER(handler, signo, ctx) \ + (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx)) + +#endif diff --git a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h index 9d80b4086a..66c729a4f9 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h @@ -29,47 +29,72 @@ #include -/* Type for general register. */ -#if defined _ABIN32 && _MIPS_SIM == _ABIN32 +/* Type for general register. Even in o32 we assume 64-bit registers, + like the kernel. */ __extension__ typedef unsigned long long int greg_t; -#else -typedef unsigned long int greg_t; -#endif /* Number of general registers. */ -#define NGREG 37 -#define NFPREG 33 +#define NGREG 32 +#define NFPREG 32 /* Container for all general registers. */ -/* gregset_t must be an array. The below declared array corresponds to: -typedef struct gregset { - greg_t g_regs[32]; - greg_t g_hi; - greg_t g_lo; - greg_t g_pad[3]; -} gregset_t; */ typedef greg_t gregset_t[NGREG]; /* Container for all FPU registers. */ typedef struct fpregset { union { - double fp_dregs[32]; + double fp_dregs[NFPREG]; struct { float _fp_fregs; unsigned int _fp_pad; - } fp_fregs[32]; + } fp_fregs[NFPREG]; } fp_r; - unsigned int fp_csr; - unsigned int fp_pad; } fpregset_t; /* Context to describe whole processor state. */ +#if _MIPS_SIM == _MIPS_SIM_ABI32 +/* Earlier versions of glibc for mips had an entirely different + definition of mcontext_t, that didn't even resemble the + corresponding kernel data structure. Since all legitimate uses of + ucontext_t in glibc mustn't have accessed anything beyond + uc_mcontext and, even then, taking a pointer to it, casting it to + sigcontext_t, and accessing it as such, which is what it has always + been, this can still be rectified. Fortunately, makecontext, + [gs]etcontext et all have never been implemented. */ +typedef struct + { + unsigned int regmask; + unsigned int status; + greg_t pc; + gregset_t gregs; + fpregset_t fpregs; + unsigned int fp_owned; + unsigned int fpc_csr; + unsigned int fpc_eir; + unsigned int used_math; + unsigned int ssflags; + greg_t mdhi; + greg_t mdlo; + unsigned int cause; + unsigned int badvaddr; + } mcontext_t; +#else typedef struct { gregset_t gregs; fpregset_t fpregs; + greg_t mdhi; + greg_t mdlo; + greg_t pc; + unsigned int status; + unsigned int fpc_csr; + unsigned int fpc_eir; + unsigned int used_math; + unsigned int cause; + unsigned int badvaddr; } mcontext_t; +#endif /* Userlevel context. */ typedef struct ucontext diff --git a/sysdeps/unix/sysv/linux/mips/sys/user.h b/sysdeps/unix/sysv/linux/mips/sys/user.h index 21f7b28ca1..8b21ff2786 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/user.h +++ b/sysdeps/unix/sysv/linux/mips/sys/user.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. +/* 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 @@ -23,7 +23,154 @@ too much into it. Don't use it for anything other than GDB unless you know what you are doing. */ -#include +/* #include */ +/* Instead of including the kernel header, that will vary depending on + whether the 32- or the 64-bit kernel is installed, we paste its + contents here. Note that the fact that the file is inline here, + instead of included separately, doesn't change in any way the + licensing status of a program that includes user.h. Since this is + for gdb alone, and gdb is GPLed, no surprises here. */ +#if _MIPS_SIM == _MIPS_SIM_ABI32 +/* + * Various register offset definitions for debuggers, core file + * examiners and whatnot. + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (C) 1995, 1999 by Ralf Baechle + */ +#ifndef __ASM_MIPS_REG_H +#define __ASM_MIPS_REG_H + +/* + * This defines/structures correspond to the register layout on stack - + * if the order here is changed, it needs to be updated in + * include/asm-mips/stackframe.h + */ +#define EF_REG0 6 +#define EF_REG1 7 +#define EF_REG2 8 +#define EF_REG3 9 +#define EF_REG4 10 +#define EF_REG5 11 +#define EF_REG6 12 +#define EF_REG7 13 +#define EF_REG8 14 +#define EF_REG9 15 +#define EF_REG10 16 +#define EF_REG11 17 +#define EF_REG12 18 +#define EF_REG13 19 +#define EF_REG14 20 +#define EF_REG15 21 +#define EF_REG16 22 +#define EF_REG17 23 +#define EF_REG18 24 +#define EF_REG19 25 +#define EF_REG20 26 +#define EF_REG21 27 +#define EF_REG22 28 +#define EF_REG23 29 +#define EF_REG24 30 +#define EF_REG25 31 +/* + * k0/k1 unsaved + */ +#define EF_REG28 34 +#define EF_REG29 35 +#define EF_REG30 36 +#define EF_REG31 37 + +/* + * Saved special registers + */ +#define EF_LO 38 +#define EF_HI 39 + +#define EF_CP0_EPC 40 +#define EF_CP0_BADVADDR 41 +#define EF_CP0_STATUS 42 +#define EF_CP0_CAUSE 43 + +#define EF_SIZE 180 /* size in bytes */ + +#endif /* __ASM_MIPS_REG_H */ + +#else /* _MIPS_SIM != _MIPS_SIM_ABI32 */ + +/* + * Various register offset definitions for debuggers, core file + * examiners and whatnot. + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (C) 1995, 1999 Ralf Baechle + * Copyright (C) 1995, 1999 Silicon Graphics + */ +#ifndef _ASM_REG_H +#define _ASM_REG_H + +/* + * This defines/structures correspond to the register layout on stack - + * if the order here is changed, it needs to be updated in + * include/asm-mips/stackframe.h + */ +#define EF_REG0 0 +#define EF_REG1 1 +#define EF_REG2 2 +#define EF_REG3 3 +#define EF_REG4 4 +#define EF_REG5 5 +#define EF_REG6 6 +#define EF_REG7 7 +#define EF_REG8 8 +#define EF_REG9 9 +#define EF_REG10 10 +#define EF_REG11 11 +#define EF_REG12 12 +#define EF_REG13 13 +#define EF_REG14 14 +#define EF_REG15 15 +#define EF_REG16 16 +#define EF_REG17 17 +#define EF_REG18 18 +#define EF_REG19 19 +#define EF_REG20 20 +#define EF_REG21 21 +#define EF_REG22 22 +#define EF_REG23 23 +#define EF_REG24 24 +#define EF_REG25 25 +/* + * k0/k1 unsaved + */ +#define EF_REG28 28 +#define EF_REG29 29 +#define EF_REG30 30 +#define EF_REG31 31 + +/* + * Saved special registers + */ +#define EF_LO 32 +#define EF_HI 33 + +#define EF_CP0_EPC 34 +#define EF_CP0_BADVADDR 35 +#define EF_CP0_STATUS 36 +#define EF_CP0_CAUSE 37 + +#define EF_SIZE 304 /* size in bytes */ + +#endif /* _ASM_REG_H */ + +#endif /* _MIPS_SIM != _MIPS_SIM_ABI32 */ + +#if _MIPS_SIM == _MIPS_SIM_ABI32 struct user { @@ -40,6 +187,24 @@ struct user char u_comm[32]; /* user command name */ }; +#else + +struct user { + __extension__ unsigned long regs[EF_SIZE/8+64]; /* integer and fp regs */ + __extension__ unsigned long u_tsize; /* text size (pages) */ + __extension__ unsigned long u_dsize; /* data size (pages) */ + __extension__ unsigned long u_ssize; /* stack size (pages) */ + __extension__ unsigned long long start_code; /* text starting address */ + __extension__ unsigned long long start_data; /* data starting address */ + __extension__ unsigned long long start_stack; /* stack starting address */ + __extension__ long long signal; /* signal causing core dump */ + __extension__ unsigned long long u_ar0; /* help gdb find registers */ + __extension__ unsigned long long magic; /* identifies a core file */ + char u_comm[32]; /* user command name */ +}; + +#endif + #define PAGE_SHIFT 12 #define PAGE_SIZE (1UL << PAGE_SHIFT) #define PAGE_MASK (~(PAGE_SIZE-1)) From 4a05f4cc0892c56b00b4aa1bfa11a5a2e9962121 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 19 Apr 2003 18:31:57 +0000 Subject: [PATCH 3110/4487] Sync with Linux 2.5.67. --- sysdeps/unix/sysv/linux/alpha/bits/fcntl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h index 8aee77f1a0..a84d33572d 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h @@ -168,6 +168,6 @@ struct flock64 # define POSIX_FADV_RANDOM 1 /* Expect random page references. */ # define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */ # define POSIX_FADV_WILLNEED 3 /* Will need these pages. */ -# define POSIX_FADV_DONTNEED 6 /* Don't need these pages. */ -# define POSIX_FADV_NOREUSE 7 /* Data will be accessed once. */ +# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */ +# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ #endif From c3e16ef8edc224314488465a1f548d8ff69c6c53 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 21 Apr 2003 07:27:10 +0000 Subject: [PATCH 3111/4487] Define SI_TKILL. --- sysdeps/unix/sysv/linux/alpha/bits/siginfo.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h b/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h index 446394f0db..a2aacc04b1 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h @@ -122,8 +122,10 @@ typedef struct siginfo signals. */ enum { - SI_ASYNCNL = -6, /* Sent by asynch name lookup completion. */ + SI_ASYNCNL = -60, /* Sent by asynch name lookup completion. */ # define SI_ASYNCNL SI_ASYNCNL + SI_TKILL = -6, /* Sent by tkill. */ +# define SI_TKILL SI_TKILL SI_SIGIO, /* Sent by queued SIGIO. */ # define SI_SIGIO SI_SIGIO SI_ASYNCIO, /* Sent by AIO completion. */ From 9d90f5e569f14b2aeaaf480f771b4652d7d9ad5b Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 27 Apr 2003 17:08:00 +0000 Subject: [PATCH 3112/4487] semtimedop implementation for Linux/m68k. --- sysdeps/unix/sysv/linux/m68k/semtimedop.S | 60 +++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/semtimedop.S diff --git a/sysdeps/unix/sysv/linux/m68k/semtimedop.S b/sysdeps/unix/sysv/linux/m68k/semtimedop.S new file mode 100644 index 0000000000..2775c124c6 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/semtimedop.S @@ -0,0 +1,60 @@ +/* Copyright (C) 2003 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Schwab , 2003. + + 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. */ + +#include + +#define SYSOP_semtimedop 4 + +#define SVRSP 8 /* saved register space */ +#define PARMS 4+SVRSP /* space for 3 saved regs */ +#define SEMID PARMS +#define SOPS SEMID+4 +#define NSOPS SOPS+4 +#define TIMEOUT NSOPS+4 + + .text +ENTRY (semtimedop) + + /* Save registers. */ + move.l %d2, %a1 + move.l %d3, -(%sp) + move.l %d5, -(%sp) + + move.l #SYSOP_semtimedop, %d1 + move.l SEMID(%sp), %d2 + move.l NSOPS(%sp), %d3 + move.l SOPS(%sp), %d5 + move.l TIMEOUT(%sp), %a0 + move.l #SYS_ify (ipc), %d0 + + trap #0 + + /* Restore registers. */ + move.l (%sp)+, %d5 + move.l (%sp)+, %d3 + move.l %a1, %d2 + + /* Check for error. */ + tst.l %d0 + jmi SYSCALL_ERROR_LABEL + + /* Successful; return the syscall's value. */ + ret + +PSEUDO_END (semtimedop) From 79b7c8634d6b14f8143089c88fa5704ca890b8d3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 29 Apr 2003 22:47:20 +0000 Subject: [PATCH 3113/4487] Add libc_hidden_builtin_def. --- sysdeps/alpha/alphaev6/memchr.S | 3 ++- sysdeps/alpha/alphaev6/memcpy.S | 3 ++- sysdeps/alpha/alphaev6/memset.S | 3 ++- sysdeps/alpha/alphaev67/strcat.S | 3 ++- sysdeps/alpha/alphaev67/strchr.S | 3 ++- sysdeps/alpha/alphaev67/strlen.S | 3 ++- sysdeps/alpha/alphaev67/strrchr.S | 3 ++- sysdeps/alpha/memchr.S | 3 ++- sysdeps/alpha/memset.S | 3 ++- sysdeps/alpha/strcat.S | 3 ++- sysdeps/alpha/strchr.S | 3 ++- sysdeps/alpha/strcmp.S | 3 ++- sysdeps/alpha/strcpy.S | 3 ++- sysdeps/alpha/strlen.S | 3 ++- sysdeps/alpha/strncmp.S | 3 ++- sysdeps/alpha/strncpy.S | 3 ++- sysdeps/alpha/strrchr.S | 3 ++- sysdeps/arm/memset.S | 3 ++- sysdeps/arm/strlen.S | 3 ++- sysdeps/m68k/memchr.S | 3 ++- sysdeps/m68k/strchr.S | 3 ++- sysdeps/mips/memcpy.S | 1 + sysdeps/mips/memset.S | 1 + sysdeps/mips/mips64/memcpy.S | 1 + sysdeps/mips/mips64/memset.S | 1 + 25 files changed, 46 insertions(+), 21 deletions(-) diff --git a/sysdeps/alpha/alphaev6/memchr.S b/sysdeps/alpha/alphaev6/memchr.S index 05e00dd9b5..88e91fa988 100644 --- a/sysdeps/alpha/alphaev6/memchr.S +++ b/sysdeps/alpha/alphaev6/memchr.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger (davidm@cs.arizona.edu). EV6 optimized by Rick Gorton . @@ -190,3 +190,4 @@ weak_alias (__memchr, memchr) #if !__BOUNDED_POINTERS__ weak_alias (__memchr, __ubp_memchr) #endif +libc_hidden_builtin_def (memchr) diff --git a/sysdeps/alpha/alphaev6/memcpy.S b/sysdeps/alpha/alphaev6/memcpy.S index 5e59a04ff1..d16bc03a02 100644 --- a/sysdeps/alpha/alphaev6/memcpy.S +++ b/sysdeps/alpha/alphaev6/memcpy.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. EV6 optimized by Rick Gorton . @@ -252,3 +252,4 @@ $nomoredata: nop # E : END(memcpy) +libc_hidden_builtin_def (memcpy) diff --git a/sysdeps/alpha/alphaev6/memset.S b/sysdeps/alpha/alphaev6/memset.S index e700d3dc9f..3b3c4ba061 100644 --- a/sysdeps/alpha/alphaev6/memset.S +++ b/sysdeps/alpha/alphaev6/memset.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2003 Free Software Foundation, Inc. Contributed by Richard Henderson (rth@tamu.edu) EV6 optimized by Rick Gorton . This file is part of the GNU C Library. @@ -221,3 +221,4 @@ $end: ret $31,($26),1 # L0 : END(memset) +libc_hidden_builtin_def (memset) diff --git a/sysdeps/alpha/alphaev67/strcat.S b/sysdeps/alpha/alphaev67/strcat.S index 3bd4789f74..ae7c48808a 100644 --- a/sysdeps/alpha/alphaev67/strcat.S +++ b/sysdeps/alpha/alphaev67/strcat.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2003 Free Software Foundation, Inc. Contributed by Richard Henderson , 1996. EV67 optimized by Rick Gorton . This file is part of the GNU C Library. @@ -59,3 +59,4 @@ $found: cttz $2, $3 # U0 : jmp $31, __stxcpy # L0 : END(strcat) +libc_hidden_builtin_def (strcat) diff --git a/sysdeps/alpha/alphaev67/strchr.S b/sysdeps/alpha/alphaev67/strchr.S index 9c1e88b8d3..101c7d489a 100644 --- a/sysdeps/alpha/alphaev67/strchr.S +++ b/sysdeps/alpha/alphaev67/strchr.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2003 Free Software Foundation, Inc. Contributed by Richard Henderson , 1996. EV67 optimized by Rick Gorton . This file is part of the GNU C Library. @@ -98,3 +98,4 @@ $found: END(strchr) weak_alias (strchr, index) +libc_hidden_builtin_def (strchr) diff --git a/sysdeps/alpha/alphaev67/strlen.S b/sysdeps/alpha/alphaev67/strlen.S index bbe7cfc24d..b83eacceaf 100644 --- a/sysdeps/alpha/alphaev67/strlen.S +++ b/sysdeps/alpha/alphaev67/strlen.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2003 Free Software Foundation, Inc. Contributed by David Mosberger (davidm@cs.arizona.edu). EV67 optimized by Rick Gorton . This file is part of the GNU C Library. @@ -58,3 +58,4 @@ $found: ret $31, ($26) # L0 : END(strlen) +libc_hidden_builtin_def (strlen) diff --git a/sysdeps/alpha/alphaev67/strrchr.S b/sysdeps/alpha/alphaev67/strrchr.S index cb51d2140c..c46a3df4f8 100644 --- a/sysdeps/alpha/alphaev67/strrchr.S +++ b/sysdeps/alpha/alphaev67/strrchr.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2003 Free Software Foundation, Inc. EV67 optimized by Rick Gorton . This file is part of the GNU C Library. @@ -114,3 +114,4 @@ $eos: END(strrchr) weak_alias (strrchr, rindex) +libc_hidden_builtin_def (strrchr) diff --git a/sysdeps/alpha/memchr.S b/sysdeps/alpha/memchr.S index b50b69a2cd..5d713d53ba 100644 --- a/sysdeps/alpha/memchr.S +++ b/sysdeps/alpha/memchr.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1996, 2000, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger (davidm@cs.arizona.edu). @@ -173,3 +173,4 @@ weak_alias (__memchr, memchr) #if !__BOUNDED_POINTERS__ weak_alias (__memchr, __ubp_memchr) #endif +libc_hidden_builtin_def (memchr) diff --git a/sysdeps/alpha/memset.S b/sysdeps/alpha/memset.S index d621aeed19..e34af2b314 100644 --- a/sysdeps/alpha/memset.S +++ b/sysdeps/alpha/memset.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 2003 Free Software Foundation, Inc. Contributed by Richard Henderson (rth@tamu.edu) This file is part of the GNU C Library. @@ -134,3 +134,4 @@ $oneq: $done: ret END(memset) +libc_hidden_builtin_def (memset) diff --git a/sysdeps/alpha/strcat.S b/sysdeps/alpha/strcat.S index d385c83875..d8ef8f1546 100644 --- a/sysdeps/alpha/strcat.S +++ b/sysdeps/alpha/strcat.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. +/* Copyright (C) 1996, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1996. @@ -69,3 +69,4 @@ $found: negq t1, t2 # clear all but least set bit jmp $31, __stxcpy END(strcat) +libc_hidden_builtin_def (strcat) diff --git a/sysdeps/alpha/strchr.S b/sysdeps/alpha/strchr.S index 5643df4dfe..e0b17415ac 100644 --- a/sysdeps/alpha/strchr.S +++ b/sysdeps/alpha/strchr.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. +/* Copyright (C) 1996, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@tamu.edu) @@ -92,3 +92,4 @@ $retnull: END(strchr) weak_alias (strchr, index) +libc_hidden_builtin_def (strchr) diff --git a/sysdeps/alpha/strcmp.S b/sysdeps/alpha/strcmp.S index ee87b4fb37..9196be2ce3 100644 --- a/sysdeps/alpha/strcmp.S +++ b/sysdeps/alpha/strcmp.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 2003 Free Software Foundation, Inc. Contributed by Richard Henderson (rth@tamu.edu) This file is part of the GNU C Library. @@ -192,3 +192,4 @@ $done: ret # e1 : END(strcmp) +libc_hidden_builtin_def (strcmp) diff --git a/sysdeps/alpha/strcpy.S b/sysdeps/alpha/strcpy.S index 11dc8e1982..02bfe52400 100644 --- a/sysdeps/alpha/strcpy.S +++ b/sysdeps/alpha/strcpy.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. +/* Copyright (C) 1996, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1996. @@ -39,3 +39,4 @@ ENTRY(strcpy) jmp $31, __stxcpy # do the copy END(strcpy) +libc_hidden_builtin_def (strcpy) diff --git a/sysdeps/alpha/strlen.S b/sysdeps/alpha/strlen.S index 66b17314a8..2560b973c7 100644 --- a/sysdeps/alpha/strlen.S +++ b/sysdeps/alpha/strlen.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 2003 Free Software Foundation, Inc. Contributed by David Mosberger (davidm@cs.arizona.edu). This file is part of the GNU C Library. @@ -74,3 +74,4 @@ $found: negq t1, t2 # clear all but least set bit ret END(strlen) +libc_hidden_builtin_def (strlen) diff --git a/sysdeps/alpha/strncmp.S b/sysdeps/alpha/strncmp.S index f0dcfb9409..e2b4ebf857 100644 --- a/sysdeps/alpha/strncmp.S +++ b/sysdeps/alpha/strncmp.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 2003 Free Software Foundation, Inc. Contributed by Richard Henderson (rth@tamu.edu) This file is part of the GNU C Library. @@ -221,3 +221,4 @@ $zerolength: ret END(strncmp) +libc_hidden_builtin_def (strncmp) diff --git a/sysdeps/alpha/strncpy.S b/sysdeps/alpha/strncpy.S index 575c907d7e..5d3e72e280 100644 --- a/sysdeps/alpha/strncpy.S +++ b/sysdeps/alpha/strncpy.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 2003 Free Software Foundation, Inc. Contributed by Richard Henderson (rth@tamu.edu) This file is part of the GNU C Library. @@ -85,3 +85,4 @@ $zerocount: ret # .. e1 : END(strncpy) +libc_hidden_builtin_def (strncpy) diff --git a/sysdeps/alpha/strrchr.S b/sysdeps/alpha/strrchr.S index e5e847f2bf..248181f702 100644 --- a/sysdeps/alpha/strrchr.S +++ b/sysdeps/alpha/strrchr.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 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 @@ -108,3 +108,4 @@ $retnull: END(strrchr) weak_alias (strrchr, rindex) +libc_hidden_builtin_def (strrchr) diff --git a/sysdeps/arm/memset.S b/sysdeps/arm/memset.S index 6ba8486971..0b624139eb 100644 --- a/sysdeps/arm/memset.S +++ b/sysdeps/arm/memset.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Philip Blundell @@ -65,3 +65,4 @@ ENTRY(memset) strb a2, [a4], $1 RETINSTR(mov,pc,lr) END(memset) +libc_hidden_builtin_def (memset) diff --git a/sysdeps/arm/strlen.S b/sysdeps/arm/strlen.S index 7ebfe63e94..f29528ada2 100644 --- a/sysdeps/arm/strlen.S +++ b/sysdeps/arm/strlen.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Code contributed by Matthew Wilcox @@ -61,3 +61,4 @@ Llastword: @ drop through to here once we find a addne r0, r0, $1 @ must be zero) RETINSTR(mov,pc,lr) END(strlen) +libc_hidden_builtin_def (strlen) diff --git a/sysdeps/m68k/memchr.S b/sysdeps/m68k/memchr.S index bd4da6a931..fab65a9aea 100644 --- a/sysdeps/m68k/memchr.S +++ b/sysdeps/m68k/memchr.S @@ -1,7 +1,7 @@ /* memchr (str, ch, n) -- Return pointer to first occurrence of CH in the first N bytes of STR. For Motorola 68000. - Copyright (C) 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab . @@ -229,3 +229,4 @@ weak_alias (__memchr, memchr) #if !__BOUNDED_POINTERS__ weak_alias (__memchr, __ubp_memchr) #endif +libc_hidden_builtin_def (memchr) diff --git a/sysdeps/m68k/strchr.S b/sysdeps/m68k/strchr.S index af91dc72f4..04626ffd64 100644 --- a/sysdeps/m68k/strchr.S +++ b/sysdeps/m68k/strchr.S @@ -1,6 +1,6 @@ /* strchr (str, ch) -- Return pointer to first occurrence of CH in STR. For Motorola 68000. - Copyright (C) 1999 Free Software Foundation, Inc. + Copyright (C) 1999, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab . @@ -255,3 +255,4 @@ L(L9:) END(strchr) weak_alias (strchr, index) +libc_hidden_builtin_def (strchr) diff --git a/sysdeps/mips/memcpy.S b/sysdeps/mips/memcpy.S index 05d209739e..2049d05829 100644 --- a/sysdeps/mips/memcpy.S +++ b/sysdeps/mips/memcpy.S @@ -133,3 +133,4 @@ L(shfth): .set reorder END (memcpy) +libc_hidden_builtin_def (memcpy) diff --git a/sysdeps/mips/memset.S b/sysdeps/mips/memset.S index f120123544..694ee8f1dc 100644 --- a/sysdeps/mips/memset.S +++ b/sysdeps/mips/memset.S @@ -83,3 +83,4 @@ L(exit): .set reorder END (memset) +libc_hidden_builtin_def (memset) diff --git a/sysdeps/mips/mips64/memcpy.S b/sysdeps/mips/mips64/memcpy.S index e9fc2b712a..eab9463f86 100644 --- a/sysdeps/mips/mips64/memcpy.S +++ b/sysdeps/mips/mips64/memcpy.S @@ -137,3 +137,4 @@ L(shfth): .set reorder END (memcpy) +libc_hidden_builtin_def (memcpy) diff --git a/sysdeps/mips/mips64/memset.S b/sysdeps/mips/mips64/memset.S index 784fa5deee..b50aaba816 100644 --- a/sysdeps/mips/mips64/memset.S +++ b/sysdeps/mips/mips64/memset.S @@ -89,3 +89,4 @@ L(exit): .set reorder END (memset) +libc_hidden_builtin_def (memset) From fefdd2a630c837d992639abe3f75dd0496090bbb Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Wed, 30 Apr 2003 23:22:09 +0000 Subject: [PATCH 3114/4487] * sysdeps/unix/sysv/linux/mips/sys/ucontext.h (ucontext): Make uc_flags long for all ABIs. --- sysdeps/unix/sysv/linux/mips/sys/ucontext.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h index 66c729a4f9..b097bf2ab5 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h @@ -99,11 +99,7 @@ typedef struct /* Userlevel context. */ typedef struct ucontext { -#if defined _ABIN32 && _MIPS_SIM == _ABIN32 - __extension__ unsigned long long int uc_flags; -#else unsigned long int uc_flags; -#endif struct ucontext *uc_link; stack_t uc_stack; mcontext_t uc_mcontext; From 9219434c89bef71058c9b2078b1fe1b774b9c826 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 2 May 2003 23:24:56 +0000 Subject: [PATCH 3115/4487] (IPCOP_semtimedop): Define. --- sysdeps/unix/sysv/linux/alpha/ipc_priv.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/ipc_priv.h b/sysdeps/unix/sysv/linux/alpha/ipc_priv.h index b754a1fd51..f0b47d204b 100644 --- a/sysdeps/unix/sysv/linux/alpha/ipc_priv.h +++ b/sysdeps/unix/sysv/linux/alpha/ipc_priv.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1995-1999, 2000, 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 @@ -44,6 +44,7 @@ __END_DECLS #define IPCOP_semop 1 #define IPCOP_semget 2 #define IPCOP_semctl 3 +#define IPCOP_semtimedop 4 #define IPCOP_msgsnd 11 #define IPCOP_msgrcv 12 #define IPCOP_msgget 13 From 25e5f254ab61f9fbf224f0d6ebfdcf30f37dd0eb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 10 May 2003 05:29:30 +0000 Subject: [PATCH 3116/4487] (atomic_exchange_acq): Renamed from atomic_exchange. --- sysdeps/m68k/m68020/bits/atomic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/m68k/m68020/bits/atomic.h b/sysdeps/m68k/m68020/bits/atomic.h index 6978b27cde..bbffc526a8 100644 --- a/sysdeps/m68k/m68020/bits/atomic.h +++ b/sysdeps/m68k/m68020/bits/atomic.h @@ -76,7 +76,7 @@ typedef uintmax_t uatomic_max_t; : "memory"); \ __ret; }) -#define atomic_exchange(mem, newvalue) \ +#define atomic_exchange_acq(mem, newvalue) \ ({ __typeof (*(mem)) __result = *(mem); \ if (sizeof (*(mem)) == 1) \ __asm __volatile ("1: cas%.b %0,%2,%1;" \ From a99b4fcf5a070673791a52d81f97e50d971563b7 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 22 May 2003 02:26:29 +0000 Subject: [PATCH 3117/4487] 2003-05-20 Guido Guenther * sysdeps/unix/sysv/linux/mips/bits/siginfo.h: Change SI_ASYNCNL to -60 and define SI_TKILL. --- sysdeps/unix/sysv/linux/mips/bits/siginfo.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h index 7d5cfa9c3d..629a055640 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h +++ b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h @@ -1,5 +1,5 @@ /* siginfo_t, sigevent and constants. Linux/MIPS version. - Copyright (C) 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 2000, 2001, 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 @@ -119,8 +119,10 @@ typedef struct siginfo signals. */ enum { - SI_ASYNCNL = -6, /* Sent by asynch name lookup completion. */ + SI_ASYNCNL = -60, /* Sent by asynch name lookup completion. */ # define SI_ASYNCNL SI_ASYNCNL + SI_TKILL = -6, /* Sent by tkill. */ +# define SI_TKILL SI_TKILL SI_SIGIO, /* Sent by queued SIGIO. */ # define SI_SIGIO SI_SIGIO SI_MESGQ, /* Sent by real time mesq state change. */ From 489797ebf08753149bc631b13ea61cb6714f5545 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 28 May 2003 21:05:12 +0000 Subject: [PATCH 3118/4487] 2003-05-11 Andreas Schwab * Makerules: Always use -MP together with -MD. (sed-remove-dotot): Substitute $(..) also at start of line. ($(stdio_lim:h=st)): Use -MD instead of SUNPRO_DEPENDENCIES. Generated defines with a single compiler call. Use $(sed-remove-dotdot). * mach/Makefile ($(objpfx)mach-syscalls.mk): Use -MD instead of DEPENDENCIES_OUTPUT, and use $(sed-remove-objpfx). * sysdeps/unix/sysv/linux/Makefile ($(objpfx)syscall-%.h): Use -MD instead of SUNPRO_DEPENDENCIES, and use $(sed-remove-objpfx). * sysdeps/unix/sysv/linux/mips/Makefile ($(objpfx)syscall-%.h): Likewise. --- sysdeps/unix/sysv/linux/mips/Makefile | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile index 799f5ae0d5..424fb5ecd3 100644 --- a/sysdeps/unix/sysv/linux/mips/Makefile +++ b/sysdeps/unix/sysv/linux/mips/Makefile @@ -15,7 +15,6 @@ no_syscall_list_h = 1 # We generate not only SYS_, pointing at SYS__ if # it exists, but also define SYS__ for all ABIs. $(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/mips/sys/syscall.h - rm -f $(@:.h=.d)-t { \ echo '/* Generated at libc build time from kernel syscall list. */';\ echo ''; \ @@ -24,9 +23,10 @@ $(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/mips/sys/s echo '#endif'; \ echo ''; \ rm -f $(@:.d=.h).newt; \ - SUNPRO_DEPENDENCIES='$(@:.h=.d)-t $@' \ - $(CC) -E -x c -I $(common-objdir) $(sysincludes) $< -D_LIBC -dM | \ - sed -n 's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p' > $(@:.d=.h).newt; \ + $(CC) -E -MD -MP -MF $(@:.h=.d)-t -MT '$(@:.d=.h) $(@:.h=.d)' \ + -x c -I $(common-objdir) $(sysincludes) $< -D_LIBC -dM | \ + sed -n 's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p' \ + > $(@:.d=.h).newt; \ if grep SYS_O32_ $(@:.d=.h).newt > /dev/null; then \ echo '#if defined _ABI64 && _MIPS_SIM == _ABI64'; \ sed -n 's/^\(#define SYS_\)N64_/\1/p' < $(@:.d=.h).newt; \ @@ -42,9 +42,10 @@ $(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/mips/sys/s rm $(@:.d=.h).newt; \ } > $(@:.d=.h).new mv -f $(@:.d=.h).new $(@:.d=.h) - sed < $(@:.h=.d)-t > $(@:.h=.d)-t2 \ - -e 's,$(subst .,\.,$@),$(patsubst $(objpfx)%,$$(objpfx)%,\ - $(@:.d=.h) $(@:.h=.d)),' +ifneq (,$(objpfx)) + sed $(sed-remove-objpfx) $(@:.h=.d)-t > $(@:.h=.d)-t2 rm -f $(@:.h=.d)-t mv -f $(@:.h=.d)-t2 $(@:.h=.d) +else + mv -f $(@:.h=.d)-t $(@:.h=.d) endif From 784c002b10b4a2f79484af2d6cd1e62271de9872 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 30 May 2003 17:41:46 +0000 Subject: [PATCH 3119/4487] 2003-05-30 Guido Guenther * sysdeps/mips/mips64/bsd-_setjmp.S: Include for SETUP_GP64 and friends. * sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h: Fix register names in internal_syscall{6,7}. * sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/mips/pread.c [_MIPS_SIM == _ABI64]: Fix number of syscall arguments. * sysdeps/unix/sysv/linux/mips/pwrite.c: Likewise. * sysdeps/unix/sysv/linux/mips/pread64.c: Likewise. * sysdeps/unix/sysv/linux/mips/pwrite64.c: Likewise. --- sysdeps/mips/mips64/bsd-_setjmp.S | 1 + sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h | 4 ++-- sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h | 4 ++-- sysdeps/unix/sysv/linux/mips/pread.c | 4 ++-- sysdeps/unix/sysv/linux/mips/pread64.c | 4 ++-- sysdeps/unix/sysv/linux/mips/pwrite.c | 4 ++-- sysdeps/unix/sysv/linux/mips/pwrite64.c | 4 ++-- 7 files changed, 13 insertions(+), 12 deletions(-) diff --git a/sysdeps/mips/mips64/bsd-_setjmp.S b/sysdeps/mips/mips64/bsd-_setjmp.S index 9d79ab0a2f..73f5cc2de2 100644 --- a/sysdeps/mips/mips64/bsd-_setjmp.S +++ b/sysdeps/mips/mips64/bsd-_setjmp.S @@ -22,6 +22,7 @@ in setjmp doesn't clobber the state restored by longjmp. */ #include +#include #ifdef __PIC__ .option pic2 diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h index 55a405c87e..71099711d0 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h @@ -220,7 +220,7 @@ ".set\treorder" \ : "=r" (__v0), "+r" (__a3) \ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \ - "r" (__a5), "r" (__a6) \ + "r" (__a4), "r" (__a5) \ : __SYSCALL_CLOBBERS); \ err = __a3; \ _sys_result = __v0; \ @@ -248,7 +248,7 @@ ".set\treorder" \ : "=r" (__v0), "+r" (__a3) \ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \ - "r" (__a5), "r" (__a6), "r" (__a7) \ + "r" (__a4), "r" (__a5), "r" (__a6) \ : __SYSCALL_CLOBBERS); \ err = __a3; \ _sys_result = __v0; \ diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h index 401470ba23..4341c18345 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h @@ -220,7 +220,7 @@ ".set\treorder" \ : "=r" (__v0), "+r" (__a3) \ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \ - "r" (__a5), "r" (__a6) \ + "r" (__a4), "r" (__a5) \ : __SYSCALL_CLOBBERS); \ err = __a3; \ _sys_result = __v0; \ @@ -248,7 +248,7 @@ ".set\treorder" \ : "=r" (__v0), "+r" (__a3) \ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \ - "r" (__a5), "r" (__a6), "r" (__a7) \ + "r" (__a4), "r" (__a5), "r" (__a6) \ : __SYSCALL_CLOBBERS); \ err = __a3; \ _sys_result = __v0; \ diff --git a/sysdeps/unix/sysv/linux/mips/pread.c b/sysdeps/unix/sysv/linux/mips/pread.c index dc278d4401..28fdca6062 100644 --- a/sysdeps/unix/sysv/linux/mips/pread.c +++ b/sysdeps/unix/sysv/linux/mips/pread.c @@ -66,7 +66,7 @@ __libc_pread (fd, buf, count, offset) /* First try the syscall. */ assert (sizeof (offset) == 4); #if defined _ABI64 && _MIPS_SIM == _ABI64 - result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, + result = INLINE_SYSCALL (pread, 5, fd, CHECK_N (buf, count), count, 0, offset); #else result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, @@ -85,7 +85,7 @@ __libc_pread (fd, buf, count, offset) /* First try the syscall. */ assert (sizeof (offset) == 4); #if defined _ABI64 && _MIPS_SIM == _ABI64 - result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, + result = INLINE_SYSCALL (pread, 5, fd, CHECK_N (buf, count), count, 0, offset); #else result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, diff --git a/sysdeps/unix/sysv/linux/mips/pread64.c b/sysdeps/unix/sysv/linux/mips/pread64.c index 12c9cc0ba1..7dcd008ff7 100644 --- a/sysdeps/unix/sysv/linux/mips/pread64.c +++ b/sysdeps/unix/sysv/linux/mips/pread64.c @@ -66,7 +66,7 @@ __libc_pread64 (fd, buf, count, offset) { /* First try the syscall. */ #if defined _ABI64 && _MIPS_SIM == _ABI64 - result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, + result = INLINE_SYSCALL (pread, 5, fd, CHECK_N (buf, count), count, 0, offset); #else result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, @@ -85,7 +85,7 @@ __libc_pread64 (fd, buf, count, offset) /* First try the syscall. */ #if defined _ABI64 && _MIPS_SIM == _ABI64 - result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, + result = INLINE_SYSCALL (pread, 5, fd, CHECK_N (buf, count), count, 0, offset); #else result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, diff --git a/sysdeps/unix/sysv/linux/mips/pwrite.c b/sysdeps/unix/sysv/linux/mips/pwrite.c index 1778d077ed..fa3de156c4 100644 --- a/sysdeps/unix/sysv/linux/mips/pwrite.c +++ b/sysdeps/unix/sysv/linux/mips/pwrite.c @@ -65,7 +65,7 @@ __libc_pwrite (fd, buf, count, offset) /* First try the syscall. */ assert (sizeof (offset) == 4); #if defined _ABI64 && _MIPS_SIM == _ABI64 - result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0, + result = INLINE_SYSCALL (pwrite, 5, fd, CHECK_N (buf, count), count, 0, offset); #else result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0, @@ -85,7 +85,7 @@ __libc_pwrite (fd, buf, count, offset) /* First try the syscall. */ assert (sizeof (offset) == 4); #if defined _ABI64 && _MIPS_SIM == _ABI64 - result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0, + result = INLINE_SYSCALL (pwrite, 5, fd, CHECK_N (buf, count), count, 0, offset); #else result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0, diff --git a/sysdeps/unix/sysv/linux/mips/pwrite64.c b/sysdeps/unix/sysv/linux/mips/pwrite64.c index e43a378467..5b481b256c 100644 --- a/sysdeps/unix/sysv/linux/mips/pwrite64.c +++ b/sysdeps/unix/sysv/linux/mips/pwrite64.c @@ -63,7 +63,7 @@ __libc_pwrite64 (fd, buf, count, offset) { /* First try the syscall. */ #if defined _ABI64 && _MIPS_SIM == _ABI64 - result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0, + result = INLINE_SYSCALL (pwrite, 5, fd, CHECK_N (buf, count), count, 0, offset); #else result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0, @@ -83,7 +83,7 @@ __libc_pwrite64 (fd, buf, count, offset) /* First try the syscall. */ #if defined _ABI64 && _MIPS_SIM == _ABI64 - result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0, + result = INLINE_SYSCALL (pwrite, 5, fd, CHECK_N (buf, count), count, 0, offset); #else result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0, From 44774a1c27e041105474cb7820ecea2a709e06b2 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 6 Jun 2003 05:51:53 +0000 Subject: [PATCH 3120/4487] * sysdeps/unix/sysv/linux/alpha/gettimeofday.S: Fix typo in conversion. --- sysdeps/unix/sysv/linux/alpha/gettimeofday.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S index 71b8c134dc..221a113dcd 100644 --- a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S +++ b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S @@ -86,7 +86,7 @@ $do32: ldi v0, SYS_ify(osf_gettimeofday) ldl t0, 0(a0) ldl t1, 4(a0) stq t0, 0(a0) - stq t1, 0(a0) + stq t1, 8(a0) 2: addq sp, 16, sp ret From a382880a4c32975fd1d4e76ae3f647f76484fff9 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 6 Jun 2003 05:52:52 +0000 Subject: [PATCH 3121/4487] * sysdeps/unix/sysv/linux/alpha/syscalls.list (semtimedop): New. Annotate some parameters. * sysdeps/unix/sysv/linux/alpha/sysdep.h (__NR_semtimedop): New. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 75 +++++++++++---------- sysdeps/unix/sysv/linux/alpha/sysdep.h | 5 ++ 2 files changed, 44 insertions(+), 36 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 96bc8a5fd3..62522e72d5 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -1,30 +1,32 @@ # File name Caller Syscall name # args Strong name Weak names -oldmsgctl EXTRA msgctl 3 __old_msgctl msgctl@GLIBC_2.0 -msgget - msgget 2 __msgget msgget -msgrcv - msgrcv C:5 __msgrcv msgrcv -msgsnd - msgsnd C:4 __msgsnd msgsnd -shmat - osf_shmat 3 __shmat shmat -oldshmctl EXTRA shmctl 3 __old_shmctl shmctl@GLIBC_2.0 -shmdt - shmdt 1 __shmdt shmdt -shmget - shmget 3 __shmget shmget -semop - semop 3 __semop semop -semget - semget 3 __semget semget -oldsemctl EXTRA semctl 4 __old_semctl semctl@GLIBC_2.0 +oldmsgctl EXTRA msgctl i:iip __old_msgctl msgctl@GLIBC_2.0 +msgget - msgget i:ii __msgget msgget +msgrcv - msgrcv Ci:ibnii __msgrcv msgrcv +msgsnd - msgsnd Ci:ibni __msgsnd msgsnd +shmat - osf_shmat i:ipi __shmat shmat +oldshmctl EXTRA shmctl i:iip __old_shmctl shmctl@GLIBC_2.0 +shmdt - shmdt i:s __shmdt shmdt +shmget - shmget i:iii __shmget shmget +semop - semop i:ipi __semop semop +semtimedop - semtimedop i:ipip semtimedop +semget - semget i:iii __semget semget +oldsemctl EXTRA semctl i:iiii __old_semctl semctl@GLIBC_2.0 osf_sigprocmask - osf_sigprocmask 2 __osf_sigprocmask sigstack - sigstack 2 sigstack vfork - vfork 0 __vfork vfork -getpeername - getpeername 3 __getpeername getpeername -getpriority - getpriority 2 __getpriority getpriority -mmap - mmap 6 __mmap mmap __mmap64 mmap64 -llseek EXTRA lseek C:3 __libc_lseek64 __llseek llseek __lseek64 lseek64 +getpeername - getpeername i:ipp __getpeername getpeername +getpriority - getpriority i:ii __getpriority getpriority +mmap - mmap b:aniiii __mmap mmap __mmap64 mmap64 +llseek EXTRA lseek C:3 __libc_lseek __lseek lseek __libc_lseek64 __llseek llseek __lseek64 lseek64 +lseek llseek - posix_fadvise64 - fadvise64 4 posix_fadvise64 posix_fadvise pread - pread C:4 __libc_pread __libc_pread64 __pread pread __pread64 pread64 pwrite - pwrite C:4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64 -fstatfs - fstatfs 2 __fstatfs fstatfs __fstatfs64 fstatfs64 -statfs - statfs 2 __statfs statfs statfs64 +fstatfs - fstatfs i:ip __fstatfs fstatfs __fstatfs64 fstatfs64 +statfs - statfs i:sp __statfs statfs statfs64 getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64 setrlimit - setrlimit 2 __setrlimit setrlimit64 setrlimit ftruncate - ftruncate 2 __ftruncate ftruncate __ftruncate64 ftruncate64 @@ -33,28 +35,29 @@ readahead - readahead 3 __readahead readahead sendfile - sendfile i:iipi sendfile sendfile64 # these are actually common with the x86: -sys_ustat ustat ustat 2 __syscall_ustat -sys_mknod xmknod mknod 3 __syscall_mknod +sys_ustat ustat ustat i:ip __syscall_ustat +sys_mknod xmknod mknod i:sii __syscall_mknod # proper socket implementations: -accept - accept C:3 __libc_accept __accept accept -bind - bind 3 __bind bind -connect - connect C:3 __libc_connect __connect_internal __connect connect -getpeername - getpeername 3 __getpeername getpeername -getsockname - getsockname 3 __getsockname getsockname -getsockopt - getsockopt 5 __getsockopt getsockopt -listen - listen 2 __listen listen -recv - recv C:4 __libc_recv __recv recv -recvfrom - recvfrom C:6 __libc_recvfrom __recvfrom recvfrom -recvmsg - recvmsg C:3 __libc_recvmsg __recvmsg recvmsg +accept - accept Ci:iBN __libc_accept __accept accept +bind - bind i:ipi __bind bind +connect - connect Ci:ipi __libc_connect __connect_internal __connect connect +getpeername - getpeername i:ipp __getpeername getpeername +getsockname - getsockname i:ipp __getsockname getsockname +getsockopt - getsockopt i:iiiBN __getsockopt getsockopt +listen - listen i:ii __listen listen +recv - recv Ci:ibni __libc_recv __recv recv +recvfrom - recvfrom Ci:ibniBN __libc_recvfrom __recvfrom recvfrom +recvmsg - recvmsg Ci:ipi __libc_recvmsg __recvmsg recvmsg +send - send Ci:ibni __libc_send __send send +sendmsg - sendmsg Ci:ipi __libc_sendmsg __sendmsg sendmsg +sendto - sendto Ci:ibnibn __libc_sendto __sendto sendto +setsockopt - setsockopt i:iiibn __setsockopt setsockopt +shutdown - shutdown i:ii __shutdown shutdown +socket - socket i:iii __socket socket +socketpair - socketpair i:iiif __socketpair socketpair + ptrace - ptrace 4 __ptrace ptrace -send - send C:4 __libc_send __send send -sendmsg - sendmsg C:3 __libc_sendmsg __sendmsg sendmsg -sendto - sendto C:6 __libc_sendto __sendto sendto -setsockopt - setsockopt 5 __setsockopt setsockopt -shutdown - shutdown 2 __shutdown shutdown -socket - socket 3 __socket socket -socketpair - socketpair 4 __socketpair socketpair # access pci space protected from machine checks: pciconfig_read EXTRA pciconfig_read 5 pciconfig_read diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h index 62e308bf5d..272dcebf42 100644 --- a/sysdeps/unix/sysv/linux/alpha/sysdep.h +++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h @@ -60,6 +60,11 @@ #define __NR_osf_getsysinfo 256 #define __NR_osf_setsysinfo 257 +/* Help old kernel headers where particular syscalls are not available. */ +#ifndef __NR_semtimedop +# define __NR_semtimedop 423 +#endif + /* * In order to get the hidden arguments for rt_sigaction set up * properly, we need to call the assembly version. Detect this in the From 48e0ec3c4856a52105dd9771aac7865f3b6a6c3a Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 6 Jun 2003 05:54:15 +0000 Subject: [PATCH 3122/4487] * sysdeps/alpha/dl-machine.h (RTLD_START): Fix top-of-stack backtrace. * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise. * sysdeps/alpha/elf/start.S: Likewise. Remove pointless allocation. * sysdeps/unix/sysv/linux/alpha/rt_sigaction.S: Use standard ldgp entry sequence and explicit relocs. Add unwind info for sigreturn and rt_sigreturn. * configure.in (libc_cv_asm_cfi_directives): Test .cfi_remember_state. * configure: Regenerate. --- sysdeps/alpha/dl-machine.h | 3 +- sysdeps/alpha/elf/start.S | 7 +- sysdeps/unix/sysv/linux/alpha/clone.S | 3 +- sysdeps/unix/sysv/linux/alpha/rt_sigaction.S | 91 ++++++++++++++------ 4 files changed, 70 insertions(+), 34 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 4704428d93..0101ba43d5 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -303,6 +303,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) .globl _start \n\ .ent _start \n\ _start: \n\ + .frame $31,0,$31,0 \n\ br $gp, 0f \n\ 0: ldgp $gp, 0($gp) \n\ .prologue 0 \n\ @@ -314,7 +315,7 @@ _start: \n\ .globl _dl_start_user \n\ .ent _dl_start_user \n\ _dl_start_user: \n\ - .frame $30,0,$31,0 \n\ + .frame $31,0,$31,0 \n\ .prologue 0 \n\ /* Save the user entry point address in s0. */ \n\ mov $0, $9 \n\ diff --git a/sysdeps/alpha/elf/start.S b/sysdeps/alpha/elf/start.S index 3f98111fd9..dbe4223fea 100644 --- a/sysdeps/alpha/elf/start.S +++ b/sysdeps/alpha/elf/start.S @@ -1,5 +1,6 @@ /* Startup code for Alpha/ELF. - Copyright (C) 1993,1995,1996,1997,1998,2000,2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1993, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson @@ -26,8 +27,7 @@ .ent _start, 0 .type _start,@function _start: - .frame fp, 0, zero - mov zero, fp + .frame $31, 0, $31 br gp, 1f 1: ldgp gp, 0(gp) subq sp, 16, sp @@ -65,6 +65,5 @@ weak_alias(_start, __start) .data .globl __data_start __data_start: - .long 0 .weak data_start data_start = __data_start diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S index 42df98a9b4..2aa9bb7f38 100644 --- a/sysdeps/unix/sysv/linux/alpha/clone.S +++ b/sysdeps/unix/sysv/linux/alpha/clone.S @@ -83,8 +83,7 @@ $error: .ent thread_start thread_start: - .frame fp,0,zero,0 - mov zero,fp + .frame zero,0,zero,0 .prologue 0 /* Load up the arguments. */ diff --git a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S index 5f166a7094..3e02a661e7 100644 --- a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S +++ b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1998 @@ -28,55 +28,92 @@ #ifdef __NR_rt_sigaction .text + ENTRY(__syscall_rt_sigaction) .frame sp,0,ra,0 -#ifdef PROF ldgp gp,0(pv) +#ifdef PROF .set noat lda AT, _mcount jsr AT, (AT), _mcount .set at #endif - /* Indicate non-standard use of our PV. */ - .prologue 2 + .prologue 1 beq a1, 0f - ldl t0, 8(a1) # sa_flags - lda a4, sigreturn-__syscall_rt_sigaction(pv) - lda t1, rt_sigreturn-__syscall_rt_sigaction(pv) - and t0, 0x00000040, t0 # SA_SIGINFO + ldl t0, 8(a1) # sa_flags + ldah a4, sigreturn(gp) !gprelhigh + ldah t1, rt_sigreturn(gp) !gprelhigh + lda a4, sigreturn(a4) !gprellow + lda t1, rt_sigreturn(a4) !gprellow + and t0, 0x00000040, t0 # SA_SIGINFO cmovne t0, t1, a4 -0: ldi v0,__NR_rt_sigaction +0: ldi v0, __NR_rt_sigaction callsys - bne a3,1f + bne a3, SYSCALL_ERROR_LABEL ret -1: -#ifndef PROF - br gp,2f -2: ldgp gp,0(gp) -#endif - SYSCALL_ERROR_HANDLER +PSEUDO_END(__syscall_rt_sigaction) -END(__syscall_rt_sigaction) +/* To enable unwinding through the signal frame without special hackery + elsewhere, describe the entire struct sigcontext with unwind info. + Note that we begin the unwind info one instruction before the start + of the function; the unwinder will subtract one from the return address + attempting to find the call instruction that led us here, since we + didn't get here via a normal call. */ + + .macro SIGCONTEXT_REGS_I base, from=0 + cfi_offset (\from, \base + (4 + \from) * 8) + .if 30-\from + SIGCONTEXT_REGS_I \base, "(\from+1)" + .endif + .endm - .align 5 - .ent sigreturn + .macro SIGCONTEXT_REGS_F base, from=32 + cfi_offset (\from, \base + (4 + 1 + \from) * 8) + .if 62-\from + SIGCONTEXT_REGS_F \base, "(\from+1)" + .endif + .endm + + .macro SIGCONTEXT_REGS base + SIGCONTEXT_REGS_I \base + SIGCONTEXT_REGS_F \base + cfi_offset (63, \base + (4 + 32 + 1 + 32) * 8) + cfi_offset (64, \base + 2 * 8) + .endm + + .align 4 + nop + nop + nop + + cfi_startproc + cfi_return_column (64) + SIGCONTEXT_REGS -648 + cfi_def_cfa_offset (648) + nop sigreturn: - .prologue 0 - mov sp,a0 - ldi v0,__NR_sigreturn + mov sp, a0 + ldi v0, __NR_sigreturn callsys - .end sigreturn + cfi_endproc + .size sigreturn, .-sigreturn + .type sigreturn, @function - .align 4 - .ent rt_sigreturn + cfi_startproc + cfi_return_column (64) + SIGCONTEXT_REGS -648 + cfi_def_cfa_offset (176 + 648) + nop rt_sigreturn: - .prologue 0 mov sp,a0 ldi v0,__NR_rt_sigreturn callsys - .end rt_sigreturn + cfi_endproc + .size rt_sigreturn, .-rt_sigreturn + .type rt_sigreturn, @function + #else ENTRY(__syscall_rt_sigaction) ldgp $29,0($27) From 1ca4471f970f0ef6ed4d6104efb3e09383c4868b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 6 Jun 2003 17:31:40 +0000 Subject: [PATCH 3123/4487] New sequences for 5+ arg syscalls only needed for PIC. --- .../sysv/linux/arm/linuxthreads/sysdep-cancel.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h index d2043aad91..92d8460e26 100644 --- a/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h @@ -26,12 +26,14 @@ /* We push lr onto the stack, so we have to use ldmib instead of ldmia to find the saved arguments. */ -#undef DOARGS_5 -#undef DOARGS_6 -#undef DOARGS_7 -#define DOARGS_5 str r4, [sp, $-4]!; ldr r4, [sp, $8]; -#define DOARGS_6 mov ip, sp; stmfd sp!, {r4, r5}; ldmib ip, {r4, r5}; -#define DOARGS_7 mov ip, sp; stmfd sp!, {r4, r5, r6}; ldmib ip, {r4, r5, r6}; +# ifdef PIC +# undef DOARGS_5 +# undef DOARGS_6 +# undef DOARGS_7 +# define DOARGS_5 str r4, [sp, $-4]!; ldr r4, [sp, $8]; +# define DOARGS_6 mov ip, sp; stmfd sp!, {r4, r5}; ldmib ip, {r4, r5}; +# define DOARGS_7 mov ip, sp; stmfd sp!, {r4, r5, r6}; ldmib ip, {r4, r5, r6}; +# endif # undef PSEUDO_RET # define PSEUDO_RET \ From c27758e9c6bd7d832547a64609542b1fde68d2c8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 11 Jun 2003 22:37:05 +0000 Subject: [PATCH 3124/4487] Don't inline the function. Export them. Prepend __ to name. --- sysdeps/unix/sysv/linux/alpha/xstatconv.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/xstatconv.c b/sysdeps/unix/sysv/linux/alpha/xstatconv.c index 31fe7a52ec..1084049dbe 100644 --- a/sysdeps/unix/sysv/linux/alpha/xstatconv.c +++ b/sysdeps/unix/sysv/linux/alpha/xstatconv.c @@ -1,5 +1,5 @@ /* Convert between the kernel's `struct stat' format, and libc's. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 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 @@ -17,11 +17,15 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include #include +#include +#include -static inline int -xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf) + +int +__xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf) { switch (vers) { From e6e14c55d3807e26f499b3c5615603a4d69bedf6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 12 Jun 2003 16:18:11 +0000 Subject: [PATCH 3125/4487] Fix handling of syscalls with more than four parameters. --- sysdeps/unix/sysv/linux/cris/sysdep.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/cris/sysdep.h b/sysdeps/unix/sysv/linux/cris/sysdep.h index f22a3d24e8..ba40491314 100644 --- a/sysdeps/unix/sysv/linux/cris/sysdep.h +++ b/sysdeps/unix/sysv/linux/cris/sysdep.h @@ -209,7 +209,7 @@ #define LOAD_ARGS_c_5(r10, r11, r12, r13, mof) \ LOAD_ARGS_c_4(r10, r11, r12, r13) #define LOAD_ARGS_asm_5(r10, r11, r12, r13, mof) \ - LOAD_ARGS_asm_4 (r10, r11, r12, r13) "move %5,$mof\n\t" + LOAD_ARGS_asm_4 (r10, r11, r12, r13) "move %6,$mof\n\t" #define ASM_CLOBBER_5 ASM_CLOBBER_4 #define ASM_ARGS_5(r10, r11, r12, r13, mof) \ ASM_ARGS_4 (r10, r11, r12, r13), "g" (mof) @@ -218,7 +218,7 @@ LOAD_ARGS_c_5(r10, r11, r12, r13, mof) #define LOAD_ARGS_asm_6(r10, r11, r12, r13, mof, srp) \ LOAD_ARGS_asm_5(r10, r11, r12, r13, mof) \ - "move %6,$srp\n\t" + "move %7,$srp\n\t" #define ASM_CLOBBER_6 ASM_CLOBBER_5, "srp" #define ASM_ARGS_6(r10, r11, r12, r13, mof, srp) \ ASM_ARGS_5 (r10, r11, r12, r13, mof), "g" (srp) From e650efca313e5ce230f96b2c2c10f6fbc3204319 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sun, 15 Jun 2003 14:41:02 +0000 Subject: [PATCH 3126/4487] 2003-06-15 Guido Guenther * sysdeps/unix/sysv/linux/mips/Makefile: Add missing endif and create $(objpfx). --- sysdeps/unix/sysv/linux/mips/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile index 424fb5ecd3..6703778391 100644 --- a/sysdeps/unix/sysv/linux/mips/Makefile +++ b/sysdeps/unix/sysv/linux/mips/Makefile @@ -15,6 +15,7 @@ no_syscall_list_h = 1 # We generate not only SYS_, pointing at SYS__ if # it exists, but also define SYS__ for all ABIs. $(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/mips/sys/syscall.h + $(make-target-directory) { \ echo '/* Generated at libc build time from kernel syscall list. */';\ echo ''; \ @@ -49,3 +50,4 @@ ifneq (,$(objpfx)) else mv -f $(@:.h=.d)-t $(@:.h=.d) endif +endif From ebcd2cd199fc5c4ec0446dbcc34bec22c8edf6c9 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 20 Jun 2003 16:24:36 +0000 Subject: [PATCH 3127/4487] * sysdeps/unix/alpha/sysdep.h (INLINE_SYSCALL1): Use __builtin_expect. * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_ST_INO_64_BIT) Unset for alpha. (__ASSUME_TIMEVAL64): Set for alpha. * sysdeps/unix/sysv/linux/alpha/Makefile (sysdep_routines): Remove adjtimex, osf_sigprocmask, old_adjtimex. * sysdeps/unix/sysv/linux/alpha/adjtime.c: Use INLINE_SYSCALL, __ASSUME_TIMEVAL64. Reorg tv64 functions to avoid uninit variable. * sysdeps/unix/sysv/linux/alpha/getitimer.S: Use __ASSUME_TIMEVAL64. * sysdeps/unix/sysv/linux/alpha/getrusage.S: Likewise. * sysdeps/unix/sysv/linux/alpha/gettimeofday.S: Likewise. * sysdeps/unix/sysv/linux/alpha/select.S: Likewise. * sysdeps/unix/sysv/linux/alpha/setitimer.S: Likewise. * sysdeps/unix/sysv/linux/alpha/settimeofday.S: Likewise. * sysdeps/unix/sysv/linux/alpha/utimes.S: Likewise. * sysdeps/unix/sysv/linux/alpha/wait4.S: Likewise. * sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S: Streamline PIC code sequence. * sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S: Likewise. * sysdeps/unix/sysv/linux/alpha/sigaction.c: New file. * sysdeps/unix/sysv/linux/alpha/sigprocmask.c: Use INLINE_SYSCALL. * sysdeps/unix/sysv/linux/alpha/ustat.c: Likewise. * sysdeps/unix/sysv/linux/alpha/xmknod.c: Likewise. * sysdeps/unix/sysv/linux/alpha/syscalls.list: Remove osf_sigprocmask, sys_ustat, sys_mknod, adjtimex, old_adjtimex. * sysdeps/unix/sysv/linux/alpha/sysdep.h (INLINE_SYSCALL): Don't defer to __syscall_name; error for rt_sigaction. * sysdeps/unix/sysv/linux/alpha/xstatconv.c: Include kernel_stat.h. --- sysdeps/unix/alpha/sysdep.h | 2 +- sysdeps/unix/sysv/linux/alpha/Makefile | 4 +- sysdeps/unix/sysv/linux/alpha/adjtime.c | 62 +++++++++++++------ sysdeps/unix/sysv/linux/alpha/getitimer.S | 25 +++++--- sysdeps/unix/sysv/linux/alpha/getrusage.S | 25 +++++--- sysdeps/unix/sysv/linux/alpha/gettimeofday.S | 26 +++++--- .../sysv/linux/alpha/ieee_get_fp_control.S | 12 ++-- .../sysv/linux/alpha/ieee_set_fp_control.S | 12 ++-- sysdeps/unix/sysv/linux/alpha/select.S | 23 ++++--- sysdeps/unix/sysv/linux/alpha/setitimer.S | 25 +++++--- sysdeps/unix/sysv/linux/alpha/settimeofday.S | 25 +++++--- sysdeps/unix/sysv/linux/alpha/sigaction.c | 33 ++++++++++ sysdeps/unix/sysv/linux/alpha/sigprocmask.c | 12 ++-- sysdeps/unix/sysv/linux/alpha/syscalls.list | 12 ---- sysdeps/unix/sysv/linux/alpha/sysdep.h | 15 +++-- sysdeps/unix/sysv/linux/alpha/ustat.c | 9 ++- sysdeps/unix/sysv/linux/alpha/utimes.S | 25 +++++--- sysdeps/unix/sysv/linux/alpha/wait4.S | 25 +++++--- sysdeps/unix/sysv/linux/alpha/xmknod.c | 8 +-- sysdeps/unix/sysv/linux/alpha/xstatconv.c | 2 +- 20 files changed, 241 insertions(+), 141 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/alpha/sigaction.c diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h index 6e55061515..b9bc1c0a2a 100644 --- a/sysdeps/unix/alpha/sysdep.h +++ b/sysdeps/unix/alpha/sysdep.h @@ -152,7 +152,7 @@ __LABEL(name) \ ({ \ long _sc_ret, _sc_err; \ inline_syscall##nr(name, args); \ - if (_sc_err) \ + if (__builtin_expect (_sc_err, 0)) \ { \ __set_errno (_sc_ret); \ _sc_ret = -1L; \ diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile index 62536ae1ae..6ec49760b4 100644 --- a/sysdeps/unix/sysv/linux/alpha/Makefile +++ b/sysdeps/unix/sysv/linux/alpha/Makefile @@ -6,12 +6,12 @@ ifeq ($(subdir),misc) sysdep_headers += alpha/ptrace.h alpha/regdef.h sys/io.h sysdep_routines += ieee_get_fp_control ieee_set_fp_control \ - ioperm osf_sigprocmask llseek adjtimex + ioperm llseek # Support old timeval32 entry points sysdep_routines += osf_select osf_gettimeofday osf_settimeofday \ osf_getitimer osf_setitimer osf_utimes \ - osf_getrusage osf_wait4 old_adjtimex + osf_getrusage osf_wait4 # Support old ipc control sysdep_routines += oldmsgctl oldsemctl oldshmctl diff --git a/sysdeps/unix/sysv/linux/alpha/adjtime.c b/sysdeps/unix/sysv/linux/alpha/adjtime.c index 34df942257..69f63d4c32 100644 --- a/sysdeps/unix/sysv/linux/alpha/adjtime.c +++ b/sysdeps/unix/sysv/linux/alpha/adjtime.c @@ -17,7 +17,11 @@ 02111-1307 USA. */ #include +#include +#include +#include "kernel-features.h" +#if !defined __ASSUME_TIMEVAL64 || SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) struct timeval32 { int tv_sec, tv_usec; @@ -55,7 +59,7 @@ struct timex32 { #define TIMEVAL timeval32 #define TIMEX timex32 #define ADJTIME __adjtime_tv32 -#define ADJTIMEX(x) __adjtimex_tv32 (x) +#define ADJTIMEX(x) INLINE_SYSCALL (old_adjtimex, 1, x) #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) #define LINKAGE #else @@ -63,13 +67,18 @@ struct timex32 { #endif LINKAGE int ADJTIME (const struct TIMEVAL *itv, struct TIMEVAL *otv); -extern int ADJTIMEX (struct TIMEX *); #include #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) +int __adjtimex_tv32 (struct timex32 *tx) { return ADJTIMEX (tx); } +strong_alias (__adjtimex_tv32, __adjtimex_tv32_1); +strong_alias (__adjtimex_tv32, __adjtimex_tv32_2); +compat_symbol (libc, __adjtimex_tv32_1, __adjtimex, GLIBC_2_0); +compat_symbol (libc, __adjtimex_tv32_2, adjtimex, GLIBC_2_0); compat_symbol (libc, __adjtime_tv32, adjtime, GLIBC_2_0); #endif +#endif /* !__ASSUME_TIMEVAL64 || SHLIB_COMPAT */ #undef TIMEVAL #define TIMEVAL timeval @@ -78,34 +87,38 @@ compat_symbol (libc, __adjtime_tv32, adjtime, GLIBC_2_0); #undef ADJTIME #define ADJTIME __adjtime_tv64 #undef ADJTIMEX -#define ADJTIMEX(x) __syscall_adjtimex_tv64 (x) +#define ADJTIMEX(x) INLINE_SYSCALL (adjtimex, 1, x) #undef LINKAGE #define LINKAGE static LINKAGE int ADJTIME (const struct TIMEVAL *itv, struct TIMEVAL *otv); -extern int ADJTIMEX (struct TIMEX *); #include -static int missing_adjtimex = 0; +#include + +#if !defined __ASSUME_TIMEVAL64 +static bool missing_adjtimex; int __adjtime (itv, otv) const struct timeval *itv; struct timeval *otv; { + struct timeval32 itv32, otv32; int ret; - if (!missing_adjtimex) + switch (missing_adjtimex) { + case false: ret = __adjtime_tv64 (itv, otv); if (ret && errno == ENOSYS) missing_adjtimex = 1; - } + else + break; - if (missing_adjtimex) - { - struct timeval32 itv32, otv32; + /* FALLTHRU */ + default: itv32.tv_sec = itv->tv_sec; itv32.tv_usec = itv->tv_usec; ret = __adjtime_tv32 (&itv32, &otv32); @@ -114,31 +127,38 @@ __adjtime (itv, otv) otv->tv_sec = otv32.tv_sec; otv->tv_usec = otv32.tv_usec; } + break; } return ret; } +#else +strong_alias (__adjtime_tv64, __adjtime); +#endif versioned_symbol (libc, __adjtime, adjtime, GLIBC_2_1); -extern int __syscall_adjtimex_tv64 (struct timex *tx); - int __adjtimex_tv64 (struct timex *tx) { +#if defined __ASSUME_TIMEVAL64 + return ADJTIMEX (tx); +#else + struct timex32 tx32; int ret; - if (!missing_adjtimex) - { - ret = __syscall_adjtimex_tv64 (tx); - if (ret && errno == ENOSYS) + switch (missing_adjtimex) + { + case false: + ret = ADJTIMEX (tx); + if (ret && errno == ENOSYS) missing_adjtimex = 1; - } + else + break; - if (missing_adjtimex) - { - struct timex32 tx32; + /* FALLTHRU */ + default: tx32.modes = tx->modes; tx32.offset = tx->offset; tx32.freq = tx->freq; @@ -184,9 +204,11 @@ __adjtimex_tv64 (struct timex *tx) tx->errcnt = tx32.errcnt; tx->stbcnt = tx32.stbcnt; } + break; } return ret; +#endif } strong_alias (__adjtimex_tv64, __adjtimex_internal); diff --git a/sysdeps/unix/sysv/linux/alpha/getitimer.S b/sysdeps/unix/sysv/linux/alpha/getitimer.S index 543256272c..c2bc565afc 100644 --- a/sysdeps/unix/sysv/linux/alpha/getitimer.S +++ b/sysdeps/unix/sysv/linux/alpha/getitimer.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 1998, 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 @@ -19,7 +19,21 @@ #include #define _ERRNO_H 1 #include +#include "kernel-features.h" +.text + +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +#define GETITIMER __getitimer_tv64 +#else +#define GETITIMER getitimer +#endif + +#if defined __ASSUME_TIMEVAL64 +PSEUDO(GETITIMER, getitimer, 2) + ret +PSEUDO_END(GETITIMER) +#else /* The problem here is that initially we made struct timeval compatible with OSF/1, using int32. But we defined time_t with uint64, and later found that POSIX requires tv_sec to be time_t. @@ -30,14 +44,6 @@ functions which have RT equivalents. */ .comm __libc_missing_axp_tv64, 4 -.text - -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING -#define GETITIMER __getitimer_tv64 -#else -#define GETITIMER getitimer -#endif - LEAF(GETITIMER, 16) ldgp gp, 0(pv) subq sp, 16, sp @@ -100,6 +106,7 @@ $error: SYSCALL_ERROR_HANDLER END(GETITIMER) +#endif /* __ASSUME_TIMEVAL64 */ #if defined HAVE_ELF && defined PIC && defined DO_VERSIONING default_symbol_version (__getitimer_tv64, getitimer, GLIBC_2.1) diff --git a/sysdeps/unix/sysv/linux/alpha/getrusage.S b/sysdeps/unix/sysv/linux/alpha/getrusage.S index dd3eced775..2c34e98ce6 100644 --- a/sysdeps/unix/sysv/linux/alpha/getrusage.S +++ b/sysdeps/unix/sysv/linux/alpha/getrusage.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 1998, 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 @@ -19,7 +19,21 @@ #include #define _ERRNO_H 1 #include +#include "kernel-features.h" +.text + +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +#define GETRUSAGE __getrusage_tv64 +#else +#define GETRUSAGE __getrusage +#endif + +#if defined __ASSUME_TIMEVAL64 +PSEUDO(GETRUSAGE, getrusage, 2) + ret +PSEUDO_END(GETRUSAGE) +#else /* The problem here is that initially we made struct timeval compatible with OSF/1, using int32. But we defined time_t with uint64, and later found that POSIX requires tv_sec to be time_t. @@ -30,14 +44,6 @@ functions which have RT equivalents. */ .comm __libc_missing_axp_tv64, 4 -.text - -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING -#define GETRUSAGE __getrusage_tv64 -#else -#define GETRUSAGE __getrusage -#endif - LEAF(GETRUSAGE, 16) ldgp gp, 0(pv) subq sp, 16, sp @@ -132,6 +138,7 @@ $error: SYSCALL_ERROR_HANDLER END(GETRUSAGE) +#endif /* __ASSUME_TIMEVAL64 */ #if defined HAVE_ELF && defined PIC && defined DO_VERSIONING strong_alias(__getrusage_tv64, ____getrusage_tv64) diff --git a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S index 221a113dcd..1a6f88b03a 100644 --- a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S +++ b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1998, 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 @@ -19,6 +19,21 @@ #include #define _ERRNO_H 1 #include +#include "kernel-features.h" + +.text + +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +#define GETTIMEOFDAY __gettimeofday_tv64 +#else +#define GETTIMEOFDAY __gettimeofday +#endif + +#if defined __ASSUME_TIMEVAL64 +PSEUDO(GETTIMEOFDAY, gettimeofday, 2) + ret +PSEUDO_END(GETTIMEOFDAY) +#else /* The problem here is that initially we made struct timeval compatible with OSF/1, using int32. But we defined time_t with uint64, and later found @@ -30,14 +45,6 @@ functions which have RT equivalents. */ .comm __libc_missing_axp_tv64, 4 -.text - -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING -#define GETTIMEOFDAY __gettimeofday_tv64 -#else -#define GETTIMEOFDAY __gettimeofday -#endif - LEAF(GETTIMEOFDAY, 16) ldgp gp, 0(pv) subq sp, 16, sp @@ -97,6 +104,7 @@ $error: SYSCALL_ERROR_HANDLER END(GETTIMEOFDAY) +#endif /* __ASSUME_TIMEVAL64 */ #if defined HAVE_ELF && defined PIC && defined DO_VERSIONING default_symbol_version (__gettimeofday_tv64, __gettimeofday, GLIBC_2.1) diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S index 89e08b3dc9..f436a52437 100644 --- a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S +++ b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1996, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger , 1995. @@ -32,9 +32,13 @@ LEAF(__ieee_get_fp_control, 16) jsr AT, (AT), _mcount .set at .prologue 1 -#else +#elif defined PIC lda sp, -16(sp) .prologue 0 +#else + ldgp gp, 0(pv) + lda sp, -16(sp) + .prologue 1 #endif mov sp, a1 @@ -48,10 +52,6 @@ LEAF(__ieee_get_fp_control, 16) ret $error: -#ifndef PROF - br gp, 1f -1: ldgp gp, 0(gp) -#endif lda sp, 16(sp) SYSCALL_ERROR_HANDLER diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S index dc1bbbb962..54762e1d23 100644 --- a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S +++ b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1996, 1997, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger , 1995. @@ -30,9 +30,13 @@ LEAF(__ieee_set_fp_control, 16) jsr AT, (AT), _mcount .set at .prologue 1 -#else +#elif defined PIC lda sp, -16(sp) .prologue 0 +#else + ldgp gp, 0(pv) + lda sp, -16(sp) + .prologue 1 #endif stq a0, 0(sp) @@ -47,10 +51,6 @@ LEAF(__ieee_set_fp_control, 16) ret $error: -#ifndef PROF - br gp, 1f -1: ldgp gp, 0(gp) -#endif lda sp, 16(sp) SYSCALL_ERROR_HANDLER diff --git a/sysdeps/unix/sysv/linux/alpha/select.S b/sysdeps/unix/sysv/linux/alpha/select.S index 9cfd63ff93..4a0594cbe9 100644 --- a/sysdeps/unix/sysv/linux/alpha/select.S +++ b/sysdeps/unix/sysv/linux/alpha/select.S @@ -19,7 +19,21 @@ #include #define _ERRNO_H 1 #include +#include "kernel-features.h" +.text + +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +#define SELECT __select_tv64 +#else +#define SELECT __select +#endif + +#if defined __ASSUME_TIMEVAL64 +PSEUDO(SELECT, select, 5) + ret +PSEUDO_END(SELECT) +#else /* The problem here is that initially we made struct timeval compatible with OSF/1, using int32. But we defined time_t with uint64, and later found that POSIX requires tv_sec to be time_t. @@ -30,14 +44,6 @@ functions which have RT equivalents. */ .comm __libc_missing_axp_tv64, 4 -.text - -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING -#define SELECT __select_tv64 -#else -#define SELECT __select -#endif - LEAF(SELECT, 64) ldgp gp, 0(pv) subq sp, 64, sp @@ -210,6 +216,7 @@ $error: SYSCALL_ERROR_HANDLER END(SELECT) +#endif /* __ASSUME_TIMEVAL64 */ #if defined HAVE_ELF && defined PIC && defined DO_VERSIONING default_symbol_version (__select_tv64, __select, GLIBC_2.1) diff --git a/sysdeps/unix/sysv/linux/alpha/setitimer.S b/sysdeps/unix/sysv/linux/alpha/setitimer.S index fdc3d27a8c..16bbd2227f 100644 --- a/sysdeps/unix/sysv/linux/alpha/setitimer.S +++ b/sysdeps/unix/sysv/linux/alpha/setitimer.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 1998, 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 @@ -19,7 +19,21 @@ #include #define _ERRNO_H 1 #include +#include "kernel-features.h" +.text + +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +#define SETITIMER __setitimer_tv64 +#else +#define SETITIMER __setitimer +#endif + +#if defined __ASSUME_TIMEVAL64 +PSEUDO(SETITIMER, setitimer, 3) + ret +PSEUDO_END(SETITIMER) +#else /* The problem here is that initially we made struct timeval compatible with OSF/1, using int32. But we defined time_t with uint64, and later found that POSIX requires tv_sec to be time_t. @@ -30,14 +44,6 @@ functions which have RT equivalents. */ .comm __libc_missing_axp_tv64, 4 -.text - -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING -#define SETITIMER __setitimer_tv64 -#else -#define SETITIMER __setitimer -#endif - LEAF(SETITIMER, 48) ldgp gp, 0(pv) subq sp, 48, sp @@ -116,6 +122,7 @@ $error: SYSCALL_ERROR_HANDLER END(SETITIMER) +#endif /* __ASSUME_TIMEVAL64 */ #if defined HAVE_ELF && defined PIC && defined DO_VERSIONING default_symbol_version (__setitimer_tv64, __setitimer, GLIBC_2.1) diff --git a/sysdeps/unix/sysv/linux/alpha/settimeofday.S b/sysdeps/unix/sysv/linux/alpha/settimeofday.S index 339913ff51..b49c770a0a 100644 --- a/sysdeps/unix/sysv/linux/alpha/settimeofday.S +++ b/sysdeps/unix/sysv/linux/alpha/settimeofday.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 1998, 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 @@ -19,7 +19,21 @@ #include #define _ERRNO_H 1 #include +#include "kernel-features.h" +.text + +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +#define SETTIMEOFDAY __settimeofday_tv64 +#else +#define SETTIMEOFDAY __settimeofday +#endif + +#if defined __ASSUME_TIMEVAL64 +PSEUDO(SETTIMEOFDAY, settimeofday, 2) + ret +PSEUDO_END(SETTIMEOFDAY) +#else /* The problem here is that initially we made struct timeval compatible with OSF/1, using int32. But we defined time_t with uint64, and later found that POSIX requires tv_sec to be time_t. @@ -30,14 +44,6 @@ functions which have RT equivalents. */ .comm __libc_missing_axp_tv64, 4 -.text - -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING -#define SETTIMEOFDAY __settimeofday_tv64 -#else -#define SETTIMEOFDAY __settimeofday -#endif - LEAF(SETTIMEOFDAY, 16) ldgp gp, 0(pv) subq sp, 16, sp @@ -97,6 +103,7 @@ $error: SYSCALL_ERROR_HANDLER END(SETTIMEOFDAY) +#endif /* __ASSUME_TIMEVAL64 */ #if defined HAVE_ELF && defined PIC && defined DO_VERSIONING default_symbol_version (__settimeofday_tv64, __settimeofday, GLIBC_2.1) diff --git a/sysdeps/unix/sysv/linux/alpha/sigaction.c b/sysdeps/unix/sysv/linux/alpha/sigaction.c new file mode 100644 index 0000000000..1bfba1bfda --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/sigaction.c @@ -0,0 +1,33 @@ +/* Copyright (C) 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. */ + +#include + +/* + * In order to get the hidden arguments for rt_sigaction set up + * properly, we need to call the assembly version. Detect this in the + * INLINE_SYSCALL macro, and fail to expand inline in that case. + */ + +#undef INLINE_SYSCALL +#define INLINE_SYSCALL(name, nr, args...) \ + (__NR_##name == __NR_rt_sigaction \ + ? __syscall_rt_sigaction(args) \ + : INLINE_SYSCALL1(name, nr, args)) + +#include diff --git a/sysdeps/unix/sysv/linux/alpha/sigprocmask.c b/sysdeps/unix/sysv/linux/alpha/sigprocmask.c index 4d2219213a..1916111a22 100644 --- a/sysdeps/unix/sysv/linux/alpha/sigprocmask.c +++ b/sysdeps/unix/sysv/linux/alpha/sigprocmask.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1997, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger (davidm@azstarnet.com). @@ -17,14 +17,13 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include #include #include /* When there is kernel support for more than 64 signals, we'll have to switch to a new system call convention here. */ -extern unsigned long __osf_sigprocmask (int how, unsigned long newmask); - int __sigprocmask (int how, const sigset_t *set, sigset_t *oset) { @@ -32,15 +31,14 @@ __sigprocmask (int how, const sigset_t *set, sigset_t *oset) long result; if (set) - { - setval = set->__val[0]; - } + setval = set->__val[0]; else { setval = 0; how = SIG_BLOCK; /* ensure blocked mask doesn't get changed */ } - result = __osf_sigprocmask (how, setval); + + result = INLINE_SYSCALL (osf_sigprocmask, 2, how, setval); if (result == -1) /* If there are ever more than 63 signals, we need to recode this in assembler since we wouldn't be able to distinguish a mask of diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 62522e72d5..5b63755814 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -13,7 +13,6 @@ semtimedop - semtimedop i:ipip semtimedop semget - semget i:iii __semget semget oldsemctl EXTRA semctl i:iiii __old_semctl semctl@GLIBC_2.0 -osf_sigprocmask - osf_sigprocmask 2 __osf_sigprocmask sigstack - sigstack 2 sigstack vfork - vfork 0 __vfork vfork @@ -34,10 +33,6 @@ truncate - truncate 2 truncate truncate64 readahead - readahead 3 __readahead readahead sendfile - sendfile i:iipi sendfile sendfile64 -# these are actually common with the x86: -sys_ustat ustat ustat i:ip __syscall_ustat -sys_mknod xmknod mknod i:sii __syscall_mknod - # proper socket implementations: accept - accept Ci:iBN __libc_accept __accept accept bind - bind i:ipi __bind bind @@ -64,9 +59,6 @@ pciconfig_read EXTRA pciconfig_read 5 pciconfig_read pciconfig_write EXTRA pciconfig_write 5 pciconfig_write pciconfig_iobase EXTRA pciconfig_iobase 3 __pciconfig_iobase pciconfig_iobase -# Wrapper for adjtimex. -adjtimex - syscall_adjtimex 1 __syscall_adjtimex syscall_adjtimex - # support old timeval32 entry points osf_select - osf_select C:5 __select_tv32 __select@GLIBC_2.0 select@GLIBC_2.0 osf_gettimeofday - osf_gettimeofday 2 __gettimeofday_tv32 __gettimeofday@GLIBC_2.0 gettimeofday@GLIBC_2.0 @@ -76,7 +68,3 @@ osf_setitimer - osf_setitimer 3 __setitimer_tv32 setitimer@GLIBC_2.0 osf_utimes - osf_utimes 2 __utimes_tv32 utimes@GLIBC_2.0 osf_getrusage - osf_getrusage 2 __getrusage_tv32 getrusage@GLIBC_2.0 osf_wait4 - osf_wait4 2 __wait4_tv32 wait4@GLIBC_2.0 -old_adjtimex - old_adjtimex 1 __adjtimex_tv32 __adjtimex@GLIBC_2.0 adjtimex@GLIBC_2.0 - -# and one for timeval64 entry points -adjtimex adjtime adjtimex 1 __syscall_adjtimex_tv64 diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h index 272dcebf42..3c0988abd3 100644 --- a/sysdeps/unix/sysv/linux/alpha/sysdep.h +++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h @@ -67,15 +67,18 @@ /* * In order to get the hidden arguments for rt_sigaction set up - * properly, we need to call the assembly version. Detect this in the - * INLINE_SYSCALL macro, and fail to expand inline in that case. + * properly, we need to call the assembly version. This shouldn't + * happen except for inside sigaction.c, where we handle this + * specially. Catch other uses and error. */ #undef INLINE_SYSCALL -#define INLINE_SYSCALL(name, nr, args...) \ - (__NR_##name == __NR_rt_sigaction \ - ? __syscall_##name(args) \ - : INLINE_SYSCALL1(name, nr, args)) +#define INLINE_SYSCALL(name, nr, args...) \ +({ \ + extern char ChEcK[__NR_##name == __NR_rt_sigaction ? -1 : 1] \ + __attribute__((unused)); \ + INLINE_SYSCALL1(name, nr, args); \ +}) #undef INTERNAL_SYSCALL #define INTERNAL_SYSCALL(name, err_out, nr, args...) \ diff --git a/sysdeps/unix/sysv/linux/alpha/ustat.c b/sysdeps/unix/sysv/linux/alpha/ustat.c index 5fe25ff2c1..4e3bf635a3 100644 --- a/sysdeps/unix/sysv/linux/alpha/ustat.c +++ b/sysdeps/unix/sysv/linux/alpha/ustat.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997 Free Software Foundation, Inc. +/* Copyright (C) 1997, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -17,11 +17,10 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include #include #include - - -extern int __syscall_ustat (unsigned int dev, struct ustat *ubuf); +#include int ustat (dev_t dev, struct ustat *ubuf) @@ -31,5 +30,5 @@ ustat (dev_t dev, struct ustat *ubuf) /* We must convert the value to dev_t type used by the kernel. */ k_dev = ((major (dev) & 0xff) << 8) | (minor (dev) & 0xff); - return __syscall_ustat (k_dev, ubuf); + return INLINE_SYSCALL (ustat, 2, k_dev, ubuf); } diff --git a/sysdeps/unix/sysv/linux/alpha/utimes.S b/sysdeps/unix/sysv/linux/alpha/utimes.S index a939255d27..c210e1d12f 100644 --- a/sysdeps/unix/sysv/linux/alpha/utimes.S +++ b/sysdeps/unix/sysv/linux/alpha/utimes.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 1998, 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 @@ -19,7 +19,21 @@ #include #define _ERRNO_H 1 #include +#include "kernel-features.h" +.text + +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +#define UTIMES __utimes_tv64 +#else +#define UTIMES __utimes +#endif + +#if defined __ASSUME_TIMEVAL64 +PSEUDO(UTIMES, utimes, 2) + ret +PSEUDO_END(UTIMES) +#else /* The problem here is that initially we made struct timeval compatible with OSF/1, using int32. But we defined time_t with uint64, and later found that POSIX requires tv_sec to be time_t. @@ -30,14 +44,6 @@ functions which have RT equivalents. */ .comm __libc_missing_axp_tv64, 4 -.text - -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING -#define UTIMES __utimes_tv64 -#else -#define UTIMES __utimes -#endif - LEAF(UTIMES, 16) ldgp gp, 0(pv) subq sp, 16, sp @@ -102,6 +108,7 @@ $error: SYSCALL_ERROR_HANDLER END(UTIMES) +#endif /* __ASSUME_TIMEVAL64 */ #if defined HAVE_ELF && defined PIC && defined DO_VERSIONING default_symbol_version (__utimes_tv64, __utimes, GLIBC_2.1) diff --git a/sysdeps/unix/sysv/linux/alpha/wait4.S b/sysdeps/unix/sysv/linux/alpha/wait4.S index 17c5a97952..8d89e3d46e 100644 --- a/sysdeps/unix/sysv/linux/alpha/wait4.S +++ b/sysdeps/unix/sysv/linux/alpha/wait4.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 1998, 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 @@ -19,7 +19,21 @@ #include #define _ERRNO_H 1 #include +#include "kernel-features.h" +.text + +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +#define WAIT4 __wait4_tv64 +#else +#define WAIT4 __wait4 +#endif + +#if defined __ASSUME_TIMEVAL64 +PSEUDO(WAIT4, wait4, 4) + ret +PSEUDO_END(WAIT4) +#else /* The problem here is that initially we made struct timeval compatible with OSF/1, using int32. But we defined time_t with uint64, and later found that POSIX requires tv_sec to be time_t. @@ -30,14 +44,6 @@ functions which have RT equivalents. */ .comm __libc_missing_axp_tv64, 4 -.text - -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING -#define WAIT4 __wait4_tv64 -#else -#define WAIT4 __wait4 -#endif - LEAF(WAIT4, 32) ldgp gp, 0(pv) subq sp, 32, sp @@ -135,6 +141,7 @@ $error: SYSCALL_ERROR_HANDLER END(WAIT4) +#endif /* __ASSUME_TIMEVAL64 */ #if defined HAVE_ELF && defined PIC && defined DO_VERSIONING default_symbol_version (__wait4_tv64, __wait4, GLIBC_2.1) diff --git a/sysdeps/unix/sysv/linux/alpha/xmknod.c b/sysdeps/unix/sysv/linux/alpha/xmknod.c index d7e8d2a0a8..e74f4c0b8b 100644 --- a/sysdeps/unix/sysv/linux/alpha/xmknod.c +++ b/sysdeps/unix/sysv/linux/alpha/xmknod.c @@ -1,5 +1,6 @@ /* xmknod call using old-style Unix mknod system call. - Copyright (C) 1991,1993,1995,1996,1997,2002 Free Software Foundation, Inc. + Copyright (C) 1991,1993,1995,1996,1997,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 @@ -21,8 +22,7 @@ #include #include #include - -extern int __syscall_mknod (const char *, unsigned int, unsigned int); +#include /* Create a device file named PATH, with permission and special bits MODE and device number DEV (which can be constructed from major and minor @@ -41,7 +41,7 @@ __xmknod (int vers, const char *path, mode_t mode, dev_t *dev) /* We must convert the value to dev_t type used by the kernel. */ k_dev = ((major (*dev) & 0xff) << 8) | (minor (*dev) & 0xff); - return __syscall_mknod (path, mode, k_dev); + return INLINE_SYSCALL (mknod, 3, path, mode, k_dev); } weak_alias (__xmknod, _xmknod) diff --git a/sysdeps/unix/sysv/linux/alpha/xstatconv.c b/sysdeps/unix/sysv/linux/alpha/xstatconv.c index 1084049dbe..3f15dfef2e 100644 --- a/sysdeps/unix/sysv/linux/alpha/xstatconv.c +++ b/sysdeps/unix/sysv/linux/alpha/xstatconv.c @@ -20,7 +20,7 @@ #include #include #include - +#include #include From 200266341338ab84b84889cd9f5388fee1db4b92 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 20 Jun 2003 19:24:17 +0000 Subject: [PATCH 3128/4487] * sysdeps/unix/make-syscalls.sh: Implement ! prefix for strong aliases. * sysdeps/unix/sysv/linux/alpha/syscalls.list (open, open64): New. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 5b63755814..1e28c119f7 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -32,6 +32,8 @@ ftruncate - ftruncate 2 __ftruncate ftruncate __ftruncate64 ftruncate64 truncate - truncate 2 truncate truncate64 readahead - readahead 3 __readahead readahead sendfile - sendfile i:iipi sendfile sendfile64 +open - open Ci:siv __libc_open __open open !__libc_open64 __open64 open64 +open64 open - # proper socket implementations: accept - accept Ci:iBN __libc_accept __accept accept From 0fadfc223dc81bef82589ae3189d30a90d700d60 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 24 Jun 2003 11:06:57 +0000 Subject: [PATCH 3129/4487] Update. --- sysdeps/m68k/fpu/libm-test-ulps | 35 ++++++++++----------------------- 1 file changed, 10 insertions(+), 25 deletions(-) diff --git a/sysdeps/m68k/fpu/libm-test-ulps b/sysdeps/m68k/fpu/libm-test-ulps index b4749d0b56..cab950120c 100644 --- a/sysdeps/m68k/fpu/libm-test-ulps +++ b/sysdeps/m68k/fpu/libm-test-ulps @@ -125,8 +125,6 @@ ifloat: 1 Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i": float: 1 ifloat: 1 -ildouble: 1 -ldouble: 1 Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": float: 1 ifloat: 1 @@ -192,9 +190,6 @@ ifloat: 1 Test "Real part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i": ildouble: 1 ldouble: 1 -Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i": -ildouble: 1 -ldouble: 1 Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i": float: 1 ifloat: 1 @@ -358,8 +353,6 @@ ifloat: 1 Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i": float: 1 ifloat: 1 -ildouble: 2 -ldouble: 2 Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": float: 1 ifloat: 1 @@ -371,9 +364,8 @@ ifloat: 1 # ctan Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": -ildouble: 439 -ldouble: 439 -Test "Imaginary part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": +double: 1 +idouble: 1 ildouble: 1 ldouble: 1 Test "Real part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i": @@ -384,12 +376,9 @@ ildouble: 2 ldouble: 2 # ctanh -Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": -ildouble: 2 -ldouble: 2 Test "Imaginary part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": -ildouble: 25 -ldouble: 25 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i": double: 1 idouble: 1 @@ -1032,28 +1021,24 @@ ldouble: 1 Function: Imaginary part of "csinh": float: 1 ifloat: 1 -ildouble: 2 -ldouble: 2 Function: Real part of "ctan": -ildouble: 439 -ldouble: 439 +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 Function: Imaginary part of "ctan": ildouble: 2 ldouble: 2 -Function: Real part of "ctanh": -ildouble: 2 -ldouble: 2 - Function: Imaginary part of "ctanh": double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 25 -ldouble: 25 +ildouble: 1 +ldouble: 1 Function: "erfc": float: 1 From 4f6923e1f5a776bcf601154c2b4beb7b704c34c9 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 24 Jun 2003 16:26:34 +0000 Subject: [PATCH 3130/4487] * sysdeps/unix/sysv/linux/alpha/syscalls.list (pread, pwrite): Use the 64-bit syscall name. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 1e28c119f7..60235d012f 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -22,8 +22,8 @@ mmap - mmap b:aniiii __mmap mmap __mmap64 mmap64 llseek EXTRA lseek C:3 __libc_lseek __lseek lseek __libc_lseek64 __llseek llseek __lseek64 lseek64 lseek llseek - posix_fadvise64 - fadvise64 4 posix_fadvise64 posix_fadvise -pread - pread C:4 __libc_pread __libc_pread64 __pread pread __pread64 pread64 -pwrite - pwrite C:4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64 +pread - pread64 C:4 __libc_pread __libc_pread64 __pread pread __pread64 pread64 +pwrite - pwrite64 C:4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64 fstatfs - fstatfs i:ip __fstatfs fstatfs __fstatfs64 fstatfs64 statfs - statfs i:sp __statfs statfs statfs64 getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64 From 1bb08f1582d3914003456d751b708ff27ebeae41 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 24 Jun 2003 16:29:21 +0000 Subject: [PATCH 3131/4487] * sysdeps/alpha/setjmp.S (_setjmp, setjmp): Mark .prologue. --- sysdeps/alpha/setjmp.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S index 2e38f0031d..14a0320cd3 100644 --- a/sysdeps/alpha/setjmp.S +++ b/sysdeps/alpha/setjmp.S @@ -74,6 +74,7 @@ END(__sigsetjmp) ENTRY(_setjmp) ldgp gp, 0(pv) + .prologue 1 mov 0, a1 br $sigsetjmp_local END(_setjmp) @@ -81,6 +82,7 @@ libc_hidden_def (_setjmp) ENTRY(setjmp) ldgp gp, 0(pv) + .prologue 1 mov 1, a1 br $sigsetjmp_local END(setjmp) From 981e63c822093ece2981e3667d284b78a2731005 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 24 Jun 2003 16:33:49 +0000 Subject: [PATCH 3132/4487] * sysdeps/alpha/fpu/bits/mathinline.h: Honor __LIBC_INTERNAL_MATH_INLINES. Implement __signbitf, __signbit. --- sysdeps/alpha/fpu/bits/mathinline.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h index 3fb6ec2f24..8141485b47 100644 --- a/sysdeps/alpha/fpu/bits/mathinline.h +++ b/sysdeps/alpha/fpu/bits/mathinline.h @@ -58,7 +58,8 @@ !isunordered(__x, __y) && __x != __y; })) #endif /* ISO C99 */ -#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__ +#if (!defined __NO_MATH_INLINES || defined __LIBC_INTERNAL_MATH_INLINES) \ + && defined __OPTIMIZE__ #define __inline_copysign(NAME, TYPE) \ __MATH_INLINE TYPE \ @@ -176,6 +177,19 @@ __MATH_INLINE double fdim (double __x, double __y) __THROW return __x < __y ? 0.0 : __x - __y; } +/* Test for negative number. Used in the signbit() macro. */ +__MATH_INLINE int __signbitf (float __x) __THROW +{ + __extension__ union { float __f; int __i; } __u = { __f: __x }; + return __u.__i < 0; +} + +__MATH_INLINE int __signbit (double __x) __THROW +{ + __extension__ union { double __d; long __i; } __u = { __d: __x }; + return __u.__i < 0; +} + #endif /* C99 */ #endif /* __NO_MATH_INLINES */ From 1fbb61a95d42134c36bd7865424a1915d72f26f8 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 24 Jun 2003 16:38:45 +0000 Subject: [PATCH 3133/4487] * sysdeps/unix/sysv/linux/alpha/clone.S: Use HIDDEN_JUMPTARGET. * sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S: Use libc_hidden_def. * sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S: Likewise. * sysdeps/unix/sysv/linux/alpha/setfpucw.c: Use libc_hidden_proto on them. --- sysdeps/unix/sysv/linux/alpha/clone.S | 6 +++++- sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S | 1 + sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S | 1 + sysdeps/unix/sysv/linux/alpha/setfpucw.c | 6 ++++-- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S index 2aa9bb7f38..a0aa7712f5 100644 --- a/sysdeps/unix/sysv/linux/alpha/clone.S +++ b/sysdeps/unix/sysv/linux/alpha/clone.S @@ -97,7 +97,11 @@ thread_start: /* Call _exit rather than doing it inline for breakpoint purposes. */ mov v0,a0 - jsr ra,_exit +#ifdef PIC + bsr ra, HIDDEN_JUMPTARGET(_exit) !samegp +#else + jsr ra, HIDDEN_JUMPTARGET(_exit) +#endif /* Die horribly. */ halt diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S index f436a52437..3cabd0b489 100644 --- a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S +++ b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S @@ -57,4 +57,5 @@ $error: END(__ieee_get_fp_control) +libc_hidden_def(__ieee_get_fp_control) weak_alias (__ieee_get_fp_control, ieee_get_fp_control) diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S index 54762e1d23..302ed06cd3 100644 --- a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S +++ b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S @@ -56,4 +56,5 @@ $error: END(__ieee_set_fp_control) +libc_hidden_def(__ieee_set_fp_control) weak_alias (__ieee_set_fp_control, ieee_set_fp_control) diff --git a/sysdeps/unix/sysv/linux/alpha/setfpucw.c b/sysdeps/unix/sysv/linux/alpha/setfpucw.c index 5622d8425c..a7e3a55812 100644 --- a/sysdeps/unix/sysv/linux/alpha/setfpucw.c +++ b/sysdeps/unix/sysv/linux/alpha/setfpucw.c @@ -1,5 +1,5 @@ /* Set FP exception mask and rounding mode. - Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 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 @@ -20,9 +20,11 @@ #include #include - extern void __ieee_set_fp_control (unsigned long); +libc_hidden_proto(__ieee_set_fp_control) + extern unsigned long __ieee_get_fp_control (void); +libc_hidden_proto(__ieee_get_fp_control) static inline unsigned long rdfpcr (void) From adaab7298afe5cc014daa23d5550aae229964a61 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 24 Jun 2003 17:03:59 +0000 Subject: [PATCH 3134/4487] * sysdeps/alpha/bits/atomic.h: New file. --- sysdeps/alpha/bits/atomic.h | 367 ++++++++++++++++++++++++++++++++++++ 1 file changed, 367 insertions(+) create mode 100644 sysdeps/alpha/bits/atomic.h diff --git a/sysdeps/alpha/bits/atomic.h b/sysdeps/alpha/bits/atomic.h new file mode 100644 index 0000000000..ead76a75aa --- /dev/null +++ b/sysdeps/alpha/bits/atomic.h @@ -0,0 +1,367 @@ +/* Copyright (C) 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. */ + +#include + +typedef int8_t atomic8_t; +typedef uint8_t uatomic8_t; +typedef int_fast8_t atomic_fast8_t; +typedef uint_fast8_t uatomic_fast8_t; + +typedef int16_t atomic16_t; +typedef uint16_t uatomic16_t; +typedef int_fast16_t atomic_fast16_t; +typedef uint_fast16_t uatomic_fast16_t; + +typedef int32_t atomic32_t; +typedef uint32_t uatomic32_t; +typedef int_fast32_t atomic_fast32_t; +typedef uint_fast32_t uatomic_fast32_t; + +typedef int64_t atomic64_t; +typedef uint64_t uatomic64_t; +typedef int_fast64_t atomic_fast64_t; +typedef uint_fast64_t uatomic_fast64_t; + +typedef intptr_t atomicptr_t; +typedef uintptr_t uatomicptr_t; +typedef intmax_t atomic_max_t; +typedef uintmax_t uatomic_max_t; + + +#ifdef UP +# define __MB /* nothing */ +#else +# define __MB " mb\n" +#endif + + +/* Compare and exchange. For all of the "xxx" routines, we expect a + "__prev" and a "__cmp" variable to be provided by the enclosing scope, + in which values are returned. */ + +#define __arch_compare_and_exchange_xxx_8_int(mem, new, old, mb1, mb2) \ +({ \ + unsigned long __tmp, __snew, __addr64; \ + __asm__ __volatile__ ( \ + mb1 \ + " andnot %[__addr8],7,%[__addr64]\n" \ + " insbl %[__new],%[__addr8],%[__snew]\n" \ + "1: ldq_l %[__tmp],0(%[__addr64])\n" \ + " extbl %[__tmp],%[__addr8],%[__prev]\n" \ + " cmpeq %[__prev],%[__old],%[__cmp]\n" \ + " beq %[__cmp],2f\n" \ + " mskbl %[__tmp],%[__addr8],%[__tmp]\n" \ + " or %[__snew],%[__tmp],%[__tmp]\n" \ + " stq_c %[__tmp],0(%[__addr64])\n" \ + " beq %[__tmp],1b\n" \ + mb2 \ + "2:" \ + : [__prev] "=&r" (__prev), \ + [__snew] "=&r" (__snew), \ + [__tmp] "=&r" (__tmp), \ + [__cmp] "=&r" (__cmp), \ + [__addr64] "=&r" (__addr64) \ + : [__addr8] "r" (mem), \ + [__old] "Ir" ((uint64_t)(uint8_t)(old)), \ + [__new] "r" (new) \ + : "memory"); \ +}) + +#define __arch_compare_and_exchange_xxx_16_int(mem, new, old, mb1, mb2) \ +({ \ + unsigned long __tmp, __snew, __addr64; \ + __asm__ __volatile__ ( \ + mb1 \ + " andnot %[__addr16],7,%[__addr64]\n" \ + " inswl %[__new],%[__addr16],%[__snew]\n" \ + "1: ldq_l %[__tmp],0(%[__addr64])\n" \ + " extwl %[__tmp],%[__addr16],%[__prev]\n" \ + " cmpeq %[__prev],%[__old],%[__cmp]\n" \ + " beq %[__cmp],2f\n" \ + " mskwl %[__tmp],%[__addr16],%[__tmp]\n" \ + " or %[__snew],%[__tmp],%[__tmp]\n" \ + " stq_c %[__tmp],0(%[__addr64])\n" \ + " beq %[__tmp],1b\n" \ + mb2 \ + "2:" \ + : [__prev] "=&r" (__prev), \ + [__snew] "=&r" (__snew), \ + [__tmp] "=&r" (__tmp), \ + [__cmp] "=&r" (__cmp), \ + [__addr64] "=&r" (__addr64) \ + : [__addr16] "r" (mem), \ + [__old] "Ir" ((uint64_t)(uint16_t)(old)), \ + [__new] "r" (new) \ + : "memory"); \ +}) + +#define __arch_compare_and_exchange_xxx_32_int(mem, new, old, mb1, mb2) \ +({ \ + __asm__ __volatile__ ( \ + mb1 \ + "1: ldl_l %[__prev],%[__mem]\n" \ + " cmpeq %[__prev],%[__old],%[__cmp]\n" \ + " beq %[__cmp],2f\n" \ + " mov %[__new],%[__cmp]\n" \ + " stl_c %[__cmp],%[__mem]\n" \ + " beq %[__cmp],1b\n" \ + mb2 \ + "2:" \ + : [__prev] "=&r" (__prev), \ + [__cmp] "=&r" (__cmp) \ + : [__mem] "m" (*(mem)), \ + [__old] "Ir" ((uint64_t)(atomic32_t)(old)), \ + [__new] "Ir" (new) \ + : "memory"); \ +}) + +#define __arch_compare_and_exchange_xxx_64_int(mem, new, old, mb1, mb2) \ +({ \ + __asm__ __volatile__ ( \ + mb1 \ + "1: ldq_l %[__prev],%[__mem]\n" \ + " cmpeq %[__prev],%[__old],%[__cmp]\n" \ + " beq %[__cmp],2f\n" \ + " mov %[__new],%[__cmp]\n" \ + " stq_c %[__cmp],%[__mem]\n" \ + " beq %[__cmp],1b\n" \ + mb2 \ + "2:" \ + : [__prev] "=&r" (__prev), \ + [__cmp] "=&r" (__cmp) \ + : [__mem] "m" (*(mem)), \ + [__old] "Ir" (old), \ + [__new] "Ir" (new) \ + : "memory"); \ +}) + +/* For all "bool" routines, we return true if exchange succesful. */ + +#define __arch_compare_and_exchange_bool_8_int(mem, new, old, mb1, mb2) \ +({ unsigned long __prev; int __cmp; \ + __arch_compare_and_exchange_xxx_8_int(mem, new, old, mb1, mb2); \ + __cmp; }) + +#define __arch_compare_and_exchange_bool_16_int(mem, new, old, mb1, mb2) \ +({ unsigned long __prev; int __cmp; \ + __arch_compare_and_exchange_xxx_16_int(mem, new, old, mb1, mb2); \ + __cmp; }) + +#define __arch_compare_and_exchange_bool_32_int(mem, new, old, mb1, mb2) \ +({ unsigned long __prev; int __cmp; \ + __arch_compare_and_exchange_xxx_32_int(mem, new, old, mb1, mb2); \ + __cmp; }) + +#define __arch_compare_and_exchange_bool_64_int(mem, new, old, mb1, mb2) \ +({ unsigned long __prev; int __cmp; \ + __arch_compare_and_exchange_xxx_64_int(mem, new, old, mb1, mb2); \ + __cmp; }) + +/* For all "val" routines, return the old value whether exchange + successful or not. */ + +#define __arch_compare_and_exchange_val_8_int(mem, new, old, mb1, mb2) \ +({ unsigned long __prev; int __cmp; \ + __arch_compare_and_exchange_xxx_8_int(mem, new, old, mb1, mb2); \ + __prev; }) + +#define __arch_compare_and_exchange_val_16_int(mem, new, old, mb1, mb2) \ +({ unsigned long __prev; int __cmp; \ + __arch_compare_and_exchange_xxx_16_int(mem, new, old, mb1, mb2); \ + __prev; }) + +#define __arch_compare_and_exchange_val_32_int(mem, new, old, mb1, mb2) \ +({ unsigned long __prev; int __cmp; \ + __arch_compare_and_exchange_xxx_32_int(mem, new, old, mb1, mb2); \ + __prev; }) + +#define __arch_compare_and_exchange_val_64_int(mem, new, old, mb1, mb2) \ +({ unsigned long __prev; int __cmp; \ + __arch_compare_and_exchange_xxx_64_int(mem, new, old, mb1, mb2); \ + __prev; }) + +/* Compare and exchange with "acquire" semantics, ie barrier after. */ + +#define atomic_compare_and_exchange_bool_acq(mem, new, old) \ + __atomic_val_bysize (__arch_compare_and_exchange_bool, int, \ + mem, new, old, "", __MB) + +#define atomic_compare_and_exchange_val_acq(mem, new, old) \ + __atomic_val_bysize (__arch_compare_and_exchange_val, int, \ + mem, new, old, "", __MB) + +/* Compare and exchange with "release" semantics, ie barrier before. */ + +#define atomic_compare_and_exchange_bool_rel(mem, new, old) \ + __atomic_val_bysize (__arch_compare_and_exchange_bool, int, \ + mem, new, old, __MB, "") + +#define atomic_compare_and_exchange_val_rel(mem, new, old) \ + __atomic_val_bysize (__arch_compare_and_exchange_val, int, \ + mem, new, old, __MB, "") + + +/* Atomically store value and return the previous value. */ + +#define __arch_exchange_8_int(mem, value, mb1, mb2) \ +({ \ + unsigned long __ret, __tmp, __addr64, __sval; \ + __asm__ __volatile__ ( \ + mb1 \ + " andnot %[__addr8],7,%[__addr64]\n" \ + " insbl %[__value],%[__addr8],%[__sval]\n" \ + "1: ldq_l %[__tmp],0(%[__addr64])\n" \ + " extbl %[__tmp],%[__addr8],%[__ret]\n" \ + " mskbl %[__tmp],%[__addr8],%[__tmp]\n" \ + " or %[__sval],%[__tmp],%[__tmp]\n" \ + " stq_c %[__tmp],0(%[__addr64])\n" \ + " beq %[__tmp],1b\n" \ + mb2 \ + : [__ret] "=&r" (__ret), \ + [__sval] "=&r" (__sval), \ + [__tmp] "=&r" (__tmp), \ + [__addr64] "=&r" (__addr64) \ + : [__addr8] "r" (mem), \ + [__value] "r" (value) \ + : "memory"); \ + __ret; }) + +#define __arch_exchange_16_int(mem, value, mb1, mb2) \ +({ \ + unsigned long __ret, __tmp, __addr64, __sval; \ + __asm__ __volatile__ ( \ + mb1 \ + " andnot %[__addr8],7,%[__addr64]\n" \ + " inswl %[__value],%[__addr16],%[__sval]\n" \ + "1: ldq_l %[__tmp],0(%[__addr64])\n" \ + " extwl %[__tmp],%[__addr16],%[__ret]\n" \ + " mskwl %[__tmp],%[__addr16],%[__tmp]\n" \ + " or %[__sval],%[__tmp],%[__tmp]\n" \ + " stq_c %[__tmp],0(%[__addr64])\n" \ + " beq %[__tmp],1b\n" \ + mb2 \ + : [__ret] "=&r" (__ret), \ + [__sval] "=&r" (__sval), \ + [__tmp] "=&r" (__tmp), \ + [__addr64] "=&r" (__addr64) \ + : [__addr16] "r" (mem), \ + [__value] "r" (value) \ + : "memory"); \ + __ret; }) + +#define __arch_exchange_32_int(mem, value, mb1, mb2) \ +({ \ + signed int __ret, __tmp; \ + __asm__ __volatile__ ( \ + mb1 \ + "1: ldl_l %[__ret],%[__mem]\n" \ + " mov %[__ret],%[__tmp]\n" \ + " stl_c %[__tmp],%[__mem]\n" \ + " beq %[__tmp],1b\n" \ + mb2 \ + : [__ret] "=&r" (__ret), \ + [__tmp] "=&r" (__tmp) \ + : [__mem] "m" (*(mem)) \ + : "memory"); \ + __ret; }) + +#define __arch_exchange_64_int(mem, value, mb1, mb2) \ +({ \ + unsigned long __ret, __tmp; \ + __asm__ __volatile__ ( \ + mb1 \ + "1: ldq_l %[__ret],%[__mem]\n" \ + " mov %[__ret],%[__tmp]\n" \ + " stq_c %[__tmp],%[__mem]\n" \ + " beq %[__tmp],1b\n" \ + mb2 \ + : [__ret] "=&r" (__ret), \ + [__tmp] "=&r" (__tmp) \ + : [__mem] "m" (*(mem)) \ + : "memory"); \ + __ret; }) + +#define atomic_exchange_acq(mem, value) \ + __atomic_val_bysize (__arch_exchange, int, mem, value, "", __MB) + +#define atomic_exchange_rel(mem, value) \ + __atomic_val_bysize (__arch_exchange, int, mem, value, __MB, "") + + +/* Atomically add value and return the previous (unincremented) value. */ + +#define __arch_exchange_and_add_8_int(mem, value, mb1, mb2) \ + ({ __builtin_trap (); 0; }) + +#define __arch_exchange_and_add_16_int(mem, value, mb1, mb2) \ + ({ __builtin_trap (); 0; }) + +#define __arch_exchange_and_add_32_int(mem, value, mb1, mb2) \ +({ \ + signed int __ret, __tmp; \ + __asm__ __volatile__ ( \ + mb1 \ + "1: ldl_l %[__ret],%[__mem]\n" \ + " addl %[__ret],%[__val],%[__tmp]\n" \ + " stl_c %[__tmp],%[__mem]\n" \ + " beq %[__tmp],1b\n" \ + mb2 \ + : [__ret] "=&r" (__ret), \ + [__tmp] "=&r" (__tmp) \ + : [__mem] "m" (*(mem)), \ + [__val] "Ir" ((signed int)(value)) \ + : "memory"); \ + __ret; }) + +#define __arch_exchange_and_add_64_int(mem, value, mb1, mb2) \ +({ \ + unsigned long __ret, __tmp; \ + __asm__ __volatile__ ( \ + mb1 \ + "1: ldq_l %[__ret],%[__mem]\n" \ + " addq %[__ret],%[__val],%[__tmp]\n" \ + " stq_c %[__tmp],%[__mem]\n" \ + " beq %[__tmp],1b\n" \ + mb2 \ + : [__ret] "=&r" (__ret), \ + [__tmp] "=&r" (__tmp) \ + : [__mem] "m" (*(mem)), \ + [__val] "Ir" ((unsigned long)(value)) \ + : "memory"); \ + __ret; }) + +/* ??? Barrier semantics for atomic_exchange_and_add appear to be + undefined. Use full barrier for now, as that's safe. */ +#define atomic_exchange_and_add(mem, value) \ + __atomic_val_bysize (__arch_exchange_and_add, int, mem, value, __MB, __MB) + + +/* ??? Blah, I'm lazy. Implement these later. Can do better than the + compare-and-exchange loop provided by generic code. + +#define atomic_decrement_if_positive(mem) +#define atomic_bit_test_set(mem, bit) + +*/ + +#ifndef UP +# define atomic_full_barrier() __asm ("mb" : : : "memory"); +# define atomic_read_barrier() __asm ("mb" : : : "memory"); +# define atomic_write_barrier() __asm ("wmb" : : : "memory"); +#endif From e31adc65328aff689243913af489685cff5e050d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 24 Jun 2003 17:13:44 +0000 Subject: [PATCH 3135/4487] (struct statfs): Add f_frsize field. (struct statfs64): Likewise. --- sysdeps/unix/sysv/linux/alpha/bits/statfs.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/statfs.h b/sysdeps/unix/sysv/linux/alpha/bits/statfs.h index b8e37e6102..d39c6f01c4 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/statfs.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/statfs.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2000, 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 @@ -41,7 +41,8 @@ struct statfs #endif __fsid_t f_fsid; int f_namelen; - int f_spare[6]; + int f_frsize; + int f_spare[5]; }; #ifdef __USE_LARGEFILE64 @@ -56,7 +57,8 @@ struct statfs64 __fsfilcnt64_t f_ffree; __fsid_t f_fsid; int f_namelen; - int f_spare[6]; + int f_frsize; + int f_spare[5]; }; #endif From 50b45ef61cb66deaa9c3a24416e0447fa58b6b18 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 25 Jun 2003 08:03:24 +0000 Subject: [PATCH 3136/4487] ld.so cache deifnitions for mips. --- sysdeps/unix/sysv/linux/mips/dl-cache.h | 43 +++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/mips/dl-cache.h diff --git a/sysdeps/unix/sysv/linux/mips/dl-cache.h b/sysdeps/unix/sysv/linux/mips/dl-cache.h new file mode 100644 index 0000000000..4fa5d3ad22 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/dl-cache.h @@ -0,0 +1,43 @@ +/* Support for reading /etc/ld.so.cache files written by Linux ldconfig. + Copyright (C) 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. */ + +#define add_system_dir(dir) \ + do \ + { \ + size_t len = strlen (dir); \ + char path[len + 3]; \ + memcpy (path, dir, len + 1); \ + if (len >= 6 \ + && (! memcmp (path + len - 6, "/lib64", 6) \ + || ! memcmp (path + len - 6, "/lib32", 6))) \ + { \ + len -= 2; \ + path[len] = '\0'; \ + } \ + add_dir (path); \ + if (len >= 4 && ! memcmp (path + len - 4, "/lib", 4)) \ + { \ + memcpy (path + len, "32", 3); \ + add_dir (path); \ + memcpy (path + len, "64", 3); \ + add_dir (path); \ + } \ + } while (0) + +#include_next From fba1515d2456482fc853be8ac27c14b0975cf564 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 25 Jun 2003 08:18:08 +0000 Subject: [PATCH 3137/4487] (INLINE_SYSCALL): Cast result to long int. --- sysdeps/unix/sysv/linux/cris/sysdep.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/cris/sysdep.h b/sysdeps/unix/sysv/linux/cris/sysdep.h index ba40491314..5013dd5d30 100644 --- a/sysdeps/unix/sysv/linux/cris/sysdep.h +++ b/sysdeps/unix/sysv/linux/cris/sysdep.h @@ -170,7 +170,7 @@ __set_errno (- __sys_res); \ __sys_res = (unsigned long) -1; \ } \ - __sys_res; \ + (long int) __sys_res; \ }) #define LOAD_ARGS_c_0() From fbdd196b523018f800f7e803a898983c0e0bf779 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Thu, 26 Jun 2003 16:18:13 +0000 Subject: [PATCH 3138/4487] * sysdeps/m68k/fpu/bits/mathinline.h: Don't inline frexp. * sysdeps/m68k/fpu/s_frexp.c: Put implementation here. * sysdeps/m68k/fpu/s_frexpl.c: Fix to handle unnormalized numbers. --- sysdeps/m68k/fpu/bits/mathinline.h | 31 +-------------- sysdeps/m68k/fpu/s_frexp.c | 27 ++++++++++--- sysdeps/m68k/fpu/s_frexpl.c | 62 ++++++++++++++++++++++++++++-- 3 files changed, 83 insertions(+), 37 deletions(-) diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/fpu/bits/mathinline.h index 4b1bfeaf13..ec00b4b711 100644 --- a/sysdeps/m68k/fpu/bits/mathinline.h +++ b/sysdeps/m68k/fpu/bits/mathinline.h @@ -1,5 +1,6 @@ /* Definitions of inline math functions implemented by the m68881/2. - Copyright (C) 1991,92,93,94,96,97,98,99,2000,2002 Free Software Foundation, Inc. + Copyright (C) 1991,92,93,94,96,97,98,99,2000,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 @@ -176,28 +177,6 @@ __inline_mathop(trunc, intrz) for the function names. */ #define __inline_functions(float_type, s) \ -__m81_inline float_type \ -__m81_u(__CONCAT(__frexp,s))(float_type __value, int *__expptr) __THROW \ -{ \ - float_type __mantissa, __exponent; \ - int __iexponent; \ - unsigned long __fpsr; \ - __asm("ftst%.x %1\n" \ - "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \ - if (__fpsr & (7 << 24)) \ - { \ - /* Not finite or zero. */ \ - *__expptr = 0; \ - return __value; \ - } \ - __asm("fgetexp%.x %1, %0" : "=f" (__exponent) : "f" (__value)); \ - __iexponent = (int) __exponent + 1; \ - *__expptr = __iexponent; \ - __asm("fscale%.l %2, %0" : "=f" (__mantissa) \ - : "0" (__value), "dmi" (-__iexponent)); \ - return __mantissa; \ -} \ - \ __m81_defun (float_type, __CONCAT(__floor,s), (float_type __x)) __THROW \ { \ float_type __result; \ @@ -386,8 +365,6 @@ extern __inline rettype name args1 __THROW \ return __CONCAT(__,name) args2; \ } -__inline_forward(double,frexp, (double __value, int *__expptr), - (__value, __expptr)) __inline_forward_c(double,floor, (double __x), (__x)) __inline_forward_c(double,ceil, (double __x), (__x)) # ifdef __USE_MISC @@ -416,8 +393,6 @@ __inline_forward(void,sincos, (double __x, double *__sinx, double *__cosx), # if defined __USE_MISC || defined __USE_ISOC99 -__inline_forward(float,frexpf, (float __value, int *__expptr), - (__value, __expptr)) __inline_forward_c(float,floorf, (float __x), (__x)) __inline_forward_c(float,ceilf, (float __x), (__x)) # ifdef __USE_MISC @@ -438,8 +413,6 @@ __inline_forward(void,sincosf, (float __x, float *__sinx, float *__cosx), (__x, __sinx, __cosx)) # endif -__inline_forward(long double,frexpl, (long double __value, int *__expptr), - (__value, __expptr)) __inline_forward_c(long double,floorl, (long double __x), (__x)) __inline_forward_c(long double,ceill, (long double __x), (__x)) # ifdef __USE_MISC diff --git a/sysdeps/m68k/fpu/s_frexp.c b/sysdeps/m68k/fpu/s_frexp.c index 0cdb5778ee..b06141283c 100644 --- a/sysdeps/m68k/fpu/s_frexp.c +++ b/sysdeps/m68k/fpu/s_frexp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 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 @@ -28,11 +28,28 @@ #define __CONCATX(a,b) __CONCAT(a,b) float_type -__CONCATX(__,FUNC) (value, expptr) - float_type value; - int *expptr; +__CONCATX(__,FUNC) (float_type value, int *expptr) { - return __m81_u(__CONCATX(__,FUNC))(value, expptr); + float_type mantissa, exponent; + int iexponent; + unsigned long fpsr; + + __asm ("ftst%.x %1\n" + "fmove%.l %/fpsr, %0" + : "=dm" (fpsr) : "f" (value)); + if (fpsr & (7 << 24)) + { + /* Not finite or zero. */ + *expptr = 0; + return value; + } + __asm ("fgetexp%.x %1, %0" : "=f" (exponent) : "f" (value)); + iexponent = (int) exponent + 1; + *expptr = iexponent; + __asm ("fscale%.l %2, %0" + : "=f" (mantissa) + : "0" (value), "dmi" (-iexponent)); + return mantissa; } #define weak_aliasx(a,b) weak_alias(a,b) diff --git a/sysdeps/m68k/fpu/s_frexpl.c b/sysdeps/m68k/fpu/s_frexpl.c index fe9466f3be..f9a5315265 100644 --- a/sysdeps/m68k/fpu/s_frexpl.c +++ b/sysdeps/m68k/fpu/s_frexpl.c @@ -1,3 +1,59 @@ -#define FUNC frexpl -#define float_type long double -#include +/* Copyright (C) 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. */ + +#include + +long double +__frexpl (long double value, int *expptr) +{ + long double mantissa, exponent; + int iexponent; + unsigned long fpsr; + + __asm ("ftst%.x %1\n" + "fmove%.l %/fpsr, %0" + : "=dm" (fpsr) : "f" (value)); + if (fpsr & (7 << 24)) + { + /* Not finite or zero. */ + *expptr = 0; + return value; + } + __asm ("fgetexp%.x %1, %0" : "=f" (exponent) : "f" (value)); + iexponent = (int) exponent + 1; + *expptr = iexponent; + /* Unnormalized numbers must be handled specially, otherwise fscale + results in overflow. */ + if (iexponent <= -16384) + { + value *= 0x1p16383L; + iexponent += 16383; + } + else if (iexponent >= 16384) + { + value *= 0x1p-16383L; + iexponent -= 16383; + } + + __asm ("fscale%.l %2, %0" + : "=f" (mantissa) + : "0" (value), "dmi" (-iexponent)); + return mantissa; +} + +weak_alias (__frexpl, frexpl) From 66f558e194c1a6a760381037e65a23b01709e27a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 26 Jun 2003 17:00:37 +0000 Subject: [PATCH 3139/4487] Define _STATBUF_ST_NSEC. --- sysdeps/unix/sysv/linux/m68k/bits/stat.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/unix/sysv/linux/m68k/bits/stat.h b/sysdeps/unix/sysv/linux/m68k/bits/stat.h index 3f1f343ad4..dc06b13e2f 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/stat.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/stat.h @@ -132,6 +132,8 @@ struct stat64 /* Tell code we have these members. */ #define _STATBUF_ST_BLKSIZE #define _STATBUF_ST_RDEV +/* Nanosecond resolution time values are supported. */ +#define _STATBUF_ST_NSEC /* Encoding of the file mode. */ From 00dedb1574b4e61a37c3e1d1d1e6432bf36d5f8f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 27 Jun 2003 20:58:22 +0000 Subject: [PATCH 3140/4487] 2003-06-27 Jeroen Dekkers * sysdeps/mach/hurd/alpha/init-first.c: Remove call to __libc_init. * sysdeps/mach/hurd/i386/init-first.c: Likewise. * sysdeps/mach/hurd/mips/init-first.c: Likewise. * sysdeps/mach/hurd/powerpc/init-first.c: Likewise. --- sysdeps/mach/hurd/alpha/init-first.c | 4 +--- sysdeps/mach/hurd/mips/init-first.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/sysdeps/mach/hurd/alpha/init-first.c b/sysdeps/mach/hurd/alpha/init-first.c index e15e2cadef..6e55225890 100644 --- a/sysdeps/mach/hurd/alpha/init-first.c +++ b/sysdeps/mach/hurd/alpha/init-first.c @@ -1,5 +1,5 @@ /* Initialization code run first thing by the ELF startup code. Alpha/Hurd. - Copyright (C) 1995,96,97,98,99,2000,2001,02 Free Software Foundation, Inc. + Copyright (C) 1995,96,97,98,99,2000,01,02,03 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,6 @@ #include "hurdmalloc.h" /* XXX */ extern void __mach_init (void); -extern void __libc_init (int, char **, char **); extern void __init_misc (int, char **, char **); #ifdef USE_NONOPTION_FLAGS extern void __getopt_clean_environment (char **); @@ -72,7 +71,6 @@ posixland_init (int argc, char **argv, char **envp) _dl_non_dynamic_init (); #endif __init_misc (argc, argv, envp); - __libc_init (argc, argv, envp); #ifdef USE_NONOPTION_FLAGS /* This is a hack to make the special getopt in GNU libc working. */ diff --git a/sysdeps/mach/hurd/mips/init-first.c b/sysdeps/mach/hurd/mips/init-first.c index 5f76de7965..6f53e839b3 100644 --- a/sysdeps/mach/hurd/mips/init-first.c +++ b/sysdeps/mach/hurd/mips/init-first.c @@ -1,5 +1,5 @@ /* Initialization code run first thing by the ELF startup code. For Mips/Hurd. - Copyright (C) 1996,1997,1998,2000,2001,2002 Free Software Foundation, Inc. + Copyright (C) 1996,1997,1998,2000,01,02,03 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 @@ -26,7 +26,6 @@ #include "hurdmalloc.h" /* XXX */ extern void __mach_init (void); -extern void __libc_init (int, char **, char **); extern void __init_misc (int, char **, char **); #ifdef USE_NONOPTION_FLAGS extern void __getopt_clean_environment (char **); @@ -114,7 +113,6 @@ init1 (int argc, char *arg0, ...) _dl_non_dynamic_init (); #endif __init_misc (argc, argv, __environ); - __libc_init (argc, argv, __environ); #ifdef USE_NONOPTION_FLAGS /* This is a hack to make the special getopt in GNU libc working. */ From b8ba6f063355f63a7550cb71a52b4d5f4f4062bd Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 30 Jun 2003 09:33:13 +0000 Subject: [PATCH 3141/4487] 2003-06-17 Guido Guenther * sysdeps/unix/sysv/linux/mips/xstatconv.c: Handle STAT_IS_KERNEL_STAT case. (xstat_conv): Rename to __xstat_conv and remove static inline. (xstat64_conv): Likewise. --- sysdeps/unix/sysv/linux/mips/xstatconv.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/xstatconv.c b/sysdeps/unix/sysv/linux/mips/xstatconv.c index b3b7634d3e..41d1cbb768 100644 --- a/sysdeps/unix/sysv/linux/mips/xstatconv.c +++ b/sysdeps/unix/sysv/linux/mips/xstatconv.c @@ -1,5 +1,5 @@ /* Convert between the kernel's `struct stat' format, and libc's. - Copyright (C) 1991,1995,1996,1997,1998,2000 Free Software Foundation, Inc. + Copyright (C) 1991,1995,1996,1997,1998,2000,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 @@ -17,11 +17,22 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include +#include +#include + +#ifdef STAT_IS_KERNEL_STAT + +/* Dummy. */ +struct kernel_stat; + +#else + #include -static inline int -xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf) +int +__xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf) { switch (vers) { @@ -70,8 +81,8 @@ xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf) return 0; } -static inline int -xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf) +int +__xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf) { #ifdef XSTAT_IS_XSTAT64 return xstat_conv (vers, kbuf, ubuf); @@ -118,3 +129,5 @@ xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf) return 0; #endif } + +#endif /* ! STAT_IS_KERNEL_STAT */ From b7978e8d84ad3c66c94cd317b7c47f6872ec5e99 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 30 Jun 2003 23:21:38 +0000 Subject: [PATCH 3142/4487] * sysdeps/alpha/bits/atomic.h (__arch_compare_and_exchange_bool_*_int): Invert the sense of the return value. (__arch_exchange_16_int): Fix paste-o. (__arch_exchange_{32,64}_int): Fix think-o. --- sysdeps/alpha/bits/atomic.h | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/sysdeps/alpha/bits/atomic.h b/sysdeps/alpha/bits/atomic.h index ead76a75aa..073e6508fc 100644 --- a/sysdeps/alpha/bits/atomic.h +++ b/sysdeps/alpha/bits/atomic.h @@ -151,27 +151,27 @@ typedef uintmax_t uatomic_max_t; : "memory"); \ }) -/* For all "bool" routines, we return true if exchange succesful. */ +/* For all "bool" routines, we return FALSE if exchange succesful. */ #define __arch_compare_and_exchange_bool_8_int(mem, new, old, mb1, mb2) \ ({ unsigned long __prev; int __cmp; \ __arch_compare_and_exchange_xxx_8_int(mem, new, old, mb1, mb2); \ - __cmp; }) + !__cmp; }) #define __arch_compare_and_exchange_bool_16_int(mem, new, old, mb1, mb2) \ ({ unsigned long __prev; int __cmp; \ __arch_compare_and_exchange_xxx_16_int(mem, new, old, mb1, mb2); \ - __cmp; }) + !__cmp; }) #define __arch_compare_and_exchange_bool_32_int(mem, new, old, mb1, mb2) \ ({ unsigned long __prev; int __cmp; \ __arch_compare_and_exchange_xxx_32_int(mem, new, old, mb1, mb2); \ - __cmp; }) + !__cmp; }) #define __arch_compare_and_exchange_bool_64_int(mem, new, old, mb1, mb2) \ ({ unsigned long __prev; int __cmp; \ __arch_compare_and_exchange_xxx_64_int(mem, new, old, mb1, mb2); \ - __cmp; }) + !__cmp; }) /* For all "val" routines, return the old value whether exchange successful or not. */ @@ -247,7 +247,7 @@ typedef uintmax_t uatomic_max_t; unsigned long __ret, __tmp, __addr64, __sval; \ __asm__ __volatile__ ( \ mb1 \ - " andnot %[__addr8],7,%[__addr64]\n" \ + " andnot %[__addr16],7,%[__addr64]\n" \ " inswl %[__value],%[__addr16],%[__sval]\n" \ "1: ldq_l %[__tmp],0(%[__addr64])\n" \ " extwl %[__tmp],%[__addr16],%[__ret]\n" \ @@ -271,13 +271,14 @@ typedef uintmax_t uatomic_max_t; __asm__ __volatile__ ( \ mb1 \ "1: ldl_l %[__ret],%[__mem]\n" \ - " mov %[__ret],%[__tmp]\n" \ + " mov %[__val],%[__tmp]\n" \ " stl_c %[__tmp],%[__mem]\n" \ " beq %[__tmp],1b\n" \ mb2 \ : [__ret] "=&r" (__ret), \ [__tmp] "=&r" (__tmp) \ - : [__mem] "m" (*(mem)) \ + : [__mem] "m" (*(mem)), \ + [__val] "Ir" (value) \ : "memory"); \ __ret; }) @@ -287,13 +288,14 @@ typedef uintmax_t uatomic_max_t; __asm__ __volatile__ ( \ mb1 \ "1: ldq_l %[__ret],%[__mem]\n" \ - " mov %[__ret],%[__tmp]\n" \ + " mov %[__val],%[__tmp]\n" \ " stq_c %[__tmp],%[__mem]\n" \ " beq %[__tmp],1b\n" \ mb2 \ : [__ret] "=&r" (__ret), \ [__tmp] "=&r" (__tmp) \ - : [__mem] "m" (*(mem)) \ + : [__mem] "m" (*(mem)), \ + [__val] "Ir" (value) \ : "memory"); \ __ret; }) From 4feb1bb5b668fc555123c8d5f875c8cec706fee2 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 30 Jun 2003 23:21:49 +0000 Subject: [PATCH 3143/4487] * sysdeps/unix/sysv/linux/alpha/clone.S: Load child_tid properly. --- sysdeps/unix/sysv/linux/alpha/clone.S | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S index a0aa7712f5..daa804c3fc 100644 --- a/sysdeps/unix/sysv/linux/alpha/clone.S +++ b/sysdeps/unix/sysv/linux/alpha/clone.S @@ -24,9 +24,13 @@ #define _ERRNO_H 1 #include -/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg, - pid_t *tid, void *tls); - */ +/* int clone(int (*fn)(void *arg), void *child_stack, int flags, + void *arg, pid_t *ptid, void *tls, pid_t *ctid); + + Note that everything past ARG is technically optional, based + on FLAGS, and that CTID is arg 7, and thus is on the stack. + However, since a load from top-of-stack better be legal always, + we don't bother checking FLAGS. */ .text ENTRY(__clone) @@ -51,11 +55,13 @@ ENTRY(__clone) stq a0,0(a1) stq a3,8(a1) - /* Shift the flags, tid and tls arguments into place; the + /* The syscall is of the form clone(flags, usp, ptid, ctid, tls). + Shift the flags, ptid, ctid, tls arguments into place; the child_stack argument is already correct. */ mov a2,a0 mov a4,a2 - mov a5,a3 + ldq a3,0(sp) + mov a5,a4 /* Do the system call. */ ldiq v0,__NR_clone From bba28b0ec03dbe9cdad4ff1a7c56f221537b687a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 1 Jul 2003 19:23:36 +0000 Subject: [PATCH 3144/4487] Initialization code for libpthread on Alpha. --- sysdeps/alpha/nptl/elf/pt-initfini.c | 93 ++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 sysdeps/alpha/nptl/elf/pt-initfini.c diff --git a/sysdeps/alpha/nptl/elf/pt-initfini.c b/sysdeps/alpha/nptl/elf/pt-initfini.c new file mode 100644 index 0000000000..d48c571b7c --- /dev/null +++ b/sysdeps/alpha/nptl/elf/pt-initfini.c @@ -0,0 +1,93 @@ +/* Special .init and .fini section support for Alpha. NPTL version. + Copyright (C) 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. */ + +/* This file is compiled into assembly code which is then munged by a sed + script into two files: crti.s and crtn.s. + + * crti.s puts a function prologue at the beginning of the .init and .fini + sections and defines global symbols for those addresses, so they can be + called as functions. + + * crtn.s puts the corresponding function epilogues in the .init and .fini + sections. + + This differs from what would be generated by the generic code in that + we save and restore the GP within the function. In order for linker + relaxation to work, the value in the GP register on exit from a function + must be valid for the function entry point. Normally, a function is + contained within one object file and this is not an issue, provided + that the function reloads the gp after making any function calls. + However, _init and _fini are constructed from pieces of many object + files, all of which may have different GP values. So we must reload + the GP value from crti.o in crtn.o. */ + +__asm__ (" \n\ +#include \"defs.h\" \n\ + \n\ +/*@HEADER_ENDS*/ \n\ + \n\ +/*@_init_PROLOG_BEGINS*/ \n\ + .section .init, \"ax\", @progbits \n\ + .globl _init \n\ + .ent _init \n\ +_init: \n\ + ldgp $29, 0($27) \n\ + subq $30, 16, $30 \n\ + stq $26, 0($30) \n\ + stq $29, 8($30) \n\ + .prologue 1 \n\ + bsr $26, __pthread_initialize_minimal_internal !samegp \n\ + .align 3 \n\ + .end _init \n\ + .size _init, 0 \n\ +/*@_init_PROLOG_ENDS*/ \n\ + \n\ +/*@_init_EPILOG_BEGINS*/ \n\ + .section .init, \"ax\", @progbits \n\ + ldq $26, 0($30) \n\ + ldq $29, 8($30) \n\ + addq $30, 16, $30 \n\ + ret \n\ +/*@_init_EPILOG_ENDS*/ \n\ + \n\ +/*@_fini_PROLOG_BEGINS*/ \n\ + .section .fini, \"ax\", @progbits \n\ + .globl _fini \n\ + .ent _fini \n\ +_fini: \n\ + ldgp $29, 0($27) \n\ + subq $30, 16, $30 \n\ + stq $26, 0($30) \n\ + stq $29, 8($30) \n\ + .prologue 1 \n\ + .align 3 \n\ + .end _fini \n\ + .size _fini, 0 \n\ +/*@_fini_PROLOG_ENDS*/ \n\ + \n\ +/*@_fini_EPILOG_BEGINS*/ \n\ + .section .fini, \"ax\", @progbits \n\ + ldq $26, 0($30) \n\ + ldq $29, 8($30) \n\ + addq $30, 16, $30 \n\ + ret \n\ +/*@_fini_EPILOG_ENDS*/ \n\ + \n\ +/*@TRAILER_BEGINS*/ \n\ +"); From 81b6201ae0ebaaa8a63b8caff5285b74488a48eb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 1 Jul 2003 19:24:33 +0000 Subject: [PATCH 3145/4487] Spinlock implementation for Alpha. --- sysdeps/alpha/nptl/pthread_spin_lock.S | 45 ++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 sysdeps/alpha/nptl/pthread_spin_lock.S diff --git a/sysdeps/alpha/nptl/pthread_spin_lock.S b/sysdeps/alpha/nptl/pthread_spin_lock.S new file mode 100644 index 0000000000..ce6cd41a42 --- /dev/null +++ b/sysdeps/alpha/nptl/pthread_spin_lock.S @@ -0,0 +1,45 @@ +/* Copyright (C) 2003 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson , 2003. + + 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. */ + + + .text + .align 4 + + .globl pthread_spin_lock + .ent pthread_spin_lock +pthread_spin_lock: + .frame $sp, 0, $26, 0 + .prologue 0 + +0: ldl_l $1, 0($16) + lda $2, 1 + lda $0, 0 + bne $1, 1f + + stl_c $2, 0($16) + beq $2, 1f + mb + ret + +1: ldl $1, 0($16) + bne $1, 1b + unop + br 0b + + .end pthread_spin_lock From 29da0ceb72520e45a37b591c37292175f1bdfd58 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 1 Jul 2003 19:24:47 +0000 Subject: [PATCH 3146/4487] Spinlock trylock implementation for Alpha. --- sysdeps/alpha/nptl/pthread_spin_trylock.S | 46 +++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 sysdeps/alpha/nptl/pthread_spin_trylock.S diff --git a/sysdeps/alpha/nptl/pthread_spin_trylock.S b/sysdeps/alpha/nptl/pthread_spin_trylock.S new file mode 100644 index 0000000000..0948da698b --- /dev/null +++ b/sysdeps/alpha/nptl/pthread_spin_trylock.S @@ -0,0 +1,46 @@ +/* Copyright (C) 2003 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson , 2003. + + 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. */ + + +#define _ERRNO_H 1 +#include + + .text + .align 4 + + .globl pthread_spin_trylock + .ent pthread_spin_trylock +pthread_spin_trylock: + .frame $sp, 0, $26, 0 + .prologue 0 + +0: ldl_l $1, 0($16) + lda $2, 1 + lda $0, EBUSY + bne $1, 1f + + stl_c $2, 0($16) + beq $2, 2f + mb + lda $0, 0 + +1: ret +2: br 0b + + .end pthread_spin_trylock From c1b42f805231aac77bee7a6f0bed80d636b8f686 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 1 Jul 2003 19:25:02 +0000 Subject: [PATCH 3147/4487] General definition for libpthread on Alpha. --- sysdeps/alpha/nptl/pthreaddef.h | 38 +++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 sysdeps/alpha/nptl/pthreaddef.h diff --git a/sysdeps/alpha/nptl/pthreaddef.h b/sysdeps/alpha/nptl/pthreaddef.h new file mode 100644 index 0000000000..26c4daf7b3 --- /dev/null +++ b/sysdeps/alpha/nptl/pthreaddef.h @@ -0,0 +1,38 @@ +/* Copyright (C) 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. */ + +/* Default stack size. */ +#define ARCH_STACK_DEFAULT_SIZE (4 * 1024 * 1024) + +/* Required stack pointer alignment at beginning. The ABI requires 16. */ +#define STACK_ALIGN 16 + +/* Minimal stack size after allocating thread descriptor and guard size. */ +#define MINIMAL_REST_STACK 4096 + +/* Alignment requirement for TCB. */ +#define TCB_ALIGNMENT 16 + +/* Location of current stack frame. */ +#define CURRENT_STACK_FRAME __builtin_frame_address (0) + +/* XXX Until we have a better place keep the definitions here. */ + +/* While there is no such syscall. */ +#define __exit_thread_inline(val) \ + INLINE_SYSCALL (exit, 1, (val)) From cb9d4969c949144a16a570c665a85e5c4e1f8712 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 1 Jul 2003 19:25:32 +0000 Subject: [PATCH 3148/4487] libthread_db interface to map LWP ID to thread for Alpha. --- sysdeps/alpha/nptl/td_ta_map_lwp2thr.c | 46 ++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 sysdeps/alpha/nptl/td_ta_map_lwp2thr.c diff --git a/sysdeps/alpha/nptl/td_ta_map_lwp2thr.c b/sysdeps/alpha/nptl/td_ta_map_lwp2thr.c new file mode 100644 index 0000000000..b30b10b123 --- /dev/null +++ b/sysdeps/alpha/nptl/td_ta_map_lwp2thr.c @@ -0,0 +1,46 @@ +/* Which thread is running on an LWP? PowerPC version. + Copyright (C) 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. */ + +#include "thread_dbP.h" +#include + + +td_err_e +td_ta_map_lwp2thr (const td_thragent_t *ta, lwpid_t lwpid, td_thrhandle_t *th) +{ + LOG ("td_ta_map_lwp2thr"); + + /* Test whether the TA parameter is ok. */ + if (! ta_ok (ta)) + return TD_BADTA; + + prgregset_t regs; + if (ps_lgetregs (ta->ph, lwpid, regs) != PS_OK) + return TD_ERR; + + /* The uniq value is stored in slot 33 in recent gdb; it isn't stored + anywhere otherwise. */ + th->th_unique = ((void *) regs[32] + - TLS_TCB_OFFSET - TLS_TCB_SIZE - TLS_PRE_TCB_SIZE); + + /* Found it. Now complete the `td_thrhandle_t' object. */ + th->th_ta_p = (td_thragent_t *) ta; + + return TD_OK; +} From 690359671c74d2081c12b30d2c522fec50ae55b1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 1 Jul 2003 19:25:45 +0000 Subject: [PATCH 3149/4487] TLS access definitions for Alpha. --- sysdeps/alpha/nptl/tls.h | 146 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 146 insertions(+) create mode 100644 sysdeps/alpha/nptl/tls.h diff --git a/sysdeps/alpha/nptl/tls.h b/sysdeps/alpha/nptl/tls.h new file mode 100644 index 0000000000..1718b3e466 --- /dev/null +++ b/sysdeps/alpha/nptl/tls.h @@ -0,0 +1,146 @@ +/* Definition for thread-local data handling. NPTL/Alpha version. + Copyright (C) 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 _TLS_H +#define _TLS_H 1 + +# include + +#ifndef __ASSEMBLER__ +# include +# include + +/* Type for the dtv. */ +typedef union dtv +{ + size_t counter; + void *pointer; +} dtv_t; + +#else /* __ASSEMBLER__ */ +# include +#endif /* __ASSEMBLER__ */ + + +/* We require TLS support in the tools. */ +#ifndef HAVE_TLS_SUPPORT +# error "TLS support is required." +#endif + +/* Signal that TLS support is available. */ +# define USE_TLS 1 + +#ifndef __ASSEMBLER__ + +/* Get system call information. */ +# include + +/* The TP points to the start of the thread blocks. */ +# define TLS_DTV_AT_TP 1 + +/* Get the thread descriptor definition. */ +# include + +/* This layout is actually wholly private and not affected by the ABI. + Nor does it overlap the pthread data structure, so we need nothing + extra here at all. */ +typedef struct +{ + dtv_t *dtv; +} tcbhead_t; + +/* This is the size of the initial TCB. */ +# define TLS_INIT_TCB_SIZE 0 + +/* Alignment requirements for the initial TCB. */ +# define TLS_INIT_TCB_ALIGN __alignof__ (struct pthread) + +/* This is the size of the TCB. */ +# define TLS_TCB_SIZE 0 + +/* Alignment requirements for the TCB. */ +# define TLS_TCB_ALIGN __alignof__ (struct pthread) + +/* This is the size we need before TCB. */ +# define TLS_PRE_TCB_SIZE \ + (sizeof (struct pthread) \ + + ((sizeof (tcbhead_t) + TLS_TCB_ALIGN - 1) & ~(TLS_TCB_ALIGN - 1))) + +/* The following assumes that TP (R2 or R13) points to the end of the + TCB + 0x7000 (per the ABI). This implies that TCB address is + TP - 0x7000. As we define TLS_DTV_AT_TP we can + assume that the pthread struct is allocated immediately ahead of the + TCB. This implies that the pthread_descr address is + TP - (TLS_PRE_TCB_SIZE + 0x7000). */ +/* ??? PPC uses offset 0x7000; seems like a good idea for alpha too, + but binutils not yet changed to match. */ +# define TLS_TCB_OFFSET 0 + +/* Install the dtv pointer. The pointer passed is to the element with + index -1 which contain the length. */ +# define INSTALL_DTV(tcbp, dtvp) \ + ((tcbhead_t *) (tcbp))[-1].dtv = dtvp + 1 + +/* Install new dtv for current thread. */ +# define INSTALL_NEW_DTV(dtv) (THREAD_DTV() = (dtv)) + +/* Return dtv of given thread descriptor. */ +# define GET_DTV(tcbp) (((tcbhead_t *) (tcbp))[-1].dtv) + +/* Code to initially initialize the thread pointer. This might need + special attention since 'errno' is not yet available and if the + operation can cause a failure 'errno' must not be touched. */ +# define TLS_INIT_TP(tcbp, secondcall) \ + (__builtin_set_thread_pointer ((void *) (tcbp) + TLS_TCB_OFFSET), NULL) + +/* Return the address of the dtv for the current thread. */ +# define THREAD_DTV() \ + (((tcbhead_t *) (__builtin_thread_pointer () - TLS_TCB_OFFSET))[-1].dtv) + +/* Return the thread descriptor for the current thread. */ +# define THREAD_SELF \ + ((struct pthread *) (__builtin_thread_pointer () \ + - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE)) + +/* Identifier for the current thread. THREAD_SELF is usable but + sometimes more expensive than necessary as in this case. */ +# define THREAD_ID (__builtin_thread_pointer ()) + +/* Read member of the thread descriptor directly. */ +# define THREAD_GETMEM(descr, member) ((void)(descr), (THREAD_SELF)->member) + +/* Same as THREAD_GETMEM, but the member offset can be non-constant. */ +# define THREAD_GETMEM_NC(descr, member, idx) \ + ((void)(descr), (THREAD_SELF)->member[idx]) + +/* Set member of the thread descriptor directly. */ +# define THREAD_SETMEM(descr, member, value) \ + ((void)(descr), (THREAD_SELF)->member = (value)) + +/* Same as THREAD_SETMEM, but the member offset can be non-constant. */ +# define THREAD_SETMEM_NC(descr, member, idx, value) \ + ((void)(descr), (THREAD_SELF)->member[idx] = (value)) + +/* l_tls_offset == 0 is perfectly valid on PPC, so we have to use some + different value to mean unset l_tls_offset. */ +# define NO_TLS_OFFSET -1 + +#endif /* __ASSEMBLER__ */ + +#endif /* tls.h */ From 10578c2ed31d899fd93fda0b2cd2aa305c7832c9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 1 Jul 2003 20:19:46 +0000 Subject: [PATCH 3150/4487] Makefile for nptl on Alpha. --- sysdeps/unix/sysv/linux/alpha/nptl/Makefile | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/nptl/Makefile diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/Makefile b/sysdeps/unix/sysv/linux/alpha/nptl/Makefile new file mode 100644 index 0000000000..8c80840798 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/nptl/Makefile @@ -0,0 +1,2 @@ +# pull in __syscall_error routine, __sigprocmask, __syscall_rt_sigaction +libpthread-routines += ptw-sysdep ptw-sigprocmask ptw-rt_sigaction From 77e4ae304e999ede40501311f103337b127c4f71 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 1 Jul 2003 20:20:04 +0000 Subject: [PATCH 3151/4487] Public type definitions for nptl on Alpha. --- .../sysv/linux/alpha/nptl/bits/pthreadtypes.h | 155 ++++++++++++++++++ 1 file changed, 155 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h new file mode 100644 index 0000000000..bd5ab9706c --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h @@ -0,0 +1,155 @@ +/* Machine-specific pthread type layouts. Alpha version. + Copyright (C) 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_PTHREADTYPES_H +#define _BITS_PTHREADTYPES_H 1 + +#define __SIZEOF_PTHREAD_ATTR_T 56 +#define __SIZEOF_PTHREAD_MUTEX_T 40 +#define __SIZEOF_PTHREAD_MUTEXATTR_T 4 +#define __SIZEOF_PTHREAD_COND_T 48 +#define __SIZEOF_PTHREAD_CONDATTR_T 4 +#define __SIZEOF_PTHREAD_RWLOCK_T 56 +#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 +#define __SIZEOF_PTHREAD_BARRIER_T 32 +#define __SIZEOF_PTHREAD_BARRIERATTR_T 4 + + +/* Thread identifiers. The structure of the attribute type is + deliberately not exposed. */ +typedef struct __opaque_pthread *pthread_t; + + +typedef union +{ + char __size[__SIZEOF_PTHREAD_ATTR_T]; + long int __align; +} pthread_attr_t; + + +/* Data structures for mutex handling. The structure of the attribute + type is deliberately not exposed. */ +typedef union +{ + struct + { + int __lock; + unsigned int __count; + int __owner; + unsigned int __nusers; + /* KIND must stay at this position in the structure to maintain + binary compatibility. */ + int __kind; + } __data; + char __size[__SIZEOF_PTHREAD_MUTEX_T]; + long int __align; +} pthread_mutex_t; + +typedef union +{ + char __size[__SIZEOF_PTHREAD_MUTEXATTR_T]; + int __align; +} pthread_mutexattr_t; + + +/* Data structure for conditional variable handling. The structure of + the attribute type is deliberately not exposed. */ +typedef union +{ + struct + { + int __lock; + int __clock; + unsigned long long int __total_seq; + unsigned long long int __wakeup_seq; + unsigned long long int __woken_seq; + void *__mutex; + } __data; + char __size[__SIZEOF_PTHREAD_COND_T]; + long long int __align; +} pthread_cond_t; + +typedef union +{ + char __size[__SIZEOF_PTHREAD_CONDATTR_T]; + int __align; +} pthread_condattr_t; + + +/* Keys for thread-specific data */ +typedef unsigned int pthread_key_t; + + +/* Once-only execution */ +typedef int pthread_once_t; + + +#ifdef __USE_UNIX98 +/* Data structure for read-write lock variable handling. The + structure of the attribute type is deliberately not exposed. */ +typedef union +{ + struct + { + int __lock; + unsigned int __nr_readers; + unsigned int __readers_wakeup; + unsigned int __writer_wakeup; + unsigned int __nr_readers_queued; + unsigned int __nr_writers_queued; + int __writer; + + unsigned int __reserved[6]; + /* FLAGS must stay at this position in the structure to maintain + binary compatibility. */ + unsigned int __flags; + } __data; + char __size[__SIZEOF_PTHREAD_RWLOCK_T]; + long int __align; +} pthread_rwlock_t; + +typedef union +{ + char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T]; + long int __align; +} pthread_rwlockattr_t; +#endif + + +#ifdef __USE_XOPEN2K +/* POSIX spinlock data type. */ +typedef volatile int pthread_spinlock_t; + +/* POSIX barriers data type. The structure of the type is + deliberately not exposed. */ +typedef union +{ + char __size[__SIZEOF_PTHREAD_BARRIER_T]; + long int __align; +} pthread_barrier_t; + +typedef union +{ + char __size[__SIZEOF_PTHREAD_BARRIERATTR_T]; + int __align; +} pthread_barrierattr_t; +#endif + + +#endif /* bits/pthreadtypes.h */ From 707cd6ca79d5982271bbd106f31f128bfa1d6ffc Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 1 Jul 2003 20:20:19 +0000 Subject: [PATCH 3152/4487] Public semaphore type definitions for Alpha. --- .../sysv/linux/alpha/nptl/bits/semaphore.h | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/nptl/bits/semaphore.h diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/semaphore.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/semaphore.h new file mode 100644 index 0000000000..65298fae48 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/semaphore.h @@ -0,0 +1,37 @@ +/* Machine-specific POSIX semaphore type layouts. Alpha version. + Copyright (C) 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 _SEMAPHORE_H +# error "Never use directly; include instead." +#endif + +# define __SIZEOF_SEM_T 32 + +/* Value returned if `sem_open' failed. */ +#define SEM_FAILED ((sem_t *) 0) + +/* Maximum value the semaphore can have. */ +#define SEM_VALUE_MAX ((int) ((~0u) >> 1)) + + +typedef union +{ + char __size[__SIZEOF_SEM_T]; + long int __align; +} sem_t; From 877333746e138a130224af9033ebde1018fcf112 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 1 Jul 2003 20:20:36 +0000 Subject: [PATCH 3153/4487] Alpha specific nptl code to start thread. --- .../unix/sysv/linux/alpha/nptl/createthread.c | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/nptl/createthread.c diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/createthread.c b/sysdeps/unix/sysv/linux/alpha/nptl/createthread.c new file mode 100644 index 0000000000..b29c57b52a --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/nptl/createthread.c @@ -0,0 +1,24 @@ +/* Copyright (C) 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. */ + +/* Value passed to 'clone' for initialization of the thread register. */ +#define TLS_VALUE ((void *) (pd) \ + + TLS_TCB_OFFSET + TLS_PRE_TCB_SIZE) + +/* Get the real implementation. */ +#include From f34839aa4d36697094637fa11c2c1e7aae7bda47 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 1 Jul 2003 20:20:57 +0000 Subject: [PATCH 3154/4487] Alpha specific fork in nptl on Alpha. --- sysdeps/unix/sysv/linux/alpha/nptl/fork.c | 30 +++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/nptl/fork.c diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/fork.c b/sysdeps/unix/sysv/linux/alpha/nptl/fork.c new file mode 100644 index 0000000000..ca85fc008f --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/nptl/fork.c @@ -0,0 +1,30 @@ +/* Copyright (C) 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. */ + +#include +#include +#include +#include + + +#define ARCH_FORK() \ + INLINE_SYSCALL (clone, 5, \ + CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID | SIGCHLD, \ + NULL, NULL, &THREAD_SELF->tid, NULL) + +#include "../fork.c" From 92f7ea1cbca33674edcaae8079ee80248253ef99 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 1 Jul 2003 20:21:32 +0000 Subject: [PATCH 3155/4487] Low level lock definitions for nptl on Alpha. --- .../unix/sysv/linux/alpha/nptl/lowlevellock.h | 218 ++++++++++++++++++ 1 file changed, 218 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h new file mode 100644 index 0000000000..e286ef36cb --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h @@ -0,0 +1,218 @@ +/* Copyright (C) 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 Libr \ary; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _LOWLEVELLOCK_H +#define _LOWLEVELLOCK_H 1 + +#include +#include +#include +#include + + +#define __NR_futex 394 +#define FUTEX_WAIT 0 +#define FUTEX_WAKE 1 +#define FUTEX_REQUEUE 3 + +/* Initializer for compatibility lock. */ +#define LLL_MUTEX_LOCK_INITIALIZER (0) + +#define lll_futex_wait(futexp, val) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + __ret = INTERNAL_SYSCALL (futex, __err, 4, \ + (futexp), FUTEX_WAIT, (val), 0); \ + INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret: 0; \ + }) + +#define lll_futex_timed_wait(futexp, val, timespec) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + __ret = INTERNAL_SYSCALL (futex, __err, 4, \ + (futexp), FUTEX_WAIT, (val), (timespec)); \ + INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret: 0; \ + }) + +#define lll_futex_wake(futexp, nr) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + __ret = INTERNAL_SYSCALL (futex, __err, 4, \ + (futexp), FUTEX_WAKE, (nr), 0); \ + INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret: 0; \ + }) + +#define lll_futex_requeue(futexp, nr_wake, nr_move, mutex) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + \ + __ret = INTERNAL_SYSCALL (futex, __err, 5, \ + (futexp), FUTEX_REQUEUE, (nr_wake), (nr_move), \ + (mutex)); \ + INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret: 0; \ + }) + +/* Set *futex to 1 if it is 0, atomically. Returns the old value */ +#define __lll_trylock(futex) \ + ({ int __oldval, __temp; \ + __asm __volatile ( \ + "1: ldl_l %[__oldval], %[__mem]\n" \ + " lda %[__temp], 1\n" \ + " bne %[__oldval], 2f\n" \ + " stl_c %[__temp], %[__mem]\n" \ + " beq %[__temp], 1b\n" \ + __MB \ + "2:" \ + : [__oldval] "=&r" (__oldval), \ + [__temp] "=&r" (__temp) \ + : [__mem] "m" (*(futex)) \ + : "memory"); \ + __oldval; \ + }) + +#define lll_mutex_trylock(lock) __lll_trylock (&(lock)) + + +extern void __lll_lock_wait (int *futex, int val) attribute_hidden; + +#define lll_mutex_lock(lock) \ + (void) ({ \ + int *__futex = &(lock); \ + int __val = atomic_exchange_and_add (__futex, 1); \ + atomic_full_barrier(); \ + if (__builtin_expect (__val != 0, 0)) \ + __lll_lock_wait (__futex, __val); \ + }) + +#define lll_mutex_cond_lock(lock) \ + (void) ({ \ + int *__futex = &(lock); \ + int __val = atomic_exchange_and_add (__futex, 2); \ + atomic_full_barrier(); \ + if (__builtin_expect (__val != 0, 0)) \ + /* Note, the val + 1 is kind of ugly here. __lll_lock_wait will \ + add 1 again. But we added 2 to the futex value so this is the \ + right value which will be passed to the kernel. */ \ + __lll_lock_wait (__futex, __val + 1); \ + }) + +extern int __lll_timedlock_wait + (int *futex, int val, const struct timespec *) attribute_hidden; + +#define lll_mutex_timedlock(lock, abstime) \ + ({ int *__futex = &(lock); \ + int __val = atomic_exchange_and_add (__futex, 1); \ + atomic_full_barrier(); \ + if (__builtin_expect (__val != 0, 0)) \ + __val = __lll_timedlock_wait (__futex, __val, (abstime)); \ + __val; \ + }) + +#define lll_mutex_unlock(lock) \ + ((void) ({ \ + int *__futex = &(lock), __val; \ + atomic_write_barrier(); \ + __val = atomic_exchange_rel (__futex, 0); \ + if (__builtin_expect (__val > 1, 0)) \ + lll_futex_wake (__futex, 1); \ + })) + +#define lll_mutex_unlock_force(lock) \ + ((void) ({ \ + int *__futex = &(lock); \ + atomic_write_barrier(); \ + *__futex = 0; \ + atomic_full_barrier(); \ + lll_futex_wake (__futex, 1); \ + })) + +#define lll_mutex_islocked(futex) \ + (futex != 0) + + +/* Our internal lock implementation is identical to the binary-compatible + mutex implementation. */ + +/* Type for lock object. */ +typedef int lll_lock_t; + +/* Initializers for lock. */ +#define LLL_LOCK_INITIALIZER (0) +#define LLL_LOCK_INITIALIZER_LOCKED (1) + +extern int lll_unlock_wake_cb (int *__futex) attribute_hidden; + +/* The states of a lock are: + 0 - untaken + 1 - taken by one user + >1 - taken by more users */ + +#define lll_trylock(lock) lll_mutex_trylock (lock) +#define lll_lock(lock) lll_mutex_lock (lock) +#define lll_unlock(lock) lll_mutex_unlock (lock) +#define lll_islocked(lock) lll_mutex_islocked (lock) + +/* The kernel notifies a process which uses CLONE_CLEARTID via futex + wakeup when the clone terminates. The memory location contains the + thread ID while the clone is running and is reset to zero + afterwards. */ +#define lll_wait_tid(tid) \ + do { \ + __typeof (tid) __tid; \ + while ((__tid = (tid)) != 0) \ + lll_futex_wait (&(tid), __tid); \ + } while (0) + +extern int __lll_timedwait_tid (int *, const struct timespec *) + attribute_hidden; + +#define lll_timedwait_tid(tid, abstime) \ + ({ \ + int __res = 0; \ + if ((tid) != 0) \ + __res = __lll_timedwait_tid (&(tid), (abstime)); \ + __res; \ + }) + + +/* Conditional variable handling. */ + +extern void __lll_cond_wait (pthread_cond_t *cond) + attribute_hidden; +extern int __lll_cond_timedwait (pthread_cond_t *cond, + const struct timespec *abstime) + attribute_hidden; +extern void __lll_cond_wake (pthread_cond_t *cond) + attribute_hidden; +extern void __lll_cond_broadcast (pthread_cond_t *cond) + attribute_hidden; + +#define lll_cond_wait(cond) \ + __lll_cond_wait (cond) +#define lll_cond_timedwait(cond, abstime) \ + __lll_cond_timedwait (cond, abstime) +#define lll_cond_wake(cond) \ + __lll_cond_wake (cond) +#define lll_cond_broadcast(cond) \ + __lll_cond_broadcast (cond) + +#endif /* lowlevellock.h */ From a06fb001ba2291fec7f2c761ef4f8175e67bc2d9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 1 Jul 2003 20:21:45 +0000 Subject: [PATCH 3156/4487] vfork implementation for nptl on Alpha. --- sysdeps/unix/sysv/linux/alpha/nptl/pt-vfork.S | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/nptl/pt-vfork.S diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/pt-vfork.S b/sysdeps/unix/sysv/linux/alpha/nptl/pt-vfork.S new file mode 100644 index 0000000000..4a2df4255b --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/nptl/pt-vfork.S @@ -0,0 +1,25 @@ +/* Copyright (C) 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. */ + +#include + +PSEUDO(__vfork, vfork, 0) + ret +PSEUDO_END (__vfork) + +weak_alias (__vfork, vfork) From 3b47913dc896067c471819aee46f90a45cc8c346 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 1 Jul 2003 20:22:10 +0000 Subject: [PATCH 3157/4487] pthread_once implementation for nptl on Alpha. --- .../unix/sysv/linux/alpha/nptl/pthread_once.c | 96 +++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c b/sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c new file mode 100644 index 0000000000..82f72de8b3 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c @@ -0,0 +1,96 @@ +/* Copyright (C) 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. */ + +#include "pthreadP.h" +#include + + +unsigned long int __fork_generation attribute_hidden; + +static void +clear_once_control (void *arg) +{ + pthread_once_t *once_control = (pthread_once_t *) arg; + + *once_control = 0; + lll_futex_wake (once_control, INT_MAX); +} + +int +__pthread_once (pthread_once_t *once_control, void (*init_routine) (void)) +{ + for (;;) + { + int oldval; + int newval; + int tmp; + + /* Pseudo code: + newval = __fork_generation | 1; + oldval = *once_control; + if ((oldval & 2) == 0) + *once_control = newval; + Do this atomically. + */ + newval = __fork_generation | 1; + __asm __volatile ( + "1: ldl_l %0, %2\n" + " and %0, 2, %1\n" + " bne %1, 2f\n" + " mov %3, %1\n" + " stl_c %1, %2\n" + " beq %1, 1b\n" + "2: mb" + : "=&r" (oldval), "=&r" (tmp), "=m" (*once_control) + : "r" (newval), "m" (*once_control)); + + /* Check if the initializer has already been done. */ + if ((oldval & 2) != 0) + return 0; + + /* Check if another thread already runs the initializer. */ + if ((oldval & 1) == 0) + break; + + /* Check whether the initializer execution was interrupted by a fork. */ + if (oldval != newval) + break; + + /* Same generation, some other thread was faster. Wait. */ + lll_futex_wait (once_control, oldval); + } + + /* This thread is the first here. Do the initialization. + Register a cleanup handler so that in case the thread gets + interrupted the initialization can be restarted. */ + pthread_cleanup_push (clear_once_control, once_control); + + init_routine (); + + pthread_cleanup_pop (0); + + /* Add one to *once_control to take the bottom 2 bits from 01 to 10. */ + atomic_exchange_and_add (once_control, 1); + + /* Wake up all other threads. */ + lll_futex_wake (once_control, INT_MAX); + + return 0; +} +weak_alias (__pthread_once, pthread_once) +strong_alias (__pthread_once, __pthread_once_internal) From 22c9b5efb9049eb0c9121e285e287df89206ffbb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 1 Jul 2003 20:22:23 +0000 Subject: [PATCH 3158/4487] sem_post implementation for nptl on Alpha. --- sysdeps/unix/sysv/linux/alpha/nptl/sem_post.c | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/nptl/sem_post.c diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/sem_post.c b/sysdeps/unix/sysv/linux/alpha/nptl/sem_post.c new file mode 100644 index 0000000000..27fd817e65 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/nptl/sem_post.c @@ -0,0 +1,5 @@ +/* ??? This is an ass-backwards way to do this. We should simply define + the acquire/release semantics of atomic_exchange_and_add. And even if + we don't do this, we should be using atomic_full_barrier or otherwise. */ +#define __lll_rel_instr "mb" +#include "../sem_post.c" From 5400aba69960de9b2b2f535e1aae27627438c2a1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 1 Jul 2003 20:22:49 +0000 Subject: [PATCH 3159/4487] Asm macros for definition of cancelable syscall wrappers for nptl on Alpha. --- .../sysv/linux/alpha/nptl/sysdep-cancel.h | 157 ++++++++++++++++++ 1 file changed, 157 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h new file mode 100644 index 0000000000..1b27e27db0 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h @@ -0,0 +1,157 @@ +/* Copyright (C) 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. */ + +#include +#include +#ifndef __ASSEMBLER__ +# include +#endif + +#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt + +# ifdef PROF +# define PSEUDO_PROF \ + .set noat; \ + lda AT, _mcount; \ + jsr AT, (AT), _mcount; \ + .set at +# else +# define PSEUDO_PROF +# endif + +/* ??? Assumes that nothing comes between PSEUDO and PSEUDO_END + besides "ret". */ + +# undef PSEUDO +# define PSEUDO(name, syscall_name, args) \ + .globl name; \ + .align 4; \ + .type name, @function; \ + .usepv name, std; \ + cfi_startproc; \ +__LABEL(name) \ + ldgp gp, 0(pv); \ + PSEUDO_PROF; \ + PSEUDO_PREPARE_ARGS \ + SINGLE_THREAD_P(t0); \ + bne t0, $pseudo_cancel; \ + lda v0, SYS_ify(syscall_name); \ + call_pal PAL_callsys; \ + bne a3, SYSCALL_ERROR_LABEL; \ +__LABEL($pseudo_ret) \ + .subsection 2; \ +__LABEL($pseudo_cancel) \ + subq sp, 64, sp; \ + cfi_def_cfa_offset(64); \ + stq ra, 0(sp); \ + cfi_offset(ra, -64); \ + SAVE_ARGS_##args; \ + CENABLE; \ + LOAD_ARGS_##args; \ + lda v0, SYS_ify(syscall_name); \ + call_pal PAL_callsys; \ + stq v0, 8(sp); \ + bne a3, $multi_error; \ + CDISABLE; \ + ldq ra, 0(sp); \ + ldq v0, 8(sp); \ + addq sp, 64, sp; \ + cfi_remember_state; \ + cfi_restore(ra); \ + cfi_def_cfa_offset(0); \ + ret; \ + cfi_restore_state; \ +__LABEL($multi_error) \ + CDISABLE; \ + ldq ra, 0(sp); \ + ldq v0, 8(sp); \ + addq sp, 64, sp; \ + cfi_restore(ra); \ + cfi_def_cfa_offset(0); \ +__LABEL($syscall_error) \ + SYSCALL_ERROR_HANDLER; \ + .previous + +# undef PSEUDO_END +# define PSEUDO_END(sym) \ + .subsection 2; \ + cfi_endproc; \ + .size sym, .-sym + +# define SAVE_ARGS_0 /* Nothing. */ +# define SAVE_ARGS_1 SAVE_ARGS_0; stq a0, 8(sp) +# define SAVE_ARGS_2 SAVE_ARGS_1; stq a1, 16(sp) +# define SAVE_ARGS_3 SAVE_ARGS_2; stq a2, 24(sp) +# define SAVE_ARGS_4 SAVE_ARGS_3; stq a3, 32(sp) +# define SAVE_ARGS_5 SAVE_ARGS_4; stq a4, 40(sp) +# define SAVE_ARGS_6 SAVE_ARGS_5; stq a5, 48(sp) + +# define LOAD_ARGS_0 /* Nothing. */ +# define LOAD_ARGS_1 LOAD_ARGS_0; ldq a0, 8(sp) +# define LOAD_ARGS_2 LOAD_ARGS_1; ldq a1, 16(sp) +# define LOAD_ARGS_3 LOAD_ARGS_2; ldq a2, 24(sp) +# define LOAD_ARGS_4 LOAD_ARGS_3; ldq a3, 32(sp) +# define LOAD_ARGS_5 LOAD_ARGS_4; ldq a4, 40(sp) +# define LOAD_ARGS_6 LOAD_ARGS_5; ldq a5, 48(sp) + +# ifdef IS_IN_libpthread +# define __local_enable_asynccancel __pthread_enable_asynccancel +# define __local_disable_asynccancel __pthread_disable_asynccancel +# define __local_multiple_threads __pthread_multiple_threads +# elif !defined NOT_IN_libc +# define __local_enable_asynccancel __libc_enable_asynccancel +# define __local_disable_asynccancel __libc_disable_asynccancel +# define __local_multiple_threads __libc_multiple_threads +# elif defined IS_IN_librt +# define __local_enable_asynccancel __librt_enable_asynccancel +# define __local_disable_asynccancel __librt_disable_asynccancel +# else +# error Unsupported library +# endif + +# ifdef PIC +# define CENABLE bsr ra, __local_enable_asynccancel !samegp +# define CDISABLE bsr ra, __local_disable_asynccancel !samegp +# else +# define CENABLE jsr ra, __local_enable_asynccancel; ldgp ra, 0(gp) +# define CDISABLE jsr ra, __local_disable_asynccancel; ldgp ra, 0(gp) +# endif + +# if defined IS_IN_libpthread || !defined NOT_IN_libc +# ifndef __ASSEMBLER__ +extern int __local_multiple_threads attribute_hidden; +# define SINGLE_THREAD_P \ + __builtin_expect (__local_multiple_threads == 0, 1) +# elif defined(PIC) +# define SINGLE_THREAD_P(reg) ldl reg, __local_multiple_threads(gp) !gprel +# else +# define SINGLE_THREAD_P(reg) \ + ldah reg, __local_multiple_threads(gp) !gprelhigh; \ + ldl reg, __local_multiple_threads(reg) !gprellow +# endif +# else +# ifndef __ASSEMBLER__ +# define SINGLE_THREAD_P \ + __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ + header.multiple_threads) == 0, 1) +# else +# error Not done +# endif +# endif + +#endif From ee13e79fc845ee41a9fe60a41dab23436c7cebca Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sat, 5 Jul 2003 22:56:39 +0000 Subject: [PATCH 3160/4487] * sysdeps/alpha/elf/initfini.c: Avoid .ent/.end. * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end. --- sysdeps/alpha/elf/initfini.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/sysdeps/alpha/elf/initfini.c b/sysdeps/alpha/elf/initfini.c index 6c4d04b38c..5da7dc687f 100644 --- a/sysdeps/alpha/elf/initfini.c +++ b/sysdeps/alpha/elf/initfini.c @@ -1,5 +1,5 @@ /* Special .init and .fini section support for Alpha. - Copyright (C) 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 2001, 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 @@ -45,21 +45,19 @@ __asm__ (" \n\ /*@_init_PROLOG_BEGINS*/ \n\ .section .init, \"ax\", @progbits \n\ .globl _init \n\ - .ent _init \n\ + .type _init, @function \n\ + .usepv _init, std \n\ _init: \n\ ldgp $29, 0($27) \n\ subq $30, 16, $30 \n\ lda $27, __gmon_start__ \n\ stq $26, 0($30) \n\ stq $29, 8($30) \n\ - .prologue 1 \n\ beq $27, 1f \n\ jsr $26, ($27), __gmon_start__ \n\ ldq $29, 8($30) \n\ .align 3 \n\ 1: \n\ - .end _init \n\ - .size _init, 0 \n\ /*@_init_PROLOG_ENDS*/ \n\ \n\ /*@_init_EPILOG_BEGINS*/ \n\ @@ -73,16 +71,14 @@ _init: \n\ /*@_fini_PROLOG_BEGINS*/ \n\ .section .fini, \"ax\", @progbits \n\ .globl _fini \n\ - .ent _fini \n\ + .type _fini,@function \n\ + .usepv _fini,std \n\ _fini: \n\ ldgp $29, 0($27) \n\ subq $30, 16, $30 \n\ stq $26, 0($30) \n\ stq $29, 8($30) \n\ - .prologue 1 \n\ .align 3 \n\ - .end _fini \n\ - .size _fini, 0 \n\ /*@_fini_PROLOG_ENDS*/ \n\ \n\ /*@_fini_EPILOG_BEGINS*/ \n\ From 16fc430a76011b5cb4a443585341f3d46e502b35 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 8 Jul 2003 03:41:53 +0000 Subject: [PATCH 3161/4487] Avoid .ent/.end. --- sysdeps/alpha/nptl/elf/pt-initfini.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/sysdeps/alpha/nptl/elf/pt-initfini.c b/sysdeps/alpha/nptl/elf/pt-initfini.c index d48c571b7c..ba2e419d61 100644 --- a/sysdeps/alpha/nptl/elf/pt-initfini.c +++ b/sysdeps/alpha/nptl/elf/pt-initfini.c @@ -45,17 +45,15 @@ __asm__ (" \n\ /*@_init_PROLOG_BEGINS*/ \n\ .section .init, \"ax\", @progbits \n\ .globl _init \n\ - .ent _init \n\ + .type _init,@function \n\ + .usepv _init,std \n\ _init: \n\ ldgp $29, 0($27) \n\ subq $30, 16, $30 \n\ stq $26, 0($30) \n\ stq $29, 8($30) \n\ - .prologue 1 \n\ bsr $26, __pthread_initialize_minimal_internal !samegp \n\ .align 3 \n\ - .end _init \n\ - .size _init, 0 \n\ /*@_init_PROLOG_ENDS*/ \n\ \n\ /*@_init_EPILOG_BEGINS*/ \n\ @@ -69,16 +67,14 @@ _init: \n\ /*@_fini_PROLOG_BEGINS*/ \n\ .section .fini, \"ax\", @progbits \n\ .globl _fini \n\ - .ent _fini \n\ + .type _fini,@function \n\ + .usepv _fini,std \n\ _fini: \n\ ldgp $29, 0($27) \n\ subq $30, 16, $30 \n\ stq $26, 0($30) \n\ stq $29, 8($30) \n\ - .prologue 1 \n\ .align 3 \n\ - .end _fini \n\ - .size _fini, 0 \n\ /*@_fini_PROLOG_ENDS*/ \n\ \n\ /*@_fini_EPILOG_BEGINS*/ \n\ From dc7d6605c8b7852c3bbcb0fe33e3adb8a983d00a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 8 Jul 2003 03:42:27 +0000 Subject: [PATCH 3162/4487] (lll_futex_wait, lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success return actual return value from the syscall, not 0. --- sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h index e286ef36cb..cc054f9ef3 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h @@ -39,7 +39,7 @@ long int __ret; \ __ret = INTERNAL_SYSCALL (futex, __err, 4, \ (futexp), FUTEX_WAIT, (val), 0); \ - INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret: 0; \ + INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret : __ret; \ }) #define lll_futex_timed_wait(futexp, val, timespec) \ @@ -48,7 +48,7 @@ long int __ret; \ __ret = INTERNAL_SYSCALL (futex, __err, 4, \ (futexp), FUTEX_WAIT, (val), (timespec)); \ - INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret: 0; \ + INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret : __ret; \ }) #define lll_futex_wake(futexp, nr) \ @@ -57,18 +57,17 @@ long int __ret; \ __ret = INTERNAL_SYSCALL (futex, __err, 4, \ (futexp), FUTEX_WAKE, (nr), 0); \ - INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret: 0; \ + INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret : __ret; \ }) #define lll_futex_requeue(futexp, nr_wake, nr_move, mutex) \ ({ \ INTERNAL_SYSCALL_DECL (__err); \ long int __ret; \ - \ __ret = INTERNAL_SYSCALL (futex, __err, 5, \ (futexp), FUTEX_REQUEUE, (nr_wake), (nr_move), \ (mutex)); \ - INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret: 0; \ + INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret : __ret; \ }) /* Set *futex to 1 if it is 0, atomically. Returns the old value */ From 4bdf10e33494aee01d4362947e05dd63791b980d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 10 Jul 2003 09:22:13 +0000 Subject: [PATCH 3163/4487] Remove CLFAGS-.oS addition. --- sysdeps/m68k/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile index 68dc258406..fab6bd5837 100644 --- a/sysdeps/m68k/Makefile +++ b/sysdeps/m68k/Makefile @@ -26,7 +26,6 @@ endif asm-CPPFLAGS += $(m68k-syntax-flag) pic-ccflag = -fpic -CFLAGS-.oS += -fPIC # Make sure setjmp.c is compiled with a frame pointer CFLAGS-setjmp.c := -fno-omit-frame-pointer From 85d3b8cbf52afc385491a8922dbfb687ebec0a84 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 12 Jul 2003 19:30:54 +0000 Subject: [PATCH 3164/4487] (_STATFS_F_FRSIZE): Define. --- sysdeps/unix/sysv/linux/alpha/bits/statfs.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/statfs.h b/sysdeps/unix/sysv/linux/alpha/bits/statfs.h index d39c6f01c4..d838e6bf4a 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/statfs.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/statfs.h @@ -64,3 +64,4 @@ struct statfs64 /* Tell code we have this member. */ #define _STATFS_F_NAMELEN +#define _STATFS_F_FRSIZE From f8d826fc8557756da1770a5e505b2f729d820525 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 16 Jul 2003 07:39:07 +0000 Subject: [PATCH 3165/4487] 2003-07-16 Daniel Jacobowitz Andreas Jaeger * sysdeps/unix/sysv/linux/mips/bits/shm.h (SHMLBA): Define to 256K, remove unneeded declaration of __getpagesize. --- sysdeps/unix/sysv/linux/mips/bits/shm.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/shm.h b/sysdeps/unix/sysv/linux/mips/bits/shm.h index a512afeddf..b3083346dd 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/shm.h +++ b/sysdeps/unix/sysv/linux/mips/bits/shm.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,2000,2001,2002 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,2000,2001,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 @@ -36,8 +36,7 @@ #define SHM_UNLOCK 12 /* unlock segment (root only) */ /* Segment low boundary address multiple. */ -#define SHMLBA (__getpagesize ()) -extern int __getpagesize (void) __THROW __attribute__ ((__const__)); +#define SHMLBA 0x40000 /* Type to count number of attaches. */ From ff46117d2f800597cb2d53d726ef67d16e947650 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 22 Jul 2003 22:07:18 +0000 Subject: [PATCH 3166/4487] (PROCINFO_CLASS): Define if not yet defined. Use it instead of EXTERN. Undefine at the end of the file. --- sysdeps/unix/sysv/linux/arm/dl-procinfo.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/dl-procinfo.c b/sysdeps/unix/sysv/linux/arm/dl-procinfo.c index 9acd07962b..9b87a2003d 100644 --- a/sysdeps/unix/sysv/linux/arm/dl-procinfo.c +++ b/sysdeps/unix/sysv/linux/arm/dl-procinfo.c @@ -1,5 +1,5 @@ /* Data for Linux/ARM version of processor capability information. - Copyright (C) 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Philip Blundell , 2001. @@ -40,13 +40,14 @@ needed. */ -#ifdef PROCINFO_DECL -EXTERN +#ifndef PROCINFO_CLASS +#define PROCINFO_CLASS #endif + #if !defined PROCINFO_DECL && defined SHARED ._dl_arm_cap_flags #else -const char _dl_arm_cap_flags[8][10] +PROCINFO_CLASS const char _dl_arm_cap_flags[8][10] #endif #ifndef PROCINFO_DECL = { @@ -60,3 +61,4 @@ const char _dl_arm_cap_flags[8][10] #endif #undef PROCINFO_DECL +#undef PROCINFO_CLASS From 775a8c02e14723569f70f2109d32a3db93fc8aed Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 25 Jul 2003 09:04:57 +0000 Subject: [PATCH 3167/4487] Header with a.out binary format definitions. --- sysdeps/unix/sysv/linux/alpha/a.out.h | 197 +++++++++++++++++++++ sysdeps/unix/sysv/linux/alpha/bits/a.out.h | 9 + sysdeps/unix/sysv/linux/m68k/bits/a.out.h | 3 + 3 files changed, 209 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/a.out.h create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/a.out.h create mode 100644 sysdeps/unix/sysv/linux/m68k/bits/a.out.h diff --git a/sysdeps/unix/sysv/linux/alpha/a.out.h b/sysdeps/unix/sysv/linux/alpha/a.out.h new file mode 100644 index 0000000000..a7699f0fe0 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/a.out.h @@ -0,0 +1,197 @@ +#ifndef __A_OUT_GNU_H__ +#define __A_OUT_GNU_H__ + +#include + +#define __GNU_EXEC_MACROS__ + +/* + * OSF/1 ECOFF header structs. ECOFF files consist of: + * - a file header (struct filehdr), + * - an a.out header (struct aouthdr), + * - one or more section headers (struct scnhdr). + * The filhdr's "f_nscns" field contains the + * number of section headers. + */ + +struct filehdr +{ + /* OSF/1 "file" header */ + unsigned short f_magic, f_nscns; + unsigned int f_timdat; + unsigned long f_symptr; + unsigned int f_nsyms; + unsigned short f_opthdr, f_flags; +}; + +struct aouthdr +{ + unsigned long info; /* After that it looks quite normal.. */ + unsigned long tsize; + unsigned long dsize; + unsigned long bsize; + unsigned long entry; + unsigned long text_start; /* With a few additions that actually make sense. */ + unsigned long data_start; + unsigned long bss_start; + unsigned int gprmask, fprmask; /* Bitmask of general & floating point regs used in binary. */ + unsigned long gpvalue; +}; + +struct scnhdr +{ + char s_name[8]; + unsigned long s_paddr; + unsigned long s_vaddr; + unsigned long s_size; + unsigned long s_scnptr; + unsigned long s_relptr; + unsigned long s_lnnoptr; + unsigned short s_nreloc; + unsigned short s_nlnno; + unsigned int s_flags; +}; + +struct exec +{ + /* OSF/1 "file" header */ + struct filehdr fh; + struct aouthdr ah; +}; + +#define a_info ah.info +#define a_text ah.tsize +#define a_data ah.dsize +#define a_bss ah.bsize +#define a_entry ah.entry +#define a_textstart ah.text_start +#define a_datastart ah.data_start +#define a_bssstart ah.bss_start +#define a_gprmask ah.gprmask +#define a_fprmask ah.fprmask +#define a_gpvalue ah.gpvalue + + +#define AOUTHSZ sizeof(struct aouthdr) +#define SCNHSZ sizeof(struct scnhdr) +#define SCNROUND 16 + +enum machine_type +{ + M_OLDSUN2 = 0, + M_68010 = 1, + M_68020 = 2, + M_SPARC = 3, + M_386 = 100, + M_MIPS1 = 151, + M_MIPS2 = 152 +}; + +#define N_MAGIC(exec) ((exec).a_info & 0xffff) +#define N_MACHTYPE(exec) ((enum machine_type)(((exec).a_info >> 16) & 0xff)) +#define N_FLAGS(exec) (((exec).a_info >> 24) & 0xff) +#define N_SET_INFO(exec, magic, type, flags) \ + ((exec).a_info = ((magic) & 0xffff) \ + | (((int)(type) & 0xff) << 16) \ + | (((flags) & 0xff) << 24)) +#define N_SET_MAGIC(exec, magic) \ + ((exec).a_info = ((exec).a_info & 0xffff0000) | ((magic) & 0xffff)) +#define N_SET_MACHTYPE(exec, machtype) \ + ((exec).a_info = \ + ((exec).a_info&0xff00ffff) | ((((int)(machtype))&0xff) << 16)) +#define N_SET_FLAGS(exec, flags) \ + ((exec).a_info = \ + ((exec).a_info&0x00ffffff) | (((flags) & 0xff) << 24)) + +/* Code indicating object file or impure executable. */ +#define OMAGIC 0407 +/* Code indicating pure executable. */ +#define NMAGIC 0410 +/* Code indicating demand-paged executable. */ +#define ZMAGIC 0413 +/* This indicates a demand-paged executable with the header in the text. + The first page is unmapped to help trap NULL pointer references. */ +#define QMAGIC 0314 +/* Code indicating core file. */ +#define CMAGIC 0421 + +#define N_TRSIZE(x) 0 +#define N_DRSIZE(x) 0 +#define N_SYMSIZE(x) 0 +#define N_BADMAG(x) \ + (N_MAGIC(x) != OMAGIC && N_MAGIC(x) != NMAGIC \ + && N_MAGIC(x) != ZMAGIC && N_MAGIC(x) != QMAGIC) +#define _N_HDROFF(x) (1024 - sizeof (struct exec)) +#define N_TXTOFF(x) \ + ((long) N_MAGIC(x) == ZMAGIC ? 0 : \ + (sizeof (struct exec) + (x).fh.f_nscns * SCNHSZ + SCNROUND - 1) \ + & ~(SCNROUND - 1)) + +#define N_DATOFF(x) (N_TXTOFF(x) + (x).a_text) +#define N_TRELOFF(x) (N_DATOFF(x) + (x).a_data) +#define N_DRELOFF(x) (N_TRELOFF(x) + N_TRSIZE(x)) +#define N_SYMOFF(x) (N_DRELOFF(x) + N_DRSIZE(x)) +#define N_STROFF(x) (N_SYMOFF(x) + N_SYMSIZE(x)) + +/* Address of text segment in memory after it is loaded. */ +#define N_TXTADDR(x) ((x).a_textstart) + +/* Address of data segment in memory after it is loaded. */ +#define SEGMENT_SIZE 1024 + +#define _N_SEGMENT_ROUND(x) (((x) + SEGMENT_SIZE - 1) & ~(SEGMENT_SIZE - 1)) +#define _N_TXTENDADDR(x) (N_TXTADDR(x)+(x).a_text) + +#define N_DATADDR(x) ((x).a_datastart) +#define N_BSSADDR(x) ((x).a_bssstart) + +#if !defined (N_NLIST_DECLARED) +struct nlist +{ + union + { + char *n_name; + struct nlist *n_next; + long n_strx; + } n_un; + unsigned char n_type; + char n_other; + short n_desc; + unsigned long n_value; +}; +#endif /* no N_NLIST_DECLARED. */ + +#define N_UNDF 0 +#define N_ABS 2 +#define N_TEXT 4 +#define N_DATA 6 +#define N_BSS 8 +#define N_FN 15 +#define N_EXT 1 +#define N_TYPE 036 +#define N_STAB 0340 +#define N_INDR 0xa +#define N_SETA 0x14 /* Absolute set element symbol. */ +#define N_SETT 0x16 /* Text set element symbol. */ +#define N_SETD 0x18 /* Data set element symbol. */ +#define N_SETB 0x1A /* Bss set element symbol. */ +#define N_SETV 0x1C /* Pointer to set vector in data area. */ + +#if !defined (N_RELOCATION_INFO_DECLARED) +/* This structure describes a single relocation to be performed. + The text-relocation section of the file is a vector of these structures, + all of which apply to the text section. + Likewise, the data-relocation section applies to the data section. */ + +struct relocation_info +{ + int r_address; + unsigned int r_symbolnum:24; + unsigned int r_pcrel:1; + unsigned int r_length:2; + unsigned int r_extern:1; + unsigned int r_pad:4; +}; +#endif /* no N_RELOCATION_INFO_DECLARED. */ + +#endif /* __A_OUT_GNU_H__ */ diff --git a/sysdeps/unix/sysv/linux/alpha/bits/a.out.h b/sysdeps/unix/sysv/linux/alpha/bits/a.out.h new file mode 100644 index 0000000000..82a3dd4c0d --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/bits/a.out.h @@ -0,0 +1,9 @@ +#ifndef __A_OUT_GNU_H__ +# error "Never use directly; include instead." +#endif +#ifndef __A_OUT_GNU_H__ +# error "Never use directly; include instead." +#endif +#ifndef __A_OUT_GNU_H__ +# error "Never use directly; include instead." +#endif diff --git a/sysdeps/unix/sysv/linux/m68k/bits/a.out.h b/sysdeps/unix/sysv/linux/m68k/bits/a.out.h new file mode 100644 index 0000000000..0fb52c3815 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/bits/a.out.h @@ -0,0 +1,3 @@ +#ifndef __A_OUT_GNU_H__ +# error "Never use directly; include instead." +#endif From 5027ae109a7168f340ba83781f14d68df162f868 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Thu, 31 Jul 2003 06:33:52 +0000 Subject: [PATCH 3168/4487] * elf/dynamic-link.h (elf_machine_rel, elf_machine_rela, elf_machine_rel_relative, elf_machine_rela_relative): Don't assume reloc_addr is aligned. * sysdeps/alpha/dl-machine.h (elf_machine_rela, elf_machine_rela_relative): Adjust. * sysdeps/arm/dl-machine.h (elf_machine_rel, elf_machine_rela, elf_machine_rel_relative, elf_machine_rela_relative): Adjust. * sysdeps/cris/dl-machine.h (elf_machine_rela, elf_machine_rela_relative): Adjust. * sysdeps/hppa/dl-machine.h (elf_machine_rela, elf_machine_rela_relative): Adjust. * sysdeps/i386/dl-machine.h (elf_machine_rel, elf_machine_rela, elf_machine_rel_relative, elf_machine_rela_relative): Adjust. * sysdeps/ia64/dl-machine.h (elf_machine_rela, elf_machine_rela_relative): Adjust. * sysdeps/m68k/dl-machine.h (elf_machine_rela, elf_machine_rela_relative): Adjust. * sysdeps/mips/dl-machine.h (elf_machine_rela, elf_machine_rela_relative): Adjust. * sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_rela, elf_machine_rela_relative): Adjust. * sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_rela_relative, elf_machine_rela): Adjust. * sysdeps/s390/s390-32/dl-machine.h (elf_machine_rela, elf_machine_rela_relative): Adjust. * sysdeps/s390/s390-64/dl-machine.h (elf_machine_rela, elf_machine_rela_relative): * sysdeps/sh/dl-machine.h (elf_machine_rela, elf_machine_rela_relative): Adjust. * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela, elf_machine_rela_relative): Adjust. * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela, elf_machine_rela_relative): Adjust. * sysdeps/x86_64/dl-machine.h (elf_machine_rela, elf_machine_rela_relative): Adjust. --- sysdeps/alpha/dl-machine.h | 21 +++++++++------------ sysdeps/arm/dl-machine.h | 23 ++++++++++++++--------- sysdeps/cris/dl-machine.h | 12 +++++++----- sysdeps/hppa/dl-machine.h | 19 +++++++++++-------- sysdeps/m68k/dl-machine.h | 10 ++++++---- sysdeps/mips/dl-machine.h | 7 ++----- 6 files changed, 49 insertions(+), 43 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 0101ba43d5..b3c1eac695 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -512,8 +512,9 @@ elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc, const Elf64_Sym *sym, const struct r_found_version *version, - Elf64_Addr *const reloc_addr) + void *const reloc_addr_arg) { + Elf64_Addr *const reloc_addr = reloc_addr_arg; unsigned long int const r_type = ELF64_R_TYPE (reloc->r_info); #if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC && !defined SHARED @@ -538,15 +539,14 @@ elf_machine_rela (struct link_map *map, { /* XXX Make some timings. Maybe it's preferable to test for unaligned access and only do it the complex way if necessary. */ - void *reloc_addr_1 = reloc_addr; Elf64_Addr reloc_addr_val; /* Load value without causing unaligned trap. */ - memcpy (&reloc_addr_val, reloc_addr_1, 8); + memcpy (&reloc_addr_val, reloc_addr_arg, 8); reloc_addr_val += map->l_addr; /* Store value without causing unaligned trap. */ - memcpy (reloc_addr_1, &reloc_addr_val, 8); + memcpy (reloc_addr_arg, &reloc_addr_val, 8); } } else @@ -598,10 +598,8 @@ elf_machine_rela (struct link_map *map, #ifndef RTLD_BOOTSTRAP else if (r_type == R_ALPHA_REFQUAD) { - void *reloc_addr_1 = reloc_addr; - /* Store value without causing unaligned trap. */ - memcpy (reloc_addr_1, &sym_value, 8); + memcpy (reloc_addr_arg, &sym_value, 8); } #endif #if defined USE_TLS && (!defined RTLD_BOOTSTRAP || USE___THREAD) @@ -649,19 +647,18 @@ elf_machine_rela (struct link_map *map, static inline void elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc, - Elf64_Addr *const reloc_addr) + void *const reloc_addr_arg) { - /* XXX Make some timings. Maybe it's preverable to test for + /* XXX Make some timings. Maybe it's preferable to test for unaligned access and only do it the complex way if necessary. */ - void *reloc_addr_1 = reloc_addr; Elf64_Addr reloc_addr_val; /* Load value without causing unaligned trap. */ - memcpy (&reloc_addr_val, reloc_addr_1, 8); + memcpy (&reloc_addr_val, reloc_addr_arg, 8); reloc_addr_val += l_addr; /* Store value without causing unaligned trap. */ - memcpy (reloc_addr_1, &reloc_addr_val, 8); + memcpy (reloc_addr_arg, &reloc_addr_val, 8); } static inline void diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 074762e1f0..9c11f0b28c 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -1,5 +1,6 @@ /* Machine-dependent ELF dynamic relocation inline functions. ARM version. - Copyright (C) 1995,96,97,98,99,2000,2001,2002 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 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 @@ -419,8 +420,9 @@ fix_bad_pc24 (Elf32_Addr *const reloc_addr, Elf32_Addr value) static inline void elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, const Elf32_Sym *sym, const struct r_found_version *version, - Elf32_Addr *const reloc_addr) + void *const reloc_addr_arg) { + Elf32_Addr *const reloc_addr = reloc_addr_arg; const unsigned int r_type = ELF32_R_TYPE (reloc->r_info); #if !defined RTLD_BOOTSTRAP || !defined HAVE_Z_COMBRELOC @@ -470,8 +472,8 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, rtld_progname ?: "", strtab + refsym->st_name); } - memcpy (reloc_addr, (void *) value, MIN (sym->st_size, - refsym->st_size)); + memcpy (reloc_addr_arg, (void *) value, + MIN (sym->st_size, refsym->st_size)); break; case R_ARM_GLOB_DAT: case R_ARM_JUMP_SLOT: @@ -544,8 +546,9 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, static inline void elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, const Elf32_Sym *sym, const struct r_found_version *version, - Elf32_Addr *const reloc_addr) + void *const reloc_addr_arg) { + Elf32_Addr *const reloc_addr = reloc_addr_arg; const unsigned int r_type = ELF32_R_TYPE (reloc->r_info); if (__builtin_expect (r_type == R_ARM_RELATIVE, 0)) @@ -581,8 +584,8 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, rtld_progname ?: "", strtab + refsym->st_name); } - memcpy (reloc_addr, (void *) value, MIN (sym->st_size, - refsym->st_size)); + memcpy (reloc_addr_arg, (void *) value, + MIN (sym->st_size, refsym->st_size)); break; # endif /* !RESOLVE_CONFLICT_FIND_MAP */ case R_ARM_GLOB_DAT: @@ -623,16 +626,18 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, static inline void elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rel *reloc, - Elf32_Addr *const reloc_addr) + void *const reloc_addr_arg) { + Elf32_Addr *const reloc_addr = reloc_addr_arg; *reloc_addr += l_addr; } # ifndef RTLD_BOOTSTRAP static inline void elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, - Elf32_Addr *const reloc_addr) + void *const reloc_addr_arg) { + Elf32_Addr *const reloc_addr = reloc_addr_arg; *reloc_addr = l_addr + reloc->r_addend; } # endif diff --git a/sysdeps/cris/dl-machine.h b/sysdeps/cris/dl-machine.h index 0fa13a7967..7354c4953c 100644 --- a/sysdeps/cris/dl-machine.h +++ b/sysdeps/cris/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. CRIS version. - Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1996-2001, 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 @@ -280,8 +280,9 @@ elf_machine_plt_value (struct link_map *map, const Elf32_Rela *reloc, static inline void elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, const Elf32_Sym *sym, const struct r_found_version *version, - Elf32_Addr *const reloc_addr) + void *const reloc_addr_arg) { + Elf32_Addr *const reloc_addr = reloc_addr_arg; const unsigned int r_type = ELF32_R_TYPE (reloc->r_info); if (__builtin_expect (r_type == R_CRIS_RELATIVE, 0)) @@ -322,8 +323,8 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, rtld_progname ?: "", strtab + refsym->st_name); } - memcpy (reloc_addr, (void *) value, MIN (sym->st_size, - refsym->st_size)); + memcpy (reloc_addr_arg, (void *) value, + MIN (sym->st_size, refsym->st_size)); break; case R_CRIS_32: @@ -364,8 +365,9 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, static inline void elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, - Elf32_Addr *const reloc_addr) + void *const reloc_addr_arg) { + Elf32_Addr *const reloc_addr = reloc_addr_arg; *reloc_addr = l_addr + reloc->r_addend; } diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h index 9cc10c40f7..cd180e7f76 100644 --- a/sysdeps/hppa/dl-machine.h +++ b/sysdeps/hppa/dl-machine.h @@ -1,5 +1,6 @@ /* Machine-dependent ELF dynamic relocation inline functions. PA-RISC version. - Copyright (C) 1995-1997,1999,2000,2001,2002 Free Software Foundation, Inc. + Copyright (C) 1995-1997,1999,2000,2001,2002, 2003 + Free Software Foundation, Inc. Contributed by David Huggins-Daines This file is part of the GNU C Library. @@ -481,8 +482,9 @@ asm ( \ static inline void elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, const Elf32_Sym *sym, const struct r_found_version *version, - Elf32_Addr *const reloc_addr) + void *const reloc_addr_arg) { + Elf32_Addr *const reloc_addr = reloc_addr_arg; const Elf32_Sym *const refsym = sym; unsigned long const r_type = ELF32_R_TYPE (reloc->r_info); struct link_map *sym_map; @@ -531,9 +533,9 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, return; #endif /* .eh_frame can have unaligned relocs. */ - if ((unsigned long) reloc_addr & 3) + if ((unsigned long) reloc_addr_arg & 3) { - char *rel_addr = (char *) reloc_addr; + char *rel_addr = (char *) reloc_addr_arg; rel_addr[0] = value >> 24; rel_addr[1] = value >> 16; rel_addr[2] = value >> 8; @@ -614,7 +616,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, rtld_progname ?: "", strtab + refsym->st_name); } - memcpy (reloc_addr, (void *) value, + memcpy (reloc_addr_arg, (void *) value, MIN (sym->st_size, refsym->st_size)); return; @@ -637,8 +639,9 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, static inline void elf_machine_rela_relative (struct link_map *map, Elf32_Addr l_addr, const Elf32_Rela *reloc, - Elf32_Addr *const reloc_addr) + void *const reloc_addr_arg) { + Elf32_Addr *const reloc_addr = reloc_addr_arg; unsigned long const r_type = ELF32_R_TYPE (reloc->r_info); Elf32_Addr value; @@ -651,9 +654,9 @@ elf_machine_rela_relative (struct link_map *map, Elf32_Addr l_addr, { case R_PARISC_DIR32: /* .eh_frame can have unaligned relocs. */ - if ((unsigned long) reloc_addr & 3) + if ((unsigned long) reloc_addr_arg & 3) { - char *rel_addr = (char *) reloc_addr; + char *rel_addr = (char *) reloc_addr_arg; rel_addr[0] = value >> 24; rel_addr[1] = value >> 16; rel_addr[2] = value >> 8; diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index a09f61111c..5ae53a457d 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -229,8 +229,9 @@ elf_machine_plt_value (struct link_map *map, const Elf32_Rela *reloc, static inline void __attribute__ ((always_inline)) elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, const Elf32_Sym *sym, const struct r_found_version *version, - Elf32_Addr *const reloc_addr) + void *const reloc_addr_arg) { + Elf32_Addr *const reloc_addr = reloc_addr_arg; const unsigned int r_type = ELF32_R_TYPE (reloc->r_info); if (__builtin_expect (r_type == R_68K_RELATIVE, 0)) @@ -260,8 +261,8 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, rtld_progname ?: "", strtab + refsym->st_name); } - memcpy (reloc_addr, (void *) value, MIN (sym->st_size, - refsym->st_size)); + memcpy (reloc_addr_arg, (void *) value, + MIN (sym->st_size, refsym->st_size)); break; case R_68K_GLOB_DAT: case R_68K_JMP_SLOT: @@ -298,8 +299,9 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, static inline void elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, - Elf32_Addr *const reloc_addr) + void *const reloc_addr_arg) { + Elf32_Addr *const reloc_addr = reloc_addr_arg; *reloc_addr = l_addr + reloc->r_addend; } diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index f64444176b..a402b39cc9 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -534,10 +534,7 @@ static inline void #endif elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, const ElfW(Sym) *sym, const struct r_found_version *version, - /* We use void* because the location to be relocated - is not required to be properly aligned for a - ELFW(Addr). */ - void /* ElfW(Addr) */ *const reloc_addr) + void *const reloc_addr) { const unsigned long int r_type = ELFW(R_TYPE) (reloc->r_info); @@ -640,7 +637,7 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, static inline void elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc, - void /* ElfW(Addr) */ *const reloc_addr) + void *const reloc_addr) { /* XXX Nothing to do. There is no relative relocation, right? */ } From ab69220d3cfa3214de15ca3fc61940e9dd17ac43 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 31 Jul 2003 19:15:42 +0000 Subject: [PATCH 3169/4487] (PT_EI): Add __attribute__((always_inline)). --- sysdeps/arm/linuxthreads/pt-machine.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/arm/linuxthreads/pt-machine.h b/sysdeps/arm/linuxthreads/pt-machine.h index 71001ebc25..a4c2f314cb 100644 --- a/sysdeps/arm/linuxthreads/pt-machine.h +++ b/sysdeps/arm/linuxthreads/pt-machine.h @@ -1,6 +1,6 @@ /* Machine-dependent pthreads configuration and inline functions. ARM version. - Copyright (C) 1997, 1998, 2000, 2002 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 2000, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Philip Blundell . @@ -23,7 +23,7 @@ #define _PT_MACHINE_H 1 #ifndef PT_EI -# define PT_EI extern inline +# define PT_EI extern inline __attribute__ ((always_inline)) #endif extern long int testandset (int *spinlock); From 591ef241f8e6e003de64ba07a3dded04d737ef1e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 31 Jul 2003 19:34:16 +0000 Subject: [PATCH 3170/4487] (__SSIZE_T_TYPE): Define. --- sysdeps/unix/sysv/linux/alpha/bits/typesizes.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h b/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h index 2fb0388ffd..201585af1f 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h @@ -57,6 +57,7 @@ #define __TIMER_T_TYPE void * #define __BLKSIZE_T_TYPE __U32_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 From 0be7f50d109347678e55eaa140ce4b60b1112c23 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 16 Aug 2003 06:13:49 +0000 Subject: [PATCH 3171/4487] AIX posix_madvise implementation. --- sysdeps/unix/sysv/aix/posix_madvise.c | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 sysdeps/unix/sysv/aix/posix_madvise.c diff --git a/sysdeps/unix/sysv/aix/posix_madvise.c b/sysdeps/unix/sysv/aix/posix_madvise.c new file mode 100644 index 0000000000..7ab4bed8e0 --- /dev/null +++ b/sysdeps/unix/sysv/aix/posix_madvise.c @@ -0,0 +1,8 @@ +#include +#include + +int +posix_madvise (void *addr, size_t len, int advise) +{ + return madvise (addr, len, advise) ? errno : 0; +} From a4164f54c6ab5ccbd6b9ce0d9ba2483362acb260 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 16 Aug 2003 06:18:46 +0000 Subject: [PATCH 3172/4487] Define posix_fadvise64_64 entry. Add version info to posix_fadvise64 entry. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 60235d012f..78feb7a57a 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -21,7 +21,8 @@ getpriority - getpriority i:ii __getpriority getpriority mmap - mmap b:aniiii __mmap mmap __mmap64 mmap64 llseek EXTRA lseek C:3 __libc_lseek __lseek lseek __libc_lseek64 __llseek llseek __lseek64 lseek64 lseek llseek - -posix_fadvise64 - fadvise64 4 posix_fadvise64 posix_fadvise +posix_fadvise64 - fadvise64 4 posix_fadvise64 posix_fadvise@GLIBC_2.2 +posix_fadvise64_64 - fadvise64 4 posix_fadvise64 posix_fadvise@GLIBC_2.3.3 pread - pread64 C:4 __libc_pread __libc_pread64 __pread pread __pread64 pread64 pwrite - pwrite64 C:4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64 fstatfs - fstatfs i:ip __fstatfs fstatfs __fstatfs64 fstatfs64 From f98259f8e3e46623d75e1cd09f99cbdf6e1e699e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 16 Aug 2003 08:06:54 +0000 Subject: [PATCH 3173/4487] Don't add new posix_fadvise64_64 syscall. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 78feb7a57a..60235d012f 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -21,8 +21,7 @@ getpriority - getpriority i:ii __getpriority getpriority mmap - mmap b:aniiii __mmap mmap __mmap64 mmap64 llseek EXTRA lseek C:3 __libc_lseek __lseek lseek __libc_lseek64 __llseek llseek __lseek64 lseek64 lseek llseek - -posix_fadvise64 - fadvise64 4 posix_fadvise64 posix_fadvise@GLIBC_2.2 -posix_fadvise64_64 - fadvise64 4 posix_fadvise64 posix_fadvise@GLIBC_2.3.3 +posix_fadvise64 - fadvise64 4 posix_fadvise64 posix_fadvise pread - pread64 C:4 __libc_pread __libc_pread64 __pread pread __pread64 pread64 pwrite - pwrite64 C:4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64 fstatfs - fstatfs i:ip __fstatfs fstatfs __fstatfs64 fstatfs64 From 724bab37c1fe6c38bdff0dca2512309a5a971ea4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 17 Aug 2003 00:33:13 +0000 Subject: [PATCH 3174/4487] (PSEUDO_ERRVAL, PSEUDO_RET_ERRVAL, ret_ERRVAL, PSEUDO_END_ERRVAL): Define. --- sysdeps/unix/alpha/sysdep.h | 15 +++++++++++++++ sysdeps/unix/mips/sysdep.h | 12 ++++++++++++ 2 files changed, 27 insertions(+) diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h index b9bc1c0a2a..f12edef7a7 100644 --- a/sysdeps/unix/alpha/sysdep.h +++ b/sysdeps/unix/alpha/sysdep.h @@ -134,6 +134,21 @@ __LABEL(name) \ #define ret_NOERRNO ret +#define PSEUDO_ERRVAL(name, syscall_name, args) \ + .globl name; \ + .align 4; \ + .ent name,0; \ +__LABEL(name) \ + PSEUDO_PROLOGUE; \ + PSEUDO_PREPARE_ARGS \ + lda v0, SYS_ify(syscall_name); \ + call_pal PAL_callsys; + +#undef PSEUDO_END_ERRVAL +#define PSEUDO_END_ERRVAL(sym) END(sym) + +#define ret_ERRVAL ret + #define r0 v0 #define r1 a4 diff --git a/sysdeps/unix/mips/sysdep.h b/sysdeps/unix/mips/sysdep.h index 13a3752dc8..dd2795edc4 100644 --- a/sysdeps/unix/mips/sysdep.h +++ b/sysdeps/unix/mips/sysdep.h @@ -51,6 +51,18 @@ #define ret_NOERRNO ret +#define PSEUDO_ERRVAL(name, syscall_name, args) \ + .align 2; \ + ENTRY(name) \ + .set noreorder; \ + li v0, SYS_ify(syscall_name); \ + syscall + +#undef PSEUDO_END_ERRVAL +#define PSEUDO_END_ERRVAL(sym) .end sym; .size sym,.-sym + +#define ret_ERRVAL ret + #define r0 v0 #define r1 v1 /* The mips move insn is d,s. */ From a6df4fa6a266c05db06f28672b0396cfb64aa19d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 17 Aug 2003 00:34:12 +0000 Subject: [PATCH 3175/4487] (posix_fadvise64): Add V flag. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 60235d012f..d30a9b6b55 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -21,7 +21,7 @@ getpriority - getpriority i:ii __getpriority getpriority mmap - mmap b:aniiii __mmap mmap __mmap64 mmap64 llseek EXTRA lseek C:3 __libc_lseek __lseek lseek __libc_lseek64 __llseek llseek __lseek64 lseek64 lseek llseek - -posix_fadvise64 - fadvise64 4 posix_fadvise64 posix_fadvise +posix_fadvise64 - fadvise64 Vi:iiii posix_fadvise64 posix_fadvise pread - pread64 C:4 __libc_pread __libc_pread64 __pread pread __pread64 pread64 pwrite - pwrite64 C:4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64 fstatfs - fstatfs i:ip __fstatfs fstatfs __fstatfs64 fstatfs64 From ae53e7a785e1af5b1ad189c64c474236becbe75d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 25 Aug 2003 18:30:43 +0000 Subject: [PATCH 3176/4487] (PSEUDO_ERRVAL): Define. (PSEUDO_END_ERRVAL, ret_ERRVAL): Likewise. --- sysdeps/unix/sysv/linux/arm/sysdep.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index 47383aa788..fda7c5b267 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -80,6 +80,20 @@ #define PSEUDO_END_NOERRNO(name) \ END (name) +/* The function has to return the error code. */ +#undef PSEUDO_ERRVAL +#define PSEUDO_ERRVAL(name, syscall_name, args) \ + .text; \ + ENTRY (name) \ + DO_CALL (syscall_name, args); \ + rsb r0, r0, #0 + +#undef PSEUDO_END_ERRVAL +#define PSEUDO_END_ERRVAL(name) \ + END (name) + +#define ret_ERRVAL PSEUDO_RET_NOERRNO + #if NOT_IN_libc # define SYSCALL_ERROR __local_syscall_error # define SYSCALL_ERROR_HANDLER \ From 62810a52b584246c77d8d8bb8d6cf7f9f76534d2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 30 Aug 2003 00:23:14 +0000 Subject: [PATCH 3177/4487] Add semtimedop. --- sysdeps/unix/sysv/linux/hppa/syscalls.list | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/hppa/syscalls.list b/sysdeps/unix/sysv/linux/hppa/syscalls.list index bc977e2e30..0f7537c306 100644 --- a/sysdeps/unix/sysv/linux/hppa/syscalls.list +++ b/sysdeps/unix/sysv/linux/hppa/syscalls.list @@ -10,6 +10,7 @@ shmctl - shmctl i:iip __shmctl shmctl shmdt - shmdt i:s __shmdt shmdt shmget - shmget i:iii __shmget shmget semop - semop i:ipi __semop semop +semtimedop - semtimedop i:ipip semtimedop semget - semget i:iii __semget semget semctl - semctl i:iiii __semctl semctl From 8ff5cf2c6f0d6918d017ac02a6172e0dcd9f32e4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 31 Aug 2003 18:13:35 +0000 Subject: [PATCH 3178/4487] Add posix_fadvise64 and posix_fallocate64 at GLIBC_2.3.3. --- sysdeps/unix/sysv/linux/arm/Versions | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysdeps/unix/sysv/linux/arm/Versions b/sysdeps/unix/sysv/linux/arm/Versions index 32cb185505..2ddb2af2b7 100644 --- a/sysdeps/unix/sysv/linux/arm/Versions +++ b/sysdeps/unix/sysv/linux/arm/Versions @@ -31,4 +31,7 @@ libc { # v* versionsort64; } + GLIBC_2.3.3 { + posix_fadvise64; posix_fallocate64; + } } From c6df9debb1db4c2a8db5b1989d60cf58c48e2627 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 1 Sep 2003 21:38:14 +0000 Subject: [PATCH 3179/4487] New file. --- sysdeps/unix/sysv/linux/alpha/nptl/Versions | 7 ++++ .../unix/sysv/linux/alpha/nptl/aio_cancel.c | 33 +++++++++++++++++++ .../unix/sysv/linux/alpha/nptl/timer_create.c | 1 + .../unix/sysv/linux/alpha/nptl/timer_delete.c | 1 + .../sysv/linux/alpha/nptl/timer_getoverr.c | 1 + .../sysv/linux/alpha/nptl/timer_gettime.c | 1 + .../sysv/linux/alpha/nptl/timer_settime.c | 1 + 7 files changed, 45 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/nptl/Versions create mode 100644 sysdeps/unix/sysv/linux/alpha/nptl/aio_cancel.c create mode 100644 sysdeps/unix/sysv/linux/alpha/nptl/timer_create.c create mode 100644 sysdeps/unix/sysv/linux/alpha/nptl/timer_delete.c create mode 100644 sysdeps/unix/sysv/linux/alpha/nptl/timer_getoverr.c create mode 100644 sysdeps/unix/sysv/linux/alpha/nptl/timer_gettime.c create mode 100644 sysdeps/unix/sysv/linux/alpha/nptl/timer_settime.c diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/Versions b/sysdeps/unix/sysv/linux/alpha/nptl/Versions new file mode 100644 index 0000000000..3b111ddb51 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/nptl/Versions @@ -0,0 +1,7 @@ +librt { + GLIBC_2.3.3 { + # Changed timer_t. + timer_create; timer_delete; timer_getoverrun; timer_gettime; + timer_settime; + } +} diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/aio_cancel.c b/sysdeps/unix/sysv/linux/alpha/nptl/aio_cancel.c new file mode 100644 index 0000000000..0d6da82919 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/nptl/aio_cancel.c @@ -0,0 +1,33 @@ +#include + +#define aio_cancel64 XXX +#include +#undef aio_cancel64 +#include + +extern __typeof (aio_cancel) __new_aio_cancel; +extern __typeof (aio_cancel) __old_aio_cancel; + +#define aio_cancel __new_aio_cancel + +#include + +#undef aio_cancel +strong_alias (__new_aio_cancel, __new_aio_cancel64); +versioned_symbol (librt, __new_aio_cancel, aio_cancel, GLIBC_2_3); +versioned_symbol (librt, __new_aio_cancel64, aio_cancel64, GLIBC_2_3); + +#if SHLIB_COMPAT (librt, GLIBC_2_1, GLIBC_2_3) + +#undef ECANCELED +#define aio_cancel __old_aio_cancel +#define ECANCELED 125 + +#include + +#undef aio_cancel +strong_alias (__old_aio_cancel, __old_aio_cancel64); +compat_symbol (librt, __old_aio_cancel, aio_cancel, GLIBC_2_1); +compat_symbol (librt, __old_aio_cancel64, aio_cancel64, GLIBC_2_1); + +#endif diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/timer_create.c b/sysdeps/unix/sysv/linux/alpha/nptl/timer_create.c new file mode 100644 index 0000000000..172223af3f --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/nptl/timer_create.c @@ -0,0 +1 @@ +#include "../x86_64/timer_create.c" diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/timer_delete.c b/sysdeps/unix/sysv/linux/alpha/nptl/timer_delete.c new file mode 100644 index 0000000000..537516e0aa --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/nptl/timer_delete.c @@ -0,0 +1 @@ +#include "../x86_64/timer_delete.c" diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/timer_getoverr.c b/sysdeps/unix/sysv/linux/alpha/nptl/timer_getoverr.c new file mode 100644 index 0000000000..3f21a73c98 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/nptl/timer_getoverr.c @@ -0,0 +1 @@ +#include "../x86_64/timer_getoverr.c" diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/timer_gettime.c b/sysdeps/unix/sysv/linux/alpha/nptl/timer_gettime.c new file mode 100644 index 0000000000..a50143adc5 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/nptl/timer_gettime.c @@ -0,0 +1 @@ +#include "../x86_64/timer_gettime.c" diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/timer_settime.c b/sysdeps/unix/sysv/linux/alpha/nptl/timer_settime.c new file mode 100644 index 0000000000..37baeffacc --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/nptl/timer_settime.c @@ -0,0 +1 @@ +#include "../x86_64/timer_settime.c" From 82019706cf1e3eb089ed620b95913e47e0599936 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 3 Sep 2003 03:10:01 +0000 Subject: [PATCH 3180/4487] POSIX limits for Linux/Alpha. --- .../sysv/linux/alpha/nptl/bits/local_lim.h | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h new file mode 100644 index 0000000000..e2a363fa02 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h @@ -0,0 +1,83 @@ +/* Minimum guaranteed maximum values for system limits. Linux/Alpha version. + Copyright (C) 1993-1998, 2000, 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* The kernel header pollutes the namespace with the NR_OPEN symbol + and defines LINK_MAX although filesystems have different maxima. A + similar thing is true for OPEN_MAX: the limit can be changed at + runtime and therefore the macro must not be defined. Remove this + after including the header if necessary. */ +#ifndef NR_OPEN +# define __undef_NR_OPEN +#endif +#ifndef LINK_MAX +# define __undef_LINK_MAX +#endif +#ifndef OPEN_MAX +# define __undef_OPEN_MAX +#endif + +/* The kernel sources contain a file with all the needed information. */ +#include + +/* Have to remove NR_OPEN? */ +#ifdef __undef_NR_OPEN +# undef NR_OPEN +# undef __undef_NR_OPEN +#endif +/* Have to remove LINK_MAX? */ +#ifdef __undef_LINK_MAX +# undef LINK_MAX +# undef __undef_LINK_MAX +#endif +/* Have to remove OPEN_MAX? */ +#ifdef __undef_OPEN_MAX +# undef OPEN_MAX +# undef __undef_OPEN_MAX +#endif + +/* The number of data keys per process. */ +#define _POSIX_THREAD_KEYS_MAX 128 +/* This is the value this implementation supports. */ +#define PTHREAD_KEYS_MAX 1024 + +/* Controlling the iterations of destructors for thread-specific data. */ +#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 +/* Number of iterations this implementation does. */ +#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS + +/* The number of threads per process. */ +#define _POSIX_THREAD_THREADS_MAX 64 +/* We have no predefined limit on the number of threads. */ +#undef PTHREAD_THREADS_MAX + +/* Maximum amount by which a process can descrease its asynchronous I/O + priority level. */ +#define AIO_PRIO_DELTA_MAX 20 + +/* Minimum size for a thread. We are free to choose a reasonable value. */ +#define PTHREAD_STACK_MIN 24576 + +/* Maximum number of timer expiration overruns. */ +#define DELAYTIMER_MAX 2147483647 + +/* Maximum tty name length. */ +#define TTY_NAME_MAX 32 + +/* Maximum login name length. This is arbitrary. */ +#define LOGIN_NAME_MAX 256 From d87ab9bc127edfcf7b4bfccd77bd2bec6b68e2a0 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 3 Sep 2003 03:10:25 +0000 Subject: [PATCH 3181/4487] Additional versions for Linux/Alpha. --- sysdeps/unix/sysv/linux/alpha/nptl/Versions | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/Versions b/sysdeps/unix/sysv/linux/alpha/nptl/Versions index 3b111ddb51..437c4da28b 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/Versions +++ b/sysdeps/unix/sysv/linux/alpha/nptl/Versions @@ -1,3 +1,9 @@ +libpthread { + GLIBC_2.3.3 { + # Changed PTHREAD_STACK_MIN. + pthread_attr_setstack; pthread_attr_setstacksize; + } +} librt { GLIBC_2.3.3 { # Changed timer_t. From 0e4d3d9dbdcc67a7f1783c52dfad83d8e32aac59 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 3 Sep 2003 03:14:43 +0000 Subject: [PATCH 3182/4487] (sysdep_routines): Remove rt_sigsuspend, rt_sigprocmask, rt_sigtimedwait, rt_sigqueueinfo and rt_sigpending. --- sysdeps/unix/sysv/linux/alpha/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile index 6ec49760b4..3097cc3047 100644 --- a/sysdeps/unix/sysv/linux/alpha/Makefile +++ b/sysdeps/unix/sysv/linux/alpha/Makefile @@ -20,6 +20,5 @@ CFLAGS-ioperm.c = -Wa,-mev6 endif ifeq ($(subdir),signal) -sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \ - rt_sigqueueinfo rt_sigaction rt_sigpending +sysdep_routines += rt_sigaction endif From dc7f67a8e83d8a66cf0a7be9fe61538be2796a54 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 3 Sep 2003 03:15:08 +0000 Subject: [PATCH 3183/4487] (__syscall_rt_sigaction): New prototype. --- sysdeps/unix/sysv/linux/alpha/sigaction.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/sigaction.c b/sysdeps/unix/sysv/linux/alpha/sigaction.c index 1bfba1bfda..952ee40eee 100644 --- a/sysdeps/unix/sysv/linux/alpha/sigaction.c +++ b/sysdeps/unix/sysv/linux/alpha/sigaction.c @@ -30,4 +30,7 @@ ? __syscall_rt_sigaction(args) \ : INLINE_SYSCALL1(name, nr, args)) +extern int __syscall_rt_sigaction (int, const struct kernel_sigaction *__unbounded, + struct kernel_sigaction *__unbounded, size_t); + #include From b89b553b5495aec89a9546ec26943de36441e5b7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 3 Sep 2003 03:15:51 +0000 Subject: [PATCH 3184/4487] Not needed anymore. --- sysdeps/unix/sysv/linux/cris/Makefile | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/cris/Makefile diff --git a/sysdeps/unix/sysv/linux/cris/Makefile b/sysdeps/unix/sysv/linux/cris/Makefile deleted file mode 100644 index 9d02acecc4..0000000000 --- a/sysdeps/unix/sysv/linux/cris/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -ifeq ($(subdir),signal) -sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \ - rt_sigqueueinfo rt_sigaction rt_sigpending -endif From df9cbb61e321ac5a0a87b787e99ccf3b67d6ad29 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 3 Sep 2003 03:16:25 +0000 Subject: [PATCH 3185/4487] (__syscall_recvfrom, __syscall_sendto): Remove unused aliases. --- sysdeps/unix/sysv/linux/mips/mips64/syscalls.list | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list b/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list index 14ad564573..b6d2e9444f 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list @@ -3,8 +3,8 @@ lseek - lseek i:iii __libc_lseek __lseek lseek __llseek llseek __libc_lseek64 __lseek64 lseek64 # proper socket implementations: -recvfrom - recvfrom i:ibniBN __libc_recvfrom __recvfrom recvfrom __syscall_recvfrom -sendto - sendto i:ibnibn __libc_sendto __sendto sendto __syscall_sendto +recvfrom - recvfrom i:ibniBN __libc_recvfrom __recvfrom recvfrom +sendto - sendto i:ibnibn __libc_sendto __sendto sendto # semaphore and shm system calls msgctl - msgctl i:iip __msgctl msgctl From b3c37d6c951619f28e984deb5c74435119bcc15e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 3 Sep 2003 03:16:40 +0000 Subject: [PATCH 3186/4487] (__syscall_*): Remove unused __syscall_ stubs. --- sysdeps/unix/sysv/linux/arm/syscalls.list | 11 ----------- sysdeps/unix/sysv/linux/mips/syscalls.list | 10 ---------- 2 files changed, 21 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/syscalls.list b/sysdeps/unix/sysv/linux/arm/syscalls.list index 61ac69948f..1db0030b5b 100644 --- a/sysdeps/unix/sysv/linux/arm/syscalls.list +++ b/sysdeps/unix/sysv/linux/arm/syscalls.list @@ -1,16 +1,5 @@ # File name Caller Syscall name # args Strong name Weak names -s_getgroups getgroups getgroups 2 __syscall_getgroups -s_llseek llseek _llseek 5 __syscall__llseek -s_setfsgid setfsgid setfsgid 1 __syscall_setfsgid -s_setfsuid setfsuid setfsuid 1 __syscall_setfsuid -s_setgid setgid setgid 1 __syscall_setgid -s_setgroups setgroups setgroups 2 __syscall_setgroups -s_setregid setregid setregid 2 __syscall_setregid -s_setresgid setresgid setresgid 3 __syscall_setresgid -s_setresuid setresuid setresuid 3 __syscall_setresuid -s_setreuid setreuid setreuid 2 __syscall_setreuid -s_setuid setuid setuid 1 __syscall_setuid syscall - syscall 7 syscall oldgetrlimit EXTRA getrlimit i:ip __old_getrlimit getrlimit@GLIBC_2.0 oldsetrlimit EXTRA setrlimit i:ip __old_setrlimit setrlimit@GLIBC_2.0 diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index 51789a7679..518f2a2522 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -8,8 +8,6 @@ cachectl - cachectl i:pii __cachectl cachectl cacheflush - cacheflush i:pii _flush_cache cacheflush sysmips - sysmips i:iiii __sysmips sysmips -s_sigsuspend sigsuspend sigsuspend i:p __syscall_sigsuspend - # # Socket functions; Linux/MIPS doesn't use the socketcall(2) wrapper; # it's provided for compatibility, though. @@ -31,11 +29,3 @@ setsockopt - setsockopt i:iiibn __setsockopt setsockopt shutdown - shutdown i:ii __shutdown shutdown socket - socket i:iii __socket socket socketpair - socketpair i:iiif __socketpair socketpair - -# System calls with wrappers. -rt_sigaction - rt_sigaction i:ippi __syscall_rt_sigaction -rt_sigpending - rt_sigpending i:pi __syscall_rt_sigpending -rt_sigprocmask - rt_sigprocmask i:ippi __syscall_rt_sigprocmask -rt_sigqueueinfo - rt_sigqueueinfo i:iip __syscall_rt_sigqueueinfo -rt_sigsuspend - rt_sigsuspend i:pi __syscall_rt_sigsuspend -rt_sigtimedwait - rt_sigtimedwait i:pppi __syscall_rt_sigtimedwait From 679ee4e361a3a6a65034d61277c133bdca6df120 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 3 Sep 2003 03:16:54 +0000 Subject: [PATCH 3187/4487] (sysdep_routines): Remove rt_*. --- sysdeps/unix/sysv/linux/arm/Makefile | 4 +--- sysdeps/unix/sysv/linux/mips/Makefile | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile index 24c7ee99b0..0ccdbe81f6 100644 --- a/sysdeps/unix/sysv/linux/arm/Makefile +++ b/sysdeps/unix/sysv/linux/arm/Makefile @@ -4,9 +4,7 @@ sysdep_headers += sys/elf.h sys/io.h endif ifeq ($(subdir),signal) -sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \ - rt_sigqueueinfo rt_sigaction rt_sigpending \ - sigrestorer +sysdep_routines += sigrestorer endif ifeq ($(subdir),resource) diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile index 6703778391..d65175f5ea 100644 --- a/sysdeps/unix/sysv/linux/mips/Makefile +++ b/sysdeps/unix/sysv/linux/mips/Makefile @@ -1,6 +1,4 @@ ifeq ($(subdir),signal) -sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \ - rt_sigqueueinfo rt_sigaction rt_sigpending #sysdep_routines += sigsuspend endif From 49d7842ab59c52d91a71ad1c32502f9eddb17eb6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 3 Sep 2003 03:21:27 +0000 Subject: [PATCH 3188/4487] Remove unused __syscall_* prototypes. --- sysdeps/unix/sysv/linux/alpha/gethostname.c | 5 +---- sysdeps/unix/sysv/linux/alpha/ipc_priv.h | 10 +--------- sysdeps/unix/sysv/linux/alpha/msgctl.c | 4 +--- sysdeps/unix/sysv/linux/alpha/semctl.c | 4 +--- sysdeps/unix/sysv/linux/alpha/shmctl.c | 4 +--- sysdeps/unix/sysv/linux/arm/sigaction.c | 5 ----- sysdeps/unix/sysv/linux/m68k/chown.c | 8 +------- sysdeps/unix/sysv/linux/mips/ftruncate64.c | 8 ++------ sysdeps/unix/sysv/linux/mips/pread.c | 10 ---------- sysdeps/unix/sysv/linux/mips/pread64.c | 13 +------------ sysdeps/unix/sysv/linux/mips/ptrace.c | 3 --- sysdeps/unix/sysv/linux/mips/pwrite.c | 9 --------- sysdeps/unix/sysv/linux/mips/pwrite64.c | 9 --------- sysdeps/unix/sysv/linux/mips/sigaction.c | 4 ---- sysdeps/unix/sysv/linux/mips/truncate64.c | 8 ++------ sysdeps/unix/sysv/linux/mips/ustat.c | 4 +--- sysdeps/unix/sysv/linux/mips/xmknod.c | 5 ++--- 17 files changed, 14 insertions(+), 99 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/gethostname.c b/sysdeps/unix/sysv/linux/alpha/gethostname.c index 3a48afccd3..4e15ee43ed 100644 --- a/sysdeps/unix/sysv/linux/alpha/gethostname.c +++ b/sysdeps/unix/sysv/linux/alpha/gethostname.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2001 @@ -25,9 +25,6 @@ #include #include -extern int __syscall_gethostname (char *name, size_t len); - - int __gethostname (char *name, size_t len) { diff --git a/sysdeps/unix/sysv/linux/alpha/ipc_priv.h b/sysdeps/unix/sysv/linux/alpha/ipc_priv.h index f0b47d204b..0328dc08e2 100644 --- a/sysdeps/unix/sysv/linux/alpha/ipc_priv.h +++ b/sysdeps/unix/sysv/linux/alpha/ipc_priv.h @@ -32,15 +32,7 @@ struct __old_ipc_perm }; -__BEGIN_DECLS - -/* The actual system call: all functions are multiplexed by this. */ -extern int __syscall_ipc (int __call, int __first, int __second, - int __third, void *__ptr); - -__END_DECLS - -/* The codes for the functions to use the multiplexer `__syscall_ipc'. */ +/* The codes for the functions to use the ipc syscall multiplexer. */ #define IPCOP_semop 1 #define IPCOP_semget 2 #define IPCOP_semctl 3 diff --git a/sysdeps/unix/sysv/linux/alpha/msgctl.c b/sysdeps/unix/sysv/linux/alpha/msgctl.c index d543fe3b9b..1b75af2b80 100644 --- a/sysdeps/unix/sysv/linux/alpha/msgctl.c +++ b/sysdeps/unix/sysv/linux/alpha/msgctl.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1997, 1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1997, 1998, 2000, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , August 1995. @@ -45,8 +45,6 @@ struct __old_msqid_ds __ipc_pid_t msg_lrpid; /* pid of last msgrcv() */ }; -extern int __syscall_msgctl (int, int, void *); - /* Allows to control internal state and destruction of message queue objects. */ int __new_msgctl (int, int, struct msqid_ds *); diff --git a/sysdeps/unix/sysv/linux/alpha/semctl.c b/sysdeps/unix/sysv/linux/alpha/semctl.c index 6f164b4942..224baf399b 100644 --- a/sysdeps/unix/sysv/linux/alpha/semctl.c +++ b/sysdeps/unix/sysv/linux/alpha/semctl.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1997, 1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1997, 1998, 2000, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , August 1995. @@ -52,8 +52,6 @@ union semun #include #include /* definition of CHECK_SEMCTL needs union semum */ -extern int __syscall_semctl (int, int, int, void *); - /* Return identifier for array of NSEMS semaphores associated with KEY. */ int __new_semctl (int semid, int semnum, int cmd, ...); diff --git a/sysdeps/unix/sysv/linux/alpha/shmctl.c b/sysdeps/unix/sysv/linux/alpha/shmctl.c index 0a6cdf170c..7dec3a737c 100644 --- a/sysdeps/unix/sysv/linux/alpha/shmctl.c +++ b/sysdeps/unix/sysv/linux/alpha/shmctl.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1997, 1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1997, 1998, 2000, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , August 1995. @@ -53,8 +53,6 @@ struct __old_shminfo int shmall; }; -extern int __syscall_shmctl (int, int, void *); - /* Provide operations to control over shared memory segments. */ int __new_shmctl (int, int, struct shmid_ds *); diff --git a/sysdeps/unix/sysv/linux/arm/sigaction.c b/sysdeps/unix/sysv/linux/arm/sigaction.c index 82e22b679a..81b29adb2b 100644 --- a/sysdeps/unix/sysv/linux/arm/sigaction.c +++ b/sysdeps/unix/sysv/linux/arm/sigaction.c @@ -29,11 +29,6 @@ translate it here. */ #include -extern int __syscall_sigaction (int, const struct old_kernel_sigaction *__unbounded, - struct old_kernel_sigaction *__unbounded); -extern int __syscall_rt_sigaction (int, const struct kernel_sigaction *__unbounded, - struct kernel_sigaction *__unbounded, size_t); - /* The variable is shared between all wrappers around signal handling functions which have RT equivalents. */ int __libc_missing_rt_sigs; diff --git a/sysdeps/unix/sysv/linux/m68k/chown.c b/sysdeps/unix/sysv/linux/m68k/chown.c index ad0386d1d9..735fa5780a 100644 --- a/sysdeps/unix/sysv/linux/m68k/chown.c +++ b/sysdeps/unix/sysv/linux/m68k/chown.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2000, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2000, 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 @@ -26,13 +26,7 @@ #include #include "kernel-features.h" -extern int __syscall_chown (const char *__unbounded __file, - __kernel_uid_t __owner, __kernel_gid_t __group); - #ifdef __NR_chown32 -extern int __syscall_chown32 (const char *__unbounded __file, - __kernel_uid32_t owner, __kernel_gid32_t group); - # if __ASSUME_32BITUIDS == 0 /* This variable is shared with all files that need to check for 32bit uids. */ diff --git a/sysdeps/unix/sysv/linux/mips/ftruncate64.c b/sysdeps/unix/sysv/linux/mips/ftruncate64.c index fc88539b31..cdb2d56840 100644 --- a/sysdeps/unix/sysv/linux/mips/ftruncate64.c +++ b/sysdeps/unix/sysv/linux/mips/ftruncate64.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999, 2000, 2001, 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 @@ -32,11 +33,6 @@ extern int __have_no_truncate64; #endif -/* The order of hight, low depends on endianness. */ -extern int __syscall_ftruncate64 (int fd, int dummy, int high_length, - int low_length); - - /* Truncate the file FD refers to to LENGTH bytes. */ int __ftruncate64 (int fd, off64_t length) diff --git a/sysdeps/unix/sysv/linux/mips/pread.c b/sysdeps/unix/sysv/linux/mips/pread.c index 28fdca6062..86d47e9b7a 100644 --- a/sysdeps/unix/sysv/linux/mips/pread.c +++ b/sysdeps/unix/sysv/linux/mips/pread.c @@ -41,16 +41,6 @@ static ssize_t __emulate_pread (int fd, void *buf, size_t count, off_t offset) internal_function; # endif -extern ssize_t __syscall_pread (int fd, void *__unbounded buf, size_t count, - int dummy, -#if defined _ABI64 && _MIPS_SIM == _ABI64 - off_t offset -#else - off_t offset_hi, off_t offset_lo -#endif - ); - - ssize_t __libc_pread (fd, buf, count, offset) diff --git a/sysdeps/unix/sysv/linux/mips/pread64.c b/sysdeps/unix/sysv/linux/mips/pread64.c index 7dcd008ff7..9a20987b92 100644 --- a/sysdeps/unix/sysv/linux/mips/pread64.c +++ b/sysdeps/unix/sysv/linux/mips/pread64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 2000, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2000, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -41,17 +41,6 @@ static ssize_t __emulate_pread64 (int fd, void *buf, size_t count, off64_t offset) internal_function; # endif -extern ssize_t __syscall_pread (int fd, void *__unbounded buf, size_t count, - int dummy, -#if defined _ABI64 && _MIPS_SIM == _ABI64 - off_t offset -#else - off_t offset_hi, off_t offset_lo -#endif - ); - - - ssize_t __libc_pread64 (fd, buf, count, offset) int fd; diff --git a/sysdeps/unix/sysv/linux/mips/ptrace.c b/sysdeps/unix/sysv/linux/mips/ptrace.c index b67fe83071..78c662a9db 100644 --- a/sysdeps/unix/sysv/linux/mips/ptrace.c +++ b/sysdeps/unix/sysv/linux/mips/ptrace.c @@ -33,9 +33,6 @@ __extension__ typedef long long int reg_type; typedef long int reg_type; #endif -extern reg_type __syscall_ptrace (int, pid_t, void *__unbounded, - reg_type __unbounded); - reg_type ptrace (enum __ptrace_request request, ...) { diff --git a/sysdeps/unix/sysv/linux/mips/pwrite.c b/sysdeps/unix/sysv/linux/mips/pwrite.c index fa3de156c4..6fb74534cc 100644 --- a/sysdeps/unix/sysv/linux/mips/pwrite.c +++ b/sysdeps/unix/sysv/linux/mips/pwrite.c @@ -37,15 +37,6 @@ #if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0 -extern ssize_t __syscall_pwrite (int fd, const void *__unbounded buf, size_t count, - int dummy, -#if defined _ABI64 && _MIPS_SIM == _ABI64 - off_t offset -#else - off_t offset_hi, off_t offset_lo -#endif - ); - # if __ASSUME_PWRITE_SYSCALL == 0 static ssize_t __emulate_pwrite (int fd, const void *buf, size_t count, off_t offset) internal_function; diff --git a/sysdeps/unix/sysv/linux/mips/pwrite64.c b/sysdeps/unix/sysv/linux/mips/pwrite64.c index 5b481b256c..3ac4233fa0 100644 --- a/sysdeps/unix/sysv/linux/mips/pwrite64.c +++ b/sysdeps/unix/sysv/linux/mips/pwrite64.c @@ -36,15 +36,6 @@ #if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0 -extern ssize_t __syscall_pwrite (int fd, const void *__unbounded buf, size_t count, - int dummy, -#if defined _ABI64 && _MIPS_SIM == _ABI64 - off_t offset -#else - off_t offset_hi, off_t offset_lo -#endif - ); - # if __ASSUME_PWRITE_SYSCALL == 0 static ssize_t __emulate_pwrite64 (int fd, const void *buf, size_t count, off64_t offset) internal_function; diff --git a/sysdeps/unix/sysv/linux/mips/sigaction.c b/sysdeps/unix/sysv/linux/mips/sigaction.c index 2a99bac8fe..bc7db2b555 100644 --- a/sysdeps/unix/sysv/linux/mips/sigaction.c +++ b/sysdeps/unix/sysv/linux/mips/sigaction.c @@ -35,11 +35,7 @@ functions which have RT equivalents. This is the definition. */ int __libc_missing_rt_sigs; -extern int __syscall_sigaction (int, const struct old_kernel_sigaction *__unbounded, - struct old_kernel_sigaction *__unbounded); #endif -extern int __syscall_rt_sigaction (int, const struct kernel_sigaction *__unbounded, - struct kernel_sigaction *__unbounded, size_t); #if _MIPS_SIM != _MIPS_SIM_ABI32 diff --git a/sysdeps/unix/sysv/linux/mips/truncate64.c b/sysdeps/unix/sysv/linux/mips/truncate64.c index 3bb73ce96d..e955f18ea3 100644 --- a/sysdeps/unix/sysv/linux/mips/truncate64.c +++ b/sysdeps/unix/sysv/linux/mips/truncate64.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999, 2000, 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 @@ -33,11 +34,6 @@ int __have_no_truncate64; #endif -/* The order of hight, low depends on endianness. */ -extern int __syscall_truncate64 (const char *__unbounded path, int dummy, - int high_length, int low_length); - - /* Truncate the file FD refers to to LENGTH bytes. */ int truncate64 (const char *path, off64_t length) diff --git a/sysdeps/unix/sysv/linux/mips/ustat.c b/sysdeps/unix/sysv/linux/mips/ustat.c index 8f5002ce92..a309f7104c 100644 --- a/sysdeps/unix/sysv/linux/mips/ustat.c +++ b/sysdeps/unix/sysv/linux/mips/ustat.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2000, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -25,8 +25,6 @@ #include #include -extern int __syscall_ustat (unsigned long dev, struct ustat *__unbounded ubuf); - int ustat (dev_t dev, struct ustat *ubuf) { diff --git a/sysdeps/unix/sysv/linux/mips/xmknod.c b/sysdeps/unix/sysv/linux/mips/xmknod.c index 217c9c2111..2d09752405 100644 --- a/sysdeps/unix/sysv/linux/mips/xmknod.c +++ b/sysdeps/unix/sysv/linux/mips/xmknod.c @@ -1,5 +1,6 @@ /* xmknod call using old-style Unix mknod system call. - Copyright (C) 1991,93,95,96,97,98,00,2002 Free Software Foundation, Inc. + Copyright (C) 1991, 1993, 1995, 1996, 1997, 1998, 2000, 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 @@ -26,8 +27,6 @@ #include #include -extern int __syscall_mknod (const char *__unbounded, unsigned long, unsigned int); - /* Create a device file named PATH, with permission and special bits MODE and device number DEV (which can be constructed from major and minor device numbers with the `makedev' macro above). */ From ea72a68d42cb620ccd38a309f6036361300a3151 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 8 Sep 2003 23:56:13 +0000 Subject: [PATCH 3189/4487] Change type of pthread_t to be compatible with LT. --- sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h index bd5ab9706c..2d8a00b93f 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h @@ -33,7 +33,7 @@ /* Thread identifiers. The structure of the attribute type is deliberately not exposed. */ -typedef struct __opaque_pthread *pthread_t; +typedef unsigned long int pthread_t; typedef union From 25c0b916b6bdf86470d8977839d505f4da23bbce Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 9 Sep 2003 06:44:48 +0000 Subject: [PATCH 3190/4487] 2003-09-08 Roland McGrath * sysdeps/unix/sysv/linux/speed.c (cfsetospeed): Only set c_ospeed under [_HAVE_STRUCT_TERMIOS_C_OSPEED]. (cfsetispeed): Only set c_ispeed under [_HAVE_STRUCT_TERMIOS_C_ISPEED]. * sysdeps/unix/sysv/linux/bits/termios.h (_HAVE_STRUCT_TERMIOS_C_ISPEED, _HAVE_STRUCT_TERMIOS_C_OSPEED): Define. * sysdeps/unix/sysv/linux/alpha/bits/termios.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise. --- sysdeps/unix/sysv/linux/alpha/bits/termios.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/termios.h b/sysdeps/unix/sysv/linux/alpha/bits/termios.h index 079073dd54..0abe34f596 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/termios.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/termios.h @@ -1,5 +1,6 @@ /* termios type and macro definitions. Linux version. - Copyright (C) 1993, 94, 95, 96, 97, 99 Free Software Foundation, Inc. + Copyright (C) 1993,1994,1995,1996,1997,1999,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 @@ -36,6 +37,8 @@ struct termios cc_t c_line; /* line discipline (== c_cc[33]) */ speed_t c_ispeed; /* input speed */ speed_t c_ospeed; /* output speed */ +#define _HAVE_STRUCT_TERMIOS_C_ISPEED 1 +#define _HAVE_STRUCT_TERMIOS_C_OSPEED 1 }; /* c_cc characters */ From ad8d610d5cef042fef5d04facab4787aa94e3598 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 9 Sep 2003 07:00:21 +0000 Subject: [PATCH 3191/4487] 2003-09-05 Roland McGrath * pthread_create.c (__pthread_pthread_sizeof_descr): Removed. Instead, include ../nptl_db/db_info.c to do its magic. * pthread_key_create.c (__pthread_pthread_keys_max): Removed. (__pthread_pthread_key_2ndlevel_size): Likewise. * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro. * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro. * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro. * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro. * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro. * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro. * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro. * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro. * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed. * sysdeps/generic/td_ta_map_lwp2thr.c: File removed. * sysdeps/i386/td_ta_map_lwp2thr.c: File removed. * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed. * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed. * sysdeps/s390/td_ta_map_lwp2thr.c: File removed. * sysdeps/sh/td_ta_map_lwp2thr.c: File removed. * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed. * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed. --- sysdeps/alpha/nptl/td_ta_map_lwp2thr.c | 46 -------------------------- sysdeps/alpha/nptl/tls.h | 4 +++ 2 files changed, 4 insertions(+), 46 deletions(-) delete mode 100644 sysdeps/alpha/nptl/td_ta_map_lwp2thr.c diff --git a/sysdeps/alpha/nptl/td_ta_map_lwp2thr.c b/sysdeps/alpha/nptl/td_ta_map_lwp2thr.c deleted file mode 100644 index b30b10b123..0000000000 --- a/sysdeps/alpha/nptl/td_ta_map_lwp2thr.c +++ /dev/null @@ -1,46 +0,0 @@ -/* Which thread is running on an LWP? PowerPC version. - Copyright (C) 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. */ - -#include "thread_dbP.h" -#include - - -td_err_e -td_ta_map_lwp2thr (const td_thragent_t *ta, lwpid_t lwpid, td_thrhandle_t *th) -{ - LOG ("td_ta_map_lwp2thr"); - - /* Test whether the TA parameter is ok. */ - if (! ta_ok (ta)) - return TD_BADTA; - - prgregset_t regs; - if (ps_lgetregs (ta->ph, lwpid, regs) != PS_OK) - return TD_ERR; - - /* The uniq value is stored in slot 33 in recent gdb; it isn't stored - anywhere otherwise. */ - th->th_unique = ((void *) regs[32] - - TLS_TCB_OFFSET - TLS_TCB_SIZE - TLS_PRE_TCB_SIZE); - - /* Found it. Now complete the `td_thrhandle_t' object. */ - th->th_ta_p = (td_thragent_t *) ta; - - return TD_OK; -} diff --git a/sysdeps/alpha/nptl/tls.h b/sysdeps/alpha/nptl/tls.h index 1718b3e466..8f61bb7409 100644 --- a/sysdeps/alpha/nptl/tls.h +++ b/sysdeps/alpha/nptl/tls.h @@ -118,6 +118,10 @@ typedef struct ((struct pthread *) (__builtin_thread_pointer () \ - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE)) +/* Magic for libthread_db to know how to do THREAD_SELF. */ +# define DB_THREAD_SELF \ + REGISTER (64, 32 * 8, - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE) + /* Identifier for the current thread. THREAD_SELF is usable but sometimes more expensive than necessary as in this case. */ # define THREAD_ID (__builtin_thread_pointer ()) From aa38a5c081eaa3cacbb48fbc068a226195c391a8 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 9 Sep 2003 19:21:51 +0000 Subject: [PATCH 3192/4487] 2003-09-09 Chris Demetriou * sysdeps/unix/mips/sysdep.h (PSEUDO_END): Undef before defining. --- sysdeps/unix/mips/sysdep.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/mips/sysdep.h b/sysdeps/unix/mips/sysdep.h index dd2795edc4..9302710efa 100644 --- a/sysdeps/unix/mips/sysdep.h +++ b/sysdeps/unix/mips/sysdep.h @@ -37,6 +37,7 @@ #define ret j ra ; nop +#undef PSEUDO_END #define PSEUDO_END(sym) .end sym; .size sym,.-sym #define PSEUDO_NOERRNO(name, syscall_name, args) \ From 855bf8c1dfcc708aa7cdcceedead8bec04329b5b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 9 Sep 2003 20:10:22 +0000 Subject: [PATCH 3193/4487] 2003-09-08 Chris Demetriou * sysdeps/mips/mips64/n32/Implies: Move ieee754/ldbl-128 to the top of the list. * sysdeps/mips/mips64/n64/Implies: Likewise. --- sysdeps/mips/mips64/n32/Implies | 2 +- sysdeps/mips/mips64/n64/Implies | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/mips/mips64/n32/Implies b/sysdeps/mips/mips64/n32/Implies index b2072befef..a7cb280ec4 100644 --- a/sysdeps/mips/mips64/n32/Implies +++ b/sysdeps/mips/mips64/n32/Implies @@ -1,4 +1,4 @@ +ieee754/ldbl-128 mips/mips64 mips wordsize-32 -ieee754/ldbl-128 diff --git a/sysdeps/mips/mips64/n64/Implies b/sysdeps/mips/mips64/n64/Implies index 5e88e3a03b..e507786789 100644 --- a/sysdeps/mips/mips64/n64/Implies +++ b/sysdeps/mips/mips64/n64/Implies @@ -1,4 +1,4 @@ +ieee754/ldbl-128 mips/mips64 mips wordsize-64 -ieee754/ldbl-128 From 8525f64d52ab5a757622e426eb6a46fd0e5897bb Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 10 Sep 2003 23:38:52 +0000 Subject: [PATCH 3194/4487] 2003-09-10 Chris Demetriou * sysdeps/unix/sysv/linux/mips/pread64.c (__libc_pread64): Fix syscall invocation. * sysdeps/unix/sysv/linux/mips/pwrite64.c (__libc_pwrite64): Likewise. * sysdeps/unix/sysv/linux/mips/pread.c (__libc_pread): Likewise. Also, only assert off_t size is 4 for N32 and O32, and clean up white space. * sysdeps/unix/sysv/linux/mips/pwrite.c (__libc_pwrite): Likewise. --- sysdeps/unix/sysv/linux/mips/pread.c | 31 +++++++++++++------------ sysdeps/unix/sysv/linux/mips/pread64.c | 9 ++++--- sysdeps/unix/sysv/linux/mips/pwrite.c | 28 +++++++++++----------- sysdeps/unix/sysv/linux/mips/pwrite64.c | 9 ++++--- 4 files changed, 38 insertions(+), 39 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/pread.c b/sysdeps/unix/sysv/linux/mips/pread.c index 86d47e9b7a..7a9b0860ba 100644 --- a/sysdeps/unix/sysv/linux/mips/pread.c +++ b/sysdeps/unix/sysv/linux/mips/pread.c @@ -51,32 +51,33 @@ __libc_pread (fd, buf, count, offset) { ssize_t result; +#if (defined _ABI64 && _MIPS_SIM != _ABI64) + assert (sizeof (offset) == 4); +#endif + if (SINGLE_THREAD_P) { - /* First try the syscall. */ - assert (sizeof (offset) == 4); -#if defined _ABI64 && _MIPS_SIM == _ABI64 - result = INLINE_SYSCALL (pread, 5, fd, CHECK_N (buf, count), count, 0, - offset); + /* First try the syscall. */ +#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) || (defined _ABI64 && _MIPS_SIM == _ABI64) + result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count, + offset); #else - result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, - __LONG_LONG_PAIR (offset >> 31, offset)); + result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, + __LONG_LONG_PAIR (offset >> 31, offset)); #endif # if __ASSUME_PREAD_SYSCALL == 0 - if (result == -1 && errno == ENOSYS) - /* No system call available. Use the emulation. */ - result = __emulate_pread (fd, buf, count, offset); + if (result == -1 && errno == ENOSYS) + /* No system call available. Use the emulation. */ + result = __emulate_pread (fd, buf, count, offset); # endif - return result; + return result; } int oldtype = LIBC_CANCEL_ASYNC (); /* First try the syscall. */ - assert (sizeof (offset) == 4); -#if defined _ABI64 && _MIPS_SIM == _ABI64 - result = INLINE_SYSCALL (pread, 5, fd, CHECK_N (buf, count), count, 0, - offset); +#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) || (defined _ABI64 && _MIPS_SIM == _ABI64) + result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count, offset); #else result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, __LONG_LONG_PAIR (offset >> 31, offset)); diff --git a/sysdeps/unix/sysv/linux/mips/pread64.c b/sysdeps/unix/sysv/linux/mips/pread64.c index 9a20987b92..25f80df8ed 100644 --- a/sysdeps/unix/sysv/linux/mips/pread64.c +++ b/sysdeps/unix/sysv/linux/mips/pread64.c @@ -54,8 +54,8 @@ __libc_pread64 (fd, buf, count, offset) if (SINGLE_THREAD_P) { /* First try the syscall. */ -#if defined _ABI64 && _MIPS_SIM == _ABI64 - result = INLINE_SYSCALL (pread, 5, fd, CHECK_N (buf, count), count, 0, +#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) || (defined _ABI64 && _MIPS_SIM == _ABI64) + result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count, offset); #else result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, @@ -73,9 +73,8 @@ __libc_pread64 (fd, buf, count, offset) int oldtype = LIBC_CANCEL_ASYNC (); /* First try the syscall. */ -#if defined _ABI64 && _MIPS_SIM == _ABI64 - result = INLINE_SYSCALL (pread, 5, fd, CHECK_N (buf, count), count, 0, - offset); +#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) || (defined _ABI64 && _MIPS_SIM == _ABI64) + result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count, offset); #else result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, __LONG_LONG_PAIR ((off_t) (offset >> 32), diff --git a/sysdeps/unix/sysv/linux/mips/pwrite.c b/sysdeps/unix/sysv/linux/mips/pwrite.c index 6fb74534cc..3c0eba5757 100644 --- a/sysdeps/unix/sysv/linux/mips/pwrite.c +++ b/sysdeps/unix/sysv/linux/mips/pwrite.c @@ -51,33 +51,33 @@ __libc_pwrite (fd, buf, count, offset) { ssize_t result; +#if (defined _ABI64 && _MIPS_SIM != _ABI64) + assert (sizeof (offset) == 4); +#endif + if (SINGLE_THREAD_P) { /* First try the syscall. */ - assert (sizeof (offset) == 4); -#if defined _ABI64 && _MIPS_SIM == _ABI64 - result = INLINE_SYSCALL (pwrite, 5, fd, CHECK_N (buf, count), count, 0, - offset); +#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) || (defined _ABI64 && _MIPS_SIM == _ABI64) + result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count, + offset); #else - result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0, - __LONG_LONG_PAIR (offset >> 31, offset)); + result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0, + __LONG_LONG_PAIR (offset >> 31, offset)); #endif # if __ASSUME_PWRITE_SYSCALL == 0 - if (result == -1 && errno == ENOSYS) - /* No system call available. Use the emulation. */ - result = __emulate_pwrite (fd, buf, count, offset); + if (result == -1 && errno == ENOSYS) + /* No system call available. Use the emulation. */ + result = __emulate_pwrite (fd, buf, count, offset); # endif - return result; } int oldtype = LIBC_CANCEL_ASYNC (); /* First try the syscall. */ - assert (sizeof (offset) == 4); -#if defined _ABI64 && _MIPS_SIM == _ABI64 - result = INLINE_SYSCALL (pwrite, 5, fd, CHECK_N (buf, count), count, 0, - offset); +#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) || (defined _ABI64 && _MIPS_SIM == _ABI64) + result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count, offset); #else result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0, __LONG_LONG_PAIR (offset >> 31, offset)); diff --git a/sysdeps/unix/sysv/linux/mips/pwrite64.c b/sysdeps/unix/sysv/linux/mips/pwrite64.c index 3ac4233fa0..fef333bcb1 100644 --- a/sysdeps/unix/sysv/linux/mips/pwrite64.c +++ b/sysdeps/unix/sysv/linux/mips/pwrite64.c @@ -53,8 +53,8 @@ __libc_pwrite64 (fd, buf, count, offset) if (SINGLE_THREAD_P) { /* First try the syscall. */ -#if defined _ABI64 && _MIPS_SIM == _ABI64 - result = INLINE_SYSCALL (pwrite, 5, fd, CHECK_N (buf, count), count, 0, +#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) || (defined _ABI64 && _MIPS_SIM == _ABI64) + result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count, offset); #else result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0, @@ -73,9 +73,8 @@ __libc_pwrite64 (fd, buf, count, offset) int oldtype = LIBC_CANCEL_ASYNC (); /* First try the syscall. */ -#if defined _ABI64 && _MIPS_SIM == _ABI64 - result = INLINE_SYSCALL (pwrite, 5, fd, CHECK_N (buf, count), count, 0, - offset); +#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) || (defined _ABI64 && _MIPS_SIM == _ABI64) + result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count, offset); #else result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0, __LONG_LONG_PAIR ((off_t) (offset >> 32), From 7e7d334885507579fc9114cca9ae730b8e7740ee Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 14 Sep 2003 19:53:42 +0000 Subject: [PATCH 3195/4487] Rewrite. --- sysdeps/arm/memset.S | 75 ++++++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 38 deletions(-) diff --git a/sysdeps/arm/memset.S b/sysdeps/arm/memset.S index 0b624139eb..1e2699d077 100644 --- a/sysdeps/arm/memset.S +++ b/sysdeps/arm/memset.S @@ -22,47 +22,46 @@ /* void *memset (dstpp, c, len) */ ENTRY(memset) - mov a4, a1 - cmp a3, $8 @ at least 8 bytes to do? - blt 2f - orr a2, a2, a2, lsl $8 - orr a2, a2, a2, lsl $16 + mov r3, r0 + cmp r2, #8 + bcc 2f @ less than 8 bytes to move + 1: - tst a4, $3 @ aligned yet? - strneb a2, [a4], $1 - subne a3, a3, $1 + tst r3, #3 @ aligned yet? + strneb r1, [r3], #1 + subne r2, r2, #1 bne 1b - mov ip, a2 + + orr r1, r1, r1, lsl $8 + orr r1, r1, r1, lsl $16 + 1: - cmp a3, $8 @ 8 bytes still to do? - blt 2f - stmia a4!, {a2, ip} - sub a3, a3, $8 - cmp a3, $8 @ 8 bytes still to do? - blt 2f - stmia a4!, {a2, ip} - sub a3, a3, $8 - cmp a3, $8 @ 8 bytes still to do? - blt 2f - stmia a4!, {a2, ip} - sub a3, a3, $8 - cmp a3, $8 @ 8 bytes still to do? - stmgeia a4!, {a2, ip} - subge a3, a3, $8 - bge 1b + subs r2, r2, #8 + strcs r1, [r3], #4 @ store up to 32 bytes per loop iteration + strcs r1, [r3], #4 + subcss r2, r2, #8 + strcs r1, [r3], #4 + strcs r1, [r3], #4 + subcss r2, r2, #8 + strcs r1, [r3], #4 + strcs r1, [r3], #4 + subcss r2, r2, #8 + strcs r1, [r3], #4 + strcs r1, [r3], #4 + bcs 1b + + and r2, r2, #7 2: - movs a3, a3 @ anything left? - RETINSTR(moveq,pc,lr) @ nope - rsb a3, a3, $7 - add pc, pc, a3, lsl $2 - mov r0, r0 - strb a2, [a4], $1 - strb a2, [a4], $1 - strb a2, [a4], $1 - strb a2, [a4], $1 - strb a2, [a4], $1 - strb a2, [a4], $1 - strb a2, [a4], $1 - RETINSTR(mov,pc,lr) + subs r2, r2, #1 @ store up to 4 bytes per loop iteration + strcsb r1, [r3], #1 + subcss r2, r2, #1 + strcsb r1, [r3], #1 + subcss r2, r2, #1 + strcsb r1, [r3], #1 + subcss r2, r2, #1 + strcsb r1, [r3], #1 + bcs 2b + + DO_RET(lr) END(memset) libc_hidden_builtin_def (memset) From 2c65912458927f5ccc934e5caa6dfb5f101c97b4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 14 Sep 2003 19:54:40 +0000 Subject: [PATCH 3196/4487] Use sys_mmap2 if it's known to be available. --- sysdeps/unix/sysv/linux/arm/mmap.S | 39 +++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/arm/mmap.S b/sysdeps/unix/sysv/linux/arm/mmap.S index af93c7bce7..7beba6841c 100644 --- a/sysdeps/unix/sysv/linux/arm/mmap.S +++ b/sysdeps/unix/sysv/linux/arm/mmap.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2000, 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 @@ -17,11 +17,47 @@ 02111-1307 USA. */ #include +#include + +#define EINVAL 22 .text ENTRY (__mmap) +# ifdef __ASSUME_MMAP2_SYSCALL + /* This code is actually a couple of cycles slower than the + sys_mmap version below, so it might seem like a loss. But the + code path inside the kernel is sufficiently much shorter to + make it a net gain to use mmap2 when it's known to be + available. */ + + /* shuffle args */ + str r5, [sp, #-4]! + ldr r5, [sp, #8] + str r4, [sp, #-4]! + ldr r4, [sp, #8] + + /* convert offset to pages */ + movs ip, r5, lsl #20 + bne .Linval + mov r5, r5, lsr #12 + + /* do the syscall */ + swi SYS_ify (mmap2) + + /* restore registers */ +2: + ldr r4, [sp], #4 + ldr r5, [sp], #4 + + cmn r0, $4096 + RETINSTR(movcc, pc, lr) + b PLTJMP(syscall_error) +.Linval: + mov r0, #-EINVAL + b 2b +# else /* Because we can only get five args through the syscall interface, and mmap() takes six, we need to build a parameter block and pass its address instead. The 386 port does a similar trick. */ @@ -49,6 +85,7 @@ ENTRY (__mmap) cmn r0, $4096 RETINSTR(movcc, pc, lr) b PLTJMP(syscall_error); +#endif PSEUDO_END (__mmap) From 60f4eece709fca8e4ffd72ad85ca238c420a73e7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 14 Sep 2003 19:54:53 +0000 Subject: [PATCH 3197/4487] Optimise code a little. --- sysdeps/unix/sysv/linux/arm/mmap64.S | 38 ++++++++++++++++------------ 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/mmap64.S b/sysdeps/unix/sysv/linux/arm/mmap64.S index 3936e25d26..f8361b5cbf 100644 --- a/sysdeps/unix/sysv/linux/arm/mmap64.S +++ b/sysdeps/unix/sysv/linux/arm/mmap64.S @@ -27,38 +27,44 @@ .text ENTRY (__mmap64) #ifdef __NR_mmap2 - stmfd sp!, {r4, r5, lr} - ldr r5, [sp, $16] - ldr r4, [sp, $12] - movs ip, r5, lsl $20 @ check that offset is page-aligned + ldr ip, [sp, $4] @ offset low part + str r5, [sp, #-4]! + ldr r5, [sp, $12] @ offset high part + str r4, [sp, #-4]! + movs r4, ip, lsl $20 @ check that offset is page-aligned + mov ip, ip, lsr $12 + moveqs r4, r5, lsr $12 @ check for overflow bne .Linval - ldr ip, [sp, $20] - mov r5, r5, lsr $12 - orr r5, r5, ip, lsl $20 @ compose page offset - movs ip, ip, lsr $12 - bne .Linval @ check for overflow + ldr r4, [sp, $8] @ load fd + orr r5, ip, r5, lsl $20 @ compose page offset mov ip, r0 swi SYS_ify (mmap2) cmn r0, $4096 - LOADREGS(ccfd, sp!, {r4, r5, pc}) # ifdef __ASSUME_MMAP2_SYSCALL - ldmfd sp!, {r4, r5, lr} + ldr r4, [sp], #4 + ldr r5, [sp], #4 + RETINSTR(movcc, pc, lr) b PLTJMP(syscall_error) # else + ldrcc r4, [sp], #4 + ldrcc r5, [sp], #4 + RETINSTR(movcc, pc, lr) cmn r0, $ENOSYS - ldmnefd sp!, {r4, r5, lr} - bne PLTJMP(syscall_error) + bne .Lerror /* The current kernel does not support mmap2. Fall back to plain mmap if the offset is small enough. */ - ldr r5, [sp, $20] + ldr r5, [sp, $16] mov r0, ip @ first arg was clobbered teq r5, $0 - ldmeqfd sp!, {r4, r5, lr} + ldreq r4, [sp], #4 + ldreq r5, [sp], #4 beq PLTJMP(__mmap) # endif .Linval: mov r0, $-EINVAL - ldmfd sp!, {r4, r5, lr} +.Lerror: + ldr r4, [sp], #4 + ldr r5, [sp], #4 b PLTJMP(syscall_error) #else /* The kernel headers do not support mmap2. Fall back to plain From 3dc8a4b2546995462f7e99f46b38c353d47afe30 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 15 Sep 2003 08:43:12 +0000 Subject: [PATCH 3198/4487] Add hidden_def. --- sysdeps/m68k/setjmp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysdeps/m68k/setjmp.c b/sysdeps/m68k/setjmp.c index 19aa131a45..8a6c3f9a0b 100644 --- a/sysdeps/m68k/setjmp.c +++ b/sysdeps/m68k/setjmp.c @@ -58,3 +58,6 @@ __sigsetjmp (jmp_buf env, int savemask) /* Save the signal mask if requested. */ return __sigjmp_save (env, savemask); } +#if !defined BSD_SETJMP && !defined BSD__SETJMP +hidden_def (__sigsetjmp) +#endif From 5abcf869491bbdf340b4cc147aa6af0980d6a021 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 17 Sep 2003 02:47:48 +0000 Subject: [PATCH 3199/4487] 2003-09-17 Uwe Reimann Hans-Peter Nilsson * sysdeps/cris/dl-machine.h (elf_machine_type_class): Classify R_CRIS_GLOB_DAT as ELF_RTYPE_CLASS_PLT. Clarify comment. --- sysdeps/cris/dl-machine.h | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/sysdeps/cris/dl-machine.h b/sysdeps/cris/dl-machine.h index 7354c4953c..206e621902 100644 --- a/sysdeps/cris/dl-machine.h +++ b/sysdeps/cris/dl-machine.h @@ -228,12 +228,20 @@ _dl_start_user:\n\ .size _dl_start_user, . - _dl_start_user\n\ .previous"); -/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so - PLT entries should not be allowed to define the value. - ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one - of the main executable's symbols, as for a COPY reloc. */ -#define elf_machine_type_class(type) \ - ((((type) == R_CRIS_JUMP_SLOT) * ELF_RTYPE_CLASS_PLT) \ +/* The union of reloc-type-classes where the reloc TYPE is a member. + + TYPE is in the class ELF_RTYPE_CLASS_PLT if it can describe a + relocation for a PLT entry, that is, for which a PLT entry should not + be allowed to define the value. The GNU linker for CRIS can merge a + .got.plt entry (R_CRIS_JUMP_SLOT) with a .got entry (R_CRIS_GLOB_DAT), + so we need to match both these reloc types. + + TYPE is in the class ELF_RTYPE_CLASS_NOCOPY if it should not be allowed + to resolve to one of the main executable's symbols, as for a COPY + reloc. */ +#define elf_machine_type_class(type) \ + ((((((type) == R_CRIS_JUMP_SLOT)) \ + || ((type) == R_CRIS_GLOB_DAT)) * ELF_RTYPE_CLASS_PLT) \ | (((type) == R_CRIS_COPY) * ELF_RTYPE_CLASS_COPY)) /* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */ From 170880ee2676e8a454cf4521ed7635cd8d8ce4c4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 17 Sep 2003 18:07:04 +0000 Subject: [PATCH 3200/4487] Branch to fork if libpthread is loaded. Elide backwards compatibility code when not required. --- .../unix/sysv/linux/arm/linuxthreads/vfork.S | 39 +++++++++++++++---- 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S b/sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S index 8d3338afd0..23687342d1 100644 --- a/sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S +++ b/sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S @@ -20,37 +20,60 @@ #include #define _ERRNO_H 1 #include +#include -/* Clone the calling process, but without copying the whole address -pace. +/* Clone the calling process, but without copying the whole address space. The calling process is suspended until the new process exits or is - replaced by a call to `execve'. Return -1 for errors, 0 to the new -rocess, + replaced by a call to `execve'. Return -1 for errors, 0 to the new process, and the process ID of the new process to the old process. */ PSEUDO_PROLOGUE ENTRY (__vfork) - SINGLE_THREAD_P - bne HIDDEN_JUMPTARGET (__fork) #ifdef __NR_vfork + +#ifdef SHARED + ldr ip, 1f + ldr r0, 2f +3: add ip, pc, ip + ldr r0, [ip, r0] +#else + ldr r0, 1f +#endif + movs r0, r0 + bne HIDDEN_JUMPTARGET (__fork) + swi __NR_vfork cmn a1, #4096 RETINSTR(movcc, pc, lr) +#ifndef __ASSUME_VFORK_SYSCALL /* Check if vfork syscall is known at all. */ - ldr a2, =-ENOSYS - teq a1, a2 + cmn a1, #ENOSYS bne PLTJMP(C_SYMBOL_NAME(__syscall_error)) #endif +#endif + +#ifndef __ASSUME_VFORK_SYSCALL /* If we don't have vfork, fork is close enough. */ swi __NR_fork cmn a1, #4096 RETINSTR(movcc, pc, lr) +#elif !defined __NR_vfork +# error "__NR_vfork not available and __ASSUME_VFORK_SYSCALL defined" +#endif b PLTJMP(C_SYMBOL_NAME(__syscall_error)) +#ifdef SHARED +1: .word _GLOBAL_OFFSET_TABLE_ - 3b - 8 +2: .word __libc_pthread_functions(GOTOFF) +#else + .weak pthread_create +1: .word pthread_create +#endif + PSEUDO_END (__vfork) libc_hidden_def (__vfork) From 12a15026b8729a19acba9fc6ad286da25536768d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 17 Sep 2003 18:09:25 +0000 Subject: [PATCH 3201/4487] (CALL_ROUTINE): Deleted. (BX): Define. (ELF_MACHINE_RUNTIME_TRAMPOLINE): Optimise a little. --- sysdeps/arm/dl-machine.h | 72 +++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 42 deletions(-) diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 9c11f0b28c..15de939a3c 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -123,22 +123,10 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) return lazy; } -/* This code is used in dl-runtime.c to call the `fixup' function - and then redirect to the address it returns. */ - // macro for handling PIC situation.... -#ifdef PIC -#define CALL_ROUTINE(x) "\ - ldr sl,0f\n\ - add sl, pc, sl\n\ -1: ldr r2, 2f\n\ - mov lr, pc\n\ - add pc, sl, r2\n\ - b 3f\n\ -0: .word _GLOBAL_OFFSET_TABLE_ - 1b - 4\n\ -2: .word " #x "(GOTOFF)\n\ -3: " +#if defined(__THUMB_INTERWORK__) +#define BX(x) "bx\t" #x #else -#define CALL_ROUTINE(x) " bl " #x +#define BX(x) "mov\tpc, " #x #endif #ifndef PROF @@ -153,29 +141,29 @@ _dl_runtime_resolve:\n\ @ ip contains &GOT[n+3] (pointer to function)\n\ @ lr points to &GOT[2]\n\ \n\ - @ save almost everything; lr is already on the stack\n\ - stmdb sp!,{r0-r3,sl,fp}\n\ + @ stack arguments\n\ + stmdb sp!,{r0-r3}\n\ +\n\ + @ get pointer to linker struct\n\ + ldr r0, [lr, #-4]\n\ \n\ @ prepare to call fixup()\n\ @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each\n\ sub r1, ip, lr\n\ sub r1, r1, #4\n\ add r1, r1, r1\n\ -\n\ - @ get pointer to linker struct\n\ - ldr r0, [lr, #-4]\n\ \n\ @ call fixup routine\n\ - " CALL_ROUTINE(fixup) "\n\ + bl fixup\n\ \n\ @ save the return\n\ mov ip, r0\n\ \n\ - @ restore the stack\n\ - ldmia sp!,{r0-r3,sl,fp,lr}\n\ + @ get arguments and return address back\n\ + ldmia sp!, {r0-r3,lr}\n\ \n\ @ jump to the newly found address\n\ - mov pc, ip\n\ + " BX(ip) "\n\ \n\ .size _dl_runtime_resolve, .-_dl_runtime_resolve\n\ \n\ @@ -183,29 +171,29 @@ _dl_runtime_resolve:\n\ .type _dl_runtime_profile, #function\n\ .align 2\n\ _dl_runtime_profile:\n\ - @ save almost everything; lr is already on the stack\n\ - stmdb sp!,{r0-r3,sl,fp}\n\ + @ stack arguments\n\ + stmdb sp!, {r0-r3}\n\ +\n\ + @ get pointer to linker struct\n\ + ldr r0, [lr, #-4]\n\ \n\ @ prepare to call fixup()\n\ @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each\n\ sub r1, ip, lr\n\ sub r1, r1, #4\n\ add r1, r1, r1\n\ -\n\ - @ get pointer to linker struct\n\ - ldr r0, [lr, #-4]\n\ \n\ @ call profiling fixup routine\n\ - " CALL_ROUTINE(profile_fixup) "\n\ + bl profile_fixup\n\ \n\ @ save the return\n\ mov ip, r0\n\ \n\ - @ restore the stack\n\ - ldmia sp!,{r0-r3,sl,fp,lr}\n\ + @ get arguments and return address back\n\ + ldmia sp!, {r0-r3,lr}\n\ \n\ @ jump to the newly found address\n\ - mov pc, ip\n\ + " BX(ip) "\n\ \n\ .size _dl_runtime_resolve, .-_dl_runtime_resolve\n\ .previous\n\ @@ -225,29 +213,29 @@ _dl_runtime_profile:\n\ @ ip contains &GOT[n+3] (pointer to function)\n\ @ lr points to &GOT[2]\n\ \n\ - @ save almost everything; return add is already on the stack\n\ - stmdb sp!,{r0-r3,sl,fp}\n\ + @ stack arguments\n\ + stmdb sp!, {r0-r3}\n\ +\n\ + @ get pointer to linker struct\n\ + ldr r0, [lr, #-4]\n\ \n\ @ prepare to call fixup()\n\ @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each\n\ sub r1, ip, lr\n\ sub r1, r1, #4\n\ add r1, r1, r1\n\ -\n\ - @ get pointer to linker struct\n\ - ldr r0, [lr, #-4]\n\ \n\ @ call profiling fixup routine\n\ - " CALL_ROUTINE(fixup) "\n\ + bl fixup\n\ \n\ @ save the return\n\ mov ip, r0\n\ \n\ - @ restore the stack\n\ - ldmia sp!,{r0-r3,sl,fp,lr}\n\ + @ get arguments and return address back\n\ + ldmia sp!, {r0-r3,lr}\n\ \n\ @ jump to the newly found address\n\ - mov pc, ip\n\ + " BX(ip) "\n\ \n\ .size _dl_runtime_profile, .-_dl_runtime_profile\n\ .previous\n\ From 644d82249f8cc39df2db3b97105380b6c12f9722 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 17 Sep 2003 18:09:36 +0000 Subject: [PATCH 3202/4487] (DO_RET): New. --- sysdeps/arm/sysdep.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sysdeps/arm/sysdep.h b/sysdeps/arm/sysdep.h index 4bc7d827b8..cb3f105afe 100644 --- a/sysdeps/arm/sysdep.h +++ b/sysdeps/arm/sysdep.h @@ -52,11 +52,20 @@ ldm##cond base,reglist #define RETINSTR(instr, regs...)\ instr regs +#ifdef __THUMB_INTERWORK__ +#define DO_RET(_reg) \ + bx _reg +#else +#define DO_RET(_reg) \ + mov pc, _reg +#endif #else /* APCS-26 */ #define LOADREGS(cond, base, reglist...)\ ldm##cond base,reglist^ #define RETINSTR(instr, regs...)\ instr##s regs +#define DO_RET(_reg) \ + movs pc, _reg #endif /* Define an entry point visible from C. */ From 011f9a85d26d02c3dd27a1b64d64391e9127e792 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 17 Sep 2003 18:09:53 +0000 Subject: [PATCH 3203/4487] Add #error if __NR_vfork required but not defined. Improve test of error code. --- sysdeps/unix/sysv/linux/arm/vfork.S | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/vfork.S b/sysdeps/unix/sysv/linux/arm/vfork.S index 0630c7ff06..bba1a548ba 100644 --- a/sysdeps/unix/sysv/linux/arm/vfork.S +++ b/sysdeps/unix/sysv/linux/arm/vfork.S @@ -38,8 +38,7 @@ ENTRY (__vfork) b PLTJMP(C_SYMBOL_NAME(__syscall_error)) # else /* Check if vfork syscall is known at all. */ - ldr a2, =-ENOSYS - teq a1, a2 + cmn a2, #ENOSYS bne PLTJMP(C_SYMBOL_NAME(__syscall_error)) # endif #endif @@ -50,6 +49,8 @@ ENTRY (__vfork) cmn a1, #4096 RETINSTR(movcc, pc, lr) b PLTJMP(C_SYMBOL_NAME(__syscall_error)) +#elif !defined __NR_vfork +# error "__NR_vfork not available and __ASSUME_VFORK_SYSCALL defined" #endif PSEUDO_END (__vfork) From f32742b08826b4f0129964cc17b52d4e52b25c45 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 24 Sep 2003 03:13:28 +0000 Subject: [PATCH 3204/4487] Include compat code in build. --- sysdeps/hppa/Makefile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sysdeps/hppa/Makefile b/sysdeps/hppa/Makefile index 170bd07ab3..68651f6497 100644 --- a/sysdeps/hppa/Makefile +++ b/sysdeps/hppa/Makefile @@ -31,3 +31,14 @@ CFLAGS-rtld.c += -mdisable-fpregs dl-routines += dl-symaddr dl-fptr rtld-routines += dl-symaddr dl-fptr endif + +ifeq ($(subdir),csu) +ifeq (yes,$(build-shared)) +# Compatibility +ifeq (yes,$(have-protected)) +CPPFLAGS-libgcc-compat.c = -DHAVE_DOT_HIDDEN +endif +sysdep_routines += libgcc-compat +shared-only-routines += libgcc-compat +endif +endif From 131d66906b388cbee64fcf953e79e69536674218 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 24 Sep 2003 03:13:56 +0000 Subject: [PATCH 3205/4487] libgcc compatibility code. --- sysdeps/hppa/libgcc-compat.c | 43 ++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 sysdeps/hppa/libgcc-compat.c diff --git a/sysdeps/hppa/libgcc-compat.c b/sysdeps/hppa/libgcc-compat.c new file mode 100644 index 0000000000..2957eba89f --- /dev/null +++ b/sysdeps/hppa/libgcc-compat.c @@ -0,0 +1,43 @@ +/* pre-.hidden libgcc compatibility + Copyright (C) 2002 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Randolph Chung + + 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. */ + + +#include +#include + +#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_2_6) + +symbol_version (__clz_tab_internal, __clz_tab, GLIBC_2.2); + +typedef unsigned int UQItype __attribute__ ((mode (QI))); + +const UQItype __clz_tab_internal[] = +{ + 0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, +}; + +#endif From e62e873e95ce55e7b1ff8fb04d2786f2befe559a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 24 Sep 2003 03:14:14 +0000 Subject: [PATCH 3206/4487] Add libgcc-compat.c. --- sysdeps/hppa/Dist | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/hppa/Dist b/sysdeps/hppa/Dist index 9fc1de291a..e26e411bc5 100644 --- a/sysdeps/hppa/Dist +++ b/sysdeps/hppa/Dist @@ -1,2 +1,3 @@ +libgcc-compat.c dl-symaddr.c dl-fptr.c From de251c974b30ca8d6042a80e042706d475f12474 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 24 Sep 2003 03:14:27 +0000 Subject: [PATCH 3207/4487] [GLIBC_2.2]: Add __clz_tab. --- sysdeps/hppa/Versions | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sysdeps/hppa/Versions b/sysdeps/hppa/Versions index 909d50bbf5..2ae3cbdf17 100644 --- a/sysdeps/hppa/Versions +++ b/sysdeps/hppa/Versions @@ -5,3 +5,8 @@ ld { _dl_function_address; } } +libc { + GLIBC_2.2 { + __clz_tab; + } +} From aec9c3ef295991ce532f8bd76fb5c4406a195822 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 24 Sep 2003 05:36:39 +0000 Subject: [PATCH 3208/4487] Not needed anymore. --- sysdeps/unix/sysv/linux/alpha/sys/sysmacros.h | 29 ----------- sysdeps/unix/sysv/linux/alpha/ustat.c | 34 ------------- sysdeps/unix/sysv/linux/alpha/xmknod.c | 48 ------------------- 3 files changed, 111 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/alpha/sys/sysmacros.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/ustat.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/xmknod.c diff --git a/sysdeps/unix/sysv/linux/alpha/sys/sysmacros.h b/sysdeps/unix/sysv/linux/alpha/sys/sysmacros.h deleted file mode 100644 index 43ec376c04..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/sys/sysmacros.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Definitions of macros to access `dev_t' values. - Copyright (C) 1996, 1997, 1999 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 _SYS_SYSMACROS_H -#define _SYS_SYSMACROS_H 1 - -/* For compatibility we provide alternative names. */ -#define major(dev) ((int)(((dev) >> 8) & 0xff)) -#define minor(dev) ((int)((dev) & 0xff)) -#define makedev(major, minor) ((((unsigned int) (major)) << 8) \ - | ((unsigned int) (minor))) - -#endif /* sys/sysmacros.h */ diff --git a/sysdeps/unix/sysv/linux/alpha/ustat.c b/sysdeps/unix/sysv/linux/alpha/ustat.c deleted file mode 100644 index 4e3bf635a3..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/ustat.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (C) 1997, 2003 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 1997. - - 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. */ - -#include -#include -#include -#include - -int -ustat (dev_t dev, struct ustat *ubuf) -{ - unsigned int k_dev; - - /* We must convert the value to dev_t type used by the kernel. */ - k_dev = ((major (dev) & 0xff) << 8) | (minor (dev) & 0xff); - - return INLINE_SYSCALL (ustat, 2, k_dev, ubuf); -} diff --git a/sysdeps/unix/sysv/linux/alpha/xmknod.c b/sysdeps/unix/sysv/linux/alpha/xmknod.c deleted file mode 100644 index e74f4c0b8b..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/xmknod.c +++ /dev/null @@ -1,48 +0,0 @@ -/* xmknod call using old-style Unix mknod system call. - Copyright (C) 1991,1993,1995,1996,1997,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. */ - -#include -#include -#include -#include -#include - -/* Create a device file named PATH, with permission and special bits MODE - and device number DEV (which can be constructed from major and minor - device numbers with the `makedev' macro above). */ -int -__xmknod (int vers, const char *path, mode_t mode, dev_t *dev) -{ - unsigned int k_dev; - - if (vers != _MKNOD_VER) - { - __set_errno (EINVAL); - return -1; - } - - /* We must convert the value to dev_t type used by the kernel. */ - k_dev = ((major (*dev) & 0xff) << 8) | (minor (*dev) & 0xff); - - return INLINE_SYSCALL (mknod, 3, path, mode, k_dev); -} - -weak_alias (__xmknod, _xmknod) -libc_hidden_def (__xmknod) From b82390a8da4f7006b380a6cd45a97699837ca73a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 24 Sep 2003 21:08:31 +0000 Subject: [PATCH 3209/4487] (RTLD_START): Remove setting of __libc_stack_end. --- sysdeps/alpha/dl-machine.h | 2 -- sysdeps/arm/dl-machine.h | 6 ------ sysdeps/cris/dl-machine.h | 3 --- sysdeps/m68k/dl-machine.h | 3 --- 4 files changed, 14 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index b3c1eac695..6680abf379 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -319,8 +319,6 @@ _dl_start_user: \n\ .prologue 0 \n\ /* Save the user entry point address in s0. */ \n\ mov $0, $9 \n\ - /* Store the highest stack address. */ \n\ - stq $30, __libc_stack_end \n\ /* See if we were run as a command with the executable \n\ file name as an extra leading argument. */ \n\ ldl $1, _dl_skip_args($gp) !gprel \n\ diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 15de939a3c..9b1d53a0a1 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -265,10 +265,6 @@ _dl_start_user:\n\ ldr sl, .L_GET_GOT\n\ add sl, pc, sl\n\ .L_GOT_GOT:\n\ - @ Store the highest stack address\n\ - ldr r1, .L_STACK_END\n\ - ldr r1, [sl, r1]\n\ - str sp, [r1]\n\ @ See if we were run as a command with the executable file\n\ @ name as an extra leading argument.\n\ ldr r4, .L_SKIP_ARGS\n\ @@ -311,8 +307,6 @@ _dl_start_user:\n\ .word _dl_starting_up(GOT)\n\ .L_FINI_PROC:\n\ .word _dl_fini(GOT)\n\ -.L_STACK_END:\n\ - .word __libc_stack_end(GOT)\n\ .L_LOADED:\n\ .word _rtld_local(GOT)\n\ .previous\n\ diff --git a/sysdeps/cris/dl-machine.h b/sysdeps/cris/dl-machine.h index 206e621902..368733e73f 100644 --- a/sysdeps/cris/dl-machine.h +++ b/sysdeps/cris/dl-machine.h @@ -188,9 +188,6 @@ _dl_start_user:\n\ ; Point R0 at the GOT.\n\ move.d $pc,$r0\n\ sub.d .:GOTOFF,$r0\n\ - ; Remember the highest stack address.\n\ - move.d [$r0+__libc_stack_end:GOT16],$r13\n\ - move.d $sp,[$r13]\n\ ; See if we were run as a command with the executable file\n\ ; name as an extra leading argument.\n\ move.d [$r0+_dl_skip_args:GOT16],$r13\n\ diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index 5ae53a457d..d3bc83a011 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -157,9 +157,6 @@ _start:\n\ _dl_start_user:\n\ | Save the user entry point address in %a4.\n\ move.l %d0, %a4\n\ - | Remember the highest stack address.\n\ - move.l __libc_stack_end@GOTPC(%pc), %a0\n\ - move.l %sp, (%a0)\n\ | See if we were run as a command with the executable file\n\ | name as an extra leading argument.\n\ move.l _dl_skip_args(%pc), %d0\n\ From 3d87932d45aaf20a38dbda3a6ebbac0e50b90f43 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 25 Sep 2003 16:42:43 +0000 Subject: [PATCH 3210/4487] Define PROT_GROWSDOWN and PROT_GROWSUP. --- sysdeps/unix/sysv/linux/alpha/bits/mman.h | 8 ++++++-- sysdeps/unix/sysv/linux/arm/bits/mman.h | 4 ++++ sysdeps/unix/sysv/linux/cris/bits/mman.h | 6 +++++- sysdeps/unix/sysv/linux/hppa/bits/mman.h | 4 ++++ sysdeps/unix/sysv/linux/m68k/bits/mman.h | 4 ++++ 5 files changed, 23 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/mman.h b/sysdeps/unix/sysv/linux/alpha/bits/mman.h index 918043917b..bb41887479 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/mman.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/mman.h @@ -34,6 +34,10 @@ #define PROT_WRITE 0x2 /* Page can be written. */ #define PROT_EXEC 0x4 /* Page can be executed. */ #define PROT_NONE 0x0 /* Page can not be accessed. */ +#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of + growsdown vma (mprotect only). */ +#define PROT_GROWSUP 0x02000000 /* Extend change to start of + growsup vma (mprotect only). */ /* Sharing types (must choose one and only one of these). */ #define MAP_SHARED 0x01 /* Share changes. */ @@ -52,7 +56,7 @@ /* Not used by Linux, but here to make sure we don't clash with OSF/1 defines. */ -#if 0 && defined(__USE_BSD) +#if 0 && defined __USE_BSD # define MAP_HASSEMAPHORE 0x0200 # define MAP_INHERIT 0x0400 # define MAP_UNALIGNED 0x0800 @@ -104,7 +108,7 @@ /* Not used by Linux, but here to make sure we don't clash with OSF/1 defines. */ -#if 0 && defined(__USE_BSD) +#if 0 && defined __USE_BSD # define MADV_DONTNEED_COMPAT 4 /* Old version? */ # define MADV_SPACEAVAIL 5 /* Ensure resources are available. */ #endif diff --git a/sysdeps/unix/sysv/linux/arm/bits/mman.h b/sysdeps/unix/sysv/linux/arm/bits/mman.h index c6d475b4de..4ec6839685 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/mman.h +++ b/sysdeps/unix/sysv/linux/arm/bits/mman.h @@ -34,6 +34,10 @@ #define PROT_WRITE 0x2 /* Page can be written. */ #define PROT_EXEC 0x4 /* Page can be executed. */ #define PROT_NONE 0x0 /* Page can not be accessed. */ +#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of + growsdown vma (mprotect only). */ +#define PROT_GROWSUP 0x02000000 /* Extend change to start of + growsup vma (mprotect only). */ /* Sharing types (must choose one and only one of these). */ #define MAP_SHARED 0x01 /* Share changes. */ diff --git a/sysdeps/unix/sysv/linux/cris/bits/mman.h b/sysdeps/unix/sysv/linux/cris/bits/mman.h index 2813f0947d..b66c0bdb68 100644 --- a/sysdeps/unix/sysv/linux/cris/bits/mman.h +++ b/sysdeps/unix/sysv/linux/cris/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/CRIS version. - Copyright (C) 1997, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1997, 2000, 2001, 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 @@ -34,6 +34,10 @@ #define PROT_WRITE 0x2 /* Page can be written. */ #define PROT_EXEC 0x4 /* Page can be executed. */ #define PROT_NONE 0x0 /* Page can not be accessed. */ +#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of + growsdown vma (mprotect only). */ +#define PROT_GROWSUP 0x02000000 /* Extend change to start of + growsup vma (mprotect only). */ /* Sharing types (must choose one and only one of these). */ #define MAP_SHARED 0x01 /* Share changes. */ diff --git a/sysdeps/unix/sysv/linux/hppa/bits/mman.h b/sysdeps/unix/sysv/linux/hppa/bits/mman.h index 40db9f9b90..1eb1233814 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/mman.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/mman.h @@ -27,6 +27,10 @@ #define PROT_WRITE 0x2 /* page can be written */ #define PROT_EXEC 0x4 /* page can be executed */ #define PROT_NONE 0x0 /* page can not be accessed */ +#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of + growsdown vma (mprotect only). */ +#define PROT_GROWSUP 0x02000000 /* Extend change to start of + growsup vma (mprotect only). */ #define MAP_SHARED 0x01 /* Share changes */ #define MAP_PRIVATE 0x02 /* Changes are private */ diff --git a/sysdeps/unix/sysv/linux/m68k/bits/mman.h b/sysdeps/unix/sysv/linux/m68k/bits/mman.h index 350ea95bf9..815a3da88f 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/mman.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/mman.h @@ -34,6 +34,10 @@ #define PROT_WRITE 0x2 /* Page can be written. */ #define PROT_EXEC 0x4 /* Page can be executed. */ #define PROT_NONE 0x0 /* Page can not be accessed. */ +#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of + growsdown vma (mprotect only). */ +#define PROT_GROWSUP 0x02000000 /* Extend change to start of + growsup vma (mprotect only). */ /* Sharing types (must choose one and only one of these). */ #define MAP_SHARED 0x01 /* Share changes. */ From 66a1dc8705b6f3d43369eddf49408b90c51dc1d0 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 1 Oct 2003 06:59:40 +0000 Subject: [PATCH 3211/4487] 2003-09-10 Chris Demetriou * sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h: Remove "#if 0" surrounding most of contents. (SYSCALL_ERROR_LABEL): Define. (__SYSCALL_CLOBBERS): Add $10. (internal_syscall7): Remove. * sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h: Likewise. --- .../unix/sysv/linux/mips/mips64/n32/sysdep.h | 42 +++++-------------- .../unix/sysv/linux/mips/mips64/n64/sysdep.h | 42 +++++-------------- 2 files changed, 20 insertions(+), 64 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h index 71099711d0..2b2aefa15d 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h @@ -33,9 +33,16 @@ # define SYS_ify(syscall_name) __NR_N32_/**/syscall_name #endif +#ifdef __ASSEMBLER__ + +/* We don't want the label for the error handler to be visible in the symbol + table when we define it here. */ +#ifdef __PIC__ +# define SYSCALL_ERROR_LABEL 99b +#endif + +#else /* ! __ASSEMBLER__ */ -#ifndef __ASSEMBLER__ -#if 0 /* untested */ /* Define a macro which expands into the inline wrapper code for a system call. */ #undef INLINE_SYSCALL @@ -228,36 +235,7 @@ _sys_result; \ }) -#define internal_syscall7(name, err, arg1, arg2, arg3, arg4, arg5, arg6, arg7)\ -({ \ - long _sys_result; \ - \ - { \ - register long long __v0 asm("$2"); \ - register long long __a0 asm("$4") = (long long) arg1; \ - register long long __a1 asm("$5") = (long long) arg2; \ - register long long __a2 asm("$6") = (long long) arg3; \ - register long long __a3 asm("$7") = (long long) arg4; \ - register long long __a4 asm("$8") = (long long) arg5; \ - register long long __a5 asm("$9") = (long long) arg6; \ - register long long __a6 asm("$10") = (long long) arg7; \ - __asm__ volatile ( \ - ".set\tnoreorder\n\t" \ - "li\t$2, %5\t\t\t# " #name "\n\t" \ - "syscall\n\t" \ - ".set\treorder" \ - : "=r" (__v0), "+r" (__a3) \ - : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \ - "r" (__a4), "r" (__a5), "r" (__a6) \ - : __SYSCALL_CLOBBERS); \ - err = __a3; \ - _sys_result = __v0; \ - } \ - _sys_result; \ -}) - -#define __SYSCALL_CLOBBERS "$1", "$3", "$11", "$12", "$13", "$14", "$15", "$24", "$25" -#endif /* untested */ +#define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", "$14", "$15", "$24", "$25" #endif /* __ASSEMBLER__ */ #endif /* linux/mips/sysdep.h */ diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h index 4341c18345..e2d8707d25 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h @@ -33,9 +33,16 @@ # define SYS_ify(syscall_name) __NR_N64_/**/syscall_name #endif +#ifdef __ASSEMBLER__ + +/* We don't want the label for the error handler to be visible in the symbol + table when we define it here. */ +#ifdef __PIC__ +# define SYSCALL_ERROR_LABEL 99b +#endif + +#else /* ! __ASSEMBLER__ */ -#ifndef __ASSEMBLER__ -#if 0 /* untested */ /* Define a macro which expands into the inline wrapper code for a system call. */ #undef INLINE_SYSCALL @@ -228,36 +235,7 @@ _sys_result; \ }) -#define internal_syscall7(name, err, arg1, arg2, arg3, arg4, arg5, arg6, arg7)\ -({ \ - long _sys_result; \ - \ - { \ - register long __v0 asm("$2"); \ - register long __a0 asm("$4") = (long) arg1; \ - register long __a1 asm("$5") = (long) arg2; \ - register long __a2 asm("$6") = (long) arg3; \ - register long __a3 asm("$7") = (long) arg4; \ - register long __a4 asm("$8") = (long) arg5; \ - register long __a5 asm("$9") = (long) arg6; \ - register long __a6 asm("$10") = (long) arg7; \ - __asm__ volatile ( \ - ".set\tnoreorder\n\t" \ - "li\t$2, %5\t\t\t# " #name "\n\t" \ - "syscall\n\t" \ - ".set\treorder" \ - : "=r" (__v0), "+r" (__a3) \ - : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \ - "r" (__a4), "r" (__a5), "r" (__a6) \ - : __SYSCALL_CLOBBERS); \ - err = __a3; \ - _sys_result = __v0; \ - } \ - _sys_result; \ -}) - -#define __SYSCALL_CLOBBERS "$1", "$3", "$11", "$12", "$13", "$14", "$15", "$24", "$25" -#endif /* untested */ +#define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", "$14", "$15", "$24", "$25" #endif /* __ASSEMBLER__ */ #endif /* linux/mips/sysdep.h */ From 6f12dcc7b8cb5067de8f00c9e6ad590bb6f3092b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 11 Oct 2003 01:28:59 +0000 Subject: [PATCH 3212/4487] 2003-10-10 Carlos O'Donell * sysdeps/hppa/Makefile (CFLAGS-malloc.c): Variable removed. --- sysdeps/hppa/Makefile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sysdeps/hppa/Makefile b/sysdeps/hppa/Makefile index 68651f6497..bd9c96c70f 100644 --- a/sysdeps/hppa/Makefile +++ b/sysdeps/hppa/Makefile @@ -22,10 +22,6 @@ # CFLAGS-.os += -ffunction-sections LDFLAGS-c_pic.os += -Wl,--unique=.text* -ifeq ($(subdir),malloc) -CFLAGS-malloc.c += -DMALLOC_ALIGNMENT=16 -endif - ifeq ($(subdir),elf) CFLAGS-rtld.c += -mdisable-fpregs dl-routines += dl-symaddr dl-fptr From aca984867e7770eeddacc9f1425fcda4d5d6444e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 15 Oct 2003 05:31:42 +0000 Subject: [PATCH 3213/4487] Undef JUMPTARGET before use. --- sysdeps/hppa/sysdep.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/hppa/sysdep.h b/sysdeps/hppa/sysdep.h index 1f47fadb3f..be36567434 100644 --- a/sysdeps/hppa/sysdep.h +++ b/sysdeps/hppa/sysdep.h @@ -1,5 +1,5 @@ /* Assembler macros for HP/PA. - Copyright (C) 1999 Free Software Foundation, Inc. + Copyright (C) 1999, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, , August 1999. @@ -70,6 +70,7 @@ #define PSEUDO_END(name) \ END (name) +#undef JUMPTARGET #define JUMPTARGET(name) name #define SYSCALL_PIC_SETUP /* Nothing. */ From 5420f85dbe86b32d36dbf12e1358551d8de762ee Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 15 Oct 2003 05:45:16 +0000 Subject: [PATCH 3214/4487] (syscall): Cleanup asm statment. --- sysdeps/unix/sysv/linux/hppa/sysdep.c | 40 +++++++++++++++++---------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.c b/sysdeps/unix/sysv/linux/hppa/sysdep.c index bf4d4af5c7..192efbaf75 100644 --- a/sysdeps/unix/sysv/linux/hppa/sysdep.c +++ b/sysdeps/unix/sysv/linux/hppa/sysdep.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2001, 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 @@ -19,6 +19,10 @@ #include #include +extern int __syscall_error(int err_no); +extern int syscall (int sysnum, int arg0, int arg1, int arg2, + int arg3, int arg4, int arg5); + /* This routine is jumped to by all the syscall handlers, to stash an error number into errno. */ int @@ -30,25 +34,31 @@ __syscall_error (int err_no) /* HPPA implements syscall() in 'C'; the assembler version would - typically be in syscall.S. */ - + typically be in syscall.S. Also note that we have INLINE_SYSCALL, + INTERNAL_SYSCALL, and all the generated pure assembly syscall wrappers. + How often the function is used is unknown. */ int -syscall (int sysnum, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5) +syscall (int sysnum, int arg0, int arg1, int arg2, int arg3, int arg4, + int arg5) { - long __sys_res; + /* FIXME: Keep this matching INLINE_SYSCALL for hppa */ + long int __sys_res; { - register unsigned long __res asm("r28"); - LOAD_ARGS_6(arg0, arg1, arg2, arg3, arg4, arg5) - asm volatile ("ble 0x100(%%sr2, %%r0)\n\t" - "copy %1, %%r20" - : "=r" (__res) - : "r" (sysnum) ASM_ARGS_6); + register unsigned long int __res asm("r28"); + LOAD_ARGS_6 (arg0, arg1, arg2, arg3, arg4, arg5) + asm volatile (STW_ASM_PIC + " ble 0x100(%%sr2, %%r0) \n" + " copy %1, %%r20 \n" + LDW_ASM_PIC + : "=r" (__res) + : "r" (sysnum) ASM_ARGS_6 + : CALL_CLOB_REGS CLOB_ARGS_6); __sys_res = __res; } - if ((unsigned long) __sys_res >= (unsigned long)-4095) + if ((unsigned long int) __sys_res >= (unsigned long int) -4095) { - __set_errno(-__sys_res); - __sys_res = -1; - } + __set_errno (-__sys_res); + __sys_res = -1; + } return __sys_res; } From f19a935e1b4e950cacc0446bb003dd6600864d15 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 15 Oct 2003 05:46:00 +0000 Subject: [PATCH 3215/4487] Define PSEUDO_ERRVAL, SYSCALL_ERROR_LABEL under all conditions, INTERNAL_SYSCALL_DECL, INTERNAL_SYSCALL_ERROR_P, INTERNAL_SYSCALL_ERRNO, INTERNAL_SYSCALL, and undef JUMPTARGET before use. [PIC]: Save pic register around syscall. --- sysdeps/unix/sysv/linux/hppa/sysdep.h | 276 +++++++++++++++++++++----- 1 file changed, 223 insertions(+), 53 deletions(-) diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.h b/sysdeps/unix/sysv/linux/hppa/sysdep.h index 771c55c400..bb5e31dbb9 100644 --- a/sysdeps/unix/sysv/linux/hppa/sysdep.h +++ b/sysdeps/unix/sysv/linux/hppa/sysdep.h @@ -25,12 +25,26 @@ #include "config.h" #ifndef ASM_LINE_SEP -#define ASM_LINE_SEP ; +# define ASM_LINE_SEP ; #endif #undef SYS_ify #define SYS_ify(syscall_name) (__NR_##syscall_name) +#ifdef PIC +/* WARNING: CANNOT BE USED IN A NOP! */ +# define STW_PIC stw %r19, -32(%sr0, %sp) ASM_LINE_SEP +# define LDW_PIC ldw -32(%sr0, %sp), %r19 ASM_LINE_SEP +# define STW_ASM_PIC " copy %%r19, %%r4\n" +# define LDW_ASM_PIC " copy %%r4, %%r19\n" +# define USING_GR4 "%r4", +#else +# define STW_PIC ASM_LINE_SEP +# define LDW_PIC ASM_LINE_SEP +# define STW_ASM_PIC " \n" +# define LDW_ASM_PIC " \n" +# define USING_GR4 +#endif #ifdef __ASSEMBLER__ @@ -77,20 +91,13 @@ .text ASM_LINE_SEP \ .export C_SYMBOL_NAME(name) ASM_LINE_SEP \ .type C_SYMBOL_NAME(name),@function ASM_LINE_SEP \ - C_LABEL(name) \ - CALL_MCOUNT - -#define ret \ - bv 0(2) ASM_LINE_SEP \ - nop - -#define ret_NOERRNO \ - bv 0(2) ASM_LINE_SEP \ - nop + C_LABEL(name) ASM_LINE_SEP \ + CALL_MCOUNT ASM_LINE_SEP #undef END -#define END(name) \ -1: .size C_SYMBOL_NAME(name),1b-C_SYMBOL_NAME(name) +#define END(name) \ +1: ASM_LINE_SEP \ +.size C_SYMBOL_NAME(name),1b-C_SYMBOL_NAME(name) ASM_LINE_SEP /* If compiled for profiling, call `mcount' at the start of each function. */ /* No, don't bother. gcc will put the call in for us. */ @@ -110,27 +117,83 @@ nop */ -#define PSEUDO(name, syscall_name, args) \ - ENTRY (name) \ - DO_CALL(syscall_name, args) ASM_LINE_SEP \ - nop +#define PSEUDO(name, syscall_name, args) \ + ENTRY (name) \ + DO_CALL(syscall_name, args) ASM_LINE_SEP \ + nop ASM_LINE_SEP + +#define ret \ + /* Return value set by ERRNO code */ ASM_LINE_SEP \ + bv 0(2) ASM_LINE_SEP \ + nop ASM_LINE_SEP #undef PSEUDO_END -#define PSEUDO_END(name) \ +#define PSEUDO_END(name) \ END (name) -#define PSEUDO_NOERRNO(name, syscall_name, args) \ - ENTRY (name) \ - DO_CALL(syscall_name, args) ASM_LINE_SEP \ - nop +/* We don't set the errno on the return from the syscall */ +#define PSEUDO_NOERRNO(name, syscall_name, args) \ + ENTRY (name) \ + DO_CALL_NOERRNO(syscall_name, args) ASM_LINE_SEP \ + nop ASM_LINE_SEP + +#define ret_NOERRNO ret #undef PSEUDO_END_NOERRNO -#define PSEUDO_END_NOERRNO(name) \ +#define PSEUDO_END_NOERRNO(name) \ END (name) +/* This has to return the error value */ +#undef PSEUDO_ERRVAL +#define PSEUDO_ERRVAL(name, syscall_name, args) \ + ENTRY(name) \ + DO_CALL_ERRVAL(syscall_name, args) ASM_LINE_SEP \ + nop ASM_LINE_SEP + +#define ret_ERRVAL ret + +#undef PSEUDO_END_ERRVAL +#define PSEUDO_END_ERRVAL(name) \ + END(name) + +#undef JUMPTARGET #define JUMPTARGET(name) name #define SYSCALL_PIC_SETUP /* Nothing. */ + +/* All the syscall assembly macros rely on finding the approriate + SYSCALL_ERROR_LABEL or rather HANDLER. */ + +/* int * __errno_location(void) so you have to store your value + into the return address! */ +#define DEFAULT_SYSCALL_ERROR_HANDLER \ + .import __errno_location,code ASM_LINE_SEP \ + /* branch to errno handler */ ASM_LINE_SEP \ + bl __errno_location,%rp ASM_LINE_SEP + +/* Here are the myriad of configuration options that the above can + work for... what we've done is provide the framework for future + changes if required to each section */ + +#ifdef PIC +# if RTLD_PRIVATE_ERRNO +# define SYSCALL_ERROR_HANDLER DEFAULT_SYSCALL_ERROR_HANDLER +# else /* !RTLD_PRIVATE_ERRNO */ +# if defined _LIBC_REENTRANT +# define SYSCALL_ERROR_HANDLER DEFAULT_SYSCALL_ERROR_HANDLER +# else /* !_LIBC_REENTRANT */ +# define SYSCALL_ERROR_HANDLER DEFAULT_SYSCALL_ERROR_HANDLER +# endif /* _LIBC_REENTRANT */ +# endif /* RTLD_PRIVATE_ERRNO */ +#else +# ifndef _LIBC_REENTRANT +# define SYSCALL_ERROR_HANDLER DEFAULT_SYSCALL_ERROR_HANDLER +# else +# define SYSCALL_ERROR_HANDLER DEFAULT_SYSCALL_ERROR_HANDLER +# endif +#endif + + /* Linux takes system call arguments in registers: syscall number gr20 arg 1 gr26 @@ -159,25 +222,61 @@ #undef DO_CALL #define DO_CALL(syscall_name, args) \ - DOARGS_##args \ + DOARGS_##args ASM_LINE_SEP \ + STW_PIC ASM_LINE_SEP \ + /* Do syscall, delay loads # */ ASM_LINE_SEP \ ble 0x100(%sr2,%r0) ASM_LINE_SEP \ ldi SYS_ify (syscall_name), %r20 ASM_LINE_SEP \ ldi -0x1000,%r1 ASM_LINE_SEP \ cmpb,>>=,n %r1,%ret0,0f ASM_LINE_SEP \ - stw %rp, -20(%sr0,%r30) ASM_LINE_SEP \ - stw %ret0, -24(%sr0,%r30) ASM_LINE_SEP \ - .import __errno_location,code ASM_LINE_SEP \ - bl __errno_location,%rp ASM_LINE_SEP \ - ldo 64(%r30), %r30 ASM_LINE_SEP \ - ldo -64(%r30), %r30 ASM_LINE_SEP \ - ldw -24(%r30), %r26 ASM_LINE_SEP \ + /* save rp or we get lost */ ASM_LINE_SEP \ + stw %rp, -20(%sr0,%sp) ASM_LINE_SEP \ + /* Restore r19 from frame */ ASM_LINE_SEP \ + LDW_PIC ASM_LINE_SEP \ + stw %ret0, -24(%sr0,%sp) ASM_LINE_SEP \ + SYSCALL_ERROR_HANDLER ASM_LINE_SEP \ + /* create frame */ ASM_LINE_SEP \ + ldo 64(%sp), %sp ASM_LINE_SEP \ + ldo -64(%sp), %sp ASM_LINE_SEP \ + /* OPTIMIZE: Don't reload r19 */ ASM_LINE_SEP \ + /* do a -1*syscall_ret0 */ ASM_LINE_SEP \ + ldw -24(%sr0,%sp), %r26 ASM_LINE_SEP \ sub %r0, %r26, %r26 ASM_LINE_SEP \ + /* Store into errno location */ ASM_LINE_SEP \ stw %r26, 0(%sr0,%ret0) ASM_LINE_SEP \ + /* return -1 as error */ ASM_LINE_SEP \ ldo -1(%r0), %ret0 ASM_LINE_SEP \ - ldw -20(%r30), %rp ASM_LINE_SEP \ + ldw -20(%sr0,%sp), %rp ASM_LINE_SEP \ 0: ASM_LINE_SEP \ + UNDOARGS_##args ASM_LINE_SEP + +/* We do nothing with the return, except hand it back to someone else */ +#undef DO_CALL_NOERRNO +#define DO_CALL_NOERRNO(syscall_name, args) \ + DOARGS_##args \ + /* No need to store r19 */ ASM_LINE_SEP \ + ble 0x100(%sr2,%r0) ASM_LINE_SEP \ + ldi SYS_ify (syscall_name), %r20 ASM_LINE_SEP \ + /* Caller will restore r19 */ ASM_LINE_SEP \ UNDOARGS_##args +/* Here, we return the ERRVAL in assembly, note we don't call the + error handler function, but we do 'negate' the return _IF_ + it's an error. Not sure if this is the right semantic. */ + +#undef DO_CALL_ERRVAL +#define DO_CALL_ERRVAL(syscall_name, args) \ + DOARGS_##args ASM_LINE_SEP \ + /* No need to store r19 */ ASM_LINE_SEP \ + ble 0x100(%sr2,%r0) ASM_LINE_SEP \ + ldi SYS_ify (syscall_name), %r20 ASM_LINE_SEP \ + /* Caller will restore r19 */ ASM_LINE_SEP \ + ldi -0x1000,%r1 ASM_LINE_SEP \ + cmpb,>>=,n %r1,%ret0,0f ASM_LINE_SEP \ + sub %r0, %ret0, %ret0 ASM_LINE_SEP \ +0: ASM_LINE_SEP \ + UNDOARGS_##args ASM_LINE_SEP + #define DOARGS_0 /* nothing */ #define DOARGS_1 /* nothing */ #define DOARGS_2 /* nothing */ @@ -198,53 +297,124 @@ #else +/* GCC has to be warned that a syscall may clobber all the ABI + registers listed as "caller-saves", see page 8, Table 2 + in section 2.2.6 of the PA-RISC RUN-TIME architecture + document. However! r28 is the result and will conflict with + the clobber list so it is left out. Also the input arguments + registers r20 -> r26 will conflict with the list so they + are treated specially. Although r19 is clobbered by the syscall + we cannot say this because it would violate ABI, thus we say + r4 is clobbered and use that register to save/restore r19 + across the syscall. */ + +#define CALL_CLOB_REGS "%r1", "%r2", USING_GR4 \ + "%r20", "%r29", "%r31" + #undef INLINE_SYSCALL -#define INLINE_SYSCALL(name, nr, args...) ({ \ +#define INLINE_SYSCALL(name, nr, args...) ({ \ + long __sys_res; \ + { \ + register unsigned long __res asm("r28"); \ + LOAD_ARGS_##nr(args) \ + /* FIXME: HACK stw/ldw r19 around syscall */ \ + asm volatile( \ + STW_ASM_PIC \ + " ble 0x100(%%sr2, %%r0)\n" \ + " ldi %1, %%r20\n" \ + LDW_ASM_PIC \ + : "=r" (__res) \ + : "i" (SYS_ify(name)) ASM_ARGS_##nr \ + : CALL_CLOB_REGS CLOB_ARGS_##nr \ + ); \ + __sys_res = (long)__res; \ + } \ + if ( (unsigned long)__sys_res >= (unsigned long)-4095 ){ \ + __set_errno(-__sys_res); \ + __sys_res = -1; \ + } \ + __sys_res; \ +}) + +/* INTERNAL_SYSCALL_DECL - Allows us to setup some function static + value to use within the context of the syscall + INTERNAL_SYSCALL_ERROR_P - Returns 0 if it wasn't an error, 1 otherwise + You are allowed to use the syscall result (val) and the DECL error variable + to determine what went wrong. + INTERLAL_SYSCALL_ERRNO - Munges the val/err pair into the error number. + In our case we just flip the sign. */ + +#undef INTERNAL_SYSCALL_DECL +#define INTERNAL_SYSCALL_DECL(err) do { } while (0) + +/* Equivalent to (val < 0)&&(val > -4095) which is what we want */ +#undef INTERNAL_SYSCALL_ERROR_P +#define INTERNAL_SYSCALL_ERROR_P(val, err) \ + ((unsigned long)val >= (unsigned long)-4095) + +#undef INTERNAL_SYSCALL_ERRNO +#define INTERNAL_SYSCALL_ERRNO(val, err) (-(val)) + +/* Similar to INLINE_SYSCALL but we don't set errno */ +#undef INTERNAL_SYSCALL +#define INTERNAL_SYSCALL(name, err, nr, args...) \ +({ \ long __sys_res; \ { \ register unsigned long __res asm("r28"); \ LOAD_ARGS_##nr(args) \ + /* FIXME: HACK stw/ldw r19 around syscall */ \ asm volatile( \ - "ble 0x100(%%sr2, %%r0)\n\t" \ - " ldi %1, %%r20" \ + STW_ASM_PIC \ + " ble 0x100(%%sr2, %%r0)\n" \ + " ldi %1, %%r20\n" \ + LDW_ASM_PIC \ : "=r" (__res) \ : "i" (SYS_ify(name)) ASM_ARGS_##nr \ ); \ - __sys_res = __res; \ - } \ - if ((unsigned long)__sys_res >= (unsigned long)-4095) { \ - __set_errno(-__sys_res); \ - __sys_res = -1; \ + : CALL_CLOB_REGS CLOB_ARGS_##nr \ + ); \ + __sys_res = (long)__res; \ } \ __sys_res; \ -}) + }) #define LOAD_ARGS_0() #define LOAD_ARGS_1(r26) \ - register unsigned long __r26 __asm__("r26") = (unsigned long)r26; \ + register unsigned long __r26 __asm__("r26") = (unsigned long)r26; \ LOAD_ARGS_0() #define LOAD_ARGS_2(r26,r25) \ - register unsigned long __r25 __asm__("r25") = (unsigned long)r25; \ + register unsigned long __r25 __asm__("r25") = (unsigned long)r25; \ LOAD_ARGS_1(r26) #define LOAD_ARGS_3(r26,r25,r24) \ - register unsigned long __r24 __asm__("r24") = (unsigned long)r24; \ + register unsigned long __r24 __asm__("r24") = (unsigned long)r24; \ LOAD_ARGS_2(r26,r25) #define LOAD_ARGS_4(r26,r25,r24,r23) \ - register unsigned long __r23 __asm__("r23") = (unsigned long)r23; \ + register unsigned long __r23 __asm__("r23") = (unsigned long)r23; \ LOAD_ARGS_3(r26,r25,r24) #define LOAD_ARGS_5(r26,r25,r24,r23,r22) \ - register unsigned long __r22 __asm__("r22") = (unsigned long)r22; \ + register unsigned long __r22 __asm__("r22") = (unsigned long)r22; \ LOAD_ARGS_4(r26,r25,r24,r23) #define LOAD_ARGS_6(r26,r25,r24,r23,r22,r21) \ - register unsigned long __r21 __asm__("r21") = (unsigned long)r21; \ + register unsigned long __r21 __asm__("r21") = (unsigned long)r21; \ LOAD_ARGS_5(r26,r25,r24,r23,r22) +/* Even with zero args we use r20 for the syscall number */ #define ASM_ARGS_0 -#define ASM_ARGS_1 , "r" (__r26) -#define ASM_ARGS_2 , "r" (__r26), "r" (__r25) -#define ASM_ARGS_3 , "r" (__r26), "r" (__r25), "r" (__r24) -#define ASM_ARGS_4 , "r" (__r26), "r" (__r25), "r" (__r24), "r" (__r23) -#define ASM_ARGS_5 , "r" (__r26), "r" (__r25), "r" (__r24), "r" (__r23), "r" (__r22) -#define ASM_ARGS_6 , "r" (__r26), "r" (__r25), "r" (__r24), "r" (__r23), "r" (__r22), "r" (__r21) +#define ASM_ARGS_1 ASM_ARGS_0, "r" (__r26) +#define ASM_ARGS_2 ASM_ARGS_1, "r" (__r25) +#define ASM_ARGS_3 ASM_ARGS_2, "r" (__r24) +#define ASM_ARGS_4 ASM_ARGS_3, "r" (__r23) +#define ASM_ARGS_5 ASM_ARGS_4, "r" (__r22) +#define ASM_ARGS_6 ASM_ARGS_5, "r" (__r21) + +/* The registers not listed as inputs but clobbered */ +#define CLOB_ARGS_6 +#define CLOB_ARGS_5 CLOB_ARGS_6, "%r21" +#define CLOB_ARGS_4 CLOB_ARGS_5, "%r22" +#define CLOB_ARGS_3 CLOB_ARGS_4, "%r23" +#define CLOB_ARGS_2 CLOB_ARGS_3, "%r24" +#define CLOB_ARGS_1 CLOB_ARGS_2, "%r25" +#define CLOB_ARGS_0 CLOB_ARGS_1, "%r26" #endif /* __ASSEMBLER__ */ From fb86edea204c16b9f6f86df9594e8053618957db Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 22 Oct 2003 07:09:31 +0000 Subject: [PATCH 3216/4487] 2003-10-18 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/sysdep.h: Fix merge error. --- sysdeps/unix/sysv/linux/hppa/sysdep.h | 1 - 1 file changed, 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.h b/sysdeps/unix/sysv/linux/hppa/sysdep.h index bb5e31dbb9..1085db3fc7 100644 --- a/sysdeps/unix/sysv/linux/hppa/sysdep.h +++ b/sysdeps/unix/sysv/linux/hppa/sysdep.h @@ -371,7 +371,6 @@ LDW_ASM_PIC \ : "=r" (__res) \ : "i" (SYS_ify(name)) ASM_ARGS_##nr \ - ); \ : CALL_CLOB_REGS CLOB_ARGS_##nr \ ); \ __sys_res = (long)__res; \ From 49096d939f7737a7a88066a28955cdf9bfdfeb2d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 3 Nov 2003 17:18:38 +0000 Subject: [PATCH 3217/4487] (LOAD_ARGS_0) (LOAD_ARGS_1, LOAD_ARGS_2, LOAD_ARGS_3, LOAD_ARGS_4) (LOAD_ARGS_5, LOAD_ARGS_6): Add missing parentheses. --- sysdeps/unix/sysv/linux/hppa/sysdep.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.h b/sysdeps/unix/sysv/linux/hppa/sysdep.h index 1085db3fc7..4cfe63c556 100644 --- a/sysdeps/unix/sysv/linux/hppa/sysdep.h +++ b/sysdeps/unix/sysv/linux/hppa/sysdep.h @@ -380,22 +380,22 @@ #define LOAD_ARGS_0() #define LOAD_ARGS_1(r26) \ - register unsigned long __r26 __asm__("r26") = (unsigned long)r26; \ + register unsigned long __r26 __asm__("r26") = (unsigned long)(r26); \ LOAD_ARGS_0() #define LOAD_ARGS_2(r26,r25) \ - register unsigned long __r25 __asm__("r25") = (unsigned long)r25; \ + register unsigned long __r25 __asm__("r25") = (unsigned long)(r25); \ LOAD_ARGS_1(r26) #define LOAD_ARGS_3(r26,r25,r24) \ - register unsigned long __r24 __asm__("r24") = (unsigned long)r24; \ + register unsigned long __r24 __asm__("r24") = (unsigned long)(r24); \ LOAD_ARGS_2(r26,r25) #define LOAD_ARGS_4(r26,r25,r24,r23) \ - register unsigned long __r23 __asm__("r23") = (unsigned long)r23; \ + register unsigned long __r23 __asm__("r23") = (unsigned long)(r23); \ LOAD_ARGS_3(r26,r25,r24) #define LOAD_ARGS_5(r26,r25,r24,r23,r22) \ - register unsigned long __r22 __asm__("r22") = (unsigned long)r22; \ + register unsigned long __r22 __asm__("r22") = (unsigned long)(r22); \ LOAD_ARGS_4(r26,r25,r24,r23) #define LOAD_ARGS_6(r26,r25,r24,r23,r22,r21) \ - register unsigned long __r21 __asm__("r21") = (unsigned long)r21; \ + register unsigned long __r21 __asm__("r21") = (unsigned long)(r21); \ LOAD_ARGS_5(r26,r25,r24,r23,r22) /* Even with zero args we use r20 for the syscall number */ From fd1f2c4aab382c2438a59dc8ad5e2b4822024d1f Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 30 Nov 2003 16:44:48 +0000 Subject: [PATCH 3218/4487] (PSEUDO_ERRVAL) (PSEUDO_END_ERRVAL, ret_ERRVAL): Define. --- sysdeps/unix/sysv/linux/m68k/sysdep.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h index aabd46fe0d..3c6266bae4 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -78,7 +78,21 @@ #define PSEUDO_END_NOERRNO(name) \ END (name) -#define ret_NOERRNO ret +#define ret_NOERRNO rts + +/* The function has to return the error code. */ +#undef PSEUDO_ERRVAL +#define PSEUDO_ERRVAL(name, syscall_name, args) \ + .text; \ + ENTRY (name) \ + DO_CALL (syscall_name, args); \ + negl %d0 + +#undef PSEUDO_END_ERRVAL +#define PSEUDO_END_ERRVAL(name) \ + END (name) + +#define ret_ERRVAL rts #ifdef PIC # if RTLD_PRIVATE_ERRNO From d9f0b23a78ba3dc5deee8c987562a521a2018c23 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 6 Dec 2003 07:16:41 +0000 Subject: [PATCH 3219/4487] (__fegetexceptflag): Add masking of fenv. --- sysdeps/powerpc/nofpu/fgetexcptflg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/powerpc/nofpu/fgetexcptflg.c b/sysdeps/powerpc/nofpu/fgetexcptflg.c index 9d4f078d23..713bd92881 100644 --- a/sysdeps/powerpc/nofpu/fgetexcptflg.c +++ b/sysdeps/powerpc/nofpu/fgetexcptflg.c @@ -24,7 +24,7 @@ __fegetexceptflag (fexcept_t *flagp, int excepts) { - *flagp = (fexcept_t) __sim_exceptions; + *flagp = (fexcept_t) __sim_exceptions & excepts & FE_ALL_EXCEPT; return 0; } From c34667d768063397fef477f50c25f56bc4a85b2c Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 10 Dec 2003 05:45:29 +0000 Subject: [PATCH 3220/4487] Mark sqrt_data as used. --- sysdeps/alpha/fpu/e_sqrt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/fpu/e_sqrt.c b/sysdeps/alpha/fpu/e_sqrt.c index a371896765..c5ab25f16f 100644 --- a/sysdeps/alpha/fpu/e_sqrt.c +++ b/sysdeps/alpha/fpu/e_sqrt.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1996,1997,1998,2002,2003 Free Software Foundation, Inc. Contributed by David Mosberger (davidm@cs.arizona.edu). This file is part of the GNU C Library. @@ -33,7 +33,7 @@ const static struct sqrt_data_struct { unsigned long dn, up, half, almost_three_half; unsigned long one_and_a_half, two_to_minus_30, one, nan; const int T2[64]; -} sqrt_data = { +} sqrt_data __attribute__((used)) = { 0x3fefffffffffffff, /* __dn = nextafter(1,-Inf) */ 0x3ff0000000000001, /* __up = nextafter(1,+Inf) */ 0x3fe0000000000000, /* half */ From dfc6dfb9a6e0af08ee449989392c937fa1482fdb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 18 Dec 2003 03:51:49 +0000 Subject: [PATCH 3221/4487] Add dl-symaddr and dl-fptr to the correct build strings. --- sysdeps/hppa/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sysdeps/hppa/Makefile b/sysdeps/hppa/Makefile index bd9c96c70f..73947031dc 100644 --- a/sysdeps/hppa/Makefile +++ b/sysdeps/hppa/Makefile @@ -24,8 +24,9 @@ LDFLAGS-c_pic.os += -Wl,--unique=.text* ifeq ($(subdir),elf) CFLAGS-rtld.c += -mdisable-fpregs -dl-routines += dl-symaddr dl-fptr -rtld-routines += dl-symaddr dl-fptr +sysdep-dl-routines += dl-symaddr dl-fptr +sysdep_routines += $(sysdep-dl-routines) +sysdep-rtld-routines += $(sysdep-dl-routines) endif ifeq ($(subdir),csu) From 1294f72885610445b629a6a4fe1ebcd3f5e5b5a0 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 18 Dec 2003 03:52:28 +0000 Subject: [PATCH 3222/4487] Configuration for hppa function descriptor handling. --- sysdeps/hppa/dl-fptr.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 sysdeps/hppa/dl-fptr.h diff --git a/sysdeps/hppa/dl-fptr.h b/sysdeps/hppa/dl-fptr.h new file mode 100644 index 0000000000..2ac9740e30 --- /dev/null +++ b/sysdeps/hppa/dl-fptr.h @@ -0,0 +1,35 @@ +/* Function descriptors. HPPA version. + Copyright (C) 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 dl_hppa_fptr_h +#define dl_hppa_fptr_h 1 + +#include + +/* There are currently 20 dynamic symbols in ld.so. + ELF_MACHINE_BOOT_FPTR_TABLE_LEN needs to be at least that big. */ +#define ELF_MACHINE_BOOT_FPTR_TABLE_LEN 200 + +#define ELF_MACHINE_LOAD_ADDRESS(var, symbol) \ + asm (" addil LT%%" #symbol ", %%r19\n" \ + " ldw RT%%" #symbol "(%%sr0,%%r1), %0\n" \ + : "=&r" (var)); + + +#endif /* !dl_hppa_fptr_h */ From 866956e5c3f49ceaf6bf9a8f85fc35929136a9a6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 18 Dec 2003 03:53:02 +0000 Subject: [PATCH 3223/4487] Not needed anymore. --- sysdeps/hppa/dl-fptr.c | 211 ----------------------------------------- 1 file changed, 211 deletions(-) delete mode 100644 sysdeps/hppa/dl-fptr.c diff --git a/sysdeps/hppa/dl-fptr.c b/sysdeps/hppa/dl-fptr.c deleted file mode 100644 index f8b6424abf..0000000000 --- a/sysdeps/hppa/dl-fptr.c +++ /dev/null @@ -1,211 +0,0 @@ -/* Make dynamic PLABELs for function pointers. HPPA version. - Copyright (C) 1999, 2000, 2002 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. */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef _LIBC_REENTRANT -# include - -/* Remember, we use 0 to mean that a lock is taken on PA-RISC. */ -static int __hppa_fptr_lock = 1; -#endif - -/* Because ld.so is now versioned, these functions can be in their own - file; no relocations need to be done to call them. Of course, if - ld.so is not versioned... */ -#if 0 -#ifndef DO_VERSIONING -# error "This will not work with versioning turned off, sorry." -#endif -#endif - -#ifdef MAP_ANON -/* The fd is not examined when using MAP_ANON. */ -# define ANONFD -1 -#else -# define ANONFD GL(dl_zerofd) -#endif - -struct hppa_fptr __boot_ldso_fptr[HPPA_BOOT_FPTR_SIZE]; -struct hppa_fptr *__fptr_root = NULL; -struct hppa_fptr *__fptr_next = __boot_ldso_fptr; -static struct hppa_fptr *__fptr_free = NULL; -int __fptr_count = HPPA_BOOT_FPTR_SIZE; - -Elf32_Addr -__hppa_make_fptr (const struct link_map *sym_map, Elf32_Addr value, - struct hppa_fptr **root, struct hppa_fptr *mem) -{ - struct hppa_fptr **loc; - struct hppa_fptr *f; - -#ifdef _LIBC_REENTRANT - /* Make sure we are alone. We don't need a lock during bootstrap. */ - if (mem == NULL) - while (testandset (&__hppa_fptr_lock)); -#endif - - /* Search the sorted linked list for an existing entry for this - symbol. */ - loc = root; - f = *loc; - while (f != NULL && f->func <= value) - { - if (f->func == value) - goto found; - loc = &f->next; - f = *loc; - } - - /* Not found. Create a new one. */ - if (mem != NULL) - f = mem; - else if (__fptr_free != NULL) - { - f = __fptr_free; - __fptr_free = f->next; - } - else - { - if (__fptr_count == 0) - { -#ifndef MAP_ANON -# define MAP_ANON 0 - if (GL(dl_zerofd) == -1) - { - GL(dl_zerofd) = _dl_sysdep_open_zero_fill (); - if (GL(dl_zerofd) == -1) - { - __close (fd); - _dl_signal_error (errno, NULL, NULL, - "cannot open zero fill device"); - } - } -#endif - - __fptr_next = __mmap (0, GL(dl_pagesize), PROT_READ | PROT_WRITE, - MAP_ANON | MAP_PRIVATE, ANONFD, 0); - if (__fptr_next == MAP_FAILED) - _dl_signal_error(errno, NULL, NULL, "cannot map page for fptr"); - __fptr_count = GL(dl_pagesize) / sizeof (struct hppa_fptr); - } - f = __fptr_next++; - __fptr_count--; - } - - f->func = value; - /* GOT has already been relocated in elf_get_dynamic_info - don't - try to relocate it again. */ - f->gp = sym_map->l_info[DT_PLTGOT]->d_un.d_ptr; - f->next = *loc; - *loc = f; - -found: -#ifdef _LIBC_REENTRANT - /* Release the lock. Again, remember, zero means the lock is taken! */ - if (mem == NULL) - __hppa_fptr_lock = 1; -#endif - - /* Set bit 30 to indicate to $$dyncall that this is a PLABEL. */ - return (Elf32_Addr) f | 2; -} - -void -_dl_unmap (struct link_map *map) -{ - struct hppa_fptr **floc; - struct hppa_fptr *f; - struct hppa_fptr **lloc; - struct hppa_fptr *l; - - __munmap ((void *) map->l_map_start, map->l_map_end - map->l_map_start); - -#ifdef _LIBC_REENTRANT - /* Make sure we are alone. */ - while (testandset (&__hppa_fptr_lock)); -#endif - - /* Search the sorted linked list for the first entry for this object. */ - floc = &__fptr_root; - f = *floc; - while (f != NULL && f->func < map->l_map_start) - { - floc = &f->next; - f = *floc; - } - - /* We found one. */ - if (f != NULL && f->func < map->l_map_end) - { - /* Get the last entry. */ - lloc = floc; - l = f; - while (l && l->func < map->l_map_end) - { - lloc = &l->next; - l = *lloc; - } - - /* Updated FPTR. */ - *floc = l; - - /* Prepend them to the free list. */ - *lloc = __fptr_free; - __fptr_free = f; - } - -#ifdef _LIBC_REENTRANT - /* Release the lock. */ - __hppa_fptr_lock = 1; -#endif -} - -Elf32_Addr -_dl_lookup_address (const void *address) -{ - Elf32_Addr addr = (Elf32_Addr) address; - struct hppa_fptr *f; - -#ifdef _LIBC_REENTRANT - /* Make sure we are alone. */ - while (testandset (&__hppa_fptr_lock)); -#endif - - for (f = __fptr_root; f != NULL; f = f->next) - if (f == address) - { - addr = f->func; - break; - } - -#ifdef _LIBC_REENTRANT - /* Release the lock. */ - __hppa_fptr_lock = 1; -#endif - - return addr; -} From ba0b86d09fa1b701220fee9f93c497d4e5b98f5e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 18 Dec 2003 03:53:22 +0000 Subject: [PATCH 3224/4487] (_dl_symbol_address): Use _dl_make_ftpr, remove const qualifier for map. (_dl_function_address): Removed. --- sysdeps/hppa/dl-symaddr.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/sysdeps/hppa/dl-symaddr.c b/sysdeps/hppa/dl-symaddr.c index 1aec19ab19..e5ce6a9c03 100644 --- a/sysdeps/hppa/dl-symaddr.c +++ b/sysdeps/hppa/dl-symaddr.c @@ -21,19 +21,16 @@ #include void * -_dl_symbol_address (const struct link_map *map, const ElfW(Sym) *ref) +_dl_symbol_address (struct link_map *map, const ElfW(Sym) *ref) { + /* Find the "ip" from the "map" and symbol "ref" */ Elf32_Addr value = (map ? map->l_addr : 0) + ref->st_value; - /* On hppa, we have to return the pointer to function descriptor. */ - if (ELFW(ST_TYPE) (ref->st_info) == STT_FUNC) - return (void *) __hppa_make_fptr (map, value, &__fptr_root, NULL); + /* On hppa, we have to return the pointer to function descriptor. + This involves an "| 2" to inform $$dyncall that this is a plabel32 */ + if (ELFW(ST_TYPE) (ref->st_info) == STT_FUNC){ + return (void *)((unsigned long)_dl_make_fptr (map, ref, value) | 2); + } else return (void *) value; } - -ElfW(Addr) -_dl_function_address (const struct link_map *map, ElfW(Addr) start) -{ - return __hppa_make_fptr (map, start, &__fptr_root, NULL); -} From 69751d3f42978a57c51f251c24a244eb3e27c416 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 18 Dec 2003 03:53:47 +0000 Subject: [PATCH 3225/4487] DL_LOOKUP_ADDRESS must clear PLABEL32 bits, define DL_AUTO_FUNCTION_ADDRESS and DL_STATIC_FUNCTION_ADDRESS, DL_DT_INIT_ADDRESS and DL_DT_FINI_ADDRESS use the previous two macros. --- sysdeps/hppa/dl-lookupcfg.h | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/sysdeps/hppa/dl-lookupcfg.h b/sysdeps/hppa/dl-lookupcfg.h index d76ea1221d..d393b3e427 100644 --- a/sysdeps/hppa/dl-lookupcfg.h +++ b/sysdeps/hppa/dl-lookupcfg.h @@ -26,27 +26,44 @@ /* Forward declaration. */ struct link_map; -void *_dl_symbol_address (const struct link_map *map, const ElfW(Sym) *ref); +void *_dl_symbol_address (struct link_map *map, const ElfW(Sym) *ref); #define DL_SYMBOL_ADDRESS(map, ref) _dl_symbol_address(map, ref) Elf32_Addr _dl_lookup_address (const void *address); -#define DL_LOOKUP_ADDRESS(addr) _dl_lookup_address (addr) +/* Clear the bottom two bits so generic code can find the fdesc entry */ +#define DL_LOOKUP_ADDRESS(addr) \ + (_dl_lookup_address ((void *)((unsigned long)addr & ~3))) void _dl_unmap (struct link_map *map); #define DL_UNMAP(map) _dl_unmap (map) -extern Elf32_Addr _dl_function_address (const struct link_map *map, - Elf32_Addr start); +#define DL_AUTO_FUNCTION_ADDRESS(map, addr) \ +({ \ + unsigned int fptr[2]; \ + fptr[0] = (unsigned int) (addr); \ + fptr[1] = (map)->l_info[DT_PLTGOT]->d_un.d_ptr; \ + /* Set bit 30 to indicate to $$dyncall that this is a PLABEL. */ \ + (ElfW(Addr))((unsigned int)fptr | 2); \ +}) + +#define DL_STATIC_FUNCTION_ADDRESS(map, addr) \ +({ \ + static unsigned int fptr[2]; \ + fptr[0] = (unsigned int) (addr); \ + fptr[1] = (map)->l_info[DT_PLTGOT]->d_un.d_ptr; \ + /* Set bit 30 to indicate to $$dyncall that this is a PLABEL. */ \ + (ElfW(Addr))((unsigned int)fptr | 2); \ +}) -#define DL_FUNCTION_ADDRESS(map, addr) _dl_function_address (map, addr) /* The test for "addr & 2" below is to accomodate old binaries which violated the ELF ABI by pointing DT_INIT and DT_FINI at a function - pointer. */ + descriptor. */ #define DL_DT_INIT_ADDRESS(map, addr) \ - ((Elf32_Addr)(addr) & 2 ? (addr) : DL_FUNCTION_ADDRESS (map, addr)) + ((Elf32_Addr)(addr) & 2 ? (addr) : DL_AUTO_FUNCTION_ADDRESS (map, addr)) #define DL_DT_FINI_ADDRESS(map, addr) \ - ((Elf32_Addr)(addr) & 2 ? (addr) : DL_FUNCTION_ADDRESS (map, addr)) + ((Elf32_Addr)(addr) & 2 ? (addr) : DL_AUTO_FUNCTION_ADDRESS (map, addr)) + From 4db359168e060fd5762f4e934347ff2b3670f6e1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 18 Dec 2003 03:56:15 +0000 Subject: [PATCH 3226/4487] (feclearexcept): Right shift FE_ALL_EXCEPT before complimenting. --- sysdeps/hppa/fpu/fclrexcpt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/hppa/fpu/fclrexcpt.c b/sysdeps/hppa/fpu/fclrexcpt.c index 8ad67b9698..a7c698206e 100644 --- a/sysdeps/hppa/fpu/fclrexcpt.c +++ b/sysdeps/hppa/fpu/fclrexcpt.c @@ -29,7 +29,7 @@ feclearexcept (int excepts) __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw)); /* Clear all the relevant bits. */ - sw[0] &= ~(excepts & FE_ALL_EXCEPT) << 27; + sw[0] &= ~((excepts & FE_ALL_EXCEPT) << 27); __asm__ ("fldd 0(%0),%%fr0" : : "r" (sw)); /* Success. */ From 78f9fd64197420b48770a6acd35c4496a130bf09 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 18 Dec 2003 03:56:50 +0000 Subject: [PATCH 3227/4487] (fegetenv): use asm 'ma,' completer, and gcc '+r' constraint. --- sysdeps/hppa/fpu/fegetenv.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sysdeps/hppa/fpu/fegetenv.c b/sysdeps/hppa/fpu/fegetenv.c index 1ed18daa2c..b87317b789 100644 --- a/sysdeps/hppa/fpu/fegetenv.c +++ b/sysdeps/hppa/fpu/fegetenv.c @@ -24,10 +24,10 @@ int fegetenv (fenv_t *envp) { __asm__ ( - "fstd %%fr0,0(%2)\n" - "fstd,ma %%fr1,8(%2)\n" - "fstd,ma %%fr2,8(%2)\n" - "fstd %%fr3,0(%2)\n" - : "=m" (*envp), "=r" (envp) : "1" (envp)); + "fstd,ma %%fr0,8(%1)\n" + "fstd,ma %%fr1,8(%1)\n" + "fstd,ma %%fr2,8(%1)\n" + "fstd %%fr3,0(%1)\n" + : "=m" (*envp), "+r" (envp)); return 0; } From 4923dcf1bd3d163aff53344ad9cde64f6b2eb16d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 18 Dec 2003 03:57:14 +0000 Subject: [PATCH 3228/4487] (feholdexcept): Use asm 'ma,' completer, and gcc '+r' constraint. --- sysdeps/hppa/fpu/feholdexcpt.c | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/sysdeps/hppa/fpu/feholdexcpt.c b/sysdeps/hppa/fpu/feholdexcpt.c index 27133365bc..db9fb409ae 100644 --- a/sysdeps/hppa/fpu/feholdexcpt.c +++ b/sysdeps/hppa/fpu/feholdexcpt.c @@ -25,18 +25,16 @@ int feholdexcept (fenv_t *envp) { fenv_t clear; + fenv_t * _regs = envp; /* Store the environment. */ - { - fenv_t * _regs = envp; - __asm__ ( - "fstd %%fr0,0(%2)\n" - "fstd,ma %%fr1,8(%2)\n" - "fstd,ma %%fr2,8(%2)\n" - "fstd %%fr3,0(%2)\n" - : "=m" (*_regs), "=r" (_regs) : "1" (_regs)); - memcpy (&clear, envp, sizeof (clear)); - } + __asm__ ( + "fstd,ma %%fr0,8(%1)\n" + "fstd,ma %%fr1,8(%1)\n" + "fstd,ma %%fr2,8(%1)\n" + "fstd %%fr3,0(%1)\n" + : "=m" (*_regs), "+r" (_regs)); + memcpy (&clear, envp, sizeof (clear)); /* Now clear all exceptions. */ clear.__status_word &= ~(FE_ALL_EXCEPT << 27); @@ -46,15 +44,13 @@ feholdexcept (fenv_t *envp) clear.__status_word &= ~FE_ALL_EXCEPT; /* Load the new environment. */ - { - fenv_t * _regs = &clear + 1; - __asm__ ( - "fldd,mb -8(%2),%%fr3\n" - "fldd,mb -8(%2),%%fr2\n" - "fldd,mb -8(%2),%%fr1\n" - "fldd -8(%2),%%fr0\n" - : "=m" (*_regs), "=r" (_regs) : "1" (_regs)); - } + _regs = &clear; + __asm__ ( + "fldd,ma -8(%1),%%fr3\n" + "fldd,ma -8(%1),%%fr2\n" + "fldd,ma -8(%1),%%fr1\n" + "fldd 0(%1),%%fr0\n" + : "=m" (*_regs), "+r" (_regs)); return 0; } From c5cf6f4a3d954964646dfcef8d6bbb4616900ab7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 18 Dec 2003 03:57:31 +0000 Subject: [PATCH 3229/4487] (fesetenv): Use asm 'ma,' completer, and gcc '+r' constraint. --- sysdeps/hppa/fpu/fesetenv.c | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/sysdeps/hppa/fpu/fesetenv.c b/sysdeps/hppa/fpu/fesetenv.c index 2c7986987b..526773214b 100644 --- a/sysdeps/hppa/fpu/fesetenv.c +++ b/sysdeps/hppa/fpu/fesetenv.c @@ -26,20 +26,18 @@ int fesetenv (const fenv_t *envp) { fenv_t temp; + fenv_t * _regs = &temp; /* Install the environment specified by ENVP. But there are a few values which we do not want to come from the saved environment. Therefore, we get the current environment and replace the values we want to use from the environment specified by the parameter. */ - { - fenv_t * _regs = &temp; - __asm__ ( - "fstd %%fr0,0(%2)\n" - "fstd,ma %%fr1,8(%2)\n" - "fstd,ma %%fr2,8(%2)\n" - "fstd %%fr3,0(%2)\n" - : "=m" (*_regs), "=r" (_regs) : "1" (_regs)); - } + __asm__ ( + "fstd,ma %%fr0,8(%1)\n" + "fstd,ma %%fr1,8(%1)\n" + "fstd,ma %%fr2,8(%1)\n" + "fstd %%fr3,0(%1)\n" + : "=m" (*_regs), "+r" (_regs)); temp.__status_word &= ~(FE_ALL_EXCEPT | (FE_ALL_EXCEPT << 27) @@ -55,15 +53,12 @@ fesetenv (const fenv_t *envp) | (FE_ALL_EXCEPT << 27))); /* Load the new environment. */ - { - fenv_t * _regs = &temp + 1; - __asm__ ( - "fldd,mb -8(%2),%%fr3\n" - "fldd,mb -8(%2),%%fr2\n" - "fldd,mb -8(%2),%%fr1\n" - "fldd -8(%2),%%fr0\n" - : "=m" (*_regs), "=r" (_regs) : "1" (_regs)); - } + __asm__ ( + "fldd,ma -8(%1),%%fr3\n" + "fldd,ma -8(%1),%%fr2\n" + "fldd,ma -8(%1),%%fr1\n" + "fldd 0(%1),%%fr0\n" + : "=m" (*_regs), "+r" (_regs)); /* Success. */ return 0; From 1bff455e8a5d59aba93e5c5af38dac610f572077 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 18 Dec 2003 03:57:50 +0000 Subject: [PATCH 3230/4487] (feupdateenv): Read raised exception bits, OR with envp, pass to fesetenv. --- sysdeps/hppa/fpu/feupdateenv.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sysdeps/hppa/fpu/feupdateenv.c b/sysdeps/hppa/fpu/feupdateenv.c index c61b7b298a..8980dfd69c 100644 --- a/sysdeps/hppa/fpu/feupdateenv.c +++ b/sysdeps/hppa/fpu/feupdateenv.c @@ -27,14 +27,12 @@ feupdateenv (const fenv_t *envp) /* Get the current exception status. */ __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw)); - sw[0] &= (FE_ALL_EXCEPT << 27); - + sw[0] &= FE_ALL_EXCEPT; + envp->__status_word = envp->__status_word | sw[0]; + /* Install new environment. */ fesetenv (envp); - /* Raise the saved exception. */ - feraiseexcept (sw[0] >> 27); - /* Success. */ return 0; } From 2da72a511e59b665a77e707b82e17f851bed4d1b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 18 Dec 2003 03:58:09 +0000 Subject: [PATCH 3231/4487] (feraiseexcept): Add delayed exception flushing, FE_UNDERFLOW is DBL_MIN/3.0, FE_INEXACT is triggered by M_PI/69.69 converted to single precision. --- sysdeps/hppa/fpu/fraiseexcpt.c | 63 ++++++++++++++++++++-------------- 1 file changed, 37 insertions(+), 26 deletions(-) diff --git a/sysdeps/hppa/fpu/fraiseexcpt.c b/sysdeps/hppa/fpu/fraiseexcpt.c index a13668f954..b064dc1527 100644 --- a/sysdeps/hppa/fpu/fraiseexcpt.c +++ b/sysdeps/hppa/fpu/fraiseexcpt.c @@ -22,6 +22,9 @@ #include #include +/* Please see section 10, + page 10-5 "Delayed Trapping" in the PA-RISC 2.0 Architecture manual */ + int feraiseexcept (int excepts) { @@ -33,56 +36,64 @@ feraiseexcept (int excepts) /* We do these bits in assembly to be certain GCC doesn't optimize away something important, and so we can force delayed traps to - occur. */ - - /* FIXME: These all need verification! */ + occur. */ - /* First: invalid exception. */ + /* We use "fldd 0(%%sr0,%%sp),%0" to flush the delayed exception */ + + /* First: Invalid exception. */ if (excepts & FE_INVALID) { /* One example of a invalid operation is 0 * Infinity. */ double d = HUGE_VAL; - __asm__ __volatile__ ("fmpy,dbl %1,%%fr0,%0\n\t" - /* FIXME: is this a proper trap barrier? */ - "fcpy,dbl %%fr0,%%fr0" : "=f" (d) : "0" (d)); + __asm__ __volatile__ ( + " fcpy,dbl %%fr0,%%fr22\n" + " fmpy,dbl %0,%%fr22,%0\n" + " fldd 0(%%sr0,%%sp),%0" + : "+f" (d) : : "%fr22" ); } - /* Next: division by zero. */ + /* Second: Division by zero. */ if (excepts & FE_DIVBYZERO) { double d = 1.0; - __asm__ __volatile__ ("fdiv,dbl %1,%%fr0,%0\n\t" - "fcpy,dbl %%fr0,%%fr0" : "=f" (d) : "0" (d)); + __asm__ __volatile__ ( + " fcpy,dbl %%fr0,%%fr22\n" + " fdiv,dbl %0,%%fr22,%0\n" + " fldd 0(%%sr0,%%sp),%0" + : "+f" (d) : : "%fr22" ); } - /* Next: overflow. */ - /* FIXME: Compare with IA-64 - do we have the same problem? */ + /* Third: Overflow. */ if (excepts & FE_OVERFLOW) { double d = DBL_MAX; - - __asm__ __volatile__ ("fmpy,dbl %1,%1,%0\n\t" - "fcpy,dbl %%fr0,%%fr0" : "=f" (d) : "0" (d)); + __asm__ __volatile__ ( + " fadd,dbl %0,%0,%0\n" + " fldd 0(%%sr0,%%sp),%0" + : "+f" (d) ); } - /* Next: underflow. */ + /* Fourth: Underflow. */ if (excepts & FE_UNDERFLOW) { double d = DBL_MIN; - double e = 69.69; - - __asm__ __volatile__ ("fdiv,dbl %1,%2,%0\n\t" - "fcpy,dbl %%fr0,%%fr0" : "=f" (d) : "0" (d), "f" (e)); + double e = 3.0; + __asm__ __volatile__ ( + " fdiv,dbl %0,%1,%0\n" + " fldd 0(%%sr0,%%sp),%0" + : "+f" (d) : "f" (e) ); } - /* Last: inexact. */ + /* Fifth: Inexact */ if (excepts & FE_INEXACT) { - double d = 1.0; - double e = M_PI; - - __asm__ __volatile__ ("fdiv,dbl %1,%2,%0\n\t" - "fcpy,dbl %%fr0,%%fr0" : "=f" (d) : "0" (d), "f" (e)); + double d = M_PI; + double e = 69.69; + __asm__ __volatile__ ( + " fdiv,dbl %0,%1,%%fr22\n" + " fcnvfxt,dbl,sgl %%fr22,%%fr22L\n" + " fldd 0(%%sr0,%%sp),%%fr22" + : : "f" (d), "f" (e) : "%fr22" ); } /* Success. */ From c1f024c3e11470a425cd6f8072c2b74a93b3e69d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 18 Dec 2003 03:58:26 +0000 Subject: [PATCH 3232/4487] (fesetexceptflag): Set enable bits not raised exception bits. --- sysdeps/hppa/fpu/fsetexcptflg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sysdeps/hppa/fpu/fsetexcptflg.c b/sysdeps/hppa/fpu/fsetexcptflg.c index 343ddad943..af35f5ae35 100644 --- a/sysdeps/hppa/fpu/fsetexcptflg.c +++ b/sysdeps/hppa/fpu/fsetexcptflg.c @@ -29,8 +29,7 @@ fesetexceptflag (const fexcept_t *flagp, int excepts) /* Get the current status word. */ __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw)); - /* Install the new exception flags bits. */ - sw[0] &= ~(excepts & (FE_ALL_EXCEPT >> 27)); + /* Install new enable trap bits */ sw[0] |= (*flagp & excepts & FE_ALL_EXCEPT) << 27; /* Store the new status word. */ From 46bf1d81a4245cf10f4ae364721b5dea429a4503 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 18 Dec 2003 06:05:03 +0000 Subject: [PATCH 3233/4487] (__clone) [PIC]: Save PIC, reload PIC if we need to call __syscall_error, cleanup asm. --- sysdeps/unix/sysv/linux/hppa/clone.S | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/hppa/clone.S b/sysdeps/unix/sysv/linux/hppa/clone.S index 459eaff195..4f3bb9e206 100644 --- a/sysdeps/unix/sysv/linux/hppa/clone.S +++ b/sysdeps/unix/sysv/linux/hppa/clone.S @@ -42,6 +42,11 @@ ENTRY(__clone) stwm %arg0,64(%arg1) stw %arg3,-60(%arg1) + /* Save the PIC register. */ +#ifdef PIC + stw %r19,-32(%sr0, %sp) /* parent */ +#endif + /* Do the system call */ copy %arg2,%arg0 ble 0x100(%sr2,%r0) @@ -53,19 +58,31 @@ ENTRY(__clone) comib,=,n 0,%ret0,thread_start - /* Successful return from the parent */ + /* Successful return from the parent + No need to restore the PIC register, + since we return immediately. */ + bv %r0(%rp) nop /* Something bad happened -- no child created */ .Lerror: + + /* Restore the PIC register on error */ +#ifdef PIC + ldw -32(%sr0, %sp), %r19 /* parent */ +#endif + b __syscall_error sub %r0,%ret0,%arg0 thread_start: + /* Load up the arguments. */ - ldw -60(%sp),%arg0 - ldw -64(%sp),%r22 + ldw -60(%sr0, %sp),%arg0 + ldw -64(%sr0, %sp),%r22 + + /* $$dyncall fixes childs PIC register */ /* Call the user's function */ bl $$dyncall,%r31 From e445ac3d4960d464ea6026f8a5995b516d71838d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 19 Dec 2003 01:35:07 +0000 Subject: [PATCH 3234/4487] Setjmp buffer unwinding helper code for Alpha. --- sysdeps/alpha/nptl/jmpbuf-unwind.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 sysdeps/alpha/nptl/jmpbuf-unwind.h diff --git a/sysdeps/alpha/nptl/jmpbuf-unwind.h b/sysdeps/alpha/nptl/jmpbuf-unwind.h new file mode 100644 index 0000000000..ad77816ca0 --- /dev/null +++ b/sysdeps/alpha/nptl/jmpbuf-unwind.h @@ -0,0 +1,28 @@ +/* Copyright (C) 2003 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek , 2003. + + 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. */ + +#include +#include +#include + +#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \ + _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj) + +#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \ + ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_SP] - (_adj)) From 646ae9f22839be9cb74c73fcb5fd97c78ca703be Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 21 Dec 2003 17:31:58 +0000 Subject: [PATCH 3235/4487] Avoid matching memory constraints. --- sysdeps/m68k/m68020/bits/atomic.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/sysdeps/m68k/m68020/bits/atomic.h b/sysdeps/m68k/m68020/bits/atomic.h index bbffc526a8..746dc2e06e 100644 --- a/sysdeps/m68k/m68020/bits/atomic.h +++ b/sysdeps/m68k/m68020/bits/atomic.h @@ -115,7 +115,7 @@ typedef uintmax_t uatomic_max_t; " jbne 1b" \ : "=d" (__result), "=m" (*(mem)), \ "=&d" (__temp) \ - : "d" (value), "1" (*(mem)), "0" (__result)); \ + : "d" (value), "m" (*(mem)), "0" (__result)); \ else if (sizeof (*(mem)) == 2) \ __asm __volatile ("1: move%.w %0,%2;" \ " add%.w %3,%2;" \ @@ -123,7 +123,7 @@ typedef uintmax_t uatomic_max_t; " jbne 1b" \ : "=d" (__result), "=m" (*(mem)), \ "=&d" (__temp) \ - : "d" (value), "1" (*(mem)), "0" (__result)); \ + : "d" (value), "m" (*(mem)), "0" (__result)); \ else if (sizeof (*(mem)) == 4) \ __asm __volatile ("1: move%.l %0,%2;" \ " add%.l %3,%2;" \ @@ -131,7 +131,7 @@ typedef uintmax_t uatomic_max_t; " jbne 1b" \ : "=d" (__result), "=m" (*(mem)), \ "=&d" (__temp) \ - : "d" (value), "1" (*(mem)), "0" (__result)); \ + : "d" (value), "m" (*(mem)), "0" (__result)); \ else \ { \ __typeof (mem) __memp = (mem); \ @@ -152,15 +152,15 @@ typedef uintmax_t uatomic_max_t; (void) ({ if (sizeof (*(mem)) == 1) \ __asm __volatile ("add%.b %1,%0" \ : "=m" (*(mem)) \ - : "id" (value), "0" (*(mem))); \ + : "id" (value), "m" (*(mem))); \ else if (sizeof (*(mem)) == 2) \ __asm __volatile ("add%.w %1,%0" \ : "=m" (*(mem)) \ - : "id" (value), "0" (*(mem))); \ + : "id" (value), "m" (*(mem))); \ else if (sizeof (*(mem)) == 4) \ __asm __volatile ("add%.l %1,%0" \ : "=m" (*(mem)) \ - : "id" (value), "0" (*(mem))); \ + : "id" (value), "m" (*(mem))); \ else \ { \ __typeof (mem) __memp = (mem); \ @@ -184,15 +184,15 @@ typedef uintmax_t uatomic_max_t; if (sizeof (*(mem)) == 1) \ __asm __volatile ("addq%.b %#1,%1; seq %0" \ : "=dm" (__result), "=m" (*(mem)) \ - : "1" (*(mem))); \ + : "m" (*(mem))); \ else if (sizeof (*(mem)) == 2) \ __asm __volatile ("addq%.w %#1,%1; seq %0" \ : "=dm" (__result), "=m" (*(mem)) \ - : "1" (*(mem))); \ + : "m" (*(mem))); \ else if (sizeof (*(mem)) == 4) \ __asm __volatile ("addq%.l %#1,%1; seq %0" \ : "=dm" (__result), "=m" (*(mem)) \ - : "1" (*(mem))); \ + : "m" (*(mem))); \ else \ { \ __typeof (mem) __memp = (mem); \ @@ -218,15 +218,15 @@ typedef uintmax_t uatomic_max_t; if (sizeof (*(mem)) == 1) \ __asm __volatile ("subq%.b %#1,%1; seq %0" \ : "=dm" (__result), "=m" (*(mem)) \ - : "1" (*(mem))); \ + : "m" (*(mem))); \ else if (sizeof (*(mem)) == 2) \ __asm __volatile ("subq%.w %#1,%1; seq %0" \ : "=dm" (__result), "=m" (*(mem)) \ - : "1" (*(mem))); \ + : "m" (*(mem))); \ else if (sizeof (*(mem)) == 4) \ __asm __volatile ("subq%.l %#1,%1; seq %0" \ : "=dm" (__result), "=m" (*(mem)) \ - : "1" (*(mem))); \ + : "m" (*(mem))); \ else \ { \ __typeof (mem) __memp = (mem); \ From b1c81c0040a3b23e634de13180e66f40f62d879b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 6 Jan 2004 10:31:07 +0000 Subject: [PATCH 3236/4487] 2003-12-11 Ulrich Weigand * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread register as second parameter to the REGISTER macro. * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise. * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise. * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise. * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise. * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size of thread register as second parameter to REGISTER macro in 64 case. --- sysdeps/alpha/nptl/tls.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/alpha/nptl/tls.h b/sysdeps/alpha/nptl/tls.h index 8f61bb7409..f947fcf648 100644 --- a/sysdeps/alpha/nptl/tls.h +++ b/sysdeps/alpha/nptl/tls.h @@ -120,7 +120,7 @@ typedef struct /* Magic for libthread_db to know how to do THREAD_SELF. */ # define DB_THREAD_SELF \ - REGISTER (64, 32 * 8, - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE) + REGISTER (64, 64, 32 * 8, - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE) /* Identifier for the current thread. THREAD_SELF is usable but sometimes more expensive than necessary as in this case. */ From 9e42ca8f27b2f68290efae534c29be58781822d9 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 13 Jan 2004 09:08:04 +0000 Subject: [PATCH 3237/4487] * Versions.def (libm): Add GLIBC_2.3.3. * sysdeps/alpha/fpu/Versions: Add __c1_c*f and c*f to GLIBC_2.3.3. * sysdeps/alpha/fpu/cabsf.c, sysdeps/alpha/fpu/cargf.c, sysdeps/alpha/fpu/cfloat-compat.h, sysdeps/alpha/fpu/cimagf.c, sysdeps/alpha/fpu/conjf.c, sysdeps/alpha/fpu/crealf.c, sysdeps/alpha/fpu/s_cacosf.c, sysdeps/alpha/fpu/s_cacoshf.c, sysdeps/alpha/fpu/s_casinf.c, sysdeps/alpha/fpu/s_casinhf.c, sysdeps/alpha/fpu/s_catanf.c, sysdeps/alpha/fpu/s_catanhf.c, sysdeps/alpha/fpu/s_ccosf.c, sysdeps/alpha/fpu/s_ccoshf.c, sysdeps/alpha/fpu/s_cexpf.c, sysdeps/alpha/fpu/s_clog10f.c, sysdeps/alpha/fpu/s_clogf.c, sysdeps/alpha/fpu/s_cpowf.c, sysdeps/alpha/fpu/s_cprojf.c, sysdeps/alpha/fpu/s_csinf.c, sysdeps/alpha/fpu/s_csinhf.c, sysdeps/alpha/fpu/s_csqrtf.c, sysdeps/alpha/fpu/s_ctanf.c, sysdeps/alpha/fpu/s_ctanhf.c: New files. * sysdeps/alpha/fpu/bits/mathdef.h: Rename complex float functions for gcc 3.3. * sysdeps/generic/s_cacosf.c, sysdeps/generic/s_cacoshf.c, sysdeps/generic/s_casinf.c, sysdeps/generic/s_casinhf.c, sysdeps/generic/s_catanf.c, sysdeps/generic/s_catanhf.c, sysdeps/generic/s_ccosf.c, sysdeps/generic/s_ccoshf.c, sysdeps/generic/s_cexpf.c, sysdeps/generic/s_clog10f.c, sysdeps/generic/s_clogf.c, sysdeps/generic/s_cpowf.c, sysdeps/generic/s_cprojf.c, sysdeps/generic/s_csinf.c, sysdeps/generic/s_csinhf.c, sysdeps/generic/s_csqrtf.c, sysdeps/generic/s_ctanf.c, sysdeps/generic/s_ctanhf.c: Don't weak_alias if the function name has been #defined. * math/cabsf.c: Move ... * sysdeps/generic/cabsf.c: ... here. * math/cargf.c: Move ... * sysdeps/generic/cargf.c: ... here. * math/cimagf.c: Move ... * sysdeps/generic/cimagf.c: ... here. * math/conjf.c: Move ... * sysdeps/generic/conjf.c: ... here. * math/crealf.c: Move ... * sysdeps/generic/crealf.c: ... here. --- sysdeps/alpha/fpu/Versions | 17 +++++++ sysdeps/alpha/fpu/cabsf.c | 42 ++++++++++++++++++ sysdeps/alpha/fpu/cargf.c | 42 ++++++++++++++++++ sysdeps/alpha/fpu/cfloat-compat.h | 74 +++++++++++++++++++++++++++++++ sysdeps/alpha/fpu/cimagf.c | 41 +++++++++++++++++ sysdeps/alpha/fpu/conjf.c | 43 ++++++++++++++++++ sysdeps/alpha/fpu/crealf.c | 41 +++++++++++++++++ sysdeps/alpha/fpu/s_cacosf.c | 51 +++++++++++++++++++++ sysdeps/alpha/fpu/s_cacoshf.c | 51 +++++++++++++++++++++ sysdeps/alpha/fpu/s_casinf.c | 51 +++++++++++++++++++++ sysdeps/alpha/fpu/s_casinhf.c | 51 +++++++++++++++++++++ sysdeps/alpha/fpu/s_catanf.c | 51 +++++++++++++++++++++ sysdeps/alpha/fpu/s_catanhf.c | 51 +++++++++++++++++++++ sysdeps/alpha/fpu/s_ccosf.c | 51 +++++++++++++++++++++ sysdeps/alpha/fpu/s_ccoshf.c | 51 +++++++++++++++++++++ sysdeps/alpha/fpu/s_cexpf.c | 51 +++++++++++++++++++++ sysdeps/alpha/fpu/s_clog10f.c | 61 +++++++++++++++++++++++++ sysdeps/alpha/fpu/s_clogf.c | 51 +++++++++++++++++++++ sysdeps/alpha/fpu/s_cpowf.c | 51 +++++++++++++++++++++ sysdeps/alpha/fpu/s_cprojf.c | 51 +++++++++++++++++++++ sysdeps/alpha/fpu/s_csinf.c | 51 +++++++++++++++++++++ sysdeps/alpha/fpu/s_csinhf.c | 51 +++++++++++++++++++++ sysdeps/alpha/fpu/s_csqrtf.c | 51 +++++++++++++++++++++ sysdeps/alpha/fpu/s_ctanf.c | 51 +++++++++++++++++++++ sysdeps/alpha/fpu/s_ctanhf.c | 51 +++++++++++++++++++++ 25 files changed, 1228 insertions(+) create mode 100644 sysdeps/alpha/fpu/cabsf.c create mode 100644 sysdeps/alpha/fpu/cargf.c create mode 100644 sysdeps/alpha/fpu/cfloat-compat.h create mode 100644 sysdeps/alpha/fpu/cimagf.c create mode 100644 sysdeps/alpha/fpu/conjf.c create mode 100644 sysdeps/alpha/fpu/crealf.c create mode 100644 sysdeps/alpha/fpu/s_cacosf.c create mode 100644 sysdeps/alpha/fpu/s_cacoshf.c create mode 100644 sysdeps/alpha/fpu/s_casinf.c create mode 100644 sysdeps/alpha/fpu/s_casinhf.c create mode 100644 sysdeps/alpha/fpu/s_catanf.c create mode 100644 sysdeps/alpha/fpu/s_catanhf.c create mode 100644 sysdeps/alpha/fpu/s_ccosf.c create mode 100644 sysdeps/alpha/fpu/s_ccoshf.c create mode 100644 sysdeps/alpha/fpu/s_cexpf.c create mode 100644 sysdeps/alpha/fpu/s_clog10f.c create mode 100644 sysdeps/alpha/fpu/s_clogf.c create mode 100644 sysdeps/alpha/fpu/s_cpowf.c create mode 100644 sysdeps/alpha/fpu/s_cprojf.c create mode 100644 sysdeps/alpha/fpu/s_csinf.c create mode 100644 sysdeps/alpha/fpu/s_csinhf.c create mode 100644 sysdeps/alpha/fpu/s_csqrtf.c create mode 100644 sysdeps/alpha/fpu/s_ctanf.c create mode 100644 sysdeps/alpha/fpu/s_ctanhf.c diff --git a/sysdeps/alpha/fpu/Versions b/sysdeps/alpha/fpu/Versions index fa3d810c74..e2925e2ed6 100644 --- a/sysdeps/alpha/fpu/Versions +++ b/sysdeps/alpha/fpu/Versions @@ -4,3 +4,20 @@ libc { __ieee_get_fp_control; __ieee_set_fp_control; } } +libm { + GLIBC_2.3.3 { + # functions implementing old complex float abi + __c1_cabsf; __c1_cacosf; __c1_cacoshf; __c1_cargf; __c1_casinf; + __c1_casinhf; __c1_catanf; __c1_catanhf; __c1_ccosf; __c1_ccoshf; + __c1_cexpf; __c1_cimagf; __c1_clog10f; __c1_clogf; __c1_conjf; + __c1_cpowf; __c1_cprojf; __c1_crealf; __c1_csinf; __c1_csinhf; + __c1_csqrtf; __c1_ctanf; __c1_ctanhf; + + # functions implementing new complex float abi + cabsf; cacosf; cacoshf; cargf; casinf; + casinhf; catanf; catanhf; ccosf; ccoshf; + cexpf; cimagf; clog10f; clogf; conjf; + cpowf; cprojf; crealf; csinf; csinhf; + csqrtf; ctanf; ctanhf; + } +} diff --git a/sysdeps/alpha/fpu/cabsf.c b/sysdeps/alpha/fpu/cabsf.c new file mode 100644 index 0000000000..de8e6b5548 --- /dev/null +++ b/sysdeps/alpha/fpu/cabsf.c @@ -0,0 +1,42 @@ +/* Return the complex absolute value of float complex value. + Copyright (C) 2004 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. */ + +#define __cabsf __cabsf_not_defined +#define cabsf cabsf_not_defined + +#include +#include +#include "cfloat-compat.h" + +#undef __cabsf +#undef cabsf + +float +__c1_cabsf (c1_cfloat_decl (z)) +{ + return __hypotf (c1_cfloat_real (z), c1_cfloat_imag (z)); +} + +float +__c2_cabsf (c2_cfloat_decl (z)) +{ + return __hypotf (c2_cfloat_real (z), c2_cfloat_imag (z)); +} + +cfloat_versions (cabsf); diff --git a/sysdeps/alpha/fpu/cargf.c b/sysdeps/alpha/fpu/cargf.c new file mode 100644 index 0000000000..1d96e5897d --- /dev/null +++ b/sysdeps/alpha/fpu/cargf.c @@ -0,0 +1,42 @@ +/* Compute argument of complex float value. + Copyright (C) 2004 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. */ + +#define __cargf __cargf_not_defined +#define cargf cargf_not_defined + +#include +#include +#include "cfloat-compat.h" + +#undef __cargf +#undef cargf + +float +__c1_cargf (c1_cfloat_decl (x)) +{ + return __atan2f (c1_cfloat_imag (x), c1_cfloat_real (x)); +} + +float +__c2_cargf (c2_cfloat_decl (x)) +{ + return __atan2f (c2_cfloat_imag (x), c2_cfloat_real (x)); +} + +cfloat_versions (cargf); diff --git a/sysdeps/alpha/fpu/cfloat-compat.h b/sysdeps/alpha/fpu/cfloat-compat.h new file mode 100644 index 0000000000..cb40f55bdf --- /dev/null +++ b/sysdeps/alpha/fpu/cfloat-compat.h @@ -0,0 +1,74 @@ +/* Compatibility macros for old and new Alpha complex float ABI. + Copyright (C) 2004 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. */ + +/* The behaviour of complex float changed between GCC 3.3 and 3.4. + + In 3.3 and before (below, complex version 1, or "c1"), complex float + values were packed into one floating point register. + + In 3.4 and later (below, complex version 2, or "c2"), GCC changed to + follow the official Tru64 ABI, which passes the components of a complex + as separate parameters. */ + +#if __GNUC_PREREQ(3,4) + typedef union { double d; _Complex float cf; } c1_compat; +# define c1_cfloat_decl(x) double x +# define c1_cfloat_real(x) __real__ c1_cfloat_value (x) +# define c1_cfloat_imag(x) __imag__ c1_cfloat_value (x) +# define c1_cfloat_value(x) (((c1_compat *)(void *)&x)->cf) +# define c1_cfloat_rettype double +# define c1_cfloat_return(x) ({ c1_compat _; _.cf = (x); _.d; }) +# define c2_cfloat_decl(x) _Complex float x +# define c2_cfloat_real(x) __real__ x +# define c2_cfloat_imag(x) __imag__ x +# define c2_cfloat_value(x) x +# define c2_cfloat_rettype _Complex float +# define c2_cfloat_return(x) x +#else +# define c1_cfloat_decl(x) _Complex float x +# define c1_cfloat_real(x) __real__ x +# define c1_cfloat_imag(x) __imag__ x +# define c1_cfloat_value(x) x +# define c1_cfloat_rettype _Complex float +# define c1_cfloat_return(x) x +# define c2_cfloat_decl(x) float x ## r, float x ## i +# define c2_cfloat_real(x) x ## r +# define c2_cfloat_imag(x) x ## i +# define c2_cfloat_value(x) \ + ({ _Complex float _; __real__ _ = x##r; __imag__ _ = x##i; _; }) +# define c2_cfloat_rettype double _Complex +# define c2_cfloat_return(x) x +#endif + +/* Get the proper symbol versions defined for each function. */ + +#include + +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_3_3) +#define cfloat_versions_compat(func) \ + compat_symbol (libm, __c1_##func, func, GLIBC_2_1) +#else +#define cfloat_versions_compat(func) +#endif + +#define cfloat_versions(func) \ + cfloat_versions_compat(func); \ + versioned_symbol (libm, __c2_##func, func, GLIBC_2_3_3); \ + extern typeof(__c2_##func) __##func attribute_hidden; \ + strong_alias (__c2_##func, __##func) diff --git a/sysdeps/alpha/fpu/cimagf.c b/sysdeps/alpha/fpu/cimagf.c new file mode 100644 index 0000000000..a9b351f188 --- /dev/null +++ b/sysdeps/alpha/fpu/cimagf.c @@ -0,0 +1,41 @@ +/* Return imaginary part of complex float value. + Copyright (C) 2004 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. */ + +#define __cimagf __cimagf_not_defined +#define cimagf cimagf_not_defined + +#include +#include "cfloat-compat.h" + +#undef __cimagf +#undef cimagf + +float +__c1_cimagf (c1_cfloat_decl (z)) +{ + return c1_cfloat_imag (z); +} + +float +__c2_cimagf (c2_cfloat_decl (z)) +{ + return c2_cfloat_imag (z); +} + +cfloat_versions (cimagf); diff --git a/sysdeps/alpha/fpu/conjf.c b/sysdeps/alpha/fpu/conjf.c new file mode 100644 index 0000000000..6ff92b9948 --- /dev/null +++ b/sysdeps/alpha/fpu/conjf.c @@ -0,0 +1,43 @@ +/* Return complex conjugate of complex float value. + Copyright (C) 2004 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. */ + +#define __conjf __conjf_not_defined +#define conjf conjf_not_defined + +#include +#include "cfloat-compat.h" + +#undef __conjf +#undef conjf + +c1_cfloat_rettype +__c1_conjf (c1_cfloat_decl (z)) +{ + _Complex float r = ~ c1_cfloat_value (z); + return c1_cfloat_return (r); +} + +c2_cfloat_rettype +__c2_conjf (c2_cfloat_decl (z)) +{ + _Complex float r = ~ c2_cfloat_value (z); + return c2_cfloat_return (r); +} + +cfloat_versions (conjf); diff --git a/sysdeps/alpha/fpu/crealf.c b/sysdeps/alpha/fpu/crealf.c new file mode 100644 index 0000000000..52ab271738 --- /dev/null +++ b/sysdeps/alpha/fpu/crealf.c @@ -0,0 +1,41 @@ +/* Return real part of complex float value. + Copyright (C) 2004 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. */ + +#define __crealf __crealf_not_defined +#define crealf crealf_not_defined + +#include +#include "cfloat-compat.h" + +#undef __crealf +#undef crealf + +float +__c1_crealf (c1_cfloat_decl (z)) +{ + return c1_cfloat_real (z); +} + +float +__c2_crealf (c2_cfloat_decl (z)) +{ + return c2_cfloat_real (z); +} + +cfloat_versions (crealf); diff --git a/sysdeps/alpha/fpu/s_cacosf.c b/sysdeps/alpha/fpu/s_cacosf.c new file mode 100644 index 0000000000..20e67f4ac9 --- /dev/null +++ b/sysdeps/alpha/fpu/s_cacosf.c @@ -0,0 +1,51 @@ +/* Return arc cosine of complex float value. + Copyright (C) 2004 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. */ + +#define __cacosf __cacosf_not_defined +#define cacosf cacosf_not_defined + +#include +#include + +#undef __cacosf +#undef cacosf +#define __cacosf internal_cacosf + +static _Complex float internal_cacosf (_Complex float x); + +#include +#include "cfloat-compat.h" + +#undef __cacosf + +c1_cfloat_rettype +__c1_cacosf (c1_cfloat_decl (x)) +{ + _Complex float r = internal_cacosf (c1_cfloat_value (x)); + return c1_cfloat_return (r); +} + +c2_cfloat_rettype +__c2_cacosf (c2_cfloat_decl (x)) +{ + _Complex float r = internal_cacosf (c2_cfloat_value (x)); + return c2_cfloat_return (r); +} + +cfloat_versions (cacosf); diff --git a/sysdeps/alpha/fpu/s_cacoshf.c b/sysdeps/alpha/fpu/s_cacoshf.c new file mode 100644 index 0000000000..86cb4fbcaa --- /dev/null +++ b/sysdeps/alpha/fpu/s_cacoshf.c @@ -0,0 +1,51 @@ +/* Return arc hyperbole cosine of complex float value. + Copyright (C) 2004 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. */ + +#define __cacoshf __cacoshf_not_defined +#define cacoshf cacoshf_not_defined + +#include +#include + +#undef __cacoshf +#undef cacoshf +#define __cacoshf internal_cacoshf + +static _Complex float internal_cacoshf (_Complex float x); + +#include +#include "cfloat-compat.h" + +#undef __cacoshf + +c1_cfloat_rettype +__c1_cacoshf (c1_cfloat_decl (x)) +{ + _Complex float r = internal_cacoshf (c1_cfloat_value (x)); + return c1_cfloat_return (r); +} + +c2_cfloat_rettype +__c2_cacoshf (c2_cfloat_decl (x)) +{ + _Complex float r = internal_cacoshf (c2_cfloat_value (x)); + return c2_cfloat_return (r); +} + +cfloat_versions (cacoshf); diff --git a/sysdeps/alpha/fpu/s_casinf.c b/sysdeps/alpha/fpu/s_casinf.c new file mode 100644 index 0000000000..3d0d4eadf2 --- /dev/null +++ b/sysdeps/alpha/fpu/s_casinf.c @@ -0,0 +1,51 @@ +/* Return arc sine of complex float value. + Copyright (C) 2004 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. */ + +#define __casinf __casinf_not_defined +#define casinf casinf_not_defined + +#include +#include + +#undef __casinf +#undef casinf +#define __casinf internal_casinf + +static _Complex float internal_casinf (_Complex float x); + +#include +#include "cfloat-compat.h" + +#undef __casinf + +c1_cfloat_rettype +__c1_casinf (c1_cfloat_decl (x)) +{ + _Complex float r = internal_casinf (c1_cfloat_value (x)); + return c1_cfloat_return (r); +} + +c2_cfloat_rettype +__c2_casinf (c2_cfloat_decl (x)) +{ + _Complex float r = internal_casinf (c2_cfloat_value (x)); + return c2_cfloat_return (r); +} + +cfloat_versions (casinf); diff --git a/sysdeps/alpha/fpu/s_casinhf.c b/sysdeps/alpha/fpu/s_casinhf.c new file mode 100644 index 0000000000..698ce10c04 --- /dev/null +++ b/sysdeps/alpha/fpu/s_casinhf.c @@ -0,0 +1,51 @@ +/* Return arc hyperbole sine of complex float value. + Copyright (C) 2004 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. */ + +#define __casinhf __casinhf_not_defined +#define casinhf casinhf_not_defined + +#include +#include + +#undef __casinhf +#undef casinhf +#define __casinhf internal_casinhf + +static _Complex float internal_casinhf (_Complex float x); + +#include +#include "cfloat-compat.h" + +#undef __casinhf + +c1_cfloat_rettype +__c1_casinhf (c1_cfloat_decl (x)) +{ + _Complex float r = internal_casinhf (c1_cfloat_value (x)); + return c1_cfloat_return (r); +} + +c2_cfloat_rettype +__c2_casinhf (c2_cfloat_decl (x)) +{ + _Complex float r = internal_casinhf (c2_cfloat_value (x)); + return c2_cfloat_return (r); +} + +cfloat_versions (casinhf); diff --git a/sysdeps/alpha/fpu/s_catanf.c b/sysdeps/alpha/fpu/s_catanf.c new file mode 100644 index 0000000000..221a461c1b --- /dev/null +++ b/sysdeps/alpha/fpu/s_catanf.c @@ -0,0 +1,51 @@ +/* Return arc tangent of complex float value. + Copyright (C) 2004 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. */ + +#define __catanf __catanf_not_defined +#define catanf catanf_not_defined + +#include +#include + +#undef __catanf +#undef catanf +#define __catanf internal_catanf + +static _Complex float internal_catanf (_Complex float x); + +#include +#include "cfloat-compat.h" + +#undef __catanf + +c1_cfloat_rettype +__c1_catanf (c1_cfloat_decl (x)) +{ + _Complex float r = internal_catanf (c1_cfloat_value (x)); + return c1_cfloat_return (r); +} + +c2_cfloat_rettype +__c2_catanf (c2_cfloat_decl (x)) +{ + _Complex float r = internal_catanf (c2_cfloat_value (x)); + return c2_cfloat_return (r); +} + +cfloat_versions (catanf); diff --git a/sysdeps/alpha/fpu/s_catanhf.c b/sysdeps/alpha/fpu/s_catanhf.c new file mode 100644 index 0000000000..7465a43cac --- /dev/null +++ b/sysdeps/alpha/fpu/s_catanhf.c @@ -0,0 +1,51 @@ +/* Return arc hyperbole tangent of complex float value. + Copyright (C) 2004 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. */ + +#define __catanhf __catanhf_not_defined +#define catanhf catanhf_not_defined + +#include +#include + +#undef __catanhf +#undef catanhf +#define __catanhf internal_catanhf + +static _Complex float internal_catanhf (_Complex float x); + +#include +#include "cfloat-compat.h" + +#undef __catanhf + +c1_cfloat_rettype +__c1_catanhf (c1_cfloat_decl (x)) +{ + _Complex float r = internal_catanhf (c1_cfloat_value (x)); + return c1_cfloat_return (r); +} + +c2_cfloat_rettype +__c2_catanhf (c2_cfloat_decl (x)) +{ + _Complex float r = internal_catanhf (c2_cfloat_value (x)); + return c2_cfloat_return (r); +} + +cfloat_versions (catanhf); diff --git a/sysdeps/alpha/fpu/s_ccosf.c b/sysdeps/alpha/fpu/s_ccosf.c new file mode 100644 index 0000000000..fd775903f0 --- /dev/null +++ b/sysdeps/alpha/fpu/s_ccosf.c @@ -0,0 +1,51 @@ +/* Return cosine of complex float value. + Copyright (C) 2004 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. */ + +#define __ccosf __ccosf_not_defined +#define ccosf ccosf_not_defined + +#include +#include + +#undef __ccosf +#undef ccosf +#define __ccosf internal_ccosf + +static _Complex float internal_ccosf (_Complex float x); + +#include +#include "cfloat-compat.h" + +#undef __ccosf + +c1_cfloat_rettype +__c1_ccosf (c1_cfloat_decl (x)) +{ + _Complex float r = internal_ccosf (c1_cfloat_value (x)); + return c1_cfloat_return (r); +} + +c2_cfloat_rettype +__c2_ccosf (c2_cfloat_decl (x)) +{ + _Complex float r = internal_ccosf (c2_cfloat_value (x)); + return c2_cfloat_return (r); +} + +cfloat_versions (ccosf); diff --git a/sysdeps/alpha/fpu/s_ccoshf.c b/sysdeps/alpha/fpu/s_ccoshf.c new file mode 100644 index 0000000000..0e8eab288f --- /dev/null +++ b/sysdeps/alpha/fpu/s_ccoshf.c @@ -0,0 +1,51 @@ +/* Return hyperbole cosine of complex float value. + Copyright (C) 2004 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. */ + +#define __ccoshf __ccoshf_not_defined +#define ccoshf ccoshf_not_defined + +#include +#include + +#undef __ccoshf +#undef ccoshf +#define __ccoshf internal_ccoshf + +static _Complex float internal_ccoshf (_Complex float x); + +#include +#include "cfloat-compat.h" + +#undef __ccoshf + +c1_cfloat_rettype +__c1_ccoshf (c1_cfloat_decl (x)) +{ + _Complex float r = internal_ccoshf (c1_cfloat_value (x)); + return c1_cfloat_return (r); +} + +c2_cfloat_rettype +__c2_ccoshf (c2_cfloat_decl (x)) +{ + _Complex float r = internal_ccoshf (c2_cfloat_value (x)); + return c2_cfloat_return (r); +} + +cfloat_versions (ccoshf); diff --git a/sysdeps/alpha/fpu/s_cexpf.c b/sysdeps/alpha/fpu/s_cexpf.c new file mode 100644 index 0000000000..2cf6db4b55 --- /dev/null +++ b/sysdeps/alpha/fpu/s_cexpf.c @@ -0,0 +1,51 @@ +/* Return exponent of complex float value. + Copyright (C) 2004 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. */ + +#define __cexpf __cexpf_not_defined +#define cexpf cexpf_not_defined + +#include +#include + +#undef __cexpf +#undef cexpf +#define __cexpf internal_cexpf + +static _Complex float internal_cexpf (_Complex float x); + +#include +#include "cfloat-compat.h" + +#undef __cexpf + +c1_cfloat_rettype +__c1_cexpf (c1_cfloat_decl (x)) +{ + _Complex float r = internal_cexpf (c1_cfloat_value (x)); + return c1_cfloat_return (r); +} + +c2_cfloat_rettype +__c2_cexpf (c2_cfloat_decl (x)) +{ + _Complex float r = internal_cexpf (c2_cfloat_value (x)); + return c2_cfloat_return (r); +} + +cfloat_versions (cexpf); diff --git a/sysdeps/alpha/fpu/s_clog10f.c b/sysdeps/alpha/fpu/s_clog10f.c new file mode 100644 index 0000000000..bd60ed1bb0 --- /dev/null +++ b/sysdeps/alpha/fpu/s_clog10f.c @@ -0,0 +1,61 @@ +/* Return base 10 logarithm of complex float value. + Copyright (C) 2004 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. */ + +#define __clog10f __clog10f_not_defined +#define clog10f clog10f_not_defined + +#include +#include + +#undef __clog10f +#undef clog10f +#define __clog10f internal_clog10f + +static _Complex float internal_clog10f (_Complex float x); + +#include +#include "cfloat-compat.h" + +#undef __clog10f + +c1_cfloat_rettype +__c1_clog10f (c1_cfloat_decl (x)) +{ + _Complex float r = internal_clog10f (c1_cfloat_value (x)); + return c1_cfloat_return (r); +} + +c2_cfloat_rettype +__c2_clog10f (c2_cfloat_decl (x)) +{ + _Complex float r = internal_clog10f (c2_cfloat_value (x)); + return c2_cfloat_return (r); +} + +/* Ug. __clog10f was exported from GLIBC_2.1. This is the only + complex function whose double-underscore symbol was exported, + so we get to handle that specially. */ +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_3_3) +strong_alias (__c1_clog10f, __c1_clog10f_2); +compat_symbol (libm, __c1_clog10f, clog10f, GLIBC_2_1); +compat_symbol (libm, __c1_clog10f_2, __clog10f, GLIBC_2_1); +#endif +versioned_symbol (libm, __c2_clog10f, clog10f, GLIBC_2_3_3); +extern typeof(__c2_clog10f) __clog10f attribute_hidden; +strong_alias (__c2_clog10f, __clog10f) diff --git a/sysdeps/alpha/fpu/s_clogf.c b/sysdeps/alpha/fpu/s_clogf.c new file mode 100644 index 0000000000..9eefe9fa30 --- /dev/null +++ b/sysdeps/alpha/fpu/s_clogf.c @@ -0,0 +1,51 @@ +/* Return natural logarithm of complex float value. + Copyright (C) 2004 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. */ + +#define __clogf __clogf_not_defined +#define clogf clogf_not_defined + +#include +#include + +#undef __clogf +#undef clogf +#define __clogf internal_clogf + +static _Complex float internal_clogf (_Complex float x); + +#include +#include "cfloat-compat.h" + +#undef __clogf + +c1_cfloat_rettype +__c1_clogf (c1_cfloat_decl (x)) +{ + _Complex float r = internal_clogf (c1_cfloat_value (x)); + return c1_cfloat_return (r); +} + +c2_cfloat_rettype +__c2_clogf (c2_cfloat_decl (x)) +{ + _Complex float r = internal_clogf (c2_cfloat_value (x)); + return c2_cfloat_return (r); +} + +cfloat_versions (clogf); diff --git a/sysdeps/alpha/fpu/s_cpowf.c b/sysdeps/alpha/fpu/s_cpowf.c new file mode 100644 index 0000000000..f4cb3547f6 --- /dev/null +++ b/sysdeps/alpha/fpu/s_cpowf.c @@ -0,0 +1,51 @@ +/* Return power of complex float value. + Copyright (C) 2004 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. */ + +#define __cpowf __cpowf_not_defined +#define cpowf cpowf_not_defined + +#include +#include + +#undef __cpowf +#undef cpowf +#define __cpowf internal_cpowf + +static _Complex float internal_cpowf (_Complex float x, _Complex float c); + +#include +#include "cfloat-compat.h" + +#undef __cpowf + +c1_cfloat_rettype +__c1_cpowf (c1_cfloat_decl (x), c1_cfloat_decl (c)) +{ + _Complex float r = internal_cpowf (c1_cfloat_value (x), c1_cfloat_value (c)); + return c1_cfloat_return (r); +} + +c2_cfloat_rettype +__c2_cpowf (c2_cfloat_decl (x), c2_cfloat_decl (c)) +{ + _Complex float r = internal_cpowf (c2_cfloat_value (x), c2_cfloat_value (c)); + return c2_cfloat_return (r); +} + +cfloat_versions (cpowf); diff --git a/sysdeps/alpha/fpu/s_cprojf.c b/sysdeps/alpha/fpu/s_cprojf.c new file mode 100644 index 0000000000..eac8687707 --- /dev/null +++ b/sysdeps/alpha/fpu/s_cprojf.c @@ -0,0 +1,51 @@ +/* Return projection of complex float value to Riemann sphere. + Copyright (C) 2004 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. */ + +#define __cprojf __cprojf_not_defined +#define cprojf cprojf_not_defined + +#include +#include + +#undef __cprojf +#undef cprojf +#define __cprojf internal_cprojf + +static _Complex float internal_cprojf (_Complex float x); + +#include +#include "cfloat-compat.h" + +#undef __cprojf + +c1_cfloat_rettype +__c1_cprojf (c1_cfloat_decl (x)) +{ + _Complex float r = internal_cprojf (c1_cfloat_value (x)); + return c1_cfloat_return (r); +} + +c2_cfloat_rettype +__c2_cprojf (c2_cfloat_decl (x)) +{ + _Complex float r = internal_cprojf (c2_cfloat_value (x)); + return c2_cfloat_return (r); +} + +cfloat_versions (cprojf); diff --git a/sysdeps/alpha/fpu/s_csinf.c b/sysdeps/alpha/fpu/s_csinf.c new file mode 100644 index 0000000000..eba70e9930 --- /dev/null +++ b/sysdeps/alpha/fpu/s_csinf.c @@ -0,0 +1,51 @@ +/* Return sine of complex float value. + Copyright (C) 2004 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. */ + +#define __csinf __csinf_not_defined +#define csinf csinf_not_defined + +#include +#include + +#undef __csinf +#undef csinf +#define __csinf internal_csinf + +static _Complex float internal_csinf (_Complex float x); + +#include +#include "cfloat-compat.h" + +#undef __csinf + +c1_cfloat_rettype +__c1_csinf (c1_cfloat_decl (x)) +{ + _Complex float r = internal_csinf (c1_cfloat_value (x)); + return c1_cfloat_return (r); +} + +c2_cfloat_rettype +__c2_csinf (c2_cfloat_decl (x)) +{ + _Complex float r = internal_csinf (c2_cfloat_value (x)); + return c2_cfloat_return (r); +} + +cfloat_versions (csinf); diff --git a/sysdeps/alpha/fpu/s_csinhf.c b/sysdeps/alpha/fpu/s_csinhf.c new file mode 100644 index 0000000000..9db81a81e4 --- /dev/null +++ b/sysdeps/alpha/fpu/s_csinhf.c @@ -0,0 +1,51 @@ +/* Return hyperbole sine of complex float value. + Copyright (C) 2004 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. */ + +#define __csinhf __csinhf_not_defined +#define csinhf csinhf_not_defined + +#include +#include + +#undef __csinhf +#undef csinhf +#define __csinhf internal_csinhf + +static _Complex float internal_csinhf (_Complex float x); + +#include +#include "cfloat-compat.h" + +#undef __csinhf + +c1_cfloat_rettype +__c1_csinhf (c1_cfloat_decl (x)) +{ + _Complex float r = internal_csinhf (c1_cfloat_value (x)); + return c1_cfloat_return (r); +} + +c2_cfloat_rettype +__c2_csinhf (c2_cfloat_decl (x)) +{ + _Complex float r = internal_csinhf (c2_cfloat_value (x)); + return c2_cfloat_return (r); +} + +cfloat_versions (csinhf); diff --git a/sysdeps/alpha/fpu/s_csqrtf.c b/sysdeps/alpha/fpu/s_csqrtf.c new file mode 100644 index 0000000000..cc4a8e0245 --- /dev/null +++ b/sysdeps/alpha/fpu/s_csqrtf.c @@ -0,0 +1,51 @@ +/* Return square root of complex float value. + Copyright (C) 2004 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. */ + +#define __csqrtf __csinhf_not_defined +#define csqrtf csqrtf_not_defined + +#include +#include + +#undef __csqrtf +#undef csqrtf +#define __csqrtf internal_csqrtf + +static _Complex float internal_csqrtf (_Complex float x); + +#include +#include "cfloat-compat.h" + +#undef __csqrtf + +c1_cfloat_rettype +__c1_csqrtf (c1_cfloat_decl (x)) +{ + _Complex float r = internal_csqrtf (c1_cfloat_value (x)); + return c1_cfloat_return (r); +} + +c2_cfloat_rettype +__c2_csqrtf (c2_cfloat_decl (x)) +{ + _Complex float r = internal_csqrtf (c2_cfloat_value (x)); + return c2_cfloat_return (r); +} + +cfloat_versions (csqrtf); diff --git a/sysdeps/alpha/fpu/s_ctanf.c b/sysdeps/alpha/fpu/s_ctanf.c new file mode 100644 index 0000000000..843ee53717 --- /dev/null +++ b/sysdeps/alpha/fpu/s_ctanf.c @@ -0,0 +1,51 @@ +/* Return tangent of complex float value. + Copyright (C) 2004 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. */ + +#define __ctanf __ctanf_not_defined +#define ctanf ctanf_not_defined + +#include +#include + +#undef __ctanf +#undef ctanf +#define __ctanf internal_ctanf + +static _Complex float internal_ctanf (_Complex float x); + +#include +#include "cfloat-compat.h" + +#undef __ctanf + +c1_cfloat_rettype +__c1_ctanf (c1_cfloat_decl (x)) +{ + _Complex float r = internal_ctanf (c1_cfloat_value (x)); + return c1_cfloat_return (r); +} + +c2_cfloat_rettype +__c2_ctanf (c2_cfloat_decl (x)) +{ + _Complex float r = internal_ctanf (c2_cfloat_value (x)); + return c2_cfloat_return (r); +} + +cfloat_versions (ctanf); diff --git a/sysdeps/alpha/fpu/s_ctanhf.c b/sysdeps/alpha/fpu/s_ctanhf.c new file mode 100644 index 0000000000..f1f74ab12d --- /dev/null +++ b/sysdeps/alpha/fpu/s_ctanhf.c @@ -0,0 +1,51 @@ +/* Return hyperbole tangent of complex float value. + Copyright (C) 2004 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. */ + +#define __ctanhf __ctanhf_not_defined +#define ctanhf ctanhf_not_defined + +#include +#include + +#undef __ctanhf +#undef ctanhf +#define __ctanhf internal_ctanhf + +static _Complex float internal_ctanhf (_Complex float x); + +#include +#include "cfloat-compat.h" + +#undef __ctanhf + +c1_cfloat_rettype +__c1_ctanhf (c1_cfloat_decl (x)) +{ + _Complex float r = internal_ctanhf (c1_cfloat_value (x)); + return c1_cfloat_return (r); +} + +c2_cfloat_rettype +__c2_ctanhf (c2_cfloat_decl (x)) +{ + _Complex float r = internal_ctanhf (c2_cfloat_value (x)); + return c2_cfloat_return (r); +} + +cfloat_versions (ctanhf); From cfbf1a2f78fcc1f3184eb2a5ea905075cde6988b Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 13 Jan 2004 09:15:58 +0000 Subject: [PATCH 3238/4487] * sysdeps/alpha/bits/atomic.h (__arch_compare_and_exchange_xxx_8_int): Cast old up to uint64_t before back down to inner width. (__arch_compare_and_exchange_xxx_16_int): Likewise. (__arch_compare_and_exchange_xxx_32_int): Likewise. (__arch_compare_and_exchange_xxx_64_int): Likewise. (__arch_compare_and_exchange_val_8_int): Cast result to the type of the memory. (__arch_compare_and_exchange_val_16_int): Likewise. (__arch_compare_and_exchange_val_32_int): Likewise. (__arch_compare_and_exchange_val_64_int): Likewise. (atomic_compare_and_exchange_bool_acq): Use __atomic_bool_bysize. (atomic_compare_and_exchange_bool_rel): Likewise. * sysdeps/unix/alpha/sysdep.h: Select inline_syscall_r0_asm based on HAVE___THREAD instead of USE_TLS. * sysdeps/unix/sysv/linux/alpha/adjtime.c (ADJTIMEX32): New. (__adjtimex_tv64): Use it. * sysdeps/unix/sysv/linux/alpha/semctl.c (__new_semctl): Cast to void* rather than directly to the compatibility structure type. * sysdeps/unix/sysv/linux/alpha/shmctl.c (__new_shmctl): Likewise. * sysdeps/unix/sysv/linux/alpha/sigaction.c (struct kernel_sigaction): Forward declare. --- sysdeps/alpha/bits/atomic.h | 24 ++++++++++----------- sysdeps/alpha/fpu/bits/mathdef.h | 26 ++++++++++++++++++++++- sysdeps/unix/alpha/sysdep.h | 2 +- sysdeps/unix/sysv/linux/alpha/adjtime.c | 3 ++- sysdeps/unix/sysv/linux/alpha/semctl.c | 2 +- sysdeps/unix/sysv/linux/alpha/shmctl.c | 2 +- sysdeps/unix/sysv/linux/alpha/sigaction.c | 1 + 7 files changed, 43 insertions(+), 17 deletions(-) diff --git a/sysdeps/alpha/bits/atomic.h b/sysdeps/alpha/bits/atomic.h index 073e6508fc..36a740c758 100644 --- a/sysdeps/alpha/bits/atomic.h +++ b/sysdeps/alpha/bits/atomic.h @@ -78,7 +78,7 @@ typedef uintmax_t uatomic_max_t; [__cmp] "=&r" (__cmp), \ [__addr64] "=&r" (__addr64) \ : [__addr8] "r" (mem), \ - [__old] "Ir" ((uint64_t)(uint8_t)(old)), \ + [__old] "Ir" ((uint64_t)(uint8_t)(uint64_t)(old)), \ [__new] "r" (new) \ : "memory"); \ }) @@ -106,7 +106,7 @@ typedef uintmax_t uatomic_max_t; [__cmp] "=&r" (__cmp), \ [__addr64] "=&r" (__addr64) \ : [__addr16] "r" (mem), \ - [__old] "Ir" ((uint64_t)(uint16_t)(old)), \ + [__old] "Ir" ((uint64_t)(uint16_t)(uint64_t)(old)), \ [__new] "r" (new) \ : "memory"); \ }) @@ -126,7 +126,7 @@ typedef uintmax_t uatomic_max_t; : [__prev] "=&r" (__prev), \ [__cmp] "=&r" (__cmp) \ : [__mem] "m" (*(mem)), \ - [__old] "Ir" ((uint64_t)(atomic32_t)(old)), \ + [__old] "Ir" ((uint64_t)(atomic32_t)(uint64_t)(old)), \ [__new] "Ir" (new) \ : "memory"); \ }) @@ -146,7 +146,7 @@ typedef uintmax_t uatomic_max_t; : [__prev] "=&r" (__prev), \ [__cmp] "=&r" (__cmp) \ : [__mem] "m" (*(mem)), \ - [__old] "Ir" (old), \ + [__old] "Ir" ((uint64_t)(old)), \ [__new] "Ir" (new) \ : "memory"); \ }) @@ -179,28 +179,28 @@ typedef uintmax_t uatomic_max_t; #define __arch_compare_and_exchange_val_8_int(mem, new, old, mb1, mb2) \ ({ unsigned long __prev; int __cmp; \ __arch_compare_and_exchange_xxx_8_int(mem, new, old, mb1, mb2); \ - __prev; }) + (typeof (*mem))__prev; }) #define __arch_compare_and_exchange_val_16_int(mem, new, old, mb1, mb2) \ ({ unsigned long __prev; int __cmp; \ __arch_compare_and_exchange_xxx_16_int(mem, new, old, mb1, mb2); \ - __prev; }) + (typeof (*mem))__prev; }) #define __arch_compare_and_exchange_val_32_int(mem, new, old, mb1, mb2) \ ({ unsigned long __prev; int __cmp; \ __arch_compare_and_exchange_xxx_32_int(mem, new, old, mb1, mb2); \ - __prev; }) + (typeof (*mem))__prev; }) #define __arch_compare_and_exchange_val_64_int(mem, new, old, mb1, mb2) \ ({ unsigned long __prev; int __cmp; \ __arch_compare_and_exchange_xxx_64_int(mem, new, old, mb1, mb2); \ - __prev; }) + (typeof (*mem))__prev; }) /* Compare and exchange with "acquire" semantics, ie barrier after. */ #define atomic_compare_and_exchange_bool_acq(mem, new, old) \ - __atomic_val_bysize (__arch_compare_and_exchange_bool, int, \ - mem, new, old, "", __MB) + __atomic_bool_bysize (__arch_compare_and_exchange_bool, int, \ + mem, new, old, "", __MB) #define atomic_compare_and_exchange_val_acq(mem, new, old) \ __atomic_val_bysize (__arch_compare_and_exchange_val, int, \ @@ -209,8 +209,8 @@ typedef uintmax_t uatomic_max_t; /* Compare and exchange with "release" semantics, ie barrier before. */ #define atomic_compare_and_exchange_bool_rel(mem, new, old) \ - __atomic_val_bysize (__arch_compare_and_exchange_bool, int, \ - mem, new, old, __MB, "") + __atomic_bool_bysize (__arch_compare_and_exchange_bool, int, \ + mem, new, old, __MB, "") #define atomic_compare_and_exchange_val_rel(mem, new, old) \ __atomic_val_bysize (__arch_compare_and_exchange_val, int, \ diff --git a/sysdeps/alpha/fpu/bits/mathdef.h b/sysdeps/alpha/fpu/bits/mathdef.h index 515b93a562..7979822996 100644 --- a/sysdeps/alpha/fpu/bits/mathdef.h +++ b/sysdeps/alpha/fpu/bits/mathdef.h @@ -61,10 +61,34 @@ typedef double double_t; # define FP_ILOGB0 (-2147483647) # define FP_ILOGBNAN (2147483647) -#endif /* ISO C99 */ +#endif /* ISO C99 && MATH_H */ #ifndef __NO_LONG_DOUBLE_MATH /* Signal that we do not really have a `long double'. The disables the declaration of all the `long double' function variants. */ # define __NO_LONG_DOUBLE_MATH 1 #endif + +#if defined _COMPLEX_H && !defined _COMPLEX_H_MATHDEF +# define _COMPLEX_H_MATHDEF 1 +# if defined(__GNUC__) && !__GNUC_PREREQ(3,4) + +/* Due to an ABI change, we need to remap the complex float symbols. */ +# define _Mdouble_ float +# define __MATHCALL(function, args) \ + __MATHDECL (_Complex float, function, args) +# define __MATHDECL(type, function, args) \ + __MATHDECL_1(type, function##f, args, __c1_##function##f); \ + __MATHDECL_1(type, __##function##f, args, __c1_##function##f) +# define __MATHDECL_1(type, function, args, alias) \ + extern type function args __asm__(#alias) __THROW + +# include + +# undef _Mdouble_ +# undef __MATHCALL +# undef __MATHDECL +# undef __MATHDECL_1 + +# endif /* GNUC before 3.4 */ +#endif /* COMPLEX_H */ diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h index f12edef7a7..26cf918c1c 100644 --- a/sysdeps/unix/alpha/sysdep.h +++ b/sysdeps/unix/alpha/sysdep.h @@ -205,7 +205,7 @@ __LABEL(name) \ output. We don't do this unconditionally to allow compilation with older compilers. */ -#ifdef USE_TLS +#ifdef HAVE___THREAD #define inline_syscall_r0_asm #define inline_syscall_r0_out_constraint "=v" #else diff --git a/sysdeps/unix/sysv/linux/alpha/adjtime.c b/sysdeps/unix/sysv/linux/alpha/adjtime.c index 69f63d4c32..e036896216 100644 --- a/sysdeps/unix/sysv/linux/alpha/adjtime.c +++ b/sysdeps/unix/sysv/linux/alpha/adjtime.c @@ -60,6 +60,7 @@ struct timex32 { #define TIMEX timex32 #define ADJTIME __adjtime_tv32 #define ADJTIMEX(x) INLINE_SYSCALL (old_adjtimex, 1, x) +#define ADJTIMEX32(x) INLINE_SYSCALL (old_adjtimex, 1, x) #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) #define LINKAGE #else @@ -180,7 +181,7 @@ __adjtimex_tv64 (struct timex *tx) tx32.errcnt = tx->errcnt; tx32.stbcnt = tx->stbcnt; - ret = __adjtimex_tv32 (&tx32); + ret = ADJTIMEX32 (&tx32); if (ret == 0) { tx->modes = tx32.modes; diff --git a/sysdeps/unix/sysv/linux/alpha/semctl.c b/sysdeps/unix/sysv/linux/alpha/semctl.c index 224baf399b..6925c3f058 100644 --- a/sysdeps/unix/sysv/linux/alpha/semctl.c +++ b/sysdeps/unix/sysv/linux/alpha/semctl.c @@ -97,7 +97,7 @@ __new_semctl (int semid, int semnum, int cmd, ...) __set_errno(save_errno); buf = arg.buf; - arg.buf = (struct semid_ds *)&old; + arg.buf = (void *)&old; if (cmd == IPC_SET) { old.sem_perm.uid = buf->sem_perm.uid; diff --git a/sysdeps/unix/sysv/linux/alpha/shmctl.c b/sysdeps/unix/sysv/linux/alpha/shmctl.c index 7dec3a737c..4a9d9445ef 100644 --- a/sysdeps/unix/sysv/linux/alpha/shmctl.c +++ b/sysdeps/unix/sysv/linux/alpha/shmctl.c @@ -116,7 +116,7 @@ __new_shmctl (int shmid, int cmd, struct shmid_ds *buf) } else if (result != -1 && cmd == IPC_INFO) { - struct __old_shminfo *oldi = (struct __old_shminfo *)&old; + struct __old_shminfo *oldi = (void *)&old; struct shminfo *i = (struct shminfo *)buf; memset(i, 0, sizeof(*i)); diff --git a/sysdeps/unix/sysv/linux/alpha/sigaction.c b/sysdeps/unix/sysv/linux/alpha/sigaction.c index 952ee40eee..21a2063c30 100644 --- a/sysdeps/unix/sysv/linux/alpha/sigaction.c +++ b/sysdeps/unix/sysv/linux/alpha/sigaction.c @@ -30,6 +30,7 @@ ? __syscall_rt_sigaction(args) \ : INLINE_SYSCALL1(name, nr, args)) +struct kernel_sigaction; extern int __syscall_rt_sigaction (int, const struct kernel_sigaction *__unbounded, struct kernel_sigaction *__unbounded, size_t); From b17d80b12f30adecf0eb60fc8e9025b4bbb0980f Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 13 Jan 2004 09:36:22 +0000 Subject: [PATCH 3239/4487] * sysdeps/alpha/Makefile: New file. * sysdeps/alpha/tcb-offsets.sym: New file. * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P): Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version. * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based on powerpc version. --- sysdeps/alpha/nptl/Makefile | 21 +++ sysdeps/alpha/nptl/tcb-offsets.sym | 12 ++ .../unix/sysv/linux/alpha/nptl/lowlevellock.h | 138 ++++++++---------- .../sysv/linux/alpha/nptl/sysdep-cancel.h | 32 ++-- 4 files changed, 114 insertions(+), 89 deletions(-) create mode 100644 sysdeps/alpha/nptl/Makefile create mode 100644 sysdeps/alpha/nptl/tcb-offsets.sym diff --git a/sysdeps/alpha/nptl/Makefile b/sysdeps/alpha/nptl/Makefile new file mode 100644 index 0000000000..88c106bbbf --- /dev/null +++ b/sysdeps/alpha/nptl/Makefile @@ -0,0 +1,21 @@ +# Copyright (C) 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. + +ifeq ($(subdir),csu) +gen-as-const-headers += tcb-offsets.sym +endif diff --git a/sysdeps/alpha/nptl/tcb-offsets.sym b/sysdeps/alpha/nptl/tcb-offsets.sym new file mode 100644 index 0000000000..3f6433d5e9 --- /dev/null +++ b/sysdeps/alpha/nptl/tcb-offsets.sym @@ -0,0 +1,12 @@ +#include +#include + +-- + +-- Abuse tls.h macros to derive offsets relative to the thread register. +# define __builtin_thread_pointer() ((void *) 0) +# define thread_offsetof(mem) ((void *) &THREAD_SELF->mem - (void *) 0) + +#if TLS_MULTIPLE_THREADS_IN_TCB +MULTIPLE_THREADS_OFFSET thread_offsetof (header.multiple_threads) +#endif diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h index cc054f9ef3..9d125e0d6d 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h @@ -23,6 +23,7 @@ #include #include #include +#include #define __NR_futex 394 @@ -70,79 +71,68 @@ INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret : __ret; \ }) -/* Set *futex to 1 if it is 0, atomically. Returns the old value */ -#define __lll_trylock(futex) \ - ({ int __oldval, __temp; \ - __asm __volatile ( \ - "1: ldl_l %[__oldval], %[__mem]\n" \ - " lda %[__temp], 1\n" \ - " bne %[__oldval], 2f\n" \ - " stl_c %[__temp], %[__mem]\n" \ - " beq %[__temp], 1b\n" \ - __MB \ - "2:" \ - : [__oldval] "=&r" (__oldval), \ - [__temp] "=&r" (__temp) \ - : [__mem] "m" (*(futex)) \ - : "memory"); \ - __oldval; \ - }) -#define lll_mutex_trylock(lock) __lll_trylock (&(lock)) +static inline int __attribute__((always_inline)) +__lll_mutex_trylock(int *futex) +{ + return atomic_compare_and_exchange_val_acq (futex, 1, 0) != 0; +} +#define lll_mutex_trylock(lock) __lll_mutex_trylock (&(lock)) -extern void __lll_lock_wait (int *futex, int val) attribute_hidden; +extern void __lll_lock_wait (int *futex) attribute_hidden; -#define lll_mutex_lock(lock) \ - (void) ({ \ - int *__futex = &(lock); \ - int __val = atomic_exchange_and_add (__futex, 1); \ - atomic_full_barrier(); \ - if (__builtin_expect (__val != 0, 0)) \ - __lll_lock_wait (__futex, __val); \ - }) +static inline void __attribute__((always_inline)) +__lll_mutex_lock(int *futex) +{ + if (atomic_compare_and_exchange_bool_acq (futex, 1, 0) != 0) + __lll_lock_wait (futex); +} +#define lll_mutex_lock(futex) __lll_mutex_lock (&(futex)) -#define lll_mutex_cond_lock(lock) \ - (void) ({ \ - int *__futex = &(lock); \ - int __val = atomic_exchange_and_add (__futex, 2); \ - atomic_full_barrier(); \ - if (__builtin_expect (__val != 0, 0)) \ - /* Note, the val + 1 is kind of ugly here. __lll_lock_wait will \ - add 1 again. But we added 2 to the futex value so this is the \ - right value which will be passed to the kernel. */ \ - __lll_lock_wait (__futex, __val + 1); \ - }) -extern int __lll_timedlock_wait - (int *futex, int val, const struct timespec *) attribute_hidden; +static inline void __attribute__ ((always_inline)) +__lll_mutex_cond_lock (int *futex) +{ + if (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0) + __lll_lock_wait (futex); +} +#define lll_mutex_cond_lock(futex) __lll_mutex_cond_lock (&(futex)) -#define lll_mutex_timedlock(lock, abstime) \ - ({ int *__futex = &(lock); \ - int __val = atomic_exchange_and_add (__futex, 1); \ - atomic_full_barrier(); \ - if (__builtin_expect (__val != 0, 0)) \ - __val = __lll_timedlock_wait (__futex, __val, (abstime)); \ - __val; \ - }) -#define lll_mutex_unlock(lock) \ - ((void) ({ \ - int *__futex = &(lock), __val; \ - atomic_write_barrier(); \ - __val = atomic_exchange_rel (__futex, 0); \ - if (__builtin_expect (__val > 1, 0)) \ - lll_futex_wake (__futex, 1); \ - })) - -#define lll_mutex_unlock_force(lock) \ - ((void) ({ \ - int *__futex = &(lock); \ - atomic_write_barrier(); \ - *__futex = 0; \ - atomic_full_barrier(); \ - lll_futex_wake (__futex, 1); \ - })) +extern int __lll_timedlock_wait (int *futex, const struct timespec *) + attribute_hidden; + +static inline int __attribute__ ((always_inline)) +__lll_mutex_timedlock (int *futex, const struct timespec *abstime) +{ + int result = 0; + if (atomic_compare_and_exchange_bool_acq (futex, 1, 0) != 0) + result = __lll_timedlock_wait (futex, abstime); + return result; +} +#define lll_mutex_timedlock(futex, abstime) \ + __lll_mutex_timedlock (&(futex), abstime) + + +static inline void __attribute__ ((always_inline)) +__lll_mutex_unlock (int *futex) +{ + int val = atomic_exchange_rel (futex, 0); + if (__builtin_expect (val > 1, 0)) + lll_futex_wake (futex, 1); +} +#define lll_mutex_unlock(futex) __lll_mutex_unlock(&(futex)) + + +static inline void __attribute__ ((always_inline)) +__lll_mutex_unlock_force (int *futex) +{ + (void) atomic_exchange_rel (futex, 0); + lll_futex_wake (futex, 1); +} +#define lll_mutex_unlock_force(futex) __lll_mutex_unlock_force(&(futex)) + #define lll_mutex_islocked(futex) \ (futex != 0) @@ -175,21 +165,21 @@ extern int lll_unlock_wake_cb (int *__futex) attribute_hidden; thread ID while the clone is running and is reset to zero afterwards. */ #define lll_wait_tid(tid) \ - do { \ - __typeof (tid) __tid; \ - while ((__tid = (tid)) != 0) \ - lll_futex_wait (&(tid), __tid); \ + do { \ + __typeof (tid) __tid; \ + while ((__tid = (tid)) != 0) \ + lll_futex_wait (&(tid), __tid); \ } while (0) extern int __lll_timedwait_tid (int *, const struct timespec *) attribute_hidden; #define lll_timedwait_tid(tid, abstime) \ - ({ \ - int __res = 0; \ - if ((tid) != 0) \ - __res = __lll_timedwait_tid (&(tid), (abstime)); \ - __res; \ + ({ \ + int __res = 0; \ + if ((tid) != 0) \ + __res = __lll_timedwait_tid (&(tid), (abstime)); \ + __res; \ }) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h index 1b27e27db0..3b08b22c1a 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h @@ -132,26 +132,28 @@ __LABEL($syscall_error) \ # define CDISABLE jsr ra, __local_disable_asynccancel; ldgp ra, 0(gp) # endif -# if defined IS_IN_libpthread || !defined NOT_IN_libc -# ifndef __ASSEMBLER__ +#endif + +#if defined IS_IN_libpthread || !defined NOT_IN_libc +# ifndef __ASSEMBLER__ extern int __local_multiple_threads attribute_hidden; -# define SINGLE_THREAD_P \ +# define SINGLE_THREAD_P \ __builtin_expect (__local_multiple_threads == 0, 1) -# elif defined(PIC) -# define SINGLE_THREAD_P(reg) ldl reg, __local_multiple_threads(gp) !gprel -# else -# define SINGLE_THREAD_P(reg) \ +# elif defined(PIC) +# define SINGLE_THREAD_P(reg) ldl reg, __local_multiple_threads(gp) !gprel +# else +# define SINGLE_THREAD_P(reg) \ ldah reg, __local_multiple_threads(gp) !gprelhigh; \ ldl reg, __local_multiple_threads(reg) !gprellow -# endif -# else -# ifndef __ASSEMBLER__ -# define SINGLE_THREAD_P \ +# endif +#else +# ifndef __ASSEMBLER__ +# define SINGLE_THREAD_P \ __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ header.multiple_threads) == 0, 1) -# else -# error Not done -# endif +# else +# define SINGLE_THREAD_P(reg) \ + call_pal PAL_rduniq; \ + ldl reg, MULTIPLE_THREADS_OFFSET($0) # endif - #endif From df6e7e29ebcd57b6a6b856b2761e712fa38d5303 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 13 Jan 2004 20:47:01 +0000 Subject: [PATCH 3240/4487] * sysdeps/unix/sysv/linux/alpha/rt_sigaction.S: Fix typo. --- sysdeps/unix/sysv/linux/alpha/rt_sigaction.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S index 3e02a661e7..aad988b6c6 100644 --- a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S +++ b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1998 @@ -45,7 +45,7 @@ ENTRY(__syscall_rt_sigaction) ldah a4, sigreturn(gp) !gprelhigh ldah t1, rt_sigreturn(gp) !gprelhigh lda a4, sigreturn(a4) !gprellow - lda t1, rt_sigreturn(a4) !gprellow + lda t1, rt_sigreturn(t1) !gprellow and t0, 0x00000040, t0 # SA_SIGINFO cmovne t0, t1, a4 0: ldi v0, __NR_rt_sigaction From 83c784e84cc90cdcceaa7e4e32d863ca8619c7ee Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 16 Jan 2004 04:59:55 +0000 Subject: [PATCH 3241/4487] * sysdeps/unix/sysv/linux/alpha/rt_sigaction.S: Prefix stubs with __syscall_, move nop inside, adjust users by +4. --- sysdeps/unix/sysv/linux/alpha/rt_sigaction.S | 54 +++++++++----------- 1 file changed, 25 insertions(+), 29 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S index aad988b6c6..e27949feff 100644 --- a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S +++ b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S @@ -26,7 +26,6 @@ This just about halves signal delivery time. */ -#ifdef __NR_rt_sigaction .text ENTRY(__syscall_rt_sigaction) @@ -42,12 +41,20 @@ ENTRY(__syscall_rt_sigaction) beq a1, 0f ldl t0, 8(a1) # sa_flags - ldah a4, sigreturn(gp) !gprelhigh - ldah t1, rt_sigreturn(gp) !gprelhigh - lda a4, sigreturn(a4) !gprellow - lda t1, rt_sigreturn(t1) !gprellow - and t0, 0x00000040, t0 # SA_SIGINFO + + /* The unwinder will subtract one from the return address when + attempting to find the call instruction that led us here. + Since we didn't get here via a normal call, if we do nothing + we would pick up the wrong symbol and the wrong FDE. Account + for this by adding a nop to the start of the function and + then skipping it here by adding 4. */ + ldah a4, __syscall_sigreturn+4(gp) !gprelhigh + ldah t1, __syscall_rt_sigreturn+4(gp) !gprelhigh + lda a4, __syscall_sigreturn+4(a4) !gprellow + lda t1, __syscall_rt_sigreturn+4(t1) !gprellow + and t0, 0x40, t0 # SA_SIGINFO cmovne t0, t1, a4 + 0: ldi v0, __NR_rt_sigaction callsys bne a3, SYSCALL_ERROR_LABEL @@ -57,10 +64,10 @@ PSEUDO_END(__syscall_rt_sigaction) /* To enable unwinding through the signal frame without special hackery elsewhere, describe the entire struct sigcontext with unwind info. - Note that we begin the unwind info one instruction before the start - of the function; the unwinder will subtract one from the return address - attempting to find the call instruction that led us here, since we - didn't get here via a normal call. */ + + In order to minimize the size of the encoding, we set the CFA to the + end of the sigcontext, which makes all of the registers have small + negative offsets from that. */ .macro SIGCONTEXT_REGS_I base, from=0 cfi_offset (\from, \base + (4 + \from) * 8) @@ -91,34 +98,23 @@ PSEUDO_END(__syscall_rt_sigaction) cfi_startproc cfi_return_column (64) SIGCONTEXT_REGS -648 + cfi_def_cfa_offset (648) +__syscall_sigreturn: nop -sigreturn: mov sp, a0 ldi v0, __NR_sigreturn callsys - cfi_endproc - .size sigreturn, .-sigreturn - .type sigreturn, @function + .size __syscall_sigreturn, .-__syscall_sigreturn + .type __syscall_sigreturn, @function - cfi_startproc - cfi_return_column (64) - SIGCONTEXT_REGS -648 cfi_def_cfa_offset (176 + 648) +__syscall_rt_sigreturn: nop -rt_sigreturn: mov sp,a0 ldi v0,__NR_rt_sigreturn callsys - cfi_endproc - .size rt_sigreturn, .-rt_sigreturn - .type rt_sigreturn, @function + .size __syscall_rt_sigreturn, .-__syscall_rt_sigreturn + .type __syscall_rt_sigreturn, @function -#else -ENTRY(__syscall_rt_sigaction) - ldgp $29,0($27) - .prologue 1 - ldi $0,ENOSYS - SYSCALL_ERROR_HANDLER -END(__syscall_rt_sigaction) -#endif + cfi_endproc From 4dbd216dc3fedfdafe055f1a14a99cbc7ee88a76 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 16 Jan 2004 05:04:59 +0000 Subject: [PATCH 3242/4487] * sysdeps/unix/sysv/linux/alpha/Makefile [stdlib]: Process ucontext-offsets.sym. * sysdeps/unix/sysv/linux/alpha/getcontext.S: New file. * sysdeps/unix/sysv/linux/alpha/makecontext.S: New file. * sysdeps/unix/sysv/linux/alpha/setcontext.S: New file. * sysdeps/unix/sysv/linux/alpha/swapcontext.S: New file. * sysdeps/unix/sysv/linux/alpha/ucontext-offsets.sym: New file. --- sysdeps/unix/sysv/linux/alpha/Makefile | 4 + sysdeps/unix/sysv/linux/alpha/getcontext.S | 186 ++++++++++++++++++ sysdeps/unix/sysv/linux/alpha/makecontext.S | 164 +++++++++++++++ sysdeps/unix/sysv/linux/alpha/setcontext.S | 35 ++++ sysdeps/unix/sysv/linux/alpha/swapcontext.S | 51 +++++ .../sysv/linux/alpha/ucontext-offsets.sym | 18 ++ 6 files changed, 458 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/getcontext.S create mode 100644 sysdeps/unix/sysv/linux/alpha/makecontext.S create mode 100644 sysdeps/unix/sysv/linux/alpha/setcontext.S create mode 100644 sysdeps/unix/sysv/linux/alpha/swapcontext.S create mode 100644 sysdeps/unix/sysv/linux/alpha/ucontext-offsets.sym diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile index 3097cc3047..37a9214fe9 100644 --- a/sysdeps/unix/sysv/linux/alpha/Makefile +++ b/sysdeps/unix/sysv/linux/alpha/Makefile @@ -2,6 +2,10 @@ ifeq ($(subdir),posix) sysdep_routines += oldglob endif +ifeq ($(subdir),stdlib) +gen-as-const-headers += ucontext-offsets.sym +endif + ifeq ($(subdir),misc) sysdep_headers += alpha/ptrace.h alpha/regdef.h sys/io.h diff --git a/sysdeps/unix/sysv/linux/alpha/getcontext.S b/sysdeps/unix/sysv/linux/alpha/getcontext.S new file mode 100644 index 0000000000..3566890cf9 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/getcontext.S @@ -0,0 +1,186 @@ +/* Save current context. + Copyright (C) 2004 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. */ + +#include +#include + +/* ??? Should be a better place for this that's asm friendly. */ +#define SIG_BLOCK 1 + + +ENTRY (__getcontext) +#ifdef PROF + ldgp gp, 0(pv) + .set noat + lda AT, _mcount + jsr AT, (AT), _mcount + .set at + .prologue 1 +#else + .prologue 0 +#endif + + bsr $0, __getcontext_x + mov $31, $0 + ret + +END(__getcontext) +weak_alias(__getcontext, getcontext) + + +/* An internal routine used by getcontext and setcontext. + The incomming return address register is $0. */ + + .align 4 + .globl __getcontext_x + .hidden __getcontext_x + .usepv __getcontext_x, no + + cfi_startproc + cfi_return_column (64) +__getcontext_x: + cfi_register (64, 0) + + /* Return value of getcontext. $0 is the only register + whose value is not preserved. */ + stq $31, UC_SIGCTX+SC_REGS($16) + + /* Store all registers into the context. */ + stq $1, UC_SIGCTX+SC_REGS+1*8($16) + stq $2, UC_SIGCTX+SC_REGS+2*8($16) + stq $3, UC_SIGCTX+SC_REGS+3*8($16) + stq $4, UC_SIGCTX+SC_REGS+4*8($16) + stq $5, UC_SIGCTX+SC_REGS+5*8($16) + stq $6, UC_SIGCTX+SC_REGS+6*8($16) + stq $7, UC_SIGCTX+SC_REGS+7*8($16) + stq $8, UC_SIGCTX+SC_REGS+8*8($16) + stq $9, UC_SIGCTX+SC_REGS+9*8($16) + stq $10, UC_SIGCTX+SC_REGS+10*8($16) + stq $11, UC_SIGCTX+SC_REGS+11*8($16) + stq $12, UC_SIGCTX+SC_REGS+12*8($16) + stq $13, UC_SIGCTX+SC_REGS+13*8($16) + stq $14, UC_SIGCTX+SC_REGS+14*8($16) + stq $15, UC_SIGCTX+SC_REGS+15*8($16) + stq $16, UC_SIGCTX+SC_REGS+16*8($16) + stq $17, UC_SIGCTX+SC_REGS+17*8($16) + stq $18, UC_SIGCTX+SC_REGS+18*8($16) + stq $19, UC_SIGCTX+SC_REGS+19*8($16) + stq $20, UC_SIGCTX+SC_REGS+20*8($16) + stq $21, UC_SIGCTX+SC_REGS+21*8($16) + stq $22, UC_SIGCTX+SC_REGS+22*8($16) + stq $23, UC_SIGCTX+SC_REGS+23*8($16) + stq $24, UC_SIGCTX+SC_REGS+24*8($16) + stq $25, UC_SIGCTX+SC_REGS+25*8($16) + stq $26, UC_SIGCTX+SC_REGS+26*8($16) + stq $27, UC_SIGCTX+SC_REGS+27*8($16) + stq $28, UC_SIGCTX+SC_REGS+28*8($16) + stq $29, UC_SIGCTX+SC_REGS+29*8($16) + stq $30, UC_SIGCTX+SC_REGS+30*8($16) + stq $31, UC_SIGCTX+SC_REGS+31*8($16) + + stt $f0, UC_SIGCTX+SC_FPREGS+0*8($16) + stt $f1, UC_SIGCTX+SC_FPREGS+1*8($16) + stt $f2, UC_SIGCTX+SC_FPREGS+2*8($16) + stt $f3, UC_SIGCTX+SC_FPREGS+3*8($16) + stt $f4, UC_SIGCTX+SC_FPREGS+4*8($16) + stt $f5, UC_SIGCTX+SC_FPREGS+5*8($16) + stt $f6, UC_SIGCTX+SC_FPREGS+6*8($16) + stt $f7, UC_SIGCTX+SC_FPREGS+7*8($16) + stt $f8, UC_SIGCTX+SC_FPREGS+8*8($16) + stt $f9, UC_SIGCTX+SC_FPREGS+9*8($16) + stt $f10, UC_SIGCTX+SC_FPREGS+10*8($16) + stt $f11, UC_SIGCTX+SC_FPREGS+11*8($16) + stt $f12, UC_SIGCTX+SC_FPREGS+12*8($16) + stt $f13, UC_SIGCTX+SC_FPREGS+13*8($16) + stt $f14, UC_SIGCTX+SC_FPREGS+14*8($16) + stt $f15, UC_SIGCTX+SC_FPREGS+15*8($16) + stt $f16, UC_SIGCTX+SC_FPREGS+16*8($16) + stt $f17, UC_SIGCTX+SC_FPREGS+17*8($16) + stt $f18, UC_SIGCTX+SC_FPREGS+18*8($16) + stt $f19, UC_SIGCTX+SC_FPREGS+19*8($16) + stt $f20, UC_SIGCTX+SC_FPREGS+20*8($16) + stt $f21, UC_SIGCTX+SC_FPREGS+21*8($16) + stt $f22, UC_SIGCTX+SC_FPREGS+22*8($16) + stt $f23, UC_SIGCTX+SC_FPREGS+23*8($16) + stt $f24, UC_SIGCTX+SC_FPREGS+24*8($16) + stt $f25, UC_SIGCTX+SC_FPREGS+25*8($16) + stt $f26, UC_SIGCTX+SC_FPREGS+26*8($16) + stt $f27, UC_SIGCTX+SC_FPREGS+27*8($16) + stt $f28, UC_SIGCTX+SC_FPREGS+28*8($16) + stt $f29, UC_SIGCTX+SC_FPREGS+29*8($16) + stt $f30, UC_SIGCTX+SC_FPREGS+30*8($16) + stt $f31, UC_SIGCTX+SC_FPREGS+31*8($16) + + mf_fpcr $f0 + lda $1, 8 + stt $f0, UC_SIGCTX+SC_FPCR($16) + + /* The return address of getcontext is the restart pc. */ + stq $26, UC_SIGCTX+SC_PC($16) + + /* Userlevel always has a processor status word of 8. */ + stq $1, UC_SIGCTX+SC_PS($16) + + /* Save registers around the syscall. We preserve $17 + for the benefit of swapcontext. */ + subq $30, 4*8, $30 + cfi_adjust_cfa_offset(4*8) + stq $0, 0($30) + cfi_rel_offset(64, 0) + stq $16, 8($30) + stq $17, 16($30) + + /* Save the current signal mask. Whee, there are three + copies of this in the alpha ucontext_t. */ + lda $16, SIG_BLOCK + lda $17, 0 + lda $0, __NR_osf_sigprocmask + callsys + + ldq $16, 8($30) + ldq $17, 16($30) + + stq $0, UC_OSF_SIGMASK($16) + stq $0, UC_SIGCTX+SC_MASK($16) + stq $0, UC_SIGMASK($16) + stq $31, UC_SIGMASK + 1*8($16) + stq $31, UC_SIGMASK + 2*8($16) + stq $31, UC_SIGMASK + 3*8($16) + stq $31, UC_SIGMASK + 4*8($16) + stq $31, UC_SIGMASK + 5*8($16) + stq $31, UC_SIGMASK + 6*8($16) + stq $31, UC_SIGMASK + 7*8($16) + stq $31, UC_SIGMASK + 8*8($16) + stq $31, UC_SIGMASK + 9*8($16) + stq $31, UC_SIGMASK +10*8($16) + stq $31, UC_SIGMASK +11*8($16) + stq $31, UC_SIGMASK +12*8($16) + stq $31, UC_SIGMASK +13*8($16) + stq $31, UC_SIGMASK +14*8($16) + stq $31, UC_SIGMASK +15*8($16) + + ldq $0, 0($30) + addq $30, 4*8, $30 + cfi_register (64, 0) + cfi_adjust_cfa_offset(-4*8) + ret $31, ($0), 1 + + cfi_endproc + .size __getcontext_x, .-__getcontext_x + .type __getcontext_x, @function diff --git a/sysdeps/unix/sysv/linux/alpha/makecontext.S b/sysdeps/unix/sysv/linux/alpha/makecontext.S new file mode 100644 index 0000000000..223117e26d --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/makecontext.S @@ -0,0 +1,164 @@ +/* Copyright (C) 2004 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. */ + +#include +#include + + +ENTRY(__makecontext) + ldgp $29, 0($27) +#ifdef PROF + .set noat + lda AT, _mcount + jsr AT, (AT), _mcount + .set at +#endif + .prologue 1 + + /* Compute top of stack, including arguments. */ + ldq $1, UC_STACK+SS_SP($16) + ldq $2, UC_STACK+SS_SIZE($16) + addq $1, $2, $8 + subq $18, 6, $1 + cmovlt $1, 0, $1 + s8addq $1, 0, $2 + subq $8, $2, $8 + + /* Copy all parameters. Switch statement header here. */ + ldah $3, $jumptable($29) !gprelhigh + cmple $18, 6, $1 + mov $18, $2 + cmoveq $1, 7, $2 + s4addq $2, $3, $3 + ldl $4, $jumptable($3) !gprellow + addq $4, $29, $4 + jmp $31, ($4), $args1 + + .section .rodata + .align 2 +$jumptable: + .gprel32 $args0 + .gprel32 $args1 + .gprel32 $args2 + .gprel32 $args3 + .gprel32 $args4 + .gprel32 $args5 + .gprel32 $args6 + .gprel32 $argsN + .text + + /* Here we process arguments 7 through N. This is a straight + stack-to-stack copy. */ + .align 4 +$argsN: + subq $18, 6, $1 + lda $2, 0($8) + lda $3, 3*8($30) + .align 4 +1: + ldq $0, 0($3) + subq $1, 1, $1 + lda $3, 8($3) + stq $0, 0($2) + lda $2, 8($2) + bne $1, 1b + + /* Here we process arguments 6 through 0. This involves + copying into the register save areas of the ucontext. */ + .align 4 +$args6: + ldq $0, 2*8($30) + stq $0, UC_SIGCTX+SC_REGS+21*8($16) + unop + stq $0, UC_SIGCTX+SC_FPREGS+21*8($16) +$args5: + ldq $0, 1*8($30) + stq $0, UC_SIGCTX+SC_REGS+20*8($16) + unop + stq $0, UC_SIGCTX+SC_FPREGS+20*8($16) +$args4: + ldq $0, 0*8($30) + stq $0, UC_SIGCTX+SC_REGS+19*8($16) + unop + stq $0, UC_SIGCTX+SC_FPREGS+19*8($16) +$args3: + unop + stq $21, UC_SIGCTX+SC_REGS+18*8($16) + unop + stt $f21, UC_SIGCTX+SC_FPREGS+18*8($16) +$args2: + unop + stq $20, UC_SIGCTX+SC_REGS+17*8($16) + unop + stt $f20, UC_SIGCTX+SC_FPREGS+17*8($16) +$args1: + unop + stq $19, UC_SIGCTX+SC_REGS+16*8($16) + unop + stt $f19, UC_SIGCTX+SC_FPREGS+16*8($16) +$args0: + + /* Set up the registers ready to invoke __startcontext. + We seed $27 with the target function address, and $9 + with the link from ucp. */ + ldah $0, __startcontext($29) !gprelhigh + ldq $1, UC_LINK($16) + lda $0, __startcontext($0) !gprellow + stq $17, UC_SIGCTX+SC_REGS+27*8($16) + stq $8, UC_SIGCTX+SC_REGS+30*8($16) + stq $0, UC_SIGCTX+SC_PC($16) + stq $1, UC_SIGCTX+SC_REGS+9*8($16) + + /* No return value from makecontext. */ + ret + +END(__makecontext) +weak_alias (__makecontext, makecontext) + +/* This function is where a new makecontext "thread" begins life. + We have already set up $27 for calling the target function, and + we've set $9 to the UC_LINK of the parent context. + + If the function returns, we either jump to the linked context + (if non-null) or exit. */ + + .align 4 + .ent __startcontext +__startcontext: + .frame $31, 0, $31, 0 + .prologue 0 + + jsr $26, ($27), 0 + ldgp $29, 0($26) + mov $9, $16 + beq $9, 1f + +#ifdef PIC + bsr $26, __setcontext !samegp +1: mov $31, $16 + bsr $26, HIDDEN_JUMPTARGET(exit) !samegp +#else + jsr $26, __setcontext + ldgp $29, 0($26) +1: mov $31, $16 + jsr $26, HIDDEN_JUMPTARGET(exit) +#endif + + halt + + .end __startcontext diff --git a/sysdeps/unix/sysv/linux/alpha/setcontext.S b/sysdeps/unix/sysv/linux/alpha/setcontext.S new file mode 100644 index 0000000000..7d443d41c7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/setcontext.S @@ -0,0 +1,35 @@ +/* Install given context. + Copyright (C) 2004 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. */ + +#include +#include + + +/* In case the user fiddled it, copy the "official" signal mask + from the ucontext_t into the sigcontext structure. */ +#undef PSEUDO_PREPARE_ARGS +#define PSEUDO_PREPARE_ARGS \ + ldq $0, UC_SIGMASK($16); \ + stq $0, UC_SIGCTX+SC_MASK($16); \ + lda $16, UC_SIGCTX($16); + +PSEUDO(__setcontext, sigreturn, 1) + ret +PSEUDO_END(__setcontext) +weak_alias(__setcontext, setcontext) diff --git a/sysdeps/unix/sysv/linux/alpha/swapcontext.S b/sysdeps/unix/sysv/linux/alpha/swapcontext.S new file mode 100644 index 0000000000..5f6615e0b6 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/swapcontext.S @@ -0,0 +1,51 @@ +/* Save current context and install the given one. + Copyright (C) 2004 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. */ + +#include +#include + +ENTRY(__swapcontext) + +#ifdef PROF + ldgp $29, 0($27) + .set noat + lda AT, _mcount + jsr AT, (AT), _mcount + .set at + .prologue 1 +#elif defined PIC + .prologue 0 +#else + ldgp $29, 0($27) + .prologue 1 +#endif + +#ifdef PIC + unop + bsr $0, __getcontext_x !samegp + mov $17, $16 + br $31, __setcontext !samegp +#else + jsr $0, __getcontext_x + mov $17, $16 + jmp $31, __setcontext +#endif + +END(__swapcontext) +weak_alias(__swapcontext, swapcontext) diff --git a/sysdeps/unix/sysv/linux/alpha/ucontext-offsets.sym b/sysdeps/unix/sysv/linux/alpha/ucontext-offsets.sym new file mode 100644 index 0000000000..f95ff75636 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/ucontext-offsets.sym @@ -0,0 +1,18 @@ +#include +#include + +-- +UC_LINK offsetof (ucontext_t, uc_link) +UC_OSF_SIGMASK offsetof (ucontext_t, __uc_osf_sigmask) +UC_STACK offsetof (ucontext_t, uc_stack) +UC_SIGCTX offsetof (ucontext_t, uc_mcontext) +UC_SIGMASK offsetof (ucontext_t, uc_sigmask) +SC_REGS offsetof (struct sigcontext, sc_regs) +SC_FPREGS offsetof (struct sigcontext, sc_fpregs) +SC_PC offsetof (struct sigcontext, sc_pc) +SC_PS offsetof (struct sigcontext, sc_ps) +SC_FPCRS offsetof (struct sigcontext, sc_fpcr) +SC_MASK offsetof (struct sigcontext, sc_mask) +SC_FPCR offsetof (struct sigcontext, sc_fpcr) +SS_SP offsetof (stack_t, ss_sp) +SS_SIZE offsetof (stack_t, ss_size) From bbbfa1b98e8c19a03afbfe469a59e767e3acdfae Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 16 Jan 2004 05:23:05 +0000 Subject: [PATCH 3243/4487] * sysdeps/alpha/tls.h (tcbhead_t): Add private. (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE, TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64. (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove. (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify. (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise. * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64. --- sysdeps/alpha/nptl/tls.h | 80 +++++++------------ .../unix/sysv/linux/alpha/nptl/createthread.c | 3 +- 2 files changed, 28 insertions(+), 55 deletions(-) diff --git a/sysdeps/alpha/nptl/tls.h b/sysdeps/alpha/nptl/tls.h index f947fcf648..bc6630953f 100644 --- a/sysdeps/alpha/nptl/tls.h +++ b/sysdeps/alpha/nptl/tls.h @@ -57,93 +57,67 @@ typedef union dtv /* Get the thread descriptor definition. */ # include -/* This layout is actually wholly private and not affected by the ABI. - Nor does it overlap the pthread data structure, so we need nothing - extra here at all. */ typedef struct { dtv_t *dtv; + void *private; } tcbhead_t; /* This is the size of the initial TCB. */ -# define TLS_INIT_TCB_SIZE 0 +# define TLS_INIT_TCB_SIZE sizeof (tcbhead_t) /* Alignment requirements for the initial TCB. */ -# define TLS_INIT_TCB_ALIGN __alignof__ (struct pthread) +# define TLS_INIT_TCB_ALIGN 16 /* This is the size of the TCB. */ -# define TLS_TCB_SIZE 0 - -/* Alignment requirements for the TCB. */ -# define TLS_TCB_ALIGN __alignof__ (struct pthread) +# define TLS_TCB_SIZE sizeof (tcbhead_t) /* This is the size we need before TCB. */ -# define TLS_PRE_TCB_SIZE \ - (sizeof (struct pthread) \ - + ((sizeof (tcbhead_t) + TLS_TCB_ALIGN - 1) & ~(TLS_TCB_ALIGN - 1))) - -/* The following assumes that TP (R2 or R13) points to the end of the - TCB + 0x7000 (per the ABI). This implies that TCB address is - TP - 0x7000. As we define TLS_DTV_AT_TP we can - assume that the pthread struct is allocated immediately ahead of the - TCB. This implies that the pthread_descr address is - TP - (TLS_PRE_TCB_SIZE + 0x7000). */ -/* ??? PPC uses offset 0x7000; seems like a good idea for alpha too, - but binutils not yet changed to match. */ -# define TLS_TCB_OFFSET 0 +# define TLS_PRE_TCB_SIZE sizeof (struct pthread) + +/* Alignment requirements for the TCB. */ +# define TLS_TCB_ALIGN 16 /* Install the dtv pointer. The pointer passed is to the element with index -1 which contain the length. */ # define INSTALL_DTV(tcbp, dtvp) \ - ((tcbhead_t *) (tcbp))[-1].dtv = dtvp + 1 + (((tcbhead_t *) (tcbp))->dtv = (dtvp) + 1) /* Install new dtv for current thread. */ -# define INSTALL_NEW_DTV(dtv) (THREAD_DTV() = (dtv)) +# define INSTALL_NEW_DTV(dtv) \ + (THREAD_DTV() = (dtv)) /* Return dtv of given thread descriptor. */ -# define GET_DTV(tcbp) (((tcbhead_t *) (tcbp))[-1].dtv) +# define GET_DTV(tcbp) \ + (((tcbhead_t *) (tcbp))->dtv) /* Code to initially initialize the thread pointer. This might need special attention since 'errno' is not yet available and if the operation can cause a failure 'errno' must not be touched. */ # define TLS_INIT_TP(tcbp, secondcall) \ - (__builtin_set_thread_pointer ((void *) (tcbp) + TLS_TCB_OFFSET), NULL) + (__builtin_set_thread_pointer ((void *)(tcbp)), NULL) /* Return the address of the dtv for the current thread. */ # define THREAD_DTV() \ - (((tcbhead_t *) (__builtin_thread_pointer () - TLS_TCB_OFFSET))[-1].dtv) + (((tcbhead_t *) __builtin_thread_pointer ())->dtv) /* Return the thread descriptor for the current thread. */ # define THREAD_SELF \ - ((struct pthread *) (__builtin_thread_pointer () \ - - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE)) + ((struct pthread *)__builtin_thread_pointer () - 1) /* Magic for libthread_db to know how to do THREAD_SELF. */ # define DB_THREAD_SELF \ - REGISTER (64, 64, 32 * 8, - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE) - -/* Identifier for the current thread. THREAD_SELF is usable but - sometimes more expensive than necessary as in this case. */ -# define THREAD_ID (__builtin_thread_pointer ()) - -/* Read member of the thread descriptor directly. */ -# define THREAD_GETMEM(descr, member) ((void)(descr), (THREAD_SELF)->member) - -/* Same as THREAD_GETMEM, but the member offset can be non-constant. */ -# define THREAD_GETMEM_NC(descr, member, idx) \ - ((void)(descr), (THREAD_SELF)->member[idx]) - -/* Set member of the thread descriptor directly. */ -# define THREAD_SETMEM(descr, member, value) \ - ((void)(descr), (THREAD_SELF)->member = (value)) - -/* Same as THREAD_SETMEM, but the member offset can be non-constant. */ -# define THREAD_SETMEM_NC(descr, member, idx, value) \ - ((void)(descr), (THREAD_SELF)->member[idx] = (value)) - -/* l_tls_offset == 0 is perfectly valid on PPC, so we have to use some - different value to mean unset l_tls_offset. */ -# define NO_TLS_OFFSET -1 + REGISTER (64, 64, 32 * 8, -sizeof (struct pthread)) + +/* Access to data in the thread descriptor is easy. */ +#define THREAD_GETMEM(descr, member) \ + descr->member +#define THREAD_GETMEM_NC(descr, member, idx) \ + descr->member[idx] +#define THREAD_SETMEM(descr, member, value) \ + descr->member = (value) +#define THREAD_SETMEM_NC(descr, member, idx, value) \ + descr->member[idx] = (value) #endif /* __ASSEMBLER__ */ diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/createthread.c b/sysdeps/unix/sysv/linux/alpha/nptl/createthread.c index b29c57b52a..6a51e73da6 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/createthread.c +++ b/sysdeps/unix/sysv/linux/alpha/nptl/createthread.c @@ -17,8 +17,7 @@ 02111-1307 USA. */ /* Value passed to 'clone' for initialization of the thread register. */ -#define TLS_VALUE ((void *) (pd) \ - + TLS_TCB_OFFSET + TLS_PRE_TCB_SIZE) +#define TLS_VALUE (pd + 1) /* Get the real implementation. */ #include From 56a46fe4b9c6e7fd7e4ce6dfdba2dab3bc673931 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 16 Jan 2004 05:59:42 +0000 Subject: [PATCH 3244/4487] * sysdeps/alpha/dl-machine.h (RTLD_START): Use _dl_argv_internal. --- sysdeps/alpha/dl-machine.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 6680abf379..3616faedbf 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. Alpha version. - Copyright (C) 1996-2002, 2003 Free Software Foundation, Inc. + Copyright (C) 1996-2002, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson . @@ -348,15 +348,16 @@ _dl_start_user: \n\ /* Adjust the stack pointer to skip _dl_skip_args words.\n\ This involves copying everything down, since the \n\ stack pointer must always be 16-byte aligned. */ \n\ + ldah $7, _dl_argv_internal($gp) !gprelhigh \n\ ldq $2, 0($sp) \n\ - ldq $5, _dl_argv \n\ + ldq $5, _dl_argv_internal($7) !gprellow \n\ subq $31, $1, $6 \n\ subq $2, $1, $2 \n\ s8addq $6, $5, $5 \n\ mov $sp, $4 \n\ s8addq $1, $sp, $3 \n\ stq $2, 0($sp) \n\ - stq $5, _dl_argv \n\ + stq $5, _dl_argv_internal($7) !gprellow \n\ /* Copy down argv. */ \n\ 0: ldq $5, 8($3) \n\ addq $4, 8, $4 \n\ From 7bd9f5453c7a62e56dd4d979340d8dfcaa9745e0 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 16 Jan 2004 06:02:52 +0000 Subject: [PATCH 3245/4487] * sysdeps/unix/alpha/sysdep.h [PIC] (SYSCALL_ERROR_HANDLER): Use !samegp relocation. --- sysdeps/unix/alpha/sysdep.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h index 26cf918c1c..d3ed2a9e88 100644 --- a/sysdeps/unix/alpha/sysdep.h +++ b/sysdeps/unix/alpha/sysdep.h @@ -85,13 +85,11 @@ lda v0, -1; \ ret #elif defined(PIC) -# define SYSCALL_ERROR_LABEL __syscall_error -# define SYSCALL_ERROR_HANDLER \ - br $31, __syscall_error !samegp +# define SYSCALL_ERROR_LABEL __syscall_error !samegp +# define SYSCALL_ERROR_HANDLER br $31, SYSCALL_ERROR_LABEL #else # define SYSCALL_ERROR_LABEL $syscall_error -# define SYSCALL_ERROR_HANDLER \ - jmp $31, __syscall_error +# define SYSCALL_ERROR_HANDLER jmp $31, __syscall_error #endif /* RTLD_PRIVATE_ERRNO */ /* Overridden by specific syscalls. */ From 6092f9e018bffe2fa6739ae1bdcda00819e9fe13 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 16 Jan 2004 06:04:53 +0000 Subject: [PATCH 3246/4487] * sysdeps/unix/alpha/sysdep.h: Revert last change. --- sysdeps/unix/alpha/sysdep.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h index d3ed2a9e88..26cf918c1c 100644 --- a/sysdeps/unix/alpha/sysdep.h +++ b/sysdeps/unix/alpha/sysdep.h @@ -85,11 +85,13 @@ lda v0, -1; \ ret #elif defined(PIC) -# define SYSCALL_ERROR_LABEL __syscall_error !samegp -# define SYSCALL_ERROR_HANDLER br $31, SYSCALL_ERROR_LABEL +# define SYSCALL_ERROR_LABEL __syscall_error +# define SYSCALL_ERROR_HANDLER \ + br $31, __syscall_error !samegp #else # define SYSCALL_ERROR_LABEL $syscall_error -# define SYSCALL_ERROR_HANDLER jmp $31, __syscall_error +# define SYSCALL_ERROR_HANDLER \ + jmp $31, __syscall_error #endif /* RTLD_PRIVATE_ERRNO */ /* Overridden by specific syscalls. */ From def952dc40b0f533c7c6c91c9cecb84bd48cea6e Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 17 Jan 2004 01:38:55 +0000 Subject: [PATCH 3247/4487] 2004-01-13 Daniel Jacobowitz * sysdeps/powerpc/nofpu/sim-full.c (__sim_exceptions) (__sim_disabled_exceptions, __sim_round_mode): Declare with hidden data and nocommon. * sysdeps/powerpc/nofpu/soft-supp.h (__sim_exceptions) (__sim_disabled_exceptions, __sim_round_mode): Use libc_hidden_proto. * sysdeps/powerpc/soft-fp/sfp-machine.h (__sim_exceptions) (__sim_disabled_exceptions, __sim_round_mode): Likewise. --- sysdeps/powerpc/nofpu/sim-full.c | 9 ++++++--- sysdeps/powerpc/nofpu/soft-supp.h | 12 ++++++++---- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/sysdeps/powerpc/nofpu/sim-full.c b/sysdeps/powerpc/nofpu/sim-full.c index 9f4c96ff20..d018240e6d 100644 --- a/sysdeps/powerpc/nofpu/sim-full.c +++ b/sysdeps/powerpc/nofpu/sim-full.c @@ -1,5 +1,5 @@ /* Software floating-point exception handling emulation. - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2004 Free Software Foundation, Inc. Contributed by Aldy Hernandez , 2002. This file is part of the GNU C Library. @@ -23,12 +23,15 @@ #include "soft-supp.h" /* Global to store sticky exceptions. */ -int __sim_exceptions; +int __sim_exceptions __attribute__ ((nocommon)); +libc_hidden_data_def (__sim_exceptions); /* By default, no exceptions should trap. */ int __sim_disabled_exceptions = 0xffffffff; +libc_hidden_data_def (__sim_disabled_exceptions); -int __sim_round_mode; +int __sim_round_mode __attribute__ ((nocommon)); +libc_hidden_data_def (__sim_round_mode); void __simulate_exceptions (int x) diff --git a/sysdeps/powerpc/nofpu/soft-supp.h b/sysdeps/powerpc/nofpu/soft-supp.h index e358eda5c7..3922426bd0 100644 --- a/sysdeps/powerpc/nofpu/soft-supp.h +++ b/sysdeps/powerpc/nofpu/soft-supp.h @@ -1,5 +1,5 @@ /* Internal support stuff for complete soft float. - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2004 Free Software Foundation, Inc. Contributed by Aldy Hernandez , 2002. This file is part of the GNU C Library. @@ -27,7 +27,11 @@ typedef union } fenv_union_t; -extern int __sim_exceptions attribute_hidden; -extern int __sim_disabled_exceptions attribute_hidden; -extern int __sim_round_mode attribute_hidden; +extern int __sim_exceptions; +libc_hidden_proto (__sim_exceptions); +extern int __sim_disabled_exceptions; +libc_hidden_proto (__sim_disabled_exceptions); +extern int __sim_round_mode; +libc_hidden_proto (__sim_round_mode); + extern void __simulate_exceptions (int x) attribute_hidden; From 9efb40c83605d89e1e897ddebc1a186435a5a210 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 20 Jan 2004 23:23:55 +0000 Subject: [PATCH 3248/4487] Add readahead prototype. --- sysdeps/unix/sysv/linux/alpha/bits/fcntl.h | 8 ++++++++ sysdeps/unix/sysv/linux/arm/bits/fcntl.h | 8 ++++++++ sysdeps/unix/sysv/linux/cris/bits/fcntl.h | 8 ++++++++ sysdeps/unix/sysv/linux/hppa/bits/fcntl.h | 8 ++++++++ sysdeps/unix/sysv/linux/m68k/bits/fcntl.h | 8 ++++++++ 5 files changed, 40 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h index a84d33572d..7d1197a8ea 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h @@ -171,3 +171,11 @@ struct flock64 # define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */ # define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ #endif + +__BEGIN_DECLS + +/* Provide kernel hint to read ahead. */ +extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count) + __THROW; + +__END_DECLS diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h index 152858d9f6..ce17d68038 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h @@ -178,3 +178,11 @@ struct flock64 # define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */ # define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ #endif + +__BEGIN_DECLS + +/* Provide kernel hint to read ahead. */ +extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count) + __THROW; + +__END_DECLS diff --git a/sysdeps/unix/sysv/linux/cris/bits/fcntl.h b/sysdeps/unix/sysv/linux/cris/bits/fcntl.h index 7e841f831a..69ce6a506b 100644 --- a/sysdeps/unix/sysv/linux/cris/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/cris/bits/fcntl.h @@ -177,3 +177,11 @@ struct flock64 # define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */ # define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ #endif + +__BEGIN_DECLS + +/* Provide kernel hint to read ahead. */ +extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count) + __THROW; + +__END_DECLS diff --git a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h index fca17b1b77..6f13871d83 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h @@ -170,3 +170,11 @@ struct flock64 # define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */ # define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ #endif + +__BEGIN_DECLS + +/* Provide kernel hint to read ahead. */ +extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count) + __THROW; + +__END_DECLS diff --git a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h index 7de111adb7..af7c0ea9ac 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h @@ -177,3 +177,11 @@ struct flock64 # define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */ # define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ #endif + +__BEGIN_DECLS + +/* Provide kernel hint to read ahead. */ +extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count) + __THROW; + +__END_DECLS From 2de6922e31dbf00d5be7da996ecd094fc18baac8 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 23 Jan 2004 21:08:08 +0000 Subject: [PATCH 3249/4487] * Versions.def (libm): Replace GLIBC_2.3.3 with GLIBC_2.3.4. * sysdeps/alpha/fpu/Versions (libm): Likewise. * sysdeps/alpha/fpu/cfloat-compat.h (cfloat_versions): Likewise. * sysdeps/alpha/fpu/s_clog10f.c (clog10f): Likewise. --- sysdeps/alpha/fpu/Versions | 2 +- sysdeps/alpha/fpu/cfloat-compat.h | 4 ++-- sysdeps/alpha/fpu/s_clog10f.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sysdeps/alpha/fpu/Versions b/sysdeps/alpha/fpu/Versions index e2925e2ed6..c9b0e03a91 100644 --- a/sysdeps/alpha/fpu/Versions +++ b/sysdeps/alpha/fpu/Versions @@ -5,7 +5,7 @@ libc { } } libm { - GLIBC_2.3.3 { + GLIBC_2.3.4 { # functions implementing old complex float abi __c1_cabsf; __c1_cacosf; __c1_cacoshf; __c1_cargf; __c1_casinf; __c1_casinhf; __c1_catanf; __c1_catanhf; __c1_ccosf; __c1_ccoshf; diff --git a/sysdeps/alpha/fpu/cfloat-compat.h b/sysdeps/alpha/fpu/cfloat-compat.h index cb40f55bdf..d325a7650e 100644 --- a/sysdeps/alpha/fpu/cfloat-compat.h +++ b/sysdeps/alpha/fpu/cfloat-compat.h @@ -60,7 +60,7 @@ #include -#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_3_3) +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_3_4) #define cfloat_versions_compat(func) \ compat_symbol (libm, __c1_##func, func, GLIBC_2_1) #else @@ -69,6 +69,6 @@ #define cfloat_versions(func) \ cfloat_versions_compat(func); \ - versioned_symbol (libm, __c2_##func, func, GLIBC_2_3_3); \ + versioned_symbol (libm, __c2_##func, func, GLIBC_2_3_4); \ extern typeof(__c2_##func) __##func attribute_hidden; \ strong_alias (__c2_##func, __##func) diff --git a/sysdeps/alpha/fpu/s_clog10f.c b/sysdeps/alpha/fpu/s_clog10f.c index bd60ed1bb0..12ecdea957 100644 --- a/sysdeps/alpha/fpu/s_clog10f.c +++ b/sysdeps/alpha/fpu/s_clog10f.c @@ -51,11 +51,11 @@ __c2_clog10f (c2_cfloat_decl (x)) /* Ug. __clog10f was exported from GLIBC_2.1. This is the only complex function whose double-underscore symbol was exported, so we get to handle that specially. */ -#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_3_3) +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_3_4) strong_alias (__c1_clog10f, __c1_clog10f_2); compat_symbol (libm, __c1_clog10f, clog10f, GLIBC_2_1); compat_symbol (libm, __c1_clog10f_2, __clog10f, GLIBC_2_1); #endif -versioned_symbol (libm, __c2_clog10f, clog10f, GLIBC_2_3_3); +versioned_symbol (libm, __c2_clog10f, clog10f, GLIBC_2_3_4); extern typeof(__c2_clog10f) __clog10f attribute_hidden; strong_alias (__c2_clog10f, __clog10f) From 83eb9f210dd51f87f2a029170bfe659b327f7171 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 20 Feb 2004 05:41:20 +0000 Subject: [PATCH 3250/4487] (DL_ARGV_NOT_RELRO): Define. --- sysdeps/alpha/dl-machine.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 3616faedbf..cf96b778bd 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -293,6 +293,10 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) strong_alias (_dl_runtime_resolve, _dl_runtime_profile); #endif +/* _dl_argv cannot be attribute_relro, because _dl_start_user below + might write into it after _dl_start returns. */ +#define DL_ARGV_NOT_RELRO 1 + /* Initial entry point code for the dynamic linker. The C function `_dl_start' is the real entry point; its return value is the user program's entry point. */ From f742623a42855372127e838fc5acd1a86539e7a6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 20 Feb 2004 20:14:00 +0000 Subject: [PATCH 3251/4487] (DL_ARGV_NOT_RELRO): Remove. --- sysdeps/alpha/dl-machine.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index cf96b778bd..3616faedbf 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -293,10 +293,6 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) strong_alias (_dl_runtime_resolve, _dl_runtime_profile); #endif -/* _dl_argv cannot be attribute_relro, because _dl_start_user below - might write into it after _dl_start returns. */ -#define DL_ARGV_NOT_RELRO 1 - /* Initial entry point code for the dynamic linker. The C function `_dl_start' is the real entry point; its return value is the user program's entry point. */ From 45f79d6b6a4f6ffcb002ba87bb86bf1a01bbbae6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 20 Feb 2004 20:14:55 +0000 Subject: [PATCH 3252/4487] Alpha specific definition for ld.so. --- sysdeps/alpha/dl-sysdep.h | 41 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 sysdeps/alpha/dl-sysdep.h diff --git a/sysdeps/alpha/dl-sysdep.h b/sysdeps/alpha/dl-sysdep.h new file mode 100644 index 0000000000..0b4c8050de --- /dev/null +++ b/sysdeps/alpha/dl-sysdep.h @@ -0,0 +1,41 @@ +/* System-specific settings for dynamic linker code. Alpha version. + Copyright (C) 2002, 2003, 2004 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 _DL_SYSDEP_H +#define _DL_SYSDEP_H 1 + +/* This macro must be defined to either 0 or 1. + + If 1, then an errno global variable hidden in ld.so will work right with + all the errno-using libc code compiled for ld.so, and there is never a + need to share the errno location with libc. This is appropriate only if + all the libc functions that ld.so uses are called without PLT and always + get the versions linked into ld.so rather than the libc ones. */ + +#ifdef IS_IN_rtld +# define RTLD_PRIVATE_ERRNO 1 +#else +# define RTLD_PRIVATE_ERRNO 0 +#endif + +/* _dl_argv cannot be attribute_relro, because _dl_start_user + might write into it after _dl_start returns. */ +#define DL_ARGV_NOT_RELRO 1 + +#endif /* dl-sysdep.h */ From e98a88227fad0d66607a64968c6b92ffc5542034 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Feb 2004 02:10:01 +0000 Subject: [PATCH 3253/4487] (feholdexcept): Fix order of fp status register loads. --- sysdeps/hppa/fpu/feholdexcpt.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sysdeps/hppa/fpu/feholdexcpt.c b/sysdeps/hppa/fpu/feholdexcpt.c index db9fb409ae..5aec0151f8 100644 --- a/sysdeps/hppa/fpu/feholdexcpt.c +++ b/sysdeps/hppa/fpu/feholdexcpt.c @@ -46,11 +46,11 @@ feholdexcept (fenv_t *envp) /* Load the new environment. */ _regs = &clear; __asm__ ( - "fldd,ma -8(%1),%%fr3\n" - "fldd,ma -8(%1),%%fr2\n" - "fldd,ma -8(%1),%%fr1\n" - "fldd 0(%1),%%fr0\n" - : "=m" (*_regs), "+r" (_regs)); + "fldd,ma 8(%0),%%fr0\n" + "fldd,ma 8(%0),%%fr1\n" + "fldd,ma 8(%0),%%fr2\n" + "fldd 0(%0),%%fr3\n" + : : "r" (_regs)); return 0; } From 3bc82bb9b580bf94cf30f3abb2b5324c683864f4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 3 Mar 2004 18:55:08 +0000 Subject: [PATCH 3254/4487] (posix_fadvise64): Remove. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 1 - 1 file changed, 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index d30a9b6b55..b3168dea26 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -21,7 +21,6 @@ getpriority - getpriority i:ii __getpriority getpriority mmap - mmap b:aniiii __mmap mmap __mmap64 mmap64 llseek EXTRA lseek C:3 __libc_lseek __lseek lseek __libc_lseek64 __llseek llseek __lseek64 lseek64 lseek llseek - -posix_fadvise64 - fadvise64 Vi:iiii posix_fadvise64 posix_fadvise pread - pread64 C:4 __libc_pread __libc_pread64 __pread pread __pread64 pread64 pwrite - pwrite64 C:4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64 fstatfs - fstatfs i:ip __fstatfs fstatfs __fstatfs64 fstatfs64 From 5d2146a9e29b706783bd346f233a270f9f8759f3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 3 Mar 2004 18:56:03 +0000 Subject: [PATCH 3255/4487] posix_fadvise64 implementation. --- sysdeps/unix/sysv/linux/alpha/posix_fadvise64.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/posix_fadvise64.c diff --git a/sysdeps/unix/sysv/linux/alpha/posix_fadvise64.c b/sysdeps/unix/sysv/linux/alpha/posix_fadvise64.c new file mode 100644 index 0000000000..c9f72c4ce1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/posix_fadvise64.c @@ -0,0 +1 @@ +/* posix_fadvise64 is in posix_fadvise.c */ From f519f549509a6b196fb02d93a4422fac4c0eee29 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 3 Mar 2004 18:56:20 +0000 Subject: [PATCH 3256/4487] posix_fadvise implementation. --- sysdeps/unix/sysv/linux/alpha/posix_fadvise.c | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/posix_fadvise.c diff --git a/sysdeps/unix/sysv/linux/alpha/posix_fadvise.c b/sysdeps/unix/sysv/linux/alpha/posix_fadvise.c new file mode 100644 index 0000000000..a87426cf15 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/posix_fadvise.c @@ -0,0 +1,2 @@ +#include + From cebbd6e78d1a4b5ab6d22ecaa5c6516dce166d5d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 5 Mar 2004 10:22:54 +0000 Subject: [PATCH 3257/4487] Use GLRO instead of GL where appropriate. --- sysdeps/alpha/dl-machine.h | 4 ++-- sysdeps/arm/dl-machine.h | 12 ++++++------ sysdeps/m68k/dl-machine.h | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 3616faedbf..35d7e1dbde 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -114,7 +114,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) { *(Elf64_Addr *)(plt + 16) = (Elf64_Addr) &_dl_runtime_profile; - if (_dl_name_match_p (GL(dl_profile), l)) + if (_dl_name_match_p (GLRO(dl_profile), l)) { /* This is the object we are looking for. Say that we really want profiling and the timers are started. */ @@ -648,7 +648,7 @@ static inline void elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc, void *const reloc_addr_arg) { - /* XXX Make some timings. Maybe it's preferable to test for + /* XXX Make some timings. Maybe it's preferable to test for unaligned access and only do it the complex way if necessary. */ Elf64_Addr reloc_addr_val; diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 9b1d53a0a1..25a8515dac 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. ARM version. - Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 + Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -110,7 +110,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) { got[2] = (Elf32_Addr) &_dl_runtime_profile; - if (_dl_name_match_p (GL(dl_profile), l)) + if (_dl_name_match_p (GLRO(dl_profile), l)) /* Say that we really want profiling and the timers are started. */ GL(dl_profile_map) = l; @@ -334,9 +334,9 @@ _dl_start_user:\n\ static inline void __attribute__ ((unused)) dl_platform_init (void) { - if (GL(dl_platform) != NULL && *GL(dl_platform) == '\0') + if (GLRO(dl_platform) != NULL && *GLRO(dl_platform) == '\0') /* Avoid an empty string which would disturb us. */ - GL(dl_platform) = NULL; + GLRO(dl_platform) = NULL; } static inline Elf32_Addr @@ -444,7 +444,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, found. */ break; if (sym->st_size > refsym->st_size - || (GL(dl_verbose) && sym->st_size < refsym->st_size)) + || (GLRO(dl_verbose) && sym->st_size < refsym->st_size)) { const char *strtab; @@ -556,7 +556,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, found. */ break; if (sym->st_size > refsym->st_size - || (GL(dl_verbose) && sym->st_size < refsym->st_size)) + || (GLRO(dl_verbose) && sym->st_size < refsym->st_size)) { const char *strtab; diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index d3bc83a011..e52893889d 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. m68k version. - Copyright (C) 1996-2001, 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 1996-2001, 2002, 2003, 2004 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 @@ -85,7 +85,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) { got[2] = (Elf32_Addr) &_dl_runtime_profile; - if (_dl_name_match_p (GL(dl_profile), l)) + if (_dl_name_match_p (GLRO(dl_profile), l)) { /* This is the object we are looking for. Say that we really want profiling and the timers are started. */ @@ -248,7 +248,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, found. */ break; if (sym->st_size > refsym->st_size - || (sym->st_size < refsym->st_size && GL(dl_verbose))) + || (sym->st_size < refsym->st_size && GLRO(dl_verbose))) { const char *strtab; From a7c187d616a197ac7387c90a517de4cef7a0157a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 6 Mar 2004 08:06:01 +0000 Subject: [PATCH 3258/4487] Use GLRO instead of GL where appropriate. --- sysdeps/unix/sysv/linux/m68k/getpagesize.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/m68k/getpagesize.c b/sysdeps/unix/sysv/linux/m68k/getpagesize.c index 10a437b06e..f7ffdc5185 100644 --- a/sysdeps/unix/sysv/linux/m68k/getpagesize.c +++ b/sysdeps/unix/sysv/linux/m68k/getpagesize.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab . @@ -33,8 +33,8 @@ __getpagesize () int result; #endif - if (GL(dl_pagesize) != 0) - return GL(dl_pagesize); + if (GLRO(dl_pagesize) != 0) + return GLRO(dl_pagesize); #ifdef __NR_getpagesize INTERNAL_SYSCALL_DECL (err); From fb08891109faa933372d16d69a1209b1783f8ee8 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sat, 6 Mar 2004 20:46:23 +0000 Subject: [PATCH 3259/4487] * soft-fp/quad.h (union _FP_UNION_Q): Add longs structure. * sysdeps/alpha/Implies: Add alpha/soft-fp. * sysdeps/alpha/soft-fp/sfp-machine.h: Rewrite for GEM interface. * sysdeps/alpha/Subdirs, sysdeps/alpha/soft-fp/Makefile, sysdeps/alpha/soft-fp/Versions, sysdeps/alpha/soft-fp/local-soft-fp.h, sysdeps/alpha/soft-fp/ots_add.c, sysdeps/alpha/soft-fp/ots_cmp.c, sysdeps/alpha/soft-fp/ots_cmpe.c, sysdeps/alpha/soft-fp/ots_cvtqux.c, sysdeps/alpha/soft-fp/ots_cvtqx.c, sysdeps/alpha/soft-fp/ots_cvttx.c, sysdeps/alpha/soft-fp/ots_cvtxq.c, sysdeps/alpha/soft-fp/ots_cvtxt.c, sysdeps/alpha/soft-fp/ots_div.c, sysdeps/alpha/soft-fp/ots_mul.c, sysdeps/alpha/soft-fp/ots_nintxq.c, sysdeps/alpha/soft-fp/ots_sub.c: New files. --- sysdeps/alpha/Implies | 1 + sysdeps/alpha/Subdirs | 1 + sysdeps/alpha/soft-fp/Dist | 13 ++++ sysdeps/alpha/soft-fp/Makefile | 6 ++ sysdeps/alpha/soft-fp/Versions | 8 +++ sysdeps/alpha/soft-fp/local-soft-fp.h | 44 ++++++++++++ sysdeps/alpha/soft-fp/ots_add.c | 39 +++++++++++ sysdeps/alpha/soft-fp/ots_cmp.c | 64 ++++++++++++++++++ sysdeps/alpha/soft-fp/ots_cmpe.c | 83 +++++++++++++++++++++++ sysdeps/alpha/soft-fp/ots_cvtqux.c | 40 +++++++++++ sysdeps/alpha/soft-fp/ots_cvtqx.c | 39 +++++++++++ sysdeps/alpha/soft-fp/ots_cvttx.c | 48 +++++++++++++ sysdeps/alpha/soft-fp/ots_cvtxq.c | 43 ++++++++++++ sysdeps/alpha/soft-fp/ots_cvtxt.c | 44 ++++++++++++ sysdeps/alpha/soft-fp/ots_div.c | 39 +++++++++++ sysdeps/alpha/soft-fp/ots_mul.c | 39 +++++++++++ sysdeps/alpha/soft-fp/ots_nintxq.c | 50 ++++++++++++++ sysdeps/alpha/soft-fp/ots_sub.c | 39 +++++++++++ sysdeps/alpha/soft-fp/sfp-machine.h | 97 +++++++++++++++++++++------ 19 files changed, 718 insertions(+), 19 deletions(-) create mode 100644 sysdeps/alpha/Subdirs create mode 100644 sysdeps/alpha/soft-fp/Makefile create mode 100644 sysdeps/alpha/soft-fp/Versions create mode 100644 sysdeps/alpha/soft-fp/local-soft-fp.h create mode 100644 sysdeps/alpha/soft-fp/ots_add.c create mode 100644 sysdeps/alpha/soft-fp/ots_cmp.c create mode 100644 sysdeps/alpha/soft-fp/ots_cmpe.c create mode 100644 sysdeps/alpha/soft-fp/ots_cvtqux.c create mode 100644 sysdeps/alpha/soft-fp/ots_cvtqx.c create mode 100644 sysdeps/alpha/soft-fp/ots_cvttx.c create mode 100644 sysdeps/alpha/soft-fp/ots_cvtxq.c create mode 100644 sysdeps/alpha/soft-fp/ots_cvtxt.c create mode 100644 sysdeps/alpha/soft-fp/ots_div.c create mode 100644 sysdeps/alpha/soft-fp/ots_mul.c create mode 100644 sysdeps/alpha/soft-fp/ots_nintxq.c create mode 100644 sysdeps/alpha/soft-fp/ots_sub.c diff --git a/sysdeps/alpha/Implies b/sysdeps/alpha/Implies index 2c6af5b7bb..4b354f3e47 100644 --- a/sysdeps/alpha/Implies +++ b/sysdeps/alpha/Implies @@ -2,3 +2,4 @@ wordsize-64 # Alpha uses IEEE 754 single and double precision floating point. ieee754/flt-32 ieee754/dbl-64 +alpha/soft-fp diff --git a/sysdeps/alpha/Subdirs b/sysdeps/alpha/Subdirs new file mode 100644 index 0000000000..87eadf3024 --- /dev/null +++ b/sysdeps/alpha/Subdirs @@ -0,0 +1 @@ +soft-fp diff --git a/sysdeps/alpha/soft-fp/Dist b/sysdeps/alpha/soft-fp/Dist index 7e9914fe58..3d75ee78b5 100644 --- a/sysdeps/alpha/soft-fp/Dist +++ b/sysdeps/alpha/soft-fp/Dist @@ -1 +1,14 @@ +local-soft-fp.h +ots_add.c +ots_cmp.c +ots_cmpe.c +ots_cvtqux.c +ots_cvtqx.c +ots_cvttx.c +ots_cvtxq.c +ots_cvtxt.c +ots_div.c +ots_mul.c +ots_nintxq.c +ots_sub.c sfp-machine.h diff --git a/sysdeps/alpha/soft-fp/Makefile b/sysdeps/alpha/soft-fp/Makefile new file mode 100644 index 0000000000..d7e7e2684a --- /dev/null +++ b/sysdeps/alpha/soft-fp/Makefile @@ -0,0 +1,6 @@ +# Software floating-point emulation. + +ifeq ($(subdir),soft-fp) +sysdep_routines += ots_add ots_sub ots_mul ots_div ots_cmp ots_cmpe \ + ots_cvtxq ots_cvtqx ots_cvtqux ots_cvttx ots_cvtxt ots_nintxq +endif diff --git a/sysdeps/alpha/soft-fp/Versions b/sysdeps/alpha/soft-fp/Versions new file mode 100644 index 0000000000..3901287115 --- /dev/null +++ b/sysdeps/alpha/soft-fp/Versions @@ -0,0 +1,8 @@ +libc { + GLIBC_2.3.4 { + _OtsAddX; _OtsSubX; _OtsMulX; _OtsDivX; + _OtsEqlX; _OtsNeqX; _OtsLssX; _OtsLeqX; _OtsGtrX; _OtsGeqX; + _OtsCvtQX; _OtsCvtQUX; _OtsCvtXQ; _OtsNintXQ; + _OtsConvertFloatTX; _OtsConvertFloatXT; + } +} diff --git a/sysdeps/alpha/soft-fp/local-soft-fp.h b/sysdeps/alpha/soft-fp/local-soft-fp.h new file mode 100644 index 0000000000..e93a2ad064 --- /dev/null +++ b/sysdeps/alpha/soft-fp/local-soft-fp.h @@ -0,0 +1,44 @@ +#include +#include +#include + +/* Helpers for the Ots functions which receive long double arguments + in two integer registers, and return values in $16+$17. */ + +#undef _FP_UNPACK_RAW_2 +#define _FP_UNPACK_RAW_2(fs, X, val) \ + do { \ + union _FP_UNION_##fs _flo; \ + _flo.longs.a = val##l; \ + _flo.longs.b = val##h; \ + X##_f0 = _flo.bits.frac0; \ + X##_f1 = _flo.bits.frac1; \ + X##_e = _flo.bits.exp; \ + X##_s = _flo.bits.sign; \ + } while (0) + +#undef _FP_PACK_RAW_2 +#define _FP_PACK_RAW_2(fs, val, X) \ + do { \ + union _FP_UNION_##fs _flo; \ + _flo.bits.frac0 = X##_f0; \ + _flo.bits.frac1 = X##_f1; \ + _flo.bits.exp = X##_e; \ + _flo.bits.sign = X##_s; \ + val##l = _flo.longs.a; \ + val##h = _flo.longs.b; \ + } while (0) + +#define FP_DECL_RETURN(X) \ + long X##l, X##h + +/* ??? We don't have a real way to tell the compiler that we're wanting + to return values in $16+$17. Instead use a volatile asm to make sure + that the values are live, and just hope that nothing kills the values + in between here and the end of the function. */ +#define FP_RETURN(X) \ +do { \ + register long r16 __asm__("16") = X##l; \ + register long r17 __asm__("17") = X##h; \ + asm volatile ("" : : "r"(r16), "r"(r17)); \ +} while (0) diff --git a/sysdeps/alpha/soft-fp/ots_add.c b/sysdeps/alpha/soft-fp/ots_add.c new file mode 100644 index 0000000000..b4f6c28f3d --- /dev/null +++ b/sysdeps/alpha/soft-fp/ots_add.c @@ -0,0 +1,39 @@ +/* Software floating-point emulation: addition. + Copyright (C) 1997,1999,2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson (rth@cygnus.com) and + Jakub Jelinek (jj@ultra.linux.cz). + + 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. */ + +#include "local-soft-fp.h" + +void +_OtsAddX(long al, long ah, long bl, long bh, long _round) +{ + FP_DECL_EX; + FP_DECL_Q(A); FP_DECL_Q(B); FP_DECL_Q(C); + FP_DECL_RETURN(c); + + FP_INIT_ROUNDMODE; + FP_UNPACK_Q(A, a); + FP_UNPACK_Q(B, b); + FP_ADD_Q(C, A, B); + FP_PACK_Q(c, C); + FP_HANDLE_EXCEPTIONS; + + FP_RETURN(c); +} diff --git a/sysdeps/alpha/soft-fp/ots_cmp.c b/sysdeps/alpha/soft-fp/ots_cmp.c new file mode 100644 index 0000000000..c356b4848e --- /dev/null +++ b/sysdeps/alpha/soft-fp/ots_cmp.c @@ -0,0 +1,64 @@ +/* Software floating-point emulation: comparison. + Copyright (C) 1997,1999,2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson (rth@cygnus.com) and + Jakub Jelinek (jj@ultra.linux.cz). + + 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. */ + +#include "local-soft-fp.h" + +static long +internal_equality (long al, long ah, long bl, long bh, long neq) +{ + FP_DECL_EX; + FP_DECL_Q(A); FP_DECL_Q(B); + long r; + + FP_UNPACK_RAW_Q(A, a); + FP_UNPACK_RAW_Q(B, b); + + if ((A_e == _FP_EXPMAX_Q && !_FP_FRAC_ZEROP_2(A)) + || (B_e == _FP_EXPMAX_Q && !_FP_FRAC_ZEROP_2(B))) + { + /* EQ and NE signal invalid operation only if either operand is SNaN. */ + if (FP_ISSIGNAN_Q(A) || FP_ISSIGNAN_Q(B)) + { + FP_SET_EXCEPTION(FP_EX_INVALID); + FP_HANDLE_EXCEPTIONS; + } + return -1; + } + + r = (A_e == B_e + && _FP_FRAC_EQ_2 (A, B) + && (A_s == B_s || (!A_e && _FP_FRAC_ZEROP_2(A)))); + r ^= neq; + + return r; +} + +long +_OtsEqlX (long al, long ah, long bl, long bh) +{ + return internal_equality (al, ah, bl, bh, 0); +} + +long +_OtsNeqX (long al, long ah, long bl, long bh) +{ + return internal_equality (al, ah, bl, bh, 1); +} diff --git a/sysdeps/alpha/soft-fp/ots_cmpe.c b/sysdeps/alpha/soft-fp/ots_cmpe.c new file mode 100644 index 0000000000..001eb75a9b --- /dev/null +++ b/sysdeps/alpha/soft-fp/ots_cmpe.c @@ -0,0 +1,83 @@ +/* Software floating-point emulation: comparison. + Copyright (C) 1997,1999,2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson (rth@cygnus.com) and + Jakub Jelinek (jj@ultra.linux.cz). + + 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. */ + +#include "local-soft-fp.h" + +static long +internal_compare (long al, long ah, long bl, long bh) +{ + FP_DECL_EX; + FP_DECL_Q(A); FP_DECL_Q(B); + long r; + + FP_UNPACK_RAW_Q(A, a); + FP_UNPACK_RAW_Q(B, b); + FP_CMP_Q (r, A, B, 2); + + /* Relative comparisons signal invalid operation if either operand is NaN. */ + if (r == 2) + { + FP_SET_EXCEPTION(FP_EX_INVALID); + FP_HANDLE_EXCEPTIONS; + } + + return r; +} + +long +_OtsLssX (long al, long ah, long bl, long bh) +{ + long r = internal_compare (al, ah, bl, bh); + if (r == 2) + return -1; + else + return r < 0; +} + +long +_OtsLeqX (long al, long ah, long bl, long bh) +{ + long r = internal_compare (al, ah, bl, bh); + if (r == 2) + return -1; + else + return r <= 0; +} + +long +_OtsGtrX (long al, long ah, long bl, long bh) +{ + long r = internal_compare (al, ah, bl, bh); + if (r == 2) + return -1; + else + return r > 0; +} + +long +_OtsGeqX (long al, long ah, long bl, long bh) +{ + long r = internal_compare (al, ah, bl, bh); + if (r == 2) + return -1; + else + return r >= 0; +} diff --git a/sysdeps/alpha/soft-fp/ots_cvtqux.c b/sysdeps/alpha/soft-fp/ots_cvtqux.c new file mode 100644 index 0000000000..d7ab5bae43 --- /dev/null +++ b/sysdeps/alpha/soft-fp/ots_cvtqux.c @@ -0,0 +1,40 @@ +/* Software floating-point emulation: unsigned integer to float conversion. + Copyright (C) 1997,1999,2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson (rth@cygnus.com) and + Jakub Jelinek (jj@ultra.linux.cz). + + 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. */ + +#include "local-soft-fp.h" + +/* Should never actually be used, since we've more bits of precision + than the incomming long, but needed for linkage. */ +#undef FP_ROUNDMODE +#define FP_ROUNDMODE FP_RND_ZERO + +void +_OtsCvtQUX (unsigned long a) +{ + FP_DECL_EX; + FP_DECL_Q(C); + FP_DECL_RETURN(c); + + FP_FROM_INT_Q(C, a, 64, long); + FP_PACK_Q(c, C); + + FP_RETURN(c); +} diff --git a/sysdeps/alpha/soft-fp/ots_cvtqx.c b/sysdeps/alpha/soft-fp/ots_cvtqx.c new file mode 100644 index 0000000000..0e1c6bdc41 --- /dev/null +++ b/sysdeps/alpha/soft-fp/ots_cvtqx.c @@ -0,0 +1,39 @@ +/* Software floating-point emulation: signed integer to float conversion. + Copyright (C) 1997,1999,2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson (rth@cygnus.com) and + Jakub Jelinek (jj@ultra.linux.cz). + + 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. */ + +#include "local-soft-fp.h" + +/* Should never actually be used, since we've more bits of precision + than the incomming long, but needed for linkage. */ +#undef FP_ROUNDMODE +#define FP_ROUNDMODE FP_RND_ZERO + +void +_OtsCvtQX (long a) +{ + FP_DECL_EX; + FP_DECL_Q(C); + FP_DECL_RETURN(c); + + FP_FROM_INT_Q(C, a, 64, long); + FP_PACK_Q(c, C); + FP_RETURN(c); +} diff --git a/sysdeps/alpha/soft-fp/ots_cvttx.c b/sysdeps/alpha/soft-fp/ots_cvttx.c new file mode 100644 index 0000000000..ee5ac324cd --- /dev/null +++ b/sysdeps/alpha/soft-fp/ots_cvttx.c @@ -0,0 +1,48 @@ +/* Software floating-point emulation: floating point extension. + Copyright (C) 1997,1999,2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson (rth@cygnus.com) and + Jakub Jelinek (jj@ultra.linux.cz). + + 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. */ + +#include "local-soft-fp.h" +#include "double.h" + +/* Should never actually be used, since we're extending, but needed + for linkage. */ +#undef FP_ROUNDMODE +#define FP_ROUNDMODE FP_RND_ZERO + +void +_OtsConvertFloatTX(double a) +{ + FP_DECL_EX; + FP_DECL_D(A); + FP_DECL_Q(C); + FP_DECL_RETURN(c); + + FP_UNPACK_D(A, a); +#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q + FP_CONV(Q,D,4,2,C,A); +#else + FP_CONV(Q,D,2,1,C,A); +#endif + FP_PACK_Q(c, C); + FP_HANDLE_EXCEPTIONS; + + FP_RETURN(c); +} diff --git a/sysdeps/alpha/soft-fp/ots_cvtxq.c b/sysdeps/alpha/soft-fp/ots_cvtxq.c new file mode 100644 index 0000000000..1fd47da4f7 --- /dev/null +++ b/sysdeps/alpha/soft-fp/ots_cvtxq.c @@ -0,0 +1,43 @@ +/* Software floating-point emulation: float to integer conversion. + Copyright (C) 1997,1999,2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson (rth@cygnus.com) and + Jakub Jelinek (jj@ultra.linux.cz). + + 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. */ + +#include "local-soft-fp.h" + +long +_OtsCvtXQ (long al, long ah, long _round) +{ + FP_DECL_EX; + FP_DECL_Q(A); + long r, s; + + /* If bit 3 is set, then integer overflow detection is requested. */ + s = _round & 8 ? 1 : -1; + _round = _round & 3; + + FP_INIT_ROUNDMODE; + FP_UNPACK_Q(A, a); + FP_TO_INT_Q(r, A, 64, s); + + if (s > 0 && (_fex &= FP_EX_INVALID)) + FP_HANDLE_EXCEPTIONS; + + return r; +} diff --git a/sysdeps/alpha/soft-fp/ots_cvtxt.c b/sysdeps/alpha/soft-fp/ots_cvtxt.c new file mode 100644 index 0000000000..d1f8d2b945 --- /dev/null +++ b/sysdeps/alpha/soft-fp/ots_cvtxt.c @@ -0,0 +1,44 @@ +/* Software floating-point emulation: floating point truncation. + Copyright (C) 1997,1999,2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson (rth@cygnus.com) and + Jakub Jelinek (jj@ultra.linux.cz). + + 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. */ + +#include "local-soft-fp.h" +#include "double.h" + +double +_Ots_ConvertFloatXT (long al, long ah, long _round) +{ + FP_DECL_EX; + FP_DECL_Q(A); + FP_DECL_D(R); + double r; + + FP_INIT_ROUNDMODE; + FP_UNPACK_Q(A, a); +#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q + FP_CONV(D,Q,2,4,R,A); +#else + FP_CONV(D,Q,1,2,R,A); +#endif + FP_PACK_D(r, R); + FP_HANDLE_EXCEPTIONS; + + return r; +} diff --git a/sysdeps/alpha/soft-fp/ots_div.c b/sysdeps/alpha/soft-fp/ots_div.c new file mode 100644 index 0000000000..eb07489284 --- /dev/null +++ b/sysdeps/alpha/soft-fp/ots_div.c @@ -0,0 +1,39 @@ +/* Software floating-point emulation: division. + Copyright (C) 1997,1999,2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson (rth@cygnus.com) and + Jakub Jelinek (jj@ultra.linux.cz). + + 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. */ + +#include "local-soft-fp.h" + +void +_OtsDivX(long al, long ah, long bl, long bh, long _round) +{ + FP_DECL_EX; + FP_DECL_Q(A); FP_DECL_Q(B); FP_DECL_Q(C); + FP_DECL_RETURN(c); + + FP_INIT_ROUNDMODE; + FP_UNPACK_Q(A, a); + FP_UNPACK_Q(B, b); + FP_DIV_Q(C, A, B); + FP_PACK_Q(c, C); + FP_HANDLE_EXCEPTIONS; + + FP_RETURN(c); +} diff --git a/sysdeps/alpha/soft-fp/ots_mul.c b/sysdeps/alpha/soft-fp/ots_mul.c new file mode 100644 index 0000000000..f88ee33fbc --- /dev/null +++ b/sysdeps/alpha/soft-fp/ots_mul.c @@ -0,0 +1,39 @@ +/* Software floating-point emulation: multiplication. + Copyright (C) 1997,1999,2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson (rth@cygnus.com) and + Jakub Jelinek (jj@ultra.linux.cz). + + 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. */ + +#include "local-soft-fp.h" + +void +_OtsMulX(long al, long ah, long bl, long bh, long _round) +{ + FP_DECL_EX; + FP_DECL_Q(A); FP_DECL_Q(B); FP_DECL_Q(C); + FP_DECL_RETURN(c); + + FP_INIT_ROUNDMODE; + FP_UNPACK_Q(A, a); + FP_UNPACK_Q(B, b); + FP_MUL_Q(C, A, B); + FP_PACK_Q(c, C); + FP_HANDLE_EXCEPTIONS; + + FP_RETURN(c); +} diff --git a/sysdeps/alpha/soft-fp/ots_nintxq.c b/sysdeps/alpha/soft-fp/ots_nintxq.c new file mode 100644 index 0000000000..2cb1ca4c2a --- /dev/null +++ b/sysdeps/alpha/soft-fp/ots_nintxq.c @@ -0,0 +1,50 @@ +/* Software floating-point emulation: convert to fortran nearest. + Copyright (C) 1997,1999,2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson (rth@cygnus.com) and + Jakub Jelinek (jj@ultra.linux.cz). + + 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. */ + +#include "local-soft-fp.h" + +long +_OtsNintXQ (long al, long ah, long _round) +{ + FP_DECL_EX; + FP_DECL_Q(A); FP_DECL_Q(B); FP_DECL_Q(C); + long r, s; + + /* If bit 3 is set, then integer overflow detection is requested. */ + s = _round & 8 ? 1 : -1; + _round = _round & 3; + + FP_INIT_ROUNDMODE; + FP_UNPACK_Q(A, a); + + /* Build 0.5 * sign(A) */ + B_e = _FP_EXPBIAS_Q; + __FP_FRAC_SET_2 (B, _FP_IMPLBIT_Q, 0); + B_s = A_s; + _FP_UNPACK_CANONICAL(Q,2,B); + + FP_ADD_Q(C, A, B); + FP_TO_INT_Q(r, C, 64, s); + if (s > 0 && (_fex &= FP_EX_INVALID)) + FP_HANDLE_EXCEPTIONS; + + return r; +} diff --git a/sysdeps/alpha/soft-fp/ots_sub.c b/sysdeps/alpha/soft-fp/ots_sub.c new file mode 100644 index 0000000000..c10043f071 --- /dev/null +++ b/sysdeps/alpha/soft-fp/ots_sub.c @@ -0,0 +1,39 @@ +/* Software floating-point emulation: subtraction. + Copyright (C) 1997,1999,2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson (rth@cygnus.com) and + Jakub Jelinek (jj@ultra.linux.cz). + + 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. */ + +#include "local-soft-fp.h" + +void +_OtsSubX(long al, long ah, long bl, long bh, long _round) +{ + FP_DECL_EX; + FP_DECL_Q(A); FP_DECL_Q(B); FP_DECL_Q(C); + FP_DECL_RETURN(c); + + FP_INIT_ROUNDMODE; + FP_UNPACK_Q(A, a); + FP_UNPACK_Q(B, b); + FP_SUB_Q(C, A, B); + FP_PACK_Q(c, C); + FP_HANDLE_EXCEPTIONS; + + FP_RETURN(c); +} diff --git a/sysdeps/alpha/soft-fp/sfp-machine.h b/sysdeps/alpha/soft-fp/sfp-machine.h index 73b934ddce..2bad4e9dc6 100644 --- a/sysdeps/alpha/soft-fp/sfp-machine.h +++ b/sysdeps/alpha/soft-fp/sfp-machine.h @@ -1,35 +1,94 @@ +/* Machine-dependent software floating-point definitions. + Alpha userland IEEE 128-bit version. + Copyright (C) 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson (rth@cygnus.com), + Jakub Jelinek (jj@ultra.linux.cz) and + David S. Miller (davem@redhat.com). + + 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. */ + +#include + #define _FP_W_TYPE_SIZE 64 #define _FP_W_TYPE unsigned long #define _FP_WS_TYPE signed long #define _FP_I_TYPE long -#define _alpha_mul_64_128(rhi, rlo, x, y) \ - __asm__("umulh %2,%3,%0; mulq %2,%3,%1" \ - : "=&r"(rhi), "=r"(rlo) : "r"(x), "r"(y)) - #define _FP_MUL_MEAT_S(R,X,Y) \ _FP_MUL_MEAT_1_imm(_FP_WFRACBITS_S,R,X,Y) #define _FP_MUL_MEAT_D(R,X,Y) \ - _FP_MUL_MEAT_1_wide(_FP_WFRACBITS_D,R,X,Y,_alpha_mul_64_128) + _FP_MUL_MEAT_1_wide(_FP_WFRACBITS_D,R,X,Y,umul_ppmm) #define _FP_MUL_MEAT_Q(R,X,Y) \ - _FP_MUL_MEAT_2_wide(_FP_WFRACBITS_Q,R,X,Y,_alpha_mul_64_128) + _FP_MUL_MEAT_2_wide(_FP_WFRACBITS_Q,R,X,Y,umul_ppmm) #define _FP_DIV_MEAT_S(R,X,Y) _FP_DIV_MEAT_1_imm(S,R,X,Y,_FP_DIV_HELP_imm) -#define _FP_DIV_MEAT_D(R,X,Y) _FP_DIV_MEAT_1_udiv(D,R,X,Y) +#define _FP_DIV_MEAT_D(R,X,Y) _FP_DIV_MEAT_1_udiv_norm(D,R,X,Y) #define _FP_DIV_MEAT_Q(R,X,Y) _FP_DIV_MEAT_2_udiv(Q,R,X,Y) -#define _FP_NANFRAC_S _FP_QNANBIT_S -#define _FP_NANFRAC_D _FP_QNANBIT_D -#define _FP_NANFRAC_Q _FP_QNANBIT_Q, 0 -/* FIXME: This is just a wild guess */ -#define _FP_NANSIGN_S 1 -#define _FP_NANSIGN_D 1 -#define _FP_NANSIGN_Q 1 +#define _FP_NANFRAC_S ((_FP_QNANBIT_S << 1) - 1) +#define _FP_NANFRAC_D ((_FP_QNANBIT_D << 1) - 1) +#define _FP_NANFRAC_Q ((_FP_QNANBIT_Q << 1) - 1), -1 +#define _FP_NANSIGN_S 0 +#define _FP_NANSIGN_D 0 +#define _FP_NANSIGN_Q 0 #define _FP_KEEPNANFRACP 1 -#define _FP_CHOOSENAN(fs, wc, R, X, Y, OP) \ - do { \ - R##_s = Y##_s; \ - _FP_FRAC_COPY_##wc(R,Y); \ - R##_c = FP_CLS_NAN; \ + +/* Alpha Architecture Handbook, 4.7.10.4 sez that we should prefer any + type of NaN in Fb, then Fa. */ +#define _FP_CHOOSENAN(fs, wc, R, X, Y, OP) \ + do { \ + R##_s = Y##_s; \ + _FP_FRAC_COPY_##wc(R,X); \ + R##_c = FP_CLS_NAN; \ } while (0) + +/* Rounding mode settings. */ +#define FP_RND_NEAREST FE_TONEAREST +#define FP_RND_ZERO FE_TOWARDZERO +#define FP_RND_PINF FE_UPWARD +#define FP_RND_MINF FE_DOWNWARD + +/* Obtain the current rounding mode. It's given as an argument to + all the Ots functions, with 4 meaning "dynamic". */ +#define FP_ROUNDMODE _round + +/* Exception flags. */ +#define FP_EX_INVALID FE_INVALID +#define FP_EX_OVERFLOW FE_OVERFLOW +#define FP_EX_UNDERFLOW FE_UNDERFLOW +#define FP_EX_DIVZERO FE_DIVBYZERO +#define FP_EX_INEXACT FE_INEXACT + +#define FP_INIT_ROUNDMODE \ +do { \ + if (__builtin_expect (_round == 4, 0)) \ + { \ + unsigned long t; \ + __asm__ __volatile__("excb; mf_fpcr %0" : "=f"(t)); \ + _round = (t >> FPCR_ROUND_SHIFT) & 3; \ + } \ +} while (0) + +#define FP_HANDLE_EXCEPTIONS \ +do { \ + if (__builtin_expect (_fex, 0)) \ + { \ + unsigned long t = __ieee_get_fp_control (); \ + __ieee_set_fp_control (t | _fex); \ + } \ +} while (0) From 33ebb515d1147853a967f635bfefb1d7536f9ffc Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 7 Mar 2004 08:38:42 +0000 Subject: [PATCH 3260/4487] Use GLRO instead of GL where appropriate. --- sysdeps/unix/sysv/linux/arm/dl-procinfo.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/dl-procinfo.h b/sysdeps/unix/sysv/linux/arm/dl-procinfo.h index 0ced27489f..35b333479b 100644 --- a/sysdeps/unix/sysv/linux/arm/dl-procinfo.h +++ b/sysdeps/unix/sysv/linux/arm/dl-procinfo.h @@ -1,5 +1,5 @@ /* Linux/ARM version of processor capability information handling macros. - Copyright (C) 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Philip Blundell , 2001. @@ -39,7 +39,7 @@ _dl_procinfo (int word) for (i = 0; i < _DL_HWCAP_COUNT; ++i) if (word & (1 << i)) - _dl_printf (" %s", GL(dl_arm_cap_flags)[i]); + _dl_printf (" %s", GLRO(dl_arm_cap_flags)[i]); _dl_printf ("\n"); @@ -50,7 +50,7 @@ static inline const char * __attribute__ ((unused)) _dl_hwcap_string (int idx) { - return GL(dl_arm_cap_flags)[idx]; + return GLRO(dl_arm_cap_flags)[idx]; }; enum @@ -75,7 +75,7 @@ _dl_string_hwcap (const char *str) for (i = 0; i < _DL_HWCAP_COUNT; i++) { - if (strcmp (str, GL(dl_arm_cap_flags)[i]) == 0) + if (strcmp (str, GLRO(dl_arm_cap_flags)[i]) == 0) return i; } return -1; From 19fecb537fbf30ca75b44b0fee99e6c4e951996e Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 8 Mar 2004 12:34:18 +0000 Subject: [PATCH 3261/4487] * sysdeps/alpha/soft-fp/ots_cvtxt.c (_OtsConvertFloatXT): Fix typo in name. --- sysdeps/alpha/soft-fp/ots_cvtxt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/alpha/soft-fp/ots_cvtxt.c b/sysdeps/alpha/soft-fp/ots_cvtxt.c index d1f8d2b945..2629dd9e40 100644 --- a/sysdeps/alpha/soft-fp/ots_cvtxt.c +++ b/sysdeps/alpha/soft-fp/ots_cvtxt.c @@ -23,7 +23,7 @@ #include "double.h" double -_Ots_ConvertFloatXT (long al, long ah, long _round) +_OtsConvertFloatXT (long al, long ah, long _round) { FP_DECL_EX; FP_DECL_Q(A); From 23386e2249314455ab5b6eb380b000679c6790e2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 10 Mar 2004 05:58:17 +0000 Subject: [PATCH 3262/4487] Don't define via builtins. --- sysdeps/m68k/fpu/bits/mathinline.h | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/fpu/bits/mathinline.h index ec00b4b711..1e43e43047 100644 --- a/sysdeps/m68k/fpu/bits/mathinline.h +++ b/sysdeps/m68k/fpu/bits/mathinline.h @@ -21,20 +21,18 @@ #ifdef __GNUC__ #ifdef __USE_ISOC99 - -# if __GNUC_PREREQ (3,1) /* GCC 3.1 and up have builtins that actually can be used. */ -# define isgreater(x, y) __builtin_isgreater (x, y) -# define isgreaterequal(x, y) __builtin_isgreaterequal (x, y) -# define isless(x, y) __builtin_isless (x, y) -# define islessequal(x, y) __builtin_islessequal (x, y) -# define islessgreater(x, y) __builtin_islessgreater (x, y) -# define isunordered(x, y) __builtin_isunordered (x, y) -# else +# if !__GNUC_PREREQ (3,1) /* ISO C99 defines some macros to perform unordered comparisons. The m68k FPU supports this with special opcodes and we should use them. These must not be inline functions since we have to be able to handle all floating-point types. */ +# undef isgreater +# undef isgreaterequal +# undef isless +# undef islessequal +# undef islessgreater +# undef isunordered # define isgreater(x, y) \ __extension__ \ ({ char __result; \ From 15d7e9922c41b31c3f1689be8cde6bb36754f522 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 10 Mar 2004 05:58:46 +0000 Subject: [PATCH 3263/4487] (isgreater, isgreaterequal, isless, islessequal, islessgreater): Remove; use default. (isunordered): Convert inputs to double. --- sysdeps/alpha/fpu/bits/mathinline.h | 35 +++++++++-------------------- 1 file changed, 10 insertions(+), 25 deletions(-) diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h index 8141485b47..0ba79f9895 100644 --- a/sysdeps/alpha/fpu/bits/mathinline.h +++ b/sysdeps/alpha/fpu/bits/mathinline.h @@ -28,34 +28,19 @@ # define __MATH_INLINE extern __inline #endif -#ifdef __USE_ISOC99 -# define isunordered(x, y) \ +#if defined __USE_ISOC99 && defined __GNUC__ && !__GNUC_PREREQ(3,0) +# undef isgreater +# undef isgreaterequal +# undef isless +# undef islessequal +# undef islessgreater +# undef isunordered +# define isunordered(u, v) \ (__extension__ \ - ({ double __r; \ + ({ double __r, __u = (u), __v = (v); \ __asm ("cmptun/su %1,%2,%0\n\ttrapb" \ - : "=&f" (__r) : "f" (x), "f"(y)); \ + : "=&f" (__r) : "f" (__u), "f"(__v)); \ __r != 0; })) - -# define isgreater(x, y) \ - (__extension__ \ - ({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \ - !isunordered(__x, __y) && __x > __y; })) -# define isgreaterequal(x, y) \ - (__extension__ \ - ({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \ - !isunordered(__x, __y) && __x >= __y; })) -# define isless(x, y) \ - (__extension__ \ - ({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \ - !isunordered(__x, __y) && __x < __y; })) -# define islessequal(x, y) \ - (__extension__ \ - ({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \ - !isunordered(__x, __y) && __x <= __y; })) -# define islessgreater(x, y) \ - (__extension__ \ - ({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \ - !isunordered(__x, __y) && __x != __y; })) #endif /* ISO C99 */ #if (!defined __NO_MATH_INLINES || defined __LIBC_INTERNAL_MATH_INLINES) \ From 36727f22a1e9b40acd7024e0d3f04ff3ba9b4f53 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 10 Mar 2004 19:20:11 +0000 Subject: [PATCH 3264/4487] (ADJTIME): Add attribute_compat_text_section. --- sysdeps/unix/sysv/linux/alpha/adjtime.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/adjtime.c b/sysdeps/unix/sysv/linux/alpha/adjtime.c index e036896216..f8b272e9ce 100644 --- a/sysdeps/unix/sysv/linux/alpha/adjtime.c +++ b/sysdeps/unix/sysv/linux/alpha/adjtime.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2000, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2000, 2002, 2003, 2004 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 @@ -58,7 +58,7 @@ struct timex32 { #define TIMEVAL timeval32 #define TIMEX timex32 -#define ADJTIME __adjtime_tv32 +#define ADJTIME attribute_compat_text_section __adjtime_tv32 #define ADJTIMEX(x) INLINE_SYSCALL (old_adjtimex, 1, x) #define ADJTIMEX32(x) INLINE_SYSCALL (old_adjtimex, 1, x) #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) @@ -72,7 +72,9 @@ LINKAGE int ADJTIME (const struct TIMEVAL *itv, struct TIMEVAL *otv); #include #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) -int __adjtimex_tv32 (struct timex32 *tx) { return ADJTIMEX (tx); } +int +attribute_compat_text_section +__adjtimex_tv32 (struct timex32 *tx) { return ADJTIMEX (tx); } strong_alias (__adjtimex_tv32, __adjtimex_tv32_1); strong_alias (__adjtimex_tv32, __adjtimex_tv32_2); compat_symbol (libc, __adjtimex_tv32_1, __adjtimex, GLIBC_2_0); From 826bbef91e621df1d0a2d7e1d51499dd00d97be7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 10 Mar 2004 19:21:18 +0000 Subject: [PATCH 3265/4487] (__old_wordexp): Add attribute_compat_text_section. --- sysdeps/unix/sysv/linux/alpha/wordexp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/wordexp.c b/sysdeps/unix/sysv/linux/alpha/wordexp.c index 1027204071..1921a03388 100644 --- a/sysdeps/unix/sysv/linux/alpha/wordexp.c +++ b/sysdeps/unix/sysv/linux/alpha/wordexp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2004 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 @@ -38,6 +38,7 @@ typedef struct int +attribute_compat_text_section __old_wordexp (const char *words, old_wordexp_t *pwordexp, int flags) { wordexp_t we; From 25366174f23560810197b9e5daa51874ee0f56e6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 10 Mar 2004 19:21:39 +0000 Subject: [PATCH 3266/4487] (__old_glob, __old_globfree): Add attribute_compat_text_section. --- sysdeps/unix/sysv/linux/alpha/oldglob.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/oldglob.c b/sysdeps/unix/sysv/linux/alpha/oldglob.c index 68cda76c97..9d39176f6b 100644 --- a/sysdeps/unix/sysv/linux/alpha/oldglob.c +++ b/sysdeps/unix/sysv/linux/alpha/oldglob.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2000, 2004 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 @@ -44,6 +44,7 @@ typedef struct int +attribute_compat_text_section __old_glob (const char *pattern, int flags, int (*errfunc) (const char *, int), old_glob_t *pglob) @@ -82,6 +83,7 @@ compat_symbol (libc, __old_glob, glob, GLIBC_2_0); /* Free storage allocated in PGLOB by a previous `glob' call. */ void +attribute_compat_text_section __old_globfree (old_glob_t *pglob) { glob_t correct; From b4d2a4238c35114c143fc35849acf69ba92a393e Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Thu, 11 Mar 2004 02:58:44 +0000 Subject: [PATCH 3267/4487] * sysdeps/unix/sysv/linux/alpha/kernel_stat.h (kernel_stat64): New. (glibc21_stat): New. * sysdeps/unix/sysv/linux/alpha/fxstat.c: New file. * sysdeps/unix/sysv/linux/alpha/lxstat.c: New file. * sysdeps/unix/sysv/linux/alpha/xstat.c: New file. * sysdeps/unix/sysv/linux/alpha/xstatconv.c (__xstat_conv): Add code for _STAT_VER_GLIBC2_3_4. (__libc_missing_axp_stat64): New. * sysdeps/unix/sysv/linux/alpha/xstatconv.h: New file. * sysdeps/unix/sysv/linux/alpha/bits/stat.h (__ST_TIME): New. (_STAT_VER_GLIBC2_3_4, _STAT_VER_KERNEL64): New. (struct stat, struct stat64): Update to new format. (_STATBUF_ST_NSEC): New. --- sysdeps/unix/sysv/linux/alpha/bits/stat.h | 86 ++++++++++++++------- sysdeps/unix/sysv/linux/alpha/fxstat.c | 64 +++++++++++++++ sysdeps/unix/sysv/linux/alpha/kernel_stat.h | 47 +++++++++++ sysdeps/unix/sysv/linux/alpha/lxstat.c | 64 +++++++++++++++ sysdeps/unix/sysv/linux/alpha/xstat.c | 64 +++++++++++++++ sysdeps/unix/sysv/linux/alpha/xstatconv.c | 39 ++++++++-- sysdeps/unix/sysv/linux/alpha/xstatconv.h | 24 ++++++ 7 files changed, 357 insertions(+), 31 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/alpha/fxstat.c create mode 100644 sysdeps/unix/sysv/linux/alpha/lxstat.c create mode 100644 sysdeps/unix/sysv/linux/alpha/xstat.c create mode 100644 sysdeps/unix/sysv/linux/alpha/xstatconv.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/stat.h b/sysdeps/unix/sysv/linux/alpha/bits/stat.h index 921283a511..40b6853430 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/stat.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/stat.h @@ -1,4 +1,5 @@ -/* Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 1996,1997,1998,1999,2000,2001,2004 + 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 @@ -24,11 +25,45 @@ #define _STAT_VER_KERNEL 0 #define _STAT_VER_GLIBC2 1 #define _STAT_VER_GLIBC2_1 2 -#define _STAT_VER _STAT_VER_GLIBC2_1 +#define _STAT_VER_KERNEL64 3 +#define _STAT_VER_GLIBC2_3_4 3 +#define _STAT_VER _STAT_VER_GLIBC2_3_4 /* Versions of the `xmknod' interface. */ #define _MKNOD_VER_LINUX 0 + +/* 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 identifier 'timespec' to appear + in the header. Therefore we have to handle the use of + this header in strictly standard-compliant sources special. + + Use neat tidy anonymous unions and structures when possible. */ + +#ifdef __USE_MISC +# if __GNUC_PREREQ(3,3) +# define __ST_TIME(X) \ + __extension__ union { \ + struct timespec st_##X##tim; \ + struct { \ + __time_t st_##X##time; \ + unsigned long st_##X##timensec; \ + }; \ + } +# else +# define __ST_TIME(X) struct timespec st_##X##tim +# define st_atime st_atim.tv_sec +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +# endif +#else +# define __ST_TIME(X) \ + __time_t st_##X##time; \ + unsigned long st_##X##timensec +#endif + + struct stat { __dev_t st_dev; /* Device. */ @@ -36,28 +71,26 @@ struct stat __ino64_t st_ino; /* File serial number. */ #else __ino_t st_ino; /* File serial number. */ - int __pad1; + int __pad0; /* 64-bit st_ino. */ #endif - __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. */ __off_t st_size; /* Size of file, in bytes. */ - __time_t st_atime; /* Time of last access. */ - __time_t st_mtime; /* Time of last modification. */ - __time_t st_ctime; /* Time of last status change. */ #ifdef __USE_FILE_OFFSET64 __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */ #else __blkcnt_t st_blocks; /* Nr. 512-byte blocks allocated. */ - int __pad2; + int __pad1; /* 64-bit st_blocks. */ #endif + __mode_t st_mode; /* File mode. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ __blksize_t st_blksize; /* Optimal block size for I/O. */ - unsigned int st_flags; - unsigned int st_gen; - int __pad3; - long __unused[4]; + __nlink_t st_nlink; /* Link count. */ + int __pad2; /* Real padding. */ + __ST_TIME(a); /* Time of last access. */ + __ST_TIME(m); /* Time of last modification. */ + __ST_TIME(c); /* Time of last status change. */ + long __unused[3]; }; #ifdef __USE_LARGEFILE64 @@ -66,27 +99,28 @@ struct stat64 { __dev_t st_dev; /* Device. */ __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. */ __off_t st_size; /* Size of file, in bytes. */ - __time_t st_atime; /* Time of last access. */ - __time_t st_mtime; /* Time of last modification. */ - __time_t st_ctime; /* Time of last status change. */ __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */ + __mode_t st_mode; /* File mode. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ __blksize_t st_blksize; /* Optimal block size for I/O. */ - unsigned int st_flags; - unsigned int st_gen; - int __pad3; - long __unused[4]; + __nlink_t st_nlink; /* Link count. */ + int __pad0; /* Real padding. */ + __ST_TIME(a); /* Time of last access. */ + __ST_TIME(m); /* Time of last modification. */ + __ST_TIME(c); /* Time of last status change. */ + long __unused[3]; }; #endif +#undef __ST_TIME + /* Tell code we have these members. */ #define _STATBUF_ST_BLKSIZE #define _STATBUF_ST_RDEV +#define _STATBUF_ST_NSEC /* Encoding of the file mode. */ diff --git a/sysdeps/unix/sysv/linux/alpha/fxstat.c b/sysdeps/unix/sysv/linux/alpha/fxstat.c new file mode 100644 index 0000000000..40e08fd86e --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/fxstat.c @@ -0,0 +1,64 @@ +/* fxstat using old-style Unix stat system call. + Copyright (C) 2004 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. */ + +#define __fxstat64 __fxstat64_disable + +#include +#include +#include +#include +#include +#include +#include + +#undef __fxstat64 + + +/* Get information about the file NAME in BUF. */ +int +__fxstat (int vers, int fd, struct stat *buf) +{ + INTERNAL_SYSCALL_DECL (err); + int result, errno_out; + struct kernel_stat kbuf; + + if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64) + { + result = INTERNAL_SYSCALL (fstat64, err, 2, fd, buf); + if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) + return result; + errno_out = INTERNAL_SYSCALL_ERRNO (result, err); + if (errno_out != ENOSYS) + goto fail; + __libc_missing_axp_stat64 = 1; + } + + result = INTERNAL_SYSCALL (fstat, err, 2, fd, &kbuf); + if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) + return __xstat_conv (vers, &kbuf, buf); + errno_out = INTERNAL_SYSCALL_ERRNO (result, err); + + fail: + __set_errno (errno_out); + return -1; +} +hidden_def (__fxstat) +weak_alias (__fxstat, _fxstat); +strong_alias (__fxstat, __fxstat64); +hidden_ver (__fxstat, __fxstat64) diff --git a/sysdeps/unix/sysv/linux/alpha/kernel_stat.h b/sysdeps/unix/sysv/linux/alpha/kernel_stat.h index 75540c0a6d..a1d012ab01 100644 --- a/sysdeps/unix/sysv/linux/alpha/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/alpha/kernel_stat.h @@ -18,6 +18,31 @@ struct kernel_stat unsigned int st_gen; }; +/* Definition of `struct stat64' used in the kernel. */ +struct kernel_stat64 + { + unsigned long st_dev; + unsigned long st_ino; + unsigned long st_rdev; + long st_size; + unsigned long st_blocks; + + unsigned int st_mode; + unsigned int st_uid; + unsigned int st_gid; + unsigned int st_blksize; + unsigned int st_nlink; + unsigned int __pad0; + + unsigned long st_atime; + unsigned long st_atimensec; + unsigned long st_mtime; + unsigned long st_mtimensec; + unsigned long st_ctime; + unsigned long st_ctimensec; + long __unused[3]; + }; + /* Definition of `struct stat' used by glibc 2.0. */ struct glibc2_stat { @@ -38,4 +63,26 @@ struct glibc2_stat unsigned int st_gen; }; +/* Definition of `struct stat' used by glibc 2.1. */ +struct glibc21_stat + { + __dev_t st_dev; + __ino64_t st_ino; + __mode_t st_mode; + __nlink_t st_nlink; + __uid_t st_uid; + __gid_t st_gid; + __dev_t st_rdev; + __off_t st_size; + __time_t st_atime; + __time_t st_mtime; + __time_t st_ctime; + __blkcnt64_t st_blocks; + __blksize_t st_blksize; + unsigned int st_flags; + unsigned int st_gen; + int __pad3; + long __unused[4]; + }; + #define XSTAT_IS_XSTAT64 1 diff --git a/sysdeps/unix/sysv/linux/alpha/lxstat.c b/sysdeps/unix/sysv/linux/alpha/lxstat.c new file mode 100644 index 0000000000..38fac2e2b2 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/lxstat.c @@ -0,0 +1,64 @@ +/* lxstat using old-style Unix stat system call. + Copyright (C) 2004 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. */ + +#define __lxstat64 __lxstat64_disable + +#include +#include +#include +#include +#include +#include +#include + +#undef __lxstat64 + + +/* Get information about the file NAME in BUF. */ +int +__lxstat (int vers, const char *name, struct stat *buf) +{ + INTERNAL_SYSCALL_DECL (err); + int result, errno_out; + struct kernel_stat kbuf; + + if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64) + { + result = INTERNAL_SYSCALL (lstat64, err, 2, name, buf); + if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) + return result; + errno_out = INTERNAL_SYSCALL_ERRNO (result, err); + if (errno_out != ENOSYS) + goto fail; + __libc_missing_axp_stat64 = 1; + } + + result = INTERNAL_SYSCALL (lstat, err, 2, name, &kbuf); + if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) + return __xstat_conv (vers, &kbuf, buf); + errno_out = INTERNAL_SYSCALL_ERRNO (result, err); + + fail: + __set_errno (errno_out); + return -1; +} +hidden_def (__lxstat) +weak_alias (__lxstat, _lxstat); +strong_alias (__lxstat, __lxstat64); +hidden_ver (__lxstat, __lxstat64) diff --git a/sysdeps/unix/sysv/linux/alpha/xstat.c b/sysdeps/unix/sysv/linux/alpha/xstat.c new file mode 100644 index 0000000000..b7488e425c --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/xstat.c @@ -0,0 +1,64 @@ +/* xstat using old-style Unix stat system call. + Copyright (C) 2004 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. */ + +#define __xstat64 __xstat64_disable + +#include +#include +#include +#include +#include +#include +#include + +#undef __xstat64 + + +/* Get information about the file NAME in BUF. */ +int +__xstat (int vers, const char *name, struct stat *buf) +{ + INTERNAL_SYSCALL_DECL (err); + int result, errno_out; + struct kernel_stat kbuf; + + if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64) + { + result = INTERNAL_SYSCALL (stat64, err, 2, name, buf); + if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) + return result; + errno_out = INTERNAL_SYSCALL_ERRNO (result, err); + if (errno_out != ENOSYS) + goto fail; + __libc_missing_axp_stat64 = 1; + } + + result = INTERNAL_SYSCALL (stat, err, 2, name, &kbuf); + if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) + return __xstat_conv (vers, &kbuf, buf); + errno_out = INTERNAL_SYSCALL_ERRNO (result, err); + + fail: + __set_errno (errno_out); + return -1; +} +hidden_def (__xstat) +weak_alias (__xstat, _xstat); +strong_alias (__xstat, __xstat64); +hidden_ver (__xstat, __xstat64) diff --git a/sysdeps/unix/sysv/linux/alpha/xstatconv.c b/sysdeps/unix/sysv/linux/alpha/xstatconv.c index 3f15dfef2e..a193b62ad1 100644 --- a/sysdeps/unix/sysv/linux/alpha/xstatconv.c +++ b/sysdeps/unix/sysv/linux/alpha/xstatconv.c @@ -1,5 +1,5 @@ /* Convert between the kernel's `struct stat' format, and libc's. - Copyright (C) 1997, 2003 Free Software Foundation, Inc. + Copyright (C) 1997, 2003, 2004 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 @@ -24,15 +24,14 @@ #include +int __libc_missing_axp_stat64; + int __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf) { switch (vers) { case _STAT_VER_KERNEL: - /* Nothing to do. The struct is in the form the kernel expects. - We should have short-circuted before we got here, but for - completeness... */ *(struct kernel_stat *) ubuf = *kbuf; break; @@ -60,7 +59,7 @@ __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf) case _STAT_VER_GLIBC2_1: { - struct stat64 *buf = ubuf; + struct glibc21_stat *buf = ubuf; buf->st_dev = kbuf->st_dev; buf->st_ino = kbuf->st_ino; @@ -85,6 +84,36 @@ __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf) } break; + case _STAT_VER_GLIBC2_3_4: + { + struct stat64 *buf = ubuf; + + buf->st_dev = kbuf->st_dev; + buf->st_ino = kbuf->st_ino; + buf->st_rdev = kbuf->st_rdev; + buf->st_size = kbuf->st_size; + buf->st_blocks = kbuf->st_blocks; + + buf->st_mode = kbuf->st_mode; + buf->st_uid = kbuf->st_uid; + buf->st_gid = kbuf->st_gid; + buf->st_blksize = kbuf->st_blksize; + buf->st_nlink = kbuf->st_nlink; + buf->__pad0 = 0; + + buf->st_atime = kbuf->st_atime; + buf->st_atimensec = 0; + buf->st_mtime = kbuf->st_mtime; + buf->st_mtimensec = 0; + buf->st_ctime = kbuf->st_ctime; + buf->st_ctimensec = 0; + + buf->__unused[0] = 0; + buf->__unused[1] = 0; + buf->__unused[2] = 0; + } + break; + default: __set_errno (EINVAL); return -1; diff --git a/sysdeps/unix/sysv/linux/alpha/xstatconv.h b/sysdeps/unix/sysv/linux/alpha/xstatconv.h new file mode 100644 index 0000000000..846bb02994 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/xstatconv.h @@ -0,0 +1,24 @@ +/* Convert between the kernel's `struct stat' format, and libc's. + Copyright (C) 2004 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. */ + +#include "kernel-features.h" + +extern int __libc_missing_axp_stat64 attribute_hidden; +extern int __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf) + attribute_hidden; From 76deb69747662d5a6e9d461cfd36447371369342 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Thu, 11 Mar 2004 21:34:25 +0000 Subject: [PATCH 3268/4487] * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New. * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID. * sysdeps/unix/sysv/linux/alpha/vfork.S: New file. --- sysdeps/alpha/nptl/tcb-offsets.sym | 1 + sysdeps/unix/sysv/linux/alpha/nptl/pt-vfork.S | 26 +++++++++-- sysdeps/unix/sysv/linux/alpha/nptl/vfork.S | 46 +++++++++++++++++++ 3 files changed, 69 insertions(+), 4 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/alpha/nptl/vfork.S diff --git a/sysdeps/alpha/nptl/tcb-offsets.sym b/sysdeps/alpha/nptl/tcb-offsets.sym index 3f6433d5e9..a1a1e45951 100644 --- a/sysdeps/alpha/nptl/tcb-offsets.sym +++ b/sysdeps/alpha/nptl/tcb-offsets.sym @@ -10,3 +10,4 @@ #if TLS_MULTIPLE_THREADS_IN_TCB MULTIPLE_THREADS_OFFSET thread_offsetof (header.multiple_threads) #endif +PID_OFFSET thread_offsetof (pid) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/pt-vfork.S b/sysdeps/unix/sysv/linux/alpha/nptl/pt-vfork.S index 4a2df4255b..ec5d175bec 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/pt-vfork.S +++ b/sysdeps/unix/sysv/linux/alpha/nptl/pt-vfork.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004 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 @@ -16,10 +16,28 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include +#include +#include + +#undef PSEUDO_PREPARE_ARGS +#define PSEUDO_PREPARE_ARGS \ + /* Load the current cached pid value across the vfork. */ \ + rduniq; \ + ldl a2, PID_OFFSET(v0); \ + mov v0, a1; \ + /* Write back its negation, to indicate that the pid value is \ + uninitialized in the the child, and in the window between \ + here and the point at which we restore the value. */ \ + negl a2, t0; \ + stl t0, PID_OFFSET(v0); + +PSEUDO (__vfork, vfork, 0) + + /* If we're back in the parent, restore the saved pid. */ + beq v0, 1f + stl a2, PID_OFFSET(a1) +1: ret -PSEUDO(__vfork, vfork, 0) - ret PSEUDO_END (__vfork) weak_alias (__vfork, vfork) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/vfork.S b/sysdeps/unix/sysv/linux/alpha/nptl/vfork.S new file mode 100644 index 0000000000..8bdf0eb9c8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/nptl/vfork.S @@ -0,0 +1,46 @@ +/* Copyright (C) 2004 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. */ + +#include +#include + +#undef PSEUDO_PREPARE_ARGS +#define PSEUDO_PREPARE_ARGS \ + /* Load the current cached pid value across the vfork. */ \ + rduniq; \ + ldl a2, PID_OFFSET(v0); \ + mov v0, a1; \ + /* If the cached value is initialized (nonzero), then write \ + back its negation, or INT_MIN, to indicate that the pid \ + value is uninitialized in the the child, and in the window \ + between here and the point at which we restore the value. */ \ + ldah t0, -0x8000; \ + negl a2, t1; \ + cmovne a2, t1, t0; \ + stl t0, PID_OFFSET(v0); + +PSEUDO (__vfork, vfork, 0) + + /* If we're back in the parent, restore the saved pid. */ + beq v0, 1f + stl a2, PID_OFFSET(a1) +1: ret + +PSEUDO_END (__vfork) + +weak_alias (__vfork, vfork) From 24a4e2b0c96ad26335446cdc34608d59d581354f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 12 Mar 2004 20:24:21 +0000 Subject: [PATCH 3269/4487] Define HOST_NAME_MAX. --- sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h index e2a363fa02..bb3c4c061d 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h @@ -1,5 +1,5 @@ /* Minimum guaranteed maximum values for system limits. Linux/Alpha version. - Copyright (C) 1993-1998, 2000, 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 1993-1998,2000,2002,2003,2004 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 @@ -81,3 +81,6 @@ /* Maximum login name length. This is arbitrary. */ #define LOGIN_NAME_MAX 256 + +/* Maximum host name length. */ +#define HOST_NAME_MAX 64 From a5e72ef81aad6662c1281bc0df26f55c23a419dd Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sat, 13 Mar 2004 05:29:24 +0000 Subject: [PATCH 3270/4487] * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate oldvalue from CENABLE to CDISABLE. --- sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h index 3b08b22c1a..794d7fc442 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h @@ -63,9 +63,14 @@ __LABEL($pseudo_cancel) \ SAVE_ARGS_##args; \ CENABLE; \ LOAD_ARGS_##args; \ + /* Save the CENABLE return value in RA. That register \ + is preserved across syscall and the real return \ + address is saved on the stack. */ \ + mov v0, ra; \ lda v0, SYS_ify(syscall_name); \ call_pal PAL_callsys; \ stq v0, 8(sp); \ + mov ra, a0; \ bne a3, $multi_error; \ CDISABLE; \ ldq ra, 0(sp); \ From e0f09d9abaaa038313e69b18a4f4201f9115ea42 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sat, 13 Mar 2004 05:29:45 +0000 Subject: [PATCH 3271/4487] * sysdeps/unix/sysv/linux/alpha/select.S: Fix unwind. Propagate oldvalue from CENABLE to CDISABLE. --- sysdeps/unix/sysv/linux/alpha/select.S | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/select.S b/sysdeps/unix/sysv/linux/alpha/select.S index 4a0594cbe9..458cda9246 100644 --- a/sysdeps/unix/sysv/linux/alpha/select.S +++ b/sysdeps/unix/sysv/linux/alpha/select.S @@ -53,6 +53,8 @@ LEAF(SELECT, 64) jsr AT, (AT), _mcount .set at #endif + stq ra, 40(sp) + .mask 0x4000000, 40-64 .prologue 1 #ifdef CENABLE @@ -131,9 +133,9 @@ $do_cancel: stq a1, 16(sp) stq a2, 24(sp) stq a3, 32(sp) - stq ra, 40(sp) CENABLE + mov v0, ra ldl t0, __libc_missing_axp_tv64 bne t0, $do_cancel32 @@ -147,6 +149,8 @@ $do_cancel: ldi v0, SYS_ify(select) callsys + + mov ra, a0 bne a3, $cancel_err64 stq v0, 8(sp) @@ -184,6 +188,8 @@ $do_cancel32: 1: ldi v0, SYS_ify(osf_select) callsys + + mov ra, a0 bne a3, $cancel_error /* ... and bounce the remaining timeout back. */ From 360b2fddf14cf5f55d386bb67020078daa986df9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 14 Mar 2004 20:59:44 +0000 Subject: [PATCH 3272/4487] Not needed anymore. --- sysdeps/m68k/strtold.c | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 sysdeps/m68k/strtold.c diff --git a/sysdeps/m68k/strtold.c b/sysdeps/m68k/strtold.c deleted file mode 100644 index f756488275..0000000000 --- a/sysdeps/m68k/strtold.c +++ /dev/null @@ -1,2 +0,0 @@ -#define DENORM_EXP (MIN_EXP - 1) -#include From 399e12d4707feace197afed90447eff448647187 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 14 Mar 2004 21:01:14 +0000 Subject: [PATCH 3273/4487] strtold_l for m68k long double. --- sysdeps/m68k/strtold_l.c | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sysdeps/m68k/strtold_l.c diff --git a/sysdeps/m68k/strtold_l.c b/sysdeps/m68k/strtold_l.c new file mode 100644 index 0000000000..481d9924c2 --- /dev/null +++ b/sysdeps/m68k/strtold_l.c @@ -0,0 +1,2 @@ +#define DENORM_EXP (MIN_EXP - 1) +#include From 154a5429ac5525e57e9465697475a73b21b817a9 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 15 Mar 2004 21:44:10 +0000 Subject: [PATCH 3274/4487] * math/Makefile (headers): Add bits/huge_valf.h, bits/huge_vall.h, and bits/inf.h. * math/math.h: Include them. * sysdeps/alpha/fpu/bits/mathdef.h, sysdeps/arm/fpu/bits/mathdef.h, sysdeps/generic/bits/mathdef.h, sysdeps/i386/fpu/bits/mathdef.h, sysdeps/ia64/fpu/bits/mathdef.h, sysdeps/m68k/fpu/bits/mathdef.h, sysdeps/mips/fpu/bits/mathdef.h, sysdeps/powerpc/fpu/bits/mathdef.h, sysdeps/sh/sh4/fpu/bits/mathdef.h, sysdeps/sparc/fpu/bits/mathdef.h, sysdeps/x86_64/fpu/bits/mathdef.h: Remove INFINITY. * sysdeps/arm/bits/huge_val.h (HUGE_VAL): Use __builtin_huge_val. (HUGE_VALF, HUGE_VALL): Remove. * sysdeps/ieee754/bits/huge_val.h: Likewise. * sysdeps/sh/bits/huge_val.h: Likewise. * sysdeps/generic/bits/huge_val.h (HUGE_VAL): Use __builtin_huge_val. * sysdeps/generic/bits/huge_valf.h: New file. * sysdeps/generic/bits/huge_vall.h: New file. * sysdeps/generic/bits/inf.h: New file. * sysdeps/ieee754/bits/huge_valf.h: New file. * sysdeps/ieee754/bits/inf.h: New file. * sysdeps/i386/bits/huge_val.h: Remove file. * sysdeps/i386/bits/huge_vall.h: New file. * sysdeps/ia64/bits/huge_val.h: Remove file. * sysdeps/ia64/bits/huge_vall.h: New file. * sysdeps/ieee754/ldbl-128/bits/huge_vall.h: New file. * sysdeps/m68k/bits/huge_val.h: Remove file. * sysdeps/m68k/bits/huge_vall.h: New file. * sysdeps/s390/bits/huge_val.h: Remove file. * sysdeps/sh/sh4/fpu/bits/huge_val.h: Remove file. * sysdeps/sparc/bits/huge_vall.h: New file. * sysdeps/sparc/sparc32/fpu/bits/huge_val.h: Remove file. * sysdeps/sparc/sparc64/fpu/bits/huge_val.h: Remove file. * sysdeps/ieee754/bits/nan.h (NAN): Use __builtin_nanf. * sysdeps/mips/bits/nan.h (NAN): Likewise. --- sysdeps/alpha/fpu/bits/mathdef.h | 12 +---- sysdeps/arm/bits/huge_val.h | 66 ++++------------------- sysdeps/arm/fpu/bits/mathdef.h | 6 +-- sysdeps/m68k/bits/huge_val.h | 92 -------------------------------- sysdeps/m68k/bits/huge_vall.h | 43 +++++++++++++++ sysdeps/m68k/fpu/bits/mathdef.h | 5 +- sysdeps/mips/bits/nan.h | 9 +++- sysdeps/mips/fpu/bits/mathdef.h | 6 +-- 8 files changed, 64 insertions(+), 175 deletions(-) delete mode 100644 sysdeps/m68k/bits/huge_val.h create mode 100644 sysdeps/m68k/bits/huge_vall.h diff --git a/sysdeps/alpha/fpu/bits/mathdef.h b/sysdeps/alpha/fpu/bits/mathdef.h index 7979822996..d5f2d5a843 100644 --- a/sysdeps/alpha/fpu/bits/mathdef.h +++ b/sysdeps/alpha/fpu/bits/mathdef.h @@ -1,4 +1,5 @@ -/* Copyright (C) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999, 2000, 2003, 2004 + 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 @@ -33,18 +34,12 @@ typedef float float_t; typedef double double_t; -/* Define `INFINITY' as value of type `float'. */ -# define INFINITY HUGE_VALF - # else /* For `gcc -traditional', `float' expressions are evaluated as `double'. */ typedef double float_t; typedef double double_t; -/* Define `INFINITY' as value of type `float'. */ -# define INFINITY HUGE_VALF - # endif # else @@ -52,9 +47,6 @@ typedef double double_t; typedef double float_t; typedef double double_t; -/* Define `INFINITY' as value of type `float'. */ -# define INFINITY HUGE_VALF - # endif /* The values returned by `ilogb' for 0 and NaN respectively. */ diff --git a/sysdeps/arm/bits/huge_val.h b/sysdeps/arm/bits/huge_val.h index 625cdc5c37..3339a0d01c 100644 --- a/sysdeps/arm/bits/huge_val.h +++ b/sysdeps/arm/bits/huge_val.h @@ -1,7 +1,8 @@ -/* `HUGE_VAL' constants for IEEE 754 machines (where it is infinity). +/* `HUGE_VAL' constant for IEEE 754 machines (where it is infinity). Used by and functions for overflow. ARM version. - Copyright (C) 1992, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. + Copyright (C) 1992, 95, 96, 97, 98, 99, 2000, 2004 + 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,25 +24,19 @@ # error "Never use directly; include instead." #endif -#include - /* IEEE positive infinity (-HUGE_VAL is negative infinity). */ -#ifdef __GNUC__ - -# if __GNUC_PREREQ(2,96) - -# define HUGE_VAL (__extension__ 0x1.0p2047) +#if __GNUC_PREREQ(3,3) +# define HUGE_VAL (__builtin_huge_val()) +#elif __GNUC_PREREQ(2,96) +# define HUGE_VAL (__extension__ 0x1.0p2047) +#elif defined __GNUC__ -# else - -# define HUGE_VAL \ +# define HUGE_VAL \ (__extension__ \ ((union { unsigned __l __attribute__((__mode__(__DI__))); double __d; }) \ { __l: 0x000000007ff00000ULL }).__d) -# endif - #else /* not GCC */ # include @@ -59,46 +54,3 @@ static __huge_val_t __huge_val = { __HUGE_VAL_bytes }; # define HUGE_VAL (__huge_val.__d) #endif /* GCC. */ - - -/* ISO C99 extensions: (float) HUGE_VALF and (long double) HUGE_VALL. */ - -#ifdef __USE_ISOC99 - -# ifdef __GNUC__ - -# if __GNUC_PREREQ(2,96) - -# define HUGE_VALF (__extension__ 0x1.0p255f) - -# else - -# define HUGE_VALF \ - (__extension__ \ - ((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; }) \ - { __l: 0x7f800000UL }).__d) - -# endif - -# else /* not GCC */ - -typedef union { unsigned char __c[4]; float __f; } __huge_valf_t; - -# if __BYTE_ORDER == __BIG_ENDIAN -# define __HUGE_VALF_bytes { 0x7f, 0x80, 0, 0 } -# endif -# if __BYTE_ORDER == __LITTLE_ENDIAN -# define __HUGE_VALF_bytes { 0, 0, 0x80, 0x7f } -# endif - -static __huge_valf_t __huge_valf = { __HUGE_VALF_bytes }; -# define HUGE_VALF (__huge_valf.__f) - -# endif /* GCC. */ - - -/* Generally there is no separate `long double' format and it is the - same as `double'. */ -# define HUGE_VALL HUGE_VAL - -#endif /* __USE_ISOC99. */ diff --git a/sysdeps/arm/fpu/bits/mathdef.h b/sysdeps/arm/fpu/bits/mathdef.h index 44d7f0ddea..e013e74b7e 100644 --- a/sysdeps/arm/fpu/bits/mathdef.h +++ b/sysdeps/arm/fpu/bits/mathdef.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2004 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 @@ -29,10 +29,6 @@ typedef float float_t; /* `float' expressions are evaluated as typedef double double_t; /* `double' expressions are evaluated as `double'. */ -/* Define `INFINITY' as value of type `float'. */ -# define INFINITY HUGE_VALF - - /* The values returned by `ilogb' for 0 and NaN respectively. */ # define FP_ILOGB0 (-2147483647) # define FP_ILOGBNAN (2147483647) diff --git a/sysdeps/m68k/bits/huge_val.h b/sysdeps/m68k/bits/huge_val.h deleted file mode 100644 index ad5253429f..0000000000 --- a/sysdeps/m68k/bits/huge_val.h +++ /dev/null @@ -1,92 +0,0 @@ -/* `HUGE_VAL' constants for m68k (where it is infinity). - Used by and functions for overflow. - Copyright (C) 1992, 1995, 1996, 1997, 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 - 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 _MATH_H -# error "Never use directly; include instead." -#endif - - -#include -#include - -/* IEEE positive infinity (-HUGE_VAL is negative infinity). */ - -#ifdef __GNUC__ - -# if __GNUC_PREREQ(2,96) - -# define HUGE_VAL (__extension__ 0x1.0p2047) - -# else - -# define HUGE_VAL \ - (__extension__ \ - ((union { unsigned long long __l; double __d; }) \ - { __l: 0x7ff0000000000000ULL }).__d) - -# endif - -#else /* not GCC */ - -static union { unsigned char __c[8]; double __d; } __huge_val = - { { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 } }; -# define HUGE_VAL (__huge_val.__d) - -#endif /* GCC. */ - - -/* ISO C 99 extensions: (float) HUGE_VALF and (long double) HUGE_VALL. */ - -#ifdef __USE_ISOC99 - -# if __GNUC_PREREQ(2,96) - -# define HUGE_VALF (__extension__ 0x1.0p255f) -# define HUGE_VALL (__extension__ 0x1.0p32767L) - -# else - -# ifdef __GNUC__ - -# define HUGE_VALF \ - (__extension__ \ - ((union { unsigned long __l; float __f; }) \ - { __l: 0x7f800000UL }).__f) - -# define HUGE_VALL \ - (__extension__ \ - ((union { unsigned long __l[3]; long double __ld; }) \ - { __l: { 0x7fff0000UL, 0x80000000UL, 0UL } }).__ld) - -# else /* not GCC */ - -static union { unsigned char __c[4]; float __f; } __huge_valf = - { { 0x7f, 0x80, 0, 0 } }; -# define HUGE_VALF (__huge_valf.__f) - -static union { unsigned char __c[12]; long double __ld; } __huge_vall = - { { 0x7f, 0xff, 0, 0, 0x80, 0, 0, 0, 0, 0, 0, 0 } }; -# define HUGE_VALL (__huge_vall.__ld) - -# endif /* GCC. */ - -# endif /* GCC 2.95. */ - -#endif /* __USE_ISOC99. */ diff --git a/sysdeps/m68k/bits/huge_vall.h b/sysdeps/m68k/bits/huge_vall.h new file mode 100644 index 0000000000..8b9630c6df --- /dev/null +++ b/sysdeps/m68k/bits/huge_vall.h @@ -0,0 +1,43 @@ +/* `HUGE_VALL' constant for m68k (where it is infinity). + Used by and functions for overflow. + Copyright (C) 1992, 1995, 1996, 1997, 1999, 2000, 2004 + 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 _MATH_H +# error "Never use directly; include instead." +#endif + +#if __GNUC_PREREQ(3,3) +# define HUGE_VALL (__builtin_huge_vall ()) +#elif __GNUC_PREREQ(2,96) +# define HUGE_VALL (__extension__ 0x1.0p32767L) +#elif defined__GNUC__ + +# define HUGE_VALL \ + (__extension__ \ + ((union { unsigned long __l[3]; long double __ld; }) \ + { __l: { 0x7fff0000UL, 0x80000000UL, 0UL } }).__ld) + +#else /* not GCC */ + +static union { unsigned char __c[12]; long double __ld; } __huge_vall = + { { 0x7f, 0xff, 0, 0, 0x80, 0, 0, 0, 0, 0, 0, 0 } }; +# define HUGE_VALL (__huge_vall.__ld) + +#endif /* GCC 2.95. */ diff --git a/sysdeps/m68k/fpu/bits/mathdef.h b/sysdeps/m68k/fpu/bits/mathdef.h index 90146f17a9..65cf8d49f6 100644 --- a/sysdeps/m68k/fpu/bits/mathdef.h +++ b/sysdeps/m68k/fpu/bits/mathdef.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999, 2000, 2004 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 @@ -31,9 +31,6 @@ typedef long double float_t; /* `float' expressions are evaluated as typedef long double double_t; /* `double' expressions are evaluated as `long double'. */ -/* Define `INFINITY' as value of type `float'. */ -# define INFINITY HUGE_VALF - /* The values returned by `ilogb' for 0 and NaN respectively. */ # define FP_ILOGB0 (-2147483647 - 1) # define FP_ILOGBNAN (2147483647) diff --git a/sysdeps/mips/bits/nan.h b/sysdeps/mips/bits/nan.h index 193ab3ccad..baaaa551fb 100644 --- a/sysdeps/mips/bits/nan.h +++ b/sysdeps/mips/bits/nan.h @@ -1,5 +1,6 @@ /* `NAN' constant for IEEE 754 machines. - Copyright (C) 1992, 1996, 1997, 1999, 2002 Free Software Foundation, Inc. + Copyright (C) 1992, 1996, 1997, 1999, 2002, 2004 + 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 @@ -27,7 +28,11 @@ the definition of this open to implementations, and for MIPS the top bit of the mantissa must be SET to indicate a SNaN. */ -#ifdef __GNUC__ +#if __GNUC_PREREQ(3,3) + +# define NAN (__builtin_nanf("")) + +#elif defined __GNUC__ # define NAN \ (__extension__ \ diff --git a/sysdeps/mips/fpu/bits/mathdef.h b/sysdeps/mips/fpu/bits/mathdef.h index fd73c35e2f..4a51768244 100644 --- a/sysdeps/mips/fpu/bits/mathdef.h +++ b/sysdeps/mips/fpu/bits/mathdef.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003 +/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -31,10 +31,6 @@ typedef double float_t; /* `float' expressions are evaluated as typedef double double_t; /* `double' expressions are evaluated as `double'. */ -/* Define `INFINITY' as value of type `float'. */ -# define INFINITY HUGE_VALF - - /* The values returned by `ilogb' for 0 and NaN respectively. */ # define FP_ILOGB0 (-2147483647) # define FP_ILOGBNAN 2147483647 From fb14e096b5c53950581b2f168f4b09e5ed111350 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 23 Mar 2004 01:18:23 +0000 Subject: [PATCH 3275/4487] * sysdeps/alpha/s_fabs.S: Remove file. * sysdeps/alpha/s_copysign.S: Remove file. --- sysdeps/alpha/s_copysign.S | 39 -------------------------------------- sysdeps/alpha/s_fabs.S | 38 ------------------------------------- 2 files changed, 77 deletions(-) delete mode 100644 sysdeps/alpha/s_copysign.S delete mode 100644 sysdeps/alpha/s_fabs.S diff --git a/sysdeps/alpha/s_copysign.S b/sysdeps/alpha/s_copysign.S deleted file mode 100644 index 51a5e22f93..0000000000 --- a/sysdeps/alpha/s_copysign.S +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David Mosberger , 1996. - - 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. */ - -#include - -ENTRY(__copysign) -#ifdef PROF - ldgp gp, 0(pv) - .set noat - lda AT, _mcount - jsr AT, (AT), _mcount - .set at - .prologue 1 -#else - .prologue 0 -#endif - - cpys $f17,$f16,$f0 - ret - - END(__copysign) - -weak_alias(__copysign, copysign) diff --git a/sysdeps/alpha/s_fabs.S b/sysdeps/alpha/s_fabs.S deleted file mode 100644 index dd3b58456a..0000000000 --- a/sysdeps/alpha/s_fabs.S +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David Mosberger - - 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. */ - -#include - -ENTRY(__fabs) -#ifdef PROF - .set noat - ldgp gp, 0(pv) - lda AT, _mcount - jsr AT, (AT), _mcount - .set at - .prologue 1 -#else - .prologue 0 -#endif - - cpys $f31,$f16,$f0 - ret - - END(__fabs) -weak_alias (__fabs, fabs) From 006de7120298bcadc38e7ebd884e1fee47a772e5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 23 Mar 2004 23:25:52 +0000 Subject: [PATCH 3276/4487] Consolidated 64bit support for Linux. --- sysdeps/unix/sysv/linux/alpha/getdents64.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/getdents64.c diff --git a/sysdeps/unix/sysv/linux/alpha/getdents64.c b/sysdeps/unix/sysv/linux/alpha/getdents64.c new file mode 100644 index 0000000000..e53570c036 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/getdents64.c @@ -0,0 +1 @@ +#include "../getdents64.c" From 0dfe557c64409473e5bafbfba4d03b81b185f45a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 23 Mar 2004 23:26:24 +0000 Subject: [PATCH 3277/4487] Implied additional directories. --- sysdeps/unix/sysv/linux/alpha/Implies | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/Implies diff --git a/sysdeps/unix/sysv/linux/alpha/Implies b/sysdeps/unix/sysv/linux/alpha/Implies new file mode 100644 index 0000000000..8d91c80097 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/Implies @@ -0,0 +1 @@ +unix/sysv/linux/wordsize-64 From 31e954134aef96ddacea638db5a7b211f6526391 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 23 Mar 2004 23:26:58 +0000 Subject: [PATCH 3278/4487] Not needed anymore. --- sysdeps/unix/sysv/linux/alpha/fstatfs64.c | 1 - sysdeps/unix/sysv/linux/alpha/ftruncate64.c | 1 - sysdeps/unix/sysv/linux/alpha/fxstat64.c | 1 - sysdeps/unix/sysv/linux/alpha/getrlimit64.c | 1 - sysdeps/unix/sysv/linux/alpha/glob64.c | 1 - sysdeps/unix/sysv/linux/alpha/lxstat64.c | 1 - sysdeps/unix/sysv/linux/alpha/mmap64.c | 1 - sysdeps/unix/sysv/linux/alpha/posix_fadvise.c | 2 -- sysdeps/unix/sysv/linux/alpha/posix_fadvise64.c | 1 - sysdeps/unix/sysv/linux/alpha/pread64.c | 1 - sysdeps/unix/sysv/linux/alpha/pwrite64.c | 1 - sysdeps/unix/sysv/linux/alpha/sendfile64.c | 1 - sysdeps/unix/sysv/linux/alpha/setrlimit64.c | 1 - sysdeps/unix/sysv/linux/alpha/statfs64.c | 1 - sysdeps/unix/sysv/linux/alpha/truncate64.c | 1 - sysdeps/unix/sysv/linux/alpha/xstat64.c | 1 - 16 files changed, 17 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/alpha/fstatfs64.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/ftruncate64.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/fxstat64.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/getrlimit64.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/glob64.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/lxstat64.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/mmap64.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/posix_fadvise.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/posix_fadvise64.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/pread64.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/pwrite64.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/sendfile64.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/setrlimit64.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/statfs64.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/truncate64.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/xstat64.c diff --git a/sysdeps/unix/sysv/linux/alpha/fstatfs64.c b/sysdeps/unix/sysv/linux/alpha/fstatfs64.c deleted file mode 100644 index 2be4e59ba4..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/fstatfs64.c +++ /dev/null @@ -1 +0,0 @@ -/* fstatfs64 is the same as fstatfs. */ diff --git a/sysdeps/unix/sysv/linux/alpha/ftruncate64.c b/sysdeps/unix/sysv/linux/alpha/ftruncate64.c deleted file mode 100644 index 673a8b525a..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/ftruncate64.c +++ /dev/null @@ -1 +0,0 @@ -/* ftruncate64 is the same as ftruncate. */ diff --git a/sysdeps/unix/sysv/linux/alpha/fxstat64.c b/sysdeps/unix/sysv/linux/alpha/fxstat64.c deleted file mode 100644 index 9eff9ebeb7..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/fxstat64.c +++ /dev/null @@ -1 +0,0 @@ -/* fxstat64 is in fxstat.c */ diff --git a/sysdeps/unix/sysv/linux/alpha/getrlimit64.c b/sysdeps/unix/sysv/linux/alpha/getrlimit64.c deleted file mode 100644 index 9feab0e6b8..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/getrlimit64.c +++ /dev/null @@ -1 +0,0 @@ -/* getrlimit64 is the same as getrlimit. */ diff --git a/sysdeps/unix/sysv/linux/alpha/glob64.c b/sysdeps/unix/sysv/linux/alpha/glob64.c deleted file mode 100644 index 33918ea6a5..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/glob64.c +++ /dev/null @@ -1 +0,0 @@ -/* glob64 is in glob.c */ diff --git a/sysdeps/unix/sysv/linux/alpha/lxstat64.c b/sysdeps/unix/sysv/linux/alpha/lxstat64.c deleted file mode 100644 index bb5dbd0fff..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/lxstat64.c +++ /dev/null @@ -1 +0,0 @@ -/* lxstat64 is in lxstat.c */ diff --git a/sysdeps/unix/sysv/linux/alpha/mmap64.c b/sysdeps/unix/sysv/linux/alpha/mmap64.c deleted file mode 100644 index 0dbd384a6a..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/mmap64.c +++ /dev/null @@ -1 +0,0 @@ -/* mmap64 is the same as mmap. */ diff --git a/sysdeps/unix/sysv/linux/alpha/posix_fadvise.c b/sysdeps/unix/sysv/linux/alpha/posix_fadvise.c deleted file mode 100644 index a87426cf15..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/posix_fadvise.c +++ /dev/null @@ -1,2 +0,0 @@ -#include - diff --git a/sysdeps/unix/sysv/linux/alpha/posix_fadvise64.c b/sysdeps/unix/sysv/linux/alpha/posix_fadvise64.c deleted file mode 100644 index c9f72c4ce1..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/posix_fadvise64.c +++ /dev/null @@ -1 +0,0 @@ -/* posix_fadvise64 is in posix_fadvise.c */ diff --git a/sysdeps/unix/sysv/linux/alpha/pread64.c b/sysdeps/unix/sysv/linux/alpha/pread64.c deleted file mode 100644 index b7f298dea8..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/pread64.c +++ /dev/null @@ -1 +0,0 @@ -/* Empty since the pread syscall is equivalent. */ diff --git a/sysdeps/unix/sysv/linux/alpha/pwrite64.c b/sysdeps/unix/sysv/linux/alpha/pwrite64.c deleted file mode 100644 index b7f298dea8..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/pwrite64.c +++ /dev/null @@ -1 +0,0 @@ -/* Empty since the pread syscall is equivalent. */ diff --git a/sysdeps/unix/sysv/linux/alpha/sendfile64.c b/sysdeps/unix/sysv/linux/alpha/sendfile64.c deleted file mode 100644 index 4c451bd093..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/sendfile64.c +++ /dev/null @@ -1 +0,0 @@ -/* sendfile64 is alias of sendfile syscall. */ diff --git a/sysdeps/unix/sysv/linux/alpha/setrlimit64.c b/sysdeps/unix/sysv/linux/alpha/setrlimit64.c deleted file mode 100644 index 8edcff0086..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/setrlimit64.c +++ /dev/null @@ -1 +0,0 @@ -/* setrlimit64 is the same as setrlimit. */ diff --git a/sysdeps/unix/sysv/linux/alpha/statfs64.c b/sysdeps/unix/sysv/linux/alpha/statfs64.c deleted file mode 100644 index 06bc68826f..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/statfs64.c +++ /dev/null @@ -1 +0,0 @@ -/* statfs64 is the same as statfs. */ diff --git a/sysdeps/unix/sysv/linux/alpha/truncate64.c b/sysdeps/unix/sysv/linux/alpha/truncate64.c deleted file mode 100644 index 8999768874..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/truncate64.c +++ /dev/null @@ -1 +0,0 @@ -/* truncate64 is the same as truncate. */ diff --git a/sysdeps/unix/sysv/linux/alpha/xstat64.c b/sysdeps/unix/sysv/linux/alpha/xstat64.c deleted file mode 100644 index e7acd3b45e..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/xstat64.c +++ /dev/null @@ -1 +0,0 @@ -/* xstat64 is in xstat.c */ From a01905d02002a321119b7fbbdd03ce8139d5a399 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 23 Mar 2004 23:31:19 +0000 Subject: [PATCH 3279/4487] Move common syscalls for 64bit arches to sysdeps/unix/sysv/linux/wordsize-64/syscalls.list. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index b3168dea26..3bbce1c6fd 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -18,19 +18,6 @@ vfork - vfork 0 __vfork vfork getpeername - getpeername i:ipp __getpeername getpeername getpriority - getpriority i:ii __getpriority getpriority -mmap - mmap b:aniiii __mmap mmap __mmap64 mmap64 -llseek EXTRA lseek C:3 __libc_lseek __lseek lseek __libc_lseek64 __llseek llseek __lseek64 lseek64 -lseek llseek - -pread - pread64 C:4 __libc_pread __libc_pread64 __pread pread __pread64 pread64 -pwrite - pwrite64 C:4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64 -fstatfs - fstatfs i:ip __fstatfs fstatfs __fstatfs64 fstatfs64 -statfs - statfs i:sp __statfs statfs statfs64 -getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64 -setrlimit - setrlimit 2 __setrlimit setrlimit64 setrlimit -ftruncate - ftruncate 2 __ftruncate ftruncate __ftruncate64 ftruncate64 -truncate - truncate 2 truncate truncate64 -readahead - readahead 3 __readahead readahead -sendfile - sendfile i:iipi sendfile sendfile64 open - open Ci:siv __libc_open __open open !__libc_open64 __open64 open64 open64 open - From 240d71125afb33eb78f38686e450a4f600fa73c9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 23 Mar 2004 23:31:47 +0000 Subject: [PATCH 3280/4487] (__NR_pread, __NR_pwrite): Define to __NR_p{read,write}64 if not defined. --- sysdeps/unix/sysv/linux/alpha/sysdep.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h index 3c0988abd3..c3de78f4bb 100644 --- a/sysdeps/unix/sysv/linux/alpha/sysdep.h +++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1993, 1995, 1996, 1997, 2002, 2003 +/* Copyright (C) 1992, 1993, 1995, 1996, 1997, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, , August 1995. @@ -65,6 +65,16 @@ # define __NR_semtimedop 423 #endif +/* This is a kludge to make syscalls.list find these under the names + pread and pwrite, since some kernel headers define those names + and some define the *64 names for the same system calls. */ +#if !defined __NR_pread && defined __NR_pread64 +# define __NR_pread __NR_pread64 +#endif +#if !defined __NR_pwrite && defined __NR_pwrite64 +# define __NR_pwrite __NR_pwrite64 +#endif + /* * In order to get the hidden arguments for rt_sigaction set up * properly, we need to call the assembly version. This shouldn't From 04520d8eebe787181b5d74e5f5ddb0c068ee4117 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 24 Mar 2004 06:29:57 +0000 Subject: [PATCH 3281/4487] (pthread_mutex_t): Add __spins field. --- sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h index 2d8a00b93f..0fed5cc918 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h @@ -1,5 +1,5 @@ /* Machine-specific pthread type layouts. Alpha version. - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2003, 2004 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 @@ -56,6 +56,7 @@ typedef union /* KIND must stay at this position in the structure to maintain binary compatibility. */ int __kind; + int __spins; } __data; char __size[__SIZEOF_PTHREAD_MUTEX_T]; long int __align; From ce3f7d21bd70fc5475a6c2bfcb85b253e588309b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 24 Mar 2004 06:34:59 +0000 Subject: [PATCH 3282/4487] Define lll_mutex_cond_trylock. --- sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h index 9d125e0d6d..a7079a8490 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004 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 @@ -80,6 +80,14 @@ __lll_mutex_trylock(int *futex) #define lll_mutex_trylock(lock) __lll_mutex_trylock (&(lock)) +static inline int __attribute__((always_inline)) +__lll_mutex_cond_trylock(int *futex) +{ + return atomic_compare_and_exchange_val_acq (futex, 2, 0) != 0; +} +#define lll_mutex_cond_trylock(lock) __lll_mutex_cond_trylock (&(lock)) + + extern void __lll_lock_wait (int *futex) attribute_hidden; static inline void __attribute__((always_inline)) From a66be890064cd9626e2659bb7240686a26421e8e Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 26 Mar 2004 07:56:26 +0000 Subject: [PATCH 3283/4487] * sysdeps/alpha/backtrace.c: New. --- sysdeps/alpha/backtrace.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/alpha/backtrace.c diff --git a/sysdeps/alpha/backtrace.c b/sysdeps/alpha/backtrace.c new file mode 100644 index 0000000000..297029456d --- /dev/null +++ b/sysdeps/alpha/backtrace.c @@ -0,0 +1 @@ +#include From 08e3c578caa2559652923e67d73ca7b43dc22d97 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sat, 27 Mar 2004 00:32:28 +0000 Subject: [PATCH 3284/4487] * sysdeps/alpha/Makefile (sysdep_routines): Merge divrem variable, add unsigned variants. * sysdeps/alpha/divrem.h: Remove file. * sysdeps/alpha/div_libc.h: New file. * sysdeps/alpha/divl.S: Rewrite from scratch. * sysdeps/alpha/reml.S: Likewise. * sysdeps/alpha/divq.S: Likewise. * sysdeps/alpha/remq.S: Likewise. * sysdeps/alpha/divlu.S: New file. * sysdeps/alpha/remlu.S: New file. * sysdeps/alpha/divqu.S: New file. * sysdeps/alpha/remqu.S: New file. --- sysdeps/alpha/Makefile | 4 +- sysdeps/alpha/div_libc.h | 113 ++++++++++++++++ sysdeps/alpha/divl.S | 79 +++++++++++- sysdeps/alpha/divlu.S | 4 + sysdeps/alpha/divq.S | 269 ++++++++++++++++++++++++++++++++++++++- sysdeps/alpha/divqu.S | 244 +++++++++++++++++++++++++++++++++++ sysdeps/alpha/divrem.h | 225 -------------------------------- sysdeps/alpha/reml.S | 84 +++++++++++- sysdeps/alpha/remlu.S | 4 + sysdeps/alpha/remq.S | 265 +++++++++++++++++++++++++++++++++++++- sysdeps/alpha/remqu.S | 251 ++++++++++++++++++++++++++++++++++++ 11 files changed, 1294 insertions(+), 248 deletions(-) create mode 100644 sysdeps/alpha/div_libc.h create mode 100644 sysdeps/alpha/divlu.S create mode 100644 sysdeps/alpha/divqu.S delete mode 100644 sysdeps/alpha/divrem.h create mode 100644 sysdeps/alpha/remlu.S create mode 100644 sysdeps/alpha/remqu.S diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile index ce8f9b3fef..1e74d82f58 100644 --- a/sysdeps/alpha/Makefile +++ b/sysdeps/alpha/Makefile @@ -26,7 +26,7 @@ sysdep_routines += _mcount endif ifeq ($(subdir),gnulib) -sysdep_routines += $(divrem) +sysdep_routines += divl divlu divq divqu reml remlu remq remqu endif ifeq ($(subdir),string) @@ -38,8 +38,6 @@ ifeq ($(subdir),elf) CFLAGS-rtld.c = -mbuild-constants endif -divrem := divl divq reml remq - # For now, build everything with full IEEE math support. # TODO: build separate libm and libm-ieee. sysdep-CFLAGS += -mieee diff --git a/sysdeps/alpha/div_libc.h b/sysdeps/alpha/div_libc.h new file mode 100644 index 0000000000..98566435ce --- /dev/null +++ b/sysdeps/alpha/div_libc.h @@ -0,0 +1,113 @@ +/* Copyright (C) 2004 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. */ + +/* Common bits for implementing software divide. */ + +#include +#ifdef __linux__ +# include +# include +#else +# include +#endif + +/* These are not normal C functions. Argument registers are t10 and t11; + the result goes in t12; the return address is in t9. Only t12 and AT + may be clobbered. */ +#define X t10 +#define Y t11 +#define RV t12 +#define RA t9 + +/* None of these functions should use implicit anything. */ + .set nomacro + .set noat + +/* Code fragment to invoke _mcount for profiling. This should be invoked + directly after allocation of the stack frame. */ +.macro CALL_MCOUNT +#ifdef PROF + stq ra, 0(sp) + stq pv, 8(sp) + stq gp, 16(sp) + cfi_rel_offset (ra, 0) + cfi_rel_offset (pv, 8) + cfi_rel_offset (gp, 16) + br AT, 1f + .set macro +1: ldgp gp, 0(AT) + mov RA, ra + lda AT, _mcount + jsr AT, (AT), _mcount + .set nomacro + ldq ra, 0(sp) + ldq pv, 8(sp) + ldq gp, 16(sp) + cfi_restore (ra) + cfi_restore (pv) + cfi_restore (gp) + /* Realign subsequent code with what we'd have without this + macro at all. This means aligned with one arithmetic insn + used within the bundle. */ + .align 4 + nop +#endif +.endm + +/* In order to make the below work, all top-level divide routines must + use the same frame size. */ +#define FRAME 48 + +/* Code fragment to generate an integer divide-by-zero fault. When + building libc.so, we arrange for there to be one copy of this code + placed late in the dso, such that all branches are forward. When + building libc.a, we use multiple copies to avoid having an out of + range branch. Users should jump to DIVBYZERO. */ + +.macro DO_DIVBYZERO +#ifdef PIC +#define DIVBYZERO __divbyzero + .section .gnu.linkonce.t.divbyzero, "ax", @progbits + .globl __divbyzero + .type __divbyzero, @function + .usepv __divbyzero, no + .hidden __divbyzero +#else +#define DIVBYZERO $divbyzero +#endif + + .align 4 +DIVBYZERO: + cfi_startproc + cfi_return_column (RA) + cfi_def_cfa_offset (FRAME) + + mov a0, RV + unop + lda a0, GEN_INTDIV + call_pal PAL_gentrap + + mov RV, a0 + clr RV + lda sp, FRAME(sp) + cfi_def_cfa_offset (0) + ret $31, (RA), 1 + + cfi_endproc + .size DIVBYZERO, .-DIVBYZERO +.endm diff --git a/sysdeps/alpha/divl.S b/sysdeps/alpha/divl.S index fdf053fc25..33fa1187d9 100644 --- a/sysdeps/alpha/divl.S +++ b/sysdeps/alpha/divl.S @@ -1,6 +1,75 @@ -#define IS_REM 0 -#define SIZE 4 -#define UFUNC_NAME __divlu -#define SFUNC_NAME __divl +/* Copyright (C) 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. -#include "divrem.h" + 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. */ + +#include "div_libc.h" + +/* 32-bit signed int divide. This is not a normal C function. Argument + registers are t10 and t11, the result goes in t12. Only t12 and AT may + be clobbered. + + The FPU can handle all input values except zero. Whee! */ + +#ifndef EXTEND +#define EXTEND(S,D) sextl S, D +#endif + + .text + .align 4 + .globl __divl + .type __divl, @function + .usepv __divl, no + + cfi_startproc + cfi_return_column (RA) +__divl: + lda sp, -FRAME(sp) + cfi_def_cfa_offset (FRAME) + CALL_MCOUNT + stt $f0, 0(sp) + stt $f1, 8(sp) + beq Y, DIVBYZERO + cfi_rel_offset ($f0, 0) + cfi_rel_offset ($f1, 8) + + EXTEND (X, RV) + EXTEND (Y, AT) + stq RV, 16(sp) + stq AT, 24(sp) + + ldt $f0, 16(sp) + ldt $f1, 24(sp) + cvtqt $f0, $f0 + cvtqt $f1, $f1 + + divt/c $f0, $f1, $f0 + cvttq/c $f0, $f0 + stt $f0, 16(sp) + ldt $f0, 0(sp) + + ldt $f1, 8(sp) + ldl RV, 16(sp) + lda sp, FRAME(sp) + cfi_restore ($f0) + cfi_restore ($f1) + cfi_def_cfa_offset (0) + ret $31, (RA), 1 + + cfi_endproc + .size __divl, .-__divl + + DO_DIVBYZERO diff --git a/sysdeps/alpha/divlu.S b/sysdeps/alpha/divlu.S new file mode 100644 index 0000000000..5c54bb54c0 --- /dev/null +++ b/sysdeps/alpha/divlu.S @@ -0,0 +1,4 @@ +#define UNSIGNED +#define EXTEND(S,D) zapnot S, 15, D +#define __divl __divlu +#include diff --git a/sysdeps/alpha/divq.S b/sysdeps/alpha/divq.S index 8c88af9736..464536db3d 100644 --- a/sysdeps/alpha/divq.S +++ b/sysdeps/alpha/divq.S @@ -1,6 +1,265 @@ -#define IS_REM 0 -#define SIZE 8 -#define UFUNC_NAME __divqu -#define SFUNC_NAME __divq +/* Copyright (C) 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. -#include "divrem.h" + 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. */ + +#include "div_libc.h" + + +/* 64-bit signed long divide. These are not normal C functions. Argument + registers are t10 and t11, the result goes in t12. Only t12 and AT may + be clobbered. + + Theory of operation here is that we can use the FPU divider for virtually + all operands that we see: all dividend values between -2**53 and 2**53-1 + can be computed directly. Note that divisor values need not be checked + against that range because the rounded fp value will be close enough such + that the quotient is < 1, which will properly be truncated to zero when we + convert back to integer. + + When the dividend is outside the range for which we can compute exact + results, we use the fp quotent as an estimate from which we begin refining + an exact integral value. This reduces the number of iterations in the + shift-and-subtract loop significantly. */ + + .text + .align 4 + .globl __divq + .type __divq, @function + .usepv __divq, no + + cfi_startproc + cfi_return_column (RA) +__divq: + lda sp, -FRAME(sp) + cfi_def_cfa_offset (FRAME) + CALL_MCOUNT + + /* Get the fp divide insn issued as quickly as possible. After + that's done, we have at least 22 cycles until its results are + ready -- all the time in the world to figure out how we're + going to use the results. */ + stq X, 16(sp) + stq Y, 24(sp) + beq Y, DIVBYZERO + + stt $f0, 0(sp) + stt $f1, 8(sp) + cfi_rel_offset ($f0, 0) + cfi_rel_offset ($f1, 8) + ldt $f0, 16(sp) + ldt $f1, 24(sp) + + cvtqt $f0, $f0 + cvtqt $f1, $f1 + divt/c $f0, $f1, $f0 + + /* Check to see if X fit in the double as an exact value. */ + sll X, (64-53), AT + ldt $f1, 8(sp) + sra AT, (64-53), AT + cmpeq X, AT, AT + beq AT, $x_big + + /* If we get here, we're expecting exact results from the division. + Do nothing else besides convert and clean up. */ + cvttq/c $f0, $f0 + stt $f0, 16(sp) + + ldq RV, 16(sp) + ldt $f0, 0(sp) + cfi_restore ($f1) + cfi_remember_state + cfi_restore ($f0) + cfi_def_cfa_offset (0) + lda sp, FRAME(sp) + ret $31, (RA), 1 + + .align 4 + cfi_restore_state +$x_big: + /* If we get here, X is large enough that we don't expect exact + results, and neither X nor Y got mis-translated for the fp + division. Our task is to take the fp result, figure out how + far it's off from the correct result and compute a fixup. */ + stq t0, 16(sp) + stq t1, 24(sp) + stq t2, 32(sp) + stq t5, 40(sp) + cfi_rel_offset (t0, 16) + cfi_rel_offset (t1, 24) + cfi_rel_offset (t2, 32) + cfi_rel_offset (t5, 40) + +#define Q RV /* quotient */ +#define R t0 /* remainder */ +#define SY t1 /* scaled Y */ +#define S t2 /* scalar */ +#define QY t3 /* Q*Y */ + + /* The fixup code below can only handle unsigned values. */ + or X, Y, AT + mov $31, t5 + blt AT, $fix_sign_in +$fix_sign_in_ret1: + cvttq/c $f0, $f0 + + stt $f0, 8(sp) + ldq Q, 8(sp) +$fix_sign_in_ret2: + mulq Q, Y, QY + stq t4, 8(sp) + + ldt $f0, 0(sp) + unop + cfi_rel_offset (t4, 8) + cfi_restore ($f0) + stq t3, 0(sp) + unop + cfi_rel_offset (t3, 0) + + subq QY, X, R + mov Y, SY + mov 1, S + bgt R, $q_high + +$q_high_ret: + subq X, QY, R + mov Y, SY + mov 1, S + bgt R, $q_low + +$q_low_ret: + ldq t0, 16(sp) + ldq t1, 24(sp) + ldq t2, 32(sp) + bne t5, $fix_sign_out + +$fix_sign_out_ret: + ldq t3, 0(sp) + ldq t4, 8(sp) + ldq t5, 40(sp) + lda sp, FRAME(sp) + cfi_remember_state + cfi_restore (t0) + cfi_restore (t1) + cfi_restore (t2) + cfi_restore (t3) + cfi_restore (t4) + cfi_restore (t5) + cfi_def_cfa_offset (0) + ret $31, (RA), 1 + + .align 4 + cfi_restore_state + /* The quotient that we computed was too large. We need to reduce + it by S such that Y*S >= R. Obviously the closer we get to the + correct value the better, but overshooting high is ok, as we'll + fix that up later. */ +0: + addq SY, SY, SY + addq S, S, S +$q_high: + cmpult SY, R, AT + bne AT, 0b + + subq Q, S, Q + unop + subq QY, SY, QY + br $q_high_ret + + .align 4 + /* The quotient that we computed was too small. Divide Y by the + current remainder (R) and add that to the existing quotient (Q). + The expectation, of course, is that R is much smaller than X. */ + /* Begin with a shift-up loop. Compute S such that Y*S >= R. We + already have a copy of Y in SY and the value 1 in S. */ +0: + addq SY, SY, SY + addq S, S, S +$q_low: + cmpult SY, R, AT + bne AT, 0b + + /* Shift-down and subtract loop. Each iteration compares our scaled + Y (SY) with the remainder (R); if SY <= R then X is divisible by + Y's scalar (S) so add it to the quotient (Q). */ +2: addq Q, S, t3 + srl S, 1, S + cmpule SY, R, AT + subq R, SY, t4 + + cmovne AT, t3, Q + cmovne AT, t4, R + srl SY, 1, SY + bne S, 2b + + br $q_low_ret + + .align 4 +$fix_sign_in: + /* If we got here, then X|Y is negative. Need to adjust everything + such that we're doing unsigned division in the fixup loop. */ + /* T5 records the changes we had to make: + bit 0: set if result should be negative. + bit 2: set if X was negated. + bit 3: set if Y was negated. + */ + xor X, Y, AT + cmplt AT, 0, t5 + cmplt X, 0, AT + negq X, t0 + + s4addq AT, t5, t5 + cmovne AT, t0, X + cmplt Y, 0, AT + negq Y, t0 + + s8addq AT, t5, t5 + cmovne AT, t0, Y + unop + blbc t5, $fix_sign_in_ret1 + + cvttq/c $f0, $f0 + stt $f0, 8(sp) + ldq Q, 8(sp) + unop + + negq Q, Q + br $fix_sign_in_ret2 + + .align 4 +$fix_sign_out: + /* Now we get to undo what we did above. */ + /* ??? Is this really faster than just increasing the size of + the stack frame and storing X and Y in memory? */ + and t5, 8, AT + negq Y, t4 + cmovne AT, t4, Y + + and t5, 4, AT + negq X, t4 + cmovne AT, t4, X + + negq RV, t4 + cmovlbs t5, t4, RV + + br $fix_sign_out_ret + + cfi_endproc + .size __divq, .-__divq + + DO_DIVBYZERO diff --git a/sysdeps/alpha/divqu.S b/sysdeps/alpha/divqu.S new file mode 100644 index 0000000000..6ff6c035e2 --- /dev/null +++ b/sysdeps/alpha/divqu.S @@ -0,0 +1,244 @@ +/* Copyright (C) 2004 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. */ + +#include "div_libc.h" + + +/* 64-bit unsigned long divide. These are not normal C functions. Argument + registers are t10 and t11, the result goes in t12. Only t12 and AT may be + clobbered. + + Theory of operation here is that we can use the FPU divider for virtually + all operands that we see: all dividend values between -2**53 and 2**53-1 + can be computed directly. Note that divisor values need not be checked + against that range because the rounded fp value will be close enough such + that the quotient is < 1, which will properly be truncated to zero when we + convert back to integer. + + When the dividend is outside the range for which we can compute exact + results, we use the fp quotent as an estimate from which we begin refining + an exact integral value. This reduces the number of iterations in the + shift-and-subtract loop significantly. */ + + .text + .align 4 + .globl __divqu + .type __divqu, @function + .usepv __divqu, no + + cfi_startproc + cfi_return_column (RA) +__divqu: + lda sp, -FRAME(sp) + cfi_def_cfa_offset (FRAME) + CALL_MCOUNT + + /* Get the fp divide insn issued as quickly as possible. After + that's done, we have at least 22 cycles until its results are + ready -- all the time in the world to figure out how we're + going to use the results. */ + stq X, 16(sp) + stq Y, 24(sp) + beq Y, DIVBYZERO + + stt $f0, 0(sp) + stt $f1, 8(sp) + cfi_rel_offset ($f0, 0) + cfi_rel_offset ($f1, 8) + ldt $f0, 16(sp) + ldt $f1, 24(sp) + + cvtqt $f0, $f0 + cvtqt $f1, $f1 + blt X, $x_is_neg + divt/c $f0, $f1, $f0 + + /* Check to see if Y was mis-converted as signed value. */ + ldt $f1, 8(sp) + unop + nop + blt Y, $y_is_neg + + /* Check to see if X fit in the double as an exact value. */ + srl X, 53, AT + bne AT, $x_big + + /* If we get here, we're expecting exact results from the division. + Do nothing else besides convert and clean up. */ + cvttq/c $f0, $f0 + stt $f0, 16(sp) + + ldq RV, 16(sp) + ldt $f0, 0(sp) + cfi_remember_state + cfi_restore ($f0) + cfi_restore ($f1) + cfi_def_cfa_offset (0) + lda sp, FRAME(sp) + ret $31, (RA), 1 + + .align 4 + cfi_restore_state +$x_is_neg: + /* If we get here, X is so big that bit 63 is set, which made the + conversion come out negative. Fix it up lest we not even get + a good estimate. */ + ldah AT, 0x5f80 /* 2**64 as float. */ + stt $f2, 24(sp) + cfi_rel_offset ($f2, 24) + stl AT, 16(sp) + lds $f2, 16(sp) + + addt $f0, $f2, $f0 + unop + divt/c $f0, $f1, $f0 + unop + + /* Ok, we've now the divide issued. Continue with other checks. */ + ldt $f1, 8(sp) + unop + ldt $f2, 24(sp) + blt Y, $y_is_neg + cfi_restore ($f1) + cfi_restore ($f2) + cfi_remember_state /* for y_is_neg */ + + .align 4 +$x_big: + /* If we get here, X is large enough that we don't expect exact + results, and neither X nor Y got mis-translated for the fp + division. Our task is to take the fp result, figure out how + far it's off from the correct result and compute a fixup. */ + stq t0, 16(sp) + stq t1, 24(sp) + stq t2, 32(sp) + stq t3, 40(sp) + cfi_rel_offset (t0, 16) + cfi_rel_offset (t1, 24) + cfi_rel_offset (t2, 32) + cfi_rel_offset (t3, 40) + +#define Q RV /* quotient */ +#define R t0 /* remainder */ +#define SY t1 /* scaled Y */ +#define S t2 /* scalar */ +#define QY t3 /* Q*Y */ + + cvttq/c $f0, $f0 + stt $f0, 8(sp) + ldq Q, 8(sp) + mulq Q, Y, QY + + stq t4, 8(sp) + unop + ldt $f0, 0(sp) + unop + cfi_rel_offset (t4, 8) + cfi_restore ($f0) + + subq QY, X, R + mov Y, SY + mov 1, S + bgt R, $q_high + +$q_high_ret: + subq X, QY, R + mov Y, SY + mov 1, S + bgt R, $q_low + +$q_low_ret: + ldq t4, 8(sp) + ldq t0, 16(sp) + ldq t1, 24(sp) + ldq t2, 32(sp) + + ldq t3, 40(sp) + lda sp, FRAME(sp) + cfi_remember_state + cfi_restore (t0) + cfi_restore (t1) + cfi_restore (t2) + cfi_restore (t3) + cfi_restore (t4) + cfi_def_cfa_offset (0) + ret $31, (RA), 1 + + .align 4 + cfi_restore_state + /* The quotient that we computed was too large. We need to reduce + it by S such that Y*S >= R. Obviously the closer we get to the + correct value the better, but overshooting high is ok, as we'll + fix that up later. */ +0: + addq SY, SY, SY + addq S, S, S +$q_high: + cmpult SY, R, AT + bne AT, 0b + + subq Q, S, Q + unop + subq QY, SY, QY + br $q_high_ret + + .align 4 + /* The quotient that we computed was too small. Divide Y by the + current remainder (R) and add that to the existing quotient (Q). + The expectation, of course, is that R is much smaller than X. */ + /* Begin with a shift-up loop. Compute S such that Y*S >= R. We + already have a copy of Y in SY and the value 1 in S. */ +0: + addq SY, SY, SY + addq S, S, S +$q_low: + cmpult SY, R, AT + bne AT, 0b + + /* Shift-down and subtract loop. Each iteration compares our scaled + Y (SY) with the remainder (R); if SY <= R then X is divisible by + Y's scalar (S) so add it to the quotient (Q). */ +2: addq Q, S, t3 + srl S, 1, S + cmpule SY, R, AT + subq R, SY, t4 + + cmovne AT, t3, Q + cmovne AT, t4, R + srl SY, 1, SY + bne S, 2b + + br $q_low_ret + + .align 4 + cfi_restore_state +$y_is_neg: + /* If we get here, Y is so big that bit 63 is set. The results + from the divide will be completely wrong. Fortunately, the + quotient must be either 0 or 1, so just compute it directly. */ + cmpult Y, X, RV + ldt $f0, 0(sp) + lda sp, FRAME(sp) + cfi_restore ($f0) + cfi_def_cfa_offset (0) + ret $31, (RA), 1 + + cfi_endproc + .size __divqu, .-__divqu + + DO_DIVBYZERO diff --git a/sysdeps/alpha/divrem.h b/sysdeps/alpha/divrem.h deleted file mode 100644 index 032308de32..0000000000 --- a/sysdeps/alpha/divrem.h +++ /dev/null @@ -1,225 +0,0 @@ -/* Copyright (C) 1996,97,2002 Free Software Foundation, Inc. - Contributed by David Mosberger (davidm@cs.arizona.edu). - 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. */ - -/* The current Alpha chips don't provide hardware for integer - division. The C compiler expects the functions - - __divqu: 64-bit unsigned long divide - __remqu: 64-bit unsigned long remainder - __divqs/__remqs: signed 64-bit - __divlu/__remlu: unsigned 32-bit - __divls/__remls: signed 32-bit - - These are not normal C functions: instead of the normal calling - sequence, these expect their arguments in registers t10 and t11, and - return the result in t12 (aka pv). Register AT may be clobbered - (assembly temporary), anything else must be saved. */ - -#include - -#ifdef __linux__ -# include -# include -#else -# include -#endif - -#define mask v0 -#define divisor t0 -#define compare AT -#define tmp1 t2 -#define tmp2 t3 -#define retaddr t9 -#define arg1 t10 -#define arg2 t11 -#define result t12 - -#if IS_REM -# define DIV_ONLY(x,y...) -# define REM_ONLY(x,y...) x,##y -# define modulus result -# define quotient t1 -# define GETSIGN(x) mov arg1, x -# define STACK 32 -#else -# define DIV_ONLY(x,y...) x,##y -# define REM_ONLY(x,y...) -# define modulus t1 -# define quotient result -# define GETSIGN(x) xor arg1, arg2, x -# define STACK 48 -#endif - -#if SIZE == 8 -# define LONGIFY(x,y) mov x,y -# define SLONGIFY(x,y) mov x,y -# define _SLONGIFY(x) -# define NEG(x,y) negq x,y -#else -# define LONGIFY(x,y) zapnot x,15,y -# define SLONGIFY(x,y) sextl x,y -# define _SLONGIFY(x) sextl x,x -# define NEG(x,y) negl x,y -#endif - - .set noreorder - .set noat - - .ent UFUNC_NAME - .globl UFUNC_NAME - - .align 3 -UFUNC_NAME: -$udiv_entry: - lda sp, -STACK(sp) - .frame sp, STACK, retaddr, 0 -#ifdef PROF - stq ra, 0(sp) - stq pv, 8(sp) - stq gp, 16(sp) - - br AT, 1f -1: ldgp gp, 0(AT) - - mov retaddr, ra - lda AT, _mcount - jsr AT, (AT), _mcount - - ldq ra, 0(sp) - ldq pv, 8(sp) - ldq gp, 16(sp) -#endif - .prologue 0 - -$udiv: - stq t0, 0(sp) - LONGIFY (arg2, divisor) - stq t1, 8(sp) - LONGIFY (arg1, modulus) - stq v0, 16(sp) - clr quotient - stq tmp1, 24(sp) - ldiq mask, 1 - DIV_ONLY(stq tmp2,32(sp)) - - beq divisor, $divbyzero - - .align 3 -#if SIZE == 8 - /* Shift divisor left. */ -1: cmpult divisor, modulus, compare - blt divisor, 2f - addq divisor, divisor, divisor - addq mask, mask, mask - bne compare, 1b - unop -2: -#else - /* Shift divisor left using 3-bit shifts as we can't overflow. - This results in looping three times less here, but up to - two more times later. Thus using a large shift isn't worth it. */ -1: cmpult divisor, modulus, compare - s8addq divisor, zero, divisor - s8addq mask, zero, mask - bne compare, 1b -#endif - - /* Now go back to the right. */ -3: DIV_ONLY(addq quotient, mask, tmp2) - srl mask, 1, mask - cmpule divisor, modulus, compare - subq modulus, divisor, tmp1 - DIV_ONLY(cmovne compare, tmp2, quotient) - srl divisor, 1, divisor - cmovne compare, tmp1, modulus - bne mask, 3b - -$done: ldq t0, 0(sp) - ldq t1, 8(sp) - ldq v0, 16(sp) - ldq tmp1, 24(sp) - DIV_ONLY(ldq tmp2, 32(sp)) - lda sp, STACK(sp) - ret zero, (retaddr), 1 - -$divbyzero: - mov a0, tmp1 - ldiq a0, GEN_INTDIV - call_pal PAL_gentrap - mov tmp1, a0 - clr result /* If trap returns, return zero. */ - br $done - - .end UFUNC_NAME - - .ent SFUNC_NAME - .globl SFUNC_NAME - - .align 3 -SFUNC_NAME: - lda sp, -STACK(sp) - .frame sp, STACK, retaddr, 0 -#ifdef PROF - stq ra, 0(sp) - stq pv, 8(sp) - stq gp, 16(sp) - - br AT, 1f -1: ldgp gp, 0(AT) - - mov retaddr, ra - jsr AT, _mcount - - ldq ra, 0(sp) - ldq pv, 8(sp) - ldq gp, 16(sp) -#endif - .prologue 0 - - or arg1, arg2, AT - _SLONGIFY(AT) - bge AT, $udiv /* don't need to mess with signs */ - - /* Save originals and find absolute values. */ - stq arg1, 0(sp) - NEG (arg1, AT) - stq arg2, 8(sp) - cmovge AT, AT, arg1 - stq retaddr, 16(sp) - NEG (arg2, AT) - stq tmp1, 24(sp) - cmovge AT, AT, arg2 - - /* Do the unsigned division. */ - bsr retaddr, $udiv_entry - - /* Restore originals and adjust the sign of the result. */ - ldq arg1, 0(sp) - ldq arg2, 8(sp) - GETSIGN (AT) - NEG (result, tmp1) - _SLONGIFY(AT) - ldq retaddr, 16(sp) - cmovlt AT, tmp1, result - ldq tmp1, 24(sp) - - lda sp, STACK(sp) - ret zero, (retaddr), 1 - - .end SFUNC_NAME diff --git a/sysdeps/alpha/reml.S b/sysdeps/alpha/reml.S index 8c00365ee3..c4eb426c5a 100644 --- a/sysdeps/alpha/reml.S +++ b/sysdeps/alpha/reml.S @@ -1,6 +1,80 @@ -#define IS_REM 1 -#define SIZE 4 -#define UFUNC_NAME __remlu -#define SFUNC_NAME __reml +/* Copyright (C) 2004 Free Software Foundation, Inc. + Contributed by Richard Henderson + This file is part of the GNU C Library. -#include "divrem.h" + 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. */ + +#include "div_libc.h" + +/* 32-bit signed int remainder. This is not a normal C function. Argument + registers are t10 and t11, the result goes in t12. Only t12 and AT may + be clobbered. + + The FPU can handle the division for all input values except zero. + All we have to do is compute the remainder via multiply-and-subtract. */ + +#ifndef EXTEND +#define EXTEND(S,D) sextl S, D +#endif + + .text + .align 4 + .globl __reml + .type __reml, @function + .usepv __reml, no + + cfi_startproc + cfi_return_column (RA) +__reml: + lda sp, -FRAME(sp) + cfi_def_cfa_offset (FRAME) + CALL_MCOUNT + stt $f0, 0(sp) + stt $f1, 8(sp) + beq Y, DIVBYZERO + cfi_rel_offset ($f0, 0) + cfi_rel_offset ($f1, 8) + + EXTEND (X, RV) + EXTEND (Y, AT) + stq RV, 16(sp) + stq AT, 24(sp) + + ldt $f0, 16(sp) + ldt $f1, 24(sp) + cvtqt $f0, $f0 + cvtqt $f1, $f1 + + divt/c $f0, $f1, $f0 + cvttq/c $f0, $f0 + stt $f0, 16(sp) + ldq RV, 16(sp) + + ldt $f0, 0(sp) + mull RV, Y, RV + ldt $f1, 8(sp) + lda sp, FRAME(sp) + cfi_restore ($f0) + cfi_restore ($f1) + cfi_def_cfa_offset (0) + + subl X, RV, RV + ret $31, (RA), 1 + + cfi_endproc + .size __reml, .-__reml + + DO_DIVBYZERO diff --git a/sysdeps/alpha/remlu.S b/sysdeps/alpha/remlu.S new file mode 100644 index 0000000000..f8691e19a4 --- /dev/null +++ b/sysdeps/alpha/remlu.S @@ -0,0 +1,4 @@ +#define UNSIGNED +#define EXTEND(S,D) zapnot S, 15, D +#define __reml __remlu +#include diff --git a/sysdeps/alpha/remq.S b/sysdeps/alpha/remq.S index cd1064af4e..ce527d1055 100644 --- a/sysdeps/alpha/remq.S +++ b/sysdeps/alpha/remq.S @@ -1,6 +1,261 @@ -#define IS_REM 1 -#define SIZE 8 -#define UFUNC_NAME __remqu -#define SFUNC_NAME __remq +/* Copyright (C) 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. -#include "divrem.h" + 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. */ + +#include "div_libc.h" + + +/* 64-bit signed long remainder. These are not normal C functions. Argument + registers are t10 and t11, the result goes in t12. Only t12 and AT may + be clobbered. + + Theory of operation here is that we can use the FPU divider for virtually + all operands that we see: all dividend values between -2**53 and 2**53-1 + can be computed directly. Note that divisor values need not be checked + against that range because the rounded fp value will be close enough such + that the quotient is < 1, which will properly be truncated to zero when we + convert back to integer. + + When the dividend is outside the range for which we can compute exact + results, we use the fp quotent as an estimate from which we begin refining + an exact integral value. This reduces the number of iterations in the + shift-and-subtract loop significantly. */ + + .text + .align 4 + .globl __remq + .type __remq, @function + .usepv __remq, no + + cfi_startproc + cfi_return_column (RA) +__remq: + lda sp, -FRAME(sp) + cfi_def_cfa_offset (FRAME) + CALL_MCOUNT + + /* Get the fp divide insn issued as quickly as possible. After + that's done, we have at least 22 cycles until its results are + ready -- all the time in the world to figure out how we're + going to use the results. */ + stq X, 16(sp) + stq Y, 24(sp) + beq Y, DIVBYZERO + + stt $f0, 0(sp) + stt $f1, 8(sp) + cfi_rel_offset ($f0, 0) + cfi_rel_offset ($f1, 8) + ldt $f0, 16(sp) + ldt $f1, 24(sp) + + cvtqt $f0, $f0 + cvtqt $f1, $f1 + divt/c $f0, $f1, $f0 + + /* Check to see if X fit in the double as an exact value. */ + sll X, (64-53), AT + ldt $f1, 8(sp) + sra AT, (64-53), AT + cmpeq X, AT, AT + beq AT, $x_big + + /* If we get here, we're expecting exact results from the division. + Do nothing else besides convert, compute remainder, clean up. */ + cvttq/c $f0, $f0 + stt $f0, 16(sp) + + ldq AT, 16(sp) + mulq AT, Y, AT + ldt $f0, 0(sp) + cfi_restore ($f1) + cfi_remember_state + cfi_restore ($f0) + cfi_def_cfa_offset (0) + lda sp, FRAME(sp) + + subq X, AT, RV + ret $31, (RA), 1 + + .align 4 + cfi_restore_state +$x_big: + /* If we get here, X is large enough that we don't expect exact + results, and neither X nor Y got mis-translated for the fp + division. Our task is to take the fp result, figure out how + far it's off from the correct result and compute a fixup. */ + stq t0, 16(sp) + stq t1, 24(sp) + stq t2, 32(sp) + stq t5, 40(sp) + cfi_rel_offset (t0, 16) + cfi_rel_offset (t1, 24) + cfi_rel_offset (t2, 32) + cfi_rel_offset (t5, 40) + +#define Q t0 /* quotient */ +#define R RV /* remainder */ +#define SY t1 /* scaled Y */ +#define S t2 /* scalar */ +#define QY t3 /* Q*Y */ + + /* The fixup code below can only handle unsigned values. */ + or X, Y, AT + mov $31, t5 + blt AT, $fix_sign_in +$fix_sign_in_ret1: + cvttq/c $f0, $f0 + + stt $f0, 8(sp) + ldq Q, 8(sp) +$fix_sign_in_ret2: + mulq Q, Y, QY + stq t4, 8(sp) + + ldt $f0, 0(sp) + unop + cfi_rel_offset (t4, 8) + cfi_restore ($f0) + stq t3, 0(sp) + unop + cfi_rel_offset (t3, 0) + + subq QY, X, R + mov Y, SY + mov 1, S + bgt R, $q_high + +$q_high_ret: + subq X, QY, R + mov Y, SY + mov 1, S + bgt R, $q_low + +$q_low_ret: + ldq t0, 16(sp) + ldq t1, 24(sp) + ldq t2, 32(sp) + bne t5, $fix_sign_out + +$fix_sign_out_ret: + ldq t3, 0(sp) + ldq t4, 8(sp) + ldq t5, 40(sp) + lda sp, FRAME(sp) + cfi_remember_state + cfi_restore (t0) + cfi_restore (t1) + cfi_restore (t2) + cfi_restore (t3) + cfi_restore (t4) + cfi_restore (t5) + cfi_def_cfa_offset (0) + ret $31, (RA), 1 + + .align 4 + cfi_restore_state + /* The quotient that we computed was too large. We need to reduce + it by S such that Y*S >= R. Obviously the closer we get to the + correct value the better, but overshooting high is ok, as we'll + fix that up later. */ +0: + addq SY, SY, SY + addq S, S, S +$q_high: + cmpult SY, R, AT + bne AT, 0b + + subq Q, S, Q + unop + subq QY, SY, QY + br $q_high_ret + + .align 4 + /* The quotient that we computed was too small. Divide Y by the + current remainder (R) and add that to the existing quotient (Q). + The expectation, of course, is that R is much smaller than X. */ + /* Begin with a shift-up loop. Compute S such that Y*S >= R. We + already have a copy of Y in SY and the value 1 in S. */ +0: + addq SY, SY, SY + addq S, S, S +$q_low: + cmpult SY, R, AT + bne AT, 0b + + /* Shift-down and subtract loop. Each iteration compares our scaled + Y (SY) with the remainder (R); if SY <= R then X is divisible by + Y's scalar (S) so add it to the quotient (Q). */ +2: addq Q, S, t3 + srl S, 1, S + cmpule SY, R, AT + subq R, SY, t4 + + cmovne AT, t3, Q + cmovne AT, t4, R + srl SY, 1, SY + bne S, 2b + + br $q_low_ret + + .align 4 +$fix_sign_in: + /* If we got here, then X|Y is negative. Need to adjust everything + such that we're doing unsigned division in the fixup loop. */ + /* T5 records the changes we had to make: + bit 0: set if X was negated. Note that the sign of the + remainder follows the sign of the divisor. + bit 2: set if Y was negated. + */ + xor X, Y, t1 + cmplt X, 0, t5 + negq X, t0 + cmovne t5, t0, X + + cmplt Y, 0, AT + negq Y, t0 + s4addq AT, t5, t5 + cmovne AT, t0, Y + + bge t1, $fix_sign_in_ret1 + cvttq/c $f0, $f0 + stt $f0, 8(sp) + ldq Q, 8(sp) + + negq Q, Q + br $fix_sign_in_ret2 + + .align 4 +$fix_sign_out: + /* Now we get to undo what we did above. */ + /* ??? Is this really faster than just increasing the size of + the stack frame and storing X and Y in memory? */ + and t5, 4, AT + negq Y, t4 + cmovne AT, t4, Y + + negq X, t4 + cmovlbs t5, t4, X + negq RV, t4 + cmovlbs t5, t4, RV + + br $fix_sign_out_ret + + cfi_endproc + .size __remq, .-__remq + + DO_DIVBYZERO diff --git a/sysdeps/alpha/remqu.S b/sysdeps/alpha/remqu.S new file mode 100644 index 0000000000..1a1dcad8a0 --- /dev/null +++ b/sysdeps/alpha/remqu.S @@ -0,0 +1,251 @@ +/* Copyright (C) 2004 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. */ + +#include "div_libc.h" + + +/* 64-bit unsigned long remainder. These are not normal C functions. Argument + registers are t10 and t11, the result goes in t12. Only t12 and AT may be + clobbered. + + Theory of operation here is that we can use the FPU divider for virtually + all operands that we see: all dividend values between -2**53 and 2**53-1 + can be computed directly. Note that divisor values need not be checked + against that range because the rounded fp value will be close enough such + that the quotient is < 1, which will properly be truncated to zero when we + convert back to integer. + + When the dividend is outside the range for which we can compute exact + results, we use the fp quotent as an estimate from which we begin refining + an exact integral value. This reduces the number of iterations in the + shift-and-subtract loop significantly. */ + + .text + .align 4 + .globl __remqu + .type __remqu, @function + .usepv __remqu, no + + cfi_startproc + cfi_return_column (RA) +__remqu: + lda sp, -FRAME(sp) + cfi_def_cfa_offset (FRAME) + CALL_MCOUNT + + /* Get the fp divide insn issued as quickly as possible. After + that's done, we have at least 22 cycles until its results are + ready -- all the time in the world to figure out how we're + going to use the results. */ + stq X, 16(sp) + stq Y, 24(sp) + beq Y, DIVBYZERO + + stt $f0, 0(sp) + stt $f1, 8(sp) + cfi_rel_offset ($f0, 0) + cfi_rel_offset ($f1, 8) + ldt $f0, 16(sp) + ldt $f1, 24(sp) + + cvtqt $f0, $f0 + cvtqt $f1, $f1 + blt X, $x_is_neg + divt/c $f0, $f1, $f0 + + /* Check to see if Y was mis-converted as signed value. */ + ldt $f1, 8(sp) + unop + nop + blt Y, $y_is_neg + + /* Check to see if X fit in the double as an exact value. */ + srl X, 53, AT + bne AT, $x_big + + /* If we get here, we're expecting exact results from the division. + Do nothing else besides convert, compute remainder, clean up. */ + cvttq/c $f0, $f0 + stt $f0, 16(sp) + + ldq AT, 16(sp) + mulq AT, Y, AT + ldt $f0, 0(sp) + lda sp, FRAME(sp) + cfi_remember_state + cfi_restore ($f0) + cfi_restore ($f1) + cfi_def_cfa_offset (0) + + subq X, AT, RV + ret $31, (RA), 1 + + .align 4 + cfi_restore_state +$x_is_neg: + /* If we get here, X is so big that bit 63 is set, which made the + conversion come out negative. Fix it up lest we not even get + a good estimate. */ + ldah AT, 0x5f80 /* 2**64 as float. */ + stt $f2, 24(sp) + cfi_rel_offset ($f2, 24) + stl AT, 16(sp) + lds $f2, 16(sp) + + addt $f0, $f2, $f0 + unop + divt/c $f0, $f1, $f0 + unop + + /* Ok, we've now the divide issued. Continue with other checks. */ + ldt $f1, 8(sp) + unop + ldt $f2, 24(sp) + blt Y, $y_is_neg + cfi_restore ($f1) + cfi_restore ($f2) + cfi_remember_state /* for y_is_neg */ + + .align 4 +$x_big: + /* If we get here, X is large enough that we don't expect exact + results, and neither X nor Y got mis-translated for the fp + division. Our task is to take the fp result, figure out how + far it's off from the correct result and compute a fixup. */ + stq t0, 16(sp) + stq t1, 24(sp) + stq t2, 32(sp) + stq t3, 40(sp) + cfi_rel_offset (t0, 16) + cfi_rel_offset (t1, 24) + cfi_rel_offset (t2, 32) + cfi_rel_offset (t3, 40) + +#define Q t0 /* quotient */ +#define R RV /* remainder */ +#define SY t1 /* scaled Y */ +#define S t2 /* scalar */ +#define QY t3 /* Q*Y */ + + cvttq/c $f0, $f0 + stt $f0, 8(sp) + ldq Q, 8(sp) + mulq Q, Y, QY + + stq t4, 8(sp) + unop + ldt $f0, 0(sp) + unop + cfi_rel_offset (t4, 8) + cfi_restore ($f0) + + subq QY, X, R + mov Y, SY + mov 1, S + bgt R, $q_high + +$q_high_ret: + subq X, QY, R + mov Y, SY + mov 1, S + bgt R, $q_low + +$q_low_ret: + ldq t4, 8(sp) + ldq t0, 16(sp) + ldq t1, 24(sp) + ldq t2, 32(sp) + + ldq t3, 40(sp) + lda sp, FRAME(sp) + cfi_remember_state + cfi_restore (t0) + cfi_restore (t1) + cfi_restore (t2) + cfi_restore (t3) + cfi_restore (t4) + cfi_def_cfa_offset (0) + ret $31, (RA), 1 + + .align 4 + cfi_restore_state + /* The quotient that we computed was too large. We need to reduce + it by S such that Y*S >= R. Obviously the closer we get to the + correct value the better, but overshooting high is ok, as we'll + fix that up later. */ +0: + addq SY, SY, SY + addq S, S, S +$q_high: + cmpult SY, R, AT + bne AT, 0b + + subq Q, S, Q + unop + subq QY, SY, QY + br $q_high_ret + + .align 4 + /* The quotient that we computed was too small. Divide Y by the + current remainder (R) and add that to the existing quotient (Q). + The expectation, of course, is that R is much smaller than X. */ + /* Begin with a shift-up loop. Compute S such that Y*S >= R. We + already have a copy of Y in SY and the value 1 in S. */ +0: + addq SY, SY, SY + addq S, S, S +$q_low: + cmpult SY, R, AT + bne AT, 0b + + /* Shift-down and subtract loop. Each iteration compares our scaled + Y (SY) with the remainder (R); if SY <= R then X is divisible by + Y's scalar (S) so add it to the quotient (Q). */ +2: addq Q, S, t3 + srl S, 1, S + cmpule SY, R, AT + subq R, SY, t4 + + cmovne AT, t3, Q + cmovne AT, t4, R + srl SY, 1, SY + bne S, 2b + + br $q_low_ret + + .align 4 + cfi_restore_state +$y_is_neg: + /* If we get here, Y is so big that bit 63 is set. The results + from the divide will be completely wrong. Fortunately, the + quotient must be either 0 or 1, so the remainder must be X + or X-Y, so just compute it directly. */ + cmpult Y, X, AT + subq X, Y, RV + ldt $f0, 0(sp) + cmoveq AT, X, RV + + lda sp, FRAME(sp) + cfi_restore ($f0) + cfi_def_cfa_offset (0) + ret $31, (RA), 1 + + cfi_endproc + .size __remqu, .-__remqu + + DO_DIVBYZERO From 2b89b1957dd0a036b99c34b3d8b0c1d57633ddc8 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 31 Mar 2004 02:34:13 +0000 Subject: [PATCH 3285/4487] * sysdeps/alpha/remqu.S: Detect power-of-two special case. --- sysdeps/alpha/remqu.S | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/sysdeps/alpha/remqu.S b/sysdeps/alpha/remqu.S index 1a1dcad8a0..fa2eb626c7 100644 --- a/sysdeps/alpha/remqu.S +++ b/sysdeps/alpha/remqu.S @@ -54,24 +54,25 @@ __remqu: going to use the results. */ stq X, 16(sp) stq Y, 24(sp) - beq Y, DIVBYZERO + subq Y, 1, AT stt $f0, 0(sp) + and Y, AT, AT stt $f1, 8(sp) + beq AT, $powerof2 cfi_rel_offset ($f0, 0) cfi_rel_offset ($f1, 8) + ldt $f0, 16(sp) ldt $f1, 24(sp) - cvtqt $f0, $f0 cvtqt $f1, $f1 + blt X, $x_is_neg divt/c $f0, $f1, $f0 /* Check to see if Y was mis-converted as signed value. */ ldt $f1, 8(sp) - unop - nop blt Y, $y_is_neg /* Check to see if X fit in the double as an exact value. */ @@ -245,6 +246,16 @@ $y_is_neg: cfi_def_cfa_offset (0) ret $31, (RA), 1 + .align 4 + cfi_def_cfa_offset (FRAME) +$powerof2: + subq Y, 1, AT + beq Y, DIVBYZERO + and X, AT, RV + lda sp, FRAME(sp) + cfi_def_cfa_offset (0) + ret $31, (RA), 1 + cfi_endproc .size __remqu, .-__remqu From 635d5fe3883bd4cfab7bab919ba2b18897fb97ba Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 31 Mar 2004 08:53:29 +0000 Subject: [PATCH 3286/4487] Add IUTF8. --- sysdeps/unix/sysv/linux/alpha/bits/termios.h | 1 + sysdeps/unix/sysv/linux/mips/bits/termios.h | 1 + 2 files changed, 2 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/termios.h b/sysdeps/unix/sysv/linux/alpha/bits/termios.h index 0abe34f596..f26e84c9f6 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/termios.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/termios.h @@ -77,6 +77,7 @@ struct termios # define IXANY 0004000 # define IUCLC 0010000 # define IMAXBEL 0020000 +# define IUTF8 0040000 #endif /* c_oflag bits */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/termios.h b/sysdeps/unix/sysv/linux/mips/bits/termios.h index 546faa020e..4ff6e37ad6 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/termios.h +++ b/sysdeps/unix/sysv/linux/mips/bits/termios.h @@ -73,6 +73,7 @@ struct termios #define IXANY 0004000 /* Any character will restart after stop. */ #define IXOFF 0010000 /* Enable start/stop input control. */ #define IMAXBEL 0020000 /* Ring bell when input queue is full. */ +#define IUTF8 0040000 /* Input is UTF8. */ /* c_oflag bits */ #define OPOST 0000001 /* Perform output processing. */ From 693687e64e918ac5dc1eeb0da3adf4c401a942e1 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Thu, 8 Apr 2004 23:30:26 +0000 Subject: [PATCH 3287/4487] (INTERNAL_SYSCALL): Add LOAD_REGS_##nr. (LOAD_ARGS_0, LOAD_ARGS_1, LOAD_ARGS_2, LOAD_ARGS_3, LOAD_ARGS_4) (LOAD_ARGS_5, LOAD_ARGS_6): Load argument values into temporary variables. (LOAD_REGS_0, LOAD_REGS_1, LOAD_REGS_2, LOAD_REGS_3, LOAD_REGS_4) (LOAD_REGS_5, LOAD_REGS_6): New macros to actually load the syscall argument registers. --- sysdeps/unix/sysv/linux/m68k/sysdep.h | 49 ++++++++++++++++++++------- 1 file changed, 36 insertions(+), 13 deletions(-) diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h index 3c6266bae4..234ce32f4f 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998, 2000, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998, 2000, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Andreas Schwab, , December 1995. @@ -225,7 +225,11 @@ SYSCALL_ERROR_LABEL: \ #define INTERNAL_SYSCALL(name, err, nr, args...) \ ({ unsigned int _sys_result; \ { \ + /* Load argument values in temporary variables + to perform side effects like function calls + before the call used registers are set. */ \ LOAD_ARGS_##nr (args) \ + LOAD_REGS_##nr \ register int _d0 asm ("%d0") = __NR_##name; \ asm volatile ("trap #0" \ : "=d" (_d0) \ @@ -243,30 +247,49 @@ SYSCALL_ERROR_LABEL: \ #define INTERNAL_SYSCALL_ERRNO(val, err) (-(val)) #define LOAD_ARGS_0() +#define LOAD_REGS_0 #define ASM_ARGS_0 #define LOAD_ARGS_1(a1) \ - register int _d1 asm ("d1") = (int) (a1); \ - LOAD_ARGS_0 () + LOAD_ARGS_0 () \ + int __arg1 = (int) (a1); +#define LOAD_REGS_1 \ + register int _d1 asm ("d1") = __arg1; \ + LOAD_REGS_0 #define ASM_ARGS_1 ASM_ARGS_0, "d" (_d1) #define LOAD_ARGS_2(a1, a2) \ - register int _d2 asm ("d2") = (int) (a2); \ - LOAD_ARGS_1 (a1) + LOAD_ARGS_1 (a1) \ + int __arg2 = (int) (a2); +#define LOAD_REGS_2 \ + register int _d2 asm ("d2") = __arg2; \ + LOAD_REGS_1 #define ASM_ARGS_2 ASM_ARGS_1, "d" (_d2) #define LOAD_ARGS_3(a1, a2, a3) \ - register int _d3 asm ("d3") = (int) (a3); \ - LOAD_ARGS_2 (a1, a2) + LOAD_ARGS_2 (a1, a2) \ + int __arg3 = (int) (a3); +#define LOAD_REGS_3 \ + register int _d3 asm ("d3") = __arg3; \ + LOAD_REGS_2 #define ASM_ARGS_3 ASM_ARGS_2, "d" (_d3) #define LOAD_ARGS_4(a1, a2, a3, a4) \ - register int _d4 asm ("d4") = (int) (a4); \ - LOAD_ARGS_3 (a1, a2, a3) + LOAD_ARGS_3 (a1, a2, a3) \ + int __arg4 = (int) (a4); +#define LOAD_REGS_4 \ + register int _d4 asm ("d4") = __arg4; \ + LOAD_REGS_3 #define ASM_ARGS_4 ASM_ARGS_3, "d" (_d4) #define LOAD_ARGS_5(a1, a2, a3, a4, a5) \ - register int _d5 asm ("d5") = (int) (a5); \ - LOAD_ARGS_4 (a1, a2, a3, a4) + LOAD_ARGS_4 (a1, a2, a3, a4) \ + int __arg5 = (int) (a5); +#define LOAD_REGS_5 \ + register int _d5 asm ("d5") = __arg5; \ + LOAD_REGS_4 #define ASM_ARGS_5 ASM_ARGS_4, "d" (_d5) #define LOAD_ARGS_6(a1, a2, a3, a4, a5, a6) \ - register int _a0 asm ("a0") = (int) (a6); \ - LOAD_ARGS_5 (a1, a2, a3, a4, a5) + LOAD_ARGS_5 (a1, a2, a3, a4, a5) \ + int __arg6 = (int) (a6); +#define LOAD_REGS_6 \ + register int _a0 asm ("a0") = __arg6; \ + LOAD_REGS_5 #define ASM_ARGS_6 ASM_ARGS_5, "a" (_a0) #endif /* not __ASSEMBLER__ */ From 13bf16320937efd533aebde1aaf944dba00e584b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 13 Apr 2004 02:00:09 +0000 Subject: [PATCH 3288/4487] (MQ_PRIO_MAX): Define. --- sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h index bb3c4c061d..e0718780cc 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h @@ -84,3 +84,6 @@ /* Maximum host name length. */ #define HOST_NAME_MAX 64 + +/* Maximum message queue priority level. */ +#define MQ_PRIO_MAX 32768 From af6aab77a667ece4bd7afb70970946e40f91cc55 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 15 Apr 2004 04:50:11 +0000 Subject: [PATCH 3289/4487] (RTLD_START): Do not use nested .end. --- sysdeps/mips/dl-machine.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index a402b39cc9..b92a813ed0 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. MIPS version. - Copyright (C) 1996-2001, 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 1996-2001, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Kazumoto Kojima . @@ -474,7 +474,7 @@ _dl_runtime_resolve:\n \ " STRINGXP(PTR_LA) " $25, _dl_start_user\n\ .globl _dl_start_user\n\ .type _dl_start_user,@function\n\ - .ent _dl_start_user\n\ + .aent _dl_start_user\n\ _dl_start_user:\n\ " STRINGXP(SETUP_GP) "\n\ " STRINGXV(SETUP_GP64($18,_dl_start_user)) "\n\ @@ -513,7 +513,6 @@ _dl_start_user:\n\ # Jump to the user entry point.\n\ move $25, $17\n\ jr $25\n\ - .end _dl_start_user\n\t"\ _RTLD_EPILOGUE(ENTRY_POINT)\ ".previous"\ ); From 57f4291c9d3ed7892d0aaaf153540fc5b290ace8 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 15 Apr 2004 14:08:16 +0000 Subject: [PATCH 3290/4487] Fix last commit. --- sysdeps/mips/dl-machine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index b92a813ed0..aff843d01d 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -512,7 +512,7 @@ _dl_start_user:\n\ " STRINGXP(PTR_LA) " $2, _dl_fini\n\ # Jump to the user entry point.\n\ move $25, $17\n\ - jr $25\n\ + jr $25\n\t"\ _RTLD_EPILOGUE(ENTRY_POINT)\ ".previous"\ ); From 87ffc6ec7972f7abe7174199addf2911c876d24a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 17 Apr 2004 22:51:43 +0000 Subject: [PATCH 3291/4487] (feupdateenv): Use only sw[0] and call feraiseexcept. --- sysdeps/hppa/fpu/feupdateenv.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sysdeps/hppa/fpu/feupdateenv.c b/sysdeps/hppa/fpu/feupdateenv.c index 8980dfd69c..7d50282e05 100644 --- a/sysdeps/hppa/fpu/feupdateenv.c +++ b/sysdeps/hppa/fpu/feupdateenv.c @@ -27,11 +27,10 @@ feupdateenv (const fenv_t *envp) /* Get the current exception status. */ __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw)); - sw[0] &= FE_ALL_EXCEPT; - envp->__status_word = envp->__status_word | sw[0]; - /* Install new environment. */ fesetenv (envp); + /* Raise the saved exceptions */ + feraiseexcept(sw[0] & FE_ALL_EXCEPT); /* Success. */ return 0; From 32e5b41b173e025976f606b6209871a131cdfc6c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 17 Apr 2004 22:53:29 +0000 Subject: [PATCH 3292/4487] (__hppa_init_bootstrap_fdesc_table): Initialze the fdesc table for the generic code. (elf_machine_dynamic): Use asm version. (elf_machine_load_addresss): Simplify asm by calling elf_machine_dynamic. (elf_machine_fixup_plt): Correct comment. (elf_machine_profile_fixup_plt): New. (elf_machine_runtime_setup): Check PLT exists, if lazy=1 process normally, else relocate all the absolute entries. (RTLD_START): Fix comments. (TRAMPOLINE_TEMPLATE): Reformat assembly, add return pointer for calls to profile_fixup. (ELF_MACHINE_SIZEOF_JMP_SLOT, DL_STATIC_FUNCTION_ADDRESS, DL_PLATFORM_INIT): Define. (DL_FUNCTION_ADDRESS): Remove. (dl_platform_init): New. (elf_machine_rela): Use generic fdesc code, and process all COPY relocations. Use __attribute__((always_inline)). (elf_machine_rela_relative): Add sanity checks, remove IPLT processing, print error message in default case. Use __attribute__((always_inline)). (elf_machine_lazy_rel): Use __attribute__((always_inline)). --- sysdeps/hppa/dl-machine.h | 575 +++++++++++++++++++++----------------- 1 file changed, 320 insertions(+), 255 deletions(-) diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h index cd180e7f76..bc9ed107b8 100644 --- a/sysdeps/hppa/dl-machine.h +++ b/sysdeps/hppa/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. PA-RISC version. - Copyright (C) 1995-1997,1999,2000,2001,2002, 2003 + Copyright (C) 1995-1997,1999-2003 Free Software Foundation, Inc. Contributed by David Huggins-Daines This file is part of the GNU C Library. @@ -25,40 +25,52 @@ #define ELF_MACHINE_NAME "hppa" #include +#include #include #include -#include - -/* These must match the definition of the stub in bfd/elf32-hppa.c. */ -#define SIZEOF_PLT_STUB (4*4) +#include +#include +#include + +# define VALID_ELF_OSABI(osabi) ((osabi == ELFOSABI_SYSV) || (osabi == ELFOSABI_LINUX)) +# define VALID_ELF_ABIVERSION(ver) (ver == 0) +# define VALID_ELF_HEADER(hdr,exp,size) \ + memcmp (hdr,exp,size-2) == 0 \ + && VALID_ELF_OSABI (hdr[EI_OSABI]) \ + && VALID_ELF_ABIVERSION (hdr[EI_ABIVERSION]) + +/* These two definitions must match the definition of the stub in + bfd/elf32-hppa.c (see plt_stub[]). + + a. Define the size of the *entire* stub we place at the end of the PLT + table (right up against the GOT). + + b. Define the number of bytes back from the GOT to the entry point of + the PLT stub. You see the PLT stub must be entered in the middle + so it can depwi to find it's own address (long jump stub) + + c. Define the size of a single PLT entry so we can jump over the + last entry to get the stub address */ + +#define SIZEOF_PLT_STUB (7*4) #define GOT_FROM_PLT_STUB (4*4) +#define PLT_ENTRY_SIZE (2*4) -/* A PLABEL is a function descriptor. Properly they consist of just - FUNC and GP. But we want to traverse a binary tree too. See - dl-fptr.c for the code (it may be made common between HPPA and - IA-64 in the future). - - We call these 'fptr' to make it easier to steal code from IA-64. */ - -/* ld.so currently has 12 PLABEL32 relocs. We'll keep this constant - large for now in case we require more, as the rest of these will be - used by the dynamic program itself (libc.so has quite a few - PLABEL32 relocs in it). */ -#define HPPA_BOOT_FPTR_SIZE 256 - -struct hppa_fptr +/* Initialize the function descriptor table before relocations */ +static inline void +__hppa_init_bootstrap_fdesc_table (struct link_map *map) { - Elf32_Addr func; - Elf32_Addr gp; - struct hppa_fptr *next; -}; + ElfW(Addr) *boot_table; + + /* Careful: this will be called before got has been relocated... */ + ELF_MACHINE_LOAD_ADDRESS(boot_table,_dl_boot_fptr_table); -extern struct hppa_fptr __boot_ldso_fptr[]; -extern struct hppa_fptr *__fptr_root; -extern int __fptr_count; + map->l_mach.fptr_table_len = ELF_MACHINE_BOOT_FPTR_TABLE_LEN; + map->l_mach.fptr_table = boot_table; +} -extern Elf32_Addr __hppa_make_fptr (const struct link_map *, Elf32_Addr, - struct hppa_fptr **, struct hppa_fptr *); +#define ELF_MACHINE_BEFORE_RTLD_RELOC(dynamic_info) \ + __hppa_init_bootstrap_fdesc_table (&bootstrap_map); /* Return nonzero iff ELF header is compatible with the running host. */ static inline int @@ -67,55 +79,52 @@ elf_machine_matches_host (const Elf32_Ehdr *ehdr) return ehdr->e_machine == EM_PARISC; } - /* Return the link-time address of _DYNAMIC. */ +static inline Elf32_Addr +elf_machine_dynamic (void) __attribute__ ((const)); + static inline Elf32_Addr elf_machine_dynamic (void) { Elf32_Addr dynamic; -#if 0 - /* Use this method if GOT address not yet set up. */ - asm ( -" b,l 1f,%0\n" + asm ("b,l 1f,%0\n" " depi 0,31,2,%0\n" "1: addil L'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 8),%0\n" " ldw R'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 12)(%%r1),%0\n" - : "=r" (dynamic) : : "r1"); -#else - /* This works because we already have our GOT address available. */ - dynamic = (Elf32_Addr) &_DYNAMIC; -#endif + : "=r" (dynamic) : : "r1"); return dynamic; } /* Return the run-time load address of the shared object. */ +static inline Elf32_Addr +elf_machine_load_address (void) __attribute__ ((const)); + static inline Elf32_Addr elf_machine_load_address (void) { - Elf32_Addr dynamic, dynamic_linkaddress; + Elf32_Addr dynamic; asm ( " b,l 1f,%0\n" " depi 0,31,2,%0\n" "1: addil L'_DYNAMIC - ($PIC_pcrel$0 - 8),%0\n" -" ldo R'_DYNAMIC - ($PIC_pcrel$0 - 12)(%%r1),%1\n" -" addil L'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 16),%0\n" -" ldw R'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 20)(%%r1),%0\n" - : "=r" (dynamic_linkaddress), "=r" (dynamic) : : "r1"); +" ldo R'_DYNAMIC - ($PIC_pcrel$0 - 12)(%%r1),%0\n" + : "=r" (dynamic) : : "r1"); - return dynamic - dynamic_linkaddress; + return dynamic - elf_machine_dynamic (); } -/* Fixup a PLT entry to bounce directly to the function at VALUE. */ +/* Fixup a PLT entry to bounce directly to the function at VALUE. + Optimized non-profile version. */ static inline Elf32_Addr elf_machine_fixup_plt (struct link_map *map, lookup_t t, const Elf32_Rela *reloc, Elf32_Addr *reloc_addr, Elf32_Addr value) { - /* l is the link_map for the caller, t is the link_map for the object - * being called */ + /* map is the link_map for the caller, t is the link_map for the object + being called */ reloc_addr[1] = D_PTR (t, l_info[DT_PLTGOT]); reloc_addr[0] = value; /* Return the PLT slot rather than the function value so that the @@ -123,6 +132,20 @@ elf_machine_fixup_plt (struct link_map *map, lookup_t t, return (Elf32_Addr) reloc_addr; } +/* Fixup a PLT entry to bounce directly to the function at VALUE. */ +#define ELF_MACHINE_PROFILE_FIXUP_PLT elf_machine_profile_fixup_plt +static inline Elf32_Addr +elf_machine_profile_fixup_plt (struct link_map *map, lookup_t t, + const Elf32_Rela *reloc, + Elf32_Addr *reloc_addr, Elf32_Addr value) +{ + if(__builtin_expect (t == NULL, 1)) + return (Elf32_Addr) reloc_addr; + /* Return the PLT slot rather than the function value so that the + trampoline can load the new LTP. */ + return (Elf32_Addr) elf_machine_fixup_plt(map, t, reloc, reloc_addr, value); +} + /* Return the final value of a plt relocation. */ static inline Elf32_Addr elf_machine_plt_value (struct link_map *map, const Elf32_Rela *reloc, @@ -138,110 +161,158 @@ elf_machine_plt_value (struct link_map *map, const Elf32_Rela *reloc, static inline int elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) { + Elf32_Addr *got = NULL; + Elf32_Addr l_addr, iplt, jmprel, end_jmprel, r_type, r_sym; + const Elf32_Rela *reloc; + struct fdesc *fptr; + static union { + unsigned char c[8]; + Elf32_Addr i[2]; + } sig = {{0x00,0xc0,0xff,0xee, 0xde,0xad,0xbe,0xef}}; + + /* If we don't have a PLT we can just skip all this... */ + if (__builtin_expect (l->l_info[DT_JMPREL] == NULL,0)) + return lazy; + + /* All paths use these values */ + l_addr = l->l_addr; + jmprel = D_PTR(l, l_info[DT_JMPREL]); + end_jmprel = jmprel + l->l_info[DT_PLTRELSZ]->d_un.d_val; + extern void _dl_runtime_resolve (void); extern void _dl_runtime_profile (void); - Elf32_Addr jmprel = D_PTR(l, l_info[DT_JMPREL]); - - if (lazy && jmprel) + + /* Linking lazily */ + if (lazy) { - Elf32_Addr *got = NULL; - Elf32_Addr l_addr; - Elf32_Addr end_jmprel; - Elf32_Addr iplt; - - /* Relocate all the PLT slots. */ - l_addr = l->l_addr; - end_jmprel = jmprel + l->l_info[DT_PLTRELSZ]->d_un.d_val; + /* FIXME: Search for the got, but backwards through the relocs, technically we should + find it on the first try. However, assuming the relocs got out of order the + routine is made a bit more robust by searching them all in case of failure. */ + for (iplt = (end_jmprel - sizeof(Elf32_Rela)); iplt >= jmprel; iplt -= sizeof (Elf32_Rela)) + { + + reloc = (const Elf32_Rela *) iplt; + r_type = ELF32_R_TYPE (reloc->r_info); + r_sym = ELF32_R_SYM (reloc->r_info); + + got = (Elf32_Addr *) (reloc->r_offset + l_addr + PLT_ENTRY_SIZE + SIZEOF_PLT_STUB); + + /* If we aren't an IPLT, and we aren't NONE then it's a bad reloc */ + if (__builtin_expect (r_type != R_PARISC_IPLT, 0)) + { + if (__builtin_expect (r_type != R_PARISC_NONE, 0)) + _dl_reloc_bad_type (l, r_type, 1); + continue; + } + + /* Check for the plt_stub that binutils placed here for us + to use with _dl_runtime_resolve */ + if (got[-2] != sig.i[0] || got[-1] != sig.i[1]) + { + got = NULL; /* Not the stub... keep looking */ + } + else + { + /* Found the GOT! */ + register Elf32_Addr ltp __asm__ ("%r19"); + /* Identify this shared object. */ + got[1] = (Elf32_Addr) l; + + /* This function will be called to perform the relocation. */ + if (__builtin_expect (!profile, 1)) + { + /* If a static application called us, then _dl_runtime_resolve is not + a function descriptor, but the *real* address of the function... */ + if((unsigned long) &_dl_runtime_resolve & 3) + { + got[-2] = (Elf32_Addr) ((struct fdesc *) + ((unsigned long) &_dl_runtime_resolve & ~3))->ip; + } + else + { + /* Static executable! */ + got[-2] = (Elf32_Addr) &_dl_runtime_resolve; + } + } + else + { + if (_dl_name_match_p (GLRO(dl_profile), l)) + { + /* This is the object we are looking for. Say that + we really want profiling and the timers are + started. */ + GL(dl_profile_map) = l; + } + + if((unsigned long) &_dl_runtime_resolve & 3) + { + got[-2] = (Elf32_Addr) ((struct fdesc *) + ((unsigned long) &_dl_runtime_profile & ~3))->ip; + } + else + { + /* Static executable */ + got[-2] = (Elf32_Addr) &_dl_runtime_profile; + } + } + /* Plunk in the gp of this function descriptor so we + can make the call to _dl_runtime_xxxxxx */ + got[-1] = ltp; + break; + /* Done looking for the GOT, and stub is setup */ + } /* else we found the GOT */ + } /* for, walk the relocs backwards */ + + if(!got) + return 0; /* No lazy linking for you! */ + + /* Process all the relocs, now that we know the GOT... */ for (iplt = jmprel; iplt < end_jmprel; iplt += sizeof (Elf32_Rela)) { - const Elf32_Rela *reloc; - Elf32_Word r_type; - Elf32_Word r_sym; - struct hppa_fptr *fptr; - reloc = (const Elf32_Rela *) iplt; r_type = ELF32_R_TYPE (reloc->r_info); r_sym = ELF32_R_SYM (reloc->r_info); if (__builtin_expect (r_type == R_PARISC_IPLT, 1)) { - fptr = (struct hppa_fptr *) (reloc->r_offset + l_addr); + fptr = (struct fdesc *) (reloc->r_offset + l_addr); if (r_sym != 0) { /* Relocate the pointer to the stub. */ - fptr->func += l_addr; + fptr->ip = (Elf32_Addr) got - GOT_FROM_PLT_STUB; + /* Instead of the LTP value, we put the reloc offset here. The trampoline code will load the proper LTP and pass the reloc offset to the fixup function. */ fptr->gp = iplt - jmprel; - if (!got) - { - static union { - unsigned char c[8]; - Elf32_Addr i[2]; - } sig = {{0x00,0xc0,0xff,0xee, 0xde,0xad,0xbe,0xef}}; - - /* Find our .got section. It's right after the - stub. */ - got = (Elf32_Addr *) (fptr->func + GOT_FROM_PLT_STUB); - - /* Sanity check to see if the address we are - going to check below is within a reasonable - approximation of the bounds of the PLT (or, - at least, is at an address that won't fault - on read). Then check for the magic signature - above. */ - if (fptr->func < (Elf32_Addr) fptr + sizeof(*fptr)) - return 0; - if (fptr->func > - ((Elf32_Addr) fptr - + SIZEOF_PLT_STUB - + ((l->l_info[DT_PLTRELSZ]->d_un.d_val / sizeof (Elf32_Rela)) - * 8))) - return 0; - if (got[-2] != sig.i[0] || got[-1] != sig.i[1]) - return 0; /* No lazy linking for you! */ - } - } + } /* r_sym != 0 */ else { /* Relocate this *ABS* entry. */ - fptr->func = reloc->r_addend + l_addr; + fptr->ip = reloc->r_addend + l_addr; fptr->gp = D_PTR (l, l_info[DT_PLTGOT]); } - } - else if (__builtin_expect (r_type != R_PARISC_NONE, 0)) - _dl_reloc_bad_type (l, r_type, 1); - } - - if (got) - { - register Elf32_Addr ltp __asm__ ("%r19"); - /* Identify this shared object. */ - got[1] = (Elf32_Addr) l; - - /* This function will be called to perform the relocation. */ - if (__builtin_expect (!profile, 1)) - got[-2] = - (Elf32_Addr) ((struct hppa_fptr *) - ((unsigned long) &_dl_runtime_resolve & ~3))->func; - else - { - if (_dl_name_match_p (GL(dl_profile), l)) - { - /* This is the object we are looking for. Say that - we really want profiling and the timers are - started. */ - GL(dl_profile_map) = l; - } - got[-2] = - (Elf32_Addr) ((struct hppa_fptr *) - ((unsigned long) &_dl_runtime_profile & ~3))->func; - } - got[-1] = ltp; - } - } + } /* r_type == R_PARISC_IPLT */ + } /* for all the relocations */ + } /* if lazy */ + else + { + for (iplt = jmprel; iplt < end_jmprel; iplt += sizeof (Elf32_Rela)) + { + reloc = (const Elf32_Rela *) iplt; + r_type = ELF32_R_TYPE (reloc->r_info); + r_sym = ELF32_R_SYM (reloc->r_info); + + if (__builtin_expect ((r_type == R_PARISC_IPLT) && (r_sym == 0), 1)) + { + fptr = (struct fdesc *) (reloc->r_offset + l_addr); + /* Relocate this *ABS* entry, set only the gp, the rest is set later + when elf_machine_rela_relative is called (WITHOUT the linkmap) */ + fptr->gp = D_PTR (l, l_info[DT_PLTGOT]); + } /* r_type == R_PARISC_IPLT */ + } /* for all the relocations */ + } return lazy; } @@ -251,7 +322,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) #define RTLD_START \ /* Set up dp for any non-PIC lib constructors that may be called. */ \ -static struct link_map * \ +static struct link_map * __attribute__((used)) \ set_dp (struct link_map *map) \ { \ register Elf32_Addr dp asm ("%r27"); \ @@ -272,22 +343,24 @@ asm ( \ " stw %r25,-40(%sp)\n" /* argc */ \ " stw %r24,-44(%sp)\n" /* argv */ \ \ - /* We need the LTP, and we need it now. */ \ - /* $PIC_pcrel$0 points 8 bytes past the current instruction, \ - just like a branch reloc. This sequence gets us the runtime \ - address of _DYNAMIC. */ \ + /* We need the LTP, and we need it now. \ + $PIC_pcrel$0 points 8 bytes past the current instruction, \ + just like a branch reloc. This sequence gets us the \ + runtime address of _DYNAMIC. */ \ " bl 0f,%r19\n" \ " depi 0,31,2,%r19\n" /* clear priviledge bits */ \ "0: addil L'_DYNAMIC - ($PIC_pcrel$0 - 8),%r19\n" \ " ldo R'_DYNAMIC - ($PIC_pcrel$0 - 12)(%r1),%r26\n" \ \ - /* Also get the link time address from the first entry of the GOT. */ \ + /* The link time address is stored in the first entry of the \ + GOT. */ \ " addil L'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 16),%r19\n" \ " ldw R'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 20)(%r1),%r20\n" \ \ " sub %r26,%r20,%r20\n" /* Calculate load offset */ \ \ - /* Rummage through the dynamic entries, looking for DT_PLTGOT. */ \ + /* Rummage through the dynamic entries, looking for \ + DT_PLTGOT. */ \ " ldw,ma 8(%r26),%r19\n" \ "1: cmpib,=,n 3,%r19,2f\n" /* tag == DT_PLTGOT? */ \ " cmpib,<>,n 0,%r19,1b\n" \ @@ -307,8 +380,8 @@ asm ( \ | 32 bytes of magic | \ |---------------------------------| \ | 32 bytes argument/sp save area | \ - |---------------------------------| ((current->mm->env_end) + 63 & ~63) \ - | N bytes of slack | \ + |---------------------------------| ((current->mm->env_end) \ + | N bytes of slack | + 63 & ~63) \ |---------------------------------| \ | envvar and arg strings | \ |---------------------------------| \ @@ -354,7 +427,7 @@ asm ( \ " ldw 0(%r20),%r20\n" \ \ " ldw -40(%sp),%r25\n" /* argc */ \ -" comib,= 0,%r20,.Lnofix\n" /* FIXME: will be mispredicted */ \ +" comib,= 0,%r20,.Lnofix\n" /* FIXME: Mispredicted branch */\ " ldw -44(%sp),%r24\n" /* argv (delay slot) */ \ \ " sub %r25,%r20,%r25\n" \ @@ -376,7 +449,7 @@ asm ( \ " bl _dl_init_internal,%r2\n" \ " ldo 4(%r23),%r23\n" /* delay slot */ \ \ - /* Reload argc, argv to the registers start.S expects them in (feh) */ \ + /* Reload argc, argv to the registers start.S expects. */ \ " ldw -40(%sp),%r25\n" \ " ldw -44(%sp),%r24\n" \ \ @@ -388,8 +461,8 @@ asm ( \ " .word 0xdeadbeef\n" \ " .previous\n" \ \ - /* %r3 contains a function pointer, we need to mask out the lower \ - * bits and load the gp and jump address. */ \ + /* %r3 contains a function pointer, we need to mask out the \ + lower bits and load the gp and jump address. */ \ " depi 0,31,2,%r3\n" \ " ldw 0(%r3),%r2\n" \ " addil LT'__dl_fini_plabel,%r19\n" \ @@ -404,46 +477,57 @@ asm ( \ /* This code gets called via the .plt stub, and is used in dl-runtime.c to call the `fixup' function and then redirect to the address it returns. + + WARNING: This template is also used by gcc's __cffc, and expects + that the "bl" for fixup() exist at a particular offset. + Do not change this template without changing gcc, while the prefix + "bl" should fix everything so gcc finds the right spot, it will + slow down __cffc when it attempts to call fixup to resolve function + descriptor references. Please refer to gcc/gcc/config/pa/fptr.c + Enter with r19 = reloc offset, r20 = got-8, r21 = fixup ltp. */ -#define TRAMPOLINE_TEMPLATE(tramp_name, fixup_name) \ - extern void tramp_name (void); \ - asm ( "\ - /* Trampoline for " #tramp_name " */ \n\ - .globl " #tramp_name " \n\ - .type " #tramp_name ",@function \n\ -" #tramp_name ": \n\ - /* Save return pointer */ \n\ - stw %r2,-20(%sp) \n\ - /* Save argument registers in the call stack frame. */ \n\ - stw %r26,-36(%sp) \n\ - stw %r25,-40(%sp) \n\ - stw %r24,-44(%sp) \n\ - stw %r23,-48(%sp) \n\ - /* Build a call frame. */ \n\ - stwm %sp,64(%sp) \n\ - \n\ - /* Set up args to fixup func. */ \n\ - ldw 8+4(%r20),%r26 /* got[1] == struct link_map * */ \n\ - copy %r19,%r25 /* reloc offset */ \n\ - \n\ - /* Call the real address resolver. */ \n\ - bl " #fixup_name ",%r2 \n\ - copy %r21,%r19 /* delay slot, set fixup func ltp */ \n\ - \n\ - ldwm -64(%sp),%sp \n\ - /* Arguments. */ \n\ - ldw -36(%sp),%r26 \n\ - ldw -40(%sp),%r25 \n\ - ldw -44(%sp),%r24 \n\ - ldw -48(%sp),%r23 \n\ - /* Return pointer. */ \n\ - ldw -20(%sp),%r2 \n\ - /* Call the real function. */ \n\ - ldw 0(%r28),%r22 \n\ - bv %r0(%r22) \n\ - ldw 4(%r28),%r19 \n\ -"); - +#define TRAMPOLINE_TEMPLATE(tramp_name, fixup_name) \ + extern void tramp_name (void); \ + asm ( \ + " .text\n" \ + /* FAKE bl to provide gcc's __cffc with fixup's address */ \ + " bl " #fixup_name ",%r2\n" /* Runtime address of fixup */ \ + " .globl " #tramp_name "\n" \ + " .type " #tramp_name ",@function\n" \ + #tramp_name ":\n" \ + /* Save return pointer */ \ + " stw %r2,-20(%sp)\n" \ + /* Save argument registers in the call stack frame. */ \ + " stw %r26,-36(%sp)\n" \ + " stw %r25,-40(%sp)\n" \ + " stw %r24,-44(%sp)\n" \ + " stw %r23,-48(%sp)\n" \ + /* Build a call frame, and save structure pointer. */ \ + " stwm %r28,64(%sp)\n" \ + \ + /* Set up args to fixup func. */ \ + " ldw 8+4(%r20),%r26\n" /* (1) got[1] == struct link_map */ \ + " copy %r19,%r25\n" /* (2) reloc offset */ \ + " copy %r2,%r24\n" /* (3) profile_fixup needs rp */ \ + \ + /* Call the real address resolver. */ \ + " bl " #fixup_name ",%r2\n" \ + " copy %r21,%r19\n" /* set fixup func ltp (DELAY SLOT)*/ \ + \ + " ldw 0(%r28),%r22\n" /* load up the returned func ptr */ \ + " ldw 4(%r28),%r19\n" \ + " ldwm -64(%sp),%r28\n" \ + /* Arguments. */ \ + " ldw -36(%sp),%r26\n" \ + " ldw -40(%sp),%r25\n" \ + " ldw -44(%sp),%r24\n" \ + " ldw -48(%sp),%r23\n" \ + /* Call the real function. */ \ + " bv %r0(%r22)\n" \ + /* Return pointer. */ \ + " ldw -20(%sp),%r2\n" \ + ); + #ifndef PROF #define ELF_MACHINE_RUNTIME_TRAMPOLINE \ TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup); \ @@ -454,7 +538,6 @@ asm ( \ strong_alias (_dl_runtime_resolve, _dl_runtime_profile); #endif - /* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so PLT entries should not be allowed to define the value. ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one @@ -464,22 +547,35 @@ asm ( \ * ELF_RTYPE_CLASS_PLT) \ | (((type) == R_PARISC_COPY) * ELF_RTYPE_CLASS_COPY)) -/* Used by ld.so for ... something ... */ +/* Used by the runtime in fixup to figure out if reloc is *really* PLT */ #define ELF_MACHINE_JMP_SLOT R_PARISC_IPLT +#define ELF_MACHINE_SIZEOF_JMP_SLOT PLT_ENTRY_SIZE /* We only use RELA. */ #define ELF_MACHINE_NO_REL 1 /* Return the address of the entry point. */ #define ELF_MACHINE_START_ADDRESS(map, start) \ - DL_FUNCTION_ADDRESS (map, start) + DL_STATIC_FUNCTION_ADDRESS (map, start) + +/* We define an initialization functions. This is called very early in + * _dl_sysdep_start. */ +#define DL_PLATFORM_INIT dl_platform_init () +static inline void __attribute__ ((unused)) +dl_platform_init (void) +{ + if (GLRO(dl_platform) != NULL && *GLRO(dl_platform) == '\0') + /* Avoid an empty string which would disturb us. */ + GLRO(dl_platform) = NULL; +} + #endif /* !dl_machine_h */ /* These are only actually used where RESOLVE_MAP is defined, anyway. */ #ifdef RESOLVE_MAP -static inline void +auto void __attribute__((always_inline)) elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, const Elf32_Sym *sym, const struct r_found_version *version, void *const reloc_addr_arg) @@ -490,14 +586,14 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, struct link_map *sym_map; Elf32_Addr value; -#if !defined RTLD_BOOTSTRAP && !defined SHARED +# if !defined RTLD_BOOTSTRAP && !defined SHARED /* This is defined in rtld.c, but nowhere in the static libc.a; make the reference weak so static programs can still link. This declaration cannot be done when compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP) because rtld.c contains the common defn for _dl_rtld_map, which is incompatible with a weak decl in the same file. */ weak_extern (GL(dl_rtld_map)); -#endif +# endif /* RESOLVE_MAP will return a null value for undefined syms, and non-null for all other syms. In particular, relocs with no @@ -505,13 +601,13 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, resolved to MAP. (The first entry in a symbol table is all zeros, and an all zero Elf32_Sym has a binding of STB_LOCAL.) See RESOLVE_MAP definition in elf/dl-reloc.c */ -#ifdef RTLD_BOOTSTRAP +# ifdef RTLD_BOOTSTRAP /* RESOLVE_MAP in rtld.c doesn't have the local sym test. */ sym_map = (ELF32_ST_BIND (sym->st_info) != STB_LOCAL ? RESOLVE_MAP (&sym, version, r_type) : map); -#else +# else sym_map = RESOLVE_MAP (&sym, version, r_type); -#endif +# endif if (sym_map) { value = sym ? sym_map->l_addr + sym->st_value : 0; @@ -523,15 +619,6 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, switch (r_type) { case R_PARISC_DIR32: -#ifndef RTLD_BOOTSTRAP - /* All hell breaks loose if we try to relocate these twice, - because any initialized variables in ld.so that refer to - other ones will have their values reset. In particular, - __fptr_next will be reset, sometimes causing endless loops in - __hppa_make_fptr(). So don't do that. */ - if (map == &GL(dl_rtld_map)) - return; -#endif /* .eh_frame can have unaligned relocs. */ if ((unsigned long) reloc_addr_arg & 3) { @@ -552,51 +639,26 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, if (sym == NULL || sym_map == NULL || ELF32_ST_BIND (sym->st_info) == STB_LOCAL) - break; - - /* Okay, we need to make ourselves a PLABEL then. See the IA64 - code for an explanation of how this works. */ -#ifndef RTLD_BOOTSTRAP - value = __hppa_make_fptr (sym_map, value, &__fptr_root, NULL); -#else - { - struct hppa_fptr *p_boot_ldso_fptr; - struct hppa_fptr **p_fptr_root; - int *p_fptr_count; - unsigned long dot; - - /* Go from the top of __boot_ldso_fptr. As on IA64, we - probably haven't relocated the necessary values by this - point so we have to find them ourselves. */ - - asm ("bl 0f,%0 \n\ - depi 0,31,2,%0 \n\ -0: addil L'__boot_ldso_fptr - ($PIC_pcrel$0 - 8),%0 \n\ - ldo R'__boot_ldso_fptr - ($PIC_pcrel$0 - 12)(%%r1),%1 \n\ - addil L'__fptr_root - ($PIC_pcrel$0 - 16),%0 \n\ - ldo R'__fptr_root - ($PIC_pcrel$0 - 20)(%%r1),%2 \n\ - addil L'__fptr_count - ($PIC_pcrel$0 - 24),%0 \n\ - ldo R'__fptr_count - ($PIC_pcrel$0 - 28)(%%r1),%3" - : - "=r" (dot), - "=r" (p_boot_ldso_fptr), - "=r" (p_fptr_root), - "=r" (p_fptr_count)); - - value = __hppa_make_fptr (sym_map, value, p_fptr_root, - &p_boot_ldso_fptr[--*p_fptr_count]); - } -#endif + { + break; + } + /* Set bit 30 to indicate to $$dyncall that this is a PLABEL. + We have to do this outside of the generic function descriptor + code, since it doesn't know about our requirement for setting + protection bits */ + value = (Elf32_Addr)((unsigned int)_dl_make_fptr (sym_map, sym, value) | 2); break; case R_PARISC_IPLT: if (__builtin_expect (sym_map != NULL, 1)) - elf_machine_fixup_plt (NULL, sym_map, reloc, reloc_addr, value); - else - { + { + elf_machine_fixup_plt (NULL, sym_map, reloc, reloc_addr, value); + } + else + { /* If we get here, it's a (weak) undefined sym. */ elf_machine_fixup_plt (NULL, map, reloc, reloc_addr, value); - } + } return; case R_PARISC_COPY: @@ -606,20 +668,20 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, break; if (__builtin_expect (sym->st_size > refsym->st_size, 0) || (__builtin_expect (sym->st_size < refsym->st_size, 0) - && __builtin_expect (GL(dl_verbose), 0))) + && __builtin_expect (GLRO(dl_verbose), 0))) { const char *strtab; strtab = (const char *) D_PTR (map, l_info[DT_STRTAB]); - _dl_error_printf ("\ -%s: Symbol `%s' has different size in shared object, consider re-linking\n", + _dl_error_printf ("%s: Symbol `%s' has different size in shared object, " + "consider re-linking\n", rtld_progname ?: "", strtab + refsym->st_name); } memcpy (reloc_addr_arg, (void *) value, MIN (sym->st_size, refsym->st_size)); return; - + case R_PARISC_NONE: /* Alright, Wilbur. */ return; @@ -630,25 +692,27 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, *reloc_addr = value; } -#define DO_ELF_MACHINE_REL_RELATIVE(map, l_addr, relative) \ - elf_machine_rel_relative (map, l_addr, relative, \ - (void *) (l_addr + relative->r_offset)) - /* hppa doesn't have an R_PARISC_RELATIVE reloc, but uses relocs with ELF32_R_SYM (info) == 0 for a similar purpose. */ -static inline void -elf_machine_rela_relative (struct link_map *map, Elf32_Addr l_addr, +auto void __attribute__((always_inline)) +elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, void *const reloc_addr_arg) { - Elf32_Addr *const reloc_addr = reloc_addr_arg; unsigned long const r_type = ELF32_R_TYPE (reloc->r_info); + Elf32_Addr *const reloc_addr = reloc_addr_arg; + static char msgbuf[] = { "Unknown" }; + struct link_map map; Elf32_Addr value; value = l_addr + reloc->r_addend; - if (ELF32_R_SYM (reloc->r_info) != 0) - asm volatile ("iitlbp %r0,(%r0)"); /* Crash. */ + if (ELF32_R_SYM (reloc->r_info) != 0){ + _dl_error_printf ("%s: In elf_machine_rela_relative " + "ELF32_R_SYM (reloc->r_info) != 0. Aborting.", + rtld_progname ?: ""); + ABORT_INSTRUCTION; /* Crash. */ + } switch (r_type) { @@ -668,21 +732,22 @@ elf_machine_rela_relative (struct link_map *map, Elf32_Addr l_addr, case R_PARISC_PLABEL32: break; - case R_PARISC_IPLT: - elf_machine_fixup_plt (NULL, map, reloc, reloc_addr, value); - return; + case R_PARISC_IPLT: /* elf_machine_runtime_setup already set gp */ + break; case R_PARISC_NONE: return; - default: - _dl_reloc_bad_type (map, r_type, 0); + default: /* Bad reloc, map unknown (really it's the current map) */ + map.l_name = msgbuf; + _dl_reloc_bad_type (&map, r_type, 0); + return; } *reloc_addr = value; } -static inline void +auto void __attribute__((always_inline)) elf_machine_lazy_rel (struct link_map *map, Elf32_Addr l_addr, const Elf32_Rela *reloc) { From 660404d72bcc5ed7fc963f7e33fc55a0e52c782f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 17 Apr 2004 22:54:23 +0000 Subject: [PATCH 3293/4487] Dynamic linking definitions for HPPA. --- sysdeps/hppa/bits/link.h | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sysdeps/hppa/bits/link.h diff --git a/sysdeps/hppa/bits/link.h b/sysdeps/hppa/bits/link.h new file mode 100644 index 0000000000..54842b2299 --- /dev/null +++ b/sysdeps/hppa/bits/link.h @@ -0,0 +1,6 @@ +/* Used to store the function descriptor table */ +struct link_map_machine + { + size_t fptr_table_len; + ElfW(Addr) *fptr_table; + }; From ce0cf67279c7b60a019caeccb0c7b19886cf58fb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 17 Apr 2004 22:55:20 +0000 Subject: [PATCH 3294/4487] Add bits/link.h elf/entry.h. --- sysdeps/hppa/Dist | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/hppa/Dist b/sysdeps/hppa/Dist index e26e411bc5..5a0df47c68 100644 --- a/sysdeps/hppa/Dist +++ b/sysdeps/hppa/Dist @@ -1,3 +1,5 @@ libgcc-compat.c dl-symaddr.c dl-fptr.c +bits/link.h +elf/entry.h From 7c1ebdffa635c1e83bea0b51b1135c8535e40989 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 17 Apr 2004 23:06:39 +0000 Subject: [PATCH 3295/4487] (SEM_VALUE_MAX): Jusr use a plain number. --- sysdeps/unix/sysv/linux/alpha/nptl/bits/semaphore.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/semaphore.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/semaphore.h index 65298fae48..6dadfda206 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/bits/semaphore.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/semaphore.h @@ -27,7 +27,7 @@ #define SEM_FAILED ((sem_t *) 0) /* Maximum value the semaphore can have. */ -#define SEM_VALUE_MAX ((int) ((~0u) >> 1)) +#define SEM_VALUE_MAX (2147483647) typedef union From e5931923b659ce18e191e455551c899859df341c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 19 Apr 2004 06:48:59 +0000 Subject: [PATCH 3296/4487] Entry point definition for hppa. --- sysdeps/hppa/elf/entry.h | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 sysdeps/hppa/elf/entry.h diff --git a/sysdeps/hppa/elf/entry.h b/sysdeps/hppa/elf/entry.h new file mode 100644 index 0000000000..b024db2be7 --- /dev/null +++ b/sysdeps/hppa/elf/entry.h @@ -0,0 +1,10 @@ +#ifndef __ASSEMBLY__ +extern void _start (void); +#endif + +/* The function's entry point is stored in the first word of the + function descriptor (plabel) of _start(). */ +#define ENTRY_POINT __canonicalize_funcptr_for_compare(_start) + +/* We have to provide a special declaration. */ +#define ENTRY_POINT_DECL(class) class void _start (void); From 50ce18cd245f66c3f4595f9df29b8dee64cf09d2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 19 Apr 2004 06:49:15 +0000 Subject: [PATCH 3297/4487] hppa specific part of profiling code. --- sysdeps/hppa/machine-gmon.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sysdeps/hppa/machine-gmon.h diff --git a/sysdeps/hppa/machine-gmon.h b/sysdeps/hppa/machine-gmon.h new file mode 100644 index 0000000000..3eeef67377 --- /dev/null +++ b/sysdeps/hppa/machine-gmon.h @@ -0,0 +1,25 @@ +/* Machine-specific calling sequence for `mcount' profiling function. PA-RISC + Copyright (C) 1995, 1996, 1997, 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 + 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. */ + +/* We can call _mcount directly since gcc supplies the correct + * arguments */ +#define _MCOUNT_DECL(from, self) \ + void _mcount (u_long from, u_long self) + +#define MCOUNT From 6fdde6b9d4ed5a51dc5e563873bf5e4df10de3a4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 19 Apr 2004 06:49:28 +0000 Subject: [PATCH 3298/4487] Don't use x86 version. --- sysdeps/unix/sysv/linux/hppa/profil-counter.h | 27 +++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/hppa/profil-counter.h b/sysdeps/unix/sysv/linux/hppa/profil-counter.h index 8a6a0bcf3d..b108be8a36 100644 --- a/sysdeps/unix/sysv/linux/hppa/profil-counter.h +++ b/sysdeps/unix/sysv/linux/hppa/profil-counter.h @@ -1,2 +1,25 @@ -/* We can use the ix86 version. */ -#include +/* Machine-dependent SIGPROF signal handler. PA-RISC version + Copyright (C) 1996, 1997, 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 + 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. */ + +static void +profil_counter (int signr, siginfo_t *si, struct ucontext *uctx) +{ + unsigned long ip = uctx->uc_mcontext.sc_iaoq[0] & ~0x3; + profil_count ((void *) ip); +} From 88aa65dae8eec5f3570763941548d8a87cffddd2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 22 Apr 2004 07:31:08 +0000 Subject: [PATCH 3299/4487] (elf_machine_rela): Don't use INTUSE when calling _dl_signal_error. (elf_machine_rel): Likewise. --- sysdeps/arm/dl-machine.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 25a8515dac..a131676d5a 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -507,9 +507,8 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, topbits = newvalue & 0xfe000000; if (topbits != 0xfe000000 && topbits != 0x00000000) { - INTUSE (_dl_signal_error) - (0, map->l_name, NULL, - "R_ARM_PC24 relocation out of range"); + _dl_signal_error (0, map->l_name, NULL, + "R_ARM_PC24 relocation out of range"); } } newvalue >>= 2; @@ -588,9 +587,8 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, topbits = newvalue & 0xfe000000; if (topbits != 0xfe000000 && topbits != 0x00000000) { - INTUSE (_dl_signal_error) - (0, map->l_name, NULL, - "R_ARM_PC24 relocation out of range"); + _dl_signal_error (0, map->l_name, NULL, + "R_ARM_PC24 relocation out of range"); } } newvalue >>= 2; From e52ded18095ec2f2ad513828c3cd7b815158d21a Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 23 Apr 2004 20:41:42 +0000 Subject: [PATCH 3300/4487] Use __attribute_used__. --- sysdeps/unix/sysv/linux/m68k/register-dump.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/m68k/register-dump.h b/sysdeps/unix/sysv/linux/m68k/register-dump.h index bece6d5084..a7ac3ca01c 100644 --- a/sysdeps/unix/sysv/linux/m68k/register-dump.h +++ b/sysdeps/unix/sysv/linux/m68k/register-dump.h @@ -1,5 +1,5 @@ /* Dump registers. - Copyright (C) 1998, 2002 Free Software Foundation, Inc. + Copyright (C) 1998, 2002, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab . @@ -48,7 +48,7 @@ /* static */ void catch_segfault (int, int, struct sigcontext *); /* Dummy function so that we can use asm with arguments. */ -static void __attribute__ ((unused)) +static void __attribute_used__ __dummy__ (void) { asm ("\n\ @@ -64,7 +64,7 @@ catch_segfault:\n\ : : "n" (offsetof (struct sigcontext, sc_fpstate))); } #define catch_segfault(a,b) \ - __attribute__ ((unused)) real_catch_segfault(a,b) + __attribute_used__ real_catch_segfault(a,b) static void hexvalue (unsigned long int value, char *buf, size_t len) From 08b55be5f90ae5ad6f77071e714b5c86f593de17 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 29 Apr 2004 20:06:49 +0000 Subject: [PATCH 3301/4487] 2004-04-29 Philip Blundell * sysdeps/arm/dl-machine.h (RTLD_START): Avoid unnecessary GOT entries. --- sysdeps/arm/dl-machine.h | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index a131676d5a..5dfe3346f5 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -255,26 +255,27 @@ _dl_runtime_profile:\n\ .globl _start\n\ .globl _dl_start_user\n\ _start:\n\ + @ we are PIC code, so get global offset table\n\ + ldr sl, .L_GET_GOT\n\ + @ See if we were run as a command with the executable file\n\ + @ name as an extra leading argument.\n\ + ldr r4, .L_SKIP_ARGS\n\ @ at start time, all the args are on the stack\n\ mov r0, sp\n\ bl _dl_start\n\ @ returns user entry point in r0\n\ _dl_start_user:\n\ - mov r6, r0\n\ - @ we are PIC code, so get global offset table\n\ - ldr sl, .L_GET_GOT\n\ add sl, pc, sl\n\ .L_GOT_GOT:\n\ - @ See if we were run as a command with the executable file\n\ - @ name as an extra leading argument.\n\ - ldr r4, .L_SKIP_ARGS\n\ ldr r4, [sl, r4]\n\ @ get the original arg count\n\ ldr r1, [sp]\n\ - @ subtract _dl_skip_args from it\n\ - sub r1, r1, r4\n\ - @ adjust the stack pointer to skip them\n\ + @ save the entry point in another register\n\ + mov r6, r0\n\ + @ adjust the stack pointer to skip the extra args\n\ add sp, sp, r4, lsl #2\n\ + @ subtract _dl_skip_args from original arg count\n\ + sub r1, r1, r4\n\ @ get the argv address\n\ add r2, sp, #4\n\ @ store the new argc in the new stack location\n\ @@ -286,29 +287,21 @@ _dl_start_user:\n\ @ now we call _dl_init\n\ ldr r0, .L_LOADED\n\ ldr r0, [sl, r0]\n\ - ldr r0, [r0]\n\ @ call _dl_init\n\ bl _dl_init_internal(PLT)\n\ - @ clear the startup flag\n\ - ldr r2, .L_STARTUP_FLAG\n\ - ldr r1, [sl, r2]\n\ - mov r0, #0\n\ - str r0, [r1]\n\ @ load the finalizer function\n\ ldr r0, .L_FINI_PROC\n\ - ldr r0, [sl, r0]\n\ + add r0, sl, r0\n\ @ jump to the user_s entry point\n\ mov pc, r6\n\ .L_GET_GOT:\n\ .word _GLOBAL_OFFSET_TABLE_ - .L_GOT_GOT - 4\n\ .L_SKIP_ARGS:\n\ .word _dl_skip_args(GOTOFF)\n\ -.L_STARTUP_FLAG:\n\ - .word _dl_starting_up(GOT)\n\ .L_FINI_PROC:\n\ - .word _dl_fini(GOT)\n\ + .word _dl_fini(GOTOFF)\n\ .L_LOADED:\n\ - .word _rtld_local(GOT)\n\ + .word _rtld_local(GOTOFF)\n\ .previous\n\ "); From b1225f7208bfaf42c26ac9f1ce4fc21b134eba53 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 3 May 2004 21:39:39 +0000 Subject: [PATCH 3302/4487] (F_SETOWN, F_GETOWN): Define if __USE_BSD or __USE_UNIX98. --- sysdeps/unix/bsd/sun/sunos4/bits/fcntl.h | 4 ++-- sysdeps/unix/bsd/ultrix4/bits/fcntl.h | 4 ++-- sysdeps/unix/sysv/aix/bits/fcntl.h | 4 ++-- sysdeps/unix/sysv/irix4/bits/fcntl.h | 4 +++- sysdeps/unix/sysv/linux/alpha/bits/fcntl.h | 4 ++-- sysdeps/unix/sysv/linux/arm/bits/fcntl.h | 4 ++-- sysdeps/unix/sysv/linux/cris/bits/fcntl.h | 5 +++-- sysdeps/unix/sysv/linux/hppa/bits/fcntl.h | 4 ++-- sysdeps/unix/sysv/linux/m68k/bits/fcntl.h | 4 ++-- sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 4 ++-- 10 files changed, 22 insertions(+), 19 deletions(-) diff --git a/sysdeps/unix/bsd/sun/sunos4/bits/fcntl.h b/sysdeps/unix/bsd/sun/sunos4/bits/fcntl.h index e09fa333e5..a30b352592 100644 --- a/sysdeps/unix/bsd/sun/sunos4/bits/fcntl.h +++ b/sysdeps/unix/bsd/sun/sunos4/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for SunOS 4. - Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc. + Copyright (C) 1991, 1992, 1997, 2004 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 @@ -86,7 +86,7 @@ #define F_SETFD 2 /* Set file descriptor flags. */ #define F_GETFL 3 /* Get file status flags. */ #define F_SETFL 4 /* Set file status flags. */ -#ifdef __USE_BSD +#if defined __USE_BSD || defined __USE_UNIX98 #define F_GETOWN 5 /* Get owner (receiver of SIGIO). */ #define F_SETOWN 6 /* Set owner (receiver of SIGIO). */ #endif diff --git a/sysdeps/unix/bsd/ultrix4/bits/fcntl.h b/sysdeps/unix/bsd/ultrix4/bits/fcntl.h index 9dbd7ba269..6392bc3415 100644 --- a/sysdeps/unix/bsd/ultrix4/bits/fcntl.h +++ b/sysdeps/unix/bsd/ultrix4/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Ultrix 4. - Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc. + Copyright (C) 1991, 1992, 1997, 2004 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 @@ -87,7 +87,7 @@ #define F_SETFD 2 /* Set file descriptor flags. */ #define F_GETFL 3 /* Get file status flags. */ #define F_SETFL 4 /* Set file status flags. */ -#ifdef __USE_BSD +#if defined __USE_BSD || defined __USE_UNIX98 #define F_GETOWN 5 /* Get owner (receiver of SIGIO). */ #define F_SETOWN 6 /* Set owner (receiver of SIGIO). */ #endif diff --git a/sysdeps/unix/sysv/aix/bits/fcntl.h b/sysdeps/unix/sysv/aix/bits/fcntl.h index 28a8fae0f2..c65b8beeb4 100644 --- a/sysdeps/unix/sysv/aix/bits/fcntl.h +++ b/sysdeps/unix/sysv/aix/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1995-1999, 2000, 2004 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 @@ -74,7 +74,7 @@ # define F_SETLKW64 13 /* Set record locking info (blocking). */ #endif -#if defined __USE_BSD || defined __USE_XOPEN2K +#if defined __USE_BSD || defined __USE_UNIX98 # define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */ # define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */ #endif diff --git a/sysdeps/unix/sysv/irix4/bits/fcntl.h b/sysdeps/unix/sysv/irix4/bits/fcntl.h index dcba25fbc8..5eb7c76eb7 100644 --- a/sysdeps/unix/sysv/irix4/bits/fcntl.h +++ b/sysdeps/unix/sysv/irix4/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for SGI Irix 4. - Copyright (C) 1994, 1997 Free Software Foundation, Inc. + Copyright (C) 1994, 1997, 2004 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 @@ -67,6 +67,8 @@ #define F_RGETLK 20 /* Get info on a remote lock. */ #define F_RSETLK 21 /* Set or unlock a remote lock. */ #define F_RSETLKW 22 /* Set or unlock a remote lock and wait. */ +#endif +#if defined __USE_BSD || defined __USE_UNIX98 #define F_GETOWN 10 /* Get owner; only works on sockets. */ #define F_SETOWN 11 /* Set owner; only works on sockets. */ #endif diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h index 7d1197a8ea..828cc75225 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1995-1999, 2000, 2004 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 @@ -75,7 +75,7 @@ #define F_SETLK64 F_SETLK /* Set record locking info (non-blocking). */ #define F_SETLKW64 F_SETLKW /* Set record locking info (blocking). */ -#if defined __USE_BSD || defined __USE_XOPEN2K +#if defined __USE_BSD || defined __USE_UNIX98 # define F_SETOWN 5 /* Get owner of socket (receiver of SIGIO). */ # define F_GETOWN 6 /* Set owner of socket (receiver of SIGIO). */ #endif diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h index ce17d68038..d050f7fbf7 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 1995-1998, 2000 Free Software Foundation, Inc. + Copyright (C) 1995-1998, 2000, 2004 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 @@ -79,7 +79,7 @@ #define F_SETLK64 13 /* Set record locking info (non-blocking). */ #define F_SETLKW64 14 /* Set record locking info (blocking). */ -#if defined __USE_BSD || defined __USE_XOPEN2K +#if defined __USE_BSD || defined __USE_UNIX98 # define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */ # define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */ #endif diff --git a/sysdeps/unix/sysv/linux/cris/bits/fcntl.h b/sysdeps/unix/sysv/linux/cris/bits/fcntl.h index 69ce6a506b..6abdd1d0b6 100644 --- a/sysdeps/unix/sysv/linux/cris/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/cris/bits/fcntl.h @@ -1,5 +1,6 @@ /* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001, 2004 + 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 @@ -78,7 +79,7 @@ #define F_SETLK64 13 /* Set record locking info (non-blocking). */ #define F_SETLKW64 14 /* Set record locking info (blocking). */ -#if defined __USE_BSD || defined __USE_XOPEN2K +#if defined __USE_BSD || defined __USE_UNIX98 # define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */ # define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */ #endif diff --git a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h index 6f13871d83..6cc96cf665 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux/HPPA. - Copyright (C) 1995,1996,1997,1998,1999,2000,2002 + Copyright (C) 1995,1996,1997,1998,1999,2000,2002,2004 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -78,7 +78,7 @@ #define F_SETLK64 9 /* Set record locking info (non-blocking). */ #define F_SETLKW64 10 /* Set record locking info (blocking). */ -#if defined __USE_BSD || defined __USE_XOPEN2K +#if defined __USE_BSD || defined __USE_UNIX98 # define F_GETOWN 11 /* Get owner of socket (receiver of SIGIO). */ # define F_SETOWN 12 /* Set owner of socket (receiver of SIGIO). */ #endif diff --git a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h index af7c0ea9ac..2e85d1e893 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright (C) 2000, 2004 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 @@ -78,7 +78,7 @@ #define F_SETLK64 13 /* Set record locking info (non-blocking). */ #define F_SETLKW64 14 /* Set record locking info (blocking). */ -#if defined __USE_BSD || defined __USE_XOPEN2K +#if defined __USE_BSD || defined __USE_UNIX98 # define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */ # define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */ #endif diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index 97e1867729..720e0a90e0 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2003 + Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -81,7 +81,7 @@ #define F_SETLK64 34 /* Set record locking info (non-blocking). */ #define F_SETLKW64 35 /* Set record locking info (blocking). */ -#if defined __USE_BSD || defined __USE_XOPEN2K +#if defined __USE_BSD || defined __USE_UNIX98 # define F_SETOWN 24 /* Get owner of socket (receiver of SIGIO). */ # define F_GETOWN 23 /* Set owner of socket (receiver of SIGIO). */ #endif From 272d8363ef5b72707b0aba603b8af4212d0ee63b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 5 May 2004 18:42:44 +0000 Subject: [PATCH 3303/4487] Not needed anymore. --- sysdeps/alpha/atomicity.h | 102 -------------------------------------- 1 file changed, 102 deletions(-) delete mode 100644 sysdeps/alpha/atomicity.h diff --git a/sysdeps/alpha/atomicity.h b/sysdeps/alpha/atomicity.h deleted file mode 100644 index 9388f2384a..0000000000 --- a/sysdeps/alpha/atomicity.h +++ /dev/null @@ -1,102 +0,0 @@ -/* Low-level functions for atomic operations. Alpha version. - Copyright (C) 1999 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 _ATOMICITY_H -#define _ATOMICITY_H 1 - -#include - - -static inline int -__attribute__ ((unused)) -exchange_and_add (volatile uint32_t *mem, int val) -{ - register int result, tmp; - - __asm__ __volatile__ ( - "/* Inline exchange & add */\n" - "1:\t" - "ldl_l %0,%3\n\t" - "addl %0,%4,%1\n\t" - "stl_c %1,%2\n\t" - "beq %1,2f\n" - ".subsection 1\n" - "2:\t" - "br 1b\n" - ".previous\n\t" - "mb\n\t" - "/* End exchange & add */" - : "=&r"(result), "=&r"(tmp), "=m"(*mem) - : "m" (*mem), "r"(val)); - - return result; -} - -static inline void -__attribute__ ((unused)) -atomic_add (volatile uint32_t *mem, int val) -{ - register int result; - - __asm__ __volatile__ ( - "/* Inline exchange & add */\n" - "1:\t" - "ldl_l %0,%2\n\t" - "addl %0,%3,%0\n\t" - "stl_c %0,%1\n\t" - "beq %0,2f\n\t" - ".subsection 1\n" - "2:\t" - "br 1b\n" - ".previous\n\t" - "mb\n\t" - "/* End exchange & add */" - : "=&r"(result), "=m"(*mem) - : "m" (*mem), "r"(val)); -} - -static inline long -__attribute__ ((unused)) -compare_and_swap (volatile long int *p, long int oldval, long int newval) -{ - long int ret; - - __asm__ __volatile__ ( - "/* Inline compare & swap */\n" - "1:\t" - "ldq_l %0,%4\n\t" - "cmpeq %0,%2,%0\n\t" - "beq %0,3f\n\t" - "mov %3,%0\n\t" - "stq_c %0,%1\n\t" - "beq %0,2f\n\t" - ".subsection 1\n" - "2:\t" - "br 1b\n" - ".previous\n\t" - "3:\t" - "mb\n\t" - "/* End compare & swap */" - : "=&r"(ret), "=m"(*p) - : "r"(oldval), "r"(newval), "m"(*p)); - - return ret; -} - -#endif /* atomicity.h */ From de47cb70128b878276e258864aa353504f21c0d6 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Thu, 6 May 2004 22:01:01 +0000 Subject: [PATCH 3304/4487] * sysdeps/alpha/div_libc.h (_ITOFS, _ITOFT, _FTOIT, _ITOFT2): New. * sysdeps/alpha/divl.S, sysdeps/alpha/divq.S, sysdeps/alpha/divqu.S, sysdeps/alpha/reml.S, sysdeps/alpha/remq.S, sysdeps/alpha/remqu.S: Use them. --- sysdeps/alpha/div_libc.h | 45 ++++++++++++++++++++++++++++++++++++++++ sysdeps/alpha/divl.S | 13 ++++-------- sysdeps/alpha/divq.S | 21 +++++++------------ sysdeps/alpha/divqu.S | 21 +++++++------------ sysdeps/alpha/reml.S | 11 ++-------- sysdeps/alpha/remq.S | 22 +++++++------------- sysdeps/alpha/remqu.S | 21 +++++++------------ 7 files changed, 81 insertions(+), 73 deletions(-) diff --git a/sysdeps/alpha/div_libc.h b/sysdeps/alpha/div_libc.h index 98566435ce..27209bd9fa 100644 --- a/sysdeps/alpha/div_libc.h +++ b/sysdeps/alpha/div_libc.h @@ -111,3 +111,48 @@ cfi_endproc .size DIVBYZERO, .-DIVBYZERO .endm + +/* Like the ev6 instructions, but fall back to stack use on prior machines. */ + + .arch ev6 + +.macro _ITOFS gr, fr, slot +#ifdef __alpha_fix__ + itofs \gr, \fr +#else + stl \gr, \slot($sp) + lds \fr, \slot($sp) +#endif +.endm + +.macro _ITOFT gr, fr, slot +#ifdef __alpha_fix__ + itoft \gr, \fr +#else + stq \gr, \slot($sp) + ldt \fr, \slot($sp) +#endif +.endm + +.macro _FTOIT fr, gr, slot +#ifdef __alpha_fix__ + ftoit \fr, \gr +#else + stt \fr, \slot($sp) + ldq \gr, \slot($sp) +#endif +.endm + +/* Similarly, but move two registers. Schedules better for pre-ev6. */ + +.macro _ITOFT2 gr1, fr1, slot1, gr2, fr2, slot2 +#ifdef __alpha_fix__ + itoft \gr1, \fr1 + itoft \gr2, \fr2 +#else + stq \gr1, \slot1($sp) + stq \gr2, \slot2($sp) + ldt \fr1, \slot1($sp) + ldt \fr2, \slot2($sp) +#endif +.endm diff --git a/sysdeps/alpha/divl.S b/sysdeps/alpha/divl.S index 33fa1187d9..90cd6862a7 100644 --- a/sysdeps/alpha/divl.S +++ b/sysdeps/alpha/divl.S @@ -48,25 +48,20 @@ __divl: EXTEND (X, RV) EXTEND (Y, AT) - stq RV, 16(sp) - stq AT, 24(sp) - - ldt $f0, 16(sp) - ldt $f1, 24(sp) + _ITOFT2 RV, $f0, 16, AT, $f1, 24 cvtqt $f0, $f0 cvtqt $f1, $f1 - divt/c $f0, $f1, $f0 cvttq/c $f0, $f0 - stt $f0, 16(sp) - ldt $f0, 0(sp) + _FTOIT $f0, RV, 16 + ldt $f0, 0(sp) ldt $f1, 8(sp) - ldl RV, 16(sp) lda sp, FRAME(sp) cfi_restore ($f0) cfi_restore ($f1) cfi_def_cfa_offset (0) + sextl RV, RV ret $31, (RA), 1 cfi_endproc diff --git a/sysdeps/alpha/divq.S b/sysdeps/alpha/divq.S index 464536db3d..4df79829f9 100644 --- a/sysdeps/alpha/divq.S +++ b/sysdeps/alpha/divq.S @@ -52,17 +52,13 @@ __divq: that's done, we have at least 22 cycles until its results are ready -- all the time in the world to figure out how we're going to use the results. */ - stq X, 16(sp) - stq Y, 24(sp) - beq Y, DIVBYZERO - stt $f0, 0(sp) stt $f1, 8(sp) + beq Y, DIVBYZERO cfi_rel_offset ($f0, 0) cfi_rel_offset ($f1, 8) - ldt $f0, 16(sp) - ldt $f1, 24(sp) + _ITOFT2 X, $f0, 16, Y, $f1, 24 cvtqt $f0, $f0 cvtqt $f1, $f1 divt/c $f0, $f1, $f0 @@ -77,9 +73,8 @@ __divq: /* If we get here, we're expecting exact results from the division. Do nothing else besides convert and clean up. */ cvttq/c $f0, $f0 - stt $f0, 16(sp) + _FTOIT $f0, RV, 16 - ldq RV, 16(sp) ldt $f0, 0(sp) cfi_restore ($f1) cfi_remember_state @@ -117,8 +112,8 @@ $x_big: $fix_sign_in_ret1: cvttq/c $f0, $f0 - stt $f0, 8(sp) - ldq Q, 8(sp) + _FTOIT $f0, Q, 8 + .align 3 $fix_sign_in_ret2: mulq Q, Y, QY stq t4, 8(sp) @@ -234,10 +229,8 @@ $fix_sign_in: blbc t5, $fix_sign_in_ret1 cvttq/c $f0, $f0 - stt $f0, 8(sp) - ldq Q, 8(sp) - unop - + _FTOIT $f0, Q, 8 + .align 3 negq Q, Q br $fix_sign_in_ret2 diff --git a/sysdeps/alpha/divqu.S b/sysdeps/alpha/divqu.S index 6ff6c035e2..63b575faa7 100644 --- a/sysdeps/alpha/divqu.S +++ b/sysdeps/alpha/divqu.S @@ -52,23 +52,20 @@ __divqu: that's done, we have at least 22 cycles until its results are ready -- all the time in the world to figure out how we're going to use the results. */ - stq X, 16(sp) - stq Y, 24(sp) - beq Y, DIVBYZERO - stt $f0, 0(sp) stt $f1, 8(sp) + beq Y, DIVBYZERO cfi_rel_offset ($f0, 0) cfi_rel_offset ($f1, 8) - ldt $f0, 16(sp) - ldt $f1, 24(sp) + _ITOFT2 X, $f0, 16, Y, $f1, 24 cvtqt $f0, $f0 cvtqt $f1, $f1 blt X, $x_is_neg divt/c $f0, $f1, $f0 /* Check to see if Y was mis-converted as signed value. */ + .align 4 ldt $f1, 8(sp) unop nop @@ -81,9 +78,7 @@ __divqu: /* If we get here, we're expecting exact results from the division. Do nothing else besides convert and clean up. */ cvttq/c $f0, $f0 - stt $f0, 16(sp) - - ldq RV, 16(sp) + _FTOIT $f0, RV, 16 ldt $f0, 0(sp) cfi_remember_state cfi_restore ($f0) @@ -101,9 +96,9 @@ $x_is_neg: ldah AT, 0x5f80 /* 2**64 as float. */ stt $f2, 24(sp) cfi_rel_offset ($f2, 24) - stl AT, 16(sp) - lds $f2, 16(sp) + _ITOFS AT, $f2, 16 + .align 4 addt $f0, $f2, $f0 unop divt/c $f0, $f1, $f0 @@ -140,10 +135,10 @@ $x_big: #define QY t3 /* Q*Y */ cvttq/c $f0, $f0 - stt $f0, 8(sp) - ldq Q, 8(sp) + _FTOIT $f0, Q, 8 mulq Q, Y, QY + .align 4 stq t4, 8(sp) unop ldt $f0, 0(sp) diff --git a/sysdeps/alpha/reml.S b/sysdeps/alpha/reml.S index c4eb426c5a..1bbb978f66 100644 --- a/sysdeps/alpha/reml.S +++ b/sysdeps/alpha/reml.S @@ -50,18 +50,12 @@ __reml: EXTEND (X, RV) EXTEND (Y, AT) - stq RV, 16(sp) - stq AT, 24(sp) - - ldt $f0, 16(sp) - ldt $f1, 24(sp) + _ITOFT2 RV, $f0, 16, AT, $f1, 24 cvtqt $f0, $f0 cvtqt $f1, $f1 - divt/c $f0, $f1, $f0 cvttq/c $f0, $f0 - stt $f0, 16(sp) - ldq RV, 16(sp) + _FTOIT $f0, RV, 16 ldt $f0, 0(sp) mull RV, Y, RV @@ -70,7 +64,6 @@ __reml: cfi_restore ($f0) cfi_restore ($f1) cfi_def_cfa_offset (0) - subl X, RV, RV ret $31, (RA), 1 diff --git a/sysdeps/alpha/remq.S b/sysdeps/alpha/remq.S index ce527d1055..a8795c8d24 100644 --- a/sysdeps/alpha/remq.S +++ b/sysdeps/alpha/remq.S @@ -52,17 +52,13 @@ __remq: that's done, we have at least 22 cycles until its results are ready -- all the time in the world to figure out how we're going to use the results. */ - stq X, 16(sp) - stq Y, 24(sp) - beq Y, DIVBYZERO - stt $f0, 0(sp) stt $f1, 8(sp) + beq Y, DIVBYZERO cfi_rel_offset ($f0, 0) cfi_rel_offset ($f1, 8) - ldt $f0, 16(sp) - ldt $f1, 24(sp) + _ITOFT2 X, $f0, 16, Y, $f1, 24 cvtqt $f0, $f0 cvtqt $f1, $f1 divt/c $f0, $f1, $f0 @@ -77,9 +73,7 @@ __remq: /* If we get here, we're expecting exact results from the division. Do nothing else besides convert, compute remainder, clean up. */ cvttq/c $f0, $f0 - stt $f0, 16(sp) - - ldq AT, 16(sp) + _FTOIT $f0, AT, 16 mulq AT, Y, AT ldt $f0, 0(sp) cfi_restore ($f1) @@ -87,7 +81,6 @@ __remq: cfi_restore ($f0) cfi_def_cfa_offset (0) lda sp, FRAME(sp) - subq X, AT, RV ret $31, (RA), 1 @@ -120,8 +113,8 @@ $x_big: $fix_sign_in_ret1: cvttq/c $f0, $f0 - stt $f0, 8(sp) - ldq Q, 8(sp) + _FTOIT $f0, Q, 8 + .align 3 $fix_sign_in_ret2: mulq Q, Y, QY stq t4, 8(sp) @@ -233,9 +226,8 @@ $fix_sign_in: bge t1, $fix_sign_in_ret1 cvttq/c $f0, $f0 - stt $f0, 8(sp) - ldq Q, 8(sp) - + _FTOIT $f0, Q, 8 + .align 3 negq Q, Q br $fix_sign_in_ret2 diff --git a/sysdeps/alpha/remqu.S b/sysdeps/alpha/remqu.S index fa2eb626c7..f8deebbbc1 100644 --- a/sysdeps/alpha/remqu.S +++ b/sysdeps/alpha/remqu.S @@ -52,19 +52,16 @@ __remqu: that's done, we have at least 22 cycles until its results are ready -- all the time in the world to figure out how we're going to use the results. */ - stq X, 16(sp) - stq Y, 24(sp) subq Y, 1, AT - stt $f0, 0(sp) and Y, AT, AT + stt $f1, 8(sp) beq AT, $powerof2 cfi_rel_offset ($f0, 0) cfi_rel_offset ($f1, 8) - ldt $f0, 16(sp) - ldt $f1, 24(sp) + _ITOFT2 X, $f0, 16, Y, $f1, 24 cvtqt $f0, $f0 cvtqt $f1, $f1 @@ -82,9 +79,8 @@ __remqu: /* If we get here, we're expecting exact results from the division. Do nothing else besides convert, compute remainder, clean up. */ cvttq/c $f0, $f0 - stt $f0, 16(sp) + _FTOIT $f0, AT, 16 - ldq AT, 16(sp) mulq AT, Y, AT ldt $f0, 0(sp) lda sp, FRAME(sp) @@ -93,6 +89,7 @@ __remqu: cfi_restore ($f1) cfi_def_cfa_offset (0) + .align 4 subq X, AT, RV ret $31, (RA), 1 @@ -105,15 +102,13 @@ $x_is_neg: ldah AT, 0x5f80 /* 2**64 as float. */ stt $f2, 24(sp) cfi_rel_offset ($f2, 24) - stl AT, 16(sp) - lds $f2, 16(sp) + _ITOFS AT, $f2, 16 addt $f0, $f2, $f0 - unop divt/c $f0, $f1, $f0 - unop /* Ok, we've now the divide issued. Continue with other checks. */ + .align 4 ldt $f1, 8(sp) unop ldt $f2, 24(sp) @@ -144,10 +139,10 @@ $x_big: #define QY t3 /* Q*Y */ cvttq/c $f0, $f0 - stt $f0, 8(sp) - ldq Q, 8(sp) + _FTOIT $f0, Q, 8 mulq Q, Y, QY + .align 4 stq t4, 8(sp) unop ldt $f0, 0(sp) From 58ed091a43db9bd1ce77c7be211ea116cce6940d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 7 May 2004 01:57:04 +0000 Subject: [PATCH 3305/4487] Linux/Alpha startup code in ld.so. --- sysdeps/unix/sysv/linux/alpha/dl-sysdep.c | 60 +++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/dl-sysdep.c diff --git a/sysdeps/unix/sysv/linux/alpha/dl-sysdep.c b/sysdeps/unix/sysv/linux/alpha/dl-sysdep.c new file mode 100644 index 0000000000..a0214b0072 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/dl-sysdep.c @@ -0,0 +1,60 @@ +/* Operating system support for run-time dynamic linker. Linux/PPC version. + Copyright (C) 1997, 1998, 2001, 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. */ + + +#include "config.h" +#include "kernel-features.h" +#include + +extern long __libc_alpha_cache_shape[4]; +weak_extern (__libc_alpha_cache_shape); + + +/* Scan the Aux Vector for the cache shape entries. */ +#define DL_PLATFORM_AUXV \ + case AT_L1I_CACHESHAPE: \ + { \ + long *cls = __libc_alpha_cache_shape; \ + if (cls != NULL) \ + cls[0] = av->a_un.a_val; \ + break; \ + } \ + case AT_L1D_CACHESHAPE: \ + { \ + long *cls = __libc_alpha_cache_shape; \ + if (cls != NULL) \ + cls[1] = av->a_un.a_val; \ + break; \ + } \ + case AT_L2_CACHESHAPE: \ + { \ + long *cls = __libc_alpha_cache_shape; \ + if (cls != NULL) \ + cls[2] = av->a_un.a_val; \ + break; \ + } \ + case AT_L3_CACHESHAPE: \ + { \ + long *cls = __libc_alpha_cache_shape; \ + if (cls != NULL) \ + cls[3] = av->a_un.a_val; \ + break; \ + } + +#include From 8dbe95aa6adffe90b37091550f57ceafa84a6305 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 7 May 2004 01:57:19 +0000 Subject: [PATCH 3306/4487] Linux/Alpha sysconf definitions. --- sysdeps/unix/sysv/linux/alpha/sysconf.c | 152 ++++++++++++++++++++++++ 1 file changed, 152 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/sysconf.c diff --git a/sysdeps/unix/sysv/linux/alpha/sysconf.c b/sysdeps/unix/sysv/linux/alpha/sysconf.c new file mode 100644 index 0000000000..2bbaf1f364 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/sysconf.c @@ -0,0 +1,152 @@ +/* Copyright (C) 2004 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. */ + +#include +#include +#include +#include + + +static long int linux_sysconf (int name); + +#define CSHAPE(totalsize, linesize, assoc) \ + ((totalsize & ~0xff) | (linesize << 4) | assoc) + +long __libc_alpha_cache_shape[4] = { -2, -2, -2, -2 }; + +static inline unsigned long +implver (void) +{ + unsigned long i; +#if __GNUC_PREREQ(3,3) + i = __builtin_alpha_implver (); +#else + asm ("implver %0" : "=r" (i)); +#endif + return i; +} + +static inline unsigned long +amask (unsigned long x) +{ + unsigned long r; +#if __GNUC_PREREQ(3,3) + r = __builtin_alpha_amask (x); +#else + asm ("amask %1,%0" : "=r"(r) : "Ir"(x)); +#endif + return r; +} + +/* Get the value of the system variable NAME. */ +long int +__sysconf (int name) +{ + long shape, index; + + /* We only handle the cache information here (for now). */ + if (name < _SC_LEVEL1_ICACHE_SIZE || name > _SC_LEVEL4_CACHE_LINESIZE) + return linux_sysconf (name); + + /* No Alpha has L4 caches. */ + if (name >= _SC_LEVEL4_CACHE_SIZE) + return -1; + + index = (name - _SC_LEVEL1_ICACHE_SIZE) / 3; + shape = __libc_alpha_cache_shape[index]; + if (shape == -2) + { + long shape_l1i, shape_l1d, shape_l2, shape_l3 = -1; + + /* ??? In the cases below for which we do not know L1 cache sizes, + we could do timings to measure sizes. But for the Bcache, it's + generally big enough that (without additional help) TLB effects + get in the way. We'd either need to be able to allocate large + pages or have the kernel do the timings from KSEG. Fortunately, + kernels beginning with 2.6.5 will pass us this info in auxvec. */ + + switch (implver()) + { + case 0: /* EV4 */ + /* EV4/LCA45 had 8k L1 caches; EV45 had 16k L1 caches. */ + /* EV4/EV45 had 128k to 16M 32-byte direct Bcache. LCA45 + had 64k to 8M 8-byte direct Bcache. Can't tell. */ + shape_l1i = shape_l1d = shape_l2 = CSHAPE (0, 5, 1); + break; + + case 1: /* EV5 */ + if (amask (1 << 8)) + { + /* MAX insns not present; either EV5 or EV56. */ + shape_l1i = shape_l1d = CSHAPE(8*1024, 5, 1); + /* ??? L2 and L3 *can* be configured as 32-byte line. */ + shape_l2 = CSHAPE (96*1024, 6, 3); + /* EV5/EV56 has 1M to 16M Bcache. */ + shape_l3 = CSHAPE (0, 6, 1); + } + else + { + /* MAX insns present; either PCA56 or PCA57. */ + /* PCA56 had 16k 64-byte cache; PCA57 had 32k Icache. */ + /* PCA56 had 8k 64-byte cache; PCA57 had 16k Dcache. */ + /* PCA5[67] had 512k to 4M Bcache. */ + shape_l1i = shape_l1d = shape_l2 = CSHAPE (0, 6, 1); + } + break; + + case 2: /* EV6 */ + shape_l1i = shape_l1d = CSHAPE(64*1024, 6, 2); + /* EV6/EV67/EV68* had 1M to 16M Bcache. */ + shape_l2 = CSHAPE (0, 6, 1); + break; + + case 3: /* EV7 */ + shape_l1i = shape_l1d = CSHAPE(64*1024, 6, 2); + shape_l2 = CSHAPE(7*1024*1024/4, 6, 7); + break; + + default: + shape_l1i = shape_l1d = shape_l2 = 0; + break; + } + + __libc_alpha_cache_shape[0] = shape_l1i; + __libc_alpha_cache_shape[1] = shape_l1d; + __libc_alpha_cache_shape[2] = shape_l2; + __libc_alpha_cache_shape[3] = shape_l3; + shape = __libc_alpha_cache_shape[index]; + } + + if (shape <= 0) + return shape; + + switch (name % 3) + { + case 0: /* total size */ + return shape & -0x100; + case 1: /* associativity */ + return shape & 0xf; + default: /* line size */ + return 1L << ((shape >> 4) & 0xf); + } +} + +/* Now the generic Linux version. */ +#undef __sysconf +#define __sysconf static linux_sysconf +#include "../sysconf.c" From 524a69be2a62da8cba7c1d5b7c983bdf4b1e99c1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 7 May 2004 01:57:35 +0000 Subject: [PATCH 3307/4487] Export __libc_alpha_cache_shape as a private symbol. --- sysdeps/unix/sysv/linux/alpha/Versions | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/Versions b/sysdeps/unix/sysv/linux/alpha/Versions index 89ec9db1c4..ca79c7e444 100644 --- a/sysdeps/unix/sysv/linux/alpha/Versions +++ b/sysdeps/unix/sysv/linux/alpha/Versions @@ -73,6 +73,14 @@ libc { #errlist-compat 132 _sys_errlist; sys_errlist; _sys_nerr; sys_nerr; } + GLIBC_PRIVATE { + __libc_alpha_cache_shape; + } +} +ld { + GLIBC_PRIVATE { + __libc_alpha_cache_shape; + } } librt { GLIBC_2.3 { From 5341b8057c23728e3f04c9481528e96617c47bb1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 May 2004 20:16:32 +0000 Subject: [PATCH 3308/4487] (pthread_cond_t): Add __broadcast_seq field. --- sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h index 0fed5cc918..1bb2968120 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h @@ -81,6 +81,7 @@ typedef union unsigned long long int __wakeup_seq; unsigned long long int __woken_seq; void *__mutex; + unsigned int __broadcast_seq; } __data; char __size[__SIZEOF_PTHREAD_COND_T]; long long int __align; From 7255da777a96b81af3554ca32d1fae8740488b51 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 20 May 2004 22:07:15 +0000 Subject: [PATCH 3309/4487] 2004-05-15 Chris Demetriou * sysdeps/mips/dl-machine.h (ELF_DL_FRAME_SIZE) (ELF_DL_SAVE_ARG_REGS, ELF_DL_RESTORE_ARG_REGS): For the N32 and 64 ABIs, save and restore regs $10 and $11 (a6 and a7). --- sysdeps/mips/dl-machine.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index aff843d01d..c8397b2f33 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -281,26 +281,30 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc) #else /* _MIPS_SIM == _MIPS_SIM_NABI32 || _MIPS_SIM == _MIPS_SIM_ABI64 */ -#define ELF_DL_FRAME_SIZE 64 +#define ELF_DL_FRAME_SIZE 80 #define ELF_DL_SAVE_ARG_REGS "\ - sd $15, 56($29)\n \ + sd $15, 72($29)\n \ sd $4, 8($29)\n \ sd $5, 16($29)\n \ sd $6, 24($29)\n \ sd $7, 32($29)\n \ sd $8, 40($29)\n \ sd $9, 48($29)\n \ + sd $10, 56($29)\n \ + sd $11, 64($29)\n \ " #define ELF_DL_RESTORE_ARG_REGS "\ - ld $31, 56($29)\n \ + ld $31, 72($29)\n \ ld $4, 8($29)\n \ ld $5, 16($29)\n \ ld $6, 24($29)\n \ ld $7, 32($29)\n \ ld $8, 40($29)\n \ ld $9, 48($29)\n \ + ld $10, 56($29)\n \ + ld $11, 64($29)\n \ " #define IFABIO32(X) From 945ec97938d552e2461c8e24dd84d35b250e5fbe Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 23 May 2004 10:22:47 +0000 Subject: [PATCH 3310/4487] Use "+m" constraint instead of separate "m" constraints. --- sysdeps/m68k/m68020/bits/atomic.h | 77 ++++++++++++++----------------- 1 file changed, 35 insertions(+), 42 deletions(-) diff --git a/sysdeps/m68k/m68020/bits/atomic.h b/sysdeps/m68k/m68020/bits/atomic.h index 746dc2e06e..6b6db71465 100644 --- a/sysdeps/m68k/m68020/bits/atomic.h +++ b/sysdeps/m68k/m68020/bits/atomic.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab , 2003. @@ -48,22 +48,22 @@ typedef uintmax_t uatomic_max_t; #define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval) \ ({ __typeof (*(mem)) __ret; \ __asm __volatile ("cas%.b %0,%2,%1" \ - : "=d" (__ret), "=m" (*(mem)) \ - : "d" (newval), "m" (*(mem)), "0" (oldval)); \ + : "=d" (__ret), "+m" (*(mem)) \ + : "d" (newval), "0" (oldval)); \ __ret; }) #define __arch_compare_and_exchange_val_16_acq(mem, newval, oldval) \ ({ __typeof (*(mem)) __ret; \ __asm __volatile ("cas%.w %0,%2,%1" \ - : "=d" (__ret), "=m" (*(mem)) \ - : "d" (newval), "m" (*(mem)), "0" (oldval)); \ + : "=d" (__ret), "+m" (*(mem)) \ + : "d" (newval), "0" (oldval)); \ __ret; }) #define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \ ({ __typeof (*(mem)) __ret; \ __asm __volatile ("cas%.l %0,%2,%1" \ - : "=d" (__ret), "=m" (*(mem)) \ - : "d" (newval), "m" (*(mem)), "0" (oldval)); \ + : "=d" (__ret), "+m" (*(mem)) \ + : "d" (newval), "0" (oldval)); \ __ret; }) # define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \ @@ -81,18 +81,18 @@ typedef uintmax_t uatomic_max_t; if (sizeof (*(mem)) == 1) \ __asm __volatile ("1: cas%.b %0,%2,%1;" \ " jbne 1b" \ - : "=d" (__result), "=m" (*(mem)) \ - : "d" (newvalue), "m" (*(mem)), "0" (__result)); \ + : "=d" (__result), "+m" (*(mem)) \ + : "d" (newvalue), "0" (__result)); \ else if (sizeof (*(mem)) == 2) \ __asm __volatile ("1: cas%.w %0,%2,%1;" \ " jbne 1b" \ - : "=d" (__result), "=m" (*(mem)) \ - : "d" (newvalue), "m" (*(mem)), "0" (__result)); \ + : "=d" (__result), "+m" (*(mem)) \ + : "d" (newvalue), "0" (__result)); \ else if (sizeof (*(mem)) == 4) \ __asm __volatile ("1: cas%.l %0,%2,%1;" \ " jbne 1b" \ - : "=d" (__result), "=m" (*(mem)) \ - : "d" (newvalue), "m" (*(mem)), "0" (__result)); \ + : "=d" (__result), "+m" (*(mem)) \ + : "d" (newvalue), "0" (__result)); \ else \ { \ __typeof (mem) __memp = (mem); \ @@ -113,25 +113,25 @@ typedef uintmax_t uatomic_max_t; " add%.b %3,%2;" \ " cas%.b %0,%2,%1;" \ " jbne 1b" \ - : "=d" (__result), "=m" (*(mem)), \ + : "=d" (__result), "+m" (*(mem)), \ "=&d" (__temp) \ - : "d" (value), "m" (*(mem)), "0" (__result)); \ + : "d" (value), "0" (__result)); \ else if (sizeof (*(mem)) == 2) \ __asm __volatile ("1: move%.w %0,%2;" \ " add%.w %3,%2;" \ " cas%.w %0,%2,%1;" \ " jbne 1b" \ - : "=d" (__result), "=m" (*(mem)), \ + : "=d" (__result), "+m" (*(mem)), \ "=&d" (__temp) \ - : "d" (value), "m" (*(mem)), "0" (__result)); \ + : "d" (value), "0" (__result)); \ else if (sizeof (*(mem)) == 4) \ __asm __volatile ("1: move%.l %0,%2;" \ " add%.l %3,%2;" \ " cas%.l %0,%2,%1;" \ " jbne 1b" \ - : "=d" (__result), "=m" (*(mem)), \ + : "=d" (__result), "+m" (*(mem)), \ "=&d" (__temp) \ - : "d" (value), "m" (*(mem)), "0" (__result)); \ + : "d" (value), "0" (__result)); \ else \ { \ __typeof (mem) __memp = (mem); \ @@ -151,16 +151,16 @@ typedef uintmax_t uatomic_max_t; #define atomic_add(mem, value) \ (void) ({ if (sizeof (*(mem)) == 1) \ __asm __volatile ("add%.b %1,%0" \ - : "=m" (*(mem)) \ - : "id" (value), "m" (*(mem))); \ + : "+m" (*(mem)) \ + : "id" (value)); \ else if (sizeof (*(mem)) == 2) \ __asm __volatile ("add%.w %1,%0" \ - : "=m" (*(mem)) \ - : "id" (value), "m" (*(mem))); \ + : "+m" (*(mem)) \ + : "id" (value)); \ else if (sizeof (*(mem)) == 4) \ __asm __volatile ("add%.l %1,%0" \ - : "=m" (*(mem)) \ - : "id" (value), "m" (*(mem))); \ + : "+m" (*(mem)) \ + : "id" (value)); \ else \ { \ __typeof (mem) __memp = (mem); \ @@ -183,16 +183,13 @@ typedef uintmax_t uatomic_max_t; ({ char __result; \ if (sizeof (*(mem)) == 1) \ __asm __volatile ("addq%.b %#1,%1; seq %0" \ - : "=dm" (__result), "=m" (*(mem)) \ - : "m" (*(mem))); \ + : "=dm" (__result), "+m" (*(mem))); \ else if (sizeof (*(mem)) == 2) \ __asm __volatile ("addq%.w %#1,%1; seq %0" \ - : "=dm" (__result), "=m" (*(mem)) \ - : "m" (*(mem))); \ + : "=dm" (__result), "+m" (*(mem))); \ else if (sizeof (*(mem)) == 4) \ __asm __volatile ("addq%.l %#1,%1; seq %0" \ - : "=dm" (__result), "=m" (*(mem)) \ - : "m" (*(mem))); \ + : "=dm" (__result), "+m" (*(mem))); \ else \ { \ __typeof (mem) __memp = (mem); \ @@ -217,16 +214,13 @@ typedef uintmax_t uatomic_max_t; ({ char __result; \ if (sizeof (*(mem)) == 1) \ __asm __volatile ("subq%.b %#1,%1; seq %0" \ - : "=dm" (__result), "=m" (*(mem)) \ - : "m" (*(mem))); \ + : "=dm" (__result), "+m" (*(mem))); \ else if (sizeof (*(mem)) == 2) \ __asm __volatile ("subq%.w %#1,%1; seq %0" \ - : "=dm" (__result), "=m" (*(mem)) \ - : "m" (*(mem))); \ + : "=dm" (__result), "+m" (*(mem))); \ else if (sizeof (*(mem)) == 4) \ __asm __volatile ("subq%.l %#1,%1; seq %0" \ - : "=dm" (__result), "=m" (*(mem)) \ - : "m" (*(mem))); \ + : "=dm" (__result), "+m" (*(mem))); \ else \ { \ __typeof (mem) __memp = (mem); \ @@ -249,13 +243,12 @@ typedef uintmax_t uatomic_max_t; #define atomic_bit_set(mem, bit) \ __asm __volatile ("bfset %0{%1,#1}" \ - : "=m" (*(mem)) \ - : "di" (sizeof (*(mem)) * 8 - (bit) - 1), "m" (*(mem))) + : "+m" (*(mem)) \ + : "di" (sizeof (*(mem)) * 8 - (bit) - 1)) #define atomic_bit_test_set(mem, bit) \ ({ char __result; \ __asm __volatile ("bfset %1{%2,#1}; sne %0" \ - : "=dm" (__result), "=m" (*(mem)) \ - : "di" (sizeof (*(mem)) * 8 - (bit) - 1), \ - "m" (*(mem))); \ + : "=dm" (__result), "+m" (*(mem)) \ + : "di" (sizeof (*(mem)) * 8 - (bit) - 1)); \ __result; }) From 8a9a971c4d859504a14fbb3cf1d2d71e52917609 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 28 May 2004 06:39:36 +0000 Subject: [PATCH 3311/4487] Add libc_hidden_builtin_def. --- sysdeps/alpha/alphaev67/stpcpy.S | 3 ++- sysdeps/alpha/stpcpy.S | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/alphaev67/stpcpy.S b/sysdeps/alpha/alphaev67/stpcpy.S index d09babc8f5..b5da4e05d3 100644 --- a/sysdeps/alpha/alphaev67/stpcpy.S +++ b/sysdeps/alpha/alphaev67/stpcpy.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2002 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson . @@ -51,3 +51,4 @@ ENTRY(__stpcpy) weak_alias (__stpcpy, stpcpy) libc_hidden_def (__stpcpy) +libc_hidden_builtin_def (stpcpy) diff --git a/sysdeps/alpha/stpcpy.S b/sysdeps/alpha/stpcpy.S index a37a308bb3..b73e85f217 100644 --- a/sysdeps/alpha/stpcpy.S +++ b/sysdeps/alpha/stpcpy.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1996, 2002, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1996. @@ -53,3 +53,4 @@ ENTRY(__stpcpy) weak_alias (__stpcpy, stpcpy) libc_hidden_def (__stpcpy) +libc_hidden_builtin_def (stpcpy) From e0a27e2f477393464964b9c80577345583246057 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 3 Jun 2004 15:57:25 +0000 Subject: [PATCH 3312/4487] (FUTEX_CMP_REQUEUE): Define. (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE internally. Return non-zero if error, zero if success. --- sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h index a7079a8490..fd4a7ca4bb 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h @@ -30,6 +30,7 @@ #define FUTEX_WAIT 0 #define FUTEX_WAKE 1 #define FUTEX_REQUEUE 3 +#define FUTEX_CMP_REQUEUE 4 /* Initializer for compatibility lock. */ #define LLL_MUTEX_LOCK_INITIALIZER (0) @@ -61,14 +62,15 @@ INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret : __ret; \ }) -#define lll_futex_requeue(futexp, nr_wake, nr_move, mutex) \ +/* Returns non-zero if error happened, zero if success. */ +#define lll_futex_requeue(futexp, nr_wake, nr_move, mutex, val) \ ({ \ INTERNAL_SYSCALL_DECL (__err); \ long int __ret; \ - __ret = INTERNAL_SYSCALL (futex, __err, 5, \ - (futexp), FUTEX_REQUEUE, (nr_wake), (nr_move), \ - (mutex)); \ - INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret : __ret; \ + __ret = INTERNAL_SYSCALL (futex, __err, 6, \ + (futexp), FUTEX_CMP_REQUEUE, (nr_wake), \ + (nr_move), (mutex), (val)); \ + INTERNAL_SYSCALL_ERROR_P (__ret, __err); \ }) From 64d5339733aa65f02c532f37d71206190c140d40 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 3 Jun 2004 15:57:42 +0000 Subject: [PATCH 3313/4487] (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock. --- sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h index 1bb2968120..62c853cee9 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h @@ -76,11 +76,12 @@ typedef union struct { int __lock; - int __clock; + unsigned int __futex; unsigned long long int __total_seq; unsigned long long int __wakeup_seq; unsigned long long int __woken_seq; void *__mutex; + int __clock; unsigned int __broadcast_seq; } __data; char __size[__SIZEOF_PTHREAD_COND_T]; From 482f87008140f8aa5354822fdffd160cd25e0e6b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 11 Jun 2004 10:15:34 +0000 Subject: [PATCH 3314/4487] 2004-06-11 Roland McGrath * sysdeps/arm/strlen.S [__ARMEB__]: Compute correctly for big-endian. From Krzysztof Halasa . --- sysdeps/arm/strlen.S | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sysdeps/arm/strlen.S b/sysdeps/arm/strlen.S index f29528ada2..a83c41d26a 100644 --- a/sysdeps/arm/strlen.S +++ b/sysdeps/arm/strlen.S @@ -53,12 +53,21 @@ Laligned: @ here, we have a word in r2. Does it ldrne r2, [r1], $4 @ and we continue to the next word bne Laligned @ Llastword: @ drop through to here once we find a +#ifdef __ARMEB__ + tst r2, $0xff000000 @ word that has a zero byte in it + addne r0, r0, $1 @ + tstne r2, $0x00ff0000 @ and add up to 3 bytes on to it + addne r0, r0, $1 @ + tstne r2, $0x0000ff00 @ (if first three all non-zero, 4th + addne r0, r0, $1 @ must be zero) +#else tst r2, $0x000000ff @ word that has a zero byte in it addne r0, r0, $1 @ tstne r2, $0x0000ff00 @ and add up to 3 bytes on to it addne r0, r0, $1 @ tstne r2, $0x00ff0000 @ (if first three all non-zero, 4th addne r0, r0, $1 @ must be zero) +#endif RETINSTR(mov,pc,lr) END(strlen) libc_hidden_builtin_def (strlen) From 48a7f702e8a022530a05e58fe3c94bec5159044f Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 14 Jun 2004 18:04:25 +0000 Subject: [PATCH 3315/4487] * sysdeps/alpha/div_libc.h (_ITOFS): Use "sp" not "$sp". (_ITOFT, _FTOIT, _ITOFT2): Likewise. --- sysdeps/alpha/div_libc.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/sysdeps/alpha/div_libc.h b/sysdeps/alpha/div_libc.h index 27209bd9fa..2f06282102 100644 --- a/sysdeps/alpha/div_libc.h +++ b/sysdeps/alpha/div_libc.h @@ -120,8 +120,8 @@ #ifdef __alpha_fix__ itofs \gr, \fr #else - stl \gr, \slot($sp) - lds \fr, \slot($sp) + stl \gr, \slot(sp) + lds \fr, \slot(sp) #endif .endm @@ -129,8 +129,8 @@ #ifdef __alpha_fix__ itoft \gr, \fr #else - stq \gr, \slot($sp) - ldt \fr, \slot($sp) + stq \gr, \slot(sp) + ldt \fr, \slot(sp) #endif .endm @@ -138,8 +138,8 @@ #ifdef __alpha_fix__ ftoit \fr, \gr #else - stt \fr, \slot($sp) - ldq \gr, \slot($sp) + stt \fr, \slot(sp) + ldq \gr, \slot(sp) #endif .endm @@ -150,9 +150,9 @@ itoft \gr1, \fr1 itoft \gr2, \fr2 #else - stq \gr1, \slot1($sp) - stq \gr2, \slot2($sp) - ldt \fr1, \slot1($sp) - ldt \fr2, \slot2($sp) + stq \gr1, \slot1(sp) + stq \gr2, \slot2(sp) + ldt \fr1, \slot1(sp) + ldt \fr2, \slot2(sp) #endif .endm From be8cedf82f3d6b7542c34eef97e2a714d1202b67 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 22 Jun 2004 05:54:44 +0000 Subject: [PATCH 3316/4487] Additional makefile for Unix on Alpha. --- sysdeps/unix/alpha/Makefile | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sysdeps/unix/alpha/Makefile diff --git a/sysdeps/unix/alpha/Makefile b/sysdeps/unix/alpha/Makefile new file mode 100644 index 0000000000..441aa02a83 --- /dev/null +++ b/sysdeps/unix/alpha/Makefile @@ -0,0 +1,3 @@ +ifeq ($(subdir),rt) +librt-sysdep_routines += rt-sysdep +endif From 5e79bfc6741e5e2c9e1c8eafff7419c2ccded4b6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 22 Jun 2004 05:55:22 +0000 Subject: [PATCH 3317/4487] Lowlevel system dependent code for Unix/Alpha. --- sysdeps/unix/alpha/rt-sysdep.S | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/alpha/rt-sysdep.S diff --git a/sysdeps/unix/alpha/rt-sysdep.S b/sysdeps/unix/alpha/rt-sysdep.S new file mode 100644 index 0000000000..f966bf1e59 --- /dev/null +++ b/sysdeps/unix/alpha/rt-sysdep.S @@ -0,0 +1 @@ +#include From 594e390a371bf9aa09cc7a813ed3beeeda7d886c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 28 Jun 2004 20:57:50 +0000 Subject: [PATCH 3318/4487] (MULTIPLE_THREADS_OFFSET): Define unconditionally. --- sysdeps/alpha/nptl/tcb-offsets.sym | 2 -- 1 file changed, 2 deletions(-) diff --git a/sysdeps/alpha/nptl/tcb-offsets.sym b/sysdeps/alpha/nptl/tcb-offsets.sym index a1a1e45951..14494ee2cd 100644 --- a/sysdeps/alpha/nptl/tcb-offsets.sym +++ b/sysdeps/alpha/nptl/tcb-offsets.sym @@ -7,7 +7,5 @@ # define __builtin_thread_pointer() ((void *) 0) # define thread_offsetof(mem) ((void *) &THREAD_SELF->mem - (void *) 0) -#if TLS_MULTIPLE_THREADS_IN_TCB MULTIPLE_THREADS_OFFSET thread_offsetof (header.multiple_threads) -#endif PID_OFFSET thread_offsetof (pid) From d32bff863e4224b869c1539d24a2d16056776c1e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 28 Jun 2004 21:02:06 +0000 Subject: [PATCH 3319/4487] (inline_syscall6): Fix a typo. --- sysdeps/unix/alpha/sysdep.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h index 26cf918c1c..f60eafea49 100644 --- a/sysdeps/unix/alpha/sysdep.h +++ b/sysdeps/unix/alpha/sysdep.h @@ -1,4 +1,5 @@ -/* Copyright (C) 1992, 1995, 1996, 2000, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995, 1996, 2000, 2003, 2004 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -364,7 +365,7 @@ __LABEL(name) \ __asm__ __volatile__ \ ("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7 %8" \ : inline_syscall_r0_out_constraint (_sc_0), \ - "=r"(_sc_19) "=r"(_sc_16), "=r"(_sc_17), \ + "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \ "=r"(_sc_18), "=r"(_sc_20), "=r"(_sc_21) \ : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), "4"(_sc_18), \ "1"(_sc_19), "5"(_sc_20), "6"(_sc_21) \ From 2acd67aa30c85e0b57e16026c35a35248edf380a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 28 Jun 2004 21:02:47 +0000 Subject: [PATCH 3320/4487] [BZ #231] (__syscall_error): Avoid !samegp relocation in librt.so. --- sysdeps/unix/alpha/sysdep.S | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S index ce848f4e9b..c67a6542f6 100644 --- a/sysdeps/unix/alpha/sysdep.S +++ b/sysdeps/unix/alpha/sysdep.S @@ -1,4 +1,5 @@ -/* Copyright (C) 1993, 1996, 1998, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1996, 1998, 2002, 2003, 2004 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -95,7 +96,7 @@ __syscall_error: PROLOGUE /* Find our per-thread errno address */ -#ifdef PIC +#if defined PIC && !defined IS_IN_librt bsr ra, __errno_location !samegp #else jsr ra, __errno_location From a18e04cfb5565352dfd0f2ab006b39b76d9311fd Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 28 Jun 2004 21:03:34 +0000 Subject: [PATCH 3321/4487] [BZ #230] (_dl_start_user): Use ldah/ldl to load _dl_skip_args. --- sysdeps/alpha/dl-machine.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 35d7e1dbde..7c5f3c1518 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -321,7 +321,8 @@ _dl_start_user: \n\ mov $0, $9 \n\ /* See if we were run as a command with the executable \n\ file name as an extra leading argument. */ \n\ - ldl $1, _dl_skip_args($gp) !gprel \n\ + ldah $1, _dl_skip_args($gp) !gprelhigh \n\ + ldl $1, _dl_skip_args($1) !gprellow \n\ bne $1, $fixup_stack \n\ $fixup_stack_ret: \n\ /* The special initializer gets called with the stack \n\ From 38c0241ea9b69d7d0058445c89fa230bcd37ed42 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 5 Jul 2004 17:36:14 +0000 Subject: [PATCH 3322/4487] (ffs): Add libc_hidden_builtin_def. --- sysdeps/alpha/alphaev67/ffs.S | 3 ++- sysdeps/alpha/ffs.S | 3 ++- sysdeps/am29k/ffs.c | 3 ++- sysdeps/i960/ffs.c | 3 ++- sysdeps/m68k/ffs.c | 3 ++- sysdeps/m88k/ffs.c | 3 ++- sysdeps/rs6000/ffs.c | 3 ++- 7 files changed, 14 insertions(+), 7 deletions(-) diff --git a/sysdeps/alpha/alphaev67/ffs.S b/sysdeps/alpha/alphaev67/ffs.S index 6d87008988..fb1cdd932c 100644 --- a/sysdeps/alpha/alphaev67/ffs.S +++ b/sysdeps/alpha/alphaev67/ffs.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2004 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 @@ -48,3 +48,4 @@ ENTRY(__ffs) END(__ffs) weak_alias (__ffs, ffs) +libc_hidden_builtin_def (ffs) diff --git a/sysdeps/alpha/ffs.S b/sysdeps/alpha/ffs.S index c73d822841..5f2074ee7c 100644 --- a/sysdeps/alpha/ffs.S +++ b/sysdeps/alpha/ffs.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998, 2004 Free Software Foundation, Inc. Contributed by David Mosberger (davidm@cs.arizona.edu). This file is part of the GNU C Library. @@ -86,5 +86,6 @@ $ffsl..ng: END(ffsl) weak_alias (__ffs, ffs) +libc_hidden_builtin_def (ffs) weak_extern (ffsl) weak_alias (ffsl, ffsll) diff --git a/sysdeps/am29k/ffs.c b/sysdeps/am29k/ffs.c index a1a74445c7..6f080db442 100644 --- a/sysdeps/am29k/ffs.c +++ b/sysdeps/am29k/ffs.c @@ -1,6 +1,6 @@ /* ffs -- find first set bit in a word, counted from least significant end. For Amd 290x0. - Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc. + Copyright (C) 1991, 1992, 1997, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Torbjorn Granlund (tege@sics.se). @@ -36,6 +36,7 @@ __ffs (x) return 32 - cnt; } weak_alias (__ffs, ffs) +libc_hidden_builtin_def (ffs) #else #include diff --git a/sysdeps/i960/ffs.c b/sysdeps/i960/ffs.c index 979696ec19..ad907a4ecb 100644 --- a/sysdeps/i960/ffs.c +++ b/sysdeps/i960/ffs.c @@ -1,7 +1,7 @@ /* ffs -- find first set bit in a word, counted from least significant end. For i960 Core architecture This file is part of the GNU C Library. - Copyright (C) 1994, 1997 Free Software Foundation, Inc. + Copyright (C) 1994, 1997, 2004 Free Software Foundation, Inc. Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), On-Line Applications Research Corporation. @@ -37,6 +37,7 @@ __ffs (x) return cnt; } weak_alias (__ffs, ffs) +libc_hidden_builtin_def (ffs) #else diff --git a/sysdeps/m68k/ffs.c b/sysdeps/m68k/ffs.c index a296121333..189936b94f 100644 --- a/sysdeps/m68k/ffs.c +++ b/sysdeps/m68k/ffs.c @@ -1,7 +1,7 @@ /* ffs -- find first set bit in a word, counted from least significant end. For mc68020, mc68030, mc68040. This file is part of the GNU C Library. - Copyright (C) 1991, 1992, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1991, 1992, 1997, 1998, 2004 Free Software Foundation, Inc. Contributed by Torbjorn Granlund (tege@sics.se). The GNU C Library is free software; you can redistribute it and/or @@ -37,6 +37,7 @@ __ffs (x) return 32 - cnt; } weak_alias (__ffs, ffs) +libc_hidden_builtin_def (ffs) #undef ffsl weak_alias (__ffs, ffsl) diff --git a/sysdeps/m88k/ffs.c b/sysdeps/m88k/ffs.c index fe78ebc154..b7db70fd3b 100644 --- a/sysdeps/m88k/ffs.c +++ b/sysdeps/m88k/ffs.c @@ -1,7 +1,7 @@ /* ffs -- find first set bit in a word, counted from least significant end. For Motorola 88000. This file is part of the GNU C Library. - Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc. + Copyright (C) 1991, 1992, 1997, 2004 Free Software Foundation, Inc. Contributed by Torbjorn Granlund (tege@sics.se). The GNU C Library is free software; you can redistribute it and/or @@ -38,6 +38,7 @@ __ffs (x) return cnt + 1; } weak_alias (__ffs, ffs) +libc_hidden_builtin_def (ffs) #else #include diff --git a/sysdeps/rs6000/ffs.c b/sysdeps/rs6000/ffs.c index 802bbc8c31..4d01727044 100644 --- a/sysdeps/rs6000/ffs.c +++ b/sysdeps/rs6000/ffs.c @@ -1,6 +1,6 @@ /* ffs -- find first set bit in a word, counted from least significant end. For IBM rs6000. - Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc. + Copyright (C) 1991, 1992, 1997, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Torbjorn Granlund (tege@sics.se). @@ -35,6 +35,7 @@ __ffs (x) return 32 - cnt; } weak_alias (__ffs, ffs) +libc_hidden_builtin_def (ffs) #else #include From ef827649e7c8c23607b91f4ca4161e879857fd50 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 20 Jul 2004 09:24:49 +0000 Subject: [PATCH 3323/4487] (__dl_runtime_resolve): Update to use _dl_lookup_symbol_x. (elf_machine_runtime_link_map): Don't INTUSE _dl_signal_error. --- sysdeps/mips/dl-machine.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index c8397b2f33..570ac5b13d 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -254,7 +254,7 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc) } } - INTUSE (_dl_signal_error) (0, NULL, NULL, "cannot find runtime link map"); + _dl_signal_error (0, NULL, NULL, "cannot find runtime link map"); return NULL; } @@ -366,17 +366,17 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \ \ if (version->hash != 0) \ { \ - value = _dl_lookup_versioned_symbol(strtab + sym->st_name, l, \ - &sym, l->l_scope, version,\ - ELF_RTYPE_CLASS_PLT, 0); \ + value = _dl_lookup_symbol_x (strtab + sym->st_name, l, \ + &sym, l->l_scope, version, \ + ELF_RTYPE_CLASS_PLT, 0, 0); \ break; \ } \ /* Fall through. */ \ } \ case 0: \ - value = _dl_lookup_symbol (strtab + sym->st_name, l, &sym, \ - l->l_scope, ELF_RTYPE_CLASS_PLT, \ - DL_LOOKUP_ADD_DEPENDENCY); \ + value = _dl_lookup_symbol_x (strtab + sym->st_name, l, &sym, \ + l->l_scope, 0, ELF_RTYPE_CLASS_PLT, \ + DL_LOOKUP_ADD_DEPENDENCY, 0); \ } \ \ /* Currently value contains the base load address of the object \ From 24c4c341e3b4231bf13d6c4634089f0b6ee0c41c Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 20 Jul 2004 16:35:32 +0000 Subject: [PATCH 3324/4487] Use standard names for ABI macros, include sgidefs.h where appropriate. --- sysdeps/mips/atomicity.h | 7 ++++--- sysdeps/mips/bits/setjmp.h | 6 ++++-- sysdeps/mips/dl-machine.h | 2 +- sysdeps/mips/fpu/bits/mathdef.h | 2 ++ sysdeps/mips/machine-gmon.h | 8 +++++--- sysdeps/mips/mips64/__longjmp.c | 5 +++-- sysdeps/mips/mips64/setjmp_aux.c | 4 ++-- sysdeps/unix/sysv/linux/mips/Makefile | 5 +++-- sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 6 +++--- sysdeps/unix/sysv/linux/mips/bits/sigcontext.h | 4 +++- sysdeps/unix/sysv/linux/mips/bits/stat.h | 4 +++- sysdeps/unix/sysv/linux/mips/configure | 5 +++-- sysdeps/unix/sysv/linux/mips/configure.in | 5 +++-- sysdeps/unix/sysv/linux/mips/kernel_stat.h | 1 + sysdeps/unix/sysv/linux/mips/pread.c | 10 ++++++---- sysdeps/unix/sysv/linux/mips/pread64.c | 8 +++++--- sysdeps/unix/sysv/linux/mips/ptrace.c | 5 +++-- sysdeps/unix/sysv/linux/mips/pwrite.c | 10 ++++++---- sysdeps/unix/sysv/linux/mips/pwrite64.c | 7 ++++--- sysdeps/unix/sysv/linux/mips/sigaction.c | 5 ++++- sysdeps/unix/sysv/linux/mips/sigcontextinfo.h | 4 +++- sysdeps/unix/sysv/linux/mips/sys/procfs.h | 9 +++++---- sysdeps/unix/sysv/linux/mips/sys/ptrace.h | 5 +++-- sysdeps/unix/sysv/linux/mips/sys/tas.h | 4 +++- sysdeps/unix/sysv/linux/mips/sys/ucontext.h | 3 ++- sysdeps/unix/sysv/linux/mips/sys/user.h | 4 +++- 26 files changed, 87 insertions(+), 51 deletions(-) diff --git a/sysdeps/mips/atomicity.h b/sysdeps/mips/atomicity.h index 5148121091..f3d05bd50e 100644 --- a/sysdeps/mips/atomicity.h +++ b/sysdeps/mips/atomicity.h @@ -1,5 +1,5 @@ /* Low-level functions for atomic operations. Mips version. - Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 2001, 2002, 2003, 2004 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 @@ -21,6 +21,7 @@ #define _MIPS_ATOMICITY_H 1 #include +#include static inline int __attribute__ ((unused)) @@ -85,7 +86,7 @@ compare_and_swap (volatile long int *p, long int oldval, long int newval) #if _MIPS_SIM == _MIPS_SIM_ABI32 ".set mips2\n\t" #endif -#if defined _ABI64 && _MIPS_SIM == _ABI64 +#if _MIPS_SIM == _MIPS_SIM_ABI64 "lld %1,%5\n\t" #else "ll %1,%5\n\t" @@ -93,7 +94,7 @@ compare_and_swap (volatile long int *p, long int oldval, long int newval) "move %0,$0\n\t" "bne %1,%3,2f\n\t" "move %0,%4\n\t" -#if defined _ABI64 && _MIPS_SIM == _ABI64 +#if _MIPS_SIM == _MIPS_SIM_ABI64 "scd %0,%2\n\t" #else "sc %0,%2\n\t" diff --git a/sysdeps/mips/bits/setjmp.h b/sysdeps/mips/bits/setjmp.h index b2ee3749dd..4ca199d7b6 100644 --- a/sysdeps/mips/bits/setjmp.h +++ b/sysdeps/mips/bits/setjmp.h @@ -1,5 +1,5 @@ /* Define the machine-dependent type `jmp_buf'. MIPS version. - Copyright (C) 1992, 1993, 1995, 1997, 2000, 2002, 2003 + Copyright (C) 1992, 1993, 1995, 1997, 2000, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -22,6 +22,8 @@ # error "Never include directly; use instead." #endif +#include + typedef struct { #if _MIPS_SIM == _MIPS_SIM_ABI32 @@ -60,7 +62,7 @@ typedef struct int __fpc_csr; /* Callee-saved floating point registers. */ -#if defined _ABI64 && _MIPS_SIM == _ABI64 +#if _MIPS_SIM == _MIPS_SIM_ABI64 double __fpregs[8]; #else double __fpregs[6]; diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 570ac5b13d..bfd3a6250e 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -130,7 +130,7 @@ elf_machine_load_address (void) } /* The MSB of got[1] of a gnu object is set to identify gnu objects. */ -#if defined _ABI64 && _MIPS_SIM == _ABI64 +#if _MIPS_SIM == _MIPS_SIM_ABI64 # define ELF_MIPS_GNU_GOT1_MASK 0x8000000000000000L #else # define ELF_MIPS_GNU_GOT1_MASK 0x80000000L diff --git a/sysdeps/mips/fpu/bits/mathdef.h b/sysdeps/mips/fpu/bits/mathdef.h index 4a51768244..c1ce876bf7 100644 --- a/sysdeps/mips/fpu/bits/mathdef.h +++ b/sysdeps/mips/fpu/bits/mathdef.h @@ -21,6 +21,8 @@ # error "Never use directly; include instead" #endif +#include + #if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF # define _MATH_H_MATHDEF 1 diff --git a/sysdeps/mips/machine-gmon.h b/sysdeps/mips/machine-gmon.h index 5a87c85bf0..f23a4c3008 100644 --- a/sysdeps/mips/machine-gmon.h +++ b/sysdeps/mips/machine-gmon.h @@ -1,5 +1,5 @@ /* Machine-specific calling sequence for `mcount' profiling function. MIPS - Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003 + Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -18,6 +18,8 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include + #define _MCOUNT_DECL(frompc,selfpc) \ static void __attribute_used__ __mcount (u_long frompc, u_long selfpc) @@ -81,10 +83,10 @@ static void __attribute_used__ __mcount (u_long frompc, u_long selfpc) # define CPRETURN #endif -#if defined _ABIN32 && _MIPS_SIM == _ABIN32 +#if _MIPS_SIM == _MIPS_SIM_NABI32 # define PTR_ADDU_STRING "add" /* no u */ # define PTR_SUBU_STRING "sub" /* no u */ -#elif defined _ABI64 && _MIPS_SIM == _ABI64 +#elif _MIPS_SIM == _MIPS_SIM_ABI64 # define PTR_ADDU_STRING "daddu" # define PTR_SUBU_STRING "dsubu" #else diff --git a/sysdeps/mips/mips64/__longjmp.c b/sysdeps/mips/mips64/__longjmp.c index 32587d1c87..b2705793b2 100644 --- a/sysdeps/mips/mips64/__longjmp.c +++ b/sysdeps/mips/mips64/__longjmp.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1992, 1995, 1997, 2000, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995, 1997, 2000, 2003, 2004 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -38,7 +39,7 @@ __longjmp (env, val_arg) register int val asm ("a1"); /* Pull back the floating point callee-saved registers. */ -#if defined _ABI64 && _MIPS_SIM == _ABI64 +#if _MIPS_SIM == _MIPS_SIM_ABI64 asm volatile ("l.d $f24, %0" : : "m" (env[0].__fpregs[0])); asm volatile ("l.d $f25, %0" : : "m" (env[0].__fpregs[1])); asm volatile ("l.d $f26, %0" : : "m" (env[0].__fpregs[2])); diff --git a/sysdeps/mips/mips64/setjmp_aux.c b/sysdeps/mips/mips64/setjmp_aux.c index b55a3c6c11..b5afd14cbf 100644 --- a/sysdeps/mips/mips64/setjmp_aux.c +++ b/sysdeps/mips/mips64/setjmp_aux.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -29,7 +29,7 @@ __sigsetjmp_aux (jmp_buf env, int savemask, long long sp, long long fp, long long gp) { /* Store the floating point callee-saved registers... */ -#if defined _ABI64 && _MIPS_SIM == _ABI64 +#if _MIPS_SIM == _MIPS_SIM_ABI64 asm volatile ("s.d $f24, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[0])); asm volatile ("s.d $f25, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[1])); asm volatile ("s.d $f26, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[2])); diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile index d65175f5ea..c3ab6edeec 100644 --- a/sysdeps/unix/sysv/linux/mips/Makefile +++ b/sysdeps/unix/sysv/linux/mips/Makefile @@ -21,15 +21,16 @@ $(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/mips/sys/s echo '# error "Never use directly; include instead."'; \ echo '#endif'; \ echo ''; \ + echo '#include '; \ rm -f $(@:.d=.h).newt; \ $(CC) -E -MD -MP -MF $(@:.h=.d)-t -MT '$(@:.d=.h) $(@:.h=.d)' \ -x c -I $(common-objdir) $(sysincludes) $< -D_LIBC -dM | \ sed -n 's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p' \ > $(@:.d=.h).newt; \ if grep SYS_O32_ $(@:.d=.h).newt > /dev/null; then \ - echo '#if defined _ABI64 && _MIPS_SIM == _ABI64'; \ + echo '#if _MIPS_SIM == _MIPS_SIM_ABI64'; \ sed -n 's/^\(#define SYS_\)N64_/\1/p' < $(@:.d=.h).newt; \ - echo '#elif defined _ABIN32 && _MIPS_SIM == _ABIN32'; \ + echo '#elif _MIPS_SIM == _MIPS_SIM_NABI32'; \ sed -n 's/^\(#define SYS_\)N32_/\1/p' < $(@:.d=.h).newt; \ echo '#else'; \ sed -n 's/^\(#define SYS_\)O32_/\1/p' < $(@:.d=.h).newt; \ diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index 720e0a90e0..48531d8c0b 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -23,7 +23,7 @@ #endif #include - +#include /* open/fcntl - O_SYNC is only implemented on blocks devices and on files located on an ext2 file system */ @@ -143,7 +143,7 @@ typedef struct flock #ifndef __USE_FILE_OFFSET64 __off_t l_start; /* Offset where the lock begins. */ __off_t l_len; /* Size of the locked area; zero means until EOF. */ -#if ! (defined _ABI64 && _MIPS_SIM == _ABI64) +#if _MIPS_SIM != _MIPS_SIM_ABI64 /* The 64-bit flock structure, used by the n64 ABI, and for 64-bit fcntls in o32 and n32, never has this field. */ long int l_sysid; @@ -153,7 +153,7 @@ typedef struct flock __off64_t l_len; /* Size of the locked area; zero means until EOF. */ #endif __pid_t l_pid; /* Process holding the lock. */ -#if ! defined __USE_FILE_OFFSET64 && ! (defined _ABI64 && _MIPS_SIM == _ABI64) +#if ! defined __USE_FILE_OFFSET64 && _MIPS_SIM != _MIPS_SIM_ABI64 /* The 64-bit flock structure, used by the n64 ABI, and for 64-bit flock in o32 and n32, never has this field. */ long int pad[4]; diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h b/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h index 888c05f6b6..19f58812df 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h +++ b/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998, 2003, 2004 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,6 +20,8 @@ # error "Never use directly; include instead." #endif +#include + #ifndef sigcontext_struct /* Kernel headers before 2.1.1 define a struct sigcontext_struct, but we need sigcontext. */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h index c3819d3981..2dd4cab85c 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/stat.h +++ b/sysdeps/unix/sysv/linux/mips/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003 +/* Copyright (C) 1992, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -21,6 +21,8 @@ # error "Never include directly; use instead." #endif +#include + /* Versions of the `struct stat' data structure. */ #define _STAT_VER_LINUX_OLD 1 #define _STAT_VER_KERNEL 1 diff --git a/sysdeps/unix/sysv/linux/mips/configure b/sysdeps/unix/sysv/linux/mips/configure index 9a7b423962..8ee636fb99 100644 --- a/sysdeps/unix/sysv/linux/mips/configure +++ b/sysdeps/unix/sysv/linux/mips/configure @@ -30,6 +30,7 @@ echo "$as_me: WARNING: *** asm/unistd.h not found, it will not be pre-processed" -e 's,__NR_N64_N32_,__NR_N32_,g' \ -e 's,__NR_N64_N64_,__NR_N64_,g' \ | awk > asm-unistd.h ' +BEGIN { print "#include "; } /^#define __NR.*unused/ { print; next; } /^#define __NR_N64__exit __NR_N64_exit/ { print "#define __NR__exit __NR_exit"; @@ -50,7 +51,7 @@ echo "$as_me: WARNING: *** asm/unistd.h not found, it will not be pre-processed" name = $2; sub (/_N32_/, "_", name); print; - print "#if defined _ABIN32 && _MIPS_SIM == _ABIN32"; + print "#if _MIPS_SIM == _MIPS_SIM_NABI32"; print "# define " name " " $2; print "#endif"; next; @@ -59,7 +60,7 @@ echo "$as_me: WARNING: *** asm/unistd.h not found, it will not be pre-processed" name = $2; sub (/_N64_/, "_", name); print; - print "#if defined _ABI64 && _MIPS_SIM == _ABI64"; + print "#if _MIPS_SIM == _MIPS_SIM_ABI64"; print "# define " name " " $2; print "#endif"; next; diff --git a/sysdeps/unix/sysv/linux/mips/configure.in b/sysdeps/unix/sysv/linux/mips/configure.in index 3df0c91b30..6783bc2b4a 100644 --- a/sysdeps/unix/sysv/linux/mips/configure.in +++ b/sysdeps/unix/sysv/linux/mips/configure.in @@ -30,6 +30,7 @@ mips*64*) -e 's,__NR_N64_N32_,__NR_N32_,g' \ -e 's,__NR_N64_N64_,__NR_N64_,g' \ | awk > asm-unistd.h ' +BEGIN { print "#include "; } /^#define __NR.*unused/ { print; next; } /^#define __NR_N64__exit __NR_N64_exit/ { print "#define __NR__exit __NR_exit"; @@ -50,7 +51,7 @@ mips*64*) name = $2; sub (/_N32_/, "_", name); print; - print "#if defined _ABIN32 && _MIPS_SIM == _ABIN32"; + print "#if _MIPS_SIM == _MIPS_SIM_NABI32"; print "# define " name " " $2; print "#endif"; next; @@ -59,7 +60,7 @@ mips*64*) name = $2; sub (/_N64_/, "_", name); print; - print "#if defined _ABI64 && _MIPS_SIM == _ABI64"; + print "#if _MIPS_SIM == _MIPS_SIM_ABI64"; print "# define " name " " $2; print "#endif"; next; diff --git a/sysdeps/unix/sysv/linux/mips/kernel_stat.h b/sysdeps/unix/sysv/linux/mips/kernel_stat.h index 3f1bce57c5..6a4c4093d8 100644 --- a/sysdeps/unix/sysv/linux/mips/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/mips/kernel_stat.h @@ -1,3 +1,4 @@ +#include /* As tempting as it is to define XSTAT_IS_XSTAT64 for n64, the userland data structures are not identical, because of different padding. */ diff --git a/sysdeps/unix/sysv/linux/mips/pread.c b/sysdeps/unix/sysv/linux/mips/pread.c index 7a9b0860ba..d2a6c69db5 100644 --- a/sysdeps/unix/sysv/linux/mips/pread.c +++ b/sysdeps/unix/sysv/linux/mips/pread.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1997, 1998, 2000, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2000, 2002, 2003, 2004 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -27,6 +28,7 @@ #include #include +#include #ifdef __NR_pread64 /* Newer kernels renamed but it's the same. */ # ifdef __NR_pread @@ -51,14 +53,14 @@ __libc_pread (fd, buf, count, offset) { ssize_t result; -#if (defined _ABI64 && _MIPS_SIM != _ABI64) +#if _MIPS_SIM != _MIPS_SIM_ABI64 assert (sizeof (offset) == 4); #endif if (SINGLE_THREAD_P) { /* First try the syscall. */ -#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) || (defined _ABI64 && _MIPS_SIM == _ABI64) +#if _MIPS_SIM == _MIPS_SIM_NABI32 || _MIPS_SIM == _MIPS_SIM_ABI64 result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count, offset); #else @@ -76,7 +78,7 @@ __libc_pread (fd, buf, count, offset) int oldtype = LIBC_CANCEL_ASYNC (); /* First try the syscall. */ -#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) || (defined _ABI64 && _MIPS_SIM == _ABI64) +#if _MIPS_SIM == _MIPS_SIM_NABI32 || _MIPS_SIM_ABI64 result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count, offset); #else result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, diff --git a/sysdeps/unix/sysv/linux/mips/pread64.c b/sysdeps/unix/sysv/linux/mips/pread64.c index 25f80df8ed..b63bb9c2aa 100644 --- a/sysdeps/unix/sysv/linux/mips/pread64.c +++ b/sysdeps/unix/sysv/linux/mips/pread64.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1997, 1998, 2000, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2000, 2002, 2003, 2004 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -26,6 +27,7 @@ #include #include +#include #ifdef __NR_pread64 /* Newer kernels renamed but it's the same. */ # ifdef __NR_pread @@ -54,7 +56,7 @@ __libc_pread64 (fd, buf, count, offset) if (SINGLE_THREAD_P) { /* First try the syscall. */ -#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) || (defined _ABI64 && _MIPS_SIM == _ABI64) +#if _MIPS_SIM == _MIPS_SIM_NABI32 || _MIPS_SIM == _MIPS_SIM_ABI64 result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count, offset); #else @@ -73,7 +75,7 @@ __libc_pread64 (fd, buf, count, offset) int oldtype = LIBC_CANCEL_ASYNC (); /* First try the syscall. */ -#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) || (defined _ABI64 && _MIPS_SIM == _ABI64) +#if _MIPS_SIM == _MIPS_SIM_NABI32 || _MIPS_SIM == _MIPS_SIM_ABI64 result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count, offset); #else result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, diff --git a/sysdeps/unix/sysv/linux/mips/ptrace.c b/sysdeps/unix/sysv/linux/mips/ptrace.c index 78c662a9db..af8266d78f 100644 --- a/sysdeps/unix/sysv/linux/mips/ptrace.c +++ b/sysdeps/unix/sysv/linux/mips/ptrace.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2003 +/* Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -26,8 +26,9 @@ #include #include #include +#include -#if defined _ABIN32 && _MIPS_SIM == _ABIN32 +#if _MIPS_SIM == _MIPS_SIM_NABI32 __extension__ typedef long long int reg_type; #else typedef long int reg_type; diff --git a/sysdeps/unix/sysv/linux/mips/pwrite.c b/sysdeps/unix/sysv/linux/mips/pwrite.c index 3c0eba5757..50c8265236 100644 --- a/sysdeps/unix/sysv/linux/mips/pwrite.c +++ b/sysdeps/unix/sysv/linux/mips/pwrite.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1997, 1998, 2000, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2000, 2002, 2003, 2004 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -27,6 +28,7 @@ #include #include +#include #ifdef __NR_pwrite64 /* Newer kernels renamed but it's the same. */ # ifdef __NR_pwrite @@ -51,14 +53,14 @@ __libc_pwrite (fd, buf, count, offset) { ssize_t result; -#if (defined _ABI64 && _MIPS_SIM != _ABI64) +#if _MIPS_SIM == _MIPS_SIM_ABI64 assert (sizeof (offset) == 4); #endif if (SINGLE_THREAD_P) { /* First try the syscall. */ -#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) || (defined _ABI64 && _MIPS_SIM == _ABI64) +#if _MIPS_SIM == _MIPS_SIM_NABI32 || _MIPS_SIM == _MIPS_SIM_ABI64 result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count, offset); #else @@ -76,7 +78,7 @@ __libc_pwrite (fd, buf, count, offset) int oldtype = LIBC_CANCEL_ASYNC (); /* First try the syscall. */ -#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) || (defined _ABI64 && _MIPS_SIM == _ABI64) +#if _MIPS_SIM == _MIPS_SIM_NABI32 || _MIPS_SIM == _MIPS_SIM_ABI64 result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count, offset); #else result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0, diff --git a/sysdeps/unix/sysv/linux/mips/pwrite64.c b/sysdeps/unix/sysv/linux/mips/pwrite64.c index fef333bcb1..109b2c5946 100644 --- a/sysdeps/unix/sysv/linux/mips/pwrite64.c +++ b/sysdeps/unix/sysv/linux/mips/pwrite64.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1997, 1998, 2000, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2000, 2002, 2003, 2004 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ralf Baechle , 1998. @@ -53,7 +54,7 @@ __libc_pwrite64 (fd, buf, count, offset) if (SINGLE_THREAD_P) { /* First try the syscall. */ -#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) || (defined _ABI64 && _MIPS_SIM == _ABI64) +#if _MIPS_SIM == _MIPS_SIM_NABI32 || _MIPS_SIM == _MIPS_SIM_ABI64 result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count, offset); #else @@ -73,7 +74,7 @@ __libc_pwrite64 (fd, buf, count, offset) int oldtype = LIBC_CANCEL_ASYNC (); /* First try the syscall. */ -#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) || (defined _ABI64 && _MIPS_SIM == _ABI64) +#if _MIPS_SIM == _MIPS_SIM_NABI32 || _MIPS_SIM == _MIPS_SIM_ABI64 result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count, offset); #else result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0, diff --git a/sysdeps/unix/sysv/linux/mips/sigaction.c b/sysdeps/unix/sysv/linux/mips/sigaction.c index bc7db2b555..83b71debc9 100644 --- a/sysdeps/unix/sysv/linux/mips/sigaction.c +++ b/sysdeps/unix/sysv/linux/mips/sigaction.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1997,1998,1999,2000,2002,2003 Free Software Foundation, Inc. +/* Copyright (C) 1997,1998,1999,2000,2002,2003, 2004 + 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,6 +24,8 @@ #include #include +#include + #include "kernel-features.h" /* The difference here is that the sigaction structure used in the diff --git a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h index 3ab6d99e75..2b50647c4c 100644 --- a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h +++ b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2001, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger , 2000. @@ -18,6 +18,8 @@ 02111-1307 USA. */ +#include + #if _MIPS_SIM == _MIPS_SIM_ABI32 #define SIGCONTEXT unsigned long _code, struct sigcontext * diff --git a/sysdeps/unix/sysv/linux/mips/sys/procfs.h b/sysdeps/unix/sysv/linux/mips/sys/procfs.h index 0beb332487..cb84677175 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/mips/sys/procfs.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 +/* Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -28,12 +28,13 @@ #include #include #include +#include /* ELF register definitions */ #define ELF_NGREG 45 #define ELF_NFPREG 33 -#if defined _ABIN32 && _MIPS_SIM == _ABIN32 +#if _MIPS_SIM == _MIPS_SIM_NABI32 __extension__ typedef unsigned long long elf_greg_t; #else typedef unsigned long elf_greg_t; @@ -64,7 +65,7 @@ struct elf_prstatus { struct elf_siginfo pr_info; /* Info associated with signal. */ short int pr_cursig; /* Current signal. */ -#if defined _ABIN32 && _MIPS_SIM == _ABIN32 +#if _MIPS_SIM == _MIPS_SIM_NABI32 __extension__ unsigned long long int pr_sigpend; __extension__ unsigned long long int pr_sighold; #else @@ -92,7 +93,7 @@ struct elf_prpsinfo char pr_sname; /* Char for pr_state. */ char pr_zomb; /* Zombie. */ char pr_nice; /* Nice val. */ -#if defined _ABIN32 && _MIPS_SIM == _ABIN32 +#if _MIPS_SIM == _MIPS_SIM_NABI32 __extension__ unsigned long long int pr_flag; #else unsigned long int pr_flag; /* Flags. */ diff --git a/sysdeps/unix/sysv/linux/mips/sys/ptrace.h b/sysdeps/unix/sysv/linux/mips/sys/ptrace.h index a8e4a476ec..9badeb3a82 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/ptrace.h +++ b/sysdeps/unix/sysv/linux/mips/sys/ptrace.h @@ -1,5 +1,5 @@ /* `ptrace' debugger support interface. Linux version. - Copyright (C) 1996, 1997, 1998, 1999, 2000, 2002, 2003 + Copyright (C) 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -22,6 +22,7 @@ #define _SYS_PTRACE_H 1 #include +#include __BEGIN_DECLS @@ -123,7 +124,7 @@ enum __ptrace_request appear (those that are used for the particular request) as: pid_t PID, void *ADDR, int DATA, void *ADDR2 after REQUEST. */ -#if defined _ABIN32 && _MIPS_SIM == _ABIN32 +#if _MIPS_SIM == _MIPS_SIM_NABI32 __extension__ extern long long int ptrace (enum __ptrace_request __request, ...) __THROW; #else diff --git a/sysdeps/unix/sysv/linux/mips/sys/tas.h b/sysdeps/unix/sysv/linux/mips/sys/tas.h index a840a9427a..006e1614c7 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/tas.h +++ b/sysdeps/unix/sysv/linux/mips/sys/tas.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Maciej W. Rozycki , 2000. @@ -22,6 +22,8 @@ #include +#include + __BEGIN_DECLS extern int _test_and_set (int *p, int v) __THROW; diff --git a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h index b097bf2ab5..c03566b1ff 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 2000, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2000, 2003, 2004 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,6 +28,7 @@ included in . */ #include +#include /* Type for general register. Even in o32 we assume 64-bit registers, like the kernel. */ diff --git a/sysdeps/unix/sysv/linux/mips/sys/user.h b/sysdeps/unix/sysv/linux/mips/sys/user.h index 8b21ff2786..dc3ee837d3 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/user.h +++ b/sysdeps/unix/sysv/linux/mips/sys/user.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004 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 @@ -19,6 +19,8 @@ #ifndef _SYS_USER_H #define _SYS_USER_H 1 +#include + /* The whole purpose of this file is for GDB and GDB only. Don't read too much into it. Don't use it for anything other than GDB unless you know what you are doing. */ From c65436649678d4ff02ae73ac9207e7e682462c90 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 20 Jul 2004 16:37:41 +0000 Subject: [PATCH 3325/4487] ($(objpfx)syscall-%.h): Sort by syscalls. Make sure we get headers such as sgidefs.h from the build tree before just-installed ones. --- sysdeps/unix/sysv/linux/mips/Makefile | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile index c3ab6edeec..db06a48405 100644 --- a/sysdeps/unix/sysv/linux/mips/Makefile +++ b/sysdeps/unix/sysv/linux/mips/Makefile @@ -24,18 +24,22 @@ $(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/mips/sys/s echo '#include '; \ rm -f $(@:.d=.h).newt; \ $(CC) -E -MD -MP -MF $(@:.h=.d)-t -MT '$(@:.d=.h) $(@:.h=.d)' \ - -x c -I $(common-objdir) $(sysincludes) $< -D_LIBC -dM | \ + -x c $(+includes) $(sysincludes) $< -D_LIBC -dM | \ sed -n 's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p' \ > $(@:.d=.h).newt; \ if grep SYS_O32_ $(@:.d=.h).newt > /dev/null; then \ - echo '#if _MIPS_SIM == _MIPS_SIM_ABI64'; \ - sed -n 's/^\(#define SYS_\)N64_/\1/p' < $(@:.d=.h).newt; \ - echo '#elif _MIPS_SIM == _MIPS_SIM_NABI32'; \ - sed -n 's/^\(#define SYS_\)N32_/\1/p' < $(@:.d=.h).newt; \ + echo '#if _MIPS_SIM == _MIPS_SIM_NABI32'; \ + sed -n 's/^\(#define SYS_\)N32_/\1/p' < $(@:.d=.h).newt | \ + LC_ALL=C sort; \ + echo '#elif _MIPS_SIM == _MIPS_SIM_ABI64'; \ + sed -n 's/^\(#define SYS_\)N64_/\1/p' < $(@:.d=.h).newt | \ + LC_ALL=C sort; \ echo '#else'; \ - sed -n 's/^\(#define SYS_\)O32_/\1/p' < $(@:.d=.h).newt; \ + sed -n 's/^\(#define SYS_\)O32_/\1/p' < $(@:.d=.h).newt | \ + LC_ALL=C sort; \ echo '#endif'; \ - sed -n '/^#define SYS_\([ON]32\|N64\)_/p' < $(@:.d=.h).newt; \ + sed -n '/^#define SYS_\([ON]32\|N64\)_/p' < $(@:.d=.h).newt | \ + LC_ALL=C sort +1.8; \ else \ cat $(@:.d=.h).newt; \ fi; \ From 5c3c0a7a13ed5fc69dae54a8fdae0b56c9c6a761 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 21 Jul 2004 06:13:15 +0000 Subject: [PATCH 3326/4487] Add semtimedop. --- sysdeps/unix/sysv/linux/mips/mips64/syscalls.list | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list b/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list index b6d2e9444f..b0d79ff6a4 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list @@ -16,5 +16,6 @@ shmctl - shmctl i:iip __shmctl shmctl shmdt - shmdt i:s __shmdt shmdt shmget - shmget i:iii __shmget shmget semop - semop i:ipi __semop semop +semtimedop - semtimedop i:ipip semtimedop semget - semget i:iii __semget semget semctl - semctl i:iiii __semctl semctl From bd68d85075a86736c25df42fc53cc41c73a3ded5 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 30 Jul 2004 18:15:57 +0000 Subject: [PATCH 3327/4487] * sysdeps/alpha/divq.S: Save t3 before it gets clobbered. * sysdeps/alpha/remq.S: Likewise. * sysdeps/alpha/div.S, sysdeps/alpha/ldiv.S: Rewrite with the new division algorithms in divl.S and divq.S respectively. --- sysdeps/alpha/div.S | 102 ++++++++----------- sysdeps/alpha/divq.S | 12 +-- sysdeps/alpha/ldiv.S | 228 +++++++++++++++++++++++++++++++------------ sysdeps/alpha/remq.S | 12 +-- 4 files changed, 216 insertions(+), 138 deletions(-) diff --git a/sysdeps/alpha/div.S b/sysdeps/alpha/div.S index 2bc3d56a11..e0eb7e9796 100644 --- a/sysdeps/alpha/div.S +++ b/sysdeps/alpha/div.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson . @@ -17,13 +17,13 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include +#include "div_libc.h" -#ifdef __linux__ -# include -# include +#undef FRAME +#ifdef __alpha_fix__ +#define FRAME 0 #else -# include +#define FRAME 16 #endif .set noat @@ -32,78 +32,54 @@ .globl div .ent div div: - .frame sp, 0, ra + .frame sp, FRAME, ra +#if FRAME > 0 + lda sp, -FRAME(sp) +#endif #ifdef PROF + .set macro ldgp gp, 0(pv) lda AT, _mcount jsr AT, (AT), _mcount + .set nomacro .prologue 1 #else .prologue 0 #endif -#define divisor t1 -#define mask t2 -#define quotient t3 -#define modulus t4 -#define tmp1 t5 -#define tmp2 t6 -#define compare t7 - - /* find correct sign for input to unsigned divide loop. */ - negl a1, modulus # e0 : - negl a2, divisor # .. e1 : - sextl a1, a1 # e0 : - sextl a2, a2 # .. e1 : - mov zero, quotient # e0 : - mov 1, mask # .. e1 : - cmovge a1, a1, modulus # e0 : - cmovge a2, a2, divisor # .. e1 : - beq a2, $divbyzero # e1 : - unop # : - - /* shift divisor left, using 3-bit shifts for 32-bit divides as we - can't overflow. Three-bit shifts will result in looping three - times less here, but can result in two loops more later. Thus - using a large shift isn't worth it (and s8addq pairs better than - a shift). */ - -1: cmpult divisor, modulus, compare # e0 : - s8addq divisor, zero, divisor # .. e1 : - s8addq mask, zero, mask # e0 : - bne compare, 1b # .. e1 : - - /* start to go right again. */ -2: addq quotient, mask, tmp2 # e1 : - srl mask, 1, mask # .. e0 : - cmpule divisor, modulus, compare # e0 : - subq modulus, divisor, tmp1 # .. e1 : - cmovne compare, tmp2, quotient # e1 : - srl divisor, 1, divisor # .. e0 : - cmovne compare, tmp1, modulus # e0 : - bne mask, 2b # .. e1 : - - /* find correct sign for result. */ - xor a1, a2, compare # e0 : - negl quotient, tmp1 # .. e1 : - negl modulus, tmp2 # e0 : - cmovlt compare, tmp1, quotient # .. e1 : - cmovlt a1, tmp2, modulus # e1 : - - /* and store it away in the structure. */ - stl quotient, 0(a0) # .. e0 : - mov a0, v0 # e1 : - stl modulus, 4(a0) # .. e0 : - ret # e1 : + beq $18, $divbyzero + + _ITOFT2 $17, $f0, 0, $18, $f1, 8 + + cvtqt $f0, $f0 + cvtqt $f1, $f1 + divt/c $f0, $f1, $f0 + cvttq/c $f0, $f0 + + _FTOIT $f0, $0, 0 + + mull $0, $18, $1 + subl $17, $1, $1 + + stl $0, 0(a0) + stl $1, 4(a0) + mov a0, v0 + +#if FRAME > 0 + lda sp, FRAME(sp) +#endif + ret $divbyzero: mov a0, v0 - ldiq a0, GEN_INTDIV + lda a0, GEN_INTDIV call_pal PAL_gentrap - - /* if trap returns, return zero. */ stl zero, 0(v0) stl zero, 4(v0) + +#if FRAME > 0 + lda sp, FRAME(sp) +#endif ret .end div diff --git a/sysdeps/alpha/divq.S b/sysdeps/alpha/divq.S index 4df79829f9..cab6c34ad1 100644 --- a/sysdeps/alpha/divq.S +++ b/sysdeps/alpha/divq.S @@ -115,16 +115,16 @@ $fix_sign_in_ret1: _FTOIT $f0, Q, 8 .align 3 $fix_sign_in_ret2: + ldt $f0, 0(sp) + stq t3, 0(sp) + cfi_restore ($f0) + cfi_rel_offset (t3, 0) + mulq Q, Y, QY + unop stq t4, 8(sp) - - ldt $f0, 0(sp) unop cfi_rel_offset (t4, 8) - cfi_restore ($f0) - stq t3, 0(sp) - unop - cfi_rel_offset (t3, 0) subq QY, X, R mov Y, SY diff --git a/sysdeps/alpha/ldiv.S b/sysdeps/alpha/ldiv.S index 81b48cd559..c90edfb784 100644 --- a/sysdeps/alpha/ldiv.S +++ b/sysdeps/alpha/ldiv.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 2001, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson . @@ -17,93 +17,195 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include +#include "div_libc.h" -#ifdef __linux__ -# include -# include +#undef FRAME +#ifdef __alpha_fix__ +#define FRAME 0 #else -# include +#define FRAME 16 #endif +#undef X +#undef Y +#define X $17 +#define Y $18 + .set noat .align 4 .globl ldiv .ent ldiv ldiv: - .frame sp, 0, ra + .frame sp, FRAME, ra +#if FRAME > 0 + lda sp, -FRAME(sp) +#endif #ifdef PROF + .set macro ldgp gp, 0(pv) lda AT, _mcount jsr AT, (AT), _mcount + .set nomacro .prologue 1 #else .prologue 0 #endif -#define divisor t1 -#define mask t2 -#define quotient t3 -#define modulus t4 -#define tmp1 t5 -#define tmp2 t6 -#define compare t7 - - /* find correct sign for input to unsigned divide loop. */ - mov a1, modulus # e0 : - mov a2, divisor # .. e1 : - negq a1, tmp1 # e0 : - negq a2, tmp2 # .. e1 : - mov zero, quotient # e0 : - mov 1, mask # .. e1 : - cmovlt a1, tmp1, modulus # e0 : - cmovlt a2, tmp2, divisor # .. e1 : - beq a2, $divbyzero # e1 : - unop # : - - /* shift divisor left. */ -1: cmpult divisor, modulus, compare # e0 : - blt divisor, 2f # .. e1 : - addq divisor, divisor, divisor # e0 : - addq mask, mask, mask # .. e1 : - bne compare, 1b # e1 : - unop # : - - /* start to go right again. */ -2: addq quotient, mask, tmp2 # e1 : - srl mask, 1, mask # .. e0 : - cmpule divisor, modulus, compare # e0 : - subq modulus, divisor, tmp1 # .. e1 : - cmovne compare, tmp2, quotient # e1 : - srl divisor, 1, divisor # .. e0 : - cmovne compare, tmp1, modulus # e0 : - bne mask, 2b # .. e1 : - - /* find correct sign for result. */ - xor a1, a2, compare # e0 : - negq quotient, tmp1 # .. e1 : - negq modulus, tmp2 # e0 : - cmovlt compare, tmp1, quotient # .. e1 : - cmovlt a1, tmp2, modulus # e1 : - - /* and store it away in the structure. */ -9: stq quotient, 0(a0) # .. e0 : - mov a0, v0 # e1 : - stq modulus, 8(a0) # .. e0 : - ret # e1 : + beq Y, $divbyzero + + _ITOFT2 X, $f0, 0, Y, $f1, 8 + + .align 4 + cvtqt $f0, $f0 + cvtqt $f1, $f1 + divt/c $f0, $f1, $f0 + unop + + /* Check to see if X fit in the double as an exact value. */ + sll X, (64-53), AT + sra AT, (64-53), AT + cmpeq X, AT, AT + beq AT, $x_big + + /* If we get here, we're expecting exact results from the division. + Do nothing else besides convert and clean up. */ + cvttq/c $f0, $f0 + _FTOIT $f0, $0, 0 + +$egress: + mulq $0, Y, $1 + subq X, $1, $1 + + stq $0, 0($16) + stq $1, 8($16) + mov $16, $0 + +#if FRAME > 0 + lda sp, FRAME(sp) +#endif + ret + + .align 4 +$x_big: + /* If we get here, X is large enough that we don't expect exact + results, and neither X nor Y got mis-translated for the fp + division. Our task is to take the fp result, figure out how + far it's off from the correct result and compute a fixup. */ + +#define Q v0 /* quotient */ +#define R t0 /* remainder */ +#define SY t1 /* scaled Y */ +#define S t2 /* scalar */ +#define QY t3 /* Q*Y */ + + /* The fixup code below can only handle unsigned values. */ + or X, Y, AT + mov $31, t5 + blt AT, $fix_sign_in +$fix_sign_in_ret1: + cvttq/c $f0, $f0 + + _FTOIT $f0, Q, 8 + .align 3 +$fix_sign_in_ret2: + mulq Q, Y, QY + + .align 4 + subq QY, X, R + mov Y, SY + mov 1, S + bgt R, $q_high + +$q_high_ret: + subq X, QY, R + mov Y, SY + mov 1, S + bgt R, $q_low + +$q_low_ret: + negq Q, t4 + cmovlbs t5, t4, Q + br $egress + + .align 4 + /* The quotient that we computed was too large. We need to reduce + it by S such that Y*S >= R. Obviously the closer we get to the + correct value the better, but overshooting high is ok, as we'll + fix that up later. */ +0: + addq SY, SY, SY + addq S, S, S +$q_high: + cmpult SY, R, AT + bne AT, 0b + + subq Q, S, Q + unop + subq QY, SY, QY + br $q_high_ret + + .align 4 + /* The quotient that we computed was too small. Divide Y by the + current remainder (R) and add that to the existing quotient (Q). + The expectation, of course, is that R is much smaller than X. */ + /* Begin with a shift-up loop. Compute S such that Y*S >= R. We + already have a copy of Y in SY and the value 1 in S. */ +0: + addq SY, SY, SY + addq S, S, S +$q_low: + cmpult SY, R, AT + bne AT, 0b + + /* Shift-down and subtract loop. Each iteration compares our scaled + Y (SY) with the remainder (R); if SY <= R then X is divisible by + Y's scalar (S) so add it to the quotient (Q). */ +2: addq Q, S, t3 + srl S, 1, S + cmpule SY, R, AT + subq R, SY, t4 + + cmovne AT, t3, Q + cmovne AT, t4, R + srl SY, 1, SY + bne S, 2b + + br $q_low_ret + + .align 4 +$fix_sign_in: + /* If we got here, then X|Y is negative. Need to adjust everything + such that we're doing unsigned division in the fixup loop. */ + /* T5 is true if result should be negative. */ + xor X, Y, AT + cmplt AT, 0, t5 + cmplt X, 0, AT + negq X, t0 + + cmovne AT, t0, X + cmplt Y, 0, AT + negq Y, t0 + + cmovne AT, t0, Y + blbc t5, $fix_sign_in_ret1 + + cvttq/c $f0, $f0 + _FTOIT $f0, Q, 8 + .align 3 + negq Q, Q + br $fix_sign_in_ret2 $divbyzero: mov a0, v0 lda a0, GEN_INTDIV call_pal PAL_gentrap - - /* if trap returns, return zero. */ stq zero, 0(v0) stq zero, 8(v0) - ret - .end ldiv +#if FRAME > 0 + lda sp, FRAME(sp) +#endif + ret -weak_alias(ldiv, lldiv) -weak_alias(ldiv, imaxdiv) + .end ldiv diff --git a/sysdeps/alpha/remq.S b/sysdeps/alpha/remq.S index a8795c8d24..40c68d7f10 100644 --- a/sysdeps/alpha/remq.S +++ b/sysdeps/alpha/remq.S @@ -116,16 +116,16 @@ $fix_sign_in_ret1: _FTOIT $f0, Q, 8 .align 3 $fix_sign_in_ret2: + ldt $f0, 0(sp) + stq t3, 0(sp) + cfi_restore ($f0) + cfi_rel_offset (t3, 0) + mulq Q, Y, QY + unop stq t4, 8(sp) - - ldt $f0, 0(sp) unop cfi_rel_offset (t4, 8) - cfi_restore ($f0) - stq t3, 0(sp) - unop - cfi_rel_offset (t3, 0) subq QY, X, R mov Y, SY From 717de822dcc29cc7f34e7c94e63b3f4cf572f470 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 5 Aug 2004 03:46:43 +0000 Subject: [PATCH 3328/4487] 2004-08-04 Roland McGrath New directory implementing glibc add-on infrastructure for ports maintained separate from the core glibc source tree. * README, configure.in, Makeconfig, Banner, ChangeLog: New files. * configure: New generated file. --- Banner | 1 + ChangeLog | 6 ++++++ Makeconfig | 35 +++++++++++++++++++++++++++++++++++ README | 39 +++++++++++++++++++++++++++++++++++++++ configure | 17 +++++++++++++++++ configure.in | 17 +++++++++++++++++ 6 files changed, 115 insertions(+) create mode 100644 Banner create mode 100644 ChangeLog create mode 100644 Makeconfig create mode 100644 README create mode 100755 configure create mode 100644 configure.in diff --git a/Banner b/Banner new file mode 100644 index 0000000000..6b9c1f0b4a --- /dev/null +++ b/Banner @@ -0,0 +1 @@ +Support for some architectures added on, not maintained in glibc core. diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000000..efaee34188 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,6 @@ +2004-08-04 Roland McGrath + + New directory implementing glibc add-on infrastructure for + ports maintained separate from the core glibc source tree. + * README, configure.in, Makeconfig, Banner, ChangeLog: New files. + * configure: New generated file. diff --git a/Makeconfig b/Makeconfig new file mode 100644 index 0000000000..20a0f08cca --- /dev/null +++ b/Makeconfig @@ -0,0 +1,35 @@ +# Makeconfig fragment for glibc ports add-on. + +# These rules make sure that sysdeps/CPU/preconfigure changes are noticed. +# preconfigure fragments can be written by hand, or they can be generated +# from preconfigure.in by autoconf like sysdeps/.../configure.in files. + +# Figure out the name of this add-on. The ports add-on infrastructure +# scripts can be copied into separate add-on packages by any name. +ports-sysdeps = $(..)$(Makeconfig-add-on)/sysdeps + +$(common-objpfx)config.status: $(wildcard $(ports-sysdeps)/*/preconfigure) + +ifneq ($(AUTOCONF),no) + +ifeq ($(with-cvs),yes) +define autoconf-it-cvs +test ! -d CVS || cvs $(CVSOPTS) commit -m'Regenerated: autoconf $(ACFLAGS) $<' $@ +endef +else +autoconf-it-cvs = +endif + +define autoconf-it +@-rm -f $@.new +$(AUTOCONF) $(ACFLAGS) $< > $@.new +chmod a-w,a+x $@.new +mv -f $@.new $@ +$(autoconf-it-cvs) +endef + +$(..)ports/sysdeps/%/preconfigure: $(..)ports/sysdeps/%/preconfigure.in \ + aclocal.m4 + $(autoconf-it) + +endif # $(AUTOCONF) = no diff --git a/README b/README new file mode 100644 index 0000000000..8e416b7d48 --- /dev/null +++ b/README @@ -0,0 +1,39 @@ +This directory is an add-on for the GNU C Library (glibc). +It provides additional ports to machines and/or operating systems that are +not maintained in the official glibc source tree. + +The scripts in the top level of this directory provide the infrastructure +necessary for a glibc add-on. You can make a new add-on containing one or +more ports by copying configure, configure.in, and Makeconfig into your own +add-on directory, which you can give any name (it doesn't have to be +`ports'). You may want to include a README and Banner of your own talking +about your port's code in particular, rather than the generic ones here. + +The real source code for any ports is found in the sysdeps/ subdirectories. +These should be exactly what would go into the main libc source tree if you +were to incorporate it directly. The only exceptions are the files +sysdeps/*/preconfigure and sysdeps/*/preconfigure.in; these are fragments +used by this add-on's configure fragment. The purpose of these is to set +$base_machine et al when the main libc configure's defaults are not right +for some machine. Everything else can and should be done from a normal +sysdeps/.../configure fragment that is used only when the configuration +selects that sysdeps subdirectory. Each port that requires some special +treatment before the sysdeps directory list is calculated, should add a +sysdeps/CPU/preconfigure file; this can either be written by hand or +generated by Autoconf from sysdeps/CPU/preconfigure.in, and follow the +rules for glibc add-on configure fragments. No preconfigure file should do +anything on an unrelated configuration, so that disparate ports can be put +into a single add-on without interfering with each other. + +Like all glibc add-ons, the only way to use this is to place this directory +(just a symlink won't do) inside the top-level glibc source directory. +Then include the name of this directory (e.g. `ports') when you specify +`--enable-add-ons=...' to glibc's configure (or use just --enable-add-ons +to have it try every add-on directory sitting in your source tree). + +If you find problems with the top-level scripts in this add-on, please go +to http://sources.redhat.com/bugzilla/ and file a report for the glibc +under the "admin" component. + + +$Id$ diff --git a/configure b/configure new file mode 100755 index 0000000000..e90ab67db0 --- /dev/null +++ b/configure @@ -0,0 +1,17 @@ +# This file is generated from configure.in by Autoconf. DO NOT EDIT! + +# The configure fragment in this file provides infrastructure for a glibc +# add-on containing one or more glibc ports. Only these few script files +# need exist in the top-level source directory of the add-on. The ports +# themselves are contained entirely within their new sysdeps/ directories. +# This makes it easy to take these few top-level files plus a new port's +# additions to the sysdeps tree, and package a small add-on for that port. +# The same infrastructure scripts work for any number of such glibc ports +# collected together into a single shared add-on package. + +cpu_frags=`(cd $srcdir/$libc_add_on; echo sysdeps/*/preconfigure)` +for frag in $cpu_frags; do + echo "$as_me:$LINENO: result: ports add-on running preconfigure fragment $frag" >&5 +echo "${ECHO_T}ports add-on running preconfigure fragment $frag" >&6 + . $srcdir/$libc_add_on/$frag +done diff --git a/configure.in b/configure.in new file mode 100644 index 0000000000..d37cb8d7ee --- /dev/null +++ b/configure.in @@ -0,0 +1,17 @@ +dnl glibc add-on configure.in fragment for a ports add-on. +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. + +# The configure fragment in this file provides infrastructure for a glibc +# add-on containing one or more glibc ports. Only these few script files +# need exist in the top-level source directory of the add-on. The ports +# themselves are contained entirely within their new sysdeps/ directories. +# This makes it easy to take these few top-level files plus a new port's +# additions to the sysdeps tree, and package a small add-on for that port. +# The same infrastructure scripts work for any number of such glibc ports +# collected together into a single shared add-on package. + +cpu_frags=`(cd $srcdir/$libc_add_on; echo sysdeps/*/preconfigure)` +for frag in $cpu_frags; do + AC_MSG_RESULT(ports add-on running preconfigure fragment $frag) + . $srcdir/$libc_add_on/$frag +done From c908feca74ab5fe4191c060ff336fa9a4cbc36f4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 12 Aug 2004 17:27:20 +0000 Subject: [PATCH 3329/4487] Add __BEGIN_DECLS for __getpagesize declaration. --- sysdeps/unix/sysv/linux/alpha/bits/shm.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/shm.h b/sysdeps/unix/sysv/linux/alpha/bits/shm.h index 418426511c..bbee434ea0 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/shm.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/shm.h @@ -1,4 +1,5 @@ -/* Copyright (C) 1995, 1996, 1997, 2000, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 2000, 2002, 2004 + 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 @@ -35,6 +36,8 @@ #define SHM_LOCK 11 /* lock segment (root only) */ #define SHM_UNLOCK 12 /* unlock segment (root only) */ +__BEGIN_DECLS + /* Segment low boundary address multiple. */ #define SHMLBA (__getpagesize ()) extern int __getpagesize (void) __THROW __attribute__ ((__const__)); @@ -93,3 +96,5 @@ struct shm_info }; #endif /* __USE_MISC */ + +__END_DECLS From 744a7b202eaa010935ab3276d8ad276eb40bdd57 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 12 Aug 2004 18:04:51 +0000 Subject: [PATCH 3330/4487] (RLIMIT_SIGPENDING, RLIMIT_MSGQUEUE): Add. (RLIMIT_NLIMITS, RLIM_NLIMITS): Adjust. Define non-standard RLIMIT__ enums as __RLIMIT_ and adjust macros accordingly. --- sysdeps/unix/sysv/linux/alpha/bits/resource.h | 38 ++++++++++++------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/resource.h b/sysdeps/unix/sysv/linux/alpha/bits/resource.h index 3f4e72ccb1..abf5c69b26 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/resource.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/resource.h @@ -1,5 +1,6 @@ /* Bit values & structures for resource limits. Alpha/Linux version. - Copyright (C) 1994,96,97,98,99,2000 Free Software Foundation, Inc. + Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2004 + 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 @@ -55,34 +56,43 @@ enum __rlimit_resource This affects swapping; processes that are exceeding their resident set size will be more likely to have physical memory taken from them. */ - RLIMIT_RSS = 5, -#define RLIMIT_RSS RLIMIT_RSS + __RLIMIT_RSS = 5, +#define RLIMIT_RSS __RLIMIT_RSS /* Number of open files. */ RLIMIT_NOFILE = 6, - RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */ + __RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */ #define RLIMIT_NOFILE RLIMIT_NOFILE -#define RLIMIT_OFILE RLIMIT_OFILE +#define RLIMIT_OFILE __RLIMIT_OFILE /* Address space limit (?) */ RLIMIT_AS = 7, #define RLIMIT_AS RLIMIT_AS /* Number of processes. */ - RLIMIT_NPROC = 8, -#define RLIMIT_NPROC RLIMIT_NPROC + __RLIMIT_NPROC = 8, +#define RLIMIT_NPROC __RLIMIT_NPROC /* Locked-in-memory address space. */ - RLIMIT_MEMLOCK = 9, -#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK + __RLIMIT_MEMLOCK = 9, +#define RLIMIT_MEMLOCK __RLIMIT_MEMLOCK /* Maximum number of file locks. */ - RLIMIT_LOCKS = 10, -#define RLIMIT_LOCKS RLIMIT_LOCKS + __RLIMIT_LOCKS = 10, +#define RLIMIT_LOCKS __RLIMIT_LOCKS - RLIM_NLIMITS = 11 -#define RLIMIT_NLIMITS RLIMIT_NLIMITS -#define RLIM_NLIMITS RLIM_NLIMITS + /* Maximum number of pending signals. */ + __RLIMIT_SIGPENDING = 11, +#define RLIMIT_SIGPENDING __RLIMIT_SIGPENDING + + /* Maximum bytes in POSIX message queues. */ + __RLIMIT_MSGQUEUE = 12, +#define RLIMIT_MSGQUEUE __RLIMIT_MSGQUEUE + + __RLIMIT_NLIMITS = 13, + __RLIM_NLIMITS = __RLIMIT_NLIMITS +#define RLIMIT_NLIMITS __RLIMIT_NLIMITS +#define RLIM_NLIMITS __RLIM_NLIMITS }; /* Value to indicate that there is no limit. */ From 4214993aa0de76400ea3e895f0ce69d3a2cb0b80 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 12 Aug 2004 18:05:26 +0000 Subject: [PATCH 3331/4487] (RLIMIT_SIGPENDING, RLIMIT_MSGQUEUE): Add. (RLIMIT_NLIMITS, RLIM_NLIMITS): Adjust. --- sysdeps/unix/sysv/linux/mips/bits/resource.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/resource.h b/sysdeps/unix/sysv/linux/mips/bits/resource.h index b8551a2395..01cd5b5e19 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/resource.h +++ b/sysdeps/unix/sysv/linux/mips/bits/resource.h @@ -1,5 +1,6 @@ /* Bit values & structures for resource limits. Linux/MIPS version. - Copyright (C) 1994,1996,1997,1998,1999,2000 Free Software Foundation, Inc. + Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2004 + 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 @@ -80,7 +81,16 @@ enum __rlimit_resource RLIMIT_LOCKS = 10, #define RLIMIT_LOCKS RLIMIT_LOCKS - RLIM_NLIMITS = 11 + /* Maximum number of pending signals. */ + __RLIMIT_SIGPENDING = 11, +#define RLIMIT_SIGPENDING __RLIMIT_SIGPENDING + + /* Maximum bytes in POSIX message queues. */ + __RLIMIT_MSGQUEUE = 12, +#define RLIMIT_MSGQUEUE __RLIMIT_MSGQUEUE + + RLIMIT_NLIMITS = 13, + RLIM_NLIMITS = RLIMIT_NLIMITS #define RLIMIT_NLIMITS RLIMIT_NLIMITS #define RLIM_NLIMITS RLIM_NLIMITS }; From ea0b49e7f858a815a814def0be68bc4395ccc4fc Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 13 Aug 2004 05:46:37 +0000 Subject: [PATCH 3332/4487] Define non-standard RUSAGE_ enums as __RUSAGE_ and adjust macros accordingly. --- sysdeps/unix/sysv/linux/alpha/bits/resource.h | 4 +-- sysdeps/unix/sysv/linux/mips/bits/resource.h | 32 +++++++++---------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/resource.h b/sysdeps/unix/sysv/linux/alpha/bits/resource.h index abf5c69b26..868fd7b462 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/resource.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/resource.h @@ -151,8 +151,8 @@ enum __rusage_who #define RUSAGE_CHILDREN RUSAGE_CHILDREN /* Both. */ - RUSAGE_BOTH = -2 -#define RUSAGE_BOTH RUSAGE_BOTH + __RUSAGE_BOTH = -2 +#define RUSAGE_BOTH __RUSAGE_BOTH }; #define __need_timeval diff --git a/sysdeps/unix/sysv/linux/mips/bits/resource.h b/sysdeps/unix/sysv/linux/mips/bits/resource.h index 01cd5b5e19..40fc949d57 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/resource.h +++ b/sysdeps/unix/sysv/linux/mips/bits/resource.h @@ -56,30 +56,30 @@ enum __rlimit_resource This affects swapping; processes that are exceeding their resident set size will be more likely to have physical memory taken from them. */ - RLIMIT_RSS = 7, -#define RLIMIT_RSS RLIMIT_RSS + __RLIMIT_RSS = 7, +#define RLIMIT_RSS __RLIMIT_RSS /* Number of open files. */ RLIMIT_NOFILE = 5, - RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */ + __RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */ #define RLIMIT_NOFILE RLIMIT_NOFILE -#define RLIMIT_OFILE RLIMIT_OFILE +#define RLIMIT_OFILE __RLIMIT_OFILE /* Address space limit (?) */ RLIMIT_AS = 6, #define RLIMIT_AS RLIMIT_AS /* Number of processes. */ - RLIMIT_NPROC = 8, -#define RLIMIT_NPROC RLIMIT_NPROC + __RLIMIT_NPROC = 8, +#define RLIMIT_NPROC __RLIMIT_NPROC /* Locked-in-memory address space. */ - RLIMIT_MEMLOCK = 9, -#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK + __RLIMIT_MEMLOCK = 9, +#define RLIMIT_MEMLOCK __RLIMIT_MEMLOCK /* Maximum number of file locks. */ - RLIMIT_LOCKS = 10, -#define RLIMIT_LOCKS RLIMIT_LOCKS + __RLIMIT_LOCKS = 10, +#define RLIMIT_LOCKS __RLIMIT_LOCKS /* Maximum number of pending signals. */ __RLIMIT_SIGPENDING = 11, @@ -89,10 +89,10 @@ enum __rlimit_resource __RLIMIT_MSGQUEUE = 12, #define RLIMIT_MSGQUEUE __RLIMIT_MSGQUEUE - RLIMIT_NLIMITS = 13, - RLIM_NLIMITS = RLIMIT_NLIMITS -#define RLIMIT_NLIMITS RLIMIT_NLIMITS -#define RLIM_NLIMITS RLIM_NLIMITS + __RLIMIT_NLIMITS = 13, + __RLIM_NLIMITS = __RLIMIT_NLIMITS +#define RLIMIT_NLIMITS __RLIMIT_NLIMITS +#define RLIM_NLIMITS __RLIM_NLIMITS }; /* Value to indicate that there is no limit. */ @@ -151,8 +151,8 @@ enum __rusage_who #define RUSAGE_CHILDREN RUSAGE_CHILDREN /* Both. */ - RUSAGE_BOTH = -2 -#define RUSAGE_BOTH RUSAGE_BOTH + __RUSAGE_BOTH = -2 +#define RUSAGE_BOTH __RUSAGE_BOTH }; #define __need_timeval From ba5a329dddb66aece2276fd09d7d9c0572583327 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 14 Aug 2004 06:54:41 +0000 Subject: [PATCH 3333/4487] 2004-08-13 Daniel Jacobowitz * sysdeps/arm/machine-gmon.h (mcount_internal): Mark as __attribute_used__. --- sysdeps/arm/machine-gmon.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/arm/machine-gmon.h b/sysdeps/arm/machine-gmon.h index 039dfd9514..fa3f65237d 100644 --- a/sysdeps/arm/machine-gmon.h +++ b/sysdeps/arm/machine-gmon.h @@ -32,7 +32,7 @@ void _mcount (void); weak_alias (_mcount, mcount) #endif -static void mcount_internal (u_long frompc, u_long selfpc); +static void mcount_internal (u_long frompc, u_long selfpc) __attribute_used__; #define _MCOUNT_DECL(frompc, selfpc) \ static void mcount_internal (u_long frompc, u_long selfpc) From 0bec0145c4854228a95d3e83da5d2647d3f145d3 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 16 Aug 2004 04:51:04 +0000 Subject: [PATCH 3334/4487] 2004-08-15 Roland McGrath * csu/elf-init.c: Update copyright terms including special exception for these trivial files, which are statically linked into executables that use dynamic linking for the significant library code. * io/fstat.c: Likewise. * io/fstat64.c: Likewise. * io/lstat.c: Likewise. * io/lstat64.c: Likewise. * io/stat.c: Likewise. * io/stat64.c: Likewise. * stdlib/atexit.c: Likewise. * sysdeps/alpha/elf/initfini.c: Likewise. * sysdeps/alpha/elf/start.S: Likewise. * sysdeps/arm/elf/start.S: Likewise. * sysdeps/cris/elf/start.S: Likewise. * sysdeps/generic/initfini.c: Likewise. * sysdeps/generic/mknod.c: Likewise. * sysdeps/hppa/elf/initfini.c: Likewise. * sysdeps/hppa/elf/start.S: Likewise. * sysdeps/i386/elf/start.S: Likewise. * sysdeps/i386/i686/hp-timing.c: Likewise. * sysdeps/ia64/elf/initfini.c: Likewise. * sysdeps/ia64/elf/start.S: Likewise. * sysdeps/ia64/hp-timing.c: Likewise. * sysdeps/m68k/elf/start.S: Likewise. * sysdeps/mach/start.c: Likewise. * sysdeps/mips/elf/start.S: Likewise. * sysdeps/powerpc/powerpc32/elf/start.S: Likewise. * sysdeps/powerpc/powerpc64/elf/start.S: Likewise. * sysdeps/s390/s390-32/elf/start.S: Likewise. * sysdeps/s390/s390-32/initfini.c: Likewise. * sysdeps/s390/s390-64/elf/start.S: Likewise. * sysdeps/s390/s390-64/initfini.c: Likewise. * sysdeps/sh/elf/initfini.c: Likewise. * sysdeps/sh/elf/start.S: Likewise. * sysdeps/sparc/sparc32/elf/start.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/hp-timing.c: Likewise. * sysdeps/sparc/sparc64/elf/start.S: Likewise. * sysdeps/sparc/sparc64/hp-timing.c: Likewise. * sysdeps/standalone/i386/start.S: Likewise. * sysdeps/standalone/i960/start.S: Likewise. * sysdeps/standalone/m68k/m68020/start.S: Likewise. * sysdeps/unix/arm/start.c: Likewise. * sysdeps/unix/bsd/osf/alpha/start.S: Likewise. * sysdeps/unix/bsd/ultrix4/mips/start.S: Likewise. * sysdeps/unix/sparc/start.c: Likewise. * sysdeps/unix/start.c: Likewise. * sysdeps/unix/sysv/aix/start.s: Likewise. * sysdeps/unix/sysv/irix4/start.c: Likewise. * sysdeps/x86_64/elf/initfini.c: Likewise. * sysdeps/x86_64/elf/start.S: Likewise. --- sysdeps/alpha/elf/initfini.c | 17 +++++++++++++++++ sysdeps/alpha/elf/start.S | 17 +++++++++++++++++ sysdeps/arm/elf/start.S | 17 +++++++++++++++++ sysdeps/cris/elf/start.S | 17 +++++++++++++++++ sysdeps/hppa/elf/initfini.c | 17 +++++++++++++++++ sysdeps/hppa/elf/start.S | 17 +++++++++++++++++ sysdeps/m68k/elf/start.S | 17 +++++++++++++++++ sysdeps/mips/elf/start.S | 17 +++++++++++++++++ sysdeps/standalone/i386/start.S | 17 +++++++++++++++++ sysdeps/standalone/i960/start.S | 17 +++++++++++++++++ sysdeps/standalone/m68k/m68020/start.S | 17 +++++++++++++++++ sysdeps/unix/arm/start.c | 17 +++++++++++++++++ sysdeps/unix/bsd/osf/alpha/start.S | 17 +++++++++++++++++ sysdeps/unix/bsd/ultrix4/mips/start.S | 17 +++++++++++++++++ sysdeps/unix/sysv/aix/start.s | 17 +++++++++++++++++ sysdeps/unix/sysv/irix4/start.c | 17 +++++++++++++++++ 16 files changed, 272 insertions(+) diff --git a/sysdeps/alpha/elf/initfini.c b/sysdeps/alpha/elf/initfini.c index 5da7dc687f..4d3342db9b 100644 --- a/sysdeps/alpha/elf/initfini.c +++ b/sysdeps/alpha/elf/initfini.c @@ -7,6 +7,23 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + 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 diff --git a/sysdeps/alpha/elf/start.S b/sysdeps/alpha/elf/start.S index dbe4223fea..c6d7587314 100644 --- a/sysdeps/alpha/elf/start.S +++ b/sysdeps/alpha/elf/start.S @@ -9,6 +9,23 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + 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 diff --git a/sysdeps/arm/elf/start.S b/sysdeps/arm/elf/start.S index 13d4229b3b..cc076aba5c 100644 --- a/sysdeps/arm/elf/start.S +++ b/sysdeps/arm/elf/start.S @@ -7,6 +7,23 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + 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 diff --git a/sysdeps/cris/elf/start.S b/sysdeps/cris/elf/start.S index dbe408a076..a3f85bcd01 100644 --- a/sysdeps/cris/elf/start.S +++ b/sysdeps/cris/elf/start.S @@ -7,6 +7,23 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + 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 diff --git a/sysdeps/hppa/elf/initfini.c b/sysdeps/hppa/elf/initfini.c index 4275cd53c6..35f5dd52fe 100644 --- a/sysdeps/hppa/elf/initfini.c +++ b/sysdeps/hppa/elf/initfini.c @@ -7,6 +7,23 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + 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 diff --git a/sysdeps/hppa/elf/start.S b/sysdeps/hppa/elf/start.S index c7e300c543..4cf832a2f6 100644 --- a/sysdeps/hppa/elf/start.S +++ b/sysdeps/hppa/elf/start.S @@ -7,6 +7,23 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + 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 diff --git a/sysdeps/m68k/elf/start.S b/sysdeps/m68k/elf/start.S index f65cda75cd..8c89b37eca 100644 --- a/sysdeps/m68k/elf/start.S +++ b/sysdeps/m68k/elf/start.S @@ -7,6 +7,23 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + 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 diff --git a/sysdeps/mips/elf/start.S b/sysdeps/mips/elf/start.S index 7567423f00..3dd513777d 100644 --- a/sysdeps/mips/elf/start.S +++ b/sysdeps/mips/elf/start.S @@ -8,6 +8,23 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + 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 diff --git a/sysdeps/standalone/i386/start.S b/sysdeps/standalone/i386/start.S index d0037638da..b3fd315e5a 100644 --- a/sysdeps/standalone/i386/start.S +++ b/sysdeps/standalone/i386/start.S @@ -8,6 +8,23 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + 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 diff --git a/sysdeps/standalone/i960/start.S b/sysdeps/standalone/i960/start.S index 993a3f2949..579beb77fb 100644 --- a/sysdeps/standalone/i960/start.S +++ b/sysdeps/standalone/i960/start.S @@ -8,6 +8,23 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + 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 diff --git a/sysdeps/standalone/m68k/m68020/start.S b/sysdeps/standalone/m68k/m68020/start.S index 855652b854..166605fb4f 100644 --- a/sysdeps/standalone/m68k/m68020/start.S +++ b/sysdeps/standalone/m68k/m68020/start.S @@ -8,6 +8,23 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + 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 diff --git a/sysdeps/unix/arm/start.c b/sysdeps/unix/arm/start.c index 6088faaed1..8e291cc60f 100644 --- a/sysdeps/unix/arm/start.c +++ b/sysdeps/unix/arm/start.c @@ -7,6 +7,23 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + 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 diff --git a/sysdeps/unix/bsd/osf/alpha/start.S b/sysdeps/unix/bsd/osf/alpha/start.S index ffe6651f7d..1fa52a6430 100644 --- a/sysdeps/unix/bsd/osf/alpha/start.S +++ b/sysdeps/unix/bsd/osf/alpha/start.S @@ -7,6 +7,23 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + 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 diff --git a/sysdeps/unix/bsd/ultrix4/mips/start.S b/sysdeps/unix/bsd/ultrix4/mips/start.S index c2fc4882d8..a88268af45 100644 --- a/sysdeps/unix/bsd/ultrix4/mips/start.S +++ b/sysdeps/unix/bsd/ultrix4/mips/start.S @@ -7,6 +7,23 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + 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 diff --git a/sysdeps/unix/sysv/aix/start.s b/sysdeps/unix/sysv/aix/start.s index bf17b8ce5c..79d8ef4891 100644 --- a/sysdeps/unix/sysv/aix/start.s +++ b/sysdeps/unix/sysv/aix/start.s @@ -6,6 +6,23 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + 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 diff --git a/sysdeps/unix/sysv/irix4/start.c b/sysdeps/unix/sysv/irix4/start.c index a88d0d4d1b..6b4b00a66f 100644 --- a/sysdeps/unix/sysv/irix4/start.c +++ b/sysdeps/unix/sysv/irix4/start.c @@ -6,6 +6,23 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + 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 From ca5c03379c8a56e0e2eadcaf5f1a2b276503e385 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 16 Aug 2004 08:51:46 +0000 Subject: [PATCH 3335/4487] 2004-08-15 Roland McGrath * sysdeps/unix/sysv/linux/bits/resource.h (enum __rusage_who): Remove __RUSAGE_BOTH constant and RUSAGE_BOTH macro. * sysdeps/unix/sysv/linux/alpha/bits/resource.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/resource.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/resource.h: Likewise. --- sysdeps/unix/sysv/linux/alpha/bits/resource.h | 6 +----- sysdeps/unix/sysv/linux/mips/bits/resource.h | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/resource.h b/sysdeps/unix/sysv/linux/alpha/bits/resource.h index 868fd7b462..54d6819412 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/resource.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/resource.h @@ -147,12 +147,8 @@ enum __rusage_who #define RUSAGE_SELF RUSAGE_SELF /* All of its terminated child processes. */ - RUSAGE_CHILDREN = -1, + RUSAGE_CHILDREN = -1 #define RUSAGE_CHILDREN RUSAGE_CHILDREN - - /* Both. */ - __RUSAGE_BOTH = -2 -#define RUSAGE_BOTH __RUSAGE_BOTH }; #define __need_timeval diff --git a/sysdeps/unix/sysv/linux/mips/bits/resource.h b/sysdeps/unix/sysv/linux/mips/bits/resource.h index 40fc949d57..2b6c887fd0 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/resource.h +++ b/sysdeps/unix/sysv/linux/mips/bits/resource.h @@ -147,12 +147,8 @@ enum __rusage_who #define RUSAGE_SELF RUSAGE_SELF /* All of its terminated child processes. */ - RUSAGE_CHILDREN = -1, + RUSAGE_CHILDREN = -1 #define RUSAGE_CHILDREN RUSAGE_CHILDREN - - /* Both. */ - __RUSAGE_BOTH = -2 -#define RUSAGE_BOTH __RUSAGE_BOTH }; #define __need_timeval From 191601e3108e2675172d52d71c06c687e87b47cc Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 16 Aug 2004 09:21:34 +0000 Subject: [PATCH 3336/4487] 2004-08-16 Roland McGrath * Makefile: New file. --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000..463f278b2c --- /dev/null +++ b/Makefile @@ -0,0 +1,6 @@ +# This boilerplate is necessary just because any add-on directory +# gets added as a normal subdirectory for the glibc build process. + +subdir = ports + +include ../Rules From e3e4621ebc171f6394dc5a230e235545cacb71d9 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 16 Aug 2004 09:21:38 +0000 Subject: [PATCH 3337/4487] . --- ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ChangeLog b/ChangeLog index efaee34188..d7b0ea3f98 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2004-08-16 Roland McGrath + + * Makefile: New file. + 2004-08-04 Roland McGrath New directory implementing glibc add-on infrastructure for From e8805e8d3fbe3290a1e580e2b4267134cc40dc32 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 23 Aug 2004 07:28:45 +0000 Subject: [PATCH 3338/4487] [BZ #341] (O_NOATIME): Define. --- sysdeps/unix/sysv/linux/alpha/bits/fcntl.h | 1 + sysdeps/unix/sysv/linux/arm/bits/fcntl.h | 1 + sysdeps/unix/sysv/linux/cris/bits/fcntl.h | 1 + sysdeps/unix/sysv/linux/hppa/bits/fcntl.h | 1 + sysdeps/unix/sysv/linux/m68k/bits/fcntl.h | 1 + sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 1 + 6 files changed, 6 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h index 828cc75225..ce4a5da37f 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h @@ -47,6 +47,7 @@ # define O_DIRECT 040000 /* Direct disk access. */ # define O_DIRECTORY 0100000 /* Must be a directory. */ # define O_NOFOLLOW 0200000 /* Do not follow links. */ +# define O_NOATIME 04000000 /* Do not set atime. */ #endif #ifdef __USE_LARGEFILE64 diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h index d050f7fbf7..3574e750ff 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h @@ -45,6 +45,7 @@ # define O_DIRECTORY 040000 /* Must be a directory. */ # define O_NOFOLLOW 0100000 /* Do not follow links. */ # define O_DIRECT 0200000 /* Direct disk access. */ +# define O_NOATIME 01000000 /* Do not set atime. */ #endif #ifdef __USE_LARGEFILE64 diff --git a/sysdeps/unix/sysv/linux/cris/bits/fcntl.h b/sysdeps/unix/sysv/linux/cris/bits/fcntl.h index 6abdd1d0b6..36799aa50e 100644 --- a/sysdeps/unix/sysv/linux/cris/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/cris/bits/fcntl.h @@ -46,6 +46,7 @@ # define O_DIRECT 040000 /* Direct disk access. */ # define O_DIRECTORY 0200000 /* Must be a directory. */ # define O_NOFOLLOW 0400000 /* Do not follow links. */ +# define O_NOATIME 01000000 /* Do not set atime. */ #endif /* For now Linux has synchronisity options for data and read operations. diff --git a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h index 6cc96cf665..9d967c6475 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h @@ -47,6 +47,7 @@ # define O_DIRECT 00040000 /* direct disk access hint - currently ignored */ # define O_DIRECTORY 00010000 /* must be a directory */ # define O_NOFOLLOW 00000200 /* don't follow links */ +# define O_NOATIME 04000000 /* Do not set atime. */ #endif #ifdef __USE_LARGEFILE64 diff --git a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h index 2e85d1e893..90c0a481e4 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h @@ -45,6 +45,7 @@ # define O_DIRECTORY 040000 /* Must be a directory. */ # define O_NOFOLLOW 0100000 /* Do not follow links. */ # define O_DIRECT 0200000 /* Direct disk access. */ +# define O_NOATIME 01000000 /* Do not set atime. */ #endif /* For now Linux has synchronisity options for data and read operations. diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index 48531d8c0b..550593b0e9 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -49,6 +49,7 @@ # define O_NOFOLLOW 0x20000 /* Do not follow links. */ # define O_DIRECT 0x8000 /* Direct disk access hint. */ # define O_DIRECTORY 0x10000 /* Must be a directory. */ +# define O_NOATIME 0x40000 /* Do not set atime. */ #endif #define O_NDELAY O_NONBLOCK From 7048b1bff0b3e097df66be9ac526c6c6dcf66a54 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 25 Aug 2004 05:57:35 +0000 Subject: [PATCH 3339/4487] (_dl_start_user): Don't set __libc_stack_end. --- sysdeps/mips/dl-machine.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index bfd3a6250e..944f3c10a5 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -485,8 +485,6 @@ _dl_start_user:\n\ move $16, $28\n\ # Save the user entry point address in a saved register.\n\ move $17, $2\n\ - # Store the highest stack address\n\ - " STRINGXP(PTR_S) " $29, __libc_stack_end\n\ # See if we were run as a command with the executable file\n\ # name as an extra leading argument.\n\ lw $2, _dl_skip_args\n\ From 13e579e4f99b1a450fb899076bd53d2784686580 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 25 Aug 2004 19:59:01 +0000 Subject: [PATCH 3340/4487] * sysdeps/alpha/elf/start.S (_start): Use $15 as frame unwind instead of $31. Zero $15. * sysdeps/unix/sysv/linux/alpha/clone.S (thread_start): Likewise. --- sysdeps/alpha/elf/start.S | 3 ++- sysdeps/unix/sysv/linux/alpha/clone.S | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/elf/start.S b/sysdeps/alpha/elf/start.S index c6d7587314..3c2bc59adc 100644 --- a/sysdeps/alpha/elf/start.S +++ b/sysdeps/alpha/elf/start.S @@ -44,10 +44,11 @@ .ent _start, 0 .type _start,@function _start: - .frame $31, 0, $31 + .frame $15, 0, $15 br gp, 1f 1: ldgp gp, 0(gp) subq sp, 16, sp + mov 0, $15 .prologue 0 /* Load address of the user's main function. */ diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S index daa804c3fc..b4766ec457 100644 --- a/sysdeps/unix/sysv/linux/alpha/clone.S +++ b/sysdeps/unix/sysv/linux/alpha/clone.S @@ -89,7 +89,8 @@ $error: .ent thread_start thread_start: - .frame zero,0,zero,0 + .frame fp,0,fp,0 + mov 0, fp .prologue 0 /* Load up the arguments. */ From c80ce440fbbcec62f4e1706737c8b29271678911 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 26 Aug 2004 16:59:14 +0000 Subject: [PATCH 3341/4487] Include sgidefs.h only if NO_SGIDEFS_H isn't defined. --- sysdeps/unix/sysv/linux/mips/pread.c | 2 ++ sysdeps/unix/sysv/linux/mips/pread64.c | 2 ++ sysdeps/unix/sysv/linux/mips/pwrite.c | 2 ++ 3 files changed, 6 insertions(+) diff --git a/sysdeps/unix/sysv/linux/mips/pread.c b/sysdeps/unix/sysv/linux/mips/pread.c index d2a6c69db5..8fba0340b8 100644 --- a/sysdeps/unix/sysv/linux/mips/pread.c +++ b/sysdeps/unix/sysv/linux/mips/pread.c @@ -28,7 +28,9 @@ #include #include +#ifndef NO_SGIDEFS_H #include +#endif #ifdef __NR_pread64 /* Newer kernels renamed but it's the same. */ # ifdef __NR_pread diff --git a/sysdeps/unix/sysv/linux/mips/pread64.c b/sysdeps/unix/sysv/linux/mips/pread64.c index b63bb9c2aa..238c8e0d8b 100644 --- a/sysdeps/unix/sysv/linux/mips/pread64.c +++ b/sysdeps/unix/sysv/linux/mips/pread64.c @@ -27,7 +27,9 @@ #include #include +#ifndef NO_SGIDEFS_H #include +#endif #ifdef __NR_pread64 /* Newer kernels renamed but it's the same. */ # ifdef __NR_pread diff --git a/sysdeps/unix/sysv/linux/mips/pwrite.c b/sysdeps/unix/sysv/linux/mips/pwrite.c index 50c8265236..d0e3fe538e 100644 --- a/sysdeps/unix/sysv/linux/mips/pwrite.c +++ b/sysdeps/unix/sysv/linux/mips/pwrite.c @@ -28,7 +28,9 @@ #include #include +#ifndef NO_SGIDEFS_H #include +#endif #ifdef __NR_pwrite64 /* Newer kernels renamed but it's the same. */ # ifdef __NR_pwrite From 19eca5d62f8da63ae660f569c653c88b1e86c46c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 2 Sep 2004 18:51:31 +0000 Subject: [PATCH 3342/4487] (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make it unsigned int. --- sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h index 62c853cee9..fd20d572af 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h @@ -81,7 +81,7 @@ typedef union unsigned long long int __wakeup_seq; unsigned long long int __woken_seq; void *__mutex; - int __clock; + unsigned int __nwaiters; unsigned int __broadcast_seq; } __data; char __size[__SIZEOF_PTHREAD_COND_T]; From 99e111a7c22d9da5f7a7b2930e71bbea2fec40b4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 2 Sep 2004 22:46:02 +0000 Subject: [PATCH 3343/4487] Define __libc_unwind_longjmp. --- sysdeps/alpha/nptl/jmpbuf-unwind.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sysdeps/alpha/nptl/jmpbuf-unwind.h b/sysdeps/alpha/nptl/jmpbuf-unwind.h index ad77816ca0..5cef8b1cf5 100644 --- a/sysdeps/alpha/nptl/jmpbuf-unwind.h +++ b/sysdeps/alpha/nptl/jmpbuf-unwind.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek , 2003. @@ -26,3 +26,6 @@ #define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \ ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_SP] - (_adj)) + +/* We use the normal lobngjmp for unwinding. */ +#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val) From df8419fe0a67841bcc7ab47283eaa8cd20bf9043 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 6 Sep 2004 01:12:02 +0000 Subject: [PATCH 3344/4487] * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P): Move definition inside libpthread, libc, librt check. Provide definition for rtld. --- .../sysv/linux/alpha/nptl/sysdep-cancel.h | 35 +++++++++++-------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h index 794d7fc442..f3f7718e3e 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h @@ -137,28 +137,33 @@ __LABEL($syscall_error) \ # define CDISABLE jsr ra, __local_disable_asynccancel; ldgp ra, 0(gp) # endif -#endif - -#if defined IS_IN_libpthread || !defined NOT_IN_libc -# ifndef __ASSEMBLER__ +# if defined IS_IN_libpthread || !defined NOT_IN_libc +# ifndef __ASSEMBLER__ extern int __local_multiple_threads attribute_hidden; -# define SINGLE_THREAD_P \ +# define SINGLE_THREAD_P \ __builtin_expect (__local_multiple_threads == 0, 1) -# elif defined(PIC) -# define SINGLE_THREAD_P(reg) ldl reg, __local_multiple_threads(gp) !gprel -# else -# define SINGLE_THREAD_P(reg) \ +# elif defined(PIC) +# define SINGLE_THREAD_P(reg) ldl reg, __local_multiple_threads(gp) !gprel +# else +# define SINGLE_THREAD_P(reg) \ ldah reg, __local_multiple_threads(gp) !gprelhigh; \ ldl reg, __local_multiple_threads(reg) !gprellow -# endif -#else -# ifndef __ASSEMBLER__ -# define SINGLE_THREAD_P \ +# endif +# else +# ifndef __ASSEMBLER__ +# define SINGLE_THREAD_P \ __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ header.multiple_threads) == 0, 1) -# else -# define SINGLE_THREAD_P(reg) \ +# else +# define SINGLE_THREAD_P(reg) \ call_pal PAL_rduniq; \ ldl reg, MULTIPLE_THREADS_OFFSET($0) +# endif # endif + +#else + +# define SINGLE_THREAD_P (1) +# define NO_CANCELLATION 1 + #endif From a61c91b0ca2fce7f63c95e5dd7ed385872ab3f4d Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 6 Sep 2004 02:01:35 +0000 Subject: [PATCH 3345/4487] * sysdeps/alpha/div.S: Save and restore FPCR around fp operations. * sysdeps/alpha/divl.S, sysdeps/alpha/divq.S, sysdeps/alpha/divqu.S, sysdeps/alpha/ldiv.S, sysdeps/alpha/reml.S, sysdeps/alpha/remq.S, sysdeps/alpha/remqu.S: Likewise. * sysdeps/alpha/div_libc.h (FRAME): Increase to 64. --- sysdeps/alpha/div.S | 5 ++++- sysdeps/alpha/div_libc.h | 2 +- sysdeps/alpha/divl.S | 22 ++++++++++++++++++---- sysdeps/alpha/divq.S | 24 ++++++++++++++++++++---- sysdeps/alpha/divqu.S | 32 +++++++++++++++++++++++++------- sysdeps/alpha/ldiv.S | 7 ++++++- sysdeps/alpha/reml.S | 22 ++++++++++++++++++---- sysdeps/alpha/remq.S | 24 ++++++++++++++++++++---- sysdeps/alpha/remqu.S | 21 ++++++++++++++++++--- 9 files changed, 130 insertions(+), 29 deletions(-) diff --git a/sysdeps/alpha/div.S b/sysdeps/alpha/div.S index e0eb7e9796..d1a724d375 100644 --- a/sysdeps/alpha/div.S +++ b/sysdeps/alpha/div.S @@ -48,6 +48,8 @@ div: #endif beq $18, $divbyzero + excb + mf_fpcr $f10 _ITOFT2 $17, $f0, 0, $18, $f1, 8 @@ -55,7 +57,8 @@ div: cvtqt $f1, $f1 divt/c $f0, $f1, $f0 cvttq/c $f0, $f0 - + excb + mt_fpcr $f10 _FTOIT $f0, $0, 0 mull $0, $18, $1 diff --git a/sysdeps/alpha/div_libc.h b/sysdeps/alpha/div_libc.h index 2f06282102..62b4470355 100644 --- a/sysdeps/alpha/div_libc.h +++ b/sysdeps/alpha/div_libc.h @@ -71,7 +71,7 @@ /* In order to make the below work, all top-level divide routines must use the same frame size. */ -#define FRAME 48 +#define FRAME 64 /* Code fragment to generate an integer divide-by-zero fault. When building libc.so, we arrange for there to be one copy of this code diff --git a/sysdeps/alpha/divl.S b/sysdeps/alpha/divl.S index 90cd6862a7..408d66db00 100644 --- a/sysdeps/alpha/divl.S +++ b/sysdeps/alpha/divl.S @@ -22,7 +22,12 @@ registers are t10 and t11, the result goes in t12. Only t12 and AT may be clobbered. - The FPU can handle all input values except zero. Whee! */ + The FPU can handle all input values except zero. Whee! + + The FPCR save/restore is due to the fact that the EV6 _will_ set FPCR_INE + for cvttq/c even without /sui being set. It will not, however, properly + raise the exception, so we don't have to worry about FPCR_INED being clear + and so dying by SIGFPE. */ #ifndef EXTEND #define EXTEND(S,D) sextl S, D @@ -41,25 +46,34 @@ __divl: cfi_def_cfa_offset (FRAME) CALL_MCOUNT stt $f0, 0(sp) - stt $f1, 8(sp) + excb beq Y, DIVBYZERO + + stt $f1, 8(sp) + stt $f2, 16(sp) cfi_rel_offset ($f0, 0) cfi_rel_offset ($f1, 8) + cfi_rel_offset ($f2, 16) + mf_fpcr $f2 EXTEND (X, RV) EXTEND (Y, AT) - _ITOFT2 RV, $f0, 16, AT, $f1, 24 + _ITOFT2 RV, $f0, 24, AT, $f1, 32 cvtqt $f0, $f0 cvtqt $f1, $f1 divt/c $f0, $f1, $f0 cvttq/c $f0, $f0 - _FTOIT $f0, RV, 16 + excb + mt_fpcr $f2 + _FTOIT $f0, RV, 24 ldt $f0, 0(sp) ldt $f1, 8(sp) + ldt $f2, 16(sp) lda sp, FRAME(sp) cfi_restore ($f0) cfi_restore ($f1) + cfi_restore ($f2) cfi_def_cfa_offset (0) sextl RV, RV ret $31, (RA), 1 diff --git a/sysdeps/alpha/divq.S b/sysdeps/alpha/divq.S index cab6c34ad1..7f245ac056 100644 --- a/sysdeps/alpha/divq.S +++ b/sysdeps/alpha/divq.S @@ -33,7 +33,12 @@ When the dividend is outside the range for which we can compute exact results, we use the fp quotent as an estimate from which we begin refining an exact integral value. This reduces the number of iterations in the - shift-and-subtract loop significantly. */ + shift-and-subtract loop significantly. + + The FPCR save/restore is due to the fact that the EV6 _will_ set FPCR_INE + for cvttq/c even without /sui being set. It will not, however, properly + raise the exception, so we don't have to worry about FPCR_INED being clear + and so dying by SIGFPE. */ .text .align 4 @@ -53,10 +58,15 @@ __divq: ready -- all the time in the world to figure out how we're going to use the results. */ stt $f0, 0(sp) - stt $f1, 8(sp) + excb beq Y, DIVBYZERO + + stt $f1, 8(sp) + stt $f3, 48(sp) cfi_rel_offset ($f0, 0) cfi_rel_offset ($f1, 8) + cfi_rel_offset ($f3, 48) + mf_fpcr $f3 _ITOFT2 X, $f0, 16, Y, $f1, 24 cvtqt $f0, $f0 @@ -73,12 +83,16 @@ __divq: /* If we get here, we're expecting exact results from the division. Do nothing else besides convert and clean up. */ cvttq/c $f0, $f0 + excb + mt_fpcr $f3 _FTOIT $f0, RV, 16 ldt $f0, 0(sp) + ldt $f3, 48(sp) cfi_restore ($f1) cfi_remember_state cfi_restore ($f0) + cfi_restore ($f3) cfi_def_cfa_offset (0) lda sp, FRAME(sp) ret $31, (RA), 1 @@ -121,9 +135,9 @@ $fix_sign_in_ret2: cfi_rel_offset (t3, 0) mulq Q, Y, QY - unop + excb stq t4, 8(sp) - unop + mt_fpcr $f3 cfi_rel_offset (t4, 8) subq QY, X, R @@ -147,6 +161,7 @@ $fix_sign_out_ret: ldq t3, 0(sp) ldq t4, 8(sp) ldq t5, 40(sp) + ldt $f3, 48(sp) lda sp, FRAME(sp) cfi_remember_state cfi_restore (t0) @@ -155,6 +170,7 @@ $fix_sign_out_ret: cfi_restore (t3) cfi_restore (t4) cfi_restore (t5) + cfi_restore ($f3) cfi_def_cfa_offset (0) ret $31, (RA), 1 diff --git a/sysdeps/alpha/divqu.S b/sysdeps/alpha/divqu.S index 63b575faa7..fc00fa133c 100644 --- a/sysdeps/alpha/divqu.S +++ b/sysdeps/alpha/divqu.S @@ -33,7 +33,12 @@ When the dividend is outside the range for which we can compute exact results, we use the fp quotent as an estimate from which we begin refining an exact integral value. This reduces the number of iterations in the - shift-and-subtract loop significantly. */ + shift-and-subtract loop significantly. + + The FPCR save/restore is due to the fact that the EV6 _will_ set FPCR_INE + for cvttq/c even without /sui being set. It will not, however, properly + raise the exception, so we don't have to worry about FPCR_INED being clear + and so dying by SIGFPE. */ .text .align 4 @@ -53,10 +58,15 @@ __divqu: ready -- all the time in the world to figure out how we're going to use the results. */ stt $f0, 0(sp) - stt $f1, 8(sp) + excb beq Y, DIVBYZERO + + stt $f1, 8(sp) + stt $f3, 48(sp) cfi_rel_offset ($f0, 0) cfi_rel_offset ($f1, 8) + cfi_rel_offset ($f3, 48) + mf_fpcr $f3 _ITOFT2 X, $f0, 16, Y, $f1, 24 cvtqt $f0, $f0 @@ -65,10 +75,7 @@ __divqu: divt/c $f0, $f1, $f0 /* Check to see if Y was mis-converted as signed value. */ - .align 4 ldt $f1, 8(sp) - unop - nop blt Y, $y_is_neg /* Check to see if X fit in the double as an exact value. */ @@ -78,11 +85,16 @@ __divqu: /* If we get here, we're expecting exact results from the division. Do nothing else besides convert and clean up. */ cvttq/c $f0, $f0 + excb + mt_fpcr $f3 _FTOIT $f0, RV, 16 + ldt $f0, 0(sp) + ldt $f3, 48(sp) cfi_remember_state cfi_restore ($f0) cfi_restore ($f1) + cfi_restore ($f3) cfi_def_cfa_offset (0) lda sp, FRAME(sp) ret $31, (RA), 1 @@ -140,9 +152,9 @@ $x_big: .align 4 stq t4, 8(sp) - unop + excb ldt $f0, 0(sp) - unop + mt_fpcr $f3 cfi_rel_offset (t4, 8) cfi_restore ($f0) @@ -164,6 +176,7 @@ $q_low_ret: ldq t2, 32(sp) ldq t3, 40(sp) + ldt $f3, 48(sp) lda sp, FRAME(sp) cfi_remember_state cfi_restore (t0) @@ -171,6 +184,7 @@ $q_low_ret: cfi_restore (t2) cfi_restore (t3) cfi_restore (t4) + cfi_restore ($f3) cfi_def_cfa_offset (0) ret $31, (RA), 1 @@ -227,9 +241,13 @@ $y_is_neg: from the divide will be completely wrong. Fortunately, the quotient must be either 0 or 1, so just compute it directly. */ cmpult Y, X, RV + excb + mt_fpcr $f3 ldt $f0, 0(sp) + ldt $f3, 48(sp) lda sp, FRAME(sp) cfi_restore ($f0) + cfi_restore ($f3) cfi_def_cfa_offset (0) ret $31, (RA), 1 diff --git a/sysdeps/alpha/ldiv.S b/sysdeps/alpha/ldiv.S index c90edfb784..3909672782 100644 --- a/sysdeps/alpha/ldiv.S +++ b/sysdeps/alpha/ldiv.S @@ -53,6 +53,8 @@ ldiv: #endif beq Y, $divbyzero + excb + mf_fpcr $f10 _ITOFT2 X, $f0, 0, Y, $f1, 8 @@ -71,6 +73,8 @@ ldiv: /* If we get here, we're expecting exact results from the division. Do nothing else besides convert and clean up. */ cvttq/c $f0, $f0 + excb + mt_fpcr $f10 _FTOIT $f0, $0, 0 $egress: @@ -107,9 +111,10 @@ $fix_sign_in_ret1: cvttq/c $f0, $f0 _FTOIT $f0, Q, 8 - .align 3 $fix_sign_in_ret2: mulq Q, Y, QY + excb + mt_fpcr $f10 .align 4 subq QY, X, R diff --git a/sysdeps/alpha/reml.S b/sysdeps/alpha/reml.S index 1bbb978f66..bfc3be5c3f 100644 --- a/sysdeps/alpha/reml.S +++ b/sysdeps/alpha/reml.S @@ -24,7 +24,12 @@ be clobbered. The FPU can handle the division for all input values except zero. - All we have to do is compute the remainder via multiply-and-subtract. */ + All we have to do is compute the remainder via multiply-and-subtract. + + The FPCR save/restore is due to the fact that the EV6 _will_ set FPCR_INE + for cvttq/c even without /sui being set. It will not, however, properly + raise the exception, so we don't have to worry about FPCR_INED being clear + and so dying by SIGFPE. */ #ifndef EXTEND #define EXTEND(S,D) sextl S, D @@ -43,26 +48,35 @@ __reml: cfi_def_cfa_offset (FRAME) CALL_MCOUNT stt $f0, 0(sp) - stt $f1, 8(sp) + excb beq Y, DIVBYZERO + + stt $f1, 8(sp) + stt $f2, 16(sp) cfi_rel_offset ($f0, 0) cfi_rel_offset ($f1, 8) + cfi_rel_offset ($f2, 16) + mf_fpcr $f2 EXTEND (X, RV) EXTEND (Y, AT) - _ITOFT2 RV, $f0, 16, AT, $f1, 24 + _ITOFT2 RV, $f0, 24, AT, $f1, 32 cvtqt $f0, $f0 cvtqt $f1, $f1 divt/c $f0, $f1, $f0 cvttq/c $f0, $f0 - _FTOIT $f0, RV, 16 + excb + mt_fpcr $f2 + _FTOIT $f0, RV, 24 ldt $f0, 0(sp) mull RV, Y, RV ldt $f1, 8(sp) + ldt $f2, 16(sp) lda sp, FRAME(sp) cfi_restore ($f0) cfi_restore ($f1) + cfi_restore ($f2) cfi_def_cfa_offset (0) subl X, RV, RV ret $31, (RA), 1 diff --git a/sysdeps/alpha/remq.S b/sysdeps/alpha/remq.S index 40c68d7f10..645a834453 100644 --- a/sysdeps/alpha/remq.S +++ b/sysdeps/alpha/remq.S @@ -33,7 +33,12 @@ When the dividend is outside the range for which we can compute exact results, we use the fp quotent as an estimate from which we begin refining an exact integral value. This reduces the number of iterations in the - shift-and-subtract loop significantly. */ + shift-and-subtract loop significantly. + + The FPCR save/restore is due to the fact that the EV6 _will_ set FPCR_INE + for cvttq/c even without /sui being set. It will not, however, properly + raise the exception, so we don't have to worry about FPCR_INED being clear + and so dying by SIGFPE. */ .text .align 4 @@ -53,10 +58,15 @@ __remq: ready -- all the time in the world to figure out how we're going to use the results. */ stt $f0, 0(sp) - stt $f1, 8(sp) + excb beq Y, DIVBYZERO + + stt $f1, 8(sp) + stt $f3, 48(sp) cfi_rel_offset ($f0, 0) cfi_rel_offset ($f1, 8) + cfi_rel_offset ($f3, 48) + mf_fpcr $f3 _ITOFT2 X, $f0, 16, Y, $f1, 24 cvtqt $f0, $f0 @@ -73,12 +83,16 @@ __remq: /* If we get here, we're expecting exact results from the division. Do nothing else besides convert, compute remainder, clean up. */ cvttq/c $f0, $f0 + excb + mt_fpcr $f3 _FTOIT $f0, AT, 16 mulq AT, Y, AT ldt $f0, 0(sp) + ldt $f3, 48(sp) cfi_restore ($f1) cfi_remember_state cfi_restore ($f0) + cfi_restore ($f3) cfi_def_cfa_offset (0) lda sp, FRAME(sp) subq X, AT, RV @@ -122,9 +136,9 @@ $fix_sign_in_ret2: cfi_rel_offset (t3, 0) mulq Q, Y, QY - unop + excb stq t4, 8(sp) - unop + mt_fpcr $f3 cfi_rel_offset (t4, 8) subq QY, X, R @@ -148,6 +162,7 @@ $fix_sign_out_ret: ldq t3, 0(sp) ldq t4, 8(sp) ldq t5, 40(sp) + ldt $f3, 48(sp) lda sp, FRAME(sp) cfi_remember_state cfi_restore (t0) @@ -156,6 +171,7 @@ $fix_sign_out_ret: cfi_restore (t3) cfi_restore (t4) cfi_restore (t5) + cfi_restore ($f3) cfi_def_cfa_offset (0) ret $31, (RA), 1 diff --git a/sysdeps/alpha/remqu.S b/sysdeps/alpha/remqu.S index f8deebbbc1..bfa78dff57 100644 --- a/sysdeps/alpha/remqu.S +++ b/sysdeps/alpha/remqu.S @@ -33,7 +33,12 @@ When the dividend is outside the range for which we can compute exact results, we use the fp quotent as an estimate from which we begin refining an exact integral value. This reduces the number of iterations in the - shift-and-subtract loop significantly. */ + shift-and-subtract loop significantly. + + The FPCR save/restore is due to the fact that the EV6 _will_ set FPCR_INE + for cvttq/c even without /sui being set. It will not, however, properly + raise the exception, so we don't have to worry about FPCR_INED being clear + and so dying by SIGFPE. */ .text .align 4 @@ -57,11 +62,15 @@ __remqu: and Y, AT, AT stt $f1, 8(sp) + excb + stt $f3, 48(sp) beq AT, $powerof2 cfi_rel_offset ($f0, 0) cfi_rel_offset ($f1, 8) + cfi_rel_offset ($f3, 48) _ITOFT2 X, $f0, 16, Y, $f1, 24 + mf_fpcr $f3 cvtqt $f0, $f0 cvtqt $f1, $f1 @@ -79,14 +88,18 @@ __remqu: /* If we get here, we're expecting exact results from the division. Do nothing else besides convert, compute remainder, clean up. */ cvttq/c $f0, $f0 + excb + mt_fpcr $f3 _FTOIT $f0, AT, 16 mulq AT, Y, AT ldt $f0, 0(sp) + ldt $f3, 48(sp) lda sp, FRAME(sp) cfi_remember_state cfi_restore ($f0) cfi_restore ($f1) + cfi_restore ($f3) cfi_def_cfa_offset (0) .align 4 @@ -144,9 +157,9 @@ $x_big: .align 4 stq t4, 8(sp) - unop + excb ldt $f0, 0(sp) - unop + mt_fpcr $f3 cfi_rel_offset (t4, 8) cfi_restore ($f0) @@ -168,6 +181,7 @@ $q_low_ret: ldq t2, 32(sp) ldq t3, 40(sp) + ldt $f3, 48(sp) lda sp, FRAME(sp) cfi_remember_state cfi_restore (t0) @@ -175,6 +189,7 @@ $q_low_ret: cfi_restore (t2) cfi_restore (t3) cfi_restore (t4) + cfi_restore ($f3) cfi_def_cfa_offset (0) ret $31, (RA), 1 From 0af1bbc9f2ff2b977b1d6b388413647f60689832 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 6 Sep 2004 02:19:36 +0000 Subject: [PATCH 3346/4487] * sysdeps/alpha/fpu/fraiseexcpt.c: Remove file. * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_IEEE_RAISE_EXCEPTION): New. * sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c: New file. * sysdeps/unix/sysv/linux/alpha/kernel_sysinfo.h: New file. * sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S: Use it. * sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S: Likewise. --- sysdeps/alpha/fpu/fraiseexcpt.c | 48 ---------- sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c | 92 +++++++++++++++++++ .../sysv/linux/alpha/ieee_get_fp_control.S | 4 +- .../sysv/linux/alpha/ieee_set_fp_control.S | 5 +- .../unix/sysv/linux/alpha/kernel_sysinfo.h | 6 ++ 5 files changed, 103 insertions(+), 52 deletions(-) delete mode 100644 sysdeps/alpha/fpu/fraiseexcpt.c create mode 100644 sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c create mode 100644 sysdeps/unix/sysv/linux/alpha/kernel_sysinfo.h diff --git a/sysdeps/alpha/fpu/fraiseexcpt.c b/sysdeps/alpha/fpu/fraiseexcpt.c deleted file mode 100644 index 7a589e4598..0000000000 --- a/sysdeps/alpha/fpu/fraiseexcpt.c +++ /dev/null @@ -1,48 +0,0 @@ -/* Raise given exceptions. - Copyright (C) 1997,98,99,2000,01,02 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Richard Henderson , 1997. - - 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. */ - -#include - -int -__feraiseexcept (int excepts) -{ - unsigned long int tmp; - - /* Get the current exception state. */ - tmp = __ieee_get_fp_control (); - - /* Set all the bits that were called for. */ - tmp |= (excepts & SWCR_STATUS_MASK); - - /* And store it back. */ - __ieee_set_fp_control (tmp); - - /* Success. */ - return 0; -} - -#include -#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) -strong_alias (__feraiseexcept, __old_feraiseexcept) -compat_symbol (libm, __old_feraiseexcept, feraiseexcept, GLIBC_2_1); -#endif - -libm_hidden_ver (__feraiseexcept, feraiseexcept) -versioned_symbol (libm, __feraiseexcept, feraiseexcept, GLIBC_2_2); diff --git a/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c b/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c new file mode 100644 index 0000000000..07f055886e --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c @@ -0,0 +1,92 @@ +/* Copyright (C) 2004 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. */ + +#include +#include +#include +#include "kernel-features.h" +#include "kernel_sysinfo.h" + + +int +__feraiseexcept (int excepts) +{ + INTERNAL_SYSCALL_DECL (err); + unsigned long t = excepts; + long r; + + r = INTERNAL_SYSCALL (osf_setsysinfo, err, 2, SSI_IEEE_RAISE_EXCEPTION, &t); + +#ifndef __ASSUME_IEEE_RAISE_EXCEPTION + if (!INTERNAL_SYSCALL_ERROR_P (r, err)) + return 0; + + double d; + + /* If we got an error from SSI_IEEE_RAISE_EXCEPTION, assume it means that + the system call isn't actually implemented. Do the best we can. */ + + /* Invalid implemented with 0 / 0 -> NaN. */ + if (excepts & FE_INVALID) + __asm__ __volatile__ ("divs/su $f31,$f31,%0; trapb" : "=f"(d) : ); + + /* Division By Zero implemented with 1 / 0 -> NaN. */ + if (excepts & FE_DIVBYZERO) + __asm__ __volatile__ ("divs/su %1,$f31,%0; trapb" : "=&f"(d) : "f"(1.0f)); + + /* Overflow and underflow cannot be had all by themselves. We can + generate them with arithmetic, but we always get INEXACT raised + at the same time. Prepare to undo. */ + if ((excepts & (FE_OVERFLOW | FE_UNDERFLOW)) && !(excepts & FE_INEXACT)) + INTERNAL_SYSCALL (osf_getsysinfo, err, 2, GSI_IEEE_FP_CONTROL, &t); + + /* Overflow implemented with FLT_MAX + FLT_MAX -> Inf. */ + if (excepts & FE_OVERFLOW) + __asm__ __volatile__ ("adds/sui %1,%1,%0; trapb" + : "=&f"(d) : "f"(FLT_MAX)); + + /* Underflow implemented with FLT_MIN * FLT_MIN -> 0. */ + if (excepts & FE_UNDERFLOW) + __asm__ __volatile__ ("muls/sui %1,%1,%0; trapb" + : "=&f"(d) : "f"(FLT_MIN)); + + /* Inexact implemented with (long)0.5 -> 0. */ + if ((excepts & (FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT)) == FE_INEXACT) + __asm__ __volatile__ ("cvttq/svi %1,%0; trapb" : "=&f"(d) : "f"(0.5f)); + + /* If we raised inexact when not asked, and inexact was not previously + raised, then clear that exception. */ + if ((excepts & (FE_OVERFLOW | FE_UNDERFLOW)) + && !((excepts | t) & FE_INEXACT)) + { + t |= excepts & SWCR_STATUS_MASK; + INTERNAL_SYSCALL (osf_setsysinfo, err, 2, SSI_IEEE_FP_CONTROL, &t); + } +#endif /* !__ASSUME_IEEE_RAISE_EXCEPTION */ + + return 0; +} + +#include +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) +strong_alias (__feraiseexcept, __old_feraiseexcept) +compat_symbol (libm, __old_feraiseexcept, feraiseexcept, GLIBC_2_1); +#endif + +libm_hidden_ver (__feraiseexcept, feraiseexcept) +versioned_symbol (libm, __feraiseexcept, feraiseexcept, GLIBC_2_2); diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S index 3cabd0b489..4779f175e5 100644 --- a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S +++ b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1996, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1996, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger , 1995. @@ -18,8 +18,8 @@ 02111-1307 USA. */ #include +#include "kernel_sysinfo.h" -#define GSI_IEEE_FP_CONTROL 45 .text diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S index 302ed06cd3..a9c0891aae 100644 --- a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S +++ b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S @@ -1,4 +1,5 @@ -/* Copyright (C) 1993, 1995, 1996, 1997, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1996, 1997, 2003, 2004 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger , 1995. @@ -18,8 +19,8 @@ 02111-1307 USA. */ #include +#include "kernel_sysinfo.h" -#define SSI_IEEE_FP_CONTROL 14 LEAF(__ieee_set_fp_control, 16) #ifdef PROF diff --git a/sysdeps/unix/sysv/linux/alpha/kernel_sysinfo.h b/sysdeps/unix/sysv/linux/alpha/kernel_sysinfo.h new file mode 100644 index 0000000000..a3edec2269 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/kernel_sysinfo.h @@ -0,0 +1,6 @@ +/* A copy of the couple of bits we need from . */ + +#define GSI_IEEE_FP_CONTROL 45 + +#define SSI_IEEE_FP_CONTROL 14 +#define SSI_IEEE_RAISE_EXCEPTION 1001 From 493814089be51ba1c5752a45cbb1d4abe8941a83 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 8 Sep 2004 06:11:35 +0000 Subject: [PATCH 3347/4487] (__pthread_once): Use atomic_increment instead of atomic_exchange_and_add. --- sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c b/sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c index 82f72de8b3..79a3c47aed 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c +++ b/sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004 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 @@ -85,7 +85,7 @@ __pthread_once (pthread_once_t *once_control, void (*init_routine) (void)) pthread_cleanup_pop (0); /* Add one to *once_control to take the bottom 2 bits from 01 to 10. */ - atomic_exchange_and_add (once_control, 1); + atomic_increment (once_control); /* Wake up all other threads. */ lll_futex_wake (once_control, INT_MAX); From 6d74bdcd3064a6d0d336f92ec7e7c629cc682686 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 12 Sep 2004 18:13:16 +0000 Subject: [PATCH 3348/4487] Use __NTH instead of __THROW in inline function definitions. --- sysdeps/alpha/fpu/bits/mathinline.h | 64 +++++++++++++++++------------ 1 file changed, 37 insertions(+), 27 deletions(-) diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h index 0ba79f9895..d3a76bad2b 100644 --- a/sysdeps/alpha/fpu/bits/mathinline.h +++ b/sysdeps/alpha/fpu/bits/mathinline.h @@ -1,5 +1,5 @@ /* Inline math functions for Alpha. - Copyright (C) 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1999-2001, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger-Tang. @@ -48,42 +48,46 @@ #define __inline_copysign(NAME, TYPE) \ __MATH_INLINE TYPE \ -NAME (TYPE __x, TYPE __y) __THROW \ +__NTH (NAME (TYPE __x, TYPE __y)) \ { \ TYPE __z; \ __asm ("cpys %1, %2, %0" : "=f" (__z) : "f" (__y), "f" (__x)); \ return __z; \ } -__inline_copysign(__copysignf, float) -__inline_copysign(copysignf, float) -__inline_copysign(__copysign, double) -__inline_copysign(copysign, double) +__inline_copysign (__copysignf, float) +__inline_copysign (copysignf, float) +__inline_copysign (__copysign, double) +__inline_copysign (copysign, double) #undef __MATH_INLINE_copysign #if __GNUC_PREREQ (2, 8) -__MATH_INLINE float __fabsf (float __x) __THROW { return __builtin_fabsf (__x); } -__MATH_INLINE float fabsf (float __x) __THROW { return __builtin_fabsf (__x); } -__MATH_INLINE double __fabs (double __x) __THROW { return __builtin_fabs (__x); } -__MATH_INLINE double fabs (double __x) __THROW { return __builtin_fabs (__x); } +__MATH_INLINE float +__NTH (__fabsf (float __x)) { return __builtin_fabsf (__x); } +__MATH_INLINE float +__NTH (fabsf (float __x)) { return __builtin_fabsf (__x); } +__MATH_INLINE double +__NTH (__fabs (double __x)) { return __builtin_fabs (__x); } +__MATH_INLINE double +__NTH (fabs (double __x)) { return __builtin_fabs (__x); } #else -#define __inline_fabs(NAME, TYPE) \ +# define __inline_fabs(NAME, TYPE) \ __MATH_INLINE TYPE \ -NAME (TYPE __x) __THROW \ +__NTH (NAME (TYPE __x)) \ { \ TYPE __z; \ __asm ("cpys $f31, %1, %0" : "=f" (__z) : "f" (__x)); \ return __z; \ } -__inline_fabs(__fabsf, float) -__inline_fabs(fabsf, float) -__inline_fabs(__fabs, double) -__inline_fabs(fabs, double) +__inline_fabs (__fabsf, float) +__inline_fabs (fabsf, float) +__inline_fabs (__fabs, double) +__inline_fabs (fabs, double) -#undef __inline_fabs +# undef __inline_fabs #endif @@ -92,7 +96,7 @@ __inline_fabs(fabs, double) must be integral, as this avoids unpleasant integer overflows. */ __MATH_INLINE float -__floorf (float __x) __THROW +__NTH (__floorf (float __x)) { /* Check not zero since floor(-0) == -0. */ if (__x != 0 && fabsf (__x) < 16777216.0f) /* 1 << FLT_MANT_DIG */ @@ -118,7 +122,7 @@ __floorf (float __x) __THROW } __MATH_INLINE double -__floor (double __x) __THROW +__NTH (__floor (double __x)) { if (__x != 0 && fabs (__x) < 9007199254740992.0) /* 1 << DBL_MANT_DIG */ { @@ -136,40 +140,46 @@ __floor (double __x) __THROW return __x; } -__MATH_INLINE float floorf (float __x) __THROW { return __floorf(__x); } -__MATH_INLINE double floor (double __x) __THROW { return __floor(__x); } +__MATH_INLINE float __NTH (floorf (float __x)) { return __floorf(__x); } +__MATH_INLINE double __NTH (floor (double __x)) { return __floor(__x); } #ifdef __USE_ISOC99 -__MATH_INLINE float __fdimf (float __x, float __y) __THROW +__MATH_INLINE float +__NTH (__fdimf (float __x, float __y)) { return __x < __y ? 0.0f : __x - __y; } -__MATH_INLINE float fdimf (float __x, float __y) __THROW +__MATH_INLINE float +__NTH (fdimf (float __x, float __y)) { return __x < __y ? 0.0f : __x - __y; } -__MATH_INLINE double __fdim (double __x, double __y) __THROW +__MATH_INLINE double +__NTH (__fdim (double __x, double __y)) { return __x < __y ? 0.0 : __x - __y; } -__MATH_INLINE double fdim (double __x, double __y) __THROW +__MATH_INLINE double +__NTH (fdim (double __x, double __y)) { return __x < __y ? 0.0 : __x - __y; } /* Test for negative number. Used in the signbit() macro. */ -__MATH_INLINE int __signbitf (float __x) __THROW +__MATH_INLINE int +__NTH (__signbitf (float __x)) { __extension__ union { float __f; int __i; } __u = { __f: __x }; return __u.__i < 0; } -__MATH_INLINE int __signbit (double __x) __THROW +__MATH_INLINE int +__NTH (__signbit (double __x)) { __extension__ union { double __d; long __i; } __u = { __d: __x }; return __u.__i < 0; From ebb9960651a8bbc3e899afa7a877d1b947f47e92 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 12 Sep 2004 18:40:45 +0000 Subject: [PATCH 3349/4487] Define rwlock types also for __USE_XOPEN2K. --- sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h index fd20d572af..79d43febdd 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h @@ -103,7 +103,7 @@ typedef unsigned int pthread_key_t; typedef int pthread_once_t; -#ifdef __USE_UNIX98 +#if defined __USE_UNIX98 || defined __USE_XOPEN2K /* Data structure for read-write lock variable handling. The structure of the attribute type is deliberately not exposed. */ typedef union From 2bb0696559676bf4c80eca8158c93f761730332a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 14 Sep 2004 04:24:52 +0000 Subject: [PATCH 3350/4487] Remove uses of __P and __PMT. --- sysdeps/standalone/arm/bits/errno.h | 4 ++-- sysdeps/standalone/i386/force_cpu386/_exit.c | 4 ++-- sysdeps/standalone/i386/force_cpu386/brdinit.c | 4 ++-- sysdeps/standalone/standalone.h | 8 ++++---- sysdeps/unix/arm/start.c | 6 +++--- sysdeps/unix/bsd/sun/m68k/sigtramp.c | 6 +++--- sysdeps/unix/bsd/sun/sparc/sigtramp.c | 10 +++++----- sysdeps/unix/bsd/sun/sunos4/wait4.c | 6 +++--- sysdeps/unix/bsd/ultrix4/mips/sigvec.c | 18 +++++++++--------- sysdeps/unix/bsd/ultrix4/sysconf.c | 8 ++++---- sysdeps/unix/sysv/irix4/fpathconf.c | 4 ++-- sysdeps/unix/sysv/irix4/getgroups.c | 4 ++-- sysdeps/unix/sysv/irix4/getpriority.c | 4 ++-- sysdeps/unix/sysv/irix4/getrusage.c | 4 ++-- sysdeps/unix/sysv/irix4/pathconf.c | 4 ++-- sysdeps/unix/sysv/irix4/setgroups.c | 4 ++-- sysdeps/unix/sysv/irix4/sigtramp.c | 17 ++++++++--------- sysdeps/unix/sysv/irix4/start.c | 6 +++--- sysdeps/unix/sysv/irix4/sysconf.c | 4 ++-- sysdeps/unix/sysv/sco3.2.4/__setpgid.c | 4 ++-- sysdeps/unix/sysv/sco3.2.4/getgroups.c | 4 ++-- sysdeps/unix/sysv/sysv4/__getpgid.c | 4 ++-- sysdeps/unix/sysv/sysv4/__setpgid.c | 4 ++-- sysdeps/unix/sysv/sysv4/getpgid.c | 4 ++-- sysdeps/unix/sysv/sysv4/sethostname.c | 4 ++-- sysdeps/unix/sysv/sysv4/setpgid.c | 4 ++-- sysdeps/unix/sysv/sysv4/setsid.c | 4 ++-- sysdeps/unix/sysv/sysv4/solaris2/getdents.c | 4 ++-- sysdeps/unix/sysv/sysv4/sysconf.c | 4 ++-- sysdeps/unix/sysv/sysv4/waitpid.c | 8 ++++---- 30 files changed, 86 insertions(+), 87 deletions(-) diff --git a/sysdeps/standalone/arm/bits/errno.h b/sysdeps/standalone/arm/bits/errno.h index d7db91db89..8e10754330 100644 --- a/sysdeps/standalone/arm/bits/errno.h +++ b/sysdeps/standalone/arm/bits/errno.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1994, 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1991,1994,1996,1997,1998,2004 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 @@ -62,4 +62,4 @@ /* Function to get address of global `errno' variable. */ -extern int *__errno_location __P ((void)) __attribute__ ((__const__)); +extern int *__errno_location (void) __THROW __attribute__ ((__const__)); diff --git a/sysdeps/standalone/i386/force_cpu386/_exit.c b/sysdeps/standalone/i386/force_cpu386/_exit.c index 2b1d090fa8..2da822e99b 100644 --- a/sysdeps/standalone/i386/force_cpu386/_exit.c +++ b/sysdeps/standalone/i386/force_cpu386/_exit.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1997, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1997, 1999, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), On-Line Applications Research Corporation. @@ -23,7 +23,7 @@ /* This returns control to FORCEbug. */ -void Bsp_cleanup __P ((void)); +void Bsp_cleanup (void); /* The function `_exit' should take a status argument and simply terminate program execution, using the low-order 8 bits of the diff --git a/sysdeps/standalone/i386/force_cpu386/brdinit.c b/sysdeps/standalone/i386/force_cpu386/brdinit.c index e94dc35f63..8392ce5857 100644 --- a/sysdeps/standalone/i386/force_cpu386/brdinit.c +++ b/sysdeps/standalone/i386/force_cpu386/brdinit.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1997, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), On-Line Applications Research Corporation. @@ -25,7 +25,7 @@ This routine initializes the FORCE CPU386 board. */ -void _Console_Initialize __P ((void)); +void _Console_Initialize (void); void _Board_Initialize () diff --git a/sysdeps/standalone/standalone.h b/sysdeps/standalone/standalone.h index 4a881991a7..20a0c33806 100644 --- a/sysdeps/standalone/standalone.h +++ b/sysdeps/standalone/standalone.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1997, 2004 Free Software Foundation, Inc. Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), On-Line Applications Research Corporation. This file is part of the GNU C Library. @@ -23,9 +23,9 @@ #include -extern void _Board_Initialize __P ((void)); +extern void _Board_Initialize (void); -extern int _Console_Putc __P ((char c)); -extern int _Console_Getc __P ((int poll)); +extern int _Console_Putc (char c); +extern int _Console_Getc (int poll); #endif diff --git a/sysdeps/unix/arm/start.c b/sysdeps/unix/arm/start.c index 8e291cc60f..6bf08b1d7f 100644 --- a/sysdeps/unix/arm/start.c +++ b/sysdeps/unix/arm/start.c @@ -1,5 +1,5 @@ /* Special startup code for ARM a.out binaries. - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1998, 2004 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 @@ -45,8 +45,8 @@ int __data_start = 0; weak_alias (__data_start, data_start) #endif -extern void __libc_init __P ((int argc, char **argv, char **envp)); -extern int main __P ((int argc, char **argv, char **envp)); +extern void __libc_init (int argc, char **argv, char **envp); +extern int main (int argc, char **argv, char **envp); /* N.B.: It is important that this be the first function. This file is the first thing in the text section. */ diff --git a/sysdeps/unix/bsd/sun/m68k/sigtramp.c b/sysdeps/unix/bsd/sun/m68k/sigtramp.c index bb10848beb..5a3ca3cf10 100644 --- a/sysdeps/unix/bsd/sun/m68k/sigtramp.c +++ b/sysdeps/unix/bsd/sun/m68k/sigtramp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1996, 1997, 2004 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 @@ -82,8 +82,8 @@ trampoline (sig, code, context, addr) /* XXX should save/restore FP regs */ /* Call the user's handler. */ - (*((void (*) __P ((int sig, int code, struct sigcontext *context, - PTR addr))) handlers[sig])) + (*((void (*) (int sig, int code, struct sigcontext *context, + PTR addr)) handlers[sig])) (sig, code, context, addr); /* Restore the call-clobbered registers. */ diff --git a/sysdeps/unix/bsd/sun/sparc/sigtramp.c b/sysdeps/unix/bsd/sun/sparc/sigtramp.c index 2b0be13159..e11f7e51d3 100644 --- a/sysdeps/unix/bsd/sun/sparc/sigtramp.c +++ b/sysdeps/unix/bsd/sun/sparc/sigtramp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1994, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991,1992,1994,1996,1997,2004 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 @@ -50,8 +50,8 @@ #include /* Defined in __sigvec.S. */ -extern int __raw_sigvec __P ((int sig, CONST struct sigvec *vec, - struct sigvec *ovec)); +extern int __raw_sigvec (int sig, CONST struct sigvec *vec, + struct sigvec *ovec); /* User-specified signal handlers. */ #define mytramp 1 @@ -146,8 +146,8 @@ trampoline (sig) glsave[2] = g6; /* Call the user's handler. */ - (*((void (*) __P ((int sig, int code, struct sigcontext *context, - void *addr))) handlers[sig])) + (*((void (*) (int sig, int code, struct sigcontext *context, + void *addr)) handlers[sig])) (sig, code, context, addr); /* Restore the Y register. */ diff --git a/sysdeps/unix/bsd/sun/sunos4/wait4.c b/sysdeps/unix/bsd/sun/sunos4/wait4.c index a12823467d..097c15e7d9 100644 --- a/sysdeps/unix/bsd/sun/sunos4/wait4.c +++ b/sysdeps/unix/bsd/sun/sunos4/wait4.c @@ -1,7 +1,7 @@ /* This implements wait4 with the 4.4 BSD semantics (also those documented in SunOS 4.1) on top of SunOS's wait4 system call, which has semantics different from those documented. Go Sun! - Copyright (C) 1991, 1992, 1993, 1995, 1997 Free Software Foundation, Inc. + Copyright (C) 1991,1992,1993,1995,1997,2004 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,8 +23,8 @@ #include #include -extern pid_t __wait4_syscall __P ((pid_t pid, __WAIT_STATUS_DEFN stat_loc, - int options, struct rusage *usage)); +extern pid_t __wait4_syscall (pid_t pid, __WAIT_STATUS_DEFN stat_loc, + int options, struct rusage *usage); pid_t __wait4 (pid, stat_loc, options, usage) diff --git a/sysdeps/unix/bsd/ultrix4/mips/sigvec.c b/sysdeps/unix/bsd/ultrix4/mips/sigvec.c index f6c8f1fe95..5775c9adb9 100644 --- a/sysdeps/unix/bsd/ultrix4/mips/sigvec.c +++ b/sysdeps/unix/bsd/ultrix4/mips/sigvec.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1996, 1997, 2004 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 @@ -35,15 +35,15 @@ /* The user's signal handler is called with three arguments. */ typedef void (*handler_type) (int sig, int code, struct sigcontext *); -extern int __raw_sigvec __P ((int sig, CONST struct sigvec *vec, - struct sigvec *ovec, - void (*)(int sig, int code, - struct sigcontext *, - handler_type))); +extern int __raw_sigvec (int sig, CONST struct sigvec *vec, + struct sigvec *ovec, + void (*)(int sig, int code, + struct sigcontext *, + handler_type)); -extern void __handler __P ((int sig, int code, - struct sigcontext *, - handler_type)); +extern void __handler (int sig, int code, + struct sigcontext *, + handler_type); int __sigvec (sig, vec, ovec) diff --git a/sysdeps/unix/bsd/ultrix4/sysconf.c b/sysdeps/unix/bsd/ultrix4/sysconf.c index 39e77301b0..0982fc832d 100644 --- a/sysdeps/unix/bsd/ultrix4/sysconf.c +++ b/sysdeps/unix/bsd/ultrix4/sysconf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995, 1996, 1997, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ian Lance Taylor (ian@airs.com). @@ -27,9 +27,9 @@ /* This is an Ultrix header file. */ #include -extern int __getsysinfo __P ((unsigned int op, void *buffer, - size_t nbytes, int *start, void *arg)); -extern long int __default_sysconf __P ((int name)); +extern int __getsysinfo (unsigned int op, void *buffer, + size_t nbytes, int *start, void *arg); +extern long int __default_sysconf (int name); long int __sysconf (name) diff --git a/sysdeps/unix/sysv/irix4/fpathconf.c b/sysdeps/unix/sysv/irix4/fpathconf.c index dbee0bbe0a..236eb1a6bc 100644 --- a/sysdeps/unix/sysv/irix4/fpathconf.c +++ b/sysdeps/unix/sysv/irix4/fpathconf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995, 1997, 2004 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 @@ -21,7 +21,7 @@ #include #include -extern int __syssgi __P ((int, ...)); +extern int __syssgi (int, ...); /* Get file-specific information about descriptor FD. */ long int diff --git a/sysdeps/unix/sysv/irix4/getgroups.c b/sysdeps/unix/sysv/irix4/getgroups.c index 520805314b..4c859eac83 100644 --- a/sysdeps/unix/sysv/irix4/getgroups.c +++ b/sysdeps/unix/sysv/irix4/getgroups.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995, 1997, 2004 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,7 +20,7 @@ #include #include -extern int __syssgi __P ((int, ...)); +extern int __syssgi (int, ...); /* Set the group set for the current user to GROUPS (N of them). */ int diff --git a/sysdeps/unix/sysv/irix4/getpriority.c b/sysdeps/unix/sysv/irix4/getpriority.c index baf945e54c..807ac2fba7 100644 --- a/sysdeps/unix/sysv/irix4/getpriority.c +++ b/sysdeps/unix/sysv/irix4/getpriority.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994,96,97,2000,02 Free Software Foundation, Inc. +/* Copyright (C) 1994,96,97,2000,02, 2004 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,7 +20,7 @@ #include #include -extern int __sysmp __P ((int, ...)); +extern int __sysmp (int, ...); /* Return the highest priority of any process specified by WHICH and WHO (see ); if WHO is zero, the current process, process group, diff --git a/sysdeps/unix/sysv/irix4/getrusage.c b/sysdeps/unix/sysv/irix4/getrusage.c index 8d0c4008c9..3cabbdf3e2 100644 --- a/sysdeps/unix/sysv/irix4/getrusage.c +++ b/sysdeps/unix/sysv/irix4/getrusage.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995, 1997, 2004 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,7 +20,7 @@ #include #include -extern int __syssgi __P ((int, ...)); +extern int __syssgi (int, ...); /* Return resource usage information on process indicated by WHO and put it in *USAGE. Returns 0 for success, -1 for failure. */ diff --git a/sysdeps/unix/sysv/irix4/pathconf.c b/sysdeps/unix/sysv/irix4/pathconf.c index 7439c73157..51da0c5635 100644 --- a/sysdeps/unix/sysv/irix4/pathconf.c +++ b/sysdeps/unix/sysv/irix4/pathconf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995, 1997, 2004 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 @@ -21,7 +21,7 @@ #include #include -extern int __syssgi __P ((int, ...)); +extern int __syssgi (int, ...); /* Get file-specific information about PATH. */ long int diff --git a/sysdeps/unix/sysv/irix4/setgroups.c b/sysdeps/unix/sysv/irix4/setgroups.c index 8f5b379ac5..cca816bcff 100644 --- a/sysdeps/unix/sysv/irix4/setgroups.c +++ b/sysdeps/unix/sysv/irix4/setgroups.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994,97,2002 Free Software Foundation, Inc. +/* Copyright (C) 1994,97,2002, 2004 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,7 +20,7 @@ #include #include -extern int __syssgi __P ((int, ...)); +extern int __syssgi (int, ...); /* Set the group set for the current user to GROUPS (N of them). */ int diff --git a/sysdeps/unix/sysv/irix4/sigtramp.c b/sysdeps/unix/sysv/irix4/sigtramp.c index d6cfd33915..f8de75a7cd 100644 --- a/sysdeps/unix/sysv/irix4/sigtramp.c +++ b/sysdeps/unix/sysv/irix4/sigtramp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1997, 2004 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 @@ -36,14 +36,13 @@ typedef void (*handler_type) (int sig, int code, struct sigcontext *); /* Defined in signal.S. */ -extern __sighandler_t __raw_signal __P((int sig, __sighandler_t func, - void (*)(int sig, int code, - struct sigcontext *, - handler_type))); - -extern void __handler __P((int sig, int code, - struct sigcontext *, - handler_type)); +extern __sighandler_t __raw_signal (int sig, __sighandler_t func, + void (*)(int sig, int code, + struct sigcontext *, + handler_type)); + +extern void __handler (int sig, int code, struct sigcontext *, + handler_type); __sighandler_t signal (sig, func) diff --git a/sysdeps/unix/sysv/irix4/start.c b/sysdeps/unix/sysv/irix4/start.c index 6b4b00a66f..fdda8809e6 100644 --- a/sysdeps/unix/sysv/irix4/start.c +++ b/sysdeps/unix/sysv/irix4/start.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991,1992,1995,1996,1997,2004 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 @@ -44,8 +44,8 @@ /* The first piece of initialized data. */ int __data_start = 0; -extern void __libc_init __P ((int argc, char **argv, char **envp)); -extern int main __P ((int argc, char **argv, char **envp)); +extern void __libc_init (int argc, char **argv, char **envp); +extern int main (int argc, char **argv, char **envp); /* Use the stack pointer to access the arguments. This assumes that we can guess how big the frame will be. */ diff --git a/sysdeps/unix/sysv/irix4/sysconf.c b/sysdeps/unix/sysv/irix4/sysconf.c index 2f89491fda..ef7606edad 100644 --- a/sysdeps/unix/sysv/irix4/sysconf.c +++ b/sysdeps/unix/sysv/irix4/sysconf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1995, 1997, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995, 1997, 2002, 2004 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 @@ -19,7 +19,7 @@ #include #include -extern int __syssgi __P ((int, ...)); +extern int __syssgi ((int, ...); /* Get the value of the system variable NAME. */ long int diff --git a/sysdeps/unix/sysv/sco3.2.4/__setpgid.c b/sysdeps/unix/sysv/sco3.2.4/__setpgid.c index e58f22e7a9..d51fa602c9 100644 --- a/sysdeps/unix/sysv/sco3.2.4/__setpgid.c +++ b/sysdeps/unix/sysv/sco3.2.4/__setpgid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1997, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1997, 2002, 2004 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,7 +20,7 @@ #include #include -extern int __pgrpsys __P ((int type, ...)); +extern int __pgrpsys (int type, ...); /* Get the process group ID of process PID. */ int diff --git a/sysdeps/unix/sysv/sco3.2.4/getgroups.c b/sysdeps/unix/sysv/sco3.2.4/getgroups.c index ef27df2a76..2aac40bddd 100644 --- a/sysdeps/unix/sysv/sco3.2.4/getgroups.c +++ b/sysdeps/unix/sysv/sco3.2.4/getgroups.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995, 1997, 2004 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 @@ -21,7 +21,7 @@ #include #include -extern int __sco_getgroups __P ((int size, unsigned short int *list)); +extern int __sco_getgroups (int size, unsigned short int *list); int __getgroups (size, list) diff --git a/sysdeps/unix/sysv/sysv4/__getpgid.c b/sysdeps/unix/sysv/sysv4/__getpgid.c index ea9a23876c..74ca3e0f9a 100644 --- a/sysdeps/unix/sysv/sysv4/__getpgid.c +++ b/sysdeps/unix/sysv/sysv4/__getpgid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1997, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1997, 2002, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -21,7 +21,7 @@ #include #include -extern int __pgrpsys __P ((int type, ...)); +extern int __pgrpsys (int type, ...); /* Get the process group ID of process PID. */ int diff --git a/sysdeps/unix/sysv/sysv4/__setpgid.c b/sysdeps/unix/sysv/sysv4/__setpgid.c index ac096a4516..36ad5cc77b 100644 --- a/sysdeps/unix/sysv/sysv4/__setpgid.c +++ b/sysdeps/unix/sysv/sysv4/__setpgid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1997, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1997, 2002, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -21,7 +21,7 @@ #include #include -extern int __pgrpsys __P ((int type, ...)); +extern int __pgrpsys (int type, ...); /* Get the process group ID of process PID. */ int diff --git a/sysdeps/unix/sysv/sysv4/getpgid.c b/sysdeps/unix/sysv/sysv4/getpgid.c index 39fb728d1b..95f96417cc 100644 --- a/sysdeps/unix/sysv/sysv4/getpgid.c +++ b/sysdeps/unix/sysv/sysv4/getpgid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1997, 1999, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1993,1995,1997,1999,2002,2004 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 @@ -19,7 +19,7 @@ #include #include -extern pid_t __pgrpsys __P ((int type, ...)); +extern pid_t __pgrpsys (int type, ...); /* Get the process group ID of process PID. */ pid_t diff --git a/sysdeps/unix/sysv/sysv4/sethostname.c b/sysdeps/unix/sysv/sysv4/sethostname.c index f4e7b4e936..d74b0f4f3b 100644 --- a/sysdeps/unix/sysv/sysv4/sethostname.c +++ b/sysdeps/unix/sysv/sysv4/sethostname.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1997, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -22,7 +22,7 @@ #include #include -extern int __sysinfo __P ((int command, const char *buf, long count)); +extern int __sysinfo (int command, const char *buf, long count); int sethostname (name, namelen) diff --git a/sysdeps/unix/sysv/sysv4/setpgid.c b/sysdeps/unix/sysv/sysv4/setpgid.c index 1ffb182d4a..80f4ad6430 100644 --- a/sysdeps/unix/sysv/sysv4/setpgid.c +++ b/sysdeps/unix/sysv/sysv4/setpgid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993,1995,1996,1997,1999,2002 Free Software Foundation, Inc. +/* Copyright (C) 1993,1995-1997,1999,2002,2004 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 @@ -19,7 +19,7 @@ #include #include -extern int __pgrpsys __P ((pid_t type, ...)); +extern int __pgrpsys (pid_t type, ...); /* Set the process group ID of the process matching PID to PGID. If PID is zero, the current process's process group ID is set. diff --git a/sysdeps/unix/sysv/sysv4/setsid.c b/sysdeps/unix/sysv/sysv4/setsid.c index 44cbaf07cb..faa2c42d7d 100644 --- a/sysdeps/unix/sysv/sysv4/setsid.c +++ b/sysdeps/unix/sysv/sysv4/setsid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1997, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1997, 1999, 2004 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 @@ -19,7 +19,7 @@ #include #include -extern pid_t __pgrpsys __P ((int type, ...)); +extern pid_t __pgrpsys (int type, ...); /* Create a new session with the calling process as its leader. The process group IDs of the session and the calling process diff --git a/sysdeps/unix/sysv/sysv4/solaris2/getdents.c b/sysdeps/unix/sysv/sysv4/solaris2/getdents.c index 8627245542..ab782ffaac 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/getdents.c +++ b/sysdeps/unix/sysv/sysv4/solaris2/getdents.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993,95,96,97,98 Free Software Foundation, Inc. +/* Copyright (C) 1993,95,96,97,98, 2004 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 @@ -27,7 +27,7 @@ #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) -extern int __getdents __P ((int fd, char *buf, size_t nbytes)); +extern int __getdents (int fd, char *buf, size_t nbytes); /* For Solaris we need a special version of this file since the definition of `struct dirent' is not the same for the kernel and diff --git a/sysdeps/unix/sysv/sysv4/sysconf.c b/sysdeps/unix/sysv/sysv4/sysconf.c index d8ffafcc41..bfe7823c4c 100644 --- a/sysdeps/unix/sysv/sysv4/sysconf.c +++ b/sysdeps/unix/sysv/sysv4/sysconf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1996, 1997, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1993,1995,1996,1997,2002,2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -24,7 +24,7 @@ #include #include -extern int __sysconfig __P ((int)); +extern int __sysconfig (int); /* Get the value of the system variable NAME. */ long int diff --git a/sysdeps/unix/sysv/sysv4/waitpid.c b/sysdeps/unix/sysv/sysv4/waitpid.c index f4700c6cd1..23f9ceb029 100644 --- a/sysdeps/unix/sysv/sysv4/waitpid.c +++ b/sysdeps/unix/sysv/sysv4/waitpid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993,94,95,96,97,2002 Free Software Foundation, Inc. +/* Copyright (C) 1993,94,95,96,97,2002,2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -35,9 +35,9 @@ typedef enum __idtype P_ALL = 7, } __idtype_t; -extern __pid_t __getpgid __P ((__pid_t pid)); -extern int __waitid __P ((__idtype_t idtype, __pid_t id, - __siginfo_t *infop, int options)); +extern __pid_t __getpgid (__pid_t pid); +extern int __waitid (__idtype_t idtype, __pid_t id, + __siginfo_t *infop, int options); /* Wait for a child matching PID to die. If PID is greater than 0, match any process whose process ID is PID. From 93207f7d2d4de29b5fd9ad58c1f14959dfe8968c Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 15 Sep 2004 12:22:09 +0000 Subject: [PATCH 3351/4487] * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def. --- sysdeps/unix/sysv/linux/alpha/nptl/vfork.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/vfork.S b/sysdeps/unix/sysv/linux/alpha/nptl/vfork.S index 8bdf0eb9c8..f4ed9311b0 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/vfork.S +++ b/sysdeps/unix/sysv/linux/alpha/nptl/vfork.S @@ -42,5 +42,5 @@ PSEUDO (__vfork, vfork, 0) 1: ret PSEUDO_END (__vfork) - +libc_hidden_def (__vfork) weak_alias (__vfork, vfork) From 6a63b83c91bb00ea5e0c5940944e4e003e7c8d8d Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 15 Sep 2004 12:23:39 +0000 Subject: [PATCH 3352/4487] * sysdeps/alpha/fpu/libm-test-ulps: Update. * scripts/data/c++-types-alpha-linux-gnu.data: New file. --- sysdeps/alpha/fpu/libm-test-ulps | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/sysdeps/alpha/fpu/libm-test-ulps b/sysdeps/alpha/fpu/libm-test-ulps index 73172b49a0..80942e98ec 100644 --- a/sysdeps/alpha/fpu/libm-test-ulps +++ b/sysdeps/alpha/fpu/libm-test-ulps @@ -1,6 +1,9 @@ # Begin of automatic generation # atan2 +Test "atan2 (-0.00756827042671106339, -.001792735857538728036) == -1.80338464113663849327153994380": +float: 6 +ifloat: 6 Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025": float: 3 ifloat: 3 @@ -258,9 +261,6 @@ float: 1 ifloat: 1 # ctan -Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": -double: 1 -idouble: 1 Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i": double: 1 idouble: 1 @@ -640,8 +640,8 @@ idouble: 1 # Maximal error of functions: Function: "atan2": -float: 3 -ifloat: 3 +float: 6 +ifloat: 6 Function: "atanh": float: 1 @@ -777,10 +777,6 @@ Function: Real part of "csqrt": float: 1 ifloat: 1 -Function: Real part of "ctan": -double: 1 -idouble: 1 - Function: Imaginary part of "ctan": double: 1 idouble: 1 From d627d8fb46b565059b99f396e982c7a7992251a8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 23 Sep 2004 05:15:41 +0000 Subject: [PATCH 3353/4487] (inline_syscall[0-6]): Change name argument to numbers from syscall names. (INLINE_SYSCALL1): Pass __NR_##name to inline_syscall##nr. (INTERNAL_SYSCALL_NCS): Renamed from... (INTERNAL_SYSCALL_1): ... this. Use INTERNAL_SYSCALL_NCS. --- sysdeps/unix/alpha/sysdep.h | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h index f60eafea49..5378f81602 100644 --- a/sysdeps/unix/alpha/sysdep.h +++ b/sysdeps/unix/alpha/sysdep.h @@ -167,7 +167,7 @@ __LABEL(name) \ #define INLINE_SYSCALL1(name, nr, args...) \ ({ \ long _sc_ret, _sc_err; \ - inline_syscall##nr(name, args); \ + inline_syscall##nr(__NR_##name, args); \ if (__builtin_expect (_sc_err, 0)) \ { \ __set_errno (_sc_ret); \ @@ -180,6 +180,9 @@ __LABEL(name) \ INTERNAL_SYSCALL1(name, err_out, nr, args) #define INTERNAL_SYSCALL1(name, err_out, nr, args...) \ + INTERNAL_SYSCALL_NCS(__NR_##name, err_out, nr, args) + +#define INTERNAL_SYSCALL_NCS(name, err_out, nr, args...) \ ({ \ long _sc_ret, _sc_err; \ inline_syscall##nr(name, args); \ @@ -223,7 +226,7 @@ __LABEL(name) \ register long _sc_0 inline_syscall_r0_asm; \ register long _sc_19 __asm__("$19"); \ \ - _sc_0 = __NR_##name; \ + _sc_0 = name; \ __asm__ __volatile__ \ ("callsys # %0 %1 <= %2" \ : inline_syscall_r0_out_constraint (_sc_0), \ @@ -240,7 +243,7 @@ __LABEL(name) \ register long _sc_16 __asm__("$16"); \ register long _sc_19 __asm__("$19"); \ \ - _sc_0 = __NR_##name; \ + _sc_0 = name; \ _sc_16 = (long) (arg1); \ __asm__ __volatile__ \ ("callsys # %0 %1 <= %2 %3" \ @@ -259,7 +262,7 @@ __LABEL(name) \ register long _sc_17 __asm__("$17"); \ register long _sc_19 __asm__("$19"); \ \ - _sc_0 = __NR_##name; \ + _sc_0 = name; \ _sc_16 = (long) (arg1); \ _sc_17 = (long) (arg2); \ __asm__ __volatile__ \ @@ -280,7 +283,7 @@ __LABEL(name) \ register long _sc_18 __asm__("$18"); \ register long _sc_19 __asm__("$19"); \ \ - _sc_0 = __NR_##name; \ + _sc_0 = name; \ _sc_16 = (long) (arg1); \ _sc_17 = (long) (arg2); \ _sc_18 = (long) (arg3); \ @@ -303,7 +306,7 @@ __LABEL(name) \ register long _sc_18 __asm__("$18"); \ register long _sc_19 __asm__("$19"); \ \ - _sc_0 = __NR_##name; \ + _sc_0 = name; \ _sc_16 = (long) (arg1); \ _sc_17 = (long) (arg2); \ _sc_18 = (long) (arg3); \ @@ -328,7 +331,7 @@ __LABEL(name) \ register long _sc_19 __asm__("$19"); \ register long _sc_20 __asm__("$20"); \ \ - _sc_0 = __NR_##name; \ + _sc_0 = name; \ _sc_16 = (long) (arg1); \ _sc_17 = (long) (arg2); \ _sc_18 = (long) (arg3); \ @@ -355,7 +358,7 @@ __LABEL(name) \ register long _sc_20 __asm__("$20"); \ register long _sc_21 __asm__("$21"); \ \ - _sc_0 = __NR_##name; \ + _sc_0 = name; \ _sc_16 = (long) (arg1); \ _sc_17 = (long) (arg2); \ _sc_18 = (long) (arg3); \ From def004d70914c83474ba4052779cca722b92e3dc Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sun, 26 Sep 2004 17:40:31 +0000 Subject: [PATCH 3354/4487] * sysdeps/alpha/alphaev6/memcpy.S: Mark .prologue. * sysdeps/unix/alpha/sysdep.h (LEAF, ENTRY): Align entry points to 16 byte boundaries. --- sysdeps/alpha/alphaev6/memcpy.S | 1 + sysdeps/unix/alpha/sysdep.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/alphaev6/memcpy.S b/sysdeps/alpha/alphaev6/memcpy.S index d16bc03a02..7cff521da2 100644 --- a/sysdeps/alpha/alphaev6/memcpy.S +++ b/sysdeps/alpha/alphaev6/memcpy.S @@ -39,6 +39,7 @@ .set noat ENTRY(memcpy) + .prologue 0 mov $16, $0 # E : copy dest to return ble $18, $nomoredata # U : done with the copy? diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h index 5378f81602..5259c09a91 100644 --- a/sysdeps/unix/alpha/sysdep.h +++ b/sysdeps/unix/alpha/sysdep.h @@ -43,14 +43,14 @@ #define LEAF(name, framesize) \ .globl name; \ - .align 3; \ + .align 4; \ .ent name, 0; \ __LABEL(name) \ .frame sp, framesize, ra #define ENTRY(name) \ .globl name; \ - .align 3; \ + .align 4; \ .ent name, 0; \ __LABEL(name) \ .frame sp, 0, ra From 6fae1eca92192539d416730d9f26c3b6a9425e9d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 28 Sep 2004 10:29:32 +0000 Subject: [PATCH 3355/4487] (pthread_cond_t): Add __extension__ to long long types. --- sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h index 79d43febdd..d13d6e86a4 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h @@ -77,15 +77,15 @@ typedef union { int __lock; unsigned int __futex; - unsigned long long int __total_seq; - unsigned long long int __wakeup_seq; - unsigned long long int __woken_seq; + __extension__ unsigned long long int __total_seq; + __extension__ unsigned long long int __wakeup_seq; + __extension__ unsigned long long int __woken_seq; void *__mutex; unsigned int __nwaiters; unsigned int __broadcast_seq; } __data; char __size[__SIZEOF_PTHREAD_COND_T]; - long long int __align; + __extension__ long long int __align; } pthread_cond_t; typedef union From 3e08e73f580f2c0a8f93227f477865eefd732458 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 30 Sep 2004 06:16:28 +0000 Subject: [PATCH 3356/4487] (__fdimf, __fdim, fdimf, fdim): Handle +inf/+inf. --- sysdeps/alpha/fpu/bits/mathinline.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h index d3a76bad2b..187bd42f33 100644 --- a/sysdeps/alpha/fpu/bits/mathinline.h +++ b/sysdeps/alpha/fpu/bits/mathinline.h @@ -149,25 +149,25 @@ __MATH_INLINE double __NTH (floor (double __x)) { return __floor(__x); } __MATH_INLINE float __NTH (__fdimf (float __x, float __y)) { - return __x < __y ? 0.0f : __x - __y; + return __x <= __y ? 0.0f : __x - __y; } __MATH_INLINE float __NTH (fdimf (float __x, float __y)) { - return __x < __y ? 0.0f : __x - __y; + return __x <= __y ? 0.0f : __x - __y; } __MATH_INLINE double __NTH (__fdim (double __x, double __y)) { - return __x < __y ? 0.0 : __x - __y; + return __x <= __y ? 0.0 : __x - __y; } __MATH_INLINE double __NTH (fdim (double __x, double __y)) { - return __x < __y ? 0.0 : __x - __y; + return __x <= __y ? 0.0 : __x - __y; } /* Test for negative number. Used in the signbit() macro. */ From 94645659a459f25c973922a2909dc8f58fbb0b12 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 4 Oct 2004 20:59:38 +0000 Subject: [PATCH 3357/4487] 2004-10-04 Roland McGrath * include/errno.h [RTLD_PRIVATE_ERRNO] (errno): Rename the real symbol to rtld_errno. * sysdeps/generic/errno.c [RTLD_PRIVATE_ERRNO] (rtld_errno): Define it, and don't define any other errno names. * sysdeps/unix/alpha/sysdep.h [RTLD_PRIVATE_ERRNO]: Use rtld_errno in place of errno. * sysdeps/unix/i386/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/i386/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/ia64/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/m68k/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/sh/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise. * sysdeps/unix/x86_64/sysdep.S: Likewise. --- sysdeps/unix/alpha/sysdep.h | 2 +- sysdeps/unix/sysv/linux/m68k/sysdep.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h index 5259c09a91..f9f1dd6e41 100644 --- a/sysdeps/unix/alpha/sysdep.h +++ b/sysdeps/unix/alpha/sysdep.h @@ -82,7 +82,7 @@ #if RTLD_PRIVATE_ERRNO # define SYSCALL_ERROR_LABEL $syscall_error # define SYSCALL_ERROR_HANDLER \ - stl v0, errno(gp) !gprel; \ + stl v0, rtld_errno(gp) !gprel; \ lda v0, -1; \ ret #elif defined(PIC) diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h index 234ce32f4f..091dfc9c7d 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -98,7 +98,7 @@ # if RTLD_PRIVATE_ERRNO # define SYSCALL_ERROR_HANDLER \ SYSCALL_ERROR_LABEL: \ - lea (errno, %pc), %a0; \ + lea (rtld_errno, %pc), %a0; \ neg.l %d0; \ move.l %d0, (%a0); \ move.l &-1, %d0; \ From 1bd55d8b3ace979e644283361725b74b3a4c97b0 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 9 Oct 2004 21:18:03 +0000 Subject: [PATCH 3358/4487] Remove __THROW from inline definitions. --- sysdeps/m68k/fpu/bits/mathinline.h | 42 +++++++++++++++--------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/fpu/bits/mathinline.h index 1e43e43047..acbac47aac 100644 --- a/sysdeps/m68k/fpu/bits/mathinline.h +++ b/sysdeps/m68k/fpu/bits/mathinline.h @@ -1,5 +1,5 @@ /* Definitions of inline math functions implemented by the m68881/2. - Copyright (C) 1991,92,93,94,96,97,98,99,2000,2002, 2003 + Copyright (C) 1991,92,93,94,96,97,98,99,2000,2002, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -110,7 +110,7 @@ #if defined __USE_MISC || defined __USE_ISOC99 # define __inline_mathop(func, op) \ __inline_mathop1(double, func, op) \ - __inline_mathop1(float, __CONCAT(func,f), op) \ + __inline_mathop1(float, __CONCAT(func,f), op) \ __inline_mathop1(long double, __CONCAT(func,l), op) #else # define __inline_mathop(func, op) \ @@ -118,7 +118,7 @@ #endif #define __inline_mathop1(float_type,func, op) \ - __m81_defun (float_type, func, (float_type __mathop_x)) __THROW \ + __m81_defun (float_type, func, (float_type __mathop_x)) \ { \ float_type __result; \ __asm("f" __STRING(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x));\ @@ -175,7 +175,7 @@ __inline_mathop(trunc, intrz) for the function names. */ #define __inline_functions(float_type, s) \ -__m81_defun (float_type, __CONCAT(__floor,s), (float_type __x)) __THROW \ +__m81_defun (float_type, __CONCAT(__floor,s), (float_type __x)) \ { \ float_type __result; \ unsigned long int __ctrl_reg; \ @@ -191,7 +191,7 @@ __m81_defun (float_type, __CONCAT(__floor,s), (float_type __x)) __THROW \ return __result; \ } \ \ -__m81_defun (float_type, __CONCAT(__ceil,s), (float_type __x)) __THROW \ +__m81_defun (float_type, __CONCAT(__ceil,s), (float_type __x)) \ { \ float_type __result; \ unsigned long int __ctrl_reg; \ @@ -217,7 +217,7 @@ __inline_functions(long double,l) #ifdef __USE_MISC # define __inline_functions(float_type, s) \ -__m81_defun (int, __CONCAT(__isinf,s), (float_type __value)) __THROW \ +__m81_defun (int, __CONCAT(__isinf,s), (float_type __value)) \ { \ /* There is no branch-condition for infinity, \ so we must extract and examine the condition codes manually. */ \ @@ -227,7 +227,7 @@ __m81_defun (int, __CONCAT(__isinf,s), (float_type __value)) __THROW \ return (__fpsr & (2 << 24)) ? (__fpsr & (8 << 24) ? -1 : 1) : 0; \ } \ \ -__m81_defun (int, __CONCAT(__finite,s), (float_type __value)) __THROW \ +__m81_defun (int, __CONCAT(__finite,s), (float_type __value)) \ { \ /* There is no branch-condition for infinity, so we must extract and \ examine the condition codes manually. */ \ @@ -238,7 +238,7 @@ __m81_defun (int, __CONCAT(__finite,s), (float_type __value)) __THROW \ } \ \ __m81_defun (float_type, __CONCAT(__scalbn,s), \ - (float_type __x, int __n)) __THROW \ + (float_type __x, int __n)) \ { \ float_type __result; \ __asm ("fscale%.l %1, %0" : "=f" (__result) : "dmi" (__n), "0" (__x)); \ @@ -255,7 +255,7 @@ __inline_functions(long double,l) #if defined __USE_MISC || defined __USE_XOPEN # define __inline_functions(float_type, s) \ -__m81_defun (int, __CONCAT(__isnan,s), (float_type __value)) __THROW \ +__m81_defun (int, __CONCAT(__isnan,s), (float_type __value)) \ { \ char __result; \ __asm("ftst%.x %1\n" \ @@ -275,7 +275,7 @@ __inline_functions(long double,l) #ifdef __USE_ISOC99 # define __inline_functions(float_type, s) \ -__m81_defun (int, __CONCAT(__signbit,s), (float_type __value)) __THROW \ +__m81_defun (int, __CONCAT(__signbit,s), (float_type __value)) \ { \ /* There is no branch-condition for the sign bit, so we must extract \ and examine the condition codes manually. */ \ @@ -285,13 +285,13 @@ __m81_defun (int, __CONCAT(__signbit,s), (float_type __value)) __THROW \ return (__fpsr >> 27) & 1; \ } \ \ -__m81_defun (float_type, __CONCAT(__scalbln,s), \ - (float_type __x, long int __n)) __THROW \ + __m81_defun (float_type, __CONCAT(__scalbln,s), \ + (float_type __x, long int __n)) \ { \ return __CONCAT(__scalbn,s) (__x, __n); \ } \ \ -__m81_defun (float_type, __CONCAT(__nearbyint,s), (float_type __x)) __THROW \ +__m81_defun (float_type, __CONCAT(__nearbyint,s), (float_type __x)) \ { \ float_type __result; \ unsigned long int __ctrl_reg; \ @@ -305,7 +305,7 @@ __m81_defun (float_type, __CONCAT(__nearbyint,s), (float_type __x)) __THROW \ return __result; \ } \ \ -__m81_defun (long int, __CONCAT(__lrint,s), (float_type __x)) __THROW \ +__m81_defun (long int, __CONCAT(__lrint,s), (float_type __x)) \ { \ long int __result; \ __asm ("fmove%.l %1, %0" : "=dm" (__result) : "f" (__x)); \ @@ -314,7 +314,7 @@ __m81_defun (long int, __CONCAT(__lrint,s), (float_type __x)) __THROW \ \ __m81_inline float_type \ __m81_u(__CONCAT(__fma,s))(float_type __x, float_type __y, \ - float_type __z) __THROW \ + float_type __z) \ { \ return (__x * __y) + __z; \ } @@ -331,7 +331,7 @@ __inline_functions (long double,l) # define __inline_functions(float_type, s) \ __m81_inline void \ __m81_u(__CONCAT(__sincos,s))(float_type __x, float_type *__sinx, \ - float_type *__cosx) __THROW \ + float_type *__cosx) \ { \ __asm ("fsincos%.x %2,%1:%0" \ : "=f" (*__sinx), "=f" (*__cosx) : "f" (__x)); \ @@ -351,14 +351,14 @@ __inline_functions (long double,l) /* Note that there must be no whitespace before the argument passed for NAME, to make token pasting work correctly with -traditional. */ # define __inline_forward_c(rettype, name, args1, args2) \ -extern __inline rettype __attribute__((__const__)) \ -name args1 __THROW \ -{ \ - return __CONCAT(__,name) args2; \ +extern __inline rettype __attribute__((__const__)) \ + name args1 \ +{ \ + return __CONCAT(__,name) args2; \ } # define __inline_forward(rettype, name, args1, args2) \ -extern __inline rettype name args1 __THROW \ +extern __inline rettype name args1 \ { \ return __CONCAT(__,name) args2; \ } From 6ffbfb80e1ffa02ea4eee82abab0b04577aec31a Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 9 Oct 2004 21:19:06 +0000 Subject: [PATCH 3359/4487] (WORD_COPY_BWD): Remove use of cast as lvalue. --- sysdeps/m68k/memcopy.h | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/sysdeps/m68k/memcopy.h b/sysdeps/m68k/memcopy.h index cdc268ad51..0951eeaf7a 100644 --- a/sysdeps/m68k/memcopy.h +++ b/sysdeps/m68k/memcopy.h @@ -1,5 +1,5 @@ /* memcopy.h -- definitions for memory copy functions. Motorola 68020 version. - Copyright (C) 1991, 1997 Free Software Foundation, Inc. + Copyright (C) 1991, 1997, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Torbjorn Granlund (tege@sics.se). @@ -68,29 +68,33 @@ do \ { \ size_t __nblocks = (nbytes) / 32 + 1; \ + op_t *__dst_ep = (op_t *) (dst_ep); \ + op_t *__src_ep = (op_t *) (src_ep); \ switch ((nbytes) / sizeof (op_t) % 8) \ do \ { \ - *--((op_t *) dst_ep) = *--((op_t *) src_ep); \ + *--__dst_ep = *--__src_ep; \ case 7: \ - *--((op_t *) dst_ep) = *--((op_t *) src_ep); \ + *--__dst_ep = *--__src_ep; \ case 6: \ - *--((op_t *) dst_ep) = *--((op_t *) src_ep); \ + *--__dst_ep = *--__src_ep; \ case 5: \ - *--((op_t *) dst_ep) = *--((op_t *) src_ep); \ + *--__dst_ep = *--__src_ep; \ case 4: \ - *--((op_t *) dst_ep) = *--((op_t *) src_ep); \ + *--__dst_ep = *--__src_ep; \ case 3: \ - *--((op_t *) dst_ep) = *--((op_t *) src_ep); \ + *--__dst_ep = *--__src_ep; \ case 2: \ - *--((op_t *) dst_ep) = *--((op_t *) src_ep); \ + *--__dst_ep = *--__src_ep; \ case 1: \ - *--((op_t *) dst_ep) = *--((op_t *) src_ep); \ + *--__dst_ep = *--__src_ep; \ case 0: \ __nblocks--; \ } \ while (__nblocks != 0); \ (nbytes_left) = (nbytes) % sizeof (op_t); \ + (dst_ep) = (unsigned long) __dst_ep; \ + (src_ep) = (unsigned long) __src_ep; \ } while (0) #endif From a270d32ff2a400eea60f9c8f1c5a48bc26c062b6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 14 Oct 2004 16:08:53 +0000 Subject: [PATCH 3360/4487] (elf_machine_runtime_link_map): Replace iteration over GL(dl_loaded) chain with iteration over all namespaces' _ns_loaded chains. --- sysdeps/mips/dl-machine.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 944f3c10a5..49fdffb93d 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -231,10 +231,11 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc) } } - { - struct link_map *l = GL(dl_loaded); + struct link_map *l; + Lmid_t nsid; - while (l) + for (nsid = 0; nsid < DL_NNS; ++nsid) + for (l = GL(dl_ns)[nsid]._ns_loaded; l != NULL; l = l->l_next) { ElfW(Addr) base, limit; const ElfW(Phdr) *p = l->l_phdr; @@ -250,9 +251,7 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc) return l; } } - l = l->l_next; } - } _dl_signal_error (0, NULL, NULL, "cannot find runtime link map"); return NULL; From 1795e40c5dbaffe580c8c0168f2128c9fb3ffdaa Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 15 Oct 2004 07:06:11 +0000 Subject: [PATCH 3361/4487] * sysdeps/alpha/dl-machine.h (elf_machine_rela, elf_machine_rela_relative, elf_machine_lazy_rel): Mark auto instead of static. --- sysdeps/alpha/dl-machine.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 7c5f3c1518..780a3a57fd 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -507,7 +507,7 @@ elf_machine_plt_value (struct link_map *map, const Elf64_Rela *reloc, /* Perform the relocation specified by RELOC and SYM (which is fully resolved). MAP is the object containing the reloc. */ -static inline void +auto inline void elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc, const Elf64_Sym *sym, @@ -645,7 +645,7 @@ elf_machine_rela (struct link_map *map, can be skipped. */ #define ELF_MACHINE_REL_RELATIVE 1 -static inline void +auto inline void elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc, void *const reloc_addr_arg) { @@ -661,7 +661,7 @@ elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc, memcpy (reloc_addr_arg, &reloc_addr_val, 8); } -static inline void +auto inline void elf_machine_lazy_rel (struct link_map *map, Elf64_Addr l_addr, const Elf64_Rela *reloc) { From 36f86ab9acaf0788c05777f50897bb7e61b85fd0 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 15 Oct 2004 07:06:56 +0000 Subject: [PATCH 3362/4487] * sysdeps/unix/sysv/linux/adjtime.c (ADJTIME): Use prototype style definition. * sysdeps/unix/sysv/linux/alpha/adjtime.c (ADJTIME): If __ASSUME_TIMEVAL64, define __adjtime directly rather than via strong_alias. --- sysdeps/unix/sysv/linux/alpha/adjtime.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/adjtime.c b/sysdeps/unix/sysv/linux/alpha/adjtime.c index f8b272e9ce..e206cb4727 100644 --- a/sysdeps/unix/sysv/linux/alpha/adjtime.c +++ b/sysdeps/unix/sysv/linux/alpha/adjtime.c @@ -87,14 +87,15 @@ compat_symbol (libc, __adjtime_tv32, adjtime, GLIBC_2_0); #define TIMEVAL timeval #undef TIMEX #define TIMEX timex -#undef ADJTIME -#define ADJTIME __adjtime_tv64 #undef ADJTIMEX #define ADJTIMEX(x) INLINE_SYSCALL (adjtimex, 1, x) + #undef LINKAGE +#undef ADJTIME +#if !defined __ASSUME_TIMEVAL64 #define LINKAGE static - -LINKAGE int ADJTIME (const struct TIMEVAL *itv, struct TIMEVAL *otv); +#define ADJTIME __adjtime_tv64 +#endif #include #include @@ -135,8 +136,6 @@ __adjtime (itv, otv) return ret; } -#else -strong_alias (__adjtime_tv64, __adjtime); #endif versioned_symbol (libc, __adjtime, adjtime, GLIBC_2_1); From 73e530000856b30d7040c6fe10e8b58e17174041 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 15 Oct 2004 07:07:57 +0000 Subject: [PATCH 3363/4487] * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to make gcc4 happy. --- sysdeps/alpha/nptl/tcb-offsets.sym | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/nptl/tcb-offsets.sym b/sysdeps/alpha/nptl/tcb-offsets.sym index 14494ee2cd..ebd84f35e5 100644 --- a/sysdeps/alpha/nptl/tcb-offsets.sym +++ b/sysdeps/alpha/nptl/tcb-offsets.sym @@ -4,8 +4,10 @@ -- -- Abuse tls.h macros to derive offsets relative to the thread register. -# define __builtin_thread_pointer() ((void *) 0) -# define thread_offsetof(mem) ((void *) &THREAD_SELF->mem - (void *) 0) +-- # define __builtin_thread_pointer() ((void *) 0) +-- # define thread_offsetof(mem) ((void *) &THREAD_SELF->mem - (void *) 0) +-- Ho hum, this doesn't work in gcc4, so Know Things about THREAD_SELF +#define thread_offsetof(mem) (long)(offsetof(struct pthread, mem) - sizeof(struct pthread)) MULTIPLE_THREADS_OFFSET thread_offsetof (header.multiple_threads) PID_OFFSET thread_offsetof (pid) From 885186d0858f8bf367ae76a3e80dcbc75bc252a8 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 15 Oct 2004 09:34:45 +0000 Subject: [PATCH 3364/4487] * sysdeps/unix/sysv/linux/alpha/register-dump.h: New file. * sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h (SIGCONTEXT): Add _code argument, pass sigcontext by pointer. (SIGCONTEXT_EXTRA_ARGS): Likewise. (GET_PC, GET_FRAME, GET_STACK): Expect ctx as pointer. --- sysdeps/unix/sysv/linux/alpha/register-dump.h | 161 ++++++++++++++++++ .../unix/sysv/linux/alpha/sigcontextinfo.h | 12 +- 2 files changed, 167 insertions(+), 6 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/alpha/register-dump.h diff --git a/sysdeps/unix/sysv/linux/alpha/register-dump.h b/sysdeps/unix/sysv/linux/alpha/register-dump.h new file mode 100644 index 0000000000..d55899a2c1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/register-dump.h @@ -0,0 +1,161 @@ +/* Dump registers. + Copyright (C) 2004 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. */ + +#include +#include + +/* We will print the register dump in this format: + + V0: XXXXXXXXXXXXXXXX T0: XXXXXXXXXXXXXXXX T1: XXXXXXXXXXXXXXXX + T2: XXXXXXXXXXXXXXXX T3: XXXXXXXXXXXXXXXX T4: XXXXXXXXXXXXXXXX + T5: XXXXXXXXXXXXXXXX T6: XXXXXXXXXXXXXXXX T7: XXXXXXXXXXXXXXXX + S0: XXXXXXXXXXXXXXXX S1: XXXXXXXXXXXXXXXX S2: XXXXXXXXXXXXXXXX + S3: XXXXXXXXXXXXXXXX S4: XXXXXXXXXXXXXXXX S5: XXXXXXXXXXXXXXXX + S6: XXXXXXXXXXXXXXXX A0: XXXXXXXXXXXXXXXX A1: XXXXXXXXXXXXXXXX + A2: XXXXXXXXXXXXXXXX A3: XXXXXXXXXXXXXXXX A4: XXXXXXXXXXXXXXXX + A5: XXXXXXXXXXXXXXXX T8: XXXXXXXXXXXXXXXX T9: XXXXXXXXXXXXXXXX + T10: XXXXXXXXXXXXXXXX T11: XXXXXXXXXXXXXXXX RA: XXXXXXXXXXXXXXXX + T12: XXXXXXXXXXXXXXXX AT: XXXXXXXXXXXXXXXX GP: XXXXXXXXXXXXXXXX + SP: XXXXXXXXXXXXXXXX PC: XXXXXXXXXXXXXXXX + + FP0: XXXXXXXXXXXXXXXX FP1: XXXXXXXXXXXXXXXX FP2: XXXXXXXXXXXXXXXX + FP3: XXXXXXXXXXXXXXXX FP4: XXXXXXXXXXXXXXXX FP5: XXXXXXXXXXXXXXXX + FP6: XXXXXXXXXXXXXXXX FP7: XXXXXXXXXXXXXXXX FP8: XXXXXXXXXXXXXXXX + FP9: XXXXXXXXXXXXXXXX FP10: XXXXXXXXXXXXXXXX FP11: XXXXXXXXXXXXXXXX + FP12: XXXXXXXXXXXXXXXX FP13: XXXXXXXXXXXXXXXX FP14: XXXXXXXXXXXXXXXX + FP15: XXXXXXXXXXXXXXXX FP16: XXXXXXXXXXXXXXXX FP17: XXXXXXXXXXXXXXXX + FP18: XXXXXXXXXXXXXXXX FP19: XXXXXXXXXXXXXXXX FP20: XXXXXXXXXXXXXXXX + FP21: XXXXXXXXXXXXXXXX FP22: XXXXXXXXXXXXXXXX FP23: XXXXXXXXXXXXXXXX + FP24: XXXXXXXXXXXXXXXX FP25: XXXXXXXXXXXXXXXX FP26: XXXXXXXXXXXXXXXX + FP27: XXXXXXXXXXXXXXXX FP28: XXXXXXXXXXXXXXXX FP29: XXXXXXXXXXXXXXXX + FP30: XXXXXXXXXXXXXXXX FPCR: XXXXXXXXXXXXXXXX + + TA0: XXXXXXXXXXXXXXXX TA1: XXXXXXXXXXXXXXXX TA2: XXXXXXXXXXXXXXXX +*/ + +#define NREGS (32+32+3) + +static const char regnames[NREGS][8] = +{ + " V0: ", " T0: ", " T1: ", + " T2: ", " T3: ", " T4: ", + " T5: ", " T6: ", " T7: ", + " S0: ", " S1: ", " S2: ", + " S3: ", " S4: ", " S5: ", + " S6: ", " A0: ", " A1: ", + " A2: ", " A3: ", " A4: ", + " A5: ", " T8: ", " T9: ", + " T10: ", " T11: ", " RA: ", + " T12: ", " AT: ", " GP: ", + " SP: ", " PC: ", + + " FP0: ", " FP1: ", " FP2: ", + " FP3: ", " FP4: ", " FP5: ", + " FP6: ", " FP7: ", " FP8: ", + " FP9: ", " FP10: ", " FP11: ", + " FP12: ", " FP13: ", " FP14: ", + " FP15: ", " FP16: ", " FP17: ", + " FP18: ", " FP19: ", " FP20: ", + " FP21: ", " FP22: ", " FP23: ", + " FP24: ", " FP25: ", " FP26: ", + " FP27: ", " FP28: ", " FP29: ", + " FP30: ", " FPCR: ", + + " TA0: ", " TA1: ", " TA2: " +}; + +#define O(FIELD, LF) offsetof(struct sigcontext, FIELD) + LF + +static const int offsets[NREGS] = +{ + O(sc_regs[0], 0), O(sc_regs[1], 0), O(sc_regs[2], 1), + O(sc_regs[3], 0), O(sc_regs[4], 0), O(sc_regs[5], 1), + O(sc_regs[6], 0), O(sc_regs[7], 0), O(sc_regs[8], 1), + O(sc_regs[9], 0), O(sc_regs[10], 0), O(sc_regs[11], 1), + O(sc_regs[12], 0), O(sc_regs[13], 0), O(sc_regs[14], 1), + O(sc_regs[15], 0), O(sc_regs[16], 0), O(sc_regs[17], 1), + O(sc_regs[18], 0), O(sc_regs[19], 0), O(sc_regs[20], 1), + O(sc_regs[21], 0), O(sc_regs[22], 0), O(sc_regs[23], 1), + O(sc_regs[24], 0), O(sc_regs[25], 0), O(sc_regs[26], 1), + O(sc_regs[27], 0), O(sc_regs[28], 0), O(sc_regs[29], 1), + O(sc_regs[30], 0), O(sc_pc, 2), + + O(sc_fpregs[0], 0), O(sc_fpregs[1], 0), O(sc_fpregs[2], 1), + O(sc_fpregs[3], 0), O(sc_fpregs[4], 0), O(sc_fpregs[5], 1), + O(sc_fpregs[6], 0), O(sc_fpregs[7], 0), O(sc_fpregs[8], 1), + O(sc_fpregs[9], 0), O(sc_fpregs[10], 0), O(sc_fpregs[11], 1), + O(sc_fpregs[12], 0), O(sc_fpregs[13], 0), O(sc_fpregs[14], 1), + O(sc_fpregs[15], 0), O(sc_fpregs[16], 0), O(sc_fpregs[17], 1), + O(sc_fpregs[18], 0), O(sc_fpregs[19], 0), O(sc_fpregs[20], 1), + O(sc_fpregs[21], 0), O(sc_fpregs[22], 0), O(sc_fpregs[23], 1), + O(sc_fpregs[24], 0), O(sc_fpregs[25], 0), O(sc_fpregs[26], 1), + O(sc_fpregs[27], 0), O(sc_fpregs[28], 0), O(sc_fpregs[29], 1), + O(sc_fpregs[30], 0), O(sc_fpcr, 2), + + O(sc_traparg_a0, 0), O(sc_traparg_a1, 0), O(sc_traparg_a2, 1) +}; + +#undef O + +static const char linefeed[2] = "\n\n"; + +static void +register_dump (int fd, struct sigcontext *ctx) +{ + char regs[NREGS][16]; + struct iovec iov[2*NREGS+24]; + size_t iov_i = 0, i, j; + +#define ADD_MEM(str, len) \ + (iov[iov_i].iov_base = (void *)(str), \ + iov[iov_i].iov_len = len, \ + ++iov_i) + +#define ADD_STRING(str) ADD_MEM(str, strlen(str)) + + ADD_STRING ("Register dump:\n\n"); + + for (i = 0; i < NREGS; ++i) + { + int this_offset, this_lf; + unsigned long val; + + this_offset = offsets[i]; + this_lf = this_offset & 7; + this_offset &= -8; + + val = *(unsigned long *)((char *)ctx + this_offset); + + for (j = 0; j < 16; ++j) + { + unsigned long x = (val >> (64 - (j + 1) * 4)) & 15; + x += x < 10 ? '0' : 'a' - 10; + regs[i][j] = x; + } + + ADD_MEM (regnames[i], 8); + ADD_MEM (regs[i], 16); + if (this_lf) + ADD_MEM (linefeed, this_lf); + } + + writev (fd, iov, iov_i); +} + +#define REGISTER_DUMP register_dump (fd, ctx) diff --git a/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h b/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h index eb6f4f0758..16c5dcbc5b 100644 --- a/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h +++ b/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1999 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2004 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 @@ -16,10 +16,10 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#define SIGCONTEXT struct sigcontext -#define SIGCONTEXT_EXTRA_ARGS -#define GET_PC(ctx) ((void *) (ctx).sc_pc) -#define GET_FRAME(ctx) ((void *) (ctx).sc_regs[15]) -#define GET_STACK(ctx) ((void *) (ctx).sc_regs[30]) +#define SIGCONTEXT int _code, struct sigcontext * +#define SIGCONTEXT_EXTRA_ARGS _code, +#define GET_PC(ctx) ((void *) (ctx)->sc_pc) +#define GET_FRAME(ctx) ((void *) (ctx)->sc_regs[15]) +#define GET_STACK(ctx) ((void *) (ctx)->sc_regs[30]) #define CALL_SIGHANDLER(handler, signo, ctx) \ (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx)) From 145f3f8a3cc5dd41ead26ce0b709064e60a73fb9 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 18 Oct 2004 05:16:08 +0000 Subject: [PATCH 3365/4487] (__SYSCALL_CLOBBERS): Add "memory". --- sysdeps/unix/sysv/linux/mips/mips32/sysdep.h | 5 +++-- sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h | 5 +++-- sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h index 1f56671ba0..5eaf7a276b 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002, 2003, 2004 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 @@ -275,7 +275,8 @@ _sys_result; \ }) -#define __SYSCALL_CLOBBERS "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", "$25" +#define __SYSCALL_CLOBBERS "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", \ + "$14", "$15", "$24", "$25", "memory" #endif /* __ASSEMBLER__ */ diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h index 2b2aefa15d..be343aabca 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002, 2003, 2004 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 @@ -235,7 +235,8 @@ _sys_result; \ }) -#define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", "$14", "$15", "$24", "$25" +#define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", \ + "$14", "$15", "$24", "$25", "memory" #endif /* __ASSEMBLER__ */ #endif /* linux/mips/sysdep.h */ diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h index e2d8707d25..f30a465081 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002, 2003, 2004 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 @@ -235,7 +235,8 @@ _sys_result; \ }) -#define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", "$14", "$15", "$24", "$25" +#define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", \ + "$14", "$15", "$24", "$25", "memory" #endif /* __ASSEMBLER__ */ #endif /* linux/mips/sysdep.h */ From d115c0d8f666ec4d55ccb8e42ec2c2effd99f75b Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Sat, 23 Oct 2004 00:33:35 +0000 Subject: [PATCH 3366/4487] Added Matsushita AM33/2.0 port. --- ChangeLog.am33 | 207 ++++++++ sysdeps/am33/Implies | 3 + sysdeps/am33/__longjmp.S | 61 +++ sysdeps/am33/atomicity.h | 87 ++++ sysdeps/am33/bits/endian.h | 7 + sysdeps/am33/bits/setjmp.h | 34 ++ sysdeps/am33/bsd-_setjmp.S | 1 + sysdeps/am33/bsd-setjmp.S | 1 + sysdeps/am33/dl-machine.h | 481 ++++++++++++++++++ sysdeps/am33/elf/start.S | 81 +++ sysdeps/am33/fpu/bits/fenv.h | 67 +++ sysdeps/am33/fpu/fclrexcpt.c | 52 ++ sysdeps/am33/fpu/fedisblxcpt.c | 42 ++ sysdeps/am33/fpu/feenablxcpt.c | 42 ++ sysdeps/am33/fpu/fegetenv.c | 35 ++ sysdeps/am33/fpu/fegetexcept.c | 35 ++ sysdeps/am33/fpu/fegetround.c | 35 ++ sysdeps/am33/fpu/feholdexcpt.c | 39 ++ sysdeps/am33/fpu/fenv_libc.h | 33 ++ sysdeps/am33/fpu/fesetenv.c | 60 +++ sysdeps/am33/fpu/fesetround.c | 29 ++ sysdeps/am33/fpu/feupdateenv.c | 47 ++ sysdeps/am33/fpu/fgetexcptflg.c | 44 ++ sysdeps/am33/fpu/fpu_control.h | 75 +++ sysdeps/am33/fpu/fraiseexcpt.c | 79 +++ sysdeps/am33/fpu/fsetexcptflg.c | 57 +++ sysdeps/am33/fpu/ftestexcept.c | 34 ++ sysdeps/am33/linuxthreads/pspinlock.c | 74 +++ sysdeps/am33/linuxthreads/pt-machine.h | 68 +++ sysdeps/am33/memusage.h | 23 + sysdeps/am33/preconfigure | 5 + sysdeps/am33/setjmp.S | 80 +++ sysdeps/am33/shlib-versions | 1 + sysdeps/am33/stackinfo.h | 28 + sysdeps/am33/sys/ucontext.h | 123 +++++ sysdeps/am33/sysdep.h | 82 +++ sysdeps/unix/am33/sysdep.S | 64 +++ sysdeps/unix/am33/sysdep.h | 33 ++ sysdeps/unix/sysv/linux/am33/Makefile | 3 + sysdeps/unix/sysv/linux/am33/bits/fcntl.h | 179 +++++++ sysdeps/unix/sysv/linux/am33/bits/mman.h | 97 ++++ sysdeps/unix/sysv/linux/am33/brk.c | 46 ++ sysdeps/unix/sysv/linux/am33/chown.c | 1 + sysdeps/unix/sysv/linux/am33/clone.S | 81 +++ sysdeps/unix/sysv/linux/am33/configure | 4 + sysdeps/unix/sysv/linux/am33/configure.in | 4 + sysdeps/unix/sysv/linux/am33/fchown.c | 1 + sysdeps/unix/sysv/linux/am33/fcntl.c | 1 + sysdeps/unix/sysv/linux/am33/fxstat.c | 1 + sysdeps/unix/sysv/linux/am33/getegid.c | 1 + sysdeps/unix/sysv/linux/am33/geteuid.c | 1 + sysdeps/unix/sysv/linux/am33/getgid.c | 1 + sysdeps/unix/sysv/linux/am33/getgroups.c | 1 + sysdeps/unix/sysv/linux/am33/getmsg.c | 1 + sysdeps/unix/sysv/linux/am33/getresgid.c | 1 + sysdeps/unix/sysv/linux/am33/getresuid.c | 1 + sysdeps/unix/sysv/linux/am33/getrlimit.c | 1 + sysdeps/unix/sysv/linux/am33/getuid.c | 1 + sysdeps/unix/sysv/linux/am33/lchown.c | 1 + sysdeps/unix/sysv/linux/am33/lockf64.c | 1 + sysdeps/unix/sysv/linux/am33/lxstat.c | 1 + sysdeps/unix/sysv/linux/am33/profil-counter.h | 27 + sysdeps/unix/sysv/linux/am33/putmsg.c | 1 + sysdeps/unix/sysv/linux/am33/setegid.c | 1 + sysdeps/unix/sysv/linux/am33/seteuid.c | 1 + sysdeps/unix/sysv/linux/am33/setfsgid.c | 1 + sysdeps/unix/sysv/linux/am33/setfsuid.c | 1 + sysdeps/unix/sysv/linux/am33/setgid.c | 1 + sysdeps/unix/sysv/linux/am33/setgroups.c | 1 + sysdeps/unix/sysv/linux/am33/setregid.c | 1 + sysdeps/unix/sysv/linux/am33/setresgid.c | 1 + sysdeps/unix/sysv/linux/am33/setresuid.c | 1 + sysdeps/unix/sysv/linux/am33/setreuid.c | 1 + sysdeps/unix/sysv/linux/am33/setrlimit.c | 1 + sysdeps/unix/sysv/linux/am33/setuid.c | 1 + sysdeps/unix/sysv/linux/am33/socket.S | 73 +++ sysdeps/unix/sysv/linux/am33/syscall.S | 43 ++ sysdeps/unix/sysv/linux/am33/sysdep.S | 42 ++ sysdeps/unix/sysv/linux/am33/sysdep.h | 317 ++++++++++++ sysdeps/unix/sysv/linux/am33/xstat.c | 1 + .../sysv/linux/linuxthreads/sysdep-cancel.h | 159 ++++++ 81 files changed, 3454 insertions(+) create mode 100644 ChangeLog.am33 create mode 100644 sysdeps/am33/Implies create mode 100644 sysdeps/am33/__longjmp.S create mode 100644 sysdeps/am33/atomicity.h create mode 100644 sysdeps/am33/bits/endian.h create mode 100644 sysdeps/am33/bits/setjmp.h create mode 100644 sysdeps/am33/bsd-_setjmp.S create mode 100644 sysdeps/am33/bsd-setjmp.S create mode 100644 sysdeps/am33/dl-machine.h create mode 100644 sysdeps/am33/elf/start.S create mode 100644 sysdeps/am33/fpu/bits/fenv.h create mode 100644 sysdeps/am33/fpu/fclrexcpt.c create mode 100644 sysdeps/am33/fpu/fedisblxcpt.c create mode 100644 sysdeps/am33/fpu/feenablxcpt.c create mode 100644 sysdeps/am33/fpu/fegetenv.c create mode 100644 sysdeps/am33/fpu/fegetexcept.c create mode 100644 sysdeps/am33/fpu/fegetround.c create mode 100644 sysdeps/am33/fpu/feholdexcpt.c create mode 100644 sysdeps/am33/fpu/fenv_libc.h create mode 100644 sysdeps/am33/fpu/fesetenv.c create mode 100644 sysdeps/am33/fpu/fesetround.c create mode 100644 sysdeps/am33/fpu/feupdateenv.c create mode 100644 sysdeps/am33/fpu/fgetexcptflg.c create mode 100644 sysdeps/am33/fpu/fpu_control.h create mode 100644 sysdeps/am33/fpu/fraiseexcpt.c create mode 100644 sysdeps/am33/fpu/fsetexcptflg.c create mode 100644 sysdeps/am33/fpu/ftestexcept.c create mode 100644 sysdeps/am33/linuxthreads/pspinlock.c create mode 100644 sysdeps/am33/linuxthreads/pt-machine.h create mode 100644 sysdeps/am33/memusage.h create mode 100644 sysdeps/am33/preconfigure create mode 100644 sysdeps/am33/setjmp.S create mode 100644 sysdeps/am33/shlib-versions create mode 100644 sysdeps/am33/stackinfo.h create mode 100644 sysdeps/am33/sys/ucontext.h create mode 100644 sysdeps/am33/sysdep.h create mode 100644 sysdeps/unix/am33/sysdep.S create mode 100644 sysdeps/unix/am33/sysdep.h create mode 100644 sysdeps/unix/sysv/linux/am33/Makefile create mode 100644 sysdeps/unix/sysv/linux/am33/bits/fcntl.h create mode 100644 sysdeps/unix/sysv/linux/am33/bits/mman.h create mode 100644 sysdeps/unix/sysv/linux/am33/brk.c create mode 100644 sysdeps/unix/sysv/linux/am33/chown.c create mode 100644 sysdeps/unix/sysv/linux/am33/clone.S create mode 100755 sysdeps/unix/sysv/linux/am33/configure create mode 100644 sysdeps/unix/sysv/linux/am33/configure.in create mode 100644 sysdeps/unix/sysv/linux/am33/fchown.c create mode 100644 sysdeps/unix/sysv/linux/am33/fcntl.c create mode 100644 sysdeps/unix/sysv/linux/am33/fxstat.c create mode 100644 sysdeps/unix/sysv/linux/am33/getegid.c create mode 100644 sysdeps/unix/sysv/linux/am33/geteuid.c create mode 100644 sysdeps/unix/sysv/linux/am33/getgid.c create mode 100644 sysdeps/unix/sysv/linux/am33/getgroups.c create mode 100644 sysdeps/unix/sysv/linux/am33/getmsg.c create mode 100644 sysdeps/unix/sysv/linux/am33/getresgid.c create mode 100644 sysdeps/unix/sysv/linux/am33/getresuid.c create mode 100644 sysdeps/unix/sysv/linux/am33/getrlimit.c create mode 100644 sysdeps/unix/sysv/linux/am33/getuid.c create mode 100644 sysdeps/unix/sysv/linux/am33/lchown.c create mode 100644 sysdeps/unix/sysv/linux/am33/lockf64.c create mode 100644 sysdeps/unix/sysv/linux/am33/lxstat.c create mode 100644 sysdeps/unix/sysv/linux/am33/profil-counter.h create mode 100644 sysdeps/unix/sysv/linux/am33/putmsg.c create mode 100644 sysdeps/unix/sysv/linux/am33/setegid.c create mode 100644 sysdeps/unix/sysv/linux/am33/seteuid.c create mode 100644 sysdeps/unix/sysv/linux/am33/setfsgid.c create mode 100644 sysdeps/unix/sysv/linux/am33/setfsuid.c create mode 100644 sysdeps/unix/sysv/linux/am33/setgid.c create mode 100644 sysdeps/unix/sysv/linux/am33/setgroups.c create mode 100644 sysdeps/unix/sysv/linux/am33/setregid.c create mode 100644 sysdeps/unix/sysv/linux/am33/setresgid.c create mode 100644 sysdeps/unix/sysv/linux/am33/setresuid.c create mode 100644 sysdeps/unix/sysv/linux/am33/setreuid.c create mode 100644 sysdeps/unix/sysv/linux/am33/setrlimit.c create mode 100644 sysdeps/unix/sysv/linux/am33/setuid.c create mode 100644 sysdeps/unix/sysv/linux/am33/socket.S create mode 100644 sysdeps/unix/sysv/linux/am33/syscall.S create mode 100644 sysdeps/unix/sysv/linux/am33/sysdep.S create mode 100644 sysdeps/unix/sysv/linux/am33/sysdep.h create mode 100644 sysdeps/unix/sysv/linux/am33/xstat.c create mode 100644 sysdeps/unix/sysv/linux/linuxthreads/sysdep-cancel.h diff --git a/ChangeLog.am33 b/ChangeLog.am33 new file mode 100644 index 0000000000..dfca6e832c --- /dev/null +++ b/ChangeLog.am33 @@ -0,0 +1,207 @@ +2004-10-22 Alexandre Oliva + + * sysdeps/unix/sysv/linux/am33/bits/mman.h (PROT_GROWSDOWN): New. + (PROT_GROWSUP): New. + +2004-08-16 Alexandre Oliva + + * sysdeps/am33/shlib-versions: Moved from top level. + +2004-08-09 Alexandre Oliva + + * sysdeps/am33/preconfigure: Renamed from configure. + * Makefile: Removed. + +2004-07-20 Alexandre Oliva + + Moved from separate linuxthreads tree into am33/linuxthreads + subdirs: + 2004-07-01 Alexandre Oliva + * sysdeps/unix/sysv/linux/am33/linuxthreads/sysdep-cancel.h + (PSEUDO): Save value returned by CENABLE and pass it to CDISABLE. + * sysdeps/am33/linuxthreads/pt-machine.h (testandset): Take + volatile argument. Improve asm statement. + 2001-10-31 Alexandre Oliva + * sysdeps/am33/linuxthreads/pspinlock.c: New file. + * sysdeps/am33/linuxthreads/pt-machine.h: New file. + +2004-07-19 Alexandre Oliva + + * configure: New. + * mach.sh: Removed. + * sysdeps/am33/Makefile: Likewise. + +2004-06-28 Alexandre Oliva + + * sysdeps/am33/Makefile: New file. + * sysdeps/unix/sysv/linux/am33/configure.in: New file. + * sysdeps/unix/sysv/linux/am33/configure: New file. + * mach.sh: New file. + +2004-06-19 Alexandre Oliva + + * sysdeps/am33/fpu/bits/fenv.h: New file. + * sysdeps/am33/fpu/fpu_control.h: New file. + * sysdeps/am33/fpu/fenv_libc.h: New file. + * sysdeps/am33/fpu/fclrexcpt.c: New file. + * sysdeps/am33/fpu/fedisblxcpt.c: New file. + * sysdeps/am33/fpu/feenablxcpt.c: New file. + * sysdeps/am33/fpu/fegetenv.c: New file. + * sysdeps/am33/fpu/fegetexcept.c: New file. + * sysdeps/am33/fpu/fegetround.c: New file. + * sysdeps/am33/fpu/feholdexcpt.c: New file. + * sysdeps/am33/fpu/fesetenv.c: New file. + * sysdeps/am33/fpu/fesetround.c: New file. + * sysdeps/am33/fpu/feupdateenv.c: New file. + * sysdeps/am33/fpu/fgetexcptflg.c: New file. + * sysdeps/am33/fpu/fraiseexcpt.c: New file. + * sysdeps/am33/fpu/fsetexcptflg.c: New file. + * sysdeps/am33/fpu/ftestexcept.c: New file. + + * sysdeps/unix/am33/sysdep.h: Use relative pathnames. + * sysdeps/unix/sysv/linux/am33/sysdep.h: Likewise. + * sysdeps/unix/sysv/linux/am33/sysdep.S: Likewise. + * configure, Makefile: Do nothing. + +2004-06-09 Alexandre Oliva + + * sysdeps/am33/bsd-setjmp.S: Move into... + * sysdeps/am33/setjmp.S: ... this file. + * sysdeps/am33/bsd-_setjmp.S: Likewise. + * sysdeps/am33/dl-machine.h (_dl_start_user): Do not do double + indirection to obtain _dl_loaded. + (elf_machine_rela_relative): Do not add addend. + +2004-06-08 Alexandre Oliva + + * sysdeps/am33/sysdep.h (JUMPTARGET): Undef before redefining. + * sysdeps/unix/sysv/linux/am33/sysdep.h (PSEUDO_NOERROR, + PSEUDO_END_NOERROR, ret_NOERROR, PSEUDO_ERRVAL, PSEUDO_END_ERRVAL, + ret_ERRVAL, INTERNAL_SYSCALL, INTERNAL_SYSCALL_DECL, + INTERNAL_SYSCALL_ERROR_P, INTERNAL_SYSCALL_ERRNO): New. + (INLINE_SYSCALL): Rewrite in terms of INTERNAL_SYSCALL macros. + (DO_CALL): Reorder arguments. + * sysdeps/am33/dl-machine.h (elf_machine_rela): Update prototype. + +2003-05-16 Alexandre Oliva + + * sysdeps/unix/sysv/linux/am33/Makefile: New file. + * sysdeps/unix/sysv/linux/am33/sysdep.h (INLINE_SYSCALL1): Drop + comma before args when calling inline_syscall0. + * sysdeps/unix/sysv/linux/am33/chown.c: New file. + * sysdeps/unix/sysv/linux/am33/fchown.c: New file. + * sysdeps/unix/sysv/linux/am33/fxstat.c: New file. + * sysdeps/unix/sysv/linux/am33/getegid.c: New file. + * sysdeps/unix/sysv/linux/am33/geteuid.c: New file. + * sysdeps/unix/sysv/linux/am33/getgid.c: New file. + * sysdeps/unix/sysv/linux/am33/getrlimit.c: New file. + * sysdeps/unix/sysv/linux/am33/getuid.c: New file. + * sysdeps/unix/sysv/linux/am33/lchown.c: New file. + * sysdeps/unix/sysv/linux/am33/lockf64.c: New file. + * sysdeps/unix/sysv/linux/am33/lxstat.c: New file. + * sysdeps/unix/sysv/linux/am33/setegid.c: New file. + * sysdeps/unix/sysv/linux/am33/seteuid.c: New file. + * sysdeps/unix/sysv/linux/am33/setfsgid.c: New file. + * sysdeps/unix/sysv/linux/am33/setfsuid.c: New file. + * sysdeps/unix/sysv/linux/am33/setgid.c: New file. + * sysdeps/unix/sysv/linux/am33/setregid.c: New file. + * sysdeps/unix/sysv/linux/am33/setresgid.c: New file. + * sysdeps/unix/sysv/linux/am33/setresuid.c: New file. + * sysdeps/unix/sysv/linux/am33/setreuid.c: New file. + * sysdeps/unix/sysv/linux/am33/setrlimit.c: New file. + * sysdeps/unix/sysv/linux/am33/setuid.c: New file. + * sysdeps/unix/sysv/linux/am33/xstat.c: New file. + * sysdeps/unix/sysv/linux/am33/syscalls.list: Removed, reverting + 2003-03-26's patch. + * sysdeps/unix/sysv/linux/am33/getresgid.c: New file. + * sysdeps/unix/sysv/linux/am33/getresuid.c: New file. + +2003-05-09 Alexandre Oliva + + * sysdeps/unix/sysv/linux/am33/getgroups.c: New file. + * sysdeps/unix/sysv/linux/am33/setgroups.c: New file. + +2003-05-07 Alexandre Oliva + + * sysdeps/unix/sysv/linux/am33/getmsg.c: New file. + * sysdeps/unix/sysv/linux/am33/putmsg.c: New file. + +2003-03-26 Alexandre Oliva + + * sysdeps/unix/sysv/linux/am33/syscalls.list: Added getresuid and + getresgid. + +2003-01-17 Alexandre Oliva + + * sysdeps/unix/sysv/linux/am33/fcntl.c: New file. + +2002-02-08 Alexandre Oliva + + * sysdeps/am33/sys/ucontext.h (fpregset_t): Make it a structure. + +2002-01-07 Alexandre Oliva + + * sysdeps/am33/sys/ucontext.h (NFREG): Increment by 1, to make + room for FPCR. + +2001-12-13 Alexandre Oliva + + * shlib-versions: Set GLIBC_2.2.5 as the earliest symbol set. + +2001-12-07 Alexandre Oliva + + * sysdeps/am33/__longjmp.S: Tabify. + * sysdeps/am33/setjmp.S: Likewise. + * sysdeps/am33/dl-debug.h: Remove. + * sysdeps/am33/dl-machine.h: Delete commented-out uses of + macros defined in dl-debug. + (elf_machine_rela): Optimize if HAVE_Z_COMBRELOC. Fix + prediction of R_MN10300_NONE. Don't test for impossible + condition. + * sysdeps/am33/sysdep.h (ASM_TYPE_DIRECTIVE, + ASM_SIZE_DIRECTIVE): Define to nothing if ! HAVE_ELF. + +2001-11-09 Alexandre Oliva + + * sysdeps/unix/sysv/linux/am33/clone.S: Avoid branch overflow in + static link. + +2001-11-08 Alexandre Oliva + + * sysdeps/unix/sysv/linux/am33/clone.S: Load arguments correctly + for syscall. + +2001-11-07 Alexandre Oliva + + * sysdeps/unix/sysv/linux/am33/clone.S: Fix argument-passing + to thread_start. + +2001-10-31 Alexandre Oliva + + * shlib-versions: Added am33_2.0 support. + * sysdeps/am33/Implies: New file. + * sysdeps/am33/__longjmp.S: New file. + * sysdeps/am33/atomicity.h: New file. + * sysdeps/am33/bsd-_setjmp.S: New file. + * sysdeps/am33/bsd-setjmp.S: New file. + * sysdeps/am33/dl-debug.h: New file. + * sysdeps/am33/dl-machine.h: New file. + * sysdeps/am33/memusage.h: New file. + * sysdeps/am33/setjmp.S: New file. + * sysdeps/am33/stackinfo.h: New file. + * sysdeps/am33/sysdep.h: New file. + * sysdeps/am33/bits/endian.h: New file. + * sysdeps/am33/bits/setjmp.h: New file. + * sysdeps/am33/elf/start.S: New file. + * sysdeps/am33/sys/ucontext.h: New file. + * sysdeps/unix/am33/sysdep.S: New file. + * sysdeps/unix/am33/sysdep.h: New file. + * sysdeps/unix/sysv/linux/am33/brk.c: New file. + * sysdeps/unix/sysv/linux/am33/clone.S: New file. + * sysdeps/unix/sysv/linux/am33/profil-counter.h: New file. + * sysdeps/unix/sysv/linux/am33/socket.S: New file. + * sysdeps/unix/sysv/linux/am33/syscall.S: New file. + * sysdeps/unix/sysv/linux/am33/sysdep.S: New file. + * sysdeps/unix/sysv/linux/am33/sysdep.h: New file. + * sysdeps/unix/sysv/linux/am33/bits/fcntl.h: New file. + * sysdeps/unix/sysv/linux/am33/bits/mman.h: New file. diff --git a/sysdeps/am33/Implies b/sysdeps/am33/Implies new file mode 100644 index 0000000000..780c4e2467 --- /dev/null +++ b/sysdeps/am33/Implies @@ -0,0 +1,3 @@ +wordsize-32 +ieee754/flt-32 +ieee754/dbl-64 diff --git a/sysdeps/am33/__longjmp.S b/sysdeps/am33/__longjmp.S new file mode 100644 index 0000000000..9bdcc489e8 --- /dev/null +++ b/sysdeps/am33/__longjmp.S @@ -0,0 +1,61 @@ +/* longjmp for AM33. + Copyright 2001 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. */ + +#include +#define _ASM +#define _SETJMP_H +#include +#include + +ENTRY (__longjmp) + mov d0,a0 + mov (8,a0),d2 + mov d2,mdr + mov (0,a0),d2 + mov (4,a0),d3 + mov (12,a0),a2 + mov (16,a0),a3 + mov (20,a0),a1 + mov a1,sp + add 24,a0 + mov (a0+),r4 + mov (a0+),r5 + mov (a0+),r6 + mov (a0+),r7 +#ifdef __AM33_2__ + fmov (a0+),fs4 + fmov (a0+),fs5 + fmov (a0+),fs6 + fmov (a0+),fs7 + fmov (a0+),fs8 + fmov (a0+),fs9 + fmov (a0+),fs10 + fmov (a0+),fs11 + fmov (a0+),fs12 + fmov (a0+),fs13 + fmov (a0+),fs14 + fmov (a0+),fs15 + fmov (a0+),fs16 + fmov (a0+),fs17 + fmov (a0+),fs18 + fmov (a0+),fs19 +#endif + mov d1,d0 + retf [],0 +END (__longjmp) diff --git a/sysdeps/am33/atomicity.h b/sysdeps/am33/atomicity.h new file mode 100644 index 0000000000..d7765338ac --- /dev/null +++ b/sysdeps/am33/atomicity.h @@ -0,0 +1,87 @@ +/* Low-level functions for atomic operations. AM33 version. + Copyright 1999, 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Alexandre Oliva . + Based on ../sparc/sparc32/atomicity.h + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _ATOMICITY_H +#define _ATOMICITY_H 1 + +#include + +#define __acquire_lock(lock) \ + __asm__ __volatile__("1: bset %1, (%0)\n\t" \ + " beq 1b" \ + : : "a" (&(lock)), "d" (1) \ + : "memory") + +#define __release_lock(lock) lock = 0 + +static int +__attribute__ ((unused)) +exchange_and_add (volatile uint32_t *mem, int val) +{ + static unsigned char lock; + int result; + + __acquire_lock (lock); + + result = *mem; + *mem += val; + + __release_lock (lock); + + return result; +} + +static void +__attribute__ ((unused)) +atomic_add (volatile uint32_t *mem, int val) +{ + static unsigned char lock; + + __acquire_lock (lock); + + *mem += val; + + __release_lock (lock); +} + +static int +__attribute__ ((unused)) +compare_and_swap (volatile long int *p, long int oldval, long int newval) +{ + static unsigned char lock; + int ret; + + __acquire_lock (lock); + + if (*p != oldval) + ret = 0; + else + { + *p = newval; + ret = 1; + } + + __release_lock (lock); + + return ret; +} + +#endif /* atomicity.h */ diff --git a/sysdeps/am33/bits/endian.h b/sysdeps/am33/bits/endian.h new file mode 100644 index 0000000000..7423f09570 --- /dev/null +++ b/sysdeps/am33/bits/endian.h @@ -0,0 +1,7 @@ +/* AM33 is little-endian. */ + +#ifndef _ENDIAN_H +# error "Never use directly; include instead." +#endif + +#define __BYTE_ORDER __LITTLE_ENDIAN diff --git a/sysdeps/am33/bits/setjmp.h b/sysdeps/am33/bits/setjmp.h new file mode 100644 index 0000000000..5864b92e64 --- /dev/null +++ b/sysdeps/am33/bits/setjmp.h @@ -0,0 +1,34 @@ +/* Copyright 2001 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. */ + +/* Define the machine-dependent type `jmp_buf'. AM33 version. */ + +#ifndef _SETJMP_H +# error "Never include directly; use instead." +#endif + +#ifndef _ASM +typedef int __jmp_buf[26]; +#endif + +#define __JMP_BUF_SP 20 + +/* Test if longjmp to JMPBUF would unwind the frame + containing a local variable at ADDRESS. */ +#define _JMPBUF_UNWINDS(jmpbuf, address) \ + ((void *) (address) < (void *) (jmpbuf[__JMP_BUF_SP])) diff --git a/sysdeps/am33/bsd-_setjmp.S b/sysdeps/am33/bsd-_setjmp.S new file mode 100644 index 0000000000..9bbfcbbba7 --- /dev/null +++ b/sysdeps/am33/bsd-_setjmp.S @@ -0,0 +1 @@ +/* _setjmp is in setjmp.S */ diff --git a/sysdeps/am33/bsd-setjmp.S b/sysdeps/am33/bsd-setjmp.S new file mode 100644 index 0000000000..b6b239e67d --- /dev/null +++ b/sysdeps/am33/bsd-setjmp.S @@ -0,0 +1 @@ +/* setjmp is in setjmp.S */ diff --git a/sysdeps/am33/dl-machine.h b/sysdeps/am33/dl-machine.h new file mode 100644 index 0000000000..808fd9cc82 --- /dev/null +++ b/sysdeps/am33/dl-machine.h @@ -0,0 +1,481 @@ +/* Machine-dependent ELF dynamic relocation inline functions. AM33 version. + Copyright (C) 1995,96,97,98,99,2000,2001, 2004 + 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef dl_machine_h +#define dl_machine_h + +#define ELF_MACHINE_NAME "mn10300" + +#include + +/* Return nonzero iff ELF header is compatible with the running host. */ +static inline int __attribute__ ((unused)) +elf_machine_matches_host (const Elf32_Ehdr *ehdr) +{ + return ehdr->e_machine == EM_MN10300; +} + + +/* Return the link-time address of _DYNAMIC. Conveniently, this is the + first element of the GOT. This must be inlined in a function which + uses global data. */ +static inline Elf32_Addr __attribute__ ((unused)) +elf_machine_dynamic (void) +{ + register Elf32_Addr *got asm ("a2"); + return *got; +} + + +/* Return the run-time load address of the shared object. */ +static inline Elf32_Addr __attribute__ ((unused)) +elf_machine_load_address (void) +{ + register Elf32_Addr gotaddr asm ("a2"); + Elf32_Addr off, gotval; + + asm ("mov _dl_start@GOTOFF,%0" : "=r" (off)); + asm ("mov (_dl_start@GOT,%1),%0" : "=r" (gotval) : "r" (gotaddr)); + + return off + gotaddr - gotval; +} + +#if !defined PROF && !__BOUNDED_POINTERS__ +/* We add a declaration of this function here so that in dl-runtime.c + the ELF_MACHINE_RUNTIME_TRAMPOLINE macro really can pass the parameters + in registers. + + We cannot use this scheme for profiling because the _mcount call + destroys the passed register information. */ +/* GKM FIXME: Fix trampoline to pass bounds so we can do + without the `__unbounded' qualifier. */ +static ElfW(Addr) fixup (struct link_map *__unbounded l, ElfW(Word) reloc_offset) + __attribute__ ((unused)); +static ElfW(Addr) profile_fixup (struct link_map *l, ElfW(Word) reloc_offset, + ElfW(Addr) retaddr) + __attribute__ ((unused)); +#endif + +/* Set up the loaded object described by L so its unrelocated PLT + entries will jump to the on-demand fixup code in dl-runtime.c. */ + +static inline int __attribute__ ((unused)) +elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) +{ + Elf32_Addr *got; + extern void _dl_runtime_resolve (Elf32_Word) attribute_hidden; + extern void _dl_runtime_profile (Elf32_Word) attribute_hidden; + + if (l->l_info[DT_JMPREL] && lazy) + { + /* The GOT entries for functions in the PLT have not yet been filled + in. Their initial contents will arrange when called to push an + offset into the .rel.plt section, push _GLOBAL_OFFSET_TABLE_[1], + and then jump to _GLOBAL_OFFSET_TABLE[2]. */ + got = (Elf32_Addr *) D_PTR (l, l_info[DT_PLTGOT]); + got[1] = (Elf32_Addr) l; /* Identify this shared object. */ + + /* The got[2] entry contains the address of a function which gets + called to get the address of a so far unresolved function and + jump to it. The profiling extension of the dynamic linker allows + to intercept the calls to collect information. In this case we + don't store the address in the GOT so that all future calls also + end in this function. */ + if (__builtin_expect (profile, 0)) + { + got[2] = (Elf32_Addr) &_dl_runtime_profile; + + if (_dl_name_match_p (GLRO(dl_profile), l)) + /* This is the object we are looking for. Say that we really + want profiling and the timers are started. */ + GL(dl_profile_map) = l; + } + else + /* This function will get called to fix up the GOT entry indicated by + the offset on the stack, and then jump to the resolved address. */ + got[2] = (Elf32_Addr) &_dl_runtime_resolve; + } + + return lazy; +} + +/* This code is used in dl-runtime.c to call the `fixup' function + and then redirect to the address it returns. */ +#if !defined PROF && !__BOUNDED_POINTERS__ +# define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\ + .text\n\ + .globl _dl_runtime_resolve\n\ + .type _dl_runtime_resolve, @function\n\ +_dl_runtime_resolve:\n\ + add -12,sp # Preserve registers otherwise clobbered.\n\ + mov d1,(20,sp)\n\ + mov d0,(16,sp)\n\ + mov r1,d0\n\ + mov r0,d1\n\ + call fixup,[],0 # Call resolver.\n\ + mov d0,a0\n\ + mov (12,sp),d1 # Copy return address back to mdr,\n\ + mov d1,mdr # in case the callee returns with retf\n\ + mov (16,sp),d0 # Get register content back.\n\ + mov (20,sp),d1\n\ + add 12,sp\n\ + jmp (a0)\n\ + .size _dl_runtime_resolve, .-_dl_runtime_resolve\n\ +\n\ + .globl _dl_runtime_profile\n\ + .type _dl_runtime_profile, @function\n\ +_dl_runtime_profile:\n\ + add -12,sp # Preserve registers otherwise clobbered.\n\ + mov d1,(20,sp)\n\ + mov d0,(16,sp)\n\ + mov r1,d0\n\ + mov r0,d1\n\ + call profile_fixup,[],0 # Call resolver.\n\ + mov d0,a0\n\ + mov (12,sp),d1 # Copy return address back to mdr,\n\ + mov d1,mdr # in case the callee returns with retf\n\ + mov (16,sp),d0 # Get register content back.\n\ + mov (20,sp),d1\n\ + add 12,sp\n\ + jmp (a0)\n\ + .size _dl_runtime_profile, .-_dl_runtime_profile\n\ + .previous\n\ +"); +#else +# define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\n\ + .text\n\ + .globl _dl_runtime_resolve\n\ + .globl _dl_runtime_profile\n\ + .type _dl_runtime_resolve, @function\n\ + .type _dl_runtime_profile, @function\n\ +_dl_runtime_resolve:\n\ +_dl_runtime_profile:\n\ + add -12,sp # Preserve registers otherwise clobbered.\n\ + mov d1,(20,sp)\n\ + mov d0,(16,sp)\n\ + mov r1,d0\n\ + mov r0,d1\n\ + call profile_fixup,[],0 # Call resolver.\n\ + mov d0,a0\n\ + mov (12,sp),d1 # Copy return address back to mdr,\n\ + mov d1,mdr # in case the callee returns with retf\n\ + mov (16,sp),d0 # Get register content back.\n\ + mov (20,sp),d1\n\ + add 12,sp\n\ + jmp (a0)\n\ + .size _dl_runtime_resolve, .-_dl_runtime_resolve\n\ + .size _dl_runtime_profile, .-_dl_runtime_profile\n\ + .previous\n\ +"); +#endif + +/* Mask identifying addresses reserved for the user program, + where the dynamic linker should not map anything. */ +#define ELF_MACHINE_USER_ADDRESS_MASK 0xf8000000UL + +/* Initial entry point code for the dynamic linker. + The C function `_dl_start' is the real entry point; + its return value is the user program's entry point. */ +#define RTLD_START asm ("\n\ + .text\n\ +.globl _start\n\ +.globl _dl_start_user\n\ +_start:\n\ + mov 0,a3 # Mark the top of the stack\n\ + mov sp,a1\n\ + add -20,sp # Prepare for function call\n\ + mov a1,d0\n\ + call _dl_start,[],0\n\ +_dl_start_user:\n\ + # Save the user entry point address in d2.\n\ + mov d0,d2\n\ + # Point a2 at the GOT.\n\ +0: mov pc,a2\n\ + add _GLOBAL_OFFSET_TABLE_ - (0b-.),a2\n\ + # Store the highest stack address\n\ + mov (__libc_stack_end@GOT,a2),a0\n\ + mov a1,(a0)\n\ + # See if we were run as a command with the executable file\n\ + # name as an extra leading argument.\n\ + mov (_dl_skip_args@GOT,a2),a0\n\ + mov (a0),d0\n\ + # Pop the original argument count.\n\ + mov (20,sp),d3\n\ + # Subtract _dl_skip_args from it.\n\ + sub d0,d3\n\ + # Adjust the stack pointer to skip _dl_skip_args words.\n\ + asl2 d0\n\ + mov sp,a0\n\ + add d0,a0\n\ + mov a0,sp\n\ + # Push argc back on the stack.\n\ + mov d3,(20,sp)\n\ + # The special initializer gets called with the stack just\n\ + # as the application's entry point will see it; it can\n\ + # switch stacks if it moves these contents over.\n\ +" RTLD_START_SPECIAL_INIT "\n\ + # Load the parameters again.\n\ + # (d0, d1, (12,sp), (16,sp)) = (_dl_loaded, argc, argv, envp)\n\ + add 24,a0\n\ + mov a0,(12,sp) # a0 is 24+sp\n\ + mov d3,d1 # d3 contained argc\n\ + inc d3\n\ + asl2 d3 # d3 is now (argc+1)*4,\n\ + add d3,a0 # the offset between argv and envp\n\ + mov a0,(16,sp)\n\ + mov (_rtld_local@GOTOFF,a2),d0\n\ + # Call the function to run the initializers.\n\ + call _dl_init@PLT,[],0\n\ + # Pass our finalizer function to the user in d0, as per ELF ABI.\n\ + mov (_dl_fini@GOT,a2),d0\n\ + add 20,sp\n\ + # Jump to the user's entry point.\n\ + mov d2,a1\n\ + jmp (a1)\n\ + .previous\n\ +"); + +#ifndef RTLD_START_SPECIAL_INIT +#define RTLD_START_SPECIAL_INIT /* nothing */ +#endif + +/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so + PLT entries should not be allowed to define the value. + ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one + of the main executable's symbols, as for a COPY reloc. */ +#define elf_machine_type_class(type) \ + ((((type) == R_MN10300_JMP_SLOT) * ELF_RTYPE_CLASS_PLT) \ + | (((type) == R_MN10300_COPY) * ELF_RTYPE_CLASS_COPY)) + +/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */ +#define ELF_MACHINE_JMP_SLOT R_MN10300_JMP_SLOT + +static inline Elf32_Addr +elf_machine_fixup_plt (struct link_map *map, lookup_t t, + const Elf32_Rela *reloc, + Elf32_Addr *reloc_addr, Elf32_Addr value) +{ + return *reloc_addr = value; +} + +/* Return the final value of a plt relocation. */ +static inline Elf32_Addr +elf_machine_plt_value (struct link_map *map, const Elf32_Rela *reloc, + Elf32_Addr value) +{ + return value + reloc->r_addend; +} + +#endif /* !dl_machine_h */ + +#ifdef RESOLVE + +/* The mn10300 never uses Elf32_Rel relocations. */ +#define ELF_MACHINE_NO_REL 1 + +/* Perform the relocation specified by RELOC and SYM (which is fully resolved). + MAP is the object containing the reloc. */ + +static inline void +elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, + const Elf32_Sym *sym, const struct r_found_version *version, + void *const reloc_addr_arg) +{ + const unsigned int r_type = ELF32_R_TYPE (reloc->r_info); + Elf32_Addr value, *reloc_addr; + + /* Make sure we drop any previous alignment assumptions. */ + asm ("" : "=r" (reloc_addr) : "0" (reloc_addr_arg)); + +#define COPY_UNALIGNED_WORD(sw, tw, align) \ + { \ + unsigned long *__sl = (void*)&(sw), *__tl = (void*)&(tw); \ + unsigned short *__ss = (void*)&(sw), *__ts = (void*)&(tw); \ + unsigned char *__sc = (void*)&(sw), *__tc = (void*)&(tw); \ + switch ((align)) \ + { \ + case 0: \ + *__tl = *__sl; \ + break; \ + case 2: \ + *__ts++ = *__ss++; \ + *__ts = *__ss; \ + break; \ + default: \ + *__tc++ = *__sc++; \ + *__tc++ = *__sc++; \ + *__tc++ = *__sc++; \ + *__tc = *__sc; \ + break; \ + } \ + } + +#define COPY_UNALIGNED_HALFWORD(sw, tw, align) \ + { \ + unsigned short *__ss = (void*)&(sw), *__ts = (void*)&(tw); \ + unsigned char *__sc = (void*)&(sw), *__tc = (void*)&(tw); \ + switch ((align)) \ + { \ + case 0: \ + *__ts = *__ss; \ + break; \ + default: \ + *__tc++ = *__sc++; \ + *__tc = *__sc; \ + break; \ + } \ + } + +#if !defined RTLD_BOOTSTRAP || !defined HAVE_Z_COMBRELOC + if (__builtin_expect (r_type == R_MN10300_RELATIVE, 0)) + { +# if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC + /* This is defined in rtld.c, but nowhere in the static libc.a; + make the reference weak so static programs can still link. + This declaration cannot be done when compiling rtld.c (i.e. + #ifdef RTLD_BOOTSTRAP) because rtld.c contains the common + defn for _dl_rtld_map, which is incompatible with a weak decl + in the same file. */ + weak_extern (_dl_rtld_map); + if (map != &_dl_rtld_map) /* Already done in rtld itself. */ +# endif + { + COPY_UNALIGNED_WORD (*reloc_addr, value, (int) reloc_addr & 3); + value += map->l_addr; + COPY_UNALIGNED_WORD (value, *reloc_addr, (int) reloc_addr & 3); + } + } +# ifndef RTLD_BOOTSTRAP + else if (__builtin_expect (r_type == R_MN10300_NONE, 0)) + return; +# endif + else +#endif + { +#ifndef RTLD_BOOTSTRAP + const Elf32_Sym *const refsym = sym; +#endif + + value = RESOLVE (&sym, version, ELF32_R_TYPE (reloc->r_info)); + if (sym) + value += sym->st_value; + value += reloc->r_addend; /* Assume copy relocs have zero addend. */ + + switch (r_type) + { +#ifndef RTLD_BOOTSTRAP + case R_MN10300_COPY: + if (sym == NULL) + /* This can happen in trace mode if an object could not be + found. */ + break; + if (sym->st_size > refsym->st_size + || (GLRO(dl_verbose) && sym->st_size < refsym->st_size)) + { + extern char **_dl_argv; + const char *strtab; + + strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]); + _dl_error_printf ("\ +%s: Symbol `%s' has different size in shared object, consider re-linking\n", + _dl_argv[0] ?: "", + strtab + refsym->st_name); + } + memcpy (reloc_addr, (void *) value, MIN (sym->st_size, + refsym->st_size)); + break; +#endif + case R_MN10300_GLOB_DAT: + case R_MN10300_JMP_SLOT: + /* These addresses are always aligned. */ + *reloc_addr = value; + break; + case R_MN10300_32: + COPY_UNALIGNED_WORD (value, *reloc_addr, (int) reloc_addr & 3); + break; +#ifndef RTLD_BOOTSTRAP + case R_MN10300_16: + COPY_UNALIGNED_HALFWORD (value, *reloc_addr, (int) reloc_addr & 1); + break; + case R_MN10300_8: + *(char *) reloc_addr = value; + break; + case R_MN10300_PCREL32: + value -= (Elf32_Addr) reloc_addr; + COPY_UNALIGNED_WORD (value, *reloc_addr, (int) reloc_addr & 3); + break; + case R_MN10300_PCREL16: + value -= (Elf32_Addr) reloc_addr; + COPY_UNALIGNED_HALFWORD (value, *reloc_addr, (int) reloc_addr & 1); + break; + case R_MN10300_PCREL8: + value -= (Elf32_Addr) reloc_addr; + *(char *) reloc_addr = (value - (Elf32_Addr) reloc_addr); + break; +#endif + case R_MN10300_NONE: /* Alright, Wilbur. */ + break; +#if !defined RTLD_BOOTSTRAP || defined _NDEBUG + default: + _dl_reloc_bad_type (map, ELFW(R_TYPE) (reloc->r_info), 0); + break; +#endif + } + + } +} + +static inline void +elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, + void *const reloc_addr_arg) +{ + Elf32_Addr value, *reloc_addr; + + asm ("" : "=r" (reloc_addr) : "0" (reloc_addr_arg)); + + COPY_UNALIGNED_WORD (*reloc_addr, value, (int)reloc_addr & 3); + value += l_addr; + COPY_UNALIGNED_WORD (value, *reloc_addr, (int)reloc_addr & 3); +} + +static inline void +elf_machine_lazy_rel (struct link_map *map, + Elf32_Addr l_addr, const Elf32_Rela *reloc) +{ + unsigned long int const r_type = ELF32_R_TYPE (reloc->r_info); + + /* Check for unexpected PLT reloc type. */ + if (__builtin_expect (r_type, R_MN10300_JMP_SLOT) == R_MN10300_JMP_SLOT) + { + Elf32_Addr* const reloc_addr = (void *)(l_addr + reloc->r_offset); + Elf32_Addr value; + + /* Perform a RELATIVE reloc on the .got entry that transfers + to the .plt. */ + COPY_UNALIGNED_WORD (*reloc_addr, value, (int)reloc_addr & 3); + value += l_addr; + COPY_UNALIGNED_WORD (value, *reloc_addr, (int)reloc_addr & 3); + } + else if (__builtin_expect (r_type, R_MN10300_NONE) != R_MN10300_NONE) + _dl_reloc_bad_type (map, ELFW(R_TYPE) (reloc->r_info), 1); + +} + +#endif /* RESOLVE */ diff --git a/sysdeps/am33/elf/start.S b/sysdeps/am33/elf/start.S new file mode 100644 index 0000000000..1b654595c4 --- /dev/null +++ b/sysdeps/am33/elf/start.S @@ -0,0 +1,81 @@ +/* Startup code compliant to the ELF MN10300 ABI. + Copyright (C) 1995,1996,1997,1998,2000,2001 Free Software Foundation, Inc. + Contributed by Alexandre Oliva + Based on ../../i386/elf/start.S. + 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. */ + +/* This is the canonical entry point, usually the first thing in the text + segment. The SVR4/i386 ABI (pages 3-31, 3-32) says that when the entry + point runs, most registers' values are unspecified, except for: + + a0 Contains a function pointer to be registered with `atexit'. + This is how the dynamic linker arranges to have DT_FINI + functions called for shared libraries that have been loaded + before this code runs. + + sp The stack contains the arguments and environment: + (4,sp) argc + (8,sp) argv[0] + ... + (4*(argc+1),sp) NULL + (4*(argc+2),sp) envp[0] + ... + NULL +*/ + +#include "bp-sym.h" + + .text + .globl _start + .type _start,@function +_start: + /* Extract the arguments as encoded on the stack and set up + the arguments for `main': argc, argv. envp will be determined + later in __libc_start_main. */ + mov sp,a3 + add -32,sp + + mov a3,(28,sp) /* stack_end. */ + mov d0,(24,sp) /* rtld_fini. */ + mov _fini, d3 + mov d3,(20,sp) /* fini. */ + mov _init, d2 + mov d2,(16,sp) /* init. */ + inc4 a3 + mov a3,(12,sp) /* argv. */ + + /* Set the initial frame pointer as 0, so that the bottom of + the stack is clearly marked. */ + mov 0,a3 + + mov (32,sp), d1 /* argc. */ + mov BP_SYM (main), d0 /* main. */ + + /* Call the user's main function, and exit with its value. + But let the libc call main. */ + call BP_SYM (__libc_start_main),[],0 + + call BP_SYM (abort),[],0 /* Crash if somehow `exit' does return. */ + +/* Define a symbol for the first piece of initialized data. */ + .data + .globl __data_start +__data_start: + .long 0 + .weak data_start + data_start = __data_start diff --git a/sysdeps/am33/fpu/bits/fenv.h b/sysdeps/am33/fpu/bits/fenv.h new file mode 100644 index 0000000000..04fe293b13 --- /dev/null +++ b/sysdeps/am33/fpu/bits/fenv.h @@ -0,0 +1,67 @@ +/* Copyright (C) 1998, 1999, 2000, 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Alexandre Oliva + based on the corresponding file in the mips port. + + 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 _FENV_H +# error "Never use directly; include instead." +#endif + + +/* Define bits representing the exception. We use the EF bit + positions of the appropriate bits in the FPCR register. */ +enum + { + FE_INEXACT = 0x01, +#define FE_INEXACT FE_INEXACT + FE_UNDERFLOW = 0x02, +#define FE_UNDERFLOW FE_UNDERFLOW + FE_OVERFLOW = 0x04, +#define FE_OVERFLOW FE_OVERFLOW + FE_DIVBYZERO = 0x08, +#define FE_DIVBYZERO FE_DIVBYZERO + FE_INVALID = 0x10, +#define FE_INVALID FE_INVALID + }; + +#define FE_ALL_EXCEPT \ + (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID) + +/* The AM33/2.0 FPU supports only Round to nearest. Bits 3<<16 are + reserved to represent other rounding modes. */ +enum + { + FE_TONEAREST = 0x00000, +#define FE_TONEAREST FE_TONEAREST + }; + + +/* Type representing exception flags. */ +typedef unsigned int fexcept_t; + + +/* Type representing floating-point environment. */ +typedef unsigned int fenv_t; + +/* If the default argument is used we use this value. */ +#define FE_DFL_ENV ((__const fenv_t *) -1) + +#ifdef __USE_GNU +/* Floating-point environment where none of the exception is masked. */ +# define FE_NOMASK_ENV ((__const fenv_t *) -2) +#endif diff --git a/sysdeps/am33/fpu/fclrexcpt.c b/sysdeps/am33/fpu/fclrexcpt.c new file mode 100644 index 0000000000..0c98b4ea99 --- /dev/null +++ b/sysdeps/am33/fpu/fclrexcpt.c @@ -0,0 +1,52 @@ +/* Clear given exceptions in current floating-point environment. + Copyright (C) 1998, 1999, 2000, 2002, 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Alexandre Oliva + based on corresponding file in the MIPS port. + + 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. */ + +#include +#include +#include +#include + +int +__feclearexcept (int excepts) +{ + fpu_control_t cw; + + /* Mask out unsupported bits/exceptions. */ + excepts &= FE_ALL_EXCEPT; + + /* Read the complete control word. */ + _FPU_GETCW (cw); + + /* Clear exception flag bits and cause bits. EF bits are cleared by + assigning 1 to them (and there's no way to set them); other bits + are copied normally. */ + + cw &= ~((excepts << CAUSE_SHIFT) | FE_ALL_EXCEPT); + cw |= excepts; + + /* Put the new data in effect. */ + _FPU_SETFCW (cw); + + /* Success. */ + return 0; +} + +versioned_symbol (libm, __feclearexcept, feclearexcept, GLIBC_2_2); diff --git a/sysdeps/am33/fpu/fedisblxcpt.c b/sysdeps/am33/fpu/fedisblxcpt.c new file mode 100644 index 0000000000..b4a5977737 --- /dev/null +++ b/sysdeps/am33/fpu/fedisblxcpt.c @@ -0,0 +1,42 @@ +/* Disable floating-point exceptions. + Copyright (C) 2000, 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Alexandre Oliva + based on corresponding file in the MIPS port. + + 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. */ + +#include +#include +#include + +int +fedisableexcept (int excepts) +{ + fpu_control_t new_exc, old_exc; + + /* Get the current control word. */ + _FPU_GETCW (new_exc); + + old_exc = (new_exc & ENABLE_MASK) >> ENABLE_SHIFT; + + excepts &= FE_ALL_EXCEPT; + + new_exc &= ~(excepts << ENABLE_SHIFT); + _FPU_SETCW (new_exc); + + return old_exc; +} diff --git a/sysdeps/am33/fpu/feenablxcpt.c b/sysdeps/am33/fpu/feenablxcpt.c new file mode 100644 index 0000000000..0ecaa18877 --- /dev/null +++ b/sysdeps/am33/fpu/feenablxcpt.c @@ -0,0 +1,42 @@ +/* Enable floating-point exceptions. + Copyright (C) 2000, 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Alexandre Oliva + based on corresponding file in the MIPS port. + + 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. */ + +#include +#include +#include + +int +feenableexcept (int excepts) +{ + fpu_control_t new_exc, old_exc; + + /* Get the current control word. */ + _FPU_GETCW (new_exc); + + old_exc = (new_exc & ENABLE_MASK) >> ENABLE_SHIFT; + + excepts &= FE_ALL_EXCEPT; + + new_exc |= excepts << ENABLE_SHIFT; + _FPU_SETCW (new_exc); + + return old_exc; +} diff --git a/sysdeps/am33/fpu/fegetenv.c b/sysdeps/am33/fpu/fegetenv.c new file mode 100644 index 0000000000..f0828011bf --- /dev/null +++ b/sysdeps/am33/fpu/fegetenv.c @@ -0,0 +1,35 @@ +/* Store current floating-point environment. + Copyright (C) 1998, 1999, 2000, 2002, 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Alexandre Oliva + based on corresponding file in the MIPS port. + + 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. */ + +#include +#include +#include + +int +__fegetenv (fenv_t *envp) +{ + _FPU_GETCW (*envp); + + /* Success. */ + return 0; +} + +versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2); diff --git a/sysdeps/am33/fpu/fegetexcept.c b/sysdeps/am33/fpu/fegetexcept.c new file mode 100644 index 0000000000..500a0f8228 --- /dev/null +++ b/sysdeps/am33/fpu/fegetexcept.c @@ -0,0 +1,35 @@ +/* Get enabled floating-point exceptions. + Copyright (C) 2000, 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Alexandre Oliva + based on corresponding file in the MIPS port. + + 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. */ + +#include +#include +#include + +int +fegetexcept (void) +{ + unsigned int exc; + + /* Get the current control word. */ + _FPU_GETCW (exc); + + return (exc & ENABLE_MASK) >> ENABLE_SHIFT; +} diff --git a/sysdeps/am33/fpu/fegetround.c b/sysdeps/am33/fpu/fegetround.c new file mode 100644 index 0000000000..2b914075be --- /dev/null +++ b/sysdeps/am33/fpu/fegetround.c @@ -0,0 +1,35 @@ +/* Return current rounding direction. + Copyright (C) 1998, 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Alexandre Oliva + based on corresponding file in the MIPS port. + + 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. */ + +#include +#include +#include + +int +fegetround (void) +{ + int cw; + + /* Get control word. */ + _FPU_GETCW (cw); + + return (cw & ROUND_MASK); +} diff --git a/sysdeps/am33/fpu/feholdexcpt.c b/sysdeps/am33/fpu/feholdexcpt.c new file mode 100644 index 0000000000..e90fb67daf --- /dev/null +++ b/sysdeps/am33/fpu/feholdexcpt.c @@ -0,0 +1,39 @@ +/* Store current floating-point environment and clear exceptions. + Copyright (C) 2000, 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Alexandre Oliva + based on corresponding file in the MIPS port. + + 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. */ + +#include +#include + +int +feholdexcept (fenv_t *envp) +{ + fpu_control_t cw; + + /* Save the current state. */ + _FPU_GETCW (cw); + *envp = cw; + + /* Clear all exception enable bits and flags. */ + cw &= ~(_FPU_MASK_V|_FPU_MASK_Z|_FPU_MASK_O|_FPU_MASK_U|_FPU_MASK_I); + _FPU_SETFCW (cw); + + return 0; +} diff --git a/sysdeps/am33/fpu/fenv_libc.h b/sysdeps/am33/fpu/fenv_libc.h new file mode 100644 index 0000000000..508145470f --- /dev/null +++ b/sysdeps/am33/fpu/fenv_libc.h @@ -0,0 +1,33 @@ +/* Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Alexandre Oliva + based on the corresponding file in the mips port. + + 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 _FENV_LIBC_H +#define _FENV_LIBC_H 1 + +/* Mask for enabling exceptions and for the CAUSE bits. */ +#define ENABLE_MASK 0x003E0U +#define CAUSE_MASK 0x07C00U +#define ROUND_MASK 0x30000U + +/* Shift for FE_* flags to get up to the ENABLE bits and the CAUSE bits. */ +#define ENABLE_SHIFT 5 +#define CAUSE_SHIFT 10 + +#endif /* _FENV_LIBC_H */ diff --git a/sysdeps/am33/fpu/fesetenv.c b/sysdeps/am33/fpu/fesetenv.c new file mode 100644 index 0000000000..4c551a5c1d --- /dev/null +++ b/sysdeps/am33/fpu/fesetenv.c @@ -0,0 +1,60 @@ +/* Install given floating-point environment. + Copyright (C) 1998, 1999, 2000, 2002, 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Alexandre Oliva + based on corresponding file in the MIPS port. + + 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. */ + +#include +#include +#include + +int +__fesetenv (const fenv_t *envp) +{ + fpu_control_t cw; + + /* We want to clear all EF bits for the default end IEEE. */ + + if (envp == FE_DFL_ENV) + _FPU_SETFCW (_FPU_DEFAULT|FE_ALL_EXCEPT); + else if (envp == FE_NOMASK_ENV) + _FPU_SETFCW (_FPU_IEEE|FE_ALL_EXCEPT); + else + { + fpu_control_t temp; + + _FPU_GETCW (temp); + cw = *envp; + + /* If EF bits are cleared and the user requests them to be set, + we have to fail, because there's no way to do it. */ + if (~temp & cw & FE_ALL_EXCEPT) + return -1; + + /* We clear EF bits by storing a 1 in them, so flip the + FE_ALL_EXCEPT bits. */ + cw = (cw & ~FE_ALL_EXCEPT) | (~cw & FE_ALL_EXCEPT); + _FPU_SETFCW (cw); + } + + /* Success. */ + return 0; +} + +libm_hidden_ver (__fesetenv, fesetenv) +versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2); diff --git a/sysdeps/am33/fpu/fesetround.c b/sysdeps/am33/fpu/fesetround.c new file mode 100644 index 0000000000..b1e2b240c2 --- /dev/null +++ b/sysdeps/am33/fpu/fesetround.c @@ -0,0 +1,29 @@ +/* Set current rounding direction. + Copyright (C) 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Alexandre Oliva + + 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. */ + +#include + +int +fesetround (int round) +{ + /* The only supported rounding mode is to-nearest. Just check + whether we're switching to it. */ + return (round != FE_TONEAREST); +} diff --git a/sysdeps/am33/fpu/feupdateenv.c b/sysdeps/am33/fpu/feupdateenv.c new file mode 100644 index 0000000000..e4a0e39d2f --- /dev/null +++ b/sysdeps/am33/fpu/feupdateenv.c @@ -0,0 +1,47 @@ +/* Install given floating-point environment and raise exceptions. + Copyright (C) 1998, 1999, 2000, 2002, 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Alexandre Oliva + based on corresponding file in the MIPS port. + + 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. */ + +#include +#include +#include + +int +__feupdateenv (const fenv_t *envp) +{ + int temp; + + /* Save current exceptions. */ + _FPU_GETCW (temp); + temp &= FE_ALL_EXCEPT; + + /* Install new environment. */ + fesetenv (envp); + + /* Raise the safed exception. Incidently for us the implementation + defined format of the values in objects of type fexcept_t is the + same as the ones specified using the FE_* constants. */ + feraiseexcept (temp); + + /* Success. */ + return 0; +} + +versioned_symbol (libm, __feupdateenv, feupdateenv, GLIBC_2_2); diff --git a/sysdeps/am33/fpu/fgetexcptflg.c b/sysdeps/am33/fpu/fgetexcptflg.c new file mode 100644 index 0000000000..0e8512c9cb --- /dev/null +++ b/sysdeps/am33/fpu/fgetexcptflg.c @@ -0,0 +1,44 @@ +/* Store current representation for exceptions. + Copyright (C) 1998, 1999, 2000, 2002, 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Alexandre Oliva + based on corresponding file in the MIPS port. + + 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. */ + +#include +#include +#include + +int +__fegetexceptflag (fexcept_t *flagp, int excepts) +{ + fexcept_t temp; + + /* Get the current exceptions. */ + _FPU_GETCW (temp); + + /* We only save the relevant bits here. In particular, care has to be + taken with the CAUSE bits, as an inadvertent restore later on could + generate unexpected exceptions. */ + + *flagp = temp & excepts & FE_ALL_EXCEPT; + + /* Success. */ + return 0; +} + +versioned_symbol (libm, __fegetexceptflag, fegetexceptflag, GLIBC_2_2); diff --git a/sysdeps/am33/fpu/fpu_control.h b/sysdeps/am33/fpu/fpu_control.h new file mode 100644 index 0000000000..c0612ba53c --- /dev/null +++ b/sysdeps/am33/fpu/fpu_control.h @@ -0,0 +1,75 @@ +/* FPU control word bits. AM33/2.0 version. + Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004 + Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Alexandre Oliva + based on the corresponding file in the mips port. + + 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 _FPU_CONTROL_H +#define _FPU_CONTROL_H + +/* AM33/2.0 FPU floating point control register bits. + * + * 31-22 -> reserved + * 21-18 -> floating-point condition codes (L, G, E, U) + * 17-16 -> rounding modes (00 is to-nearest; other values are reserved + * 15 -> reserved (read as 0, write with 0) + * 14-10 -> Exception Cause (inValid, divZero, Overflow, Underflow, Inexact) + * 9- 5 -> Exception Enable + * 4- 0 -> Exception Flag, cleared when exception cause is set + */ + +#include +#include + +/* masking of interrupts */ +#define _FPU_MASK_V 0x0200 /* Invalid operation */ +#define _FPU_MASK_Z 0x0100 /* Division by zero */ +#define _FPU_MASK_O 0x0080 /* Overflow */ +#define _FPU_MASK_U 0x0040 /* Underflow */ +#define _FPU_MASK_I 0x0020 /* Inexact operation */ + +/* rounding control */ +#define _FPU_RC_NEAREST 0x0 /* Only available mode */ + +#define _FPU_RESERVED 0xffc08000 /* Reserved bits in fpcr */ + + +/* The fdlibm code requires strict IEEE double precision arithmetic, + and no interrupts for exceptions, rounding to nearest. */ + +#define _FPU_DEFAULT 0x0000001f + +/* IEEE: same as above, but exceptions */ +#define _FPU_IEEE 0x000003ff + +/* Type of the control word. */ +typedef unsigned int fpu_control_t; + +/* Macros for accessing the hardware control word. _FPU_SETCW is + defined such that it won't modify the EF bits, that are cleared + when assigned bits that are set. Use SETFCW to get them actually + reset. */ +#define _FPU_SETFCW(cw) __asm__ ("fmov %0,fpcr" : : "ri" (cw)) +#define _FPU_SETCW(cw) _FPU_SETFCW((cw) & ~FE_ALL_EXCEPT) +#define _FPU_GETCW(cw) __asm__ ("fmov fpcr,%0" : "=r" (cw)) + +/* Default control word set at startup. */ +extern fpu_control_t __fpu_control; + +#endif /* fpu_control.h */ diff --git a/sysdeps/am33/fpu/fraiseexcpt.c b/sysdeps/am33/fpu/fraiseexcpt.c new file mode 100644 index 0000000000..3405ce5096 --- /dev/null +++ b/sysdeps/am33/fpu/fraiseexcpt.c @@ -0,0 +1,79 @@ +/* Raise given exceptions. + Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Alexandre Oliva + based on corresponding file in the M68K port. + + 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. */ + +#include +#include +#include +#include + +int +__feraiseexcept (int excepts) +{ + /* Raise exceptions represented by EXCEPTS. But we must raise only one + signal at a time. It is important that if the overflow/underflow + exception and the divide by zero exception are given at the same + time, the overflow/underflow exception follows the divide by zero + exception. */ + + /* First: invalid exception. */ + if (excepts & FE_INVALID) + { + /* One example of a invalid operation is 0 * Infinity. */ + float x = HUGE_VALF, y = 0.0f; + __asm__ __volatile__ ("fmul %1,%0" : "+f" (x) : "f" (y)); + } + + /* Next: division by zero. */ + if (excepts & FE_DIVBYZERO) + { + float x = 1.0f, y = 0.0f; + __asm__ __volatile__ ("fdiv %1,%0" : "+f" (x) : "f" (y)); + } + + /* Next: overflow. */ + if (excepts & FE_OVERFLOW) + { + float x = FLT_MAX; + + __asm__ __volatile__ ("fmul %0,%0" : "+f" (x)); + } + + /* Next: underflow. */ + if (excepts & FE_UNDERFLOW) + { + float x = -FLT_MIN; + + __asm__ __volatile__ ("fmul %0,%0" : "+f" (x)); + } + + /* Last: inexact. */ + if (excepts & FE_INEXACT) + { + float x = 1.0f, y = 3.0f; + __asm__ __volatile__ ("fdiv %1,%0" : "=f" (x) : "f" (y)); + } + + /* Success. */ + return 0; +} + +libm_hidden_ver (__feraiseexcept, feraiseexcept) +versioned_symbol (libm, __feraiseexcept, feraiseexcept, GLIBC_2_2); diff --git a/sysdeps/am33/fpu/fsetexcptflg.c b/sysdeps/am33/fpu/fsetexcptflg.c new file mode 100644 index 0000000000..be315a44b0 --- /dev/null +++ b/sysdeps/am33/fpu/fsetexcptflg.c @@ -0,0 +1,57 @@ +/* Set floating-point environment exception handling. + Copyright (C) 1998, 1999, 2000, 2002, 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Alexandre Oliva + based on corresponding file in the MIPS port. + + 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. */ + +#include +#include +#include + +int +__fesetexceptflag (const fexcept_t *flagp, int excepts) +{ + fpu_control_t cw, temp; + + /* Get the current exceptions. */ + _FPU_GETCW (cw); + + /* Make sure the flags we want restored are legal. */ + excepts &= FE_ALL_EXCEPT; + temp = *flagp & excepts; + + /* If EF bits are clear and the user requests them to be set, + we have to fail, because there's no way to do it. */ + if (~(cw & excepts) & temp) + return -1; + + /* We clear EF bits by storing a 1 in them, so flip the + FE_ALL_EXCEPT bits. */ + temp = (~temp & FE_ALL_EXCEPT); + + /* Now clear the bits called for, and copy them in from flagp. Note that + we ignore all non-flag bits from *flagp, so they don't matter. */ + cw = (cw & ~FE_ALL_EXCEPT) | temp; + + _FPU_SETFCW (cw); + + /* Success. */ + return 0; +} + +versioned_symbol (libm, __fesetexceptflag, fesetexceptflag, GLIBC_2_2); diff --git a/sysdeps/am33/fpu/ftestexcept.c b/sysdeps/am33/fpu/ftestexcept.c new file mode 100644 index 0000000000..0e0db4ca37 --- /dev/null +++ b/sysdeps/am33/fpu/ftestexcept.c @@ -0,0 +1,34 @@ +/* Test exception in current environment. + Copyright (C) 1998, 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Alexandre Oliva + based on corresponding file in the MIPS port. + + 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. */ + +#include +#include + +int +fetestexcept (int excepts) +{ + int cw; + + /* Get current control word. */ + _FPU_GETCW (cw); + + return cw & excepts & FE_ALL_EXCEPT; +} diff --git a/sysdeps/am33/linuxthreads/pspinlock.c b/sysdeps/am33/linuxthreads/pspinlock.c new file mode 100644 index 0000000000..5eaf816681 --- /dev/null +++ b/sysdeps/am33/linuxthreads/pspinlock.c @@ -0,0 +1,74 @@ +/* POSIX spinlock implementation. AM33 version. + Copyright 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include "internals.h" + +int +__pthread_spin_lock (pthread_spinlock_t *lock) +{ + __asm__ __volatile__("1: bset %1, (%0); beq 1b" + : : "a" (lock), "d" (1) : "memory"); + return 0; +} +weak_alias (__pthread_spin_lock, pthread_spin_lock) + + +int +__pthread_spin_trylock (pthread_spinlock_t *lock) +{ + int oldval = 1; + + __asm__ __volatile__ ("bset %0, (%1); beq 1f; clr %0; 1:" : + "+d" (oldval) : "a" (lock) : "memory"); + + return oldval ? EBUSY : 0; +} +weak_alias (__pthread_spin_trylock, pthread_spin_trylock) + + +int +__pthread_spin_unlock (pthread_spinlock_t *lock) +{ + *lock = 0; + return 0; +} +weak_alias (__pthread_spin_unlock, pthread_spin_unlock) + + +int +__pthread_spin_init (pthread_spinlock_t *lock, int pshared) +{ + /* We can ignore the `pshared' parameter. Since we are busy-waiting + all processes which can access the memory location `lock' points + to can use the spinlock. */ + *lock = 0; + return 0; +} +weak_alias (__pthread_spin_init, pthread_spin_init) + + +int +__pthread_spin_destroy (pthread_spinlock_t *lock) +{ + /* Nothing to do. */ + return 0; +} +weak_alias (__pthread_spin_destroy, pthread_spin_destroy) diff --git a/sysdeps/am33/linuxthreads/pt-machine.h b/sysdeps/am33/linuxthreads/pt-machine.h new file mode 100644 index 0000000000..ba80bfb5ef --- /dev/null +++ b/sysdeps/am33/linuxthreads/pt-machine.h @@ -0,0 +1,68 @@ +/* Machine-dependent pthreads configuration and inline functions. + am33 version. + Copyright (C) 1996,1997,1998,1999,2000,2001, 2004 + Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Alexandre Oliva + Based on ../i386/pt-machine.h. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _PT_MACHINE_H +#define _PT_MACHINE_H 1 + +#ifndef __ASSEMBLER__ +#ifndef PT_EI +# define PT_EI extern inline +#endif + +/* Get some notion of the current stack. Need not be exactly the top + of the stack, just something somewhere in the current frame. */ +#define CURRENT_STACK_FRAME __builtin_frame_address (0) + +/* Spinlock implementation; required. */ +PT_EI long int +testandset (int *spinlock) +{ + long int ret = 1; + + /* This won't test&set the entire int, only the least significant + byte. I hope this doesn't matter, since we can't do better. */ + __asm__ __volatile__ ("bset %0, %1; bne 1f; clr %0; 1:" : + "+d" (ret), "+m" (*(volatile int *)spinlock)); + + return ret; +} + + +PT_EI int +get_eflags (void) +{ + int res; + __asm__ __volatile__ ("mov psw,%0" : "=d" (res)); + return res; +} + + +PT_EI void +set_eflags (int newflags) +{ + __asm__ __volatile__ ("mov %0,psw" : : "d" (newflags) : "cc"); +} + +#endif /* __ASSEMBLER__ */ + +#endif /* pt-machine.h */ diff --git a/sysdeps/am33/memusage.h b/sysdeps/am33/memusage.h new file mode 100644 index 0000000000..9913e781e4 --- /dev/null +++ b/sysdeps/am33/memusage.h @@ -0,0 +1,23 @@ +/* Copyright 2000, 2001 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. */ + +#define GETSP() ({ uintptr_t stack_ptr; \ + asm ("mov sp,%0" : "=a" (stack_ptr)); \ + stack_ptr; }) + +#include diff --git a/sysdeps/am33/preconfigure b/sysdeps/am33/preconfigure new file mode 100644 index 0000000000..9495465389 --- /dev/null +++ b/sysdeps/am33/preconfigure @@ -0,0 +1,5 @@ +case "$machine" in +am33*) + base_machine=am33 machine=am33 + ;; +esac diff --git a/sysdeps/am33/setjmp.S b/sysdeps/am33/setjmp.S new file mode 100644 index 0000000000..26ec2ed496 --- /dev/null +++ b/sysdeps/am33/setjmp.S @@ -0,0 +1,80 @@ +/* setjmp for am33. + Copyright (C) 2001, 2004 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. */ + +#include +#define _ASM +#define _SETJMP_H +#include +#include + + +ENTRY (__sigsetjmp) +.Lsigsetjmp: + /* Save registers. */ + mov d0,a0 + mov d2,(0,a0) + mov d3,(4,a0) + mov mdr,d0 + mov d0,(8,a0) + /* Restore d0 for __sigjmp_save. */ + mov a0,d0 + mov a2,(12,a0) + mov a3,(16,a0) + mov sp,a1 + mov a1,(20,a0) + add 24,a0 + mov r4,(a0+) + mov r5,(a0+) + mov r6,(a0+) + mov r7,(a0+) +#ifdef __AM33_2__ + fmov fs4,(a0+) + fmov fs5,(a0+) + fmov fs6,(a0+) + fmov fs7,(a0+) + fmov fs8,(a0+) + fmov fs9,(a0+) + fmov fs10,(a0+) + fmov fs11,(a0+) + fmov fs12,(a0+) + fmov fs13,(a0+) + fmov fs14,(a0+) + fmov fs15,(a0+) + fmov fs16,(a0+) + fmov fs17,(a0+) + fmov fs18,(a0+) + fmov fs19,(a0+) +#endif + /* Make a tail call to __sigjmp_save; it takes the same args. */ + jmp __sigjmp_save +END (__sigsetjmp) + +/* BSD `_setjmp' entry point to `sigsetjmp (..., 1)'. */ +ENTRY (setjmp) + /* Tail-call setsetjmp with savesigs==1. */ + mov 1,d1 + bra .Lsigsetjmp +END (setjmp) + +/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. */ +ENTRY (_setjmp) + /* Tail-call setsetjmp with savesigs==0. */ + clr d1 + bra .Lsigsetjmp +END (_setjmp) diff --git a/sysdeps/am33/shlib-versions b/sysdeps/am33/shlib-versions new file mode 100644 index 0000000000..ad6ded9dc4 --- /dev/null +++ b/sysdeps/am33/shlib-versions @@ -0,0 +1 @@ +am33.*-.*-linux.* DEFAULT GLIBC_2.2.5 diff --git a/sysdeps/am33/stackinfo.h b/sysdeps/am33/stackinfo.h new file mode 100644 index 0000000000..a64027a6ad --- /dev/null +++ b/sysdeps/am33/stackinfo.h @@ -0,0 +1,28 @@ +/* Copyright 2001 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. */ + +/* This file contains a bit of information about the stack allocation + of the processor. */ + +#ifndef _STACKINFO_H +#define _STACKINFO_H 1 + +/* On am33 the stack grows down. */ +#define _STACK_GROWS_DOWN 1 + +#endif /* stackinfo.h */ diff --git a/sysdeps/am33/sys/ucontext.h b/sysdeps/am33/sys/ucontext.h new file mode 100644 index 0000000000..7995aae42f --- /dev/null +++ b/sysdeps/am33/sys/ucontext.h @@ -0,0 +1,123 @@ +/* Copyright 1997, 1999, 2000, 2002 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* AM33/2.0 context switching support. */ + +#ifndef _SYS_UCONTEXT_H +#define _SYS_UCONTEXT_H 1 + +#include +#include + +/* Type for general register. */ +typedef int greg_t; + +/* Number of general registers. */ +#define NGREG 28 + +/* Container for all general registers. */ +typedef greg_t gregset_t[NGREG]; + +/* Number of each register is the `gregset_t' array. */ +enum +{ + REG_D0 = 0, +#define REG_D0 REG_D0 + REG_D1, +#define REG_D1 REG_D1 + REG_D2, +#define REG_D2 REG_D2 + REG_D3, +#define REG_D3 REG_D3 + REG_A0, +#define REG_A0 REG_A0 + REG_A1, +#define REG_A1 REG_A1 + REG_A2, +#define REG_A2 REG_A2 + REG_A3, +#define REG_A3 REG_A3 + REG_E0, +#define REG_E0 REG_E0 + REG_E1, +#define REG_E1 REG_E1 + REG_E2, +#define REG_E2 REG_E2 + REG_E3, +#define REG_E3 REG_E3 + REG_E4, +#define REG_E4 REG_E4 + REG_E5, +#define REG_E5 REG_E5 + REG_E6, +#define REG_E6 REG_E6 + REG_E7, +#define REG_E7 REG_E7 + REG_LAR, +#define REG_LAR REG_LAR + REG_LIR, +#define REG_LIR REG_LIR + REG_MDR, +#define REG_MDR REG_MDR + REG_MCVF, +#define REG_MCVF REG_MCVF + REG_MCRL, +#define REG_MCRL REG_MCRL + REG_MCRH, +#define REG_MCRH REG_MCRH + REG_MDRQ, +#define REG_MDRQ REG_MDRQ + REG_SP, +#define REG_SP REG_SP + REG_EPSW, +#define REG_EPSW REG_EPSW + REG_PC, +#define REG_PC REG_PC +}; + +typedef int freg_t; + +/* Structure to describe FPU registers. */ +typedef struct { + union { + double fp_dregs[16]; + float fp_fregs[32]; + freg_t fp_regs[32]; + } regs; + freg_t fpcr; +} fpregset_t; + +/* Context to describe whole processor state. */ +typedef struct + { + gregset_t gregs; + fpregset_t fpregs; + } mcontext_t; + +/* Userlevel context. */ +typedef struct ucontext + { + unsigned long int uc_flags; + struct ucontext *uc_link; + __sigset_t uc_sigmask; + stack_t uc_stack; + mcontext_t uc_mcontext; + long int uc_filler[5]; + } ucontext_t; + +#endif /* sys/ucontext.h */ diff --git a/sysdeps/am33/sysdep.h b/sysdeps/am33/sysdep.h new file mode 100644 index 0000000000..efd0527144 --- /dev/null +++ b/sysdeps/am33/sysdep.h @@ -0,0 +1,82 @@ +/* Copyright 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Alexandre Oliva . + Based on ../i386/sysdep.h. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +#ifdef __ASSEMBLER__ + +/* Syntactic details of assembler. */ + +#ifdef HAVE_ELF +/* For ELF we need the `.type' directive to make shared libs work right. */ +#define ASM_TYPE_DIRECTIVE(name,typearg) .type name,typearg; +#define ASM_SIZE_DIRECTIVE(name) .size name,.-name; + +/* In ELF C symbols are asm symbols. */ +#undef NO_UNDERSCORES +#define NO_UNDERSCORES +#else +#define ASM_TYPE_DIRECTIVE(name,type) /* Nothing is specified. */ +#define ASM_SIZE_DIRECTIVE(name) /* Nothing is specified. */ +#endif + +/* Define an entry point visible from C. */ +#define ENTRY(name) \ + ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name); \ + ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function) \ + C_LABEL(name) \ + CALL_MCOUNT + +#undef END +#define END(name) \ + ASM_SIZE_DIRECTIVE(name) \ + +/* If compiled for profiling, call `mcount' at the start of each function. */ +#ifdef PROF +/* The mcount code relies on a normal frame pointer being on the stack + to locate our caller, so push one just for its benefit. */ +#define CALL_MCOUNT \ + movm [a3],(sp); mov sp,a3; add -12,sp; \ + call JUMPTARGET(mcount),[],0; add 12,sp; movm (sp),[a3]; +#else +#define CALL_MCOUNT /* Do nothing. */ +#endif + +#ifdef NO_UNDERSCORES +/* Since C identifiers are not normally prefixed with an underscore + on this system, the asm identifier `syscall_error' intrudes on the + C name space. Make sure we use an innocuous name. */ +#define syscall_error __syscall_error +#define mcount _mcount +#endif + +#undef JUMPTARGET +#ifdef PIC +#define JUMPTARGET(name) name##@PLT +#else +#define JUMPTARGET(name) name +#endif + +/* Local label name for asm code. */ +#ifndef L +#define L(name) name +#endif + +#endif /* __ASSEMBLER__ */ diff --git a/sysdeps/unix/am33/sysdep.S b/sysdeps/unix/am33/sysdep.S new file mode 100644 index 0000000000..d6df22ed6e --- /dev/null +++ b/sysdeps/unix/am33/sysdep.S @@ -0,0 +1,64 @@ +/* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000, 2001 + Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Alexandre Oliva . + Based on ../i386/sysdep.S. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#define _ERRNO_H +#include + +.globl C_SYMBOL_NAME(errno) +.globl syscall_error + +#undef syscall_error +#ifdef NO_UNDERSCORES +__syscall_error: +#else +syscall_error: +#endif +#if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN + /* We translate the system's EWOULDBLOCK error into EAGAIN. + The GNU C library always defines EWOULDBLOCK==EAGAIN. + EWOULDBLOCK_sys is the original number. */ + cmp EWOULDBLOCK_sys,d0 /* Is it the old EWOULDBLOCK? */ + bne .Lnotb /* Branch if not. */ + mov EAGAIN,d0 /* Yes; translate it to EAGAIN. */ +.Lnotb: +#endif +#ifndef PIC +# ifndef _LIBC_REENTRANT + mov d0,(C_SYMBOL_NAME (errno)) +# else + movm [d2],(sp) + add -12,sp + mov d0,d2 + call __errno_location,[],0 + mov d2,(a0) + add 12,sp + movm (sp),[d2] +# endif +#else +# error "This shouldn't be assembled for PIC" +#endif + mov -1,d0 + mov d0,a0 + ret + +#undef __syscall_error +END (__syscall_error) diff --git a/sysdeps/unix/am33/sysdep.h b/sysdeps/unix/am33/sysdep.h new file mode 100644 index 0000000000..11578e7600 --- /dev/null +++ b/sysdeps/unix/am33/sysdep.h @@ -0,0 +1,33 @@ +/* Copyright 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Alexandre Oliva . + Based on ../i386/sysdep.h. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include "../../am33/sysdep.h" + +#ifdef __ASSEMBLER__ + +#define r0 d0 /* Normal return-value register. */ +#define r1 !!!! /* Secondary return-value register. */ +#define scratch d1 /* Call-clobbered register for random use. */ +#define MOVE(x,y) mov x, y + +#define ret ret [],0 + +#endif /* __ASSEMBLER__ */ diff --git a/sysdeps/unix/sysv/linux/am33/Makefile b/sysdeps/unix/sysv/linux/am33/Makefile new file mode 100644 index 0000000000..ece39e8a4c --- /dev/null +++ b/sysdeps/unix/sysv/linux/am33/Makefile @@ -0,0 +1,3 @@ +ifeq ($(subdir),misc) +sysdep_routines += setfsgid setfsuid +endif diff --git a/sysdeps/unix/sysv/linux/am33/bits/fcntl.h b/sysdeps/unix/sysv/linux/am33/bits/fcntl.h new file mode 100644 index 0000000000..4c276c5485 --- /dev/null +++ b/sysdeps/unix/sysv/linux/am33/bits/fcntl.h @@ -0,0 +1,179 @@ +/* O_*, F_*, FD_* bit values for Linux. + Copyright (C) 1995, 1996, 1997, 1998, 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _FCNTL_H +# error "Never use directly; include instead." +#endif + + +#include + +/* open/fcntl - O_SYNC is only implemented on blocks devices and on files + located on an ext2 file system */ +#define O_ACCMODE 0003 +#define O_RDONLY 00 +#define O_WRONLY 01 +#define O_RDWR 02 +#define O_CREAT 0100 /* not fcntl */ +#define O_EXCL 0200 /* not fcntl */ +#define O_NOCTTY 0400 /* not fcntl */ +#define O_TRUNC 01000 /* not fcntl */ +#define O_APPEND 02000 +#define O_NONBLOCK 04000 +#define O_NDELAY O_NONBLOCK +#define O_SYNC 010000 +#define O_FSYNC O_SYNC +#define O_ASYNC 020000 + +#ifdef __USE_GNU +# define O_DIRECT 040000 /* Direct disk access. */ +# define O_DIRECTORY 0200000 /* Must be a directory. */ +# define O_NOFOLLOW 0400000 /* Do not follow links. */ +#endif + +/* For now Linux has synchronisity options for data and read operations. + We define the symbols here but let them do the same as O_SYNC since + this is a superset. */ +#if defined __USE_POSIX199309 || defined __USE_UNIX98 +# define O_DSYNC O_SYNC /* Synchronize data. */ +# define O_RSYNC O_SYNC /* Synchronize read operations. */ +#endif + +#ifdef __USE_LARGEFILE64 +# define O_LARGEFILE 0100000 +#endif + +/* Values for the second argument to `fcntl'. */ +#define F_DUPFD 0 /* Duplicate file descriptor. */ +#define F_GETFD 1 /* Get file descriptor flags. */ +#define F_SETFD 2 /* Set file descriptor flags. */ +#define F_GETFL 3 /* Get file status flags. */ +#define F_SETFL 4 /* Set file status flags. */ +#ifndef __USE_FILE_OFFSET64 +# define F_GETLK 5 /* Get record locking info. */ +# define F_SETLK 6 /* Set record locking info (non-blocking). */ +# define F_SETLKW 7 /* Set record locking info (blocking). */ +#else +# define F_GETLK F_GETLK64 /* Get record locking info. */ +# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/ +# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */ +#endif +#define F_GETLK64 12 /* Get record locking info. */ +#define F_SETLK64 13 /* Set record locking info (non-blocking). */ +#define F_SETLKW64 14 /* Set record locking info (blocking). */ + +#if defined __USE_BSD || defined __USE_XOPEN2K +# define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */ +# define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */ +#endif + +#ifdef __USE_GNU +# define F_SETSIG 10 /* Set number of signal to be sent. */ +# define F_GETSIG 11 /* Get number of signal to be sent. */ +#endif + +#ifdef __USE_GNU +# 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. */ +#endif + +/* For F_[GET|SET]FL. */ +#define FD_CLOEXEC 1 /* actually anything with low bit set goes */ + +/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */ +#define F_RDLCK 0 /* Read lock. */ +#define F_WRLCK 1 /* Write lock. */ +#define F_UNLCK 2 /* Remove lock. */ + +/* For old implementation of bsd flock(). */ +#define F_EXLCK 4 /* or 3 */ +#define F_SHLCK 8 /* or 4 */ + +#ifdef __USE_BSD +/* Operations for bsd flock(), also used by the kernel implementation. */ +# define LOCK_SH 1 /* shared lock */ +# define LOCK_EX 2 /* exclusive lock */ +# define LOCK_NB 4 /* or'd with one of the above to prevent + blocking */ +# define LOCK_UN 8 /* remove lock */ +#endif + +#ifdef __USE_GNU +# define LOCK_MAND 32 /* This is a mandatory flock: */ +# define LOCK_READ 64 /* ... which allows concurrent read operations. */ +# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */ +# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */ +#endif + +#ifdef __USE_GNU +/* Types of directory notifications that may be requested with F_NOTIFY. */ +# define DN_ACCESS 0x00000001 /* File accessed. */ +# define DN_MODIFY 0x00000002 /* File modified. */ +# define DN_CREATE 0x00000004 /* File created. */ +# define DN_DELETE 0x00000008 /* File removed. */ +# define DN_RENAME 0x00000010 /* File renamed. */ +# define DN_ATTRIB 0x00000020 /* File changed attibutes. */ +# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */ +#endif + +struct flock + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ +#ifndef __USE_FILE_OFFSET64 + __off_t l_start; /* Offset where the lock begins. */ + __off_t l_len; /* Size of the locked area; zero means until EOF. */ +#else + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ +#endif + __pid_t l_pid; /* Process holding the lock. */ + }; + +#ifdef __USE_LARGEFILE64 +struct flock64 + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ + __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. */ + }; +#endif + +/* Define some more compatibility macros to be backward compatible with + BSD systems which did not managed to hide these kernel macros. */ +#ifdef __USE_BSD +# define FAPPEND O_APPEND +# define FFSYNC O_FSYNC +# define FASYNC O_ASYNC +# define FNONBLOCK O_NONBLOCK +# define FNDELAY O_NDELAY +#endif /* Use BSD. */ + +/* Advise to `posix_fadvise'. */ +#ifdef __USE_XOPEN2K +# define POSIX_FADV_NORMAL 0 /* No further special treatment. */ +# define POSIX_FADV_RANDOM 1 /* Expect random page references. */ +# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */ +# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */ +# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ +#endif diff --git a/sysdeps/unix/sysv/linux/am33/bits/mman.h b/sysdeps/unix/sysv/linux/am33/bits/mman.h new file mode 100644 index 0000000000..99fceda887 --- /dev/null +++ b/sysdeps/unix/sysv/linux/am33/bits/mman.h @@ -0,0 +1,97 @@ +/* Definitions for POSIX memory map interface. Linux/AM33 version. + Copyright (C) 1997, 2000, 2001, 2004 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_MMAN_H +# error "Never use directly; include instead." +#endif + +/* The following definitions basically come from the kernel headers. + But the kernel header is not namespace clean. */ + + +/* Protections are chosen from these bits, OR'd together. The + implementation does not necessarily support PROT_EXEC or PROT_WRITE + without PROT_READ. The only guarantees are that no writing will be + allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ + +#define PROT_READ 0x1 /* Page can be read. */ +#define PROT_WRITE 0x2 /* Page can be written. */ +#define PROT_EXEC 0x4 /* Page can be executed. */ +#define PROT_NONE 0x0 /* Page can not be accessed. */ +#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of + growsdown vma (mprotect only). */ +#define PROT_GROWSUP 0x02000000 /* Extend change to start of + growsup vma (mprotect only). */ + +/* Sharing types (must choose one and only one of these). */ +#define MAP_SHARED 0x01 /* Share changes. */ +#define MAP_PRIVATE 0x02 /* Changes are private. */ +#ifdef __USE_MISC +# define MAP_TYPE 0x0f /* Mask for type of mapping. */ +#endif + +/* Other flags. */ +#define MAP_FIXED 0x10 /* Interpret addr exactly. */ +#ifdef __USE_MISC +# define MAP_FILE 0 +# define MAP_ANONYMOUS 0x20 /* Don't use a file. */ +# define MAP_ANON MAP_ANONYMOUS +#endif + +/* These are Linux-specific. */ +#ifdef __USE_MISC +# define MAP_GROWSDOWN 0x0100 /* Stack-like segment. */ +# define MAP_DENYWRITE 0x0800 /* ETXTBSY */ +# define MAP_EXECUTABLE 0x1000 /* Mark it as an executable. */ +# define MAP_LOCKED 0x2000 /* Lock the mapping. */ +# define MAP_NORESERVE 0x4000 /* Don't check for reservations. */ +#endif + +/* Flags to `msync'. */ +#define MS_ASYNC 1 /* Sync memory asynchronously. */ +#define MS_SYNC 4 /* Synchronous memory sync. */ +#define MS_INVALIDATE 2 /* Invalidate the caches. */ + +/* Flags for `mlockall'. */ +#define MCL_CURRENT 1 /* Lock all currently mapped pages. */ +#define MCL_FUTURE 2 /* Lock all additions to address + space. */ + +/* Flags for `mremap'. */ +#ifdef __USE_GNU +# define MREMAP_MAYMOVE 1 +#endif + +/* Advice to `madvise'. */ +#ifdef __USE_BSD +# define MADV_NORMAL 0 /* No further special treatment. */ +# define MADV_RANDOM 1 /* Expect random page references. */ +# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define MADV_WILLNEED 3 /* Will need these pages. */ +# define MADV_DONTNEED 4 /* Don't need these pages. */ +#endif + +/* The POSIX people had to invent similar names for the same things. */ +#ifdef __USE_XOPEN2K +# define POSIX_MADV_NORMAL 0 /* No further special treatment. */ +# define POSIX_MADV_RANDOM 1 /* Expect random page references. */ +# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */ +# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */ +#endif diff --git a/sysdeps/unix/sysv/linux/am33/brk.c b/sysdeps/unix/sysv/linux/am33/brk.c new file mode 100644 index 0000000000..f56736359e --- /dev/null +++ b/sysdeps/unix/sysv/linux/am33/brk.c @@ -0,0 +1,46 @@ +/* brk system call for Linux/am33. + Copyright (C) 1995, 1996, 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Alexandre Oliva . + Based on ../i386/brk.c. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include + +/* This must be initialized data because commons can't have aliases. */ +void *__curbrk = 0; + +int +__brk (void *addr) +{ + void *newbrk; + + newbrk = INLINE_SYSCALL (brk, 1, __ptrvalue (addr)); + + __curbrk = newbrk; + + if (newbrk < addr) + { + __set_errno (ENOMEM); + return -1; + } + + return 0; +} +weak_alias (__brk, brk) diff --git a/sysdeps/unix/sysv/linux/am33/chown.c b/sysdeps/unix/sysv/linux/am33/chown.c new file mode 100644 index 0000000000..819923eb49 --- /dev/null +++ b/sysdeps/unix/sysv/linux/am33/chown.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/am33/clone.S b/sysdeps/unix/sysv/linux/am33/clone.S new file mode 100644 index 0000000000..26ba740d24 --- /dev/null +++ b/sysdeps/unix/sysv/linux/am33/clone.S @@ -0,0 +1,81 @@ +/* Copyright 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Alexandre Oliva . + Based on ../i386/clone.S. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* clone() is even more special than fork() as it mucks with stacks + and invokes a function in the right context after its all over. */ + +#include +#define _ERRNO_H 1 +#include +#include +#include + +/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg); */ + + .text +ENTRY (BP_SYM (__clone)) + /* Sanity check arguments. */ + cmp 0,d0 /* no NULL function pointers */ + beq L(error_inval) + cmp 0,d1 /* no NULL stack pointers */ + beq L(error_inval) + + /* Allocate room for a function call in the new stack, and + store fn and arg in it. They will be read back in + thread_start. */ + mov d1,a0 + sub 12,a0 + mov d0,(a0) + mov (16,sp),d1 + mov d1,(4,a0) + + /* Do the system call */ + mov a0,d1 + mov (12,sp),a0 + mov SYS_ify(clone),d0 + syscall 0 + + cmp 0,d0 + beq thread_start + blt L(to_SYSCALL_ERROR_LABEL) + +L(pseudo_end): + ret + +L(error_inval): + mov -EINVAL,d0 +L(to_SYSCALL_ERROR_LABEL): + jmp SYSCALL_ERROR_LABEL + +thread_start: + mov 0,a3 /* terminate the stack frame */ + mov (4,sp),d0 + mov (sp),a0 + calls (a0) +#ifdef PIC +L(here): + mov pc,a2 + add _GLOBAL_OFFSET_TABLE_-(L(here) - .),a2 +#endif + call JUMPTARGET (_exit),[],0 + +PSEUDO_END (BP_SYM (__clone)) + +weak_alias (BP_SYM (__clone), BP_SYM (clone)) diff --git a/sysdeps/unix/sysv/linux/am33/configure b/sysdeps/unix/sysv/linux/am33/configure new file mode 100755 index 0000000000..d4490122b4 --- /dev/null +++ b/sysdeps/unix/sysv/linux/am33/configure @@ -0,0 +1,4 @@ +# This file is generated from configure.in by Autoconf. DO NOT EDIT! + # Local configure fragment for am33/sysdeps/unix/sysv/linux/am33 + +arch_minimum_kernel=2.4.0 diff --git a/sysdeps/unix/sysv/linux/am33/configure.in b/sysdeps/unix/sysv/linux/am33/configure.in new file mode 100644 index 0000000000..a94c370cf1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/am33/configure.in @@ -0,0 +1,4 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for am33/sysdeps/unix/sysv/linux/am33 + +arch_minimum_kernel=2.4.0 diff --git a/sysdeps/unix/sysv/linux/am33/fchown.c b/sysdeps/unix/sysv/linux/am33/fchown.c new file mode 100644 index 0000000000..3a69ecc9e7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/am33/fchown.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/am33/fcntl.c b/sysdeps/unix/sysv/linux/am33/fcntl.c new file mode 100644 index 0000000000..ea951bc4f9 --- /dev/null +++ b/sysdeps/unix/sysv/linux/am33/fcntl.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/am33/fxstat.c b/sysdeps/unix/sysv/linux/am33/fxstat.c new file mode 100644 index 0000000000..4f219f0b9d --- /dev/null +++ b/sysdeps/unix/sysv/linux/am33/fxstat.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/am33/getegid.c b/sysdeps/unix/sysv/linux/am33/getegid.c new file mode 100644 index 0000000000..37b4b4a530 --- /dev/null +++ b/sysdeps/unix/sysv/linux/am33/getegid.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/am33/geteuid.c b/sysdeps/unix/sysv/linux/am33/geteuid.c new file mode 100644 index 0000000000..ebcb555b5e --- /dev/null +++ b/sysdeps/unix/sysv/linux/am33/geteuid.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/am33/getgid.c b/sysdeps/unix/sysv/linux/am33/getgid.c new file mode 100644 index 0000000000..0a4d6061f0 --- /dev/null +++ b/sysdeps/unix/sysv/linux/am33/getgid.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/am33/getgroups.c b/sysdeps/unix/sysv/linux/am33/getgroups.c new file mode 100644 index 0000000000..20a7166103 --- /dev/null +++ b/sysdeps/unix/sysv/linux/am33/getgroups.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/am33/getmsg.c b/sysdeps/unix/sysv/linux/am33/getmsg.c new file mode 100644 index 0000000000..3a1fa08525 --- /dev/null +++ b/sysdeps/unix/sysv/linux/am33/getmsg.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/am33/getresgid.c b/sysdeps/unix/sysv/linux/am33/getresgid.c new file mode 100644 index 0000000000..b703a414cc --- /dev/null +++ b/sysdeps/unix/sysv/linux/am33/getresgid.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/am33/getresuid.c b/sysdeps/unix/sysv/linux/am33/getresuid.c new file mode 100644 index 0000000000..0b14cefe34 --- /dev/null +++ b/sysdeps/unix/sysv/linux/am33/getresuid.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/am33/getrlimit.c b/sysdeps/unix/sysv/linux/am33/getrlimit.c new file mode 100644 index 0000000000..fc06dbd641 --- /dev/null +++ b/sysdeps/unix/sysv/linux/am33/getrlimit.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/am33/getuid.c b/sysdeps/unix/sysv/linux/am33/getuid.c new file mode 100644 index 0000000000..d682c79a49 --- /dev/null +++ b/sysdeps/unix/sysv/linux/am33/getuid.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/am33/lchown.c b/sysdeps/unix/sysv/linux/am33/lchown.c new file mode 100644 index 0000000000..c89de99ba2 --- /dev/null +++ b/sysdeps/unix/sysv/linux/am33/lchown.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/am33/lockf64.c b/sysdeps/unix/sysv/linux/am33/lockf64.c new file mode 100644 index 0000000000..a88f5a784a --- /dev/null +++ b/sysdeps/unix/sysv/linux/am33/lockf64.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/am33/lxstat.c b/sysdeps/unix/sysv/linux/am33/lxstat.c new file mode 100644 index 0000000000..0efa0aea49 --- /dev/null +++ b/sysdeps/unix/sysv/linux/am33/lxstat.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/am33/profil-counter.h b/sysdeps/unix/sysv/linux/am33/profil-counter.h new file mode 100644 index 0000000000..31422bb7e4 --- /dev/null +++ b/sysdeps/unix/sysv/linux/am33/profil-counter.h @@ -0,0 +1,27 @@ +/* Low-level statistical profiling support function. Linux/am33 version. + Copyright (C) 1996, 1997, 1998, 2001 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +static void +profil_counter (int signo, SIGCONTEXT scp) +{ + profil_count ((void *) GET_PC (scp)); +} diff --git a/sysdeps/unix/sysv/linux/am33/putmsg.c b/sysdeps/unix/sysv/linux/am33/putmsg.c new file mode 100644 index 0000000000..ebc1680ca7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/am33/putmsg.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/am33/setegid.c b/sysdeps/unix/sysv/linux/am33/setegid.c new file mode 100644 index 0000000000..2e3a54c893 --- /dev/null +++ b/sysdeps/unix/sysv/linux/am33/setegid.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/am33/seteuid.c b/sysdeps/unix/sysv/linux/am33/seteuid.c new file mode 100644 index 0000000000..18e41d08c1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/am33/seteuid.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/am33/setfsgid.c b/sysdeps/unix/sysv/linux/am33/setfsgid.c new file mode 100644 index 0000000000..0886712569 --- /dev/null +++ b/sysdeps/unix/sysv/linux/am33/setfsgid.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/am33/setfsuid.c b/sysdeps/unix/sysv/linux/am33/setfsuid.c new file mode 100644 index 0000000000..a9f22eb8ab --- /dev/null +++ b/sysdeps/unix/sysv/linux/am33/setfsuid.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/am33/setgid.c b/sysdeps/unix/sysv/linux/am33/setgid.c new file mode 100644 index 0000000000..377021d9ec --- /dev/null +++ b/sysdeps/unix/sysv/linux/am33/setgid.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/am33/setgroups.c b/sysdeps/unix/sysv/linux/am33/setgroups.c new file mode 100644 index 0000000000..cb9a7708e3 --- /dev/null +++ b/sysdeps/unix/sysv/linux/am33/setgroups.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/am33/setregid.c b/sysdeps/unix/sysv/linux/am33/setregid.c new file mode 100644 index 0000000000..99c57ad20f --- /dev/null +++ b/sysdeps/unix/sysv/linux/am33/setregid.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/am33/setresgid.c b/sysdeps/unix/sysv/linux/am33/setresgid.c new file mode 100644 index 0000000000..daca1a4833 --- /dev/null +++ b/sysdeps/unix/sysv/linux/am33/setresgid.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/am33/setresuid.c b/sysdeps/unix/sysv/linux/am33/setresuid.c new file mode 100644 index 0000000000..3aeabe9ad7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/am33/setresuid.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/am33/setreuid.c b/sysdeps/unix/sysv/linux/am33/setreuid.c new file mode 100644 index 0000000000..8ad61226e9 --- /dev/null +++ b/sysdeps/unix/sysv/linux/am33/setreuid.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/am33/setrlimit.c b/sysdeps/unix/sysv/linux/am33/setrlimit.c new file mode 100644 index 0000000000..bfaef74c38 --- /dev/null +++ b/sysdeps/unix/sysv/linux/am33/setrlimit.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/am33/setuid.c b/sysdeps/unix/sysv/linux/am33/setuid.c new file mode 100644 index 0000000000..de394379be --- /dev/null +++ b/sysdeps/unix/sysv/linux/am33/setuid.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/am33/socket.S b/sysdeps/unix/sysv/linux/am33/socket.S new file mode 100644 index 0000000000..2c09239f32 --- /dev/null +++ b/sysdeps/unix/sysv/linux/am33/socket.S @@ -0,0 +1,73 @@ +/* Copyright 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Alexandre Oliva . + Based on ../i386/socket.S. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +#define P(a, b) P2(a, b) +#define P2(a, b) a##b + + .text +/* The socket-oriented system calls are handled unusally in Linux. + They are all gated through the single `socketcall' system call number. + `socketcall' takes two arguments: the first is the subcode, specifying + which socket function is being called; and the second is a pointer to + the arguments to the specific function. + + The .S files for the other calls just #define socket and #include this. */ + +#ifndef __socket +#ifndef NO_WEAK_ALIAS +#define __socket P(__,socket) +#else +#define __socket socket +#endif +#endif + +.globl __socket +ENTRY (__socket) + + mov d0,(4,sp) + mov d1,(8,sp) + + mov SYS_ify(socketcall),d0 /* System call number in d0. */ + + /* Use ## so `socket' is a separate token that might be #define'd. */ + mov P(SOCKOP_,socket),a0 /* Subcode is first arg to syscall. */ + mov sp,d1 + add 4,d1 /* Address of args is 2nd arg. */ + + /* Do the system call trap. */ + syscall 0 + + /* d0 is < 0 if there was an error. */ + cmp -126,d0 + bls L(pseudo_end) + jmp SYSCALL_ERROR_LABEL + + /* Successful; return the syscall's value. */ +L(pseudo_end): + ret + +PSEUDO_END (__socket) + +#ifndef NO_WEAK_ALIAS +weak_alias (__socket, socket) +#endif diff --git a/sysdeps/unix/sysv/linux/am33/syscall.S b/sysdeps/unix/sysv/linux/am33/syscall.S new file mode 100644 index 0000000000..180e5822c6 --- /dev/null +++ b/sysdeps/unix/sysv/linux/am33/syscall.S @@ -0,0 +1,43 @@ +/* Copyright (C) 1995, 1996, 1998, 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Alexandre Oliva . + Based on ../i386/syscall.S. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +/* Please consult the file sysdeps/unix/sysv/linux/am33/sysdep.h for + more information about the value -126 used below.*/ + + .text +ENTRY (syscall) + movm [d2,d3,a2,a3],(sp) /* Save register contents. */ + mov d1,a0 + mov (28,sp),d1 + mov (32,sp),a3 + mov (36,sp),a2 + mov (40,sp),d3 + mov (44,sp),d2 + syscall 0 /* Do the system call. */ + movm (sp),[d2,d3,a2,a3] /* Restore register contents. */ + cmp -126,d0 /* Check for error. */ + bls L(pseudo_end) + jmp SYSCALL_ERROR_LABEL /* Jump to error handler if error. */ +L(pseudo_end): + ret /* Return to caller. */ + +PSEUDO_END (syscall) diff --git a/sysdeps/unix/sysv/linux/am33/sysdep.S b/sysdeps/unix/sysv/linux/am33/sysdep.S new file mode 100644 index 0000000000..b41bfce403 --- /dev/null +++ b/sysdeps/unix/sysv/linux/am33/sysdep.S @@ -0,0 +1,42 @@ +/* Copyright (C) 1995, 1996, 1997, 1998, 2001, 2004 + Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Alexandre Oliva . + Based on ../i386/sysdep.S. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +/* The following code is only used in the shared library when we + compile the reentrant version. Otherwise each system call defines + each own version. */ + +#ifndef PIC + +#undef CALL_MCOUNT +#define CALL_MCOUNT /* Don't insert the profiling call, it clobbers %eax. */ + + .text +ENTRY (__syscall_error) + mov d0,d1 + clr d0 + sub d1,d0 + +#define __syscall_error __syscall_error_1 +#include <../../../am33/sysdep.S> + +#endif /* !PIC */ diff --git a/sysdeps/unix/sysv/linux/am33/sysdep.h b/sysdeps/unix/sysv/linux/am33/sysdep.h new file mode 100644 index 0000000000..b0ff4ec867 --- /dev/null +++ b/sysdeps/unix/sysv/linux/am33/sysdep.h @@ -0,0 +1,317 @@ +/* Copyright 2001, 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Alexandre Oliva . + Based on ../i386/sysdep.h. + + 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 + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _LINUX_AM33_SYSDEP_H +#define _LINUX_AM33_SYSDEP_H 1 + +/* There is some commonality. */ +#include "../../../am33/sysdep.h" + +/* For Linux we can use the system call table in the header file + /usr/include/asm/unistd.h + of the kernel. But these symbols do not follow the SYS_* syntax + so we have to redefine the `SYS_ify' macro here. */ +#undef SYS_ify +#define SYS_ify(syscall_name) __NR_##syscall_name + +/* ELF-like local names start with `.L'. */ +#undef L +#define L(name) .L##name + +#ifdef __ASSEMBLER__ + +/* Linux uses a negative return value to indicate syscall errors, + unlike most Unices, which use the condition codes' carry flag. + + Since version 2.1 the return value of a system call might be + negative even if the call succeeded. E.g., the `lseek' system call + might return a large offset. Therefore we must not anymore test + for < 0, but test for a real error by making sure the value in %eax + is a real error number. Linus said he will make sure the no syscall + returns a value in -1 .. -4095 as a valid result so we can savely + test with -4095. */ + +/* We don't want the label for the error handle to be global when we define + it here. */ +#ifdef PIC +# define SYSCALL_ERROR_LABEL 0f +#else +# define SYSCALL_ERROR_LABEL syscall_error +#endif + +#undef PSEUDO +#define PSEUDO(name, syscall_name, args) \ + .text; \ + ENTRY (name) \ + DO_CALL (syscall_name, args); \ + cmp -126,d0; \ + bls L(pseudo_end); \ + jmp SYSCALL_ERROR_LABEL; \ + L(pseudo_end): \ + mov d0,a0; + +#undef PSEUDO_END +#define PSEUDO_END(name) \ + SYSCALL_ERROR_HANDLER \ + END (name) + +#undef PSEUDO_NOERROR +#define PSEUDO_NOERRNO(name, syscall_name, args) \ + .text; \ + ENTRY (name) \ + DO_CALL (syscall_name, args) + +#undef PSEUDO_END_NOERRNO +#define PSEUDO_END_NOERRNO(name) \ + END (name) + +#define ret_NOERRNO ret + +/* The function has to return the error code. */ +#undef PSEUDO_ERRVAL +#define PSEUDO_ERRVAL(name, syscall_name, args) \ + .text; \ + ENTRY (name) \ + DO_CALL (syscall_name, args); \ + clr d1; \ + sub d0,d1,d0 + +#undef PSEUDO_END_ERRVAL +#define PSEUDO_END_ERRVAL(name) \ + END (name) + +#define ret_ERRVAL ret + +#ifndef PIC +#define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */ +#else +/* Store (- d0) into errno through the GOT. */ +#ifdef _LIBC_REENTRANT +#define SYSCALL_ERROR_HANDLER \ +0:movm [d2,a2],(sp); \ + add -12,sp; \ +1:mov pc,a2; \ + add _GLOBAL_OFFSET_TABLE_-(1b-.),a2; \ + clr d2; \ + sub d0,d2; \ + call __errno_location@PLT,[],0; \ + mov d2,(a0); \ + add 12,sp; \ + movm (sp),[d2,a2]; \ + mov -1,d0; \ + mov d0,a0; \ + jmp L(pseudo_end); +/* A quick note: it is assumed that the call to `__errno_location' does + not modify the stack! */ +#else +#define SYSCALL_ERROR_HANDLER \ +0:mov pc,a0; \ + add _GLOBAL_OFFSET_TABLE_-(0b-.),a0; \ + clr d1; \ + sub d0,d1; \ + mov (errno@GOT,a0),a1; \ + mov d1,(a0); \ + mov -1,d0; \ + mov d0,a0; \ + jmp L(pseudo_end); +#endif /* _LIBC_REENTRANT */ +#endif /* PIC */ + +/* Linux takes system call arguments in registers: + + syscall number d0 call-clobbered + arg 1 a0 call-clobbered + arg 2 d1 call-clobbered + arg 3 a3 call-saved + arg 4 a2 call-saved + arg 5 d3 call-saved + arg 6 d2 call-saved + + The stack layout upon entering the function is: + + (24,sp) Arg# 6 + (20,sp) Arg# 5 + (16,sp) Arg# 4 + (12,sp) Arg# 3 + d1 Arg# 2 + d0 Arg# 1 + (sp) Return address + + (Of course a function with say 3 arguments does not have entries for + arguments 4, 5 and 6.) */ + +#undef DO_CALL +#define DO_CALL(syscall_name, args) \ + PUSHARGS_##args \ + DOARGS_##args \ + mov SYS_ify (syscall_name),d0; \ + syscall 0 \ + POPARGS_##args + +#define PUSHARGS_0 /* No arguments to push. */ +#define _DOARGS_0(N) /* No arguments to frob. */ +#define DOARGS_0 /* No arguments to frob. */ +#define POPARGS_0 /* No arguments to pop. */ + +#define PUSHARGS_1 /* No arguments to push. */ +#define _DOARGS_1(N) _DOARGS_0 (N-4) mov d0,a0; +#define DOARGS_1 _DOARGS_1 (4) +#define POPARGS_1 /* No arguments to pop. */ + +#define PUSHARGS_2 /* No arguments to push. */ +#define _DOARGS_2(N) _DOARGS_1 (N-4) /* Argument already in d1. */ +#define DOARGS_2 _DOARGS_2 (8) +#define POPARGS_2 /* No arguments to pop. */ + +#define PUSHARGS_3 movm [a3],(sp); +#define _DOARGS_3(N) _DOARGS_2 (N-4) mov (N,sp),a3; +#define DOARGS_3 _DOARGS_3 (16) +#define POPARGS_3 ; movm (sp),[a3] + +#define PUSHARGS_4 movm [a2,a3],(sp); +#define _DOARGS_4(N) _DOARGS_3 (N-4) mov (N,sp),a2; +#define DOARGS_4 _DOARGS_4 (24) +#define POPARGS_4 ; movm (sp),[a2,a3] + +#define PUSHARGS_5 movm [d3,a2,a3],(sp); +#define _DOARGS_5(N) _DOARGS_4 (N-4) mov (N,sp),d3; +#define DOARGS_5 _DOARGS_5 (32) +#define POPARGS_5 ; movm (sp),[d3,a2,a3] + +#define PUSHARGS_6 movm [d2,d3,a2,a3],(sp); +#define _DOARGS_6(N) _DOARGS_5 (N-4) mov (N,sp),d2; +#define DOARGS_6 _DOARGS_6 (40) +#define POPARGS_6 ; movm (sp),[d2,d3,a2,a3] + +#else /* !__ASSEMBLER__ */ + +/* Define a macro which expands inline into the wrapper code for a system + call. */ +#undef INLINE_SYSCALL +#define INLINE_SYSCALL(name, nr, args...) \ + ({ \ + unsigned int resultvar = INTERNAL_SYSCALL (name, , nr, args); \ + if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (resultvar, ), 0)) \ + { \ + __set_errno (INTERNAL_SYSCALL_ERRNO (resultvar, )); \ + resultvar = 0xffffffff; \ + } \ + (int) resultvar; }) + +#define INTERNAL_SYSCALL(name, err, nr, args...) \ +({ \ + register long __sc0 asm ("d0") = __NR_##name; \ + inline_syscall##nr(name, ## args); \ + __sc0; \ +}) + +#undef INTERNAL_SYSCALL_DECL +#define INTERNAL_SYSCALL_DECL(err) do { } while (0) + +#undef INTERNAL_SYSCALL_ERROR_P +#define INTERNAL_SYSCALL_ERROR_P(val, err) \ + ((unsigned int) (val) >= (unsigned long)-125) + +#undef INTERNAL_SYSCALL_ERRNO +#define INTERNAL_SYSCALL_ERRNO(val, err) (-(val)) + +#define inline_syscall0(name,dummy...) \ +__asm__ __volatile__ ("syscall 0" \ + : "+d" (__sc0) \ + : : "memory") + +#define inline_syscall1(name,arg1) \ +register long __sc1 asm ("a0") = (long) (arg1); \ +inline_syscall0 (name); \ +__asm__ __volatile__ ("" : : "r" (__sc1)) + +#define inline_syscall2(name,arg1,arg2) \ +register long __sc2 asm ("d1") = (long) (arg2); \ +inline_syscall1 (name,(arg1)); \ +__asm__ __volatile__ ("" : : "r" (__sc2)) + +/* We can't tell whether a3 is going to be eliminated in the enclosing + function, so we have to assume it isn't. We first load the value + of any arguments into their registers, except for a3 itself, that + may be needed to load the value of the other arguments. Then, we + save a3's value in some other register, and load the argument value + into a3. We have to force both a3 and its copy to be live in + different registers at the same time, to avoid having the copy + spilled and the value reloaded into the same register, in which + case we'd be unable to get the value of a3 back, should the stack + slot reference be (offset,a3). */ +#define inline_syscall3(name,arg1,arg2,arg3) \ +long __sc3v = (long) (arg3); \ +register long __sc1 asm ("a0") = (long) (arg1); \ +register long __sc2 asm ("d1") = (long) (arg2); \ +register long __sc3 asm ("a3") = __sc3; \ +register long __sc3c; \ +__asm__ __volatile__ ("mov %1,%0" : "=&r" (__sc3c) : "r" (__sc3)); \ +__sc3 = __sc3v; \ +__asm__ __volatile__ ("" : : "r" (__sc3c), "r" (__sc3)); \ +inline_syscall0 (name); \ +__sc3 = __sc3c; \ +__asm__ __volatile__ ("" : : "r" (__sc3), "r" (__sc2), "r" (__sc1)) + +#ifdef PIC +/* Since a2 is the PIC register, it requires similar handling as a3 + when we're generating PIC, as a2's value may be needed to load + arguments whose values live in global variables. The difference is + that we don't need to require its value to be live in a register; + it may well be in a stack slot, as long as we save it before + clobbering a3 and restore it after restoring a3. */ +#define inline_syscall4(name,arg1,arg2,arg3,arg4) \ +long __sc4v = (long) (arg4); \ +long __sc3v = (long) (arg3); \ +register long __sc1 asm ("a0") = (long) (arg1); \ +register long __sc2 asm ("d1") = (long) (arg2); \ +register long __sc3 asm ("a3") = __sc3; \ +register long __sc3c; \ +register long __sc4 asm ("a2") = __sc4; \ +long __sc4c = __sc4; \ +__sc4 = __sc4v; \ +__asm__ __volatile__ ("mov %1,%0" : "=&r" (__sc3c) : "r" (__sc3)); \ +__sc3 = __sc3v; \ +__asm__ __volatile__ ("" : : "r" (__sc3c), "r" (__sc3), "r" (__sc4)); \ +inline_syscall0 (name); \ +__sc3 = __sc3c; \ +__sc4 = __sc4c; \ +__asm__ __volatile__ ("" : : "r" (__sc4), "r" (__sc3), \ + "r" (__sc2), "r" (__sc1)) +#else +#define inline_syscall4(name,arg1,arg2,arg3,arg4) \ +register long __sc4 asm ("a2") = (long) (arg4); \ +inline_syscall3 (name,(arg1),(arg2),(arg3)); \ +__asm__ __volatile__ ("" : : "r" (__sc4)) +#endif + +#define inline_syscall5(name,arg1,arg2,arg3,arg4,arg5) \ +register long __sc5 asm ("d3") = (long) (arg5); \ +inline_syscall4 (name,(arg1),(arg2),(arg3),(arg4)); \ +__asm__ __volatile__ ("" : : "r" (__sc5)) + +#define inline_syscall6(name,arg1,arg2,arg3,arg4,arg5,arg6) \ +register long __sc6 asm ("d2") = (long) (arg6); \ +inline_syscall5 (name,(arg1),(arg2),(arg3),(arg4),(arg5)); \ +__asm__ __volatile__ ("" : : "r" (__sc6)) + +#endif /* __ASSEMBLER__ */ + +#endif /* linux/am33/sysdep.h */ diff --git a/sysdeps/unix/sysv/linux/am33/xstat.c b/sysdeps/unix/sysv/linux/am33/xstat.c new file mode 100644 index 0000000000..e9869f5508 --- /dev/null +++ b/sysdeps/unix/sysv/linux/am33/xstat.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/linuxthreads/sysdep-cancel.h b/sysdeps/unix/sysv/linux/linuxthreads/sysdep-cancel.h new file mode 100644 index 0000000000..56d3bb62f8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/linuxthreads/sysdep-cancel.h @@ -0,0 +1,159 @@ +/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Alexandre Oliva + + 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. */ + +#include +#include +#include +#ifndef __ASSEMBLER__ +# include +#endif + +#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt + +# undef PSEUDO +# define PSEUDO(name, syscall_name, args) \ + .text ; \ + ENTRY (name) \ + PUSHARGS_##args \ + DOARGS_##args \ + SINGLE_THREAD_P; \ + bne L(pseudo_cancel); \ + mov SYS_ify (syscall_name),d0; \ + syscall 0 \ + POPARGS_##args ; \ + cmp -126,d0; \ + bls L(pseudo_end); \ + jmp SYSCALL_ERROR_LABEL; \ + L(pseudo_cancel): \ + add -(16+STACK_SPACE (args)),sp; \ + SAVE_ARGS_##args \ + CENABLE \ + mov d0,r0; \ + LOAD_ARGS_##args \ + mov SYS_ify (syscall_name),d0; \ + syscall 0; \ + mov d0,(12,sp); \ + mov r0,d0; \ + CDISABLE \ + mov (12,sp),d0; \ + add +16+STACK_SPACE (args),sp \ + POPARGS_##args ; \ + cmp -126,d0; \ + bls L(pseudo_end); \ + jmp SYSCALL_ERROR_LABEL; \ + L(pseudo_end): \ + mov d0,a0 + +/* Reserve up to 2 stack slots for a0 and d1, but fewer than that if + we don't have that many arguments. */ +# define STACK_SPACE(n) (((((n) < 3) * (2 - (n))) + 2) * 4) + +# define SAVE_ARGS_0 +# define SAVE_ARGS_1 mov a0,(20,sp) ; +# define SAVE_ARGS_2 SAVE_ARGS_1 mov d1,(24,sp) ; +# define SAVE_ARGS_3 SAVE_ARGS_2 +# define SAVE_ARGS_4 SAVE_ARGS_3 +# define SAVE_ARGS_5 SAVE_ARGS_4 +# define SAVE_ARGS_6 SAVE_ARGS_5 + +# define LOAD_ARGS_0 +# define LOAD_ARGS_1 mov (20,sp),a0 ; +# define LOAD_ARGS_2 LOAD_ARGS_1 mov (24,sp),d1 ; +# define LOAD_ARGS_3 LOAD_ARGS_2 +# define LOAD_ARGS_4 LOAD_ARGS_3 +# define LOAD_ARGS_5 LOAD_ARGS_4 +# define LOAD_ARGS_6 LOAD_ARGS_5 + +# ifdef IS_IN_libpthread +# define CENABLE call __pthread_enable_asynccancel,[],0; +# define CDISABLE call __pthread_disable_asynccancel,[],0; +# elif defined IS_IN_librt +# ifdef PIC +# define CENABLE movm [a2],(sp); \ + 1: mov pc,a2; \ + add _GLOBAL_OFFSET_TABLE_-(1b-.),a2; \ + call +__librt_enable_asynccancel@PLT,[],0; \ + movm (sp),[a2]; +# define CENABLE movm [a2],(sp); \ + 1: mov pc,a2; \ + add _GLOBAL_OFFSET_TABLE_-(1b-.),a2; \ + call +__librt_disable_asynccancel@PLT,[],0; \ + movm (sp),[a2]; +# else +# define CENABLE call +__librt_enable_asynccancel,[],0; +# define CDISABLE call +__librt_disable_asynccancel,[],0; +# endif +# else +# define CENABLE call +__libc_enable_asynccancel,[],0; +# define CDISABLE call +__libc_disable_asynccancel,[],0; +# endif + +#if !defined NOT_IN_libc +# define __local_multiple_threads __libc_multiple_threads +#elif defined IS_IN_libpthread +# define __local_multiple_threads __pthread_multiple_threads +#else +# define __local_multiple_threads __librt_multiple_threads +#endif + +# ifndef __ASSEMBLER__ +# if defined FLOATING_STACKS && USE___THREAD && defined PIC +# define SINGLE_THREAD_P \ + __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ + p_header.data.multiple_threads) == 0, 1) +# else +extern int __local_multiple_threads +# if !defined NOT_IN_libc || defined IS_IN_libpthread + attribute_hidden; +# else + ; +# endif +# define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1) +# endif +# else +# if !defined PIC +# define SINGLE_THREAD_P \ + mov (+__local_multiple_threads),d0; \ + cmp 0,d0 +# elif !defined NOT_IN_libc || defined IS_IN_libpthread +# define SINGLE_THREAD_P \ + movm [a2],(sp); \ + 1: mov pc,a2; \ + add _GLOBAL_OFFSET_TABLE_-(1b-.),a2; \ + mov (+__local_multiple_threads@GOTOFF,a2),d0; \ + movm (sp),[a2]; \ + cmp 0,d0 +# else +# define SINGLE_THREAD_P \ + movm [a2],(sp); \ + 1: mov pc,a2; \ + add _GLOBAL_OFFSET_TABLE_-(1b-.),a2; \ + mov (+__local_multiple_threads@GOT,a2),a2; \ + mov (a2),d0; \ + movm (sp),[a2]; \ + cmp 0,d0 +# endif +# endif + +#elif !defined __ASSEMBLER__ + +/* This code should never be used but we define it anyhow. */ +# define SINGLE_THREAD_P (1) + +#endif From 1b189b569598a7deb461bbbdc6d42b72063dc8bd Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 23 Oct 2004 03:04:33 +0000 Subject: [PATCH 3367/4487] 2004-10-22 Roland McGrath * configure.in: Cope if there are no sysdeps/*/preconfigure files. * configure: Regenerated. --- configure | 1 + configure.in | 1 + 2 files changed, 2 insertions(+) diff --git a/configure b/configure index e90ab67db0..77d4ea47a4 100755 --- a/configure +++ b/configure @@ -10,6 +10,7 @@ # collected together into a single shared add-on package. cpu_frags=`(cd $srcdir/$libc_add_on; echo sysdeps/*/preconfigure)` +test x"$cpu_frags" = x'sysdeps/*/preconfigure' || for frag in $cpu_frags; do echo "$as_me:$LINENO: result: ports add-on running preconfigure fragment $frag" >&5 echo "${ECHO_T}ports add-on running preconfigure fragment $frag" >&6 diff --git a/configure.in b/configure.in index d37cb8d7ee..93b987ab17 100644 --- a/configure.in +++ b/configure.in @@ -11,6 +11,7 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. # collected together into a single shared add-on package. cpu_frags=`(cd $srcdir/$libc_add_on; echo sysdeps/*/preconfigure)` +test x"$cpu_frags" = x'sysdeps/*/preconfigure' || for frag in $cpu_frags; do AC_MSG_RESULT(ports add-on running preconfigure fragment $frag) . $srcdir/$libc_add_on/$frag From 3696a6e9f1ec36503443e0d322060b9fc6878a49 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 23 Oct 2004 03:04:42 +0000 Subject: [PATCH 3368/4487] . --- ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ChangeLog b/ChangeLog index d7b0ea3f98..87129971ed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-10-22 Roland McGrath + + * configure.in: Cope if there are no sysdeps/*/preconfigure files. + * configure: Regenerated. + 2004-08-16 Roland McGrath * Makefile: New file. From 556e06df466df56066f7154ea6c14dd4b3193ea4 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 23 Oct 2004 04:07:06 +0000 Subject: [PATCH 3369/4487] 2004-10-22 Roland McGrath * Makefile (dist, dist-ports): New target. (dist-port-%): New pattern rule. * Makeconfig [!subdir] (ports/%): New pattern rule. --- Makeconfig | 6 ++++++ Makefile | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/Makeconfig b/Makeconfig index 20a0f08cca..92158bef1c 100644 --- a/Makeconfig +++ b/Makeconfig @@ -33,3 +33,9 @@ $(..)ports/sysdeps/%/preconfigure: $(..)ports/sysdeps/%/preconfigure.in \ $(autoconf-it) endif # $(AUTOCONF) = no + +# This allows e.g. `make ports/dist' from a build directory. +ifndef subdir +ports/%: + $(MAKE) $(PARALLELMFLAGS) -C $(@D) $(@F) +endif diff --git a/Makefile b/Makefile index 463f278b2c..a65257be82 100644 --- a/Makefile +++ b/Makefile @@ -4,3 +4,38 @@ subdir = ports include ../Rules + +.PHONY: dist dist-ports +dist: dist-ports + +# Do `make dist dist-version=X.Y.Z' to make tar files of an older version. +dist-version = $(version) +# Also try 'dist-tag=some="-r TAG"' (or -D DATE) to get some tag rather +# than the release tag for X.Y.Z. +dist-tag = -r glibc-$(subst .,_,$(dist-version)) + +distname = glibc-ports-$(dist-version) + +do-export = cvs $(CVSOPTS) -Q export -d $(basename $@) $(dist-tag) + +dist-ports: $(foreach Z,.bz2 .gz,$(distname).tar$Z) + md5sum $^ +$(distname).tar: + @rm -fr $(basename $@) + $(do-export) ports + tar cf $@ $(basename $@) + rm -fr $(basename $@) + +.PRECIOUS: %.gz %.bz2 # Don't delete output as intermediate files. +dist-port-%: $(foreach Z,.bz2 .gz,glibc-port-%-$(dist-version).tar$Z) + md5sum $^ +glibc-port-%-$(dist-version).tar: configure ChangeLog + @rm -fr $(basename $@) + $(do-export) -l ports + rm -f $(basename $@)/ChangeLog.[a-z]* + $(do-export) ports/ChangeLog.$* \ + ports/sysdeps/$* ports/sysdeps/unix/sysv/linux/$* + mv $(basename $@)/ports/* $(basename $@)/ + rmdir $(basename $@)/ports + tar cf $@ $(basename $@) + rm -fr $(basename $@) From aa3f0bd8c70385da698c71efacbf82e3291df59c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 23 Oct 2004 04:07:10 +0000 Subject: [PATCH 3370/4487] . --- ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ChangeLog b/ChangeLog index 87129971ed..071fc8d7d6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2004-10-22 Roland McGrath + * Makefile (dist, dist-ports): New target. + (dist-port-%): New pattern rule. + * Makeconfig [!subdir] (ports/%): New pattern rule. + * configure.in: Cope if there are no sysdeps/*/preconfigure files. * configure: Regenerated. From c706b040a01487df066208e6f39a22629ccc9463 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 23 Oct 2004 04:33:14 +0000 Subject: [PATCH 3371/4487] add it --- .cvsignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .cvsignore diff --git a/.cvsignore b/.cvsignore new file mode 100644 index 0000000000..613f66d7a8 --- /dev/null +++ b/.cvsignore @@ -0,0 +1 @@ +glibc-ports-*.tar* glibc-port-*.tar* From cbd6a07c568c51ec4e5daca9725d6a2f78296468 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Mon, 25 Oct 2004 07:11:57 +0000 Subject: [PATCH 3372/4487] * sysdeps/unix/sysv/linux/linuxthreads/sysdep-cancel.h: Moved... * sysdeps/unix/sysv/linux/am33/linuxthreads/sysdep-cancel.h: ... here, where it should have been added in the first place. --- ChangeLog.am33 | 6 ++++++ .../unix/sysv/linux/{ => am33}/linuxthreads/sysdep-cancel.h | 0 2 files changed, 6 insertions(+) rename sysdeps/unix/sysv/linux/{ => am33}/linuxthreads/sysdep-cancel.h (100%) diff --git a/ChangeLog.am33 b/ChangeLog.am33 index dfca6e832c..b8fd2f1cfb 100644 --- a/ChangeLog.am33 +++ b/ChangeLog.am33 @@ -1,3 +1,9 @@ +2004-10-25 Alexandre Oliva + + * sysdeps/unix/sysv/linux/linuxthreads/sysdep-cancel.h: Moved... + * sysdeps/unix/sysv/linux/am33/linuxthreads/sysdep-cancel.h: + ... here, where it should have been added in the first place. + 2004-10-22 Alexandre Oliva * sysdeps/unix/sysv/linux/am33/bits/mman.h (PROT_GROWSDOWN): New. diff --git a/sysdeps/unix/sysv/linux/linuxthreads/sysdep-cancel.h b/sysdeps/unix/sysv/linux/am33/linuxthreads/sysdep-cancel.h similarity index 100% rename from sysdeps/unix/sysv/linux/linuxthreads/sysdep-cancel.h rename to sysdeps/unix/sysv/linux/am33/linuxthreads/sysdep-cancel.h From fe66f7f2143b385888f9ff61fac6295c6e56f23c Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Mon, 25 Oct 2004 07:16:32 +0000 Subject: [PATCH 3373/4487] * ChangeLog.am33: Added emacs local variables for mode setting and default changelog name. --- ChangeLog.am33 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ChangeLog.am33 b/ChangeLog.am33 index b8fd2f1cfb..7fa5c79afd 100644 --- a/ChangeLog.am33 +++ b/ChangeLog.am33 @@ -1,5 +1,8 @@ 2004-10-25 Alexandre Oliva + * ChangeLog.am33: Added emacs local variables for mode setting and + default changelog name. + * sysdeps/unix/sysv/linux/linuxthreads/sysdep-cancel.h: Moved... * sysdeps/unix/sysv/linux/am33/linuxthreads/sysdep-cancel.h: ... here, where it should have been added in the first place. @@ -211,3 +214,11 @@ * sysdeps/unix/sysv/linux/am33/sysdep.h: New file. * sysdeps/unix/sysv/linux/am33/bits/fcntl.h: New file. * sysdeps/unix/sysv/linux/am33/bits/mman.h: New file. + +Local Variables: +mode: change-log +left-margin: 8 +fill-column: 74 +version-control: never +change-log-default-name: "ChangeLog.am33" +End: From 99e519ba0a2a6912b32b44d53774c0a7210e37cc Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 26 Oct 2004 01:33:30 +0000 Subject: [PATCH 3374/4487] 2004-10-25 Roland McGrath * sysdeps/cris/configure.in: New file, with test moved out of main libc configure.in file. * sysdeps/cris/configure: New generated file. --- sysdeps/cris/configure | 7 +++++++ sysdeps/cris/configure.in | 5 +++++ 2 files changed, 12 insertions(+) create mode 100755 sysdeps/cris/configure create mode 100644 sysdeps/cris/configure.in diff --git a/sysdeps/cris/configure b/sysdeps/cris/configure new file mode 100755 index 0000000000..205bbac85d --- /dev/null +++ b/sysdeps/cris/configure @@ -0,0 +1,7 @@ +# This file is generated from configure.in by Autoconf. DO NOT EDIT! + +libc_cv_asm_line_sep='@' +cat >>confdefs.h <<_ACEOF +#define ASM_LINE_SEP $libc_cv_asm_line_sep +_ACEOF + diff --git a/sysdeps/cris/configure.in b/sysdeps/cris/configure.in new file mode 100644 index 0000000000..94bc13750b --- /dev/null +++ b/sysdeps/cris/configure.in @@ -0,0 +1,5 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. + +dnl CRIS uses `;' to start comments and `@' for line separator. +libc_cv_asm_line_sep='@' +AC_DEFINE_UNQUOTED(ASM_LINE_SEP, $libc_cv_asm_line_sep) From 1b4558c1c5a4102db1c0a26fef91147cb2aee2f1 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 26 Oct 2004 01:35:53 +0000 Subject: [PATCH 3375/4487] 2004-10-25 Roland McGrath * configure.in (ASM_LINE_SEP): Move this setting to ... * sysdeps/hppa/configure.in: ... here, new file. * sysdeps/hppa/configure: New generated file. * configure: Regenerated. --- sysdeps/hppa/configure | 34 ++++++++++++++++++++++++++++++++++ sysdeps/hppa/configure.in | 22 ++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 sysdeps/hppa/configure create mode 100644 sysdeps/hppa/configure.in diff --git a/sysdeps/hppa/configure b/sysdeps/hppa/configure new file mode 100644 index 0000000000..07bde0e0ee --- /dev/null +++ b/sysdeps/hppa/configure @@ -0,0 +1,34 @@ +# This file is generated from configure.in by Autoconf. DO NOT EDIT! + +hppa*linux*) +echo "$as_me:$LINENO: checking for assembler line separator" >&5 +echo $ECHO_N "checking for assembler line separator... $ECHO_C" >&6 +if test "${libc_cv_asm_line_sep+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat > conftest.s <&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + libc_cv_asm_line_sep='!' +else + if test -z "$enable_hacker_mode"; then + echo "*** You need a newer assembler to compile glibc" + rm -f conftest* + exit 1 + fi + libc_cv_asm_line_sep=';' +fi +rm -f conftest* +fi +echo "$as_me:$LINENO: result: $libc_cv_asm_line_sep" >&5 +echo "${ECHO_T}$libc_cv_asm_line_sep" >&6 +cat >>confdefs.h <<_ACEOF +#define ASM_LINE_SEP $libc_cv_asm_line_sep +_ACEOF + diff --git a/sysdeps/hppa/configure.in b/sysdeps/hppa/configure.in new file mode 100644 index 0000000000..1ec6780835 --- /dev/null +++ b/sysdeps/hppa/configure.in @@ -0,0 +1,22 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. + +dnl The standard hppa assembler uses `;' to start comments and `!' +dnl as a line separator. +hppa*linux*) +AC_CACHE_CHECK(for assembler line separator, + libc_cv_asm_line_sep, [dnl +cat > conftest.s <&AS_MESSAGE_LOG_FD); then + libc_cv_asm_line_sep='!' +else + if test -z "$enable_hacker_mode"; then + echo "*** You need a newer assembler to compile glibc" + rm -f conftest* + exit 1 + fi + libc_cv_asm_line_sep=';' +fi +rm -f conftest*]) +AC_DEFINE_UNQUOTED(ASM_LINE_SEP, $libc_cv_asm_line_sep) From fd14fe4536a8ce78084807b244d9b8594e1fc9a0 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 26 Oct 2004 01:36:11 +0000 Subject: [PATCH 3376/4487] . --- ChangeLog.cris | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 ChangeLog.cris diff --git a/ChangeLog.cris b/ChangeLog.cris new file mode 100644 index 0000000000..ba77489368 --- /dev/null +++ b/ChangeLog.cris @@ -0,0 +1,10 @@ +2004-10-25 Roland McGrath + + * sysdeps/cris/configure.in: New file, with test moved out of main + libc configure.in file. + * sysdeps/cris/configure: New generated file. + +2004-10-23 Roland McGrath + + * sysdeps/cris, sysdeps/unix/sysv/linux/cris: Moved here from main + libc source tree. From 7618b354bfae9b944d8d6deeecc24fefcf30b559 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 30 Oct 2004 21:44:13 +0000 Subject: [PATCH 3378/4487] (elf_machine_rela) (elf_machine_rela_relative, elf_machine_lazy_rel): Mark auto instead of static. --- sysdeps/m68k/dl-machine.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index e52893889d..146c5866a9 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -223,7 +223,7 @@ elf_machine_plt_value (struct link_map *map, const Elf32_Rela *reloc, /* Perform the relocation specified by RELOC and SYM (which is fully resolved). MAP is the object containing the reloc. */ -static inline void __attribute__ ((always_inline)) +auto inline void __attribute__ ((unused, always_inline)) elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, const Elf32_Sym *sym, const struct r_found_version *version, void *const reloc_addr_arg) @@ -294,7 +294,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, } } -static inline void +auto inline void __attribute__ ((unused, always_inline)) elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, void *const reloc_addr_arg) { @@ -302,7 +302,7 @@ elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, *reloc_addr = l_addr + reloc->r_addend; } -static inline void +auto inline void __attribute__ ((unused, always_inline)) elf_machine_lazy_rel (struct link_map *map, Elf32_Addr l_addr, const Elf32_Rela *reloc) { From 8cc7e0507ddf32c72b2fc341214c949ae61cf093 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 1 Nov 2004 05:31:54 +0000 Subject: [PATCH 3379/4487] * sysdeps/unix/sysv/linux/alpha/setregid.c: New file. * sysdeps/unix/sysv/linux/alpha/setresgid.c: New file. * sysdeps/unix/sysv/linux/alpha/setresuid.c: New file. * sysdeps/unix/sysv/linux/alpha/setreuid.c: New file. --- sysdeps/unix/sysv/linux/alpha/setregid.c | 53 ++++++++++++++++++++++ sysdeps/unix/sysv/linux/alpha/setresgid.c | 55 +++++++++++++++++++++++ sysdeps/unix/sysv/linux/alpha/setresuid.c | 55 +++++++++++++++++++++++ sysdeps/unix/sysv/linux/alpha/setreuid.c | 53 ++++++++++++++++++++++ 4 files changed, 216 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/setregid.c create mode 100644 sysdeps/unix/sysv/linux/alpha/setresgid.c create mode 100644 sysdeps/unix/sysv/linux/alpha/setresuid.c create mode 100644 sysdeps/unix/sysv/linux/alpha/setreuid.c diff --git a/sysdeps/unix/sysv/linux/alpha/setregid.c b/sysdeps/unix/sysv/linux/alpha/setregid.c new file mode 100644 index 0000000000..cfc8283c3a --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/setregid.c @@ -0,0 +1,53 @@ +/* Copyright (C) 1998, 2000, 2003, 2004 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. */ + +#include +#include +#include + +#include +#include + +#include +#include "kernel-features.h" +#include + + +int +__setregid (gid_t rgid, gid_t egid) +{ + int result; + + result = INLINE_SYSCALL (setregid, 2, (signed int)rgid, (signed int)egid); + +#if defined HAVE_PTR__NPTL_SETXID && !defined SINGLE_THREAD + if (result == 0 && __libc_pthread_functions.ptr__nptl_setxid != NULL) + { + struct xid_command cmd; + cmd.syscall_no = __NR_setregid; + cmd.id[0] = rgid; + cmd.id[1] = egid; + __libc_pthread_functions.ptr__nptl_setxid (&cmd); + } +#endif + + return result; +} +#ifndef __setregid +weak_alias (__setregid, setregid) +#endif diff --git a/sysdeps/unix/sysv/linux/alpha/setresgid.c b/sysdeps/unix/sysv/linux/alpha/setresgid.c new file mode 100644 index 0000000000..fdfa486534 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/setresgid.c @@ -0,0 +1,55 @@ +/* Copyright (C) 1998, 2000, 2003, 2004 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. */ + +#include +#include +#include + +#include +#include + +#include +#include "kernel-features.h" +#include + + +int +__setresgid (gid_t rgid, gid_t egid, gid_t sgid) +{ + int result; + + result = INLINE_SYSCALL (setresgid, 3, (signed int)rgid, (signed int)egid, (signed int)sgid); + +#if defined HAVE_PTR__NPTL_SETXID && !defined SINGLE_THREAD + if (result == 0 && __libc_pthread_functions.ptr__nptl_setxid != NULL) + { + struct xid_command cmd; + cmd.syscall_no = __NR_setresgid; + cmd.id[0] = rgid; + cmd.id[1] = egid; + cmd.id[2] = sgid; + __libc_pthread_functions.ptr__nptl_setxid (&cmd); + } +#endif + + return result; +} +libc_hidden_def (__setresgid) +#ifndef __setresgid +weak_alias (__setresgid, setresgid) +#endif diff --git a/sysdeps/unix/sysv/linux/alpha/setresuid.c b/sysdeps/unix/sysv/linux/alpha/setresuid.c new file mode 100644 index 0000000000..49671278ee --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/setresuid.c @@ -0,0 +1,55 @@ +/* Copyright (C) 1998, 2000, 2003, 2004 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. */ + +#include +#include +#include + +#include +#include + +#include +#include "kernel-features.h" +#include + + +int +__setresuid (uid_t ruid, uid_t euid, uid_t suid) +{ + int result; + + result = INLINE_SYSCALL (setresuid, 3, (signed int)ruid, (signed int)euid, (signed int)suid); + +#if defined HAVE_PTR__NPTL_SETXID && !defined SINGLE_THREAD + if (result == 0 && __libc_pthread_functions.ptr__nptl_setxid != NULL) + { + struct xid_command cmd; + cmd.syscall_no = __NR_setresuid; + cmd.id[0] = ruid; + cmd.id[1] = euid; + cmd.id[2] = suid; + __libc_pthread_functions.ptr__nptl_setxid (&cmd); + } +#endif + + return result; +} +libc_hidden_def (__setresuid) +#ifndef __setresuid +weak_alias (__setresuid, setresuid) +#endif diff --git a/sysdeps/unix/sysv/linux/alpha/setreuid.c b/sysdeps/unix/sysv/linux/alpha/setreuid.c new file mode 100644 index 0000000000..b29aed479e --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/setreuid.c @@ -0,0 +1,53 @@ +/* Copyright (C) 1998, 2000, 2003, 2004 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. */ + +#include +#include +#include + +#include +#include + +#include +#include "kernel-features.h" +#include + + +int +__setreuid (uid_t ruid, uid_t euid) +{ + int result; + + result = INLINE_SYSCALL (setreuid, 2, (signed int)ruid, (signed int)euid); + +#if defined HAVE_PTR__NPTL_SETXID && !defined SINGLE_THREAD + if (result == 0 && __libc_pthread_functions.ptr__nptl_setxid != NULL) + { + struct xid_command cmd; + cmd.syscall_no = __NR_setreuid; + cmd.id[0] = ruid; + cmd.id[1] = euid; + __libc_pthread_functions.ptr__nptl_setxid (&cmd); + } +#endif + + return result; +} +#ifndef __setreuid +weak_alias (__setreuid, setreuid) +#endif From 463402af3aa80a0c408a1228c6587e56ebf58067 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Thu, 4 Nov 2004 18:39:10 +0000 Subject: [PATCH 3380/4487] * sysdeps/unix/sysv/linux/alpha/register-dump.h (regnames): Align. (linefeed): Remove. (register_dump): Rewrite to generate into a flat buffer instead of into iovecs. --- sysdeps/unix/sysv/linux/alpha/register-dump.h | 46 +++++++++---------- 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/register-dump.h b/sysdeps/unix/sysv/linux/alpha/register-dump.h index d55899a2c1..77f962952a 100644 --- a/sysdeps/unix/sysv/linux/alpha/register-dump.h +++ b/sysdeps/unix/sysv/linux/alpha/register-dump.h @@ -18,7 +18,7 @@ 02111-1307 USA. */ #include -#include +#include /* We will print the register dump in this format: @@ -51,7 +51,7 @@ #define NREGS (32+32+3) -static const char regnames[NREGS][8] = +static const char __attribute__((aligned(8))) regnames[NREGS][8] = { " V0: ", " T0: ", " T1: ", " T2: ", " T3: ", " T4: ", @@ -113,49 +113,45 @@ static const int offsets[NREGS] = #undef O -static const char linefeed[2] = "\n\n"; - static void register_dump (int fd, struct sigcontext *ctx) { - char regs[NREGS][16]; - struct iovec iov[2*NREGS+24]; - size_t iov_i = 0, i, j; + char buf[NREGS*(8+16) + 25 + 80]; + char *p = buf; + size_t i; -#define ADD_MEM(str, len) \ - (iov[iov_i].iov_base = (void *)(str), \ - iov[iov_i].iov_len = len, \ - ++iov_i) - -#define ADD_STRING(str) ADD_MEM(str, strlen(str)) - - ADD_STRING ("Register dump:\n\n"); + p = stpcpy (p, "Register dump:\n\n"); for (i = 0; i < NREGS; ++i) { int this_offset, this_lf; unsigned long val; + signed long j; this_offset = offsets[i]; this_lf = this_offset & 7; - this_offset &= -8; - val = *(unsigned long *)((char *)ctx + this_offset); + val = *(unsigned long *)(((size_t)ctx + this_offset) & -8); - for (j = 0; j < 16; ++j) + memcpy (p, regnames[i], 8); + p += 8; + + for (j = 60; j >= 0; j -= 4) { - unsigned long x = (val >> (64 - (j + 1) * 4)) & 15; + unsigned long x = (val >> j) & 15; x += x < 10 ? '0' : 'a' - 10; - regs[i][j] = x; + *p++ = x; } - ADD_MEM (regnames[i], 8); - ADD_MEM (regs[i], 16); - if (this_lf) - ADD_MEM (linefeed, this_lf); + if (this_lf > 0) + { + if (this_lf > 1) + *p++ = '\n'; + *p++ = '\n'; + } } - writev (fd, iov, iov_i); + write (fd, buf, p - buf); } #define REGISTER_DUMP register_dump (fd, ctx) From 6deb629a5447613bfddf7f24cffbcd28b985667f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 12 Nov 2004 01:15:06 +0000 Subject: [PATCH 3381/4487] Remove sys/syscall.h, sys/types.h, linux/posix_types.h, sysdep.h and pthread-functions.h includes. Include setxid.h. Use INLINE_SETXID_SYSCALL macro instead of INLINE_SYSCALL, kill the HAVE_PTR__NPTL_SETXID guarded snippets. --- sysdeps/unix/sysv/linux/alpha/setregid.c | 26 ++------------------- sysdeps/unix/sysv/linux/alpha/setresgid.c | 28 +++-------------------- sysdeps/unix/sysv/linux/alpha/setresuid.c | 28 +++-------------------- sysdeps/unix/sysv/linux/alpha/setreuid.c | 26 ++------------------- 4 files changed, 10 insertions(+), 98 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/setregid.c b/sysdeps/unix/sysv/linux/alpha/setregid.c index cfc8283c3a..0973fe4ac1 100644 --- a/sysdeps/unix/sysv/linux/alpha/setregid.c +++ b/sysdeps/unix/sysv/linux/alpha/setregid.c @@ -18,35 +18,13 @@ #include #include -#include - -#include -#include - -#include -#include "kernel-features.h" -#include +#include int __setregid (gid_t rgid, gid_t egid) { - int result; - - result = INLINE_SYSCALL (setregid, 2, (signed int)rgid, (signed int)egid); - -#if defined HAVE_PTR__NPTL_SETXID && !defined SINGLE_THREAD - if (result == 0 && __libc_pthread_functions.ptr__nptl_setxid != NULL) - { - struct xid_command cmd; - cmd.syscall_no = __NR_setregid; - cmd.id[0] = rgid; - cmd.id[1] = egid; - __libc_pthread_functions.ptr__nptl_setxid (&cmd); - } -#endif - - return result; + return INLINE_SETXID_SYSCALL (setregid, 2, (int) rgid, (int) egid); } #ifndef __setregid weak_alias (__setregid, setregid) diff --git a/sysdeps/unix/sysv/linux/alpha/setresgid.c b/sysdeps/unix/sysv/linux/alpha/setresgid.c index fdfa486534..50e29e3c76 100644 --- a/sysdeps/unix/sysv/linux/alpha/setresgid.c +++ b/sysdeps/unix/sysv/linux/alpha/setresgid.c @@ -18,36 +18,14 @@ #include #include -#include - -#include -#include - -#include -#include "kernel-features.h" -#include +#include int __setresgid (gid_t rgid, gid_t egid, gid_t sgid) { - int result; - - result = INLINE_SYSCALL (setresgid, 3, (signed int)rgid, (signed int)egid, (signed int)sgid); - -#if defined HAVE_PTR__NPTL_SETXID && !defined SINGLE_THREAD - if (result == 0 && __libc_pthread_functions.ptr__nptl_setxid != NULL) - { - struct xid_command cmd; - cmd.syscall_no = __NR_setresgid; - cmd.id[0] = rgid; - cmd.id[1] = egid; - cmd.id[2] = sgid; - __libc_pthread_functions.ptr__nptl_setxid (&cmd); - } -#endif - - return result; + return INLINE_SETXID_SYSCALL (setresgid, 3, (int) rgid, + (int) egid, (int) sgid); } libc_hidden_def (__setresgid) #ifndef __setresgid diff --git a/sysdeps/unix/sysv/linux/alpha/setresuid.c b/sysdeps/unix/sysv/linux/alpha/setresuid.c index 49671278ee..e76413bf6a 100644 --- a/sysdeps/unix/sysv/linux/alpha/setresuid.c +++ b/sysdeps/unix/sysv/linux/alpha/setresuid.c @@ -18,36 +18,14 @@ #include #include -#include - -#include -#include - -#include -#include "kernel-features.h" -#include +#include int __setresuid (uid_t ruid, uid_t euid, uid_t suid) { - int result; - - result = INLINE_SYSCALL (setresuid, 3, (signed int)ruid, (signed int)euid, (signed int)suid); - -#if defined HAVE_PTR__NPTL_SETXID && !defined SINGLE_THREAD - if (result == 0 && __libc_pthread_functions.ptr__nptl_setxid != NULL) - { - struct xid_command cmd; - cmd.syscall_no = __NR_setresuid; - cmd.id[0] = ruid; - cmd.id[1] = euid; - cmd.id[2] = suid; - __libc_pthread_functions.ptr__nptl_setxid (&cmd); - } -#endif - - return result; + return INLINE_SETXID_SYSCALL (setresuid, 3, (int) ruid, + (int) euid, (int) suid); } libc_hidden_def (__setresuid) #ifndef __setresuid diff --git a/sysdeps/unix/sysv/linux/alpha/setreuid.c b/sysdeps/unix/sysv/linux/alpha/setreuid.c index b29aed479e..a23a34792e 100644 --- a/sysdeps/unix/sysv/linux/alpha/setreuid.c +++ b/sysdeps/unix/sysv/linux/alpha/setreuid.c @@ -18,35 +18,13 @@ #include #include -#include - -#include -#include - -#include -#include "kernel-features.h" -#include +#include int __setreuid (uid_t ruid, uid_t euid) { - int result; - - result = INLINE_SYSCALL (setreuid, 2, (signed int)ruid, (signed int)euid); - -#if defined HAVE_PTR__NPTL_SETXID && !defined SINGLE_THREAD - if (result == 0 && __libc_pthread_functions.ptr__nptl_setxid != NULL) - { - struct xid_command cmd; - cmd.syscall_no = __NR_setreuid; - cmd.id[0] = ruid; - cmd.id[1] = euid; - __libc_pthread_functions.ptr__nptl_setxid (&cmd); - } -#endif - - return result; + return INLINE_SETXID_SYSCALL (setreuid, 2, (int) ruid, (int) euid); } #ifndef __setreuid weak_alias (__setreuid, setreuid) From 8608e6698db7fe9c01d79164a406c6770b0cb897 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 19 Nov 2004 00:01:25 +0000 Subject: [PATCH 3382/4487] (TRAMPOLINE_TEMPLATE): Add unwind annotations. --- sysdeps/hppa/dl-machine.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h index bc9ed107b8..d29501d306 100644 --- a/sysdeps/hppa/dl-machine.h +++ b/sysdeps/hppa/dl-machine.h @@ -495,6 +495,9 @@ asm ( \ " .globl " #tramp_name "\n" \ " .type " #tramp_name ",@function\n" \ #tramp_name ":\n" \ + " .proc\n" \ + " .callinfo frame=64,calls,save_rp\n" \ + " .entry\n" \ /* Save return pointer */ \ " stw %r2,-20(%sp)\n" \ /* Save argument registers in the call stack frame. */ \ @@ -526,7 +529,8 @@ asm ( \ " bv %r0(%r22)\n" \ /* Return pointer. */ \ " ldw -20(%sp),%r2\n" \ - ); + " .exit\n" \ + " .procend\n"); #ifndef PROF #define ELF_MACHINE_RUNTIME_TRAMPOLINE \ From 56eb7d3add62e27e798c4610856cd9fffe4b2d0e Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 22 Nov 2004 12:47:50 +0000 Subject: [PATCH 3383/4487] * sysdeps/unix/sysv/linux/mips/bits/siginfo.h (__SI_MAX_SIZE): Define appropriately based on __WORDSIZE. [struct siginfo] (__pad0): Add for explicit padding. * sysdeps/unix/sysv/linux/mips/bits/siginfo.h: Formatting fixes throughout. --- sysdeps/unix/sysv/linux/mips/bits/siginfo.h | 22 +++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h index 629a055640..54eba41d6e 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h +++ b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h @@ -1,5 +1,6 @@ /* siginfo_t, sigevent and constants. Linux/MIPS version. - Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004 + 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 @@ -22,6 +23,8 @@ # error "Never include this file directly. Use instead" #endif +#include + #if (!defined __have_sigval_t \ && (defined _SIGNAL_H || defined __need_siginfo_t \ || defined __need_sigevent_t)) @@ -39,8 +42,13 @@ typedef union sigval && (defined _SIGNAL_H || defined __need_siginfo_t)) # define __have_siginfo_t 1 -# define __SI_MAX_SIZE 128 -# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3) +# define __SI_MAX_SIZE 128 +# if __WORDSIZE == 64 +# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 4) +# else +# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3) +# endif + typedef struct siginfo { @@ -48,6 +56,8 @@ typedef struct siginfo int si_code; /* Signal code. */ int si_errno; /* If non-zero, an errno value associated with this signal, as defined in . */ + int __pad0[__SI_MAX_SIZE / sizeof (int) - __SI_PAD_SIZE - 3]; + /* Explicit padding. */ union { @@ -121,9 +131,9 @@ enum { SI_ASYNCNL = -60, /* Sent by asynch name lookup completion. */ # define SI_ASYNCNL SI_ASYNCNL - SI_TKILL = -6, /* Sent by tkill. */ + SI_TKILL = -6, /* Sent by tkill. */ # define SI_TKILL SI_TKILL - SI_SIGIO, /* Sent by queued SIGIO. */ + SI_SIGIO, /* Sent by queued SIGIO. */ # define SI_SIGIO SI_SIGIO SI_MESGQ, /* Sent by real time mesq state change. */ # define SI_MESGQ SI_MESGQ @@ -149,7 +159,7 @@ enum # define ILL_ILLOPN ILL_ILLOPN ILL_ILLADR, /* Illegal addressing mode. */ # define ILL_ILLADR ILL_ILLADR - ILL_ILLTRP, /* Illegal trap. */ + ILL_ILLTRP, /* Illegal trap. */ # define ILL_ILLTRP ILL_ILLTRP ILL_PRVOPC, /* Privileged opcode. */ # define ILL_PRVOPC ILL_PRVOPC From b8ddf7a11ff27cc513fa12841fcbbfcba6d47426 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 24 Nov 2004 04:36:11 +0000 Subject: [PATCH 3384/4487] Include . Use _ABIO32, _ABIN32 and _ABI64 for ABI selection throughout. --- sysdeps/mips/dl-machine.h | 16 ++++++++-------- sysdeps/mips/elf/start.S | 7 ++++--- sysdeps/mips/mips64/__longjmp.c | 3 ++- sysdeps/mips/mips64/bsd-_setjmp.S | 6 ++++-- sysdeps/mips/mips64/bsd-setjmp.S | 5 +++-- sysdeps/mips/mips64/setjmp.S | 8 +++++--- sysdeps/mips/mips64/setjmp_aux.c | 3 ++- sysdeps/mips/sys/regdef.h | 10 ++++++---- sysdeps/mips/sys/ucontext.h | 9 +++++---- sysdeps/unix/mips/sysdep.h | 5 +++-- sysdeps/unix/sysv/linux/mips/pread.c | 7 ++++--- sysdeps/unix/sysv/linux/mips/pread64.c | 5 +++-- sysdeps/unix/sysv/linux/mips/ptrace.c | 3 ++- sysdeps/unix/sysv/linux/mips/pwrite.c | 7 ++++--- sysdeps/unix/sysv/linux/mips/pwrite64.c | 5 +++-- sysdeps/unix/sysv/linux/mips/sigaction.c | 9 +++++---- sysdeps/unix/sysv/linux/mips/sys/procfs.h | 7 ++++--- sysdeps/unix/sysv/linux/mips/sys/ucontext.h | 5 ++--- 18 files changed, 69 insertions(+), 51 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 49fdffb93d..0d87b65691 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -32,6 +32,7 @@ #error ENTRY_POINT needs to be defined for MIPS. #endif +#include #include /* The offset of gp from GOT might be system-dependent. It's set by @@ -74,10 +75,9 @@ do { if ((l)->l_info[DT_MIPS (RLD_MAP)]) \ static inline int __attribute_used__ elf_machine_matches_host (const ElfW(Ehdr) *ehdr) { -#if _MIPS_SIM == _MIPS_SIM_ABI32 || _MIPS_SIM == _MIPS_SIM_NABI32 +#if _MIPS_SIM == _ABIO32 || _MIPS_SIM == _ABIN32 /* Don't link o32 and n32 together. */ - if (((ehdr->e_flags & EF_MIPS_ABI2) != 0) - != (_MIPS_SIM != _MIPS_SIM_ABI32)) + if (((ehdr->e_flags & EF_MIPS_ABI2) != 0) != (_MIPS_SIM == _ABIN32)) return 0; #endif @@ -130,7 +130,7 @@ elf_machine_load_address (void) } /* The MSB of got[1] of a gnu object is set to identify gnu objects. */ -#if _MIPS_SIM == _MIPS_SIM_ABI64 +#if _MIPS_SIM == _ABI64 # define ELF_MIPS_GNU_GOT1_MASK 0x8000000000000000L #else # define ELF_MIPS_GNU_GOT1_MASK 0x80000000L @@ -257,7 +257,7 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc) return NULL; } -#if _MIPS_SIM == _MIPS_SIM_ABI32 +#if _MIPS_SIM == _ABIO32 #define ELF_DL_FRAME_SIZE 40 #define ELF_DL_SAVE_ARG_REGS "\ @@ -278,7 +278,7 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc) #define IFABIO32(X) X -#else /* _MIPS_SIM == _MIPS_SIM_NABI32 || _MIPS_SIM == _MIPS_SIM_ABI64 */ +#else /* _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64 */ #define ELF_DL_FRAME_SIZE 80 @@ -550,7 +550,7 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, switch (r_type) { -#if _MIPS_SIM == _MIPS_SIM_ABI64 +#if _MIPS_SIM == _ABI64 case (R_MIPS_64 << 8) | R_MIPS_REL32: #else case R_MIPS_REL32: @@ -615,7 +615,7 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, break; case R_MIPS_NONE: /* Alright, Wilbur. */ break; -#if _MIPS_SIM == _MIPS_SIM_ABI64 +#if _MIPS_SIM == _ABI64 case R_MIPS_64: /* For full compliance with the ELF64 ABI, one must precede the _REL32/_64 pair of relocations with a _64 relocation, such diff --git a/sysdeps/mips/elf/start.S b/sysdeps/mips/elf/start.S index 3dd513777d..d9cc3b7ee2 100644 --- a/sysdeps/mips/elf/start.S +++ b/sysdeps/mips/elf/start.S @@ -1,5 +1,5 @@ /* Startup code compliant to the ELF Mips ABI. - Copyright (C) 1995, 1997, 2000, 2001, 2002, 2003 + Copyright (C) 1995, 1997, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -37,6 +37,7 @@ #define __ASSEMBLY__ 1 #include +#include #include #ifndef ENTRY_POINT @@ -93,12 +94,12 @@ ENTRY_POINT: on o32 and quad words (16 bytes) on n32 and n64. */ and $29, -2 * SZREG -#if _MIPS_SIM == _MIPS_SIM_ABI32 +#if _MIPS_SIM == _ABIO32 PTR_SUBIU $29, 32 #endif PTR_LA $7, __libc_csu_init /* init */ PTR_LA $8, __libc_csu_fini -#if _MIPS_SIM == _MIPS_SIM_ABI32 +#if _MIPS_SIM == _ABIO32 PTR_S $8, 16($29) /* fini */ PTR_S $2, 20($29) /* rtld_fini */ PTR_S $29, 24($29) /* stack_end */ diff --git a/sysdeps/mips/mips64/__longjmp.c b/sysdeps/mips/mips64/__longjmp.c index b2705793b2..546493f842 100644 --- a/sysdeps/mips/mips64/__longjmp.c +++ b/sysdeps/mips/mips64/__longjmp.c @@ -19,6 +19,7 @@ 02111-1307 USA. */ #include +#include #include #undef __longjmp @@ -39,7 +40,7 @@ __longjmp (env, val_arg) register int val asm ("a1"); /* Pull back the floating point callee-saved registers. */ -#if _MIPS_SIM == _MIPS_SIM_ABI64 +#if _MIPS_SIM == _ABI64 asm volatile ("l.d $f24, %0" : : "m" (env[0].__fpregs[0])); asm volatile ("l.d $f25, %0" : : "m" (env[0].__fpregs[1])); asm volatile ("l.d $f26, %0" : : "m" (env[0].__fpregs[2])); diff --git a/sysdeps/mips/mips64/bsd-_setjmp.S b/sysdeps/mips/mips64/bsd-_setjmp.S index 73f5cc2de2..7620cf391f 100644 --- a/sysdeps/mips/mips64/bsd-_setjmp.S +++ b/sysdeps/mips/mips64/bsd-_setjmp.S @@ -1,5 +1,6 @@ /* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. MIPS64 version. - Copyright (C) 1996, 1997, 2000, 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 2000, 2002, 2003, 2004 + 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 @@ -21,6 +22,7 @@ We cannot do it in C because it must be a tail-call, so frame-unwinding in setjmp doesn't clobber the state restored by longjmp. */ +#include #include #include @@ -33,7 +35,7 @@ ENTRY (_setjmp) #endif SETUP_GP64 (v0, C_SYMBOL_NAME (_setjmp)) PTR_LA t9, C_SYMBOL_NAME (__sigsetjmp) -#if _MIPS_SIM == _MIPS_SIM_ABI32 +#if _MIPS_SIM == _ABIO32 nop #endif RESTORE_GP64 diff --git a/sysdeps/mips/mips64/bsd-setjmp.S b/sysdeps/mips/mips64/bsd-setjmp.S index f542cb565f..2a1fd9ce71 100644 --- a/sysdeps/mips/mips64/bsd-setjmp.S +++ b/sysdeps/mips/mips64/bsd-setjmp.S @@ -1,5 +1,5 @@ /* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. MIPS64 version. - Copyright (C) 1996, 1997, 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 2002, 2003, 2004 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 @@ -21,6 +21,7 @@ We cannot do it in C because it must be a tail-call, so frame-unwinding in setjmp doesn't clobber the state restored by longjmp. */ +#include #include #include @@ -33,7 +34,7 @@ ENTRY (setjmp) #endif SETUP_GP64 (v0, C_SYMBOL_NAME (setjmp)) PTR_LA t9, C_SYMBOL_NAME (__sigsetjmp) -#if _MIPS_SIM == _MIPS_SIM_ABI32 +#if _MIPS_SIM == _ABIO32 nop #endif RESTORE_GP64 diff --git a/sysdeps/mips/mips64/setjmp.S b/sysdeps/mips/mips64/setjmp.S index d566921a87..bdfd9cd51c 100644 --- a/sysdeps/mips/mips64/setjmp.S +++ b/sysdeps/mips/mips64/setjmp.S @@ -1,4 +1,5 @@ -/* Copyright (C) 1996, 1997, 2000, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 2000, 2002, 2003, 2004 + 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 @@ -16,6 +17,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include #include #include @@ -33,11 +35,11 @@ ENTRY (__sigsetjmp) move a2, sp move a3, fp PTR_LA t9, __sigsetjmp_aux -#if _MIPS_SIM == _MIPS_SIM_ABI32 +#if _MIPS_SIM == _ABIO32 nop #endif RESTORE_GP64 -#if _MIPS_SIM != _MIPS_SIM_ABI32 +#if _MIPS_SIM != _ABIO32 move a4, gp #endif jr t9 diff --git a/sysdeps/mips/mips64/setjmp_aux.c b/sysdeps/mips/mips64/setjmp_aux.c index b5afd14cbf..26b4739c32 100644 --- a/sysdeps/mips/mips64/setjmp_aux.c +++ b/sysdeps/mips/mips64/setjmp_aux.c @@ -18,6 +18,7 @@ 02111-1307 USA. */ #include +#include /* This function is only called via the assembly language routine __sigsetjmp, which arranges to pass in the stack pointer and the frame @@ -29,7 +30,7 @@ __sigsetjmp_aux (jmp_buf env, int savemask, long long sp, long long fp, long long gp) { /* Store the floating point callee-saved registers... */ -#if _MIPS_SIM == _MIPS_SIM_ABI64 +#if _MIPS_SIM == _ABI64 asm volatile ("s.d $f24, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[0])); asm volatile ("s.d $f25, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[1])); asm volatile ("s.d $f26, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[2])); diff --git a/sysdeps/mips/sys/regdef.h b/sysdeps/mips/sys/regdef.h index 9d2c4c1c4c..8fb898a2d0 100644 --- a/sysdeps/mips/sys/regdef.h +++ b/sysdeps/mips/sys/regdef.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ralf Baechle . @@ -20,6 +20,8 @@ #ifndef _SYS_REGDEF_H #define _SYS_REGDEF_H +#include + /* * Symbolic register names for 32 bit ABI */ @@ -31,7 +33,7 @@ #define a1 $5 #define a2 $6 #define a3 $7 -#if _MIPS_SIM != _MIPS_SIM_ABI32 +#if _MIPS_SIM != _ABIO32 #define a4 $8 #define a5 $9 #define a6 $10 @@ -44,7 +46,7 @@ #define ta1 a5 #define ta2 a6 #define ta3 a7 -#else /* if _MIPS_SIM == _MIPS_SIM_ABI32 */ +#else /* if _MIPS_SIM == _ABIO32 */ #define t0 $8 /* caller saved */ #define t1 $9 #define t2 $10 @@ -57,7 +59,7 @@ #define ta1 t5 #define ta2 t6 #define ta3 t7 -#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ +#endif /* _MIPS_SIM == _ABIO32 */ #define s0 $16 /* callee saved */ #define s1 $17 #define s2 $18 diff --git a/sysdeps/mips/sys/ucontext.h b/sysdeps/mips/sys/ucontext.h index 90aa09a80f..fe378e94cd 100644 --- a/sysdeps/mips/sys/ucontext.h +++ b/sysdeps/mips/sys/ucontext.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999, 2002, 2003, 2004 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 @@ -22,10 +22,11 @@ #define _SYS_UCONTEXT_H 1 #include +#include #include /* Type for general register. */ -#if _MIPS_SIM == _MIPS_SIM_ABI32 +#if _MIPS_SIM == _ABIO32 typedef __uint32_t greg_t; #else typedef __uint64_t greg_t; @@ -119,7 +120,7 @@ typedef struct fpregset { union { -#if _MIPS_SIM == _MIPS_SIM_ABI32 +#if _MIPS_SIM == _ABIO32 double fp_dregs[16]; float fp_fregs[32]; unsigned int fp_regs[32]; @@ -143,7 +144,7 @@ typedef struct /* Userlevel context. */ typedef struct ucontext { -#if _MIPS_SIM == _MIPS_SIM_ABI32 +#if _MIPS_SIM == _ABIO32 unsigned long int uc_flags; #else __uint64_t uc_flags; diff --git a/sysdeps/unix/mips/sysdep.h b/sysdeps/unix/mips/sysdep.h index 9302710efa..714830147d 100644 --- a/sysdeps/unix/mips/sysdep.h +++ b/sysdeps/unix/mips/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1995, 1997, 1999, 2000, 2002, 2003 +/* Copyright (C) 1992, 1995, 1997, 1999, 2000, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -18,6 +18,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include #include #ifdef __ASSEMBLER__ @@ -69,7 +70,7 @@ /* The mips move insn is d,s. */ #define MOVE(x,y) move y , x -#if _MIPS_SIM == _MIPS_SIM_ABI32 || _MIPS_SIM == _MIPS_SIM_ABIO64 +#if _MIPS_SIM == _ABIO32 # define L(label) $L ## label #else # define L(label) .L ## label diff --git a/sysdeps/unix/sysv/linux/mips/pread.c b/sysdeps/unix/sysv/linux/mips/pread.c index 8fba0340b8..d0947bea42 100644 --- a/sysdeps/unix/sysv/linux/mips/pread.c +++ b/sysdeps/unix/sysv/linux/mips/pread.c @@ -20,6 +20,7 @@ #include #include +#include #include #include @@ -55,14 +56,14 @@ __libc_pread (fd, buf, count, offset) { ssize_t result; -#if _MIPS_SIM != _MIPS_SIM_ABI64 +#if _MIPS_SIM != _ABI64 assert (sizeof (offset) == 4); #endif if (SINGLE_THREAD_P) { /* First try the syscall. */ -#if _MIPS_SIM == _MIPS_SIM_NABI32 || _MIPS_SIM == _MIPS_SIM_ABI64 +#if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64 result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count, offset); #else @@ -80,7 +81,7 @@ __libc_pread (fd, buf, count, offset) int oldtype = LIBC_CANCEL_ASYNC (); /* First try the syscall. */ -#if _MIPS_SIM == _MIPS_SIM_NABI32 || _MIPS_SIM_ABI64 +#if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64 result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count, offset); #else result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, diff --git a/sysdeps/unix/sysv/linux/mips/pread64.c b/sysdeps/unix/sysv/linux/mips/pread64.c index 238c8e0d8b..e8a45da5b1 100644 --- a/sysdeps/unix/sysv/linux/mips/pread64.c +++ b/sysdeps/unix/sysv/linux/mips/pread64.c @@ -19,6 +19,7 @@ 02111-1307 USA. */ #include +#include #include #include @@ -58,7 +59,7 @@ __libc_pread64 (fd, buf, count, offset) if (SINGLE_THREAD_P) { /* First try the syscall. */ -#if _MIPS_SIM == _MIPS_SIM_NABI32 || _MIPS_SIM == _MIPS_SIM_ABI64 +#if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64 result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count, offset); #else @@ -77,7 +78,7 @@ __libc_pread64 (fd, buf, count, offset) int oldtype = LIBC_CANCEL_ASYNC (); /* First try the syscall. */ -#if _MIPS_SIM == _MIPS_SIM_NABI32 || _MIPS_SIM == _MIPS_SIM_ABI64 +#if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64 result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count, offset); #else result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, diff --git a/sysdeps/unix/sysv/linux/mips/ptrace.c b/sysdeps/unix/sysv/linux/mips/ptrace.c index af8266d78f..19d7c2d927 100644 --- a/sysdeps/unix/sysv/linux/mips/ptrace.c +++ b/sysdeps/unix/sysv/linux/mips/ptrace.c @@ -18,6 +18,7 @@ 02111-1307 USA. */ #include +#include #include #include #include @@ -28,7 +29,7 @@ #include #include -#if _MIPS_SIM == _MIPS_SIM_NABI32 +#if _MIPS_SIM == _ABIN32 __extension__ typedef long long int reg_type; #else typedef long int reg_type; diff --git a/sysdeps/unix/sysv/linux/mips/pwrite.c b/sysdeps/unix/sysv/linux/mips/pwrite.c index d0e3fe538e..130515af6d 100644 --- a/sysdeps/unix/sysv/linux/mips/pwrite.c +++ b/sysdeps/unix/sysv/linux/mips/pwrite.c @@ -20,6 +20,7 @@ #include #include +#include #include #include @@ -55,14 +56,14 @@ __libc_pwrite (fd, buf, count, offset) { ssize_t result; -#if _MIPS_SIM == _MIPS_SIM_ABI64 +#if _MIPS_SIM != _ABI64 assert (sizeof (offset) == 4); #endif if (SINGLE_THREAD_P) { /* First try the syscall. */ -#if _MIPS_SIM == _MIPS_SIM_NABI32 || _MIPS_SIM == _MIPS_SIM_ABI64 +#if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64 result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count, offset); #else @@ -80,7 +81,7 @@ __libc_pwrite (fd, buf, count, offset) int oldtype = LIBC_CANCEL_ASYNC (); /* First try the syscall. */ -#if _MIPS_SIM == _MIPS_SIM_NABI32 || _MIPS_SIM == _MIPS_SIM_ABI64 +#if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64 result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count, offset); #else result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0, diff --git a/sysdeps/unix/sysv/linux/mips/pwrite64.c b/sysdeps/unix/sysv/linux/mips/pwrite64.c index 109b2c5946..e4908fa779 100644 --- a/sysdeps/unix/sysv/linux/mips/pwrite64.c +++ b/sysdeps/unix/sysv/linux/mips/pwrite64.c @@ -19,6 +19,7 @@ 02111-1307 USA. */ #include +#include #include #include @@ -54,7 +55,7 @@ __libc_pwrite64 (fd, buf, count, offset) if (SINGLE_THREAD_P) { /* First try the syscall. */ -#if _MIPS_SIM == _MIPS_SIM_NABI32 || _MIPS_SIM == _MIPS_SIM_ABI64 +#if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64 result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count, offset); #else @@ -74,7 +75,7 @@ __libc_pwrite64 (fd, buf, count, offset) int oldtype = LIBC_CANCEL_ASYNC (); /* First try the syscall. */ -#if _MIPS_SIM == _MIPS_SIM_NABI32 || _MIPS_SIM == _MIPS_SIM_ABI64 +#if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64 result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count, offset); #else result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0, diff --git a/sysdeps/unix/sysv/linux/mips/sigaction.c b/sysdeps/unix/sysv/linux/mips/sigaction.c index 83b71debc9..09fbe79316 100644 --- a/sysdeps/unix/sysv/linux/mips/sigaction.c +++ b/sysdeps/unix/sysv/linux/mips/sigaction.c @@ -18,6 +18,7 @@ 02111-1307 USA. */ #include +#include #include #include @@ -40,7 +41,7 @@ int __libc_missing_rt_sigs; #endif -#if _MIPS_SIM != _MIPS_SIM_ABI32 +#if _MIPS_SIM != _ABIO32 # ifdef __NR_rt_sigreturn static void restore_rt (void) asm ("__restore_rt"); @@ -82,7 +83,7 @@ __libc_sigaction (sig, act, oact) memcpy (&kact.sa_mask, &act->sa_mask, sizeof (kernel_sigset_t)); kact.sa_flags = act->sa_flags; # ifdef HAVE_SA_RESTORER -# if _MIPS_SIM == _MIPS_SIM_ABI32 +# if _MIPS_SIM == _ABIO32 kact.sa_restorer = act->sa_restorer; # else kact.sa_restorer = &restore_rt; @@ -140,7 +141,7 @@ __libc_sigaction (sig, act, oact) oact->sa_mask.__val[0] = k_osigact.sa_mask; oact->sa_flags = k_osigact.sa_flags; # ifdef HAVE_SA_RESTORER -# if _MIPS_SIM == _MIPS_SIM_ABI32 +# if _MIPS_SIM == _ABIO32 oact->sa_restorer = k_osigact.sa_restorer; # else oact->sa_restorer = &restore; @@ -177,7 +178,7 @@ asm \ ); /* The return code for realtime-signals. */ -#if _MIPS_SIM != _MIPS_SIM_ABI32 +#if _MIPS_SIM != _ABIO32 # ifdef __NR_rt_sigreturn RESTORE (restore_rt, __NR_rt_sigreturn) # endif diff --git a/sysdeps/unix/sysv/linux/mips/sys/procfs.h b/sysdeps/unix/sysv/linux/mips/sys/procfs.h index cb84677175..2bf07be3e9 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/mips/sys/procfs.h @@ -25,6 +25,7 @@ used on Linux. */ #include +#include #include #include #include @@ -34,7 +35,7 @@ #define ELF_NGREG 45 #define ELF_NFPREG 33 -#if _MIPS_SIM == _MIPS_SIM_NABI32 +#if _MIPS_SIM == _ABIN32 __extension__ typedef unsigned long long elf_greg_t; #else typedef unsigned long elf_greg_t; @@ -65,7 +66,7 @@ struct elf_prstatus { struct elf_siginfo pr_info; /* Info associated with signal. */ short int pr_cursig; /* Current signal. */ -#if _MIPS_SIM == _MIPS_SIM_NABI32 +#if _MIPS_SIM == _ABIN32 __extension__ unsigned long long int pr_sigpend; __extension__ unsigned long long int pr_sighold; #else @@ -93,7 +94,7 @@ struct elf_prpsinfo char pr_sname; /* Char for pr_state. */ char pr_zomb; /* Zombie. */ char pr_nice; /* Nice val. */ -#if _MIPS_SIM == _MIPS_SIM_NABI32 +#if _MIPS_SIM == _ABIN32 __extension__ unsigned long long int pr_flag; #else unsigned long int pr_flag; /* Flags. */ diff --git a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h index c03566b1ff..ddb499f20c 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h @@ -22,14 +22,13 @@ #define _SYS_UCONTEXT_H 1 #include +#include #include /* We need the signal context definitions even if they are not used included in . */ #include -#include - /* Type for general register. Even in o32 we assume 64-bit registers, like the kernel. */ __extension__ typedef unsigned long long int greg_t; @@ -54,7 +53,7 @@ typedef struct fpregset { /* Context to describe whole processor state. */ -#if _MIPS_SIM == _MIPS_SIM_ABI32 +#if _MIPS_SIM == _ABIO32 /* Earlier versions of glibc for mips had an entirely different definition of mcontext_t, that didn't even resemble the corresponding kernel data structure. Since all legitimate uses of From 73a227e20020c9505c7fd1c66c37ffa9097f5e11 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 24 Nov 2004 04:37:35 +0000 Subject: [PATCH 3385/4487] Use _ABIO32, _ABIN32 and _ABI64 for ABI selection throughout. --- sysdeps/mips/atomicity.h | 10 +++---- sysdeps/mips/bits/setjmp.h | 4 +-- sysdeps/mips/fpu/bits/mathdef.h | 2 +- sysdeps/mips/machine-gmon.h | 6 ++-- sysdeps/mips/sys/asm.h | 28 +++++++++---------- sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 6 ++-- .../unix/sysv/linux/mips/bits/sigcontext.h | 6 ++-- sysdeps/unix/sysv/linux/mips/bits/stat.h | 2 +- sysdeps/unix/sysv/linux/mips/kernel_stat.h | 2 +- sysdeps/unix/sysv/linux/mips/sigcontextinfo.h | 2 +- sysdeps/unix/sysv/linux/mips/sys/ptrace.h | 2 +- sysdeps/unix/sysv/linux/mips/sys/tas.h | 3 +- sysdeps/unix/sysv/linux/mips/sys/user.h | 8 +++--- 13 files changed, 40 insertions(+), 41 deletions(-) diff --git a/sysdeps/mips/atomicity.h b/sysdeps/mips/atomicity.h index f3d05bd50e..7380e1000c 100644 --- a/sysdeps/mips/atomicity.h +++ b/sysdeps/mips/atomicity.h @@ -33,7 +33,7 @@ exchange_and_add (volatile uint32_t *mem, int val) ("/* Inline exchange & add */\n" "1:\n\t" ".set push\n\t" -#if _MIPS_SIM == _MIPS_SIM_ABI32 +#if _MIPS_SIM == _ABIO32 ".set mips2\n\t" #endif "ll %0,%3\n\t" @@ -59,7 +59,7 @@ atomic_add (volatile uint32_t *mem, int val) ("/* Inline atomic add */\n" "1:\n\t" ".set push\n\t" -#if _MIPS_SIM == _MIPS_SIM_ABI32 +#if _MIPS_SIM == _ABIO32 ".set mips2\n\t" #endif "ll %0,%2\n\t" @@ -83,10 +83,10 @@ compare_and_swap (volatile long int *p, long int oldval, long int newval) ("/* Inline compare & swap */\n" "1:\n\t" ".set push\n\t" -#if _MIPS_SIM == _MIPS_SIM_ABI32 +#if _MIPS_SIM == _ABIO32 ".set mips2\n\t" #endif -#if _MIPS_SIM == _MIPS_SIM_ABI64 +#if _MIPS_SIM == _ABI64 "lld %1,%5\n\t" #else "ll %1,%5\n\t" @@ -94,7 +94,7 @@ compare_and_swap (volatile long int *p, long int oldval, long int newval) "move %0,$0\n\t" "bne %1,%3,2f\n\t" "move %0,%4\n\t" -#if _MIPS_SIM == _MIPS_SIM_ABI64 +#if _MIPS_SIM == _ABI64 "scd %0,%2\n\t" #else "sc %0,%2\n\t" diff --git a/sysdeps/mips/bits/setjmp.h b/sysdeps/mips/bits/setjmp.h index 4ca199d7b6..ec0aaa020d 100644 --- a/sysdeps/mips/bits/setjmp.h +++ b/sysdeps/mips/bits/setjmp.h @@ -26,7 +26,7 @@ typedef struct { -#if _MIPS_SIM == _MIPS_SIM_ABI32 +#if _MIPS_SIM == _ABIO32 /* Program counter. */ __ptr_t __pc; @@ -62,7 +62,7 @@ typedef struct int __fpc_csr; /* Callee-saved floating point registers. */ -#if _MIPS_SIM == _MIPS_SIM_ABI64 +#if _MIPS_SIM == _ABI64 double __fpregs[8]; #else double __fpregs[6]; diff --git a/sysdeps/mips/fpu/bits/mathdef.h b/sysdeps/mips/fpu/bits/mathdef.h index c1ce876bf7..99be0db2b5 100644 --- a/sysdeps/mips/fpu/bits/mathdef.h +++ b/sysdeps/mips/fpu/bits/mathdef.h @@ -39,7 +39,7 @@ typedef double double_t; /* `double' expressions are evaluated as #endif /* ISO C99 */ -#if ! defined __NO_LONG_DOUBLE_MATH && _MIPS_SIM == _MIPS_SIM_ABI32 +#if ! defined __NO_LONG_DOUBLE_MATH && _MIPS_SIM == _ABIO32 /* Signal that we do not really have a `long double'. This disables the declaration of all the `long double' function variants. */ # define __NO_LONG_DOUBLE_MATH 1 diff --git a/sysdeps/mips/machine-gmon.h b/sysdeps/mips/machine-gmon.h index f23a4c3008..7a089fa595 100644 --- a/sysdeps/mips/machine-gmon.h +++ b/sysdeps/mips/machine-gmon.h @@ -26,7 +26,7 @@ static void __attribute_used__ __mcount (u_long frompc, u_long selfpc) /* Call __mcount with the return PC for our caller, and the return PC our caller will return to. */ -#if _MIPS_SIM == _MIPS_SIM_ABI32 +#if _MIPS_SIM == _ABIO32 #ifdef __PIC__ # define CPLOAD ".cpload $25;" @@ -83,10 +83,10 @@ static void __attribute_used__ __mcount (u_long frompc, u_long selfpc) # define CPRETURN #endif -#if _MIPS_SIM == _MIPS_SIM_NABI32 +#if _MIPS_SIM == _ABIN32 # define PTR_ADDU_STRING "add" /* no u */ # define PTR_SUBU_STRING "sub" /* no u */ -#elif _MIPS_SIM == _MIPS_SIM_ABI64 +#elif _MIPS_SIM == _ABI64 # define PTR_ADDU_STRING "daddu" # define PTR_SUBU_STRING "dsubu" #else diff --git a/sysdeps/mips/sys/asm.h b/sysdeps/mips/sys/asm.h index 76f6af3e15..b04c36ba5e 100644 --- a/sysdeps/mips/sys/asm.h +++ b/sysdeps/mips/sys/asm.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ralf Baechle . @@ -37,11 +37,11 @@ * 64 bit address space isn't used yet, so we may use the R3000 32 bit * defines for now. */ -#if (_MIPS_SIM == _MIPS_SIM_ABI32) || (_MIPS_SIM == _MIPS_SIM_NABI32) +#if _MIPS_SIM == _ABIO32 || _MIPS_SIM == _ABIN32 # define PTR .word # define PTRSIZE 4 # define PTRLOG 2 -#elif (_MIPS_SIM == _MIPS_SIM_ABI64) +#elif _MIPS_SIM == _ABI64 # define PTR .dword # define PTRSIZE 8 # define PTRLOG 3 @@ -50,7 +50,7 @@ /* * PIC specific declarations */ -#if (_MIPS_SIM == _MIPS_SIM_ABI32) +#if _MIPS_SIM == _ABIO32 # ifdef __PIC__ # define CPRESTORE(register) \ .cprestore register @@ -97,7 +97,7 @@ l: \ # define SETUP_GPX64_L(cp_reg, ra_save, l) # define RESTORE_GP64 # define USE_ALT_CP(a) -#else /* (_MIPS_SIM == _MIPS_SIM_ABI64) || (_MIPS_SIM == _MIPS_SIM_NABI32) */ +#else /* _MIPS_SIM == _ABI64 || _MIPS_SIM == _ABIN32 */ /* * For callee-saved gp calling convention: */ @@ -131,15 +131,15 @@ l: \ /* Use alternate register for context pointer. */ # define USE_ALT_CP(reg) \ .cplocal reg -#endif /* _MIPS_SIM != _MIPS_SIM_ABI32 */ +#endif /* _MIPS_SIM != _ABIO32 */ /* * Stack Frame Definitions */ -#if (_MIPS_SIM == _MIPS_SIM_ABI32) +#if _MIPS_SIM == _ABIO32 # define NARGSAVE 4 /* Space for 4 argument registers must be allocated. */ #endif -#if (_MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32) +#if _MIPS_SIM == _ABI64 || _MIPS_SIM == _ABIN32 # define NARGSAVE 0 /* No caller responsibilities. */ #endif @@ -287,7 +287,7 @@ symbol = value /* * Stack alignment */ -#if (_MIPS_SIM == _MIPS_SIM_ABI64) || (_MIPS_SIM == _MIPS_SIM_NABI32) +#if _MIPS_SIM == _ABI64 || _MIPS_SIM == _ABIN32 # define ALSZ 15 # define ALMASK ~15 #else @@ -298,7 +298,7 @@ symbol = value /* * Size of a register */ -#if (_MIPS_SIM == _MIPS_SIM_ABI64) || (_MIPS_SIM == _MIPS_SIM_NABI32) +#if _MIPS_SIM == _ABI64 || _MIPS_SIM == _ABIN32 # define SZREG 8 #else # define SZREG 4 @@ -389,7 +389,7 @@ symbol = value /* * How to add/sub/load/store/shift pointers. */ -#if (_MIPS_SIM == _MIPS_SIM_ABI32 && _MIPS_SZPTR == 32) +#if (_MIPS_SIM == _ABIO32 && _MIPS_SZPTR == 32) # define PTR_ADD add # define PTR_ADDI addi # define PTR_ADDU addu @@ -411,7 +411,7 @@ symbol = value # define PTR_SCALESHIFT 2 #endif -#if _MIPS_SIM == _MIPS_SIM_NABI32 +#if _MIPS_SIM == _ABIN32 # define PTR_ADD add # define PTR_ADDI addi # define PTR_ADDU add /* no u */ @@ -433,8 +433,8 @@ symbol = value # define PTR_SCALESHIFT 2 #endif -#if (_MIPS_SIM == _MIPS_SIM_ABI32 && _MIPS_SZPTR == 64 /* o64??? */) \ - || _MIPS_SIM == _MIPS_SIM_ABI64 +#if (_MIPS_SIM == _ABIO32 && _MIPS_SZPTR == 64 /* o64??? */) \ + || _MIPS_SIM == _ABI64 # define PTR_ADD dadd # define PTR_ADDI daddi # define PTR_ADDU daddu diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index 550593b0e9..aa039b4c0e 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -22,8 +22,8 @@ # error "Never use directly; include instead." #endif -#include #include +#include /* open/fcntl - O_SYNC is only implemented on blocks devices and on files located on an ext2 file system */ @@ -144,7 +144,7 @@ typedef struct flock #ifndef __USE_FILE_OFFSET64 __off_t l_start; /* Offset where the lock begins. */ __off_t l_len; /* Size of the locked area; zero means until EOF. */ -#if _MIPS_SIM != _MIPS_SIM_ABI64 +#if _MIPS_SIM != _ABI64 /* The 64-bit flock structure, used by the n64 ABI, and for 64-bit fcntls in o32 and n32, never has this field. */ long int l_sysid; @@ -154,7 +154,7 @@ typedef struct flock __off64_t l_len; /* Size of the locked area; zero means until EOF. */ #endif __pid_t l_pid; /* Process holding the lock. */ -#if ! defined __USE_FILE_OFFSET64 && _MIPS_SIM != _MIPS_SIM_ABI64 +#if ! defined __USE_FILE_OFFSET64 && _MIPS_SIM != _ABI64 /* The 64-bit flock structure, used by the n64 ABI, and for 64-bit flock in o32 and n32, never has this field. */ long int pad[4]; diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h b/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h index 19f58812df..079964ed46 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h +++ b/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h @@ -34,7 +34,7 @@ licenses, the fact that the file is pasted, instead of included, doesn't really make any difference for the program that includes this header. */ -#if _MIPS_SIM == _MIPS_SIM_ABI32 +#if _MIPS_SIM == _ABIO32 /* * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive @@ -70,7 +70,7 @@ struct sigcontext { }; #endif /* _ASM_SIGCONTEXT_H */ -#else /* _MIPS_SIM != _MIPS_SIM_ABI32 */ +#else /* _MIPS_SIM != _ABIO32 */ /* * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive @@ -101,5 +101,5 @@ struct sigcontext { }; #endif /* _ASM_SIGCONTEXT_H */ -#endif /* _MIPS_SIM != _MIPS_SIM_ABI32 */ +#endif /* _MIPS_SIM != _ABIO32 */ #endif diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h index 2dd4cab85c..9ae38cd8d0 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/stat.h +++ b/sysdeps/unix/sysv/linux/mips/bits/stat.h @@ -36,7 +36,7 @@ #define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */ -#if _MIPS_SIM == _MIPS_SIM_ABI32 +#if _MIPS_SIM == _ABIO32 /* Structure describing file characteristics. */ struct stat { diff --git a/sysdeps/unix/sysv/linux/mips/kernel_stat.h b/sysdeps/unix/sysv/linux/mips/kernel_stat.h index 6a4c4093d8..cab1e7110e 100644 --- a/sysdeps/unix/sysv/linux/mips/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/mips/kernel_stat.h @@ -3,7 +3,7 @@ userland data structures are not identical, because of different padding. */ /* Definition of `struct stat' used in the kernel. */ -#if _MIPS_SIM != _MIPS_SIM_ABI32 +#if _MIPS_SIM != _ABIO32 struct kernel_stat { unsigned int st_dev; diff --git a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h index 2b50647c4c..f453c8d9b5 100644 --- a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h +++ b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h @@ -20,7 +20,7 @@ #include -#if _MIPS_SIM == _MIPS_SIM_ABI32 +#if _MIPS_SIM == _ABIO32 #define SIGCONTEXT unsigned long _code, struct sigcontext * #define SIGCONTEXT_EXTRA_ARGS _code, diff --git a/sysdeps/unix/sysv/linux/mips/sys/ptrace.h b/sysdeps/unix/sysv/linux/mips/sys/ptrace.h index 9badeb3a82..d05853da77 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/ptrace.h +++ b/sysdeps/unix/sysv/linux/mips/sys/ptrace.h @@ -124,7 +124,7 @@ enum __ptrace_request appear (those that are used for the particular request) as: pid_t PID, void *ADDR, int DATA, void *ADDR2 after REQUEST. */ -#if _MIPS_SIM == _MIPS_SIM_NABI32 +#if _MIPS_SIM == _ABIN32 __extension__ extern long long int ptrace (enum __ptrace_request __request, ...) __THROW; #else diff --git a/sysdeps/unix/sysv/linux/mips/sys/tas.h b/sysdeps/unix/sysv/linux/mips/sys/tas.h index 006e1614c7..e5180f9475 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/tas.h +++ b/sysdeps/unix/sysv/linux/mips/sys/tas.h @@ -21,7 +21,6 @@ #define _SYS_TAS_H 1 #include - #include __BEGIN_DECLS @@ -43,7 +42,7 @@ _test_and_set (int *p, int v) __THROW ("/* Inline test and set */\n" "1:\n\t" ".set push\n\t" -#if _MIPS_SIM == _MIPS_SIM_ABI32 +#if _MIPS_SIM == _ABIO32 ".set mips2\n\t" #endif "ll %0,%3\n\t" diff --git a/sysdeps/unix/sysv/linux/mips/sys/user.h b/sysdeps/unix/sysv/linux/mips/sys/user.h index dc3ee837d3..d5b3b0508b 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/user.h +++ b/sysdeps/unix/sysv/linux/mips/sys/user.h @@ -32,7 +32,7 @@ instead of included separately, doesn't change in any way the licensing status of a program that includes user.h. Since this is for gdb alone, and gdb is GPLed, no surprises here. */ -#if _MIPS_SIM == _MIPS_SIM_ABI32 +#if _MIPS_SIM == _ABIO32 /* * Various register offset definitions for debuggers, core file * examiners and whatnot. @@ -100,7 +100,7 @@ #endif /* __ASM_MIPS_REG_H */ -#else /* _MIPS_SIM != _MIPS_SIM_ABI32 */ +#else /* _MIPS_SIM != _ABIO32 */ /* * Various register offset definitions for debuggers, core file @@ -170,9 +170,9 @@ #endif /* _ASM_REG_H */ -#endif /* _MIPS_SIM != _MIPS_SIM_ABI32 */ +#endif /* _MIPS_SIM != _ABIO32 */ -#if _MIPS_SIM == _MIPS_SIM_ABI32 +#if _MIPS_SIM == _ABIO32 struct user { From 9b7b62e64d71eaae0f17376f2b0f173f844867f9 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 24 Nov 2004 04:37:58 +0000 Subject: [PATCH 3386/4487] Prevent from being included by kernel headers and undo its settings if already included. Define _ABIO32, _ABIN32 and _ABI64 if missing and use them to define _MIPS_SIM_ABI32, _MIPS_SIM_NABI32 and _MIPS_SIM_ABI64 for compatibility. --- sysdeps/mips/sgidefs.h | 45 +++++++++++++++++++++++++++++++++--------- 1 file changed, 36 insertions(+), 9 deletions(-) diff --git a/sysdeps/mips/sgidefs.h b/sysdeps/mips/sgidefs.h index 1d4893501e..74509fdbd0 100644 --- a/sysdeps/mips/sgidefs.h +++ b/sysdeps/mips/sgidefs.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ralf Baechle . @@ -20,6 +20,27 @@ #ifndef _SGIDEFS_H #define _SGIDEFS_H 1 +/* + * A crude hack to stop + */ +#undef __ASM_SGIDEFS_H +#define __ASM_SGIDEFS_H + +/* + * And remove any damage it might have already done + */ +#undef _MIPS_ISA_MIPS1 +#undef _MIPS_ISA_MIPS2 +#undef _MIPS_ISA_MIPS3 +#undef _MIPS_ISA_MIPS4 +#undef _MIPS_ISA_MIPS5 +#undef _MIPS_ISA_MIPS32 +#undef _MIPS_ISA_MIPS64 + +#undef _MIPS_SIM_ABI32 +#undef _MIPS_SIM_NABI32 +#undef _MIPS_SIM_ABI64 + /* * Definitions for the ISA level */ @@ -33,14 +54,20 @@ /* * Subprogram calling convention - * - * At the moment only _MIPS_SIM_ABI32 is in use. This will change rsn. - * Until GCC 2.8.0 is released don't rely on this definitions because the - * 64bit code is essentially using the 32bit interface model just with - * 64bit registers. */ -#define _MIPS_SIM_ABI32 1 -#define _MIPS_SIM_NABI32 2 -#define _MIPS_SIM_ABI64 3 +#ifndef _ABIO32 +# define _ABIO32 1 +#endif +#define _MIPS_SIM_ABI32 _ABIO32 + +#ifndef _ABIN32 +# define _ABIN32 2 +#endif +#define _MIPS_SIM_NABI32 _ABIN32 + +#ifndef _ABI64 +# define _ABI64 3 +#endif +#define _MIPS_SIM_ABI64 _ABI64 #endif /* sgidefs.h */ From 8de3c5f1fef94d96a1229a937ea04eb22051d5ab Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 24 Nov 2004 04:38:15 +0000 Subject: [PATCH 3387/4487] Use _ABIO32, _ABIN32 and _ABI64 for ABI selection in generated syscall-list.h --- sysdeps/unix/sysv/linux/mips/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile index db06a48405..d5e4f6b72d 100644 --- a/sysdeps/unix/sysv/linux/mips/Makefile +++ b/sysdeps/unix/sysv/linux/mips/Makefile @@ -28,10 +28,10 @@ $(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/mips/sys/s sed -n 's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p' \ > $(@:.d=.h).newt; \ if grep SYS_O32_ $(@:.d=.h).newt > /dev/null; then \ - echo '#if _MIPS_SIM == _MIPS_SIM_NABI32'; \ + echo '#if _MIPS_SIM == _ABIN32'; \ sed -n 's/^\(#define SYS_\)N32_/\1/p' < $(@:.d=.h).newt | \ LC_ALL=C sort; \ - echo '#elif _MIPS_SIM == _MIPS_SIM_ABI64'; \ + echo '#elif _MIPS_SIM == _ABI64'; \ sed -n 's/^\(#define SYS_\)N64_/\1/p' < $(@:.d=.h).newt | \ LC_ALL=C sort; \ echo '#else'; \ From ae9e3809f9e36e248ecade18a69220b851e5f1dd Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 24 Nov 2004 04:38:31 +0000 Subject: [PATCH 3388/4487] Use _ABIO32, _ABIN32 and _ABI64 for ABI selection in generated asm-unistd.h. --- sysdeps/unix/sysv/linux/mips/configure.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/configure.in b/sysdeps/unix/sysv/linux/mips/configure.in index 6783bc2b4a..67d965dfda 100644 --- a/sysdeps/unix/sysv/linux/mips/configure.in +++ b/sysdeps/unix/sysv/linux/mips/configure.in @@ -42,7 +42,7 @@ BEGIN { print "#include "; } name = $2; sub (/_O32_/, "_", name); print; - print "#if _MIPS_SIM == _MIPS_SIM_ABI32"; + print "#if _MIPS_SIM == _ABIO32"; print "# define " name " " $2; print "#endif"; next; @@ -51,7 +51,7 @@ BEGIN { print "#include "; } name = $2; sub (/_N32_/, "_", name); print; - print "#if _MIPS_SIM == _MIPS_SIM_NABI32"; + print "#if _MIPS_SIM == _ABIN32"; print "# define " name " " $2; print "#endif"; next; @@ -60,7 +60,7 @@ BEGIN { print "#include "; } name = $2; sub (/_N64_/, "_", name); print; - print "#if _MIPS_SIM == _MIPS_SIM_ABI64"; + print "#if _MIPS_SIM == _ABI64"; print "# define " name " " $2; print "#endif"; next; From 232e0cb8d69e482329be05bda516a6286bccf973 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 24 Nov 2004 04:42:45 +0000 Subject: [PATCH 3389/4487] Regenerate. --- sysdeps/unix/sysv/linux/mips/configure | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/configure b/sysdeps/unix/sysv/linux/mips/configure index 8ee636fb99..c081795aa1 100644 --- a/sysdeps/unix/sysv/linux/mips/configure +++ b/sysdeps/unix/sysv/linux/mips/configure @@ -42,7 +42,7 @@ BEGIN { print "#include "; } name = $2; sub (/_O32_/, "_", name); print; - print "#if _MIPS_SIM == _MIPS_SIM_ABI32"; + print "#if _MIPS_SIM == _ABIO32"; print "# define " name " " $2; print "#endif"; next; @@ -51,7 +51,7 @@ BEGIN { print "#include "; } name = $2; sub (/_N32_/, "_", name); print; - print "#if _MIPS_SIM == _MIPS_SIM_NABI32"; + print "#if _MIPS_SIM == _ABIN32"; print "# define " name " " $2; print "#endif"; next; @@ -60,7 +60,7 @@ BEGIN { print "#include "; } name = $2; sub (/_N64_/, "_", name); print; - print "#if _MIPS_SIM == _MIPS_SIM_ABI64"; + print "#if _MIPS_SIM == _ABI64"; print "# define " name " " $2; print "#endif"; next; From f0b94226b11df6a80706d8ebe5dd04dc2e6b4aa3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 27 Nov 2004 20:01:03 +0000 Subject: [PATCH 3390/4487] Include sgidefs.h only if NO_SGIDEFS_H isn't defined. Don't include sgidefs.h twice. --- sysdeps/unix/sysv/linux/mips/pread.c | 5 ++--- sysdeps/unix/sysv/linux/mips/pread64.c | 5 ++--- sysdeps/unix/sysv/linux/mips/pwrite.c | 5 ++--- sysdeps/unix/sysv/linux/mips/pwrite64.c | 2 ++ 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/pread.c b/sysdeps/unix/sysv/linux/mips/pread.c index d0947bea42..eff7d473d0 100644 --- a/sysdeps/unix/sysv/linux/mips/pread.c +++ b/sysdeps/unix/sysv/linux/mips/pread.c @@ -20,7 +20,9 @@ #include #include +#ifndef NO_SGIDEFS_H #include +#endif #include #include @@ -29,9 +31,6 @@ #include #include -#ifndef NO_SGIDEFS_H -#include -#endif #ifdef __NR_pread64 /* Newer kernels renamed but it's the same. */ # ifdef __NR_pread diff --git a/sysdeps/unix/sysv/linux/mips/pread64.c b/sysdeps/unix/sysv/linux/mips/pread64.c index e8a45da5b1..d8763acabb 100644 --- a/sysdeps/unix/sysv/linux/mips/pread64.c +++ b/sysdeps/unix/sysv/linux/mips/pread64.c @@ -19,7 +19,9 @@ 02111-1307 USA. */ #include +#ifndef NO_SGIDEFS_H #include +#endif #include #include @@ -28,9 +30,6 @@ #include #include -#ifndef NO_SGIDEFS_H -#include -#endif #ifdef __NR_pread64 /* Newer kernels renamed but it's the same. */ # ifdef __NR_pread diff --git a/sysdeps/unix/sysv/linux/mips/pwrite.c b/sysdeps/unix/sysv/linux/mips/pwrite.c index 130515af6d..4378ebc859 100644 --- a/sysdeps/unix/sysv/linux/mips/pwrite.c +++ b/sysdeps/unix/sysv/linux/mips/pwrite.c @@ -20,7 +20,9 @@ #include #include +#ifndef NO_SGIDEFS_H #include +#endif #include #include @@ -29,9 +31,6 @@ #include #include -#ifndef NO_SGIDEFS_H -#include -#endif #ifdef __NR_pwrite64 /* Newer kernels renamed but it's the same. */ # ifdef __NR_pwrite diff --git a/sysdeps/unix/sysv/linux/mips/pwrite64.c b/sysdeps/unix/sysv/linux/mips/pwrite64.c index e4908fa779..e5853e432e 100644 --- a/sysdeps/unix/sysv/linux/mips/pwrite64.c +++ b/sysdeps/unix/sysv/linux/mips/pwrite64.c @@ -19,7 +19,9 @@ 02111-1307 USA. */ #include +#ifndef NO_SGIDEFS_H #include +#endif #include #include From 47f0752a488e8d8106811595b3a0534c7edf4b5b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 4 Dec 2004 21:20:17 +0000 Subject: [PATCH 3391/4487] 2004-11-18 Daniel Jacobowitz * sysdeps/arm/sysdep.h: Define __USE_BX__ if bx is available. Use it instead of __THUMB_INTERWORK__. Make RETINSTR take only a condition and a register. * sysdeps/arm/dl-machine.h: Use __USE_BX__ instead of __THUMB_INTERWORK__. (_dl_start_user): Use BX. * sysdeps/arm/strlen.S: Use DO_RET. * sysdeps/unix/arm/brk.S, sysdeps/unix/arm/fork.S, sysdeps/unix/arm/sysdep.S, sysdeps/unix/arm/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/arm/clone.S, sysdeps/unix/sysv/linux/arm/mmap.S, sysdeps/unix/sysv/linux/arm/mmap64.S, sysdeps/unix/sysv/linux/arm/socket.S, sysdeps/unix/sysv/linux/arm/sysdep.h, sysdeps/unix/sysv/linux/arm/vfork.S: Update uses of RETINSTR. --- sysdeps/arm/dl-machine.h | 4 ++-- sysdeps/arm/strlen.S | 2 +- sysdeps/arm/sysdep.h | 17 ++++++++++++----- sysdeps/unix/arm/brk.S | 2 +- sysdeps/unix/arm/fork.S | 2 +- sysdeps/unix/arm/sysdep.S | 4 ++-- sysdeps/unix/arm/sysdep.h | 2 +- sysdeps/unix/sysv/linux/arm/clone.S | 2 +- sysdeps/unix/sysv/linux/arm/mmap.S | 4 ++-- sysdeps/unix/sysv/linux/arm/mmap64.S | 4 ++-- sysdeps/unix/sysv/linux/arm/socket.S | 4 ++-- sysdeps/unix/sysv/linux/arm/sysdep.h | 4 ++-- sysdeps/unix/sysv/linux/arm/vfork.S | 4 ++-- 13 files changed, 31 insertions(+), 24 deletions(-) diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 5dfe3346f5..761f8daeaa 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -123,7 +123,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) return lazy; } -#if defined(__THUMB_INTERWORK__) +#if defined(__USE_BX__) #define BX(x) "bx\t" #x #else #define BX(x) "mov\tpc, " #x @@ -293,7 +293,7 @@ _dl_start_user:\n\ ldr r0, .L_FINI_PROC\n\ add r0, sl, r0\n\ @ jump to the user_s entry point\n\ - mov pc, r6\n\ + " BX(r6) "\n\ .L_GET_GOT:\n\ .word _GLOBAL_OFFSET_TABLE_ - .L_GOT_GOT - 4\n\ .L_SKIP_ARGS:\n\ diff --git a/sysdeps/arm/strlen.S b/sysdeps/arm/strlen.S index a83c41d26a..86e16652e4 100644 --- a/sysdeps/arm/strlen.S +++ b/sysdeps/arm/strlen.S @@ -68,6 +68,6 @@ Llastword: @ drop through to here once we find a tstne r2, $0x00ff0000 @ (if first three all non-zero, 4th addne r0, r0, $1 @ must be zero) #endif - RETINSTR(mov,pc,lr) + DO_RET(lr) END(strlen) libc_hidden_builtin_def (strlen) diff --git a/sysdeps/arm/sysdep.h b/sysdeps/arm/sysdep.h index cb3f105afe..8ca77a60cb 100644 --- a/sysdeps/arm/sysdep.h +++ b/sysdeps/arm/sysdep.h @@ -19,6 +19,11 @@ #include +#if (!defined (__ARM_ARCH_2__) && !defined (__ARM_ARCH_3__) \ + && !defined (__ARM_ARCH_3M__) && !defined (__ARM_ARCH_4__)) +# define __USE_BX__ +#endif + #ifdef __ASSEMBLER__ /* Syntactic details of assembler. */ @@ -50,20 +55,22 @@ #ifdef __APCS_32__ #define LOADREGS(cond, base, reglist...)\ ldm##cond base,reglist -#define RETINSTR(instr, regs...)\ - instr regs -#ifdef __THUMB_INTERWORK__ +#ifdef __USE_BX__ +#define RETINSTR(cond, reg) \ + bx##cond reg #define DO_RET(_reg) \ bx _reg #else +#define RETINSTR(cond, reg) \ + mov##cond pc, reg #define DO_RET(_reg) \ mov pc, _reg #endif #else /* APCS-26 */ #define LOADREGS(cond, base, reglist...)\ ldm##cond base,reglist^ -#define RETINSTR(instr, regs...)\ - instr##s regs +#define RETINSTR(cond, reg) \ + mov##cond##s pc, reg #define DO_RET(_reg) \ movs pc, _reg #endif diff --git a/sysdeps/unix/arm/brk.S b/sysdeps/unix/arm/brk.S index 9e20dc6932..914e8a8bbe 100644 --- a/sysdeps/unix/arm/brk.S +++ b/sysdeps/unix/arm/brk.S @@ -43,7 +43,7 @@ SYSCALL__ (brk, 1) #endif str r0, [r1] mov r0, $0 - RETINSTR(mov, pc, r14) + DO_RET (r14) #ifdef PIC 1: .long _GLOBAL_OFFSET_TABLE_ - 2b - 8 _cb_addr: diff --git a/sysdeps/unix/arm/fork.S b/sysdeps/unix/arm/fork.S index b317b66a97..bd00c92cfe 100644 --- a/sysdeps/unix/arm/fork.S +++ b/sysdeps/unix/arm/fork.S @@ -27,7 +27,7 @@ SYSCALL__ (fork, 0) R0&-1==R0, and the child gets R0&0==0. */ sub r1, r1, $1 and r0, r0, r1 - RETINSTR(mov, pc, r14) + DO_RET (r14) PSEUDO_END (__fork) libc_hidden_def (__fork) diff --git a/sysdeps/unix/arm/sysdep.S b/sysdeps/unix/arm/sysdep.S index 5fc80a872e..4810805d85 100644 --- a/sysdeps/unix/arm/sysdep.S +++ b/sysdeps/unix/arm/sysdep.S @@ -50,7 +50,7 @@ syscall_error: ldr r1, 1f str r0, [r1] mvn r0, $0 - RETINSTR(mov, pc, r14) + DO_RET (r14) 1: .long C_SYMBOL_NAME(errno) #else @@ -60,7 +60,7 @@ syscall_error: 0: add r2, pc, r2 str r0, [r1, r2] mvn r0, $0 - RETINSTR(mov, pc, r14) + DO_RET (r14) 1: .word _GLOBAL_OFFSET_TABLE_ - 0b - 8 2: .word C_SYMBOL_NAME(errno)(GOTOFF) diff --git a/sysdeps/unix/arm/sysdep.h b/sysdeps/unix/arm/sysdep.h index d776b45aa2..5f36272f27 100644 --- a/sysdeps/unix/arm/sysdep.h +++ b/sysdeps/unix/arm/sysdep.h @@ -24,7 +24,7 @@ #ifdef __ASSEMBLER__ -#define ret RETINSTR(mov, pc, r14) +#define ret DO_RET (r14) #define MOVE(a,b) mov b,a #endif diff --git a/sysdeps/unix/sysv/linux/arm/clone.S b/sysdeps/unix/sysv/linux/arm/clone.S index 1c6f7861cf..bf07fb3952 100644 --- a/sysdeps/unix/sysv/linux/arm/clone.S +++ b/sysdeps/unix/sysv/linux/arm/clone.S @@ -45,7 +45,7 @@ ENTRY(__clone) swi SYS_ify(clone) movs a1, a1 blt PLTJMP(C_SYMBOL_NAME(__syscall_error)) - RETINSTR(movne, pc, lr) + RETINSTR(ne, lr) @ pick the function arg and call address off the stack and execute ldr r0, [sp, #4] diff --git a/sysdeps/unix/sysv/linux/arm/mmap.S b/sysdeps/unix/sysv/linux/arm/mmap.S index 7beba6841c..cf6f253378 100644 --- a/sysdeps/unix/sysv/linux/arm/mmap.S +++ b/sysdeps/unix/sysv/linux/arm/mmap.S @@ -51,7 +51,7 @@ ENTRY (__mmap) ldr r5, [sp], #4 cmn r0, $4096 - RETINSTR(movcc, pc, lr) + RETINSTR(cc, lr) b PLTJMP(syscall_error) .Linval: @@ -83,7 +83,7 @@ ENTRY (__mmap) add sp, sp, #16 cmn r0, $4096 - RETINSTR(movcc, pc, lr) + RETINSTR(cc, lr) b PLTJMP(syscall_error); #endif diff --git a/sysdeps/unix/sysv/linux/arm/mmap64.S b/sysdeps/unix/sysv/linux/arm/mmap64.S index f8361b5cbf..b4b712c2f2 100644 --- a/sysdeps/unix/sysv/linux/arm/mmap64.S +++ b/sysdeps/unix/sysv/linux/arm/mmap64.S @@ -43,12 +43,12 @@ ENTRY (__mmap64) # ifdef __ASSUME_MMAP2_SYSCALL ldr r4, [sp], #4 ldr r5, [sp], #4 - RETINSTR(movcc, pc, lr) + RETINSTR(cc, lr) b PLTJMP(syscall_error) # else ldrcc r4, [sp], #4 ldrcc r5, [sp], #4 - RETINSTR(movcc, pc, lr) + RETINSTR(cc, lr) cmn r0, $ENOSYS bne .Lerror /* The current kernel does not support mmap2. Fall back to plain diff --git a/sysdeps/unix/sysv/linux/arm/socket.S b/sysdeps/unix/sysv/linux/arm/socket.S index 3e93ceb6d2..212a489afe 100644 --- a/sysdeps/unix/sysv/linux/arm/socket.S +++ b/sysdeps/unix/sysv/linux/arm/socket.S @@ -91,7 +91,7 @@ ENTRY (__socket) /* r0 is < 0 if there was an error. */ cmn r0, $124 - RETINSTR(movcc, pc, r14) + RETINSTR(cc, r14) b PLTJMP(SYSCALL_ERROR) #if defined NEED_CANCELLATION && defined CENABLE @@ -114,7 +114,7 @@ ENTRY (__socket) /* r0 is < 0 if there was an error. */ cmn r0, $124 - RETINSTR(movcc, pc, r14) + RETINSTR(cc, r14) b PLTJMP(SYSCALL_ERROR) #endif diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index fda7c5b267..668aa1a2f1 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -54,7 +54,7 @@ cmn r0, $4096; #define PSEUDO_RET \ - RETINSTR(movcc, pc, lr); \ + RETINSTR(cc, lr); \ b PLTJMP(SYSCALL_ERROR) #undef ret #define ret PSEUDO_RET @@ -71,7 +71,7 @@ DO_CALL (syscall_name, args); #define PSEUDO_RET_NOERRNO \ - RETINSTR(mov, pc, lr); + DO_RET (lr); #undef ret_NOERRNO #define ret_NOERRNO PSEUDO_RET_NOERRNO diff --git a/sysdeps/unix/sysv/linux/arm/vfork.S b/sysdeps/unix/sysv/linux/arm/vfork.S index bba1a548ba..9ef5114b24 100644 --- a/sysdeps/unix/sysv/linux/arm/vfork.S +++ b/sysdeps/unix/sysv/linux/arm/vfork.S @@ -32,7 +32,7 @@ ENTRY (__vfork) #ifdef __NR_vfork swi __NR_vfork cmn a1, #4096 - RETINSTR(movcc, pc, lr) + RETINSTR(cc, lr) # ifdef __ASSUME_VFORK_SYSCALL b PLTJMP(C_SYMBOL_NAME(__syscall_error)) @@ -47,7 +47,7 @@ ENTRY (__vfork) /* If we don't have vfork, fork is close enough. */ swi __NR_fork cmn a1, #4096 - RETINSTR(movcc, pc, lr) + RETINSTR(cc, lr) b PLTJMP(C_SYMBOL_NAME(__syscall_error)) #elif !defined __NR_vfork # error "__NR_vfork not available and __ASSUME_VFORK_SYSCALL defined" From 9db87dc9e2a1f66270f3164384cfcc4e41f9731e Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 4 Dec 2004 21:20:30 +0000 Subject: [PATCH 3392/4487] 2004-11-18 Daniel Jacobowitz * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: Update RETINSTR use. * sysdeps/unix/sysv/linux/arm/vfork.S: Likewise. --- sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h | 2 +- sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h index 92d8460e26..019bd54913 100644 --- a/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h @@ -112,7 +112,7 @@ extern int __local_multiple_threads attribute_hidden; # define MAYBE_SAVE_LR \ str lr, [sp, $-4]!; # define PSEUDO_RET_MOV \ - RETINSTR(movcc, pc, lr); \ + RETINSTR(cc, lr); \ b PLTJMP(SYSCALL_ERROR) # define PSEUDO_PROLOGUE # else diff --git a/sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S b/sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S index 23687342d1..2708c701eb 100644 --- a/sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S +++ b/sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S @@ -46,7 +46,7 @@ ENTRY (__vfork) swi __NR_vfork cmn a1, #4096 - RETINSTR(movcc, pc, lr) + RETINSTR(cc, lr) #ifndef __ASSUME_VFORK_SYSCALL /* Check if vfork syscall is known at all. */ @@ -60,7 +60,7 @@ ENTRY (__vfork) /* If we don't have vfork, fork is close enough. */ swi __NR_fork cmn a1, #4096 - RETINSTR(movcc, pc, lr) + RETINSTR(cc, lr) #elif !defined __NR_vfork # error "__NR_vfork not available and __ASSUME_VFORK_SYSCALL defined" #endif From 2b35938bce57e94d8ccfbc4c0c6816bc363f037f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 15 Dec 2004 01:00:48 +0000 Subject: [PATCH 3393/4487] 2004-10-18 Maciej W. Rozycki * sysdeps/unix/sysv/linux/mips/bits/mman.h (PROT_GROWSDOWN, PROT_GROWSUP): New macros. --- sysdeps/unix/sysv/linux/mips/bits/mman.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/mman.h b/sysdeps/unix/sysv/linux/mips/bits/mman.h index e05f2a6d4d..154501fba2 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/mman.h +++ b/sysdeps/unix/sysv/linux/mips/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/MIPS version. - Copyright (C) 1997, 2000, 2003 Free Software Foundation, Inc. + Copyright (C) 1997, 2000, 2003, 2004 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 @@ -34,6 +34,10 @@ #define PROT_WRITE 0x2 /* Page can be written. */ #define PROT_EXEC 0x4 /* Page can be executed. */ #define PROT_NONE 0x0 /* Page can not be accessed. */ +#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of + growsdown vma (mprotect only). */ +#define PROT_GROWSUP 0x02000000 /* Extend change to start of + growsup vma (mprotect only). */ /* Sharing types (must choose one and only one of these). */ #define MAP_SHARED 0x01 /* Share changes. */ From 2863de95ab57e54d3bb7487bf1c1eb4eba280a30 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 15 Dec 2004 01:00:51 +0000 Subject: [PATCH 3394/4487] 2004-10-18 Maciej W. Rozycki * sysdeps/mips/bits/dlfcn.h (RTLD_DEEPBIND): New macro. --- sysdeps/mips/bits/dlfcn.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sysdeps/mips/bits/dlfcn.h b/sysdeps/mips/bits/dlfcn.h index c5b4c5950b..a5b5bf53ff 100644 --- a/sysdeps/mips/bits/dlfcn.h +++ b/sysdeps/mips/bits/dlfcn.h @@ -1,5 +1,6 @@ /* System dependent definitions for run-time dynamic loading. - Copyright (C) 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1999, 2000, 2001, 2004 + 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 @@ -24,8 +25,9 @@ /* The MODE argument to `dlopen' contains one of the following: */ #define RTLD_LAZY 0x0001 /* Lazy function call binding. */ #define RTLD_NOW 0x0002 /* Immediate function call binding. */ -#define RTLD_BINDING_MASK 0x3 /* Mask of binding time value. */ +#define RTLD_BINDING_MASK 0x3 /* Mask of binding time value. */ #define RTLD_NOLOAD 0x00008 /* Do not load the object. */ +#define RTLD_DEEPBIND 0x00010 /* Use deep binding. */ /* If the following bit is set in the MODE argument to `dlopen', the symbols of the loaded object and its dependencies are made From 5fbac7cf7e639328aa52c32c3d5f0e700b4573a1 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 15 Dec 2004 01:00:56 +0000 Subject: [PATCH 3395/4487] 2004-10-18 Maciej W. Rozycki * sysdeps/unix/sysv/linux/mips/bits/socket.h (__cmsg_nxthdr): Use __NTH instead of __THROW in the inline definition. * sysdeps/unix/sysv/linux/mips/sys/tas.h (_test_and_set): Likewise. --- sysdeps/unix/sysv/linux/mips/bits/socket.h | 5 +++-- sysdeps/unix/sysv/linux/mips/sys/tas.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h index a10c3a711a..1dd82eb866 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/socket.h +++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h @@ -1,5 +1,6 @@ /* System-specific socket constants and types. Linux/MIPS version. - Copyright (C) 1991,92,1994-1999,2000,2001 Free Software Foundation, Inc. + Copyright (C) 1991, 92, 1994-1999, 2000, 2001, 2004 + 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 @@ -261,7 +262,7 @@ extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr, # define _EXTERN_INLINE extern __inline # endif _EXTERN_INLINE struct cmsghdr * -__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW +__NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg)) { if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr)) /* The kernel header does this so there may be a reason. */ diff --git a/sysdeps/unix/sysv/linux/mips/sys/tas.h b/sysdeps/unix/sysv/linux/mips/sys/tas.h index e5180f9475..1183b867b8 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/tas.h +++ b/sysdeps/unix/sysv/linux/mips/sys/tas.h @@ -34,7 +34,7 @@ extern int _test_and_set (int *p, int v) __THROW; # endif _EXTERN_INLINE int -_test_and_set (int *p, int v) __THROW +__NTH (_test_and_set (int *p, int v)) { int r, t; From 8779468479633e558d9739129ffcf492adf47aa6 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 17 Dec 2004 06:49:58 +0000 Subject: [PATCH 3396/4487] Adjust for changed result. --- sysdeps/alpha/fpu/libm-test-ulps | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/alpha/fpu/libm-test-ulps b/sysdeps/alpha/fpu/libm-test-ulps index 80942e98ec..7e8140cddc 100644 --- a/sysdeps/alpha/fpu/libm-test-ulps +++ b/sysdeps/alpha/fpu/libm-test-ulps @@ -1,7 +1,7 @@ # Begin of automatic generation # atan2 -Test "atan2 (-0.00756827042671106339, -.001792735857538728036) == -1.80338464113663849327153994380": +Test "atan2 (-0.00756827042671106339, -.001792735857538728036) == -1.80338464113663849327153994379639112": float: 6 ifloat: 6 Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025": From 0141927118f687c61234382de1980928d52f5f2b Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 17 Dec 2004 10:11:44 +0000 Subject: [PATCH 3397/4487] * sysdeps/unix/sysv/linux/alpha/clone.S (__clone): Add support for NPTL where the PID is stored at userlevel and needs to be reset when CLONE_THREAD is not used. nptl/ * sysdeps/unix/sysv/linux/alpha/clone.S: New file. * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New. --- sysdeps/alpha/nptl/tcb-offsets.sym | 1 + sysdeps/unix/sysv/linux/alpha/clone.S | 35 ++++++++++++++++++++-- sysdeps/unix/sysv/linux/alpha/nptl/clone.S | 2 ++ 3 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/alpha/nptl/clone.S diff --git a/sysdeps/alpha/nptl/tcb-offsets.sym b/sysdeps/alpha/nptl/tcb-offsets.sym index ebd84f35e5..c21a791040 100644 --- a/sysdeps/alpha/nptl/tcb-offsets.sym +++ b/sysdeps/alpha/nptl/tcb-offsets.sym @@ -11,3 +11,4 @@ MULTIPLE_THREADS_OFFSET thread_offsetof (header.multiple_threads) PID_OFFSET thread_offsetof (pid) +TID_OFFSET thread_offsetof (tid) diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S index b4766ec457..1c450d1737 100644 --- a/sysdeps/unix/sysv/linux/alpha/clone.S +++ b/sysdeps/unix/sysv/linux/alpha/clone.S @@ -24,6 +24,9 @@ #define _ERRNO_H 1 #include +#define CLONE_VM 0x00000100 +#define CLONE_THREAD 0x00010000 + /* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg, pid_t *ptid, void *tls, pid_t *ctid); @@ -51,9 +54,12 @@ ENTRY(__clone) beq a1,$error /* no NULL stack pointers */ /* Save the fn ptr and arg on the new stack. */ - subq a1,16,a1 + subq a1,32,a1 stq a0,0(a1) stq a3,8(a1) +#ifdef RESET_PID + stq a2,16(a1) +#endif /* The syscall is of the form clone(flags, usp, ptid, ctid, tls). Shift the flags, ptid, ctid, tls arguments into place; the @@ -93,10 +99,19 @@ thread_start: mov 0, fp .prologue 0 +#ifdef RESET_PID + /* Check and see if we need to reset the PID. */ + ldq t0,16(sp) + lda t1,CLONE_THREAD + and t0,t1,t2 + beq t2,2f +1: +#endif + /* Load up the arguments. */ ldq pv,0(sp) ldq a0,8(sp) - addq sp,16,sp + addq sp,32,sp /* Call the user's function. */ jsr ra,(pv) @@ -113,6 +128,22 @@ thread_start: /* Die horribly. */ halt +#ifdef RESET_PID +2: + rduniq + lda t1, CLONE_VM + mov v0, s0 + lda v0, -1 + and t0, t1, t2 + bne t2, 3f + lda v0, __NR_getxpid + callsys +3: + stl v0, PID_OFFSET(s0) + stl v0, TID_OFFSET(s0) + br 1b +#endif + .end thread_start weak_alias(__clone, clone) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/clone.S b/sysdeps/unix/sysv/linux/alpha/nptl/clone.S new file mode 100644 index 0000000000..eea1cbeed1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/nptl/clone.S @@ -0,0 +1,2 @@ +#define RESET_PID +#include From 2cc89a4967134a6511a14f6d9e249b0f7a72e6d2 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 20 Dec 2004 08:34:03 +0000 Subject: [PATCH 3398/4487] 2004-12-20 Jakub Jelinek , Jim Gifford [BZ #562] * sysdeps/mips/Makefile (librt-sysdep_routines): Add. * sysdeps/unix/mips/rt-sysdep.S: New file. --- sysdeps/mips/Makefile | 4 ++++ sysdeps/unix/mips/rt-sysdep.S | 1 + 2 files changed, 5 insertions(+) create mode 100644 sysdeps/unix/mips/rt-sysdep.S diff --git a/sysdeps/mips/Makefile b/sysdeps/mips/Makefile index 849785a550..49ad3e1b91 100644 --- a/sysdeps/mips/Makefile +++ b/sysdeps/mips/Makefile @@ -6,3 +6,7 @@ endif ifeq ($(subdir),setjmp) sysdep_routines += setjmp_aux endif + +ifeq ($(subdir),rt) +librt-sysdep_routines += rt-sysdep +endif diff --git a/sysdeps/unix/mips/rt-sysdep.S b/sysdeps/unix/mips/rt-sysdep.S new file mode 100644 index 0000000000..f966bf1e59 --- /dev/null +++ b/sysdeps/unix/mips/rt-sysdep.S @@ -0,0 +1 @@ +#include From e9c3f06f2863fc115f55048a8cd3e9f1a4f2eeb6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 6 Jan 2005 22:40:24 +0000 Subject: [PATCH 3399/4487] * csu/elf-init.c (__libc_csu_fini): Don't do anything here. * sysdeps/generic/libc-start.c: Don't register program destructor here. * dlfcn/Makefile: Add rules to build dlfcn.c. (LDFLAGS-dl.so): Removed. * dlfcn/dlclose.c: _dl_close is now in ld.so, use function pointer table. * dlfcn/dlmopen.c: Likewise for _dl_open. * dlfcn/dlopen.c: Likewise. * dlfcn/dlopenold.c: Likewise. * elf/dl-libc.c: Likewise for _dl_open and _dl_close. * elf/Makefile (routines): Remove dl-open and dl-close. (dl-routines): Add dl-open, dl-close, and dl-trampoline. Add rules to build and run tst-audit1. * elf/tst-audit1.c: New file. * elf/tst-auditmod1.c: New file. * elf/Versions [libc]: Remove _dl_open and _dl_close. * elf/dl-close.c: Change for use inside ld.so instead of libc.so. * elf/dl-open.c: Likewise. * elf/dl-debug.c (_dl_debug_initialize): Allow reinitialization, signaled by nonzero parameter. * elf/dl-init.c: Fix use of r_state. * elf/dl-load.c: Likewise. * elf/dl-close.c: Add auditing checkpoints. * elf/dl-open.c: Likewise. * elf/dl-fini.c: Likewise. * elf/dl-load.c: Likewise. * elf/dl-sym.c: Likewise. * sysdeps/generic/libc-start.c: Likewise. * elf/dl-object.c: Allocate memory for auditing information. * elf/dl-reloc.c: Remove RESOLV. We now always need the map. Correctly initialize slotinfo. * elf/dynamic-link.h: Adjust after removal of RESOLV. * sysdeps/hppa/dl-lookupcfg.h: Likewise. * sysdeps/ia64/dl-lookupcfg.h: Likewise. * sysdeps/powerpc/powerpc64/dl-lookupcfg.h: Removed. * elf/dl-runtime.c (_dl_fixup): Little cleanup. (_dl_profile_fixup): New parameters to point to register struct and variable for frame size. Add auditing checkpoints. (_dl_call_pltexit): New function. Don't define trampoline code here. * elf/rtld.c: Recognize LD_AUDIT. Load modules on startup. Remove all the functions from _rtld_global_ro which only _dl_open and _dl_close needed. Add auditing checkpoints. * elf/link.h: Define symbols for auditing interfaces. * include/link.h: Likewise. * include/dlfcn.h: Define __RTLD_AUDIT. Remove prototypes for _dl_open and _dl_close. Adjust access to argc and argv in libdl. * dlfcn/dlfcn.c: New file. * sysdeps/generic/dl-lookupcfg.h: Remove all content now that RESOLVE is gone. * sysdeps/generic/ldsodefs.h: Add definitions for auditing interfaces. * sysdeps/generic/unsecvars.h: Add LD_AUDIT. * sysdeps/i386/dl-machine.h: Remove trampoline code here. Adjust for removal of RESOLVE. * sysdeps/x86_64/dl-machine.h: Likewise. * sysdeps/generic/dl-trampoline.c: New file. * sysdeps/i386/dl-trampoline.c: New file. * sysdeps/x86_64/dl-trampoline.c: New file. * sysdeps/generic/dl-tls.c: Cleanups. Fixup for dtv_t change. Fix updating of DTV. * sysdeps/generic/libc-tls.c: Likewise. * sysdeps/arm/bits/link.h: Renamed to ... * sysdeps/arm/buts/linkmap.h: ...this. * sysdeps/generic/bits/link.h: Renamed to... * sysdeps/generic/bits/linkmap.h: ...this. * sysdeps/hppa/bits/link.h: Renamed to... * sysdeps/hppa/bits/linkmap.h: ...this. * sysdeps/hppa/i386/link.h: Renamed to... * sysdeps/hppa/i386/linkmap.h: ...this. * sysdeps/hppa/ia64/link.h: Renamed to... * sysdeps/hppa/ia64/linkmap.h: ...this. * sysdeps/hppa/s390/link.h: Renamed to... * sysdeps/hppa/s390/linkmap.h: ...this. * sysdeps/hppa/sh/link.h: Renamed to... * sysdeps/hppa/sh/linkmap.h: ...this. * sysdeps/hppa/x86_64/link.h: Renamed to... * sysdeps/hppa/x86_64/linkmap.h: ...this. --- sysdeps/alpha/nptl/tls.h | 9 +++++++-- sysdeps/arm/bits/link.h | 4 ---- sysdeps/arm/bits/linkmap.h | 4 ++++ sysdeps/hppa/bits/link.h | 6 ------ sysdeps/hppa/bits/linkmap.h | 6 ++++++ sysdeps/hppa/dl-lookupcfg.h | 6 +----- 6 files changed, 18 insertions(+), 17 deletions(-) create mode 100644 sysdeps/arm/bits/linkmap.h create mode 100644 sysdeps/hppa/bits/linkmap.h diff --git a/sysdeps/alpha/nptl/tls.h b/sysdeps/alpha/nptl/tls.h index bc6630953f..fa3c832a68 100644 --- a/sysdeps/alpha/nptl/tls.h +++ b/sysdeps/alpha/nptl/tls.h @@ -1,5 +1,5 @@ /* Definition for thread-local data handling. NPTL/Alpha version. - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 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 @@ -23,6 +23,7 @@ # include #ifndef __ASSEMBLER__ +# include # include # include @@ -30,7 +31,11 @@ typedef union dtv { size_t counter; - void *pointer; + struct + { + void *val; + bool is_static; + } pointer; } dtv_t; #else /* __ASSEMBLER__ */ diff --git a/sysdeps/arm/bits/link.h b/sysdeps/arm/bits/link.h index 648976d7d2..e69de29bb2 100644 --- a/sysdeps/arm/bits/link.h +++ b/sysdeps/arm/bits/link.h @@ -1,4 +0,0 @@ -struct link_map_machine - { - Elf32_Addr plt; /* Address of .plt */ - }; diff --git a/sysdeps/arm/bits/linkmap.h b/sysdeps/arm/bits/linkmap.h new file mode 100644 index 0000000000..648976d7d2 --- /dev/null +++ b/sysdeps/arm/bits/linkmap.h @@ -0,0 +1,4 @@ +struct link_map_machine + { + Elf32_Addr plt; /* Address of .plt */ + }; diff --git a/sysdeps/hppa/bits/link.h b/sysdeps/hppa/bits/link.h index 54842b2299..e69de29bb2 100644 --- a/sysdeps/hppa/bits/link.h +++ b/sysdeps/hppa/bits/link.h @@ -1,6 +0,0 @@ -/* Used to store the function descriptor table */ -struct link_map_machine - { - size_t fptr_table_len; - ElfW(Addr) *fptr_table; - }; diff --git a/sysdeps/hppa/bits/linkmap.h b/sysdeps/hppa/bits/linkmap.h new file mode 100644 index 0000000000..54842b2299 --- /dev/null +++ b/sysdeps/hppa/bits/linkmap.h @@ -0,0 +1,6 @@ +/* Used to store the function descriptor table */ +struct link_map_machine + { + size_t fptr_table_len; + ElfW(Addr) *fptr_table; + }; diff --git a/sysdeps/hppa/dl-lookupcfg.h b/sysdeps/hppa/dl-lookupcfg.h index d393b3e427..84436e7c56 100644 --- a/sysdeps/hppa/dl-lookupcfg.h +++ b/sysdeps/hppa/dl-lookupcfg.h @@ -1,5 +1,5 @@ /* Configuration of lookup functions. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright (C) 2000, 2004 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 @@ -17,9 +17,6 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -/* Like IA-64, PA-RISC needs more information from the symbol lookup - function than just the address. */ -#define DL_LOOKUP_RETURNS_MAP #define ELF_FUNCTION_PTR_IS_SPECIAL #define DL_UNMAP_IS_SPECIAL @@ -66,4 +63,3 @@ void _dl_unmap (struct link_map *map); ((Elf32_Addr)(addr) & 2 ? (addr) : DL_AUTO_FUNCTION_ADDRESS (map, addr)) #define DL_DT_FINI_ADDRESS(map, addr) \ ((Elf32_Addr)(addr) & 2 ? (addr) : DL_AUTO_FUNCTION_ADDRESS (map, addr)) - From cac7d7f9a11615e2606a89241d5044a3004e5ea2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 12 Jan 2005 02:41:50 +0000 Subject: [PATCH 3400/4487] (__tls_get_addr): Updated for dtv_t union. --- sysdeps/alpha/libc-tls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/alpha/libc-tls.c b/sysdeps/alpha/libc-tls.c index 434d5d9313..a3b68e928f 100644 --- a/sysdeps/alpha/libc-tls.c +++ b/sysdeps/alpha/libc-tls.c @@ -31,7 +31,7 @@ void * __tls_get_addr (tls_index *ti) { dtv_t *dtv = THREAD_DTV (); - return (char *) dtv[1].pointer + ti->ti_offset; + return (char *) dtv[1].pointer.val + ti->ti_offset; } #endif From 00f36bfbb71dbfa1457ad2bdd9886965f7d67313 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 16 Jan 2005 02:07:29 +0000 Subject: [PATCH 3401/4487] * sysdeps/m68k/dl-machine.h: Remove trampoline code. Define ARCH_LA_PLTENTER and ARCH_LA_PLTEXIT. (elf_machine_runtime_setup): If profile != 0 does not anymore mean GLRO(dl_profile) != NULL. * sysdeps/m68k/dl-trampoline.S: New file. * sysdeps/m68k/bits/link.h: New file. * sysdeps/generic/ldsodefs.h (struct audit_ifaces): Add m68k variants. * elf/tst-auditmod1.c: Add m68k support. --- sysdeps/m68k/bits/link.h | 58 ++++++++++++++++ sysdeps/m68k/dl-machine.h | 49 ++++--------- sysdeps/m68k/dl-trampoline.S | 129 +++++++++++++++++++++++++++++++++++ 3 files changed, 202 insertions(+), 34 deletions(-) create mode 100644 sysdeps/m68k/bits/link.h create mode 100644 sysdeps/m68k/dl-trampoline.S diff --git a/sysdeps/m68k/bits/link.h b/sysdeps/m68k/bits/link.h new file mode 100644 index 0000000000..9d0a94592f --- /dev/null +++ b/sysdeps/m68k/bits/link.h @@ -0,0 +1,58 @@ +/* Copyright (C) 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 + 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 _LINK_H +# error "Never include directly; use instead." +#endif + + +/* Registers for entry into PLT on M68K. */ +typedef struct La_m68k_regs +{ + uint32_t lr_a0; + uint32_t lr_a1; + uint32_t lr_sp; +} La_m68k_regs; + +/* Return values for calls from PLT on M68K. */ +typedef struct La_m68k_retval +{ + uint32_t lrv_d0; + uint32_t lrv_d1; + uint32_t lrv_a0; + long double lrv_fp0; +} La_m68k_retval; + + +__BEGIN_DECLS + +extern Elf32_Addr la_m68k_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + La_m68k_regs *__regs, + unsigned int *__flags, + const char *__symname, + long int *__framesizep); +extern unsigned int la_m68k_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + const La_m68k_regs *__inregs, + La_m68k_retval *__outregs, + const char *symname); + +__END_DECLS diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index 146c5866a9..89d7106365 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. m68k version. - Copyright (C) 1996-2001, 2002, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 1996-2001, 2002, 2003, 2004, 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 @@ -85,7 +85,8 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) { got[2] = (Elf32_Addr) &_dl_runtime_profile; - if (_dl_name_match_p (GLRO(dl_profile), l)) + if (GLRO(dl_profile) != NULL + && _dl_name_match_p (GLRO(dl_profile), l)) { /* This is the object we are looking for. Say that we really want profiling and the timers are started. */ @@ -101,36 +102,6 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) return lazy; } -/* This code is used in dl-runtime.c to call the `fixup' function - and then redirect to the address it returns. */ -#define TRAMPOLINE_TEMPLATE(tramp_name, fixup_name) \ -"| Trampoline for " #fixup_name "\n\ - .globl " #tramp_name "\n\ - .type " #tramp_name ", @function\n\ -" #tramp_name ":\n\ - | Save %a0 (struct return address) and %a1.\n\ - move.l %a0, -(%sp)\n\ - move.l %a1, -(%sp)\n\ - | Call the real address resolver.\n\ - jbsr " #fixup_name "\n\ - | Restore register %a0 and %a1.\n\ - move.l (%sp)+, %a1\n\ - move.l (%sp)+, %a0\n\ - | Pop parameters\n\ - addq.l #8, %sp\n\ - | Call real function.\n\ - jmp (%d0)\n\ - .size " #tramp_name ", . - " #tramp_name "\n" -#ifndef PROF -#define ELF_MACHINE_RUNTIME_TRAMPOLINE \ -asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \ - TRAMPOLINE_TEMPLATE (_dl_runtime_profile, profile_fixup)); -#else -#define ELF_MACHINE_RUNTIME_TRAMPOLINE \ -asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \ - ".globl _dl_runtime_profile\n" \ - ".set _dl_runtime_profile, _dl_runtime_resolve"); -#endif #define ELF_MACHINE_RUNTIME_FIXUP_ARGS long int save_a0, long int save_a1 @@ -216,9 +187,13 @@ elf_machine_plt_value (struct link_map *map, const Elf32_Rela *reloc, return value; } +/* Names of the architecture-specific auditing callback functions. */ +#define ARCH_LA_PLTENTER m68k_gnu_pltenter +#define ARCH_LA_PLTEXIT m68k_gnu_pltexit + #endif /* !dl_machine_h */ -#ifdef RESOLVE +#ifdef RESOLVE_MAP /* Perform the relocation specified by RELOC and SYM (which is fully resolved). MAP is the object containing the reloc. */ @@ -236,9 +211,15 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, else { const Elf32_Sym *const refsym = sym; +#ifndef RTLD_BOOTSTRAP + struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type); + Elf32_Addr value = sym == NULL ? 0 : sym_map->l_addr + sym->st_value; +#else Elf32_Addr value = RESOLVE (&sym, version, r_type); + if (sym) value += sym->st_value; +#endif /* !RTLD_BOOTSTRAP */ switch (r_type) { @@ -313,4 +294,4 @@ elf_machine_lazy_rel (struct link_map *map, _dl_reloc_bad_type (map, ELF32_R_TYPE (reloc->r_info), 1); } -#endif /* RESOLVE */ +#endif /* RESOLVE_MAP */ diff --git a/sysdeps/m68k/dl-trampoline.S b/sysdeps/m68k/dl-trampoline.S new file mode 100644 index 0000000000..8791280371 --- /dev/null +++ b/sysdeps/m68k/dl-trampoline.S @@ -0,0 +1,129 @@ +/* PLT trampolines. m68k version. + Copyright (C) 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 + 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. */ + +#include + + .text + .globl _dl_runtime_resolve + .type _dl_runtime_resolve, @function +_dl_runtime_resolve: + | Save %a0 (struct return address) and %a1. + move.l %a0, -(%sp) + move.l %a1, -(%sp) + | Call the real address resolver. + jbsr _dl_fixup + | Restore register %a0 and %a1. + move.l (%sp)+, %a1 + move.l (%sp)+, %a0 + | Pop parameters + addq.l #8, %sp + | Call real function. + jmp (%d0) + .size _dl_runtime_resolve, . - _dl_runtime_resolve + + .text + .globl _dl_runtime_profile + .type _dl_runtime_profile, @function +_dl_runtime_profile: + pea 8(%sp) + move.l %a1, -(%sp) + move.l %a0, -(%sp) + pea -1.w + | Push parameters for _dl_profile_fixup + pea (%sp) + pea 8(%sp) + move.l 32(%sp), -(%sp) + move.l 32(%sp), -(%sp) + move.l 32(%sp), -(%sp) + subq.l #8, %sp + | Call the real address resolver. + jbsr _dl_profile_fixup + | Pop parameters + lea 28(%sp), %sp + move.l (%sp), %d1 + jpl 1f + addq.l #4, %sp + | Restore register %a0 and %a1. + move.l (%sp)+, %a0 + move.l (%sp)+, %a1 + lea 12(%sp), %sp + | Call real function. + jmp (%d0) + + /* + +24 return address + +20 PLT1 + +16 PLT2 + +12 %sp + +8 %a1 + +4 %a0 + %sp free + */ +1: move.l %a2, (%sp) + move.l %sp, %a2 + move.l %sp, %a0 + lea 28(%sp), %a1 + | Round framesize up to even + addq.l #1, %d1 + lsr #1, %d1 + sub.l %d1, %a0 + sub.l %d1, %a0 + move.l %a0, %sp + jra 2f +1: move.w (%a1)+, (%a0)+ +2: dbra %d1,1b + /* + %a2+24 return address + %a2+20 PLT1 + %a2+16 PLT2 + %a2+12 %sp + %a2+8 %a1 + %a2+4 %a0 + %a2 %a2 + %sp copied stack frame + */ + + move.l 4(%a2), %a0 + move.l 8(%a2), %a1 + jsr (%d0) + move.l %a2, %sp + move.l (%sp)+, %a2 + /* + +20 return address + +16 PLT1 + +12 PLT2 + +8 %sp + +4 %a1 + %sp %a0 + */ + fmove.x %fp0, -(%sp) + move.l %d1, -(%sp) + move.l %d0, -(%sp) + pea (%sp) + pea 20(%sp) + move.l 40(%sp), -(%sp) + move.l 40(%sp), -(%sp) + jbsr _dl_call_pltexit + lea 16(%sp), %sp + move.l (%sp)+, %d0 + move.l (%sp)+, %d1 + fmove.x (%sp)+, %fp0 + lea 20(%sp), %sp + rts + .size _dl_runtime_profile, . - _dl_runtime_profile From 1ba6212c8bcc820d49fb1c6f6bf4e3f4d497fa75 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sun, 23 Jan 2005 08:02:38 +0000 Subject: [PATCH 3402/4487] * sysdeps/alpha/dl-trampoline.S: New file. * sysdeps/alpha/dl-machine.h: Move PLT trampolines there. Use RESOLVE_MAP instead of RESOLVE to protect relocation code. (elf_machine_runtime_setup): Test for dl_profile non-null. (ARCH_LA_PLTENTER, ARCH_LA_PLTEXIT): New. * sysdeps/alpha/bits/link.h: New file. * sysdeps/generic/ldsodefs.h (La_alpha_regs, La_alpha_retval): New. (struct audit_ifaces): Add alpha entries. * elf/tst-auditmod1.c: Add alpha entries. --- sysdeps/alpha/bits/link.h | 69 +++++++ sysdeps/alpha/dl-machine.h | 154 ++------------- sysdeps/alpha/dl-trampoline.S | 361 ++++++++++++++++++++++++++++++++++ 3 files changed, 441 insertions(+), 143 deletions(-) create mode 100644 sysdeps/alpha/bits/link.h create mode 100644 sysdeps/alpha/dl-trampoline.S diff --git a/sysdeps/alpha/bits/link.h b/sysdeps/alpha/bits/link.h new file mode 100644 index 0000000000..429faff432 --- /dev/null +++ b/sysdeps/alpha/bits/link.h @@ -0,0 +1,69 @@ +/* Copyright (C) 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 + 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 _LINK_H +# error "Never include directly; use instead." +#endif + + +/* Registers for entry into PLT on Alpha. */ +typedef struct La_alpha_regs +{ + uint64_t lr_r26; + uint64_t lr_sp; + uint64_t lr_r16; + uint64_t lr_r17; + uint64_t lr_r18; + uint64_t lr_r19; + uint64_t lr_r20; + uint64_t lr_r21; + double lr_f16; + double lr_f17; + double lr_f18; + double lr_f19; + double lr_f20; + double lr_f21; +} La_alpha_regs; + +/* Return values for calls from PLT on Alpha. */ +typedef struct La_alpha_retval +{ + uint64_t lrv_r0; + uint64_t lrv_r1; + double lrv_f0; + double lrv_f1; +} La_alpha_retval; + + +__BEGIN_DECLS + +extern Elf64_Addr la_alpha_gnu_pltenter (Elf64_Sym *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + La_alpha_regs *__regs, + unsigned int *__flags, + const char *__symname, + long int *__framesizep); +extern unsigned int la_alpha_gnu_pltexit (Elf64_Sym *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + const La_alpha_regs *__inregs, + La_alpha_retval *__outregs, + const char *symname); + +__END_DECLS diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 780a3a57fd..fd2269bd30 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -108,19 +108,20 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) plt = D_PTR (l, l_info[DT_PLTGOT]); /* This function will be called to perform the relocation. */ - if (!profile) - *(Elf64_Addr *)(plt + 16) = (Elf64_Addr) &_dl_runtime_resolve; - else + if (__builtin_expect (profile, 0)) { *(Elf64_Addr *)(plt + 16) = (Elf64_Addr) &_dl_runtime_profile; - if (_dl_name_match_p (GLRO(dl_profile), l)) + if (GLRO(dl_profile) != NULL + && _dl_name_match_p (GLRO(dl_profile), l)) { /* This is the object we are looking for. Say that we really want profiling and the timers are started. */ GL(dl_profile_map) = l; } } + else + *(Elf64_Addr *)(plt + 16) = (Elf64_Addr) &_dl_runtime_resolve; /* Identify this shared object */ *(Elf64_Addr *)(plt + 24) = (Elf64_Addr) l; @@ -156,143 +157,6 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) return lazy; } -/* This code is used in dl-runtime.c to call the `fixup' function - and then redirect to the address it returns. */ -#define TRAMPOLINE_TEMPLATE(tramp_name, fixup_name, IMB) \ - extern void tramp_name (void); \ - asm ( "\ - .globl " #tramp_name " \n\ - .ent " #tramp_name " \n\ -" #tramp_name ": \n\ - lda $sp, -44*8($sp) \n\ - .frame $sp, 44*8, $26 \n\ - /* Preserve all integer registers that C normally \n\ - doesn't. */ \n\ - stq $26, 0*8($sp) \n\ - stq $0, 1*8($sp) \n\ - stq $1, 2*8($sp) \n\ - stq $2, 3*8($sp) \n\ - stq $3, 4*8($sp) \n\ - stq $4, 5*8($sp) \n\ - stq $5, 6*8($sp) \n\ - stq $6, 7*8($sp) \n\ - stq $7, 8*8($sp) \n\ - stq $8, 9*8($sp) \n\ - stq $16, 10*8($sp) \n\ - stq $17, 11*8($sp) \n\ - stq $18, 12*8($sp) \n\ - stq $19, 13*8($sp) \n\ - stq $20, 14*8($sp) \n\ - stq $21, 15*8($sp) \n\ - stq $22, 16*8($sp) \n\ - stq $23, 17*8($sp) \n\ - stq $24, 18*8($sp) \n\ - stq $25, 19*8($sp) \n\ - stq $29, 20*8($sp) \n\ - stt $f0, 21*8($sp) \n\ - stt $f1, 22*8($sp) \n\ - stt $f10, 23*8($sp) \n\ - stt $f11, 24*8($sp) \n\ - stt $f12, 25*8($sp) \n\ - stt $f13, 26*8($sp) \n\ - stt $f14, 27*8($sp) \n\ - stt $f15, 28*8($sp) \n\ - stt $f16, 29*8($sp) \n\ - stt $f17, 30*8($sp) \n\ - stt $f18, 31*8($sp) \n\ - stt $f19, 32*8($sp) \n\ - stt $f20, 33*8($sp) \n\ - stt $f21, 34*8($sp) \n\ - stt $f22, 35*8($sp) \n\ - stt $f23, 36*8($sp) \n\ - stt $f24, 37*8($sp) \n\ - stt $f25, 38*8($sp) \n\ - stt $f26, 39*8($sp) \n\ - stt $f27, 40*8($sp) \n\ - stt $f28, 41*8($sp) \n\ - stt $f29, 42*8($sp) \n\ - stt $f30, 43*8($sp) \n\ - .mask 0x27ff01ff, -44*8 \n\ - .fmask 0xfffffc03, -(44-21)*8 \n\ - /* Set up our $gp */ \n\ - br $gp, .+4 \n\ - ldgp $gp, 0($gp) \n\ - .prologue 0 \n\ - /* Set up the arguments for fixup: */ \n\ - /* $16 = link_map out of plt0 */ \n\ - /* $17 = offset of reloc entry = ($28 - $27 - 20) /12 * 24 */\n\ - /* $18 = return address */ \n\ - subq $28, $27, $17 \n\ - ldq $16, 8($27) \n\ - subq $17, 20, $17 \n\ - mov $26, $18 \n\ - addq $17, $17, $17 \n\ - /* Do the fixup */ \n\ - bsr $26, " #fixup_name " !samegp \n\ - /* Move the destination address into position. */ \n\ - mov $0, $27 \n\ - /* Restore program registers. */ \n\ - ldq $26, 0*8($sp) \n\ - ldq $0, 1*8($sp) \n\ - ldq $1, 2*8($sp) \n\ - ldq $2, 3*8($sp) \n\ - ldq $3, 4*8($sp) \n\ - ldq $4, 5*8($sp) \n\ - ldq $5, 6*8($sp) \n\ - ldq $6, 7*8($sp) \n\ - ldq $7, 8*8($sp) \n\ - ldq $8, 9*8($sp) \n\ - ldq $16, 10*8($sp) \n\ - ldq $17, 11*8($sp) \n\ - ldq $18, 12*8($sp) \n\ - ldq $19, 13*8($sp) \n\ - ldq $20, 14*8($sp) \n\ - ldq $21, 15*8($sp) \n\ - ldq $22, 16*8($sp) \n\ - ldq $23, 17*8($sp) \n\ - ldq $24, 18*8($sp) \n\ - ldq $25, 19*8($sp) \n\ - ldq $29, 20*8($sp) \n\ - ldt $f0, 21*8($sp) \n\ - ldt $f1, 22*8($sp) \n\ - ldt $f10, 23*8($sp) \n\ - ldt $f11, 24*8($sp) \n\ - ldt $f12, 25*8($sp) \n\ - ldt $f13, 26*8($sp) \n\ - ldt $f14, 27*8($sp) \n\ - ldt $f15, 28*8($sp) \n\ - ldt $f16, 29*8($sp) \n\ - ldt $f17, 30*8($sp) \n\ - ldt $f18, 31*8($sp) \n\ - ldt $f19, 32*8($sp) \n\ - ldt $f20, 33*8($sp) \n\ - ldt $f21, 34*8($sp) \n\ - ldt $f22, 35*8($sp) \n\ - ldt $f23, 36*8($sp) \n\ - ldt $f24, 37*8($sp) \n\ - ldt $f25, 38*8($sp) \n\ - ldt $f26, 39*8($sp) \n\ - ldt $f27, 40*8($sp) \n\ - ldt $f28, 41*8($sp) \n\ - ldt $f29, 42*8($sp) \n\ - ldt $f30, 43*8($sp) \n\ - /* Flush the Icache after having modified the .plt code. */\n\ - " #IMB " \n\ - /* Clean up and turn control to the destination */ \n\ - lda $sp, 44*8($sp) \n\ - jmp $31, ($27) \n\ - .end " #tramp_name) - -#ifndef PROF -#define ELF_MACHINE_RUNTIME_TRAMPOLINE \ - TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup, imb); \ - TRAMPOLINE_TEMPLATE (_dl_runtime_profile, profile_fixup, /* nop */); -#else -#define ELF_MACHINE_RUNTIME_TRAMPOLINE \ - TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup, imb); \ - strong_alias (_dl_runtime_resolve, _dl_runtime_profile); -#endif - /* Initial entry point code for the dynamic linker. The C function `_dl_start' is the real entry point; its return value is the user program's entry point. */ @@ -501,9 +365,13 @@ elf_machine_plt_value (struct link_map *map, const Elf64_Rela *reloc, return value + reloc->r_addend; } +/* Names of the architecture-specific auditing callback functions. */ +#define ARCH_LA_PLTENTER alpha_gnu_pltenter +#define ARCH_LA_PLTEXIT alpha_gnu_pltexit + #endif /* !dl_machine_h */ -#ifdef RESOLVE +#ifdef RESOLVE_MAP /* Perform the relocation specified by RELOC and SYM (which is fully resolved). MAP is the object containing the reloc. */ @@ -680,4 +548,4 @@ elf_machine_lazy_rel (struct link_map *map, _dl_reloc_bad_type (map, r_type, 1); } -#endif /* RESOLVE */ +#endif /* RESOLVE_MAP */ diff --git a/sysdeps/alpha/dl-trampoline.S b/sysdeps/alpha/dl-trampoline.S new file mode 100644 index 0000000000..42350836ef --- /dev/null +++ b/sysdeps/alpha/dl-trampoline.S @@ -0,0 +1,361 @@ +/* PLT trampolines. Alpha version. + Copyright (C) 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 + 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. */ + +#include + + .set noat + + .globl _dl_runtime_resolve + .ent _dl_runtime_resolve + +#undef FRAMESIZE +#define FRAMESIZE 44*8 + +_dl_runtime_resolve: + lda $30, -FRAMESIZE($30) + .frame $30, FRAMESIZE, $26 + /* Preserve all registers that C normally doesn't. */ + stq $26, 0*8($30) + stq $0, 1*8($30) + stq $1, 2*8($30) + stq $2, 3*8($30) + stq $3, 4*8($30) + stq $4, 5*8($30) + stq $5, 6*8($30) + stq $6, 7*8($30) + stq $7, 8*8($30) + stq $8, 9*8($30) + stq $16, 10*8($30) + stq $17, 11*8($30) + stq $18, 12*8($30) + stq $19, 13*8($30) + stq $20, 14*8($30) + stq $21, 15*8($30) + stq $22, 16*8($30) + stq $23, 17*8($30) + stq $24, 18*8($30) + stq $25, 19*8($30) + stq $29, 20*8($30) + stt $f0, 21*8($30) + stt $f1, 22*8($30) + stt $f10, 23*8($30) + stt $f11, 24*8($30) + stt $f12, 25*8($30) + stt $f13, 26*8($30) + stt $f14, 27*8($30) + stt $f15, 28*8($30) + stt $f16, 29*8($30) + stt $f17, 30*8($30) + stt $f18, 31*8($30) + stt $f19, 32*8($30) + stt $f20, 33*8($30) + stt $f21, 34*8($30) + stt $f22, 35*8($30) + stt $f23, 36*8($30) + stt $f24, 37*8($30) + stt $f25, 38*8($30) + stt $f26, 39*8($30) + stt $f27, 40*8($30) + stt $f28, 41*8($30) + stt $f29, 42*8($30) + stt $f30, 43*8($30) + .mask 0x27ff01ff, -FRAMESIZE + .fmask 0xfffffc03, -FRAMESIZE+21*8 + /* Set up our GP. */ + br $29, .+4 + ldgp $29, 0($29) + .prologue 0 + /* Set up the arguments for _dl_fixup: + $16 = link_map out of plt0 + $17 = offset of reloc entry = ($28 - $27 - 20) /12 * 24 + $18 = return address + */ + subq $28, $27, $17 + ldq $16, 8($27) + subq $17, 20, $17 + mov $26, $18 + addq $17, $17, $17 + bsr $26, _dl_fixup !samegp + + /* Move the destination address into position. */ + mov $0, $27 + /* Restore program registers. */ + ldq $26, 0*8($30) + ldq $0, 1*8($30) + ldq $1, 2*8($30) + ldq $2, 3*8($30) + ldq $3, 4*8($30) + ldq $4, 5*8($30) + ldq $5, 6*8($30) + ldq $6, 7*8($30) + ldq $7, 8*8($30) + ldq $8, 9*8($30) + ldq $16, 10*8($30) + ldq $17, 11*8($30) + ldq $18, 12*8($30) + ldq $19, 13*8($30) + ldq $20, 14*8($30) + ldq $21, 15*8($30) + ldq $22, 16*8($30) + ldq $23, 17*8($30) + ldq $24, 18*8($30) + ldq $25, 19*8($30) + ldq $29, 20*8($30) + ldt $f0, 21*8($30) + ldt $f1, 22*8($30) + ldt $f10, 23*8($30) + ldt $f11, 24*8($30) + ldt $f12, 25*8($30) + ldt $f13, 26*8($30) + ldt $f14, 27*8($30) + ldt $f15, 28*8($30) + ldt $f16, 29*8($30) + ldt $f17, 30*8($30) + ldt $f18, 31*8($30) + ldt $f19, 32*8($30) + ldt $f20, 33*8($30) + ldt $f21, 34*8($30) + ldt $f22, 35*8($30) + ldt $f23, 36*8($30) + ldt $f24, 37*8($30) + ldt $f25, 38*8($30) + ldt $f26, 39*8($30) + ldt $f27, 40*8($30) + ldt $f28, 41*8($30) + ldt $f29, 42*8($30) + ldt $f30, 43*8($30) + /* Flush the Icache after having modified the .plt code. */ + imb + /* Clean up and turn control to the destination */ + lda $30, FRAMESIZE($30) + jmp $31, ($27) + + .end _dl_runtime_resolve + + .globl _dl_runtime_profile + .usepv _dl_runtime_profile, no + .type _dl_runtime_profile, @function + + /* We save the registers in a different order than desired by + .mask/.fmask, so we have to use explicit cfi directives. */ + cfi_startproc + +.macro savei regno, offset + stq $\regno, \offset($30) + cfi_rel_offset(\regno, \offset) +.endm + +.macro savef regno, offset + stt $f\regno, \offset($30) + cfi_rel_offset(\regno+32, \offset) +.endm + +#undef FRAMESIZE +#define FRAMESIZE 50*8 + +_dl_runtime_profile: + lda $30, -FRAMESIZE($30) + cfi_adjust_cfa_offset (FRAMESIZE) + + /* Preserve all argument registers. This also constructs the + La_alpha_regs structure. */ + savei 26, 0*8 + savei 16, 2*8 + savei 17, 3*8 + savei 18, 4*8 + savei 19, 5*8 + savei 20, 6*8 + savei 21, 7*8 + lda $16, FRAMESIZE($30) + savef 16, 8*8 + savef 17, 9*8 + savef 18, 10*8 + savef 19, 11*8 + savef 20, 12*8 + savef 21, 13*8 + stq $16, 1*8($30) + + /* Preserve all registers that C normally doesn't. */ + savei 0, 14*8 + savei 1, 15*8 + savei 2, 16*8 + savei 3, 17*8 + savei 4, 18*8 + savei 5, 19*8 + savei 6, 20*8 + savei 7, 21*8 + savei 8, 22*8 + savei 22, 23*8 + savei 23, 24*8 + savei 24, 25*8 + savei 25, 26*8 + savei 29, 27*8 + savef 0, 28*8 + savef 1, 29*8 + savef 10, 30*8 + savef 11, 31*8 + savef 12, 32*8 + savef 13, 33*8 + savef 14, 34*8 + savef 15, 35*8 + savef 22, 36*8 + savef 23, 37*8 + savef 24, 38*8 + savef 25, 39*8 + savef 26, 40*8 + savef 27, 41*8 + savef 28, 42*8 + savef 29, 43*8 + savef 30, 44*8 + + /* Set up our GP. */ + br $29, .+4 + ldgp $29, 0($29) + + /* Set up the arguments for _dl_profile_fixup: + $16 = link_map out of plt0 + $17 = offset of reloc entry = ($28 - $27 - 20) /12 * 24 + $18 = return address + $19 = La_alpha_regs address + $20 = framesize address + */ + subq $28, $27, $17 + ldq $16, 8($27) + subq $17, 20, $17 + mov $26, $18 + addq $17, $17, $17 + lda $19, 0($30) + lda $20, 45*8($30) + stq $16, 48*8($30) + stq $17, 49*8($30) + + bsr $26, _dl_profile_fixup !samegp + + /* Discover if we're wrapping this call. */ + ldq $18, 45*8($30) + bge $18, 1f + + /* Move the destination address into position. */ + mov $0, $27 + /* Restore program registers. */ + ldq $26, 0*8($30) + ldq $16, 2*8($30) + ldq $17, 3*8($30) + ldq $18, 4*8($30) + ldq $19, 5*8($30) + ldq $20, 6*8($30) + ldq $21, 7*8($30) + ldt $f16, 8*8($30) + ldt $f17, 9*8($30) + ldt $f18, 10*8($30) + ldt $f19, 11*8($30) + ldt $f20, 12*8($30) + ldt $f21, 13*8($30) + ldq $0, 14*8($30) + ldq $1, 15*8($30) + ldq $2, 16*8($30) + ldq $3, 17*8($30) + ldq $4, 18*8($30) + ldq $5, 19*8($30) + ldq $6, 20*8($30) + ldq $7, 21*8($30) + ldq $8, 22*8($30) + ldq $22, 23*8($30) + ldq $23, 24*8($30) + ldq $24, 25*8($30) + ldq $25, 26*8($30) + ldq $29, 27*8($30) + ldt $f0, 28*8($30) + ldt $f1, 29*8($30) + ldt $f10, 30*8($30) + ldt $f11, 31*8($30) + ldt $f12, 32*8($30) + ldt $f13, 33*8($30) + ldt $f14, 34*8($30) + ldt $f15, 35*8($30) + ldt $f22, 36*8($30) + ldt $f23, 37*8($30) + ldt $f24, 38*8($30) + ldt $f25, 39*8($30) + ldt $f26, 40*8($30) + ldt $f27, 41*8($30) + ldt $f28, 42*8($30) + ldt $f29, 43*8($30) + ldt $f30, 44*8($30) + + /* Clean up and turn control to the destination. */ + lda $30, FRAMESIZE($30) + jmp $31, ($27) + +1: + /* Create a frame pointer and allocate a new argument frame. */ + savei 15, 45*8 + mov $30, $15 + cfi_def_cfa_register (15) + addq $18, 15, $18 + bic $18, 15, $18 + subq $30, $18, $30 + + /* Save the call destination around memcpy. */ + stq $0, 46*8($30) + + /* Copy the stack arguments into place. */ + lda $16, 0($30) + lda $17, FRAMESIZE($15) + jsr $26, memcpy + ldgp $29, 0($26) + + /* Reload the argument registers. */ + ldq $27, 46*8($30) + ldq $16, 2*8($15) + ldq $17, 3*8($15) + ldq $18, 4*8($15) + ldq $19, 5*8($15) + ldq $20, 6*8($15) + ldq $21, 7*8($15) + ldt $f16, 8*8($15) + ldt $f17, 9*8($15) + ldt $f18, 10*8($15) + ldt $f19, 11*8($15) + ldt $f20, 12*8($15) + ldt $f21, 13*8($15) + + jsr $26, ($27), 0 + ldgp $29, 0($26) + + /* Set up for call to _dl_call_pltexit. */ + ldq $16, 48($15) + ldq $17, 49($15) + stq $0, 46*8($15) + lda $18, 0($15) + stq $1, 47*8($15) + lda $19, 46*8($15) + stt $f0, 48*8($15) + stt $f1, 49*8($15) + bsr $26, _dl_call_pltexit !samegp + + mov $15, $30 + cfi_def_cfa_register (30) + ldq $26, 0($30) + ldq $15, 45*8($30) + lda $30, FRAMESIZE($30) + ret + + cfi_endproc + .size _dl_runtime_profile, .-_dl_runtime_profile From 9259ad13c309eca896ae5ef24f8402ac9bb7519e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 27 Jan 2005 20:52:04 +0000 Subject: [PATCH 3403/4487] (__old_globfree): Also copy gl_offs. --- sysdeps/unix/sysv/linux/alpha/oldglob.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/oldglob.c b/sysdeps/unix/sysv/linux/alpha/oldglob.c index 9d39176f6b..6d9b79f2c3 100644 --- a/sysdeps/unix/sysv/linux/alpha/oldglob.c +++ b/sysdeps/unix/sysv/linux/alpha/oldglob.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2000, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2000, 2004, 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 @@ -91,6 +91,7 @@ __old_globfree (old_glob_t *pglob) /* We only need these two symbols. */ correct.gl_pathc = pglob->gl_pathc; correct.gl_pathv = pglob->gl_pathv; + correct.gl_offs = pglob->gl_offs; globfree (&correct); } From 2aa0a6fafe2269b9b0458b021e4dd163548e28a9 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 7 Feb 2005 03:11:46 +0000 Subject: [PATCH 3404/4487] * sysdeps/alpha/dl-machine.h (elf_machine_rela): Use RESOLVE_MAP all the time. --- sysdeps/alpha/dl-machine.h | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index fd2269bd30..4166e8c498 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -423,26 +423,16 @@ elf_machine_rela (struct link_map *map, return; else { + struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type); Elf64_Addr sym_value; Elf64_Addr sym_raw_value; -#if defined USE_TLS && !defined RTLD_BOOTSTRAP - struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type); sym_raw_value = sym_value = reloc->r_addend; - if (sym) + if (sym_map) { sym_raw_value += sym->st_value; sym_value = sym_raw_value + sym_map->l_addr; } -#else - Elf64_Addr loadbase = RESOLVE (&sym, version, r_type); - sym_raw_value = sym_value = reloc->r_addend; - if (sym) - { - sym_raw_value += sym->st_value; - sym_value = sym_raw_value + loadbase; - } -#endif if (r_type == R_ALPHA_GLOB_DAT) *reloc_addr = sym_value; From a795af472db9f3a4c46c23439fec724ba15c6e84 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 8 Feb 2005 04:37:48 +0000 Subject: [PATCH 3405/4487] * math/math_private.h (__copysign): Define as builtin for gcc 4. (__copysignf, __copysignl): Likewise. * sysdeps/alpha/fpu/bits/mathinline.h (copysign): Don't define for gcc 4.0. (copysignf, copysignl, fabsf, fabs): Likewise. (__copysign, __copysignf, __copysignl): Remove. (__fabs, __fabsf): Remove. --- sysdeps/alpha/fpu/bits/mathinline.h | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h index 187bd42f33..87d40058c3 100644 --- a/sysdeps/alpha/fpu/bits/mathinline.h +++ b/sysdeps/alpha/fpu/bits/mathinline.h @@ -46,7 +46,8 @@ #if (!defined __NO_MATH_INLINES || defined __LIBC_INTERNAL_MATH_INLINES) \ && defined __OPTIMIZE__ -#define __inline_copysign(NAME, TYPE) \ +#if !__GNUC_PREREQ (4, 0) +# define __inline_copysign(NAME, TYPE) \ __MATH_INLINE TYPE \ __NTH (NAME (TYPE __x, TYPE __y)) \ { \ @@ -60,19 +61,11 @@ __inline_copysign (copysignf, float) __inline_copysign (__copysign, double) __inline_copysign (copysign, double) -#undef __MATH_INLINE_copysign +# undef __inline_copysign +#endif -#if __GNUC_PREREQ (2, 8) -__MATH_INLINE float -__NTH (__fabsf (float __x)) { return __builtin_fabsf (__x); } -__MATH_INLINE float -__NTH (fabsf (float __x)) { return __builtin_fabsf (__x); } -__MATH_INLINE double -__NTH (__fabs (double __x)) { return __builtin_fabs (__x); } -__MATH_INLINE double -__NTH (fabs (double __x)) { return __builtin_fabs (__x); } -#else +#if !__GNUC_PREREQ (2, 8) # define __inline_fabs(NAME, TYPE) \ __MATH_INLINE TYPE \ __NTH (NAME (TYPE __x)) \ From 8cab192c3ebfd5bbd45eec81549900a2bd1fcf2c Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 8 Feb 2005 20:02:24 +0000 Subject: [PATCH 3406/4487] (elf_machine_rela): Remove use of RESOLVE. --- sysdeps/m68k/dl-machine.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index 89d7106365..f31b68772d 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -211,15 +211,8 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, else { const Elf32_Sym *const refsym = sym; -#ifndef RTLD_BOOTSTRAP struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type); Elf32_Addr value = sym == NULL ? 0 : sym_map->l_addr + sym->st_value; -#else - Elf32_Addr value = RESOLVE (&sym, version, r_type); - - if (sym) - value += sym->st_value; -#endif /* !RTLD_BOOTSTRAP */ switch (r_type) { From 890e858b8cd49526a333df9653dd662e49575438 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 15 Feb 2005 00:12:18 +0000 Subject: [PATCH 3407/4487] 2005-02-14 GOTO Masanori * sysdeps/unix/sysv/linux/alpha/syscalls.list: Remove the duplicated getpeername entry. * sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list: Likewise. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 1 - 1 file changed, 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 3bbce1c6fd..7b3f233566 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -16,7 +16,6 @@ oldsemctl EXTRA semctl i:iiii __old_semctl semctl@GLIBC_2.0 sigstack - sigstack 2 sigstack vfork - vfork 0 __vfork vfork -getpeername - getpeername i:ipp __getpeername getpeername getpriority - getpriority i:ii __getpriority getpriority open - open Ci:siv __libc_open __open open !__libc_open64 __open64 open64 open64 open - From 68f3ec56719c41f72b8212c3f9daaa0ec8080ff7 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 25 Feb 2005 15:18:13 +0000 Subject: [PATCH 3408/4487] 2004-11-11 Richard Sandiford [BZ #758] * sysdeps/unix/sysv/linux/mips/configure.in (asm-unistd.h): Only preprocess if it defines ABI-prefixed syscall names like __NR_N32_open. Just include otherwise. * sysdeps/unix/sysv/linux/mips/configure: Regenerate. * sysdeps/unix/sysv/linux/mips/mips32/kern64/sysdep.h: Delete * sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h (SYS_ify): Use the standard __NR prefix. * sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h (SYS_ify): Likewise. * sysdeps/unix/sysv/linux/mips/Makefile (syscall-%.h): Rework so that the output file is compatible with both pre-2.6 and 2.6 kernel headers. Extract separate syscall lists for each ABI. --- sysdeps/unix/sysv/linux/mips/Makefile | 110 +++++++++++++++--- sysdeps/unix/sysv/linux/mips/configure | 4 +- sysdeps/unix/sysv/linux/mips/configure.in | 4 +- .../sysv/linux/mips/mips32/kern64/sysdep.h | 36 ------ .../unix/sysv/linux/mips/mips64/n32/sysdep.h | 6 +- .../unix/sysv/linux/mips/mips64/n64/sysdep.h | 6 +- 6 files changed, 103 insertions(+), 63 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile index d5e4f6b72d..72fa87b3ff 100644 --- a/sysdeps/unix/sysv/linux/mips/Makefile +++ b/sysdeps/unix/sysv/linux/mips/Makefile @@ -9,11 +9,73 @@ sysdep_headers += sys/cachectl.h sys/sysmips.h sys/tas.h no_syscall_list_h = 1 -# Generate the list of SYS_* macros for the system calls (__NR_* macros). -# We generate not only SYS_, pointing at SYS__ if -# it exists, but also define SYS__ for all ABIs. +# A callable macro that expands to a shell command. Preprocess file $(1) +# using ABI option $(2) and see which macros it defines. Print FOO for each +# macro of the form __NR$(3)_FOO, filtering out ABI-specific __NR macros +# that have a prefix other than $(3). +mips_list_syscalls = $(filter-out -m%,$(CC)) -E -x c $(+includes) \ + $(sysincludes) -D_LIBC -dM -mabi=$(2) $(1) | \ + sed -n 's@^\#define __NR$(3)_\([^ ]*\) .*@\1@p' | \ + sed -e '/^[ON]32_/d' -e '/^N64_/d' -e '/^64_/d' | \ + LC_ALL=C sort + +# Generate a list of SYS_* macros from the linux __NR macros. +# +# Before version 2.6, linux had separate 32-bit and 64-bit MIPS ports, +# each with its own set of headers. The ports were merged for 2.6 and +# this merged port defines the syscalls in a slightly different way. +# There are therefore three sets of headers that we need to consider: +# +# (1) Headers from the separate 32-bit MIPS port. They just define +# a single list of __NR macros. +# +# (2) Headers from the separate 64-bit MIPS port. They unconditionally +# define syscalls for all three ABIs, with o32 syscalls prefixed +# by __NR_O32, n32 syscalls prefixed by __NR_N32 and n64 syscalls +# prefixed by plain __NR. +# +# (3) Headers from the combined port. They use the _MIPS_SIM macro to +# define the right set of syscalls for the current ABI. The syscalls +# themselves have no special ABI prefix, but the headers also define: +# +# __NR_O32_Linux{,_syscalls} +# __NR_N32_Linux{,_syscalls} +# __NR_64_Linux{,_syscalls} +# +# In case (1) we just want a simple list of SYS_* macros. In cases (2) +# and (3) we want a file that will work for all three ABIs, regardless +# of which ABI we are currently using. We also want the file to work +# if the user later moves from (2) to (3). Thus the file we create +# for (2) and (3) has the form: +# +# #if _MIPS_SIM == _ABIN32 +# # ifdef __NR_N32_open +# # define SYS_n32syscall1 __NR_N32_n32syscall1 +# # ... +# # else +# # define SYS_n32syscall1 __NR_n32syscall1 +# # ... +# # endif +# #elif _MIPS_SIM == _ABI64 +# # define SYS_n64syscall1 __NR_n64syscall1 +# # ... +# #else +# # ifdef __NR_O32_open +# # define SYS_o32syscall1 __NR_O32_o32syscall1 +# # ... +# # else +# # define SYS_o32syscall1 __NR_o32syscall1 +# # ... +# # endif +# #endif +# +# Here, __NR_N32_open and __NR_O32_open are used to detect case (2) +# over case (3). The n64 SYS_* macros can always use the normal +# ABI-less names. $(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/mips/sys/syscall.h $(make-target-directory) + $(CC) -E -x c $(+includes) $(sysincludes) -D_LIBC $< -MD -MP \ + -MF $(@:.h=.d)-t -MT '$(@:.d=.h) $(@:.h=.d)' > /dev/null { \ echo '/* Generated at libc build time from kernel syscall list. */';\ echo ''; \ @@ -22,28 +84,38 @@ $(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/mips/sys/s echo '#endif'; \ echo ''; \ echo '#include '; \ - rm -f $(@:.d=.h).newt; \ - $(CC) -E -MD -MP -MF $(@:.h=.d)-t -MT '$(@:.d=.h) $(@:.h=.d)' \ - -x c $(+includes) $(sysincludes) $< -D_LIBC -dM | \ - sed -n 's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p' \ - > $(@:.d=.h).newt; \ - if grep SYS_O32_ $(@:.d=.h).newt > /dev/null; then \ + rm -f $(@:.d=.h).new32 $(@:.d=.h).newn32 $(@:.d=.h).new64; \ + $(call mips_list_syscalls,$<,n32,_N32) > $(@:.d=.h).newn32; \ + if test -s $(@:.d=.h).newn32; then \ + if grep open $(@:.d=.h).newn32 > /dev/null; then \ + $(call mips_list_syscalls,$<,32,_O32) > $(@:.d=.h).new32; \ + $(call mips_list_syscalls,$<,64,) > $(@:.d=.h).new64; \ + else \ + $(call mips_list_syscalls,$<,32,) > $(@:.d=.h).new32; \ + $(call mips_list_syscalls,$<,n32,) > $(@:.d=.h).newn32; \ + $(call mips_list_syscalls,$<,64,) > $(@:.d=.h).new64; \ + fi; \ echo '#if _MIPS_SIM == _ABIN32'; \ - sed -n 's/^\(#define SYS_\)N32_/\1/p' < $(@:.d=.h).newt | \ - LC_ALL=C sort; \ + echo '# ifdef __NR_N32_open'; \ + sed 's@\(.*\)@# define SYS_\1 __NR_N32_\1@' < $(@:.d=.h).newn32; \ + echo '# else'; \ + sed 's@\(.*\)@# define SYS_\1 __NR_\1@' < $(@:.d=.h).newn32; \ + echo '# endif'; \ echo '#elif _MIPS_SIM == _ABI64'; \ - sed -n 's/^\(#define SYS_\)N64_/\1/p' < $(@:.d=.h).newt | \ - LC_ALL=C sort; \ + sed 's@\(.*\)@# define SYS_\1 __NR_\1@' < $(@:.d=.h).new64; \ echo '#else'; \ - sed -n 's/^\(#define SYS_\)O32_/\1/p' < $(@:.d=.h).newt | \ - LC_ALL=C sort; \ + echo '# ifdef __NR_O32_open'; \ + sed 's@\(.*\)@# define SYS_\1 __NR_O32_\1@' < $(@:.d=.h).new32; \ + echo '# else'; \ + sed 's@\(.*\)@# define SYS_\1 __NR_\1@' < $(@:.d=.h).new32; \ + echo '# endif'; \ echo '#endif'; \ - sed -n '/^#define SYS_\([ON]32\|N64\)_/p' < $(@:.d=.h).newt | \ - LC_ALL=C sort +1.8; \ else \ - cat $(@:.d=.h).newt; \ + $(CC) -E -x c $(+includes) $(sysincludes) -D_LIBC -dM $< | \ + sed -n 's@^\#define __NR_\([^ ]*\) .*@\#define SYS_\1 __NR_\1@p' | \ + LC_ALL=C sort; \ fi; \ - rm $(@:.d=.h).newt; \ + rm -f $(@:.d=.h).new32 $(@:.d=.h).newn32 $(@:.d=.h).new64; \ } > $(@:.d=.h).new mv -f $(@:.d=.h).new $(@:.d=.h) ifneq (,$(objpfx)) diff --git a/sysdeps/unix/sysv/linux/mips/configure b/sysdeps/unix/sysv/linux/mips/configure index c081795aa1..4d9568f001 100644 --- a/sysdeps/unix/sysv/linux/mips/configure +++ b/sysdeps/unix/sysv/linux/mips/configure @@ -18,7 +18,7 @@ mips*64*) { echo "$as_me:$LINENO: WARNING: *** asm/unistd.h not found, it will not be pre-processed" >&5 echo "$as_me: WARNING: *** asm/unistd.h not found, it will not be pre-processed" >&2;} echo '#include ' > asm-unistd.h - else + elif grep __NR_N32_open "$asm_unistd_h" > /dev/null; then # The point of this preprocessing is to turn __NR_ into # __NR_N64_, as well as to define __NR_ to # __NR__, if __NR__ is defined @@ -68,6 +68,8 @@ BEGIN { print "#include "; } { print; }' + else + echo '#include ' > asm-unistd.h fi ;; mips*) rm -f asm-unistd.h diff --git a/sysdeps/unix/sysv/linux/mips/configure.in b/sysdeps/unix/sysv/linux/mips/configure.in index 67d965dfda..e2e5d16c55 100644 --- a/sysdeps/unix/sysv/linux/mips/configure.in +++ b/sysdeps/unix/sysv/linux/mips/configure.in @@ -18,7 +18,7 @@ mips*64*) if test ! -f "$asm_unistd_h"; then AC_MSG_WARN([*** asm/unistd.h not found, it will not be pre-processed]) echo '#include ' > asm-unistd.h - else + elif grep __NR_N32_open "$asm_unistd_h" > /dev/null; then # The point of this preprocessing is to turn __NR_ into # __NR_N64_, as well as to define __NR_ to # __NR__, if __NR__ is defined @@ -68,6 +68,8 @@ BEGIN { print "#include "; } { print; }' + else + echo '#include ' > asm-unistd.h fi ;; mips*) rm -f asm-unistd.h diff --git a/sysdeps/unix/sysv/linux/mips/mips32/kern64/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips32/kern64/sysdep.h index b0316b657b..e69de29bb2 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/kern64/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips32/kern64/sysdep.h @@ -1,36 +0,0 @@ -/* Copyright (C) 2000, 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 _LINUX_MIPS_MIPS32_KERN64_SYSDEP_H -#define _LINUX_MIPS_MIPS32_KERN64_SYSDEP_H 1 - -/* There is some commonality. */ -#include - -/* For Linux we can use the system call table in the header file - /usr/include/asm/unistd.h - of the kernel. But these symbols do not follow the SYS_* syntax - so we have to redefine the `SYS_ify' macro here. */ -#undef SYS_ify -#ifdef __STDC__ -# define SYS_ify(syscall_name) __NR_O32_##syscall_name -#else -# define SYS_ify(syscall_name) __NR_O32_/**/syscall_name -#endif - -#endif /* linux/mips/mips32/kern64/sysdep.h */ diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h index be343aabca..e6013669a4 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002, 2003, 2004, 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 @@ -28,9 +28,9 @@ so we have to redefine the `SYS_ify' macro here. */ #undef SYS_ify #ifdef __STDC__ -# define SYS_ify(syscall_name) __NR_N32_##syscall_name +# define SYS_ify(syscall_name) __NR_##syscall_name #else -# define SYS_ify(syscall_name) __NR_N32_/**/syscall_name +# define SYS_ify(syscall_name) __NR_/**/syscall_name #endif #ifdef __ASSEMBLER__ diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h index f30a465081..dc0a1a0edc 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002, 2003, 2004, 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 @@ -28,9 +28,9 @@ so we have to redefine the `SYS_ify' macro here. */ #undef SYS_ify #ifdef __STDC__ -# define SYS_ify(syscall_name) __NR_N64_##syscall_name +# define SYS_ify(syscall_name) __NR_##syscall_name #else -# define SYS_ify(syscall_name) __NR_N64_/**/syscall_name +# define SYS_ify(syscall_name) __NR_/**/syscall_name #endif #ifdef __ASSEMBLER__ From c5cb341b7214beaba08096180729020d7a543b91 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 1 Mar 2005 20:34:40 +0000 Subject: [PATCH 3409/4487] 2005-03-01 Roland McGrath [BZ #721] * sysdeps/arm/dl-machine.h (ELF_MACHINE_NO_RELA): Define this outside of [RESOLVE_MAP]. --- sysdeps/arm/dl-machine.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 761f8daeaa..e8015ac5fe 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. ARM version. - Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 + Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -350,13 +350,14 @@ elf_machine_plt_value (struct link_map *map, const Elf32_Rel *reloc, #endif /* !dl_machine_h */ -#ifdef RESOLVE /* ARM never uses Elf32_Rela relocations for the dynamic linker. Prelinked libraries may use Elf32_Rela though. */ -# ifdef RTLD_BOOTSTRAP -# define ELF_MACHINE_NO_RELA 1 -# endif +#ifdef RTLD_BOOTSTRAP +# define ELF_MACHINE_NO_RELA 1 +#endif + +#ifdef RESOLVE /* Deal with an out-of-range PC24 reloc. */ static Elf32_Addr From 816c550ea586fe871bd3baa33e42a9c284f5cdc8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 6 Mar 2005 00:07:58 +0000 Subject: [PATCH 3410/4487] (ELF_MACHINE_NO_RELA): Define unconditionally to defined RTLD_BOOTSTRAP. --- sysdeps/arm/dl-machine.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index e8015ac5fe..b85b4f117f 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -353,9 +353,7 @@ elf_machine_plt_value (struct link_map *map, const Elf32_Rel *reloc, /* ARM never uses Elf32_Rela relocations for the dynamic linker. Prelinked libraries may use Elf32_Rela though. */ -#ifdef RTLD_BOOTSTRAP -# define ELF_MACHINE_NO_RELA 1 -#endif +#define ELF_MACHINE_NO_RELA defined RTLD_BOOTSTRAP #ifdef RESOLVE From 2d48195c9fb478d825cc04e93fd0ea1b8f2cccfa Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 13 Mar 2005 03:27:22 +0000 Subject: [PATCH 3411/4487] 2005-03-10 GOTO Masanori * sysdeps/hppa/configure.in: Remove old Makefile leftovers. * sysdeps/hppa/configure: Regenerated. --- sysdeps/hppa/configure | 1 - sysdeps/hppa/configure.in | 1 - 2 files changed, 2 deletions(-) diff --git a/sysdeps/hppa/configure b/sysdeps/hppa/configure index 07bde0e0ee..bc01e46b6c 100644 --- a/sysdeps/hppa/configure +++ b/sysdeps/hppa/configure @@ -1,6 +1,5 @@ # This file is generated from configure.in by Autoconf. DO NOT EDIT! -hppa*linux*) echo "$as_me:$LINENO: checking for assembler line separator" >&5 echo $ECHO_N "checking for assembler line separator... $ECHO_C" >&6 if test "${libc_cv_asm_line_sep+set}" = set; then diff --git a/sysdeps/hppa/configure.in b/sysdeps/hppa/configure.in index 1ec6780835..1ec417b947 100644 --- a/sysdeps/hppa/configure.in +++ b/sysdeps/hppa/configure.in @@ -2,7 +2,6 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. dnl The standard hppa assembler uses `;' to start comments and `!' dnl as a line separator. -hppa*linux*) AC_CACHE_CHECK(for assembler line separator, libc_cv_asm_line_sep, [dnl cat > conftest.s < Date: Tue, 15 Mar 2005 22:57:26 +0000 Subject: [PATCH 3412/4487] 2005-03-15 Jakub Jelinek * elf/dynamic-link.h (elf_machine_rel, elf_machine_rel_relative, elf_machine_rela, elf_machine_rela_relative, elf_machine_lazy_rel): Add inline keyword. * sysdeps/alpha/dl-machine.h (elf_machine_rela, elf_machine_rela_relative, elf_machine_lazy_rel): Add always_inline attribute. * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela, elf_machine_rela_relative, elf_machine_lazy_rel): Likewise. Change static inline into auto inline. * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela, elf_machine_rela_relative, elf_machine_lazy_rel): Likewise. * sysdeps/generic/dl-machine.h (elf_machine_rel, elf_machine_rela): Likewise. * sysdeps/arm/dl-machine.h (elf_machine_rel, elf_machine_rel_relative, elf_machine_rela, elf_machine_rela_relative, elf_machine_lazy_rel): Likewise. --- sysdeps/alpha/dl-machine.h | 5 ++++- sysdeps/arm/dl-machine.h | 15 ++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 4166e8c498..173a4111f8 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. Alpha version. - Copyright (C) 1996-2002, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 1996-2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson . @@ -376,6 +376,7 @@ elf_machine_plt_value (struct link_map *map, const Elf64_Rela *reloc, /* Perform the relocation specified by RELOC and SYM (which is fully resolved). MAP is the object containing the reloc. */ auto inline void +__attribute__ ((always_inline)) elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc, const Elf64_Sym *sym, @@ -504,6 +505,7 @@ elf_machine_rela (struct link_map *map, #define ELF_MACHINE_REL_RELATIVE 1 auto inline void +__attribute__ ((always_inline)) elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc, void *const reloc_addr_arg) { @@ -520,6 +522,7 @@ elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc, } auto inline void +__attribute__ ((always_inline)) elf_machine_lazy_rel (struct link_map *map, Elf64_Addr l_addr, const Elf64_Rela *reloc) { diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index b85b4f117f..0fe47b2f80 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -391,7 +391,8 @@ fix_bad_pc24 (Elf32_Addr *const reloc_addr, Elf32_Addr value) /* Perform the relocation specified by RELOC and SYM (which is fully resolved). MAP is the object containing the reloc. */ -static inline void +auto inline void +__attribute__ ((always_inline)) elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, const Elf32_Sym *sym, const struct r_found_version *version, void *const reloc_addr_arg) @@ -516,7 +517,8 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, } # ifndef RTLD_BOOTSTRAP -static inline void +auto inline void +__attribute__ ((always_inline)) elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, const Elf32_Sym *sym, const struct r_found_version *version, void *const reloc_addr_arg) @@ -596,7 +598,8 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, } # endif -static inline void +auto inline void +__attribute__ ((always_inline)) elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rel *reloc, void *const reloc_addr_arg) { @@ -605,7 +608,8 @@ elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rel *reloc, } # ifndef RTLD_BOOTSTRAP -static inline void +auto inline void +__attribute__ ((always_inline)) elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, void *const reloc_addr_arg) { @@ -614,7 +618,8 @@ elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, } # endif -static inline void +auto inline void +__attribute__ ((always_inline)) elf_machine_lazy_rel (struct link_map *map, Elf32_Addr l_addr, const Elf32_Rel *reloc) { From 5b25b6ab543c0350446a7b78c0dc7820f2d97dcc Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 17 Mar 2005 00:32:10 +0000 Subject: [PATCH 3413/4487] Finish remove not committed properly --- sysdeps/unix/sysv/linux/mips/mips32/kern64/sysdep.h | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/mips/mips32/kern64/sysdep.h diff --git a/sysdeps/unix/sysv/linux/mips/mips32/kern64/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips32/kern64/sysdep.h deleted file mode 100644 index e69de29bb2..0000000000 From 86462436329531f91dd2b97442b455443831819b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 20 Mar 2005 04:30:28 +0000 Subject: [PATCH 3414/4487] Add __USE_MISC and __USE_XOPEN guards to match linux/bits/termios.h. (CMSPAR): Define. --- sysdeps/unix/sysv/linux/alpha/bits/termios.h | 85 ++++++++++++-------- 1 file changed, 51 insertions(+), 34 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/termios.h b/sysdeps/unix/sysv/linux/alpha/bits/termios.h index f26e84c9f6..966ccf94da 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/termios.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/termios.h @@ -1,5 +1,5 @@ /* termios type and macro definitions. Linux version. - Copyright (C) 1993,1994,1995,1996,1997,1999,2003 + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1999, 2003, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -91,34 +91,42 @@ struct termios #define OFILL 00000100 #define OFDEL 00000200 -#define NLDLY 00001400 -#define NL0 00000000 -#define NL1 00000400 -#define NL2 00001000 -#define NL3 00001400 -#define TABDLY 00006000 -#define TAB0 00000000 -#define TAB1 00002000 -#define TAB2 00004000 -#define TAB3 00006000 -#define CRDLY 00030000 -#define CR0 00000000 -#define CR1 00010000 -#define CR2 00020000 -#define CR3 00030000 -#define FFDLY 00040000 -#define FF0 00000000 -#define FF1 00040000 -#define BSDLY 00100000 -#define BS0 00000000 -#define BS1 00100000 +#if defined __USE_MISC || defined __USE_XOPEN +# define NLDLY 00001400 +# define NL0 00000000 +# define NL1 00000400 +# define NL2 00001000 +# define NL3 00001400 +# define TABDLY 00006000 +# define TAB0 00000000 +# define TAB1 00002000 +# define TAB2 00004000 +# define TAB3 00006000 +# define CRDLY 00030000 +# define CR0 00000000 +# define CR1 00010000 +# define CR2 00020000 +# define CR3 00030000 +# define FFDLY 00040000 +# define FF0 00000000 +# define FF1 00040000 +# define BSDLY 00100000 +# define BS0 00000000 +# define BS1 00100000 +#endif + #define VTDLY 00200000 #define VT0 00000000 #define VT1 00200000 -#define XTABS 01000000 /* Hmm.. Linux/i386 considers this part of TABDLY.. */ + +#ifdef __USE_MISC +# define XTABS 01000000 /* Hmm.. Linux/i386 considers this part of TABDLY.. */ +#endif /* c_cflag bit meaning */ -#define CBAUD 0000037 +#ifdef __USE_MISC +# define CBAUD 0000037 +#endif #define B0 0000000 /* hang up */ #define B50 0000001 #define B75 0000002 @@ -135,9 +143,11 @@ struct termios #define B9600 0000015 #define B19200 0000016 #define B38400 0000017 -#define EXTA B19200 -#define EXTB B38400 -#define CBAUDEX 0000000 +#ifdef __USE_MISC +# define EXTA B19200 +# define EXTB B38400 +# define CBAUDEX 0000000 +#endif #define B57600 00020 #define B115200 00021 #define B230400 00022 @@ -169,23 +179,30 @@ struct termios #define HUPCL 00040000 #define CLOCAL 00100000 -#define CRTSCTS 020000000000 /* flow control */ +#ifdef __USE_MISC +# define CMSPAR 010000000000 /* mark or space (stick) parity */ +# define CRTSCTS 020000000000 /* flow control */ +#endif /* c_lflag bits */ #define ISIG 0x00000080 #define ICANON 0x00000100 -#define XCASE 0x00004000 +#if defined __USE_MISC || defined __USE_XOPEN +# define XCASE 0x00004000 +#endif #define ECHO 0x00000008 #define ECHOE 0x00000002 #define ECHOK 0x00000004 #define ECHONL 0x00000010 #define NOFLSH 0x80000000 #define TOSTOP 0x00400000 -#define ECHOCTL 0x00000040 -#define ECHOPRT 0x00000020 -#define ECHOKE 0x00000001 -#define FLUSHO 0x00800000 -#define PENDIN 0x20000000 +#ifdef __USE_MISC +# define ECHOCTL 0x00000040 +# define ECHOPRT 0x00000020 +# define ECHOKE 0x00000001 +# define FLUSHO 0x00800000 +# define PENDIN 0x20000000 +#endif #define IEXTEN 0x00000400 /* Values for the ACTION argument to `tcflow'. */ From f5e233c54ec3528cffc638e0f088f147aeab167b Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 28 Mar 2005 07:43:51 +0000 Subject: [PATCH 3415/4487] MIPS specific --- sysdeps/mips/bits/link.h | 118 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 sysdeps/mips/bits/link.h diff --git a/sysdeps/mips/bits/link.h b/sysdeps/mips/bits/link.h new file mode 100644 index 0000000000..3d77a4c4a5 --- /dev/null +++ b/sysdeps/mips/bits/link.h @@ -0,0 +1,118 @@ +/* Copyright (C) 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 + 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 _LINK_H +# error "Never include directly; use instead." +#endif + +#include + +#if _MIPS_SIM == _ABIO32 + +/* Registers for entry into PLT on MIPS. */ +typedef struct La_mips_32_regs +{ + uint32_t lr_reg[4]; /* $a0 through $a3 */ + double lr_fpreg[2]; /* $f12 and $f14 */ + uint32_t lr_ra; + uint32_t lr_sp; +} La_mips_32_regs; + +/* Return values for calls from PLT on MIPS. */ +typedef struct La_mips_32_retval +{ + uint32_t lrv_v0; + uint32_t lrv_v1; + double lrv_f0; + double lrv_f2; +} La_mips_32_retval; + +#else + +typedef struct La_mips_64_regs +{ + uint64_t lr_reg[8]; /* $a0 through $a7 */ + double lr_fpreg[8]; /* $f12 throgh $f19 */ + uint64_t lr_ra; + uint64_t lr_sp; +} La_mips_64_regs; + +/* Return values for calls from PLT on MIPS. */ +typedef struct La_mips_64_retval +{ + uint64_t lrv_v0; + uint64_t lrv_v1; + double lrv_f0; + double lrv_f2; +} La_mips_64_retval; + +#endif + +__BEGIN_DECLS + +#if _MIPS_SIM == _ABIO32 + +extern Elf32_Addr la_mips_o32_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + La_mips_32_regs *__regs, + unsigned int *__flags, + const char *__symname, + long int *__framesizep); +extern unsigned int la_mips_o32_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + const La_mips_32_regs *__inregs, + La_mips_32_retval *__outregs, + const char *symname); + +#elif _MIPS_SIM == _ABIN32 + +extern Elf32_Addr la_mips_n32_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + La_mips_64_regs *__regs, + unsigned int *__flags, + const char *__symname, + long int *__framesizep); +extern unsigned int la_mips_n32_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + const La_mips_64_regs *__inregs, + La_mips_64_retval *__outregs, + const char *symname); + +#else + +extern Elf64_Addr la_mips_n64_gnu_pltenter (Elf64_Sym *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + La_mips_64_regs *__regs, + unsigned int *__flags, + const char *__symname, + long int *__framesizep); +extern unsigned int la_mips_n64_gnu_pltexit (Elf64_Sym *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + const La_mips_64_regs *__inregs, + La_mips_64_retval *__outregs, + const char *symname); + +#endif + +__END_DECLS From 43dbf87f2078806865fe82d11287dd14d81dc135 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 28 Mar 2005 07:44:17 +0000 Subject: [PATCH 3416/4487] MIPS specific dl-trampoline.c. --- sysdeps/mips/dl-trampoline.c | 272 +++++++++++++++++++++++++++++++++++ 1 file changed, 272 insertions(+) create mode 100644 sysdeps/mips/dl-trampoline.c diff --git a/sysdeps/mips/dl-trampoline.c b/sysdeps/mips/dl-trampoline.c new file mode 100644 index 0000000000..c5ea59cdb2 --- /dev/null +++ b/sysdeps/mips/dl-trampoline.c @@ -0,0 +1,272 @@ +/* PLT trampoline. MIPS version. + Copyright (C) 1996-2001, 2002, 2003, 2004, 2005 + Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Kazumoto Kojima . + + 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. */ + +/* FIXME: Profiling of shared libraries is not implemented yet. */ + +#include +#include +#include +#include +#include + +/* Get link map for callers object containing STUB_PC. */ +static inline struct link_map * +elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc) +{ + extern int _dl_mips_gnu_objects; + + /* got[1] is reserved to keep its link map address for the shared + object generated by the gnu linker. If all are such objects, we + can find the link map from current GPREG simply. If not so, get + the link map for caller's object containing STUB_PC. */ + + if (_dl_mips_gnu_objects) + { + ElfW(Addr) *got = elf_mips_got_from_gpreg (gpreg); + ElfW(Word) g1; + + g1 = ((ElfW(Word) *) got)[1]; + + if ((g1 & ELF_MIPS_GNU_GOT1_MASK) != 0) + { + struct link_map *l = + (struct link_map *) (g1 & ~ELF_MIPS_GNU_GOT1_MASK); + ElfW(Addr) base, limit; + const ElfW(Phdr) *p = l->l_phdr; + ElfW(Half) this, nent = l->l_phnum; + + /* For the common case of a stub being called from the containing + object, STUB_PC will point to somewhere within the object that + is described by the link map fetched via got[1]. Otherwise we + have to scan all maps. */ + for (this = 0; this < nent; this++) + { + if (p[this].p_type == PT_LOAD) + { + base = p[this].p_vaddr + l->l_addr; + limit = base + p[this].p_memsz; + if (stub_pc >= base && stub_pc < limit) + return l; + } + } + } + } + + struct link_map *l; + Lmid_t nsid; + + for (nsid = 0; nsid < DL_NNS; ++nsid) + for (l = GL(dl_ns)[nsid]._ns_loaded; l != NULL; l = l->l_next) + { + ElfW(Addr) base, limit; + const ElfW(Phdr) *p = l->l_phdr; + ElfW(Half) this, nent = l->l_phnum; + + for (this = 0; this < nent; ++this) + { + if (p[this].p_type == PT_LOAD) + { + base = p[this].p_vaddr + l->l_addr; + limit = base + p[this].p_memsz; + if (stub_pc >= base && stub_pc < limit) + return l; + } + } + } + + _dl_signal_error (0, NULL, NULL, "cannot find runtime link map"); + return NULL; +} + +/* Define mips specific runtime resolver. The function __dl_runtime_resolve + is called from assembler function _dl_runtime_resolve which converts + special argument registers t7 ($15) and t8 ($24): + t7 address to return to the caller of the function + t8 index for this function symbol in .dynsym + to usual c arguments. + + Other architectures call fixup from dl-runtime.c in + _dl_runtime_resolve. MIPS instead calls __dl_runtime_resolve. We + have to use our own version because of the way the got section is + treated on MIPS (we've also got ELF_MACHINE_PLT defined). */ + +/* The flag _dl_mips_gnu_objects is set if all dynamic objects are + generated by the gnu linker. */ +int _dl_mips_gnu_objects = 1; + +#define VERSYMIDX(sym) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (sym)) + +/* This is called from assembly stubs below which the compiler can't see. */ +static ElfW(Addr) +__dl_runtime_resolve (ElfW(Word), ElfW(Word), ElfW(Addr), ElfW(Addr)) + __attribute_used__; + +static ElfW(Addr) +__dl_runtime_resolve (ElfW(Word) sym_index, + ElfW(Word) return_address, + ElfW(Addr) old_gpreg, + ElfW(Addr) stub_pc) +{ + struct link_map *l = elf_machine_runtime_link_map (old_gpreg, stub_pc); + const ElfW(Sym) *const symtab + = (const ElfW(Sym) *) D_PTR (l, l_info[DT_SYMTAB]); + const char *strtab = (const void *) D_PTR (l, l_info[DT_STRTAB]); + ElfW(Addr) *got + = (ElfW(Addr) *) D_PTR (l, l_info[DT_PLTGOT]); + const ElfW(Word) local_gotno + = (const ElfW(Word)) l->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; + const ElfW(Word) gotsym + = (const ElfW(Word)) l->l_info[DT_MIPS (GOTSYM)]->d_un.d_val; + const ElfW(Sym) *sym = &symtab[sym_index]; + struct link_map *sym_map; + ElfW(Addr) value; + + /* FIXME: The symbol versioning stuff is not tested yet. */ + if (__builtin_expect (ELFW(ST_VISIBILITY) (sym->st_other), 0) == 0) + { + switch (l->l_info[VERSYMIDX (DT_VERSYM)] != NULL) + { + default: + { + const ElfW(Half) *vernum = + (const void *) D_PTR (l, l_info[VERSYMIDX (DT_VERSYM)]); + ElfW(Half) ndx = vernum[sym_index] & 0x7fff; + const struct r_found_version *version = &l->l_versions[ndx]; + + if (version->hash != 0) + { + sym_map = _dl_lookup_symbol_x (strtab + sym->st_name, l, + &sym, l->l_scope, version, + ELF_RTYPE_CLASS_PLT, 0, 0); + break; + } + /* Fall through. */ + } + case 0: + sym_map = _dl_lookup_symbol_x (strtab + sym->st_name, l, &sym, + l->l_scope, 0, ELF_RTYPE_CLASS_PLT, + DL_LOOKUP_ADD_DEPENDENCY, 0); + } + + /* Currently value contains the base load address of the object + that defines sym. Now add in the symbol offset. */ + value = (sym ? sym_map->l_addr + sym->st_value : 0); + } + else + /* We already found the symbol. The module (and therefore its load + address) is also known. */ + value = l->l_addr + sym->st_value; + + /* Apply the relocation with that value. */ + *(got + local_gotno + sym_index - gotsym) = value; + + return value; +} + +#if _MIPS_SIM == _ABIO32 +#define ELF_DL_FRAME_SIZE 40 + +#define ELF_DL_SAVE_ARG_REGS "\ + sw $15, 36($29)\n \ + sw $4, 16($29)\n \ + sw $5, 20($29)\n \ + sw $6, 24($29)\n \ + sw $7, 28($29)\n \ +" + +#define ELF_DL_RESTORE_ARG_REGS "\ + lw $31, 36($29)\n \ + lw $4, 16($29)\n \ + lw $5, 20($29)\n \ + lw $6, 24($29)\n \ + lw $7, 28($29)\n \ +" + +#define IFABIO32(X) X + +#else /* _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64 */ + +#define ELF_DL_FRAME_SIZE 80 + +#define ELF_DL_SAVE_ARG_REGS "\ + sd $15, 72($29)\n \ + sd $4, 8($29)\n \ + sd $5, 16($29)\n \ + sd $6, 24($29)\n \ + sd $7, 32($29)\n \ + sd $8, 40($29)\n \ + sd $9, 48($29)\n \ + sd $10, 56($29)\n \ + sd $11, 64($29)\n \ +" + +#define ELF_DL_RESTORE_ARG_REGS "\ + ld $31, 72($29)\n \ + ld $4, 8($29)\n \ + ld $5, 16($29)\n \ + ld $6, 24($29)\n \ + ld $7, 32($29)\n \ + ld $8, 40($29)\n \ + ld $9, 48($29)\n \ + ld $10, 56($29)\n \ + ld $11, 64($29)\n \ +" + +#define IFABIO32(X) + +#endif + +asm ("\n\ + .text\n\ + .align 2\n\ + .globl _dl_runtime_resolve\n\ + .type _dl_runtime_resolve,@function\n\ + .ent _dl_runtime_resolve\n\ +_dl_runtime_resolve:\n\ + .frame $29, " STRINGXP(ELF_DL_FRAME_SIZE) ", $31\n\ + .set noreorder\n\ + # Save GP.\n\ + move $3, $28\n\ + # Save arguments and sp value in stack.\n\ + " STRINGXP(PTR_SUBIU) " $29, " STRINGXP(ELF_DL_FRAME_SIZE) "\n\ + # Modify t9 ($25) so as to point .cpload instruction.\n\ + " IFABIO32(STRINGXP(PTR_ADDIU) " $25, 12\n") "\ + # Compute GP.\n\ + " STRINGXP(SETUP_GP) "\n\ + " STRINGXV(SETUP_GP64 (0, _dl_runtime_resolve)) "\n\ + .set reorder\n\ + # Save slot call pc.\n\ + move $2, $31\n\ + " IFABIO32(STRINGXP(CPRESTORE(32))) "\n\ + " ELF_DL_SAVE_ARG_REGS "\ + move $4, $24\n\ + move $5, $15\n\ + move $6, $3\n\ + move $7, $2\n\ + jal __dl_runtime_resolve\n\ + " ELF_DL_RESTORE_ARG_REGS "\ + " STRINGXP(RESTORE_GP64) "\n\ + " STRINGXP(PTR_ADDIU) " $29, " STRINGXP(ELF_DL_FRAME_SIZE) "\n\ + move $25, $2\n\ + jr $25\n\ + .end _dl_runtime_resolve\n\ + .previous\n\ +"); From bd9fad095a16ea27dbf38037d4d7a7d066407f44 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 28 Mar 2005 07:47:27 +0000 Subject: [PATCH 3417/4487] (elf_machine_runtime_link_map, ELF_DL_FRAME_SIZE, ELF_DL_SAVE_ARG_REGS, ELF_DL_RESTORE_ARG_REGS, ELF_MACHINE_RUNTIME_TRAMPOLINE): Move to dl-trampoline.c. (RTLD_START): Align the stack before calling _dl_init_internal. Use .ent for _dl_start_user. (ARCH_LA_PLTENTER, ARCH_LA_PLTEXIT): Define. (elf_machine_rel, elf_machine_rel_relative, elf_machine_lazy_rel) (elf_machine_runtime_setup): Use "auto inline". (elf_machine_rela, elf_machine_rela_relative): Provide empty versions. (elf_machine_got_rel): Likewise. Use RESOLVE_MAP. --- sysdeps/mips/dl-machine.h | 319 +++++++------------------------------- 1 file changed, 55 insertions(+), 264 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 0d87b65691..a8a41fff02 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -188,248 +188,6 @@ do { \ } while(0) -/* Get link map for callers object containing STUB_PC. */ -static inline struct link_map * -elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc) -{ - extern int _dl_mips_gnu_objects; - - /* got[1] is reserved to keep its link map address for the shared - object generated by the gnu linker. If all are such objects, we - can find the link map from current GPREG simply. If not so, get - the link map for caller's object containing STUB_PC. */ - - if (_dl_mips_gnu_objects) - { - ElfW(Addr) *got = elf_mips_got_from_gpreg (gpreg); - ElfW(Word) g1; - - g1 = ((ElfW(Word) *) got)[1]; - - if ((g1 & ELF_MIPS_GNU_GOT1_MASK) != 0) - { - struct link_map *l = - (struct link_map *) (g1 & ~ELF_MIPS_GNU_GOT1_MASK); - ElfW(Addr) base, limit; - const ElfW(Phdr) *p = l->l_phdr; - ElfW(Half) this, nent = l->l_phnum; - - /* For the common case of a stub being called from the containing - object, STUB_PC will point to somewhere within the object that - is described by the link map fetched via got[1]. Otherwise we - have to scan all maps. */ - for (this = 0; this < nent; this++) - { - if (p[this].p_type == PT_LOAD) - { - base = p[this].p_vaddr + l->l_addr; - limit = base + p[this].p_memsz; - if (stub_pc >= base && stub_pc < limit) - return l; - } - } - } - } - - struct link_map *l; - Lmid_t nsid; - - for (nsid = 0; nsid < DL_NNS; ++nsid) - for (l = GL(dl_ns)[nsid]._ns_loaded; l != NULL; l = l->l_next) - { - ElfW(Addr) base, limit; - const ElfW(Phdr) *p = l->l_phdr; - ElfW(Half) this, nent = l->l_phnum; - - for (this = 0; this < nent; ++this) - { - if (p[this].p_type == PT_LOAD) - { - base = p[this].p_vaddr + l->l_addr; - limit = base + p[this].p_memsz; - if (stub_pc >= base && stub_pc < limit) - return l; - } - } - } - - _dl_signal_error (0, NULL, NULL, "cannot find runtime link map"); - return NULL; -} - -#if _MIPS_SIM == _ABIO32 -#define ELF_DL_FRAME_SIZE 40 - -#define ELF_DL_SAVE_ARG_REGS "\ - sw $15, 36($29)\n \ - sw $4, 16($29)\n \ - sw $5, 20($29)\n \ - sw $6, 24($29)\n \ - sw $7, 28($29)\n \ -" - -#define ELF_DL_RESTORE_ARG_REGS "\ - lw $31, 36($29)\n \ - lw $4, 16($29)\n \ - lw $5, 20($29)\n \ - lw $6, 24($29)\n \ - lw $7, 28($29)\n \ -" - -#define IFABIO32(X) X - -#else /* _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64 */ - -#define ELF_DL_FRAME_SIZE 80 - -#define ELF_DL_SAVE_ARG_REGS "\ - sd $15, 72($29)\n \ - sd $4, 8($29)\n \ - sd $5, 16($29)\n \ - sd $6, 24($29)\n \ - sd $7, 32($29)\n \ - sd $8, 40($29)\n \ - sd $9, 48($29)\n \ - sd $10, 56($29)\n \ - sd $11, 64($29)\n \ -" - -#define ELF_DL_RESTORE_ARG_REGS "\ - ld $31, 72($29)\n \ - ld $4, 8($29)\n \ - ld $5, 16($29)\n \ - ld $6, 24($29)\n \ - ld $7, 32($29)\n \ - ld $8, 40($29)\n \ - ld $9, 48($29)\n \ - ld $10, 56($29)\n \ - ld $11, 64($29)\n \ -" - -#define IFABIO32(X) - -#endif - -/* Define mips specific runtime resolver. The function __dl_runtime_resolve - is called from assembler function _dl_runtime_resolve which converts - special argument registers t7 ($15) and t8 ($24): - t7 address to return to the caller of the function - t8 index for this function symbol in .dynsym - to usual c arguments. - - Other architectures call fixup from dl-runtime.c in - _dl_runtime_resolve. MIPS instead calls __dl_runtime_resolve. We - have to use our own version because of the way the got section is - treated on MIPS (we've also got ELF_MACHINE_PLT defined). */ - -#define ELF_MACHINE_RUNTIME_TRAMPOLINE \ -/* The flag _dl_mips_gnu_objects is set if all dynamic objects are \ - generated by the gnu linker. */ \ -int _dl_mips_gnu_objects = 1; \ - \ -/* This is called from assembly stubs below which the compiler can't see. */ \ -static ElfW(Addr) \ -__dl_runtime_resolve (ElfW(Word), ElfW(Word), ElfW(Addr), ElfW(Addr)) \ - __attribute_used__; \ - \ -static ElfW(Addr) \ -__dl_runtime_resolve (ElfW(Word) sym_index, \ - ElfW(Word) return_address, \ - ElfW(Addr) old_gpreg, \ - ElfW(Addr) stub_pc) \ -{ \ - struct link_map *l = elf_machine_runtime_link_map (old_gpreg, stub_pc); \ - const ElfW(Sym) *const symtab \ - = (const ElfW(Sym) *) D_PTR (l, l_info[DT_SYMTAB]); \ - const char *strtab = (const void *) D_PTR (l, l_info[DT_STRTAB]); \ - ElfW(Addr) *got \ - = (ElfW(Addr) *) D_PTR (l, l_info[DT_PLTGOT]); \ - const ElfW(Word) local_gotno \ - = (const ElfW(Word)) l->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; \ - const ElfW(Word) gotsym \ - = (const ElfW(Word)) l->l_info[DT_MIPS (GOTSYM)]->d_un.d_val; \ - const ElfW(Sym) *sym = &symtab[sym_index]; \ - ElfW(Addr) value; \ - \ - /* FIXME: The symbol versioning stuff is not tested yet. */ \ - if (__builtin_expect (ELFW(ST_VISIBILITY) (sym->st_other), 0) == 0) \ - { \ - switch (l->l_info[VERSYMIDX (DT_VERSYM)] != NULL) \ - { \ - default: \ - { \ - const ElfW(Half) *vernum = \ - (const void *) D_PTR (l, l_info[VERSYMIDX (DT_VERSYM)]); \ - ElfW(Half) ndx = vernum[sym_index] & 0x7fff; \ - const struct r_found_version *version = &l->l_versions[ndx]; \ - \ - if (version->hash != 0) \ - { \ - value = _dl_lookup_symbol_x (strtab + sym->st_name, l, \ - &sym, l->l_scope, version, \ - ELF_RTYPE_CLASS_PLT, 0, 0); \ - break; \ - } \ - /* Fall through. */ \ - } \ - case 0: \ - value = _dl_lookup_symbol_x (strtab + sym->st_name, l, &sym, \ - l->l_scope, 0, ELF_RTYPE_CLASS_PLT, \ - DL_LOOKUP_ADD_DEPENDENCY, 0); \ - } \ - \ - /* Currently value contains the base load address of the object \ - that defines sym. Now add in the symbol offset. */ \ - value = (sym ? value + sym->st_value : 0); \ - } \ - else \ - /* We already found the symbol. The module (and therefore its load \ - address) is also known. */ \ - value = l->l_addr + sym->st_value; \ - \ - /* Apply the relocation with that value. */ \ - *(got + local_gotno + sym_index - gotsym) = value; \ - \ - return value; \ -} \ - \ -asm ("\n \ - .text\n \ - .align 2\n \ - .globl _dl_runtime_resolve\n \ - .type _dl_runtime_resolve,@function\n \ - .ent _dl_runtime_resolve\n \ -_dl_runtime_resolve:\n \ - .frame $29, " STRINGXP(ELF_DL_FRAME_SIZE) ", $31\n \ - .set noreorder\n \ - # Save GP.\n \ - move $3, $28\n \ - # Save arguments and sp value in stack.\n \ - " STRINGXP(PTR_SUBIU) " $29, " STRINGXP(ELF_DL_FRAME_SIZE) "\n \ - # Modify t9 ($25) so as to point .cpload instruction.\n \ - " IFABIO32(STRINGXP(PTR_ADDIU) " $25, 12\n") " \ - # Compute GP.\n \ - " STRINGXP(SETUP_GP) "\n \ - " STRINGXV(SETUP_GP64 (0, _dl_runtime_resolve)) "\n \ - .set reorder\n \ - # Save slot call pc.\n \ - move $2, $31\n \ - " IFABIO32(STRINGXP(CPRESTORE(32))) "\n \ - " ELF_DL_SAVE_ARG_REGS " \ - move $4, $24\n \ - move $5, $15\n \ - move $6, $3\n \ - move $7, $2\n \ - jal __dl_runtime_resolve\n \ - " ELF_DL_RESTORE_ARG_REGS " \ - " STRINGXP(RESTORE_GP64) "\n \ - " STRINGXP(PTR_ADDIU) " $29, " STRINGXP(ELF_DL_FRAME_SIZE) "\n \ - move $25, $2\n \ - jr $25\n \ - .end _dl_runtime_resolve\n \ - .previous\n \ -"); - /* Mask identifying addresses reserved for the user program, where the dynamic linker should not map anything. */ #define ELF_MACHINE_USER_ADDRESS_MASK 0x80000000UL @@ -451,8 +209,8 @@ _dl_runtime_resolve:\n \ and not just plain _start. */ #define RTLD_START asm (\ - ".text\n"\ - _RTLD_PROLOGUE(ENTRY_POINT) "\ + ".text\n\ + " _RTLD_PROLOGUE(ENTRY_POINT) "\ " STRINGXV(SETUP_GPX($25)) "\n\ " STRINGXV(SETUP_GPX64($18,$25)) "\n\ # i386 ABI book says that the first entry of GOT holds\n\ @@ -475,10 +233,10 @@ _dl_runtime_resolve:\n \ " STRINGXP(PTR_ADDIU) " $29, 16\n\ # Get the value of label '_dl_start_user' in t9 ($25).\n\ " STRINGXP(PTR_LA) " $25, _dl_start_user\n\ - .globl _dl_start_user\n\ - .type _dl_start_user,@function\n\ - .aent _dl_start_user\n\ -_dl_start_user:\n\ + " _RTLD_EPILOGUE(ENTRY_POINT) "\ + \n\ + \n\ + " _RTLD_PROLOGUE(_dl_start_user) "\ " STRINGXP(SETUP_GP) "\n\ " STRINGXV(SETUP_GP64($18,_dl_start_user)) "\n\ move $16, $28\n\ @@ -504,34 +262,48 @@ _dl_start_user:\n\ sll $7, $5, " STRINGXP (PTRLOG) "\n\ " STRINGXP(PTR_ADDU) " $7, $7, $6\n\ " STRINGXP(PTR_ADDU) " $7, $7, " STRINGXP (PTRSIZE) " \n\ - " STRINGXP(PTR_SUBIU) " $29, 32\n\ + # Make sure the stack pointer is aligned for _dl_init_internal.\n\ + and $2, $29, -2 * " STRINGXP(SZREG) "\n\ + " STRINGXP(PTR_S) " $29, -4($2)\n\ + " STRINGXP(PTR_SUBIU) " $29, $2, 32\n\ " STRINGXP(SAVE_GP(16)) "\n\ # Call the function to run the initializers.\n\ jal _dl_init_internal\n\ - " STRINGXP(PTR_ADDIU) " $29, 32\n\ + # Restore the stack pointer for _start.\n\ + " STRINGXP(PTR_L) " $29, 28($29)\n\ # Pass our finalizer function to the user in $2 as per ELF ABI.\n\ " STRINGXP(PTR_LA) " $2, _dl_fini\n\ # Jump to the user entry point.\n\ move $25, $17\n\ jr $25\n\t"\ - _RTLD_EPILOGUE(ENTRY_POINT)\ + _RTLD_EPILOGUE(_dl_start_user)\ ".previous"\ ); /* The MIPS never uses Elfxx_Rela relocations. */ #define ELF_MACHINE_NO_RELA 1 +/* Names of the architecture-specific auditing callback functions. */ +# if _MIPS_SIM == _ABIO32 +# define ARCH_LA_PLTENTER mips_o32_gnu_pltenter +# define ARCH_LA_PLTEXIT mips_o32_gnu_pltexit +# elif _MIPS_SIM == _ABIN32 +# define ARCH_LA_PLTENTER mips_n32_gnu_pltenter +# define ARCH_LA_PLTEXIT mips_n32_gnu_pltexit +# else +# define ARCH_LA_PLTENTER mips_n64_gnu_pltenter +# define ARCH_LA_PLTEXIT mips_n64_gnu_pltexit +# endif + #endif /* !dl_machine_h */ -#ifdef RESOLVE +#ifdef RESOLVE_MAP /* Perform the relocation specified by RELOC and SYM (which is fully resolved). MAP is the object containing the reloc. */ -static inline void -#ifdef RTLD_BOOTSTRAP - __attribute__ ((always_inline)) -#endif +auto inline void +__attribute__ ((always_inline)) elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, const ElfW(Sym) *sym, const struct r_found_version *version, void *const reloc_addr) @@ -635,23 +407,41 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, } } -static inline void +auto inline void +__attribute__((always_inline)) elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc, void *const reloc_addr) { /* XXX Nothing to do. There is no relative relocation, right? */ } -static inline void +auto inline void +__attribute__((always_inline)) elf_machine_lazy_rel (struct link_map *map, ElfW(Addr) l_addr, const ElfW(Rel) *reloc) { /* Do nothing. */ } +auto inline void +__attribute__ ((always_inline)) +elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc, + const ElfW(Sym) *sym, const struct r_found_version *version, + void *const reloc_addr) +{ +} + +auto inline void +__attribute__((always_inline)) +elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc, + void *const reloc_addr) +{ +} + #ifndef RTLD_BOOTSTRAP /* Relocate GOT. */ -static inline void +auto inline void +__attribute__((always_inline)) elf_machine_got_rel (struct link_map *map, int lazy) { ElfW(Addr) *got; @@ -664,9 +454,9 @@ elf_machine_got_rel (struct link_map *map, int lazy) const ElfW(Sym) *ref = sym; \ const struct r_found_version *version \ = vernum ? &map->l_versions[vernum[sym_index] & 0x7fff] : NULL; \ - ElfW(Addr) value; \ - value = RESOLVE (&ref, version, R_MIPS_REL32); \ - (ref)? value + ref->st_value: 0; \ + struct link_map *sym_map; \ + sym_map = RESOLVE_MAP (&ref, version, R_MIPS_REL32); \ + ref ? sym_map->l_addr + ref->st_value : 0; \ }) if (map->l_info[VERSYMIDX (DT_VERSYM)] != NULL) @@ -738,7 +528,8 @@ elf_machine_got_rel (struct link_map *map, int lazy) /* Set up the loaded object described by L so its stub function will jump to the on-demand fixup code __dl_runtime_resolve. */ -static inline int +auto inline int +__attribute__((always_inline)) elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) { # ifndef RTLD_BOOTSTRAP @@ -774,4 +565,4 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) return lazy; } -#endif /* RESOLVE */ +#endif /* RESOLVE_MAP */ From 54316090f1fdb145bf939e85589d3c8fe264865e Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 28 Mar 2005 07:48:26 +0000 Subject: [PATCH 3418/4487] (internal_syscall5): Use register operands instead of non-lvalue memory operands. (internal_syscall6): Likewise. (internal_syscall7): Likewise. --- sysdeps/unix/sysv/linux/mips/mips32/sysdep.h | 24 ++++++++------------ 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h index 5eaf7a276b..682ec3d6aa 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h @@ -194,16 +194,15 @@ register long __a3 asm("$7") = (long) arg4; \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ - "lw\t$2, %6\n\t" \ "subu\t$29, 32\n\t" \ - "sw\t$2, 16($29)\n\t" \ + "sw\t%6, 16($29)\n\t" \ "li\t$2, %5\t\t\t# " #name "\n\t" \ "syscall\n\t" \ "addiu\t$29, 32\n\t" \ ".set\treorder" \ : "=r" (__v0), "+r" (__a3) \ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \ - "m" ((long)arg5) \ + "r" ((long)arg5) \ : __SYSCALL_CLOBBERS); \ err = __a3; \ _sys_result = __v0; \ @@ -223,18 +222,16 @@ register long __a3 asm("$7") = (long) arg4; \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ - "lw\t$2, %6\n\t" \ - "lw\t$8, %7\n\t" \ "subu\t$29, 32\n\t" \ - "sw\t$2, 16($29)\n\t" \ - "sw\t$8, 20($29)\n\t" \ + "sw\t%6, 16($29)\n\t" \ + "sw\t%7, 20($29)\n\t" \ "li\t$2, %5\t\t\t# " #name "\n\t" \ "syscall\n\t" \ "addiu\t$29, 32\n\t" \ ".set\treorder" \ : "=r" (__v0), "+r" (__a3) \ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \ - "m" ((long)arg5), "m" ((long)arg6) \ + "r" ((long)arg5), "r" ((long)arg6) \ : __SYSCALL_CLOBBERS); \ err = __a3; \ _sys_result = __v0; \ @@ -254,20 +251,17 @@ register long __a3 asm("$7") = (long) arg4; \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ - "lw\t$2, %6\n\t" \ - "lw\t$8, %7\n\t" \ - "lw\t$9, %8\n\t" \ "subu\t$29, 32\n\t" \ - "sw\t$2, 16($29)\n\t" \ - "sw\t$8, 20($29)\n\t" \ - "sw\t$9, 24($29)\n\t" \ + "sw\t%6, 16($29)\n\t" \ + "sw\t%7, 20($29)\n\t" \ + "sw\t%8, 24($29)\n\t" \ "li\t$2, %5\t\t\t# " #name "\n\t" \ "syscall\n\t" \ "addiu\t$29, 32\n\t" \ ".set\treorder" \ : "=r" (__v0), "+r" (__a3) \ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \ - "m" ((long)arg5), "m" ((long)arg6), "m" ((long)arg7) \ + "r" ((long)arg5), "r" ((long)arg6), "r" ((long)arg7) \ : __SYSCALL_CLOBBERS); \ err = __a3; \ _sys_result = __v0; \ From 7dda24b2038425663de6122620a8b10b8538092f Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 28 Mar 2005 07:58:05 +0000 Subject: [PATCH 3419/4487] Remove whitespace at eol --- sysdeps/mips/dl-trampoline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/mips/dl-trampoline.c b/sysdeps/mips/dl-trampoline.c index c5ea59cdb2..459adf9a8e 100644 --- a/sysdeps/mips/dl-trampoline.c +++ b/sysdeps/mips/dl-trampoline.c @@ -153,7 +153,7 @@ __dl_runtime_resolve (ElfW(Word) sym_index, if (version->hash != 0) { - sym_map = _dl_lookup_symbol_x (strtab + sym->st_name, l, + sym_map = _dl_lookup_symbol_x (strtab + sym->st_name, l, &sym, l->l_scope, version, ELF_RTYPE_CLASS_PLT, 0, 0); break; From 32e5182ae0c1ab7c62141096fe67cd55b71d30e7 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 28 Mar 2005 08:59:05 +0000 Subject: [PATCH 3420/4487] Remove unused file. --- sysdeps/mips/atomicity.h | 113 --------------------------------------- 1 file changed, 113 deletions(-) delete mode 100644 sysdeps/mips/atomicity.h diff --git a/sysdeps/mips/atomicity.h b/sysdeps/mips/atomicity.h deleted file mode 100644 index 7380e1000c..0000000000 --- a/sysdeps/mips/atomicity.h +++ /dev/null @@ -1,113 +0,0 @@ -/* Low-level functions for atomic operations. Mips version. - Copyright (C) 2001, 2002, 2003, 2004 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 _MIPS_ATOMICITY_H -#define _MIPS_ATOMICITY_H 1 - -#include -#include - -static inline int -__attribute__ ((unused)) -exchange_and_add (volatile uint32_t *mem, int val) -{ - int result, tmp; - - __asm__ __volatile__ - ("/* Inline exchange & add */\n" - "1:\n\t" - ".set push\n\t" -#if _MIPS_SIM == _ABIO32 - ".set mips2\n\t" -#endif - "ll %0,%3\n\t" - "addu %1,%4,%0\n\t" - "sc %1,%2\n\t" - ".set pop\n\t" - "beqz %1,1b\n\t" - "/* End exchange & add */" - : "=&r"(result), "=&r"(tmp), "=m"(*mem) - : "m" (*mem), "r"(val) - : "memory"); - - return result; -} - -static inline void -__attribute__ ((unused)) -atomic_add (volatile uint32_t *mem, int val) -{ - int result; - - __asm__ __volatile__ - ("/* Inline atomic add */\n" - "1:\n\t" - ".set push\n\t" -#if _MIPS_SIM == _ABIO32 - ".set mips2\n\t" -#endif - "ll %0,%2\n\t" - "addu %0,%3,%0\n\t" - "sc %0,%1\n\t" - ".set pop\n\t" - "beqz %0,1b\n\t" - "/* End atomic add */" - : "=&r"(result), "=m"(*mem) - : "m" (*mem), "r"(val) - : "memory"); -} - -static inline int -__attribute__ ((unused)) -compare_and_swap (volatile long int *p, long int oldval, long int newval) -{ - long int ret, temp; - - __asm__ __volatile__ - ("/* Inline compare & swap */\n" - "1:\n\t" - ".set push\n\t" -#if _MIPS_SIM == _ABIO32 - ".set mips2\n\t" -#endif -#if _MIPS_SIM == _ABI64 - "lld %1,%5\n\t" -#else - "ll %1,%5\n\t" -#endif - "move %0,$0\n\t" - "bne %1,%3,2f\n\t" - "move %0,%4\n\t" -#if _MIPS_SIM == _ABI64 - "scd %0,%2\n\t" -#else - "sc %0,%2\n\t" -#endif - ".set pop\n\t" - "beqz %0,1b\n" - "2:\n\t" - "/* End compare & swap */" - : "=&r" (ret), "=&r" (temp), "=m" (*p) - : "r" (oldval), "r" (newval), "m" (*p) - : "memory"); - - return ret; -} - -#endif /* atomicity.h */ From 0af5154802a9293019b85d3cef815708450ae3a3 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 28 Mar 2005 09:14:59 +0000 Subject: [PATCH 3421/4487] New files for MIPS TLS support. --- sysdeps/mips/bits/atomic.h | 303 ++++++++++++++++++++++++++++++++++ sysdeps/mips/dl-tls.h | 46 ++++++ sysdeps/mips/elf/configure | 46 ++++++ sysdeps/mips/elf/configure.in | 35 ++++ sysdeps/mips/libc-tls.c | 37 +++++ sysdeps/mips/tls-macros.h | 88 ++++++++++ 6 files changed, 555 insertions(+) create mode 100644 sysdeps/mips/bits/atomic.h create mode 100644 sysdeps/mips/dl-tls.h create mode 100644 sysdeps/mips/elf/configure create mode 100644 sysdeps/mips/elf/configure.in create mode 100644 sysdeps/mips/libc-tls.c create mode 100644 sysdeps/mips/tls-macros.h diff --git a/sysdeps/mips/bits/atomic.h b/sysdeps/mips/bits/atomic.h new file mode 100644 index 0000000000..167d9a59c8 --- /dev/null +++ b/sysdeps/mips/bits/atomic.h @@ -0,0 +1,303 @@ +/* Low-level functions for atomic operations. Mips version. + Copyright (C) 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 + 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 _MIPS_BITS_ATOMIC_H +#define _MIPS_BITS_ATOMIC_H 1 + +#include +#include + +typedef int32_t atomic32_t; +typedef uint32_t uatomic32_t; +typedef int_fast32_t atomic_fast32_t; +typedef uint_fast32_t uatomic_fast32_t; + +typedef int64_t atomic64_t; +typedef uint64_t uatomic64_t; +typedef int_fast64_t atomic_fast64_t; +typedef uint_fast64_t uatomic_fast64_t; + +typedef intptr_t atomicptr_t; +typedef uintptr_t uatomicptr_t; +typedef intmax_t atomic_max_t; +typedef uintmax_t uatomic_max_t; + +#if _MIPS_SIM == _ABIO32 +#define MIPS_PUSH_MIPS2 ".set mips2\n\t" +#else +#define MIPS_PUSH_MIPS2 +#endif + +/* See the comments in about the use of the sync instruction. */ +#ifndef MIPS_SYNC +# define MIPS_SYNC sync +#endif + +#define MIPS_SYNC_STR_2(X) #X +#define MIPS_SYNC_STR_1(X) MIPS_SYNC_STR_2(X) +#define MIPS_SYNC_STR MIPS_SYNC_STR_1(MIPS_SYNC) + +/* Compare and exchange. For all of the "xxx" routines, we expect a + "__prev" and a "__cmp" variable to be provided by the enclosing scope, + in which values are returned. */ + +#define __arch_compare_and_exchange_xxx_8_int(mem, newval, oldval, rel, acq) \ + (abort (), __prev = __cmp = 0) + +#define __arch_compare_and_exchange_xxx_16_int(mem, newval, oldval, rel, acq) \ + (abort (), __prev = __cmp = 0) + +#define __arch_compare_and_exchange_xxx_32_int(mem, newval, oldval, rel, acq) \ + __asm__ __volatile__ ( \ + ".set push\n\t" \ + MIPS_PUSH_MIPS2 \ + rel "\n" \ + "1:\t" \ + "ll %0,%4\n\t" \ + "move %1,$0\n\t" \ + "bne %0,%2,2f\n\t" \ + "move %1,%3\n\t" \ + "sc %1,%4\n\t" \ + "beqz %1,1b\n" \ + acq "\n\t" \ + ".set pop\n" \ + "2:\n\t" \ + : "=&r" (__prev), "=&r" (__cmp) \ + : "r" (oldval), "r" (newval), "m" (*mem) \ + : "memory") + +#if _MIPS_SIM == _ABIO32 +/* We can't do an atomic 64-bit operation in O32. */ +#define __arch_compare_and_exchange_xxx_64_int(mem, newval, oldval, rel, acq) \ + (abort (), __prev = __cmp = 0) +#else +#define __arch_compare_and_exchange_xxx_64_int(mem, newval, oldval, rel, acq) \ + __asm__ __volatile__ ("\n" \ + ".set push\n\t" \ + MIPS_PUSH_MIPS2 \ + rel "\n" \ + "1:\t" \ + "lld %0,%4\n\t" \ + "move %1,$0\n\t" \ + "bne %0,%2,2f\n\t" \ + "move %1,%3\n\t" \ + "scd %1,%4\n\t" \ + "beqz %1,1b\n" \ + acq "\n\t" \ + ".set pop\n" \ + "2:\n\t" \ + : "=&r" (__prev), "=&r" (__cmp) \ + : "r" (oldval), "r" (newval), "m" (*mem) \ + : "memory") +#endif + +/* For all "bool" routines, we return FALSE if exchange succesful. */ + +#define __arch_compare_and_exchange_bool_8_int(mem, new, old, rel, acq) \ +({ typeof (*mem) __prev; int __cmp; \ + __arch_compare_and_exchange_xxx_8_int(mem, new, old, rel, acq); \ + !__cmp; }) + +#define __arch_compare_and_exchange_bool_16_int(mem, new, old, rel, acq) \ +({ typeof (*mem) __prev; int __cmp; \ + __arch_compare_and_exchange_xxx_16_int(mem, new, old, rel, acq); \ + !__cmp; }) + +#define __arch_compare_and_exchange_bool_32_int(mem, new, old, rel, acq) \ +({ typeof (*mem) __prev; int __cmp; \ + __arch_compare_and_exchange_xxx_32_int(mem, new, old, rel, acq); \ + !__cmp; }) + +#define __arch_compare_and_exchange_bool_64_int(mem, new, old, rel, acq) \ +({ typeof (*mem) __prev; int __cmp; \ + __arch_compare_and_exchange_xxx_64_int(mem, new, old, rel, acq); \ + !__cmp; }) + +/* For all "val" routines, return the old value whether exchange + successful or not. */ + +#define __arch_compare_and_exchange_val_8_int(mem, new, old, rel, acq) \ +({ typeof (*mem) __prev; int __cmp; \ + __arch_compare_and_exchange_xxx_8_int(mem, new, old, rel, acq); \ + (typeof (*mem))__prev; }) + +#define __arch_compare_and_exchange_val_16_int(mem, new, old, rel, acq) \ +({ typeof (*mem) __prev; int __cmp; \ + __arch_compare_and_exchange_xxx_16_int(mem, new, old, rel, acq); \ + (typeof (*mem))__prev; }) + +#define __arch_compare_and_exchange_val_32_int(mem, new, old, rel, acq) \ +({ typeof (*mem) __prev; int __cmp; \ + __arch_compare_and_exchange_xxx_32_int(mem, new, old, rel, acq); \ + (typeof (*mem))__prev; }) + +#define __arch_compare_and_exchange_val_64_int(mem, new, old, rel, acq) \ +({ typeof (*mem) __prev; int __cmp; \ + __arch_compare_and_exchange_xxx_64_int(mem, new, old, rel, acq); \ + (typeof (*mem))__prev; }) + +/* Compare and exchange with "acquire" semantics, ie barrier after. */ + +#define atomic_compare_and_exchange_bool_acq(mem, new, old) \ + __atomic_bool_bysize (__arch_compare_and_exchange_bool, int, \ + mem, new, old, "", MIPS_SYNC_STR) + +#define atomic_compare_and_exchange_val_acq(mem, new, old) \ + __atomic_val_bysize (__arch_compare_and_exchange_val, int, \ + mem, new, old, "", MIPS_SYNC_STR) + +/* Compare and exchange with "release" semantics, ie barrier before. */ + +#define atomic_compare_and_exchange_bool_rel(mem, new, old) \ + __atomic_bool_bysize (__arch_compare_and_exchange_bool, int, \ + mem, new, old, MIPS_SYNC_STR, "") + +#define atomic_compare_and_exchange_val_rel(mem, new, old) \ + __atomic_val_bysize (__arch_compare_and_exchange_val, int, \ + mem, new, old, MIPS_SYNC_STR, "") + + + +/* Atomic exchange (without compare). */ + +#define __arch_exchange_xxx_8_int(mem, newval, rel, acq) \ + (abort (), 0) + +#define __arch_exchange_xxx_16_int(mem, newval, rel, acq) \ + (abort (), 0) + +#define __arch_exchange_xxx_32_int(mem, newval, rel, acq) \ +({ typeof (*mem) __prev; int __cmp; \ + __asm__ __volatile__ ("\n" \ + ".set push\n\t" \ + MIPS_PUSH_MIPS2 \ + rel "\n" \ + "1:\t" \ + "ll %0,%3\n\t" \ + "move %1,%2\n\t" \ + "sc %1,%3\n\t" \ + "beqz %1,1b\n" \ + acq "\n\t" \ + ".set pop\n" \ + "2:\n\t" \ + : "=&r" (__prev), "=&r" (__cmp) \ + : "r" (newval), "m" (*mem) \ + : "memory"); \ + __prev; }) + +#if _MIPS_SIM == _ABIO32 +/* We can't do an atomic 64-bit operation in O32. */ +#define __arch_exchange_xxx_64_int(mem, newval, rel, acq) \ + (abort (), 0) +#else +#define __arch_exchange_xxx_64_int(mem, newval, rel, acq) \ +({ typeof (*mem) __prev; int __cmp; \ + __asm__ __volatile__ ("\n" \ + ".set push\n\t" \ + MIPS_PUSH_MIPS2 \ + rel "\n" \ + "1:\n" \ + "lld %0,%3\n\t" \ + "move %1,%2\n\t" \ + "scd %1,%3\n\t" \ + "beqz %1,1b\n" \ + acq "\n\t" \ + ".set pop\n" \ + "2:\n\t" \ + : "=&r" (__prev), "=&r" (__cmp) \ + : "r" (newval), "m" (*mem) \ + : "memory"); \ + __prev; }) +#endif + +#define atomic_exchange_acq(mem, value) \ + __atomic_val_bysize (__arch_exchange_xxx, int, mem, value, "", MIPS_SYNC_STR) + +#define atomic_exchange_rel(mem, value) \ + __atomic_val_bysize (__arch_exchange_xxx, int, mem, value, MIPS_SYNC_STR, "") + + +/* Atomically add value and return the previous (unincremented) value. */ + +#define __arch_exchange_and_add_8_int(mem, newval, rel, acq) \ + (abort (), (typeof(*mem)) 0) + +#define __arch_exchange_and_add_16_int(mem, newval, rel, acq) \ + (abort (), (typeof(*mem)) 0) + +#define __arch_exchange_and_add_32_int(mem, value, rel, acq) \ +({ typeof (*mem) __prev; int __cmp; \ + __asm__ __volatile__ ("\n" \ + ".set push\n\t" \ + MIPS_PUSH_MIPS2 \ + rel "\n" \ + "1:\t" \ + "ll %0,%3\n\t" \ + "addu %1,%0,%2\n\t" \ + "sc %1,%3\n\t" \ + "beqz %1,1b\n" \ + acq "\n\t" \ + ".set pop\n" \ + "2:\n\t" \ + : "=&r" (__prev), "=&r" (__cmp) \ + : "r" (value), "m" (*mem) \ + : "memory"); \ + __prev; }) + +#if _MIPS_SIM == _ABIO32 +/* We can't do an atomic 64-bit operation in O32. */ +#define __arch_exchange_and_add_64_int(mem, value, rel, acq) \ + (abort (), (typeof(*mem)) 0) +#else +#define __arch_exchange_and_add_64_int(mem, value, rel, acq) \ +({ typeof (*mem) __prev; int __cmp; \ + __asm__ __volatile__ ( \ + ".set push\n\t" \ + MIPS_PUSH_MIPS2 \ + rel "\n" \ + "1:\t" \ + "lld %0,%3\n\t" \ + "daddu %1,%0,%2\n\t" \ + "scd %1,%3\n\t" \ + "beqz %1,1b\n" \ + acq "\n\t" \ + ".set pop\n" \ + "2:\n\t" \ + : "=&r" (__prev), "=&r" (__cmp) \ + : "r" (value), "m" (*mem) \ + : "memory"); \ + __prev; }) +#endif + +/* ??? Barrier semantics for atomic_exchange_and_add appear to be + undefined. Use full barrier for now, as that's safe. */ +#define atomic_exchange_and_add(mem, value) \ + __atomic_val_bysize (__arch_exchange_and_add, int, mem, value, \ + MIPS_SYNC_STR, MIPS_SYNC_STR) + +/* TODO: More atomic operations could be implemented efficiently; only the + basic requirements are done. */ + +#define atomic_full_barrier() \ + __asm__ __volatile__ (".set push\n\t" \ + MIPS_PUSH_MIPS2 \ + MIPS_SYNC_STR "\n\t" \ + ".set pop" : : : "memory") + +#endif /* bits/atomic.h */ diff --git a/sysdeps/mips/dl-tls.h b/sysdeps/mips/dl-tls.h new file mode 100644 index 0000000000..6d3ed6f5a4 --- /dev/null +++ b/sysdeps/mips/dl-tls.h @@ -0,0 +1,46 @@ +/* Thread-local storage handling in the ELF dynamic linker. MIPS version. + Copyright (C) 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 + 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. */ + + +/* Type used for the representation of TLS information in the GOT. */ +typedef struct +{ + unsigned long int ti_module; + unsigned long int ti_offset; +} tls_index; + +/* The thread pointer points 0x7000 past the first static TLS block. */ +#define TLS_TP_OFFSET 0x7000 + +/* Dynamic thread vector pointers point 0x8000 past the start of each + TLS block. */ +#define TLS_DTV_OFFSET 0x8000 + +/* Compute the value for a GOTTPREL reloc. */ +#define TLS_TPREL_VALUE(sym_map, sym) \ + ((sym_map)->l_tls_offset + (sym)->st_value - TLS_TP_OFFSET) + +/* Compute the value for a DTPREL reloc. */ +#define TLS_DTPREL_VALUE(sym) \ + ((sym)->st_value - TLS_DTV_OFFSET) + +extern void *__tls_get_addr (tls_index *ti); + +# define GET_ADDR_OFFSET (ti->ti_offset + TLS_DTV_OFFSET) +# define __TLS_GET_ADDR(__ti) (__tls_get_addr (__ti) - TLS_DTV_OFFSET) diff --git a/sysdeps/mips/elf/configure b/sysdeps/mips/elf/configure new file mode 100644 index 0000000000..3d90a1e420 --- /dev/null +++ b/sysdeps/mips/elf/configure @@ -0,0 +1,46 @@ +# This file is generated from configure.in by Autoconf. DO NOT EDIT! + # Local configure fragment for sysdeps/mips/elf. + +if test "$usetls" != no; then +# Check for support of thread-local storage handling in assembler and +# linker. +echo "$as_me:$LINENO: checking for MIPS TLS support" >&5 +echo $ECHO_N "checking for MIPS TLS support... $ECHO_C" >&6 +if test "${libc_cv_mips_tls+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat > conftest.s <<\EOF + .section ".tdata", "awT", %progbits + .globl foo +foo: .long 1 + .section ".tbss", "awT", %nobits + .globl bar +bar: .skip 4 + .text + + lw $25, %call16(__tls_get_addr)($28) + jalr $25 + addiu $4, $28, %tlsgd(x) +EOF +if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + libc_cv_mips_tls=yes +else + libc_cv_mips_tls=no +fi +rm -f conftest* +fi +echo "$as_me:$LINENO: result: $libc_cv_mips_tls" >&5 +echo "${ECHO_T}$libc_cv_mips_tls" >&6 +if test $libc_cv_mips_tls = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_TLS_SUPPORT 1 +_ACEOF + +fi +fi + diff --git a/sysdeps/mips/elf/configure.in b/sysdeps/mips/elf/configure.in new file mode 100644 index 0000000000..ecb9108c12 --- /dev/null +++ b/sysdeps/mips/elf/configure.in @@ -0,0 +1,35 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/mips/elf. + +if test "$usetls" != no; then +# Check for support of thread-local storage handling in assembler and +# linker. +AC_CACHE_CHECK(for MIPS TLS support, libc_cv_mips_tls, [dnl +cat > conftest.s <<\EOF + .section ".tdata", "awT", %progbits + .globl foo +foo: .long 1 + .section ".tbss", "awT", %nobits + .globl bar +bar: .skip 4 + .text + + lw $25, %call16(__tls_get_addr)($28) + jalr $25 + addiu $4, $28, %tlsgd(x) +EOF +dnl +if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then + libc_cv_mips_tls=yes +else + libc_cv_mips_tls=no +fi +rm -f conftest*]) +if test $libc_cv_mips_tls = yes; then + AC_DEFINE(HAVE_TLS_SUPPORT) +fi +fi + +dnl No MIPS GCC supports accessing static and hidden symbols in an +dnl position independent way. +dnl AC_DEFINE(PI_STATIC_AND_HIDDEN) diff --git a/sysdeps/mips/libc-tls.c b/sysdeps/mips/libc-tls.c new file mode 100644 index 0000000000..157ba3389a --- /dev/null +++ b/sysdeps/mips/libc-tls.c @@ -0,0 +1,37 @@ +/* Thread-local storage handling in the ELF dynamic linker. MIPS version. + Copyright (C) 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 + 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. */ + +#include +#include + +#if USE_TLS + +/* On MIPS, linker optimizations are not required, so __tls_get_addr + can be called even in statically linked binaries. In this case module + must be always 1 and PT_TLS segment exist in the binary, otherwise it + would not link. */ + +void * +__tls_get_addr (tls_index *ti) +{ + dtv_t *dtv = THREAD_DTV (); + return (char *) dtv[1].pointer.val + GET_ADDR_OFFSET; +} + +#endif diff --git a/sysdeps/mips/tls-macros.h b/sysdeps/mips/tls-macros.h new file mode 100644 index 0000000000..2d0516b3e4 --- /dev/null +++ b/sysdeps/mips/tls-macros.h @@ -0,0 +1,88 @@ +/* Macros to support TLS testing in times of missing compiler support. */ + +#if _MIPS_SIM != _ABI64 + +/* These versions are for o32 and n32. */ + +# define TLS_GD(x) \ + ({ void *__result; \ + extern void *__tls_get_addr (void *); \ + asm ("addiu %0, $28, %%tlsgd(" #x ")" \ + : "=r" (__result)); \ + (int *)__tls_get_addr (__result); }) +#else +# define TLS_GD(x) \ + ({ void *__result; \ + extern void *__tls_get_addr (void *); \ + asm ("daddiu %0, $28, %%tlsgd(" #x ")" \ + : "=r" (__result)); \ + (int *)__tls_get_addr (__result); }) +#endif + +#if _MIPS_SIM != _ABI64 +# define TLS_LD(x) \ + ({ void *__result; \ + extern void *__tls_get_addr (void *); \ + asm ("addiu %0, $28, %%tlsldm(" #x ")" \ + : "=r" (__result)); \ + __result = __tls_get_addr (__result); \ + asm ("lui $3,%%dtprel_hi(" #x ")\n\t" \ + "addiu $3,$3,%%dtprel_lo(" #x ")\n\t" \ + "addu %0,%0,$3" \ + : "+r" (__result) : : "$3"); \ + __result; }) +# define TLS_IE(x) \ + ({ void *__result; \ + asm (".set push\n\t.set mips32r2\n\t" \ + "rdhwr\t%0,$29\n\t.set pop" \ + : "=v" (__result)); \ + asm ("lw $3,%%gottprel(" #x ")($28)\n\t" \ + "addu %0,%0,$3" \ + : "+r" (__result) : : "$3"); \ + __result; }) +# define TLS_LE(x) \ + ({ void *__result; \ + asm (".set push\n\t.set mips32r2\n\t" \ + "rdhwr\t%0,$29\n\t.set pop" \ + : "=v" (__result)); \ + asm ("lui $3,%%tprel_hi(" #x ")\n\t" \ + "addiu $3,$3,%%tprel_lo(" #x ")\n\t" \ + "addu %0,%0,$3" \ + : "+r" (__result) : : "$3"); \ + __result; }) + +#else + +/* These versions are for n64. */ + +# define TLS_LD(x) \ + ({ void *__result; \ + extern void *__tls_get_addr (void *); \ + asm ("daddiu %0, $28, %%tlsldm(" #x ")" \ + : "=r" (__result)); \ + __result = __tls_get_addr (__result); \ + asm ("lui $3,%%dtprel_hi(" #x ")\n\t" \ + "daddiu $3,$3,%%dtprel_lo(" #x ")\n\t" \ + "daddu %0,%0,$3" \ + : "+r" (__result) : : "$3"); \ + __result; }) +# define TLS_IE(x) \ + ({ void *__result; \ + asm (".set push\n\t.set mips32r2\n\t" \ + "rdhwr\t%0,$29\n\t.set pop" \ + : "=v" (__result)); \ + asm ("ld $3,%%gottprel(" #x ")($28)\n\t" \ + "daddu %0,%0,$3" \ + : "+r" (__result) : : "$3"); \ + __result; }) +# define TLS_LE(x) \ + ({ void *__result; \ + asm (".set push\n\t.set mips32r2\n\t" \ + "rdhwr\t%0,$29\n\t.set pop" \ + : "=v" (__result)); \ + asm ("lui $3,%%tprel_hi(" #x ")\n\t" \ + "daddiu $3,$3,%%tprel_lo(" #x ")\n\t" \ + "daddu %0,%0,$3" \ + : "+r" (__result) : : "$3"); \ + __result; }) +#endif From 638418213e7a51fad20074071b7ad8f35b8bc2d3 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 28 Mar 2005 09:15:45 +0000 Subject: [PATCH 3422/4487] New file. --- sysdeps/mips/sys/asm.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/sysdeps/mips/sys/asm.h b/sysdeps/mips/sys/asm.h index b04c36ba5e..b590802fd9 100644 --- a/sysdeps/mips/sys/asm.h +++ b/sysdeps/mips/sys/asm.h @@ -1,4 +1,5 @@ -/* Copyright (C) 1997, 1998, 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2002, 2003, 2004, 2005 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ralf Baechle . @@ -470,4 +471,20 @@ symbol = value # define MTC0 dmtc0 #endif +/* The MIPS archtectures do not have a uniform memory model. Particular + platforms may provide additional guarantees - for instance, the R4000 + LL and SC instructions implicitly perform a SYNC, and the 4K promises + strong ordering. + + However, in the absence of those guarantees, we must assume weak ordering + and SYNC explicitly where necessary. + + Some obsolete MIPS processors may not support the SYNC instruction. This + applies to "true" MIPS I processors; most of the processors which compile + using MIPS I implement parts of MIPS II. */ + +#ifndef MIPS_SYNC +# define MIPS_SYNC sync +#endif + #endif /* sys/asm.h */ From 4abf7dea27548820d4f3b80c350333ba3c7b1683 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 28 Mar 2005 09:16:12 +0000 Subject: [PATCH 3423/4487] Linux/MIPS vfork implementation. --- sysdeps/unix/sysv/linux/mips/vfork.S | 98 ++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/mips/vfork.S diff --git a/sysdeps/unix/sysv/linux/mips/vfork.S b/sysdeps/unix/sysv/linux/mips/vfork.S new file mode 100644 index 0000000000..1383ddc6a7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/vfork.S @@ -0,0 +1,98 @@ +/* Copyright (C) 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 + 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. */ + +/* vfork() is just a special case of clone(). */ + +#include +#include +#include +#include + +#ifndef SAVE_PID +#define SAVE_PID +#endif + +#ifndef RESTORE_PID +#define RESTORE_PID +#endif + + +/* int vfork() */ + + .text +LOCALSZ= 1 +FRAMESZ= (((NARGSAVE+LOCALSZ)*SZREG)+ALSZ)&ALMASK +GPOFF= FRAMESZ-(1*SZREG) +NESTED(__vfork,FRAMESZ,sp) +#ifdef __PIC__ + SETUP_GP +#endif + PTR_SUBU sp, FRAMESZ + SETUP_GP64 (a5, __vfork) +#ifdef __PIC__ + SAVE_GP (GPOFF) +#endif +#ifdef PROF +# if (_MIPS_SIM != _ABIO32) + PTR_S a5, GPOFF(sp) +# endif + .set noat + move $1, ra +# if (_MIPS_SIM == _ABIO32) + subu sp,sp,8 +# endif + jal _mcount + .set at +# if (_MIPS_SIM != _ABIO32) + PTR_L a5, GPOFF(sp) +# endif +#endif + + PTR_ADDU sp, FRAMESZ + + SAVE_PID + + li a0, 0x4112 /* CLONE_VM | CLONE_VFORK | SIGCHLD */ + move a1, sp + + /* Do the system call */ + li v0,__NR_clone + syscall + + RESTORE_PID + + bnez a3,L(error) + + /* Successful return from the parent or child. */ + RESTORE_GP64 + ret + + /* Something bad happened -- no child created. */ +L(error): +#ifdef __PIC__ + PTR_LA t9, __syscall_error + RESTORE_GP64 + jr t9 +#else + RESTORE_GP64 + j __syscall_error +#endif + END(__vfork) + +libc_hidden_def(__vfork) +weak_alias(__vfork, vfork) From 08650996eacdf06747e1a3bacce797f0182abc6b Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 28 Mar 2005 09:17:06 +0000 Subject: [PATCH 3424/4487] Add NPTL and five-argument clone support. --- sysdeps/unix/sysv/linux/mips/clone.S | 60 ++++++++++++++++++++++++++-- 1 file changed, 56 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/clone.S b/sysdeps/unix/sysv/linux/mips/clone.S index 043f5921cb..8b8e0072f5 100644 --- a/sysdeps/unix/sysv/linux/mips/clone.S +++ b/sysdeps/unix/sysv/linux/mips/clone.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 2000, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 2000, 2003, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ralf Baechle , 1996. @@ -24,11 +24,23 @@ #include #define _ERRNO_H 1 #include +#ifdef RESET_PID +#include +#endif + +#define CLONE_VM 0x00000100 +#define CLONE_THREAD 0x00010000 -/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg) */ +/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg, + void *parent_tidptr, void *tls, void *child_tidptr) */ .text -LOCALSZ= 1 +#if _MIPS_SIM == _ABIO32 +# define EXTRA_LOCALS 1 +#else +# define EXTRA_LOCALS 0 +#endif +LOCALSZ= 4 FRAMESZ= (((NARGSAVE+LOCALSZ)*SZREG)+ALSZ)&ALMASK GPOFF= FRAMESZ-(1*SZREG) NESTED(__clone,4*SZREG,sp) @@ -56,10 +68,26 @@ NESTED(__clone,4*SZREG,sp) PTR_SUBU a1,32 /* Reserve argument save space. */ PTR_S a0,0(a1) /* Save function pointer. */ PTR_S a3,PTRSIZE(a1) /* Save argument pointer. */ +#ifdef RESET_PID + LONG_S a2,(PTRSIZE*2)(a1) /* Save clone flags. */ +#endif + move a0,a2 + + /* Shuffle in the last three arguments - arguments 5, 6, and 7 to + this function, but arguments 3, 4, and 5 to the syscall. */ +#if _MIPS_SIM == _ABIO32 + PTR_L a2,(FRAMESZ+PTRSIZE+PTRSIZE+16)(sp) + PTR_S a2,16(sp) + PTR_L a2,(FRAMESZ+16)(sp) + PTR_L a3,(FRAMESZ+PTRSIZE+16)(sp) +#else + move a2,a4 + move a3,a5 + move a4,a6 +#endif /* Do the system call */ - move a0,a2 li v0,__NR_clone syscall @@ -94,6 +122,15 @@ L(thread_start): /* cp is already loaded. */ SAVE_GP (GPOFF) /* The stackframe has been created on entry of clone(). */ + +#ifdef RESET_PID + /* Check and see if we need to reset the PID. */ + LONG_L a0,(PTRSIZE*2)(sp) + and a1,a0,CLONE_THREAD + beqz a1,L(restore_pid) +L(donepid): +#endif + /* Restore the arg for user's function. */ PTR_L t9,0(sp) /* Function pointer. */ PTR_L a0,PTRSIZE(sp) /* Argument pointer. */ @@ -109,6 +146,21 @@ L(thread_start): #else jal _exit #endif + +#ifdef RESET_PID +L(restore_pid): + and a1,a0,CLONE_VM + li v0,-1 + bnez a1,L(gotpid) + li v0,__NR_getpid + syscall +L(gotpid): + READ_THREAD_POINTER(v1) + INT_S v0,PID_OFFSET(v1) + INT_S v0,TID_OFFSET(v1) + b L(donepid) +#endif + END(__thread_start) weak_alias(__clone, clone) From e1ae85a58e486debc6f5b1c53cd4c4a30fbdd493 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 28 Mar 2005 09:17:26 +0000 Subject: [PATCH 3425/4487] (INTERNAL_SYSCALL_NCS): New. (INTERNAL_SYSCALL, internal_syscall0, internal_syscall1, internal_syscall2, internal_syscall3, internal_syscall4, internal_syscall5, internal_syscall6, internal_syscall7): Update for non-constant support. --- sysdeps/unix/sysv/linux/mips/mips32/sysdep.h | 285 ++++++++++--------- 1 file changed, 150 insertions(+), 135 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h index 682ec3d6aa..3da2412259 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002, 2003, 2004, 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 @@ -48,12 +48,12 @@ #undef INLINE_SYSCALL #define INLINE_SYSCALL(name, nr, args...) \ ({ INTERNAL_SYSCALL_DECL(err); \ - long result_var = INTERNAL_SYSCALL (name, err, nr, args); \ - if ( INTERNAL_SYSCALL_ERROR_P (result_var, err) ) \ - { \ - __set_errno (INTERNAL_SYSCALL_ERRNO (result_var, err)); \ - result_var = -1L; \ - } \ + long result_var = INTERNAL_SYSCALL (name, err, nr, args); \ + if ( INTERNAL_SYSCALL_ERROR_P (result_var, err) ) \ + { \ + __set_errno (INTERNAL_SYSCALL_ERRNO (result_var, err)); \ + result_var = -1L; \ + } \ result_var; }) #undef INTERNAL_SYSCALL_DECL @@ -66,203 +66,218 @@ #define INTERNAL_SYSCALL_ERRNO(val, err) (val) #undef INTERNAL_SYSCALL -#define INTERNAL_SYSCALL(name, err, nr, args...) internal_syscall##nr(name, err, args) +#define INTERNAL_SYSCALL(name, err, nr, args...) \ + internal_syscall##nr (, "li\t$2, %2\t\t\t# " #name "\n\t", \ + "i" (SYS_ify (name)), err, args) -#define internal_syscall0(name, err, dummy...) \ -({ \ +#undef INTERNAL_SYSCALL_NCS +#define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \ + internal_syscall##nr (= number, , "r" (__v0), err, args) + +#define internal_syscall0(ncs_init, cs_init, input, err, dummy...) \ +({ \ long _sys_result; \ \ { \ - register long __v0 asm("$2"); \ - register long __a3 asm("$7"); \ - __asm__ volatile ( \ - ".set\tnoreorder\n\t" \ - "li\t$2, %2\t\t\t# " #name "\n\t" \ - "syscall\n\t" \ - ".set reorder" \ - : "=r" (__v0), "=r" (__a3) \ - : "i" (SYS_ify(name)) \ - : __SYSCALL_CLOBBERS); \ + register long __v0 asm("$2") ncs_init; \ + register long __a3 asm("$7"); \ + __asm__ volatile ( \ + ".set\tnoreorder\n\t" \ + cs_init \ + "syscall\n\t" \ + ".set reorder" \ + : "=r" (__v0), "=r" (__a3) \ + : input \ + : __SYSCALL_CLOBBERS); \ err = __a3; \ _sys_result = __v0; \ } \ _sys_result; \ }) -#define internal_syscall1(name, err, arg1) \ -({ \ +#define internal_syscall1(ncs_init, cs_init, input, err, arg1) \ +({ \ long _sys_result; \ \ { \ - register long __v0 asm("$2"); \ - register long __a0 asm("$4") = (long) arg1; \ - register long __a3 asm("$7"); \ - __asm__ volatile ( \ - ".set\tnoreorder\n\t" \ - "li\t$2, %3\t\t\t# " #name "\n\t" \ - "syscall\n\t" \ - ".set reorder" \ - : "=r" (__v0), "=r" (__a3) \ - : "r" (__a0), "i" (SYS_ify(name)) \ - : __SYSCALL_CLOBBERS); \ + register long __v0 asm("$2") ncs_init; \ + register long __a0 asm("$4") = (long) arg1; \ + register long __a3 asm("$7"); \ + __asm__ volatile ( \ + ".set\tnoreorder\n\t" \ + cs_init \ + "syscall\n\t" \ + ".set reorder" \ + : "=r" (__v0), "=r" (__a3) \ + : input, "r" (__a0) \ + : __SYSCALL_CLOBBERS); \ err = __a3; \ _sys_result = __v0; \ } \ _sys_result; \ }) -#define internal_syscall2(name, err, arg1, arg2) \ -({ \ +#define internal_syscall2(ncs_init, cs_init, input, err, arg1, arg2) \ +({ \ long _sys_result; \ \ { \ - register long __v0 asm("$2"); \ - register long __a0 asm("$4") = (long) arg1; \ - register long __a1 asm("$5") = (long) arg2; \ - register long __a3 asm("$7"); \ - __asm__ volatile ( \ - ".set\tnoreorder\n\t" \ - "li\t$2, %4\t\t\t# " #name "\n\t" \ - "syscall\n\t" \ - ".set\treorder" \ - : "=r" (__v0), "=r" (__a3) \ - : "r" (__a0), "r" (__a1), "i" (SYS_ify(name)) \ - : __SYSCALL_CLOBBERS); \ + register long __v0 asm("$2") ncs_init; \ + register long __a0 asm("$4") = (long) arg1; \ + register long __a1 asm("$5") = (long) arg2; \ + register long __a3 asm("$7"); \ + __asm__ volatile ( \ + ".set\tnoreorder\n\t" \ + cs_init \ + "syscall\n\t" \ + ".set\treorder" \ + : "=r" (__v0), "=r" (__a3) \ + : input, "r" (__a0), "r" (__a1) \ + : __SYSCALL_CLOBBERS); \ err = __a3; \ _sys_result = __v0; \ } \ _sys_result; \ }) -#define internal_syscall3(name, err, arg1, arg2, arg3) \ -({ \ +#define internal_syscall3(ncs_init, cs_init, input, err, arg1, arg2, arg3)\ +({ \ long _sys_result; \ \ { \ - register long __v0 asm("$2"); \ - register long __a0 asm("$4") = (long) arg1; \ - register long __a1 asm("$5") = (long) arg2; \ - register long __a2 asm("$6") = (long) arg3; \ - register long __a3 asm("$7"); \ - __asm__ volatile ( \ - ".set\tnoreorder\n\t" \ - "li\t$2, %5\t\t\t# " #name "\n\t" \ - "syscall\n\t" \ - ".set\treorder" \ - : "=r" (__v0), "=r" (__a3) \ - : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)) \ - : __SYSCALL_CLOBBERS); \ + register long __v0 asm("$2") ncs_init; \ + register long __a0 asm("$4") = (long) arg1; \ + register long __a1 asm("$5") = (long) arg2; \ + register long __a2 asm("$6") = (long) arg3; \ + register long __a3 asm("$7"); \ + __asm__ volatile ( \ + ".set\tnoreorder\n\t" \ + cs_init \ + "syscall\n\t" \ + ".set\treorder" \ + : "=r" (__v0), "=r" (__a3) \ + : input, "r" (__a0), "r" (__a1), "r" (__a2) \ + : __SYSCALL_CLOBBERS); \ err = __a3; \ _sys_result = __v0; \ } \ _sys_result; \ }) -#define internal_syscall4(name, err, arg1, arg2, arg3, arg4) \ -({ \ +#define internal_syscall4(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4)\ +({ \ long _sys_result; \ \ { \ - register long __v0 asm("$2"); \ - register long __a0 asm("$4") = (long) arg1; \ - register long __a1 asm("$5") = (long) arg2; \ - register long __a2 asm("$6") = (long) arg3; \ - register long __a3 asm("$7") = (long) arg4; \ - __asm__ volatile ( \ - ".set\tnoreorder\n\t" \ - "li\t$2, %5\t\t\t# " #name "\n\t" \ - "syscall\n\t" \ - ".set\treorder" \ - : "=r" (__v0), "+r" (__a3) \ - : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)) \ - : __SYSCALL_CLOBBERS); \ + register long __v0 asm("$2") ncs_init; \ + register long __a0 asm("$4") = (long) arg1; \ + register long __a1 asm("$5") = (long) arg2; \ + register long __a2 asm("$6") = (long) arg3; \ + register long __a3 asm("$7") = (long) arg4; \ + __asm__ volatile ( \ + ".set\tnoreorder\n\t" \ + cs_init \ + "syscall\n\t" \ + ".set\treorder" \ + : "=r" (__v0), "+r" (__a3) \ + : input, "r" (__a0), "r" (__a1), "r" (__a2) \ + : __SYSCALL_CLOBBERS); \ err = __a3; \ _sys_result = __v0; \ } \ _sys_result; \ }) -#define internal_syscall5(name, err, arg1, arg2, arg3, arg4, arg5) \ -({ \ +/* We need to use a frame pointer for the functions in which we + adjust $sp around the syscall, or debug information and unwind + information will be $sp relative and thus wrong during the syscall. As + of GCC 3.4.3, this is sufficient. */ +#define FORCE_FRAME_POINTER alloca (4) + +#define internal_syscall5(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4, arg5)\ +({ \ long _sys_result; \ \ + FORCE_FRAME_POINTER; \ { \ - register long __v0 asm("$2"); \ - register long __a0 asm("$4") = (long) arg1; \ - register long __a1 asm("$5") = (long) arg2; \ - register long __a2 asm("$6") = (long) arg3; \ - register long __a3 asm("$7") = (long) arg4; \ - __asm__ volatile ( \ - ".set\tnoreorder\n\t" \ - "subu\t$29, 32\n\t" \ - "sw\t%6, 16($29)\n\t" \ - "li\t$2, %5\t\t\t# " #name "\n\t" \ - "syscall\n\t" \ - "addiu\t$29, 32\n\t" \ - ".set\treorder" \ - : "=r" (__v0), "+r" (__a3) \ - : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \ - "r" ((long)arg5) \ - : __SYSCALL_CLOBBERS); \ + register long __v0 asm("$2") ncs_init; \ + register long __a0 asm("$4") = (long) arg1; \ + register long __a1 asm("$5") = (long) arg2; \ + register long __a2 asm("$6") = (long) arg3; \ + register long __a3 asm("$7") = (long) arg4; \ + __asm__ volatile ( \ + ".set\tnoreorder\n\t" \ + "subu\t$29, 32\n\t" \ + "sw\t%6, 16($29)\n\t" \ + cs_init \ + "syscall\n\t" \ + "addiu\t$29, 32\n\t" \ + ".set\treorder" \ + : "=r" (__v0), "+r" (__a3) \ + : input, "r" (__a0), "r" (__a1), "r" (__a2), \ + "r" ((long)arg5) \ + : __SYSCALL_CLOBBERS); \ err = __a3; \ _sys_result = __v0; \ } \ _sys_result; \ }) -#define internal_syscall6(name, err, arg1, arg2, arg3, arg4, arg5, arg6)\ -({ \ +#define internal_syscall6(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4, arg5, arg6)\ +({ \ long _sys_result; \ \ + FORCE_FRAME_POINTER; \ { \ - register long __v0 asm("$2"); \ - register long __a0 asm("$4") = (long) arg1; \ - register long __a1 asm("$5") = (long) arg2; \ - register long __a2 asm("$6") = (long) arg3; \ - register long __a3 asm("$7") = (long) arg4; \ - __asm__ volatile ( \ - ".set\tnoreorder\n\t" \ - "subu\t$29, 32\n\t" \ - "sw\t%6, 16($29)\n\t" \ - "sw\t%7, 20($29)\n\t" \ - "li\t$2, %5\t\t\t# " #name "\n\t" \ - "syscall\n\t" \ - "addiu\t$29, 32\n\t" \ - ".set\treorder" \ - : "=r" (__v0), "+r" (__a3) \ - : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \ + register long __v0 asm("$2") ncs_init; \ + register long __a0 asm("$4") = (long) arg1; \ + register long __a1 asm("$5") = (long) arg2; \ + register long __a2 asm("$6") = (long) arg3; \ + register long __a3 asm("$7") = (long) arg4; \ + __asm__ volatile ( \ + ".set\tnoreorder\n\t" \ + "subu\t$29, 32\n\t" \ + "sw\t%6, 16($29)\n\t" \ + "sw\t%7, 20($29)\n\t" \ + cs_init \ + "syscall\n\t" \ + "addiu\t$29, 32\n\t" \ + ".set\treorder" \ + : "=r" (__v0), "+r" (__a3) \ + : input, "r" (__a0), "r" (__a1), "r" (__a2), \ "r" ((long)arg5), "r" ((long)arg6) \ - : __SYSCALL_CLOBBERS); \ + : __SYSCALL_CLOBBERS); \ err = __a3; \ _sys_result = __v0; \ } \ _sys_result; \ }) -#define internal_syscall7(name, err, arg1, arg2, arg3, arg4, arg5, arg6, arg7)\ -({ \ +#define internal_syscall7(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4, arg5, arg6, arg7)\ +({ \ long _sys_result; \ \ + FORCE_FRAME_POINTER; \ { \ - register long __v0 asm("$2"); \ - register long __a0 asm("$4") = (long) arg1; \ - register long __a1 asm("$5") = (long) arg2; \ - register long __a2 asm("$6") = (long) arg3; \ - register long __a3 asm("$7") = (long) arg4; \ - __asm__ volatile ( \ - ".set\tnoreorder\n\t" \ - "subu\t$29, 32\n\t" \ - "sw\t%6, 16($29)\n\t" \ - "sw\t%7, 20($29)\n\t" \ - "sw\t%8, 24($29)\n\t" \ - "li\t$2, %5\t\t\t# " #name "\n\t" \ - "syscall\n\t" \ - "addiu\t$29, 32\n\t" \ - ".set\treorder" \ - : "=r" (__v0), "+r" (__a3) \ - : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \ + register long __v0 asm("$2") ncs_init; \ + register long __a0 asm("$4") = (long) arg1; \ + register long __a1 asm("$5") = (long) arg2; \ + register long __a2 asm("$6") = (long) arg3; \ + register long __a3 asm("$7") = (long) arg4; \ + __asm__ volatile ( \ + ".set\tnoreorder\n\t" \ + "subu\t$29, 32\n\t" \ + "sw\t%6, 16($29)\n\t" \ + "sw\t%7, 20($29)\n\t" \ + "sw\t%8, 24($29)\n\t" \ + cs_init \ + "syscall\n\t" \ + "addiu\t$29, 32\n\t" \ + ".set\treorder" \ + : "=r" (__v0), "+r" (__a3) \ + : input, "r" (__a0), "r" (__a1), "r" (__a2), \ "r" ((long)arg5), "r" ((long)arg6), "r" ((long)arg7) \ - : __SYSCALL_CLOBBERS); \ + : __SYSCALL_CLOBBERS); \ err = __a3; \ _sys_result = __v0; \ } \ From 27aae96e5b9f684eede6d76bf7bca006507c2124 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 28 Mar 2005 09:17:43 +0000 Subject: [PATCH 3426/4487] (SIGEV_THREAD, SIGEV_CALLBACK, SIGEV_THREAD_ID): Update to match the kernel. --- sysdeps/unix/sysv/linux/mips/bits/siginfo.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h index 54eba41d6e..787e365139 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h +++ b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h @@ -1,5 +1,5 @@ /* siginfo_t, sigevent and constants. Linux/MIPS version. - Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004 + Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -300,10 +300,11 @@ enum # define SIGEV_SIGNAL SIGEV_SIGNAL SIGEV_NONE, /* Other notification: meaningless. */ # define SIGEV_NONE SIGEV_NONE - SIGEV_CALLBACK, /* Deliver via thread creation. */ -# define SIGEV_CALLBACK SIGEV_CALLBACK - SIGEV_THREAD /* Deliver via thread creation. */ + SIGEV_THREAD, /* Deliver via thread creation. */ # define SIGEV_THREAD SIGEV_THREAD + + SIGEV_THREAD_ID = 4 /* Send signal to specific thread. */ +#define SIGEV_THREAD_ID SIGEV_THREAD_ID }; #endif /* have _SIGNAL_H. */ From e36da2da8f7886f8a32f49821d611800f24f9f3c Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 28 Mar 2005 09:19:38 +0000 Subject: [PATCH 3427/4487] Add MIPS NPTL support --- sysdeps/mips/nptl/Makefile | 25 ++++ sysdeps/mips/nptl/jmpbuf-unwind.h | 30 +++++ sysdeps/mips/nptl/nptl-sysdep.S | 2 + sysdeps/mips/nptl/pthread_spin_lock.S | 37 ++++++ sysdeps/mips/nptl/pthread_spin_trylock.S | 41 ++++++ sysdeps/mips/nptl/pthreaddef.h | 39 ++++++ sysdeps/mips/nptl/tcb-offsets.sym | 11 ++ sysdeps/mips/nptl/tls.h | 161 +++++++++++++++++++++++ 8 files changed, 346 insertions(+) create mode 100644 sysdeps/mips/nptl/Makefile create mode 100644 sysdeps/mips/nptl/jmpbuf-unwind.h create mode 100644 sysdeps/mips/nptl/nptl-sysdep.S create mode 100644 sysdeps/mips/nptl/pthread_spin_lock.S create mode 100644 sysdeps/mips/nptl/pthread_spin_trylock.S create mode 100644 sysdeps/mips/nptl/pthreaddef.h create mode 100644 sysdeps/mips/nptl/tcb-offsets.sym create mode 100644 sysdeps/mips/nptl/tls.h diff --git a/sysdeps/mips/nptl/Makefile b/sysdeps/mips/nptl/Makefile new file mode 100644 index 0000000000..d0c59a5091 --- /dev/null +++ b/sysdeps/mips/nptl/Makefile @@ -0,0 +1,25 @@ +# Copyright (C) 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 +# 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. + +ifeq ($(subdir),csu) +gen-as-const-headers += tcb-offsets.sym +endif + +ifeq ($(subdir),nptl) +libpthread-sysdep_routines += nptl-sysdep +endif diff --git a/sysdeps/mips/nptl/jmpbuf-unwind.h b/sysdeps/mips/nptl/jmpbuf-unwind.h new file mode 100644 index 0000000000..67cc969663 --- /dev/null +++ b/sysdeps/mips/nptl/jmpbuf-unwind.h @@ -0,0 +1,30 @@ +/* Copyright (C) 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 + 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. */ + +#include +#include +#include + +#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \ + _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj) + +#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \ + ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[0].__sp - (_adj)) + +/* We use the normal longjmp for unwinding. */ +#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val) diff --git a/sysdeps/mips/nptl/nptl-sysdep.S b/sysdeps/mips/nptl/nptl-sysdep.S new file mode 100644 index 0000000000..3f5c2a364a --- /dev/null +++ b/sysdeps/mips/nptl/nptl-sysdep.S @@ -0,0 +1,2 @@ +/* Pull in __syscall_error. */ +#include diff --git a/sysdeps/mips/nptl/pthread_spin_lock.S b/sysdeps/mips/nptl/pthread_spin_lock.S new file mode 100644 index 0000000000..d5f2a72340 --- /dev/null +++ b/sysdeps/mips/nptl/pthread_spin_lock.S @@ -0,0 +1,37 @@ +/* Copyright (C) 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 + 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. */ + +#include +#include +#include + +ENTRY (pthread_spin_lock) + .set push +#if _MIPS_SIM == _ABIO32 + .set mips2 +#endif +1: ll a2, 0(a0) + li a1, 1 + bnez a2, 1b + sc a1, 0(a0) + beqz a1, 1b + MIPS_SYNC + .set pop + li v0, 0 + ret +PSEUDO_END (pthread_spin_lock) diff --git a/sysdeps/mips/nptl/pthread_spin_trylock.S b/sysdeps/mips/nptl/pthread_spin_trylock.S new file mode 100644 index 0000000000..9c6e740f0f --- /dev/null +++ b/sysdeps/mips/nptl/pthread_spin_trylock.S @@ -0,0 +1,41 @@ +/* Copyright (C) 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 + 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. */ + +#include +#include +#define _ERRNO_H 1 +#include +#include + +ENTRY (pthread_spin_trylock) + .set push +#if _MIPS_SIM == _ABIO32 + .set mips2 +#endif + ll a2, 0(a0) + li a1, 1 + bnez a2, 1f + sc a1, 0(a0) + beqz a1, 1f + MIPS_SYNC + .set pop + li v0, 0 + ret +1: li v0, EBUSY + ret +PSEUDO_END (pthread_spin_trylock) diff --git a/sysdeps/mips/nptl/pthreaddef.h b/sysdeps/mips/nptl/pthreaddef.h new file mode 100644 index 0000000000..e72b4bc58d --- /dev/null +++ b/sysdeps/mips/nptl/pthreaddef.h @@ -0,0 +1,39 @@ +/* Copyright (C) 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 + 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. */ + +/* Default stack size. */ +#define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024) + +/* Required stack pointer alignment at beginning. */ +#define STACK_ALIGN 16 + +/* Minimal stack size after allocating thread descriptor and guard size. */ +#define MINIMAL_REST_STACK 2048 + +/* Alignment requirement for TCB. */ +#define TCB_ALIGNMENT 16 + + +/* Location of current stack frame. */ +#define CURRENT_STACK_FRAME __builtin_frame_address (0) + + +/* XXX Until we have a better place keep the definitions here. */ + +#define __exit_thread_inline(val) \ + INLINE_SYSCALL (exit, 1, (val)) diff --git a/sysdeps/mips/nptl/tcb-offsets.sym b/sysdeps/mips/nptl/tcb-offsets.sym new file mode 100644 index 0000000000..e0e71dc430 --- /dev/null +++ b/sysdeps/mips/nptl/tcb-offsets.sym @@ -0,0 +1,11 @@ +#include +#include + +-- + +-- Abuse tls.h macros to derive offsets relative to the thread register. +#define thread_offsetof(mem) (long)(offsetof(struct pthread, mem) - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE) + +MULTIPLE_THREADS_OFFSET thread_offsetof (header.multiple_threads) +PID_OFFSET thread_offsetof (pid) +TID_OFFSET thread_offsetof (tid) diff --git a/sysdeps/mips/nptl/tls.h b/sysdeps/mips/nptl/tls.h new file mode 100644 index 0000000000..1cef161010 --- /dev/null +++ b/sysdeps/mips/nptl/tls.h @@ -0,0 +1,161 @@ +/* Definition for thread-local data handling. NPTL/MIPS version. + Copyright (C) 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 + 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 _TLS_H +#define _TLS_H 1 + +#include + +#ifndef __ASSEMBLER__ +# include +# include +# include + +/* Type for the dtv. */ +typedef union dtv +{ + size_t counter; + struct + { + void *val; + bool is_static; + } pointer; +} dtv_t; + +/* Note: rd must be $v1 to be ABI-conformant. */ +# define READ_THREAD_POINTER() \ + ({ void *__result; \ + asm volatile (".set\tpush\n\t.set\tmips32r2\n\t" \ + "rdhwr\t%0, $29\n\t.set\tpop" : "=v" (__result)); \ + __result; }) + +#else /* __ASSEMBLER__ */ +# include + +# define READ_THREAD_POINTER(rd) \ + .set push; \ + .set mips32r2; \ + rdhwr rd, $29; \ + .set pop +#endif /* __ASSEMBLER__ */ + + +/* We require TLS support in the tools. */ +#ifndef HAVE_TLS_SUPPORT +# error "TLS support is required." +#endif + +/* Signal that TLS support is available. */ +#define USE_TLS 1 + +#ifndef __ASSEMBLER__ + +/* Get system call information. */ +# include + +/* The TP points to the start of the thread blocks. */ +# define TLS_DTV_AT_TP 1 + +/* Get the thread descriptor definition. */ +# include + +typedef struct +{ + dtv_t *dtv; + void *private; +} tcbhead_t; + +/* This is the size of the initial TCB. Because our TCB is before the thread + pointer, we don't need this. */ +# define TLS_INIT_TCB_SIZE 0 + +/* Alignment requirements for the initial TCB. */ +# define TLS_INIT_TCB_ALIGN __alignof__ (struct pthread) + +/* This is the size of the TCB. Because our TCB is before the thread + pointer, we don't need this. */ +# define TLS_TCB_SIZE 0 + +/* Alignment requirements for the TCB. */ +# define TLS_TCB_ALIGN __alignof__ (struct pthread) + +/* This is the size we need before TCB - actually, it includes the TCB. */ +# define TLS_PRE_TCB_SIZE \ + (sizeof (struct pthread) \ + + ((sizeof (tcbhead_t) + TLS_TCB_ALIGN - 1) & ~(TLS_TCB_ALIGN - 1))) + +/* The thread pointer (in hardware register $29) points to the end of + the TCB + 0x7000, as for PowerPC. The pthread_descr structure is + immediately in front of the TCB. */ +# define TLS_TCB_OFFSET 0x7000 + +/* Install the dtv pointer. The pointer passed is to the element with + index -1 which contain the length. */ +# define INSTALL_DTV(tcbp, dtvp) \ + (((tcbhead_t *) (tcbp))[-1].dtv = (dtvp) + 1) + +/* Install new dtv for current thread. */ +# define INSTALL_NEW_DTV(dtv) \ + (THREAD_DTV() = (dtv)) + +/* Return dtv of given thread descriptor. */ +# define GET_DTV(tcbp) \ + (((tcbhead_t *) (tcbp))[-1].dtv) + +/* Code to initially initialize the thread pointer. This might need + special attention since 'errno' is not yet available and if the + operation can cause a failure 'errno' must not be touched. */ +# define TLS_INIT_TP(tcbp, secondcall) \ + ({ INTERNAL_SYSCALL_DECL (err); \ + long result_var; \ + result_var = INTERNAL_SYSCALL (set_thread_area, err, 1, \ + (char *) (tcbp) + TLS_TCB_OFFSET); \ + INTERNAL_SYSCALL_ERROR_P (result_var, err) \ + ? "unknown error" : NULL; }) + +/* Return the address of the dtv for the current thread. */ +# define THREAD_DTV() \ + (((tcbhead_t *) (READ_THREAD_POINTER () - TLS_TCB_OFFSET))[-1].dtv) + +/* Return the thread descriptor for the current thread. */ +# define THREAD_SELF \ + ((struct pthread *) (READ_THREAD_POINTER () \ + - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE)) + +/* Magic for libthread_db to know how to do THREAD_SELF. */ +# define DB_THREAD_SELF \ + CONST_THREAD_AREA (32, TLS_TCB_OFFSET + TLS_PRE_TCB_SIZE) + +/* Access to data in the thread descriptor is easy. */ +# define THREAD_GETMEM(descr, member) \ + descr->member +# define THREAD_GETMEM_NC(descr, member, idx) \ + descr->member[idx] +# define THREAD_SETMEM(descr, member, value) \ + descr->member = (value) +# define THREAD_SETMEM_NC(descr, member, idx, value) \ + descr->member[idx] = (value) + +/* l_tls_offset == 0 is perfectly valid on MIPS, so we have to use some + different value to mean unset l_tls_offset. */ +# define NO_TLS_OFFSET -1 + +#endif /* __ASSEMBLER__ */ + +#endif /* tls.h */ From 2568b67466f185769889a9581a09911d6b619d71 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 28 Mar 2005 09:21:52 +0000 Subject: [PATCH 3428/4487] MIPS NPTL support --- .../sysv/linux/mips/nptl/bits/semaphore.h | 40 ++++ sysdeps/unix/sysv/linux/mips/nptl/clone.S | 2 + .../unix/sysv/linux/mips/nptl/createthread.c | 24 ++ sysdeps/unix/sysv/linux/mips/nptl/fork.c | 1 + .../unix/sysv/linux/mips/nptl/lowlevellock.h | 216 ++++++++++++++++++ sysdeps/unix/sysv/linux/mips/nptl/pt-vfork.S | 37 +++ .../unix/sysv/linux/mips/nptl/pthread_once.c | 94 ++++++++ .../unix/sysv/linux/mips/nptl/sysdep-cancel.h | 170 ++++++++++++++ sysdeps/unix/sysv/linux/mips/nptl/vfork.S | 42 ++++ 9 files changed, 626 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/mips/nptl/bits/semaphore.h create mode 100644 sysdeps/unix/sysv/linux/mips/nptl/clone.S create mode 100644 sysdeps/unix/sysv/linux/mips/nptl/createthread.c create mode 100644 sysdeps/unix/sysv/linux/mips/nptl/fork.c create mode 100644 sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h create mode 100644 sysdeps/unix/sysv/linux/mips/nptl/pt-vfork.S create mode 100644 sysdeps/unix/sysv/linux/mips/nptl/pthread_once.c create mode 100644 sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h create mode 100644 sysdeps/unix/sysv/linux/mips/nptl/vfork.S diff --git a/sysdeps/unix/sysv/linux/mips/nptl/bits/semaphore.h b/sysdeps/unix/sysv/linux/mips/nptl/bits/semaphore.h new file mode 100644 index 0000000000..c4440f9e9e --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/nptl/bits/semaphore.h @@ -0,0 +1,40 @@ +/* Copyright (C) 2002, 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 + 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 _SEMAPHORE_H +# error "Never use directly; include instead." +#endif + +#if _MIPS_SIM == _ABI64 +# define __SIZEOF_SEM_T 32 +#else +# define __SIZEOF_SEM_T 16 +#endif + +/* Value returned if `sem_open' failed. */ +#define SEM_FAILED ((sem_t *) 0) + +/* Maximum value the semaphore can have. */ +#define SEM_VALUE_MAX (2147483647) + + +typedef union +{ + char __size[__SIZEOF_SEM_T]; + long int __align; +} sem_t; diff --git a/sysdeps/unix/sysv/linux/mips/nptl/clone.S b/sysdeps/unix/sysv/linux/mips/nptl/clone.S new file mode 100644 index 0000000000..80c265bf6c --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/nptl/clone.S @@ -0,0 +1,2 @@ +#define RESET_PID +#include diff --git a/sysdeps/unix/sysv/linux/mips/nptl/createthread.c b/sysdeps/unix/sysv/linux/mips/nptl/createthread.c new file mode 100644 index 0000000000..5b2234f470 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/nptl/createthread.c @@ -0,0 +1,24 @@ +/* Copyright (C) 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 + 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. */ + +/* Value passed to 'clone' for initialization of the thread register. */ +#define TLS_VALUE ((void *) (pd) \ + + TLS_TCB_OFFSET + TLS_PRE_TCB_SIZE) + +/* Get the real implementation. */ +#include diff --git a/sysdeps/unix/sysv/linux/mips/nptl/fork.c b/sysdeps/unix/sysv/linux/mips/nptl/fork.c new file mode 100644 index 0000000000..06b7e1c69f --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/nptl/fork.c @@ -0,0 +1 @@ +#include "../i386/fork.c" diff --git a/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h new file mode 100644 index 0000000000..7edb28794f --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h @@ -0,0 +1,216 @@ +/* Copyright (C) 2003, 2004, 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 + 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 _LOWLEVELLOCK_H +#define _LOWLEVELLOCK_H 1 + +#include +#include +#include +#include +#include + + +#define FUTEX_WAIT 0 +#define FUTEX_WAKE 1 +#define FUTEX_REQUEUE 3 +#define FUTEX_CMP_REQUEUE 4 + +/* Initializer for compatibility lock. */ +#define LLL_MUTEX_LOCK_INITIALIZER (0) + +#define lll_futex_wait(futexp, val) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + __ret = INTERNAL_SYSCALL (futex, __err, 4, \ + (futexp), FUTEX_WAIT, (val), 0); \ + INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; \ + }) + +#define lll_futex_timed_wait(futexp, val, timespec) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + __ret = INTERNAL_SYSCALL (futex, __err, 4, \ + (futexp), FUTEX_WAIT, (val), (timespec)); \ + INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; \ + }) + +#define lll_futex_wake(futexp, nr) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + __ret = INTERNAL_SYSCALL (futex, __err, 4, \ + (futexp), FUTEX_WAKE, (nr), 0); \ + INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; \ + }) + +/* Returns non-zero if error happened, zero if success. */ +#define lll_futex_requeue(futexp, nr_wake, nr_move, mutex, val) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + __ret = INTERNAL_SYSCALL (futex, __err, 6, \ + (futexp), FUTEX_CMP_REQUEUE, (nr_wake), \ + (nr_move), (mutex), (val)); \ + INTERNAL_SYSCALL_ERROR_P (__ret, __err); \ + }) + + +static inline int __attribute__((always_inline)) +__lll_mutex_trylock(int *futex) +{ + return atomic_compare_and_exchange_val_acq (futex, 1, 0) != 0; +} +#define lll_mutex_trylock(lock) __lll_mutex_trylock (&(lock)) + + +static inline int __attribute__((always_inline)) +__lll_mutex_cond_trylock(int *futex) +{ + return atomic_compare_and_exchange_val_acq (futex, 2, 0) != 0; +} +#define lll_mutex_cond_trylock(lock) __lll_mutex_cond_trylock (&(lock)) + + +extern void __lll_lock_wait (int *futex) attribute_hidden; + +static inline void __attribute__((always_inline)) +__lll_mutex_lock(int *futex) +{ + if (atomic_compare_and_exchange_bool_acq (futex, 1, 0) != 0) + __lll_lock_wait (futex); +} +#define lll_mutex_lock(futex) __lll_mutex_lock (&(futex)) + + +static inline void __attribute__ ((always_inline)) +__lll_mutex_cond_lock (int *futex) +{ + if (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0) + __lll_lock_wait (futex); +} +#define lll_mutex_cond_lock(futex) __lll_mutex_cond_lock (&(futex)) + + +extern int __lll_timedlock_wait (int *futex, const struct timespec *) + attribute_hidden; + +static inline int __attribute__ ((always_inline)) +__lll_mutex_timedlock (int *futex, const struct timespec *abstime) +{ + int result = 0; + if (atomic_compare_and_exchange_bool_acq (futex, 1, 0) != 0) + result = __lll_timedlock_wait (futex, abstime); + return result; +} +#define lll_mutex_timedlock(futex, abstime) \ + __lll_mutex_timedlock (&(futex), abstime) + + +static inline void __attribute__ ((always_inline)) +__lll_mutex_unlock (int *futex) +{ + int val = atomic_exchange_rel (futex, 0); + if (__builtin_expect (val > 1, 0)) + lll_futex_wake (futex, 1); +} +#define lll_mutex_unlock(futex) __lll_mutex_unlock(&(futex)) + + +static inline void __attribute__ ((always_inline)) +__lll_mutex_unlock_force (int *futex) +{ + (void) atomic_exchange_rel (futex, 0); + lll_futex_wake (futex, 1); +} +#define lll_mutex_unlock_force(futex) __lll_mutex_unlock_force(&(futex)) + + +#define lll_mutex_islocked(futex) \ + (futex != 0) + + +/* Our internal lock implementation is identical to the binary-compatible + mutex implementation. */ + +/* Type for lock object. */ +typedef int lll_lock_t; + +/* Initializers for lock. */ +#define LLL_LOCK_INITIALIZER (0) +#define LLL_LOCK_INITIALIZER_LOCKED (1) + +extern int lll_unlock_wake_cb (int *__futex) attribute_hidden; + +/* The states of a lock are: + 0 - untaken + 1 - taken by one user + >1 - taken by more users */ + +#define lll_trylock(lock) lll_mutex_trylock (lock) +#define lll_lock(lock) lll_mutex_lock (lock) +#define lll_unlock(lock) lll_mutex_unlock (lock) +#define lll_islocked(lock) lll_mutex_islocked (lock) + +/* The kernel notifies a process which uses CLONE_CLEARTID via futex + wakeup when the clone terminates. The memory location contains the + thread ID while the clone is running and is reset to zero + afterwards. */ +#define lll_wait_tid(tid) \ + do { \ + __typeof (tid) __tid; \ + while ((__tid = (tid)) != 0) \ + lll_futex_wait (&(tid), __tid); \ + } while (0) + +extern int __lll_timedwait_tid (int *, const struct timespec *) + attribute_hidden; + +#define lll_timedwait_tid(tid, abstime) \ + ({ \ + int __res = 0; \ + if ((tid) != 0) \ + __res = __lll_timedwait_tid (&(tid), (abstime)); \ + __res; \ + }) + + +/* Conditional variable handling. */ + +extern void __lll_cond_wait (pthread_cond_t *cond) + attribute_hidden; +extern int __lll_cond_timedwait (pthread_cond_t *cond, + const struct timespec *abstime) + attribute_hidden; +extern void __lll_cond_wake (pthread_cond_t *cond) + attribute_hidden; +extern void __lll_cond_broadcast (pthread_cond_t *cond) + attribute_hidden; + +#define lll_cond_wait(cond) \ + __lll_cond_wait (cond) +#define lll_cond_timedwait(cond, abstime) \ + __lll_cond_timedwait (cond, abstime) +#define lll_cond_wake(cond) \ + __lll_cond_wake (cond) +#define lll_cond_broadcast(cond) \ + __lll_cond_broadcast (cond) + +#endif /* lowlevellock.h */ diff --git a/sysdeps/unix/sysv/linux/mips/nptl/pt-vfork.S b/sysdeps/unix/sysv/linux/mips/nptl/pt-vfork.S new file mode 100644 index 0000000000..fe2b81bc1f --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/nptl/pt-vfork.S @@ -0,0 +1,37 @@ +/* Copyright (C) 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 + 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. */ + +#include + +/* Save the PID value. */ +#define SAVE_PID \ + READ_THREAD_POINTER(v1); /* Get the thread pointer. */ \ + lw a2, PID_OFFSET(v1); /* Load the saved PID. */ \ + subu a2, $0, a2; /* Negate it. */ \ + sw a2, PID_OFFSET(v1); /* Store the temporary PID. */ + +/* Restore the old PID value in the parent. */ +#define RESTORE_PID \ + beqz v0, 1f; /* If we are the parent... */ \ + READ_THREAD_POINTER(v1); /* Get the thread pointer. */ \ + lw a2, PID_OFFSET(v1); /* Load the saved PID. */ \ + subu a2, $0, a2; /* Re-negate it. */ \ + sw a2, PID_OFFSET(v1); /* Restore the PID. */ \ +1: + +#include <../sysdeps/unix/sysv/linux/mips/vfork.S> diff --git a/sysdeps/unix/sysv/linux/mips/nptl/pthread_once.c b/sysdeps/unix/sysv/linux/mips/nptl/pthread_once.c new file mode 100644 index 0000000000..649b752f54 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/nptl/pthread_once.c @@ -0,0 +1,94 @@ +/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek , 2003. + + 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. */ + +#include "pthreadP.h" +#include + + +unsigned long int __fork_generation attribute_hidden; + + +static void +clear_once_control (void *arg) +{ + pthread_once_t *once_control = (pthread_once_t *) arg; + + *once_control = 0; + lll_futex_wake (once_control, INT_MAX); +} + + +int +__pthread_once (once_control, init_routine) + pthread_once_t *once_control; + void (*init_routine) (void); +{ + while (1) + { + int oldval, val, newval; + + val = *once_control; + do + { + /* Check if the initialized has already been done. */ + if ((val & 2) != 0) + return 0; + + oldval = val; + newval = (oldval & 3) | __fork_generation | 1; + val = atomic_compare_and_exchange_val_acq (once_control, newval, + oldval); + } + while (__builtin_expect (val != oldval, 0)); + + /* Check if another thread already runs the initializer. */ + if ((oldval & 1) != 0) + { + /* Check whether the initializer execution was interrupted + by a fork. */ + if (((oldval ^ newval) & -4) == 0) + { + /* Same generation, some other thread was faster. Wait. */ + lll_futex_wait (once_control, newval); + continue; + } + } + + /* This thread is the first here. Do the initialization. + Register a cleanup handler so that in case the thread gets + interrupted the initialization can be restarted. */ + pthread_cleanup_push (clear_once_control, once_control); + + init_routine (); + + pthread_cleanup_pop (0); + + + /* Add one to *once_control. */ + atomic_increment (once_control); + + /* Wake up all other threads. */ + lll_futex_wake (once_control, INT_MAX); + break; + } + + return 0; +} +weak_alias (__pthread_once, pthread_once) +strong_alias (__pthread_once, __pthread_once_internal) diff --git a/sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h new file mode 100644 index 0000000000..02508e2155 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h @@ -0,0 +1,170 @@ +/* Copyright (C) 2003, 2004, 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 + 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. */ + +#include +#include +#include +#ifndef __ASSEMBLER__ +# include +#endif + +#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt + +#ifdef __PIC__ +# undef PSEUDO +# define PSEUDO(name, syscall_name, args) \ + .align 2; \ + L(pseudo_start): \ + cfi_startproc; \ + 99: la t9,__syscall_error; \ + jr t9; \ + .type __##syscall_name##_nocancel, @function; \ + .globl __##syscall_name##_nocancel; \ + __##syscall_name##_nocancel: \ + .set noreorder; \ + .cpload t9; \ + li v0, SYS_ify(syscall_name); \ + syscall; \ + .set reorder; \ + bne a3, zero, SYSCALL_ERROR_LABEL; \ + ret; \ + .size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel; \ + ENTRY (name) \ + .set noreorder; \ + .cpload t9; \ + .set reorder; \ + SINGLE_THREAD_P(v1); \ + bne zero, v1, L(pseudo_cancel); \ + .set noreorder; \ + li v0, SYS_ify(syscall_name); \ + syscall; \ + .set reorder; \ + bne a3, zero, SYSCALL_ERROR_LABEL; \ + ret; \ + L(pseudo_cancel): \ + SAVESTK_##args; \ + sw ra, 28(sp); \ + cfi_rel_offset (ra, 28); \ + sw gp, 32(sp); \ + cfi_rel_offset (gp, 32); \ + PUSHARGS_##args; /* save syscall args */ \ + CENABLE; \ + lw gp, 32(sp); \ + sw v0, 44(sp); /* save mask */ \ + POPARGS_##args; /* restore syscall args */ \ + .set noreorder; \ + li v0, SYS_ify (syscall_name); \ + syscall; \ + .set reorder; \ + sw v0, 36(sp); /* save syscall result */ \ + sw a3, 40(sp); /* save syscall error flag */ \ + lw a0, 44(sp); /* pass mask as arg1 */ \ + CDISABLE; \ + lw gp, 32(sp); \ + lw v0, 36(sp); /* restore syscall result */ \ + lw a3, 40(sp); /* restore syscall error flag */ \ + lw ra, 28(sp); /* restore return address */ \ + .set noreorder; \ + bne a3, zero, SYSCALL_ERROR_LABEL; \ + RESTORESTK; \ + L(pseudo_end): \ + .set reorder; + +# undef PSEUDO_END +# define PSEUDO_END(sym) cfi_endproc; .end sym; .size sym,.-sym + +#endif + +# define PUSHARGS_0 /* nothing to do */ +# define PUSHARGS_1 PUSHARGS_0 sw a0, 0(sp); cfi_rel_offset (a0, 0); +# define PUSHARGS_2 PUSHARGS_1 sw a1, 4(sp); cfi_rel_offset (a1, 4); +# define PUSHARGS_3 PUSHARGS_2 sw a2, 8(sp); cfi_rel_offset (a2, 8); +# define PUSHARGS_4 PUSHARGS_3 sw a3, 12(sp); cfi_rel_offset (a3, 12); +# define PUSHARGS_5 PUSHARGS_4 /* handled by SAVESTK_## */ +# define PUSHARGS_6 PUSHARGS_5 +# define PUSHARGS_7 PUSHARGS_6 + +# define POPARGS_0 /* nothing to do */ +# define POPARGS_1 POPARGS_0 lw a0, 0(sp); +# define POPARGS_2 POPARGS_1 lw a1, 4(sp); +# define POPARGS_3 POPARGS_2 lw a2, 8(sp); +# define POPARGS_4 POPARGS_3 lw a3, 12(sp); +# define POPARGS_5 POPARGS_4 /* args already in new stackframe */ +# define POPARGS_6 POPARGS_5 +# define POPARGS_7 POPARGS_6 + + +# define STKSPACE 48 +# define SAVESTK_0 subu sp, STKSPACE; cfi_adjust_cfa_offset(STKSPACE) +# define SAVESTK_1 SAVESTK_0 +# define SAVESTK_2 SAVESTK_1 +# define SAVESTK_3 SAVESTK_2 +# define SAVESTK_4 SAVESTK_3 +# define SAVESTK_5 lw t0, 16(sp); \ + SAVESTK_0; \ + sw t0, 16(sp) + +# define SAVESTK_6 lw t0, 16(sp); \ + lw t1, 20(sp); \ + SAVESTK_0; \ + sw t0, 16(sp); \ + sw t1, 20(sp) + +# define SAVESTK_7 lw t0, 16(sp); \ + lw t1, 20(sp); \ + lw t2, 24(sp); \ + SAVESTK_0; \ + sw t0, 16(sp); \ + sw t1, 20(sp); \ + sw t2, 24(sp) + +# define RESTORESTK addu sp, STKSPACE; cfi_adjust_cfa_offset(-STKSPACE) + + +/* We use jalr rather than jal. This means that the assembler will not + automatically restore $gp (in case libc has multiple GOTs) so we must + do it manually - which we have to do anyway since we don't use .cprestore. + It also shuts up the assembler warning about not using .cprestore. */ +# ifdef IS_IN_libpthread +# define CENABLE la t9, __pthread_enable_asynccancel; jalr t9; +# define CDISABLE la t9, __pthread_disable_asynccancel; jalr t9; +# elif defined IS_IN_librt +# define CENABLE la t9, __librt_enable_asynccancel; jalr t9; +# define CDISABLE la t9, __librt_disable_asynccancel; jalr t9; +# else +# define CENABLE la t9, __libc_enable_asynccancel; jalr t9; +# define CDISABLE la t9, __libc_disable_asynccancel; jalr t9; +# endif + +# ifndef __ASSEMBLER__ +# define SINGLE_THREAD_P \ + __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ + header.multiple_threads) \ + == 0, 1) +# else +# define SINGLE_THREAD_P(reg) \ + READ_THREAD_POINTER(reg); \ + lw reg, MULTIPLE_THREADS_OFFSET(reg) +#endif + +#elif !defined __ASSEMBLER__ + +# define SINGLE_THREAD_P 1 +# define NO_CANCELLATION 1 + +#endif diff --git a/sysdeps/unix/sysv/linux/mips/nptl/vfork.S b/sysdeps/unix/sysv/linux/mips/nptl/vfork.S new file mode 100644 index 0000000000..874a2e2bf4 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/nptl/vfork.S @@ -0,0 +1,42 @@ +/* Copyright (C) 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 + 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. */ + +#include + +/* Save the PID value. */ +#define SAVE_PID \ + READ_THREAD_POINTER(v1); /* Get the thread pointer. */ \ + lw a2, PID_OFFSET(v1); /* Load the saved PID. */ \ + subu a2, $0, a2; /* Negate it. */ \ + bnez a2, 1f; /* If it was zero... */ \ + lui a2, 0x8000; /* use 0x80000000 instead. */ \ +1: sw a2, PID_OFFSET(v1); /* Store the temporary PID. */ + +/* Restore the old PID value in the parent. */ +#define RESTORE_PID \ + beqz v0, 1f; /* If we are the parent... */ \ + READ_THREAD_POINTER(v1); /* Get the thread pointer. */ \ + lw a2, PID_OFFSET(v1); /* Load the saved PID. */ \ + subu a2, $0, a2; /* Re-negate it. */ \ + lui a0, 0x8000; /* Load 0x80000000... */ \ + bne a2, a0, 2f; /* ... compare against it... */ \ + li a2, 0; /* ... use 0 instead. */ \ +2: sw a2, PID_OFFSET(v1); /* Restore the PID. */ \ +1: + +#include <../sysdeps/unix/sysv/linux/mips/vfork.S> From 305fae3b1977fcffb72b9b2a18c9830bb36dabfd Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 28 Mar 2005 09:32:04 +0000 Subject: [PATCH 3429/4487] (elf_machine_rel): Add TLS relocations. --- sysdeps/mips/dl-machine.h | 45 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index a8a41fff02..aa2cef83bc 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -1,5 +1,6 @@ /* Machine-dependent ELF dynamic relocation inline functions. MIPS version. - Copyright (C) 1996-2001, 2002, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 1996-2001, 2002, 2003, 2004, 2005 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Kazumoto Kojima . @@ -34,6 +35,7 @@ #include #include +#include /* The offset of gp from GOT might be system-dependent. It's set by ld. The same value is also */ @@ -322,6 +324,47 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, switch (r_type) { +#if defined (USE_TLS) && !defined (RTLD_BOOTSTRAP) +# if _MIPS_SIM == _ABI64 + case R_MIPS_TLS_DTPMOD64: + case R_MIPS_TLS_DTPREL64: + case R_MIPS_TLS_TPREL64: +# else + case R_MIPS_TLS_DTPMOD32: + case R_MIPS_TLS_DTPREL32: + case R_MIPS_TLS_TPREL32: +# endif + { + struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type); + Elf32_Addr value = sym == NULL ? 0 : sym_map->l_addr + sym->st_value; + + if (sym) + value += sym->st_value; + + switch (r_type) + { + case R_MIPS_TLS_DTPMOD64: + case R_MIPS_TLS_DTPMOD32: + if (sym_map) + *(ElfW(Word) *)reloc_addr = sym_map->l_tls_modid; + break; + + case R_MIPS_TLS_DTPREL64: + case R_MIPS_TLS_DTPREL32: + *(ElfW(Word) *)reloc_addr += TLS_DTPREL_VALUE (sym); + break; + + case R_MIPS_TLS_TPREL32: + case R_MIPS_TLS_TPREL64: + CHECK_STATIC_TLS (map, sym_map); + *(ElfW(Word) *)reloc_addr += TLS_TPREL_VALUE (sym_map, sym); + break; + } + + break; + } +#endif + #if _MIPS_SIM == _ABI64 case (R_MIPS_64 << 8) | R_MIPS_REL32: #else From e9eb4f57796c7031bb4398e7321a7f2f56dc7b79 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 28 Mar 2005 09:32:27 +0000 Subject: [PATCH 3430/4487] Protect against multiple inclusion. --- sysdeps/mips/bits/setjmp.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sysdeps/mips/bits/setjmp.h b/sysdeps/mips/bits/setjmp.h index ec0aaa020d..2b42b22ba4 100644 --- a/sysdeps/mips/bits/setjmp.h +++ b/sysdeps/mips/bits/setjmp.h @@ -1,5 +1,5 @@ /* Define the machine-dependent type `jmp_buf'. MIPS version. - Copyright (C) 1992, 1993, 1995, 1997, 2000, 2002, 2003, 2004 + Copyright (C) 1992, 1993, 1995, 1997, 2000, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -18,7 +18,10 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#ifndef _SETJMP_H +#ifndef _MIPS_BITS_SETJMP_H +#define _MIPS_BITS_SETJMP_H 1 + +#if !defined(_SETJMP_H) && !defined(_PTHREAD_H) # error "Never include directly; use instead." #endif @@ -79,3 +82,5 @@ typedef struct containing a local variable at ADDRESS. */ #define _JMPBUF_UNWINDS(jmpbuf, address) \ ((void *) (address) < (jmpbuf)[0].__sp) + +#endif /* _MIPS_BITS_SETJMP_H */ From 511642252944a8eb40eaa3e303f33e9c5e5b5128 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 28 Mar 2005 20:42:43 +0000 Subject: [PATCH 3431/4487] 2005-03-28 Roland McGrath * sysdeps/generic/w_exp2.c [NO_LONG_DOUBLE]: Fix typos in alias names. Reported by Mark Mitchell . * Versions.def (libm): Define GLIBC_2.4 set. * math/Versions (libm: GLIBC_2.4): Add this set, with exp2l. * sysdeps/i386/Versions (libm: GLIBC_2.1): Add this set, with exp2l. * sysdeps/ia64/Versions: Likewise. * sysdeps/m68k/Versions: Likewise. * sysdeps/sparc/sparc64/Versions: Likewise. * sysdeps/x86_64/Versions: New file. * sysdeps/mips/mips64/Versions: New file. --- sysdeps/m68k/Versions | 7 +++++++ sysdeps/mips/mips64/Versions | 7 +++++++ 2 files changed, 14 insertions(+) create mode 100644 sysdeps/mips/mips64/Versions diff --git a/sysdeps/m68k/Versions b/sysdeps/m68k/Versions index 2b020f8f58..f450291a9b 100644 --- a/sysdeps/m68k/Versions +++ b/sysdeps/m68k/Versions @@ -4,3 +4,10 @@ libc { __divdi3; __moddi3; __udivdi3; __umoddi3; } } +libm { + GLIBC_2.1 { + # A generic bug got this omitted from other configurations' version + # sets, but we always had it. + exp2l; + } +} diff --git a/sysdeps/mips/mips64/Versions b/sysdeps/mips/mips64/Versions new file mode 100644 index 0000000000..253a65f04e --- /dev/null +++ b/sysdeps/mips/mips64/Versions @@ -0,0 +1,7 @@ +libm { + GLIBC_2.1 { + # A generic bug got this omitted from other configurations' version + # sets, but we always had it. + exp2l; + } +} From 60bb0e618881a3d15acfdc43eca88def72479d9e Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 29 Mar 2005 19:56:26 +0000 Subject: [PATCH 3432/4487] MIPS NPTL specific pthreadtypes.h --- .../sysv/linux/mips/nptl/bits/pthreadtypes.h | 193 ++++++++++++++++++ 1 file changed, 193 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h diff --git a/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h new file mode 100644 index 0000000000..e14a487508 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h @@ -0,0 +1,193 @@ +/* Machine-specific pthread type layouts. MIPS version. + Copyright (C) 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 + 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_PTHREADTYPES_H +#define _BITS_PTHREADTYPES_H 1 + +#if _MIPS_SIM == _ABI64 +# define __SIZEOF_PTHREAD_ATTR_T 56 +# define __SIZEOF_PTHREAD_MUTEX_T 40 +# define __SIZEOF_PTHREAD_MUTEXATTR_T 4 +# define __SIZEOF_PTHREAD_COND_T 48 +# define __SIZEOF_PTHREAD_CONDATTR_T 4 +# define __SIZEOF_PTHREAD_RWLOCK_T 56 +# define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 +# define __SIZEOF_PTHREAD_BARRIER_T 32 +# define __SIZEOF_PTHREAD_BARRIERATTR_T 4 +#else +# define __SIZEOF_PTHREAD_ATTR_T 36 +# define __SIZEOF_PTHREAD_MUTEX_T 24 +# define __SIZEOF_PTHREAD_MUTEXATTR_T 4 +# define __SIZEOF_PTHREAD_COND_T 48 +# define __SIZEOF_PTHREAD_CONDATTR_T 4 +# define __SIZEOF_PTHREAD_RWLOCK_T 32 +# define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 +# define __SIZEOF_PTHREAD_BARRIER_T 20 +# define __SIZEOF_PTHREAD_BARRIERATTR_T 4 +#endif + + +/* Thread identifiers. The structure of the attribute type is + deliberately not exposed. */ +typedef unsigned long int pthread_t; + + +typedef union +{ + char __size[__SIZEOF_PTHREAD_ATTR_T]; + long int __align; +} pthread_attr_t; + + +/* Data structures for mutex handling. The structure of the attribute + type is deliberately not exposed. */ +typedef union +{ + struct + { + int __lock; + unsigned int __count; + int __owner; +#if _MIPS_SIM == _ABI64 + unsigned int __nusers; +#endif + /* KIND must stay at this position in the structure to maintain + binary compatibility. */ + int __kind; +#if _MIPS_SIM != _ABI64 + unsigned int __nusers; +#endif + int __spins; + } __data; + char __size[__SIZEOF_PTHREAD_MUTEX_T]; + long int __align; +} pthread_mutex_t; + +typedef union +{ + char __size[__SIZEOF_PTHREAD_MUTEXATTR_T]; + int __align; +} pthread_mutexattr_t; + + +/* Data structure for conditional variable handling. The structure of + the attribute type is deliberately not exposed. */ +typedef union +{ + struct + { + int __lock; + unsigned int __futex; + __extension__ unsigned long long int __total_seq; + __extension__ unsigned long long int __wakeup_seq; + __extension__ unsigned long long int __woken_seq; + void *__mutex; + unsigned int __nwaiters; + unsigned int __broadcast_seq; + } __data; + char __size[__SIZEOF_PTHREAD_COND_T]; + __extension__ long long int __align; +} pthread_cond_t; + +typedef union +{ + char __size[__SIZEOF_PTHREAD_CONDATTR_T]; + int __align; +} pthread_condattr_t; + + +/* Keys for thread-specific data */ +typedef unsigned int pthread_key_t; + + +/* Once-only execution */ +typedef int pthread_once_t; + + +#if defined __USE_UNIX98 || defined __USE_XOPEN2K +/* Data structure for read-write lock variable handling. The + structure of the attribute type is deliberately not exposed. */ +typedef union +{ +# if _MIPS_SIM == _ABI64 + struct + { + int __lock; + unsigned int __nr_readers; + unsigned int __readers_wakeup; + unsigned int __writer_wakeup; + unsigned int __nr_readers_queued; + unsigned int __nr_writers_queued; + int __writer; + int __pad1; + unsigned long int __pad2; + unsigned long int __pad3; + /* FLAGS must stay at this position in the structure to maintain + binary compatibility. */ + unsigned int __flags; + } __data; +# else + struct + { + int __lock; + unsigned int __nr_readers; + unsigned int __readers_wakeup; + unsigned int __writer_wakeup; + unsigned int __nr_readers_queued; + unsigned int __nr_writers_queued; + /* FLAGS must stay at this position in the structure to maintain + binary compatibility. */ + unsigned int __flags; + int __writer; + } __data; +# endif + char __size[__SIZEOF_PTHREAD_RWLOCK_T]; + long int __align; +} pthread_rwlock_t; + +typedef union +{ + char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T]; + long int __align; +} pthread_rwlockattr_t; +#endif + + +#ifdef __USE_XOPEN2K +/* POSIX spinlock data type. */ +typedef volatile int pthread_spinlock_t; + + +/* POSIX barriers data type. The structure of the type is + deliberately not exposed. */ +typedef union +{ + char __size[__SIZEOF_PTHREAD_BARRIER_T]; + long int __align; +} pthread_barrier_t; + +typedef union +{ + char __size[__SIZEOF_PTHREAD_BARRIERATTR_T]; + int __align; +} pthread_barrierattr_t; +#endif + + +#endif /* bits/pthreadtypes.h */ From ef0ae0f57ec3b3f219fcb143a20398c5a9444c7a Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 28 Apr 2005 22:28:50 +0000 Subject: [PATCH 3433/4487] 2005-04-28 Roland McGrath * sysdeps/generic/dl-sysdep.h: Remove multiple inclusion protection. * sysdeps/alpha/dl-sysdep.h: Likewise. Use #include_next instead of duplicating generic file's contents. * sysdeps/ia64/dl-sysdep.h: Likewise. * sysdeps/sparc/dl-sysdep.h: Likewise. --- sysdeps/alpha/dl-sysdep.h | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/sysdeps/alpha/dl-sysdep.h b/sysdeps/alpha/dl-sysdep.h index 0b4c8050de..cd678f4e43 100644 --- a/sysdeps/alpha/dl-sysdep.h +++ b/sysdeps/alpha/dl-sysdep.h @@ -1,5 +1,5 @@ /* System-specific settings for dynamic linker code. Alpha version. - Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 2002, 2003, 2004, 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 @@ -17,25 +17,8 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#ifndef _DL_SYSDEP_H -#define _DL_SYSDEP_H 1 - -/* This macro must be defined to either 0 or 1. - - If 1, then an errno global variable hidden in ld.so will work right with - all the errno-using libc code compiled for ld.so, and there is never a - need to share the errno location with libc. This is appropriate only if - all the libc functions that ld.so uses are called without PLT and always - get the versions linked into ld.so rather than the libc ones. */ - -#ifdef IS_IN_rtld -# define RTLD_PRIVATE_ERRNO 1 -#else -# define RTLD_PRIVATE_ERRNO 0 -#endif +#include_next /* _dl_argv cannot be attribute_relro, because _dl_start_user might write into it after _dl_start returns. */ #define DL_ARGV_NOT_RELRO 1 - -#endif /* dl-sysdep.h */ From 39f0b3ca13d547a896666a85d5aed63e601c98ec Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 24 May 2005 06:12:39 +0000 Subject: [PATCH 3434/4487] * ChangeLog.arm: New file (this one). * sysdeps/arm, sysdeps/unix/arm, sysdeps/unix/sysv/linux/arm: Subdirectories moved here from main repository. * sysdeps/arm/preconfigure: New file. * sysdeps/arm/shlib-versions: New file. --- ChangeLog.arm | 13 +++++++++++++ sysdeps/arm/preconfigure | 4 ++++ sysdeps/arm/shlib-versions | 1 + 3 files changed, 18 insertions(+) create mode 100644 ChangeLog.arm create mode 100644 sysdeps/arm/preconfigure create mode 100644 sysdeps/arm/shlib-versions diff --git a/ChangeLog.arm b/ChangeLog.arm new file mode 100644 index 0000000000..ef324f704f --- /dev/null +++ b/ChangeLog.arm @@ -0,0 +1,13 @@ +2005-05-23 Roland McGrath + + * ChangeLog.arm: New file (this one). + * sysdeps/arm, sysdeps/unix/arm, sysdeps/unix/sysv/linux/arm: + Subdirectories moved here from main repository. + * sysdeps/arm/preconfigure: New file. + * sysdeps/arm/shlib-versions: New file. + +Local Variables: +mode: change-log +left-margin: 8 +fill-column: 74 +End: diff --git a/sysdeps/arm/preconfigure b/sysdeps/arm/preconfigure new file mode 100644 index 0000000000..e63848dc74 --- /dev/null +++ b/sysdeps/arm/preconfigure @@ -0,0 +1,4 @@ +case "$machine" in +arm*) base_machine=arm machine=arm/arm32/$machine ;; +thumb*) base_machine=thumb machine=arm/thumb/$machine ;; +esac diff --git a/sysdeps/arm/shlib-versions b/sysdeps/arm/shlib-versions new file mode 100644 index 0000000000..d603d6ebbe --- /dev/null +++ b/sysdeps/arm/shlib-versions @@ -0,0 +1 @@ +arm.*-.*-linux.* ld=ld-linux.so.2 From fc490942606ac2394160ab6f12cac100038c8929 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 24 May 2005 06:13:03 +0000 Subject: [PATCH 3435/4487] 2005-03-22 Roland McGrath * Makefile ($(distname).tar): Fail if sysdeps/.../configure files are not all up to date. Touch configure files after cvs export. (glibc-port-%-$(dist-version).tar): Likewise. --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index a65257be82..d1cbbef489 100644 --- a/Makefile +++ b/Makefile @@ -22,10 +22,14 @@ dist-ports: $(foreach Z,.bz2 .gz,$(distname).tar$Z) md5sum $^ $(distname).tar: @rm -fr $(basename $@) + $(MAKE) -q `find sysdeps -name configure` $(do-export) ports + find $(basename $@) -name configure -print | xargs touch tar cf $@ $(basename $@) rm -fr $(basename $@) +sysdeps-of-stem = sysdeps/$* sysdeps/unix/sysv/linux/$* + .PRECIOUS: %.gz %.bz2 # Don't delete output as intermediate files. dist-port-%: $(foreach Z,.bz2 .gz,glibc-port-%-$(dist-version).tar$Z) md5sum $^ @@ -33,9 +37,10 @@ glibc-port-%-$(dist-version).tar: configure ChangeLog @rm -fr $(basename $@) $(do-export) -l ports rm -f $(basename $@)/ChangeLog.[a-z]* - $(do-export) ports/ChangeLog.$* \ - ports/sysdeps/$* ports/sysdeps/unix/sysv/linux/$* + $(MAKE) -q `find $(sysdeps-of-stem) -name configure` + $(do-export) ports/ChangeLog.$* $(addprefix ports/,$(sysdeps-of-stem)) mv $(basename $@)/ports/* $(basename $@)/ rmdir $(basename $@)/ports + find $(basename $@) -name configure -print | xargs touch tar cf $@ $(basename $@) rm -fr $(basename $@) From 3a980ecbe317ca6cda18d6db3162f356add93aa2 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 24 May 2005 06:13:06 +0000 Subject: [PATCH 3436/4487] . --- ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ChangeLog b/ChangeLog index 071fc8d7d6..6ddb2259e5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-03-22 Roland McGrath + + * Makefile ($(distname).tar): Fail if sysdeps/.../configure files are + not all up to date. Touch configure files after cvs export. + (glibc-port-%-$(dist-version).tar): Likewise. + 2004-10-22 Roland McGrath * Makefile (dist, dist-ports): New target. From 8796ce2127c66be370c387194d2acf87245a8794 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 26 May 2005 14:30:48 +0000 Subject: [PATCH 3437/4487] Add space inf weak_alias use. --- sysdeps/alpha/elf/start.S | 2 +- sysdeps/alpha/htonl.S | 2 +- sysdeps/alpha/htons.S | 2 +- sysdeps/unix/sysv/linux/alpha/clone.S | 2 +- sysdeps/unix/sysv/linux/alpha/getcontext.S | 2 +- sysdeps/unix/sysv/linux/alpha/getrusage.S | 2 +- sysdeps/unix/sysv/linux/alpha/setcontext.S | 2 +- sysdeps/unix/sysv/linux/alpha/sigsuspend.S | 2 +- sysdeps/unix/sysv/linux/alpha/swapcontext.S | 2 +- sysdeps/unix/sysv/linux/alpha/syscall.S | 2 +- sysdeps/unix/sysv/linux/hppa/clone.S | 2 +- sysdeps/unix/sysv/linux/mips/clone.S | 2 +- sysdeps/unix/sysv/linux/mips/vfork.S | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/sysdeps/alpha/elf/start.S b/sysdeps/alpha/elf/start.S index 3c2bc59adc..ebe14b4c8e 100644 --- a/sysdeps/alpha/elf/start.S +++ b/sysdeps/alpha/elf/start.S @@ -77,7 +77,7 @@ _start: .end _start /* For ECOFF backwards compatibility. */ -weak_alias(_start, __start) +weak_alias (_start, __start) /* Define a symbol for the first piece of initialized data. */ .data diff --git a/sysdeps/alpha/htonl.S b/sysdeps/alpha/htonl.S index eb4fbd2ab4..ef2a575995 100644 --- a/sysdeps/alpha/htonl.S +++ b/sysdeps/alpha/htonl.S @@ -41,4 +41,4 @@ ENTRY(htonl) END(htonl) -weak_alias(htonl, ntohl) +weak_alias (htonl, ntohl) diff --git a/sysdeps/alpha/htons.S b/sysdeps/alpha/htons.S index f1ef754814..7c6270226d 100644 --- a/sysdeps/alpha/htons.S +++ b/sysdeps/alpha/htons.S @@ -37,4 +37,4 @@ ENTRY(htons) END(htons) -weak_alias(htons, ntohs) +weak_alias (htons, ntohs) diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S index 1c450d1737..5e0b21ea15 100644 --- a/sysdeps/unix/sysv/linux/alpha/clone.S +++ b/sysdeps/unix/sysv/linux/alpha/clone.S @@ -146,4 +146,4 @@ thread_start: .end thread_start -weak_alias(__clone, clone) +weak_alias (__clone, clone) diff --git a/sysdeps/unix/sysv/linux/alpha/getcontext.S b/sysdeps/unix/sysv/linux/alpha/getcontext.S index 3566890cf9..bf9820ac73 100644 --- a/sysdeps/unix/sysv/linux/alpha/getcontext.S +++ b/sysdeps/unix/sysv/linux/alpha/getcontext.S @@ -41,7 +41,7 @@ ENTRY (__getcontext) ret END(__getcontext) -weak_alias(__getcontext, getcontext) +weak_alias (__getcontext, getcontext) /* An internal routine used by getcontext and setcontext. diff --git a/sysdeps/unix/sysv/linux/alpha/getrusage.S b/sysdeps/unix/sysv/linux/alpha/getrusage.S index 2c34e98ce6..46797aa83b 100644 --- a/sysdeps/unix/sysv/linux/alpha/getrusage.S +++ b/sysdeps/unix/sysv/linux/alpha/getrusage.S @@ -145,5 +145,5 @@ strong_alias(__getrusage_tv64, ____getrusage_tv64) default_symbol_version (____getrusage_tv64, __getrusage, GLIBC_2.1) default_symbol_version (__getrusage_tv64, getrusage, GLIBC_2.1) #else -weak_alias(__getrusage, getrusage) +weak_alias (__getrusage, getrusage) #endif diff --git a/sysdeps/unix/sysv/linux/alpha/setcontext.S b/sysdeps/unix/sysv/linux/alpha/setcontext.S index 7d443d41c7..27abfd0c12 100644 --- a/sysdeps/unix/sysv/linux/alpha/setcontext.S +++ b/sysdeps/unix/sysv/linux/alpha/setcontext.S @@ -32,4 +32,4 @@ PSEUDO(__setcontext, sigreturn, 1) ret PSEUDO_END(__setcontext) -weak_alias(__setcontext, setcontext) +weak_alias (__setcontext, setcontext) diff --git a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S index e5de55faeb..48c3f271c7 100644 --- a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S +++ b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S @@ -29,5 +29,5 @@ PSEUDO(__sigsuspend, sigsuspend, 1) ret PSEUDO_END(__sigsuspend) libc_hidden_def (__sigsuspend) -weak_alias(__sigsuspend, sigsuspend) +weak_alias (__sigsuspend, sigsuspend) strong_alias (__sigsuspend, __libc_sigsuspend) diff --git a/sysdeps/unix/sysv/linux/alpha/swapcontext.S b/sysdeps/unix/sysv/linux/alpha/swapcontext.S index 5f6615e0b6..1221f67f78 100644 --- a/sysdeps/unix/sysv/linux/alpha/swapcontext.S +++ b/sysdeps/unix/sysv/linux/alpha/swapcontext.S @@ -48,4 +48,4 @@ ENTRY(__swapcontext) #endif END(__swapcontext) -weak_alias(__swapcontext, swapcontext) +weak_alias (__swapcontext, swapcontext) diff --git a/sysdeps/unix/sysv/linux/alpha/syscall.S b/sysdeps/unix/sysv/linux/alpha/syscall.S index 10a32d5dc8..0c4081363a 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscall.S +++ b/sysdeps/unix/sysv/linux/alpha/syscall.S @@ -74,4 +74,4 @@ $error: END(__syscall) -weak_alias(__syscall, syscall) +weak_alias (__syscall, syscall) diff --git a/sysdeps/unix/sysv/linux/hppa/clone.S b/sysdeps/unix/sysv/linux/hppa/clone.S index 4f3bb9e206..f497bca13d 100644 --- a/sysdeps/unix/sysv/linux/hppa/clone.S +++ b/sysdeps/unix/sysv/linux/hppa/clone.S @@ -96,4 +96,4 @@ thread_start: PSEUDO_END(__clone) -weak_alias(__clone, clone) +weak_alias (__clone, clone) diff --git a/sysdeps/unix/sysv/linux/mips/clone.S b/sysdeps/unix/sysv/linux/mips/clone.S index 8b8e0072f5..f521df1771 100644 --- a/sysdeps/unix/sysv/linux/mips/clone.S +++ b/sysdeps/unix/sysv/linux/mips/clone.S @@ -163,4 +163,4 @@ L(gotpid): END(__thread_start) -weak_alias(__clone, clone) +weak_alias (__clone, clone) diff --git a/sysdeps/unix/sysv/linux/mips/vfork.S b/sysdeps/unix/sysv/linux/mips/vfork.S index 1383ddc6a7..38b6195282 100644 --- a/sysdeps/unix/sysv/linux/mips/vfork.S +++ b/sysdeps/unix/sysv/linux/mips/vfork.S @@ -95,4 +95,4 @@ L(error): END(__vfork) libc_hidden_def(__vfork) -weak_alias(__vfork, vfork) +weak_alias (__vfork, vfork) From 3597225d0f7195df628c7dc2e97aaf9f008e4bf8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 26 May 2005 18:49:14 +0000 Subject: [PATCH 3438/4487] (O_DIRECT): Fix value. --- sysdeps/unix/sysv/linux/alpha/bits/fcntl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h index ce4a5da37f..c4a9b77e2e 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 1995-1999, 2000, 2004 Free Software Foundation, Inc. + Copyright (C) 1995-1999, 2000, 2004, 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 @@ -44,9 +44,9 @@ #define O_ASYNC 020000 /* fcntl, for BSD compatibility */ #ifdef __USE_GNU -# define O_DIRECT 040000 /* Direct disk access. */ # define O_DIRECTORY 0100000 /* Must be a directory. */ # define O_NOFOLLOW 0200000 /* Do not follow links. */ +# define O_DIRECT 02000000 /* Direct disk access. */ # define O_NOATIME 04000000 /* Do not set atime. */ #endif From 685896ef5aeb2ff0c98954af91a7459313555a8c Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sat, 28 May 2005 23:40:09 +0000 Subject: [PATCH 3439/4487] * elf/elf.h (DT_ALPHA_PLTRO, DT_ALPHA_NUM): New. * sysdeps/alpha/dl-dtprocnum.h: New file. * sysdeps/alpha/dl-machine.h (DT_ALPHA): New. (elf_machine_load_address): Simplify to rely on gprel relocations. (elf_machine_runtime_setup): Handle DT_ALPHA_PLTRO plt format. Remove thread safety workaround for binutils 2.6. (elf_machine_fixup_plt): Handle DT_ALPHA_PLTRO plt format. * sysdeps/alpha/dl-trampoline.S (_dl_runtime_resolve_new): New. (_dl_runtime_profile_new): New. (_dl_runtime_resolve_old): Rename from _dl_runtime_resolve. (_dl_runtime_profile_old): Rename from _dl_runtime_profile. Fix typo in _dl_call_pltexit argument loading. * sysdeps/alpha/div_libc.h (funcnoplt): New. * sysdeps/alpha/divl.S, sysdeps/alpha/divq.S: Use it. * sysdeps/alpha/divqu.S, sysdeps/alpha/reml.S: Likewise. * sysdeps/alpha/remq.S, sysdeps/alpha/remqu.S: Likewise. --- sysdeps/alpha/div_libc.h | 6 + sysdeps/alpha/divl.S | 2 +- sysdeps/alpha/divq.S | 2 +- sysdeps/alpha/divqu.S | 2 +- sysdeps/alpha/dl-dtprocnum.h | 3 + sysdeps/alpha/dl-machine.h | 146 ++++++++++------------ sysdeps/alpha/dl-trampoline.S | 222 ++++++++++++++++++++++++++++++---- sysdeps/alpha/reml.S | 2 +- sysdeps/alpha/remq.S | 2 +- sysdeps/alpha/remqu.S | 2 +- 10 files changed, 278 insertions(+), 111 deletions(-) create mode 100644 sysdeps/alpha/dl-dtprocnum.h diff --git a/sysdeps/alpha/div_libc.h b/sysdeps/alpha/div_libc.h index 62b4470355..b731b02e25 100644 --- a/sysdeps/alpha/div_libc.h +++ b/sysdeps/alpha/div_libc.h @@ -34,6 +34,12 @@ #define RV t12 #define RA t9 +/* The secureplt format does not allow the division routines to be called + via plt; there aren't enough registers free to be clobbered. Avoid + setting the symbol type to STT_FUNC, so that the linker won't be tempted + to create a plt entry. */ +#define funcnoplt notype + /* None of these functions should use implicit anything. */ .set nomacro .set noat diff --git a/sysdeps/alpha/divl.S b/sysdeps/alpha/divl.S index 408d66db00..9bac0450d0 100644 --- a/sysdeps/alpha/divl.S +++ b/sysdeps/alpha/divl.S @@ -36,7 +36,7 @@ .text .align 4 .globl __divl - .type __divl, @function + .type __divl, @funcnoplt .usepv __divl, no cfi_startproc diff --git a/sysdeps/alpha/divq.S b/sysdeps/alpha/divq.S index 7f245ac056..d2ed2c5af6 100644 --- a/sysdeps/alpha/divq.S +++ b/sysdeps/alpha/divq.S @@ -43,7 +43,7 @@ .text .align 4 .globl __divq - .type __divq, @function + .type __divq, @funcnoplt .usepv __divq, no cfi_startproc diff --git a/sysdeps/alpha/divqu.S b/sysdeps/alpha/divqu.S index fc00fa133c..f2a8a4d533 100644 --- a/sysdeps/alpha/divqu.S +++ b/sysdeps/alpha/divqu.S @@ -43,7 +43,7 @@ .text .align 4 .globl __divqu - .type __divqu, @function + .type __divqu, @funcnoplt .usepv __divqu, no cfi_startproc diff --git a/sysdeps/alpha/dl-dtprocnum.h b/sysdeps/alpha/dl-dtprocnum.h new file mode 100644 index 0000000000..67845cdd62 --- /dev/null +++ b/sysdeps/alpha/dl-dtprocnum.h @@ -0,0 +1,3 @@ +/* Number of extra dynamic section entries for this architecture. By + default there are none. */ +#define DT_THISPROCNUM DT_ALPHA_NUM diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 173a4111f8..88c357ea07 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -33,6 +33,9 @@ where the dynamic linker should not map anything. */ #define ELF_MACHINE_USER_ADDRESS_MASK 0x120000000UL +/* Translate a processor specific dynamic tag to the index in l_info array. */ +#define DT_ALPHA(x) (DT_ALPHA_##x - DT_LOPROC + DT_NUM) + /* Return nonzero iff ELF header is compatible with the running host. */ static inline int elf_machine_matches_host (const Elf64_Ehdr *ehdr) @@ -55,105 +58,74 @@ elf_machine_dynamic (void) } /* Return the run-time load address of the shared object. */ + static inline Elf64_Addr elf_machine_load_address (void) { - /* NOTE: While it is generally unfriendly to put data in the text - segment, it is only slightly less so when the "data" is an - instruction. While we don't have to worry about GLD just yet, an - optimizing linker might decide that our "data" is an unreachable - instruction and throw it away -- with the right switches, DEC's - linker will do this. What ought to happen is we should add - something to GAS to allow us access to the new GPREL_HI32/LO32 - relocation types stolen from OSF/1 3.0. */ - /* This code relies on the fact that BRADDR relocations do not - appear in dynamic relocation tables. Not that that would be very - useful anyway -- br/bsr has a 4MB range and the shared libraries - are usually many many terabytes away. */ - - Elf64_Addr dot; - long int zero_disp; - - asm("br %0, 1f\n" - "0:\n\t" - "br $0, 2f\n" - "1:\n\t" - ".section\t.data\n" - "2:\n\t" - ".quad 0b\n\t" - ".previous" - : "=r"(dot)); - - zero_disp = *(int *) dot; - zero_disp = (zero_disp << 43) >> 41; - - return dot - *(Elf64_Addr *) (dot + 4 + zero_disp); + /* This relies on the compiler using gp-relative addresses for static symbols. */ + static void *dot = ˙ + return (void *)&dot - dot; } /* Set up the loaded object described by L so its unrelocated PLT entries will jump to the on-demand fixup code in dl-runtime.c. */ static inline int -elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) +elf_machine_runtime_setup (struct link_map *map, int lazy, int profile) { - Elf64_Addr plt; - extern void _dl_runtime_resolve (void); - extern void _dl_runtime_profile (void); + extern char _dl_runtime_resolve_new[] attribute_hidden; + extern char _dl_runtime_profile_new[] attribute_hidden; + extern char _dl_runtime_resolve_old[] attribute_hidden; + extern char _dl_runtime_profile_old[] attribute_hidden; + + struct pltgot { + char *resolve; + struct link_map *link; + }; + + struct pltgot *pg; + long secureplt; + char *resolve; + + if (map->l_info[DT_JMPREL] == 0 || !lazy) + return lazy; + + /* Check to see if we're using the read-only plt form. */ + secureplt = map->l_info[DT_ALPHA(PLTRO)] != 0; + + /* If the binary uses the read-only secure plt format, PG points to + the .got.plt section, which is the right place for ld.so to place + its hooks. Otherwise, PG is currently pointing at the start of + the plt; the hooks go at offset 16. */ + pg = (struct pltgot *) D_PTR (map, l_info[DT_PLTGOT]); + pg += !secureplt; + + /* This function will be called to perform the relocation. They're + not declared as functions to convince the compiler to use gp + relative relocations for them. */ + if (secureplt) + resolve = _dl_runtime_resolve_new; + else + resolve = _dl_runtime_resolve_old; - if (l->l_info[DT_JMPREL] && lazy) + if (__builtin_expect (profile, 0)) { - /* The GOT entries for the functions in the PLT have not been - filled in yet. Their initial contents are directed to the - PLT which arranges for the dynamic linker to be called. */ - plt = D_PTR (l, l_info[DT_PLTGOT]); - - /* This function will be called to perform the relocation. */ - if (__builtin_expect (profile, 0)) - { - *(Elf64_Addr *)(plt + 16) = (Elf64_Addr) &_dl_runtime_profile; - - if (GLRO(dl_profile) != NULL - && _dl_name_match_p (GLRO(dl_profile), l)) - { - /* This is the object we are looking for. Say that we really - want profiling and the timers are started. */ - GL(dl_profile_map) = l; - } - } + if (secureplt) + resolve = _dl_runtime_profile_new; else - *(Elf64_Addr *)(plt + 16) = (Elf64_Addr) &_dl_runtime_resolve; - - /* Identify this shared object */ - *(Elf64_Addr *)(plt + 24) = (Elf64_Addr) l; + resolve = _dl_runtime_profile_old; - /* If the first instruction of the plt entry is not - "br $28, plt0", we have to reinitialize .plt for lazy relocation. */ - if (*(unsigned int *)(plt + 32) != 0xc39ffff7) + if (GLRO(dl_profile) && _dl_name_match_p (GLRO(dl_profile), map)) { - unsigned int val = 0xc39ffff7; - unsigned int *slot, *end; - const Elf64_Rela *rela = (const Elf64_Rela *) - D_PTR (l, l_info[DT_JMPREL]); - Elf64_Addr l_addr = l->l_addr; - - /* br t12,.+4; ldq t12,12(t12); nop; jmp t12,(t12),.+4 */ - *(unsigned long *)plt = 0xa77b000cc3600000; - *(unsigned long *)(plt + 8) = 0x6b7b000047ff041f; - slot = (unsigned int *)(plt + 32); - end = (unsigned int *)(plt + 32 - + l->l_info[DT_PLTRELSZ]->d_un.d_val / 2); - while (slot < end) - { - /* br at,.plt+0 */ - *slot = val; - *(Elf64_Addr *) rela->r_offset = (Elf64_Addr) slot - l_addr; - val -= 3; - slot += 3; - ++rela; - } + /* This is the object we are looking for. Say that we really + want profiling and the timers are started. */ + GL(dl_profile_map) = map; } } + pg->resolve = resolve; + pg->link = map; + return lazy; } @@ -280,7 +252,7 @@ _dl_start_user: \n\ /* Fix up the instructions of a PLT entry to invoke the function rather than the dynamic linker. */ static inline Elf64_Addr -elf_machine_fixup_plt (struct link_map *l, lookup_t t, +elf_machine_fixup_plt (struct link_map *map, lookup_t t, const Elf64_Rela *reloc, Elf64_Addr *got_addr, Elf64_Addr value) { @@ -291,10 +263,16 @@ elf_machine_fixup_plt (struct link_map *l, lookup_t t, /* Store the value we are going to load. */ *got_addr = value; + /* If this binary uses the read-only secure plt format, we're done. */ + if (map->l_info[DT_ALPHA(PLTRO)]) + return value; + + /* Otherwise we have to modify the plt entry in place to do the branch. */ + /* Recover the PLT entry address by calculating reloc's index into the .rela.plt, and finding that entry in the .plt. */ - rela_plt = (void *) D_PTR (l, l_info[DT_JMPREL]); - plte = (void *) (D_PTR (l, l_info[DT_PLTGOT]) + 32); + rela_plt = (const Elf64_Rela *) D_PTR (map, l_info[DT_JMPREL]); + plte = (Elf64_Word *) (D_PTR (map, l_info[DT_PLTGOT]) + 32); plte += 3 * (reloc - rela_plt); /* Find the displacement from the plt entry to the function. */ diff --git a/sysdeps/alpha/dl-trampoline.S b/sysdeps/alpha/dl-trampoline.S index 42350836ef..c52efbb3bc 100644 --- a/sysdeps/alpha/dl-trampoline.S +++ b/sysdeps/alpha/dl-trampoline.S @@ -21,13 +21,202 @@ .set noat - .globl _dl_runtime_resolve - .ent _dl_runtime_resolve +.macro savei regno, offset + stq $\regno, \offset($30) + cfi_rel_offset(\regno, \offset) +.endm + +.macro savef regno, offset + stt $f\regno, \offset($30) + cfi_rel_offset(\regno+32, \offset) +.endm + + .align 4 + .globl _dl_runtime_resolve_new + .ent _dl_runtime_resolve_new + +#undef FRAMESIZE +#define FRAMESIZE 14*8 + +_dl_runtime_resolve_new: + .frame $30, FRAMESIZE, $26, 0 + .mask 0x4000000, 0 + + ldah $29, 0($27) !gpdisp!1 + lda $30, -FRAMESIZE($30) + stq $26, 0*8($30) + stq $16, 2*8($30) + + stq $17, 3*8($30) + lda $29, 0($29) !gpdisp!1 + stq $18, 4*8($30) + mov $28, $16 /* link_map from .got.plt */ + + stq $19, 5*8($30) + mov $25, $17 /* offset of reloc entry */ + stq $20, 6*8($30) + mov $26, $18 /* return address */ + + stq $21, 7*8($30) + stt $f16, 8*8($30) + stt $f17, 9*8($30) + stt $f18, 10*8($30) + + stt $f19, 11*8($30) + stt $f20, 12*8($30) + stt $f21, 13*8($30) + .prologue 2 + + bsr $26, _dl_fixup !samegp + mov $0, $27 + + ldq $26, 0*8($30) + ldq $16, 2*8($30) + ldq $17, 3*8($30) + ldq $18, 4*8($30) + ldq $19, 5*8($30) + ldq $20, 6*8($30) + ldq $21, 7*8($30) + ldt $f16, 8*8($30) + ldt $f17, 9*8($30) + ldt $f18, 10*8($30) + ldt $f19, 11*8($30) + ldt $f20, 12*8($30) + ldt $f21, 13*8($30) + lda $30, FRAMESIZE($30) + jmp $31, ($27), 0 + .end _dl_runtime_resolve_new + + .globl _dl_runtime_profile_new + .type _dl_runtime_profile_new, @function + +#undef FRAMESIZE +#define FRAMESIZE 20*8 + + /* We save the registers in a different order than desired by + .mask/.fmask, so we have to use explicit cfi directives. */ + cfi_startproc + +_dl_runtime_profile_new: + ldah $29, 0($27) !gpdisp!2 + lda $30, -FRAMESIZE($30) + savei 26, 0*8 + stq $16, 2*8($30) + + stq $17, 3*8($30) + lda $29, 0($29) !gpdisp!2 + stq $18, 4*8($30) + lda $1, FRAMESIZE($30) /* incoming sp value */ + + stq $1, 1*8($30) + stq $19, 5*8($30) + stq $20, 6*8($30) + mov $28, $16 /* link_map from .got.plt */ + + stq $21, 7*8($30) + mov $25, $17 /* offset of reloc entry */ + stt $f16, 8*8($30) + mov $26, $18 /* return address */ + + stt $f17, 9*8($30) + mov $30, $19 /* La_alpha_regs address */ + stt $f18, 10*8($30) + lda $20, 14*8($30) /* framesize address */ + + stt $f19, 11*8($30) + stt $f20, 12*8($30) + stt $f21, 13*8($30) + stq $28, 16*8($30) + stq $25, 17*8($30) + + bsr $26, _dl_profile_fixup !samegp + mov $0, $27 + + /* Discover if we're wrapping this call. */ + ldq $18, 14*8($30) + bge $18, 1f + + ldq $26, 0*8($30) + ldq $16, 2*8($30) + ldq $17, 3*8($30) + ldq $18, 4*8($30) + ldq $19, 5*8($30) + ldq $20, 6*8($30) + ldq $21, 7*8($30) + ldt $f16, 8*8($30) + ldt $f17, 9*8($30) + ldt $f18, 10*8($30) + ldt $f19, 11*8($30) + ldt $f20, 12*8($30) + ldt $f21, 13*8($30) + lda $30, FRAMESIZE($30) + jmp $31, ($27), 0 + +1: + /* Create a frame pointer and allocate a new argument frame. */ + savei 15, 15*8 + mov $30, $15 + cfi_def_cfa_register (15) + addq $18, 15, $18 + bic $18, 15, $18 + subq $30, $18, $30 + + /* Save the call destination around memcpy. */ + stq $0, 14*8($30) + + /* Copy the stack arguments into place. */ + lda $16, 0($30) + lda $17, FRAMESIZE($15) + jsr $26, memcpy + ldgp $29, 0($26) + + /* Reload the argument registers. */ + ldq $27, 14*8($30) + ldq $16, 2*8($15) + ldq $17, 3*8($15) + ldq $18, 4*8($15) + ldq $19, 5*8($15) + ldq $20, 6*8($15) + ldq $21, 7*8($15) + ldt $f16, 8*8($15) + ldt $f17, 9*8($15) + ldt $f18, 10*8($15) + ldt $f19, 11*8($15) + ldt $f20, 12*8($15) + ldt $f21, 13*8($15) + + jsr $26, ($27), 0 + ldgp $29, 0($26) + + /* Set up for call to _dl_call_pltexit. */ + ldq $16, 16*8($15) + ldq $17, 17*8($15) + stq $0, 16*8($15) + lda $18, 0($15) + stq $1, 17*8($15) + lda $19, 16*8($15) + stt $f0, 18*8($15) + stt $f1, 19*8($15) + bsr $26, _dl_call_pltexit !samegp + + mov $15, $30 + cfi_def_cfa_register (30) + ldq $26, 0($30) + ldq $15, 15*8($30) + lda $30, FRAMESIZE($30) + ret + + cfi_endproc + .size _dl_runtime_profile_new, .-_dl_runtime_profile_new + + .align 4 + .globl _dl_runtime_resolve_old + .ent _dl_runtime_resolve_old #undef FRAMESIZE #define FRAMESIZE 44*8 -_dl_runtime_resolve: +_dl_runtime_resolve_old: lda $30, -FRAMESIZE($30) .frame $30, FRAMESIZE, $26 /* Preserve all registers that C normally doesn't. */ @@ -146,30 +335,21 @@ _dl_runtime_resolve: lda $30, FRAMESIZE($30) jmp $31, ($27) - .end _dl_runtime_resolve + .end _dl_runtime_resolve_old - .globl _dl_runtime_profile - .usepv _dl_runtime_profile, no - .type _dl_runtime_profile, @function + .globl _dl_runtime_profile_old + .usepv _dl_runtime_profile_old, no + .type _dl_runtime_profile_old, @function /* We save the registers in a different order than desired by .mask/.fmask, so we have to use explicit cfi directives. */ cfi_startproc -.macro savei regno, offset - stq $\regno, \offset($30) - cfi_rel_offset(\regno, \offset) -.endm - -.macro savef regno, offset - stt $f\regno, \offset($30) - cfi_rel_offset(\regno+32, \offset) -.endm - #undef FRAMESIZE #define FRAMESIZE 50*8 -_dl_runtime_profile: + .align 4 +_dl_runtime_profile_old: lda $30, -FRAMESIZE($30) cfi_adjust_cfa_offset (FRAMESIZE) @@ -340,8 +520,8 @@ _dl_runtime_profile: ldgp $29, 0($26) /* Set up for call to _dl_call_pltexit. */ - ldq $16, 48($15) - ldq $17, 49($15) + ldq $16, 48*8($15) + ldq $17, 49*8($15) stq $0, 46*8($15) lda $18, 0($15) stq $1, 47*8($15) @@ -358,4 +538,4 @@ _dl_runtime_profile: ret cfi_endproc - .size _dl_runtime_profile, .-_dl_runtime_profile + .size _dl_runtime_profile_old, .-_dl_runtime_profile_old diff --git a/sysdeps/alpha/reml.S b/sysdeps/alpha/reml.S index bfc3be5c3f..ae291b0505 100644 --- a/sysdeps/alpha/reml.S +++ b/sysdeps/alpha/reml.S @@ -38,7 +38,7 @@ .text .align 4 .globl __reml - .type __reml, @function + .type __reml, @funcnoplt .usepv __reml, no cfi_startproc diff --git a/sysdeps/alpha/remq.S b/sysdeps/alpha/remq.S index 645a834453..64e958bb95 100644 --- a/sysdeps/alpha/remq.S +++ b/sysdeps/alpha/remq.S @@ -43,7 +43,7 @@ .text .align 4 .globl __remq - .type __remq, @function + .type __remq, @funcnoplt .usepv __remq, no cfi_startproc diff --git a/sysdeps/alpha/remqu.S b/sysdeps/alpha/remqu.S index bfa78dff57..dcc1c88b3c 100644 --- a/sysdeps/alpha/remqu.S +++ b/sysdeps/alpha/remqu.S @@ -43,7 +43,7 @@ .text .align 4 .globl __remqu - .type __remqu, @function + .type __remqu, @funcnoplt .usepv __remqu, no cfi_startproc From 7051b72105cc17d7218ebd7868a31d3b9ab9da20 Mon Sep 17 00:00:00 2001 From: Phil Blundell Date: Thu, 9 Jun 2005 21:48:16 +0000 Subject: [PATCH 3440/4487] 2005-06-09 Phil Blundell * sysdeps/unix/arm/sysdep.h, sysdeps/unix/sysv/linux/arm/sysdep.h, sysdeps/unix/sysv/linux/arm/sysdep.S: Correct paths to included files. --- ChangeLog.arm | 6 ++++++ sysdeps/unix/arm/sysdep.h | 4 ++-- sysdeps/unix/sysv/linux/arm/sysdep.S | 4 ++-- sysdeps/unix/sysv/linux/arm/sysdep.h | 4 ++-- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index ef324f704f..e3e7fa17cf 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,9 @@ +2005-06-09 Phil Blundell + + * sysdeps/unix/arm/sysdep.h, sysdeps/unix/sysv/linux/arm/sysdep.h, + sysdeps/unix/sysv/linux/arm/sysdep.S: Correct paths to included + files. + 2005-05-23 Roland McGrath * ChangeLog.arm: New file (this one). diff --git a/sysdeps/unix/arm/sysdep.h b/sysdeps/unix/arm/sysdep.h index 5f36272f27..d6eb713585 100644 --- a/sysdeps/unix/arm/sysdep.h +++ b/sysdeps/unix/arm/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 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 @@ -17,7 +17,7 @@ 02111-1307 USA. */ #include -#include +#include /* Some definitions to allow the assembler in sysdeps/unix/ to build without needing ARM-specific versions of all the files. */ diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.S b/sysdeps/unix/sysv/linux/arm/sysdep.S index 1a4de2adb3..b2906f7e32 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.S +++ b/sysdeps/unix/sysv/linux/arm/sysdep.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 1998, 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 @@ -31,4 +31,4 @@ ENTRY (__syscall_error) rsb r0, r0, $0 #define __syscall_error __syscall_error_1 -#include +#include diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index 668aa1a2f1..f42a5c8410 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 93, 1995-2000, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1992, 93, 1995-2000, 2002, 2003, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, , August 1995. ARM changes by Philip Blundell, , May 1997. @@ -22,7 +22,7 @@ #define _LINUX_ARM_SYSDEP_H 1 /* There is some commonality. */ -#include +#include /* For Linux we can use the system call table in the header file /usr/include/asm/unistd.h From efaef362b3282935fd7f3b0e25152afbd2f82434 Mon Sep 17 00:00:00 2001 From: Phil Blundell Date: Fri, 10 Jun 2005 11:12:09 +0000 Subject: [PATCH 3441/4487] 2005-05-09 Daniel Jacobowitz Mark Mitchell * sysdeps/unix/sysv/linux/arm/ioperm.c (BUS_ISA): Define for new kernel headers. --- ChangeLog.arm | 6 ++++++ sysdeps/unix/sysv/linux/arm/ioperm.c | 11 +++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index e3e7fa17cf..e36328bce2 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,9 @@ +2005-05-09 Daniel Jacobowitz + Mark Mitchell + + * sysdeps/unix/sysv/linux/arm/ioperm.c (BUS_ISA): Define for new + kernel headers. + 2005-06-09 Phil Blundell * sysdeps/unix/arm/sysdep.h, sysdeps/unix/sysv/linux/arm/sysdep.h, diff --git a/sysdeps/unix/sysv/linux/arm/ioperm.c b/sysdeps/unix/sysv/linux/arm/ioperm.c index 558b485b61..65ec077336 100644 --- a/sysdeps/unix/sysv/linux/arm/ioperm.c +++ b/sysdeps/unix/sysv/linux/arm/ioperm.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999, 2003, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Phil Blundell, based on the Alpha version by David Mosberger. @@ -44,6 +44,7 @@ #include #include +#include #include #include @@ -80,7 +81,7 @@ static struct platform { * Initialize I/O system. There are several ways to get the information * we need. Each is tried in turn until one succeeds. * - * 1. Sysctl (CTL_BUS, BUS_ISA, ISA_*). This is the preferred method + * 1. Sysctl (CTL_BUS, CTL_BUS_ISA, ISA_*). This is the preferred method * but not all kernels support it. * * 2. Read the value (not the contents) of symlink PATH_ARM_SYSTYPE. @@ -95,6 +96,12 @@ static struct platform { * values. */ +/* The Linux kernel headers renamed this constant between 2.5.26 and + 2.5.27. It was backported to 2.4 between 2.4.22 and 2.4.23. */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,23) +# define BUS_ISA CTL_BUS_ISA +#endif + static int init_iosys (void) { From 849e84dde3da78ba1462106329a64baf7eb68e42 Mon Sep 17 00:00:00 2001 From: Phil Blundell Date: Fri, 10 Jun 2005 11:33:52 +0000 Subject: [PATCH 3442/4487] 2005-05-09 Daniel Jacobowitz Mark Mitchell * sysdeps/arm/bits/link.h: New file. * sysdeps/arm/dl-trampoline.S: New file. * sysdeps/arm/dl-machine.h: Check RESOLVE_MAP instead of RESOLVE. (elf_machine_runtime_setup): Check dl_profile before calling _dl_name_match_p. (ELF_MACHINE_RUNTIME_TRAMPOLINE): Delete. (elf_machine_rel, elf_machine_rela): Use RESOLVE_MAP. (fix_bad_pc24): Use auto instead of static. --- ChangeLog.arm | 12 ++ sysdeps/arm/bits/link.h | 66 +++++++++++ sysdeps/arm/dl-machine.h | 132 ++-------------------- sysdeps/arm/dl-trampoline.S | 214 ++++++++++++++++++++++++++++++++++++ 4 files changed, 301 insertions(+), 123 deletions(-) create mode 100644 sysdeps/arm/dl-trampoline.S diff --git a/ChangeLog.arm b/ChangeLog.arm index e36328bce2..360b06fa19 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,15 @@ +2005-05-09 Daniel Jacobowitz + Mark Mitchell + + * sysdeps/arm/bits/link.h: New file. + * sysdeps/arm/dl-trampoline.S: New file. + * sysdeps/arm/dl-machine.h: Check RESOLVE_MAP instead of RESOLVE. + (elf_machine_runtime_setup): Check dl_profile before calling + _dl_name_match_p. + (ELF_MACHINE_RUNTIME_TRAMPOLINE): Delete. + (elf_machine_rel, elf_machine_rela): Use RESOLVE_MAP. + (fix_bad_pc24): Use auto instead of static. + 2005-05-09 Daniel Jacobowitz Mark Mitchell diff --git a/sysdeps/arm/bits/link.h b/sysdeps/arm/bits/link.h index e69de29bb2..8dbd2c7ba4 100644 --- a/sysdeps/arm/bits/link.h +++ b/sysdeps/arm/bits/link.h @@ -0,0 +1,66 @@ +/* Copyright (C) 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 + 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 _LINK_H +# error "Never include directly; use instead." +#endif + + +/* Registers for entry into PLT on ARM. */ +typedef struct La_arm_regs +{ + uint32_t lr_reg[4]; + uint32_t lr_sp; + uint32_t lr_lr; + /* Coprocessor registers used for argument passing. The data + stored here depends on the coprocessors available in the + system which are used for function calls in the current ABI. + VFP uses eight 64-bit registers, and iWMMXt uses ten. */ + uint32_t lr_coproc[42]; +} La_arm_regs; + +/* Return values for calls from PLT on ARM. */ +typedef struct La_arm_retval +{ + /* Up to four integer registers can be used for a return value in + some ABIs (APCS complex long double). */ + uint32_t lrv_reg[4]; + + /* Any coprocessor registers which might be used to return values + in the current ABI. */ + uint32_t lrv_coproc[12]; +} La_arm_retval; + + +__BEGIN_DECLS + +extern Elf32_Addr la_arm_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + La_arm_regs *__regs, + unsigned int *__flags, + const char *__symname, + long int *__framesizep); +extern unsigned int la_arm_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + const La_arm_regs *__inregs, + La_arm_retval *__outregs, + const char *symname); + +__END_DECLS diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 0fe47b2f80..abff153cb3 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -110,7 +110,8 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) { got[2] = (Elf32_Addr) &_dl_runtime_profile; - if (_dl_name_match_p (GLRO(dl_profile), l)) + if (GLRO(dl_profile) != NULL + && _dl_name_match_p (GLRO(dl_profile), l)) /* Say that we really want profiling and the timers are started. */ GL(dl_profile_map) = l; @@ -129,119 +130,6 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) #define BX(x) "mov\tpc, " #x #endif -#ifndef PROF -# define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\ - .text\n\ - .globl _dl_runtime_resolve\n\ - .type _dl_runtime_resolve, #function\n\ - .align 2\n\ -_dl_runtime_resolve:\n\ - @ we get called with\n\ - @ stack[0] contains the return address from this call\n\ - @ ip contains &GOT[n+3] (pointer to function)\n\ - @ lr points to &GOT[2]\n\ -\n\ - @ stack arguments\n\ - stmdb sp!,{r0-r3}\n\ -\n\ - @ get pointer to linker struct\n\ - ldr r0, [lr, #-4]\n\ -\n\ - @ prepare to call fixup()\n\ - @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each\n\ - sub r1, ip, lr\n\ - sub r1, r1, #4\n\ - add r1, r1, r1\n\ -\n\ - @ call fixup routine\n\ - bl fixup\n\ -\n\ - @ save the return\n\ - mov ip, r0\n\ -\n\ - @ get arguments and return address back\n\ - ldmia sp!, {r0-r3,lr}\n\ -\n\ - @ jump to the newly found address\n\ - " BX(ip) "\n\ -\n\ - .size _dl_runtime_resolve, .-_dl_runtime_resolve\n\ -\n\ - .globl _dl_runtime_profile\n\ - .type _dl_runtime_profile, #function\n\ - .align 2\n\ -_dl_runtime_profile:\n\ - @ stack arguments\n\ - stmdb sp!, {r0-r3}\n\ -\n\ - @ get pointer to linker struct\n\ - ldr r0, [lr, #-4]\n\ -\n\ - @ prepare to call fixup()\n\ - @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each\n\ - sub r1, ip, lr\n\ - sub r1, r1, #4\n\ - add r1, r1, r1\n\ -\n\ - @ call profiling fixup routine\n\ - bl profile_fixup\n\ -\n\ - @ save the return\n\ - mov ip, r0\n\ -\n\ - @ get arguments and return address back\n\ - ldmia sp!, {r0-r3,lr}\n\ -\n\ - @ jump to the newly found address\n\ - " BX(ip) "\n\ -\n\ - .size _dl_runtime_resolve, .-_dl_runtime_resolve\n\ - .previous\n\ -"); -#else // PROF -# define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\ - .text\n\ - .globl _dl_runtime_resolve\n\ - .globl _dl_runtime_profile\n\ - .type _dl_runtime_resolve, #function\n\ - .type _dl_runtime_profile, #function\n\ - .align 2\n\ -_dl_runtime_resolve:\n\ -_dl_runtime_profile:\n\ - @ we get called with\n\ - @ stack[0] contains the return address from this call\n\ - @ ip contains &GOT[n+3] (pointer to function)\n\ - @ lr points to &GOT[2]\n\ -\n\ - @ stack arguments\n\ - stmdb sp!, {r0-r3}\n\ -\n\ - @ get pointer to linker struct\n\ - ldr r0, [lr, #-4]\n\ -\n\ - @ prepare to call fixup()\n\ - @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each\n\ - sub r1, ip, lr\n\ - sub r1, r1, #4\n\ - add r1, r1, r1\n\ -\n\ - @ call profiling fixup routine\n\ - bl fixup\n\ -\n\ - @ save the return\n\ - mov ip, r0\n\ -\n\ - @ get arguments and return address back\n\ - ldmia sp!, {r0-r3,lr}\n\ -\n\ - @ jump to the newly found address\n\ - " BX(ip) "\n\ -\n\ - .size _dl_runtime_profile, .-_dl_runtime_profile\n\ - .previous\n\ -"); -#endif //PROF - /* Mask identifying addresses reserved for the user program, where the dynamic linker should not map anything. */ #define ELF_MACHINE_USER_ADDRESS_MASK 0xf8000000UL @@ -355,10 +243,10 @@ elf_machine_plt_value (struct link_map *map, const Elf32_Rel *reloc, Prelinked libraries may use Elf32_Rela though. */ #define ELF_MACHINE_NO_RELA defined RTLD_BOOTSTRAP -#ifdef RESOLVE +#ifdef RESOLVE_MAP /* Deal with an out-of-range PC24 reloc. */ -static Elf32_Addr +auto Elf32_Addr fix_bad_pc24 (Elf32_Addr *const reloc_addr, Elf32_Addr value) { static void *fix_page; @@ -425,9 +313,8 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, #endif { const Elf32_Sym *const refsym = sym; - Elf32_Addr value = RESOLVE (&sym, version, r_type); - if (sym) - value += sym->st_value; + struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type); + Elf32_Addr value = sym_map == NULL ? 0 : sym_map->l_addr + sym->st_value; switch (r_type) { @@ -535,9 +422,8 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, # ifndef RESOLVE_CONFLICT_FIND_MAP const Elf32_Sym *const refsym = sym; # endif - Elf32_Addr value = RESOLVE (&sym, version, r_type); - if (sym) - value += sym->st_value; + struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type); + Elf32_Addr value = sym_map == NULL ? 0 : sym_map->l_addr + sym->st_value; switch (r_type) { @@ -637,4 +523,4 @@ elf_machine_lazy_rel (struct link_map *map, _dl_reloc_bad_type (map, r_type, 1); } -#endif /* RESOLVE */ +#endif /* RESOLVE_MAP */ diff --git a/sysdeps/arm/dl-trampoline.S b/sysdeps/arm/dl-trampoline.S new file mode 100644 index 0000000000..dc7494f9f8 --- /dev/null +++ b/sysdeps/arm/dl-trampoline.S @@ -0,0 +1,214 @@ +/* PLT trampolines. ARM version. + Copyright (C) 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 + 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. */ + +#include +#include + +#if defined(__USE_BX__) +#define BX(x) bx x +#else +#define BX(x) mov pc, x +#endif + + .text + .globl _dl_runtime_resolve + .type _dl_runtime_resolve, #function + cfi_startproc + .align 2 +_dl_runtime_resolve: + cfi_adjust_cfa_offset (4) + cfi_rel_offset (lr, 0) + + @ we get called with + @ stack[0] contains the return address from this call + @ ip contains &GOT[n+3] (pointer to function) + @ lr points to &GOT[2] + + @ Save arguments. We save r4 to realign the stack. + stmdb sp!,{r0-r4} + cfi_adjust_cfa_offset (20) + cfi_rel_offset (r0, 0) + cfi_rel_offset (r1, 4) + cfi_rel_offset (r2, 8) + cfi_rel_offset (r3, 12) + + @ get pointer to linker struct + ldr r0, [lr, #-4] + + @ prepare to call _dl_fixup() + @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each + sub r1, ip, lr + sub r1, r1, #4 + add r1, r1, r1 + + @ call fixup routine + bl _dl_fixup + + @ save the return + mov ip, r0 + + @ get arguments and return address back. We restore r4 + @ only to realign the stack. + ldmia sp!, {r0-r4,lr} + cfi_adjust_cfa_offset (-24) + + @ jump to the newly found address + BX(ip) + + cfi_endproc + .size _dl_runtime_resolve, .-_dl_runtime_resolve + + .globl _dl_runtime_profile + .type _dl_runtime_profile, #function + cfi_startproc + .align 2 +_dl_runtime_profile: + cfi_adjust_cfa_offset (4) + cfi_rel_offset (lr, 0) + + @ we get called with + @ stack[0] contains the return address from this call + @ ip contains &GOT[n+3] (pointer to function) + @ lr points to &GOT[2] + + @ Stack layout: + @ 212 - saved lr + @ 208 - framesize returned from pltenter + @ 16 - La_arm_regs + @ 8 - Saved two arguments to _dl_profile_fixup + @ 4 - Saved result of _dl_profile_fixup + @ 0 - outgoing argument to _dl_profile_fixup + @ For now, we only save the general purpose registers. + + sub sp, sp, #196 + cfi_adjust_cfa_offset (196) + stmia sp, {r0-r3} + cfi_rel_offset (r0, 0) + cfi_rel_offset (r1, 4) + cfi_rel_offset (r2, 8) + cfi_rel_offset (r3, 12) + + sub sp, sp, #16 + cfi_adjust_cfa_offset (16) + + @ Save sp and lr. + add r0, sp, #216 + str r0, [sp, #32] + ldr r2, [sp, #212] + str r2, [sp, #36] + + @ get pointer to linker struct + ldr r0, [lr, #-4] + + @ prepare to call _dl_profile_fixup() + @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each + sub r1, ip, lr + sub r1, r1, #4 + add r1, r1, r1 + + @ Save these two arguments for pltexit. + add r3, sp, #8 + stmia r3!, {r0,r1} + + @ Set up extra args for _dl_profile_fixup. + @ r2 and r3 are already loaded. + add ip, sp, #208 + str ip, [sp, #0] + + @ call profiling fixup routine + bl _dl_profile_fixup + + @ The address to call is now in r0. + + @ Check whether we're wrapping this function. + ldr ip, [sp, #208] + cmp ip, #0 + bge 1f + cfi_remember_state + + @ save the return + mov ip, r0 + + @ get arguments and return address back + add sp, sp, #16 + cfi_adjust_cfa_offset (-16) + ldmia sp, {r0-r3,sp,lr} + cfi_adjust_cfa_offset (-200) + + @ jump to the newly found address + BX(ip) + + cfi_restore_state +1: + @ The new frame size is in ip. + + @ New stack layout: + @ 268 - saved r7 + @ 264 - saved result of _dl_profile_fixup + @ 72 - La_arm_regs + @ 64 - Saved two arguments to _dl_profile_fixup + @ 0 - La_arm_retval + @ For now, we only save the general purpose registers. + + @ Build the new frame. + str r7, [sp, #212] + cfi_rel_offset (r7, 212) + sub r7, sp, #56 + cfi_def_cfa_register (r7) + cfi_adjust_cfa_offset (56) + sub sp, sp, ip + bic sp, sp, #7 + + @ Save the _dl_profile_fixup result around the call to memcpy. + str r0, [r7, #264] + + @ Copy the stack arguments. + mov r0, sp + add r1, r7, #272 + mov r2, ip + bl memcpy + + @ Call the function. + add ip, r7, #72 + ldmia ip, {r0-r3} + ldr ip, [r7, #264] + mov lr, pc + BX(ip) + stmia r7, {r0-r3} + + @ Call pltexit. + add ip, r7, #64 + ldmia ip, {r0,r1} + add r2, r7, #72 + add r3, r7, #0 + bl _dl_call_pltexit + + @ Return to caller. + ldmia r7, {r0-r3} + mov sp, r7 + cfi_def_cfa_register (sp) + ldr r7, [sp, #268] + ldr lr, [sp, #92] + add sp, sp, #272 + cfi_adjust_cfa_offset (-272) + BX(lr) + + cfi_endproc + .size _dl_runtime_resolve, .-_dl_runtime_resolve + .previous From 51ae9dc83d6b52a46a9f5d00f43a0c6b49d7029c Mon Sep 17 00:00:00 2001 From: Phil Blundell Date: Fri, 10 Jun 2005 18:10:47 +0000 Subject: [PATCH 3443/4487] 2005-06-10 Phil Blundell Bug #957: * sysdeps/unix/sysv/linux/arm/mmap64.S: Handle offset correctly on big endian machines. Reported by Sven Henkel . --- ChangeLog.arm | 6 ++++++ sysdeps/unix/sysv/linux/arm/mmap64.S | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/ChangeLog.arm b/ChangeLog.arm index 360b06fa19..b5186cdf77 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,9 @@ +2005-06-10 Phil Blundell + + Bug #957: + * sysdeps/unix/sysv/linux/arm/mmap64.S: Handle offset correctly on + big endian machines. Reported by Sven Henkel . + 2005-05-09 Daniel Jacobowitz Mark Mitchell diff --git a/sysdeps/unix/sysv/linux/arm/mmap64.S b/sysdeps/unix/sysv/linux/arm/mmap64.S index b4b712c2f2..5899140f1c 100644 --- a/sysdeps/unix/sysv/linux/arm/mmap64.S +++ b/sysdeps/unix/sysv/linux/arm/mmap64.S @@ -27,10 +27,17 @@ .text ENTRY (__mmap64) #ifdef __NR_mmap2 +#ifdef __ARMEB__ + ldr ip, [sp, $8] @ offset low part + str r5, [sp, #-4]! + ldr r5, [sp, $8] @ offset high part + str r4, [sp, #-4]! +#else ldr ip, [sp, $4] @ offset low part str r5, [sp, #-4]! ldr r5, [sp, $12] @ offset high part str r4, [sp, #-4]! +#endif movs r4, ip, lsl $20 @ check that offset is page-aligned mov ip, ip, lsr $12 moveqs r4, r5, lsr $12 @ check for overflow From 19f2e4ebef5133473a04035fae727b6c250e92a0 Mon Sep 17 00:00:00 2001 From: Phil Blundell Date: Sat, 11 Jun 2005 10:15:27 +0000 Subject: [PATCH 3444/4487] 2005-06-11 Phil Blundell * sysdeps/arm/init-first.c: Deleted. * sysdeps/unix/sysv/linux/arm/linuxthreads/fork.c: New file. --- ChangeLog.arm | 5 ++ sysdeps/arm/init-first.c | 73 ------------------- .../unix/sysv/linux/arm/linuxthreads/fork.c | 1 + 3 files changed, 6 insertions(+), 73 deletions(-) delete mode 100644 sysdeps/arm/init-first.c create mode 100644 sysdeps/unix/sysv/linux/arm/linuxthreads/fork.c diff --git a/ChangeLog.arm b/ChangeLog.arm index b5186cdf77..7383cb38f1 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2005-06-11 Phil Blundell + + * sysdeps/arm/init-first.c: Deleted. + * sysdeps/unix/sysv/linux/arm/linuxthreads/fork.c: New file. + 2005-06-10 Phil Blundell Bug #957: diff --git a/sysdeps/arm/init-first.c b/sysdeps/arm/init-first.c deleted file mode 100644 index 652cf95d14..0000000000 --- a/sysdeps/arm/init-first.c +++ /dev/null @@ -1,73 +0,0 @@ -/* Initialization code run first thing by the ELF startup code. For ARM. - Copyright (C) 1995,1996,1997,1998,2001,2002 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. */ - -#include - -extern void __libc_init (int, char **, char **); -#ifdef USE_NONOPTION_FLAGS -extern void __getopt_clean_environment (char **); -#endif -extern void __libc_global_ctors (void); - -int __libc_multiple_libcs attribute_hidden = 1; - -static void -init (int *data) -{ - int argc = *data; - char **argv = (void *) (data + 1); - char **envp = &argv[argc + 1]; - - __environ = envp; - __libc_init (argc, argv, envp); - -#ifdef USE_NONOPTION_FLAGS - /* This is a hack to make the special getopt in GNU libc working. */ - __getopt_clean_environment (envp); -#endif -} - -#ifdef SHARED -/* This function is called to initialize the shared C library. - It is called just before the user _start code from i386/elf/start.S, - with the stack set up as that code gets it. */ - -/* NOTE! The linker notices the magical name `_init' and sets the DT_INIT - pointer in the dynamic section based solely on that. It is convention - for this function to be in the `.init' section, but the symbol name is - the only thing that really matters!! */ -/*void _init (int argc, ...) __attribute__ ((unused, section (".init")));*/ - -void -_init (int argc, ...) -{ - init (&argc); - - __libc_global_ctors (); -} -#endif - - -void -__libc_init_first (int argc __attribute__ ((unused)), ...) -{ -#ifndef SHARED - init (&argc); -#endif -} diff --git a/sysdeps/unix/sysv/linux/arm/linuxthreads/fork.c b/sysdeps/unix/sysv/linux/arm/linuxthreads/fork.c new file mode 100644 index 0000000000..4fb0db2be9 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/linuxthreads/fork.c @@ -0,0 +1 @@ +#include From 3bdeb53ad653d964ab7569c3468ac9ee6f33b593 Mon Sep 17 00:00:00 2001 From: Phil Blundell Date: Mon, 13 Jun 2005 10:11:47 +0000 Subject: [PATCH 3445/4487] 2005-06-13 Philip Blundell Patch from addsub@eyou.com: * sysdeps/arm/ieee754.h: Deleted. * sysdeps/arm/gmp-mparam.h: Support VFP and big endian. * sysdeps/arm/bits/endian.h: Likewise. --- ChangeLog.arm | 7 +++ sysdeps/arm/bits/endian.h | 11 +++- sysdeps/arm/gmp-mparam.h | 14 ++++- sysdeps/arm/ieee754.h | 115 -------------------------------------- 4 files changed, 27 insertions(+), 120 deletions(-) delete mode 100644 sysdeps/arm/ieee754.h diff --git a/ChangeLog.arm b/ChangeLog.arm index 7383cb38f1..1148fae44e 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,10 @@ +2005-06-13 Philip Blundell + + Patch from addsub@eyou.com: + * sysdeps/arm/ieee754.h: Deleted. + * sysdeps/arm/gmp-mparam.h: Support VFP and big endian. + * sysdeps/arm/bits/endian.h: Likewise. + 2005-06-11 Phil Blundell * sysdeps/arm/init-first.c: Deleted. diff --git a/sysdeps/arm/bits/endian.h b/sysdeps/arm/bits/endian.h index 5e54cc7534..dc909c33e0 100644 --- a/sysdeps/arm/bits/endian.h +++ b/sysdeps/arm/bits/endian.h @@ -1,12 +1,19 @@ -/* ARM is (usually) little-endian but with a big-endian FPU. */ - #ifndef _ENDIAN_H # error "Never use directly; include instead." #endif +/* ARM can be either big or little endian. */ #ifdef __ARMEB__ #define __BYTE_ORDER __BIG_ENDIAN #else #define __BYTE_ORDER __LITTLE_ENDIAN #endif + +/* FPA floating point units are always big-endian, irrespective of the + CPU endianness. VFP floating point units use the same endianness + as the rest of the system. */ +#ifdef __VFP_FP__ +#define __FLOAT_WORD_ORDER __BYTE_ORDER +#else #define __FLOAT_WORD_ORDER __BIG_ENDIAN +#endif diff --git a/sysdeps/arm/gmp-mparam.h b/sysdeps/arm/gmp-mparam.h index c880be33a4..57ad7e21fe 100644 --- a/sysdeps/arm/gmp-mparam.h +++ b/sysdeps/arm/gmp-mparam.h @@ -1,6 +1,6 @@ /* gmp-mparam.h -- Compiler/machine parameter header file. -Copyright (C) 1991, 1993, 1994, 1995 Free Software Foundation, Inc. +Copyright (C) 1991, 1993, 1994, 1995, 2005 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -26,5 +26,13 @@ MA 02111-1307, USA. */ #define BITS_PER_SHORTINT 16 #define BITS_PER_CHAR 8 -#define IEEE_DOUBLE_BIG_ENDIAN 0 -#define IEEE_DOUBLE_MIXED_ENDIAN 1 +#if defined(__ARMEB__) +# define IEEE_DOUBLE_MIXED_ENDIAN 0 +# define IEEE_DOUBLE_BIG_ENDIAN 1 +#elif defined(__VFP_FP__) +# define IEEE_DOUBLE_MIXED_ENDIAN 0 +# define IEEE_DOUBLE_BIG_ENDIAN 0 +#else +# define IEEE_DOUBLE_BIG_ENDIAN 0 +# define IEEE_DOUBLE_MIXED_ENDIAN 1 +#endif diff --git a/sysdeps/arm/ieee754.h b/sysdeps/arm/ieee754.h deleted file mode 100644 index 629b97fb1b..0000000000 --- a/sysdeps/arm/ieee754.h +++ /dev/null @@ -1,115 +0,0 @@ -/* Copyright (C) 1992, 1995, 1996, 1998 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 _IEEE754_H - -#define _IEEE754_H 1 -#include - -#include - -__BEGIN_DECLS - -union ieee754_float - { - float f; - - /* This is the IEEE 754 single-precision format. */ - struct - { - unsigned int mantissa:23; - unsigned int exponent:8; - unsigned int negative:1; - } ieee; - - /* This format makes it easier to see if a NaN is a signalling NaN. */ - struct - { - unsigned int mantissa:22; - unsigned int quiet_nan:1; - unsigned int exponent:8; - unsigned int negative:1; - } ieee_nan; - }; - -#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */ - - -union ieee754_double - { - double d; - - /* This is the IEEE 754 double-precision format. */ - struct - { - unsigned int mantissa0:20; - unsigned int exponent:11; - unsigned int negative:1; - unsigned int mantissa1:32; - } ieee; - - /* This format makes it easier to see if a NaN is a signalling NaN. */ - struct - { - unsigned int mantissa0:19; - unsigned int quiet_nan:1; - unsigned int exponent:11; - unsigned int negative:1; - unsigned int mantissa1:32; - } ieee_nan; - }; - -#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */ - - -/* The following two structures are correct for `new' floating point systems but - wrong for the old FPPC. The only solution seems to be to avoid their use on - old hardware. */ - -union ieee854_long_double - { - long double d; - - /* This is the IEEE 854 double-extended-precision format. */ - struct - { - unsigned int exponent:15; - unsigned int empty:16; - unsigned int negative:1; - unsigned int mantissa1:32; - unsigned int mantissa0:32; - } ieee; - - /* This is for NaNs in the IEEE 854 double-extended-precision format. */ - struct - { - unsigned int exponent:15; - unsigned int empty:16; - unsigned int negative:1; - unsigned int mantissa1:32; - unsigned int mantissa0:30; - unsigned int quiet_nan:1; - unsigned int one:1; - } ieee_nan; - }; - -#define IEEE854_LONG_DOUBLE_BIAS 0x3fff - -__END_DECLS - -#endif /* ieee754.h */ From 5e742931994029e1bfd3cd8b632d90aeec35a58e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 20 Jun 2005 15:07:34 +0000 Subject: [PATCH 3446/4487] (RLIMIT_NICE, RLIMIT_RTPRIO): Add. (RLIMIT_NLIMITS): Adjust. --- sysdeps/unix/sysv/linux/alpha/bits/resource.h | 15 +++++++++++++-- sysdeps/unix/sysv/linux/mips/bits/resource.h | 15 +++++++++++++-- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/resource.h b/sysdeps/unix/sysv/linux/alpha/bits/resource.h index 54d6819412..8bbd301dd9 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/resource.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/resource.h @@ -1,5 +1,5 @@ /* Bit values & structures for resource limits. Alpha/Linux version. - Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2004 + Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -89,7 +89,18 @@ enum __rlimit_resource __RLIMIT_MSGQUEUE = 12, #define RLIMIT_MSGQUEUE __RLIMIT_MSGQUEUE - __RLIMIT_NLIMITS = 13, + /* Maximum nice priority allowed to raise to. + Nice levels 19 .. -20 correspond to 0 .. 39 + values of this resource limit. */ + __RLIMIT_NICE = 13, +#define RLIMIT_NICE __RLIMIT_NICE + + /* Maximum realtime priority allowed for non-priviledged + processes. */ + __RLIMIT_RTPRIO = 14, +#define RLIMIT_RTPRIO _RLIMIT_RTPRIO + + __RLIMIT_NLIMITS = 15, __RLIM_NLIMITS = __RLIMIT_NLIMITS #define RLIMIT_NLIMITS __RLIMIT_NLIMITS #define RLIM_NLIMITS __RLIM_NLIMITS diff --git a/sysdeps/unix/sysv/linux/mips/bits/resource.h b/sysdeps/unix/sysv/linux/mips/bits/resource.h index 2b6c887fd0..7e7152935b 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/resource.h +++ b/sysdeps/unix/sysv/linux/mips/bits/resource.h @@ -1,5 +1,5 @@ /* Bit values & structures for resource limits. Linux/MIPS version. - Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2004 + Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -89,7 +89,18 @@ enum __rlimit_resource __RLIMIT_MSGQUEUE = 12, #define RLIMIT_MSGQUEUE __RLIMIT_MSGQUEUE - __RLIMIT_NLIMITS = 13, + /* Maximum nice priority allowed to raise to. + Nice levels 19 .. -20 correspond to 0 .. 39 + values of this resource limit. */ + __RLIMIT_NICE = 13, +#define RLIMIT_NICE __RLIMIT_NICE + + /* Maximum realtime priority allowed for non-priviledged + processes. */ + __RLIMIT_RTPRIO = 14, +#define RLIMIT_RTPRIO _RLIMIT_RTPRIO + + __RLIMIT_NLIMITS = 15, __RLIM_NLIMITS = __RLIMIT_NLIMITS #define RLIMIT_NLIMITS __RLIMIT_NLIMITS #define RLIM_NLIMITS __RLIM_NLIMITS From baee7540a45fa5069f095800c73655adea35a296 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Jun 2005 18:38:49 +0000 Subject: [PATCH 3447/4487] (RLIMIT_RTPRIO): Fix typo. --- sysdeps/unix/sysv/linux/alpha/bits/resource.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/resource.h b/sysdeps/unix/sysv/linux/alpha/bits/resource.h index 8bbd301dd9..2163745840 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/resource.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/resource.h @@ -98,7 +98,7 @@ enum __rlimit_resource /* Maximum realtime priority allowed for non-priviledged processes. */ __RLIMIT_RTPRIO = 14, -#define RLIMIT_RTPRIO _RLIMIT_RTPRIO +#define RLIMIT_RTPRIO __RLIMIT_RTPRIO __RLIMIT_NLIMITS = 15, __RLIM_NLIMITS = __RLIMIT_NLIMITS From e4782a56881f858a071008c5477f5e4f76129ac3 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 8 Jul 2005 06:10:13 +0000 Subject: [PATCH 3448/4487] 2005-07-08 Carlos O'Donell * sysdeps/hppa/add_n.s (__mpn_add_n): Use sr0 or r0, not 0. * sysdeps/hppa/lshift.s (__mpn_lshift): Likewise. * sysdeps/hppa/rshift.s (__mpn_rshift): Likewise. * sysdeps/hppa/sub_n.s (__mpn_sub_n): Likewise. * sysdeps/hppa/udiv_qrnnd.s (__udiv_qrnnd): Likewise. * sysdeps/hppa/hppa1.1/udiv_qrnnd.s (__udiv_qrnnd): Likewise. --- sysdeps/hppa/add_n.s | 12 ++++++------ sysdeps/hppa/hppa1.1/udiv_qrnnd.s | 20 ++++++++++---------- sysdeps/hppa/lshift.s | 20 ++++++++++---------- sysdeps/hppa/rshift.s | 20 ++++++++++---------- sysdeps/hppa/sub_n.s | 12 ++++++------ sysdeps/hppa/udiv_qrnnd.s | 10 +++++----- 6 files changed, 47 insertions(+), 47 deletions(-) diff --git a/sysdeps/hppa/add_n.s b/sysdeps/hppa/add_n.s index aaabd72e20..a396b3471c 100644 --- a/sysdeps/hppa/add_n.s +++ b/sysdeps/hppa/add_n.s @@ -38,19 +38,19 @@ __mpn_add_n: .callinfo frame=0,no_calls .entry - ldws,ma 4(0,%r25),%r21 - ldws,ma 4(0,%r24),%r20 + ldws,ma 4(%r25),%r21 + ldws,ma 4(%r24),%r20 addib,= -1,%r23,L$end ;! check for (SIZE == 1) add %r21,%r20,%r28 ;! add first limbs ignoring cy -L$loop: ldws,ma 4(0,%r25),%r21 - ldws,ma 4(0,%r24),%r20 - stws,ma %r28,4(0,%r26) +L$loop: ldws,ma 4(%r25),%r21 + ldws,ma 4(%r24),%r20 + stws,ma %r28,4(%r26) addib,<> -1,%r23,L$loop addc %r21,%r20,%r28 -L$end: stws %r28,0(0,%r26) +L$end: stws %r28,0(%r26) bv 0(%r2) addc %r0,%r0,%r28 diff --git a/sysdeps/hppa/hppa1.1/udiv_qrnnd.s b/sysdeps/hppa/hppa1.1/udiv_qrnnd.s index fdc63e59e5..7b83619c7d 100644 --- a/sysdeps/hppa/hppa1.1/udiv_qrnnd.s +++ b/sysdeps/hppa/hppa1.1/udiv_qrnnd.s @@ -38,20 +38,20 @@ __udiv_qrnnd: .entry ldo 64(%r30),%r30 - stws %r25,-16(0,%r30) ;! n_hi - stws %r24,-12(0,%r30) ;! n_lo + stws %r25,-16(%r30) ;! n_hi + stws %r24,-12(%r30) ;! n_lo b,l L$0,%r1 ldo L$0000-L$0(%r1),%r1 L$0: - fldds -16(0,%r30),%fr5 - stws %r23,-12(0,%r30) + fldds -16(%r30),%fr5 + stws %r23,-12(%r30) comib,<= 0,%r25,L$1 fcnvxf,dbl,dbl %fr5,%fr5 - fldds 0(0,%r1),%fr4 + fldds 0(%r1),%fr4 fadd,dbl %fr4,%fr5,%fr5 L$1: fcpy,sgl %fr0,%fr6L - fldws -12(0,%r30),%fr6R + fldws -12(%r30),%fr6R fcnvxf,dbl,dbl %fr6,%fr4 fdiv,dbl %fr5,%fr4,%fr5 @@ -60,9 +60,9 @@ L$1: fstws %fr4R,-16(%r30) xmpyu %fr4R,%fr6R,%fr6 ldws -16(%r30),%r28 - fstds %fr6,-16(0,%r30) - ldws -12(0,%r30),%r21 - ldws -16(0,%r30),%r20 + fstds %fr6,-16(%r30) + ldws -12(%r30),%r21 + ldws -16(%r30),%r20 sub %r24,%r21,%r22 subb %r25,%r20,%r1 comib,= 0,%r1,L$2 @@ -72,7 +72,7 @@ L$1: ldo -1(%r28),%r28 L$2: bv 0(%r2) - stws %r22,0(0,%r26) + stws %r22,0(%r26) .exit .procend diff --git a/sysdeps/hppa/lshift.s b/sysdeps/hppa/lshift.s index 400fbcf6dd..151b283e57 100644 --- a/sysdeps/hppa/lshift.s +++ b/sysdeps/hppa/lshift.s @@ -35,32 +35,32 @@ __mpn_lshift: sh2add %r24,%r25,%r25 sh2add %r24,%r26,%r26 - ldws,mb -4(0,%r25),%r22 + ldws,mb -4(%r25),%r22 subi 32,%r23,%r1 mtsar %r1 addib,= -1,%r24,L$0004 vshd %r0,%r22,%r28 ;! compute carry out limb - ldws,mb -4(0,%r25),%r29 + ldws,mb -4(%r25),%r29 addib,= -1,%r24,L$0002 vshd %r22,%r29,%r20 -L$loop: ldws,mb -4(0,%r25),%r22 - stws,mb %r20,-4(0,%r26) +L$loop: ldws,mb -4(%r25),%r22 + stws,mb %r20,-4(%r26) addib,= -1,%r24,L$0003 vshd %r29,%r22,%r20 - ldws,mb -4(0,%r25),%r29 - stws,mb %r20,-4(0,%r26) + ldws,mb -4(%r25),%r29 + stws,mb %r20,-4(%r26) addib,<> -1,%r24,L$loop vshd %r22,%r29,%r20 -L$0002: stws,mb %r20,-4(0,%r26) +L$0002: stws,mb %r20,-4(%r26) vshd %r29,%r0,%r20 bv 0(%r2) - stw %r20,-4(0,%r26) -L$0003: stws,mb %r20,-4(0,%r26) + stw %r20,-4(%r26) +L$0003: stws,mb %r20,-4(%r26) L$0004: vshd %r22,%r0,%r20 bv 0(%r2) - stw %r20,-4(0,%r26) + stw %r20,-4(%r26) .exit .procend diff --git a/sysdeps/hppa/rshift.s b/sysdeps/hppa/rshift.s index acb772f523..dff189dc48 100644 --- a/sysdeps/hppa/rshift.s +++ b/sysdeps/hppa/rshift.s @@ -33,31 +33,31 @@ __mpn_rshift: .callinfo frame=64,no_calls .entry - ldws,ma 4(0,%r25),%r22 + ldws,ma 4(%r25),%r22 mtsar %r23 addib,= -1,%r24,L$0004 vshd %r22,%r0,%r28 ;! compute carry out limb - ldws,ma 4(0,%r25),%r29 + ldws,ma 4(%r25),%r29 addib,= -1,%r24,L$0002 vshd %r29,%r22,%r20 -L$loop: ldws,ma 4(0,%r25),%r22 - stws,ma %r20,4(0,%r26) +L$loop: ldws,ma 4(%r25),%r22 + stws,ma %r20,4(%r26) addib,= -1,%r24,L$0003 vshd %r22,%r29,%r20 - ldws,ma 4(0,%r25),%r29 - stws,ma %r20,4(0,%r26) + ldws,ma 4(%r25),%r29 + stws,ma %r20,4(%r26) addib,<> -1,%r24,L$loop vshd %r29,%r22,%r20 -L$0002: stws,ma %r20,4(0,%r26) +L$0002: stws,ma %r20,4(%r26) vshd %r0,%r29,%r20 bv 0(%r2) - stw %r20,0(0,%r26) -L$0003: stws,ma %r20,4(0,%r26) + stw %r20,0(%r26) +L$0003: stws,ma %r20,4(%r26) L$0004: vshd %r0,%r22,%r20 bv 0(%r2) - stw %r20,0(0,%r26) + stw %r20,0(%r26) .exit .procend diff --git a/sysdeps/hppa/sub_n.s b/sysdeps/hppa/sub_n.s index 34f196826d..7764961a2d 100644 --- a/sysdeps/hppa/sub_n.s +++ b/sysdeps/hppa/sub_n.s @@ -38,19 +38,19 @@ __mpn_sub_n: .callinfo frame=0,no_calls .entry - ldws,ma 4(0,%r25),%r21 - ldws,ma 4(0,%r24),%r20 + ldws,ma 4(%r25),%r21 + ldws,ma 4(%r24),%r20 addib,= -1,%r23,L$end ;! check for (SIZE == 1) sub %r21,%r20,%r28 ;! subtract first limbs ignoring cy -L$loop: ldws,ma 4(0,%r25),%r21 - ldws,ma 4(0,%r24),%r20 - stws,ma %r28,4(0,%r26) +L$loop: ldws,ma 4(%r25),%r21 + ldws,ma 4(%r24),%r20 + stws,ma %r28,4(%r26) addib,<> -1,%r23,L$loop subb %r21,%r20,%r28 -L$end: stws %r28,0(0,%r26) +L$end: stws %r28,0(%r26) addc %r0,%r0,%r28 bv 0(%r2) subi 1,%r28,%r28 diff --git a/sysdeps/hppa/udiv_qrnnd.s b/sysdeps/hppa/udiv_qrnnd.s index cd2b58ddec..8e9c07a205 100644 --- a/sysdeps/hppa/udiv_qrnnd.s +++ b/sysdeps/hppa/udiv_qrnnd.s @@ -38,7 +38,7 @@ __udiv_qrnnd: .callinfo frame=0,no_calls .entry - comb,< %r23,0,L$largedivisor + comb,< %r23,%r0,L$largedivisor sub %r0,%r23,%r1 ;! clear cy as side-effect ds %r0,%r1,%r0 addc %r24,%r24,%r24 @@ -107,7 +107,7 @@ __udiv_qrnnd: ds %r25,%r23,%r25 comclr,>= %r25,%r0,%r0 addl %r25,%r23,%r25 - stws %r25,0(0,%r26) + stws %r25,0(%r26) bv 0(%r2) addc %r28,%r28,%r28 @@ -186,7 +186,7 @@ L$largedivisor: comclr,>= %r25,%r0,%r0 addl %r25,%r22,%r25 sh1addl %r25,%r20,%r25 - stws %r25,0(0,%r26) + stws %r25,0(%r26) bv 0(%r2) addc %r24,%r24,%r28 @@ -269,7 +269,7 @@ L$odd: addib,sv,n 1,%r22,L$FF.. ;! r22 = (d / 2 + 1) addc %r0,%r28,%r28 sub,<< %r25,%r23,%r0 addl %r25,%r1,%r25 - stws %r25,0(0,%r26) + stws %r25,0(%r26) bv 0(%r2) addc %r0,%r28,%r28 @@ -278,7 +278,7 @@ L$odd: addib,sv,n 1,%r22,L$FF.. ;! r22 = (d / 2 + 1) L$FF..: add,uv %r25,%r24,%r24 sub,<< %r24,%r23,%r0 ldo 1(%r24),%r24 - stws %r24,0(0,%r26) + stws %r24,0(%r26) bv 0(%r2) addc %r0,%r25,%r28 From eb699c14c2758b8c3a919aacecda561f711377eb Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 8 Jul 2005 06:11:21 +0000 Subject: [PATCH 3449/4487] 2005-07-08 Carlos O'Donell * sysdeps/hppa/setjmp.S (__sigsetjmp): Use %r1 not %r19. --- sysdeps/hppa/setjmp.S | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/sysdeps/hppa/setjmp.S b/sysdeps/hppa/setjmp.S index f10a7a304d..0da34db6f1 100644 --- a/sysdeps/hppa/setjmp.S +++ b/sysdeps/hppa/setjmp.S @@ -53,17 +53,17 @@ __sigsetjmp: stw %rp, 80(%r26) - ldo 88(%r26),%r19 - fstds,ma %fr12, 8(%r19) /* 88 */ - fstds,ma %fr13, 8(%r19) /* 96 */ - fstds,ma %fr14, 8(%r19) /* 104 */ - fstds,ma %fr15, 8(%r19) /* 112 */ - fstds,ma %fr16, 8(%r19) /* 120 */ - fstds,ma %fr17, 8(%r19) /* 128 */ - fstds,ma %fr18, 8(%r19) /* 136 */ - fstds,ma %fr19, 8(%r19) /* 144 */ - fstds,ma %fr20, 8(%r19) /* 152 */ - fstds %fr21, 0(%r19) /* 160 */ + ldo 88(%r26),%r1 + fstds,ma %fr12, 8(%r1) /* 88 */ + fstds,ma %fr13, 8(%r1) /* 96 */ + fstds,ma %fr14, 8(%r1) /* 104 */ + fstds,ma %fr15, 8(%r1) /* 112 */ + fstds,ma %fr16, 8(%r1) /* 120 */ + fstds,ma %fr17, 8(%r1) /* 128 */ + fstds,ma %fr18, 8(%r1) /* 136 */ + fstds,ma %fr19, 8(%r1) /* 144 */ + fstds,ma %fr20, 8(%r1) /* 152 */ + fstds %fr21, 0(%r1) /* 160 */ b __sigjmp_save nop .procend From 15aff3c956571d045873d587437e11259d88b81d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 8 Jul 2005 18:52:47 +0000 Subject: [PATCH 3450/4487] Add libm_hidden_def. --- sysdeps/alpha/fpu/feholdexcpt.c | 3 ++- sysdeps/alpha/fpu/fesetround.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/fpu/feholdexcpt.c b/sysdeps/alpha/fpu/feholdexcpt.c index 77d4cc1180..79aa970ac0 100644 --- a/sysdeps/alpha/fpu/feholdexcpt.c +++ b/sysdeps/alpha/fpu/feholdexcpt.c @@ -1,5 +1,5 @@ /* Store current floating-point environment and clear exceptions. - Copyright (C) 1997, 2000 Free Software Foundation, Inc. + Copyright (C) 1997, 2000, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1997 @@ -31,3 +31,4 @@ feholdexcept (fenv_t *envp) return 0; } +libm_hidden_def (feholdexcept) diff --git a/sysdeps/alpha/fpu/fesetround.c b/sysdeps/alpha/fpu/fesetround.c index c4dc196016..54b2bcf673 100644 --- a/sysdeps/alpha/fpu/fesetround.c +++ b/sysdeps/alpha/fpu/fesetround.c @@ -1,5 +1,5 @@ /* Set current rounding direction. - Copyright (C) 1997, 2000 Free Software Foundation, Inc. + Copyright (C) 1997, 2000, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1997 @@ -40,3 +40,4 @@ fesetround (int round) return 0; } +libm_hidden_def (fesetround) From e582e2ddcf4c681d0b0e6bed0ecb706b30382e27 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 11 Jul 2005 15:48:29 +0000 Subject: [PATCH 3451/4487] (pthread_rwlock_t): Make sure __flags are located at offset 48 from the start of the structure. --- sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h index d13d6e86a4..86b47037e4 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h @@ -1,5 +1,5 @@ /* Machine-specific pthread type layouts. Alpha version. - Copyright (C) 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 2003, 2004, 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 @@ -117,8 +117,9 @@ typedef union unsigned int __nr_readers_queued; unsigned int __nr_writers_queued; int __writer; - - unsigned int __reserved[6]; + int __pad1; + unsigned long int __pad2; + unsigned long int __pad3; /* FLAGS must stay at this position in the structure to maintain binary compatibility. */ unsigned int __flags; From eb4e0abb406333e563e1ea9c41f4c04dfa9d1676 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 8 Sep 2005 17:39:04 +0000 Subject: [PATCH 3452/4487] (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define. (lll_futex_wake_unlock): Define. --- .../unix/sysv/linux/alpha/nptl/lowlevellock.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h index fd4a7ca4bb..ab325d2b06 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h @@ -31,6 +31,8 @@ #define FUTEX_WAKE 1 #define FUTEX_REQUEUE 3 #define FUTEX_CMP_REQUEUE 4 +#define FUTEX_WAKE_OP 5 +#define FUTEX_OP_CLEAR_WAKE_IF_GT_ONE ((4 << 24) | 1) /* Initializer for compatibility lock. */ #define LLL_MUTEX_LOCK_INITIALIZER (0) @@ -73,6 +75,20 @@ INTERNAL_SYSCALL_ERROR_P (__ret, __err); \ }) +/* Returns non-zero if error happened, zero if success. */ +#define lll_futex_wake_unlock(futexp, nr_wake, nr_wake2, futexp2) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + __ret = INTERNAL_SYSCALL (futex, __err, 6, \ + (futexp), FUTEX_WAKE_OP, (nr_wake), \ + (nr_wake2), (futexp2), \ + FUTEX_OP_CLEAR_WAKE_IF_GT_ONE); \ + INTERNAL_SYSCALL_ERROR_P (__ret, __err); \ + }) + + + static inline int __attribute__((always_inline)) __lll_mutex_trylock(int *futex) From ea78d8fa650ea6cc0d911d99bbd56a44e85296d9 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 16 Sep 2005 12:20:48 +0000 Subject: [PATCH 3453/4487] 2005-09-16 Maciej W. Rozycki [BZ #933] * sysdeps/unix/sysv/linux/mips/brk.c (__brk): Load the number of the syscall immediately before invocation. * sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S (__ioctl): Likewise. * sysdeps/unix/sysv/linux/mips/mips64/syscall.S (syscall): Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S (__ioctl): Use macros to handle GP. * sysdeps/unix/sysv/linux/mips/mips64/syscall.S (syscall): Likewise. Update inaccurate comments. --- sysdeps/unix/sysv/linux/mips/brk.c | 5 +-- .../unix/sysv/linux/mips/mips64/n64/ioctl.S | 10 +++--- sysdeps/unix/sysv/linux/mips/mips64/syscall.S | 31 ++++++++++++------- 3 files changed, 27 insertions(+), 19 deletions(-) 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/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 -/* 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) From 32e1823eb3e13e8f9f09d2970f393ed4f60c9685 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 16 Sep 2005 13:12:44 +0000 Subject: [PATCH 3454/4487] [BZ #1047] * sysdeps/unix/sysv/linux/mips/getpagesize.c: New file. --- sysdeps/unix/sysv/linux/mips/getpagesize.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/mips/getpagesize.c 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 From 228f398a3004e1a24dabd7e01c009f416b760b03 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 20 Sep 2005 05:35:13 +0000 Subject: [PATCH 3455/4487] * sysdeps/alpha/ldiv.S (lldiv): Add alias. --- sysdeps/alpha/ldiv.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/alpha/ldiv.S b/sysdeps/alpha/ldiv.S index 3909672782..0a971a7ed0 100644 --- a/sysdeps/alpha/ldiv.S +++ b/sysdeps/alpha/ldiv.S @@ -214,3 +214,5 @@ $divbyzero: ret .end ldiv + +weak_alias (ldiv, lldiv) From dc5ca5d1f6bf8c585713181f7b022302a5af195e Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 20 Sep 2005 05:35:42 +0000 Subject: [PATCH 3456/4487] [BZ #1358] * sysdeps/unix/alpha/sysdep.h (inline_syscall1): Copy argument(s) to a temporary first. (inline_syscall2, inline_syscall3, inline_syscall4): Likewise. (inline_syscall5, inline_syscall6): Likewise. --- sysdeps/unix/alpha/sysdep.h | 63 ++++++++++++++++++++++++------------- 1 file changed, 42 insertions(+), 21 deletions(-) diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h index f9f1dd6e41..a154db8e41 100644 --- a/sysdeps/unix/alpha/sysdep.h +++ b/sysdeps/unix/alpha/sysdep.h @@ -242,9 +242,10 @@ __LABEL(name) \ register long _sc_0 inline_syscall_r0_asm; \ register long _sc_16 __asm__("$16"); \ register long _sc_19 __asm__("$19"); \ + register long _tmp_16 = (long) (arg1); \ \ _sc_0 = name; \ - _sc_16 = (long) (arg1); \ + _sc_16 = _tmp_16; \ __asm__ __volatile__ \ ("callsys # %0 %1 <= %2 %3" \ : inline_syscall_r0_out_constraint (_sc_0), \ @@ -261,10 +262,12 @@ __LABEL(name) \ register long _sc_16 __asm__("$16"); \ register long _sc_17 __asm__("$17"); \ register long _sc_19 __asm__("$19"); \ + register long _tmp_16 = (long) (arg1); \ + register long _tmp_17 = (long) (arg2); \ \ _sc_0 = name; \ - _sc_16 = (long) (arg1); \ - _sc_17 = (long) (arg2); \ + _sc_16 = _tmp_16; \ + _sc_17 = _tmp_17; \ __asm__ __volatile__ \ ("callsys # %0 %1 <= %2 %3 %4" \ : inline_syscall_r0_out_constraint (_sc_0), \ @@ -282,11 +285,14 @@ __LABEL(name) \ register long _sc_17 __asm__("$17"); \ register long _sc_18 __asm__("$18"); \ register long _sc_19 __asm__("$19"); \ + register long _tmp_16 = (long) (arg1); \ + register long _tmp_17 = (long) (arg2); \ + register long _tmp_18 = (long) (arg3); \ \ _sc_0 = name; \ - _sc_16 = (long) (arg1); \ - _sc_17 = (long) (arg2); \ - _sc_18 = (long) (arg3); \ + _sc_16 = _tmp_16; \ + _sc_17 = _tmp_17; \ + _sc_18 = _tmp_18; \ __asm__ __volatile__ \ ("callsys # %0 %1 <= %2 %3 %4 %5" \ : inline_syscall_r0_out_constraint (_sc_0), \ @@ -305,12 +311,16 @@ __LABEL(name) \ register long _sc_17 __asm__("$17"); \ register long _sc_18 __asm__("$18"); \ register long _sc_19 __asm__("$19"); \ + register long _tmp_16 = (long) (arg1); \ + register long _tmp_17 = (long) (arg2); \ + register long _tmp_18 = (long) (arg3); \ + register long _tmp_19 = (long) (arg4); \ \ _sc_0 = name; \ - _sc_16 = (long) (arg1); \ - _sc_17 = (long) (arg2); \ - _sc_18 = (long) (arg3); \ - _sc_19 = (long) (arg4); \ + _sc_16 = _tmp_16; \ + _sc_17 = _tmp_17; \ + _sc_18 = _tmp_18; \ + _sc_19 = _tmp_19; \ __asm__ __volatile__ \ ("callsys # %0 %1 <= %2 %3 %4 %5 %6" \ : inline_syscall_r0_out_constraint (_sc_0), \ @@ -330,13 +340,18 @@ __LABEL(name) \ register long _sc_18 __asm__("$18"); \ register long _sc_19 __asm__("$19"); \ register long _sc_20 __asm__("$20"); \ + register long _tmp_16 = (long) (arg1); \ + register long _tmp_17 = (long) (arg2); \ + register long _tmp_18 = (long) (arg3); \ + register long _tmp_19 = (long) (arg4); \ + register long _tmp_20 = (long) (arg5); \ \ _sc_0 = name; \ - _sc_16 = (long) (arg1); \ - _sc_17 = (long) (arg2); \ - _sc_18 = (long) (arg3); \ - _sc_19 = (long) (arg4); \ - _sc_20 = (long) (arg5); \ + _sc_16 = _tmp_16; \ + _sc_17 = _tmp_17; \ + _sc_18 = _tmp_18; \ + _sc_19 = _tmp_19; \ + _sc_20 = _tmp_20; \ __asm__ __volatile__ \ ("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7" \ : inline_syscall_r0_out_constraint (_sc_0), \ @@ -357,14 +372,20 @@ __LABEL(name) \ register long _sc_19 __asm__("$19"); \ register long _sc_20 __asm__("$20"); \ register long _sc_21 __asm__("$21"); \ + register long _tmp_16 = (long) (arg1); \ + register long _tmp_17 = (long) (arg2); \ + register long _tmp_18 = (long) (arg3); \ + register long _tmp_19 = (long) (arg4); \ + register long _tmp_20 = (long) (arg5); \ + register long _tmp_21 = (long) (arg6); \ \ _sc_0 = name; \ - _sc_16 = (long) (arg1); \ - _sc_17 = (long) (arg2); \ - _sc_18 = (long) (arg3); \ - _sc_19 = (long) (arg4); \ - _sc_20 = (long) (arg5); \ - _sc_21 = (long) (arg6); \ + _sc_16 = _tmp_16; \ + _sc_17 = _tmp_17; \ + _sc_18 = _tmp_18; \ + _sc_19 = _tmp_19; \ + _sc_20 = _tmp_20; \ + _sc_21 = _tmp_21; \ __asm__ __volatile__ \ ("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7 %8" \ : inline_syscall_r0_out_constraint (_sc_0), \ From 867700cb74293e99c5b91155aa4254c50fd4a6ce Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Wed, 5 Oct 2005 20:13:03 +0000 Subject: [PATCH 3457/4487] * sysdeps/arm/dl-machine.h (ARCH_LA_PLTENTER, ARCH_LA_PLTEXIT): Define. * sysdeps/arm/ldsodefs.h, sysdeps/arm/tst-audit.h: New files. --- ChangeLog.arm | 6 ++++++ sysdeps/arm/dl-machine.h | 4 ++++ sysdeps/arm/ldsodefs.h | 41 ++++++++++++++++++++++++++++++++++++++++ sysdeps/arm/tst-audit.h | 26 +++++++++++++++++++++++++ 4 files changed, 77 insertions(+) create mode 100644 sysdeps/arm/ldsodefs.h create mode 100644 sysdeps/arm/tst-audit.h diff --git a/ChangeLog.arm b/ChangeLog.arm index 1148fae44e..e7b6b2435d 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,9 @@ +2005-10-05 Daniel Jacobowitz + + * sysdeps/arm/dl-machine.h (ARCH_LA_PLTENTER, + ARCH_LA_PLTEXIT): Define. + * sysdeps/arm/ldsodefs.h, sysdeps/arm/tst-audit.h: New files. + 2005-06-13 Philip Blundell Patch from addsub@eyou.com: diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index abff153cb3..be03e7be31 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -243,6 +243,10 @@ elf_machine_plt_value (struct link_map *map, const Elf32_Rel *reloc, Prelinked libraries may use Elf32_Rela though. */ #define ELF_MACHINE_NO_RELA defined RTLD_BOOTSTRAP +/* Names of the architecture-specific auditing callback functions. */ +#define ARCH_LA_PLTENTER arm_gnu_pltenter +#define ARCH_LA_PLTEXIT arm_gnu_pltexit + #ifdef RESOLVE_MAP /* Deal with an out-of-range PC24 reloc. */ diff --git a/sysdeps/arm/ldsodefs.h b/sysdeps/arm/ldsodefs.h new file mode 100644 index 0000000000..d700e220c3 --- /dev/null +++ b/sysdeps/arm/ldsodefs.h @@ -0,0 +1,41 @@ +/* Run-time dynamic linker data structures for loaded ELF shared objects. + Copyright (C) 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 + 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 _ARM_LDSODEFS_H +#define _ARM_LDSODEFS_H 1 + +#include + +struct La_arm_regs; +struct La_arm_retval; + +#define ARCH_PLTENTER_MEMBERS \ + Elf32_Addr (*arm_gnu_pltenter) (Elf32_Sym *, unsigned int, uintptr_t *, \ + uintptr_t *, struct La_arm_regs *, \ + unsigned int *, const char *, \ + long int *) + +#define ARCH_PLTEXIT_MEMBERS \ + Elf32_Addr (*arm_gnu_pltexit) (Elf32_Sym *, unsigned int, uintptr_t *, \ + uintptr_t *, struct La_arm_regs *, \ + struct La_arm_retval *, const char *) + +#include_next + +#endif diff --git a/sysdeps/arm/tst-audit.h b/sysdeps/arm/tst-audit.h new file mode 100644 index 0000000000..bec743cffa --- /dev/null +++ b/sysdeps/arm/tst-audit.h @@ -0,0 +1,26 @@ +/* Definitions for testing PLT entry/exit auditing. ARM version. + + Copyright (C) 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 + 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. */ + +#define pltenter la_arm_gnu_pltenter +#define pltexit la_arm_gnu_pltexit +#define La_regs La_arm_regs +#define La_retval La_arm_retval +#define int_retval lrv_reg[0] From b4900b98dc1dfd60b1f7a4141f67e398ec6930cf Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Wed, 5 Oct 2005 20:14:10 +0000 Subject: [PATCH 3458/4487] * sysdeps/arm/atomicity.h: Delete. * sysdeps/arm/bits/atomic.h: New file. --- ChangeLog.arm | 5 ++ sysdeps/arm/atomicity.h | 87 -------------------------------- sysdeps/arm/bits/atomic.h | 101 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 106 insertions(+), 87 deletions(-) delete mode 100644 sysdeps/arm/atomicity.h create mode 100644 sysdeps/arm/bits/atomic.h diff --git a/ChangeLog.arm b/ChangeLog.arm index e7b6b2435d..2579d71754 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2005-10-05 Daniel Jacobowitz + + * sysdeps/arm/atomicity.h: Delete. + * sysdeps/arm/bits/atomic.h: New file. + 2005-10-05 Daniel Jacobowitz * sysdeps/arm/dl-machine.h (ARCH_LA_PLTENTER, diff --git a/sysdeps/arm/atomicity.h b/sysdeps/arm/atomicity.h deleted file mode 100644 index 1a437a6d35..0000000000 --- a/sysdeps/arm/atomicity.h +++ /dev/null @@ -1,87 +0,0 @@ -/* Low-level functions for atomic operations. ARM version. - 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 - 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 _ATOMICITY_H -#define _ATOMICITY_H 1 - -#include - - -static inline int -__attribute__ ((unused)) -exchange_and_add (volatile uint32_t *mem, int val) -{ - int tmp1; - int tmp2; - int result; - __asm__ ("\n" - "0:\tldr\t%0,[%3]\n\t" - "add\t%1,%0,%4\n\t" - "swp\t%2,%1,[%3]\n\t" - "cmp\t%0,%2\n\t" - "swpne\t%1,%2,[%3]\n\t" - "bne\t0b" - : "=&r" (result), "=&r" (tmp1), "=&r" (tmp2) - : "r" (mem), "r"(val) - : "cc", "memory"); - return result; -} - -static inline void -__attribute__ ((unused)) -atomic_add (volatile uint32_t *mem, int val) -{ - int tmp1; - int tmp2; - int tmp3; - __asm__ ("\n" - "0:\tldr\t%0,[%3]\n\t" - "add\t%1,%0,%4\n\t" - "swp\t%2,%1,[%3]\n\t" - "cmp\t%0,%2\n\t" - "swpne\t%1,%2,[%3]\n\t" - "bne\t0b" - : "=&r" (tmp1), "=&r" (tmp2), "=&r" (tmp3) - : "r" (mem), "r"(val) - : "cc", "memory"); -} - -static inline int -__attribute__ ((unused)) -compare_and_swap (volatile long int *p, long int oldval, long int newval) -{ - int result, tmp; - __asm__ ("\n" - "0:\tldr\t%1,[%2]\n\t" - "mov\t%0,#0\n\t" - "cmp\t%1,%4\n\t" - "bne\t1f\n\t" - "swp\t%0,%3,[%2]\n\t" - "cmp\t%1,%0\n\t" - "swpne\t%1,%0,[%2]\n\t" - "bne\t0b\n\t" - "mov\t%0,#1\n" - "1:" - : "=&r" (result), "=&r" (tmp) - : "r" (p), "r" (newval), "r" (oldval) - : "cc", "memory"); - return result; -} - -#endif /* atomicity.h */ diff --git a/sysdeps/arm/bits/atomic.h b/sysdeps/arm/bits/atomic.h new file mode 100644 index 0000000000..14d2dbe0e9 --- /dev/null +++ b/sysdeps/arm/bits/atomic.h @@ -0,0 +1,101 @@ +/* Copyright (C) 2002, 2003, 2004, 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 + 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. */ + +#include +#include + + +typedef int8_t atomic8_t; +typedef uint8_t uatomic8_t; +typedef int_fast8_t atomic_fast8_t; +typedef uint_fast8_t uatomic_fast8_t; + +typedef int32_t atomic32_t; +typedef uint32_t uatomic32_t; +typedef int_fast32_t atomic_fast32_t; +typedef uint_fast32_t uatomic_fast32_t; + +typedef intptr_t atomicptr_t; +typedef uintptr_t uatomicptr_t; +typedef intmax_t atomic_max_t; +typedef uintmax_t uatomic_max_t; + +void __arm_link_error (void); + +#define atomic_exchange_acq(mem, newvalue) \ + ({ __typeof (*mem) result; \ + if (sizeof (*mem) == 1) \ + __asm__ __volatile__ ("swpb %0, %1, [%2]" \ + : "=&r,&r" (result) \ + : "r,0" (newvalue), "r,r" (mem) : "memory"); \ + else if (sizeof (*mem) == 4) \ + __asm__ __volatile__ ("swp %0, %1, [%2]" \ + : "=&r,&r" (result) \ + : "r,0" (newvalue), "r,r" (mem) : "memory"); \ + else \ + { \ + result = 0; \ + abort (); \ + } \ + result; }) + +/* Atomic compare and exchange. These sequences are not actually atomic; + there is a race if *MEM != OLDVAL and we are preempted between the two + swaps. However, they are very close to atomic, and are the best that a + pre-ARMv6 implementation can do without operating system support. + LinuxThreads has been using these sequences for many years. */ + +#define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval) \ + ({ __typeof (oldval) result, tmp; \ + __asm__ ("\n" \ + "0:\tldr\t%1,[%2]\n\t" \ + "cmp\t%1,%4\n\t" \ + "movne\t%0,%1\n\t" \ + "bne\t1f\n\t" \ + "swpb\t%0,%3,[%2]\n\t" \ + "cmp\t%1,%0\n\t" \ + "swpbne\t%1,%0,[%2]\n\t" \ + "bne\t0b\n\t" \ + "1:" \ + : "=&r" (result), "=&r" (tmp) \ + : "r" (mem), "r" (newval), "r" (oldval) \ + : "cc", "memory"); \ + result; }) + +#define __arch_compare_and_exchange_val_16_acq(mem, newval, oldval) \ + ({ __arm_link_error (); oldval; }) + +#define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \ + ({ __typeof (oldval) result, tmp; \ + __asm__ ("\n" \ + "0:\tldr\t%1,[%2]\n\t" \ + "cmp\t%1,%4\n\t" \ + "movne\t%0,%1\n\t" \ + "bne\t1f\n\t" \ + "swp\t%0,%3,[%2]\n\t" \ + "cmp\t%1,%0\n\t" \ + "swpne\t%1,%0,[%2]\n\t" \ + "bne\t0b\n\t" \ + "1:" \ + : "=&r" (result), "=&r" (tmp) \ + : "r" (mem), "r" (newval), "r" (oldval) \ + : "cc", "memory"); \ + result; }) + +#define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \ + ({ __arm_link_error (); oldval; }) From 485a9bb9f02c45f15bdb326d32a232037b1de31b Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Wed, 5 Oct 2005 20:15:22 +0000 Subject: [PATCH 3459/4487] * sysdeps/arm/dl-machine.h: Include . (elf_machine_type_class, elf_machine_rel, elf_machine_rela): Handle TLS relocations. * sysdeps/unix/sysv/linux/arm/Makefile: Build __aeabi_read_tp. * sysdeps/unix/sysv/linux/arm/sysdep.h (INTERNAL_SYSCALL_RAW): Renamed from INTERNAL_SYSCALL. (INTERNAL_SYSCALL, INTERNAL_SYSCALL_ARM): New macros. * sysdeps/arm/dl-tls.h, sysdeps/arm/elf/configure.in, sysdeps/arm/elf/configure, sysdeps/arm/libc-tls.c, sysdeps/arm/linuxthreads/tls.h, sysdeps/arm/tls-macros.h, sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S, sysdeps/unix/sysv/linux/arm/libc-aeabi_read_tp.S: New files. --- ChangeLog.arm | 15 ++ sysdeps/arm/dl-machine.h | 51 +++++- sysdeps/arm/dl-tls.h | 29 +++ sysdeps/arm/elf/configure | 45 +++++ sysdeps/arm/elf/configure.in | 35 ++++ sysdeps/arm/libc-tls.c | 37 ++++ sysdeps/arm/linuxthreads/tls.h | 172 ++++++++++++++++++ sysdeps/arm/tls-macros.h | 51 ++++++ sysdeps/unix/sysv/linux/arm/Makefile | 10 + sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S | 34 ++++ .../unix/sysv/linux/arm/libc-aeabi_read_tp.S | 1 + sysdeps/unix/sysv/linux/arm/sysdep.h | 14 +- 12 files changed, 488 insertions(+), 6 deletions(-) create mode 100644 sysdeps/arm/dl-tls.h create mode 100644 sysdeps/arm/elf/configure create mode 100644 sysdeps/arm/elf/configure.in create mode 100644 sysdeps/arm/libc-tls.c create mode 100644 sysdeps/arm/linuxthreads/tls.h create mode 100644 sysdeps/arm/tls-macros.h create mode 100644 sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S create mode 100644 sysdeps/unix/sysv/linux/arm/libc-aeabi_read_tp.S diff --git a/ChangeLog.arm b/ChangeLog.arm index 2579d71754..0c0568e342 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,18 @@ +2005-10-05 Daniel Jacobowitz + + * sysdeps/arm/dl-machine.h: Include . + (elf_machine_type_class, elf_machine_rel, elf_machine_rela): Handle + TLS relocations. + * sysdeps/unix/sysv/linux/arm/Makefile: Build __aeabi_read_tp. + * sysdeps/unix/sysv/linux/arm/sysdep.h (INTERNAL_SYSCALL_RAW): Renamed + from INTERNAL_SYSCALL. + (INTERNAL_SYSCALL, INTERNAL_SYSCALL_ARM): New macros. + * sysdeps/arm/dl-tls.h, sysdeps/arm/elf/configure.in, + sysdeps/arm/elf/configure, sysdeps/arm/libc-tls.c, + sysdeps/arm/linuxthreads/tls.h, sysdeps/arm/tls-macros.h, + sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S, + sysdeps/unix/sysv/linux/arm/libc-aeabi_read_tp.S: New files. + 2005-10-05 Daniel Jacobowitz * sysdeps/arm/atomicity.h: Delete. diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index be03e7be31..2534be151e 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -24,6 +24,7 @@ #define ELF_MACHINE_NAME "ARM" #include +#include #define VALID_ELF_ABIVERSION(ver) (ver == 0) #define VALID_ELF_OSABI(osabi) \ @@ -193,13 +194,22 @@ _dl_start_user:\n\ .previous\n\ "); -/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so - PLT entries should not be allowed to define the value. +/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry or + TLS variable, so undefined references should not be allowed to + define the value. ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one of the main executable's symbols, as for a COPY reloc. */ +#if defined USE_TLS && (!defined RTLD_BOOTSTRAP || USE___THREAD) +# define elf_machine_type_class(type) \ + ((((type) == R_ARM_JUMP_SLOT || (type) == R_ARM_TLS_DTPMOD32 \ + || (type) == R_ARM_TLS_DTPOFF32 || (type) == R_ARM_TLS_TPOFF32) \ + * ELF_RTYPE_CLASS_PLT) \ + | (((type) == R_ARM_COPY) * ELF_RTYPE_CLASS_COPY)) +#else #define elf_machine_type_class(type) \ ((((type) == R_ARM_JUMP_SLOT) * ELF_RTYPE_CLASS_PLT) \ | (((type) == R_ARM_COPY) * ELF_RTYPE_CLASS_COPY)) +#endif /* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */ #define ELF_MACHINE_JMP_SLOT R_ARM_JUMP_SLOT @@ -399,7 +409,24 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, value = (*reloc_addr & 0xff000000) | (newvalue & 0x00ffffff); *reloc_addr = value; } - break; + break; +#if defined USE_TLS && !defined RTLD_BOOTSTRAP + case R_ARM_TLS_DTPMOD32: + /* Get the information from the link map returned by the + resolv function. */ + if (sym_map != NULL) + *reloc_addr = sym_map->l_tls_modid; + break; + + case R_ARM_TLS_DTPOFF32: + *reloc_addr += sym->st_value; + break; + + case R_ARM_TLS_TPOFF32: + CHECK_STATIC_TLS (map, sym_map); + *reloc_addr += sym->st_value + sym_map->l_tls_offset; + break; +#endif default: _dl_reloc_bad_type (map, r_type, 0); break; @@ -480,6 +507,24 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, *reloc_addr = value; } break; +#if defined USE_TLS && !defined RTLD_BOOTSTRAP + case R_ARM_TLS_DTPMOD32: + /* Get the information from the link map returned by the + resolv function. */ + if (sym_map != NULL) + *reloc_addr = sym_map->l_tls_modid; + break; + + case R_ARM_TLS_DTPOFF32: + *reloc_addr = sym->st_value + reloc->r_addend; + break; + + case R_ARM_TLS_TPOFF32: + CHECK_STATIC_TLS (map, sym_map); + *reloc_addr = (sym->st_value + sym_map->l_tls_offset + + reloc->r_addend); + break; +#endif default: _dl_reloc_bad_type (map, r_type, 0); break; diff --git a/sysdeps/arm/dl-tls.h b/sysdeps/arm/dl-tls.h new file mode 100644 index 0000000000..e0324a7b65 --- /dev/null +++ b/sysdeps/arm/dl-tls.h @@ -0,0 +1,29 @@ +/* Thread-local storage handling in the ELF dynamic linker. ARM version. + Copyright (C) 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 + 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. */ + + +/* Type used for the representation of TLS information in the GOT. */ +typedef struct +{ + unsigned long int ti_module; + unsigned long int ti_offset; +} tls_index; + + +extern void *__tls_get_addr (tls_index *ti); diff --git a/sysdeps/arm/elf/configure b/sysdeps/arm/elf/configure new file mode 100644 index 0000000000..234fc20c5e --- /dev/null +++ b/sysdeps/arm/elf/configure @@ -0,0 +1,45 @@ +# This file is generated from configure.in by Autoconf. DO NOT EDIT! + # Local configure fragment for sysdeps/arm/elf. + +if test "$usetls" != no; then +# Check for support of thread-local storage handling in assembler and +# linker. +echo "$as_me:$LINENO: checking for ARM TLS support" >&5 +echo $ECHO_N "checking for ARM TLS support... $ECHO_C" >&6 +if test "${libc_cv_arm_tls+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat > conftest.s <<\EOF + .section ".tdata", "awT", %progbits + .globl foo +foo: .long 1 + .section ".tbss", "awT", %nobits + .globl bar +bar: .skip 4 + .text +.word foo(tpoff) +.word foo(tlsgd) +EOF +if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + libc_cv_arm_tls=yes +else + libc_cv_arm_tls=no +fi +rm -f conftest* +fi +echo "$as_me:$LINENO: result: $libc_cv_arm_tls" >&5 +echo "${ECHO_T}$libc_cv_arm_tls" >&6 +if test $libc_cv_arm_tls = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_TLS_SUPPORT 1 +_ACEOF + +fi +fi + +#AC_DEFINE(PI_STATIC_AND_HIDDEN) diff --git a/sysdeps/arm/elf/configure.in b/sysdeps/arm/elf/configure.in new file mode 100644 index 0000000000..1045296774 --- /dev/null +++ b/sysdeps/arm/elf/configure.in @@ -0,0 +1,35 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/arm/elf. + +if test "$usetls" != no; then +# Check for support of thread-local storage handling in assembler and +# linker. +AC_CACHE_CHECK(for ARM TLS support, libc_cv_arm_tls, [dnl +cat > conftest.s <<\EOF + .section ".tdata", "awT", %progbits + .globl foo +foo: .long 1 + .section ".tbss", "awT", %nobits + .globl bar +bar: .skip 4 + .text +.word foo(tpoff) +.word foo(tlsgd) +EOF +dnl +if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then + libc_cv_arm_tls=yes +else + libc_cv_arm_tls=no +fi +rm -f conftest*]) +if test $libc_cv_arm_tls = yes; then + AC_DEFINE(HAVE_TLS_SUPPORT) +fi +fi + +dnl It is always possible to access static and hidden symbols in an +dnl position independent way. +dnl NOTE: This feature was added by the GCC TLS patches. We should test for +dnl it. Until we do, don't define it. +#AC_DEFINE(PI_STATIC_AND_HIDDEN) diff --git a/sysdeps/arm/libc-tls.c b/sysdeps/arm/libc-tls.c new file mode 100644 index 0000000000..53c2923251 --- /dev/null +++ b/sysdeps/arm/libc-tls.c @@ -0,0 +1,37 @@ +/* Thread-local storage handling in the ELF dynamic linker. ARM version. + Copyright (C) 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 + 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. */ + +#include +#include + +#if USE_TLS + +/* On ARM, linker optimizations are not required, so __tls_get_addr + can be called even in statically linked binaries. In this case module + must be always 1 and PT_TLS segment exist in the binary, otherwise it + would not link. */ + +void * +__tls_get_addr (tls_index *ti) +{ + dtv_t *dtv = THREAD_DTV (); + return (char *) dtv[1].pointer.val + ti->ti_offset; +} + +#endif diff --git a/sysdeps/arm/linuxthreads/tls.h b/sysdeps/arm/linuxthreads/tls.h new file mode 100644 index 0000000000..8057a54137 --- /dev/null +++ b/sysdeps/arm/linuxthreads/tls.h @@ -0,0 +1,172 @@ +/* Definitions for thread-local data handling. linuxthreads/ARM version. + Copyright (C) 2004 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 _TLS_H +#define _TLS_H + +#ifndef __ASSEMBLER__ + +# include +# include +# include + +/* Type for the dtv. */ +typedef union dtv +{ + size_t counter; + struct + { + void *val; + bool is_static; + } pointer; +} dtv_t; + +typedef struct +{ + dtv_t *dtv; + + /* Reserved for the thread implementation. Unused in LinuxThreads. */ + void *private; +} tcbhead_t; +#endif + + +/* We can support TLS only if the floating-stack support is available. + However, we want to compile in the support and test at runtime whether + the running kernel can support it or not. To avoid bothering with the + TLS support code at all, use configure --without-tls. + + We need USE_TLS to be consistently defined, for ldsodefs.h conditionals. + But some of the code below can cause problems in building libpthread + (e.g. useldt.h will defined FLOATING_STACKS when it shouldn't). */ + +/* LinuxThreads can only support TLS if both floating stacks and support + from the tools are available. + + We have to define USE_TLS consistently, or ldsodefs.h will lay out types + differently between an NPTL build and a LinuxThreads build. It can be set + for libc.so and not libpthread.so, but only if we provide appropriate padding + in the _pthread_descr_struct. + + Currently nothing defines FLOATING_STACKS. We could assume this based on + kernel version once the TLS patches are available in kernel.org. + + To avoid bothering with the TLS support code at all, use configure + --without-tls. */ + +#if defined HAVE_TLS_SUPPORT \ + && (defined FLOATING_STACKS || !defined IS_IN_libpthread) + +/* Signal that TLS support is available. */ +# define USE_TLS 1 + +/* Include padding in _pthread_descr_struct so that libc can find p_errno, + if libpthread will only include the padding because of the !IS_IN_libpthread + check. */ +#ifndef FLOATING_STACKS +# define INCLUDE_TLS_PADDING 1 +#endif + +# ifndef __ASSEMBLER__ +/* Get system call information. */ +# include + +/* This is the size of the initial TCB. */ +# define TLS_INIT_TCB_SIZE sizeof (tcbhead_t) + +/* Alignment requirements for the initial TCB. */ +# define TLS_INIT_TCB_ALIGN __alignof__ (tcbhead_t) + +/* This is the size of the TCB. */ +# define TLS_TCB_SIZE sizeof (tcbhead_t) + +/* Alignment requirements for the TCB. */ +# define TLS_TCB_ALIGN __alignof__ (tcbhead_t) + +/* This is the size we need before TCB. */ +# define TLS_PRE_TCB_SIZE sizeof (struct _pthread_descr_struct) + +/* The DTV is allocated at the TP; the TCB is placed elsewhere. */ +# define TLS_DTV_AT_TP 1 + +/* Install the dtv pointer. The pointer passed is to the element with + index -1 which contain the length. */ +# define INSTALL_DTV(TCBP, DTVP) \ + (((tcbhead_t *) (TCBP))->dtv = (DTVP) + 1) + +/* Install new dtv for current thread. */ +# define INSTALL_NEW_DTV(DTV) \ + (((tcbhead_t *)__builtin_thread_pointer ())->dtv = (DTV)) + +/* Return dtv of given thread descriptor. */ +# define GET_DTV(TCBP) \ + (((tcbhead_t *) (TCBP))->dtv) + +/* Code to initially initialize the thread pointer. This might need + special attention since 'errno' is not yet available and if the + operation can cause a failure 'errno' must not be touched. */ +# define TLS_INIT_TP(TCBP, SECONDCALL) \ + ({ INTERNAL_SYSCALL_DECL (err); \ + long result_var; \ + result_var = INTERNAL_SYSCALL_ARM (set_tls, err, 1, (TCBP)); \ + INTERNAL_SYSCALL_ERROR_P (result_var, err) \ + ? "unknown error" : NULL; }) + +/* Return the address of the dtv for the current thread. */ +# define THREAD_DTV() \ + (((tcbhead_t *)__builtin_thread_pointer ())->dtv) + +/* Return the thread descriptor for the current thread. */ +# undef THREAD_SELF +# define THREAD_SELF \ + ((pthread_descr)__builtin_thread_pointer () - 1) + +# undef INIT_THREAD_SELF +# define INIT_THREAD_SELF(DESCR, NR) \ + TLS_INIT_TP ((struct _pthread_descr_struct *)(DESCR) + 1, 0) + +/* Get the thread descriptor definition. */ +# include + +/* ??? Generic bits of LinuxThreads may call these macros with + DESCR set to NULL. We are expected to be able to reference + the "current" value. + + In our case, we'd really prefer to use DESCR, since lots of + PAL_code calls would be expensive. We can only trust that + the compiler does its job and unifies the multiple + __builtin_thread_pointer instances. */ + +#define THREAD_GETMEM(descr, member) \ + ((void) sizeof (descr), THREAD_SELF->member) +#define THREAD_GETMEM_NC(descr, member) \ + ((void) sizeof (descr), THREAD_SELF->member) +#define THREAD_SETMEM(descr, member, value) \ + ((void) sizeof (descr), THREAD_SELF->member = (value)) +#define THREAD_SETMEM_NC(descr, member, value) \ + ((void) sizeof (descr), THREAD_SELF->member = (value)) + +/* Initializing the thread pointer will generate a SIGILL if the syscall + is not available. */ +#define TLS_INIT_TP_EXPENSIVE 1 + +# endif /* HAVE_TLS_SUPPORT */ +#endif /* __ASSEMBLER__ */ + +#endif /* tls.h */ diff --git a/sysdeps/arm/tls-macros.h b/sysdeps/arm/tls-macros.h new file mode 100644 index 0000000000..94aa3a83b1 --- /dev/null +++ b/sysdeps/arm/tls-macros.h @@ -0,0 +1,51 @@ +#define TLS_LE(x) \ + ({ int *__result; \ + void *tp = __builtin_thread_pointer (); \ + asm ("ldr %0, 1f; " \ + "add %0, %1, %0; " \ + "b 2f; " \ + "1: .word " #x "(tpoff); " \ + "2: " \ + : "=&r" (__result) : "r" (tp)); \ + __result; }) + +#define TLS_IE(x) \ + ({ int *__result; \ + void *tp = __builtin_thread_pointer (); \ + asm ("ldr %0, 1f; " \ + "3: ldr %0, [pc, %0];" \ + "add %0, %1, %0; " \ + "b 2f; " \ + "1: .word " #x "(gottpoff) + (. - 3b - 8); " \ + "2: " \ + : "=&r" (__result) : "r" (tp)); \ + __result; }) + +#define TLS_LD(x) \ + ({ char *__result; \ + int __offset; \ + extern void *__tls_get_addr (void *); \ + asm ("ldr %0, 2f; " \ + "1: add %0, pc, %0; " \ + "b 3f; " \ + "2: .word " #x "(tlsldm) + (. - 1b - 8); " \ + "3: " \ + : "=r" (__result)); \ + __result = (char *)__tls_get_addr (__result); \ + asm ("ldr %0, 1f; " \ + "b 2f; " \ + "1: .word " #x "(tlsldo); " \ + "2: " \ + : "=r" (__offset)); \ + (int *) (__result + __offset); }) + +#define TLS_GD(x) \ + ({ int *__result; \ + extern void *__tls_get_addr (void *); \ + asm ("ldr %0, 2f; " \ + "1: add %0, pc, %0; " \ + "b 3f; " \ + "2: .word " #x "(tlsgd) + (. - 1b - 8); " \ + "3: " \ + : "=r" (__result)); \ + (int *)__tls_get_addr (__result); }) diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile index 0ccdbe81f6..d91b968594 100644 --- a/sysdeps/unix/sysv/linux/arm/Makefile +++ b/sysdeps/unix/sysv/linux/arm/Makefile @@ -1,3 +1,13 @@ +ifeq ($(subdir),csu) +sysdep_routines += aeabi_read_tp libc-aeabi_read_tp +static-only-routines += aeabi_read_tp +shared-only-routines += libc-aeabi_read_tp +endif + +ifeq ($(subdir),elf) +sysdep-rtld-routines += aeabi_read_tp +endif + ifeq ($(subdir),misc) sysdep_routines += ioperm sysdep_headers += sys/elf.h sys/io.h diff --git a/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S b/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S new file mode 100644 index 0000000000..4a7b951ed6 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S @@ -0,0 +1,34 @@ +/* Copyright (C) 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 + 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. */ + +#include + +#ifdef HAVE_TLS_SUPPORT + +/* GCC will emit calls to this routine under -mtp=soft. Linux has an + equivalent helper function (which clobbers fewer registers than + a normal function call) in a high page of memory; tail call to the + helper. */ + + .hidden __aeabi_read_tp +ENTRY (__aeabi_read_tp) + mov r0, #0xffff0fff + sub pc, r0, #31 +END (__aeabi_read_tp) + +#endif diff --git a/sysdeps/unix/sysv/linux/arm/libc-aeabi_read_tp.S b/sysdeps/unix/sysv/linux/arm/libc-aeabi_read_tp.S new file mode 100644 index 0000000000..6132afc151 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/libc-aeabi_read_tp.S @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index f42a5c8410..4df3e3795c 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -179,20 +179,28 @@ __local_syscall_error: \ #undef INTERNAL_SYSCALL_DECL #define INTERNAL_SYSCALL_DECL(err) do { } while (0) -#undef INTERNAL_SYSCALL -#define INTERNAL_SYSCALL(name, err, nr, args...) \ +#undef INTERNAL_SYSCALL_RAW +#define INTERNAL_SYSCALL_RAW(name, err, nr, args...) \ ({ unsigned int _sys_result; \ { \ register int _a1 asm ("a1"); \ LOAD_ARGS_##nr (args) \ asm volatile ("swi %1 @ syscall " #name \ : "=r" (_a1) \ - : "i" (SYS_ify(name)) ASM_ARGS_##nr \ + : "i" (name) ASM_ARGS_##nr \ : "memory"); \ _sys_result = _a1; \ } \ (int) _sys_result; }) +#undef INTERNAL_SYSCALL +#define INTERNAL_SYSCALL(name, err, nr, args...) \ + INTERNAL_SYSCALL_RAW(SYS_ify(name), err, nr, args) + +#undef INTERNAL_SYSCALL_ARM +#define INTERNAL_SYSCALL_ARM(name, err, nr, args...) \ + INTERNAL_SYSCALL_RAW(__ARM_NR_##name, err, nr, args) + #undef INTERNAL_SYSCALL_ERROR_P #define INTERNAL_SYSCALL_ERROR_P(val, err) \ ((unsigned int) (val) >= 0xfffff001u) From ecaa5eab07606c6482190bc50ed37f202ceb8048 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Wed, 5 Oct 2005 20:17:08 +0000 Subject: [PATCH 3460/4487] * sysdeps/unix/sysv/linux/arm/posix_fadvise.c, sysdeps/unix/sysv/linux/arm/posix_fadvise64.c: New files. --- ChangeLog.arm | 5 ++ sysdeps/unix/sysv/linux/arm/posix_fadvise.c | 31 ++++++++ sysdeps/unix/sysv/linux/arm/posix_fadvise64.c | 78 +++++++++++++++++++ 3 files changed, 114 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/posix_fadvise.c create mode 100644 sysdeps/unix/sysv/linux/arm/posix_fadvise64.c diff --git a/ChangeLog.arm b/ChangeLog.arm index 0c0568e342..f3a2c25f1d 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2005-10-05 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/arm/posix_fadvise.c, + sysdeps/unix/sysv/linux/arm/posix_fadvise64.c: New files. + 2005-10-05 Daniel Jacobowitz * sysdeps/arm/dl-machine.h: Include . diff --git a/sysdeps/unix/sysv/linux/arm/posix_fadvise.c b/sysdeps/unix/sysv/linux/arm/posix_fadvise.c new file mode 100644 index 0000000000..bb5dd0e8f1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/posix_fadvise.c @@ -0,0 +1,31 @@ +/* Copyright (C) 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 + 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. */ + +#include + +int __posix_fadvise64_l64 (int fd, off64_t offset, off64_t len, int advise); + +/* Advice the system about the expected behaviour of the application with + respect to the file associated with FD. */ + +int +posix_fadvise (int fd, off_t offset, off_t len, int advise) +{ + /* ARM only has a syscall for fadvise64_64. */ + return __posix_fadvise64_l64 (fd, offset, len, advise); +} diff --git a/sysdeps/unix/sysv/linux/arm/posix_fadvise64.c b/sysdeps/unix/sysv/linux/arm/posix_fadvise64.c new file mode 100644 index 0000000000..86752f884f --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/posix_fadvise64.c @@ -0,0 +1,78 @@ +/* Copyright (C) 2003, 2004, 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 + 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. */ + +#include +#include +#include +#include + +int __posix_fadvise64_l64 (int fd, off64_t offset, off64_t len, int advise); +int __posix_fadvise64_l32 (int fd, off64_t offset, size_t len, int advise); + +/* Advice the system about the expected behaviour of the application with + respect to the file associated with FD. */ + +int +__posix_fadvise64_l64 (int fd, off64_t offset, off64_t len, int advise) +{ +#ifdef __NR_arm_fadvise64_64 + INTERNAL_SYSCALL_DECL (err); + int ret = INTERNAL_SYSCALL (arm_fadvise64_64, err, 6, fd, advise, + __LONG_LONG_PAIR ((long)(offset >> 32), (long)offset), + __LONG_LONG_PAIR ((long)(len >> 32), (long)len)); + if (!INTERNAL_SYSCALL_ERROR_P (ret, err)) + return 0; +# ifndef __ASSUME_FADVISE64_64_SYSCALL + if (INTERNAL_SYSCALL_ERRNO (ret, err) != ENOSYS) +# endif + return INTERNAL_SYSCALL_ERRNO (ret, err); +#endif +#ifndef __ASSUME_FADVISE64_64_SYSCALL +# ifdef __NR_fadvise64 + if (len != (off_t) len) + return EOVERFLOW; + + INTERNAL_SYSCALL_DECL (err2); + int ret2 = INTERNAL_SYSCALL (fadvise64, err2, 6, fd, 0, + __LONG_LONG_PAIR ((long)(offset >> 32), (long)offset), + (off_t) len, advise); + if (!INTERNAL_SYSCALL_ERROR_P (ret2, err2)) + return 0; + return INTERNAL_SYSCALL_ERRNO (ret2, err2); +# else + return ENOSYS; +# endif +#endif +} + +#include + +#if SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_3_3) + +int +attribute_compat_text_section +__posix_fadvise64_l32 (int fd, off64_t offset, size_t len, int advise) +{ + return __posix_fadvise64_l64 (fd, offset, len, advise); +} + +versioned_symbol (libc, __posix_fadvise64_l64, posix_fadvise64, GLIBC_2_3_3); +compat_symbol (libc, __posix_fadvise64_l32, posix_fadvise64, GLIBC_2_2); +#else +strong_alias (__posix_fadvise64_l64, posix_fadvise64); +#endif From 609908d77052a1c4aaebd536420a4a618d6b3e95 Mon Sep 17 00:00:00 2001 From: Phil Blundell Date: Sun, 9 Oct 2005 18:24:09 +0000 Subject: [PATCH 3461/4487] 2005-10-09 Phil Blundell * sysdeps/arm/dl-trampoline.S: [PROF] (_dl_runtime_profile): Don't compile. Correct cut'n'paste error with .size. --- ChangeLog.arm | 5 +++++ sysdeps/arm/dl-trampoline.S | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index f3a2c25f1d..a4e547c0f5 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2005-10-09 Phil Blundell + + * sysdeps/arm/dl-trampoline.S: [PROF] (_dl_runtime_profile): + Don't compile. Correct cut'n'paste error with .size. + 2005-10-05 Daniel Jacobowitz * sysdeps/unix/sysv/linux/arm/posix_fadvise.c, diff --git a/sysdeps/arm/dl-trampoline.S b/sysdeps/arm/dl-trampoline.S index dc7494f9f8..0224fa1d1c 100644 --- a/sysdeps/arm/dl-trampoline.S +++ b/sysdeps/arm/dl-trampoline.S @@ -74,6 +74,7 @@ _dl_runtime_resolve: cfi_endproc .size _dl_runtime_resolve, .-_dl_runtime_resolve +#ifndef PROF .globl _dl_runtime_profile .type _dl_runtime_profile, #function cfi_startproc @@ -210,5 +211,6 @@ _dl_runtime_profile: BX(lr) cfi_endproc - .size _dl_runtime_resolve, .-_dl_runtime_resolve + .size _dl_runtime_profile, .-_dl_runtime_profile +#endif .previous From 5f7c48c17f99274f06fd77d90a5b653a5fa2596a Mon Sep 17 00:00:00 2001 From: Phil Blundell Date: Sun, 9 Oct 2005 18:29:25 +0000 Subject: [PATCH 3462/4487] 2005-10-09 Phil Blundell * sysdeps/arm/Makefile [subdir=gmon] (sysdep_routines): Add _mcount. * sysdeps/arm/machine-gmon.h (MCOUNT): Replace with empty definition. (_MCOUNT_DECL): Make linkage global. * sysdeps/arm/_mcount.S: New file. --- ChangeLog.arm | 9 ++++++++ sysdeps/arm/Makefile | 3 +++ sysdeps/arm/_mcount.S | 28 ++++++++++++++++++++++++ sysdeps/arm/machine-gmon.h | 45 ++------------------------------------ 4 files changed, 42 insertions(+), 43 deletions(-) create mode 100644 sysdeps/arm/Makefile create mode 100644 sysdeps/arm/_mcount.S diff --git a/ChangeLog.arm b/ChangeLog.arm index a4e547c0f5..1cc49255ec 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,12 @@ +2005-10-09 Phil Blundell + + * sysdeps/arm/Makefile [subdir=gmon] (sysdep_routines): Add + _mcount. + * sysdeps/arm/machine-gmon.h (MCOUNT): Replace with empty + definition. + (_MCOUNT_DECL): Make linkage global. + * sysdeps/arm/_mcount.S: New file. + 2005-10-09 Phil Blundell * sysdeps/arm/dl-trampoline.S: [PROF] (_dl_runtime_profile): diff --git a/sysdeps/arm/Makefile b/sysdeps/arm/Makefile new file mode 100644 index 0000000000..cf18dedc45 --- /dev/null +++ b/sysdeps/arm/Makefile @@ -0,0 +1,3 @@ +ifeq ($(subdir),gmon) +sysdep_routines += _mcount +endif diff --git a/sysdeps/arm/_mcount.S b/sysdeps/arm/_mcount.S new file mode 100644 index 0000000000..471af5ca24 --- /dev/null +++ b/sysdeps/arm/_mcount.S @@ -0,0 +1,28 @@ +/* Profiling entry point. ARM version. + Copyright (C) 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 + 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. */ + +#include + +ENTRY(_mcount) + stmfd sp!, {r0-r3, lr} + mov r0, lr + mov r1, ip + bl mcount_internal + ldmfd sp!, {r0-r3, pc} +END(_mcount) diff --git a/sysdeps/arm/machine-gmon.h b/sysdeps/arm/machine-gmon.h index fa3f65237d..0af6b5ed45 100644 --- a/sysdeps/arm/machine-gmon.h +++ b/sysdeps/arm/machine-gmon.h @@ -20,48 +20,7 @@ /* GCC for the ARM cannot compile __builtin_return_address(N) for N != 0, so we must use an assembly stub. */ -#include -#ifndef NO_UNDERSCORES -/* The asm symbols for C functions are `_function'. - The canonical name for the counter function is `mcount', no _. */ -void _mcount (void) asm ("mcount"); -#else -/* The canonical name for the function is `_mcount' in both C and asm, - but some old asm code might assume it's `mcount'. */ -void _mcount (void); -weak_alias (_mcount, mcount) -#endif - -static void mcount_internal (u_long frompc, u_long selfpc) __attribute_used__; - #define _MCOUNT_DECL(frompc, selfpc) \ -static void mcount_internal (u_long frompc, u_long selfpc) - -/* This macro/func MUST save r0, r1 because the compiler inserts - blind calls to _mount(), ignoring the fact that _mcount may - clobber registers; therefore, _mcount may NOT clobber registers */ -/* if (this_fp!=0) { - r0 = this_fp - r1 = this_lr - r1 = [r1-4] which is caller's lr - if (r1!=0) - r1 = caller's lr - call mcount_internal(this_lr, caller's_lr) - } -*/ - -#define MCOUNT \ -void _mcount (void) \ -{ \ - __asm__("stmdb sp!, {r0, r1, r2, r3};" \ - "movs fp, fp;" \ - "moveq r1, #0;" \ - "ldrne r1, [fp, $-4];" \ - "ldrne r0, [fp, $-12];" \ - "movnes r0, r0;" \ - "ldrne r0, [r0, $-4];" \ - "movs r0, r0;" \ - "blne mcount_internal;" \ - "ldmia sp!, {r0, r1, r2, r3}"); \ -} + void mcount_internal (u_long frompc, u_long selfpc) +#define MCOUNT /* Nothing herel code in _mcount.S is used. */ From b033155aa9d0976a5c4f59e890d2f64e9a4bd4c0 Mon Sep 17 00:00:00 2001 From: Phil Blundell Date: Mon, 10 Oct 2005 14:51:13 +0000 Subject: [PATCH 3463/4487] 2005-10-10 Philip Blundell * sysdeps/arm/_mcount.S: Suppress profiling when building this file. --- ChangeLog.arm | 5 +++++ sysdeps/arm/_mcount.S | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog.arm b/ChangeLog.arm index 1cc49255ec..f2a8a84755 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2005-10-10 Philip Blundell + + * sysdeps/arm/_mcount.S: Suppress profiling when building this + file. + 2005-10-09 Phil Blundell * sysdeps/arm/Makefile [subdir=gmon] (sysdep_routines): Add diff --git a/sysdeps/arm/_mcount.S b/sysdeps/arm/_mcount.S index 471af5ca24..795d999868 100644 --- a/sysdeps/arm/_mcount.S +++ b/sysdeps/arm/_mcount.S @@ -17,6 +17,8 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#undef PROF + #include ENTRY(_mcount) From a7ed1adbecb6aac49af75aae3b3498798cf63abc Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Mon, 10 Oct 2005 15:00:47 +0000 Subject: [PATCH 3464/4487] * sysdeps/arm/memset.S (memset): Correct handling of negative arguments. --- ChangeLog.arm | 5 +++++ sysdeps/arm/memset.S | 1 + 2 files changed, 6 insertions(+) diff --git a/ChangeLog.arm b/ChangeLog.arm index f2a8a84755..16156899fd 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2005-10-10 Daniel Jacobowitz + + * sysdeps/arm/memset.S (memset): Correct handling of negative + arguments. + 2005-10-10 Philip Blundell * sysdeps/arm/_mcount.S: Suppress profiling when building this diff --git a/sysdeps/arm/memset.S b/sysdeps/arm/memset.S index 1e2699d077..b37451bc17 100644 --- a/sysdeps/arm/memset.S +++ b/sysdeps/arm/memset.S @@ -32,6 +32,7 @@ ENTRY(memset) subne r2, r2, #1 bne 1b + and r1, r1, #255 @ clear any sign bits orr r1, r1, r1, lsl $8 orr r1, r1, r1, lsl $16 From 4ce0c8e4c89cf14955d2115c05fcc19139f56153 Mon Sep 17 00:00:00 2001 From: Phil Blundell Date: Mon, 10 Oct 2005 15:09:14 +0000 Subject: [PATCH 3465/4487] 2005-10-10 Philip Blundell * sysdeps/arm/Makefile, sysdeps/arm/machine-gmon.h, sysdeps/arm/_mcount.S: Revert previous bogus changes. --- ChangeLog.arm | 5 +++++ sysdeps/arm/Makefile | 3 --- sysdeps/arm/_mcount.S | 30 ------------------------- sysdeps/arm/machine-gmon.h | 45 ++++++++++++++++++++++++++++++++++++-- 4 files changed, 48 insertions(+), 35 deletions(-) delete mode 100644 sysdeps/arm/Makefile delete mode 100644 sysdeps/arm/_mcount.S diff --git a/ChangeLog.arm b/ChangeLog.arm index 16156899fd..edb7517a60 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -3,6 +3,11 @@ * sysdeps/arm/memset.S (memset): Correct handling of negative arguments. +2005-10-10 Philip Blundell + + * sysdeps/arm/Makefile, sysdeps/arm/machine-gmon.h, + sysdeps/arm/_mcount.S: Revert previous bogus changes. + 2005-10-10 Philip Blundell * sysdeps/arm/_mcount.S: Suppress profiling when building this diff --git a/sysdeps/arm/Makefile b/sysdeps/arm/Makefile deleted file mode 100644 index cf18dedc45..0000000000 --- a/sysdeps/arm/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ifeq ($(subdir),gmon) -sysdep_routines += _mcount -endif diff --git a/sysdeps/arm/_mcount.S b/sysdeps/arm/_mcount.S deleted file mode 100644 index 795d999868..0000000000 --- a/sysdeps/arm/_mcount.S +++ /dev/null @@ -1,30 +0,0 @@ -/* Profiling entry point. ARM version. - Copyright (C) 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 - 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. */ - -#undef PROF - -#include - -ENTRY(_mcount) - stmfd sp!, {r0-r3, lr} - mov r0, lr - mov r1, ip - bl mcount_internal - ldmfd sp!, {r0-r3, pc} -END(_mcount) diff --git a/sysdeps/arm/machine-gmon.h b/sysdeps/arm/machine-gmon.h index 0af6b5ed45..fa3f65237d 100644 --- a/sysdeps/arm/machine-gmon.h +++ b/sysdeps/arm/machine-gmon.h @@ -20,7 +20,48 @@ /* GCC for the ARM cannot compile __builtin_return_address(N) for N != 0, so we must use an assembly stub. */ +#include +#ifndef NO_UNDERSCORES +/* The asm symbols for C functions are `_function'. + The canonical name for the counter function is `mcount', no _. */ +void _mcount (void) asm ("mcount"); +#else +/* The canonical name for the function is `_mcount' in both C and asm, + but some old asm code might assume it's `mcount'. */ +void _mcount (void); +weak_alias (_mcount, mcount) +#endif + +static void mcount_internal (u_long frompc, u_long selfpc) __attribute_used__; + #define _MCOUNT_DECL(frompc, selfpc) \ - void mcount_internal (u_long frompc, u_long selfpc) +static void mcount_internal (u_long frompc, u_long selfpc) + +/* This macro/func MUST save r0, r1 because the compiler inserts + blind calls to _mount(), ignoring the fact that _mcount may + clobber registers; therefore, _mcount may NOT clobber registers */ +/* if (this_fp!=0) { + r0 = this_fp + r1 = this_lr + r1 = [r1-4] which is caller's lr + if (r1!=0) + r1 = caller's lr + call mcount_internal(this_lr, caller's_lr) + } +*/ + +#define MCOUNT \ +void _mcount (void) \ +{ \ + __asm__("stmdb sp!, {r0, r1, r2, r3};" \ + "movs fp, fp;" \ + "moveq r1, #0;" \ + "ldrne r1, [fp, $-4];" \ + "ldrne r0, [fp, $-12];" \ + "movnes r0, r0;" \ + "ldrne r0, [r0, $-4];" \ + "movs r0, r0;" \ + "blne mcount_internal;" \ + "ldmia sp!, {r0, r1, r2, r3}"); \ +} -#define MCOUNT /* Nothing herel code in _mcount.S is used. */ From f10eff5832a482175932652149a25eb76cf88a29 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Mon, 10 Oct 2005 15:29:32 +0000 Subject: [PATCH 3466/4487] Add ARM EABI port. --- ChangeLog.arm | 59 +++ sysdeps/arm/dl-machine.h | 48 ++- sysdeps/arm/dl-sysdep.h | 24 ++ sysdeps/arm/eabi/Makefile | 22 ++ sysdeps/arm/eabi/Versions | 6 + sysdeps/arm/eabi/__longjmp.S | 85 +++++ sysdeps/arm/eabi/aeabi_assert.c | 27 ++ sysdeps/arm/eabi/aeabi_atexit.c | 28 ++ sysdeps/arm/eabi/aeabi_errno_addr.c | 26 ++ sysdeps/arm/eabi/aeabi_lcsts.c | 67 ++++ sysdeps/arm/eabi/aeabi_localeconv.c | 26 ++ sysdeps/arm/eabi/aeabi_math.c | 25 ++ sysdeps/arm/eabi/aeabi_mb_cur_max.c | 28 ++ sysdeps/arm/eabi/aeabi_memclr.c | 31 ++ sysdeps/arm/eabi/aeabi_memcpy.c | 32 ++ sysdeps/arm/eabi/aeabi_memmove.c | 32 ++ sysdeps/arm/eabi/aeabi_memset.c | 31 ++ sysdeps/arm/eabi/aeabi_sighandlers.S | 37 ++ sysdeps/arm/eabi/aeabi_unwind_cpp_pr1.c | 52 +++ sysdeps/arm/eabi/bits/fenv.h | 74 ++++ sysdeps/arm/eabi/bits/huge_val.h | 55 +++ sysdeps/arm/eabi/bits/setjmp.h | 45 +++ sysdeps/arm/eabi/fclrexcpt.c | 61 ++++ sysdeps/arm/eabi/fedisblxcpt.c | 51 +++ sysdeps/arm/eabi/feenablxcpt.c | 51 +++ sysdeps/arm/eabi/fegetenv.c | 51 +++ sysdeps/arm/eabi/fegetexcept.c | 43 +++ sysdeps/arm/eabi/fegetround.c | 43 +++ sysdeps/arm/eabi/feholdexcpt.c | 54 +++ sysdeps/arm/eabi/fesetenv.c | 57 +++ sysdeps/arm/eabi/fesetround.c | 57 +++ sysdeps/arm/eabi/find_exidx.c | 80 ++++ sysdeps/arm/eabi/fpu_control.h | 51 +++ sysdeps/arm/eabi/fraiseexcpt.c | 110 ++++++ sysdeps/arm/eabi/fsetexcptflg.c | 60 +++ sysdeps/arm/eabi/ftestexcept.c | 43 +++ sysdeps/arm/eabi/rtld-global-offsets.sym | 7 + sysdeps/arm/eabi/setfpucw.c | 47 +++ sysdeps/arm/eabi/setjmp.S | 85 +++++ sysdeps/arm/elf/start.S | 12 +- sysdeps/arm/fpu/feholdexcpt.c | 2 + sysdeps/arm/fpu/fesetround.c | 2 + sysdeps/arm/preconfigure | 13 +- sysdeps/arm/shlib-versions | 3 + sysdeps/unix/sysv/linux/arm/eabi/configure | 5 + sysdeps/unix/sysv/linux/arm/eabi/configure.in | 5 + sysdeps/unix/sysv/linux/arm/eabi/epoll_ctl.c | 37 ++ sysdeps/unix/sysv/linux/arm/eabi/epoll_wait.c | 54 +++ sysdeps/unix/sysv/linux/arm/eabi/fcntl.c | 229 ++++++++++++ sysdeps/unix/sysv/linux/arm/eabi/fstatfs64.c | 76 ++++ sysdeps/unix/sysv/linux/arm/eabi/fxstat64.c | 100 +++++ .../unix/sysv/linux/arm/eabi/kernel_epoll.h | 23 ++ .../unix/sysv/linux/arm/eabi/kernel_stat.h | 59 +++ sysdeps/unix/sysv/linux/arm/eabi/lockf64.c | 202 +++++++++++ sysdeps/unix/sysv/linux/arm/eabi/lxstat64.c | 99 +++++ .../unix/sysv/linux/arm/eabi/oldgetrlimit.c | 1 + .../unix/sysv/linux/arm/eabi/oldsetrlimit.c | 1 + sysdeps/unix/sysv/linux/arm/eabi/semop.c | 67 ++++ sysdeps/unix/sysv/linux/arm/eabi/semtimedop.c | 69 ++++ sysdeps/unix/sysv/linux/arm/eabi/statfs64.c | 77 ++++ .../unix/sysv/linux/arm/eabi/syscalls.list | 4 + sysdeps/unix/sysv/linux/arm/eabi/uname.c | 43 +++ sysdeps/unix/sysv/linux/arm/eabi/xstat64.c | 103 ++++++ sysdeps/unix/sysv/linux/arm/eabi/xstatconv.c | 341 ++++++++++++++++++ sysdeps/unix/sysv/linux/arm/eabi/xstatconv.h | 28 ++ sysdeps/unix/sysv/linux/arm/mmap64.S | 30 +- 66 files changed, 3474 insertions(+), 22 deletions(-) create mode 100644 sysdeps/arm/dl-sysdep.h create mode 100644 sysdeps/arm/eabi/Makefile create mode 100644 sysdeps/arm/eabi/Versions create mode 100644 sysdeps/arm/eabi/__longjmp.S create mode 100644 sysdeps/arm/eabi/aeabi_assert.c create mode 100644 sysdeps/arm/eabi/aeabi_atexit.c create mode 100644 sysdeps/arm/eabi/aeabi_errno_addr.c create mode 100644 sysdeps/arm/eabi/aeabi_lcsts.c create mode 100644 sysdeps/arm/eabi/aeabi_localeconv.c create mode 100644 sysdeps/arm/eabi/aeabi_math.c create mode 100644 sysdeps/arm/eabi/aeabi_mb_cur_max.c create mode 100644 sysdeps/arm/eabi/aeabi_memclr.c create mode 100644 sysdeps/arm/eabi/aeabi_memcpy.c create mode 100644 sysdeps/arm/eabi/aeabi_memmove.c create mode 100644 sysdeps/arm/eabi/aeabi_memset.c create mode 100644 sysdeps/arm/eabi/aeabi_sighandlers.S create mode 100644 sysdeps/arm/eabi/aeabi_unwind_cpp_pr1.c create mode 100644 sysdeps/arm/eabi/bits/fenv.h create mode 100644 sysdeps/arm/eabi/bits/huge_val.h create mode 100644 sysdeps/arm/eabi/bits/setjmp.h create mode 100644 sysdeps/arm/eabi/fclrexcpt.c create mode 100644 sysdeps/arm/eabi/fedisblxcpt.c create mode 100644 sysdeps/arm/eabi/feenablxcpt.c create mode 100644 sysdeps/arm/eabi/fegetenv.c create mode 100644 sysdeps/arm/eabi/fegetexcept.c create mode 100644 sysdeps/arm/eabi/fegetround.c create mode 100644 sysdeps/arm/eabi/feholdexcpt.c create mode 100644 sysdeps/arm/eabi/fesetenv.c create mode 100644 sysdeps/arm/eabi/fesetround.c create mode 100644 sysdeps/arm/eabi/find_exidx.c create mode 100644 sysdeps/arm/eabi/fpu_control.h create mode 100644 sysdeps/arm/eabi/fraiseexcpt.c create mode 100644 sysdeps/arm/eabi/fsetexcptflg.c create mode 100644 sysdeps/arm/eabi/ftestexcept.c create mode 100644 sysdeps/arm/eabi/rtld-global-offsets.sym create mode 100644 sysdeps/arm/eabi/setfpucw.c create mode 100644 sysdeps/arm/eabi/setjmp.S create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/configure create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/configure.in create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/epoll_ctl.c create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/epoll_wait.c create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/fcntl.c create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/fstatfs64.c create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/fxstat64.c create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/kernel_epoll.h create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/kernel_stat.h create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/lockf64.c create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/lxstat64.c create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/oldgetrlimit.c create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/oldsetrlimit.c create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/semop.c create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/semtimedop.c create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/statfs64.c create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/syscalls.list create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/uname.c create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/xstat64.c create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/xstatconv.c create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/xstatconv.h diff --git a/ChangeLog.arm b/ChangeLog.arm index edb7517a60..35119cacd3 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,62 @@ +2005-10-10 Daniel Jacobowitz + + * sysdeps/arm/dl-machine.h (_dl_start_user): Preserve eight-byte + stack alignment. + + * sysdeps/arm/elf/start.S (_start): Add unwind markers for EABI + targets. + + * sysdeps/arm/preconfigure: Set machine for EABI targets. Remove + obsolete Thumb support. + + * sysdeps/arm/shlib-versions: Add EABI support. + + * sysdeps/unix/sysv/linux/arm/mmap64.S (__mmap64): Allow for padding + in the argument list for EABI targets. + + * sysdeps/arm/fpu/feholdexcpt.c, sysdeps/arm/fpu/fesetround.c: Add + libm_hidden_def. + + * sysdeps/arm/dl-sysdep.h, sysdeps/arm/eabi/Makefile, + sysdeps/arm/eabi/Versions, sysdeps/arm/eabi/__longjmp.S, + sysdeps/arm/eabi/aeabi_assert.c, sysdeps/arm/eabi/aeabi_atexit.c, + sysdeps/arm/eabi/aeabi_errno_addr.c, sysdeps/arm/eabi/aeabi_lcsts.c, + sysdeps/arm/eabi/aeabi_localeconv.c, sysdeps/arm/eabi/aeabi_math.c, + sysdeps/arm/eabi/aeabi_mb_cur_max.c, sysdeps/arm/eabi/aeabi_memclr.c, + sysdeps/arm/eabi/aeabi_memcpy.c, sysdeps/arm/eabi/aeabi_memmove.c + sysdeps/arm/eabi/aeabi_memset.c, sysdeps/arm/eabi/aeabi_sighandlers.S, + sysdeps/arm/eabi/aeabi_unwind_cpp_pr1.c, sysdeps/arm/eabi/bits/fenv.h, + sysdeps/arm/eabi/bits/huge_val.h, sysdeps/arm/eabi/bits/setjmp.h, + sysdeps/arm/eabi/fclrexcpt.c, sysdeps/arm/eabi/fedisblxcpt.c, + sysdeps/arm/eabi/feenablxcpt.c, sysdeps/arm/eabi/fegetenv.c, + sysdeps/arm/eabi/fegetexcept.c, sysdeps/arm/eabi/fegetround.c, + sysdeps/arm/eabi/feholdexcpt.c, sysdeps/arm/eabi/fesetenv.c, + sysdeps/arm/eabi/fesetround.c, sysdeps/arm/eabi/find_exidx.c, + sysdeps/arm/eabi/fpu_control.h, sysdeps/arm/eabi/fraiseexcpt.c, + sysdeps/arm/eabi/fsetexcptflg.c, sysdeps/arm/eabi/ftestexcept.c, + sysdeps/arm/eabi/setjmp.S, sysdeps/unix/sysv/linux/arm/eabi/configure, + sysdeps/arm/eabi/rtld-global-offsets.sym, sysdeps/arm/eabi/setfpucw.c, + sysdeps/unix/sysv/linux/arm/eabi/configure.in, + sysdeps/unix/sysv/linux/arm/eabi/epoll_ctl.c, + sysdeps/unix/sysv/linux/arm/eabi/epoll_wait.c, + sysdeps/unix/sysv/linux/arm/eabi/fcntl.c, + sysdeps/unix/sysv/linux/arm/eabi/fstatfs64.c, + sysdeps/unix/sysv/linux/arm/eabi/fxstat64.c, + sysdeps/unix/sysv/linux/arm/eabi/kernel_epoll.h, + sysdeps/unix/sysv/linux/arm/eabi/kernel_stat.h, + sysdeps/unix/sysv/linux/arm/eabi/lockf64.c, + sysdeps/unix/sysv/linux/arm/eabi/lxstat64.c, + sysdeps/unix/sysv/linux/arm/eabi/oldgetrlimit.c, + sysdeps/unix/sysv/linux/arm/eabi/oldsetrlimit.c, + sysdeps/unix/sysv/linux/arm/eabi/semop.c, + sysdeps/unix/sysv/linux/arm/eabi/semtimedop.c, + sysdeps/unix/sysv/linux/arm/eabi/statfs64.c, + sysdeps/unix/sysv/linux/arm/eabi/syscalls.list, + sysdeps/unix/sysv/linux/arm/eabi/uname.c, + sysdeps/unix/sysv/linux/arm/eabi/xstat64.c, + sysdeps/unix/sysv/linux/arm/eabi/xstatconv.c, + sysdeps/unix/sysv/linux/arm/eabi/xstatconv.h: New files. + 2005-10-10 Daniel Jacobowitz * sysdeps/arm/memset.S (memset): Correct handling of negative diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 2534be151e..8011706580 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -157,22 +157,19 @@ _dl_start_user:\n\ add sl, pc, sl\n\ .L_GOT_GOT:\n\ ldr r4, [sl, r4]\n\ - @ get the original arg count\n\ - ldr r1, [sp]\n\ @ save the entry point in another register\n\ mov r6, r0\n\ - @ adjust the stack pointer to skip the extra args\n\ - add sp, sp, r4, lsl #2\n\ - @ subtract _dl_skip_args from original arg count\n\ - sub r1, r1, r4\n\ + @ get the original arg count\n\ + ldr r1, [sp]\n\ @ get the argv address\n\ add r2, sp, #4\n\ - @ store the new argc in the new stack location\n\ - str r1, [sp]\n\ + @ Fix up the stack if necessary.\n\ + cmp r4, #0\n\ + bne .L_fixup_stack\n\ +.L_done_fixup:\n\ @ compute envp\n\ add r3, r2, r1, lsl #2\n\ add r3, r3, #4\n\ -\n\ @ now we call _dl_init\n\ ldr r0, .L_LOADED\n\ ldr r0, [sl, r0]\n\ @@ -183,12 +180,45 @@ _dl_start_user:\n\ add r0, sl, r0\n\ @ jump to the user_s entry point\n\ " BX(r6) "\n\ +\n\ + @ iWMMXt and EABI targets require the stack to be eight byte\n\ + @ aligned - shuffle arguments etc.\n\ +.L_fixup_stack:\n\ + @ subtract _dl_skip_args from original arg count\n\ + sub r1, r1, r4\n\ + @ store the new argc in the new stack location\n\ + str r1, [sp]\n\ + @ find the first unskipped argument\n\ + mov r3, r2\n\ + add r4, r2, r4, lsl #2\n\ + @ shuffle argv down\n\ +1: ldr r5, [r4], #4\n\ + str r5, [r3], #4\n\ + cmp r5, #0\n\ + bne 1b\n\ + @ shuffle envp down\n\ +1: ldr r5, [r4], #4\n\ + str r5, [r3], #4\n\ + cmp r5, #0\n\ + bne 1b\n\ + @ shuffle auxv down\n\ +1: ldmia r4!, {r0, r5}\n\ + stmia r3!, {r0, r5}\n\ + cmp r0, #0\n\ + bne 1b\n\ + @ Update _dl_argv\n\ + ldr r3, .L_ARGV\n\ + str r2, [sl, r3]\n\ + b .L_done_fixup\n\ +\n\ .L_GET_GOT:\n\ .word _GLOBAL_OFFSET_TABLE_ - .L_GOT_GOT - 4\n\ .L_SKIP_ARGS:\n\ .word _dl_skip_args(GOTOFF)\n\ .L_FINI_PROC:\n\ .word _dl_fini(GOTOFF)\n\ +.L_ARGV:\n\ + .word _dl_argv(GOTOFF)\n\ .L_LOADED:\n\ .word _rtld_local(GOTOFF)\n\ .previous\n\ diff --git a/sysdeps/arm/dl-sysdep.h b/sysdeps/arm/dl-sysdep.h new file mode 100644 index 0000000000..cd678f4e43 --- /dev/null +++ b/sysdeps/arm/dl-sysdep.h @@ -0,0 +1,24 @@ +/* System-specific settings for dynamic linker code. Alpha version. + Copyright (C) 2002, 2003, 2004, 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 + 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. */ + +#include_next + +/* _dl_argv cannot be attribute_relro, because _dl_start_user + might write into it after _dl_start returns. */ +#define DL_ARGV_NOT_RELRO 1 diff --git a/sysdeps/arm/eabi/Makefile b/sysdeps/arm/eabi/Makefile new file mode 100644 index 0000000000..34b0027e35 --- /dev/null +++ b/sysdeps/arm/eabi/Makefile @@ -0,0 +1,22 @@ +ifeq ($(subdir),csu) +aeabi_constants = aeabi_lcsts aeabi_sighandlers aeabi_math +aeabi_routines = aeabi_assert aeabi_localeconv aeabi_errno_addr \ + aeabi_mb_cur_max aeabi_atexit aeabi_memclr aeabi_memcpy \ + aeabi_memmove aeabi_memset + +sysdep_routines += $(aeabi_constants) $(aeabi_routines) +static-only-routines += $(aeabi_constants) $(aeabi_routines) + +# get offset to rtld_global._dl_hwcap +gen-as-const-headers += rtld-global-offsets.sym +endif + +ifeq ($(subdir),elf) +sysdep_routines += aeabi_unwind_cpp_pr1 find_exidx +shared-only-routines += aeabi_unwind_cpp_pr1 +sysdep-rtld-routines += aeabi_unwind_cpp_pr1 +endif + +ifeq ($(subdir),math) +$(objpfx)libm.so: $(elfobjdir)/ld.so +endif diff --git a/sysdeps/arm/eabi/Versions b/sysdeps/arm/eabi/Versions new file mode 100644 index 0000000000..6d7a73421a --- /dev/null +++ b/sysdeps/arm/eabi/Versions @@ -0,0 +1,6 @@ +libc { + GLIBC_2.4 { + # Helper routines + __gnu_Unwind_Find_exidx; + } +} diff --git a/sysdeps/arm/eabi/__longjmp.S b/sysdeps/arm/eabi/__longjmp.S new file mode 100644 index 0000000000..56776338a0 --- /dev/null +++ b/sysdeps/arm/eabi/__longjmp.S @@ -0,0 +1,85 @@ +/* longjmp for ARM. + Copyright (C) 1997, 1998, 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 + 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 General Public License + along with GCC; see the file COPYING. If not, write to the Free + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. */ + +#include +#define _SETJMP_H +#define _ASM +#include +#define __ASSEMBLY__ +#include +#include + +/* __longjmp(jmpbuf, val) */ + +ENTRY (__longjmp) + mov ip, r0 + movs r0, r1 /* get the return value in place */ + moveq r0, #1 /* can't let setjmp() return zero! */ + + LOADREGS(ia, ip!, {v1-v6, sl, fp, sp, lr}) + +#ifdef IS_IN_rtld + ldr a2, 1f + ldr a3, Lrtld_local_ro +0: add a2, pc, a2 + add a2, a2, a3 + ldr a2, [a2, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET] +#else +#ifdef PIC + ldr a2, 1f + ldr a3, Lrtld_global_ro +0: add a2, pc, a2 + ldr a2, [a2, a3] + ldr a2, [a2, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET] +#else + ldr a2, Lhwcap + ldr a2, [a2, #0] +#endif +#endif + + tst a2, #HWCAP_VFP + beq Lno_vfp + + /* Restore the VFP registers. */ + /* Following instruction is fldmiax ip!, {d8-d15}. */ + ldc p11, cr8, [r12], #68 + /* Restore the floating-point status register. */ + ldr r1, [ip], #4 + /* Following instruction is fmxr fpscr, r1. */ + mcr p10, 7, r1, cr1, cr0, 0 +Lno_vfp: + + DO_RET(lr) + +#ifdef IS_IN_rtld +1: .long _GLOBAL_OFFSET_TABLE_ - 0b - 8 +Lrtld_local_ro: + .long C_SYMBOL_NAME(_rtld_local_ro)(GOTOFF) +#else +#ifdef PIC +1: .long _GLOBAL_OFFSET_TABLE_ - 0b - 8 +Lrtld_global_ro: + .long C_SYMBOL_NAME(_rtld_global_ro)(GOT) +#else +Lhwcap: + .long C_SYMBOL_NAME(_dl_hwcap) +#endif +#endif + +END (__longjmp) diff --git a/sysdeps/arm/eabi/aeabi_assert.c b/sysdeps/arm/eabi/aeabi_assert.c new file mode 100644 index 0000000000..ccedbe609b --- /dev/null +++ b/sysdeps/arm/eabi/aeabi_assert.c @@ -0,0 +1,27 @@ +/* Copyright (C) 2004 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. */ + +#include +#include + +void attribute_hidden +__aeabi_assert (const char *assertion, const char *file, + unsigned int line) +{ + __assert_fail (assertion, file, line, NULL); +} diff --git a/sysdeps/arm/eabi/aeabi_atexit.c b/sysdeps/arm/eabi/aeabi_atexit.c new file mode 100644 index 0000000000..b12cda48e2 --- /dev/null +++ b/sysdeps/arm/eabi/aeabi_atexit.c @@ -0,0 +1,28 @@ +/* Copyright (C) 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 + 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. */ + +#include + +/* Register a function to be called by exit or when a shared library + is unloaded. This routine is like __cxa_atexit, but uses the + calling sequence required by the ARM EABI. */ +int attribute_hidden +__aeabi_atexit (void *arg, void (*func) (void *), void *d) +{ + return __cxa_atexit (func, arg, d); +} diff --git a/sysdeps/arm/eabi/aeabi_errno_addr.c b/sysdeps/arm/eabi/aeabi_errno_addr.c new file mode 100644 index 0000000000..748edd3ba1 --- /dev/null +++ b/sysdeps/arm/eabi/aeabi_errno_addr.c @@ -0,0 +1,26 @@ +/* Copyright (C) 2004 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. */ + +#include + +attribute_hidden +volatile int * +__aeabi_errno_addr (void) +{ + return &errno; +} diff --git a/sysdeps/arm/eabi/aeabi_lcsts.c b/sysdeps/arm/eabi/aeabi_lcsts.c new file mode 100644 index 0000000000..6ca2ea33a4 --- /dev/null +++ b/sysdeps/arm/eabi/aeabi_lcsts.c @@ -0,0 +1,67 @@ +/* Link-time constants for ARM EABI. + Copyright (C) 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 + 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. */ + +/* The ARM EABI requires that we provide ISO compile-time constants as + link-time constants. Some portable applications may reference these. */ + +#include +#include +#include +#include +#include +#include +#include + +#define eabi_constant2(X,Y) const int __aeabi_##X attribute_hidden = Y +#define eabi_constant(X) const int __aeabi_##X attribute_hidden = X + +eabi_constant (EDOM); +eabi_constant (ERANGE); +eabi_constant (EILSEQ); + +eabi_constant (MB_LEN_MAX); + +eabi_constant (LC_COLLATE); +eabi_constant (LC_CTYPE); +eabi_constant (LC_MONETARY); +eabi_constant (LC_NUMERIC); +eabi_constant (LC_TIME); +eabi_constant (LC_ALL); + +/* The value of __aeabi_JMP_BUF_SIZE is the number of doublewords in a + jmp_buf. */ +eabi_constant2 (JMP_BUF_SIZE, sizeof (jmp_buf) / 8); + +eabi_constant (SIGABRT); +eabi_constant (SIGFPE); +eabi_constant (SIGILL); +eabi_constant (SIGINT); +eabi_constant (SIGSEGV); +eabi_constant (SIGTERM); + +eabi_constant2 (IOFBF, _IOFBF); +eabi_constant2 (IOLBF, _IOLBF); +eabi_constant2 (IONBF, _IONBF); +eabi_constant (BUFSIZ); +eabi_constant (FOPEN_MAX); +eabi_constant (TMP_MAX); +eabi_constant (FILENAME_MAX); +eabi_constant (L_tmpnam); + +eabi_constant (CLOCKS_PER_SEC); diff --git a/sysdeps/arm/eabi/aeabi_localeconv.c b/sysdeps/arm/eabi/aeabi_localeconv.c new file mode 100644 index 0000000000..2dd82df218 --- /dev/null +++ b/sysdeps/arm/eabi/aeabi_localeconv.c @@ -0,0 +1,26 @@ +/* Copyright (C) 2004 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. */ + +#include + +attribute_hidden +struct lconv * +__aeabi_localeconv (void) +{ + return localeconv (); +} diff --git a/sysdeps/arm/eabi/aeabi_math.c b/sysdeps/arm/eabi/aeabi_math.c new file mode 100644 index 0000000000..b33330d735 --- /dev/null +++ b/sysdeps/arm/eabi/aeabi_math.c @@ -0,0 +1,25 @@ +/* Copyright (C) 2004 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. */ + +#include + +const double __aeabi_HUGE_VAL attribute_hidden = HUGE_VAL; +const long double __aeabi_HUGE_VALL attribute_hidden = HUGE_VALL; +const float __aeabi_HUGE_VALF attribute_hidden = HUGE_VALF; +const float __aeabi_INFINITY attribute_hidden = INFINITY; +const float __aeabi_NAN attribute_hidden = NAN; diff --git a/sysdeps/arm/eabi/aeabi_mb_cur_max.c b/sysdeps/arm/eabi/aeabi_mb_cur_max.c new file mode 100644 index 0000000000..62e4c4bba0 --- /dev/null +++ b/sysdeps/arm/eabi/aeabi_mb_cur_max.c @@ -0,0 +1,28 @@ +/* Copyright (C) 2004 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. */ + +#include +#include +#include +#include + +int attribute_hidden +__aeabi_MB_CUR_MAX (void) +{ + return MB_CUR_MAX; +} diff --git a/sysdeps/arm/eabi/aeabi_memclr.c b/sysdeps/arm/eabi/aeabi_memclr.c new file mode 100644 index 0000000000..8add8afcea --- /dev/null +++ b/sysdeps/arm/eabi/aeabi_memclr.c @@ -0,0 +1,31 @@ +/* Copyright (C) 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 + 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. */ + +#include + +/* Clear memory. Can't alias to bzero because it's not defined in the + same translation unit. */ +void attribute_hidden +__aeabi_memclr (void *dest, size_t n) +{ + __bzero (dest, n); +} + +/* Versions of the above which may assume memory alignment. */ +strong_alias (__aeabi_memclr, attribute_hidden __aeabi_memclr4) +strong_alias (__aeabi_memclr, attribute_hidden __aeabi_memclr8) diff --git a/sysdeps/arm/eabi/aeabi_memcpy.c b/sysdeps/arm/eabi/aeabi_memcpy.c new file mode 100644 index 0000000000..d7cd40313e --- /dev/null +++ b/sysdeps/arm/eabi/aeabi_memcpy.c @@ -0,0 +1,32 @@ +/* Copyright (C) 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 + 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. */ + +#include + +/* Copy memory like memcpy, but no return value required. Can't alias + to memcpy because it's not defined in the same translation + unit. */ +void attribute_hidden +__aeabi_memcpy (void *dest, const void *src, size_t n) +{ + memcpy (dest, src, n); +} + +/* Versions of the above which may assume memory alignment. */ +strong_alias (__aeabi_memcpy, attribute_hidden __aeabi_memcpy4) +strong_alias (__aeabi_memcpy, attribute_hidden __aeabi_memcpy8) diff --git a/sysdeps/arm/eabi/aeabi_memmove.c b/sysdeps/arm/eabi/aeabi_memmove.c new file mode 100644 index 0000000000..32ed3b1383 --- /dev/null +++ b/sysdeps/arm/eabi/aeabi_memmove.c @@ -0,0 +1,32 @@ +/* Copyright (C) 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 + 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. */ + +#include + +/* Copy memory like memmove, but no return value required. Can't + alias to memmove because it's not defined in the same translation + unit. */ +void attribute_hidden +__aeabi_memmove (void *dest, const void *src, size_t n) +{ + memmove (dest, src, n); +} + +/* Versions of the above which may assume memory alignment. */ +strong_alias (__aeabi_memmove, attribute_hidden __aeabi_memmove4) +strong_alias (__aeabi_memmove, attribute_hidden __aeabi_memmove8) diff --git a/sysdeps/arm/eabi/aeabi_memset.c b/sysdeps/arm/eabi/aeabi_memset.c new file mode 100644 index 0000000000..d7232af398 --- /dev/null +++ b/sysdeps/arm/eabi/aeabi_memset.c @@ -0,0 +1,31 @@ +/* Copyright (C) 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 + 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. */ + +#include + +/* Set memory like memset, but different argument order and no return + value required. */ +void attribute_hidden +__aeabi_memset (void *dest, size_t n, int c) +{ + memset (dest, c, n); +} + +/* Versions of the above which may assume memory alignment. */ +strong_alias (__aeabi_memset, attribute_hidden __aeabi_memset4) +strong_alias (__aeabi_memset, attribute_hidden __aeabi_memset8) diff --git a/sysdeps/arm/eabi/aeabi_sighandlers.S b/sysdeps/arm/eabi/aeabi_sighandlers.S new file mode 100644 index 0000000000..586ba88f5c --- /dev/null +++ b/sysdeps/arm/eabi/aeabi_sighandlers.S @@ -0,0 +1,37 @@ +/* Link-time constants for ARM EABI - signal handlers. + Copyright (C) 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 + 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. */ + +/* The ARM EABI defines these as "functions". */ + +#include + + .global __aeabi_SIG_DFL + .hidden __aeabi_SIG_DFL + .type __aeabi_SIG_DFL, %function + .set __aeabi_SIG_DFL, 0 + + .global __aeabi_SIG_IGN + .hidden __aeabi_SIG_IGN + .type __aeabi_SIG_IGN, %function + .set __aeabi_SIG_IGN, 1 + + .global __aeabi_SIG_ERR + .hidden __aeabi_SIG_ERR + .type __aeabi_SIG_ERR, %function + .set __aeabi_SIG_ERR, -1 diff --git a/sysdeps/arm/eabi/aeabi_unwind_cpp_pr1.c b/sysdeps/arm/eabi/aeabi_unwind_cpp_pr1.c new file mode 100644 index 0000000000..91df013ad4 --- /dev/null +++ b/sysdeps/arm/eabi/aeabi_unwind_cpp_pr1.c @@ -0,0 +1,52 @@ +/* Copyright (C) 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 + 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. */ + +/* Because some objects in ld.so and libc.so are built with + -fexceptions, we end up with references to this personality + routine. However, these libraries are not linked against + libgcc_eh.a, so we need a dummy definition. This routine will + never actually be called. */ + +#include + +attribute_hidden +void +__aeabi_unwind_cpp_pr0 (void) +{ +#ifndef IS_IN_rtld + abort (); +#endif +} + +attribute_hidden +void +__aeabi_unwind_cpp_pr1 (void) +{ +#ifndef IS_IN_rtld + abort (); +#endif +} + +attribute_hidden +void +__aeabi_unwind_cpp_pr2 (void) +{ +#ifndef IS_IN_rtld + abort (); +#endif +} diff --git a/sysdeps/arm/eabi/bits/fenv.h b/sysdeps/arm/eabi/bits/fenv.h new file mode 100644 index 0000000000..49e386222d --- /dev/null +++ b/sysdeps/arm/eabi/bits/fenv.h @@ -0,0 +1,74 @@ +/* Copyright (C) 2004, 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 + 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 General Public License + along with GCC; see the file COPYING. If not, write to the Free + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. */ + +#ifndef _FENV_H +# error "Never use directly; include instead." +#endif + +/* Define bits representing exceptions in the FPU status word. */ +enum + { + FE_INVALID = 1, +#define FE_INVALID FE_INVALID + FE_DIVBYZERO = 2, +#define FE_DIVBYZERO FE_DIVBYZERO + FE_OVERFLOW = 4, +#define FE_OVERFLOW FE_OVERFLOW + FE_UNDERFLOW = 8, +#define FE_UNDERFLOW FE_UNDERFLOW + FE_INEXACT = 16, +#define FE_INEXACT FE_INEXACT + }; + +/* Amount to shift by to convert an exception to a mask bit. */ +#define FE_EXCEPT_SHIFT 8 + +/* All supported exceptions. */ +#define FE_ALL_EXCEPT \ + (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT) + +/* VFP supports all of the four defined rounding modes. */ +enum + { + FE_TONEAREST = 0, +#define FE_TONEAREST FE_TONEAREST + FE_UPWARD = 0x400000, +#define FE_UPWARD FE_UPWARD + FE_DOWNWARD = 0x800000, +#define FE_DOWNWARD FE_DOWNWARD + FE_TOWARDZERO = 0xc00000 +#define FE_TOWARDZERO FE_TOWARDZERO + }; + +/* Type representing exception flags. */ +typedef unsigned int fexcept_t; + +/* Type representing floating-point environment. */ +typedef struct + { + unsigned int __cw; + } +fenv_t; + +/* If the default argument is used we use this value. */ +#define FE_DFL_ENV ((fenv_t *) -1l) + +#ifdef __USE_GNU +/* Floating-point environment where none of the exceptions are masked. */ +# define FE_NOMASK_ENV ((__const fenv_t *) -2) +#endif diff --git a/sysdeps/arm/eabi/bits/huge_val.h b/sysdeps/arm/eabi/bits/huge_val.h new file mode 100644 index 0000000000..11ca11f18e --- /dev/null +++ b/sysdeps/arm/eabi/bits/huge_val.h @@ -0,0 +1,55 @@ +/* `HUGE_VAL' constant for IEEE 754 machines (where it is infinity). + Used by and functions for overflow. + Copyright (C) 1992, 1995, 1996, 1997, 1999, 2000, 2004 + 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 _MATH_H +# error "Never use directly; include instead." +#endif + +/* IEEE positive infinity (-HUGE_VAL is negative infinity). */ + +#if __GNUC_PREREQ(3,3) +# define HUGE_VAL (__builtin_huge_val()) +#elif __GNUC_PREREQ(2,96) +# define HUGE_VAL (__extension__ 0x1.0p2047) +#elif defined __GNUC__ + +# define HUGE_VAL \ + (__extension__ \ + ((union { unsigned __l __attribute__((__mode__(__DI__))); double __d; }) \ + { __l: 0x7ff0000000000000ULL }).__d) + +#else /* not GCC */ + +# include + +typedef union { unsigned char __c[8]; double __d; } __huge_val_t; + +# if __BYTE_ORDER == __BIG_ENDIAN +# define __HUGE_VAL_bytes { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 } +# endif +# if __BYTE_ORDER == __LITTLE_ENDIAN +# define __HUGE_VAL_bytes { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f } +# endif + +static __huge_val_t __huge_val = { __HUGE_VAL_bytes }; +# define HUGE_VAL (__huge_val.__d) + +#endif /* GCC. */ diff --git a/sysdeps/arm/eabi/bits/setjmp.h b/sysdeps/arm/eabi/bits/setjmp.h new file mode 100644 index 0000000000..3bb92dd727 --- /dev/null +++ b/sysdeps/arm/eabi/bits/setjmp.h @@ -0,0 +1,45 @@ +/* Copyright (C) 2004 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. */ + +/* Define the machine-dependent type `jmp_buf'. ARM EABI version. */ + +#ifndef _BITS_SETJMP_H +#define _BITS_SETJMP_H 1 + +#if !defined _SETJMP_H && !defined _PTHREAD_H +# error "Never include directly; use instead." +#endif + +#ifndef _ASM +/* The exact set of registers saved may depend on the particular core + in use, as some coprocessor registers may need to be saved. The C + Library ABI requires that the buffer be 8-byte aligned, and + recommends that the buffer contain 64 words. The first 28 words + are occupied by v1-v6, sl, fp, sp, pc, d8-d15, and fpscr. (Note + that d8-15 require 17 words, due to the use of fstmx.) */ +typedef int __jmp_buf[64] __attribute__((aligned (8))); +#endif + +#define __JMP_BUF_SP 8 + +/* Test if longjmp to JMPBUF would unwind the frame + containing a local variable at ADDRESS. */ +#define _JMPBUF_UNWINDS(jmpbuf, address) \ + ((void *) (address) < (void *) (jmpbuf[__JMP_BUF_SP])) + +#endif diff --git a/sysdeps/arm/eabi/fclrexcpt.c b/sysdeps/arm/eabi/fclrexcpt.c new file mode 100644 index 0000000000..6e5d242805 --- /dev/null +++ b/sysdeps/arm/eabi/fclrexcpt.c @@ -0,0 +1,61 @@ +/* Clear given exceptions in current floating-point environment. + Copyright (C) 1997,98,99,2000,01,05 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 General Public License + along with GCC; see the file COPYING. If not, write to the Free + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. */ + +#include +#include + +#include +#include +#include +#include + +int +__feclearexcept (int excepts) +{ + if (GLRO (dl_hwcap) & HWCAP_VFP) + { + unsigned long int temp; + + /* Mask out unsupported bits/exceptions. */ + excepts &= FE_ALL_EXCEPT; + + /* Get the current floating point status. */ + _FPU_GETCW (temp); + + /* Clear the relevant bits. */ + temp = (temp & ~FE_ALL_EXCEPT) | (temp & FE_ALL_EXCEPT & ~excepts); + + /* Put the new data in effect. */ + _FPU_SETCW (temp); + + /* Success. */ + return 0; + } + + /* Unsupported, so fail. */ + return 1; +} + +#include +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) +strong_alias (__feclearexcept, __old_feclearexcept) +compat_symbol (libm, __old_feclearexcept, feclearexcept, GLIBC_2_1); +#endif + +versioned_symbol (libm, __feclearexcept, feclearexcept, GLIBC_2_2); diff --git a/sysdeps/arm/eabi/fedisblxcpt.c b/sysdeps/arm/eabi/fedisblxcpt.c new file mode 100644 index 0000000000..414d34b1e3 --- /dev/null +++ b/sysdeps/arm/eabi/fedisblxcpt.c @@ -0,0 +1,51 @@ +/* Disable floating-point exceptions. + Copyright (C) 2001, 2005 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Philip Blundell , 2001. + + 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 General Public License + along with GCC; see the file COPYING. If not, write to the Free + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. */ + +#include +#include + +#include +#include +#include +#include + +int +fedisableexcept (int excepts) +{ + if (GLRO (dl_hwcap) & HWCAP_VFP) + { + unsigned long int new_exc, old_exc; + + _FPU_GETCW(new_exc); + + old_exc = (new_exc >> FE_EXCEPT_SHIFT) & FE_ALL_EXCEPT; + + excepts &= FE_ALL_EXCEPT; + + new_exc &= ~(excepts << FE_EXCEPT_SHIFT); + + _FPU_SETCW(new_exc); + + return old_exc; + } + + /* Unsupported, so return -1 for failure. */ + return -1; +} diff --git a/sysdeps/arm/eabi/feenablxcpt.c b/sysdeps/arm/eabi/feenablxcpt.c new file mode 100644 index 0000000000..e104bc4f65 --- /dev/null +++ b/sysdeps/arm/eabi/feenablxcpt.c @@ -0,0 +1,51 @@ +/* Enable floating-point exceptions. + Copyright (C) 2001, 2005 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Philip Blundell , 2001. + + 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 General Public License + along with GCC; see the file COPYING. If not, write to the Free + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. */ + +#include +#include + +#include +#include +#include +#include + +int +feenableexcept (int excepts) +{ + if (GLRO (dl_hwcap) & HWCAP_VFP) + { + unsigned long int new_exc, old_exc; + + _FPU_GETCW(new_exc); + + old_exc = (new_exc >> FE_EXCEPT_SHIFT) & FE_ALL_EXCEPT; + + excepts &= FE_ALL_EXCEPT; + + new_exc |= (excepts << FE_EXCEPT_SHIFT); + + _FPU_SETCW(new_exc); + + return old_exc; + } + + /* Unsupported, so return -1 for failure. */ + return -1; +} diff --git a/sysdeps/arm/eabi/fegetenv.c b/sysdeps/arm/eabi/fegetenv.c new file mode 100644 index 0000000000..178d22a424 --- /dev/null +++ b/sysdeps/arm/eabi/fegetenv.c @@ -0,0 +1,51 @@ +/* Store current floating-point environment. + Copyright (C) 1997,98,99,2000,01,05 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 General Public License + along with GCC; see the file COPYING. If not, write to the Free + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. */ + +#include +#include + +#include +#include +#include +#include + +int +__fegetenv (fenv_t *envp) +{ + if (GLRO (dl_hwcap) & HWCAP_VFP) + { + unsigned long int temp; + _FPU_GETCW (temp); + envp->__cw = temp; + + /* Success. */ + return 0; + } + + /* Unsupported, so fail. */ + return 1; +} + +#include +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) +strong_alias (__fegetenv, __old_fegetenv) +compat_symbol (libm, __old_fegetenv, fegetenv, GLIBC_2_1); +#endif + +versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2); diff --git a/sysdeps/arm/eabi/fegetexcept.c b/sysdeps/arm/eabi/fegetexcept.c new file mode 100644 index 0000000000..811c8ae25a --- /dev/null +++ b/sysdeps/arm/eabi/fegetexcept.c @@ -0,0 +1,43 @@ +/* Get floating-point exceptions. + Copyright (C) 2001, 2005 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Philip Blundell , 2001 + + 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 General Public License + along with GCC; see the file COPYING. If not, write to the Free + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. */ + +#include +#include + +#include +#include +#include +#include + +int +fegetexcept (void) +{ + if (GLRO (dl_hwcap) & HWCAP_VFP) + { + unsigned long temp; + + _FPU_GETCW (temp); + + return (temp >> FE_EXCEPT_SHIFT) & FE_ALL_EXCEPT; + } + + /* Unsupported. Return all exceptions disabled. */ + return 0; +} diff --git a/sysdeps/arm/eabi/fegetround.c b/sysdeps/arm/eabi/fegetround.c new file mode 100644 index 0000000000..1c4be04e65 --- /dev/null +++ b/sysdeps/arm/eabi/fegetround.c @@ -0,0 +1,43 @@ +/* Return current rounding direction. + Copyright (C) 2004, 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 + 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 General Public License + along with GCC; see the file COPYING. If not, write to the Free + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. */ + +#include +#include + +#include +#include +#include +#include + +int +fegetround (void) +{ + if (GLRO (dl_hwcap) & HWCAP_VFP) + { + unsigned int temp; + + /* Get the current environment. */ + _FPU_GETCW (temp); + + return temp & FE_TOWARDZERO; + } + + /* The current soft-float implementation only handles TONEAREST. */ + return FE_TONEAREST; +} diff --git a/sysdeps/arm/eabi/feholdexcpt.c b/sysdeps/arm/eabi/feholdexcpt.c new file mode 100644 index 0000000000..9872ea17be --- /dev/null +++ b/sysdeps/arm/eabi/feholdexcpt.c @@ -0,0 +1,54 @@ +/* Store current floating-point environment and clear exceptions. + Copyright (C) 1997, 1998, 1999, 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 + 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 General Public License + along with GCC; see the file COPYING. If not, write to the Free + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. */ + +#include +#include + +#include +#include +#include +#include + +int +feholdexcept (fenv_t *envp) +{ + if (GLRO (dl_hwcap) & HWCAP_VFP) + { + unsigned long int temp; + + /* Store the environment. */ + _FPU_GETCW(temp); + envp->__cw = temp; + + /* Now set all exceptions to non-stop. */ + temp &= ~(FE_ALL_EXCEPT << FE_EXCEPT_SHIFT); + + /* And clear all exception flags. */ + temp &= ~FE_ALL_EXCEPT; + + _FPU_SETCW(temp); + + return 0; + } + + /* Unsupported, so fail. */ + return 1; +} + +libm_hidden_def (feholdexcept) diff --git a/sysdeps/arm/eabi/fesetenv.c b/sysdeps/arm/eabi/fesetenv.c new file mode 100644 index 0000000000..bf253848bc --- /dev/null +++ b/sysdeps/arm/eabi/fesetenv.c @@ -0,0 +1,57 @@ +/* Install given floating-point environment. + Copyright (C) 2004, 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 + 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 General Public License + along with GCC; see the file COPYING. If not, write to the Free + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. */ + +#include +#include + +#include +#include +#include +#include + +int +__fesetenv (const fenv_t *envp) +{ + if (GLRO (dl_hwcap) & HWCAP_VFP) + { + unsigned int temp; + + _FPU_GETCW (temp); + temp &= _FPU_RESERVED; + + if (envp == FE_DFL_ENV) + temp |= _FPU_DEFAULT; + else if (envp == FE_NOMASK_ENV) + temp |= _FPU_IEEE; + else + temp |= envp->__cw & ~_FPU_RESERVED; + + _FPU_SETCW (temp); + + /* Success. */ + return 0; + } + + /* Unsupported, so fail. */ + return 1; +} + +#include +libm_hidden_ver (__fesetenv, fesetenv) +versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2); diff --git a/sysdeps/arm/eabi/fesetround.c b/sysdeps/arm/eabi/fesetround.c new file mode 100644 index 0000000000..f6e20cb72d --- /dev/null +++ b/sysdeps/arm/eabi/fesetround.c @@ -0,0 +1,57 @@ +/* Set current rounding direction. + Copyright (C) 2004, 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 + 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 General Public License + along with GCC; see the file COPYING. If not, write to the Free + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. */ + +#include +#include + +#include +#include +#include +#include + +int +fesetround (int round) +{ + if (GLRO (dl_hwcap) & HWCAP_VFP) + { + fpu_control_t temp; + + switch (round) + { + case FE_TONEAREST: + case FE_UPWARD: + case FE_DOWNWARD: + case FE_TOWARDZERO: + _FPU_GETCW (temp); + temp = (temp & ~FE_TOWARDZERO) | round; + _FPU_SETCW (temp); + return 0; + default: + return 1; + } + } + else if (round == FE_TONEAREST) + /* This is the only supported rounding mode for soft-fp. */ + return 0; + + /* Unsupported, so fail. */ + return 1; +} + +libm_hidden_def (fesetround) diff --git a/sysdeps/arm/eabi/find_exidx.c b/sysdeps/arm/eabi/find_exidx.c new file mode 100644 index 0000000000..9e4f4012ff --- /dev/null +++ b/sysdeps/arm/eabi/find_exidx.c @@ -0,0 +1,80 @@ +/* Copyright (C) 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 + 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. */ + +#include +#include + +struct unw_eh_callback_data +{ + _Unwind_Ptr pc; + _Unwind_Ptr exidx_start; + int exidx_len; +}; + + +/* Callback to determins if the PC lies within an object, and remember the + location of the exception index table if it does. */ + +static int +find_exidx_callback (struct dl_phdr_info * info, size_t size, void * ptr) +{ + struct unw_eh_callback_data * data; + const ElfW(Phdr) *phdr; + int i; + int match; + _Unwind_Ptr load_base; + + data = (struct unw_eh_callback_data *) ptr; + load_base = info->dlpi_addr; + phdr = info->dlpi_phdr; + + match = 0; + for (i = info->dlpi_phnum; i > 0; i--, phdr++) + { + if (phdr->p_type == PT_LOAD) + { + _Unwind_Ptr vaddr = phdr->p_vaddr + load_base; + if (data->pc >= vaddr && data->pc < vaddr + phdr->p_memsz) + match = 1; + } + else if (phdr->p_type == PT_ARM_EXIDX) + { + data->exidx_start = (_Unwind_Ptr) (phdr->p_vaddr + load_base); + data->exidx_len = phdr->p_memsz; + } + } + + return match; +} + + +/* Find the exception index table containing PC. */ + +_Unwind_Ptr +__gnu_Unwind_Find_exidx (_Unwind_Ptr pc, int * pcount) +{ + struct unw_eh_callback_data data; + + data.pc = pc; + data.exidx_start = 0; + if (dl_iterate_phdr (find_exidx_callback, &data) <= 0) + return 0; + + *pcount = data.exidx_len / 8; + return data.exidx_start; +} diff --git a/sysdeps/arm/eabi/fpu_control.h b/sysdeps/arm/eabi/fpu_control.h new file mode 100644 index 0000000000..55d77649c3 --- /dev/null +++ b/sysdeps/arm/eabi/fpu_control.h @@ -0,0 +1,51 @@ +/* FPU control word definitions. ARM VFP version. + Copyright (C) 2004, 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 + 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 General Public License + along with GCC; see the file COPYING. If not, write to the Free + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. */ + +#ifndef _FPU_CONTROL_H +#define _FPU_CONTROL_H + +/* masking of interrupts */ +#define _FPU_MASK_IM 0x00000100 /* invalid operation */ +#define _FPU_MASK_ZM 0x00000200 /* divide by zero */ +#define _FPU_MASK_OM 0x00000400 /* overflow */ +#define _FPU_MASK_UM 0x00000800 /* underflow */ +#define _FPU_MASK_PM 0x00001000 /* inexact */ + +/* Some bits in the FPSCR are not yet defined. They must be preserved when + modifying the contents. */ +#define _FPU_RESERVED 0x0e08e0e0 +#define _FPU_DEFAULT 0x00000000 +/* Default + exceptions enabled. */ +#define _FPU_IEEE (_FPU_DEFAULT | 0x00001f00) + +/* Type of the control word. */ +typedef unsigned int fpu_control_t; + +/* Macros for accessing the hardware control word. */ +/* This is fmrx %0, fpscr. */ +#define _FPU_GETCW(cw) \ + __asm__ __volatile__ ("mrc p10, 7, %0, cr1, cr0, 0" : "=r" (cw)) +/* This is fmxr fpscr, %0. */ +#define _FPU_SETCW(cw) \ + __asm__ __volatile__ ("mcr p10, 7, %0, cr1, cr0, 0" : : "r" (cw)) + +/* Default control word set at startup. */ +extern fpu_control_t __fpu_control; + +#endif /* _FPU_CONTROL_H */ diff --git a/sysdeps/arm/eabi/fraiseexcpt.c b/sysdeps/arm/eabi/fraiseexcpt.c new file mode 100644 index 0000000000..c0ab419673 --- /dev/null +++ b/sysdeps/arm/eabi/fraiseexcpt.c @@ -0,0 +1,110 @@ +/* Raise given exceptions. + Copyright (C) 2004, 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 + 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 General Public License + along with GCC; see the file COPYING. If not, write to the Free + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. */ + +#include +#include +#include + +#include +#include +#include +#include + +int +feraiseexcept (int excepts) +{ + if (GLRO (dl_hwcap) & HWCAP_VFP) + { + int fpscr; + const float fp_zero = 0.0, fp_one = 1.0, fp_max = FLT_MAX, + fp_min = FLT_MIN, fp_1e32 = 1.0e32f, fp_two = 2.0, + fp_three = 3.0; + + /* Raise exceptions represented by EXPECTS. But we must raise only + one signal at a time. It is important that if the overflow/underflow + exception and the inexact exception are given at the same time, + the overflow/underflow exception follows the inexact exception. After + each exception we read from the fpscr, to force the exception to be + raised immediately. */ + + /* There are additional complications because this file may be compiled + without VFP support enabled, and we also can't assume that the + assembler has VFP instructions enabled. To get around this we use the + generic coprocessor mnemonics and avoid asking GCC to put float values + in VFP registers. */ + + /* First: invalid exception. */ + if (FE_INVALID & excepts) + __asm__ __volatile__ ( + "ldc p10, cr0, %1\n\t" /* flds s0, %1 */ + "cdp p10, 8, cr0, cr0, cr0, 0\n\t" /* fdivs s0, s0, s0 */ + "mrc p10, 7, %0, cr1, cr0, 0" : "=r" (fpscr) /* fmrx %0, fpscr */ + : "m" (fp_zero) + : "s0"); + + /* Next: division by zero. */ + if (FE_DIVBYZERO & excepts) + __asm__ __volatile__ ( + "ldc p10, cr0, %1\n\t" /* flds s0, %1 */ + "ldcl p10, cr0, %2\n\t" /* flds s1, %2 */ + "cdp p10, 8, cr0, cr0, cr0, 1\n\t" /* fdivs s0, s0, s1 */ + "mrc p10, 7, %0, cr1, cr0, 0" : "=r" (fpscr) /* fmrx %0, fpscr */ + : "m" (fp_one), "m" (fp_zero) + : "s0", "s1"); + + /* Next: overflow. */ + if (FE_OVERFLOW & excepts) + /* There's no way to raise overflow without also raising inexact. */ + __asm__ __volatile__ ( + "ldc p10, cr0, %1\n\t" /* flds s0, %1 */ + "ldcl p10, cr0, %2\n\t" /* flds s1, %2 */ + "cdp p10, 3, cr0, cr0, cr0, 1\n\t" /* fadds s0, s0, s1 */ + "mrc p10, 7, %0, cr1, cr0, 0" : "=r" (fpscr) /* fmrx %0, fpscr */ + : "m" (fp_max), "m" (fp_1e32) + : "s0", "s1"); + + /* Next: underflow. */ + if (FE_UNDERFLOW & excepts) + __asm__ __volatile__ ( + "ldc p10, cr0, %1\n\t" /* flds s0, %1 */ + "ldcl p10, cr0, %2\n\t" /* flds s1, %2 */ + "cdp p10, 8, cr0, cr0, cr0, 1\n\t" /* fdivs s0, s0, s1 */ + "mrc p10, 7, %0, cr1, cr0, 0" : "=r" (fpscr) /* fmrx %0, fpscr */ + : "m" (fp_min), "m" (fp_three) + : "s0", "s1"); + + /* Last: inexact. */ + if (FE_INEXACT & excepts) + __asm__ __volatile__ ( + "ldc p10, cr0, %1\n\t" /* flds s0, %1 */ + "ldcl p10, cr0, %2\n\t" /* flds s1, %2 */ + "cdp p10, 8, cr0, cr0, cr0, 1\n\t" /* fdivs s0, s0, s1 */ + "mrc p10, 7, %0, cr1, cr0, 0" : "=r" (fpscr) /* fmrx %0, fpscr */ + : "m" (fp_two), "m" (fp_three) + : "s0", "s1"); + + /* Success. */ + return 0; + } + + /* Unsupported, so fail. */ + return 1; +} + +libm_hidden_def (feraiseexcept) diff --git a/sysdeps/arm/eabi/fsetexcptflg.c b/sysdeps/arm/eabi/fsetexcptflg.c new file mode 100644 index 0000000000..e76d746196 --- /dev/null +++ b/sysdeps/arm/eabi/fsetexcptflg.c @@ -0,0 +1,60 @@ +/* Set floating-point environment exception handling. + Copyright (C) 1997,98,99,2000,01,05 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 General Public License + along with GCC; see the file COPYING. If not, write to the Free + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. */ + +#include +#include +#include + +#include +#include +#include +#include + +int +__fesetexceptflag (const fexcept_t *flagp, int excepts) +{ + if (GLRO (dl_hwcap) & HWCAP_VFP) + { + fexcept_t temp; + + /* Get the current environment. */ + _FPU_GETCW (temp); + + /* Set the desired exception mask. */ + temp &= ~((excepts & FE_ALL_EXCEPT) << FE_EXCEPT_SHIFT); + temp |= (*flagp & excepts & FE_ALL_EXCEPT) << FE_EXCEPT_SHIFT; + + /* Save state back to the FPU. */ + _FPU_SETCW (temp); + + /* Success. */ + return 0; + } + + /* Unsupported, so fail. */ + return 1; +} + +#include +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) +strong_alias (__fesetexceptflag, __old_fesetexceptflag) +compat_symbol (libm, __old_fesetexceptflag, fesetexceptflag, GLIBC_2_1); +#endif + +versioned_symbol (libm, __fesetexceptflag, fesetexceptflag, GLIBC_2_2); diff --git a/sysdeps/arm/eabi/ftestexcept.c b/sysdeps/arm/eabi/ftestexcept.c new file mode 100644 index 0000000000..230ccbdcec --- /dev/null +++ b/sysdeps/arm/eabi/ftestexcept.c @@ -0,0 +1,43 @@ +/* Test exception in current environment. + Copyright (C) 1997, 1998, 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 + 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 General Public License + along with GCC; see the file COPYING. If not, write to the Free + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. */ + +#include +#include + +#include +#include +#include +#include + +int +fetestexcept (int excepts) +{ + if (GLRO (dl_hwcap) & HWCAP_VFP) + { + fexcept_t temp; + + /* Get current exceptions. */ + _FPU_GETCW(temp); + + return temp & excepts & FE_ALL_EXCEPT; + } + + /* Unsupported, return 0. */ + return 0; +} diff --git a/sysdeps/arm/eabi/rtld-global-offsets.sym b/sysdeps/arm/eabi/rtld-global-offsets.sym new file mode 100644 index 0000000000..ff4e97f2a6 --- /dev/null +++ b/sysdeps/arm/eabi/rtld-global-offsets.sym @@ -0,0 +1,7 @@ +#define SHARED 1 + +#include + +#define rtld_global_ro_offsetof(mem) offsetof (struct rtld_global_ro, mem) + +RTLD_GLOBAL_RO_DL_HWCAP_OFFSET rtld_global_ro_offsetof (_dl_hwcap) diff --git a/sysdeps/arm/eabi/setfpucw.c b/sysdeps/arm/eabi/setfpucw.c new file mode 100644 index 0000000000..2bd1f55619 --- /dev/null +++ b/sysdeps/arm/eabi/setfpucw.c @@ -0,0 +1,47 @@ +/* Set the FPU control word. + Copyright (C) 1996, 1997, 1999, 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 + 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. */ + +#include +#include + +#include +#include +#include +#include + +void +__setfpucw (fpu_control_t set) +{ + if (GLRO (dl_hwcap) & HWCAP_VFP) + { + fpu_control_t cw; + + /* Fetch the current control word. */ + _FPU_GETCW (cw); + + /* Preserve the reserved bits, and set the rest as the user + specified (or the default, if the user gave zero). */ + cw &= _FPU_RESERVED; + cw |= set & ~_FPU_RESERVED; + + _FPU_SETCW (cw); + } + + /* Do nothing if a VFP unit isn't present. */ +} diff --git a/sysdeps/arm/eabi/setjmp.S b/sysdeps/arm/eabi/setjmp.S new file mode 100644 index 0000000000..d9ad26a916 --- /dev/null +++ b/sysdeps/arm/eabi/setjmp.S @@ -0,0 +1,85 @@ +/* setjmp for ARM. + Copyright (C) 1997, 1998, 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 + 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 General Public License + along with GCC; see the file COPYING. If not, write to the Free + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. */ + +#include +#define _SETJMP_H +#define _ASM +#include +#define __ASSEMBLY__ +#include +#include + +ENTRY (__sigsetjmp) + mov ip, r0 + + /* Save registers */ + stmia ip!, {v1-v6, sl, fp, sp, lr} + + /* Check if we have a VFP unit. */ +#ifdef IS_IN_rtld + ldr a3, 1f + ldr a4, Lrtld_local_ro +0: add a3, pc, a3 + add a3, a3, a4 + ldr a3, [a3, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET] +#else +#ifdef PIC + ldr a3, 1f + ldr a4, Lrtld_global_ro +0: add a3, pc, a3 + ldr a3, [a3, a4] + ldr a3, [a3, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET] +#else + ldr a3, Lhwcap + ldr a3, [a3, #0] +#endif +#endif + + tst a3, #HWCAP_VFP + beq Lno_vfp + + /* Store the VFP registers. */ + /* Following instruction is fstmiax ip!, {d8-d15}. */ + stc p11, cr8, [r12], #68 + /* Store the floating-point status register. */ + /* Following instruction is fmrx r2, fpscr. */ + mrc p10, 7, r2, cr1, cr0, 0 + str r2, [ip], #4 +Lno_vfp: + + /* Make a tail call to __sigjmp_save; it takes the same args. */ + B PLTJMP(C_SYMBOL_NAME(__sigjmp_save)) + +#ifdef IS_IN_rtld +1: .long _GLOBAL_OFFSET_TABLE_ - 0b - 8 +Lrtld_local_ro: + .long C_SYMBOL_NAME(_rtld_local_ro)(GOTOFF) +#else +#ifdef PIC +1: .long _GLOBAL_OFFSET_TABLE_ - 0b - 8 +Lrtld_global_ro: + .long C_SYMBOL_NAME(_rtld_global_ro)(GOT) +#else +Lhwcap: + .long C_SYMBOL_NAME(_dl_hwcap) +#endif +#endif + +END (__sigsetjmp) + diff --git a/sysdeps/arm/elf/start.S b/sysdeps/arm/elf/start.S index cc076aba5c..2e0a8b1d63 100644 --- a/sysdeps/arm/elf/start.S +++ b/sysdeps/arm/elf/start.S @@ -1,5 +1,6 @@ /* Startup code for ARM & ELF - Copyright (C) 1995, 1996, 1997, 1998, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997, 1998, 2001, 2002, 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 @@ -62,6 +63,10 @@ .globl _start .type _start,#function _start: +#if !defined(__USING_SJLJ_EXCEPTIONS__) + /* Protect against unhandled exceptions. */ + .fnstart +#endif /* Fetch address of fini */ ldr ip, =__libc_csu_fini @@ -93,6 +98,11 @@ _start: /* should never get here....*/ bl abort +#if !defined(__USING_SJLJ_EXCEPTIONS__) + .cantunwind + .fnend +#endif + /* Define a symbol for the first piece of initialized data. */ .data .globl __data_start diff --git a/sysdeps/arm/fpu/feholdexcpt.c b/sysdeps/arm/fpu/feholdexcpt.c index 203b068aae..ae8c6a6d6b 100644 --- a/sysdeps/arm/fpu/feholdexcpt.c +++ b/sysdeps/arm/fpu/feholdexcpt.c @@ -35,3 +35,5 @@ feholdexcept (fenv_t *envp) return 0; } + +libm_hidden_def (feholdexcept) diff --git a/sysdeps/arm/fpu/fesetround.c b/sysdeps/arm/fpu/fesetround.c index bdb849ff60..2733e7f5dd 100644 --- a/sysdeps/arm/fpu/fesetround.c +++ b/sysdeps/arm/fpu/fesetround.c @@ -25,3 +25,5 @@ fesetround (int round) /* We only support FE_TONEAREST, so there is no need for any work. */ return (round == FE_TONEAREST)?0:1; } + +libm_hidden_def (fesetround) diff --git a/sysdeps/arm/preconfigure b/sysdeps/arm/preconfigure index e63848dc74..337e84f163 100644 --- a/sysdeps/arm/preconfigure +++ b/sysdeps/arm/preconfigure @@ -1,4 +1,13 @@ case "$machine" in -arm*) base_machine=arm machine=arm/arm32/$machine ;; -thumb*) base_machine=thumb machine=arm/thumb/$machine ;; +arm*) + base_machine=arm + case $config_os in + linux-gnueabi) + machine=arm/eabi/$machine + ;; + *) + machine=arm/$machine + ;; + esac + ;; esac diff --git a/sysdeps/arm/shlib-versions b/sysdeps/arm/shlib-versions index d603d6ebbe..ed6603f076 100644 --- a/sysdeps/arm/shlib-versions +++ b/sysdeps/arm/shlib-versions @@ -1 +1,4 @@ +arm.*-.*-linux-gnueabi DEFAULT GLIBC_2.4 + +arm.*-.*-linux-gnueabi ld=ld-linux.so.3 arm.*-.*-linux.* ld=ld-linux.so.2 diff --git a/sysdeps/unix/sysv/linux/arm/eabi/configure b/sysdeps/unix/sysv/linux/arm/eabi/configure new file mode 100644 index 0000000000..bb6a261fb7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/configure @@ -0,0 +1,5 @@ +# This file is generated from configure.in by Autoconf. DO NOT EDIT! + # Local configure fragment for sysdeps/unix/sysv/linux/arm/eabi. + +arch_minimum_kernel=2.4.17 +libc_cv_gcc_unwind_find_fde=no diff --git a/sysdeps/unix/sysv/linux/arm/eabi/configure.in b/sysdeps/unix/sysv/linux/arm/eabi/configure.in new file mode 100644 index 0000000000..14c25a5ccd --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/configure.in @@ -0,0 +1,5 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/unix/sysv/linux/arm/eabi. + +arch_minimum_kernel=2.4.17 +libc_cv_gcc_unwind_find_fde=no diff --git a/sysdeps/unix/sysv/linux/arm/eabi/epoll_ctl.c b/sysdeps/unix/sysv/linux/arm/eabi/epoll_ctl.c new file mode 100644 index 0000000000..eac925b92b --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/epoll_ctl.c @@ -0,0 +1,37 @@ +/* epoll_ctl wrapper for ARM EABI. + Copyright (C) 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 + 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. */ + +#include +#include +#include + +#include + +int +epoll_ctl (int __epfd, int __op, int __fd, struct epoll_event *__event) +{ + struct kernel_epoll_event k_event; + + k_event.events = __event->events; + memcpy (&k_event.data, &__event->data, sizeof (k_event.data)); + + return INLINE_SYSCALL (epoll_ctl, 4, __epfd, __op, __fd, &k_event); +} + +libc_hidden_def (epoll_ctl) diff --git a/sysdeps/unix/sysv/linux/arm/eabi/epoll_wait.c b/sysdeps/unix/sysv/linux/arm/eabi/epoll_wait.c new file mode 100644 index 0000000000..463e30fb14 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/epoll_wait.c @@ -0,0 +1,54 @@ +/* epoll_ctl wrapper for ARM EABI. + Copyright (C) 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 + 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. */ + +#include +#include +#include +#include + +#include + +int +epoll_wait (int __epfd, struct epoll_event *__events, + int __maxevents, int __timeout); +{ + struct kernel_epoll_event *k_events; + int result; + + k_events = malloc (sizeof (struct kernel_epoll_event) * __maxevents); + if (k_events == NULL) + { + __set_errno (ENOMEM); + return -1; + } + + result = INLINE_SYSCALL (epoll_wait, 4, __epfd, __events, k_events, + __timeout); + + for (i = 0; i < result; i++) + { + __events[i].events = k_events[i].events; + memcpy (&__events[i].data, &k_events[i].data, sizeof (k_events[i].data)); + } + + free (k_events); + return result; +} + +libc_hidden_def (epoll_wait) diff --git a/sysdeps/unix/sysv/linux/arm/eabi/fcntl.c b/sysdeps/unix/sysv/linux/arm/eabi/fcntl.c new file mode 100644 index 0000000000..7394c6aab6 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/fcntl.c @@ -0,0 +1,229 @@ +/* Copyright (C) 2000, 2002, 2003, 2004 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. */ + +#include +#include +#include /* Must come before . */ +#include +#include + +#include +#include "kernel-features.h" + +#if __ASSUME_FCNTL64 == 0 +/* This variable is shared with all files that check for fcntl64. */ +int __have_no_fcntl64; +#endif + +struct kernel_flock64 { + short l_type; + short l_whence; + off64_t l_start; + off64_t l_len; + pid_t l_pid; +} __attribute__((packed)); + +#if defined NO_CANCELLATION && __ASSUME_FCNTL64 == 0 +# define __fcntl_nocancel __libc_fcntl +#endif + +static inline void +__flock64_to_kernel (struct kernel_flock64 *kfl64, + const struct flock64 *fl64) +{ + kfl64->l_type = fl64->l_type; + kfl64->l_whence = fl64->l_whence; + kfl64->l_start = fl64->l_start; + kfl64->l_len = fl64->l_len; + kfl64->l_pid = fl64->l_pid; +} + +static inline void +__flock64_from_kernel (struct flock64 *fl64, + const struct kernel_flock64 *kfl64) +{ + fl64->l_type = kfl64->l_type; + fl64->l_whence = kfl64->l_whence; + fl64->l_start = kfl64->l_start; + fl64->l_len = kfl64->l_len; + fl64->l_pid = kfl64->l_pid; +} + +#if !defined NO_CANCELLATION || __ASSUME_FCNTL64 == 0 +int +__fcntl_nocancel (int fd, int cmd, ...) +{ + va_list ap; + void *arg; + struct kernel_flock64 kfl; + struct flock64 *orig_arg; + + va_start (ap, cmd); + arg = va_arg (ap, void *); + va_end (ap); + +#if __ASSUME_FCNTL64 == 0 +# ifdef __NR_fcntl64 + if (! __have_no_fcntl64) + { + orig_arg = arg; + if (cmd == F_GETLK64 || cmd == F_SETLK64 || cmd == F_SETLKW64) + { + arg = &kfl; + __flock64_to_kernel (&kfl, orig_arg); + } + + int result = INLINE_SYSCALL (fcntl64, 3, fd, cmd, arg); + if (result >= 0 || errno != ENOSYS) + { + if (cmd == F_GETLK64 || cmd == F_SETLK64 || cmd == F_SETLKW64) + __flock64_from_kernel (orig_arg, &kfl); + return result; + } + + __have_no_fcntl64 = 1; + } +# endif + switch (cmd) + { + case F_GETLK64: + /* Convert arg from flock64 to flock and back. */ + { + struct flock fl; + struct flock64 *fl64 = arg; + int res; + + fl.l_start = (off_t)fl64->l_start; + /* Check if we can represent the values with the smaller type. */ + if ((off64_t) fl.l_start != fl64->l_start) + { + eoverflow: + __set_errno (EOVERFLOW); + return -1; + } + fl.l_len = (off_t) fl64->l_len; + /* Check if we can represent the values with the smaller type. */ + if ((off64_t) fl.l_len != fl64->l_len) + goto eoverflow; + + fl.l_type = fl64->l_type; + fl.l_whence = fl64->l_whence; + fl.l_pid = fl64->l_pid; + + res = INLINE_SYSCALL (fcntl, 3, fd, F_GETLK, &fl); + if (res != 0) + return res; + /* Everything ok, convert back. */ + fl64->l_type = fl.l_type; + fl64->l_whence = fl.l_whence; + fl64->l_start = fl.l_start; + fl64->l_len = fl.l_len; + fl64->l_pid = fl.l_pid; + + return 0; + } + case F_SETLK64: + case F_SETLKW64: + /* Try to convert arg from flock64 to flock. */ + { + struct flock fl; + struct flock64 *fl64 = arg; + + fl.l_start = (off_t) fl64->l_start; + /* Check if we can represent the values with the smaller type. */ + if ((off64_t) fl.l_start != fl64->l_start) + goto eoverflow; + + fl.l_len = (off_t)fl64->l_len; + /* Check if we can represent the values with the smaller type. */ + if ((off64_t) fl.l_len != fl64->l_len) + { + __set_errno (EOVERFLOW); + return -1; + } + fl.l_type = fl64->l_type; + fl.l_whence = fl64->l_whence; + fl.l_pid = fl64->l_pid; + assert (F_SETLK - F_SETLKW == F_SETLK64 - F_SETLKW64); + return INLINE_SYSCALL (fcntl, 3, fd, cmd + F_SETLK - F_SETLK64, &fl); + } + default: + return INLINE_SYSCALL (fcntl, 3, fd, cmd, arg); + } + return -1; +#else + return INLINE_SYSCALL (fcntl64, 3, fd, cmd, arg); +#endif /* !__ASSUME_FCNTL64 */ +} +#endif /* NO_CANCELLATION || !__ASSUME_FCNTL64 */ + + +#ifndef __fcntl_nocancel +int +__libc_fcntl (int fd, int cmd, ...) +{ + va_list ap; + void *arg; + struct kernel_flock64 kfl; + struct flock64 *orig_arg; + + va_start (ap, cmd); + arg = va_arg (ap, void *); + va_end (ap); + +#if __ASSUME_FCNTL64 > 0 + orig_arg = arg; + if (cmd == F_GETLK64 || cmd == F_SETLK64 || cmd == F_SETLKW64) + { + arg = &kfl; + __flock64_to_kernel (&kfl, orig_arg); + } + + if (SINGLE_THREAD_P || (cmd != F_SETLKW && cmd != F_SETLKW64)) + { + int result = INLINE_SYSCALL (fcntl64, 3, fd, cmd, arg); + if (cmd == F_GETLK64 || cmd == F_SETLK64 || cmd == F_SETLKW64) + __flock64_from_kernel (orig_arg, &kfl); + return result; + } + + int oldtype = LIBC_CANCEL_ASYNC (); + + int result = INLINE_SYSCALL (fcntl64, 3, fd, cmd, arg); + + if (cmd == F_GETLK64 || cmd == F_SETLK64 || cmd == F_SETLKW64) + __flock64_from_kernel (orig_arg, &kfl); +#else + if (SINGLE_THREAD_P || (cmd != F_SETLKW && cmd != F_SETLKW64)) + return __fcntl_nocancel (fd, cmd, arg); + + int oldtype = LIBC_CANCEL_ASYNC (); + + int result = __fcntl_nocancel (fd, cmd, arg); +#endif + + LIBC_CANCEL_RESET (oldtype); + + return result; +} +#endif +libc_hidden_def (__libc_fcntl) + +weak_alias (__libc_fcntl, __fcntl) +libc_hidden_weak (__fcntl) +weak_alias (__libc_fcntl, fcntl) diff --git a/sysdeps/unix/sysv/linux/arm/eabi/fstatfs64.c b/sysdeps/unix/sysv/linux/arm/eabi/fstatfs64.c new file mode 100644 index 0000000000..9057b2c840 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/fstatfs64.c @@ -0,0 +1,76 @@ +/* Return information about the filesystem on which FD resides. + Copyright (C) 1996,1997,1998,1999,2000,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 + 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. */ + +#include +#include +#include +#include +#include + +/* Defined in statfs64.c. */ +extern int __no_statfs64 attribute_hidden; + +/* Return information about the filesystem on which FD resides. */ +int +__fstatfs64 (int fd, struct statfs64 *buf) +{ +#ifdef __NR_fstatfs64 +# if __ASSUME_STATFS64 == 0 + if (! __no_statfs64) +# endif + { + /* The EABI structure is the same as the old ABI structure, except + that it has four additional bytes of padding - at the end. We can + ignore them. */ + int result = INLINE_SYSCALL (fstatfs64, 3, fd, sizeof (*buf) - 4, buf); + +# if __ASSUME_STATFS64 == 0 + if (result == 0 || errno != ENOSYS) +# endif + return result; + +# if __ASSUME_STATFS64 == 0 + __no_statfs64 = 1; +# endif + } +#endif + +#if __ASSUME_STATFS64 == 0 + struct statfs buf32; + + if (__fstatfs (fd, &buf32) < 0) + return -1; + + buf->f_type = buf32.f_type; + buf->f_bsize = buf32.f_bsize; + buf->f_blocks = buf32.f_blocks; + buf->f_bfree = buf32.f_bfree; + buf->f_bavail = buf32.f_bavail; + buf->f_files = buf32.f_files; + buf->f_ffree = buf32.f_ffree; + buf->f_fsid = buf32.f_fsid; + buf->f_namelen = buf32.f_namelen; + buf->f_frsize = buf32.f_frsize; + memcpy (buf->f_spare, buf32.f_spare, sizeof (buf32.f_spare)); + + return 0; +#endif +} +weak_alias (__fstatfs64, fstatfs64) diff --git a/sysdeps/unix/sysv/linux/arm/eabi/fxstat64.c b/sysdeps/unix/sysv/linux/arm/eabi/fxstat64.c new file mode 100644 index 0000000000..ae6637e2a2 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/fxstat64.c @@ -0,0 +1,100 @@ +/* fxstat64 using old-style Unix fstat system call. + Copyright (C) 1997-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 + 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. */ + +#include +#include +#include +#include + +#include +#include +#include + +#include "kernel-features.h" + +#if __ASSUME_STAT64_SYSCALL == 0 +# include +#endif + +#ifdef __NR_fstat64 +# if __ASSUME_STAT64_SYSCALL == 0 +/* The variable is shared between all wrappers around *stat64 calls. */ +extern int __have_no_stat64; +# endif +#endif + +/* Get information about the file FD in BUF. */ + +int +___fxstat64 (int vers, int fd, struct stat64 *buf) +{ + int result; + struct kernel_stat64 kbuf64; + +#if __ASSUME_STAT64_SYSCALL > 0 + result = INLINE_SYSCALL (fstat64, 2, fd, CHECK_1 (&kbuf64)); + if (result == 0) + result = __xstat64_kernel64_conv (vers, &kbuf64, buf); +# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0 + if (__builtin_expect (!result, 1) && buf->__st_ino != (__ino_t) buf->st_ino) + buf->st_ino = buf->__st_ino; +# endif + return result; +#else + struct kernel_stat kbuf; +# if defined __NR_fstat64 + if (! __have_no_stat64) + { + int saved_errno = errno; + result = INLINE_SYSCALL (fstat64, 2, fd, CHECK_1 (&kbuf64)); + + if (result != -1 || errno != ENOSYS) + { + if (result == 0) + result = __xstat64_kernel64_conv (vers, &kbuf64, buf); +# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0 + if (!result && buf->__st_ino != (__ino_t)buf->st_ino) + buf->st_ino = buf->__st_ino; +# endif + return result; + } + + __set_errno (saved_errno); + __have_no_stat64 = 1; + } +# endif + result = INLINE_SYSCALL (fstat, 2, fd, __ptrvalue (&kbuf)); + if (result == 0) + result = __xstat64_conv (vers, &kbuf, buf); + + return result; +#endif +} + +#include + +#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2) +versioned_symbol (libc, ___fxstat64, __fxstat64, GLIBC_2_2); +strong_alias (___fxstat64, __old__fxstat64) +compat_symbol (libc, __old__fxstat64, __fxstat64, GLIBC_2_1); +hidden_ver (___fxstat64, __fxstat64) +#else +strong_alias (___fxstat64, __fxstat64) +hidden_def (__fxstat64) +#endif diff --git a/sysdeps/unix/sysv/linux/arm/eabi/kernel_epoll.h b/sysdeps/unix/sysv/linux/arm/eabi/kernel_epoll.h new file mode 100644 index 0000000000..410b5c0739 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/kernel_epoll.h @@ -0,0 +1,23 @@ +/* Copyright (C) 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 + 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. */ + +struct kernel_epoll_event +{ + uint32_t events; /* Epoll events */ + epoll_data_t data; /* User data variable */ +} __attribute__ ((packed,aligned(4))); diff --git a/sysdeps/unix/sysv/linux/arm/eabi/kernel_stat.h b/sysdeps/unix/sysv/linux/arm/eabi/kernel_stat.h new file mode 100644 index 0000000000..a4a8472fa2 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/kernel_stat.h @@ -0,0 +1,59 @@ +/* Copyright (C) 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 + 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. */ + +#include + +/* kernel_stat64 is just like stat64, except packed. The EABI aligns + st_size to an eight byte boundary but the old ABI only aligns it to + four. Similarly st_blocks. */ +struct kernel_stat64 + { + __dev_t st_dev; /* Device. */ + unsigned int __pad1; + + __ino_t __st_ino; /* 32bit 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. */ + unsigned int __pad2; + __off64_t st_size; /* Size of file, in bytes. */ + __blksize_t st_blksize; /* Optimal block size for I/O. */ + + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ +#ifdef __USE_MISC + /* 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 + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +#else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +#endif + __ino64_t st_ino; /* File serial number. */ + } __attribute__ ((packed,aligned(4))); diff --git a/sysdeps/unix/sysv/linux/arm/eabi/lockf64.c b/sysdeps/unix/sysv/linux/arm/eabi/lockf64.c new file mode 100644 index 0000000000..79dcceb09d --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/lockf64.c @@ -0,0 +1,202 @@ +/* Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 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. */ + +#include +#include +#include +#include +#include +#include + +#include "kernel-features.h" + +/* lockf is a simplified interface to fcntl's locking facilities. */ + +#ifdef __NR_fcntl64 +# if __ASSUME_FCNTL64 == 0 +/* This variable is shared with all files that check for fcntl64. The + declaration is in fcntl.c. */ +extern int __have_no_fcntl64; +# endif +#endif + +struct kernel_flock64 { + short l_type; + short l_whence; + off64_t l_start; + off64_t l_len; + pid_t l_pid; +} __attribute__((packed)); + +int +lockf64 (int fd, int cmd, off64_t len64) +{ +#if __ASSUME_FCNTL64 == 0 + struct flock fl; + off_t len = (off_t) len64; +#endif +#ifdef __NR_fcntl64 + struct kernel_flock64 fl64; + int cmd64; +#endif + +#if __ASSUME_FCNTL64 == 0 + memset ((char *) &fl, '\0', sizeof (fl)); + + /* lockf is always relative to the current file position. */ + fl.l_whence = SEEK_CUR; + fl.l_start = 0; + fl.l_len = len; +#endif +#ifdef __NR_fcntl64 +# if __ASSUME_FCNTL64 == 0 + if (!__have_no_fcntl64) + { +# endif + memset ((char *) &fl64, '\0', sizeof (fl64)); + fl64.l_whence = SEEK_CUR; + fl64.l_start = 0; + fl64.l_len = len64; +# if __ASSUME_FCNTL64 == 0 + } +# endif +#endif + +#if __ASSUME_FCNTL64 == 0 && !defined __NR_fcntl64 + if (len64 != (off64_t) len) + { + /* We can't represent the length. */ + __set_errno (EOVERFLOW); + return -1; + } +#endif + switch (cmd) + { + case F_TEST: + /* Test the lock: return 0 if FD is unlocked or locked by this process; + return -1, set errno to EACCES, if another process holds the lock. */ +#if __ASSUME_FCNTL64 > 0 + fl64.l_type = F_RDLCK; + if (INLINE_SYSCALL (fcntl64, 3, fd, F_GETLK64, &fl64) < 0) + return -1; + if (fl64.l_type == F_UNLCK || fl64.l_pid == __getpid ()) + return 0; + __set_errno (EACCES); + return -1; +#else +# ifdef __NR_fcntl64 + if (!__have_no_fcntl64) + { + int res; + + fl64.l_type = F_RDLCK; + res = INLINE_SYSCALL (fcntl64, 3, fd, F_GETLK64, &fl64); + /* If errno == ENOSYS try the 32bit interface if len64 can + be represented with 32 bits. */ + + if (res == 0) + { + if (fl64.l_type == F_UNLCK || fl64.l_pid == __getpid ()) + return 0; + __set_errno (EACCES); + return -1; + } + else if (errno == ENOSYS) + __have_no_fcntl64 = 1; + else + /* res < 0 && errno != ENOSYS. */ + return -1; + if (len64 != (off64_t) len) + { + /* We can't represent the length. */ + __set_errno (EOVERFLOW); + return -1; + } + } +# endif + fl.l_type = F_RDLCK; + if (__fcntl (fd, F_GETLK, &fl) < 0) + return -1; + if (fl.l_type == F_UNLCK || fl.l_pid == __getpid ()) + return 0; + __set_errno (EACCES); + return -1; +#endif + case F_ULOCK: +#if __ASSUME_FCNTL64 == 0 + fl.l_type = F_UNLCK; + cmd = F_SETLK; +#endif +#ifdef __NR_fcntl64 + fl64.l_type = F_UNLCK; + cmd64 = F_SETLK64; +#endif + break; + case F_LOCK: +#if __ASSUME_FCNTL64 == 0 + fl.l_type = F_WRLCK; + cmd = F_SETLKW; +#endif +#ifdef __NR_fcntl64 + fl64.l_type = F_WRLCK; + cmd64 = F_SETLKW64; +#endif + break; + case F_TLOCK: +#if __ASSUME_FCNTL64 == 0 + fl.l_type = F_WRLCK; + cmd = F_SETLK; +#endif +#ifdef __NR_fcntl64 + fl64.l_type = F_WRLCK; + cmd64 = F_SETLK64; +#endif + break; + + default: + __set_errno (EINVAL); + return -1; + } +#if __ASSUME_FCNTL64 > 0 + return INLINE_SYSCALL (fcntl64, 3, fd, cmd64, &fl64); +#else +# ifdef __NR_fcntl64 + + if (!__have_no_fcntl64) + { + int res = INLINE_SYSCALL (fcntl64, 3, fd, cmd64, &fl64); + + /* If errno == ENOSYS try the 32bit interface if len64 can + be represented with 32 bits. */ + if (res == 0 || errno != ENOSYS) + return res; + + __have_no_fcntl64 = 1; + + if (len64 != (off64_t) len) + { + /* We can't represent the length. */ + __set_errno (EOVERFLOW); + return -1; + } + } +# endif + return __fcntl (fd, cmd, &fl); +#endif +} diff --git a/sysdeps/unix/sysv/linux/arm/eabi/lxstat64.c b/sysdeps/unix/sysv/linux/arm/eabi/lxstat64.c new file mode 100644 index 0000000000..bb5be399ee --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/lxstat64.c @@ -0,0 +1,99 @@ +/* lxstat64 using old-style Unix lstat system call. + Copyright (C) 1997-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 + 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. */ + +#include +#include +#include +#include + +#include +#include +#include + +#include "kernel-features.h" + +#if __ASSUME_STAT64_SYSCALL == 0 +# include +#endif + +#ifdef __NR_lstat64 +# if __ASSUME_STAT64_SYSCALL == 0 +/* The variable is shared between all wrappers around *stat64 calls. */ +extern int __have_no_stat64; +# endif +#endif + +/* Get information about the file NAME in BUF. */ +int +___lxstat64 (int vers, const char *name, struct stat64 *buf) +{ + int result; + struct kernel_stat64 kbuf64; + +#ifdef __ASSUME_STAT64_SYSCALL + result = INLINE_SYSCALL (lstat64, 2, CHECK_STRING (name), CHECK_1 (&kbuf64)); + if (result == 0) + result = __xstat64_kernel64_conv (vers, &kbuf64, buf); +# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0 + if (__builtin_expect (!result, 1) && buf->__st_ino != (__ino_t) buf->st_ino) + buf->st_ino = buf->__st_ino; +# endif + return result; +#else + struct kernel_stat kbuf; +# ifdef __NR_lstat64 + if (! __have_no_stat64) + { + int saved_errno = errno; + result = INLINE_SYSCALL (lstat64, 2, CHECK_STRING (name), CHECK_1 (&kbuf64)); + + if (result != -1 || errno != ENOSYS) + { + if (result == 0) + result = __xstat64_kernel64_conv (vers, &kbuf64, buf); +# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0 + if (!result && buf->__st_ino != (__ino_t) buf->st_ino) + buf->st_ino = buf->__st_ino; +# endif + return result; + } + + __set_errno (saved_errno); + __have_no_stat64 = 1; + } +# endif + result = INLINE_SYSCALL (lstat, 2, CHECK_STRING (name), __ptrvalue (&kbuf)); + if (result == 0) + result = __xstat64_conv (vers, &kbuf, buf); + + return result; +#endif +} + +#include + +#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2) +versioned_symbol (libc, ___lxstat64, __lxstat64, GLIBC_2_2); +strong_alias (___lxstat64, __old__lxstat64) +compat_symbol (libc, __old__lxstat64, __lxstat64, GLIBC_2_1); +hidden_ver (___lxstat64, __lxstat64) +#else +strong_alias (___lxstat64, __lxstat64); +hidden_def (__lxstat64) +#endif diff --git a/sysdeps/unix/sysv/linux/arm/eabi/oldgetrlimit.c b/sysdeps/unix/sysv/linux/arm/eabi/oldgetrlimit.c new file mode 100644 index 0000000000..6e25b021ab --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/oldgetrlimit.c @@ -0,0 +1 @@ +/* Empty. */ diff --git a/sysdeps/unix/sysv/linux/arm/eabi/oldsetrlimit.c b/sysdeps/unix/sysv/linux/arm/eabi/oldsetrlimit.c new file mode 100644 index 0000000000..6e25b021ab --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/oldsetrlimit.c @@ -0,0 +1 @@ +/* Empty. */ diff --git a/sysdeps/unix/sysv/linux/arm/eabi/semop.c b/sysdeps/unix/sysv/linux/arm/eabi/semop.c new file mode 100644 index 0000000000..42b2036140 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/semop.c @@ -0,0 +1,67 @@ +/* Copyright (C) 1995, 1997, 1998, 1999, 2000, 2005 + Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , August 1995. + + 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. */ + +#include +#include +#include +#include +#include +#include +#include + +struct kernel_sembuf +{ + unsigned short int sem_num; /* semaphore number */ + short int sem_op; /* semaphore operation */ + short int sem_flg; /* operation flag */ + short int __pad1; +}; + +/* Perform user-defined atomical operation of array of semaphores. */ + +int +semop (semid, sops, nsops) + int semid; + struct sembuf *sops; + size_t nsops; +{ + struct kernel_sembuf *ksops = alloca (sizeof (ksops[0]) * nsops); + size_t i; + int result; + + for (i = 0; i < nsops; i++) + { + ksops[i].sem_num = sops[i].sem_num; + ksops[i].sem_op = sops[i].sem_op; + ksops[i].sem_flg = sops[i].sem_flg; + } + + result = INLINE_SYSCALL (ipc, 5, IPCOP_semop, + semid, (int) nsops, 0, CHECK_N (ksops, nsops)); + + for (i = 0; i < nsops; i++) + { + sops[i].sem_num = ksops[i].sem_num; + sops[i].sem_op = ksops[i].sem_op; + sops[i].sem_flg = ksops[i].sem_flg; + } + + return result; +} diff --git a/sysdeps/unix/sysv/linux/arm/eabi/semtimedop.c b/sysdeps/unix/sysv/linux/arm/eabi/semtimedop.c new file mode 100644 index 0000000000..463dea4ecb --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/semtimedop.c @@ -0,0 +1,69 @@ +/* Copyright (C) 1995, 1997, 1998, 1999, 2000, 2005 + Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , August 1995. + + 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. */ + +#include +#include +#include +#include +#include +#include +#include + +struct kernel_sembuf +{ + unsigned short int sem_num; /* semaphore number */ + short int sem_op; /* semaphore operation */ + short int sem_flg; /* operation flag */ + short int __pad1; +}; + +/* Perform user-defined atomical operation of array of semaphores. */ + +int +semtimedop (semid, sops, nsops, timeout) + int semid; + struct sembuf *sops; + size_t nsops; + const struct timespec *timeout; +{ + struct kernel_sembuf *ksops = alloca (sizeof (ksops[0]) * nsops); + size_t i; + int result; + + for (i = 0; i < nsops; i++) + { + ksops[i].sem_num = sops[i].sem_num; + ksops[i].sem_op = sops[i].sem_op; + ksops[i].sem_flg = sops[i].sem_flg; + } + + result = INLINE_SYSCALL (ipc, 6, IPCOP_semtimedop, + semid, (int) nsops, 0, CHECK_N (sops, nsops), + timeout); + + for (i = 0; i < nsops; i++) + { + sops[i].sem_num = ksops[i].sem_num; + sops[i].sem_op = ksops[i].sem_op; + sops[i].sem_flg = ksops[i].sem_flg; + } + + return result; +} diff --git a/sysdeps/unix/sysv/linux/arm/eabi/statfs64.c b/sysdeps/unix/sysv/linux/arm/eabi/statfs64.c new file mode 100644 index 0000000000..3c74453c5f --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/statfs64.c @@ -0,0 +1,77 @@ +/* Return information about the filesystem on which FILE resides. + Copyright (C) 1996-2000,2003,2004,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 + 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. */ + +#include +#include +#include +#include +#include + + +# if __ASSUME_STATFS64 == 0 +int __no_statfs64 attribute_hidden; +#endif + +/* Return information about the filesystem on which FILE resides. */ +int +__statfs64 (const char *file, struct statfs64 *buf) +{ +#ifdef __NR_statfs64 +# if __ASSUME_STATFS64 == 0 + if (! __no_statfs64) +# endif + { + /* The EABI structure is the same as the old ABI structure, except + that it has four additional bytes of padding - at the end. We can + ignore them. */ + int result = INLINE_SYSCALL (statfs64, 3, file, sizeof (*buf) - 4, buf); + +# if __ASSUME_STATFS64 == 0 + if (result == 0 || errno != ENOSYS) +# endif + return result; + +# if __ASSUME_STATFS64 == 0 + __no_statfs64 = 1; +# endif + } +#endif + +#if __ASSUME_STATFS64 == 0 + struct statfs buf32; + + if (__statfs (file, &buf32) < 0) + return -1; + + buf->f_type = buf32.f_type; + buf->f_bsize = buf32.f_bsize; + buf->f_blocks = buf32.f_blocks; + buf->f_bfree = buf32.f_bfree; + buf->f_bavail = buf32.f_bavail; + buf->f_files = buf32.f_files; + buf->f_ffree = buf32.f_ffree; + buf->f_fsid = buf32.f_fsid; + buf->f_namelen = buf32.f_namelen; + buf->f_frsize = buf32.f_frsize; + memcpy (buf->f_spare, buf32.f_spare, sizeof (buf32.f_spare)); + + return 0; +#endif +} +weak_alias (__statfs64, statfs64) diff --git a/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list b/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list new file mode 100644 index 0000000000..85bc04ff1d --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list @@ -0,0 +1,4 @@ +# File name Caller Syscall name # args Strong name Weak names + +epoll_ctl EXTRA epoll_ctl i:iiip epoll_ctl +epoll_wait EXTRA epoll_wait i:ipii epoll_wait diff --git a/sysdeps/unix/sysv/linux/arm/eabi/uname.c b/sysdeps/unix/sysv/linux/arm/eabi/uname.c new file mode 100644 index 0000000000..82482e4552 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/uname.c @@ -0,0 +1,43 @@ +/* Copyright (C) 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 + 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. */ + +#include +#include +#include +#include +#include + +/* The kernel's struct utsname is two bytes larger than a userland struct + utsname due to the APCS structure size boundary. */ + +int +__uname (struct utsname *__name) +{ + char buf[sizeof (struct utsname) + 2]; + int result = INLINE_SYSCALL (uname, 1, buf); + + if (result == 0) + memcpy (__name, buf, sizeof (struct utsname)); + + return result; +} + +libc_hidden_def (__uname) +strong_alias (__uname, uname) +libc_hidden_weak (uname) diff --git a/sysdeps/unix/sysv/linux/arm/eabi/xstat64.c b/sysdeps/unix/sysv/linux/arm/eabi/xstat64.c new file mode 100644 index 0000000000..5edafd8aae --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/xstat64.c @@ -0,0 +1,103 @@ +/* xstat64 using old-style Unix stat system call. + Copyright (C) 1991, 1995-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 + 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. */ + +#include +#include +#include +#include + +#include +#include +#include + +#include "kernel-features.h" + +#if __ASSUME_STAT64_SYSCALL == 0 +# include +#endif + +#ifdef __NR_stat64 +# if __ASSUME_STAT64_SYSCALL == 0 +/* The variable is shared between all wrappers around *stat64 calls. + This is the definition. */ +int __have_no_stat64; +# endif +#endif + +/* Get information about the file NAME in BUF. */ + +int +___xstat64 (int vers, const char *name, struct stat64 *buf) +{ + int result; + struct kernel_stat64 kbuf64; + +#if __ASSUME_STAT64_SYSCALL > 0 + result = INLINE_SYSCALL (stat64, 2, CHECK_STRING (name), CHECK_1 (&kbuf64)); + if (result == 0) + result = __xstat64_kernel64_conv (vers, &kbuf64, buf); +# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0 + if (__builtin_expect (!result, 1) && buf->__st_ino != (__ino_t) buf->st_ino) + buf->st_ino = buf->__st_ino; +# endif + return result; +#else + struct kernel_stat kbuf; +# if defined __NR_stat64 + if (! __have_no_stat64) + { + int saved_errno = errno; + result = INLINE_SYSCALL (stat64, 2, CHECK_STRING (name), CHECK_1 (&kbuf64)); + + if (result != -1 || errno != ENOSYS) + { + if (result == 0) + result = __xstat64_kernel64_conv (vers, &kbuf64, buf); +# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0 + if (!result && buf->__st_ino != (__ino_t) buf->st_ino) + buf->st_ino = buf->__st_ino; +# endif + return result; + } + + __set_errno (saved_errno); + __have_no_stat64 = 1; + } +# endif + + result = INLINE_SYSCALL (stat, 2, CHECK_STRING (name), __ptrvalue (&kbuf)); + if (result == 0) + result = __xstat64_conv (vers, &kbuf, buf); + + return result; +#endif +} + + +#include + +#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2) +versioned_symbol (libc, ___xstat64, __xstat64, GLIBC_2_2); +strong_alias (___xstat64, __old__xstat64) +compat_symbol (libc, __old__xstat64, __xstat64, GLIBC_2_1); +hidden_ver (___xstat64, __xstat64) +#else +strong_alias (___xstat64, __xstat64) +hidden_def (__xstat64) +#endif diff --git a/sysdeps/unix/sysv/linux/arm/eabi/xstatconv.c b/sysdeps/unix/sysv/linux/arm/eabi/xstatconv.c new file mode 100644 index 0000000000..28c4dae951 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/xstatconv.c @@ -0,0 +1,341 @@ +/* Convert between the kernel's `struct stat' format, and libc's. + Copyright (C) 1991,1995-1997,2000,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. */ + +#include +#include +#include + +#ifdef STAT_IS_KERNEL_STAT + +/* Dummy. */ +struct kernel_stat; + +#else + +#include + + +#if !defined __ASSUME_STAT64_SYSCALL || defined XSTAT_IS_XSTAT64 +int +__xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf) +{ + switch (vers) + { + case _STAT_VER_KERNEL: + /* Nothing to do. The struct is in the form the kernel expects. + We should have short-circuted before we got here, but for + completeness... */ + *(struct kernel_stat *) ubuf = *kbuf; + break; + + case _STAT_VER_LINUX: + { + struct stat *buf = ubuf; + + /* Convert to current kernel version of `struct stat'. */ + buf->st_dev = kbuf->st_dev; +#ifdef _HAVE_STAT___PAD1 + buf->__pad1 = 0; +#endif + buf->st_ino = kbuf->st_ino; + buf->st_mode = kbuf->st_mode; + buf->st_nlink = kbuf->st_nlink; + buf->st_uid = kbuf->st_uid; + buf->st_gid = kbuf->st_gid; + buf->st_rdev = kbuf->st_rdev; +#ifdef _HAVE_STAT___PAD2 + buf->__pad2 = 0; +#endif + buf->st_size = kbuf->st_size; + buf->st_blksize = kbuf->st_blksize; + buf->st_blocks = kbuf->st_blocks; +#ifdef _HAVE_STAT_NSEC + buf->st_atim.tv_sec = kbuf->st_atim.tv_sec; + buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec; + buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec; + buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec; + buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec; + buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec; +#else + buf->st_atime = kbuf->st_atime; + buf->st_mtime = kbuf->st_mtime; + buf->st_ctime = kbuf->st_ctime; +#endif +#ifdef _HAVE_STAT___UNUSED1 + buf->__unused1 = 0; +#endif +#ifdef _HAVE_STAT___UNUSED2 + buf->__unused2 = 0; +#endif +#ifdef _HAVE_STAT___UNUSED3 + buf->__unused3 = 0; +#endif +#ifdef _HAVE_STAT___UNUSED4 + buf->__unused4 = 0; +#endif +#ifdef _HAVE_STAT___UNUSED5 + buf->__unused5 = 0; +#endif + } + break; + + default: + __set_errno (EINVAL); + return -1; + } + + return 0; +} +#endif + +int +__xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf) +{ +#ifdef XSTAT_IS_XSTAT64 + return __xstat_conv (vers, kbuf, ubuf); +#else + switch (vers) + { + case _STAT_VER_LINUX: + { + struct stat64 *buf = ubuf; + + /* Convert to current kernel version of `struct stat64'. */ + buf->st_dev = kbuf->st_dev; +#ifdef _HAVE_STAT64___PAD1 + buf->__pad1 = 0; +#endif + buf->st_ino = kbuf->st_ino; +#ifdef _HAVE_STAT64___ST_INO + buf->__st_ino = kbuf->st_ino; +#endif + buf->st_mode = kbuf->st_mode; + buf->st_nlink = kbuf->st_nlink; + buf->st_uid = kbuf->st_uid; + buf->st_gid = kbuf->st_gid; + buf->st_rdev = kbuf->st_rdev; +#ifdef _HAVE_STAT64___PAD2 + buf->__pad2 = 0; +#endif + buf->st_size = kbuf->st_size; + buf->st_blksize = kbuf->st_blksize; + buf->st_blocks = kbuf->st_blocks; +#ifdef _HAVE_STAT64_NSEC + buf->st_atim.tv_sec = kbuf->st_atim.tv_sec; + buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec; + buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec; + buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec; + buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec; + buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec; +#else + buf->st_atime = kbuf->st_atime; + buf->st_mtime = kbuf->st_mtime; + buf->st_ctime = kbuf->st_ctime; +#endif +#ifdef _HAVE_STAT64___UNUSED1 + buf->__unused1 = 0; +#endif +#ifdef _HAVE_STAT64___UNUSED2 + buf->__unused2 = 0; +#endif +#ifdef _HAVE_STAT64___UNUSED3 + buf->__unused3 = 0; +#endif +#ifdef _HAVE_STAT64___UNUSED4 + buf->__unused4 = 0; +#endif +#ifdef _HAVE_STAT64___UNUSED5 + buf->__unused5 = 0; +#endif + } + break; + + /* If struct stat64 is different from struct stat then + _STAT_VER_KERNEL does not make sense. */ + case _STAT_VER_KERNEL: + default: + __set_errno (EINVAL); + return -1; + } + + return 0; +#endif +} + +int +__xstat32_conv (int vers, void *kbuf_, struct stat *buf) +{ + struct kernel_stat64 *kbuf = kbuf_; + + switch (vers) + { + case _STAT_VER_LINUX: + { + /* Convert current kernel version of `struct stat64' to + `struct stat'. */ + buf->st_dev = kbuf->st_dev; +#ifdef _HAVE_STAT___PAD1 + buf->__pad1 = 0; +#endif +#ifdef _HAVE_STAT64___ST_INO +# if __ASSUME_ST_INO_64_BIT == 0 + if (kbuf->st_ino == 0) + buf->st_ino = kbuf->__st_ino; + else +# endif + { + buf->st_ino = kbuf->st_ino; + if (sizeof (buf->st_ino) != sizeof (kbuf->st_ino) + && buf->st_ino != kbuf->st_ino) + { + __set_errno (EOVERFLOW); + return -1; + } + } +#else + buf->st_ino = kbuf->st_ino; + if (sizeof (buf->st_ino) != sizeof (kbuf->st_ino) + && buf->st_ino != kbuf->st_ino) + { + __set_errno (EOVERFLOW); + return -1; + } +#endif + buf->st_mode = kbuf->st_mode; + buf->st_nlink = kbuf->st_nlink; + buf->st_uid = kbuf->st_uid; + buf->st_gid = kbuf->st_gid; + buf->st_rdev = kbuf->st_rdev; +#ifdef _HAVE_STAT___PAD2 + buf->__pad2 = 0; +#endif + buf->st_size = kbuf->st_size; + /* Check for overflow. */ + if (sizeof (buf->st_size) != sizeof (kbuf->st_size) + && buf->st_size != kbuf->st_size) + { + __set_errno (EOVERFLOW); + return -1; + } + buf->st_blksize = kbuf->st_blksize; + buf->st_blocks = kbuf->st_blocks; + /* Check for overflow. */ + if (sizeof (buf->st_blocks) != sizeof (kbuf->st_blocks) + && buf->st_blocks != kbuf->st_blocks) + { + __set_errno (EOVERFLOW); + return -1; + } +#ifdef _HAVE_STAT_NSEC + buf->st_atim.tv_sec = kbuf->st_atim.tv_sec; + buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec; + buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec; + buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec; + buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec; + buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec; +#else + buf->st_atime = kbuf->st_atime; + buf->st_mtime = kbuf->st_mtime; + buf->st_ctime = kbuf->st_ctime; +#endif + +#ifdef _HAVE_STAT___UNUSED1 + buf->__unused1 = 0; +#endif +#ifdef _HAVE_STAT___UNUSED2 + buf->__unused2 = 0; +#endif +#ifdef _HAVE_STAT___UNUSED3 + buf->__unused3 = 0; +#endif +#ifdef _HAVE_STAT___UNUSED4 + buf->__unused4 = 0; +#endif +#ifdef _HAVE_STAT___UNUSED5 + buf->__unused5 = 0; +#endif + } + break; + + /* If struct stat64 is different from struct stat then + _STAT_VER_KERNEL does not make sense. */ + case _STAT_VER_KERNEL: + default: + __set_errno (EINVAL); + return -1; + } + + return 0; +} + +int +__xstat64_kernel64_conv (int vers, void *kbuf_, struct stat64 *buf) +{ + struct kernel_stat64 *kbuf = kbuf_; + + switch (vers) + { + case _STAT_VER_LINUX: + { + /* Convert current kernel version of `struct stat64' to + user version of `struct stat64'. */ + buf->st_dev = kbuf->st_dev; +#ifdef _HAVE_STAT64___PAD1 + buf->__pad1 = kbuf->__pad1; +#endif +#ifdef _HAVE_STAT64___ST_INO + buf->__st_ino = kbuf->__st_ino; +#endif + buf->st_mode = kbuf->st_mode; + buf->st_nlink = kbuf->st_nlink; + buf->st_uid = kbuf->st_uid; + buf->st_gid = kbuf->st_gid; + buf->st_rdev = kbuf->st_rdev; +#ifdef _HAVE_STAT64___PAD2 + buf->__pad2 = kbuf->__pad2; +#endif + buf->st_size = kbuf->st_size; + buf->st_blksize = kbuf->st_blksize; + buf->st_blocks = kbuf->st_blocks; +#ifdef _HAVE_STAT64_NSEC + buf->st_atim.tv_sec = kbuf->st_atim.tv_sec; + buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec; + buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec; + buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec; + buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec; + buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec; +#else + buf->st_atime = kbuf->st_atime; + buf->st_mtime = kbuf->st_mtime; + buf->st_ctime = kbuf->st_ctime; +#endif + buf->st_ino = kbuf->st_ino; + } + break; + + case _STAT_VER_KERNEL: + default: + __set_errno (EINVAL); + return -1; + } + + return 0; +} + +#endif diff --git a/sysdeps/unix/sysv/linux/arm/eabi/xstatconv.h b/sysdeps/unix/sysv/linux/arm/eabi/xstatconv.h new file mode 100644 index 0000000000..abe65f4a80 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/xstatconv.h @@ -0,0 +1,28 @@ +/* Convert between the kernel's `struct stat' format, and libc's. + Copyright (C) 1991,1995-1997,2000,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. */ + +#include "kernel-features.h" + +#ifndef STAT_IS_KERNEL_STAT +extern int __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf); +extern int __xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf); +#endif +extern int __xstat32_conv (int vers, void *kbuf, struct stat *buf); +extern int __xstat64_kernel64_conv (int vers, struct kernel_stat64 *kbuf, + struct stat64 *buf); diff --git a/sysdeps/unix/sysv/linux/arm/mmap64.S b/sysdeps/unix/sysv/linux/arm/mmap64.S index 5899140f1c..bb5e1dc261 100644 --- a/sysdeps/unix/sysv/linux/arm/mmap64.S +++ b/sysdeps/unix/sysv/linux/arm/mmap64.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2000, 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 @@ -23,21 +23,31 @@ #include "kernel-features.h" +/* For the EABI, there are four extra bytes of padding in the + incoming arguments to mmap64, to preserve alignment. */ +#ifdef __ARM_EABI__ +# define INITIAL_OFFSET 8 +#else +# define INITIAL_OFFSET 4 +#endif + +#ifdef __ARMEB__ +# define LOW_OFFSET INITIAL_OFFSET + 4 +/* The initial + 4 is for the stack postdecrement. */ +# define HIGH_OFFSET 4 + INITIAL_OFFSET + 0 +#else +# define LOW_OFFSET INITIAL_OFFSET + 0 +# define HIGH_OFFSET 4 + INITIAL_OFFSET + 4 +#endif + /* The mmap2 system call takes six arguments, all in registers. */ .text ENTRY (__mmap64) #ifdef __NR_mmap2 -#ifdef __ARMEB__ - ldr ip, [sp, $8] @ offset low part + ldr ip, [sp, $LOW_OFFSET] str r5, [sp, #-4]! - ldr r5, [sp, $8] @ offset high part + ldr r5, [sp, $HIGH_OFFSET] str r4, [sp, #-4]! -#else - ldr ip, [sp, $4] @ offset low part - str r5, [sp, #-4]! - ldr r5, [sp, $12] @ offset high part - str r4, [sp, #-4]! -#endif movs r4, ip, lsl $20 @ check that offset is page-aligned mov ip, ip, lsr $12 moveqs r4, r5, lsr $12 @ check for overflow From eb34460f46706ee12f1b4eeb58162023f009436e Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Mon, 10 Oct 2005 15:36:01 +0000 Subject: [PATCH 3467/4487] Correct attribution goof. --- ChangeLog.arm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ChangeLog.arm b/ChangeLog.arm index 35119cacd3..f38a92946a 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,4 +1,8 @@ 2005-10-10 Daniel Jacobowitz + Joseph Myers + Julian Brown + Mark Mitchell + Paul Brook * sysdeps/arm/dl-machine.h (_dl_start_user): Preserve eight-byte stack alignment. From 011363465f62d18b898601d590615a97a203cc61 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 20 Oct 2005 05:24:59 +0000 Subject: [PATCH 3468/4487] Return the correct result when the same dividend and divisor are provided, and they're negative numbers. --- sysdeps/alpha/divqu.S | 2 +- sysdeps/alpha/remqu.S | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/divqu.S b/sysdeps/alpha/divqu.S index f2a8a4d533..ef3cdb1b2b 100644 --- a/sysdeps/alpha/divqu.S +++ b/sysdeps/alpha/divqu.S @@ -240,7 +240,7 @@ $y_is_neg: /* If we get here, Y is so big that bit 63 is set. The results from the divide will be completely wrong. Fortunately, the quotient must be either 0 or 1, so just compute it directly. */ - cmpult Y, X, RV + cmpule Y, X, RV excb mt_fpcr $f3 ldt $f0, 0(sp) diff --git a/sysdeps/alpha/remqu.S b/sysdeps/alpha/remqu.S index dcc1c88b3c..398a345a18 100644 --- a/sysdeps/alpha/remqu.S +++ b/sysdeps/alpha/remqu.S @@ -246,7 +246,7 @@ $y_is_neg: from the divide will be completely wrong. Fortunately, the quotient must be either 0 or 1, so the remainder must be X or X-Y, so just compute it directly. */ - cmpult Y, X, AT + cmpule Y, X, AT subq X, Y, RV ldt $f0, 0(sp) cmoveq AT, X, RV From e7837483d3d1baaae6ef46f0634e059f1ca15e83 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Thu, 27 Oct 2005 18:50:12 +0000 Subject: [PATCH 3469/4487] * sysdeps/unix/sysv/linux/arm/socket.S: Honor NO_WEAK_ALIAS. --- ChangeLog.arm | 4 ++++ sysdeps/unix/sysv/linux/arm/socket.S | 10 +++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index f38a92946a..4cf9c1ae34 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,7 @@ +2005-10-27 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/arm/socket.S: Honor NO_WEAK_ALIAS. + 2005-10-10 Daniel Jacobowitz Joseph Myers Julian Brown diff --git a/sysdeps/unix/sysv/linux/arm/socket.S b/sysdeps/unix/sysv/linux/arm/socket.S index 212a489afe..69f88eb3ca 100644 --- a/sysdeps/unix/sysv/linux/arm/socket.S +++ b/sysdeps/unix/sysv/linux/arm/socket.S @@ -1,4 +1,6 @@ -/* Copyright (C) 1995, 1996, 1997, 1998, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 1998, 2003, 2004, 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 @@ -32,7 +34,11 @@ The .S files for the other calls just #define socket and #include this. */ #ifndef __socket +#ifndef NO_WEAK_ALIAS #define __socket P(__,socket) +#else +#define __socket socket +#endif #endif #define PUSHARGS_1 str a1, [sp, $-4]! @@ -120,4 +126,6 @@ ENTRY (__socket) PSEUDO_END (__socket) +#ifndef NO_WEAK_ALIAS weak_alias (__socket, socket) +#endif From 56cf6cc523f4b6e589f517c843aab8e913903b99 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Mon, 31 Oct 2005 20:41:32 +0000 Subject: [PATCH 3470/4487] * sysdeps/unix/sysv/linux/arm/bits/mman.h (MREMAP_FIXED): Define. --- ChangeLog.arm | 4 ++++ sysdeps/unix/sysv/linux/arm/bits/mman.h | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 4cf9c1ae34..38bfdf06e0 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,7 @@ +2005-10-31 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/arm/bits/mman.h (MREMAP_FIXED): Define. + 2005-10-27 Daniel Jacobowitz * sysdeps/unix/sysv/linux/arm/socket.S: Honor NO_WEAK_ALIAS. diff --git a/sysdeps/unix/sysv/linux/arm/bits/mman.h b/sysdeps/unix/sysv/linux/arm/bits/mman.h index 4ec6839685..7430f15b3b 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/mman.h +++ b/sysdeps/unix/sysv/linux/arm/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/ARM version. - Copyright (C) 1997, 2000, 2003 Free Software Foundation, Inc. + Copyright (C) 1997, 2000, 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 @@ -78,6 +78,7 @@ /* Flags for `mremap'. */ #ifdef __USE_GNU # define MREMAP_MAYMOVE 1 +# define MREMAP_FIXED 2 #endif /* Advice to `madvise'. */ From f56b8b7c820e8e6cf44a80a4e2c9b2ba5e48aa47 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Mon, 31 Oct 2005 20:49:25 +0000 Subject: [PATCH 3471/4487] * sysdeps/arm/eabi/Makefile (static-only-routines): Remove $(aeabi_routines). * sysdeps/arm/eabi/Versions (GLIBC_2.4): Add ARM EABI portability routines. * sysdeps/arm/eabi/aeabi_assert.c, sysdeps/arm/eabi/aeabi_atexit.c, sysdeps/arm/eabi/aeabi_errno_addr.c, sysdeps/arm/eabi/aeabi_localeconv.c, sysdeps/arm/eabi/aeabi_mb_cur_max.c, sysdeps/arm/eabi/aeabi_memclr.c, sysdeps/arm/eabi/aeabi_memcpy.c, sysdeps/arm/eabi/aeabi_memmove.c, sysdeps/arm/eabi/aeabi_memset.c: Remove attribute_hidden. --- ChangeLog.arm | 13 +++++++++++++ sysdeps/arm/eabi/Makefile | 2 +- sysdeps/arm/eabi/Versions | 11 +++++++++++ sysdeps/arm/eabi/aeabi_assert.c | 4 ++-- sysdeps/arm/eabi/aeabi_atexit.c | 2 +- sysdeps/arm/eabi/aeabi_errno_addr.c | 3 +-- sysdeps/arm/eabi/aeabi_localeconv.c | 3 +-- sysdeps/arm/eabi/aeabi_mb_cur_max.c | 4 ++-- sysdeps/arm/eabi/aeabi_memclr.c | 6 +++--- sysdeps/arm/eabi/aeabi_memcpy.c | 6 +++--- sysdeps/arm/eabi/aeabi_memmove.c | 6 +++--- sysdeps/arm/eabi/aeabi_memset.c | 6 +++--- 12 files changed, 44 insertions(+), 22 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 38bfdf06e0..5a2725060f 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,16 @@ +2005-10-31 Daniel Jacobowitz + + * sysdeps/arm/eabi/Makefile (static-only-routines): Remove + $(aeabi_routines). + * sysdeps/arm/eabi/Versions (GLIBC_2.4): Add ARM EABI portability + routines. + * sysdeps/arm/eabi/aeabi_assert.c, sysdeps/arm/eabi/aeabi_atexit.c, + sysdeps/arm/eabi/aeabi_errno_addr.c, + sysdeps/arm/eabi/aeabi_localeconv.c, + sysdeps/arm/eabi/aeabi_mb_cur_max.c, sysdeps/arm/eabi/aeabi_memclr.c, + sysdeps/arm/eabi/aeabi_memcpy.c, sysdeps/arm/eabi/aeabi_memmove.c, + sysdeps/arm/eabi/aeabi_memset.c: Remove attribute_hidden. + 2005-10-31 Daniel Jacobowitz * sysdeps/unix/sysv/linux/arm/bits/mman.h (MREMAP_FIXED): Define. diff --git a/sysdeps/arm/eabi/Makefile b/sysdeps/arm/eabi/Makefile index 34b0027e35..0f92d7ad42 100644 --- a/sysdeps/arm/eabi/Makefile +++ b/sysdeps/arm/eabi/Makefile @@ -5,7 +5,7 @@ aeabi_routines = aeabi_assert aeabi_localeconv aeabi_errno_addr \ aeabi_memmove aeabi_memset sysdep_routines += $(aeabi_constants) $(aeabi_routines) -static-only-routines += $(aeabi_constants) $(aeabi_routines) +static-only-routines += $(aeabi_constants) # get offset to rtld_global._dl_hwcap gen-as-const-headers += rtld-global-offsets.sym diff --git a/sysdeps/arm/eabi/Versions b/sysdeps/arm/eabi/Versions index 6d7a73421a..ca51099cd4 100644 --- a/sysdeps/arm/eabi/Versions +++ b/sysdeps/arm/eabi/Versions @@ -1,5 +1,16 @@ libc { GLIBC_2.4 { + # ARM EABI compatibility routines + __aeabi_assert; + __aeabi_atexit; + __aeabi_errno_addr; + __aeabi_localeconv; + __aeabi_MB_CUR_MAX; + __aeabi_memclr; __aeabi_memclr4; __aeabi_memclr8; + __aeabi_memcpy; __aeabi_memcpy4; __aeabi_memcpy8; + __aeabi_memmove; __aeabi_memmove4; __aeabi_memmove8; + __aeabi_memset; __aeabi_memset4; __aeabi_memset8; + # Helper routines __gnu_Unwind_Find_exidx; } diff --git a/sysdeps/arm/eabi/aeabi_assert.c b/sysdeps/arm/eabi/aeabi_assert.c index ccedbe609b..14801c2643 100644 --- a/sysdeps/arm/eabi/aeabi_assert.c +++ b/sysdeps/arm/eabi/aeabi_assert.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2004 Free Software Foundation, Inc. +/* Copyright (C) 2004, 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 @@ -19,7 +19,7 @@ #include #include -void attribute_hidden +void __aeabi_assert (const char *assertion, const char *file, unsigned int line) { diff --git a/sysdeps/arm/eabi/aeabi_atexit.c b/sysdeps/arm/eabi/aeabi_atexit.c index b12cda48e2..697f54ce9e 100644 --- a/sysdeps/arm/eabi/aeabi_atexit.c +++ b/sysdeps/arm/eabi/aeabi_atexit.c @@ -21,7 +21,7 @@ /* Register a function to be called by exit or when a shared library is unloaded. This routine is like __cxa_atexit, but uses the calling sequence required by the ARM EABI. */ -int attribute_hidden +int __aeabi_atexit (void *arg, void (*func) (void *), void *d) { return __cxa_atexit (func, arg, d); diff --git a/sysdeps/arm/eabi/aeabi_errno_addr.c b/sysdeps/arm/eabi/aeabi_errno_addr.c index 748edd3ba1..09bdc1efe5 100644 --- a/sysdeps/arm/eabi/aeabi_errno_addr.c +++ b/sysdeps/arm/eabi/aeabi_errno_addr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2004 Free Software Foundation, Inc. +/* Copyright (C) 2004, 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 @@ -18,7 +18,6 @@ #include -attribute_hidden volatile int * __aeabi_errno_addr (void) { diff --git a/sysdeps/arm/eabi/aeabi_localeconv.c b/sysdeps/arm/eabi/aeabi_localeconv.c index 2dd82df218..f4e51d02e8 100644 --- a/sysdeps/arm/eabi/aeabi_localeconv.c +++ b/sysdeps/arm/eabi/aeabi_localeconv.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2004 Free Software Foundation, Inc. +/* Copyright (C) 2004, 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 @@ -18,7 +18,6 @@ #include -attribute_hidden struct lconv * __aeabi_localeconv (void) { diff --git a/sysdeps/arm/eabi/aeabi_mb_cur_max.c b/sysdeps/arm/eabi/aeabi_mb_cur_max.c index 62e4c4bba0..866da795d9 100644 --- a/sysdeps/arm/eabi/aeabi_mb_cur_max.c +++ b/sysdeps/arm/eabi/aeabi_mb_cur_max.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2004 Free Software Foundation, Inc. +/* Copyright (C) 2004, 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 @@ -21,7 +21,7 @@ #include #include -int attribute_hidden +int __aeabi_MB_CUR_MAX (void) { return MB_CUR_MAX; diff --git a/sysdeps/arm/eabi/aeabi_memclr.c b/sysdeps/arm/eabi/aeabi_memclr.c index 8add8afcea..986de85edd 100644 --- a/sysdeps/arm/eabi/aeabi_memclr.c +++ b/sysdeps/arm/eabi/aeabi_memclr.c @@ -20,12 +20,12 @@ /* Clear memory. Can't alias to bzero because it's not defined in the same translation unit. */ -void attribute_hidden +void __aeabi_memclr (void *dest, size_t n) { __bzero (dest, n); } /* Versions of the above which may assume memory alignment. */ -strong_alias (__aeabi_memclr, attribute_hidden __aeabi_memclr4) -strong_alias (__aeabi_memclr, attribute_hidden __aeabi_memclr8) +strong_alias (__aeabi_memclr, __aeabi_memclr4) +strong_alias (__aeabi_memclr, __aeabi_memclr8) diff --git a/sysdeps/arm/eabi/aeabi_memcpy.c b/sysdeps/arm/eabi/aeabi_memcpy.c index d7cd40313e..7d7c47ba3c 100644 --- a/sysdeps/arm/eabi/aeabi_memcpy.c +++ b/sysdeps/arm/eabi/aeabi_memcpy.c @@ -21,12 +21,12 @@ /* Copy memory like memcpy, but no return value required. Can't alias to memcpy because it's not defined in the same translation unit. */ -void attribute_hidden +void __aeabi_memcpy (void *dest, const void *src, size_t n) { memcpy (dest, src, n); } /* Versions of the above which may assume memory alignment. */ -strong_alias (__aeabi_memcpy, attribute_hidden __aeabi_memcpy4) -strong_alias (__aeabi_memcpy, attribute_hidden __aeabi_memcpy8) +strong_alias (__aeabi_memcpy, __aeabi_memcpy4) +strong_alias (__aeabi_memcpy, __aeabi_memcpy8) diff --git a/sysdeps/arm/eabi/aeabi_memmove.c b/sysdeps/arm/eabi/aeabi_memmove.c index 32ed3b1383..b2a4e35318 100644 --- a/sysdeps/arm/eabi/aeabi_memmove.c +++ b/sysdeps/arm/eabi/aeabi_memmove.c @@ -21,12 +21,12 @@ /* Copy memory like memmove, but no return value required. Can't alias to memmove because it's not defined in the same translation unit. */ -void attribute_hidden +void __aeabi_memmove (void *dest, const void *src, size_t n) { memmove (dest, src, n); } /* Versions of the above which may assume memory alignment. */ -strong_alias (__aeabi_memmove, attribute_hidden __aeabi_memmove4) -strong_alias (__aeabi_memmove, attribute_hidden __aeabi_memmove8) +strong_alias (__aeabi_memmove, __aeabi_memmove4) +strong_alias (__aeabi_memmove, __aeabi_memmove8) diff --git a/sysdeps/arm/eabi/aeabi_memset.c b/sysdeps/arm/eabi/aeabi_memset.c index d7232af398..ed38bdea5f 100644 --- a/sysdeps/arm/eabi/aeabi_memset.c +++ b/sysdeps/arm/eabi/aeabi_memset.c @@ -20,12 +20,12 @@ /* Set memory like memset, but different argument order and no return value required. */ -void attribute_hidden +void __aeabi_memset (void *dest, size_t n, int c) { memset (dest, c, n); } /* Versions of the above which may assume memory alignment. */ -strong_alias (__aeabi_memset, attribute_hidden __aeabi_memset4) -strong_alias (__aeabi_memset, attribute_hidden __aeabi_memset8) +strong_alias (__aeabi_memset, __aeabi_memset4) +strong_alias (__aeabi_memset, __aeabi_memset8) From ffe91e225254d4bc2c3db3e1f5e2a115535fd265 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Mon, 31 Oct 2005 21:05:09 +0000 Subject: [PATCH 3472/4487] * sysdeps/arm/eabi/aeabi_lcsts.c, sysdeps/arm/eabi/aeabi_math.c, sysdeps/arm/eabi/aeabi_sighandlers.S: Add LGPL exception. --- ChangeLog.arm | 5 +++++ sysdeps/arm/eabi/aeabi_lcsts.c | 17 +++++++++++++++++ sysdeps/arm/eabi/aeabi_math.c | 19 ++++++++++++++++++- sysdeps/arm/eabi/aeabi_sighandlers.S | 17 +++++++++++++++++ 4 files changed, 57 insertions(+), 1 deletion(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 5a2725060f..3b59189f12 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2005-10-31 Daniel Jacobowitz + + * sysdeps/arm/eabi/aeabi_lcsts.c, sysdeps/arm/eabi/aeabi_math.c, + sysdeps/arm/eabi/aeabi_sighandlers.S: Add LGPL exception. + 2005-10-31 Daniel Jacobowitz * sysdeps/arm/eabi/Makefile (static-only-routines): Remove diff --git a/sysdeps/arm/eabi/aeabi_lcsts.c b/sysdeps/arm/eabi/aeabi_lcsts.c index 6ca2ea33a4..99c79851ee 100644 --- a/sysdeps/arm/eabi/aeabi_lcsts.c +++ b/sysdeps/arm/eabi/aeabi_lcsts.c @@ -7,6 +7,23 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + 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 diff --git a/sysdeps/arm/eabi/aeabi_math.c b/sysdeps/arm/eabi/aeabi_math.c index b33330d735..e7f1dbf5f7 100644 --- a/sysdeps/arm/eabi/aeabi_math.c +++ b/sysdeps/arm/eabi/aeabi_math.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2004 Free Software Foundation, Inc. +/* Copyright (C) 2004, 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 @@ -6,6 +6,23 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + 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 diff --git a/sysdeps/arm/eabi/aeabi_sighandlers.S b/sysdeps/arm/eabi/aeabi_sighandlers.S index 586ba88f5c..ff8162e394 100644 --- a/sysdeps/arm/eabi/aeabi_sighandlers.S +++ b/sysdeps/arm/eabi/aeabi_sighandlers.S @@ -7,6 +7,23 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + 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 From 4962a991a381451841f0c19650e487198e341247 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Thu, 3 Nov 2005 14:42:00 +0000 Subject: [PATCH 3473/4487] * sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S: Add LGPL exception. --- ChangeLog.arm | 4 ++++ sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S | 17 +++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/ChangeLog.arm b/ChangeLog.arm index 3b59189f12..1379078210 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,7 @@ +2005-11-03 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S: Add LGPL exception. + 2005-10-31 Daniel Jacobowitz * sysdeps/arm/eabi/aeabi_lcsts.c, sysdeps/arm/eabi/aeabi_math.c, diff --git a/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S b/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S index 4a7b951ed6..7691a94b1e 100644 --- a/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S +++ b/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S @@ -6,6 +6,23 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + 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 From eb519ed7bc401867a2975bc445515369bd8c8072 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 6 Nov 2005 02:05:16 +0000 Subject: [PATCH 3474/4487] Remove use of HAVE_GNU_LD. --- sysdeps/unix/bsd/sun/m68k/brk.S | 6 +----- sysdeps/unix/bsd/sun/m68k/sethostid.S | 6 +----- sysdeps/unix/bsd/sun/sparc/sethostid.S | 5 +---- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/sysdeps/unix/bsd/sun/m68k/brk.S b/sysdeps/unix/bsd/sun/m68k/brk.S index 07af96d23c..9f821a0604 100644 --- a/sysdeps/unix/bsd/sun/m68k/brk.S +++ b/sysdeps/unix/bsd/sun/m68k/brk.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1994, 1995, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991,1992,1994,1995,1997,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 @@ -22,10 +22,6 @@ #define SYS_brk 17 #endif -#ifndef HAVE_GNU_LD -#define __end _end -#endif - .data .globl ___curbrk ___curbrk: diff --git a/sysdeps/unix/bsd/sun/m68k/sethostid.S b/sysdeps/unix/bsd/sun/m68k/sethostid.S index 73ee79682e..13af476df7 100644 --- a/sysdeps/unix/bsd/sun/m68k/sethostid.S +++ b/sysdeps/unix/bsd/sun/m68k/sethostid.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1997, 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 @@ -34,11 +34,7 @@ _sethostid: moveq #-1, d0 rts -#ifdef HAVE_GNU_LD - .stabs "warning: sethostid is not implemented and will always fail",30,0,0,0 .stabs "_sethostid",1,0,0,0 #endif - -#endif diff --git a/sysdeps/unix/bsd/sun/sparc/sethostid.S b/sysdeps/unix/bsd/sun/sparc/sethostid.S index d07fd3800c..100fb1c1ca 100644 --- a/sysdeps/unix/bsd/sun/sparc/sethostid.S +++ b/sysdeps/unix/bsd/sun/sparc/sethostid.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1997, 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 @@ -36,11 +36,8 @@ ENTRY (sethostid) retl sub %g0, 1, %o0 -#ifdef HAVE_GNU_LD .stabs "warning: sethostid is not implemented and will always fail",30,0,0,0 .stabs "_sethostid",1,0,0,0 #endif - -#endif From 0ff54449d657d4559e655846d81b920258a7447e Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 10 Nov 2005 00:56:23 +0000 Subject: [PATCH 3475/4487] 2005-10-11 Steven Munroe * sysdeps/powerpc/nofpu/fesetround.c: Add libm_hidden_def. --- sysdeps/powerpc/nofpu/fesetround.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/powerpc/nofpu/fesetround.c b/sysdeps/powerpc/nofpu/fesetround.c index 842614a974..a5f8367278 100644 --- a/sysdeps/powerpc/nofpu/fesetround.c +++ b/sysdeps/powerpc/nofpu/fesetround.c @@ -31,3 +31,4 @@ fesetround (int round) return 0; } +libm_hidden_def (fesetround) From 105d6c8a15b66ef8681636be1c34ae0477e066a5 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 10 Nov 2005 00:57:19 +0000 Subject: [PATCH 3476/4487] . --- ChangeLog.powerpc | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 ChangeLog.powerpc diff --git a/ChangeLog.powerpc b/ChangeLog.powerpc new file mode 100644 index 0000000000..7136a0bfa5 --- /dev/null +++ b/ChangeLog.powerpc @@ -0,0 +1,3 @@ +2005-10-11 Steven Munroe + + * sysdeps/powerpc/nofpu/fesetround.c: Add libm_hidden_def. From 421e9748727643a89404fba439c4a235c2fa9a4e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 11 Nov 2005 19:15:37 +0000 Subject: [PATCH 3477/4487] Linux/Alpha fxstatat implementation. --- sysdeps/unix/sysv/linux/alpha/fxstatat.c | 100 +++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/fxstatat.c diff --git a/sysdeps/unix/sysv/linux/alpha/fxstatat.c b/sysdeps/unix/sysv/linux/alpha/fxstatat.c new file mode 100644 index 0000000000..65b7ad97a3 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/fxstatat.c @@ -0,0 +1,100 @@ +/* Copyright (C) 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 + 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. */ + +#define __fxstatat64 __fxstatat64_disable + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#undef __fxstatat64 + + +/* Get information about the file NAME in BUF. */ +int +__fxstatat (int vers, int fd, const char *file, struct stat *st, int flag) +{ + if (flag & ~AT_SYMLINK_NOFOLLOW) + { + __set_errno (EINVAL); + return -1; + } + + char *buf = NULL; + + if (fd != AT_FDCWD && file[0] != '/') + { + size_t filelen = strlen (file); + static const char procfd[] = "/proc/self/fd/%d/%s"; + /* Buffer for the path name we are going to use. It consists of + - the string /proc/self/fd/ + - the file descriptor number + - the file name provided. + The final NUL is included in the sizeof. A bit of overhead + due to the format elements compensates for possible negative + numbers. */ + size_t buflen = sizeof (procfd) + sizeof (int) * 3 + filelen; + buf = alloca (buflen); + + __snprintf (buf, buflen, procfd, fd, file); + file = buf; + } + + INTERNAL_SYSCALL_DECL (err); + int result, errno_out; + struct kernel_stat kst; + + if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64) + { + if (flags & AT_SYMLINK_NOFOLLOW) + result = INTERNAL_SYSCALL (lstat64, err, 2, file, st); + else + result = INTERNAL_SYSCALL (stat64, err, 2, file, st); + + if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) + return result; + errno_out = INTERNAL_SYSCALL_ERRNO (result, err); + if (errno_out != ENOSYS) + goto fail; + __libc_missing_axp_stat64 = 1; + } + + if (flag & AT_SYMLINK_NOFOLLOW) + result = INTERNAL_SYSCALL (lstat, err, 2, file, &kst); + else + result = INTERNAL_SYSCALL (stat, err, 2, file, &kst); + + if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) + return __xstat_conv (vers, &kst, st); + errno_out = INTERNAL_SYSCALL_ERRNO (result, err); + + fail: + __atfct_seterrno (errno_out, fd, buf); + + return -1; +} +hidden_def (__xstat) +weak_alias (__xstat, _xstat); +strong_alias (__xstat, __xstat64); +hidden_ver (__xstat, __xstat64) From e448eedb646d277eb4e7aafe482597dda454d640 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 11 Nov 2005 19:17:50 +0000 Subject: [PATCH 3478/4487] Linux/m68k fxstatat implementation. --- sysdeps/unix/sysv/linux/m68k/fxstatat.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/fxstatat.c diff --git a/sysdeps/unix/sysv/linux/m68k/fxstatat.c b/sysdeps/unix/sysv/linux/m68k/fxstatat.c new file mode 100644 index 0000000000..0f8b3135d8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/fxstatat.c @@ -0,0 +1 @@ +#include From c80f86b75e65a277c6999d07d7cb72bdbe02d281 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 11 Nov 2005 19:42:24 +0000 Subject: [PATCH 3479/4487] Linux/m68k fchownat implementation. --- sysdeps/unix/sysv/linux/m68k/fchownat.c | 121 ++++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/fchownat.c diff --git a/sysdeps/unix/sysv/linux/m68k/fchownat.c b/sysdeps/unix/sysv/linux/m68k/fchownat.c new file mode 100644 index 0000000000..71df4feda7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/fchownat.c @@ -0,0 +1,121 @@ +/* Copyright (C) 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 + 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. */ + +#include +#include +#include +#include + +#include +#include +#include + +#include +#include "kernel-features.h" + +#ifdef __NR_chown32 +# if __ASSUME_32BITUIDS == 0 +/* This variable is shared with all files that need to check for 32bit + uids. */ +extern int __libc_missing_32bit_uids; +# endif +#endif /* __NR_chown32 */ + +int +fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag) +{ + if (flag & ~AT_SYMLINK_NOFOLLOW) + { + __set_errno (EINVAL); + return -1; + } + + char *buf = NULL; + + if (fd != AT_FDCWD && file[0] != '/') + { + size_t filelen = strlen (file); + static const char procfd[] = "/proc/self/fd/%d/%s"; + /* Buffer for the path name we are going to use. It consists of + - the string /proc/self/fd/ + - the file descriptor number + - the file name provided. + The final NUL is included in the sizeof. A bit of overhead + due to the format elements compensates for possible negative + numbers. */ + size_t buflen = sizeof (procfd) + sizeof (int) * 3 + filelen; + buf = alloca (buflen); + + __snprintf (buf, buflen, procfd, fd, file); + file = buf; + } + + int result; + INTERNAL_SYSCALL_DECL (err); + +#if __ASSUME_32BITUIDS > 0 + if (flag & AT_SYMLINK_NOFOLLOW) + result = INTERNAL_SYSCALL (lchown32, err, 3, CHECK_STRING (file), owner, + group); + else + result = INTERNAL_SYSCALL (chown32, err, 3, CHECK_STRING (file), owner, + group); +#else +# ifdef __NR_chown32 + if (__libc_missing_32bit_uids <= 0) + { + if (flag & AT_SYMLINK_NOFOLLOW) + result = INTERNAL_SYSCALL (lchown32, err, 3, CHECK_STRING (file), + owner, group); + else + result = INTERNAL_SYSCALL (chown32, err, 3, CHECK_STRING (file), owner, + group); + + if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) + return result; + if (INTERNAL_SYSCALL_ERRNO (result, err) != ENOSYS) + goto fail; + + __libc_missing_32bit_uids = 1; + } +# endif /* __NR_chown32 */ + + if (((owner + 1) > (gid_t) ((__kernel_uid_t) -1U)) + || ((group + 1) > (gid_t) ((__kernel_gid_t) -1U))) + { + __set_errno (EINVAL); + return -1; + } + + if (flag & AT_SYMLINK_NOFOLLOW) + result = INTERNAL_SYSCALL (lchown, err, 3, CHECK_STRING (file), owner, + group); + else + result = INTERNAL_SYSCALL (chown, err, 3, CHECK_STRING (file), owner, + group); +#endif + + if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 0)) + { + fail: + __atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), fd, buf); + result = -1; + } + + return result; +} From de96d1483f365654270a4291e11ed257a2687322 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Wed, 16 Nov 2005 18:08:53 +0000 Subject: [PATCH 3480/4487] * sysdeps/arm/dl-machine.h (CLEAR_CACHE): Use INTERNAL_SYSCALL_ARM. * sysdeps/unix/sysv/linux/arm/brk.c (__brk): Use INLINE_SYSCALL. * sysdeps/unix/sysv/linux/arm/clone.S (__clone): Use DO_CALL. * sysdeps/unix/sysv/linux/arm/eabi/configure.in: Bump arch_minimum_kernel. * sysdeps/unix/sysv/linux/arm/eabi/configure: Regenerated. * sysdeps/unix/sysv/linux/arm/eabi/epoll_ctl.c, sysdeps/unix/sysv/linux/arm/eabi/epoll_wait.c, sysdeps/unix/sysv/linux/arm/eabi/fcntl.c, sysdeps/unix/sysv/linux/arm/eabi/fstatfs64.c, sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c, sysdeps/unix/sysv/linux/arm/eabi/fxstat64.c, sysdeps/unix/sysv/linux/arm/eabi/kernel_epoll.h, sysdeps/unix/sysv/linux/arm/eabi/kernel_stat.h, sysdeps/unix/sysv/linux/arm/eabi/lockf64.c, sysdeps/unix/sysv/linux/arm/eabi/lxstat64.c, sysdeps/unix/sysv/linux/arm/eabi/semop.c, sysdeps/unix/sysv/linux/arm/eabi/semtimedop.c, sysdeps/unix/sysv/linux/arm/eabi/statfs64.c, sysdeps/unix/sysv/linux/arm/eabi/syscalls.list, sysdeps/unix/sysv/linux/arm/eabi/uname.c, sysdeps/unix/sysv/linux/arm/eabi/xstat64.c, sysdeps/unix/sysv/linux/arm/eabi/xstatconv.c, sysdeps/unix/sysv/linux/arm/eabi/xstatconv.h: Removed. * sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h, sysdeps/unix/sysv/linux/arm/eabi/mmap64.S, sysdeps/unix/sysv/linux/arm/eabi/pread.c, sysdeps/unix/sysv/linux/arm/eabi/pread64.c, sysdeps/unix/sysv/linux/arm/eabi/pwrite.c, sysdeps/unix/sysv/linux/arm/eabi/pwrite64.c, sysdeps/unix/sysv/linux/arm/eabi/readahead.c, sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S, sysdeps/unix/sysv/linux/arm/eabi/socket.S, sysdeps/unix/sysv/linux/arm/eabi/syscall.S, sysdeps/unix/sysv/linux/arm/eabi/sysdep.h, sysdeps/unix/sysv/linux/arm/eabi/truncate64.c: New files. * sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h (SINGLE_THREAD_P_INT, SINGLE_THREAD_P_PIC): Removed. (SINGLE_THREAD_P): Rewritten to use only ip. * sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S (__vfork): Use DO_CALL. * sysdeps/unix/sysv/linux/arm/mmap.S (__mmap): Use DO_CALL. * sysdeps/unix/sysv/linux/arm/mmap64.S (__mmap64): Use DO_CALL. Don't handle EABI here. * sysdeps/unix/sysv/linux/arm/socket.S (__socket): Use SINGLE_THREAD_P. * sysdeps/unix/sysv/linux/arm/vfork.S (__vfork): Use DO_CALL. --- ChangeLog.arm | 50 +++ sysdeps/arm/dl-machine.h | 10 +- sysdeps/unix/sysv/linux/arm/brk.c | 11 +- sysdeps/unix/sysv/linux/arm/clone.S | 5 +- sysdeps/unix/sysv/linux/arm/eabi/configure | 2 +- sysdeps/unix/sysv/linux/arm/eabi/configure.in | 2 +- sysdeps/unix/sysv/linux/arm/eabi/epoll_wait.c | 54 --- sysdeps/unix/sysv/linux/arm/eabi/fcntl.c | 229 ------------ sysdeps/unix/sysv/linux/arm/eabi/fstatfs64.c | 76 ---- .../unix/sysv/linux/arm/eabi/ftruncate64.c | 77 ++++ sysdeps/unix/sysv/linux/arm/eabi/fxstat64.c | 100 ----- .../unix/sysv/linux/arm/eabi/kernel_stat.h | 59 --- .../arm/eabi/linuxthreads/sysdep-cancel.h | 112 ++++++ sysdeps/unix/sysv/linux/arm/eabi/lockf64.c | 202 ----------- sysdeps/unix/sysv/linux/arm/eabi/lxstat64.c | 99 ----- sysdeps/unix/sysv/linux/arm/eabi/mmap64.S | 56 +++ sysdeps/unix/sysv/linux/arm/eabi/pread.c | 61 ++++ sysdeps/unix/sysv/linux/arm/eabi/pread64.c | 63 ++++ sysdeps/unix/sysv/linux/arm/eabi/pwrite.c | 61 ++++ sysdeps/unix/sysv/linux/arm/eabi/pwrite64.c | 64 ++++ .../linux/arm/eabi/{uname.c => readahead.c} | 44 ++- sysdeps/unix/sysv/linux/arm/eabi/semop.c | 67 ---- sysdeps/unix/sysv/linux/arm/eabi/semtimedop.c | 69 ---- .../arm/eabi/{epoll_ctl.c => sigrestorer.S} | 26 +- sysdeps/unix/sysv/linux/arm/eabi/socket.S | 127 +++++++ sysdeps/unix/sysv/linux/arm/eabi/statfs64.c | 77 ---- .../arm/eabi/{kernel_epoll.h => syscall.S} | 25 +- .../unix/sysv/linux/arm/eabi/syscalls.list | 4 - sysdeps/unix/sysv/linux/arm/eabi/sysdep.h | 72 ++++ sysdeps/unix/sysv/linux/arm/eabi/truncate64.c | 75 ++++ sysdeps/unix/sysv/linux/arm/eabi/xstat64.c | 103 ------ sysdeps/unix/sysv/linux/arm/eabi/xstatconv.c | 341 ------------------ sysdeps/unix/sysv/linux/arm/eabi/xstatconv.h | 28 -- .../linux/arm/linuxthreads/sysdep-cancel.h | 24 +- .../unix/sysv/linux/arm/linuxthreads/vfork.S | 8 +- sysdeps/unix/sysv/linux/arm/mmap.S | 6 +- sysdeps/unix/sysv/linux/arm/mmap64.S | 18 +- sysdeps/unix/sysv/linux/arm/socket.S | 4 - sysdeps/unix/sysv/linux/arm/vfork.S | 6 +- 39 files changed, 905 insertions(+), 1612 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/arm/eabi/epoll_wait.c delete mode 100644 sysdeps/unix/sysv/linux/arm/eabi/fcntl.c delete mode 100644 sysdeps/unix/sysv/linux/arm/eabi/fstatfs64.c create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c delete mode 100644 sysdeps/unix/sysv/linux/arm/eabi/fxstat64.c delete mode 100644 sysdeps/unix/sysv/linux/arm/eabi/kernel_stat.h create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h delete mode 100644 sysdeps/unix/sysv/linux/arm/eabi/lockf64.c delete mode 100644 sysdeps/unix/sysv/linux/arm/eabi/lxstat64.c create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/mmap64.S create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/pread.c create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/pread64.c create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/pwrite.c create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/pwrite64.c rename sysdeps/unix/sysv/linux/arm/eabi/{uname.c => readahead.c} (59%) delete mode 100644 sysdeps/unix/sysv/linux/arm/eabi/semop.c delete mode 100644 sysdeps/unix/sysv/linux/arm/eabi/semtimedop.c rename sysdeps/unix/sysv/linux/arm/eabi/{epoll_ctl.c => sigrestorer.S} (63%) create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/socket.S delete mode 100644 sysdeps/unix/sysv/linux/arm/eabi/statfs64.c rename sysdeps/unix/sysv/linux/arm/eabi/{kernel_epoll.h => syscall.S} (64%) delete mode 100644 sysdeps/unix/sysv/linux/arm/eabi/syscalls.list create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/sysdep.h create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/truncate64.c delete mode 100644 sysdeps/unix/sysv/linux/arm/eabi/xstat64.c delete mode 100644 sysdeps/unix/sysv/linux/arm/eabi/xstatconv.c delete mode 100644 sysdeps/unix/sysv/linux/arm/eabi/xstatconv.h diff --git a/ChangeLog.arm b/ChangeLog.arm index 1379078210..21e15ce897 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,53 @@ +2005-11-16 Daniel Jacobowitz + + * sysdeps/arm/dl-machine.h (CLEAR_CACHE): Use INTERNAL_SYSCALL_ARM. + * sysdeps/unix/sysv/linux/arm/brk.c (__brk): Use INLINE_SYSCALL. + * sysdeps/unix/sysv/linux/arm/clone.S (__clone): Use DO_CALL. + * sysdeps/unix/sysv/linux/arm/eabi/configure.in: Bump + arch_minimum_kernel. + * sysdeps/unix/sysv/linux/arm/eabi/configure: Regenerated. + * sysdeps/unix/sysv/linux/arm/eabi/epoll_ctl.c, + sysdeps/unix/sysv/linux/arm/eabi/epoll_wait.c, + sysdeps/unix/sysv/linux/arm/eabi/fcntl.c, + sysdeps/unix/sysv/linux/arm/eabi/fstatfs64.c, + sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c, + sysdeps/unix/sysv/linux/arm/eabi/fxstat64.c, + sysdeps/unix/sysv/linux/arm/eabi/kernel_epoll.h, + sysdeps/unix/sysv/linux/arm/eabi/kernel_stat.h, + sysdeps/unix/sysv/linux/arm/eabi/lockf64.c, + sysdeps/unix/sysv/linux/arm/eabi/lxstat64.c, + sysdeps/unix/sysv/linux/arm/eabi/semop.c, + sysdeps/unix/sysv/linux/arm/eabi/semtimedop.c, + sysdeps/unix/sysv/linux/arm/eabi/statfs64.c, + sysdeps/unix/sysv/linux/arm/eabi/syscalls.list, + sysdeps/unix/sysv/linux/arm/eabi/uname.c, + sysdeps/unix/sysv/linux/arm/eabi/xstat64.c, + sysdeps/unix/sysv/linux/arm/eabi/xstatconv.c, + sysdeps/unix/sysv/linux/arm/eabi/xstatconv.h: Removed. + * sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h, + sysdeps/unix/sysv/linux/arm/eabi/mmap64.S, + sysdeps/unix/sysv/linux/arm/eabi/pread.c, + sysdeps/unix/sysv/linux/arm/eabi/pread64.c, + sysdeps/unix/sysv/linux/arm/eabi/pwrite.c, + sysdeps/unix/sysv/linux/arm/eabi/pwrite64.c, + sysdeps/unix/sysv/linux/arm/eabi/readahead.c, + sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S, + sysdeps/unix/sysv/linux/arm/eabi/socket.S, + sysdeps/unix/sysv/linux/arm/eabi/syscall.S, + sysdeps/unix/sysv/linux/arm/eabi/sysdep.h, + sysdeps/unix/sysv/linux/arm/eabi/truncate64.c: New files. + * sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h + (SINGLE_THREAD_P_INT, SINGLE_THREAD_P_PIC): Removed. + (SINGLE_THREAD_P): Rewritten to use only ip. + * sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S (__vfork): Use + DO_CALL. + * sysdeps/unix/sysv/linux/arm/mmap.S (__mmap): Use DO_CALL. + * sysdeps/unix/sysv/linux/arm/mmap64.S (__mmap64): Use DO_CALL. + Don't handle EABI here. + * sysdeps/unix/sysv/linux/arm/socket.S (__socket): Use + SINGLE_THREAD_P. + * sysdeps/unix/sysv/linux/arm/vfork.S (__vfork): Use DO_CALL. + 2005-11-03 Daniel Jacobowitz * sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S: Add LGPL exception. diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 8011706580..f176ff1372 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -35,15 +35,7 @@ && VALID_ELF_ABIVERSION (hdr[EI_ABIVERSION]) #define CLEAR_CACHE(BEG,END) \ -{ \ - register unsigned long _beg __asm ("a1") = (unsigned long)(BEG); \ - register unsigned long _end __asm ("a2") = (unsigned long)(END); \ - register unsigned long _flg __asm ("a3") = 0; \ - __asm __volatile ("swi 0x9f0002 @ sys_cacheflush" \ - : /* no outputs */ \ - : /* no inputs */ \ - : "a1"); \ -} + INTERNAL_SYSCALL_ARM (cacheflush, , 3, (BEG), (END), 0) /* Return nonzero iff ELF header is compatible with the running host. */ static inline int __attribute__ ((unused)) diff --git a/sysdeps/unix/sysv/linux/arm/brk.c b/sysdeps/unix/sysv/linux/arm/brk.c index 153d89358a..842688a76c 100644 --- a/sysdeps/unix/sysv/linux/arm/brk.c +++ b/sysdeps/unix/sysv/linux/arm/brk.c @@ -1,5 +1,5 @@ /* brk system call for Linux/ARM. - Copyright (C) 1995, 1996 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 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 @@ -29,14 +29,7 @@ __brk (void *addr) { void *newbrk; - asm ("mov a1, %1\n" /* save the argment in r0 */ - "swi %2\n" /* do the system call */ - "mov %0, a1;" /* keep the return value */ - : "=r"(newbrk) - : "r"(addr), "i" (SYS_ify (brk)) - : "a1"); - - __curbrk = newbrk; + __curbrk = newbrk = (void *) INLINE_SYSCALL (brk, 1, addr); if (newbrk < addr) { diff --git a/sysdeps/unix/sysv/linux/arm/clone.S b/sysdeps/unix/sysv/linux/arm/clone.S index bf07fb3952..b46281c432 100644 --- a/sysdeps/unix/sysv/linux/arm/clone.S +++ b/sysdeps/unix/sysv/linux/arm/clone.S @@ -1,4 +1,5 @@ -/* Copyright (C) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998, 1999, 2002, 2005 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Pat Beirne @@ -42,7 +43,7 @@ ENTRY(__clone) @ get flags mov r0, r2 @ new sp is already in r1 - swi SYS_ify(clone) + DO_CALL (clone, 0) movs a1, a1 blt PLTJMP(C_SYMBOL_NAME(__syscall_error)) RETINSTR(ne, lr) diff --git a/sysdeps/unix/sysv/linux/arm/eabi/configure b/sysdeps/unix/sysv/linux/arm/eabi/configure index bb6a261fb7..ab83048894 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/configure +++ b/sysdeps/unix/sysv/linux/arm/eabi/configure @@ -1,5 +1,5 @@ # This file is generated from configure.in by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/unix/sysv/linux/arm/eabi. -arch_minimum_kernel=2.4.17 +arch_minimum_kernel=2.6.14 libc_cv_gcc_unwind_find_fde=no diff --git a/sysdeps/unix/sysv/linux/arm/eabi/configure.in b/sysdeps/unix/sysv/linux/arm/eabi/configure.in index 14c25a5ccd..83aa8fccb4 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/configure.in +++ b/sysdeps/unix/sysv/linux/arm/eabi/configure.in @@ -1,5 +1,5 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. # Local configure fragment for sysdeps/unix/sysv/linux/arm/eabi. -arch_minimum_kernel=2.4.17 +arch_minimum_kernel=2.6.14 libc_cv_gcc_unwind_find_fde=no diff --git a/sysdeps/unix/sysv/linux/arm/eabi/epoll_wait.c b/sysdeps/unix/sysv/linux/arm/eabi/epoll_wait.c deleted file mode 100644 index 463e30fb14..0000000000 --- a/sysdeps/unix/sysv/linux/arm/eabi/epoll_wait.c +++ /dev/null @@ -1,54 +0,0 @@ -/* epoll_ctl wrapper for ARM EABI. - Copyright (C) 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 - 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. */ - -#include -#include -#include -#include - -#include - -int -epoll_wait (int __epfd, struct epoll_event *__events, - int __maxevents, int __timeout); -{ - struct kernel_epoll_event *k_events; - int result; - - k_events = malloc (sizeof (struct kernel_epoll_event) * __maxevents); - if (k_events == NULL) - { - __set_errno (ENOMEM); - return -1; - } - - result = INLINE_SYSCALL (epoll_wait, 4, __epfd, __events, k_events, - __timeout); - - for (i = 0; i < result; i++) - { - __events[i].events = k_events[i].events; - memcpy (&__events[i].data, &k_events[i].data, sizeof (k_events[i].data)); - } - - free (k_events); - return result; -} - -libc_hidden_def (epoll_wait) diff --git a/sysdeps/unix/sysv/linux/arm/eabi/fcntl.c b/sysdeps/unix/sysv/linux/arm/eabi/fcntl.c deleted file mode 100644 index 7394c6aab6..0000000000 --- a/sysdeps/unix/sysv/linux/arm/eabi/fcntl.c +++ /dev/null @@ -1,229 +0,0 @@ -/* Copyright (C) 2000, 2002, 2003, 2004 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. */ - -#include -#include -#include /* Must come before . */ -#include -#include - -#include -#include "kernel-features.h" - -#if __ASSUME_FCNTL64 == 0 -/* This variable is shared with all files that check for fcntl64. */ -int __have_no_fcntl64; -#endif - -struct kernel_flock64 { - short l_type; - short l_whence; - off64_t l_start; - off64_t l_len; - pid_t l_pid; -} __attribute__((packed)); - -#if defined NO_CANCELLATION && __ASSUME_FCNTL64 == 0 -# define __fcntl_nocancel __libc_fcntl -#endif - -static inline void -__flock64_to_kernel (struct kernel_flock64 *kfl64, - const struct flock64 *fl64) -{ - kfl64->l_type = fl64->l_type; - kfl64->l_whence = fl64->l_whence; - kfl64->l_start = fl64->l_start; - kfl64->l_len = fl64->l_len; - kfl64->l_pid = fl64->l_pid; -} - -static inline void -__flock64_from_kernel (struct flock64 *fl64, - const struct kernel_flock64 *kfl64) -{ - fl64->l_type = kfl64->l_type; - fl64->l_whence = kfl64->l_whence; - fl64->l_start = kfl64->l_start; - fl64->l_len = kfl64->l_len; - fl64->l_pid = kfl64->l_pid; -} - -#if !defined NO_CANCELLATION || __ASSUME_FCNTL64 == 0 -int -__fcntl_nocancel (int fd, int cmd, ...) -{ - va_list ap; - void *arg; - struct kernel_flock64 kfl; - struct flock64 *orig_arg; - - va_start (ap, cmd); - arg = va_arg (ap, void *); - va_end (ap); - -#if __ASSUME_FCNTL64 == 0 -# ifdef __NR_fcntl64 - if (! __have_no_fcntl64) - { - orig_arg = arg; - if (cmd == F_GETLK64 || cmd == F_SETLK64 || cmd == F_SETLKW64) - { - arg = &kfl; - __flock64_to_kernel (&kfl, orig_arg); - } - - int result = INLINE_SYSCALL (fcntl64, 3, fd, cmd, arg); - if (result >= 0 || errno != ENOSYS) - { - if (cmd == F_GETLK64 || cmd == F_SETLK64 || cmd == F_SETLKW64) - __flock64_from_kernel (orig_arg, &kfl); - return result; - } - - __have_no_fcntl64 = 1; - } -# endif - switch (cmd) - { - case F_GETLK64: - /* Convert arg from flock64 to flock and back. */ - { - struct flock fl; - struct flock64 *fl64 = arg; - int res; - - fl.l_start = (off_t)fl64->l_start; - /* Check if we can represent the values with the smaller type. */ - if ((off64_t) fl.l_start != fl64->l_start) - { - eoverflow: - __set_errno (EOVERFLOW); - return -1; - } - fl.l_len = (off_t) fl64->l_len; - /* Check if we can represent the values with the smaller type. */ - if ((off64_t) fl.l_len != fl64->l_len) - goto eoverflow; - - fl.l_type = fl64->l_type; - fl.l_whence = fl64->l_whence; - fl.l_pid = fl64->l_pid; - - res = INLINE_SYSCALL (fcntl, 3, fd, F_GETLK, &fl); - if (res != 0) - return res; - /* Everything ok, convert back. */ - fl64->l_type = fl.l_type; - fl64->l_whence = fl.l_whence; - fl64->l_start = fl.l_start; - fl64->l_len = fl.l_len; - fl64->l_pid = fl.l_pid; - - return 0; - } - case F_SETLK64: - case F_SETLKW64: - /* Try to convert arg from flock64 to flock. */ - { - struct flock fl; - struct flock64 *fl64 = arg; - - fl.l_start = (off_t) fl64->l_start; - /* Check if we can represent the values with the smaller type. */ - if ((off64_t) fl.l_start != fl64->l_start) - goto eoverflow; - - fl.l_len = (off_t)fl64->l_len; - /* Check if we can represent the values with the smaller type. */ - if ((off64_t) fl.l_len != fl64->l_len) - { - __set_errno (EOVERFLOW); - return -1; - } - fl.l_type = fl64->l_type; - fl.l_whence = fl64->l_whence; - fl.l_pid = fl64->l_pid; - assert (F_SETLK - F_SETLKW == F_SETLK64 - F_SETLKW64); - return INLINE_SYSCALL (fcntl, 3, fd, cmd + F_SETLK - F_SETLK64, &fl); - } - default: - return INLINE_SYSCALL (fcntl, 3, fd, cmd, arg); - } - return -1; -#else - return INLINE_SYSCALL (fcntl64, 3, fd, cmd, arg); -#endif /* !__ASSUME_FCNTL64 */ -} -#endif /* NO_CANCELLATION || !__ASSUME_FCNTL64 */ - - -#ifndef __fcntl_nocancel -int -__libc_fcntl (int fd, int cmd, ...) -{ - va_list ap; - void *arg; - struct kernel_flock64 kfl; - struct flock64 *orig_arg; - - va_start (ap, cmd); - arg = va_arg (ap, void *); - va_end (ap); - -#if __ASSUME_FCNTL64 > 0 - orig_arg = arg; - if (cmd == F_GETLK64 || cmd == F_SETLK64 || cmd == F_SETLKW64) - { - arg = &kfl; - __flock64_to_kernel (&kfl, orig_arg); - } - - if (SINGLE_THREAD_P || (cmd != F_SETLKW && cmd != F_SETLKW64)) - { - int result = INLINE_SYSCALL (fcntl64, 3, fd, cmd, arg); - if (cmd == F_GETLK64 || cmd == F_SETLK64 || cmd == F_SETLKW64) - __flock64_from_kernel (orig_arg, &kfl); - return result; - } - - int oldtype = LIBC_CANCEL_ASYNC (); - - int result = INLINE_SYSCALL (fcntl64, 3, fd, cmd, arg); - - if (cmd == F_GETLK64 || cmd == F_SETLK64 || cmd == F_SETLKW64) - __flock64_from_kernel (orig_arg, &kfl); -#else - if (SINGLE_THREAD_P || (cmd != F_SETLKW && cmd != F_SETLKW64)) - return __fcntl_nocancel (fd, cmd, arg); - - int oldtype = LIBC_CANCEL_ASYNC (); - - int result = __fcntl_nocancel (fd, cmd, arg); -#endif - - LIBC_CANCEL_RESET (oldtype); - - return result; -} -#endif -libc_hidden_def (__libc_fcntl) - -weak_alias (__libc_fcntl, __fcntl) -libc_hidden_weak (__fcntl) -weak_alias (__libc_fcntl, fcntl) diff --git a/sysdeps/unix/sysv/linux/arm/eabi/fstatfs64.c b/sysdeps/unix/sysv/linux/arm/eabi/fstatfs64.c deleted file mode 100644 index 9057b2c840..0000000000 --- a/sysdeps/unix/sysv/linux/arm/eabi/fstatfs64.c +++ /dev/null @@ -1,76 +0,0 @@ -/* Return information about the filesystem on which FD resides. - Copyright (C) 1996,1997,1998,1999,2000,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 - 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. */ - -#include -#include -#include -#include -#include - -/* Defined in statfs64.c. */ -extern int __no_statfs64 attribute_hidden; - -/* Return information about the filesystem on which FD resides. */ -int -__fstatfs64 (int fd, struct statfs64 *buf) -{ -#ifdef __NR_fstatfs64 -# if __ASSUME_STATFS64 == 0 - if (! __no_statfs64) -# endif - { - /* The EABI structure is the same as the old ABI structure, except - that it has four additional bytes of padding - at the end. We can - ignore them. */ - int result = INLINE_SYSCALL (fstatfs64, 3, fd, sizeof (*buf) - 4, buf); - -# if __ASSUME_STATFS64 == 0 - if (result == 0 || errno != ENOSYS) -# endif - return result; - -# if __ASSUME_STATFS64 == 0 - __no_statfs64 = 1; -# endif - } -#endif - -#if __ASSUME_STATFS64 == 0 - struct statfs buf32; - - if (__fstatfs (fd, &buf32) < 0) - return -1; - - buf->f_type = buf32.f_type; - buf->f_bsize = buf32.f_bsize; - buf->f_blocks = buf32.f_blocks; - buf->f_bfree = buf32.f_bfree; - buf->f_bavail = buf32.f_bavail; - buf->f_files = buf32.f_files; - buf->f_ffree = buf32.f_ffree; - buf->f_fsid = buf32.f_fsid; - buf->f_namelen = buf32.f_namelen; - buf->f_frsize = buf32.f_frsize; - memcpy (buf->f_spare, buf32.f_spare, sizeof (buf32.f_spare)); - - return 0; -#endif -} -weak_alias (__fstatfs64, fstatfs64) diff --git a/sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c b/sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c new file mode 100644 index 0000000000..295d12fd24 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c @@ -0,0 +1,77 @@ +/* Copyright (C) 1997,1998,1999,2000,2001,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 + 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. */ + +#include +#include +#include +#include + +#include +#include + +#include "kernel-features.h" + +#ifdef __NR_ftruncate64 +#ifndef __ASSUME_TRUNCATE64_SYSCALL +/* The variable is shared between all wrappers around *truncate64 calls. */ +extern int __have_no_truncate64; +#endif + + +/* Truncate the file FD refers to to LENGTH bytes. */ +int +__ftruncate64 (int fd, off64_t length) +{ +#ifndef __ASSUME_TRUNCATE64_SYSCALL + if (! __have_no_truncate64) +#endif + { + unsigned int low = length & 0xffffffff; + unsigned int high = length >> 32; +#ifndef __ASSUME_TRUNCATE64_SYSCALL + int saved_errno = errno; +#endif + int result = INLINE_SYSCALL (ftruncate64, 4, fd, 0, + __LONG_LONG_PAIR (high, low)); +#ifndef __ASSUME_TRUNCATE64_SYSCALL + if (result != -1 || errno != ENOSYS) +#endif + return result; + +#ifndef __ASSUME_TRUNCATE64_SYSCALL + __set_errno (saved_errno); + __have_no_truncate64 = 1; +#endif + } + +#ifndef __ASSUME_TRUNCATE64_SYSCALL + if ((off_t) length != length) + { + __set_errno (EINVAL); + return -1; + } + return __ftruncate (fd, (off_t) length); +#endif +} +weak_alias (__ftruncate64, ftruncate64) + +#else +/* Use the generic implementation. */ +# include +#endif diff --git a/sysdeps/unix/sysv/linux/arm/eabi/fxstat64.c b/sysdeps/unix/sysv/linux/arm/eabi/fxstat64.c deleted file mode 100644 index ae6637e2a2..0000000000 --- a/sysdeps/unix/sysv/linux/arm/eabi/fxstat64.c +++ /dev/null @@ -1,100 +0,0 @@ -/* fxstat64 using old-style Unix fstat system call. - Copyright (C) 1997-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 - 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. */ - -#include -#include -#include -#include - -#include -#include -#include - -#include "kernel-features.h" - -#if __ASSUME_STAT64_SYSCALL == 0 -# include -#endif - -#ifdef __NR_fstat64 -# if __ASSUME_STAT64_SYSCALL == 0 -/* The variable is shared between all wrappers around *stat64 calls. */ -extern int __have_no_stat64; -# endif -#endif - -/* Get information about the file FD in BUF. */ - -int -___fxstat64 (int vers, int fd, struct stat64 *buf) -{ - int result; - struct kernel_stat64 kbuf64; - -#if __ASSUME_STAT64_SYSCALL > 0 - result = INLINE_SYSCALL (fstat64, 2, fd, CHECK_1 (&kbuf64)); - if (result == 0) - result = __xstat64_kernel64_conv (vers, &kbuf64, buf); -# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0 - if (__builtin_expect (!result, 1) && buf->__st_ino != (__ino_t) buf->st_ino) - buf->st_ino = buf->__st_ino; -# endif - return result; -#else - struct kernel_stat kbuf; -# if defined __NR_fstat64 - if (! __have_no_stat64) - { - int saved_errno = errno; - result = INLINE_SYSCALL (fstat64, 2, fd, CHECK_1 (&kbuf64)); - - if (result != -1 || errno != ENOSYS) - { - if (result == 0) - result = __xstat64_kernel64_conv (vers, &kbuf64, buf); -# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0 - if (!result && buf->__st_ino != (__ino_t)buf->st_ino) - buf->st_ino = buf->__st_ino; -# endif - return result; - } - - __set_errno (saved_errno); - __have_no_stat64 = 1; - } -# endif - result = INLINE_SYSCALL (fstat, 2, fd, __ptrvalue (&kbuf)); - if (result == 0) - result = __xstat64_conv (vers, &kbuf, buf); - - return result; -#endif -} - -#include - -#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2) -versioned_symbol (libc, ___fxstat64, __fxstat64, GLIBC_2_2); -strong_alias (___fxstat64, __old__fxstat64) -compat_symbol (libc, __old__fxstat64, __fxstat64, GLIBC_2_1); -hidden_ver (___fxstat64, __fxstat64) -#else -strong_alias (___fxstat64, __fxstat64) -hidden_def (__fxstat64) -#endif diff --git a/sysdeps/unix/sysv/linux/arm/eabi/kernel_stat.h b/sysdeps/unix/sysv/linux/arm/eabi/kernel_stat.h deleted file mode 100644 index a4a8472fa2..0000000000 --- a/sysdeps/unix/sysv/linux/arm/eabi/kernel_stat.h +++ /dev/null @@ -1,59 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -/* kernel_stat64 is just like stat64, except packed. The EABI aligns - st_size to an eight byte boundary but the old ABI only aligns it to - four. Similarly st_blocks. */ -struct kernel_stat64 - { - __dev_t st_dev; /* Device. */ - unsigned int __pad1; - - __ino_t __st_ino; /* 32bit 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. */ - unsigned int __pad2; - __off64_t st_size; /* Size of file, in bytes. */ - __blksize_t st_blksize; /* Optimal block size for I/O. */ - - __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ -#ifdef __USE_MISC - /* 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 - identifier 'timespec' to appear in the header. - Therefore we have to handle the use of this header in strictly - standard-compliant sources special. */ - struct timespec st_atim; /* Time of last access. */ - struct timespec st_mtim; /* Time of last modification. */ - struct timespec st_ctim; /* Time of last status change. */ -#else - __time_t st_atime; /* Time of last access. */ - unsigned long int st_atimensec; /* Nscecs of last access. */ - __time_t st_mtime; /* Time of last modification. */ - unsigned long int st_mtimensec; /* Nsecs of last modification. */ - __time_t st_ctime; /* Time of last status change. */ - unsigned long int st_ctimensec; /* Nsecs of last status change. */ -#endif - __ino64_t st_ino; /* File serial number. */ - } __attribute__ ((packed,aligned(4))); diff --git a/sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h new file mode 100644 index 0000000000..f77333f106 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h @@ -0,0 +1,112 @@ +/* Copyright (C) 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 + 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. */ + +#include +#ifndef __ASSEMBLER__ +# include +#endif + +#if !defined NOT_IN_libc || defined IS_IN_libpthread + +# undef PSEUDO +# define PSEUDO(name, syscall_name, args) \ + .section ".text"; \ + PSEUDO_PROLOGUE; \ + ENTRY (name); \ + SINGLE_THREAD_P; \ + DOARGS_##args; \ + bne .Lpseudo_cancel; \ + mov ip, r7; \ + ldr r7, =SYS_ify (syscall_name); \ + swi 0x0; \ + mov r7, ip; \ + UNDOARGS_##args; \ + cmn r0, $4096; \ + PSEUDO_RET; \ + .Lpseudo_cancel: \ + DOCARGS_##args; /* save syscall args etc. around CENABLE. */ \ + CENABLE; \ + mov ip, r0; /* put mask in safe place. */ \ + UNDOCARGS_##args; /* restore syscall args. */ \ + ldr r7, =SYS_ify (syscall_name); \ + swi 0x0; /* do the call. */ \ + mov r7, r0; /* save syscall return value. */ \ + mov r0, ip; /* get mask back. */ \ + CDISABLE; \ + mov r0, r7; /* retrieve return value. */ \ + RESTORE_LR_##args; \ + UNDOARGS_##args; \ + cmn r0, $4096; + +/* DOARGS pushes four bytes on the stack for five arguments, and nothing + otherwise. In order to preserve doubleword alignment, sometimes we must + save an extra register. */ + +# define DOCARGS_0 stmfd sp!, {r7, lr} +# define UNDOCARGS_0 +# define RESTORE_LR_0 ldmfd sp!, {r7, lr} + +# define DOCARGS_1 stmfd sp!, {r0, r1, r7, lr} +# define UNDOCARGS_1 ldr r0, [sp], #8 +# define RESTORE_LR_1 RESTORE_LR_0 + +# define DOCARGS_2 stmfd sp!, {r0, r1, r7, lr} +# define UNDOCARGS_2 ldmfd sp!, {r0, r1} +# define RESTORE_LR_2 RESTORE_LR_0 + +# define DOCARGS_3 stmfd sp!, {r0, r1, r2, r3, r7, lr} +# define UNDOCARGS_3 ldmfd sp!, {r0, r1, r2, r3} +# define RESTORE_LR_3 RESTORE_LR_0 + +# define DOCARGS_4 stmfd sp!, {r0, r1, r2, r3, r7, lr} +# define UNDOCARGS_4 ldmfd sp!, {r0, r1, r2, r3} +# define RESTORE_LR_4 RESTORE_LR_0 + +# define DOCARGS_5 stmfd sp!, {r0, r1, r2, r3, r4, r7, lr} +# define UNDOCARGS_5 ldmfd sp!, {r0, r1, r2, r3} +# define RESTORE_LR_5 ldmfd sp!, {r4, r7, lr} + +# ifdef IS_IN_libpthread +# define CENABLE bl PLTJMP(__pthread_enable_asynccancel) +# define CDISABLE bl PLTJMP(__pthread_disable_asynccancel) +# define __local_multiple_threads __pthread_multiple_threads +# else +# define CENABLE bl PLTJMP(__libc_enable_asynccancel) +# define CDISABLE bl PLTJMP(__libc_disable_asynccancel) +# define __local_multiple_threads __libc_multiple_threads +# endif + +# ifndef __ASSEMBLER__ +extern int __local_multiple_threads attribute_hidden; +# define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1) +# else +# define SINGLE_THREAD_P \ + ldr ip, 1b; \ +2: \ + ldr ip, [pc, ip]; \ + teq ip, #0; +# define PSEUDO_PROLOGUE \ + 1: .word __local_multiple_threads - 2f - 8; +# endif + +#else + +/* For rtld, et cetera. */ +# define SINGLE_THREAD_P 1 + +#endif diff --git a/sysdeps/unix/sysv/linux/arm/eabi/lockf64.c b/sysdeps/unix/sysv/linux/arm/eabi/lockf64.c deleted file mode 100644 index 79dcceb09d..0000000000 --- a/sysdeps/unix/sysv/linux/arm/eabi/lockf64.c +++ /dev/null @@ -1,202 +0,0 @@ -/* Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 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. */ - -#include -#include -#include -#include -#include -#include - -#include "kernel-features.h" - -/* lockf is a simplified interface to fcntl's locking facilities. */ - -#ifdef __NR_fcntl64 -# if __ASSUME_FCNTL64 == 0 -/* This variable is shared with all files that check for fcntl64. The - declaration is in fcntl.c. */ -extern int __have_no_fcntl64; -# endif -#endif - -struct kernel_flock64 { - short l_type; - short l_whence; - off64_t l_start; - off64_t l_len; - pid_t l_pid; -} __attribute__((packed)); - -int -lockf64 (int fd, int cmd, off64_t len64) -{ -#if __ASSUME_FCNTL64 == 0 - struct flock fl; - off_t len = (off_t) len64; -#endif -#ifdef __NR_fcntl64 - struct kernel_flock64 fl64; - int cmd64; -#endif - -#if __ASSUME_FCNTL64 == 0 - memset ((char *) &fl, '\0', sizeof (fl)); - - /* lockf is always relative to the current file position. */ - fl.l_whence = SEEK_CUR; - fl.l_start = 0; - fl.l_len = len; -#endif -#ifdef __NR_fcntl64 -# if __ASSUME_FCNTL64 == 0 - if (!__have_no_fcntl64) - { -# endif - memset ((char *) &fl64, '\0', sizeof (fl64)); - fl64.l_whence = SEEK_CUR; - fl64.l_start = 0; - fl64.l_len = len64; -# if __ASSUME_FCNTL64 == 0 - } -# endif -#endif - -#if __ASSUME_FCNTL64 == 0 && !defined __NR_fcntl64 - if (len64 != (off64_t) len) - { - /* We can't represent the length. */ - __set_errno (EOVERFLOW); - return -1; - } -#endif - switch (cmd) - { - case F_TEST: - /* Test the lock: return 0 if FD is unlocked or locked by this process; - return -1, set errno to EACCES, if another process holds the lock. */ -#if __ASSUME_FCNTL64 > 0 - fl64.l_type = F_RDLCK; - if (INLINE_SYSCALL (fcntl64, 3, fd, F_GETLK64, &fl64) < 0) - return -1; - if (fl64.l_type == F_UNLCK || fl64.l_pid == __getpid ()) - return 0; - __set_errno (EACCES); - return -1; -#else -# ifdef __NR_fcntl64 - if (!__have_no_fcntl64) - { - int res; - - fl64.l_type = F_RDLCK; - res = INLINE_SYSCALL (fcntl64, 3, fd, F_GETLK64, &fl64); - /* If errno == ENOSYS try the 32bit interface if len64 can - be represented with 32 bits. */ - - if (res == 0) - { - if (fl64.l_type == F_UNLCK || fl64.l_pid == __getpid ()) - return 0; - __set_errno (EACCES); - return -1; - } - else if (errno == ENOSYS) - __have_no_fcntl64 = 1; - else - /* res < 0 && errno != ENOSYS. */ - return -1; - if (len64 != (off64_t) len) - { - /* We can't represent the length. */ - __set_errno (EOVERFLOW); - return -1; - } - } -# endif - fl.l_type = F_RDLCK; - if (__fcntl (fd, F_GETLK, &fl) < 0) - return -1; - if (fl.l_type == F_UNLCK || fl.l_pid == __getpid ()) - return 0; - __set_errno (EACCES); - return -1; -#endif - case F_ULOCK: -#if __ASSUME_FCNTL64 == 0 - fl.l_type = F_UNLCK; - cmd = F_SETLK; -#endif -#ifdef __NR_fcntl64 - fl64.l_type = F_UNLCK; - cmd64 = F_SETLK64; -#endif - break; - case F_LOCK: -#if __ASSUME_FCNTL64 == 0 - fl.l_type = F_WRLCK; - cmd = F_SETLKW; -#endif -#ifdef __NR_fcntl64 - fl64.l_type = F_WRLCK; - cmd64 = F_SETLKW64; -#endif - break; - case F_TLOCK: -#if __ASSUME_FCNTL64 == 0 - fl.l_type = F_WRLCK; - cmd = F_SETLK; -#endif -#ifdef __NR_fcntl64 - fl64.l_type = F_WRLCK; - cmd64 = F_SETLK64; -#endif - break; - - default: - __set_errno (EINVAL); - return -1; - } -#if __ASSUME_FCNTL64 > 0 - return INLINE_SYSCALL (fcntl64, 3, fd, cmd64, &fl64); -#else -# ifdef __NR_fcntl64 - - if (!__have_no_fcntl64) - { - int res = INLINE_SYSCALL (fcntl64, 3, fd, cmd64, &fl64); - - /* If errno == ENOSYS try the 32bit interface if len64 can - be represented with 32 bits. */ - if (res == 0 || errno != ENOSYS) - return res; - - __have_no_fcntl64 = 1; - - if (len64 != (off64_t) len) - { - /* We can't represent the length. */ - __set_errno (EOVERFLOW); - return -1; - } - } -# endif - return __fcntl (fd, cmd, &fl); -#endif -} diff --git a/sysdeps/unix/sysv/linux/arm/eabi/lxstat64.c b/sysdeps/unix/sysv/linux/arm/eabi/lxstat64.c deleted file mode 100644 index bb5be399ee..0000000000 --- a/sysdeps/unix/sysv/linux/arm/eabi/lxstat64.c +++ /dev/null @@ -1,99 +0,0 @@ -/* lxstat64 using old-style Unix lstat system call. - Copyright (C) 1997-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 - 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. */ - -#include -#include -#include -#include - -#include -#include -#include - -#include "kernel-features.h" - -#if __ASSUME_STAT64_SYSCALL == 0 -# include -#endif - -#ifdef __NR_lstat64 -# if __ASSUME_STAT64_SYSCALL == 0 -/* The variable is shared between all wrappers around *stat64 calls. */ -extern int __have_no_stat64; -# endif -#endif - -/* Get information about the file NAME in BUF. */ -int -___lxstat64 (int vers, const char *name, struct stat64 *buf) -{ - int result; - struct kernel_stat64 kbuf64; - -#ifdef __ASSUME_STAT64_SYSCALL - result = INLINE_SYSCALL (lstat64, 2, CHECK_STRING (name), CHECK_1 (&kbuf64)); - if (result == 0) - result = __xstat64_kernel64_conv (vers, &kbuf64, buf); -# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0 - if (__builtin_expect (!result, 1) && buf->__st_ino != (__ino_t) buf->st_ino) - buf->st_ino = buf->__st_ino; -# endif - return result; -#else - struct kernel_stat kbuf; -# ifdef __NR_lstat64 - if (! __have_no_stat64) - { - int saved_errno = errno; - result = INLINE_SYSCALL (lstat64, 2, CHECK_STRING (name), CHECK_1 (&kbuf64)); - - if (result != -1 || errno != ENOSYS) - { - if (result == 0) - result = __xstat64_kernel64_conv (vers, &kbuf64, buf); -# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0 - if (!result && buf->__st_ino != (__ino_t) buf->st_ino) - buf->st_ino = buf->__st_ino; -# endif - return result; - } - - __set_errno (saved_errno); - __have_no_stat64 = 1; - } -# endif - result = INLINE_SYSCALL (lstat, 2, CHECK_STRING (name), __ptrvalue (&kbuf)); - if (result == 0) - result = __xstat64_conv (vers, &kbuf, buf); - - return result; -#endif -} - -#include - -#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2) -versioned_symbol (libc, ___lxstat64, __lxstat64, GLIBC_2_2); -strong_alias (___lxstat64, __old__lxstat64) -compat_symbol (libc, __old__lxstat64, __lxstat64, GLIBC_2_1); -hidden_ver (___lxstat64, __lxstat64) -#else -strong_alias (___lxstat64, __lxstat64); -hidden_def (__lxstat64) -#endif diff --git a/sysdeps/unix/sysv/linux/arm/eabi/mmap64.S b/sysdeps/unix/sysv/linux/arm/eabi/mmap64.S new file mode 100644 index 0000000000..38fac06c35 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/mmap64.S @@ -0,0 +1,56 @@ +/* Copyright (C) 2000, 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 + 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. */ + +#include + +#define EINVAL 22 + +#ifdef __ARMEB__ +# define LOW_OFFSET 8 + 4 +/* The initial + 4 is for the stack postdecrement. */ +# define HIGH_OFFSET 4 + 8 + 0 +#else +# define LOW_OFFSET 8 + 0 +# define HIGH_OFFSET 4 + 8 + 4 +#endif + + /* The mmap2 system call takes six arguments, all in registers. */ + .text +ENTRY (__mmap64) + ldr ip, [sp, $LOW_OFFSET] + str r5, [sp, #-4]! + ldr r5, [sp, $HIGH_OFFSET] + str r4, [sp, #-4]! + movs r4, ip, lsl $20 @ check that offset is page-aligned + mov ip, ip, lsr $12 + moveqs r4, r5, lsr $12 @ check for overflow + bne .Linval + ldr r4, [sp, $8] @ load fd + orr r5, ip, r5, lsl $20 @ compose page offset + DO_CALL (mmap2, 0) + cmn r0, $4096 + ldmfd sp!, {r4, r5} + RETINSTR(cc, lr) + b PLTJMP(syscall_error) +.Linval: + mov r0, $-EINVAL + ldmfd sp!, {r4, r5} + b PLTJMP(syscall_error) +PSEUDO_END (__mmap64) + +weak_alias (__mmap64, mmap64) diff --git a/sysdeps/unix/sysv/linux/arm/eabi/pread.c b/sysdeps/unix/sysv/linux/arm/eabi/pread.c new file mode 100644 index 0000000000..b6d2aeaa5d --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/pread.c @@ -0,0 +1,61 @@ +/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2005 + Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1997. + + 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. */ + +#include +#include +#include + +#include +#include +#include + +ssize_t +__libc_pread (fd, buf, count, offset) + int fd; + void *buf; + size_t count; + off_t offset; +{ + ssize_t result; + + if (SINGLE_THREAD_P) + { + /* In the ARM EABI, 64-bit values are aligned to even/odd register + pairs for syscalls. */ + result = INLINE_SYSCALL (pread64, 6, fd, CHECK_N (buf, count), count, 0, + __LONG_LONG_PAIR (offset >> 31, offset)); + + return result; + } + + int oldtype = LIBC_CANCEL_ASYNC (); + + /* In the ARM EABI, 64-bit values are aligned to even/odd register + pairs for syscalls. */ + result = INLINE_SYSCALL (pread64, 6, fd, CHECK_N (buf, count), count, 0, + __LONG_LONG_PAIR (offset >> 31, offset)); + + LIBC_CANCEL_RESET (oldtype); + + return result; +} + +strong_alias (__libc_pread, __pread) +weak_alias (__libc_pread, pread) diff --git a/sysdeps/unix/sysv/linux/arm/eabi/pread64.c b/sysdeps/unix/sysv/linux/arm/eabi/pread64.c new file mode 100644 index 0000000000..3b4608e5cf --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/pread64.c @@ -0,0 +1,63 @@ +/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2005 + Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1997. + + 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. */ + +#include +#include +#include + +#include +#include +#include + +ssize_t +__libc_pread64 (fd, buf, count, offset) + int fd; + void *buf; + size_t count; + off64_t offset; +{ + ssize_t result; + + if (SINGLE_THREAD_P) + { + /* In the ARM EABI, 64-bit values are aligned to even/odd register + pairs for syscalls. */ + result = INLINE_SYSCALL (pread64, 6, fd, CHECK_N (buf, count), count, 0, + __LONG_LONG_PAIR ((off_t) (offset >> 32), + (off_t) (offset & 0xffffffff))); + + return result; + } + + int oldtype = LIBC_CANCEL_ASYNC (); + + /* In the ARM EABI, 64-bit values are aligned to even/odd register + pairs for syscalls. */ + result = INLINE_SYSCALL (pread64, 6, fd, CHECK_N (buf, count), count, 0, + __LONG_LONG_PAIR ((off_t) (offset >> 32), + (off_t) (offset & 0xffffffff))); + + LIBC_CANCEL_RESET (oldtype); + + return result; +} + +weak_alias (__libc_pread64, __pread64) +weak_alias (__libc_pread64, pread64) diff --git a/sysdeps/unix/sysv/linux/arm/eabi/pwrite.c b/sysdeps/unix/sysv/linux/arm/eabi/pwrite.c new file mode 100644 index 0000000000..0200b9cc5c --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/pwrite.c @@ -0,0 +1,61 @@ +/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2005 + Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1997. + + 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. */ + +#include +#include +#include + +#include +#include +#include + +ssize_t +__libc_pwrite (fd, buf, count, offset) + int fd; + const void *buf; + size_t count; + off_t offset; +{ + ssize_t result; + + if (SINGLE_THREAD_P) + { + /* In the ARM EABI, 64-bit values are aligned to even/odd register + pairs for syscalls. */ + result = INLINE_SYSCALL (pwrite64, 6, fd, CHECK_N (buf, count), count, 0, + __LONG_LONG_PAIR (offset >> 31, offset)); + + return result; + } + + int oldtype = LIBC_CANCEL_ASYNC (); + + /* In the ARM EABI, 64-bit values are aligned to even/odd register + pairs for syscalls. */ + result = INLINE_SYSCALL (pwrite64, 6, fd, CHECK_N (buf, count), count, 0, + __LONG_LONG_PAIR (offset >> 31, offset)); + + LIBC_CANCEL_RESET (oldtype); + + return result; +} + +strong_alias (__libc_pwrite, __pwrite) +weak_alias (__libc_pwrite, pwrite) diff --git a/sysdeps/unix/sysv/linux/arm/eabi/pwrite64.c b/sysdeps/unix/sysv/linux/arm/eabi/pwrite64.c new file mode 100644 index 0000000000..cf33165cdd --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/pwrite64.c @@ -0,0 +1,64 @@ +/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2005 + Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1997. + + 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. */ + +#include +#include +#include + +#include +#include +#include + +ssize_t +__libc_pwrite64 (fd, buf, count, offset) + int fd; + const void *buf; + size_t count; + off64_t offset; +{ + ssize_t result; + + if (SINGLE_THREAD_P) + { + /* In the ARM EABI, 64-bit values are aligned to even/odd register + pairs for syscalls. */ + result = INLINE_SYSCALL (pwrite64, 6, fd, CHECK_N (buf, count), count, 0, + __LONG_LONG_PAIR ((off_t) (offset >> 32), + (off_t) (offset & 0xffffffff))); + + return result; + } + + int oldtype = LIBC_CANCEL_ASYNC (); + + /* In the ARM EABI, 64-bit values are aligned to even/odd register + pairs for syscalls. */ + result = INLINE_SYSCALL (pwrite64, 6, fd, CHECK_N (buf, count), count, 0, + __LONG_LONG_PAIR ((off_t) (offset >> 32), + (off_t) (offset & 0xffffffff))); + + LIBC_CANCEL_RESET (oldtype); + + return result; +} + +weak_alias (__libc_pwrite64, __pwrite64) +libc_hidden_weak (__pwrite64) +weak_alias (__libc_pwrite64, pwrite64) diff --git a/sysdeps/unix/sysv/linux/arm/eabi/uname.c b/sysdeps/unix/sysv/linux/arm/eabi/readahead.c similarity index 59% rename from sysdeps/unix/sysv/linux/arm/eabi/uname.c rename to sysdeps/unix/sysv/linux/arm/eabi/readahead.c index 82482e4552..946745cb4d 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/uname.c +++ b/sysdeps/unix/sysv/linux/arm/eabi/readahead.c @@ -1,5 +1,5 @@ -/* Copyright (C) 2005 - Free Software Foundation, Inc. +/* Provide kernel hint to read ahead. + Copyright (C) 2002, 2003, 2004, 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 @@ -18,26 +18,34 @@ 02111-1307 USA. */ #include +#include +#include +#include + #include #include -#include -#include - -/* The kernel's struct utsname is two bytes larger than a userland struct - utsname due to the APCS structure size boundary. */ -int -__uname (struct utsname *__name) -{ - char buf[sizeof (struct utsname) + 2]; - int result = INLINE_SYSCALL (uname, 1, buf); - if (result == 0) - memcpy (__name, buf, sizeof (struct utsname)); +#ifdef __NR_readahead - return result; +ssize_t +__readahead (int fd, off64_t offset, size_t count) +{ + return INLINE_SYSCALL (readahead, 5, fd, 0, + __LONG_LONG_PAIR ((off_t) (offset >> 32), + (off_t) (offset & 0xffffffff)), + count); } +#else +ssize_t +__readahead (int fd, off64_t offset, size_t count) +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (readahead) + +# include +#endif -libc_hidden_def (__uname) -strong_alias (__uname, uname) -libc_hidden_weak (uname) +weak_alias (__readahead, readahead) diff --git a/sysdeps/unix/sysv/linux/arm/eabi/semop.c b/sysdeps/unix/sysv/linux/arm/eabi/semop.c deleted file mode 100644 index 42b2036140..0000000000 --- a/sysdeps/unix/sysv/linux/arm/eabi/semop.c +++ /dev/null @@ -1,67 +0,0 @@ -/* Copyright (C) 1995, 1997, 1998, 1999, 2000, 2005 - Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , August 1995. - - 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. */ - -#include -#include -#include -#include -#include -#include -#include - -struct kernel_sembuf -{ - unsigned short int sem_num; /* semaphore number */ - short int sem_op; /* semaphore operation */ - short int sem_flg; /* operation flag */ - short int __pad1; -}; - -/* Perform user-defined atomical operation of array of semaphores. */ - -int -semop (semid, sops, nsops) - int semid; - struct sembuf *sops; - size_t nsops; -{ - struct kernel_sembuf *ksops = alloca (sizeof (ksops[0]) * nsops); - size_t i; - int result; - - for (i = 0; i < nsops; i++) - { - ksops[i].sem_num = sops[i].sem_num; - ksops[i].sem_op = sops[i].sem_op; - ksops[i].sem_flg = sops[i].sem_flg; - } - - result = INLINE_SYSCALL (ipc, 5, IPCOP_semop, - semid, (int) nsops, 0, CHECK_N (ksops, nsops)); - - for (i = 0; i < nsops; i++) - { - sops[i].sem_num = ksops[i].sem_num; - sops[i].sem_op = ksops[i].sem_op; - sops[i].sem_flg = ksops[i].sem_flg; - } - - return result; -} diff --git a/sysdeps/unix/sysv/linux/arm/eabi/semtimedop.c b/sysdeps/unix/sysv/linux/arm/eabi/semtimedop.c deleted file mode 100644 index 463dea4ecb..0000000000 --- a/sysdeps/unix/sysv/linux/arm/eabi/semtimedop.c +++ /dev/null @@ -1,69 +0,0 @@ -/* Copyright (C) 1995, 1997, 1998, 1999, 2000, 2005 - Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , August 1995. - - 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. */ - -#include -#include -#include -#include -#include -#include -#include - -struct kernel_sembuf -{ - unsigned short int sem_num; /* semaphore number */ - short int sem_op; /* semaphore operation */ - short int sem_flg; /* operation flag */ - short int __pad1; -}; - -/* Perform user-defined atomical operation of array of semaphores. */ - -int -semtimedop (semid, sops, nsops, timeout) - int semid; - struct sembuf *sops; - size_t nsops; - const struct timespec *timeout; -{ - struct kernel_sembuf *ksops = alloca (sizeof (ksops[0]) * nsops); - size_t i; - int result; - - for (i = 0; i < nsops; i++) - { - ksops[i].sem_num = sops[i].sem_num; - ksops[i].sem_op = sops[i].sem_op; - ksops[i].sem_flg = sops[i].sem_flg; - } - - result = INLINE_SYSCALL (ipc, 6, IPCOP_semtimedop, - semid, (int) nsops, 0, CHECK_N (sops, nsops), - timeout); - - for (i = 0; i < nsops; i++) - { - sops[i].sem_num = ksops[i].sem_num; - sops[i].sem_op = ksops[i].sem_op; - sops[i].sem_flg = ksops[i].sem_flg; - } - - return result; -} diff --git a/sysdeps/unix/sysv/linux/arm/eabi/epoll_ctl.c b/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S similarity index 63% rename from sysdeps/unix/sysv/linux/arm/eabi/epoll_ctl.c rename to sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S index eac925b92b..d68c8a5fb2 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/epoll_ctl.c +++ b/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S @@ -1,5 +1,4 @@ -/* epoll_ctl wrapper for ARM EABI. - Copyright (C) 2005 Free Software Foundation, Inc. +/* Copyright (C) 1999, 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 @@ -18,20 +17,19 @@ 02111-1307 USA. */ #include -#include -#include -#include +/* If no SA_RESTORER function was specified by the application we use + one of these. This avoids the need for the kernel to synthesise a return + instruction on the stack, which would involve expensive cache flushes. */ -int -epoll_ctl (int __epfd, int __op, int __fd, struct epoll_event *__event) -{ - struct kernel_epoll_event k_event; +ENTRY(__default_sa_restorer) + mov r7, $SYS_ify(sigreturn) + swi 0x0 - k_event.events = __event->events; - memcpy (&k_event.data, &__event->data, sizeof (k_event.data)); +#ifdef __NR_rt_sigreturn - return INLINE_SYSCALL (epoll_ctl, 4, __epfd, __op, __fd, &k_event); -} +ENTRY(__default_rt_sa_restorer) + mov r7, $SYS_ify(rt_sigreturn) + swi 0x0 -libc_hidden_def (epoll_ctl) +#endif diff --git a/sysdeps/unix/sysv/linux/arm/eabi/socket.S b/sysdeps/unix/sysv/linux/arm/eabi/socket.S new file mode 100644 index 0000000000..7fa2b1e6cb --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/socket.S @@ -0,0 +1,127 @@ +/* Copyright (C) 1995, 1996, 1997, 1998, 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 + 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. */ + +#include +#include + +#define P(a, b) P2(a, b) +#define P2(a, b) a##b + + .text +/* The socket-oriented system calls are handled unusally in Linux. + They are all gated through the single `socketcall' system call number. + `socketcall' takes two arguments: the first is the subcode, specifying + which socket function is being called; and the second is a pointer to + the arguments to the specific function. + + The .S files for the other calls just #define socket and #include this. */ + +#ifndef __socket +#ifndef NO_WEAK_ALIAS +#define __socket P(__,socket) +#else +#define __socket socket +#endif +#endif + +#define PUSHARGS_1 str a1, [sp, $-8]! +#define PUSHARGS_2 stmfd sp!, {a1, a2} +#define PUSHARGS_3 stmfd sp!, {a1, a2, a3, a4} /* a4 pushed for padding */ +#define PUSHARGS_4 stmfd sp!, {a1, a2, a3, a4} +#define PUSHARGS_5 stmfd sp!, {a1, a2, a3, a4} /* Caller has already pushed arg 5 */ +#define PUSHARGS_6 stmfd sp!, {a1, a2, a3, a4} + +#define POPARGS_1 add sp, sp, #8 +#define POPARGS_2 add sp, sp, #8 +#define POPARGS_3 add sp, sp, #16 +#define POPARGS_4 add sp, sp, #16 +#define POPARGS_5 add sp, sp, #16 +#define POPARGS_6 add sp, sp, #16 + +#ifndef NARGS +#define NARGS 3 /* If we were called with no wrapper, this is really socket() */ +#endif + +#if defined NEED_CANCELLATION && defined CENABLE + PSEUDO_PROLOGUE +#endif + +.globl __socket +ENTRY (__socket) + /* This code previously moved sp into ip and stored the args using + stmdb ip!, {a1-a4}. It did not modify sp, so the stack never had + to be restored after the syscall completed. It saved an + instruction and meant no stack cleanup work was required. + + This will not work in the case of a socket call being interrupted + by a signal. If the signal handler uses any stack the arguments + to socket will be trashed. The results of a restart of any + socket call are then unpredictable. */ + + /* Push args onto the stack. */ + P(PUSHARGS_,NARGS) + +#if defined NEED_CANCELLATION && defined CENABLE + SINGLE_THREAD_P + bne 1f +#endif + + /* Do the system call trap. */ + mov a1, $P(SOCKOP_,socket) + mov a2, sp + DO_CALL (socketcall, 0) + + /* Pop args off the stack */ + P(POPARGS_,NARGS) + + /* r0 is < 0 if there was an error. */ + cmn r0, $124 + RETINSTR(cc, r14) + b PLTJMP(SYSCALL_ERROR) + +#if defined NEED_CANCELLATION && defined CENABLE +1: + stmfd sp!, {r7, lr} + CENABLE + mov ip, r0 + + mov r0, #P(SOCKOP_,socket) + add r1, sp, #4 + mov r7, #SYS_ify(socketcall) + swi 0x0 + + mov r7, r0 + mov r0, ip + CDISABLE + mov r0, r7 + ldmfd sp!, {r7, lr} + + P(POPARGS_,NARGS) + + /* r0 is < 0 if there was an error. */ + cmn r0, $124 + RETINSTR(cc, r14) + b PLTJMP(SYSCALL_ERROR) +#endif + +PSEUDO_END (__socket) + +#ifndef NO_WEAK_ALIAS +weak_alias (__socket, socket) +#endif diff --git a/sysdeps/unix/sysv/linux/arm/eabi/statfs64.c b/sysdeps/unix/sysv/linux/arm/eabi/statfs64.c deleted file mode 100644 index 3c74453c5f..0000000000 --- a/sysdeps/unix/sysv/linux/arm/eabi/statfs64.c +++ /dev/null @@ -1,77 +0,0 @@ -/* Return information about the filesystem on which FILE resides. - Copyright (C) 1996-2000,2003,2004,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 - 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. */ - -#include -#include -#include -#include -#include - - -# if __ASSUME_STATFS64 == 0 -int __no_statfs64 attribute_hidden; -#endif - -/* Return information about the filesystem on which FILE resides. */ -int -__statfs64 (const char *file, struct statfs64 *buf) -{ -#ifdef __NR_statfs64 -# if __ASSUME_STATFS64 == 0 - if (! __no_statfs64) -# endif - { - /* The EABI structure is the same as the old ABI structure, except - that it has four additional bytes of padding - at the end. We can - ignore them. */ - int result = INLINE_SYSCALL (statfs64, 3, file, sizeof (*buf) - 4, buf); - -# if __ASSUME_STATFS64 == 0 - if (result == 0 || errno != ENOSYS) -# endif - return result; - -# if __ASSUME_STATFS64 == 0 - __no_statfs64 = 1; -# endif - } -#endif - -#if __ASSUME_STATFS64 == 0 - struct statfs buf32; - - if (__statfs (file, &buf32) < 0) - return -1; - - buf->f_type = buf32.f_type; - buf->f_bsize = buf32.f_bsize; - buf->f_blocks = buf32.f_blocks; - buf->f_bfree = buf32.f_bfree; - buf->f_bavail = buf32.f_bavail; - buf->f_files = buf32.f_files; - buf->f_ffree = buf32.f_ffree; - buf->f_fsid = buf32.f_fsid; - buf->f_namelen = buf32.f_namelen; - buf->f_frsize = buf32.f_frsize; - memcpy (buf->f_spare, buf32.f_spare, sizeof (buf32.f_spare)); - - return 0; -#endif -} -weak_alias (__statfs64, statfs64) diff --git a/sysdeps/unix/sysv/linux/arm/eabi/kernel_epoll.h b/sysdeps/unix/sysv/linux/arm/eabi/syscall.S similarity index 64% rename from sysdeps/unix/sysv/linux/arm/eabi/kernel_epoll.h rename to sysdeps/unix/sysv/linux/arm/eabi/syscall.S index 410b5c0739..59ca051a8b 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/kernel_epoll.h +++ b/sysdeps/unix/sysv/linux/arm/eabi/syscall.S @@ -16,8 +16,23 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -struct kernel_epoll_event -{ - uint32_t events; /* Epoll events */ - epoll_data_t data; /* User data variable */ -} __attribute__ ((packed,aligned(4))); +#include + +/* In the EABI syscall interface, we don't need a special syscall to + implement syscall(). It won't work reliably with 64-bit arguments + (but that is true on many modern platforms). */ + +ENTRY (syscall) + mov ip, sp + stmfd sp!, {r4, r5, r6, r7} + mov r7, r0 + mov r0, r1 + mov r1, r2 + mov r2, r3 + ldmfd ip, {r3, r4, r5, r6} + swi 0x0 + ldmfd sp!, {r4, r5, r6, r7} + cmn r0, #4096 + RETINSTR(cc, lr) + b PLTJMP(syscall_error) +PSEUDO_END (syscall) diff --git a/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list b/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list deleted file mode 100644 index 85bc04ff1d..0000000000 --- a/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list +++ /dev/null @@ -1,4 +0,0 @@ -# File name Caller Syscall name # args Strong name Weak names - -epoll_ctl EXTRA epoll_ctl i:iiip epoll_ctl -epoll_wait EXTRA epoll_wait i:ipii epoll_wait diff --git a/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h b/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h new file mode 100644 index 0000000000..84a4f04565 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h @@ -0,0 +1,72 @@ +/* Copyright (C) 2005 + Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + Contributed by Daniel Jacobowitz , Oct 2005. + + 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 _LINUX_ARM_EABI_SYSDEP_H +#define _LINUX_ARM_EABI_SYSDEP_H 1 + +#include + +#if __NR_SYSCALL_BASE != 0 +# error Kernel headers are too old +#endif + +/* The ARM EABI user interface passes the syscall number in r7, instead + of in the swi. This is more efficient, because the kernel does not need + to fetch the swi from memory to find out the number; which can be painful + with separate I-cache and D-cache. Make sure to use 0 for the SWI + argument; otherwise the (optional) compatibility code for APCS binaries + may be invoked. */ + +#undef INTERNAL_SYSCALL_RAW +#define INTERNAL_SYSCALL_RAW(name, err, nr, args...) \ + ({ \ + register int _a1 asm ("r0"), _nr asm ("r7"); \ + LOAD_ARGS_##nr (args) \ + _nr = name; \ + asm volatile ("swi 0x0 @ syscall " #name \ + : "=r" (_a1) \ + : "r" (_nr) ASM_ARGS_##nr \ + : "memory"); \ + _a1; }) + +/* We must save and restore r7 (call-saved) for the syscall number. + We never make function calls from inside here (only potentially + signal handlers), so we do not bother with doubleword alignment. + + Just like the APCS syscall convention, the EABI syscall convention uses + r0 through r6 for up to seven syscall arguments. None are ever passed to + the kernel on the stack, although incoming arguments are on the stack for + syscalls with five or more arguments. + + The assembler will convert the literal pool load to a move for most + syscalls. */ + +#undef DO_CALL +#define DO_CALL(syscall_name, args) \ + DOARGS_##args \ + mov ip, r7; \ + ldr r7, =SYS_ify (syscall_name); \ + swi 0x0; \ + mov r7, ip; \ + UNDOARGS_##args + +#endif /* _LINUX_ARM_EABI_SYSDEP_H */ diff --git a/sysdeps/unix/sysv/linux/arm/eabi/truncate64.c b/sysdeps/unix/sysv/linux/arm/eabi/truncate64.c new file mode 100644 index 0000000000..d788733e32 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/truncate64.c @@ -0,0 +1,75 @@ +/* Copyright (C) 1997-2000, 2003, 2004, 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 + 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. */ + +#include +#include +#include +#include + +#include +#include +#include + +#include "kernel-features.h" + +#ifdef __NR_truncate64 +#ifndef __ASSUME_TRUNCATE64_SYSCALL +/* The variable is shared between all wrappers around *truncate64 calls. */ +int __have_no_truncate64; +#endif + +/* Truncate the file FD refers to to LENGTH bytes. */ +int +truncate64 (const char *path, off64_t length) +{ +#ifndef __ASSUME_TRUNCATE64_SYSCALL + if (! __have_no_truncate64) +#endif + { + unsigned int low = length & 0xffffffff; + unsigned int high = length >> 32; +#ifndef __ASSUME_TRUNCATE64_SYSCALL + int saved_errno = errno; +#endif + int result = INLINE_SYSCALL (truncate64, 4, CHECK_STRING (path), 0, + __LONG_LONG_PAIR (high, low)); +#ifndef __ASSUME_TRUNCATE64_SYSCALL + if (result != -1 || errno != ENOSYS) +#endif + return result; + +#ifndef __ASSUME_TRUNCATE64_SYSCALL + __set_errno (saved_errno); + __have_no_truncate64 = 1; +#endif + } + +#ifndef __ASSUME_TRUNCATE64_SYSCALL + if ((off_t) length != length) + { + __set_errno (EINVAL); + return -1; + } + return __truncate (path, (off_t) length); +#endif +} + +#else +/* Use the generic implementation. */ +# include +#endif diff --git a/sysdeps/unix/sysv/linux/arm/eabi/xstat64.c b/sysdeps/unix/sysv/linux/arm/eabi/xstat64.c deleted file mode 100644 index 5edafd8aae..0000000000 --- a/sysdeps/unix/sysv/linux/arm/eabi/xstat64.c +++ /dev/null @@ -1,103 +0,0 @@ -/* xstat64 using old-style Unix stat system call. - Copyright (C) 1991, 1995-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 - 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. */ - -#include -#include -#include -#include - -#include -#include -#include - -#include "kernel-features.h" - -#if __ASSUME_STAT64_SYSCALL == 0 -# include -#endif - -#ifdef __NR_stat64 -# if __ASSUME_STAT64_SYSCALL == 0 -/* The variable is shared between all wrappers around *stat64 calls. - This is the definition. */ -int __have_no_stat64; -# endif -#endif - -/* Get information about the file NAME in BUF. */ - -int -___xstat64 (int vers, const char *name, struct stat64 *buf) -{ - int result; - struct kernel_stat64 kbuf64; - -#if __ASSUME_STAT64_SYSCALL > 0 - result = INLINE_SYSCALL (stat64, 2, CHECK_STRING (name), CHECK_1 (&kbuf64)); - if (result == 0) - result = __xstat64_kernel64_conv (vers, &kbuf64, buf); -# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0 - if (__builtin_expect (!result, 1) && buf->__st_ino != (__ino_t) buf->st_ino) - buf->st_ino = buf->__st_ino; -# endif - return result; -#else - struct kernel_stat kbuf; -# if defined __NR_stat64 - if (! __have_no_stat64) - { - int saved_errno = errno; - result = INLINE_SYSCALL (stat64, 2, CHECK_STRING (name), CHECK_1 (&kbuf64)); - - if (result != -1 || errno != ENOSYS) - { - if (result == 0) - result = __xstat64_kernel64_conv (vers, &kbuf64, buf); -# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0 - if (!result && buf->__st_ino != (__ino_t) buf->st_ino) - buf->st_ino = buf->__st_ino; -# endif - return result; - } - - __set_errno (saved_errno); - __have_no_stat64 = 1; - } -# endif - - result = INLINE_SYSCALL (stat, 2, CHECK_STRING (name), __ptrvalue (&kbuf)); - if (result == 0) - result = __xstat64_conv (vers, &kbuf, buf); - - return result; -#endif -} - - -#include - -#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2) -versioned_symbol (libc, ___xstat64, __xstat64, GLIBC_2_2); -strong_alias (___xstat64, __old__xstat64) -compat_symbol (libc, __old__xstat64, __xstat64, GLIBC_2_1); -hidden_ver (___xstat64, __xstat64) -#else -strong_alias (___xstat64, __xstat64) -hidden_def (__xstat64) -#endif diff --git a/sysdeps/unix/sysv/linux/arm/eabi/xstatconv.c b/sysdeps/unix/sysv/linux/arm/eabi/xstatconv.c deleted file mode 100644 index 28c4dae951..0000000000 --- a/sysdeps/unix/sysv/linux/arm/eabi/xstatconv.c +++ /dev/null @@ -1,341 +0,0 @@ -/* Convert between the kernel's `struct stat' format, and libc's. - Copyright (C) 1991,1995-1997,2000,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. */ - -#include -#include -#include - -#ifdef STAT_IS_KERNEL_STAT - -/* Dummy. */ -struct kernel_stat; - -#else - -#include - - -#if !defined __ASSUME_STAT64_SYSCALL || defined XSTAT_IS_XSTAT64 -int -__xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf) -{ - switch (vers) - { - case _STAT_VER_KERNEL: - /* Nothing to do. The struct is in the form the kernel expects. - We should have short-circuted before we got here, but for - completeness... */ - *(struct kernel_stat *) ubuf = *kbuf; - break; - - case _STAT_VER_LINUX: - { - struct stat *buf = ubuf; - - /* Convert to current kernel version of `struct stat'. */ - buf->st_dev = kbuf->st_dev; -#ifdef _HAVE_STAT___PAD1 - buf->__pad1 = 0; -#endif - buf->st_ino = kbuf->st_ino; - buf->st_mode = kbuf->st_mode; - buf->st_nlink = kbuf->st_nlink; - buf->st_uid = kbuf->st_uid; - buf->st_gid = kbuf->st_gid; - buf->st_rdev = kbuf->st_rdev; -#ifdef _HAVE_STAT___PAD2 - buf->__pad2 = 0; -#endif - buf->st_size = kbuf->st_size; - buf->st_blksize = kbuf->st_blksize; - buf->st_blocks = kbuf->st_blocks; -#ifdef _HAVE_STAT_NSEC - buf->st_atim.tv_sec = kbuf->st_atim.tv_sec; - buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec; - buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec; - buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec; - buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec; - buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec; -#else - buf->st_atime = kbuf->st_atime; - buf->st_mtime = kbuf->st_mtime; - buf->st_ctime = kbuf->st_ctime; -#endif -#ifdef _HAVE_STAT___UNUSED1 - buf->__unused1 = 0; -#endif -#ifdef _HAVE_STAT___UNUSED2 - buf->__unused2 = 0; -#endif -#ifdef _HAVE_STAT___UNUSED3 - buf->__unused3 = 0; -#endif -#ifdef _HAVE_STAT___UNUSED4 - buf->__unused4 = 0; -#endif -#ifdef _HAVE_STAT___UNUSED5 - buf->__unused5 = 0; -#endif - } - break; - - default: - __set_errno (EINVAL); - return -1; - } - - return 0; -} -#endif - -int -__xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf) -{ -#ifdef XSTAT_IS_XSTAT64 - return __xstat_conv (vers, kbuf, ubuf); -#else - switch (vers) - { - case _STAT_VER_LINUX: - { - struct stat64 *buf = ubuf; - - /* Convert to current kernel version of `struct stat64'. */ - buf->st_dev = kbuf->st_dev; -#ifdef _HAVE_STAT64___PAD1 - buf->__pad1 = 0; -#endif - buf->st_ino = kbuf->st_ino; -#ifdef _HAVE_STAT64___ST_INO - buf->__st_ino = kbuf->st_ino; -#endif - buf->st_mode = kbuf->st_mode; - buf->st_nlink = kbuf->st_nlink; - buf->st_uid = kbuf->st_uid; - buf->st_gid = kbuf->st_gid; - buf->st_rdev = kbuf->st_rdev; -#ifdef _HAVE_STAT64___PAD2 - buf->__pad2 = 0; -#endif - buf->st_size = kbuf->st_size; - buf->st_blksize = kbuf->st_blksize; - buf->st_blocks = kbuf->st_blocks; -#ifdef _HAVE_STAT64_NSEC - buf->st_atim.tv_sec = kbuf->st_atim.tv_sec; - buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec; - buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec; - buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec; - buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec; - buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec; -#else - buf->st_atime = kbuf->st_atime; - buf->st_mtime = kbuf->st_mtime; - buf->st_ctime = kbuf->st_ctime; -#endif -#ifdef _HAVE_STAT64___UNUSED1 - buf->__unused1 = 0; -#endif -#ifdef _HAVE_STAT64___UNUSED2 - buf->__unused2 = 0; -#endif -#ifdef _HAVE_STAT64___UNUSED3 - buf->__unused3 = 0; -#endif -#ifdef _HAVE_STAT64___UNUSED4 - buf->__unused4 = 0; -#endif -#ifdef _HAVE_STAT64___UNUSED5 - buf->__unused5 = 0; -#endif - } - break; - - /* If struct stat64 is different from struct stat then - _STAT_VER_KERNEL does not make sense. */ - case _STAT_VER_KERNEL: - default: - __set_errno (EINVAL); - return -1; - } - - return 0; -#endif -} - -int -__xstat32_conv (int vers, void *kbuf_, struct stat *buf) -{ - struct kernel_stat64 *kbuf = kbuf_; - - switch (vers) - { - case _STAT_VER_LINUX: - { - /* Convert current kernel version of `struct stat64' to - `struct stat'. */ - buf->st_dev = kbuf->st_dev; -#ifdef _HAVE_STAT___PAD1 - buf->__pad1 = 0; -#endif -#ifdef _HAVE_STAT64___ST_INO -# if __ASSUME_ST_INO_64_BIT == 0 - if (kbuf->st_ino == 0) - buf->st_ino = kbuf->__st_ino; - else -# endif - { - buf->st_ino = kbuf->st_ino; - if (sizeof (buf->st_ino) != sizeof (kbuf->st_ino) - && buf->st_ino != kbuf->st_ino) - { - __set_errno (EOVERFLOW); - return -1; - } - } -#else - buf->st_ino = kbuf->st_ino; - if (sizeof (buf->st_ino) != sizeof (kbuf->st_ino) - && buf->st_ino != kbuf->st_ino) - { - __set_errno (EOVERFLOW); - return -1; - } -#endif - buf->st_mode = kbuf->st_mode; - buf->st_nlink = kbuf->st_nlink; - buf->st_uid = kbuf->st_uid; - buf->st_gid = kbuf->st_gid; - buf->st_rdev = kbuf->st_rdev; -#ifdef _HAVE_STAT___PAD2 - buf->__pad2 = 0; -#endif - buf->st_size = kbuf->st_size; - /* Check for overflow. */ - if (sizeof (buf->st_size) != sizeof (kbuf->st_size) - && buf->st_size != kbuf->st_size) - { - __set_errno (EOVERFLOW); - return -1; - } - buf->st_blksize = kbuf->st_blksize; - buf->st_blocks = kbuf->st_blocks; - /* Check for overflow. */ - if (sizeof (buf->st_blocks) != sizeof (kbuf->st_blocks) - && buf->st_blocks != kbuf->st_blocks) - { - __set_errno (EOVERFLOW); - return -1; - } -#ifdef _HAVE_STAT_NSEC - buf->st_atim.tv_sec = kbuf->st_atim.tv_sec; - buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec; - buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec; - buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec; - buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec; - buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec; -#else - buf->st_atime = kbuf->st_atime; - buf->st_mtime = kbuf->st_mtime; - buf->st_ctime = kbuf->st_ctime; -#endif - -#ifdef _HAVE_STAT___UNUSED1 - buf->__unused1 = 0; -#endif -#ifdef _HAVE_STAT___UNUSED2 - buf->__unused2 = 0; -#endif -#ifdef _HAVE_STAT___UNUSED3 - buf->__unused3 = 0; -#endif -#ifdef _HAVE_STAT___UNUSED4 - buf->__unused4 = 0; -#endif -#ifdef _HAVE_STAT___UNUSED5 - buf->__unused5 = 0; -#endif - } - break; - - /* If struct stat64 is different from struct stat then - _STAT_VER_KERNEL does not make sense. */ - case _STAT_VER_KERNEL: - default: - __set_errno (EINVAL); - return -1; - } - - return 0; -} - -int -__xstat64_kernel64_conv (int vers, void *kbuf_, struct stat64 *buf) -{ - struct kernel_stat64 *kbuf = kbuf_; - - switch (vers) - { - case _STAT_VER_LINUX: - { - /* Convert current kernel version of `struct stat64' to - user version of `struct stat64'. */ - buf->st_dev = kbuf->st_dev; -#ifdef _HAVE_STAT64___PAD1 - buf->__pad1 = kbuf->__pad1; -#endif -#ifdef _HAVE_STAT64___ST_INO - buf->__st_ino = kbuf->__st_ino; -#endif - buf->st_mode = kbuf->st_mode; - buf->st_nlink = kbuf->st_nlink; - buf->st_uid = kbuf->st_uid; - buf->st_gid = kbuf->st_gid; - buf->st_rdev = kbuf->st_rdev; -#ifdef _HAVE_STAT64___PAD2 - buf->__pad2 = kbuf->__pad2; -#endif - buf->st_size = kbuf->st_size; - buf->st_blksize = kbuf->st_blksize; - buf->st_blocks = kbuf->st_blocks; -#ifdef _HAVE_STAT64_NSEC - buf->st_atim.tv_sec = kbuf->st_atim.tv_sec; - buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec; - buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec; - buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec; - buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec; - buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec; -#else - buf->st_atime = kbuf->st_atime; - buf->st_mtime = kbuf->st_mtime; - buf->st_ctime = kbuf->st_ctime; -#endif - buf->st_ino = kbuf->st_ino; - } - break; - - case _STAT_VER_KERNEL: - default: - __set_errno (EINVAL); - return -1; - } - - return 0; -} - -#endif diff --git a/sysdeps/unix/sysv/linux/arm/eabi/xstatconv.h b/sysdeps/unix/sysv/linux/arm/eabi/xstatconv.h deleted file mode 100644 index abe65f4a80..0000000000 --- a/sysdeps/unix/sysv/linux/arm/eabi/xstatconv.h +++ /dev/null @@ -1,28 +0,0 @@ -/* Convert between the kernel's `struct stat' format, and libc's. - Copyright (C) 1991,1995-1997,2000,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. */ - -#include "kernel-features.h" - -#ifndef STAT_IS_KERNEL_STAT -extern int __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf); -extern int __xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf); -#endif -extern int __xstat32_conv (int vers, void *kbuf, struct stat *buf); -extern int __xstat64_kernel64_conv (int vers, struct kernel_stat64 *kbuf, - struct stat64 *buf); diff --git a/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h index 019bd54913..cd4d171c70 100644 --- a/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Phil Blundell , 2003. @@ -46,7 +46,7 @@ .section ".text"; \ PSEUDO_PROLOGUE; \ ENTRY (name); \ - SINGLE_THREAD_P_INT; \ + SINGLE_THREAD_P; \ bne .Lpseudo_cancel; \ DO_CALL (syscall_name, args); \ cmn r0, $4096; \ @@ -104,11 +104,10 @@ extern int __local_multiple_threads attribute_hidden; # define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1) # else # if !defined PIC -# define SINGLE_THREAD_P_INT \ +# define SINGLE_THREAD_P \ ldr ip, =__local_multiple_threads; \ ldr ip, [ip]; \ teq ip, #0; -# define SINGLE_THREAD_P SINGLE_THREAD_P_INT # define MAYBE_SAVE_LR \ str lr, [sp, $-4]!; # define PSEUDO_RET_MOV \ @@ -116,22 +115,13 @@ extern int __local_multiple_threads attribute_hidden; b PLTJMP(SYSCALL_ERROR) # define PSEUDO_PROLOGUE # else -# define SINGLE_THREAD_P_PIC(reg) \ +# define SINGLE_THREAD_P \ ldr ip, 1b; \ - ldr reg, 2b; \ -3: \ - add ip, pc, ip; \ - ldr ip, [ip, reg]; \ +2: \ + ldr ip, [pc, ip]; \ teq ip, #0; -# define SINGLE_THREAD_P_INT \ - str lr, [sp, $-4]!; \ - SINGLE_THREAD_P_PIC(lr) -# define SINGLE_THREAD_P \ - SINGLE_THREAD_P_INT; \ - ldr lr, [sp], $4 # define PSEUDO_PROLOGUE \ - 1: .word _GLOBAL_OFFSET_TABLE_ - 3f - 8; \ - 2: .word __local_multiple_threads(GOTOFF); + 1: .word __local_multiple_threads - 2f - 8; # define MAYBE_SAVE_LR /* lr already saved */ # define PSEUDO_RET_MOV PSEUDO_RET # endif diff --git a/sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S b/sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S index 2708c701eb..b826a99ad5 100644 --- a/sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S +++ b/sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2002, 2003, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Philip Blundell . @@ -27,8 +27,6 @@ replaced by a call to `execve'. Return -1 for errors, 0 to the new process, and the process ID of the new process to the old process. */ - PSEUDO_PROLOGUE - ENTRY (__vfork) #ifdef __NR_vfork @@ -44,7 +42,7 @@ ENTRY (__vfork) movs r0, r0 bne HIDDEN_JUMPTARGET (__fork) - swi __NR_vfork + DO_CALL (vfork, 0) cmn a1, #4096 RETINSTR(cc, lr) @@ -58,7 +56,7 @@ ENTRY (__vfork) #ifndef __ASSUME_VFORK_SYSCALL /* If we don't have vfork, fork is close enough. */ - swi __NR_fork + DO_CALL (fork, 0) cmn a1, #4096 RETINSTR(cc, lr) #elif !defined __NR_vfork diff --git a/sysdeps/unix/sysv/linux/arm/mmap.S b/sysdeps/unix/sysv/linux/arm/mmap.S index cf6f253378..9227bd79f3 100644 --- a/sysdeps/unix/sysv/linux/arm/mmap.S +++ b/sysdeps/unix/sysv/linux/arm/mmap.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2000, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2000, 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 @@ -43,7 +43,7 @@ ENTRY (__mmap) mov r5, r5, lsr #12 /* do the syscall */ - swi SYS_ify (mmap2) + DO_CALL (mmap2, 0) /* restore registers */ 2: @@ -77,7 +77,7 @@ ENTRY (__mmap) /* do the syscall */ mov a1, sp - swi SYS_ify (mmap) + DO_CALL (mmap, 0) /* pop args off the stack. */ add sp, sp, #16 diff --git a/sysdeps/unix/sysv/linux/arm/mmap64.S b/sysdeps/unix/sysv/linux/arm/mmap64.S index bb5e1dc261..3c1f247ed9 100644 --- a/sysdeps/unix/sysv/linux/arm/mmap64.S +++ b/sysdeps/unix/sysv/linux/arm/mmap64.S @@ -23,21 +23,13 @@ #include "kernel-features.h" -/* For the EABI, there are four extra bytes of padding in the - incoming arguments to mmap64, to preserve alignment. */ -#ifdef __ARM_EABI__ -# define INITIAL_OFFSET 8 -#else -# define INITIAL_OFFSET 4 -#endif - #ifdef __ARMEB__ -# define LOW_OFFSET INITIAL_OFFSET + 4 +# define LOW_OFFSET 4 + 4 /* The initial + 4 is for the stack postdecrement. */ -# define HIGH_OFFSET 4 + INITIAL_OFFSET + 0 +# define HIGH_OFFSET 4 + 4 + 0 #else -# define LOW_OFFSET INITIAL_OFFSET + 0 -# define HIGH_OFFSET 4 + INITIAL_OFFSET + 4 +# define LOW_OFFSET 4 + 0 +# define HIGH_OFFSET 4 + 4 + 4 #endif /* The mmap2 system call takes six arguments, all in registers. */ @@ -55,7 +47,7 @@ ENTRY (__mmap64) ldr r4, [sp, $8] @ load fd orr r5, ip, r5, lsl $20 @ compose page offset mov ip, r0 - swi SYS_ify (mmap2) + DO_CALL (mmap2, 0) cmn r0, $4096 # ifdef __ASSUME_MMAP2_SYSCALL ldr r4, [sp], #4 diff --git a/sysdeps/unix/sysv/linux/arm/socket.S b/sysdeps/unix/sysv/linux/arm/socket.S index 69f88eb3ca..4c0fdfb0a7 100644 --- a/sysdeps/unix/sysv/linux/arm/socket.S +++ b/sysdeps/unix/sysv/linux/arm/socket.S @@ -79,11 +79,7 @@ ENTRY (__socket) P(PUSHARGS_,NARGS) #if defined NEED_CANCELLATION && defined CENABLE -#ifdef PIC - SINGLE_THREAD_P_PIC(r3) -#else SINGLE_THREAD_P -#endif bne 1f #endif diff --git a/sysdeps/unix/sysv/linux/arm/vfork.S b/sysdeps/unix/sysv/linux/arm/vfork.S index 9ef5114b24..0e267b3ca9 100644 --- a/sysdeps/unix/sysv/linux/arm/vfork.S +++ b/sysdeps/unix/sysv/linux/arm/vfork.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2002, 2003, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Philip Blundell . @@ -30,7 +30,7 @@ ENTRY (__vfork) #ifdef __NR_vfork - swi __NR_vfork + DO_CALL (vfork, 0) cmn a1, #4096 RETINSTR(cc, lr) @@ -45,7 +45,7 @@ ENTRY (__vfork) #ifndef __ASSUME_VFORK_SYSCALL /* If we don't have vfork, fork is close enough. */ - swi __NR_fork + DO_CALL (fork, 0) cmn a1, #4096 RETINSTR(cc, lr) b PLTJMP(C_SYMBOL_NAME(__syscall_error)) From 02a9f771e32e1fd39f5338ad111e3adad804b6a2 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Wed, 16 Nov 2005 19:03:42 +0000 Subject: [PATCH 3481/4487] * sysdeps/arm/bits/setjmp.h, sysdeps/arm/fpu/bits/setjmp.h: Update include guards. * sysdeps/unix/arm/sysdep.S (syscall_error): Handle USE___THREAD and RTLD_PRIVATE_ERRNO. * sysdeps/unix/sysv/linux/arm/clone.S (__clone): Handle RESET_PID. Handle new arguments. * sysdeps/unix/sysv/linux/arm/vfork.S (__vfork): Use SAVE_PID and RESTORE_PID. Use the right syscall error handler. * sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S (__default_sa_restorer, __default_rt_sa_restorer): Add unwind information. * sysdeps/unix/sysv/linux/arm/eabi/socket.S: Update formatting. Add unwind information. Correct stack alignment typo. * sysdeps/unix/sysv/linux/arm/eabi/sysdep.h (INTERNAL_SYSCALL_NCS): Define. * sysdeps/unix/sysv/linux/arm/sigaction.c (__libc_sigaction): Remove never-valid handling for SA_ONSTACK. * sysdeps/unix/sysv/linux/arm/socket.S: Whitespace cleanup. * sysdeps/unix/sysv/linux/arm/sysdep.h (SYSCALL_ERROR_HANDLER): Handle RTLD_PRIVATE_ERRNO. (INTERNAL_SYSCALL_NCS): Implement. * sysdeps/arm/nptl/Makefile, sysdeps/arm/nptl/jmpbuf-unwind.h, sysdeps/arm/nptl/pthread_spin_lock.S, sysdeps/arm/nptl/pthread_spin_trylock.S, sysdeps/arm/nptl/pthreaddef.h, sysdeps/arm/nptl/tcb-offsets.sym, sysdeps/arm/nptl/tls.h, sysdeps/unix/sysv/linux/arm/eabi/Makefile, sysdeps/unix/sysv/linux/arm/eabi/nptl/Makefile, sysdeps/unix/sysv/linux/arm/eabi/nptl/configure, sysdeps/unix/sysv/linux/arm/eabi/nptl/configure.in, sysdeps/unix/sysv/linux/arm/eabi/nptl/nptl-aeabi_unwind_cpp_pr1.c, sysdeps/unix/sysv/linux/arm/eabi/nptl/rt-aeabi_unwind_cpp_pr1.c, sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h, sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c, sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c, sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h, sysdeps/unix/sysv/linux/arm/nptl/Versions, sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h, sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h, sysdeps/unix/sysv/linux/arm/nptl/clone.S, sysdeps/unix/sysv/linux/arm/nptl/createthread.c, sysdeps/unix/sysv/linux/arm/nptl/fork.c, sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c, sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h, sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S, sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c, sysdeps/unix/sysv/linux/arm/nptl/vfork.S: New files. --- ChangeLog.arm | 58 ++++ sysdeps/arm/bits/setjmp.h | 9 +- sysdeps/arm/fpu/bits/setjmp.h | 9 +- sysdeps/arm/nptl/Makefile | 21 ++ sysdeps/arm/nptl/jmpbuf-unwind.h | 30 ++ sysdeps/arm/nptl/pthread_spin_lock.S | 31 ++ sysdeps/arm/nptl/pthread_spin_trylock.S | 34 +++ sysdeps/arm/nptl/pthreaddef.h | 39 +++ sysdeps/arm/nptl/tcb-offsets.sym | 11 + sysdeps/arm/nptl/tls.h | 137 +++++++++ sysdeps/unix/arm/sysdep.S | 35 ++- sysdeps/unix/sysv/linux/arm/clone.S | 56 +++- sysdeps/unix/sysv/linux/arm/eabi/Makefile | 6 + .../unix/sysv/linux/arm/eabi/nptl/Makefile | 17 ++ .../unix/sysv/linux/arm/eabi/nptl/configure | 4 + .../sysv/linux/arm/eabi/nptl/configure.in | 8 + .../arm/eabi/nptl/nptl-aeabi_unwind_cpp_pr1.c | 1 + .../arm/eabi/nptl/rt-aeabi_unwind_cpp_pr1.c | 1 + .../sysv/linux/arm/eabi/nptl/sysdep-cancel.h | 149 ++++++++++ .../linux/arm/eabi/nptl/unwind-forcedunwind.c | 113 ++++++++ .../sysv/linux/arm/eabi/nptl/unwind-resume.c | 82 ++++++ .../unix/sysv/linux/arm/eabi/nptl/unwind.h | 274 ++++++++++++++++++ .../unix/sysv/linux/arm/eabi/sigrestorer.S | 21 +- sysdeps/unix/sysv/linux/arm/eabi/socket.S | 28 +- sysdeps/unix/sysv/linux/arm/eabi/sysdep.h | 5 + sysdeps/unix/sysv/linux/arm/nptl/Versions | 6 + .../unix/sysv/linux/arm/nptl/bits/atomic.h | 95 ++++++ .../sysv/linux/arm/nptl/bits/pthreadtypes.h | 157 ++++++++++ .../unix/sysv/linux/arm/nptl/bits/semaphore.h | 38 +++ sysdeps/unix/sysv/linux/arm/nptl/clone.S | 3 + .../unix/sysv/linux/arm/nptl/createthread.c | 23 ++ sysdeps/unix/sysv/linux/arm/nptl/fork.c | 31 ++ .../unix/sysv/linux/arm/nptl/lowlevellock.c | 118 ++++++++ .../unix/sysv/linux/arm/nptl/lowlevellock.h | 268 +++++++++++++++++ sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S | 38 +++ .../unix/sysv/linux/arm/nptl/pthread_once.c | 99 +++++++ sysdeps/unix/sysv/linux/arm/nptl/vfork.S | 39 +++ sysdeps/unix/sysv/linux/arm/sigaction.c | 15 +- sysdeps/unix/sysv/linux/arm/socket.S | 16 +- sysdeps/unix/sysv/linux/arm/sysdep.h | 36 ++- sysdeps/unix/sysv/linux/arm/vfork.S | 14 +- 41 files changed, 2124 insertions(+), 51 deletions(-) create mode 100644 sysdeps/arm/nptl/Makefile create mode 100644 sysdeps/arm/nptl/jmpbuf-unwind.h create mode 100644 sysdeps/arm/nptl/pthread_spin_lock.S create mode 100644 sysdeps/arm/nptl/pthread_spin_trylock.S create mode 100644 sysdeps/arm/nptl/pthreaddef.h create mode 100644 sysdeps/arm/nptl/tcb-offsets.sym create mode 100644 sysdeps/arm/nptl/tls.h create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/Makefile create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/nptl/Makefile create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/nptl/configure create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/nptl/configure.in create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/nptl/nptl-aeabi_unwind_cpp_pr1.c create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/nptl/rt-aeabi_unwind_cpp_pr1.c create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h create mode 100644 sysdeps/unix/sysv/linux/arm/nptl/Versions create mode 100644 sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h create mode 100644 sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h create mode 100644 sysdeps/unix/sysv/linux/arm/nptl/bits/semaphore.h create mode 100644 sysdeps/unix/sysv/linux/arm/nptl/clone.S create mode 100644 sysdeps/unix/sysv/linux/arm/nptl/createthread.c create mode 100644 sysdeps/unix/sysv/linux/arm/nptl/fork.c create mode 100644 sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c create mode 100644 sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h create mode 100644 sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S create mode 100644 sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c create mode 100644 sysdeps/unix/sysv/linux/arm/nptl/vfork.S diff --git a/ChangeLog.arm b/ChangeLog.arm index 21e15ce897..795b363904 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,61 @@ +2005-11-16 Daniel Jacobowitz + + * sysdeps/arm/bits/setjmp.h, sysdeps/arm/fpu/bits/setjmp.h: Update + include guards. + + * sysdeps/unix/arm/sysdep.S (syscall_error): Handle USE___THREAD and + RTLD_PRIVATE_ERRNO. + + * sysdeps/unix/sysv/linux/arm/clone.S (__clone): Handle RESET_PID. + Handle new arguments. + * sysdeps/unix/sysv/linux/arm/vfork.S (__vfork): Use SAVE_PID and + RESTORE_PID. Use the right syscall error handler. + + * sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S + (__default_sa_restorer, __default_rt_sa_restorer): Add unwind + information. + + * sysdeps/unix/sysv/linux/arm/eabi/socket.S: Update formatting. + Add unwind information. Correct stack alignment typo. + + * sysdeps/unix/sysv/linux/arm/eabi/sysdep.h + (INTERNAL_SYSCALL_NCS): Define. + + * sysdeps/unix/sysv/linux/arm/sigaction.c + (__libc_sigaction): Remove never-valid handling for SA_ONSTACK. + + * sysdeps/unix/sysv/linux/arm/socket.S: Whitespace cleanup. + + * sysdeps/unix/sysv/linux/arm/sysdep.h (SYSCALL_ERROR_HANDLER): Handle + RTLD_PRIVATE_ERRNO. + (INTERNAL_SYSCALL_NCS): Implement. + + * sysdeps/arm/nptl/Makefile, sysdeps/arm/nptl/jmpbuf-unwind.h, + sysdeps/arm/nptl/pthread_spin_lock.S, + sysdeps/arm/nptl/pthread_spin_trylock.S, + sysdeps/arm/nptl/pthreaddef.h, sysdeps/arm/nptl/tcb-offsets.sym, + sysdeps/arm/nptl/tls.h, sysdeps/unix/sysv/linux/arm/eabi/Makefile, + sysdeps/unix/sysv/linux/arm/eabi/nptl/Makefile, + sysdeps/unix/sysv/linux/arm/eabi/nptl/configure, + sysdeps/unix/sysv/linux/arm/eabi/nptl/configure.in, + sysdeps/unix/sysv/linux/arm/eabi/nptl/nptl-aeabi_unwind_cpp_pr1.c, + sysdeps/unix/sysv/linux/arm/eabi/nptl/rt-aeabi_unwind_cpp_pr1.c, + sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h, + sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c, + sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c, + sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h, + sysdeps/unix/sysv/linux/arm/nptl/Versions, + sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h, + sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h, + sysdeps/unix/sysv/linux/arm/nptl/clone.S, + sysdeps/unix/sysv/linux/arm/nptl/createthread.c, + sysdeps/unix/sysv/linux/arm/nptl/fork.c, + sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c, + sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h, + sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S, + sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c, + sysdeps/unix/sysv/linux/arm/nptl/vfork.S: New files. + 2005-11-16 Daniel Jacobowitz * sysdeps/arm/dl-machine.h (CLEAR_CACHE): Use INTERNAL_SYSCALL_ARM. diff --git a/sysdeps/arm/bits/setjmp.h b/sysdeps/arm/bits/setjmp.h index e0a4657b47..9b74906791 100644 --- a/sysdeps/arm/bits/setjmp.h +++ b/sysdeps/arm/bits/setjmp.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 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 @@ -18,7 +18,10 @@ /* Define the machine-dependent type `jmp_buf'. ARM version. */ -#ifndef _SETJMP_H +#ifndef _BITS_SETJMP_H +#define _BITS_SETJMP_H 1 + +#if !defined _SETJMP_H && !defined _PTHREAD_H # error "Never include directly; use instead." #endif @@ -34,3 +37,5 @@ typedef int __jmp_buf[10]; containing a local variable at ADDRESS. */ #define _JMPBUF_UNWINDS(jmpbuf, address) \ ((void *) (address) < (void *) (jmpbuf[__JMP_BUF_SP])) + +#endif diff --git a/sysdeps/arm/fpu/bits/setjmp.h b/sysdeps/arm/fpu/bits/setjmp.h index dd85243032..0a19d2c9ab 100644 --- a/sysdeps/arm/fpu/bits/setjmp.h +++ b/sysdeps/arm/fpu/bits/setjmp.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 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 @@ -18,7 +18,10 @@ /* Define the machine-dependent type `jmp_buf'. ARM version. */ -#ifndef _SETJMP_H +#ifndef _BITS_SETJMP_H +#define _BITS_SETJMP_H 1 + +#if !defined _SETJMP_H && !defined _PTHREAD_H # error "Never include directly; use instead." #endif @@ -34,3 +37,5 @@ typedef int __jmp_buf[22]; containing a local variable at ADDRESS. */ #define _JMPBUF_UNWINDS(jmpbuf, address) \ ((void *) (address) < (void *) (jmpbuf[__JMP_BUF_SP])) + +#endif diff --git a/sysdeps/arm/nptl/Makefile b/sysdeps/arm/nptl/Makefile new file mode 100644 index 0000000000..0300693783 --- /dev/null +++ b/sysdeps/arm/nptl/Makefile @@ -0,0 +1,21 @@ +# Copyright (C) 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 +# 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. + +ifeq ($(subdir),csu) +gen-as-const-headers += tcb-offsets.sym +endif diff --git a/sysdeps/arm/nptl/jmpbuf-unwind.h b/sysdeps/arm/nptl/jmpbuf-unwind.h new file mode 100644 index 0000000000..f05e27fd1d --- /dev/null +++ b/sysdeps/arm/nptl/jmpbuf-unwind.h @@ -0,0 +1,30 @@ +/* Copyright (C) 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 + 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. */ + +#include +#include +#include + +#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \ + _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj) + +#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \ + ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[__JMP_BUF_SP] - (_adj)) + +/* We use the normal longjmp for unwinding. */ +#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val) diff --git a/sysdeps/arm/nptl/pthread_spin_lock.S b/sysdeps/arm/nptl/pthread_spin_lock.S new file mode 100644 index 0000000000..bd6adf794a --- /dev/null +++ b/sysdeps/arm/nptl/pthread_spin_lock.S @@ -0,0 +1,31 @@ +/* Copyright (C) 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 + 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. */ + +#include + + .text + .align 4 + +ENTRY (pthread_spin_lock) + mov r1, #1 +1: swp r2, r1, [r0] + teq r2, #0 + bne 1b + mov r0, #0 + PSEUDO_RET_NOERRNO +END (pthread_spin_lock) diff --git a/sysdeps/arm/nptl/pthread_spin_trylock.S b/sysdeps/arm/nptl/pthread_spin_trylock.S new file mode 100644 index 0000000000..85931507a7 --- /dev/null +++ b/sysdeps/arm/nptl/pthread_spin_trylock.S @@ -0,0 +1,34 @@ +/* Copyright (C) 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 + 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. */ + +#define _ERRNO_H 1 +#include + +#include + + .text + .align 4 + +ENTRY (pthread_spin_trylock) + mov r1, #1 + swp r2, r1, [r0] + teq r2, #0 + moveq r0, #0 + movne r0, #EBUSY + PSEUDO_RET_NOERRNO +END (pthread_spin_trylock) diff --git a/sysdeps/arm/nptl/pthreaddef.h b/sysdeps/arm/nptl/pthreaddef.h new file mode 100644 index 0000000000..783828a400 --- /dev/null +++ b/sysdeps/arm/nptl/pthreaddef.h @@ -0,0 +1,39 @@ +/* Copyright (C) 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 + 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. */ + +/* Default stack size. */ +#define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024) + +/* Required stack pointer alignment at beginning. SSE requires 16 + bytes. */ +#define STACK_ALIGN 16 + +/* Minimal stack size after allocating thread descriptor and guard size. */ +#define MINIMAL_REST_STACK 2048 + +/* Alignment requirement for TCB. */ +#define TCB_ALIGNMENT 16 + + +/* Location of current stack frame. */ +#define CURRENT_STACK_FRAME __builtin_frame_address (0) + + +/* XXX Until we have a better place keep the definitions here. */ +#define __exit_thread_inline(val) \ + INLINE_SYSCALL (exit, 1, (val)) diff --git a/sysdeps/arm/nptl/tcb-offsets.sym b/sysdeps/arm/nptl/tcb-offsets.sym new file mode 100644 index 0000000000..92cc441d3d --- /dev/null +++ b/sysdeps/arm/nptl/tcb-offsets.sym @@ -0,0 +1,11 @@ +#include +#include + +-- + +-- Derive offsets relative to the thread register. +#define thread_offsetof(mem) (long)(offsetof(struct pthread, mem) - sizeof(struct pthread)) + +MULTIPLE_THREADS_OFFSET thread_offsetof (header.multiple_threads) +PID_OFFSET thread_offsetof (pid) +TID_OFFSET thread_offsetof (tid) diff --git a/sysdeps/arm/nptl/tls.h b/sysdeps/arm/nptl/tls.h new file mode 100644 index 0000000000..26ef70961c --- /dev/null +++ b/sysdeps/arm/nptl/tls.h @@ -0,0 +1,137 @@ +/* Definition for thread-local data handling. NPTL/ARM version. + Copyright (C) 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 + 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 _TLS_H +#define _TLS_H 1 + +#include + +#ifndef __ASSEMBLER__ +# include +# include +# include + +/* Type for the dtv. */ +typedef union dtv +{ + size_t counter; + struct + { + void *val; + bool is_static; + } pointer; +} dtv_t; + +#else /* __ASSEMBLER__ */ +# include +#endif /* __ASSEMBLER__ */ + + +/* We require TLS support in the tools. */ +#ifndef HAVE_TLS_SUPPORT +# error "TLS support is required." +#endif + +/* Signal that TLS support is available. */ +# define USE_TLS 1 + +#ifndef __ASSEMBLER__ + +/* Get system call information. */ +# include + +/* The TP points to the start of the thread blocks. */ +# define TLS_DTV_AT_TP 1 + +/* Get the thread descriptor definition. */ +# include + +typedef struct +{ + dtv_t *dtv; + void *private; +} tcbhead_t; + +/* This is the size of the initial TCB. */ +# define TLS_INIT_TCB_SIZE sizeof (tcbhead_t) + +/* Alignment requirements for the initial TCB. */ +# define TLS_INIT_TCB_ALIGN 16 + +/* This is the size of the TCB. */ +# define TLS_TCB_SIZE sizeof (tcbhead_t) + +/* This is the size we need before TCB. */ +# define TLS_PRE_TCB_SIZE sizeof (struct pthread) + +/* Alignment requirements for the TCB. */ +# define TLS_TCB_ALIGN 16 + +/* Install the dtv pointer. The pointer passed is to the element with + index -1 which contain the length. */ +# define INSTALL_DTV(tcbp, dtvp) \ + (((tcbhead_t *) (tcbp))->dtv = (dtvp) + 1) + +/* Install new dtv for current thread. */ +# define INSTALL_NEW_DTV(dtv) \ + (THREAD_DTV() = (dtv)) + +/* Return dtv of given thread descriptor. */ +# define GET_DTV(tcbp) \ + (((tcbhead_t *) (tcbp))->dtv) + +/* Code to initially initialize the thread pointer. This might need + special attention since 'errno' is not yet available and if the + operation can cause a failure 'errno' must not be touched. */ +# define TLS_INIT_TP(tcbp, secondcall) \ + ({ INTERNAL_SYSCALL_DECL (err); \ + long result_var; \ + result_var = INTERNAL_SYSCALL_ARM (set_tls, err, 1, (tcbp)); \ + INTERNAL_SYSCALL_ERROR_P (result_var, err) \ + ? "unknown error" : NULL; }) + +/* Return the address of the dtv for the current thread. */ +# define THREAD_DTV() \ + (((tcbhead_t *) __builtin_thread_pointer ())->dtv) + +/* Return the thread descriptor for the current thread. */ +# define THREAD_SELF \ + ((struct pthread *)__builtin_thread_pointer () - 1) + +/* Magic for libthread_db to know how to do THREAD_SELF. */ +# define DB_THREAD_SELF \ + CONST_THREAD_AREA (32, sizeof (struct pthread)) + +/* Access to data in the thread descriptor is easy. */ +#define THREAD_GETMEM(descr, member) \ + descr->member +#define THREAD_GETMEM_NC(descr, member, idx) \ + descr->member[idx] +#define THREAD_SETMEM(descr, member, value) \ + descr->member = (value) +#define THREAD_SETMEM_NC(descr, member, idx, value) \ + descr->member[idx] = (value) + +/* Initializing the thread pointer will generate a SIGILL if the syscall + is not available. */ +#define TLS_INIT_TP_EXPENSIVE 1 + +#endif /* __ASSEMBLER__ */ + +#endif /* tls.h */ diff --git a/sysdeps/unix/arm/sysdep.S b/sysdeps/unix/arm/sysdep.S index 4810805d85..dcb427e57f 100644 --- a/sysdeps/unix/arm/sysdep.S +++ b/sysdeps/unix/arm/sysdep.S @@ -1,4 +1,6 @@ -/* Copyright (C) 1991,92,93,94,95,96,97,98,2002,03 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2002, 2003, + 2004, 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,8 +22,11 @@ #define _ERRNO_H #include -.globl C_SYMBOL_NAME(errno) -.globl syscall_error +#ifdef IS_IN_rtld +# include /* Defines RTLD_PRIVATE_ERRNO. */ +#endif + +#include #undef syscall_error #ifdef NO_UNDERSCORES @@ -37,7 +42,29 @@ syscall_error: moveq r0, $EAGAIN /* Yes; translate it to EAGAIN. */ #endif -#ifdef _LIBC_REENTRANT +#if USE___THREAD + mov ip, lr + mov r1, r0 + + mov r0, #0xffff0fff + mov lr, pc + sub pc, r0, #31 + + ldr r2, 1f +2: ldr r2, [pc, r2] + str r1, [r0, r2] + mvn r0, #0 + RETINSTR (, ip) + +1: .word errno(gottpoff) + (. - 2b - 8) +#elif RTLD_PRIVATE_ERRNO + ldr r1, 1f +0: str r0, [pc, r1] + mvn r0, $0 + DO_RET(r14) + +1: .word C_SYMBOL_NAME(rtld_errno) - 0b - 8 +#elif defined(_LIBC_REENTRANT) str lr, [sp, #-4]! str r0, [sp, #-4]! bl PLTJMP(C_SYMBOL_NAME(__errno_location)) diff --git a/sysdeps/unix/sysv/linux/arm/clone.S b/sysdeps/unix/sysv/linux/arm/clone.S index b46281c432..6c8f8e8e28 100644 --- a/sysdeps/unix/sysv/linux/arm/clone.S +++ b/sysdeps/unix/sysv/linux/arm/clone.S @@ -25,7 +25,11 @@ #define _ERRNO_H 1 #include -/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg); */ +#define CLONE_VM 0x00000100 +#define CLONE_THREAD 0x00010000 + +/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg, + pid_t *ptid, struct user_desc *tls, pid_t *ctid); */ .text ENTRY(__clone) @@ -42,16 +46,58 @@ ENTRY(__clone) @ do the system call @ get flags mov r0, r2 +#ifdef RESET_PID + mov ip, r2 +#endif @ new sp is already in r1 - DO_CALL (clone, 0) - movs a1, a1 +#ifdef __ARM_EABI__ + stmfd sp!, {r4, r7} +#else + str r4, [sp, #-8]! +#endif + ldr r2, [sp, #8] + ldr r3, [sp, #12] + ldr r4, [sp, #16] +#ifdef __ARM_EABI__ + ldr r7, =SYS_ify(clone) + swi 0x0 +#else + swi SYS_ify(clone) +#endif + cmp r0, #0 + beq 1f +#ifdef __ARM_EABI__ + ldmfd sp!, {r4, r7} +#else + ldr r4, [sp], #8 +#endif blt PLTJMP(C_SYMBOL_NAME(__syscall_error)) - RETINSTR(ne, lr) + RETINSTR(, lr) +1: +#ifdef RESET_PID + tst ip, #CLONE_THREAD + bne 3f + mov r0, #0xffff0fff + mov lr, pc + sub pc, r0, #31 + mov r1, r0 + tst ip, #CLONE_VM + movne r0, #-1 +#ifdef __ARM_EABI__ + ldr r7, =SYS_ify(getpid) + swieq 0x0 +#else + swieq SYS_ify(getpid) +#endif + str r0, [r1, #PID_OFFSET] + str r0, [r1, #TID_OFFSET] +3: +#endif @ pick the function arg and call address off the stack and execute ldr r0, [sp, #4] mov lr, pc - ldr pc, [sp] + ldr pc, [sp], #8 @ and we are done, passing the return value through r0 b PLTJMP(_exit) diff --git a/sysdeps/unix/sysv/linux/arm/eabi/Makefile b/sysdeps/unix/sysv/linux/arm/eabi/Makefile new file mode 100644 index 0000000000..d3c02a2dea --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/Makefile @@ -0,0 +1,6 @@ +ifeq ($(subdir),csu) +# In order for unwinding to fail when it falls out of main, we need a +# cantunwind marker. There's one in start.S. To make sure we reach it, add +# unwind tables for __libc_start_main. +CFLAGS-libc-start.c += -fexceptions +endif diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/Makefile b/sysdeps/unix/sysv/linux/arm/eabi/nptl/Makefile new file mode 100644 index 0000000000..ef8076cf3f --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/Makefile @@ -0,0 +1,17 @@ +ifeq ($(subdir),rt) +librt-sysdep_routines += rt-aeabi_unwind_cpp_pr1 +librt-shared-only-routines += rt-aeabi_unwind_cpp_pr1 +endif + +ifeq ($(subdir),nptl) +libpthread-sysdep_routines += nptl-aeabi_unwind_cpp_pr1 +libpthread-shared-only-routines += nptl-aeabi_unwind_cpp_pr1 + +# This test relies on compiling part of the binary with EH information, +# part without, and unwinding through. The .ARM.exidx tables have +# start addresses for EH regions, but no end addresses. Every +# region an exception needs to propogate through must have unwind +# information, or a previous function's unwind table may be used +# by mistake. +tests := $(filter-out tst-cleanupx4,$(tests)) +endif diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/configure b/sysdeps/unix/sysv/linux/arm/eabi/nptl/configure new file mode 100644 index 0000000000..518269913a --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/configure @@ -0,0 +1,4 @@ +# This file is generated from configure.in by Autoconf. DO NOT EDIT! + +libc_cv_gcc_exceptions=yes +exceptions=-fexceptions diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/configure.in b/sysdeps/unix/sysv/linux/arm/eabi/nptl/configure.in new file mode 100644 index 0000000000..22f6f4b8f2 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/configure.in @@ -0,0 +1,8 @@ +dnl configure fragment for NPTL and ARM/Linux EABI. +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. + +dnl The normal configure check for gcc -fexecptions fails because it can't +dnl find __aeabi_unwind_cpp_pr0. Work around this here; our GCC definitely +dnl has -fexceptions. +libc_cv_gcc_exceptions=yes +exceptions=-fexceptions diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/nptl-aeabi_unwind_cpp_pr1.c b/sysdeps/unix/sysv/linux/arm/eabi/nptl/nptl-aeabi_unwind_cpp_pr1.c new file mode 100644 index 0000000000..7b83522437 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/nptl-aeabi_unwind_cpp_pr1.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/rt-aeabi_unwind_cpp_pr1.c b/sysdeps/unix/sysv/linux/arm/eabi/nptl/rt-aeabi_unwind_cpp_pr1.c new file mode 100644 index 0000000000..7b83522437 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/rt-aeabi_unwind_cpp_pr1.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h new file mode 100644 index 0000000000..5e89399116 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h @@ -0,0 +1,149 @@ +/* Copyright (C) 2003, 2004, 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 + 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. */ + +#include +#include +#ifndef __ASSEMBLER__ +# include +#endif + +#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt + +/* NOTE: We do mark syscalls with unwind annotations, for the benefit of + cancellation; but they're really only accurate at the point of the + syscall. The ARM unwind directives are not rich enough without adding + a custom personality function. */ + +# undef PSEUDO +# define PSEUDO(name, syscall_name, args) \ + .section ".text"; \ + PSEUDO_PROLOGUE; \ + .type __##syscall_name##_nocancel,%function; \ + .globl __##syscall_name##_nocancel; \ + __##syscall_name##_nocancel: \ + DO_CALL (syscall_name, args); \ + PSEUDO_RET; \ + .size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel; \ + ENTRY (name); \ + SINGLE_THREAD_P; \ + DOARGS_##args; \ + bne .Lpseudo_cancel; \ + DO_CALL (syscall_name, 0); \ + UNDOARGS_##args; \ + cmn r0, $4096; \ + PSEUDO_RET; \ + .Lpseudo_cancel: \ + .fnstart; \ + DOCARGS_##args; /* save syscall args etc. around CENABLE. */ \ + CENABLE; \ + mov ip, r0; /* put mask in safe place. */ \ + UNDOCARGS_##args; /* restore syscall args. */ \ + ldr r7, =SYS_ify (syscall_name); \ + swi 0x0; /* do the call. */ \ + .fnend; /* Past here we can't easily unwind. */ \ + mov r7, r0; /* save syscall return value. */ \ + mov r0, ip; /* get mask back. */ \ + CDISABLE; \ + mov r0, r7; /* retrieve return value. */ \ + RESTORE_LR_##args; \ + UNDOARGS_##args; \ + cmn r0, $4096; + +/* DOARGS pushes four bytes on the stack for five arguments, and nothing + otherwise. In order to preserve doubleword alignment, sometimes we must + save an extra register. */ + +# define RESTART_UNWIND .fnend; .fnstart; .save {r7, lr} + +# define DOCARGS_0 stmfd sp!, {r7, lr}; .save {r7, lr} +# define UNDOCARGS_0 +# define RESTORE_LR_0 ldmfd sp!, {r7, lr}; + +# define DOCARGS_1 stmfd sp!, {r0, r1, r7, lr}; .save {r7, lr}; .pad #8 +# define UNDOCARGS_1 ldr r0, [sp], #8; RESTART_UNWIND +# define RESTORE_LR_1 RESTORE_LR_0 + +# define DOCARGS_2 stmfd sp!, {r0, r1, r7, lr}; .save {r7, lr}; .pad #8 +# define UNDOCARGS_2 ldmfd sp!, {r0, r1}; RESTART_UNWIND +# define RESTORE_LR_2 RESTORE_LR_0 + +# define DOCARGS_3 stmfd sp!, {r0, r1, r2, r3, r7, lr}; .save {r7, lr}; .pad #16 +# define UNDOCARGS_3 ldmfd sp!, {r0, r1, r2, r3}; RESTART_UNWIND +# define RESTORE_LR_3 RESTORE_LR_0 + +# define DOCARGS_4 stmfd sp!, {r0, r1, r2, r3, r7, lr}; .save {r7, lr}; .pad #16 +# define UNDOCARGS_4 ldmfd sp!, {r0, r1, r2, r3}; RESTART_UNWIND +# define RESTORE_LR_4 RESTORE_LR_0 + +# define DOCARGS_5 .save {r4}; stmfd sp!, {r0, r1, r2, r3, r4, r7, lr}; .save {r7, lr}; .pad #20 +# define UNDOCARGS_5 ldmfd sp!, {r0, r1, r2, r3}; .fnend; .fnstart; .save {r4}; .save {r7, lr}; .pad #4 +# define RESTORE_LR_5 ldmfd sp!, {r4, r7, lr} + +# ifdef IS_IN_libpthread +# define CENABLE bl PLTJMP(__pthread_enable_asynccancel) +# define CDISABLE bl PLTJMP(__pthread_disable_asynccancel) +# define __local_multiple_threads __pthread_multiple_threads +# elif !defined NOT_IN_libc +# define CENABLE bl PLTJMP(__libc_enable_asynccancel) +# define CDISABLE bl PLTJMP(__libc_disable_asynccancel) +# define __local_multiple_threads __libc_multiple_threads +# elif defined IS_IN_librt +# define CENABLE bl PLTJMP(__librt_enable_asynccancel) +# define CDISABLE bl PLTJMP(__librt_disable_asynccancel) +# else +# error Unsupported library +# endif + +# if defined IS_IN_libpthread || !defined NOT_IN_libc +# ifndef __ASSEMBLER__ +extern int __local_multiple_threads attribute_hidden; +# define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1) +# else +# define SINGLE_THREAD_P \ + ldr ip, 1b; \ +2: \ + ldr ip, [pc, ip]; \ + teq ip, #0; +# define PSEUDO_PROLOGUE \ + 1: .word __local_multiple_threads - 2f - 8; +# endif +# else +/* There is no __local_multiple_threads for librt, so use the TCB. */ +# ifndef __ASSEMBLER__ +# define SINGLE_THREAD_P \ + __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ + header.multiple_threads) == 0, 1) +# else +# define PSEUDO_PROLOGUE +# define SINGLE_THREAD_P \ + stmfd sp!, {r0, lr}; \ + bl __aeabi_read_tp; \ + ldr ip, [r0, #MULTIPLE_THREADS_OFFSET]; \ + ldmfd sp!, {r0, lr}; \ + teq ip, #0 +# define SINGLE_THREAD_P_PIC(x) SINGLE_THREAD_P +# endif +# endif + +#elif !defined __ASSEMBLER__ + +/* For rtld, et cetera. */ +# define SINGLE_THREAD_P 1 +# define NO_CANCELLATION 1 + +#endif diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c new file mode 100644 index 0000000000..ca1cc8d68e --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c @@ -0,0 +1,113 @@ +/* Copyright (C) 2003, 2005 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek . + + 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; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include +#include + +static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); +static _Unwind_Reason_Code (*libgcc_s_personality) + (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); +static _Unwind_Reason_Code (*libgcc_s_forcedunwind) + (struct _Unwind_Exception *, _Unwind_Stop_Fn, void *); +static _Unwind_Word (*libgcc_s_getcfa) (struct _Unwind_Context *); + +void +pthread_cancel_init (void) +{ + void *resume, *personality, *forcedunwind, *getcfa; + void *handle; + + if (__builtin_expect (libgcc_s_getcfa != NULL, 1)) + return; + + handle = __libc_dlopen ("libgcc_s.so.1"); + + if (handle == NULL + || (resume = __libc_dlsym (handle, "_Unwind_Resume")) == NULL + || (personality = __libc_dlsym (handle, "__gcc_personality_v0")) == NULL + || (forcedunwind = __libc_dlsym (handle, "_Unwind_ForcedUnwind")) + == NULL + || (getcfa = __libc_dlsym (handle, "_Unwind_GetCFA")) == NULL +#ifdef ARCH_CANCEL_INIT + || ARCH_CANCEL_INIT (handle) +#endif + ) + __libc_fatal ("libgcc_s.so.1 must be installed for pthread_cancel to work\n"); + + libgcc_s_resume = resume; + libgcc_s_personality = personality; + libgcc_s_forcedunwind = forcedunwind; + libgcc_s_getcfa = getcfa; +} + +/* It's vitally important that _Unwind_Resume not have a stack frame; the + ARM unwinder relies on register state at entrance. So we write this in + assembly. */ + +asm ( +" .globl _Unwind_Resume\n" +" .type _Unwind_Resume, %function\n" +"_Unwind_Resume:\n" +" stmfd sp!, {r4, r5, r6, lr}\n" +" ldr r4, 1f\n" +" ldr r5, 2f\n" +"3: add r4, pc, r4\n" +" ldr r3, [r4, r5]\n" +" mov r6, r0\n" +" cmp r3, #0\n" +" beq 4f\n" +"5: mov r0, r6\n" +" ldmfd sp!, {r4, r5, r6, lr}\n" +" bx r3\n" +"4: bl pthread_cancel_init\n" +" ldr r3, [r4, r5]\n" +" b 5b\n" +"1: .word _GLOBAL_OFFSET_TABLE_ - 3b - 8\n" +"2: .word libgcc_s_resume(GOTOFF)\n" +" .size _Unwind_Resume, .-_Unwind_Resume\n" +); + +_Unwind_Reason_Code +__gcc_personality_v0 (_Unwind_State state, + struct _Unwind_Exception *ue_header, + struct _Unwind_Context *context) +{ + if (__builtin_expect (libgcc_s_personality == NULL, 0)) + pthread_cancel_init (); + return libgcc_s_personality (state, ue_header, context); +} + +_Unwind_Reason_Code +_Unwind_ForcedUnwind (struct _Unwind_Exception *exc, _Unwind_Stop_Fn stop, + void *stop_argument) +{ + if (__builtin_expect (libgcc_s_forcedunwind == NULL, 0)) + pthread_cancel_init (); + return libgcc_s_forcedunwind (exc, stop, stop_argument); +} + +_Unwind_Word +_Unwind_GetCFA (struct _Unwind_Context *context) +{ + if (__builtin_expect (libgcc_s_getcfa == NULL, 0)) + pthread_cancel_init (); + return libgcc_s_getcfa (context); +} diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c new file mode 100644 index 0000000000..a9c9d18217 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c @@ -0,0 +1,82 @@ +/* Copyright (C) 2003, 2005 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek . + + 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; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include + +static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); +static _Unwind_Reason_Code (*libgcc_s_personality) + (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); + +static void init (void) __attribute_used__; + +static void +init (void) +{ + void *resume, *personality; + void *handle; + + handle = __libc_dlopen ("libgcc_s.so.1"); + + if (handle == NULL + || (resume = __libc_dlsym (handle, "_Unwind_Resume")) == NULL + || (personality = __libc_dlsym (handle, "__gcc_personality_v0")) == NULL) + __libc_fatal ("libgcc_s.so.1 must be installed for pthread_cancel to work\n"); + + libgcc_s_resume = resume; + libgcc_s_personality = personality; +} + +/* It's vitally important that _Unwind_Resume not have a stack frame; the + ARM unwinder relies on register state at entrance. So we write this in + assembly. */ + +asm ( +" .globl _Unwind_Resume\n" +" .type _Unwind_Resume, %function\n" +"_Unwind_Resume:\n" +" stmfd sp!, {r4, r5, r6, lr}\n" +" ldr r4, 1f\n" +" ldr r5, 2f\n" +"3: add r4, pc, r4\n" +" ldr r3, [r4, r5]\n" +" mov r6, r0\n" +" cmp r3, #0\n" +" beq 4f\n" +"5: mov r0, r6\n" +" ldmfd sp!, {r4, r5, r6, lr}\n" +" bx r3\n" +"4: bl init\n" +" ldr r3, [r4, r5]\n" +" b 5b\n" +"1: .word _GLOBAL_OFFSET_TABLE_ - 3b - 8\n" +"2: .word libgcc_s_resume(GOTOFF)\n" +" .size _Unwind_Resume, .-_Unwind_Resume\n" +); + +_Unwind_Reason_Code +__gcc_personality_v0 (_Unwind_State state, + struct _Unwind_Exception *ue_header, + struct _Unwind_Context *context) +{ + if (__builtin_expect (libgcc_s_personality == NULL, 0)) + init (); + return libgcc_s_personality (state, ue_header, context); +} diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h new file mode 100644 index 0000000000..d625fb288c --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h @@ -0,0 +1,274 @@ +/* Header file for the ARM EABI unwinder + Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. + Contributed by Paul Brook + + This file is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + In addition to the permissions in the GNU General Public License, the + Free Software Foundation gives you unlimited permission to link the + compiled version of this file into combinations with other programs, + and to distribute those combinations without any restriction coming + from the use of this file. (The General Public License restrictions + do apply in other respects; for example, they cover modification of + the file, and distribution when not linked into a combine + executable.) + + This file 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 + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to + the Free Software Foundation, 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ + +/* Language-independent unwinder header public defines. This contains both + ABI defined objects, and GNU support routines. */ + +#ifndef UNWIND_ARM_H +#define UNWIND_ARM_H + +#define __ARM_EABI_UNWINDER__ 1 + +#ifdef __cplusplus +extern "C" { +#endif + typedef unsigned _Unwind_Word __attribute__((__mode__(__word__))); + typedef signed _Unwind_Sword __attribute__((__mode__(__word__))); + typedef unsigned _Unwind_Ptr __attribute__((__mode__(__pointer__))); + typedef unsigned _Unwind_Internal_Ptr __attribute__((__mode__(__pointer__))); + typedef _Unwind_Word _uw; + typedef unsigned _uw64 __attribute__((mode(__DI__))); + typedef unsigned _uw16 __attribute__((mode(__HI__))); + typedef unsigned _uw8 __attribute__((mode(__QI__))); + + typedef enum + { + _URC_OK = 0, /* operation completed successfully */ + _URC_FOREIGN_EXCEPTION_CAUGHT = 1, + _URC_END_OF_STACK = 5, + _URC_HANDLER_FOUND = 6, + _URC_INSTALL_CONTEXT = 7, + _URC_CONTINUE_UNWIND = 8, + _URC_FAILURE = 9 /* unspecified failure of some kind */ + } + _Unwind_Reason_Code; + + typedef enum + { + _US_VIRTUAL_UNWIND_FRAME = 0, + _US_UNWIND_FRAME_STARTING = 1, + _US_UNWIND_FRAME_RESUME = 2, + _US_ACTION_MASK = 3, + _US_FORCE_UNWIND = 8, + _US_END_OF_STACK = 16 + } + _Unwind_State; + + /* Provided only for for compatibility with existing code. */ + typedef int _Unwind_Action; +#define _UA_SEARCH_PHASE 1 +#define _UA_CLEANUP_PHASE 2 +#define _UA_HANDLER_FRAME 4 +#define _UA_FORCE_UNWIND 8 +#define _UA_END_OF_STACK 16 +#define _URC_NO_REASON _URC_OK + + typedef struct _Unwind_Control_Block _Unwind_Control_Block; + typedef struct _Unwind_Context _Unwind_Context; + typedef _uw _Unwind_EHT_Header; + + + /* UCB: */ + + struct _Unwind_Control_Block + { +#ifdef _LIBC + /* For the benefit of code which assumes this is a scalar. All + glibc ever does is clear it. */ + _uw64 exception_class; +#else + char exception_class[8]; +#endif + void (*exception_cleanup)(_Unwind_Reason_Code, _Unwind_Control_Block *); + /* Unwinder cache, private fields for the unwinder's use */ + struct + { + _uw reserved1; /* Forced unwind stop fn, 0 if not forced */ + _uw reserved2; /* Personality routine address */ + _uw reserved3; /* Saved callsite address */ + _uw reserved4; /* Forced unwind stop arg */ + _uw reserved5; + } + unwinder_cache; + /* Propagation barrier cache (valid after phase 1): */ + struct + { + _uw sp; + _uw bitpattern[5]; + } + barrier_cache; + /* Cleanup cache (preserved over cleanup): */ + struct + { + _uw bitpattern[4]; + } + cleanup_cache; + /* Pr cache (for pr's benefit): */ + struct + { + _uw fnstart; /* function start address */ + _Unwind_EHT_Header *ehtp; /* pointer to EHT entry header word */ + _uw additional; /* additional data */ + _uw reserved1; + } + pr_cache; + long long int :0; /* Force alignment to 8-byte boundary */ + }; + + /* Virtual Register Set*/ + + typedef enum + { + _UVRSC_CORE = 0, /* integer register */ + _UVRSC_VFP = 1, /* vfp */ + _UVRSC_FPA = 2, /* fpa */ + _UVRSC_WMMXD = 3, /* Intel WMMX data register */ + _UVRSC_WMMXC = 4 /* Intel WMMX control register */ + } + _Unwind_VRS_RegClass; + + typedef enum + { + _UVRSD_UINT32 = 0, + _UVRSD_VFPX = 1, + _UVRSD_FPAX = 2, + _UVRSD_UINT64 = 3, + _UVRSD_FLOAT = 4, + _UVRSD_DOUBLE = 5 + } + _Unwind_VRS_DataRepresentation; + + typedef enum + { + _UVRSR_OK = 0, + _UVRSR_NOT_IMPLEMENTED = 1, + _UVRSR_FAILED = 2 + } + _Unwind_VRS_Result; + + /* Frame unwinding state. */ + typedef struct + { + /* The current word (bytes packed msb first). */ + _uw data; + /* Pointer to the next word of data. */ + _uw *next; + /* The number of bytes left in this word. */ + _uw8 bytes_left; + /* The number of words pointed to by ptr. */ + _uw8 words_left; + } + __gnu_unwind_state; + + typedef _Unwind_Reason_Code (*personality_routine) (_Unwind_State, + _Unwind_Control_Block *, _Unwind_Context *); + + _Unwind_VRS_Result _Unwind_VRS_Set(_Unwind_Context *, _Unwind_VRS_RegClass, + _uw, _Unwind_VRS_DataRepresentation, + void *); + + _Unwind_VRS_Result _Unwind_VRS_Get(_Unwind_Context *, _Unwind_VRS_RegClass, + _uw, _Unwind_VRS_DataRepresentation, + void *); + + _Unwind_VRS_Result _Unwind_VRS_Pop(_Unwind_Context *, _Unwind_VRS_RegClass, + _uw, _Unwind_VRS_DataRepresentation); + + + /* Support functions for the PR. */ +#define _Unwind_Exception _Unwind_Control_Block + typedef char _Unwind_Exception_Class[8]; + + void * _Unwind_GetLanguageSpecificData (_Unwind_Context *); + _Unwind_Ptr _Unwind_GetRegionStart (_Unwind_Context *); + + /* These two should never be used. */ + _Unwind_Ptr _Unwind_GetDataRelBase (_Unwind_Context *); + _Unwind_Ptr _Unwind_GetTextRelBase (_Unwind_Context *); + + /* Interface functions: */ + _Unwind_Reason_Code _Unwind_RaiseException(_Unwind_Control_Block *ucbp); + void __attribute__((noreturn)) _Unwind_Resume(_Unwind_Control_Block *ucbp); + _Unwind_Reason_Code _Unwind_Resume_or_Rethrow (_Unwind_Control_Block *ucbp); + + typedef _Unwind_Reason_Code (*_Unwind_Stop_Fn) + (int, _Unwind_Action, _Unwind_Exception_Class, + _Unwind_Control_Block *, struct _Unwind_Context *, void *); + _Unwind_Reason_Code _Unwind_ForcedUnwind (_Unwind_Control_Block *, + _Unwind_Stop_Fn, void *); + _Unwind_Word _Unwind_GetCFA (struct _Unwind_Context *); + void _Unwind_Complete(_Unwind_Control_Block *ucbp); + void _Unwind_DeleteException (_Unwind_Exception *); + + _Unwind_Reason_Code __gnu_unwind_frame (_Unwind_Control_Block *, + _Unwind_Context *); + _Unwind_Reason_Code __gnu_unwind_execute (_Unwind_Context *, + __gnu_unwind_state *); + + /* Decode an R_ARM_TARGET2 relocation. */ + static inline _Unwind_Word + _Unwind_decode_target2 (_Unwind_Word ptr) + { + _Unwind_Word tmp; + + tmp = *(_Unwind_Word *) ptr; + /* Zero values are always NULL. */ + if (!tmp) + return 0; + +#if defined(linux) || defined(__NetBSD__) + /* Pc-relative indirect. */ + tmp += ptr; + tmp = *(_Unwind_Word *) tmp; +#elif defined(__symbian__) + /* Absolute pointer. Nothing more to do. */ +#else + /* Pc-relative pointer. */ + tmp += ptr; +#endif + return tmp; + } + + static inline _Unwind_Word + _Unwind_GetGR (_Unwind_Context *context, int regno) + { + _uw val; + _Unwind_VRS_Get (context, _UVRSC_CORE, regno, _UVRSD_UINT32, &val); + return val; + } + + /* Return the address of the instruction, not the actual IP value. */ +#define _Unwind_GetIP(context) \ + (_Unwind_GetGR (context, 15) & ~(_Unwind_Word)1) + + static inline void + _Unwind_SetGR (_Unwind_Context *context, int regno, _Unwind_Word val) + { + _Unwind_VRS_Set (context, _UVRSC_CORE, regno, _UVRSD_UINT32, &val); + } + + /* The dwarf unwinder doesn't understand arm/thumb state. We assume the + landing pad uses the same instruction set as the call site. */ +#define _Unwind_SetIP(context, val) \ + _Unwind_SetGR (context, 15, val | (_Unwind_GetGR (context, 15) & 1)) + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* defined UNWIND_ARM_H */ diff --git a/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S b/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S index d68c8a5fb2..543d48cdb2 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S +++ b/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S @@ -20,16 +20,35 @@ /* If no SA_RESTORER function was specified by the application we use one of these. This avoids the need for the kernel to synthesise a return - instruction on the stack, which would involve expensive cache flushes. */ + instruction on the stack, which would involve expensive cache flushes. + Nowadays (2.6 series, and somewhat earlier) the kernel uses a high page + for signal trampolines, so the cache flushes are not an issue. But since + we do not have a vDSO, continue to use these so that we can provide + unwind information. + + Start the unwind tables at least one instruction before the signal + trampoline, because the unwinder will assume we are returning after + a call site. */ + + .fnstart + .save {r0-r15} + .pad #12 + nop ENTRY(__default_sa_restorer) mov r7, $SYS_ify(sigreturn) swi 0x0 + .fnend #ifdef __NR_rt_sigreturn + .fnstart + .save {r0-r15} + .pad #168 + nop ENTRY(__default_rt_sa_restorer) mov r7, $SYS_ify(rt_sigreturn) swi 0x0 + .fnend #endif diff --git a/sysdeps/unix/sysv/linux/arm/eabi/socket.S b/sysdeps/unix/sysv/linux/arm/eabi/socket.S index 7fa2b1e6cb..f614213fd3 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/socket.S +++ b/sysdeps/unix/sysv/linux/arm/eabi/socket.S @@ -33,19 +33,19 @@ The .S files for the other calls just #define socket and #include this. */ #ifndef __socket -#ifndef NO_WEAK_ALIAS -#define __socket P(__,socket) -#else -#define __socket socket -#endif +# ifndef NO_WEAK_ALIAS +# define __socket P(__,socket) +# else +# define __socket socket +# endif #endif -#define PUSHARGS_1 str a1, [sp, $-8]! -#define PUSHARGS_2 stmfd sp!, {a1, a2} -#define PUSHARGS_3 stmfd sp!, {a1, a2, a3, a4} /* a4 pushed for padding */ -#define PUSHARGS_4 stmfd sp!, {a1, a2, a3, a4} -#define PUSHARGS_5 stmfd sp!, {a1, a2, a3, a4} /* Caller has already pushed arg 5 */ -#define PUSHARGS_6 stmfd sp!, {a1, a2, a3, a4} +#define PUSHARGS_1 str a1, [sp, $-8]!; .pad #8 +#define PUSHARGS_2 stmfd sp!, {a1, a2}; .pad #8 +#define PUSHARGS_3 stmfd sp!, {a1, a2, a3, a4}; .pad #16 /* a4 pushed for padding */ +#define PUSHARGS_4 stmfd sp!, {a1, a2, a3, a4}; .pad #16 +#define PUSHARGS_5 stmfd sp!, {a1, a2, a3, a4}; .pad #16 /* Caller has already pushed arg 5 */ +#define PUSHARGS_6 stmfd sp!, {a1, a2, a3, a4}; .pad #16 #define POPARGS_1 add sp, sp, #8 #define POPARGS_2 add sp, sp, #8 @@ -64,6 +64,8 @@ .globl __socket ENTRY (__socket) + .fnstart + /* This code previously moved sp into ip and stored the args using stmdb ip!, {a1-a4}. It did not modify sp, so the stack never had to be restored after the syscall completed. It saved an @@ -98,11 +100,12 @@ ENTRY (__socket) #if defined NEED_CANCELLATION && defined CENABLE 1: stmfd sp!, {r7, lr} + .save {r7, lr} CENABLE mov ip, r0 mov r0, #P(SOCKOP_,socket) - add r1, sp, #4 + add r1, sp, #8 mov r7, #SYS_ify(socketcall) swi 0x0 @@ -120,6 +123,7 @@ ENTRY (__socket) b PLTJMP(SYSCALL_ERROR) #endif + .fnend PSEUDO_END (__socket) #ifndef NO_WEAK_ALIAS diff --git a/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h b/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h index 84a4f04565..7f5ded5580 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h @@ -48,6 +48,11 @@ : "memory"); \ _a1; }) +/* For EABI, non-constant syscalls are actually pretty easy... */ +#undef INTERNAL_SYSCALL_NCS +#define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \ + INTERNAL_SYSCALL_RAW (number, err, nr, args) + /* We must save and restore r7 (call-saved) for the syscall number. We never make function calls from inside here (only potentially signal handlers), so we do not bother with doubleword alignment. diff --git a/sysdeps/unix/sysv/linux/arm/nptl/Versions b/sysdeps/unix/sysv/linux/arm/nptl/Versions new file mode 100644 index 0000000000..c74a06fe10 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/nptl/Versions @@ -0,0 +1,6 @@ +libc { + GLIBC_PRIVATE { + # A copy of sigaction lives in NPTL, and needs these. + __default_sa_restorer; __default_rt_sa_restorer; + } +} diff --git a/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h b/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h new file mode 100644 index 0000000000..71ed714f37 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h @@ -0,0 +1,95 @@ +/* Copyright (C) 2002, 2003, 2004, 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 + 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. */ + +#include +#include + + +typedef int8_t atomic8_t; +typedef uint8_t uatomic8_t; +typedef int_fast8_t atomic_fast8_t; +typedef uint_fast8_t uatomic_fast8_t; + +typedef int32_t atomic32_t; +typedef uint32_t uatomic32_t; +typedef int_fast32_t atomic_fast32_t; +typedef uint_fast32_t uatomic_fast32_t; + +typedef intptr_t atomicptr_t; +typedef uintptr_t uatomicptr_t; +typedef intmax_t atomic_max_t; +typedef uintmax_t uatomic_max_t; + +void __arm_link_error (void); + +#define atomic_exchange_acq(mem, newvalue) \ + ({ __typeof (*mem) result; \ + if (sizeof (*mem) == 1) \ + __asm__ __volatile__ ("swpb %0, %1, [%2]" \ + : "=&r,&r" (result) \ + : "r,0" (newvalue), "r,r" (mem) : "memory"); \ + else if (sizeof (*mem) == 4) \ + __asm__ __volatile__ ("swp %0, %1, [%2]" \ + : "=&r,&r" (result) \ + : "r,0" (newvalue), "r,r" (mem) : "memory"); \ + else \ + { \ + result = 0; \ + abort (); \ + } \ + result; }) + +/* Atomic compare and exchange. This sequence relies on the kernel to + provide a compare and exchange operation which is atomic on the + current architecture, either via cleverness on pre-ARMv6 or via + ldrex / strex on ARMv6. */ + +#define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval) \ + ({ __arm_link_error (); oldval; }) + +#define __arch_compare_and_exchange_val_16_acq(mem, newval, oldval) \ + ({ __arm_link_error (); oldval; }) + +/* It doesn't matter what register is used for a_oldval2, but we must + specify one to work around GCC PR rtl-optimization/21223. Otherwise + it may cause a_oldval or a_tmp to be moved to a different register. */ + +#define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \ + ({ register __typeof (oldval) a_oldval asm ("r0"); \ + register __typeof (oldval) a_newval asm ("r1") = (newval); \ + register __typeof (mem) a_ptr asm ("r2") = (mem); \ + register __typeof (oldval) a_tmp asm ("r3"); \ + register __typeof (oldval) a_oldval2 asm ("r4") = (oldval); \ + __asm__ __volatile__ \ + ("0:\tldr\t%1,[%3]\n\t" \ + "cmp\t%1, %4\n\t" \ + "bne\t1f\n\t" \ + "mov\t%0, %4\n\t" \ + "mov\t%1, #0xffff0fff\n\t" \ + "mov\tlr, pc\n\t" \ + "add\tpc, %1, #(0xffff0fc0 - 0xffff0fff)\n\t" \ + "bcc\t0b\n\t" \ + "mov\t%1, %4\n\t" \ + "1:" \ + : "=&r" (a_oldval), "=&r" (a_tmp) \ + : "r" (a_newval), "r" (a_ptr), "r" (a_oldval2) \ + : "ip", "lr", "cc", "memory"); \ + a_tmp; }) + +#define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \ + ({ __arm_link_error (); oldval; }) diff --git a/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h new file mode 100644 index 0000000000..fb0fe3f835 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h @@ -0,0 +1,157 @@ +/* Copyright (C) 2002, 2003, 2004, 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 + 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_PTHREADTYPES_H +#define _BITS_PTHREADTYPES_H 1 + +#define __SIZEOF_PTHREAD_ATTR_T 36 +#define __SIZEOF_PTHREAD_MUTEX_T 24 +#define __SIZEOF_PTHREAD_MUTEXATTR_T 4 +#define __SIZEOF_PTHREAD_COND_T 48 +#define __SIZEOF_PTHREAD_COND_COMPAT_T 12 +#define __SIZEOF_PTHREAD_CONDATTR_T 4 +#define __SIZEOF_PTHREAD_RWLOCK_T 32 +#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 +#define __SIZEOF_PTHREAD_BARRIER_T 20 +#define __SIZEOF_PTHREAD_BARRIERATTR_T 4 + + +/* Thread identifiers. The structure of the attribute type is not + exposed on purpose. */ +typedef unsigned long int pthread_t; + + +typedef union +{ + char __size[__SIZEOF_PTHREAD_ATTR_T]; + long int __align; +} pthread_attr_t; + + +/* Data structures for mutex handling. The structure of the attribute + type is not exposed on purpose. */ +typedef union +{ + struct + { + int __lock; + unsigned int __count; + int __owner; + /* KIND must stay at this position in the structure to maintain + binary compatibility. */ + int __kind; + unsigned int __nusers; + int __spins; + } __data; + char __size[__SIZEOF_PTHREAD_MUTEX_T]; + long int __align; +} pthread_mutex_t; + +typedef union +{ + char __size[__SIZEOF_PTHREAD_MUTEXATTR_T]; + long int __align; +} pthread_mutexattr_t; + + +/* Data structure for conditional variable handling. The structure of + the attribute type is not exposed on purpose. */ +typedef union +{ + struct + { + int __lock; + unsigned int __futex; + unsigned long long int __total_seq; + unsigned long long int __wakeup_seq; + unsigned long long int __woken_seq; + void *__mutex; + unsigned int __nwaiters; + unsigned int __broadcast_seq; + } __data; + char __size[__SIZEOF_PTHREAD_COND_T]; + long long int __align; +} pthread_cond_t; + +typedef union +{ + char __size[__SIZEOF_PTHREAD_CONDATTR_T]; + long int __align; +} pthread_condattr_t; + + +/* Keys for thread-specific data */ +typedef unsigned int pthread_key_t; + + +/* Once-only execution */ +typedef int pthread_once_t; + + +#if defined __USE_UNIX98 || defined __USE_XOPEN2K +/* Data structure for read-write lock variable handling. The + structure of the attribute type is not exposed on purpose. */ +typedef union +{ + struct + { + int __lock; + unsigned int __nr_readers; + unsigned int __readers_wakeup; + unsigned int __writer_wakeup; + unsigned int __nr_readers_queued; + unsigned int __nr_writers_queued; + /* FLAGS must stay at this position in the structure to maintain + binary compatibility. */ + unsigned int __flags; + int __writer; + } __data; + char __size[__SIZEOF_PTHREAD_RWLOCK_T]; + long int __align; +} pthread_rwlock_t; + +typedef union +{ + char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T]; + long int __align; +} pthread_rwlockattr_t; +#endif + + +#ifdef __USE_XOPEN2K +/* POSIX spinlock data type. */ +typedef volatile int pthread_spinlock_t; + + +/* POSIX barriers data type. The structure of the type is + deliberately not exposed. */ +typedef union +{ + char __size[__SIZEOF_PTHREAD_BARRIER_T]; + long int __align; +} pthread_barrier_t; + +typedef union +{ + char __size[__SIZEOF_PTHREAD_BARRIERATTR_T]; + int __align; +} pthread_barrierattr_t; +#endif + + +#endif /* bits/pthreadtypes.h */ diff --git a/sysdeps/unix/sysv/linux/arm/nptl/bits/semaphore.h b/sysdeps/unix/sysv/linux/arm/nptl/bits/semaphore.h new file mode 100644 index 0000000000..3fc647d31d --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/nptl/bits/semaphore.h @@ -0,0 +1,38 @@ +/* Copyright (C) 2002, 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 + 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 _SEMAPHORE_H +# error "Never use directly; include instead." +#endif + + +#define __SIZEOF_SEM_T 16 + + +/* Value returned if `sem_open' failed. */ +#define SEM_FAILED ((sem_t *) 0) + +/* Maximum value the semaphore can have. */ +#define SEM_VALUE_MAX ((int) ((~0u) >> 1)) + + +typedef union +{ + char __size[__SIZEOF_SEM_T]; + long int __align; +} sem_t; diff --git a/sysdeps/unix/sysv/linux/arm/nptl/clone.S b/sysdeps/unix/sysv/linux/arm/nptl/clone.S new file mode 100644 index 0000000000..23750b3f88 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/nptl/clone.S @@ -0,0 +1,3 @@ +#define RESET_PID +#include +#include "../clone.S" diff --git a/sysdeps/unix/sysv/linux/arm/nptl/createthread.c b/sysdeps/unix/sysv/linux/arm/nptl/createthread.c new file mode 100644 index 0000000000..01bd8ce180 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/nptl/createthread.c @@ -0,0 +1,23 @@ +/* Copyright (C) 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 + 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. */ + +/* Value passed to 'clone' for initialization of the thread register. */ +#define TLS_VALUE (pd + 1) + +/* Get the real implementation. */ +#include diff --git a/sysdeps/unix/sysv/linux/arm/nptl/fork.c b/sysdeps/unix/sysv/linux/arm/nptl/fork.c new file mode 100644 index 0000000000..310676f7aa --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/nptl/fork.c @@ -0,0 +1,31 @@ +/* Copyright (C) 2005 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Phil Blundell , 2005 + + 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. */ + +#include +#include +#include +#include + + +#define ARCH_FORK() \ + INLINE_SYSCALL (clone, 5, \ + CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID | SIGCHLD, \ + NULL, NULL, NULL, &THREAD_SELF->tid) + +#include diff --git a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c new file mode 100644 index 0000000000..e0643a9f3b --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c @@ -0,0 +1,118 @@ +/* low level locking for pthread library. Generic futex-using version. + Copyright (C) 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 + 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. */ + +#include +#include +#include +#include + +int +__lll_timedlock_wait (int *futex, const struct timespec *abstime) +{ + struct timespec rt; + + /* Reject invalid timeouts. */ + if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000) + return EINVAL; + + /* Upgrade the lock. */ + if (atomic_exchange_acq (futex, 2) == 0) + return 0; + + do + { + struct timeval tv; + + /* Get the current time. */ + (void) __gettimeofday (&tv, NULL); + + /* Compute relative timeout. */ + rt.tv_sec = abstime->tv_sec - tv.tv_sec; + rt.tv_nsec = abstime->tv_nsec - tv.tv_usec * 1000; + if (rt.tv_nsec < 0) + { + rt.tv_nsec += 1000000000; + --rt.tv_sec; + } + + /* Already timed out? */ + if (rt.tv_sec < 0) + return ETIMEDOUT; + + lll_futex_timed_wait (futex, 2, &rt); + } + while (atomic_exchange_acq (futex, 2) != 0); + + return 0; +} + + +/* These don't get included in libc.so */ +#ifdef IS_IN_libpthread +int +lll_unlock_wake_cb (int *futex) +{ + int val = atomic_exchange_rel (futex, 0); + + if (__builtin_expect (val > 1, 0)) + lll_futex_wake (futex, 1); + + return 0; +} + + +int +__lll_timedwait_tid (int *tidp, const struct timespec *abstime) +{ + int tid; + + if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000) + return EINVAL; + + /* Repeat until thread terminated. */ + while ((tid = *tidp) != 0) + { + struct timeval tv; + struct timespec rt; + + /* Get the current time. */ + (void) __gettimeofday (&tv, NULL); + + /* Compute relative timeout. */ + rt.tv_sec = abstime->tv_sec - tv.tv_sec; + rt.tv_nsec = abstime->tv_nsec - tv.tv_usec * 1000; + if (rt.tv_nsec < 0) + { + rt.tv_nsec += 1000000000; + --rt.tv_sec; + } + + /* Already timed out? */ + if (rt.tv_sec < 0) + return ETIMEDOUT; + + /* Wait until thread terminates. */ + if (lll_futex_timed_wait (tidp, tid, &rt) == -ETIMEDOUT) + return ETIMEDOUT; + } + + return 0; +} + +#endif diff --git a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h new file mode 100644 index 0000000000..7f1c291018 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h @@ -0,0 +1,268 @@ +/* Copyright (C) 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 + 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 Libr \ary; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _LOWLEVELLOCK_H +#define _LOWLEVELLOCK_H 1 + +#include +#include +#include +#include +#include + +#define FUTEX_WAIT 0 +#define FUTEX_WAKE 1 +#define FUTEX_REQUEUE 3 +#define FUTEX_CMP_REQUEUE 4 +#define FUTEX_WAKE_OP 5 +#define FUTEX_OP_CLEAR_WAKE_IF_GT_ONE ((4 << 24) | 1) + +/* Initializer for compatibility lock. */ +#define LLL_MUTEX_LOCK_INITIALIZER (0) + +#define lll_futex_wait(futexp, val) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + __ret = INTERNAL_SYSCALL (futex, __err, 4, \ + (futexp), FUTEX_WAIT, (val), 0); \ + __ret; \ + }) + +#define lll_futex_timed_wait(futexp, val, timespec) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + __ret = INTERNAL_SYSCALL (futex, __err, 4, \ + (futexp), FUTEX_WAIT, (val), (timespec)); \ + __ret; \ + }) + +#define lll_futex_wake(futexp, nr) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + __ret = INTERNAL_SYSCALL (futex, __err, 4, \ + (futexp), FUTEX_WAKE, (nr), 0); \ + __ret; \ + }) + +/* Returns non-zero if error happened, zero if success. */ +#define lll_futex_requeue(futexp, nr_wake, nr_move, mutex, val) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + __ret = INTERNAL_SYSCALL (futex, __err, 6, \ + (futexp), FUTEX_CMP_REQUEUE, (nr_wake), \ + (nr_move), (mutex), (val)); \ + __ret; \ + }) + + +/* Returns non-zero if error happened, zero if success. */ +#define lll_futex_wake_unlock(futexp, nr_wake, nr_wake2, futexp2) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + __ret = INTERNAL_SYSCALL (futex, __err, 6, \ + (futexp), FUTEX_WAKE_OP, (nr_wake), \ + (nr_wake2), (futexp2), \ + FUTEX_OP_CLEAR_WAKE_IF_GT_ONE); \ + __ret; \ + }) + + +static inline int __attribute__((always_inline)) +__lll_mutex_trylock (int *futex) +{ + int flag = 1, old; + asm volatile ( + "\tswp %[old], %[flag], [%[futex]] @ try to take the lock\n" + "\tcmp %[old], #1 @ check old lock value\n" + "\tmovlo %[flag], #0 @ if we got it, return 0\n" + "\tswphi %[flag], %[old], [%[futex]] @ if it was contested,\n" + " @ restore the contested flag,\n" + " @ and check whether that won." + : [futex] "+&r" (futex), [flag] "+&r" (flag), [old] "=&r" (old) + : : "memory" ); + + return flag; +} +#define lll_mutex_trylock(lock) __lll_mutex_trylock (&(lock)) + + +static inline int __attribute__((always_inline)) +__lll_mutex_cond_trylock (int *futex) +{ + int flag = 2, old; + asm volatile ( + "\tswp %[old], %[flag], [%[futex]] @ try to take the lock\n" + "\tcmp %[old], #1 @ check old lock value\n" + "\tmovlo %[flag], #0 @ if we got it, return 0\n" + "\tswphi %[flag], %[old], [%[futex]] @ if it was contested,\n" + " @ restore the contested flag,\n" + " @ and check whether that won." + : [futex] "+&r" (futex), [flag] "+&r" (flag), [old] "=&r" (old) + : : "memory" ); + + return flag; +} +#define lll_mutex_cond_trylock(lock) __lll_mutex_cond_trylock (&(lock)) + + +extern void __lll_mutex_lock_outlined (int *futex) attribute_hidden; + +static inline void __attribute__((always_inline)) +__lll_mutex_lock (int *futex) +{ + int val = atomic_exchange_acq (futex, 1); + + if (__builtin_expect (val != 0, 0)) + { + while (atomic_exchange_acq (futex, 2) != 0) + lll_futex_wait (futex, 2); + } +} +#define lll_mutex_lock(futex) __lll_mutex_lock (&(futex)) + + +static inline void __attribute__ ((always_inline)) +__lll_mutex_cond_lock (int *futex) +{ + int val = atomic_exchange_acq (futex, 2); + + if (__builtin_expect (val != 0, 0)) + { + while (atomic_exchange_acq (futex, 2) != 0) + lll_futex_wait (futex, 2); + } +} +#define lll_mutex_cond_lock(futex) __lll_mutex_cond_lock (&(futex)) + + +extern int __lll_timedlock_wait (int *futex, const struct timespec *) + attribute_hidden; + +extern int __lll_mutex_timedlock_outlined (int *futex, + const struct timespec *) + attribute_hidden; + +static inline int __attribute__ ((always_inline)) +__lll_mutex_timedlock (int *futex, const struct timespec *abstime) +{ + int result = 0; + int val = atomic_exchange_acq (futex, 1); + + if (__builtin_expect (val != 0, 0)) + result = __lll_timedlock_wait (futex, abstime); + return result; +} +#define lll_mutex_timedlock(futex, abstime) \ + __lll_mutex_timedlock (&(futex), abstime) + + +static inline void __attribute__ ((always_inline)) +__lll_mutex_unlock (int *futex) +{ + int val = atomic_exchange_rel (futex, 0); + if (__builtin_expect (val > 1, 0)) + lll_futex_wake (futex, 1); +} +#define lll_mutex_unlock(futex) __lll_mutex_unlock(&(futex)) + + +static inline void __attribute__ ((always_inline)) +__lll_mutex_unlock_force (int *futex) +{ + (void) atomic_exchange_rel (futex, 0); + lll_futex_wake (futex, 1); +} +#define lll_mutex_unlock_force(futex) __lll_mutex_unlock_force(&(futex)) + + +#define lll_mutex_islocked(futex) \ + (futex != 0) + + +/* Our internal lock implementation is identical to the binary-compatible + mutex implementation. */ + +/* Type for lock object. */ +typedef int lll_lock_t; + +/* Initializers for lock. */ +#define LLL_LOCK_INITIALIZER (0) +#define LLL_LOCK_INITIALIZER_LOCKED (1) + +extern int lll_unlock_wake_cb (int *__futex) attribute_hidden; + +/* The states of a lock are: + 0 - untaken + 1 - taken by one user + >1 - taken by more users */ + +#define lll_trylock(lock) lll_mutex_trylock (lock) +#define lll_lock(lock) lll_mutex_lock (lock) +#define lll_unlock(lock) lll_mutex_unlock (lock) +#define lll_islocked(lock) lll_mutex_islocked (lock) + +/* The kernel notifies a process which uses CLONE_CLEARTID via futex + wakeup when the clone terminates. The memory location contains the + thread ID while the clone is running and is reset to zero + afterwards. */ +#define lll_wait_tid(tid) \ + do { \ + __typeof (tid) __tid; \ + while ((__tid = (tid)) != 0) \ + lll_futex_wait (&(tid), __tid); \ + } while (0) + +extern int __lll_timedwait_tid (int *, const struct timespec *) + attribute_hidden; + +#define lll_timedwait_tid(tid, abstime) \ + ({ \ + int __res = 0; \ + if ((tid) != 0) \ + __res = __lll_timedwait_tid (&(tid), (abstime)); \ + __res; \ + }) + + +/* Conditional variable handling. */ + +extern void __lll_cond_wait (pthread_cond_t *cond) + attribute_hidden; +extern int __lll_cond_timedwait (pthread_cond_t *cond, + const struct timespec *abstime) + attribute_hidden; +extern void __lll_cond_wake (pthread_cond_t *cond) + attribute_hidden; +extern void __lll_cond_broadcast (pthread_cond_t *cond) + attribute_hidden; + +#define lll_cond_wait(cond) \ + __lll_cond_wait (cond) +#define lll_cond_timedwait(cond, abstime) \ + __lll_cond_timedwait (cond, abstime) +#define lll_cond_wake(cond) \ + __lll_cond_wake (cond) +#define lll_cond_broadcast(cond) \ + __lll_cond_broadcast (cond) + +#endif /* lowlevellock.h */ diff --git a/sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S b/sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S new file mode 100644 index 0000000000..1c2e1f5547 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S @@ -0,0 +1,38 @@ +/* Copyright (C) 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 + 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. */ + +#include + +/* Save the PID value. */ +#define SAVE_PID \ + str lr, [sp, #-4]!; /* Save LR. */ \ + mov r0, #0xffff0fff; /* Point to the high page. */ \ + mov lr, pc; /* Save our return address. */ \ + sub pc, r0, #31; /* Jump to the TLS entry. */ \ + ldr lr, [sp], #4; /* Restore LR. */ \ + mov r2, r0; /* Save the TLS addr in r2. */ \ + ldr r3, [r2, #PID_OFFSET]; /* Load the saved PID. */ \ + rsb r0, r3, #0; /* Negate it. */ \ + str r0, [r2, #PID_OFFSET] /* Store the temporary PID. */ + +/* Restore the old PID value in the parent. */ +#define RESTORE_PID \ + cmp r0, #0; /* If we are the parent... */ \ + strne r3, [r2, #PID_OFFSET] /* ... restore the saved PID. */ + +#include "../vfork.S" diff --git a/sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c b/sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c new file mode 100644 index 0000000000..c8925810cb --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c @@ -0,0 +1,99 @@ +/* Copyright (C) 2004, 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 + 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. */ + +#include "pthreadP.h" +#include + +unsigned long int __fork_generation attribute_hidden; + +static void +clear_once_control (void *arg) +{ + pthread_once_t *once_control = (pthread_once_t *) arg; + + *once_control = 0; + lll_futex_wake (once_control, INT_MAX); +} + +int +__pthread_once (pthread_once_t *once_control, void (*init_routine) (void)) +{ + for (;;) + { + int oldval; + int newval; + + /* Pseudo code: + newval = __fork_generation | 1; + oldval = *once_control; + if ((oldval & 2) == 0) + *once_control = newval; + Do this atomically. + */ + do + { + newval = __fork_generation | 1; + oldval = *once_control; + if (oldval & 2) + break; + } while (atomic_compare_and_exchange_val_acq (once_control, newval, oldval) != oldval); + + /* Check if the initializer has already been done. */ + if ((oldval & 2) != 0) + return 0; + + /* Check if another thread already runs the initializer. */ + if ((oldval & 1) == 0) + break; + + /* Check whether the initializer execution was interrupted by a fork. */ + if (oldval != newval) + break; + + /* Same generation, some other thread was faster. Wait. */ + lll_futex_wait (once_control, oldval); + } + + /* This thread is the first here. Do the initialization. + Register a cleanup handler so that in case the thread gets + interrupted the initialization can be restarted. */ + pthread_cleanup_push (clear_once_control, once_control); + + init_routine (); + + pthread_cleanup_pop (0); + + /* Say that the initialisation is done. */ + *once_control = __fork_generation | 2; + + /* Wake up all other threads. */ + lll_futex_wake (once_control, INT_MAX); + + return 0; +} +weak_alias (__pthread_once, pthread_once) +strong_alias (__pthread_once, __pthread_once_internal) + +#if defined(__USING_SJLJ_EXCEPTIONS__) && !defined(__PIC__) +/* When statically linked, if pthread_create is used, this file + will be brought in. The exception handling code in GCC assumes + that if pthread_create is available, so are these. */ +const void *include_pthread_getspecific attribute_hidden = pthread_getspecific; +const void *include_pthread_setspecific attribute_hidden = pthread_setspecific; +const void *include_pthread_key_create attribute_hidden = pthread_key_create; +#endif diff --git a/sysdeps/unix/sysv/linux/arm/nptl/vfork.S b/sysdeps/unix/sysv/linux/arm/nptl/vfork.S new file mode 100644 index 0000000000..87e055e657 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/nptl/vfork.S @@ -0,0 +1,39 @@ +/* Copyright (C) 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 + 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. */ + +#include + +/* Save the PID value. */ +#define SAVE_PID \ + str lr, [sp, #-4]!; /* Save LR. */ \ + mov r0, #0xffff0fff; /* Point to the high page. */ \ + mov lr, pc; /* Save our return address. */ \ + sub pc, r0, #31; /* Jump to the TLS entry. */ \ + ldr lr, [sp], #4; /* Restore LR. */ \ + mov r2, r0; /* Save the TLS addr in r2. */ \ + ldr r3, [r2, #PID_OFFSET]; /* Load the saved PID. */ \ + rsbs r0, r3, #0; /* Negate it. */ \ + moveq r0, #0x80000000; /* Use 0x80000000 if it was 0. */ \ + str r0, [r2, #PID_OFFSET] /* Store the temporary PID. */ + +/* Restore the old PID value in the parent. */ +#define RESTORE_PID \ + cmp r0, #0; /* If we are the parent... */ \ + strne r3, [r2, #PID_OFFSET] /* ... restore the saved PID. */ + +#include "../vfork.S" diff --git a/sysdeps/unix/sysv/linux/arm/sigaction.c b/sysdeps/unix/sysv/linux/arm/sigaction.c index 81b29adb2b..6dd189b5c5 100644 --- a/sysdeps/unix/sysv/linux/arm/sigaction.c +++ b/sysdeps/unix/sysv/linux/arm/sigaction.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1997,1998,1999,2000,2002,2003 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999, 2000, 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 @@ -78,14 +79,7 @@ __libc_sigaction (sig, act, oact) memcpy (&kact.sa_mask, &act->sa_mask, sizeof (sigset_t)); kact.sa_flags = act->sa_flags; # ifdef HAVE_SA_RESTORER - /* If the user specified SA_ONSTACK this means she is trying to - use the old-style stack switching. Unfortunately this - requires the sa_restorer field so we cannot install our own - handler. (In fact the user is likely to be out of luck anyway - since the kernel currently only supports stack switching via - the X/Open sigaltstack interface, but we allow for the - possibility that this might change in the future.) */ - if (kact.sa_flags & (SA_RESTORER | SA_ONSTACK)) + if (kact.sa_flags & SA_RESTORER) kact.sa_restorer = act->sa_restorer; else { @@ -131,8 +125,7 @@ __libc_sigaction (sig, act, oact) k_sigact.sa_mask = act->sa_mask.__val[0]; k_sigact.sa_flags = act->sa_flags; # ifdef HAVE_SA_RESTORER - /* See the comments above for why we test SA_ONSTACK. */ - if (k_sigact.sa_flags & (SA_RESTORER | SA_ONSTACK)) + if (k_sigact.sa_flags & SA_RESTORER) k_sigact.sa_restorer = act->sa_restorer; else { diff --git a/sysdeps/unix/sysv/linux/arm/socket.S b/sysdeps/unix/sysv/linux/arm/socket.S index 4c0fdfb0a7..22d0c1ab02 100644 --- a/sysdeps/unix/sysv/linux/arm/socket.S +++ b/sysdeps/unix/sysv/linux/arm/socket.S @@ -34,11 +34,11 @@ The .S files for the other calls just #define socket and #include this. */ #ifndef __socket -#ifndef NO_WEAK_ALIAS -#define __socket P(__,socket) -#else -#define __socket socket -#endif +# ifndef NO_WEAK_ALIAS +# define __socket P(__,socket) +# else +# define __socket socket +# endif #endif #define PUSHARGS_1 str a1, [sp, $-4]! @@ -53,7 +53,7 @@ #define POPARGS_3 add sp, sp, #12 #define POPARGS_4 add sp, sp, #16 #define POPARGS_5 add sp, sp, #16 -#define POPARGS_6 add sp, sp, #16 +#define POPARGS_6 add sp, sp, #16 #ifndef NARGS #define NARGS 3 /* If we were called with no wrapper, this is really socket() */ @@ -66,8 +66,8 @@ .globl __socket ENTRY (__socket) /* This code previously moved sp into ip and stored the args using - stmdb ip!, {a1-a4}. It did not modify sp, so the stack never had - to be restored after the syscall completed. It saved an + stmdb ip!, {a1-a4}. It did not modify sp, so the stack never had + to be restored after the syscall completed. It saved an instruction and meant no stack cleanup work was required. This will not work in the case of a socket call being interrupted diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index 4df3e3795c..01b3717018 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -24,6 +24,9 @@ /* There is some commonality. */ #include +/* Defines RTLD_PRIVATE_ERRNO and USE_DL_SYSINFO. */ +#include + /* For Linux we can use the system call table in the header file /usr/include/asm/unistd.h of the kernel. But these symbols do not follow the SYS_* syntax @@ -43,7 +46,7 @@ might return a large offset. Therefore we must not anymore test for < 0, but test for a real error by making sure the value in R0 is a real error number. Linus said he will make sure the no syscall - returns a value in -1 .. -4095 as a valid result so we can savely + returns a value in -1 .. -4095 as a valid result so we can safely test with -4095. */ #undef PSEUDO @@ -96,7 +99,17 @@ #if NOT_IN_libc # define SYSCALL_ERROR __local_syscall_error -# define SYSCALL_ERROR_HANDLER \ +# if RTLD_PRIVATE_ERRNO +# define SYSCALL_ERROR_HANDLER \ +__local_syscall_error: \ + ldr r1, 1f; \ + rsb r0, r0, #0; \ +0: str r0, [pc, r1]; \ + mvn r0, #0; \ + DO_RET(lr); \ +1: .word C_SYMBOL_NAME(rtld_errno) - 0b - 8; +# else +# define SYSCALL_ERROR_HANDLER \ __local_syscall_error: \ str lr, [sp, #-4]!; \ str r0, [sp, #-4]!; \ @@ -106,6 +119,7 @@ __local_syscall_error: \ str r1, [r0]; \ mvn r0, #0; \ ldr pc, [sp], #4; +# endif #else # define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */ # define SYSCALL_ERROR __syscall_error @@ -239,6 +253,24 @@ __local_syscall_error: \ LOAD_ARGS_6 (a1, a2, a3, a4, a5, a6) #define ASM_ARGS_7 ASM_ARGS_6, "r" (_v3) +/* We can't implement non-constant syscalls directly since the syscall + number is normally encoded in the instruction. So use SYS_syscall. */ +#define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \ + INTERNAL_SYSCALL_NCS_##nr (number, err, args) + +#define INTERNAL_SYSCALL_NCS_0(number, err, args...) \ + INTERNAL_SYSCALL (syscall, err, 1, number, args) +#define INTERNAL_SYSCALL_NCS_1(number, err, args...) \ + INTERNAL_SYSCALL (syscall, err, 2, number, args) +#define INTERNAL_SYSCALL_NCS_2(number, err, args...) \ + INTERNAL_SYSCALL (syscall, err, 3, number, args) +#define INTERNAL_SYSCALL_NCS_3(number, err, args...) \ + INTERNAL_SYSCALL (syscall, err, 4, number, args) +#define INTERNAL_SYSCALL_NCS_4(number, err, args...) \ + INTERNAL_SYSCALL (syscall, err, 5, number, args) +#define INTERNAL_SYSCALL_NCS_5(number, err, args...) \ + INTERNAL_SYSCALL (syscall, err, 6, number, args) + #endif /* __ASSEMBLER__ */ #endif /* linux/arm/sysdep.h */ diff --git a/sysdeps/unix/sysv/linux/arm/vfork.S b/sysdeps/unix/sysv/linux/arm/vfork.S index 0e267b3ca9..a020658989 100644 --- a/sysdeps/unix/sysv/linux/arm/vfork.S +++ b/sysdeps/unix/sysv/linux/arm/vfork.S @@ -30,16 +30,22 @@ ENTRY (__vfork) #ifdef __NR_vfork +#ifdef SAVE_PID + SAVE_PID +#endif DO_CALL (vfork, 0) +#ifdef RESTORE_PID + RESTORE_PID +#endif cmn a1, #4096 RETINSTR(cc, lr) # ifdef __ASSUME_VFORK_SYSCALL - b PLTJMP(C_SYMBOL_NAME(__syscall_error)) + b PLTJMP(SYSCALL_ERROR) # else /* Check if vfork syscall is known at all. */ - cmn a2, #ENOSYS - bne PLTJMP(C_SYMBOL_NAME(__syscall_error)) + cmn a1, #ENOSYS + bne PLTJMP(SYSCALL_ERROR) # endif #endif @@ -48,7 +54,7 @@ ENTRY (__vfork) DO_CALL (fork, 0) cmn a1, #4096 RETINSTR(cc, lr) - b PLTJMP(C_SYMBOL_NAME(__syscall_error)) + b PLTJMP(SYSCALL_ERROR) #elif !defined __NR_vfork # error "__NR_vfork not available and __ASSUME_VFORK_SYSCALL defined" #endif From 34e59f5bfb0afd6185c6c619bc1252967eb4ad06 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Wed, 16 Nov 2005 19:22:59 +0000 Subject: [PATCH 3482/4487] * sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h, sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c, sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c, sysdeps/unix/sysv/linux/arm/nptl/unwind.h, sysdeps/arm/unwind-dw2-fde-glibc.c, sysdeps/arm/unwind-pe.c, sysdeps/arm/framestate.c: New files. --- ChangeLog.arm | 9 ++ sysdeps/arm/framestate.c | 1 + sysdeps/arm/unwind-dw2-fde-glibc.c | 80 +++++++++++ sysdeps/arm/unwind-pe.c | 1 + .../unix/sysv/linux/arm/nptl/sysdep-cancel.h | 128 ++++++++++++++++++ .../sysv/linux/arm/nptl/unwind-forcedunwind.c | 117 ++++++++++++++++ .../unix/sysv/linux/arm/nptl/unwind-resume.c | 87 ++++++++++++ sysdeps/unix/sysv/linux/arm/nptl/unwind.h | 31 +++++ 8 files changed, 454 insertions(+) create mode 100644 sysdeps/arm/framestate.c create mode 100644 sysdeps/arm/unwind-dw2-fde-glibc.c create mode 100644 sysdeps/arm/unwind-pe.c create mode 100644 sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h create mode 100644 sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c create mode 100644 sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c create mode 100644 sysdeps/unix/sysv/linux/arm/nptl/unwind.h diff --git a/ChangeLog.arm b/ChangeLog.arm index 795b363904..81f98f7cf1 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,12 @@ +2005-11-16 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h, + sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c, + sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c, + sysdeps/unix/sysv/linux/arm/nptl/unwind.h, + sysdeps/arm/unwind-dw2-fde-glibc.c, + sysdeps/arm/unwind-pe.c, sysdeps/arm/framestate.c: New files. + 2005-11-16 Daniel Jacobowitz * sysdeps/arm/bits/setjmp.h, sysdeps/arm/fpu/bits/setjmp.h: Update diff --git a/sysdeps/arm/framestate.c b/sysdeps/arm/framestate.c new file mode 100644 index 0000000000..710cecca97 --- /dev/null +++ b/sysdeps/arm/framestate.c @@ -0,0 +1 @@ +/* Empty */ diff --git a/sysdeps/arm/unwind-dw2-fde-glibc.c b/sysdeps/arm/unwind-dw2-fde-glibc.c new file mode 100644 index 0000000000..6c0d7350dc --- /dev/null +++ b/sysdeps/arm/unwind-dw2-fde-glibc.c @@ -0,0 +1,80 @@ +/* Dummy exception handling and frame unwind runtime interface routines. + Copyright (C) 2004 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. */ + +/* ARM uses setjmp-longjmp exceptions. However, previous versions of + GNU libc exported some DWARF-2 exception handling support routines. + They are not necessary, but older (or broken) configurations of GCC + will do so. Even though all references to these are weak, because + they refer to versioned symbols, they must be provided. */ + +#include +#include +#include + +/* These may be called from startup code, but don't need to do + anything. */ + +void __register_frame_info_bases (void *a1, struct object *a2, + void *a3, void *a4) +{ +} + +void __register_frame_info (void *a1, struct object *a2) +{ +} + +void __register_frame (void *a1) +{ +} + +void __register_frame_info_table_bases (void *a1, struct object *a2, + void *a3, void *a4) +{ +} + +void __register_frame_info_table (void *a1, struct object *a2) +{ +} + +void __register_frame_table (void *a1) +{ +} + +void *__deregister_frame_info (void *a1) +{ + return NULL; +} + +void *__deregister_frame_info_bases (void *a1) +{ + return NULL; +} + +void __deregister_frame (void *a1) +{ +} + +/* This should not be called. */ + +fde * +_Unwind_Find_FDE (void *a1, struct dwarf_eh_bases *a2) +{ + abort (); +} diff --git a/sysdeps/arm/unwind-pe.c b/sysdeps/arm/unwind-pe.c new file mode 100644 index 0000000000..710cecca97 --- /dev/null +++ b/sysdeps/arm/unwind-pe.c @@ -0,0 +1 @@ +/* Empty */ diff --git a/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h new file mode 100644 index 0000000000..a44ee95e18 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h @@ -0,0 +1,128 @@ +/* Copyright (C) 2003, 2004, 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 + 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. */ + +#include +#include +#ifndef __ASSEMBLER__ +# include +#endif + +#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt + +# undef PSEUDO +# define PSEUDO(name, syscall_name, args) \ + .section ".text"; \ + PSEUDO_PROLOGUE; \ + .type __##syscall_name##_nocancel,%function; \ + .globl __##syscall_name##_nocancel; \ + __##syscall_name##_nocancel: \ + DO_CALL (syscall_name, args); \ + PSEUDO_RET; \ + .size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel; \ + ENTRY (name); \ + SINGLE_THREAD_P; \ + DOARGS_##args; \ + bne .Lpseudo_cancel; \ + DO_CALL (syscall_name, 0); \ + UNDOARGS_##args; \ + cmn r0, $4096; \ + PSEUDO_RET; \ + .Lpseudo_cancel: \ + DOCARGS_##args; /* save syscall args etc. around CENABLE. */ \ + CENABLE; \ + mov ip, r0; /* put mask in safe place. */ \ + UNDOCARGS_##args; /* restore syscall args. */ \ + swi SYS_ify (syscall_name); /* do the call. */ \ + str r0, [sp, $-4]!; /* save syscall return value. */ \ + mov r0, ip; /* get mask back. */ \ + CDISABLE; \ + ldmfd sp!, {r0, lr}; /* retrieve return value and address. */ \ + UNDOARGS_##args; \ + cmn r0, $4096; + +# define DOCARGS_0 str lr, [sp, #-4]!; +# define UNDOCARGS_0 + +# define DOCARGS_1 stmfd sp!, {r0, lr}; +# define UNDOCARGS_1 ldr r0, [sp], #4; + +# define DOCARGS_2 stmfd sp!, {r0, r1, lr}; +# define UNDOCARGS_2 ldmfd sp!, {r0, r1}; + +# define DOCARGS_3 stmfd sp!, {r0, r1, r2, lr}; +# define UNDOCARGS_3 ldmfd sp!, {r0, r1, r2}; + +# define DOCARGS_4 stmfd sp!, {r0, r1, r2, r3, lr}; +# define UNDOCARGS_4 ldmfd sp!, {r0, r1, r2, r3}; + +# define DOCARGS_5 DOCARGS_4 +# define UNDOCARGS_5 UNDOCARGS_4 + +# ifdef IS_IN_libpthread +# define CENABLE bl PLTJMP(__pthread_enable_asynccancel) +# define CDISABLE bl PLTJMP(__pthread_disable_asynccancel) +# define __local_multiple_threads __pthread_multiple_threads +# elif !defined NOT_IN_libc +# define CENABLE bl PLTJMP(__libc_enable_asynccancel) +# define CDISABLE bl PLTJMP(__libc_disable_asynccancel) +# define __local_multiple_threads __libc_multiple_threads +# elif defined IS_IN_librt +# define CENABLE bl PLTJMP(__librt_enable_asynccancel) +# define CDISABLE bl PLTJMP(__librt_disable_asynccancel) +# else +# error Unsupported library +# endif + +# if defined IS_IN_libpthread || !defined NOT_IN_libc +# ifndef __ASSEMBLER__ +extern int __local_multiple_threads attribute_hidden; +# define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1) +# else +# define SINGLE_THREAD_P \ + ldr ip, 1b; \ +2: \ + ldr ip, [pc, ip]; \ + teq ip, #0; +# define PSEUDO_PROLOGUE \ + 1: .word __local_multiple_threads - 2f - 8; +# endif +# else +/* There is no __local_multiple_threads for librt, so use the TCB. */ +# ifndef __ASSEMBLER__ +# define SINGLE_THREAD_P \ + __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ + header.multiple_threads) == 0, 1) +# else +# define PSEUDO_PROLOGUE +# define SINGLE_THREAD_P \ + stmfd sp!, {r0, lr}; \ + bl __aeabi_read_tp; \ + ldr ip, [r0, #MULTIPLE_THREADS_OFFSET]; \ + ldmfd sp!, {r0, lr}; \ + teq ip, #0 +# define SINGLE_THREAD_P_PIC(x) SINGLE_THREAD_P +# endif +# endif + +#elif !defined __ASSEMBLER__ + +/* For rtld, et cetera. */ +# define SINGLE_THREAD_P 1 +# define NO_CANCELLATION 1 + +#endif diff --git a/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c new file mode 100644 index 0000000000..ba5327a4d1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c @@ -0,0 +1,117 @@ +/* Copyright (C) 2003 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek . + + 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; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include +#include + +static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); +static _Unwind_Reason_Code (*libgcc_s_personality) + (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, + struct _Unwind_Context *); +static _Unwind_Reason_Code (*libgcc_s_forcedunwind) + (struct _Unwind_Exception *, _Unwind_Stop_Fn, void *); +static _Unwind_Word (*libgcc_s_getcfa) (struct _Unwind_Context *); +static void (*libgcc_s_sjlj_register) (struct SjLj_Function_Context *); +static void (*libgcc_s_sjlj_unregister) (struct SjLj_Function_Context *); + +void +pthread_cancel_init (void) +{ + void *resume, *personality, *forcedunwind, *getcfa; + void *handle; + void *sjlj_register, *sjlj_unregister; + + if (__builtin_expect (libgcc_s_getcfa != NULL, 1)) + return; + + handle = __libc_dlopen ("libgcc_s.so.1"); + + if (handle == NULL + || (sjlj_register = __libc_dlsym (handle, "_Unwind_SjLj_Register")) == NULL + || (sjlj_unregister = __libc_dlsym (handle, "_Unwind_SjLj_Unregister")) == NULL + || (resume = __libc_dlsym (handle, "_Unwind_SjLj_Resume")) == NULL + || (personality = __libc_dlsym (handle, "__gcc_personality_sj0")) == NULL + || (forcedunwind = __libc_dlsym (handle, "_Unwind_SjLj_ForcedUnwind")) + == NULL + || (getcfa = __libc_dlsym (handle, "_Unwind_GetCFA")) == NULL + ) + __libc_fatal ("libgcc_s.so.1 must be installed for pthread_cancel to work\n"); + + libgcc_s_resume = resume; + libgcc_s_personality = personality; + libgcc_s_forcedunwind = forcedunwind; + libgcc_s_getcfa = getcfa; + libgcc_s_sjlj_register = sjlj_register; + libgcc_s_sjlj_unregister = sjlj_unregister; +} + +void +_Unwind_Resume (struct _Unwind_Exception *exc) +{ + if (__builtin_expect (libgcc_s_resume == NULL, 0)) + pthread_cancel_init (); + libgcc_s_resume (exc); +} + +_Unwind_Reason_Code +__gcc_personality_v0 (int version, _Unwind_Action actions, + _Unwind_Exception_Class exception_class, + struct _Unwind_Exception *ue_header, + struct _Unwind_Context *context) +{ + if (__builtin_expect (libgcc_s_personality == NULL, 0)) + pthread_cancel_init (); + return libgcc_s_personality (version, actions, exception_class, + ue_header, context); +} + +_Unwind_Reason_Code +_Unwind_ForcedUnwind (struct _Unwind_Exception *exc, _Unwind_Stop_Fn stop, + void *stop_argument) +{ + if (__builtin_expect (libgcc_s_forcedunwind == NULL, 0)) + pthread_cancel_init (); + return libgcc_s_forcedunwind (exc, stop, stop_argument); +} + +_Unwind_Word +_Unwind_GetCFA (struct _Unwind_Context *context) +{ + if (__builtin_expect (libgcc_s_getcfa == NULL, 0)) + pthread_cancel_init (); + return libgcc_s_getcfa (context); +} + +void +_Unwind_SjLj_Register (struct SjLj_Function_Context *fc) +{ + if (__builtin_expect (libgcc_s_sjlj_register == NULL, 0)) + pthread_cancel_init (); + libgcc_s_sjlj_register (fc); +} + +void +_Unwind_SjLj_Unregister (struct SjLj_Function_Context *fc) +{ + if (__builtin_expect (libgcc_s_sjlj_unregister == NULL, 0)) + pthread_cancel_init (); + libgcc_s_sjlj_unregister (fc); +} diff --git a/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c new file mode 100644 index 0000000000..8dcfd34b16 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c @@ -0,0 +1,87 @@ +/* Copyright (C) 2003 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek . + + 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; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include + +static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); +static _Unwind_Reason_Code (*libgcc_s_personality) + (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, + struct _Unwind_Context *); +static void (*libgcc_s_sjlj_register) (struct SjLj_Function_Context *); +static void (*libgcc_s_sjlj_unregister) (struct SjLj_Function_Context *); + +static void +init (void) +{ + void *resume, *personality; + void *handle; + void *sjlj_register, *sjlj_unregister; + + handle = __libc_dlopen ("libgcc_s.so.1"); + + if (handle == NULL + || (sjlj_register = __libc_dlsym (handle, "_Unwind_SjLj_Register")) == NULL + || (sjlj_unregister = __libc_dlsym (handle, "_Unwind_SjLj_Unregister")) == NULL + || (resume = __libc_dlsym (handle, "_Unwind_SjLj_Resume")) == NULL + || (personality = __libc_dlsym (handle, "__gcc_personality_sj0")) == NULL) + __libc_fatal ("libgcc_s.so.1 must be installed for pthread_cancel to work\n"); + + libgcc_s_resume = resume; + libgcc_s_personality = personality; + libgcc_s_sjlj_register = sjlj_register; + libgcc_s_sjlj_unregister = sjlj_unregister; +} + +void +_Unwind_Resume (struct _Unwind_Exception *exc) +{ + if (__builtin_expect (libgcc_s_resume == NULL, 0)) + init (); + libgcc_s_resume (exc); +} + +_Unwind_Reason_Code +__gcc_personality_v0 (int version, _Unwind_Action actions, + _Unwind_Exception_Class exception_class, + struct _Unwind_Exception *ue_header, + struct _Unwind_Context *context) +{ + if (__builtin_expect (libgcc_s_personality == NULL, 0)) + init (); + return libgcc_s_personality (version, actions, exception_class, + ue_header, context); +} + +void +_Unwind_SjLj_Register (struct SjLj_Function_Context *fc) +{ + if (__builtin_expect (libgcc_s_sjlj_register == NULL, 0)) + init (); + libgcc_s_sjlj_register (fc); +} + +void +_Unwind_SjLj_Unregister (struct SjLj_Function_Context *fc) +{ + if (__builtin_expect (libgcc_s_sjlj_unregister == NULL, 0)) + init (); + libgcc_s_sjlj_unregister (fc); +} diff --git a/sysdeps/unix/sysv/linux/arm/nptl/unwind.h b/sysdeps/unix/sysv/linux/arm/nptl/unwind.h new file mode 100644 index 0000000000..8dd834eddb --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/nptl/unwind.h @@ -0,0 +1,31 @@ +/* Exception handling and frame unwind runtime interface routines. + Copyright (C) 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 + 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 _ARM_UNWIND_H +#define _ARM_UNWIND_H 1 + +#include + +/* Call the SjLj versions of these functions. */ +#define _Unwind_ForcedUnwind _Unwind_SjLj_ForcedUnwind +#define _Unwind_Resume _Unwind_SjLj_Resume +#define __gcc_personality_v0 __gcc_personality_sj0 + +#endif /* unwind.h */ From 8e968c00cb4e3fd6d6073c23efa4d58454bbb4b7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 18 Nov 2005 02:40:36 +0000 Subject: [PATCH 3483/4487] Define SHM_NORESERVE. --- sysdeps/unix/sysv/linux/alpha/bits/shm.h | 1 + sysdeps/unix/sysv/linux/hppa/bits/shm.h | 1 + 2 files changed, 2 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/shm.h b/sysdeps/unix/sysv/linux/alpha/bits/shm.h index bbee434ea0..35226c16ce 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/shm.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/shm.h @@ -71,6 +71,7 @@ struct shmid_ds # define SHM_DEST 01000 /* segment will be destroyed on last detach */ # define SHM_LOCKED 02000 /* segment will not be swapped */ # define SHM_HUGETLB 04000 /* segment is mapped via hugetlb */ +# define SHM_NORESERVE 010000 /* don't check for reservations */ struct shminfo { diff --git a/sysdeps/unix/sysv/linux/hppa/bits/shm.h b/sysdeps/unix/sysv/linux/hppa/bits/shm.h index 1c022fda83..a91f1f575b 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/shm.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/shm.h @@ -79,6 +79,7 @@ struct shmid_ds # define SHM_DEST 01000 /* segment will be destroyed on last detach */ # define SHM_LOCKED 02000 /* segment will not be swapped */ # define SHM_HUGETLB 04000 /* segment is mapped via hugetlb */ +# define SHM_NORESERVE 010000 /* don't check for reservations */ struct shminfo { From fefb4f111356fb66991f2652ac1b9c01e625cce1 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 18 Nov 2005 22:46:31 +0000 Subject: [PATCH 3484/4487] 2005-11-18 Paul Brook * sysdeps/unix/sysv/linux/m68k/bits/mman.h (MREMAP_FIXED): New macro. --- sysdeps/unix/sysv/linux/m68k/bits/mman.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/m68k/bits/mman.h b/sysdeps/unix/sysv/linux/m68k/bits/mman.h index 815a3da88f..6e7bdc99dd 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/mman.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/m68k version. - Copyright (C) 1997, 2003 Free Software Foundation, Inc. + Copyright (C) 1997, 2000, 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 @@ -78,6 +78,7 @@ /* Flags for `mremap'. */ #ifdef __USE_GNU # define MREMAP_MAYMOVE 1 +# define MREMAP_FIXED 2 #endif /* Advice to `madvise'. */ From 971a928ce0796cc7b48ed1112fb1d66b6ac5f79a Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sat, 26 Nov 2005 00:52:45 +0000 Subject: [PATCH 3485/4487] * sysdeps/unix/sysv/linux/alpha/fxstatat.c (__fxstatat): Fix typo. (__fxstatat64): Alias from __fxstatat; remove other cnp errors. * sysdeps/unix/sysv/linux/alpha/sigaction.c: Include sys/cdefs.h and stddef.h. * sysdeps/unix/sysv/linux/alpha/bits/mman.h (MREMAP_FIXED): Define. --- sysdeps/unix/sysv/linux/alpha/bits/mman.h | 1 + sysdeps/unix/sysv/linux/alpha/fxstatat.c | 7 ++----- sysdeps/unix/sysv/linux/alpha/sigaction.c | 2 ++ 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/mman.h b/sysdeps/unix/sysv/linux/alpha/bits/mman.h index bb41887479..59574266a4 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/mman.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/mman.h @@ -86,6 +86,7 @@ /* Flags for `mremap'. */ #ifdef __USE_GNU # define MREMAP_MAYMOVE 1 +# define MREMAP_FIXED 2 #endif /* Advice to `madvise'. */ diff --git a/sysdeps/unix/sysv/linux/alpha/fxstatat.c b/sysdeps/unix/sysv/linux/alpha/fxstatat.c index 65b7ad97a3..127f7f3c57 100644 --- a/sysdeps/unix/sysv/linux/alpha/fxstatat.c +++ b/sysdeps/unix/sysv/linux/alpha/fxstatat.c @@ -67,7 +67,7 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag) if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64) { - if (flags & AT_SYMLINK_NOFOLLOW) + if (flag & AT_SYMLINK_NOFOLLOW) result = INTERNAL_SYSCALL (lstat64, err, 2, file, st); else result = INTERNAL_SYSCALL (stat64, err, 2, file, st); @@ -94,7 +94,4 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag) return -1; } -hidden_def (__xstat) -weak_alias (__xstat, _xstat); -strong_alias (__xstat, __xstat64); -hidden_ver (__xstat, __xstat64) +strong_alias (__fxstatat, __fxstatat64); diff --git a/sysdeps/unix/sysv/linux/alpha/sigaction.c b/sysdeps/unix/sysv/linux/alpha/sigaction.c index 21a2063c30..26b081d9a3 100644 --- a/sysdeps/unix/sysv/linux/alpha/sigaction.c +++ b/sysdeps/unix/sysv/linux/alpha/sigaction.c @@ -17,6 +17,8 @@ 02111-1307 USA. */ #include +#include +#include /* * In order to get the hidden arguments for rt_sigaction set up From a6b36472ee73510f86cfef496c18a3909da4902b Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sun, 27 Nov 2005 06:05:33 +0000 Subject: [PATCH 3486/4487] * sysdeps/alpha/strncmp.S: Don't read too much data when pointers are co-aligned, and count is aligned with the end of the word. --- sysdeps/alpha/strncmp.S | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/sysdeps/alpha/strncmp.S b/sysdeps/alpha/strncmp.S index e2b4ebf857..ff199eb743 100644 --- a/sysdeps/alpha/strncmp.S +++ b/sysdeps/alpha/strncmp.S @@ -61,8 +61,10 @@ $aligned: ornot t0, t3, t0 # .. e1 : cmpbge zero, t1, t7 # e0 : bits set iff null found beq a2, $eoc # .. e1 : check end of count - subq a2, 1, a2 # e0 : + unop # e0 : bne t7, $eos # .. e1 : + unop # e0 : + beq t10, $ant_loop # .. e1 : /* Aligned compare main loop. On entry to this basic block: @@ -74,13 +76,30 @@ $a_loop: bne t2, $wordcmp # .. e1 (zdb) ldq_u t1, 8(a1) # e0 : ldq_u t0, 8(a0) # .. e1 : + subq a2, 1, a2 # e0 : + addq a1, 8, a1 # .. e1 : + addq a0, 8, a0 # e0 : + beq a2, $eoc # .. e1 : + cmpbge zero, t1, t7 # e0 : + beq t7, $a_loop # .. e1 : + unop # e0 : + br $eos # .. e1 : + + /* Alternate aligned compare loop, for when there's no trailing + bytes on the count. We have to avoid reading too much data. */ +$ant_loop: + xor t0, t1, t2 # e0 : + bne t2, $wordcmp # .. e1 (zdb) + subq a2, 1, a2 # e0 : + beq a2, $zerolength # .. e1 : + ldq_u t1, 8(a1) # e0 : + ldq_u t0, 8(a0) # .. e1 : addq a1, 8, a1 # e0 : addq a0, 8, a0 # .. e1 : cmpbge zero, t1, t7 # e0 : - beq a2, $eoc # .. e1 : - subq a2, 1, a2 # e0 : - beq t7, $a_loop # .. e1 : - br $eos # e1 : + beq t7, $ant_loop # .. e1 : + unop # e0 : + br $eos # .. e1 : /* The two strings are not co-aligned. Align s1 and cope. */ $unaligned: @@ -184,6 +203,8 @@ $u_final: $eoc: mskql t0, t10, t0 mskql t1, t10, t1 + unop + cmpbge zero, t1, t7 /* We've found a zero somewhere in a word we just read. On entry to this basic block: @@ -203,6 +224,7 @@ $eos: /* Here we have two differing co-aligned words in t0 & t1. Bytewise compare them and return (t0 > t1 ? 1 : -1). */ + .align 3 $wordcmp: cmpbge t0, t1, t2 # e0 : comparison yields bit mask of ge cmpbge t1, t0, t3 # .. e1 : @@ -216,6 +238,7 @@ $wordcmp: $done: ret # e1 : + .align 3 $zerolength: clr v0 ret From d3fcfbb038aa0093c65f0579394718c81047d328 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 28 Nov 2005 08:25:55 +0000 Subject: [PATCH 3487/4487] =?UTF-8?q?(MREMAP=5FFIXED):=20Added.=20Patch=20?= =?UTF-8?q?by=20Ren=C3=A9=20Rebe=20.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sysdeps/unix/sysv/linux/mips/bits/mman.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/mman.h b/sysdeps/unix/sysv/linux/mips/bits/mman.h index 154501fba2..92d4b8a340 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/mman.h +++ b/sysdeps/unix/sysv/linux/mips/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/MIPS version. - Copyright (C) 1997, 2000, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 1997, 2000, 2003, 2004, 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 @@ -89,4 +89,5 @@ /* Flags for `mremap'. */ #ifdef __USE_GNU # define MREMAP_MAYMOVE 1 +# define MREMAP_FIXED 2 #endif From f6023225d0f05eb07aead4f02133a769ce6d1fcb Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 6 Dec 2005 01:38:24 +0000 Subject: [PATCH 3488/4487] 2005-11-15 Mike Frysinger * sysdeps/hppa/bits/setjmp.h: Add _BITS_SETJMP_H preprocessor protection and allow pthread.h to include bits/setjmp.h as well as setjmp.h. * sysdeps/m68k/bits/setjmp.h: Likewise. * sysdeps/s390/bits/setjmp.h: Make sure only setjmp.h or pthread.h are allow to include bits/setjmp.h. * sysdeps/mips/bits/setjmp.h (_JMPBUF_UNWINDS): Cast rhs to match lhs cast of address. * sysdeps/sh/bits/setjmp.h: Likewise. --- sysdeps/hppa/bits/setjmp.h | 6 +++++- sysdeps/m68k/bits/setjmp.h | 6 +++++- sysdeps/mips/bits/setjmp.h | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/sysdeps/hppa/bits/setjmp.h b/sysdeps/hppa/bits/setjmp.h index 7fb2af77d0..4395b8f562 100644 --- a/sysdeps/hppa/bits/setjmp.h +++ b/sysdeps/hppa/bits/setjmp.h @@ -17,8 +17,10 @@ 02111-1307 USA. */ /* Define the machine-dependent type `jmp_buf'. HPPA version. */ +#ifndef _BITS_SETJMP_H +#define _BITS_SETJMP_H 1 -#ifndef _SETJMP_H +#if !defined _SETJMP_H && !defined _PTHREAD_H # error "Never include directly; use instead." #endif @@ -39,3 +41,5 @@ typedef double __jmp_buf[21]; variable at ADDRESS. */ #define _JMPBUF_UNWINDS(_jmpbuf, _address) \ ((void *)(_address) > (void *)(((unsigned long *) _jmpbuf)[JB_SP])) + +#endif /* bits/setjmp.h */ diff --git a/sysdeps/m68k/bits/setjmp.h b/sysdeps/m68k/bits/setjmp.h index 2c2b3ee15a..193eec3509 100644 --- a/sysdeps/m68k/bits/setjmp.h +++ b/sysdeps/m68k/bits/setjmp.h @@ -17,8 +17,10 @@ 02111-1307 USA. */ /* Define the machine-dependent type `jmp_buf'. m68k version. */ +#ifndef _BITS_SETJMP_H +#define _BITS_SETJMP_H 1 -#ifndef _SETJMP_H +#if !defined _SETJMP_H && !defined _PTHREAD_H # error "Never include directly; use instead." #endif @@ -44,3 +46,5 @@ typedef struct containing a local variable at ADDRESS. */ #define _JMPBUF_UNWINDS(jmpbuf, address) \ ((void *) (address) < (void *) (jmpbuf)->__sp) + +#endif /* bits/setjmp.h */ diff --git a/sysdeps/mips/bits/setjmp.h b/sysdeps/mips/bits/setjmp.h index 2b42b22ba4..74caae8cba 100644 --- a/sysdeps/mips/bits/setjmp.h +++ b/sysdeps/mips/bits/setjmp.h @@ -81,6 +81,6 @@ typedef struct /* Test if longjmp to JMPBUF would unwind the frame containing a local variable at ADDRESS. */ #define _JMPBUF_UNWINDS(jmpbuf, address) \ - ((void *) (address) < (jmpbuf)[0].__sp) + ((void *) (address) < (void *) (jmpbuf)[0].__sp) #endif /* _MIPS_BITS_SETJMP_H */ From 0546598845e5deea5f0a5313bf5868c642e24812 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 14 Dec 2005 08:22:40 +0000 Subject: [PATCH 3489/4487] Generic brdinit.c. --- bare/brdinit.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 bare/brdinit.c diff --git a/bare/brdinit.c b/bare/brdinit.c new file mode 100644 index 0000000000..af96bcd12a --- /dev/null +++ b/bare/brdinit.c @@ -0,0 +1,32 @@ +/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), + On-Line Applications Research Corporation. + + 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. */ + +#include + +/* This file is only required when a "bare" board is configured. */ + +/* _Board_Initialize + +This routine normally performs board specific initialization. */ + +void +_Board_Initialize () +{ +} From 0d3c538a39ad9ce712825d9b799ebacf1b2dfc22 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 14 Dec 2005 08:30:30 +0000 Subject: [PATCH 3490/4487] Generic console.c. --- bare/console.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 bare/console.c diff --git a/bare/console.c b/bare/console.c new file mode 100644 index 0000000000..326ebed4a1 --- /dev/null +++ b/bare/console.c @@ -0,0 +1,42 @@ +/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), + On-Line Applications Research Corporation. + + 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. */ + +#include + +/* This file is only required when a "bare" board is configured. */ + +/* These routines provide console IO routines for your embedded target. */ + +int +_Console_Putc (ch) + char ch; +{ + /* eat the character */ + + return 0; +} + +int +_Console_Getc (poll) + int poll; +{ + /* boring user, never types anything */ + return -1; +} From 407fe247124382de29566028eb419a51d822b16d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 14 Dec 2005 11:16:23 +0000 Subject: [PATCH 3491/4487] Generic strtsupp.c. --- bare/strtsupp.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 bare/strtsupp.c diff --git a/bare/strtsupp.c b/bare/strtsupp.c new file mode 100644 index 0000000000..c66495bb3d --- /dev/null +++ b/bare/strtsupp.c @@ -0,0 +1,28 @@ +/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), + On-Line Applications Research Corporation. + + 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. */ + +#include + +/* This file is only required when a "bare" board is configured. */ + +/* Start Support Routines + +The start code for some CPUs (e.g. i386) require target dependent +support. For more info, consult the start file for your CPU. */ From 333697c5a7566e349beade7e9f80f258f6d57a23 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 15 Dec 2005 21:10:12 +0000 Subject: [PATCH 3492/4487] 2005-12-15 Roland McGrath * sysdeps/alpha/fpu/s_cacosf.c: Don't use sysdeps/generic/. * sysdeps/alpha/fpu/s_cacoshf.c: Likewise. * sysdeps/alpha/fpu/s_casinf.c: Likewise. * sysdeps/alpha/fpu/s_casinhf.c: Likewise. * sysdeps/alpha/fpu/s_catanf.c: Likewise. * sysdeps/alpha/fpu/s_catanhf.c: Likewise. * sysdeps/alpha/fpu/s_ccosf.c: Likewise. * sysdeps/alpha/fpu/s_ccoshf.c: Likewise. * sysdeps/alpha/fpu/s_cexpf.c: Likewise. * sysdeps/alpha/fpu/s_clog10f.c: Likewise. * sysdeps/alpha/fpu/s_clogf.c: Likewise. * sysdeps/alpha/fpu/s_cpowf.c: Likewise. * sysdeps/alpha/fpu/s_cprojf.c: Likewise. * sysdeps/alpha/fpu/s_csinf.c: Likewise. * sysdeps/alpha/fpu/s_csinhf.c: Likewise. * sysdeps/alpha/fpu/s_csqrtf.c: Likewise. * sysdeps/alpha/fpu/s_ctanf.c: Likewise. * sysdeps/alpha/fpu/s_ctanhf.c: Likewise. * sysdeps/alpha/libc-tls.c: Likewise. * sysdeps/gnu/glob64.c: Likewise. * sysdeps/gnu/updwtmp.c: Likewise. * sysdeps/gnu/utmp_file.c: Likewise. * sysdeps/i386/bzero.c: Likewise. * sysdeps/i386/ffs.c: Likewise. * sysdeps/i386/i686/ffs.c: Likewise. * sysdeps/i386/memset.c: Likewise. * sysdeps/ia64/fpu/printf_fphex.c: Likewise. * sysdeps/ia64/libc-tls.c: Likewise. * sysdeps/ieee754/ldbl-128/printf_fphex.c: Likewise. * sysdeps/m68k/ffs.c: Likewise. * sysdeps/mach/hurd/getdents.c: Likewise. * sysdeps/mach/hurd/init-posix.c: Likewise. * sysdeps/mach/msync.c: Likewise. * sysdeps/mips/libc-tls.c: Likewise. * sysdeps/posix/profil.c: Likewise. * sysdeps/posix/shm_open.c: Likewise. * sysdeps/posix/shm_unlink.c: Likewise. * sysdeps/posix/sprofil.c: Likewise. * sysdeps/rs6000/ffs.c: Likewise. * sysdeps/s390/libc-tls.c: Likewise. * sysdeps/unix/sysv/linux/aio_sigqueue.c: Likewise. * sysdeps/unix/sysv/linux/alpha/glob.c: Likewise. * sysdeps/unix/sysv/linux/alpha/wordexp.c: Likewise. * sysdeps/unix/sysv/linux/ftruncate64.c: Likewise. * sysdeps/unix/sysv/linux/gai_sigqueue.c: Likewise. * sysdeps/unix/sysv/linux/i386/getmsg.c: Likewise. * sysdeps/unix/sysv/linux/i386/getresgid.c: Likewise. * sysdeps/unix/sysv/linux/i386/getresuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/lchown.c: Likewise. * sysdeps/unix/sysv/linux/i386/putmsg.c: Likewise. * sysdeps/unix/sysv/linux/i386/readelflib.c: Likewise. * sysdeps/unix/sysv/linux/i386/setresgid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setresuid.c: Likewise. * sysdeps/unix/sysv/linux/ia64/readelflib.c: Likewise. * sysdeps/unix/sysv/linux/mips/ftruncate64.c: Likewise. * sysdeps/unix/sysv/linux/mips/readelflib.c: Likewise. * sysdeps/unix/sysv/linux/mips/truncate64.c: Likewise. * sysdeps/unix/sysv/linux/mq_close.c: Likewise. * sysdeps/unix/sysv/linux/mq_getattr.c: Likewise. * sysdeps/unix/sysv/linux/mq_notify.c: Likewise. * sysdeps/unix/sysv/linux/mq_open.c: Likewise. * sysdeps/unix/sysv/linux/mq_receive.c: Likewise. * sysdeps/unix/sysv/linux/mq_send.c: Likewise. * sysdeps/unix/sysv/linux/mq_unlink.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/ftruncate64.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/truncate64.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/readelflib.c: Likewise. * sysdeps/unix/sysv/linux/s390/readelflib.c: Likewise. * sysdeps/unix/sysv/linux/sched_getaffinity.c: Likewise. * sysdeps/unix/sysv/linux/sched_setaffinity.c: Likewise. * sysdeps/unix/sysv/linux/sigqueue.c: Likewise. * sysdeps/unix/sysv/linux/sigstack.c: Likewise. * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. * sysdeps/unix/sysv/linux/sparc/readelflib.c: Likewise. * sysdeps/unix/sysv/linux/truncate64.c: Likewise. * sysdeps/unix/sysv/linux/vfork.c: Likewise. * sysdeps/unix/sysv/linux/x86_64/readelflib.c: Likewise. --- sysdeps/alpha/fpu/s_cacosf.c | 4 ++-- sysdeps/alpha/fpu/s_cacoshf.c | 4 ++-- sysdeps/alpha/fpu/s_casinf.c | 4 ++-- sysdeps/alpha/fpu/s_casinhf.c | 4 ++-- sysdeps/alpha/fpu/s_catanf.c | 4 ++-- sysdeps/alpha/fpu/s_catanhf.c | 4 ++-- sysdeps/alpha/fpu/s_ccosf.c | 4 ++-- sysdeps/alpha/fpu/s_ccoshf.c | 4 ++-- sysdeps/alpha/fpu/s_cexpf.c | 4 ++-- sysdeps/alpha/fpu/s_clog10f.c | 4 ++-- sysdeps/alpha/fpu/s_clogf.c | 4 ++-- sysdeps/alpha/fpu/s_cpowf.c | 4 ++-- sysdeps/alpha/fpu/s_cprojf.c | 4 ++-- sysdeps/alpha/fpu/s_csinf.c | 4 ++-- sysdeps/alpha/fpu/s_csinhf.c | 4 ++-- sysdeps/alpha/fpu/s_csqrtf.c | 4 ++-- sysdeps/alpha/fpu/s_ctanf.c | 4 ++-- sysdeps/alpha/fpu/s_ctanhf.c | 4 ++-- sysdeps/alpha/libc-tls.c | 4 ++-- sysdeps/m68k/ffs.c | 4 ++-- sysdeps/mips/libc-tls.c | 2 +- sysdeps/rs6000/ffs.c | 4 ++-- sysdeps/unix/sysv/linux/alpha/glob.c | 4 ++-- sysdeps/unix/sysv/linux/alpha/wordexp.c | 4 ++-- sysdeps/unix/sysv/linux/mips/ftruncate64.c | 4 ++-- sysdeps/unix/sysv/linux/mips/readelflib.c | 6 +++--- sysdeps/unix/sysv/linux/mips/truncate64.c | 4 ++-- 27 files changed, 54 insertions(+), 54 deletions(-) diff --git a/sysdeps/alpha/fpu/s_cacosf.c b/sysdeps/alpha/fpu/s_cacosf.c index 20e67f4ac9..46dca5aeb8 100644 --- a/sysdeps/alpha/fpu/s_cacosf.c +++ b/sysdeps/alpha/fpu/s_cacosf.c @@ -1,5 +1,5 @@ /* Return arc cosine of complex float value. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 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 @@ -29,7 +29,7 @@ static _Complex float internal_cacosf (_Complex float x); -#include +#include #include "cfloat-compat.h" #undef __cacosf diff --git a/sysdeps/alpha/fpu/s_cacoshf.c b/sysdeps/alpha/fpu/s_cacoshf.c index 86cb4fbcaa..6b61d1ddaa 100644 --- a/sysdeps/alpha/fpu/s_cacoshf.c +++ b/sysdeps/alpha/fpu/s_cacoshf.c @@ -1,5 +1,5 @@ /* Return arc hyperbole cosine of complex float value. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 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 @@ -29,7 +29,7 @@ static _Complex float internal_cacoshf (_Complex float x); -#include +#include #include "cfloat-compat.h" #undef __cacoshf diff --git a/sysdeps/alpha/fpu/s_casinf.c b/sysdeps/alpha/fpu/s_casinf.c index 3d0d4eadf2..fd41042ec9 100644 --- a/sysdeps/alpha/fpu/s_casinf.c +++ b/sysdeps/alpha/fpu/s_casinf.c @@ -1,5 +1,5 @@ /* Return arc sine of complex float value. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 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 @@ -29,7 +29,7 @@ static _Complex float internal_casinf (_Complex float x); -#include +#include #include "cfloat-compat.h" #undef __casinf diff --git a/sysdeps/alpha/fpu/s_casinhf.c b/sysdeps/alpha/fpu/s_casinhf.c index 698ce10c04..0b72a24d5a 100644 --- a/sysdeps/alpha/fpu/s_casinhf.c +++ b/sysdeps/alpha/fpu/s_casinhf.c @@ -1,5 +1,5 @@ /* Return arc hyperbole sine of complex float value. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 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 @@ -29,7 +29,7 @@ static _Complex float internal_casinhf (_Complex float x); -#include +#include #include "cfloat-compat.h" #undef __casinhf diff --git a/sysdeps/alpha/fpu/s_catanf.c b/sysdeps/alpha/fpu/s_catanf.c index 221a461c1b..8f40616617 100644 --- a/sysdeps/alpha/fpu/s_catanf.c +++ b/sysdeps/alpha/fpu/s_catanf.c @@ -1,5 +1,5 @@ /* Return arc tangent of complex float value. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 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 @@ -29,7 +29,7 @@ static _Complex float internal_catanf (_Complex float x); -#include +#include #include "cfloat-compat.h" #undef __catanf diff --git a/sysdeps/alpha/fpu/s_catanhf.c b/sysdeps/alpha/fpu/s_catanhf.c index 7465a43cac..ac11945727 100644 --- a/sysdeps/alpha/fpu/s_catanhf.c +++ b/sysdeps/alpha/fpu/s_catanhf.c @@ -1,5 +1,5 @@ /* Return arc hyperbole tangent of complex float value. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 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 @@ -29,7 +29,7 @@ static _Complex float internal_catanhf (_Complex float x); -#include +#include #include "cfloat-compat.h" #undef __catanhf diff --git a/sysdeps/alpha/fpu/s_ccosf.c b/sysdeps/alpha/fpu/s_ccosf.c index fd775903f0..04036f4613 100644 --- a/sysdeps/alpha/fpu/s_ccosf.c +++ b/sysdeps/alpha/fpu/s_ccosf.c @@ -1,5 +1,5 @@ /* Return cosine of complex float value. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 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 @@ -29,7 +29,7 @@ static _Complex float internal_ccosf (_Complex float x); -#include +#include #include "cfloat-compat.h" #undef __ccosf diff --git a/sysdeps/alpha/fpu/s_ccoshf.c b/sysdeps/alpha/fpu/s_ccoshf.c index 0e8eab288f..e9fb34ce47 100644 --- a/sysdeps/alpha/fpu/s_ccoshf.c +++ b/sysdeps/alpha/fpu/s_ccoshf.c @@ -1,5 +1,5 @@ /* Return hyperbole cosine of complex float value. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 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 @@ -29,7 +29,7 @@ static _Complex float internal_ccoshf (_Complex float x); -#include +#include #include "cfloat-compat.h" #undef __ccoshf diff --git a/sysdeps/alpha/fpu/s_cexpf.c b/sysdeps/alpha/fpu/s_cexpf.c index 2cf6db4b55..4a28dcd9bf 100644 --- a/sysdeps/alpha/fpu/s_cexpf.c +++ b/sysdeps/alpha/fpu/s_cexpf.c @@ -1,5 +1,5 @@ /* Return exponent of complex float value. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 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 @@ -29,7 +29,7 @@ static _Complex float internal_cexpf (_Complex float x); -#include +#include #include "cfloat-compat.h" #undef __cexpf diff --git a/sysdeps/alpha/fpu/s_clog10f.c b/sysdeps/alpha/fpu/s_clog10f.c index 12ecdea957..e7dc7bb23f 100644 --- a/sysdeps/alpha/fpu/s_clog10f.c +++ b/sysdeps/alpha/fpu/s_clog10f.c @@ -1,5 +1,5 @@ /* Return base 10 logarithm of complex float value. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 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 @@ -29,7 +29,7 @@ static _Complex float internal_clog10f (_Complex float x); -#include +#include #include "cfloat-compat.h" #undef __clog10f diff --git a/sysdeps/alpha/fpu/s_clogf.c b/sysdeps/alpha/fpu/s_clogf.c index 9eefe9fa30..364dcec883 100644 --- a/sysdeps/alpha/fpu/s_clogf.c +++ b/sysdeps/alpha/fpu/s_clogf.c @@ -1,5 +1,5 @@ /* Return natural logarithm of complex float value. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 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 @@ -29,7 +29,7 @@ static _Complex float internal_clogf (_Complex float x); -#include +#include #include "cfloat-compat.h" #undef __clogf diff --git a/sysdeps/alpha/fpu/s_cpowf.c b/sysdeps/alpha/fpu/s_cpowf.c index f4cb3547f6..cc61b1895e 100644 --- a/sysdeps/alpha/fpu/s_cpowf.c +++ b/sysdeps/alpha/fpu/s_cpowf.c @@ -1,5 +1,5 @@ /* Return power of complex float value. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 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 @@ -29,7 +29,7 @@ static _Complex float internal_cpowf (_Complex float x, _Complex float c); -#include +#include #include "cfloat-compat.h" #undef __cpowf diff --git a/sysdeps/alpha/fpu/s_cprojf.c b/sysdeps/alpha/fpu/s_cprojf.c index eac8687707..5cfb526679 100644 --- a/sysdeps/alpha/fpu/s_cprojf.c +++ b/sysdeps/alpha/fpu/s_cprojf.c @@ -1,5 +1,5 @@ /* Return projection of complex float value to Riemann sphere. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 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 @@ -29,7 +29,7 @@ static _Complex float internal_cprojf (_Complex float x); -#include +#include #include "cfloat-compat.h" #undef __cprojf diff --git a/sysdeps/alpha/fpu/s_csinf.c b/sysdeps/alpha/fpu/s_csinf.c index eba70e9930..8eb9a1019d 100644 --- a/sysdeps/alpha/fpu/s_csinf.c +++ b/sysdeps/alpha/fpu/s_csinf.c @@ -1,5 +1,5 @@ /* Return sine of complex float value. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 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 @@ -29,7 +29,7 @@ static _Complex float internal_csinf (_Complex float x); -#include +#include #include "cfloat-compat.h" #undef __csinf diff --git a/sysdeps/alpha/fpu/s_csinhf.c b/sysdeps/alpha/fpu/s_csinhf.c index 9db81a81e4..0e2c186740 100644 --- a/sysdeps/alpha/fpu/s_csinhf.c +++ b/sysdeps/alpha/fpu/s_csinhf.c @@ -1,5 +1,5 @@ /* Return hyperbole sine of complex float value. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 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 @@ -29,7 +29,7 @@ static _Complex float internal_csinhf (_Complex float x); -#include +#include #include "cfloat-compat.h" #undef __csinhf diff --git a/sysdeps/alpha/fpu/s_csqrtf.c b/sysdeps/alpha/fpu/s_csqrtf.c index cc4a8e0245..ebf23a828e 100644 --- a/sysdeps/alpha/fpu/s_csqrtf.c +++ b/sysdeps/alpha/fpu/s_csqrtf.c @@ -1,5 +1,5 @@ /* Return square root of complex float value. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 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 @@ -29,7 +29,7 @@ static _Complex float internal_csqrtf (_Complex float x); -#include +#include #include "cfloat-compat.h" #undef __csqrtf diff --git a/sysdeps/alpha/fpu/s_ctanf.c b/sysdeps/alpha/fpu/s_ctanf.c index 843ee53717..e26db963e4 100644 --- a/sysdeps/alpha/fpu/s_ctanf.c +++ b/sysdeps/alpha/fpu/s_ctanf.c @@ -1,5 +1,5 @@ /* Return tangent of complex float value. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 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 @@ -29,7 +29,7 @@ static _Complex float internal_ctanf (_Complex float x); -#include +#include #include "cfloat-compat.h" #undef __ctanf diff --git a/sysdeps/alpha/fpu/s_ctanhf.c b/sysdeps/alpha/fpu/s_ctanhf.c index f1f74ab12d..5d047bd460 100644 --- a/sysdeps/alpha/fpu/s_ctanhf.c +++ b/sysdeps/alpha/fpu/s_ctanhf.c @@ -1,5 +1,5 @@ /* Return hyperbole tangent of complex float value. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 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 @@ -29,7 +29,7 @@ static _Complex float internal_ctanhf (_Complex float x); -#include +#include #include "cfloat-compat.h" #undef __ctanhf diff --git a/sysdeps/alpha/libc-tls.c b/sysdeps/alpha/libc-tls.c index a3b68e928f..84e9bec4eb 100644 --- a/sysdeps/alpha/libc-tls.c +++ b/sysdeps/alpha/libc-tls.c @@ -1,5 +1,5 @@ /* Thread-local storage handling in the ELF dynamic linker. Alpha version. - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 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 @@ -17,7 +17,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include +#include #include #if USE_TLS diff --git a/sysdeps/m68k/ffs.c b/sysdeps/m68k/ffs.c index 189936b94f..2032e8662c 100644 --- a/sysdeps/m68k/ffs.c +++ b/sysdeps/m68k/ffs.c @@ -1,7 +1,7 @@ /* ffs -- find first set bit in a word, counted from least significant end. For mc68020, mc68030, mc68040. This file is part of the GNU C Library. - Copyright (C) 1991, 1992, 1997, 1998, 2004 Free Software Foundation, Inc. + Copyright (C) 1991, 1992, 1997, 1998, 2004, 2005 Free Software Foundation, Inc. Contributed by Torbjorn Granlund (tege@sics.se). The GNU C Library is free software; you can redistribute it and/or @@ -43,6 +43,6 @@ weak_alias (__ffs, ffsl) #else -#include +#include #endif diff --git a/sysdeps/mips/libc-tls.c b/sysdeps/mips/libc-tls.c index 157ba3389a..a3d6301d1d 100644 --- a/sysdeps/mips/libc-tls.c +++ b/sysdeps/mips/libc-tls.c @@ -17,7 +17,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include +#include #include #if USE_TLS diff --git a/sysdeps/rs6000/ffs.c b/sysdeps/rs6000/ffs.c index 4d01727044..619412cb50 100644 --- a/sysdeps/rs6000/ffs.c +++ b/sysdeps/rs6000/ffs.c @@ -1,6 +1,6 @@ /* ffs -- find first set bit in a word, counted from least significant end. For IBM rs6000. - Copyright (C) 1991, 1992, 1997, 2004 Free Software Foundation, Inc. + Copyright (C) 1991, 1992, 1997, 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Torbjorn Granlund (tege@sics.se). @@ -38,5 +38,5 @@ weak_alias (__ffs, ffs) libc_hidden_builtin_def (ffs) #else -#include +#include #endif diff --git a/sysdeps/unix/sysv/linux/alpha/glob.c b/sysdeps/unix/sysv/linux/alpha/glob.c index a51020d51f..84573899d6 100644 --- a/sysdeps/unix/sysv/linux/alpha/glob.c +++ b/sysdeps/unix/sysv/linux/alpha/glob.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2000, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2000, 2002, 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 @@ -35,7 +35,7 @@ extern int __new_glob (const char *__pattern, int __flags, glob_t *__pglob); extern void __new_globfree (glob_t *__pglob); -#include +#include #undef glob #undef globfree diff --git a/sysdeps/unix/sysv/linux/alpha/wordexp.c b/sysdeps/unix/sysv/linux/alpha/wordexp.c index 1921a03388..c2972e40c2 100644 --- a/sysdeps/unix/sysv/linux/alpha/wordexp.c +++ b/sysdeps/unix/sysv/linux/alpha/wordexp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2004, 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 @@ -22,7 +22,7 @@ #define wordexp(words, pwordexp, flags) \ __new_wordexp (words, pwordexp, flags) -#include +#include versioned_symbol (libc, __new_wordexp, wordexp, GLIBC_2_2_2); diff --git a/sysdeps/unix/sysv/linux/mips/ftruncate64.c b/sysdeps/unix/sysv/linux/mips/ftruncate64.c index cdb2d56840..11e242570d 100644 --- a/sysdeps/unix/sysv/linux/mips/ftruncate64.c +++ b/sysdeps/unix/sysv/linux/mips/ftruncate64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 +/* Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -72,5 +72,5 @@ weak_alias (__ftruncate64, ftruncate64) #else /* Use the generic implementation. */ -# include +# include #endif diff --git a/sysdeps/unix/sysv/linux/mips/readelflib.c b/sysdeps/unix/sysv/linux/mips/readelflib.c index 73fd43f46f..baa92fe57c 100644 --- a/sysdeps/unix/sysv/linux/mips/readelflib.c +++ b/sysdeps/unix/sysv/linux/mips/readelflib.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2001, 2002, 2003, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Alexandre Oliva Based on work ../x86_64/readelflib.c, @@ -62,10 +62,10 @@ process_elf_file (const char *file_name, const char *lib, int *flag, #undef process_elf_file #define process_elf_file process_elf32_file #define __ELF_NATIVE_CLASS 32 -#include "sysdeps/generic/readelflib.c" +#include "elf/readelflib.c" #undef __ELF_NATIVE_CLASS #undef process_elf_file #define process_elf_file process_elf64_file #define __ELF_NATIVE_CLASS 64 -#include "sysdeps/generic/readelflib.c" +#include "elf/readelflib.c" diff --git a/sysdeps/unix/sysv/linux/mips/truncate64.c b/sysdeps/unix/sysv/linux/mips/truncate64.c index e955f18ea3..d01d25b077 100644 --- a/sysdeps/unix/sysv/linux/mips/truncate64.c +++ b/sysdeps/unix/sysv/linux/mips/truncate64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003 +/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -72,5 +72,5 @@ truncate64 (const char *path, off64_t length) #else /* Use the generic implementation. */ -# include +# include #endif From c7d0379e45d11a7bc0c613d2c083fea7d4e955e0 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sun, 18 Dec 2005 22:47:08 +0000 Subject: [PATCH 3493/4487] * sysdeps/alpha/libc-tls.c: Fix directory on include of base file. --- sysdeps/alpha/libc-tls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/alpha/libc-tls.c b/sysdeps/alpha/libc-tls.c index 84e9bec4eb..24629e9aca 100644 --- a/sysdeps/alpha/libc-tls.c +++ b/sysdeps/alpha/libc-tls.c @@ -17,7 +17,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include +#include #include #if USE_TLS From 8ec1c6e238acc66e11bf9c110a1e2389e28990bc Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 21 Dec 2005 22:16:21 +0000 Subject: [PATCH 3494/4487] 2005-12-21 Roland McGrath * elf/cache.c: Use <> rather than "" #includes. * elf/chroot_canon.c: Likewise. * elf/dl-lookup.c: Likewise. * elf/ldconfig.c: Likewise. * elf/readlib.c: Likewise. * elf/rtld.c: Likewise. * gmon/mcount.c: Likewise. * hurd/hurdfault.c: Likewise. * hurd/hurdsig.c: Likewise. * hurd/report-wait.c: Likewise. * hurd/sigunwind.c: Likewise. * mach/setup-thread.c: Likewise. * rt/aio_read64.c: Likewise. * rt/aio_sigqueue.c: Likewise. * rt/aio_write64.c: Likewise. * soft-fp/soft-fp.h: Likewise. * stdio-common/tmpfile64.c: Likewise. * sysdeps/mach/hurd/fork.c: Likewise. * sysdeps/mach/hurd/hppa/trampoline.c: Likewise. * sysdeps/mach/hurd/i386/trampoline.c: Likewise. * sysdeps/mach/hurd/mips/trampoline.c: Likewise. * sysdeps/mach/hurd/powerpc/trampoline.c: Likewise. * sysdeps/posix/sprofil.c: Likewise. * sysdeps/pthread/aio_cancel.c: Likewise. * sysdeps/pthread/aio_fsync.c: Likewise. * sysdeps/pthread/aio_read64.c: Likewise. * sysdeps/pthread/aio_read.c: Likewise. * sysdeps/pthread/aio_suspend.c: Likewise. * sysdeps/pthread/aio_write64.c: Likewise. * sysdeps/pthread/aio_write.c: Likewise. * sysdeps/pthread/lio_listio64.c: Likewise. * sysdeps/pthread/lio_listio.c: Likewise. * sysdeps/unix/sysv/linux/aio_sigqueue.c: Likewise. * sysdeps/unix/sysv/tcflow.c: Likewise. --- sysdeps/mach/hurd/hppa/trampoline.c | 4 ++-- sysdeps/mach/hurd/mips/trampoline.c | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sysdeps/mach/hurd/hppa/trampoline.c b/sysdeps/mach/hurd/hppa/trampoline.c index bbb5b960ac..fc811c5e7b 100644 --- a/sysdeps/mach/hurd/hppa/trampoline.c +++ b/sysdeps/mach/hurd/hppa/trampoline.c @@ -1,5 +1,5 @@ /* Set thread_state for sighandler, and sigcontext to recover. HPPA version. - Copyright (C) 1995, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1995, 1997, 1998, 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 @@ -18,7 +18,7 @@ 02111-1307 USA. */ #include -#include "thread_state.h" +#include #include #include #include "hurdfault.h" diff --git a/sysdeps/mach/hurd/mips/trampoline.c b/sysdeps/mach/hurd/mips/trampoline.c index dd42dfc1c6..34e363b1aa 100644 --- a/sysdeps/mach/hurd/mips/trampoline.c +++ b/sysdeps/mach/hurd/mips/trampoline.c @@ -1,5 +1,5 @@ /* Set thread_state for sighandler, and sigcontext to recover. MIPS version. - Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 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 @@ -19,11 +19,11 @@ #include #include -#include "thread_state.h" +#include #include #include #include "hurdfault.h" -#include "intr-msg.h" +#include struct sigcontext * @@ -35,7 +35,7 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, __label__ trampoline, rpc_wait_trampoline, firewall; void *volatile sigsp; struct sigcontext *scp; - struct + struct { int signo; long int sigcode; @@ -163,7 +163,7 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, still waiting for a reply. We will have it run the special trampoline code which retries the message receive before running the signal handler. - + To do this we change the OPTION argument in its registers to enable only message reception, since the request message has already been sent. */ From ee8aaccf260a7e8ce75e237b5228ff85c44906df Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 27 Dec 2005 15:08:35 +0000 Subject: [PATCH 3495/4487] Add __next and __prev field to pthread_mutex_t. --- sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h index 86b47037e4..50049376b0 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h @@ -45,7 +45,7 @@ typedef union /* Data structures for mutex handling. The structure of the attribute type is deliberately not exposed. */ -typedef union +typedef union __pthread_mutex_u { struct { @@ -57,6 +57,9 @@ typedef union binary compatibility. */ int __kind; int __spins; + union __pthread_mutex_u *__next; + union __pthread_mutex_u *__prev; +#define __PTHREAD_MUTEX_HAVE_PREV 1 } __data; char __size[__SIZEOF_PTHREAD_MUTEX_T]; long int __align; From 112ae4478bee6166974542ed7df6959db6d988ad Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 27 Dec 2005 15:21:33 +0000 Subject: [PATCH 3496/4487] dd new errlist-compat entry for up to 138 errnos. --- sysdeps/unix/sysv/linux/alpha/Versions | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/Versions b/sysdeps/unix/sysv/linux/alpha/Versions index ca79c7e444..8709dd2a38 100644 --- a/sysdeps/unix/sysv/linux/alpha/Versions +++ b/sysdeps/unix/sysv/linux/alpha/Versions @@ -73,6 +73,10 @@ libc { #errlist-compat 132 _sys_errlist; sys_errlist; _sys_nerr; sys_nerr; } + GLIBC_2.4 { + #errlist-compat 138 + _sys_errlist; sys_errlist; _sys_nerr; sys_nerr; + } GLIBC_PRIVATE { __libc_alpha_cache_shape; } From 7951fa108f8e3c2885604b32e1cee273ff0479ea Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 27 Dec 2005 15:23:06 +0000 Subject: [PATCH 3497/4487] Define EOWNERDEAD and ENOTRECOVERABLE if not already defined. --- sysdeps/unix/sysv/linux/alpha/bits/errno.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/errno.h b/sysdeps/unix/sysv/linux/alpha/bits/errno.h index 9cdc167bf7..8b2f152a1c 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/errno.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/errno.h @@ -1,5 +1,5 @@ /* Error constants. Linux/Alpha specific version. - Copyright (C) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc. + Copyright (C) 1996,1997,1998,1999,2002,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 @@ -31,6 +31,12 @@ # define ECANCELED 131 # endif +/* Support for error codes to support robust mutexes was added later, too. */ +# ifndef EOWNERDEAD +# define EOWNERDEAD 136 +# define ENOTRECOVERABLE 137 +# endif + # ifndef __ASSEMBLER__ /* Function to get address of global `errno' variable. */ extern int *__errno_location (void) __THROW __attribute__ ((__const__)); From 52abb5ce242502ec54edd095b429c88d3c0d9a3c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 28 Dec 2005 05:41:16 +0000 Subject: [PATCH 3498/4487] 2005-12-27 Roland McGrath * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function. (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison. * sysdeps/alpha/jmpbuf-unwind.h: Likewise. * sysdeps/i386/jmpbuf-unwind.h: Likewise. * sysdeps/mips/jmpbuf-unwind.h: Likewise. * sysdeps/powerpc/jmpbuf-unwind.h: Likewise. * sysdeps/s390/jmpbuf-unwind.h: Likewise. * sysdeps/sh/jmpbuf-unwind.h: Likewise. * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise. * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise. * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise. --- sysdeps/alpha/nptl/jmpbuf-unwind.h | 15 +++++++++++++-- sysdeps/mips/nptl/jmpbuf-unwind.h | 13 ++++++++++++- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/sysdeps/alpha/nptl/jmpbuf-unwind.h b/sysdeps/alpha/nptl/jmpbuf-unwind.h index 5cef8b1cf5..83b7a01a0e 100644 --- a/sysdeps/alpha/nptl/jmpbuf-unwind.h +++ b/sysdeps/alpha/nptl/jmpbuf-unwind.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek , 2003. @@ -20,12 +20,23 @@ #include #include #include +#include #define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \ _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj) +static inline uintptr_t __attribute__ ((unused)) +_jmpbuf_sp (__jmp_buf regs) +{ + uintptr_t sp = regs[JB_SP]; +#ifdef PTR_DEMANGLE + PTR_DEMANGLE (sp); +#endif + return sp; +} + #define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \ - ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_SP] - (_adj)) + ((uintptr_t) (_address) - (_adj) < _jmpbuf_sp (_jmpbuf) - (_adj)) /* We use the normal lobngjmp for unwinding. */ #define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val) diff --git a/sysdeps/mips/nptl/jmpbuf-unwind.h b/sysdeps/mips/nptl/jmpbuf-unwind.h index 67cc969663..9ee03100e6 100644 --- a/sysdeps/mips/nptl/jmpbuf-unwind.h +++ b/sysdeps/mips/nptl/jmpbuf-unwind.h @@ -19,12 +19,23 @@ #include #include #include +#include #define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \ _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj) +static inline uintptr_t __attribute__ ((unused)) +_jmpbuf_sp (__jmp_buf regs) +{ + uintptr_t sp = regs[0].__sp; +#ifdef PTR_DEMANGLE + PTR_DEMANGLE (sp); +#endif + return sp; +} + #define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \ - ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[0].__sp - (_adj)) + ((uintptr_t) (_address) - (_adj) < _jmpbuf_sp (_jmpbuf) - (_adj)) /* We use the normal longjmp for unwinding. */ #define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val) From bdbd93b5efefcade9d161cb6b21a1845f5e1fc8d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 28 Dec 2005 05:41:36 +0000 Subject: [PATCH 3499/4487] 2005-12-27 Roland McGrath * sysdeps/alpha/bits/setjmp.h (_JMPBUF_UNWINDS): Take third argument DEMANGLE, and pass SP value through it. * sysdeps/hppa/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise. * sysdeps/i386/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise. * sysdeps/m68k/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise. * sysdeps/mips/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise. * sysdeps/powerpc/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise. * sysdeps/s390/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise. * sysdeps/sh/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise. * sysdeps/sparc/sparc32/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise. * sysdeps/unix/sysv/linux/ia64/bits/setjmp.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/setjmp.h: Likewise. * sysdeps/x86_64/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise. * hurd/sigunwind.c (_hurdsig_longjmp_from_handler): Pass inline demangler function to _JMPBUF_UNWINDS. * sysdeps/mach/hurd/jmp-unwind.c (demangle_ptr): New function. (_longjmp_unwind): Pass it to _JMPBUF_UNWINDS. --- sysdeps/alpha/bits/setjmp.h | 6 +++--- sysdeps/hppa/bits/setjmp.h | 7 ++++--- sysdeps/m68k/bits/setjmp.h | 6 +++--- sysdeps/mips/bits/setjmp.h | 4 ++-- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/sysdeps/alpha/bits/setjmp.h b/sysdeps/alpha/bits/setjmp.h index c603a35554..71b7738c37 100644 --- a/sysdeps/alpha/bits/setjmp.h +++ b/sysdeps/alpha/bits/setjmp.h @@ -1,5 +1,5 @@ /* Define the machine-dependent type `jmp_buf'. Alpha version. - Copyright (C) 1992, 1997, 2003 Free Software Foundation, Inc. + Copyright (C) 1992, 1997, 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 @@ -80,8 +80,8 @@ typedef long int __jmp_buf[17]; /* Test if longjmp to JMPBUF would unwind the frame containing a local variable at ADDRESS. */ -#define _JMPBUF_UNWINDS(_jmpbuf, _address) \ - ((void *)(_address) < (void *)((_jmpbuf)[JB_SP])) +#define _JMPBUF_UNWINDS(_jmpbuf, _address, _demangle) \ + ((void *)(_address) < (void *) _demangle ((_jmpbuf)[JB_SP])) #endif #endif /* bits/setjmp.h */ diff --git a/sysdeps/hppa/bits/setjmp.h b/sysdeps/hppa/bits/setjmp.h index 4395b8f562..07ea01eb97 100644 --- a/sysdeps/hppa/bits/setjmp.h +++ b/sysdeps/hppa/bits/setjmp.h @@ -1,4 +1,4 @@ -/* 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 @@ -39,7 +39,8 @@ typedef double __jmp_buf[21]; /* Test if longjmp to JMPBUF would unwind the frame containing a local variable at ADDRESS. */ -#define _JMPBUF_UNWINDS(_jmpbuf, _address) \ - ((void *)(_address) > (void *)(((unsigned long *) _jmpbuf)[JB_SP])) +#define _JMPBUF_UNWINDS(_jmpbuf, _address, _demangle) \ + ((void *) (_address) > \ + (void *) _demangle ((((unsigned long *) _jmpbuf)[JB_SP]))) #endif /* bits/setjmp.h */ diff --git a/sysdeps/m68k/bits/setjmp.h b/sysdeps/m68k/bits/setjmp.h index 193eec3509..612582af26 100644 --- a/sysdeps/m68k/bits/setjmp.h +++ b/sysdeps/m68k/bits/setjmp.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 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 @@ -44,7 +44,7 @@ typedef struct /* Test if longjmp to JMPBUF would unwind the frame containing a local variable at ADDRESS. */ -#define _JMPBUF_UNWINDS(jmpbuf, address) \ - ((void *) (address) < (void *) (jmpbuf)->__sp) +#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \ + ((void *) (address) < (void *) demangle ((jmpbuf)->__sp)) #endif /* bits/setjmp.h */ diff --git a/sysdeps/mips/bits/setjmp.h b/sysdeps/mips/bits/setjmp.h index 74caae8cba..5f7c82b864 100644 --- a/sysdeps/mips/bits/setjmp.h +++ b/sysdeps/mips/bits/setjmp.h @@ -80,7 +80,7 @@ typedef struct /* Test if longjmp to JMPBUF would unwind the frame containing a local variable at ADDRESS. */ -#define _JMPBUF_UNWINDS(jmpbuf, address) \ - ((void *) (address) < (void *) (jmpbuf)[0].__sp) +#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \ + ((void *) (address) < (void *) demangle ((jmpbuf)[0].__sp)) #endif /* _MIPS_BITS_SETJMP_H */ From c54e1e52db481bae2178f5e306f1eceb2fe18e4a Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 28 Dec 2005 05:43:52 +0000 Subject: [PATCH 3500/4487] 2005-12-27 Roland McGrath * sysdeps/unix/sysv/aix/bits/setjmp.h (_JMPBUF_UNWINDS): Take third argument DEMANGLE, and pass SP value through it. --- sysdeps/unix/sysv/aix/bits/setjmp.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/aix/bits/setjmp.h b/sysdeps/unix/sysv/aix/bits/setjmp.h index 82a58ae069..c7a736bc38 100644 --- a/sysdeps/unix/sysv/aix/bits/setjmp.h +++ b/sysdeps/unix/sysv/aix/bits/setjmp.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999, 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 @@ -42,5 +42,5 @@ typedef long int __jmp_buf[64]; /* Test if longjmp to JMPBUF would unwind the frame containing a local variable at ADDRESS. */ -#define _JMPBUF_UNWINDS(jmpbuf, address) \ - ((void *) (address) < (void *) (jmpbuf)[JB_GPR1]) +#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \ + ((void *) (address) < (void *) demangle ((jmpbuf)[JB_GPR1])) From 0a0cc660126b9eb490c3a63d477e61b4ab36d3d4 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 28 Dec 2005 05:44:02 +0000 Subject: [PATCH 3501/4487] 2005-12-27 Roland McGrath * sysdeps/am33/bits/setjmp.h (_JMPBUF_UNWINDS): Take third argument DEMANGLE, and pass SP value through it. --- sysdeps/am33/bits/setjmp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/am33/bits/setjmp.h b/sysdeps/am33/bits/setjmp.h index 5864b92e64..879ecb6b73 100644 --- a/sysdeps/am33/bits/setjmp.h +++ b/sysdeps/am33/bits/setjmp.h @@ -30,5 +30,5 @@ typedef int __jmp_buf[26]; /* Test if longjmp to JMPBUF would unwind the frame containing a local variable at ADDRESS. */ -#define _JMPBUF_UNWINDS(jmpbuf, address) \ - ((void *) (address) < (void *) (jmpbuf[__JMP_BUF_SP])) +#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \ + ((void *) (address) < (void *) demangle (jmpbuf[__JMP_BUF_SP])) From 4a35566071ced0925cac62b694cb106fe76d7d87 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 28 Dec 2005 05:44:53 +0000 Subject: [PATCH 3502/4487] 2005-12-27 Roland McGrath * sysdeps/cris/bits/setjmp.h (_JMPBUF_UNWINDS): Take third argument DEMANGLE, and pass SP value through it. --- sysdeps/cris/bits/setjmp.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/cris/bits/setjmp.h b/sysdeps/cris/bits/setjmp.h index 0d7825bc86..fa62a85deb 100644 --- a/sysdeps/cris/bits/setjmp.h +++ b/sysdeps/cris/bits/setjmp.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 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 @@ -50,5 +50,5 @@ typedef unsigned long int __jmp_buf[18]; /* Test if longjmp to JMPBUF would unwind the frame containing a local variable at ADDRESS. */ -#define _JMPBUF_UNWINDS(jmpbuf, address) \ - ((unsigned long int) (address) < (jmpbuf)[JB_SP]) +#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \ + ((unsigned long int) (address) < demangle ((jmpbuf)[JB_SP])) From 9260afa563c464c70d8ed6c4178f2b69270168ac Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 28 Dec 2005 05:46:16 +0000 Subject: [PATCH 3503/4487] 2005-12-15 Roland McGrath * sysdeps/arm/libc-tls.c: Use csu/ instead of sysdeps/generic/. --- sysdeps/arm/libc-tls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/arm/libc-tls.c b/sysdeps/arm/libc-tls.c index 53c2923251..affb1899ed 100644 --- a/sysdeps/arm/libc-tls.c +++ b/sysdeps/arm/libc-tls.c @@ -17,7 +17,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include +#include #include #if USE_TLS From e5263067562a004273a7349532cf490dd2b2802c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 28 Dec 2005 05:46:19 +0000 Subject: [PATCH 3504/4487] 2005-12-27 Roland McGrath * sysdeps/arm/eabi/bits/setjmp.h (_JMPBUF_UNWINDS): Take third argument DEMANGLE, and pass SP value through it. * sysdeps/arm/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise. * sysdeps/arm/fpu/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise. --- sysdeps/arm/bits/setjmp.h | 4 ++-- sysdeps/arm/eabi/bits/setjmp.h | 6 +++--- sysdeps/arm/fpu/bits/setjmp.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sysdeps/arm/bits/setjmp.h b/sysdeps/arm/bits/setjmp.h index 9b74906791..4eb237a38f 100644 --- a/sysdeps/arm/bits/setjmp.h +++ b/sysdeps/arm/bits/setjmp.h @@ -35,7 +35,7 @@ typedef int __jmp_buf[10]; /* Test if longjmp to JMPBUF would unwind the frame containing a local variable at ADDRESS. */ -#define _JMPBUF_UNWINDS(jmpbuf, address) \ - ((void *) (address) < (void *) (jmpbuf[__JMP_BUF_SP])) +#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \ + ((void *) (address) < (void *) demangle (jmpbuf[__JMP_BUF_SP])) #endif diff --git a/sysdeps/arm/eabi/bits/setjmp.h b/sysdeps/arm/eabi/bits/setjmp.h index 3bb92dd727..458e47fdc4 100644 --- a/sysdeps/arm/eabi/bits/setjmp.h +++ b/sysdeps/arm/eabi/bits/setjmp.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2004 Free Software Foundation, Inc. +/* Copyright (C) 2004, 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 @@ -39,7 +39,7 @@ typedef int __jmp_buf[64] __attribute__((aligned (8))); /* Test if longjmp to JMPBUF would unwind the frame containing a local variable at ADDRESS. */ -#define _JMPBUF_UNWINDS(jmpbuf, address) \ - ((void *) (address) < (void *) (jmpbuf[__JMP_BUF_SP])) +#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \ + ((void *) (address) < (void *) demangle (jmpbuf[__JMP_BUF_SP])) #endif diff --git a/sysdeps/arm/fpu/bits/setjmp.h b/sysdeps/arm/fpu/bits/setjmp.h index 0a19d2c9ab..1adf94ec7d 100644 --- a/sysdeps/arm/fpu/bits/setjmp.h +++ b/sysdeps/arm/fpu/bits/setjmp.h @@ -35,7 +35,7 @@ typedef int __jmp_buf[22]; /* Test if longjmp to JMPBUF would unwind the frame containing a local variable at ADDRESS. */ -#define _JMPBUF_UNWINDS(jmpbuf, address) \ - ((void *) (address) < (void *) (jmpbuf[__JMP_BUF_SP])) +#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \ + ((void *) (address) < (void *) demangle (jmpbuf[__JMP_BUF_SP])) #endif From 7031b26a6b950ac2aae555dc1cf2ee4befc3caa5 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 28 Dec 2005 05:47:03 +0000 Subject: [PATCH 3505/4487] 2005-12-27 Roland McGrath * sysdeps/unix/sysv/aix/powerpc/memset.c: Don't use sysdeps/generic. --- sysdeps/unix/sysv/aix/powerpc/memset.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/aix/powerpc/memset.c b/sysdeps/unix/sysv/aix/powerpc/memset.c index 6955ef5e91..352db13085 100644 --- a/sysdeps/unix/sysv/aix/powerpc/memset.c +++ b/sysdeps/unix/sysv/aix/powerpc/memset.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001 Free Software Foundation, Inc. +/* Copyright (C) 2001, 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 @@ -18,4 +18,4 @@ /* Until the cache line issues are resolved use the generic implementation. */ -#include +#include From 0a4d8332bd2891c2f989f6aaae3f3a0fec2cf96e Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 28 Dec 2005 05:47:16 +0000 Subject: [PATCH 3506/4487] . --- ChangeLog.aix | 6 ++++++ ChangeLog.am33 | 7 ++++++- ChangeLog.arm | 15 +++++++++++++-- ChangeLog.cris | 5 +++++ 4 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 ChangeLog.aix diff --git a/ChangeLog.aix b/ChangeLog.aix new file mode 100644 index 0000000000..5305d338db --- /dev/null +++ b/ChangeLog.aix @@ -0,0 +1,6 @@ +2005-12-27 Roland McGrath + + * sysdeps/unix/sysv/aix/bits/setjmp.h (_JMPBUF_UNWINDS): Take third + argument DEMANGLE, and pass SP value through it. + + * sysdeps/unix/sysv/aix/powerpc/memset.c: Don't use sysdeps/generic. diff --git a/ChangeLog.am33 b/ChangeLog.am33 index 7fa5c79afd..0f6d2f4865 100644 --- a/ChangeLog.am33 +++ b/ChangeLog.am33 @@ -1,3 +1,8 @@ +2005-12-27 Roland McGrath + + * sysdeps/am33/bits/setjmp.h (_JMPBUF_UNWINDS): Take third argument + DEMANGLE, and pass SP value through it. + 2004-10-25 Alexandre Oliva * ChangeLog.am33: Added emacs local variables for mode setting and @@ -66,7 +71,7 @@ * sysdeps/am33/fpu/fraiseexcpt.c: New file. * sysdeps/am33/fpu/fsetexcptflg.c: New file. * sysdeps/am33/fpu/ftestexcept.c: New file. - + * sysdeps/unix/am33/sysdep.h: Use relative pathnames. * sysdeps/unix/sysv/linux/am33/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/am33/sysdep.S: Likewise. diff --git a/ChangeLog.arm b/ChangeLog.arm index 81f98f7cf1..fcce9d65cb 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,14 @@ +2005-12-27 Roland McGrath + + * sysdeps/arm/eabi/bits/setjmp.h (_JMPBUF_UNWINDS): Take third argument + DEMANGLE, and pass SP value through it. + * sysdeps/arm/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise. + * sysdeps/arm/fpu/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise. + +2005-12-15 Roland McGrath + + * sysdeps/arm/libc-tls.c: Use csu/ instead of sysdeps/generic/. + 2005-11-16 Daniel Jacobowitz * sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h, @@ -217,7 +228,7 @@ * sysdeps/arm/Makefile, sysdeps/arm/machine-gmon.h, sysdeps/arm/_mcount.S: Revert previous bogus changes. - + 2005-10-10 Philip Blundell * sysdeps/arm/_mcount.S: Suppress profiling when building this @@ -274,7 +285,7 @@ * sysdeps/arm/ieee754.h: Deleted. * sysdeps/arm/gmp-mparam.h: Support VFP and big endian. * sysdeps/arm/bits/endian.h: Likewise. - + 2005-06-11 Phil Blundell * sysdeps/arm/init-first.c: Deleted. diff --git a/ChangeLog.cris b/ChangeLog.cris index ba77489368..af91a1d420 100644 --- a/ChangeLog.cris +++ b/ChangeLog.cris @@ -1,3 +1,8 @@ +2005-12-27 Roland McGrath + + * sysdeps/cris/bits/setjmp.h (_JMPBUF_UNWINDS): Take third argument + DEMANGLE, and pass SP value through it. + 2004-10-25 Roland McGrath * sysdeps/cris/configure.in: New file, with test moved out of main From 91d53051d9f662064b93f19db48d6100d52837c1 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 30 Dec 2005 09:27:42 +0000 Subject: [PATCH 3507/4487] [BZ #1067] * sysdeps/unix/sysv/linux/mips/bits/socket.h: Fix struct msghdr for 64-bit mips kernel. --- sysdeps/unix/sysv/linux/mips/bits/socket.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h index 1dd82eb866..4c70eff421 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/socket.h +++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h @@ -1,5 +1,5 @@ /* System-specific socket constants and types. Linux/MIPS version. - Copyright (C) 1991, 92, 1994-1999, 2000, 2001, 2004 + Copyright (C) 1991, 92, 1994-1999, 2000, 2001, 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -219,7 +219,7 @@ struct msghdr socklen_t msg_namelen; /* Length of address data. */ struct iovec *msg_iov; /* Vector of data to send/receive into. */ - int msg_iovlen; /* Number of elements in the vector. */ + size_t msg_iovlen; /* Number of elements in the vector. */ void *msg_control; /* Ancillary data (eg BSD filedesc passing). */ socklen_t msg_controllen; /* Ancillary data buffer length. */ From d3472928acf79c43d909b9cc24e4533f8e6048c0 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 3 Jan 2006 23:35:29 +0000 Subject: [PATCH 3508/4487] Include string.h. --- sysdeps/unix/sysv/linux/m68k/fchownat.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/m68k/fchownat.c b/sysdeps/unix/sysv/linux/m68k/fchownat.c index 71df4feda7..0da8cd8082 100644 --- a/sysdeps/unix/sysv/linux/m68k/fchownat.c +++ b/sysdeps/unix/sysv/linux/m68k/fchownat.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include From 52039e96e0fb04a5e98aa577faa418b20939f3a4 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 4 Jan 2006 06:46:45 +0000 Subject: [PATCH 3509/4487] (__brk): Use __SYSCALL_CLOBBERS. --- sysdeps/unix/sysv/linux/mips/brk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/brk.c b/sysdeps/unix/sysv/linux/mips/brk.c index 5c31bec5ee..33e51a22b2 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, 2005 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 @@ -41,7 +41,7 @@ __brk (void *addr) "syscall" /* Perform the system call. */ : "=r" (res) : "I" (SYS_ify (brk)), "r" (addr) - : "$4", "$7"); ++ : "$4", "$7", __SYSCALL_CLOBBERS); newbrk = (void *) res; } __curbrk = newbrk; From 1b27504c9fc9463645cdb297b8e8973a3dfbd760 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 4 Jan 2006 12:37:37 +0000 Subject: [PATCH 3510/4487] Fix last commit. --- sysdeps/unix/sysv/linux/mips/brk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/brk.c b/sysdeps/unix/sysv/linux/mips/brk.c index 33e51a22b2..00056bee7a 100644 --- a/sysdeps/unix/sysv/linux/mips/brk.c +++ b/sysdeps/unix/sysv/linux/mips/brk.c @@ -41,7 +41,7 @@ __brk (void *addr) "syscall" /* Perform the system call. */ : "=r" (res) : "I" (SYS_ify (brk)), "r" (addr) -+ : "$4", "$7", __SYSCALL_CLOBBERS); + : "$4", "$7", __SYSCALL_CLOBBERS); newbrk = (void *) res; } __curbrk = newbrk; From 5a0a18f1f084081c1dd496f0ca0b9f95f7f0f7e4 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 6 Jan 2006 10:50:45 +0000 Subject: [PATCH 3511/4487] 2006-01-06 Roland McGrath * sysdeps/powerpc/nofpu/Versions (libc: GLIBC_2.4): New set. Add __floatundidf, __floatundisf, __floatunditf, __floatunsidf, __floatunsisf, __floatunsitf, __unorddf2, __unordsf2, __unordtf2. --- sysdeps/powerpc/nofpu/Versions | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sysdeps/powerpc/nofpu/Versions b/sysdeps/powerpc/nofpu/Versions index 4103db50bf..037af68281 100644 --- a/sysdeps/powerpc/nofpu/Versions +++ b/sysdeps/powerpc/nofpu/Versions @@ -10,4 +10,9 @@ libc { __negdf2; __negsf2; __sqrtdf2; __sqrtsf2; __subdf3; __subsf3; __truncdfsf2; __trunctfsf2; } + GLIBC_2.4 { + __floatundidf; __floatundisf; __floatunditf; + __floatunsidf; __floatunsisf; __floatunsitf; + __unorddf2; __unordsf2; __unordtf2; + } } From 7381e0b953af014b560846b953ff27a14006c871 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 6 Jan 2006 10:50:50 +0000 Subject: [PATCH 3512/4487] . --- ChangeLog.powerpc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ChangeLog.powerpc b/ChangeLog.powerpc index 7136a0bfa5..e7fe3404ba 100644 --- a/ChangeLog.powerpc +++ b/ChangeLog.powerpc @@ -1,3 +1,9 @@ +2006-01-06 Roland McGrath + + * sysdeps/powerpc/nofpu/Versions (libc: GLIBC_2.4): New set. + Add __floatundidf, __floatundisf, __floatunditf, __floatunsidf, + __floatunsisf, __floatunsitf, __unorddf2, __unordsf2, __unordtf2. + 2005-10-11 Steven Munroe * sysdeps/powerpc/nofpu/fesetround.c: Add libm_hidden_def. From 6397f4517e55bf0d657d975f598729115ccd35cf Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 6 Jan 2006 18:06:40 +0000 Subject: [PATCH 3513/4487] Define MADV_REMOVE. --- sysdeps/unix/sysv/linux/alpha/bits/mman.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/mman.h b/sysdeps/unix/sysv/linux/alpha/bits/mman.h index 59574266a4..8ef939aeb3 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/mman.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/Alpha version. - Copyright (C) 1997, 1998, 2000, 2003 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 2000, 2003, 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 @@ -96,6 +96,7 @@ # define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ # define MADV_WILLNEED 3 /* Will need these pages. */ # define MADV_DONTNEED 6 /* Don't need these pages. */ +# define MADV_REMOVE 7 /* Remove these pages and resources. */ #endif /* The POSIX people had to invent similar names for the same things. */ From 3250468baf89680890a65d308c1d4a541fa39fd7 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 8 Jan 2006 06:44:00 +0000 Subject: [PATCH 3514/4487] 2006-01-07 Roland McGrath * manual/maint.texi (Porting): Don't mention Dist files. * sysdeps/alpha/soft-fp/Dist: File removed. * sysdeps/alpha/Dist: File removed. * sysdeps/i386/i686/Dist: File removed. * sysdeps/i386/soft-fp/Dist: File removed. * sysdeps/i386/Dist: File removed. * sysdeps/mips/soft-fp/Dist: File removed. * sysdeps/mips/mips64/soft-fp/Dist: File removed. * sysdeps/mips/mips64/Dist: File removed. * sysdeps/mips/Dist: File removed. * sysdeps/wordsize-32/Dist: File removed. * sysdeps/m68k/fpu/switch/Dist: File removed. * sysdeps/m68k/fpu/Dist: File removed. * sysdeps/powerpc/powerpc64/Dist: File removed. * sysdeps/powerpc/soft-fp/Dist: File removed. * sysdeps/powerpc/powerpc32/fpu/Dist: File removed. * sysdeps/powerpc/powerpc32/Dist: File removed. * sysdeps/powerpc/fpu/Dist: File removed. * sysdeps/powerpc/Dist: File removed. * sysdeps/unix/common/Dist: File removed. * sysdeps/unix/bsd/bsd4.4/Dist: File removed. * sysdeps/unix/bsd/Dist: File removed. * sysdeps/unix/sysv/linux/alpha/Dist: File removed. * sysdeps/unix/sysv/linux/i386/Dist: File removed. * sysdeps/unix/sysv/linux/mips/mips64/Dist: File removed. * sysdeps/unix/sysv/linux/mips/Dist: File removed. * sysdeps/unix/sysv/linux/m68k/Dist: File removed. * sysdeps/unix/sysv/linux/powerpc/powerpc64/Dist: File removed. * sysdeps/unix/sysv/linux/powerpc/powerpc32/Dist: File removed. * sysdeps/unix/sysv/linux/powerpc/aix/Dist: File removed. * sysdeps/unix/sysv/linux/powerpc/Dist: File removed. * sysdeps/unix/sysv/linux/sparc/sparc32/Dist: File removed. * sysdeps/unix/sysv/linux/sparc/sparc64/Dist: File removed. * sysdeps/unix/sysv/linux/sparc/Dist: File removed. * sysdeps/unix/sysv/linux/ia64/Dist: File removed. * sysdeps/unix/sysv/linux/s390/s390-64/Dist: File removed. * sysdeps/unix/sysv/linux/s390/Dist: File removed. * sysdeps/unix/sysv/linux/s390/s390-32/Dist: File removed. * sysdeps/unix/sysv/linux/sh/Dist: File removed. * sysdeps/unix/sysv/linux/x86_64/Dist: File removed. * sysdeps/unix/sysv/linux/hppa/Dist: File removed. * sysdeps/unix/sysv/linux/Dist: File removed. * sysdeps/unix/sysv/Dist: File removed. * sysdeps/unix/Dist: File removed. * sysdeps/generic/Dist: File removed. * sysdeps/sparc/sparc32/soft-fp/Dist: File removed. * sysdeps/sparc/sparc32/sparcv9/Dist: File removed. * sysdeps/sparc/sparc32/sparcv8/Dist: File removed. * sysdeps/sparc/sparc32/Dist: File removed. * sysdeps/sparc/sparc64/soft-fp/Dist: File removed. * sysdeps/sparc/sparc64/Dist: File removed. * sysdeps/sparc/Dist: File removed. * sysdeps/gnu/Dist: File removed. * sysdeps/ia64/fpu/Dist: File removed. * sysdeps/ia64/Dist: File removed. * sysdeps/mach/mips/Dist: File removed. * sysdeps/mach/hurd/alpha/Dist: File removed. * sysdeps/mach/hurd/i386/Dist: File removed. * sysdeps/mach/hurd/mips/Dist: File removed. * sysdeps/mach/hurd/powerpc/Dist: File removed. * sysdeps/mach/hurd/Dist: File removed. * sysdeps/s390/s390-64/Dist: File removed. * sysdeps/s390/Dist: File removed. * sysdeps/s390/s390-32/Dist: File removed. * sysdeps/sh/Dist: File removed. * sysdeps/posix/Dist: File removed. * sysdeps/ieee754/dbl-64/Dist: File removed. * sysdeps/ieee754/ldbl-128/Dist: File removed. * sysdeps/ieee754/flt-32/Dist: File removed. * sysdeps/ieee754/Dist: File removed. * sysdeps/x86_64/soft-fp/Dist: File removed. * sysdeps/x86_64/Dist: File removed. * sysdeps/hppa/Dist: File removed. --- sysdeps/alpha/Dist | 11 ----------- sysdeps/alpha/soft-fp/Dist | 14 -------------- sysdeps/hppa/Dist | 5 ----- sysdeps/m68k/fpu/Dist | 1 - sysdeps/m68k/fpu/switch/Dist | 2 -- sysdeps/mach/hurd/alpha/Dist | 1 - sysdeps/mach/hurd/mips/Dist | 3 --- sysdeps/mach/mips/Dist | 1 - sysdeps/mips/Dist | 8 -------- sysdeps/mips/mips64/Dist | 1 - sysdeps/mips/mips64/soft-fp/Dist | 1 - sysdeps/mips/soft-fp/Dist | 1 - sysdeps/unix/sysv/linux/alpha/Dist | 19 ------------------- sysdeps/unix/sysv/linux/hppa/Dist | 5 ----- sysdeps/unix/sysv/linux/m68k/Dist | 9 --------- sysdeps/unix/sysv/linux/mips/Dist | 13 ------------- sysdeps/unix/sysv/linux/mips/mips64/Dist | 1 - 17 files changed, 96 deletions(-) delete mode 100644 sysdeps/alpha/Dist delete mode 100644 sysdeps/alpha/soft-fp/Dist delete mode 100644 sysdeps/hppa/Dist delete mode 100644 sysdeps/m68k/fpu/Dist delete mode 100644 sysdeps/m68k/fpu/switch/Dist delete mode 100644 sysdeps/mach/hurd/alpha/Dist delete mode 100644 sysdeps/mach/hurd/mips/Dist delete mode 100644 sysdeps/mach/mips/Dist delete mode 100644 sysdeps/mips/Dist delete mode 100644 sysdeps/mips/mips64/Dist delete mode 100644 sysdeps/mips/mips64/soft-fp/Dist delete mode 100644 sysdeps/mips/soft-fp/Dist delete mode 100644 sysdeps/unix/sysv/linux/alpha/Dist delete mode 100644 sysdeps/unix/sysv/linux/hppa/Dist delete mode 100644 sysdeps/unix/sysv/linux/m68k/Dist delete mode 100644 sysdeps/unix/sysv/linux/mips/Dist delete mode 100644 sysdeps/unix/sysv/linux/mips/mips64/Dist diff --git a/sysdeps/alpha/Dist b/sysdeps/alpha/Dist deleted file mode 100644 index 7cf49111e4..0000000000 --- a/sysdeps/alpha/Dist +++ /dev/null @@ -1,11 +0,0 @@ -divrem.h -divl.S -divq.S -reml.S -remq.S -_mcount.S -stxcpy.S -stxncpy.S -fpu/fenv_libc.h -alphaev6/stxncpy.S -alphaev6/stxcpy.S diff --git a/sysdeps/alpha/soft-fp/Dist b/sysdeps/alpha/soft-fp/Dist deleted file mode 100644 index 3d75ee78b5..0000000000 --- a/sysdeps/alpha/soft-fp/Dist +++ /dev/null @@ -1,14 +0,0 @@ -local-soft-fp.h -ots_add.c -ots_cmp.c -ots_cmpe.c -ots_cvtqux.c -ots_cvtqx.c -ots_cvttx.c -ots_cvtxq.c -ots_cvtxt.c -ots_div.c -ots_mul.c -ots_nintxq.c -ots_sub.c -sfp-machine.h diff --git a/sysdeps/hppa/Dist b/sysdeps/hppa/Dist deleted file mode 100644 index 5a0df47c68..0000000000 --- a/sysdeps/hppa/Dist +++ /dev/null @@ -1,5 +0,0 @@ -libgcc-compat.c -dl-symaddr.c -dl-fptr.c -bits/link.h -elf/entry.h diff --git a/sysdeps/m68k/fpu/Dist b/sysdeps/m68k/fpu/Dist deleted file mode 100644 index e649e8d55e..0000000000 --- a/sysdeps/m68k/fpu/Dist +++ /dev/null @@ -1 +0,0 @@ -mathimpl.h diff --git a/sysdeps/m68k/fpu/switch/Dist b/sysdeps/m68k/fpu/switch/Dist deleted file mode 100644 index 9288bddaa5..0000000000 --- a/sysdeps/m68k/fpu/switch/Dist +++ /dev/null @@ -1,2 +0,0 @@ -68881-sw.h -switch.c diff --git a/sysdeps/mach/hurd/alpha/Dist b/sysdeps/mach/hurd/alpha/Dist deleted file mode 100644 index c58180257e..0000000000 --- a/sysdeps/mach/hurd/alpha/Dist +++ /dev/null @@ -1 +0,0 @@ -static-start.S diff --git a/sysdeps/mach/hurd/mips/Dist b/sysdeps/mach/hurd/mips/Dist deleted file mode 100644 index b6f3ffa4c3..0000000000 --- a/sysdeps/mach/hurd/mips/Dist +++ /dev/null @@ -1,3 +0,0 @@ -longjmp-ctx.c -init-fault.c -dl-machine.c diff --git a/sysdeps/mach/mips/Dist b/sysdeps/mach/mips/Dist deleted file mode 100644 index f2699bf887..0000000000 --- a/sysdeps/mach/mips/Dist +++ /dev/null @@ -1 +0,0 @@ -cacheflush.c diff --git a/sysdeps/mips/Dist b/sysdeps/mips/Dist deleted file mode 100644 index 1fbf36aaad..0000000000 --- a/sysdeps/mips/Dist +++ /dev/null @@ -1,8 +0,0 @@ -setjmp_aux.c -regdef.h -sgidefs.h -fpregdef.h -fpu/fenv_libc.h -sys/fpregdef.h -sys/regdef.h -sys/asm.h diff --git a/sysdeps/mips/mips64/Dist b/sysdeps/mips/mips64/Dist deleted file mode 100644 index ad6ea0313a..0000000000 --- a/sysdeps/mips/mips64/Dist +++ /dev/null @@ -1 +0,0 @@ -setjmp_aux.c diff --git a/sysdeps/mips/mips64/soft-fp/Dist b/sysdeps/mips/mips64/soft-fp/Dist deleted file mode 100644 index 7e9914fe58..0000000000 --- a/sysdeps/mips/mips64/soft-fp/Dist +++ /dev/null @@ -1 +0,0 @@ -sfp-machine.h diff --git a/sysdeps/mips/soft-fp/Dist b/sysdeps/mips/soft-fp/Dist deleted file mode 100644 index 7e9914fe58..0000000000 --- a/sysdeps/mips/soft-fp/Dist +++ /dev/null @@ -1 +0,0 @@ -sfp-machine.h diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist deleted file mode 100644 index bba6642b42..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/Dist +++ /dev/null @@ -1,19 +0,0 @@ -alpha/ptrace.h -alpha/regdef.h -clone.S -dl-brk.S -ieee_get_fp_control.S -ieee_set_fp_control.S -ioperm.c -ipc_priv.h -kernel_sigaction.h -kernel_stat.h -kernel_termios.h -oldglob.c -rt_sigaction.S -sizes.h -sys/acct.h -sys/io.h -sys/procfs.h -sys/user.h -xstatconv.c diff --git a/sysdeps/unix/sysv/linux/hppa/Dist b/sysdeps/unix/sysv/linux/hppa/Dist deleted file mode 100644 index 2954d3c4bf..0000000000 --- a/sysdeps/unix/sysv/linux/hppa/Dist +++ /dev/null @@ -1,5 +0,0 @@ -umount.c -kernel_stat.h -kernel_sigaction.h -clone.S -sys/procfs.h diff --git a/sysdeps/unix/sysv/linux/m68k/Dist b/sysdeps/unix/sysv/linux/m68k/Dist deleted file mode 100644 index 35fad7ff0e..0000000000 --- a/sysdeps/unix/sysv/linux/m68k/Dist +++ /dev/null @@ -1,9 +0,0 @@ -clone.S -mremap.S -oldgetrlimit64.c -setresuid.c -setresgid.c -setfsuid.c -setfsgid.c -sys/reg.h -sys/procfs.h diff --git a/sysdeps/unix/sysv/linux/mips/Dist b/sysdeps/unix/sysv/linux/mips/Dist deleted file mode 100644 index 1d74119a6d..0000000000 --- a/sysdeps/unix/sysv/linux/mips/Dist +++ /dev/null @@ -1,13 +0,0 @@ -_test_and_set.c -clone.S -entry.h -ipc_priv.h -kernel_sigaction.h -kernel_stat.h -kernel_termios.h -sys/cachectl.h -sys/procfs.h -sys/sysmips.h -sys/tas.h -sys/user.h -xstatconv.c diff --git a/sysdeps/unix/sysv/linux/mips/mips64/Dist b/sysdeps/unix/sysv/linux/mips/mips64/Dist deleted file mode 100644 index b8fa28f0a4..0000000000 --- a/sysdeps/unix/sysv/linux/mips/mips64/Dist +++ /dev/null @@ -1 +0,0 @@ -ldd-rewrite.sed From 74df46e30f351b4bf4d25455ff43209a1a6077e3 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 8 Jan 2006 06:49:16 +0000 Subject: [PATCH 3515/4487] Dist files no longer required --- sysdeps/arm/Dist | 2 -- sysdeps/cris/Dist | 1 - sysdeps/powerpc/nofpu/Dist | 3 --- sysdeps/standalone/Dist | 2 -- sysdeps/standalone/i386/Dist | 1 - sysdeps/standalone/i386/force_cpu386/Dist | 1 - sysdeps/standalone/i960/Dist | 1 - sysdeps/standalone/m68k/m68020/Dist | 1 - sysdeps/standalone/m68k/m68020/mvme136/Dist | 1 - sysdeps/unix/arm/Dist | 1 - sysdeps/unix/bsd/hp/Dist | 1 - sysdeps/unix/bsd/osf/Dist | 1 - sysdeps/unix/bsd/sun/Dist | 1 - sysdeps/unix/bsd/sun/m68k/Dist | 1 - sysdeps/unix/bsd/sun/sparc/Dist | 1 - sysdeps/unix/bsd/ultrix4/mips/Dist | 1 - sysdeps/unix/sysv/aix/Dist | 15 --------------- sysdeps/unix/sysv/irix4/Dist | 2 -- sysdeps/unix/sysv/linux/arm/Dist | 14 -------------- sysdeps/unix/sysv/linux/cris/Dist | 5 ----- sysdeps/unix/sysv/sco3.2.4/Dist | 1 - sysdeps/unix/sysv/sco3.2/Dist | 1 - sysdeps/unix/sysv/sysv4/Dist | 4 ---- sysdeps/unix/sysv/sysv4/i386/Dist | 1 - sysdeps/unix/sysv/sysv4/solaris2/sparc/Dist | 1 - sysdeps/vax/Dist | 2 -- 26 files changed, 66 deletions(-) delete mode 100644 sysdeps/arm/Dist delete mode 100644 sysdeps/cris/Dist delete mode 100644 sysdeps/powerpc/nofpu/Dist delete mode 100644 sysdeps/standalone/Dist delete mode 100644 sysdeps/standalone/i386/Dist delete mode 100644 sysdeps/standalone/i386/force_cpu386/Dist delete mode 100644 sysdeps/standalone/i960/Dist delete mode 100644 sysdeps/standalone/m68k/m68020/Dist delete mode 100644 sysdeps/standalone/m68k/m68020/mvme136/Dist delete mode 100644 sysdeps/unix/arm/Dist delete mode 100644 sysdeps/unix/bsd/hp/Dist delete mode 100644 sysdeps/unix/bsd/osf/Dist delete mode 100644 sysdeps/unix/bsd/sun/Dist delete mode 100644 sysdeps/unix/bsd/sun/m68k/Dist delete mode 100644 sysdeps/unix/bsd/sun/sparc/Dist delete mode 100644 sysdeps/unix/bsd/ultrix4/mips/Dist delete mode 100644 sysdeps/unix/sysv/aix/Dist delete mode 100644 sysdeps/unix/sysv/irix4/Dist delete mode 100644 sysdeps/unix/sysv/linux/arm/Dist delete mode 100644 sysdeps/unix/sysv/linux/cris/Dist delete mode 100644 sysdeps/unix/sysv/sco3.2.4/Dist delete mode 100644 sysdeps/unix/sysv/sco3.2/Dist delete mode 100644 sysdeps/unix/sysv/sysv4/Dist delete mode 100644 sysdeps/unix/sysv/sysv4/i386/Dist delete mode 100644 sysdeps/unix/sysv/sysv4/solaris2/sparc/Dist delete mode 100644 sysdeps/vax/Dist diff --git a/sysdeps/arm/Dist b/sysdeps/arm/Dist deleted file mode 100644 index 441c9ba492..0000000000 --- a/sysdeps/arm/Dist +++ /dev/null @@ -1,2 +0,0 @@ -ieee754.h -bits/link.h diff --git a/sysdeps/cris/Dist b/sysdeps/cris/Dist deleted file mode 100644 index cf1ffb6a08..0000000000 --- a/sysdeps/cris/Dist +++ /dev/null @@ -1 +0,0 @@ -_mcount.S diff --git a/sysdeps/powerpc/nofpu/Dist b/sysdeps/powerpc/nofpu/Dist deleted file mode 100644 index 35a33ab2d5..0000000000 --- a/sysdeps/powerpc/nofpu/Dist +++ /dev/null @@ -1,3 +0,0 @@ -sim-full.c -fenv_const.c -soft-supp.h diff --git a/sysdeps/standalone/Dist b/sysdeps/standalone/Dist deleted file mode 100644 index b6b12b709a..0000000000 --- a/sysdeps/standalone/Dist +++ /dev/null @@ -1,2 +0,0 @@ -filedesc.h -standalone.h diff --git a/sysdeps/standalone/i386/Dist b/sysdeps/standalone/i386/Dist deleted file mode 100644 index 98d13be9af..0000000000 --- a/sysdeps/standalone/i386/Dist +++ /dev/null @@ -1 +0,0 @@ -i386.h diff --git a/sysdeps/standalone/i386/force_cpu386/Dist b/sysdeps/standalone/i386/force_cpu386/Dist deleted file mode 100644 index 8b7b09e10a..0000000000 --- a/sysdeps/standalone/i386/force_cpu386/Dist +++ /dev/null @@ -1 +0,0 @@ -target.ld diff --git a/sysdeps/standalone/i960/Dist b/sysdeps/standalone/i960/Dist deleted file mode 100644 index e1747ef91e..0000000000 --- a/sysdeps/standalone/i960/Dist +++ /dev/null @@ -1 +0,0 @@ -i960ca.h diff --git a/sysdeps/standalone/m68k/m68020/Dist b/sysdeps/standalone/m68k/m68020/Dist deleted file mode 100644 index 90b37b40eb..0000000000 --- a/sysdeps/standalone/m68k/m68020/Dist +++ /dev/null @@ -1 +0,0 @@ -m68020.h diff --git a/sysdeps/standalone/m68k/m68020/mvme136/Dist b/sysdeps/standalone/m68k/m68020/mvme136/Dist deleted file mode 100644 index 97b90583eb..0000000000 --- a/sysdeps/standalone/m68k/m68020/mvme136/Dist +++ /dev/null @@ -1 +0,0 @@ -mvme136.ld diff --git a/sysdeps/unix/arm/Dist b/sysdeps/unix/arm/Dist deleted file mode 100644 index 7785d5ee70..0000000000 --- a/sysdeps/unix/arm/Dist +++ /dev/null @@ -1 +0,0 @@ -dl-brk.S diff --git a/sysdeps/unix/bsd/hp/Dist b/sysdeps/unix/bsd/hp/Dist deleted file mode 100644 index ccd3a610ee..0000000000 --- a/sysdeps/unix/bsd/hp/Dist +++ /dev/null @@ -1 +0,0 @@ -m68k/dl-brk.S diff --git a/sysdeps/unix/bsd/osf/Dist b/sysdeps/unix/bsd/osf/Dist deleted file mode 100644 index e792f44bd5..0000000000 --- a/sysdeps/unix/bsd/osf/Dist +++ /dev/null @@ -1 +0,0 @@ -alpha/dl-brk.S diff --git a/sysdeps/unix/bsd/sun/Dist b/sysdeps/unix/bsd/sun/Dist deleted file mode 100644 index ccd3a610ee..0000000000 --- a/sysdeps/unix/bsd/sun/Dist +++ /dev/null @@ -1 +0,0 @@ -m68k/dl-brk.S diff --git a/sysdeps/unix/bsd/sun/m68k/Dist b/sysdeps/unix/bsd/sun/m68k/Dist deleted file mode 100644 index cd893ff463..0000000000 --- a/sysdeps/unix/bsd/sun/m68k/Dist +++ /dev/null @@ -1 +0,0 @@ -sigtramp.c diff --git a/sysdeps/unix/bsd/sun/sparc/Dist b/sysdeps/unix/bsd/sun/sparc/Dist deleted file mode 100644 index cd893ff463..0000000000 --- a/sysdeps/unix/bsd/sun/sparc/Dist +++ /dev/null @@ -1 +0,0 @@ -sigtramp.c diff --git a/sysdeps/unix/bsd/ultrix4/mips/Dist b/sysdeps/unix/bsd/ultrix4/mips/Dist deleted file mode 100644 index 06cf9cc2de..0000000000 --- a/sysdeps/unix/bsd/ultrix4/mips/Dist +++ /dev/null @@ -1 +0,0 @@ -__handler.S diff --git a/sysdeps/unix/sysv/aix/Dist b/sysdeps/unix/sysv/aix/Dist deleted file mode 100644 index 609fd778e9..0000000000 --- a/sysdeps/unix/sysv/aix/Dist +++ /dev/null @@ -1,15 +0,0 @@ -dl-support.c -dl-error.c -dl-addr.c -dl-sym.c -dl-open.c -dl-close.c -dl-libc.c -dlldr.h -kernel_proto.h -start-libc.c -sysv_termio.h -bits/utmpx.h -gnu/lib-names.h -uitrunc.c -utmpx.h diff --git a/sysdeps/unix/sysv/irix4/Dist b/sysdeps/unix/sysv/irix4/Dist deleted file mode 100644 index 09026af264..0000000000 --- a/sysdeps/unix/sysv/irix4/Dist +++ /dev/null @@ -1,2 +0,0 @@ -__handler.S -sigtramp.c diff --git a/sysdeps/unix/sysv/linux/arm/Dist b/sysdeps/unix/sysv/linux/arm/Dist deleted file mode 100644 index aa9eb1a227..0000000000 --- a/sysdeps/unix/sysv/linux/arm/Dist +++ /dev/null @@ -1,14 +0,0 @@ -clone.S -dl-procinfo.h -ioperm.c -setresuid.c -setresgid.c -setfsuid.c -setfsgid.c -sigrestorer.S -bits/armsigctx.h -sys/elf.h -sys/io.h -sys/procfs.h -sys/user.h -oldgetrlimit64.c diff --git a/sysdeps/unix/sysv/linux/cris/Dist b/sysdeps/unix/sysv/linux/cris/Dist deleted file mode 100644 index 1b8a7e61a4..0000000000 --- a/sysdeps/unix/sysv/linux/cris/Dist +++ /dev/null @@ -1,5 +0,0 @@ -clone.S -setresuid.c -setresgid.c -setfsuid.c -setfsgid.c diff --git a/sysdeps/unix/sysv/sco3.2.4/Dist b/sysdeps/unix/sysv/sco3.2.4/Dist deleted file mode 100644 index 984b473349..0000000000 --- a/sysdeps/unix/sysv/sco3.2.4/Dist +++ /dev/null @@ -1 +0,0 @@ -__setpgid.c diff --git a/sysdeps/unix/sysv/sco3.2/Dist b/sysdeps/unix/sysv/sco3.2/Dist deleted file mode 100644 index 60fab2bdea..0000000000 --- a/sysdeps/unix/sysv/sco3.2/Dist +++ /dev/null @@ -1 +0,0 @@ -__fltused.c diff --git a/sysdeps/unix/sysv/sysv4/Dist b/sysdeps/unix/sysv/sysv4/Dist deleted file mode 100644 index 6395064504..0000000000 --- a/sysdeps/unix/sysv/sysv4/Dist +++ /dev/null @@ -1,4 +0,0 @@ -__getpgid.c -__setpgid.c -sysconfig.h -siginfo.h diff --git a/sysdeps/unix/sysv/sysv4/i386/Dist b/sysdeps/unix/sysv/sysv4/i386/Dist deleted file mode 100644 index 69d16ac6bf..0000000000 --- a/sysdeps/unix/sysv/sysv4/i386/Dist +++ /dev/null @@ -1 +0,0 @@ -sys-sig.S diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/Dist b/sysdeps/unix/sysv/sysv4/solaris2/sparc/Dist deleted file mode 100644 index 7832507772..0000000000 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/Dist +++ /dev/null @@ -1 +0,0 @@ -sys/trap.h diff --git a/sysdeps/vax/Dist b/sysdeps/vax/Dist deleted file mode 100644 index 22a693094a..0000000000 --- a/sysdeps/vax/Dist +++ /dev/null @@ -1,2 +0,0 @@ -DEFS.h -fl.h From 660a71b93bda0e6d11ff0a9e4c6c8994dcd53c6f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 8 Jan 2006 06:50:00 +0000 Subject: [PATCH 3516/4487] Update abandoned code for sysdeps/generic demise. --- sysdeps/am29k/ffs.c | 4 ++-- sysdeps/i960/ffs.c | 4 ++-- sysdeps/m88k/ffs.c | 4 ++-- sysdeps/unix/bsd/sun/sethostid.c | 2 +- sysdeps/unix/sysv/irix4/reboot.c | 2 +- sysdeps/unix/sysv/irix4/swapon.c | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sysdeps/am29k/ffs.c b/sysdeps/am29k/ffs.c index 6f080db442..9abd2c6bca 100644 --- a/sysdeps/am29k/ffs.c +++ b/sysdeps/am29k/ffs.c @@ -1,6 +1,6 @@ /* ffs -- find first set bit in a word, counted from least significant end. For Amd 290x0. - Copyright (C) 1991, 1992, 1997, 2004 Free Software Foundation, Inc. + Copyright (C) 1991, 1992, 1997, 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Torbjorn Granlund (tege@sics.se). @@ -39,5 +39,5 @@ weak_alias (__ffs, ffs) libc_hidden_builtin_def (ffs) #else -#include +#include #endif diff --git a/sysdeps/i960/ffs.c b/sysdeps/i960/ffs.c index ad907a4ecb..090d1148b5 100644 --- a/sysdeps/i960/ffs.c +++ b/sysdeps/i960/ffs.c @@ -1,7 +1,7 @@ /* ffs -- find first set bit in a word, counted from least significant end. For i960 Core architecture This file is part of the GNU C Library. - Copyright (C) 1994, 1997, 2004 Free Software Foundation, Inc. + Copyright (C) 1994, 1997, 2004, 2005 Free Software Foundation, Inc. Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), On-Line Applications Research Corporation. @@ -41,6 +41,6 @@ libc_hidden_builtin_def (ffs) #else -#include +#include #endif diff --git a/sysdeps/m88k/ffs.c b/sysdeps/m88k/ffs.c index b7db70fd3b..9381f54b0b 100644 --- a/sysdeps/m88k/ffs.c +++ b/sysdeps/m88k/ffs.c @@ -1,7 +1,7 @@ /* ffs -- find first set bit in a word, counted from least significant end. For Motorola 88000. This file is part of the GNU C Library. - Copyright (C) 1991, 1992, 1997, 2004 Free Software Foundation, Inc. + Copyright (C) 1991, 1992, 1997, 2004, 2005 Free Software Foundation, Inc. Contributed by Torbjorn Granlund (tege@sics.se). The GNU C Library is free software; you can redistribute it and/or @@ -41,5 +41,5 @@ weak_alias (__ffs, ffs) libc_hidden_builtin_def (ffs) #else -#include +#include #endif diff --git a/sysdeps/unix/bsd/sun/sethostid.c b/sysdeps/unix/bsd/sun/sethostid.c index aeb2940f42..6c0d39db5c 100644 --- a/sysdeps/unix/bsd/sun/sethostid.c +++ b/sysdeps/unix/bsd/sun/sethostid.c @@ -1 +1 @@ -#include +#include diff --git a/sysdeps/unix/sysv/irix4/reboot.c b/sysdeps/unix/sysv/irix4/reboot.c index 4d90e6fc56..7c9dbba770 100644 --- a/sysdeps/unix/sysv/irix4/reboot.c +++ b/sysdeps/unix/sysv/irix4/reboot.c @@ -1 +1 @@ -#include +#include diff --git a/sysdeps/unix/sysv/irix4/swapon.c b/sysdeps/unix/sysv/irix4/swapon.c index 54885a883e..43c5222a43 100644 --- a/sysdeps/unix/sysv/irix4/swapon.c +++ b/sysdeps/unix/sysv/irix4/swapon.c @@ -1 +1 @@ -#include +#include From 44422d11301188147fde50d11307b268b0ae7a6d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 8 Jan 2006 08:21:17 +0000 Subject: [PATCH 3517/4487] 2006-01-08 Roland McGrath * sysdeps/unix/sysv/linux/alpha/adjtime.c: Use <> instead of "" in #include for kernel-features.h. * sysdeps/unix/sysv/linux/alpha/dl-sysdep.c: Likewise. * sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c: Likewise. * sysdeps/unix/sysv/linux/alpha/getitimer.S: Likewise. * sysdeps/unix/sysv/linux/alpha/getrusage.S: Likewise. * sysdeps/unix/sysv/linux/alpha/gettimeofday.S: Likewise. * sysdeps/unix/sysv/linux/alpha/msgctl.c: Likewise. * sysdeps/unix/sysv/linux/alpha/select.S: Likewise. * sysdeps/unix/sysv/linux/alpha/semctl.c: Likewise. * sysdeps/unix/sysv/linux/alpha/setitimer.S: Likewise. * sysdeps/unix/sysv/linux/alpha/settimeofday.S: Likewise. * sysdeps/unix/sysv/linux/alpha/shmctl.c: Likewise. * sysdeps/unix/sysv/linux/alpha/utimes.S: Likewise. * sysdeps/unix/sysv/linux/alpha/wait4.S: Likewise. * sysdeps/unix/sysv/linux/alpha/xstatconv.h: Likewise. * sysdeps/unix/sysv/linux/check_pf.c: Likewise. * sysdeps/unix/sysv/linux/clock_getcpuclockid.c: Likewise. * sysdeps/unix/sysv/linux/clock_getres.c: Likewise. * sysdeps/unix/sysv/linux/clock_gettime.c: Likewise. * sysdeps/unix/sysv/linux/clock_nanosleep.c: Likewise. * sysdeps/unix/sysv/linux/clock_settime.c: Likewise. * sysdeps/unix/sysv/linux/dl-execstack.c: Likewise. * sysdeps/unix/sysv/linux/dl-osinfo.h: Likewise. * sysdeps/unix/sysv/linux/dl-sysdep.c: Likewise. * sysdeps/unix/sysv/linux/fstatvfs64.c: Likewise. * sysdeps/unix/sysv/linux/ftruncate64.c: Likewise. * sysdeps/unix/sysv/linux/futimes.c: Likewise. * sysdeps/unix/sysv/linux/futimesat.c: Likewise. * sysdeps/unix/sysv/linux/fxstat64.c: Likewise. * sysdeps/unix/sysv/linux/fxstatat64.c: Likewise. * sysdeps/unix/sysv/linux/getcwd.c: Likewise. * sysdeps/unix/sysv/linux/getdents.c: Likewise. * sysdeps/unix/sysv/linux/i386/chown.c: Likewise. * sysdeps/unix/sysv/linux/i386/fchown.c: Likewise. * sysdeps/unix/sysv/linux/i386/fchownat.c: Likewise. * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. * sysdeps/unix/sysv/linux/i386/fxstat.c: Likewise. * sysdeps/unix/sysv/linux/i386/fxstatat.c: Likewise. * sysdeps/unix/sysv/linux/i386/getegid.c: Likewise. * sysdeps/unix/sysv/linux/i386/geteuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/getgid.c: Likewise. * sysdeps/unix/sysv/linux/i386/getresgid.c: Likewise. * sysdeps/unix/sysv/linux/i386/getresuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/getrlimit.c: Likewise. * sysdeps/unix/sysv/linux/i386/getuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/lchown.c: Likewise. * sysdeps/unix/sysv/linux/i386/lockf64.c: Likewise. * sysdeps/unix/sysv/linux/i386/lxstat.c: Likewise. * sysdeps/unix/sysv/linux/i386/mmap.S: Likewise. * sysdeps/unix/sysv/linux/i386/mmap64.S: Likewise. * sysdeps/unix/sysv/linux/i386/msgctl.c: Likewise. * sysdeps/unix/sysv/linux/i386/posix_fadvise64.S: Likewise. * sysdeps/unix/sysv/linux/i386/semctl.c: Likewise. * sysdeps/unix/sysv/linux/i386/setegid.c: Likewise. * sysdeps/unix/sysv/linux/i386/seteuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setfsgid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setfsuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setgid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setgroups.c: Likewise. * sysdeps/unix/sysv/linux/i386/setregid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setresgid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setresuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setreuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setrlimit.c: Likewise. * sysdeps/unix/sysv/linux/i386/setuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/shmctl.c: Likewise. * sysdeps/unix/sysv/linux/i386/xstat.c: Likewise. * sysdeps/unix/sysv/linux/ifreq.c: Likewise. * sysdeps/unix/sysv/linux/ldsodefs.h: Likewise. * sysdeps/unix/sysv/linux/lxstat64.c: Likewise. * sysdeps/unix/sysv/linux/m68k/chown.c: Likewise. * sysdeps/unix/sysv/linux/m68k/fchownat.c: Likewise. * sysdeps/unix/sysv/linux/mips/ftruncate64.c: Likewise. * sysdeps/unix/sysv/linux/mips/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/mips/truncate64.c: Likewise. * sysdeps/unix/sysv/linux/mmap64.c: Likewise. * sysdeps/unix/sysv/linux/msgctl.c: Likewise. * sysdeps/unix/sysv/linux/netlinkaccess.h: Likewise. * sysdeps/unix/sysv/linux/opendir.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fe_nomask.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/ftruncate64.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/truncate64.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/fe_nomask.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/pread.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/pread64.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite64.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S: Likewise. * sysdeps/unix/sysv/linux/pread.c: Likewise. * sysdeps/unix/sysv/linux/pread64.c: Likewise. * sysdeps/unix/sysv/linux/prof-freq.c: Likewise. * sysdeps/unix/sysv/linux/pwrite.c: Likewise. * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/chown.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/fchownat.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/lchown.c: Likewise. * sysdeps/unix/sysv/linux/semctl.c: Likewise. * sysdeps/unix/sysv/linux/setegid.c: Likewise. * sysdeps/unix/sysv/linux/seteuid.c: Likewise. * sysdeps/unix/sysv/linux/shmctl.c: Likewise. * sysdeps/unix/sysv/linux/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/sigpending.c: Likewise. * sysdeps/unix/sysv/linux/sigprocmask.c: Likewise. * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/semctl.c: Likewise. * sysdeps/unix/sysv/linux/statvfs64.c: Likewise. * sysdeps/unix/sysv/linux/syslog.c: Likewise. * sysdeps/unix/sysv/linux/testrtsig.h: Likewise. * sysdeps/unix/sysv/linux/truncate64.c: Likewise. * sysdeps/unix/sysv/linux/utimes.c: Likewise. * sysdeps/unix/sysv/linux/xstat64.c: Likewise. * sysdeps/unix/sysv/linux/xstatconv.h: Likewise. --- sysdeps/unix/sysv/linux/alpha/adjtime.c | 4 ++-- sysdeps/unix/sysv/linux/alpha/dl-sysdep.c | 9 ++++----- sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c | 4 ++-- sysdeps/unix/sysv/linux/alpha/getitimer.S | 4 ++-- sysdeps/unix/sysv/linux/alpha/getrusage.S | 4 ++-- sysdeps/unix/sysv/linux/alpha/gettimeofday.S | 4 ++-- sysdeps/unix/sysv/linux/alpha/msgctl.c | 4 ++-- sysdeps/unix/sysv/linux/alpha/select.S | 6 +++--- sysdeps/unix/sysv/linux/alpha/semctl.c | 5 +++-- sysdeps/unix/sysv/linux/alpha/setitimer.S | 4 ++-- sysdeps/unix/sysv/linux/alpha/settimeofday.S | 4 ++-- sysdeps/unix/sysv/linux/alpha/shmctl.c | 4 ++-- sysdeps/unix/sysv/linux/alpha/utimes.S | 4 ++-- sysdeps/unix/sysv/linux/alpha/wait4.S | 4 ++-- sysdeps/unix/sysv/linux/alpha/xstatconv.h | 4 ++-- sysdeps/unix/sysv/linux/m68k/chown.c | 4 ++-- sysdeps/unix/sysv/linux/m68k/fchownat.c | 4 ++-- sysdeps/unix/sysv/linux/mips/ftruncate64.c | 6 +++--- sysdeps/unix/sysv/linux/mips/sigaction.c | 6 +++--- sysdeps/unix/sysv/linux/mips/truncate64.c | 6 +++--- 20 files changed, 47 insertions(+), 47 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/adjtime.c b/sysdeps/unix/sysv/linux/alpha/adjtime.c index e206cb4727..1700524d34 100644 --- a/sysdeps/unix/sysv/linux/alpha/adjtime.c +++ b/sysdeps/unix/sysv/linux/alpha/adjtime.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2000, 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1998,2000,2002,2003,2004,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 @@ -19,7 +19,7 @@ #include #include #include -#include "kernel-features.h" +#include #if !defined __ASSUME_TIMEVAL64 || SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) struct timeval32 diff --git a/sysdeps/unix/sysv/linux/alpha/dl-sysdep.c b/sysdeps/unix/sysv/linux/alpha/dl-sysdep.c index a0214b0072..d95e46f6f1 100644 --- a/sysdeps/unix/sysv/linux/alpha/dl-sysdep.c +++ b/sysdeps/unix/sysv/linux/alpha/dl-sysdep.c @@ -1,5 +1,5 @@ -/* Operating system support for run-time dynamic linker. Linux/PPC version. - Copyright (C) 1997, 1998, 2001, 2003 Free Software Foundation, Inc. +/* Operating system support for run-time dynamic linker. Linux/Alpha version. + Copyright (C) 1997, 1998, 2001, 2003, 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 @@ -17,9 +17,8 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ - -#include "config.h" -#include "kernel-features.h" +#include +#include #include extern long __libc_alpha_cache_shape[4]; diff --git a/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c b/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c index 07f055886e..5e63be5cc7 100644 --- a/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c +++ b/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2004 Free Software Foundation, Inc. +/* Copyright (C) 2004,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 @@ -19,7 +19,7 @@ #include #include #include -#include "kernel-features.h" +#include #include "kernel_sysinfo.h" diff --git a/sysdeps/unix/sysv/linux/alpha/getitimer.S b/sysdeps/unix/sysv/linux/alpha/getitimer.S index c2bc565afc..6644a5c36d 100644 --- a/sysdeps/unix/sysv/linux/alpha/getitimer.S +++ b/sysdeps/unix/sysv/linux/alpha/getitimer.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2003, 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 @@ -19,7 +19,7 @@ #include #define _ERRNO_H 1 #include -#include "kernel-features.h" +#include .text diff --git a/sysdeps/unix/sysv/linux/alpha/getrusage.S b/sysdeps/unix/sysv/linux/alpha/getrusage.S index 46797aa83b..0bca4b5f23 100644 --- a/sysdeps/unix/sysv/linux/alpha/getrusage.S +++ b/sysdeps/unix/sysv/linux/alpha/getrusage.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2003, 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 @@ -19,7 +19,7 @@ #include #define _ERRNO_H 1 #include -#include "kernel-features.h" +#include .text diff --git a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S index 1a6f88b03a..7c9183a4fe 100644 --- a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S +++ b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2002, 2003, 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 @@ -19,7 +19,7 @@ #include #define _ERRNO_H 1 #include -#include "kernel-features.h" +#include .text diff --git a/sysdeps/unix/sysv/linux/alpha/msgctl.c b/sysdeps/unix/sysv/linux/alpha/msgctl.c index 1b75af2b80..a59911fe40 100644 --- a/sysdeps/unix/sysv/linux/alpha/msgctl.c +++ b/sysdeps/unix/sysv/linux/alpha/msgctl.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1997, 1998, 2000, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1995,1997,1998,2000,2003,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , August 1995. @@ -26,7 +26,7 @@ #include #include -#include "kernel-features.h" +#include struct __old_msqid_ds { diff --git a/sysdeps/unix/sysv/linux/alpha/select.S b/sysdeps/unix/sysv/linux/alpha/select.S index 458cda9246..35a81e949f 100644 --- a/sysdeps/unix/sysv/linux/alpha/select.S +++ b/sysdeps/unix/sysv/linux/alpha/select.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1998,2002,2003,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 @@ -19,7 +19,7 @@ #include #define _ERRNO_H 1 #include -#include "kernel-features.h" +#include .text @@ -63,7 +63,7 @@ LEAF(SELECT, 64) ldl t0, __libc_missing_axp_tv64 #endif - /* Save timeout early, since we'll need to recover this after + /* Save timeout early, since we'll need to recover this after the system call. */ stq a4, 48(sp) diff --git a/sysdeps/unix/sysv/linux/alpha/semctl.c b/sysdeps/unix/sysv/linux/alpha/semctl.c index 6925c3f058..9957f983bf 100644 --- a/sysdeps/unix/sysv/linux/alpha/semctl.c +++ b/sysdeps/unix/sysv/linux/alpha/semctl.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1995, 1997, 1998, 2000, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1995,1997,1998,2000,2003,2006 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , August 1995. @@ -26,7 +27,7 @@ #include #include -#include "kernel-features.h" +#include struct __old_semid_ds { diff --git a/sysdeps/unix/sysv/linux/alpha/setitimer.S b/sysdeps/unix/sysv/linux/alpha/setitimer.S index 16bbd2227f..59caeac680 100644 --- a/sysdeps/unix/sysv/linux/alpha/setitimer.S +++ b/sysdeps/unix/sysv/linux/alpha/setitimer.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2003, 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 @@ -19,7 +19,7 @@ #include #define _ERRNO_H 1 #include -#include "kernel-features.h" +#include .text diff --git a/sysdeps/unix/sysv/linux/alpha/settimeofday.S b/sysdeps/unix/sysv/linux/alpha/settimeofday.S index b49c770a0a..e39eadc208 100644 --- a/sysdeps/unix/sysv/linux/alpha/settimeofday.S +++ b/sysdeps/unix/sysv/linux/alpha/settimeofday.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2003, 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 @@ -19,7 +19,7 @@ #include #define _ERRNO_H 1 #include -#include "kernel-features.h" +#include .text diff --git a/sysdeps/unix/sysv/linux/alpha/shmctl.c b/sysdeps/unix/sysv/linux/alpha/shmctl.c index 4a9d9445ef..e63211fa00 100644 --- a/sysdeps/unix/sysv/linux/alpha/shmctl.c +++ b/sysdeps/unix/sysv/linux/alpha/shmctl.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1997, 1998, 2000, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1995,1997,1998,2000,2003,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , August 1995. @@ -27,7 +27,7 @@ #include #include -#include "kernel-features.h" +#include struct __old_shmid_ds { diff --git a/sysdeps/unix/sysv/linux/alpha/utimes.S b/sysdeps/unix/sysv/linux/alpha/utimes.S index c210e1d12f..0dd0a9372b 100644 --- a/sysdeps/unix/sysv/linux/alpha/utimes.S +++ b/sysdeps/unix/sysv/linux/alpha/utimes.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2003, 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 @@ -19,7 +19,7 @@ #include #define _ERRNO_H 1 #include -#include "kernel-features.h" +#include .text diff --git a/sysdeps/unix/sysv/linux/alpha/wait4.S b/sysdeps/unix/sysv/linux/alpha/wait4.S index 8d89e3d46e..634993deb8 100644 --- a/sysdeps/unix/sysv/linux/alpha/wait4.S +++ b/sysdeps/unix/sysv/linux/alpha/wait4.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2003, 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 @@ -19,7 +19,7 @@ #include #define _ERRNO_H 1 #include -#include "kernel-features.h" +#include .text diff --git a/sysdeps/unix/sysv/linux/alpha/xstatconv.h b/sysdeps/unix/sysv/linux/alpha/xstatconv.h index 846bb02994..094d11e5c9 100644 --- a/sysdeps/unix/sysv/linux/alpha/xstatconv.h +++ b/sysdeps/unix/sysv/linux/alpha/xstatconv.h @@ -1,5 +1,5 @@ /* Convert between the kernel's `struct stat' format, and libc's. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 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 @@ -17,7 +17,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include "kernel-features.h" +#include extern int __libc_missing_axp_stat64 attribute_hidden; extern int __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf) diff --git a/sysdeps/unix/sysv/linux/m68k/chown.c b/sysdeps/unix/sysv/linux/m68k/chown.c index 735fa5780a..e7193dc23b 100644 --- a/sysdeps/unix/sysv/linux/m68k/chown.c +++ b/sysdeps/unix/sysv/linux/m68k/chown.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2000, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1998,2000,2002,2003,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 @@ -24,7 +24,7 @@ #include #include -#include "kernel-features.h" +#include #ifdef __NR_chown32 # if __ASSUME_32BITUIDS == 0 diff --git a/sysdeps/unix/sysv/linux/m68k/fchownat.c b/sysdeps/unix/sysv/linux/m68k/fchownat.c index 0da8cd8082..6cc093222d 100644 --- a/sysdeps/unix/sysv/linux/m68k/fchownat.c +++ b/sysdeps/unix/sysv/linux/m68k/fchownat.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005 Free Software Foundation, Inc. +/* Copyright (C) 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 @@ -27,7 +27,7 @@ #include #include -#include "kernel-features.h" +#include #ifdef __NR_chown32 # if __ASSUME_32BITUIDS == 0 diff --git a/sysdeps/unix/sysv/linux/mips/ftruncate64.c b/sysdeps/unix/sysv/linux/mips/ftruncate64.c index 11e242570d..a46e22f828 100644 --- a/sysdeps/unix/sysv/linux/mips/ftruncate64.c +++ b/sysdeps/unix/sysv/linux/mips/ftruncate64.c @@ -1,5 +1,5 @@ -/* Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005 - Free Software Foundation, Inc. +/* Copyright (C) 1997,1998,1999,2000,2001,2002,2003,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 @@ -25,7 +25,7 @@ #include #include -#include "kernel-features.h" +#include #ifdef __NR_ftruncate64 #ifndef __ASSUME_TRUNCATE64_SYSCALL diff --git a/sysdeps/unix/sysv/linux/mips/sigaction.c b/sysdeps/unix/sysv/linux/mips/sigaction.c index 09fbe79316..8e2ca42bb4 100644 --- a/sysdeps/unix/sysv/linux/mips/sigaction.c +++ b/sysdeps/unix/sysv/linux/mips/sigaction.c @@ -1,5 +1,5 @@ -/* Copyright (C) 1997,1998,1999,2000,2002,2003, 2004 - Free Software Foundation, Inc. +/* Copyright (C) 1997,1998,1999,2000,2002,2003,2004,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 @@ -27,7 +27,7 @@ #include -#include "kernel-features.h" +#include /* The difference here is that the sigaction structure used in the kernel is not the same as we use in the libc. Therefore we must diff --git a/sysdeps/unix/sysv/linux/mips/truncate64.c b/sysdeps/unix/sysv/linux/mips/truncate64.c index d01d25b077..01cc148be9 100644 --- a/sysdeps/unix/sysv/linux/mips/truncate64.c +++ b/sysdeps/unix/sysv/linux/mips/truncate64.c @@ -1,5 +1,5 @@ -/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2005 - Free Software Foundation, Inc. +/* Copyright (C) 1997,1998,1999,2000,2002,2003,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 @@ -26,7 +26,7 @@ #include #include -#include "kernel-features.h" +#include #ifdef __NR_truncate64 #ifndef __ASSUME_TRUNCATE64_SYSCALL From 3e1470fba7d2429902c724d5321a54f8257b88e8 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 9 Jan 2006 23:38:27 +0000 Subject: [PATCH 3518/4487] 2006-01-08 Jakub Jelinek * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t): Don't give the union a name because it changes the mangled name. Instead name the struct for __data. * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t): Likewise. * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t): Likewise. --- sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h index 50049376b0..cb916917e5 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h @@ -1,5 +1,5 @@ /* Machine-specific pthread type layouts. Alpha version. - Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2003, 2004, 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 @@ -45,9 +45,9 @@ typedef union /* Data structures for mutex handling. The structure of the attribute type is deliberately not exposed. */ -typedef union __pthread_mutex_u +typedef union { - struct + struct __pthread_mutex_s { int __lock; unsigned int __count; @@ -57,8 +57,8 @@ typedef union __pthread_mutex_u binary compatibility. */ int __kind; int __spins; - union __pthread_mutex_u *__next; - union __pthread_mutex_u *__prev; + struct __pthread_mutex_s *__next; + struct __pthread_mutex_s *__prev; #define __PTHREAD_MUTEX_HAVE_PREV 1 } __data; char __size[__SIZEOF_PTHREAD_MUTEX_T]; From 96007fb0154e47c87bfbb4e09f9a7b0acd915c03 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 10 Jan 2006 07:54:47 +0000 Subject: [PATCH 3519/4487] 2006-01-07 Carlos O'Donell * sysdeps/hppa/elf/start.S (_start): Use PLABEL32 relocations by using LR and RR. Add %sr0 to iitlbp. --- sysdeps/hppa/elf/start.S | 72 ++++++++++++++++++++++++++-------------- 1 file changed, 48 insertions(+), 24 deletions(-) diff --git a/sysdeps/hppa/elf/start.S b/sysdeps/hppa/elf/start.S index 4cf832a2f6..94edeaa212 100644 --- a/sysdeps/hppa/elf/start.S +++ b/sysdeps/hppa/elf/start.S @@ -34,16 +34,27 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ - .text - - .align 4 - .import main, code .import $global$, data .import __libc_start_main, code .import __libc_csu_fini, code .import __libc_csu_init, code + /* Have the linker create plabel words + so we get PLABEL32 relocs and not 21/14 */ + .section .rodata + .align 4 +.Lpmain: + .word P%main +.Lp__libc_start_main: + .word P%__libc_start_main +.Lp__libc_csu_fini: + .word P%__libc_csu_fini +.Lp__libc_csu_init: + .word P%__libc_csu_init + + .text + .align 4 .globl _start .export _start, ENTRY .type _start,@function @@ -52,28 +63,41 @@ _start: .proc .callinfo - /* load main */ - ldil LP%main, %r26 - ldo RP%main(%r26), %r26 - - /* argc and argv should be in 25 and 24 */ - /* Expand the stack to store the 5th through 7th args */ ldo 64(%sp), %sp - - /* void (*rtld_fini) (void) (actually the 6th arg) */ - stw %r23, -56(%sp) - - /* void (*init) (void) */ - ldil LP%__libc_csu_init, %r23 - ldo RP%__libc_csu_init(%r23), %r23 - - /* void (*fini) (void) */ - ldil LP%__libc_csu_fini, %r22 - ldo RP%__libc_csu_fini(%r22), %r22 + /* TODO: Follow ABI? Place more things on the stack here... */ + +#if SHARED + /* load main (1st argument) */ + addil LR'.Lpmain, %r19 + ldw RR'.Lpmain(%r1), %r26 + ldw 0(%r26),%r26 + /* argc and argv should be in 25 and 24 (2nd and 3rd argument) */ + /* void (*init) (void) (4th argument) */ + addil LR'.Lp__libc_csu_init, %r19 + ldw RR'.Lp__libc_csu_init(%r1), %r23 + ldw 0(%r23), %r23 + /* void (*fini) (void) (5th argument) */ + addil LR'.Lp__libc_csu_fini, %r19 + ldw RR'.Lp__libc_csu_fini(%r1), %r22 + ldw 0(%r22), %r22 +#else + /* load main (1st argument) */ + ldil LR'.Lpmain, %r26 + ldw RR'.Lpmain(%r26), %r26 + /* argc and argv should be in 25 and 24 (2nd and 3rd argument) */ + /* void (*init) (void) (4th argument) */ + ldil LR'.Lp__libc_csu_init, %r23 + ldw RR'.Lp__libc_csu_init(%r23), %r23 + /* void (*fini) (void) (5th argument) */ + ldil LR'.Lp__libc_csu_fini, %r22 + ldw RR'.Lp__libc_csu_fini(%r22), %r22 +#endif + /* Store 5th argument */ stw %r22, -52(%sp) - - /* void *stack_end */ + /* void (*rtld_fini) (void) (6th argument) */ + stw %r23, -56(%sp) + /* void *stack_end (7th argument) */ stw %sp, -60(%sp) /* load global */ @@ -83,7 +107,7 @@ _start: bl __libc_start_main,%r2 nop /* die horribly if it returned (it shouldn't) */ - iitlbp %r0,(%r0) + iitlbp %r0,(%sr0,%r0) nop .procend From c881d743582b8ff34362222a5516ab98ab4aad55 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 10 Jan 2006 08:23:02 +0000 Subject: [PATCH 3520/4487] 2006-01-10 Roland McGrath * sysdeps/alpha/jmpbuf-unwind.h: New file, moved from nptl/. * sysdeps/i386/jmpbuf-unwind.h: New file, moved from nptl/. * sysdeps/mips/jmpbuf-unwind.h: New file, moved from nptl/. * sysdeps/powerpc/jmpbuf-unwind.h: New file, moved from nptl/. * sysdeps/s390/jmpbuf-unwind.h: New file, moved from nptl/. * sysdeps/sh/jmpbuf-unwind.h: New file, moved from nptl/. * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file, moved from nptl/. * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file, moved from nptl/. * sysdeps/x86_64/jmpbuf-unwind.h: New file, moved from nptl/. --- sysdeps/alpha/jmpbuf-unwind.h | 42 +++++++++++++++++++++++++++++++++++ sysdeps/mips/jmpbuf-unwind.h | 41 ++++++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 sysdeps/alpha/jmpbuf-unwind.h create mode 100644 sysdeps/mips/jmpbuf-unwind.h diff --git a/sysdeps/alpha/jmpbuf-unwind.h b/sysdeps/alpha/jmpbuf-unwind.h new file mode 100644 index 0000000000..ca445f8d24 --- /dev/null +++ b/sysdeps/alpha/jmpbuf-unwind.h @@ -0,0 +1,42 @@ +/* Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek , 2003. + + 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. */ + +#include +#include +#include +#include + +#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \ + _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj) + +static inline uintptr_t __attribute__ ((unused)) +_jmpbuf_sp (__jmp_buf regs) +{ + uintptr_t sp = regs[JB_SP]; +#ifdef PTR_DEMANGLE + PTR_DEMANGLE (sp); +#endif + return sp; +} + +#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \ + ((uintptr_t) (_address) - (_adj) < _jmpbuf_sp (_jmpbuf) - (_adj)) + +/* We use the normal longjmp for unwinding. */ +#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val) diff --git a/sysdeps/mips/jmpbuf-unwind.h b/sysdeps/mips/jmpbuf-unwind.h new file mode 100644 index 0000000000..1ff8fc8957 --- /dev/null +++ b/sysdeps/mips/jmpbuf-unwind.h @@ -0,0 +1,41 @@ +/* Copyright (C) 2003, 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 + 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. */ + +#include +#include +#include +#include + +#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \ + _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj) + +static inline uintptr_t __attribute__ ((unused)) +_jmpbuf_sp (__jmp_buf regs) +{ + uintptr_t sp = regs[0].__sp; +#ifdef PTR_DEMANGLE + PTR_DEMANGLE (sp); +#endif + return sp; +} + +#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \ + ((uintptr_t) (_address) - (_adj) < _jmpbuf_sp (_jmpbuf) - (_adj)) + +/* We use the normal longjmp for unwinding. */ +#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val) From f509f30808a482dc5cec2ddfbf63fb4331827852 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 10 Jan 2006 08:23:22 +0000 Subject: [PATCH 3521/4487] 2006-01-10 Roland McGrath * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree. * sysdeps/i386/jmpbuf-unwind.h: Likewise. * sysdeps/mips/jmpbuf-unwind.h: Likewise. * sysdeps/powerpc/jmpbuf-unwind.h: Likewise. * sysdeps/s390/jmpbuf-unwind.h: Likewise. * sysdeps/sh/jmpbuf-unwind.h: Likewise. * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise. * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise. * sysdeps/x86_64/jmpbuf-unwind.h: Likewise. --- sysdeps/alpha/nptl/jmpbuf-unwind.h | 42 ------------------------------ sysdeps/mips/nptl/jmpbuf-unwind.h | 41 ----------------------------- 2 files changed, 83 deletions(-) delete mode 100644 sysdeps/alpha/nptl/jmpbuf-unwind.h delete mode 100644 sysdeps/mips/nptl/jmpbuf-unwind.h diff --git a/sysdeps/alpha/nptl/jmpbuf-unwind.h b/sysdeps/alpha/nptl/jmpbuf-unwind.h deleted file mode 100644 index 83b7a01a0e..0000000000 --- a/sysdeps/alpha/nptl/jmpbuf-unwind.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Jakub Jelinek , 2003. - - 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. */ - -#include -#include -#include -#include - -#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \ - _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj) - -static inline uintptr_t __attribute__ ((unused)) -_jmpbuf_sp (__jmp_buf regs) -{ - uintptr_t sp = regs[JB_SP]; -#ifdef PTR_DEMANGLE - PTR_DEMANGLE (sp); -#endif - return sp; -} - -#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \ - ((uintptr_t) (_address) - (_adj) < _jmpbuf_sp (_jmpbuf) - (_adj)) - -/* We use the normal lobngjmp for unwinding. */ -#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val) diff --git a/sysdeps/mips/nptl/jmpbuf-unwind.h b/sysdeps/mips/nptl/jmpbuf-unwind.h deleted file mode 100644 index 9ee03100e6..0000000000 --- a/sysdeps/mips/nptl/jmpbuf-unwind.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include -#include -#include -#include - -#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \ - _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj) - -static inline uintptr_t __attribute__ ((unused)) -_jmpbuf_sp (__jmp_buf regs) -{ - uintptr_t sp = regs[0].__sp; -#ifdef PTR_DEMANGLE - PTR_DEMANGLE (sp); -#endif - return sp; -} - -#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \ - ((uintptr_t) (_address) - (_adj) < _jmpbuf_sp (_jmpbuf) - (_adj)) - -/* We use the normal longjmp for unwinding. */ -#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val) From b0d5e44dc441fafe1863f5998887e16a5de69fd6 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 10 Jan 2006 08:43:32 +0000 Subject: [PATCH 3522/4487] 2006-01-10 Roland McGrath * sysdeps/alpha/jmpbuf-unwind.h: New file, moved from nptl/. * sysdeps/i386/jmpbuf-unwind.h: New file, moved from nptl/. * sysdeps/ia64/jmpbuf-unwind.h: New file, moved from nptl/. * sysdeps/mips/jmpbuf-unwind.h: New file, moved from nptl/. * sysdeps/powerpc/jmpbuf-unwind.h: New file, moved from nptl/. * sysdeps/s390/jmpbuf-unwind.h: New file, moved from nptl/. * sysdeps/sh/jmpbuf-unwind.h: New file, moved from nptl/. * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file, moved from nptl/. * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file, moved from nptl/. * sysdeps/x86_64/jmpbuf-unwind.h: New file, moved from nptl/. --- sysdeps/alpha/jmpbuf-unwind.h | 5 +++++ sysdeps/mips/jmpbuf-unwind.h | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/sysdeps/alpha/jmpbuf-unwind.h b/sysdeps/alpha/jmpbuf-unwind.h index ca445f8d24..1faa16fba4 100644 --- a/sysdeps/alpha/jmpbuf-unwind.h +++ b/sysdeps/alpha/jmpbuf-unwind.h @@ -22,6 +22,11 @@ #include #include +/* Test if longjmp to JMPBUF would unwind the frame containing a local + variable at ADDRESS. */ +#define _JMPBUF_UNWINDS(_jmpbuf, _address, _demangle) \ + ((void *)(_address) < (void *) _demangle ((_jmpbuf)[JB_SP])) + #define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \ _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj) diff --git a/sysdeps/mips/jmpbuf-unwind.h b/sysdeps/mips/jmpbuf-unwind.h index 1ff8fc8957..bfa1a64537 100644 --- a/sysdeps/mips/jmpbuf-unwind.h +++ b/sysdeps/mips/jmpbuf-unwind.h @@ -21,6 +21,11 @@ #include #include +/* Test if longjmp to JMPBUF would unwind the frame + containing a local variable at ADDRESS. */ +#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \ + ((void *) (address) < (void *) demangle ((jmpbuf)[0].__sp)) + #define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \ _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj) From 9a55fb17a5881b75f9e5eccae87456ca6c8e8b06 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 10 Jan 2006 08:49:29 +0000 Subject: [PATCH 3523/4487] 2006-01-10 Roland McGrath * sysdeps/powerpc/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... * sysdeps/powerpc/jmpbuf-unwind.h: ... here. * sysdeps/alpha/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... * sysdeps/alpha/jmpbuf-unwind.h: ... here. * sysdeps/sparc/sparc32/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... * sysdeps/sparc/sparc32/jmpbuf-unwind.h: ... here. * sysdeps/i386/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... * sysdeps/i386/jmpbuf-unwind.h: ... here. * sysdeps/x86_64/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... * sysdeps/x86_64/jmpbuf-unwind.h: ... here. * sysdeps/sh/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... * sysdeps/sh/jmpbuf-unwind.h: ... here. * sysdeps/hppa/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... * sysdeps/hppa/jmpbuf-unwind.h: ... here, new file. * sysdeps/mips/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... * sysdeps/mips/jmpbuf-unwind.h: ... here. * sysdeps/m68k/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... * sysdeps/m68k/jmpbuf-unwind.h: ... here, new file. * sysdeps/s390/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... * sysdeps/s390/jmpbuf-unwind.h: ... here. * sysdeps/unix/sysv/linux/ia64/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... * sysdeps/ia64/jmpbuf-unwind.h: ... here. * sysdeps/unix/sysv/linux/sparc/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... * sysdeps/sparc/sparc64/jmpbuf-unwind.h: ... here. --- sysdeps/alpha/bits/setjmp.h | 7 +------ sysdeps/hppa/bits/setjmp.h | 8 +------- sysdeps/hppa/jmpbuf-unwind.h | 26 ++++++++++++++++++++++++++ sysdeps/m68k/bits/setjmp.h | 7 +------ sysdeps/m68k/jmpbuf-unwind.h | 25 +++++++++++++++++++++++++ sysdeps/mips/bits/setjmp.h | 8 +------- 6 files changed, 55 insertions(+), 26 deletions(-) create mode 100644 sysdeps/hppa/jmpbuf-unwind.h create mode 100644 sysdeps/m68k/jmpbuf-unwind.h diff --git a/sysdeps/alpha/bits/setjmp.h b/sysdeps/alpha/bits/setjmp.h index 71b7738c37..7db0dbf565 100644 --- a/sysdeps/alpha/bits/setjmp.h +++ b/sysdeps/alpha/bits/setjmp.h @@ -1,5 +1,5 @@ /* Define the machine-dependent type `jmp_buf'. Alpha version. - Copyright (C) 1992, 1997, 2003, 2005 Free Software Foundation, Inc. + Copyright (C) 1992,1997,2003,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 @@ -77,11 +77,6 @@ #ifndef __ASSEMBLY__ typedef long int __jmp_buf[17]; - -/* Test if longjmp to JMPBUF would unwind the frame containing a local - variable at ADDRESS. */ -#define _JMPBUF_UNWINDS(_jmpbuf, _address, _demangle) \ - ((void *)(_address) < (void *) _demangle ((_jmpbuf)[JB_SP])) #endif #endif /* bits/setjmp.h */ diff --git a/sysdeps/hppa/bits/setjmp.h b/sysdeps/hppa/bits/setjmp.h index 07ea01eb97..4c8ed07b98 100644 --- a/sysdeps/hppa/bits/setjmp.h +++ b/sysdeps/hppa/bits/setjmp.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2005 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 @@ -37,10 +37,4 @@ typedef double __jmp_buf[21]; #endif -/* Test if longjmp to JMPBUF would unwind the frame containing a local - variable at ADDRESS. */ -#define _JMPBUF_UNWINDS(_jmpbuf, _address, _demangle) \ - ((void *) (_address) > \ - (void *) _demangle ((((unsigned long *) _jmpbuf)[JB_SP]))) - #endif /* bits/setjmp.h */ diff --git a/sysdeps/hppa/jmpbuf-unwind.h b/sysdeps/hppa/jmpbuf-unwind.h new file mode 100644 index 0000000000..15cae66163 --- /dev/null +++ b/sysdeps/hppa/jmpbuf-unwind.h @@ -0,0 +1,26 @@ +/* Examine __jmp_buf for unwinding frames. HPPA version. + Copyright (C) 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 + 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. */ + +#include + +/* Test if longjmp to JMPBUF would unwind the frame containing a local + variable at ADDRESS. */ +#define _JMPBUF_UNWINDS(_jmpbuf, _address, _demangle) \ + ((void *) (_address) > \ + (void *) _demangle ((((unsigned long *) _jmpbuf)[JB_SP]))) diff --git a/sysdeps/m68k/bits/setjmp.h b/sysdeps/m68k/bits/setjmp.h index 612582af26..2d5a08227d 100644 --- a/sysdeps/m68k/bits/setjmp.h +++ b/sysdeps/m68k/bits/setjmp.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1997,1998,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 @@ -42,9 +42,4 @@ typedef struct } __jmp_buf[1]; -/* Test if longjmp to JMPBUF would unwind the frame - containing a local variable at ADDRESS. */ -#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \ - ((void *) (address) < (void *) demangle ((jmpbuf)->__sp)) - #endif /* bits/setjmp.h */ diff --git a/sysdeps/m68k/jmpbuf-unwind.h b/sysdeps/m68k/jmpbuf-unwind.h new file mode 100644 index 0000000000..3490c79bdc --- /dev/null +++ b/sysdeps/m68k/jmpbuf-unwind.h @@ -0,0 +1,25 @@ +/* Examine __jmp_buf for unwinding frames. m68k version. + Copyright (C) 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 + 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. */ + +#include + +/* Test if longjmp to JMPBUF would unwind the frame + containing a local variable at ADDRESS. */ +#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \ + ((void *) (address) < (void *) demangle ((jmpbuf)->__sp)) diff --git a/sysdeps/mips/bits/setjmp.h b/sysdeps/mips/bits/setjmp.h index 5f7c82b864..7b94623378 100644 --- a/sysdeps/mips/bits/setjmp.h +++ b/sysdeps/mips/bits/setjmp.h @@ -1,5 +1,5 @@ /* Define the machine-dependent type `jmp_buf'. MIPS version. - Copyright (C) 1992, 1993, 1995, 1997, 2000, 2002, 2003, 2004, 2005 + Copyright (C) 1992,1993,1995,1997,2000,2002,2003,2004,2005,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -77,10 +77,4 @@ typedef struct # define JB_PC 0 #endif - -/* Test if longjmp to JMPBUF would unwind the frame - containing a local variable at ADDRESS. */ -#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \ - ((void *) (address) < (void *) demangle ((jmpbuf)[0].__sp)) - #endif /* _MIPS_BITS_SETJMP_H */ From c9c4525ed023b713bac13f346becd63d087f44e3 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 10 Jan 2006 08:50:31 +0000 Subject: [PATCH 3524/4487] 2006-01-10 Roland McGrath * sysdeps/am33/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... * sysdeps/am33/jmpbuf-unwind.h: ... here, new file. --- sysdeps/am33/bits/setjmp.h | 5 ----- sysdeps/am33/jmpbuf-unwind.h | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 5 deletions(-) create mode 100644 sysdeps/am33/jmpbuf-unwind.h diff --git a/sysdeps/am33/bits/setjmp.h b/sysdeps/am33/bits/setjmp.h index 879ecb6b73..0247fad51a 100644 --- a/sysdeps/am33/bits/setjmp.h +++ b/sysdeps/am33/bits/setjmp.h @@ -27,8 +27,3 @@ typedef int __jmp_buf[26]; #endif #define __JMP_BUF_SP 20 - -/* Test if longjmp to JMPBUF would unwind the frame - containing a local variable at ADDRESS. */ -#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \ - ((void *) (address) < (void *) demangle (jmpbuf[__JMP_BUF_SP])) diff --git a/sysdeps/am33/jmpbuf-unwind.h b/sysdeps/am33/jmpbuf-unwind.h new file mode 100644 index 0000000000..e2c4f0ca5b --- /dev/null +++ b/sysdeps/am33/jmpbuf-unwind.h @@ -0,0 +1,25 @@ +/* Examine __jmp_buf for unwinding frames. AM33 version. + Copyright (C) 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 + 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. */ + +#include + +/* Test if longjmp to JMPBUF would unwind the frame + containing a local variable at ADDRESS. */ +#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \ + ((void *) (address) < (void *) demangle (jmpbuf[__JMP_BUF_SP])) From 4c429209435963f0bedbccebdd1bbd5b13229c4d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 10 Jan 2006 08:50:56 +0000 Subject: [PATCH 3525/4487] 2006-01-10 Roland McGrath * sysdeps/arm/nptl/jmpbuf-unwind.h: Moved to ... * sysdeps/arm/jmpbuf-unwind.h: ... here. --- sysdeps/arm/nptl/jmpbuf-unwind.h | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 sysdeps/arm/nptl/jmpbuf-unwind.h diff --git a/sysdeps/arm/nptl/jmpbuf-unwind.h b/sysdeps/arm/nptl/jmpbuf-unwind.h deleted file mode 100644 index f05e27fd1d..0000000000 --- a/sysdeps/arm/nptl/jmpbuf-unwind.h +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include -#include -#include - -#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \ - _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj) - -#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \ - ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[__JMP_BUF_SP] - (_adj)) - -/* We use the normal longjmp for unwinding. */ -#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val) From 442314c0d0696ce62d8ef5c0d676e195868d43c0 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 10 Jan 2006 08:51:03 +0000 Subject: [PATCH 3526/4487] 2006-01-10 Roland McGrath * sysdeps/arm/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... * sysdeps/arm/jmpbuf-unwind.h: ... here. * sysdeps/arm/fpu/bits/setjmp.h (_JMPBUF_UNWINDS): Macro removed. * sysdeps/arm/eabi/bits/setjmp.h (_JMPBUF_UNWINDS): Macro removed. --- sysdeps/arm/bits/setjmp.h | 7 +------ sysdeps/arm/eabi/bits/setjmp.h | 7 +------ sysdeps/arm/fpu/bits/setjmp.h | 7 +------ 3 files changed, 3 insertions(+), 18 deletions(-) diff --git a/sysdeps/arm/bits/setjmp.h b/sysdeps/arm/bits/setjmp.h index 4eb237a38f..dbc7a509b3 100644 --- a/sysdeps/arm/bits/setjmp.h +++ b/sysdeps/arm/bits/setjmp.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1997,1998,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 @@ -33,9 +33,4 @@ typedef int __jmp_buf[10]; #define __JMP_BUF_SP 8 -/* Test if longjmp to JMPBUF would unwind the frame - containing a local variable at ADDRESS. */ -#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \ - ((void *) (address) < (void *) demangle (jmpbuf[__JMP_BUF_SP])) - #endif diff --git a/sysdeps/arm/eabi/bits/setjmp.h b/sysdeps/arm/eabi/bits/setjmp.h index 458e47fdc4..8582907677 100644 --- a/sysdeps/arm/eabi/bits/setjmp.h +++ b/sysdeps/arm/eabi/bits/setjmp.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2004, 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 @@ -37,9 +37,4 @@ typedef int __jmp_buf[64] __attribute__((aligned (8))); #define __JMP_BUF_SP 8 -/* Test if longjmp to JMPBUF would unwind the frame - containing a local variable at ADDRESS. */ -#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \ - ((void *) (address) < (void *) demangle (jmpbuf[__JMP_BUF_SP])) - #endif diff --git a/sysdeps/arm/fpu/bits/setjmp.h b/sysdeps/arm/fpu/bits/setjmp.h index 1adf94ec7d..7d675c553d 100644 --- a/sysdeps/arm/fpu/bits/setjmp.h +++ b/sysdeps/arm/fpu/bits/setjmp.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 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 @@ -33,9 +33,4 @@ typedef int __jmp_buf[22]; #define __JMP_BUF_SP 20 -/* Test if longjmp to JMPBUF would unwind the frame - containing a local variable at ADDRESS. */ -#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \ - ((void *) (address) < (void *) demangle (jmpbuf[__JMP_BUF_SP])) - #endif From 389ae90ef25148b1b56b1a21ea9f528030f0da10 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 10 Jan 2006 08:51:11 +0000 Subject: [PATCH 3527/4487] 2006-01-10 Roland McGrath * sysdeps/arm/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... * sysdeps/arm/jmpbuf-unwind.h: ... here. * sysdeps/arm/fpu/bits/setjmp.h (_JMPBUF_UNWINDS): Macro removed. * sysdeps/arm/eabi/bits/setjmp.h (_JMPBUF_UNWINDS): Macro removed. * sysdeps/arm/nptl/jmpbuf-unwind.h: Moved to ... * sysdeps/arm/jmpbuf-unwind.h: ... here. --- sysdeps/arm/jmpbuf-unwind.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 sysdeps/arm/jmpbuf-unwind.h diff --git a/sysdeps/arm/jmpbuf-unwind.h b/sysdeps/arm/jmpbuf-unwind.h new file mode 100644 index 0000000000..1e86662da5 --- /dev/null +++ b/sysdeps/arm/jmpbuf-unwind.h @@ -0,0 +1,35 @@ +/* Copyright (C) 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 + 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. */ + +#include +#include +#include + +/* Test if longjmp to JMPBUF would unwind the frame + containing a local variable at ADDRESS. */ +#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \ + ((void *) (address) < (void *) demangle (jmpbuf[__JMP_BUF_SP])) + +#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \ + _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj) + +#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \ + ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[__JMP_BUF_SP] - (_adj)) + +/* We use the normal longjmp for unwinding. */ +#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val) From a64a511dd57fbc1428736c12a2440d33b68a25ac Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 10 Jan 2006 08:51:59 +0000 Subject: [PATCH 3528/4487] . --- ChangeLog.am33 | 5 +++++ ChangeLog.arm | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/ChangeLog.am33 b/ChangeLog.am33 index 0f6d2f4865..8503e03b9b 100644 --- a/ChangeLog.am33 +++ b/ChangeLog.am33 @@ -1,3 +1,8 @@ +2006-01-10 Roland McGrath + + * sysdeps/am33/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... + * sysdeps/am33/jmpbuf-unwind.h: ... here, new file. + 2005-12-27 Roland McGrath * sysdeps/am33/bits/setjmp.h (_JMPBUF_UNWINDS): Take third argument diff --git a/ChangeLog.arm b/ChangeLog.arm index fcce9d65cb..4b9d00ba6d 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,13 @@ +2006-01-10 Roland McGrath + + * sysdeps/arm/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... + * sysdeps/arm/jmpbuf-unwind.h: ... here. + * sysdeps/arm/fpu/bits/setjmp.h (_JMPBUF_UNWINDS): Macro removed. + * sysdeps/arm/eabi/bits/setjmp.h (_JMPBUF_UNWINDS): Macro removed. + + * sysdeps/arm/nptl/jmpbuf-unwind.h: Moved to ... + * sysdeps/arm/jmpbuf-unwind.h: ... here. + 2005-12-27 Roland McGrath * sysdeps/arm/eabi/bits/setjmp.h (_JMPBUF_UNWINDS): Take third argument From a0205b002596566f9aacaec607c5a26cd012ea52 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 10 Jan 2006 09:21:53 +0000 Subject: [PATCH 3529/4487] 2006-01-10 Roland McGrath * sysdeps/am33/bits/setjmp.h (__JMP_BUF_SP): Macro moved ... * sysdeps/am33/jmpbuf-offsets.h: ... here, new file. --- sysdeps/am33/bits/setjmp.h | 2 -- sysdeps/am33/jmpbuf-offsets.h | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 sysdeps/am33/jmpbuf-offsets.h diff --git a/sysdeps/am33/bits/setjmp.h b/sysdeps/am33/bits/setjmp.h index 0247fad51a..3e578a41a4 100644 --- a/sysdeps/am33/bits/setjmp.h +++ b/sysdeps/am33/bits/setjmp.h @@ -25,5 +25,3 @@ #ifndef _ASM typedef int __jmp_buf[26]; #endif - -#define __JMP_BUF_SP 20 diff --git a/sysdeps/am33/jmpbuf-offsets.h b/sysdeps/am33/jmpbuf-offsets.h new file mode 100644 index 0000000000..1a8520af4d --- /dev/null +++ b/sysdeps/am33/jmpbuf-offsets.h @@ -0,0 +1,20 @@ +/* Private macros for accessing __jmp_buf contents. AM33 version. + Copyright (C) 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 + 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. */ + +#define __JMP_BUF_SP 20 From d8fd00472ed0370c956b0697cb5cc22acf389d77 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 10 Jan 2006 09:22:16 +0000 Subject: [PATCH 3530/4487] 2006-01-10 Roland McGrath * sysdeps/arm/bits/setjmp.h (__JMP_BUF_SP): Macro moved to ... * sysdeps/arm/jmpbuf-offsets.h: ... here, new file. * sysdeps/arm/fpu/bits/setjmp.h: (__JMP_BUF_SP): Macro moved to ... * sysdeps/arm/fpu/jmpbuf-offsets.h: ... here, new file. * sysdeps/arm/eabi/bits/setjmp.h (__JMP_BUF_SP): Macro removed. --- sysdeps/arm/bits/setjmp.h | 2 -- sysdeps/arm/eabi/bits/setjmp.h | 2 -- sysdeps/arm/fpu/bits/setjmp.h | 2 -- sysdeps/arm/fpu/jmpbuf-offsets.h | 20 ++++++++++++++++++++ sysdeps/arm/jmpbuf-offsets.h | 20 ++++++++++++++++++++ 5 files changed, 40 insertions(+), 6 deletions(-) create mode 100644 sysdeps/arm/fpu/jmpbuf-offsets.h create mode 100644 sysdeps/arm/jmpbuf-offsets.h diff --git a/sysdeps/arm/bits/setjmp.h b/sysdeps/arm/bits/setjmp.h index dbc7a509b3..2792350f8b 100644 --- a/sysdeps/arm/bits/setjmp.h +++ b/sysdeps/arm/bits/setjmp.h @@ -31,6 +31,4 @@ typedef int __jmp_buf[10]; #endif -#define __JMP_BUF_SP 8 - #endif diff --git a/sysdeps/arm/eabi/bits/setjmp.h b/sysdeps/arm/eabi/bits/setjmp.h index 8582907677..dd7679d200 100644 --- a/sysdeps/arm/eabi/bits/setjmp.h +++ b/sysdeps/arm/eabi/bits/setjmp.h @@ -35,6 +35,4 @@ typedef int __jmp_buf[64] __attribute__((aligned (8))); #endif -#define __JMP_BUF_SP 8 - #endif diff --git a/sysdeps/arm/fpu/bits/setjmp.h b/sysdeps/arm/fpu/bits/setjmp.h index 7d675c553d..431fa039a2 100644 --- a/sysdeps/arm/fpu/bits/setjmp.h +++ b/sysdeps/arm/fpu/bits/setjmp.h @@ -31,6 +31,4 @@ typedef int __jmp_buf[22]; #endif -#define __JMP_BUF_SP 20 - #endif diff --git a/sysdeps/arm/fpu/jmpbuf-offsets.h b/sysdeps/arm/fpu/jmpbuf-offsets.h new file mode 100644 index 0000000000..ad2a75ba0f --- /dev/null +++ b/sysdeps/arm/fpu/jmpbuf-offsets.h @@ -0,0 +1,20 @@ +/* Private macros for accessing __jmp_buf contents. ARM/FPU version. + Copyright (C) 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 + 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. */ + +#define __JMP_BUF_SP 20 diff --git a/sysdeps/arm/jmpbuf-offsets.h b/sysdeps/arm/jmpbuf-offsets.h new file mode 100644 index 0000000000..d4f7fe2bf3 --- /dev/null +++ b/sysdeps/arm/jmpbuf-offsets.h @@ -0,0 +1,20 @@ +/* Private macros for accessing __jmp_buf contents. ARM version. + Copyright (C) 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 + 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. */ + +#define __JMP_BUF_SP 8 From 6f8d2b717f7d4873c3b5b697b4ca6409657f6d89 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 10 Jan 2006 09:22:33 +0000 Subject: [PATCH 3531/4487] . --- ChangeLog.am33 | 6 +++++- ChangeLog.arm | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog.am33 b/ChangeLog.am33 index 8503e03b9b..53fd44e9e8 100644 --- a/ChangeLog.am33 +++ b/ChangeLog.am33 @@ -1,6 +1,10 @@ 2006-01-10 Roland McGrath - * sysdeps/am33/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... + * sysdeps/am33/bits/setjmp.h (__JMP_BUF_SP): Macro moved ... + * sysdeps/am33/jmpbuf-offsets.h: ... here, new file. + + * sysdeps/am33/bits/setjmp.h (_JMPBUF_UNWINDS, __JMP_BUF_SP): + Move macros ... * sysdeps/am33/jmpbuf-unwind.h: ... here, new file. 2005-12-27 Roland McGrath diff --git a/ChangeLog.arm b/ChangeLog.arm index 4b9d00ba6d..b8fca1af47 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,5 +1,11 @@ 2006-01-10 Roland McGrath + * sysdeps/arm/bits/setjmp.h (__JMP_BUF_SP): Macro moved to ... + * sysdeps/arm/jmpbuf-offsets.h: ... here, new file. + * sysdeps/arm/fpu/bits/setjmp.h: (__JMP_BUF_SP): Macro moved to ... + * sysdeps/arm/fpu/jmpbuf-offsets.h: ... here, new file. + * sysdeps/arm/eabi/bits/setjmp.h (__JMP_BUF_SP): Macro removed. + * sysdeps/arm/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... * sysdeps/arm/jmpbuf-unwind.h: ... here. * sysdeps/arm/fpu/bits/setjmp.h (_JMPBUF_UNWINDS): Macro removed. From ec3d8ea6c120ac67661f3a7c27b8bb49919c7c54 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 10 Jan 2006 10:18:16 +0000 Subject: [PATCH 3532/4487] 2006-01-10 Roland McGrath * include/bits/setjmp.h: New file. * setjmp/jmpbuf-offsets.h: New file. * sysdeps/alpha/bits/setjmp.h: Move JB_* macros ... * sysdeps/alpha/jmpbuf-offsets.h: ... here, new file. * sysdeps/hppa/bits/setjmp.h (JB_SP): Macro moved ... * sysdeps/hppa/jmpbuf-offsets.h: ... here, new file. * sysdeps/i386/bits/setjmp.h: Move JB_* macros ... * sysdeps/i386/jmpbuf-offsets.h: ... here, new file. * sysdeps/mips/bits/setjmp.h (JB_PC): Macro removed. * sysdeps/powerpc/bits/setjmp.h: Move JB_* macros ... * sysdeps/powerpc/jmpbuf-offsets.h: ... here, new file. * sysdeps/s390/bits/setjmp.h: Remove __JB_* macros. * sysdeps/sh/bits/setjmp.h (JB_SIZE): Macro moved ... * sysdeps/sh/jmpbuf-offsets.h: ... here, new file. * sysdeps/sparc/sparc32/bits/setjmp.h: Move JB_* macros ... * sysdeps/sparc/sparc32/jmpbuf-offsets.h: ... here, new file. * sysdeps/unix/sysv/linux/sparc/bits/setjmp.h: Remove JB_* macros. * sysdeps/x86_64/bits/setjmp.h: Move JB_* macros ... * sysdeps/x86_64/jmpbuf-offsets.h: ... here, new file. --- sysdeps/alpha/bits/setjmp.h | 20 ------------------- sysdeps/alpha/jmpbuf-offsets.h | 36 ++++++++++++++++++++++++++++++++++ sysdeps/hppa/bits/setjmp.h | 4 ---- sysdeps/hppa/jmpbuf-offsets.h | 20 +++++++++++++++++++ sysdeps/mips/bits/setjmp.h | 5 ----- 5 files changed, 56 insertions(+), 29 deletions(-) create mode 100644 sysdeps/alpha/jmpbuf-offsets.h create mode 100644 sysdeps/hppa/jmpbuf-offsets.h diff --git a/sysdeps/alpha/bits/setjmp.h b/sysdeps/alpha/bits/setjmp.h index 7db0dbf565..eb0b478fb8 100644 --- a/sysdeps/alpha/bits/setjmp.h +++ b/sysdeps/alpha/bits/setjmp.h @@ -55,26 +55,6 @@ * registers. */ -#if defined __USE_MISC || defined __ASSEMBLY__ -# define JB_S0 0 -# define JB_S1 1 -# define JB_S2 2 -# define JB_S3 3 -# define JB_S4 4 -# define JB_S5 5 -# define JB_PC 6 -# define JB_FP 7 -# define JB_SP 8 -# define JB_F2 9 -# define JB_F3 10 -# define JB_F4 11 -# define JB_F5 12 -# define JB_F6 13 -# define JB_F7 14 -# define JB_F8 15 -# define JB_F9 16 -#endif - #ifndef __ASSEMBLY__ typedef long int __jmp_buf[17]; #endif diff --git a/sysdeps/alpha/jmpbuf-offsets.h b/sysdeps/alpha/jmpbuf-offsets.h new file mode 100644 index 0000000000..c2503d442a --- /dev/null +++ b/sysdeps/alpha/jmpbuf-offsets.h @@ -0,0 +1,36 @@ +/* Private macros for accessing __jmp_buf contents. Alpha version. + Copyright (C) 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 + 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. */ + +#define JB_S0 0 +#define JB_S1 1 +#define JB_S2 2 +#define JB_S3 3 +#define JB_S4 4 +#define JB_S5 5 +#define JB_PC 6 +#define JB_FP 7 +#define JB_SP 8 +#define JB_F2 9 +#define JB_F3 10 +#define JB_F4 11 +#define JB_F5 12 +#define JB_F6 13 +#define JB_F7 14 +#define JB_F8 15 +#define JB_F9 16 diff --git a/sysdeps/hppa/bits/setjmp.h b/sysdeps/hppa/bits/setjmp.h index 4c8ed07b98..d5ae7e7b5b 100644 --- a/sysdeps/hppa/bits/setjmp.h +++ b/sysdeps/hppa/bits/setjmp.h @@ -29,10 +29,6 @@ easier, and to ensure proper alignment. Naturally, user code should not depend on either representation. */ -#if defined __USE_MISC || defined _ASM -#define JB_SP (76/4) -#endif - #ifndef _ASM typedef double __jmp_buf[21]; #endif diff --git a/sysdeps/hppa/jmpbuf-offsets.h b/sysdeps/hppa/jmpbuf-offsets.h new file mode 100644 index 0000000000..d95ed8a419 --- /dev/null +++ b/sysdeps/hppa/jmpbuf-offsets.h @@ -0,0 +1,20 @@ +/* Private macros for accessing __jmp_buf contents. HPPA version. + Copyright (C) 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 + 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. */ + +#define JB_SP (76/4) diff --git a/sysdeps/mips/bits/setjmp.h b/sysdeps/mips/bits/setjmp.h index 7b94623378..4f159c4988 100644 --- a/sysdeps/mips/bits/setjmp.h +++ b/sysdeps/mips/bits/setjmp.h @@ -72,9 +72,4 @@ typedef struct #endif } __jmp_buf[1]; -#ifdef __USE_MISC -/* Offset to the program counter in `jmp_buf'. */ -# define JB_PC 0 -#endif - #endif /* _MIPS_BITS_SETJMP_H */ From be3497882a6d8ae8613e8f448166e8c6ae548d0f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 11 Jan 2006 22:14:19 +0000 Subject: [PATCH 3533/4487] Use PTR_DEMANGLE. --- sysdeps/alpha/__longjmp.S | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sysdeps/alpha/__longjmp.S b/sysdeps/alpha/__longjmp.S index 40d50312a3..43ab7ba004 100644 --- a/sysdeps/alpha/__longjmp.S +++ b/sysdeps/alpha/__longjmp.S @@ -54,6 +54,11 @@ ENTRY(__longjmp) ldt $f7, JB_F7*8(a0) ldt $f8, JB_F8*8(a0) ldt $f9, JB_F9*8(a0) +#ifdef PTR_DEMANGLE + PTR_DEMANGLE(ra, t1) + PTR_DEMANGLE2(t0, t1) + PTR_DEMANGLE2(fp, t1) +#endif cmoveq v0, 1, v0 mov t0, sp ret From 8470e5f2ee9da65bbf2b067005f5e9bf7081eaff Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 11 Jan 2006 22:15:28 +0000 Subject: [PATCH 3534/4487] Use PTR_DEMANGLE. Avoid __sigjmp_save for rtld; tailcall in libc.so. --- sysdeps/alpha/setjmp.S | 51 +++++++++++++++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 10 deletions(-) diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S index 14a0320cd3..1b352f346d 100644 --- a/sysdeps/alpha/setjmp.S +++ b/sysdeps/alpha/setjmp.S @@ -23,16 +23,22 @@ #define _SETJMP_H #include - .ent __sigsetjmp - .global __sigsetjmp + .ent __sigsetjmp + .global __sigsetjmp __sigsetjmp: - ldgp gp, 0(pv) + ldgp gp, 0(pv) $sigsetjmp_local: - subq sp, 16, sp - .frame sp, 16, ra, 0 - stq ra, 0(sp) - .mask 0x04000000, -16 +#ifndef PIC +#define FRAME 16 + subq sp, FRAME, sp + .frame sp, FRAME, ra, 0 + stq ra, 0(sp) + .mask 0x04000000, -FRAME +#else +#define FRAME 0 + .frame sp, FRAME, ra, 0 +#endif #ifdef PROF .set noat lda AT, _mcount @@ -47,10 +53,27 @@ $sigsetjmp_local: stq s3, JB_S3*8(a0) stq s4, JB_S4*8(a0) stq s5, JB_S5*8(a0) +#ifdef PTR_MANGLE + PTR_MANGLE(t1, ra, t0) + stq t1, JB_PC*8(a0) +#else stq ra, JB_PC*8(a0) - addq sp, 16, t0 +#endif +#if defined(PTR_MANGLE) && FRAME == 0 + PTR_MANGLE2(t1, sp, t0) +#else + addq sp, FRAME, t1 +# ifdef PTR_MANGLE + PTR_MANGLE2(t1, t1, t0) +# endif +#endif + stq t1, JB_SP*8(a0) +#ifdef PTR_MANGLE + PTR_MANGLE2(t1, fp, t0) + stq t1, JB_FP*8(a0) +#else stq fp, JB_FP*8(a0) - stq t0, JB_SP*8(a0) +#endif stt $f2, JB_F2*8(a0) stt $f3, JB_F3*8(a0) stt $f4, JB_F4*8(a0) @@ -60,12 +83,20 @@ $sigsetjmp_local: stt $f8, JB_F8*8(a0) stt $f9, JB_F9*8(a0) +#ifndef PIC /* Call to C to (potentially) save our signal mask. */ jsr ra, __sigjmp_save - ldq ra, 0(sp) addq sp, 16, sp ret +#elif defined NOT_IN_libc && defined IS_IN_rtld + /* In ld.so we never save the signal mask. */ + mov 0, v0 + ret +#else + /* Tailcall to save the signal mask. */ + br $31, __sigjmp_save !samegp +#endif END(__sigsetjmp) From 53d1d237fcb3f391d758f942dc33ebc2c2fb9193 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 11 Jan 2006 22:16:27 +0000 Subject: [PATCH 3535/4487] (PTR_MANGLE): Define. (PTR_MANGLE2): Define. --- sysdeps/unix/sysv/linux/alpha/sysdep.h | 39 ++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h index c3de78f4bb..ccbce81f0d 100644 --- a/sysdeps/unix/sysv/linux/alpha/sysdep.h +++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h @@ -22,10 +22,10 @@ #define _LINUX_ALPHA_SYSDEP_H 1 #ifdef __ASSEMBLER__ - #include #include - +#else +#include #endif /* There is some commonality. */ @@ -98,4 +98,39 @@ INTERNAL_SYSCALL1(name, err_out, nr, args); \ }) +/* Pointer mangling support. Note that tls access is slow enough that + we don't deoptimize things by placing the pointer check value there. */ +#if defined NOT_IN_libc && defined IS_IN_rtld +# ifdef __ASSEMBLER__ +# define PTR_MANGLE(dst, src, tmp) \ + ldah tmp, __pointer_chk_guard_local($29) !gprelhigh; \ + ldq tmp, __pointer_chk_guard_local(tmp) !gprellow; \ + xor src, tmp, dst +# define PTR_MANGLE2(dst, src, tmp) \ + xor src, tmp, dst +# define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp) +# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp) +# else +extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden; +# define PTR_MANGLE(var) \ + (var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard_local) +# define PTR_DEMANGLE(var) PTR_MANGLE(var) +# endif +#elif defined PIC +# ifdef __ASSEMBLER__ +# define PTR_MANGLE(dst, src, tmp) \ + ldq tmp, __pointer_chk_guard; \ + xor src, tmp, dst +# define PTR_MANGLE2(dst, src, tmp) \ + xor src, tmp, dst +# define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp) +# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp) +# else +extern uintptr_t __pointer_chk_guard attribute_relro; +# define PTR_MANGLE(var) \ + (var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard) +# define PTR_DEMANGLE(var) PTR_MANGLE(var) +# endif +#endif + #endif /* _LINUX_ALPHA_SYSDEP_H */ From c07312e955149423476f445d111ee020f341258a Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 12 Jan 2006 09:27:47 +0000 Subject: [PATCH 3536/4487] 2006-01-12 Roland McGrath * sysdeps/alpha/__longjmp.S: Include instead of . * sysdeps/alpha/setjmp.S: Likewise. * sysdeps/i386/__longjmp.S: Likewise. * sysdeps/i386/bsd-_setjmp.S: Likewise. * sysdeps/i386/bsd-setjmp.S: Likewise. * sysdeps/i386/setjmp.S: Likewise. * sysdeps/powerpc/powerpc32/__longjmp-common.S: Likewise. * sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S: Likewise. * sysdeps/powerpc/powerpc32/fpu/setjmp-common.S: * sysdeps/powerpc/powerpc32/setjmp-common.S: Likewise. * sysdeps/powerpc/powerpc64/__longjmp-common.S: Likewise. * sysdeps/powerpc/powerpc64/setjmp-common.S: Likewise. * sysdeps/sh/sh3/setjmp.S: Likewise. * sysdeps/sh/sh4/setjmp.S: Likewise. * sysdeps/sparc/sparc32/__longjmp.S: Likewise. * sysdeps/sparc/sparc32/setjmp.S: Likewise. * sysdeps/x86_64/__longjmp.S: Likewise. * sysdeps/x86_64/setjmp.S: Likewise. * sysdeps/mach/hurd/i386/longjmp-ts.c: Include . * sysdeps/mach/hurd/powerpc/longjmp-ts.c: Likewise. * sysdeps/mach/hurd/alpha/longjmp-ts.c: Likewise. * sysdeps/alpha/jmpbuf-unwind.h: Likewise. * sysdeps/hppa/jmpbuf-unwind.h: Likewise. * sysdeps/i386/jmpbuf-unwind.h: Likewise. * sysdeps/powerpc/jmpbuf-unwind.h: Likewise. * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise. * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise. * sysdeps/x86_64/jmpbuf-unwind.h: Likewise. * setjmp/jmpbuf-offsets.h: File removed. * include/bits/setjmp.h: File removed. --- sysdeps/alpha/__longjmp.S | 6 ++---- sysdeps/alpha/jmpbuf-unwind.h | 1 + sysdeps/alpha/setjmp.S | 6 ++---- sysdeps/hppa/jmpbuf-unwind.h | 1 + sysdeps/mach/hurd/alpha/longjmp-ts.c | 3 ++- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/sysdeps/alpha/__longjmp.S b/sysdeps/alpha/__longjmp.S index 43ab7ba004..bed26658de 100644 --- a/sysdeps/alpha/__longjmp.S +++ b/sysdeps/alpha/__longjmp.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1994, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1994, 1997, 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 @@ -19,9 +19,7 @@ #define __ASSEMBLY__ #include -#define _ASM -#define _SETJMP_H -#include +#include ENTRY(__longjmp) diff --git a/sysdeps/alpha/jmpbuf-unwind.h b/sysdeps/alpha/jmpbuf-unwind.h index 1faa16fba4..ca5f693d5d 100644 --- a/sysdeps/alpha/jmpbuf-unwind.h +++ b/sysdeps/alpha/jmpbuf-unwind.h @@ -18,6 +18,7 @@ 02111-1307 USA. */ #include +#include #include #include #include diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S index 1b352f346d..b8e30f8388 100644 --- a/sysdeps/alpha/setjmp.S +++ b/sysdeps/alpha/setjmp.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1994, 1996, 1997, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1992,1994,1996,1997,2002,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 @@ -19,9 +19,7 @@ #define __ASSEMBLY__ #include -#define _ASM -#define _SETJMP_H -#include +#include .ent __sigsetjmp .global __sigsetjmp diff --git a/sysdeps/hppa/jmpbuf-unwind.h b/sysdeps/hppa/jmpbuf-unwind.h index 15cae66163..6ea1876e19 100644 --- a/sysdeps/hppa/jmpbuf-unwind.h +++ b/sysdeps/hppa/jmpbuf-unwind.h @@ -18,6 +18,7 @@ 02111-1307 USA. */ #include +#include /* Test if longjmp to JMPBUF would unwind the frame containing a local variable at ADDRESS. */ diff --git a/sysdeps/mach/hurd/alpha/longjmp-ts.c b/sysdeps/mach/hurd/alpha/longjmp-ts.c index b271d6d2a9..f472dbcb30 100644 --- a/sysdeps/mach/hurd/alpha/longjmp-ts.c +++ b/sysdeps/mach/hurd/alpha/longjmp-ts.c @@ -1,5 +1,5 @@ /* Perform a `longjmp' on a Mach thread_state. Alpha version. - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 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 @@ -19,6 +19,7 @@ #include #include +#include #include From dca1cac0fb35152be6291c7826b05f882b3d02ad Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 13 Jan 2006 21:38:17 +0000 Subject: [PATCH 3537/4487] (tcbhead_t): Rename member to __private. --- sysdeps/alpha/nptl/tls.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/alpha/nptl/tls.h b/sysdeps/alpha/nptl/tls.h index fa3c832a68..20f780c5f5 100644 --- a/sysdeps/alpha/nptl/tls.h +++ b/sysdeps/alpha/nptl/tls.h @@ -65,7 +65,7 @@ typedef union dtv typedef struct { dtv_t *dtv; - void *private; + void *__private; } tcbhead_t; /* This is the size of the initial TCB. */ From f22d954bd72072f3eab4dd12c8d9bff3da79f620 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 13 Jan 2006 21:40:37 +0000 Subject: [PATCH 3538/4487] (PTR_MANGLE, PTR_MANGLE2, PTR_DEMANGLE, PTR_DEMANGLE2): Move to sysdeps/unix/alpha/sysdep.h. --- sysdeps/unix/sysv/linux/alpha/sysdep.h | 37 -------------------------- 1 file changed, 37 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h index ccbce81f0d..a22da71d60 100644 --- a/sysdeps/unix/sysv/linux/alpha/sysdep.h +++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h @@ -24,8 +24,6 @@ #ifdef __ASSEMBLER__ #include #include -#else -#include #endif /* There is some commonality. */ @@ -98,39 +96,4 @@ INTERNAL_SYSCALL1(name, err_out, nr, args); \ }) -/* Pointer mangling support. Note that tls access is slow enough that - we don't deoptimize things by placing the pointer check value there. */ -#if defined NOT_IN_libc && defined IS_IN_rtld -# ifdef __ASSEMBLER__ -# define PTR_MANGLE(dst, src, tmp) \ - ldah tmp, __pointer_chk_guard_local($29) !gprelhigh; \ - ldq tmp, __pointer_chk_guard_local(tmp) !gprellow; \ - xor src, tmp, dst -# define PTR_MANGLE2(dst, src, tmp) \ - xor src, tmp, dst -# define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp) -# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp) -# else -extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden; -# define PTR_MANGLE(var) \ - (var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard_local) -# define PTR_DEMANGLE(var) PTR_MANGLE(var) -# endif -#elif defined PIC -# ifdef __ASSEMBLER__ -# define PTR_MANGLE(dst, src, tmp) \ - ldq tmp, __pointer_chk_guard; \ - xor src, tmp, dst -# define PTR_MANGLE2(dst, src, tmp) \ - xor src, tmp, dst -# define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp) -# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp) -# else -extern uintptr_t __pointer_chk_guard attribute_relro; -# define PTR_MANGLE(var) \ - (var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard) -# define PTR_DEMANGLE(var) PTR_MANGLE(var) -# endif -#endif - #endif /* _LINUX_ALPHA_SYSDEP_H */ From 9847c5cb2fd2d67e1edfc33ed7f5575e48d09eed Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 13 Jan 2006 21:41:29 +0000 Subject: [PATCH 3539/4487] Pretty printing. --- sysdeps/alpha/setjmp.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S index b8e30f8388..bc5da0f5bc 100644 --- a/sysdeps/alpha/setjmp.S +++ b/sysdeps/alpha/setjmp.S @@ -28,7 +28,7 @@ __sigsetjmp: $sigsetjmp_local: #ifndef PIC -#define FRAME 16 +#define FRAME 16 subq sp, FRAME, sp .frame sp, FRAME, ra, 0 stq ra, 0(sp) From 12d4d227266577d6039cf842bb7970db5fceb69a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 13 Jan 2006 21:46:29 +0000 Subject: [PATCH 3540/4487] Define PTR_MANGLE, PTR_MANGLE2, PTR_DEMANGLE, PTR_DEMANGLE2. --- sysdeps/unix/alpha/sysdep.h | 40 ++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h index a154db8e41..2260ec5480 100644 --- a/sysdeps/unix/alpha/sysdep.h +++ b/sysdeps/unix/alpha/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1995, 1996, 2000, 2003, 2004 +/* Copyright (C) 1992, 1995, 1996, 2000, 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -397,4 +397,42 @@ __LABEL(name) \ _sc_ret = _sc_0, _sc_err = _sc_19; \ } +/* Pointer mangling support. Note that tls access is slow enough that + we don't deoptimize things by placing the pointer check value there. */ + +#include + +#if defined NOT_IN_libc && defined IS_IN_rtld +# ifdef __ASSEMBLER__ +# define PTR_MANGLE(dst, src, tmp) \ + ldah tmp, __pointer_chk_guard_local($29) !gprelhigh; \ + ldq tmp, __pointer_chk_guard_local(tmp) !gprellow; \ + xor src, tmp, dst +# define PTR_MANGLE2(dst, src, tmp) \ + xor src, tmp, dst +# define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp) +# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp) +# else +extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden; +# define PTR_MANGLE(var) \ + (var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard_local) +# define PTR_DEMANGLE(var) PTR_MANGLE(var) +# endif +#elif defined PIC +# ifdef __ASSEMBLER__ +# define PTR_MANGLE(dst, src, tmp) \ + ldq tmp, __pointer_chk_guard; \ + xor src, tmp, dst +# define PTR_MANGLE2(dst, src, tmp) \ + xor src, tmp, dst +# define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp) +# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp) +# else +extern uintptr_t __pointer_chk_guard attribute_relro; +# define PTR_MANGLE(var) \ + (var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard) +# define PTR_DEMANGLE(var) PTR_MANGLE(var) +# endif +#endif + #endif /* ASSEMBLER */ From fffa8a07754b292e175ace560d7fe4ab0519e409 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 13 Jan 2006 21:47:54 +0000 Subject: [PATCH 3541/4487] Define __GI___fxstatat64. --- sysdeps/unix/sysv/linux/alpha/fxstatat.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/fxstatat.c b/sysdeps/unix/sysv/linux/alpha/fxstatat.c index 127f7f3c57..4cb304cb40 100644 --- a/sysdeps/unix/sysv/linux/alpha/fxstatat.c +++ b/sysdeps/unix/sysv/linux/alpha/fxstatat.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005 Free Software Foundation, Inc. +/* Copyright (C) 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 @@ -94,4 +94,5 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag) return -1; } -strong_alias (__fxstatat, __fxstatat64); +strong_alias (__fxstatat, __fxstatat64) +strong_alias (__fxstatat64, __GI___fxstatat64) From 8cfa63a341c82fa83c79764f6c694c1ce843ebf4 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sun, 15 Jan 2006 17:59:37 +0000 Subject: [PATCH 3542/4487] Adopt for cacosh test change. --- sysdeps/alpha/fpu/libm-test-ulps | 4 ++-- sysdeps/hppa/fpu/libm-test-ulps | 4 ++-- sysdeps/m68k/fpu/libm-test-ulps | 4 ++-- sysdeps/mips/fpu/libm-test-ulps | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sysdeps/alpha/fpu/libm-test-ulps b/sysdeps/alpha/fpu/libm-test-ulps index 7e8140cddc..6b882e388a 100644 --- a/sysdeps/alpha/fpu/libm-test-ulps +++ b/sysdeps/alpha/fpu/libm-test-ulps @@ -20,12 +20,12 @@ float: 1 ifloat: 1 # cacosh -Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i": +Test "Real part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": double: 1 float: 7 idouble: 1 ifloat: 7 -Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i": +Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": double: 1 float: 3 idouble: 1 diff --git a/sysdeps/hppa/fpu/libm-test-ulps b/sysdeps/hppa/fpu/libm-test-ulps index 73172b49a0..b514496676 100644 --- a/sysdeps/hppa/fpu/libm-test-ulps +++ b/sysdeps/hppa/fpu/libm-test-ulps @@ -17,12 +17,12 @@ float: 1 ifloat: 1 # cacosh -Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i": +Test "Real part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": double: 1 float: 7 idouble: 1 ifloat: 7 -Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i": +Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": double: 1 float: 3 idouble: 1 diff --git a/sysdeps/m68k/fpu/libm-test-ulps b/sysdeps/m68k/fpu/libm-test-ulps index cab950120c..854c10cb1a 100644 --- a/sysdeps/m68k/fpu/libm-test-ulps +++ b/sysdeps/m68k/fpu/libm-test-ulps @@ -36,14 +36,14 @@ ildouble: 2 ldouble: 2 # cacosh -Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i": +Test "Real part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": double: 1 float: 7 idouble: 1 ifloat: 7 ildouble: 6 ldouble: 6 -Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i": +Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": double: 1 idouble: 1 ildouble: 2 diff --git a/sysdeps/mips/fpu/libm-test-ulps b/sysdeps/mips/fpu/libm-test-ulps index 73172b49a0..b514496676 100644 --- a/sysdeps/mips/fpu/libm-test-ulps +++ b/sysdeps/mips/fpu/libm-test-ulps @@ -17,12 +17,12 @@ float: 1 ifloat: 1 # cacosh -Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i": +Test "Real part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": double: 1 float: 7 idouble: 1 ifloat: 7 -Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i": +Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": double: 1 float: 3 idouble: 1 From 3398852b27041c9509eb4440e0b60efe3341e312 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 18 Jan 2006 08:41:47 +0000 Subject: [PATCH 3543/4487] [BZ #2167] * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h (pthread_mutex_t): Follow changes for other archs. Based on patch by Jim Gifford . --- .../sysv/linux/mips/nptl/bits/pthreadtypes.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h index e14a487508..d5e89a9364 100644 --- a/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h +++ b/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h @@ -1,5 +1,5 @@ /* Machine-specific pthread type layouts. MIPS version. - Copyright (C) 2005 Free Software Foundation, Inc. + Copyright (C) 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 @@ -59,7 +59,7 @@ typedef union type is deliberately not exposed. */ typedef union { - struct + struct __pthread_mutex_s { int __lock; unsigned int __count; @@ -70,10 +70,19 @@ typedef union /* KIND must stay at this position in the structure to maintain binary compatibility. */ int __kind; -#if _MIPS_SIM != _ABI64 +#if _MIPS_SIM == _ABI64 + int __spins; + struct __pthread_mutex_s *__next; + struct __pthread_mutex_s *__prev; +# define __PTHREAD_MUTEX_HAVE_PREV 1 +#else unsigned int __nusers; + __extension__ union + { + int __spins; + struct __pthread_mutex_s *__next; + }; #endif - int __spins; } __data; char __size[__SIZEOF_PTHREAD_MUTEX_T]; long int __align; From 84c3f2089d40311a0354321a05d2b6079e4904ff Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 30 Jan 2006 22:12:44 +0000 Subject: [PATCH 3544/4487] 2006-01-27 Roland McGrath * sysdeps/powerpc/nofpu/Makefile [$(subdir) = soft-fp] (sysdep_routines): Add $(gcc-quad-routines) here. --- sysdeps/powerpc/nofpu/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/powerpc/nofpu/Makefile b/sysdeps/powerpc/nofpu/Makefile index f85cb0b7a3..9fde4a51a9 100644 --- a/sysdeps/powerpc/nofpu/Makefile +++ b/sysdeps/powerpc/nofpu/Makefile @@ -1,7 +1,8 @@ # Makefile fragment for PowerPC with no FPU. ifeq ($(subdir),soft-fp) -sysdep_routines += $(gcc-single-routines) $(gcc-double-routines) sim-full +sysdep_routines += $(gcc-single-routines) $(gcc-double-routines) \ + $(gcc-quad-routines) sim-full endif ifeq ($(subdir),math) From 798def4ce314b8726802fd9c0a0c7e428969c038 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 30 Jan 2006 22:12:48 +0000 Subject: [PATCH 3545/4487] 2006-01-27 Roland McGrath * sysdeps/powerpc/nofpu/Subdirs: New file. --- sysdeps/powerpc/nofpu/Subdirs | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/powerpc/nofpu/Subdirs diff --git a/sysdeps/powerpc/nofpu/Subdirs b/sysdeps/powerpc/nofpu/Subdirs new file mode 100644 index 0000000000..87eadf3024 --- /dev/null +++ b/sysdeps/powerpc/nofpu/Subdirs @@ -0,0 +1 @@ +soft-fp From ab2abd53195a48adc5bed338f3c825ca5d2505c4 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 30 Jan 2006 22:12:59 +0000 Subject: [PATCH 3546/4487] . --- ChangeLog.powerpc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ChangeLog.powerpc b/ChangeLog.powerpc index e7fe3404ba..b04ad8c34f 100644 --- a/ChangeLog.powerpc +++ b/ChangeLog.powerpc @@ -1,3 +1,10 @@ +2006-01-27 Roland McGrath + + * sysdeps/powerpc/nofpu/Subdirs: New file. + + * sysdeps/powerpc/nofpu/Makefile [$(subdir) = soft-fp] + (sysdep_routines): Add $(gcc-quad-routines) here. + 2006-01-06 Roland McGrath * sysdeps/powerpc/nofpu/Versions (libc: GLIBC_2.4): New set. From 3fd1052d4b8ba54421cb1e3d85fb8a700df0509b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 31 Jan 2006 01:25:58 +0000 Subject: [PATCH 3547/4487] 2006-01-29 Daniel Jacobowitz * sysdeps/mips/dl-machine.h (RTLD_START): Correct offsets for N64. --- sysdeps/mips/dl-machine.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index aa2cef83bc..c04609f9bc 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -266,13 +266,13 @@ do { \ " STRINGXP(PTR_ADDU) " $7, $7, " STRINGXP (PTRSIZE) " \n\ # Make sure the stack pointer is aligned for _dl_init_internal.\n\ and $2, $29, -2 * " STRINGXP(SZREG) "\n\ - " STRINGXP(PTR_S) " $29, -4($2)\n\ + " STRINGXP(PTR_S) " $29, -" STRINGXP(SZREG) "($2)\n\ " STRINGXP(PTR_SUBIU) " $29, $2, 32\n\ " STRINGXP(SAVE_GP(16)) "\n\ # Call the function to run the initializers.\n\ jal _dl_init_internal\n\ # Restore the stack pointer for _start.\n\ - " STRINGXP(PTR_L) " $29, 28($29)\n\ + " STRINGXP(PTR_L) " $29, 32-" STRINGXP(SZREG) "($29)\n\ # Pass our finalizer function to the user in $2 as per ELF ABI.\n\ " STRINGXP(PTR_LA) " $2, _dl_fini\n\ # Jump to the user entry point.\n\ From 8f5c49a5436af319d81a2effe8e351284a7e3a57 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 31 Jan 2006 01:26:00 +0000 Subject: [PATCH 3548/4487] 2006-01-29 Daniel Jacobowitz * sysdeps/unix/sysv/linux/mips/bits/errno.h (ECANCELED, EOWNERDEAD, ENOTRECOVERABLE): Define. --- sysdeps/unix/sysv/linux/mips/bits/errno.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/errno.h b/sysdeps/unix/sysv/linux/mips/bits/errno.h index 8220c2e513..5ff11c0e77 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/errno.h +++ b/sysdeps/unix/sysv/linux/mips/bits/errno.h @@ -1,5 +1,6 @@ /* Error constants. MIPS/Linux specific version. - Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 1999, 2000, 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 @@ -27,6 +28,16 @@ /* Linux has no ENOTSUP error code. */ # define ENOTSUP EOPNOTSUPP +# ifndef ECANCELED +# define ECANCELED 158 +# endif + +/* Support for error codes to support robust mutexes was added later, too. */ +# ifndef EOWNERDEAD +# define EOWNERDEAD 165 +# define ENOTRECOVERABLE 166 +# endif + # ifndef __ASSEMBLER__ /* Function to get address of global `errno' variable. */ extern int *__errno_location (void) __THROW __attribute__ ((__const__)); From f44dd9a312b5e080a4cb798dae2f50fdddcba6e4 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 31 Jan 2006 01:26:02 +0000 Subject: [PATCH 3549/4487] 2006-01-29 Daniel Jacobowitz * sysdeps/unix/sysv/linux/mips/bits/socket.h (struct msghdr): Use size_t for msg_controllen. (__cmsg_nxthdr): Correct test. (__SCM_CONNECT): Delete. --- sysdeps/unix/sysv/linux/mips/bits/socket.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h index 4c70eff421..0e4a2beac7 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/socket.h +++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h @@ -1,6 +1,6 @@ /* System-specific socket constants and types. Linux/MIPS version. - Copyright (C) 1991, 92, 1994-1999, 2000, 2001, 2004, 2005 - Free Software Foundation, Inc. + Copyright (C) 1991, 92, 1994-1999, 2000, 2001, 2004, 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 @@ -222,7 +222,7 @@ struct msghdr size_t msg_iovlen; /* Number of elements in the vector. */ void *msg_control; /* Ancillary data (eg BSD filedesc passing). */ - socklen_t msg_controllen; /* Ancillary data buffer length. */ + size_t msg_controllen; /* Ancillary data buffer length. */ int msg_flags; /* Flags on received message. */ }; @@ -270,8 +270,8 @@ __NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg)) __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)); - if ((unsigned char *) (__cmsg + 1) >= ((unsigned char *) __mhdr->msg_control - + __mhdr->msg_controllen) + if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control + + __mhdr->msg_controllen) || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len) > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen))) /* No more entries. */ @@ -284,13 +284,12 @@ __NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg)) . */ enum { - SCM_RIGHTS = 0x01, /* Transfer file descriptors. */ + SCM_RIGHTS = 0x01 /* Transfer file descriptors. */ #define SCM_RIGHTS SCM_RIGHTS #ifdef __USE_BSD - SCM_CREDENTIALS = 0x02, /* Credentials passing. */ + , SCM_CREDENTIALS = 0x02 /* Credentials passing. */ # define SCM_CREDENTIALS SCM_CREDENTIALS #endif - __SCM_CONNECT = 0x03 /* Data array is `struct scm_connect'. */ }; /* User visible structure for SCM_CREDENTIALS message */ From 123d009b4c7d0763aa8384a7f41a50e9197a6979 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 31 Jan 2006 01:26:05 +0000 Subject: [PATCH 3550/4487] 2006-01-29 Daniel Jacobowitz * sysdeps/unix/sysv/linux/mips/bits/mman.h (MADV_REMOVE): Define. --- sysdeps/unix/sysv/linux/mips/bits/mman.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/mman.h b/sysdeps/unix/sysv/linux/mips/bits/mman.h index 92d4b8a340..e287e3b378 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/mman.h +++ b/sysdeps/unix/sysv/linux/mips/bits/mman.h @@ -1,5 +1,6 @@ /* Definitions for POSIX memory map interface. Linux/MIPS version. - Copyright (C) 1997, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 1997, 2000, 2003, 2004, 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 @@ -84,6 +85,7 @@ #define MADV_SEQUENTIAL 2 /* read-ahead aggressively */ #define MADV_WILLNEED 3 /* pre-fault pages */ #define MADV_DONTNEED 4 /* discard these pages */ +#define MADV_REMOVE 5 /* remove these pages & resources */ #endif /* Flags for `mremap'. */ From 400a25460a3988107c5f28346c635110a5afe81d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 1 Feb 2006 02:59:59 +0000 Subject: [PATCH 3551/4487] 2006-01-31 Roland McGrath * sysdeps/alpha/fpu/bits/mathdef.h: Moved to ... * sysdeps/alpha/bits/mathdef.h: ... here. * sysdeps/i386/fpu/bits/mathdef.h: Moved to ... * sysdeps/i386/bits/mathdef.h: ... here. * sysdeps/mips/fpu/bits/mathdef.h: Moved to ... * sysdeps/mips/bits/mathdef.h: ... here. * sysdeps/m68k/fpu/bits/mathdef.h: Moved to ... * sysdeps/m68k/bits/mathdef.h: ... here. * sysdeps/powerpc/fpu/bits/mathdef.h: Moved to ... * sysdeps/powerpc/bits/mathdef.h: ... here. * sysdeps/sparc/fpu/bits/mathdef.h: Moved to ... * sysdeps/sparc/bits/mathdef.h: ... here. * sysdeps/ia64/fpu/bits/mathdef.h: Moved to ... * sysdeps/ia64/bits/mathdef.h: ... here. * sysdeps/sh/sh4/fpu/bits/mathdef.h: Moved to ... * sysdeps/sh/sh4/bits/mathdef.h: ... here. * sysdeps/x86_64/fpu/bits/mathdef.h: Moved to ... * sysdeps/x86_64/bits/mathdef.h: ... here. --- sysdeps/alpha/{fpu => }/bits/mathdef.h | 0 sysdeps/m68k/{fpu => }/bits/mathdef.h | 0 sysdeps/mips/{fpu => }/bits/mathdef.h | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename sysdeps/alpha/{fpu => }/bits/mathdef.h (100%) rename sysdeps/m68k/{fpu => }/bits/mathdef.h (100%) rename sysdeps/mips/{fpu => }/bits/mathdef.h (100%) diff --git a/sysdeps/alpha/fpu/bits/mathdef.h b/sysdeps/alpha/bits/mathdef.h similarity index 100% rename from sysdeps/alpha/fpu/bits/mathdef.h rename to sysdeps/alpha/bits/mathdef.h diff --git a/sysdeps/m68k/fpu/bits/mathdef.h b/sysdeps/m68k/bits/mathdef.h similarity index 100% rename from sysdeps/m68k/fpu/bits/mathdef.h rename to sysdeps/m68k/bits/mathdef.h diff --git a/sysdeps/mips/fpu/bits/mathdef.h b/sysdeps/mips/bits/mathdef.h similarity index 100% rename from sysdeps/mips/fpu/bits/mathdef.h rename to sysdeps/mips/bits/mathdef.h From 92ed9d7ad16cd7abb9970219a325188f58a1cb8c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 1 Feb 2006 03:13:45 +0000 Subject: [PATCH 3552/4487] 2006-01-31 Jakub Jelinek * sysdeps/unix/sysv/linux/alpha/fpu/Implies: New file. * sysdeps/alpha/fpu/s_ceil.c: Include math_ldbl_opt.h, add compat_symbol if LONG_DOUBLE_COMPAT. * sysdeps/alpha/fpu/s_copysign.c: Likewise. * sysdeps/alpha/fpu/s_fabs.c: Likewise. * sysdeps/alpha/fpu/s_floor.c: Likewise. * sysdeps/alpha/fpu/s_rint.c: Likewise. * sysdeps/alpha/soft-fp/e_sqrtl.c: New file. * sysdeps/alpha/Implies: Add ieee754/ldbl-128. --- sysdeps/alpha/Implies | 5 +-- sysdeps/alpha/fpu/s_ceil.c | 6 +++- sysdeps/alpha/fpu/s_copysign.c | 10 +++++- sysdeps/alpha/fpu/s_fabs.c | 6 +++- sysdeps/alpha/fpu/s_floor.c | 6 +++- sysdeps/alpha/fpu/s_rint.c | 6 +++- sysdeps/alpha/soft-fp/e_sqrtl.c | 37 +++++++++++++++++++++++ sysdeps/unix/sysv/linux/alpha/fpu/Implies | 2 ++ 8 files changed, 71 insertions(+), 7 deletions(-) create mode 100644 sysdeps/alpha/soft-fp/e_sqrtl.c create mode 100644 sysdeps/unix/sysv/linux/alpha/fpu/Implies diff --git a/sysdeps/alpha/Implies b/sysdeps/alpha/Implies index 4b354f3e47..18c35908c4 100644 --- a/sysdeps/alpha/Implies +++ b/sysdeps/alpha/Implies @@ -1,5 +1,6 @@ wordsize-64 -# Alpha uses IEEE 754 single and double precision floating point. -ieee754/flt-32 +# Alpha uses IEEE 754 single, double and quad precision floating point. +ieee754/ldbl-128 ieee754/dbl-64 +ieee754/flt-32 alpha/soft-fp diff --git a/sysdeps/alpha/fpu/s_ceil.c b/sysdeps/alpha/fpu/s_ceil.c index a7a46bb2b4..ec58fd9486 100644 --- a/sysdeps/alpha/fpu/s_ceil.c +++ b/sysdeps/alpha/fpu/s_ceil.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2000, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson. @@ -18,6 +18,7 @@ 02111-1307 USA. */ #include +#include /* Use the -inf rounding mode conversion instructions to implement ceil, via something akin to -floor(-x). This is much faster than @@ -52,3 +53,6 @@ weak_alias (__ceil, ceil) strong_alias (__ceil, __ceill) weak_alias (__ceil, ceill) #endif +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) +compat_symbol (libm, __ceil, ceill, GLIBC_2_0); +#endif diff --git a/sysdeps/alpha/fpu/s_copysign.c b/sysdeps/alpha/fpu/s_copysign.c index e86778e840..52c632ec4c 100644 --- a/sysdeps/alpha/fpu/s_copysign.c +++ b/sysdeps/alpha/fpu/s_copysign.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson. @@ -18,6 +18,7 @@ 02111-1307 USA. */ #include +#include double __copysign (double x, double y) @@ -31,3 +32,10 @@ weak_alias (__copysign, copysign) strong_alias (__copysign, __copysignl) weak_alias (__copysign, copysignl) #endif +#ifdef IS_IN_libm +# if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) +compat_symbol (libm, __copysign, copysignl, GLIBC_2_0); +# endif +#elif LONG_DOUBLE_COMPAT(libc, GLIBC_2_0) +compat_symbol (libc, __copysign, copysignl, GLIBC_2_0); +#endif diff --git a/sysdeps/alpha/fpu/s_fabs.c b/sysdeps/alpha/fpu/s_fabs.c index f7a2f9353b..9bc42f68d0 100644 --- a/sysdeps/alpha/fpu/s_fabs.c +++ b/sysdeps/alpha/fpu/s_fabs.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson. @@ -18,6 +18,7 @@ 02111-1307 USA. */ #include +#include double __fabs (double x) @@ -35,3 +36,6 @@ weak_alias (__fabs, fabs) strong_alias (__fabs, __fabsl) weak_alias (__fabs, fabsl) #endif +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) +compat_symbol (libm, __fabs, fabsl, GLIBC_2_0); +#endif diff --git a/sysdeps/alpha/fpu/s_floor.c b/sysdeps/alpha/fpu/s_floor.c index c6872f5fcf..b22c52303d 100644 --- a/sysdeps/alpha/fpu/s_floor.c +++ b/sysdeps/alpha/fpu/s_floor.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999, 2000, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson. @@ -18,6 +18,7 @@ 02111-1307 USA. */ #include +#include /* Use the -inf rounding mode conversion instructions to implement @@ -53,3 +54,6 @@ weak_alias (__floor, floor) strong_alias (__floor, __floorl) weak_alias (__floor, floorl) #endif +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) +compat_symbol (libm, __floor, floorl, GLIBC_2_0); +#endif diff --git a/sysdeps/alpha/fpu/s_rint.c b/sysdeps/alpha/fpu/s_rint.c index 61cba04c27..be09651b35 100644 --- a/sysdeps/alpha/fpu/s_rint.c +++ b/sysdeps/alpha/fpu/s_rint.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson. @@ -18,6 +18,7 @@ 02111-1307 USA. */ #include +#include double @@ -48,3 +49,6 @@ weak_alias (__rint, rint) strong_alias (__rint, __rintl) weak_alias (__rint, rintl) #endif +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) +compat_symbol (libm, __rint, rintl, GLIBC_2_0); +#endif diff --git a/sysdeps/alpha/soft-fp/e_sqrtl.c b/sysdeps/alpha/soft-fp/e_sqrtl.c new file mode 100644 index 0000000000..a1d09725b7 --- /dev/null +++ b/sysdeps/alpha/soft-fp/e_sqrtl.c @@ -0,0 +1,37 @@ +/* long double square root in software floating-point emulation. + Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson (rth@cygnus.com) and + Jakub Jelinek (jj@ultra.linux.cz). + + 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. */ + +#include "local-soft-fp.h" + +long double +__ieee754_sqrtl (const long double a) +{ + FP_DECL_EX; + FP_DECL_Q(A); FP_DECL_Q(C); + long double c; + + FP_INIT_ROUNDMODE; + FP_UNPACK_Q(A, a); + FP_SQRT_Q(C, A); + FP_PACK_Q(c, C); + FP_HANDLE_EXCEPTIONS; + return c; +} diff --git a/sysdeps/unix/sysv/linux/alpha/fpu/Implies b/sysdeps/unix/sysv/linux/alpha/fpu/Implies new file mode 100644 index 0000000000..d76f511c2e --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/fpu/Implies @@ -0,0 +1,2 @@ +# Override ldbl-opt with alpha specific routines. +alpha/fpu From 87a694c9bc135e4706fdb945aba459360a7d3b05 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 1 Feb 2006 03:13:49 +0000 Subject: [PATCH 3553/4487] 2006-01-31 Jakub Jelinek * sysdeps/unix/sysv/linux/alpha/bits/wordsize.h: New file. * sysdeps/unix/sysv/linux/alpha/Implies: Add ieee754/ldbl-64-128, ieee754/ldbl-opt. * sysdeps/alpha/bits/mathdef.h (__NO_LONG_DOUBLE_MATH): Remove. * sysdeps/unix/sysv/linux/alpha/nldbl-abi.h: New file. * sysdeps/unix/sysv/linux/alpha/Makefile [$(subdir) = math] (libm-routines): Add multc3, divtc3. --- sysdeps/alpha/bits/mathdef.h | 10 ++----- sysdeps/unix/sysv/linux/alpha/Implies | 3 ++ sysdeps/unix/sysv/linux/alpha/Makefile | 10 +++++++ sysdeps/unix/sysv/linux/alpha/bits/wordsize.h | 30 +++++++++++++++++++ sysdeps/unix/sysv/linux/alpha/nldbl-abi.h | 8 +++++ 5 files changed, 53 insertions(+), 8 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/wordsize.h create mode 100644 sysdeps/unix/sysv/linux/alpha/nldbl-abi.h diff --git a/sysdeps/alpha/bits/mathdef.h b/sysdeps/alpha/bits/mathdef.h index d5f2d5a843..cbfaf68e22 100644 --- a/sysdeps/alpha/bits/mathdef.h +++ b/sysdeps/alpha/bits/mathdef.h @@ -1,5 +1,5 @@ -/* Copyright (C) 1997, 1998, 1999, 2000, 2003, 2004 - Free Software Foundation, Inc. +/* Copyright (C) 1997,1998,1999,2000,2003,2004,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 @@ -55,12 +55,6 @@ typedef double double_t; #endif /* ISO C99 && MATH_H */ -#ifndef __NO_LONG_DOUBLE_MATH -/* Signal that we do not really have a `long double'. The disables the - declaration of all the `long double' function variants. */ -# define __NO_LONG_DOUBLE_MATH 1 -#endif - #if defined _COMPLEX_H && !defined _COMPLEX_H_MATHDEF # define _COMPLEX_H_MATHDEF 1 # if defined(__GNUC__) && !__GNUC_PREREQ(3,4) diff --git a/sysdeps/unix/sysv/linux/alpha/Implies b/sysdeps/unix/sysv/linux/alpha/Implies index 8d91c80097..1616efecbe 100644 --- a/sysdeps/unix/sysv/linux/alpha/Implies +++ b/sysdeps/unix/sysv/linux/alpha/Implies @@ -1 +1,4 @@ unix/sysv/linux/wordsize-64 +# These supply the ABI compatibility for when long double was double. +ieee754/ldbl-64-128 +ieee754/ldbl-opt diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile index 37a9214fe9..f64f23fd7a 100644 --- a/sysdeps/unix/sysv/linux/alpha/Makefile +++ b/sysdeps/unix/sysv/linux/alpha/Makefile @@ -26,3 +26,13 @@ endif ifeq ($(subdir),signal) sysdep_routines += rt_sigaction endif + +ifeq ($(subdir),math) +# These 2 routines are normally in libgcc{.a,_s.so.1}. +# However, alpha -mlong-double-128 libgcc relies on +# glibc providing _Ots* routines and without these files +# glibc relies on __multc3/__divtc3 only provided +# by libgcc if configured with -mlong-double-128. +# Provide these routines here as well. +libm-routines += multc3 divtc3 +endif # math diff --git a/sysdeps/unix/sysv/linux/alpha/bits/wordsize.h b/sysdeps/unix/sysv/linux/alpha/bits/wordsize.h new file mode 100644 index 0000000000..22fc64109c --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/bits/wordsize.h @@ -0,0 +1,30 @@ +/* Copyright (C) 1999, 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 + 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. */ + +#define __WORDSIZE 64 + +#if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL + +/* Signal that we didn't used to have a `long double'. The changes all + the `long double' function variants to be redirects to the double + functions. */ +# define __LONG_DOUBLE_MATH_OPTIONAL 1 +# ifndef __LONG_DOUBLE_128__ +# define __NO_LONG_DOUBLE_MATH 1 +# endif +#endif diff --git a/sysdeps/unix/sysv/linux/alpha/nldbl-abi.h b/sysdeps/unix/sysv/linux/alpha/nldbl-abi.h new file mode 100644 index 0000000000..bd985cc59c --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/nldbl-abi.h @@ -0,0 +1,8 @@ +/* ABI version for long double switch. + This is used by the Versions and math_ldbl_opt.h files in + sysdeps/ieee754/ldbl-opt/. It gives the ABI version where + long double == double was replaced with proper long double + for libm *l functions and libc functions using long double. */ + +#define NLDBL_VERSION GLIBC_2.4 +#define LONG_DOUBLE_COMPAT_VERSION GLIBC_2_4 From b5876a1aa6c48f496fe9e8b2a12c7c0c0088078c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 15 Feb 2006 17:13:30 +0000 Subject: [PATCH 3554/4487] (__pthread_list_t): New typedef. (pthread_mutex_t): Replace __next and __prev fields with __list. --- sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h index cb916917e5..41a54d4b0d 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h @@ -43,6 +43,13 @@ typedef union } pthread_attr_t; +typedef struct __pthread_internal_list +{ + struct __pthread_internal_list *__prev; + struct __pthread_internal_list *__next; +} __pthread_list_t; + + /* Data structures for mutex handling. The structure of the attribute type is deliberately not exposed. */ typedef union @@ -57,8 +64,7 @@ typedef union binary compatibility. */ int __kind; int __spins; - struct __pthread_mutex_s *__next; - struct __pthread_mutex_s *__prev; + __pthread_list_t __list; #define __PTHREAD_MUTEX_HAVE_PREV 1 } __data; char __size[__SIZEOF_PTHREAD_MUTEX_T]; From ab28c061e98e8a9e6951c095b645115dcfe68efd Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 15 Feb 2006 18:12:03 +0000 Subject: [PATCH 3555/4487] Define MADV_DONTFORK and MADV_DOFORK. --- sysdeps/unix/sysv/linux/alpha/bits/mman.h | 2 ++ sysdeps/unix/sysv/linux/m68k/bits/mman.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/mman.h b/sysdeps/unix/sysv/linux/alpha/bits/mman.h index 8ef939aeb3..869bbede3f 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/mman.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/mman.h @@ -97,6 +97,8 @@ # define MADV_WILLNEED 3 /* Will need these pages. */ # define MADV_DONTNEED 6 /* Don't need these pages. */ # define MADV_REMOVE 7 /* Remove these pages and resources. */ +# define MADV_DONTFORK 0x30 /* Do not inherit across fork. */ +# define MADV_DOFORK 0x31 /* Do inherit across fork. */ #endif /* The POSIX people had to invent similar names for the same things. */ diff --git a/sysdeps/unix/sysv/linux/m68k/bits/mman.h b/sysdeps/unix/sysv/linux/m68k/bits/mman.h index 6e7bdc99dd..9c66b2e97c 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/mman.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/mman.h @@ -88,6 +88,8 @@ # define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ # define MADV_WILLNEED 3 /* Will need these pages. */ # define MADV_DONTNEED 4 /* Don't need these pages. */ +# define MADV_DONTFORK 0x30 /* Do not inherit across fork. */ +# define MADV_DOFORK 0x31 /* Do inherit across fork. */ #endif /* The POSIX people had to invent similar names for the same things. */ From e112446e01bbad4716a4e7efa3757668d005d60a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 16 Feb 2006 00:15:09 +0000 Subject: [PATCH 3556/4487] Correct MADV_DO{,NOT}FORK values. --- sysdeps/unix/sysv/linux/alpha/bits/mman.h | 4 ++-- sysdeps/unix/sysv/linux/m68k/bits/mman.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/mman.h b/sysdeps/unix/sysv/linux/alpha/bits/mman.h index 869bbede3f..2a84709d20 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/mman.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/mman.h @@ -97,8 +97,8 @@ # define MADV_WILLNEED 3 /* Will need these pages. */ # define MADV_DONTNEED 6 /* Don't need these pages. */ # define MADV_REMOVE 7 /* Remove these pages and resources. */ -# define MADV_DONTFORK 0x30 /* Do not inherit across fork. */ -# define MADV_DOFORK 0x31 /* Do inherit across fork. */ +# define MADV_DONTFORK 10 /* Do not inherit across fork. */ +# define MADV_DOFORK 11 /* Do inherit across fork. */ #endif /* The POSIX people had to invent similar names for the same things. */ diff --git a/sysdeps/unix/sysv/linux/m68k/bits/mman.h b/sysdeps/unix/sysv/linux/m68k/bits/mman.h index 9c66b2e97c..fbec1a03f8 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/mman.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/mman.h @@ -88,8 +88,8 @@ # define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ # define MADV_WILLNEED 3 /* Will need these pages. */ # define MADV_DONTNEED 4 /* Don't need these pages. */ -# define MADV_DONTFORK 0x30 /* Do not inherit across fork. */ -# define MADV_DOFORK 0x31 /* Do inherit across fork. */ +# define MADV_DONTFORK 10 /* Do not inherit across fork. */ +# define MADV_DOFORK 11 /* Do inherit across fork. */ #endif /* The POSIX people had to invent similar names for the same things. */ From 26d77dc296bc1f78bc0ac3e1d5662d44b634c19a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 17 Feb 2006 18:44:32 +0000 Subject: [PATCH 3557/4487] (lll_robust_mutex_dead, lll_robust_mutex_trylock, lll_robust_mutex_lock, lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock, lll_robust_mutex_unlock): New macros. (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes. --- .../unix/sysv/linux/alpha/nptl/lowlevellock.h | 62 ++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h index ab325d2b06..1a2e8cbb07 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 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 @@ -64,6 +64,15 @@ INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret : __ret; \ }) +#define lll_robust_mutex_dead(futexv) \ + do \ + { \ + int *__futexp = &(futexv); \ + atomic_or (__futexp, FUTEX_OWNER_DIED); \ + lll_futex_wake (__futexp, 1); \ + } \ + while (0) + /* Returns non-zero if error happened, zero if success. */ #define lll_futex_requeue(futexp, nr_wake, nr_move, mutex, val) \ ({ \ @@ -106,7 +115,16 @@ __lll_mutex_cond_trylock(int *futex) #define lll_mutex_cond_trylock(lock) __lll_mutex_cond_trylock (&(lock)) +static inline int __attribute__((always_inline)) +__lll_robust_mutex_trylock(int *futex, int id) +{ + return atomic_compare_and_exchange_val_acq (futex, id, 0) != 0; +} +#define lll_robust_mutex_trylock(lock, id) \ + __lll_robust_mutex_trylock (&(lock), id) + extern void __lll_lock_wait (int *futex) attribute_hidden; +extern int __lll_robust_lock_wait (int *futex) attribute_hidden; static inline void __attribute__((always_inline)) __lll_mutex_lock(int *futex) @@ -117,6 +135,18 @@ __lll_mutex_lock(int *futex) #define lll_mutex_lock(futex) __lll_mutex_lock (&(futex)) +static inline int __attribute__ ((always_inline)) +__lll_robust_mutex_lock (int *futex, int id) +{ + int result = 0; + if (atomic_compare_and_exchange_bool_acq (futex, id, 0) != 0) + result = __lll_robust_lock_wait (futex); + return result; +} +#define lll_robust_mutex_lock(futex, id) \ + __lll_robust_mutex_lock (&(futex), id) + + static inline void __attribute__ ((always_inline)) __lll_mutex_cond_lock (int *futex) { @@ -126,8 +156,14 @@ __lll_mutex_cond_lock (int *futex) #define lll_mutex_cond_lock(futex) __lll_mutex_cond_lock (&(futex)) +#define lll_robust_mutex_cond_lock(futex, id) \ + __lll_robust_mutex_lock (&(futex), (id) | FUTEX_WAITERS) + + extern int __lll_timedlock_wait (int *futex, const struct timespec *) attribute_hidden; +extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *) + attribute_hidden; static inline int __attribute__ ((always_inline)) __lll_mutex_timedlock (int *futex, const struct timespec *abstime) @@ -141,6 +177,19 @@ __lll_mutex_timedlock (int *futex, const struct timespec *abstime) __lll_mutex_timedlock (&(futex), abstime) +static inline int __attribute__ ((always_inline)) +__lll_robust_mutex_timedlock (int *futex, const struct timespec *abstime, + int id) +{ + int result = 0; + if (atomic_compare_and_exchange_bool_acq (futex, id, 0) != 0) + result = __lll_robust_timedlock_wait (futex, abstime); + return result; +} +#define lll_robust_mutex_timedlock(futex, abstime, id) \ + __lll_robust_mutex_timedlock (&(futex), abstime, id) + + static inline void __attribute__ ((always_inline)) __lll_mutex_unlock (int *futex) { @@ -151,6 +200,17 @@ __lll_mutex_unlock (int *futex) #define lll_mutex_unlock(futex) __lll_mutex_unlock(&(futex)) +static inline void __attribute__ ((always_inline)) +__lll_robust_mutex_unlock (int *futex, int mask) +{ + int val = atomic_exchange_rel (futex, 0); + if (__builtin_expect (val & mask, 0)) + lll_futex_wake (futex, 1); +} +#define lll_robust_mutex_unlock(futex) \ + __lll_robust_mutex_unlock(&(futex), FUTEX_WAITERS) + + static inline void __attribute__ ((always_inline)) __lll_mutex_unlock_force (int *futex) { From 143006bf1d086f25367c381289c19630d5e3fa6f Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 20 Feb 2006 22:51:48 +0000 Subject: [PATCH 3558/4487] * sysdeps/alpha/soft-fp/Makefile (CPPFLAGS): Add soft-fp include to math subdir. * sysdeps/alpha/soft-fp/e_sqrtl.c: Don't use local-soft-fp.h. (__ieee754_sqrtl): Add _round local variable. * sysdeps/unix/sysv/linux/alpha/fpu/Implies: Remove. * sysdeps/unix/sysv/linux/alpha/fxstatat.c: Fix hidden defs. --- sysdeps/alpha/soft-fp/Makefile | 4 ++++ sysdeps/alpha/soft-fp/e_sqrtl.c | 5 ++++- sysdeps/unix/sysv/linux/alpha/fpu/Implies | 2 -- sysdeps/unix/sysv/linux/alpha/fxstatat.c | 5 +++-- 4 files changed, 11 insertions(+), 5 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/alpha/fpu/Implies diff --git a/sysdeps/alpha/soft-fp/Makefile b/sysdeps/alpha/soft-fp/Makefile index d7e7e2684a..5410a78984 100644 --- a/sysdeps/alpha/soft-fp/Makefile +++ b/sysdeps/alpha/soft-fp/Makefile @@ -4,3 +4,7 @@ ifeq ($(subdir),soft-fp) sysdep_routines += ots_add ots_sub ots_mul ots_div ots_cmp ots_cmpe \ ots_cvtxq ots_cvtqx ots_cvtqux ots_cvttx ots_cvtxt ots_nintxq endif + +ifeq ($(subdir),math) +CPPFLAGS += -I../soft-fp +endif diff --git a/sysdeps/alpha/soft-fp/e_sqrtl.c b/sysdeps/alpha/soft-fp/e_sqrtl.c index a1d09725b7..717d170127 100644 --- a/sysdeps/alpha/soft-fp/e_sqrtl.c +++ b/sysdeps/alpha/soft-fp/e_sqrtl.c @@ -19,7 +19,9 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include "local-soft-fp.h" +#include +#include +#include long double __ieee754_sqrtl (const long double a) @@ -27,6 +29,7 @@ __ieee754_sqrtl (const long double a) FP_DECL_EX; FP_DECL_Q(A); FP_DECL_Q(C); long double c; + long _round = 4; /* dynamic rounding */ FP_INIT_ROUNDMODE; FP_UNPACK_Q(A, a); diff --git a/sysdeps/unix/sysv/linux/alpha/fpu/Implies b/sysdeps/unix/sysv/linux/alpha/fpu/Implies deleted file mode 100644 index d76f511c2e..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/fpu/Implies +++ /dev/null @@ -1,2 +0,0 @@ -# Override ldbl-opt with alpha specific routines. -alpha/fpu diff --git a/sysdeps/unix/sysv/linux/alpha/fxstatat.c b/sysdeps/unix/sysv/linux/alpha/fxstatat.c index 4cb304cb40..497694619a 100644 --- a/sysdeps/unix/sysv/linux/alpha/fxstatat.c +++ b/sysdeps/unix/sysv/linux/alpha/fxstatat.c @@ -94,5 +94,6 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag) return -1; } -strong_alias (__fxstatat, __fxstatat64) -strong_alias (__fxstatat64, __GI___fxstatat64) +libc_hidden_def (__fxstatat) +strong_alias (__fxstatat, __fxstatat64); +libc_hidden_ver(__fxstatat, __fxstatat64); From 52701b0cfd103a527ac243ec329649f403b075a9 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 21 Feb 2006 02:02:44 +0000 Subject: [PATCH 3559/4487] 2006-01-12 Roland McGrath * sysdeps/arm/jmpbuf-unwind.h: Include . --- sysdeps/arm/jmpbuf-unwind.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/arm/jmpbuf-unwind.h b/sysdeps/arm/jmpbuf-unwind.h index 1e86662da5..7990eeb12d 100644 --- a/sysdeps/arm/jmpbuf-unwind.h +++ b/sysdeps/arm/jmpbuf-unwind.h @@ -17,6 +17,7 @@ 02111-1307 USA. */ #include +#include #include #include From b2f8c9b96bab6151dd7c5190c3b07a17228f52d4 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 21 Feb 2006 02:02:57 +0000 Subject: [PATCH 3560/4487] 2006-01-12 Roland McGrath * sysdeps/am33/jmpbuf-unwind.h: Include . --- sysdeps/am33/jmpbuf-unwind.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/am33/jmpbuf-unwind.h b/sysdeps/am33/jmpbuf-unwind.h index e2c4f0ca5b..1566a0b193 100644 --- a/sysdeps/am33/jmpbuf-unwind.h +++ b/sysdeps/am33/jmpbuf-unwind.h @@ -18,6 +18,7 @@ 02111-1307 USA. */ #include +#include /* Test if longjmp to JMPBUF would unwind the frame containing a local variable at ADDRESS. */ From 92724ebc20eab7058a169c656549a4f5d97bf45c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 21 Feb 2006 02:12:56 +0000 Subject: [PATCH 3561/4487] 2006-02-20 Roland McGrath * sysdeps/mips/shlib-versions: New file. * sysdeps/mips/preconfigure: New file. * sysdeps/unix/sysv/linux/mips/kernel-features.h: New file. --- sysdeps/mips/preconfigure | 29 ++++++++++++++++ sysdeps/mips/shlib-versions | 21 ++++++++++++ .../unix/sysv/linux/mips/kernel-features.h | 34 +++++++++++++++++++ 3 files changed, 84 insertions(+) create mode 100644 sysdeps/mips/preconfigure create mode 100644 sysdeps/mips/shlib-versions create mode 100644 sysdeps/unix/sysv/linux/mips/kernel-features.h diff --git a/sysdeps/mips/preconfigure b/sysdeps/mips/preconfigure new file mode 100644 index 0000000000..9190eee87a --- /dev/null +++ b/sysdeps/mips/preconfigure @@ -0,0 +1,29 @@ +case "$machine" in +mips64*) base_machine=mips64 + case "$CC $CFLAGS $CPPFLAGS " in + *" -mabi=n32 "*) mips_cc_abi=n32 ;; + *" -mabi=64 "*|*" -mabi=n64 "*) mips_cc_abi=64 ;; + *" -mabi=32 "*|*" -mabi=o32 "*) mips_cc_abi=32 ;; + *) mips_cc_abi=default ;; + esac + case $config_os in + *abin32*) mips_config_abi=n32 ;; + *abi64*|*abin64*) mips_config_abi=64 ;; + *abi32*|*abio32*) mips_config_abi=32 ;; + *) mips_config_abi=$mips_cc_abi ;; + esac + case $mips_config_abi in + default) machine=mips/mips64/n32 mips_config_abi=n32 ;; + n32) machine=mips/mips64/n32 ;; + 64) machine=mips/mips64/n64 ;; + 32) machine=mips/mips32/kern64 ;; + esac + machine=$machine/$config_machine + if test $mips_config_abi != $mips_cc_abi; then + # This won't make it to config.make, but we want to + # set this in case configure tests depend on it. + CPPFLAGS="$CPPFLAGS -mabi=$mips_config_abi" + fi + ;; +mips*) base_machine=mips machine=mips/mips32/$machine ;; +esac diff --git a/sysdeps/mips/shlib-versions b/sysdeps/mips/shlib-versions new file mode 100644 index 0000000000..780939369b --- /dev/null +++ b/sysdeps/mips/shlib-versions @@ -0,0 +1,21 @@ +mips.*-.*-linux.* libm=6 GLIBC_2.0 GLIBC_2.2 + +# Working mips versions were never released between 2.0 and 2.2. +mips.*-.*-linux.* libc=6 GLIBC_2.0 GLIBC_2.2 + +mips.*-.*-linux.* ld=ld.so.1 GLIBC_2.0 GLIBC_2.2 +mips.*-.*-linux.* libdl=2 GLIBC_2.0 GLIBC_2.2 + +mips.*-.*-linux.* libresolv=2 GLIBC_2.0 GLIBC_2.2 + +mips.*-.*-linux.* libnss_files=2 GLIBC_2.0 GLIBC_2.2 +mips.*-.*-linux.* libnss_dns=2 GLIBC_2.0 GLIBC_2.2 +mips.*-.*-linux.* libnss_compat=2 GLIBC_2.0 GLIBC_2.2 +mips.*-.*-linux.* libnss_nis=2 GLIBC_2.0 GLIBC_2.2 +mips.*-.*-linux.* libnss_nisplus=2 GLIBC_2.0 GLIBC_2.2 +mips.*-.*-linux.* libnss_ldap=2 GLIBC_2.0 GLIBC_2.2 +mips.*-.*-linux.* libnss_hesiod=2 GLIBC_2.0 GLIBC_2.2 + +mips.*-.*-linux.* libnsl=1 GLIBC_2.0 GLIBC_2.2 + +mips.*-.*-linux.* librt=1 GLIBC_2.0 GLIBC_2.2 diff --git a/sysdeps/unix/sysv/linux/mips/kernel-features.h b/sysdeps/unix/sysv/linux/mips/kernel-features.h new file mode 100644 index 0000000000..f479b60636 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/kernel-features.h @@ -0,0 +1,34 @@ +/* Set flags signalling availability of kernel features based on given + kernel version number. + Copyright (C) 1999-2003, 2004, 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 + 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. */ + +#include + +/* Linux 2.3.39 introduced 32bit UID/GIDs. Some platforms had 32 + bit type all along. */ +#define __ASSUME_32BITUIDS 1 + +/* MIPS platforms had IPC64 all along. */ +#define __ASSUME_IPC64 1 + +#if _MIPS_SIM == _ABIN32 +# define __ASSUME_FCNTL64 1 +#endif + +#include_next From 2575768d0b4a3b4b4e6d3537b3044eca202d12f5 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 21 Feb 2006 02:13:02 +0000 Subject: [PATCH 3562/4487] . --- ChangeLog.am33 | 4 ++++ ChangeLog.arm | 4 ++++ ChangeLog.mips | 5 +++++ 3 files changed, 13 insertions(+) create mode 100644 ChangeLog.mips diff --git a/ChangeLog.am33 b/ChangeLog.am33 index 53fd44e9e8..f794cc55dc 100644 --- a/ChangeLog.am33 +++ b/ChangeLog.am33 @@ -1,3 +1,7 @@ +2006-01-12 Roland McGrath + + * sysdeps/am33/jmpbuf-unwind.h: Include . + 2006-01-10 Roland McGrath * sysdeps/am33/bits/setjmp.h (__JMP_BUF_SP): Macro moved ... diff --git a/ChangeLog.arm b/ChangeLog.arm index b8fca1af47..51b135d4c3 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,7 @@ +2006-01-12 Roland McGrath + + * sysdeps/arm/jmpbuf-unwind.h: Include . + 2006-01-10 Roland McGrath * sysdeps/arm/bits/setjmp.h (__JMP_BUF_SP): Macro moved to ... diff --git a/ChangeLog.mips b/ChangeLog.mips new file mode 100644 index 0000000000..2881533c06 --- /dev/null +++ b/ChangeLog.mips @@ -0,0 +1,5 @@ +2006-02-20 Roland McGrath + + * sysdeps/mips/shlib-versions: New file. + * sysdeps/mips/preconfigure: New file. + * sysdeps/unix/sysv/linux/mips/kernel-features.h: New file. From a991de32677e4cfba3ef2418475c7d4ef36fe0c7 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 25 Feb 2006 01:24:57 +0000 Subject: [PATCH 3563/4487] 2006-02-09 Joseph S. Myers * soft-fp/op-common.h (_FP_UNPACK_SEMIRAW): Define. (_FP_OVERFLOW_SEMIRAW): Likewise. (_FP_CHECK_SIGNAN_SEMIRAW): Likewise. (_FP_CHOOSENAN_SEMIRAW): Likewise. (_FP_EXP_NORMAL): Likewise. (_FP_PACK_SEMIRAW): Likewise. (_FP_ADD_INTERNAL): Rewrite to operate on semi-raw value. (_FP_SUB): Likewise. (_FP_TO_INT): Rewrite to operate on raw values. Don't set INVALID exception for conversions where most negative representable integer is correct truncated value, but do set INEXACT for such conversions where appropriate. Don't always left-shift for converting to a wider integer. (_FP_FROM_INT): Rewrite to yield raw value. Correct shift for integers with one more bits than (mantissa + guard) bits for the floating point format. Don't use __FP_FRAC_SRS_1 for shifting integers that may be wider than _FP_W_TYPE_SIZE. (FP_CONV): Don't define. (FP_EXTEND): Define. (FP_TRUNC): Likewise. * soft-fp/op-1.h (_FP_FRAC_SRST_1, __FP_FRAC_SRST_1): Define. (_FP_FRAC_CONV_1_1): Don't define. (_FP_FRAC_COPY_1_1): Define. * soft-fp/op-2.h (_FP_FRAC_SRST_2): Define. (_FP_FRAC_CONV_1_2, _FP_FRAC_CONV_2_1): Don't define. (_FP_FRAC_COPY_1_2, _FP_FRAC_COPY_2_1): Define. * soft-fp/op-4.h (_FP_FRAC_SRST_4): Define. (_FP_FRAC_SRS_4): Define based on _FP_FRAC_SRST_4. (_FP_FRAC_CONV_1_4, _FP_FRAC_CONV_2_4): Don't define. (_FP_FRAC_COPY_1_4, _FP_FRAC_COPY_2_4): Define. (_FP_FRAC_CONV_4_1, _FP_FRAC_CONV_4_2): Don't define. (_FP_FRAC_COPY_4_1, _FP_FRAC_COPY_4_2): Define. * soft-fp/single.h (_FP_FRACTBITS_S): Define. (_FP_FRACXBITS_S): Define in terms of _FP_FRACXBITS_S. (_FP_WFRACXBITS_S): Likewise. (_FP_QNANBIT_SH_S, _FP_IMPLBIT_SH_S): Define. (FP_UNPACK_SEMIRAW_S, FP_UNPACK_SEMIRAW_SP): Define. (FP_PACK_SEMIRAW_S, FP_PACK_SEMIRAW_SP): Define. * soft-fp/double.h (_FP_QNANBIT_SH_D, _FP_IMPLBIT_SH_D): Define. (FP_UNPACK_SEMIRAW_D, FP_UNPACK_SEMIRAW_D): Define (FP_PACK_SEMIRAW_D, FP_PACK_SEMIRAW_DP): Define. * soft-fp/extended.h (_FP_QNANBIT_SH_E, _FP_IMPLBIT_SH_E): Define. (FP_UNPACK_EP): Correct typo. (FP_UNPACK_SEMIRAW_E, FP_UNPACK_SEMIRAW_EP): Define. (FP_PACK_SEMIRAW_E, FP_PACK_SEMIRAW_EP): Define. * soft-fp/quad.h (_FP_QNANBIT_SH_Q, _FP_IMPLBIT_SH_Q): Define. (FP_UNPACK_SEMIRAW_Q, FP_UNPACK_SEMIRAW_QP): Define. (FP_PACK_SEMIRAW_Q, FP_PACK_SEMIRAW_QP): Define. * soft-fp/fixdfdi.c: Use unsigned type for result of conversion. * soft-fp/fixdfsi.c: Likewise. * soft-fp/fixsfdi.c: Likewise. * soft-fp/fixsfsi.c: Likewise. * soft-fp/fixtfdi.c: Likewise. * soft-fp/fixtfsi.c: Likewise. * sysdeps/alpha/soft-fp/ots_cvtxq.c: Likewise. * sysdeps/alpha/soft-fp/ots_nintxq.c: Likewise. * sysdeps/powerpc/soft-fp/q_qtoi.c: Likewise. * sysdeps/powerpc/soft-fp/q_qtoll.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_qtoi.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_qtoll.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_qtoi.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_qtox.c: Likewise. * soft-fp/adddf3.c: Update for changed soft-fp interfaces. * soft-fp/addsf3.c: Likewise. * soft-fp/addtf3.c: Likewise. * soft-fp/extenddftf2.c: Likewise. * soft-fp/extendsfdf2.c: Likewise. * soft-fp/extendsftf2.c: Likewise. * soft-fp/fixdfdi.c: Likewise. * soft-fp/fixdfsi.c: Likewise. * soft-fp/fixsfdi.c: Likewise. * soft-fp/fixsfsi.c: Likewise. * soft-fp/fixtfdi.c: Likewise. * soft-fp/fixtfsi.c: Likewise. * soft-fp/fixunsdfdi.c: Likewise. * soft-fp/fixunsdfsi.c: Likewise. * soft-fp/fixunssfdi.c: Likewise. * soft-fp/fixunssfsi.c: Likewise. * soft-fp/fixunstfdi.c: Likewise. * soft-fp/fixunstfsi.c: Likewise. * soft-fp/floatdidf.c: Likewise. * soft-fp/floatdisf.c: Likewise. * soft-fp/floatditf.c: Likewise. * soft-fp/floatsidf.c: Likewise. * soft-fp/floatsisf.c: Likewise. * soft-fp/floatsitf.c: Likewise. * soft-fp/floatundidf.c: Likewise. * soft-fp/floatundisf.c: Likewise. * soft-fp/floatunditf.c: Likewise. * soft-fp/floatunsidf.c: Likewise. * soft-fp/floatunsisf.c: Likewise. * soft-fp/floatunsitf.c: Likewise. * soft-fp/subdf3.c: Likewise. * soft-fp/subsf3.c: Likewise. * soft-fp/subtf3.c: Likewise. * soft-fp/truncdfsf2.c: Likewise. * soft-fp/trunctfdf2.c: Likewise. * soft-fp/trunctfsf2.c: Likewise. * sysdeps/alpha/soft-fp/ots_add.c: Likewise. * sysdeps/alpha/soft-fp/ots_cvtqux.c: Likewise. * sysdeps/alpha/soft-fp/ots_cvtqx.c: Likewise. * sysdeps/alpha/soft-fp/ots_cvttx.c: Likewise. * sysdeps/alpha/soft-fp/ots_cvtxq.c: Likewise. * sysdeps/alpha/soft-fp/ots_cvtxt.c: Likewise. * sysdeps/alpha/soft-fp/ots_nintxq.c: Likewise. * sysdeps/alpha/soft-fp/ots_sub.c: Likewise. * sysdeps/powerpc/soft-fp/q_add.c: Likewise. * sysdeps/powerpc/soft-fp/q_dtoq.c: Likewise. * sysdeps/powerpc/soft-fp/q_itoq.c: Likewise. * sysdeps/powerpc/soft-fp/q_lltoq.c: Likewise. * sysdeps/powerpc/soft-fp/q_qtod.c: Likewise. * sysdeps/powerpc/soft-fp/q_qtoi.c: Likewise. * sysdeps/powerpc/soft-fp/q_qtoll.c: Likewise. * sysdeps/powerpc/soft-fp/q_qtos.c: Likewise. * sysdeps/powerpc/soft-fp/q_qtou.c: Likewise. * sysdeps/powerpc/soft-fp/q_qtoull.c: Likewise. * sysdeps/powerpc/soft-fp/q_stoq.c: Likewise. * sysdeps/powerpc/soft-fp/q_sub.c: Likewise. * sysdeps/powerpc/soft-fp/q_ulltoq.c: Likewise. * sysdeps/powerpc/soft-fp/q_utoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_add.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_dtoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_itoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_lltoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_qtod.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_qtoi.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_qtoll.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_qtos.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_qtou.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_qtoull.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_stoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_sub.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_utoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_add.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_dtoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_itoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_qtod.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_qtoi.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_qtos.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_qtoui.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_qtoux.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_qtox.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_stoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_sub.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_uitoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_uxtoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_xtoq.c: Likewise. --- sysdeps/alpha/soft-fp/ots_add.c | 8 ++++---- sysdeps/alpha/soft-fp/ots_cvtqux.c | 4 ++-- sysdeps/alpha/soft-fp/ots_cvtqx.c | 4 ++-- sysdeps/alpha/soft-fp/ots_cvttx.c | 10 +++++----- sysdeps/alpha/soft-fp/ots_cvtxq.c | 7 ++++--- sysdeps/alpha/soft-fp/ots_cvtxt.c | 10 +++++----- sysdeps/alpha/soft-fp/ots_nintxq.c | 12 +++++++----- sysdeps/alpha/soft-fp/ots_sub.c | 8 ++++---- 8 files changed, 33 insertions(+), 30 deletions(-) diff --git a/sysdeps/alpha/soft-fp/ots_add.c b/sysdeps/alpha/soft-fp/ots_add.c index b4f6c28f3d..acf66f316b 100644 --- a/sysdeps/alpha/soft-fp/ots_add.c +++ b/sysdeps/alpha/soft-fp/ots_add.c @@ -1,5 +1,5 @@ /* Software floating-point emulation: addition. - Copyright (C) 1997,1999,2004 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2004,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). @@ -29,10 +29,10 @@ _OtsAddX(long al, long ah, long bl, long bh, long _round) FP_DECL_RETURN(c); FP_INIT_ROUNDMODE; - FP_UNPACK_Q(A, a); - FP_UNPACK_Q(B, b); + FP_UNPACK_SEMIRAW_Q(A, a); + FP_UNPACK_SEMIRAW_Q(B, b); FP_ADD_Q(C, A, B); - FP_PACK_Q(c, C); + FP_PACK_SEMIRAW_Q(c, C); FP_HANDLE_EXCEPTIONS; FP_RETURN(c); diff --git a/sysdeps/alpha/soft-fp/ots_cvtqux.c b/sysdeps/alpha/soft-fp/ots_cvtqux.c index d7ab5bae43..cdb83c882b 100644 --- a/sysdeps/alpha/soft-fp/ots_cvtqux.c +++ b/sysdeps/alpha/soft-fp/ots_cvtqux.c @@ -1,5 +1,5 @@ /* Software floating-point emulation: unsigned integer to float conversion. - Copyright (C) 1997,1999,2004 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2004,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). @@ -34,7 +34,7 @@ _OtsCvtQUX (unsigned long a) FP_DECL_RETURN(c); FP_FROM_INT_Q(C, a, 64, long); - FP_PACK_Q(c, C); + FP_PACK_RAW_Q(c, C); FP_RETURN(c); } diff --git a/sysdeps/alpha/soft-fp/ots_cvtqx.c b/sysdeps/alpha/soft-fp/ots_cvtqx.c index 0e1c6bdc41..6248f9ad10 100644 --- a/sysdeps/alpha/soft-fp/ots_cvtqx.c +++ b/sysdeps/alpha/soft-fp/ots_cvtqx.c @@ -1,5 +1,5 @@ /* Software floating-point emulation: signed integer to float conversion. - Copyright (C) 1997,1999,2004 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2004,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). @@ -34,6 +34,6 @@ _OtsCvtQX (long a) FP_DECL_RETURN(c); FP_FROM_INT_Q(C, a, 64, long); - FP_PACK_Q(c, C); + FP_PACK_RAW_Q(c, C); FP_RETURN(c); } diff --git a/sysdeps/alpha/soft-fp/ots_cvttx.c b/sysdeps/alpha/soft-fp/ots_cvttx.c index ee5ac324cd..2d0bc9bca9 100644 --- a/sysdeps/alpha/soft-fp/ots_cvttx.c +++ b/sysdeps/alpha/soft-fp/ots_cvttx.c @@ -1,5 +1,5 @@ /* Software floating-point emulation: floating point extension. - Copyright (C) 1997,1999,2004 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2004,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). @@ -35,13 +35,13 @@ _OtsConvertFloatTX(double a) FP_DECL_Q(C); FP_DECL_RETURN(c); - FP_UNPACK_D(A, a); + FP_UNPACK_RAW_D(A, a); #if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q - FP_CONV(Q,D,4,2,C,A); + FP_EXTEND(Q,D,4,2,C,A); #else - FP_CONV(Q,D,2,1,C,A); + FP_EXTEND(Q,D,2,1,C,A); #endif - FP_PACK_Q(c, C); + FP_PACK_RAW_Q(c, C); FP_HANDLE_EXCEPTIONS; FP_RETURN(c); diff --git a/sysdeps/alpha/soft-fp/ots_cvtxq.c b/sysdeps/alpha/soft-fp/ots_cvtxq.c index 1fd47da4f7..2c9df529d5 100644 --- a/sysdeps/alpha/soft-fp/ots_cvtxq.c +++ b/sysdeps/alpha/soft-fp/ots_cvtxq.c @@ -1,5 +1,5 @@ /* Software floating-point emulation: float to integer conversion. - Copyright (C) 1997,1999,2004 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2004,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). @@ -26,14 +26,15 @@ _OtsCvtXQ (long al, long ah, long _round) { FP_DECL_EX; FP_DECL_Q(A); - long r, s; + unsigned long r; + long s; /* If bit 3 is set, then integer overflow detection is requested. */ s = _round & 8 ? 1 : -1; _round = _round & 3; FP_INIT_ROUNDMODE; - FP_UNPACK_Q(A, a); + FP_UNPACK_RAW_Q(A, a); FP_TO_INT_Q(r, A, 64, s); if (s > 0 && (_fex &= FP_EX_INVALID)) diff --git a/sysdeps/alpha/soft-fp/ots_cvtxt.c b/sysdeps/alpha/soft-fp/ots_cvtxt.c index 2629dd9e40..6221a2365c 100644 --- a/sysdeps/alpha/soft-fp/ots_cvtxt.c +++ b/sysdeps/alpha/soft-fp/ots_cvtxt.c @@ -1,5 +1,5 @@ /* Software floating-point emulation: floating point truncation. - Copyright (C) 1997,1999,2004 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2004,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). @@ -31,13 +31,13 @@ _OtsConvertFloatXT (long al, long ah, long _round) double r; FP_INIT_ROUNDMODE; - FP_UNPACK_Q(A, a); + FP_UNPACK_SEMIRAW_Q(A, a); #if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q - FP_CONV(D,Q,2,4,R,A); + FP_TRUNC(D,Q,2,4,R,A); #else - FP_CONV(D,Q,1,2,R,A); + FP_TRUNC(D,Q,1,2,R,A); #endif - FP_PACK_D(r, R); + FP_PACK_SEMIRAW_D(r, R); FP_HANDLE_EXCEPTIONS; return r; diff --git a/sysdeps/alpha/soft-fp/ots_nintxq.c b/sysdeps/alpha/soft-fp/ots_nintxq.c index 2cb1ca4c2a..a718372af7 100644 --- a/sysdeps/alpha/soft-fp/ots_nintxq.c +++ b/sysdeps/alpha/soft-fp/ots_nintxq.c @@ -1,5 +1,5 @@ /* Software floating-point emulation: convert to fortran nearest. - Copyright (C) 1997,1999,2004 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2004,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). @@ -26,22 +26,24 @@ _OtsNintXQ (long al, long ah, long _round) { FP_DECL_EX; FP_DECL_Q(A); FP_DECL_Q(B); FP_DECL_Q(C); - long r, s; + unsigned long r; + long s; /* If bit 3 is set, then integer overflow detection is requested. */ s = _round & 8 ? 1 : -1; _round = _round & 3; FP_INIT_ROUNDMODE; - FP_UNPACK_Q(A, a); + FP_UNPACK_SEMIRAW_Q(A, a); /* Build 0.5 * sign(A) */ B_e = _FP_EXPBIAS_Q; - __FP_FRAC_SET_2 (B, _FP_IMPLBIT_Q, 0); + __FP_FRAC_SET_2 (B, 0, 0); B_s = A_s; - _FP_UNPACK_CANONICAL(Q,2,B); FP_ADD_Q(C, A, B); + _FP_FRAC_SRL_2(C, _FP_WORKBITS); + _FP_FRAC_HIGH_RAW_Q(C) &= ~(_FP_W_TYPE)_FP_IMPLBIT_Q; FP_TO_INT_Q(r, C, 64, s); if (s > 0 && (_fex &= FP_EX_INVALID)) FP_HANDLE_EXCEPTIONS; diff --git a/sysdeps/alpha/soft-fp/ots_sub.c b/sysdeps/alpha/soft-fp/ots_sub.c index c10043f071..5147266a04 100644 --- a/sysdeps/alpha/soft-fp/ots_sub.c +++ b/sysdeps/alpha/soft-fp/ots_sub.c @@ -1,5 +1,5 @@ /* Software floating-point emulation: subtraction. - Copyright (C) 1997,1999,2004 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2004,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). @@ -29,10 +29,10 @@ _OtsSubX(long al, long ah, long bl, long bh, long _round) FP_DECL_RETURN(c); FP_INIT_ROUNDMODE; - FP_UNPACK_Q(A, a); - FP_UNPACK_Q(B, b); + FP_UNPACK_SEMIRAW_Q(A, a); + FP_UNPACK_SEMIRAW_Q(B, b); FP_SUB_Q(C, A, B); - FP_PACK_Q(c, C); + FP_PACK_SEMIRAW_Q(c, C); FP_HANDLE_EXCEPTIONS; FP_RETURN(c); From de18c6e81f7bcfa766423790841ee8279a087298 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 25 Feb 2006 01:26:22 +0000 Subject: [PATCH 3564/4487] 2006-02-18 Joseph S. Myers * soft-fp/single.h (SFtype): Define. (union _FP_UNION_S): Use it. * soft-fp/double.h (DFtype): Define. (union _FP_UNION_D): Use it. * soft-fp/extended.h (XFtype): Define. (union _FP_UNION_E): Use it. * soft-fp/quad.h (TFtype): Define. (union _FP_UNION_Q): Use it. * soft-fp/soft-fp.h: Add _LIBC conditionals. (SI_BITS, DI_BITS): Define. * soft-fp/op-common.h (_FP_DECL): Add __attribute__((unused)) for X##_c. (_FP_CMP_EQ): Use parentheses for && inside ||. (_FP_TO_INT): Use statement expressions in conditional controlling constant shift. (_FP_FROM_INT): Likewise. Take unsigned type as argument. * soft-fp/op-2.h (_FP_FRAC_SLL_2, _FP_FRAC_SRL_2, _FP_FRAC_SRST_2, _FP_FRAC_SRS_2, _FP_FRAC_ASSEMBLE_2): Use statement expressions in conditional controlling possibly constant shift. (_FP_FRAC_SRST_2, _FP_FRAC_SRS_2): Avoid left shift by exactly _FP_W_TYPE_SIZE. (_FP_FRAC_GT_2, _FP_FRAC_GE_2): Use parentheses for && inside ||. * soft-fp/op-4.h (_FP_FRAC_SRST_4): Avoid left shift by exactly _FP_W_TYPE_SIZE. (__FP_FRAC_ADD_3, __FP_FRAC_ADD_4, __FP_FRAC_SUB_3, __FP_FRAC_SUB_4): Use _FP_W_TYPE for carry flags. * soft-fp/op-8.h (_FP_FRAC_SRS_8): Avoid left shift by exactly _FP_W_TYPE_SIZE. * soft-fp/floatdidf.c: Pass unsigned type and macro for type size. * soft-fp/floatdisf.c: Likewise. * soft-fp/floatditf.c: Likewise. * soft-fp/floatsidf.c: Likewise. * soft-fp/floatsisf.c: Likewise. * soft-fp/floatsitf.c: Likewise. * soft-fp/floatundidf.c: Likewise. * soft-fp/floatundisf.c: Likewise. * soft-fp/floatunditf.c: Likewise. * soft-fp/floatunsidf.c: Likewise. * soft-fp/floatunsisf.c: Likewise. * soft-fp/floatunsitf.c: Likewise. * soft-fp/fixdfdi.c: Pass macro for type size. * soft-fp/fixdfsi.c: Likewise. * soft-fp/fixsfdi.c: Likewise. * soft-fp/fixsfsi.c: Likewise. * soft-fp/fixtfdi.c: Likewise. * soft-fp/fixtfsi.c: Likewise. * soft-fp/fixunsdfdi.c: Likewise. * soft-fp/fixunsdfsi.c: Likewise. * soft-fp/fixunssfdi.c: Likewise. * soft-fp/fixunssfsi.c: Likewise. * soft-fp/fixunstfdi.c: Likewise. * soft-fp/fixunstfsi.c: Likewise. * sysdeps/alpha/soft-fp/ots_cvtqux.c: Pass unsigned type. * sysdeps/alpha/soft-fp/ots_cvtqx.c: Likewise. * sysdeps/powerpc/soft-fp/q_itoq.c: Likewise. * sysdeps/powerpc/soft-fp/q_lltoq.c: Likewise. * sysdeps/powerpc/soft-fp/q_ulltoq.c: Likewise. * sysdeps/powerpc/soft-fp/q_utoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_itoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_lltoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_utoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_itoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_uitoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_uxtoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_xtoq.c: Likewise. * soft-fp/adddf3.c: Use typedefs for argument and return types. * soft-fp/addsf3.c: Likewise. * soft-fp/addtf3.c: Likewise. * soft-fp/divdf3.c: Likewise. * soft-fp/divsf3.c: Likewise. * soft-fp/divtf3.c: Likewise. * soft-fp/eqdf2.c: Likewise. * soft-fp/eqsf2.c: Likewise. * soft-fp/eqtf2.c: Likewise. * soft-fp/extenddftf2.c: Likewise. * soft-fp/extendsfdf2.c: Likewise. * soft-fp/extendsftf2.c: Likewise. * soft-fp/fixdfdi.c: Likewise. * soft-fp/fixdfsi.c: Likewise. * soft-fp/fixsfdi.c: Likewise. * soft-fp/fixsfsi.c: Likewise. * soft-fp/fixtfdi.c: Likewise. * soft-fp/fixtfsi.c: Likewise. * soft-fp/fixunsdfdi.c: Likewise. * soft-fp/fixunsdfsi.c: Likewise. * soft-fp/fixunssfdi.c: Likewise. * soft-fp/fixunssfsi.c: Likewise. * soft-fp/fixunstfdi.c: Likewise. * soft-fp/fixunstfsi.c: Likewise. * soft-fp/floatdidf.c: Likewise. * soft-fp/floatdisf.c: Likewise. * soft-fp/floatditf.c: Likewise. * soft-fp/floatsidf.c: Likewise. * soft-fp/floatsisf.c: Likewise. * soft-fp/floatsitf.c: Likewise. * soft-fp/floatundidf.c: Likewise. * soft-fp/floatundisf.c: Likewise. * soft-fp/floatunditf.c: Likewise. * soft-fp/floatunsidf.c: Likewise. * soft-fp/floatunsisf.c: Likewise. * soft-fp/floatunsitf.c: Likewise. * soft-fp/gedf2.c: Likewise. * soft-fp/gesf2.c: Likewise. * soft-fp/getf2.c: Likewise. * soft-fp/ledf2.c: Likewise. * soft-fp/lesf2.c: Likewise. * soft-fp/letf2.c: Likewise. * soft-fp/muldf3.c: Likewise. * soft-fp/mulsf3.c: Likewise. * soft-fp/multf3.c: Likewise. * soft-fp/negdf2.c: Likewise. * soft-fp/negsf2.c: Likewise. * soft-fp/negtf2.c: Likewise. * soft-fp/sqrtdf2.c: Likewise. * soft-fp/sqrtsf2.c: Likewise. * soft-fp/sqrttf2.c: Likewise. * soft-fp/subdf3.c: Likewise. * soft-fp/subsf3.c: Likewise. * soft-fp/subtf3.c: Likewise. * soft-fp/truncdfsf2.c: Likewise. * soft-fp/trunctfdf2.c: Likewise. * soft-fp/trunctfsf2.c: Likewise. * soft-fp/unorddf2.c: Likewise. * soft-fp/unordsf2.c: Likewise. * soft-fp/unordtf2.c: Likewise. --- sysdeps/alpha/soft-fp/ots_cvtqux.c | 2 +- sysdeps/alpha/soft-fp/ots_cvtqx.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/alpha/soft-fp/ots_cvtqux.c b/sysdeps/alpha/soft-fp/ots_cvtqux.c index cdb83c882b..82c50806c4 100644 --- a/sysdeps/alpha/soft-fp/ots_cvtqux.c +++ b/sysdeps/alpha/soft-fp/ots_cvtqux.c @@ -33,7 +33,7 @@ _OtsCvtQUX (unsigned long a) FP_DECL_Q(C); FP_DECL_RETURN(c); - FP_FROM_INT_Q(C, a, 64, long); + FP_FROM_INT_Q(C, a, 64, unsigned long); FP_PACK_RAW_Q(c, C); FP_RETURN(c); diff --git a/sysdeps/alpha/soft-fp/ots_cvtqx.c b/sysdeps/alpha/soft-fp/ots_cvtqx.c index 6248f9ad10..dc80291506 100644 --- a/sysdeps/alpha/soft-fp/ots_cvtqx.c +++ b/sysdeps/alpha/soft-fp/ots_cvtqx.c @@ -33,7 +33,7 @@ _OtsCvtQX (long a) FP_DECL_Q(C); FP_DECL_RETURN(c); - FP_FROM_INT_Q(C, a, 64, long); + FP_FROM_INT_Q(C, a, 64, unsigned long); FP_PACK_RAW_Q(c, C); FP_RETURN(c); } From 8e674bfd64c2d16fde34795f18969b137d82f1c0 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Mon, 27 Feb 2006 15:22:31 +0000 Subject: [PATCH 3565/4487] * sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c: Don't use sysdeps/generic/. * sysdeps/unix/sysv/linux/arm/eabi/truncate64.c: Likewise. --- ChangeLog.arm | 6 ++++++ sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c | 2 +- sysdeps/unix/sysv/linux/arm/eabi/truncate64.c | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 51b135d4c3..0d4f5fd5dc 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,9 @@ +2006-02-27 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c: Don't use + sysdeps/generic/. + * sysdeps/unix/sysv/linux/arm/eabi/truncate64.c: Likewise. + 2006-01-12 Roland McGrath * sysdeps/arm/jmpbuf-unwind.h: Include . diff --git a/sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c b/sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c index 295d12fd24..38a4fbcd6e 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c +++ b/sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c @@ -73,5 +73,5 @@ weak_alias (__ftruncate64, ftruncate64) #else /* Use the generic implementation. */ -# include +# include #endif diff --git a/sysdeps/unix/sysv/linux/arm/eabi/truncate64.c b/sysdeps/unix/sysv/linux/arm/eabi/truncate64.c index d788733e32..6a9c348d87 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/truncate64.c +++ b/sysdeps/unix/sysv/linux/arm/eabi/truncate64.c @@ -71,5 +71,5 @@ truncate64 (const char *path, off64_t length) #else /* Use the generic implementation. */ -# include +# include #endif From a883978723ca006fa66c5a13c28c4791779bd0e0 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Mon, 27 Feb 2006 15:36:07 +0000 Subject: [PATCH 3566/4487] * sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h (struct __pthread_internal_slist): New. (union pthread_mutex_t): Give struct a tag. Add __list in an anonymous union. (union pthread_cond_t): Use __extension__. * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h (__lll_mutex_lock_outlined, __lll_mutex_timedlock_outlined): Remove prototypes. (lll_robust_mutex_dead, __lll_robust_mutex_trylock, lll_robust_mutex_trylock, __lll_robust_mutex_lock, lll_robust_mutex_lock, lll_robust_mutex_cond_lock, __lll_robust_mutex_timedlock, lll_robust_mutex_timedlock, __lll_robust_mutex_unlock, lll_robust_mutex_unlock): New. (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes. --- ChangeLog.arm | 18 +++++ .../sysv/linux/arm/nptl/bits/pthreadtypes.h | 24 +++++-- .../unix/sysv/linux/arm/nptl/lowlevellock.h | 65 +++++++++++++++++-- 3 files changed, 95 insertions(+), 12 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 0d4f5fd5dc..abc3563497 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,21 @@ +2006-02-27 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h + (struct __pthread_internal_slist): New. + (union pthread_mutex_t): Give struct a tag. Add __list + in an anonymous union. + (union pthread_cond_t): Use __extension__. + * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h + (__lll_mutex_lock_outlined, __lll_mutex_timedlock_outlined): Remove + prototypes. + (lll_robust_mutex_dead, __lll_robust_mutex_trylock, + lll_robust_mutex_trylock, __lll_robust_mutex_lock, + lll_robust_mutex_lock, lll_robust_mutex_cond_lock, + __lll_robust_mutex_timedlock, lll_robust_mutex_timedlock, + __lll_robust_mutex_unlock, lll_robust_mutex_unlock): New. + (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New + prototypes. + 2006-02-27 Daniel Jacobowitz * sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c: Don't use diff --git a/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h index fb0fe3f835..ea8d6a2f0b 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h +++ b/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 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 @@ -43,11 +43,17 @@ typedef union } pthread_attr_t; +typedef struct __pthread_internal_slist +{ + struct __pthread_internal_slist *__next; +} __pthread_slist_t; + + /* Data structures for mutex handling. The structure of the attribute type is not exposed on purpose. */ typedef union { - struct + struct __pthread_mutex_s { int __lock; unsigned int __count; @@ -56,7 +62,11 @@ typedef union binary compatibility. */ int __kind; unsigned int __nusers; - int __spins; + __extension__ union + { + int __spins; + __pthread_slist_t __list; + }; } __data; char __size[__SIZEOF_PTHREAD_MUTEX_T]; long int __align; @@ -77,15 +87,15 @@ typedef union { int __lock; unsigned int __futex; - unsigned long long int __total_seq; - unsigned long long int __wakeup_seq; - unsigned long long int __woken_seq; + __extension__ unsigned long long int __total_seq; + __extension__ unsigned long long int __wakeup_seq; + __extension__ unsigned long long int __woken_seq; void *__mutex; unsigned int __nwaiters; unsigned int __broadcast_seq; } __data; char __size[__SIZEOF_PTHREAD_COND_T]; - long long int __align; + __extension__ long long int __align; } pthread_cond_t; typedef union diff --git a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h index 7f1c291018..d1d0d65c4b 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2005 Free Software Foundation, Inc. +/* Copyright (C) 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 @@ -62,6 +62,15 @@ __ret; \ }) +#define lll_robust_mutex_dead(futexv) \ + do \ + { \ + int *__futexp = &(futexv); \ + atomic_or (__futexp, FUTEX_OWNER_DIED); \ + lll_futex_wake (__futexp, 1); \ + } \ + while (0) + /* Returns non-zero if error happened, zero if success. */ #define lll_futex_requeue(futexp, nr_wake, nr_move, mutex, val) \ ({ \ @@ -125,7 +134,15 @@ __lll_mutex_cond_trylock (int *futex) #define lll_mutex_cond_trylock(lock) __lll_mutex_cond_trylock (&(lock)) -extern void __lll_mutex_lock_outlined (int *futex) attribute_hidden; +static inline int __attribute__((always_inline)) +__lll_robust_mutex_trylock(int *futex, int id) +{ + return atomic_compare_and_exchange_val_acq (futex, id, 0) != 0; +} +#define lll_robust_mutex_trylock(lock, id) \ + __lll_robust_mutex_trylock (&(lock), id) + +extern int __lll_robust_lock_wait (int *futex) attribute_hidden; static inline void __attribute__((always_inline)) __lll_mutex_lock (int *futex) @@ -141,6 +158,18 @@ __lll_mutex_lock (int *futex) #define lll_mutex_lock(futex) __lll_mutex_lock (&(futex)) +static inline int __attribute__ ((always_inline)) +__lll_robust_mutex_lock (int *futex, int id) +{ + int result = 0; + if (atomic_compare_and_exchange_bool_acq (futex, id, 0) != 0) + result = __lll_robust_lock_wait (futex); + return result; +} +#define lll_robust_mutex_lock(futex, id) \ + __lll_robust_mutex_lock (&(futex), id) + + static inline void __attribute__ ((always_inline)) __lll_mutex_cond_lock (int *futex) { @@ -155,11 +184,13 @@ __lll_mutex_cond_lock (int *futex) #define lll_mutex_cond_lock(futex) __lll_mutex_cond_lock (&(futex)) +#define lll_robust_mutex_cond_lock(futex, id) \ + __lll_robust_mutex_lock (&(futex), (id) | FUTEX_WAITERS) + + extern int __lll_timedlock_wait (int *futex, const struct timespec *) attribute_hidden; - -extern int __lll_mutex_timedlock_outlined (int *futex, - const struct timespec *) +extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *) attribute_hidden; static inline int __attribute__ ((always_inline)) @@ -176,6 +207,19 @@ __lll_mutex_timedlock (int *futex, const struct timespec *abstime) __lll_mutex_timedlock (&(futex), abstime) +static inline int __attribute__ ((always_inline)) +__lll_robust_mutex_timedlock (int *futex, const struct timespec *abstime, + int id) +{ + int result = 0; + if (atomic_compare_and_exchange_bool_acq (futex, id, 0) != 0) + result = __lll_robust_timedlock_wait (futex, abstime); + return result; +} +#define lll_robust_mutex_timedlock(futex, abstime, id) \ + __lll_robust_mutex_timedlock (&(futex), abstime, id) + + static inline void __attribute__ ((always_inline)) __lll_mutex_unlock (int *futex) { @@ -186,6 +230,17 @@ __lll_mutex_unlock (int *futex) #define lll_mutex_unlock(futex) __lll_mutex_unlock(&(futex)) +static inline void __attribute__ ((always_inline)) +__lll_robust_mutex_unlock (int *futex, int mask) +{ + int val = atomic_exchange_rel (futex, 0); + if (__builtin_expect (val & mask, 0)) + lll_futex_wake (futex, 1); +} +#define lll_robust_mutex_unlock(futex) \ + __lll_robust_mutex_unlock(&(futex), FUTEX_WAITERS) + + static inline void __attribute__ ((always_inline)) __lll_mutex_unlock_force (int *futex) { From 5c67709f59ccf092af82c77eef005a2180824b7f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 28 Feb 2006 07:09:47 +0000 Subject: [PATCH 3567/4487] 2006-02-27 Roland McGrath * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of self to get main source tree's file. * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise. * sysdeps/unix/sysv/linux/i386/clone.S: Likewise. * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise. * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise. * sysdeps/unix/sysv/linux/sh/clone.S: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise. --- sysdeps/unix/sysv/linux/alpha/nptl/clone.S | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/clone.S b/sysdeps/unix/sysv/linux/alpha/nptl/clone.S index eea1cbeed1..675a997e97 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/clone.S +++ b/sysdeps/unix/sysv/linux/alpha/nptl/clone.S @@ -1,2 +1,9 @@ -#define RESET_PID -#include +/* We want an #include_next, but we are the main source file. + So, #include ourselves and in that incarnation we can use #include_next. */ +#ifndef INCLUDED_SELF +# define INCLUDED_SELF +# include +#else +# define RESET_PID +# include_next +#endif From cc949526a63e184807b6372a6cebe37ad83ffb74 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 28 Feb 2006 07:11:55 +0000 Subject: [PATCH 3568/4487] 2006-02-27 Roland McGrath * Makefile: Remove libc boilerplate. * Makeconfig: File removed. * configure.in: File removed. * configure: File removed. --- Makefile | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index d1cbbef489..79c7e0bc42 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,5 @@ -# This boilerplate is necessary just because any add-on directory -# gets added as a normal subdirectory for the glibc build process. - -subdir = ports - -include ../Rules +# This makefile is not used by the glibc build process. +# It's purely for making ports tarballs. .PHONY: dist dist-ports dist: dist-ports From c0bfd5cb70595af9432f20fac2925c375bfa12ed Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 28 Feb 2006 07:12:24 +0000 Subject: [PATCH 3569/4487] obsolete files removed --- Makeconfig | 41 ----------------------------------------- configure | 18 ------------------ configure.in | 18 ------------------ 3 files changed, 77 deletions(-) delete mode 100644 Makeconfig delete mode 100755 configure delete mode 100644 configure.in diff --git a/Makeconfig b/Makeconfig deleted file mode 100644 index 92158bef1c..0000000000 --- a/Makeconfig +++ /dev/null @@ -1,41 +0,0 @@ -# Makeconfig fragment for glibc ports add-on. - -# These rules make sure that sysdeps/CPU/preconfigure changes are noticed. -# preconfigure fragments can be written by hand, or they can be generated -# from preconfigure.in by autoconf like sysdeps/.../configure.in files. - -# Figure out the name of this add-on. The ports add-on infrastructure -# scripts can be copied into separate add-on packages by any name. -ports-sysdeps = $(..)$(Makeconfig-add-on)/sysdeps - -$(common-objpfx)config.status: $(wildcard $(ports-sysdeps)/*/preconfigure) - -ifneq ($(AUTOCONF),no) - -ifeq ($(with-cvs),yes) -define autoconf-it-cvs -test ! -d CVS || cvs $(CVSOPTS) commit -m'Regenerated: autoconf $(ACFLAGS) $<' $@ -endef -else -autoconf-it-cvs = -endif - -define autoconf-it -@-rm -f $@.new -$(AUTOCONF) $(ACFLAGS) $< > $@.new -chmod a-w,a+x $@.new -mv -f $@.new $@ -$(autoconf-it-cvs) -endef - -$(..)ports/sysdeps/%/preconfigure: $(..)ports/sysdeps/%/preconfigure.in \ - aclocal.m4 - $(autoconf-it) - -endif # $(AUTOCONF) = no - -# This allows e.g. `make ports/dist' from a build directory. -ifndef subdir -ports/%: - $(MAKE) $(PARALLELMFLAGS) -C $(@D) $(@F) -endif diff --git a/configure b/configure deleted file mode 100755 index 77d4ea47a4..0000000000 --- a/configure +++ /dev/null @@ -1,18 +0,0 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! - -# The configure fragment in this file provides infrastructure for a glibc -# add-on containing one or more glibc ports. Only these few script files -# need exist in the top-level source directory of the add-on. The ports -# themselves are contained entirely within their new sysdeps/ directories. -# This makes it easy to take these few top-level files plus a new port's -# additions to the sysdeps tree, and package a small add-on for that port. -# The same infrastructure scripts work for any number of such glibc ports -# collected together into a single shared add-on package. - -cpu_frags=`(cd $srcdir/$libc_add_on; echo sysdeps/*/preconfigure)` -test x"$cpu_frags" = x'sysdeps/*/preconfigure' || -for frag in $cpu_frags; do - echo "$as_me:$LINENO: result: ports add-on running preconfigure fragment $frag" >&5 -echo "${ECHO_T}ports add-on running preconfigure fragment $frag" >&6 - . $srcdir/$libc_add_on/$frag -done diff --git a/configure.in b/configure.in deleted file mode 100644 index 93b987ab17..0000000000 --- a/configure.in +++ /dev/null @@ -1,18 +0,0 @@ -dnl glibc add-on configure.in fragment for a ports add-on. -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. - -# The configure fragment in this file provides infrastructure for a glibc -# add-on containing one or more glibc ports. Only these few script files -# need exist in the top-level source directory of the add-on. The ports -# themselves are contained entirely within their new sysdeps/ directories. -# This makes it easy to take these few top-level files plus a new port's -# additions to the sysdeps tree, and package a small add-on for that port. -# The same infrastructure scripts work for any number of such glibc ports -# collected together into a single shared add-on package. - -cpu_frags=`(cd $srcdir/$libc_add_on; echo sysdeps/*/preconfigure)` -test x"$cpu_frags" = x'sysdeps/*/preconfigure' || -for frag in $cpu_frags; do - AC_MSG_RESULT(ports add-on running preconfigure fragment $frag) - . $srcdir/$libc_add_on/$frag -done From dea41b77f0b2ab8de6243479525a853e48316fa4 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 28 Feb 2006 07:12:30 +0000 Subject: [PATCH 3570/4487] . --- ChangeLog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index 6ddb2259e5..391c8824e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-02-27 Roland McGrath + + * Makefile: Remove libc boilerplate. + * Makeconfig: File removed. + * configure.in: File removed. + * configure: File removed. + 2005-03-22 Roland McGrath * Makefile ($(distname).tar): Fail if sysdeps/.../configure files are From 43d37683379da221611dcad9fc1b151bbb9df6c9 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 28 Feb 2006 08:23:38 +0000 Subject: [PATCH 3571/4487] 2006-02-28 Roland McGrath * README: Update for new add-on scheme. --- README | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/README b/README index 8e416b7d48..f395a05c35 100644 --- a/README +++ b/README @@ -1,13 +1,24 @@ -This directory is an add-on for the GNU C Library (glibc). -It provides additional ports to machines and/or operating systems that are -not maintained in the official glibc source tree. +This is the glibc ports repository, an add-on for the GNU C Library (glibc). +It contains code that is not maintained in the official glibc source tree. -The scripts in the top level of this directory provide the infrastructure -necessary for a glibc add-on. You can make a new add-on containing one or -more ports by copying configure, configure.in, and Makeconfig into your own -add-on directory, which you can give any name (it doesn't have to be -`ports'). You may want to include a README and Banner of your own talking -about your port's code in particular, rather than the generic ones here. +This includes working ports to GNU/Linux on some machine architectures that +are not maintained in the official glibc source tree. It also includes +some code once used by old libc ports now defunct, which has been abandoned +but may be useful for some future porter to examine. It may also include +some optimized functions tailored for specific CPU implementations of an +architecture, to be selected using --with-cpu. + +The ports repository is cooperatively maintained by volunteers on the + mailing list, and housed in the glibc CVS as a +module called "ports". See http://www.gnu.org/software/libc/resources.html +for details on using CVS. To report a bug in code housed in the ports +repository, please go to http://sources.redhat.com/bugzilla/ and file a bug +report under the glibc "ports" component. + +An add-on for an individual port can be made from just the sysdeps/ +subdirectories containing the port's code. You may want to include a +README and Banner of your own talking about your port's code in particular, +rather than the generic ones here. The real source code for any ports is found in the sysdeps/ subdirectories. These should be exactly what would go into the main libc source tree if you @@ -25,15 +36,8 @@ rules for glibc add-on configure fragments. No preconfigure file should do anything on an unrelated configuration, so that disparate ports can be put into a single add-on without interfering with each other. -Like all glibc add-ons, the only way to use this is to place this directory -(just a symlink won't do) inside the top-level glibc source directory. -Then include the name of this directory (e.g. `ports') when you specify -`--enable-add-ons=...' to glibc's configure (or use just --enable-add-ons -to have it try every add-on directory sitting in your source tree). - -If you find problems with the top-level scripts in this add-on, please go -to http://sources.redhat.com/bugzilla/ and file a report for the glibc -under the "admin" component. +Like all glibc add-ons, this must be used by specifying the directory in +the --enable-add-ons option when running glibc's configure script. $Id$ From 7b1830489bd51d7d860cd96ec502f02ff5c91b53 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 28 Feb 2006 08:23:43 +0000 Subject: [PATCH 3572/4487] . --- ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ChangeLog b/ChangeLog index 391c8824e3..f0ff75c25a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-02-28 Roland McGrath + + * README: Update for new add-on scheme. + 2006-02-27 Roland McGrath * Makefile: Remove libc boilerplate. From 400dc23c6413cdb3c838fddd5a7dc310292727ba Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 28 Feb 2006 08:33:00 +0000 Subject: [PATCH 3573/4487] 2006-02-28 Roland McGrath * Makefile (glibc-port-%-$(dist-version).tar): Don't include top-level stuff. --- Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 79c7e0bc42..01985d9ba5 100644 --- a/Makefile +++ b/Makefile @@ -29,10 +29,8 @@ sysdeps-of-stem = sysdeps/$* sysdeps/unix/sysv/linux/$* .PRECIOUS: %.gz %.bz2 # Don't delete output as intermediate files. dist-port-%: $(foreach Z,.bz2 .gz,glibc-port-%-$(dist-version).tar$Z) md5sum $^ -glibc-port-%-$(dist-version).tar: configure ChangeLog +glibc-port-%-$(dist-version).tar: ChangeLog.% @rm -fr $(basename $@) - $(do-export) -l ports - rm -f $(basename $@)/ChangeLog.[a-z]* $(MAKE) -q `find $(sysdeps-of-stem) -name configure` $(do-export) ports/ChangeLog.$* $(addprefix ports/,$(sysdeps-of-stem)) mv $(basename $@)/ports/* $(basename $@)/ From d7cd33704682156047af5c4391ca8a9cc16012a1 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 28 Feb 2006 08:33:08 +0000 Subject: [PATCH 3574/4487] . --- ChangeLog | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ChangeLog b/ChangeLog index f0ff75c25a..5974507431 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2006-02-28 Roland McGrath + * Makefile (glibc-port-%-$(dist-version).tar): Don't include top-level + stuff. + * README: Update for new add-on scheme. 2006-02-27 Roland McGrath From 041187bdd16d173fad4ba40a77a6a5fa31be5c7a Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 28 Feb 2006 10:10:56 +0000 Subject: [PATCH 3575/4487] 2006-02-28 Roland McGrath * sysdeps/m68k/preconfigure: New file. --- sysdeps/m68k/preconfigure | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sysdeps/m68k/preconfigure diff --git a/sysdeps/m68k/preconfigure b/sysdeps/m68k/preconfigure new file mode 100644 index 0000000000..35dcea4be1 --- /dev/null +++ b/sysdeps/m68k/preconfigure @@ -0,0 +1,6 @@ +# This fragment canonicalizes the machine names for m68k variants. + +case "$machine" in +m680?0) base_machine=m68k machine=m68k/$machine ;; +m68k) base_machine=m68k machine=m68k/m68020 ;; +esac From f0bd510a6d67823fa601227d709628a62dfa79dc Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 28 Feb 2006 10:12:23 +0000 Subject: [PATCH 3576/4487] 2006-02-28 Roland McGrath * sysdeps/hppa/preconfigure: New file. --- sysdeps/hppa/preconfigure | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sysdeps/hppa/preconfigure diff --git a/sysdeps/hppa/preconfigure b/sysdeps/hppa/preconfigure new file mode 100644 index 0000000000..4d7fdcd032 --- /dev/null +++ b/sysdeps/hppa/preconfigure @@ -0,0 +1,6 @@ +# This fragment canonicalizes the machine names for hppa variants. + +case "$machine" in +hppa*64*) base_machine=hppa machine=hppa/hppa64 ;; +hppa*) base_machine=hppa machine=hppa/hppa1.1 ;; +esac From 8197a54750a764b9741dca142834ef66d22d9803 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 28 Feb 2006 10:12:50 +0000 Subject: [PATCH 3577/4487] . --- ChangeLog.hppa | 3 +++ ChangeLog.m68k | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 ChangeLog.hppa create mode 100644 ChangeLog.m68k diff --git a/ChangeLog.hppa b/ChangeLog.hppa new file mode 100644 index 0000000000..0051a0c689 --- /dev/null +++ b/ChangeLog.hppa @@ -0,0 +1,3 @@ +2006-02-28 Roland McGrath + + * sysdeps/hppa/preconfigure: New file. diff --git a/ChangeLog.m68k b/ChangeLog.m68k new file mode 100644 index 0000000000..328f858c8e --- /dev/null +++ b/ChangeLog.m68k @@ -0,0 +1,3 @@ +2006-02-28 Roland McGrath + + * sysdeps/m68k/preconfigure: New file. From 9bd382dcab939130ba926e3c0bdd4d2b65d77daf Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 28 Feb 2006 10:15:32 +0000 Subject: [PATCH 3578/4487] 2006-02-28 Roland McGrath * sysdeps/hppa/shlib-versions: New file. * sysdeps/hppa/preconfigure: New file. --- sysdeps/hppa/shlib-versions | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 sysdeps/hppa/shlib-versions diff --git a/sysdeps/hppa/shlib-versions b/sysdeps/hppa/shlib-versions new file mode 100644 index 0000000000..5a1a865a21 --- /dev/null +++ b/sysdeps/hppa/shlib-versions @@ -0,0 +1,7 @@ +hppa.*-.*-.* libm=6 GLIBC_2.2 + +hppa.*-.*-.* libc=6 GLIBC_2.2 + +hppa.*-.*-.* ld=ld.so.1 GLIBC_2.2 + +hppa-.*-.* libBrokenLocale=1 GLIBC_2.2 From 16c82ad7150f420430b15c3be39880716bf94528 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Tue, 28 Feb 2006 19:26:36 +0000 Subject: [PATCH 3579/4487] * sysdeps/unix/arm/sysdep.h, sysdeps/unix/sysv/linux/arm/sysdep.S, sysdeps/unix/sysv/linux/arm/sysdep.h: Remove ports/ from include paths. --- ChangeLog.arm | 6 ++++++ sysdeps/unix/arm/sysdep.h | 5 +++-- sysdeps/unix/sysv/linux/arm/sysdep.S | 5 +++-- sysdeps/unix/sysv/linux/arm/sysdep.h | 5 +++-- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index abc3563497..d7217bb462 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,9 @@ +2006-02-28 Daniel Jacobowitz + + * sysdeps/unix/arm/sysdep.h, sysdeps/unix/sysv/linux/arm/sysdep.S, + sysdeps/unix/sysv/linux/arm/sysdep.h: Remove ports/ from include + paths. + 2006-02-27 Daniel Jacobowitz * sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h diff --git a/sysdeps/unix/arm/sysdep.h b/sysdeps/unix/arm/sysdep.h index d6eb713585..2cc0a9dae5 100644 --- a/sysdeps/unix/arm/sysdep.h +++ b/sysdeps/unix/arm/sysdep.h @@ -1,4 +1,5 @@ -/* Copyright (C) 1997, 1998, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 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 @@ -17,7 +18,7 @@ 02111-1307 USA. */ #include -#include +#include /* Some definitions to allow the assembler in sysdeps/unix/ to build without needing ARM-specific versions of all the files. */ diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.S b/sysdeps/unix/sysv/linux/arm/sysdep.S index b2906f7e32..72541dd5ca 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.S +++ b/sysdeps/unix/sysv/linux/arm/sysdep.S @@ -1,4 +1,5 @@ -/* Copyright (C) 1995, 1996, 1997, 1998, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 1998, 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 @@ -31,4 +32,4 @@ ENTRY (__syscall_error) rsb r0, r0, $0 #define __syscall_error __syscall_error_1 -#include +#include diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index 01b3717018..e40add30cd 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -1,4 +1,5 @@ -/* Copyright (C) 1992, 93, 1995-2000, 2002, 2003, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1992, 93, 1995-2000, 2002, 2003, 2005, 2006 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, , August 1995. ARM changes by Philip Blundell, , May 1997. @@ -22,7 +23,7 @@ #define _LINUX_ARM_SYSDEP_H 1 /* There is some commonality. */ -#include +#include /* Defines RTLD_PRIVATE_ERRNO and USE_DL_SYSINFO. */ #include From cc65a7e706e0b38c97d79064e818538289e907ec Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 28 Feb 2006 22:20:13 +0000 Subject: [PATCH 3580/4487] . --- ChangeLog.hppa | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 0051a0c689..0968014dbd 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,4 @@ 2006-02-28 Roland McGrath + * sysdeps/hppa/shlib-versions: New file. * sysdeps/hppa/preconfigure: New file. From 33ca998a4f3272beb0f2e75db7c535d77c03347f Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Thu, 2 Mar 2006 15:19:51 +0000 Subject: [PATCH 3581/4487] * sysdeps/unix/sysv/linux/arm/eabi/Makefile (arm-using-eabi): Set. * sysdeps/unix/sysv/linux/arm/nptl/Makefile: New file. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/eabi/Makefile | 3 +++ sysdeps/unix/sysv/linux/arm/nptl/Makefile | 8 ++++++++ 3 files changed, 16 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/nptl/Makefile diff --git a/ChangeLog.arm b/ChangeLog.arm index d7217bb462..3f510d29e1 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2006-03-02 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/arm/eabi/Makefile (arm-using-eabi): Set. + * sysdeps/unix/sysv/linux/arm/nptl/Makefile: New file. + 2006-02-28 Daniel Jacobowitz * sysdeps/unix/arm/sysdep.h, sysdeps/unix/sysv/linux/arm/sysdep.S, diff --git a/sysdeps/unix/sysv/linux/arm/eabi/Makefile b/sysdeps/unix/sysv/linux/arm/eabi/Makefile index d3c02a2dea..9f2b0fe8f4 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/Makefile +++ b/sysdeps/unix/sysv/linux/arm/eabi/Makefile @@ -1,3 +1,6 @@ +# Set this flag here so that arm/nptl/Makefile will see it. +arm-using-eabi = yes + ifeq ($(subdir),csu) # In order for unwinding to fail when it falls out of main, we need a # cantunwind marker. There's one in start.S. To make sure we reach it, add diff --git a/sysdeps/unix/sysv/linux/arm/nptl/Makefile b/sysdeps/unix/sysv/linux/arm/nptl/Makefile new file mode 100644 index 0000000000..f270f19435 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/nptl/Makefile @@ -0,0 +1,8 @@ +ifeq ($(subdir),nptl) +ifneq ($(arm-using-eabi),yes) +# These tests rely on PTHREAD_KEYS_MAX. The SJLJ exception machinery +# in libgcc registers one key, however, so only PTHREAD_KEYS_MAX-1 +# keys are available. This works fine for EABI targets. +tests := $(filter-out tst-key1 tst-key4,$(tests)) +endif +endif From 43b83c6fe172730ffe39b3fbcf54add3ce92b084 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Thu, 2 Mar 2006 15:23:41 +0000 Subject: [PATCH 3582/4487] * sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h (PSEUDO): Inline correct versions of PSEUDO_RET_MOV and MAYBE_SAVE_LR. (PSEUDO_RET_MOV, MAYBE_SAVE_LR): Don't define. --- ChangeLog.arm | 6 ++++++ .../unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h | 12 +++--------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 3f510d29e1..017847529e 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,9 @@ +2006-03-02 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h + (PSEUDO): Inline correct versions of PSEUDO_RET_MOV and MAYBE_SAVE_LR. + (PSEUDO_RET_MOV, MAYBE_SAVE_LR): Don't define. + 2006-03-02 Daniel Jacobowitz * sysdeps/unix/sysv/linux/arm/eabi/Makefile (arm-using-eabi): Set. diff --git a/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h index cd4d171c70..b35d34728d 100644 --- a/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h @@ -50,9 +50,10 @@ bne .Lpseudo_cancel; \ DO_CALL (syscall_name, args); \ cmn r0, $4096; \ - PSEUDO_RET_MOV; \ + RETINSTR(cc, lr); \ + b PLTJMP(SYSCALL_ERROR); \ .Lpseudo_cancel: \ - MAYBE_SAVE_LR; \ + str lr, [sp, $-4]!; \ DOCARGS_##args; /* save syscall args around CENABLE. */ \ CENABLE; \ mov ip, r0; /* put mask in safe place. */ \ @@ -108,11 +109,6 @@ extern int __local_multiple_threads attribute_hidden; ldr ip, =__local_multiple_threads; \ ldr ip, [ip]; \ teq ip, #0; -# define MAYBE_SAVE_LR \ - str lr, [sp, $-4]!; -# define PSEUDO_RET_MOV \ - RETINSTR(cc, lr); \ - b PLTJMP(SYSCALL_ERROR) # define PSEUDO_PROLOGUE # else # define SINGLE_THREAD_P \ @@ -122,8 +118,6 @@ extern int __local_multiple_threads attribute_hidden; teq ip, #0; # define PSEUDO_PROLOGUE \ 1: .word __local_multiple_threads - 2f - 8; -# define MAYBE_SAVE_LR /* lr already saved */ -# define PSEUDO_RET_MOV PSEUDO_RET # endif # endif From 6428ce3cdad3d587fb77f2f1d0d7036f780fa9e0 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Fri, 3 Mar 2006 01:06:48 +0000 Subject: [PATCH 3583/4487] * sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h (INTERNAL_SYSCALL): Update internal_syscall##nr invocation. (INTERNAL_SYSCALL_NCS): New. (internal_syscall0, internal_syscall1, internal_syscall2, internal_syscall3, internal_syscall4, internal_syscall5, internal_syscall6): Take ncs_init, cs_init, and input arguments. Use them. Correct types for registers. * sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h (INTERNAL_SYSCALL): Update internal_syscall##nr invocation. (INTERNAL_SYSCALL_NCS): New. (internal_syscall0, internal_syscall1, internal_syscall2, internal_syscall3, internal_syscall4, internal_syscall5, internal_syscall6): Take ncs_init, cs_init, and input arguments. Use them. * sysdeps/unix/sysv/linux/mips/mips64/syscalls.list: Remove recvfrom and sendto. Mark lseek, msgrcv, and msgsnd as cancellation points. * sysdeps/mips/dl-machine.h (elf_machine_rel): Remove unused "value". Use Elf(Addr) for TLS relocation targets. * sysdeps/unix/sysv/linux/mips/mips64/Makefile: New file. * sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h (lll_futex_wait, lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): Cast futexp to long for n64. * sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h: New file. --- ChangeLog.mips | 27 +++ sysdeps/mips/dl-machine.h | 12 +- sysdeps/unix/sysv/linux/mips/mips64/Makefile | 9 + .../unix/sysv/linux/mips/mips64/n32/sysdep.h | 72 +++---- .../unix/sysv/linux/mips/mips64/n64/sysdep.h | 72 +++---- .../linux/mips/mips64/nptl/sysdep-cancel.h | 183 ++++++++++++++++++ .../unix/sysv/linux/mips/mips64/syscalls.list | 10 +- .../unix/sysv/linux/mips/nptl/lowlevellock.h | 10 +- 8 files changed, 309 insertions(+), 86 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/Makefile create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h diff --git a/ChangeLog.mips b/ChangeLog.mips index 2881533c06..66ff73c867 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,30 @@ +2006-03-02 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h + (INTERNAL_SYSCALL): Update internal_syscall##nr invocation. + (INTERNAL_SYSCALL_NCS): New. + (internal_syscall0, internal_syscall1, internal_syscall2, + internal_syscall3, internal_syscall4, internal_syscall5, + internal_syscall6): Take ncs_init, cs_init, and input arguments. + Use them. Correct types for registers. + * sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h + (INTERNAL_SYSCALL): Update internal_syscall##nr invocation. + (INTERNAL_SYSCALL_NCS): New. + (internal_syscall0, internal_syscall1, internal_syscall2, + internal_syscall3, internal_syscall4, internal_syscall5, + internal_syscall6): Take ncs_init, cs_init, and input arguments. + Use them. + * sysdeps/unix/sysv/linux/mips/mips64/syscalls.list: Remove + recvfrom and sendto. Mark lseek, msgrcv, and msgsnd as cancellation + points. + * sysdeps/mips/dl-machine.h (elf_machine_rel): Remove unused "value". + Use Elf(Addr) for TLS relocation targets. + * sysdeps/unix/sysv/linux/mips/mips64/Makefile: New file. + * sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h (lll_futex_wait, + lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): Cast + futexp to long for n64. + * sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h: New file. + 2006-02-20 Roland McGrath * sysdeps/mips/shlib-versions: New file. diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index c04609f9bc..b91218479d 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. MIPS version. - Copyright (C) 1996-2001, 2002, 2003, 2004, 2005 + Copyright (C) 1996-2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Kazumoto Kojima . @@ -336,28 +336,24 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, # endif { struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type); - Elf32_Addr value = sym == NULL ? 0 : sym_map->l_addr + sym->st_value; - - if (sym) - value += sym->st_value; switch (r_type) { case R_MIPS_TLS_DTPMOD64: case R_MIPS_TLS_DTPMOD32: if (sym_map) - *(ElfW(Word) *)reloc_addr = sym_map->l_tls_modid; + *(ElfW(Addr) *)reloc_addr = sym_map->l_tls_modid; break; case R_MIPS_TLS_DTPREL64: case R_MIPS_TLS_DTPREL32: - *(ElfW(Word) *)reloc_addr += TLS_DTPREL_VALUE (sym); + *(ElfW(Addr) *)reloc_addr += TLS_DTPREL_VALUE (sym); break; case R_MIPS_TLS_TPREL32: case R_MIPS_TLS_TPREL64: CHECK_STATIC_TLS (map, sym_map); - *(ElfW(Word) *)reloc_addr += TLS_TPREL_VALUE (sym_map, sym); + *(ElfW(Addr) *)reloc_addr += TLS_TPREL_VALUE (sym_map, sym); break; } diff --git a/sysdeps/unix/sysv/linux/mips/mips64/Makefile b/sysdeps/unix/sysv/linux/mips/mips64/Makefile new file mode 100644 index 0000000000..0a37c5b9b4 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/Makefile @@ -0,0 +1,9 @@ +ifeq ($(subdir),socket) +CFLAGS-recv.c += -fexceptions +CFLAGS-send.c += -fexceptions +endif + +ifeq ($(subdir),nptl) +CFLAGS-recv.c += -fexceptions +CFLAGS-send.c += -fexceptions +endif diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h index e6013669a4..247d4ffbf4 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h @@ -1,4 +1,5 @@ -/* Copyright (C) 2000, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002, 2003, 2004, 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 @@ -66,22 +67,28 @@ #define INTERNAL_SYSCALL_ERRNO(val, err) (val) #undef INTERNAL_SYSCALL -#define INTERNAL_SYSCALL(name, err, nr, args...) internal_syscall##nr(name, err, args) +#define INTERNAL_SYSCALL(name, err, nr, args...) \ + internal_syscall##nr (, "li\t$2, %2\t\t\t# " #name "\n\t", \ + "i" (SYS_ify (name)), err, args) -#define internal_syscall0(name, err, dummy...) \ +#undef INTERNAL_SYSCALL_NCS +#define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \ + internal_syscall##nr (= number, , "r" (__v0), err, args) + +#define internal_syscall0(ncs_init, cs_init, input, err, dummy...) \ ({ \ long _sys_result; \ \ { \ - register long __v0 asm("$2"); \ - register long __a3 asm("$7"); \ + register long long __v0 asm("$2") ncs_init; \ + register long long __a3 asm("$7"); \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ - "li\t$2, %2\t\t\t# " #name "\n\t" \ + cs_init \ "syscall\n\t" \ ".set reorder" \ : "=r" (__v0), "=r" (__a3) \ - : "i" (SYS_ify(name)) \ + : input \ : __SYSCALL_CLOBBERS); \ err = __a3; \ _sys_result = __v0; \ @@ -89,21 +96,21 @@ _sys_result; \ }) -#define internal_syscall1(name, err, arg1) \ +#define internal_syscall1(ncs_init, cs_init, input, err, arg1) \ ({ \ long _sys_result; \ \ { \ - register long long __v0 asm("$2"); \ + register long long __v0 asm("$2") ncs_init; \ register long long __a0 asm("$4") = (long long) arg1; \ register long long __a3 asm("$7"); \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ - "li\t$2, %3\t\t\t# " #name "\n\t" \ + cs_init \ "syscall\n\t" \ ".set reorder" \ : "=r" (__v0), "=r" (__a3) \ - : "r" (__a0), "i" (SYS_ify(name)) \ + : input, "r" (__a0) \ : __SYSCALL_CLOBBERS); \ err = __a3; \ _sys_result = __v0; \ @@ -111,22 +118,22 @@ _sys_result; \ }) -#define internal_syscall2(name, err, arg1, arg2) \ +#define internal_syscall2(ncs_init, cs_init, input, err, arg1, arg2) \ ({ \ long _sys_result; \ \ { \ - register long long __v0 asm("$2"); \ + register long long __v0 asm("$2") ncs_init; \ register long long __a0 asm("$4") = (long long) arg1; \ register long long __a1 asm("$5") = (long long) arg2; \ register long long __a3 asm("$7"); \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ - "li\t$2, %4\t\t\t# " #name "\n\t" \ + cs_init \ "syscall\n\t" \ ".set\treorder" \ : "=r" (__v0), "=r" (__a3) \ - : "r" (__a0), "r" (__a1), "i" (SYS_ify(name)) \ + : input, "r" (__a0), "r" (__a1) \ : __SYSCALL_CLOBBERS); \ err = __a3; \ _sys_result = __v0; \ @@ -134,23 +141,23 @@ _sys_result; \ }) -#define internal_syscall3(name, err, arg1, arg2, arg3) \ +#define internal_syscall3(ncs_init, cs_init, input, err, arg1, arg2, arg3) \ ({ \ long _sys_result; \ \ { \ - register long long __v0 asm("$2"); \ + register long long __v0 asm("$2") ncs_init; \ register long long __a0 asm("$4") = (long long) arg1; \ register long long __a1 asm("$5") = (long long) arg2; \ register long long __a2 asm("$6") = (long long) arg3; \ register long long __a3 asm("$7"); \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ - "li\t$2, %5\t\t\t# " #name "\n\t" \ + cs_init \ "syscall\n\t" \ ".set\treorder" \ : "=r" (__v0), "=r" (__a3) \ - : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)) \ + : input, "r" (__a0), "r" (__a1), "r" (__a2) \ : __SYSCALL_CLOBBERS); \ err = __a3; \ _sys_result = __v0; \ @@ -158,23 +165,23 @@ _sys_result; \ }) -#define internal_syscall4(name, err, arg1, arg2, arg3, arg4) \ +#define internal_syscall4(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4) \ ({ \ long _sys_result; \ \ { \ - register long long __v0 asm("$2"); \ + register long long __v0 asm("$2") ncs_init; \ register long long __a0 asm("$4") = (long long) arg1; \ register long long __a1 asm("$5") = (long long) arg2; \ register long long __a2 asm("$6") = (long long) arg3; \ register long long __a3 asm("$7") = (long long) arg4; \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ - "li\t$2, %5\t\t\t# " #name "\n\t" \ + cs_init \ "syscall\n\t" \ ".set\treorder" \ : "=r" (__v0), "+r" (__a3) \ - : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)) \ + : input, "r" (__a0), "r" (__a1), "r" (__a2) \ : __SYSCALL_CLOBBERS); \ err = __a3; \ _sys_result = __v0; \ @@ -182,12 +189,12 @@ _sys_result; \ }) -#define internal_syscall5(name, err, arg1, arg2, arg3, arg4, arg5) \ +#define internal_syscall5(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4, arg5) \ ({ \ long _sys_result; \ \ { \ - register long long __v0 asm("$2"); \ + register long long __v0 asm("$2") ncs_init; \ register long long __a0 asm("$4") = (long long) arg1; \ register long long __a1 asm("$5") = (long long) arg2; \ register long long __a2 asm("$6") = (long long) arg3; \ @@ -195,12 +202,11 @@ register long long __a4 asm("$8") = (long long) arg5; \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ - "li\t$2, %5\t\t\t# " #name "\n\t" \ + cs_init \ "syscall\n\t" \ ".set\treorder" \ : "=r" (__v0), "+r" (__a3) \ - : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \ - "r" (__a4) \ + : input, "r" (__a0), "r" (__a1), "r" (__a2), "r" (__a4) \ : __SYSCALL_CLOBBERS); \ err = __a3; \ _sys_result = __v0; \ @@ -208,12 +214,12 @@ _sys_result; \ }) -#define internal_syscall6(name, err, arg1, arg2, arg3, arg4, arg5, arg6)\ +#define internal_syscall6(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4, arg5, arg6) \ ({ \ long _sys_result; \ \ { \ - register long long __v0 asm("$2"); \ + register long long __v0 asm("$2") ncs_init; \ register long long __a0 asm("$4") = (long long) arg1; \ register long long __a1 asm("$5") = (long long) arg2; \ register long long __a2 asm("$6") = (long long) arg3; \ @@ -222,12 +228,12 @@ register long long __a5 asm("$9") = (long long) arg6; \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ - "li\t$2, %5\t\t\t# " #name "\n\t" \ + cs_init \ "syscall\n\t" \ ".set\treorder" \ : "=r" (__v0), "+r" (__a3) \ - : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \ - "r" (__a4), "r" (__a5) \ + : input, "r" (__a0), "r" (__a1), "r" (__a2), "r" (__a4), \ + "r" (__a5) \ : __SYSCALL_CLOBBERS); \ err = __a3; \ _sys_result = __v0; \ diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h index dc0a1a0edc..c238822b20 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h @@ -1,4 +1,5 @@ -/* Copyright (C) 2000, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002, 2003, 2004, 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 @@ -66,22 +67,28 @@ #define INTERNAL_SYSCALL_ERRNO(val, err) (val) #undef INTERNAL_SYSCALL -#define INTERNAL_SYSCALL(name, err, nr, args...) internal_syscall##nr(name, err, args) +#define INTERNAL_SYSCALL(name, err, nr, args...) \ + internal_syscall##nr (, "li\t$2, %2\t\t\t# " #name "\n\t", \ + "i" (SYS_ify (name)), err, args) -#define internal_syscall0(name, err, dummy...) \ +#undef INTERNAL_SYSCALL_NCS +#define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \ + internal_syscall##nr (= number, , "r" (__v0), err, args) + +#define internal_syscall0(ncs_init, cs_init, input, err, dummy...) \ ({ \ long _sys_result; \ \ { \ - register long __v0 asm("$2"); \ - register long __a3 asm("$7"); \ + register long __v0 asm("$2") ncs_init; \ + register long __a3 asm("$7"); \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ - "li\t$2, %2\t\t\t# " #name "\n\t" \ + cs_init \ "syscall\n\t" \ ".set reorder" \ : "=r" (__v0), "=r" (__a3) \ - : "i" (SYS_ify(name)) \ + : input \ : __SYSCALL_CLOBBERS); \ err = __a3; \ _sys_result = __v0; \ @@ -89,21 +96,21 @@ _sys_result; \ }) -#define internal_syscall1(name, err, arg1) \ +#define internal_syscall1(ncs_init, cs_init, input, err, arg1) \ ({ \ long _sys_result; \ \ { \ - register long __v0 asm("$2"); \ + register long __v0 asm("$2") ncs_init; \ register long __a0 asm("$4") = (long) arg1; \ register long __a3 asm("$7"); \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ - "li\t$2, %3\t\t\t# " #name "\n\t" \ + cs_init \ "syscall\n\t" \ ".set reorder" \ : "=r" (__v0), "=r" (__a3) \ - : "r" (__a0), "i" (SYS_ify(name)) \ + : input, "r" (__a0) \ : __SYSCALL_CLOBBERS); \ err = __a3; \ _sys_result = __v0; \ @@ -111,22 +118,22 @@ _sys_result; \ }) -#define internal_syscall2(name, err, arg1, arg2) \ +#define internal_syscall2(ncs_init, cs_init, input, err, arg1, arg2) \ ({ \ long _sys_result; \ \ { \ - register long __v0 asm("$2"); \ + register long __v0 asm("$2") ncs_init; \ register long __a0 asm("$4") = (long) arg1; \ register long __a1 asm("$5") = (long) arg2; \ register long __a3 asm("$7"); \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ - "li\t$2, %4\t\t\t# " #name "\n\t" \ + cs_init \ "syscall\n\t" \ ".set\treorder" \ : "=r" (__v0), "=r" (__a3) \ - : "r" (__a0), "r" (__a1), "i" (SYS_ify(name)) \ + : input, "r" (__a0), "r" (__a1) \ : __SYSCALL_CLOBBERS); \ err = __a3; \ _sys_result = __v0; \ @@ -134,23 +141,23 @@ _sys_result; \ }) -#define internal_syscall3(name, err, arg1, arg2, arg3) \ +#define internal_syscall3(ncs_init, cs_init, input, err, arg1, arg2, arg3) \ ({ \ long _sys_result; \ \ { \ - register long __v0 asm("$2"); \ + register long __v0 asm("$2") ncs_init; \ register long __a0 asm("$4") = (long) arg1; \ register long __a1 asm("$5") = (long) arg2; \ register long __a2 asm("$6") = (long) arg3; \ register long __a3 asm("$7"); \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ - "li\t$2, %5\t\t\t# " #name "\n\t" \ + cs_init \ "syscall\n\t" \ ".set\treorder" \ : "=r" (__v0), "=r" (__a3) \ - : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)) \ + : input, "r" (__a0), "r" (__a1), "r" (__a2) \ : __SYSCALL_CLOBBERS); \ err = __a3; \ _sys_result = __v0; \ @@ -158,23 +165,23 @@ _sys_result; \ }) -#define internal_syscall4(name, err, arg1, arg2, arg3, arg4) \ +#define internal_syscall4(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4) \ ({ \ long _sys_result; \ \ { \ - register long __v0 asm("$2"); \ + register long __v0 asm("$2") ncs_init; \ register long __a0 asm("$4") = (long) arg1; \ register long __a1 asm("$5") = (long) arg2; \ register long __a2 asm("$6") = (long) arg3; \ register long __a3 asm("$7") = (long) arg4; \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ - "li\t$2, %5\t\t\t# " #name "\n\t" \ + cs_init \ "syscall\n\t" \ ".set\treorder" \ : "=r" (__v0), "+r" (__a3) \ - : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)) \ + : input, "r" (__a0), "r" (__a1), "r" (__a2) \ : __SYSCALL_CLOBBERS); \ err = __a3; \ _sys_result = __v0; \ @@ -182,12 +189,12 @@ _sys_result; \ }) -#define internal_syscall5(name, err, arg1, arg2, arg3, arg4, arg5) \ +#define internal_syscall5(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4, arg5) \ ({ \ long _sys_result; \ \ { \ - register long __v0 asm("$2"); \ + register long __v0 asm("$2") ncs_init; \ register long __a0 asm("$4") = (long) arg1; \ register long __a1 asm("$5") = (long) arg2; \ register long __a2 asm("$6") = (long) arg3; \ @@ -195,12 +202,11 @@ register long __a4 asm("$8") = (long) arg5; \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ - "li\t$2, %5\t\t\t# " #name "\n\t" \ + cs_init \ "syscall\n\t" \ ".set\treorder" \ : "=r" (__v0), "+r" (__a3) \ - : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \ - "r" (__a4) \ + : input, "r" (__a0), "r" (__a1), "r" (__a2), "r" (__a4) \ : __SYSCALL_CLOBBERS); \ err = __a3; \ _sys_result = __v0; \ @@ -208,12 +214,12 @@ _sys_result; \ }) -#define internal_syscall6(name, err, arg1, arg2, arg3, arg4, arg5, arg6)\ +#define internal_syscall6(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4, arg5, arg6) \ ({ \ long _sys_result; \ \ { \ - register long __v0 asm("$2"); \ + register long __v0 asm("$2") ncs_init; \ register long __a0 asm("$4") = (long) arg1; \ register long __a1 asm("$5") = (long) arg2; \ register long __a2 asm("$6") = (long) arg3; \ @@ -222,12 +228,12 @@ register long __a5 asm("$9") = (long) arg6; \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ - "li\t$2, %5\t\t\t# " #name "\n\t" \ + cs_init \ "syscall\n\t" \ ".set\treorder" \ : "=r" (__v0), "+r" (__a3) \ - : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \ - "r" (__a4), "r" (__a5) \ + : input, "r" (__a0), "r" (__a1), "r" (__a2), "r" (__a4), \ + "r" (__a5) \ : __SYSCALL_CLOBBERS); \ err = __a3; \ _sys_result = __v0; \ diff --git a/sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h new file mode 100644 index 0000000000..e184c91236 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h @@ -0,0 +1,183 @@ +/* Copyright (C) 2003, 2004, 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 + 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. */ + +#include +#include +#include +#ifndef __ASSEMBLER__ +# include +#endif +#include + +/* Gas will put the initial save of $gp into the CIE, because it appears to + happen before any instructions. So we use cfi_same_value instead of + cfi_restore. */ + +#ifdef HAVE_ASM_CFI_DIRECTIVES +# define cfi_same_value .cfi_same_value +#else +# define cfi_same_value +#endif + +#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt + +#ifdef __PIC__ +# undef PSEUDO +# define PSEUDO(name, syscall_name, args) \ + .align 2; \ + L(pseudo_start): \ + cfi_startproc; \ + cfi_adjust_cfa_offset (STKSPACE); \ + cfi_rel_offset (gp, STKOFF_GP); \ + 99: PTR_LA t9,__syscall_error; \ + /* manual cpreturn */ \ + REG_L gp, STKOFF_GP(sp); \ + cfi_same_value (gp); \ + RESTORESTK; \ + jr t9; \ + .type __##syscall_name##_nocancel, @function; \ + .globl __##syscall_name##_nocancel; \ + __##syscall_name##_nocancel: \ + SAVESTK; \ + .cpsetup t9, STKOFF_GP, name; \ + cfi_rel_offset (gp, STKOFF_GP); \ + li v0, SYS_ify(syscall_name); \ + syscall; \ + bne a3, zero, SYSCALL_ERROR_LABEL; \ + /* manual cpreturn */ \ + REG_L gp, STKOFF_GP(sp); \ + cfi_same_value (gp); \ + RESTORESTK; \ + ret; \ + .size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel; \ + ENTRY (name) \ + SAVESTK; \ + .cpsetup t9, STKOFF_GP, name; \ + cfi_rel_offset (gp, STKOFF_GP); \ + SINGLE_THREAD_P(v1); \ + bne zero, v1, L(pseudo_cancel); \ + .set noreorder; \ + li v0, SYS_ify(syscall_name); \ + syscall; \ + .set reorder; \ + bne a3, zero, SYSCALL_ERROR_LABEL; \ + /* manual cpreturn */ \ + REG_L gp, STKOFF_GP(sp); \ + cfi_same_value (gp); \ + RESTORESTK; \ + ret; \ + L(pseudo_cancel): \ + cfi_adjust_cfa_offset (STKSPACE); \ + cfi_rel_offset (gp, STKOFF_GP); \ + REG_S ra, STKOFF_RA(sp); \ + cfi_rel_offset (ra, STKOFF_RA); \ + PUSHARGS_##args; /* save syscall args */ \ + CENABLE; \ + REG_S v0, STKOFF_SVMSK(sp); /* save mask */ \ + POPARGS_##args; /* restore syscall args */ \ + .set noreorder; \ + li v0, SYS_ify (syscall_name); \ + syscall; \ + .set reorder; \ + REG_S v0, STKOFF_SC_V0(sp); /* save syscall result */ \ + REG_S a3, STKOFF_SC_ERR(sp); /* save syscall error flag */ \ + REG_L a0, STKOFF_SVMSK(sp); /* pass mask as arg1 */ \ + CDISABLE; \ + REG_L a3, STKOFF_SC_ERR(sp); /* restore syscall error flag */ \ + REG_L ra, STKOFF_RA(sp); /* restore return address */ \ + REG_L v0, STKOFF_SC_V0(sp); /* restore syscall result */ \ + bne a3, zero, SYSCALL_ERROR_LABEL; \ + /* manual cpreturn */ \ + REG_L gp, STKOFF_GP(sp); \ + cfi_same_value (gp); \ + RESTORESTK; \ + L(pseudo_end): + + +# undef PSEUDO_END +# define PSEUDO_END(sym) cfi_endproc; .end sym; .size sym,.-sym + +#endif + +# define PUSHARGS_0 /* nothing to do */ +# define PUSHARGS_1 PUSHARGS_0 REG_S a0, STKOFF_A0(sp); cfi_rel_offset (a0, STKOFF_A0); +# define PUSHARGS_2 PUSHARGS_1 REG_S a1, STKOFF_A1(sp); cfi_rel_offset (a1, STKOFF_A1); +# define PUSHARGS_3 PUSHARGS_2 REG_S a2, STKOFF_A2(sp); cfi_rel_offset (a2, STKOFF_A2); +# define PUSHARGS_4 PUSHARGS_3 REG_S a3, STKOFF_A3(sp); cfi_rel_offset (a3, STKOFF_A3); +# define PUSHARGS_5 PUSHARGS_4 REG_S a4, STKOFF_A4(sp); cfi_rel_offset (a3, STKOFF_A4); +# define PUSHARGS_6 PUSHARGS_5 REG_S a5, STKOFF_A5(sp); cfi_rel_offset (a3, STKOFF_A5); + +# define POPARGS_0 /* nothing to do */ +# define POPARGS_1 POPARGS_0 REG_L a0, STKOFF_A0(sp); +# define POPARGS_2 POPARGS_1 REG_L a1, STKOFF_A1(sp); +# define POPARGS_3 POPARGS_2 REG_L a2, STKOFF_A2(sp); +# define POPARGS_4 POPARGS_3 REG_L a3, STKOFF_A3(sp); +# define POPARGS_5 POPARGS_4 REG_L a4, STKOFF_A4(sp); +# define POPARGS_6 POPARGS_5 REG_L a5, STKOFF_A5(sp); + +/* Save an even number of slots. Should be 0 if an even number of slots + are used below, or SZREG if an odd number are used. */ +# define STK_PAD SZREG + +/* Place values that we are more likely to use later in this sequence, i.e. + closer to the SP at function entry. If you do that, the are more + likely to already be in your d-cache. */ +# define STKOFF_A5 (STK_PAD) +# define STKOFF_A4 (STKOFF_A5 + SZREG) +# define STKOFF_A3 (STKOFF_A4 + SZREG) +# define STKOFF_A2 (STKOFF_A3 + SZREG) /* MT and more args. */ +# define STKOFF_A1 (STKOFF_A2 + SZREG) /* MT and 2 args. */ +# define STKOFF_A0 (STKOFF_A1 + SZREG) /* MT and 1 arg. */ +# define STKOFF_RA (STKOFF_A0 + SZREG) /* Used if MT. */ +# define STKOFF_SC_V0 (STKOFF_RA + SZREG) /* Used if MT. */ +# define STKOFF_SC_ERR (STKOFF_SC_V0 + SZREG) /* Used if MT. */ +# define STKOFF_SVMSK (STKOFF_SC_ERR + SZREG) /* Used if MT. */ +# define STKOFF_GP (STKOFF_SVMSK + SZREG) /* Always used. */ + +# define STKSPACE (STKOFF_GP + SZREG) +# define SAVESTK PTR_SUBU sp, STKSPACE; cfi_adjust_cfa_offset(STKSPACE) +# define RESTORESTK PTR_ADDU sp, STKSPACE; cfi_adjust_cfa_offset(-STKSPACE) + +# ifdef IS_IN_libpthread +# define CENABLE PTR_LA t9, __pthread_enable_asynccancel; jalr t9 +# define CDISABLE PTR_LA t9, __pthread_disable_asynccancel; jalr t9 +# elif defined IS_IN_librt +# define CENABLE PTR_LA t9, __librt_enable_asynccancel; jalr t9 +# define CDISABLE PTR_LA t9, __librt_disable_asynccancel; jalr t9 +# else +# define CENABLE PTR_LA t9, __libc_enable_asynccancel; jalr t9 +# define CDISABLE PTR_LA t9, __libc_disable_asynccancel; jalr t9 +# endif + +# ifndef __ASSEMBLER__ +# define SINGLE_THREAD_P \ + __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ + header.multiple_threads) \ + == 0, 1) +# else +# define SINGLE_THREAD_P(reg) \ + READ_THREAD_POINTER(reg); \ + lw reg, MULTIPLE_THREADS_OFFSET(reg) +#endif + +#elif !defined __ASSEMBLER__ + +# define SINGLE_THREAD_P 1 +# define NO_CANCELLATION 1 + +#endif diff --git a/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list b/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list index b0d79ff6a4..0d1657d9fc 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list @@ -1,16 +1,12 @@ # File name Caller Syscall name Args Strong name Weak names -lseek - lseek i:iii __libc_lseek __lseek lseek __llseek llseek __libc_lseek64 __lseek64 lseek64 - -# proper socket implementations: -recvfrom - recvfrom i:ibniBN __libc_recvfrom __recvfrom recvfrom -sendto - sendto i:ibnibn __libc_sendto __sendto sendto +lseek - lseek Ci:iii __libc_lseek __lseek lseek __llseek llseek __libc_lseek64 __lseek64 lseek64 # semaphore and shm system calls msgctl - msgctl i:iip __msgctl msgctl msgget - msgget i:ii __msgget msgget -msgrcv - msgrcv i:ibnii __msgrcv msgrcv -msgsnd - msgsnd i:ibni __msgsnd msgsnd +msgrcv - msgrcv Ci:ibnii __msgrcv msgrcv +msgsnd - msgsnd Ci:ibni __msgsnd msgsnd shmat - shmat i:ipi __shmat shmat shmctl - shmctl i:iip __shmctl shmctl shmdt - shmdt i:s __shmdt shmdt diff --git a/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h index 7edb28794f..5e3dd48f99 100644 --- a/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 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 @@ -39,7 +39,7 @@ INTERNAL_SYSCALL_DECL (__err); \ long int __ret; \ __ret = INTERNAL_SYSCALL (futex, __err, 4, \ - (futexp), FUTEX_WAIT, (val), 0); \ + (long) (futexp), FUTEX_WAIT, (val), 0); \ INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; \ }) @@ -48,7 +48,7 @@ INTERNAL_SYSCALL_DECL (__err); \ long int __ret; \ __ret = INTERNAL_SYSCALL (futex, __err, 4, \ - (futexp), FUTEX_WAIT, (val), (timespec)); \ + (long) (futexp), FUTEX_WAIT, (val), (timespec));\ INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; \ }) @@ -57,7 +57,7 @@ INTERNAL_SYSCALL_DECL (__err); \ long int __ret; \ __ret = INTERNAL_SYSCALL (futex, __err, 4, \ - (futexp), FUTEX_WAKE, (nr), 0); \ + (long) (futexp), FUTEX_WAKE, (nr), 0); \ INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; \ }) @@ -67,7 +67,7 @@ INTERNAL_SYSCALL_DECL (__err); \ long int __ret; \ __ret = INTERNAL_SYSCALL (futex, __err, 6, \ - (futexp), FUTEX_CMP_REQUEUE, (nr_wake), \ + (long) (futexp), FUTEX_CMP_REQUEUE, (nr_wake), \ (nr_move), (mutex), (val)); \ INTERNAL_SYSCALL_ERROR_P (__ret, __err); \ }) From 73204807705263b5db2209783ca007112eda7265 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Fri, 3 Mar 2006 01:13:52 +0000 Subject: [PATCH 3584/4487] * sysdeps/unix/sysv/linux/mips/ptrace.c: Delete file. * sysdeps/unix/sysv/linux/mips/sys/ptrace.h: Delete file. --- ChangeLog.mips | 5 + sysdeps/unix/sysv/linux/mips/ptrace.c | 111 ------------------ sysdeps/unix/sysv/linux/mips/sys/ptrace.h | 136 ---------------------- 3 files changed, 5 insertions(+), 247 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/mips/ptrace.c delete mode 100644 sysdeps/unix/sysv/linux/mips/sys/ptrace.h diff --git a/ChangeLog.mips b/ChangeLog.mips index 66ff73c867..32566f9950 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2006-03-02 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/mips/ptrace.c: Delete file. + * sysdeps/unix/sysv/linux/mips/sys/ptrace.h: Delete file. + 2006-03-02 Daniel Jacobowitz * sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h diff --git a/sysdeps/unix/sysv/linux/mips/ptrace.c b/sysdeps/unix/sysv/linux/mips/ptrace.c deleted file mode 100644 index 19d7c2d927..0000000000 --- a/sysdeps/unix/sysv/linux/mips/ptrace.c +++ /dev/null @@ -1,111 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2003, 2004 - 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. */ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#if _MIPS_SIM == _ABIN32 -__extension__ typedef long long int reg_type; -#else -typedef long int reg_type; -#endif - -reg_type -ptrace (enum __ptrace_request request, ...) -{ - reg_type res, ret; - va_list ap; - pid_t pid; - void *addr; - reg_type data; - - va_start (ap, request); - pid = va_arg (ap, pid_t); - addr = va_arg (ap, void *); - data = va_arg (ap, reg_type); - va_end (ap); - - if (request > 0 && request < 4) - data = &ret; - -#if __BOUNDED_POINTERS__ - switch (request) - { - case PTRACE_PEEKTEXT: - case PTRACE_PEEKDATA: - case PTRACE_PEEKUSER: - case PTRACE_POKETEXT: - case PTRACE_POKEDATA: - case PTRACE_POKEUSER: - (void) CHECK_1 ((int *) addr); - (void) CHECK_1 ((int *) data); - break; - - case PTRACE_GETREGS: - case PTRACE_SETREGS: - /* We don't know the size of data, so the best we can do is ensure - that `data' is valid for at least one word. */ - (void) CHECK_1 ((int *) data); - break; - - case PTRACE_GETFPREGS: - case PTRACE_SETFPREGS: - /* We don't know the size of data, so the best we can do is ensure - that `data' is valid for at least one word. */ - (void) CHECK_1 ((int *) data); - break; - - case PTRACE_GETFPXREGS: - case PTRACE_SETFPXREGS: - /* We don't know the size of data, so the best we can do is ensure - that `data' is valid for at least one word. */ - (void) CHECK_1 ((int *) data); - break; - - case PTRACE_TRACEME: - case PTRACE_CONT: - case PTRACE_KILL: - case PTRACE_SINGLESTEP: - case PTRACE_ATTACH: - case PTRACE_DETACH: - case PTRACE_SYSCALL: - /* Neither `data' nor `addr' needs any checks. */ - break; - }; -#endif - - res = INLINE_SYSCALL (ptrace, 4, request, pid, - __ptrvalue (addr), __ptrvalue (data)); - if (res >= 0 && request > 0 && request < 4) - { - __set_errno (0); - return ret; - } - - return res; -} diff --git a/sysdeps/unix/sysv/linux/mips/sys/ptrace.h b/sysdeps/unix/sysv/linux/mips/sys/ptrace.h deleted file mode 100644 index d05853da77..0000000000 --- a/sysdeps/unix/sysv/linux/mips/sys/ptrace.h +++ /dev/null @@ -1,136 +0,0 @@ -/* `ptrace' debugger support interface. Linux version. - Copyright (C) 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004 - 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 _SYS_PTRACE_H -#define _SYS_PTRACE_H 1 - -#include -#include - -__BEGIN_DECLS - -/* Type of the REQUEST argument to `ptrace.' */ -enum __ptrace_request -{ - /* Indicate that the process making this request should be traced. - All signals received by this process can be intercepted by its - parent, and its parent can use the other `ptrace' requests. */ - PTRACE_TRACEME = 0, -#define PT_TRACE_ME PTRACE_TRACEME - - /* Return the word in the process's text space at address ADDR. */ - PTRACE_PEEKTEXT = 1, -#define PT_READ_I PTRACE_PEEKTEXT - - /* Return the word in the process's data space at address ADDR. */ - PTRACE_PEEKDATA = 2, -#define PT_READ_D PTRACE_PEEKDATA - - /* Return the word in the process's user area at offset ADDR. */ - PTRACE_PEEKUSER = 3, -#define PT_READ_U PTRACE_PEEKUSER - - /* Write the word DATA into the process's text space at address ADDR. */ - PTRACE_POKETEXT = 4, -#define PT_WRITE_I PTRACE_POKETEXT - - /* Write the word DATA into the process's data space at address ADDR. */ - PTRACE_POKEDATA = 5, -#define PT_WRITE_D PTRACE_POKEDATA - - /* Write the word DATA into the process's user area at offset ADDR. */ - PTRACE_POKEUSER = 6, -#define PT_WRITE_U PTRACE_POKEUSER - - /* Continue the process. */ - PTRACE_CONT = 7, -#define PT_CONTINUE PTRACE_CONT - - /* Kill the process. */ - PTRACE_KILL = 8, -#define PT_KILL PTRACE_KILL - - /* Single step the process. - This is not supported on all machines. */ - PTRACE_SINGLESTEP = 9, -#define PT_STEP PTRACE_SINGLESTEP - - /* Get all general purpose registers used by a processes. - This is not supported on all machines. */ - PTRACE_GETREGS = 12, -#define PT_GETREGS PTRACE_GETREGS - - /* Set all general purpose registers used by a processes. - This is not supported on all machines. */ - PTRACE_SETREGS = 13, -#define PT_SETREGS PTRACE_SETREGS - - /* Get all floating point registers used by a processes. - This is not supported on all machines. */ - PTRACE_GETFPREGS = 14, -#define PT_GETFPREGS PTRACE_GETFPREGS - - /* Set all floating point registers used by a processes. - This is not supported on all machines. */ - PTRACE_SETFPREGS = 15, -#define PT_SETFPREGS PTRACE_SETFPREGS - - /* Attach to a process that is already running. */ - PTRACE_ATTACH = 16, -#define PT_ATTACH PTRACE_ATTACH - - /* Detach from a process attached to with PTRACE_ATTACH. */ - PTRACE_DETACH = 17, -#define PT_DETACH PTRACE_DETACH - - /* Get all extended floating point registers used by a processes. - This is not supported on all machines. */ - PTRACE_GETFPXREGS = 18, -#define PT_GETFPXREGS PTRACE_GETFPXREGS - - /* Set all extended floating point registers used by a processes. - This is not supported on all machines. */ - PTRACE_SETFPXREGS = 19, -#define PT_SETFPXREGS PTRACE_SETFPXREGS - - /* Continue and stop at the next (return from) syscall. */ - PTRACE_SYSCALL = 24 -#define PT_SYSCALL PTRACE_SYSCALL -}; - -/* Perform process tracing functions. REQUEST is one of the values - above, and determines the action to be taken. - For all requests except PTRACE_TRACEME, PID specifies the process to be - traced. - - PID and the other arguments described above for the various requests should - appear (those that are used for the particular request) as: - pid_t PID, void *ADDR, int DATA, void *ADDR2 - after REQUEST. */ -#if _MIPS_SIM == _ABIN32 -__extension__ extern long long int ptrace - (enum __ptrace_request __request, ...) __THROW; -#else -extern long int ptrace (enum __ptrace_request __request, ...) __THROW; -#endif - -__END_DECLS - -#endif /* _SYS_PTRACE_H */ From 13d7881aeb813188d3da8ac11386d1cf88526f75 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Fri, 3 Mar 2006 01:16:30 +0000 Subject: [PATCH 3585/4487] 2006-03-02 Lior Balkohen * sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h (__pthread_list_t, __pthread_slist_t): New typedefs. (pthread_mutex_t): Replace __next and __prev fields with __list. * sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define. (lll_futex_wake_unlock): Define. (lll_robust_mutex_dead, lll_robust_mutex_trylock, lll_robust_mutex_lock, lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock, lll_robust_mutex_unlock): New macros. (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes. * sysdeps/unix/sysv/linux/mips/nptl/pt-vfork.S: Use correct path to vfork.S. * sysdeps/unix/sysv/linux/mips/nptl/vfork.S: Likewise. --- ChangeLog.mips | 16 ++++ .../sysv/linux/mips/nptl/bits/pthreadtypes.h | 19 ++++- .../unix/sysv/linux/mips/nptl/lowlevellock.h | 74 +++++++++++++++++++ sysdeps/unix/sysv/linux/mips/nptl/pt-vfork.S | 4 +- sysdeps/unix/sysv/linux/mips/nptl/vfork.S | 4 +- 5 files changed, 110 insertions(+), 7 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 32566f9950..7debe9d020 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,19 @@ +2006-03-02 Lior Balkohen + + * sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h + (__pthread_list_t, __pthread_slist_t): New typedefs. + (pthread_mutex_t): Replace __next and __prev fields with __list. + * sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h (FUTEX_WAKE_OP, + FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define. + (lll_futex_wake_unlock): Define. + (lll_robust_mutex_dead, lll_robust_mutex_trylock, lll_robust_mutex_lock, + lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock, + lll_robust_mutex_unlock): New macros. + (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes. + * sysdeps/unix/sysv/linux/mips/nptl/pt-vfork.S: Use correct path to + vfork.S. + * sysdeps/unix/sysv/linux/mips/nptl/vfork.S: Likewise. + 2006-03-02 Daniel Jacobowitz * sysdeps/unix/sysv/linux/mips/ptrace.c: Delete file. diff --git a/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h index d5e89a9364..eda0a2fbe9 100644 --- a/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h +++ b/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h @@ -55,6 +55,20 @@ typedef union } pthread_attr_t; +#if _MIPS_SIM == _ABI64 +typedef struct __pthread_internal_list +{ + struct __pthread_internal_list *__prev; + struct __pthread_internal_list *__next; +} __pthread_list_t; +#else +typedef struct __pthread_internal_slist +{ + struct __pthread_internal_slist *__next; +} __pthread_slist_t; +#endif + + /* Data structures for mutex handling. The structure of the attribute type is deliberately not exposed. */ typedef union @@ -72,15 +86,14 @@ typedef union int __kind; #if _MIPS_SIM == _ABI64 int __spins; - struct __pthread_mutex_s *__next; - struct __pthread_mutex_s *__prev; + __pthread_list_t __list; # define __PTHREAD_MUTEX_HAVE_PREV 1 #else unsigned int __nusers; __extension__ union { int __spins; - struct __pthread_mutex_s *__next; + __pthread_slist_t __list; }; #endif } __data; diff --git a/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h index 5e3dd48f99..d5070e8985 100644 --- a/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h @@ -30,6 +30,8 @@ #define FUTEX_WAKE 1 #define FUTEX_REQUEUE 3 #define FUTEX_CMP_REQUEUE 4 +#define FUTEX_WAKE_OP 5 +#define FUTEX_OP_CLEAR_WAKE_IF_GT_ONE ((4 << 24) | 1) /* Initializer for compatibility lock. */ #define LLL_MUTEX_LOCK_INITIALIZER (0) @@ -61,6 +63,15 @@ INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; \ }) +#define lll_robust_mutex_dead(futexv) \ + do \ + { \ + int *__futexp = &(futexv); \ + atomic_or (__futexp, FUTEX_OWNER_DIED); \ + lll_futex_wake (__futexp, 1); \ + } \ + while (0) + /* Returns non-zero if error happened, zero if success. */ #define lll_futex_requeue(futexp, nr_wake, nr_move, mutex, val) \ ({ \ @@ -72,6 +83,18 @@ INTERNAL_SYSCALL_ERROR_P (__ret, __err); \ }) +/* Returns non-zero if error happened, zero if success. */ +#define lll_futex_wake_unlock(futexp, nr_wake, nr_wake2, futexp2) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + \ + __ret = INTERNAL_SYSCALL (futex, __err, 6, \ + (futexp), FUTEX_WAKE_OP, (nr_wake), \ + (nr_wake2), (futexp2), \ + FUTEX_OP_CLEAR_WAKE_IF_GT_ONE); \ + INTERNAL_SYSCALL_ERROR_P (__ret, __err); \ + }) static inline int __attribute__((always_inline)) __lll_mutex_trylock(int *futex) @@ -89,7 +112,16 @@ __lll_mutex_cond_trylock(int *futex) #define lll_mutex_cond_trylock(lock) __lll_mutex_cond_trylock (&(lock)) +static inline int __attribute__((always_inline)) +__lll_robust_mutex_trylock(int *futex, int id) +{ + return atomic_compare_and_exchange_val_acq (futex, id, 0) != 0; +} +#define lll_robust_mutex_trylock(lock, id) \ + __lll_robust_mutex_trylock (&(lock), id) + extern void __lll_lock_wait (int *futex) attribute_hidden; +extern int __lll_robust_lock_wait (int *futex) attribute_hidden; static inline void __attribute__((always_inline)) __lll_mutex_lock(int *futex) @@ -100,6 +132,18 @@ __lll_mutex_lock(int *futex) #define lll_mutex_lock(futex) __lll_mutex_lock (&(futex)) +static inline int __attribute__ ((always_inline)) +__lll_robust_mutex_lock (int *futex, int id) +{ + int result = 0; + if (atomic_compare_and_exchange_bool_acq (futex, id, 0) != 0) + result = __lll_robust_lock_wait (futex); + return result; +} +#define lll_robust_mutex_lock(futex, id) \ + __lll_robust_mutex_lock (&(futex), id) + + static inline void __attribute__ ((always_inline)) __lll_mutex_cond_lock (int *futex) { @@ -109,8 +153,14 @@ __lll_mutex_cond_lock (int *futex) #define lll_mutex_cond_lock(futex) __lll_mutex_cond_lock (&(futex)) +#define lll_robust_mutex_cond_lock(futex, id) \ + __lll_robust_mutex_lock (&(futex), (id) | FUTEX_WAITERS) + + extern int __lll_timedlock_wait (int *futex, const struct timespec *) attribute_hidden; +extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *) + attribute_hidden; static inline int __attribute__ ((always_inline)) __lll_mutex_timedlock (int *futex, const struct timespec *abstime) @@ -124,6 +174,19 @@ __lll_mutex_timedlock (int *futex, const struct timespec *abstime) __lll_mutex_timedlock (&(futex), abstime) +static inline int __attribute__ ((always_inline)) +__lll_robust_mutex_timedlock (int *futex, const struct timespec *abstime, + int id) +{ + int result = 0; + if (atomic_compare_and_exchange_bool_acq (futex, id, 0) != 0) + result = __lll_robust_timedlock_wait (futex, abstime); + return result; +} +#define lll_robust_mutex_timedlock(futex, abstime, id) \ + __lll_robust_mutex_timedlock (&(futex), abstime, id) + + static inline void __attribute__ ((always_inline)) __lll_mutex_unlock (int *futex) { @@ -134,6 +197,17 @@ __lll_mutex_unlock (int *futex) #define lll_mutex_unlock(futex) __lll_mutex_unlock(&(futex)) +static inline void __attribute__ ((always_inline)) +__lll_robust_mutex_unlock (int *futex, int mask) +{ + int val = atomic_exchange_rel (futex, 0); + if (__builtin_expect (val & mask, 0)) + lll_futex_wake (futex, 1); +} +#define lll_robust_mutex_unlock(futex) \ + __lll_robust_mutex_unlock(&(futex), FUTEX_WAITERS) + + static inline void __attribute__ ((always_inline)) __lll_mutex_unlock_force (int *futex) { diff --git a/sysdeps/unix/sysv/linux/mips/nptl/pt-vfork.S b/sysdeps/unix/sysv/linux/mips/nptl/pt-vfork.S index fe2b81bc1f..652dfb1e58 100644 --- a/sysdeps/unix/sysv/linux/mips/nptl/pt-vfork.S +++ b/sysdeps/unix/sysv/linux/mips/nptl/pt-vfork.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2005 Free Software Foundation, Inc. +/* Copyright (C) 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 @@ -34,4 +34,4 @@ sw a2, PID_OFFSET(v1); /* Restore the PID. */ \ 1: -#include <../sysdeps/unix/sysv/linux/mips/vfork.S> +#include diff --git a/sysdeps/unix/sysv/linux/mips/nptl/vfork.S b/sysdeps/unix/sysv/linux/mips/nptl/vfork.S index 874a2e2bf4..b93a924ccf 100644 --- a/sysdeps/unix/sysv/linux/mips/nptl/vfork.S +++ b/sysdeps/unix/sysv/linux/mips/nptl/vfork.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2005 Free Software Foundation, Inc. +/* Copyright (C) 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 @@ -39,4 +39,4 @@ 2: sw a2, PID_OFFSET(v1); /* Restore the PID. */ \ 1: -#include <../sysdeps/unix/sysv/linux/mips/vfork.S> +#include From b834ecbda3c0656675fb2b591a1c93cd03272cb3 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 3 Mar 2006 11:21:28 +0000 Subject: [PATCH 3586/4487] 2006-03-02 Roland McGrath * sysdeps/unix/alpha/sysdep.h (PTR_MANGLE): Use __typeof in cast. --- sysdeps/unix/alpha/sysdep.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h index 2260ec5480..2e5bc798eb 100644 --- a/sysdeps/unix/alpha/sysdep.h +++ b/sysdeps/unix/alpha/sysdep.h @@ -415,7 +415,7 @@ __LABEL(name) \ # else extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden; # define PTR_MANGLE(var) \ - (var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard_local) + (var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard_local) # define PTR_DEMANGLE(var) PTR_MANGLE(var) # endif #elif defined PIC From ba580a176dd76bdef89ea0ca27e8aefa02877c59 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 6 Mar 2006 11:05:27 +0000 Subject: [PATCH 3587/4487] 2006-03-06 Roland McGrath * Makefile (%.bz2, %.gz): New pattern rules. --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 01985d9ba5..657fdeef73 100644 --- a/Makefile +++ b/Makefile @@ -38,3 +38,6 @@ glibc-port-%-$(dist-version).tar: ChangeLog.% find $(basename $@) -name configure -print | xargs touch tar cf $@ $(basename $@) rm -fr $(basename $@) + +%.bz2: %; bzip2 -9vk $< +%.gz: %; gzip -9vnc $< > $@.new && mv -f $@.new $@ From dfbbf9b44ebf0c10a455c9d67e276ce629b4c06c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 6 Mar 2006 11:05:33 +0000 Subject: [PATCH 3588/4487] . --- ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ChangeLog b/ChangeLog index 5974507431..fcd20111fc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-03-06 Roland McGrath + + * Makefile (%.bz2, %.gz): New pattern rules. + 2006-02-28 Roland McGrath * Makefile (glibc-port-%-$(dist-version).tar): Don't include top-level From aea6074434ba3619b86a6ab2ea6bcb6b7b726758 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Sat, 11 Mar 2006 16:18:41 +0000 Subject: [PATCH 3589/4487] * sysdeps/unix/sysv/linux/mips/configure.in: Set libc_cv_slibdir, libc_cv_localedir, libdir, arch_minimum_kernel, and libc_cv_gcc_unwind_find_fde. * sysdeps/unix/sysv/linux/mips/mips64/configure.in: New file. * sysdeps/unix/sysv/linux/mips/configure: Regenerated. * sysdeps/unix/sysv/linux/mips/mips64/configure: Generated. --- ChangeLog.mips | 9 +++++ sysdeps/unix/sysv/linux/mips/configure | 34 +++++++++++++++++++ sysdeps/unix/sysv/linux/mips/configure.in | 34 +++++++++++++++++++ sysdeps/unix/sysv/linux/mips/mips64/configure | 4 +++ .../unix/sysv/linux/mips/mips64/configure.in | 5 +++ 5 files changed, 86 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/configure create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/configure.in diff --git a/ChangeLog.mips b/ChangeLog.mips index 7debe9d020..24124294b0 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,12 @@ +2006-03-11 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/mips/configure.in: Set libc_cv_slibdir, + libc_cv_localedir, libdir, arch_minimum_kernel, and + libc_cv_gcc_unwind_find_fde. + * sysdeps/unix/sysv/linux/mips/mips64/configure.in: New file. + * sysdeps/unix/sysv/linux/mips/configure: Regenerated. + * sysdeps/unix/sysv/linux/mips/mips64/configure: Generated. + 2006-03-02 Lior Balkohen * sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h diff --git a/sysdeps/unix/sysv/linux/mips/configure b/sysdeps/unix/sysv/linux/mips/configure index 4d9568f001..cad59b5f7f 100644 --- a/sysdeps/unix/sysv/linux/mips/configure +++ b/sysdeps/unix/sysv/linux/mips/configure @@ -76,3 +76,37 @@ mips*) echo '#include ' > asm-unistd.h ;; esac + +case "$prefix" in +/usr | /usr/) + # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib. + # Allow earlier configure scripts to handle libc_cv_slibdir, libdir, + # and libc_cv_localedir. + test -n "$libc_cv_slibdir" || \ + case $machine in + mips/mips64/n64/* ) + libc_cv_slibdir="/lib64" + if test "$libdir" = '${exec_prefix}/lib'; then + libdir='${exec_prefix}/lib64'; + # Locale data can be shared between 32bit and 64bit libraries + libc_cv_localedir='${exec_prefix}/lib/locale' + fi + ;; + mips/mips64/n32/* ) + libc_cv_slibdir="/lib32" + if test "$libdir" = '${exec_prefix}/lib'; then + libdir='${exec_prefix}/lib32'; + # Locale data can be shared between 32bit and 64bit libraries + libc_cv_localedir='${exec_prefix}/lib/locale' + fi + ;; + *) + libc_cv_slibdir="/lib" + ;; + esac +esac + +if test -z "$arch_minimum_kernel"; then + arch_minimum_kernel=2.4.0 + libc_cv_gcc_unwind_find_fde=yes +fi diff --git a/sysdeps/unix/sysv/linux/mips/configure.in b/sysdeps/unix/sysv/linux/mips/configure.in index e2e5d16c55..7248e1f3f5 100644 --- a/sysdeps/unix/sysv/linux/mips/configure.in +++ b/sysdeps/unix/sysv/linux/mips/configure.in @@ -76,3 +76,37 @@ mips*) echo '#include ' > asm-unistd.h ;; esac + +case "$prefix" in +/usr | /usr/) + # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib. + # Allow earlier configure scripts to handle libc_cv_slibdir, libdir, + # and libc_cv_localedir. + test -n "$libc_cv_slibdir" || \ + case $machine in + mips/mips64/n64/* ) + libc_cv_slibdir="/lib64" + if test "$libdir" = '${exec_prefix}/lib'; then + libdir='${exec_prefix}/lib64'; + # Locale data can be shared between 32bit and 64bit libraries + libc_cv_localedir='${exec_prefix}/lib/locale' + fi + ;; + mips/mips64/n32/* ) + libc_cv_slibdir="/lib32" + if test "$libdir" = '${exec_prefix}/lib'; then + libdir='${exec_prefix}/lib32'; + # Locale data can be shared between 32bit and 64bit libraries + libc_cv_localedir='${exec_prefix}/lib/locale' + fi + ;; + *) + libc_cv_slibdir="/lib" + ;; + esac +esac + +if test -z "$arch_minimum_kernel"; then + arch_minimum_kernel=2.4.0 + libc_cv_gcc_unwind_find_fde=yes +fi diff --git a/sysdeps/unix/sysv/linux/mips/mips64/configure b/sysdeps/unix/sysv/linux/mips/mips64/configure new file mode 100644 index 0000000000..c331f98299 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/configure @@ -0,0 +1,4 @@ +# This file is generated from configure.in by Autoconf. DO NOT EDIT! + # Local configure fragment for sysdeps/unix/sysv/linux/mips/mips64. + +ldd_rewrite_script=$dest/ldd-rewrite.sed diff --git a/sysdeps/unix/sysv/linux/mips/mips64/configure.in b/sysdeps/unix/sysv/linux/mips/mips64/configure.in new file mode 100644 index 0000000000..a28638ad88 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/configure.in @@ -0,0 +1,5 @@ +sinclude(./aclocal.m4)dnl Autoconf lossage +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/unix/sysv/linux/mips/mips64. + +ldd_rewrite_script=$dest/ldd-rewrite.sed From 712619d7b62cd8b3fb604744104148aff0907533 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Sat, 11 Mar 2006 16:20:03 +0000 Subject: [PATCH 3590/4487] * sysdeps/unix/sysv/linux/mips/nptl/fork.c: Correct path to i386/fork.c. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/nptl/fork.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 24124294b0..1d20fd3a56 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2006-03-11 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/mips/nptl/fork.c: Correct path to + i386/fork.c. + 2006-03-11 Daniel Jacobowitz * sysdeps/unix/sysv/linux/mips/configure.in: Set libc_cv_slibdir, diff --git a/sysdeps/unix/sysv/linux/mips/nptl/fork.c b/sysdeps/unix/sysv/linux/mips/nptl/fork.c index 06b7e1c69f..d31889e42c 100644 --- a/sysdeps/unix/sysv/linux/mips/nptl/fork.c +++ b/sysdeps/unix/sysv/linux/mips/nptl/fork.c @@ -1 +1 @@ -#include "../i386/fork.c" +#include From 0353e641e95cb40971a8bbc92a401465bf820b26 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 16 Mar 2006 23:27:45 +0000 Subject: [PATCH 3591/4487] 2006-03-16 Roland McGrath * sysdeps/unix/sysv/linux/alpha/getcontext.S (__getcontext_x): Use .set noat to quiet assembler warning. --- sysdeps/unix/sysv/linux/alpha/getcontext.S | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/getcontext.S b/sysdeps/unix/sysv/linux/alpha/getcontext.S index bf9820ac73..f010f337e6 100644 --- a/sysdeps/unix/sysv/linux/alpha/getcontext.S +++ b/sysdeps/unix/sysv/linux/alpha/getcontext.S @@ -1,5 +1,5 @@ /* Save current context. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 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 @@ -57,6 +57,8 @@ weak_alias (__getcontext, getcontext) __getcontext_x: cfi_register (64, 0) + .set noat + /* Return value of getcontext. $0 is the only register whose value is not preserved. */ stq $31, UC_SIGCTX+SC_REGS($16) From e5b5ba471f30f1237d6a92e1408a641dcd76175c Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Tue, 21 Mar 2006 20:54:56 +0000 Subject: [PATCH 3592/4487] * sysdeps/unix/sysv/linux/arm/eabi/socket.S: Delete. * sysdeps/unix/sysv/linux/arm/eabi/syscalls.list, sysdeps/unix/sysv/linux/arm/eabi/umount.c: New files. * sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h (DOCARGS_6, UNDOCARGS_6, RESTORE_LR_6): Define. * sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h (DOCARGS_6, UNDOCARGS_6, RESTORE_LR_6): Define. * sysdeps/unix/sysv/linux/arm/eabi/sysdep.h: Undefine __NR_stime and __NR_alarm. --- ChangeLog.arm | 12 ++ .../arm/eabi/linuxthreads/sysdep-cancel.h | 10 +- .../sysv/linux/arm/eabi/nptl/sysdep-cancel.h | 10 +- sysdeps/unix/sysv/linux/arm/eabi/socket.S | 131 ------------------ .../unix/sysv/linux/arm/eabi/syscalls.list | 34 +++++ sysdeps/unix/sysv/linux/arm/eabi/sysdep.h | 8 +- sysdeps/unix/sysv/linux/arm/eabi/umount.c | 31 +++++ 7 files changed, 98 insertions(+), 138 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/arm/eabi/socket.S create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/syscalls.list create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/umount.c diff --git a/ChangeLog.arm b/ChangeLog.arm index 017847529e..21f9abde70 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,15 @@ +2006-03-21 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/arm/eabi/socket.S: Delete. + * sysdeps/unix/sysv/linux/arm/eabi/syscalls.list, + sysdeps/unix/sysv/linux/arm/eabi/umount.c: New files. + * sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h + (DOCARGS_6, UNDOCARGS_6, RESTORE_LR_6): Define. + * sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h + (DOCARGS_6, UNDOCARGS_6, RESTORE_LR_6): Define. + * sysdeps/unix/sysv/linux/arm/eabi/sysdep.h: Undefine + __NR_stime and __NR_alarm. + 2006-03-02 Daniel Jacobowitz * sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h diff --git a/sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h index f77333f106..bc520426ef 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h @@ -53,9 +53,9 @@ UNDOARGS_##args; \ cmn r0, $4096; -/* DOARGS pushes four bytes on the stack for five arguments, and nothing - otherwise. In order to preserve doubleword alignment, sometimes we must - save an extra register. */ +/* DOARGS pushes four bytes on the stack for five arguments, eight bytes for + six arguments, and nothing for fewer. In order to preserve doubleword + alignment, sometimes we must save an extra register. */ # define DOCARGS_0 stmfd sp!, {r7, lr} # define UNDOCARGS_0 @@ -81,6 +81,10 @@ # define UNDOCARGS_5 ldmfd sp!, {r0, r1, r2, r3} # define RESTORE_LR_5 ldmfd sp!, {r4, r7, lr} +# define DOCARGS_6 stmfd sp!, {r0, r1, r2, r3, r7, lr} +# define UNDOCARGS_6 ldmfd sp!, {r0, r1, r2, r3} +# define RESTORE_LR_6 RESTORE_LR_0 + # ifdef IS_IN_libpthread # define CENABLE bl PLTJMP(__pthread_enable_asynccancel) # define CDISABLE bl PLTJMP(__pthread_disable_asynccancel) diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h index 5e89399116..92fe90385f 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h @@ -64,9 +64,9 @@ UNDOARGS_##args; \ cmn r0, $4096; -/* DOARGS pushes four bytes on the stack for five arguments, and nothing - otherwise. In order to preserve doubleword alignment, sometimes we must - save an extra register. */ +/* DOARGS pushes four bytes on the stack for five arguments, eight bytes for + six arguments, and nothing for fewer. In order to preserve doubleword + alignment, sometimes we must save an extra register. */ # define RESTART_UNWIND .fnend; .fnstart; .save {r7, lr} @@ -94,6 +94,10 @@ # define UNDOCARGS_5 ldmfd sp!, {r0, r1, r2, r3}; .fnend; .fnstart; .save {r4}; .save {r7, lr}; .pad #4 # define RESTORE_LR_5 ldmfd sp!, {r4, r7, lr} +# define DOCARGS_6 .save {r4, r5}; stmfd sp!, {r0, r1, r2, r3, r7, lr}; .save {r7, lr}; .pad #20 +# define UNDOCARGS_6 ldmfd sp!, {r0, r1, r2, r3}; .fnend; .fnstart; .save {r4, r5}; .save {r7, lr} +# define RESTORE_LR_6 RESTORE_LR_0 + # ifdef IS_IN_libpthread # define CENABLE bl PLTJMP(__pthread_enable_asynccancel) # define CDISABLE bl PLTJMP(__pthread_disable_asynccancel) diff --git a/sysdeps/unix/sysv/linux/arm/eabi/socket.S b/sysdeps/unix/sysv/linux/arm/eabi/socket.S deleted file mode 100644 index f614213fd3..0000000000 --- a/sysdeps/unix/sysv/linux/arm/eabi/socket.S +++ /dev/null @@ -1,131 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997, 1998, 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 - 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. */ - -#include -#include - -#define P(a, b) P2(a, b) -#define P2(a, b) a##b - - .text -/* The socket-oriented system calls are handled unusally in Linux. - They are all gated through the single `socketcall' system call number. - `socketcall' takes two arguments: the first is the subcode, specifying - which socket function is being called; and the second is a pointer to - the arguments to the specific function. - - The .S files for the other calls just #define socket and #include this. */ - -#ifndef __socket -# ifndef NO_WEAK_ALIAS -# define __socket P(__,socket) -# else -# define __socket socket -# endif -#endif - -#define PUSHARGS_1 str a1, [sp, $-8]!; .pad #8 -#define PUSHARGS_2 stmfd sp!, {a1, a2}; .pad #8 -#define PUSHARGS_3 stmfd sp!, {a1, a2, a3, a4}; .pad #16 /* a4 pushed for padding */ -#define PUSHARGS_4 stmfd sp!, {a1, a2, a3, a4}; .pad #16 -#define PUSHARGS_5 stmfd sp!, {a1, a2, a3, a4}; .pad #16 /* Caller has already pushed arg 5 */ -#define PUSHARGS_6 stmfd sp!, {a1, a2, a3, a4}; .pad #16 - -#define POPARGS_1 add sp, sp, #8 -#define POPARGS_2 add sp, sp, #8 -#define POPARGS_3 add sp, sp, #16 -#define POPARGS_4 add sp, sp, #16 -#define POPARGS_5 add sp, sp, #16 -#define POPARGS_6 add sp, sp, #16 - -#ifndef NARGS -#define NARGS 3 /* If we were called with no wrapper, this is really socket() */ -#endif - -#if defined NEED_CANCELLATION && defined CENABLE - PSEUDO_PROLOGUE -#endif - -.globl __socket -ENTRY (__socket) - .fnstart - - /* This code previously moved sp into ip and stored the args using - stmdb ip!, {a1-a4}. It did not modify sp, so the stack never had - to be restored after the syscall completed. It saved an - instruction and meant no stack cleanup work was required. - - This will not work in the case of a socket call being interrupted - by a signal. If the signal handler uses any stack the arguments - to socket will be trashed. The results of a restart of any - socket call are then unpredictable. */ - - /* Push args onto the stack. */ - P(PUSHARGS_,NARGS) - -#if defined NEED_CANCELLATION && defined CENABLE - SINGLE_THREAD_P - bne 1f -#endif - - /* Do the system call trap. */ - mov a1, $P(SOCKOP_,socket) - mov a2, sp - DO_CALL (socketcall, 0) - - /* Pop args off the stack */ - P(POPARGS_,NARGS) - - /* r0 is < 0 if there was an error. */ - cmn r0, $124 - RETINSTR(cc, r14) - b PLTJMP(SYSCALL_ERROR) - -#if defined NEED_CANCELLATION && defined CENABLE -1: - stmfd sp!, {r7, lr} - .save {r7, lr} - CENABLE - mov ip, r0 - - mov r0, #P(SOCKOP_,socket) - add r1, sp, #8 - mov r7, #SYS_ify(socketcall) - swi 0x0 - - mov r7, r0 - mov r0, ip - CDISABLE - mov r0, r7 - ldmfd sp!, {r7, lr} - - P(POPARGS_,NARGS) - - /* r0 is < 0 if there was an error. */ - cmn r0, $124 - RETINSTR(cc, r14) - b PLTJMP(SYSCALL_ERROR) -#endif - - .fnend -PSEUDO_END (__socket) - -#ifndef NO_WEAK_ALIAS -weak_alias (__socket, socket) -#endif diff --git a/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list b/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list new file mode 100644 index 0000000000..31e1cd6102 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list @@ -0,0 +1,34 @@ +# File name Caller Syscall name # args Strong name Weak names + +# semaphore and shm system calls +msgctl - msgctl i:iip __msgctl msgctl +msgget - msgget i:ii __msgget msgget +msgrcv - msgrcv Ci:ibnii __msgrcv msgrcv +msgsnd - msgsnd Ci:ibni __msgsnd msgsnd +shmat - shmat i:ipi __shmat shmat +shmctl - shmctl i:iip __shmctl shmctl +shmdt - shmdt i:s __shmdt shmdt +shmget - shmget i:iii __shmget shmget +semop - semop i:ipi __semop semop +semtimedop - semtimedop i:ipip semtimedop +semget - semget i:iii __semget semget +semctl - semctl i:iiii __semctl semctl + +# proper socket implementations: +accept - accept Ci:iBN __libc_accept __accept accept +bind - bind i:ipi __bind bind +connect - connect Ci:ipi __libc_connect __connect_internal __connect connect +getpeername - getpeername i:ipp __getpeername getpeername +getsockname - getsockname i:ipp __getsockname getsockname +getsockopt - getsockopt i:iiiBN __getsockopt getsockopt +listen - listen i:ii __listen listen +recv - recv Ci:ibni __libc_recv __recv recv +recvfrom - recvfrom Ci:ibniBN __libc_recvfrom __recvfrom recvfrom +recvmsg - recvmsg Ci:ipi __libc_recvmsg __recvmsg recvmsg +send - send Ci:ibni __libc_send __send send +sendmsg - sendmsg Ci:ipi __libc_sendmsg __sendmsg sendmsg +sendto - sendto Ci:ibnibn __libc_sendto __sendto sendto +setsockopt - setsockopt i:iiibn __setsockopt setsockopt +shutdown - shutdown i:ii __shutdown shutdown +socket - socket i:iii __socket socket +socketpair - socketpair i:iiif __socketpair socketpair diff --git a/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h b/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h index 7f5ded5580..bf9c8d76b8 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2005 +/* Copyright (C) 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -29,6 +29,12 @@ # error Kernel headers are too old #endif +/* Don't use stime, even if the kernel headers define it. We have + settimeofday, and some EABI kernels have removed stime. Similarly + use setitimer to implement alarm. */ +#undef __NR_stime +#undef __NR_alarm + /* The ARM EABI user interface passes the syscall number in r7, instead of in the swi. This is more efficient, because the kernel does not need to fetch the swi from memory to find out the number; which can be painful diff --git a/sysdeps/unix/sysv/linux/arm/eabi/umount.c b/sysdeps/unix/sysv/linux/arm/eabi/umount.c new file mode 100644 index 0000000000..e7c5690890 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/umount.c @@ -0,0 +1,31 @@ +/* Copyright (C) 2000, 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Huggins-Daines , 2000. + + 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. */ + +/* Since we don't have an oldumount system call, do what the kernel + does down here. */ + +extern long int __umount2 (const char *name, int flags); + +long int +__umount (const char *name) +{ + return __umount2 (name, 0); +} + +weak_alias (__umount, umount); From ebabc882d0c9ac3dc5235a2ca3522b7578c2e5cb Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Tue, 21 Mar 2006 21:00:16 +0000 Subject: [PATCH 3593/4487] * sysdeps/unix/sysv/linux/arm/kernel-features.h: New file. --- ChangeLog.arm | 1 + sysdeps/unix/sysv/linux/arm/kernel-features.h | 31 +++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/kernel-features.h diff --git a/ChangeLog.arm b/ChangeLog.arm index 21f9abde70..72a977ce63 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -2,6 +2,7 @@ * sysdeps/unix/sysv/linux/arm/eabi/socket.S: Delete. * sysdeps/unix/sysv/linux/arm/eabi/syscalls.list, + sysdeps/unix/sysv/linux/arm/kernel-features.h, sysdeps/unix/sysv/linux/arm/eabi/umount.c: New files. * sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h (DOCARGS_6, UNDOCARGS_6, RESTORE_LR_6): Define. diff --git a/sysdeps/unix/sysv/linux/arm/kernel-features.h b/sysdeps/unix/sysv/linux/arm/kernel-features.h new file mode 100644 index 0000000000..6b70f33e9f --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/kernel-features.h @@ -0,0 +1,31 @@ +/* Set flags signalling availability of kernel features based on given + kernel version number. + Copyright (C) 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 + 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. */ + +/* The utimes syscall was added before 2.6.1. */ +#if __LINUX_KERNEL_VERSION >= 132609 +# define __ASSUME_UTIMES 1 +#endif + +/* The new getrlimit syscall was added sometime before 2.4.6. */ +#if __LINUX_KERNEL_VERSION >= 132102 +#define __ASSUME_NEW_GETRLIMIT_SYSCALL 1 +#endif + +#include_next From ea5f32769ed893a0680ce95dabcd494720844024 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 24 Mar 2006 16:36:38 +0000 Subject: [PATCH 3594/4487] Define LINUX_FADV_ASYNC_WRITE and LINUX_FADV_WRITE_WAIT. --- sysdeps/unix/sysv/linux/alpha/bits/fcntl.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h index c4a9b77e2e..0f32cec876 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 1995-1999, 2000, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 1995-2000, 2004, 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 @@ -173,6 +173,12 @@ struct flock64 # define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ #endif +/* Linux-specific operations for posix_fadvise. */ +#ifdef __USE_GNU +# define LINUX_FADV_ASYNC_WRITE 32 /* Start writeout on range. */ +# define LINUX_FADV_WRITE_WAIT 33 /* Wait upon writeout to range. */ +#endif + __BEGIN_DECLS /* Provide kernel hint to read ahead. */ From b415b963c25939819fd14606410a4450bf9a34d3 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Tue, 28 Mar 2006 04:13:22 +0000 Subject: [PATCH 3595/4487] 2006-03-27 Denis Barbier * sysdeps/unix/sysv/linux/mips/bits/resource.h (RLIMIT_RTPRIO): Fix typo. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/bits/resource.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 1d20fd3a56..292e33b927 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2006-03-27 Denis Barbier + + * sysdeps/unix/sysv/linux/mips/bits/resource.h (RLIMIT_RTPRIO): Fix + typo. + 2006-03-11 Daniel Jacobowitz * sysdeps/unix/sysv/linux/mips/nptl/fork.c: Correct path to diff --git a/sysdeps/unix/sysv/linux/mips/bits/resource.h b/sysdeps/unix/sysv/linux/mips/bits/resource.h index 7e7152935b..9e99f5d5db 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/resource.h +++ b/sysdeps/unix/sysv/linux/mips/bits/resource.h @@ -1,5 +1,5 @@ /* Bit values & structures for resource limits. Linux/MIPS version. - Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2004, 2005 + Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -98,7 +98,7 @@ enum __rlimit_resource /* Maximum realtime priority allowed for non-priviledged processes. */ __RLIMIT_RTPRIO = 14, -#define RLIMIT_RTPRIO _RLIMIT_RTPRIO +#define RLIMIT_RTPRIO __RLIMIT_RTPRIO __RLIMIT_NLIMITS = 15, __RLIM_NLIMITS = __RLIMIT_NLIMITS From bfc23f5a3631b869f2a8824ca616831d4a8f6c23 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Tue, 28 Mar 2006 04:25:50 +0000 Subject: [PATCH 3596/4487] * sysdeps/unix/sysv/linux/mips/bits/poll.h (POLLREMOVE, POLLRDHUP): Define. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/bits/poll.h | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 292e33b927..4acb25365b 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2006-03-27 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/mips/bits/poll.h (POLLREMOVE, POLLRDHUP): + Define. + 2006-03-27 Denis Barbier * sysdeps/unix/sysv/linux/mips/bits/resource.h (RLIMIT_RTPRIO): Fix diff --git a/sysdeps/unix/sysv/linux/mips/bits/poll.h b/sysdeps/unix/sysv/linux/mips/bits/poll.h index f62b9c3948..eee4ea253b 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/poll.h +++ b/sysdeps/unix/sysv/linux/mips/bits/poll.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1997, 2001, 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 @@ -36,8 +36,10 @@ #endif #ifdef __USE_GNU -/* This is an extension for Linux. */ +/* These are extensions for Linux. */ # define POLLMSG 0x400 +# define POLLREMOVE 0x1000 +# define POLLRDHUP 0x2000 #endif /* Event types always implicitly polled for. These bits need not be set in From f3fb78ec4eb081545fe71974ca88433037af4a74 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Tue, 28 Mar 2006 04:32:14 +0000 Subject: [PATCH 3597/4487] 2006-03-27 Lior Balkohen * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Define LINUX_FADV_ASYNC_WRITE and LINUX_FADV_WRITE_WAIT. Add readahead prototype. --- ChangeLog.mips | 6 ++++++ sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 16 +++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 4acb25365b..19f4b4108e 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,9 @@ +2006-03-27 Lior Balkohen + + * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Define + LINUX_FADV_ASYNC_WRITE and LINUX_FADV_WRITE_WAIT. Add readahead + prototype. + 2006-03-27 Daniel Jacobowitz * sysdeps/unix/sysv/linux/mips/bits/poll.h (POLLREMOVE, POLLRDHUP): diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index aa039b4c0e..87affe3f3d 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2003, 2004 + Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -192,3 +192,17 @@ struct flock64 # define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */ # define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ #endif + +/* Linux-specific operations for posix_fadvise. */ +#ifdef __USE_GNU +# define LINUX_FADV_ASYNC_WRITE 32 /* Start writeout on range. */ +# define LINUX_FADV_WRITE_WAIT 33 /* Wait upon writeout to range. */ +#endif + +__BEGIN_DECLS + +/* Provide kernel hint to read ahead. */ +extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count) + __THROW; + +__END_DECLS From 711daa3092fee256a9b374140750d8fedb5a257d Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Tue, 28 Mar 2006 04:32:41 +0000 Subject: [PATCH 3598/4487] 2006-03-27 Lior Balkohen * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Define LINUX_FADV_ASYNC_WRITE and LINUX_FADV_WRITE_WAIT. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/bits/fcntl.h | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 72a977ce63..5907503cc6 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2006-03-27 Lior Balkohen + + * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Define + LINUX_FADV_ASYNC_WRITE and LINUX_FADV_WRITE_WAIT. + 2006-03-21 Daniel Jacobowitz * sysdeps/unix/sysv/linux/arm/eabi/socket.S: Delete. diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h index 3574e750ff..5368515250 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 1995-1998, 2000, 2004 Free Software Foundation, Inc. + Copyright (C) 1995-1998, 2000, 2004, 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 @@ -180,6 +180,12 @@ struct flock64 # define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ #endif +/* Linux-specific operations for posix_fadvise. */ +#ifdef __USE_GNU +# define LINUX_FADV_ASYNC_WRITE 32 /* Start writeout on range. */ +# define LINUX_FADV_WRITE_WAIT 33 /* Wait upon writeout to range. */ +#endif + __BEGIN_DECLS /* Provide kernel hint to read ahead. */ From 111e56f80cc0c1b2a589ed672e169e6fb1b3501e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 31 Mar 2006 21:45:38 +0000 Subject: [PATCH 3599/4487] Remove LINUX_FADV_ASYNC_WRITE and LINUX_FADV_WRITE_WAIT. Declare sync_file_range and splice. --- sysdeps/unix/sysv/linux/alpha/bits/fcntl.h | 27 +++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h index 0f32cec876..f06201c25f 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h @@ -173,16 +173,37 @@ struct flock64 # define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ #endif -/* Linux-specific operations for posix_fadvise. */ + #ifdef __USE_GNU -# define LINUX_FADV_ASYNC_WRITE 32 /* Start writeout on range. */ -# define LINUX_FADV_WRITE_WAIT 33 /* Wait upon writeout to range. */ +# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages + in the range before performing the + write. */ +# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those + dirty pages in the range which are + not presently under writeback. */ +# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in + the range after performing the + write. */ #endif __BEGIN_DECLS +#ifdef __USE_GNU + /* Provide kernel hint to read ahead. */ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count) __THROW; + +/* Selective file content synch'ing. */ +extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to, + unsigned int __flags); + + +/* Splice two files together. */ +extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags) + __THROW; + +#endif + __END_DECLS From 44f4e767265e025e254f40ff02cd3793048d362d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 14 Apr 2006 21:55:00 +0000 Subject: [PATCH 3600/4487] Add prototype for tee. --- sysdeps/unix/sysv/linux/alpha/bits/fcntl.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h index f06201c25f..6898fe8743 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h @@ -204,6 +204,10 @@ extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to, extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags) __THROW; +/* In-kernel implementation of tee for pipe buffers. */ +extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags) + __THROW; + #endif __END_DECLS From 5d3b4a7723a58d00e26c3a144b67d97ec25e241a Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Wed, 19 Apr 2006 05:35:34 +0000 Subject: [PATCH 3601/4487] 2006-04-19 Carlos O'Donell * sysdeps/hppa/linuxthreads/pspinlock.c: New file. * sysdeps/hppa/linuxthreads/pt-machine.h: Likewise. * sysdeps/hppa/linuxthreads/tls.h: Likewise. * sysdeps/unix/sysv/linux/hppa/linuxthreads/aio_cancel.c: Likewise. * sysdeps/unix/sysv/linux/hppa/linuxthreads/malloc-machine.h: Likewise. * sysdeps/unix/sysv/linux/hppa/linuxthreads/pt-initfini.c: Likewise. * sysdeps/unix/sysv/linux/hppa/linuxthreads/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/initspin.h: Likewise. * sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/pthreadtypes.h: Likewise. --- ChangeLog.hppa | 14 ++ sysdeps/hppa/linuxthreads/pspinlock.c | 82 ++++++ sysdeps/hppa/linuxthreads/pt-machine.h | 134 ++++++++++ sysdeps/hppa/linuxthreads/tls.h | 163 ++++++++++++ .../sysv/linux/hppa/linuxthreads/aio_cancel.c | 33 +++ .../linux/hppa/linuxthreads/bits/initspin.h | 41 +++ .../hppa/linuxthreads/bits/pthreadtypes.h | 160 ++++++++++++ .../linux/hppa/linuxthreads/malloc-machine.h | 73 ++++++ .../linux/hppa/linuxthreads/pt-initfini.c | 109 ++++++++ .../linux/hppa/linuxthreads/sysdep-cancel.h | 238 ++++++++++++++++++ 10 files changed, 1047 insertions(+) create mode 100644 sysdeps/hppa/linuxthreads/pspinlock.c create mode 100644 sysdeps/hppa/linuxthreads/pt-machine.h create mode 100644 sysdeps/hppa/linuxthreads/tls.h create mode 100644 sysdeps/unix/sysv/linux/hppa/linuxthreads/aio_cancel.c create mode 100644 sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/initspin.h create mode 100644 sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/pthreadtypes.h create mode 100644 sysdeps/unix/sysv/linux/hppa/linuxthreads/malloc-machine.h create mode 100644 sysdeps/unix/sysv/linux/hppa/linuxthreads/pt-initfini.c create mode 100644 sysdeps/unix/sysv/linux/hppa/linuxthreads/sysdep-cancel.h diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 0968014dbd..15a1f00e58 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,17 @@ +2006-04-19 Carlos O'Donell + + * sysdeps/hppa/linuxthreads/pspinlock.c: New file. + * sysdeps/hppa/linuxthreads/pt-machine.h: Likewise. + * sysdeps/hppa/linuxthreads/tls.h: Likewise. + * sysdeps/unix/sysv/linux/hppa/linuxthreads/aio_cancel.c: Likewise. + * sysdeps/unix/sysv/linux/hppa/linuxthreads/malloc-machine.h: + Likewise. + * sysdeps/unix/sysv/linux/hppa/linuxthreads/pt-initfini.c: Likewise. + * sysdeps/unix/sysv/linux/hppa/linuxthreads/sysdep-cancel.h: Likewise. + * sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/initspin.h: Likewise. + * sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/pthreadtypes.h: + Likewise. + 2006-02-28 Roland McGrath * sysdeps/hppa/shlib-versions: New file. diff --git a/sysdeps/hppa/linuxthreads/pspinlock.c b/sysdeps/hppa/linuxthreads/pspinlock.c new file mode 100644 index 0000000000..e5a5545227 --- /dev/null +++ b/sysdeps/hppa/linuxthreads/pspinlock.c @@ -0,0 +1,82 @@ +/* POSIX spinlock implementation. hppa version. + Copyright (C) 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 + 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; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include "internals.h" + +int +__pthread_spin_lock (pthread_spinlock_t *lock) +{ + volatile unsigned int *addr = __ldcw_align (lock); + + while (__ldcw (addr) == 0) + while (*addr == 0) ; + + return 0; +} +weak_alias (__pthread_spin_lock, pthread_spin_lock) + + +int +__pthread_spin_trylock (pthread_spinlock_t *lock) +{ + volatile unsigned int *a = __ldcw_align (lock); + + return __ldcw (a) ? 0 : EBUSY; +} +weak_alias (__pthread_spin_trylock, pthread_spin_trylock) + + +int +__pthread_spin_unlock (pthread_spinlock_t *lock) +{ + volatile unsigned int *a = __ldcw_align (lock); + int tmp = 1; + /* This should be a memory barrier to newer compilers */ + __asm__ __volatile__ ("stw,ma %1,0(%0)" + : : "r" (a), "r" (tmp) : "memory"); + return 0; +} +weak_alias (__pthread_spin_unlock, pthread_spin_unlock) + + +int +__pthread_spin_init (pthread_spinlock_t *lock, int pshared) +{ + /* We can ignore the `pshared' parameter. Since we are busy-waiting + all processes which can access the memory location `lock' points + to can use the spinlock. */ + volatile unsigned int *a = __ldcw_align (lock); + int tmp = 1; + /* This should be a memory barrier to newer compilers */ + __asm__ __volatile__ ("stw,ma %1,0(%0)" + : : "r" (a), "r" (tmp) : "memory"); + return 0; +} +weak_alias (__pthread_spin_init, pthread_spin_init) + + +int +__pthread_spin_destroy (pthread_spinlock_t *lock) +{ + /* Nothing to do. */ + return 0; +} +weak_alias (__pthread_spin_destroy, pthread_spin_destroy) diff --git a/sysdeps/hppa/linuxthreads/pt-machine.h b/sysdeps/hppa/linuxthreads/pt-machine.h new file mode 100644 index 0000000000..f35523f0f3 --- /dev/null +++ b/sysdeps/hppa/linuxthreads/pt-machine.h @@ -0,0 +1,134 @@ +/* Machine-dependent pthreads configuration and inline functions. + hppa version. + Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson . + + 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; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _PT_MACHINE_H +#define _PT_MACHINE_H 1 + +#include +#include + +#ifndef PT_EI +# define PT_EI extern inline __attribute__ ((always_inline)) +#endif + +extern inline long int testandset (__atomic_lock_t *spinlock); +extern inline int __compare_and_swap (long int *p, long int oldval, long int newval); +extern inline int lock_held (__atomic_lock_t *spinlock); +extern inline int __load_and_clear (__atomic_lock_t *spinlock); + +/* Get some notion of the current stack. Need not be exactly the top + of the stack, just something somewhere in the current frame. */ +#define CURRENT_STACK_FRAME stack_pointer +register char * stack_pointer __asm__ ("%r30"); + +/* Get/Set thread-specific pointer. We have to call into the kernel to + * modify it, but we can read it in user mode. */ +#ifndef THREAD_SELF +#define THREAD_SELF __get_cr27() +#endif + +#ifndef SET_THREAD_SELF +#define SET_THREAD_SELF(descr) __set_cr27(descr) +#endif +/* Use this to determine type */ +struct _pthread_descr_struct *__thread_self; + +static inline struct _pthread_descr_struct * __get_cr27(void) +{ + long cr27; + asm ("mfctl %%cr27, %0" : "=r" (cr27) : ); + return (struct _pthread_descr_struct *) cr27; +} + +#ifndef INIT_THREAD_SELF +#define INIT_THREAD_SELF(descr, nr) __set_cr27(descr) +#endif + +static inline void __set_cr27(struct _pthread_descr_struct * cr27) +{ + asm ( "ble 0xe0(%%sr2, %%r0)\n\t" + "copy %0, %%r26" + : : "r" (cr27) : "r26" ); +} + +/* We want the OS to assign stack addresses. */ +#define FLOATING_STACKS 1 +#define ARCH_STACK_MAX_SIZE 8*1024*1024 + +/* The hppa only has one atomic read and modify memory operation, + load and clear, so hppa spinlocks must use zero to signify that + someone is holding the lock. The address used for the ldcw + semaphore must be 16-byte aligned. */ +#define __ldcw(a) \ +({ \ + unsigned int __ret; \ + __asm__ __volatile__("ldcw 0(%1),%0" \ + : "=r" (__ret) : "r" (a) : "memory"); \ + __ret; \ +}) + +/* Strongly ordered lock reset */ +#define __lock_reset(lock_addr, tmp) \ +({ \ + __asm__ __volatile__ ("stw,ma %1,0(%0)" \ + : : "r" (lock_addr), "r" (tmp) : "memory"); \ +}) + +/* Because malloc only guarantees 8-byte alignment for malloc'd data, + and GCC only guarantees 8-byte alignment for stack locals, we can't + be assured of 16-byte alignment for atomic lock data even if we + specify "__attribute ((aligned(16)))" in the type declaration. So, + we use a struct containing an array of four ints for the atomic lock + type and dynamically select the 16-byte aligned int from the array + for the semaphore. */ +#define __PA_LDCW_ALIGNMENT 16 +#define __ldcw_align(a) ({ \ + volatile unsigned int __ret = (unsigned int) a; \ + if ((__ret & ~(__PA_LDCW_ALIGNMENT - 1)) < (unsigned int) a) \ + __ret = (__ret & ~(__PA_LDCW_ALIGNMENT - 1)) + __PA_LDCW_ALIGNMENT; \ + (unsigned int *) __ret; \ +}) + +/* Spinlock implementation; required. */ +PT_EI int +__load_and_clear (__atomic_lock_t *spinlock) +{ + volatile unsigned int *a = __ldcw_align (spinlock); + + return __ldcw (a); +} + +/* Emulate testandset */ +PT_EI long int +testandset (__atomic_lock_t *spinlock) +{ + return (__load_and_clear(spinlock) == 0); +} + +PT_EI int +lock_held (__atomic_lock_t *spinlock) +{ + volatile unsigned int *a = __ldcw_align (spinlock); + + return *a == 0; +} + +#endif /* pt-machine.h */ diff --git a/sysdeps/hppa/linuxthreads/tls.h b/sysdeps/hppa/linuxthreads/tls.h new file mode 100644 index 0000000000..3d33a18923 --- /dev/null +++ b/sysdeps/hppa/linuxthreads/tls.h @@ -0,0 +1,163 @@ +/* Definition for thread-local data handling. linuxthreads/hppa version. + Copyright (C) 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 + 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 _TLS_H +#define _TLS_H + +#ifndef __ASSEMBLER__ +# include +# include +# include + +/* Type for the dtv. */ +typedef union dtv +{ + size_t counter; + struct + { + void *val; + bool is_static; + } pointer; +} dtv_t; + +#else /* __ASSEMBLER__ */ +# include +#endif /* __ASSEMBLER__ */ + + +#if defined HAVE_TLS_SUPPORT + +/* Signal that TLS support is available. */ +# define USE_TLS 1 + +# ifndef __ASSEMBLER__ + +typedef struct +{ + dtv_t *dtv; + void *private; +} tcbhead_t; + +/* Include some syscall information for other headers */ +# include + +/* This is the size of the initial TCB. */ +# define TLS_INIT_TCB_SIZE sizeof (tcbhead_t) + +/* Alignment requirements for the initial TCB. */ +# define TLS_INIT_TCB_ALIGN __alignof__ (tcbhead_t) + +/* This is the size of the TCB. */ +# define TLS_TCB_SIZE sizeof (tcbhead_t) + +/* This is the size we need before TCB. */ +# define TLS_PRE_TCB_SIZE sizeof (struct _pthread_descr_struct) + +/* Alignment requirements for the TCB. */ +# define TLS_TCB_ALIGN __alignof__ (struct _pthread_descr_struct) + +/* The TLS blocks start right after the TCB. */ +# define TLS_DTV_AT_TP 1 + +/* Return the thread descriptor for the current thread. */ +# undef THREAD_SELF +# define THREAD_SELF \ + ({ struct _pthread_descr_struct *__self; \ + __self = __get_cr27(); \ + __self - 1; \ + }) + +# undef INIT_THREAD_SELF +# define INIT_THREAD_SELF(descr, nr) \ + ({ struct _pthread_descr_struct *__self = (void *)descr; \ + __set_cr27(__self + 1); \ + 0; \ + }) + +/* Access to data in the thread descriptor is easy. */ +#define THREAD_GETMEM(descr, member) \ + ((void) sizeof (descr), THREAD_SELF->member) +#define THREAD_GETMEM_NC(descr, member) \ + ((void) sizeof (descr), THREAD_SELF->member) +#define THREAD_SETMEM(descr, member, value) \ + ((void) sizeof (descr), THREAD_SELF->member = (value)) +#define THREAD_SETMEM_NC(descr, member, value) \ + ((void) sizeof (descr), THREAD_SELF->member = (value)) + +/* Install the dtv pointer. The pointer passed is to the element with + index -1 which contain the length. */ +# define INSTALL_DTV(tcbp, dtvp) \ + ((tcbhead_t *) (tcbp))->dtv = dtvp + 1 + +/* Install new dtv for current thread. */ +# define INSTALL_NEW_DTV(dtv) \ + ({ tcbhead_t *__tcbp = (tcbhead_t *)__get_cr27(); \ + __tcbp->dtv = dtv; \ + }) + +/* Return dtv of given thread descriptor. */ +# define GET_DTV(tcbp) \ + (((tcbhead_t *) (tcbp))->dtv) + +/* Code to initially initialize the thread pointer. This might need + special attention since 'errno' is not yet available and if the + operation can cause a failure 'errno' must not be touched. */ +# define TLS_INIT_TP(tcbp, secondcall) \ + ({ __set_cr27(tcbp); 0; }) + +/* Return the address of the dtv for the current thread. */ +# define THREAD_DTV() \ + ({ tcbhead_t *__tcbp = (tcbhead_t *)__get_cr27(); \ + __tcbp->dtv; \ + }) + +# define TLS_MULTIPLE_THREADS_IN_TCB 1 + +/* Get the thread descriptor definition. This must be after the + the definition of THREAD_SELF for TLS. */ +# include + +# endif /* __ASSEMBLER__ */ + +#else + +# ifndef __ASSEMBLER__ + +typedef struct +{ + void *tcb; + dtv_t *dtv; + void *self; + int multiple_threads; +} tcbhead_t; + +/* Get the thread descriptor definition. */ +# include + +# define NONTLS_INIT_TP \ + do { \ + static const tcbhead_t nontls_init_tp = { .multiple_threads = 0 }; \ + INIT_THREAD_SELF(&nontls_init_tp, 0); \ + } while (0) + +# endif /* __ASSEMBLER__ */ + +#endif /* HAVE_TLS_SUPPORT */ + +#endif /* tls.h */ diff --git a/sysdeps/unix/sysv/linux/hppa/linuxthreads/aio_cancel.c b/sysdeps/unix/sysv/linux/hppa/linuxthreads/aio_cancel.c new file mode 100644 index 0000000000..0d6da82919 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/linuxthreads/aio_cancel.c @@ -0,0 +1,33 @@ +#include + +#define aio_cancel64 XXX +#include +#undef aio_cancel64 +#include + +extern __typeof (aio_cancel) __new_aio_cancel; +extern __typeof (aio_cancel) __old_aio_cancel; + +#define aio_cancel __new_aio_cancel + +#include + +#undef aio_cancel +strong_alias (__new_aio_cancel, __new_aio_cancel64); +versioned_symbol (librt, __new_aio_cancel, aio_cancel, GLIBC_2_3); +versioned_symbol (librt, __new_aio_cancel64, aio_cancel64, GLIBC_2_3); + +#if SHLIB_COMPAT (librt, GLIBC_2_1, GLIBC_2_3) + +#undef ECANCELED +#define aio_cancel __old_aio_cancel +#define ECANCELED 125 + +#include + +#undef aio_cancel +strong_alias (__old_aio_cancel, __old_aio_cancel64); +compat_symbol (librt, __old_aio_cancel, aio_cancel, GLIBC_2_1); +compat_symbol (librt, __old_aio_cancel64, aio_cancel64, GLIBC_2_1); + +#endif diff --git a/sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/initspin.h b/sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/initspin.h new file mode 100644 index 0000000000..ff0ec200f7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/initspin.h @@ -0,0 +1,41 @@ +/* PA-RISC specific definitions for spinlock initializers. + Copyright (C) 2000, 2001 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; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* Initial value of a spinlock. PA-RISC only implements atomic load + and clear so this must be non-zero. */ +#define __LT_SPINLOCK_INIT ((__atomic_lock_t) { { 1, 1, 1, 1 } }) + +/* Initialize global spinlocks without cast, generally macro wrapped */ +#define __LT_SPINLOCK_ALT_INIT { { 1, 1, 1, 1 } } + +/* Macros for lock initializers, not using the above definition. + The above definition is not used in the case that static initializers + use this value. */ +#define __LOCK_ALT_INITIALIZER { __LT_SPINLOCK_ALT_INIT, 0 } + +/* Used to initialize _pthread_fastlock's in non-static case */ +#define __LOCK_INITIALIZER ((struct _pthread_fastlock){ __LT_SPINLOCK_INIT, 0 }) + +/* Used in pthread_atomic initialization */ +#define __ATOMIC_INITIALIZER { 0, __LT_SPINLOCK_ALT_INIT } + +/* Tell the rest of the code that the initializer is non-zero without + explaining it's internal structure */ +#define __LT_INITIALIZER_NOT_ZERO + diff --git a/sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/pthreadtypes.h new file mode 100644 index 0000000000..e2c6f5957d --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/pthreadtypes.h @@ -0,0 +1,160 @@ +/* Linuxthreads - a simple clone()-based implementation of Posix */ +/* threads for Linux. */ +/* Copyright (C) 1996 Xavier Leroy (Xavier.Leroy@inria.fr) */ +/* */ +/* This program is free software; you can redistribute it and/or */ +/* modify it under the terms of the GNU Library General Public License */ +/* as published by the Free Software Foundation; either version 2 */ +/* of the License, or (at your option) any later version. */ +/* */ +/* This program 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 Library General Public License for more details. */ + +#if !defined _BITS_TYPES_H && !defined _PTHREAD_H +# error "Never include directly; use instead." +#endif + +#ifndef _BITS_PTHREADTYPES_H +#define _BITS_PTHREADTYPES_H 1 + +#define __need_schedparam +#include + +/* We need 128-bit alignment for the ldcw semaphore. At most, we are + assured of 64-bit alignment for stack locals and malloc'd data. Thus, + we use a struct with four ints for the atomic lock type. The locking + code will figure out which of the four to use for the ldcw semaphore. */ +typedef volatile struct { + int lock[4]; +} __attribute__ ((aligned(16))) __atomic_lock_t; + +/* Fast locks (not abstract because mutexes and conditions aren't abstract). */ +struct _pthread_fastlock +{ + __atomic_lock_t __spinlock; /* Used by compare_and_swap emulation. Also, + adaptive SMP lock stores spin count here. */ + long int __status; /* "Free" or "taken" or head of waiting list */ +}; + +#ifndef _PTHREAD_DESCR_DEFINED +/* Thread descriptors */ +typedef struct _pthread_descr_struct *_pthread_descr; +# define _PTHREAD_DESCR_DEFINED +#endif + + +/* Attributes for threads. */ +typedef struct __pthread_attr_s +{ + int __detachstate; + int __schedpolicy; + struct __sched_param __schedparam; + int __inheritsched; + int __scope; + size_t __guardsize; + int __stackaddr_set; + void *__stackaddr; + size_t __stacksize; +} pthread_attr_t; + + +/* Conditions (not abstract because of PTHREAD_COND_INITIALIZER */ + +#ifdef __GLIBC_HAVE_LONG_LONG +__extension__ typedef long long __pthread_cond_align_t; +#else +typedef long __pthread_cond_align_t; +#endif + +typedef struct +{ + struct _pthread_fastlock __c_lock; /* Protect against concurrent access */ + _pthread_descr __c_waiting; /* Threads waiting on this condition */ + char __padding[48 - sizeof (struct _pthread_fastlock) + - sizeof (_pthread_descr) - sizeof (__pthread_cond_align_t)]; + __pthread_cond_align_t __align; +} pthread_cond_t; + + +/* Attribute for conditionally variables. */ +typedef struct +{ + int __dummy; +} pthread_condattr_t; + +/* Keys for thread-specific data */ +typedef unsigned int pthread_key_t; + + +/* Mutexes (not abstract because of PTHREAD_MUTEX_INITIALIZER). */ +/* (The layout is unnatural to maintain binary compatibility + with earlier releases of LinuxThreads.) */ +typedef struct +{ + int __m_reserved; /* Reserved for future use */ + int __m_count; /* Depth of recursive locking */ + _pthread_descr __m_owner; /* Owner thread (if recursive or errcheck) */ + int __m_kind; /* Mutex kind: fast, recursive or errcheck */ + struct _pthread_fastlock __m_lock; /* Underlying fast lock */ +} pthread_mutex_t; + + +/* Attribute for mutex. */ +typedef struct +{ + int __mutexkind; +} pthread_mutexattr_t; + + +/* Once-only execution */ +typedef int pthread_once_t; + + +#ifdef __USE_UNIX98 +/* Read-write locks. */ +typedef struct _pthread_rwlock_t +{ + struct _pthread_fastlock __rw_lock; /* Lock to guarantee mutual exclusion */ + int __rw_readers; /* Number of readers */ + _pthread_descr __rw_writer; /* Identity of writer, or NULL if none */ + _pthread_descr __rw_read_waiting; /* Threads waiting for reading */ + _pthread_descr __rw_write_waiting; /* Threads waiting for writing */ + int __rw_kind; /* Reader/Writer preference selection */ + int __rw_pshared; /* Shared between processes or not */ +} pthread_rwlock_t; + + +/* Attribute for read-write locks. */ +typedef struct +{ + int __lockkind; + int __pshared; +} pthread_rwlockattr_t; +#endif + +#ifdef __USE_XOPEN2K +/* POSIX spinlock data type. */ +typedef __atomic_lock_t pthread_spinlock_t; + +/* POSIX barrier. */ +typedef struct { + struct _pthread_fastlock __ba_lock; /* Lock to guarantee mutual exclusion */ + int __ba_required; /* Threads needed for completion */ + int __ba_present; /* Threads waiting */ + _pthread_descr __ba_waiting; /* Queue of waiting threads */ +} pthread_barrier_t; + +/* barrier attribute */ +typedef struct { + int __pshared; +} pthread_barrierattr_t; + +#endif + + +/* Thread identifiers */ +typedef unsigned long int pthread_t; + +#endif /* bits/pthreadtypes.h */ diff --git a/sysdeps/unix/sysv/linux/hppa/linuxthreads/malloc-machine.h b/sysdeps/unix/sysv/linux/hppa/linuxthreads/malloc-machine.h new file mode 100644 index 0000000000..817cf59222 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/linuxthreads/malloc-machine.h @@ -0,0 +1,73 @@ +/* HP-PARISC macro definitions for mutexes, thread-specific data + and parameters for malloc. + Copyright (C) 2003 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Carlos O'Donell , 2003. + + 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 _MALLOC_MACHINE_H +#define _MALLOC_MACHINE_H + +#undef thread_atfork_static + +#include +#include + +__libc_lock_define (typedef, mutex_t) + +/* Since our lock structure does not tolerate being initialized to zero, we must + modify the standard function calls made by malloc */ +# define mutex_init(m) \ + __libc_maybe_call (__pthread_mutex_init, (m, NULL), \ + (((m)->__m_lock.__spinlock = __LT_SPINLOCK_INIT),(*(int *)(m))) ) +# define mutex_lock(m) \ + __libc_maybe_call (__pthread_mutex_lock, (m), \ + (__load_and_clear(&((m)->__m_lock.__spinlock)), 0)) +# define mutex_trylock(m) \ + __libc_maybe_call (__pthread_mutex_trylock, (m), \ + (*(int *)(m) ? 1 : (__load_and_clear(&((m)->__m_lock.__spinlock)), 0))) +# define mutex_unlock(m) \ + __libc_maybe_call (__pthread_mutex_unlock, (m), \ + (((m)->__m_lock.__spinlock = __LT_SPINLOCK_INIT), (*(int *)(m))) ) + +/* This is defined by newer gcc version unique for each module. */ +extern void *__dso_handle __attribute__ ((__weak__)); + +#include + +#ifdef SHARED +# define thread_atfork(prepare, parent, child) \ + __register_atfork (prepare, parent, child, __dso_handle) +#else +# define thread_atfork(prepare, parent, child) \ + __register_atfork (prepare, parent, child, \ + &__dso_handle == NULL ? NULL : __dso_handle) +#endif + +/* thread specific data for glibc */ + +#include + +typedef int tsd_key_t[1]; /* no key data structure, libc magic does it */ +__libc_tsd_define (static, MALLOC) /* declaration/common definition */ +#define tsd_key_create(key, destr) ((void) (key)) +#define tsd_setspecific(key, data) __libc_tsd_set (MALLOC, (data)) +#define tsd_getspecific(key, vptr) ((vptr) = __libc_tsd_get (MALLOC)) + +#include + +#endif /* !defined(_MALLOC_MACHINE_H) */ diff --git a/sysdeps/unix/sysv/linux/hppa/linuxthreads/pt-initfini.c b/sysdeps/unix/sysv/linux/hppa/linuxthreads/pt-initfini.c new file mode 100644 index 0000000000..27f850cf8f --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/linuxthreads/pt-initfini.c @@ -0,0 +1,109 @@ +/* Special .init and .fini section support for HPPA. Linuxthreads version. + Copyright (C) 2001, 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. + + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + 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; see the file COPYING.LIB. If not, + write to the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* This file is compiled into assembly code which is then munged by a sed + script into two files: crti.s and crtn.s. + + * crti.s puts a function prologue at the beginning of the + .init and .fini sections and defines global symbols for + those addresses, so they can be called as functions. + + * crtn.s puts the corresponding function epilogues + in the .init and .fini sections. */ + +/* If we use the standard C version, the linkage table pointer won't + be properly preserved due to the splitting up of function prologues + and epilogues. Therefore we write these in assembly to make sure + they do the right thing. */ + +__asm__ ( +"#include \"defs.h\"\n" +"\n" +"/*@HEADER_ENDS*/\n" +"\n" +"/*@_init_PROLOG_BEGINS*/\n" +" .section .init\n" +" .align 4\n" +" .globl _init\n" +" .type _init,@function\n" +"_init:\n" +" stw %rp,-20(%sp)\n" +" stwm %r4,64(%sp)\n" +" stw %r19,-32(%sp)\n" +" bl __pthread_initialize_minimal,%rp\n" +" copy %r19,%r4 /* delay slot */\n" +" copy %r4,%r19\n" +"/*@_init_PROLOG_ENDS*/\n" +"\n" +"/*@_init_EPILOG_BEGINS*/\n" +"/* Here is the tail end of _init. */\n" +" .section .init\n" +" ldw -84(%sp),%rp\n" +" copy %r4,%r19\n" +" bv %r0(%rp)\n" +"_end_init:\n" +" ldwm -64(%sp),%r4\n" +"\n" +"/* Our very own unwind info, because the assembler can't handle\n" +" functions split into two or more pieces. */\n" +" .section .PARISC.unwind,\"a\",@progbits\n" +" .extern _init\n" +" .word _init, _end_init\n" +" .byte 0x08, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08\n" +"\n" +"/*@_init_EPILOG_ENDS*/\n" +"\n" +"/*@_fini_PROLOG_BEGINS*/\n" +" .section .fini\n" +" .align 4\n" +" .globl _fini\n" +" .type _fini,@function\n" +"_fini:\n" +" stw %rp,-20(%sp)\n" +" stwm %r4,64(%sp)\n" +" stw %r19,-32(%sp)\n" +" copy %r19,%r4\n" +"/*@_fini_PROLOG_ENDS*/\n" +"\n" +"/*@_fini_EPILOG_BEGINS*/\n" +" .section .fini\n" +" ldw -84(%sp),%rp\n" +" copy %r4,%r19\n" +" bv %r0(%rp)\n" +"_end_fini:\n" +" ldwm -64(%sp),%r4\n" +"\n" +" .section .PARISC.unwind,\"a\",@progbits\n" +" .extern _fini\n" +" .word _fini, _end_fini\n" +" .byte 0x08, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08\n" +"\n" +"/*@_fini_EPILOG_ENDS*/\n" +"\n" +"/*@TRAILER_BEGINS*/\n" +); diff --git a/sysdeps/unix/sysv/linux/hppa/linuxthreads/sysdep-cancel.h b/sysdeps/unix/sysv/linux/hppa/linuxthreads/sysdep-cancel.h new file mode 100644 index 0000000000..e01936a3db --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/linuxthreads/sysdep-cancel.h @@ -0,0 +1,238 @@ +/* cancellable system calls for Linux/HPPA. + Copyright (C) 2003 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Carlos O'Donell , 2003. + + 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. */ + +#include +#include +#ifndef __ASSEMBLER__ +# include +#endif + +#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt + +# ifndef NO_ERROR +# define NO_ERROR -0x1000 +# endif + +/* The syscall cancellation mechanism requires userspace + assistance, the following code does roughly this: + + do arguments (read arg5 and arg6 to registers) + setup frame + + check if there are threads, yes jump to pseudo_cancel + + unthreaded: + syscall + check syscall return (jump to pre_end) + set errno + set return to -1 + (jump to pre_end) + + pseudo_cancel: + cenable + syscall + cdisable + check syscall return (jump to pre_end) + set errno + set return to -1 + + pre_end + restore stack + + It is expected that 'ret' and 'END' macros will + append an 'undo arguments' and 'return' to the + this PSEUDO macro. */ + +# undef PSEUDO +# define PSEUDO(name, syscall_name, args) \ + ENTRY (name) \ + DOARGS_##args ASM_LINE_SEP \ + copy TREG, %r1 ASM_LINE_SEP \ + copy %sp, TREG ASM_LINE_SEP \ + stwm %r1, 64(%sp) ASM_LINE_SEP \ + stw %rp, -20(%sp) ASM_LINE_SEP \ + stw TREG, -4(%sp) ASM_LINE_SEP \ + /* Done setting up frame, continue... */ ASM_LINE_SEP \ + SINGLE_THREAD_P ASM_LINE_SEP \ + cmpib,<>,n 0,%ret0,L(pseudo_cancel) ASM_LINE_SEP \ +L(unthreaded): ASM_LINE_SEP \ + /* Save r19 */ ASM_LINE_SEP \ + SAVE_PIC(TREG) ASM_LINE_SEP \ + /* Do syscall, delay loads # */ ASM_LINE_SEP \ + ble 0x100(%sr2,%r0) ASM_LINE_SEP \ + ldi SYS_ify (syscall_name), %r20 /* delay */ ASM_LINE_SEP \ + ldi NO_ERROR,%r1 ASM_LINE_SEP \ + cmpb,>>=,n %r1,%ret0,L(pre_end) ASM_LINE_SEP \ + /* Restore r19 from TREG */ ASM_LINE_SEP \ + LOAD_PIC(TREG) /* delay */ ASM_LINE_SEP \ + SYSCALL_ERROR_HANDLER ASM_LINE_SEP \ + /* Use TREG for temp storage */ ASM_LINE_SEP \ + copy %ret0, TREG /* delay */ ASM_LINE_SEP \ + /* OPTIMIZE: Don't reload r19 */ ASM_LINE_SEP \ + /* do a -1*syscall_ret0 */ ASM_LINE_SEP \ + sub %r0, TREG, TREG ASM_LINE_SEP \ + /* Store into errno location */ ASM_LINE_SEP \ + stw TREG, 0(%sr0,%ret0) ASM_LINE_SEP \ + b L(pre_end) ASM_LINE_SEP \ + /* return -1 as error */ ASM_LINE_SEP \ + ldo -1(%r0), %ret0 /* delay */ ASM_LINE_SEP \ +L(pseudo_cancel): ASM_LINE_SEP \ + PUSHARGS_##args /* Save args */ ASM_LINE_SEP \ + /* Save r19 into TREG */ ASM_LINE_SEP \ + CENABLE /* FUNC CALL */ ASM_LINE_SEP \ + SAVE_PIC(TREG) /* delay */ ASM_LINE_SEP \ + /* restore syscall args */ ASM_LINE_SEP \ + POPARGS_##args ASM_LINE_SEP \ + /* save mask from cenable (use stub rp slot) */ ASM_LINE_SEP \ + stw %ret0, -24(%sp) ASM_LINE_SEP \ + /* ... SYSCALL ... */ ASM_LINE_SEP \ + ble 0x100(%sr2,%r0) ASM_LINE_SEP \ + ldi SYS_ify (syscall_name), %r20 /* delay */ ASM_LINE_SEP \ + /* ............... */ ASM_LINE_SEP \ + LOAD_PIC(TREG) ASM_LINE_SEP \ + /* pass mask as arg0 to cdisable */ ASM_LINE_SEP \ + ldw -24(%sp), %r26 ASM_LINE_SEP \ + CDISABLE ASM_LINE_SEP \ + stw %ret0, -24(%sp) /* delay */ ASM_LINE_SEP \ + /* Restore syscall return */ ASM_LINE_SEP \ + ldw -24(%sp), %ret0 ASM_LINE_SEP \ + /* compare error */ ASM_LINE_SEP \ + ldi NO_ERROR,%r1 ASM_LINE_SEP \ + /* branch if no error */ ASM_LINE_SEP \ + cmpb,>>=,n %r1,%ret0,L(pre_end) ASM_LINE_SEP \ + LOAD_PIC(TREG) /* cond. nullify */ ASM_LINE_SEP \ + copy %ret0, TREG /* save syscall return */ ASM_LINE_SEP \ + SYSCALL_ERROR_HANDLER ASM_LINE_SEP \ + /* make syscall res value positive */ ASM_LINE_SEP \ + sub %r0, TREG, TREG /* delay */ ASM_LINE_SEP \ + /* No need to LOAD_PIC */ ASM_LINE_SEP \ + /* store into errno location */ ASM_LINE_SEP \ + stw TREG, 0(%sr0,%ret0) ASM_LINE_SEP \ + /* return -1 */ ASM_LINE_SEP \ + ldo -1(%r0), %ret0 ASM_LINE_SEP \ +L(pre_end): ASM_LINE_SEP \ + /* Restore rp before exit */ ASM_LINE_SEP \ + ldw -84(%sr0,%sp), %rp ASM_LINE_SEP \ + /* Undo frame */ ASM_LINE_SEP \ + ldwm -64(%sp),TREG ASM_LINE_SEP \ + /* No need to LOAD_PIC */ ASM_LINE_SEP + +/* Save arguments into our frame */ +# define PUSHARGS_0 /* nothing to do */ +# define PUSHARGS_1 PUSHARGS_0 stw %r26, -36(%sr0,%sp) ASM_LINE_SEP +# define PUSHARGS_2 PUSHARGS_1 stw %r25, -40(%sr0,%sp) ASM_LINE_SEP +# define PUSHARGS_3 PUSHARGS_2 stw %r24, -44(%sr0,%sp) ASM_LINE_SEP +# define PUSHARGS_4 PUSHARGS_3 stw %r23, -48(%sr0,%sp) ASM_LINE_SEP +# define PUSHARGS_5 PUSHARGS_4 stw %r22, -52(%sr0,%sp) ASM_LINE_SEP +# define PUSHARGS_6 PUSHARGS_5 stw %r21, -56(%sr0,%sp) ASM_LINE_SEP + +/* Bring them back from the stack */ +# define POPARGS_0 /* nothing to do */ +# define POPARGS_1 POPARGS_0 ldw -36(%sr0,%sp), %r26 ASM_LINE_SEP +# define POPARGS_2 POPARGS_1 ldw -40(%sr0,%sp), %r25 ASM_LINE_SEP +# define POPARGS_3 POPARGS_2 ldw -44(%sr0,%sp), %r24 ASM_LINE_SEP +# define POPARGS_4 POPARGS_3 ldw -48(%sr0,%sp), %r23 ASM_LINE_SEP +# define POPARGS_5 POPARGS_4 ldw -52(%sr0,%sp), %r22 ASM_LINE_SEP +# define POPARGS_6 POPARGS_5 ldw -56(%sr0,%sp), %r21 ASM_LINE_SEP + +# ifdef IS_IN_libpthread +# ifdef PIC +# define CENABLE .import __pthread_enable_asynccancel,code ASM_LINE_SEP \ + bl __pthread_enable_asynccancel,%r2 ASM_LINE_SEP +# define CDISABLE .import __pthread_disable_asynccancel,code ASM_LINE_SEP \ + bl __pthread_disable_asynccancel,%r2 ASM_LINE_SEP +# else +# define CENABLE .import __pthread_enable_asynccancel,code ASM_LINE_SEP \ + bl __pthread_enable_asynccancel,%r2 ASM_LINE_SEP +# define CDISABLE .import __pthread_disable_asynccancel,code ASM_LINE_SEP \ + bl __pthread_disable_asynccancel,%r2 ASM_LINE_SEP +# endif +# elif !defined NOT_IN_libc +# ifdef PIC +# define CENABLE .import __libc_enable_asynccancel,code ASM_LINE_SEP \ + bl __libc_enable_asynccancel,%r2 ASM_LINE_SEP +# define CDISABLE .import __libc_disable_asynccancel,code ASM_LINE_SEP \ + bl __libc_disable_asynccancel,%r2 ASM_LINE_SEP +# else +# define CENABLE .import __libc_enable_asynccancel,code ASM_LINE_SEP \ + bl __libc_enable_asynccancel,%r2 ASM_LINE_SEP +# define CDISABLE .import __libc_disable_asynccancel,code ASM_LINE_SEP \ + bl __libc_disable_asynccancel,%r2 ASM_LINE_SEP +# endif +# else +# ifdef PIC +# define CENABLE .import __librt_enable_asynccancel,code ASM_LINE_SEP \ + bl __librt_enable_asynccancel,%r2 ASM_LINE_SEP +# define CDISABLE .import __librt_disable_asynccancel,code ASM_LINE_SEP \ + bl __librt_disable_asynccancel,%r2 ASM_LINE_SEP +# else +# define CENABLE .import __librt_enable_asynccancel,code ASM_LINE_SEP \ + bl __librt_enable_asynccancel,%r2 ASM_LINE_SEP +# define CDISABLE .import __librt_disable_asynccancel,code ASM_LINE_SEP \ + bl __librt_disable_asynccancel,%r2 ASM_LINE_SEP +# endif +# endif + +/* p_header.multiple_threads is +12 from the pthread_descr struct start, + We could have called __get_cr27() but we really want less overhead */ +# define MULTIPLE_THREADS_OFFSET 0xC + +/* cr27 has been initialized to 0x0 by kernel */ +# define NO_THREAD_CR27 0x0 + +# ifdef IS_IN_libpthread +# define __local_multiple_threads __pthread_multiple_threads +# elif !defined NOT_IN_libc +# define __local_multiple_threads __libc_multiple_threads +# else +# define __local_multiple_threads __librt_multiple_threads +# endif + +# ifndef __ASSEMBLER__ + extern int __local_multiple_threads attribute_hidden; +# define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1) +# else +/* This ALT version requires newer kernel support */ +# define SINGLE_THREAD_P_MFCTL \ + mfctl %cr27, %ret0 ASM_LINE_SEP \ + cmpib,= NO_THREAD_CR27,%ret0,L(stp) ASM_LINE_SEP \ + nop ASM_LINE_SEP \ + ldw MULTIPLE_THREADS_OFFSET(%sr0,%ret0),%ret0 ASM_LINE_SEP \ +L(stp): ASM_LINE_SEP +# ifdef PIC +/* Slower version uses GOT to get value of __local_multiple_threads */ +# define SINGLE_THREAD_P \ + addil LT%__local_multiple_threads, %r19 ASM_LINE_SEP \ + ldw RT%__local_multiple_threads(%sr0,%r1), %ret0 ASM_LINE_SEP \ + ldw 0(%sr0,%ret0), %ret0 ASM_LINE_SEP +# else +/* Slow non-pic version using DP */ +# define SINGLE_THREAD_P \ + addil LR%__local_multiple_threads-$global$,%r27 ASM_LINE_SEP \ + ldw RR%__local_multiple_threads-$global$(%sr0,%r1),%ret0 ASM_LINE_SEP +# endif +# endif +#elif !defined __ASSEMBLER__ + +/* This code should never be used but we define it anyhow. */ +# define SINGLE_THREAD_P (1) + +#endif +/* !defined NOT_IN_libc || defined IS_IN_libpthread */ From 8e86e37a903fc79d6bd28d0a72b173f301026caf Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Wed, 19 Apr 2006 05:37:33 +0000 Subject: [PATCH 3602/4487] 2006-04-19 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/kernel-features.h: New file. --- ChangeLog.hppa | 4 +++ .../unix/sysv/linux/hppa/kernel-features.h | 34 +++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/hppa/kernel-features.h diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 15a1f00e58..d01248ba88 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,7 @@ +2006-04-19 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/kernel-features.h: New file. + 2006-04-19 Carlos O'Donell * sysdeps/hppa/linuxthreads/pspinlock.c: New file. diff --git a/sysdeps/unix/sysv/linux/hppa/kernel-features.h b/sysdeps/unix/sysv/linux/hppa/kernel-features.h new file mode 100644 index 0000000000..2fd416321b --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/kernel-features.h @@ -0,0 +1,34 @@ +/* Set flags signalling availability of kernel features based on given + kernel version number. + Copyright (C) 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 + 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. */ + + +/* There are an infinite number of PA-RISC kernel versions numbered + 2.4.0. But they've not really been released as such. We require + and expect the final version here. */ +#define __ASSUME_32BITUIDS 1 +#define __ASSUME_TRUNCATE64_SYSCALL 1 +#define __ASSUME_MMAP2_SYSCALL 1 +#define __ASSUME_STAT64_SYSCALL 1 +#define __ASSUME_IPC64 1 +#define __ASSUME_ST_INO_64_BIT 1 +#define __ASSUME_FCNTL64 1 +#define __ASSUME_GETDENTS64_SYSCALL 1 + +#include_next From cb1636152429f05766214ca1a70cc867500f8553 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Wed, 19 Apr 2006 05:43:52 +0000 Subject: [PATCH 3603/4487] 2006-04-19 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/bits/mman.h [__USE_GNU]: Define MMAP_FIXED. * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h [__USE_GNU]: Define SYNC_FILE_RANGE_WAIT_BEFORE, SYNC_FILE_RANGE_WRITE, SYNC_FILE_RANGE_WAIT_AFTER, sync_file_range, splice, tee. --- ChangeLog.hppa | 8 +++++++ sysdeps/unix/sysv/linux/hppa/bits/fcntl.h | 28 +++++++++++++++++++++++ sysdeps/unix/sysv/linux/hppa/bits/mman.h | 3 +++ 3 files changed, 39 insertions(+) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index d01248ba88..401a2a2068 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,11 @@ +2006-04-19 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/bits/mman.h [__USE_GNU]: + Define MMAP_FIXED. + * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h [__USE_GNU]: + Define SYNC_FILE_RANGE_WAIT_BEFORE, SYNC_FILE_RANGE_WRITE, + SYNC_FILE_RANGE_WAIT_AFTER, sync_file_range, splice, tee. + 2006-04-19 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/kernel-features.h: New file. diff --git a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h index 9d967c6475..867b0938da 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h @@ -172,10 +172,38 @@ struct flock64 # define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ #endif +#ifdef __USE_GNU +# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages + in the range before performing the + write. */ +# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those + dirty pages in the range which are + not presently under writeback. */ +# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in + the range after performing the + write. */ +#endif + __BEGIN_DECLS +#ifdef __USE_GNU + /* Provide kernel hint to read ahead. */ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count) __THROW; +/* Selective file content synch'ing. */ +extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to, + unsigned int __flags); + +/* Splice two files together. */ +extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags) + __THROW; + +/* In-kernel implementation of tee for pipe buffers. */ +extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags) + __THROW; + +#endif + __END_DECLS diff --git a/sysdeps/unix/sysv/linux/hppa/bits/mman.h b/sysdeps/unix/sysv/linux/hppa/bits/mman.h index 1eb1233814..0b23bd3220 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/mman.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/mman.h @@ -80,4 +80,7 @@ /* Flags for `mremap'. */ #ifdef __USE_GNU # define MREMAP_MAYMOVE 1 +# define MREMAP_FIXED 2 #endif + + From 48dcf1c597b5e90d40020319758467fe6d35b15f Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Fri, 21 Apr 2006 00:27:20 +0000 Subject: [PATCH 3604/4487] 2006-04-20 Carlos O'Donell * sysdeps/hppa/fpu/fclrexcpt.c (feclearexcept): Use union to align parameters. Specify memory clobbers. * sysdeps/hppa/fpu/fedisblxcpt.c (fedisableexcept): Likewise. * sysdeps/hppa/fpu/feenablxcpt.c (feenableexcept): Likewise. * sysdeps/hppa/fpu/fegetenv.c (fegetenv): Do not save exception register. Use memcpy to align buffer. * sysdeps/hppa/fpu/fegetexcept.c (fegetexcept): Store and reload fr0. Use union to align parameters. * sysdeps/hppa/fpu/fegetround.c (fegetround): Likewise. * sysdeps/hppa/fpu/feholdexcpt.c (feholdexcept): Do not save exception registers. Define libm_hidden_def. * sysdeps/hppa/fpu/fesetenv.c (fesetenv): Do not save exception registers. * sysdeps/hppa/fpu/fesetround.c (fesetround): Use union to align parameters, speficy memory clobbers. Define libm_hidde_def * sysdeps/hppa/fpu/feupdateenv.c (feupdateenv): Use union to align parameters. Use memcpy to align buffer. * sysdeps/hppa/fpu/fgetexcptflg.c (fegetexceptflag): Likewise. * sysdeps/hppa/fpu/fsetexcptflg.c (fesetexceptflag): Likewise. * sysdeps/hppa/fpu/ftestexcept.c (fetestexcept): Likewise. * sysdeps/hppa/fpu/libm-test-ulps: Update. * sysdeps/hppa/fpu/bits/fenv.h: Add ABI comments. --- ChangeLog.hppa | 25 ++++++++++++++++++++++ sysdeps/hppa/fpu/bits/fenv.h | 7 +++++- sysdeps/hppa/fpu/fclrexcpt.c | 9 ++++---- sysdeps/hppa/fpu/fedisblxcpt.c | 11 +++++----- sysdeps/hppa/fpu/feenablxcpt.c | 11 +++++----- sysdeps/hppa/fpu/fegetenv.c | 12 ++++++----- sysdeps/hppa/fpu/fegetexcept.c | 8 ++++--- sysdeps/hppa/fpu/fegetround.c | 8 ++++--- sysdeps/hppa/fpu/feholdexcpt.c | 37 ++++++++++++++++---------------- sysdeps/hppa/fpu/fesetenv.c | 38 ++++++++++++++++----------------- sysdeps/hppa/fpu/fesetround.c | 16 ++++++++------ sysdeps/hppa/fpu/feupdateenv.c | 19 ++++++++++------- sysdeps/hppa/fpu/fgetexcptflg.c | 8 ++++--- sysdeps/hppa/fpu/fsetexcptflg.c | 12 +++++------ sysdeps/hppa/fpu/ftestexcept.c | 8 ++++--- sysdeps/hppa/fpu/libm-test-ulps | 19 +++++++++-------- 16 files changed, 145 insertions(+), 103 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 401a2a2068..e937d9bbe2 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,28 @@ +2006-04-20 Carlos O'Donell + + * sysdeps/hppa/fpu/fclrexcpt.c (feclearexcept): Use union to + align parameters. Specify memory clobbers. + * sysdeps/hppa/fpu/fedisblxcpt.c (fedisableexcept): Likewise. + * sysdeps/hppa/fpu/feenablxcpt.c (feenableexcept): Likewise. + * sysdeps/hppa/fpu/fegetenv.c (fegetenv): Do not save exception + register. Use memcpy to align buffer. + * sysdeps/hppa/fpu/fegetexcept.c (fegetexcept): Store and reload + fr0. Use union to align parameters. + * sysdeps/hppa/fpu/fegetround.c (fegetround): Likewise. + * sysdeps/hppa/fpu/feholdexcpt.c (feholdexcept): Do not save + exception registers. Define libm_hidden_def. + * sysdeps/hppa/fpu/fesetenv.c (fesetenv): Do not save exception + registers. + * sysdeps/hppa/fpu/fesetround.c (fesetround): Use union to + align parameters, speficy memory clobbers. Define libm_hidde_def + * sysdeps/hppa/fpu/feupdateenv.c (feupdateenv): Use union to align + parameters. Use memcpy to align buffer. + * sysdeps/hppa/fpu/fgetexcptflg.c (fegetexceptflag): Likewise. + * sysdeps/hppa/fpu/fsetexcptflg.c (fesetexceptflag): Likewise. + * sysdeps/hppa/fpu/ftestexcept.c (fetestexcept): Likewise. + * sysdeps/hppa/fpu/libm-test-ulps: Update. + * sysdeps/hppa/fpu/bits/fenv.h: Add ABI comments. + 2006-04-19 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/bits/mman.h [__USE_GNU]: diff --git a/sysdeps/hppa/fpu/bits/fenv.h b/sysdeps/hppa/fpu/bits/fenv.h index c5f8c43459..6d83b141f8 100644 --- a/sysdeps/hppa/fpu/bits/fenv.h +++ b/sysdeps/hppa/fpu/bits/fenv.h @@ -62,7 +62,12 @@ typedef unsigned int fexcept_t; /* Type representing floating-point environment. This structure corresponds to the layout of the status and exception words in the - register file. */ + register file. The exception registers are never saved/stored by + userspace. This structure is also not correctly aligned ever, in + an ABI error we left out __aligned(8) and subsequently all of our + fenv functions must accept unaligned input, align the input, and + then use assembly to store fr0. This is a performance hit, but + means the ABI is stable. */ typedef struct { unsigned int __status_word; diff --git a/sysdeps/hppa/fpu/fclrexcpt.c b/sysdeps/hppa/fpu/fclrexcpt.c index a7c698206e..d74a449ebb 100644 --- a/sysdeps/hppa/fpu/fclrexcpt.c +++ b/sysdeps/hppa/fpu/fclrexcpt.c @@ -23,14 +23,13 @@ int feclearexcept (int excepts) { - unsigned int sw[2]; + union { unsigned long long l; unsigned int sw[2]; } s; /* Get the current status word. */ - __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw)); - + __asm__ ("fstd %%fr0,0(%1)" : "=m" (s.l) : "r" (&s.l) : "%r0"); /* Clear all the relevant bits. */ - sw[0] &= ~((excepts & FE_ALL_EXCEPT) << 27); - __asm__ ("fldd 0(%0),%%fr0" : : "r" (sw)); + s.sw[0] &= ~((excepts & FE_ALL_EXCEPT) << 27); + __asm__ ("fldd 0(%0),%%fr0" : : "r" (&s.l), "m" (s.l) : "%r0"); /* Success. */ return 0; diff --git a/sysdeps/hppa/fpu/fedisblxcpt.c b/sysdeps/hppa/fpu/fedisblxcpt.c index aac6bbfa2a..8d2e664034 100644 --- a/sysdeps/hppa/fpu/fedisblxcpt.c +++ b/sysdeps/hppa/fpu/fedisblxcpt.c @@ -23,15 +23,16 @@ int fedisableexcept (int excepts) { - unsigned int sw[2], old_exc; + union { unsigned long long l; unsigned int sw[2]; } s; + unsigned int old_exc; /* Get the current status word. */ - __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw)); + __asm__ ("fstd %%fr0,0(%1)" : "=m" (s.l) : "r" (&s.l) : "%r0"); - old_exc = sw[0] & FE_ALL_EXCEPT; + old_exc = s.sw[0] & FE_ALL_EXCEPT; - sw[0] &= ~(excepts & FE_ALL_EXCEPT); - __asm__ ("fldd 0(%0),%%fr0" : : "r" (sw)); + s.sw[0] &= ~(excepts & FE_ALL_EXCEPT); + __asm__ ("fldd 0(%0),%%fr0" : : "r" (&s.l), "m" (s.l) : "%r0"); return old_exc; } diff --git a/sysdeps/hppa/fpu/feenablxcpt.c b/sysdeps/hppa/fpu/feenablxcpt.c index 9ce3ca82cc..4b17a60378 100644 --- a/sysdeps/hppa/fpu/feenablxcpt.c +++ b/sysdeps/hppa/fpu/feenablxcpt.c @@ -23,15 +23,16 @@ int feenableexcept (int excepts) { - unsigned int sw[2], old_exc; + union { unsigned long long l; unsigned int sw[2]; } s; + unsigned int old_exc; /* Get the current status word. */ - __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw)); + __asm__ ("fstd %%fr0,0(%1)" : "=m" (s.l) : "r" (&s.l) : "%r0"); - old_exc = sw[0] & FE_ALL_EXCEPT; + old_exc = s.sw[0] & FE_ALL_EXCEPT; - sw[0] |= (excepts & FE_ALL_EXCEPT); - __asm__ ("fldd 0(%0),%%fr0" : : "r" (sw)); + s.sw[0] |= (excepts & FE_ALL_EXCEPT); + __asm__ ("fldd 0(%0),%%fr0" : : "r" (&s.l), "m" (s.l) : "%r0"); return old_exc; } diff --git a/sysdeps/hppa/fpu/fegetenv.c b/sysdeps/hppa/fpu/fegetenv.c index b87317b789..fcf5d2dcfe 100644 --- a/sysdeps/hppa/fpu/fegetenv.c +++ b/sysdeps/hppa/fpu/fegetenv.c @@ -19,15 +19,17 @@ 02111-1307 USA. */ #include +#include int fegetenv (fenv_t *envp) { + unsigned long long buf[4], *bufptr = buf; + __asm__ ( - "fstd,ma %%fr0,8(%1)\n" - "fstd,ma %%fr1,8(%1)\n" - "fstd,ma %%fr2,8(%1)\n" - "fstd %%fr3,0(%1)\n" - : "=m" (*envp), "+r" (envp)); + "fstd,ma %%fr0,8(%1) \n\t" + "fldd -8(%1),%%fr0 \n\t" + : "=m" (buf), "+r" (bufptr) : : "%r0"); + memcpy(envp, buf, sizeof (*envp)); return 0; } diff --git a/sysdeps/hppa/fpu/fegetexcept.c b/sysdeps/hppa/fpu/fegetexcept.c index efd1d7df05..d249dc6b9f 100644 --- a/sysdeps/hppa/fpu/fegetexcept.c +++ b/sysdeps/hppa/fpu/fegetexcept.c @@ -23,10 +23,12 @@ int fegetexcept (void) { - unsigned int sw[2]; + union { unsigned long long l; unsigned int sw[2] } s; /* Get the current status word. */ - __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw)); + __asm__ ("fstd %%fr0,0(%1) \n\t" + "fldd 0(%1),%%fr0 \n\t" + : "=m" (s.l) : "r" (&s.l) : "%r0"); - return sw[0] & FE_ALL_EXCEPT; + return (s.sw[0] & FE_ALL_EXCEPT); } diff --git a/sysdeps/hppa/fpu/fegetround.c b/sysdeps/hppa/fpu/fegetround.c index aefedbc071..1e606c9ecd 100644 --- a/sysdeps/hppa/fpu/fegetround.c +++ b/sysdeps/hppa/fpu/fegetround.c @@ -23,10 +23,12 @@ int fegetround (void) { - unsigned int sw[2]; + union { unsigned long long l; unsigned int sw[2] } s; /* Get the current status word. */ - __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw)); + __asm__ ("fstd %%fr0,0(%1) \n\t" + "fldd 0(%1),%%fr0 \n\t" + : "=m" (s.l) : "r" (&s.l)); - return sw[0] & FE_DOWNWARD; + return (s.sw[0] & FE_DOWNWARD); } diff --git a/sysdeps/hppa/fpu/feholdexcpt.c b/sysdeps/hppa/fpu/feholdexcpt.c index 5aec0151f8..ac6eb58055 100644 --- a/sysdeps/hppa/fpu/feholdexcpt.c +++ b/sysdeps/hppa/fpu/feholdexcpt.c @@ -24,33 +24,32 @@ int feholdexcept (fenv_t *envp) { - fenv_t clear; - fenv_t * _regs = envp; + union { unsigned long long buf[4]; fenv_t env; } clear; + unsigned long long *bufptr; /* Store the environment. */ + bufptr = clear.buf; __asm__ ( "fstd,ma %%fr0,8(%1)\n" - "fstd,ma %%fr1,8(%1)\n" - "fstd,ma %%fr2,8(%1)\n" - "fstd %%fr3,0(%1)\n" - : "=m" (*_regs), "+r" (_regs)); - memcpy (&clear, envp, sizeof (clear)); - - /* Now clear all exceptions. */ - clear.__status_word &= ~(FE_ALL_EXCEPT << 27); - memset (clear.__exception, 0, sizeof (clear.__exception)); + : "=m" (clear), "+r" (bufptr) : : "%r0"); + memcpy (envp, &clear.env, sizeof (fenv_t)); + /* Clear exception queues */ + memset (clear.env.__exception, 0, sizeof (clear.env.__exception)); /* And set all exceptions to non-stop. */ - clear.__status_word &= ~FE_ALL_EXCEPT; + clear.env.__status_word &= ~FE_ALL_EXCEPT; + /* Now clear all flags */ + clear.env.__status_word &= ~(FE_ALL_EXCEPT << 27); - /* Load the new environment. */ - _regs = &clear; + /* Load the new environment. Note: fr0 must load last to enable T-bit + Thus we start bufptr at the end and work backwards */ + bufptr = (unsigned int)(clear.buf) + sizeof(unsigned int)*4; __asm__ ( - "fldd,ma 8(%0),%%fr0\n" - "fldd,ma 8(%0),%%fr1\n" - "fldd,ma 8(%0),%%fr2\n" - "fldd 0(%0),%%fr3\n" - : : "r" (_regs)); + "fldd,mb -8(%0),%%fr0\n" + : : "r" (bufptr), "m" (clear) : "%r0"); return 0; } + +libm_hidden_def (feholdexcept) + diff --git a/sysdeps/hppa/fpu/fesetenv.c b/sysdeps/hppa/fpu/fesetenv.c index 526773214b..b5753efabd 100644 --- a/sysdeps/hppa/fpu/fesetenv.c +++ b/sysdeps/hppa/fpu/fesetenv.c @@ -25,40 +25,38 @@ int fesetenv (const fenv_t *envp) { - fenv_t temp; - fenv_t * _regs = &temp; + union { unsigned long long buf[4]; fenv_t env; } temp; + unsigned long long *bufptr; /* Install the environment specified by ENVP. But there are a few values which we do not want to come from the saved environment. Therefore, we get the current environment and replace the values we want to use from the environment specified by the parameter. */ + bufptr = temp.buf; __asm__ ( "fstd,ma %%fr0,8(%1)\n" - "fstd,ma %%fr1,8(%1)\n" - "fstd,ma %%fr2,8(%1)\n" - "fstd %%fr3,0(%1)\n" - : "=m" (*_regs), "+r" (_regs)); + : "=m" (temp), "+r" (bufptr) : : "%r0"); - temp.__status_word &= ~(FE_ALL_EXCEPT - | (FE_ALL_EXCEPT << 27) - | FE_DOWNWARD); + temp.env.__status_word &= ~(FE_ALL_EXCEPT + | (FE_ALL_EXCEPT << 27) + | FE_DOWNWARD); if (envp == FE_DFL_ENV) ; else if (envp == FE_NOMASK_ENV) - temp.__status_word |= FE_ALL_EXCEPT; + temp.env.__status_word |= FE_ALL_EXCEPT; else - temp.__status_word |= (envp->__status_word - & (FE_ALL_EXCEPT - | FE_DOWNWARD - | (FE_ALL_EXCEPT << 27))); + temp.env.__status_word |= (envp->__status_word + & (FE_ALL_EXCEPT + | FE_DOWNWARD + | (FE_ALL_EXCEPT << 27))); - /* Load the new environment. */ + /* Load the new environment. We use bufptr again since the + initial asm has modified the value of the register and here + we take advantage of that to load in reverse order so fr0 + is loaded last and T-Bit is enabled. */ __asm__ ( - "fldd,ma -8(%1),%%fr3\n" - "fldd,ma -8(%1),%%fr2\n" - "fldd,ma -8(%1),%%fr1\n" - "fldd 0(%1),%%fr0\n" - : "=m" (*_regs), "+r" (_regs)); + "fldd,mb -8(%1),%%fr0\n" + : "=m" (temp), "+r" (bufptr) : : "%r0" ); /* Success. */ return 0; diff --git a/sysdeps/hppa/fpu/fesetround.c b/sysdeps/hppa/fpu/fesetround.c index 3687624c2b..9f30c2495f 100644 --- a/sysdeps/hppa/fpu/fesetround.c +++ b/sysdeps/hppa/fpu/fesetround.c @@ -23,17 +23,19 @@ int fesetround (int round) { - unsigned int sw[2]; + union { unsigned long long l; unsigned int sw[2]; } s; if (round & ~FE_DOWNWARD) - /* ROUND is not a valid rounding mode. */ + /* round is not a valid rounding mode. */ return 1; - + /* Get the current status word. */ - __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw)); - sw[0] &= ~FE_DOWNWARD; - sw[0] |= round; - __asm__ ("fldd 0(%0),%%fr0" : : "r" (sw)); + __asm__ ("fstd %%fr0,0(%1)" : "=m" (s.l) : "r" (&s.l) : "%r0"); + s.sw[0] &= ~FE_DOWNWARD; + s.sw[0] |= round & FE_DOWNWARD; + __asm__ ("fldd 0(%0),%%fr0" : : "r" (&s.l), "m" (s.l) : "%r0"); return 0; } + +libm_hidden_def (fesetround) diff --git a/sysdeps/hppa/fpu/feupdateenv.c b/sysdeps/hppa/fpu/feupdateenv.c index 7d50282e05..17140060ad 100644 --- a/sysdeps/hppa/fpu/feupdateenv.c +++ b/sysdeps/hppa/fpu/feupdateenv.c @@ -19,19 +19,22 @@ 02111-1307 USA. */ #include +#include int feupdateenv (const fenv_t *envp) { - unsigned int sw[2]; - - /* Get the current exception status. */ - __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw)); + union { unsigned long long l; unsigned int sw[2]; } s; + fenv_t temp; + /* Get the current exception status */ + __asm__ ("fstd %%fr0,0(%1) \n\t" + "fldd 0(%1),%%fr0 \n\t" + : "=m" (s.l) : "r" (&s.l)); + memcpy(&temp, envp, sizeof(fenv_t)); + /* Currently raised exceptions not cleared */ + temp.__status_word |= s.sw[0] & (FE_ALL_EXCEPT << 27); /* Install new environment. */ - fesetenv (envp); - /* Raise the saved exceptions */ - feraiseexcept(sw[0] & FE_ALL_EXCEPT); - + fesetenv (&temp); /* Success. */ return 0; } diff --git a/sysdeps/hppa/fpu/fgetexcptflg.c b/sysdeps/hppa/fpu/fgetexcptflg.c index 27766ecf58..d5bcfe31d6 100644 --- a/sysdeps/hppa/fpu/fgetexcptflg.c +++ b/sysdeps/hppa/fpu/fgetexcptflg.c @@ -23,12 +23,14 @@ int fegetexceptflag (fexcept_t *flagp, int excepts) { - unsigned int sw[2]; + union { unsigned long long l; unsigned int sw[2]; } s; /* Get the current status word. */ - __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw)); + __asm__ ("fstd %%fr0,0(%1) \n\t" + "fldd 0(%1),%%fr0 \n\t" + : "=m" (s.l) : "r" (&s.l) : "%r0"); - *flagp = (sw[0] >> 27) & excepts & FE_ALL_EXCEPT; + *flagp = (s.sw[0] >> 27) & excepts & FE_ALL_EXCEPT; /* Success. */ return 0; diff --git a/sysdeps/hppa/fpu/fsetexcptflg.c b/sysdeps/hppa/fpu/fsetexcptflg.c index af35f5ae35..4ec3a92dcc 100644 --- a/sysdeps/hppa/fpu/fsetexcptflg.c +++ b/sysdeps/hppa/fpu/fsetexcptflg.c @@ -24,16 +24,14 @@ int fesetexceptflag (const fexcept_t *flagp, int excepts) { - unsigned int sw[2]; + union { unsigned long long l; unsigned int sw[2]; } s; /* Get the current status word. */ - __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw)); - - /* Install new enable trap bits */ - sw[0] |= (*flagp & excepts & FE_ALL_EXCEPT) << 27; - + __asm__ ("fstd %%fr0,0(%1)" : "=m" (s.l) : "r" (&s.l) : "%r0"); + /* Install new raised trap bits */ + s.sw[0] |= (*flagp & excepts & FE_ALL_EXCEPT) << 27; /* Store the new status word. */ - __asm__ ("fldd 0(%0),%%fr0" : : "r" (sw)); + __asm__ ("fldd 0(%0),%%fr0" : : "r" (&s.l), "m" (s.l) : "%r0"); /* Success. */ return 0; diff --git a/sysdeps/hppa/fpu/ftestexcept.c b/sysdeps/hppa/fpu/ftestexcept.c index d08d4d6eb9..ac6d4b2e35 100644 --- a/sysdeps/hppa/fpu/ftestexcept.c +++ b/sysdeps/hppa/fpu/ftestexcept.c @@ -23,10 +23,12 @@ int fetestexcept (int excepts) { - unsigned int sw[2]; + union { unsigned long long l; unsigned int sw[2] } s; /* Get the current status word. */ - __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw)); + __asm__ ("fstd %%fr0,0(%1) \n\t" + "fldd 0(%1),%%fr0 \n\t" + : "=m" (s.l) : "r" (&s.l)); - return (sw[0] >> 27) & excepts & FE_ALL_EXCEPT; + return (s.sw[0] >> 27) & excepts & FE_ALL_EXCEPT; } diff --git a/sysdeps/hppa/fpu/libm-test-ulps b/sysdeps/hppa/fpu/libm-test-ulps index b514496676..c4ffefaa86 100644 --- a/sysdeps/hppa/fpu/libm-test-ulps +++ b/sysdeps/hppa/fpu/libm-test-ulps @@ -1,6 +1,9 @@ # Begin of automatic generation # atan2 +Test "atan2 (-0.00756827042671106339, -.001792735857538728036) == -1.80338464113663849327153994380": +float: 6 +ifloat: 6 Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025": float: 3 ifloat: 3 @@ -258,9 +261,6 @@ float: 1 ifloat: 1 # ctan -Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": -double: 1 -idouble: 1 Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i": double: 1 idouble: 1 @@ -479,6 +479,11 @@ Test "log1p (-0.25) == -0.287682072451780927439219005993827432": float: 1 ifloat: 1 +# lround +Test "lround (1071930.0008) == 1071930": +double: -214511494 +idouble: -214511494 + # sincos Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": double: 1 @@ -640,8 +645,8 @@ idouble: 1 # Maximal error of functions: Function: "atan2": -float: 3 -ifloat: 3 +float: 6 +ifloat: 6 Function: "atanh": float: 1 @@ -777,10 +782,6 @@ Function: Real part of "csqrt": float: 1 ifloat: 1 -Function: Real part of "ctan": -double: 1 -idouble: 1 - Function: Imaginary part of "ctan": double: 1 idouble: 1 From c2dd372ef4e931f905c398c68e0e2cf9c7396578 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Sat, 22 Apr 2006 02:21:00 +0000 Subject: [PATCH 3605/4487] 2006-04-21 Carlos O'Donell * sysdeps/hppa/dl-tls.h: New file * sysdeps/hppa/libc-tls.c: Likewise. * sysdeps/hppa/tls-macros.h: Likewise. * sysdeps/hppa/elf/configure: Likewise. * sysdeps/hppa/elf/configure.in: Likewise. --- ChangeLog.hppa | 8 +++ sysdeps/hppa/dl-tls.h | 29 +++++++++ sysdeps/hppa/elf/configure | 63 +++++++++++++++++++ sysdeps/hppa/elf/configure.in | 49 +++++++++++++++ sysdeps/hppa/libc-tls.c | 38 ++++++++++++ sysdeps/hppa/tls-macros.h | 114 ++++++++++++++++++++++++++++++++++ 6 files changed, 301 insertions(+) create mode 100644 sysdeps/hppa/dl-tls.h create mode 100644 sysdeps/hppa/elf/configure create mode 100644 sysdeps/hppa/elf/configure.in create mode 100644 sysdeps/hppa/libc-tls.c create mode 100644 sysdeps/hppa/tls-macros.h diff --git a/ChangeLog.hppa b/ChangeLog.hppa index e937d9bbe2..89e45ca6ff 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,11 @@ +2006-04-21 Carlos O'Donell + + * sysdeps/hppa/dl-tls.h: New file + * sysdeps/hppa/libc-tls.c: Likewise. + * sysdeps/hppa/tls-macros.h: Likewise. + * sysdeps/hppa/elf/configure: Likewise. + * sysdeps/hppa/elf/configure.in: Likewise. + 2006-04-20 Carlos O'Donell * sysdeps/hppa/fpu/fclrexcpt.c (feclearexcept): Use union to diff --git a/sysdeps/hppa/dl-tls.h b/sysdeps/hppa/dl-tls.h new file mode 100644 index 0000000000..1bc9aae66c --- /dev/null +++ b/sysdeps/hppa/dl-tls.h @@ -0,0 +1,29 @@ +/* Thread-local storage handling in the ELF dynamic linker. hppa version. + Copyright (C) 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. */ + + +/* Type used for the representation of TLS information in the GOT. */ +typedef struct +{ + unsigned long int ti_module; + unsigned long int ti_offset; +} tls_index; + + +extern void *__tls_get_addr (tls_index *ti); diff --git a/sysdeps/hppa/elf/configure b/sysdeps/hppa/elf/configure new file mode 100644 index 0000000000..226c30d3bb --- /dev/null +++ b/sysdeps/hppa/elf/configure @@ -0,0 +1,63 @@ +# This file is generated from configure.in by Autoconf. DO NOT EDIT! + # Local configure fragment for sysdeps/hppa/elf. + +if test "$usetls" != no; then +# Check for support of thread-local storage handling in assembler and +# linker. +echo "$as_me:$LINENO: checking for hppa TLS support" >&5 +echo $ECHO_N "checking for hppa TLS support... $ECHO_C" >&6 +if test "${libc_cv_hppa_tls+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat > conftest.s <<\EOF +; Setup tls data +.section ".tdata","awT",@progbits +foo: .data 32 + .text +; Test general dyanmic relocations +test0: + addil LT'foo-$tls_gdidx$, %r19 + ldo RT'foo-$tls_gdidx$(%r1), %r26 + b __tls_get_addr + nop +; Test local dynamic relocations +test1: + addil LT'foo-$tls_ldidx$, %r19 + b __tls_get_addr + ldo RT'foo-$tls_ldidx$(%r1), %r26 + ldo RR'foo-$tls_dtpoff$(%r1), %r25 + ; More variables can be loaded... +; Test initial exec reloctiosn +test2: + mfctl %cr27, %r26 + addil LT'foo-$tls_ieoff$, %r19 + ldw RT'foo-$tls_ieoff$(%r1), %r25 + add %r26, %r25, %r24 +; Test local exec relocations +test3: + mfctl %cr27, %r26 + addil LR'foo-$tls_leoff$, %r26 + ldo RR'foo-$tls_leoff$(%r1), %r25 +; Done all the TLS tests. +EOF +if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + libc_cv_hppa_tls=yes +else + libc_cv_hppa_tls=no +fi +rm -f conftest* +fi +echo "$as_me:$LINENO: result: $libc_cv_hppa_tls" >&5 +echo "${ECHO_T}$libc_cv_hppa_tls" >&6 +if test $libc_cv_hppa_tls = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_TLS_SUPPORT 1 +_ACEOF + +fi +fi diff --git a/sysdeps/hppa/elf/configure.in b/sysdeps/hppa/elf/configure.in new file mode 100644 index 0000000000..1b70a5b740 --- /dev/null +++ b/sysdeps/hppa/elf/configure.in @@ -0,0 +1,49 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/hppa/elf. + +if test "$usetls" != no; then +# Check for support of thread-local storage handling in assembler and +# linker. +AC_CACHE_CHECK(for hppa TLS support, libc_cv_hppa_tls, [dnl +cat > conftest.s <<\EOF +; Setup tls data +.section ".tdata","awT",@progbits +foo: .data 32 + .text +; Test general dyanmic relocations +test0: + addil LT'foo-$tls_gdidx$, %r19 + ldo RT'foo-$tls_gdidx$(%r1), %r26 + b __tls_get_addr + nop +; Test local dynamic relocations +test1: + addil LT'foo-$tls_ldidx$, %r19 + b __tls_get_addr + ldo RT'foo-$tls_ldidx$(%r1), %r26 + ldo RR'foo-$tls_dtpoff$(%r1), %r25 + ; More variables can be loaded... +; Test initial exec reloctiosn +test2: + mfctl %cr27, %r26 + addil LT'foo-$tls_ieoff$, %r19 + ldw RT'foo-$tls_ieoff$(%r1), %r25 + add %r26, %r25, %r24 +; Test local exec relocations +test3: + mfctl %cr27, %r26 + addil LR'foo-$tls_leoff$, %r26 + ldo RR'foo-$tls_leoff$(%r1), %r25 +; Done all the TLS tests. +EOF +dnl +if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then + libc_cv_hppa_tls=yes +else + libc_cv_hppa_tls=no +fi +rm -f conftest*]) +if test $libc_cv_hppa_tls = yes; then + AC_DEFINE(HAVE_TLS_SUPPORT) +fi +fi diff --git a/sysdeps/hppa/libc-tls.c b/sysdeps/hppa/libc-tls.c new file mode 100644 index 0000000000..232f80f822 --- /dev/null +++ b/sysdeps/hppa/libc-tls.c @@ -0,0 +1,38 @@ +/* Thread-local storage handling in the ELF dynamic linker. hppa version. + Copyright (C) 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. */ + +#include +#include + +#if USE_TLS + +/* On hppa, linker optimizations are not required, so __tls_get_addr + can be called even in statically linked binaries. In this case module + must be always 1 and PT_TLS segment exist in the binary, otherwise it + would not link. */ + +void * +__tls_get_addr (tls_index *ti) +{ + dtv_t *dtv = THREAD_DTV (); + return (char *) dtv[1].pointer.val + ti->ti_offset; +} + +#endif + diff --git a/sysdeps/hppa/tls-macros.h b/sysdeps/hppa/tls-macros.h new file mode 100644 index 0000000000..4c5564b61d --- /dev/null +++ b/sysdeps/hppa/tls-macros.h @@ -0,0 +1,114 @@ + +/* HPPA Local Exec TLS access. */ +# define TLS_LE(x) \ + ({ int * __result; \ + unsigned long __tmp; \ + asm ( \ + " mfctl %%cr27, %1\n" \ + " addil LR'" #x "-$tls_leoff$, %1\n" \ + " ldo RR'" #x "-$tls_leoff$(%%r1), %0\n" \ + : "=r" (__result), "=r" (__tmp) \ + : \ + : "r1" ); \ + __result; \ + }) + +/* HPPA Initial Exec TLS access. */ +# ifdef PIC +# define TLS_IE(x) \ + ({ int * __result; \ + unsigned long __tmp, __tmp2; \ + asm ( \ + " mfctl %%cr27, %1\n" \ + " addil LT'" #x "-$tls_ieoff$, %%r19\n" \ + " ldw RT'" #x "-$tls_ieoff$(%%r1), %2\n" \ + " add %1, %2, %0\n" \ + : "=r" (__result), "=r" (__tmp), "=r" (__tmp2) \ + : \ + : "r1" ); \ + __result; \ + }) +# else +# define TLS_IE(x) \ + ({ int * __result; \ + unsigned long __tmp, __tmp2; \ + asm ( \ + " mfctl %%cr27, %1\n" \ + " addil LR'" #x "-$tls_ieoff$, %%r27\n" \ + " ldw RR'" #x "-$tls_ieoff$(%%r1), %2\n" \ + " add %1, %2, %0\n" \ + : "=r" (__result), "=r" (__tmp), "=r" (__tmp2) \ + : \ + : "r1" ); \ + __result; \ + }) +# endif + +# ifdef PIC +/* HPPA Local Dynamic TLS access. */ +# define TLS_LD(x) \ + ({ int * __result; \ + asm ( \ + " copy %%r19, %%r4\n" \ + " addil LT'" #x "-$tls_ldidx$, %%r19\n" \ + " bl __tls_get_addr, %%r2\n" \ + " ldo RT'" #x "-$tls_ldidx$(%%r1), %%r26\n" \ + " addil LR'" #x "-$tls_dtpoff$, %%r28\n" \ + " ldo RR'" #x "-$tls_dtpoff$(%%r1), %0\n" \ + " copy %%r4, %%r19\n" \ + : "=r" (__result) \ + : \ + : "r1", "r2", "r4", "r20", "r21", "r22", "r23", "r24", \ + "r25", "r26", "r28", "r29", "r31" ); \ + __result; \ + }) +# else +# define TLS_LD(x) \ + ({ int * __result; \ + asm ( \ + " addil LR'" #x "-$tls_ldidx$, %%r27\n" \ + " bl __tls_get_addr, %%r2\n" \ + " ldo RR'" #x "-$tls_ldidx$(%%r1), %%r26\n" \ + " addil LR'" #x "-$tls_dtpoff$, %%r28\n" \ + " ldo RR'" #x "-$tls_dtpoff$(%%r1), %0\n" \ + : "=r" (__result) \ + : \ + : "r1", "r2", "r20", "r21", "r22", "r23", "r24", \ + "r25", "r26", "r28", "r29", "r31" ); \ + __result; \ + }) +# endif + +/* HPPA General Dynamic TLS access. */ +# ifdef PIC +# define TLS_GD(x) \ + ({ int * __result; \ + asm ( \ + " copy %%r19, %%r4\n" \ + " addil LT'" #x "-$tls_gdidx$, %%r19\n" \ + " bl __tls_get_addr, %%r2\n" \ + " ldo RT'" #x "-$tls_gdidx$(%%r1), %%r26\n" \ + " copy %%r28, %0\n" \ + " copy %%r4, %%r19\n" \ + : "=r" (__result) \ + : \ + : "r1", "r2", "r4", "r20", "r21", "r22", "r23", "r24", \ + "r25", "r26", "r28", "r29", "r31" ); \ + __result; \ + }) +# else +# define TLS_GD(x) \ + ({ int * __result; \ + asm ( \ + " addil LR'" #x "-$tls_gdidx$, %%r27\n" \ + " bl __tls_get_addr, %%r2\n" \ + " ldo RR'" #x "-$tls_gdidx$(%%r1), %%r26\n" \ + " copy %%r28, %0\n" \ + : "=r" (__result) \ + : \ + : "r1", "r2", "r20", "r21", "r22", "r23", "r24", \ + "r25", "r26", "r28", "r29", "r31" ); \ + __result; \ + }) +#endif + From a122819861060aebe134b17f45f795b7559c0082 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 26 Apr 2006 22:28:15 +0000 Subject: [PATCH 3606/4487] Declare vmsplice. --- sysdeps/unix/sysv/linux/alpha/bits/fcntl.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h index 6898fe8743..4a20f1d673 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h @@ -21,8 +21,10 @@ # error "Never use directly; include instead." #endif - #include +#ifdef __USE_GNU +# include +#endif /* open/fcntl - O_SYNC is only implemented on blocks devices and on files @@ -200,6 +202,10 @@ extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to, unsigned int __flags); +/* Splice address range into a pipe. */ +extern int 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; From 1593583d58a3bbc5ab0a19bfe8319f9307113da1 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Thu, 27 Apr 2006 15:49:46 +0000 Subject: [PATCH 3607/4487] 2006-04-27 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h: Include uio.h, and define vmsplice. --- ChangeLog.hppa | 5 +++++ sysdeps/unix/sysv/linux/hppa/bits/fcntl.h | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 89e45ca6ff..b927ecfe35 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,8 @@ +2006-04-27 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h: Include uio.h, and + define vmsplice. + 2006-04-21 Carlos O'Donell * sysdeps/hppa/dl-tls.h: New file diff --git a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h index 867b0938da..e2bf526711 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h @@ -23,7 +23,9 @@ #endif #include - +#ifdef __USE_GNU +# include +#endif /* open/fcntl - O_SYNC is only implemented on blocks devices and on files located on an ext2 file system */ @@ -196,6 +198,10 @@ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count) extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to, unsigned int __flags); +/* Splice address range into a pipe. */ +extern int 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; From 290806a914fea8d16ab56993c10cf4c253b87645 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 2 May 2006 14:33:44 +0000 Subject: [PATCH 3608/4487] Fix MADV_REMOVE value. --- sysdeps/unix/sysv/linux/alpha/bits/mman.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/mman.h b/sysdeps/unix/sysv/linux/alpha/bits/mman.h index 2a84709d20..2f0e564916 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/mman.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/mman.h @@ -96,7 +96,7 @@ # define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ # define MADV_WILLNEED 3 /* Will need these pages. */ # define MADV_DONTNEED 6 /* Don't need these pages. */ -# define MADV_REMOVE 7 /* Remove these pages and resources. */ +# define MADV_REMOVE 9 /* Remove these pages and resources. */ # define MADV_DONTFORK 10 /* Do not inherit across fork. */ # define MADV_DOFORK 11 /* Do inherit across fork. */ #endif From 142b51e416cfc53274386371898e6780f96d7bd4 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Fri, 5 May 2006 14:03:22 +0000 Subject: [PATCH 3609/4487] 2006-05-05 Lior Balkohen * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Remove LINUX_FADV_ASYNC_WRITE and LINUX_FADV_WRITE_WAIT. Define SYNC_FILE_RANGE_WAIT_BEFORE, SYNC_FILE_RANGE_WRITE and SYNC_FILE_RANGE_WAIT_AFTER. Declare sync_file_range, vmsplice, splice and tee. 2006-05-05 Lior Balkohen * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Remove LINUX_FADV_ASYNC_WRITE and LINUX_FADV_WRITE_WAIT. Define SYNC_FILE_RANGE_WAIT_BEFORE, SYNC_FILE_RANGE_WRITE and SYNC_FILE_RANGE_WAIT_AFTER. Declare sync_file_range, vmsplice, splice and tee. --- ChangeLog.arm | 8 +++++ ChangeLog.mips | 8 +++++ sysdeps/unix/sysv/linux/arm/bits/fcntl.h | 38 ++++++++++++++++++++-- sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 39 +++++++++++++++++++++-- 4 files changed, 87 insertions(+), 6 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 5907503cc6..aaf45738e3 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,11 @@ +2006-05-05 Lior Balkohen + + * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Remove + LINUX_FADV_ASYNC_WRITE and LINUX_FADV_WRITE_WAIT. + Define SYNC_FILE_RANGE_WAIT_BEFORE, SYNC_FILE_RANGE_WRITE + and SYNC_FILE_RANGE_WAIT_AFTER. + Declare sync_file_range, vmsplice, splice and tee. + 2006-03-27 Lior Balkohen * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Define diff --git a/ChangeLog.mips b/ChangeLog.mips index 19f4b4108e..201252a010 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,11 @@ +2006-05-05 Lior Balkohen + + * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Remove + LINUX_FADV_ASYNC_WRITE and LINUX_FADV_WRITE_WAIT. + Define SYNC_FILE_RANGE_WAIT_BEFORE, SYNC_FILE_RANGE_WRITE + and SYNC_FILE_RANGE_WAIT_AFTER. + Declare sync_file_range, vmsplice, splice and tee. + 2006-03-27 Lior Balkohen * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Define diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h index 5368515250..54510a3fcc 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h @@ -23,6 +23,9 @@ #include +#ifdef __USE_GNU +# include +#endif /* open/fcntl - O_SYNC is only implemented on blocks devices and on files located on an ext2 file system */ @@ -180,16 +183,45 @@ struct flock64 # define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ #endif -/* Linux-specific operations for posix_fadvise. */ + #ifdef __USE_GNU -# define LINUX_FADV_ASYNC_WRITE 32 /* Start writeout on range. */ -# define LINUX_FADV_WRITE_WAIT 33 /* Wait upon writeout to range. */ +# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages + in the range before performing the + write. */ +# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those + dirty pages in the range which are + not presently under writeback. */ +# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in + the range after performing the + write. */ #endif __BEGIN_DECLS +#ifdef __USE_GNU + /* Provide kernel hint to read ahead. */ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count) __THROW; + +/* Selective file content synch'ing. */ +extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to, + unsigned int __flags); + + +/* Splice address range into a pipe. */ +extern int 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; + +/* In-kernel implementation of tee for pipe buffers. */ +extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags) + __THROW; + +#endif + __END_DECLS diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index 87affe3f3d..e7aae60510 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -24,6 +24,10 @@ #include #include +#ifdef __USE_GNU +# include +#endif + /* open/fcntl - O_SYNC is only implemented on blocks devices and on files located on an ext2 file system */ @@ -193,16 +197,45 @@ struct flock64 # define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ #endif -/* Linux-specific operations for posix_fadvise. */ + #ifdef __USE_GNU -# define LINUX_FADV_ASYNC_WRITE 32 /* Start writeout on range. */ -# define LINUX_FADV_WRITE_WAIT 33 /* Wait upon writeout to range. */ +# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages + in the range before performing the + write. */ +# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those + dirty pages in the range which are + not presently under writeback. */ +# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in + the range after performing the + write. */ #endif __BEGIN_DECLS +#ifdef __USE_GNU + /* Provide kernel hint to read ahead. */ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count) __THROW; + +/* Selective file content synch'ing. */ +extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to, + unsigned int __flags); + + +/* Splice address range into a pipe. */ +extern int 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; + +/* In-kernel implementation of tee for pipe buffers. */ +extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags) + __THROW; + +#endif + __END_DECLS From 23d0322571f85a50d325f3d94424810ad99d2424 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Fri, 5 May 2006 14:17:13 +0000 Subject: [PATCH 3610/4487] * sysdeps/unix/sysv/linux/arm/bits/mman.h: Update error message for consistency with other ports. (MADV_REMOVE, MADV_DONTFORK, MADV_DOFORK): Define. --- ChangeLog.arm | 6 ++++++ sysdeps/unix/sysv/linux/arm/bits/mman.h | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index aaf45738e3..2db13d01d6 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,9 @@ +2006-05-05 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/arm/bits/mman.h: Update error message + for consistency with other ports. + (MADV_REMOVE, MADV_DONTFORK, MADV_DOFORK): Define. + 2006-05-05 Lior Balkohen * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Remove diff --git a/sysdeps/unix/sysv/linux/arm/bits/mman.h b/sysdeps/unix/sysv/linux/arm/bits/mman.h index 7430f15b3b..828ec944cc 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/mman.h +++ b/sysdeps/unix/sysv/linux/arm/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/ARM version. - Copyright (C) 1997, 2000, 2003, 2005 Free Software Foundation, Inc. + Copyright (C) 1997, 2000, 2003, 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 @@ -18,7 +18,7 @@ 02111-1307 USA. */ #ifndef _SYS_MMAN_H -# error "Never include this file directly. Use instead" +# error "Never use directly; include instead." #endif /* The following definitions basically come from the kernel headers. @@ -88,6 +88,9 @@ # define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ # define MADV_WILLNEED 3 /* Will need these pages. */ # define MADV_DONTNEED 4 /* Don't need these pages. */ +# define MADV_REMOVE 9 /* Remove these pages and resources. */ +# define MADV_DONTFORK 10 /* Do not inherit across fork. */ +# define MADV_DOFORK 11 /* Do inherit across fork. */ #endif /* The POSIX people had to invent similar names for the same things. */ From 075f1edd06726184f9e5464004043d265f268ddd Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Fri, 5 May 2006 14:17:22 +0000 Subject: [PATCH 3611/4487] * sysdeps/unix/sysv/linux/mips/bits/mman.h: Formatting changes for consistency with other ports. (MADV_REMOVE): Correct value. (MADV_DONTFORK, MADV_DOFORK, POSIX_MADV_NORMAL, POSIX_MADV_RANDOM, POSIX_MADV_SEQUENTIAL, POSIX_MADV_WILLNEED, POSIX_MADV_DONTNEED): Define. --- ChangeLog.mips | 9 ++++++ sysdeps/unix/sysv/linux/mips/bits/mman.h | 35 ++++++++++++++++-------- 2 files changed, 32 insertions(+), 12 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 201252a010..015c86ff26 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,12 @@ +2006-05-05 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/mips/bits/mman.h: Formatting changes + for consistency with other ports. + (MADV_REMOVE): Correct value. + (MADV_DONTFORK, MADV_DOFORK, POSIX_MADV_NORMAL, + POSIX_MADV_RANDOM, POSIX_MADV_SEQUENTIAL, POSIX_MADV_WILLNEED, + POSIX_MADV_DONTNEED): Define. + 2006-05-05 Lior Balkohen * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Remove diff --git a/sysdeps/unix/sysv/linux/mips/bits/mman.h b/sysdeps/unix/sysv/linux/mips/bits/mman.h index e287e3b378..47d33933ad 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/mman.h +++ b/sysdeps/unix/sysv/linux/mips/bits/mman.h @@ -50,7 +50,7 @@ /* Other flags. */ #define MAP_FIXED 0x10 /* Interpret addr exactly. */ #ifdef __USE_MISC -# define MAP_FILE 0x00 +# define MAP_FILE 0 # define MAP_ANONYMOUS 0x0800 /* Don't use a file. */ # define MAP_ANON MAP_ANONYMOUS # define MAP_RENAME MAP_ANONYMOUS @@ -70,26 +70,37 @@ /* Flags to `msync'. */ #define MS_ASYNC 1 /* Sync memory asynchronously. */ -#define MS_INVALIDATE 2 /* Invalidate the caches. */ #define MS_SYNC 4 /* Synchronous memory sync. */ +#define MS_INVALIDATE 2 /* Invalidate the caches. */ /* Flags for `mlockall'. */ #define MCL_CURRENT 1 /* Lock all currently mapped pages. */ #define MCL_FUTURE 2 /* Lock all additions to address space. */ -/* Advice to `madvise'. */ -#ifdef __USE_BSD -#define MADV_NORMAL 0 /* default page-in behavior */ -#define MADV_RANDOM 1 /* page-in minimum required */ -#define MADV_SEQUENTIAL 2 /* read-ahead aggressively */ -#define MADV_WILLNEED 3 /* pre-fault pages */ -#define MADV_DONTNEED 4 /* discard these pages */ -#define MADV_REMOVE 5 /* remove these pages & resources */ -#endif - /* Flags for `mremap'. */ #ifdef __USE_GNU # define MREMAP_MAYMOVE 1 # define MREMAP_FIXED 2 #endif + +/* Advice to `madvise'. */ +#ifdef __USE_BSD +# define MADV_NORMAL 0 /* No further special treatment. */ +# define MADV_RANDOM 1 /* Expect random page references. */ +# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define MADV_WILLNEED 3 /* Will need these pages. */ +# define MADV_DONTNEED 4 /* Don't need these pages. */ +# define MADV_REMOVE 9 /* Remove these pages and resources. */ +# define MADV_DONTFORK 10 /* Do not inherit across fork. */ +# define MADV_DOFORK 11 /* Do inherit across fork. */ +#endif + +/* The POSIX people had to invent similar names for the same things. */ +#ifdef __USE_XOPEN2K +# define POSIX_MADV_NORMAL 0 /* No further special treatment. */ +# define POSIX_MADV_RANDOM 1 /* Expect random page references. */ +# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */ +# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */ +#endif From 18436f584f31381dea82e7a6fd211f163be90e14 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 5 May 2006 19:09:15 +0000 Subject: [PATCH 3612/4487] Define SPLICE_F_*. --- sysdeps/unix/sysv/linux/alpha/bits/fcntl.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h index 4a20f1d673..9b2e635d60 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h @@ -177,6 +177,7 @@ struct flock64 #ifdef __USE_GNU +/* 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. */ @@ -186,6 +187,14 @@ struct flock64 # define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in the range after performing the write. */ + +/* 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 From 19723bddeda726ca40251bfa6491ee71976d2fd5 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Mon, 8 May 2006 19:19:56 +0000 Subject: [PATCH 3613/4487] * sysdeps/mips/ldsodefs.h: New file. * sysdeps/mips/tst-audit.h: New file. --- ChangeLog.mips | 5 +++ sysdeps/mips/ldsodefs.h | 66 ++++++++++++++++++++++++++++++++++++++++ sysdeps/mips/tst-audit.h | 40 ++++++++++++++++++++++++ 3 files changed, 111 insertions(+) create mode 100644 sysdeps/mips/ldsodefs.h create mode 100644 sysdeps/mips/tst-audit.h diff --git a/ChangeLog.mips b/ChangeLog.mips index 015c86ff26..ba1442102d 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2006-05-08 Richard Sandiford + + * sysdeps/mips/ldsodefs.h: New file. + * sysdeps/mips/tst-audit.h: New file. + 2006-05-05 Daniel Jacobowitz * sysdeps/unix/sysv/linux/mips/bits/mman.h: Formatting changes diff --git a/sysdeps/mips/ldsodefs.h b/sysdeps/mips/ldsodefs.h new file mode 100644 index 0000000000..876f1c3dc4 --- /dev/null +++ b/sysdeps/mips/ldsodefs.h @@ -0,0 +1,66 @@ +/* Run-time dynamic linker data structures for loaded ELF shared objects. + Copyright (C) 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 + 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 __LDSODEFS_H \ +#define _MIPS_LDSODEFS_H 1 + +#include + +struct La_mips_32_regs; +struct La_mips_32_retval; +struct La_mips_64_regs; +struct La_mips_64_retval; + +#define ARCH_PLTENTER_MEMBERS \ + Elf32_Addr (*mips_o32_gnu_pltenter) (Elf32_Sym *, unsigned int, \ + uintptr_t *, uintptr_t *, \ + const struct La_mips_32_regs *, \ + unsigned int *, const char *name, \ + long int *framesizep); \ + Elf32_Addr (*mips_n32_gnu_pltenter) (Elf32_Sym *, unsigned int, \ + uintptr_t *, uintptr_t *, \ + const struct La_mips_64_regs *, \ + unsigned int *, const char *name, \ + long int *framesizep); \ + Elf64_Addr (*mips_n64_gnu_pltenter) (Elf64_Sym *, unsigned int, \ + uintptr_t *, uintptr_t *, \ + const struct La_mips_64_regs *, \ + unsigned int *, const char *name, \ + long int *framesizep); + +#define ARCH_PLTEXIT_MEMBERS \ + unsigned int (*mips_o32_gnu_pltexit) (Elf32_Sym *, unsigned int, \ + uintptr_t *, uintptr_t *, \ + const struct La_mips_32_regs *, \ + struct La_mips_32_retval *, \ + const char *); \ + unsigned int (*mips_n32_gnu_pltexit) (Elf32_Sym *, unsigned int, \ + uintptr_t *, uintptr_t *, \ + const struct La_mips_64_regs *, \ + struct La_mips_64_retval *, \ + const char *); \ + unsigned int (*mips_n64_gnu_pltexit) (Elf64_Sym *, unsigned int, \ + uintptr_t *, uintptr_t *, \ + const struct La_mips_64_regs *, \ + struct La_mips_64_retval *, \ + const char *); + +#include_next + +#endif diff --git a/sysdeps/mips/tst-audit.h b/sysdeps/mips/tst-audit.h new file mode 100644 index 0000000000..cafa3ebe16 --- /dev/null +++ b/sysdeps/mips/tst-audit.h @@ -0,0 +1,40 @@ +/* Definitions for testing PLT entry/exit auditing. ARM version. + + Copyright (C) 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 + 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. */ + +#include + +#if _MIPS_SIM == _ABIO32 +#define pltenter la_mips_o32_gnu_pltenter +#define pltexit la_mips_o32_gnu_pltexit +#define La_regs La_mips_32_regs +#define La_retval La_mips_32_retval +#else +#if _MIPS_SIM == _ABIN32 +#define pltenter la_mips_n32_gnu_pltenter +#define pltexit la_mips_n32_gnu_pltexit +#else +#define pltenter la_mips_n64_gnu_pltenter +#define pltexit la_mips_n64_gnu_pltexit +#endif +#define La_regs La_mips_64_regs +#define La_retval La_mips_64_retval +#endif +#define int_retval lrv_v0 From dab7578866433bdf07ccf6ccab8e04b33e67c547 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Mon, 8 May 2006 19:23:37 +0000 Subject: [PATCH 3614/4487] * sysdeps/unix/sysv/linux/mips/bits/stat.h (struct stat): Add st_atim, st_mtim and st_ctim interface. (struct stat64): Likewise. * sysdeps/unix/sysv/linux/mips/kernel_stat.h (struct kernel_stat): Replace st_atime and its padding field with st_atim. Likewise st_mtime/st_mtim and st_ctime/st_ctim. * sysdeps/unix/sysv/linux/mips/xstatconv.c (__xstat_conv): Update after above changes. (__xstat64_conv): Likewise. --- ChangeLog.mips | 12 +++++ sysdeps/unix/sysv/linux/mips/bits/stat.h | 62 +++++++++++++++++++--- sysdeps/unix/sysv/linux/mips/kernel_stat.h | 18 +++---- sysdeps/unix/sysv/linux/mips/xstatconv.c | 12 ++--- 4 files changed, 78 insertions(+), 26 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index ba1442102d..7106b9da17 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,15 @@ +2006-05-08 Richard Sandiford + + * sysdeps/unix/sysv/linux/mips/bits/stat.h (struct stat): Add + st_atim, st_mtim and st_ctim interface. + (struct stat64): Likewise. + * sysdeps/unix/sysv/linux/mips/kernel_stat.h (struct kernel_stat): + Replace st_atime and its padding field with st_atim. Likewise + st_mtime/st_mtim and st_ctime/st_ctim. + * sysdeps/unix/sysv/linux/mips/xstatconv.c (__xstat_conv): Update + after above changes. + (__xstat64_conv): Likewise. + 2006-05-08 Richard Sandiford * sysdeps/mips/ldsodefs.h: New file. diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h index 9ae38cd8d0..208197830c 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/stat.h +++ b/sysdeps/unix/sysv/linux/mips/bits/stat.h @@ -61,16 +61,27 @@ struct stat long int st_pad2[3]; __off64_t st_size; /* Size of file, in bytes. */ #endif - /* - * Actually this should be timestruc_t st_atime, st_mtime and - * st_ctime but we don't have it under Linux. - */ +#ifdef __USE_MISC + /* 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 + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +#else __time_t st_atime; /* Time of last access. */ long int __reserved0; __time_t st_mtime; /* Time of last modification. */ long int __reserved1; __time_t st_ctime; /* Time of last status change. */ long int __reserved2; +#endif __blksize_t st_blksize; /* Optimal block size for I/O. */ #ifndef __USE_FILE_OFFSET64 __blkcnt_t st_blocks; /* Number of 512-byte blocks allocated. */ @@ -94,16 +105,24 @@ struct stat64 unsigned long int st_rdev; /* Device number, if device. */ long int st_pad2[3]; __off64_t st_size; /* Size of file, in bytes. */ - /* - * Actually this should be timestruc_t st_atime, st_mtime and - * st_ctime but we don't have it under Linux. - */ +#ifdef __USE_MISC + /* 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 + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +#else __time_t st_atime; /* Time of last access. */ long int __reserved0; __time_t st_mtime; /* Time of last modification. */ long int __reserved1; __time_t st_ctime; /* Time of last status change. */ long int __reserved2; +#endif __blksize_t st_blksize; /* Optimal block size for I/O. */ long int st_pad3; __blkcnt64_t st_blocks; /* Number of 512-byte blocks allocated. */ @@ -133,12 +152,27 @@ struct stat unsigned int st_pad2[3]; /* Reserved for st_rdev expansion */ __off64_t st_size; #endif +#ifdef __USE_MISC + /* 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 + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +#else __time_t st_atime; int __reserved0; __time_t st_mtime; int __reserved1; __time_t st_ctime; int __reserved2; +#endif __blksize_t st_blksize; unsigned int st_pad4; #ifndef __USE_FILE_OFFSET64 @@ -162,12 +196,24 @@ struct stat64 __dev_t st_rdev; unsigned int st_pad2[3]; /* Reserved for st_rdev expansion */ __off64_t st_size; +#ifdef __USE_MISC + /* 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 + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +#else __time_t st_atime; int __reserved0; __time_t st_mtime; int __reserved1; __time_t st_ctime; int __reserved2; +#endif __blksize_t st_blksize; unsigned int st_pad3; __blkcnt64_t st_blocks; diff --git a/sysdeps/unix/sysv/linux/mips/kernel_stat.h b/sysdeps/unix/sysv/linux/mips/kernel_stat.h index cab1e7110e..9de33df263 100644 --- a/sysdeps/unix/sysv/linux/mips/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/mips/kernel_stat.h @@ -16,12 +16,9 @@ struct kernel_stat unsigned int st_rdev; unsigned int __pad2[3]; long long st_size; - unsigned int st_atime; - unsigned int __unused1; - unsigned int st_mtime; - unsigned int __unused2; - unsigned int st_ctime; - unsigned int __unused3; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; unsigned int st_blksize; unsigned int __pad3; unsigned long long st_blocks; @@ -40,12 +37,9 @@ struct kernel_stat long int __pad2[2]; long int st_size; long int __pad3; - long int st_atime; - long int __unused1; - long int st_mtime; - long int __unused2; - long int st_ctime; - long int __unused3; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; long int st_blksize; long int st_blocks; char st_fstype[16]; /* Filesystem type name, unsupported */ diff --git a/sysdeps/unix/sysv/linux/mips/xstatconv.c b/sysdeps/unix/sysv/linux/mips/xstatconv.c index 41d1cbb768..a2c8e84c4f 100644 --- a/sysdeps/unix/sysv/linux/mips/xstatconv.c +++ b/sysdeps/unix/sysv/linux/mips/xstatconv.c @@ -62,9 +62,9 @@ __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf) buf->st_blksize = kbuf->st_blksize; buf->st_blocks = kbuf->st_blocks; - buf->st_atime = kbuf->st_atime; buf->__reserved0 = 0; - buf->st_mtime = kbuf->st_mtime; buf->__reserved1 = 0; - buf->st_ctime = kbuf->st_ctime; buf->__reserved2 = 0; + buf->st_atim = kbuf->st_atim; + buf->st_mtim = kbuf->st_mtim; + buf->st_ctim = kbuf->st_ctim; buf->st_pad5[0] = 0; buf->st_pad5[1] = 0; buf->st_pad5[2] = 0; buf->st_pad5[3] = 0; @@ -107,9 +107,9 @@ __xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf) buf->st_blksize = kbuf->st_blksize; buf->st_blocks = kbuf->st_blocks; - buf->st_atime = kbuf->st_atime; buf->__reserved0 = 0; - buf->st_mtime = kbuf->st_mtime; buf->__reserved1 = 0; - buf->st_ctime = kbuf->st_ctime; buf->__reserved2 = 0; + buf->st_atim = kbuf->st_atim; + buf->st_mtim = kbuf->st_mtim; + buf->st_ctim = kbuf->st_ctim; buf->st_pad4[0] = 0; buf->st_pad4[1] = 0; buf->st_pad4[2] = 0; buf->st_pad4[3] = 0; From 42e36d16b391a79d6a6b204c56138f5b2294e1e4 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Wed, 10 May 2006 18:57:03 +0000 Subject: [PATCH 3615/4487] * sysdeps/unix/sysv/linux/mips/register-dump.h (register_dump): Don't dump sc_cause, sc_status or sc_badvaddr. * sysdeps/unix/sysv/linux/mips/bits/sigcontext.h: Rewrite. Update structure definitions after DSP kernel changes. * sysdeps/unix/sysv/linux/mips/sys/ucontext.h (mcontext_t): Update after the same DSP changes. --- ChangeLog.mips | 10 ++ .../unix/sysv/linux/mips/bits/sigcontext.h | 121 ++++++++---------- sysdeps/unix/sysv/linux/mips/register-dump.h | 17 +-- sysdeps/unix/sysv/linux/mips/sys/ucontext.h | 26 ++-- 4 files changed, 84 insertions(+), 90 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 7106b9da17..2122477a3b 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,13 @@ +2006-05-10 Richard Sandiford + Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/mips/register-dump.h (register_dump): Don't + dump sc_cause, sc_status or sc_badvaddr. + * sysdeps/unix/sysv/linux/mips/bits/sigcontext.h: Rewrite. Update + structure definitions after DSP kernel changes. + * sysdeps/unix/sysv/linux/mips/sys/ucontext.h (mcontext_t): Update + after the same DSP changes. + 2006-05-08 Richard Sandiford * sysdeps/unix/sysv/linux/mips/bits/stat.h (struct stat): Add diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h b/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h index 079964ed46..99faeed397 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h +++ b/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h @@ -1,5 +1,5 @@ -/* Copyright (C) 1996, 1997, 1998, 2003, 2004 Free Software Foundation, Inc. - This file is part of the GNU C Library. +/* Copyright (C) 1996, 1997, 1998, 2003, 2004, 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 modify it under the terms of the GNU Lesser General Public @@ -16,90 +16,69 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#ifndef _BITS_SIGCONTEXT_H +#define _BITS_SIGCONTEXT_H 1 + #if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H # error "Never use directly; include instead." #endif #include -#ifndef sigcontext_struct -/* Kernel headers before 2.1.1 define a struct sigcontext_struct, but - we need sigcontext. */ -# define sigcontext_struct sigcontext - -/* # include */ -/* Instead of including the kernel header, that will vary depending on - whether the 32- or the 64-bit kernel is installed, we paste the - contents here. In case you're wondering about the different - licenses, the fact that the file is pasted, instead of included, - doesn't really make any difference for the program that includes - this header. */ #if _MIPS_SIM == _ABIO32 -/* - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - * - * Copyright (C) 1996, 1997, 2000 by Ralf Baechle - */ -#ifndef _ASM_SIGCONTEXT_H -#define _ASM_SIGCONTEXT_H -/* - * Keep this struct definition in sync with the sigcontext fragment - * in arch/mips/tools/offset.c - */ -struct sigcontext { - unsigned int sc_regmask; /* Unused */ - unsigned int sc_status; - unsigned long long sc_pc; - unsigned long long sc_regs[32]; - unsigned long long sc_fpregs[32]; - unsigned int sc_ownedfp; /* Unused */ - unsigned int sc_fpc_csr; - unsigned int sc_fpc_eir; /* Unused */ - unsigned int sc_used_math; - unsigned int sc_ssflags; /* Unused */ - unsigned long long sc_mdhi; - unsigned long long sc_mdlo; +/* Certain unused fields were replaced with new ones in 2.6.12-rc4. + The changes were as follows: - unsigned int sc_cause; /* Unused */ - unsigned int sc_badvaddr; /* Unused */ + sc_cause -> sc_hi1 + sc_badvaddr -> sc_lo1 + sc_sigset[0] -> sc_hi2 + sc_sigset[1] -> sc_lo2 + sc_sigset[2] -> sc_hi3 + sc_sigset[3] -> sc_lo3 - unsigned long sc_sigset[4]; /* kernel's sigset_t */ + sc_regmask, sc_ownedfp and sc_fpc_eir are not used. */ +struct sigcontext { + unsigned int sc_regmask; + unsigned int sc_status; + unsigned long long sc_pc; + unsigned long long sc_regs[32]; + unsigned long long sc_fpregs[32]; + unsigned int sc_ownedfp; + unsigned int sc_fpc_csr; + unsigned int sc_fpc_eir; + unsigned int sc_used_math; + unsigned int sc_dsp; + unsigned long long sc_mdhi; + unsigned long long sc_mdlo; + unsigned long sc_hi1; + unsigned long sc_lo1; + unsigned long sc_hi2; + unsigned long sc_lo2; + unsigned long sc_hi3; + unsigned long sc_lo3; }; -#endif /* _ASM_SIGCONTEXT_H */ -#else /* _MIPS_SIM != _ABIO32 */ -/* - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - * - * Copyright (C) 1996, 1997, 1999 by Ralf Baechle - * Copyright (C) 1999 Silicon Graphics, Inc. - */ -#ifndef _ASM_SIGCONTEXT_H -#define _ASM_SIGCONTEXT_H +#else -/* - * Keep this struct definition in sync with the sigcontext fragment - * in arch/mips/tools/offset.c - */ +/* This structure changed in 2.6.12-rc4 when DSP support was added. */ struct sigcontext { - unsigned long long sc_regs[32]; - unsigned long long sc_fpregs[32]; - unsigned long long sc_mdhi; - unsigned long long sc_mdlo; - unsigned long long sc_pc; - unsigned int sc_status; - unsigned int sc_fpc_csr; - unsigned int sc_fpc_eir; - unsigned int sc_used_math; - unsigned int sc_cause; - unsigned int sc_badvaddr; + unsigned long long sc_regs[32]; + unsigned long long sc_fpregs[32]; + unsigned long long sc_mdhi; + unsigned long long sc_hi1; + unsigned long long sc_hi2; + unsigned long long sc_hi3; + unsigned long long sc_mdlo; + unsigned long long sc_lo1; + unsigned long long sc_lo2; + unsigned long long sc_lo3; + unsigned long long sc_pc; + unsigned int sc_fpc_csr; + unsigned int sc_used_math; + unsigned int sc_dsp; + unsigned int sc_reserved; }; -#endif /* _ASM_SIGCONTEXT_H */ #endif /* _MIPS_SIM != _ABIO32 */ #endif diff --git a/sysdeps/unix/sysv/linux/mips/register-dump.h b/sysdeps/unix/sysv/linux/mips/register-dump.h index f5bd3a2735..8d2ec754df 100644 --- a/sysdeps/unix/sysv/linux/mips/register-dump.h +++ b/sysdeps/unix/sysv/linux/mips/register-dump.h @@ -1,5 +1,5 @@ /* Dump registers. - Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2002, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger , 2000. @@ -27,8 +27,8 @@ R8 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX R16 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX R24 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX - pc cause status badvaddr lo hi - XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX + pc lo hi + XXXXXXXX XXXXXXXX XXXXXXXX The FPU registers will not be printed. */ @@ -61,11 +61,8 @@ register_dump (int fd, struct sigcontext *ctx) for (i = 0; i < 32; i++) hexvalue (ctx->sc_regs[i], regs[i], 8); hexvalue (ctx->sc_pc, regs[32], 8); - hexvalue (ctx->sc_cause, regs[33], 8); - hexvalue (ctx->sc_status, regs[34], 8); - hexvalue (ctx->sc_badvaddr, regs[35], 8); - hexvalue (ctx->sc_mdhi, regs[36], 8); - hexvalue (ctx->sc_mdlo, regs[37], 8); + hexvalue (ctx->sc_mdhi, regs[33], 8); + hexvalue (ctx->sc_mdlo, regs[34], 8); /* Generate the output. */ ADD_STRING ("Register dump:\n\n R0 "); @@ -92,8 +89,8 @@ register_dump (int fd, struct sigcontext *ctx) ADD_MEM (regs[i], 8); ADD_STRING (" "); } - ADD_STRING ("\n pc cause status badvaddr lo hi\n "); - for (i = 32; i < 38; i++) + ADD_STRING ("\n pc lo hi\n "); + for (i = 32; i < 35; i++) { ADD_MEM (regs[i], 8); ADD_STRING (" "); diff --git a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h index ddb499f20c..ac496f3d6d 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h @@ -1,5 +1,5 @@ -/* Copyright (C) 1997, 1998, 2000, 2003, 2004 Free Software Foundation, Inc. - This file is part of the GNU C Library. +/* Copyright (C) 1997, 1998, 2000, 2003, 2004, 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 modify it under the terms of the GNU Lesser General Public @@ -73,11 +73,15 @@ typedef struct unsigned int fpc_csr; unsigned int fpc_eir; unsigned int used_math; - unsigned int ssflags; + unsigned int dsp; greg_t mdhi; greg_t mdlo; - unsigned int cause; - unsigned int badvaddr; + unsigned long hi1; + unsigned long lo1; + unsigned long hi2; + unsigned long lo2; + unsigned long hi3; + unsigned long lo3; } mcontext_t; #else typedef struct @@ -85,14 +89,18 @@ typedef struct gregset_t gregs; fpregset_t fpregs; greg_t mdhi; + greg_t hi1; + greg_t hi2; + greg_t hi3; greg_t mdlo; + greg_t lo1; + greg_t lo2; + greg_t lo3; greg_t pc; - unsigned int status; unsigned int fpc_csr; - unsigned int fpc_eir; unsigned int used_math; - unsigned int cause; - unsigned int badvaddr; + unsigned int dsp; + unsigned int reserved; } mcontext_t; #endif From 084442fce3d029f1c04ecf6b3dea5c7856fdc02a Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Sun, 14 May 2006 23:54:47 +0000 Subject: [PATCH 3616/4487] 2006-05-15 Carlos O'Donell * sysdeps/hppa/dl-machine.h: Include tls.h (elf_machine_fixup_plt): Returns fdesc. (elf_machine_profile_fixup_plt): Remove. (elf_machine_plt_value): Returns fdesc. (elf_machine_runtime_setup): Check that dl_profile != NULL. (ARCH_LA_PLTENT, ARCH_LA_PLTEXIT): Define. (RTLD_START): Use iitlbp with sr0. (elf_machine_type_class): Include TLS relocs. (reassemble_21, reassemble_14): Define. (elf_machine_rela): Add DIR21L, DIR14R, PLABEL21L, PLABEL14R, TLS_DTPMOD32, TLS_TPREL32, TLS_DTPOFF32 support. (TRAMPOLINE_TEMPLATE): Move to ... * sysdeps/hppa/dl-trampoline.S: ... here. * sysdeps/hppa/abort-instr.h: Use iitlbp with sr0. * sysdeps/hppa/dl-lookupcfg.h: Inlcude dl-fptr.h. (DL_FIXUP_VALUE_TYPE, DL_FIXUP_MAKE_VALUE, DL_FIXUP_VALUE_CODE_ADDR, DL_FIXUP_VALUE_ADD, DL_FIXUP_ADDR_VALUE): Define. * sysdeps/hppa/sysdep.h: Use "!" as a separator. Cleanup comments. * sysdeps/hppa/bits/link.h (La_hppa_regs, La_hppa_retval): Define. Define prototypes for la_hppa_gnu_pltenter and la_hppa_gnu_pltexit. --- ChangeLog.hppa | 23 ++++ sysdeps/hppa/abort-instr.h | 2 +- sysdeps/hppa/bits/link.h | 57 ++++++++ sysdeps/hppa/dl-lookupcfg.h | 15 +++ sysdeps/hppa/dl-machine.h | 244 +++++++++++++++++++---------------- sysdeps/hppa/dl-trampoline.S | 197 ++++++++++++++++++++++++++++ sysdeps/hppa/sysdep.h | 13 +- 7 files changed, 429 insertions(+), 122 deletions(-) create mode 100644 sysdeps/hppa/dl-trampoline.S diff --git a/ChangeLog.hppa b/ChangeLog.hppa index b927ecfe35..d3be675392 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,26 @@ +2006-05-15 Carlos O'Donell + + * sysdeps/hppa/dl-machine.h: Include tls.h + (elf_machine_fixup_plt): Returns fdesc. + (elf_machine_profile_fixup_plt): Remove. + (elf_machine_plt_value): Returns fdesc. + (elf_machine_runtime_setup): Check that dl_profile != NULL. + (ARCH_LA_PLTENT, ARCH_LA_PLTEXIT): Define. + (RTLD_START): Use iitlbp with sr0. + (elf_machine_type_class): Include TLS relocs. + (reassemble_21, reassemble_14): Define. + (elf_machine_rela): Add DIR21L, DIR14R, PLABEL21L, PLABEL14R, + TLS_DTPMOD32, TLS_TPREL32, TLS_DTPOFF32 support. + (TRAMPOLINE_TEMPLATE): Move to ... + * sysdeps/hppa/dl-trampoline.S: ... here. + * sysdeps/hppa/abort-instr.h: Use iitlbp with sr0. + * sysdeps/hppa/dl-lookupcfg.h: Inlcude dl-fptr.h. + (DL_FIXUP_VALUE_TYPE, DL_FIXUP_MAKE_VALUE, DL_FIXUP_VALUE_CODE_ADDR, + DL_FIXUP_VALUE_ADD, DL_FIXUP_ADDR_VALUE): Define. + * sysdeps/hppa/sysdep.h: Use "!" as a separator. Cleanup comments. + * sysdeps/hppa/bits/link.h (La_hppa_regs, La_hppa_retval): Define. + Define prototypes for la_hppa_gnu_pltenter and la_hppa_gnu_pltexit. + 2006-04-27 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h: Include uio.h, and diff --git a/sysdeps/hppa/abort-instr.h b/sysdeps/hppa/abort-instr.h index f1afea46de..c13b0e5a4c 100644 --- a/sysdeps/hppa/abort-instr.h +++ b/sysdeps/hppa/abort-instr.h @@ -3,4 +3,4 @@ We go with iitlbp because it has a history of being used to crash programs. */ -#define ABORT_INSTRUCTION asm ("iitlbp %r0,(%r0)") +#define ABORT_INSTRUCTION asm ("iitlbp %r0,(%sr0, %r0)") diff --git a/sysdeps/hppa/bits/link.h b/sysdeps/hppa/bits/link.h index e69de29bb2..2c1c81de49 100644 --- a/sysdeps/hppa/bits/link.h +++ b/sysdeps/hppa/bits/link.h @@ -0,0 +1,57 @@ +/* Copyright (C) 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 + 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 _LINK_H +# error "Never include directly; use instead." +#endif + +/* Registers for entry into PLT on hppa. */ +typedef struct La_hppa_regs +{ + uint32_t lr_reg[4]; + double lr_fpreg[4]; + uint32_t lr_sp; + uint32_t lr_ra; +} La_hppa_regs; + +/* Return values for calls from PLT on hppa. */ +typedef struct La_hppa_retval +{ + uint32_t lrv_r28; + uint32_t lrv_r29; + double lr_fr4; +} La_hppa_retval; + + +__BEGIN_DECLS + +extern Elf32_Addr la_hppa_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + La_hppa_regs *__regs, + unsigned int *__flags, + const char *__symname, + long int *__framesizep); +extern unsigned int la_hppa_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + const La_hppa_regs *__inregs, + La_hppa_retval *__outregs, + const char *symname); + +__END_DECLS diff --git a/sysdeps/hppa/dl-lookupcfg.h b/sysdeps/hppa/dl-lookupcfg.h index 84436e7c56..89a2d2274e 100644 --- a/sysdeps/hppa/dl-lookupcfg.h +++ b/sysdeps/hppa/dl-lookupcfg.h @@ -20,6 +20,8 @@ #define ELF_FUNCTION_PTR_IS_SPECIAL #define DL_UNMAP_IS_SPECIAL +#include + /* Forward declaration. */ struct link_map; @@ -63,3 +65,16 @@ void _dl_unmap (struct link_map *map); ((Elf32_Addr)(addr) & 2 ? (addr) : DL_AUTO_FUNCTION_ADDRESS (map, addr)) #define DL_DT_FINI_ADDRESS(map, addr) \ ((Elf32_Addr)(addr) & 2 ? (addr) : DL_AUTO_FUNCTION_ADDRESS (map, addr)) + +/* The type of the return value of fixup/profile_fixup */ +#define DL_FIXUP_VALUE_TYPE struct fdesc + +/* Construct a fixup value from the address and linkmap */ +#define DL_FIXUP_MAKE_VALUE(map, addr) \ + ((struct fdesc) { (addr), (map)->l_info[DT_PLTGOT]->d_un.d_ptr }) + +/* Extract the code address from a fixup value */ +#define DL_FIXUP_VALUE_CODE_ADDR(value) ((value).ip) +#define DL_FIXUP_VALUE_ADDR(value) ((uintptr_t) &(value)) +#define DL_FIXUP_ADDR_VALUE(addr) (*(struct fdesc *) (addr)) + diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h index d29501d306..dd5a28190b 100644 --- a/sysdeps/hppa/dl-machine.h +++ b/sysdeps/hppa/dl-machine.h @@ -31,6 +31,7 @@ #include #include #include +#include # define VALID_ELF_OSABI(osabi) ((osabi == ELFOSABI_SYSV) || (osabi == ELFOSABI_LINUX)) # define VALID_ELF_ABIVERSION(ver) (ver == 0) @@ -116,43 +117,28 @@ elf_machine_load_address (void) return dynamic - elf_machine_dynamic (); } -/* Fixup a PLT entry to bounce directly to the function at VALUE. - Optimized non-profile version. */ -static inline Elf32_Addr +/* Fixup a PLT entry to bounce directly to the function at VALUE. */ +static inline struct fdesc __attribute__ ((always_inline)) elf_machine_fixup_plt (struct link_map *map, lookup_t t, const Elf32_Rela *reloc, - Elf32_Addr *reloc_addr, Elf32_Addr value) + Elf32_Addr *reloc_addr, struct fdesc value) { /* map is the link_map for the caller, t is the link_map for the object being called */ - reloc_addr[1] = D_PTR (t, l_info[DT_PLTGOT]); - reloc_addr[0] = value; - /* Return the PLT slot rather than the function value so that the - trampoline can load the new LTP. */ - return (Elf32_Addr) reloc_addr; -} - -/* Fixup a PLT entry to bounce directly to the function at VALUE. */ -#define ELF_MACHINE_PROFILE_FIXUP_PLT elf_machine_profile_fixup_plt -static inline Elf32_Addr -elf_machine_profile_fixup_plt (struct link_map *map, lookup_t t, - const Elf32_Rela *reloc, - Elf32_Addr *reloc_addr, Elf32_Addr value) -{ - if(__builtin_expect (t == NULL, 1)) - return (Elf32_Addr) reloc_addr; - /* Return the PLT slot rather than the function value so that the - trampoline can load the new LTP. */ - return (Elf32_Addr) elf_machine_fixup_plt(map, t, reloc, reloc_addr, value); + reloc_addr[1] = value.gp; + /* Need to ensure that the gp is visible before the code + entry point is updated */ + ((volatile Elf32_Addr *) reloc_addr)[0] = value.ip; + return value; } /* Return the final value of a plt relocation. */ -static inline Elf32_Addr +static inline struct fdesc elf_machine_plt_value (struct link_map *map, const Elf32_Rela *reloc, - Elf32_Addr value) + struct fdesc value) { - /* We are rela only */ - return value + reloc->r_addend; + /* We are rela only, return a function descriptor as a plt entry. */ + return (struct fdesc) { value.ip + reloc->r_addend, value.gp }; } /* Set up the loaded object described by L so its unrelocated PLT @@ -181,7 +167,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) extern void _dl_runtime_resolve (void); extern void _dl_runtime_profile (void); - + /* Linking lazily */ if (lazy) { @@ -215,9 +201,10 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) { /* Found the GOT! */ register Elf32_Addr ltp __asm__ ("%r19"); - /* Identify this shared object. */ + + /* Identify this shared object. Second entry in the got. */ got[1] = (Elf32_Addr) l; - + /* This function will be called to perform the relocation. */ if (__builtin_expect (!profile, 1)) { @@ -236,7 +223,8 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) } else { - if (_dl_name_match_p (GLRO(dl_profile), l)) + if (GLRO(dl_profile) != NULL + && _dl_name_match_p (GLRO(dl_profile), l)) { /* This is the object we are looking for. Say that we really want profiling and the timers are @@ -316,6 +304,11 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) return lazy; } + +/* Names of the architecture-specific auditing callback functions. */ +#define ARCH_LA_PLTENTER hppa_gnu_pltenter +#define ARCH_LA_PLTEXIT hppa_gnu_pltexit + /* Initial entry point code for the dynamic linker. The C function `_dl_start' is the real entry point; its return value is the user program's entry point. */ @@ -367,7 +360,7 @@ asm ( \ " ldw,ma 8(%r26),%r19\n" \ \ /* Uh oh! We didn't find one. Abort. */ \ -" iitlbp %r0,(%r0)\n" \ +" iitlbp %r0,(%sr0,%r0)\n" \ \ "2: ldw -4(%r26),%r19\n" /* Found it, load value. */ \ " add %r19,%r20,%r19\n" /* And add the load offset. */ \ @@ -471,85 +464,28 @@ asm ( \ " ldw 4(%r3),%r19\n" /* load the object's gp */ \ " bv %r0(%r2)\n" \ " depi 2,31,2,%r23\n" /* delay slot */ \ - ); - +); -/* This code gets called via the .plt stub, and is used in - dl-runtime.c to call the `fixup' function and then redirect to the - address it returns. - - WARNING: This template is also used by gcc's __cffc, and expects - that the "bl" for fixup() exist at a particular offset. - Do not change this template without changing gcc, while the prefix - "bl" should fix everything so gcc finds the right spot, it will - slow down __cffc when it attempts to call fixup to resolve function - descriptor references. Please refer to gcc/gcc/config/pa/fptr.c - - Enter with r19 = reloc offset, r20 = got-8, r21 = fixup ltp. */ -#define TRAMPOLINE_TEMPLATE(tramp_name, fixup_name) \ - extern void tramp_name (void); \ - asm ( \ - " .text\n" \ - /* FAKE bl to provide gcc's __cffc with fixup's address */ \ - " bl " #fixup_name ",%r2\n" /* Runtime address of fixup */ \ - " .globl " #tramp_name "\n" \ - " .type " #tramp_name ",@function\n" \ - #tramp_name ":\n" \ - " .proc\n" \ - " .callinfo frame=64,calls,save_rp\n" \ - " .entry\n" \ - /* Save return pointer */ \ - " stw %r2,-20(%sp)\n" \ - /* Save argument registers in the call stack frame. */ \ - " stw %r26,-36(%sp)\n" \ - " stw %r25,-40(%sp)\n" \ - " stw %r24,-44(%sp)\n" \ - " stw %r23,-48(%sp)\n" \ - /* Build a call frame, and save structure pointer. */ \ - " stwm %r28,64(%sp)\n" \ - \ - /* Set up args to fixup func. */ \ - " ldw 8+4(%r20),%r26\n" /* (1) got[1] == struct link_map */ \ - " copy %r19,%r25\n" /* (2) reloc offset */ \ - " copy %r2,%r24\n" /* (3) profile_fixup needs rp */ \ - \ - /* Call the real address resolver. */ \ - " bl " #fixup_name ",%r2\n" \ - " copy %r21,%r19\n" /* set fixup func ltp (DELAY SLOT)*/ \ - \ - " ldw 0(%r28),%r22\n" /* load up the returned func ptr */ \ - " ldw 4(%r28),%r19\n" \ - " ldwm -64(%sp),%r28\n" \ - /* Arguments. */ \ - " ldw -36(%sp),%r26\n" \ - " ldw -40(%sp),%r25\n" \ - " ldw -44(%sp),%r24\n" \ - " ldw -48(%sp),%r23\n" \ - /* Call the real function. */ \ - " bv %r0(%r22)\n" \ - /* Return pointer. */ \ - " ldw -20(%sp),%r2\n" \ - " .exit\n" \ - " .procend\n"); - -#ifndef PROF -#define ELF_MACHINE_RUNTIME_TRAMPOLINE \ - TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup); \ - TRAMPOLINE_TEMPLATE (_dl_runtime_profile, profile_fixup); -#else -#define ELF_MACHINE_RUNTIME_TRAMPOLINE \ - TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup); \ - strong_alias (_dl_runtime_resolve, _dl_runtime_profile); -#endif - -/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so - PLT entries should not be allowed to define the value. +/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry or + a TLS variable, so references should not be allowed to define the value. ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one of the main executable's symbols, as for a COPY reloc. */ -#define elf_machine_type_class(type) \ - ((((type) == R_PARISC_IPLT || (type) == R_PARISC_EPLT) \ - * ELF_RTYPE_CLASS_PLT) \ +#if defined USE_TLS && (!defined RTLD_BOOTSTRAP || USE___THREAD) +# define elf_machine_type_class(type) \ + ((((type) == R_PARISC_IPLT \ + || (type) == R_PARISC_EPLT \ + || (type) == R_PARISC_TLS_DTPMOD32 \ + || (type) == R_PARISC_TLS_DTPOFF32 \ + || (type) == R_PARISC_TLS_TPREL32) \ + * ELF_RTYPE_CLASS_PLT) \ + | (((type) == R_PARISC_COPY) * ELF_RTYPE_CLASS_COPY)) +#else +#define elf_machine_type_class(type) \ + ((((type) == R_PARISC_IPLT \ + || (type) == R_PARISC_EPLT) \ + * ELF_RTYPE_CLASS_PLT) \ | (((type) == R_PARISC_COPY) * ELF_RTYPE_CLASS_COPY)) +#endif /* Used by the runtime in fixup to figure out if reloc is *really* PLT */ #define ELF_MACHINE_JMP_SLOT R_PARISC_IPLT @@ -579,9 +515,22 @@ dl_platform_init (void) /* These are only actually used where RESOLVE_MAP is defined, anyway. */ #ifdef RESOLVE_MAP +#define reassemble_21(as21) \ + ( (((as21) & 0x100000) >> 20) \ + | (((as21) & 0x0ffe00) >> 8) \ + | (((as21) & 0x000180) << 7) \ + | (((as21) & 0x00007c) << 14) \ + | (((as21) & 0x000003) << 12)) + +#define reassemble_14(as14) \ + ( (((as14) & 0x1fff) << 1) \ + | (((as14) & 0x2000) >> 13)) + auto void __attribute__((always_inline)) -elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, - const Elf32_Sym *sym, const struct r_found_version *version, +elf_machine_rela (struct link_map *map, + const Elf32_Rela *reloc, + const Elf32_Sym *sym, + const struct r_found_version *version, void *const reloc_addr_arg) { Elf32_Addr *const reloc_addr = reloc_addr_arg; @@ -590,7 +539,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, struct link_map *sym_map; Elf32_Addr value; -# if !defined RTLD_BOOTSTRAP && !defined SHARED +# if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC && !defined SHARED /* This is defined in rtld.c, but nowhere in the static libc.a; make the reference weak so static programs can still link. This declaration cannot be done when compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP) @@ -612,6 +561,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, # else sym_map = RESOLVE_MAP (&sym, version, r_type); # endif + if (sym_map) { value = sym ? sym_map->l_addr + sym->st_value : 0; @@ -635,6 +585,27 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, } break; + case R_PARISC_DIR21L: + { + unsigned int insn = *(unsigned int *)reloc_addr; + value = sym_map->l_addr + sym->st_value + + ((reloc->r_addend + 0x1000) & -0x2000); + value = value >> 11; + insn = (insn &~ 0x1fffff) | reassemble_21 (value); + *(unsigned int *)reloc_addr = insn; + } + return; + + case R_PARISC_DIR14R: + { + unsigned int insn = *(unsigned int *)reloc_addr; + value = ((sym_map->l_addr + sym->st_value) & 0x7ff) + + (((reloc->r_addend & 0x1fff) ^ 0x1000) - 0x1000); + insn = (insn &~ 0x3fff) | reassemble_14 (value); + *(unsigned int *)reloc_addr = insn; + } + return; + case R_PARISC_PLABEL32: /* Easy rule: If there is a symbol and it is global, then we need to make a dynamic function descriptor. Otherwise we @@ -653,15 +624,42 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, value = (Elf32_Addr)((unsigned int)_dl_make_fptr (sym_map, sym, value) | 2); break; + case R_PARISC_PLABEL21L: + case R_PARISC_PLABEL14R: + { + unsigned int insn = *(unsigned int *)reloc_addr; + + if (__builtin_expect (sym == NULL, 0)) + break; + + value = (Elf32_Addr)((unsigned int)_dl_make_fptr (sym_map, sym, value) | 2); + + if (r_type == R_PARISC_PLABEL21L) + { + value >>= 11; + insn = (insn &~ 0x1fffff) | reassemble_21 (value); + } + else + { + value &= 0x7ff; + insn = (insn &~ 0x3fff) | reassemble_14 (value); + } + + *(unsigned int *)reloc_addr = insn; + } + return; + case R_PARISC_IPLT: if (__builtin_expect (sym_map != NULL, 1)) { - elf_machine_fixup_plt (NULL, sym_map, reloc, reloc_addr, value); + elf_machine_fixup_plt (NULL, sym_map, reloc, reloc_addr, + DL_FIXUP_MAKE_VALUE(sym_map, value)); } else { /* If we get here, it's a (weak) undefined sym. */ - elf_machine_fixup_plt (NULL, map, reloc, reloc_addr, value); + elf_machine_fixup_plt (NULL, map, reloc, reloc_addr, + DL_FIXUP_MAKE_VALUE(map, value)); } return; @@ -685,6 +683,28 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, memcpy (reloc_addr_arg, (void *) value, MIN (sym->st_size, refsym->st_size)); return; + +#if defined USE_TLS && (!defined RTLD_BOOTSTRAP) + case R_PARISC_TLS_DTPMOD32: + value = sym_map->l_tls_modid; + break; + + case R_PARISC_TLS_DTPOFF32: + /* During relocation all TLS symbols are defined and used. + Therefore the offset is already correct. */ + if (sym != NULL) + *reloc_addr = sym->st_value; + return; + + case R_PARISC_TLS_TPREL32: + /* The offset is negative, forward from the thread pointer */ + if (sym != NULL) + { + CHECK_STATIC_TLS (map, sym_map); + value = sym_map->l_tls_offset + sym->st_value + reloc->r_addend; + } + break; +#endif /* use TLS */ case R_PARISC_NONE: /* Alright, Wilbur. */ return; diff --git a/sysdeps/hppa/dl-trampoline.S b/sysdeps/hppa/dl-trampoline.S new file mode 100644 index 0000000000..c476138ebe --- /dev/null +++ b/sysdeps/hppa/dl-trampoline.S @@ -0,0 +1,197 @@ +/* PLT trampolines. hppa version. + Copyright (C) 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 + 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. */ + +#include + +/* This code gets called via the .plt stub, and is used in + dl-runtime.c to call the `_dl_fixup' function and then redirect + to the address it returns. `_dl_fixup' takes two + arguments, however `_dl_profile_fixup' takes a number of + parameters for use with library auditing (LA). + + WARNING: This template is also used by gcc's __cffc, and expects + that the "bl" for _dl_runtime_resolve exist at a particular offset. + Do not change this template without changing gcc, while the prefix + "bl" should fix everything so gcc finds the right spot, it will + slow down __cffc when it attempts to call fixup to resolve function + descriptor references. Please refer to gcc/gcc/config/pa/fptr.c + + Enter with r19 = reloc offset, r20 = got-8, r21 = fixup ltp. */ + + /* FAKE bl to provide gcc's __cffc with fixup loc. */ + .text + bl _dl_fixup, %r2 + .text + .align 4 + .global _dl_runtime_resolve + .type _dl_runtime_resolve,@function +_dl_runtime_resolve: + .PROC + .CALLINFO FRAME=128,CALLS,SAVE_RP,ENTRY_GR=3 + .ENTRY + /* SAVE_RP says we do */ + stw %rp, -20(%sp) + + /* Save static link register */ + stw %r29,-16(%sp) + /* Save argument registers in the call stack frame. */ + stw %r26,-36(%sp) + stw %r25,-40(%sp) + stw %r24,-44(%sp) + stw %r23,-48(%sp) + + /* Build a call frame, and save structure pointer. */ + copy %sp, %r26 /* Copy previous sp */ + /* Save function result address (on entry) */ + stwm %r28,128(%sp) + + /* Save floating point argument registers */ + ldo -56(%sp),%r26 + fstd,ma %fr4,-8(%r26) + fstd,ma %fr5,-8(%r26) + fstd,ma %fr6,-8(%r26) + fstd %fr7,0(%r26) + + /* Fillin some frame info to follow ABI */ + stw %r21,-32(%sp) /* PIC register value */ + stw %r26,-4(%sp) /* Previous sp */ + + /* Set up args to fixup func, needs only two arguments */ + ldw 8+4(%r20),%r26 /* (1) got[1] == struct link_map */ + copy %r19,%r25 /* (2) reloc offset */ + + /* Call the real address resolver. */ + bl _dl_fixup,%rp + copy %r21,%r19 /* set fixup func ltp */ + + /* Load up the returned func descriptor */ + copy %ret0, %r22 + copy %ret1, %r19 + + /* Reload arguments fp args */ + ldo -80(%sp),%r26 + fldd,ma 8(%r26),%fr7 + fldd,ma 8(%r26),%fr6 + fldd,ma 8(%r26),%fr5 + fldd 0(%r26),%fr4 + + /* Adjust sp, and restore function result address*/ + ldwm -128(%sp),%r28 + + /* Reload static link register */ + ldw -16(%sp),%r29 + /* Reload general args */ + ldw -36(%sp),%r26 + ldw -40(%sp),%r25 + ldw -44(%sp),%r24 + ldw -48(%sp),%r23 + + /* Jump to new function, but return to previous function */ + bv %r0(%r22) + ldw -20(%sp),%rp + .EXIT + .PROCEND + .size _dl_runtime_resolve, . - _dl_runtime_resolve + + + /* FIXME: + Need to largely rewrite the bottom half of + this code in order to save and restore the + LA struct from the stack along with + interpreted parameters. + */ + .text + .align 4 + .global _dl_runtime_profile + .type _dl_runtime_profile,@function +_dl_runtime_profile: + .PROC + .CALLINFO FRAME=128,CALLS,SAVE_RP,ENTRY_GR=3 + .ENTRY + + /* SAVE_RP says we do */ + stw %rp, -20(%sp) + + /* Save static link register */ + stw %r29,-16(%sp) + /* Save argument registers in the call stack frame. */ + stw %r26,-36(%sp) + stw %r25,-40(%sp) + stw %r24,-44(%sp) + stw %r23,-48(%sp) + + /* Build a call frame, and save structure pointer. */ + copy %sp, %r26 /* Copy previous sp */ + /* Save function result address (on entry) */ + stwm %r28,128(%sp) + + /* Save floating point argument registers */ + ldo -56(%sp),%r26 + fstd,ma %fr4,-8(%r26) + fstd,ma %fr5,-8(%r26) + fstd,ma %fr6,-8(%r26) + fstd %fr7,0(%r26) + + /* Fillin some frame info to follow ABI */ + stw %r21,-32(%sp) /* PIC register value */ + stw %r26,-4(%sp) /* Previous sp */ + + /* Set up args to fixup func, needs five arguments */ + ldw 8+4(%r20),%r26 /* (1) got[1] == struct link_map */ + copy %r19,%r25 /* (2) reloc offset */ + copy %rp,%r24 /* (3) profile_fixup needs rp */ + copy %r0,%r23 /* (4) regs */ + ldo -56(%sp), %r1 + stw %r1, -52(%sp) /* (5) long int *framesizep */ + + /* Call the real address resolver. */ + bl _dl_profile_fixup,%rp + copy %r21,%r19 /* set fixup func ltp */ + + /* Load up the returned func descriptor */ + copy %ret0, %r22 + copy %ret1, %r19 + + /* Reload arguments fp args */ + ldo -80(%sp),%r26 + fldd,ma 8(%r26),%fr7 + fldd,ma 8(%r26),%fr6 + fldd,ma 8(%r26),%fr5 + fldd 0(%r26),%fr4 + + /* Adjust sp, and restore function result address*/ + ldwm -128(%sp),%r28 + + /* Reload static link register */ + ldw -16(%sp),%r29 + /* Reload general args */ + ldw -36(%sp),%r26 + ldw -40(%sp),%r25 + ldw -44(%sp),%r24 + ldw -48(%sp),%r23 + + /* Jump to new function, but return to previous function */ + bv %r0(%r22) + ldw -20(%sp),%rp + .EXIT + .PROCEND + .size _dl_runtime_profile, . - _dl_runtime_profile + + + diff --git a/sysdeps/hppa/sysdep.h b/sysdeps/hppa/sysdep.h index be36567434..5d02f37da7 100644 --- a/sysdeps/hppa/sysdep.h +++ b/sysdeps/hppa/sysdep.h @@ -22,9 +22,8 @@ #include #include "config.h" -#ifndef ASM_LINE_SEP -#define ASM_LINE_SEP ; -#endif +#undef ASM_LINE_SEP +#define ASM_LINE_SEP ! #ifdef __ASSEMBLER__ @@ -51,13 +50,9 @@ #define END(name) \ .PROCEND - -/* If compiled for profiling, call `mcount' at the start of each function. */ +/* GCC does everything for us. */ #ifdef PROF -/* The mcount code relies on a normal frame pointer being on the stack - to locate our caller, so push one just for its benefit. */ -#define CALL_MCOUNT \ - XXX ASM_LINE_SEP +#define CALL_MCOUNT #else #define CALL_MCOUNT /* Do nothing. */ #endif From a29e6e84ed9e828f87dd4999eba3a6dcef1e4191 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Mon, 15 May 2006 00:44:14 +0000 Subject: [PATCH 3617/4487] 2006-05-15 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/clone.S: Accept extra arguments required for NPTL. * sysdeps/unix/sysv/linux/hppa/sysdep.c: Use var args for 6 arg syscall. * sysdeps/unix/sysv/linux/hppa/sysdep.h: Move DOARGS and UNDOARGS into PSEUDO_*'s. (ENTRY_LEAF): Define. (PSEUDO_NOERRNO, PSEUDO_ERRVAL): Use ENTRY_LEAF. (DO_CALL): Create frame. --- ChangeLog.hppa | 12 + sysdeps/unix/sysv/linux/hppa/clone.S | 66 ++++-- sysdeps/unix/sysv/linux/hppa/sysdep.c | 32 ++- sysdeps/unix/sysv/linux/hppa/sysdep.h | 323 ++++++++++++++++---------- 4 files changed, 279 insertions(+), 154 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index d3be675392..fe73322f4d 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,15 @@ +2006-05-15 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/clone.S: Accept extra arguments + required for NPTL. + * sysdeps/unix/sysv/linux/hppa/sysdep.c: Use var args for 6 arg + syscall. + * sysdeps/unix/sysv/linux/hppa/sysdep.h: Move DOARGS and UNDOARGS + into PSEUDO_*'s. + (ENTRY_LEAF): Define. + (PSEUDO_NOERRNO, PSEUDO_ERRVAL): Use ENTRY_LEAF. + (DO_CALL): Create frame. + 2006-05-15 Carlos O'Donell * sysdeps/hppa/dl-machine.h: Include tls.h diff --git a/sysdeps/unix/sysv/linux/hppa/clone.S b/sysdeps/unix/sysv/linux/hppa/clone.S index f497bca13d..042ffa5119 100644 --- a/sysdeps/unix/sysv/linux/hppa/clone.S +++ b/sysdeps/unix/sysv/linux/hppa/clone.S @@ -26,35 +26,62 @@ #define _ERRNO_H 1 #include -/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg) */ +/* Non-thread code calls __clone with the following parameters: + int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg) + + NPTL Code will call __clone with the following parameters: + int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg, + int *parent_tidptr, struct user_desc *newtls, int *child_pidptr) + + The code should not mangle the extra input registers. + Syscall expects: Input to __clone: + 4(r25) - function pointer (r26, arg0) + 0(r25) - argument (r23, arg3) + r26 - clone flags. (r24, arg2) + r25+64 - user stack pointer. (r25, arg1) + r24 - parent tid pointer. (stack - 52) + r23 - struct user_desc newtls pointer. (stack - 56) + r22 - child tid pointer. (stack - 60) + r20 - clone syscall number (constant) + */ .text ENTRY(__clone) - /* FIXME: I have no idea how profiling works on hppa. */ /* Sanity check arguments. */ - comib,= 0,%arg0,.Lerror /* no NULL function pointers */ ldi -EINVAL,%ret0 - comib,= 0,%arg1,.Lerror /* no NULL stack pointers */ - nop + comib,=,n 0,%arg0,.Lerror /* no NULL function pointers */ + comib,=,n 0,%arg1,.Lerror /* no NULL stack pointers */ /* Save the fn ptr and arg on the new stack. */ - stwm %arg0,64(%arg1) - stw %arg3,-60(%arg1) + stwm %r26,64(%r25) + stw %r23,-60(%r25) + /* Clone arguments are (int flags, void * child_stack) */ + copy %r24,%r26 /* flags are first */ + /* User stack pointer is in the correct register already */ + + /* Load args from stack... */ + ldw -52(%sp), %r24 /* Load parent_tidptr */ + ldw -56(%sp), %r23 /* Load newtls */ + ldw -60(%sp), %r22 /* Load child_tidptr */ + + /* Create frame to get r3 free */ + copy %sp, %r21 + stwm %r3, 64(%sp) + stw %r21, -4(%sp) /* Save the PIC register. */ #ifdef PIC - stw %r19,-32(%sr0, %sp) /* parent */ + copy %r19, %r3 /* parent */ #endif /* Do the system call */ - copy %arg2,%arg0 ble 0x100(%sr2,%r0) ldi __NR_clone,%r20 ldi -4096,%r1 comclr,>>= %r1,%ret0,%r0 /* Note: unsigned compare. */ - b,n .Lerror + b,n .LerrorRest comib,=,n 0,%ret0,thread_start @@ -63,18 +90,25 @@ ENTRY(__clone) since we return immediately. */ bv %r0(%rp) - nop - - /* Something bad happened -- no child created */ -.Lerror: + ldwm -64(%sp), %r3 +.LerrorRest /* Restore the PIC register on error */ #ifdef PIC - ldw -32(%sr0, %sp), %r19 /* parent */ + copy %r3, %r19 /* parent */ #endif + /* Something bad happened -- no child created */ +.Lerror: + + /* Set errno, save ret0 so we return with that value. */ + copy %ret0, %r3 b __syscall_error sub %r0,%ret0,%arg0 + copy %r3, %ret0 + /* Return after setting errno, and restoring ret0 */ + bv %r0(%rp) + ldwm -64(%sp), %r3 thread_start: @@ -92,7 +126,7 @@ thread_start: copy %ret0,%arg0 /* Die horribly. */ - iitlbp %r0,(%r0) + iitlbp %r0,(%sr0,%r0) PSEUDO_END(__clone) diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.c b/sysdeps/unix/sysv/linux/hppa/sysdep.c index 192efbaf75..8637c513df 100644 --- a/sysdeps/unix/sysv/linux/hppa/sysdep.c +++ b/sysdeps/unix/sysv/linux/hppa/sysdep.c @@ -16,12 +16,12 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include #include #include extern int __syscall_error(int err_no); -extern int syscall (int sysnum, int arg0, int arg1, int arg2, - int arg3, int arg4, int arg5); +extern long int syscall (long int __sysno, ...) __THROW; /* This routine is jumped to by all the syscall handlers, to stash an error number into errno. */ @@ -37,22 +37,35 @@ __syscall_error (int err_no) typically be in syscall.S. Also note that we have INLINE_SYSCALL, INTERNAL_SYSCALL, and all the generated pure assembly syscall wrappers. How often the function is used is unknown. */ -int -syscall (int sysnum, int arg0, int arg1, int arg2, int arg3, int arg4, - int arg5) + +long int +syscall (long int __sysno, ...) { /* FIXME: Keep this matching INLINE_SYSCALL for hppa */ + va_list args; + long int arg0, arg1, arg2, arg3, arg4, arg5; long int __sys_res; + + /* Load varargs */ + va_start (args, __sysno); + arg0 = va_arg (args, long int); + arg1 = va_arg (args, long int); + arg2 = va_arg (args, long int); + arg3 = va_arg (args, long int); + arg4 = va_arg (args, long int); + arg5 = va_arg (args, long int); + va_end (args); + { register unsigned long int __res asm("r28"); LOAD_ARGS_6 (arg0, arg1, arg2, arg3, arg4, arg5) - asm volatile (STW_ASM_PIC + asm volatile (SAVE_ASM_PIC " ble 0x100(%%sr2, %%r0) \n" " copy %1, %%r20 \n" - LDW_ASM_PIC + LOAD_ASM_PIC : "=r" (__res) - : "r" (sysnum) ASM_ARGS_6 - : CALL_CLOB_REGS CLOB_ARGS_6); + : "r" (__sysno) ASM_ARGS_6 + : "memory", CALL_CLOB_REGS CLOB_ARGS_6); __sys_res = __res; } if ((unsigned long int) __sys_res >= (unsigned long int) -4095) @@ -62,3 +75,4 @@ syscall (int sysnum, int arg0, int arg1, int arg2, int arg3, int arg4, } return __sys_res; } + diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.h b/sysdeps/unix/sysv/linux/hppa/sysdep.h index 4cfe63c556..b302d37f7b 100644 --- a/sysdeps/unix/sysv/linux/hppa/sysdep.h +++ b/sysdeps/unix/sysv/linux/hppa/sysdep.h @@ -22,28 +22,34 @@ #include #include #include -#include "config.h" -#ifndef ASM_LINE_SEP -# define ASM_LINE_SEP ; -#endif +#undef ASM_LINE_SEP +#define ASM_LINE_SEP ! #undef SYS_ify #define SYS_ify(syscall_name) (__NR_##syscall_name) +/* WARNING: TREG must be a callee saves register so + that it doesn't have to be restored after a call + to another function */ #ifdef PIC -/* WARNING: CANNOT BE USED IN A NOP! */ -# define STW_PIC stw %r19, -32(%sr0, %sp) ASM_LINE_SEP -# define LDW_PIC ldw -32(%sr0, %sp), %r19 ASM_LINE_SEP -# define STW_ASM_PIC " copy %%r19, %%r4\n" -# define LDW_ASM_PIC " copy %%r4, %%r19\n" -# define USING_GR4 "%r4", +# define TREG %r3 +# define SAVE_PIC(SREG) copy %r19, SREG ASM_LINE_SEP +# define LOAD_PIC(LREG) copy LREG, %r19 ASM_LINE_SEP +/* Inline assembly defines */ +# define TREG_ASM "%r4" /* Cant clobber r3, it holds framemarker */ +# define SAVE_ASM_PIC " copy %%r19, %" TREG_ASM "\n" +# define LOAD_ASM_PIC " copy %" TREG_ASM ", %%r19\n" +# define USING_TREG TREG_ASM, #else -# define STW_PIC ASM_LINE_SEP -# define LDW_PIC ASM_LINE_SEP -# define STW_ASM_PIC " \n" -# define LDW_ASM_PIC " \n" -# define USING_GR4 +# define TREG %r3 +# define SAVE_PIC(SREG) nop ASM_LINE_SEP +# define LOAD_PIC(LREG) nop ASM_LINE_SEP +/* Inline assembly defines */ +# define TREG_ASM +# define SAVE_ASM_PIC "nop \n" +# define LOAD_ASM_PIC "nop \n" +# define USING_TREG #endif #ifdef __ASSEMBLER__ @@ -76,31 +82,73 @@ /* We don't want the label for the error handle to be global when we define it here. */ -#ifdef PIC +/*#ifdef PIC # define SYSCALL_ERROR_LABEL 0f #else # define SYSCALL_ERROR_LABEL syscall_error -#endif +#endif*/ + +/* Argument manipulation from the stack for preparing to + make a syscall */ + +#define DOARGS_0 /* nothing */ +#define DOARGS_1 /* nothing */ +#define DOARGS_2 /* nothing */ +#define DOARGS_3 /* nothing */ +#define DOARGS_4 /* nothing */ +#define DOARGS_5 ldw -52(%sp), %r22 ASM_LINE_SEP +#define DOARGS_6 DOARGS_5 ldw -56(%sp), %r21 ASM_LINE_SEP + +#define UNDOARGS_0 /* nothing */ +#define UNDOARGS_1 /* nothing */ +#define UNDOARGS_2 /* nothing */ +#define UNDOARGS_3 /* nothing */ +#define UNDOARGS_4 /* nothing */ +#define UNDOARGS_5 /* nothing */ +#define UNDOARGS_6 /* nothing */ /* Define an entry point visible from C. There is currently a bug in gdb which prevents us from specifying incomplete stabs information. Fake some entries here which specify the current source file. */ -#define ENTRY(name) \ - .text ASM_LINE_SEP \ - .export C_SYMBOL_NAME(name) ASM_LINE_SEP \ - .type C_SYMBOL_NAME(name),@function ASM_LINE_SEP \ - C_LABEL(name) ASM_LINE_SEP \ - CALL_MCOUNT ASM_LINE_SEP +#define ENTRY(name) \ + .text ASM_LINE_SEP \ + .align ALIGNARG(4) ASM_LINE_SEP \ + .export C_SYMBOL_NAME(name) ASM_LINE_SEP \ + .type C_SYMBOL_NAME(name),@function ASM_LINE_SEP \ + C_LABEL(name) ASM_LINE_SEP \ + .PROC ASM_LINE_SEP \ + .CALLINFO FRAME=64,CALLS,SAVE_RP,ENTRY_GR=3 ASM_LINE_SEP \ + .ENTRY ASM_LINE_SEP \ + /* SAVE_RP says we do */ ASM_LINE_SEP \ + stw %rp, -20(%sr0,%sp) ASM_LINE_SEP \ + /*FIXME: Call mcount? (carefull with stack!) */ + +/* Some syscall wrappers do not call other functions, and + hence are classified as leaf, so add NO_CALLS for gdb */ +#define ENTRY_LEAF(name) \ + .text ASM_LINE_SEP \ + .align ALIGNARG(4) ASM_LINE_SEP \ + .export C_SYMBOL_NAME(name) ASM_LINE_SEP \ + .type C_SYMBOL_NAME(name),@function ASM_LINE_SEP \ + C_LABEL(name) ASM_LINE_SEP \ + .PROC ASM_LINE_SEP \ + .CALLINFO FRAME=64,NO_CALLS,SAVE_RP,ENTRY_GR=3 ASM_LINE_SEP \ + .ENTRY ASM_LINE_SEP \ + /* SAVE_RP says we do */ ASM_LINE_SEP \ + stw %rp, -20(%sr0,%sp) ASM_LINE_SEP \ + /*FIXME: Call mcount? (carefull with stack!) */ #undef END #define END(name) \ -1: ASM_LINE_SEP \ -.size C_SYMBOL_NAME(name),1b-C_SYMBOL_NAME(name) ASM_LINE_SEP + .EXIT ASM_LINE_SEP \ + .PROCEND ASM_LINE_SEP \ +.size C_SYMBOL_NAME(name), .-C_SYMBOL_NAME(name) ASM_LINE_SEP -/* If compiled for profiling, call `mcount' at the start of each function. */ -/* No, don't bother. gcc will put the call in for us. */ +/* If compiled for profiling, call `mcount' at the start + of each function. No, don't bother. gcc will put the + call in for us. */ #define CALL_MCOUNT /* Do nothing. */ /* syscall wrappers consist of @@ -118,14 +166,16 @@ */ #define PSEUDO(name, syscall_name, args) \ - ENTRY (name) \ - DO_CALL(syscall_name, args) ASM_LINE_SEP \ + ENTRY (name) ASM_LINE_SEP \ + /* If necc. load args from stack */ ASM_LINE_SEP \ + DOARGS_##args ASM_LINE_SEP \ + DO_CALL (syscall_name, args) ASM_LINE_SEP \ + UNDOARGS_##args ASM_LINE_SEP \ nop ASM_LINE_SEP #define ret \ - /* Return value set by ERRNO code */ ASM_LINE_SEP \ - bv 0(2) ASM_LINE_SEP \ - nop ASM_LINE_SEP + /* Return value set by ERRNO code */ ASM_LINE_SEP \ + bv,n 0(2) ASM_LINE_SEP #undef PSEUDO_END #define PSEUDO_END(name) \ @@ -133,8 +183,10 @@ /* We don't set the errno on the return from the syscall */ #define PSEUDO_NOERRNO(name, syscall_name, args) \ - ENTRY (name) \ - DO_CALL_NOERRNO(syscall_name, args) ASM_LINE_SEP \ + ENTRY_LEAF (name) ASM_LINE_SEP \ + DOARGS_##args ASM_LINE_SEP \ + DO_CALL_NOERRNO (syscall_name, args) ASM_LINE_SEP \ + UNDOARGS_##args ASM_LINE_SEP \ nop ASM_LINE_SEP #define ret_NOERRNO ret @@ -146,9 +198,11 @@ /* This has to return the error value */ #undef PSEUDO_ERRVAL #define PSEUDO_ERRVAL(name, syscall_name, args) \ - ENTRY(name) \ - DO_CALL_ERRVAL(syscall_name, args) ASM_LINE_SEP \ - nop ASM_LINE_SEP + ENTRY_LEAF (name) ASM_LINE_SEP \ + DOARGS_##args ASM_LINE_SEP \ + DO_CALL_ERRVAL (syscall_name, args) ASM_LINE_SEP \ + UNDOARGS_##args ASM_LINE_SEP \ + nop ASM_LINE_SEP #define ret_ERRVAL ret @@ -161,7 +215,8 @@ #define SYSCALL_PIC_SETUP /* Nothing. */ -/* All the syscall assembly macros rely on finding the approriate +/* FIXME: This comment is not true. + * All the syscall assembly macros rely on finding the approriate SYSCALL_ERROR_LABEL or rather HANDLER. */ /* int * __errno_location(void) so you have to store your value @@ -209,8 +264,8 @@ arg 2 gr25 arg 3 gr24 arg 4 gr23 - arg 5 -52(gr30) - arg 6 -56(gr30) + arg 5 -52(sp) + arg 6 -56(sp) gr22 and gr21 are caller-saves, so we can just load the arguments there and generally be happy. */ @@ -219,46 +274,48 @@ * is intended to mimic the if (__sys_res...) * code inside INLINE_SYSCALL */ +#define NO_ERROR -0x1000 #undef DO_CALL #define DO_CALL(syscall_name, args) \ - DOARGS_##args ASM_LINE_SEP \ - STW_PIC ASM_LINE_SEP \ + copy TREG,%r1 ASM_LINE_SEP \ + copy %sp,TREG ASM_LINE_SEP \ + /* Create a frame */ ASM_LINE_SEP \ + stwm %r1, 64(%sp) ASM_LINE_SEP \ + stw %rp, -20(%sp) ASM_LINE_SEP \ + stw TREG, -4(%sp) ASM_LINE_SEP \ + /* Save r19 */ ASM_LINE_SEP \ + SAVE_PIC(TREG) ASM_LINE_SEP \ /* Do syscall, delay loads # */ ASM_LINE_SEP \ ble 0x100(%sr2,%r0) ASM_LINE_SEP \ ldi SYS_ify (syscall_name), %r20 ASM_LINE_SEP \ - ldi -0x1000,%r1 ASM_LINE_SEP \ - cmpb,>>=,n %r1,%ret0,0f ASM_LINE_SEP \ - /* save rp or we get lost */ ASM_LINE_SEP \ - stw %rp, -20(%sr0,%sp) ASM_LINE_SEP \ - /* Restore r19 from frame */ ASM_LINE_SEP \ - LDW_PIC ASM_LINE_SEP \ - stw %ret0, -24(%sr0,%sp) ASM_LINE_SEP \ + ldi NO_ERROR,%r1 ASM_LINE_SEP \ + cmpb,>>=,n %r1,%ret0,L(pre_end) ASM_LINE_SEP \ + /* Restore r19 from TREG */ ASM_LINE_SEP \ + LOAD_PIC(TREG) /* delay */ ASM_LINE_SEP \ SYSCALL_ERROR_HANDLER ASM_LINE_SEP \ - /* create frame */ ASM_LINE_SEP \ - ldo 64(%sp), %sp ASM_LINE_SEP \ - ldo -64(%sp), %sp ASM_LINE_SEP \ + /* Use TREG for temp storage */ ASM_LINE_SEP \ + copy %ret0, TREG /* delay */ ASM_LINE_SEP \ /* OPTIMIZE: Don't reload r19 */ ASM_LINE_SEP \ /* do a -1*syscall_ret0 */ ASM_LINE_SEP \ - ldw -24(%sr0,%sp), %r26 ASM_LINE_SEP \ - sub %r0, %r26, %r26 ASM_LINE_SEP \ + sub %r0, TREG, TREG ASM_LINE_SEP \ /* Store into errno location */ ASM_LINE_SEP \ - stw %r26, 0(%sr0,%ret0) ASM_LINE_SEP \ + stw TREG, 0(%sr0,%ret0) ASM_LINE_SEP \ /* return -1 as error */ ASM_LINE_SEP \ ldo -1(%r0), %ret0 ASM_LINE_SEP \ - ldw -20(%sr0,%sp), %rp ASM_LINE_SEP \ -0: ASM_LINE_SEP \ - UNDOARGS_##args ASM_LINE_SEP +L(pre_end): ASM_LINE_SEP \ + /* Restore return pointer */ ASM_LINE_SEP \ + ldw -84(%sp),%rp ASM_LINE_SEP \ + /* Restore our frame, restoring TREG */ ASM_LINE_SEP \ + ldwm -64(%sp), TREG ASM_LINE_SEP /* We do nothing with the return, except hand it back to someone else */ #undef DO_CALL_NOERRNO #define DO_CALL_NOERRNO(syscall_name, args) \ - DOARGS_##args \ /* No need to store r19 */ ASM_LINE_SEP \ ble 0x100(%sr2,%r0) ASM_LINE_SEP \ ldi SYS_ify (syscall_name), %r20 ASM_LINE_SEP \ - /* Caller will restore r19 */ ASM_LINE_SEP \ - UNDOARGS_##args + /* Caller will restore r19 */ ASM_LINE_SEP /* Here, we return the ERRVAL in assembly, note we don't call the error handler function, but we do 'negate' the return _IF_ @@ -266,34 +323,15 @@ #undef DO_CALL_ERRVAL #define DO_CALL_ERRVAL(syscall_name, args) \ - DOARGS_##args ASM_LINE_SEP \ /* No need to store r19 */ ASM_LINE_SEP \ ble 0x100(%sr2,%r0) ASM_LINE_SEP \ ldi SYS_ify (syscall_name), %r20 ASM_LINE_SEP \ /* Caller will restore r19 */ ASM_LINE_SEP \ - ldi -0x1000,%r1 ASM_LINE_SEP \ + ldi NO_ERROR,%r1 ASM_LINE_SEP \ cmpb,>>=,n %r1,%ret0,0f ASM_LINE_SEP \ sub %r0, %ret0, %ret0 ASM_LINE_SEP \ -0: ASM_LINE_SEP \ - UNDOARGS_##args ASM_LINE_SEP - -#define DOARGS_0 /* nothing */ -#define DOARGS_1 /* nothing */ -#define DOARGS_2 /* nothing */ -#define DOARGS_3 /* nothing */ -#define DOARGS_4 /* nothing */ -#define DOARGS_5 ldw -52(%r30), %r22 ASM_LINE_SEP -#define DOARGS_6 ldw -52(%r30), %r22 ASM_LINE_SEP \ - ldw -56(%r30), %r21 ASM_LINE_SEP - +0: ASM_LINE_SEP -#define UNDOARGS_0 /* nothing */ -#define UNDOARGS_1 /* nothing */ -#define UNDOARGS_2 /* nothing */ -#define UNDOARGS_3 /* nothing */ -#define UNDOARGS_4 /* nothing */ -#define UNDOARGS_5 /* nothing */ -#define UNDOARGS_6 /* nothing */ #else @@ -305,27 +343,28 @@ registers r20 -> r26 will conflict with the list so they are treated specially. Although r19 is clobbered by the syscall we cannot say this because it would violate ABI, thus we say - r4 is clobbered and use that register to save/restore r19 + TREG is clobbered and use that register to save/restore r19 across the syscall. */ -#define CALL_CLOB_REGS "%r1", "%r2", USING_GR4 \ +#define CALL_CLOB_REGS "%r1", "%r2", USING_TREG \ "%r20", "%r29", "%r31" #undef INLINE_SYSCALL -#define INLINE_SYSCALL(name, nr, args...) ({ \ +#define INLINE_SYSCALL(name, nr, args...) \ +({ \ long __sys_res; \ { \ register unsigned long __res asm("r28"); \ LOAD_ARGS_##nr(args) \ - /* FIXME: HACK stw/ldw r19 around syscall */ \ + /* FIXME: HACK save/load r19 around syscall */ \ asm volatile( \ - STW_ASM_PIC \ + SAVE_ASM_PIC \ " ble 0x100(%%sr2, %%r0)\n" \ " ldi %1, %%r20\n" \ - LDW_ASM_PIC \ + LOAD_ASM_PIC \ : "=r" (__res) \ : "i" (SYS_ify(name)) ASM_ARGS_##nr \ - : CALL_CLOB_REGS CLOB_ARGS_##nr \ + : "memory", CALL_CLOB_REGS CLOB_ARGS_##nr \ ); \ __sys_res = (long)__res; \ } \ @@ -339,13 +378,13 @@ /* INTERNAL_SYSCALL_DECL - Allows us to setup some function static value to use within the context of the syscall INTERNAL_SYSCALL_ERROR_P - Returns 0 if it wasn't an error, 1 otherwise - You are allowed to use the syscall result (val) and the DECL error variable - to determine what went wrong. + You are allowed to use the syscall result (val) and the DECL error + variable to determine what went wrong. INTERLAL_SYSCALL_ERRNO - Munges the val/err pair into the error number. In our case we just flip the sign. */ #undef INTERNAL_SYSCALL_DECL -#define INTERNAL_SYSCALL_DECL(err) do { } while (0) +#define INTERNAL_SYSCALL_DECL(err) /* Equivalent to (val < 0)&&(val > -4095) which is what we want */ #undef INTERNAL_SYSCALL_ERROR_P @@ -357,46 +396,72 @@ /* Similar to INLINE_SYSCALL but we don't set errno */ #undef INTERNAL_SYSCALL -#define INTERNAL_SYSCALL(name, err, nr, args...) \ -({ \ - long __sys_res; \ - { \ - register unsigned long __res asm("r28"); \ - LOAD_ARGS_##nr(args) \ - /* FIXME: HACK stw/ldw r19 around syscall */ \ - asm volatile( \ - STW_ASM_PIC \ - " ble 0x100(%%sr2, %%r0)\n" \ - " ldi %1, %%r20\n" \ - LDW_ASM_PIC \ - : "=r" (__res) \ - : "i" (SYS_ify(name)) ASM_ARGS_##nr \ - : CALL_CLOB_REGS CLOB_ARGS_##nr \ - ); \ - __sys_res = (long)__res; \ - } \ - __sys_res; \ +#define INTERNAL_SYSCALL(name, err, nr, args...) \ +({ \ + long __sys_res; \ + { \ + register unsigned long __res asm("r28"); \ + LOAD_ARGS_##nr(args) \ + /* FIXME: HACK save/load r19 around syscall */ \ + asm volatile( \ + SAVE_ASM_PIC \ + " ble 0x100(%%sr2, %%r0)\n" \ + " ldi %1, %%r20\n" \ + LOAD_ASM_PIC \ + : "=r" (__res) \ + : "i" (SYS_ify(name)) ASM_ARGS_##nr \ + : "memory", CALL_CLOB_REGS CLOB_ARGS_##nr \ + ); \ + __sys_res = (long)__res; \ + } \ + __sys_res; \ }) + +/* The _NCS variant allows non-constant syscall numbers. */ +#undef INTERNAL_SYSCALL_NCS +#define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \ +({ \ + long __sys_res; \ + { \ + register unsigned long __res asm("r28"); \ + LOAD_ARGS_##nr(args) \ + /* FIXME: HACK save/load r19 around syscall */ \ + asm volatile( \ + SAVE_ASM_PIC \ + " ble 0x100(%%sr2, %%r0)\n" \ + " copy %1, %%r20\n" \ + LOAD_ASM_PIC \ + : "=r" (__res) \ + : "r" (name) ASM_ARGS_##nr \ + : "memory", CALL_CLOB_REGS CLOB_ARGS_##nr \ + ); \ + __sys_res = (long)__res; \ + } \ + __sys_res; \ + }) + + + #define LOAD_ARGS_0() -#define LOAD_ARGS_1(r26) \ - register unsigned long __r26 __asm__("r26") = (unsigned long)(r26); \ - LOAD_ARGS_0() -#define LOAD_ARGS_2(r26,r25) \ - register unsigned long __r25 __asm__("r25") = (unsigned long)(r25); \ - LOAD_ARGS_1(r26) -#define LOAD_ARGS_3(r26,r25,r24) \ - register unsigned long __r24 __asm__("r24") = (unsigned long)(r24); \ - LOAD_ARGS_2(r26,r25) -#define LOAD_ARGS_4(r26,r25,r24,r23) \ - register unsigned long __r23 __asm__("r23") = (unsigned long)(r23); \ - LOAD_ARGS_3(r26,r25,r24) -#define LOAD_ARGS_5(r26,r25,r24,r23,r22) \ - register unsigned long __r22 __asm__("r22") = (unsigned long)(r22); \ - LOAD_ARGS_4(r26,r25,r24,r23) -#define LOAD_ARGS_6(r26,r25,r24,r23,r22,r21) \ - register unsigned long __r21 __asm__("r21") = (unsigned long)(r21); \ - LOAD_ARGS_5(r26,r25,r24,r23,r22) +#define LOAD_ARGS_1(r26) \ + register unsigned long __r26 __asm__("r26") = (unsigned long)(r26); \ + LOAD_ARGS_0() +#define LOAD_ARGS_2(r26,r25) \ + register unsigned long __r25 __asm__("r25") = (unsigned long)(r25); \ + LOAD_ARGS_1(r26) +#define LOAD_ARGS_3(r26,r25,r24) \ + register unsigned long __r24 __asm__("r24") = (unsigned long)(r24); \ + LOAD_ARGS_2(r26,r25) +#define LOAD_ARGS_4(r26,r25,r24,r23) \ + register unsigned long __r23 __asm__("r23") = (unsigned long)(r23); \ + LOAD_ARGS_3(r26,r25,r24) +#define LOAD_ARGS_5(r26,r25,r24,r23,r22) \ + register unsigned long __r22 __asm__("r22") = (unsigned long)(r22); \ + LOAD_ARGS_4(r26,r25,r24,r23) +#define LOAD_ARGS_6(r26,r25,r24,r23,r22,r21) \ + register unsigned long __r21 __asm__("r21") = (unsigned long)(r21); \ + LOAD_ARGS_5(r26,r25,r24,r23,r22) /* Even with zero args we use r20 for the syscall number */ #define ASM_ARGS_0 From 2c2f8f84c7eec39a073ea503ad05bc4671fcad26 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Wed, 24 May 2006 15:31:25 +0000 Subject: [PATCH 3618/4487] 2006-05-24 Carlos O'Donell * sysdeps/hppa/ldsodefs.h: New file. * sysdeps/unix/sysv/linux/hppa/bits/mman.h: Only define MADV_* macros when __USE_BSD is present. (MADV_REMOVE, MADV_DONTFORK, MADV_DOFORK): Define. --- ChangeLog.hppa | 7 ++++ sysdeps/hppa/ldsodefs.h | 42 ++++++++++++++++++++++++ sysdeps/unix/sysv/linux/hppa/bits/mman.h | 22 ++++++++----- 3 files changed, 63 insertions(+), 8 deletions(-) create mode 100644 sysdeps/hppa/ldsodefs.h diff --git a/ChangeLog.hppa b/ChangeLog.hppa index fe73322f4d..4aeaac4b29 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,10 @@ +2006-05-24 Carlos O'Donell + + * sysdeps/hppa/ldsodefs.h: New file. + * sysdeps/unix/sysv/linux/hppa/bits/mman.h: + Only define MADV_* macros when __USE_BSD is present. + (MADV_REMOVE, MADV_DONTFORK, MADV_DOFORK): Define. + 2006-05-15 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/clone.S: Accept extra arguments diff --git a/sysdeps/hppa/ldsodefs.h b/sysdeps/hppa/ldsodefs.h new file mode 100644 index 0000000000..5bd7887265 --- /dev/null +++ b/sysdeps/hppa/ldsodefs.h @@ -0,0 +1,42 @@ +/* Run-time dynamic linker data structures for loaded ELF shared objects. + Copyright (C) 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 + 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 _HPPA_LDSODEFS_H +#define _HPPA_LDSODEFS_H 1 + +#include + +struct La_hppa_regs; +struct La_hppa_retval; + +#define ARCH_PLTENTER_MEMBERS \ + Elf32_Addr (*hppa_gnu_pltenter) (Elf32_Sym *, unsigned int, uintptr_t *, \ + uintptr_t *, struct La_hppa_regs *, \ + unsigned int *, const char *name, \ + long int *framesizep); + +#define ARCH_PLTEXIT_MEMBERS \ + unsigned int (*hppa_gnu_pltexit) (Elf32_Sym *, unsigned int, uintptr_t *, \ + uintptr_t *, \ + const struct La_hppa_regs *, \ + struct La_hppa_retval *, const char *); + +#include_next + +#endif diff --git a/sysdeps/unix/sysv/linux/hppa/bits/mman.h b/sysdeps/unix/sysv/linux/hppa/bits/mman.h index 0b23bd3220..54531ecf28 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/mman.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/mman.h @@ -53,14 +53,20 @@ #define MCL_CURRENT 1 /* lock all current mappings */ #define MCL_FUTURE 2 /* lock all future mappings */ -#define MADV_NORMAL 0 /* no further special treatment */ -#define MADV_RANDOM 1 /* expect random page references */ -#define MADV_SEQUENTIAL 2 /* expect sequential page references */ -#define MADV_WILLNEED 3 /* will need these pages */ -#define MADV_DONTNEED 4 /* dont need these pages */ -#define MADV_SPACEAVAIL 5 /* insure that resources are reserved */ -#define MADV_VPS_PURGE 6 /* Purge pages from VM page cache */ -#define MADV_VPS_INHERIT 7 /* Inherit parents page size */ +/* Advice to "madvise" */ +#ifdef __USE_BSD +# define MADV_NORMAL 0 /* no further special treatment */ +# define MADV_RANDOM 1 /* expect random page references */ +# define MADV_SEQUENTIAL 2 /* expect sequential page references */ +# define MADV_WILLNEED 3 /* will need these pages */ +# define MADV_DONTNEED 4 /* dont need these pages */ +# define MADV_SPACEAVAIL 5 /* insure that resources are reserved */ +# define MADV_VPS_PURGE 6 /* Purge pages from VM page cache */ +# define MADV_VPS_INHERIT 7 /* Inherit parents page size */ +# define MADV_REMOVE 9 /* Remove these pages and resources. */ +# define MADV_DONTFORK 10 /* Do not inherit across fork. */ +# define MADV_DOFORK 11 /* Do inherit across fork. */ +#endif /* The range 12-64 is reserved for page size specification. */ #define MADV_4K_PAGES 12 /* Use 4K pages */ From 31e69e34ab8d63768e2a03b412c975e3c042a4a3 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Wed, 24 May 2006 15:33:28 +0000 Subject: [PATCH 3619/4487] 2006-05-24 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/clone.S: .LerrorRest is a label. --- ChangeLog.hppa | 5 +++++ sysdeps/unix/sysv/linux/hppa/clone.S | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 4aeaac4b29..3097ceb31b 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,8 @@ +2006-05-24 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/clone.S: .LerrorRest + is a label. + 2006-05-24 Carlos O'Donell * sysdeps/hppa/ldsodefs.h: New file. diff --git a/sysdeps/unix/sysv/linux/hppa/clone.S b/sysdeps/unix/sysv/linux/hppa/clone.S index 042ffa5119..1884518a3d 100644 --- a/sysdeps/unix/sysv/linux/hppa/clone.S +++ b/sysdeps/unix/sysv/linux/hppa/clone.S @@ -92,7 +92,7 @@ ENTRY(__clone) bv %r0(%rp) ldwm -64(%sp), %r3 -.LerrorRest +.LerrorRest: /* Restore the PIC register on error */ #ifdef PIC copy %r3, %r19 /* parent */ From 023a0de155889342edede9c86fd53d051d85e577 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Tue, 30 May 2006 15:12:30 +0000 Subject: [PATCH 3620/4487] * sysdeps/unix/sysv/linux/arm/kernel-features.h: Add conditionals for __ASSUME_TRUNCATE64_SYSCALL, __ASSUME_MMAP2_SYSCALL, __ASSUME_STAT64_SYSCALL, __ASSUME_FCNTL64, and __ASSUME_VFORK_SYSCALL. --- ChangeLog.arm | 7 +++++++ sysdeps/unix/sysv/linux/arm/kernel-features.h | 18 ++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/ChangeLog.arm b/ChangeLog.arm index 2db13d01d6..097491f22e 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,10 @@ +2006-05-30 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/arm/kernel-features.h: Add conditionals + for __ASSUME_TRUNCATE64_SYSCALL, __ASSUME_MMAP2_SYSCALL, + __ASSUME_STAT64_SYSCALL, __ASSUME_FCNTL64, and + __ASSUME_VFORK_SYSCALL. + 2006-05-05 Daniel Jacobowitz * sysdeps/unix/sysv/linux/arm/bits/mman.h: Update error message diff --git a/sysdeps/unix/sysv/linux/arm/kernel-features.h b/sysdeps/unix/sysv/linux/arm/kernel-features.h index 6b70f33e9f..6839e87551 100644 --- a/sysdeps/unix/sysv/linux/arm/kernel-features.h +++ b/sysdeps/unix/sysv/linux/arm/kernel-features.h @@ -28,4 +28,22 @@ #define __ASSUME_NEW_GETRLIMIT_SYSCALL 1 #endif +/* On ARM the truncate64/ftruncate64/mmap2/stat64/lstat64/fstat64 + syscalls were introduced in 2.3.35. */ +#if __LINUX_KERNEL_VERSION >= 131875 +# define __ASSUME_TRUNCATE64_SYSCALL 1 +# define __ASSUME_MMAP2_SYSCALL 1 +# define __ASSUME_STAT64_SYSCALL 1 +#endif + +/* Arm got fcntl64 in 2.4.4. */ +#if __LINUX_KERNEL_VERSION >= 132100 +# define __ASSUME_FCNTL64 1 +#endif + +/* The vfork syscall on arm was definitely available in 2.4. */ +#if __LINUX_KERNEL_VERSION >= 132097 && defined __i386__ +# define __ASSUME_VFORK_SYSCALL 1 +#endif + #include_next From e8256668f37af6af3f72738f871cf2b2f0addf19 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Tue, 30 May 2006 15:18:49 +0000 Subject: [PATCH 3621/4487] * sysdeps/arm/dl-machine.h (elf_machine_dynamic): Rewrite to load _GLOBAL_OFFSET_TABLE_ explicitly. --- ChangeLog.arm | 5 +++++ sysdeps/arm/dl-machine.h | 14 ++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 097491f22e..a80313d1e6 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2006-05-30 Daniel Jacobowitz + + * sysdeps/arm/dl-machine.h (elf_machine_dynamic): Rewrite to load + _GLOBAL_OFFSET_TABLE_ explicitly. + 2006-05-30 Daniel Jacobowitz * sysdeps/unix/sysv/linux/arm/kernel-features.h: Add conditionals diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index f176ff1372..5347d8bdbc 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -46,13 +46,19 @@ elf_machine_matches_host (const Elf32_Ehdr *ehdr) /* Return the link-time address of _DYNAMIC. Conveniently, this is the - first element of the GOT. This must be inlined in a function which - uses global data. */ + first element of the GOT. We used to use the PIC register to do this + without a constant pool reference, but GCC 4.2 will use a pseudo-register + for the PIC base, so it may not be in r10. */ static inline Elf32_Addr __attribute__ ((unused)) elf_machine_dynamic (void) { - register Elf32_Addr *got asm ("r10"); - return *got; + Elf32_Addr dynamic; + asm ("ldr %0, 2f\n" + "1: add %0, pc, %0\n" + "b 3f\n" + "2: .word _GLOBAL_OFFSET_TABLE_ - (1b+8)\n" + "3:" : "=r" (dynamic)); + return dynamic; } From 233db6e886ba086e851aae60097ed5b71efac955 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Tue, 30 May 2006 15:31:04 +0000 Subject: [PATCH 3622/4487] * sysdeps/arm/initfini.c: New file. --- ChangeLog.arm | 4 ++++ sysdeps/arm/initfini.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 sysdeps/arm/initfini.c diff --git a/ChangeLog.arm b/ChangeLog.arm index a80313d1e6..0f6d751295 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,7 @@ +2006-05-30 Daniel Jacobowitz + + * sysdeps/arm/initfini.c: New file. + 2006-05-30 Daniel Jacobowitz * sysdeps/arm/dl-machine.h (elf_machine_dynamic): Rewrite to load diff --git a/sysdeps/arm/initfini.c b/sysdeps/arm/initfini.c new file mode 100644 index 0000000000..659ee91401 --- /dev/null +++ b/sysdeps/arm/initfini.c @@ -0,0 +1,42 @@ +/* Special .init and .fini section support. ARM version. + Copyright (C) 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 + 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. + + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + + 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. */ + +/* Prevent this function from being inlined. Otherwise half of its + constant pool will end up in crti and the other half in crtn. */ + +static void call_gmon_start (void) __attribute__((noinline)); + +#include From 37896d398009d61fd904aa4bbc3a90f1c8342226 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Fri, 2 Jun 2006 15:06:07 +0000 Subject: [PATCH 3623/4487] * sysdeps/mips/fpu/feholdexcpt.c: Add libm_hidden_def. * sysdeps/mips/fpu/fesetround.c: Likewise. --- ChangeLog.mips | 5 +++++ sysdeps/mips/fpu/feholdexcpt.c | 2 ++ sysdeps/mips/fpu/fesetround.c | 2 ++ 3 files changed, 9 insertions(+) diff --git a/ChangeLog.mips b/ChangeLog.mips index 2122477a3b..4ab64f370e 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2006-06-02 Joseph Myers + + * sysdeps/mips/fpu/feholdexcpt.c: Add libm_hidden_def. + * sysdeps/mips/fpu/fesetround.c: Likewise. + 2006-05-10 Richard Sandiford Daniel Jacobowitz diff --git a/sysdeps/mips/fpu/feholdexcpt.c b/sysdeps/mips/fpu/feholdexcpt.c index bb37148fff..02ddc1b034 100644 --- a/sysdeps/mips/fpu/feholdexcpt.c +++ b/sysdeps/mips/fpu/feholdexcpt.c @@ -36,3 +36,5 @@ feholdexcept (fenv_t *envp) return 0; } + +libm_hidden_def (feholdexcept) diff --git a/sysdeps/mips/fpu/fesetround.c b/sysdeps/mips/fpu/fesetround.c index af73a720f8..94771092cf 100644 --- a/sysdeps/mips/fpu/fesetround.c +++ b/sysdeps/mips/fpu/fesetround.c @@ -41,3 +41,5 @@ fesetround (int round) return 0; } + +libm_hidden_def (fesetround) From c6e2897b1c2184c975e677d0a670a9e6e7ffa9ec Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Fri, 2 Jun 2006 15:09:39 +0000 Subject: [PATCH 3624/4487] * sysdeps/mips/Makefile (ASFLAGS-.os): Define. --- ChangeLog.mips | 4 ++++ sysdeps/mips/Makefile | 2 ++ 2 files changed, 6 insertions(+) diff --git a/ChangeLog.mips b/ChangeLog.mips index 4ab64f370e..d970dd8b0f 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,7 @@ +2006-06-02 Richard Sandiford + + * sysdeps/mips/Makefile (ASFLAGS-.os): Define. + 2006-06-02 Joseph Myers * sysdeps/mips/fpu/feholdexcpt.c: Add libm_hidden_def. diff --git a/sysdeps/mips/Makefile b/sysdeps/mips/Makefile index 49ad3e1b91..9d01522a37 100644 --- a/sysdeps/mips/Makefile +++ b/sysdeps/mips/Makefile @@ -10,3 +10,5 @@ endif ifeq ($(subdir),rt) librt-sysdep_routines += rt-sysdep endif + +ASFLAGS-.os += $(pic-ccflag) From d7f9cd89c25fb82b6d22b5f31ef55755bd53d61e Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Fri, 2 Jun 2006 15:29:03 +0000 Subject: [PATCH 3625/4487] * sysdeps/unix/sysv/linux/mips/kernel_stat.h (struct kernel_stat): Don't use struct timespec. * sysdeps/unix/sysv/linux/mips/xstatconv.c (__xstat_conv, __xstat64_conv): Copy individual timespec fields. --- ChangeLog.mips | 7 +++++++ sysdeps/unix/sysv/linux/mips/kernel_stat.h | 18 ++++++++++++------ sysdeps/unix/sysv/linux/mips/xstatconv.c | 18 ++++++++++++------ 3 files changed, 31 insertions(+), 12 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index d970dd8b0f..c446ae7a0c 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,10 @@ +2006-06-02 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/kernel_stat.h (struct kernel_stat): + Don't use struct timespec. + * sysdeps/unix/sysv/linux/mips/xstatconv.c (__xstat_conv, + __xstat64_conv): Copy individual timespec fields. + 2006-06-02 Richard Sandiford * sysdeps/mips/Makefile (ASFLAGS-.os): Define. diff --git a/sysdeps/unix/sysv/linux/mips/kernel_stat.h b/sysdeps/unix/sysv/linux/mips/kernel_stat.h index 9de33df263..e785bcd8cf 100644 --- a/sysdeps/unix/sysv/linux/mips/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/mips/kernel_stat.h @@ -16,9 +16,12 @@ struct kernel_stat unsigned int st_rdev; unsigned int __pad2[3]; long long st_size; - struct timespec st_atim; - struct timespec st_mtim; - struct timespec st_ctim; + unsigned int st_atime_sec; + unsigned int st_atime_nsec; + unsigned int st_mtime_sec; + unsigned int st_mtime_nsec; + unsigned int st_ctime_sec; + unsigned int st_ctime_nsec; unsigned int st_blksize; unsigned int __pad3; unsigned long long st_blocks; @@ -37,9 +40,12 @@ struct kernel_stat long int __pad2[2]; long int st_size; long int __pad3; - struct timespec st_atim; - struct timespec st_mtim; - struct timespec st_ctim; + unsigned int st_atime_sec; + unsigned int st_atime_nsec; + unsigned int st_mtime_sec; + unsigned int st_mtime_nsec; + unsigned int st_ctime_sec; + unsigned int st_ctime_nsec; long int st_blksize; long int st_blocks; char st_fstype[16]; /* Filesystem type name, unsupported */ diff --git a/sysdeps/unix/sysv/linux/mips/xstatconv.c b/sysdeps/unix/sysv/linux/mips/xstatconv.c index a2c8e84c4f..ccab6b6a79 100644 --- a/sysdeps/unix/sysv/linux/mips/xstatconv.c +++ b/sysdeps/unix/sysv/linux/mips/xstatconv.c @@ -62,9 +62,12 @@ __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf) buf->st_blksize = kbuf->st_blksize; buf->st_blocks = kbuf->st_blocks; - buf->st_atim = kbuf->st_atim; - buf->st_mtim = kbuf->st_mtim; - buf->st_ctim = kbuf->st_ctim; + buf->st_atim.tv_sec = kbuf->st_atime_sec; + buf->st_atim.tv_nsec = kbuf->st_atime_nsec; + buf->st_mtim.tv_sec = kbuf->st_mtime_sec; + buf->st_mtim.tv_nsec = kbuf->st_mtime_nsec; + buf->st_ctim.tv_sec = kbuf->st_ctime_sec; + buf->st_ctim.tv_nsec = kbuf->st_ctime_nsec; buf->st_pad5[0] = 0; buf->st_pad5[1] = 0; buf->st_pad5[2] = 0; buf->st_pad5[3] = 0; @@ -107,9 +110,12 @@ __xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf) buf->st_blksize = kbuf->st_blksize; buf->st_blocks = kbuf->st_blocks; - buf->st_atim = kbuf->st_atim; - buf->st_mtim = kbuf->st_mtim; - buf->st_ctim = kbuf->st_ctim; + buf->st_atim.tv_sec = kbuf->st_atime_sec; + buf->st_atim.tv_nsec = kbuf->st_atime_nsec; + buf->st_mtim.tv_sec = kbuf->st_mtime_sec; + buf->st_mtim.tv_nsec = kbuf->st_mtime_nsec; + buf->st_ctim.tv_sec = kbuf->st_ctime_sec; + buf->st_ctim.tv_nsec = kbuf->st_ctime_nsec; buf->st_pad4[0] = 0; buf->st_pad4[1] = 0; buf->st_pad4[2] = 0; buf->st_pad4[3] = 0; From bd34510699e36cad3a44d28c55b88556bee916ee Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Fri, 2 Jun 2006 15:37:27 +0000 Subject: [PATCH 3626/4487] * sysdeps/unix/sysv/linux/mips/bits/resource.h (RLIM_INFINITY, RLIM64_INFINITY): Define appropriately for N64. Use unsigned types. --- ChangeLog.mips | 6 ++++++ sysdeps/unix/sysv/linux/mips/bits/resource.h | 22 +++++++++++++------- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index c446ae7a0c..6263540c1c 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,9 @@ +2006-06-02 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/resource.h (RLIM_INFINITY, + RLIM64_INFINITY): Define appropriately for N64. Use unsigned + types. + 2006-06-02 Joseph Myers * sysdeps/unix/sysv/linux/mips/kernel_stat.h (struct kernel_stat): diff --git a/sysdeps/unix/sysv/linux/mips/bits/resource.h b/sysdeps/unix/sysv/linux/mips/bits/resource.h index 9e99f5d5db..1c8b99a93d 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/resource.h +++ b/sysdeps/unix/sysv/linux/mips/bits/resource.h @@ -107,14 +107,22 @@ enum __rlimit_resource }; /* Value to indicate that there is no limit. */ -#ifndef __USE_FILE_OFFSET64 -# define RLIM_INFINITY ((long int)(~0UL >> 1)) +#if _MIPS_SIM == _ABI64 +/* The N64 syscall uses this value. */ +# define RLIM_INFINITY 0xffffffffffffffffUL +# ifdef __USE_LARGEFILE64 +# define RLIM64_INFINITY 0xffffffffffffffffUL +# endif #else -# define RLIM_INFINITY 0x7fffffffffffffffLL -#endif - -#ifdef __USE_LARGEFILE64 -# define RLIM64_INFINITY 0x7fffffffffffffffLL +/* The O32 and N32 syscalls use 0x7fffffff. */ +# ifndef __USE_FILE_OFFSET64 +# define RLIM_INFINITY ((long int)(~0UL >> 1)) +# else +# define RLIM_INFINITY 0x7fffffffffffffffULL +# endif +# ifdef __USE_LARGEFILE64 +# define RLIM64_INFINITY 0x7fffffffffffffffULL +# endif #endif /* We can represent all limits. */ From b395a209f1ca12550371b2bcef1f7e0ef3cee085 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Thu, 8 Jun 2006 17:16:08 +0000 Subject: [PATCH 3627/4487] * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Reformat. (SPLICE_F_MOVE, SPLICE_F_NONBLOCK, SPLICE_F_MORE, SPLICE_F_GIFT): Define. --- ChangeLog.arm | 6 ++ sysdeps/unix/sysv/linux/arm/bits/fcntl.h | 76 +++++++++++++----------- 2 files changed, 48 insertions(+), 34 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 0f6d751295..5d2b051cb8 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,9 @@ +2006-06-08 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Reformat. + (SPLICE_F_MOVE, SPLICE_F_NONBLOCK, SPLICE_F_MORE, SPLICE_F_GIFT): + Define. + 2006-05-30 Daniel Jacobowitz * sysdeps/arm/initfini.c: New file. diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h index 54510a3fcc..287dbd56f7 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h @@ -21,38 +21,34 @@ # error "Never use directly; include instead." #endif - #include #ifdef __USE_GNU # include #endif + /* open/fcntl - O_SYNC is only implemented on blocks devices and on files located on an ext2 file system */ -#define O_ACCMODE 0003 -#define O_RDONLY 00 -#define O_WRONLY 01 -#define O_RDWR 02 -#define O_CREAT 0100 /* not fcntl */ -#define O_EXCL 0200 /* not fcntl */ -#define O_NOCTTY 0400 /* not fcntl */ -#define O_TRUNC 01000 /* not fcntl */ -#define O_APPEND 02000 -#define O_NONBLOCK 04000 +#define O_ACCMODE 0003 +#define O_RDONLY 00 +#define O_WRONLY 01 +#define O_RDWR 02 +#define O_CREAT 0100 /* not fcntl */ +#define O_EXCL 0200 /* not fcntl */ +#define O_NOCTTY 0400 /* not fcntl */ +#define O_TRUNC 01000 /* not fcntl */ +#define O_APPEND 02000 +#define O_NONBLOCK 04000 #define O_NDELAY O_NONBLOCK -#define O_SYNC 010000 -#define O_FSYNC O_SYNC -#define O_ASYNC 020000 +#define O_SYNC 010000 +#define O_FSYNC O_SYNC +#define O_ASYNC 020000 #ifdef __USE_GNU -# define O_DIRECTORY 040000 /* Must be a directory. */ +# define O_DIRECTORY 040000 /* Must be a directory. */ # define O_NOFOLLOW 0100000 /* Do not follow links. */ # define O_DIRECT 0200000 /* Direct disk access. */ -# define O_NOATIME 01000000 /* Do not set atime. */ -#endif - -#ifdef __USE_LARGEFILE64 -# define O_LARGEFILE 0400000 +# define O_NOATIME 01000000 /* Do not set atime. */ #endif /* For now Linux has synchronisity options for data and read operations. @@ -63,13 +59,16 @@ # define O_RSYNC O_SYNC /* Synchronize read operations. */ #endif +#ifdef __USE_LARGEFILE64 +# define O_LARGEFILE 0400000 +#endif + /* Values for the second argument to `fcntl'. */ #define F_DUPFD 0 /* Duplicate file descriptor. */ #define F_GETFD 1 /* Get file descriptor flags. */ #define F_SETFD 2 /* Set file descriptor flags. */ #define F_GETFL 3 /* Get file status flags. */ #define F_SETFL 4 /* Set file status flags. */ - #ifndef __USE_FILE_OFFSET64 # define F_GETLK 5 /* Get record locking info. */ # define F_SETLK 6 /* Set record locking info (non-blocking). */ @@ -107,12 +106,12 @@ #define F_WRLCK 1 /* Write lock. */ #define F_UNLCK 2 /* Remove lock. */ -/* for old implementation of bsd flock () */ +/* For old implementation of bsd flock(). */ #define F_EXLCK 4 /* or 3 */ #define F_SHLCK 8 /* or 4 */ #ifdef __USE_BSD -/* Operations for bsd flock(), also used by the kernel implementation */ +/* Operations for bsd flock(), also used by the kernel implementation. */ # define LOCK_SH 1 /* shared lock */ # define LOCK_EX 2 /* exclusive lock */ # define LOCK_NB 4 /* or'd with one of the above to prevent @@ -185,15 +184,24 @@ struct flock64 #ifdef __USE_GNU -# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages - in the range before performing the - write. */ -# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those - dirty pages in the range which are - not presently under writeback. */ -# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in - the range after performing the - write. */ +/* 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. */ +# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those + dirty pages in the range which are + not presently under writeback. */ +# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in + the range after performing the + write. */ + +/* 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 @@ -207,12 +215,12 @@ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count) /* Selective file content synch'ing. */ extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to, - unsigned int __flags); + unsigned int __flags); /* Splice address range into a pipe. */ extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count, - unsigned int __flags); + unsigned int __flags); /* Splice two files together. */ extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags) From 02678e17f963cc353042e368369ac4242360b416 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Thu, 8 Jun 2006 17:16:29 +0000 Subject: [PATCH 3628/4487] * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Reformat. (SPLICE_F_MOVE, SPLICE_F_NONBLOCK, SPLICE_F_MORE, SPLICE_F_GIFT): Define. --- ChangeLog.mips | 6 ++ sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 88 ++++++++++++----------- 2 files changed, 54 insertions(+), 40 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 6263540c1c..16e092fd4e 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,9 @@ +2006-06-08 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Reformat. + (SPLICE_F_MOVE, SPLICE_F_NONBLOCK, SPLICE_F_MORE, SPLICE_F_GIFT): + Define. + 2006-06-02 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/resource.h (RLIM_INFINITY, diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index e7aae60510..b6672b7514 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -18,7 +18,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#ifndef _FCNTL_H +#ifndef _FCNTL_H # error "Never use directly; include instead." #endif @@ -31,23 +31,20 @@ /* open/fcntl - O_SYNC is only implemented on blocks devices and on files located on an ext2 file system */ -#define O_ACCMODE 0x0003 -#define O_RDONLY 0x0000 -#define O_WRONLY 0x0001 -#define O_RDWR 0x0002 -#define O_APPEND 0x0008 -#define O_SYNC 0x0010 -#define O_NONBLOCK 0x0080 -#define O_CREAT 0x0100 /* not fcntl */ -#define O_TRUNC 0x0200 /* not fcntl */ -#define O_EXCL 0x0400 /* not fcntl */ -#define O_NOCTTY 0x0800 /* not fcntl */ -#define O_FSYNC O_SYNC -#define O_ASYNC 0x1000 - -#ifdef __USE_LARGEFILE64 -# define O_LARGEFILE 0x2000 /* Allow large file opens. */ -#endif +#define O_ACCMODE 0003 +#define O_RDONLY 00 +#define O_WRONLY 01 +#define O_RDWR 02 +#define O_APPEND 0x0008 +#define O_SYNC 0x0010 +#define O_NONBLOCK 0x0080 +#define O_NDELAY O_NONBLOCK +#define O_CREAT 0x0100 /* not fcntl */ +#define O_TRUNC 0x0200 /* not fcntl */ +#define O_EXCL 0x0400 /* not fcntl */ +#define O_NOCTTY 0x0800 /* not fcntl */ +#define O_FSYNC O_SYNC +#define O_ASYNC 0x1000 #ifdef __USE_GNU # define O_NOFOLLOW 0x20000 /* Do not follow links. */ @@ -56,16 +53,18 @@ # define O_NOATIME 0x40000 /* Do not set atime. */ #endif -#define O_NDELAY O_NONBLOCK - -/* For now Linux has no synchronisity options for data and read - operations. We define the symbols here but let them do the same as - O_SYNC since this is a superset. */ +/* For now Linux has no synchronisity options for data and read operations. + We define the symbols here but let them do the same as O_SYNC since + this is a superset. */ #if defined __USE_POSIX199309 || defined __USE_UNIX98 # define O_DSYNC O_SYNC /* Synchronize data. */ # define O_RSYNC O_SYNC /* Synchronize read operations. */ #endif +#ifdef __USE_LARGEFILE64 +# define O_LARGEFILE 0x2000 /* Allow large file opens. */ +#endif + /* Values for the second argument to `fcntl'. */ #define F_DUPFD 0 /* Duplicate file descriptor. */ #define F_GETFD 1 /* Get file descriptor flags. */ @@ -102,7 +101,7 @@ # define F_NOTIFY 1026 /* Request notfications on a directory. */ #endif -/* for F_[GET|SET]FL */ +/* For F_[GET|SET]FL. */ #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ /* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */ @@ -110,12 +109,12 @@ #define F_WRLCK 1 /* Write lock. */ #define F_UNLCK 2 /* Remove lock. */ -/* for old implementation of bsd flock () */ +/* For old implementation of bsd flock(). */ #define F_EXLCK 4 /* or 3 */ #define F_SHLCK 8 /* or 4 */ #ifdef __USE_BSD -/* Operations for bsd flock(), also used by the kernel implementation */ +/* Operations for bsd flock(), also used by the kernel implementation. */ # define LOCK_SH 1 /* shared lock */ # define LOCK_EX 2 /* exclusive lock */ # define LOCK_NB 4 /* or'd with one of the above to prevent @@ -141,7 +140,7 @@ # define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */ #endif -typedef struct flock +struct flock { short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ @@ -163,7 +162,8 @@ typedef struct flock flock in o32 and n32, never has this field. */ long int pad[4]; #endif -} flock_t; + }; +typedef struct flock flock_t; #ifdef __USE_LARGEFILE64 struct flock64 @@ -176,7 +176,6 @@ struct flock64 }; #endif - /* Define some more compatibility macros to be backward compatible with BSD systems which did not managed to hide these kernel macros. */ #ifdef __USE_BSD @@ -199,15 +198,24 @@ struct flock64 #ifdef __USE_GNU -# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages - in the range before performing the - write. */ -# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those - dirty pages in the range which are - not presently under writeback. */ -# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in - the range after performing the - write. */ +/* 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. */ +# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those + dirty pages in the range which are + not presently under writeback. */ +# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in + the range after performing the + write. */ + +/* 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 @@ -221,12 +229,12 @@ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count) /* Selective file content synch'ing. */ extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to, - unsigned int __flags); + unsigned int __flags); /* Splice address range into a pipe. */ extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count, - unsigned int __flags); + unsigned int __flags); /* Splice two files together. */ extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags) From f5b8dd54a664c3b9c64a238093a8bfaa74e07d3e Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Thu, 8 Jun 2006 17:38:55 +0000 Subject: [PATCH 3629/4487] * sysdeps/arm/nptl/pthreaddef.h (CURRENT_STACK_FRAME): Add -12. --- ChangeLog.arm | 4 ++++ sysdeps/arm/nptl/pthreaddef.h | 12 ++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 5d2b051cb8..c76374c2c6 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,7 @@ +2006-06-08 Mark Shinwell + + * sysdeps/arm/nptl/pthreaddef.h (CURRENT_STACK_FRAME): Add -12. + 2006-06-08 Daniel Jacobowitz * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Reformat. diff --git a/sysdeps/arm/nptl/pthreaddef.h b/sysdeps/arm/nptl/pthreaddef.h index 783828a400..b1a06cd1e6 100644 --- a/sysdeps/arm/nptl/pthreaddef.h +++ b/sysdeps/arm/nptl/pthreaddef.h @@ -30,8 +30,16 @@ #define TCB_ALIGNMENT 16 -/* Location of current stack frame. */ -#define CURRENT_STACK_FRAME __builtin_frame_address (0) +/* Location of current stack frame. + + __builtin_frame_address (0) returns the value of the hard frame + pointer, which will point at the location of the saved PC on the + stack. Below this in memory is the remainder of the linkage info, + occupying 12 bytes. Therefore in order to address from + CURRENT_STACK_FRAME using "struct layout", we need to have the macro + return the hard FP minus 12. Of course, this makes no sense + without the obsolete APCS stack layout... */ +#define CURRENT_STACK_FRAME (__builtin_frame_address (0) - 12) /* XXX Until we have a better place keep the definitions here. */ From 26be3bf7dea3c9afd39409f870c5a44dad8ba2c4 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Fri, 9 Jun 2006 00:48:17 +0000 Subject: [PATCH 3630/4487] 2006-06-08 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h: Reformat (SPLICE_F_MOVE, SPLICE_F_NONBLOCK, SPLICE_F_MORE, SPLICE_F_GIFT): Define. --- ChangeLog.hppa | 6 ++++++ sysdeps/unix/sysv/linux/hppa/bits/fcntl.h | 17 ++++++++++++----- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 3097ceb31b..32f0f3f045 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,9 @@ +2006-06-08 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h: Reformat + (SPLICE_F_MOVE, SPLICE_F_NONBLOCK, SPLICE_F_MORE, SPLICE_F_GIFT): + Define. + 2006-05-24 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/clone.S: .LerrorRest diff --git a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h index e2bf526711..fc7075841b 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h @@ -46,10 +46,10 @@ #ifdef __USE_GNU -# define O_DIRECT 00040000 /* direct disk access hint - currently ignored */ -# define O_DIRECTORY 00010000 /* must be a directory */ -# define O_NOFOLLOW 00000200 /* don't follow links */ -# define O_NOATIME 04000000 /* Do not set atime. */ +# define O_DIRECT 00040000 /* Direct disk access. */ +# define O_DIRECTORY 00010000 /* Must be a directory. */ +# define O_NOFOLLOW 00000200 /* Do not follow links. */ +# define O_NOATIME 04000000 /* Do not set atime. */ #endif #ifdef __USE_LARGEFILE64 @@ -76,7 +76,6 @@ # define F_SETLK F_SETLK64 /* Set record locking info (non-blocking). */ # define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */ #endif - #define F_GETLK64 8 /* Get record locking info. */ #define F_SETLK64 9 /* Set record locking info (non-blocking). */ #define F_SETLKW64 10 /* Set record locking info (blocking). */ @@ -184,6 +183,14 @@ struct flock64 # define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in the range after performing the write. */ + +/* 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 From 6752404e779e38f9a125fe43339b6993073b1e4a Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Fri, 9 Jun 2006 01:25:30 +0000 Subject: [PATCH 3631/4487] 2006-06-08 Carlos O'Donell * sysdeps/hppa/hppa1.1/Implies: Remove ieee754/ldbl-128. * sysdeps/unix/sysv/linux/hppa/kernel-features.h [__LINUX_KERNEL_VERSION >= 0x020609]: Define __ASSUME_LWS_CAS. * sysdeps/unix/sysv/linux/hppa/bits/atomic.h: New file. --- ChangeLog.hppa | 7 + sysdeps/hppa/hppa1.1/Implies | 1 - sysdeps/unix/sysv/linux/hppa/bits/atomic.h | 120 ++++++++++++++++++ .../unix/sysv/linux/hppa/kernel-features.h | 5 + 4 files changed, 132 insertions(+), 1 deletion(-) create mode 100644 sysdeps/unix/sysv/linux/hppa/bits/atomic.h diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 32f0f3f045..9373705784 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,10 @@ +2006-06-08 Carlos O'Donell + + * sysdeps/hppa/hppa1.1/Implies: Remove ieee754/ldbl-128. + * sysdeps/unix/sysv/linux/hppa/kernel-features.h + [__LINUX_KERNEL_VERSION >= 0x020609]: Define __ASSUME_LWS_CAS. + * sysdeps/unix/sysv/linux/hppa/bits/atomic.h: New file. + 2006-06-08 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h: Reformat diff --git a/sysdeps/hppa/hppa1.1/Implies b/sysdeps/hppa/hppa1.1/Implies index 5f935a299c..780c4e2467 100644 --- a/sysdeps/hppa/hppa1.1/Implies +++ b/sysdeps/hppa/hppa1.1/Implies @@ -1,4 +1,3 @@ wordsize-32 ieee754/flt-32 ieee754/dbl-64 -ieee754/ldbl-128 diff --git a/sysdeps/unix/sysv/linux/hppa/bits/atomic.h b/sysdeps/unix/sysv/linux/hppa/bits/atomic.h new file mode 100644 index 0000000000..36a540728e --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/bits/atomic.h @@ -0,0 +1,120 @@ +/* Copyright (C) 2003 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Carlos O'Donell , 2005. + + 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. */ + +#include +#include +#include +#include + +/* We need EFAULT, ENONSYS, and EAGAIN */ +#if !defined EFAULT && !defined ENOSYS && !defined EAGAIN +#undef EFAULT +#undef ENOSYS +#undef EAGAIN +#define EFAULT 14 +#define ENOSYS 251 +#define EAGAIN 11 +#endif + +#ifndef _BITS_ATOMIC_H +#define _BITS_ATOMIC_H 1 + +typedef int8_t atomic8_t; +typedef uint8_t uatomic8_t; +typedef int_fast8_t atomic_fast8_t; +typedef uint_fast8_t uatomic_fast8_t; + +typedef int32_t atomic32_t; +typedef uint32_t uatomic32_t; +typedef int_fast32_t atomic_fast32_t; +typedef uint_fast32_t uatomic_fast32_t; + +typedef intptr_t atomicptr_t; +typedef uintptr_t uatomicptr_t; +typedef intmax_t atomic_max_t; +typedef uintmax_t uatomic_max_t; + +/* prev = *addr; + if (prev == old) + *addr = new; + return prev; */ + +/* Use the kernel atomic light weight syscalls on hppa */ +#define LWS "0xb0" +#define LWS_CAS 0x0 +/* Note r31 is the link register */ +#define LWS_CLOBBER "r1", "r26", "r25", "r24", "r23", "r22", "r21", "r20", "r28", "r31", "memory" +#define ASM_EAGAIN "11" + +#if __ASSUME_LWS_CAS +/* The only basic operation needed is compare and exchange. */ +# define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \ + ({ \ + volatile int lws_errno = EFAULT; \ + volatile int lws_ret = 0xdeadbeef; \ + asm volatile( \ + "0: \n\t" \ + "copy %3, %%r26 \n\t" \ + "copy %4, %%r25 \n\t" \ + "copy %5, %%r24 \n\t" \ + "ble " LWS "(%%sr2, %%r0) \n\t" \ + "ldi 0, %%r20 \n\t" \ + "cmpib,=,n " ASM_EAGAIN ",%%r21,0 \n\t" \ + "nop \n\t" \ + "stw %%r28, %0 \n\t" \ + "sub %%r0, %%r21, %%r21 \n\t" \ + "stw %%r21, %1 \n\t" \ + : "=m" (lws_ret), "=m" (lws_errno), "=m" (*mem) \ + : "r" (mem), "r" (oldval), "r" (newval) \ + : LWS_CLOBBER \ + ); \ + \ + if(lws_errno == EFAULT || lws_errno == ENOSYS) \ + ABORT_INSTRUCTION; \ + \ + lws_ret; \ + }) + +# define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \ + ({ \ + int ret; \ + ret = atomic_compare_and_exchange_val_acq(mem, newval, oldval); \ + /* Return 1 if it was already acquired */ \ + (ret != oldval); \ + }) +#else +/* Non-atomic primitives. */ +# define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \ + ({ __typeof (mem) __gmemp = (mem); \ + __typeof (*mem) __gret = *__gmemp; \ + __typeof (*mem) __gnewval = (newval); \ + \ + if (__gret == (oldval)) \ + *__gmemp = __gnewval; \ + __gret; }) + +# define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \ + ({ __typeof (mem) __gmemp = (mem); \ + __typeof (*mem) __gnewval = (newval); \ + \ + *__gmemp == (oldval) ? (*__gmemp = __gnewval, 0) : 1; }) +#endif + +#endif /* bits/atomic.h */ + diff --git a/sysdeps/unix/sysv/linux/hppa/kernel-features.h b/sysdeps/unix/sysv/linux/hppa/kernel-features.h index 2fd416321b..e29f6e0c2f 100644 --- a/sysdeps/unix/sysv/linux/hppa/kernel-features.h +++ b/sysdeps/unix/sysv/linux/hppa/kernel-features.h @@ -31,4 +31,9 @@ #define __ASSUME_FCNTL64 1 #define __ASSUME_GETDENTS64_SYSCALL 1 +/* PA-RISC 2.6.9 kernels had the first LWS CAS support */ +#if __LINUX_KERNEL_VERSION >= 0x020609 +# define __ASSUME_LWS_CAS 1 +#endif + #include_next From 3dff8d29780b563648c31c3d4a3f2902916d29dc Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Wed, 5 Jul 2006 16:46:20 +0000 Subject: [PATCH 3632/4487] * sysdeps/arm/dl-machine.h (elf_machine_dynamic): Correct GOT access to load the _DYNAMIC slot. --- ChangeLog.arm | 5 +++++ sysdeps/arm/dl-machine.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index c76374c2c6..d8ba24758d 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2006-07-05 Daniel Jacobowitz + + * sysdeps/arm/dl-machine.h (elf_machine_dynamic): Correct GOT access to + load the _DYNAMIC slot. + 2006-06-08 Mark Shinwell * sysdeps/arm/nptl/pthreaddef.h (CURRENT_STACK_FRAME): Add -12. diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 5347d8bdbc..ff8a170668 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -54,7 +54,7 @@ elf_machine_dynamic (void) { Elf32_Addr dynamic; asm ("ldr %0, 2f\n" - "1: add %0, pc, %0\n" + "1: ldr %0, [pc, %0]\n" "b 3f\n" "2: .word _GLOBAL_OFFSET_TABLE_ - (1b+8)\n" "3:" : "=r" (dynamic)); From 7a11d626a73689f554fd315987e989e4725538ec Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Wed, 5 Jul 2006 16:58:01 +0000 Subject: [PATCH 3633/4487] * sysdeps/unix/sysv/linux/arm/sys/ucontext.h: Include . (NGREG, mcontext_t, struct ucontext): Update to match the kernel. --- ChangeLog.arm | 6 ++++++ sysdeps/unix/sysv/linux/arm/sys/ucontext.h | 25 ++++++++++++---------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index d8ba24758d..7e0d19c89d 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,9 @@ +2006-07-05 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/arm/sys/ucontext.h: Include + . + (NGREG, mcontext_t, struct ucontext): Update to match the kernel. + 2006-07-05 Daniel Jacobowitz * sysdeps/arm/dl-machine.h (elf_machine_dynamic): Correct GOT access to diff --git a/sysdeps/unix/sysv/linux/arm/sys/ucontext.h b/sysdeps/unix/sysv/linux/arm/sys/ucontext.h index 6d6c8e3990..9ecff7b595 100644 --- a/sysdeps/unix/sysv/linux/arm/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/arm/sys/ucontext.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999, 2001, 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 @@ -25,10 +25,14 @@ #include #include +/* We need the signal context definitions even if they are not used + included in . */ +#include + typedef int greg_t; /* Number of general registers. */ -#define NGREG 16 +#define NGREG 18 /* Container for all general registers. */ typedef elf_gregset_t gregset_t; @@ -73,22 +77,21 @@ enum /* Structure to describe FPU registers. */ typedef elf_fpregset_t fpregset_t; -/* Context to describe whole processor state. */ -typedef struct - { - gregset_t gregs; - fpregset_t fpregs; - } mcontext_t; +/* Context to describe whole processor state. This only describes + the core registers; coprocessor registers get saved elsewhere + (e.g. in uc_regspace, or somewhere unspecified on the stack + during non-RT signal handlers). */ +typedef struct sigcontext mcontext_t; /* Userlevel context. */ typedef struct ucontext { - unsigned long int uc_flags; + unsigned long uc_flags; struct ucontext *uc_link; - __sigset_t uc_sigmask; stack_t uc_stack; mcontext_t uc_mcontext; - long int uc_filler[5]; + __sigset_t uc_sigmask; + unsigned long uc_regspace[128] __attribute__((__aligned__(8))); } ucontext_t; #endif /* sys/ucontext.h */ From b725f54b9a513d5363ca2c350cbcf48a69eb984d Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Thu, 13 Jul 2006 16:24:19 +0000 Subject: [PATCH 3634/4487] 2006-07-13 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/Versions: new errlist compat entry for up to 256 errnos --- ChangeLog.hppa | 5 +++++ sysdeps/unix/sysv/linux/hppa/Versions | 3 +++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 9373705784..7355ee9721 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,8 @@ +2006-07-13 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/Versions: new errlist compat entry + for up to 256 errnos + 2006-06-08 Carlos O'Donell * sysdeps/hppa/hppa1.1/Implies: Remove ieee754/ldbl-128. diff --git a/sysdeps/unix/sysv/linux/hppa/Versions b/sysdeps/unix/sysv/linux/hppa/Versions index e15c8225fb..26eed69eb8 100644 --- a/sysdeps/unix/sysv/linux/hppa/Versions +++ b/sysdeps/unix/sysv/linux/hppa/Versions @@ -16,6 +16,9 @@ libc { #errlist-compat 254 _sys_errlist; sys_errlist; _sys_nerr; sys_nerr; } + GLIBC_2.4 { + #errlist-compat 256 + _sys_errlist; sys_errlist; _sys_nerr; sys_nerr; } librt { GLIBC_2.3 { From da1ea0f056beb5dc32a52bdf228bf058230a76b7 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Fri, 14 Jul 2006 13:51:24 +0000 Subject: [PATCH 3635/4487] 2006-07-13 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/xstat.c: New file. * sysdeps/unix/sysv/linux/hppa/lxstat.c: Likewise. * sysdeps/unix/sysv/linux/hppa/fxstat.c: Likewise. * sysdeps/unix/sysv/linux/hppa/fxstatat.c: Likewise. 2006-07-13 Carlos O'Donell * sysdeps/hppa/nptl/Makefile: New file * sysdeps/hppa/nptl/jmpbuf-unwind.h: Likewise * sysdeps/hppa/nptl/pthread_spin_lock.c: Likewise * sysdeps/hppa/nptl/pthread_spin_trylock.c: Likewise * sysdeps/hppa/nptl/pthread_spin_unlock.c: Likewise * sysdeps/hppa/nptl/pthreaddef.h: Likewise * sysdeps/hppa/nptl/tcb-offsets.sym: Likewise * sysdeps/hppa/nptl/tls.h: Likewise * sysdeps/unix/sysv/linux/hppa/nptl/bits: Likewise * sysdeps/unix/sysv/linux/hppa/nptl/createthread.c: Likewise * sysdeps/unix/sysv/linux/hppa/nptl/fork.c: Likewise * sysdeps/unix/sysv/linux/hppa/nptl/internaltypes.h: Likewise * sysdeps/unix/sysv/linux/hppa/nptl/libc-lowlevellock.c: Likewise * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c: Likewise * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: Likewise * sysdeps/unix/sysv/linux/hppa/nptl/pt-initfini.c: Likewise * sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S: Likewise * sysdeps/unix/sysv/linux/hppa/nptl/pthread_once.c: Likewise * sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h: Likewise * sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c: Likewise * sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c: Likewise --- ChangeLog.hppa | 31 ++ sysdeps/hppa/nptl/Makefile | 21 ++ sysdeps/hppa/nptl/jmpbuf-unwind.h | 31 ++ sysdeps/hppa/nptl/pthread_spin_lock.c | 38 ++ sysdeps/hppa/nptl/pthread_spin_trylock.c | 34 ++ sysdeps/hppa/nptl/pthread_spin_unlock.c | 36 ++ sysdeps/hppa/nptl/pthreaddef.h | 40 +++ sysdeps/hppa/nptl/tcb-offsets.sym | 18 + sysdeps/hppa/nptl/tls.h | 151 ++++++++ sysdeps/unix/sysv/linux/hppa/fxstat.c | 1 + sysdeps/unix/sysv/linux/hppa/fxstatat.c | 1 + sysdeps/unix/sysv/linux/hppa/lxstat.c | 1 + .../sysv/linux/hppa/nptl/bits/pthreadtypes.h | 192 ++++++++++ .../sysv/linux/hppa/nptl/bits/semaphore.h | 39 ++ .../unix/sysv/linux/hppa/nptl/createthread.c | 23 ++ sysdeps/unix/sysv/linux/hppa/nptl/fork.c | 34 ++ .../unix/sysv/linux/hppa/nptl/internaltypes.h | 153 ++++++++ .../sysv/linux/hppa/nptl/libc-lowlevellock.c | 21 ++ .../unix/sysv/linux/hppa/nptl/lowlevellock.c | 130 +++++++ .../unix/sysv/linux/hppa/nptl/lowlevellock.h | 336 ++++++++++++++++++ .../unix/sysv/linux/hppa/nptl/pt-initfini.c | 109 ++++++ sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S | 90 +++++ .../unix/sysv/linux/hppa/nptl/pthread_once.c | 94 +++++ .../unix/sysv/linux/hppa/nptl/sysdep-cancel.h | 217 +++++++++++ .../linux/hppa/nptl/unwind-forcedunwind.c | 21 ++ .../unix/sysv/linux/hppa/nptl/unwind-resume.c | 21 ++ sysdeps/unix/sysv/linux/hppa/xstat.c | 1 + 27 files changed, 1884 insertions(+) create mode 100644 sysdeps/hppa/nptl/Makefile create mode 100644 sysdeps/hppa/nptl/jmpbuf-unwind.h create mode 100644 sysdeps/hppa/nptl/pthread_spin_lock.c create mode 100644 sysdeps/hppa/nptl/pthread_spin_trylock.c create mode 100644 sysdeps/hppa/nptl/pthread_spin_unlock.c create mode 100644 sysdeps/hppa/nptl/pthreaddef.h create mode 100644 sysdeps/hppa/nptl/tcb-offsets.sym create mode 100644 sysdeps/hppa/nptl/tls.h create mode 100644 sysdeps/unix/sysv/linux/hppa/fxstat.c create mode 100644 sysdeps/unix/sysv/linux/hppa/fxstatat.c create mode 100644 sysdeps/unix/sysv/linux/hppa/lxstat.c create mode 100644 sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h create mode 100644 sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h create mode 100644 sysdeps/unix/sysv/linux/hppa/nptl/createthread.c create mode 100644 sysdeps/unix/sysv/linux/hppa/nptl/fork.c create mode 100644 sysdeps/unix/sysv/linux/hppa/nptl/internaltypes.h create mode 100644 sysdeps/unix/sysv/linux/hppa/nptl/libc-lowlevellock.c create mode 100644 sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c create mode 100644 sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h create mode 100644 sysdeps/unix/sysv/linux/hppa/nptl/pt-initfini.c create mode 100644 sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S create mode 100644 sysdeps/unix/sysv/linux/hppa/nptl/pthread_once.c create mode 100644 sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h create mode 100644 sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c create mode 100644 sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c create mode 100644 sysdeps/unix/sysv/linux/hppa/xstat.c diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 7355ee9721..076ce1ffa8 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,5 +1,36 @@ 2006-07-13 Carlos O'Donell + * sysdeps/unix/sysv/linux/hppa/xstat.c: New file. + * sysdeps/unix/sysv/linux/hppa/lxstat.c: Likewise. + * sysdeps/unix/sysv/linux/hppa/fxstat.c: Likewise. + * sysdeps/unix/sysv/linux/hppa/fxstatat.c: Likewise. + +2006-07-13 Carlos O'Donell + + * sysdeps/hppa/nptl/Makefile: New file + * sysdeps/hppa/nptl/jmpbuf-unwind.h: Likewise + * sysdeps/hppa/nptl/pthread_spin_lock.c: Likewise + * sysdeps/hppa/nptl/pthread_spin_trylock.c: Likewise + * sysdeps/hppa/nptl/pthread_spin_unlock.c: Likewise + * sysdeps/hppa/nptl/pthreaddef.h: Likewise + * sysdeps/hppa/nptl/tcb-offsets.sym: Likewise + * sysdeps/hppa/nptl/tls.h: Likewise + * sysdeps/unix/sysv/linux/hppa/nptl/bits: Likewise + * sysdeps/unix/sysv/linux/hppa/nptl/createthread.c: Likewise + * sysdeps/unix/sysv/linux/hppa/nptl/fork.c: Likewise + * sysdeps/unix/sysv/linux/hppa/nptl/internaltypes.h: Likewise + * sysdeps/unix/sysv/linux/hppa/nptl/libc-lowlevellock.c: Likewise + * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c: Likewise + * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: Likewise + * sysdeps/unix/sysv/linux/hppa/nptl/pt-initfini.c: Likewise + * sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S: Likewise + * sysdeps/unix/sysv/linux/hppa/nptl/pthread_once.c: Likewise + * sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h: Likewise + * sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c: Likewise + * sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c: Likewise + +2006-06-08 Carlos O'Donell + * sysdeps/unix/sysv/linux/hppa/Versions: new errlist compat entry for up to 256 errnos diff --git a/sysdeps/hppa/nptl/Makefile b/sysdeps/hppa/nptl/Makefile new file mode 100644 index 0000000000..0300693783 --- /dev/null +++ b/sysdeps/hppa/nptl/Makefile @@ -0,0 +1,21 @@ +# Copyright (C) 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 +# 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. + +ifeq ($(subdir),csu) +gen-as-const-headers += tcb-offsets.sym +endif diff --git a/sysdeps/hppa/nptl/jmpbuf-unwind.h b/sysdeps/hppa/nptl/jmpbuf-unwind.h new file mode 100644 index 0000000000..7f92627f91 --- /dev/null +++ b/sysdeps/hppa/nptl/jmpbuf-unwind.h @@ -0,0 +1,31 @@ +/* Copyright (C) 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 + 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. */ + +#include +#include +#include +#include + +#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \ + _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj) + +#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \ + ((uintptr_t) (_address) - (_adj) > (uintptr_t)(((unsigned long *) _jmpbuf)[JB_SP]) - (_adj)) + +/* We use the normal longjmp for unwinding. */ +#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val) diff --git a/sysdeps/hppa/nptl/pthread_spin_lock.c b/sysdeps/hppa/nptl/pthread_spin_lock.c new file mode 100644 index 0000000000..9a36967e6e --- /dev/null +++ b/sysdeps/hppa/nptl/pthread_spin_lock.c @@ -0,0 +1,38 @@ +/* Copyright (C) 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 + 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. */ + +#include +#include "pthreadP.h" + +int +pthread_spin_lock (pthread_spinlock_t *lock) +{ +#if 0 + volatile unsigned int *addr = __ldcw_align (lock); + + while (__ldcw (addr) == 0) + while (*addr == 0) ; + + return 0; +#endif + + while (atomic_compare_and_exchange_val_acq(lock, 0, 1) == 1) + while (*lock == 1); + + return 0; +} diff --git a/sysdeps/hppa/nptl/pthread_spin_trylock.c b/sysdeps/hppa/nptl/pthread_spin_trylock.c new file mode 100644 index 0000000000..8d0ec1d9b8 --- /dev/null +++ b/sysdeps/hppa/nptl/pthread_spin_trylock.c @@ -0,0 +1,34 @@ +/* Copyright (C) 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 + 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. */ + +#include +#include +#include "pthreadP.h" + +int +pthread_spin_trylock (pthread_spinlock_t *lock) +{ +#if 0 + volatile unsigned int *a = __ldcw_align (lock); + + return __ldcw (a) ? 0 : EBUSY; +#endif + + return atomic_compare_and_exchange_val_acq(lock, 0, 1) ? EBUSY : 0; + +} diff --git a/sysdeps/hppa/nptl/pthread_spin_unlock.c b/sysdeps/hppa/nptl/pthread_spin_unlock.c new file mode 100644 index 0000000000..463d23c97f --- /dev/null +++ b/sysdeps/hppa/nptl/pthread_spin_unlock.c @@ -0,0 +1,36 @@ +/* Copyright (C) 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 + 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. */ + +/* Ugly hack to avoid the declaration of pthread_spin_init. */ +#define pthread_spin_init pthread_spin_init_XXX +#include "pthreadP.h" +#undef pthread_spin_init + +int +pthread_spin_unlock (pthread_spinlock_t *lock) +{ +#if 0 + volatile unsigned int *a = __ldcw_align (lock); +#endif + int tmp = 0; + /* This should be a memory barrier to newer compilers */ + __asm__ __volatile__ ("stw,ma %1,0(%0)" + : : "r" (lock), "r" (tmp) : "memory"); + return 0; +} +strong_alias (pthread_spin_unlock, pthread_spin_init) diff --git a/sysdeps/hppa/nptl/pthreaddef.h b/sysdeps/hppa/nptl/pthreaddef.h new file mode 100644 index 0000000000..6445f7bb0a --- /dev/null +++ b/sysdeps/hppa/nptl/pthreaddef.h @@ -0,0 +1,40 @@ +/* Copyright (C) 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 + 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. */ + +/* Default stack size. */ +#define ARCH_STACK_DEFAULT_SIZE (8 * 1024 * 1024) + +/* Required stack pointer alignment at beginning. */ +#define STACK_ALIGN 64 + +/* Minimal stack size after allocating thread descriptor and guard size. */ +#define MINIMAL_REST_STACK 2048 + +/* Alignment requirement for TCB, note that this must be larger than STACK_ALIGN */ +#define TCB_ALIGNMENT STACK_ALIGN + + +/* Location of current stack frame. */ +#define CURRENT_STACK_FRAME stack_pointer +register char * stack_pointer __asm__ ("%r30"); + + +/* XXX Until we have a better place keep the definitions here. */ + +#define __exit_thread_inline(val) \ + INLINE_SYSCALL (exit, 1, (val)) diff --git a/sysdeps/hppa/nptl/tcb-offsets.sym b/sysdeps/hppa/nptl/tcb-offsets.sym new file mode 100644 index 0000000000..1c8aef4c53 --- /dev/null +++ b/sysdeps/hppa/nptl/tcb-offsets.sym @@ -0,0 +1,18 @@ +#include +#include + +RESULT offsetof (struct pthread, result) +TID offsetof (struct pthread, tid) +PID offsetof (struct pthread, pid) +CANCELHANDLING offsetof (struct pthread, cancelhandling) +CLEANUP_JMP_BUF offsetof (struct pthread, cleanup_jmp_buf) +MULTIPLE_THREADS_OFFSET offsetof (struct pthread, header.multiple_threads) +TLS_PRE_TCB_SIZE sizeof (struct pthread) +MUTEX_FUTEX offsetof (pthread_mutex_t, __data.__lock) + +-- Use a thread_offset when working with asm to make things simpler +-- This way we get the offset of a member in the struct pthread that +-- preceeds the thread pointer (which points to the dtv). +#define thread_offsetof(mem) (unsigned int)(offsetof(struct pthread, mem) - sizeof(struct pthread)) +PID_THREAD_OFFSET thread_offsetof (pid) +MULTIPLE_THREADS_THREAD_OFFSET thread_offsetof (header.multiple_threads) diff --git a/sysdeps/hppa/nptl/tls.h b/sysdeps/hppa/nptl/tls.h new file mode 100644 index 0000000000..1bbeeaafac --- /dev/null +++ b/sysdeps/hppa/nptl/tls.h @@ -0,0 +1,151 @@ +/* Definition for thread-local data handling. NPTL/hppa version. + Copyright (C) 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 + 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 _TLS_H +#define _TLS_H 1 + +#include + +#ifndef __ASSEMBLER__ +# include +# include +# include + +/* Type for the dtv. */ +typedef union dtv +{ + size_t counter; + struct + { + void *val; + bool is_static; + } pointer; +} dtv_t; + +#else /* __ASSEMBLER__ */ +# include +#endif /* __ASSEMBLER__ */ + + +/* We require TLS support in the tools. */ +#ifndef HAVE_TLS_SUPPORT +# error "TLS support is required." +#endif + +/* Signal that TLS support is available. */ +#define USE_TLS 1 + +#ifndef __ASSEMBLER__ + +/* Get system call information. */ +# include + +/* The TP points to the start of the thread blocks. */ +# define TLS_DTV_AT_TP 1 + +/* Get the thread descriptor definition. */ +# include + +typedef struct +{ + dtv_t *dtv; + void *private; +} tcbhead_t; + +/* This is the size of the initial TCB. */ +# define TLS_INIT_TCB_SIZE sizeof (tcbhead_t) + +/* Alignment requirements for the initial TCB. */ +# define TLS_INIT_TCB_ALIGN __alignof__ (tcbhead_t) + +/* This is the size of the TCB. */ +# define TLS_TCB_SIZE sizeof (tcbhead_t) + +/* Alignment requirements for the TCB. */ +# define TLS_TCB_ALIGN __alignof__ (struct pthread) + +/* This is the size we need before TCB */ +# define TLS_PRE_TCB_SIZE sizeof (struct pthread) + +/* Install the dtv pointer. The pointer passed is to the element with + index -1 which contain the length. */ +# define INSTALL_DTV(tcbp, dtvp) \ + ((tcbhead_t *) (tcbp))->dtv = (dtvp) + 1 + +/* Install new dtv for current thread. */ +# define INSTALL_NEW_DTV(dtv) \ + ({ tcbhead_t *__tcbp = (tcbhead_t *)__get_cr27(); \ + __tcbp->dtv = dtv; \ + }) + +/* Return dtv of given thread descriptor. */ +# define GET_DTV(tcbp) \ + (((tcbhead_t *) (tcbp))->dtv) + +/* Code to initially initialize the thread pointer. This might need + special attention since 'errno' is not yet available and if the + operation can cause a failure 'errno' must not be touched. */ +# define TLS_INIT_TP(tcbp, secondcall) \ + ({ __set_cr27(tcbp); 0; }) + +/* Return the address of the dtv for the current thread. */ +# define THREAD_DTV() \ + ({ tcbhead_t *__tcbp = (tcbhead_t *)__get_cr27(); \ + __tcbp->dtv; \ + }) + +/* Return the thread descriptor for the current thread. */ +# define THREAD_SELF \ + ({ struct pthread *__self; \ + __self = __get_cr27(); \ + __self - 1; \ + }) + +/* FIXME */ +/* Magic for libthread_db to know how to do THREAD_SELF. */ +# define DB_THREAD_SELF \ + REGISTER (32, 32, 32 * 4, -sizeof (struct pthread)) + +/* Access to data in the thread descriptor is easy. */ +# define THREAD_GETMEM(descr, member) \ + descr->member +# define THREAD_GETMEM_NC(descr, member, idx) \ + descr->member[idx] +# define THREAD_SETMEM(descr, member, value) \ + descr->member = (value) +# define THREAD_SETMEM_NC(descr, member, idx, value) \ + descr->member[idx] = (value) + +static inline struct pthread *__get_cr27(void) +{ + long cr27; + asm ("mfctl %%cr27, %0" : "=r" (cr27) : ); + return (struct pthread *) cr27; +} + +static inline void __set_cr27(struct pthread *cr27) +{ + asm ( "ble 0xe0(%%sr2, %%r0)\n\t" + "copy %0, %%r26" + : : "r" (cr27) : "r26" ); +} + +#endif /* __ASSEMBLER__ */ + +#endif /* tls.h */ diff --git a/sysdeps/unix/sysv/linux/hppa/fxstat.c b/sysdeps/unix/sysv/linux/hppa/fxstat.c new file mode 100644 index 0000000000..4f219f0b9d --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/fxstat.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/hppa/fxstatat.c b/sysdeps/unix/sysv/linux/hppa/fxstatat.c new file mode 100644 index 0000000000..0f8b3135d8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/fxstatat.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/hppa/lxstat.c b/sysdeps/unix/sysv/linux/hppa/lxstat.c new file mode 100644 index 0000000000..0efa0aea49 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/lxstat.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h new file mode 100644 index 0000000000..6b23be52de --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h @@ -0,0 +1,192 @@ +/* Copyright (C) 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 + 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_PTHREADTYPES_H +#define _BITS_PTHREADTYPES_H 1 + +/* Linuxthread type sizes: + sizeof(pthread_attr_t) = 0x24 (36) + sizeof(pthread_mutex_t) = 0x30 (48) + sizeof(pthread_mutexattr_t) = 0x4 (4) + sizeof(pthread_cond_t) = 0x30 (48) + No pthread_cond_compat_t ... + sizeof(pthread_condattr_t) = 0x4 (4) + sizeof(pthread_rwlock_t) = 0x40 (64) + sizeof(pthread_rwlockattr_t) = 0x8 (8) + sizeof(pthread_barrier_t) = 0x30 (48) + sizeof(pthread_barrierattr_t) = 0x4 (4) */ + +#define __SIZEOF_PTHREAD_ATTR_T 36 +#define __SIZEOF_PTHREAD_MUTEX_T 48 +#define __SIZEOF_PTHREAD_MUTEXATTR_T 4 +#define __SIZEOF_PTHREAD_COND_T 48 +#define __SIZEOF_PTHREAD_COND_COMPAT_T 12 +#define __SIZEOF_PTHREAD_CONDATTR_T 4 +#define __SIZEOF_PTHREAD_RWLOCK_T 64 +#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 +#define __SIZEOF_PTHREAD_BARRIER_T 48 +#define __SIZEOF_PTHREAD_BARRIERATTR_T 4 + +#define __PAD_ATOMIC_LOCK_T 12 + +/* Thread identifiers. The structure of the attribute type is not + exposed on purpose. */ +typedef unsigned long int pthread_t; + +/* Our old basic lock type, listed here for posterity. + We needed self-aligning locks for linuxthreads LDCW + implementation. For NPTL we use LWS Compare and + Exchange to implement primitives. */ +#if 0 +typedef struct { + int lock[4]; +} __atomic_lock_t; +#endif + +typedef union +{ + char __size[__SIZEOF_PTHREAD_ATTR_T]; + long int __align; +} pthread_attr_t; + + +typedef struct __pthread_internal_slist +{ + struct __pthread_internal_slist *__next; +} __pthread_slist_t; + + +/* Data structures for mutex handling. The structure of the attribute + type is not exposed on purpose. */ +typedef union +{ + struct __pthread_mutex_s + { + int __lock; + char __size[__PAD_ATOMIC_LOCK_T]; + unsigned int __count; + int __owner; + /* KIND must stay at this position in the structure to maintain + binary compatibility. */ + int __kind; + unsigned int __nusers; + __extension__ union + { + int __spins; + __pthread_slist_t __list; + }; + } __data; + char __size[__SIZEOF_PTHREAD_MUTEX_T]; + long int __align; +} pthread_mutex_t; + +typedef union +{ + char __size[__SIZEOF_PTHREAD_MUTEXATTR_T]; + long int __align; +} pthread_mutexattr_t; + + +/* Data structure for conditional variable handling. The structure of + the attribute type is not exposed on purpose. */ +typedef union +{ + struct + { + int __lock; + char __size[__PAD_ATOMIC_LOCK_T]; + unsigned int __futex; + __extension__ unsigned long long int __total_seq; + __extension__ unsigned long long int __wakeup_seq; + __extension__ unsigned long long int __woken_seq; + void *__mutex; + unsigned int __nwaiters; + unsigned int __broadcast_seq; + } __data; + char __size[__SIZEOF_PTHREAD_COND_T]; + __extension__ long long int __align; +} pthread_cond_t; + +typedef union +{ + char __size[__SIZEOF_PTHREAD_CONDATTR_T]; + long int __align; +} pthread_condattr_t; + + +/* Keys for thread-specific data */ +typedef unsigned int pthread_key_t; + + +/* Once-only execution */ +typedef int pthread_once_t; + + +#if defined __USE_UNIX98 || defined __USE_XOPEN2K +/* Data structure for read-write lock variable handling. The + structure of the attribute type is not exposed on purpose. */ +typedef union +{ + struct + { + int __lock; + char __size[__PAD_ATOMIC_LOCK_T]; + unsigned int __nr_readers; + unsigned int __readers_wakeup; + unsigned int __writer_wakeup; + unsigned int __nr_readers_queued; + unsigned int __nr_writers_queued; + /* FLAGS must stay at this position in the structure to maintain + binary compatibility. */ + unsigned int __flags; + int __writer; + } __data; + char __size[__SIZEOF_PTHREAD_RWLOCK_T]; + long int __align; +} pthread_rwlock_t; + +typedef union +{ + char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T]; + long int __align; +} pthread_rwlockattr_t; +#endif + + +#ifdef __USE_XOPEN2K +/* POSIX spinlock data type. */ +typedef volatile int pthread_spinlock_t; + + +/* POSIX barriers data type. The structure of the type is + deliberately not exposed. */ +typedef union +{ + char __size[__SIZEOF_PTHREAD_BARRIER_T]; + long int __align; +} pthread_barrier_t; + +typedef union +{ + char __size[__SIZEOF_PTHREAD_BARRIERATTR_T]; + int __align; +} pthread_barrierattr_t; +#endif + + +#endif /* bits/pthreadtypes.h */ diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h b/sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h new file mode 100644 index 0000000000..3d274eea20 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h @@ -0,0 +1,39 @@ +/* Copyright (C) 2002, 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 + 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 _SEMAPHORE_H +# error "Never use directly; include instead." +#endif + + +#define __SIZEOF_SEM_T 16 + + +/* Value returned if `sem_open' failed. */ +#define SEM_FAILED ((sem_t *) 0) + +/* Maximum value the semaphore can have. */ +#define SEM_VALUE_MAX ((int) ((~0u) >> 1)) + + +typedef union +{ + char __size[__SIZEOF_SEM_T]; + long int __align; +} sem_t; + diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/createthread.c b/sysdeps/unix/sysv/linux/hppa/nptl/createthread.c new file mode 100644 index 0000000000..01bd8ce180 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/nptl/createthread.c @@ -0,0 +1,23 @@ +/* Copyright (C) 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 + 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. */ + +/* Value passed to 'clone' for initialization of the thread register. */ +#define TLS_VALUE (pd + 1) + +/* Get the real implementation. */ +#include diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/fork.c b/sysdeps/unix/sysv/linux/hppa/nptl/fork.c new file mode 100644 index 0000000000..4dc38e162f --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/nptl/fork.c @@ -0,0 +1,34 @@ +/* Copyright (C) 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 + 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. */ + +#include +#include +#include +#include + +/* Argument 1 - Clone flags. + 2 - Child stack pointer. + 3 - Parent tid pointer. + 4 - New TLS area pointer. + 5 - Child tid pointer. */ +#define ARCH_FORK() \ + INLINE_SYSCALL (clone, 5, \ + CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID | SIGCHLD, \ + NULL, NULL, NULL, &THREAD_SELF->tid) + +#include diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/internaltypes.h b/sysdeps/unix/sysv/linux/hppa/nptl/internaltypes.h new file mode 100644 index 0000000000..528c2a7d9f --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/nptl/internaltypes.h @@ -0,0 +1,153 @@ +/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2002. + + 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 _INTERNALTYPES_H +#define _INTERNALTYPES_H 1 + +#include + + +struct pthread_attr +{ + /* Scheduler parameters and priority. */ + struct sched_param schedparam; + int schedpolicy; + /* Various flags like detachstate, scope, etc. */ + int flags; + /* Size of guard area. */ + size_t guardsize; + /* Stack handling. */ + void *stackaddr; + size_t stacksize; + /* Affinity map. */ + cpu_set_t *cpuset; + size_t cpusetsize; +}; + +#define ATTR_FLAG_DETACHSTATE 0x0001 +#define ATTR_FLAG_NOTINHERITSCHED 0x0002 +#define ATTR_FLAG_SCOPEPROCESS 0x0004 +#define ATTR_FLAG_STACKADDR 0x0008 +#define ATTR_FLAG_OLDATTR 0x0010 +#define ATTR_FLAG_SCHED_SET 0x0020 +#define ATTR_FLAG_POLICY_SET 0x0040 + + +/* Mutex attribute data structure. */ +struct pthread_mutexattr +{ + /* Identifier for the kind of mutex. + + Bit 31 is set if the mutex is to be shared between processes. + + Bit 0 to 30 contain one of the PTHREAD_MUTEX_ values to identify + the type of the mutex. */ + int mutexkind; +}; + + +/* Conditional variable attribute data structure. */ +struct pthread_condattr +{ + /* Combination of values: + + Bit 0 : flag whether coditional variable will be shareable between + processes. + + Bit 1-7: clock ID. */ + int value; +}; + + +/* The __NWAITERS field is used as a counter and to house the number + of bits which represent the clock. COND_CLOCK_BITS is the number + of bits reserved for the clock. */ +#define COND_CLOCK_BITS 1 + + +/* Read-write lock variable attribute data structure. */ +struct pthread_rwlockattr +{ + int lockkind; + int pshared; +}; + + +/* Barrier data structure. */ +struct pthread_barrier +{ + unsigned int curr_event; + int lock; + unsigned int left; + unsigned int init_count; +}; + + +/* Barrier variable attribute data structure. */ +struct pthread_barrierattr +{ + int pshared; +}; + + +/* Thread-local data handling. */ +struct pthread_key_struct +{ + /* Sequence numbers. Even numbers indicated vacant entries. Note + that zero is even. We use uintptr_t to not require padding on + 32- and 64-bit machines. On 64-bit machines it helps to avoid + wrapping, too. */ + uintptr_t seq; + + /* Destructor for the data. */ + void (*destr) (void *); +}; + +/* Check whether an entry is unused. */ +#define KEY_UNUSED(p) (((p) & 1) == 0) +/* Check whether a key is usable. We cannot reuse an allocated key if + the sequence counter would overflow after the next destroy call. + This would mean that we potentially free memory for a key with the + same sequence. This is *very* unlikely to happen, A program would + have to create and destroy a key 2^31 times (on 32-bit platforms, + on 64-bit platforms that would be 2^63). If it should happen we + simply don't use this specific key anymore. */ +#define KEY_USABLE(p) (((uintptr_t) (p)) < ((uintptr_t) ((p) + 2))) + + +/* Handling of read-write lock data. */ +// XXX For now there is only one flag. Maybe more in future. +#define RWLOCK_RECURSIVE(rwlock) ((rwlock)->__data.__flags != 0) + + +/* Semaphore variable structure. */ +struct sem +{ + unsigned int count; +}; + + +/* Compatibility type for old conditional variable interfaces. */ +typedef struct +{ + pthread_cond_t *cond; +} pthread_cond_2_0_t; + +#endif /* internaltypes.h */ + diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/libc-lowlevellock.c b/sysdeps/unix/sysv/linux/hppa/nptl/libc-lowlevellock.c new file mode 100644 index 0000000000..7b1a7c72d0 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/nptl/libc-lowlevellock.c @@ -0,0 +1,21 @@ +/* low level locking for pthread library. Generic futex-using version. + Copyright (C) 2003 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Paul Mackerras , 2003. + + 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. */ + +#include "lowlevellock.c" diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c new file mode 100644 index 0000000000..d2919ee464 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c @@ -0,0 +1,130 @@ +/* low level locking for pthread library. Generic futex-using version. + Copyright (C) 2003 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Paul Mackerras , 2003. + + 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. */ + +#include +#include +#include +#include + + +void +__lll_lock_wait (lll_lock_t *futex) +{ + do + { + int oldval = atomic_compare_and_exchange_val_acq (futex, 2, 1); + if (oldval != 0) + lll_futex_wait (futex, 2); + } + while (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0); +} + + +int +__lll_timedlock_wait (lll_lock_t *futex, const struct timespec *abstime) +{ + /* Reject invalid timeouts. */ + if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000) + return EINVAL; + + do + { + struct timeval tv; + struct timespec rt; + + /* Get the current time. */ + (void) __gettimeofday (&tv, NULL); + + /* Compute relative timeout. */ + rt.tv_sec = abstime->tv_sec - tv.tv_sec; + rt.tv_nsec = abstime->tv_nsec - tv.tv_usec * 1000; + if (rt.tv_nsec < 0) + { + rt.tv_nsec += 1000000000; + --rt.tv_sec; + } + + /* Already timed out? */ + if (rt.tv_sec < 0) + return ETIMEDOUT; + + /* Wait. */ + int oldval = atomic_compare_and_exchange_val_acq (futex, 2, 1); + if (oldval != 0) + lll_futex_timed_wait (futex, 2, &rt); + } + while (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0); + return 0; +} + + +/* These don't get included in libc.so */ +#ifdef IS_IN_libpthread +int +lll_unlock_wake_cb (lll_lock_t *futex) +{ + int val = atomic_exchange_rel (futex, 0); + + if (__builtin_expect (val > 1, 0)) + lll_futex_wake (futex, 1); + return 0; +} + + +int +__lll_timedwait_tid (int *tidp, const struct timespec *abstime) +{ + int tid; + + if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000) + return EINVAL; + + /* Repeat until thread terminated. */ + while ((tid = *tidp) != 0) + { + struct timeval tv; + struct timespec rt; + + /* Get the current time. */ + (void) __gettimeofday (&tv, NULL); + + /* Compute relative timeout. */ + rt.tv_sec = abstime->tv_sec - tv.tv_sec; + rt.tv_nsec = abstime->tv_nsec - tv.tv_usec * 1000; + if (rt.tv_nsec < 0) + { + rt.tv_nsec += 1000000000; + --rt.tv_sec; + } + + /* Already timed out? */ + if (rt.tv_sec < 0) + return ETIMEDOUT; + + /* Wait until thread terminates. */ + if (lll_futex_timed_wait (tidp, tid, &rt) == -ETIMEDOUT) + return ETIMEDOUT; + } + + return 0; +} + +#endif + diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h new file mode 100644 index 0000000000..fc5ff9932f --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h @@ -0,0 +1,336 @@ +/* Copyright (C) 2003, 2004, 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 + 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 _LOWLEVELLOCK_H +#define _LOWLEVELLOCK_H 1 + +#include +#include +#include +#include +#include + +#if 0 +/* The hppa only has one atomic read and modify memory operation, + load and clear, so hppa spinlocks must use zero to signify that + someone is holding the lock. The address used for the ldcw + semaphore must be 16-byte aligned. */ +#define __ldcw(a) \ +({ \ + unsigned int __ret; \ + __asm__ __volatile__("ldcw 0(%1),%0" \ + : "=r" (__ret) : "r" (a) : "memory"); \ + __ret; \ +}) + +/* Because malloc only guarantees 8-byte alignment for malloc'd data, + and GCC only guarantees 8-byte alignment for stack locals, we can't + be assured of 16-byte alignment for atomic lock data even if we + specify "__attribute ((aligned(16)))" in the type declaration. So, + we use a struct containing an array of four ints for the atomic lock + type and dynamically select the 16-byte aligned int from the array + for the semaphore. */ +#define __PA_LDCW_ALIGNMENT 16 +#define __ldcw_align(a) ({ \ + volatile unsigned int __ret = (unsigned int) a; \ + if ((__ret & ~(__PA_LDCW_ALIGNMENT - 1)) < (unsigned int) a) \ + __ret = (__ret & ~(__PA_LDCW_ALIGNMENT - 1)) + __PA_LDCW_ALIGNMENT; \ + (unsigned int *) __ret; \ +}) +#endif + +#define FUTEX_WAIT 0 +#define FUTEX_WAKE 1 +#define FUTEX_REQUEUE 3 +#define FUTEX_CMP_REQUEUE 4 +#define FUTEX_WAKE_OP 5 +#define FUTEX_OP_CLEAR_WAKE_IF_GT_ONE ((4 << 24) | 1) + +/* Initializer for compatibility lock. */ +#if 0 +#define LLL_INITIALIZER_NOT_ZERO +#define LLL_MUTEX_LOCK_INITIALIZER ((__atomic_lock_t){ { 1, 1, 1, 1 } }) +#endif +#define LLL_MUTEX_LOCK_INITIALIZER (0) + + +/* Type for lock object. */ +typedef int lll_lock_t; + + +#define lll_futex_wait(futexp, val) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + __ret = INTERNAL_SYSCALL (futex, __err, 4, \ + (futexp), FUTEX_WAIT, (val), 0); \ + INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; \ + }) + +#define lll_futex_timed_wait(futexp, val, timespec) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + __ret = INTERNAL_SYSCALL (futex, __err, 4, \ + (futexp), FUTEX_WAIT, (val), (timespec)); \ + INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; \ + }) + +#define lll_futex_wake(futexp, nr) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + __ret = INTERNAL_SYSCALL (futex, __err, 4, \ + (futexp), FUTEX_WAKE, (nr), 0); \ + INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; \ + }) + +#define lll_robust_mutex_dead(futexv) \ + do \ + { \ + int *__futexp = &(futexv); \ + atomic_or (__futexp, FUTEX_OWNER_DIED); \ + lll_futex_wake (__futexp, 1); \ + } \ + while (0) + +/* Returns non-zero if error happened, zero if success. */ +#define lll_futex_requeue(futexp, nr_wake, nr_move, mutex, val) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + __ret = INTERNAL_SYSCALL (futex, __err, 6, \ + (futexp), FUTEX_CMP_REQUEUE, (nr_wake), \ + (nr_move), (mutex), (val)); \ + INTERNAL_SYSCALL_ERROR_P (__ret, __err); \ + }) + +/* Returns non-zero if error happened, zero if success. */ +#define lll_futex_wake_unlock(futexp, nr_wake, nr_wake2, futexp2) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + __ret = INTERNAL_SYSCALL (futex, __err, 6, \ + (futexp), FUTEX_WAKE_OP, (nr_wake), \ + (nr_wake2), (futexp2), \ + FUTEX_OP_CLEAR_WAKE_IF_GT_ONE); \ + __ret; \ + }) + +static inline int __attribute__((always_inline)) +__lll_mutex_trylock(lll_lock_t *futex) +{ + return atomic_compare_and_exchange_val_acq (futex, 1, 0) != 0; +} +#define lll_mutex_trylock(lock) __lll_mutex_trylock (&(lock)) + +static inline int __attribute__((always_inline)) +__lll_robust_mutex_trylock(int *futex, int id) +{ + return atomic_compare_and_exchange_val_acq (futex, id, 0) != 0; +} +#define lll_robust_mutex_trylock(lock, id) \ + __lll_robust_mutex_trylock (&(lock), id) + + +static inline int __attribute__((always_inline)) +__lll_mutex_cond_trylock(lll_lock_t *futex) +{ + return atomic_compare_and_exchange_val_acq (futex, 2, 0) != 0; +} +#define lll_mutex_cond_trylock(lock) __lll_mutex_cond_trylock (&(lock)) + + +extern void __lll_lock_wait (lll_lock_t *futex) attribute_hidden; + +static inline void __attribute__((always_inline)) +__lll_mutex_lock(lll_lock_t *futex) +{ + if (atomic_compare_and_exchange_bool_acq (futex, 1, 0) != 0) + __lll_lock_wait (futex); +} +#define lll_mutex_lock(futex) __lll_mutex_lock (&(futex)) + +extern int __lll_robust_lock_wait (int *futex) attribute_hidden; + +static inline int __attribute__ ((always_inline)) +__lll_robust_mutex_lock (int *futex, int id) +{ + int result = 0; + if (atomic_compare_and_exchange_bool_acq (futex, id, 0) != 0) + result = __lll_robust_lock_wait (futex); + return result; +} +#define lll_robust_mutex_lock(futex, id) \ + __lll_robust_mutex_lock (&(futex), id) + +static inline void __attribute__ ((always_inline)) +__lll_mutex_cond_lock (lll_lock_t *futex) +{ + if (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0) + __lll_lock_wait (futex); +} +#define lll_mutex_cond_lock(futex) __lll_mutex_cond_lock (&(futex)) + + +#define lll_robust_mutex_cond_lock(futex, id) \ + __lll_robust_mutex_lock (&(futex), (id) | FUTEX_WAITERS) + + +extern int __lll_timedlock_wait (lll_lock_t *futex, const struct timespec *) + attribute_hidden; +extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *) + attribute_hidden; + +static inline int __attribute__ ((always_inline)) +__lll_mutex_timedlock (lll_lock_t *futex, const struct timespec *abstime) +{ + int result = 0; + if (atomic_compare_and_exchange_bool_acq (futex, 1, 0) != 0) + result = __lll_timedlock_wait (futex, abstime); + return result; +} +#define lll_mutex_timedlock(futex, abstime) \ + __lll_mutex_timedlock (&(futex), abstime) + +static inline int __attribute__ ((always_inline)) +__lll_robust_mutex_timedlock (int *futex, const struct timespec *abstime, + int id) +{ + int result = 0; + if (atomic_compare_and_exchange_bool_acq (futex, id, 0) != 0) + result = __lll_robust_timedlock_wait (futex, abstime); + return result; +} +#define lll_robust_mutex_timedlock(futex, abstime, id) \ + __lll_robust_mutex_timedlock (&(futex), abstime, id) + + +static inline void __attribute__ ((always_inline)) +__lll_mutex_unlock (lll_lock_t *futex) +{ + int val = atomic_exchange_rel (futex, 0); + if (__builtin_expect (val > 1, 0)) + lll_futex_wake (futex, 1); +} +#define lll_mutex_unlock(futex) __lll_mutex_unlock(&(futex)) + + +static inline void __attribute__ ((always_inline)) +__lll_robust_mutex_unlock (int *futex, int mask) +{ + int val = atomic_exchange_rel (futex, 0); + if (__builtin_expect (val & mask, 0)) + lll_futex_wake (futex, 1); +} +#define lll_robust_mutex_unlock(futex) \ + __lll_robust_mutex_unlock(&(futex), FUTEX_WAITERS) + + +static inline void __attribute__ ((always_inline)) +__lll_mutex_unlock_force (lll_lock_t *futex) +{ + (void) atomic_exchange_rel (futex, 0); + lll_futex_wake (futex, 1); +} +#define lll_mutex_unlock_force(futex) __lll_mutex_unlock_force(&(futex)) + + +static inline int __attribute__ ((always_inline)) +__lll_mutex_islocked (lll_lock_t *futex) +{ + return (*futex != 0); +} +#define lll_mutex_islocked(futex) __lll_mutex_islocked(&(futex)) + + +/* Our internal lock implementation is identical to the binary-compatible + mutex implementation. */ + +/* Initializers for lock. */ +#if 0 +#define LLL_LOCK_INITIALIZER ((__atomic_lock_t){ { 1, 1, 1, 1 } }) +#define LLL_LOCK_INITIALIZER_CONST { { 1, 1, 1, 1 } } +#define LLL_LOCK_INITIALIZER_LOCKED ((__atomic_lock_t){ { 0, 0, 0, 0 } }) +#endif + +#define LLL_LOCK_INITIALIZER (0) +#define LLL_LOCK_INITIALIZER_CONST (0) +#define LLL_LOCK_INITIALIZER_LOCKED (1) + + +#define THREAD_INIT_LOCK(PD, LOCK) \ + (PD)->LOCK = LLL_LOCK_INITIALIZER + +extern int lll_unlock_wake_cb (lll_lock_t *__futex) attribute_hidden; + +/* The states of a lock are: + 0 - untaken + 1 - taken by one user + >1 - taken by more users */ + +#define lll_trylock(lock) lll_mutex_trylock (lock) +#define lll_lock(lock) lll_mutex_lock (lock) +#define lll_unlock(lock) lll_mutex_unlock (lock) +#define lll_islocked(lock) lll_mutex_islocked (lock) + +/* The kernel notifies a process which uses CLONE_CLEARTID via futex + wakeup when the clone terminates. The memory location contains the + thread ID while the clone is running and is reset to zero + afterwards. */ +#define lll_wait_tid(tid) \ + do { \ + __typeof (tid) __tid; \ + while ((__tid = (tid)) != 0) \ + lll_futex_wait (&(tid), __tid); \ + } while (0) + +extern int __lll_timedwait_tid (int *, const struct timespec *) + attribute_hidden; + +#define lll_timedwait_tid(tid, abstime) \ + ({ \ + int __res = 0; \ + if ((tid) != 0) \ + __res = __lll_timedwait_tid (&(tid), (abstime)); \ + __res; \ + }) + + +/* Conditional variable handling. */ + +extern void __lll_cond_wait (pthread_cond_t *cond) + attribute_hidden; +extern int __lll_cond_timedwait (pthread_cond_t *cond, + const struct timespec *abstime) + attribute_hidden; +extern void __lll_cond_wake (pthread_cond_t *cond) + attribute_hidden; +extern void __lll_cond_broadcast (pthread_cond_t *cond) + attribute_hidden; + +#define lll_cond_wait(cond) \ + __lll_cond_wait (cond) +#define lll_cond_timedwait(cond, abstime) \ + __lll_cond_timedwait (cond, abstime) +#define lll_cond_wake(cond) \ + __lll_cond_wake (cond) +#define lll_cond_broadcast(cond) \ + __lll_cond_broadcast (cond) + +#endif /* lowlevellock.h */ diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pt-initfini.c b/sysdeps/unix/sysv/linux/hppa/nptl/pt-initfini.c new file mode 100644 index 0000000000..845e1feb59 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/nptl/pt-initfini.c @@ -0,0 +1,109 @@ +/* Special .init and .fini section support for HPPA. NPTL version. + Copyright (C) 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 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. + + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + 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; see the file COPYING.LIB. If not, + write to the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* This file is compiled into assembly code which is then munged by a sed + script into two files: crti.s and crtn.s. + + * crti.s puts a function prologue at the beginning of the + .init and .fini sections and defines global symbols for + those addresses, so they can be called as functions. + + * crtn.s puts the corresponding function epilogues + in the .init and .fini sections. */ + +/* If we use the standard C version, the linkage table pointer won't + be properly preserved due to the splitting up of function prologues + and epilogues. Therefore we write these in assembly to make sure + they do the right thing. */ + +__asm__ ( +"#include \"defs.h\"\n" +"\n" +"/*@HEADER_ENDS*/\n" +"\n" +"/*@_init_PROLOG_BEGINS*/\n" +" .section .init\n" +" .align 4\n" +" .globl _init\n" +" .type _init,@function\n" +"_init:\n" +" stw %rp,-20(%sp)\n" +" stwm %r4,64(%sp)\n" +" stw %r19,-32(%sp)\n" +" bl __pthread_initialize_minimal_internal,%rp\n" +" copy %r19,%r4 /* delay slot */\n" +" copy %r4,%r19\n" +"/*@_init_PROLOG_ENDS*/\n" +"\n" +"/*@_init_EPILOG_BEGINS*/\n" +"/* Here is the tail end of _init. */\n" +" .section .init\n" +" ldw -84(%sp),%rp\n" +" copy %r4,%r19\n" +" bv %r0(%rp)\n" +"_end_init:\n" +" ldwm -64(%sp),%r4\n" +"\n" +"/* Our very own unwind info, because the assembler can't handle\n" +" functions split into two or more pieces. */\n" +" .section .PARISC.unwind,\"a\",@progbits\n" +" .extern _init\n" +" .word _init, _end_init\n" +" .byte 0x08, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08\n" +"\n" +"/*@_init_EPILOG_ENDS*/\n" +"\n" +"/*@_fini_PROLOG_BEGINS*/\n" +" .section .fini\n" +" .align 4\n" +" .globl _fini\n" +" .type _fini,@function\n" +"_fini:\n" +" stw %rp,-20(%sp)\n" +" stwm %r4,64(%sp)\n" +" stw %r19,-32(%sp)\n" +" copy %r19,%r4\n" +"/*@_fini_PROLOG_ENDS*/\n" +"\n" +"/*@_fini_EPILOG_BEGINS*/\n" +" .section .fini\n" +" ldw -84(%sp),%rp\n" +" copy %r4,%r19\n" +" bv %r0(%rp)\n" +"_end_fini:\n" +" ldwm -64(%sp),%r4\n" +"\n" +" .section .PARISC.unwind,\"a\",@progbits\n" +" .extern _fini\n" +" .word _fini, _end_fini\n" +" .byte 0x08, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08\n" +"\n" +"/*@_fini_EPILOG_ENDS*/\n" +"\n" +"/*@TRAILER_BEGINS*/\n" +); diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S b/sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S new file mode 100644 index 0000000000..a44e785bb6 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S @@ -0,0 +1,90 @@ +/* Copyright (C) 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 + 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. */ + +#include +#define _ERRNO_H 1 +#include +#include + +/* Clone the calling process, but without copying the whole address space. + The calling process is suspended until the new process exits or is + replaced by a call to `execve'. Return -1 for errors, 0 to the new process, + and the process ID of the new process to the old process. */ + +/* Load the thread register. + Load the saved PID value. + Negate the value. + Store the temporary PID. */ +#define SAVE_PID \ + mfctl %cr27, %r26 ASM_LINE_SEP \ + ldw PID_THREAD_OFFSET(%r26),%r1 ASM_LINE_SEP \ + sub %r0,%r1,%r1 ASM_LINE_SEP \ + stw %r1,PID_THREAD_OFFSET(%r26) ASM_LINE_SEP +/* If we are the parent... + Get the thread pointer. + Load the saved PID. + Negate the value (got back original) + Restore the PID. */ +#define RESTORE_PID \ + cmpb,=,n %r0,%ret0,.Lthread_start ASM_LINE_SEP \ + mfctl %cr27, %r26 ASM_LINE_SEP \ + ldw PID_THREAD_OFFSET(%r26),%r1 ASM_LINE_SEP \ + sub %r0,%r1,%r1 ASM_LINE_SEP \ + stw %r1,PID_THREAD_OFFSET(%r26) ASM_LINE_SEP \ +.Lthread_start: ASM_LINE_SEP + + /* r26, r25, r24, r23 are free since vfork has no arguments */ +ENTRY(__vfork) + + /* Save the PIC register. */ +#ifdef PIC + copy %r19, %r25 /* parent */ +#endif + + /* Save the process PID */ + SAVE_PID + + /* Syscall saves and restores all register states */ + ble 0x100(%sr2,%r0) + ldi __NR_vfork,%r20 + + /* Conditionally restore the PID */ + RESTORE_PID + + /* Check for error */ + ldi -4096,%r1 + comclr,>>= %r1,%ret0,%r0 /* Note: unsigned compare. */ + b,n .Lerror + + /* Return, no need to restore the PIC register. */ + bv,n %r0(%rp) + +.Lerror: + SYSCALL_ERROR_HANDLER + /* Restore the PIC register (in delay slot) on error */ +#ifdef PIC + copy %r25, %r19 /* parent */ +#else + nop +#endif + sub %r0,%ret0,%arg0 + /* Return error */ +PSEUDO_END (__vfork) +libc_hidden_def (__vfork) +weak_alias (__vfork, vfork) + diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pthread_once.c b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_once.c new file mode 100644 index 0000000000..649b752f54 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_once.c @@ -0,0 +1,94 @@ +/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek , 2003. + + 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. */ + +#include "pthreadP.h" +#include + + +unsigned long int __fork_generation attribute_hidden; + + +static void +clear_once_control (void *arg) +{ + pthread_once_t *once_control = (pthread_once_t *) arg; + + *once_control = 0; + lll_futex_wake (once_control, INT_MAX); +} + + +int +__pthread_once (once_control, init_routine) + pthread_once_t *once_control; + void (*init_routine) (void); +{ + while (1) + { + int oldval, val, newval; + + val = *once_control; + do + { + /* Check if the initialized has already been done. */ + if ((val & 2) != 0) + return 0; + + oldval = val; + newval = (oldval & 3) | __fork_generation | 1; + val = atomic_compare_and_exchange_val_acq (once_control, newval, + oldval); + } + while (__builtin_expect (val != oldval, 0)); + + /* Check if another thread already runs the initializer. */ + if ((oldval & 1) != 0) + { + /* Check whether the initializer execution was interrupted + by a fork. */ + if (((oldval ^ newval) & -4) == 0) + { + /* Same generation, some other thread was faster. Wait. */ + lll_futex_wait (once_control, newval); + continue; + } + } + + /* This thread is the first here. Do the initialization. + Register a cleanup handler so that in case the thread gets + interrupted the initialization can be restarted. */ + pthread_cleanup_push (clear_once_control, once_control); + + init_routine (); + + pthread_cleanup_pop (0); + + + /* Add one to *once_control. */ + atomic_increment (once_control); + + /* Wake up all other threads. */ + lll_futex_wake (once_control, INT_MAX); + break; + } + + return 0; +} +weak_alias (__pthread_once, pthread_once) +strong_alias (__pthread_once, __pthread_once_internal) diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h new file mode 100644 index 0000000000..748fe6961c --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h @@ -0,0 +1,217 @@ +/* Copyright (C) 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 + 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. */ + +#include +#include +#include +#ifndef __ASSEMBLER__ +# include +#endif + +#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt + +# ifndef NO_ERROR +# define NO_ERROR -0x1000 +# endif + +/* The syscall cancellation mechanism requires userspace + assistance, the following code does roughly this: + + do arguments (read arg5 and arg6 to registers) + setup frame + + check if there are threads, yes jump to pseudo_cancel + + unthreaded: + syscall + check syscall return (jump to pre_end) + set errno + set return to -1 + (jump to pre_end) + + pseudo_cancel: + cenable + syscall + cdisable + check syscall return (jump to pre_end) + set errno + set return to -1 + + pre_end + restore stack + + It is expected that 'ret' and 'END' macros will + append an 'undo arguments' and 'return' to the + this PSEUDO macro. */ + +# undef PSEUDO +# define PSEUDO(name, syscall_name, args) \ + ENTRY (name) \ + DOARGS_##args ASM_LINE_SEP \ + copy TREG, %r1 ASM_LINE_SEP \ + copy %sp, TREG ASM_LINE_SEP \ + stwm %r1, 64(%sp) ASM_LINE_SEP \ + stw %rp, -20(%sp) ASM_LINE_SEP \ + stw TREG, -4(%sp) ASM_LINE_SEP \ + /* Done setting up frame, continue... */ ASM_LINE_SEP \ + SINGLE_THREAD_P ASM_LINE_SEP \ + cmpib,<>,n 0,%ret0,L(pseudo_cancel) ASM_LINE_SEP \ +L(unthreaded): ASM_LINE_SEP \ + /* Save r19 */ ASM_LINE_SEP \ + SAVE_PIC(TREG) ASM_LINE_SEP \ + /* Do syscall, delay loads # */ ASM_LINE_SEP \ + ble 0x100(%sr2,%r0) ASM_LINE_SEP \ + ldi SYS_ify (syscall_name), %r20 /* delay */ ASM_LINE_SEP \ + ldi NO_ERROR,%r1 ASM_LINE_SEP \ + cmpb,>>=,n %r1,%ret0,L(pre_end) ASM_LINE_SEP \ + /* Restore r19 from TREG */ ASM_LINE_SEP \ + LOAD_PIC(TREG) /* delay */ ASM_LINE_SEP \ + SYSCALL_ERROR_HANDLER ASM_LINE_SEP \ + /* Use TREG for temp storage */ ASM_LINE_SEP \ + copy %ret0, TREG /* delay */ ASM_LINE_SEP \ + /* OPTIMIZE: Don't reload r19 */ ASM_LINE_SEP \ + /* do a -1*syscall_ret0 */ ASM_LINE_SEP \ + sub %r0, TREG, TREG ASM_LINE_SEP \ + /* Store into errno location */ ASM_LINE_SEP \ + stw TREG, 0(%sr0,%ret0) ASM_LINE_SEP \ + b L(pre_end) ASM_LINE_SEP \ + /* return -1 as error */ ASM_LINE_SEP \ + ldo -1(%r0), %ret0 /* delay */ ASM_LINE_SEP \ +L(pseudo_cancel): ASM_LINE_SEP \ + PUSHARGS_##args /* Save args */ ASM_LINE_SEP \ + /* Save r19 into TREG */ ASM_LINE_SEP \ + CENABLE /* FUNC CALL */ ASM_LINE_SEP \ + SAVE_PIC(TREG) /* delay */ ASM_LINE_SEP \ + /* restore syscall args */ ASM_LINE_SEP \ + POPARGS_##args ASM_LINE_SEP \ + /* save mask from cenable (use stub rp slot) */ ASM_LINE_SEP \ + stw %ret0, -24(%sp) ASM_LINE_SEP \ + /* ... SYSCALL ... */ ASM_LINE_SEP \ + ble 0x100(%sr2,%r0) ASM_LINE_SEP \ + ldi SYS_ify (syscall_name), %r20 /* delay */ ASM_LINE_SEP \ + /* ............... */ ASM_LINE_SEP \ + LOAD_PIC(TREG) ASM_LINE_SEP \ + /* pass mask as arg0 to cdisable */ ASM_LINE_SEP \ + ldw -24(%sp), %r26 ASM_LINE_SEP \ + CDISABLE ASM_LINE_SEP \ + stw %ret0, -24(%sp) /* delay */ ASM_LINE_SEP \ + /* Restore syscall return */ ASM_LINE_SEP \ + ldw -24(%sp), %ret0 ASM_LINE_SEP \ + /* compare error */ ASM_LINE_SEP \ + ldi NO_ERROR,%r1 ASM_LINE_SEP \ + /* branch if no error */ ASM_LINE_SEP \ + cmpb,>>=,n %r1,%ret0,L(pre_end) ASM_LINE_SEP \ + LOAD_PIC(TREG) /* cond. nullify */ ASM_LINE_SEP \ + copy %ret0, TREG /* save syscall return */ ASM_LINE_SEP \ + SYSCALL_ERROR_HANDLER ASM_LINE_SEP \ + /* make syscall res value positive */ ASM_LINE_SEP \ + sub %r0, TREG, TREG /* delay */ ASM_LINE_SEP \ + /* No need to LOAD_PIC */ ASM_LINE_SEP \ + /* store into errno location */ ASM_LINE_SEP \ + stw TREG, 0(%sr0,%ret0) ASM_LINE_SEP \ + /* return -1 */ ASM_LINE_SEP \ + ldo -1(%r0), %ret0 ASM_LINE_SEP \ +L(pre_end): ASM_LINE_SEP \ + /* Restore rp before exit */ ASM_LINE_SEP \ + ldw -84(%sr0,%sp), %rp ASM_LINE_SEP \ + /* Undo frame */ ASM_LINE_SEP \ + ldwm -64(%sp),TREG ASM_LINE_SEP \ + /* No need to LOAD_PIC */ ASM_LINE_SEP + +/* Save arguments into our frame */ +# define PUSHARGS_0 /* nothing to do */ +# define PUSHARGS_1 PUSHARGS_0 stw %r26, -36(%sr0,%sp) ASM_LINE_SEP +# define PUSHARGS_2 PUSHARGS_1 stw %r25, -40(%sr0,%sp) ASM_LINE_SEP +# define PUSHARGS_3 PUSHARGS_2 stw %r24, -44(%sr0,%sp) ASM_LINE_SEP +# define PUSHARGS_4 PUSHARGS_3 stw %r23, -48(%sr0,%sp) ASM_LINE_SEP +# define PUSHARGS_5 PUSHARGS_4 stw %r22, -52(%sr0,%sp) ASM_LINE_SEP +# define PUSHARGS_6 PUSHARGS_5 stw %r21, -56(%sr0,%sp) ASM_LINE_SEP + +/* Bring them back from the stack */ +# define POPARGS_0 /* nothing to do */ +# define POPARGS_1 POPARGS_0 ldw -36(%sr0,%sp), %r26 ASM_LINE_SEP +# define POPARGS_2 POPARGS_1 ldw -40(%sr0,%sp), %r25 ASM_LINE_SEP +# define POPARGS_3 POPARGS_2 ldw -44(%sr0,%sp), %r24 ASM_LINE_SEP +# define POPARGS_4 POPARGS_3 ldw -48(%sr0,%sp), %r23 ASM_LINE_SEP +# define POPARGS_5 POPARGS_4 ldw -52(%sr0,%sp), %r22 ASM_LINE_SEP +# define POPARGS_6 POPARGS_5 ldw -56(%sr0,%sp), %r21 ASM_LINE_SEP + +# ifdef IS_IN_libpthread +# ifdef PIC +# define CENABLE .import __pthread_enable_asynccancel,code ASM_LINE_SEP \ + bl __pthread_enable_asynccancel,%r2 ASM_LINE_SEP +# define CDISABLE .import __pthread_disable_asynccancel,code ASM_LINE_SEP \ + bl __pthread_disable_asynccancel,%r2 ASM_LINE_SEP +# else +# define CENABLE .import __pthread_enable_asynccancel,code ASM_LINE_SEP \ + bl __pthread_enable_asynccancel,%r2 ASM_LINE_SEP +# define CDISABLE .import __pthread_disable_asynccancel,code ASM_LINE_SEP \ + bl __pthread_disable_asynccancel,%r2 ASM_LINE_SEP +# endif +# elif !defined NOT_IN_libc +# ifdef PIC +# define CENABLE .import __libc_enable_asynccancel,code ASM_LINE_SEP \ + bl __libc_enable_asynccancel,%r2 ASM_LINE_SEP +# define CDISABLE .import __libc_disable_asynccancel,code ASM_LINE_SEP \ + bl __libc_disable_asynccancel,%r2 ASM_LINE_SEP +# else +# define CENABLE .import __libc_enable_asynccancel,code ASM_LINE_SEP \ + bl __libc_enable_asynccancel,%r2 ASM_LINE_SEP +# define CDISABLE .import __libc_disable_asynccancel,code ASM_LINE_SEP \ + bl __libc_disable_asynccancel,%r2 ASM_LINE_SEP +# endif +# else +# ifdef PIC +# define CENABLE .import __librt_enable_asynccancel,code ASM_LINE_SEP \ + bl __librt_enable_asynccancel,%r2 ASM_LINE_SEP +# define CDISABLE .import __librt_disable_asynccancel,code ASM_LINE_SEP \ + bl __librt_disable_asynccancel,%r2 ASM_LINE_SEP +# else +# define CENABLE .import __librt_enable_asynccancel,code ASM_LINE_SEP \ + bl __librt_enable_asynccancel,%r2 ASM_LINE_SEP +# define CDISABLE .import __librt_disable_asynccancel,code ASM_LINE_SEP \ + bl __librt_disable_asynccancel,%r2 ASM_LINE_SEP +# endif +# endif + +# ifdef IS_IN_libpthread +# define __local_multiple_threads __pthread_multiple_threads +# elif !defined NOT_IN_libc +# define __local_multiple_threads __libc_multiple_threads +# else +# define __local_multiple_threads __librt_multiple_threads +# endif + +# ifndef __ASSEMBLER__ +# define SINGLE_THREAD_P \ + __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ + header.multiple_threads) == 0, 1) +# else +/* Read the value of header.multiple_threads from the thread pointer */ +# define SINGLE_THREAD_P \ + mfctl %cr27, %ret0 ASM_LINE_SEP \ + ldw MULTIPLE_THREADS_THREAD_OFFSET(%sr0,%ret0),%ret0 ASM_LINE_SEP +# endif +#elif !defined __ASSEMBLER__ + +/* This code should never be used but we define it anyhow. */ +# define SINGLE_THREAD_P (1) +# define NO_CANCELLATION 1 + +#endif +/* !defined NOT_IN_libc || defined IS_IN_libpthread */ diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c new file mode 100644 index 0000000000..c8142cb543 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c @@ -0,0 +1,21 @@ +/* Copyright (C) 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 + 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; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#define LIBGCC_S_SO "libgcc_s.so.2" +#include + diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c b/sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c new file mode 100644 index 0000000000..6d1da85504 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c @@ -0,0 +1,21 @@ +/* Copyright (C) 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 + 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; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#define LIBGCC_S_SO "libgcc_s.so.2" +#include + diff --git a/sysdeps/unix/sysv/linux/hppa/xstat.c b/sysdeps/unix/sysv/linux/hppa/xstat.c new file mode 100644 index 0000000000..e9869f5508 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/xstat.c @@ -0,0 +1 @@ +#include From 4f9c5a916b67e097cfc48240420f506d96c3e0d5 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Sun, 16 Jul 2006 18:25:24 +0000 Subject: [PATCH 3636/4487] 2006-07-15 Jeff Bailey * sysdeps/hppa/nptl/tls.h (TLS_INIT_TP): Return NULL. --- ChangeLog.hppa | 4 ++++ sysdeps/hppa/nptl/tls.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 076ce1ffa8..b4c45d7818 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,7 @@ +2006-07-15 Jeff Bailey + + * sysdeps/hppa/nptl/tls.h (TLS_INIT_TP): Return NULL. + 2006-07-13 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/xstat.c: New file. diff --git a/sysdeps/hppa/nptl/tls.h b/sysdeps/hppa/nptl/tls.h index 1bbeeaafac..0759aec8f0 100644 --- a/sysdeps/hppa/nptl/tls.h +++ b/sysdeps/hppa/nptl/tls.h @@ -102,7 +102,7 @@ typedef struct special attention since 'errno' is not yet available and if the operation can cause a failure 'errno' must not be touched. */ # define TLS_INIT_TP(tcbp, secondcall) \ - ({ __set_cr27(tcbp); 0; }) + ({ __set_cr27(tcbp); NULL; }) /* Return the address of the dtv for the current thread. */ # define THREAD_DTV() \ From f765aca3da66aa960ec8901613362c75ea755833 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Sun, 16 Jul 2006 18:31:20 +0000 Subject: [PATCH 3637/4487] 2006-07-16 Jeff Bailey * sysdeps/hppa/tst-audit.h: New file. 2006-07-16 Carlos O'Donell * sysdeps/hppa/tls-macros.h: Cleanup formatting. --- ChangeLog.hppa | 8 ++++++++ sysdeps/hppa/tls-macros.h | 19 ++++++++++--------- sysdeps/hppa/tst-audit.h | 26 ++++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 9 deletions(-) create mode 100644 sysdeps/hppa/tst-audit.h diff --git a/ChangeLog.hppa b/ChangeLog.hppa index b4c45d7818..d2c19a38f6 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,11 @@ +2006-07-16 Jeff Bailey + + * sysdeps/hppa/tst-audit.h: New file. + +2006-07-16 Carlos O'Donell + + * sysdeps/hppa/tls-macros.h: Cleanup formatting. + 2006-07-15 Jeff Bailey * sysdeps/hppa/nptl/tls.h (TLS_INIT_TP): Return NULL. diff --git a/sysdeps/hppa/tls-macros.h b/sysdeps/hppa/tls-macros.h index 4c5564b61d..f5a1cd8f3d 100644 --- a/sysdeps/hppa/tls-macros.h +++ b/sysdeps/hppa/tls-macros.h @@ -1,6 +1,7 @@ +/* TLS Access Macros for HP PARISC Linux */ /* HPPA Local Exec TLS access. */ -# define TLS_LE(x) \ +#define TLS_LE(x) \ ({ int * __result; \ unsigned long __tmp; \ asm ( \ @@ -14,7 +15,7 @@ }) /* HPPA Initial Exec TLS access. */ -# ifdef PIC +#ifdef PIC # define TLS_IE(x) \ ({ int * __result; \ unsigned long __tmp, __tmp2; \ @@ -28,7 +29,7 @@ : "r1" ); \ __result; \ }) -# else +#else # define TLS_IE(x) \ ({ int * __result; \ unsigned long __tmp, __tmp2; \ @@ -42,9 +43,9 @@ : "r1" ); \ __result; \ }) -# endif +#endif -# ifdef PIC +#ifdef PIC /* HPPA Local Dynamic TLS access. */ # define TLS_LD(x) \ ({ int * __result; \ @@ -62,7 +63,7 @@ "r25", "r26", "r28", "r29", "r31" ); \ __result; \ }) -# else +#else # define TLS_LD(x) \ ({ int * __result; \ asm ( \ @@ -77,10 +78,10 @@ "r25", "r26", "r28", "r29", "r31" ); \ __result; \ }) -# endif +#endif /* HPPA General Dynamic TLS access. */ -# ifdef PIC +#ifdef PIC # define TLS_GD(x) \ ({ int * __result; \ asm ( \ @@ -96,7 +97,7 @@ "r25", "r26", "r28", "r29", "r31" ); \ __result; \ }) -# else +#else # define TLS_GD(x) \ ({ int * __result; \ asm ( \ diff --git a/sysdeps/hppa/tst-audit.h b/sysdeps/hppa/tst-audit.h new file mode 100644 index 0000000000..93b4592258 --- /dev/null +++ b/sysdeps/hppa/tst-audit.h @@ -0,0 +1,26 @@ +/* Definitions for testing PLT entry/exit auditing. HP-PARISC version. + + Copyright (C) 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 + 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. */ + +#define pltenter la_hppa_gnu_pltenter +#define pltexit la_hppa_gnu_pltexit +#define La_regs La_hppa_regs +#define La_retval La_hppa_retval +#define int_retval lrv_r28 From 6dc958e5dd7a648516569725cdf845ff08c94e3e Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Tue, 18 Jul 2006 22:46:12 +0000 Subject: [PATCH 3638/4487] 2006-07-18 Carlos O'Donell * sysdeps/hppa/nptl/pthread_spin_lock.c (pthread_spin_lock): Swap newval and oldval. * sysdeps/hppa/nptl/pthread_spin_trylock.c (pthread_spin_trylock): Likewise. --- ChangeLog.hppa | 7 +++++++ sysdeps/hppa/nptl/pthread_spin_lock.c | 2 +- sysdeps/hppa/nptl/pthread_spin_trylock.c | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index d2c19a38f6..08da881bb7 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,10 @@ +2006-07-18 Carlos O'Donell + + * sysdeps/hppa/nptl/pthread_spin_lock.c (pthread_spin_lock): Swap + newval and oldval. + * sysdeps/hppa/nptl/pthread_spin_trylock.c (pthread_spin_trylock): + Likewise. + 2006-07-16 Jeff Bailey * sysdeps/hppa/tst-audit.h: New file. diff --git a/sysdeps/hppa/nptl/pthread_spin_lock.c b/sysdeps/hppa/nptl/pthread_spin_lock.c index 9a36967e6e..966f5c9187 100644 --- a/sysdeps/hppa/nptl/pthread_spin_lock.c +++ b/sysdeps/hppa/nptl/pthread_spin_lock.c @@ -31,7 +31,7 @@ pthread_spin_lock (pthread_spinlock_t *lock) return 0; #endif - while (atomic_compare_and_exchange_val_acq(lock, 0, 1) == 1) + while (atomic_compare_and_exchange_val_acq(lock, 1, 0) == 1) while (*lock == 1); return 0; diff --git a/sysdeps/hppa/nptl/pthread_spin_trylock.c b/sysdeps/hppa/nptl/pthread_spin_trylock.c index 8d0ec1d9b8..609a62f621 100644 --- a/sysdeps/hppa/nptl/pthread_spin_trylock.c +++ b/sysdeps/hppa/nptl/pthread_spin_trylock.c @@ -29,6 +29,6 @@ pthread_spin_trylock (pthread_spinlock_t *lock) return __ldcw (a) ? 0 : EBUSY; #endif - return atomic_compare_and_exchange_val_acq(lock, 0, 1) ? EBUSY : 0; + return atomic_compare_and_exchange_val_acq(lock, 1, 0) ? EBUSY : 0; } From bb600a60fb47ddb9fba97ed95f72bbd9c46a5fe9 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Mon, 24 Jul 2006 15:42:07 +0000 Subject: [PATCH 3639/4487] * sysdeps/unix/sysv/linux/mips/sigaction.c: If WRAPPER_INCLUDE is defined, include the named file. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/sigaction.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog.mips b/ChangeLog.mips index 16e092fd4e..358a48674b 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2006-07-24 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/sigaction.c: If WRAPPER_INCLUDE is + defined, include the named file. + 2006-06-08 Daniel Jacobowitz * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Reformat. diff --git a/sysdeps/unix/sysv/linux/mips/sigaction.c b/sysdeps/unix/sysv/linux/mips/sigaction.c index 8e2ca42bb4..c05dfd1f6e 100644 --- a/sysdeps/unix/sysv/linux/mips/sigaction.c +++ b/sysdeps/unix/sysv/linux/mips/sigaction.c @@ -153,6 +153,10 @@ __libc_sigaction (sig, act, oact) } libc_hidden_def (__libc_sigaction) +#ifdef WRAPPER_INCLUDE +# include WRAPPER_INCLUDE +#endif + #ifndef LIBC_SIGACTION weak_alias (__libc_sigaction, __sigaction) libc_hidden_weak (__sigaction) From f4151d899dfab142599500113acba3cb72bf261b Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Mon, 24 Jul 2006 15:43:02 +0000 Subject: [PATCH 3640/4487] * sysdeps/unix/sysv/linux/arm/sigaction.c: If WRAPPER_INCLUDE is defined, include the named file. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/sigaction.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 7e0d19c89d..15a83cdb6a 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2006-07-24 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/arm/sigaction.c: If WRAPPER_INCLUDE is + defined, include the named file. + 2006-07-05 Daniel Jacobowitz * sysdeps/unix/sysv/linux/arm/sys/ucontext.h: Include diff --git a/sysdeps/unix/sysv/linux/arm/sigaction.c b/sysdeps/unix/sysv/linux/arm/sigaction.c index 6dd189b5c5..2d890d04e5 100644 --- a/sysdeps/unix/sysv/linux/arm/sigaction.c +++ b/sysdeps/unix/sysv/linux/arm/sigaction.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2005 +/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -151,6 +151,10 @@ __libc_sigaction (sig, act, oact) } libc_hidden_def (__libc_sigaction) +#ifdef WRAPPER_INCLUDE +# include WRAPPER_INCLUDE +#endif + #ifndef LIBC_SIGACTION weak_alias (__libc_sigaction, __sigaction) libc_hidden_weak (__sigaction) From 74321891c1f00215e4f41bb64fd98261f2c3703e Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Mon, 24 Jul 2006 15:51:50 +0000 Subject: [PATCH 3641/4487] * sysdeps/mips/mips64/n32/libm-test-ulps, sysdeps/mips/mips64/n64/libm-test-ulps: New. --- ChangeLog.mips | 5 + sysdeps/mips/mips64/n32/libm-test-ulps | 1245 ++++++++++++++++++++++++ sysdeps/mips/mips64/n64/libm-test-ulps | 1245 ++++++++++++++++++++++++ 3 files changed, 2495 insertions(+) create mode 100644 sysdeps/mips/mips64/n32/libm-test-ulps create mode 100644 sysdeps/mips/mips64/n64/libm-test-ulps diff --git a/ChangeLog.mips b/ChangeLog.mips index 358a48674b..95cd815413 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2006-07-24 Joseph Myers + + * sysdeps/mips/mips64/n32/libm-test-ulps, + sysdeps/mips/mips64/n64/libm-test-ulps: New. + 2006-07-24 Joseph Myers * sysdeps/unix/sysv/linux/mips/sigaction.c: If WRAPPER_INCLUDE is diff --git a/sysdeps/mips/mips64/n32/libm-test-ulps b/sysdeps/mips/mips64/n32/libm-test-ulps new file mode 100644 index 0000000000..d9df631d7c --- /dev/null +++ b/sysdeps/mips/mips64/n32/libm-test-ulps @@ -0,0 +1,1245 @@ +# Begin of automatic generation + +# atan2 +Test "atan2 (-0.00756827042671106339, -.001792735857538728036) == -1.80338464113663849327153994379639112": +ildouble: 1 +ldouble: 1 +Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# atanh +Test "atanh (0.75) == 0.972955074527656652552676371721589865": +float: 1 +ifloat: 1 + +# cacos +Test "Imaginary part of: cacos (0.75 + 1.25 i) == 1.11752014915610270578240049553777969 - 1.13239363160530819522266333696834467 i": +ildouble: 1 +ldouble: 1 + +# cacosh +Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# casin +Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": +ildouble: 1 +ldouble: 1 + +# casinh +Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": +double: 5 +float: 1 +idouble: 5 +ifloat: 1 +ildouble: 4 +ldouble: 4 +Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": +double: 3 +float: 6 +idouble: 3 +ifloat: 6 +ildouble: 2 +ldouble: 2 +Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# catan +Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: catan (0.75 + 1.25 i) == 1.10714871779409050301706546017853704 + 0.549306144334054845697622618461262852 i": +ildouble: 1 +ldouble: 1 + +# catanh +Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": +double: 4 +idouble: 4 +Test "Real part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i": +ildouble: 1 +ldouble: 1 + +# cbrt +Test "cbrt (-0.001) == -0.1": +ildouble: 1 +ldouble: 1 +Test "cbrt (-27.0) == -3.0": +double: 1 +idouble: 1 +Test "cbrt (0.75) == 0.908560296416069829445605878163630251": +double: 1 +idouble: 1 +Test "cbrt (0.9921875) == 0.997389022060725270579075195353955217": +double: 1 +idouble: 1 + +# ccos +Test "Real part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": +float: 1 +ifloat: 1 + +# ccosh +Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": +float: 1 +ifloat: 1 + +# cexp +Test "Real part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": +ildouble: 1 +ldouble: 1 + +# clog +Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# clog10 +Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf + inf i) == inf + 3/4 pi*log10(e) i": +double: 1 +idouble: 1 +Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# cos +Test "cos (M_PI_6l * 2.0) == 0.5": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "cos (M_PI_6l * 4.0) == -0.5": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# cpow +Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": +float: 1 +ifloat: 1 +Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i": +double: 1 +float: 4 +idouble: 1 +ifloat: 4 +ildouble: 4 +ldouble: 4 +Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i": +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i": +double: 2 +float: 3 +idouble: 2 +ifloat: 3 +ildouble: 10 +ldouble: 10 +Test "Real part of: cpow (2 + 0 i, 10 + 0 i) == 1024.0 + 0.0 i": +ildouble: 2 +ldouble: 2 +Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": +double: 1 +float: 4 +idouble: 1 +ifloat: 4 +ildouble: 3 +ldouble: 3 +Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": +float: 2 +ifloat: 2 +Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +ildouble: 1 +ldouble: 1 + +# csin +Test "Imaginary part of: csin (-2 - 3 i) == -9.15449914691142957346729954460983256 + 4.16890695996656435075481305885375484 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: csin (0.75 + 1.25 i) == 1.28722291002649188575873510790565441 + 1.17210635989270256101081285116138863 i": +ildouble: 1 +ldouble: 1 + +# csinh +Test "Real part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i": +double: 1 +idouble: 1 +Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": +float: 1 +ifloat: 1 + +# csqrt +Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csqrt (0.75 + 1.25 i) == 1.05065169626078392338656675760808326 + 0.594868882070379067881984030639932657 i": +ildouble: 1 +ldouble: 1 + +# ctan +Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i": +double: 1 +idouble: 1 +ildouble: 2 +ldouble: 2 + +# ctanh +Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i": +float: 1 +ifloat: 1 +Test "Real part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i": +double: 1 +idouble: 1 + +# erf +Test "erf (1.25) == 0.922900128256458230136523481197281140": +double: 1 +idouble: 1 + +# erfc +Test "erfc (2.0) == 0.00467773498104726583793074363274707139": +double: 1 +idouble: 1 +Test "erfc (27.0) == 0.523704892378925568501606768284954709e-318": +ildouble: 1 +ldouble: 1 +Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8": +double: 1 +idouble: 1 + +# exp10 +Test "exp10 (-1) == 0.1": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "exp10 (0.75) == 5.62341325190349080394951039776481231": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "exp10 (3) == 1000": +double: 6 +float: 2 +idouble: 6 +ifloat: 2 +ildouble: 1 +ldouble: 1 + +# exp2 +Test "exp2 (10) == 1024": +ildouble: 2 +ldouble: 2 + +# expm1 +Test "expm1 (0.75) == 1.11700001661267466854536981983709561": +double: 1 +idouble: 1 +Test "expm1 (1) == M_El - 1.0": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# gamma +Test "gamma (-0.5) == log(2*sqrt(pi))": +ildouble: 1 +ldouble: 1 + +# hypot +Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 + +# j0 +Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "j0 (0.75) == 0.864242275166648623555731103820923211": +float: 1 +ifloat: 1 +Test "j0 (10.0) == -0.245935764451348335197760862485328754": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "j0 (2.0) == 0.223890779141235668051827454649948626": +float: 2 +ifloat: 2 +ildouble: 2 +ldouble: 2 +Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "j0 (8.0) == 0.171650807137553906090869407851972001": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# j1 +Test "j1 (-1.0) == -0.440050585744933515959682203718914913": +ildouble: 1 +ldouble: 1 +Test "j1 (0.75) == 0.349243602174862192523281016426251335": +ildouble: 1 +ldouble: 1 +Test "j1 (1.0) == 0.440050585744933515959682203718914913": +ildouble: 1 +ldouble: 1 +Test "j1 (10.0) == 0.0434727461688614366697487680258592883": +float: 2 +ifloat: 2 +ildouble: 2 +ldouble: 2 +Test "j1 (2.0) == 0.576724807756873387202448242269137087": +double: 1 +idouble: 1 +Test "j1 (8.0) == 0.234636346853914624381276651590454612": +double: 1 +idouble: 1 +ildouble: 4 +ldouble: 4 + +# jn +Test "jn (0, -4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (0, 0.75) == 0.864242275166648623555731103820923211": +float: 1 +ifloat: 1 +Test "jn (0, 10.0) == -0.245935764451348335197760862485328754": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "jn (0, 2.0) == 0.223890779141235668051827454649948626": +float: 2 +ifloat: 2 +ildouble: 2 +ldouble: 2 +Test "jn (0, 4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (0, 8.0) == 0.171650807137553906090869407851972001": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "jn (1, -1.0) == -0.440050585744933515959682203718914913": +ildouble: 1 +ldouble: 1 +Test "jn (1, 0.75) == 0.349243602174862192523281016426251335": +ildouble: 1 +ldouble: 1 +Test "jn (1, 1.0) == 0.440050585744933515959682203718914913": +ildouble: 1 +ldouble: 1 +Test "jn (1, 10.0) == 0.0434727461688614366697487680258592883": +float: 2 +ifloat: 2 +ildouble: 2 +ldouble: 2 +Test "jn (1, 2.0) == 0.576724807756873387202448242269137087": +double: 1 +idouble: 1 +Test "jn (1, 8.0) == 0.234636346853914624381276651590454612": +double: 1 +idouble: 1 +ildouble: 4 +ldouble: 4 +Test "jn (10, -1.0) == 0.263061512368745320699785368779050294e-9": +ildouble: 1 +ldouble: 1 +Test "jn (10, 0.125) == 0.250543369809369890173993791865771547e-18": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "jn (10, 0.75) == 0.149621713117596814698712483621682835e-10": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "jn (10, 1.0) == 0.263061512368745320699785368779050294e-9": +ildouble: 1 +ldouble: 1 +Test "jn (10, 10.0) == 0.207486106633358857697278723518753428": +double: 4 +float: 3 +idouble: 4 +ifloat: 3 +ildouble: 2 +ldouble: 2 +Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6": +float: 4 +ifloat: 4 +Test "jn (3, 0.125) == 0.406503832554912875023029337653442868e-4": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (3, 0.75) == 0.848438342327410884392755236884386804e-2": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (3, 10.0) == 0.0583793793051868123429354784103409563": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "jn (3, 2.0) == 0.128943249474402051098793332969239835": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +# lgamma +Test "lgamma (-0.5) == log(2*sqrt(pi))": +ildouble: 1 +ldouble: 1 +Test "lgamma (0.7) == 0.260867246531666514385732417016759578": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 1 +ldouble: 1 + +# log10 +Test "log10 (0.75) == -0.124938736608299953132449886193870744": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +Test "log10 (e) == log10(e)": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# log1p +Test "log1p (-0.25) == -0.287682072451780927439219005993827432": +float: 1 +ifloat: 1 + +# log2 +Test "log2 (0.75) == -.415037499278843818546261056052183492": +ildouble: 1 +ldouble: 1 + +# sincos +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res": +float: 1 +ifloat: 1 + +# sqrt +Test "sqrt (2) == M_SQRT2l": +ildouble: 1 +ldouble: 1 + +# tanh +Test "tanh (-0.75) == -0.635148952387287319214434357312496495": +ildouble: 1 +ldouble: 1 +Test "tanh (-1.0) == -0.7615941559557648881194582826047935904": +ildouble: 1 +ldouble: 1 +Test "tanh (0.75) == 0.635148952387287319214434357312496495": +ildouble: 1 +ldouble: 1 +Test "tanh (1.0) == 0.7615941559557648881194582826047935904": +ildouble: 1 +ldouble: 1 + +# tgamma +Test "tgamma (-0.5) == -2 sqrt (pi)": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "tgamma (0.5) == sqrt (pi)": +float: 1 +ifloat: 1 +Test "tgamma (0.7) == 1.29805533264755778568117117915281162": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "tgamma (4) == 6": +ildouble: 1 +ldouble: 1 + +# y0 +Test "y0 (1.0) == 0.0882569642156769579829267660235151628": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "y0 (1.5) == 0.382448923797758843955068554978089862": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "y0 (10.0) == 0.0556711672835993914244598774101900481": +float: 1 +ifloat: 1 +ildouble: 3 +ldouble: 3 +Test "y0 (8.0) == 0.223521489387566220527323400498620359": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 3 +ldouble: 3 + +# y1 +Test "y1 (0.125) == -5.19993611253477499595928744876579921": +double: 1 +idouble: 1 +Test "y1 (0.75) == -1.03759455076928541973767132140642198": +ildouble: 1 +ldouble: 1 +Test "y1 (1.5) == -0.412308626973911295952829820633445323": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "y1 (10.0) == 0.249015424206953883923283474663222803": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "y1 (2.0) == -0.107032431540937546888370772277476637": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "y1 (8.0) == -0.158060461731247494255555266187483550": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 1 +ldouble: 1 + +# yn +Test "yn (0, 1.0) == 0.0882569642156769579829267660235151628": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "yn (0, 1.5) == 0.382448923797758843955068554978089862": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "yn (0, 10.0) == 0.0556711672835993914244598774101900481": +float: 1 +ifloat: 1 +ildouble: 3 +ldouble: 3 +Test "yn (0, 8.0) == 0.223521489387566220527323400498620359": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 3 +ldouble: 3 +Test "yn (1, 0.125) == -5.19993611253477499595928744876579921": +double: 1 +idouble: 1 +Test "yn (1, 0.75) == -1.03759455076928541973767132140642198": +ildouble: 1 +ldouble: 1 +Test "yn (1, 1.5) == -0.412308626973911295952829820633445323": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "yn (1, 10.0) == 0.249015424206953883923283474663222803": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "yn (1, 2.0) == -0.107032431540937546888370772277476637": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "yn (1, 8.0) == -0.158060461731247494255555266187483550": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 1 +ldouble: 1 +Test "yn (10, 0.125) == -127057845771019398.252538486899753195": +double: 1 +idouble: 1 +ildouble: 2 +ldouble: 2 +Test "yn (10, 0.75) == -2133501638.90573424452445412893839236": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 5 +ldouble: 5 +Test "yn (10, 1.0) == -121618014.278689189288130426667971145": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "yn (10, 10.0) == -0.359814152183402722051986577343560609": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "yn (10, 2.0) == -129184.542208039282635913145923304214": +double: 2 +idouble: 2 +ildouble: 2 +ldouble: 2 +Test "yn (3, 0.125) == -2612.69757350066712600220955744091741": +double: 1 +idouble: 1 +Test "yn (3, 0.75) == -12.9877176234475433186319774484809207": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "yn (3, 10.0) == -0.251362657183837329779204747654240998": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "yn (3, 2.0) == -1.12778377684042778608158395773179238": +double: 1 +idouble: 1 + +# Maximal error of functions: +Function: "atan2": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "atanh": +float: 1 +ifloat: 1 + +Function: Imaginary part of "cacos": +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "cacosh": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "casin": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "casin": +ildouble: 1 +ldouble: 1 + +Function: Real part of "casinh": +double: 5 +float: 1 +idouble: 5 +ifloat: 1 +ildouble: 4 +ldouble: 4 + +Function: Imaginary part of "casinh": +double: 3 +float: 6 +idouble: 3 +ifloat: 6 +ildouble: 2 +ldouble: 2 + +Function: Imaginary part of "catan": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "catanh": +double: 4 +idouble: 4 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "catanh": +ildouble: 1 +ldouble: 1 + +Function: "cbrt": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "ccos": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "ccos": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "ccosh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "ccosh": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "cexp": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "cexp": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "clog": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "clog10": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "clog10": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "cos": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "cpow": +double: 2 +float: 4 +idouble: 2 +ifloat: 4 +ildouble: 10 +ldouble: 10 + +Function: Imaginary part of "cpow": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +ildouble: 1 +ldouble: 1 + +Function: Real part of "csin": +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "csin": +ildouble: 1 +ldouble: 1 + +Function: Real part of "csinh": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "csinh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "csqrt": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "csqrt": +ildouble: 1 +ldouble: 1 + +Function: Real part of "ctan": +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "ctan": +double: 1 +idouble: 1 +ildouble: 2 +ldouble: 2 + +Function: Real part of "ctanh": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "ctanh": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "erf": +double: 1 +idouble: 1 + +Function: "erfc": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +Function: "exp10": +double: 6 +float: 2 +idouble: 6 +ifloat: 2 +ildouble: 1 +ldouble: 1 + +Function: "exp2": +ildouble: 2 +ldouble: 2 + +Function: "expm1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "gamma": +ildouble: 1 +ldouble: 1 + +Function: "hypot": +float: 1 +ifloat: 1 + +Function: "j0": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +ildouble: 2 +ldouble: 2 + +Function: "j1": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 4 +ldouble: 4 + +Function: "jn": +double: 4 +float: 4 +idouble: 4 +ifloat: 4 +ildouble: 4 +ldouble: 4 + +Function: "lgamma": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 1 +ldouble: 1 + +Function: "log10": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 1 +ldouble: 1 + +Function: "log1p": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "log2": +ildouble: 1 +ldouble: 1 + +Function: "sincos": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "sqrt": +ildouble: 1 +ldouble: 1 + +Function: "tan": +double: 1 +idouble: 1 + +Function: "tanh": +ildouble: 1 +ldouble: 1 + +Function: "tgamma": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "y0": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 3 +ldouble: 3 + +Function: "y1": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 +ildouble: 1 +ldouble: 1 + +Function: "yn": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 +ildouble: 5 +ldouble: 5 + +# end of automatic generation diff --git a/sysdeps/mips/mips64/n64/libm-test-ulps b/sysdeps/mips/mips64/n64/libm-test-ulps new file mode 100644 index 0000000000..d9df631d7c --- /dev/null +++ b/sysdeps/mips/mips64/n64/libm-test-ulps @@ -0,0 +1,1245 @@ +# Begin of automatic generation + +# atan2 +Test "atan2 (-0.00756827042671106339, -.001792735857538728036) == -1.80338464113663849327153994379639112": +ildouble: 1 +ldouble: 1 +Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# atanh +Test "atanh (0.75) == 0.972955074527656652552676371721589865": +float: 1 +ifloat: 1 + +# cacos +Test "Imaginary part of: cacos (0.75 + 1.25 i) == 1.11752014915610270578240049553777969 - 1.13239363160530819522266333696834467 i": +ildouble: 1 +ldouble: 1 + +# cacosh +Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# casin +Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": +ildouble: 1 +ldouble: 1 + +# casinh +Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": +double: 5 +float: 1 +idouble: 5 +ifloat: 1 +ildouble: 4 +ldouble: 4 +Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": +double: 3 +float: 6 +idouble: 3 +ifloat: 6 +ildouble: 2 +ldouble: 2 +Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# catan +Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: catan (0.75 + 1.25 i) == 1.10714871779409050301706546017853704 + 0.549306144334054845697622618461262852 i": +ildouble: 1 +ldouble: 1 + +# catanh +Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": +double: 4 +idouble: 4 +Test "Real part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i": +ildouble: 1 +ldouble: 1 + +# cbrt +Test "cbrt (-0.001) == -0.1": +ildouble: 1 +ldouble: 1 +Test "cbrt (-27.0) == -3.0": +double: 1 +idouble: 1 +Test "cbrt (0.75) == 0.908560296416069829445605878163630251": +double: 1 +idouble: 1 +Test "cbrt (0.9921875) == 0.997389022060725270579075195353955217": +double: 1 +idouble: 1 + +# ccos +Test "Real part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": +float: 1 +ifloat: 1 + +# ccosh +Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": +float: 1 +ifloat: 1 + +# cexp +Test "Real part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": +ildouble: 1 +ldouble: 1 + +# clog +Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# clog10 +Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf + inf i) == inf + 3/4 pi*log10(e) i": +double: 1 +idouble: 1 +Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# cos +Test "cos (M_PI_6l * 2.0) == 0.5": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "cos (M_PI_6l * 4.0) == -0.5": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# cpow +Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": +float: 1 +ifloat: 1 +Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i": +double: 1 +float: 4 +idouble: 1 +ifloat: 4 +ildouble: 4 +ldouble: 4 +Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i": +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i": +double: 2 +float: 3 +idouble: 2 +ifloat: 3 +ildouble: 10 +ldouble: 10 +Test "Real part of: cpow (2 + 0 i, 10 + 0 i) == 1024.0 + 0.0 i": +ildouble: 2 +ldouble: 2 +Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": +double: 1 +float: 4 +idouble: 1 +ifloat: 4 +ildouble: 3 +ldouble: 3 +Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": +float: 2 +ifloat: 2 +Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +ildouble: 1 +ldouble: 1 + +# csin +Test "Imaginary part of: csin (-2 - 3 i) == -9.15449914691142957346729954460983256 + 4.16890695996656435075481305885375484 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: csin (0.75 + 1.25 i) == 1.28722291002649188575873510790565441 + 1.17210635989270256101081285116138863 i": +ildouble: 1 +ldouble: 1 + +# csinh +Test "Real part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i": +double: 1 +idouble: 1 +Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": +float: 1 +ifloat: 1 + +# csqrt +Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csqrt (0.75 + 1.25 i) == 1.05065169626078392338656675760808326 + 0.594868882070379067881984030639932657 i": +ildouble: 1 +ldouble: 1 + +# ctan +Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i": +double: 1 +idouble: 1 +ildouble: 2 +ldouble: 2 + +# ctanh +Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i": +float: 1 +ifloat: 1 +Test "Real part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i": +double: 1 +idouble: 1 + +# erf +Test "erf (1.25) == 0.922900128256458230136523481197281140": +double: 1 +idouble: 1 + +# erfc +Test "erfc (2.0) == 0.00467773498104726583793074363274707139": +double: 1 +idouble: 1 +Test "erfc (27.0) == 0.523704892378925568501606768284954709e-318": +ildouble: 1 +ldouble: 1 +Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8": +double: 1 +idouble: 1 + +# exp10 +Test "exp10 (-1) == 0.1": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "exp10 (0.75) == 5.62341325190349080394951039776481231": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "exp10 (3) == 1000": +double: 6 +float: 2 +idouble: 6 +ifloat: 2 +ildouble: 1 +ldouble: 1 + +# exp2 +Test "exp2 (10) == 1024": +ildouble: 2 +ldouble: 2 + +# expm1 +Test "expm1 (0.75) == 1.11700001661267466854536981983709561": +double: 1 +idouble: 1 +Test "expm1 (1) == M_El - 1.0": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# gamma +Test "gamma (-0.5) == log(2*sqrt(pi))": +ildouble: 1 +ldouble: 1 + +# hypot +Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 + +# j0 +Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "j0 (0.75) == 0.864242275166648623555731103820923211": +float: 1 +ifloat: 1 +Test "j0 (10.0) == -0.245935764451348335197760862485328754": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "j0 (2.0) == 0.223890779141235668051827454649948626": +float: 2 +ifloat: 2 +ildouble: 2 +ldouble: 2 +Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "j0 (8.0) == 0.171650807137553906090869407851972001": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# j1 +Test "j1 (-1.0) == -0.440050585744933515959682203718914913": +ildouble: 1 +ldouble: 1 +Test "j1 (0.75) == 0.349243602174862192523281016426251335": +ildouble: 1 +ldouble: 1 +Test "j1 (1.0) == 0.440050585744933515959682203718914913": +ildouble: 1 +ldouble: 1 +Test "j1 (10.0) == 0.0434727461688614366697487680258592883": +float: 2 +ifloat: 2 +ildouble: 2 +ldouble: 2 +Test "j1 (2.0) == 0.576724807756873387202448242269137087": +double: 1 +idouble: 1 +Test "j1 (8.0) == 0.234636346853914624381276651590454612": +double: 1 +idouble: 1 +ildouble: 4 +ldouble: 4 + +# jn +Test "jn (0, -4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (0, 0.75) == 0.864242275166648623555731103820923211": +float: 1 +ifloat: 1 +Test "jn (0, 10.0) == -0.245935764451348335197760862485328754": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "jn (0, 2.0) == 0.223890779141235668051827454649948626": +float: 2 +ifloat: 2 +ildouble: 2 +ldouble: 2 +Test "jn (0, 4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (0, 8.0) == 0.171650807137553906090869407851972001": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "jn (1, -1.0) == -0.440050585744933515959682203718914913": +ildouble: 1 +ldouble: 1 +Test "jn (1, 0.75) == 0.349243602174862192523281016426251335": +ildouble: 1 +ldouble: 1 +Test "jn (1, 1.0) == 0.440050585744933515959682203718914913": +ildouble: 1 +ldouble: 1 +Test "jn (1, 10.0) == 0.0434727461688614366697487680258592883": +float: 2 +ifloat: 2 +ildouble: 2 +ldouble: 2 +Test "jn (1, 2.0) == 0.576724807756873387202448242269137087": +double: 1 +idouble: 1 +Test "jn (1, 8.0) == 0.234636346853914624381276651590454612": +double: 1 +idouble: 1 +ildouble: 4 +ldouble: 4 +Test "jn (10, -1.0) == 0.263061512368745320699785368779050294e-9": +ildouble: 1 +ldouble: 1 +Test "jn (10, 0.125) == 0.250543369809369890173993791865771547e-18": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "jn (10, 0.75) == 0.149621713117596814698712483621682835e-10": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "jn (10, 1.0) == 0.263061512368745320699785368779050294e-9": +ildouble: 1 +ldouble: 1 +Test "jn (10, 10.0) == 0.207486106633358857697278723518753428": +double: 4 +float: 3 +idouble: 4 +ifloat: 3 +ildouble: 2 +ldouble: 2 +Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6": +float: 4 +ifloat: 4 +Test "jn (3, 0.125) == 0.406503832554912875023029337653442868e-4": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (3, 0.75) == 0.848438342327410884392755236884386804e-2": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (3, 10.0) == 0.0583793793051868123429354784103409563": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "jn (3, 2.0) == 0.128943249474402051098793332969239835": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +# lgamma +Test "lgamma (-0.5) == log(2*sqrt(pi))": +ildouble: 1 +ldouble: 1 +Test "lgamma (0.7) == 0.260867246531666514385732417016759578": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 1 +ldouble: 1 + +# log10 +Test "log10 (0.75) == -0.124938736608299953132449886193870744": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +Test "log10 (e) == log10(e)": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# log1p +Test "log1p (-0.25) == -0.287682072451780927439219005993827432": +float: 1 +ifloat: 1 + +# log2 +Test "log2 (0.75) == -.415037499278843818546261056052183492": +ildouble: 1 +ldouble: 1 + +# sincos +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res": +float: 1 +ifloat: 1 + +# sqrt +Test "sqrt (2) == M_SQRT2l": +ildouble: 1 +ldouble: 1 + +# tanh +Test "tanh (-0.75) == -0.635148952387287319214434357312496495": +ildouble: 1 +ldouble: 1 +Test "tanh (-1.0) == -0.7615941559557648881194582826047935904": +ildouble: 1 +ldouble: 1 +Test "tanh (0.75) == 0.635148952387287319214434357312496495": +ildouble: 1 +ldouble: 1 +Test "tanh (1.0) == 0.7615941559557648881194582826047935904": +ildouble: 1 +ldouble: 1 + +# tgamma +Test "tgamma (-0.5) == -2 sqrt (pi)": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "tgamma (0.5) == sqrt (pi)": +float: 1 +ifloat: 1 +Test "tgamma (0.7) == 1.29805533264755778568117117915281162": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "tgamma (4) == 6": +ildouble: 1 +ldouble: 1 + +# y0 +Test "y0 (1.0) == 0.0882569642156769579829267660235151628": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "y0 (1.5) == 0.382448923797758843955068554978089862": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "y0 (10.0) == 0.0556711672835993914244598774101900481": +float: 1 +ifloat: 1 +ildouble: 3 +ldouble: 3 +Test "y0 (8.0) == 0.223521489387566220527323400498620359": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 3 +ldouble: 3 + +# y1 +Test "y1 (0.125) == -5.19993611253477499595928744876579921": +double: 1 +idouble: 1 +Test "y1 (0.75) == -1.03759455076928541973767132140642198": +ildouble: 1 +ldouble: 1 +Test "y1 (1.5) == -0.412308626973911295952829820633445323": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "y1 (10.0) == 0.249015424206953883923283474663222803": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "y1 (2.0) == -0.107032431540937546888370772277476637": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "y1 (8.0) == -0.158060461731247494255555266187483550": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 1 +ldouble: 1 + +# yn +Test "yn (0, 1.0) == 0.0882569642156769579829267660235151628": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "yn (0, 1.5) == 0.382448923797758843955068554978089862": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "yn (0, 10.0) == 0.0556711672835993914244598774101900481": +float: 1 +ifloat: 1 +ildouble: 3 +ldouble: 3 +Test "yn (0, 8.0) == 0.223521489387566220527323400498620359": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 3 +ldouble: 3 +Test "yn (1, 0.125) == -5.19993611253477499595928744876579921": +double: 1 +idouble: 1 +Test "yn (1, 0.75) == -1.03759455076928541973767132140642198": +ildouble: 1 +ldouble: 1 +Test "yn (1, 1.5) == -0.412308626973911295952829820633445323": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "yn (1, 10.0) == 0.249015424206953883923283474663222803": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "yn (1, 2.0) == -0.107032431540937546888370772277476637": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "yn (1, 8.0) == -0.158060461731247494255555266187483550": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 1 +ldouble: 1 +Test "yn (10, 0.125) == -127057845771019398.252538486899753195": +double: 1 +idouble: 1 +ildouble: 2 +ldouble: 2 +Test "yn (10, 0.75) == -2133501638.90573424452445412893839236": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 5 +ldouble: 5 +Test "yn (10, 1.0) == -121618014.278689189288130426667971145": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "yn (10, 10.0) == -0.359814152183402722051986577343560609": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "yn (10, 2.0) == -129184.542208039282635913145923304214": +double: 2 +idouble: 2 +ildouble: 2 +ldouble: 2 +Test "yn (3, 0.125) == -2612.69757350066712600220955744091741": +double: 1 +idouble: 1 +Test "yn (3, 0.75) == -12.9877176234475433186319774484809207": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "yn (3, 10.0) == -0.251362657183837329779204747654240998": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "yn (3, 2.0) == -1.12778377684042778608158395773179238": +double: 1 +idouble: 1 + +# Maximal error of functions: +Function: "atan2": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "atanh": +float: 1 +ifloat: 1 + +Function: Imaginary part of "cacos": +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "cacosh": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "casin": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "casin": +ildouble: 1 +ldouble: 1 + +Function: Real part of "casinh": +double: 5 +float: 1 +idouble: 5 +ifloat: 1 +ildouble: 4 +ldouble: 4 + +Function: Imaginary part of "casinh": +double: 3 +float: 6 +idouble: 3 +ifloat: 6 +ildouble: 2 +ldouble: 2 + +Function: Imaginary part of "catan": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "catanh": +double: 4 +idouble: 4 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "catanh": +ildouble: 1 +ldouble: 1 + +Function: "cbrt": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "ccos": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "ccos": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "ccosh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "ccosh": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "cexp": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "cexp": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "clog": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "clog10": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "clog10": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "cos": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "cpow": +double: 2 +float: 4 +idouble: 2 +ifloat: 4 +ildouble: 10 +ldouble: 10 + +Function: Imaginary part of "cpow": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +ildouble: 1 +ldouble: 1 + +Function: Real part of "csin": +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "csin": +ildouble: 1 +ldouble: 1 + +Function: Real part of "csinh": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "csinh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "csqrt": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "csqrt": +ildouble: 1 +ldouble: 1 + +Function: Real part of "ctan": +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "ctan": +double: 1 +idouble: 1 +ildouble: 2 +ldouble: 2 + +Function: Real part of "ctanh": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "ctanh": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "erf": +double: 1 +idouble: 1 + +Function: "erfc": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +Function: "exp10": +double: 6 +float: 2 +idouble: 6 +ifloat: 2 +ildouble: 1 +ldouble: 1 + +Function: "exp2": +ildouble: 2 +ldouble: 2 + +Function: "expm1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "gamma": +ildouble: 1 +ldouble: 1 + +Function: "hypot": +float: 1 +ifloat: 1 + +Function: "j0": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +ildouble: 2 +ldouble: 2 + +Function: "j1": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 4 +ldouble: 4 + +Function: "jn": +double: 4 +float: 4 +idouble: 4 +ifloat: 4 +ildouble: 4 +ldouble: 4 + +Function: "lgamma": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 1 +ldouble: 1 + +Function: "log10": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 1 +ldouble: 1 + +Function: "log1p": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "log2": +ildouble: 1 +ldouble: 1 + +Function: "sincos": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "sqrt": +ildouble: 1 +ldouble: 1 + +Function: "tan": +double: 1 +idouble: 1 + +Function: "tanh": +ildouble: 1 +ldouble: 1 + +Function: "tgamma": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "y0": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 3 +ldouble: 3 + +Function: "y1": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 +ildouble: 1 +ldouble: 1 + +Function: "yn": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 +ildouble: 5 +ldouble: 5 + +# end of automatic generation From 259437280cf07970982d5c224f53dfa5b8027024 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Tue, 25 Jul 2006 01:58:10 +0000 Subject: [PATCH 3642/4487] 2006-07-24 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h: __SIZEOF_PTHREAD_COND_T is 64 bytes. Remove __PAD_ATOMIC_LOCK_T. --- ChangeLog.hppa | 5 +++++ sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h | 8 ++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 08da881bb7..9e23f804ed 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,8 @@ +2006-07-24 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h: + __SIZEOF_PTHREAD_COND_T is 64 bytes. Remove __PAD_ATOMIC_LOCK_T. + 2006-07-18 Carlos O'Donell * sysdeps/hppa/nptl/pthread_spin_lock.c (pthread_spin_lock): Swap diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h index 6b23be52de..e1c5325c0d 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h +++ b/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h @@ -24,6 +24,7 @@ sizeof(pthread_mutex_t) = 0x30 (48) sizeof(pthread_mutexattr_t) = 0x4 (4) sizeof(pthread_cond_t) = 0x30 (48) + = Grew to 64 bytes in NPTL. No pthread_cond_compat_t ... sizeof(pthread_condattr_t) = 0x4 (4) sizeof(pthread_rwlock_t) = 0x40 (64) @@ -34,7 +35,7 @@ #define __SIZEOF_PTHREAD_ATTR_T 36 #define __SIZEOF_PTHREAD_MUTEX_T 48 #define __SIZEOF_PTHREAD_MUTEXATTR_T 4 -#define __SIZEOF_PTHREAD_COND_T 48 +#define __SIZEOF_PTHREAD_COND_T 64 #define __SIZEOF_PTHREAD_COND_COMPAT_T 12 #define __SIZEOF_PTHREAD_CONDATTR_T 4 #define __SIZEOF_PTHREAD_RWLOCK_T 64 @@ -42,8 +43,6 @@ #define __SIZEOF_PTHREAD_BARRIER_T 48 #define __SIZEOF_PTHREAD_BARRIERATTR_T 4 -#define __PAD_ATOMIC_LOCK_T 12 - /* Thread identifiers. The structure of the attribute type is not exposed on purpose. */ typedef unsigned long int pthread_t; @@ -78,7 +77,6 @@ typedef union struct __pthread_mutex_s { int __lock; - char __size[__PAD_ATOMIC_LOCK_T]; unsigned int __count; int __owner; /* KIND must stay at this position in the structure to maintain @@ -109,7 +107,6 @@ typedef union struct { int __lock; - char __size[__PAD_ATOMIC_LOCK_T]; unsigned int __futex; __extension__ unsigned long long int __total_seq; __extension__ unsigned long long int __wakeup_seq; @@ -145,7 +142,6 @@ typedef union struct { int __lock; - char __size[__PAD_ATOMIC_LOCK_T]; unsigned int __nr_readers; unsigned int __readers_wakeup; unsigned int __writer_wakeup; From 2361f0b82af4256ac56d3a9497ff36104a4dc701 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 26 Jul 2006 01:27:06 +0000 Subject: [PATCH 3643/4487] Fix comment. --- sysdeps/unix/sysv/linux/alpha/bits/fcntl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h index 9b2e635d60..6084c38c91 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h @@ -94,7 +94,7 @@ # define F_NOTIFY 1026 /* Request notfications on a directory. */ #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() */ From e0fccb665e0b49ad738217a15c90ea588694456f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 29 Jul 2006 05:06:07 +0000 Subject: [PATCH 3644/4487] Define FUTEX_LOCK_PI, FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI. --- sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h index 1a2e8cbb07..58b4806eb2 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h @@ -33,6 +33,9 @@ #define FUTEX_CMP_REQUEUE 4 #define FUTEX_WAKE_OP 5 #define FUTEX_OP_CLEAR_WAKE_IF_GT_ONE ((4 << 24) | 1) +#define FUTEX_LOCK_PI 6 +#define FUTEX_UNLOCK_PI 7 +#define FUTEX_TRYLOCK_PI 8 /* Initializer for compatibility lock. */ #define LLL_MUTEX_LOCK_INITIALIZER (0) From 0ad4d3b0cb94d5d0d62067b5c4d810da8cae204b Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Fri, 4 Aug 2006 18:54:56 +0000 Subject: [PATCH 3645/4487] * sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h (FUTEX_LOCK_PI, FUTEX_UNLOCK_PI, FUTEX_TRYLOCK_PI): Define. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog.mips b/ChangeLog.mips index 95cd815413..b3bf0907f9 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2006-08-04 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h (FUTEX_LOCK_PI, + FUTEX_UNLOCK_PI, FUTEX_TRYLOCK_PI): Define. + 2006-07-24 Joseph Myers * sysdeps/mips/mips64/n32/libm-test-ulps, diff --git a/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h index d5070e8985..36a20f164a 100644 --- a/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h @@ -32,6 +32,9 @@ #define FUTEX_CMP_REQUEUE 4 #define FUTEX_WAKE_OP 5 #define FUTEX_OP_CLEAR_WAKE_IF_GT_ONE ((4 << 24) | 1) +#define FUTEX_LOCK_PI 6 +#define FUTEX_UNLOCK_PI 7 +#define FUTEX_TRYLOCK_PI 8 /* Initializer for compatibility lock. */ #define LLL_MUTEX_LOCK_INITIALIZER (0) From 0700eb704643a10abaf113fb4a218f03b998a60c Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Fri, 4 Aug 2006 18:56:15 +0000 Subject: [PATCH 3646/4487] Reported by Joseph Myers : * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h (FUTEX_LOCK_PI, FUTEX_UNLOCK_PI, FUTEX_TRYLOCK_PI): Define. --- ChangeLog.arm | 6 ++++++ sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog.arm b/ChangeLog.arm index 15a83cdb6a..9b0cd77a79 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,9 @@ +2006-08-04 Daniel Jacobowitz + + Reported by Joseph Myers : + * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h (FUTEX_LOCK_PI, + FUTEX_UNLOCK_PI, FUTEX_TRYLOCK_PI): Define. + 2006-07-24 Daniel Jacobowitz * sysdeps/unix/sysv/linux/arm/sigaction.c: If WRAPPER_INCLUDE is diff --git a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h index d1d0d65c4b..4bae953251 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h @@ -31,6 +31,9 @@ #define FUTEX_CMP_REQUEUE 4 #define FUTEX_WAKE_OP 5 #define FUTEX_OP_CLEAR_WAKE_IF_GT_ONE ((4 << 24) | 1) +#define FUTEX_LOCK_PI 6 +#define FUTEX_UNLOCK_PI 7 +#define FUTEX_TRYLOCK_PI 8 /* Initializer for compatibility lock. */ #define LLL_MUTEX_LOCK_INITIALIZER (0) From 6e0b72525bcbfb872950ab3e847b866d03a65a2a Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Sun, 13 Aug 2006 18:26:45 +0000 Subject: [PATCH 3647/4487] 2006-08-13 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h (FUTEX_LOCK_PI, FUTEX_UNLOCK_PI, FUTEX_TRYLOCK_PI): Define. --- ChangeLog.hppa | 5 +++++ sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 9e23f804ed..1f90c8dc2a 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,8 @@ +2006-08-13 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h (FUTEX_LOCK_PI, + FUTEX_UNLOCK_PI, FUTEX_TRYLOCK_PI): Define. + 2006-07-24 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h: diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h index fc5ff9932f..a5412bfd5a 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h @@ -60,6 +60,9 @@ #define FUTEX_CMP_REQUEUE 4 #define FUTEX_WAKE_OP 5 #define FUTEX_OP_CLEAR_WAKE_IF_GT_ONE ((4 << 24) | 1) +#define FUTEX_LOCK_PI 6 +#define FUTEX_UNLOCK_PI 7 +#define FUTEX_TRYLOCK_PI 8 /* Initializer for compatibility lock. */ #if 0 From 557df9aacae859b75357c1581cd10a5d9775c403 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Mon, 21 Aug 2006 20:07:33 +0000 Subject: [PATCH 3648/4487] * sysdeps/unix/sysv/linux/arm/eabi/syscalls.list: Remove msgctl, shmctl, and semctl. * sysdeps/unix/sysv/linux/arm/eabi/semctl.c, sysdeps/unix/sysv/linux/arm/eabi/shmctl.c, sysdeps/unix/sysv/linux/arm/eabi/msgctl.c: New files. --- ChangeLog.arm | 8 ++++++++ sysdeps/unix/sysv/linux/arm/eabi/msgctl.c | 1 + sysdeps/unix/sysv/linux/arm/eabi/semctl.c | 1 + sysdeps/unix/sysv/linux/arm/eabi/shmctl.c | 1 + sysdeps/unix/sysv/linux/arm/eabi/syscalls.list | 6 ++---- 5 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/msgctl.c create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/semctl.c create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/shmctl.c diff --git a/ChangeLog.arm b/ChangeLog.arm index 9b0cd77a79..8702925b95 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,11 @@ +2006-08-21 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/arm/eabi/syscalls.list: Remove msgctl, + shmctl, and semctl. + * sysdeps/unix/sysv/linux/arm/eabi/semctl.c, + sysdeps/unix/sysv/linux/arm/eabi/shmctl.c, + sysdeps/unix/sysv/linux/arm/eabi/msgctl.c: New files. + 2006-08-04 Daniel Jacobowitz Reported by Joseph Myers : diff --git a/sysdeps/unix/sysv/linux/arm/eabi/msgctl.c b/sysdeps/unix/sysv/linux/arm/eabi/msgctl.c new file mode 100644 index 0000000000..38aedadf49 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/msgctl.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/arm/eabi/semctl.c b/sysdeps/unix/sysv/linux/arm/eabi/semctl.c new file mode 100644 index 0000000000..145162909c --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/semctl.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/arm/eabi/shmctl.c b/sysdeps/unix/sysv/linux/arm/eabi/shmctl.c new file mode 100644 index 0000000000..c121e99917 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/shmctl.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list b/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list index 31e1cd6102..e896902471 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list +++ b/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list @@ -1,18 +1,16 @@ # File name Caller Syscall name # args Strong name Weak names -# semaphore and shm system calls -msgctl - msgctl i:iip __msgctl msgctl +# Semaphore and shm system calls. msgctl, shmctl, and semctl have C +# wrappers (to set __IPC_64). msgget - msgget i:ii __msgget msgget msgrcv - msgrcv Ci:ibnii __msgrcv msgrcv msgsnd - msgsnd Ci:ibni __msgsnd msgsnd shmat - shmat i:ipi __shmat shmat -shmctl - shmctl i:iip __shmctl shmctl shmdt - shmdt i:s __shmdt shmdt shmget - shmget i:iii __shmget shmget semop - semop i:ipi __semop semop semtimedop - semtimedop i:ipip semtimedop semget - semget i:iii __semget semget -semctl - semctl i:iiii __semctl semctl # proper socket implementations: accept - accept Ci:iBN __libc_accept __accept accept From 34cb4e8082506c176b5d8e2d1c7e7175ff3eaffd Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 30 Aug 2006 15:04:43 +0000 Subject: [PATCH 3649/4487] (splice): Add offin and offout arguments to the prototype. --- sysdeps/unix/sysv/linux/alpha/bits/fcntl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h index 6084c38c91..f17dc2bdc1 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h @@ -216,7 +216,8 @@ extern int 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) +extern int splice (int __fdin, __off64_t *__offin, int __fdout, + __off64_t *__offout, size_t __len, unsigned int __flags) __THROW; /* In-kernel implementation of tee for pipe buffers. */ From 0daa050021a9dcc212d47e9ecc584f0610c1b388 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Thu, 7 Sep 2006 16:34:43 +0000 Subject: [PATCH 3650/4487] 2006-09-07 Carlos O'Donell * sysdeps/hppa/dl-machine.h (elf_machine_fixup_plt): Remove lvalue cast. * sysdeps/hppa/dl-trampoline.S (_dl_fixup): Correct stack usage. (_dl_runtime_profile): LA fixups. * sysdeps/unix/sysv/linux/hppa/clone.S: Correct stack usage. Return -1 on error. Use branch and link for error handler funciton. * sysdeps/unix/sysv/linux/hppa/sysdep.h: Correct stack usage. Avoid register shuffling. * sysdeps/unix/sysv/linux/hppa/bits/atomic.h (ASM_EAGAIN): Define as -EAGAIN. * sysdeps/unix/sysv/linux/hppa/bits/mman.h: Adjust definitions to match required standards. * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h (lll_futex_wait): Return __ret. (lll_futex_timed_wait): Likewise. (lll_futex_wake): Likewise. (lll_futex_requeue): Likewise. * sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S: Correct stack usage and adjust error return. * sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h: Adjust stack usage for gdb, and avoid extra register loads. * sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c: Copy nptl/sysdeps/pthread/unwind-forcedunwind.c. (LIBGCC_SO): Define and use. * sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c: Copy nptl/sysdeps/pthread/unwind-resume.c. (LIBGCC_SO): Define and use. --- ChangeLog.hppa | 30 +++ sysdeps/hppa/dl-machine.h | 5 +- sysdeps/hppa/dl-trampoline.S | 243 ++++++++++++------ sysdeps/unix/sysv/linux/hppa/bits/atomic.h | 2 +- sysdeps/unix/sysv/linux/hppa/bits/mman.h | 90 ++++--- sysdeps/unix/sysv/linux/hppa/clone.S | 98 ++++--- .../unix/sysv/linux/hppa/nptl/lowlevellock.h | 61 +---- sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S | 16 +- .../unix/sysv/linux/hppa/nptl/sysdep-cancel.h | 18 +- .../linux/hppa/nptl/unwind-forcedunwind.c | 100 ++++++- .../unix/sysv/linux/hppa/nptl/unwind-resume.c | 55 +++- sysdeps/unix/sysv/linux/hppa/sysdep.h | 17 +- 12 files changed, 499 insertions(+), 236 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 1f90c8dc2a..b0ccb9872d 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,33 @@ +2006-09-07 Carlos O'Donell + + * sysdeps/hppa/dl-machine.h (elf_machine_fixup_plt): Remove + lvalue cast. + * sysdeps/hppa/dl-trampoline.S (_dl_fixup): Correct stack usage. + (_dl_runtime_profile): LA fixups. + * sysdeps/unix/sysv/linux/hppa/clone.S: Correct stack usage. Return + -1 on error. Use branch and link for error handler funciton. + * sysdeps/unix/sysv/linux/hppa/sysdep.h: Correct stack usage. + Avoid register shuffling. + * sysdeps/unix/sysv/linux/hppa/bits/atomic.h (ASM_EAGAIN): Define + as -EAGAIN. + * sysdeps/unix/sysv/linux/hppa/bits/mman.h: Adjust definitions to + match required standards. + * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h + (lll_futex_wait): Return __ret. + (lll_futex_timed_wait): Likewise. + (lll_futex_wake): Likewise. + (lll_futex_requeue): Likewise. + * sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S: Correct stack + usage and adjust error return. + * sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h: Adjust + stack usage for gdb, and avoid extra register loads. + * sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c: Copy + nptl/sysdeps/pthread/unwind-forcedunwind.c. + (LIBGCC_SO): Define and use. + * sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c: Copy + nptl/sysdeps/pthread/unwind-resume.c. + (LIBGCC_SO): Define and use. + 2006-08-13 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h (FUTEX_LOCK_PI, diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h index dd5a28190b..67536c37d7 100644 --- a/sysdeps/hppa/dl-machine.h +++ b/sysdeps/hppa/dl-machine.h @@ -123,12 +123,13 @@ elf_machine_fixup_plt (struct link_map *map, lookup_t t, const Elf32_Rela *reloc, Elf32_Addr *reloc_addr, struct fdesc value) { + volatile Elf32_Addr *rfdesc = reloc_addr; /* map is the link_map for the caller, t is the link_map for the object being called */ - reloc_addr[1] = value.gp; + rfdesc[1] = value.gp; /* Need to ensure that the gp is visible before the code entry point is updated */ - ((volatile Elf32_Addr *) reloc_addr)[0] = value.ip; + rfdesc[0] = value.ip; return value; } diff --git a/sysdeps/hppa/dl-trampoline.S b/sysdeps/hppa/dl-trampoline.S index c476138ebe..e0d3b9b108 100644 --- a/sysdeps/hppa/dl-trampoline.S +++ b/sysdeps/hppa/dl-trampoline.S @@ -1,5 +1,5 @@ /* PLT trampolines. hppa version. - Copyright (C) 2005 Free Software Foundation, Inc. + Copyright (C) 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 @@ -21,9 +21,9 @@ /* This code gets called via the .plt stub, and is used in dl-runtime.c to call the `_dl_fixup' function and then redirect - to the address it returns. `_dl_fixup' takes two - arguments, however `_dl_profile_fixup' takes a number of - parameters for use with library auditing (LA). + to the address it returns. `_dl_fixup' takes two arguments, however + `_dl_profile_fixup' takes a number of parameters for use with + library auditing (LA). WARNING: This template is also used by gcc's __cffc, and expects that the "bl" for _dl_runtime_resolve exist at a particular offset. @@ -34,43 +34,46 @@ Enter with r19 = reloc offset, r20 = got-8, r21 = fixup ltp. */ - /* FAKE bl to provide gcc's __cffc with fixup loc. */ + /* RELOCATION MARKER: bl to provide gcc's __cffc with fixup loc. */ .text + /* THIS CODE DOES NOT EXECUTE */ bl _dl_fixup, %r2 .text - .align 4 .global _dl_runtime_resolve .type _dl_runtime_resolve,@function + cfi_startproc + .align 4 _dl_runtime_resolve: .PROC .CALLINFO FRAME=128,CALLS,SAVE_RP,ENTRY_GR=3 .ENTRY /* SAVE_RP says we do */ - stw %rp, -20(%sp) + stw %rp, -20(%sp) /* Save static link register */ stw %r29,-16(%sp) - /* Save argument registers in the call stack frame. */ + /* Save argument registers */ stw %r26,-36(%sp) stw %r25,-40(%sp) stw %r24,-44(%sp) stw %r23,-48(%sp) /* Build a call frame, and save structure pointer. */ - copy %sp, %r26 /* Copy previous sp */ + copy %sp, %r1 /* Copy previous sp */ /* Save function result address (on entry) */ stwm %r28,128(%sp) - - /* Save floating point argument registers */ - ldo -56(%sp),%r26 - fstd,ma %fr4,-8(%r26) - fstd,ma %fr5,-8(%r26) - fstd,ma %fr6,-8(%r26) - fstd %fr7,0(%r26) - /* Fillin some frame info to follow ABI */ + stw %r1,-4(%sp) /* Previous sp */ stw %r21,-32(%sp) /* PIC register value */ - stw %r26,-4(%sp) /* Previous sp */ + + /* Save input floating point registers. This must be done + in the new frame since the previous frame doesn't have + enough space */ + ldo -56(%sp),%r1 + fstd,ma %fr4,-8(%r1) + fstd,ma %fr5,-8(%r1) + fstd,ma %fr6,-8(%r1) + fstd,ma %fr7,-8(%r1) /* Set up args to fixup func, needs only two arguments */ ldw 8+4(%r20),%r26 /* (1) got[1] == struct link_map */ @@ -81,15 +84,15 @@ _dl_runtime_resolve: copy %r21,%r19 /* set fixup func ltp */ /* Load up the returned func descriptor */ - copy %ret0, %r22 - copy %ret1, %r19 + copy %r28, %r22 + copy %r29, %r19 /* Reload arguments fp args */ - ldo -80(%sp),%r26 - fldd,ma 8(%r26),%fr7 - fldd,ma 8(%r26),%fr6 - fldd,ma 8(%r26),%fr5 - fldd 0(%r26),%fr4 + ldo -56(%sp),%r1 + fldd,ma -8(%r1),%fr4 + fldd,ma -8(%r1),%fr5 + fldd,ma -8(%r1),%fr6 + fldd,ma -8(%r1),%fr7 /* Adjust sp, and restore function result address*/ ldwm -128(%sp),%r28 @@ -107,91 +110,179 @@ _dl_runtime_resolve: ldw -20(%sp),%rp .EXIT .PROCEND + cfi_endproc .size _dl_runtime_resolve, . - _dl_runtime_resolve - - /* FIXME: - Need to largely rewrite the bottom half of - this code in order to save and restore the - LA struct from the stack along with - interpreted parameters. - */ .text - .align 4 .global _dl_runtime_profile .type _dl_runtime_profile,@function + cfi_startproc + .align 4 _dl_runtime_profile: .PROC - .CALLINFO FRAME=128,CALLS,SAVE_RP,ENTRY_GR=3 + .CALLINFO FRAME=192,CALLS,SAVE_RP,ENTRY_GR=3 .ENTRY /* SAVE_RP says we do */ - stw %rp, -20(%sp) - + stw %rp, -20(%sp) /* Save static link register */ stw %r29,-16(%sp) - /* Save argument registers in the call stack frame. */ - stw %r26,-36(%sp) - stw %r25,-40(%sp) - stw %r24,-44(%sp) - stw %r23,-48(%sp) /* Build a call frame, and save structure pointer. */ - copy %sp, %r26 /* Copy previous sp */ + copy %sp, %r1 /* Copy previous sp */ /* Save function result address (on entry) */ - stwm %r28,128(%sp) - - /* Save floating point argument registers */ - ldo -56(%sp),%r26 - fstd,ma %fr4,-8(%r26) - fstd,ma %fr5,-8(%r26) - fstd,ma %fr6,-8(%r26) - fstd %fr7,0(%r26) - + stwm %r28,192(%sp) /* Fillin some frame info to follow ABI */ + stw %r1,-4(%sp) /* Previous sp */ stw %r21,-32(%sp) /* PIC register value */ - stw %r26,-4(%sp) /* Previous sp */ + + /* Create La_hppa_retval */ + /* -140, lrv_r28 + -136, lrv_r29 + -132, 4 byte pad + -128, lr_fr4 (8 bytes) */ + + /* Create save space for _dl_profile_fixup arguments + -120, Saved reloc offset + -116, Saved struct link_map + -112, *framesizep */ + + /* Create La_hppa_regs */ + /* 32-bit registers */ + stw %r26,-108(%sp) + stw %r25,-104(%sp) + stw %r24,-100(%sp) + stw %r23,-96(%sp) + /* -92, 4 byte pad */ + /* 64-bit floating point registers */ + ldo -88(%sp),%r1 + fstd,ma %fr4,8(%r1) + fstd,ma %fr5,8(%r1) + fstd,ma %fr6,8(%r1) + fstd,ma %fr7,8(%r1) + /* 32-bit stack pointer and return register */ + stw %sp,-56(%sp) + stw %r2,-52(%sp) + /* Set up args to fixup func, needs five arguments */ ldw 8+4(%r20),%r26 /* (1) got[1] == struct link_map */ + stw %r26,-116(%sp) /* Save struct link_map */ copy %r19,%r25 /* (2) reloc offset */ + stw %r25,-120(%sp) /* Save reloc offset */ copy %rp,%r24 /* (3) profile_fixup needs rp */ - copy %r0,%r23 /* (4) regs */ - ldo -56(%sp), %r1 + ldo -56(%sp),%r23 /* (4) La_hppa_regs */ + ldo -112(%sp), %r1 stw %r1, -52(%sp) /* (5) long int *framesizep */ /* Call the real address resolver. */ bl _dl_profile_fixup,%rp copy %r21,%r19 /* set fixup func ltp */ - /* Load up the returned func descriptor */ - copy %ret0, %r22 - copy %ret1, %r19 - - /* Reload arguments fp args */ - ldo -80(%sp),%r26 - fldd,ma 8(%r26),%fr7 - fldd,ma 8(%r26),%fr6 - fldd,ma 8(%r26),%fr5 - fldd 0(%r26),%fr4 + /* Load up the returned function descriptor */ + copy %r28, %r22 + copy %r29, %r19 + + /* Restore gr/fr/sp/rp */ + ldw -108(%sp),%r26 + ldw -104(%sp),%r25 + ldw -100(%sp),%r24 + ldw -96(%sp),%r23 + /* -92, 4 byte pad, skip */ + ldo -88(%sp),%r1 + fldd,ma 8(%r1),%fr4 + fldd,ma 8(%r1),%fr5 + fldd,ma 8(%r1),%fr6 + fldd,ma 8(%r1),%fr7 + ldw -52(%sp),%rp + + /* Reload static link register -(192+16) without adjusting stack */ + ldw -208(%sp),%r29 + + /* *framesizep is >= 0 if we have to run pltexit */ + ldw -112(%sp),%r28 + cmpb,>>=,N %r0,%r28,L(cpe) /* Adjust sp, and restore function result address*/ - ldwm -128(%sp),%r28 - - /* Reload static link register */ - ldw -16(%sp),%r29 - /* Reload general args */ - ldw -36(%sp),%r26 - ldw -40(%sp),%r25 - ldw -44(%sp),%r24 - ldw -48(%sp),%r23 - + ldwm -192(%sp),%r28 /* Jump to new function, but return to previous function */ bv %r0(%r22) ldw -20(%sp),%rp + /* NO RETURN */ + +L(nf): + /* Call the returned function descriptor */ + bv %r0(%r22) + nop + b,n L(cont) + +L(cpe): + /* We are going to call the resolved function, but we have a + stack frame in the middle. We use the value of framesize to + guess how much extra frame we need, and how much frame to + copy forward. */ + + /* Round to nearest multiple of 64 */ + addi 63, %r28, %r28 + depi 0, 27, 6, %r28 + + /* Calcualte start of stack copy */ + ldo -192(%sp),%r2 + + /* Increate the stack by *framesizep */ + copy %sp, %r1 + add %sp, %r28, %sp + /* Save stack pointer */ + stw %r1, -4(%sp) + + /* Single byte copy of prevous stack onto newly allocated stack */ +1: ldb %r28(%r2), %r1 + add %r28, %sp, %r26 + stb %r1, 0(%r26) + addi,< -1,%r28,%r28 + b,n 1b + + /* Retore r28 and r27 and r2 already points at -192(%sp) */ + ldw 0(%r2),%r28 + ldw 84(%r2),%r26 + + /* Calculate address of L(cont) */ + b,l L(nf),%r2 + depwi 0,31,2,%r2 +L(cont): + /* Undo fake stack */ + ldw -4(%sp),%r1 + copy %r1, %sp + + /* Arguments to _dl_call_pltexit */ + ldw -116(%sp), %r26 /* (1) got[1] == struct link_map */ + ldw -120(%sp), %r25 /* (2) reloc offsets */ + ldo -56(%sp), %r24 /* (3) *La_hppa_regs */ + ldo -124(%sp), %r23 /* (4) *La_hppa_retval */ + + /* Fill *La_hppa_retval */ + stw %r28,-140(%sp) + stw %r29,-136(%sp) + ldo -128(%sp), %r1 + fstd %fr4,0(%r1) + + /* Call _dl_call_pltexit */ + bl _dl_call_pltexit,%rp + nop + + /* Restore *La_hppa_retval */ + ldw -140(%sp), %r28 + ldw -136(%sp), %r29 + ldo -128(%sp), %r1 + fldd 0(%r1), %fr4 + + /* Unwind the stack */ + ldo 192(%sp),%sp + /* Retore callers rp */ + ldw -20(%sp),%rp + /* Return */ + bv,n 0(%r2) .EXIT .PROCEND .size _dl_runtime_profile, . - _dl_runtime_profile - - diff --git a/sysdeps/unix/sysv/linux/hppa/bits/atomic.h b/sysdeps/unix/sysv/linux/hppa/bits/atomic.h index 36a540728e..ee381dc27b 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/atomic.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/atomic.h @@ -60,7 +60,7 @@ typedef uintmax_t uatomic_max_t; #define LWS_CAS 0x0 /* Note r31 is the link register */ #define LWS_CLOBBER "r1", "r26", "r25", "r24", "r23", "r22", "r21", "r20", "r28", "r31", "memory" -#define ASM_EAGAIN "11" +#define ASM_EAGAIN -EAGAIN #if __ASSUME_LWS_CAS /* The only basic operation needed is compare and exchange. */ diff --git a/sysdeps/unix/sysv/linux/hppa/bits/mman.h b/sysdeps/unix/sysv/linux/hppa/bits/mman.h index 54531ecf28..f065322175 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/mman.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/mman.h @@ -21,12 +21,12 @@ # error "Never use directly; include instead." #endif -/* these are basically taken from the kernel definitions */ +/* These are taken from the kernel definitions. */ -#define PROT_READ 0x1 /* page can be read */ -#define PROT_WRITE 0x2 /* page can be written */ -#define PROT_EXEC 0x4 /* page can be executed */ -#define PROT_NONE 0x0 /* page can not be accessed */ +#define PROT_READ 0x1 /* Page can be read */ +#define PROT_WRITE 0x2 /* Page can be written */ +#define PROT_EXEC 0x4 /* Page can be executed */ +#define PROT_NONE 0x0 /* Page can not be accessed */ #define PROT_GROWSDOWN 0x01000000 /* Extend change to start of growsdown vma (mprotect only). */ #define PROT_GROWSUP 0x02000000 /* Extend change to start of @@ -34,33 +34,53 @@ #define MAP_SHARED 0x01 /* Share changes */ #define MAP_PRIVATE 0x02 /* Changes are private */ -#define MAP_TYPE 0x03 /* Mask for type of mapping */ +#ifdef __USE_MISC +# define MAP_TYPE 0x03 /* Mask for type of mapping */ +#endif + +/* Other flags. */ #define MAP_FIXED 0x04 /* Interpret addr exactly */ -#define MAP_ANONYMOUS 0x10 /* don't use a file */ +#ifdef __USE_MISC +# define MAP_FILE 0x0 +# define MAP_ANONYMOUS 0x10 /* Don't use a file */ +# define MAP_ANON MAP_ANONYMOUS +# define MAP_VARIABLE 0 +#endif -#define MAP_DENYWRITE 0x0800 /* ETXTBSY */ -#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ -#define MAP_LOCKED 0x2000 /* pages are locked */ -#define MAP_NORESERVE 0x4000 /* don't check for reservations */ -#define MAP_GROWSDOWN 0x8000 /* stack-like segment */ -#define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */ -#define MAP_NONBLOCK 0x20000 /* do not block on IO */ +/* These are Linux-specific. */ +#ifdef __USE_MISC +# define MAP_DENYWRITE 0x0800 /* ETXTBSY */ +# define MAP_EXECUTABLE 0x1000 /* Mark it as an executable */ +# define MAP_LOCKED 0x2000 /* Pages are locked */ +# define MAP_NORESERVE 0x4000 /* Don't check for reservations */ +# define MAP_GROWSDOWN 0x8000 /* Stack-like segment */ +# define MAP_POPULATE 0x10000 /* Populate (prefault) pagetables */ +# define MAP_NONBLOCK 0x20000 /* Do not block on IO */ +#endif -#define MS_SYNC 1 /* synchronous memory sync */ -#define MS_ASYNC 2 /* sync memory asynchronously */ -#define MS_INVALIDATE 4 /* invalidate the caches */ +/* Flags to "msync" */ +#define MS_SYNC 1 /* Synchronous memory sync */ +#define MS_ASYNC 2 /* Sync memory asynchronously */ +#define MS_INVALIDATE 4 /* Invalidate the caches */ -#define MCL_CURRENT 1 /* lock all current mappings */ -#define MCL_FUTURE 2 /* lock all future mappings */ +/* Flags to "mlockall" */ +#define MCL_CURRENT 1 /* Lock all current mappings */ +#define MCL_FUTURE 2 /* Lock all future mappings */ -/* Advice to "madvise" */ +/* Flags for `mremap'. */ +#ifdef __USE_GNU +# define MREMAP_MAYMOVE 1 +# define MREMAP_FIXED 2 +#endif + +/* Advice to "madvise" */ #ifdef __USE_BSD -# define MADV_NORMAL 0 /* no further special treatment */ -# define MADV_RANDOM 1 /* expect random page references */ -# define MADV_SEQUENTIAL 2 /* expect sequential page references */ -# define MADV_WILLNEED 3 /* will need these pages */ -# define MADV_DONTNEED 4 /* dont need these pages */ -# define MADV_SPACEAVAIL 5 /* insure that resources are reserved */ +# define MADV_NORMAL 0 /* No further special treatment */ +# define MADV_RANDOM 1 /* Expect random page references */ +# define MADV_SEQUENTIAL 2 /* Expect sequential page references */ +# define MADV_WILLNEED 3 /* Will need these pages */ +# define MADV_DONTNEED 4 /* Dont need these pages */ +# define MADV_SPACEAVAIL 5 /* Insure that resources are reserved */ # define MADV_VPS_PURGE 6 /* Purge pages from VM page cache */ # define MADV_VPS_INHERIT 7 /* Inherit parents page size */ # define MADV_REMOVE 9 /* Remove these pages and resources. */ @@ -78,15 +98,11 @@ #define MADV_16M_PAGES 24 /* Use 16 Megabyte pages */ #define MADV_64M_PAGES 26 /* Use 64 Megabyte pages */ -/* compatibility flags */ -#define MAP_ANON MAP_ANONYMOUS -#define MAP_FILE 0 -#define MAP_VARIABLE 0 - -/* Flags for `mremap'. */ -#ifdef __USE_GNU -# define MREMAP_MAYMOVE 1 -# define MREMAP_FIXED 2 +/* The POSIX people had to invent similar names for the same things. */ +#ifdef __USE_XOPEN2K +# define POSIX_MADV_NORMAL 0 /* No further special treatment. */ +# define POSIX_MADV_RANDOM 1 /* Expect random page references. */ +# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */ +# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */ #endif - - diff --git a/sysdeps/unix/sysv/linux/hppa/clone.S b/sysdeps/unix/sysv/linux/hppa/clone.S index 1884518a3d..231989518e 100644 --- a/sysdeps/unix/sysv/linux/hppa/clone.S +++ b/sysdeps/unix/sysv/linux/hppa/clone.S @@ -27,11 +27,19 @@ #include /* Non-thread code calls __clone with the following parameters: - int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg) + int clone(int (*fn)(void *arg), + void *child_stack, + int flags, + void *arg) NPTL Code will call __clone with the following parameters: - int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg, - int *parent_tidptr, struct user_desc *newtls, int *child_pidptr) + int clone(int (*fn)(void *arg), + void *child_stack, + int flags, + void *arg, + int *parent_tidptr, + struct user_desc *newtls, + int *child_pidptr) The code should not mangle the extra input registers. Syscall expects: Input to __clone: @@ -43,32 +51,37 @@ r23 - struct user_desc newtls pointer. (stack - 56) r22 - child tid pointer. (stack - 60) r20 - clone syscall number (constant) + + Return: + + On success the thread ID of the child process is returend in + the callers context. + On error return -1, and set errno to the value returned by + the syscall. */ .text ENTRY(__clone) + /* Prologue */ + stwm %r3, 64(%sp) + stw %sp, -4(%sp) + stw %r19, -32(%sp) /* Sanity check arguments. */ - ldi -EINVAL,%ret0 - comib,=,n 0,%arg0,.Lerror /* no NULL function pointers */ - comib,=,n 0,%arg1,.Lerror /* no NULL stack pointers */ + comib,=,n 0, %arg0, .LerrorSanity /* no NULL function pointers */ + comib,=,n 0, %arg1, .LerrorSanity /* no NULL stack pointers */ /* Save the fn ptr and arg on the new stack. */ - stwm %r26,64(%r25) - stw %r23,-60(%r25) + stwm %r26, 64(%r25) + stw %r23, -60(%r25) /* Clone arguments are (int flags, void * child_stack) */ - copy %r24,%r26 /* flags are first */ + copy %r24, %r26 /* flags are first */ /* User stack pointer is in the correct register already */ /* Load args from stack... */ - ldw -52(%sp), %r24 /* Load parent_tidptr */ - ldw -56(%sp), %r23 /* Load newtls */ - ldw -60(%sp), %r22 /* Load child_tidptr */ - - /* Create frame to get r3 free */ - copy %sp, %r21 - stwm %r3, 64(%sp) - stw %r21, -4(%sp) + ldw -116(%sp), %r24 /* Load parent_tidptr */ + ldw -120(%sp), %r23 /* Load newtls */ + ldw -124(%sp), %r22 /* Load child_tidptr */ /* Save the PIC register. */ #ifdef PIC @@ -76,19 +89,20 @@ ENTRY(__clone) #endif /* Do the system call */ - ble 0x100(%sr2,%r0) - ldi __NR_clone,%r20 + ble 0x100(%sr2, %r0) + ldi __NR_clone, %r20 - ldi -4096,%r1 - comclr,>>= %r1,%ret0,%r0 /* Note: unsigned compare. */ + ldi -4096, %r1 + comclr,>>= %r1, %ret0, %r0 /* Note: unsigned compare. */ b,n .LerrorRest - comib,=,n 0,%ret0,thread_start + comib,=,n 0, %ret0, .LthreadStart /* Successful return from the parent No need to restore the PIC register, since we return immediately. */ + ldw -84(%sp), %rp bv %r0(%rp) ldwm -64(%sp), %r3 @@ -97,36 +111,40 @@ ENTRY(__clone) #ifdef PIC copy %r3, %r19 /* parent */ #endif - /* Something bad happened -- no child created */ -.Lerror: - - /* Set errno, save ret0 so we return with that value. */ - copy %ret0, %r3 - b __syscall_error - sub %r0,%ret0,%arg0 - copy %r3, %ret0 - /* Return after setting errno, and restoring ret0 */ + bl __syscall_error, %rp + sub %r0, %ret0, %arg0 + ldw -84(%sp), %rp + /* Return after setting errno, ret0 is set to -1 by __syscall_error. */ + bv %r0(%rp) + ldwm -64(%sp), %r3 + +.LerrorSanity: + /* Sanity checks failed, return -1, and set errno to EINVAL. */ + bl __syscall_error, %rp + ldi EINVAL, %arg0 + /* Lazy, don't restore r19 */ + ldw -84(%sp), %rp bv %r0(%rp) ldwm -64(%sp), %r3 -thread_start: +.LthreadStart: /* Load up the arguments. */ - ldw -60(%sr0, %sp),%arg0 - ldw -64(%sr0, %sp),%r22 + ldw -60(%sp), %arg0 + ldw -64(%sp), %r22 /* $$dyncall fixes childs PIC register */ /* Call the user's function */ - bl $$dyncall,%r31 - copy %r31,%rp + bl $$dyncall, %r31 + copy %r31, %rp - bl _exit,%rp - copy %ret0,%arg0 + bl _exit, %rp + copy %ret0, %arg0 - /* Die horribly. */ - iitlbp %r0,(%sr0,%r0) + /* We should not return from _exit. */ + iitlbp %r0, (%sr0, %r0) PSEUDO_END(__clone) diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h index a5412bfd5a..3b2b0f1adb 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h @@ -25,34 +25,10 @@ #include #include -#if 0 /* The hppa only has one atomic read and modify memory operation, - load and clear, so hppa spinlocks must use zero to signify that - someone is holding the lock. The address used for the ldcw - semaphore must be 16-byte aligned. */ -#define __ldcw(a) \ -({ \ - unsigned int __ret; \ - __asm__ __volatile__("ldcw 0(%1),%0" \ - : "=r" (__ret) : "r" (a) : "memory"); \ - __ret; \ -}) - -/* Because malloc only guarantees 8-byte alignment for malloc'd data, - and GCC only guarantees 8-byte alignment for stack locals, we can't - be assured of 16-byte alignment for atomic lock data even if we - specify "__attribute ((aligned(16)))" in the type declaration. So, - we use a struct containing an array of four ints for the atomic lock - type and dynamically select the 16-byte aligned int from the array - for the semaphore. */ -#define __PA_LDCW_ALIGNMENT 16 -#define __ldcw_align(a) ({ \ - volatile unsigned int __ret = (unsigned int) a; \ - if ((__ret & ~(__PA_LDCW_ALIGNMENT - 1)) < (unsigned int) a) \ - __ret = (__ret & ~(__PA_LDCW_ALIGNMENT - 1)) + __PA_LDCW_ALIGNMENT; \ - (unsigned int *) __ret; \ -}) -#endif + load and clear, so hppa uses a kernel helper routine to implement + compare_and_exchange. See atomic.h for the userspace calling + sequence. */ #define FUTEX_WAIT 0 #define FUTEX_WAKE 1 @@ -64,11 +40,7 @@ #define FUTEX_UNLOCK_PI 7 #define FUTEX_TRYLOCK_PI 8 -/* Initializer for compatibility lock. */ -#if 0 -#define LLL_INITIALIZER_NOT_ZERO -#define LLL_MUTEX_LOCK_INITIALIZER ((__atomic_lock_t){ { 1, 1, 1, 1 } }) -#endif +/* Initialize locks to zero. */ #define LLL_MUTEX_LOCK_INITIALIZER (0) @@ -82,7 +54,7 @@ typedef int lll_lock_t; long int __ret; \ __ret = INTERNAL_SYSCALL (futex, __err, 4, \ (futexp), FUTEX_WAIT, (val), 0); \ - INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; \ + __ret; \ }) #define lll_futex_timed_wait(futexp, val, timespec) \ @@ -91,7 +63,7 @@ typedef int lll_lock_t; long int __ret; \ __ret = INTERNAL_SYSCALL (futex, __err, 4, \ (futexp), FUTEX_WAIT, (val), (timespec)); \ - INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; \ + __ret; \ }) #define lll_futex_wake(futexp, nr) \ @@ -100,7 +72,7 @@ typedef int lll_lock_t; long int __ret; \ __ret = INTERNAL_SYSCALL (futex, __err, 4, \ (futexp), FUTEX_WAKE, (nr), 0); \ - INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; \ + __ret; \ }) #define lll_robust_mutex_dead(futexv) \ @@ -120,7 +92,7 @@ typedef int lll_lock_t; __ret = INTERNAL_SYSCALL (futex, __err, 6, \ (futexp), FUTEX_CMP_REQUEUE, (nr_wake), \ (nr_move), (mutex), (val)); \ - INTERNAL_SYSCALL_ERROR_P (__ret, __err); \ + __ret; \ }) /* Returns non-zero if error happened, zero if success. */ @@ -253,25 +225,12 @@ __lll_mutex_unlock_force (lll_lock_t *futex) } #define lll_mutex_unlock_force(futex) __lll_mutex_unlock_force(&(futex)) - -static inline int __attribute__ ((always_inline)) -__lll_mutex_islocked (lll_lock_t *futex) -{ - return (*futex != 0); -} -#define lll_mutex_islocked(futex) __lll_mutex_islocked(&(futex)) - +#define lll_mutex_islocked(futex) \ + (futex != 0) /* Our internal lock implementation is identical to the binary-compatible mutex implementation. */ -/* Initializers for lock. */ -#if 0 -#define LLL_LOCK_INITIALIZER ((__atomic_lock_t){ { 1, 1, 1, 1 } }) -#define LLL_LOCK_INITIALIZER_CONST { { 1, 1, 1, 1 } } -#define LLL_LOCK_INITIALIZER_LOCKED ((__atomic_lock_t){ { 0, 0, 0, 0 } }) -#endif - #define LLL_LOCK_INITIALIZER (0) #define LLL_LOCK_INITIALIZER_CONST (0) #define LLL_LOCK_INITIALIZER_LOCKED (1) diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S b/sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S index a44e785bb6..83a70b71cb 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S +++ b/sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S @@ -50,6 +50,10 @@ /* r26, r25, r24, r23 are free since vfork has no arguments */ ENTRY(__vfork) + /* Prologue */ + stwm %r3, 64(%sp) + stw %sp, -4(%sp) + stw %r19, -32(%sp) /* Save the PIC register. */ #ifdef PIC @@ -72,9 +76,12 @@ ENTRY(__vfork) b,n .Lerror /* Return, no need to restore the PIC register. */ - bv,n %r0(%rp) + ldw -84(%sp), %rp + bv %r0(%rp) + ldwm -64(%sp), %r3 .Lerror: + sub %r0,%ret0,%r3 SYSCALL_ERROR_HANDLER /* Restore the PIC register (in delay slot) on error */ #ifdef PIC @@ -82,8 +89,11 @@ ENTRY(__vfork) #else nop #endif - sub %r0,%ret0,%arg0 - /* Return error */ + /* Write syscall return into errno location */ + stw %r3, 0(%ret0) + ldw -84(%sp), %rp + bv %r0(%rp) + ldwm -64(%sp), %r3 PSEUDO_END (__vfork) libc_hidden_def (__vfork) weak_alias (__vfork, vfork) diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h index 748fe6961c..2d3de3efed 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h @@ -63,11 +63,9 @@ # define PSEUDO(name, syscall_name, args) \ ENTRY (name) \ DOARGS_##args ASM_LINE_SEP \ - copy TREG, %r1 ASM_LINE_SEP \ - copy %sp, TREG ASM_LINE_SEP \ - stwm %r1, 64(%sp) ASM_LINE_SEP \ - stw %rp, -20(%sp) ASM_LINE_SEP \ - stw TREG, -4(%sp) ASM_LINE_SEP \ + stwm TREG, 64(%sp) ASM_LINE_SEP \ + stw %sp, -4(%sp) ASM_LINE_SEP \ + stw %r19, -32(%sp) ASM_LINE_SEP \ /* Done setting up frame, continue... */ ASM_LINE_SEP \ SINGLE_THREAD_P ASM_LINE_SEP \ cmpib,<>,n 0,%ret0,L(pseudo_cancel) ASM_LINE_SEP \ @@ -91,7 +89,7 @@ L(unthreaded): ASM_LINE_SEP \ stw TREG, 0(%sr0,%ret0) ASM_LINE_SEP \ b L(pre_end) ASM_LINE_SEP \ /* return -1 as error */ ASM_LINE_SEP \ - ldo -1(%r0), %ret0 /* delay */ ASM_LINE_SEP \ + ldi -1, %ret0 /* delay */ ASM_LINE_SEP \ L(pseudo_cancel): ASM_LINE_SEP \ PUSHARGS_##args /* Save args */ ASM_LINE_SEP \ /* Save r19 into TREG */ ASM_LINE_SEP \ @@ -125,13 +123,13 @@ L(pseudo_cancel): ASM_LINE_SEP \ /* store into errno location */ ASM_LINE_SEP \ stw TREG, 0(%sr0,%ret0) ASM_LINE_SEP \ /* return -1 */ ASM_LINE_SEP \ - ldo -1(%r0), %ret0 ASM_LINE_SEP \ + ldi -1, %ret0 ASM_LINE_SEP \ L(pre_end): ASM_LINE_SEP \ - /* Restore rp before exit */ ASM_LINE_SEP \ - ldw -84(%sr0,%sp), %rp ASM_LINE_SEP \ + /* No need to LOAD_PIC */ ASM_LINE_SEP \ /* Undo frame */ ASM_LINE_SEP \ ldwm -64(%sp),TREG ASM_LINE_SEP \ - /* No need to LOAD_PIC */ ASM_LINE_SEP + /* Restore rp before exit */ ASM_LINE_SEP \ + ldw -20(%sp), %rp ASM_LINE_SEP /* Save arguments into our frame */ # define PUSHARGS_0 /* nothing to do */ diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c index c8142cb543..8666bbb3c8 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c +++ b/sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005 Free Software Foundation, Inc. +/* Copyright (C) 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 @@ -16,6 +16,100 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define LIBGCC_S_SO "libgcc_s.so.2" -#include +#include +#include +#include +#include +#define LIBGCC_S_SO "libgcc_s.so.4" + +static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); +static _Unwind_Reason_Code (*libgcc_s_personality) + (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, + struct _Unwind_Context *); +static _Unwind_Reason_Code (*libgcc_s_forcedunwind) + (struct _Unwind_Exception *, _Unwind_Stop_Fn, void *); +static _Unwind_Word (*libgcc_s_getcfa) (struct _Unwind_Context *); + +#ifndef LIBGCC_S_SO +#define LIBGCC_S_SO "libgcc_s.so.1" +#endif + +void +__attribute_noinline__ +pthread_cancel_init (void) +{ + void *resume, *personality, *forcedunwind, *getcfa; + void *handle; + + if (__builtin_expect (libgcc_s_getcfa != NULL, 1)) + { + /* Force gcc to reload all values. */ + asm volatile ("" ::: "memory"); + return; + } + + handle = __libc_dlopen (LIBGCC_S_SO); + + if (handle == NULL + || (resume = __libc_dlsym (handle, "_Unwind_Resume")) == NULL + || (personality = __libc_dlsym (handle, "__gcc_personality_v0")) == NULL + || (forcedunwind = __libc_dlsym (handle, "_Unwind_ForcedUnwind")) + == NULL + || (getcfa = __libc_dlsym (handle, "_Unwind_GetCFA")) == NULL +#ifdef ARCH_CANCEL_INIT + || ARCH_CANCEL_INIT (handle) +#endif + ) + __libc_fatal ("libgcc_s.so must be installed for pthread_cancel to work\n"); + + libgcc_s_resume = resume; + libgcc_s_personality = personality; + libgcc_s_forcedunwind = forcedunwind; + /* Make sure libgcc_s_getcfa is written last. Otherwise, + pthread_cancel_init might return early even when the pointer the + caller is interested in is not initialized yet. */ + atomic_write_barrier (); + libgcc_s_getcfa = getcfa; +} + +void +_Unwind_Resume (struct _Unwind_Exception *exc) +{ + if (__builtin_expect (libgcc_s_resume == NULL, 0)) + pthread_cancel_init (); + + libgcc_s_resume (exc); +} + +_Unwind_Reason_Code +__gcc_personality_v0 (int version, _Unwind_Action actions, + _Unwind_Exception_Class exception_class, + struct _Unwind_Exception *ue_header, + struct _Unwind_Context *context) +{ + if (__builtin_expect (libgcc_s_personality == NULL, 0)) + pthread_cancel_init (); + + return libgcc_s_personality (version, actions, exception_class, + ue_header, context); +} + +_Unwind_Reason_Code +_Unwind_ForcedUnwind (struct _Unwind_Exception *exc, _Unwind_Stop_Fn stop, + void *stop_argument) +{ + if (__builtin_expect (libgcc_s_forcedunwind == NULL, 0)) + pthread_cancel_init (); + + return libgcc_s_forcedunwind (exc, stop, stop_argument); +} + +_Unwind_Word +_Unwind_GetCFA (struct _Unwind_Context *context) +{ + if (__builtin_expect (libgcc_s_getcfa == NULL, 0)) + pthread_cancel_init (); + + return libgcc_s_getcfa (context); +} diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c b/sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c index 6d1da85504..a7485e950f 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c +++ b/sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005 Free Software Foundation, Inc. +/* Copyright (C) 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 @@ -16,6 +16,55 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define LIBGCC_S_SO "libgcc_s.so.2" -#include +#include +#include +#include +#define LIBGCC_S_SO "libgcc_s.so.4" + +static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); +static _Unwind_Reason_Code (*libgcc_s_personality) + (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, + struct _Unwind_Context *); + +#ifndef LIBGCC_S_SO +#error LIBGCC_S_SO +#define LIBGCC_S_SO "libgcc_s.so.1" +#endif + +static void +init (void) +{ + void *resume, *personality; + void *handle; + + handle = __libc_dlopen (LIBGCC_S_SO); + + if (handle == NULL + || (resume = __libc_dlsym (handle, "_Unwind_Resume")) == NULL + || (personality = __libc_dlsym (handle, "__gcc_personality_v0")) == NULL) + __libc_fatal ("libgcc_s.so must be installed for pthread_cancel to work\n"); + + libgcc_s_resume = resume; + libgcc_s_personality = personality; +} + +void +_Unwind_Resume (struct _Unwind_Exception *exc) +{ + if (__builtin_expect (libgcc_s_resume == NULL, 0)) + init (); + libgcc_s_resume (exc); +} + +_Unwind_Reason_Code +__gcc_personality_v0 (int version, _Unwind_Action actions, + _Unwind_Exception_Class exception_class, + struct _Unwind_Exception *ue_header, + struct _Unwind_Context *context) +{ + if (__builtin_expect (libgcc_s_personality == NULL, 0)) + init (); + return libgcc_s_personality (version, actions, exception_class, + ue_header, context); +} diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.h b/sysdeps/unix/sysv/linux/hppa/sysdep.h index b302d37f7b..5b12bc5062 100644 --- a/sysdeps/unix/sysv/linux/hppa/sysdep.h +++ b/sysdeps/unix/sysv/linux/hppa/sysdep.h @@ -278,12 +278,10 @@ #undef DO_CALL #define DO_CALL(syscall_name, args) \ - copy TREG,%r1 ASM_LINE_SEP \ - copy %sp,TREG ASM_LINE_SEP \ /* Create a frame */ ASM_LINE_SEP \ - stwm %r1, 64(%sp) ASM_LINE_SEP \ - stw %rp, -20(%sp) ASM_LINE_SEP \ - stw TREG, -4(%sp) ASM_LINE_SEP \ + stwm TREG, 64(%sp) ASM_LINE_SEP \ + stw %sp, -4(%sp) ASM_LINE_SEP \ + stw %r19, -32(%sp) ASM_LINE_SEP \ /* Save r19 */ ASM_LINE_SEP \ SAVE_PIC(TREG) ASM_LINE_SEP \ /* Do syscall, delay loads # */ ASM_LINE_SEP \ @@ -304,10 +302,10 @@ /* return -1 as error */ ASM_LINE_SEP \ ldo -1(%r0), %ret0 ASM_LINE_SEP \ L(pre_end): ASM_LINE_SEP \ - /* Restore return pointer */ ASM_LINE_SEP \ - ldw -84(%sp),%rp ASM_LINE_SEP \ /* Restore our frame, restoring TREG */ ASM_LINE_SEP \ - ldwm -64(%sp), TREG ASM_LINE_SEP + ldwm -64(%sp), TREG ASM_LINE_SEP \ + /* Restore return pointer */ ASM_LINE_SEP \ + ldw -20(%sp),%rp ASM_LINE_SEP /* We do nothing with the return, except hand it back to someone else */ #undef DO_CALL_NOERRNO @@ -386,10 +384,9 @@ L(pre_end): ASM_LINE_SEP \ #undef INTERNAL_SYSCALL_DECL #define INTERNAL_SYSCALL_DECL(err) -/* Equivalent to (val < 0)&&(val > -4095) which is what we want */ #undef INTERNAL_SYSCALL_ERROR_P #define INTERNAL_SYSCALL_ERROR_P(val, err) \ - ((unsigned long)val >= (unsigned long)-4095) + ((val < 0) && (val > -4095)) #undef INTERNAL_SYSCALL_ERRNO #define INTERNAL_SYSCALL_ERRNO(val, err) (-(val)) From 2625a1fb08889f3b4f02a8e3139cf7a6947604c0 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Wed, 13 Sep 2006 21:56:09 +0000 Subject: [PATCH 3651/4487] 2006-09-13 Carlos O'Donell * sysdeps/hppa/dl-machine.h (RTLD_START): Comment the use of _dl_fini_plabel. * sysdeps/hppa/elf/start.S: Correctly pass r23 to argument 6 of __libc_start_main. Comment the order of arguments at entry and those to __libc_start_main. --- sysdeps/hppa/dl-machine.h | 6 ++++-- sysdeps/hppa/elf/start.S | 41 ++++++++++++++++++++++++++++++--------- 2 files changed, 36 insertions(+), 11 deletions(-) diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h index 67536c37d7..08542951c4 100644 --- a/sysdeps/hppa/dl-machine.h +++ b/sysdeps/hppa/dl-machine.h @@ -447,8 +447,10 @@ asm ( \ " ldw -40(%sp),%r25\n" \ " ldw -44(%sp),%r24\n" \ \ - /* _dl_fini does have a PLT slot now. I don't know how to get \ - to it though, so this hack will remain. */ \ + /* _dl_fini is a local function in the loader, so we construct \ + a false OPD here and pass this to the application. */ \ + /* FIXME: Should be able to use P%, and LR RR to have the \ + the linker construct a proper OPD. */ \ " .section .data\n" \ "__dl_fini_plabel:\n" \ " .word _dl_fini\n" \ diff --git a/sysdeps/hppa/elf/start.S b/sysdeps/hppa/elf/start.S index 94edeaa212..216b14d5cc 100644 --- a/sysdeps/hppa/elf/start.S +++ b/sysdeps/hppa/elf/start.S @@ -40,8 +40,9 @@ .import __libc_csu_fini, code .import __libc_csu_init, code - /* Have the linker create plabel words - so we get PLABEL32 relocs and not 21/14 */ + /* Have the linker create plabel words so we get PLABEL32 + relocs and not 21/14. The use of 21/14 relocs is only + supported in the latest dynamic linker. */ .section .rodata .align 4 .Lpmain: @@ -59,20 +60,45 @@ .export _start, ENTRY .type _start,@function _start: + /* At entry to the function we have: + + r26 - Unused + r25 - argc + r24 - argv + r23 - False _dl_fini plabel address + + This function is called from the lower half of RTLD_START. + + The call to __libc_start_main expects: + + 1. r26 - Application main + 2. r25 - argc + 3. r24 - argv + 4. r23 - __libc_csu_init + 5. sp-52 - __libc_csu_fini + 6. sp-56 - rtld_fini + 7. sp-60 - stackend */ .proc .callinfo - - /* Expand the stack to store the 5th through 7th args */ + /* Clear previous-sp. */ + stw %r0, -4(%sp) + /* Setup the stack and frame. */ + stw %rp, -20(%sp) ldo 64(%sp), %sp - /* TODO: Follow ABI? Place more things on the stack here... */ + stw %sp, -4(%sp) + stw %r19, -32(%sp) + + /* argc and argv should be in 25 and 24 (2nd and 3rd argument) */ + /* void (*rtld_fini) (void) (6th argument) */ + stw %r23, -56(%sp) + /* Need to setup 1, 4, 5, and 7th arguments */ #if SHARED /* load main (1st argument) */ addil LR'.Lpmain, %r19 ldw RR'.Lpmain(%r1), %r26 ldw 0(%r26),%r26 - /* argc and argv should be in 25 and 24 (2nd and 3rd argument) */ /* void (*init) (void) (4th argument) */ addil LR'.Lp__libc_csu_init, %r19 ldw RR'.Lp__libc_csu_init(%r1), %r23 @@ -85,7 +111,6 @@ _start: /* load main (1st argument) */ ldil LR'.Lpmain, %r26 ldw RR'.Lpmain(%r26), %r26 - /* argc and argv should be in 25 and 24 (2nd and 3rd argument) */ /* void (*init) (void) (4th argument) */ ldil LR'.Lp__libc_csu_init, %r23 ldw RR'.Lp__libc_csu_init(%r23), %r23 @@ -95,8 +120,6 @@ _start: #endif /* Store 5th argument */ stw %r22, -52(%sp) - /* void (*rtld_fini) (void) (6th argument) */ - stw %r23, -56(%sp) /* void *stack_end (7th argument) */ stw %sp, -60(%sp) From 66d4074acdee6e3d38fee8caa38bd1260ab5dd9f Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Wed, 13 Sep 2006 22:10:05 +0000 Subject: [PATCH 3652/4487] Checkin ChangeLog.hppa --- ChangeLog.hppa | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index b0ccb9872d..7b1adebfdb 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,11 @@ +2006-09-13 Carlos O'Donell + + * sysdeps/hppa/dl-machine.h (RTLD_START): Comment the use of + _dl_fini_plabel. + * sysdeps/hppa/elf/start.S: Correctly pass r23 to argument 6 of + __libc_start_main. Comment the order of arguments at entry and + those to __libc_start_main. + 2006-09-07 Carlos O'Donell * sysdeps/hppa/dl-machine.h (elf_machine_fixup_plt): Remove From 7cad09f90b24a38e5b013b7c7c9711aaa1593797 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Sat, 16 Sep 2006 00:46:19 +0000 Subject: [PATCH 3653/4487] 2006-09-15 Carlos O'Donell * sysdeps/hppa/nptl/tcb-offsets.sym: Define TID_THREAD_OFFSET. * sysdeps/unix/sysv/linux/hppa/clone.S: Handle RESET_PID, and restore r19 before call to _exit. * sysdeps/unix/sysv/linux/hppa/nptl/clone.S: New file. --- ChangeLog.hppa | 7 +++ sysdeps/hppa/nptl/tcb-offsets.sym | 1 + sysdeps/unix/sysv/linux/hppa/clone.S | 57 +++++++++++++++++------ sysdeps/unix/sysv/linux/hppa/nptl/clone.S | 3 ++ 4 files changed, 54 insertions(+), 14 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/hppa/nptl/clone.S diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 7b1adebfdb..8d3132f949 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,10 @@ +2006-09-15 Carlos O'Donell + + * sysdeps/hppa/nptl/tcb-offsets.sym: Define TID_THREAD_OFFSET. + * sysdeps/unix/sysv/linux/hppa/clone.S: Handle RESET_PID, and + restore r19 before call to _exit. + * sysdeps/unix/sysv/linux/hppa/nptl/clone.S: New file. + 2006-09-13 Carlos O'Donell * sysdeps/hppa/dl-machine.h (RTLD_START): Comment the use of diff --git a/sysdeps/hppa/nptl/tcb-offsets.sym b/sysdeps/hppa/nptl/tcb-offsets.sym index 1c8aef4c53..f3cc82621a 100644 --- a/sysdeps/hppa/nptl/tcb-offsets.sym +++ b/sysdeps/hppa/nptl/tcb-offsets.sym @@ -15,4 +15,5 @@ MUTEX_FUTEX offsetof (pthread_mutex_t, __data.__lock) -- preceeds the thread pointer (which points to the dtv). #define thread_offsetof(mem) (unsigned int)(offsetof(struct pthread, mem) - sizeof(struct pthread)) PID_THREAD_OFFSET thread_offsetof (pid) +TID_THREAD_OFFSET thread_offsetof (tid) MULTIPLE_THREADS_THREAD_OFFSET thread_offsetof (header.multiple_threads) diff --git a/sysdeps/unix/sysv/linux/hppa/clone.S b/sysdeps/unix/sysv/linux/hppa/clone.S index 231989518e..6cb74b071e 100644 --- a/sysdeps/unix/sysv/linux/hppa/clone.S +++ b/sysdeps/unix/sysv/linux/hppa/clone.S @@ -63,17 +63,20 @@ .text ENTRY(__clone) /* Prologue */ - stwm %r3, 64(%sp) + stwm %r4, 64(%sp) stw %sp, -4(%sp) +#ifdef PIC stw %r19, -32(%sp) +#endif /* Sanity check arguments. */ comib,=,n 0, %arg0, .LerrorSanity /* no NULL function pointers */ comib,=,n 0, %arg1, .LerrorSanity /* no NULL stack pointers */ - /* Save the fn ptr and arg on the new stack. */ + /* Save the function pointer, arg, and flags on the new stack. */ stwm %r26, 64(%r25) stw %r23, -60(%r25) + stw %r24, -56(%r25) /* Clone arguments are (int flags, void * child_stack) */ copy %r24, %r26 /* flags are first */ /* User stack pointer is in the correct register already */ @@ -85,7 +88,7 @@ ENTRY(__clone) /* Save the PIC register. */ #ifdef PIC - copy %r19, %r3 /* parent */ + copy %r19, %r4 /* parent */ #endif /* Do the system call */ @@ -96,6 +99,11 @@ ENTRY(__clone) comclr,>>= %r1, %ret0, %r0 /* Note: unsigned compare. */ b,n .LerrorRest + /* Restore the PIC register. */ +#ifdef PIC + copy %r4, %r19 /* parent */ +#endif + comib,=,n 0, %ret0, .LthreadStart /* Successful return from the parent @@ -104,32 +112,46 @@ ENTRY(__clone) ldw -84(%sp), %rp bv %r0(%rp) - ldwm -64(%sp), %r3 + ldwm -64(%sp), %r4 .LerrorRest: - /* Restore the PIC register on error */ -#ifdef PIC - copy %r3, %r19 /* parent */ -#endif /* Something bad happened -- no child created */ bl __syscall_error, %rp sub %r0, %ret0, %arg0 ldw -84(%sp), %rp /* Return after setting errno, ret0 is set to -1 by __syscall_error. */ bv %r0(%rp) - ldwm -64(%sp), %r3 + ldwm -64(%sp), %r4 .LerrorSanity: /* Sanity checks failed, return -1, and set errno to EINVAL. */ bl __syscall_error, %rp ldi EINVAL, %arg0 - /* Lazy, don't restore r19 */ ldw -84(%sp), %rp bv %r0(%rp) - ldwm -64(%sp), %r3 + ldwm -64(%sp), %r4 .LthreadStart: - +#ifdef RESET_PID +# define CLONE_VM_BIT 23 /* 0x00000100 */ +# define CLONE_THREAD_BIT 15 /* 0x00010000 */ + /* Load original clone flags. + If CLONE_THREAD was passed, don't reset the PID/TID. + If CLONE_VM was passed, we need to store -1 to PID/TID. + If CLONE_VM and CLONE_THREAD were not set store the result + of getpid to PID/TID. */ + ldw -56(%sp), %r26 + bb,<,n %r26, CLONE_THREAD_BIT, 1f + bb,< %r26, CLONE_VM_BIT, 2f + ldi -1, %ret0 + ble 0x100(%sr2, %r0) + ldi __NR_getpid, %r20 +2: + mfctl %cr27, %r26 + stw %ret0, PID_THREAD_OFFSET(%r26) + stw %ret0, TID_THREAD_OFFSET(%r26) +1: +#endif /* Load up the arguments. */ ldw -60(%sp), %arg0 ldw -64(%sp), %r22 @@ -137,13 +159,20 @@ ENTRY(__clone) /* $$dyncall fixes childs PIC register */ /* Call the user's function */ +#ifdef PIC + copy %r19, %r4 +#endif bl $$dyncall, %r31 copy %r31, %rp - +#ifdef PIC + copy %r4, %r19 +#endif + /* The call to _exit needs saved r19. */ bl _exit, %rp copy %ret0, %arg0 - /* We should not return from _exit. */ + /* We should not return from _exit. + We do not restore r4, or the stack state. */ iitlbp %r0, (%sr0, %r0) PSEUDO_END(__clone) diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/clone.S b/sysdeps/unix/sysv/linux/hppa/nptl/clone.S new file mode 100644 index 0000000000..23750b3f88 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/nptl/clone.S @@ -0,0 +1,3 @@ +#define RESET_PID +#include +#include "../clone.S" From 56865130d06d032b2c44b188eb841d481a3d0bad Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Thu, 21 Sep 2006 18:21:19 +0000 Subject: [PATCH 3654/4487] * sysdeps/arm/dl-machine.h (elf_machine_rel): Handle undefined symbols. (elf_machine_rela): Likewise. --- ChangeLog.arm | 6 ++++++ sysdeps/arm/dl-machine.h | 21 ++++++++++++++------- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 8702925b95..3effa9dc5c 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,9 @@ +2006-09-21 Daniel Jacobowitz + + * sysdeps/arm/dl-machine.h (elf_machine_rel): Handle undefined + symbols. + (elf_machine_rela): Likewise. + 2006-08-21 Daniel Jacobowitz * sysdeps/unix/sysv/linux/arm/eabi/syscalls.list: Remove msgctl, diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index ff8a170668..1a45a2613c 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -447,12 +447,16 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, break; case R_ARM_TLS_DTPOFF32: - *reloc_addr += sym->st_value; + if (sym != NULL) + *reloc_addr += sym->st_value; break; case R_ARM_TLS_TPOFF32: - CHECK_STATIC_TLS (map, sym_map); - *reloc_addr += sym->st_value + sym_map->l_tls_offset; + if (sym != NULL) + { + CHECK_STATIC_TLS (map, sym_map); + *reloc_addr += sym->st_value + sym_map->l_tls_offset; + } break; #endif default: @@ -544,13 +548,16 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, break; case R_ARM_TLS_DTPOFF32: - *reloc_addr = sym->st_value + reloc->r_addend; + *reloc_addr = (sym == NULL ? 0 : sym->st_value) + reloc->r_addend; break; case R_ARM_TLS_TPOFF32: - CHECK_STATIC_TLS (map, sym_map); - *reloc_addr = (sym->st_value + sym_map->l_tls_offset - + reloc->r_addend); + if (sym != NULL) + { + CHECK_STATIC_TLS (map, sym_map); + *reloc_addr = (sym->st_value + sym_map->l_tls_offset + + reloc->r_addend); + } break; #endif default: From 4b860fb9c0bae72e6bfcffb44509183eb1763706 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Thu, 21 Sep 2006 18:39:51 +0000 Subject: [PATCH 3655/4487] * sysdeps/unix/sysv/linux/arm/dl-procinfo.c (_dl_arm_cap_flags): Add "java" and "iwmmxt". * sysdeps/unix/sysv/linux/arm/dl-procinfo.h: Use for HWCAP values. (_DL_HWCAP_COUNT): Increase to 10. * sysdeps/unix/sysv/linux/arm/sysdep.h (HWCAP_ARM_SWP, HWCAP_ARM_HALF, HWCAP_ARM_THUMB, HWCAP_ARM_26BIT, HWCAP_ARM_FAST_MULT, HWCAP_ARM_FPA, HWCAP_ARM_VFP, HWCAP_ARM_EDSP, HWCAP_ARM_JAVA, HWCAP_ARM_IWMMXT): Define. * sysdeps/arm/eabi/setjmp.S (__sigsetjmp): Save iWMMXt registers if HWCAP_ARM_IWMMXT set. Don't include . Use HWCAP_ARM_VFP instead of HWCAP_VFP. * sysdeps/arm/eabi/__longjmp.S (__longjmp): Restore iWMMXt registers if HWCAP_ARM_IWMMXT set. Don't include . Use HWCAP_ARM_VFP instead of HWCAP_VFP. --- ChangeLog.arm | 18 ++++++++++++++++++ sysdeps/arm/eabi/__longjmp.S | 19 +++++++++++++++---- sysdeps/arm/eabi/setjmp.S | 19 +++++++++++++++---- sysdeps/unix/sysv/linux/arm/dl-procinfo.c | 5 +++-- sysdeps/unix/sysv/linux/arm/dl-procinfo.h | 19 ++++--------------- sysdeps/unix/sysv/linux/arm/sysdep.h | 12 ++++++++++++ 6 files changed, 67 insertions(+), 25 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 3effa9dc5c..45e8a87c7b 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,21 @@ +2006-09-21 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/dl-procinfo.c (_dl_arm_cap_flags): + Add "java" and "iwmmxt". + * sysdeps/unix/sysv/linux/arm/dl-procinfo.h: Use for + HWCAP values. + (_DL_HWCAP_COUNT): Increase to 10. + * sysdeps/unix/sysv/linux/arm/sysdep.h (HWCAP_ARM_SWP, + HWCAP_ARM_HALF, HWCAP_ARM_THUMB, HWCAP_ARM_26BIT, + HWCAP_ARM_FAST_MULT, HWCAP_ARM_FPA, HWCAP_ARM_VFP, HWCAP_ARM_EDSP, + HWCAP_ARM_JAVA, HWCAP_ARM_IWMMXT): Define. + * sysdeps/arm/eabi/setjmp.S (__sigsetjmp): Save iWMMXt registers + if HWCAP_ARM_IWMMXT set. Don't include . Use + HWCAP_ARM_VFP instead of HWCAP_VFP. + * sysdeps/arm/eabi/__longjmp.S (__longjmp): Restore iWMMXt + registers if HWCAP_ARM_IWMMXT set. Don't include + . Use HWCAP_ARM_VFP instead of HWCAP_VFP. + 2006-09-21 Daniel Jacobowitz * sysdeps/arm/dl-machine.h (elf_machine_rel): Handle undefined diff --git a/sysdeps/arm/eabi/__longjmp.S b/sysdeps/arm/eabi/__longjmp.S index 56776338a0..fff25cd948 100644 --- a/sysdeps/arm/eabi/__longjmp.S +++ b/sysdeps/arm/eabi/__longjmp.S @@ -1,5 +1,5 @@ /* longjmp for ARM. - Copyright (C) 1997, 1998, 2005 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 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 @@ -21,8 +21,6 @@ #define _SETJMP_H #define _ASM #include -#define __ASSEMBLY__ -#include #include /* __longjmp(jmpbuf, val) */ @@ -53,7 +51,7 @@ ENTRY (__longjmp) #endif #endif - tst a2, #HWCAP_VFP + tst a2, #HWCAP_ARM_VFP beq Lno_vfp /* Restore the VFP registers. */ @@ -65,6 +63,19 @@ ENTRY (__longjmp) mcr p10, 7, r1, cr1, cr0, 0 Lno_vfp: + tst a2, #HWCAP_ARM_IWMMXT + beq Lno_iwmmxt + + /* Restore the call-preserved iWMMXt registers. */ + /* Following instructions are wldrd wr10, [ip], #8 (etc.) */ + ldcl p1, cr10, [r12], #8 + ldcl p1, cr11, [r12], #8 + ldcl p1, cr12, [r12], #8 + ldcl p1, cr13, [r12], #8 + ldcl p1, cr14, [r12], #8 + ldcl p1, cr15, [r12], #8 +Lno_iwmmxt: + DO_RET(lr) #ifdef IS_IN_rtld diff --git a/sysdeps/arm/eabi/setjmp.S b/sysdeps/arm/eabi/setjmp.S index d9ad26a916..b7d2400f96 100644 --- a/sysdeps/arm/eabi/setjmp.S +++ b/sysdeps/arm/eabi/setjmp.S @@ -1,5 +1,5 @@ /* setjmp for ARM. - Copyright (C) 1997, 1998, 2005 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 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 @@ -21,8 +21,6 @@ #define _SETJMP_H #define _ASM #include -#define __ASSEMBLY__ -#include #include ENTRY (__sigsetjmp) @@ -51,7 +49,7 @@ ENTRY (__sigsetjmp) #endif #endif - tst a3, #HWCAP_VFP + tst a3, #HWCAP_ARM_VFP beq Lno_vfp /* Store the VFP registers. */ @@ -63,6 +61,19 @@ ENTRY (__sigsetjmp) str r2, [ip], #4 Lno_vfp: + tst a3, #HWCAP_ARM_IWMMXT + beq Lno_iwmmxt + + /* Save the call-preserved iWMMXt registers. */ + /* Following instructions are wstrd wr10, [ip], #8 (etc.) */ + stcl p1, cr10, [r12], #8 + stcl p1, cr11, [r12], #8 + stcl p1, cr12, [r12], #8 + stcl p1, cr13, [r12], #8 + stcl p1, cr14, [r12], #8 + stcl p1, cr15, [r12], #8 +Lno_iwmmxt: + /* Make a tail call to __sigjmp_save; it takes the same args. */ B PLTJMP(C_SYMBOL_NAME(__sigjmp_save)) diff --git a/sysdeps/unix/sysv/linux/arm/dl-procinfo.c b/sysdeps/unix/sysv/linux/arm/dl-procinfo.c index 9b87a2003d..5c913f51a2 100644 --- a/sysdeps/unix/sysv/linux/arm/dl-procinfo.c +++ b/sysdeps/unix/sysv/linux/arm/dl-procinfo.c @@ -1,5 +1,5 @@ /* Data for Linux/ARM version of processor capability information. - Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Philip Blundell , 2001. @@ -47,11 +47,12 @@ #if !defined PROCINFO_DECL && defined SHARED ._dl_arm_cap_flags #else -PROCINFO_CLASS const char _dl_arm_cap_flags[8][10] +PROCINFO_CLASS const char _dl_arm_cap_flags[10][10] #endif #ifndef PROCINFO_DECL = { "swp", "half", "thumb", "26bit", "fast-mult", "fpa", "vfp", "edsp", + "java", "iwmmxt", } #endif #if !defined SHARED || defined PROCINFO_DECL diff --git a/sysdeps/unix/sysv/linux/arm/dl-procinfo.h b/sysdeps/unix/sysv/linux/arm/dl-procinfo.h index 35b333479b..0c675c60dc 100644 --- a/sysdeps/unix/sysv/linux/arm/dl-procinfo.h +++ b/sysdeps/unix/sysv/linux/arm/dl-procinfo.h @@ -1,5 +1,5 @@ /* Linux/ARM version of processor capability information handling macros. - Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. + Copyright (C) 2001, 2002, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Philip Blundell , 2001. @@ -22,8 +22,9 @@ #define _DL_PROCINFO_H 1 #include +#include -#define _DL_HWCAP_COUNT 8 +#define _DL_HWCAP_COUNT 10 /* The kernel provides platform data but it is not interesting. */ #define _DL_HWCAP_PLATFORM 0 @@ -53,19 +54,7 @@ _dl_hwcap_string (int idx) return GLRO(dl_arm_cap_flags)[idx]; }; -enum -{ - HWCAP_ARM_SWP = 1 << 0, - HWCAP_ARM_HALF = 1 << 1, - HWCAP_ARM_THUMB = 1 << 2, - HWCAP_ARM_26BIT = 1 << 3, - HWCAP_ARM_FAST_MULT = 1 << 4, - HWCAP_ARM_FPA = 1 << 5, - HWCAP_ARM_VFP = 1 << 6, - HWCAP_ARM_EDSP = 1 << 7, - - HWCAP_IMPORTANT = (HWCAP_ARM_HALF | HWCAP_ARM_FAST_MULT) -}; +#define HWCAP_IMPORTANT (HWCAP_ARM_HALF | HWCAP_ARM_FAST_MULT) static inline int __attribute__ ((unused)) diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index e40add30cd..7692c1cd43 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -37,6 +37,18 @@ #define SYS_ify(syscall_name) (__NR_##syscall_name) +/* The following must match the kernel's . */ +#define HWCAP_ARM_SWP 1 +#define HWCAP_ARM_HALF 2 +#define HWCAP_ARM_THUMB 4 +#define HWCAP_ARM_26BIT 8 +#define HWCAP_ARM_FAST_MULT 16 +#define HWCAP_ARM_FPA 32 +#define HWCAP_ARM_VFP 64 +#define HWCAP_ARM_EDSP 128 +#define HWCAP_ARM_JAVA 256 +#define HWCAP_ARM_IWMMXT 512 + #ifdef __ASSEMBLER__ /* Linux uses a negative return value to indicate syscall errors, From 6b4d184dc943ba57697dbbc9c05c829fce24ebff Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Thu, 21 Sep 2006 21:01:02 +0000 Subject: [PATCH 3656/4487] * sysdeps/mips/fpu_control.h: If soft-float, don't use floating-point registers. * sysdeps/mips/__longjmp.c, sysdeps/mips/setjmp_aux.c, sysdeps/mips/mips64/__longjmp.c, sysdeps/mips/mips64/setjmp_aux.c: Likewise. --- ChangeLog.mips | 8 ++++++++ sysdeps/mips/__longjmp.c | 2 ++ sysdeps/mips/fpu_control.h | 13 +++++++++++++ sysdeps/mips/mips64/__longjmp.c | 2 ++ sysdeps/mips/mips64/setjmp_aux.c | 4 ++++ sysdeps/mips/setjmp_aux.c | 4 ++++ 6 files changed, 33 insertions(+) diff --git a/ChangeLog.mips b/ChangeLog.mips index b3bf0907f9..b849ffa2cc 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,11 @@ +2006-09-21 Joseph Myers + + * sysdeps/mips/fpu_control.h: If soft-float, don't use + floating-point registers. + * sysdeps/mips/__longjmp.c, sysdeps/mips/setjmp_aux.c, + sysdeps/mips/mips64/__longjmp.c, sysdeps/mips/mips64/setjmp_aux.c: + Likewise. + 2006-08-04 Joseph Myers * sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h (FUTEX_LOCK_PI, diff --git a/sysdeps/mips/__longjmp.c b/sysdeps/mips/__longjmp.c index 750a71fd1e..386c05625b 100644 --- a/sysdeps/mips/__longjmp.c +++ b/sysdeps/mips/__longjmp.c @@ -37,6 +37,7 @@ __longjmp (env, val_arg) along the way. */ register int val asm ("a1"); +#ifdef __mips_hard_float /* Pull back the floating point callee-saved registers. */ asm volatile ("l.d $f20, %0" : : "m" (env[0].__fpregs[0])); asm volatile ("l.d $f22, %0" : : "m" (env[0].__fpregs[1])); @@ -48,6 +49,7 @@ __longjmp (env, val_arg) /* Get and reconstruct the floating point csr. */ asm volatile ("lw $2, %0" : : "m" (env[0].__fpc_csr)); asm volatile ("ctc1 $2, $31"); +#endif /* Get the GP. */ asm volatile ("lw $gp, %0" : : "m" (env[0].__gp)); diff --git a/sysdeps/mips/fpu_control.h b/sysdeps/mips/fpu_control.h index da18deab5a..5712ac5338 100644 --- a/sysdeps/mips/fpu_control.h +++ b/sysdeps/mips/fpu_control.h @@ -58,6 +58,17 @@ #include +#ifdef __mips_soft_float + +#define _FPU_RESERVED 0xffffffff +#define _FPU_DEFAULT 0x00000000 +typedef unsigned int fpu_control_t; +#define _FPU_GETCW(cw) 0 +#define _FPU_SETCW(cw) do { } while (0) +extern fpu_control_t __fpu_control; + +#else /* __mips_soft_float */ + /* masking of interrupts */ #define _FPU_MASK_V 0x0800 /* Invalid operation */ #define _FPU_MASK_Z 0x0400 /* Division by zero */ @@ -95,4 +106,6 @@ typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__SI__))); /* Default control word set at startup. */ extern fpu_control_t __fpu_control; +#endif /* __mips_soft_float */ + #endif /* fpu_control.h */ diff --git a/sysdeps/mips/mips64/__longjmp.c b/sysdeps/mips/mips64/__longjmp.c index 546493f842..973b078ae7 100644 --- a/sysdeps/mips/mips64/__longjmp.c +++ b/sysdeps/mips/mips64/__longjmp.c @@ -39,6 +39,7 @@ __longjmp (env, val_arg) along the way. */ register int val asm ("a1"); +#ifdef __mips_hard_float /* Pull back the floating point callee-saved registers. */ #if _MIPS_SIM == _ABI64 asm volatile ("l.d $f24, %0" : : "m" (env[0].__fpregs[0])); @@ -61,6 +62,7 @@ __longjmp (env, val_arg) /* Get and reconstruct the floating point csr. */ asm volatile ("lw $2, %0" : : "m" (env[0].__fpc_csr)); asm volatile ("ctc1 $2, $31"); +#endif /* Get the GP. */ asm volatile ("ld $gp, %0" : : "m" (env[0].__gp)); diff --git a/sysdeps/mips/mips64/setjmp_aux.c b/sysdeps/mips/mips64/setjmp_aux.c index 26b4739c32..49d0915be1 100644 --- a/sysdeps/mips/mips64/setjmp_aux.c +++ b/sysdeps/mips/mips64/setjmp_aux.c @@ -29,6 +29,7 @@ int __sigsetjmp_aux (jmp_buf env, int savemask, long long sp, long long fp, long long gp) { +#ifdef __mips_hard_float /* Store the floating point callee-saved registers... */ #if _MIPS_SIM == _ABI64 asm volatile ("s.d $f24, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[0])); @@ -46,6 +47,7 @@ __sigsetjmp_aux (jmp_buf env, int savemask, long long sp, long long fp, asm volatile ("s.d $f26, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[3])); asm volatile ("s.d $f28, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[4])); asm volatile ("s.d $f30, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[5])); +#endif #endif /* .. and the PC; */ @@ -70,8 +72,10 @@ __sigsetjmp_aux (jmp_buf env, int savemask, long long sp, long long fp, asm volatile ("sd $22, %0" : : "m" (env[0].__jmpbuf[0].__regs[6])); asm volatile ("sd $23, %0" : : "m" (env[0].__jmpbuf[0].__regs[7])); +#ifdef __mips_hard_float /* .. and finally get and reconstruct the floating point csr. */ asm ("cfc1 %0, $31" : "=r" (env[0].__jmpbuf[0].__fpc_csr)); +#endif /* Save the signal mask if requested. */ return __sigjmp_save (env, savemask); diff --git a/sysdeps/mips/setjmp_aux.c b/sysdeps/mips/setjmp_aux.c index 7125cc4f81..269d0fd25a 100644 --- a/sysdeps/mips/setjmp_aux.c +++ b/sysdeps/mips/setjmp_aux.c @@ -27,6 +27,7 @@ int __sigsetjmp_aux (jmp_buf env, int savemask, int sp, int fp) { +#ifdef __mips_hard_float /* Store the floating point callee-saved registers... */ asm volatile ("s.d $f20, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[0])); asm volatile ("s.d $f22, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[1])); @@ -34,6 +35,7 @@ __sigsetjmp_aux (jmp_buf env, int savemask, int sp, int fp) asm volatile ("s.d $f26, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[3])); asm volatile ("s.d $f28, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[4])); asm volatile ("s.d $f30, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[5])); +#endif /* .. and the PC; */ asm volatile ("sw $31, %0" : : "m" (env[0].__jmpbuf[0].__pc)); @@ -57,8 +59,10 @@ __sigsetjmp_aux (jmp_buf env, int savemask, int sp, int fp) asm volatile ("sw $22, %0" : : "m" (env[0].__jmpbuf[0].__regs[6])); asm volatile ("sw $23, %0" : : "m" (env[0].__jmpbuf[0].__regs[7])); +#ifdef __mips_hard_float /* .. and finally get and reconstruct the floating point csr. */ asm ("cfc1 %0, $31" : "=r" (env[0].__jmpbuf[0].__fpc_csr)); +#endif /* Save the signal mask if requested. */ return __sigjmp_save (env, savemask); From 6ea630251e84cdaabe7c5567d1640af82e4010bc Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Fri, 22 Sep 2006 17:36:23 +0000 Subject: [PATCH 3657/4487] * sysdeps/unix/sysv/linux/mips/xstatconv.c: Remove STAT_IS_KERNEL_STAT code. (__xstat_conv): Use memset to clear padding arrays. Check for overflow. (__xstat64_conv): Use memset to clear padding arrays. (__xstat32_conv): New function. * sysdeps/unix/sysv/linux/mips/mips32/fxstatat.c: New file. * sysdeps/unix/sysv/linux/mips/mips64/fxstatat64.c: Likewise. --- ChangeLog.mips | 11 ++ .../unix/sysv/linux/mips/mips32/fxstatat.c | 1 + .../unix/sysv/linux/mips/mips64/fxstatat64.c | 113 +++++++++++++++++ sysdeps/unix/sysv/linux/mips/xstatconv.c | 115 ++++++++++++++---- 4 files changed, 214 insertions(+), 26 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/mips/mips32/fxstatat.c create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/fxstatat64.c diff --git a/ChangeLog.mips b/ChangeLog.mips index b849ffa2cc..0c9fb72c12 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,14 @@ +2006-09-22 Richard Sandiford + + * sysdeps/unix/sysv/linux/mips/xstatconv.c: Remove STAT_IS_KERNEL_STAT + code. + (__xstat_conv): Use memset to clear padding arrays. Check for + overflow. + (__xstat64_conv): Use memset to clear padding arrays. + (__xstat32_conv): New function. + * sysdeps/unix/sysv/linux/mips/mips32/fxstatat.c: New file. + * sysdeps/unix/sysv/linux/mips/mips64/fxstatat64.c: Likewise. + 2006-09-21 Joseph Myers * sysdeps/mips/fpu_control.h: If soft-float, don't use diff --git a/sysdeps/unix/sysv/linux/mips/mips32/fxstatat.c b/sysdeps/unix/sysv/linux/mips/mips32/fxstatat.c new file mode 100644 index 0000000000..0f8b3135d8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips32/fxstatat.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/mips/mips64/fxstatat64.c b/sysdeps/unix/sysv/linux/mips/mips64/fxstatat64.c new file mode 100644 index 0000000000..21a630963f --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/fxstatat64.c @@ -0,0 +1,113 @@ +/* Copyright (C) 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 + 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. */ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include + +/* Get information about the file NAME in BUF. */ + +int +__fxstatat64 (int vers, int fd, const char *file, struct stat64 *st, int flag) +{ + if (__builtin_expect (vers != _STAT_VER_LINUX, 0)) + { + __set_errno (EINVAL); + return -1; + } + + int result; + INTERNAL_SYSCALL_DECL (err); + struct kernel_stat kst; + +#ifdef __NR_newfstatat +# ifndef __ASSUME_ATFCTS + if (__have_atfcts >= 0) +# endif + { + result = INTERNAL_SYSCALL (newfstatat, err, 4, fd, file, &kst, flag); +# ifndef __ASSUME_ATFCTS + if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 1) + && INTERNAL_SYSCALL_ERRNO (result, err) == ENOSYS) + __have_atfcts = -1; + else +# endif + if (!__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 1)) + return __xstat64_conv (vers, &kst, st); + else + { + __set_errno (INTERNAL_SYSCALL_ERRNO (result, err)); + return -1; + } + } +#endif + +#ifndef __ASSUME_ATFCTS + if (flag & ~AT_SYMLINK_NOFOLLOW) + { + __set_errno (EINVAL); + return -1; + } + + char *buf = NULL; + + if (fd != AT_FDCWD && file[0] != '/') + { + size_t filelen = strlen (file); + static const char procfd[] = "/proc/self/fd/%d/%s"; + /* Buffer for the path name we are going to use. It consists of + - the string /proc/self/fd/ + - the file descriptor number + - the file name provided. + The final NUL is included in the sizeof. A bit of overhead + due to the format elements compensates for possible negative + numbers. */ + size_t buflen = sizeof (procfd) + sizeof (int) * 3 + filelen; + buf = alloca (buflen); + + __snprintf (buf, buflen, procfd, fd, file); + file = buf; + } + + if (flag & AT_SYMLINK_NOFOLLOW) + result = INTERNAL_SYSCALL (lstat, err, 2, CHECK_STRING (file), + __ptrvalue (&kst)); + else + result = INTERNAL_SYSCALL (stat, err, 2, CHECK_STRING (file), + __ptrvalue (&kst)); + + if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) + return __xstat64_conv (vers, &kst, st); + + __atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), fd, buf); + return -1; +#endif +} +libc_hidden_def (__fxstatat64) diff --git a/sysdeps/unix/sysv/linux/mips/xstatconv.c b/sysdeps/unix/sysv/linux/mips/xstatconv.c index ccab6b6a79..068c087b0a 100644 --- a/sysdeps/unix/sysv/linux/mips/xstatconv.c +++ b/sysdeps/unix/sysv/linux/mips/xstatconv.c @@ -21,16 +21,8 @@ #include #include -#ifdef STAT_IS_KERNEL_STAT - -/* Dummy. */ -struct kernel_stat; - -#else - #include - int __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf) { @@ -49,30 +41,43 @@ __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf) /* Convert to current kernel version of `struct stat'. */ buf->st_dev = kbuf->st_dev; - buf->st_pad1[0] = 0; buf->st_pad1[1] = 0; buf->st_pad1[2] = 0; + memset (&buf->st_pad1, 0, sizeof (buf->st_pad1)); buf->st_ino = kbuf->st_ino; + /* Check for overflow. */ + if (buf->st_ino != kbuf->st_ino) + { + __set_errno (EOVERFLOW); + return -1; + } buf->st_mode = kbuf->st_mode; buf->st_nlink = kbuf->st_nlink; buf->st_uid = kbuf->st_uid; buf->st_gid = kbuf->st_gid; buf->st_rdev = kbuf->st_rdev; - buf->st_pad2[0] = 0; buf->st_pad2[1] = 0; - buf->st_pad3 = 0; + memset (&buf->st_pad2, 0, sizeof (buf->st_pad2)); buf->st_size = kbuf->st_size; - buf->st_blksize = kbuf->st_blksize; - buf->st_blocks = kbuf->st_blocks; - + /* Check for overflow. */ + if (buf->st_size != kbuf->st_size) + { + __set_errno (EOVERFLOW); + return -1; + } + buf->st_pad3 = 0; buf->st_atim.tv_sec = kbuf->st_atime_sec; buf->st_atim.tv_nsec = kbuf->st_atime_nsec; buf->st_mtim.tv_sec = kbuf->st_mtime_sec; buf->st_mtim.tv_nsec = kbuf->st_mtime_nsec; buf->st_ctim.tv_sec = kbuf->st_ctime_sec; buf->st_ctim.tv_nsec = kbuf->st_ctime_nsec; - - buf->st_pad5[0] = 0; buf->st_pad5[1] = 0; - buf->st_pad5[2] = 0; buf->st_pad5[3] = 0; - buf->st_pad5[4] = 0; buf->st_pad5[5] = 0; - buf->st_pad5[6] = 0; buf->st_pad5[7] = 0; + buf->st_blksize = kbuf->st_blksize; + buf->st_blocks = kbuf->st_blocks; + /* Check for overflow. */ + if (buf->st_blocks != kbuf->st_blocks) + { + __set_errno (EOVERFLOW); + return -1; + } + memset (&buf->st_pad5, 0, sizeof (buf->st_pad5)); } break; @@ -97,14 +102,14 @@ __xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf) struct stat64 *buf = ubuf; buf->st_dev = kbuf->st_dev; - buf->st_pad1[0] = 0; buf->st_pad1[1] = 0; buf->st_pad1[2] = 0; + memset (&buf->st_pad1, 0, sizeof (buf->st_pad1)); buf->st_ino = kbuf->st_ino; buf->st_mode = kbuf->st_mode; buf->st_nlink = kbuf->st_nlink; buf->st_uid = kbuf->st_uid; buf->st_gid = kbuf->st_gid; buf->st_rdev = kbuf->st_rdev; - buf->st_pad2[0] = 0; buf->st_pad2[1] = 0; buf->st_pad2[2] = 0; + memset (&buf->st_pad2, 0, sizeof (buf->st_pad2)); buf->st_pad3 = 0; buf->st_size = kbuf->st_size; buf->st_blksize = kbuf->st_blksize; @@ -117,10 +122,7 @@ __xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf) buf->st_ctim.tv_sec = kbuf->st_ctime_sec; buf->st_ctim.tv_nsec = kbuf->st_ctime_nsec; - buf->st_pad4[0] = 0; buf->st_pad4[1] = 0; - buf->st_pad4[2] = 0; buf->st_pad4[3] = 0; - buf->st_pad4[4] = 0; buf->st_pad4[5] = 0; - buf->st_pad4[6] = 0; buf->st_pad4[7] = 0; + memset (&buf->st_pad4, 0, sizeof (buf->st_pad4)); } break; @@ -136,4 +138,65 @@ __xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf) #endif } -#endif /* ! STAT_IS_KERNEL_STAT */ +#if _MIPS_SIM == _ABIO32 +int +__xstat32_conv (int vers, struct stat64 *kbuf, struct stat *buf) +{ + switch (vers) + { + case _STAT_VER_LINUX: + /* Convert current kernel version of `struct stat64' to + `struct stat'. The layout of the fields in the kernel's + stat64 is the same as that in the user stat64; the only + difference is that the latter has more trailing padding. */ + buf->st_dev = kbuf->st_dev; + memset (&buf->st_pad1, 0, sizeof (buf->st_pad1)); + buf->st_ino = kbuf->st_ino; + /* Check for overflow. */ + if (buf->st_ino != kbuf->st_ino) + { + __set_errno (EOVERFLOW); + return -1; + } + buf->st_mode = kbuf->st_mode; + buf->st_nlink = kbuf->st_nlink; + buf->st_uid = kbuf->st_uid; + buf->st_gid = kbuf->st_gid; + buf->st_rdev = kbuf->st_rdev; + memset (&buf->st_pad2, 0, sizeof (buf->st_pad2)); + buf->st_size = kbuf->st_size; + /* Check for overflow. */ + if (buf->st_size != kbuf->st_size) + { + __set_errno (EOVERFLOW); + return -1; + } + buf->st_pad3 = 0; + buf->st_atim.tv_sec = kbuf->st_atim.tv_sec; + buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec; + buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec; + buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec; + buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec; + buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec; + buf->st_blksize = kbuf->st_blksize; + buf->st_blocks = kbuf->st_blocks; + /* Check for overflow. */ + if (buf->st_blocks != kbuf->st_blocks) + { + __set_errno (EOVERFLOW); + return -1; + } + memset (&buf->st_pad5, 0, sizeof (buf->st_pad5)); + break; + + /* If struct stat64 is different from struct stat then + _STAT_VER_KERNEL does not make sense. */ + case _STAT_VER_KERNEL: + default: + __set_errno (EINVAL); + return -1; + } + + return 0; +} +#endif /* _MIPS_SIM == _ABIO32 */ From a852b06d972cdf3415988939e4b7b592d6b2f1cc Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Fri, 22 Sep 2006 17:40:26 +0000 Subject: [PATCH 3658/4487] * sysdeps/unix/sysv/linux/arm/fxstatat.c: New file. --- ChangeLog.arm | 4 ++++ sysdeps/unix/sysv/linux/arm/fxstatat.c | 1 + 2 files changed, 5 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/fxstatat.c diff --git a/ChangeLog.arm b/ChangeLog.arm index 45e8a87c7b..b28f7b5cf2 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,7 @@ +2006-09-22 Khem Raj + + * sysdeps/unix/sysv/linux/arm/fxstatat.c: New file. + 2006-09-21 Joseph Myers * sysdeps/unix/sysv/linux/arm/dl-procinfo.c (_dl_arm_cap_flags): diff --git a/sysdeps/unix/sysv/linux/arm/fxstatat.c b/sysdeps/unix/sysv/linux/arm/fxstatat.c new file mode 100644 index 0000000000..0f8b3135d8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/fxstatat.c @@ -0,0 +1 @@ +#include From 9c986f878af1392b02170336a52e5a59e7fe55ed Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 3 Oct 2006 14:44:27 +0000 Subject: [PATCH 3659/4487] 2006-10-03 Richard Sandiford * sysdeps/m68k/bits/mathdef.h: Moved from sysdeps/m68k to sysdeps/m68k/m680x0. * sysdeps/m68k/m68020/submul_1.S: Likewise. * sysdeps/m68k/m68020/Makefile: Likewise. * sysdeps/m68k/m68020/mul_1.S: Likewise. * sysdeps/m68k/m68020/wordcopy.S: Likewise. * sysdeps/m68k/m68020/addmul_1.S: Likewise. * sysdeps/m68k/m68020/bits/string.h: Likewise. * sysdeps/m68k/m68020/bits/atomic.h: Likewise. * sysdeps/m68k/sub_n.S: Likewise. * sysdeps/m68k/add_n.S: Likewise. * sysdeps/m68k/s_isnanl.c: Likewise. * sysdeps/m68k/fpu/s_log1p.c: Likewise. * sysdeps/m68k/fpu/e_asinf.c: Likewise. * sysdeps/m68k/fpu/s_cosl.c: Likewise. * sysdeps/m68k/fpu/s_isinff.c: Likewise. * sysdeps/m68k/fpu/k_rem_pio2.c: Likewise. * sysdeps/m68k/fpu/s_ccos.c: Likewise. * sysdeps/m68k/fpu/s_expm1.c: Likewise. * sysdeps/m68k/fpu/slowexp.c: Likewise. * sysdeps/m68k/fpu/k_rem_pio2l.c: Likewise. * sysdeps/m68k/fpu/s_ccoshf.c: Likewise. * sysdeps/m68k/fpu/s_ilogbl.c: Likewise. * sysdeps/m68k/fpu/Makefile: Likewise. * sysdeps/m68k/fpu/s_expm1f.c: Likewise. * sysdeps/m68k/fpu/s_significandf.c: Likewise. * sysdeps/m68k/fpu/e_pow.c: Likewise. * sysdeps/m68k/fpu/s_csinh.c: Likewise. * sysdeps/m68k/fpu/e_exp.c: Likewise. * sysdeps/m68k/fpu/s_remquof.c: Likewise. * sysdeps/m68k/fpu/s_ilogbf.c: Likewise. * sysdeps/m68k/fpu/s_truncl.c: Likewise. * sysdeps/m68k/fpu/s_frexpf.c: Likewise. * sysdeps/m68k/fpu/s_cos.c: Likewise. * sysdeps/m68k/fpu/fraiseexcpt.c: Likewise. * sysdeps/m68k/fpu/branred.c: Likewise. * sysdeps/m68k/fpu/s_frexpl.c: Likewise. * sysdeps/m68k/fpu/s_atan.c: Likewise. * sysdeps/m68k/fpu/e_rem_pio2f.c: Likewise. * sysdeps/m68k/fpu/e_scalbl.c: Likewise. * sysdeps/m68k/fpu/e_exp2.c: Likewise. * sysdeps/m68k/fpu/s_cexpf.c: Likewise. * sysdeps/m68k/fpu/mplog.c: Likewise. * sysdeps/m68k/fpu/s_rintf.c: Likewise. * sysdeps/m68k/fpu/s_tanh.c: Likewise. * sysdeps/m68k/fpu/e_scalbf.c: Likewise. * sysdeps/m68k/fpu/s_csinhl.c: Likewise. * sysdeps/m68k/fpu/s_floorl.c: Likewise. * sysdeps/m68k/fpu/k_tanf.c: Likewise. * sysdeps/m68k/fpu/k_tanl.c: Likewise. * sysdeps/m68k/fpu/e_fmodf.c: Likewise. * sysdeps/m68k/fpu/e_atanhf.c: Likewise. * sysdeps/m68k/fpu/s_isnanf.c: Likewise. * sysdeps/m68k/fpu/s_fpclassifyl.c: Likewise. * sysdeps/m68k/fpu/s_modf.c: Likewise. * sysdeps/m68k/fpu/e_log2.c: Likewise. * sysdeps/m68k/fpu/e_acosf.c: Likewise. * sysdeps/m68k/fpu/s_log1pl.c: Likewise. * sysdeps/m68k/fpu/e_log2f.c: Likewise. * sysdeps/m68k/fpu/mpa.c: Likewise. * sysdeps/m68k/fpu/t_exp.c: Likewise. * sysdeps/m68k/fpu/e_acos.c: Likewise. * sysdeps/m68k/fpu/s_expm1l.c: Likewise. * sysdeps/m68k/fpu/s_ccoshl.c: Likewise. * sysdeps/m68k/fpu/s_sinf.c: Likewise. * sysdeps/m68k/fpu/k_tan.c: Likewise. * sysdeps/m68k/fpu/k_cosl.c: Likewise. * sysdeps/m68k/fpu/e_remainder.c: Likewise. * sysdeps/m68k/fpu/s_trunc.c: Likewise. * sysdeps/m68k/fpu/s_sincos.c: Likewise. * sysdeps/m68k/fpu/s_scalbnl.c: Likewise. * sysdeps/m68k/fpu/s_finitef.c: Likewise. * sysdeps/m68k/fpu/s_tanhl.c: Likewise. * sysdeps/m68k/fpu/s_lrintl.c: Likewise. * sysdeps/m68k/fpu/slowpow.c: Likewise. * sysdeps/m68k/fpu/mpexp.c: Likewise. * sysdeps/m68k/fpu/s_isnanl.c: Likewise. * sysdeps/m68k/fpu/e_expf.c: Likewise. * sysdeps/m68k/fpu/s_significand.c: Likewise. * sysdeps/m68k/fpu/e_sinhf.c: Likewise. * sysdeps/m68k/fpu/s_tanl.c: Likewise. * sysdeps/m68k/fpu/s_tanhf.c: Likewise. * sysdeps/m68k/fpu/s_cexp.c: Likewise. * sysdeps/m68k/fpu/e_sqrtf.c: Likewise. * sysdeps/m68k/fpu/s_isinf.c: Likewise. * sysdeps/m68k/fpu/s_nearbyint.c: Likewise. * sysdeps/m68k/fpu/e_fmod.c: Likewise. * sysdeps/m68k/fpu/sincos32.c: Likewise. * sysdeps/m68k/fpu/e_sqrtl.c: Likewise. * sysdeps/m68k/fpu/s_sincosl.c: Likewise. * sysdeps/m68k/fpu/e_atan2f.c: Likewise. * sysdeps/m68k/fpu/s_nearbyintf.c: Likewise. * sysdeps/m68k/fpu/e_fmodl.c: Likewise. * sysdeps/m68k/fpu/e_coshf.c: Likewise. * sysdeps/m68k/fpu/s_csinf.c: Likewise. * sysdeps/m68k/fpu/s_ccosl.c: Likewise. * sysdeps/m68k/fpu/e_sqrt.c: Likewise. * sysdeps/m68k/fpu/s_sin.c: Likewise. * sysdeps/m68k/fpu/e_asin.c: Likewise. * sysdeps/m68k/fpu/mptan.c: Likewise. * sysdeps/m68k/fpu/e_exp10f.c: Likewise. * sysdeps/m68k/fpu/e_scalb.c: Likewise. * sysdeps/m68k/fpu/s_finitel.c: Likewise. * sysdeps/m68k/fpu/e_log10.c: Likewise. * sysdeps/m68k/fpu/k_sinl.c: Likewise. * sysdeps/m68k/fpu/e_remainderl.c: Likewise. * sysdeps/m68k/fpu/s_remquol.c: Likewise. * sysdeps/m68k/fpu/s_scalblnf.c: Likewise. * sysdeps/m68k/fpu/s_llrint.c: Likewise. * sysdeps/m68k/fpu/e_rem_pio2.c: Likewise. * sysdeps/m68k/fpu/e_asinl.c: Likewise. * sysdeps/m68k/fpu/e_logl.c: Likewise. * sysdeps/m68k/fpu/s_cosf.c: Likewise. * sysdeps/m68k/fpu/s_rint.c: Likewise. * sysdeps/m68k/fpu/s_ceill.c: Likewise. * sysdeps/m68k/fpu/s_modfl.c: Likewise. * sysdeps/m68k/fpu/s_csinl.c: Likewise. * sysdeps/m68k/fpu/s_tan.c: Likewise. * sysdeps/m68k/fpu/s_sincosf.c: Likewise. * sysdeps/m68k/fpu/dosincos.c: Likewise. * sysdeps/m68k/fpu/e_powl.c: Likewise. * sysdeps/m68k/fpu/s_ilogb.c: Likewise. * sysdeps/m68k/fpu/s_llrintl.c: Likewise. * sysdeps/m68k/fpu/e_expl.c: Likewise. * sysdeps/m68k/fpu/libm-test-ulps: Likewise. * sysdeps/m68k/fpu/s_tanf.c: Likewise. * sysdeps/m68k/fpu/mpsqrt.c: Likewise. * sysdeps/m68k/fpu/s_sinl.c: Likewise. * sysdeps/m68k/fpu/mathimpl.h: Likewise. * sysdeps/m68k/fpu/e_acosl.c: Likewise. * sysdeps/m68k/fpu/e_cosh.c: Likewise. * sysdeps/m68k/fpu/s_cexpl.c: Likewise. * sysdeps/m68k/fpu/s_fabsl.c: Likewise. * sysdeps/m68k/fpu/halfulp.c: Likewise. * sysdeps/m68k/fpu/s_modff.c: Likewise. * sysdeps/m68k/fpu/s_isnan.c: Likewise. * sysdeps/m68k/fpu/e_atan2.c: Likewise. * sysdeps/m68k/fpu/s_fabs.c: Likewise. * sysdeps/m68k/fpu/e_log10f.c: Likewise. * sysdeps/m68k/fpu/k_cosf.c: Likewise. * sysdeps/m68k/fpu/e_sinh.c: Likewise. * sysdeps/m68k/fpu/s_truncf.c: Likewise. * sysdeps/m68k/fpu/s_ceil.c: Likewise. * sysdeps/m68k/fpu/s_log1pf.c: Likewise. * sysdeps/m68k/fpu/e_logf.c: Likewise. * sysdeps/m68k/fpu/mpatan.c: Likewise. * sysdeps/m68k/fpu/s_csin.c: Likewise. * sysdeps/m68k/fpu/e_exp2l.c: Likewise. * sysdeps/m68k/fpu/e_sinhl.c: Likewise. * sysdeps/m68k/fpu/e_atan2l.c: Likewise. * sysdeps/m68k/fpu/s_scalbn.c: Likewise. * sysdeps/m68k/fpu/s_floorf.c: Likewise. * sysdeps/m68k/fpu/e_log2l.c: Likewise. * sysdeps/m68k/fpu/s_atanl.c: Likewise. * sysdeps/m68k/fpu/s_llrintf.c: Likewise. * sysdeps/m68k/fpu/k_sinf.c: Likewise. * sysdeps/m68k/fpu/s_csinhf.c: Likewise. * sysdeps/m68k/fpu/s_frexp.c: Likewise. * sysdeps/m68k/fpu/s_atanf.c: Likewise. * sysdeps/m68k/fpu/s_floor.c: Likewise. * sysdeps/m68k/fpu/e_exp10l.c: Likewise. * sysdeps/m68k/fpu/doasin.c: Likewise. * sysdeps/m68k/fpu/s_rintl.c: Likewise. * sysdeps/m68k/fpu/e_atanhl.c: Likewise. * sysdeps/m68k/fpu/e_remainderf.c: Likewise. * sysdeps/m68k/fpu/s_scalbln.c: Likewise. * sysdeps/m68k/fpu/e_rem_pio2l.c: Likewise. * sysdeps/m68k/fpu/e_exp10.c: Likewise. * sysdeps/m68k/fpu/s_lrintf.c: Likewise. * sysdeps/m68k/fpu/k_cos.c: Likewise. * sysdeps/m68k/fpu/s_lrint.c: Likewise. * sysdeps/m68k/fpu/s_ccosf.c: Likewise. * sysdeps/m68k/fpu/s_scalblnl.c: Likewise. * sysdeps/m68k/fpu/switch/Makefile: Likewise. * sysdeps/m68k/fpu/switch/switch.c: Likewise. * sysdeps/m68k/fpu/switch/68881-sw.h: Likewise. * sysdeps/m68k/fpu/switch/bits/mathinline.h: Likewise. * sysdeps/m68k/fpu/e_log.c: Likewise. * sysdeps/m68k/fpu/s_nextafterl.c: Likewise. * sysdeps/m68k/fpu/s_nearbyintl.c: Likewise. * sysdeps/m68k/fpu/mpatan2.c: Likewise. * sysdeps/m68k/fpu/k_sin.c: Likewise. * sysdeps/m68k/fpu/e_atanh.c: Likewise. * sysdeps/m68k/fpu/s_remquo.c: Likewise. * sysdeps/m68k/fpu/e_log10l.c: Likewise. * sysdeps/m68k/fpu/s_ceilf.c: Likewise. * sysdeps/m68k/fpu/s_fabsf.c: Likewise. * sysdeps/m68k/fpu/s_significandl.c: Likewise. * sysdeps/m68k/fpu/s_ccosh.c: Likewise. * sysdeps/m68k/fpu/e_coshl.c: Likewise. * sysdeps/m68k/fpu/s_scalbnf.c: Likewise. * sysdeps/m68k/fpu/s_finite.c: Likewise. * sysdeps/m68k/fpu/e_exp2f.c: Likewise. * sysdeps/m68k/fpu/k_rem_pio2f.c: Likewise. * sysdeps/m68k/fpu/s_isinfl.c: Likewise. * sysdeps/m68k/fpu/bits/mathinline.h: Likewise. * sysdeps/m68k/fpu/e_powf.c: Likewise. * sysdeps/m68k/rshift.S: Likewise. * sysdeps/m68k/lshift.S: Likewise. * sysdeps/m68k/strtold_l.c: Likewise. * sysdeps/m68k/printf_fphex.c: Likewise. * sysdeps/m68k/s_isinfl.c: Likewise. * sysdeps/m68k/bits/huge_vall.h: Likewise. * sysdeps/m68k/asm-syntax.h (andw, andl, subqw, tstw, tstl): New. * sysdeps/m68k/bits/byteswap.h (__bswap32): Don't define for Coldfire targets. * sysdeps/m68k/bits/setjmp.h (__jmp_buf): Add a 64-byte __fpregs field for Coldfire FPUs. * sysdeps/m68k/dl-machine.h: Include sysdep.h. (elf_machine_load_address): Use PCREL_OP. (_dl_start_user): Likewise. * sysdeps/m68k/dl-trampoline.S (_dl_runtime_resolve): Avoid jmp (%dN) on Coldfire; push the target address and use rts instead. (_dl_runtime_profile): Likewise. Round up the frame size to longword rather than word alignment. Avoid dbra on Coldfire. Avoid using jsr (%d0) on Coldfire; push the return address and target address and use rts instead. Use fmovem.l rather than fmovem.x on Coldfire. Add missing initialization of lrv_a0 and restore a0 from it after calling _dl_call_pltexit. Adjust the stack offsets of later data accordingly, fixing a previously incorrect offset for the inregs parameter. * sysdeps/m68k/fpu/fegetenv.c (__fegetenv): Save the control registers individually on Coldfire targets. * sysdeps/m68k/fpu/feholdexcpt.c (feholdexcept): Likewise. Add missing libm_hidden_def. * sysdeps/m68k/fpu/fesetenv.c (__fesetenv): Save and restore the control registers individually on Coldfire targets. * sysdeps/m68k/fpu/fesetround.c (fesetround): Add missing libm_hidden_def. * sysdeps/m68k/fpu_control.h: Add the Coldfire bit assignments to the main comment. (_FPU_DOUBLE): Define to 0 for Coldfire. (_FPU_EXTENDED): Don't define for Coldfire. (_FPU_RESERVED): Include bit 15 for Coldfire. * sysdeps/m68k/Implies: Remove ieee754/ldbl-96. * sysdeps/m68k/m680x0/Implies: Add it to this new file instead. * sysdeps/m68k/ldsodefs.h: New file. * sysdeps/m68k/__longjmp.c (__longjmp): Restore the floating-point registers when using a Coldfire FPU. * sysdeps/m68k/Makefile (long-double-fcts): Delete. * sysdeps/m68k/m680x0/Makefile: Add it to this new file instead. * sysdeps/m68k/memchr.S (__memchr): Add Coldfire code. Avoid unnecessary moves. * sysdeps/m68k/preconfigure (m680?0): Add "m680x0" to $machine. (m68k): Use the compiler to decide whether $machine should be set to m68k/coldfire or m68k/m680x0/m68020. * sysdeps/m68k/rawmemchr.S (__rawmemchr): Add Coldfire code. Avoid unnecessary moves. * sysdeps/m68k/setjmp.c (__sigsetjmp): Save the floating-point registers when using a Coldfire FPU. Use libc_hidden_def rather than hidden_def. * sysdeps/m68k/strchrnul.S (__strchrnul): Add Coldfire code. Avoid unnecessary moves. * sysdeps/m68k/strchr.S (strchr): Likewise. * sysdeps/m68k/sysdep.h (PCREL_OP): Define. * sysdeps/m68k/tst-audit.h: New file. * sysdeps/m68k/wcpcpy.c: Likewise. * sysdeps/m68k/wcpcpy_chk.c: Likewise. * sysdeps/unix/sysv/linux/m68k/configure.in: New file. * sysdeps/unix/sysv/linux/m68k/configure: Likewise. * sysdeps/unix/sysv/linux/m68k/clone.S (__clone): Add Coldfire code. * sysdeps/unix/sysv/linux/m68k/register-dump.h (real_catch_segfault): Do not define on Coldfire. (catch_segfault): Likewise. (register_dump): Use the Coldfire-specific sigcontext fields to display call-saved data and address registers (rather than the data stored in sc_fpstate by real_catch_segfault). Display 8-byte floating-point registers on Coldfire. * sysdeps/unix/sysv/linux/m68k/socket.S (__socket): Pass a temporary register to SINGLE_THREAD_P. * sysdeps/unix/sysv/linux/m68k/sys/reg.h (PT_FP0): Redefine for Coldfire. (PT_FP1, PT_FP2, PT_FP3, PT_FP4, PT_FP5, PT_FP6, PT_FP7): Likewise. * sysdeps/unix/sysv/linux/m68k/sys/ucontext.h (fpregset): Sync field order with linux. Make f_fpregs an 8*2 array on Coldfire. (ucontext): Sync field order with linux. * sysdeps/unix/sysv/linux/m68k/sysdep.h: Guard against multiple inclusion. (SYSCALL_ERROR_HANDLER): Use PCREL_OP. * sysdeps/unix/sysv/linux/m68k/syscalls.list (oldgetrlimit): Delete. (oldsetrlimit): Likewise. * sysdeps/unix/sysv/linux/m68k/m680x0/syscalls.list: New file. List oldgetrlimit and oldsetrlimit here instead. * sysdeps/unix/sysv/linux/m68k/bits/sigcontext.h: New file. * sysdeps/unix/sysv/linux/m68k/bits/siginfo.h: Likewise. * sysdeps/m68k/coldfire/bits/atomic.h: Likewise. * sysdeps/m68k/coldfire/fpu/e_sqrt.c: Likewise. * sysdeps/m68k/coldfire/fpu/e_sqrtf.c: Likewise. * sysdeps/m68k/coldfire/fpu/fraiseexcpt.c: Likewise. * sysdeps/m68k/coldfire/fpu/libm-test-ulps: Likewise. * sysdeps/m68k/coldfire/fpu/s_fabs.c: Likewise. * sysdeps/m68k/coldfire/fpu/s_fabsf.c: Likewise. * sysdeps/m68k/coldfire/fpu/s_lrint.c: Likewise. * sysdeps/m68k/coldfire/fpu/s_lrintf.c: Likewise. * sysdeps/m68k/coldfire/fpu/s_rint.c: Likewise. * sysdeps/m68k/coldfire/fpu/s_rintf.c: Likewise. * sysdeps/m68k/coldfire/shlib-versions: Likewise. --- ChangeLog.m68k | 301 +++++++ sysdeps/m68k/Implies | 1 - sysdeps/m68k/Makefile | 3 - sysdeps/m68k/__longjmp.c | 3 + sysdeps/m68k/asm-syntax.h | 5 + sysdeps/m68k/bits/byteswap.h | 2 +- sysdeps/m68k/bits/setjmp.h | 2 + sysdeps/m68k/coldfire/bits/atomic.h | 69 ++ sysdeps/m68k/coldfire/fpu/e_sqrt.c | 24 + sysdeps/m68k/coldfire/fpu/e_sqrtf.c | 25 + sysdeps/m68k/coldfire/fpu/fraiseexcpt.c | 67 ++ sysdeps/m68k/coldfire/fpu/libm-test-ulps | 820 ++++++++++++++++++ sysdeps/m68k/coldfire/fpu/s_fabs.c | 29 + sysdeps/m68k/coldfire/fpu/s_fabsf.c | 25 + sysdeps/m68k/coldfire/fpu/s_lrint.c | 30 + sysdeps/m68k/coldfire/fpu/s_lrintf.c | 26 + sysdeps/m68k/coldfire/fpu/s_rint.c | 29 + sysdeps/m68k/coldfire/fpu/s_rintf.c | 26 + sysdeps/m68k/coldfire/shlib-versions | 1 + sysdeps/m68k/dl-machine.h | 9 +- sysdeps/m68k/dl-trampoline.S | 54 +- sysdeps/m68k/fpu/fegetenv.c | 6 + sysdeps/m68k/fpu/feholdexcpt.c | 7 + sysdeps/m68k/fpu/fesetenv.c | 15 + sysdeps/m68k/fpu/fesetround.c | 1 + sysdeps/m68k/fpu_control.h | 14 +- sysdeps/m68k/ldsodefs.h | 43 + sysdeps/m68k/m680x0/Implies | 1 + sysdeps/m68k/m680x0/Makefile | 2 + sysdeps/m68k/{ => m680x0}/add_n.S | 0 sysdeps/m68k/{ => m680x0}/bits/huge_vall.h | 0 sysdeps/m68k/{ => m680x0}/bits/mathdef.h | 0 sysdeps/m68k/{ => m680x0}/fpu/Makefile | 0 .../m68k/{ => m680x0}/fpu/bits/mathinline.h | 0 sysdeps/m68k/{ => m680x0}/fpu/branred.c | 0 sysdeps/m68k/{ => m680x0}/fpu/doasin.c | 0 sysdeps/m68k/{ => m680x0}/fpu/dosincos.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_acos.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_acosf.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_acosl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_asin.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_asinf.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_asinl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_atan2.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_atan2f.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_atan2l.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_atanh.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_atanhf.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_atanhl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_cosh.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_coshf.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_coshl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_exp.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_exp10.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_exp10f.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_exp10l.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_exp2.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_exp2f.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_exp2l.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_expf.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_expl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_fmod.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_fmodf.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_fmodl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_log.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_log10.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_log10f.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_log10l.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_log2.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_log2f.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_log2l.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_logf.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_logl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_pow.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_powf.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_powl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_rem_pio2.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_rem_pio2f.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_rem_pio2l.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_remainder.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_remainderf.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_remainderl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_scalb.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_scalbf.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_scalbl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_sinh.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_sinhf.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_sinhl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_sqrt.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_sqrtf.c | 0 sysdeps/m68k/{ => m680x0}/fpu/e_sqrtl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/fraiseexcpt.c | 0 sysdeps/m68k/{ => m680x0}/fpu/halfulp.c | 0 sysdeps/m68k/{ => m680x0}/fpu/k_cos.c | 0 sysdeps/m68k/{ => m680x0}/fpu/k_cosf.c | 0 sysdeps/m68k/{ => m680x0}/fpu/k_cosl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/k_rem_pio2.c | 0 sysdeps/m68k/{ => m680x0}/fpu/k_rem_pio2f.c | 0 sysdeps/m68k/{ => m680x0}/fpu/k_rem_pio2l.c | 0 sysdeps/m68k/{ => m680x0}/fpu/k_sin.c | 0 sysdeps/m68k/{ => m680x0}/fpu/k_sinf.c | 0 sysdeps/m68k/{ => m680x0}/fpu/k_sinl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/k_tan.c | 0 sysdeps/m68k/{ => m680x0}/fpu/k_tanf.c | 0 sysdeps/m68k/{ => m680x0}/fpu/k_tanl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/libm-test-ulps | 0 sysdeps/m68k/{ => m680x0}/fpu/mathimpl.h | 0 sysdeps/m68k/{ => m680x0}/fpu/mpa.c | 0 sysdeps/m68k/{ => m680x0}/fpu/mpatan.c | 0 sysdeps/m68k/{ => m680x0}/fpu/mpatan2.c | 0 sysdeps/m68k/{ => m680x0}/fpu/mpexp.c | 0 sysdeps/m68k/{ => m680x0}/fpu/mplog.c | 0 sysdeps/m68k/{ => m680x0}/fpu/mpsqrt.c | 0 sysdeps/m68k/{ => m680x0}/fpu/mptan.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_atan.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_atanf.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_atanl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_ccos.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_ccosf.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_ccosh.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_ccoshf.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_ccoshl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_ccosl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_ceil.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_ceilf.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_ceill.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_cexp.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_cexpf.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_cexpl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_cos.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_cosf.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_cosl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_csin.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_csinf.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_csinh.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_csinhf.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_csinhl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_csinl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_expm1.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_expm1f.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_expm1l.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_fabs.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_fabsf.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_fabsl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_finite.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_finitef.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_finitel.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_floor.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_floorf.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_floorl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_fpclassifyl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_frexp.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_frexpf.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_frexpl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_ilogb.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_ilogbf.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_ilogbl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_isinf.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_isinff.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_isinfl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_isnan.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_isnanf.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_isnanl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_llrint.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_llrintf.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_llrintl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_log1p.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_log1pf.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_log1pl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_lrint.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_lrintf.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_lrintl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_modf.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_modff.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_modfl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_nearbyint.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_nearbyintf.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_nearbyintl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_nextafterl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_remquo.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_remquof.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_remquol.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_rint.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_rintf.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_rintl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_scalbln.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_scalblnf.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_scalblnl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_scalbn.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_scalbnf.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_scalbnl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_significand.c | 0 .../m68k/{ => m680x0}/fpu/s_significandf.c | 0 .../m68k/{ => m680x0}/fpu/s_significandl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_sin.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_sincos.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_sincosf.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_sincosl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_sinf.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_sinl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_tan.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_tanf.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_tanh.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_tanhf.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_tanhl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_tanl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_trunc.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_truncf.c | 0 sysdeps/m68k/{ => m680x0}/fpu/s_truncl.c | 0 sysdeps/m68k/{ => m680x0}/fpu/sincos32.c | 0 sysdeps/m68k/{ => m680x0}/fpu/slowexp.c | 0 sysdeps/m68k/{ => m680x0}/fpu/slowpow.c | 0 .../m68k/{ => m680x0}/fpu/switch/68881-sw.h | 0 sysdeps/m68k/{ => m680x0}/fpu/switch/Makefile | 0 .../{ => m680x0}/fpu/switch/bits/mathinline.h | 0 sysdeps/m68k/{ => m680x0}/fpu/switch/switch.c | 0 sysdeps/m68k/{ => m680x0}/fpu/t_exp.c | 0 sysdeps/m68k/{ => m680x0}/lshift.S | 0 sysdeps/m68k/{ => m680x0}/m68020/Makefile | 0 sysdeps/m68k/{ => m680x0}/m68020/addmul_1.S | 0 .../m68k/{ => m680x0}/m68020/bits/atomic.h | 0 .../m68k/{ => m680x0}/m68020/bits/string.h | 0 sysdeps/m68k/{ => m680x0}/m68020/mul_1.S | 0 sysdeps/m68k/{ => m680x0}/m68020/submul_1.S | 0 sysdeps/m68k/{ => m680x0}/m68020/wordcopy.S | 0 sysdeps/m68k/{ => m680x0}/printf_fphex.c | 0 sysdeps/m68k/{ => m680x0}/rshift.S | 0 sysdeps/m68k/{ => m680x0}/s_isinfl.c | 0 sysdeps/m68k/{ => m680x0}/s_isnanl.c | 0 sysdeps/m68k/{ => m680x0}/strtold_l.c | 0 sysdeps/m68k/{ => m680x0}/sub_n.S | 0 sysdeps/m68k/memchr.S | 54 +- sysdeps/m68k/preconfigure | 15 +- sysdeps/m68k/rawmemchr.S | 18 +- sysdeps/m68k/setjmp.c | 5 +- sysdeps/m68k/strchr.S | 36 +- sysdeps/m68k/strchrnul.S | 36 +- sysdeps/m68k/sysdep.h | 22 + sysdeps/m68k/tst-audit.h | 25 + sysdeps/m68k/wcpcpy.c | 37 + sysdeps/m68k/wcpcpy_chk.c | 36 + .../unix/sysv/linux/m68k/bits/sigcontext.h | 62 ++ sysdeps/unix/sysv/linux/m68k/bits/siginfo.h | 316 +++++++ sysdeps/unix/sysv/linux/m68k/clone.S | 12 +- sysdeps/unix/sysv/linux/m68k/configure | 6 + sysdeps/unix/sysv/linux/m68k/configure.in | 7 + .../unix/sysv/linux/m68k/m680x0/syscalls.list | 4 + sysdeps/unix/sysv/linux/m68k/register-dump.h | 76 +- sysdeps/unix/sysv/linux/m68k/socket.S | 2 +- sysdeps/unix/sysv/linux/m68k/sys/reg.h | 27 +- sysdeps/unix/sysv/linux/m68k/sys/ucontext.h | 12 +- sysdeps/unix/sysv/linux/m68k/syscalls.list | 2 - sysdeps/unix/sysv/linux/m68k/sysdep.h | 6 +- 253 files changed, 2353 insertions(+), 103 deletions(-) create mode 100644 sysdeps/m68k/coldfire/bits/atomic.h create mode 100644 sysdeps/m68k/coldfire/fpu/e_sqrt.c create mode 100644 sysdeps/m68k/coldfire/fpu/e_sqrtf.c create mode 100644 sysdeps/m68k/coldfire/fpu/fraiseexcpt.c create mode 100644 sysdeps/m68k/coldfire/fpu/libm-test-ulps create mode 100644 sysdeps/m68k/coldfire/fpu/s_fabs.c create mode 100644 sysdeps/m68k/coldfire/fpu/s_fabsf.c create mode 100644 sysdeps/m68k/coldfire/fpu/s_lrint.c create mode 100644 sysdeps/m68k/coldfire/fpu/s_lrintf.c create mode 100644 sysdeps/m68k/coldfire/fpu/s_rint.c create mode 100644 sysdeps/m68k/coldfire/fpu/s_rintf.c create mode 100644 sysdeps/m68k/coldfire/shlib-versions create mode 100644 sysdeps/m68k/ldsodefs.h create mode 100644 sysdeps/m68k/m680x0/Implies create mode 100644 sysdeps/m68k/m680x0/Makefile rename sysdeps/m68k/{ => m680x0}/add_n.S (100%) rename sysdeps/m68k/{ => m680x0}/bits/huge_vall.h (100%) rename sysdeps/m68k/{ => m680x0}/bits/mathdef.h (100%) rename sysdeps/m68k/{ => m680x0}/fpu/Makefile (100%) rename sysdeps/m68k/{ => m680x0}/fpu/bits/mathinline.h (100%) rename sysdeps/m68k/{ => m680x0}/fpu/branred.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/doasin.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/dosincos.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_acos.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_acosf.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_acosl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_asin.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_asinf.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_asinl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_atan2.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_atan2f.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_atan2l.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_atanh.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_atanhf.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_atanhl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_cosh.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_coshf.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_coshl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_exp.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_exp10.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_exp10f.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_exp10l.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_exp2.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_exp2f.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_exp2l.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_expf.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_expl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_fmod.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_fmodf.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_fmodl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_log.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_log10.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_log10f.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_log10l.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_log2.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_log2f.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_log2l.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_logf.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_logl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_pow.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_powf.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_powl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_rem_pio2.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_rem_pio2f.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_rem_pio2l.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_remainder.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_remainderf.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_remainderl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_scalb.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_scalbf.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_scalbl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_sinh.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_sinhf.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_sinhl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_sqrt.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_sqrtf.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/e_sqrtl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/fraiseexcpt.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/halfulp.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/k_cos.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/k_cosf.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/k_cosl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/k_rem_pio2.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/k_rem_pio2f.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/k_rem_pio2l.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/k_sin.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/k_sinf.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/k_sinl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/k_tan.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/k_tanf.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/k_tanl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/libm-test-ulps (100%) rename sysdeps/m68k/{ => m680x0}/fpu/mathimpl.h (100%) rename sysdeps/m68k/{ => m680x0}/fpu/mpa.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/mpatan.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/mpatan2.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/mpexp.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/mplog.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/mpsqrt.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/mptan.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_atan.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_atanf.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_atanl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_ccos.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_ccosf.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_ccosh.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_ccoshf.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_ccoshl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_ccosl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_ceil.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_ceilf.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_ceill.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_cexp.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_cexpf.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_cexpl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_cos.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_cosf.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_cosl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_csin.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_csinf.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_csinh.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_csinhf.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_csinhl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_csinl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_expm1.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_expm1f.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_expm1l.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_fabs.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_fabsf.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_fabsl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_finite.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_finitef.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_finitel.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_floor.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_floorf.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_floorl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_fpclassifyl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_frexp.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_frexpf.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_frexpl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_ilogb.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_ilogbf.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_ilogbl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_isinf.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_isinff.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_isinfl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_isnan.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_isnanf.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_isnanl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_llrint.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_llrintf.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_llrintl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_log1p.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_log1pf.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_log1pl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_lrint.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_lrintf.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_lrintl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_modf.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_modff.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_modfl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_nearbyint.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_nearbyintf.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_nearbyintl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_nextafterl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_remquo.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_remquof.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_remquol.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_rint.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_rintf.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_rintl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_scalbln.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_scalblnf.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_scalblnl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_scalbn.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_scalbnf.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_scalbnl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_significand.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_significandf.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_significandl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_sin.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_sincos.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_sincosf.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_sincosl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_sinf.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_sinl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_tan.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_tanf.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_tanh.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_tanhf.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_tanhl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_tanl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_trunc.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_truncf.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/s_truncl.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/sincos32.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/slowexp.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/slowpow.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/switch/68881-sw.h (100%) rename sysdeps/m68k/{ => m680x0}/fpu/switch/Makefile (100%) rename sysdeps/m68k/{ => m680x0}/fpu/switch/bits/mathinline.h (100%) rename sysdeps/m68k/{ => m680x0}/fpu/switch/switch.c (100%) rename sysdeps/m68k/{ => m680x0}/fpu/t_exp.c (100%) rename sysdeps/m68k/{ => m680x0}/lshift.S (100%) rename sysdeps/m68k/{ => m680x0}/m68020/Makefile (100%) rename sysdeps/m68k/{ => m680x0}/m68020/addmul_1.S (100%) rename sysdeps/m68k/{ => m680x0}/m68020/bits/atomic.h (100%) rename sysdeps/m68k/{ => m680x0}/m68020/bits/string.h (100%) rename sysdeps/m68k/{ => m680x0}/m68020/mul_1.S (100%) rename sysdeps/m68k/{ => m680x0}/m68020/submul_1.S (100%) rename sysdeps/m68k/{ => m680x0}/m68020/wordcopy.S (100%) rename sysdeps/m68k/{ => m680x0}/printf_fphex.c (100%) rename sysdeps/m68k/{ => m680x0}/rshift.S (100%) rename sysdeps/m68k/{ => m680x0}/s_isinfl.c (100%) rename sysdeps/m68k/{ => m680x0}/s_isnanl.c (100%) rename sysdeps/m68k/{ => m680x0}/strtold_l.c (100%) rename sysdeps/m68k/{ => m680x0}/sub_n.S (100%) create mode 100644 sysdeps/m68k/tst-audit.h create mode 100644 sysdeps/m68k/wcpcpy.c create mode 100644 sysdeps/m68k/wcpcpy_chk.c create mode 100644 sysdeps/unix/sysv/linux/m68k/bits/sigcontext.h create mode 100644 sysdeps/unix/sysv/linux/m68k/bits/siginfo.h create mode 100644 sysdeps/unix/sysv/linux/m68k/configure create mode 100644 sysdeps/unix/sysv/linux/m68k/configure.in create mode 100644 sysdeps/unix/sysv/linux/m68k/m680x0/syscalls.list diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 328f858c8e..b12f7f42ab 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,304 @@ +2006-10-03 Richard Sandiford + + * sysdeps/m68k/bits/mathdef.h: Moved from sysdeps/m68k to + sysdeps/m68k/m680x0. + * sysdeps/m68k/m68020/submul_1.S: Likewise. + * sysdeps/m68k/m68020/Makefile: Likewise. + * sysdeps/m68k/m68020/mul_1.S: Likewise. + * sysdeps/m68k/m68020/wordcopy.S: Likewise. + * sysdeps/m68k/m68020/addmul_1.S: Likewise. + * sysdeps/m68k/m68020/bits/string.h: Likewise. + * sysdeps/m68k/m68020/bits/atomic.h: Likewise. + * sysdeps/m68k/sub_n.S: Likewise. + * sysdeps/m68k/add_n.S: Likewise. + * sysdeps/m68k/s_isnanl.c: Likewise. + * sysdeps/m68k/fpu/s_log1p.c: Likewise. + * sysdeps/m68k/fpu/e_asinf.c: Likewise. + * sysdeps/m68k/fpu/s_cosl.c: Likewise. + * sysdeps/m68k/fpu/s_isinff.c: Likewise. + * sysdeps/m68k/fpu/k_rem_pio2.c: Likewise. + * sysdeps/m68k/fpu/s_ccos.c: Likewise. + * sysdeps/m68k/fpu/s_expm1.c: Likewise. + * sysdeps/m68k/fpu/slowexp.c: Likewise. + * sysdeps/m68k/fpu/k_rem_pio2l.c: Likewise. + * sysdeps/m68k/fpu/s_ccoshf.c: Likewise. + * sysdeps/m68k/fpu/s_ilogbl.c: Likewise. + * sysdeps/m68k/fpu/Makefile: Likewise. + * sysdeps/m68k/fpu/s_expm1f.c: Likewise. + * sysdeps/m68k/fpu/s_significandf.c: Likewise. + * sysdeps/m68k/fpu/e_pow.c: Likewise. + * sysdeps/m68k/fpu/s_csinh.c: Likewise. + * sysdeps/m68k/fpu/e_exp.c: Likewise. + * sysdeps/m68k/fpu/s_remquof.c: Likewise. + * sysdeps/m68k/fpu/s_ilogbf.c: Likewise. + * sysdeps/m68k/fpu/s_truncl.c: Likewise. + * sysdeps/m68k/fpu/s_frexpf.c: Likewise. + * sysdeps/m68k/fpu/s_cos.c: Likewise. + * sysdeps/m68k/fpu/fraiseexcpt.c: Likewise. + * sysdeps/m68k/fpu/branred.c: Likewise. + * sysdeps/m68k/fpu/s_frexpl.c: Likewise. + * sysdeps/m68k/fpu/s_atan.c: Likewise. + * sysdeps/m68k/fpu/e_rem_pio2f.c: Likewise. + * sysdeps/m68k/fpu/e_scalbl.c: Likewise. + * sysdeps/m68k/fpu/e_exp2.c: Likewise. + * sysdeps/m68k/fpu/s_cexpf.c: Likewise. + * sysdeps/m68k/fpu/mplog.c: Likewise. + * sysdeps/m68k/fpu/s_rintf.c: Likewise. + * sysdeps/m68k/fpu/s_tanh.c: Likewise. + * sysdeps/m68k/fpu/e_scalbf.c: Likewise. + * sysdeps/m68k/fpu/s_csinhl.c: Likewise. + * sysdeps/m68k/fpu/s_floorl.c: Likewise. + * sysdeps/m68k/fpu/k_tanf.c: Likewise. + * sysdeps/m68k/fpu/k_tanl.c: Likewise. + * sysdeps/m68k/fpu/e_fmodf.c: Likewise. + * sysdeps/m68k/fpu/e_atanhf.c: Likewise. + * sysdeps/m68k/fpu/s_isnanf.c: Likewise. + * sysdeps/m68k/fpu/s_fpclassifyl.c: Likewise. + * sysdeps/m68k/fpu/s_modf.c: Likewise. + * sysdeps/m68k/fpu/e_log2.c: Likewise. + * sysdeps/m68k/fpu/e_acosf.c: Likewise. + * sysdeps/m68k/fpu/s_log1pl.c: Likewise. + * sysdeps/m68k/fpu/e_log2f.c: Likewise. + * sysdeps/m68k/fpu/mpa.c: Likewise. + * sysdeps/m68k/fpu/t_exp.c: Likewise. + * sysdeps/m68k/fpu/e_acos.c: Likewise. + * sysdeps/m68k/fpu/s_expm1l.c: Likewise. + * sysdeps/m68k/fpu/s_ccoshl.c: Likewise. + * sysdeps/m68k/fpu/s_sinf.c: Likewise. + * sysdeps/m68k/fpu/k_tan.c: Likewise. + * sysdeps/m68k/fpu/k_cosl.c: Likewise. + * sysdeps/m68k/fpu/e_remainder.c: Likewise. + * sysdeps/m68k/fpu/s_trunc.c: Likewise. + * sysdeps/m68k/fpu/s_sincos.c: Likewise. + * sysdeps/m68k/fpu/s_scalbnl.c: Likewise. + * sysdeps/m68k/fpu/s_finitef.c: Likewise. + * sysdeps/m68k/fpu/s_tanhl.c: Likewise. + * sysdeps/m68k/fpu/s_lrintl.c: Likewise. + * sysdeps/m68k/fpu/slowpow.c: Likewise. + * sysdeps/m68k/fpu/mpexp.c: Likewise. + * sysdeps/m68k/fpu/s_isnanl.c: Likewise. + * sysdeps/m68k/fpu/e_expf.c: Likewise. + * sysdeps/m68k/fpu/s_significand.c: Likewise. + * sysdeps/m68k/fpu/e_sinhf.c: Likewise. + * sysdeps/m68k/fpu/s_tanl.c: Likewise. + * sysdeps/m68k/fpu/s_tanhf.c: Likewise. + * sysdeps/m68k/fpu/s_cexp.c: Likewise. + * sysdeps/m68k/fpu/e_sqrtf.c: Likewise. + * sysdeps/m68k/fpu/s_isinf.c: Likewise. + * sysdeps/m68k/fpu/s_nearbyint.c: Likewise. + * sysdeps/m68k/fpu/e_fmod.c: Likewise. + * sysdeps/m68k/fpu/sincos32.c: Likewise. + * sysdeps/m68k/fpu/e_sqrtl.c: Likewise. + * sysdeps/m68k/fpu/s_sincosl.c: Likewise. + * sysdeps/m68k/fpu/e_atan2f.c: Likewise. + * sysdeps/m68k/fpu/s_nearbyintf.c: Likewise. + * sysdeps/m68k/fpu/e_fmodl.c: Likewise. + * sysdeps/m68k/fpu/e_coshf.c: Likewise. + * sysdeps/m68k/fpu/s_csinf.c: Likewise. + * sysdeps/m68k/fpu/s_ccosl.c: Likewise. + * sysdeps/m68k/fpu/e_sqrt.c: Likewise. + * sysdeps/m68k/fpu/s_sin.c: Likewise. + * sysdeps/m68k/fpu/e_asin.c: Likewise. + * sysdeps/m68k/fpu/mptan.c: Likewise. + * sysdeps/m68k/fpu/e_exp10f.c: Likewise. + * sysdeps/m68k/fpu/e_scalb.c: Likewise. + * sysdeps/m68k/fpu/s_finitel.c: Likewise. + * sysdeps/m68k/fpu/e_log10.c: Likewise. + * sysdeps/m68k/fpu/k_sinl.c: Likewise. + * sysdeps/m68k/fpu/e_remainderl.c: Likewise. + * sysdeps/m68k/fpu/s_remquol.c: Likewise. + * sysdeps/m68k/fpu/s_scalblnf.c: Likewise. + * sysdeps/m68k/fpu/s_llrint.c: Likewise. + * sysdeps/m68k/fpu/e_rem_pio2.c: Likewise. + * sysdeps/m68k/fpu/e_asinl.c: Likewise. + * sysdeps/m68k/fpu/e_logl.c: Likewise. + * sysdeps/m68k/fpu/s_cosf.c: Likewise. + * sysdeps/m68k/fpu/s_rint.c: Likewise. + * sysdeps/m68k/fpu/s_ceill.c: Likewise. + * sysdeps/m68k/fpu/s_modfl.c: Likewise. + * sysdeps/m68k/fpu/s_csinl.c: Likewise. + * sysdeps/m68k/fpu/s_tan.c: Likewise. + * sysdeps/m68k/fpu/s_sincosf.c: Likewise. + * sysdeps/m68k/fpu/dosincos.c: Likewise. + * sysdeps/m68k/fpu/e_powl.c: Likewise. + * sysdeps/m68k/fpu/s_ilogb.c: Likewise. + * sysdeps/m68k/fpu/s_llrintl.c: Likewise. + * sysdeps/m68k/fpu/e_expl.c: Likewise. + * sysdeps/m68k/fpu/libm-test-ulps: Likewise. + * sysdeps/m68k/fpu/s_tanf.c: Likewise. + * sysdeps/m68k/fpu/mpsqrt.c: Likewise. + * sysdeps/m68k/fpu/s_sinl.c: Likewise. + * sysdeps/m68k/fpu/mathimpl.h: Likewise. + * sysdeps/m68k/fpu/e_acosl.c: Likewise. + * sysdeps/m68k/fpu/e_cosh.c: Likewise. + * sysdeps/m68k/fpu/s_cexpl.c: Likewise. + * sysdeps/m68k/fpu/s_fabsl.c: Likewise. + * sysdeps/m68k/fpu/halfulp.c: Likewise. + * sysdeps/m68k/fpu/s_modff.c: Likewise. + * sysdeps/m68k/fpu/s_isnan.c: Likewise. + * sysdeps/m68k/fpu/e_atan2.c: Likewise. + * sysdeps/m68k/fpu/s_fabs.c: Likewise. + * sysdeps/m68k/fpu/e_log10f.c: Likewise. + * sysdeps/m68k/fpu/k_cosf.c: Likewise. + * sysdeps/m68k/fpu/e_sinh.c: Likewise. + * sysdeps/m68k/fpu/s_truncf.c: Likewise. + * sysdeps/m68k/fpu/s_ceil.c: Likewise. + * sysdeps/m68k/fpu/s_log1pf.c: Likewise. + * sysdeps/m68k/fpu/e_logf.c: Likewise. + * sysdeps/m68k/fpu/mpatan.c: Likewise. + * sysdeps/m68k/fpu/s_csin.c: Likewise. + * sysdeps/m68k/fpu/e_exp2l.c: Likewise. + * sysdeps/m68k/fpu/e_sinhl.c: Likewise. + * sysdeps/m68k/fpu/e_atan2l.c: Likewise. + * sysdeps/m68k/fpu/s_scalbn.c: Likewise. + * sysdeps/m68k/fpu/s_floorf.c: Likewise. + * sysdeps/m68k/fpu/e_log2l.c: Likewise. + * sysdeps/m68k/fpu/s_atanl.c: Likewise. + * sysdeps/m68k/fpu/s_llrintf.c: Likewise. + * sysdeps/m68k/fpu/k_sinf.c: Likewise. + * sysdeps/m68k/fpu/s_csinhf.c: Likewise. + * sysdeps/m68k/fpu/s_frexp.c: Likewise. + * sysdeps/m68k/fpu/s_atanf.c: Likewise. + * sysdeps/m68k/fpu/s_floor.c: Likewise. + * sysdeps/m68k/fpu/e_exp10l.c: Likewise. + * sysdeps/m68k/fpu/doasin.c: Likewise. + * sysdeps/m68k/fpu/s_rintl.c: Likewise. + * sysdeps/m68k/fpu/e_atanhl.c: Likewise. + * sysdeps/m68k/fpu/e_remainderf.c: Likewise. + * sysdeps/m68k/fpu/s_scalbln.c: Likewise. + * sysdeps/m68k/fpu/e_rem_pio2l.c: Likewise. + * sysdeps/m68k/fpu/e_exp10.c: Likewise. + * sysdeps/m68k/fpu/s_lrintf.c: Likewise. + * sysdeps/m68k/fpu/k_cos.c: Likewise. + * sysdeps/m68k/fpu/s_lrint.c: Likewise. + * sysdeps/m68k/fpu/s_ccosf.c: Likewise. + * sysdeps/m68k/fpu/s_scalblnl.c: Likewise. + * sysdeps/m68k/fpu/switch/Makefile: Likewise. + * sysdeps/m68k/fpu/switch/switch.c: Likewise. + * sysdeps/m68k/fpu/switch/68881-sw.h: Likewise. + * sysdeps/m68k/fpu/switch/bits/mathinline.h: Likewise. + * sysdeps/m68k/fpu/e_log.c: Likewise. + * sysdeps/m68k/fpu/s_nextafterl.c: Likewise. + * sysdeps/m68k/fpu/s_nearbyintl.c: Likewise. + * sysdeps/m68k/fpu/mpatan2.c: Likewise. + * sysdeps/m68k/fpu/k_sin.c: Likewise. + * sysdeps/m68k/fpu/e_atanh.c: Likewise. + * sysdeps/m68k/fpu/s_remquo.c: Likewise. + * sysdeps/m68k/fpu/e_log10l.c: Likewise. + * sysdeps/m68k/fpu/s_ceilf.c: Likewise. + * sysdeps/m68k/fpu/s_fabsf.c: Likewise. + * sysdeps/m68k/fpu/s_significandl.c: Likewise. + * sysdeps/m68k/fpu/s_ccosh.c: Likewise. + * sysdeps/m68k/fpu/e_coshl.c: Likewise. + * sysdeps/m68k/fpu/s_scalbnf.c: Likewise. + * sysdeps/m68k/fpu/s_finite.c: Likewise. + * sysdeps/m68k/fpu/e_exp2f.c: Likewise. + * sysdeps/m68k/fpu/k_rem_pio2f.c: Likewise. + * sysdeps/m68k/fpu/s_isinfl.c: Likewise. + * sysdeps/m68k/fpu/bits/mathinline.h: Likewise. + * sysdeps/m68k/fpu/e_powf.c: Likewise. + * sysdeps/m68k/rshift.S: Likewise. + * sysdeps/m68k/lshift.S: Likewise. + * sysdeps/m68k/strtold_l.c: Likewise. + * sysdeps/m68k/printf_fphex.c: Likewise. + * sysdeps/m68k/s_isinfl.c: Likewise. + * sysdeps/m68k/bits/huge_vall.h: Likewise. + + * sysdeps/m68k/asm-syntax.h (andw, andl, subqw, tstw, tstl): New. + * sysdeps/m68k/bits/byteswap.h (__bswap32): Don't define for + Coldfire targets. + * sysdeps/m68k/bits/setjmp.h (__jmp_buf): Add a 64-byte + __fpregs field for Coldfire FPUs. + * sysdeps/m68k/dl-machine.h: Include sysdep.h. + (elf_machine_load_address): Use PCREL_OP. + (_dl_start_user): Likewise. + * sysdeps/m68k/dl-trampoline.S (_dl_runtime_resolve): Avoid jmp (%dN) + on Coldfire; push the target address and use rts instead. + (_dl_runtime_profile): Likewise. Round up the frame size to longword + rather than word alignment. Avoid dbra on Coldfire. Avoid using + jsr (%d0) on Coldfire; push the return address and target address + and use rts instead. Use fmovem.l rather than fmovem.x on Coldfire. + Add missing initialization of lrv_a0 and restore a0 from it after + calling _dl_call_pltexit. Adjust the stack offsets of later data + accordingly, fixing a previously incorrect offset for the inregs + parameter. + * sysdeps/m68k/fpu/fegetenv.c (__fegetenv): Save the control + registers individually on Coldfire targets. + * sysdeps/m68k/fpu/feholdexcpt.c (feholdexcept): Likewise. + Add missing libm_hidden_def. + * sysdeps/m68k/fpu/fesetenv.c (__fesetenv): Save and restore the + control registers individually on Coldfire targets. + * sysdeps/m68k/fpu/fesetround.c (fesetround): Add missing + libm_hidden_def. + * sysdeps/m68k/fpu_control.h: Add the Coldfire bit assignments to + the main comment. + (_FPU_DOUBLE): Define to 0 for Coldfire. + (_FPU_EXTENDED): Don't define for Coldfire. + (_FPU_RESERVED): Include bit 15 for Coldfire. + * sysdeps/m68k/Implies: Remove ieee754/ldbl-96. + * sysdeps/m68k/m680x0/Implies: Add it to this new file instead. + * sysdeps/m68k/ldsodefs.h: New file. + * sysdeps/m68k/__longjmp.c (__longjmp): Restore the floating-point + registers when using a Coldfire FPU. + * sysdeps/m68k/Makefile (long-double-fcts): Delete. + * sysdeps/m68k/m680x0/Makefile: Add it to this new file instead. + * sysdeps/m68k/memchr.S (__memchr): Add Coldfire code. Avoid + unnecessary moves. + * sysdeps/m68k/preconfigure (m680?0): Add "m680x0" to $machine. + (m68k): Use the compiler to decide whether $machine should be + set to m68k/coldfire or m68k/m680x0/m68020. + * sysdeps/m68k/rawmemchr.S (__rawmemchr): Add Coldfire code. Avoid + unnecessary moves. + * sysdeps/m68k/setjmp.c (__sigsetjmp): Save the floating-point + registers when using a Coldfire FPU. Use libc_hidden_def rather + than hidden_def. + * sysdeps/m68k/strchrnul.S (__strchrnul): Add Coldfire code. Avoid + unnecessary moves. + * sysdeps/m68k/strchr.S (strchr): Likewise. + * sysdeps/m68k/sysdep.h (PCREL_OP): Define. + * sysdeps/m68k/tst-audit.h: New file. + * sysdeps/m68k/wcpcpy.c: Likewise. + * sysdeps/m68k/wcpcpy_chk.c: Likewise. + * sysdeps/unix/sysv/linux/m68k/configure.in: New file. + * sysdeps/unix/sysv/linux/m68k/configure: Likewise. + * sysdeps/unix/sysv/linux/m68k/clone.S (__clone): Add Coldfire code. + * sysdeps/unix/sysv/linux/m68k/register-dump.h (real_catch_segfault): + Do not define on Coldfire. + (catch_segfault): Likewise. + (register_dump): Use the Coldfire-specific sigcontext fields to + display call-saved data and address registers (rather than the + data stored in sc_fpstate by real_catch_segfault). Display 8-byte + floating-point registers on Coldfire. + * sysdeps/unix/sysv/linux/m68k/socket.S (__socket): Pass a temporary + register to SINGLE_THREAD_P. + * sysdeps/unix/sysv/linux/m68k/sys/reg.h (PT_FP0): Redefine for + Coldfire. + (PT_FP1, PT_FP2, PT_FP3, PT_FP4, PT_FP5, PT_FP6, PT_FP7): Likewise. + * sysdeps/unix/sysv/linux/m68k/sys/ucontext.h (fpregset): Sync field + order with linux. Make f_fpregs an 8*2 array on Coldfire. + (ucontext): Sync field order with linux. + * sysdeps/unix/sysv/linux/m68k/sysdep.h: Guard against multiple + inclusion. + (SYSCALL_ERROR_HANDLER): Use PCREL_OP. + * sysdeps/unix/sysv/linux/m68k/syscalls.list (oldgetrlimit): Delete. + (oldsetrlimit): Likewise. + * sysdeps/unix/sysv/linux/m68k/m680x0/syscalls.list: New file. + List oldgetrlimit and oldsetrlimit here instead. + * sysdeps/unix/sysv/linux/m68k/bits/sigcontext.h: New file. + * sysdeps/unix/sysv/linux/m68k/bits/siginfo.h: Likewise. + * sysdeps/m68k/coldfire/bits/atomic.h: Likewise. + * sysdeps/m68k/coldfire/fpu/e_sqrt.c: Likewise. + * sysdeps/m68k/coldfire/fpu/e_sqrtf.c: Likewise. + * sysdeps/m68k/coldfire/fpu/fraiseexcpt.c: Likewise. + * sysdeps/m68k/coldfire/fpu/libm-test-ulps: Likewise. + * sysdeps/m68k/coldfire/fpu/s_fabs.c: Likewise. + * sysdeps/m68k/coldfire/fpu/s_fabsf.c: Likewise. + * sysdeps/m68k/coldfire/fpu/s_lrint.c: Likewise. + * sysdeps/m68k/coldfire/fpu/s_lrintf.c: Likewise. + * sysdeps/m68k/coldfire/fpu/s_rint.c: Likewise. + * sysdeps/m68k/coldfire/fpu/s_rintf.c: Likewise. + * sysdeps/m68k/coldfire/shlib-versions: Likewise. + 2006-02-28 Roland McGrath * sysdeps/m68k/preconfigure: New file. diff --git a/sysdeps/m68k/Implies b/sysdeps/m68k/Implies index 5c778d4fbc..beaba937de 100644 --- a/sysdeps/m68k/Implies +++ b/sysdeps/m68k/Implies @@ -1,5 +1,4 @@ wordsize-32 # 68k uses IEEE 754 floating point. -ieee754/ldbl-96 ieee754/dbl-64 ieee754/flt-32 diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile index fab6bd5837..ca0d500295 100644 --- a/sysdeps/m68k/Makefile +++ b/sysdeps/m68k/Makefile @@ -30,9 +30,6 @@ pic-ccflag = -fpic # Make sure setjmp.c is compiled with a frame pointer CFLAGS-setjmp.c := -fno-omit-frame-pointer -# The 68k `long double' is a distinct type we support. -long-double-fcts = yes - ifeq ($(subdir),elf) CFLAGS-rtld.c += -Wno-uninitialized -Wno-unused endif diff --git a/sysdeps/m68k/__longjmp.c b/sysdeps/m68k/__longjmp.c index 89ff5bab56..7d876a7a14 100644 --- a/sysdeps/m68k/__longjmp.c +++ b/sysdeps/m68k/__longjmp.c @@ -31,6 +31,9 @@ __longjmp (__jmp_buf env, int val) /* Restore the floating-point registers. */ asm volatile("fmovem%.x %0, %/fp0-%/fp7" : /* No outputs. */ : "g" (env[0].__fpregs[0])); +#elif defined (__mcffpu__) + asm volatile("fmovem %0, %/fp0-%/fp7" : + /* No outputs. */ : "m" (env[0].__fpregs[0])); #endif /* Put VAL in D0. */ diff --git a/sysdeps/m68k/asm-syntax.h b/sysdeps/m68k/asm-syntax.h index 8e2a4ca2ca..645e906762 100644 --- a/sysdeps/m68k/asm-syntax.h +++ b/sysdeps/m68k/asm-syntax.h @@ -93,7 +93,9 @@ #define cmpl cmp.l #define orl or.l #define clrl clr.l +#define andw and.w #define eorw eor.w +#define andl and.l #define lsrl lsr.l #define lsll lsl.l #define roxrl roxr.l @@ -103,7 +105,10 @@ #define addql addq.l #define subl sub.l #define subxl subx.l +#define subqw subq.w #define subql subq.l #define negl neg.l #define mulul mulu.l +#define tstw tst.w +#define tstl tst.l #endif diff --git a/sysdeps/m68k/bits/byteswap.h b/sysdeps/m68k/bits/byteswap.h index 549d4452ef..41b386b313 100644 --- a/sysdeps/m68k/bits/byteswap.h +++ b/sysdeps/m68k/bits/byteswap.h @@ -35,7 +35,7 @@ ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \ (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24)) -#if defined __GNUC__ && __GNUC__ >= 2 +#if defined __GNUC__ && __GNUC__ >= 2 && !defined(__mcoldfire__) # define __bswap_32(x) \ __extension__ \ ({ unsigned int __bswap_32_v; \ diff --git a/sysdeps/m68k/bits/setjmp.h b/sysdeps/m68k/bits/setjmp.h index 2d5a08227d..27ec051e5b 100644 --- a/sysdeps/m68k/bits/setjmp.h +++ b/sysdeps/m68k/bits/setjmp.h @@ -38,6 +38,8 @@ typedef struct /* There are eight floating point registers which are saved in IEEE 96-bit extended format. */ char __fpregs[8 * (96 / 8)]; +#elif defined __mcffpu__ + char __fpregs[8 * (64 / 8)]; #endif } __jmp_buf[1]; diff --git a/sysdeps/m68k/coldfire/bits/atomic.h b/sysdeps/m68k/coldfire/bits/atomic.h new file mode 100644 index 0000000000..8b5403e009 --- /dev/null +++ b/sysdeps/m68k/coldfire/bits/atomic.h @@ -0,0 +1,69 @@ +/* Copyright (C) 2003, 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 + 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_ATOMIC_H +#define _BITS_ATOMIC_H 1 + +#include + +/* Coldfire has no atomic compare-and-exchange operation, and the + kernel provides no userspace atomicity operations. Here we just + use generic non-atomic implementations instead. */ + +typedef int8_t atomic8_t; +typedef uint8_t uatomic8_t; +typedef int_fast8_t atomic_fast8_t; +typedef uint_fast8_t uatomic_fast8_t; + +typedef int16_t atomic16_t; +typedef uint16_t uatomic16_t; +typedef int_fast16_t atomic_fast16_t; +typedef uint_fast16_t uatomic_fast16_t; + +typedef int32_t atomic32_t; +typedef uint32_t uatomic32_t; +typedef int_fast32_t atomic_fast32_t; +typedef uint_fast32_t uatomic_fast32_t; + +typedef int64_t atomic64_t; +typedef uint64_t uatomic64_t; +typedef int_fast64_t atomic_fast64_t; +typedef uint_fast64_t uatomic_fast64_t; + +typedef intptr_t atomicptr_t; +typedef uintptr_t uatomicptr_t; +typedef intmax_t atomic_max_t; +typedef uintmax_t uatomic_max_t; + +/* The only basic operation needed is compare and exchange. */ +#define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \ + ({ __typeof (mem) __gmemp = (mem); \ + __typeof (*mem) __gret = *__gmemp; \ + __typeof (*mem) __gnewval = (newval); \ + \ + if (__gret == (oldval)) \ + *__gmemp = __gnewval; \ + __gret; }) + +#define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \ + ({ __typeof (mem) __gmemp = (mem); \ + __typeof (*mem) __gnewval = (newval); \ + \ + *__gmemp == (oldval) ? (*__gmemp = __gnewval, 0) : 1; }) + +#endif diff --git a/sysdeps/m68k/coldfire/fpu/e_sqrt.c b/sysdeps/m68k/coldfire/fpu/e_sqrt.c new file mode 100644 index 0000000000..a160308bf2 --- /dev/null +++ b/sysdeps/m68k/coldfire/fpu/e_sqrt.c @@ -0,0 +1,24 @@ +/* Copyright (C) 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 + 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. */ + +double +__ieee754_sqrt (double x) +{ + asm ("fdsqrt.d %1,%0" : "=f" (x) : "fm" (x)); + return x; +} diff --git a/sysdeps/m68k/coldfire/fpu/e_sqrtf.c b/sysdeps/m68k/coldfire/fpu/e_sqrtf.c new file mode 100644 index 0000000000..7cfc0dd655 --- /dev/null +++ b/sysdeps/m68k/coldfire/fpu/e_sqrtf.c @@ -0,0 +1,25 @@ +/* Copyright (C) 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 + 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. */ + +float +__ieee754_sqrtf (float x) +{ + double result; + asm ("fssqrt.s %1,%0" : "=f" (result) : "dm" (x)); + return result; +} diff --git a/sysdeps/m68k/coldfire/fpu/fraiseexcpt.c b/sysdeps/m68k/coldfire/fpu/fraiseexcpt.c new file mode 100644 index 0000000000..c62ddaa016 --- /dev/null +++ b/sysdeps/m68k/coldfire/fpu/fraiseexcpt.c @@ -0,0 +1,67 @@ +/* Raise given exceptions. + Copyright (C) 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 + 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. */ + +#include +#include +#include + +int +feraiseexcept (int excepts) +{ + /* Raise exceptions represented by EXCEPTS. But we must raise only one + signal at a time. It is important that if the overflow/underflow + exception and the divide by zero exception are given at the same + time, the overflow/underflow exception follows the divide by zero + exception. + + The Coldfire FPU allows an exception to be raised by asserting + the associated EXC bit and then executing an arbitrary arithmetic + instruction. fmove.l is classified as an arithmetic instruction + and suffices for this purpose. + + We therefore raise an exception by setting both the EXC and AEXC + bit associated with the exception (the former being 6 bits to the + left of the latter) and then loading the longword at (%sp) into an + FP register. */ + + inline void + raise_one_exception (int mask) + { + if (excepts & mask) + { + int fpsr; + double unused; + + asm volatile ("fmove%.l %/fpsr,%0" : "=d" (fpsr)); + fpsr |= (mask << 6) | mask; + asm volatile ("fmove%.l %0,%/fpsr" :: "d" (fpsr)); + asm volatile ("fmove%.l (%%sp),%0" : "=f" (unused)); + } + } + + raise_one_exception (FE_INVALID); + raise_one_exception (FE_DIVBYZERO); + raise_one_exception (FE_OVERFLOW); + raise_one_exception (FE_UNDERFLOW); + raise_one_exception (FE_INEXACT); + + /* Success. */ + return 0; +} +libm_hidden_def (feraiseexcept) diff --git a/sysdeps/m68k/coldfire/fpu/libm-test-ulps b/sysdeps/m68k/coldfire/fpu/libm-test-ulps new file mode 100644 index 0000000000..8608c0d390 --- /dev/null +++ b/sysdeps/m68k/coldfire/fpu/libm-test-ulps @@ -0,0 +1,820 @@ +# Begin of automatic generation + +# atan2 +Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025": +float: 1 +ifloat: 1 +Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025": +float: 1 +ifloat: 1 +Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772": +float: 1 +ifloat: 1 + +# atanh +Test "atanh (0.75) == 0.972955074527656652552676371721589865": +float: 1 +ifloat: 1 + +# cacosh +Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": +float: 1 +ifloat: 1 + +# casin +Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# casinh +Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": +double: 5 +float: 1 +idouble: 5 +ifloat: 1 +Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": +double: 3 +float: 6 +idouble: 3 +ifloat: 6 +Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# catan +Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# catanh +Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": +double: 4 +idouble: 4 +Test "Real part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i": +double: 1 +idouble: 1 + +# cbrt +Test "cbrt (-27.0) == -3.0": +double: 1 +idouble: 1 +Test "cbrt (0.75) == 0.908560296416069829445605878163630251": +double: 1 +idouble: 1 +Test "cbrt (0.9921875) == 0.997389022060725270579075195353955217": +double: 1 +idouble: 1 + +# ccos +Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i": +float: 1 +ifloat: 1 +Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": +float: 1 +ifloat: 1 + +# ccosh +Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": +float: 1 +ifloat: 1 +Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": +float: 1 +ifloat: 1 + +# cexp +Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": +float: 1 +ifloat: 1 +Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": +float: 1 +ifloat: 1 + +# clog +Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i": +float: 1 +ifloat: 1 + +# clog10 +Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i": +double: 1 +idouble: 1 +Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i": +float: 1 +ifloat: 1 + +# cos +Test "cos (M_PI_6l * 2.0) == 0.5": +double: 1 +idouble: 1 +Test "cos (M_PI_6l * 4.0) == -0.5": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + +# cpow +Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": +float: 1 +ifloat: 1 +Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i": +double: 1 +float: 4 +idouble: 1 +ifloat: 4 +Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i": +double: 2 +float: 3 +idouble: 2 +ifloat: 3 +Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": +double: 1 +float: 4 +idouble: 1 +ifloat: 4 +Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": +float: 2 +ifloat: 2 +Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + +# csinh +Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i": +double: 1 +idouble: 1 +Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": +float: 1 +ifloat: 1 + +# csqrt +Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": +float: 1 +ifloat: 1 +Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i": +float: 1 +ifloat: 1 + +# ctan +Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i": +double: 1 +idouble: 1 + +# ctanh +Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i": +float: 1 +ifloat: 1 +Test "Real part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i": +double: 1 +idouble: 1 + +# erf +Test "erf (1.25) == 0.922900128256458230136523481197281140": +double: 1 +idouble: 1 + +# erfc +Test "erfc (2.0) == 0.00467773498104726583793074363274707139": +double: 1 +idouble: 1 +Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8": +double: 1 +idouble: 1 + +# exp10 +Test "exp10 (-1) == 0.1": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "exp10 (0.75) == 5.62341325190349080394951039776481231": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "exp10 (3) == 1000": +double: 6 +float: 2 +idouble: 6 +ifloat: 2 + +# expm1 +Test "expm1 (0.75) == 1.11700001661267466854536981983709561": +double: 1 +idouble: 1 +Test "expm1 (1) == M_El - 1.0": +float: 1 +ifloat: 1 + +# hypot +Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 + +# j0 +Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "j0 (0.75) == 0.864242275166648623555731103820923211": +float: 1 +ifloat: 1 +Test "j0 (10.0) == -0.245935764451348335197760862485328754": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "j0 (2.0) == 0.223890779141235668051827454649948626": +float: 2 +ifloat: 2 +Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "j0 (8.0) == 0.171650807137553906090869407851972001": +float: 1 +ifloat: 1 + +# j1 +Test "j1 (10.0) == 0.0434727461688614366697487680258592883": +float: 2 +ifloat: 2 +Test "j1 (2.0) == 0.576724807756873387202448242269137087": +double: 1 +idouble: 1 +Test "j1 (8.0) == 0.234636346853914624381276651590454612": +double: 1 +idouble: 1 + +# jn +Test "jn (0, -4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (0, 0.75) == 0.864242275166648623555731103820923211": +float: 1 +ifloat: 1 +Test "jn (0, 10.0) == -0.245935764451348335197760862485328754": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "jn (0, 2.0) == 0.223890779141235668051827454649948626": +float: 2 +ifloat: 2 +Test "jn (0, 4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (0, 8.0) == 0.171650807137553906090869407851972001": +float: 1 +ifloat: 1 +Test "jn (1, 10.0) == 0.0434727461688614366697487680258592883": +float: 2 +ifloat: 2 +Test "jn (1, 2.0) == 0.576724807756873387202448242269137087": +double: 1 +idouble: 1 +Test "jn (1, 8.0) == 0.234636346853914624381276651590454612": +double: 1 +idouble: 1 +Test "jn (10, 0.125) == 0.250543369809369890173993791865771547e-18": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (10, 0.75) == 0.149621713117596814698712483621682835e-10": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (10, 10.0) == 0.207486106633358857697278723518753428": +double: 4 +float: 3 +idouble: 4 +ifloat: 3 +Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6": +float: 4 +ifloat: 4 +Test "jn (3, 0.125) == 0.406503832554912875023029337653442868e-4": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (3, 0.75) == 0.848438342327410884392755236884386804e-2": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (3, 10.0) == 0.0583793793051868123429354784103409563": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "jn (3, 2.0) == 0.128943249474402051098793332969239835": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +# lgamma +Test "lgamma (0.7) == 0.260867246531666514385732417016759578": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +# log10 +Test "log10 (0.75) == -0.124938736608299953132449886193870744": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +Test "log10 (e) == log10(e)": +float: 1 +ifloat: 1 + +# log1p +Test "log1p (-0.25) == -0.287682072451780927439219005993827432": +float: 1 +ifloat: 1 + +# sincos +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": +double: 1 +idouble: 1 +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res": +float: 1 +ifloat: 1 + +# tgamma +Test "tgamma (-0.5) == -2 sqrt (pi)": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "tgamma (0.5) == sqrt (pi)": +float: 1 +ifloat: 1 +Test "tgamma (0.7) == 1.29805533264755778568117117915281162": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# y0 +Test "y0 (1.0) == 0.0882569642156769579829267660235151628": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "y0 (1.5) == 0.382448923797758843955068554978089862": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "y0 (10.0) == 0.0556711672835993914244598774101900481": +float: 1 +ifloat: 1 +Test "y0 (8.0) == 0.223521489387566220527323400498620359": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# y1 +Test "y1 (0.125) == -5.19993611253477499595928744876579921": +double: 1 +idouble: 1 +Test "y1 (1.5) == -0.412308626973911295952829820633445323": +float: 1 +ifloat: 1 +Test "y1 (10.0) == 0.249015424206953883923283474663222803": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "y1 (2.0) == -0.107032431540937546888370772277476637": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "y1 (8.0) == -0.158060461731247494255555266187483550": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +# yn +Test "yn (0, 1.0) == 0.0882569642156769579829267660235151628": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "yn (0, 1.5) == 0.382448923797758843955068554978089862": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "yn (0, 10.0) == 0.0556711672835993914244598774101900481": +float: 1 +ifloat: 1 +Test "yn (0, 8.0) == 0.223521489387566220527323400498620359": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (1, 0.125) == -5.19993611253477499595928744876579921": +double: 1 +idouble: 1 +Test "yn (1, 1.5) == -0.412308626973911295952829820633445323": +float: 1 +ifloat: 1 +Test "yn (1, 10.0) == 0.249015424206953883923283474663222803": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "yn (1, 2.0) == -0.107032431540937546888370772277476637": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (1, 8.0) == -0.158060461731247494255555266187483550": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +Test "yn (10, 0.125) == -127057845771019398.252538486899753195": +double: 1 +idouble: 1 +Test "yn (10, 0.75) == -2133501638.90573424452445412893839236": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (10, 1.0) == -121618014.278689189288130426667971145": +double: 1 +idouble: 1 +Test "yn (10, 10.0) == -0.359814152183402722051986577343560609": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (10, 2.0) == -129184.542208039282635913145923304214": +double: 2 +idouble: 2 +Test "yn (3, 0.125) == -2612.69757350066712600220955744091741": +double: 1 +idouble: 1 +Test "yn (3, 0.75) == -12.9877176234475433186319774484809207": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (3, 10.0) == -0.251362657183837329779204747654240998": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (3, 2.0) == -1.12778377684042778608158395773179238": +double: 1 +idouble: 1 + +# Maximal error of functions: +Function: "atan2": +float: 1 +ifloat: 1 + +Function: "atanh": +float: 1 +ifloat: 1 + +Function: Imaginary part of "cacosh": +float: 1 +ifloat: 1 + +Function: Real part of "casin": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "casinh": +double: 5 +float: 1 +idouble: 5 +ifloat: 1 + +Function: Imaginary part of "casinh": +double: 3 +float: 6 +idouble: 3 +ifloat: 6 + +Function: Imaginary part of "catan": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "catanh": +double: 4 +idouble: 4 + +Function: "cbrt": +double: 1 +idouble: 1 + +Function: Real part of "ccos": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "ccos": +float: 1 +ifloat: 1 + +Function: Real part of "ccosh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "ccosh": +float: 1 +ifloat: 1 + +Function: Real part of "cexp": +float: 1 +ifloat: 1 + +Function: Imaginary part of "cexp": +float: 1 +ifloat: 1 + +Function: Real part of "clog": +float: 1 +ifloat: 1 + +Function: Real part of "clog10": +float: 1 +ifloat: 1 + +Function: Imaginary part of "clog10": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "cos": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + +Function: Real part of "cpow": +double: 2 +float: 4 +idouble: 2 +ifloat: 4 + +Function: Imaginary part of "cpow": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + +Function: Real part of "csinh": +float: 1 +ifloat: 1 + +Function: Imaginary part of "csinh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "csqrt": +float: 1 +ifloat: 1 + +Function: Imaginary part of "ctan": +double: 1 +idouble: 1 + +Function: Real part of "ctanh": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +Function: Imaginary part of "ctanh": +float: 1 +ifloat: 1 + +Function: "erf": +double: 1 +idouble: 1 + +Function: "erfc": +double: 1 +idouble: 1 + +Function: "exp10": +double: 6 +float: 2 +idouble: 6 +ifloat: 2 + +Function: "expm1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "hypot": +float: 1 +ifloat: 1 + +Function: "j0": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + +Function: "j1": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +Function: "jn": +double: 4 +float: 4 +idouble: 4 +ifloat: 4 + +Function: "lgamma": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +Function: "log10": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +Function: "log1p": +float: 1 +ifloat: 1 + +Function: "sincos": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "tan": +double: 1 +idouble: 1 + +Function: "tgamma": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "y0": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + +Function: "y1": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 + +Function: "yn": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 + +# end of automatic generation diff --git a/sysdeps/m68k/coldfire/fpu/s_fabs.c b/sysdeps/m68k/coldfire/fpu/s_fabs.c new file mode 100644 index 0000000000..45403cb172 --- /dev/null +++ b/sysdeps/m68k/coldfire/fpu/s_fabs.c @@ -0,0 +1,29 @@ +/* Copyright (C) 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 + 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. */ + +double +__fabs (double x) +{ + asm ("fdabs.d %1,%0" : "=f" (x) : "fm" (x)); + return x; +} +weak_alias (__fabs, fabs) +#ifdef NO_LONG_DOUBLE +strong_alias (__fabs, __fabsl) +weak_alias (__fabs, fabsl) +#endif diff --git a/sysdeps/m68k/coldfire/fpu/s_fabsf.c b/sysdeps/m68k/coldfire/fpu/s_fabsf.c new file mode 100644 index 0000000000..7622cc9658 --- /dev/null +++ b/sysdeps/m68k/coldfire/fpu/s_fabsf.c @@ -0,0 +1,25 @@ +/* Copyright (C) 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 + 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. */ + +float +__fabsf (float x) +{ + asm ("fsabs.s %1,%0" : "=f" (x) : "dm" (x)); + return x; +} +weak_alias (__fabsf, fabsf) diff --git a/sysdeps/m68k/coldfire/fpu/s_lrint.c b/sysdeps/m68k/coldfire/fpu/s_lrint.c new file mode 100644 index 0000000000..81fae959be --- /dev/null +++ b/sysdeps/m68k/coldfire/fpu/s_lrint.c @@ -0,0 +1,30 @@ +/* Copyright (C) 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 + 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. */ + +long int +__lrint (double x) +{ + long int result; + asm ("fmove.l %1,%0" : "=dm" (result) : "f" (x)); + return result; +} +weak_alias (__lrint, lrint) +#ifdef NO_LONG_DOUBLE +strong_alias (__lrint, __lrintl) +weak_alias (__lrint, lrintl) +#endif diff --git a/sysdeps/m68k/coldfire/fpu/s_lrintf.c b/sysdeps/m68k/coldfire/fpu/s_lrintf.c new file mode 100644 index 0000000000..87ae5e0b97 --- /dev/null +++ b/sysdeps/m68k/coldfire/fpu/s_lrintf.c @@ -0,0 +1,26 @@ +/* Copyright (C) 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 + 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. */ + +long int +__lrintf (float x) +{ + long int result; + asm ("fmove.l %1,%0" : "=dm" (result) : "f" (x)); + return result; +} +weak_alias (__lrintf, lrintf) diff --git a/sysdeps/m68k/coldfire/fpu/s_rint.c b/sysdeps/m68k/coldfire/fpu/s_rint.c new file mode 100644 index 0000000000..7be8bb6e2a --- /dev/null +++ b/sysdeps/m68k/coldfire/fpu/s_rint.c @@ -0,0 +1,29 @@ +/* Copyright (C) 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 + 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. */ + +double +__rint (double x) +{ + asm ("fint.d %1,%0" : "=f" (x) : "fm" (x)); + return x; +} +weak_alias (__rint, rint) +#ifdef NO_LONG_DOUBLE +strong_alias (__rint, __rintl) +weak_alias (__rint, rintl) +#endif diff --git a/sysdeps/m68k/coldfire/fpu/s_rintf.c b/sysdeps/m68k/coldfire/fpu/s_rintf.c new file mode 100644 index 0000000000..2337d74404 --- /dev/null +++ b/sysdeps/m68k/coldfire/fpu/s_rintf.c @@ -0,0 +1,26 @@ +/* Copyright (C) 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 + 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. */ + +float +__rintf (float x) +{ + double result; + asm ("fint.s %1,%0" : "=f" (result) : "dm" (x)); + return (float) result; +} +weak_alias (__rintf, rintf) diff --git a/sysdeps/m68k/coldfire/shlib-versions b/sysdeps/m68k/coldfire/shlib-versions new file mode 100644 index 0000000000..f4c68b2a51 --- /dev/null +++ b/sysdeps/m68k/coldfire/shlib-versions @@ -0,0 +1 @@ +m68k-.*-linux.* DEFAULT GLIBC_2.4 diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index f31b68772d..fad1ef9e08 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -23,6 +23,7 @@ #define ELF_MACHINE_NAME "m68k" #include +#include /* Return nonzero iff ELF header is compatible with the running host. */ static inline int @@ -48,7 +49,7 @@ static inline Elf32_Addr elf_machine_load_address (void) { Elf32_Addr addr; - asm ("lea _dl_start(%%pc), %0\n\t" + asm (PCREL_OP ("lea", "_dl_start", "%0", "%0", "%%pc") "\n\t" "sub.l _dl_start@GOT.w(%%a5), %0" : "=a" (addr)); return addr; @@ -130,7 +131,7 @@ _dl_start_user:\n\ move.l %d0, %a4\n\ | See if we were run as a command with the executable file\n\ | name as an extra leading argument.\n\ - move.l _dl_skip_args(%pc), %d0\n\ + " PCREL_OP ("move.l", "_dl_skip_args", "%d0", "%d0", "%pc") "\n\ | Pop the original argument count\n\ move.l (%sp)+, %d1\n\ | Subtract _dl_skip_args from it.\n\ @@ -143,12 +144,12 @@ _dl_start_user:\n\ pea 8(%sp, %d1*4)\n\ pea 8(%sp)\n\ move.l %d1, -(%sp)\n\ - move.l _rtld_local(%pc), -(%sp)\n\ + " PCREL_OP ("move.l", "_rtld_local", "-(%sp)", "%d0", "%pc") "\n\ jbsr _dl_init_internal@PLTPC\n\ addq.l #8, %sp\n\ addq.l #8, %sp\n\ | Pass our finalizer function to the user in %a1.\n\ - lea _dl_fini(%pc), %a1\n\ + " PCREL_OP ("lea", "_dl_fini", "%a1", "%a1", "%pc") "\n\ | Initialize %fp with the stack pointer.\n\ move.l %sp, %fp\n\ | Jump to the user's entry point.\n\ diff --git a/sysdeps/m68k/dl-trampoline.S b/sysdeps/m68k/dl-trampoline.S index 8791280371..e324da1085 100644 --- a/sysdeps/m68k/dl-trampoline.S +++ b/sysdeps/m68k/dl-trampoline.S @@ -34,7 +34,12 @@ _dl_runtime_resolve: | Pop parameters addq.l #8, %sp | Call real function. +#ifdef __mcoldfire__ + move.l %d0,-(%sp) + rts +#else jmp (%d0) +#endif .size _dl_runtime_resolve, . - _dl_runtime_resolve .text @@ -64,7 +69,12 @@ _dl_runtime_profile: move.l (%sp)+, %a1 lea 12(%sp), %sp | Call real function. +#ifdef __mcoldfire__ + move.l %d0,-(%sp) + rts +#else jmp (%d0) +#endif /* +24 return address @@ -79,15 +89,24 @@ _dl_runtime_profile: move.l %sp, %a2 move.l %sp, %a0 lea 28(%sp), %a1 - | Round framesize up to even - addq.l #1, %d1 - lsr #1, %d1 - sub.l %d1, %a0 + | Round framesize up to longword alignment + addq.l #3, %d1 + and.l #-3, %d1 sub.l %d1, %a0 move.l %a0, %sp +#ifdef __mcoldfire__ + tst.l %d1 + beq 2f +1: move.l (%a0)+, (%a1)+ + subq.l #4,%d1 + bne 1b +2: +#else + lsr.l #2,%d1 jra 2f -1: move.w (%a1)+, (%a0)+ +1: move.l (%a1)+, (%a0)+ 2: dbra %d1,1b +#endif /* %a2+24 return address %a2+20 PLT1 @@ -101,7 +120,14 @@ _dl_runtime_profile: move.l 4(%a2), %a0 move.l 8(%a2), %a1 +#ifdef __mcoldfire__ + pea 2f(%pc) + move.l %d0,-(%sp) + rts +2: +#else jsr (%d0) +#endif move.l %a2, %sp move.l (%sp)+, %a2 /* @@ -112,18 +138,34 @@ _dl_runtime_profile: +4 %a1 %sp %a0 */ +#ifdef __mcoldfire__ + fmove.l %fp0, -(%sp) +#else fmove.x %fp0, -(%sp) +#endif + move.l %a0, -(%sp) move.l %d1, -(%sp) move.l %d0, -(%sp) pea (%sp) - pea 20(%sp) +#ifdef __mcoldfire__ + pea 24(%sp) move.l 40(%sp), -(%sp) move.l 40(%sp), -(%sp) +#else + pea 28(%sp) + move.l 44(%sp), -(%sp) + move.l 44(%sp), -(%sp) +#endif jbsr _dl_call_pltexit lea 16(%sp), %sp move.l (%sp)+, %d0 move.l (%sp)+, %d1 + move.l (%sp)+, %a0 +#ifdef __mcoldfire__ + fmove.d (%sp)+, %fp0 +#else fmove.x (%sp)+, %fp0 +#endif lea 20(%sp), %sp rts .size _dl_runtime_profile, . - _dl_runtime_profile diff --git a/sysdeps/m68k/fpu/fegetenv.c b/sysdeps/m68k/fpu/fegetenv.c index 6c94b07318..6f23e8b749 100644 --- a/sysdeps/m68k/fpu/fegetenv.c +++ b/sysdeps/m68k/fpu/fegetenv.c @@ -23,7 +23,13 @@ int __fegetenv (fenv_t *envp) { +#ifdef __mcoldfire__ + __asm__ ("fmove%.l %/fpcr,%0" : "=dm" (envp->__control_register)); + __asm__ ("fmove%.l %/fpsr,%0" : "=dm" (envp->__status_register)); + __asm__ ("fmove%.l %/fpiar,%0" : "=dm" (envp->__instruction_address)); +#else __asm__ ("fmovem%.l %/fpcr/%/fpsr/%/fpiar,%0" : "=m" (*envp)); +#endif /* Success. */ return 0; diff --git a/sysdeps/m68k/fpu/feholdexcpt.c b/sysdeps/m68k/fpu/feholdexcpt.c index 88fb1c59ac..8f0d15f617 100644 --- a/sysdeps/m68k/fpu/feholdexcpt.c +++ b/sysdeps/m68k/fpu/feholdexcpt.c @@ -26,7 +26,13 @@ feholdexcept (fenv_t *envp) fexcept_t fpcr, fpsr; /* Store the environment. */ +#ifdef __mcoldfire__ + __asm__ ("fmove%.l %/fpcr,%0" : "=dm" (envp->__control_register)); + __asm__ ("fmove%.l %/fpsr,%0" : "=dm" (envp->__status_register)); + __asm__ ("fmove%.l %/fpiar,%0" : "=dm" (envp->__instruction_address)); +#else __asm__ ("fmovem%.l %/fpcr/%/fpsr/%/fpiar,%0" : "=m" (*envp)); +#endif /* Now clear all exceptions. */ fpsr = envp->__status_register & ~FE_ALL_EXCEPT; @@ -37,3 +43,4 @@ feholdexcept (fenv_t *envp) return 0; } +libm_hidden_def (feholdexcept); diff --git a/sysdeps/m68k/fpu/fesetenv.c b/sysdeps/m68k/fpu/fesetenv.c index 20653f0ddc..931b2e4bd3 100644 --- a/sysdeps/m68k/fpu/fesetenv.c +++ b/sysdeps/m68k/fpu/fesetenv.c @@ -29,7 +29,13 @@ __fesetenv (const fenv_t *envp) values which we do not want to come from the saved environment. Therefore, we get the current environment and replace the values we want to use from the environment specified by the parameter. */ +#ifdef __mcoldfire__ + __asm__ ("fmove%.l %/fpcr,%0" : "=dm" (temp.__control_register)); + __asm__ ("fmove%.l %/fpsr,%0" : "=dm" (temp.__status_register)); + __asm__ ("fmove%.l %/fpiar,%0" : "=dm" (temp.__instruction_address)); +#else __asm__ ("fmovem%.l %/fpcr/%/fpsr/%/fpiar,%0" : "=m" (*&temp)); +#endif temp.__status_register &= ~FE_ALL_EXCEPT; temp.__control_register &= ~((FE_ALL_EXCEPT << 6) | FE_UPWARD); @@ -44,7 +50,16 @@ __fesetenv (const fenv_t *envp) temp.__status_register |= envp->__status_register & FE_ALL_EXCEPT; } +#ifdef __mcoldfire__ + __asm__ __volatile__ ("fmove%.l %0,%/fpiar" + :: "dm" (temp.__instruction_address)); + __asm__ __volatile__ ("fmove%.l %0,%/fpcr" + :: "dm" (temp.__control_register)); + __asm__ __volatile__ ("fmove%.l %0,%/fpsr" + :: "dm" (temp.__status_register)); +#else __asm__ __volatile__ ("fmovem%.l %0,%/fpcr/%/fpsr/%/fpiar" : : "m" (*&temp)); +#endif /* Success. */ return 0; diff --git a/sysdeps/m68k/fpu/fesetround.c b/sysdeps/m68k/fpu/fesetround.c index 956325de8a..f9c1da8593 100644 --- a/sysdeps/m68k/fpu/fesetround.c +++ b/sysdeps/m68k/fpu/fesetround.c @@ -36,3 +36,4 @@ fesetround (int round) return 0; } +libm_hidden_def (fesetround); diff --git a/sysdeps/m68k/fpu_control.h b/sysdeps/m68k/fpu_control.h index 86358e6559..cef5625fa7 100644 --- a/sysdeps/m68k/fpu_control.h +++ b/sysdeps/m68k/fpu_control.h @@ -30,9 +30,9 @@ * 12 -> enable trap for OVFL exception * 11 -> enable trap for UNFL exception * 10 -> enable trap for DZ exception - * 9 -> enable trap for INEX2 exception - * 8 -> enable trap for INEX1 exception - * 7-6 -> Precision Control + * 9 -> enable trap for INEX2 exception (INEX on Coldfire) + * 8 -> enable trap for INEX1 exception (IDE on Coldfire) + * 7-6 -> Precision Control (only bit 6 is used on Coldfire) * 5-4 -> Rounding Control * 3-0 -> zero (read as 0, write as 0) * @@ -65,8 +65,12 @@ #define _FPU_MASK_INEX2 0x0100 /* precision control */ +#ifdef __mcoldfire__ +#define _FPU_DOUBLE 0x00 +#else #define _FPU_EXTENDED 0x00 /* RECOMMENDED */ #define _FPU_DOUBLE 0x80 +#endif #define _FPU_SINGLE 0x40 /* DO NOT USE */ /* rounding control */ @@ -75,7 +79,11 @@ #define _FPU_RC_DOWN 0x20 #define _FPU_RC_UP 0x30 +#ifdef __mcoldfire__ +#define _FPU_RESERVED 0xFFFF800F +#else #define _FPU_RESERVED 0xFFFF000F /* Reserved bits in fpucr */ +#endif /* Now two recommended fpucr */ diff --git a/sysdeps/m68k/ldsodefs.h b/sysdeps/m68k/ldsodefs.h new file mode 100644 index 0000000000..2eda4a8579 --- /dev/null +++ b/sysdeps/m68k/ldsodefs.h @@ -0,0 +1,43 @@ +/* Run-time dynamic linker data structures for loaded ELF shared objects. + Copyright (C) 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 + 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 __LDSODEFS_H + +#include + +struct La_m68k_regs; +struct La_m68k_retval; + +#define ARCH_PLTENTER_MEMBERS \ + Elf32_Addr (*m68k_gnu_pltenter) (Elf32_Sym *, unsigned int, \ + uintptr_t *, uintptr_t *, \ + const struct La_m68k_regs *, \ + unsigned int *, const char *name, \ + long int *framesizep); + +#define ARCH_PLTEXIT_MEMBERS \ + unsigned int (*m68k_gnu_pltexit) (Elf32_Sym *, unsigned int, \ + uintptr_t *, uintptr_t *, \ + const struct La_m68k_regs *, \ + struct La_m68k_retval *, \ + const char *); + +#include_next + +#endif diff --git a/sysdeps/m68k/m680x0/Implies b/sysdeps/m68k/m680x0/Implies new file mode 100644 index 0000000000..abf356d9e8 --- /dev/null +++ b/sysdeps/m68k/m680x0/Implies @@ -0,0 +1 @@ +ieee754/ldbl-96 diff --git a/sysdeps/m68k/m680x0/Makefile b/sysdeps/m68k/m680x0/Makefile new file mode 100644 index 0000000000..582fa6f900 --- /dev/null +++ b/sysdeps/m68k/m680x0/Makefile @@ -0,0 +1,2 @@ +# The 68k `long double' is a distinct type we support. +long-double-fcts = yes diff --git a/sysdeps/m68k/add_n.S b/sysdeps/m68k/m680x0/add_n.S similarity index 100% rename from sysdeps/m68k/add_n.S rename to sysdeps/m68k/m680x0/add_n.S diff --git a/sysdeps/m68k/bits/huge_vall.h b/sysdeps/m68k/m680x0/bits/huge_vall.h similarity index 100% rename from sysdeps/m68k/bits/huge_vall.h rename to sysdeps/m68k/m680x0/bits/huge_vall.h diff --git a/sysdeps/m68k/bits/mathdef.h b/sysdeps/m68k/m680x0/bits/mathdef.h similarity index 100% rename from sysdeps/m68k/bits/mathdef.h rename to sysdeps/m68k/m680x0/bits/mathdef.h diff --git a/sysdeps/m68k/fpu/Makefile b/sysdeps/m68k/m680x0/fpu/Makefile similarity index 100% rename from sysdeps/m68k/fpu/Makefile rename to sysdeps/m68k/m680x0/fpu/Makefile diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/m680x0/fpu/bits/mathinline.h similarity index 100% rename from sysdeps/m68k/fpu/bits/mathinline.h rename to sysdeps/m68k/m680x0/fpu/bits/mathinline.h diff --git a/sysdeps/m68k/fpu/branred.c b/sysdeps/m68k/m680x0/fpu/branred.c similarity index 100% rename from sysdeps/m68k/fpu/branred.c rename to sysdeps/m68k/m680x0/fpu/branred.c diff --git a/sysdeps/m68k/fpu/doasin.c b/sysdeps/m68k/m680x0/fpu/doasin.c similarity index 100% rename from sysdeps/m68k/fpu/doasin.c rename to sysdeps/m68k/m680x0/fpu/doasin.c diff --git a/sysdeps/m68k/fpu/dosincos.c b/sysdeps/m68k/m680x0/fpu/dosincos.c similarity index 100% rename from sysdeps/m68k/fpu/dosincos.c rename to sysdeps/m68k/m680x0/fpu/dosincos.c diff --git a/sysdeps/m68k/fpu/e_acos.c b/sysdeps/m68k/m680x0/fpu/e_acos.c similarity index 100% rename from sysdeps/m68k/fpu/e_acos.c rename to sysdeps/m68k/m680x0/fpu/e_acos.c diff --git a/sysdeps/m68k/fpu/e_acosf.c b/sysdeps/m68k/m680x0/fpu/e_acosf.c similarity index 100% rename from sysdeps/m68k/fpu/e_acosf.c rename to sysdeps/m68k/m680x0/fpu/e_acosf.c diff --git a/sysdeps/m68k/fpu/e_acosl.c b/sysdeps/m68k/m680x0/fpu/e_acosl.c similarity index 100% rename from sysdeps/m68k/fpu/e_acosl.c rename to sysdeps/m68k/m680x0/fpu/e_acosl.c diff --git a/sysdeps/m68k/fpu/e_asin.c b/sysdeps/m68k/m680x0/fpu/e_asin.c similarity index 100% rename from sysdeps/m68k/fpu/e_asin.c rename to sysdeps/m68k/m680x0/fpu/e_asin.c diff --git a/sysdeps/m68k/fpu/e_asinf.c b/sysdeps/m68k/m680x0/fpu/e_asinf.c similarity index 100% rename from sysdeps/m68k/fpu/e_asinf.c rename to sysdeps/m68k/m680x0/fpu/e_asinf.c diff --git a/sysdeps/m68k/fpu/e_asinl.c b/sysdeps/m68k/m680x0/fpu/e_asinl.c similarity index 100% rename from sysdeps/m68k/fpu/e_asinl.c rename to sysdeps/m68k/m680x0/fpu/e_asinl.c diff --git a/sysdeps/m68k/fpu/e_atan2.c b/sysdeps/m68k/m680x0/fpu/e_atan2.c similarity index 100% rename from sysdeps/m68k/fpu/e_atan2.c rename to sysdeps/m68k/m680x0/fpu/e_atan2.c diff --git a/sysdeps/m68k/fpu/e_atan2f.c b/sysdeps/m68k/m680x0/fpu/e_atan2f.c similarity index 100% rename from sysdeps/m68k/fpu/e_atan2f.c rename to sysdeps/m68k/m680x0/fpu/e_atan2f.c diff --git a/sysdeps/m68k/fpu/e_atan2l.c b/sysdeps/m68k/m680x0/fpu/e_atan2l.c similarity index 100% rename from sysdeps/m68k/fpu/e_atan2l.c rename to sysdeps/m68k/m680x0/fpu/e_atan2l.c diff --git a/sysdeps/m68k/fpu/e_atanh.c b/sysdeps/m68k/m680x0/fpu/e_atanh.c similarity index 100% rename from sysdeps/m68k/fpu/e_atanh.c rename to sysdeps/m68k/m680x0/fpu/e_atanh.c diff --git a/sysdeps/m68k/fpu/e_atanhf.c b/sysdeps/m68k/m680x0/fpu/e_atanhf.c similarity index 100% rename from sysdeps/m68k/fpu/e_atanhf.c rename to sysdeps/m68k/m680x0/fpu/e_atanhf.c diff --git a/sysdeps/m68k/fpu/e_atanhl.c b/sysdeps/m68k/m680x0/fpu/e_atanhl.c similarity index 100% rename from sysdeps/m68k/fpu/e_atanhl.c rename to sysdeps/m68k/m680x0/fpu/e_atanhl.c diff --git a/sysdeps/m68k/fpu/e_cosh.c b/sysdeps/m68k/m680x0/fpu/e_cosh.c similarity index 100% rename from sysdeps/m68k/fpu/e_cosh.c rename to sysdeps/m68k/m680x0/fpu/e_cosh.c diff --git a/sysdeps/m68k/fpu/e_coshf.c b/sysdeps/m68k/m680x0/fpu/e_coshf.c similarity index 100% rename from sysdeps/m68k/fpu/e_coshf.c rename to sysdeps/m68k/m680x0/fpu/e_coshf.c diff --git a/sysdeps/m68k/fpu/e_coshl.c b/sysdeps/m68k/m680x0/fpu/e_coshl.c similarity index 100% rename from sysdeps/m68k/fpu/e_coshl.c rename to sysdeps/m68k/m680x0/fpu/e_coshl.c diff --git a/sysdeps/m68k/fpu/e_exp.c b/sysdeps/m68k/m680x0/fpu/e_exp.c similarity index 100% rename from sysdeps/m68k/fpu/e_exp.c rename to sysdeps/m68k/m680x0/fpu/e_exp.c diff --git a/sysdeps/m68k/fpu/e_exp10.c b/sysdeps/m68k/m680x0/fpu/e_exp10.c similarity index 100% rename from sysdeps/m68k/fpu/e_exp10.c rename to sysdeps/m68k/m680x0/fpu/e_exp10.c diff --git a/sysdeps/m68k/fpu/e_exp10f.c b/sysdeps/m68k/m680x0/fpu/e_exp10f.c similarity index 100% rename from sysdeps/m68k/fpu/e_exp10f.c rename to sysdeps/m68k/m680x0/fpu/e_exp10f.c diff --git a/sysdeps/m68k/fpu/e_exp10l.c b/sysdeps/m68k/m680x0/fpu/e_exp10l.c similarity index 100% rename from sysdeps/m68k/fpu/e_exp10l.c rename to sysdeps/m68k/m680x0/fpu/e_exp10l.c diff --git a/sysdeps/m68k/fpu/e_exp2.c b/sysdeps/m68k/m680x0/fpu/e_exp2.c similarity index 100% rename from sysdeps/m68k/fpu/e_exp2.c rename to sysdeps/m68k/m680x0/fpu/e_exp2.c diff --git a/sysdeps/m68k/fpu/e_exp2f.c b/sysdeps/m68k/m680x0/fpu/e_exp2f.c similarity index 100% rename from sysdeps/m68k/fpu/e_exp2f.c rename to sysdeps/m68k/m680x0/fpu/e_exp2f.c diff --git a/sysdeps/m68k/fpu/e_exp2l.c b/sysdeps/m68k/m680x0/fpu/e_exp2l.c similarity index 100% rename from sysdeps/m68k/fpu/e_exp2l.c rename to sysdeps/m68k/m680x0/fpu/e_exp2l.c diff --git a/sysdeps/m68k/fpu/e_expf.c b/sysdeps/m68k/m680x0/fpu/e_expf.c similarity index 100% rename from sysdeps/m68k/fpu/e_expf.c rename to sysdeps/m68k/m680x0/fpu/e_expf.c diff --git a/sysdeps/m68k/fpu/e_expl.c b/sysdeps/m68k/m680x0/fpu/e_expl.c similarity index 100% rename from sysdeps/m68k/fpu/e_expl.c rename to sysdeps/m68k/m680x0/fpu/e_expl.c diff --git a/sysdeps/m68k/fpu/e_fmod.c b/sysdeps/m68k/m680x0/fpu/e_fmod.c similarity index 100% rename from sysdeps/m68k/fpu/e_fmod.c rename to sysdeps/m68k/m680x0/fpu/e_fmod.c diff --git a/sysdeps/m68k/fpu/e_fmodf.c b/sysdeps/m68k/m680x0/fpu/e_fmodf.c similarity index 100% rename from sysdeps/m68k/fpu/e_fmodf.c rename to sysdeps/m68k/m680x0/fpu/e_fmodf.c diff --git a/sysdeps/m68k/fpu/e_fmodl.c b/sysdeps/m68k/m680x0/fpu/e_fmodl.c similarity index 100% rename from sysdeps/m68k/fpu/e_fmodl.c rename to sysdeps/m68k/m680x0/fpu/e_fmodl.c diff --git a/sysdeps/m68k/fpu/e_log.c b/sysdeps/m68k/m680x0/fpu/e_log.c similarity index 100% rename from sysdeps/m68k/fpu/e_log.c rename to sysdeps/m68k/m680x0/fpu/e_log.c diff --git a/sysdeps/m68k/fpu/e_log10.c b/sysdeps/m68k/m680x0/fpu/e_log10.c similarity index 100% rename from sysdeps/m68k/fpu/e_log10.c rename to sysdeps/m68k/m680x0/fpu/e_log10.c diff --git a/sysdeps/m68k/fpu/e_log10f.c b/sysdeps/m68k/m680x0/fpu/e_log10f.c similarity index 100% rename from sysdeps/m68k/fpu/e_log10f.c rename to sysdeps/m68k/m680x0/fpu/e_log10f.c diff --git a/sysdeps/m68k/fpu/e_log10l.c b/sysdeps/m68k/m680x0/fpu/e_log10l.c similarity index 100% rename from sysdeps/m68k/fpu/e_log10l.c rename to sysdeps/m68k/m680x0/fpu/e_log10l.c diff --git a/sysdeps/m68k/fpu/e_log2.c b/sysdeps/m68k/m680x0/fpu/e_log2.c similarity index 100% rename from sysdeps/m68k/fpu/e_log2.c rename to sysdeps/m68k/m680x0/fpu/e_log2.c diff --git a/sysdeps/m68k/fpu/e_log2f.c b/sysdeps/m68k/m680x0/fpu/e_log2f.c similarity index 100% rename from sysdeps/m68k/fpu/e_log2f.c rename to sysdeps/m68k/m680x0/fpu/e_log2f.c diff --git a/sysdeps/m68k/fpu/e_log2l.c b/sysdeps/m68k/m680x0/fpu/e_log2l.c similarity index 100% rename from sysdeps/m68k/fpu/e_log2l.c rename to sysdeps/m68k/m680x0/fpu/e_log2l.c diff --git a/sysdeps/m68k/fpu/e_logf.c b/sysdeps/m68k/m680x0/fpu/e_logf.c similarity index 100% rename from sysdeps/m68k/fpu/e_logf.c rename to sysdeps/m68k/m680x0/fpu/e_logf.c diff --git a/sysdeps/m68k/fpu/e_logl.c b/sysdeps/m68k/m680x0/fpu/e_logl.c similarity index 100% rename from sysdeps/m68k/fpu/e_logl.c rename to sysdeps/m68k/m680x0/fpu/e_logl.c diff --git a/sysdeps/m68k/fpu/e_pow.c b/sysdeps/m68k/m680x0/fpu/e_pow.c similarity index 100% rename from sysdeps/m68k/fpu/e_pow.c rename to sysdeps/m68k/m680x0/fpu/e_pow.c diff --git a/sysdeps/m68k/fpu/e_powf.c b/sysdeps/m68k/m680x0/fpu/e_powf.c similarity index 100% rename from sysdeps/m68k/fpu/e_powf.c rename to sysdeps/m68k/m680x0/fpu/e_powf.c diff --git a/sysdeps/m68k/fpu/e_powl.c b/sysdeps/m68k/m680x0/fpu/e_powl.c similarity index 100% rename from sysdeps/m68k/fpu/e_powl.c rename to sysdeps/m68k/m680x0/fpu/e_powl.c diff --git a/sysdeps/m68k/fpu/e_rem_pio2.c b/sysdeps/m68k/m680x0/fpu/e_rem_pio2.c similarity index 100% rename from sysdeps/m68k/fpu/e_rem_pio2.c rename to sysdeps/m68k/m680x0/fpu/e_rem_pio2.c diff --git a/sysdeps/m68k/fpu/e_rem_pio2f.c b/sysdeps/m68k/m680x0/fpu/e_rem_pio2f.c similarity index 100% rename from sysdeps/m68k/fpu/e_rem_pio2f.c rename to sysdeps/m68k/m680x0/fpu/e_rem_pio2f.c diff --git a/sysdeps/m68k/fpu/e_rem_pio2l.c b/sysdeps/m68k/m680x0/fpu/e_rem_pio2l.c similarity index 100% rename from sysdeps/m68k/fpu/e_rem_pio2l.c rename to sysdeps/m68k/m680x0/fpu/e_rem_pio2l.c diff --git a/sysdeps/m68k/fpu/e_remainder.c b/sysdeps/m68k/m680x0/fpu/e_remainder.c similarity index 100% rename from sysdeps/m68k/fpu/e_remainder.c rename to sysdeps/m68k/m680x0/fpu/e_remainder.c diff --git a/sysdeps/m68k/fpu/e_remainderf.c b/sysdeps/m68k/m680x0/fpu/e_remainderf.c similarity index 100% rename from sysdeps/m68k/fpu/e_remainderf.c rename to sysdeps/m68k/m680x0/fpu/e_remainderf.c diff --git a/sysdeps/m68k/fpu/e_remainderl.c b/sysdeps/m68k/m680x0/fpu/e_remainderl.c similarity index 100% rename from sysdeps/m68k/fpu/e_remainderl.c rename to sysdeps/m68k/m680x0/fpu/e_remainderl.c diff --git a/sysdeps/m68k/fpu/e_scalb.c b/sysdeps/m68k/m680x0/fpu/e_scalb.c similarity index 100% rename from sysdeps/m68k/fpu/e_scalb.c rename to sysdeps/m68k/m680x0/fpu/e_scalb.c diff --git a/sysdeps/m68k/fpu/e_scalbf.c b/sysdeps/m68k/m680x0/fpu/e_scalbf.c similarity index 100% rename from sysdeps/m68k/fpu/e_scalbf.c rename to sysdeps/m68k/m680x0/fpu/e_scalbf.c diff --git a/sysdeps/m68k/fpu/e_scalbl.c b/sysdeps/m68k/m680x0/fpu/e_scalbl.c similarity index 100% rename from sysdeps/m68k/fpu/e_scalbl.c rename to sysdeps/m68k/m680x0/fpu/e_scalbl.c diff --git a/sysdeps/m68k/fpu/e_sinh.c b/sysdeps/m68k/m680x0/fpu/e_sinh.c similarity index 100% rename from sysdeps/m68k/fpu/e_sinh.c rename to sysdeps/m68k/m680x0/fpu/e_sinh.c diff --git a/sysdeps/m68k/fpu/e_sinhf.c b/sysdeps/m68k/m680x0/fpu/e_sinhf.c similarity index 100% rename from sysdeps/m68k/fpu/e_sinhf.c rename to sysdeps/m68k/m680x0/fpu/e_sinhf.c diff --git a/sysdeps/m68k/fpu/e_sinhl.c b/sysdeps/m68k/m680x0/fpu/e_sinhl.c similarity index 100% rename from sysdeps/m68k/fpu/e_sinhl.c rename to sysdeps/m68k/m680x0/fpu/e_sinhl.c diff --git a/sysdeps/m68k/fpu/e_sqrt.c b/sysdeps/m68k/m680x0/fpu/e_sqrt.c similarity index 100% rename from sysdeps/m68k/fpu/e_sqrt.c rename to sysdeps/m68k/m680x0/fpu/e_sqrt.c diff --git a/sysdeps/m68k/fpu/e_sqrtf.c b/sysdeps/m68k/m680x0/fpu/e_sqrtf.c similarity index 100% rename from sysdeps/m68k/fpu/e_sqrtf.c rename to sysdeps/m68k/m680x0/fpu/e_sqrtf.c diff --git a/sysdeps/m68k/fpu/e_sqrtl.c b/sysdeps/m68k/m680x0/fpu/e_sqrtl.c similarity index 100% rename from sysdeps/m68k/fpu/e_sqrtl.c rename to sysdeps/m68k/m680x0/fpu/e_sqrtl.c diff --git a/sysdeps/m68k/fpu/fraiseexcpt.c b/sysdeps/m68k/m680x0/fpu/fraiseexcpt.c similarity index 100% rename from sysdeps/m68k/fpu/fraiseexcpt.c rename to sysdeps/m68k/m680x0/fpu/fraiseexcpt.c diff --git a/sysdeps/m68k/fpu/halfulp.c b/sysdeps/m68k/m680x0/fpu/halfulp.c similarity index 100% rename from sysdeps/m68k/fpu/halfulp.c rename to sysdeps/m68k/m680x0/fpu/halfulp.c diff --git a/sysdeps/m68k/fpu/k_cos.c b/sysdeps/m68k/m680x0/fpu/k_cos.c similarity index 100% rename from sysdeps/m68k/fpu/k_cos.c rename to sysdeps/m68k/m680x0/fpu/k_cos.c diff --git a/sysdeps/m68k/fpu/k_cosf.c b/sysdeps/m68k/m680x0/fpu/k_cosf.c similarity index 100% rename from sysdeps/m68k/fpu/k_cosf.c rename to sysdeps/m68k/m680x0/fpu/k_cosf.c diff --git a/sysdeps/m68k/fpu/k_cosl.c b/sysdeps/m68k/m680x0/fpu/k_cosl.c similarity index 100% rename from sysdeps/m68k/fpu/k_cosl.c rename to sysdeps/m68k/m680x0/fpu/k_cosl.c diff --git a/sysdeps/m68k/fpu/k_rem_pio2.c b/sysdeps/m68k/m680x0/fpu/k_rem_pio2.c similarity index 100% rename from sysdeps/m68k/fpu/k_rem_pio2.c rename to sysdeps/m68k/m680x0/fpu/k_rem_pio2.c diff --git a/sysdeps/m68k/fpu/k_rem_pio2f.c b/sysdeps/m68k/m680x0/fpu/k_rem_pio2f.c similarity index 100% rename from sysdeps/m68k/fpu/k_rem_pio2f.c rename to sysdeps/m68k/m680x0/fpu/k_rem_pio2f.c diff --git a/sysdeps/m68k/fpu/k_rem_pio2l.c b/sysdeps/m68k/m680x0/fpu/k_rem_pio2l.c similarity index 100% rename from sysdeps/m68k/fpu/k_rem_pio2l.c rename to sysdeps/m68k/m680x0/fpu/k_rem_pio2l.c diff --git a/sysdeps/m68k/fpu/k_sin.c b/sysdeps/m68k/m680x0/fpu/k_sin.c similarity index 100% rename from sysdeps/m68k/fpu/k_sin.c rename to sysdeps/m68k/m680x0/fpu/k_sin.c diff --git a/sysdeps/m68k/fpu/k_sinf.c b/sysdeps/m68k/m680x0/fpu/k_sinf.c similarity index 100% rename from sysdeps/m68k/fpu/k_sinf.c rename to sysdeps/m68k/m680x0/fpu/k_sinf.c diff --git a/sysdeps/m68k/fpu/k_sinl.c b/sysdeps/m68k/m680x0/fpu/k_sinl.c similarity index 100% rename from sysdeps/m68k/fpu/k_sinl.c rename to sysdeps/m68k/m680x0/fpu/k_sinl.c diff --git a/sysdeps/m68k/fpu/k_tan.c b/sysdeps/m68k/m680x0/fpu/k_tan.c similarity index 100% rename from sysdeps/m68k/fpu/k_tan.c rename to sysdeps/m68k/m680x0/fpu/k_tan.c diff --git a/sysdeps/m68k/fpu/k_tanf.c b/sysdeps/m68k/m680x0/fpu/k_tanf.c similarity index 100% rename from sysdeps/m68k/fpu/k_tanf.c rename to sysdeps/m68k/m680x0/fpu/k_tanf.c diff --git a/sysdeps/m68k/fpu/k_tanl.c b/sysdeps/m68k/m680x0/fpu/k_tanl.c similarity index 100% rename from sysdeps/m68k/fpu/k_tanl.c rename to sysdeps/m68k/m680x0/fpu/k_tanl.c diff --git a/sysdeps/m68k/fpu/libm-test-ulps b/sysdeps/m68k/m680x0/fpu/libm-test-ulps similarity index 100% rename from sysdeps/m68k/fpu/libm-test-ulps rename to sysdeps/m68k/m680x0/fpu/libm-test-ulps diff --git a/sysdeps/m68k/fpu/mathimpl.h b/sysdeps/m68k/m680x0/fpu/mathimpl.h similarity index 100% rename from sysdeps/m68k/fpu/mathimpl.h rename to sysdeps/m68k/m680x0/fpu/mathimpl.h diff --git a/sysdeps/m68k/fpu/mpa.c b/sysdeps/m68k/m680x0/fpu/mpa.c similarity index 100% rename from sysdeps/m68k/fpu/mpa.c rename to sysdeps/m68k/m680x0/fpu/mpa.c diff --git a/sysdeps/m68k/fpu/mpatan.c b/sysdeps/m68k/m680x0/fpu/mpatan.c similarity index 100% rename from sysdeps/m68k/fpu/mpatan.c rename to sysdeps/m68k/m680x0/fpu/mpatan.c diff --git a/sysdeps/m68k/fpu/mpatan2.c b/sysdeps/m68k/m680x0/fpu/mpatan2.c similarity index 100% rename from sysdeps/m68k/fpu/mpatan2.c rename to sysdeps/m68k/m680x0/fpu/mpatan2.c diff --git a/sysdeps/m68k/fpu/mpexp.c b/sysdeps/m68k/m680x0/fpu/mpexp.c similarity index 100% rename from sysdeps/m68k/fpu/mpexp.c rename to sysdeps/m68k/m680x0/fpu/mpexp.c diff --git a/sysdeps/m68k/fpu/mplog.c b/sysdeps/m68k/m680x0/fpu/mplog.c similarity index 100% rename from sysdeps/m68k/fpu/mplog.c rename to sysdeps/m68k/m680x0/fpu/mplog.c diff --git a/sysdeps/m68k/fpu/mpsqrt.c b/sysdeps/m68k/m680x0/fpu/mpsqrt.c similarity index 100% rename from sysdeps/m68k/fpu/mpsqrt.c rename to sysdeps/m68k/m680x0/fpu/mpsqrt.c diff --git a/sysdeps/m68k/fpu/mptan.c b/sysdeps/m68k/m680x0/fpu/mptan.c similarity index 100% rename from sysdeps/m68k/fpu/mptan.c rename to sysdeps/m68k/m680x0/fpu/mptan.c diff --git a/sysdeps/m68k/fpu/s_atan.c b/sysdeps/m68k/m680x0/fpu/s_atan.c similarity index 100% rename from sysdeps/m68k/fpu/s_atan.c rename to sysdeps/m68k/m680x0/fpu/s_atan.c diff --git a/sysdeps/m68k/fpu/s_atanf.c b/sysdeps/m68k/m680x0/fpu/s_atanf.c similarity index 100% rename from sysdeps/m68k/fpu/s_atanf.c rename to sysdeps/m68k/m680x0/fpu/s_atanf.c diff --git a/sysdeps/m68k/fpu/s_atanl.c b/sysdeps/m68k/m680x0/fpu/s_atanl.c similarity index 100% rename from sysdeps/m68k/fpu/s_atanl.c rename to sysdeps/m68k/m680x0/fpu/s_atanl.c diff --git a/sysdeps/m68k/fpu/s_ccos.c b/sysdeps/m68k/m680x0/fpu/s_ccos.c similarity index 100% rename from sysdeps/m68k/fpu/s_ccos.c rename to sysdeps/m68k/m680x0/fpu/s_ccos.c diff --git a/sysdeps/m68k/fpu/s_ccosf.c b/sysdeps/m68k/m680x0/fpu/s_ccosf.c similarity index 100% rename from sysdeps/m68k/fpu/s_ccosf.c rename to sysdeps/m68k/m680x0/fpu/s_ccosf.c diff --git a/sysdeps/m68k/fpu/s_ccosh.c b/sysdeps/m68k/m680x0/fpu/s_ccosh.c similarity index 100% rename from sysdeps/m68k/fpu/s_ccosh.c rename to sysdeps/m68k/m680x0/fpu/s_ccosh.c diff --git a/sysdeps/m68k/fpu/s_ccoshf.c b/sysdeps/m68k/m680x0/fpu/s_ccoshf.c similarity index 100% rename from sysdeps/m68k/fpu/s_ccoshf.c rename to sysdeps/m68k/m680x0/fpu/s_ccoshf.c diff --git a/sysdeps/m68k/fpu/s_ccoshl.c b/sysdeps/m68k/m680x0/fpu/s_ccoshl.c similarity index 100% rename from sysdeps/m68k/fpu/s_ccoshl.c rename to sysdeps/m68k/m680x0/fpu/s_ccoshl.c diff --git a/sysdeps/m68k/fpu/s_ccosl.c b/sysdeps/m68k/m680x0/fpu/s_ccosl.c similarity index 100% rename from sysdeps/m68k/fpu/s_ccosl.c rename to sysdeps/m68k/m680x0/fpu/s_ccosl.c diff --git a/sysdeps/m68k/fpu/s_ceil.c b/sysdeps/m68k/m680x0/fpu/s_ceil.c similarity index 100% rename from sysdeps/m68k/fpu/s_ceil.c rename to sysdeps/m68k/m680x0/fpu/s_ceil.c diff --git a/sysdeps/m68k/fpu/s_ceilf.c b/sysdeps/m68k/m680x0/fpu/s_ceilf.c similarity index 100% rename from sysdeps/m68k/fpu/s_ceilf.c rename to sysdeps/m68k/m680x0/fpu/s_ceilf.c diff --git a/sysdeps/m68k/fpu/s_ceill.c b/sysdeps/m68k/m680x0/fpu/s_ceill.c similarity index 100% rename from sysdeps/m68k/fpu/s_ceill.c rename to sysdeps/m68k/m680x0/fpu/s_ceill.c diff --git a/sysdeps/m68k/fpu/s_cexp.c b/sysdeps/m68k/m680x0/fpu/s_cexp.c similarity index 100% rename from sysdeps/m68k/fpu/s_cexp.c rename to sysdeps/m68k/m680x0/fpu/s_cexp.c diff --git a/sysdeps/m68k/fpu/s_cexpf.c b/sysdeps/m68k/m680x0/fpu/s_cexpf.c similarity index 100% rename from sysdeps/m68k/fpu/s_cexpf.c rename to sysdeps/m68k/m680x0/fpu/s_cexpf.c diff --git a/sysdeps/m68k/fpu/s_cexpl.c b/sysdeps/m68k/m680x0/fpu/s_cexpl.c similarity index 100% rename from sysdeps/m68k/fpu/s_cexpl.c rename to sysdeps/m68k/m680x0/fpu/s_cexpl.c diff --git a/sysdeps/m68k/fpu/s_cos.c b/sysdeps/m68k/m680x0/fpu/s_cos.c similarity index 100% rename from sysdeps/m68k/fpu/s_cos.c rename to sysdeps/m68k/m680x0/fpu/s_cos.c diff --git a/sysdeps/m68k/fpu/s_cosf.c b/sysdeps/m68k/m680x0/fpu/s_cosf.c similarity index 100% rename from sysdeps/m68k/fpu/s_cosf.c rename to sysdeps/m68k/m680x0/fpu/s_cosf.c diff --git a/sysdeps/m68k/fpu/s_cosl.c b/sysdeps/m68k/m680x0/fpu/s_cosl.c similarity index 100% rename from sysdeps/m68k/fpu/s_cosl.c rename to sysdeps/m68k/m680x0/fpu/s_cosl.c diff --git a/sysdeps/m68k/fpu/s_csin.c b/sysdeps/m68k/m680x0/fpu/s_csin.c similarity index 100% rename from sysdeps/m68k/fpu/s_csin.c rename to sysdeps/m68k/m680x0/fpu/s_csin.c diff --git a/sysdeps/m68k/fpu/s_csinf.c b/sysdeps/m68k/m680x0/fpu/s_csinf.c similarity index 100% rename from sysdeps/m68k/fpu/s_csinf.c rename to sysdeps/m68k/m680x0/fpu/s_csinf.c diff --git a/sysdeps/m68k/fpu/s_csinh.c b/sysdeps/m68k/m680x0/fpu/s_csinh.c similarity index 100% rename from sysdeps/m68k/fpu/s_csinh.c rename to sysdeps/m68k/m680x0/fpu/s_csinh.c diff --git a/sysdeps/m68k/fpu/s_csinhf.c b/sysdeps/m68k/m680x0/fpu/s_csinhf.c similarity index 100% rename from sysdeps/m68k/fpu/s_csinhf.c rename to sysdeps/m68k/m680x0/fpu/s_csinhf.c diff --git a/sysdeps/m68k/fpu/s_csinhl.c b/sysdeps/m68k/m680x0/fpu/s_csinhl.c similarity index 100% rename from sysdeps/m68k/fpu/s_csinhl.c rename to sysdeps/m68k/m680x0/fpu/s_csinhl.c diff --git a/sysdeps/m68k/fpu/s_csinl.c b/sysdeps/m68k/m680x0/fpu/s_csinl.c similarity index 100% rename from sysdeps/m68k/fpu/s_csinl.c rename to sysdeps/m68k/m680x0/fpu/s_csinl.c diff --git a/sysdeps/m68k/fpu/s_expm1.c b/sysdeps/m68k/m680x0/fpu/s_expm1.c similarity index 100% rename from sysdeps/m68k/fpu/s_expm1.c rename to sysdeps/m68k/m680x0/fpu/s_expm1.c diff --git a/sysdeps/m68k/fpu/s_expm1f.c b/sysdeps/m68k/m680x0/fpu/s_expm1f.c similarity index 100% rename from sysdeps/m68k/fpu/s_expm1f.c rename to sysdeps/m68k/m680x0/fpu/s_expm1f.c diff --git a/sysdeps/m68k/fpu/s_expm1l.c b/sysdeps/m68k/m680x0/fpu/s_expm1l.c similarity index 100% rename from sysdeps/m68k/fpu/s_expm1l.c rename to sysdeps/m68k/m680x0/fpu/s_expm1l.c diff --git a/sysdeps/m68k/fpu/s_fabs.c b/sysdeps/m68k/m680x0/fpu/s_fabs.c similarity index 100% rename from sysdeps/m68k/fpu/s_fabs.c rename to sysdeps/m68k/m680x0/fpu/s_fabs.c diff --git a/sysdeps/m68k/fpu/s_fabsf.c b/sysdeps/m68k/m680x0/fpu/s_fabsf.c similarity index 100% rename from sysdeps/m68k/fpu/s_fabsf.c rename to sysdeps/m68k/m680x0/fpu/s_fabsf.c diff --git a/sysdeps/m68k/fpu/s_fabsl.c b/sysdeps/m68k/m680x0/fpu/s_fabsl.c similarity index 100% rename from sysdeps/m68k/fpu/s_fabsl.c rename to sysdeps/m68k/m680x0/fpu/s_fabsl.c diff --git a/sysdeps/m68k/fpu/s_finite.c b/sysdeps/m68k/m680x0/fpu/s_finite.c similarity index 100% rename from sysdeps/m68k/fpu/s_finite.c rename to sysdeps/m68k/m680x0/fpu/s_finite.c diff --git a/sysdeps/m68k/fpu/s_finitef.c b/sysdeps/m68k/m680x0/fpu/s_finitef.c similarity index 100% rename from sysdeps/m68k/fpu/s_finitef.c rename to sysdeps/m68k/m680x0/fpu/s_finitef.c diff --git a/sysdeps/m68k/fpu/s_finitel.c b/sysdeps/m68k/m680x0/fpu/s_finitel.c similarity index 100% rename from sysdeps/m68k/fpu/s_finitel.c rename to sysdeps/m68k/m680x0/fpu/s_finitel.c diff --git a/sysdeps/m68k/fpu/s_floor.c b/sysdeps/m68k/m680x0/fpu/s_floor.c similarity index 100% rename from sysdeps/m68k/fpu/s_floor.c rename to sysdeps/m68k/m680x0/fpu/s_floor.c diff --git a/sysdeps/m68k/fpu/s_floorf.c b/sysdeps/m68k/m680x0/fpu/s_floorf.c similarity index 100% rename from sysdeps/m68k/fpu/s_floorf.c rename to sysdeps/m68k/m680x0/fpu/s_floorf.c diff --git a/sysdeps/m68k/fpu/s_floorl.c b/sysdeps/m68k/m680x0/fpu/s_floorl.c similarity index 100% rename from sysdeps/m68k/fpu/s_floorl.c rename to sysdeps/m68k/m680x0/fpu/s_floorl.c diff --git a/sysdeps/m68k/fpu/s_fpclassifyl.c b/sysdeps/m68k/m680x0/fpu/s_fpclassifyl.c similarity index 100% rename from sysdeps/m68k/fpu/s_fpclassifyl.c rename to sysdeps/m68k/m680x0/fpu/s_fpclassifyl.c diff --git a/sysdeps/m68k/fpu/s_frexp.c b/sysdeps/m68k/m680x0/fpu/s_frexp.c similarity index 100% rename from sysdeps/m68k/fpu/s_frexp.c rename to sysdeps/m68k/m680x0/fpu/s_frexp.c diff --git a/sysdeps/m68k/fpu/s_frexpf.c b/sysdeps/m68k/m680x0/fpu/s_frexpf.c similarity index 100% rename from sysdeps/m68k/fpu/s_frexpf.c rename to sysdeps/m68k/m680x0/fpu/s_frexpf.c diff --git a/sysdeps/m68k/fpu/s_frexpl.c b/sysdeps/m68k/m680x0/fpu/s_frexpl.c similarity index 100% rename from sysdeps/m68k/fpu/s_frexpl.c rename to sysdeps/m68k/m680x0/fpu/s_frexpl.c diff --git a/sysdeps/m68k/fpu/s_ilogb.c b/sysdeps/m68k/m680x0/fpu/s_ilogb.c similarity index 100% rename from sysdeps/m68k/fpu/s_ilogb.c rename to sysdeps/m68k/m680x0/fpu/s_ilogb.c diff --git a/sysdeps/m68k/fpu/s_ilogbf.c b/sysdeps/m68k/m680x0/fpu/s_ilogbf.c similarity index 100% rename from sysdeps/m68k/fpu/s_ilogbf.c rename to sysdeps/m68k/m680x0/fpu/s_ilogbf.c diff --git a/sysdeps/m68k/fpu/s_ilogbl.c b/sysdeps/m68k/m680x0/fpu/s_ilogbl.c similarity index 100% rename from sysdeps/m68k/fpu/s_ilogbl.c rename to sysdeps/m68k/m680x0/fpu/s_ilogbl.c diff --git a/sysdeps/m68k/fpu/s_isinf.c b/sysdeps/m68k/m680x0/fpu/s_isinf.c similarity index 100% rename from sysdeps/m68k/fpu/s_isinf.c rename to sysdeps/m68k/m680x0/fpu/s_isinf.c diff --git a/sysdeps/m68k/fpu/s_isinff.c b/sysdeps/m68k/m680x0/fpu/s_isinff.c similarity index 100% rename from sysdeps/m68k/fpu/s_isinff.c rename to sysdeps/m68k/m680x0/fpu/s_isinff.c diff --git a/sysdeps/m68k/fpu/s_isinfl.c b/sysdeps/m68k/m680x0/fpu/s_isinfl.c similarity index 100% rename from sysdeps/m68k/fpu/s_isinfl.c rename to sysdeps/m68k/m680x0/fpu/s_isinfl.c diff --git a/sysdeps/m68k/fpu/s_isnan.c b/sysdeps/m68k/m680x0/fpu/s_isnan.c similarity index 100% rename from sysdeps/m68k/fpu/s_isnan.c rename to sysdeps/m68k/m680x0/fpu/s_isnan.c diff --git a/sysdeps/m68k/fpu/s_isnanf.c b/sysdeps/m68k/m680x0/fpu/s_isnanf.c similarity index 100% rename from sysdeps/m68k/fpu/s_isnanf.c rename to sysdeps/m68k/m680x0/fpu/s_isnanf.c diff --git a/sysdeps/m68k/fpu/s_isnanl.c b/sysdeps/m68k/m680x0/fpu/s_isnanl.c similarity index 100% rename from sysdeps/m68k/fpu/s_isnanl.c rename to sysdeps/m68k/m680x0/fpu/s_isnanl.c diff --git a/sysdeps/m68k/fpu/s_llrint.c b/sysdeps/m68k/m680x0/fpu/s_llrint.c similarity index 100% rename from sysdeps/m68k/fpu/s_llrint.c rename to sysdeps/m68k/m680x0/fpu/s_llrint.c diff --git a/sysdeps/m68k/fpu/s_llrintf.c b/sysdeps/m68k/m680x0/fpu/s_llrintf.c similarity index 100% rename from sysdeps/m68k/fpu/s_llrintf.c rename to sysdeps/m68k/m680x0/fpu/s_llrintf.c diff --git a/sysdeps/m68k/fpu/s_llrintl.c b/sysdeps/m68k/m680x0/fpu/s_llrintl.c similarity index 100% rename from sysdeps/m68k/fpu/s_llrintl.c rename to sysdeps/m68k/m680x0/fpu/s_llrintl.c diff --git a/sysdeps/m68k/fpu/s_log1p.c b/sysdeps/m68k/m680x0/fpu/s_log1p.c similarity index 100% rename from sysdeps/m68k/fpu/s_log1p.c rename to sysdeps/m68k/m680x0/fpu/s_log1p.c diff --git a/sysdeps/m68k/fpu/s_log1pf.c b/sysdeps/m68k/m680x0/fpu/s_log1pf.c similarity index 100% rename from sysdeps/m68k/fpu/s_log1pf.c rename to sysdeps/m68k/m680x0/fpu/s_log1pf.c diff --git a/sysdeps/m68k/fpu/s_log1pl.c b/sysdeps/m68k/m680x0/fpu/s_log1pl.c similarity index 100% rename from sysdeps/m68k/fpu/s_log1pl.c rename to sysdeps/m68k/m680x0/fpu/s_log1pl.c diff --git a/sysdeps/m68k/fpu/s_lrint.c b/sysdeps/m68k/m680x0/fpu/s_lrint.c similarity index 100% rename from sysdeps/m68k/fpu/s_lrint.c rename to sysdeps/m68k/m680x0/fpu/s_lrint.c diff --git a/sysdeps/m68k/fpu/s_lrintf.c b/sysdeps/m68k/m680x0/fpu/s_lrintf.c similarity index 100% rename from sysdeps/m68k/fpu/s_lrintf.c rename to sysdeps/m68k/m680x0/fpu/s_lrintf.c diff --git a/sysdeps/m68k/fpu/s_lrintl.c b/sysdeps/m68k/m680x0/fpu/s_lrintl.c similarity index 100% rename from sysdeps/m68k/fpu/s_lrintl.c rename to sysdeps/m68k/m680x0/fpu/s_lrintl.c diff --git a/sysdeps/m68k/fpu/s_modf.c b/sysdeps/m68k/m680x0/fpu/s_modf.c similarity index 100% rename from sysdeps/m68k/fpu/s_modf.c rename to sysdeps/m68k/m680x0/fpu/s_modf.c diff --git a/sysdeps/m68k/fpu/s_modff.c b/sysdeps/m68k/m680x0/fpu/s_modff.c similarity index 100% rename from sysdeps/m68k/fpu/s_modff.c rename to sysdeps/m68k/m680x0/fpu/s_modff.c diff --git a/sysdeps/m68k/fpu/s_modfl.c b/sysdeps/m68k/m680x0/fpu/s_modfl.c similarity index 100% rename from sysdeps/m68k/fpu/s_modfl.c rename to sysdeps/m68k/m680x0/fpu/s_modfl.c diff --git a/sysdeps/m68k/fpu/s_nearbyint.c b/sysdeps/m68k/m680x0/fpu/s_nearbyint.c similarity index 100% rename from sysdeps/m68k/fpu/s_nearbyint.c rename to sysdeps/m68k/m680x0/fpu/s_nearbyint.c diff --git a/sysdeps/m68k/fpu/s_nearbyintf.c b/sysdeps/m68k/m680x0/fpu/s_nearbyintf.c similarity index 100% rename from sysdeps/m68k/fpu/s_nearbyintf.c rename to sysdeps/m68k/m680x0/fpu/s_nearbyintf.c diff --git a/sysdeps/m68k/fpu/s_nearbyintl.c b/sysdeps/m68k/m680x0/fpu/s_nearbyintl.c similarity index 100% rename from sysdeps/m68k/fpu/s_nearbyintl.c rename to sysdeps/m68k/m680x0/fpu/s_nearbyintl.c diff --git a/sysdeps/m68k/fpu/s_nextafterl.c b/sysdeps/m68k/m680x0/fpu/s_nextafterl.c similarity index 100% rename from sysdeps/m68k/fpu/s_nextafterl.c rename to sysdeps/m68k/m680x0/fpu/s_nextafterl.c diff --git a/sysdeps/m68k/fpu/s_remquo.c b/sysdeps/m68k/m680x0/fpu/s_remquo.c similarity index 100% rename from sysdeps/m68k/fpu/s_remquo.c rename to sysdeps/m68k/m680x0/fpu/s_remquo.c diff --git a/sysdeps/m68k/fpu/s_remquof.c b/sysdeps/m68k/m680x0/fpu/s_remquof.c similarity index 100% rename from sysdeps/m68k/fpu/s_remquof.c rename to sysdeps/m68k/m680x0/fpu/s_remquof.c diff --git a/sysdeps/m68k/fpu/s_remquol.c b/sysdeps/m68k/m680x0/fpu/s_remquol.c similarity index 100% rename from sysdeps/m68k/fpu/s_remquol.c rename to sysdeps/m68k/m680x0/fpu/s_remquol.c diff --git a/sysdeps/m68k/fpu/s_rint.c b/sysdeps/m68k/m680x0/fpu/s_rint.c similarity index 100% rename from sysdeps/m68k/fpu/s_rint.c rename to sysdeps/m68k/m680x0/fpu/s_rint.c diff --git a/sysdeps/m68k/fpu/s_rintf.c b/sysdeps/m68k/m680x0/fpu/s_rintf.c similarity index 100% rename from sysdeps/m68k/fpu/s_rintf.c rename to sysdeps/m68k/m680x0/fpu/s_rintf.c diff --git a/sysdeps/m68k/fpu/s_rintl.c b/sysdeps/m68k/m680x0/fpu/s_rintl.c similarity index 100% rename from sysdeps/m68k/fpu/s_rintl.c rename to sysdeps/m68k/m680x0/fpu/s_rintl.c diff --git a/sysdeps/m68k/fpu/s_scalbln.c b/sysdeps/m68k/m680x0/fpu/s_scalbln.c similarity index 100% rename from sysdeps/m68k/fpu/s_scalbln.c rename to sysdeps/m68k/m680x0/fpu/s_scalbln.c diff --git a/sysdeps/m68k/fpu/s_scalblnf.c b/sysdeps/m68k/m680x0/fpu/s_scalblnf.c similarity index 100% rename from sysdeps/m68k/fpu/s_scalblnf.c rename to sysdeps/m68k/m680x0/fpu/s_scalblnf.c diff --git a/sysdeps/m68k/fpu/s_scalblnl.c b/sysdeps/m68k/m680x0/fpu/s_scalblnl.c similarity index 100% rename from sysdeps/m68k/fpu/s_scalblnl.c rename to sysdeps/m68k/m680x0/fpu/s_scalblnl.c diff --git a/sysdeps/m68k/fpu/s_scalbn.c b/sysdeps/m68k/m680x0/fpu/s_scalbn.c similarity index 100% rename from sysdeps/m68k/fpu/s_scalbn.c rename to sysdeps/m68k/m680x0/fpu/s_scalbn.c diff --git a/sysdeps/m68k/fpu/s_scalbnf.c b/sysdeps/m68k/m680x0/fpu/s_scalbnf.c similarity index 100% rename from sysdeps/m68k/fpu/s_scalbnf.c rename to sysdeps/m68k/m680x0/fpu/s_scalbnf.c diff --git a/sysdeps/m68k/fpu/s_scalbnl.c b/sysdeps/m68k/m680x0/fpu/s_scalbnl.c similarity index 100% rename from sysdeps/m68k/fpu/s_scalbnl.c rename to sysdeps/m68k/m680x0/fpu/s_scalbnl.c diff --git a/sysdeps/m68k/fpu/s_significand.c b/sysdeps/m68k/m680x0/fpu/s_significand.c similarity index 100% rename from sysdeps/m68k/fpu/s_significand.c rename to sysdeps/m68k/m680x0/fpu/s_significand.c diff --git a/sysdeps/m68k/fpu/s_significandf.c b/sysdeps/m68k/m680x0/fpu/s_significandf.c similarity index 100% rename from sysdeps/m68k/fpu/s_significandf.c rename to sysdeps/m68k/m680x0/fpu/s_significandf.c diff --git a/sysdeps/m68k/fpu/s_significandl.c b/sysdeps/m68k/m680x0/fpu/s_significandl.c similarity index 100% rename from sysdeps/m68k/fpu/s_significandl.c rename to sysdeps/m68k/m680x0/fpu/s_significandl.c diff --git a/sysdeps/m68k/fpu/s_sin.c b/sysdeps/m68k/m680x0/fpu/s_sin.c similarity index 100% rename from sysdeps/m68k/fpu/s_sin.c rename to sysdeps/m68k/m680x0/fpu/s_sin.c diff --git a/sysdeps/m68k/fpu/s_sincos.c b/sysdeps/m68k/m680x0/fpu/s_sincos.c similarity index 100% rename from sysdeps/m68k/fpu/s_sincos.c rename to sysdeps/m68k/m680x0/fpu/s_sincos.c diff --git a/sysdeps/m68k/fpu/s_sincosf.c b/sysdeps/m68k/m680x0/fpu/s_sincosf.c similarity index 100% rename from sysdeps/m68k/fpu/s_sincosf.c rename to sysdeps/m68k/m680x0/fpu/s_sincosf.c diff --git a/sysdeps/m68k/fpu/s_sincosl.c b/sysdeps/m68k/m680x0/fpu/s_sincosl.c similarity index 100% rename from sysdeps/m68k/fpu/s_sincosl.c rename to sysdeps/m68k/m680x0/fpu/s_sincosl.c diff --git a/sysdeps/m68k/fpu/s_sinf.c b/sysdeps/m68k/m680x0/fpu/s_sinf.c similarity index 100% rename from sysdeps/m68k/fpu/s_sinf.c rename to sysdeps/m68k/m680x0/fpu/s_sinf.c diff --git a/sysdeps/m68k/fpu/s_sinl.c b/sysdeps/m68k/m680x0/fpu/s_sinl.c similarity index 100% rename from sysdeps/m68k/fpu/s_sinl.c rename to sysdeps/m68k/m680x0/fpu/s_sinl.c diff --git a/sysdeps/m68k/fpu/s_tan.c b/sysdeps/m68k/m680x0/fpu/s_tan.c similarity index 100% rename from sysdeps/m68k/fpu/s_tan.c rename to sysdeps/m68k/m680x0/fpu/s_tan.c diff --git a/sysdeps/m68k/fpu/s_tanf.c b/sysdeps/m68k/m680x0/fpu/s_tanf.c similarity index 100% rename from sysdeps/m68k/fpu/s_tanf.c rename to sysdeps/m68k/m680x0/fpu/s_tanf.c diff --git a/sysdeps/m68k/fpu/s_tanh.c b/sysdeps/m68k/m680x0/fpu/s_tanh.c similarity index 100% rename from sysdeps/m68k/fpu/s_tanh.c rename to sysdeps/m68k/m680x0/fpu/s_tanh.c diff --git a/sysdeps/m68k/fpu/s_tanhf.c b/sysdeps/m68k/m680x0/fpu/s_tanhf.c similarity index 100% rename from sysdeps/m68k/fpu/s_tanhf.c rename to sysdeps/m68k/m680x0/fpu/s_tanhf.c diff --git a/sysdeps/m68k/fpu/s_tanhl.c b/sysdeps/m68k/m680x0/fpu/s_tanhl.c similarity index 100% rename from sysdeps/m68k/fpu/s_tanhl.c rename to sysdeps/m68k/m680x0/fpu/s_tanhl.c diff --git a/sysdeps/m68k/fpu/s_tanl.c b/sysdeps/m68k/m680x0/fpu/s_tanl.c similarity index 100% rename from sysdeps/m68k/fpu/s_tanl.c rename to sysdeps/m68k/m680x0/fpu/s_tanl.c diff --git a/sysdeps/m68k/fpu/s_trunc.c b/sysdeps/m68k/m680x0/fpu/s_trunc.c similarity index 100% rename from sysdeps/m68k/fpu/s_trunc.c rename to sysdeps/m68k/m680x0/fpu/s_trunc.c diff --git a/sysdeps/m68k/fpu/s_truncf.c b/sysdeps/m68k/m680x0/fpu/s_truncf.c similarity index 100% rename from sysdeps/m68k/fpu/s_truncf.c rename to sysdeps/m68k/m680x0/fpu/s_truncf.c diff --git a/sysdeps/m68k/fpu/s_truncl.c b/sysdeps/m68k/m680x0/fpu/s_truncl.c similarity index 100% rename from sysdeps/m68k/fpu/s_truncl.c rename to sysdeps/m68k/m680x0/fpu/s_truncl.c diff --git a/sysdeps/m68k/fpu/sincos32.c b/sysdeps/m68k/m680x0/fpu/sincos32.c similarity index 100% rename from sysdeps/m68k/fpu/sincos32.c rename to sysdeps/m68k/m680x0/fpu/sincos32.c diff --git a/sysdeps/m68k/fpu/slowexp.c b/sysdeps/m68k/m680x0/fpu/slowexp.c similarity index 100% rename from sysdeps/m68k/fpu/slowexp.c rename to sysdeps/m68k/m680x0/fpu/slowexp.c diff --git a/sysdeps/m68k/fpu/slowpow.c b/sysdeps/m68k/m680x0/fpu/slowpow.c similarity index 100% rename from sysdeps/m68k/fpu/slowpow.c rename to sysdeps/m68k/m680x0/fpu/slowpow.c diff --git a/sysdeps/m68k/fpu/switch/68881-sw.h b/sysdeps/m68k/m680x0/fpu/switch/68881-sw.h similarity index 100% rename from sysdeps/m68k/fpu/switch/68881-sw.h rename to sysdeps/m68k/m680x0/fpu/switch/68881-sw.h diff --git a/sysdeps/m68k/fpu/switch/Makefile b/sysdeps/m68k/m680x0/fpu/switch/Makefile similarity index 100% rename from sysdeps/m68k/fpu/switch/Makefile rename to sysdeps/m68k/m680x0/fpu/switch/Makefile diff --git a/sysdeps/m68k/fpu/switch/bits/mathinline.h b/sysdeps/m68k/m680x0/fpu/switch/bits/mathinline.h similarity index 100% rename from sysdeps/m68k/fpu/switch/bits/mathinline.h rename to sysdeps/m68k/m680x0/fpu/switch/bits/mathinline.h diff --git a/sysdeps/m68k/fpu/switch/switch.c b/sysdeps/m68k/m680x0/fpu/switch/switch.c similarity index 100% rename from sysdeps/m68k/fpu/switch/switch.c rename to sysdeps/m68k/m680x0/fpu/switch/switch.c diff --git a/sysdeps/m68k/fpu/t_exp.c b/sysdeps/m68k/m680x0/fpu/t_exp.c similarity index 100% rename from sysdeps/m68k/fpu/t_exp.c rename to sysdeps/m68k/m680x0/fpu/t_exp.c diff --git a/sysdeps/m68k/lshift.S b/sysdeps/m68k/m680x0/lshift.S similarity index 100% rename from sysdeps/m68k/lshift.S rename to sysdeps/m68k/m680x0/lshift.S diff --git a/sysdeps/m68k/m68020/Makefile b/sysdeps/m68k/m680x0/m68020/Makefile similarity index 100% rename from sysdeps/m68k/m68020/Makefile rename to sysdeps/m68k/m680x0/m68020/Makefile diff --git a/sysdeps/m68k/m68020/addmul_1.S b/sysdeps/m68k/m680x0/m68020/addmul_1.S similarity index 100% rename from sysdeps/m68k/m68020/addmul_1.S rename to sysdeps/m68k/m680x0/m68020/addmul_1.S diff --git a/sysdeps/m68k/m68020/bits/atomic.h b/sysdeps/m68k/m680x0/m68020/bits/atomic.h similarity index 100% rename from sysdeps/m68k/m68020/bits/atomic.h rename to sysdeps/m68k/m680x0/m68020/bits/atomic.h diff --git a/sysdeps/m68k/m68020/bits/string.h b/sysdeps/m68k/m680x0/m68020/bits/string.h similarity index 100% rename from sysdeps/m68k/m68020/bits/string.h rename to sysdeps/m68k/m680x0/m68020/bits/string.h diff --git a/sysdeps/m68k/m68020/mul_1.S b/sysdeps/m68k/m680x0/m68020/mul_1.S similarity index 100% rename from sysdeps/m68k/m68020/mul_1.S rename to sysdeps/m68k/m680x0/m68020/mul_1.S diff --git a/sysdeps/m68k/m68020/submul_1.S b/sysdeps/m68k/m680x0/m68020/submul_1.S similarity index 100% rename from sysdeps/m68k/m68020/submul_1.S rename to sysdeps/m68k/m680x0/m68020/submul_1.S diff --git a/sysdeps/m68k/m68020/wordcopy.S b/sysdeps/m68k/m680x0/m68020/wordcopy.S similarity index 100% rename from sysdeps/m68k/m68020/wordcopy.S rename to sysdeps/m68k/m680x0/m68020/wordcopy.S diff --git a/sysdeps/m68k/printf_fphex.c b/sysdeps/m68k/m680x0/printf_fphex.c similarity index 100% rename from sysdeps/m68k/printf_fphex.c rename to sysdeps/m68k/m680x0/printf_fphex.c diff --git a/sysdeps/m68k/rshift.S b/sysdeps/m68k/m680x0/rshift.S similarity index 100% rename from sysdeps/m68k/rshift.S rename to sysdeps/m68k/m680x0/rshift.S diff --git a/sysdeps/m68k/s_isinfl.c b/sysdeps/m68k/m680x0/s_isinfl.c similarity index 100% rename from sysdeps/m68k/s_isinfl.c rename to sysdeps/m68k/m680x0/s_isinfl.c diff --git a/sysdeps/m68k/s_isnanl.c b/sysdeps/m68k/m680x0/s_isnanl.c similarity index 100% rename from sysdeps/m68k/s_isnanl.c rename to sysdeps/m68k/m680x0/s_isnanl.c diff --git a/sysdeps/m68k/strtold_l.c b/sysdeps/m68k/m680x0/strtold_l.c similarity index 100% rename from sysdeps/m68k/strtold_l.c rename to sysdeps/m68k/m680x0/strtold_l.c diff --git a/sysdeps/m68k/sub_n.S b/sysdeps/m68k/m680x0/sub_n.S similarity index 100% rename from sysdeps/m68k/sub_n.S rename to sysdeps/m68k/m680x0/sub_n.S diff --git a/sysdeps/m68k/memchr.S b/sysdeps/m68k/memchr.S index fab65a9aea..77e86a32bd 100644 --- a/sysdeps/m68k/memchr.S +++ b/sysdeps/m68k/memchr.S @@ -26,7 +26,13 @@ TEXT ENTRY(__memchr) /* Save the callee-saved registers we use. */ +#ifdef __mcoldfire__ + movel R(d2),MEM_PREDEC(sp) + movel R(d3),MEM_PREDEC(sp) + movel R(d4),MEM_PREDEC(sp) +#else moveml R(d2)-R(d4),MEM_PREDEC(sp) +#endif /* Get string pointer, character and length. */ movel MEM_DISP(sp,16),R(a0) @@ -34,9 +40,15 @@ ENTRY(__memchr) movel MEM_DISP(sp,24),R(d4) /* Check if at least four bytes left to search. */ +#ifdef __mcoldfire__ + subql #4,R(d4) + bcs L(L6) + addql #4,R(d4) +#else moveql #4,R(d1) cmpl R(d1),R(d4) bcs L(L6) +#endif /* Distribute the character to all bytes of a longword. */ movel R(d0),R(d1) @@ -49,7 +61,11 @@ ENTRY(__memchr) /* First search for the character one byte at a time until the pointer is aligned to a longword boundary. */ movel R(a0),R(d1) +#ifdef __mcoldfire__ + andl #3,R(d1) +#else andw #3,R(d1) +#endif beq L(L1) cmpb MEM(a0),R(d0) beq L(L9) @@ -57,8 +73,11 @@ ENTRY(__memchr) subql #1,R(d4) beq L(L7) - movel R(a0),R(d1) - andw #3,R(d1) +#ifdef __mcoldfire__ + subql #3,R(d1) +#else + subqw #3,R(d1) +#endif beq L(L1) cmpb MEM(a0),R(d0) beq L(L9) @@ -66,8 +85,11 @@ ENTRY(__memchr) subql #1,R(d4) beq L(L7) - movel R(a0),R(d1) - andw #3,R(d1) +#ifdef __mcoldfire__ + addql #1,R(d1) +#else + addqw #1,R(d1) +#endif beq L(L1) cmpb MEM(a0),R(d0) beq L(L9) @@ -177,19 +199,31 @@ L(L2:) L(L6:) /* Search one byte at a time in the remaining less than 4 bytes. */ +#ifdef __mcoldfire__ + addql #4,R(d4) +#else andw #3,R(d4) +#endif beq L(L7) cmpb MEM(a0),R(d0) beq L(L9) addql #1,R(a0) +#ifdef __mcoldfire__ + subql #1,R(d4) +#else subqw #1,R(d4) +#endif beq L(L7) cmpb MEM(a0),R(d0) beq L(L9) addql #1,R(a0) +#ifdef __mcoldfire__ + subql #1,R(d4) +#else subqw #1,R(d4) +#endif beq L(L7) cmpb MEM(a0),R(d0) beq L(L9) @@ -198,7 +232,13 @@ L(L7:) /* Return NULL. */ clrl R(d0) movel R(d0),R(a0) +#ifdef __mcoldfire__ + movel MEM_POSTINC(sp),R(d4) + movel MEM_POSTINC(sp),R(d3) + movel MEM_POSTINC(sp),R(d2) +#else moveml MEM_POSTINC(sp),R(d2)-R(d4) +#endif rts L(L8:) @@ -221,7 +261,13 @@ L(L8:) /* Otherwise the fourth byte must equal C. */ L(L9:) movel R(a0),R(d0) +#ifdef __mcoldfire__ + movel MEM_POSTINC(sp),R(d4) + movel MEM_POSTINC(sp),R(d3) + movel MEM_POSTINC(sp),R(d2) +#else moveml MEM_POSTINC(sp),R(d2)-R(d4) +#endif rts END(__memchr) diff --git a/sysdeps/m68k/preconfigure b/sysdeps/m68k/preconfigure index 35dcea4be1..94fc1aabc2 100644 --- a/sysdeps/m68k/preconfigure +++ b/sysdeps/m68k/preconfigure @@ -1,6 +1,17 @@ # This fragment canonicalizes the machine names for m68k variants. case "$machine" in -m680?0) base_machine=m68k machine=m68k/$machine ;; -m68k) base_machine=m68k machine=m68k/m68020 ;; +m680?0) base_machine=m68k machine=m68k/m680x0/$machine ;; +m68k) variant=`(echo "#ifdef __mcoldfire__" + echo "coldfire" + echo "#else" + echo "m680x0/m68020" + echo "#endif") | + $CC $CFLAGS $CPPFLAGS -E - | + grep '^[a-z]'` + if test -z "$variant"; then + echo >&2 "Cannot determine m68k processor variant" + exit 1 + fi + base_machine=m68k machine=m68k/$variant ;; esac diff --git a/sysdeps/m68k/rawmemchr.S b/sysdeps/m68k/rawmemchr.S index acd8f76e44..97735f669d 100644 --- a/sysdeps/m68k/rawmemchr.S +++ b/sysdeps/m68k/rawmemchr.S @@ -43,21 +43,31 @@ ENTRY(__rawmemchr) /* First search for the character one byte at a time until the pointer is aligned to a longword boundary. */ movel R(a0),R(d1) +#ifdef __mcoldfire__ + andl #3,R(d1) +#else andw #3,R(d1) +#endif beq L(L1) cmpb MEM(a0),R(d0) beq L(L9) addql #1,R(a0) - movel R(a0),R(d1) - andw #3,R(d1) +#ifdef __mcoldfire__ + subql #3,R(d1) +#else + subqw #3,R(d1) +#endif beq L(L1) cmpb MEM(a0),R(d0) beq L(L9) addql #1,R(a0) - movel R(a0),R(d1) - andw #3,R(d1) +#ifdef __mcoldfire__ + addql #1,R(d1) +#else + addqw #1,R(d1) +#endif beq L(L1) cmpb MEM(a0),R(d0) beq L(L9) diff --git a/sysdeps/m68k/setjmp.c b/sysdeps/m68k/setjmp.c index 8a6c3f9a0b..e2ba0e700d 100644 --- a/sysdeps/m68k/setjmp.c +++ b/sysdeps/m68k/setjmp.c @@ -53,11 +53,14 @@ __sigsetjmp (jmp_buf env, int savemask) /* Save floating-point (68881) registers FP0 through FP7. */ asm volatile ("fmovem%.x %/fp0-%/fp7, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[0])); +#elif defined (__mcffpu__) + asm volatile ("fmovem %/fp0-%/fp7, %0" + : : "m" (env[0].__jmpbuf[0].__fpregs[0])); #endif /* Save the signal mask if requested. */ return __sigjmp_save (env, savemask); } #if !defined BSD_SETJMP && !defined BSD__SETJMP -hidden_def (__sigsetjmp) +libc_hidden_def (__sigsetjmp) #endif diff --git a/sysdeps/m68k/strchr.S b/sysdeps/m68k/strchr.S index 04626ffd64..2e1e3249f6 100644 --- a/sysdeps/m68k/strchr.S +++ b/sysdeps/m68k/strchr.S @@ -43,32 +43,42 @@ ENTRY(strchr) /* First search for the character one byte at a time until the pointer is aligned to a longword boundary. */ movel R(a0),R(d1) +#ifdef __mcoldfire__ + andl #3,R(d1) +#else andw #3,R(d1) +#endif beq L(L1) - moveb MEM(a0),R(d1) - cmpb R(d0),R(d1) + moveb MEM(a0),R(d2) + cmpb R(d0),R(d2) beq L(L9) - tstb R(d1) + tstb R(d2) beq L(L3) addql #1,R(a0) - movel R(a0),R(d1) - andw #3,R(d1) +#ifdef __mcoldfire__ + subql #3,R(d1) +#else + subqw #3,R(d1) +#endif beq L(L1) - moveb MEM(a0),R(d1) - cmpb R(d0),R(d1) + moveb MEM(a0),R(d2) + cmpb R(d0),R(d2) beq L(L9) - tstb R(d1) + tstb R(d2) beq L(L3) addql #1,R(a0) - movel R(a0),R(d1) - andw #3,R(d1) +#ifdef __mcoldfire__ + addql #1,R(d1) +#else + addqw #1,R(d1) +#endif beq L(L1) - moveb MEM(a0),R(d1) - cmpb R(d0),R(d1) + moveb MEM(a0),R(d2) + cmpb R(d0),R(d2) beq L(L9) - tstb R(d1) + tstb R(d2) beq L(L3) addql #1,R(a0) diff --git a/sysdeps/m68k/strchrnul.S b/sysdeps/m68k/strchrnul.S index 3fee2b236c..9d13ec16a0 100644 --- a/sysdeps/m68k/strchrnul.S +++ b/sysdeps/m68k/strchrnul.S @@ -44,32 +44,42 @@ ENTRY(__strchrnul) /* First search for the character one byte at a time until the pointer is aligned to a longword boundary. */ movel R(a0),R(d1) +#ifdef __mcoldfire__ + andl #3,R(d1) +#else andw #3,R(d1) +#endif beq L(L1) - moveb MEM(a0),R(d1) - cmpb R(d0),R(d1) + moveb MEM(a0),R(d2) + cmpb R(d0),R(d2) beq L(L9) - tstb R(d1) + tstb R(d2) beq L(L9) addql #1,R(a0) - movel R(a0),R(d1) - andw #3,R(d1) +#ifdef __mcoldfire__ + subql #3,R(d1) +#else + subqw #3,R(d1) +#endif beq L(L1) - moveb MEM(a0),R(d1) - cmpb R(d0),R(d1) + moveb MEM(a0),R(d2) + cmpb R(d0),R(d2) beq L(L9) - tstb R(d1) + tstb R(d2) beq L(L9) addql #1,R(a0) - movel R(a0),R(d1) - andw #3,R(d1) +#ifdef __mcoldfire__ + addql #1,R(d1) +#else + addqw #1,R(d1) +#endif beq L(L1) - moveb MEM(a0),R(d1) - cmpb R(d0),R(d1) + moveb MEM(a0),R(d2) + cmpb R(d0),R(d2) beq L(L9) - tstb R(d1) + tstb R(d2) beq L(L9) addql #1,R(a0) diff --git a/sysdeps/m68k/sysdep.h b/sysdeps/m68k/sysdep.h index f492ff617c..3698628c30 100644 --- a/sysdeps/m68k/sysdep.h +++ b/sysdeps/m68k/sysdep.h @@ -97,4 +97,26 @@ # define JUMPTARGET(name) name # endif +/* Perform operation OP with PC-relative SRC as the first operand and + DST as the second. TMP is available as a temporary if needed. */ +#ifdef __mcoldfire__ +#define PCREL_OP(OP, SRC, DST, TMP) \ + move.l &SRC - ., TMP; OP (-8, %pc, TMP), DST +#else +#define PCREL_OP(OP, SRC, DST, TMP) \ + OP SRC(%pc), DST +#endif + +#else + +/* As above, but PC is the spelling of the PC register. We need this + so that the macro can be used in both normal and extended asms. */ +#ifdef __mcoldfire__ +#define PCREL_OP(OP, SRC, DST, TMP, PC) \ + "move.l #" SRC " - ., " TMP "\n\t" OP " (-8, " PC ", " TMP "), " DST +#else +#define PCREL_OP(OP, SRC, DST, TMP, PC) \ + OP " " SRC "(" PC "), " DST +#endif + #endif /* __ASSEMBLER__ */ diff --git a/sysdeps/m68k/tst-audit.h b/sysdeps/m68k/tst-audit.h new file mode 100644 index 0000000000..5254ab3b12 --- /dev/null +++ b/sysdeps/m68k/tst-audit.h @@ -0,0 +1,25 @@ +/* Definitions for testing PLT entry/exit auditing. m68k version. + Copyright (C) 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 + 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. */ + +#define pltenter la_m68k_gnu_pltenter +#define pltexit la_m68k_gnu_pltexit +#define La_regs La_m68k_regs +#define La_retval La_m68k_retval +#define int_retval lrv_d0 diff --git a/sysdeps/m68k/wcpcpy.c b/sysdeps/m68k/wcpcpy.c new file mode 100644 index 0000000000..c838af1fd5 --- /dev/null +++ b/sysdeps/m68k/wcpcpy.c @@ -0,0 +1,37 @@ +/* Copyright (C) 1996, 1997, 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1996. + + 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. */ + +/* The generic version of this file assumes that __alignof__(wchar_t) == + sizeof (wchar_t). We therefore use this port-specific implementation + instead. */ +#include + +/* Copy SRC to DEST, returning the address of the terminating L'\0' in + DEST. */ +wchar_t * +__wcpcpy (wchar_t *dest, const wchar_t *src) +{ + do + ; + while ((*dest++ = *src++)); + + return dest - 1; +} + +weak_alias (__wcpcpy, wcpcpy) diff --git a/sysdeps/m68k/wcpcpy_chk.c b/sysdeps/m68k/wcpcpy_chk.c new file mode 100644 index 0000000000..525c1d5baa --- /dev/null +++ b/sysdeps/m68k/wcpcpy_chk.c @@ -0,0 +1,36 @@ +/* Copyright (C) 1996, 1997, 2005, 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1996. + + 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. */ + +/* The generic version of this file assumes that __alignof__(wchar_t) == + sizeof (wchar_t). We therefore use this port-specific implementation + instead. */ +#include + +/* Copy SRC to DEST, returning the address of the terminating L'\0' in + DEST. Check for overflows. */ +wchar_t * +__wcpcpy_chk (wchar_t *dest, const wchar_t *src, size_t destlen) +{ + do + if (destlen-- == 0) + __chk_fail (); + while ((*dest++ = *src++)); + + return dest - 1; +} diff --git a/sysdeps/unix/sysv/linux/m68k/bits/sigcontext.h b/sysdeps/unix/sysv/linux/m68k/bits/sigcontext.h new file mode 100644 index 0000000000..8ad0c96563 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/bits/sigcontext.h @@ -0,0 +1,62 @@ +/* Copyright (C) 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 + 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. */ + +#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H +# error "Never use directly; include instead." +#endif + +#ifndef _BITS_SIGCONTEXT_H +#define _BITS_SIGCONTEXT_H 1 + +struct sigcontext { + unsigned long sc_mask; + unsigned long sc_usp; + unsigned long sc_d0; + unsigned long sc_d1; +#ifdef __mcoldfire__ + unsigned long sc_d2; + unsigned long sc_d3; + unsigned long sc_d4; + unsigned long sc_d5; + unsigned long sc_d6; + unsigned long sc_d7; +#endif + unsigned long sc_a0; + unsigned long sc_a1; +#ifdef __mcoldfire__ + unsigned long sc_a2; + unsigned long sc_a3; + unsigned long sc_a4; + unsigned long sc_a5; + unsigned long sc_a6; +#endif + unsigned short sc_sr; + unsigned long sc_pc; + unsigned short sc_formatvec; +#ifdef __mcoldfire__ + unsigned long sc_fpregs[8][2]; + unsigned long sc_fpcntl[3]; + unsigned char sc_fpstate[16]; +#else + unsigned long sc_fpregs[2*3]; + unsigned long sc_fpcntl[3]; + unsigned char sc_fpstate[216]; +#endif +}; + +#endif diff --git a/sysdeps/unix/sysv/linux/m68k/bits/siginfo.h b/sysdeps/unix/sysv/linux/m68k/bits/siginfo.h new file mode 100644 index 0000000000..1ded1c2a4a --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/bits/siginfo.h @@ -0,0 +1,316 @@ +/* siginfo_t, sigevent and constants. m68k linux version. + Copyright (C) 1997-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. */ + +#if !defined _SIGNAL_H && !defined __need_siginfo_t \ + && !defined __need_sigevent_t +# error "Never include this file directly. Use instead" +#endif + +#include + +#if (!defined __have_sigval_t \ + && (defined _SIGNAL_H || defined __need_siginfo_t \ + || defined __need_sigevent_t)) +# define __have_sigval_t 1 + +/* Type for data associated with a signal. */ +typedef union sigval + { + int sival_int; + void *sival_ptr; + } sigval_t; +#endif + +#if (!defined __have_siginfo_t \ + && (defined _SIGNAL_H || defined __need_siginfo_t)) +# define __have_siginfo_t 1 + +# define __SI_MAX_SIZE 128 +# if __WORDSIZE == 64 +# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 4) +# else +# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3) +# endif + +typedef struct siginfo + { + int si_signo; /* Signal number. */ + int si_errno; /* If non-zero, an errno value associated with + this signal, as defined in . */ + int si_code; /* Signal code. */ + + union + { + int _pad[__SI_PAD_SIZE]; + + /* kill(). */ + struct + { + __pid_t si_pid; /* Sending process ID. */ + unsigned short __pad; /* 16-bit version of si_uid. */ + __uid_t si_uid; /* Real user ID of sending process. */ + } _kill; + + /* POSIX.1b timers. */ + struct + { + int si_tid; /* Timer ID. */ + int si_overrun; /* Overrun count. */ + sigval_t si_sigval; /* Signal value. */ + } _timer; + + /* POSIX.1b signals. */ + struct + { + __pid_t si_pid; /* Sending process ID. */ + unsigned short __pad; /* 16-bit version of si_uid. */ + sigval_t si_sigval; /* Signal value. */ + __uid_t si_uid; /* Real user ID of sending process. */ + } _rt; + + /* SIGCHLD. */ + struct + { + __pid_t si_pid; /* Which child. */ + unsigned short __pad; /* 16-bit version of si_uid. */ + int si_status; /* Exit value or signal. */ + __clock_t si_utime; + __clock_t si_stime; + __uid_t si_uid; /* Real user ID of sending process. */ + } _sigchld; + + /* SIGILL, SIGFPE, SIGSEGV, SIGBUS. */ + struct + { + void *si_addr; /* Faulting insn/memory ref. */ + } _sigfault; + + /* SIGPOLL. */ + struct + { + long int si_band; /* Band event for SIGPOLL. */ + int si_fd; + } _sigpoll; + } _sifields; + } siginfo_t; + + +/* X/Open requires some more fields with fixed names. */ +# define si_pid _sifields._kill.si_pid +# define si_uid _sifields._kill.si_uid +# define si_timerid _sifields._timer.si_tid +# define si_overrun _sifields._timer.si_overrun +# define si_status _sifields._sigchld.si_status +# define si_utime _sifields._sigchld.si_utime +# define si_stime _sifields._sigchld.si_stime +# define si_value _sifields._rt.si_sigval +# define si_int _sifields._rt.si_sigval.sival_int +# define si_ptr _sifields._rt.si_sigval.sival_ptr +# define si_addr _sifields._sigfault.si_addr +# define si_band _sifields._sigpoll.si_band +# define si_fd _sifields._sigpoll.si_fd + + +/* Values for `si_code'. Positive values are reserved for kernel-generated + signals. */ +enum +{ + SI_ASYNCNL = -60, /* Sent by asynch name lookup completion. */ +# define SI_ASYNCNL SI_ASYNCNL + SI_TKILL = -6, /* Sent by tkill. */ +# define SI_TKILL SI_TKILL + SI_SIGIO, /* Sent by queued SIGIO. */ +# define SI_SIGIO SI_SIGIO + SI_ASYNCIO, /* Sent by AIO completion. */ +# define SI_ASYNCIO SI_ASYNCIO + SI_MESGQ, /* Sent by real time mesq state change. */ +# define SI_MESGQ SI_MESGQ + SI_TIMER, /* Sent by timer expiration. */ +# define SI_TIMER SI_TIMER + SI_QUEUE, /* Sent by sigqueue. */ +# define SI_QUEUE SI_QUEUE + SI_USER, /* Sent by kill, sigsend, raise. */ +# define SI_USER SI_USER + SI_KERNEL = 0x80 /* Send by kernel. */ +#define SI_KERNEL SI_KERNEL +}; + + +/* `si_code' values for SIGILL signal. */ +enum +{ + ILL_ILLOPC = 1, /* Illegal opcode. */ +# define ILL_ILLOPC ILL_ILLOPC + ILL_ILLOPN, /* Illegal operand. */ +# define ILL_ILLOPN ILL_ILLOPN + ILL_ILLADR, /* Illegal addressing mode. */ +# define ILL_ILLADR ILL_ILLADR + ILL_ILLTRP, /* Illegal trap. */ +# define ILL_ILLTRP ILL_ILLTRP + ILL_PRVOPC, /* Privileged opcode. */ +# define ILL_PRVOPC ILL_PRVOPC + ILL_PRVREG, /* Privileged register. */ +# define ILL_PRVREG ILL_PRVREG + ILL_COPROC, /* Coprocessor error. */ +# define ILL_COPROC ILL_COPROC + ILL_BADSTK /* Internal stack error. */ +# define ILL_BADSTK ILL_BADSTK +}; + +/* `si_code' values for SIGFPE signal. */ +enum +{ + FPE_INTDIV = 1, /* Integer divide by zero. */ +# define FPE_INTDIV FPE_INTDIV + FPE_INTOVF, /* Integer overflow. */ +# define FPE_INTOVF FPE_INTOVF + FPE_FLTDIV, /* Floating point divide by zero. */ +# define FPE_FLTDIV FPE_FLTDIV + FPE_FLTOVF, /* Floating point overflow. */ +# define FPE_FLTOVF FPE_FLTOVF + FPE_FLTUND, /* Floating point underflow. */ +# define FPE_FLTUND FPE_FLTUND + FPE_FLTRES, /* Floating point inexact result. */ +# define FPE_FLTRES FPE_FLTRES + FPE_FLTINV, /* Floating point invalid operation. */ +# define FPE_FLTINV FPE_FLTINV + FPE_FLTSUB /* Subscript out of range. */ +# define FPE_FLTSUB FPE_FLTSUB +}; + +/* `si_code' values for SIGSEGV signal. */ +enum +{ + SEGV_MAPERR = 1, /* Address not mapped to object. */ +# define SEGV_MAPERR SEGV_MAPERR + SEGV_ACCERR /* Invalid permissions for mapped object. */ +# define SEGV_ACCERR SEGV_ACCERR +}; + +/* `si_code' values for SIGBUS signal. */ +enum +{ + BUS_ADRALN = 1, /* Invalid address alignment. */ +# define BUS_ADRALN BUS_ADRALN + BUS_ADRERR, /* Non-existant physical address. */ +# define BUS_ADRERR BUS_ADRERR + BUS_OBJERR /* Object specific hardware error. */ +# define BUS_OBJERR BUS_OBJERR +}; + +/* `si_code' values for SIGTRAP signal. */ +enum +{ + TRAP_BRKPT = 1, /* Process breakpoint. */ +# define TRAP_BRKPT TRAP_BRKPT + TRAP_TRACE /* Process trace trap. */ +# define TRAP_TRACE TRAP_TRACE +}; + +/* `si_code' values for SIGCHLD signal. */ +enum +{ + CLD_EXITED = 1, /* Child has exited. */ +# define CLD_EXITED CLD_EXITED + CLD_KILLED, /* Child was killed. */ +# define CLD_KILLED CLD_KILLED + CLD_DUMPED, /* Child terminated abnormally. */ +# define CLD_DUMPED CLD_DUMPED + CLD_TRAPPED, /* Traced child has trapped. */ +# define CLD_TRAPPED CLD_TRAPPED + CLD_STOPPED, /* Child has stopped. */ +# define CLD_STOPPED CLD_STOPPED + CLD_CONTINUED /* Stopped child has continued. */ +# define CLD_CONTINUED CLD_CONTINUED +}; + +/* `si_code' values for SIGPOLL signal. */ +enum +{ + POLL_IN = 1, /* Data input available. */ +# define POLL_IN POLL_IN + POLL_OUT, /* Output buffers available. */ +# define POLL_OUT POLL_OUT + POLL_MSG, /* Input message available. */ +# define POLL_MSG POLL_MSG + POLL_ERR, /* I/O error. */ +# define POLL_ERR POLL_ERR + POLL_PRI, /* High priority input available. */ +# define POLL_PRI POLL_PRI + POLL_HUP /* Device disconnected. */ +# define POLL_HUP POLL_HUP +}; + +# undef __need_siginfo_t +#endif /* !have siginfo_t && (have _SIGNAL_H || need siginfo_t). */ + + +#if (defined _SIGNAL_H || defined __need_sigevent_t) \ + && !defined __have_sigevent_t +# define __have_sigevent_t 1 + +/* Structure to transport application-defined values with signals. */ +# define __SIGEV_MAX_SIZE 64 +# if __WORDSIZE == 64 +# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4) +# else +# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3) +# endif + +typedef struct sigevent + { + sigval_t sigev_value; + int sigev_signo; + int sigev_notify; + + union + { + int _pad[__SIGEV_PAD_SIZE]; + + /* When SIGEV_SIGNAL and SIGEV_THREAD_ID set, LWP ID of the + thread to receive the signal. */ + __pid_t _tid; + + struct + { + void (*_function) (sigval_t); /* Function to start. */ + void *_attribute; /* Really pthread_attr_t. */ + } _sigev_thread; + } _sigev_un; + } sigevent_t; + +/* POSIX names to access some of the members. */ +# define sigev_notify_function _sigev_un._sigev_thread._function +# define sigev_notify_attributes _sigev_un._sigev_thread._attribute + +/* `sigev_notify' values. */ +enum +{ + SIGEV_SIGNAL = 0, /* Notify via signal. */ +# define SIGEV_SIGNAL SIGEV_SIGNAL + SIGEV_NONE, /* Other notification: meaningless. */ +# define SIGEV_NONE SIGEV_NONE + SIGEV_THREAD, /* Deliver via thread creation. */ +# define SIGEV_THREAD SIGEV_THREAD + + SIGEV_THREAD_ID = 4 /* Send signal to specific thread. */ +#define SIGEV_THREAD_ID SIGEV_THREAD_ID +}; + +#endif /* have _SIGNAL_H. */ diff --git a/sysdeps/unix/sysv/linux/m68k/clone.S b/sysdeps/unix/sysv/linux/m68k/clone.S index 6baf723d9b..a179f8e0fa 100644 --- a/sysdeps/unix/sysv/linux/m68k/clone.S +++ b/sysdeps/unix/sysv/linux/m68k/clone.S @@ -42,11 +42,21 @@ ENTRY (__clone) movel 16(%sp), -(%a1) /* Do the system call */ - exg %d2, %a1 /* save %d2 and get stack pointer */ movel 12(%sp), %d1 /* get flags */ +#ifdef __mcoldfire__ + movel %d2, -(%a1) + movel %d2, -(%sp) + movel %a1, %d2 +#else + exg %d2, %a1 /* save %d2 and get stack pointer */ +#endif movel #SYS_ify (clone), %d0 trap #0 +#ifdef __mcoldfire__ + movel (%sp)+, %d2 +#else exg %d2, %a1 /* restore %d2 */ +#endif tstl %d0 jmi SYSCALL_ERROR_LABEL diff --git a/sysdeps/unix/sysv/linux/m68k/configure b/sysdeps/unix/sysv/linux/m68k/configure new file mode 100644 index 0000000000..94ccc508cc --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/configure @@ -0,0 +1,6 @@ +# This file is generated from configure.in by Autoconf. DO NOT EDIT! + case $machine in +m68k/coldfire) + arch_minimum_kernel=2.6.10 + ;; +esac diff --git a/sysdeps/unix/sysv/linux/m68k/configure.in b/sysdeps/unix/sysv/linux/m68k/configure.in new file mode 100644 index 0000000000..285b81f475 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/configure.in @@ -0,0 +1,7 @@ +sinclude(./aclocal.m4)dnl Autoconf lossage +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +case $machine in +m68k/coldfire) + arch_minimum_kernel=2.6.10 + ;; +esac diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/syscalls.list b/sysdeps/unix/sysv/linux/m68k/m680x0/syscalls.list new file mode 100644 index 0000000000..913f051ff4 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/syscalls.list @@ -0,0 +1,4 @@ +# File name Caller Syscall name Args Strong name Weak names + +oldgetrlimit EXTRA getrlimit i:ip __old_getrlimit getrlimit@GLIBC_2.0 +oldsetrlimit EXTRA setrlimit i:ip __old_setrlimit setrlimit@GLIBC_2.0 diff --git a/sysdeps/unix/sysv/linux/m68k/register-dump.h b/sysdeps/unix/sysv/linux/m68k/register-dump.h index a7ac3ca01c..391902f494 100644 --- a/sysdeps/unix/sysv/linux/m68k/register-dump.h +++ b/sysdeps/unix/sysv/linux/m68k/register-dump.h @@ -40,6 +40,7 @@ */ +#ifndef __mcoldfire__ /* Linux saves only the call-clobbered registers in the sigcontext. We need to use a trampoline that saves the rest so that the C code can access them. We use the sc_fpstate field, since the handler is not @@ -65,6 +66,7 @@ catch_segfault:\n\ } #define catch_segfault(a,b) \ __attribute_used__ real_catch_segfault(a,b) +#endif static void hexvalue (unsigned long int value, char *buf, size_t len) @@ -81,6 +83,8 @@ register_dump (int fd, struct sigcontext *ctx) char fpregs[11][24]; struct iovec iov[63], *next_iov = iov; unsigned long *p = (unsigned long *) ctx->sc_fpstate + 1; + unsigned long *pfp = (unsigned long *) ctx->sc_fpregs; + int i, j, fpreg_size; #define ADD_STRING(str) \ next_iov->iov_base = (char *) (str); \ @@ -91,51 +95,59 @@ register_dump (int fd, struct sigcontext *ctx) next_iov->iov_len = (len); \ ++next_iov +#ifdef __mcoldfire__ + fpreg_size = 16; +#else + fpreg_size = 24; +#endif + /* Generate strings of register contents. */ hexvalue (ctx->sc_d0, regs[0], 8); hexvalue (ctx->sc_d1, regs[1], 8); +#ifdef __mcoldfire__ + hexvalue (ctx->sc_d2, regs[2], 8); + hexvalue (ctx->sc_d3, regs[3], 8); + hexvalue (ctx->sc_d4, regs[4], 8); + hexvalue (ctx->sc_d5, regs[5], 8); + hexvalue (ctx->sc_d6, regs[6], 8); + hexvalue (ctx->sc_d7, regs[7], 8); +#else hexvalue (*p++, regs[2], 8); hexvalue (*p++, regs[3], 8); hexvalue (*p++, regs[4], 8); hexvalue (*p++, regs[5], 8); hexvalue (*p++, regs[6], 8); hexvalue (*p++, regs[7], 8); +#endif hexvalue (ctx->sc_a0, regs[8], 8); hexvalue (ctx->sc_a1, regs[9], 8); +#ifdef __mcoldfire__ + hexvalue (ctx->sc_a2, regs[10], 8); + hexvalue (ctx->sc_a3, regs[11], 8); + hexvalue (ctx->sc_a4, regs[12], 8); + hexvalue (ctx->sc_a5, regs[13], 8); + hexvalue (ctx->sc_a6, regs[14], 8); +#else hexvalue (*p++, regs[10], 8); hexvalue (*p++, regs[11], 8); hexvalue (*p++, regs[12], 8); hexvalue (*p++, regs[13], 8); hexvalue (*p++, regs[14], 8); +#endif hexvalue (ctx->sc_usp, regs[15], 8); hexvalue (ctx->sc_pc, regs[16], 8); hexvalue (ctx->sc_sr, regs[17], 4); hexvalue (ctx->sc_mask, regs[18], 8); hexvalue (ctx->sc_formatvec & 0xfff, regs[19], 4); - hexvalue (ctx->sc_fpregs[0], fpregs[0], 8); - hexvalue (ctx->sc_fpregs[1], fpregs[0] + 8, 8); - hexvalue (ctx->sc_fpregs[2], fpregs[0] + 16, 8); - hexvalue (ctx->sc_fpregs[3], fpregs[1], 8); - hexvalue (ctx->sc_fpregs[4], fpregs[1] + 8, 8); - hexvalue (ctx->sc_fpregs[5], fpregs[1] + 16, 8); - hexvalue (*p++, fpregs[2], 8); - hexvalue (*p++, fpregs[2] + 8, 8); - hexvalue (*p++, fpregs[2] + 16, 8); - hexvalue (*p++, fpregs[3], 8); - hexvalue (*p++, fpregs[3] + 8, 8); - hexvalue (*p++, fpregs[3] + 16, 8); - hexvalue (*p++, fpregs[4], 8); - hexvalue (*p++, fpregs[4] + 8, 8); - hexvalue (*p++, fpregs[4] + 16, 8); - hexvalue (*p++, fpregs[5], 8); - hexvalue (*p++, fpregs[5] + 8, 8); - hexvalue (*p++, fpregs[5] + 16, 8); - hexvalue (*p++, fpregs[6], 8); - hexvalue (*p++, fpregs[6] + 8, 8); - hexvalue (*p++, fpregs[6] + 16, 8); - hexvalue (*p++, fpregs[7], 8); - hexvalue (*p++, fpregs[7] + 8, 8); - hexvalue (*p++, fpregs[7] + 16, 8); + for (i = 0; i < 2; i++) + for (j = 0; j < fpreg_size; j += 8) + hexvalue (*pfp++, fpregs[i] + j, 8); +#ifdef __mcoldfire__ + p = pfp; +#endif + for (i = 2; i < 8; i++) + for (j = 0; j < fpreg_size; j += 8) + hexvalue (*p++, fpregs[i] + j, 8); hexvalue (ctx->sc_fpcntl[0], fpregs[8], 8); hexvalue (ctx->sc_fpcntl[1], fpregs[9], 8); hexvalue (ctx->sc_fpcntl[2], fpregs[10], 8); @@ -184,21 +196,21 @@ register_dump (int fd, struct sigcontext *ctx) ADD_MEM (regs[19], 4); ADD_STRING ("\n\n FP0: "); - ADD_MEM (fpregs[0], 24); + ADD_MEM (fpregs[0], fpreg_size); ADD_STRING (" FP1: "); - ADD_MEM (fpregs[1], 24); + ADD_MEM (fpregs[1], fpreg_size); ADD_STRING ("\n FP2: "); - ADD_MEM (fpregs[2], 24); + ADD_MEM (fpregs[2], fpreg_size); ADD_STRING (" FP3: "); - ADD_MEM (fpregs[3], 24); + ADD_MEM (fpregs[3], fpreg_size); ADD_STRING ("\n FP4: "); - ADD_MEM (fpregs[4], 24); + ADD_MEM (fpregs[4], fpreg_size); ADD_STRING (" FP5: "); - ADD_MEM (fpregs[5], 24); + ADD_MEM (fpregs[5], fpreg_size); ADD_STRING ("\n FP6: "); - ADD_MEM (fpregs[6], 24); + ADD_MEM (fpregs[6], fpreg_size); ADD_STRING (" FP7: "); - ADD_MEM (fpregs[7], 24); + ADD_MEM (fpregs[7], fpreg_size); ADD_STRING ("\n FPCR: "); ADD_MEM (fpregs[8], 8); ADD_STRING (" FPSR: "); diff --git a/sysdeps/unix/sysv/linux/m68k/socket.S b/sysdeps/unix/sysv/linux/m68k/socket.S index 1d10f33e17..2690f182a8 100644 --- a/sysdeps/unix/sysv/linux/m68k/socket.S +++ b/sysdeps/unix/sysv/linux/m68k/socket.S @@ -42,7 +42,7 @@ .globl __socket ENTRY (__socket) #if defined NEED_CANCELLATION && defined CENABLE - SINGLE_THREAD_P + SINGLE_THREAD_P (%a0) jne 1f #endif diff --git a/sysdeps/unix/sysv/linux/m68k/sys/reg.h b/sysdeps/unix/sysv/linux/m68k/sys/reg.h index 418f8323f1..230fd2d05e 100644 --- a/sysdeps/unix/sysv/linux/m68k/sys/reg.h +++ b/sysdeps/unix/sysv/linux/m68k/sys/reg.h @@ -62,22 +62,35 @@ enum #define PT_SR PT_SR PT_PC = 18, #define PT_PC PT_PC + +#ifdef __mcoldfire__ + PT_FP0 = 21, + PT_FP1 = 23, + PT_FP2 = 25, + PT_FP3 = 27, + PT_FP4 = 29, + PT_FP5 = 31, + PT_FP6 = 33, + PT_FP7 = 35, +#else PT_FP0 = 21, -#define PT_FP0 PT_FP0 PT_FP1 = 24, -#define PT_FP1 PT_FP1 PT_FP2 = 27, -#define PT_FP2 PT_FP2 PT_FP3 = 30, -#define PT_FP3 PT_FP3 PT_FP4 = 33, -#define PT_FP4 PT_FP4 PT_FP5 = 36, -#define PT_FP5 PT_FP5 PT_FP6 = 39, -#define PT_FP6 PT_FP6 PT_FP7 = 42, +#endif +#define PT_FP0 PT_FP0 +#define PT_FP1 PT_FP1 +#define PT_FP2 PT_FP2 +#define PT_FP3 PT_FP3 +#define PT_FP4 PT_FP4 +#define PT_FP5 PT_FP5 +#define PT_FP6 PT_FP6 #define PT_FP7 PT_FP7 + PT_FPCR = 45, #define PT_FPCR PT_FPCR PT_FPSR = 46, diff --git a/sysdeps/unix/sysv/linux/m68k/sys/ucontext.h b/sysdeps/unix/sysv/linux/m68k/sys/ucontext.h index 3c441dc5ce..776466b75d 100644 --- a/sysdeps/unix/sysv/linux/m68k/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/m68k/sys/ucontext.h @@ -79,10 +79,14 @@ enum /* Structure to describe FPU registers. */ typedef struct fpregset { - int f_fpregs[8][3]; int f_pcr; int f_psr; int f_fpiaddr; +#ifdef __mcoldfire__ + int f_fpregs[8][2]; +#else + int f_fpregs[8][3]; +#endif } fpregset_t; /* Context to describe whole processor state. */ @@ -98,12 +102,12 @@ typedef struct /* Userlevel context. */ typedef struct ucontext { - unsigned long int uc_flags; + unsigned long uc_flags; struct ucontext *uc_link; - __sigset_t uc_sigmask; stack_t uc_stack; mcontext_t uc_mcontext; - long int uc_filler[174]; + unsigned long uc_filler[80]; + __sigset_t uc_sigmask; } ucontext_t; #endif /* sys/ucontext.h */ diff --git a/sysdeps/unix/sysv/linux/m68k/syscalls.list b/sysdeps/unix/sysv/linux/m68k/syscalls.list index 98d30667bd..5367ef0d0b 100644 --- a/sysdeps/unix/sysv/linux/m68k/syscalls.list +++ b/sysdeps/unix/sysv/linux/m68k/syscalls.list @@ -1,5 +1,3 @@ # File name Caller Syscall name Args Strong name Weak names cacheflush EXTRA cacheflush i:iiii __cacheflush cacheflush -oldgetrlimit EXTRA getrlimit i:ip __old_getrlimit getrlimit@GLIBC_2.0 -oldsetrlimit EXTRA setrlimit i:ip __old_setrlimit setrlimit@GLIBC_2.0 diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h index 091dfc9c7d..be37c894a1 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -18,6 +18,9 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#ifndef _LINUX_M68K_SYSDEP_H +#define _LINUX_M68K_SYSDEP_H 1 + #include #include @@ -98,7 +101,7 @@ # if RTLD_PRIVATE_ERRNO # define SYSCALL_ERROR_HANDLER \ SYSCALL_ERROR_LABEL: \ - lea (rtld_errno, %pc), %a0; \ + PCREL_OP (lea, rtld_errno, %a0, %a0); \ neg.l %d0; \ move.l %d0, (%a0); \ move.l &-1, %d0; \ @@ -293,3 +296,4 @@ SYSCALL_ERROR_LABEL: \ #define ASM_ARGS_6 ASM_ARGS_5, "a" (_a0) #endif /* not __ASSEMBLER__ */ +#endif From 4b32aae99b6696ee5e25a7563bd0356be2bb59dd Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 3 Oct 2006 15:49:06 +0000 Subject: [PATCH 3660/4487] * sysdeps/unix/sysv/linux/m68k/mremap.S: Accept fifth parameter. --- ChangeLog.m68k | 4 ++++ sysdeps/unix/sysv/linux/m68k/mremap.S | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index b12f7f42ab..94e35b6382 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,7 @@ +2006-10-03 Andreas Schwab + + * sysdeps/unix/sysv/linux/m68k/mremap.S: Accept fifth parameter. + 2006-10-03 Richard Sandiford * sysdeps/m68k/bits/mathdef.h: Moved from sysdeps/m68k to diff --git a/sysdeps/unix/sysv/linux/m68k/mremap.S b/sysdeps/unix/sysv/linux/m68k/mremap.S index 68d961b553..6e6f3b66c6 100644 --- a/sysdeps/unix/sysv/linux/m68k/mremap.S +++ b/sysdeps/unix/sysv/linux/m68k/mremap.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. +/* Copyright (C) 1996, 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 @@ -22,7 +22,7 @@ its value in register %a0. */ .text -PSEUDO (__mremap, mremap, 4) +PSEUDO (__mremap, mremap, 5) move.l %d0, %a0 rts PSEUDO_END (__mremap) From 23cd7e446d65460def5b26bb46147702432886a6 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 3 Oct 2006 15:50:57 +0000 Subject: [PATCH 3661/4487] * sysdeps/m68k/setjmp.c: Use __builtin_return_address and __builtin_frame_address. Don't call __sigjmp_save in ld.so. --- ChangeLog.m68k | 3 +++ sysdeps/m68k/setjmp.c | 13 +++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 94e35b6382..44cdd8f33c 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,5 +1,8 @@ 2006-10-03 Andreas Schwab + * sysdeps/m68k/setjmp.c: Use __builtin_return_address and + __builtin_frame_address. Don't call __sigjmp_save in ld.so. + * sysdeps/unix/sysv/linux/m68k/mremap.S: Accept fifth parameter. 2006-10-03 Richard Sandiford diff --git a/sysdeps/m68k/setjmp.c b/sysdeps/m68k/setjmp.c index e2ba0e700d..2ebe97ee60 100644 --- a/sysdeps/m68k/setjmp.c +++ b/sysdeps/m68k/setjmp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1994, 1997, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1994, 1997, 2001, 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 @@ -37,17 +37,17 @@ __sigsetjmp (jmp_buf env, int savemask) : : "m" (env[0].__jmpbuf[0].__dregs[0])); /* Save return address in place of register A0. */ - env[0].__jmpbuf[0].__aregs[0] = ((void **) &env)[-1]; + env[0].__jmpbuf[0].__aregs[0] = __builtin_return_address (0); /* Save address registers A1 through A5. */ asm volatile ("movem%.l %/a1-%/a5, %0" : : "m" (env[0].__jmpbuf[0].__aregs[1])); /* Save caller's FP, not our own. */ - env[0].__jmpbuf[0].__fp = ((void **) &env)[-2]; + env[0].__jmpbuf[0].__fp = *(int **) __builtin_frame_address (0); /* Save caller's SP, not our own. */ - env[0].__jmpbuf[0].__sp = (void *) &env; + env[0].__jmpbuf[0].__sp = (int *) __builtin_frame_address (0) + 2; #if defined __HAVE_68881__ || defined __HAVE_FPU__ /* Save floating-point (68881) registers FP0 through FP7. */ @@ -58,8 +58,13 @@ __sigsetjmp (jmp_buf env, int savemask) : : "m" (env[0].__jmpbuf[0].__fpregs[0])); #endif +#if defined NOT_IN_libc && defined IS_IN_rtld + /* In ld.so we never save the signal mask. */ + return 0; +#else /* Save the signal mask if requested. */ return __sigjmp_save (env, savemask); +#endif } #if !defined BSD_SETJMP && !defined BSD__SETJMP libc_hidden_def (__sigsetjmp) From b24bde2d1b674e80ac93bb416bb98fcc112ad287 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 12 Oct 2006 21:30:42 +0000 Subject: [PATCH 3662/4487] Add SEM_VALUE_MAX. --- sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h index e0718780cc..9b27b1ff48 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h @@ -87,3 +87,6 @@ /* Maximum message queue priority level. */ #define MQ_PRIO_MAX 32768 + +/* Maximum value the semaphore can have. */ +#define SEM_VALUE_MAX (2147483647) From 3d32d7858472c0537051fb1ddac931ae5f8c8495 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 12 Oct 2006 21:35:06 +0000 Subject: [PATCH 3663/4487] Remove SEM_VALUE_MAX. --- sysdeps/unix/sysv/linux/alpha/nptl/bits/semaphore.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/semaphore.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/semaphore.h index 6dadfda206..be4469c69d 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/bits/semaphore.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/semaphore.h @@ -26,9 +26,6 @@ /* Value returned if `sem_open' failed. */ #define SEM_FAILED ((sem_t *) 0) -/* Maximum value the semaphore can have. */ -#define SEM_VALUE_MAX (2147483647) - typedef union { From 7985141bdc16f16d39c51b49195d424ba5223187 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 27 Oct 2006 15:16:00 +0000 Subject: [PATCH 3664/4487] (SINGLE_THREAD_P): Define to THREAD_SELF->header.multiple_threads. --- sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h index f3f7718e3e..7e61d68573 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 Free Software Foundation, Inc. +/* Copyright (C) 2003, 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 @@ -163,7 +163,13 @@ extern int __local_multiple_threads attribute_hidden; #else -# define SINGLE_THREAD_P (1) +# ifdef IS_IN_rtld +# define SINGLE_THREAD_P \ + __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ + header.multiple_threads) == 0, 1) +# else +# define SINGLE_THREAD_P (1) +# endif # define NO_CANCELLATION 1 #endif From 069ba66371cc8566540f22195ffadab7eb83cef4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 27 Oct 2006 23:11:45 +0000 Subject: [PATCH 3665/4487] USE_TLS support is now default. --- sysdeps/alpha/dl-machine.h | 28 ++++++++++++++-------------- sysdeps/alpha/libc-tls.c | 6 +----- sysdeps/alpha/nptl/tls.h | 5 +---- 3 files changed, 16 insertions(+), 23 deletions(-) diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 88c357ea07..29f500b2d0 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. Alpha version. - Copyright (C) 1996-2002, 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 1996-2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson . @@ -232,14 +232,14 @@ _dl_start_user: \n\ to one of the main executable's symbols, as for a COPY reloc. This is unused on Alpha. */ -#if defined USE_TLS && (!defined RTLD_BOOTSTRAP || USE___THREAD) -#define elf_machine_type_class(type) \ +#if !defined RTLD_BOOTSTRAP || USE___THREAD +# define elf_machine_type_class(type) \ (((type) == R_ALPHA_JMP_SLOT \ || (type) == R_ALPHA_DTPMOD64 \ || (type) == R_ALPHA_DTPREL64 \ || (type) == R_ALPHA_TPREL64) * ELF_RTYPE_CLASS_PLT) #else -#define elf_machine_type_class(type) \ +# define elf_machine_type_class(type) \ (((type) == R_ALPHA_JMP_SLOT) * ELF_RTYPE_CLASS_PLT) #endif @@ -439,40 +439,40 @@ elf_machine_rela (struct link_map *map, memcpy (reloc_addr_arg, &sym_value, 8); } #endif -#if defined USE_TLS && (!defined RTLD_BOOTSTRAP || USE___THREAD) +#if !defined RTLD_BOOTSTRAP || USE___THREAD else if (r_type == R_ALPHA_DTPMOD64) { -#ifdef RTLD_BOOTSTRAP +# ifdef RTLD_BOOTSTRAP /* During startup the dynamic linker is always index 1. */ *reloc_addr = 1; -#else +# else /* Get the information from the link map returned by the resolv function. */ if (sym_map != NULL) *reloc_addr = sym_map->l_tls_modid; -#endif +# endif } else if (r_type == R_ALPHA_DTPREL64) { -#ifndef RTLD_BOOTSTRAP +# ifndef RTLD_BOOTSTRAP /* During relocation all TLS symbols are defined and used. Therefore the offset is already correct. */ *reloc_addr = sym_raw_value; -#endif +# endif } else if (r_type == R_ALPHA_TPREL64) { -#ifdef RTLD_BOOTSTRAP +# ifdef RTLD_BOOTSTRAP *reloc_addr = sym_raw_value + map->l_tls_offset; -#else +# else if (sym_map) { CHECK_STATIC_TLS (map, sym_map); *reloc_addr = sym_raw_value + sym_map->l_tls_offset; } -#endif +# endif } -#endif /* USE_TLS */ +#endif else _dl_reloc_bad_type (map, r_type, 0); } diff --git a/sysdeps/alpha/libc-tls.c b/sysdeps/alpha/libc-tls.c index 24629e9aca..7e02769171 100644 --- a/sysdeps/alpha/libc-tls.c +++ b/sysdeps/alpha/libc-tls.c @@ -1,5 +1,5 @@ /* Thread-local storage handling in the ELF dynamic linker. Alpha version. - Copyright (C) 2003, 2005 Free Software Foundation, Inc. + Copyright (C) 2003, 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 @@ -20,8 +20,6 @@ #include #include -#if USE_TLS - /* On Alpha, linker optimizations are not required, so __tls_get_addr can be called even in statically linked binaries. In this case module must be always 1 and PT_TLS segment exist in the binary, otherwise it @@ -33,5 +31,3 @@ __tls_get_addr (tls_index *ti) dtv_t *dtv = THREAD_DTV (); return (char *) dtv[1].pointer.val + ti->ti_offset; } - -#endif diff --git a/sysdeps/alpha/nptl/tls.h b/sysdeps/alpha/nptl/tls.h index 20f780c5f5..be2430f676 100644 --- a/sysdeps/alpha/nptl/tls.h +++ b/sysdeps/alpha/nptl/tls.h @@ -1,5 +1,5 @@ /* Definition for thread-local data handling. NPTL/Alpha version. - Copyright (C) 2003, 2005 Free Software Foundation, Inc. + Copyright (C) 2003, 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 @@ -48,9 +48,6 @@ typedef union dtv # error "TLS support is required." #endif -/* Signal that TLS support is available. */ -# define USE_TLS 1 - #ifndef __ASSEMBLER__ /* Get system call information. */ From cf0494f3e7841fcbd4a996a2bacdce71fa62ca3e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 29 Oct 2006 21:48:06 +0000 Subject: [PATCH 3666/4487] (RTLD_SINGLE_THREAD_P): Define. (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld. --- sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h index 7e61d68573..aa42768f70 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h @@ -163,13 +163,13 @@ extern int __local_multiple_threads attribute_hidden; #else -# ifdef IS_IN_rtld -# define SINGLE_THREAD_P \ - __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ - header.multiple_threads) == 0, 1) -# else -# define SINGLE_THREAD_P (1) -# endif +# define SINGLE_THREAD_P (1) # define NO_CANCELLATION 1 #endif + +#ifndef __ASSEMBLER__ +# define RTLD_SINGLE_THREAD_P \ + __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ + header.multiple_threads) == 0, 1) +#endif From 0572b91bdb6cf4dda3bb2edbf1078aeb0e8fa99b Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Tue, 31 Oct 2006 17:07:54 +0000 Subject: [PATCH 3667/4487] * sysdeps/arm/memcpy.S: New file. * sysdeps/arm/memmove.S: Likewise. --- ChangeLog.arm | 6 ++ sysdeps/arm/memcpy.S | 227 ++++++++++++++++++++++++++++++++++++++++ sysdeps/arm/memmove.S | 237 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 470 insertions(+) create mode 100644 sysdeps/arm/memcpy.S create mode 100644 sysdeps/arm/memmove.S diff --git a/ChangeLog.arm b/ChangeLog.arm index b28f7b5cf2..6d49bde2da 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,9 @@ +2006-10-31 Nicolas Pitre + Joseph Myers + + * sysdeps/arm/memcpy.S: New file. + * sysdeps/arm/memmove.S: Likewise. + 2006-09-22 Khem Raj * sysdeps/unix/sysv/linux/arm/fxstatat.c: New file. diff --git a/sysdeps/arm/memcpy.S b/sysdeps/arm/memcpy.S new file mode 100644 index 0000000000..61cf33cbfb --- /dev/null +++ b/sysdeps/arm/memcpy.S @@ -0,0 +1,227 @@ +/* Copyright (C) 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + Contributed by MontaVista Software, Inc. (written by Nicolas Pitre) + + 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. */ + +#include + +/* + * Data preload for architectures that support it (ARM V5TE and above) + */ +#if (!defined (__ARM_ARCH_2__) && !defined (__ARM_ARCH_3__) \ + && !defined (__ARM_ARCH_3M__) && !defined (__ARM_ARCH_4__) \ + && !defined (__ARM_ARCH_4T__) && !defined (__ARM_ARCH_5__) \ + && !defined (__ARM_ARCH_5T__)) +#define PLD(code...) code +#else +#define PLD(code...) +#endif + +/* + * This can be used to enable code to cacheline align the source pointer. + * Experiments on tested architectures (StrongARM and XScale) didn't show + * this a worthwhile thing to do. That might be different in the future. + */ +//#define CALGN(code...) code +#define CALGN(code...) + +/* + * Endian independent macros for shifting bytes within registers. + */ +#ifndef __ARMEB__ +#define pull lsr +#define push lsl +#else +#define pull lsl +#define push lsr +#endif + + .text + +/* Prototype: void *memcpy(void *dest, const void *src, size_t n); */ + +ENTRY(memcpy) + + stmfd sp!, {r0, r4, lr} + + subs r2, r2, #4 + blt 8f + ands ip, r0, #3 + PLD( pld [r1, #0] ) + bne 9f + ands ip, r1, #3 + bne 10f + +1: subs r2, r2, #(28) + stmfd sp!, {r5 - r8} + blt 5f + + CALGN( ands ip, r1, #31 ) + CALGN( rsb r3, ip, #32 ) + CALGN( sbcnes r4, r3, r2 ) @ C is always set here + CALGN( bcs 2f ) + CALGN( adr r4, 6f ) + CALGN( subs r2, r2, r3 ) @ C gets set + CALGN( add pc, r4, ip ) + + PLD( pld [r1, #0] ) +2: PLD( subs r2, r2, #96 ) + PLD( pld [r1, #28] ) + PLD( blt 4f ) + PLD( pld [r1, #60] ) + PLD( pld [r1, #92] ) + +3: PLD( pld [r1, #124] ) +4: ldmia r1!, {r3, r4, r5, r6, r7, r8, ip, lr} + subs r2, r2, #32 + stmia r0!, {r3, r4, r5, r6, r7, r8, ip, lr} + bge 3b + PLD( cmn r2, #96 ) + PLD( bge 4b ) + +5: ands ip, r2, #28 + rsb ip, ip, #32 + addne pc, pc, ip @ C is always clear here + b 7f +6: nop + ldr r3, [r1], #4 + ldr r4, [r1], #4 + ldr r5, [r1], #4 + ldr r6, [r1], #4 + ldr r7, [r1], #4 + ldr r8, [r1], #4 + ldr lr, [r1], #4 + + add pc, pc, ip + nop + nop + str r3, [r0], #4 + str r4, [r0], #4 + str r5, [r0], #4 + str r6, [r0], #4 + str r7, [r0], #4 + str r8, [r0], #4 + str lr, [r0], #4 + + CALGN( bcs 2b ) + +7: ldmfd sp!, {r5 - r8} + +8: movs r2, r2, lsl #31 + ldrneb r3, [r1], #1 + ldrcsb r4, [r1], #1 + ldrcsb ip, [r1] + strneb r3, [r0], #1 + strcsb r4, [r0], #1 + strcsb ip, [r0] + + ldmfd sp!, {r0, r4, pc} + +9: rsb ip, ip, #4 + cmp ip, #2 + ldrgtb r3, [r1], #1 + ldrgeb r4, [r1], #1 + ldrb lr, [r1], #1 + strgtb r3, [r0], #1 + strgeb r4, [r0], #1 + subs r2, r2, ip + strb lr, [r0], #1 + blt 8b + ands ip, r1, #3 + beq 1b + +10: bic r1, r1, #3 + cmp ip, #2 + ldr lr, [r1], #4 + beq 17f + bgt 18f + + + .macro forward_copy_shift pull push + + subs r2, r2, #28 + blt 14f + + CALGN( ands ip, r1, #31 ) + CALGN( rsb ip, ip, #32 ) + CALGN( sbcnes r4, ip, r2 ) @ C is always set here + CALGN( subcc r2, r2, ip ) + CALGN( bcc 15f ) + +11: stmfd sp!, {r5 - r9} + + PLD( pld [r1, #0] ) + PLD( subs r2, r2, #96 ) + PLD( pld [r1, #28] ) + PLD( blt 13f ) + PLD( pld [r1, #60] ) + PLD( pld [r1, #92] ) + +12: PLD( pld [r1, #124] ) +13: ldmia r1!, {r4, r5, r6, r7} + mov r3, lr, pull #\pull + subs r2, r2, #32 + ldmia r1!, {r8, r9, ip, lr} + orr r3, r3, r4, push #\push + mov r4, r4, pull #\pull + orr r4, r4, r5, push #\push + mov r5, r5, pull #\pull + orr r5, r5, r6, push #\push + mov r6, r6, pull #\pull + orr r6, r6, r7, push #\push + mov r7, r7, pull #\pull + orr r7, r7, r8, push #\push + mov r8, r8, pull #\pull + orr r8, r8, r9, push #\push + mov r9, r9, pull #\pull + orr r9, r9, ip, push #\push + mov ip, ip, pull #\pull + orr ip, ip, lr, push #\push + stmia r0!, {r3, r4, r5, r6, r7, r8, r9, ip} + bge 12b + PLD( cmn r2, #96 ) + PLD( bge 13b ) + + ldmfd sp!, {r5 - r9} + +14: ands ip, r2, #28 + beq 16f + +15: mov r3, lr, pull #\pull + ldr lr, [r1], #4 + subs ip, ip, #4 + orr r3, r3, lr, push #\push + str r3, [r0], #4 + bgt 15b + CALGN( cmp r2, #0 ) + CALGN( bge 11b ) + +16: sub r1, r1, #(\push / 8) + b 8b + + .endm + + + forward_copy_shift pull=8 push=24 + +17: forward_copy_shift pull=16 push=16 + +18: forward_copy_shift pull=24 push=8 + +END(memcpy) +libc_hidden_builtin_def (memcpy) diff --git a/sysdeps/arm/memmove.S b/sysdeps/arm/memmove.S new file mode 100644 index 0000000000..2dd0790a2f --- /dev/null +++ b/sysdeps/arm/memmove.S @@ -0,0 +1,237 @@ +/* Copyright (C) 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + Contributed by MontaVista Software, Inc. (written by Nicolas Pitre) + + 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. */ + +#include + +/* + * Data preload for architectures that support it (ARM V5TE and above) + */ +#if (!defined (__ARM_ARCH_2__) && !defined (__ARM_ARCH_3__) \ + && !defined (__ARM_ARCH_3M__) && !defined (__ARM_ARCH_4__) \ + && !defined (__ARM_ARCH_4T__) && !defined (__ARM_ARCH_5__) \ + && !defined (__ARM_ARCH_5T__)) +#define PLD(code...) code +#else +#define PLD(code...) +#endif + +/* + * This can be used to enable code to cacheline align the source pointer. + * Experiments on tested architectures (StrongARM and XScale) didn't show + * this a worthwhile thing to do. That might be different in the future. + */ +//#define CALGN(code...) code +#define CALGN(code...) + +/* + * Endian independent macros for shifting bytes within registers. + */ +#ifndef __ARMEB__ +#define pull lsr +#define push lsl +#else +#define pull lsl +#define push lsr +#endif + + .text + +/* + * Prototype: void *memmove(void *dest, const void *src, size_t n); + * + * Note: + * + * If the memory regions don't overlap, we simply branch to memcpy which is + * normally a bit faster. Otherwise the copy is done going downwards. + */ + +ENTRY(memmove) + + subs ip, r0, r1 + cmphi r2, ip + bls memcpy + + stmfd sp!, {r0, r4, lr} + add r1, r1, r2 + add r0, r0, r2 + subs r2, r2, #4 + blt 8f + ands ip, r0, #3 + PLD( pld [r1, #-4] ) + bne 9f + ands ip, r1, #3 + bne 10f + +1: subs r2, r2, #(28) + stmfd sp!, {r5 - r8} + blt 5f + + CALGN( ands ip, r1, #31 ) + CALGN( sbcnes r4, ip, r2 ) @ C is always set here + CALGN( bcs 2f ) + CALGN( adr r4, 6f ) + CALGN( subs r2, r2, ip ) @ C is set here + CALGN( add pc, r4, ip ) + + PLD( pld [r1, #-4] ) +2: PLD( subs r2, r2, #96 ) + PLD( pld [r1, #-32] ) + PLD( blt 4f ) + PLD( pld [r1, #-64] ) + PLD( pld [r1, #-96] ) + +3: PLD( pld [r1, #-128] ) +4: ldmdb r1!, {r3, r4, r5, r6, r7, r8, ip, lr} + subs r2, r2, #32 + stmdb r0!, {r3, r4, r5, r6, r7, r8, ip, lr} + bge 3b + PLD( cmn r2, #96 ) + PLD( bge 4b ) + +5: ands ip, r2, #28 + rsb ip, ip, #32 + addne pc, pc, ip @ C is always clear here + b 7f +6: nop + ldr r3, [r1, #-4]! + ldr r4, [r1, #-4]! + ldr r5, [r1, #-4]! + ldr r6, [r1, #-4]! + ldr r7, [r1, #-4]! + ldr r8, [r1, #-4]! + ldr lr, [r1, #-4]! + + add pc, pc, ip + nop + nop + str r3, [r0, #-4]! + str r4, [r0, #-4]! + str r5, [r0, #-4]! + str r6, [r0, #-4]! + str r7, [r0, #-4]! + str r8, [r0, #-4]! + str lr, [r0, #-4]! + + CALGN( bcs 2b ) + +7: ldmfd sp!, {r5 - r8} + +8: movs r2, r2, lsl #31 + ldrneb r3, [r1, #-1]! + ldrcsb r4, [r1, #-1]! + ldrcsb ip, [r1, #-1] + strneb r3, [r0, #-1]! + strcsb r4, [r0, #-1]! + strcsb ip, [r0, #-1] + ldmfd sp!, {r0, r4, pc} + +9: cmp ip, #2 + ldrgtb r3, [r1, #-1]! + ldrgeb r4, [r1, #-1]! + ldrb lr, [r1, #-1]! + strgtb r3, [r0, #-1]! + strgeb r4, [r0, #-1]! + subs r2, r2, ip + strb lr, [r0, #-1]! + blt 8b + ands ip, r1, #3 + beq 1b + +10: bic r1, r1, #3 + cmp ip, #2 + ldr r3, [r1, #0] + beq 17f + blt 18f + + + .macro backward_copy_shift push pull + + subs r2, r2, #28 + blt 14f + + CALGN( ands ip, r1, #31 ) + CALGN( rsb ip, ip, #32 ) + CALGN( sbcnes r4, ip, r2 ) @ C is always set here + CALGN( subcc r2, r2, ip ) + CALGN( bcc 15f ) + +11: stmfd sp!, {r5 - r9} + + PLD( pld [r1, #-4] ) + PLD( subs r2, r2, #96 ) + PLD( pld [r1, #-32] ) + PLD( blt 13f ) + PLD( pld [r1, #-64] ) + PLD( pld [r1, #-96] ) + +12: PLD( pld [r1, #-128] ) +13: ldmdb r1!, {r7, r8, r9, ip} + mov lr, r3, push #\push + subs r2, r2, #32 + ldmdb r1!, {r3, r4, r5, r6} + orr lr, lr, ip, pull #\pull + mov ip, ip, push #\push + orr ip, ip, r9, pull #\pull + mov r9, r9, push #\push + orr r9, r9, r8, pull #\pull + mov r8, r8, push #\push + orr r8, r8, r7, pull #\pull + mov r7, r7, push #\push + orr r7, r7, r6, pull #\pull + mov r6, r6, push #\push + orr r6, r6, r5, pull #\pull + mov r5, r5, push #\push + orr r5, r5, r4, pull #\pull + mov r4, r4, push #\push + orr r4, r4, r3, pull #\pull + stmdb r0!, {r4 - r9, ip, lr} + bge 12b + PLD( cmn r2, #96 ) + PLD( bge 13b ) + + ldmfd sp!, {r5 - r9} + +14: ands ip, r2, #28 + beq 16f + +15: mov lr, r3, push #\push + ldr r3, [r1, #-4]! + subs ip, ip, #4 + orr lr, lr, r3, pull #\pull + str lr, [r0, #-4]! + bgt 15b + CALGN( cmp r2, #0 ) + CALGN( bge 11b ) + +16: add r1, r1, #(\pull / 8) + b 8b + + .endm + + + backward_copy_shift push=8 pull=24 + +17: backward_copy_shift push=16 pull=16 + +18: backward_copy_shift push=24 pull=8 + + +END(memmove) +libc_hidden_builtin_def (memmove) From d2ff5a57f978b10976daa7969676bb1176b3f2c1 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Tue, 31 Oct 2006 17:09:24 +0000 Subject: [PATCH 3668/4487] * sysdeps/unix/sysv/linux/arm/kernel-features.h: Remove __i386__ conditional. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/kernel-features.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 6d49bde2da..e23a2915f4 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2006-10-31 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/kernel-features.h: Remove __i386__ + conditional. + 2006-10-31 Nicolas Pitre Joseph Myers diff --git a/sysdeps/unix/sysv/linux/arm/kernel-features.h b/sysdeps/unix/sysv/linux/arm/kernel-features.h index 6839e87551..5bedfe11e8 100644 --- a/sysdeps/unix/sysv/linux/arm/kernel-features.h +++ b/sysdeps/unix/sysv/linux/arm/kernel-features.h @@ -42,7 +42,7 @@ #endif /* The vfork syscall on arm was definitely available in 2.4. */ -#if __LINUX_KERNEL_VERSION >= 132097 && defined __i386__ +#if __LINUX_KERNEL_VERSION >= 132097 # define __ASSUME_VFORK_SYSCALL 1 #endif From a7d03b9189c8ed5fefe566f61cec0da6c4ad4276 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Tue, 31 Oct 2006 17:17:46 +0000 Subject: [PATCH 3669/4487] * sysdeps/unix/sysv/linux/mips/bits/fcntl.h (splice): Update prototype. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 0c9fb72c12..9c0ccf5480 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2006-10-31 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/fcntl.h (splice): Update + prototype. + 2006-09-22 Richard Sandiford * sysdeps/unix/sysv/linux/mips/xstatconv.c: Remove STAT_IS_KERNEL_STAT diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index b6672b7514..d40b4b6386 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -237,7 +237,8 @@ extern int 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) +extern int splice (int __fdin, __off64_t *__offin, int __fdout, + __off64_t *__offout, size_t __len, unsigned int __flags) __THROW; /* In-kernel implementation of tee for pipe buffers. */ From 57ba32a810df29d2a3f45ffc2d1c1f6170a5a9f7 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Tue, 31 Oct 2006 17:18:09 +0000 Subject: [PATCH 3670/4487] * sysdeps/unix/sysv/linux/arm/bits/fcntl.h (splice): Update prototype. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/bits/fcntl.h | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index e23a2915f4..bff4409fe0 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2006-10-31 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/bits/fcntl.h (splice): Update + prototype. + 2006-10-31 Joseph Myers * sysdeps/unix/sysv/linux/arm/kernel-features.h: Remove __i386__ diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h index 287dbd56f7..7c7b7c2027 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h @@ -223,7 +223,8 @@ extern int 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) +extern int splice (int __fdin, __off64_t *__offin, int __fdout, + __off64_t *__offout, size_t __len, unsigned int __flags) __THROW; /* In-kernel implementation of tee for pipe buffers. */ From b610dc849a5486fecfd7cb85dca1083c9cacc963 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Tue, 31 Oct 2006 17:20:42 +0000 Subject: [PATCH 3671/4487] * sysdeps/arm/eabi/fclrexcpt.c: Include instead of . Use HWCAP_ARM_VFP instead of HWCAP_VFP. * sysdeps/arm/eabi/fedisblxcpt.c: Likewise. * sysdeps/arm/eabi/feenablxcpt.c: Likewise. * sysdeps/arm/eabi/fegetenv.c: Likewise. * sysdeps/arm/eabi/fegetexcept.c: Likewise. * sysdeps/arm/eabi/fegetround.c: Likewise. * sysdeps/arm/eabi/feholdexcpt.c: Likewise. * sysdeps/arm/eabi/fesetenv.c: Likewise. * sysdeps/arm/eabi/fesetround.c: Likewise. * sysdeps/arm/eabi/fraiseexcpt.c: Likewise. * sysdeps/arm/eabi/fsetexcptflg.c: Likewise. * sysdeps/arm/eabi/ftestexcept.c: Likewise. * sysdeps/arm/eabi/setfpucw.c: Likewise. --- ChangeLog.arm | 17 +++++++++++++++++ sysdeps/arm/eabi/fclrexcpt.c | 4 ++-- sysdeps/arm/eabi/fedisblxcpt.c | 4 ++-- sysdeps/arm/eabi/feenablxcpt.c | 4 ++-- sysdeps/arm/eabi/fegetenv.c | 4 ++-- sysdeps/arm/eabi/fegetexcept.c | 4 ++-- sysdeps/arm/eabi/fegetround.c | 4 ++-- sysdeps/arm/eabi/feholdexcpt.c | 4 ++-- sysdeps/arm/eabi/fesetenv.c | 4 ++-- sysdeps/arm/eabi/fesetround.c | 4 ++-- sysdeps/arm/eabi/fraiseexcpt.c | 4 ++-- sysdeps/arm/eabi/fsetexcptflg.c | 4 ++-- sysdeps/arm/eabi/ftestexcept.c | 4 ++-- sysdeps/arm/eabi/setfpucw.c | 4 ++-- 14 files changed, 43 insertions(+), 26 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index bff4409fe0..ec5f05e8a3 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,20 @@ +2006-10-31 Joseph S. Myers + + * sysdeps/arm/eabi/fclrexcpt.c: Include instead of + . Use HWCAP_ARM_VFP instead of HWCAP_VFP. + * sysdeps/arm/eabi/fedisblxcpt.c: Likewise. + * sysdeps/arm/eabi/feenablxcpt.c: Likewise. + * sysdeps/arm/eabi/fegetenv.c: Likewise. + * sysdeps/arm/eabi/fegetexcept.c: Likewise. + * sysdeps/arm/eabi/fegetround.c: Likewise. + * sysdeps/arm/eabi/feholdexcpt.c: Likewise. + * sysdeps/arm/eabi/fesetenv.c: Likewise. + * sysdeps/arm/eabi/fesetround.c: Likewise. + * sysdeps/arm/eabi/fraiseexcpt.c: Likewise. + * sysdeps/arm/eabi/fsetexcptflg.c: Likewise. + * sysdeps/arm/eabi/ftestexcept.c: Likewise. + * sysdeps/arm/eabi/setfpucw.c: Likewise. + 2006-10-31 Joseph Myers * sysdeps/unix/sysv/linux/arm/bits/fcntl.h (splice): Update diff --git a/sysdeps/arm/eabi/fclrexcpt.c b/sysdeps/arm/eabi/fclrexcpt.c index 6e5d242805..8287dc61bd 100644 --- a/sysdeps/arm/eabi/fclrexcpt.c +++ b/sysdeps/arm/eabi/fclrexcpt.c @@ -23,12 +23,12 @@ #include #include #include -#include +#include int __feclearexcept (int excepts) { - if (GLRO (dl_hwcap) & HWCAP_VFP) + if (GLRO (dl_hwcap) & HWCAP_ARM_VFP) { unsigned long int temp; diff --git a/sysdeps/arm/eabi/fedisblxcpt.c b/sysdeps/arm/eabi/fedisblxcpt.c index 414d34b1e3..ab6fe79dad 100644 --- a/sysdeps/arm/eabi/fedisblxcpt.c +++ b/sysdeps/arm/eabi/fedisblxcpt.c @@ -24,12 +24,12 @@ #include #include #include -#include +#include int fedisableexcept (int excepts) { - if (GLRO (dl_hwcap) & HWCAP_VFP) + if (GLRO (dl_hwcap) & HWCAP_ARM_VFP) { unsigned long int new_exc, old_exc; diff --git a/sysdeps/arm/eabi/feenablxcpt.c b/sysdeps/arm/eabi/feenablxcpt.c index e104bc4f65..f12b453200 100644 --- a/sysdeps/arm/eabi/feenablxcpt.c +++ b/sysdeps/arm/eabi/feenablxcpt.c @@ -24,12 +24,12 @@ #include #include #include -#include +#include int feenableexcept (int excepts) { - if (GLRO (dl_hwcap) & HWCAP_VFP) + if (GLRO (dl_hwcap) & HWCAP_ARM_VFP) { unsigned long int new_exc, old_exc; diff --git a/sysdeps/arm/eabi/fegetenv.c b/sysdeps/arm/eabi/fegetenv.c index 178d22a424..35bfac8434 100644 --- a/sysdeps/arm/eabi/fegetenv.c +++ b/sysdeps/arm/eabi/fegetenv.c @@ -23,12 +23,12 @@ #include #include #include -#include +#include int __fegetenv (fenv_t *envp) { - if (GLRO (dl_hwcap) & HWCAP_VFP) + if (GLRO (dl_hwcap) & HWCAP_ARM_VFP) { unsigned long int temp; _FPU_GETCW (temp); diff --git a/sysdeps/arm/eabi/fegetexcept.c b/sysdeps/arm/eabi/fegetexcept.c index 811c8ae25a..8e29ff7c6a 100644 --- a/sysdeps/arm/eabi/fegetexcept.c +++ b/sysdeps/arm/eabi/fegetexcept.c @@ -24,12 +24,12 @@ #include #include #include -#include +#include int fegetexcept (void) { - if (GLRO (dl_hwcap) & HWCAP_VFP) + if (GLRO (dl_hwcap) & HWCAP_ARM_VFP) { unsigned long temp; diff --git a/sysdeps/arm/eabi/fegetround.c b/sysdeps/arm/eabi/fegetround.c index 1c4be04e65..6a3442aa40 100644 --- a/sysdeps/arm/eabi/fegetround.c +++ b/sysdeps/arm/eabi/fegetround.c @@ -23,12 +23,12 @@ #include #include #include -#include +#include int fegetround (void) { - if (GLRO (dl_hwcap) & HWCAP_VFP) + if (GLRO (dl_hwcap) & HWCAP_ARM_VFP) { unsigned int temp; diff --git a/sysdeps/arm/eabi/feholdexcpt.c b/sysdeps/arm/eabi/feholdexcpt.c index 9872ea17be..33c88e7d10 100644 --- a/sysdeps/arm/eabi/feholdexcpt.c +++ b/sysdeps/arm/eabi/feholdexcpt.c @@ -23,12 +23,12 @@ #include #include #include -#include +#include int feholdexcept (fenv_t *envp) { - if (GLRO (dl_hwcap) & HWCAP_VFP) + if (GLRO (dl_hwcap) & HWCAP_ARM_VFP) { unsigned long int temp; diff --git a/sysdeps/arm/eabi/fesetenv.c b/sysdeps/arm/eabi/fesetenv.c index bf253848bc..c47aa6582a 100644 --- a/sysdeps/arm/eabi/fesetenv.c +++ b/sysdeps/arm/eabi/fesetenv.c @@ -23,12 +23,12 @@ #include #include #include -#include +#include int __fesetenv (const fenv_t *envp) { - if (GLRO (dl_hwcap) & HWCAP_VFP) + if (GLRO (dl_hwcap) & HWCAP_ARM_VFP) { unsigned int temp; diff --git a/sysdeps/arm/eabi/fesetround.c b/sysdeps/arm/eabi/fesetround.c index f6e20cb72d..5523522822 100644 --- a/sysdeps/arm/eabi/fesetround.c +++ b/sysdeps/arm/eabi/fesetround.c @@ -23,12 +23,12 @@ #include #include #include -#include +#include int fesetround (int round) { - if (GLRO (dl_hwcap) & HWCAP_VFP) + if (GLRO (dl_hwcap) & HWCAP_ARM_VFP) { fpu_control_t temp; diff --git a/sysdeps/arm/eabi/fraiseexcpt.c b/sysdeps/arm/eabi/fraiseexcpt.c index c0ab419673..53ccd9d01f 100644 --- a/sysdeps/arm/eabi/fraiseexcpt.c +++ b/sysdeps/arm/eabi/fraiseexcpt.c @@ -24,12 +24,12 @@ #include #include #include -#include +#include int feraiseexcept (int excepts) { - if (GLRO (dl_hwcap) & HWCAP_VFP) + if (GLRO (dl_hwcap) & HWCAP_ARM_VFP) { int fpscr; const float fp_zero = 0.0, fp_one = 1.0, fp_max = FLT_MAX, diff --git a/sysdeps/arm/eabi/fsetexcptflg.c b/sysdeps/arm/eabi/fsetexcptflg.c index e76d746196..2e05514f11 100644 --- a/sysdeps/arm/eabi/fsetexcptflg.c +++ b/sysdeps/arm/eabi/fsetexcptflg.c @@ -24,12 +24,12 @@ #include #include #include -#include +#include int __fesetexceptflag (const fexcept_t *flagp, int excepts) { - if (GLRO (dl_hwcap) & HWCAP_VFP) + if (GLRO (dl_hwcap) & HWCAP_ARM_VFP) { fexcept_t temp; diff --git a/sysdeps/arm/eabi/ftestexcept.c b/sysdeps/arm/eabi/ftestexcept.c index 230ccbdcec..846bb01956 100644 --- a/sysdeps/arm/eabi/ftestexcept.c +++ b/sysdeps/arm/eabi/ftestexcept.c @@ -23,12 +23,12 @@ #include #include #include -#include +#include int fetestexcept (int excepts) { - if (GLRO (dl_hwcap) & HWCAP_VFP) + if (GLRO (dl_hwcap) & HWCAP_ARM_VFP) { fexcept_t temp; diff --git a/sysdeps/arm/eabi/setfpucw.c b/sysdeps/arm/eabi/setfpucw.c index 2bd1f55619..cd680df6f9 100644 --- a/sysdeps/arm/eabi/setfpucw.c +++ b/sysdeps/arm/eabi/setfpucw.c @@ -23,12 +23,12 @@ #include #include #include -#include +#include void __setfpucw (fpu_control_t set) { - if (GLRO (dl_hwcap) & HWCAP_VFP) + if (GLRO (dl_hwcap) & HWCAP_ARM_VFP) { fpu_control_t cw; From c1d7a56c38233b3ea34a5cb1f09be292446bb369 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Tue, 31 Oct 2006 17:21:40 +0000 Subject: [PATCH 3672/4487] * sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h (DOCARGS_6): Change ".pad #20" to ".pad #16". --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index ec5f05e8a3..48c1a74a63 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2006-10-21 Joseph S. Myers + + * sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h + (DOCARGS_6): Change ".pad #20" to ".pad #16". + 2006-10-31 Joseph S. Myers * sysdeps/arm/eabi/fclrexcpt.c: Include instead of diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h index 92fe90385f..aa1cfea728 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h @@ -94,7 +94,7 @@ # define UNDOCARGS_5 ldmfd sp!, {r0, r1, r2, r3}; .fnend; .fnstart; .save {r4}; .save {r7, lr}; .pad #4 # define RESTORE_LR_5 ldmfd sp!, {r4, r7, lr} -# define DOCARGS_6 .save {r4, r5}; stmfd sp!, {r0, r1, r2, r3, r7, lr}; .save {r7, lr}; .pad #20 +# define DOCARGS_6 .save {r4, r5}; stmfd sp!, {r0, r1, r2, r3, r7, lr}; .save {r7, lr}; .pad #16 # define UNDOCARGS_6 ldmfd sp!, {r0, r1, r2, r3}; .fnend; .fnstart; .save {r4, r5}; .save {r7, lr} # define RESTORE_LR_6 RESTORE_LR_0 From 80d6637fd2862a4eef1a581a2ffbb75cb2de8398 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Tue, 31 Oct 2006 17:39:02 +0000 Subject: [PATCH 3673/4487] * sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h (RTLD_SINGLE_THREAD_P): Define. --- ChangeLog.arm | 7 ++++++- sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h | 6 ++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 48c1a74a63..88c3c873a3 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,4 +1,9 @@ -2006-10-21 Joseph S. Myers +2006-10-31 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h + (RTLD_SINGLE_THREAD_P): Define. + +2006-10-31 Joseph S. Myers * sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h (DOCARGS_6): Change ".pad #20" to ".pad #16". diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h index aa1cfea728..73912d5174 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h @@ -151,3 +151,9 @@ extern int __local_multiple_threads attribute_hidden; # define NO_CANCELLATION 1 #endif + +#ifndef __ASSEMBLER__ +# define RTLD_SINGLE_THREAD_P \ + __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ + header.multiple_threads) == 0, 1) +#endif From 3ed8d993f9ff5a68606a4c20d87e70f981fc227c Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Tue, 31 Oct 2006 17:39:15 +0000 Subject: [PATCH 3674/4487] * sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h (RTLD_SINGLE_THREAD_P): Define. * sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h: Likewise. --- ChangeLog.mips | 6 ++++++ sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h | 6 ++++++ sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/ChangeLog.mips b/ChangeLog.mips index 9c0ccf5480..7c46aa117c 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,9 @@ +2006-10-31 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h + (RTLD_SINGLE_THREAD_P): Define. + * sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h: Likewise. + 2006-10-31 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/fcntl.h (splice): Update diff --git a/sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h index e184c91236..7e9d4bfa9c 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h @@ -181,3 +181,9 @@ # define NO_CANCELLATION 1 #endif + +#ifndef __ASSEMBLER__ +# define RTLD_SINGLE_THREAD_P \ + __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ + header.multiple_threads) == 0, 1) +#endif diff --git a/sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h index 02508e2155..f2bf2d7129 100644 --- a/sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h @@ -168,3 +168,9 @@ # define NO_CANCELLATION 1 #endif + +#ifndef __ASSEMBLER__ +# define RTLD_SINGLE_THREAD_P \ + __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ + header.multiple_threads) == 0, 1) +#endif From d396ccd5ec2c37a162608ad64bbf6319aac9da2e Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Sat, 11 Nov 2006 14:33:27 +0000 Subject: [PATCH 3675/4487] 2006-11-10 Carlos O'Donell * sysdeps/hppa/nptl/pthread_spin_init.c: New file. * sysdeps/hppa/nptl/pthread_spin_unlock.c: Remove strong alias to pthread_spin_init. * sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h: Define RTLD_SINGLE_THREAD_P. 2006-09-20 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h (splice): Add offin and offout arguments to the prototype. --- ChangeLog.hppa | 13 +++++++++ sysdeps/hppa/nptl/pthread_spin_init.c | 29 +++++++++++++++++++ sysdeps/hppa/nptl/pthread_spin_unlock.c | 7 ----- sysdeps/unix/sysv/linux/hppa/bits/fcntl.h | 3 +- .../unix/sysv/linux/hppa/nptl/sysdep-cancel.h | 9 +++++- 5 files changed, 52 insertions(+), 9 deletions(-) create mode 100644 sysdeps/hppa/nptl/pthread_spin_init.c diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 8d3132f949..429c6c2a31 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,16 @@ +2006-11-10 Carlos O'Donell + + * sysdeps/hppa/nptl/pthread_spin_init.c: New file. + * sysdeps/hppa/nptl/pthread_spin_unlock.c: Remove strong alias + to pthread_spin_init. + * sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h: Define + RTLD_SINGLE_THREAD_P. + +2006-09-20 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h (splice): Add offin + and offout arguments to the prototype. + 2006-09-15 Carlos O'Donell * sysdeps/hppa/nptl/tcb-offsets.sym: Define TID_THREAD_OFFSET. diff --git a/sysdeps/hppa/nptl/pthread_spin_init.c b/sysdeps/hppa/nptl/pthread_spin_init.c new file mode 100644 index 0000000000..95b9eb8aab --- /dev/null +++ b/sysdeps/hppa/nptl/pthread_spin_init.c @@ -0,0 +1,29 @@ +/* Copyright (C) 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 + 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. */ + +#include "pthreadP.h" + +int +pthread_spin_init (pthread_spinlock_t *lock, int pshared) +{ + int tmp = 0; + /* This should be a memory barrier to newer compilers */ + __asm__ __volatile__ ("stw,ma %1,0(%0)" + : : "r" (lock), "r" (tmp) : "memory"); + return 0; +} diff --git a/sysdeps/hppa/nptl/pthread_spin_unlock.c b/sysdeps/hppa/nptl/pthread_spin_unlock.c index 463d23c97f..4b1b2beb62 100644 --- a/sysdeps/hppa/nptl/pthread_spin_unlock.c +++ b/sysdeps/hppa/nptl/pthread_spin_unlock.c @@ -16,21 +16,14 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -/* Ugly hack to avoid the declaration of pthread_spin_init. */ -#define pthread_spin_init pthread_spin_init_XXX #include "pthreadP.h" -#undef pthread_spin_init int pthread_spin_unlock (pthread_spinlock_t *lock) { -#if 0 - volatile unsigned int *a = __ldcw_align (lock); -#endif int tmp = 0; /* This should be a memory barrier to newer compilers */ __asm__ __volatile__ ("stw,ma %1,0(%0)" : : "r" (lock), "r" (tmp) : "memory"); return 0; } -strong_alias (pthread_spin_unlock, pthread_spin_init) diff --git a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h index fc7075841b..328df54a33 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h @@ -210,7 +210,8 @@ extern int 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) +extern int splice (int __fdin, __off64_t *offin, int __fdout, + __off64_t *__offout, size_t __len, unsigned int __flags) __THROW; /* In-kernel implementation of tee for pipe buffers. */ diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h index 2d3de3efed..375f7324d9 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h @@ -212,4 +212,11 @@ L(pre_end): ASM_LINE_SEP \ # define NO_CANCELLATION 1 #endif -/* !defined NOT_IN_libc || defined IS_IN_libpthread */ +/* !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt */ + +#ifndef __ASSEMBLER__ +# define RTLD_SINGLE_THREAD_P \ + __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ + header.multiple_threads) == 0, 1) +#endif + From 3de1043772e3ec22c32af472d2ca7cd6ab12b467 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Wed, 22 Nov 2006 15:13:11 +0000 Subject: [PATCH 3676/4487] 2006-10-05 Steven Munroe [BZ #2749] * sysdeps/powerpc/nofpu/Makefile [subdirs-soft-fp] (sysdep_routines): Remove gcc-quad-routines. [subdirs-math] (CPPFLAGS): Add -I../soft-fp. [subdirs-math] (CFLAGS-e_powl.c): Add -fno-builtin-fabsl. [subdirs-math] (CFLAGS-s_ccoshl.c): Likewise. [subdirs-math] (CFLAGS-s_csinhl.c): Likewise. [subdirs-math] (CFLAGS-s_clogl.c): Likewise. [subdirs-math] (CFLAGS-s_clog10l.c): Likewise. [subdirs-math] (CFLAGS-s_csinl.c): Likewise. [subdirs-math] (CFLAGS-s_csqrtl.c): Likewise. * sysdeps/powerpc/nofpu/Versions (GLIBC_2.3.2): Remove __fixtfdi, __fixtfsi, and __trunctfsf2. (GLIBC_2.4): Remove __floatunditf, __floatunsitf, and __unordtf2. Add __nedf2, __nesf2, __gtdf2, __gtsf2, __ltdf2, __ltsf2. * sysdeps/powerpc/nofpu/libm-test-ulps: Update for soft-fp. * sysdeps/powerpc/soft-fp/sfp-machine.h: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/Implies: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/swapcontext.S: New file. --- ChangeLog.powerpc | 28 ++ sysdeps/powerpc/nofpu/Makefile | 16 +- sysdeps/powerpc/nofpu/Versions | 12 +- sysdeps/powerpc/nofpu/libm-test-ulps | 428 +++++++++++++++++- sysdeps/powerpc/soft-fp/sfp-machine.h | 63 +++ .../linux/powerpc/powerpc32/nofpu/Implies | 2 + .../powerpc/powerpc32/nofpu/getcontext.S | 59 +++ .../powerpc/powerpc32/nofpu/setcontext.S | 59 +++ .../powerpc/powerpc32/nofpu/swapcontext.S | 59 +++ 9 files changed, 714 insertions(+), 12 deletions(-) create mode 100644 sysdeps/powerpc/soft-fp/sfp-machine.h create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/Implies create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/swapcontext.S diff --git a/ChangeLog.powerpc b/ChangeLog.powerpc index b04ad8c34f..aee24e2071 100644 --- a/ChangeLog.powerpc +++ b/ChangeLog.powerpc @@ -1,3 +1,31 @@ +2006-10-05 Steven Munroe + + [BZ #2749] + * sysdeps/powerpc/nofpu/Makefile + [subdirs-soft-fp] (sysdep_routines): Remove gcc-quad-routines. + [subdirs-math] (CPPFLAGS): Add -I../soft-fp. + [subdirs-math] (CFLAGS-e_powl.c): Add -fno-builtin-fabsl. + [subdirs-math] (CFLAGS-s_ccoshl.c): Likewise. + [subdirs-math] (CFLAGS-s_csinhl.c): Likewise. + [subdirs-math] (CFLAGS-s_clogl.c): Likewise. + [subdirs-math] (CFLAGS-s_clog10l.c): Likewise. + [subdirs-math] (CFLAGS-s_csinl.c): Likewise. + [subdirs-math] (CFLAGS-s_csqrtl.c): Likewise. + * sysdeps/powerpc/nofpu/Versions (GLIBC_2.3.2): Remove __fixtfdi, + __fixtfsi, and __trunctfsf2. + (GLIBC_2.4): Remove __floatunditf, __floatunsitf, and __unordtf2. + Add __nedf2, __nesf2, __gtdf2, __gtsf2, __ltdf2, __ltsf2. + * sysdeps/powerpc/nofpu/libm-test-ulps: Update for soft-fp. + * sysdeps/powerpc/soft-fp/sfp-machine.h: New file. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/Implies: New file. + + * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S: + New file. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S: + New file. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/swapcontext.S: + New file. + 2006-01-27 Roland McGrath * sysdeps/powerpc/nofpu/Subdirs: New file. diff --git a/sysdeps/powerpc/nofpu/Makefile b/sysdeps/powerpc/nofpu/Makefile index 9fde4a51a9..c91acd91f1 100644 --- a/sysdeps/powerpc/nofpu/Makefile +++ b/sysdeps/powerpc/nofpu/Makefile @@ -2,9 +2,23 @@ ifeq ($(subdir),soft-fp) sysdep_routines += $(gcc-single-routines) $(gcc-double-routines) \ - $(gcc-quad-routines) sim-full + sim-full endif ifeq ($(subdir),math) libm-support += fenv_const fe_nomask +CPPFLAGS += -I../soft-fp/ +# The follow CFLAGS are a work around for GCC Bugzilla Bug 29253 +# "expand_abs wrong default code for floating point" +# As this is not a regression, a fix is not likely to go into +# gcc-4.1.1 and may be too late for gcc-4.2. So we need these flags +# until the fix in a gcc release and glibc drops support for earlier +# versions of gcc. +CFLAGS-e_powl.c += -fno-builtin-fabsl +CFLAGS-s_ccoshl.c += -fno-builtin-fabsl +CFLAGS-s_csinhl.c += -fno-builtin-fabsl +CFLAGS-s_clogl.c += -fno-builtin-fabsl +CFLAGS-s_clog10l.c += -fno-builtin-fabsl +CFLAGS-s_csinl.c += -fno-builtin-fabsl +CFLAGS-s_csqrtl.c += -fno-builtin-fabsl endif diff --git a/sysdeps/powerpc/nofpu/Versions b/sysdeps/powerpc/nofpu/Versions index 037af68281..1a29319d5a 100644 --- a/sysdeps/powerpc/nofpu/Versions +++ b/sysdeps/powerpc/nofpu/Versions @@ -3,16 +3,18 @@ libc { __sim_exceptions; __sim_disabled_exceptions; __sim_round_mode; __adddf3; __addsf3; __divdf3; __divsf3; __eqdf2; __eqsf2; __extendsfdf2; __fixdfdi; __fixdfsi; __fixsfdi; __fixsfsi; - __fixtfdi; __fixtfsi; __fixunsdfdi; __fixunsdfsi; __fixunssfdi; __fixunssfsi; __floatdidf; __floatdisf; __floatsidf; __floatsisf; __gedf2; __gesf2; __ledf2; __lesf2; __muldf3; __mulsf3; __negdf2; __negsf2; __sqrtdf2; __sqrtsf2; __subdf3; - __subsf3; __truncdfsf2; __trunctfsf2; + __subsf3; __truncdfsf2; } GLIBC_2.4 { - __floatundidf; __floatundisf; __floatunditf; - __floatunsidf; __floatunsisf; __floatunsitf; - __unorddf2; __unordsf2; __unordtf2; + __floatundidf; __floatundisf; + __floatunsidf; __floatunsisf; + __unorddf2; __unordsf2; + __nedf2; __nesf2; + __gtdf2; __gtsf2; + __ltdf2; __ltsf2; } } diff --git a/sysdeps/powerpc/nofpu/libm-test-ulps b/sysdeps/powerpc/nofpu/libm-test-ulps index 73172b49a0..c7d58be414 100644 --- a/sysdeps/powerpc/nofpu/libm-test-ulps +++ b/sysdeps/powerpc/nofpu/libm-test-ulps @@ -1,5 +1,15 @@ # Begin of automatic generation +# acos +Test "acos (2e-17) == 1.57079632679489659923132169163975144": +ildouble: 1 +ldouble: 1 + +# asin +Test "asin (0.75) == 0.848062078981481008052944338998418080": +ildouble: 2 +ldouble: 2 + # atan2 Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025": float: 3 @@ -10,23 +20,33 @@ ifloat: 3 Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "atan2 (-0.00756827042671106339, -.001792735857538728036) == -1.80338464113663849327153994379639112": +ildouble: 1 +ldouble: 1 # atanh Test "atanh (0.75) == 0.972955074527656652552676371721589865": float: 1 ifloat: 1 +# cabs +Test "cabs (0.75 + 1.25 i) == 1.45773797371132511771853821938639577": +ildouble: 1 +ldouble: 1 + # cacosh -Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i": +Test "Real part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": double: 1 -float: 7 +float: 1 idouble: 1 -ifloat: 7 -Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i": +ifloat: 1 +Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": double: 1 -float: 3 +float: 1 idouble: 1 -ifloat: 3 +ifloat: 1 # casin Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": @@ -34,6 +54,11 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (-2 - 3 i) == -0.57065278432109940071028387968566963 - 1.9833870299165354323470769028940395 i": +ildouble: 1 +ldouble: 1 # casinh Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": @@ -41,11 +66,15 @@ double: 5 float: 1 idouble: 5 ifloat: 1 +ildouble: 4 +ldouble: 4 Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": double: 3 float: 6 idouble: 3 ifloat: 6 +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": float: 1 ifloat: 1 @@ -59,11 +88,15 @@ ifloat: 1 Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": float: 3 ifloat: 3 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: catan (0.75 + 1.25 i) == 1.10714871779409050301706546017853704 + 0.549306144334054845697622618461262852 i": float: 4 ifloat: 4 @@ -118,77 +151,132 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 +ildouble: 2 +ldouble: 2 # cexp Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": float: 1 ifloat: 1 +Test "Imaginary part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": +ildouble: 1 +ldouble: 1 Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": float: 1 ifloat: 1 +ildouble: 2 +ldouble: 2 # clog Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i": float: 3 ifloat: 3 +ildouble: 1 +ldouble: 1 Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i": float: 1 ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i": +ildouble: 1 +ldouble: 1 # clog10 Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i": float: 1 ifloat: 1 +double: 1 +idouble: 1 Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i": float: 1 ifloat: 1 +double: 1 +idouble: 1 Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i": double: 1 float: 5 idouble: 1 ifloat: 5 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i": float: 1 ifloat: 1 +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i": float: 1 ifloat: 1 +double: 1 +idouble: 1 Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i": float: 1 ifloat: 1 +double: 1 +idouble: 1 Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i": float: 1 ifloat: 1 +double: 1 +idouble: 1 Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i": float: 1 ifloat: 1 +double: 1 +idouble: 1 Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i": float: 1 ifloat: 1 +double: 1 +idouble: 1 Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i": float: 1 ifloat: 1 +double: 1 +idouble: 1 Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i": float: 1 ifloat: 1 +double: 1 +idouble: 1 Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i": float: 1 ifloat: 1 +ildouble: 3 +ldouble: 3 Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i": float: 1 ifloat: 1 +double: 1 +idouble: 1 Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i": float: 1 ifloat: 1 +double: 1 +idouble: 1 Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i": float: 1 ifloat: 1 +double: 1 +idouble: 1 Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i": float: 1 ifloat: 1 +double: 1 +idouble: 1 +Test "Imaginary part of: clog10 (-inf + inf i) == inf + 3/4 pi*log10(e) i": +double: 1 +idouble: 1 # cos Test "cos (M_PI_6l * 2.0) == 0.5": @@ -211,19 +299,34 @@ ifloat: 1 Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i": double: 1 float: 4 idouble: 1 ifloat: 4 +Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i": +ildouble: 2 +ldouble: 2 Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i": double: 2 float: 3 idouble: 2 ifloat: 3 +ildouble: 1 +ldouble: 1 +Test "Real part of: cpow (2 + 0 i, 10 + 0 i) == 1024.0 + 0.0 i": +ildouble: 1 +ldouble: 1 Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": double: 1 float: 4 @@ -232,22 +335,32 @@ ifloat: 4 Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": float: 2 ifloat: 2 +ildouble: 2 +ldouble: 2 Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i": double: 2 float: 2 idouble: 2 ifloat: 2 +ildouble: 2 +ldouble: 2 # csinh Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i": double: 1 idouble: 1 +ldouble: 1 +ildouble: 1 Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": float: 1 ifloat: 1 +ldouble: 1 +ildouble: 1 Test "Imaginary part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": float: 1 ifloat: 1 +ldouble: 1 +ildouble: 1 # csqrt Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": @@ -277,6 +390,8 @@ ifloat: 1 Test "Real part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 # erf Test "erf (1.25) == 0.922900128256458230136523481197281140": @@ -291,22 +406,41 @@ Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8": double: 1 idouble: 1 +# exp +Test "exp (0.75) == 2.11700001661267466854536981983709561": +ildouble: 1 +ldouble: 1 +Test "exp (50.0) == 5184705528587072464087.45332293348538": +ildouble: 1 +ldouble: 1 + # exp10 Test "exp10 (-1) == 0.1": double: 2 float: 1 idouble: 2 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "exp10 (0.75) == 5.62341325190349080394951039776481231": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "exp10 (3) == 1000": double: 6 float: 2 idouble: 6 ifloat: 2 +ildouble: 8 +ldouble: 8 + +# exp2 +Test "exp2 (10) == 1024": +ildouble: 2 +ldouble: 2 # expm1 Test "expm1 (0.75) == 1.11700001661267466854536981983709561": @@ -315,6 +449,8 @@ idouble: 1 Test "expm1 (1) == M_El - 1.0": float: 1 ifloat: 1 +double: 1 +idouble: 1 # hypot Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271": @@ -341,6 +477,9 @@ ifloat: 1 Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 +Test "hypot (0.75, 1.25) == 1.45773797371132511771853821938639577": +ildouble: 1 +ldouble: 1 # j0 Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1": @@ -372,12 +511,16 @@ ifloat: 1 Test "j1 (10.0) == 0.0434727461688614366697487680258592883": float: 2 ifloat: 2 +ildouble: 1 +ldouble: 1 Test "j1 (2.0) == 0.576724807756873387202448242269137087": double: 1 idouble: 1 Test "j1 (8.0) == 0.234636346853914624381276651590454612": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 # jn Test "jn (0, -4.0) == -3.9714980986384737228659076845169804197562E-1": @@ -385,6 +528,8 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "jn (0, 0.75) == 0.864242275166648623555731103820923211": float: 1 ifloat: 1 @@ -393,6 +538,8 @@ double: 2 float: 1 idouble: 2 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "jn (0, 2.0) == 0.223890779141235668051827454649948626": float: 2 ifloat: 2 @@ -401,36 +548,57 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "jn (0, 8.0) == 0.171650807137553906090869407851972001": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "jn (1, 10.0) == 0.0434727461688614366697487680258592883": float: 2 ifloat: 2 +ildouble: 1 +ldouble: 1 Test "jn (1, 2.0) == 0.576724807756873387202448242269137087": double: 1 idouble: 1 Test "jn (1, 8.0) == 0.234636346853914624381276651590454612": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 +Test "jn (10, -1.0) == 0.263061512368745320699785368779050294e-9": +ildouble: 1 +ldouble: 1 Test "jn (10, 0.125) == 0.250543369809369890173993791865771547e-18": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "jn (10, 0.75) == 0.149621713117596814698712483621682835e-10": double: 1 float: 1 idouble: 1 ifloat: 1 +Test "jn (10, 1.0) == 0.263061512368745320699785368779050294e-9": +ildouble: 1 +ldouble: 1 Test "jn (10, 10.0) == 0.207486106633358857697278723518753428": double: 4 float: 3 idouble: 4 ifloat: 3 +ildouble: 4 +ldouble: 4 Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6": float: 4 ifloat: 4 +Test "jn (3, -1.0) == -0.0195633539826684059189053216217515083": +ildouble: 1 +ldouble: 1 Test "jn (3, 0.125) == 0.406503832554912875023029337653442868e-4": double: 1 float: 1 @@ -441,16 +609,23 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +Test "jn (3, 1.0) == 0.0195633539826684059189053216217515083": +ildouble: 1 +ldouble: 1 Test "jn (3, 10.0) == 0.0583793793051868123429354784103409563": double: 3 float: 1 idouble: 3 ifloat: 1 +ildouble: 2 +ldouble: 2 Test "jn (3, 2.0) == 0.128943249474402051098793332969239835": double: 1 float: 2 idouble: 1 ifloat: 2 +ildouble: 2 +ldouble: 2 # lgamma Test "lgamma (0.7) == 0.260867246531666514385732417016759578": @@ -463,6 +638,8 @@ double: 1 float: 2 idouble: 1 ifloat: 2 +ildouble: 3 +ldouble: 3 # log10 Test "log10 (0.75) == -0.124938736608299953132449886193870744": @@ -474,6 +651,11 @@ Test "log10 (e) == log10(e)": float: 1 ifloat: 1 +# log2 +Test "log2 (e) == M_LOG2El": +ldouble: 1 +ildouble: 1 + # log1p Test "log1p (-0.25) == -0.287682072451780927439219005993827432": float: 1 @@ -499,10 +681,25 @@ Test "sincos (pi/6, &sin_res, &cos_res) puts 0.866025403784438646763723170752936 float: 1 ifloat: 1 +# sinh +Test "sinh (0.75) == 0.822316731935829980703661634446913849": +ildouble: 1 +ldouble: 1 + # tan Test "tan (pi/4) == 1": double: 1 idouble: 1 +ldouble: 1 +ildouble: 1 + +# tanh +Test "tanh (-0.75) == -0.635148952387287319214434357312496495": +ildouble: 1 +ldouble: 1 +Test "tanh (0.75) == 0.635148952387287319214434357312496495": +ildouble: 1 +ldouble: 1 # tgamma Test "tgamma (-0.5) == -2 sqrt (pi)": @@ -520,11 +717,19 @@ idouble: 1 ifloat: 1 # y0 +Test "y0 (0.125) == -1.38968062514384052915582277745018693": +ildouble: 1 +ldouble: 1 +Test "y0 (0.75) == -0.137172769385772397522814379396581855": +ildouble: 1 +ldouble: 1 Test "y0 (1.0) == 0.0882569642156769579829267660235151628": double: 2 float: 1 idouble: 2 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "y0 (1.5) == 0.382448923797758843955068554978089862": double: 2 float: 1 @@ -533,11 +738,18 @@ ifloat: 1 Test "y0 (10.0) == 0.0556711672835993914244598774101900481": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "y0 (2.0) == 0.510375672649745119596606592727157873": +double: 1 +idouble: 1 Test "y0 (8.0) == 0.223521489387566220527323400498620359": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 # y1 Test "y1 (0.125) == -5.19993611253477499595928744876579921": @@ -551,23 +763,37 @@ double: 3 float: 1 idouble: 3 ifloat: 1 +ildouble: 2 +ldouble: 2 Test "y1 (2.0) == -0.107032431540937546888370772277476637": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 2 +ldouble: 2 Test "y1 (8.0) == -0.158060461731247494255555266187483550": double: 1 float: 2 idouble: 1 ifloat: 2 +ildouble: 2 +ldouble: 2 # yn +Test "yn (0, 0.125) == -1.38968062514384052915582277745018693": +ildouble: 1 +ldouble: 1 +Test "yn (0, 0.75) == -0.137172769385772397522814379396581855": +ildouble: 1 +ldouble: 1 Test "yn (0, 1.0) == 0.0882569642156769579829267660235151628": double: 2 float: 1 idouble: 2 ifloat: 1 +ildouble: 2 +ldouble: 2 Test "yn (0, 1.5) == 0.382448923797758843955068554978089862": double: 2 float: 1 @@ -576,11 +802,15 @@ ifloat: 1 Test "yn (0, 10.0) == 0.0556711672835993914244598774101900481": float: 1 ifloat: 1 +ildouble: 2 +ldouble: 2 Test "yn (0, 8.0) == 0.223521489387566220527323400498620359": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 2 +ldouble: 2 Test "yn (1, 0.125) == -5.19993611253477499595928744876579921": double: 1 idouble: 1 @@ -592,16 +822,22 @@ double: 3 float: 1 idouble: 3 ifloat: 1 +ildouble: 2 +ldouble: 2 Test "yn (1, 2.0) == -0.107032431540937546888370772277476637": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 2 +ldouble: 2 Test "yn (1, 8.0) == -0.158060461731247494255555266187483550": double: 1 float: 2 idouble: 1 ifloat: 2 +ildouble: 2 +ldouble: 2 Test "yn (10, 0.125) == -127057845771019398.252538486899753195": double: 1 idouble: 1 @@ -618,9 +854,13 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 2 +ldouble: 2 Test "yn (10, 2.0) == -129184.542208039282635913145923304214": double: 2 idouble: 2 +ildouble: 2 +ldouble: 2 Test "yn (3, 0.125) == -2612.69757350066712600220955744091741": double: 1 idouble: 1 @@ -634,58 +874,108 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 2 +ldouble: 2 Test "yn (3, 2.0) == -1.12778377684042778608158395773179238": double: 1 idouble: 1 # Maximal error of functions: +Function: "acos": +ildouble: 1 +ldouble: 1 + +Function: "acosh": +ildouble: 1 +ldouble: 1 + +Function: "asin": +ildouble: 2 +ldouble: 2 + +Function: "asinh": +ildouble: 1 +ldouble: 1 + Function: "atan2": float: 3 ifloat: 3 +ildouble: 1 +ldouble: 1 Function: "atanh": float: 1 ifloat: 1 +Function: "cabs": +ildouble: 1 +ldouble: 1 + +Function: Real part of "cacos": +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "cacos": +ildouble: 1 +ldouble: 1 + Function: Real part of "cacosh": double: 1 float: 7 idouble: 1 ifloat: 7 +ildouble: 1 +ldouble: 1 Function: Imaginary part of "cacosh": double: 1 float: 3 idouble: 1 ifloat: 3 +ildouble: 1 +ldouble: 1 Function: Real part of "casin": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "casin": +ildouble: 1 +ldouble: 1 Function: Real part of "casinh": double: 5 float: 1 idouble: 5 ifloat: 1 +ildouble: 4 +ldouble: 4 Function: Imaginary part of "casinh": double: 3 float: 6 idouble: 3 ifloat: 6 +ildouble: 1 +ldouble: 1 Function: Real part of "catan": float: 4 ifloat: 4 +ildouble: 1 +ldouble: 1 Function: Imaginary part of "catan": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: Real part of "catanh": double: 4 @@ -698,116 +988,188 @@ ifloat: 6 Function: "cbrt": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 Function: Real part of "ccos": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: Imaginary part of "ccos": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: Real part of "ccosh": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: Imaginary part of "ccosh": float: 1 ifloat: 1 +ildouble: 2 +ldouble: 2 Function: Real part of "cexp": float: 1 ifloat: 1 +ildouble: 2 +ldouble: 2 Function: Imaginary part of "cexp": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: Real part of "clog": float: 1 ifloat: 1 +ildouble: 2 +ldouble: 2 Function: Imaginary part of "clog": float: 3 ifloat: 3 +ildouble: 1 +ldouble: 1 Function: Real part of "clog10": float: 1 ifloat: 1 +ildouble: 3 +ldouble: 3 Function: Imaginary part of "clog10": double: 1 float: 5 idouble: 1 ifloat: 5 +ildouble: 1 +ldouble: 1 Function: "cos": double: 2 float: 1 idouble: 2 ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "cosh": +ildouble: 1 +ldouble: 1 Function: Real part of "cpow": double: 2 float: 4 idouble: 2 ifloat: 4 +ildouble: 2 +ldouble: 2 Function: Imaginary part of "cpow": double: 2 float: 2 idouble: 2 ifloat: 2 +ildouble: 2 +ldouble: 2 + +Function: Imaginary part of "cproj": +ildouble: 1 +ldouble: 1 + +Function: Real part of "csin": +ildouble: 1 +ldouble: 1 Function: Real part of "csinh": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: Imaginary part of "csinh": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: Real part of "csqrt": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "csqrt": +ildouble: 1 +ldouble: 1 Function: Real part of "ctan": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 Function: Imaginary part of "ctan": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 Function: Real part of "ctanh": double: 1 float: 2 idouble: 1 ifloat: 2 +ildouble: 1 +ldouble: 1 Function: Imaginary part of "ctanh": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: "erf": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 Function: "erfc": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 + +Function: "exp": +ildouble: 1 +ldouble: 1 Function: "exp10": double: 6 float: 2 idouble: 6 ifloat: 2 +ildouble: 8 +ldouble: 8 + +Function: "exp2": +ildouble: 2 +ldouble: 2 Function: "expm1": double: 1 @@ -815,76 +1177,130 @@ float: 1 idouble: 1 ifloat: 1 +Function: "gamma": +ildouble: 1 +ldouble: 1 + Function: "hypot": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: "j0": double: 2 float: 2 idouble: 2 ifloat: 2 +ildouble: 1 +ldouble: 1 Function: "j1": double: 1 float: 2 idouble: 1 ifloat: 2 +ildouble: 1 +ldouble: 1 Function: "jn": double: 4 float: 4 idouble: 4 ifloat: 4 +ildouble: 4 +ldouble: 4 Function: "lgamma": double: 1 float: 2 idouble: 1 ifloat: 2 +ildouble: 3 +ldouble: 3 + +Function: "log": +ildouble: 1 +ldouble: 1 Function: "log10": double: 1 float: 2 idouble: 1 ifloat: 2 +ildouble: 1 +ldouble: 1 Function: "log1p": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "log2": +ildouble: 1 +ldouble: 1 + +Function: "pow": +ildouble: 1 +ldouble: 1 + +Function: "sin": +ildouble: 1 +ldouble: 1 Function: "sincos": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "sinh": +ildouble: 1 +ldouble: 1 Function: "tan": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 + +Function: "tanh": +ildouble: 1 +ldouble: 1 Function: "tgamma": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: "y0": double: 2 float: 1 idouble: 2 ifloat: 1 +ildouble: 2 +ldouble: 2 Function: "y1": double: 3 float: 2 idouble: 3 ifloat: 2 +ildouble: 2 +ldouble: 2 Function: "yn": double: 3 float: 2 idouble: 3 ifloat: 2 +ildouble: 2 +ldouble: 2 # end of automatic generation diff --git a/sysdeps/powerpc/soft-fp/sfp-machine.h b/sysdeps/powerpc/soft-fp/sfp-machine.h new file mode 100644 index 0000000000..e7eafe21fd --- /dev/null +++ b/sysdeps/powerpc/soft-fp/sfp-machine.h @@ -0,0 +1,63 @@ +#define _FP_W_TYPE_SIZE 32 +#define _FP_W_TYPE unsigned long +#define _FP_WS_TYPE signed long +#define _FP_I_TYPE long + +#define _FP_MUL_MEAT_S(R,X,Y) \ + _FP_MUL_MEAT_1_wide(_FP_WFRACBITS_S,R,X,Y,umul_ppmm) +#define _FP_MUL_MEAT_D(R,X,Y) \ + _FP_MUL_MEAT_2_wide(_FP_WFRACBITS_D,R,X,Y,umul_ppmm) +#define _FP_MUL_MEAT_Q(R,X,Y) \ + _FP_MUL_MEAT_4_wide(_FP_WFRACBITS_Q,R,X,Y,umul_ppmm) + +#define _FP_DIV_MEAT_S(R,X,Y) _FP_DIV_MEAT_1_loop(S,R,X,Y) +#define _FP_DIV_MEAT_D(R,X,Y) _FP_DIV_MEAT_2_udiv(D,R,X,Y) +#define _FP_DIV_MEAT_Q(R,X,Y) _FP_DIV_MEAT_4_udiv(Q,R,X,Y) + +#define _FP_NANFRAC_S ((_FP_QNANBIT_S << 1) - 1) +#define _FP_NANFRAC_D ((_FP_QNANBIT_D << 1) - 1), -1 +#define _FP_NANFRAC_Q ((_FP_QNANBIT_Q << 1) - 1), -1, -1, -1 +#define _FP_NANSIGN_S 0 +#define _FP_NANSIGN_D 0 +#define _FP_NANSIGN_Q 0 + +#define _FP_KEEPNANFRACP 1 + +/* Someone please check this. */ +#define _FP_CHOOSENAN(fs, wc, R, X, Y, OP) \ + do { \ + if ((_FP_FRAC_HIGH_RAW_##fs(X) & _FP_QNANBIT_##fs) \ + && !(_FP_FRAC_HIGH_RAW_##fs(Y) & _FP_QNANBIT_##fs)) \ + { \ + R##_s = Y##_s; \ + _FP_FRAC_COPY_##wc(R,Y); \ + } \ + else \ + { \ + R##_s = X##_s; \ + _FP_FRAC_COPY_##wc(R,X); \ + } \ + R##_c = FP_CLS_NAN; \ + } while (0) + +/* Exception flags. We use the bit positions of the appropriate bits + in the FPSCR, which also correspond to the FE_* bits. This makes + everything easier ;-). */ +#define FP_EX_INVALID (1 << (31 - 2)) +#define FP_EX_OVERFLOW (1 << (31 - 3)) +#define FP_EX_UNDERFLOW (1 << (31 - 4)) +#define FP_EX_DENORM FP_EX_UNDERFLOW +#define FP_EX_DIVZERO (1 << (31 - 5)) +#define FP_EX_INEXACT (1 << (31 - 6)) + +#define FP_HANDLE_EXCEPTIONS __simulate_exceptions (_fex) +#define FP_ROUNDMODE __sim_round_mode + +extern int __sim_exceptions; +libc_hidden_proto (__sim_exceptions); +extern int __sim_disabled_exceptions; +libc_hidden_proto (__sim_disabled_exceptions); +extern int __sim_round_mode; +libc_hidden_proto (__sim_round_mode); + +extern void __simulate_exceptions (int x) attribute_hidden; diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/Implies new file mode 100644 index 0000000000..40836b6fb4 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/Implies @@ -0,0 +1,2 @@ +powerpc/nofpu +powerpc/soft-fp diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S new file mode 100644 index 0000000000..77af6dc518 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S @@ -0,0 +1,59 @@ +/* Save current context. + Copyright (C) 2002, 2004, 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 + 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. */ + +#include +#include +#include + +#define __ASSEMBLY__ +#include +#include "ucontext_i.h" + +#define __CONTEXT_FUNC_NAME __getcontext +#undef __CONTEXT_ENABLE_FPRS +#undef __CONTEXT_ENABLE_VRS + +#include "getcontext-common.S" + +versioned_symbol (libc, __getcontext, getcontext, GLIBC_2_3_4) + +#if SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4) + +/* For the nofpu case the old/new versions are the same function. */ +strong_alias (__getcontext, __novec_getcontext) + +compat_symbol (libc, __novec_getcontext, getcontext, GLIBC_2_3_3) + +#endif + +#if SHLIB_COMPAT (libc, GLIBC_2_1, GLIBC_2_3_3) + +#define _ERRNO_H 1 +#include + + compat_text_section +ENTRY (__getcontext_stub) + li r3,ENOSYS + b __syscall_error@local +END (__getcontext_stub) + .previous + +compat_symbol (libc, __getcontext_stub, getcontext, GLIBC_2_1) + +#endif diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S new file mode 100644 index 0000000000..95ee34c577 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S @@ -0,0 +1,59 @@ +/* Jump to a new context. + Copyright (C) 2002, 2004, 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 + 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. */ + +#include +#include +#include + +#define __ASSEMBLY__ +#include +#include "ucontext_i.h" + +#define __CONTEXT_FUNC_NAME __setcontext +#undef __CONTEXT_ENABLE_FPRS +#undef __CONTEXT_ENABLE_VRS + +#include "setcontext-common.S" + +versioned_symbol (libc, __setcontext, setcontext, GLIBC_2_3_4) + +#if SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4) + +/* For the nofpu case the old/new versions are the same function. */ +strong_alias (__setcontext, __novec_setcontext) + +compat_symbol (libc, __novec_setcontext, setcontext, GLIBC_2_3_3) + +#endif + +#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_3) + +#define _ERRNO_H 1 +#include + + compat_text_section +ENTRY (__setcontext_stub) + li r3,ENOSYS + b __syscall_error@local +END (__setcontext_stub) + .previous + +compat_symbol (libc, __setcontext_stub, setcontext, GLIBC_2_0) + +#endif diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/swapcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/swapcontext.S new file mode 100644 index 0000000000..d4934a5b3f --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/swapcontext.S @@ -0,0 +1,59 @@ +/* Save current context and jump to a new context. + Copyright (C) 2002, 2004, 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 + 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. */ + +#include +#include +#include + +#define __ASSEMBLY__ +#include +#include "ucontext_i.h" + +#define __CONTEXT_FUNC_NAME __swapcontext +#undef __CONTEXT_ENABLE_FPRS +#undef __CONTEXT_ENABLE_VRS + +# include "swapcontext-common.S" + +versioned_symbol (libc, __swapcontext, swapcontext, GLIBC_2_3_4) + +#if SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4) + +/* For the nofpu case the old/new versions are the same function. */ +strong_alias (__swapcontext, __novec_swapcontext) + +compat_symbol (libc, __novec_swapcontext, swapcontext, GLIBC_2_3_3) + +#endif + +#if SHLIB_COMPAT (libc, GLIBC_2_1, GLIBC_2_3_3) + +#define _ERRNO_H 1 +#include + + compat_text_section +ENTRY (__swapcontext_stub) + li r3,ENOSYS + b __syscall_error@local +END (__swapcontext_stub) + .previous + +compat_symbol (libc, __swapcontext_stub, swapcontext, GLIBC_2_1) + +#endif From 5dde01821ab359d51bc84d866654afe65102c32d Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 27 Nov 2006 23:03:17 +0000 Subject: [PATCH 3677/4487] * sysdeps/unix/sysv/linux/m68k/sysdep.h (DOARGS_6, _DOARGS_6) (UNDOARGS_6): Define for 6-argument syscall stubs. --- ChangeLog.m68k | 5 +++++ sysdeps/unix/sysv/linux/m68k/sysdep.h | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 44cdd8f33c..51f6dfa022 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2006-11-28 Andreas Schwab + + * sysdeps/unix/sysv/linux/m68k/sysdep.h (DOARGS_6, _DOARGS_6) + (UNDOARGS_6): Define for 6-argument syscall stubs. + 2006-10-03 Andreas Schwab * sysdeps/m68k/setjmp.c: Use __builtin_return_address and diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h index be37c894a1..12687d8054 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998, 2000, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998, 2000, 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Andreas Schwab, , December 1995. @@ -195,6 +195,10 @@ SYSCALL_ERROR_LABEL: \ #define _DOARGS_5(n) move.l %d5, -(%sp); move.l n+4(%sp), %d5; _DOARGS_4 (n) #define UNDOARGS_5 UNDOARGS_4; move.l (%sp)+, %d5 +#define DOARGS_6 _DOARGS_6 (24) +#define _DOARGS_6(n) _DOARGS_5 (n-4); move.l %a0, -(%sp); move.l n+12(%sp), %a0; +#define UNDOARGS_6 move.l (%sp)+, %a0; UNDOARGS_5 + #define ret rts #if 0 /* Not used by Linux */ From 3ad1f14c7aef8982a7943e516477484dceb7abe0 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Sun, 3 Dec 2006 23:03:20 +0000 Subject: [PATCH 3678/4487] 2006-12-03 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/bits/atomic.h: Remove non-atomic versions. Adjust jump target to '0b'. 2006-12-03 Carlos O'Donell * sysdeps/hppa/Makefile: Set long-double-fcts to `no'. * sysdeps/hppa/fpu/libm-test-ulps: Regenerate. * sysdeps/hppa/fpu/bits/mathdef.h: New file. --- ChangeLog.hppa | 11 + sysdeps/hppa/Makefile | 5 + sysdeps/hppa/fpu/bits/mathdef.h | 40 ++ sysdeps/hppa/fpu/libm-test-ulps | 727 ++++++++++++++++++--- sysdeps/unix/sysv/linux/hppa/bits/atomic.h | 37 +- 5 files changed, 711 insertions(+), 109 deletions(-) create mode 100644 sysdeps/hppa/fpu/bits/mathdef.h diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 429c6c2a31..9c05eb1be9 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,14 @@ +2006-12-03 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/bits/atomic.h: Remove non-atomic + versions. Adjust jump target to '0b'. + +2006-12-03 Carlos O'Donell + + * sysdeps/hppa/Makefile: Set long-double-fcts to `no'. + * sysdeps/hppa/fpu/libm-test-ulps: Regenerate. + * sysdeps/hppa/fpu/bits/mathdef.h: New file. + 2006-11-10 Carlos O'Donell * sysdeps/hppa/nptl/pthread_spin_init.c: New file. diff --git a/sysdeps/hppa/Makefile b/sysdeps/hppa/Makefile index 73947031dc..3cdd6c8740 100644 --- a/sysdeps/hppa/Makefile +++ b/sysdeps/hppa/Makefile @@ -39,3 +39,8 @@ sysdep_routines += libgcc-compat shared-only-routines += libgcc-compat endif endif + +# We implement a 64-bit `long double'. The standard says we can do this. +# This means our `long double' and `double' are identical. +long-double-fcts = no + diff --git a/sysdeps/hppa/fpu/bits/mathdef.h b/sysdeps/hppa/fpu/bits/mathdef.h new file mode 100644 index 0000000000..8734ba14a0 --- /dev/null +++ b/sysdeps/hppa/fpu/bits/mathdef.h @@ -0,0 +1,40 @@ +/* Copyright (C) 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 + 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. */ + +#if !defined _MATH_H && !defined _COMPLEX_H +# error "Never use directly; include instead" +#endif + +#if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF +# define _MATH_H_MATHDEF 1 + +/* GCC does not promote `float' values to `double'. */ +typedef float float_t; /* `float' expressions are evaluated as + `float'. */ +typedef double double_t; /* `double' expressions are evaluated as + `double'. */ + +/* The values returned by `ilogb' for 0 and NaN respectively. */ +# define FP_ILOGB0 (-2147483647) +# define FP_ILOGBNAN (2147483647) + +#endif /* ISO C99 */ + +/* On hppa `long double' is 64-bits. */ +#undef __NO_LONG_DOUBLE_MATH + diff --git a/sysdeps/hppa/fpu/libm-test-ulps b/sysdeps/hppa/fpu/libm-test-ulps index c4ffefaa86..b8ec3d25f4 100644 --- a/sysdeps/hppa/fpu/libm-test-ulps +++ b/sysdeps/hppa/fpu/libm-test-ulps @@ -1,15 +1,12 @@ # Begin of automatic generation # atan2 -Test "atan2 (-0.00756827042671106339, -.001792735857538728036) == -1.80338464113663849327153994380": -float: 6 -ifloat: 6 Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025": -float: 3 -ifloat: 3 +float: 1 +ifloat: 1 Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025": -float: 3 -ifloat: 3 +float: 1 +ifloat: 1 Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772": float: 1 ifloat: 1 @@ -20,16 +17,9 @@ float: 1 ifloat: 1 # cacosh -Test "Real part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": -double: 1 -float: 7 -idouble: 1 -ifloat: 7 Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": -double: 1 -float: 3 -idouble: 1 -ifloat: 3 +float: 1 +ifloat: 1 # casin Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": @@ -37,6 +27,8 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 # casinh Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": @@ -44,11 +36,15 @@ double: 5 float: 1 idouble: 5 ifloat: 1 +ildouble: 5 +ldouble: 5 Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": double: 3 float: 6 idouble: 3 ifloat: 6 +ildouble: 3 +ldouble: 3 Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": float: 1 ifloat: 1 @@ -57,44 +53,46 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 # catan -Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": -float: 3 -ifloat: 3 Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Real part of: catan (0.75 + 1.25 i) == 1.10714871779409050301706546017853704 + 0.549306144334054845697622618461262852 i": -float: 4 -ifloat: 4 +ildouble: 1 +ldouble: 1 # catanh Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": double: 4 idouble: 4 -Test "Imaginary part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": -float: 4 -ifloat: 4 +ildouble: 4 +ldouble: 4 Test "Real part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i": double: 1 idouble: 1 -Test "Imaginary part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i": -float: 6 -ifloat: 6 +ildouble: 1 +ldouble: 1 # cbrt Test "cbrt (-27.0) == -3.0": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 Test "cbrt (0.75) == 0.908560296416069829445605878163630251": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 Test "cbrt (0.9921875) == 0.997389022060725270579075195353955217": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 # ccos Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i": @@ -105,6 +103,8 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": float: 1 ifloat: 1 @@ -121,10 +121,32 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": float: 1 ifloat: 1 +# ceil +Test "ceil (-4503599627370496.75) == -4503599627370496.0": +ildouble: 1 +ldouble: 1 +Test "ceil (-4503599627370497.5) == -4503599627370497.0": +ildouble: 1 +ldouble: 1 +Test "ceil (-9007199254740991.5) == -9007199254740991.0": +ildouble: 1 +ldouble: 1 +Test "ceil (-9007199254740993.5) == -9007199254740993.0": +ildouble: 1 +ldouble: 1 +Test "ceil (4503599627370496.25) == 4503599627370497.0": +ildouble: 1 +ldouble: 1 +Test "ceil (4503599627370496.5) == 4503599627370497.0": +ildouble: 1 +ldouble: 1 + # cexp Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": float: 1 @@ -134,9 +156,6 @@ float: 1 ifloat: 1 # clog -Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i": -float: 3 -ifloat: 3 Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i": float: 1 ifloat: 1 @@ -150,9 +169,9 @@ float: 1 ifloat: 1 Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i": double: 1 -float: 5 idouble: 1 -ifloat: 5 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i": float: 1 ifloat: 1 @@ -196,19 +215,16 @@ ifloat: 1 # cos Test "cos (M_PI_6l * 2.0) == 0.5": double: 1 -float: 1 idouble: 1 -ifloat: 1 +ildouble: 1 +ldouble: 1 Test "cos (M_PI_6l * 4.0) == -0.5": double: 2 float: 1 idouble: 2 ifloat: 1 -Test "cos (pi/2) == 0": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 +ildouble: 2 +ldouble: 2 # cpow Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": @@ -222,16 +238,22 @@ double: 1 float: 4 idouble: 1 ifloat: 4 +ildouble: 1 +ldouble: 1 Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i": double: 2 float: 3 idouble: 2 ifloat: 3 +ildouble: 2 +ldouble: 2 Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": double: 1 float: 4 idouble: 1 ifloat: 4 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": float: 2 ifloat: 2 @@ -240,11 +262,15 @@ double: 2 float: 2 idouble: 2 ifloat: 2 +ildouble: 2 +ldouble: 2 # csinh Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": float: 1 ifloat: 1 @@ -264,6 +290,8 @@ ifloat: 1 Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 # ctanh Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": @@ -271,25 +299,35 @@ double: 1 float: 2 idouble: 1 ifloat: 2 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i": float: 1 ifloat: 1 Test "Real part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 # erf Test "erf (1.25) == 0.922900128256458230136523481197281140": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 # erfc Test "erfc (2.0) == 0.00467773498104726583793074363274707139": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 # exp10 Test "exp10 (-1) == 0.1": @@ -297,25 +335,53 @@ double: 2 float: 1 idouble: 2 ifloat: 1 +ildouble: 2 +ldouble: 2 Test "exp10 (0.75) == 5.62341325190349080394951039776481231": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "exp10 (3) == 1000": double: 6 float: 2 idouble: 6 ifloat: 2 +ildouble: 6 +ldouble: 6 # expm1 Test "expm1 (0.75) == 1.11700001661267466854536981983709561": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 Test "expm1 (1) == M_El - 1.0": float: 1 ifloat: 1 +# floor +Test "floor (-4503599627370496.25) == -4503599627370497.0": +ildouble: 1 +ldouble: 1 +Test "floor (-4503599627370496.5) == -4503599627370497.0": +ildouble: 1 +ldouble: 1 +Test "floor (4503599627370496.75) == 4503599627370496.0": +ildouble: 1 +ldouble: 1 +Test "floor (4503599627370497.5) == 4503599627370497.0": +ildouble: 1 +ldouble: 1 +Test "floor (9007199254740991.5) == 9007199254740991.0": +ildouble: 1 +ldouble: 1 +Test "floor (9007199254740993.5) == 9007199254740993.0": +ildouble: 1 +ldouble: 1 + # hypot Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271": float: 1 @@ -348,6 +414,8 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "j0 (0.75) == 0.864242275166648623555731103820923211": float: 1 ifloat: 1 @@ -356,6 +424,8 @@ double: 2 float: 1 idouble: 2 ifloat: 1 +ildouble: 2 +ldouble: 2 Test "j0 (2.0) == 0.223890779141235668051827454649948626": float: 2 ifloat: 2 @@ -364,6 +434,8 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "j0 (8.0) == 0.171650807137553906090869407851972001": float: 1 ifloat: 1 @@ -375,9 +447,13 @@ ifloat: 2 Test "j1 (2.0) == 0.576724807756873387202448242269137087": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 Test "j1 (8.0) == 0.234636346853914624381276651590454612": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 # jn Test "jn (0, -4.0) == -3.9714980986384737228659076845169804197562E-1": @@ -385,6 +461,8 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "jn (0, 0.75) == 0.864242275166648623555731103820923211": float: 1 ifloat: 1 @@ -393,6 +471,8 @@ double: 2 float: 1 idouble: 2 ifloat: 1 +ildouble: 2 +ldouble: 2 Test "jn (0, 2.0) == 0.223890779141235668051827454649948626": float: 2 ifloat: 2 @@ -401,6 +481,8 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "jn (0, 8.0) == 0.171650807137553906090869407851972001": float: 1 ifloat: 1 @@ -410,24 +492,34 @@ ifloat: 2 Test "jn (1, 2.0) == 0.576724807756873387202448242269137087": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 Test "jn (1, 8.0) == 0.234636346853914624381276651590454612": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 Test "jn (10, 0.125) == 0.250543369809369890173993791865771547e-18": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "jn (10, 0.75) == 0.149621713117596814698712483621682835e-10": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "jn (10, 10.0) == 0.207486106633358857697278723518753428": double: 4 float: 3 idouble: 4 ifloat: 3 +ildouble: 4 +ldouble: 4 Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6": float: 4 ifloat: 4 @@ -436,21 +528,29 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "jn (3, 0.75) == 0.848438342327410884392755236884386804e-2": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "jn (3, 10.0) == 0.0583793793051868123429354784103409563": double: 3 float: 1 idouble: 3 ifloat: 1 +ildouble: 3 +ldouble: 3 Test "jn (3, 2.0) == 0.128943249474402051098793332969239835": double: 1 float: 2 idouble: 1 ifloat: 2 +ildouble: 1 +ldouble: 1 # lgamma Test "lgamma (0.7) == 0.260867246531666514385732417016759578": @@ -458,11 +558,291 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1": double: 1 float: 2 idouble: 1 ifloat: 2 +ildouble: 1 +ldouble: 1 + +# llrint +Test "llrint (-72057594037927936.75) == -72057594037927937LL": +ildouble: 1 +ldouble: 1 +Test "llrint (-72057594037927937.5) == -72057594037927938LL": +ildouble: 2 +ldouble: 2 +Test "llrint (-9007199254740992.75) == -9007199254740993LL": +ildouble: 1 +ldouble: 1 +Test "llrint (72057594037927936.75) == 72057594037927937LL": +ildouble: -1 +ldouble: -1 +Test "llrint (72057594037927937.5) == 72057594037927938LL": +ildouble: -2 +ldouble: -2 +Test "llrint (9007199254740992.75) == 9007199254740993LL": +ildouble: -1 +ldouble: -1 + +# llrint_downward +Test "llrint_downward (-4503599627370496.25) == -4503599627370497LL": +ildouble: 1 +ldouble: 1 +Test "llrint_downward (-4503599627370496.4999999999999) == -4503599627370497LL": +ildouble: 1 +ldouble: 1 +Test "llrint_downward (-4503599627370496.5) == -4503599627370497LL": +ildouble: 1 +ldouble: 1 +Test "llrint_downward (-4503599627370497.4999999999999) == -4503599627370498LL": +ildouble: 1 +ldouble: 1 +Test "llrint_downward (-72057594037927936.25) == -72057594037927937LL": +ildouble: 1 +ldouble: 1 +Test "llrint_downward (-72057594037927936.5) == -72057594037927937LL": +ildouble: 1 +ldouble: 1 +Test "llrint_downward (-72057594037927936.75) == -72057594037927937LL": +ildouble: 1 +ldouble: 1 +Test "llrint_downward (-72057594037927937.5) == -72057594037927938LL": +ildouble: 2 +ldouble: 2 +Test "llrint_downward (-9007199254740991.4999999999999) == -9007199254740992LL": +ildouble: 1 +ldouble: 1 +Test "llrint_downward (-9007199254740992.25) == -9007199254740993LL": +ildouble: 1 +ldouble: 1 +Test "llrint_downward (-9007199254740992.4999999999999) == -9007199254740993LL": +ildouble: 1 +ldouble: 1 +Test "llrint_downward (-9007199254740992.5) == -9007199254740993LL": +ildouble: 1 +ldouble: 1 +Test "llrint_downward (-9007199254740992.5000000000001) == -9007199254740993LL": +ildouble: 1 +ldouble: 1 +Test "llrint_downward (-9007199254740992.75) == -9007199254740993LL": +ildouble: 1 +ldouble: 1 +Test "llrint_downward (4503599627370496.5000000000001) == 4503599627370496LL": +ildouble: 1 +ldouble: 1 +Test "llrint_downward (4503599627370496.75) == 4503599627370496LL": +ildouble: 1 +ldouble: 1 +Test "llrint_downward (4503599627370497.5) == 4503599627370497LL": +ildouble: 1 +ldouble: 1 +Test "llrint_downward (72057594037927935.5) == 72057594037927935LL": +ildouble: 1 +ldouble: 1 +Test "llrint_downward (72057594037927937.5) == 72057594037927937LL": +ildouble: -1 +ldouble: -1 +Test "llrint_downward (9007199254740991.5) == 9007199254740991LL": +ildouble: 1 +ldouble: 1 +Test "llrint_downward (9007199254740991.5000000000001) == 9007199254740991LL": +ildouble: 1 +ldouble: 1 +Test "llrint_downward (9007199254740993.4999999999999) == 9007199254740993LL": +ildouble: 1 +ldouble: 1 +Test "llrint_downward (9007199254740993.5) == 9007199254740993LL": +ildouble: 1 +ldouble: 1 +Test "llrint_downward (9007199254740993.5000000000001) == 9007199254740993LL": +ildouble: 1 +ldouble: 1 + +# llrint_tonearest +Test "llrint_tonearest (-72057594037927936.75) == -72057594037927937LL": +ildouble: 1 +ldouble: 1 +Test "llrint_tonearest (-72057594037927937.5) == -72057594037927938LL": +ildouble: 2 +ldouble: 2 +Test "llrint_tonearest (-9007199254740992.75) == -9007199254740993LL": +ildouble: 1 +ldouble: 1 +Test "llrint_tonearest (72057594037927936.75) == 72057594037927937LL": +ildouble: -1 +ldouble: -1 +Test "llrint_tonearest (72057594037927937.5) == 72057594037927938LL": +ildouble: -2 +ldouble: -2 +Test "llrint_tonearest (9007199254740992.75) == 9007199254740993LL": +ildouble: -1 +ldouble: -1 + +# llrint_towardzero +Test "llrint_towardzero (-4503599627370496.75) == -4503599627370496LL": +ildouble: -1 +ldouble: -1 +Test "llrint_towardzero (-4503599627370497.5) == -4503599627370497LL": +ildouble: -1 +ldouble: -1 +Test "llrint_towardzero (-72057594037927935.5) == -72057594037927935LL": +ildouble: -1 +ldouble: -1 +Test "llrint_towardzero (-72057594037927937.5) == -72057594037927937LL": +ildouble: 1 +ldouble: 1 +Test "llrint_towardzero (-9007199254740991.5) == -9007199254740991LL": +ildouble: -1 +ldouble: -1 +Test "llrint_towardzero (-9007199254740993.5) == -9007199254740993LL": +ildouble: -1 +ldouble: -1 +Test "llrint_towardzero (4503599627370496.75) == 4503599627370496LL": +ildouble: 1 +ldouble: 1 +Test "llrint_towardzero (4503599627370497.5) == 4503599627370497LL": +ildouble: 1 +ldouble: 1 +Test "llrint_towardzero (72057594037927935.5) == 72057594037927935LL": +ildouble: 1 +ldouble: 1 +Test "llrint_towardzero (72057594037927937.5) == 72057594037927937LL": +ildouble: -1 +ldouble: -1 +Test "llrint_towardzero (9007199254740991.5) == 9007199254740991LL": +ildouble: 1 +ldouble: 1 +Test "llrint_towardzero (9007199254740993.5) == 9007199254740993LL": +ildouble: 1 +ldouble: 1 + +# llrint_upward +Test "llrint_upward (-4503599627370496.5000000000001) == -4503599627370496LL": +ildouble: -1 +ldouble: -1 +Test "llrint_upward (-4503599627370496.75) == -4503599627370496LL": +ildouble: -1 +ldouble: -1 +Test "llrint_upward (-4503599627370497.5) == -4503599627370497LL": +ildouble: -1 +ldouble: -1 +Test "llrint_upward (-72057594037927935.5) == -72057594037927935LL": +ildouble: -1 +ldouble: -1 +Test "llrint_upward (-72057594037927937.5) == -72057594037927937LL": +ildouble: 1 +ldouble: 1 +Test "llrint_upward (-9007199254740991.5) == -9007199254740991LL": +ildouble: -1 +ldouble: -1 +Test "llrint_upward (-9007199254740991.5000000000001) == -9007199254740991LL": +ildouble: -1 +ldouble: -1 +Test "llrint_upward (-9007199254740993.4999999999999) == -9007199254740993LL": +ildouble: -1 +ldouble: -1 +Test "llrint_upward (-9007199254740993.5) == -9007199254740993LL": +ildouble: -1 +ldouble: -1 +Test "llrint_upward (-9007199254740993.5000000000001) == -9007199254740993LL": +ildouble: -1 +ldouble: -1 +Test "llrint_upward (4503599627370496.25) == 4503599627370497LL": +ildouble: -1 +ldouble: -1 +Test "llrint_upward (4503599627370496.4999999999999) == 4503599627370497LL": +ildouble: -1 +ldouble: -1 +Test "llrint_upward (4503599627370496.5) == 4503599627370497LL": +ildouble: -1 +ldouble: -1 +Test "llrint_upward (4503599627370497.4999999999999) == 4503599627370498LL": +ildouble: -1 +ldouble: -1 +Test "llrint_upward (72057594037927936.25) == 72057594037927937LL": +ildouble: -1 +ldouble: -1 +Test "llrint_upward (72057594037927936.5) == 72057594037927937LL": +ildouble: -1 +ldouble: -1 +Test "llrint_upward (72057594037927936.75) == 72057594037927937LL": +ildouble: -1 +ldouble: -1 +Test "llrint_upward (72057594037927937.5) == 72057594037927938LL": +ildouble: -2 +ldouble: -2 +Test "llrint_upward (9007199254740991.4999999999999) == 9007199254740992LL": +ildouble: -1 +ldouble: -1 +Test "llrint_upward (9007199254740992.25) == 9007199254740993LL": +ildouble: -1 +ldouble: -1 +Test "llrint_upward (9007199254740992.4999999999999) == 9007199254740993LL": +ildouble: -1 +ldouble: -1 +Test "llrint_upward (9007199254740992.5) == 9007199254740993LL": +ildouble: -1 +ldouble: -1 +Test "llrint_upward (9007199254740992.5000000000001) == 9007199254740993LL": +ildouble: -1 +ldouble: -1 +Test "llrint_upward (9007199254740992.75) == 9007199254740993LL": +ildouble: -1 +ldouble: -1 + +# llround +Test "llround (-4503599627370496.5) == -4503599627370497LL": +ildouble: 1 +ldouble: 1 +Test "llround (-72057594037927936.5) == -72057594037927937LL": +ildouble: 1 +ldouble: 1 +Test "llround (-72057594037927936.75) == -72057594037927937LL": +ildouble: 1 +ldouble: 1 +Test "llround (-72057594037927937.5) == -72057594037927938LL": +ildouble: 2 +ldouble: 2 +Test "llround (-9007199254740992.5) == -9007199254740993LL": +ildouble: 1 +ldouble: 1 +Test "llround (-9007199254740992.75) == -9007199254740993LL": +ildouble: 1 +ldouble: 1 +Test "llround (-9223372036854775806.25) == -9223372036854775806LL": +ildouble: -2 +ldouble: -2 +Test "llround (-9223372036854775806.5) == -9223372036854775807LL": +ildouble: -1 +ldouble: -1 +Test "llround (-9223372036854775807.0) == -9223372036854775807LL": +ildouble: -1 +ldouble: -1 +Test "llround (4503599627370496.5) == 4503599627370497LL": +ildouble: -1 +ldouble: -1 +Test "llround (72057594037927936.5) == 72057594037927937LL": +ildouble: -1 +ldouble: -1 +Test "llround (72057594037927936.75) == 72057594037927937LL": +ildouble: -1 +ldouble: -1 +Test "llround (72057594037927937.5) == 72057594037927938LL": +ildouble: -2 +ldouble: -2 +Test "llround (9007199254740992.5) == 9007199254740993LL": +ildouble: -1 +ldouble: -1 +Test "llround (9007199254740992.75) == 9007199254740993LL": +ildouble: -1 +ldouble: -1 +Test "llround (9223372036854775806.25) == 9223372036854775806LL": +ildouble: 1 +ldouble: 1 # log10 Test "log10 (0.75) == -0.124938736608299953132449886193870744": @@ -470,6 +850,8 @@ double: 1 float: 2 idouble: 1 ifloat: 2 +ildouble: 1 +ldouble: 1 Test "log10 (e) == log10(e)": float: 1 ifloat: 1 @@ -479,42 +861,81 @@ Test "log1p (-0.25) == -0.287682072451780927439219005993827432": float: 1 ifloat: 1 -# lround -Test "lround (1071930.0008) == 1071930": -double: -214511494 -idouble: -214511494 +# rint_downward +Test "rint_downward (-4503599627370496.25) == -4503599627370497.0": +ildouble: 1 +ldouble: 1 +Test "rint_downward (-4503599627370496.5) == -4503599627370497.0": +ildouble: 1 +ldouble: 1 +Test "rint_downward (4503599627370496.75) == 4503599627370496.0": +ildouble: 1 +ldouble: 1 +Test "rint_downward (4503599627370497.5) == 4503599627370497.0": +ildouble: 1 +ldouble: 1 + +# rint_towardzero +Test "rint_towardzero (-4503599627370496.75) == -4503599627370496.0": +ildouble: 1 +ldouble: 1 +Test "rint_towardzero (-4503599627370497.5) == -4503599627370497.0": +ildouble: 1 +ldouble: 1 +Test "rint_towardzero (4503599627370496.75) == 4503599627370496.0": +ildouble: 1 +ldouble: 1 +Test "rint_towardzero (4503599627370497.5) == 4503599627370497.0": +ildouble: 1 +ldouble: 1 + +# rint_upward +Test "rint_upward (-4503599627370496.75) == -4503599627370496.0": +ildouble: 1 +ldouble: 1 +Test "rint_upward (-4503599627370497.5) == -4503599627370497.0": +ildouble: 1 +ldouble: 1 +Test "rint_upward (4503599627370496.25) == 4503599627370497.0": +ildouble: 1 +ldouble: 1 +Test "rint_upward (4503599627370496.5) == 4503599627370497.0": +ildouble: 1 +ldouble: 1 + +# round +Test "round (-4503599627370496.5) == -4503599627370497.0": +ildouble: 1 +ldouble: 1 +Test "round (4503599627370496.5) == 4503599627370497.0": +ildouble: 1 +ldouble: 1 # sincos Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": double: 1 -float: 1 idouble: 1 -ifloat: 1 +ildouble: 1 +ldouble: 1 Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 +ildouble: 1 +ldouble: 1 Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res": float: 1 ifloat: 1 -# tan -Test "tan (pi/4) == 1": -double: 1 -idouble: 1 - # tgamma Test "tgamma (-0.5) == -2 sqrt (pi)": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "tgamma (0.5) == sqrt (pi)": float: 1 ifloat: 1 @@ -523,6 +944,34 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 + +# trunc +Test "trunc (-4503599627370496.75) == -4503599627370496.0": +ildouble: 1 +ldouble: 1 +Test "trunc (-4503599627370497.5) == -4503599627370497.0": +ildouble: 1 +ldouble: 1 +Test "trunc (-9007199254740991.5) == -9007199254740991.0": +ildouble: 1 +ldouble: 1 +Test "trunc (-9007199254740993.5) == -9007199254740993.0": +ildouble: 1 +ldouble: 1 +Test "trunc (4503599627370496.75) == 4503599627370496.0": +ildouble: 1 +ldouble: 1 +Test "trunc (4503599627370497.5) == 4503599627370497.0": +ildouble: 1 +ldouble: 1 +Test "trunc (9007199254740991.5) == 9007199254740991.0": +ildouble: 1 +ldouble: 1 +Test "trunc (9007199254740993.5) == 9007199254740993.0": +ildouble: 1 +ldouble: 1 # y0 Test "y0 (1.0) == 0.0882569642156769579829267660235151628": @@ -530,11 +979,15 @@ double: 2 float: 1 idouble: 2 ifloat: 1 +ildouble: 2 +ldouble: 2 Test "y0 (1.5) == 0.382448923797758843955068554978089862": double: 2 float: 1 idouble: 2 ifloat: 1 +ildouble: 2 +ldouble: 2 Test "y0 (10.0) == 0.0556711672835993914244598774101900481": float: 1 ifloat: 1 @@ -543,11 +996,15 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 # y1 Test "y1 (0.125) == -5.19993611253477499595928744876579921": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 Test "y1 (1.5) == -0.412308626973911295952829820633445323": float: 1 ifloat: 1 @@ -556,16 +1013,22 @@ double: 3 float: 1 idouble: 3 ifloat: 1 +ildouble: 3 +ldouble: 3 Test "y1 (2.0) == -0.107032431540937546888370772277476637": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "y1 (8.0) == -0.158060461731247494255555266187483550": double: 1 float: 2 idouble: 1 ifloat: 2 +ildouble: 1 +ldouble: 1 # yn Test "yn (0, 1.0) == 0.0882569642156769579829267660235151628": @@ -573,11 +1036,15 @@ double: 2 float: 1 idouble: 2 ifloat: 1 +ildouble: 2 +ldouble: 2 Test "yn (0, 1.5) == 0.382448923797758843955068554978089862": double: 2 float: 1 idouble: 2 ifloat: 1 +ildouble: 2 +ldouble: 2 Test "yn (0, 10.0) == 0.0556711672835993914244598774101900481": float: 1 ifloat: 1 @@ -586,9 +1053,13 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "yn (1, 0.125) == -5.19993611253477499595928744876579921": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 Test "yn (1, 1.5) == -0.412308626973911295952829820633445323": float: 1 ifloat: 1 @@ -597,118 +1068,140 @@ double: 3 float: 1 idouble: 3 ifloat: 1 +ildouble: 3 +ldouble: 3 Test "yn (1, 2.0) == -0.107032431540937546888370772277476637": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "yn (1, 8.0) == -0.158060461731247494255555266187483550": double: 1 float: 2 idouble: 1 ifloat: 2 +ildouble: 1 +ldouble: 1 Test "yn (10, 0.125) == -127057845771019398.252538486899753195": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 Test "yn (10, 0.75) == -2133501638.90573424452445412893839236": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "yn (10, 1.0) == -121618014.278689189288130426667971145": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 Test "yn (10, 10.0) == -0.359814152183402722051986577343560609": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "yn (10, 2.0) == -129184.542208039282635913145923304214": double: 2 idouble: 2 +ildouble: 2 +ldouble: 2 Test "yn (3, 0.125) == -2612.69757350066712600220955744091741": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 Test "yn (3, 0.75) == -12.9877176234475433186319774484809207": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "yn (3, 10.0) == -0.251362657183837329779204747654240998": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "yn (3, 2.0) == -1.12778377684042778608158395773179238": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 # Maximal error of functions: Function: "atan2": -float: 6 -ifloat: 6 +float: 1 +ifloat: 1 Function: "atanh": float: 1 ifloat: 1 -Function: Real part of "cacosh": -double: 1 -float: 7 -idouble: 1 -ifloat: 7 - Function: Imaginary part of "cacosh": -double: 1 -float: 3 -idouble: 1 -ifloat: 3 +float: 1 +ifloat: 1 Function: Real part of "casin": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: Real part of "casinh": double: 5 float: 1 idouble: 5 ifloat: 1 +ildouble: 5 +ldouble: 5 Function: Imaginary part of "casinh": double: 3 float: 6 idouble: 3 ifloat: 6 - -Function: Real part of "catan": -float: 4 -ifloat: 4 +ildouble: 3 +ldouble: 3 Function: Imaginary part of "catan": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: Real part of "catanh": double: 4 idouble: 4 - -Function: Imaginary part of "catanh": -float: 6 -ifloat: 6 +ildouble: 4 +ldouble: 4 Function: "cbrt": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 Function: Real part of "ccos": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: Imaginary part of "ccos": float: 1 @@ -719,11 +1212,17 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: Imaginary part of "ccosh": float: 1 ifloat: 1 +Function: "ceil": +ildouble: 1 +ldouble: 1 + Function: Real part of "cexp": float: 1 ifloat: 1 @@ -736,37 +1235,41 @@ Function: Real part of "clog": float: 1 ifloat: 1 -Function: Imaginary part of "clog": -float: 3 -ifloat: 3 - Function: Real part of "clog10": float: 1 ifloat: 1 Function: Imaginary part of "clog10": double: 1 -float: 5 +float: 1 idouble: 1 -ifloat: 5 +ifloat: 1 +ildouble: 1 +ldouble: 1 Function: "cos": double: 2 float: 1 idouble: 2 ifloat: 1 +ildouble: 2 +ldouble: 2 Function: Real part of "cpow": double: 2 float: 4 idouble: 2 ifloat: 4 +ildouble: 2 +ldouble: 2 Function: Imaginary part of "cpow": double: 2 float: 2 idouble: 2 ifloat: 2 +ildouble: 2 +ldouble: 2 Function: Real part of "csinh": float: 1 @@ -777,6 +1280,8 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: Real part of "csqrt": float: 1 @@ -785,12 +1290,16 @@ ifloat: 1 Function: Imaginary part of "ctan": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 Function: Real part of "ctanh": double: 1 float: 2 idouble: 1 ifloat: 2 +ildouble: 1 +ldouble: 1 Function: Imaginary part of "ctanh": float: 1 @@ -799,22 +1308,34 @@ ifloat: 1 Function: "erf": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 Function: "erfc": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 Function: "exp10": double: 6 float: 2 idouble: 6 ifloat: 2 +ildouble: 6 +ldouble: 6 Function: "expm1": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "floor": +ildouble: 1 +ldouble: 1 Function: "hypot": float: 1 @@ -825,67 +1346,109 @@ double: 2 float: 2 idouble: 2 ifloat: 2 +ildouble: 2 +ldouble: 2 Function: "j1": double: 1 float: 2 idouble: 1 ifloat: 2 +ildouble: 1 +ldouble: 1 Function: "jn": double: 4 float: 4 idouble: 4 ifloat: 4 +ildouble: 4 +ldouble: 4 Function: "lgamma": double: 1 float: 2 idouble: 1 ifloat: 2 +ildouble: 1 +ldouble: 1 Function: "log10": double: 1 float: 2 idouble: 1 ifloat: 2 +ildouble: 1 +ldouble: 1 Function: "log1p": float: 1 ifloat: 1 +Function: "rint_downward": +ildouble: 1 +ldouble: 1 + +Function: "rint_towardzero": +ildouble: 1 +ldouble: 1 + +Function: "rint_upward": +ildouble: 1 +ldouble: 1 + +Function: "round": +ildouble: 1 +ldouble: 1 + Function: "sincos": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: "tan": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 Function: "tgamma": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "trunc": +ildouble: 1 +ldouble: 1 Function: "y0": double: 2 float: 1 idouble: 2 ifloat: 1 +ildouble: 2 +ldouble: 2 Function: "y1": double: 3 float: 2 idouble: 3 ifloat: 2 +ildouble: 3 +ldouble: 3 Function: "yn": double: 3 float: 2 idouble: 3 ifloat: 2 +ildouble: 3 +ldouble: 3 # end of automatic generation diff --git a/sysdeps/unix/sysv/linux/hppa/bits/atomic.h b/sysdeps/unix/sysv/linux/hppa/bits/atomic.h index ee381dc27b..92a309d59f 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/atomic.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/atomic.h @@ -22,14 +22,10 @@ #include #include -/* We need EFAULT, ENONSYS, and EAGAIN */ -#if !defined EFAULT && !defined ENOSYS && !defined EAGAIN -#undef EFAULT -#undef ENOSYS -#undef EAGAIN +/* We need EFAULT, ENONSYS */ +#if !defined EFAULT && !defined ENOSYS #define EFAULT 14 #define ENOSYS 251 -#define EAGAIN 11 #endif #ifndef _BITS_ATOMIC_H @@ -57,10 +53,10 @@ typedef uintmax_t uatomic_max_t; /* Use the kernel atomic light weight syscalls on hppa */ #define LWS "0xb0" -#define LWS_CAS 0x0 +#define LWS_CAS "0" /* Note r31 is the link register */ #define LWS_CLOBBER "r1", "r26", "r25", "r24", "r23", "r22", "r21", "r20", "r28", "r31", "memory" -#define ASM_EAGAIN -EAGAIN +#define ASM_EAGAIN "11" #if __ASSUME_LWS_CAS /* The only basic operation needed is compare and exchange. */ @@ -74,8 +70,8 @@ typedef uintmax_t uatomic_max_t; "copy %4, %%r25 \n\t" \ "copy %5, %%r24 \n\t" \ "ble " LWS "(%%sr2, %%r0) \n\t" \ - "ldi 0, %%r20 \n\t" \ - "cmpib,=,n " ASM_EAGAIN ",%%r21,0 \n\t" \ + "ldi " LWS_CAS ", %%r20 \n\t" \ + "cmpib,=,n " ASM_EAGAIN ",%%r21,0b \n\t" \ "nop \n\t" \ "stw %%r28, %0 \n\t" \ "sub %%r0, %%r21, %%r21 \n\t" \ @@ -99,22 +95,9 @@ typedef uintmax_t uatomic_max_t; (ret != oldval); \ }) #else -/* Non-atomic primitives. */ -# define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \ - ({ __typeof (mem) __gmemp = (mem); \ - __typeof (*mem) __gret = *__gmemp; \ - __typeof (*mem) __gnewval = (newval); \ - \ - if (__gret == (oldval)) \ - *__gmemp = __gnewval; \ - __gret; }) +# error __ASSUME_LWS_CAS is required to build glibc. +#endif +/* __ASSUME_LWS_CAS */ -# define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \ - ({ __typeof (mem) __gmemp = (mem); \ - __typeof (*mem) __gnewval = (newval); \ - \ - *__gmemp == (oldval) ? (*__gmemp = __gnewval, 0) : 1; }) #endif - -#endif /* bits/atomic.h */ - +/* _BITS_ATOMIC_H */ From 84f3ca6e4921f304e5bd2efc0a047a3365d3df12 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Fri, 5 Jan 2007 02:21:54 +0000 Subject: [PATCH 3679/4487] * sysdeps/unix/sysv/linux/mips/bits/msq.h (struct msqid_ds): Update to match the kernel. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/bits/msq.h | 24 +++++++++++++++++++++--- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 7c46aa117c..5996d26de1 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2007-01-04 Thiemo Seufer + + * sysdeps/unix/sysv/linux/mips/bits/msq.h (struct msqid_ds): Update + to match the kernel. + 2006-10-31 Daniel Jacobowitz * sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h diff --git a/sysdeps/unix/sysv/linux/mips/bits/msq.h b/sysdeps/unix/sysv/linux/mips/bits/msq.h index c2c1dd2e85..5d72fc14ea 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/msq.h +++ b/sysdeps/unix/sysv/linux/mips/bits/msq.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2007 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 @@ -38,16 +38,34 @@ typedef unsigned long int msglen_t; struct msqid_ds { struct ipc_perm msg_perm; /* structure describing operation permission */ +#if __WORDSIZE == 32 && defined (__MIPSEB__) + unsigned long int __unused1; +#endif __time_t msg_stime; /* time of last msgsnd command */ +#if __WORDSIZE == 32 && defined (__MIPSEL__) + unsigned long int __unused1; +#endif +#if __WORDSIZE == 32 && defined (__MIPSEB__) + unsigned long int __unused2; +#endif __time_t msg_rtime; /* time of last msgrcv command */ +#if __WORDSIZE == 32 && defined (__MIPSEL__) + unsigned long int __unused2; +#endif +#if __WORDSIZE == 32 && defined (__MIPSEB__) + unsigned long int __unused3; +#endif __time_t msg_ctime; /* time of last change */ +#if __WORDSIZE == 32 && defined (__MIPSEL__) + unsigned long int __unused3; +#endif unsigned long int __msg_cbytes; /* current number of bytes on queue */ msgqnum_t msg_qnum; /* number of messages currently on queue */ 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 __unused4; + unsigned long int __unused5; }; #ifdef __USE_MISC From 8545d6c0ab1cd5d17cb88385abafcb3f1ac7baa6 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Mon, 8 Jan 2007 14:53:26 +0000 Subject: [PATCH 3680/4487] * sysdeps/arm/eabi/jmpbuf-offsets.h: New. --- ChangeLog.arm | 4 ++++ sysdeps/arm/eabi/jmpbuf-offsets.h | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 sysdeps/arm/eabi/jmpbuf-offsets.h diff --git a/ChangeLog.arm b/ChangeLog.arm index 88c3c873a3..1acbbd2361 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,7 @@ +2007-01-08 Joseph Myers + + * sysdeps/arm/eabi/jmpbuf-offsets.h: New. + 2006-10-31 Daniel Jacobowitz * sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h diff --git a/sysdeps/arm/eabi/jmpbuf-offsets.h b/sysdeps/arm/eabi/jmpbuf-offsets.h new file mode 100644 index 0000000000..1ca33ff970 --- /dev/null +++ b/sysdeps/arm/eabi/jmpbuf-offsets.h @@ -0,0 +1,20 @@ +/* Private macros for accessing __jmp_buf contents. ARM EABI version. + Copyright (C) 2007 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. */ + +#define __JMP_BUF_SP 8 From d50fd6886654c9cd84e1df57ed86a19080e302e1 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Mon, 8 Jan 2007 14:58:21 +0000 Subject: [PATCH 3681/4487] * sysdeps/arm/fpu/bits/mathdef.h: Move to sysdeps/arm/bits/mathdef.h. Remove comment about FPA. --- ChangeLog.arm | 5 +++++ sysdeps/arm/{fpu => }/bits/mathdef.h | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) rename sysdeps/arm/{fpu => }/bits/mathdef.h (91%) diff --git a/ChangeLog.arm b/ChangeLog.arm index 1acbbd2361..32a1ca84a3 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2007-01-08 Joseph Myers + + * sysdeps/arm/fpu/bits/mathdef.h: Move to + sysdeps/arm/bits/mathdef.h. Remove comment about FPA. + 2007-01-08 Joseph Myers * sysdeps/arm/eabi/jmpbuf-offsets.h: New. diff --git a/sysdeps/arm/fpu/bits/mathdef.h b/sysdeps/arm/bits/mathdef.h similarity index 91% rename from sysdeps/arm/fpu/bits/mathdef.h rename to sysdeps/arm/bits/mathdef.h index e013e74b7e..daca1102fc 100644 --- a/sysdeps/arm/fpu/bits/mathdef.h +++ b/sysdeps/arm/bits/mathdef.h @@ -1,4 +1,5 @@ -/* Copyright (C) 1999, 2000, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2004, 2006, 2007 + 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 @@ -38,7 +39,5 @@ typedef double double_t; /* `double' expressions are evaluated as #ifndef __NO_LONG_DOUBLE_MATH /* Signal that we do not really have a `long double'. This disables the declaration of all the `long double' function variants. */ -/* XXX The FPA does support this but the patterns in GCC are currently - turned off. */ # define __NO_LONG_DOUBLE_MATH 1 #endif From 3c916dad5b56adb0f1a256ccbd85f3eab148ddd7 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Mon, 8 Jan 2007 15:06:00 +0000 Subject: [PATCH 3682/4487] * sysdeps/unix/sysv/linux/arm/check_pf.c: New file. * sysdeps/unix/sysv/linux/arm/eabi/check_pf.c: New file. --- ChangeLog.arm | 5 + sysdeps/unix/sysv/linux/arm/check_pf.c | 274 ++++++++++++++++++++ sysdeps/unix/sysv/linux/arm/eabi/check_pf.c | 1 + 3 files changed, 280 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/check_pf.c create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/check_pf.c diff --git a/ChangeLog.arm b/ChangeLog.arm index 32a1ca84a3..299d9304d4 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2007-01-08 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/arm/check_pf.c: New file. + * sysdeps/unix/sysv/linux/arm/eabi/check_pf.c: New file. + 2007-01-08 Joseph Myers * sysdeps/arm/fpu/bits/mathdef.h: Move to diff --git a/sysdeps/unix/sysv/linux/arm/check_pf.c b/sysdeps/unix/sysv/linux/arm/check_pf.c new file mode 100644 index 0000000000..ee13d8019c --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/check_pf.c @@ -0,0 +1,274 @@ +/* Determine protocol families for which interfaces exist. ARM Linux version. + Copyright (C) 2003, 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 + 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. */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + + +#ifndef IFA_F_TEMPORARY +# define IFA_F_TEMPORARY IFA_F_SECONDARY +#endif +#ifndef IFA_F_HOMEADDRESS +# define IFA_F_HOMEADDRESS 0 +#endif + + +static int +make_request (int fd, pid_t pid, bool *seen_ipv4, bool *seen_ipv6, + struct in6addrinfo **in6ai, size_t *in6ailen) +{ + struct req + { + struct nlmsghdr nlh; + struct rtgenmsg g; + } req; + struct sockaddr_nl nladdr; + + /* struct rtgenmsg consists of a single byte but the ARM ABI rounds + it up to a word. Clear the padding explicitly here. */ + assert (sizeof (req.g) == 4); + memset (&req.g, '\0', sizeof (req.g)); + + req.nlh.nlmsg_len = sizeof (req); + req.nlh.nlmsg_type = RTM_GETADDR; + req.nlh.nlmsg_flags = NLM_F_ROOT | NLM_F_MATCH | NLM_F_REQUEST; + req.nlh.nlmsg_pid = 0; + req.nlh.nlmsg_seq = time (NULL); + req.g.rtgen_family = AF_UNSPEC; + + memset (&nladdr, '\0', sizeof (nladdr)); + nladdr.nl_family = AF_NETLINK; + + if (TEMP_FAILURE_RETRY (__sendto (fd, (void *) &req, sizeof (req), 0, + (struct sockaddr *) &nladdr, + sizeof (nladdr))) < 0) + return -1; + + *seen_ipv4 = false; + *seen_ipv6 = false; + + bool done = false; + char buf[4096]; + struct iovec iov = { buf, sizeof (buf) }; + struct in6ailist + { + struct in6addrinfo info; + struct in6ailist *next; + } *in6ailist = NULL; + size_t in6ailistlen = 0; + + do + { + struct msghdr msg = + { + (void *) &nladdr, sizeof (nladdr), + &iov, 1, + NULL, 0, + 0 + }; + + ssize_t read_len = TEMP_FAILURE_RETRY (__recvmsg (fd, &msg, 0)); + if (read_len < 0) + return -1; + + if (msg.msg_flags & MSG_TRUNC) + return -1; + + struct nlmsghdr *nlmh; + for (nlmh = (struct nlmsghdr *) buf; + NLMSG_OK (nlmh, (size_t) read_len); + nlmh = (struct nlmsghdr *) NLMSG_NEXT (nlmh, read_len)) + { + if (nladdr.nl_pid != 0 || (pid_t) nlmh->nlmsg_pid != pid + || nlmh->nlmsg_seq != req.nlh.nlmsg_seq) + continue; + + if (nlmh->nlmsg_type == RTM_NEWADDR) + { + struct ifaddrmsg *ifam = (struct ifaddrmsg *) NLMSG_DATA (nlmh); + + switch (ifam->ifa_family) + { + case AF_INET: + *seen_ipv4 = true; + break; + case AF_INET6: + *seen_ipv6 = true; + + if (ifam->ifa_flags & (IFA_F_DEPRECATED + | IFA_F_TEMPORARY + | IFA_F_HOMEADDRESS)) + { + struct rtattr *rta = IFA_RTA (ifam); + size_t len = (nlmh->nlmsg_len + - NLMSG_LENGTH (sizeof (*ifam))); + void *local = NULL; + void *address = NULL; + while (RTA_OK (rta, len)) + { + switch (rta->rta_type) + { + case IFA_LOCAL: + local = RTA_DATA (rta); + break; + + case IFA_ADDRESS: + address = RTA_DATA (rta); + break; + } + + rta = RTA_NEXT (rta, len); + } + + struct in6ailist *newp = alloca (sizeof (*newp)); + newp->info.flags = (((ifam->ifa_flags & IFA_F_DEPRECATED) + ? in6ai_deprecated : 0) + | ((ifam->ifa_flags + & IFA_F_TEMPORARY) + ? in6ai_temporary : 0) + | ((ifam->ifa_flags + & IFA_F_HOMEADDRESS) + ? in6ai_homeaddress : 0)); + memcpy (newp->info.addr, address ?: local, + sizeof (newp->info.addr)); + newp->next = in6ailist; + in6ailist = newp; + ++in6ailistlen; + } + break; + default: + /* Ignore. */ + break; + } + } + else if (nlmh->nlmsg_type == NLMSG_DONE) + /* We found the end, leave the loop. */ + done = true; + } + } + while (! done); + + close_not_cancel_no_status (fd); + + if (in6ailist != NULL) + { + *in6ai = malloc (in6ailistlen * sizeof (**in6ai)); + if (*in6ai == NULL) + return -1; + + *in6ailen = in6ailistlen; + + do + { + (*in6ai)[--in6ailistlen] = in6ailist->info; + in6ailist = in6ailist->next; + } + while (in6ailist != NULL); + } + + return 0; +} + + +/* We don't know if we have NETLINK support compiled in in our + Kernel. */ +#if __ASSUME_NETLINK_SUPPORT == 0 +/* Define in ifaddrs.h. */ +extern int __no_netlink_support attribute_hidden; +#else +# define __no_netlink_support 0 +#endif + + +void +attribute_hidden +__check_pf (bool *seen_ipv4, bool *seen_ipv6, + struct in6addrinfo **in6ai, size_t *in6ailen) +{ + *in6ai = NULL; + *in6ailen = 0; + + if (! __no_netlink_support) + { + int fd = __socket (PF_NETLINK, SOCK_RAW, NETLINK_ROUTE); + + struct sockaddr_nl nladdr; + memset (&nladdr, '\0', sizeof (nladdr)); + nladdr.nl_family = AF_NETLINK; + + socklen_t addr_len = sizeof (nladdr); + + if (fd >= 0 + && __bind (fd, (struct sockaddr *) &nladdr, sizeof (nladdr)) == 0 + && __getsockname (fd, (struct sockaddr *) &nladdr, &addr_len) == 0 + && make_request (fd, nladdr.nl_pid, seen_ipv4, seen_ipv6, + in6ai, in6ailen) == 0) + /* It worked. */ + return; + + if (fd >= 0) + __close (fd); + +#if __ASSUME_NETLINK_SUPPORT == 0 + /* Remember that there is no netlink support. */ + __no_netlink_support = 1; +#else + /* We cannot determine what interfaces are available. Be + pessimistic. */ + *seen_ipv4 = true; + *seen_ipv6 = true; +#endif + } + +#if __ASSUME_NETLINK_SUPPORT == 0 + /* No netlink. Get the interface list via getifaddrs. */ + struct ifaddrs *ifa = NULL; + if (getifaddrs (&ifa) != 0) + { + /* We cannot determine what interfaces are available. Be + pessimistic. */ + *seen_ipv4 = true; + *seen_ipv6 = true; + return; + } + + struct ifaddrs *runp; + for (runp = ifa; runp != NULL; runp = runp->ifa_next) + if (runp->ifa_addr->sa_family == PF_INET) + *seen_ipv4 = true; + else if (runp->ifa_addr->sa_family == PF_INET6) + *seen_ipv6 = true; + + (void) freeifaddrs (ifa); +#endif +} diff --git a/sysdeps/unix/sysv/linux/arm/eabi/check_pf.c b/sysdeps/unix/sysv/linux/arm/eabi/check_pf.c new file mode 100644 index 0000000000..3e80bbdf51 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/check_pf.c @@ -0,0 +1 @@ +#include From 234e3f65678348e3c050dcaec14f656cd08a60ec Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Mon, 8 Jan 2007 15:10:14 +0000 Subject: [PATCH 3683/4487] * sysdeps/powerpc/nofpu/fesetenv.c (__sim_exceptions, __sim_disabled_exceptions, __sim_round_mode): Remove declarations. --- ChangeLog.powerpc | 5 +++++ sysdeps/powerpc/nofpu/fesetenv.c | 6 +----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ChangeLog.powerpc b/ChangeLog.powerpc index aee24e2071..8f329626d8 100644 --- a/ChangeLog.powerpc +++ b/ChangeLog.powerpc @@ -1,3 +1,8 @@ +2007-01-08 Joseph Myers + + * sysdeps/powerpc/nofpu/fesetenv.c (__sim_exceptions, + __sim_disabled_exceptions, __sim_round_mode): Remove declarations. + 2006-10-05 Steven Munroe [BZ #2749] diff --git a/sysdeps/powerpc/nofpu/fesetenv.c b/sysdeps/powerpc/nofpu/fesetenv.c index 43d03a45e2..90e084cbc3 100644 --- a/sysdeps/powerpc/nofpu/fesetenv.c +++ b/sysdeps/powerpc/nofpu/fesetenv.c @@ -1,5 +1,5 @@ /* Set floating point environment (soft-float edition). - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2007 Free Software Foundation, Inc. Contributed by Aldy Hernandez , 2002. This file is part of the GNU C Library. @@ -22,10 +22,6 @@ #include "soft-supp.h" #include -extern int __sim_exceptions attribute_hidden; -extern int __sim_disabled_exceptions attribute_hidden; -extern int __sim_round_mode attribute_hidden; - int __fesetenv (const fenv_t *envp) { From 2caa93e20653788f4f85863edf877c1ab7e3ab45 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Mon, 8 Jan 2007 15:26:51 +0000 Subject: [PATCH 3684/4487] * sysdeps/mips/ldsodefs.h: Merge sysdeps/mips/elf/ldsodefs.h. Correct multiple inclusion guard. * sysdeps/mips/elf/ldsodefs.h: Delete file. --- ChangeLog.mips | 6 ++ sysdeps/mips/elf/ldsodefs.h | 109 ------------------------------------ sysdeps/mips/ldsodefs.h | 88 ++++++++++++++++++++++++++++- 3 files changed, 92 insertions(+), 111 deletions(-) delete mode 100644 sysdeps/mips/elf/ldsodefs.h diff --git a/ChangeLog.mips b/ChangeLog.mips index 5996d26de1..82d0d0a6e1 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,9 @@ +2007-01-08 Daniel Jacobowitz + + * sysdeps/mips/ldsodefs.h: Merge sysdeps/mips/elf/ldsodefs.h. Correct + multiple inclusion guard. + * sysdeps/mips/elf/ldsodefs.h: Delete file. + 2007-01-04 Thiemo Seufer * sysdeps/unix/sysv/linux/mips/bits/msq.h (struct msqid_ds): Update diff --git a/sysdeps/mips/elf/ldsodefs.h b/sysdeps/mips/elf/ldsodefs.h deleted file mode 100644 index 3868b50ff6..0000000000 --- a/sysdeps/mips/elf/ldsodefs.h +++ /dev/null @@ -1,109 +0,0 @@ -/* Run-time dynamic linker data structures for loaded ELF shared objects. - Copyright (C) 2000, 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 _MIPS_LDSODEFS_H -#define _MIPS_LDSODEFS_H - -/* The MIPS ABI specifies that the dynamic section has to be read-only. */ - -#define DL_RO_DYN_SECTION 1 - -#include_next - -/* The 64-bit MIPS ELF ABI uses an unusual reloc format. Each - relocation entry specifies up to three actual relocations, all at - the same address. The first relocation which required a symbol - uses the symbol in the r_sym field. The second relocation which - requires a symbol uses the symbol in the r_ssym field. If all - three relocations require a symbol, the third one uses a zero - value. - - We define these structures in internal headers because we're not - sure we want to make them part of the ABI yet. Eventually, some of - this may move into elf/elf.h. */ - -/* An entry in a 64 bit SHT_REL section. */ - -typedef struct -{ - Elf32_Word r_sym; /* Symbol index */ - unsigned char r_ssym; /* Special symbol for 2nd relocation */ - unsigned char r_type3; /* 3rd relocation type */ - unsigned char r_type2; /* 2nd relocation type */ - unsigned char r_type1; /* 1st relocation type */ -} _Elf64_Mips_R_Info; - -typedef union -{ - Elf64_Xword r_info_number; - _Elf64_Mips_R_Info r_info_fields; -} _Elf64_Mips_R_Info_union; - -typedef struct -{ - Elf64_Addr r_offset; /* Address */ - _Elf64_Mips_R_Info_union r_info; /* Relocation type and symbol index */ -} Elf64_Mips_Rel; - -typedef struct -{ - Elf64_Addr r_offset; /* Address */ - _Elf64_Mips_R_Info_union r_info; /* Relocation type and symbol index */ - Elf64_Sxword r_addend; /* Addend */ -} Elf64_Mips_Rela; - -#define ELF64_MIPS_R_SYM(i) \ - ((__extension__ (_Elf64_Mips_R_Info_union)(i)).r_info_fields.r_sym) -#define ELF64_MIPS_R_TYPE(i) \ - (((_Elf64_Mips_R_Info_union)(i)).r_info_fields.r_type1 \ - | ((Elf32_Word)(__extension__ (_Elf64_Mips_R_Info_union)(i) \ - ).r_info_fields.r_type2 << 8) \ - | ((Elf32_Word)(__extension__ (_Elf64_Mips_R_Info_union)(i) \ - ).r_info_fields.r_type3 << 16) \ - | ((Elf32_Word)(__extension__ (_Elf64_Mips_R_Info_union)(i) \ - ).r_info_fields.r_ssym << 24)) -#define ELF64_MIPS_R_INFO(sym, type) \ - (__extension__ (_Elf64_Mips_R_Info_union) \ - (__extension__ (_Elf64_Mips_R_Info) \ - { (sym), ELF64_MIPS_R_SSYM (type), \ - ELF64_MIPS_R_TYPE3 (type), \ - ELF64_MIPS_R_TYPE2 (type), \ - ELF64_MIPS_R_TYPE1 (type) \ - }).r_info_number) -/* These macros decompose the value returned by ELF64_MIPS_R_TYPE, and - compose it back into a value that it can be used as an argument to - ELF64_MIPS_R_INFO. */ -#define ELF64_MIPS_R_SSYM(i) (((i) >> 24) & 0xff) -#define ELF64_MIPS_R_TYPE3(i) (((i) >> 16) & 0xff) -#define ELF64_MIPS_R_TYPE2(i) (((i) >> 8) & 0xff) -#define ELF64_MIPS_R_TYPE1(i) ((i) & 0xff) -#define ELF64_MIPS_R_TYPEENC(type1, type2, type3, ssym) \ - ((type1) \ - | ((Elf32_Word)(type2) << 8) \ - | ((Elf32_Word)(type3) << 16) \ - | ((Elf32_Word)(ssym) << 24)) - -#undef ELF64_R_SYM -#define ELF64_R_SYM(i) ELF64_MIPS_R_SYM (i) -#undef ELF64_R_TYPE -#define ELF64_R_TYPE(i) ELF64_MIPS_R_TYPE (i) -#undef ELF64_R_INFO -#define ELF64_R_INFO(sym, type) ELF64_MIPS_R_INFO ((sym), (type)) - -#endif diff --git a/sysdeps/mips/ldsodefs.h b/sysdeps/mips/ldsodefs.h index 876f1c3dc4..5f85eef6e4 100644 --- a/sysdeps/mips/ldsodefs.h +++ b/sysdeps/mips/ldsodefs.h @@ -1,5 +1,5 @@ /* Run-time dynamic linker data structures for loaded ELF shared objects. - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2000, 2002, 2003, 2006, 2007 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 @@ -17,7 +17,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#ifndef __LDSODEFS_H \ +#ifndef _MIPS_LDSODEFS_H #define _MIPS_LDSODEFS_H 1 #include @@ -61,6 +61,90 @@ struct La_mips_64_retval; struct La_mips_64_retval *, \ const char *); +/* The MIPS ABI specifies that the dynamic section has to be read-only. */ + +#define DL_RO_DYN_SECTION 1 + #include_next +/* The 64-bit MIPS ELF ABI uses an unusual reloc format. Each + relocation entry specifies up to three actual relocations, all at + the same address. The first relocation which required a symbol + uses the symbol in the r_sym field. The second relocation which + requires a symbol uses the symbol in the r_ssym field. If all + three relocations require a symbol, the third one uses a zero + value. + + We define these structures in internal headers because we're not + sure we want to make them part of the ABI yet. Eventually, some of + this may move into elf/elf.h. */ + +/* An entry in a 64 bit SHT_REL section. */ + +typedef struct +{ + Elf32_Word r_sym; /* Symbol index */ + unsigned char r_ssym; /* Special symbol for 2nd relocation */ + unsigned char r_type3; /* 3rd relocation type */ + unsigned char r_type2; /* 2nd relocation type */ + unsigned char r_type1; /* 1st relocation type */ +} _Elf64_Mips_R_Info; + +typedef union +{ + Elf64_Xword r_info_number; + _Elf64_Mips_R_Info r_info_fields; +} _Elf64_Mips_R_Info_union; + +typedef struct +{ + Elf64_Addr r_offset; /* Address */ + _Elf64_Mips_R_Info_union r_info; /* Relocation type and symbol index */ +} Elf64_Mips_Rel; + +typedef struct +{ + Elf64_Addr r_offset; /* Address */ + _Elf64_Mips_R_Info_union r_info; /* Relocation type and symbol index */ + Elf64_Sxword r_addend; /* Addend */ +} Elf64_Mips_Rela; + +#define ELF64_MIPS_R_SYM(i) \ + ((__extension__ (_Elf64_Mips_R_Info_union)(i)).r_info_fields.r_sym) +#define ELF64_MIPS_R_TYPE(i) \ + (((_Elf64_Mips_R_Info_union)(i)).r_info_fields.r_type1 \ + | ((Elf32_Word)(__extension__ (_Elf64_Mips_R_Info_union)(i) \ + ).r_info_fields.r_type2 << 8) \ + | ((Elf32_Word)(__extension__ (_Elf64_Mips_R_Info_union)(i) \ + ).r_info_fields.r_type3 << 16) \ + | ((Elf32_Word)(__extension__ (_Elf64_Mips_R_Info_union)(i) \ + ).r_info_fields.r_ssym << 24)) +#define ELF64_MIPS_R_INFO(sym, type) \ + (__extension__ (_Elf64_Mips_R_Info_union) \ + (__extension__ (_Elf64_Mips_R_Info) \ + { (sym), ELF64_MIPS_R_SSYM (type), \ + ELF64_MIPS_R_TYPE3 (type), \ + ELF64_MIPS_R_TYPE2 (type), \ + ELF64_MIPS_R_TYPE1 (type) \ + }).r_info_number) +/* These macros decompose the value returned by ELF64_MIPS_R_TYPE, and + compose it back into a value that it can be used as an argument to + ELF64_MIPS_R_INFO. */ +#define ELF64_MIPS_R_SSYM(i) (((i) >> 24) & 0xff) +#define ELF64_MIPS_R_TYPE3(i) (((i) >> 16) & 0xff) +#define ELF64_MIPS_R_TYPE2(i) (((i) >> 8) & 0xff) +#define ELF64_MIPS_R_TYPE1(i) ((i) & 0xff) +#define ELF64_MIPS_R_TYPEENC(type1, type2, type3, ssym) \ + ((type1) \ + | ((Elf32_Word)(type2) << 8) \ + | ((Elf32_Word)(type3) << 16) \ + | ((Elf32_Word)(ssym) << 24)) + +#undef ELF64_R_SYM +#define ELF64_R_SYM(i) ELF64_MIPS_R_SYM (i) +#undef ELF64_R_TYPE +#define ELF64_R_TYPE(i) ELF64_MIPS_R_TYPE (i) +#undef ELF64_R_INFO +#define ELF64_R_INFO(sym, type) ELF64_MIPS_R_INFO ((sym), (type)) + #endif From cb5bcf7412057dcd78dc535b0eaf7c4c2e546c23 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Mon, 8 Jan 2007 15:34:50 +0000 Subject: [PATCH 3685/4487] * sysdeps/mips/dl-machine.h (ELF_MACHINE_NO_RELA): Delete. (elf_machine_reloc): New function, retaining the body of elf_machine_rel. Take the reloc's r_info field as an argument, not the reloc itself. Add extra r_addend and inplace_p arguments. When inplace_p is false, use r_addend as the addend, not the contents of the relocation field. Hoist the conversion of reloc_addr to "ELFW(Addr) *". Don't try to apply TLS relocations against undefined symbols. Add R_MIPS_GLOB_DAT support. (elf_machine_rel, elf_machine_rela): Use elf_machine_reloc. (elf_machine_lazy_rel): Change the reloc type from ElfW(Rel) to ElfW(Rela). --- ChangeLog.mips | 14 ++++++ sysdeps/mips/dl-machine.h | 89 ++++++++++++++++++++++++++++++--------- 2 files changed, 83 insertions(+), 20 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 82d0d0a6e1..46fe53d098 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,17 @@ +2007-01-08 Richard Sandiford + + * sysdeps/mips/dl-machine.h (ELF_MACHINE_NO_RELA): Delete. + (elf_machine_reloc): New function, retaining the body of + elf_machine_rel. Take the reloc's r_info field as an argument, + not the reloc itself. Add extra r_addend and inplace_p arguments. + When inplace_p is false, use r_addend as the addend, not the contents + of the relocation field. Hoist the conversion of reloc_addr to + "ELFW(Addr) *". Don't try to apply TLS relocations against + undefined symbols. Add R_MIPS_GLOB_DAT support. + (elf_machine_rel, elf_machine_rela): Use elf_machine_reloc. + (elf_machine_lazy_rel): Change the reloc type from ElfW(Rel) + to ElfW(Rela). + 2007-01-08 Daniel Jacobowitz * sysdeps/mips/ldsodefs.h: Merge sysdeps/mips/elf/ldsodefs.h. Correct diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index b91218479d..c92a1a3f5c 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. MIPS version. - Copyright (C) 1996-2001, 2002, 2003, 2004, 2005, 2006 + Copyright (C) 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Kazumoto Kojima . @@ -282,9 +282,6 @@ do { \ ".previous"\ ); -/* The MIPS never uses Elfxx_Rela relocations. */ -#define ELF_MACHINE_NO_RELA 1 - /* Names of the architecture-specific auditing callback functions. */ # if _MIPS_SIM == _ABIO32 # define ARCH_LA_PLTENTER mips_o32_gnu_pltenter @@ -301,16 +298,18 @@ do { \ #ifdef RESOLVE_MAP -/* Perform the relocation specified by RELOC and SYM (which is fully resolved). +/* Perform a relocation described by R_INFO at the location pointed to + by RELOC_ADDR. SYM is the relocation symbol specified by R_INFO and MAP is the object containing the reloc. */ auto inline void __attribute__ ((always_inline)) -elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, - const ElfW(Sym) *sym, const struct r_found_version *version, - void *const reloc_addr) +elf_machine_reloc (struct link_map *map, ElfW(Word) r_info, + const ElfW(Sym) *sym, const struct r_found_version *version, + void *reloc_addr, ElfW(Addr) r_addend, int inplace_p) { - const unsigned long int r_type = ELFW(R_TYPE) (reloc->r_info); + const unsigned long int r_type = ELFW(R_TYPE) (r_info); + ElfW(Addr) *addr_field = (ElfW(Addr) *) reloc_addr; #if !defined RTLD_BOOTSTRAP && !defined SHARED /* This is defined in rtld.c, but nowhere in the static libc.a; @@ -342,18 +341,28 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, case R_MIPS_TLS_DTPMOD64: case R_MIPS_TLS_DTPMOD32: if (sym_map) - *(ElfW(Addr) *)reloc_addr = sym_map->l_tls_modid; + *addr_field = sym_map->l_tls_modid; break; case R_MIPS_TLS_DTPREL64: case R_MIPS_TLS_DTPREL32: - *(ElfW(Addr) *)reloc_addr += TLS_DTPREL_VALUE (sym); + if (sym) + { + if (inplace_p) + r_addend = *addr_field; + *addr_field = r_addend + TLS_DTPREL_VALUE (sym); + } break; case R_MIPS_TLS_TPREL32: case R_MIPS_TLS_TPREL64: - CHECK_STATIC_TLS (map, sym_map); - *(ElfW(Addr) *)reloc_addr += TLS_TPREL_VALUE (sym_map, sym); + if (sym) + { + CHECK_STATIC_TLS (map, sym_map); + if (inplace_p) + r_addend = *addr_field; + *addr_field = r_addend + TLS_TPREL_VALUE (sym_map, sym); + } break; } @@ -367,13 +376,14 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, case R_MIPS_REL32: #endif { - int symidx = ELFW(R_SYM) (reloc->r_info); + int symidx = ELFW(R_SYM) (r_info); ElfW(Addr) reloc_value; - /* Support relocations on mis-aligned offsets. Should we ever - implement RELA, this should be replaced with an assignment - from reloc->r_addend. */ - __builtin_memcpy (&reloc_value, reloc_addr, sizeof (reloc_value)); + if (inplace_p) + /* Support relocations on mis-aligned offsets. */ + __builtin_memcpy (&reloc_value, reloc_addr, sizeof (reloc_value)); + else + reloc_value = r_addend; if (symidx) { @@ -424,6 +434,31 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, __builtin_memcpy (reloc_addr, &reloc_value, sizeof (reloc_value)); } break; +#ifndef RTLD_BOOTSTRAP +#if _MIPS_SIM == _ABI64 + case (R_MIPS_64 << 8) | R_MIPS_GLOB_DAT: +#else + case R_MIPS_GLOB_DAT: +#endif + { + int symidx = ELFW(R_SYM) (r_info); + const ElfW(Word) gotsym + = (const ElfW(Word)) map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val; + + if (__builtin_expect ((ElfW(Word)) symidx >= gotsym, 1)) + { + const ElfW(Addr) *got + = (const ElfW(Addr) *) D_PTR (map, l_info[DT_PLTGOT]); + const ElfW(Word) local_gotno + = ((const ElfW(Word)) + map->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val); + + ElfW(Addr) reloc_value = got[symidx + local_gotno - gotsym]; + __builtin_memcpy (reloc_addr, &reloc_value, sizeof (reloc_value)); + } + } + break; +#endif case R_MIPS_NONE: /* Alright, Wilbur. */ break; #if _MIPS_SIM == _ABI64 @@ -436,7 +471,7 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, itself. For ABI compliance, we ignore such _64 dummy relocations. For RELA, this may be simply removed, since it's totally unnecessary. */ - if (ELFW(R_SYM) (reloc->r_info) == 0) + if (ELFW(R_SYM) (r_info) == 0) break; /* Fall through. */ #endif @@ -446,6 +481,18 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, } } +/* Perform the relocation specified by RELOC and SYM (which is fully resolved). + MAP is the object containing the reloc. */ + +auto inline void +__attribute__ ((always_inline)) +elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, + const ElfW(Sym) *sym, const struct r_found_version *version, + void *const reloc_addr) +{ + elf_machine_reloc (map, reloc->r_info, sym, version, reloc_addr, 0, 1); +} + auto inline void __attribute__((always_inline)) elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc, @@ -457,7 +504,7 @@ elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc, auto inline void __attribute__((always_inline)) elf_machine_lazy_rel (struct link_map *map, - ElfW(Addr) l_addr, const ElfW(Rel) *reloc) + ElfW(Addr) l_addr, const ElfW(Rela) *reloc) { /* Do nothing. */ } @@ -468,6 +515,8 @@ elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc, const ElfW(Sym) *sym, const struct r_found_version *version, void *const reloc_addr) { + elf_machine_reloc (map, reloc->r_info, sym, version, reloc_addr, + reloc->r_addend, 0); } auto inline void From c73141f12a7ff4f99e14262c937f8c455a6a7965 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Tue, 23 Jan 2007 14:47:02 +0000 Subject: [PATCH 3686/4487] [BZ #2749] * sysdeps/powerpc/nofpu/fenv_libc.h: New file. --- ChangeLog.powerpc | 5 +++++ sysdeps/powerpc/nofpu/fenv_libc.h | 29 +++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 sysdeps/powerpc/nofpu/fenv_libc.h diff --git a/ChangeLog.powerpc b/ChangeLog.powerpc index 8f329626d8..015c95c9b0 100644 --- a/ChangeLog.powerpc +++ b/ChangeLog.powerpc @@ -1,3 +1,8 @@ +2007-01-23 Steven Munroe + + [BZ #2749] + * sysdeps/powerpc/nofpu/fenv_libc.h: New file. + 2007-01-08 Joseph Myers * sysdeps/powerpc/nofpu/fesetenv.c (__sim_exceptions, diff --git a/sysdeps/powerpc/nofpu/fenv_libc.h b/sysdeps/powerpc/nofpu/fenv_libc.h new file mode 100644 index 0000000000..db6996cd4e --- /dev/null +++ b/sysdeps/powerpc/nofpu/fenv_libc.h @@ -0,0 +1,29 @@ +/* Internal libc stuff for floating point environment routines. + Copyright (C) 2007 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 _FENV_LIBC_H +#define _FENV_LIBC_H 1 + +/* fenv_libc.h is used in libm implementations of ldbl-128ibm. So we + need this version in the soft-fp to at minimum include fenv.h to + get the fegetround definition. */ + +#include + +#endif /* fenv_libc.h */ From e3097800591bb59edf71359fddbf4693cb610dda Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Tue, 23 Jan 2007 14:48:27 +0000 Subject: [PATCH 3687/4487] * sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h (cfi_same_value): Delete definition. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h | 6 ------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 46fe53d098..facc304378 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2007-01-23 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h + (cfi_same_value): Delete definition. + 2007-01-08 Richard Sandiford * sysdeps/mips/dl-machine.h (ELF_MACHINE_NO_RELA): Delete. diff --git a/sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h index 7e9d4bfa9c..cb2cc0779a 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h @@ -28,12 +28,6 @@ happen before any instructions. So we use cfi_same_value instead of cfi_restore. */ -#ifdef HAVE_ASM_CFI_DIRECTIVES -# define cfi_same_value .cfi_same_value -#else -# define cfi_same_value -#endif - #if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt #ifdef __PIC__ From 908afa831ca4403a689304a86e2014b4baa66366 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Tue, 23 Jan 2007 16:47:28 +0000 Subject: [PATCH 3688/4487] * sysdeps/unix/sysv/linux/arm/sysdep.h (PTR_MANGLE, PTR_DEMANGLE): Define. * sysdeps/unix/sysv/linux/mips/mips32/sysdep.h (PTR_MANGLE, PTR_DEMANGLE): Define. * sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h (PTR_MANGLE, PTR_DEMANGLE): Define. * sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h (PTR_MANGLE, PTR_DEMANGLE): Define. --- ChangeLog.arm | 5 +++++ ChangeLog.mips | 9 +++++++++ sysdeps/unix/sysv/linux/arm/sysdep.h | 4 ++++ sysdeps/unix/sysv/linux/mips/mips32/sysdep.h | 4 ++++ sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h | 4 ++++ sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h | 4 ++++ 6 files changed, 30 insertions(+) diff --git a/ChangeLog.arm b/ChangeLog.arm index 299d9304d4..ebad07a9ab 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2007-01-23 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/arm/sysdep.h (PTR_MANGLE, PTR_DEMANGLE): + Define. + 2007-01-08 Daniel Jacobowitz * sysdeps/unix/sysv/linux/arm/check_pf.c: New file. diff --git a/ChangeLog.mips b/ChangeLog.mips index facc304378..7ee5bfd9a7 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,12 @@ +2007-01-23 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/mips/mips32/sysdep.h (PTR_MANGLE, + PTR_DEMANGLE): Define. + * sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h (PTR_MANGLE, + PTR_DEMANGLE): Define. + * sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h (PTR_MANGLE, + PTR_DEMANGLE): Define. + 2007-01-23 Daniel Jacobowitz * sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index 7692c1cd43..2952067b97 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -286,4 +286,8 @@ __local_syscall_error: \ #endif /* __ASSEMBLER__ */ +/* Pointer mangling is not yet supported for ARM. */ +#define PTR_MANGLE(var) (void) (var) +#define PTR_DEMANGLE(var) (void) (var) + #endif /* linux/arm/sysdep.h */ diff --git a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h index 3da2412259..3c19bffc4b 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h @@ -289,4 +289,8 @@ #endif /* __ASSEMBLER__ */ +/* Pointer mangling is not yet supported for MIPS. */ +#define PTR_MANGLE(var) (void) (var) +#define PTR_DEMANGLE(var) (void) (var) + #endif /* linux/mips/mips32/sysdep.h */ diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h index 247d4ffbf4..d2635987f4 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h @@ -245,4 +245,8 @@ "$14", "$15", "$24", "$25", "memory" #endif /* __ASSEMBLER__ */ +/* Pointer mangling is not yet supported for MIPS. */ +#define PTR_MANGLE(var) (void) (var) +#define PTR_DEMANGLE(var) (void) (var) + #endif /* linux/mips/sysdep.h */ diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h index c238822b20..edf8786ea7 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h @@ -245,4 +245,8 @@ "$14", "$15", "$24", "$25", "memory" #endif /* __ASSEMBLER__ */ +/* Pointer mangling is not yet supported for MIPS. */ +#define PTR_MANGLE(var) (void) (var) +#define PTR_DEMANGLE(var) (void) (var) + #endif /* linux/mips/sysdep.h */ From eb96755bb858e8a0db32f7ce360f21d902e4c306 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Thu, 25 Jan 2007 13:08:14 +0000 Subject: [PATCH 3689/4487] * sysdeps/unix/sysv/linux/mips/mips64/syscalls.list: Remove msgctl, shmctl, and semctl. * sysdeps/unix/sysv/linux/mips/misp64/semctl.c, sysdeps/unix/sysv/linux/mips/mips64/shmctl.c, sysdeps/unix/sysv/linux/mips/mips64/msgctl.c: New files. --- ChangeLog.mips | 9 +++ sysdeps/unix/sysv/linux/mips/mips64/msgctl.c | 35 ++++++++++++ sysdeps/unix/sysv/linux/mips/mips64/semctl.c | 57 +++++++++++++++++++ sysdeps/unix/sysv/linux/mips/mips64/shmctl.c | 35 ++++++++++++ .../unix/sysv/linux/mips/mips64/syscalls.list | 6 +- 5 files changed, 138 insertions(+), 4 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/msgctl.c create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/semctl.c create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/shmctl.c diff --git a/ChangeLog.mips b/ChangeLog.mips index 7ee5bfd9a7..6bf3313f92 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,12 @@ +2007-01-25 Atsushi Nemoto + Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/mips/mips64/syscalls.list: Remove msgctl, + shmctl, and semctl. + * sysdeps/unix/sysv/linux/mips/misp64/semctl.c, + sysdeps/unix/sysv/linux/mips/mips64/shmctl.c, + sysdeps/unix/sysv/linux/mips/mips64/msgctl.c: New files. + 2007-01-23 Daniel Jacobowitz * sysdeps/unix/sysv/linux/mips/mips32/sysdep.h (PTR_MANGLE, diff --git a/sysdeps/unix/sysv/linux/mips/mips64/msgctl.c b/sysdeps/unix/sysv/linux/mips/mips64/msgctl.c new file mode 100644 index 0000000000..646c348428 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/msgctl.c @@ -0,0 +1,35 @@ +/* Copyright (C) 2007 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. */ + +#include +#include +#include +#include + +#include + +int __msgctl (int msqid, int cmd, struct msqid_ds *buf); + +int +__msgctl (int msqid, int cmd, struct msqid_ds *buf) +{ + return INLINE_SYSCALL (msgctl, 3, msqid, cmd | __IPC_64, CHECK_1 (buf)); +} + +#include +versioned_symbol (libc, __msgctl, msgctl, GLIBC_2_0); diff --git a/sysdeps/unix/sysv/linux/mips/mips64/semctl.c b/sysdeps/unix/sysv/linux/mips/mips64/semctl.c new file mode 100644 index 0000000000..4d38b386de --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/semctl.c @@ -0,0 +1,57 @@ +/* Copyright (C) 2007 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. */ + +#include +#include +#include +#include +#include + +/* Define a `union semun' suitable for Linux here. */ +union semun +{ + int val; /* value for SETVAL */ + struct semid_ds *buf; /* buffer for IPC_STAT & IPC_SET */ + unsigned short int *array; /* array for GETALL & SETALL */ + struct seminfo *__buf; /* buffer for IPC_INFO */ +}; + +#include +#include /* definition of CHECK_SEMCTL needs union semum */ + +int __semctl (int semid, int semnum, int cmd, ...); + +int +__semctl (int semid, int semnum, int cmd, ...) +{ + union semun arg; + va_list ap; + + va_start (ap, cmd); + + /* Get the argument. */ + arg = va_arg (ap, union semun); + + va_end (ap); + + return INLINE_SYSCALL (semctl, 4, semid, semnum, cmd | __IPC_64, + CHECK_SEMCTL (&arg, semid, cmd | __IPC_64)->array); +} + +#include +versioned_symbol (libc, __semctl, semctl, GLIBC_2_0); diff --git a/sysdeps/unix/sysv/linux/mips/mips64/shmctl.c b/sysdeps/unix/sysv/linux/mips/mips64/shmctl.c new file mode 100644 index 0000000000..7e5150be84 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/shmctl.c @@ -0,0 +1,35 @@ +/* Copyright (C) 2007 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. */ + +#include +#include +#include +#include + +#include + +int __shmctl (int shmid, int cmd, struct shmid_ds *buf); + +int +__shmctl (int shmid, int cmd, struct shmid_ds *buf) +{ + return INLINE_SYSCALL (shmctl, 3, shmid, cmd | __IPC_64, CHECK_1 (buf)); +} + +#include +versioned_symbol (libc, __shmctl, shmctl, GLIBC_2_0); diff --git a/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list b/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list index 0d1657d9fc..cac273cc90 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list @@ -2,16 +2,14 @@ lseek - lseek Ci:iii __libc_lseek __lseek lseek __llseek llseek __libc_lseek64 __lseek64 lseek64 -# semaphore and shm system calls -msgctl - msgctl i:iip __msgctl msgctl +# Semaphore and shm system calls. msgctl, shmctl, and semctl have C +# wrappers (to set __IPC_64). msgget - msgget i:ii __msgget msgget msgrcv - msgrcv Ci:ibnii __msgrcv msgrcv msgsnd - msgsnd Ci:ibni __msgsnd msgsnd shmat - shmat i:ipi __shmat shmat -shmctl - shmctl i:iip __shmctl shmctl shmdt - shmdt i:s __shmdt shmdt shmget - shmget i:iii __shmget shmget semop - semop i:ipi __semop semop semtimedop - semtimedop i:ipip semtimedop semget - semget i:iii __semget semget -semctl - semctl i:iiii __semctl semctl From f50c692c2083ba1eaadc43696104b151bf9f40c3 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Thu, 1 Feb 2007 15:43:00 +0000 Subject: [PATCH 3690/4487] * sysdeps/mips/bits/mathdef.h (float_t): Change to float. --- ChangeLog.mips | 4 ++++ sysdeps/mips/bits/mathdef.h | 9 ++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 6bf3313f92..159a4c2475 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,7 @@ +2007-02-01 Joseph Myers + + * sysdeps/mips/bits/mathdef.h (float_t): Change to float. + 2007-01-25 Atsushi Nemoto Daniel Jacobowitz diff --git a/sysdeps/mips/bits/mathdef.h b/sysdeps/mips/bits/mathdef.h index 99be0db2b5..8ecce797d6 100644 --- a/sysdeps/mips/bits/mathdef.h +++ b/sysdeps/mips/bits/mathdef.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2004 +/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -26,10 +26,9 @@ #if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF # define _MATH_H_MATHDEF 1 -/* Normally, there is no long double type and the `float' and `double' - expressions are evaluated as `double'. */ -typedef double float_t; /* `float' expressions are evaluated as - `double'. */ +/* MIPS has `float' and `double' operations. */ +typedef float float_t; /* `float' expressions are evaluated as + `float'. */ typedef double double_t; /* `double' expressions are evaluated as `double'. */ From 186a83ab33198e5296157aa53faa29b07e750f2b Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Fri, 2 Feb 2007 21:50:19 +0000 Subject: [PATCH 3691/4487] 2007-02-02 Guy Martin * sysdeps/hppa/dl-trampoline.S (_dl_runtime_profile): Add cfi_endproc. --- ChangeLog.hppa | 5 +++++ sysdeps/hppa/dl-trampoline.S | 1 + 2 files changed, 6 insertions(+) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 9c05eb1be9..ca5530830c 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,8 @@ +2007-02-02 Guy Martin + + * sysdeps/hppa/dl-trampoline.S (_dl_runtime_profile): + Add cfi_endproc. + 2006-12-03 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/bits/atomic.h: Remove non-atomic diff --git a/sysdeps/hppa/dl-trampoline.S b/sysdeps/hppa/dl-trampoline.S index e0d3b9b108..c7c18ed18d 100644 --- a/sysdeps/hppa/dl-trampoline.S +++ b/sysdeps/hppa/dl-trampoline.S @@ -284,5 +284,6 @@ L(cont): bv,n 0(%r2) .EXIT .PROCEND + cfi_endproc .size _dl_runtime_profile, . - _dl_runtime_profile From 5b455ff91ed3854c11674e457888622748bc5c7f Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Fri, 2 Feb 2007 21:52:32 +0000 Subject: [PATCH 3692/4487] 2007-02-02 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/sysdep.h (PTR_MANGLE): Define. (PTR_DEMANGLE): Define. --- ChangeLog.hppa | 5 +++++ sysdeps/unix/sysv/linux/hppa/sysdep.h | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index ca5530830c..068044add5 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,8 @@ +2007-02-02 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/sysdep.h (PTR_MANGLE): Define. + (PTR_DEMANGLE): Define. + 2007-02-02 Guy Martin * sysdeps/hppa/dl-trampoline.S (_dl_runtime_profile): diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.h b/sysdeps/unix/sysv/linux/hppa/sysdep.h index 5b12bc5062..69ed7002c7 100644 --- a/sysdeps/unix/sysv/linux/hppa/sysdep.h +++ b/sysdeps/unix/sysv/linux/hppa/sysdep.h @@ -479,3 +479,8 @@ L(pre_end): ASM_LINE_SEP \ #define CLOB_ARGS_0 CLOB_ARGS_1, "%r26" #endif /* __ASSEMBLER__ */ + +/* Pointer mangling is not yet supported for HPPA. */ +#define PTR_MANGLE(var) (void) (var) +#define PTR_DEMANGLE(var) (void) (var) + From 22771b82f523fd8126fc9b0e828dd9ce83bb418c Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 13 Mar 2007 16:05:44 +0000 Subject: [PATCH 3693/4487] * sysdeps/unix/sysv/linux/alpha/sigsuspend.S: Add support for __sigsuspend_nocancel. --- sysdeps/unix/sysv/linux/alpha/sigsuspend.S | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S index 48c3f271c7..6863c07ec1 100644 --- a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S +++ b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S @@ -20,6 +20,19 @@ /* sigsuspend is a special syscall since it needs to dereference the sigset. This will have to change when we have more than 64 signals. */ +#ifndef NO_CANCELLATION +#include + +#undef PSEUDO_PREPARE_ARGS +#define PSEUDO_PREPARE_ARGS ldq a0, 0(a0); + +PSEUDO(__sigsuspend_nocancel, sigsuspend, 1) + ret +/* Use END, not PSEUDO_END, so that we don't issue two $syscall_error + symbols; we'll jump into __sigsuspend for the error case. */ +END(__sigsuspend_nocancel) +#endif /* NO_CANCELLATION */ + #include #undef PSEUDO_PREPARE_ARGS From e8f9994576b3a663e324975508e56cc0f877a33b Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 13 Mar 2007 21:25:16 +0000 Subject: [PATCH 3694/4487] * elf/dl-support.c (_dl_aux_init): Honor DL_PLATFORM_AUXV. * sysdeps/unix/sysv/linux/alpha/dl-auxv.h: New file. * sysdeps/unix/sysv/linux/alpha/dl-support.c: New file. * sysdeps/unix/sysv/linux/alpha/dl-sysdep.c (__libc_alpha_cache_shape): Move to dl-auxv.h; initialize instead of extern weak. (DL_PLATFORM_AUXV): Move to dl-auxv.h; don't test for undef weak symbol. * sysdeps/unix/sysv/linux/alpha/sysconf.c (__libc_alpha_cache_shape): Extern instead of initialized. --- sysdeps/unix/sysv/linux/alpha/dl-auxv.h | 36 +++++++++++++ sysdeps/unix/sysv/linux/alpha/dl-support.c | 2 + sysdeps/unix/sysv/linux/alpha/dl-sysdep.c | 59 +--------------------- sysdeps/unix/sysv/linux/alpha/sysconf.c | 2 +- 4 files changed, 40 insertions(+), 59 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/alpha/dl-auxv.h create mode 100644 sysdeps/unix/sysv/linux/alpha/dl-support.c diff --git a/sysdeps/unix/sysv/linux/alpha/dl-auxv.h b/sysdeps/unix/sysv/linux/alpha/dl-auxv.h new file mode 100644 index 0000000000..8afc4dba3b --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/dl-auxv.h @@ -0,0 +1,36 @@ +/* Auxiliary vector processing for Linux/Alpha. + Copyright (C) 2007 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. */ + +/* Scan the Aux Vector for the cache shape entries. */ + +long __libc_alpha_cache_shape[4] = { -2, -2, -2, -2 }; + +#define DL_PLATFORM_AUXV \ + case AT_L1I_CACHESHAPE: \ + __libc_alpha_cache_shape[0] = av->a_un.a_val; \ + break; \ + case AT_L1D_CACHESHAPE: \ + __libc_alpha_cache_shape[1] = av->a_un.a_val; \ + break; \ + case AT_L2_CACHESHAPE: \ + __libc_alpha_cache_shape[2] = av->a_un.a_val; \ + break; \ + case AT_L3_CACHESHAPE: \ + __libc_alpha_cache_shape[3] = av->a_un.a_val; \ + break; diff --git a/sysdeps/unix/sysv/linux/alpha/dl-support.c b/sysdeps/unix/sysv/linux/alpha/dl-support.c new file mode 100644 index 0000000000..290217671c --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/dl-support.c @@ -0,0 +1,2 @@ +#include "dl-auxv.h" +#include diff --git a/sysdeps/unix/sysv/linux/alpha/dl-sysdep.c b/sysdeps/unix/sysv/linux/alpha/dl-sysdep.c index d95e46f6f1..4034820f4d 100644 --- a/sysdeps/unix/sysv/linux/alpha/dl-sysdep.c +++ b/sysdeps/unix/sysv/linux/alpha/dl-sysdep.c @@ -1,59 +1,2 @@ -/* Operating system support for run-time dynamic linker. Linux/Alpha version. - Copyright (C) 1997, 1998, 2001, 2003, 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 - 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. */ - -#include -#include -#include - -extern long __libc_alpha_cache_shape[4]; -weak_extern (__libc_alpha_cache_shape); - - -/* Scan the Aux Vector for the cache shape entries. */ -#define DL_PLATFORM_AUXV \ - case AT_L1I_CACHESHAPE: \ - { \ - long *cls = __libc_alpha_cache_shape; \ - if (cls != NULL) \ - cls[0] = av->a_un.a_val; \ - break; \ - } \ - case AT_L1D_CACHESHAPE: \ - { \ - long *cls = __libc_alpha_cache_shape; \ - if (cls != NULL) \ - cls[1] = av->a_un.a_val; \ - break; \ - } \ - case AT_L2_CACHESHAPE: \ - { \ - long *cls = __libc_alpha_cache_shape; \ - if (cls != NULL) \ - cls[2] = av->a_un.a_val; \ - break; \ - } \ - case AT_L3_CACHESHAPE: \ - { \ - long *cls = __libc_alpha_cache_shape; \ - if (cls != NULL) \ - cls[3] = av->a_un.a_val; \ - break; \ - } - +#include "dl-auxv.h" #include diff --git a/sysdeps/unix/sysv/linux/alpha/sysconf.c b/sysdeps/unix/sysv/linux/alpha/sysconf.c index 2bbaf1f364..3e5b4ee85f 100644 --- a/sysdeps/unix/sysv/linux/alpha/sysconf.c +++ b/sysdeps/unix/sysv/linux/alpha/sysconf.c @@ -27,7 +27,7 @@ static long int linux_sysconf (int name); #define CSHAPE(totalsize, linesize, assoc) \ ((totalsize & ~0xff) | (linesize << 4) | assoc) -long __libc_alpha_cache_shape[4] = { -2, -2, -2, -2 }; +extern long __libc_alpha_cache_shape[4]; static inline unsigned long implver (void) From 0c3c8450b7a24d94b107e4e736ba0d5d6e3c2d9b Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 13 Mar 2007 21:28:03 +0000 Subject: [PATCH 3695/4487] * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two separate cfi regions for the two subsections. --- sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h index aa42768f70..1db847c9eb 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h @@ -55,6 +55,7 @@ __LABEL(name) \ bne a3, SYSCALL_ERROR_LABEL; \ __LABEL($pseudo_ret) \ .subsection 2; \ + cfi_startproc; \ __LABEL($pseudo_cancel) \ subq sp, 64, sp; \ cfi_def_cfa_offset(64); \ @@ -90,12 +91,13 @@ __LABEL($multi_error) \ cfi_def_cfa_offset(0); \ __LABEL($syscall_error) \ SYSCALL_ERROR_HANDLER; \ + cfi_endproc; \ .previous # undef PSEUDO_END # define PSEUDO_END(sym) \ - .subsection 2; \ cfi_endproc; \ + .subsection 2; \ .size sym, .-sym # define SAVE_ARGS_0 /* Nothing. */ From 9ea0d865795ca73b4e5bb13f7721b1e091bc6eee Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 14 Mar 2007 00:40:50 +0000 Subject: [PATCH 3696/4487] * sysdeps/alpha/Makefile (sysdep-CFLAGS): Force dynamic rounding. * sysdeps/alpha/fpu/bits/mathinline.h (__signbitl): New. * sysdeps/alpha/fpu/libm-test-ulps: Regenerate. * sysdeps/unix/sysv/linux/alpha/alphaev6/fpu/Implies: New file. * sysdeps/unix/sysv/linux/alpha/alphaev67/fpu/Implies: New file. * sysdeps/unix/sysv/linux/alpha/fpu/Implies: New file. --- sysdeps/alpha/Makefile | 7 +- sysdeps/alpha/fpu/bits/mathinline.h | 10 + sysdeps/alpha/fpu/libm-test-ulps | 503 +++++++++++++++--- .../sysv/linux/alpha/alphaev6/fpu/Implies | 2 + .../sysv/linux/alpha/alphaev67/fpu/Implies | 2 + sysdeps/unix/sysv/linux/alpha/fpu/Implies | 2 + 6 files changed, 451 insertions(+), 75 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/alpha/alphaev6/fpu/Implies create mode 100644 sysdeps/unix/sysv/linux/alpha/alphaev67/fpu/Implies create mode 100644 sysdeps/unix/sysv/linux/alpha/fpu/Implies diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile index 1e74d82f58..725ae43584 100644 --- a/sysdeps/alpha/Makefile +++ b/sysdeps/alpha/Makefile @@ -38,9 +38,10 @@ ifeq ($(subdir),elf) CFLAGS-rtld.c = -mbuild-constants endif -# For now, build everything with full IEEE math support. -# TODO: build separate libm and libm-ieee. -sysdep-CFLAGS += -mieee +# Build everything with full IEEE math support, and with dynamic rounding; +# there are a number of math routines that are defined to work with the +# "current" rounding mode, and it's easiest to set this with all of them. +sysdep-CFLAGS += -mieee -mfp-rounding-mode=d # libc.so requires about 16k for the small data area, which is well # below the 64k maximum. diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h index 87d40058c3..bcc1b56d0d 100644 --- a/sysdeps/alpha/fpu/bits/mathinline.h +++ b/sysdeps/alpha/fpu/bits/mathinline.h @@ -178,6 +178,16 @@ __NTH (__signbit (double __x)) return __u.__i < 0; } +__MATH_INLINE int +__NTH (__signbitl (long double __x)) +{ + __extension__ union { + long double __d; + long __i[sizeof(long double)/sizeof(long)]; + } __u = { __d: __x }; + return __u.__i[sizeof(long double)/sizeof(long) - 1] < 0; +} + #endif /* C99 */ #endif /* __NO_MATH_INLINES */ diff --git a/sysdeps/alpha/fpu/libm-test-ulps b/sysdeps/alpha/fpu/libm-test-ulps index 6b882e388a..d9df631d7c 100644 --- a/sysdeps/alpha/fpu/libm-test-ulps +++ b/sysdeps/alpha/fpu/libm-test-ulps @@ -2,34 +2,40 @@ # atan2 Test "atan2 (-0.00756827042671106339, -.001792735857538728036) == -1.80338464113663849327153994379639112": -float: 6 -ifloat: 6 +ildouble: 1 +ldouble: 1 Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025": -float: 3 -ifloat: 3 +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025": -float: 3 -ifloat: 3 +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 # atanh Test "atanh (0.75) == 0.972955074527656652552676371721589865": float: 1 ifloat: 1 +# cacos +Test "Imaginary part of: cacos (0.75 + 1.25 i) == 1.11752014915610270578240049553777969 - 1.13239363160530819522266333696834467 i": +ildouble: 1 +ldouble: 1 + # cacosh -Test "Real part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": -double: 1 -float: 7 -idouble: 1 -ifloat: 7 Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": -double: 1 -float: 3 -idouble: 1 -ifloat: 3 +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 # casin Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": @@ -37,6 +43,9 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +Test "Imaginary part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": +ildouble: 1 +ldouble: 1 # casinh Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": @@ -44,48 +53,55 @@ double: 5 float: 1 idouble: 5 ifloat: 1 +ildouble: 4 +ldouble: 4 Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": double: 3 float: 6 idouble: 3 ifloat: 6 +ildouble: 2 +ldouble: 2 Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 # catan -Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": -float: 3 -ifloat: 3 Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Real part of: catan (0.75 + 1.25 i) == 1.10714871779409050301706546017853704 + 0.549306144334054845697622618461262852 i": -float: 4 -ifloat: 4 +Test "Imaginary part of: catan (0.75 + 1.25 i) == 1.10714871779409050301706546017853704 + 0.549306144334054845697622618461262852 i": +ildouble: 1 +ldouble: 1 # catanh Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": double: 4 idouble: 4 -Test "Imaginary part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": -float: 4 -ifloat: 4 Test "Real part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i": -float: 6 -ifloat: 6 +ildouble: 1 +ldouble: 1 # cbrt +Test "cbrt (-0.001) == -0.1": +ildouble: 1 +ldouble: 1 Test "cbrt (-27.0) == -3.0": double: 1 idouble: 1 @@ -97,9 +113,14 @@ double: 1 idouble: 1 # ccos +Test "Real part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i": +ildouble: 1 +ldouble: 1 Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": double: 1 float: 1 @@ -113,9 +134,13 @@ ifloat: 1 Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": double: 1 float: 1 @@ -126,89 +151,130 @@ float: 1 ifloat: 1 # cexp +Test "Real part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": +ildouble: 1 +ldouble: 1 Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": float: 1 ifloat: 1 +Test "Imaginary part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": +ildouble: 1 +ldouble: 1 # clog -Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i": -float: 3 -ifloat: 3 Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 # clog10 Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i": +double: 1 float: 1 +idouble: 1 ifloat: 1 Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i": +double: 1 float: 1 +idouble: 1 ifloat: 1 +Test "Real part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i": +ildouble: 1 +ldouble: 1 Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i": double: 1 -float: 5 idouble: 1 -ifloat: 5 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i": +double: 1 float: 1 +idouble: 1 ifloat: 1 Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i": +double: 1 float: 1 +idouble: 1 ifloat: 1 Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i": +double: 1 float: 1 +idouble: 1 ifloat: 1 Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i": +double: 1 float: 1 +idouble: 1 ifloat: 1 +Test "Imaginary part of: clog10 (-inf + inf i) == inf + 3/4 pi*log10(e) i": +double: 1 +idouble: 1 Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i": +double: 1 float: 1 +idouble: 1 ifloat: 1 Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i": +double: 1 float: 1 +idouble: 1 ifloat: 1 Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i": +double: 1 float: 1 +idouble: 1 ifloat: 1 Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i": +double: 1 float: 1 +idouble: 1 ifloat: 1 Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i": float: 1 ifloat: 1 +Test "Imaginary part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i": +ildouble: 1 +ldouble: 1 Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i": +double: 1 float: 1 +idouble: 1 ifloat: 1 Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i": +double: 1 float: 1 +idouble: 1 ifloat: 1 Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i": +double: 1 float: 1 +idouble: 1 ifloat: 1 Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i": +double: 1 float: 1 +idouble: 1 ifloat: 1 # cos Test "cos (M_PI_6l * 2.0) == 0.5": double: 1 -float: 1 idouble: 1 -ifloat: 1 +ildouble: 1 +ldouble: 1 Test "cos (M_PI_6l * 4.0) == -0.5": double: 2 float: 1 idouble: 2 ifloat: 1 -Test "cos (pi/2) == 0": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 +ildouble: 1 +ldouble: 1 # cpow Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": @@ -222,16 +288,31 @@ double: 1 float: 4 idouble: 1 ifloat: 4 +ildouble: 4 +ldouble: 4 +Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i": +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i": +ildouble: 1 +ldouble: 1 Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i": double: 2 float: 3 idouble: 2 ifloat: 3 +ildouble: 10 +ldouble: 10 +Test "Real part of: cpow (2 + 0 i, 10 + 0 i) == 1024.0 + 0.0 i": +ildouble: 2 +ldouble: 2 Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": double: 1 float: 4 idouble: 1 ifloat: 4 +ildouble: 3 +ldouble: 3 Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": float: 2 ifloat: 2 @@ -240,8 +321,21 @@ double: 2 float: 2 idouble: 2 ifloat: 2 +ildouble: 1 +ldouble: 1 + +# csin +Test "Imaginary part of: csin (-2 - 3 i) == -9.15449914691142957346729954460983256 + 4.16890695996656435075481305885375484 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: csin (0.75 + 1.25 i) == 1.28722291002649188575873510790565441 + 1.17210635989270256101081285116138863 i": +ildouble: 1 +ldouble: 1 # csinh +Test "Real part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i": +ildouble: 1 +ldouble: 1 Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i": double: 1 idouble: 1 @@ -256,14 +350,29 @@ ifloat: 1 Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csqrt (0.75 + 1.25 i) == 1.05065169626078392338656675760808326 + 0.594868882070379067881984030639932657 i": +ildouble: 1 +ldouble: 1 # ctan +Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": +ildouble: 1 +ldouble: 1 Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i": double: 1 idouble: 1 +ildouble: 2 +ldouble: 2 # ctanh Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": @@ -271,6 +380,11 @@ double: 1 float: 2 idouble: 1 ifloat: 2 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": +ildouble: 1 +ldouble: 1 Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i": float: 1 ifloat: 1 @@ -287,6 +401,9 @@ idouble: 1 Test "erfc (2.0) == 0.00467773498104726583793074363274707139": double: 1 idouble: 1 +Test "erfc (27.0) == 0.523704892378925568501606768284954709e-318": +ildouble: 1 +ldouble: 1 Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8": double: 1 idouble: 1 @@ -307,14 +424,30 @@ double: 6 float: 2 idouble: 6 ifloat: 2 +ildouble: 1 +ldouble: 1 + +# exp2 +Test "exp2 (10) == 1024": +ildouble: 2 +ldouble: 2 # expm1 Test "expm1 (0.75) == 1.11700001661267466854536981983709561": double: 1 idouble: 1 Test "expm1 (1) == M_El - 1.0": +double: 1 float: 1 +idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 + +# gamma +Test "gamma (-0.5) == log(2*sqrt(pi))": +ildouble: 1 +ldouble: 1 # hypot Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271": @@ -356,9 +489,13 @@ double: 2 float: 1 idouble: 2 ifloat: 1 +ildouble: 2 +ldouble: 2 Test "j0 (2.0) == 0.223890779141235668051827454649948626": float: 2 ifloat: 2 +ildouble: 2 +ldouble: 2 Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1": double: 1 float: 1 @@ -367,17 +504,32 @@ ifloat: 1 Test "j0 (8.0) == 0.171650807137553906090869407851972001": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 # j1 +Test "j1 (-1.0) == -0.440050585744933515959682203718914913": +ildouble: 1 +ldouble: 1 +Test "j1 (0.75) == 0.349243602174862192523281016426251335": +ildouble: 1 +ldouble: 1 +Test "j1 (1.0) == 0.440050585744933515959682203718914913": +ildouble: 1 +ldouble: 1 Test "j1 (10.0) == 0.0434727461688614366697487680258592883": float: 2 ifloat: 2 +ildouble: 2 +ldouble: 2 Test "j1 (2.0) == 0.576724807756873387202448242269137087": double: 1 idouble: 1 Test "j1 (8.0) == 0.234636346853914624381276651590454612": double: 1 idouble: 1 +ildouble: 4 +ldouble: 4 # jn Test "jn (0, -4.0) == -3.9714980986384737228659076845169804197562E-1": @@ -393,9 +545,13 @@ double: 2 float: 1 idouble: 2 ifloat: 1 +ildouble: 2 +ldouble: 2 Test "jn (0, 2.0) == 0.223890779141235668051827454649948626": float: 2 ifloat: 2 +ildouble: 2 +ldouble: 2 Test "jn (0, 4.0) == -3.9714980986384737228659076845169804197562E-1": double: 1 float: 1 @@ -404,30 +560,57 @@ ifloat: 1 Test "jn (0, 8.0) == 0.171650807137553906090869407851972001": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "jn (1, -1.0) == -0.440050585744933515959682203718914913": +ildouble: 1 +ldouble: 1 +Test "jn (1, 0.75) == 0.349243602174862192523281016426251335": +ildouble: 1 +ldouble: 1 +Test "jn (1, 1.0) == 0.440050585744933515959682203718914913": +ildouble: 1 +ldouble: 1 Test "jn (1, 10.0) == 0.0434727461688614366697487680258592883": float: 2 ifloat: 2 +ildouble: 2 +ldouble: 2 Test "jn (1, 2.0) == 0.576724807756873387202448242269137087": double: 1 idouble: 1 Test "jn (1, 8.0) == 0.234636346853914624381276651590454612": double: 1 idouble: 1 +ildouble: 4 +ldouble: 4 +Test "jn (10, -1.0) == 0.263061512368745320699785368779050294e-9": +ildouble: 1 +ldouble: 1 Test "jn (10, 0.125) == 0.250543369809369890173993791865771547e-18": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "jn (10, 0.75) == 0.149621713117596814698712483621682835e-10": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "jn (10, 1.0) == 0.263061512368745320699785368779050294e-9": +ildouble: 1 +ldouble: 1 Test "jn (10, 10.0) == 0.207486106633358857697278723518753428": double: 4 float: 3 idouble: 4 ifloat: 3 +ildouble: 2 +ldouble: 2 Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6": float: 4 ifloat: 4 @@ -446,6 +629,8 @@ double: 3 float: 1 idouble: 3 ifloat: 1 +ildouble: 2 +ldouble: 2 Test "jn (3, 2.0) == 0.128943249474402051098793332969239835": double: 1 float: 2 @@ -453,16 +638,23 @@ idouble: 1 ifloat: 2 # lgamma +Test "lgamma (-0.5) == log(2*sqrt(pi))": +ildouble: 1 +ldouble: 1 Test "lgamma (0.7) == 0.260867246531666514385732417016759578": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1": double: 1 float: 2 idouble: 1 ifloat: 2 +ildouble: 1 +ldouble: 1 # log10 Test "log10 (0.75) == -0.124938736608299953132449886193870744": @@ -473,36 +665,54 @@ ifloat: 2 Test "log10 (e) == log10(e)": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 # log1p Test "log1p (-0.25) == -0.287682072451780927439219005993827432": float: 1 ifloat: 1 +# log2 +Test "log2 (0.75) == -.415037499278843818546261056052183492": +ildouble: 1 +ldouble: 1 + # sincos Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": double: 1 -float: 1 idouble: 1 -ifloat: 1 +ildouble: 1 +ldouble: 1 Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 +ildouble: 1 +ldouble: 1 Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res": float: 1 ifloat: 1 -# tan -Test "tan (pi/4) == 1": -double: 1 -idouble: 1 +# sqrt +Test "sqrt (2) == M_SQRT2l": +ildouble: 1 +ldouble: 1 + +# tanh +Test "tanh (-0.75) == -0.635148952387287319214434357312496495": +ildouble: 1 +ldouble: 1 +Test "tanh (-1.0) == -0.7615941559557648881194582826047935904": +ildouble: 1 +ldouble: 1 +Test "tanh (0.75) == 0.635148952387287319214434357312496495": +ildouble: 1 +ldouble: 1 +Test "tanh (1.0) == 0.7615941559557648881194582826047935904": +ildouble: 1 +ldouble: 1 # tgamma Test "tgamma (-0.5) == -2 sqrt (pi)": @@ -510,6 +720,8 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "tgamma (0.5) == sqrt (pi)": float: 1 ifloat: 1 @@ -518,6 +730,9 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +Test "tgamma (4) == 6": +ildouble: 1 +ldouble: 1 # y0 Test "y0 (1.0) == 0.0882569642156769579829267660235151628": @@ -533,19 +748,28 @@ ifloat: 1 Test "y0 (10.0) == 0.0556711672835993914244598774101900481": float: 1 ifloat: 1 +ildouble: 3 +ldouble: 3 Test "y0 (8.0) == 0.223521489387566220527323400498620359": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 3 +ldouble: 3 # y1 Test "y1 (0.125) == -5.19993611253477499595928744876579921": double: 1 idouble: 1 +Test "y1 (0.75) == -1.03759455076928541973767132140642198": +ildouble: 1 +ldouble: 1 Test "y1 (1.5) == -0.412308626973911295952829820633445323": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "y1 (10.0) == 0.249015424206953883923283474663222803": double: 3 float: 1 @@ -556,11 +780,15 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "y1 (8.0) == -0.158060461731247494255555266187483550": double: 1 float: 2 idouble: 1 ifloat: 2 +ildouble: 1 +ldouble: 1 # yn Test "yn (0, 1.0) == 0.0882569642156769579829267660235151628": @@ -576,17 +804,26 @@ ifloat: 1 Test "yn (0, 10.0) == 0.0556711672835993914244598774101900481": float: 1 ifloat: 1 +ildouble: 3 +ldouble: 3 Test "yn (0, 8.0) == 0.223521489387566220527323400498620359": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 3 +ldouble: 3 Test "yn (1, 0.125) == -5.19993611253477499595928744876579921": double: 1 idouble: 1 +Test "yn (1, 0.75) == -1.03759455076928541973767132140642198": +ildouble: 1 +ldouble: 1 Test "yn (1, 1.5) == -0.412308626973911295952829820633445323": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "yn (1, 10.0) == 0.249015424206953883923283474663222803": double: 3 float: 1 @@ -597,30 +834,44 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "yn (1, 8.0) == -0.158060461731247494255555266187483550": double: 1 float: 2 idouble: 1 ifloat: 2 +ildouble: 1 +ldouble: 1 Test "yn (10, 0.125) == -127057845771019398.252538486899753195": double: 1 idouble: 1 +ildouble: 2 +ldouble: 2 Test "yn (10, 0.75) == -2133501638.90573424452445412893839236": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 5 +ldouble: 5 Test "yn (10, 1.0) == -121618014.278689189288130426667971145": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 Test "yn (10, 10.0) == -0.359814152183402722051986577343560609": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 2 +ldouble: 2 Test "yn (10, 2.0) == -129184.542208039282635913145923304214": double: 2 idouble: 2 +ildouble: 2 +ldouble: 2 Test "yn (3, 0.125) == -2612.69757350066712600220955744091741": double: 1 idouble: 1 @@ -629,35 +880,39 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 2 +ldouble: 2 Test "yn (3, 10.0) == -0.251362657183837329779204747654240998": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "yn (3, 2.0) == -1.12778377684042778608158395773179238": double: 1 idouble: 1 # Maximal error of functions: Function: "atan2": -float: 6 -ifloat: 6 +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 Function: "atanh": float: 1 ifloat: 1 -Function: Real part of "cacosh": -double: 1 -float: 7 -idouble: 1 -ifloat: 7 +Function: Imaginary part of "cacos": +ildouble: 1 +ldouble: 1 Function: Imaginary part of "cacosh": -double: 1 -float: 3 -idouble: 1 -ifloat: 3 +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 Function: Real part of "casin": double: 1 @@ -665,107 +920,147 @@ float: 1 idouble: 1 ifloat: 1 +Function: Imaginary part of "casin": +ildouble: 1 +ldouble: 1 + Function: Real part of "casinh": double: 5 float: 1 idouble: 5 ifloat: 1 +ildouble: 4 +ldouble: 4 Function: Imaginary part of "casinh": double: 3 float: 6 idouble: 3 ifloat: 6 - -Function: Real part of "catan": -float: 4 -ifloat: 4 +ildouble: 2 +ldouble: 2 Function: Imaginary part of "catan": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: Real part of "catanh": double: 4 idouble: 4 +ildouble: 1 +ldouble: 1 Function: Imaginary part of "catanh": -float: 6 -ifloat: 6 +ildouble: 1 +ldouble: 1 Function: "cbrt": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 Function: Real part of "ccos": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: Imaginary part of "ccos": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: Real part of "ccosh": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: Imaginary part of "ccosh": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: Real part of "cexp": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: Imaginary part of "cexp": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: Real part of "clog": float: 1 ifloat: 1 - -Function: Imaginary part of "clog": -float: 3 -ifloat: 3 +ildouble: 1 +ldouble: 1 Function: Real part of "clog10": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: Imaginary part of "clog10": double: 1 -float: 5 +float: 1 idouble: 1 -ifloat: 5 +ifloat: 1 +ildouble: 1 +ldouble: 1 Function: "cos": double: 2 float: 1 idouble: 2 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: Real part of "cpow": double: 2 float: 4 idouble: 2 ifloat: 4 +ildouble: 10 +ldouble: 10 Function: Imaginary part of "cpow": double: 2 float: 2 idouble: 2 ifloat: 2 +ildouble: 1 +ldouble: 1 + +Function: Real part of "csin": +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "csin": +ildouble: 1 +ldouble: 1 Function: Real part of "csinh": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: Imaginary part of "csinh": double: 1 @@ -776,20 +1071,36 @@ ifloat: 1 Function: Real part of "csqrt": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "csqrt": +ildouble: 1 +ldouble: 1 + +Function: Real part of "ctan": +ildouble: 1 +ldouble: 1 Function: Imaginary part of "ctan": double: 1 idouble: 1 +ildouble: 2 +ldouble: 2 Function: Real part of "ctanh": double: 1 float: 2 idouble: 1 ifloat: 2 +ildouble: 1 +ldouble: 1 Function: Imaginary part of "ctanh": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: "erf": double: 1 @@ -798,18 +1109,32 @@ idouble: 1 Function: "erfc": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 Function: "exp10": double: 6 float: 2 idouble: 6 ifloat: 2 +ildouble: 1 +ldouble: 1 + +Function: "exp2": +ildouble: 2 +ldouble: 2 Function: "expm1": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "gamma": +ildouble: 1 +ldouble: 1 Function: "hypot": float: 1 @@ -820,67 +1145,101 @@ double: 2 float: 2 idouble: 2 ifloat: 2 +ildouble: 2 +ldouble: 2 Function: "j1": double: 1 float: 2 idouble: 1 ifloat: 2 +ildouble: 4 +ldouble: 4 Function: "jn": double: 4 float: 4 idouble: 4 ifloat: 4 +ildouble: 4 +ldouble: 4 Function: "lgamma": double: 1 float: 2 idouble: 1 ifloat: 2 +ildouble: 1 +ldouble: 1 Function: "log10": double: 1 float: 2 idouble: 1 ifloat: 2 +ildouble: 1 +ldouble: 1 Function: "log1p": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "log2": +ildouble: 1 +ldouble: 1 Function: "sincos": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "sqrt": +ildouble: 1 +ldouble: 1 Function: "tan": double: 1 idouble: 1 +Function: "tanh": +ildouble: 1 +ldouble: 1 + Function: "tgamma": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: "y0": double: 2 float: 1 idouble: 2 ifloat: 1 +ildouble: 3 +ldouble: 3 Function: "y1": double: 3 float: 2 idouble: 3 ifloat: 2 +ildouble: 1 +ldouble: 1 Function: "yn": double: 3 float: 2 idouble: 3 ifloat: 2 +ildouble: 5 +ldouble: 5 # end of automatic generation diff --git a/sysdeps/unix/sysv/linux/alpha/alphaev6/fpu/Implies b/sysdeps/unix/sysv/linux/alpha/alphaev6/fpu/Implies new file mode 100644 index 0000000000..0d7000dc2d --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/alphaev6/fpu/Implies @@ -0,0 +1,2 @@ +# Override ldbl-opt with alpha specific routines. +alpha/alphaev6/fpu diff --git a/sysdeps/unix/sysv/linux/alpha/alphaev67/fpu/Implies b/sysdeps/unix/sysv/linux/alpha/alphaev67/fpu/Implies new file mode 100644 index 0000000000..617c388d2d --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/alphaev67/fpu/Implies @@ -0,0 +1,2 @@ +# Override ldbl-opt with alpha specific routines. +alpha/alphaev67/fpu diff --git a/sysdeps/unix/sysv/linux/alpha/fpu/Implies b/sysdeps/unix/sysv/linux/alpha/fpu/Implies new file mode 100644 index 0000000000..d76f511c2e --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/fpu/Implies @@ -0,0 +1,2 @@ +# Override ldbl-opt with alpha specific routines. +alpha/fpu From bebc49030c157a3c2b88bff16115029508bac1a8 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 14 Mar 2007 17:44:14 +0000 Subject: [PATCH 3697/4487] * sysdeps/alpha/fpu/s_ceil.c: Rewrite without branches. * sysdeps/alpha/fpu/s_ceilf.c: Likewise. * sysdeps/alpha/fpu/s_floor.c: Likewise. * sysdeps/alpha/fpu/s_floorf.c: Likewise. * sysdeps/alpha/fpu/s_rint.c: Likewise. * sysdeps/alpha/fpu/s_rintf.c: Likewise. * sysdeps/alpha/fpu/s_fmax.S: New file. * sysdeps/alpha/fpu/s_fmaxf.S: New file. * sysdeps/alpha/fpu/s_fmin.S: New file. * sysdeps/alpha/fpu/s_fminf.S: New file. * sysdeps/alpha/fpu/s_isnan.c: New file. * sysdeps/alpha/fpu/s_isnanf.c: New file. * sysdeps/alpha/fpu/s_llrint.c: New file. * sysdeps/alpha/fpu/s_llrintf.c: New file. * sysdeps/alpha/fpu/s_lrint.c: New file. * sysdeps/alpha/fpu/s_lrintf.c: New file. * sysdeps/alpha/fpu/s_nearbyint.c: New file. * sysdeps/alpha/fpu/s_nearbyintf.c: New file. * sysdeps/alpha/fpu/bits/mathinline.h (__floorf, __floor): Remove. (__fdimf, fdimf, __fdim, fdim): Remove. (__signbitf, __signbit, __signbitl): Use gcc builtin if available. (__isnanf, __isnan, __isnanl): New. --- sysdeps/alpha/fpu/bits/mathinline.h | 112 ++++++++-------------------- sysdeps/alpha/fpu/s_ceil.c | 29 +++---- sysdeps/alpha/fpu/s_ceilf.c | 34 +++------ sysdeps/alpha/fpu/s_floor.c | 30 ++++---- sysdeps/alpha/fpu/s_floorf.c | 35 ++++----- sysdeps/alpha/fpu/s_fmax.S | 58 ++++++++++++++ sysdeps/alpha/fpu/s_fmaxf.S | 1 + sysdeps/alpha/fpu/s_fmin.S | 58 ++++++++++++++ sysdeps/alpha/fpu/s_fminf.S | 1 + sysdeps/alpha/fpu/s_isnan.c | 58 ++++++++++++++ sysdeps/alpha/fpu/s_isnanf.c | 1 + sysdeps/alpha/fpu/s_llrint.c | 1 + sysdeps/alpha/fpu/s_llrintf.c | 1 + sysdeps/alpha/fpu/s_lrint.c | 48 ++++++++++++ sysdeps/alpha/fpu/s_lrintf.c | 39 ++++++++++ sysdeps/alpha/fpu/s_nearbyint.c | 48 ++++++++++++ sysdeps/alpha/fpu/s_nearbyintf.c | 40 ++++++++++ sysdeps/alpha/fpu/s_rint.c | 29 +++---- sysdeps/alpha/fpu/s_rintf.c | 35 +++------ 19 files changed, 457 insertions(+), 201 deletions(-) create mode 100644 sysdeps/alpha/fpu/s_fmax.S create mode 100644 sysdeps/alpha/fpu/s_fmaxf.S create mode 100644 sysdeps/alpha/fpu/s_fmin.S create mode 100644 sysdeps/alpha/fpu/s_fminf.S create mode 100644 sysdeps/alpha/fpu/s_isnan.c create mode 100644 sysdeps/alpha/fpu/s_isnanf.c create mode 100644 sysdeps/alpha/fpu/s_llrint.c create mode 100644 sysdeps/alpha/fpu/s_llrintf.c create mode 100644 sysdeps/alpha/fpu/s_lrint.c create mode 100644 sysdeps/alpha/fpu/s_lrintf.c create mode 100644 sysdeps/alpha/fpu/s_nearbyint.c create mode 100644 sysdeps/alpha/fpu/s_nearbyintf.c diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h index bcc1b56d0d..3ea021a7dd 100644 --- a/sysdeps/alpha/fpu/bits/mathinline.h +++ b/sysdeps/alpha/fpu/bits/mathinline.h @@ -1,5 +1,6 @@ /* Inline math functions for Alpha. - Copyright (C) 1996, 1997, 1999-2001, 2004 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1999-2001, 2004, 2007 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger-Tang. @@ -83,111 +84,64 @@ __inline_fabs (fabs, double) # undef __inline_fabs #endif - -/* Use the -inf rounding mode conversion instructions to implement - floor. We note when the exponent is large enough that the value - must be integral, as this avoids unpleasant integer overflows. */ - -__MATH_INLINE float -__NTH (__floorf (float __x)) -{ - /* Check not zero since floor(-0) == -0. */ - if (__x != 0 && fabsf (__x) < 16777216.0f) /* 1 << FLT_MANT_DIG */ - { - /* Note that Alpha S_Floating is stored in registers in a - restricted T_Floating format, so we don't even need to - convert back to S_Floating in the end. The initial - conversion to T_Floating is needed to handle denormals. */ - - float __tmp1, __tmp2; - - __asm ("cvtst/s %3,%2\n\t" -#ifdef _IEEE_FP_INEXACT - "cvttq/svim %2,%1\n\t" -#else - "cvttq/svm %2,%1\n\t" -#endif - "cvtqt/m %1,%0\n\t" - : "=f"(__x), "=&f"(__tmp1), "=&f"(__tmp2) - : "f"(__x)); - } - return __x; -} - -__MATH_INLINE double -__NTH (__floor (double __x)) -{ - if (__x != 0 && fabs (__x) < 9007199254740992.0) /* 1 << DBL_MANT_DIG */ - { - double __tmp1; - __asm ( -#ifdef _IEEE_FP_INEXACT - "cvttq/svim %2,%1\n\t" -#else - "cvttq/svm %2,%1\n\t" -#endif - "cvtqt/m %1,%0\n\t" - : "=f"(__x), "=&f"(__tmp1) - : "f"(__x)); - } - return __x; -} - -__MATH_INLINE float __NTH (floorf (float __x)) { return __floorf(__x); } -__MATH_INLINE double __NTH (floor (double __x)) { return __floor(__x); } - - #ifdef __USE_ISOC99 -__MATH_INLINE float -__NTH (__fdimf (float __x, float __y)) -{ - return __x <= __y ? 0.0f : __x - __y; -} - -__MATH_INLINE float -__NTH (fdimf (float __x, float __y)) -{ - return __x <= __y ? 0.0f : __x - __y; -} - -__MATH_INLINE double -__NTH (__fdim (double __x, double __y)) -{ - return __x <= __y ? 0.0 : __x - __y; -} - -__MATH_INLINE double -__NTH (fdim (double __x, double __y)) -{ - return __x <= __y ? 0.0 : __x - __y; -} - /* Test for negative number. Used in the signbit() macro. */ __MATH_INLINE int __NTH (__signbitf (float __x)) { +#if !__GNUC_PREREQ (4, 0) __extension__ union { float __f; int __i; } __u = { __f: __x }; return __u.__i < 0; +#else + return __builtin_signbitf (__x); +#endif } __MATH_INLINE int __NTH (__signbit (double __x)) { +#if !__GNUC_PREREQ (4, 0) __extension__ union { double __d; long __i; } __u = { __d: __x }; return __u.__i < 0; +#else + return __builtin_signbit (__x); +#endif } __MATH_INLINE int __NTH (__signbitl (long double __x)) { +#if !__GNUC_PREREQ (4, 0) __extension__ union { long double __d; long __i[sizeof(long double)/sizeof(long)]; } __u = { __d: __x }; return __u.__i[sizeof(long double)/sizeof(long) - 1] < 0; +#else + return __builtin_signbitl (__x); +#endif } +/* Test for NaN. Used in the isnan() macro. */ + +__MATH_INLINE int +__NTH (__isnanf (float __x)) +{ + return isunordered (__x, __x); +} + +__MATH_INLINE int +__NTH (__isnan (double __x)) +{ + return isunordered (__x, __x); +} + +__MATH_INLINE int +__NTH (__isnanl (long double __x)) +{ + return isunordered (__x, __x); +} #endif /* C99 */ #endif /* __NO_MATH_INLINES */ diff --git a/sysdeps/alpha/fpu/s_ceil.c b/sysdeps/alpha/fpu/s_ceil.c index ec58fd9486..40c2379286 100644 --- a/sysdeps/alpha/fpu/s_ceil.c +++ b/sysdeps/alpha/fpu/s_ceil.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2000, 2006 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2000, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson. @@ -27,25 +27,20 @@ double __ceil (double x) { - if (isless (fabs (x), 9007199254740992.0)) /* 1 << DBL_MANT_DIG */ - { - double tmp1, new_x; - - new_x = -x; - __asm ( + double two52 = copysign (0x1.0p52, x); + double r, tmp; + + __asm ( #ifdef _IEEE_FP_INEXACT - "cvttq/svim %2,%1\n\t" + "addt/suim %2, %3, %1\n\tsubt/suim %1, %3, %0" #else - "cvttq/svm %2,%1\n\t" + "addt/sum %2, %3, %1\n\tsubt/sum %1, %3, %0" #endif - "cvtqt/m %1,%0\n\t" - : "=f"(new_x), "=&f"(tmp1) - : "f"(new_x)); - - /* Fix up the negation we did above, as well as handling -0 properly. */ - x = copysign(new_x, x); - } - return x; + : "=&f"(r), "=&f"(tmp) + : "f"(-x), "f"(-two52)); + + /* Fix up the negation we did above, as well as handling -0 properly. */ + return copysign (r, x); } weak_alias (__ceil, ceil) diff --git a/sysdeps/alpha/fpu/s_ceilf.c b/sysdeps/alpha/fpu/s_ceilf.c index aba1697a55..0df651f405 100644 --- a/sysdeps/alpha/fpu/s_ceilf.c +++ b/sysdeps/alpha/fpu/s_ceilf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2000, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson. @@ -26,30 +26,20 @@ float __ceilf (float x) { - if (isless (fabsf (x), 16777216.0f)) /* 1 << FLT_MANT_DIG */ - { - /* Note that Alpha S_Floating is stored in registers in a - restricted T_Floating format, so we don't even need to - convert back to S_Floating in the end. The initial - conversion to T_Floating is needed to handle denormals. */ - - float tmp1, tmp2, new_x; - - new_x = -x; - __asm ("cvtst/s %3,%2\n\t" + float two23 = copysignf (0x1.0p23, x); + float r, tmp; + + __asm ( #ifdef _IEEE_FP_INEXACT - "cvttq/svim %2,%1\n\t" + "adds/suim %2, %3, %1\n\tsubs/suim %1, %3, %0" #else - "cvttq/svm %2,%1\n\t" + "adds/sum %2, %3, %1\n\tsubs/sum %1, %3, %0" #endif - "cvtqt/m %1,%0\n\t" - : "=f"(new_x), "=&f"(tmp1), "=&f"(tmp2) - : "f"(new_x)); - - /* Fix up the negation we did above, as well as handling -0 properly. */ - x = copysignf(new_x, x); - } - return x; + : "=&f"(r), "=&f"(tmp) + : "f"(-x), "f"(-two23)); + + /* Fix up the negation we did above, as well as handling -0 properly. */ + return copysignf (r, x); } weak_alias (__ceilf, ceilf) diff --git a/sysdeps/alpha/fpu/s_floor.c b/sysdeps/alpha/fpu/s_floor.c index b22c52303d..29fc924c71 100644 --- a/sysdeps/alpha/fpu/s_floor.c +++ b/sysdeps/alpha/fpu/s_floor.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999, 2000, 2006 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999, 2000, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson. @@ -28,25 +28,21 @@ double __floor (double x) { - if (isless (fabs (x), 9007199254740992.0)) /* 1 << DBL_MANT_DIG */ - { - double tmp1, new_x; - - __asm ( + double two52 = copysign (0x1.0p52, x); + double r, tmp; + + __asm ( #ifdef _IEEE_FP_INEXACT - "cvttq/svim %2,%1\n\t" + "addt/suim %2, %3, %1\n\tsubt/suim %1, %3, %0" #else - "cvttq/svm %2,%1\n\t" + "addt/sum %2, %3, %1\n\tsubt/sum %1, %3, %0" #endif - "cvtqt/m %1,%0\n\t" - : "=f"(new_x), "=&f"(tmp1) - : "f"(x)); - - /* floor(-0) == -0, and in general we'll always have the same - sign as our input. */ - x = copysign(new_x, x); - } - return x; + : "=&f"(r), "=&f"(tmp) + : "f"(x), "f"(two52)); + + /* floor(-0) == -0, and in general we'll always have the same + sign as our input. */ + return copysign (r, x); } weak_alias (__floor, floor) diff --git a/sysdeps/alpha/fpu/s_floorf.c b/sysdeps/alpha/fpu/s_floorf.c index fd1ddab6be..2283264e27 100644 --- a/sysdeps/alpha/fpu/s_floorf.c +++ b/sysdeps/alpha/fpu/s_floorf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999, 2000, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson. @@ -27,30 +27,21 @@ float __floorf (float x) { - if (isless (fabsf (x), 16777216.0f)) /* 1 << FLT_MANT_DIG */ - { - /* Note that Alpha S_Floating is stored in registers in a - restricted T_Floating format, so we don't even need to - convert back to S_Floating in the end. The initial - conversion to T_Floating is needed to handle denormals. */ - - float tmp1, tmp2, new_x; - - __asm ("cvtst/s %3,%2\n\t" + float two23 = copysignf (0x1.0p23, x); + float r, tmp; + + __asm ( #ifdef _IEEE_FP_INEXACT - "cvttq/svim %2,%1\n\t" + "adds/suim %2, %3, %1\n\tsubs/suim %1, %3, %0" #else - "cvttq/svm %2,%1\n\t" + "adds/sum %2, %3, %1\n\tsubs/sum %1, %3, %0" #endif - "cvtqt/m %1,%0\n\t" - : "=f"(new_x), "=&f"(tmp1), "=&f"(tmp2) - : "f"(x)); - - /* floor(-0) == -0, and in general we'll always have the same - sign as our input. */ - x = copysignf(new_x, x); - } - return x; + : "=&f"(r), "=&f"(tmp) + : "f"(x), "f"(two23)); + + /* floor(-0) == -0, and in general we'll always have the same + sign as our input. */ + return copysignf (r, x); } weak_alias (__floorf, floorf) diff --git a/sysdeps/alpha/fpu/s_fmax.S b/sysdeps/alpha/fpu/s_fmax.S new file mode 100644 index 0000000000..4f2ace7d11 --- /dev/null +++ b/sysdeps/alpha/fpu/s_fmax.S @@ -0,0 +1,58 @@ +/* Copyright (C) 2007 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson. + + 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. */ + +#include +#include + + .set noat + .set noreorder + + .text +ENTRY (__fmax) + .prologue 0 + + cmptun/su $f16, $f16, $f10 + cmptun/su $f17, $f17, $f11 + fmov $f17, $f0 + unop + + trapb + fbne $f10, $ret + fmov $f16, $f0 + fbne $f11, $ret + + cmptlt/su $f16, $f17, $f11 + trapb + fcmovne $f11, $f17, $f0 +$ret: ret + +END (__fmax) + +/* Given the in-register format of single-precision, this works there too. */ +strong_alias (__fmax, __fmaxf) +weak_alias (__fmaxf, fmaxf) + +weak_alias (__fmax, fmax) +#ifdef NO_LONG_DOUBLE +strong_alias (__fmax, __fmaxl) +weak_alias (__fmaxl, fmaxl) +#endif +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) +compat_symbol (libm, __fmax, fmaxl, GLIBC_2_0); +#endif diff --git a/sysdeps/alpha/fpu/s_fmaxf.S b/sysdeps/alpha/fpu/s_fmaxf.S new file mode 100644 index 0000000000..3c2d62bb81 --- /dev/null +++ b/sysdeps/alpha/fpu/s_fmaxf.S @@ -0,0 +1 @@ +/* __fmaxf is in s_fmax.c */ diff --git a/sysdeps/alpha/fpu/s_fmin.S b/sysdeps/alpha/fpu/s_fmin.S new file mode 100644 index 0000000000..10de52940e --- /dev/null +++ b/sysdeps/alpha/fpu/s_fmin.S @@ -0,0 +1,58 @@ +/* Copyright (C) 2007 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson. + + 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. */ + +#include +#include + + .set noat + .set noreorder + + .text +ENTRY (__fmin) + .prologue 0 + + cmptun/su $f16, $f16, $f10 + cmptun/su $f17, $f17, $f11 + fmov $f17, $f0 + unop + + trapb + fbne $f10, $ret + fmov $f16, $f0 + fbne $f11, $ret + + cmptlt/su $f17, $f16, $f11 + trapb + fcmovne $f11, $f17, $f0 +$ret: ret + +END (__fmin) + +/* Given the in-register format of single-precision, this works there too. */ +strong_alias (__fmin, __fminf) +weak_alias (__fminf, fminf) + +weak_alias (__fmin, fmin) +#ifdef NO_LONG_DOUBLE +strong_alias (__fmin, __fminl) +weak_alias (__fminl, fminl) +#endif +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) +compat_symbol (libm, __fmin, fminl, GLIBC_2_0); +#endif diff --git a/sysdeps/alpha/fpu/s_fminf.S b/sysdeps/alpha/fpu/s_fminf.S new file mode 100644 index 0000000000..10ab7fe53c --- /dev/null +++ b/sysdeps/alpha/fpu/s_fminf.S @@ -0,0 +1 @@ +/* __fminf is in s_fmin.c */ diff --git a/sysdeps/alpha/fpu/s_isnan.c b/sysdeps/alpha/fpu/s_isnan.c new file mode 100644 index 0000000000..4403a50bb0 --- /dev/null +++ b/sysdeps/alpha/fpu/s_isnan.c @@ -0,0 +1,58 @@ +/* Return 1 if argument is a NaN, else 0. + Copyright (C) 2007 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. */ + +/* Ugly kludge to avoid declarations. */ +#define __isnanf not___isnanf +#define isnanf not_isnanf +#define __GI___isnanf not__GI___isnanf + +#include +#include + +#undef __isnanf +#undef isnanf +#undef __GI___isnanf + +/* The hidden_proto in include/math.h was obscured by the macro hackery. */ +__typeof (__isnan) __isnanf; +hidden_proto (__isnanf) + + +int +__isnan (double x) +{ + return isunordered (x, x); +} + +hidden_def (__isnan) +weak_alias (__isnan, isnan) + +/* It turns out that the 'double' version will also always work for + single-precision. */ +strong_alias (__isnan, __isnanf) +hidden_def (__isnanf) +weak_alias (__isnanf, isnanf) + +#ifdef NO_LONG_DOUBLE +strong_alias (__isnan, __isnanl) +weak_alias (__isnan, isnanl) +#endif +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) +compat_symbol (libm, __isnan, isnanl, GLIBC_2_0); +#endif diff --git a/sysdeps/alpha/fpu/s_isnanf.c b/sysdeps/alpha/fpu/s_isnanf.c new file mode 100644 index 0000000000..af41e43850 --- /dev/null +++ b/sysdeps/alpha/fpu/s_isnanf.c @@ -0,0 +1 @@ +/* In s_isnan.c */ diff --git a/sysdeps/alpha/fpu/s_llrint.c b/sysdeps/alpha/fpu/s_llrint.c new file mode 100644 index 0000000000..5db97be037 --- /dev/null +++ b/sysdeps/alpha/fpu/s_llrint.c @@ -0,0 +1 @@ +/* In s_lrint.c */ diff --git a/sysdeps/alpha/fpu/s_llrintf.c b/sysdeps/alpha/fpu/s_llrintf.c new file mode 100644 index 0000000000..18f2885ef7 --- /dev/null +++ b/sysdeps/alpha/fpu/s_llrintf.c @@ -0,0 +1 @@ +/* In s_lrintf.c */ diff --git a/sysdeps/alpha/fpu/s_lrint.c b/sysdeps/alpha/fpu/s_lrint.c new file mode 100644 index 0000000000..4c32f61093 --- /dev/null +++ b/sysdeps/alpha/fpu/s_lrint.c @@ -0,0 +1,48 @@ +/* Copyright (C) 2007 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. */ + +#define __llrint not___llrint +#define llrint not_llrint +#include +#include +#undef __llrint +#undef llrint + +long int +__lrint (double x) +{ + long ret; + + __asm ("cvttq/svd %1,%0" : "=&f"(ret) : "f"(x)); + + return ret; +} + +strong_alias (__lrint, __llrint) +weak_alias (__lrint, lrint) +weak_alias (__llrint, llrint) +#ifdef NO_LONG_DOUBLE +strong_alias (__lrint, __lrintl) +strong_alias (__lrint, __llrintl) +weak_alias (__lrintl, lrintl) +weak_alias (__llrintl, llrintl) +#endif +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) +compat_symbol (libm, __lrint, lrintl, GLIBC_2_0); +compat_symbol (libm, __llrint, llrintl, GLIBC_2_0); +#endif diff --git a/sysdeps/alpha/fpu/s_lrintf.c b/sysdeps/alpha/fpu/s_lrintf.c new file mode 100644 index 0000000000..20a6a6cf82 --- /dev/null +++ b/sysdeps/alpha/fpu/s_lrintf.c @@ -0,0 +1,39 @@ +/* Copyright (C) 2007 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. */ + +#define __llrintf not___llrintf +#define llrintf not_llrintf +#include +#undef __llrintf +#undef llrintf + +long int +__lrintf (float x) +{ + double tmp; + long ret; + + __asm ("cvtst/s %2,%1\n\tcvttq/svd %1,%0" + : "=&f"(ret), "=&f"(tmp) : "f"(x)); + + return ret; +} + +strong_alias (__lrintf, __llrintf) +weak_alias (__lrintf, lrintf) +weak_alias (__llrintf, llrintf) diff --git a/sysdeps/alpha/fpu/s_nearbyint.c b/sysdeps/alpha/fpu/s_nearbyint.c new file mode 100644 index 0000000000..7a91bd115b --- /dev/null +++ b/sysdeps/alpha/fpu/s_nearbyint.c @@ -0,0 +1,48 @@ +/* Copyright (C) 2007 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson. + + 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. */ + +#include +#include + +#ifdef _IEEE_FP_INEXACT +#error "Don't compile with -mieee-with-inexact" +#endif + +double +__nearbyint (double x) +{ + double two52 = copysign (0x1.0p52, x); + double r; + + r = x + two52; + r = r - two52; + + /* nearbyint(-0.1) == -0, and in general we'll always have the same sign + as our input. */ + return copysign (r, x); +} + +weak_alias (__nearbyint, nearbyint) +#ifdef NO_LONG_DOUBLE +strong_alias (__nearbyint, __nearbyintl) +weak_alias (__nearbyint, nearbyintl) +#endif +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) +compat_symbol (libm, __nearbyint, nearbyintl, GLIBC_2_0); +#endif diff --git a/sysdeps/alpha/fpu/s_nearbyintf.c b/sysdeps/alpha/fpu/s_nearbyintf.c new file mode 100644 index 0000000000..ee637982df --- /dev/null +++ b/sysdeps/alpha/fpu/s_nearbyintf.c @@ -0,0 +1,40 @@ +/* Copyright (C) 2007 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson. + + 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. */ + +#include + +#ifdef _IEEE_FP_INEXACT +#error "Don't compile with -mieee-with-inexact" +#endif + +float +__nearbyintf (float x) +{ + float two23 = copysignf (0x1.0p23, x); + float r; + + r = x + two23; + r = r - two23; + + /* nearbyint(-0.1) == -0, and in general we'll always have the same sign + as our input. */ + return copysign (r, x); +} + +weak_alias (__nearbyintf, nearbyintf) diff --git a/sysdeps/alpha/fpu/s_rint.c b/sysdeps/alpha/fpu/s_rint.c index be09651b35..e9aa028822 100644 --- a/sysdeps/alpha/fpu/s_rint.c +++ b/sysdeps/alpha/fpu/s_rint.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson. @@ -24,24 +24,15 @@ double __rint (double x) { - if (isless (fabs (x), 9007199254740992.0)) /* 1 << DBL_MANT_DIG */ - { - double tmp1, new_x; - __asm ( -#ifdef _IEEE_FP_INEXACT - "cvttq/svid %2,%1\n\t" -#else - "cvttq/svd %2,%1\n\t" -#endif - "cvtqt/d %1,%0\n\t" - : "=f"(new_x), "=&f"(tmp1) - : "f"(x)); - - /* rint(-0.1) == -0, and in general we'll always have the same - sign as our input. */ - x = copysign(new_x, x); - } - return x; + double two52 = copysign (0x1.0p52, x); + double r; + + r = x + two52; + r = r - two52; + + /* rint(-0.1) == -0, and in general we'll always have the same sign + as our input. */ + return copysign (r, x); } weak_alias (__rint, rint) diff --git a/sysdeps/alpha/fpu/s_rintf.c b/sysdeps/alpha/fpu/s_rintf.c index d5d019d709..9e4cbd1ffd 100644 --- a/sysdeps/alpha/fpu/s_rintf.c +++ b/sysdeps/alpha/fpu/s_rintf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson. @@ -23,30 +23,15 @@ float __rintf (float x) { - if (isless (fabsf (x), 16777216.0f)) /* 1 << FLT_MANT_DIG */ - { - /* Note that Alpha S_Floating is stored in registers in a - restricted T_Floating format, so we don't even need to - convert back to S_Floating in the end. The initial - conversion to T_Floating is needed to handle denormals. */ - - float tmp1, tmp2, new_x; - - __asm ("cvtst/s %3,%2\n\t" -#ifdef _IEEE_FP_INEXACT - "cvttq/svid %2,%1\n\t" -#else - "cvttq/svd %2,%1\n\t" -#endif - "cvtqt/d %1,%0\n\t" - : "=f"(new_x), "=&f"(tmp1), "=&f"(tmp2) - : "f"(x)); - - /* rint(-0.1) == -0, and in general we'll always have the same - sign as our input. */ - x = copysignf(new_x, x); - } - return x; + float two23 = copysignf (0x1.0p23, x); + float r; + + r = x + two23; + r = r - two23; + + /* rint(-0.1) == -0, and in general we'll always have the same sign + as our input. */ + return copysign (r, x); } weak_alias (__rintf, rintf) From f878f0bbc8bb39c945b0578969300217d55d3651 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 14 Mar 2007 20:01:05 +0000 Subject: [PATCH 3698/4487] * sysdeps/alpha/fpu/s_llround.c: New file. * sysdeps/alpha/fpu/s_llroundf.c: New file. * sysdeps/alpha/fpu/s_lround.c: New file. * sysdeps/alpha/fpu/s_lroundf.c: New file. * sysdeps/alpha/fpu/s_round.c: New file. * sysdeps/alpha/fpu/s_roundf.c: New file. * sysdeps/alpha/fpu/s_trunc.c: New file. * sysdeps/alpha/fpu/s_truncf.c: New file. --- sysdeps/alpha/fpu/s_floor.c | 4 +-- sysdeps/alpha/fpu/s_floorf.c | 4 +-- sysdeps/alpha/fpu/s_llround.c | 1 + sysdeps/alpha/fpu/s_llroundf.c | 1 + sysdeps/alpha/fpu/s_lround.c | 48 ++++++++++++++++++++++++++++++ sysdeps/alpha/fpu/s_lroundf.c | 38 ++++++++++++++++++++++++ sysdeps/alpha/fpu/s_round.c | 49 +++++++++++++++++++++++++++++++ sysdeps/alpha/fpu/s_roundf.c | 44 ++++++++++++++++++++++++++++ sysdeps/alpha/fpu/s_trunc.c | 53 ++++++++++++++++++++++++++++++++++ sysdeps/alpha/fpu/s_truncf.c | 45 +++++++++++++++++++++++++++++ 10 files changed, 281 insertions(+), 6 deletions(-) create mode 100644 sysdeps/alpha/fpu/s_llround.c create mode 100644 sysdeps/alpha/fpu/s_llroundf.c create mode 100644 sysdeps/alpha/fpu/s_lround.c create mode 100644 sysdeps/alpha/fpu/s_lroundf.c create mode 100644 sysdeps/alpha/fpu/s_round.c create mode 100644 sysdeps/alpha/fpu/s_roundf.c create mode 100644 sysdeps/alpha/fpu/s_trunc.c create mode 100644 sysdeps/alpha/fpu/s_truncf.c diff --git a/sysdeps/alpha/fpu/s_floor.c b/sysdeps/alpha/fpu/s_floor.c index 29fc924c71..5af6386155 100644 --- a/sysdeps/alpha/fpu/s_floor.c +++ b/sysdeps/alpha/fpu/s_floor.c @@ -21,9 +21,7 @@ #include -/* Use the -inf rounding mode conversion instructions to implement - floor. We note when the exponent is large enough that the value - must be integral, as this avoids unpleasant integer overflows. */ +/* Use the -inf rounding mode conversion instructions to implement floor. */ double __floor (double x) diff --git a/sysdeps/alpha/fpu/s_floorf.c b/sysdeps/alpha/fpu/s_floorf.c index 2283264e27..8b421705cd 100644 --- a/sysdeps/alpha/fpu/s_floorf.c +++ b/sysdeps/alpha/fpu/s_floorf.c @@ -20,9 +20,7 @@ #include -/* Use the -inf rounding mode conversion instructions to implement - floor. We note when the exponent is large enough that the value - must be integral, as this avoids unpleasant integer overflows. */ +/* Use the -inf rounding mode conversion instructions to implement floor. */ float __floorf (float x) diff --git a/sysdeps/alpha/fpu/s_llround.c b/sysdeps/alpha/fpu/s_llround.c new file mode 100644 index 0000000000..b212fbd8e5 --- /dev/null +++ b/sysdeps/alpha/fpu/s_llround.c @@ -0,0 +1 @@ +/* In s_lround.c. */ diff --git a/sysdeps/alpha/fpu/s_llroundf.c b/sysdeps/alpha/fpu/s_llroundf.c new file mode 100644 index 0000000000..73bdf3103f --- /dev/null +++ b/sysdeps/alpha/fpu/s_llroundf.c @@ -0,0 +1 @@ +/* In s_lroundf.c. */ diff --git a/sysdeps/alpha/fpu/s_lround.c b/sysdeps/alpha/fpu/s_lround.c new file mode 100644 index 0000000000..bc5cb88ed2 --- /dev/null +++ b/sysdeps/alpha/fpu/s_lround.c @@ -0,0 +1,48 @@ +/* Copyright (C) 2007 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. */ + +#define __llround not___llround +#define llround not_llround +#include +#include +#undef __llround +#undef llround + +long int +__lround (double x) +{ + double adj; + + adj = 0x1.fffffffffffffp-2; /* nextafter (0.5, 0.0) */ + adj = copysign (adj, x); + return x + adj; +} + +strong_alias (__lround, __llround) +weak_alias (__lround, lround) +weak_alias (__llround, llround) +#ifdef NO_LONG_DOUBLE +strong_alias (__lround, __lroundl) +strong_alias (__lround, __llroundl) +weak_alias (__lroundl, lroundl) +weak_alias (__llroundl, llroundl) +#endif +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) +compat_symbol (libm, __lround, lroundl, GLIBC_2_0); +compat_symbol (libm, __llround, llroundl, GLIBC_2_0); +#endif diff --git a/sysdeps/alpha/fpu/s_lroundf.c b/sysdeps/alpha/fpu/s_lroundf.c new file mode 100644 index 0000000000..16ff348b21 --- /dev/null +++ b/sysdeps/alpha/fpu/s_lroundf.c @@ -0,0 +1,38 @@ +/* Copyright (C) 2007 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. */ + +#define __llroundf not___llroundf +#define llroundf not_llroundf +#include +#undef __llroundf +#undef llroundf + + +long int +__lroundf (float x) +{ + float adj; + + adj = 0x1.fffffep-2; /* nextafterf (0.5f, 0.0f) */ + adj = copysignf (adj, x); + return x + adj; +} + +strong_alias (__lroundf, __llroundf) +weak_alias (__lroundf, lroundf) +weak_alias (__llroundf, llroundf) diff --git a/sysdeps/alpha/fpu/s_round.c b/sysdeps/alpha/fpu/s_round.c new file mode 100644 index 0000000000..3999e6110a --- /dev/null +++ b/sysdeps/alpha/fpu/s_round.c @@ -0,0 +1,49 @@ +/* Copyright (C) 2007 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. */ + +#include +#include + + +double +__round (double x) +{ + const double almost_half = 0x1.fffffffffffffp-2; + const double two52 = 0x1.0p52; + double tmp, r; + + __asm ( +#ifdef _IEEE_FP_INEXACT + "addt/suic %2, %3, %1\n\tsubt/suic %1, %3, %0" +#else + "addt/suc %2, %3, %1\n\tsubt/suc %1, %3, %0" +#endif + : "=&f"(r), "=&f"(tmp) + : "f"(fabs (x) + almost_half), "f"(two52)); + + return copysign (r, x); +} + +weak_alias (__round, round) +#ifdef NO_LONG_DOUBLE +strong_alias (__round, __roundl) +weak_alias (__roundl, roundl) +#endif +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) +compat_symbol (libm, __round, roundl, GLIBC_2_0); +#endif diff --git a/sysdeps/alpha/fpu/s_roundf.c b/sysdeps/alpha/fpu/s_roundf.c new file mode 100644 index 0000000000..89584f062b --- /dev/null +++ b/sysdeps/alpha/fpu/s_roundf.c @@ -0,0 +1,44 @@ +/* Copyright (C) 2007 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson. + + 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. */ + +#include + + +float +__roundf (float x) +{ + const float almost_half = 0x1.fffffep-2; + const float two23 = 0x1.0p23; + float r, tmp; + + __asm ( +#ifdef _IEEE_FP_INEXACT + "adds/suic %2, %3, %1\n\tsubs/suic %1, %3, %0" +#else + "adds/suc %2, %3, %1\n\tsubs/suc %1, %3, %0" +#endif + : "=&f"(r), "=&f"(tmp) + : "f"(fabsf (x) + almost_half), "f"(two23)); + + /* round(-0) == -0, and in general we'll always have the same + sign as our input. */ + return copysignf (r, x); +} + +weak_alias (__roundf, roundf) diff --git a/sysdeps/alpha/fpu/s_trunc.c b/sysdeps/alpha/fpu/s_trunc.c new file mode 100644 index 0000000000..1c1a66673f --- /dev/null +++ b/sysdeps/alpha/fpu/s_trunc.c @@ -0,0 +1,53 @@ +/* Copyright (C) 2007 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson. + + 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. */ + +#include +#include + + +/* Use the chopped rounding mode conversion instructions to implement trunc. */ + +double +__trunc (double x) +{ + double two52 = copysign (0x1.0p52, x); + double r, tmp; + + __asm ( +#ifdef _IEEE_FP_INEXACT + "addt/suic %2, %3, %1\n\tsubt/suic %1, %3, %0" +#else + "addt/suc %2, %3, %1\n\tsubt/suc %1, %3, %0" +#endif + : "=&f"(r), "=&f"(tmp) + : "f"(x), "f"(two52)); + + /* trunc(-0) == -0, and in general we'll always have the same + sign as our input. */ + return copysign (r, x); +} + +weak_alias (__trunc, trunc) +#ifdef NO_LONG_DOUBLE +strong_alias (__trunc, __truncl) +weak_alias (__trunc, truncl) +#endif +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) +compat_symbol (libm, __trunc, truncl, GLIBC_2_0); +#endif diff --git a/sysdeps/alpha/fpu/s_truncf.c b/sysdeps/alpha/fpu/s_truncf.c new file mode 100644 index 0000000000..094997b433 --- /dev/null +++ b/sysdeps/alpha/fpu/s_truncf.c @@ -0,0 +1,45 @@ +/* Copyright (C) 2007 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson. + + 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. */ + +#include + + +/* Use the chopped rounding mode conversion instructions to implement trunc. */ + +float +__truncf (float x) +{ + float two23 = copysignf (0x1.0p23, x); + float r, tmp; + + __asm ( +#ifdef _IEEE_FP_INEXACT + "adds/suic %2, %3, %1\n\tsubs/suic %1, %3, %0" +#else + "adds/suc %2, %3, %1\n\tsubs/suc %1, %3, %0" +#endif + : "=&f"(r), "=&f"(tmp) + : "f"(x), "f"(two23)); + + /* trunc(-0) == -0, and in general we'll always have the same + sign as our input. */ + return copysignf (r, x); +} + +weak_alias (__truncf, truncf) From 8d4fccc44295d622a4fe6c22d7047c9cf93e95fd Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 17 Mar 2007 17:04:09 +0000 Subject: [PATCH 3699/4487] Use __extern_inline and __extern_always_inline where appropriate. --- sysdeps/alpha/fpu/bits/mathinline.h | 2 +- sysdeps/mach/alpha/machine-lock.h | 4 ++-- sysdeps/mach/alpha/machine-sp.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h index 3ea021a7dd..a126dcf056 100644 --- a/sysdeps/alpha/fpu/bits/mathinline.h +++ b/sysdeps/alpha/fpu/bits/mathinline.h @@ -26,7 +26,7 @@ #ifdef __cplusplus # define __MATH_INLINE __inline #else -# define __MATH_INLINE extern __inline +# define __MATH_INLINE __extern_inline #endif #if defined __USE_ISOC99 && defined __GNUC__ && !__GNUC_PREREQ(3,0) diff --git a/sysdeps/mach/alpha/machine-lock.h b/sysdeps/mach/alpha/machine-lock.h index 80f8750c87..bd27d2a51f 100644 --- a/sysdeps/mach/alpha/machine-lock.h +++ b/sysdeps/mach/alpha/machine-lock.h @@ -1,5 +1,5 @@ /* Machine-specific definition for spin locks. Alpha version. - Copyright (C) 1994, 1997 Free Software Foundation, Inc. + Copyright (C) 1994, 1997, 2007 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 @@ -30,7 +30,7 @@ typedef __volatile long int __spin_lock_t; #ifndef _EXTERN_INLINE -#define _EXTERN_INLINE extern __inline +#define _EXTERN_INLINE __extern_inline #endif /* Unlock LOCK. */ diff --git a/sysdeps/mach/alpha/machine-sp.h b/sysdeps/mach/alpha/machine-sp.h index b737525574..e6df63c9ac 100644 --- a/sysdeps/mach/alpha/machine-sp.h +++ b/sysdeps/mach/alpha/machine-sp.h @@ -1,5 +1,5 @@ /* Machine-specific function to return the stack pointer. Alpha version. - Copyright (C) 1994, 1997 Free Software Foundation, Inc. + Copyright (C) 1994, 1997, 2007 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 @@ /* Return the current stack pointer. */ #ifndef _EXTERN_INLINE -#define _EXTERN_INLINE extern __inline +#define _EXTERN_INLINE __extern_inline #endif _EXTERN_INLINE void * From 854901bebe730b126ca035abcca1d816cfe4693e Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Wed, 2 May 2007 02:07:38 +0000 Subject: [PATCH 3700/4487] 2007-05-01 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/pthreadtypes.h [__USE_XOPEN2K]: Define pthread_rwlock_t and pthread_rwlockattr_t. --- ChangeLog.hppa | 6 ++++++ .../unix/sysv/linux/hppa/linuxthreads/bits/pthreadtypes.h | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 068044add5..7d38ab0fd9 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,9 @@ +2007-05-01 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/pthreadtypes.h + [__USE_XOPEN2K]: Define pthread_rwlock_t and + pthread_rwlockattr_t. + 2007-02-02 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/sysdep.h (PTR_MANGLE): Define. diff --git a/sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/pthreadtypes.h index e2c6f5957d..7173718318 100644 --- a/sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/pthreadtypes.h +++ b/sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/pthreadtypes.h @@ -111,8 +111,7 @@ typedef struct /* Once-only execution */ typedef int pthread_once_t; - -#ifdef __USE_UNIX98 +#if defined __USE_UNIX98 || defined __USE_XOPEN2K /* Read-write locks. */ typedef struct _pthread_rwlock_t { From 91d46f8a9b3120fa59aa1fbf772a8bba3012a360 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 7 May 2007 22:57:20 +0000 Subject: [PATCH 3701/4487] 2007-05-07 Richard Henderson * sysdeps/alpha/fpu/bits/mathinline.h (__isnanl): Don't define if __NO_LONG_DOUBLE_MATH. * sysdeps/unix/sysv/linux/alpha/ioperm.c: If BWX insns not available in the compiler, add .arch directive to ethe assembly. 2007-05-07 Jakub Jelinek * sysdeps/alpha/fpu/s_nearbyint.c (nearbyintl): Fix version on compat_symbol to GLIBC_2_1. * sysdeps/alpha/fpu/s_fmin.S (fminl): Likewise. * sysdeps/alpha/fpu/s_trunc.c (truncl): Likewise. * sysdeps/alpha/fpu/s_fmax.S (fmaxl): Likewise. * sysdeps/alpha/fpu/s_lrint.c (lrintl, llrintl): Likewise. * sysdeps/alpha/fpu/s_lround.c (lroundl, llroundl): Likewise. * sysdeps/alpha/fpu/s_round.c (roundl): Likewise. * sysdeps/alpha/fpu/s_isnan.c (isnanl): Provide compat_symbol in libc, not libm. (__isnanl): New compat_symbol. --- sysdeps/alpha/fpu/bits/mathinline.h | 3 +++ sysdeps/alpha/fpu/s_fmax.S | 4 ++-- sysdeps/alpha/fpu/s_fmin.S | 4 ++-- sysdeps/alpha/fpu/s_isnan.c | 5 +++-- sysdeps/alpha/fpu/s_lrint.c | 6 +++--- sysdeps/alpha/fpu/s_lround.c | 6 +++--- sysdeps/alpha/fpu/s_nearbyint.c | 4 ++-- sysdeps/alpha/fpu/s_round.c | 4 ++-- sysdeps/alpha/fpu/s_trunc.c | 4 ++-- sysdeps/unix/sysv/linux/alpha/ioperm.c | 5 +++++ 10 files changed, 27 insertions(+), 18 deletions(-) diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h index a126dcf056..250171eeb4 100644 --- a/sysdeps/alpha/fpu/bits/mathinline.h +++ b/sysdeps/alpha/fpu/bits/mathinline.h @@ -137,11 +137,14 @@ __NTH (__isnan (double __x)) return isunordered (__x, __x); } +#ifndef __NO_LONG_DOUBLE_MATH __MATH_INLINE int __NTH (__isnanl (long double __x)) { return isunordered (__x, __x); } +#endif + #endif /* C99 */ #endif /* __NO_MATH_INLINES */ diff --git a/sysdeps/alpha/fpu/s_fmax.S b/sysdeps/alpha/fpu/s_fmax.S index 4f2ace7d11..d638eec805 100644 --- a/sysdeps/alpha/fpu/s_fmax.S +++ b/sysdeps/alpha/fpu/s_fmax.S @@ -53,6 +53,6 @@ weak_alias (__fmax, fmax) strong_alias (__fmax, __fmaxl) weak_alias (__fmaxl, fmaxl) #endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __fmax, fmaxl, GLIBC_2_0); +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) +compat_symbol (libm, __fmax, fmaxl, GLIBC_2_1); #endif diff --git a/sysdeps/alpha/fpu/s_fmin.S b/sysdeps/alpha/fpu/s_fmin.S index 10de52940e..d70fab625a 100644 --- a/sysdeps/alpha/fpu/s_fmin.S +++ b/sysdeps/alpha/fpu/s_fmin.S @@ -53,6 +53,6 @@ weak_alias (__fmin, fmin) strong_alias (__fmin, __fminl) weak_alias (__fminl, fminl) #endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __fmin, fminl, GLIBC_2_0); +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) +compat_symbol (libm, __fmin, fminl, GLIBC_2_1); #endif diff --git a/sysdeps/alpha/fpu/s_isnan.c b/sysdeps/alpha/fpu/s_isnan.c index 4403a50bb0..a9230329c5 100644 --- a/sysdeps/alpha/fpu/s_isnan.c +++ b/sysdeps/alpha/fpu/s_isnan.c @@ -53,6 +53,7 @@ weak_alias (__isnanf, isnanf) strong_alias (__isnan, __isnanl) weak_alias (__isnan, isnanl) #endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __isnan, isnanl, GLIBC_2_0); +#if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0) +compat_symbol (libc, __isnan, __isnanl, GLIBC_2_0); +compat_symbol (libc, isnan, isnanl, GLIBC_2_0); #endif diff --git a/sysdeps/alpha/fpu/s_lrint.c b/sysdeps/alpha/fpu/s_lrint.c index 4c32f61093..1696408705 100644 --- a/sysdeps/alpha/fpu/s_lrint.c +++ b/sysdeps/alpha/fpu/s_lrint.c @@ -42,7 +42,7 @@ strong_alias (__lrint, __llrintl) weak_alias (__lrintl, lrintl) weak_alias (__llrintl, llrintl) #endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __lrint, lrintl, GLIBC_2_0); -compat_symbol (libm, __llrint, llrintl, GLIBC_2_0); +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) +compat_symbol (libm, __lrint, lrintl, GLIBC_2_1); +compat_symbol (libm, __llrint, llrintl, GLIBC_2_1); #endif diff --git a/sysdeps/alpha/fpu/s_lround.c b/sysdeps/alpha/fpu/s_lround.c index bc5cb88ed2..0e0e98806c 100644 --- a/sysdeps/alpha/fpu/s_lround.c +++ b/sysdeps/alpha/fpu/s_lround.c @@ -42,7 +42,7 @@ strong_alias (__lround, __llroundl) weak_alias (__lroundl, lroundl) weak_alias (__llroundl, llroundl) #endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __lround, lroundl, GLIBC_2_0); -compat_symbol (libm, __llround, llroundl, GLIBC_2_0); +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) +compat_symbol (libm, __lround, lroundl, GLIBC_2_1); +compat_symbol (libm, __llround, llroundl, GLIBC_2_1); #endif diff --git a/sysdeps/alpha/fpu/s_nearbyint.c b/sysdeps/alpha/fpu/s_nearbyint.c index 7a91bd115b..b18db8ba79 100644 --- a/sysdeps/alpha/fpu/s_nearbyint.c +++ b/sysdeps/alpha/fpu/s_nearbyint.c @@ -43,6 +43,6 @@ weak_alias (__nearbyint, nearbyint) strong_alias (__nearbyint, __nearbyintl) weak_alias (__nearbyint, nearbyintl) #endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __nearbyint, nearbyintl, GLIBC_2_0); +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) +compat_symbol (libm, __nearbyint, nearbyintl, GLIBC_2_1); #endif diff --git a/sysdeps/alpha/fpu/s_round.c b/sysdeps/alpha/fpu/s_round.c index 3999e6110a..71763cf4ab 100644 --- a/sysdeps/alpha/fpu/s_round.c +++ b/sysdeps/alpha/fpu/s_round.c @@ -44,6 +44,6 @@ weak_alias (__round, round) strong_alias (__round, __roundl) weak_alias (__roundl, roundl) #endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __round, roundl, GLIBC_2_0); +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) +compat_symbol (libm, __round, roundl, GLIBC_2_1); #endif diff --git a/sysdeps/alpha/fpu/s_trunc.c b/sysdeps/alpha/fpu/s_trunc.c index 1c1a66673f..11a279a53f 100644 --- a/sysdeps/alpha/fpu/s_trunc.c +++ b/sysdeps/alpha/fpu/s_trunc.c @@ -48,6 +48,6 @@ weak_alias (__trunc, trunc) strong_alias (__trunc, __truncl) weak_alias (__trunc, truncl) #endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __trunc, truncl, GLIBC_2_0); +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) +compat_symbol (libm, __trunc, truncl, GLIBC_2_1); #endif diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c index 6c4115d1c8..32e96ec2f2 100644 --- a/sysdeps/unix/sysv/linux/alpha/ioperm.c +++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c @@ -32,6 +32,11 @@ sparse address space would work (e.g., the Low Cost Alpha chip has an I/O address space that's 512MB large!). */ +/* Make sure the ldbu/stb asms below are not expaneded to macros. */ +#ifndef __alpha_bwx__ +asm(".arch ev56"); +#endif + #include #include #include From bdef6f9a424ae9aec3bd1ebf50f711232da2bb6e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 10 May 2007 21:39:43 +0000 Subject: [PATCH 3702/4487] Define UTIME_NOW and UTIME_OMIT. --- sysdeps/unix/sysv/linux/alpha/bits/stat.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/stat.h b/sysdeps/unix/sysv/linux/alpha/bits/stat.h index 40b6853430..42748be762 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/stat.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/stat.h @@ -149,3 +149,9 @@ struct stat64 #define __S_IREAD 0400 /* Read by owner. */ #define __S_IWRITE 0200 /* Write by owner. */ #define __S_IEXEC 0100 /* Execute by owner. */ + +#if defined __USE_ATFILE || defined __USE_GNU +/* XXX This will change to the macro for the next 2008 POSIX revision. */ +# define UTIME_NOW ((1l << 30) - 1l) +# define UTIME_OMIT ((1l << 30) - 2l) +#endif From d164f33b2ad9a24f5119061514633f93f51b8681 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Fri, 18 May 2007 01:59:52 +0000 Subject: [PATCH 3703/4487] 2007-05-17 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/sysdep.h (PIC_REG_DEF): Define. (PIC_REG_USE): Define. (INLINE_SYSCALL): Use PIC_REG_DEF, PIC_REG_USE. (INTERNAL_SYSCALL): Likewise. (INTERNAL_SYSCALL_NCS): Likewise. * sysdeps/unix/sysv/linux/hppa/sysdep.c (syscall): Use PIC_REG_DEF, PIC_REG_USE. --- ChangeLog.hppa | 10 ++++++++++ sysdeps/unix/sysv/linux/hppa/sysdep.c | 6 ++++-- sysdeps/unix/sysv/linux/hppa/sysdep.h | 22 +++++++++++++++------- 3 files changed, 29 insertions(+), 9 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 7d38ab0fd9..e35eb1b561 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,13 @@ +2007-05-17 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/sysdep.h (PIC_REG_DEF): Define. + (PIC_REG_USE): Define. + (INLINE_SYSCALL): Use PIC_REG_DEF, PIC_REG_USE. + (INTERNAL_SYSCALL): Likewise. + (INTERNAL_SYSCALL_NCS): Likewise. + * sysdeps/unix/sysv/linux/hppa/sysdep.c (syscall): Use + PIC_REG_DEF, PIC_REG_USE. + 2007-05-01 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/pthreadtypes.h diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.c b/sysdeps/unix/sysv/linux/hppa/sysdep.c index 8637c513df..4a0bd21839 100644 --- a/sysdeps/unix/sysv/linux/hppa/sysdep.c +++ b/sysdeps/unix/sysv/linux/hppa/sysdep.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1997, 1998, 2001, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2001, 2003, 2007 + 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 @@ -58,13 +59,14 @@ syscall (long int __sysno, ...) { register unsigned long int __res asm("r28"); + PIC_REG_DEF LOAD_ARGS_6 (arg0, arg1, arg2, arg3, arg4, arg5) asm volatile (SAVE_ASM_PIC " ble 0x100(%%sr2, %%r0) \n" " copy %1, %%r20 \n" LOAD_ASM_PIC : "=r" (__res) - : "r" (__sysno) ASM_ARGS_6 + : "r" (__sysno) PIC_REG_USE ASM_ARGS_6 : "memory", CALL_CLOB_REGS CLOB_ARGS_6); __sys_res = __res; } diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.h b/sysdeps/unix/sysv/linux/hppa/sysdep.h index 69ed7002c7..96632a1c42 100644 --- a/sysdeps/unix/sysv/linux/hppa/sysdep.h +++ b/sysdeps/unix/sysv/linux/hppa/sysdep.h @@ -1,5 +1,6 @@ /* Assembler macros for PA-RISC. - Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 1999, 2001, 2002, 2003, 2007 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, , August 1999. Linux/PA-RISC changes by Philipp Rumpf, , March 2000. @@ -40,7 +41,9 @@ # define TREG_ASM "%r4" /* Cant clobber r3, it holds framemarker */ # define SAVE_ASM_PIC " copy %%r19, %" TREG_ASM "\n" # define LOAD_ASM_PIC " copy %" TREG_ASM ", %%r19\n" -# define USING_TREG TREG_ASM, +# define CLOB_TREG TREG_ASM , +# define PIC_REG_DEF register unsigned long __r19 asm("r19"); +# define PIC_REG_USE , "r" (__r19) #else # define TREG %r3 # define SAVE_PIC(SREG) nop ASM_LINE_SEP @@ -49,7 +52,9 @@ # define TREG_ASM # define SAVE_ASM_PIC "nop \n" # define LOAD_ASM_PIC "nop \n" -# define USING_TREG +# define CLOB_TREG +# define PIC_REG_DEF +# define PIC_REG_USE #endif #ifdef __ASSEMBLER__ @@ -344,7 +349,7 @@ L(pre_end): ASM_LINE_SEP \ TREG is clobbered and use that register to save/restore r19 across the syscall. */ -#define CALL_CLOB_REGS "%r1", "%r2", USING_TREG \ +#define CALL_CLOB_REGS "%r1", "%r2", CLOB_TREG \ "%r20", "%r29", "%r31" #undef INLINE_SYSCALL @@ -353,6 +358,7 @@ L(pre_end): ASM_LINE_SEP \ long __sys_res; \ { \ register unsigned long __res asm("r28"); \ + PIC_REG_DEF \ LOAD_ARGS_##nr(args) \ /* FIXME: HACK save/load r19 around syscall */ \ asm volatile( \ @@ -361,7 +367,7 @@ L(pre_end): ASM_LINE_SEP \ " ldi %1, %%r20\n" \ LOAD_ASM_PIC \ : "=r" (__res) \ - : "i" (SYS_ify(name)) ASM_ARGS_##nr \ + : "i" (SYS_ify(name)) PIC_REG_USE ASM_ARGS_##nr \ : "memory", CALL_CLOB_REGS CLOB_ARGS_##nr \ ); \ __sys_res = (long)__res; \ @@ -398,6 +404,7 @@ L(pre_end): ASM_LINE_SEP \ long __sys_res; \ { \ register unsigned long __res asm("r28"); \ + PIC_REG_DEF \ LOAD_ARGS_##nr(args) \ /* FIXME: HACK save/load r19 around syscall */ \ asm volatile( \ @@ -406,7 +413,7 @@ L(pre_end): ASM_LINE_SEP \ " ldi %1, %%r20\n" \ LOAD_ASM_PIC \ : "=r" (__res) \ - : "i" (SYS_ify(name)) ASM_ARGS_##nr \ + : "i" (SYS_ify(name)) PIC_REG_USE ASM_ARGS_##nr \ : "memory", CALL_CLOB_REGS CLOB_ARGS_##nr \ ); \ __sys_res = (long)__res; \ @@ -422,6 +429,7 @@ L(pre_end): ASM_LINE_SEP \ long __sys_res; \ { \ register unsigned long __res asm("r28"); \ + PIC_REG_DEF \ LOAD_ARGS_##nr(args) \ /* FIXME: HACK save/load r19 around syscall */ \ asm volatile( \ @@ -430,7 +438,7 @@ L(pre_end): ASM_LINE_SEP \ " copy %1, %%r20\n" \ LOAD_ASM_PIC \ : "=r" (__res) \ - : "r" (name) ASM_ARGS_##nr \ + : "r" (name) PIC_REG_USE ASM_ARGS_##nr \ : "memory", CALL_CLOB_REGS CLOB_ARGS_##nr \ ); \ __sys_res = (long)__res; \ From 90e01f41f991eb5ed709cae04362ab57ed66dfc4 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Fri, 18 May 2007 02:02:51 +0000 Subject: [PATCH 3704/4487] 2007-05-17 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h (SEM_VALUE_MAX): Remove. --- ChangeLog.hppa | 5 +++++ sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h | 6 ------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index e35eb1b561..3ee76d9def 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,8 @@ +2007-05-17 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h + (SEM_VALUE_MAX): Remove. + 2007-05-17 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/sysdep.h (PIC_REG_DEF): Define. diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h b/sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h index 3d274eea20..270f3332c0 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h +++ b/sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h @@ -20,17 +20,11 @@ # error "Never use directly; include instead." #endif - #define __SIZEOF_SEM_T 16 - /* Value returned if `sem_open' failed. */ #define SEM_FAILED ((sem_t *) 0) -/* Maximum value the semaphore can have. */ -#define SEM_VALUE_MAX ((int) ((~0u) >> 1)) - - typedef union { char __size[__SIZEOF_SEM_T]; From 9077d4dc205ec9390af766b1e8d8fa365476f4fe Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Wed, 23 May 2007 16:50:14 +0000 Subject: [PATCH 3705/4487] * sysdeps/mips/dl-machine.h (elf_machine_reloc): Change type of r_info argument to ElfW(Addr). --- ChangeLog.mips | 5 +++++ sysdeps/mips/dl-machine.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 159a4c2475..b7f0e1ddf3 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2007-02-27 Richard Sandiford + + * sysdeps/mips/dl-machine.h (elf_machine_reloc): Change type of + r_info argument to ElfW(Addr). + 2007-02-01 Joseph Myers * sysdeps/mips/bits/mathdef.h (float_t): Change to float. diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index c92a1a3f5c..1b8d0f3019 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -304,7 +304,7 @@ do { \ auto inline void __attribute__ ((always_inline)) -elf_machine_reloc (struct link_map *map, ElfW(Word) r_info, +elf_machine_reloc (struct link_map *map, ElfW(Addr) r_info, const ElfW(Sym) *sym, const struct r_found_version *version, void *reloc_addr, ElfW(Addr) r_addend, int inplace_p) { From 388fc51bf4a10271ad9826fb96e62dc809586ec7 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Wed, 23 May 2007 16:50:43 +0000 Subject: [PATCH 3706/4487] Use commit date in changelog. --- ChangeLog.mips | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index b7f0e1ddf3..097f7e2316 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,4 +1,4 @@ -2007-02-27 Richard Sandiford +2007-05-23 Richard Sandiford * sysdeps/mips/dl-machine.h (elf_machine_reloc): Change type of r_info argument to ElfW(Addr). From 384fa30dddabbf1629841fb853fed218a9849380 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Wed, 23 May 2007 17:13:59 +0000 Subject: [PATCH 3707/4487] * sysdeps/mips/mips64/n32/Implies: Add mips/mips64/soft-fp. * sysdeps/mips/mips64/n64/Implies: Likewise. * sysdeps/mips/mips64/soft-fp/Makefile: New. * sysdeps/mips/mips64/soft-fp/e_sqrtl.c: New. * sysdeps/mips/mips64/soft-fp/sfp-machine.h: Include and . Use hardware exception and rounding mode settings. --- ChangeLog.mips | 10 ++++++ sysdeps/mips/mips64/n32/Implies | 1 + sysdeps/mips/mips64/n64/Implies | 1 + sysdeps/mips/mips64/soft-fp/Makefile | 3 ++ sysdeps/mips/mips64/soft-fp/e_sqrtl.c | 39 +++++++++++++++++++++++ sysdeps/mips/mips64/soft-fp/sfp-machine.h | 37 ++++++++++++++++++--- 6 files changed, 86 insertions(+), 5 deletions(-) create mode 100644 sysdeps/mips/mips64/soft-fp/Makefile create mode 100644 sysdeps/mips/mips64/soft-fp/e_sqrtl.c diff --git a/ChangeLog.mips b/ChangeLog.mips index 097f7e2316..2b5754f146 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,13 @@ +2007-05-23 Joseph Myers + + * sysdeps/mips/mips64/n32/Implies: Add mips/mips64/soft-fp. + * sysdeps/mips/mips64/n64/Implies: Likewise. + * sysdeps/mips/mips64/soft-fp/Makefile: New. + * sysdeps/mips/mips64/soft-fp/e_sqrtl.c: New. + * sysdeps/mips/mips64/soft-fp/sfp-machine.h: Include and + . Use hardware exception and rounding mode + settings. + 2007-05-23 Richard Sandiford * sysdeps/mips/dl-machine.h (elf_machine_reloc): Change type of diff --git a/sysdeps/mips/mips64/n32/Implies b/sysdeps/mips/mips64/n32/Implies index a7cb280ec4..bed8f14c30 100644 --- a/sysdeps/mips/mips64/n32/Implies +++ b/sysdeps/mips/mips64/n32/Implies @@ -1,4 +1,5 @@ ieee754/ldbl-128 +mips/mips64/soft-fp mips/mips64 mips wordsize-32 diff --git a/sysdeps/mips/mips64/n64/Implies b/sysdeps/mips/mips64/n64/Implies index e507786789..214b85c776 100644 --- a/sysdeps/mips/mips64/n64/Implies +++ b/sysdeps/mips/mips64/n64/Implies @@ -1,4 +1,5 @@ ieee754/ldbl-128 +mips/mips64/soft-fp mips/mips64 mips wordsize-64 diff --git a/sysdeps/mips/mips64/soft-fp/Makefile b/sysdeps/mips/mips64/soft-fp/Makefile new file mode 100644 index 0000000000..ada13e8b70 --- /dev/null +++ b/sysdeps/mips/mips64/soft-fp/Makefile @@ -0,0 +1,3 @@ +ifeq ($(subdir),math) +CPPFLAGS += -I../soft-fp +endif diff --git a/sysdeps/mips/mips64/soft-fp/e_sqrtl.c b/sysdeps/mips/mips64/soft-fp/e_sqrtl.c new file mode 100644 index 0000000000..81fd58ae1a --- /dev/null +++ b/sysdeps/mips/mips64/soft-fp/e_sqrtl.c @@ -0,0 +1,39 @@ +/* long double square root in software floating-point emulation. + Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson (rth@cygnus.com) and + Jakub Jelinek (jj@ultra.linux.cz). + + 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. */ + +#include +#include +#include + +long double +__ieee754_sqrtl (const long double a) +{ + FP_DECL_EX; + FP_DECL_Q(A); FP_DECL_Q(C); + long double c; + + FP_INIT_ROUNDMODE; + FP_UNPACK_Q(A, a); + FP_SQRT_Q(C, A); + FP_PACK_Q(c, C); + FP_HANDLE_EXCEPTIONS; + return c; +} diff --git a/sysdeps/mips/mips64/soft-fp/sfp-machine.h b/sysdeps/mips/mips64/soft-fp/sfp-machine.h index 309a14a5f8..9c1ee3b2a4 100644 --- a/sysdeps/mips/mips64/soft-fp/sfp-machine.h +++ b/sysdeps/mips/mips64/soft-fp/sfp-machine.h @@ -1,3 +1,6 @@ +#include +#include + #define _FP_W_TYPE_SIZE 64 #define _FP_W_TYPE unsigned long long #define _FP_WS_TYPE signed long long @@ -40,8 +43,32 @@ R##_c = FP_CLS_NAN; \ } while (0) -#define FP_EX_INVALID (1 << 4) -#define FP_EX_DIVZERO (1 << 3) -#define FP_EX_OVERFLOW (1 << 2) -#define FP_EX_UNDERFLOW (1 << 1) -#define FP_EX_INEXACT (1 << 0) +#define _FP_DECL_EX fpu_control_t _fcw + +#define FP_ROUNDMODE (_fcw & 0x3) + +#define FP_RND_NEAREST FE_TONEAREST +#define FP_RND_ZERO FE_TOWARDZERO +#define FP_RND_PINF FE_UPWARD +#define FP_RND_MINF FE_DOWNWARD + +#define FP_EX_INVALID FE_INVALID +#define FP_EX_OVERFLOW FE_OVERFLOW +#define FP_EX_UNDERFLOW FE_UNDERFLOW +#define FP_EX_DIVZERO FE_DIVBYZERO +#define FP_EX_INEXACT FE_INEXACT + +#ifdef __mips_hard_float +#define FP_INIT_ROUNDMODE \ +do { \ + _FPU_GETCW (_fcw); \ +} while (0) + +#define FP_HANDLE_EXCEPTIONS \ +do { \ + if (__builtin_expect (_fex, 0)) \ + _FPU_SETCW (_fcw | _fex | (_fex << 10)); \ +} while (0) +#else +#define FP_INIT_ROUNDMODE _fcw = FP_RND_NEAREST +#endif From 7a30cb832315de0a6dc546d110726ed9952df82e Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Wed, 23 May 2007 17:26:13 +0000 Subject: [PATCH 3708/4487] * sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c: New file. * sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise64.c: New file. * sysdeps/unix/sysv/linux/mips/mips32/readahead.c: New file. * sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c: New file. * sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise64.c: New file. * sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list: New file. --- ChangeLog.mips | 9 +++ .../sysv/linux/mips/mips32/posix_fadvise.c | 42 +++++++++++++ .../sysv/linux/mips/mips32/posix_fadvise64.c | 61 +++++++++++++++++++ .../unix/sysv/linux/mips/mips32/readahead.c | 1 + .../sysv/linux/mips/mips32/sync_file_range.c | 47 ++++++++++++++ .../linux/mips/mips64/n32/posix_fadvise64.c | 56 +++++++++++++++++ .../sysv/linux/mips/mips64/n32/syscalls.list | 5 ++ 7 files changed, 221 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c create mode 100644 sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise64.c create mode 100644 sysdeps/unix/sysv/linux/mips/mips32/readahead.c create mode 100644 sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise64.c create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list diff --git a/ChangeLog.mips b/ChangeLog.mips index 2b5754f146..3ef09030a8 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,12 @@ +2007-05-23 Atsushi Nemoto + + * sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c: New file. + * sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise64.c: New file. + * sysdeps/unix/sysv/linux/mips/mips32/readahead.c: New file. + * sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c: New file. + * sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise64.c: New file. + * sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list: New file. + 2007-05-23 Joseph Myers * sysdeps/mips/mips64/n32/Implies: Add mips/mips64/soft-fp. diff --git a/sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c b/sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c new file mode 100644 index 0000000000..24cbdf2ad0 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c @@ -0,0 +1,42 @@ +/* Copyright (C) 2007 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. */ + +#include +#include +#include + +/* Advice the system about the expected behaviour of the application with + respect to the file associated with FD. */ + +int +posix_fadvise (int fd, off_t offset, off_t len, int advise) +{ +/* MIPS kernel only has NR_fadvise64 which acts as NR_fadvise64_64 */ +#ifdef __NR_fadvise64 + INTERNAL_SYSCALL_DECL (err); + int ret = INTERNAL_SYSCALL (fadvise64, err, 7, fd, 0, + __LONG_LONG_PAIR (offset >> 31, offset), + __LONG_LONG_PAIR (offset >> 31, len), + advise); + if (INTERNAL_SYSCALL_ERROR_P (ret, err)) + return INTERNAL_SYSCALL_ERRNO (ret, err); + return 0; +#else + return ENOSYS; +#endif +} diff --git a/sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise64.c b/sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise64.c new file mode 100644 index 0000000000..715d37e45a --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise64.c @@ -0,0 +1,61 @@ +/* Copyright (C) 2007 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. */ + +#include +#include +#include + +/* Advice the system about the expected behaviour of the application with + respect to the file associated with FD. */ + +int +__posix_fadvise64_l64 (int fd, off64_t offset, off64_t len, int advise) +{ +/* MIPS kernel only has NR_fadvise64 which acts as NR_fadvise64_64 */ +#ifdef __NR_fadvise64 + INTERNAL_SYSCALL_DECL (err); + int ret = INTERNAL_SYSCALL (fadvise64, err, 7, fd, 0, + __LONG_LONG_PAIR ((long) (offset >> 32), + (long) offset), + __LONG_LONG_PAIR ((long) (len >> 32), + (long) len), + advise); + if (INTERNAL_SYSCALL_ERROR_P (ret, err)) + return INTERNAL_SYSCALL_ERRNO (ret, err); + return 0; +#else + return ENOSYS; +#endif +} + +#include + +#if SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_3_3) + +int +attribute_compat_text_section +__posix_fadvise64_l32 (int fd, off64_t offset, size_t len, int advise) +{ + return __posix_fadvise64_l64 (fd, offset, len, advise); +} + +versioned_symbol (libc, __posix_fadvise64_l64, posix_fadvise64, GLIBC_2_3_3); +compat_symbol (libc, __posix_fadvise64_l32, posix_fadvise64, GLIBC_2_2); +#else +strong_alias (__posix_fadvise64_l64, posix_fadvise64); +#endif diff --git a/sysdeps/unix/sysv/linux/mips/mips32/readahead.c b/sysdeps/unix/sysv/linux/mips/mips32/readahead.c new file mode 100644 index 0000000000..b5b967ce96 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips32/readahead.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c b/sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c new file mode 100644 index 0000000000..13a21b0dac --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c @@ -0,0 +1,47 @@ +/* Selective file content synch'ing. + Copyright (C) 2006, 2007 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. */ + +#include +#include +#include + +#include +#include + + +#ifdef __NR_sync_file_range +int +sync_file_range (int fd, __off64_t from, __off64_t to, unsigned int flags) +{ + return INLINE_SYSCALL (sync_file_range, 7, fd, 0, + __LONG_LONG_PAIR ((long) (from >> 32), (long) from), + __LONG_LONG_PAIR ((long) (to >> 32), (long) to), + flags); +} +#else +int +sync_file_range (int fd, __off64_t from, __off64_t to, unsigned int flags) +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (sync_file_range) + +# include +#endif diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise64.c b/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise64.c new file mode 100644 index 0000000000..40bafdbac7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise64.c @@ -0,0 +1,56 @@ +/* Copyright (C) 2007 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. */ + +#include +#include +#include + +/* Advice the system about the expected behaviour of the application with + respect to the file associated with FD. */ + +int +__posix_fadvise64_l64 (int fd, off64_t offset, off64_t len, int advise) +{ +/* MIPS kernel only has NR_fadvise64 which acts as NR_fadvise64_64 */ +#ifdef __NR_fadvise64 + INTERNAL_SYSCALL_DECL (err); + int ret = INTERNAL_SYSCALL (fadvise64, err, 4, fd, offset, len, advise); + if (INTERNAL_SYSCALL_ERROR_P (ret, err)) + return INTERNAL_SYSCALL_ERRNO (ret, err); + return 0; +#else + return ENOSYS; +#endif +} + +#include + +#if SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_3_3) + +int +attribute_compat_text_section +__posix_fadvise64_l32 (int fd, off64_t offset, size_t len, int advise) +{ + return __posix_fadvise64_l64 (fd, offset, len, advise); +} + +versioned_symbol (libc, __posix_fadvise64_l64, posix_fadvise64, GLIBC_2_3_3); +compat_symbol (libc, __posix_fadvise64_l32, posix_fadvise64, GLIBC_2_2); +#else +strong_alias (__posix_fadvise64_l64, posix_fadvise64); +#endif diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list b/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list new file mode 100644 index 0000000000..babdba0ca6 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list @@ -0,0 +1,5 @@ +# File name Caller Syscall name # args Strong name Weak names + +readahead - readahead i:iii __readahead readahead +sync_file_range - sync_file_range i:iiii sync_file_range +posix_fadvise - fadvise64 i:iiii posix_fadvise From 99e5e16c5ca03499787fd0dedc5220ca15ba8401 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Wed, 23 May 2007 17:33:17 +0000 Subject: [PATCH 3709/4487] * sysdeps/unix/sysv/linux/arm/kernel-features.h (__ASSUME_SIGFRAME_V2): Define for 2.6.18 and later. * sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S (__default_sa_restorer): Rename to __default_sa_restorer_v1. Don't define if __ASSUME_SIGFRAME_V2. (__default_rt_sa_restorer): Rename to __default_rt_sa_restorer_v1. Don't define if __ASSUME_SIGFRAME_V2. (__default_sa_restorer_v2, __default_rt_sa_restorer_v2): New. * sysdeps/unix/sysv/linux/arm/nptl/Versions (__default_sa_restorer_v1, __default_rt_sa_restorer_v1, __default_sa_restorer_v2, __default_rt_sa_restorer_v2): Add to GLIBC_PRIVATE. * sysdeps/unix/sysv/linux/arm/sigaction.c [__ARM_EABI__] (__default_sa_restorer_v1, __default_sa_restorer_v2, __default_rt_sa_restorer_v1, __default_rt_sa_restorer_v2): Declare. (__default_sa_restorer, __default_rt_sa_restorer): Define as macros depending on kernel version. --- ChangeLog.arm | 22 +++++++++++++ .../unix/sysv/linux/arm/eabi/sigrestorer.S | 31 +++++++++++++++++-- sysdeps/unix/sysv/linux/arm/kernel-features.h | 5 +++ sysdeps/unix/sysv/linux/arm/nptl/Versions | 2 ++ sysdeps/unix/sysv/linux/arm/sigaction.c | 19 ++++++++++++ 5 files changed, 76 insertions(+), 3 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index ebad07a9ab..e733cb6fc5 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,25 @@ +2007-05-23 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/kernel-features.h + (__ASSUME_SIGFRAME_V2): Define for 2.6.18 and later. + * sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S + (__default_sa_restorer): Rename to __default_sa_restorer_v1. + Don't define if __ASSUME_SIGFRAME_V2. + (__default_rt_sa_restorer): Rename to + __default_rt_sa_restorer_v1. Don't define if + __ASSUME_SIGFRAME_V2. + (__default_sa_restorer_v2, __default_rt_sa_restorer_v2): New. + * sysdeps/unix/sysv/linux/arm/nptl/Versions + (__default_sa_restorer_v1, __default_rt_sa_restorer_v1, + __default_sa_restorer_v2, __default_rt_sa_restorer_v2): Add to + GLIBC_PRIVATE. + * sysdeps/unix/sysv/linux/arm/sigaction.c [__ARM_EABI__] + (__default_sa_restorer_v1, __default_sa_restorer_v2, + __default_rt_sa_restorer_v1, __default_rt_sa_restorer_v2): + Declare. + (__default_sa_restorer, __default_rt_sa_restorer): Define as + macros depending on kernel version. + 2007-01-23 Daniel Jacobowitz * sysdeps/unix/sysv/linux/arm/sysdep.h (PTR_MANGLE, PTR_DEMANGLE): diff --git a/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S b/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S index 543d48cdb2..cc06a55972 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S +++ b/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S @@ -29,24 +29,49 @@ Start the unwind tables at least one instruction before the signal trampoline, because the unwinder will assume we are returning after - a call site. */ + a call site. + Because the signal frame layout changed in 2.6.18, we provide two + copies of these functions with different unwind information. */ + +#ifndef __ASSUME_SIGFRAME_V2 .fnstart .save {r0-r15} .pad #12 nop -ENTRY(__default_sa_restorer) +ENTRY(__default_sa_restorer_v1) + mov r7, $SYS_ify(sigreturn) + swi 0x0 + .fnend +#endif + + .fnstart + .save {r0-r15} + .pad #32 + nop +ENTRY(__default_sa_restorer_v2) mov r7, $SYS_ify(sigreturn) swi 0x0 .fnend #ifdef __NR_rt_sigreturn +#ifndef __ASSUME_SIGFRAME_V2 .fnstart .save {r0-r15} .pad #168 nop -ENTRY(__default_rt_sa_restorer) +ENTRY(__default_rt_sa_restorer_v1) + mov r7, $SYS_ify(rt_sigreturn) + swi 0x0 + .fnend +#endif + + .fnstart + .save {r0-r15} + .pad #160 + nop +ENTRY(__default_rt_sa_restorer_v2) mov r7, $SYS_ify(rt_sigreturn) swi 0x0 .fnend diff --git a/sysdeps/unix/sysv/linux/arm/kernel-features.h b/sysdeps/unix/sysv/linux/arm/kernel-features.h index 5bedfe11e8..0a6ab2180b 100644 --- a/sysdeps/unix/sysv/linux/arm/kernel-features.h +++ b/sysdeps/unix/sysv/linux/arm/kernel-features.h @@ -46,4 +46,9 @@ # define __ASSUME_VFORK_SYSCALL 1 #endif +/* The signal frame layout changed in 2.6.18. */ +#if __LINUX_KERNEL_VERSION >= 132626 +# define __ASSUME_SIGFRAME_V2 1 +#endif + #include_next diff --git a/sysdeps/unix/sysv/linux/arm/nptl/Versions b/sysdeps/unix/sysv/linux/arm/nptl/Versions index c74a06fe10..435c9212c4 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/Versions +++ b/sysdeps/unix/sysv/linux/arm/nptl/Versions @@ -2,5 +2,7 @@ libc { GLIBC_PRIVATE { # A copy of sigaction lives in NPTL, and needs these. __default_sa_restorer; __default_rt_sa_restorer; + __default_sa_restorer_v1; __default_rt_sa_restorer_v1; + __default_sa_restorer_v2; __default_rt_sa_restorer_v2; } } diff --git a/sysdeps/unix/sysv/linux/arm/sigaction.c b/sysdeps/unix/sysv/linux/arm/sigaction.c index 2d890d04e5..707c0fa299 100644 --- a/sysdeps/unix/sysv/linux/arm/sigaction.c +++ b/sysdeps/unix/sysv/linux/arm/sigaction.c @@ -36,8 +36,27 @@ int __libc_missing_rt_sigs; #define SA_RESTORER 0x04000000 +#ifdef __ARM_EABI__ +extern void __default_sa_restorer_v1(void); +extern void __default_sa_restorer_v2(void); +extern void __default_rt_sa_restorer_v1(void); +extern void __default_rt_sa_restorer_v2(void); +# ifdef __ASSUME_SIGFRAME_V2 +# define __default_sa_restorer __default_sa_restorer_v2 +# define __default_rt_sa_restorer __default_rt_sa_restorer_v2 +# else +# include +# define __default_sa_restorer (GLRO(dl_osversion) >= 0x020612 \ + ? __default_sa_restorer_v2 \ + : __default_sa_restorer_v1) +# define __default_rt_sa_restorer (GLRO(dl_osversion) >= 0x020612 \ + ? __default_rt_sa_restorer_v2 \ + : __default_rt_sa_restorer_v1) +# endif +#else extern void __default_sa_restorer(void); extern void __default_rt_sa_restorer(void); +#endif /* When RT signals are in use we need to use a different return stub. */ #ifdef __NR_rt_sigreturn From 0012a8520baa9192c6244f9714969e776c10a0ac Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Wed, 23 May 2007 17:45:14 +0000 Subject: [PATCH 3710/4487] * sysdeps/powerpc/nofpu/feholdexcpt.c (feholdexcept): Disable exceptions. Use the updated env in fesetenv(). Add libm_hidden_def. --- ChangeLog.powerpc | 6 ++++++ sysdeps/powerpc/nofpu/feholdexcpt.c | 9 +++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog.powerpc b/ChangeLog.powerpc index 015c95c9b0..1ea6746b3e 100644 --- a/ChangeLog.powerpc +++ b/ChangeLog.powerpc @@ -1,3 +1,9 @@ +2007-05-23 Steven Munroe + + * sysdeps/powerpc/nofpu/feholdexcpt.c (feholdexcept): Disable + exceptions. Use the updated env in fesetenv(). + Add libm_hidden_def. + 2007-01-23 Steven Munroe [BZ #2749] diff --git a/sysdeps/powerpc/nofpu/feholdexcpt.c b/sysdeps/powerpc/nofpu/feholdexcpt.c index 786c691a4b..ade9d19f4b 100644 --- a/sysdeps/powerpc/nofpu/feholdexcpt.c +++ b/sysdeps/powerpc/nofpu/feholdexcpt.c @@ -1,6 +1,6 @@ /* Store current floating-point environment and clear exceptions (soft-float edition). - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2007 Free Software Foundation, Inc. Contributed by Aldy Hernandez , 2002. This file is part of the GNU C Library. @@ -33,11 +33,12 @@ feholdexcept (fenv_t *envp) u.fenv = *envp; /* Clear everything except the rounding mode. */ u.l[0] &= 0x3; - - /* ?? Should we clear the disabled exceptions as well ?? */ + /* Disable exceptions */ + u.l[1] = FE_ALL_EXCEPT; /* Put the new state in effect. */ - fesetenv (envp); + fesetenv (&u.fenv); return 0; } +libm_hidden_def (feholdexcept) From 92fa63ee309705aab0d8ef00807e9a6212460cf8 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Thu, 24 May 2007 16:18:27 +0000 Subject: [PATCH 3711/4487] * sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c (posix_fadvise): Fix high word of len argument. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 3ef09030a8..34e25614f8 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2007-05-24 Atsushi Nemoto + + * sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c + (posix_fadvise): Fix high word of len argument. + 2007-05-23 Atsushi Nemoto * sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c: New file. diff --git a/sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c b/sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c index 24cbdf2ad0..04c952d2f3 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c +++ b/sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c @@ -31,7 +31,7 @@ posix_fadvise (int fd, off_t offset, off_t len, int advise) INTERNAL_SYSCALL_DECL (err); int ret = INTERNAL_SYSCALL (fadvise64, err, 7, fd, 0, __LONG_LONG_PAIR (offset >> 31, offset), - __LONG_LONG_PAIR (offset >> 31, len), + __LONG_LONG_PAIR (len >> 31, len), advise); if (INTERNAL_SYSCALL_ERROR_P (ret, err)) return INTERNAL_SYSCALL_ERRNO (ret, err); From 6f02480c593ca9b68f0a548d53366e5ad71c38e8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 28 May 2007 16:40:52 +0000 Subject: [PATCH 3712/4487] (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT, THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG, THREAD_GSCOPE_WAIT): Define. --- sysdeps/alpha/nptl/tls.h | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/sysdeps/alpha/nptl/tls.h b/sysdeps/alpha/nptl/tls.h index be2430f676..64ddcd5c01 100644 --- a/sysdeps/alpha/nptl/tls.h +++ b/sysdeps/alpha/nptl/tls.h @@ -1,5 +1,5 @@ /* Definition for thread-local data handling. NPTL/Alpha version. - Copyright (C) 2003, 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 2003, 2005, 2006, 2007 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 @@ -121,6 +121,29 @@ typedef struct #define THREAD_SETMEM_NC(descr, member, idx, value) \ descr->member[idx] = (value) +/* Get and set the global scope generation counter in struct pthread. */ +#define THREAD_GSCOPE_FLAG_UNUSED 0 +#define THREAD_GSCOPE_FLAG_USED 1 +#define THREAD_GSCOPE_FLAG_WAIT 2 +#define THREAD_GSCOPE_RESET_FLAG() \ + do \ + { int __res \ + = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \ + THREAD_GSCOPE_FLAG_UNUSED); \ + if (__res == THREAD_GSCOPE_FLAG_WAIT) \ + lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1); \ + } \ + while (0) +#define THREAD_GSCOPE_SET_FLAG() \ + do \ + { \ + THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \ + atomic_write_barrier (); \ + } \ + while (0) +#define THREAD_GSCOPE_WAIT() \ + GL(dl_wait_lookup_done) () + #endif /* __ASSEMBLER__ */ #endif /* tls.h */ From d3d5bc25404ba37d81fd19f827fa3da06e189861 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 30 May 2007 04:44:55 +0000 Subject: [PATCH 3713/4487] Remove all traces of lll_unlock_wake_cb. --- sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h index 58b4806eb2..04ac006400 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2006, 2007 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 @@ -237,8 +237,6 @@ typedef int lll_lock_t; #define LLL_LOCK_INITIALIZER (0) #define LLL_LOCK_INITIALIZER_LOCKED (1) -extern int lll_unlock_wake_cb (int *__futex) attribute_hidden; - /* The states of a lock are: 0 - untaken 1 - taken by one user From 30efab519e242a2c8f4894a7259a2ffbd5f3827a Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Wed, 6 Jun 2007 17:27:04 +0000 Subject: [PATCH 3714/4487] * sysdeps/arm/nptl/tls.h (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT): Define. (THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG, THREAD_GSCOPE_WAIT): Define. * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c (lll_unlock_wake_cb): Delete. * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h (FUTEX_PRIVATE_FLAG): Define. (lll_unlock_wake_cb): Delete prototype. * sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h: Include . (pthread_rwlock_t): Shrink __flags and add __shared. * sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h (RTLD_SINGLE_THREAD_P): Define. * sysdeps/mips/nptl/tls.h (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT): Define. (THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG, THREAD_GSCOPE_WAIT): Define. * sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h (FUTEX_PRIVATE_FLAG): Define. (lll_unlock_wake_cb): Delete prototype. * sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h: Include . (pthread_rwlock_t): Shrink __flags and add __shared. --- ChangeLog.arm | 17 +++++++++++++ ChangeLog.mips | 13 ++++++++++ sysdeps/arm/nptl/tls.h | 25 ++++++++++++++++++- sysdeps/mips/nptl/tls.h | 25 ++++++++++++++++++- .../sysv/linux/arm/nptl/bits/pthreadtypes.h | 16 +++++++++++- .../unix/sysv/linux/arm/nptl/lowlevellock.c | 17 ++----------- .../unix/sysv/linux/arm/nptl/lowlevellock.h | 5 ++-- .../unix/sysv/linux/arm/nptl/sysdep-cancel.h | 6 +++++ .../sysv/linux/mips/nptl/bits/pthreadtypes.h | 20 ++++++++++++--- .../unix/sysv/linux/mips/nptl/lowlevellock.h | 5 ++-- 10 files changed, 122 insertions(+), 27 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index e733cb6fc5..39e14dca95 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,20 @@ +2007-06-06 Daniel Jacobowitz + + * sysdeps/arm/nptl/tls.h (THREAD_GSCOPE_FLAG_UNUSED, + THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT): Define. + (THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG, + THREAD_GSCOPE_WAIT): Define. + * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c + (lll_unlock_wake_cb): Delete. + * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h + (FUTEX_PRIVATE_FLAG): Define. + (lll_unlock_wake_cb): Delete prototype. + * sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h: Include + . + (pthread_rwlock_t): Shrink __flags and add __shared. + * sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h + (RTLD_SINGLE_THREAD_P): Define. + 2007-05-23 Joseph Myers * sysdeps/unix/sysv/linux/arm/kernel-features.h diff --git a/ChangeLog.mips b/ChangeLog.mips index 34e25614f8..a99e165372 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,16 @@ +2007-06-06 Daniel Jacobowitz + + * sysdeps/mips/nptl/tls.h (THREAD_GSCOPE_FLAG_UNUSED, + THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT): Define. + (THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG, + THREAD_GSCOPE_WAIT): Define. + * sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h + (FUTEX_PRIVATE_FLAG): Define. + (lll_unlock_wake_cb): Delete prototype. + * sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h: Include + . + (pthread_rwlock_t): Shrink __flags and add __shared. + 2007-05-24 Atsushi Nemoto * sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c diff --git a/sysdeps/arm/nptl/tls.h b/sysdeps/arm/nptl/tls.h index 26ef70961c..ae2aecc42b 100644 --- a/sysdeps/arm/nptl/tls.h +++ b/sysdeps/arm/nptl/tls.h @@ -1,5 +1,5 @@ /* Definition for thread-local data handling. NPTL/ARM version. - Copyright (C) 2005 Free Software Foundation, Inc. + Copyright (C) 2005, 2007 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 @@ -132,6 +132,29 @@ typedef struct is not available. */ #define TLS_INIT_TP_EXPENSIVE 1 +/* Get and set the global scope generation counter in struct pthread. */ +#define THREAD_GSCOPE_FLAG_UNUSED 0 +#define THREAD_GSCOPE_FLAG_USED 1 +#define THREAD_GSCOPE_FLAG_WAIT 2 +#define THREAD_GSCOPE_RESET_FLAG() \ + do \ + { int __res \ + = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \ + THREAD_GSCOPE_FLAG_UNUSED); \ + if (__res == THREAD_GSCOPE_FLAG_WAIT) \ + lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1); \ + } \ + while (0) +#define THREAD_GSCOPE_SET_FLAG() \ + do \ + { \ + THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \ + atomic_write_barrier (); \ + } \ + while (0) +#define THREAD_GSCOPE_WAIT() \ + GL(dl_wait_lookup_done) () + #endif /* __ASSEMBLER__ */ #endif /* tls.h */ diff --git a/sysdeps/mips/nptl/tls.h b/sysdeps/mips/nptl/tls.h index 1cef161010..dbe806a5f8 100644 --- a/sysdeps/mips/nptl/tls.h +++ b/sysdeps/mips/nptl/tls.h @@ -1,5 +1,5 @@ /* Definition for thread-local data handling. NPTL/MIPS version. - Copyright (C) 2005 Free Software Foundation, Inc. + Copyright (C) 2005, 2007 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 @@ -156,6 +156,29 @@ typedef struct different value to mean unset l_tls_offset. */ # define NO_TLS_OFFSET -1 +/* Get and set the global scope generation counter in struct pthread. */ +#define THREAD_GSCOPE_FLAG_UNUSED 0 +#define THREAD_GSCOPE_FLAG_USED 1 +#define THREAD_GSCOPE_FLAG_WAIT 2 +#define THREAD_GSCOPE_RESET_FLAG() \ + do \ + { int __res \ + = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \ + THREAD_GSCOPE_FLAG_UNUSED); \ + if (__res == THREAD_GSCOPE_FLAG_WAIT) \ + lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1); \ + } \ + while (0) +#define THREAD_GSCOPE_SET_FLAG() \ + do \ + { \ + THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \ + atomic_write_barrier (); \ + } \ + while (0) +#define THREAD_GSCOPE_WAIT() \ + GL(dl_wait_lookup_done) () + #endif /* __ASSEMBLER__ */ #endif /* tls.h */ diff --git a/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h index ea8d6a2f0b..e1b115c8ca 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h +++ b/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h @@ -19,6 +19,8 @@ #ifndef _BITS_PTHREADTYPES_H #define _BITS_PTHREADTYPES_H 1 +#include + #define __SIZEOF_PTHREAD_ATTR_T 36 #define __SIZEOF_PTHREAD_MUTEX_T 24 #define __SIZEOF_PTHREAD_MUTEXATTR_T 4 @@ -126,9 +128,21 @@ typedef union unsigned int __writer_wakeup; unsigned int __nr_readers_queued; unsigned int __nr_writers_queued; +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned char __pad1; + unsigned char __pad2; + unsigned char __shared; + /* FLAGS must stay at this position in the structure to maintain + binary compatibility. */ + unsigned char __flags; +#else /* FLAGS must stay at this position in the structure to maintain binary compatibility. */ - unsigned int __flags; + unsigned char __flags; + unsigned char __shared; + unsigned char __pad1; + unsigned char __pad2; +#endif int __writer; } __data; char __size[__SIZEOF_PTHREAD_RWLOCK_T]; diff --git a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c index e0643a9f3b..66a4d7b360 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c +++ b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c @@ -1,5 +1,5 @@ /* low level locking for pthread library. Generic futex-using version. - Copyright (C) 2003, 2005 Free Software Foundation, Inc. + Copyright (C) 2003, 2005, 2007 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 @@ -63,20 +63,8 @@ __lll_timedlock_wait (int *futex, const struct timespec *abstime) } -/* These don't get included in libc.so */ +/* This function doesn't get included in libc.so */ #ifdef IS_IN_libpthread -int -lll_unlock_wake_cb (int *futex) -{ - int val = atomic_exchange_rel (futex, 0); - - if (__builtin_expect (val > 1, 0)) - lll_futex_wake (futex, 1); - - return 0; -} - - int __lll_timedwait_tid (int *tidp, const struct timespec *abstime) { @@ -114,5 +102,4 @@ __lll_timedwait_tid (int *tidp, const struct timespec *abstime) return 0; } - #endif diff --git a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h index 4bae953251..15cf1478fd 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2005, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2005, 2006, 2007 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 @@ -34,6 +34,7 @@ #define FUTEX_LOCK_PI 6 #define FUTEX_UNLOCK_PI 7 #define FUTEX_TRYLOCK_PI 8 +#define FUTEX_PRIVATE_FLAG 128 /* Initializer for compatibility lock. */ #define LLL_MUTEX_LOCK_INITIALIZER (0) @@ -267,8 +268,6 @@ typedef int lll_lock_t; #define LLL_LOCK_INITIALIZER (0) #define LLL_LOCK_INITIALIZER_LOCKED (1) -extern int lll_unlock_wake_cb (int *__futex) attribute_hidden; - /* The states of a lock are: 0 - untaken 1 - taken by one user diff --git a/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h index a44ee95e18..3fb2186d21 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h @@ -126,3 +126,9 @@ extern int __local_multiple_threads attribute_hidden; # define NO_CANCELLATION 1 #endif + +#ifndef __ASSEMBLER__ +# define RTLD_SINGLE_THREAD_P \ + __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ + header.multiple_threads) == 0, 1) +#endif diff --git a/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h index eda0a2fbe9..166a6c6aee 100644 --- a/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h +++ b/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h @@ -20,6 +20,8 @@ #ifndef _BITS_PTHREADTYPES_H #define _BITS_PTHREADTYPES_H 1 +#include + #if _MIPS_SIM == _ABI64 # define __SIZEOF_PTHREAD_ATTR_T 56 # define __SIZEOF_PTHREAD_MUTEX_T 40 @@ -157,9 +159,9 @@ typedef union unsigned int __nr_readers_queued; unsigned int __nr_writers_queued; int __writer; - int __pad1; + int __shared; + unsigned long int __pad1; unsigned long int __pad2; - unsigned long int __pad3; /* FLAGS must stay at this position in the structure to maintain binary compatibility. */ unsigned int __flags; @@ -173,9 +175,21 @@ typedef union unsigned int __writer_wakeup; unsigned int __nr_readers_queued; unsigned int __nr_writers_queued; +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned char __pad1; + unsigned char __pad2; + unsigned char __shared; /* FLAGS must stay at this position in the structure to maintain binary compatibility. */ - unsigned int __flags; + unsigned char __flags; +#else + /* FLAGS must stay at this position in the structure to maintain + binary compatibility. */ + unsigned char __flags; + unsigned char __shared; + unsigned char __pad1; + unsigned char __pad2; +#endif int __writer; } __data; # endif diff --git a/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h index 36a20f164a..4542e5b91f 100644 --- a/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2005, 2006, 2007 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 @@ -35,6 +35,7 @@ #define FUTEX_LOCK_PI 6 #define FUTEX_UNLOCK_PI 7 #define FUTEX_TRYLOCK_PI 8 +#define FUTEX_PRIVATE_FLAG 128 /* Initializer for compatibility lock. */ #define LLL_MUTEX_LOCK_INITIALIZER (0) @@ -234,8 +235,6 @@ typedef int lll_lock_t; #define LLL_LOCK_INITIALIZER (0) #define LLL_LOCK_INITIALIZER_LOCKED (1) -extern int lll_unlock_wake_cb (int *__futex) attribute_hidden; - /* The states of a lock are: 0 - untaken 1 - taken by one user From ffd3982334fb2ce907d8741080ad93dbc7a466fb Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Thu, 7 Jun 2007 14:40:24 +0000 Subject: [PATCH 3715/4487] * sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h (ARGIFY): New. (internal_syscall1, internal_syscall2, internal_syscall3, internal_syscall4, internal_syscall5, internal_syscall6): Use it. --- ChangeLog.mips | 6 +++ .../unix/sysv/linux/mips/mips64/n32/sysdep.h | 46 ++++++++++--------- 2 files changed, 31 insertions(+), 21 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index a99e165372..346237f346 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,9 @@ +2007-06-07 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h (ARGIFY): New. + (internal_syscall1, internal_syscall2, internal_syscall3, + internal_syscall4, internal_syscall5, internal_syscall6): Use it. + 2007-06-06 Daniel Jacobowitz * sysdeps/mips/nptl/tls.h (THREAD_GSCOPE_FLAG_UNUSED, diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h index d2635987f4..b15d280266 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h @@ -44,6 +44,10 @@ #else /* ! __ASSEMBLER__ */ +/* Convert X to a long long, without losing any bits if it is one + already or warning if it is a 32-bit pointer. */ +#define ARGIFY(X) ((long long) (__typeof__ ((X) - (X))) (X)) + /* Define a macro which expands into the inline wrapper code for a system call. */ #undef INLINE_SYSCALL @@ -102,7 +106,7 @@ \ { \ register long long __v0 asm("$2") ncs_init; \ - register long long __a0 asm("$4") = (long long) arg1; \ + register long long __a0 asm("$4") = ARGIFY (arg1); \ register long long __a3 asm("$7"); \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ @@ -124,8 +128,8 @@ \ { \ register long long __v0 asm("$2") ncs_init; \ - register long long __a0 asm("$4") = (long long) arg1; \ - register long long __a1 asm("$5") = (long long) arg2; \ + register long long __a0 asm("$4") = ARGIFY (arg1); \ + register long long __a1 asm("$5") = ARGIFY (arg2); \ register long long __a3 asm("$7"); \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ @@ -147,9 +151,9 @@ \ { \ register long long __v0 asm("$2") ncs_init; \ - register long long __a0 asm("$4") = (long long) arg1; \ - register long long __a1 asm("$5") = (long long) arg2; \ - register long long __a2 asm("$6") = (long long) arg3; \ + register long long __a0 asm("$4") = ARGIFY (arg1); \ + register long long __a1 asm("$5") = ARGIFY (arg2); \ + register long long __a2 asm("$6") = ARGIFY (arg3); \ register long long __a3 asm("$7"); \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ @@ -171,10 +175,10 @@ \ { \ register long long __v0 asm("$2") ncs_init; \ - register long long __a0 asm("$4") = (long long) arg1; \ - register long long __a1 asm("$5") = (long long) arg2; \ - register long long __a2 asm("$6") = (long long) arg3; \ - register long long __a3 asm("$7") = (long long) arg4; \ + register long long __a0 asm("$4") = ARGIFY (arg1); \ + register long long __a1 asm("$5") = ARGIFY (arg2); \ + register long long __a2 asm("$6") = ARGIFY (arg3); \ + register long long __a3 asm("$7") = ARGIFY (arg4); \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ cs_init \ @@ -195,11 +199,11 @@ \ { \ register long long __v0 asm("$2") ncs_init; \ - register long long __a0 asm("$4") = (long long) arg1; \ - register long long __a1 asm("$5") = (long long) arg2; \ - register long long __a2 asm("$6") = (long long) arg3; \ - register long long __a3 asm("$7") = (long long) arg4; \ - register long long __a4 asm("$8") = (long long) arg5; \ + register long long __a0 asm("$4") = ARGIFY (arg1); \ + register long long __a1 asm("$5") = ARGIFY (arg2); \ + register long long __a2 asm("$6") = ARGIFY (arg3); \ + register long long __a3 asm("$7") = ARGIFY (arg4); \ + register long long __a4 asm("$8") = ARGIFY (arg5); \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ cs_init \ @@ -220,12 +224,12 @@ \ { \ register long long __v0 asm("$2") ncs_init; \ - register long long __a0 asm("$4") = (long long) arg1; \ - register long long __a1 asm("$5") = (long long) arg2; \ - register long long __a2 asm("$6") = (long long) arg3; \ - register long long __a3 asm("$7") = (long long) arg4; \ - register long long __a4 asm("$8") = (long long) arg5; \ - register long long __a5 asm("$9") = (long long) arg6; \ + register long long __a0 asm("$4") = ARGIFY (arg1); \ + register long long __a1 asm("$5") = ARGIFY (arg2); \ + register long long __a2 asm("$6") = ARGIFY (arg3); \ + register long long __a3 asm("$7") = ARGIFY (arg4); \ + register long long __a4 asm("$8") = ARGIFY (arg5); \ + register long long __a5 asm("$9") = ARGIFY (arg6); \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ cs_init \ From a34f2176e57b9e56302f44521a8718f9619bfa24 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 8 Jun 2007 02:47:50 +0000 Subject: [PATCH 3716/4487] Adjust use of lll_futex_* macros. --- sysdeps/alpha/nptl/tls.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/alpha/nptl/tls.h b/sysdeps/alpha/nptl/tls.h index 64ddcd5c01..388a399c73 100644 --- a/sysdeps/alpha/nptl/tls.h +++ b/sysdeps/alpha/nptl/tls.h @@ -131,7 +131,7 @@ typedef struct = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \ THREAD_GSCOPE_FLAG_UNUSED); \ if (__res == THREAD_GSCOPE_FLAG_WAIT) \ - lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1); \ + lll_private_futex_wake (&THREAD_SELF->header.gscope_flag, 1); \ } \ while (0) #define THREAD_GSCOPE_SET_FLAG() \ From 370d74b5df15639950c320d23ee61769fef46e42 Mon Sep 17 00:00:00 2001 From: Jeff Bailey Date: Sat, 16 Jun 2007 15:38:21 +0000 Subject: [PATCH 3717/4487] 2007-06-16 Jeff Bailey * sysdeps/unix/sysv/linux/hppa/nptl/configure.in: Require at least kernel 2.6.9. * sysdeps/unix/sysv/linux/hppa/nptl/configure: Rebuilt. --- ChangeLog.hppa | 6 ++++++ sysdeps/unix/sysv/linux/hppa/nptl/configure | 5 +++++ sysdeps/unix/sysv/linux/hppa/nptl/configure.in | 5 +++++ 3 files changed, 16 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/hppa/nptl/configure create mode 100644 sysdeps/unix/sysv/linux/hppa/nptl/configure.in diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 3ee76d9def..541cb9b91b 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,9 @@ +2007-06-16 Jeff Bailey + + * sysdeps/unix/sysv/linux/hppa/nptl/configure.in: Require + at least kernel 2.6.9. + * sysdeps/unix/sysv/linux/hppa/nptl/configure: Rebuilt. + 2007-05-17 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/configure b/sysdeps/unix/sysv/linux/hppa/nptl/configure new file mode 100644 index 0000000000..a418c5469a --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/nptl/configure @@ -0,0 +1,5 @@ +# This file is generated from configure.in by Autoconf. DO NOT EDIT! + # Local configure fragment for sysdeps/unix/sysv/linux/hppa/nptl. + +# Needed for LWS CAS +arch_minimum_kernel=2.6.9 diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/configure.in b/sysdeps/unix/sysv/linux/hppa/nptl/configure.in new file mode 100644 index 0000000000..1c7102e260 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/nptl/configure.in @@ -0,0 +1,5 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/unix/sysv/linux/hppa/nptl. + +# Needed for LWS CAS +arch_minimum_kernel=2.6.9 From e8955bf40901b7e785cfbe44ec83313fe9da61c6 Mon Sep 17 00:00:00 2001 From: Jeff Bailey Date: Sat, 16 Jun 2007 16:36:53 +0000 Subject: [PATCH 3718/4487] 2006-07-16 Jeff Bailey * sysdeps/unix/sysv/linux/hppa/sys/procfs.h: Don't include asm/elf.h. Declare elf_greg_t, elf_gregset_t, elf_fpreg_t, and elf_fpregset_t. --- ChangeLog.hppa | 6 ++++++ sysdeps/unix/sysv/linux/hppa/sys/procfs.h | 12 ++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 541cb9b91b..967dadfb16 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,9 @@ +2006-07-16 Jeff Bailey + + * sysdeps/unix/sysv/linux/hppa/sys/procfs.h: Don't + include asm/elf.h. Declare elf_greg_t, elf_gregset_t, + elf_fpreg_t, and elf_fpregset_t. + 2007-06-16 Jeff Bailey * sysdeps/unix/sysv/linux/hppa/nptl/configure.in: Require diff --git a/sysdeps/unix/sysv/linux/hppa/sys/procfs.h b/sysdeps/unix/sysv/linux/hppa/sys/procfs.h index 2e6d10956d..ca35489f54 100644 --- a/sysdeps/unix/sysv/linux/hppa/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/hppa/sys/procfs.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1999, 2000, 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 @@ -34,10 +34,18 @@ #include #include #include -#include __BEGIN_DECLS +typedef unsigned long elf_greg_t; +#define ELF_NGREG 80 /* We only need 64 at present, but leave space + for expansion. */ +typedef elf_greg_t elf_gregset_t[ELF_NGREG]; + +#define ELF_NFPREG 32 +typedef double elf_fpreg_t; +typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; + struct elf_siginfo { int si_signo; /* Signal number. */ From 8323b1abc6a9f7a4a2458be35bd4cc941da725af Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Tue, 10 Jul 2007 13:35:30 +0000 Subject: [PATCH 3719/4487] * sysdeps/arm/nptl/tls.h (THREAD_GSCOPE_RESET_FLAG): Use lll_private_futex_wake. * sysdeps/unix/sysv/linux/arm/check_pf.c: Update from generic version. * sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c (pthread_cancel_init): Add noinline and barriers. * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c (__lll_timedlock_wait): Update call to lll_futex_timed_wait. (__lll_timedwait_tid): Likewise. * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h (LLL_PRIVATE, LLL_SHARED): Define. (lll_futex_wait): Use lll_futex_timed_wait. (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Take a PRIVATE argument. (lll_private_futex_wait, lll_private_futex_timed_wait, lll_private_futex_wake): New. (lll_robust_mutex_dead, __lll_mutex_lock, __lll_mutex_cond_lock, __lll_mutex_unlock, __lll_robust_mutex_unlock, __lll_mutex_unlock_force, lll_wait_tid): Update calls. * sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c (clear_once_control, __pthread_once): Use private futexes. * sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c (pthread_cancel_init): Add noinline and barriers. * sysdeps/unix/sysv/aix/bits/fcntl.h, sysdeps/unix/sysv/linux/am33/bits/fcntl.h, sysdeps/unix/sysv/linux/arm/bits/fcntl.h, sysdeps/unix/sysv/linux/cris/bits/fcntl.h, sysdeps/unix/sysv/linux/m68k/bits/fcntl.h, sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Comment fix. * sysdeps/unix/sysv/linux/arm/nptl/bits/semaphore.h (SEM_VALUE_MAX): Delete. * sysdeps/unix/sysv/linux/mips/nptl/bits/semaphore.h (SEM_VALUE_MAX): Delete. --- ChangeLog.aix | 4 + ChangeLog.am33 | 4 + ChangeLog.arm | 30 +++++ ChangeLog.cris | 4 + ChangeLog.m68k | 4 + ChangeLog.mips | 7 + sysdeps/arm/nptl/tls.h | 2 +- sysdeps/unix/sysv/aix/bits/fcntl.h | 2 +- sysdeps/unix/sysv/linux/am33/bits/fcntl.h | 2 +- sysdeps/unix/sysv/linux/arm/bits/fcntl.h | 2 +- sysdeps/unix/sysv/linux/arm/check_pf.c | 124 +++++++++++++----- .../linux/arm/eabi/nptl/unwind-forcedunwind.c | 16 ++- .../unix/sysv/linux/arm/nptl/bits/semaphore.h | 5 +- .../unix/sysv/linux/arm/nptl/lowlevellock.c | 6 +- .../unix/sysv/linux/arm/nptl/lowlevellock.h | 75 ++++++++--- .../unix/sysv/linux/arm/nptl/pthread_once.c | 6 +- .../sysv/linux/arm/nptl/unwind-forcedunwind.c | 19 ++- sysdeps/unix/sysv/linux/cris/bits/fcntl.h | 2 +- sysdeps/unix/sysv/linux/m68k/bits/fcntl.h | 2 +- sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 2 +- .../sysv/linux/mips/nptl/bits/semaphore.h | 5 +- 21 files changed, 252 insertions(+), 71 deletions(-) diff --git a/ChangeLog.aix b/ChangeLog.aix index 5305d338db..3e3e4df307 100644 --- a/ChangeLog.aix +++ b/ChangeLog.aix @@ -1,3 +1,7 @@ +2007-07-10 Daniel Jacobowitz + + * sysdeps/unix/sysv/aix/bits/fcntl.h: Comment fix. + 2005-12-27 Roland McGrath * sysdeps/unix/sysv/aix/bits/setjmp.h (_JMPBUF_UNWINDS): Take third diff --git a/ChangeLog.am33 b/ChangeLog.am33 index f794cc55dc..c10f8d08e4 100644 --- a/ChangeLog.am33 +++ b/ChangeLog.am33 @@ -1,3 +1,7 @@ +2007-07-10 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/am33/bits/fcntl.h: Comment fix. + 2006-01-12 Roland McGrath * sysdeps/am33/jmpbuf-unwind.h: Include . diff --git a/ChangeLog.arm b/ChangeLog.arm index 39e14dca95..5a24c54ff9 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,33 @@ +2007-07-10 Daniel Jacobowitz + + * sysdeps/arm/nptl/tls.h (THREAD_GSCOPE_RESET_FLAG): Use + lll_private_futex_wake. + * sysdeps/unix/sysv/linux/arm/check_pf.c: Update from generic version. + * sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c + (pthread_cancel_init): Add noinline and barriers. + * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c + (__lll_timedlock_wait): Update call to lll_futex_timed_wait. + (__lll_timedwait_tid): Likewise. + * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h (LLL_PRIVATE, + LLL_SHARED): Define. + (lll_futex_wait): Use lll_futex_timed_wait. + (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Take a + PRIVATE argument. + (lll_private_futex_wait, lll_private_futex_timed_wait, + lll_private_futex_wake): New. + (lll_robust_mutex_dead, __lll_mutex_lock, __lll_mutex_cond_lock, + __lll_mutex_unlock, __lll_robust_mutex_unlock, + __lll_mutex_unlock_force, lll_wait_tid): Update calls. + * sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c (clear_once_control, + __pthread_once): Use private futexes. + * sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c + (pthread_cancel_init): Add noinline and barriers. + + * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Comment fix. + + * sysdeps/unix/sysv/linux/arm/nptl/bits/semaphore.h (SEM_VALUE_MAX): + Delete. + 2007-06-06 Daniel Jacobowitz * sysdeps/arm/nptl/tls.h (THREAD_GSCOPE_FLAG_UNUSED, diff --git a/ChangeLog.cris b/ChangeLog.cris index af91a1d420..746c89cbf5 100644 --- a/ChangeLog.cris +++ b/ChangeLog.cris @@ -1,3 +1,7 @@ +2007-07-10 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/cris/bits/fcntl.h: Comment fix. + 2005-12-27 Roland McGrath * sysdeps/cris/bits/setjmp.h (_JMPBUF_UNWINDS): Take third argument diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 51f6dfa022..fb591ad11d 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,7 @@ +2007-07-10 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Comment fix. + 2006-11-28 Andreas Schwab * sysdeps/unix/sysv/linux/m68k/sysdep.h (DOARGS_6, _DOARGS_6) diff --git a/ChangeLog.mips b/ChangeLog.mips index 346237f346..3ea63cd8c7 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,10 @@ +2007-07-10 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Comment fix. + + * sysdeps/unix/sysv/linux/mips/nptl/bits/semaphore.h (SEM_VALUE_MAX): + Delete. + 2007-06-07 Daniel Jacobowitz * sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h (ARGIFY): New. diff --git a/sysdeps/arm/nptl/tls.h b/sysdeps/arm/nptl/tls.h index ae2aecc42b..e80b6b8d06 100644 --- a/sysdeps/arm/nptl/tls.h +++ b/sysdeps/arm/nptl/tls.h @@ -142,7 +142,7 @@ typedef struct = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \ THREAD_GSCOPE_FLAG_UNUSED); \ if (__res == THREAD_GSCOPE_FLAG_WAIT) \ - lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1); \ + lll_private_futex_wake (&THREAD_SELF->header.gscope_flag, 1); \ } \ while (0) #define THREAD_GSCOPE_SET_FLAG() \ diff --git a/sysdeps/unix/sysv/aix/bits/fcntl.h b/sysdeps/unix/sysv/aix/bits/fcntl.h index c65b8beeb4..d53c0f7d9b 100644 --- a/sysdeps/unix/sysv/aix/bits/fcntl.h +++ b/sysdeps/unix/sysv/aix/bits/fcntl.h @@ -79,7 +79,7 @@ # define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */ #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(). */ diff --git a/sysdeps/unix/sysv/linux/am33/bits/fcntl.h b/sysdeps/unix/sysv/linux/am33/bits/fcntl.h index 4c276c5485..f2c88fad10 100644 --- a/sysdeps/unix/sysv/linux/am33/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/am33/bits/fcntl.h @@ -94,7 +94,7 @@ # define F_NOTIFY 1026 /* Request notfications on a directory. */ #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(). */ diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h index 7c7b7c2027..59539e1758 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h @@ -98,7 +98,7 @@ # define F_NOTIFY 1026 /* Request notfications on a directory. */ #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(). */ diff --git a/sysdeps/unix/sysv/linux/arm/check_pf.c b/sysdeps/unix/sysv/linux/arm/check_pf.c index ee13d8019c..dfca75d374 100644 --- a/sysdeps/unix/sysv/linux/arm/check_pf.c +++ b/sysdeps/unix/sysv/linux/arm/check_pf.c @@ -1,5 +1,5 @@ -/* Determine protocol families for which interfaces exist. ARM Linux version. - Copyright (C) 2003, 2006 Free Software Foundation, Inc. +/* Determine protocol families for which interfaces exist. Linux version. + Copyright (C) 2003, 2006, 2007 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 @@ -69,17 +69,38 @@ make_request (int fd, pid_t pid, bool *seen_ipv4, bool *seen_ipv6, memset (&nladdr, '\0', sizeof (nladdr)); nladdr.nl_family = AF_NETLINK; +#ifdef PAGE_SIZE + /* Help the compiler optimize out the malloc call if PAGE_SIZE + is constant and smaller or equal to PTHREAD_STACK_MIN/4. */ + const size_t buf_size = PAGE_SIZE; +#else + const size_t buf_size = __getpagesize (); +#endif + bool use_malloc = false; + char *buf; + + if (__libc_use_alloca (buf_size)) + buf = alloca (buf_size); + else + { + buf = malloc (buf_size); + if (buf != NULL) + use_malloc = true; + else + goto out_fail; + } + + struct iovec iov = { buf, buf_size }; + if (TEMP_FAILURE_RETRY (__sendto (fd, (void *) &req, sizeof (req), 0, (struct sockaddr *) &nladdr, sizeof (nladdr))) < 0) - return -1; + goto out_fail; *seen_ipv4 = false; *seen_ipv6 = false; bool done = false; - char buf[4096]; - struct iovec iov = { buf, sizeof (buf) }; struct in6ailist { struct in6addrinfo info; @@ -99,10 +120,10 @@ make_request (int fd, pid_t pid, bool *seen_ipv4, bool *seen_ipv6, ssize_t read_len = TEMP_FAILURE_RETRY (__recvmsg (fd, &msg, 0)); if (read_len < 0) - return -1; + goto out_fail; if (msg.msg_flags & MSG_TRUNC) - return -1; + goto out_fail; struct nlmsghdr *nlmh; for (nlmh = (struct nlmsghdr *) buf; @@ -116,40 +137,72 @@ make_request (int fd, pid_t pid, bool *seen_ipv4, bool *seen_ipv6, if (nlmh->nlmsg_type == RTM_NEWADDR) { struct ifaddrmsg *ifam = (struct ifaddrmsg *) NLMSG_DATA (nlmh); + struct rtattr *rta = IFA_RTA (ifam); + size_t len = nlmh->nlmsg_len - NLMSG_LENGTH (sizeof (*ifam)); switch (ifam->ifa_family) { + const void *local; + const void *address; + case AF_INET: - *seen_ipv4 = true; + local = NULL; + address = NULL; + while (RTA_OK (rta, len)) + { + switch (rta->rta_type) + { + case IFA_LOCAL: + local = RTA_DATA (rta); + break; + + case IFA_ADDRESS: + address = RTA_DATA (rta); + goto out_v4; + } + + rta = RTA_NEXT (rta, len); + } + + if (local != NULL) + { + out_v4: + if (*(const in_addr_t *) (address ?: local) + != htonl (INADDR_LOOPBACK)) + *seen_ipv4 = true; + } break; + case AF_INET6: - *seen_ipv6 = true; + local = NULL; + address = NULL; + while (RTA_OK (rta, len)) + { + switch (rta->rta_type) + { + case IFA_LOCAL: + local = RTA_DATA (rta); + break; + + case IFA_ADDRESS: + address = RTA_DATA (rta); + goto out_v6; + } + + rta = RTA_NEXT (rta, len); + } + + if (local != NULL) + { + out_v6: + if (!IN6_IS_ADDR_LOOPBACK (address ?: local)) + *seen_ipv6 = true; + } if (ifam->ifa_flags & (IFA_F_DEPRECATED | IFA_F_TEMPORARY | IFA_F_HOMEADDRESS)) { - struct rtattr *rta = IFA_RTA (ifam); - size_t len = (nlmh->nlmsg_len - - NLMSG_LENGTH (sizeof (*ifam))); - void *local = NULL; - void *address = NULL; - while (RTA_OK (rta, len)) - { - switch (rta->rta_type) - { - case IFA_LOCAL: - local = RTA_DATA (rta); - break; - - case IFA_ADDRESS: - address = RTA_DATA (rta); - break; - } - - rta = RTA_NEXT (rta, len); - } - struct in6ailist *newp = alloca (sizeof (*newp)); newp->info.flags = (((ifam->ifa_flags & IFA_F_DEPRECATED) ? in6ai_deprecated : 0) @@ -180,11 +233,11 @@ make_request (int fd, pid_t pid, bool *seen_ipv4, bool *seen_ipv6, close_not_cancel_no_status (fd); - if (in6ailist != NULL) + if (*seen_ipv6 && in6ailist != NULL) { *in6ai = malloc (in6ailistlen * sizeof (**in6ai)); if (*in6ai == NULL) - return -1; + goto out_fail; *in6ailen = in6ailistlen; @@ -196,7 +249,14 @@ make_request (int fd, pid_t pid, bool *seen_ipv4, bool *seen_ipv6, while (in6ailist != NULL); } + if (use_malloc) + free (buf); return 0; + +out_fail: + if (use_malloc) + free (buf); + return -1; } diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c index ca1cc8d68e..24ce61ba19 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c +++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2005, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek . @@ -30,13 +30,18 @@ static _Unwind_Reason_Code (*libgcc_s_forcedunwind) static _Unwind_Word (*libgcc_s_getcfa) (struct _Unwind_Context *); void +__attribute_noinline__ pthread_cancel_init (void) { void *resume, *personality, *forcedunwind, *getcfa; void *handle; if (__builtin_expect (libgcc_s_getcfa != NULL, 1)) - return; + { + /* Force gcc to reload all values. */ + asm volatile ("" ::: "memory"); + return; + } handle = __libc_dlopen ("libgcc_s.so.1"); @@ -55,6 +60,10 @@ pthread_cancel_init (void) libgcc_s_resume = resume; libgcc_s_personality = personality; libgcc_s_forcedunwind = forcedunwind; + /* Make sure libgcc_s_getcfa is written last. Otherwise, + pthread_cancel_init might return early even when the pointer the + caller is interested in is not initialized yet. */ + atomic_write_barrier (); libgcc_s_getcfa = getcfa; } @@ -92,6 +101,7 @@ __gcc_personality_v0 (_Unwind_State state, { if (__builtin_expect (libgcc_s_personality == NULL, 0)) pthread_cancel_init (); + return libgcc_s_personality (state, ue_header, context); } @@ -101,6 +111,7 @@ _Unwind_ForcedUnwind (struct _Unwind_Exception *exc, _Unwind_Stop_Fn stop, { if (__builtin_expect (libgcc_s_forcedunwind == NULL, 0)) pthread_cancel_init (); + return libgcc_s_forcedunwind (exc, stop, stop_argument); } @@ -109,5 +120,6 @@ _Unwind_GetCFA (struct _Unwind_Context *context) { if (__builtin_expect (libgcc_s_getcfa == NULL, 0)) pthread_cancel_init (); + return libgcc_s_getcfa (context); } diff --git a/sysdeps/unix/sysv/linux/arm/nptl/bits/semaphore.h b/sysdeps/unix/sysv/linux/arm/nptl/bits/semaphore.h index 3fc647d31d..dadfac2af2 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/bits/semaphore.h +++ b/sysdeps/unix/sysv/linux/arm/nptl/bits/semaphore.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2005, 2007 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 @@ -27,9 +27,6 @@ /* Value returned if `sem_open' failed. */ #define SEM_FAILED ((sem_t *) 0) -/* Maximum value the semaphore can have. */ -#define SEM_VALUE_MAX ((int) ((~0u) >> 1)) - typedef union { diff --git a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c index 66a4d7b360..44867ecc83 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c +++ b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c @@ -55,7 +55,8 @@ __lll_timedlock_wait (int *futex, const struct timespec *abstime) if (rt.tv_sec < 0) return ETIMEDOUT; - lll_futex_timed_wait (futex, 2, &rt); + // XYZ: Lost the lock to check whether it was private. + lll_futex_timed_wait (futex, 2, &rt, LLL_SHARED); } while (atomic_exchange_acq (futex, 2) != 0); @@ -96,7 +97,8 @@ __lll_timedwait_tid (int *tidp, const struct timespec *abstime) return ETIMEDOUT; /* Wait until thread terminates. */ - if (lll_futex_timed_wait (tidp, tid, &rt) == -ETIMEDOUT) + // XYZ: Lost the lock to check whether it was private. + if (lll_futex_timed_wait (tidp, tid, &rt, LLL_SHARED) == -ETIMEDOUT) return ETIMEDOUT; } diff --git a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h index 15cf1478fd..468fe716fd 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h @@ -12,7 +12,7 @@ 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 Libr \ary; if not, write to the Free + 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. */ @@ -36,42 +36,87 @@ #define FUTEX_TRYLOCK_PI 8 #define FUTEX_PRIVATE_FLAG 128 +/* Values for 'private' parameter of locking macros. Yes, the + definition seems to be backwards. But it is not. The bit will be + reversed before passing to the system call. */ +#define LLL_PRIVATE 0 +#define LLL_SHARED FUTEX_PRIVATE_FLAG + /* Initializer for compatibility lock. */ #define LLL_MUTEX_LOCK_INITIALIZER (0) -#define lll_futex_wait(futexp, val) \ +#define lll_futex_wait(futexp, val, private) \ + lll_futex_timed_wait(futexp, val, NULL, private) + +#define lll_futex_timed_wait(futexp, val, timespec, private) \ ({ \ INTERNAL_SYSCALL_DECL (__err); \ long int __ret; \ __ret = INTERNAL_SYSCALL (futex, __err, 4, \ - (futexp), FUTEX_WAIT, (val), 0); \ + (futexp), FUTEX_WAIT, (val), (timespec)); \ __ret; \ }) -#define lll_futex_timed_wait(futexp, val, timespec) \ +#define lll_futex_wake(futexp, nr, private) \ ({ \ INTERNAL_SYSCALL_DECL (__err); \ long int __ret; \ __ret = INTERNAL_SYSCALL (futex, __err, 4, \ - (futexp), FUTEX_WAIT, (val), (timespec)); \ + (futexp), FUTEX_WAKE, (nr), 0); \ __ret; \ }) -#define lll_futex_wake(futexp, nr) \ +#define lll_private_futex_wait(futexp, val) \ + lll_private_futex_timed_wait(futexp, val, NULL) + +#ifdef __ASSUME_PRIVATE_FUTEX +#define lll_private_futex_timed_wait(futexp, val, timespec) \ ({ \ INTERNAL_SYSCALL_DECL (__err); \ long int __ret; \ __ret = INTERNAL_SYSCALL (futex, __err, 4, \ - (futexp), FUTEX_WAKE, (nr), 0); \ + (futexp), FUTEX_WAIT | FUTEX_PRIVATE_FLAG, \ + (val), (timespec)); \ + __ret; \ + }) + +#define lll_private_futex_wake(futexp, nr) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + __ret = INTERNAL_SYSCALL (futex, __err, 4, \ + (futexp), FUTEX_WAKE | FUTEX_PRIVATE_FLAG, \ + (nr), (0)); \ + __ret; \ + }) +#else +#define lll_private_futex_timed_wait(futexp, val, timespec) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret, __op; \ + __op = FUTEX_WAIT | THREAD_GETMEM (THREAD_SELF, header.private_futex); \ + __ret = INTERNAL_SYSCALL (futex, __err, 4, \ + (futexp), __op, (val), (timespec)); \ + __ret; \ + }) + +#define lll_private_futex_wake(futexp, nr) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret, __op; \ + __op = FUTEX_WAKE | THREAD_GETMEM (THREAD_SELF, header.private_futex); \ + __ret = INTERNAL_SYSCALL (futex, __err, 4, \ + (futexp), __op, (nr), 0); \ __ret; \ }) +#endif #define lll_robust_mutex_dead(futexv) \ do \ { \ int *__futexp = &(futexv); \ atomic_or (__futexp, FUTEX_OWNER_DIED); \ - lll_futex_wake (__futexp, 1); \ + lll_futex_wake (__futexp, 1, 0); \ } \ while (0) @@ -88,7 +133,7 @@ /* Returns non-zero if error happened, zero if success. */ -#define lll_futex_wake_unlock(futexp, nr_wake, nr_wake2, futexp2) \ +#define lll_futex_wake_unlock(futexp, nr_wake, nr_wake2, futexp2, private) \ ({ \ INTERNAL_SYSCALL_DECL (__err); \ long int __ret; \ @@ -156,7 +201,7 @@ __lll_mutex_lock (int *futex) if (__builtin_expect (val != 0, 0)) { while (atomic_exchange_acq (futex, 2) != 0) - lll_futex_wait (futex, 2); + lll_futex_wait (futex, 2, 0); } } #define lll_mutex_lock(futex) __lll_mutex_lock (&(futex)) @@ -182,7 +227,7 @@ __lll_mutex_cond_lock (int *futex) if (__builtin_expect (val != 0, 0)) { while (atomic_exchange_acq (futex, 2) != 0) - lll_futex_wait (futex, 2); + lll_futex_wait (futex, 2, 0); } } #define lll_mutex_cond_lock(futex) __lll_mutex_cond_lock (&(futex)) @@ -229,7 +274,7 @@ __lll_mutex_unlock (int *futex) { int val = atomic_exchange_rel (futex, 0); if (__builtin_expect (val > 1, 0)) - lll_futex_wake (futex, 1); + lll_futex_wake (futex, 1, 0); } #define lll_mutex_unlock(futex) __lll_mutex_unlock(&(futex)) @@ -239,7 +284,7 @@ __lll_robust_mutex_unlock (int *futex, int mask) { int val = atomic_exchange_rel (futex, 0); if (__builtin_expect (val & mask, 0)) - lll_futex_wake (futex, 1); + lll_futex_wake (futex, 1, 0); } #define lll_robust_mutex_unlock(futex) \ __lll_robust_mutex_unlock(&(futex), FUTEX_WAITERS) @@ -249,7 +294,7 @@ static inline void __attribute__ ((always_inline)) __lll_mutex_unlock_force (int *futex) { (void) atomic_exchange_rel (futex, 0); - lll_futex_wake (futex, 1); + lll_futex_wake (futex, 1, 0); } #define lll_mutex_unlock_force(futex) __lll_mutex_unlock_force(&(futex)) @@ -286,7 +331,7 @@ typedef int lll_lock_t; do { \ __typeof (tid) __tid; \ while ((__tid = (tid)) != 0) \ - lll_futex_wait (&(tid), __tid); \ + lll_futex_wait (&(tid), __tid, 0);\ } while (0) extern int __lll_timedwait_tid (int *, const struct timespec *) diff --git a/sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c b/sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c index c8925810cb..909e8327a5 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c +++ b/sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c @@ -27,7 +27,7 @@ clear_once_control (void *arg) pthread_once_t *once_control = (pthread_once_t *) arg; *once_control = 0; - lll_futex_wake (once_control, INT_MAX); + lll_private_futex_wake (once_control, INT_MAX); } int @@ -66,7 +66,7 @@ __pthread_once (pthread_once_t *once_control, void (*init_routine) (void)) break; /* Same generation, some other thread was faster. Wait. */ - lll_futex_wait (once_control, oldval); + lll_private_futex_wait (once_control, oldval); } /* This thread is the first here. Do the initialization. @@ -82,7 +82,7 @@ __pthread_once (pthread_once_t *once_control, void (*init_routine) (void)) *once_control = __fork_generation | 2; /* Wake up all other threads. */ - lll_futex_wake (once_control, INT_MAX); + lll_private_futex_wake (once_control, INT_MAX); return 0; } diff --git a/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c index ba5327a4d1..b281963568 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c +++ b/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c @@ -33,6 +33,7 @@ static void (*libgcc_s_sjlj_register) (struct SjLj_Function_Context *); static void (*libgcc_s_sjlj_unregister) (struct SjLj_Function_Context *); void +__attribute_noinline__ pthread_cancel_init (void) { void *resume, *personality, *forcedunwind, *getcfa; @@ -40,7 +41,11 @@ pthread_cancel_init (void) void *sjlj_register, *sjlj_unregister; if (__builtin_expect (libgcc_s_getcfa != NULL, 1)) - return; + { + /* Force gcc to reload all values. */ + asm volatile ("" ::: "memory"); + return; + } handle = __libc_dlopen ("libgcc_s.so.1"); @@ -58,9 +63,13 @@ pthread_cancel_init (void) libgcc_s_resume = resume; libgcc_s_personality = personality; libgcc_s_forcedunwind = forcedunwind; - libgcc_s_getcfa = getcfa; libgcc_s_sjlj_register = sjlj_register; libgcc_s_sjlj_unregister = sjlj_unregister; + /* Make sure libgcc_s_getcfa is written last. Otherwise, + pthread_cancel_init might return early even when the pointer the + caller is interested in is not initialized yet. */ + atomic_write_barrier (); + libgcc_s_getcfa = getcfa; } void @@ -68,6 +77,7 @@ _Unwind_Resume (struct _Unwind_Exception *exc) { if (__builtin_expect (libgcc_s_resume == NULL, 0)) pthread_cancel_init (); + libgcc_s_resume (exc); } @@ -79,6 +89,7 @@ __gcc_personality_v0 (int version, _Unwind_Action actions, { if (__builtin_expect (libgcc_s_personality == NULL, 0)) pthread_cancel_init (); + return libgcc_s_personality (version, actions, exception_class, ue_header, context); } @@ -89,6 +100,7 @@ _Unwind_ForcedUnwind (struct _Unwind_Exception *exc, _Unwind_Stop_Fn stop, { if (__builtin_expect (libgcc_s_forcedunwind == NULL, 0)) pthread_cancel_init (); + return libgcc_s_forcedunwind (exc, stop, stop_argument); } @@ -97,6 +109,7 @@ _Unwind_GetCFA (struct _Unwind_Context *context) { if (__builtin_expect (libgcc_s_getcfa == NULL, 0)) pthread_cancel_init (); + return libgcc_s_getcfa (context); } @@ -105,6 +118,7 @@ _Unwind_SjLj_Register (struct SjLj_Function_Context *fc) { if (__builtin_expect (libgcc_s_sjlj_register == NULL, 0)) pthread_cancel_init (); + libgcc_s_sjlj_register (fc); } @@ -113,5 +127,6 @@ _Unwind_SjLj_Unregister (struct SjLj_Function_Context *fc) { if (__builtin_expect (libgcc_s_sjlj_unregister == NULL, 0)) pthread_cancel_init (); + libgcc_s_sjlj_unregister (fc); } diff --git a/sysdeps/unix/sysv/linux/cris/bits/fcntl.h b/sysdeps/unix/sysv/linux/cris/bits/fcntl.h index 36799aa50e..270a8de58a 100644 --- a/sysdeps/unix/sysv/linux/cris/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/cris/bits/fcntl.h @@ -96,7 +96,7 @@ # define F_NOTIFY 1026 /* Request notfications on a directory. */ #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(). */ diff --git a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h index 90c0a481e4..733a088cf5 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h @@ -95,7 +95,7 @@ # define F_NOTIFY 1026 /* Request notfications on a directory. */ #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(). */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index d40b4b6386..340466392a 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -101,7 +101,7 @@ # define F_NOTIFY 1026 /* Request notfications on a directory. */ #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(). */ diff --git a/sysdeps/unix/sysv/linux/mips/nptl/bits/semaphore.h b/sysdeps/unix/sysv/linux/mips/nptl/bits/semaphore.h index c4440f9e9e..af43a60484 100644 --- a/sysdeps/unix/sysv/linux/mips/nptl/bits/semaphore.h +++ b/sysdeps/unix/sysv/linux/mips/nptl/bits/semaphore.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2005, 2007 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 @@ -29,9 +29,6 @@ /* Value returned if `sem_open' failed. */ #define SEM_FAILED ((sem_t *) 0) -/* Maximum value the semaphore can have. */ -#define SEM_VALUE_MAX (2147483647) - typedef union { From 19584095cc78af7b4911f4957d3215d631283cf3 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Fri, 13 Jul 2007 12:43:40 +0000 Subject: [PATCH 3720/4487] * sysdeps/powerpc/nofpu/Makefile: Remove fe_nomask from libm-support. --- ChangeLog.powerpc | 4 ++++ sysdeps/powerpc/nofpu/Makefile | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog.powerpc b/ChangeLog.powerpc index 1ea6746b3e..619866e488 100644 --- a/ChangeLog.powerpc +++ b/ChangeLog.powerpc @@ -1,3 +1,7 @@ +2007-06-07 Steven Munroe + + * sysdeps/powerpc/nofpu/Makefile: Remove fe_nomask from libm-support. + 2007-05-23 Steven Munroe * sysdeps/powerpc/nofpu/feholdexcpt.c (feholdexcept): Disable diff --git a/sysdeps/powerpc/nofpu/Makefile b/sysdeps/powerpc/nofpu/Makefile index c91acd91f1..6bdff45465 100644 --- a/sysdeps/powerpc/nofpu/Makefile +++ b/sysdeps/powerpc/nofpu/Makefile @@ -6,7 +6,7 @@ sysdep_routines += $(gcc-single-routines) $(gcc-double-routines) \ endif ifeq ($(subdir),math) -libm-support += fenv_const fe_nomask +libm-support += fenv_const CPPFLAGS += -I../soft-fp/ # The follow CFLAGS are a work around for GCC Bugzilla Bug 29253 # "expand_abs wrong default code for floating point" From 2b4095f39492ea7788110960273e209d190ca3c2 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Fri, 13 Jul 2007 12:46:12 +0000 Subject: [PATCH 3721/4487] 2007-07-13 Joseph Myers * sysdeps/unix/sysv/linux/mips/nptl/bits/local_lim.h: Copy from libc/nptl/sysdeps/unix/sysv/linux/bits/local_lim.h. Increase PTHREAD_STACK_MIN. --- ChangeLog.mips | 6 ++ .../sysv/linux/mips/nptl/bits/local_lim.h | 93 +++++++++++++++++++ 2 files changed, 99 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/mips/nptl/bits/local_lim.h diff --git a/ChangeLog.mips b/ChangeLog.mips index 3ea63cd8c7..32e0580d4f 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,9 @@ +2007-07-13 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/nptl/bits/local_lim.h: Copy from + libc/nptl/sysdeps/unix/sysv/linux/bits/local_lim.h. Increase + PTHREAD_STACK_MIN. + 2007-07-10 Daniel Jacobowitz * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Comment fix. diff --git a/sysdeps/unix/sysv/linux/mips/nptl/bits/local_lim.h b/sysdeps/unix/sysv/linux/mips/nptl/bits/local_lim.h new file mode 100644 index 0000000000..4c3f5f6788 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/nptl/bits/local_lim.h @@ -0,0 +1,93 @@ +/* Minimum guaranteed maximum values for system limits. MIPS Linux version. + Copyright (C) 1993-1998,2000,2002,2003,2004,2007 + 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; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* The kernel header pollutes the namespace with the NR_OPEN symbol + and defines LINK_MAX although filesystems have different maxima. A + similar thing is true for OPEN_MAX: the limit can be changed at + runtime and therefore the macro must not be defined. Remove this + after including the header if necessary. */ +#ifndef NR_OPEN +# define __undef_NR_OPEN +#endif +#ifndef LINK_MAX +# define __undef_LINK_MAX +#endif +#ifndef OPEN_MAX +# define __undef_OPEN_MAX +#endif + +/* The kernel sources contain a file with all the needed information. */ +#include + +/* Have to remove NR_OPEN? */ +#ifdef __undef_NR_OPEN +# undef NR_OPEN +# undef __undef_NR_OPEN +#endif +/* Have to remove LINK_MAX? */ +#ifdef __undef_LINK_MAX +# undef LINK_MAX +# undef __undef_LINK_MAX +#endif +/* Have to remove OPEN_MAX? */ +#ifdef __undef_OPEN_MAX +# undef OPEN_MAX +# undef __undef_OPEN_MAX +#endif + +/* The number of data keys per process. */ +#define _POSIX_THREAD_KEYS_MAX 128 +/* This is the value this implementation supports. */ +#define PTHREAD_KEYS_MAX 1024 + +/* Controlling the iterations of destructors for thread-specific data. */ +#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 +/* Number of iterations this implementation does. */ +#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS + +/* The number of threads per process. */ +#define _POSIX_THREAD_THREADS_MAX 64 +/* We have no predefined limit on the number of threads. */ +#undef PTHREAD_THREADS_MAX + +/* Maximum amount by which a process can descrease its asynchronous I/O + priority level. */ +#define AIO_PRIO_DELTA_MAX 20 + +/* Minimum size for a thread. At least two pages with 64k pages. */ +#define PTHREAD_STACK_MIN 131072 + +/* Maximum number of timer expiration overruns. */ +#define DELAYTIMER_MAX 2147483647 + +/* Maximum tty name length. */ +#define TTY_NAME_MAX 32 + +/* Maximum login name length. This is arbitrary. */ +#define LOGIN_NAME_MAX 256 + +/* Maximum host name length. */ +#define HOST_NAME_MAX 64 + +/* Maximum message queue priority level. */ +#define MQ_PRIO_MAX 32768 + +/* Maximum value the semaphore can have. */ +#define SEM_VALUE_MAX (2147483647) From e9f19437e2da14c26d964d19e3f945229825dd00 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Fri, 13 Jul 2007 12:46:28 +0000 Subject: [PATCH 3722/4487] Update date. --- ChangeLog.powerpc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog.powerpc b/ChangeLog.powerpc index 619866e488..c775ee052b 100644 --- a/ChangeLog.powerpc +++ b/ChangeLog.powerpc @@ -1,4 +1,4 @@ -2007-06-07 Steven Munroe +2007-07-13 Steven Munroe * sysdeps/powerpc/nofpu/Makefile: Remove fe_nomask from libm-support. From 391da2016b6daffbb764589bc1e64cd10820249a Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Fri, 13 Jul 2007 12:48:34 +0000 Subject: [PATCH 3723/4487] 2007-07-13 Carlos O'Donell * sysdeps/mips/bits/wordsize.h [_MIPS_SIM == _ABI64]: Define __WORDSIZE_COMPAT32 as 1. --- ChangeLog.mips | 5 +++++ sysdeps/mips/bits/wordsize.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog.mips b/ChangeLog.mips index 32e0580d4f..43aadf8d39 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2007-07-13 Carlos O'Donell + + * sysdeps/mips/bits/wordsize.h [_MIPS_SIM == _ABI64]: + Define __WORDSIZE_COMPAT32 as 1. + 2007-07-13 Joseph Myers * sysdeps/unix/sysv/linux/mips/nptl/bits/local_lim.h: Copy from diff --git a/sysdeps/mips/bits/wordsize.h b/sysdeps/mips/bits/wordsize.h index 666c7ad07e..06967e51a1 100644 --- a/sysdeps/mips/bits/wordsize.h +++ b/sysdeps/mips/bits/wordsize.h @@ -17,3 +17,6 @@ 02111-1307 USA. */ #define __WORDSIZE _MIPS_SZPTR +#if _MIPS_SIM == _ABI64 +# define __WORDSIZE_COMPAT32 1 +#endif From 83ab449d4156bb3d1c0e0ce22113164dad4cf151 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 28 Jul 2007 19:30:20 +0000 Subject: [PATCH 3724/4487] Replace lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE). --- sysdeps/alpha/nptl/tls.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/alpha/nptl/tls.h b/sysdeps/alpha/nptl/tls.h index 388a399c73..e77b1ffca9 100644 --- a/sysdeps/alpha/nptl/tls.h +++ b/sysdeps/alpha/nptl/tls.h @@ -131,7 +131,7 @@ typedef struct = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \ THREAD_GSCOPE_FLAG_UNUSED); \ if (__res == THREAD_GSCOPE_FLAG_WAIT) \ - lll_private_futex_wake (&THREAD_SELF->header.gscope_flag, 1); \ + lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1, LLL_PRIVATE); \ } \ while (0) #define THREAD_GSCOPE_SET_FLAG() \ From 2b54437c2f4f116442a52861100339aa36783f8f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 28 Jul 2007 19:31:17 +0000 Subject: [PATCH 3725/4487] (clear_once_control, __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*. --- sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c b/sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c index 79a3c47aed..0e7e9790dd 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c +++ b/sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2007 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 @@ clear_once_control (void *arg) pthread_once_t *once_control = (pthread_once_t *) arg; *once_control = 0; - lll_futex_wake (once_control, INT_MAX); + lll_futex_wake (once_control, INT_MAX, LLL_PRIVATE); } int @@ -72,7 +72,7 @@ __pthread_once (pthread_once_t *once_control, void (*init_routine) (void)) break; /* Same generation, some other thread was faster. Wait. */ - lll_futex_wait (once_control, oldval); + lll_futex_wait (once_control, oldval, LLL_PRIVATE); } /* This thread is the first here. Do the initialization. @@ -88,7 +88,7 @@ __pthread_once (pthread_once_t *once_control, void (*init_routine) (void)) atomic_increment (once_control); /* Wake up all other threads. */ - lll_futex_wake (once_control, INT_MAX); + lll_futex_wake (once_control, INT_MAX, LLL_PRIVATE); return 0; } From 42cca94a7485d62a2594e0f2c95c85eb36982814 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 28 Jul 2007 19:31:35 +0000 Subject: [PATCH 3726/4487] (FUTEX_PRIVATE_FLAG, LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define. (lll_futex_wait): Add private argument, define as wrapper around lll_futex_timed_wait. (lll_futex_timed_wait, lll_futex_wake): Add private argument, use __lll_private_flag macro. (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*. --- .../unix/sysv/linux/alpha/nptl/lowlevellock.h | 73 +++++++++++++------ 1 file changed, 51 insertions(+), 22 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h index 04ac006400..5f08673c43 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h @@ -36,34 +36,63 @@ #define FUTEX_LOCK_PI 6 #define FUTEX_UNLOCK_PI 7 #define FUTEX_TRYLOCK_PI 8 +#define FUTEX_PRIVATE_FLAG 128 + +/* Values for 'private' parameter of locking macros. Yes, the + definition seems to be backwards. But it is not. The bit will be + reversed before passing to the system call. */ +#define LLL_PRIVATE 0 +#define LLL_SHARED FUTEX_PRIVATE_FLAG + + +#if !defined NOT_IN_libc || defined IS_IN_rtld +/* In libc.so or ld.so all futexes are private. */ +# ifdef __ASSUME_PRIVATE_FUTEX +# define __lll_private_flag(fl, private) \ + ((fl) | FUTEX_PRIVATE_FLAG) +# else +# define __lll_private_flag(fl, private) \ + ((fl) | THREAD_GETMEM (THREAD_SELF, header.private_futex)) +# endif +#else +# ifdef __ASSUME_PRIVATE_FUTEX +# define __lll_private_flag(fl, private) \ + (((fl) | FUTEX_PRIVATE_FLAG) ^ (private)) +# else +# define __lll_private_flag(fl, private) \ + (__builtin_constant_p (private) \ + ? ((private) == 0 \ + ? ((fl) | THREAD_GETMEM (THREAD_SELF, header.private_futex)) \ + : (fl)) \ + : ((fl) | (((private) ^ FUTEX_PRIVATE_FLAG) \ + & THREAD_GETMEM (THREAD_SELF, header.private_futex)))) +# endif +#endif + /* Initializer for compatibility lock. */ #define LLL_MUTEX_LOCK_INITIALIZER (0) -#define lll_futex_wait(futexp, val) \ - ({ \ - INTERNAL_SYSCALL_DECL (__err); \ - long int __ret; \ - __ret = INTERNAL_SYSCALL (futex, __err, 4, \ - (futexp), FUTEX_WAIT, (val), 0); \ - INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret : __ret; \ - }) +#define lll_futex_wait(futexp, val, private) \ + lll_futex_timed_wait (futexp, val, NULL, private) -#define lll_futex_timed_wait(futexp, val, timespec) \ +#define lll_futex_timed_wait(futexp, val, timespec, private) \ ({ \ INTERNAL_SYSCALL_DECL (__err); \ long int __ret; \ - __ret = INTERNAL_SYSCALL (futex, __err, 4, \ - (futexp), FUTEX_WAIT, (val), (timespec)); \ + __ret = INTERNAL_SYSCALL (futex, __err, 4, (futexp), \ + __lll_private_flag (FUTEX_WAIT, private), \ + (val), (timespec)); \ INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret : __ret; \ }) -#define lll_futex_wake(futexp, nr) \ +#define lll_futex_wake(futexp, nr, private) \ ({ \ INTERNAL_SYSCALL_DECL (__err); \ long int __ret; \ - __ret = INTERNAL_SYSCALL (futex, __err, 4, \ - (futexp), FUTEX_WAKE, (nr), 0); \ + __ret = INTERNAL_SYSCALL (futex, __err, 4, (futexp), \ + __lll_private_flag (FUTEX_WAKE, private), \ + (nr), 0); \ INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret : __ret; \ }) @@ -72,7 +101,7 @@ { \ int *__futexp = &(futexv); \ atomic_or (__futexp, FUTEX_OWNER_DIED); \ - lll_futex_wake (__futexp, 1); \ + lll_futex_wake (__futexp, 1, LLL_SHARED); \ } \ while (0) @@ -198,7 +227,7 @@ __lll_mutex_unlock (int *futex) { int val = atomic_exchange_rel (futex, 0); if (__builtin_expect (val > 1, 0)) - lll_futex_wake (futex, 1); + lll_futex_wake (futex, 1, LLL_SHARED); } #define lll_mutex_unlock(futex) __lll_mutex_unlock(&(futex)) @@ -208,7 +237,7 @@ __lll_robust_mutex_unlock (int *futex, int mask) { int val = atomic_exchange_rel (futex, 0); if (__builtin_expect (val & mask, 0)) - lll_futex_wake (futex, 1); + lll_futex_wake (futex, 1, LLL_SHARED); } #define lll_robust_mutex_unlock(futex) \ __lll_robust_mutex_unlock(&(futex), FUTEX_WAITERS) @@ -218,7 +247,7 @@ static inline void __attribute__ ((always_inline)) __lll_mutex_unlock_force (int *futex) { (void) atomic_exchange_rel (futex, 0); - lll_futex_wake (futex, 1); + lll_futex_wake (futex, 1, LLL_SHARED); } #define lll_mutex_unlock_force(futex) __lll_mutex_unlock_force(&(futex)) @@ -252,10 +281,10 @@ typedef int lll_lock_t; thread ID while the clone is running and is reset to zero afterwards. */ #define lll_wait_tid(tid) \ - do { \ - __typeof (tid) __tid; \ - while ((__tid = (tid)) != 0) \ - lll_futex_wait (&(tid), __tid); \ + do { \ + __typeof (tid) __tid; \ + while ((__tid = (tid)) != 0) \ + lll_futex_wait (&(tid), __tid, LLL_SHARED); \ } while (0) extern int __lll_timedwait_tid (int *, const struct timespec *) From b599860dc82a3a3eb2744d6ba4917ef2a2f5ba47 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Sat, 28 Jul 2007 21:26:44 +0000 Subject: [PATCH 3727/4487] 2007-07-28 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/nptl/internaltypes.h: Remove. * sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h (pthread_rwlock_t): Split __flags into __pad2, __pad1, __shared, and __flags. Update comments. Update copyright. * sysdeps/hppa/nptl/tls.h: Define THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED, THREAD_GSOPE_FLAG_WAIT, THREAD_GSCOPE_RSEET_FLAG, THREAD_GSCOPE_SET_FLAG, THREAD_GSCOPE_WAIT. Update copyright. * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c: Update copyright. (__lll_lock_wait): Call lll_futex_wait with LLL_SHARED. (__lll_timedlock_wait): Call lll_futex_timed_wait with LLL_SHARED. (lll_unlock_Wake_cb): Use lll_private_futex_wake. (___lll_timedwait_tid): Call lll_futex_timed_wait with LLL_SAHRED. * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: Define FUTEX_PRIVATE_FLAG, LLL_PRIVATE, LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait, lll_private_Futex_wake. Add private argument to lll_futex_wait, lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock. * sysdeps/unix/sysv/linux/hppa/nptl/pthread_once.c: Update copyright. (clear_once_control): Use lll_private_futex_wake. (__pthread_once): Use lll_private_futex_wait, and lll_private_futex_wake. 2007-07-28 Randolph Chung * sysdeps/hppa/nptl/tls.h (DB_THREAD_SELF): Fix definition. --- ChangeLog.hppa | 31 +++- sysdeps/hppa/nptl/tls.h | 34 +++- .../sysv/linux/hppa/nptl/bits/pthreadtypes.h | 18 ++- .../unix/sysv/linux/hppa/nptl/internaltypes.h | 153 ------------------ .../unix/sysv/linux/hppa/nptl/lowlevellock.c | 10 +- .../unix/sysv/linux/hppa/nptl/lowlevellock.h | 82 ++++++++-- .../unix/sysv/linux/hppa/nptl/pthread_once.c | 8 +- 7 files changed, 145 insertions(+), 191 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/hppa/nptl/internaltypes.h diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 967dadfb16..ff0a7a4830 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,4 +1,33 @@ -2006-07-16 Jeff Bailey +2007-07-28 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/nptl/internaltypes.h: Remove. + * sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h + (pthread_rwlock_t): Split __flags into __pad2, __pad1, __shared, + and __flags. Update comments. Update copyright. + * sysdeps/hppa/nptl/tls.h: Define THREAD_GSCOPE_FLAG_UNUSED, + THREAD_GSCOPE_FLAG_USED, THREAD_GSOPE_FLAG_WAIT, + THREAD_GSCOPE_RSEET_FLAG, THREAD_GSCOPE_SET_FLAG, THREAD_GSCOPE_WAIT. + Update copyright. + * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c: Update copyright. + (__lll_lock_wait): Call lll_futex_wait with LLL_SHARED. + (__lll_timedlock_wait): Call lll_futex_timed_wait with LLL_SHARED. + (lll_unlock_Wake_cb): Use lll_private_futex_wake. + (___lll_timedwait_tid): Call lll_futex_timed_wait with LLL_SAHRED. + * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: Define + FUTEX_PRIVATE_FLAG, LLL_PRIVATE, LLL_SHARED, lll_private_futex_wait, + lll_private_futex_timed_wait, lll_private_Futex_wake. Add private + argument to lll_futex_wait, lll_futex_timed_wait, lll_futex_wake, + lll_futex_wake_unlock. + * sysdeps/unix/sysv/linux/hppa/nptl/pthread_once.c: Update copyright. + (clear_once_control): Use lll_private_futex_wake. + (__pthread_once): Use lll_private_futex_wait, and + lll_private_futex_wake. + +2007-07-28 Randolph Chung + + * sysdeps/hppa/nptl/tls.h (DB_THREAD_SELF): Fix definition. + +2007-06-16 Jeff Bailey * sysdeps/unix/sysv/linux/hppa/sys/procfs.h: Don't include asm/elf.h. Declare elf_greg_t, elf_gregset_t, diff --git a/sysdeps/hppa/nptl/tls.h b/sysdeps/hppa/nptl/tls.h index 0759aec8f0..d2d725e3b5 100644 --- a/sysdeps/hppa/nptl/tls.h +++ b/sysdeps/hppa/nptl/tls.h @@ -1,5 +1,5 @@ /* Definition for thread-local data handling. NPTL/hppa version. - Copyright (C) 2005 Free Software Foundation, Inc. + Copyright (C) 2005, 2007 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 @@ -117,11 +117,12 @@ typedef struct __self - 1; \ }) -/* FIXME */ -/* Magic for libthread_db to know how to do THREAD_SELF. */ +/* Magic for libthread_db to know how to do THREAD_SELF. + Our thread pointer is stored in cr27. See asm/elf.h for the offset into + elf_gregset_t. The thread descriptor is sizeof (struct pthread) away. */ # define DB_THREAD_SELF \ - REGISTER (32, 32, 32 * 4, -sizeof (struct pthread)) - + REGISTER (32, 32, 53 * 4, -sizeof (struct pthread)) + /* Access to data in the thread descriptor is easy. */ # define THREAD_GETMEM(descr, member) \ descr->member @@ -146,6 +147,29 @@ static inline void __set_cr27(struct pthread *cr27) : : "r" (cr27) : "r26" ); } +/* Get and set the global scope generation counter in struct pthread. */ +#define THREAD_GSCOPE_FLAG_UNUSED 0 +#define THREAD_GSCOPE_FLAG_USED 1 +#define THREAD_GSCOPE_FLAG_WAIT 2 +#define THREAD_GSCOPE_RESET_FLAG() \ + do \ + { int __res \ + = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \ + THREAD_GSCOPE_FLAG_UNUSED); \ + if (__res == THREAD_GSCOPE_FLAG_WAIT) \ + lll_private_futex_wake (&THREAD_SELF->header.gscope_flag, 1); \ + } \ + while (0) +#define THREAD_GSCOPE_SET_FLAG() \ + do \ + { \ + THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \ + atomic_write_barrier (); \ + } \ + while (0) +#define THREAD_GSCOPE_WAIT() \ + GL(dl_wait_lookup_done) () + #endif /* __ASSEMBLER__ */ #endif /* tls.h */ diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h index e1c5325c0d..62fc80cc5a 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h +++ b/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2005, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2005, 2006, 2007 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 @@ -19,13 +19,14 @@ #ifndef _BITS_PTHREADTYPES_H #define _BITS_PTHREADTYPES_H 1 -/* Linuxthread type sizes: +/* Linuxthread type sizes (bytes): sizeof(pthread_attr_t) = 0x24 (36) sizeof(pthread_mutex_t) = 0x30 (48) sizeof(pthread_mutexattr_t) = 0x4 (4) sizeof(pthread_cond_t) = 0x30 (48) - = Grew to 64 bytes in NPTL. - No pthread_cond_compat_t ... + = Expanded to 64 bytes in NPTL. + sizeof(pthread_cond_compat_t) = 0xc (12) + = Did not exist in Linuxthreads. sizeof(pthread_condattr_t) = 0x4 (4) sizeof(pthread_rwlock_t) = 0x40 (64) sizeof(pthread_rwlockattr_t) = 0x8 (8) @@ -52,9 +53,9 @@ typedef unsigned long int pthread_t; implementation. For NPTL we use LWS Compare and Exchange to implement primitives. */ #if 0 -typedef struct { +typedef volatile struct { int lock[4]; -} __atomic_lock_t; +} __attribute__ ((aligned(16))) __atomic_lock_t; #endif typedef union @@ -149,7 +150,10 @@ typedef union unsigned int __nr_writers_queued; /* FLAGS must stay at this position in the structure to maintain binary compatibility. */ - unsigned int __flags; + unsigned char __pad2; + unsigned char __pad1; + unsigned char __shared; + unsigned char __flags; int __writer; } __data; char __size[__SIZEOF_PTHREAD_RWLOCK_T]; diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/internaltypes.h b/sysdeps/unix/sysv/linux/hppa/nptl/internaltypes.h deleted file mode 100644 index 528c2a7d9f..0000000000 --- a/sysdeps/unix/sysv/linux/hppa/nptl/internaltypes.h +++ /dev/null @@ -1,153 +0,0 @@ -/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2002. - - 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 _INTERNALTYPES_H -#define _INTERNALTYPES_H 1 - -#include - - -struct pthread_attr -{ - /* Scheduler parameters and priority. */ - struct sched_param schedparam; - int schedpolicy; - /* Various flags like detachstate, scope, etc. */ - int flags; - /* Size of guard area. */ - size_t guardsize; - /* Stack handling. */ - void *stackaddr; - size_t stacksize; - /* Affinity map. */ - cpu_set_t *cpuset; - size_t cpusetsize; -}; - -#define ATTR_FLAG_DETACHSTATE 0x0001 -#define ATTR_FLAG_NOTINHERITSCHED 0x0002 -#define ATTR_FLAG_SCOPEPROCESS 0x0004 -#define ATTR_FLAG_STACKADDR 0x0008 -#define ATTR_FLAG_OLDATTR 0x0010 -#define ATTR_FLAG_SCHED_SET 0x0020 -#define ATTR_FLAG_POLICY_SET 0x0040 - - -/* Mutex attribute data structure. */ -struct pthread_mutexattr -{ - /* Identifier for the kind of mutex. - - Bit 31 is set if the mutex is to be shared between processes. - - Bit 0 to 30 contain one of the PTHREAD_MUTEX_ values to identify - the type of the mutex. */ - int mutexkind; -}; - - -/* Conditional variable attribute data structure. */ -struct pthread_condattr -{ - /* Combination of values: - - Bit 0 : flag whether coditional variable will be shareable between - processes. - - Bit 1-7: clock ID. */ - int value; -}; - - -/* The __NWAITERS field is used as a counter and to house the number - of bits which represent the clock. COND_CLOCK_BITS is the number - of bits reserved for the clock. */ -#define COND_CLOCK_BITS 1 - - -/* Read-write lock variable attribute data structure. */ -struct pthread_rwlockattr -{ - int lockkind; - int pshared; -}; - - -/* Barrier data structure. */ -struct pthread_barrier -{ - unsigned int curr_event; - int lock; - unsigned int left; - unsigned int init_count; -}; - - -/* Barrier variable attribute data structure. */ -struct pthread_barrierattr -{ - int pshared; -}; - - -/* Thread-local data handling. */ -struct pthread_key_struct -{ - /* Sequence numbers. Even numbers indicated vacant entries. Note - that zero is even. We use uintptr_t to not require padding on - 32- and 64-bit machines. On 64-bit machines it helps to avoid - wrapping, too. */ - uintptr_t seq; - - /* Destructor for the data. */ - void (*destr) (void *); -}; - -/* Check whether an entry is unused. */ -#define KEY_UNUSED(p) (((p) & 1) == 0) -/* Check whether a key is usable. We cannot reuse an allocated key if - the sequence counter would overflow after the next destroy call. - This would mean that we potentially free memory for a key with the - same sequence. This is *very* unlikely to happen, A program would - have to create and destroy a key 2^31 times (on 32-bit platforms, - on 64-bit platforms that would be 2^63). If it should happen we - simply don't use this specific key anymore. */ -#define KEY_USABLE(p) (((uintptr_t) (p)) < ((uintptr_t) ((p) + 2))) - - -/* Handling of read-write lock data. */ -// XXX For now there is only one flag. Maybe more in future. -#define RWLOCK_RECURSIVE(rwlock) ((rwlock)->__data.__flags != 0) - - -/* Semaphore variable structure. */ -struct sem -{ - unsigned int count; -}; - - -/* Compatibility type for old conditional variable interfaces. */ -typedef struct -{ - pthread_cond_t *cond; -} pthread_cond_2_0_t; - -#endif /* internaltypes.h */ - diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c index d2919ee464..236d29c1fa 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c +++ b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c @@ -1,5 +1,5 @@ /* low level locking for pthread library. Generic futex-using version. - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2003, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Paul Mackerras , 2003. @@ -31,7 +31,7 @@ __lll_lock_wait (lll_lock_t *futex) { int oldval = atomic_compare_and_exchange_val_acq (futex, 2, 1); if (oldval != 0) - lll_futex_wait (futex, 2); + lll_futex_wait (futex, 2, LLL_SHARED); } while (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0); } @@ -68,7 +68,7 @@ __lll_timedlock_wait (lll_lock_t *futex, const struct timespec *abstime) /* Wait. */ int oldval = atomic_compare_and_exchange_val_acq (futex, 2, 1); if (oldval != 0) - lll_futex_timed_wait (futex, 2, &rt); + lll_futex_timed_wait (futex, 2, &rt, LLL_SHARED); } while (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0); return 0; @@ -83,7 +83,7 @@ lll_unlock_wake_cb (lll_lock_t *futex) int val = atomic_exchange_rel (futex, 0); if (__builtin_expect (val > 1, 0)) - lll_futex_wake (futex, 1); + lll_private_futex_wake (futex, 1); return 0; } @@ -119,7 +119,7 @@ __lll_timedwait_tid (int *tidp, const struct timespec *abstime) return ETIMEDOUT; /* Wait until thread terminates. */ - if (lll_futex_timed_wait (tidp, tid, &rt) == -ETIMEDOUT) + if (lll_futex_timed_wait (tidp, tid, &rt, LLL_SHARED) == -ETIMEDOUT) return ETIMEDOUT; } diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h index 3b2b0f1adb..f8a9555baf 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2005, 2007 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 @@ -39,6 +39,13 @@ #define FUTEX_LOCK_PI 6 #define FUTEX_UNLOCK_PI 7 #define FUTEX_TRYLOCK_PI 8 +#define FUTEX_PRIVATE_FLAG 128 + +/* Values for 'private' parameter of locking macros. Yes, the + definition seems to be backwards. But it is not. The bit will be + reversed before passing to the system call. */ +#define LLL_PRIVATE 0 +#define LLL_SHARED FUTEX_PRIVATE_FLAG /* Initialize locks to zero. */ #define LLL_MUTEX_LOCK_INITIALIZER (0) @@ -48,39 +55,82 @@ typedef int lll_lock_t; -#define lll_futex_wait(futexp, val) \ +#define lll_futex_wait(futexp, val, private) \ + lll_futex_timed_wait (futexp, val, 0, private) + +#define lll_futex_timed_wait(futexp, val, timespec, private) \ ({ \ INTERNAL_SYSCALL_DECL (__err); \ long int __ret; \ __ret = INTERNAL_SYSCALL (futex, __err, 4, \ - (futexp), FUTEX_WAIT, (val), 0); \ + (futexp), FUTEX_WAIT, (val), (timespec)); \ __ret; \ }) -#define lll_futex_timed_wait(futexp, val, timespec) \ +#define lll_futex_wake(futexp, nr, private) \ ({ \ INTERNAL_SYSCALL_DECL (__err); \ long int __ret; \ __ret = INTERNAL_SYSCALL (futex, __err, 4, \ - (futexp), FUTEX_WAIT, (val), (timespec)); \ + (futexp), FUTEX_WAKE, (nr), 0); \ __ret; \ }) -#define lll_futex_wake(futexp, nr) \ +#define lll_private_futex_wait(futex, val) \ + lll_private_futex_timed_wait (futex, val, NULL) + +#ifdef __ASSUME_PRIVATE_FUTEX +# define lll_private_futex_timed_wait(futex, val, timeout) \ ({ \ INTERNAL_SYSCALL_DECL (__err); \ long int __ret; \ __ret = INTERNAL_SYSCALL (futex, __err, 4, \ - (futexp), FUTEX_WAKE, (nr), 0); \ + (futexp), FUTEX_WAIT | FUTEX_PRIVATE_FLAG, \ + (val), (timespec)); \ __ret; \ }) +# define lll_private_futex_wake(futexp, nr) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + __ret = INTERNAL_SYSCALL (futex, __err, 4, \ + (futexp), FUTEX_WAKE | FUTEX_PRIVATE_FLAG, \ + (nr), 0); \ + __ret; \ + }) + +#else + +# define lll_private_futex_timed_wait(futexp, val, timespec) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret, __op; \ + __op = FUTEX_WAIT | THREAD_GETMEM (THREAD_SELF, header.private_futex); \ + __ret = INTERNAL_SYSCALL (futex, __err, 4, \ + (futexp), __op, (val), (timespec)); \ + __ret; \ + }) + +# define lll_private_futex_wake(futexp, nr) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret, __op; \ + __op = FUTEX_WAKE | THREAD_GETMEM (THREAD_SELF, header.private_futex); \ + __ret = INTERNAL_SYSCALL (futex, __err, 4, \ + (futexp), __op, (nr), 0); \ + __ret; \ + }) +#endif + + + #define lll_robust_mutex_dead(futexv) \ do \ { \ int *__futexp = &(futexv); \ atomic_or (__futexp, FUTEX_OWNER_DIED); \ - lll_futex_wake (__futexp, 1); \ + lll_futex_wake (__futexp, 1, 0); \ } \ while (0) @@ -96,7 +146,7 @@ typedef int lll_lock_t; }) /* Returns non-zero if error happened, zero if success. */ -#define lll_futex_wake_unlock(futexp, nr_wake, nr_wake2, futexp2) \ +#define lll_futex_wake_unlock(futexp, nr_wake, nr_wake2, futexp2, private) \ ({ \ INTERNAL_SYSCALL_DECL (__err); \ long int __ret; \ @@ -201,7 +251,7 @@ __lll_mutex_unlock (lll_lock_t *futex) { int val = atomic_exchange_rel (futex, 0); if (__builtin_expect (val > 1, 0)) - lll_futex_wake (futex, 1); + lll_futex_wake (futex, 1, 0); } #define lll_mutex_unlock(futex) __lll_mutex_unlock(&(futex)) @@ -211,7 +261,7 @@ __lll_robust_mutex_unlock (int *futex, int mask) { int val = atomic_exchange_rel (futex, 0); if (__builtin_expect (val & mask, 0)) - lll_futex_wake (futex, 1); + lll_futex_wake (futex, 1, 0); } #define lll_robust_mutex_unlock(futex) \ __lll_robust_mutex_unlock(&(futex), FUTEX_WAITERS) @@ -221,7 +271,7 @@ static inline void __attribute__ ((always_inline)) __lll_mutex_unlock_force (lll_lock_t *futex) { (void) atomic_exchange_rel (futex, 0); - lll_futex_wake (futex, 1); + lll_futex_wake (futex, 1, 0); } #define lll_mutex_unlock_force(futex) __lll_mutex_unlock_force(&(futex)) @@ -256,10 +306,10 @@ extern int lll_unlock_wake_cb (lll_lock_t *__futex) attribute_hidden; thread ID while the clone is running and is reset to zero afterwards. */ #define lll_wait_tid(tid) \ - do { \ - __typeof (tid) __tid; \ - while ((__tid = (tid)) != 0) \ - lll_futex_wait (&(tid), __tid); \ + do { \ + __typeof (tid) __tid; \ + while ((__tid = (tid)) != 0) \ + lll_futex_wait (&(tid), __tid, 0); \ } while (0) extern int __lll_timedwait_tid (int *, const struct timespec *) diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pthread_once.c b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_once.c index 649b752f54..b89e40c2e3 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/pthread_once.c +++ b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_once.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2005, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek , 2003. @@ -30,7 +30,7 @@ clear_once_control (void *arg) pthread_once_t *once_control = (pthread_once_t *) arg; *once_control = 0; - lll_futex_wake (once_control, INT_MAX); + lll_private_futex_wake (once_control, INT_MAX); } @@ -65,7 +65,7 @@ __pthread_once (once_control, init_routine) if (((oldval ^ newval) & -4) == 0) { /* Same generation, some other thread was faster. Wait. */ - lll_futex_wait (once_control, newval); + lll_private_futex_wait (once_control, newval); continue; } } @@ -84,7 +84,7 @@ __pthread_once (once_control, init_routine) atomic_increment (once_control); /* Wake up all other threads. */ - lll_futex_wake (once_control, INT_MAX); + lll_private_futex_wake (once_control, INT_MAX); break; } From 5cfc3d44a502385d891820c7c5b17252eff994fa Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 1 Aug 2007 04:21:31 +0000 Subject: [PATCH 3728/4487] Renamed all lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp. lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_* inline functions to __lll_* resp. __lll_robust_*. (LLL_MUTEX_LOCK_INITIALIZER): Remove. (lll_mutex_dead): Add private argument. (__lll_lock_wait_private): New prototype. (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait, __lll_robust_lock_timedwait): Add private argument to prototypes. (__lll_lock): Add private argument, if it is constant LLL_PRIVATE, call __lll_lock_wait_private, otherwise pass private to __lll_lock_wait. (__lll_robust_lock, __lll_cond_lock, __lll_timedlock, __lll_robust_timedlock): Add private argument, pass it to __lll_*wait functions. (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE, call __lll_unlock_wake_private, otherwise pass private to __lll_unlock_wake. (__lll_robust_unlock): Add private argument, pass it to __lll_robust_unlock_wake. (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock, lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private argument, pass it through to __lll_* inline function. (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove. (lll_lock_t): Remove. (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake, __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait, lll_cond_wake, lll_cond_broadcast): Remove. --- .../unix/sysv/linux/alpha/nptl/lowlevellock.h | 142 ++++++------------ 1 file changed, 49 insertions(+), 93 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h index 5f08673c43..f3f291979a 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h @@ -70,9 +70,6 @@ #endif -/* Initializer for compatibility lock. */ -#define LLL_MUTEX_LOCK_INITIALIZER (0) - #define lll_futex_wait(futexp, val, private) \ lll_futex_timed_wait (futexp, val, NULL, private) @@ -96,7 +93,7 @@ INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret : __ret; \ }) -#define lll_robust_mutex_dead(futexv) \ +#define lll_robust_dead(futexv) \ do \ { \ int *__futexp = &(futexv); \ @@ -132,149 +129,130 @@ static inline int __attribute__((always_inline)) -__lll_mutex_trylock(int *futex) +__lll_trylock(int *futex) { return atomic_compare_and_exchange_val_acq (futex, 1, 0) != 0; } -#define lll_mutex_trylock(lock) __lll_mutex_trylock (&(lock)) +#define lll_trylock(lock) __lll_trylock (&(lock)) static inline int __attribute__((always_inline)) -__lll_mutex_cond_trylock(int *futex) +__lll_cond_trylock(int *futex) { return atomic_compare_and_exchange_val_acq (futex, 2, 0) != 0; } -#define lll_mutex_cond_trylock(lock) __lll_mutex_cond_trylock (&(lock)) +#define lll_cond_trylock(lock) __lll_cond_trylock (&(lock)) static inline int __attribute__((always_inline)) -__lll_robust_mutex_trylock(int *futex, int id) +__lll_robust_trylock(int *futex, int id) { return atomic_compare_and_exchange_val_acq (futex, id, 0) != 0; } -#define lll_robust_mutex_trylock(lock, id) \ - __lll_robust_mutex_trylock (&(lock), id) +#define lll_robust_trylock(lock, id) \ + __lll_robust_trylock (&(lock), id) -extern void __lll_lock_wait (int *futex) attribute_hidden; -extern int __lll_robust_lock_wait (int *futex) attribute_hidden; +extern void __lll_lock_wait_private (int *futex) attribute_hidden; +extern void __lll_lock_wait (int *futex, int private) attribute_hidden; +extern int __lll_robust_lock_wait (int *futex, int private) attribute_hidden; static inline void __attribute__((always_inline)) -__lll_mutex_lock(int *futex) +__lll_lock(int *futex, int private) { if (atomic_compare_and_exchange_bool_acq (futex, 1, 0) != 0) - __lll_lock_wait (futex); + { + if (__builtin_constant_p (private) && private == LLL_PRIVATE) + __lll_lock_wait_private (futex); + else + __lll_lock_wait (futex, private); + } } -#define lll_mutex_lock(futex) __lll_mutex_lock (&(futex)) +#define lll_lock(futex, private) __lll_lock (&(futex), private) static inline int __attribute__ ((always_inline)) -__lll_robust_mutex_lock (int *futex, int id) +__lll_robust_lock (int *futex, int id, int private) { int result = 0; if (atomic_compare_and_exchange_bool_acq (futex, id, 0) != 0) - result = __lll_robust_lock_wait (futex); + result = __lll_robust_lock_wait (futex, private); return result; } -#define lll_robust_mutex_lock(futex, id) \ - __lll_robust_mutex_lock (&(futex), id) +#define lll_robust_lock(futex, id, private) \ + __lll_robust_lock (&(futex), id, private) static inline void __attribute__ ((always_inline)) -__lll_mutex_cond_lock (int *futex) +__lll_cond_lock (int *futex, int private) { if (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0) - __lll_lock_wait (futex); + __lll_lock_wait (futex, private); } -#define lll_mutex_cond_lock(futex) __lll_mutex_cond_lock (&(futex)) +#define lll_cond_lock(futex, private) __lll_cond_lock (&(futex), private) -#define lll_robust_mutex_cond_lock(futex, id) \ - __lll_robust_mutex_lock (&(futex), (id) | FUTEX_WAITERS) +#define lll_robust_cond_lock(futex, id, private) \ + __lll_robust_lock (&(futex), (id) | FUTEX_WAITERS, private) -extern int __lll_timedlock_wait (int *futex, const struct timespec *) - attribute_hidden; -extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *) - attribute_hidden; +extern int __lll_timedlock_wait (int *futex, const struct timespec *, + int private) attribute_hidden; +extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *, + int private) attribute_hidden; static inline int __attribute__ ((always_inline)) -__lll_mutex_timedlock (int *futex, const struct timespec *abstime) +__lll_timedlock (int *futex, const struct timespec *abstime, int private) { int result = 0; if (atomic_compare_and_exchange_bool_acq (futex, 1, 0) != 0) - result = __lll_timedlock_wait (futex, abstime); + result = __lll_timedlock_wait (futex, abstime, private); return result; } -#define lll_mutex_timedlock(futex, abstime) \ - __lll_mutex_timedlock (&(futex), abstime) +#define lll_timedlock(futex, abstime, private) \ + __lll_timedlock (&(futex), abstime, private) static inline int __attribute__ ((always_inline)) -__lll_robust_mutex_timedlock (int *futex, const struct timespec *abstime, - int id) +__lll_robust_timedlock (int *futex, const struct timespec *abstime, + int id, int private) { int result = 0; if (atomic_compare_and_exchange_bool_acq (futex, id, 0) != 0) result = __lll_robust_timedlock_wait (futex, abstime); return result; } -#define lll_robust_mutex_timedlock(futex, abstime, id) \ - __lll_robust_mutex_timedlock (&(futex), abstime, id) +#define lll_robust_timedlock(futex, abstime, id, private) \ + __lll_robust_timedlock (&(futex), abstime, id, private) static inline void __attribute__ ((always_inline)) -__lll_mutex_unlock (int *futex) +__lll_unlock (int *futex, int private) { int val = atomic_exchange_rel (futex, 0); if (__builtin_expect (val > 1, 0)) - lll_futex_wake (futex, 1, LLL_SHARED); + lll_futex_wake (futex, 1, private); } -#define lll_mutex_unlock(futex) __lll_mutex_unlock(&(futex)) +#define lll_unlock(futex, private) __lll_unlock(&(futex), private) static inline void __attribute__ ((always_inline)) -__lll_robust_mutex_unlock (int *futex, int mask) +__lll_robust_unlock (int *futex, int private) { int val = atomic_exchange_rel (futex, 0); - if (__builtin_expect (val & mask, 0)) - lll_futex_wake (futex, 1, LLL_SHARED); + if (__builtin_expect (val & FUTEX_WAITERS, 0)) + lll_futex_wake (futex, 1, private); } -#define lll_robust_mutex_unlock(futex) \ - __lll_robust_mutex_unlock(&(futex), FUTEX_WAITERS) - +#define lll_robust_unlock(futex, private) \ + __lll_robust_unlock(&(futex), private) -static inline void __attribute__ ((always_inline)) -__lll_mutex_unlock_force (int *futex) -{ - (void) atomic_exchange_rel (futex, 0); - lll_futex_wake (futex, 1, LLL_SHARED); -} -#define lll_mutex_unlock_force(futex) __lll_mutex_unlock_force(&(futex)) - -#define lll_mutex_islocked(futex) \ +#define lll_islocked(futex) \ (futex != 0) - -/* Our internal lock implementation is identical to the binary-compatible - mutex implementation. */ - -/* Type for lock object. */ -typedef int lll_lock_t; - /* Initializers for lock. */ #define LLL_LOCK_INITIALIZER (0) #define LLL_LOCK_INITIALIZER_LOCKED (1) -/* The states of a lock are: - 0 - untaken - 1 - taken by one user - >1 - taken by more users */ - -#define lll_trylock(lock) lll_mutex_trylock (lock) -#define lll_lock(lock) lll_mutex_lock (lock) -#define lll_unlock(lock) lll_mutex_unlock (lock) -#define lll_islocked(lock) lll_mutex_islocked (lock) /* The kernel notifies a process which uses CLONE_CLEARTID via futex wakeup when the clone terminates. The memory location contains the @@ -298,26 +276,4 @@ extern int __lll_timedwait_tid (int *, const struct timespec *) __res; \ }) - -/* Conditional variable handling. */ - -extern void __lll_cond_wait (pthread_cond_t *cond) - attribute_hidden; -extern int __lll_cond_timedwait (pthread_cond_t *cond, - const struct timespec *abstime) - attribute_hidden; -extern void __lll_cond_wake (pthread_cond_t *cond) - attribute_hidden; -extern void __lll_cond_broadcast (pthread_cond_t *cond) - attribute_hidden; - -#define lll_cond_wait(cond) \ - __lll_cond_wait (cond) -#define lll_cond_timedwait(cond, abstime) \ - __lll_cond_timedwait (cond, abstime) -#define lll_cond_wake(cond) \ - __lll_cond_wake (cond) -#define lll_cond_broadcast(cond) \ - __lll_cond_broadcast (cond) - #endif /* lowlevellock.h */ From 57165d450fbbdeb38c80d19bc96c20d3b4ecf581 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Fri, 3 Aug 2007 22:58:57 +0000 Subject: [PATCH 3729/4487] 2007-08-03 Aurelien Jarno * sysdeps/unix/sysv/linux/hppa/linuxthreads/sysdep-cancel.h: (__local_multiple_threads): Declare as hidden only in libc and in libpthread. --- ChangeLog.hppa | 6 ++++++ sysdeps/unix/sysv/linux/hppa/linuxthreads/sysdep-cancel.h | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index ff0a7a4830..7bb338751a 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,9 @@ +2007-08-03 Aurelien Jarno + + * sysdeps/unix/sysv/linux/hppa/linuxthreads/sysdep-cancel.h: + (__local_multiple_threads): Declare as hidden only in libc and + in libpthread. + 2007-07-28 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/nptl/internaltypes.h: Remove. diff --git a/sysdeps/unix/sysv/linux/hppa/linuxthreads/sysdep-cancel.h b/sysdeps/unix/sysv/linux/hppa/linuxthreads/sysdep-cancel.h index e01936a3db..51d6cf3943 100644 --- a/sysdeps/unix/sysv/linux/hppa/linuxthreads/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/hppa/linuxthreads/sysdep-cancel.h @@ -206,7 +206,11 @@ L(pre_end): ASM_LINE_SEP \ # endif # ifndef __ASSEMBLER__ - extern int __local_multiple_threads attribute_hidden; +# if !defined NOT_IN_libc || defined IS_IN_libpthread +extern int __local_multiple_threads attribute_hidden; +# else +extern int __local_multiple_threads; +# endif # define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1) # else /* This ALT version requires newer kernel support */ From d45a63687733a9e9029d8a336c3918d19a320a7b Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Mon, 6 Aug 2007 17:45:09 +0000 Subject: [PATCH 3730/4487] * sysdeps/unix/sysv/linux/mips/dl-cache.h (_DL_CACHE_DEFAULT_ID): New macros for the (n)64 and n32 ABIs. (_dl_cache_check_flags): Define if _DL_CACHE_DEFAULT_ID has been. --- ChangeLog.mips | 6 ++++++ sysdeps/unix/sysv/linux/mips/dl-cache.h | 16 +++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 43aadf8d39..3216e73d57 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,9 @@ +2007-08-06 Maciej W. Rozycki + + * sysdeps/unix/sysv/linux/mips/dl-cache.h (_DL_CACHE_DEFAULT_ID): + New macros for the (n)64 and n32 ABIs. + (_dl_cache_check_flags): Define if _DL_CACHE_DEFAULT_ID has been. + 2007-07-13 Carlos O'Donell * sysdeps/mips/bits/wordsize.h [_MIPS_SIM == _ABI64]: diff --git a/sysdeps/unix/sysv/linux/mips/dl-cache.h b/sysdeps/unix/sysv/linux/mips/dl-cache.h index 4fa5d3ad22..9f0e4d28ef 100644 --- a/sysdeps/unix/sysv/linux/mips/dl-cache.h +++ b/sysdeps/unix/sysv/linux/mips/dl-cache.h @@ -1,5 +1,5 @@ /* Support for reading /etc/ld.so.cache files written by Linux ldconfig. - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2003, 2007 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 @@ -17,6 +17,20 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include + +/* Redefine the cache ID for new ABIs; o32 keeps using the generic check. */ +#if _MIPS_SIM == _ABI64 +# define _DL_CACHE_DEFAULT_ID (FLAG_MIPS64_LIBN64 | FLAG_ELF_LIBC6) +#elif _MIPS_SIM == _ABIN32 +# define _DL_CACHE_DEFAULT_ID (FLAG_MIPS64_LIBN32 | FLAG_ELF_LIBC6) +#endif + +#ifdef _DL_CACHE_DEFAULT_ID +# define _dl_cache_check_flags(flags) \ + ((flags) == _DL_CACHE_DEFAULT_ID) +#endif + #define add_system_dir(dir) \ do \ { \ From 1bf120f61eae0d9c10ae43a4101783ee02de0c10 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 10 Aug 2007 01:44:09 +0000 Subject: [PATCH 3731/4487] (O_CLOEXEC): Define. --- sysdeps/unix/sysv/linux/alpha/bits/fcntl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h index f17dc2bdc1..b4f49cf633 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 1995-2000, 2004, 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 1995-2000,2004,2005,2006,2007 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 @@ -50,6 +50,7 @@ # define O_NOFOLLOW 0200000 /* Do not follow links. */ # define O_DIRECT 02000000 /* Direct disk access. */ # define O_NOATIME 04000000 /* Do not set atime. */ +# define O_CLOEXEC 010000000 /* Set close_on_exec. */ #endif #ifdef __USE_LARGEFILE64 From 78727e1194372d2fde23946ee5adc23ba2eb765e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 11 Aug 2007 18:47:31 +0000 Subject: [PATCH 3732/4487] (lll_futex_requeue, lll_futex_wake_unlock): Add private argument, use __lll_private_flag macro. --- .../unix/sysv/linux/alpha/nptl/lowlevellock.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h index f3f291979a..ab829ad7af 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h @@ -103,24 +103,24 @@ while (0) /* Returns non-zero if error happened, zero if success. */ -#define lll_futex_requeue(futexp, nr_wake, nr_move, mutex, val) \ +#define lll_futex_requeue(futexp, nr_wake, nr_move, mutex, val, private) \ ({ \ INTERNAL_SYSCALL_DECL (__err); \ long int __ret; \ - __ret = INTERNAL_SYSCALL (futex, __err, 6, \ - (futexp), FUTEX_CMP_REQUEUE, (nr_wake), \ - (nr_move), (mutex), (val)); \ + __ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp), \ + __lll_private_flag (FUTEX_CMP_REQUEUE, private),\ + (nr_wake), (nr_move), (mutex), (val)); \ INTERNAL_SYSCALL_ERROR_P (__ret, __err); \ }) /* Returns non-zero if error happened, zero if success. */ -#define lll_futex_wake_unlock(futexp, nr_wake, nr_wake2, futexp2) \ +#define lll_futex_wake_unlock(futexp, nr_wake, nr_wake2, futexp2, private) \ ({ \ INTERNAL_SYSCALL_DECL (__err); \ long int __ret; \ - __ret = INTERNAL_SYSCALL (futex, __err, 6, \ - (futexp), FUTEX_WAKE_OP, (nr_wake), \ - (nr_wake2), (futexp2), \ + __ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp), \ + __lll_private_flag (FUTEX_WAKE_OP, private), \ + (nr_wake), (nr_wake2), (futexp2), \ FUTEX_OP_CLEAR_WAKE_IF_GT_ONE); \ INTERNAL_SYSCALL_ERROR_P (__ret, __err); \ }) From 5f9107929d0b9dbf46cb45735620eae3f1566278 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 12 Aug 2007 19:39:31 +0000 Subject: [PATCH 3733/4487] (pthread_rwlock_t): Renamed __pad1 element to __shared, adjust names of other padding elements. --- sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h index 41a54d4b0d..41c0be1978 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h @@ -1,5 +1,5 @@ /* Machine-specific pthread type layouts. Alpha version. - Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 2003, 2004, 2005, 2006, 2007 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 @@ -126,9 +126,9 @@ typedef union unsigned int __nr_readers_queued; unsigned int __nr_writers_queued; int __writer; - int __pad1; + int __shared; + unsigned long int __pad1; unsigned long int __pad2; - unsigned long int __pad3; /* FLAGS must stay at this position in the structure to maintain binary compatibility. */ unsigned int __flags; From 639aa6011e81384ae88d0356682e8ef20e1de6ab Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 13 Aug 2007 18:33:00 +0000 Subject: [PATCH 3734/4487] Include kernel-features.h. --- sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h index ab829ad7af..4f6796449a 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h @@ -24,6 +24,7 @@ #include #include #include +#include #define __NR_futex 394 From a6b427ce224665ef5152182efb06a23482366cdf Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 14 Aug 2007 19:37:50 +0000 Subject: [PATCH 3735/4487] * sysdeps/ieee754/ldbl-64-128/strtold_l.c (__STRTOF): Declare. Add libc_hidden_proto. (STRTOF): Add libc_hidden_proto. (___new_strtold_l, ___new_wcstold_l): New weak aliases. (strtold_l, wcstold_l): Use them as second argument for long_double_symbol. nptl/ * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock, __lll_robust_unlock): Rewrite as macros instead of inline functions. * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock, __lll_robust_unlock, __lll_wait_tid): Likewise. --- .../unix/sysv/linux/alpha/nptl/lowlevellock.h | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h index 4f6796449a..4487607bb3 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h @@ -226,23 +226,23 @@ __lll_robust_timedlock (int *futex, const struct timespec *abstime, __lll_robust_timedlock (&(futex), abstime, id, private) -static inline void __attribute__ ((always_inline)) -__lll_unlock (int *futex, int private) -{ - int val = atomic_exchange_rel (futex, 0); - if (__builtin_expect (val > 1, 0)) - lll_futex_wake (futex, 1, private); -} +#define __lll_unlock(futex, private) \ + (void) \ + ({ int *__futex = (futex); \ + ({ int __oldval = atomic_exchange_rel (__futex, 0); \ + if (__builtin_expect (__oldval > 1, 0)) \ + lll_futex_wake (__futex, 1, private); \ + }) #define lll_unlock(futex, private) __lll_unlock(&(futex), private) -static inline void __attribute__ ((always_inline)) -__lll_robust_unlock (int *futex, int private) -{ - int val = atomic_exchange_rel (futex, 0); - if (__builtin_expect (val & FUTEX_WAITERS, 0)) - lll_futex_wake (futex, 1, private); -} +#define __lll_robust_unlock(futex, private) \ + (void) \ + ({ int *__futex = (futex); \ + int __oldval = atomic_exchange_rel (__futex, 0); \ + if (__builtin_expect (__oldval & FUTEX_WAITERS, 0)) \ + lll_futex_wake (__futex, 1, private); \ + }) #define lll_robust_unlock(futex, private) \ __lll_robust_unlock(&(futex), private) From 957df4294eacc0b24816986e1fea88d67d993131 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 16 Aug 2007 21:03:08 +0000 Subject: [PATCH 3736/4487] * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_robust_timedlock): Pass private as last argument to __lll_robust_timedlock_wait. (__lll_unlock): Fix a pasto. --- sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h index 4487607bb3..9fa321cb3f 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h @@ -219,7 +219,7 @@ __lll_robust_timedlock (int *futex, const struct timespec *abstime, { int result = 0; if (atomic_compare_and_exchange_bool_acq (futex, id, 0) != 0) - result = __lll_robust_timedlock_wait (futex, abstime); + result = __lll_robust_timedlock_wait (futex, abstime, private); return result; } #define lll_robust_timedlock(futex, abstime, id, private) \ @@ -229,7 +229,7 @@ __lll_robust_timedlock (int *futex, const struct timespec *abstime, #define __lll_unlock(futex, private) \ (void) \ ({ int *__futex = (futex); \ - ({ int __oldval = atomic_exchange_rel (__futex, 0); \ + int __oldval = atomic_exchange_rel (__futex, 0); \ if (__builtin_expect (__oldval > 1, 0)) \ lll_futex_wake (__futex, 1, private); \ }) From fc256454b9c4f9bf5d8dda29b3d3f14f706fdc53 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 21 Aug 2007 08:05:34 +0000 Subject: [PATCH 3737/4487] * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead): Add private argument. --- sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h index 9fa321cb3f..93188234cb 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h @@ -94,12 +94,12 @@ INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret : __ret; \ }) -#define lll_robust_dead(futexv) \ +#define lll_robust_dead(futexv, private) \ do \ { \ int *__futexp = &(futexv); \ atomic_or (__futexp, FUTEX_OWNER_DIED); \ - lll_futex_wake (__futexp, 1, LLL_SHARED); \ + lll_futex_wake (__futexp, 1, private); \ } \ while (0) From ceb34e81f0b53ffc48189c2fd9f0c00335552d69 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 21 Aug 2007 08:07:28 +0000 Subject: [PATCH 3738/4487] * sysdeps/unix/sysv/linux/alpha/sysdep.h: Include tls.h. --- sysdeps/unix/sysv/linux/alpha/sysdep.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h index a22da71d60..f0661d1622 100644 --- a/sysdeps/unix/sysv/linux/alpha/sysdep.h +++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1993, 1995, 1996, 1997, 2002, 2003, 2004 +/* Copyright (C) 1992, 1993, 1995, 1996, 1997, 2002, 2003, 2004, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, , August 1995. @@ -29,6 +29,8 @@ /* There is some commonality. */ #include +#include + /* For Linux we can use the system call table in the header file /usr/include/asm/unistd.h of the kernel. But these symbols do not follow the SYS_* syntax From ce7a1add4e1be2b9e80a95eaa4f3e62e56c24612 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Wed, 29 Aug 2007 20:34:36 +0000 Subject: [PATCH 3739/4487] * sysdeps/powerpc/nofpu/fsetexcptflg.c (__fesetexceptflag): Do not clobber other exceptions. * sysdeps/powerpc/nofpu/feupdateenv.c (__feupdateenv): Raise new exceptions. * sysdeps/powerpc/nofpu/fraiseexcpt.c (__feraiseexcept): Handle multiple new exceptions if some are disabled. * sysdeps/powerpc/nofpu/sim-full.c (__simulate_exceptions): Likewise. --- ChangeLog.powerpc | 10 ++++++++++ sysdeps/powerpc/nofpu/feupdateenv.c | 4 +++- sysdeps/powerpc/nofpu/fraiseexcpt.c | 5 +---- sysdeps/powerpc/nofpu/fsetexcptflg.c | 2 +- sysdeps/powerpc/nofpu/sim-full.c | 5 +---- 5 files changed, 16 insertions(+), 10 deletions(-) diff --git a/ChangeLog.powerpc b/ChangeLog.powerpc index c775ee052b..463dd291a5 100644 --- a/ChangeLog.powerpc +++ b/ChangeLog.powerpc @@ -1,3 +1,13 @@ +2007-08-29 Daniel Jacobowitz + + * sysdeps/powerpc/nofpu/fsetexcptflg.c (__fesetexceptflag): Do not + clobber other exceptions. + * sysdeps/powerpc/nofpu/feupdateenv.c (__feupdateenv): Raise new + exceptions. + * sysdeps/powerpc/nofpu/fraiseexcpt.c (__feraiseexcept): Handle + multiple new exceptions if some are disabled. + * sysdeps/powerpc/nofpu/sim-full.c (__simulate_exceptions): Likewise. + 2007-07-13 Steven Munroe * sysdeps/powerpc/nofpu/Makefile: Remove fe_nomask from libm-support. diff --git a/sysdeps/powerpc/nofpu/feupdateenv.c b/sysdeps/powerpc/nofpu/feupdateenv.c index 5073776e7d..17af8d3ec0 100644 --- a/sysdeps/powerpc/nofpu/feupdateenv.c +++ b/sysdeps/powerpc/nofpu/feupdateenv.c @@ -21,12 +21,12 @@ #include "soft-fp.h" #include "soft-supp.h" +#include #include int __feupdateenv (const fenv_t *envp) { - fenv_union_t u; int saved_exceptions; /* Save currently set exceptions. */ @@ -37,6 +37,8 @@ __feupdateenv (const fenv_t *envp) /* Raise old exceptions. */ __sim_exceptions |= saved_exceptions; + if (saved_exceptions & ~__sim_disabled_exceptions) + raise (SIGFPE); return 0; } diff --git a/sysdeps/powerpc/nofpu/fraiseexcpt.c b/sysdeps/powerpc/nofpu/fraiseexcpt.c index cd915027e1..5d3a87fe8e 100644 --- a/sysdeps/powerpc/nofpu/fraiseexcpt.c +++ b/sysdeps/powerpc/nofpu/fraiseexcpt.c @@ -28,10 +28,7 @@ int __feraiseexcept (int x) { __sim_exceptions |= x; - if (x == 0 || __sim_disabled_exceptions & x) - /* Ignore exception. */ - ; - else + if (x & ~__sim_disabled_exceptions) raise (SIGFPE); return 0; } diff --git a/sysdeps/powerpc/nofpu/fsetexcptflg.c b/sysdeps/powerpc/nofpu/fsetexcptflg.c index 85fd88f01f..2faeb1f103 100644 --- a/sysdeps/powerpc/nofpu/fsetexcptflg.c +++ b/sysdeps/powerpc/nofpu/fsetexcptflg.c @@ -26,7 +26,7 @@ int __fesetexceptflag(const fexcept_t *flagp, int excepts) { /* Ignore exceptions not listed in 'excepts'. */ - __sim_exceptions = *flagp & excepts; + __sim_exceptions = (__sim_exceptions & ~excepts) | (*flagp & excepts); return 0; } diff --git a/sysdeps/powerpc/nofpu/sim-full.c b/sysdeps/powerpc/nofpu/sim-full.c index d018240e6d..d5ee007ca9 100644 --- a/sysdeps/powerpc/nofpu/sim-full.c +++ b/sysdeps/powerpc/nofpu/sim-full.c @@ -37,9 +37,6 @@ void __simulate_exceptions (int x) { __sim_exceptions |= x; - if (x == 0 || __sim_disabled_exceptions & x) - /* Ignore exception. */ - ; - else + if (x & ~__sim_disabled_exceptions) raise (SIGFPE); } From 713ddf8d12374aa7ddca20da1d585b4bd1b281be Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Wed, 12 Sep 2007 12:57:25 +0000 Subject: [PATCH 3740/4487] * sysdeps/arm/nptl/tls.h (THREAD_GSCOPE_RESET_FLAG): Use lll_futex_wake not lll_private_futex_wake. * sysdeps/unix/sysv/linux/arm/bits/fcntl.h (O_CLOEXEC): Define. * sysdeps/unix/sysv/linux/arm/eabi/sysdep.h: Include * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c (__lll_lock_wait_private, __lll_lock_wait): New. (__lll_timedlock_wait): Don't include in libc.so; Take private argument. Use atomic_compare_and_exchange_bool_acq. * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h: Renamed all lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp. lll_robust_*. Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*. Include . (LLL_LOCK_INITIALIZER): Remove duplicate definition. (__lll_private_flag): Define. (lll_futex_timed_wait): Pass private flag to syscall. (lll_futex_wake): Likewise. (lll_private_futex_wait, lll_private_futex_timed_wait, lll_private_futex_wake): Remove. (lll_robust_dead, lll_futex_requeue): Take private arguments. (lll_futex_wake_unlock): Pass private flag to syscall. (__lll_robust_trylock): Convert to macro. (__lll_robust_lock_wait): Add private argument. (__lll_lock_wait_private, __lll_lock_wait): Declare. (__lll_lock): Convert to macro. Take private argument. (__lll_cond_lock): Likewise. (lll_lock, lll_cond_lock): Take private arguments. (__lll_robust_lock): Take private argument. (__lll_timedlock_wait, __lll_robust_timedlock_wait): Take private arguments. (__lll_timedlock, __lll_robust_timedlock): Convert to macros. Take private arguments. (lll_timedlock, lll_robust_timedlock): Take private arguments. (__lll_unlock, __lll_robust_unlock): Convert to macros. Take private arguments. (lll_unlock, lll_robust_unlock): Take private arguments. (__lll_mutex_unlock_force, lll_mutex_unlock_force, lll_lock_t, lll_trylock, lll_lock, lll_unlock, lll_islocked): Remove. (lll_wait_tid): Pass LLL_SHARED to lll_futex_wait. (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake, __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait, lll_cond_wake, lll_cond_broadcast): Remove. * sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c (clear_once_control, __pthread_once): Use lll_futex_wake not lll_private_futex_wake. --- ChangeLog.arm | 47 +++ sysdeps/arm/nptl/tls.h | 2 +- sysdeps/unix/sysv/linux/arm/bits/fcntl.h | 4 +- sysdeps/unix/sysv/linux/arm/eabi/sysdep.h | 4 +- .../unix/sysv/linux/arm/nptl/lowlevellock.c | 36 +- .../unix/sysv/linux/arm/nptl/lowlevellock.h | 337 +++++++----------- .../unix/sysv/linux/arm/nptl/pthread_once.c | 6 +- 7 files changed, 226 insertions(+), 210 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 5a24c54ff9..fbd399e9de 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,50 @@ +2007-09-12 Joseph Myers + + * sysdeps/arm/nptl/tls.h (THREAD_GSCOPE_RESET_FLAG): Use + lll_futex_wake not lll_private_futex_wake. + * sysdeps/unix/sysv/linux/arm/bits/fcntl.h (O_CLOEXEC): Define. + * sysdeps/unix/sysv/linux/arm/eabi/sysdep.h: Include + * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c + (__lll_lock_wait_private, __lll_lock_wait): New. + (__lll_timedlock_wait): Don't include in libc.so; Take private + argument. Use atomic_compare_and_exchange_bool_acq. + * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h: Renamed all + lll_mutex_* resp. lll_robust_mutex_* macros to lll_* + resp. lll_robust_*. Renamed all LLL_MUTEX_LOCK_* macros to + LLL_LOCK_*. Include . + (LLL_LOCK_INITIALIZER): Remove duplicate definition. + (__lll_private_flag): Define. + (lll_futex_timed_wait): Pass private flag to syscall. + (lll_futex_wake): Likewise. + (lll_private_futex_wait, lll_private_futex_timed_wait, + lll_private_futex_wake): Remove. + (lll_robust_dead, lll_futex_requeue): Take private arguments. + (lll_futex_wake_unlock): Pass private flag to syscall. + (__lll_robust_trylock): Convert to macro. + (__lll_robust_lock_wait): Add private argument. + (__lll_lock_wait_private, __lll_lock_wait): Declare. + (__lll_lock): Convert to macro. Take private argument. + (__lll_cond_lock): Likewise. + (lll_lock, lll_cond_lock): Take private arguments. + (__lll_robust_lock): Take private argument. + (__lll_timedlock_wait, __lll_robust_timedlock_wait): Take private + arguments. + (__lll_timedlock, __lll_robust_timedlock): Convert to macros. + Take private arguments. + (lll_timedlock, lll_robust_timedlock): Take private arguments. + (__lll_unlock, __lll_robust_unlock): Convert to macros. Take + private arguments. + (lll_unlock, lll_robust_unlock): Take private arguments. + (__lll_mutex_unlock_force, lll_mutex_unlock_force, lll_lock_t, + lll_trylock, lll_lock, lll_unlock, lll_islocked): Remove. + (lll_wait_tid): Pass LLL_SHARED to lll_futex_wait. + (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake, + __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait, + lll_cond_wake, lll_cond_broadcast): Remove. + * sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c + (clear_once_control, __pthread_once): Use lll_futex_wake not + lll_private_futex_wake. + 2007-07-10 Daniel Jacobowitz * sysdeps/arm/nptl/tls.h (THREAD_GSCOPE_RESET_FLAG): Use diff --git a/sysdeps/arm/nptl/tls.h b/sysdeps/arm/nptl/tls.h index e80b6b8d06..f257b93fe7 100644 --- a/sysdeps/arm/nptl/tls.h +++ b/sysdeps/arm/nptl/tls.h @@ -142,7 +142,7 @@ typedef struct = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \ THREAD_GSCOPE_FLAG_UNUSED); \ if (__res == THREAD_GSCOPE_FLAG_WAIT) \ - lll_private_futex_wake (&THREAD_SELF->header.gscope_flag, 1); \ + lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1, LLL_PRIVATE); \ } \ while (0) #define THREAD_GSCOPE_SET_FLAG() \ diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h index 59539e1758..6fcc5c0c09 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h @@ -1,5 +1,6 @@ /* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 1995-1998, 2000, 2004, 2006 Free Software Foundation, Inc. + Copyright (C) 1995-1998, 2000, 2004, 2006, 2007 + 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 @@ -49,6 +50,7 @@ # define O_NOFOLLOW 0100000 /* Do not follow links. */ # define O_DIRECT 0200000 /* Direct disk access. */ # define O_NOATIME 01000000 /* Do not set atime. */ +# define O_CLOEXEC 02000000 /* Set close_on_exec. */ #endif /* For now Linux has synchronisity options for data and read operations. diff --git a/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h b/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h index bf9c8d76b8..1444f40ebc 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2005, 2006 +/* Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -25,6 +25,8 @@ #include +#include + #if __NR_SYSCALL_BASE != 0 # error Kernel headers are too old #endif diff --git a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c index 44867ecc83..8ba606550c 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c +++ b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c @@ -22,8 +22,36 @@ #include #include +void +__lll_lock_wait_private (int *futex) +{ + do + { + int oldval = atomic_compare_and_exchange_val_acq (futex, 2, 1); + if (oldval != 0) + lll_futex_wait (futex, 2, LLL_PRIVATE); + } + while (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0); +} + + +/* These functions don't get included in libc.so */ +#ifdef IS_IN_libpthread +void +__lll_lock_wait (int *futex, int private) +{ + do + { + int oldval = atomic_compare_and_exchange_val_acq (futex, 2, 1); + if (oldval != 0) + lll_futex_wait (futex, 2, private); + } + while (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0); +} + + int -__lll_timedlock_wait (int *futex, const struct timespec *abstime) +__lll_timedlock_wait (int *futex, const struct timespec *abstime, int private) { struct timespec rt; @@ -56,16 +84,14 @@ __lll_timedlock_wait (int *futex, const struct timespec *abstime) return ETIMEDOUT; // XYZ: Lost the lock to check whether it was private. - lll_futex_timed_wait (futex, 2, &rt, LLL_SHARED); + lll_futex_timed_wait (futex, 2, &rt, private); } - while (atomic_exchange_acq (futex, 2) != 0); + while (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0); return 0; } -/* This function doesn't get included in libc.so */ -#ifdef IS_IN_libpthread int __lll_timedwait_tid (int *tidp, const struct timespec *abstime) { diff --git a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h index 468fe716fd..f48e8679bf 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h @@ -24,6 +24,7 @@ #include #include #include +#include #define FUTEX_WAIT 0 #define FUTEX_WAKE 1 @@ -42,8 +43,31 @@ #define LLL_PRIVATE 0 #define LLL_SHARED FUTEX_PRIVATE_FLAG -/* Initializer for compatibility lock. */ -#define LLL_MUTEX_LOCK_INITIALIZER (0) + +#if !defined NOT_IN_libc || defined IS_IN_rtld +/* In libc.so or ld.so all futexes are private. */ +# ifdef __ASSUME_PRIVATE_FUTEX +# define __lll_private_flag(fl, private) \ + ((fl) | FUTEX_PRIVATE_FLAG) +# else +# define __lll_private_flag(fl, private) \ + ((fl) | THREAD_GETMEM (THREAD_SELF, header.private_futex)) +# endif +#else +# ifdef __ASSUME_PRIVATE_FUTEX +# define __lll_private_flag(fl, private) \ + (((fl) | FUTEX_PRIVATE_FLAG) ^ (private)) +# else +# define __lll_private_flag(fl, private) \ + (__builtin_constant_p (private) \ + ? ((private) == 0 \ + ? ((fl) | THREAD_GETMEM (THREAD_SELF, header.private_futex)) \ + : (fl)) \ + : ((fl) | (((private) ^ FUTEX_PRIVATE_FLAG) \ + & THREAD_GETMEM (THREAD_SELF, header.private_futex)))) +# endif +#endif + #define lll_futex_wait(futexp, val, private) \ lll_futex_timed_wait(futexp, val, NULL, private) @@ -52,82 +76,39 @@ ({ \ INTERNAL_SYSCALL_DECL (__err); \ long int __ret; \ - __ret = INTERNAL_SYSCALL (futex, __err, 4, \ - (futexp), FUTEX_WAIT, (val), (timespec)); \ - __ret; \ - }) - -#define lll_futex_wake(futexp, nr, private) \ - ({ \ - INTERNAL_SYSCALL_DECL (__err); \ - long int __ret; \ - __ret = INTERNAL_SYSCALL (futex, __err, 4, \ - (futexp), FUTEX_WAKE, (nr), 0); \ - __ret; \ - }) - -#define lll_private_futex_wait(futexp, val) \ - lll_private_futex_timed_wait(futexp, val, NULL) - -#ifdef __ASSUME_PRIVATE_FUTEX -#define lll_private_futex_timed_wait(futexp, val, timespec) \ - ({ \ - INTERNAL_SYSCALL_DECL (__err); \ - long int __ret; \ - __ret = INTERNAL_SYSCALL (futex, __err, 4, \ - (futexp), FUTEX_WAIT | FUTEX_PRIVATE_FLAG, \ + __ret = INTERNAL_SYSCALL (futex, __err, 4, (futexp), \ + __lll_private_flag (FUTEX_WAIT, private), \ (val), (timespec)); \ __ret; \ }) -#define lll_private_futex_wake(futexp, nr) \ +#define lll_futex_wake(futexp, nr, private) \ ({ \ INTERNAL_SYSCALL_DECL (__err); \ long int __ret; \ - __ret = INTERNAL_SYSCALL (futex, __err, 4, \ - (futexp), FUTEX_WAKE | FUTEX_PRIVATE_FLAG, \ - (nr), (0)); \ - __ret; \ - }) -#else -#define lll_private_futex_timed_wait(futexp, val, timespec) \ - ({ \ - INTERNAL_SYSCALL_DECL (__err); \ - long int __ret, __op; \ - __op = FUTEX_WAIT | THREAD_GETMEM (THREAD_SELF, header.private_futex); \ - __ret = INTERNAL_SYSCALL (futex, __err, 4, \ - (futexp), __op, (val), (timespec)); \ + __ret = INTERNAL_SYSCALL (futex, __err, 4, (futexp), \ + __lll_private_flag (FUTEX_WAKE, private), \ + (nr), 0); \ __ret; \ }) -#define lll_private_futex_wake(futexp, nr) \ - ({ \ - INTERNAL_SYSCALL_DECL (__err); \ - long int __ret, __op; \ - __op = FUTEX_WAKE | THREAD_GETMEM (THREAD_SELF, header.private_futex); \ - __ret = INTERNAL_SYSCALL (futex, __err, 4, \ - (futexp), __op, (nr), 0); \ - __ret; \ - }) -#endif - -#define lll_robust_mutex_dead(futexv) \ +#define lll_robust_dead(futexv, private) \ do \ { \ int *__futexp = &(futexv); \ atomic_or (__futexp, FUTEX_OWNER_DIED); \ - lll_futex_wake (__futexp, 1, 0); \ + lll_futex_wake (__futexp, 1, private); \ } \ while (0) /* Returns non-zero if error happened, zero if success. */ -#define lll_futex_requeue(futexp, nr_wake, nr_move, mutex, val) \ +#define lll_futex_requeue(futexp, nr_wake, nr_move, mutex, val, private) \ ({ \ INTERNAL_SYSCALL_DECL (__err); \ long int __ret; \ - __ret = INTERNAL_SYSCALL (futex, __err, 6, \ - (futexp), FUTEX_CMP_REQUEUE, (nr_wake), \ - (nr_move), (mutex), (val)); \ + __ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp), \ + __lll_private_flag (FUTEX_CMP_REQUEUE, private),\ + (nr_wake), (nr_move), (mutex), (val)); \ __ret; \ }) @@ -137,16 +118,16 @@ ({ \ INTERNAL_SYSCALL_DECL (__err); \ long int __ret; \ - __ret = INTERNAL_SYSCALL (futex, __err, 6, \ - (futexp), FUTEX_WAKE_OP, (nr_wake), \ - (nr_wake2), (futexp2), \ + __ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp), \ + __lll_private_flag (FUTEX_WAKE_OP, private), \ + (nr_wake), (nr_wake2), (futexp2), \ FUTEX_OP_CLEAR_WAKE_IF_GT_ONE); \ __ret; \ }) static inline int __attribute__((always_inline)) -__lll_mutex_trylock (int *futex) +__lll_trylock (int *futex) { int flag = 1, old; asm volatile ( @@ -161,11 +142,11 @@ __lll_mutex_trylock (int *futex) return flag; } -#define lll_mutex_trylock(lock) __lll_mutex_trylock (&(lock)) +#define lll_trylock(lock) __lll_trylock (&(lock)) static inline int __attribute__((always_inline)) -__lll_mutex_cond_trylock (int *futex) +__lll_cond_trylock (int *futex) { int flag = 2, old; asm volatile ( @@ -180,135 +161,120 @@ __lll_mutex_cond_trylock (int *futex) return flag; } -#define lll_mutex_cond_trylock(lock) __lll_mutex_cond_trylock (&(lock)) - - -static inline int __attribute__((always_inline)) -__lll_robust_mutex_trylock(int *futex, int id) -{ - return atomic_compare_and_exchange_val_acq (futex, id, 0) != 0; -} -#define lll_robust_mutex_trylock(lock, id) \ - __lll_robust_mutex_trylock (&(lock), id) - -extern int __lll_robust_lock_wait (int *futex) attribute_hidden; - -static inline void __attribute__((always_inline)) -__lll_mutex_lock (int *futex) -{ - int val = atomic_exchange_acq (futex, 1); - - if (__builtin_expect (val != 0, 0)) - { - while (atomic_exchange_acq (futex, 2) != 0) - lll_futex_wait (futex, 2, 0); - } -} -#define lll_mutex_lock(futex) __lll_mutex_lock (&(futex)) - - -static inline int __attribute__ ((always_inline)) -__lll_robust_mutex_lock (int *futex, int id) -{ - int result = 0; - if (atomic_compare_and_exchange_bool_acq (futex, id, 0) != 0) - result = __lll_robust_lock_wait (futex); - return result; -} -#define lll_robust_mutex_lock(futex, id) \ - __lll_robust_mutex_lock (&(futex), id) - - -static inline void __attribute__ ((always_inline)) -__lll_mutex_cond_lock (int *futex) -{ - int val = atomic_exchange_acq (futex, 2); - - if (__builtin_expect (val != 0, 0)) - { - while (atomic_exchange_acq (futex, 2) != 0) - lll_futex_wait (futex, 2, 0); - } -} -#define lll_mutex_cond_lock(futex) __lll_mutex_cond_lock (&(futex)) +#define lll_cond_trylock(lock) __lll_cond_trylock (&(lock)) + + +#define __lll_robust_trylock(futex, id) \ + (atomic_compare_and_exchange_val_acq (futex, id, 0) != 0) +#define lll_robust_trylock(lock, id) \ + __lll_robust_trylock (&(lock), id) + +extern void __lll_lock_wait_private (int *futex) attribute_hidden; +extern void __lll_lock_wait (int *futex, int private) attribute_hidden; +extern int __lll_robust_lock_wait (int *futex, int private) attribute_hidden; + +#define __lll_lock(futex, private) \ + ((void) ({ \ + int *__futex = (futex); \ + if (__builtin_expect (atomic_compare_and_exchange_val_acq (__futex, \ + 1, 0), 0)) \ + { \ + if (__builtin_constant_p (private) && (private) == LLL_PRIVATE) \ + __lll_lock_wait_private (__futex); \ + else \ + __lll_lock_wait (__futex, private); \ + } \ + })) +#define lll_lock(futex, private) __lll_lock (&(futex), private) + + +#define __lll_robust_lock(futex, id, private) \ + ({ \ + int *__futex = (futex); \ + int __val = 0; \ + \ + if (__builtin_expect (atomic_compare_and_exchange_bool_acq (__futex, id, \ + 0), 0)) \ + __val = __lll_robust_lock_wait (__futex, private); \ + __val; \ + }) +#define lll_robust_lock(futex, id, private) \ + __lll_robust_lock (&(futex), id, private) -#define lll_robust_mutex_cond_lock(futex, id) \ - __lll_robust_mutex_lock (&(futex), (id) | FUTEX_WAITERS) +#define __lll_cond_lock(futex, private) \ + ((void) ({ \ + int *__futex = (futex); \ + if (__builtin_expect (atomic_exchange_acq (__futex, 2), 0)) \ + __lll_lock_wait (__futex, private); \ + })) +#define lll_cond_lock(futex, private) __lll_cond_lock (&(futex), private) -extern int __lll_timedlock_wait (int *futex, const struct timespec *) - attribute_hidden; -extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *) - attribute_hidden; +#define lll_robust_cond_lock(futex, id, private) \ + __lll_robust_lock (&(futex), (id) | FUTEX_WAITERS, private) -static inline int __attribute__ ((always_inline)) -__lll_mutex_timedlock (int *futex, const struct timespec *abstime) -{ - int result = 0; - int val = atomic_exchange_acq (futex, 1); - if (__builtin_expect (val != 0, 0)) - result = __lll_timedlock_wait (futex, abstime); - return result; -} -#define lll_mutex_timedlock(futex, abstime) \ - __lll_mutex_timedlock (&(futex), abstime) +extern int __lll_timedlock_wait (int *futex, const struct timespec *, + int private) attribute_hidden; +extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *, + int private) attribute_hidden; - -static inline int __attribute__ ((always_inline)) -__lll_robust_mutex_timedlock (int *futex, const struct timespec *abstime, - int id) -{ - int result = 0; - if (atomic_compare_and_exchange_bool_acq (futex, id, 0) != 0) - result = __lll_robust_timedlock_wait (futex, abstime); - return result; -} -#define lll_robust_mutex_timedlock(futex, abstime, id) \ - __lll_robust_mutex_timedlock (&(futex), abstime, id) +#define __lll_timedlock(futex, abstime, private) \ + ({ \ + int *__futex = (futex); \ + int __val = 0; \ + \ + if (__builtin_expect (atomic_exchange_acq (__futex, 1), 0)) \ + __val = __lll_timedlock_wait (__futex, abstime, private); \ + __val; \ + }) +#define lll_timedlock(futex, abstime, private) \ + __lll_timedlock (&(futex), abstime, private) -static inline void __attribute__ ((always_inline)) -__lll_mutex_unlock (int *futex) -{ - int val = atomic_exchange_rel (futex, 0); - if (__builtin_expect (val > 1, 0)) - lll_futex_wake (futex, 1, 0); -} -#define lll_mutex_unlock(futex) __lll_mutex_unlock(&(futex)) +#define __lll_robust_timedlock(futex, abstime, id, private) \ + ({ \ + int *__futex = (futex); \ + int __val = 0; \ + \ + if (__builtin_expect (atomic_compare_and_exchange_bool_acq (__futex, id, \ + 0), 0)) \ + __val = __lll_robust_timedlock_wait (__futex, abstime, private); \ + __val; \ + }) +#define lll_robust_timedlock(futex, abstime, id, private) \ + __lll_robust_timedlock (&(futex), abstime, id, private) -static inline void __attribute__ ((always_inline)) -__lll_robust_mutex_unlock (int *futex, int mask) -{ - int val = atomic_exchange_rel (futex, 0); - if (__builtin_expect (val & mask, 0)) - lll_futex_wake (futex, 1, 0); -} -#define lll_robust_mutex_unlock(futex) \ - __lll_robust_mutex_unlock(&(futex), FUTEX_WAITERS) +#define __lll_unlock(futex, private) \ + (void) \ + ({ int *__futex = (futex); \ + int __oldval = atomic_exchange_rel (__futex, 0); \ + if (__builtin_expect (__oldval > 1, 0)) \ + lll_futex_wake (__futex, 1, private); \ + }) +#define lll_unlock(futex, private) __lll_unlock(&(futex), private) -static inline void __attribute__ ((always_inline)) -__lll_mutex_unlock_force (int *futex) -{ - (void) atomic_exchange_rel (futex, 0); - lll_futex_wake (futex, 1, 0); -} -#define lll_mutex_unlock_force(futex) __lll_mutex_unlock_force(&(futex)) +#define __lll_robust_unlock(futex, private) \ + (void) \ + ({ int *__futex = (futex); \ + int __oldval = atomic_exchange_rel (__futex, 0); \ + if (__builtin_expect (__oldval & FUTEX_WAITERS, 0)) \ + lll_futex_wake (__futex, 1, private); \ + }) +#define lll_robust_unlock(futex, private) \ + __lll_robust_unlock(&(futex), private) -#define lll_mutex_islocked(futex) \ +#define lll_islocked(futex) \ (futex != 0) /* Our internal lock implementation is identical to the binary-compatible mutex implementation. */ -/* Type for lock object. */ -typedef int lll_lock_t; - /* Initializers for lock. */ #define LLL_LOCK_INITIALIZER (0) #define LLL_LOCK_INITIALIZER_LOCKED (1) @@ -318,11 +284,6 @@ typedef int lll_lock_t; 1 - taken by one user >1 - taken by more users */ -#define lll_trylock(lock) lll_mutex_trylock (lock) -#define lll_lock(lock) lll_mutex_lock (lock) -#define lll_unlock(lock) lll_mutex_unlock (lock) -#define lll_islocked(lock) lll_mutex_islocked (lock) - /* The kernel notifies a process which uses CLONE_CLEARTID via futex wakeup when the clone terminates. The memory location contains the thread ID while the clone is running and is reset to zero @@ -331,7 +292,7 @@ typedef int lll_lock_t; do { \ __typeof (tid) __tid; \ while ((__tid = (tid)) != 0) \ - lll_futex_wait (&(tid), __tid, 0);\ + lll_futex_wait (&(tid), __tid, LLL_SHARED);\ } while (0) extern int __lll_timedwait_tid (int *, const struct timespec *) @@ -345,26 +306,4 @@ extern int __lll_timedwait_tid (int *, const struct timespec *) __res; \ }) - -/* Conditional variable handling. */ - -extern void __lll_cond_wait (pthread_cond_t *cond) - attribute_hidden; -extern int __lll_cond_timedwait (pthread_cond_t *cond, - const struct timespec *abstime) - attribute_hidden; -extern void __lll_cond_wake (pthread_cond_t *cond) - attribute_hidden; -extern void __lll_cond_broadcast (pthread_cond_t *cond) - attribute_hidden; - -#define lll_cond_wait(cond) \ - __lll_cond_wait (cond) -#define lll_cond_timedwait(cond, abstime) \ - __lll_cond_timedwait (cond, abstime) -#define lll_cond_wake(cond) \ - __lll_cond_wake (cond) -#define lll_cond_broadcast(cond) \ - __lll_cond_broadcast (cond) - #endif /* lowlevellock.h */ diff --git a/sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c b/sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c index 909e8327a5..d81ecd4e5a 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c +++ b/sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c @@ -27,7 +27,7 @@ clear_once_control (void *arg) pthread_once_t *once_control = (pthread_once_t *) arg; *once_control = 0; - lll_private_futex_wake (once_control, INT_MAX); + lll_futex_wake (once_control, INT_MAX, LLL_PRIVATE); } int @@ -66,7 +66,7 @@ __pthread_once (pthread_once_t *once_control, void (*init_routine) (void)) break; /* Same generation, some other thread was faster. Wait. */ - lll_private_futex_wait (once_control, oldval); + lll_futex_wait (once_control, oldval, LLL_PRIVATE); } /* This thread is the first here. Do the initialization. @@ -82,7 +82,7 @@ __pthread_once (pthread_once_t *once_control, void (*init_routine) (void)) *once_control = __fork_generation | 2; /* Wake up all other threads. */ - lll_private_futex_wake (once_control, INT_MAX); + lll_futex_wake (once_control, INT_MAX, LLL_PRIVATE); return 0; } From 8c2766740df531409c2921f1c0213dcab2494e69 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Wed, 12 Sep 2007 12:57:41 +0000 Subject: [PATCH 3741/4487] * sysdeps/mips/nptl/tls.h (THREAD_GSCOPE_RESET_FLAG): Pass LLL_PRIVATE argument to lll_futex_wake. * sysdeps/unix/sysv/linux/mips/bits/fcntl.h (O_CLOEXEC): Define. * sysdeps/unix/sysv/linux/mips/bits/socket.h (PF_UNIX): Update comment. (PF_IUCV, PF_RXRPC): Define. (PF_MAX): Update. (AF_IUCV, AF_RXRPC): Define. (MSG_CMSG_CLOEXEC): Define. (_EXTERN_INLINE): Define to __extern_inline. * sysdeps/unix/sysv/linux/mips/bits/stat.h (UTIME_NOW, UTIME_OMIT): Define. * sysdeps/unix/sysv/linux/mips/mips32/sysdep.h: Include . * sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h: Renamed all lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp. lll_robust_*. Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*. Include . (LLL_LOCK_INITIALIZER): Remove duplicate definition. (LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define. * sysdeps/unix/sysv/linux/mips/nptl/pthread_once.c (clear_once_control, __pthread_once): Pass LLL_PRIVATE argument to lll_futex_wait. (lll_futex_wait, lll_futex_timed_wait, lll_futex_wake, lll_robust_dead, lll_futex_requeue, lll_futex_wake_unlock): Take private arguments. (__lll_robust_trylock): Convert to macro. (__lll_robust_lock_wait): Add private argument. (__lll_lock_wait_private, __lll_lock_wait): Declare. (__lll_lock): Convert to macro. Take private argument. (__lll_cond_lock): Likewise. (lll_lock, lll_cond_lock): Take private arguments. (__lll_robust_lock): Take private argument. Convert to macro. (lll_robust_lock, __lll_cond_lock, lll_cond_lock, lll_robust_cond_lock): Take private arguments. (__lll_timedlock_wait, __lll_robust_timedlock_wait): Take private arguments. (__lll_timedlock, __lll_robust_timedlock): Take private arguments. (lll_timedlock, lll_robust_timedlock): Take private arguments. (__lll_unlock, __lll_robust_unlock): Convert to macros. Take private arguments. (lll_unlock, lll_robust_unlock): Take private arguments. (__lll_mutex_unlock_force, lll_mutex_unlock_force, lll_lock_t, lll_trylock, lll_lock, lll_unlock, lll_islocked): Remove. (lll_wait_tid): Pass LLL_SHARED to lll_futex_wait. (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake, __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait, lll_cond_wake, lll_cond_broadcast): Remove. * sysdeps/unix/sysv/linux/mips/sys/tas.h (_EXTERN_INLINE): Define to __extern_inline. --- ChangeLog.mips | 54 ++++ sysdeps/mips/nptl/tls.h | 2 +- sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 3 +- sysdeps/unix/sysv/linux/mips/bits/socket.h | 19 +- sysdeps/unix/sysv/linux/mips/bits/stat.h | 10 +- sysdeps/unix/sysv/linux/mips/mips32/sysdep.h | 2 + .../unix/sysv/linux/mips/mips64/n32/sysdep.h | 2 + .../unix/sysv/linux/mips/mips64/n64/sysdep.h | 2 + .../unix/sysv/linux/mips/nptl/lowlevellock.h | 273 +++++++++--------- .../unix/sysv/linux/mips/nptl/pthread_once.c | 6 +- sysdeps/unix/sysv/linux/mips/sys/tas.h | 4 +- 11 files changed, 225 insertions(+), 152 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 3216e73d57..0e8fda42db 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,57 @@ +2007-09-12 Joseph Myers + + * sysdeps/mips/nptl/tls.h (THREAD_GSCOPE_RESET_FLAG): Pass + LLL_PRIVATE argument to lll_futex_wake. + * sysdeps/unix/sysv/linux/mips/bits/fcntl.h (O_CLOEXEC): Define. + * sysdeps/unix/sysv/linux/mips/bits/socket.h (PF_UNIX): Update + comment. + (PF_IUCV, PF_RXRPC): Define. + (PF_MAX): Update. + (AF_IUCV, AF_RXRPC): Define. + (MSG_CMSG_CLOEXEC): Define. + (_EXTERN_INLINE): Define to __extern_inline. + * sysdeps/unix/sysv/linux/mips/bits/stat.h (UTIME_NOW, + UTIME_OMIT): Define. + * sysdeps/unix/sysv/linux/mips/mips32/sysdep.h: Include . + * sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h: Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h: Likewise. + * sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h: Renamed all + lll_mutex_* resp. lll_robust_mutex_* macros to lll_* + resp. lll_robust_*. Renamed all LLL_MUTEX_LOCK_* macros to + LLL_LOCK_*. Include . + (LLL_LOCK_INITIALIZER): Remove duplicate definition. + (LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define. + * sysdeps/unix/sysv/linux/mips/nptl/pthread_once.c + (clear_once_control, __pthread_once): Pass LLL_PRIVATE argument to + lll_futex_wait. + (lll_futex_wait, lll_futex_timed_wait, lll_futex_wake, + lll_robust_dead, lll_futex_requeue, lll_futex_wake_unlock): Take + private arguments. + (__lll_robust_trylock): Convert to macro. + (__lll_robust_lock_wait): Add private argument. + (__lll_lock_wait_private, __lll_lock_wait): Declare. + (__lll_lock): Convert to macro. Take private argument. + (__lll_cond_lock): Likewise. + (lll_lock, lll_cond_lock): Take private arguments. + (__lll_robust_lock): Take private argument. Convert to macro. + (lll_robust_lock, __lll_cond_lock, lll_cond_lock, + lll_robust_cond_lock): Take private arguments. + (__lll_timedlock_wait, __lll_robust_timedlock_wait): Take private + arguments. + (__lll_timedlock, __lll_robust_timedlock): Take private arguments. + (lll_timedlock, lll_robust_timedlock): Take private arguments. + (__lll_unlock, __lll_robust_unlock): Convert to macros. Take + private arguments. + (lll_unlock, lll_robust_unlock): Take private arguments. + (__lll_mutex_unlock_force, lll_mutex_unlock_force, lll_lock_t, + lll_trylock, lll_lock, lll_unlock, lll_islocked): Remove. + (lll_wait_tid): Pass LLL_SHARED to lll_futex_wait. + (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake, + __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait, + lll_cond_wake, lll_cond_broadcast): Remove. + * sysdeps/unix/sysv/linux/mips/sys/tas.h (_EXTERN_INLINE): Define + to __extern_inline. + 2007-08-06 Maciej W. Rozycki * sysdeps/unix/sysv/linux/mips/dl-cache.h (_DL_CACHE_DEFAULT_ID): diff --git a/sysdeps/mips/nptl/tls.h b/sysdeps/mips/nptl/tls.h index dbe806a5f8..20f9f96832 100644 --- a/sysdeps/mips/nptl/tls.h +++ b/sysdeps/mips/nptl/tls.h @@ -166,7 +166,7 @@ typedef struct = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \ THREAD_GSCOPE_FLAG_UNUSED); \ if (__res == THREAD_GSCOPE_FLAG_WAIT) \ - lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1); \ + lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1, LLL_PRIVATE); \ } \ while (0) #define THREAD_GSCOPE_SET_FLAG() \ diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index 340466392a..27af9ede1b 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2003, 2004, 2006 + Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -51,6 +51,7 @@ # define O_DIRECT 0x8000 /* Direct disk access hint. */ # define O_DIRECTORY 0x10000 /* Must be a directory. */ # define O_NOATIME 0x40000 /* Do not set atime. */ +# define O_CLOEXEC 02000000 /* Set close_on_exec. */ #endif /* For now Linux has no synchronisity options for data and read operations. diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h index 0e4a2beac7..8748c0a04a 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/socket.h +++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h @@ -1,5 +1,5 @@ /* System-specific socket constants and types. Linux/MIPS version. - Copyright (C) 1991, 92, 1994-1999, 2000, 2001, 2004, 2005, 2006 + Copyright (C) 1991, 92, 1994-1999, 2000, 2001, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -63,7 +63,7 @@ enum __socket_type /* Protocol families. */ #define PF_UNSPEC 0 /* Unspecified. */ #define PF_LOCAL 1 /* Local to host (pipes and file-domain). */ -#define PF_UNIX PF_LOCAL /* Old BSD name for PF_LOCAL. */ +#define PF_UNIX PF_LOCAL /* POSIX name for PF_LOCAL. */ #define PF_FILE PF_LOCAL /* Another non-standard name for PF_LOCAL. */ #define PF_INET 2 /* IP protocol family. */ #define PF_AX25 3 /* Amateur Radio AX.25. */ @@ -90,7 +90,9 @@ enum __socket_type #define PF_PPPOX 24 /* PPPoX sockets. */ #define PF_WANPIPE 25 /* Wanpipe API sockets. */ #define PF_BLUETOOTH 31 /* Bluetooth sockets. */ -#define PF_MAX 32 /* For now.. */ +#define PF_IUCV 32 /* IUCV sockets. */ +#define PF_RXRPC 33 /* RxRPC sockets. */ +#define PF_MAX 34 /* For now.. */ /* Address families. */ #define AF_UNSPEC PF_UNSPEC @@ -122,6 +124,8 @@ enum __socket_type #define AF_PPPOX PF_PPPOX #define AF_WANPIPE PF_WANPIPE #define AF_BLUETOOTH PF_BLUETOOTH +#define AF_IUCV PF_IUCV +#define AF_RXRPC PF_RXRPC #define AF_MAX PF_MAX /* Socket level values. Others are defined in the appropriate headers. @@ -206,8 +210,13 @@ enum #define MSG_ERRQUEUE MSG_ERRQUEUE MSG_NOSIGNAL = 0x4000, /* Do not generate SIGPIPE. */ #define MSG_NOSIGNAL MSG_NOSIGNAL - MSG_MORE = 0x8000 /* Sender will send more. */ + MSG_MORE = 0x8000, /* Sender will send more. */ #define MSG_MORE MSG_MORE + + MSG_CMSG_CLOEXEC = 0x40000000 /* Set close_on_exit for file + descriptor received through + SCM_RIGHTS. */ +#define MSG_CMSG_CLOEXEC MSG_CMSG_CLOEXEC }; @@ -259,7 +268,7 @@ extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW; #ifdef __USE_EXTERN_INLINES # ifndef _EXTERN_INLINE -# define _EXTERN_INLINE extern __inline +# define _EXTERN_INLINE __extern_inline # endif _EXTERN_INLINE struct cmsghdr * __NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg)) diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h index 208197830c..4e0e30f9ed 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/stat.h +++ b/sysdeps/unix/sysv/linux/mips/bits/stat.h @@ -1,5 +1,5 @@ -/* Copyright (C) 1992, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004 - Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, + 2007 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 @@ -253,3 +253,9 @@ struct stat64 #define __S_IREAD 0400 /* Read by owner. */ #define __S_IWRITE 0200 /* Write by owner. */ #define __S_IEXEC 0100 /* Execute by owner. */ + +#if defined __USE_ATFILE || defined __USE_GNU +/* XXX This will change to the macro for the next 2008 POSIX revision. */ +# define UTIME_NOW ((1l << 30) - 1l) +# define UTIME_OMIT ((1l << 30) - 2l) +#endif diff --git a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h index 3c19bffc4b..089fa9dc64 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h @@ -22,6 +22,8 @@ /* There is some commonality. */ #include +#include + /* For Linux we can use the system call table in the header file /usr/include/asm/unistd.h of the kernel. But these symbols do not follow the SYS_* syntax diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h index b15d280266..b2bbbb0eee 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h @@ -23,6 +23,8 @@ /* There is some commonality. */ #include +#include + /* For Linux we can use the system call table in the header file /usr/include/asm/unistd.h of the kernel. But these symbols do not follow the SYS_* syntax diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h index edf8786ea7..8862607ae8 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h @@ -23,6 +23,8 @@ /* There is some commonality. */ #include +#include + /* For Linux we can use the system call table in the header file /usr/include/asm/unistd.h of the kernel. But these symbols do not follow the SYS_* syntax diff --git a/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h index 4542e5b91f..1cb3d9b7c3 100644 --- a/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h @@ -24,7 +24,7 @@ #include #include #include - +#include #define FUTEX_WAIT 0 #define FUTEX_WAKE 1 @@ -37,200 +37,224 @@ #define FUTEX_TRYLOCK_PI 8 #define FUTEX_PRIVATE_FLAG 128 -/* Initializer for compatibility lock. */ -#define LLL_MUTEX_LOCK_INITIALIZER (0) - -#define lll_futex_wait(futexp, val) \ - ({ \ - INTERNAL_SYSCALL_DECL (__err); \ - long int __ret; \ - __ret = INTERNAL_SYSCALL (futex, __err, 4, \ - (long) (futexp), FUTEX_WAIT, (val), 0); \ - INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; \ - }) - -#define lll_futex_timed_wait(futexp, val, timespec) \ +/* Values for 'private' parameter of locking macros. Yes, the + definition seems to be backwards. But it is not. The bit will be + reversed before passing to the system call. */ +#define LLL_PRIVATE 0 +#define LLL_SHARED FUTEX_PRIVATE_FLAG + + +#if !defined NOT_IN_libc || defined IS_IN_rtld +/* In libc.so or ld.so all futexes are private. */ +# ifdef __ASSUME_PRIVATE_FUTEX +# define __lll_private_flag(fl, private) \ + ((fl) | FUTEX_PRIVATE_FLAG) +# else +# define __lll_private_flag(fl, private) \ + ((fl) | THREAD_GETMEM (THREAD_SELF, header.private_futex)) +# endif +#else +# ifdef __ASSUME_PRIVATE_FUTEX +# define __lll_private_flag(fl, private) \ + (((fl) | FUTEX_PRIVATE_FLAG) ^ (private)) +# else +# define __lll_private_flag(fl, private) \ + (__builtin_constant_p (private) \ + ? ((private) == 0 \ + ? ((fl) | THREAD_GETMEM (THREAD_SELF, header.private_futex)) \ + : (fl)) \ + : ((fl) | (((private) ^ FUTEX_PRIVATE_FLAG) \ + & THREAD_GETMEM (THREAD_SELF, header.private_futex)))) +# endif +#endif + + +#define lll_futex_wait(futexp, val, private) \ + lll_futex_timed_wait(futexp, val, NULL, private) + +#define lll_futex_timed_wait(futexp, val, timespec, private) \ ({ \ INTERNAL_SYSCALL_DECL (__err); \ long int __ret; \ - __ret = INTERNAL_SYSCALL (futex, __err, 4, \ - (long) (futexp), FUTEX_WAIT, (val), (timespec));\ + __ret = INTERNAL_SYSCALL (futex, __err, 4, (long) (futexp), \ + __lll_private_flag (FUTEX_WAIT, private), \ + (val), (timespec)); \ INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; \ }) -#define lll_futex_wake(futexp, nr) \ +#define lll_futex_wake(futexp, nr, private) \ ({ \ INTERNAL_SYSCALL_DECL (__err); \ long int __ret; \ - __ret = INTERNAL_SYSCALL (futex, __err, 4, \ - (long) (futexp), FUTEX_WAKE, (nr), 0); \ + __ret = INTERNAL_SYSCALL (futex, __err, 4, (long) (futexp), \ + __lll_private_flag (FUTEX_WAKE, private), \ + (nr), 0); \ INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; \ }) -#define lll_robust_mutex_dead(futexv) \ +#define lll_robust_dead(futexv, private) \ do \ { \ int *__futexp = &(futexv); \ atomic_or (__futexp, FUTEX_OWNER_DIED); \ - lll_futex_wake (__futexp, 1); \ + lll_futex_wake (__futexp, 1, private); \ } \ while (0) /* Returns non-zero if error happened, zero if success. */ -#define lll_futex_requeue(futexp, nr_wake, nr_move, mutex, val) \ +#define lll_futex_requeue(futexp, nr_wake, nr_move, mutex, val, private) \ ({ \ INTERNAL_SYSCALL_DECL (__err); \ long int __ret; \ - __ret = INTERNAL_SYSCALL (futex, __err, 6, \ - (long) (futexp), FUTEX_CMP_REQUEUE, (nr_wake), \ - (nr_move), (mutex), (val)); \ + __ret = INTERNAL_SYSCALL (futex, __err, 6, (long) (futexp), \ + __lll_private_flag (FUTEX_CMP_REQUEUE, private),\ + (nr_wake), (nr_move), (mutex), (val)); \ INTERNAL_SYSCALL_ERROR_P (__ret, __err); \ }) /* Returns non-zero if error happened, zero if success. */ -#define lll_futex_wake_unlock(futexp, nr_wake, nr_wake2, futexp2) \ +#define lll_futex_wake_unlock(futexp, nr_wake, nr_wake2, futexp2, private) \ ({ \ INTERNAL_SYSCALL_DECL (__err); \ long int __ret; \ \ - __ret = INTERNAL_SYSCALL (futex, __err, 6, \ - (futexp), FUTEX_WAKE_OP, (nr_wake), \ - (nr_wake2), (futexp2), \ + __ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp), \ + __lll_private_flag (FUTEX_WAKE_OP, private), \ + (nr_wake), (nr_wake2), (futexp2), \ FUTEX_OP_CLEAR_WAKE_IF_GT_ONE); \ INTERNAL_SYSCALL_ERROR_P (__ret, __err); \ }) static inline int __attribute__((always_inline)) -__lll_mutex_trylock(int *futex) +__lll_trylock(int *futex) { return atomic_compare_and_exchange_val_acq (futex, 1, 0) != 0; } -#define lll_mutex_trylock(lock) __lll_mutex_trylock (&(lock)) +#define lll_trylock(lock) __lll_trylock (&(lock)) static inline int __attribute__((always_inline)) -__lll_mutex_cond_trylock(int *futex) +__lll_cond_trylock(int *futex) { return atomic_compare_and_exchange_val_acq (futex, 2, 0) != 0; } -#define lll_mutex_cond_trylock(lock) __lll_mutex_cond_trylock (&(lock)) +#define lll_cond_trylock(lock) __lll_cond_trylock (&(lock)) static inline int __attribute__((always_inline)) -__lll_robust_mutex_trylock(int *futex, int id) +__lll_robust_trylock(int *futex, int id) { return atomic_compare_and_exchange_val_acq (futex, id, 0) != 0; } -#define lll_robust_mutex_trylock(lock, id) \ - __lll_robust_mutex_trylock (&(lock), id) - -extern void __lll_lock_wait (int *futex) attribute_hidden; -extern int __lll_robust_lock_wait (int *futex) attribute_hidden; - -static inline void __attribute__((always_inline)) -__lll_mutex_lock(int *futex) -{ - if (atomic_compare_and_exchange_bool_acq (futex, 1, 0) != 0) - __lll_lock_wait (futex); -} -#define lll_mutex_lock(futex) __lll_mutex_lock (&(futex)) - - -static inline int __attribute__ ((always_inline)) -__lll_robust_mutex_lock (int *futex, int id) -{ - int result = 0; - if (atomic_compare_and_exchange_bool_acq (futex, id, 0) != 0) - result = __lll_robust_lock_wait (futex); - return result; -} -#define lll_robust_mutex_lock(futex, id) \ - __lll_robust_mutex_lock (&(futex), id) +#define lll_robust_trylock(lock, id) \ + __lll_robust_trylock (&(lock), id) + +extern void __lll_lock_wait_private (int *futex) attribute_hidden; +extern void __lll_lock_wait (int *futex, int private) attribute_hidden; +extern int __lll_robust_lock_wait (int *futex, int private) attribute_hidden; + +#define __lll_lock(futex, private) \ + ((void) ({ \ + int *__futex = (futex); \ + if (__builtin_expect (atomic_compare_and_exchange_bool_acq (__futex, \ + 1, 0), 0)) \ + { \ + if (__builtin_constant_p (private) && (private) == LLL_PRIVATE) \ + __lll_lock_wait_private (__futex); \ + else \ + __lll_lock_wait (__futex, private); \ + } \ + })) +#define lll_lock(futex, private) __lll_lock (&(futex), private) + + +#define __lll_robust_lock(futex, id, private) \ + ({ \ + int *__futex = (futex); \ + int __val = 0; \ + \ + if (__builtin_expect (atomic_compare_and_exchange_bool_acq (__futex, id, \ + 0), 0)) \ + __val = __lll_robust_lock_wait (__futex, private); \ + __val; \ + }) +#define lll_robust_lock(futex, id, private) \ + __lll_robust_lock (&(futex), id, private) static inline void __attribute__ ((always_inline)) -__lll_mutex_cond_lock (int *futex) +__lll_cond_lock (int *futex, int private) { if (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0) - __lll_lock_wait (futex); + __lll_lock_wait (futex, private); } -#define lll_mutex_cond_lock(futex) __lll_mutex_cond_lock (&(futex)) +#define lll_cond_lock(futex, private) __lll_cond_lock (&(futex), private) -#define lll_robust_mutex_cond_lock(futex, id) \ - __lll_robust_mutex_lock (&(futex), (id) | FUTEX_WAITERS) +#define lll_robust_cond_lock(futex, id, private) \ + __lll_robust_lock (&(futex), (id) | FUTEX_WAITERS, private) -extern int __lll_timedlock_wait (int *futex, const struct timespec *) - attribute_hidden; -extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *) - attribute_hidden; +extern int __lll_timedlock_wait (int *futex, const struct timespec *, + int private) attribute_hidden; +extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *, + int private) attribute_hidden; static inline int __attribute__ ((always_inline)) -__lll_mutex_timedlock (int *futex, const struct timespec *abstime) +__lll_timedlock (int *futex, const struct timespec *abstime, int private) { int result = 0; if (atomic_compare_and_exchange_bool_acq (futex, 1, 0) != 0) - result = __lll_timedlock_wait (futex, abstime); + result = __lll_timedlock_wait (futex, abstime, private); return result; } -#define lll_mutex_timedlock(futex, abstime) \ - __lll_mutex_timedlock (&(futex), abstime) +#define lll_timedlock(futex, abstime, private) \ + __lll_timedlock (&(futex), abstime, private) static inline int __attribute__ ((always_inline)) -__lll_robust_mutex_timedlock (int *futex, const struct timespec *abstime, - int id) +__lll_robust_timedlock (int *futex, const struct timespec *abstime, + int id, int private) { int result = 0; if (atomic_compare_and_exchange_bool_acq (futex, id, 0) != 0) - result = __lll_robust_timedlock_wait (futex, abstime); + result = __lll_robust_timedlock_wait (futex, abstime, private); return result; } -#define lll_robust_mutex_timedlock(futex, abstime, id) \ - __lll_robust_mutex_timedlock (&(futex), abstime, id) +#define lll_robust_timedlock(futex, abstime, id, private) \ + __lll_robust_timedlock (&(futex), abstime, id, private) -static inline void __attribute__ ((always_inline)) -__lll_mutex_unlock (int *futex) -{ - int val = atomic_exchange_rel (futex, 0); - if (__builtin_expect (val > 1, 0)) - lll_futex_wake (futex, 1); -} -#define lll_mutex_unlock(futex) __lll_mutex_unlock(&(futex)) - - -static inline void __attribute__ ((always_inline)) -__lll_robust_mutex_unlock (int *futex, int mask) -{ - int val = atomic_exchange_rel (futex, 0); - if (__builtin_expect (val & mask, 0)) - lll_futex_wake (futex, 1); -} -#define lll_robust_mutex_unlock(futex) \ - __lll_robust_mutex_unlock(&(futex), FUTEX_WAITERS) +#define __lll_unlock(futex, private) \ + ((void) ({ \ + int *__futex = (futex); \ + int __val = atomic_exchange_rel (__futex, 0); \ + \ + if (__builtin_expect (__val > 1, 0)) \ + lll_futex_wake (__futex, 1, private); \ + })) +#define lll_unlock(futex, private) __lll_unlock(&(futex), private) -static inline void __attribute__ ((always_inline)) -__lll_mutex_unlock_force (int *futex) -{ - (void) atomic_exchange_rel (futex, 0); - lll_futex_wake (futex, 1); -} -#define lll_mutex_unlock_force(futex) __lll_mutex_unlock_force(&(futex)) +#define __lll_robust_unlock(futex, private) \ + ((void) ({ \ + int *__futex = (futex); \ + int __val = atomic_exchange_rel (__futex, 0); \ + \ + if (__builtin_expect (__val & FUTEX_WAITERS, 0)) \ + lll_futex_wake (__futex, 1, private); \ + })) +#define lll_robust_unlock(futex, private) \ + __lll_robust_unlock(&(futex), private) -#define lll_mutex_islocked(futex) \ +#define lll_islocked(futex) \ (futex != 0) /* Our internal lock implementation is identical to the binary-compatible mutex implementation. */ -/* Type for lock object. */ -typedef int lll_lock_t; - /* Initializers for lock. */ #define LLL_LOCK_INITIALIZER (0) #define LLL_LOCK_INITIALIZER_LOCKED (1) @@ -240,20 +264,15 @@ typedef int lll_lock_t; 1 - taken by one user >1 - taken by more users */ -#define lll_trylock(lock) lll_mutex_trylock (lock) -#define lll_lock(lock) lll_mutex_lock (lock) -#define lll_unlock(lock) lll_mutex_unlock (lock) -#define lll_islocked(lock) lll_mutex_islocked (lock) - /* The kernel notifies a process which uses CLONE_CLEARTID via futex wakeup when the clone terminates. The memory location contains the thread ID while the clone is running and is reset to zero afterwards. */ #define lll_wait_tid(tid) \ - do { \ - __typeof (tid) __tid; \ - while ((__tid = (tid)) != 0) \ - lll_futex_wait (&(tid), __tid); \ + do { \ + __typeof (tid) __tid; \ + while ((__tid = (tid)) != 0) \ + lll_futex_wait (&(tid), __tid, LLL_SHARED); \ } while (0) extern int __lll_timedwait_tid (int *, const struct timespec *) @@ -267,26 +286,4 @@ extern int __lll_timedwait_tid (int *, const struct timespec *) __res; \ }) - -/* Conditional variable handling. */ - -extern void __lll_cond_wait (pthread_cond_t *cond) - attribute_hidden; -extern int __lll_cond_timedwait (pthread_cond_t *cond, - const struct timespec *abstime) - attribute_hidden; -extern void __lll_cond_wake (pthread_cond_t *cond) - attribute_hidden; -extern void __lll_cond_broadcast (pthread_cond_t *cond) - attribute_hidden; - -#define lll_cond_wait(cond) \ - __lll_cond_wait (cond) -#define lll_cond_timedwait(cond, abstime) \ - __lll_cond_timedwait (cond, abstime) -#define lll_cond_wake(cond) \ - __lll_cond_wake (cond) -#define lll_cond_broadcast(cond) \ - __lll_cond_broadcast (cond) - #endif /* lowlevellock.h */ diff --git a/sysdeps/unix/sysv/linux/mips/nptl/pthread_once.c b/sysdeps/unix/sysv/linux/mips/nptl/pthread_once.c index 649b752f54..ddfd32bdb0 100644 --- a/sysdeps/unix/sysv/linux/mips/nptl/pthread_once.c +++ b/sysdeps/unix/sysv/linux/mips/nptl/pthread_once.c @@ -30,7 +30,7 @@ clear_once_control (void *arg) pthread_once_t *once_control = (pthread_once_t *) arg; *once_control = 0; - lll_futex_wake (once_control, INT_MAX); + lll_futex_wake (once_control, INT_MAX, LLL_PRIVATE); } @@ -65,7 +65,7 @@ __pthread_once (once_control, init_routine) if (((oldval ^ newval) & -4) == 0) { /* Same generation, some other thread was faster. Wait. */ - lll_futex_wait (once_control, newval); + lll_futex_wait (once_control, newval, LLL_PRIVATE); continue; } } @@ -84,7 +84,7 @@ __pthread_once (once_control, init_routine) atomic_increment (once_control); /* Wake up all other threads. */ - lll_futex_wake (once_control, INT_MAX); + lll_futex_wake (once_control, INT_MAX, LLL_PRIVATE); break; } diff --git a/sysdeps/unix/sysv/linux/mips/sys/tas.h b/sysdeps/unix/sysv/linux/mips/sys/tas.h index 1183b867b8..309438d78a 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/tas.h +++ b/sysdeps/unix/sysv/linux/mips/sys/tas.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002, 2003, 2004, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Maciej W. Rozycki , 2000. @@ -30,7 +30,7 @@ extern int _test_and_set (int *p, int v) __THROW; #ifdef __USE_EXTERN_INLINES # ifndef _EXTERN_INLINE -# define _EXTERN_INLINE extern __inline +# define _EXTERN_INLINE __extern_inline # endif _EXTERN_INLINE int From c393be3d2f0a41af10f6405104101e0e292fb5ba Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 15 Sep 2007 02:31:47 +0000 Subject: [PATCH 3742/4487] (__MATH_INLINE): Define to __extern_inline whenever that macro is defined. --- sysdeps/alpha/fpu/bits/mathinline.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h index 250171eeb4..5378a181c6 100644 --- a/sysdeps/alpha/fpu/bits/mathinline.h +++ b/sysdeps/alpha/fpu/bits/mathinline.h @@ -23,7 +23,7 @@ # error "Never use directly; include instead." #endif -#ifdef __cplusplus +#ifndef __extern_inline # define __MATH_INLINE __inline #else # define __MATH_INLINE __extern_inline From 2b03bcf4bbf45416ec48e3783388e4850bb668f5 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Mon, 17 Sep 2007 16:31:32 +0000 Subject: [PATCH 3743/4487] * sysdeps/unix/sysv/linux/arm/kernel-features.h: Undefine __ASSUME_PSELECT and __ASSUME_PPOLL. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/kernel-features.h | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog.arm b/ChangeLog.arm index fbd399e9de..8554fadf0b 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2007-09-17 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/arm/kernel-features.h: Undefine + __ASSUME_PSELECT and __ASSUME_PPOLL. + 2007-09-12 Joseph Myers * sysdeps/arm/nptl/tls.h (THREAD_GSCOPE_RESET_FLAG): Use diff --git a/sysdeps/unix/sysv/linux/arm/kernel-features.h b/sysdeps/unix/sysv/linux/arm/kernel-features.h index 0a6ab2180b..ea439d5a06 100644 --- a/sysdeps/unix/sysv/linux/arm/kernel-features.h +++ b/sysdeps/unix/sysv/linux/arm/kernel-features.h @@ -52,3 +52,7 @@ #endif #include_next + +/* These syscalls are not implemented yet for ARM. */ +#undef __ASSUME_PSELECT +#undef __ASSUME_PPOLL From 7c13fa7cec2dede0026a4f37ac77443fdaf4a75f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Sep 2007 16:20:44 +0000 Subject: [PATCH 3744/4487] Correct return value type __THROW marker of splice, vmsplice, and tee. --- sysdeps/unix/sysv/linux/alpha/bits/fcntl.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h index b4f49cf633..7c93183ad4 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h @@ -213,17 +213,17 @@ extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to, /* 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, __off64_t *__offin, int __fdout, - __off64_t *__offout, 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; +extern ssize_t tee (int __fdin, int __fdout, size_t __len, + unsigned int __flags); #endif From cd1530839c0847f8060dd15f57c6419fba9f45a3 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Mon, 24 Sep 2007 18:28:33 +0000 Subject: [PATCH 3745/4487] 2007-09-24 Carlos O'Donell * sysdeps/hppa/nptl/tls.h: Fix comment. * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h: Fix comment format. [__USE_GNU] (O_CLOEXEC): Define. * sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h: Issue error if the library is unsupported. [ASSEMBLER && IS_IN_librt]: Define CENABLE, CDISABLE, and __local_multiple_threads. --- ChangeLog.hppa | 10 ++++++++++ sysdeps/hppa/nptl/tls.h | 2 +- sysdeps/unix/sysv/linux/hppa/bits/fcntl.h | 9 +++++---- sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h | 8 ++++++-- 4 files changed, 22 insertions(+), 7 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 7bb338751a..9501c490f3 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,13 @@ +2007-09-24 Carlos O'Donell + + * sysdeps/hppa/nptl/tls.h: Fix comment. + * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h: Fix comment format. + [__USE_GNU] (O_CLOEXEC): Define. + * sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h: Issue error + if the library is unsupported. + [ASSEMBLER && IS_IN_librt]: Define CENABLE, CDISABLE, and + __local_multiple_threads. + 2007-08-03 Aurelien Jarno * sysdeps/unix/sysv/linux/hppa/linuxthreads/sysdep-cancel.h: diff --git a/sysdeps/hppa/nptl/tls.h b/sysdeps/hppa/nptl/tls.h index d2d725e3b5..2810d713fd 100644 --- a/sysdeps/hppa/nptl/tls.h +++ b/sysdeps/hppa/nptl/tls.h @@ -170,6 +170,6 @@ static inline void __set_cr27(struct pthread *cr27) #define THREAD_GSCOPE_WAIT() \ GL(dl_wait_lookup_done) () -#endif /* __ASSEMBLER__ */ +#endif /* !__ASSEMBLER__ */ #endif /* tls.h */ diff --git a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h index 328df54a33..1bf6bcba75 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h @@ -46,10 +46,11 @@ #ifdef __USE_GNU -# define O_DIRECT 00040000 /* Direct disk access. */ -# define O_DIRECTORY 00010000 /* Must be a directory. */ -# define O_NOFOLLOW 00000200 /* Do not follow links. */ -# define O_NOATIME 04000000 /* Do not set atime. */ +# define O_DIRECT 000040000 /* Direct disk access. */ +# define O_DIRECTORY 000010000 /* Must be a directory. */ +# define O_NOFOLLOW 000000200 /* Do not follow links. */ +# define O_NOATIME 004000000 /* Do not set atime. */ +# define O_CLOEXEC 010000000 /* Set close_on_exec. */ #endif #ifdef __USE_LARGEFILE64 diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h index 375f7324d9..6cffa7631a 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h @@ -173,7 +173,7 @@ L(pre_end): ASM_LINE_SEP \ # define CDISABLE .import __libc_disable_asynccancel,code ASM_LINE_SEP \ bl __libc_disable_asynccancel,%r2 ASM_LINE_SEP # endif -# else +# elif defined IS_IN_librt # ifdef PIC # define CENABLE .import __librt_enable_asynccancel,code ASM_LINE_SEP \ bl __librt_enable_asynccancel,%r2 ASM_LINE_SEP @@ -185,14 +185,18 @@ L(pre_end): ASM_LINE_SEP \ # define CDISABLE .import __librt_disable_asynccancel,code ASM_LINE_SEP \ bl __librt_disable_asynccancel,%r2 ASM_LINE_SEP # endif +# else +# error Unsupported library # endif # ifdef IS_IN_libpthread # define __local_multiple_threads __pthread_multiple_threads # elif !defined NOT_IN_libc # define __local_multiple_threads __libc_multiple_threads -# else +# elif IS_IN_librt # define __local_multiple_threads __librt_multiple_threads +# else +# error Unsupported library # endif # ifndef __ASSEMBLER__ From 017cc6330d0dcb4f315b93a8d612f4f67204b2b4 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Tue, 25 Sep 2007 12:04:54 +0000 Subject: [PATCH 3746/4487] * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Correct return value type and __THROW marker of splice, vmsplice, and tee. * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Correct return value type and __THROW marker of splice, vmsplice, and tee. --- ChangeLog.arm | 5 +++++ ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/arm/bits/fcntl.h | 14 +++++++------- sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 14 +++++++------- 4 files changed, 24 insertions(+), 14 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 8554fadf0b..bc5b67ebe8 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2007-09-25 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Correct return value + type and __THROW marker of splice, vmsplice, and tee. + 2007-09-17 Daniel Jacobowitz * sysdeps/unix/sysv/linux/arm/kernel-features.h: Undefine diff --git a/ChangeLog.mips b/ChangeLog.mips index 0e8fda42db..3ecda0c3c2 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2007-09-25 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Correct return value + type and __THROW marker of splice, vmsplice, and tee. + 2007-09-12 Joseph Myers * sysdeps/mips/nptl/tls.h (THREAD_GSCOPE_RESET_FLAG): Pass diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h index 6fcc5c0c09..bf0321feae 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h @@ -221,17 +221,17 @@ extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to, /* 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, __off64_t *__offin, int __fdout, - __off64_t *__offout, 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; +extern ssize_t tee (int __fdin, int __fdout, size_t __len, + unsigned int __flags); #endif diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index 27af9ede1b..f75188626d 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -234,17 +234,17 @@ extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to, /* 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, __off64_t *__offin, int __fdout, - __off64_t *__offout, 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; +extern ssize_t tee (int __fdin, int __fdout, size_t __len, + unsigned int __flags); #endif From 90e90b183d262e1ea8b3154699c730db84cc2187 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 17 Oct 2007 18:55:32 +0000 Subject: [PATCH 3747/4487] Define F_DUPFD_CLOEXEC. --- sysdeps/unix/sysv/linux/alpha/bits/fcntl.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h index 7c93183ad4..710bace21f 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h @@ -93,6 +93,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. */ #endif /* for F_[GET|SET]FD */ From d3fad32baf601770a164e6367d52a3da1a566f4d Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Thu, 18 Oct 2007 02:19:00 +0000 Subject: [PATCH 3748/4487] 2007-10-17 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h: Correct return value type and __THROW marker of splice, vmsplice, and tee. --- ChangeLog.hppa | 5 +++++ sysdeps/unix/sysv/linux/hppa/bits/fcntl.h | 14 +++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 9501c490f3..e5b7854654 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,8 @@ +2007-10-17 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h: Correct return value + type and __THROW marker of splice, vmsplice, and tee. + 2007-09-24 Carlos O'Donell * sysdeps/hppa/nptl/tls.h: Fix comment. diff --git a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h index 1bf6bcba75..80cbbf44ea 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h @@ -207,17 +207,17 @@ extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to, unsigned int __flags); /* 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, __off64_t *offin, int __fdout, - __off64_t *__offout, 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; +extern ssize_t tee (int __fdin, int __fdout, size_t __len, + unsigned int __flags); #endif From a732ab4917e138732abe67e7a3992238ec82ec7e Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Fri, 19 Oct 2007 01:47:47 +0000 Subject: [PATCH 3749/4487] 2007-10-18 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c (__lll_lock_wait): Add private argument. Pass private to lll_futex_wait. Use atomic_compare_and_exchange_val_acq. (__lll_lock_wait_private): New function. (__lll_timedlock_wait): Add private argument. Pass private to lll_futex_timed_wait. * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: Include kernel-features.h and tls.h. (FUTEX_WAITERS): Define. (FUTEX_OWNER_DIED): Define. (FUTEX_TID_MASK): Define. (__lll_private_flag): Define. (lll_futex_timed_wait): Use __lll_private_flag. (lll_futex_wake): Use __lll_private_flag. (lll_futex_requeue): Use __lll_private_flag. (lll_robust_mutex_dead): Rename to... (lll_robust_dead): ... this. Add private argument. Pass private to lll_futex_wake. (lll_futex_wake_unlock): Use __lll_private_flag. (__lll_mutex_trylock): Remove. (lll_mutex_tryock): Remove. (__lll_robust_mutex_trylock): Rename to... (__lll_robust_trylock): ... this. (lll_robust_mutex_trylock): Rename to... (lll_robust_trylock): ... this. Call __lll_robust_trylock. (__lll_mutex_cond_trylock): Rename to... (__lll_cond_trylock): ... this. (lll_mutex_cond_trylock): Rename to... (lll_cond_trylock): ... this. Call __lll_cond_trylock. (__lll_mutex_lock): Add private argument. (__lll_robust_mutex_lock): Remove. (lll_mutex_lock): Define. (__lll_robust_lock): Define. (lll_robust_mutex_lock): Remove. (__lll_mutex_cond_lock): Remove. (lll_robust_lock) Define. (lll_robust_cond_lock): Define. (lll_robust_mutex_cond_lock): Remove. (__lll_cond_lock): Define. (lll_cond_lock): Define. (__lll_mutex_timedlock): Remove. (__lll_timedlock): Define. (lll_timedlock): Define. (lll_robust_mutex_timedlock): Remove. (lll_robust_timedlock): Define. (__lll_mutex_unlock): Remove. (__lll_unlock): Define. (__lll_robust_mutex_unlock): Remove. (__lll_robust_unlock): Define. (lll_robust_mutex_unlock): Remove. (lll_robust_unlock): Define. (__lll_mutex_unlock_force): Remove. (lll_mutex_unlock_force): Remove. (lll_islocked): Remove. (lll_mutex_islocked): Rename to... (lll_islocked): ... this. (lll_trylock): Remove. (lll_unlock): Remove. (lll_wait_tid): Format whitespace. (lll_cond_wait): Remove. (lll_cond_timedwait): Remove. (lll_cond_wake): Remove. (lll_cond_broadcast): Remove. --- ChangeLog.hppa | 66 ++++ .../unix/sysv/linux/hppa/nptl/lowlevellock.c | 22 +- .../unix/sysv/linux/hppa/nptl/lowlevellock.h | 295 +++++++++--------- 3 files changed, 230 insertions(+), 153 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index e5b7854654..ff92bf21e9 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,69 @@ +2007-10-18 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c + (__lll_lock_wait): Add private argument. Pass private + to lll_futex_wait. Use atomic_compare_and_exchange_val_acq. + (__lll_lock_wait_private): New function. + (__lll_timedlock_wait): Add private argument. Pass private + to lll_futex_timed_wait. + * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: + Include kernel-features.h and tls.h. + (FUTEX_WAITERS): Define. + (FUTEX_OWNER_DIED): Define. + (FUTEX_TID_MASK): Define. + (__lll_private_flag): Define. + (lll_futex_timed_wait): Use __lll_private_flag. + (lll_futex_wake): Use __lll_private_flag. + (lll_futex_requeue): Use __lll_private_flag. + (lll_robust_mutex_dead): Rename to... + (lll_robust_dead): ... this. Add private argument. Pass private + to lll_futex_wake. + (lll_futex_wake_unlock): Use __lll_private_flag. + (__lll_mutex_trylock): Remove. + (lll_mutex_tryock): Remove. + (__lll_robust_mutex_trylock): Rename to... + (__lll_robust_trylock): ... this. + (lll_robust_mutex_trylock): Rename to... + (lll_robust_trylock): ... this. Call __lll_robust_trylock. + (__lll_mutex_cond_trylock): Rename to... + (__lll_cond_trylock): ... this. + (lll_mutex_cond_trylock): Rename to... + (lll_cond_trylock): ... this. Call __lll_cond_trylock. + (__lll_mutex_lock): Add private argument. + (__lll_robust_mutex_lock): Remove. + (lll_mutex_lock): Define. + (__lll_robust_lock): Define. + (lll_robust_mutex_lock): Remove. + (__lll_mutex_cond_lock): Remove. + (lll_robust_lock) Define. + (lll_robust_cond_lock): Define. + (lll_robust_mutex_cond_lock): Remove. + (__lll_cond_lock): Define. + (lll_cond_lock): Define. + (__lll_mutex_timedlock): Remove. + (__lll_timedlock): Define. + (lll_timedlock): Define. + (lll_robust_mutex_timedlock): Remove. + (lll_robust_timedlock): Define. + (__lll_mutex_unlock): Remove. + (__lll_unlock): Define. + (__lll_robust_mutex_unlock): Remove. + (__lll_robust_unlock): Define. + (lll_robust_mutex_unlock): Remove. + (lll_robust_unlock): Define. + (__lll_mutex_unlock_force): Remove. + (lll_mutex_unlock_force): Remove. + (lll_islocked): Remove. + (lll_mutex_islocked): Rename to... + (lll_islocked): ... this. + (lll_trylock): Remove. + (lll_unlock): Remove. + (lll_wait_tid): Format whitespace. + (lll_cond_wait): Remove. + (lll_cond_timedwait): Remove. + (lll_cond_wake): Remove. + (lll_cond_broadcast): Remove. + 2007-10-17 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h: Correct return value diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c index 236d29c1fa..9c49640bd4 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c +++ b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c @@ -23,22 +23,32 @@ #include #include - void -__lll_lock_wait (lll_lock_t *futex) +__lll_lock_wait (lll_lock_t *futex, int private) { do { int oldval = atomic_compare_and_exchange_val_acq (futex, 2, 1); if (oldval != 0) - lll_futex_wait (futex, 2, LLL_SHARED); + lll_futex_wait (futex, 2, private); } - while (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0); + while (atomic_compare_and_exchange_val_acq (futex, 2, 0) != 0); } +void +__lll_lock_wait_private (lll_lock_t *futex) +{ + do + { + int oldval = atomic_compare_and_exchange_val_acq (futex, 2, 1); + if (oldval != 0) + lll_futex_wait (futex, 2, LLL_PRIVATE); + } + while (atomic_compare_and_exchange_val_acq (futex, 2, 0) != 0); +} int -__lll_timedlock_wait (lll_lock_t *futex, const struct timespec *abstime) +__lll_timedlock_wait (lll_lock_t *futex, const struct timespec *abstime, int private) { /* Reject invalid timeouts. */ if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000) @@ -68,7 +78,7 @@ __lll_timedlock_wait (lll_lock_t *futex, const struct timespec *abstime) /* Wait. */ int oldval = atomic_compare_and_exchange_val_acq (futex, 2, 1); if (oldval != 0) - lll_futex_timed_wait (futex, 2, &rt, LLL_SHARED); + lll_futex_timed_wait (futex, 2, &rt, private); } while (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0); return 0; diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h index f8a9555baf..ae5fc1da05 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h @@ -24,8 +24,10 @@ #include #include #include +#include /* Need __ASSUME_PRIVATE_FUTEX. */ +#include /* Need THREAD_*, and header.*. */ -/* The hppa only has one atomic read and modify memory operation, +/* HPPA only has one atomic read and modify memory operation, load and clear, so hppa uses a kernel helper routine to implement compare_and_exchange. See atomic.h for the userspace calling sequence. */ @@ -41,6 +43,11 @@ #define FUTEX_TRYLOCK_PI 8 #define FUTEX_PRIVATE_FLAG 128 +/* Bits used in robust mutex implementation. */ +#define FUTEX_WAITERS 0x80000000 +#define FUTEX_OWNER_DIED 0x40000000 +#define FUTEX_TID_MASK 0x3fffffff + /* Values for 'private' parameter of locking macros. Yes, the definition seems to be backwards. But it is not. The bit will be reversed before passing to the system call. */ @@ -50,30 +57,54 @@ /* Initialize locks to zero. */ #define LLL_MUTEX_LOCK_INITIALIZER (0) +#if !defined NOT_IN_libc || defined IS_IN_rtld +/* In libc.so or ld.so all futexes are private. */ +# ifdef __ASSUME_PRIVATE_FUTEX +# define __lll_private_flag(fl, private) \ + ((fl) | FUTEX_PRIVATE_FLAG) +# else +# define __lll_private_flag(fl, private) \ + ((fl) | THREAD_GETMEM (THREAD_SELF, header.private_futex)) +# endif +#else +# ifdef __ASSUME_PRIVATE_FUTEX +# define __lll_private_flag(fl, private) \ + (((fl) | FUTEX_PRIVATE_FLAG) ^ (private)) +# else +# define __lll_private_flag(fl, private) \ + (__builtin_constant_p (private) \ + ? ((private) == 0 \ + ? ((fl) | THREAD_GETMEM (THREAD_SELF, header.private_futex)) \ + : (fl)) \ + : ((fl) | (((private) ^ FUTEX_PRIVATE_FLAG) \ + & THREAD_GETMEM (THREAD_SELF, header.private_futex)))) +# endif +#endif /* Type for lock object. */ typedef int lll_lock_t; - #define lll_futex_wait(futexp, val, private) \ lll_futex_timed_wait (futexp, val, 0, private) #define lll_futex_timed_wait(futexp, val, timespec, private) \ - ({ \ - INTERNAL_SYSCALL_DECL (__err); \ - long int __ret; \ - __ret = INTERNAL_SYSCALL (futex, __err, 4, \ - (futexp), FUTEX_WAIT, (val), (timespec)); \ - __ret; \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + __ret = INTERNAL_SYSCALL (futex, __err, 4, (futexp), \ + __lll_private_flag (FUTEX_WAIT, private), \ + (val), (timespec)); \ + __ret; \ }) #define lll_futex_wake(futexp, nr, private) \ - ({ \ - INTERNAL_SYSCALL_DECL (__err); \ - long int __ret; \ - __ret = INTERNAL_SYSCALL (futex, __err, 4, \ - (futexp), FUTEX_WAKE, (nr), 0); \ - __ret; \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + __ret = INTERNAL_SYSCALL (futex, __err, 4, (futexp), \ + __lll_private_flag (FUTEX_WAKE, private), \ + (nr), 0); \ + __ret; \ }) #define lll_private_futex_wait(futex, val) \ @@ -123,194 +154,186 @@ typedef int lll_lock_t; }) #endif +/* Returns non-zero if error happened, zero if success. */ +#define lll_futex_requeue(futexp, nr_wake, nr_move, mutex, val, private) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + __ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp), \ + __lll_private_flag (FUTEX_CMP_REQUEUE, private),\ + (nr_wake), (nr_move), (mutex), (val)); \ + __ret; \ + }) - -#define lll_robust_mutex_dead(futexv) \ +#define lll_robust_dead(futexv, private) \ do \ { \ int *__futexp = &(futexv); \ atomic_or (__futexp, FUTEX_OWNER_DIED); \ - lll_futex_wake (__futexp, 1, 0); \ + lll_futex_wake (__futexp, 1, private); \ } \ while (0) -/* Returns non-zero if error happened, zero if success. */ -#define lll_futex_requeue(futexp, nr_wake, nr_move, mutex, val) \ - ({ \ - INTERNAL_SYSCALL_DECL (__err); \ - long int __ret; \ - __ret = INTERNAL_SYSCALL (futex, __err, 6, \ - (futexp), FUTEX_CMP_REQUEUE, (nr_wake), \ - (nr_move), (mutex), (val)); \ - __ret; \ - }) - /* Returns non-zero if error happened, zero if success. */ #define lll_futex_wake_unlock(futexp, nr_wake, nr_wake2, futexp2, private) \ - ({ \ - INTERNAL_SYSCALL_DECL (__err); \ - long int __ret; \ - __ret = INTERNAL_SYSCALL (futex, __err, 6, \ - (futexp), FUTEX_WAKE_OP, (nr_wake), \ - (nr_wake2), (futexp2), \ - FUTEX_OP_CLEAR_WAKE_IF_GT_ONE); \ - __ret; \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + __ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp), \ + __lll_private_flag (FUTEX_WAKE_OP, private), \ + (nr_wake), (nr_wake2), (futexp2), \ + FUTEX_OP_CLEAR_WAKE_IF_GT_ONE); \ + __ret; \ }) -static inline int __attribute__((always_inline)) -__lll_mutex_trylock(lll_lock_t *futex) -{ - return atomic_compare_and_exchange_val_acq (futex, 1, 0) != 0; -} -#define lll_mutex_trylock(lock) __lll_mutex_trylock (&(lock)) - -static inline int __attribute__((always_inline)) -__lll_robust_mutex_trylock(int *futex, int id) +static inline int +__attribute__ ((always_inline)) +__lll_robust_trylock (int *futex, int id) { return atomic_compare_and_exchange_val_acq (futex, id, 0) != 0; } -#define lll_robust_mutex_trylock(lock, id) \ - __lll_robust_mutex_trylock (&(lock), id) - +#define lll_robust_trylock(futex, id) \ + __lll_robust_trylock (&(futex), id) -static inline int __attribute__((always_inline)) -__lll_mutex_cond_trylock(lll_lock_t *futex) +static inline int +__attribute__ ((always_inline)) +__lll_cond_trylock (int *futex) { return atomic_compare_and_exchange_val_acq (futex, 2, 0) != 0; } -#define lll_mutex_cond_trylock(lock) __lll_mutex_cond_trylock (&(lock)) +#define lll_cond_trylock(futex) __lll_cond_trylock (&(futex)) +static inline int +__attribute__ ((always_inline)) +__lll_trylock (int *futex) +{ + return atomic_compare_and_exchange_val_acq (futex, 1, 0) != 0; +} +#define lll_trylock(futex) __lll_trylock (&(futex)) -extern void __lll_lock_wait (lll_lock_t *futex) attribute_hidden; +extern void __lll_lock_wait (lll_lock_t *futex, int private) attribute_hidden; +extern void __lll_lock_wait_private (lll_lock_t *futex) attribute_hidden; static inline void __attribute__((always_inline)) -__lll_mutex_lock(lll_lock_t *futex) +__lll_mutex_lock(lll_lock_t *futex, int private) { - if (atomic_compare_and_exchange_bool_acq (futex, 1, 0) != 0) - __lll_lock_wait (futex); + int val = atomic_compare_and_exchange_val_acq (futex, 1, 0); + + if (__builtin_expect (val != 0, 0)) + { + if (__builtin_constant_p (private) && private == LLL_PRIVATE) + __lll_lock_wait_private (futex); + else + __lll_lock_wait (futex, private); + } } -#define lll_mutex_lock(futex) __lll_mutex_lock (&(futex)) +#define lll_mutex_lock(futex, private) __lll_mutex_lock (&(futex), private) +#define lll_lock(lock, private) lll_mutex_lock (lock, private) -extern int __lll_robust_lock_wait (int *futex) attribute_hidden; +extern int __lll_robust_lock_wait (int *futex, int private) attribute_hidden; -static inline int __attribute__ ((always_inline)) -__lll_robust_mutex_lock (int *futex, int id) +static inline int +__attribute__ ((always_inline)) +__lll_robust_lock (int *futex, int id, int private) { int result = 0; if (atomic_compare_and_exchange_bool_acq (futex, id, 0) != 0) - result = __lll_robust_lock_wait (futex); + result = __lll_robust_lock_wait (futex, private); return result; } -#define lll_robust_mutex_lock(futex, id) \ - __lll_robust_mutex_lock (&(futex), id) +#define lll_robust_lock(futex, id, private) \ + __lll_robust_lock (&(futex), id, private) -static inline void __attribute__ ((always_inline)) -__lll_mutex_cond_lock (lll_lock_t *futex) -{ - if (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0) - __lll_lock_wait (futex); -} -#define lll_mutex_cond_lock(futex) __lll_mutex_cond_lock (&(futex)) +#define lll_robust_cond_lock(futex, id, private) \ + __lll_robust_lock (&(futex), (id) | FUTEX_WAITERS, private) +static inline void +__attribute__ ((always_inline)) +__lll_cond_lock (int *futex, int private) +{ + int val = atomic_compare_and_exchange_val_acq (futex, 2, 0); -#define lll_robust_mutex_cond_lock(futex, id) \ - __lll_robust_mutex_lock (&(futex), (id) | FUTEX_WAITERS) - + if (__builtin_expect (val != 0, 0)) + __lll_lock_wait (futex, private); +} +#define lll_cond_lock(futex, private) __lll_cond_lock (&(futex), private) -extern int __lll_timedlock_wait (lll_lock_t *futex, const struct timespec *) - attribute_hidden; -extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *) - attribute_hidden; +extern int __lll_timedlock_wait (lll_lock_t *futex, const struct timespec *, + int private) attribute_hidden; +extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *, + int private) attribute_hidden; -static inline int __attribute__ ((always_inline)) -__lll_mutex_timedlock (lll_lock_t *futex, const struct timespec *abstime) +static inline int +__attribute__ ((always_inline)) +__lll_timedlock (int *futex, const struct timespec *abstime, int private) { + int val = atomic_compare_and_exchange_val_acq (futex, 1, 0); int result = 0; - if (atomic_compare_and_exchange_bool_acq (futex, 1, 0) != 0) - result = __lll_timedlock_wait (futex, abstime); + + if (__builtin_expect (val != 0, 0)) + result = __lll_timedlock_wait (futex, abstime, private); return result; } -#define lll_mutex_timedlock(futex, abstime) \ - __lll_mutex_timedlock (&(futex), abstime) +#define lll_timedlock(futex, abstime, private) \ + __lll_timedlock (&(futex), abstime, private) static inline int __attribute__ ((always_inline)) -__lll_robust_mutex_timedlock (int *futex, const struct timespec *abstime, - int id) +__lll_robust_timedlock (int *futex, const struct timespec *abstime, + int id, int private) { int result = 0; if (atomic_compare_and_exchange_bool_acq (futex, id, 0) != 0) - result = __lll_robust_timedlock_wait (futex, abstime); + result = __lll_robust_timedlock_wait (futex, abstime, private); return result; } -#define lll_robust_mutex_timedlock(futex, abstime, id) \ - __lll_robust_mutex_timedlock (&(futex), abstime, id) - +#define lll_robust_timedlock(futex, abstime, id, private) \ + __lll_robust_timedlock (&(futex), abstime, id, private) static inline void __attribute__ ((always_inline)) -__lll_mutex_unlock (lll_lock_t *futex) +__lll_unlock (lll_lock_t *futex, int private) { int val = atomic_exchange_rel (futex, 0); if (__builtin_expect (val > 1, 0)) - lll_futex_wake (futex, 1, 0); + lll_futex_wake (futex, 1, private); } -#define lll_mutex_unlock(futex) __lll_mutex_unlock(&(futex)) - +#define lll_unlock(futex, private) __lll_unlock(&(futex), private) static inline void __attribute__ ((always_inline)) -__lll_robust_mutex_unlock (int *futex, int mask) +__lll_robust_unlock (int *futex, int private) { int val = atomic_exchange_rel (futex, 0); - if (__builtin_expect (val & mask, 0)) - lll_futex_wake (futex, 1, 0); -} -#define lll_robust_mutex_unlock(futex) \ - __lll_robust_mutex_unlock(&(futex), FUTEX_WAITERS) - - -static inline void __attribute__ ((always_inline)) -__lll_mutex_unlock_force (lll_lock_t *futex) -{ - (void) atomic_exchange_rel (futex, 0); - lll_futex_wake (futex, 1, 0); + if (__builtin_expect (val & FUTEX_WAITERS, 0)) + lll_futex_wake (futex, 1, private); } -#define lll_mutex_unlock_force(futex) __lll_mutex_unlock_force(&(futex)) +#define lll_robust_unlock(futex, private) \ + __lll_robust_unlock(&(futex), private) -#define lll_mutex_islocked(futex) \ +#define lll_islocked(futex) \ (futex != 0) /* Our internal lock implementation is identical to the binary-compatible - mutex implementation. */ - + mutex implementation. */ #define LLL_LOCK_INITIALIZER (0) #define LLL_LOCK_INITIALIZER_CONST (0) #define LLL_LOCK_INITIALIZER_LOCKED (1) - #define THREAD_INIT_LOCK(PD, LOCK) \ (PD)->LOCK = LLL_LOCK_INITIALIZER extern int lll_unlock_wake_cb (lll_lock_t *__futex) attribute_hidden; -/* The states of a lock are: - 0 - untaken - 1 - taken by one user - >1 - taken by more users */ - -#define lll_trylock(lock) lll_mutex_trylock (lock) -#define lll_lock(lock) lll_mutex_lock (lock) -#define lll_unlock(lock) lll_mutex_unlock (lock) -#define lll_islocked(lock) lll_mutex_islocked (lock) - /* The kernel notifies a process which uses CLONE_CLEARTID via futex wakeup when the clone terminates. The memory location contains the thread ID while the clone is running and is reset to zero afterwards. */ #define lll_wait_tid(tid) \ - do { \ - __typeof (tid) __tid; \ - while ((__tid = (tid)) != 0) \ - lll_futex_wait (&(tid), __tid, 0); \ - } while (0) + do \ + { \ + __typeof (tid) __tid; \ + while ((__tid = (tid)) != 0) \ + lll_futex_wait (&(tid), __tid, 0); \ + } \ + while (0) extern int __lll_timedwait_tid (int *, const struct timespec *) attribute_hidden; @@ -323,26 +346,4 @@ extern int __lll_timedwait_tid (int *, const struct timespec *) __res; \ }) - -/* Conditional variable handling. */ - -extern void __lll_cond_wait (pthread_cond_t *cond) - attribute_hidden; -extern int __lll_cond_timedwait (pthread_cond_t *cond, - const struct timespec *abstime) - attribute_hidden; -extern void __lll_cond_wake (pthread_cond_t *cond) - attribute_hidden; -extern void __lll_cond_broadcast (pthread_cond_t *cond) - attribute_hidden; - -#define lll_cond_wait(cond) \ - __lll_cond_wait (cond) -#define lll_cond_timedwait(cond, abstime) \ - __lll_cond_timedwait (cond, abstime) -#define lll_cond_wake(cond) \ - __lll_cond_wake (cond) -#define lll_cond_broadcast(cond) \ - __lll_cond_broadcast (cond) - #endif /* lowlevellock.h */ From 7e0bd9eb99b3de736ebc420fd88b27f0916271d2 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Mon, 22 Oct 2007 13:11:49 +0000 Subject: [PATCH 3750/4487] Define F_DUPFD_CLOEXEC. --- ChangeLog.am33 | 4 ++++ ChangeLog.arm | 4 ++++ ChangeLog.cris | 4 ++++ ChangeLog.hppa | 4 ++++ ChangeLog.m68k | 4 ++++ ChangeLog.mips | 4 ++++ sysdeps/unix/sysv/linux/am33/bits/fcntl.h | 2 ++ sysdeps/unix/sysv/linux/arm/bits/fcntl.h | 2 ++ sysdeps/unix/sysv/linux/cris/bits/fcntl.h | 2 ++ sysdeps/unix/sysv/linux/hppa/bits/fcntl.h | 2 ++ sysdeps/unix/sysv/linux/m68k/bits/fcntl.h | 2 ++ sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 2 ++ 12 files changed, 36 insertions(+) diff --git a/ChangeLog.am33 b/ChangeLog.am33 index c10f8d08e4..e9b19bd3c4 100644 --- a/ChangeLog.am33 +++ b/ChangeLog.am33 @@ -1,3 +1,7 @@ +2007-10-22 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/am33/bits/fcntl.h (F_DUPFD_CLOEXEC): Define. + 2007-07-10 Daniel Jacobowitz * sysdeps/unix/sysv/linux/am33/bits/fcntl.h: Comment fix. diff --git a/ChangeLog.arm b/ChangeLog.arm index bc5b67ebe8..140a789340 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,7 @@ +2007-10-22 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/arm/bits/fcntl.h (F_DUPFD_CLOEXEC): Define. + 2007-09-25 Joseph Myers * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Correct return value diff --git a/ChangeLog.cris b/ChangeLog.cris index 746c89cbf5..810b53b329 100644 --- a/ChangeLog.cris +++ b/ChangeLog.cris @@ -1,3 +1,7 @@ +2007-10-22 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/cris/bits/fcntl.h (F_DUPFD_CLOEXEC): Define. + 2007-07-10 Daniel Jacobowitz * sysdeps/unix/sysv/linux/cris/bits/fcntl.h: Comment fix. diff --git a/ChangeLog.hppa b/ChangeLog.hppa index ff92bf21e9..cb1b815ceb 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,7 @@ +2007-10-22 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h (F_DUPFD_CLOEXEC): Define. + 2007-10-18 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c diff --git a/ChangeLog.m68k b/ChangeLog.m68k index fb591ad11d..33323c6b3b 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,7 @@ +2007-10-22 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h (F_DUPFD_CLOEXEC): Define. + 2007-07-10 Daniel Jacobowitz * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Comment fix. diff --git a/ChangeLog.mips b/ChangeLog.mips index 3ecda0c3c2..ffbc3441f7 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,7 @@ +2007-10-22 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/mips/bits/fcntl.h (F_DUPFD_CLOEXEC): Define. + 2007-09-25 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Correct return value diff --git a/sysdeps/unix/sysv/linux/am33/bits/fcntl.h b/sysdeps/unix/sysv/linux/am33/bits/fcntl.h index f2c88fad10..9a95318192 100644 --- a/sysdeps/unix/sysv/linux/am33/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/am33/bits/fcntl.h @@ -92,6 +92,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. */ #endif /* For F_[GET|SET]FD. */ diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h index bf0321feae..10d11f2837 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h @@ -98,6 +98,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. */ #endif /* For F_[GET|SET]FD. */ diff --git a/sysdeps/unix/sysv/linux/cris/bits/fcntl.h b/sysdeps/unix/sysv/linux/cris/bits/fcntl.h index 270a8de58a..e14ca2536b 100644 --- a/sysdeps/unix/sysv/linux/cris/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/cris/bits/fcntl.h @@ -94,6 +94,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. */ #endif /* For F_[GET|SET]FD. */ diff --git a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h index 80cbbf44ea..ffc55a5a83 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h @@ -95,6 +95,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. */ #endif /* for F_[GET|SET]FL */ diff --git a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h index 733a088cf5..169a24b734 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h @@ -93,6 +93,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. */ #endif /* For F_[GET|SET]FD. */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index f75188626d..e8107d704b 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -100,6 +100,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. */ #endif /* For F_[GET|SET]FD. */ From 9cd7e988d349280d58188725337f0a9bf1b00157 Mon Sep 17 00:00:00 2001 From: Jeff Bailey Date: Sun, 9 Dec 2007 02:20:34 +0000 Subject: [PATCH 3751/4487] 2007-12-05 Jeff Bailey * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h (__lll_unlock): Use define instead of inline function. (__lll_robust_unlock): Likewise. --- ChangeLog.hppa | 6 +++++ .../unix/sysv/linux/hppa/nptl/lowlevellock.h | 26 +++++++++---------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index cb1b815ceb..3654fc7a5a 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,9 @@ +2007-12-05 Jeff Bailey + + * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h + (__lll_unlock): Use define instead of inline function. + (__lll_robust_unlock): Likewise. + 2007-10-22 Daniel Jacobowitz * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h (F_DUPFD_CLOEXEC): Define. diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h index ae5fc1da05..522380e648 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h @@ -289,22 +289,20 @@ __lll_robust_timedlock (int *futex, const struct timespec *abstime, #define lll_robust_timedlock(futex, abstime, id, private) \ __lll_robust_timedlock (&(futex), abstime, id, private) -static inline void __attribute__ ((always_inline)) -__lll_unlock (lll_lock_t *futex, int private) -{ - int val = atomic_exchange_rel (futex, 0); - if (__builtin_expect (val > 1, 0)) - lll_futex_wake (futex, 1, private); -} +#define __lll_unlock(futex, private) \ + (void) \ + ({ int val = atomic_exchange_rel (futex, 0); \ + if (__builtin_expect (val > 1, 0)) \ + lll_futex_wake (futex, 1, private); \ + }) #define lll_unlock(futex, private) __lll_unlock(&(futex), private) -static inline void __attribute__ ((always_inline)) -__lll_robust_unlock (int *futex, int private) -{ - int val = atomic_exchange_rel (futex, 0); - if (__builtin_expect (val & FUTEX_WAITERS, 0)) - lll_futex_wake (futex, 1, private); -} +#define __lll_robust_unlock(futex,private) \ + (void) \ + ({ int val = atomic_exchange_rel (futex, 0); \ + if (__builtin_expect (val & FUTEX_WAITERS, 0)) \ + lll_futex_wake (futex, 1, private); \ + }) #define lll_robust_unlock(futex, private) \ __lll_robust_unlock(&(futex), private) From c206ce7f956abebed6ece651551d1da041984943 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Fri, 21 Dec 2007 16:57:47 +0000 Subject: [PATCH 3752/4487] * sysdeps/unix/sysv/linux/arm/profil-counter.h: Use the i386 version. * sysdeps/unix/sysv/linux/arm/register-dump.h (register_dump): Update to use ucontext. (REGISTER_DUMP): Likewise. * sysdeps/unix/sysv/linux/arm/sigcontextinfo.h (SIGCONTEXT, SIGCONTEXT_EXTRA_ARGS, GET_PC, GET_FRAME, GET_STACK): Likewise. (sigaction, __sigaction): Define. * sysdeps/unix/sysv/linux/arm/bits/armsigctx.h: Delete. --- ChangeLog.arm | 11 +++ sysdeps/unix/sysv/linux/arm/bits/armsigctx.h | 73 ------------------ sysdeps/unix/sysv/linux/arm/profil-counter.h | 39 +--------- sysdeps/unix/sysv/linux/arm/register-dump.h | 81 +++++++------------- sysdeps/unix/sysv/linux/arm/sigcontextinfo.h | 37 +++++---- 5 files changed, 57 insertions(+), 184 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/arm/bits/armsigctx.h diff --git a/ChangeLog.arm b/ChangeLog.arm index 140a789340..f23b2b92d9 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,14 @@ +2007-12-21 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/arm/profil-counter.h: Use the i386 version. + * sysdeps/unix/sysv/linux/arm/register-dump.h (register_dump): Update + to use ucontext. + (REGISTER_DUMP): Likewise. + * sysdeps/unix/sysv/linux/arm/sigcontextinfo.h (SIGCONTEXT, + SIGCONTEXT_EXTRA_ARGS, GET_PC, GET_FRAME, GET_STACK): Likewise. + (sigaction, __sigaction): Define. + * sysdeps/unix/sysv/linux/arm/bits/armsigctx.h: Delete. + 2007-10-22 Daniel Jacobowitz * sysdeps/unix/sysv/linux/arm/bits/fcntl.h (F_DUPFD_CLOEXEC): Define. diff --git a/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h b/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h deleted file mode 100644 index 4530cdbda9..0000000000 --- a/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h +++ /dev/null @@ -1,73 +0,0 @@ -/* Definition of `struct sigcontext' for Linux/ARM - Copyright (C) 1996, 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 - 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. */ - -/* The format of struct sigcontext changed between 2.0 and 2.1 kernels. - Fortunately 2.0 puts a magic number in the first word and this is not - a legal value for `trap_no', so we can tell them apart. */ - -/* Early 2.2 and 2.3 kernels do not have the `fault_address' member in - the sigcontext structure. Unfortunately there is no reliable way - to test for its presence and this word will contain garbage for too-old - kernels. Versions 2.2.14 and 2.3.35 (plus later versions) are known to - include this element. */ - -#ifndef __ARMSIGCTX_H -#define __ARMSIGCTX_H 1 - -#include - -union k_sigcontext - { - struct - { - unsigned long int trap_no; - unsigned long int error_code; - unsigned long int oldmask; - unsigned long int arm_r0; - unsigned long int arm_r1; - unsigned long int arm_r2; - unsigned long int arm_r3; - unsigned long int arm_r4; - unsigned long int arm_r5; - unsigned long int arm_r6; - unsigned long int arm_r7; - unsigned long int arm_r8; - unsigned long int arm_r9; - unsigned long int arm_r10; - unsigned long int arm_fp; - unsigned long int arm_ip; - unsigned long int arm_sp; - unsigned long int arm_lr; - unsigned long int arm_pc; - unsigned long int arm_cpsr; - unsigned long fault_address; - } v21; - struct - { - unsigned long int magic; - struct pt_regs reg; - unsigned long int trap_no; - unsigned long int error_code; - unsigned long int oldmask; - } v20; -}; - -#define SIGCONTEXT_2_0_MAGIC 0x4B534154 - -#endif /* bits/armsigctx.h */ diff --git a/sysdeps/unix/sysv/linux/arm/profil-counter.h b/sysdeps/unix/sysv/linux/arm/profil-counter.h index 7639883f10..8a6a0bcf3d 100644 --- a/sysdeps/unix/sysv/linux/arm/profil-counter.h +++ b/sysdeps/unix/sysv/linux/arm/profil-counter.h @@ -1,37 +1,2 @@ -/* Low-level statistical profiling support function. Linux/ARM version. - Copyright (C) 1996, 1997, 1998, 2002 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. */ - -#include -#include - -void -profil_counter (int signo, int _a2, int _a3, int _a4, union k_sigcontext sc) -{ - void *pc; - if (sc.v20.magic == SIGCONTEXT_2_0_MAGIC) - pc = (void *) sc.v20.reg.ARM_pc; - else - pc = (void *) sc.v21.arm_pc; - profil_count (pc); - - /* This is a hack to prevent the compiler from implementing the - above function call as a sibcall. The sibcall would overwrite - the signal context. */ - asm volatile (""); -} +/* We can use the ix86 version. */ +#include diff --git a/sysdeps/unix/sysv/linux/arm/register-dump.h b/sysdeps/unix/sysv/linux/arm/register-dump.h index 2baccb2cb7..73ec5fecfe 100644 --- a/sysdeps/unix/sysv/linux/arm/register-dump.h +++ b/sysdeps/unix/sysv/linux/arm/register-dump.h @@ -20,7 +20,7 @@ #include #include -#include +#include /* We will print the register dump in this format: @@ -45,7 +45,7 @@ hexvalue (unsigned long int value, char *buf, size_t len) } static void -register_dump (int fd, union k_sigcontext *ctx) +register_dump (int fd, const struct ucontext *ctx) { char regs[21][8]; struct iovec iov[97]; @@ -61,53 +61,27 @@ register_dump (int fd, union k_sigcontext *ctx) ++nr /* Generate strings of register contents. */ - if (ctx->v20.magic == SIGCONTEXT_2_0_MAGIC) - { - hexvalue (ctx->v20.reg.ARM_r0, regs[0], 8); - hexvalue (ctx->v20.reg.ARM_r1, regs[1], 8); - hexvalue (ctx->v20.reg.ARM_r2, regs[2], 8); - hexvalue (ctx->v20.reg.ARM_r3, regs[3], 8); - hexvalue (ctx->v20.reg.ARM_r4, regs[4], 8); - hexvalue (ctx->v20.reg.ARM_r5, regs[5], 8); - hexvalue (ctx->v20.reg.ARM_r6, regs[6], 8); - hexvalue (ctx->v20.reg.ARM_r7, regs[7], 8); - hexvalue (ctx->v20.reg.ARM_r8, regs[8], 8); - hexvalue (ctx->v20.reg.ARM_r9, regs[9], 8); - hexvalue (ctx->v20.reg.ARM_r10, regs[10], 8); - hexvalue (ctx->v20.reg.ARM_fp, regs[11], 8); - hexvalue (ctx->v20.reg.ARM_ip, regs[12], 8); - hexvalue (ctx->v20.reg.ARM_sp, regs[13], 8); - hexvalue (ctx->v20.reg.ARM_lr, regs[14], 8); - hexvalue (ctx->v20.reg.ARM_pc, regs[15], 8); - hexvalue (ctx->v20.reg.ARM_cpsr, regs[16], 8); - hexvalue (ctx->v20.trap_no, regs[17], 8); - hexvalue (ctx->v20.error_code, regs[18], 8); - hexvalue (ctx->v20.oldmask, regs[19], 8); - } - else - { - hexvalue (ctx->v21.arm_r0, regs[0], 8); - hexvalue (ctx->v21.arm_r1, regs[1], 8); - hexvalue (ctx->v21.arm_r2, regs[2], 8); - hexvalue (ctx->v21.arm_r3, regs[3], 8); - hexvalue (ctx->v21.arm_r4, regs[4], 8); - hexvalue (ctx->v21.arm_r5, regs[5], 8); - hexvalue (ctx->v21.arm_r6, regs[6], 8); - hexvalue (ctx->v21.arm_r7, regs[7], 8); - hexvalue (ctx->v21.arm_r8, regs[8], 8); - hexvalue (ctx->v21.arm_r9, regs[9], 8); - hexvalue (ctx->v21.arm_r10, regs[10], 8); - hexvalue (ctx->v21.arm_fp, regs[11], 8); - hexvalue (ctx->v21.arm_ip, regs[12], 8); - hexvalue (ctx->v21.arm_sp, regs[13], 8); - hexvalue (ctx->v21.arm_lr, regs[14], 8); - hexvalue (ctx->v21.arm_pc, regs[15], 8); - hexvalue (ctx->v21.arm_cpsr, regs[16], 8); - hexvalue (ctx->v21.trap_no, regs[17], 8); - hexvalue (ctx->v21.error_code, regs[18], 8); - hexvalue (ctx->v21.oldmask, regs[19], 8); - hexvalue (ctx->v21.fault_address, regs[20], 8); - } + hexvalue (ctx->uc_mcontext.arm_r0, regs[0], 8); + hexvalue (ctx->uc_mcontext.arm_r1, regs[1], 8); + hexvalue (ctx->uc_mcontext.arm_r2, regs[2], 8); + hexvalue (ctx->uc_mcontext.arm_r3, regs[3], 8); + hexvalue (ctx->uc_mcontext.arm_r4, regs[4], 8); + hexvalue (ctx->uc_mcontext.arm_r5, regs[5], 8); + hexvalue (ctx->uc_mcontext.arm_r6, regs[6], 8); + hexvalue (ctx->uc_mcontext.arm_r7, regs[7], 8); + hexvalue (ctx->uc_mcontext.arm_r8, regs[8], 8); + hexvalue (ctx->uc_mcontext.arm_r9, regs[9], 8); + hexvalue (ctx->uc_mcontext.arm_r10, regs[10], 8); + hexvalue (ctx->uc_mcontext.arm_fp, regs[11], 8); + hexvalue (ctx->uc_mcontext.arm_ip, regs[12], 8); + hexvalue (ctx->uc_mcontext.arm_sp, regs[13], 8); + hexvalue (ctx->uc_mcontext.arm_lr, regs[14], 8); + hexvalue (ctx->uc_mcontext.arm_pc, regs[15], 8); + hexvalue (ctx->uc_mcontext.arm_cpsr, regs[16], 8); + hexvalue (ctx->uc_mcontext.trap_no, regs[17], 8); + hexvalue (ctx->uc_mcontext.error_code, regs[18], 8); + hexvalue (ctx->uc_mcontext.oldmask, regs[19], 8); + hexvalue (ctx->uc_mcontext.fault_address, regs[20], 8); /* Generate the output. */ ADD_STRING ("Register dump:\n\n R0: "); @@ -150,11 +124,8 @@ register_dump (int fd, union k_sigcontext *ctx) ADD_MEM (regs[18], 8); ADD_STRING (" OldMask: "); ADD_MEM (regs[19], 8); - if (ctx->v20.magic != SIGCONTEXT_2_0_MAGIC) - { - ADD_STRING ("\n Addr: "); - ADD_MEM (regs[20], 8); - } + ADD_STRING ("\n Addr: "); + ADD_MEM (regs[20], 8); ADD_STRING ("\n"); @@ -163,4 +134,4 @@ register_dump (int fd, union k_sigcontext *ctx) } -#define REGISTER_DUMP register_dump (fd, &ctx) +#define REGISTER_DUMP register_dump (fd, ctx) diff --git a/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h b/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h index 30c2e3a6ce..72136fdfa0 100644 --- a/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h +++ b/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h @@ -17,35 +17,34 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include +#include #include "kernel-features.h" -#define SIGCONTEXT int _a2, int _a3, int _a4, union k_sigcontext -#define SIGCONTEXT_EXTRA_ARGS _a2, _a3, _a4, +#define SIGCONTEXT siginfo_t *_si, struct ucontext * +#define SIGCONTEXT_EXTRA_ARGS _si, /* The sigcontext structure changed between 2.0 and 2.1 kernels. On any modern system we should be able to assume that the "new" format will be in use. */ -#if __LINUX_KERNEL_VERSION > 131328 -#define GET_PC(ctx) ((void *) ctx.v21.arm_pc) -#define GET_FRAME(ctx) ADVANCE_STACK_FRAME ((void *) ctx.v21.arm_fp) -#define GET_STACK(ctx) ((void *) ctx.v21.arm_sp) - -#else - -#define GET_PC(ctx) ((void *)((ctx.v20.magic == SIGCONTEXT_2_0_MAGIC) ? \ - ctx.v20.reg.ARM_pc : ctx.v21.arm_pc)) -#define GET_FRAME(ctx) \ - ADVANCE_STACK_FRAME((void *)((ctx.v20.magic == SIGCONTEXT_2_0_MAGIC) ? \ - ctx.v20.reg.ARM_fp : ctx.v21.arm_fp)) -#define GET_STACK(ctx) ((void *)((ctx.v20.magic == SIGCONTEXT_2_0_MAGIC) ? \ - ctx.v20.reg.ARM_sp : ctx.v21.arm_sp)) - -#endif +#define GET_PC(ctx) ((void *) (ctx)->uc_mcontext.arm_pc) +#define GET_FRAME(ctx) ADVANCE_STACK_FRAME ((void *) ctx->uc_mcontext.arm_fp) +#define GET_STACK(ctx) ((void *) (ctx)->uc_mcontext.arm_sp) #define ADVANCE_STACK_FRAME(frm) \ ((struct layout *)frm - 1) #define CALL_SIGHANDLER(handler, signo, ctx) \ (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx)) + +/* There is no reliable way to get the sigcontext unless we use a + three-argument signal handler. */ +#define __sigaction(sig, act, oact) ({ \ + (act)->sa_flags |= SA_SIGINFO; \ + (__sigaction) (sig, act, oact); \ +}) + +#define sigaction(sig, act, oact) ({ \ + (act)->sa_flags |= SA_SIGINFO; \ + (sigaction) (sig, act, oact); \ +}) From ec5d6360c4a781658af94cda9ad3c5d68d4ef699 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 16 Jan 2008 23:49:27 +0000 Subject: [PATCH 3753/4487] Fix comment describing shmid_ds. --- sysdeps/unix/sysv/linux/alpha/bits/shm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/shm.h b/sysdeps/unix/sysv/linux/alpha/bits/shm.h index 35226c16ce..cb214e6412 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/shm.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/shm.h @@ -46,7 +46,7 @@ extern int __getpagesize (void) __THROW __attribute__ ((__const__)); /* Type to count number of attaches. */ typedef unsigned long int shmatt_t; -/* Data structure describing a set of semaphores. */ +/* Data structure describing a shared memory segment. */ struct shmid_ds { struct ipc_perm shm_perm; /* operation permission struct */ From 9d9e47980154846164712be8c40e97e56dc775e3 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Sat, 23 Feb 2008 01:18:18 +0000 Subject: [PATCH 3754/4487] 2008-02-22 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/Makefile: Remove. * sysdeps/hppa/nptl/Makefile: Set tst-oddstacklimit-ENV. --- ChangeLog.hppa | 11 ++++++++--- sysdeps/hppa/nptl/Makefile | 6 ++++++ sysdeps/unix/sysv/linux/hppa/Makefile | 2 -- 3 files changed, 14 insertions(+), 5 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/hppa/Makefile diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 3654fc7a5a..8a51f8e11c 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,8 +1,13 @@ +2008-02-22 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/Makefile: Remove. + * sysdeps/hppa/nptl/Makefile: Set tst-oddstacklimit-ENV. + 2007-12-05 Jeff Bailey - * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h - (__lll_unlock): Use define instead of inline function. - (__lll_robust_unlock): Likewise. + * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h + (__lll_unlock): Use define instead of inline function. + (__lll_robust_unlock): Likewise. 2007-10-22 Daniel Jacobowitz diff --git a/sysdeps/hppa/nptl/Makefile b/sysdeps/hppa/nptl/Makefile index 0300693783..78d8973935 100644 --- a/sysdeps/hppa/nptl/Makefile +++ b/sysdeps/hppa/nptl/Makefile @@ -19,3 +19,9 @@ ifeq ($(subdir),csu) gen-as-const-headers += tcb-offsets.sym endif + +# This sets the stack resource limit to 8193kb, which is not a multiple +# of the page size, and therefore an odd sized stack limit. We override +# this because the default is too small to run with. +tst-oddstacklimit-ENV = ; ulimit -s 8193; + diff --git a/sysdeps/unix/sysv/linux/hppa/Makefile b/sysdeps/unix/sysv/linux/hppa/Makefile deleted file mode 100644 index 1c93ec52d9..0000000000 --- a/sysdeps/unix/sysv/linux/hppa/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -# linux/hppa does not use -lmilli anymore -gnulib := -lgcc From 7812cbad411364ceea15e841ca26d14602644851 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Tue, 4 Mar 2008 19:39:30 +0000 Subject: [PATCH 3755/4487] * sysdeps/unix/sysv/linux/mips/bits/siginfo.h (struct siginfo): Reorganize to match other architectures. Replace _timer._timer1 and _timer._timer2 with _timer.si_tid, _timer.si_overrun, and _timer.si_sigval. Correct the type of _sigpoll.si_band. (si_timerid, si_overrun): Define. (__SIGEV_PAD_SIZE): Correct for __WORDSIZE == 64. (__pthread_attr_s): Remove declaration. (struct sigevent): Remove XXX. Add _tid. --- ChangeLog.mips | 11 +++++ sysdeps/unix/sysv/linux/mips/bits/siginfo.h | 51 ++++++++++++--------- 2 files changed, 40 insertions(+), 22 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index ffbc3441f7..d73b218653 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,14 @@ +2008-03-04 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/mips/bits/siginfo.h (struct siginfo): + Reorganize to match other architectures. Replace _timer._timer1 + and _timer._timer2 with _timer.si_tid, _timer.si_overrun, and + _timer.si_sigval. Correct the type of _sigpoll.si_band. + (si_timerid, si_overrun): Define. + (__SIGEV_PAD_SIZE): Correct for __WORDSIZE == 64. + (__pthread_attr_s): Remove declaration. + (struct sigevent): Remove XXX. Add _tid. + 2007-10-22 Daniel Jacobowitz * sysdeps/unix/sysv/linux/mips/bits/fcntl.h (F_DUPFD_CLOEXEC): Define. diff --git a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h index 787e365139..e0fc81a188 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h +++ b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h @@ -1,5 +1,5 @@ /* siginfo_t, sigevent and constants. Linux/MIPS version. - Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005 + Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -70,6 +70,22 @@ typedef struct siginfo __uid_t si_uid; /* Real user ID of sending process. */ } _kill; + /* POSIX.1b timers. */ + struct + { + int si_tid; /* Timer ID. */ + int si_overrun; /* Overrun count. */ + sigval_t si_sigval; /* Signal value. */ + } _timer; + + /* POSIX.1b signals. */ + struct + { + __pid_t si_pid; /* Sending process ID. */ + __uid_t si_uid; /* Real user ID of sending process. */ + sigval_t si_sigval; /* Signal value. */ + } _rt; + /* SIGCHLD. */ struct { @@ -89,24 +105,9 @@ typedef struct siginfo /* SIGPOLL. */ struct { - int si_band; /* Band event for SIGPOLL. */ + long int si_band; /* Band event for SIGPOLL. */ int si_fd; } _sigpoll; - - /* POSIX.1b timers. */ - struct - { - unsigned int _timer1; - unsigned int _timer2; - } _timer; - - /* POSIX.1b signals. */ - struct - { - __pid_t si_pid; /* Sending process ID. */ - __uid_t si_uid; /* Real user ID of sending process. */ - sigval_t si_sigval; /* Signal value. */ - } _rt; } _sifields; } siginfo_t; @@ -114,6 +115,8 @@ typedef struct siginfo /* X/Open requires some more fields with fixed names. */ # define si_pid _sifields._kill.si_pid # define si_uid _sifields._kill.si_uid +# define si_timerid _sifields._timer.si_tid +# define si_overrun _sifields._timer.si_overrun # define si_status _sifields._sigchld.si_status # define si_utime _sifields._sigchld.si_utime # define si_stime _sifields._sigchld.si_stime @@ -265,12 +268,12 @@ enum /* Structure to transport application-defined values with signals. */ # define __SIGEV_MAX_SIZE 64 -# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3) - -/* Forward declaration of the `pthread_attr_t' type. */ -struct __pthread_attr_s; +# if __WORDSIZE == 64 +# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4) +# else +# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3) +# endif -/* XXX This one might need to change!!! */ typedef struct sigevent { sigval_t sigev_value; @@ -281,6 +284,10 @@ typedef struct sigevent { int _pad[__SIGEV_PAD_SIZE]; + /* When SIGEV_SIGNAL and SIGEV_THREAD_ID set, LWP ID of the + thread to receive the signal. */ + __pid_t _tid; + struct { void (*_function) (sigval_t); /* Function to start. */ From 2af06d0d3e6d8dedba11aacfad136b0372d9688c Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 10 Mar 2008 06:20:30 +0000 Subject: [PATCH 3756/4487] [BZ #5753] * sysdeps/mips/ieee754.h: Use protected namespace __BIG_ENDIAN/__LITTLE_ENDIAN. Patch by Aurelien Jarno . --- ChangeLog.mips | 7 +++++++ sysdeps/mips/ieee754.h | 12 ++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index d73b218653..16cdc48540 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,10 @@ +2008-03-09 Andreas Jaeger + + [BZ #5753] + * sysdeps/mips/ieee754.h: Use protected namespace + __BIG_ENDIAN/__LITTLE_ENDIAN. + Patch by Aurelien Jarno . + 2008-03-04 Daniel Jacobowitz * sysdeps/unix/sysv/linux/mips/bits/siginfo.h (struct siginfo): diff --git a/sysdeps/mips/ieee754.h b/sysdeps/mips/ieee754.h index ed13de2775..912e088f7f 100644 --- a/sysdeps/mips/ieee754.h +++ b/sysdeps/mips/ieee754.h @@ -83,7 +83,7 @@ union ieee754_double unsigned int mantissa1:32; #endif /* Big endian. */ #if __BYTE_ORDER == __LITTLE_ENDIAN -# if __FLOAT_WORD_ORDER == BIG_ENDIAN +# if __FLOAT_WORD_ORDER == __BIG_ENDIAN unsigned int mantissa0:20; unsigned int exponent:11; unsigned int negative:1; @@ -109,7 +109,7 @@ union ieee754_double unsigned int mantissa0:19; unsigned int mantissa1:32; #else -# if __FLOAT_WORD_ORDER == BIG_ENDIAN +# if __FLOAT_WORD_ORDER == __BIG_ENDIAN unsigned int mantissa0:19; unsigned int quiet_nan:1; unsigned int exponent:11; @@ -203,7 +203,7 @@ union ieee854_long_double unsigned int mantissa1:32; #endif #if __BYTE_ORDER == __LITTLE_ENDIAN -# if __FLOAT_WORD_ORDER == BIG_ENDIAN +# if __FLOAT_WORD_ORDER == __BIG_ENDIAN unsigned int exponent:15; unsigned int negative:1; unsigned int empty:16; @@ -232,7 +232,7 @@ union ieee854_long_double unsigned int mantissa1:32; #endif #if __BYTE_ORDER == __LITTLE_ENDIAN -# if __FLOAT_WORD_ORDER == BIG_ENDIAN +# if __FLOAT_WORD_ORDER == __BIG_ENDIAN unsigned int exponent:15; unsigned int negative:1; unsigned int empty:16; @@ -272,7 +272,7 @@ union ieee854_long_double unsigned int mantissa1:32; #endif /* Big endian. */ #if __BYTE_ORDER == __LITTLE_ENDIAN -# if __FLOAT_WORD_ORDER == BIG_ENDIAN +# if __FLOAT_WORD_ORDER == __BIG_ENDIAN unsigned int mantissa0:20; unsigned int exponent:11; unsigned int negative:1; @@ -298,7 +298,7 @@ union ieee854_long_double unsigned int mantissa0:19; unsigned int mantissa1:32; #else -# if __FLOAT_WORD_ORDER == BIG_ENDIAN +# if __FLOAT_WORD_ORDER == __BIG_ENDIAN unsigned int mantissa0:19; unsigned int quiet_nan:1; unsigned int exponent:11; From ad9393f0e1261b33e04e01cf8b01858df640c9ff Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Fri, 14 Mar 2008 23:40:55 +0000 Subject: [PATCH 3757/4487] 2008-03-14 Carlos O'Donell Guy Martin [BZ #5923] * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: Pass timespec and futexp. --- ChangeLog.hppa | 7 +++++++ sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 8a51f8e11c..35a273e04e 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,10 @@ +2008-03-14 Carlos O'Donell + Guy Martin + + [BZ #5923] + * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: Pass + timespec and futexp. + 2008-02-22 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/Makefile: Remove. diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h index 522380e648..ec907aefbf 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h @@ -111,7 +111,7 @@ typedef int lll_lock_t; lll_private_futex_timed_wait (futex, val, NULL) #ifdef __ASSUME_PRIVATE_FUTEX -# define lll_private_futex_timed_wait(futex, val, timeout) \ +# define lll_private_futex_timed_wait(futexp, val, timespec) \ ({ \ INTERNAL_SYSCALL_DECL (__err); \ long int __ret; \ From b5186f3bbabfe7348cf8d060d974f9eaf42bb715 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Mon, 24 Mar 2008 13:07:56 +0000 Subject: [PATCH 3758/4487] 2008-03-24 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/sys/user.h: New file. --- ChangeLog.hppa | 4 ++++ sysdeps/unix/sysv/linux/hppa/sys/user.h | 1 + 2 files changed, 5 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/hppa/sys/user.h diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 35a273e04e..abe017e929 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,7 @@ +2008-03-24 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/sys/user.h: New file. + 2008-03-14 Carlos O'Donell Guy Martin diff --git a/sysdeps/unix/sysv/linux/hppa/sys/user.h b/sysdeps/unix/sysv/linux/hppa/sys/user.h new file mode 100644 index 0000000000..c871f1a03d --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/sys/user.h @@ -0,0 +1 @@ +/* This file is not needed, but in practice gdb might try to include it. */ From af7eda0ff6ca16406e8caab1ba2e97d03afc425e Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Wed, 26 Mar 2008 13:21:26 +0000 Subject: [PATCH 3759/4487] * sysdeps/mips/fpu/fesetround.c (fesetround): Use fpu_control_t. * sysdeps/mips/fpu/fgetexcptflg.c (fegetexceptflag): Likewise. * sysdeps/mips/fpu/fsetexcptflg.c (fesetexceptflag): Likewise. --- ChangeLog.mips | 7 +++++++ sysdeps/mips/fpu/fesetround.c | 2 +- sysdeps/mips/fpu/fgetexcptflg.c | 2 +- sysdeps/mips/fpu/fsetexcptflg.c | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 16cdc48540..711f23b730 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,10 @@ +2008-03-26 David Stephenson + Daniel Jacobowitz + + * sysdeps/mips/fpu/fesetround.c (fesetround): Use fpu_control_t. + * sysdeps/mips/fpu/fgetexcptflg.c (fegetexceptflag): Likewise. + * sysdeps/mips/fpu/fsetexcptflg.c (fesetexceptflag): Likewise. + 2008-03-09 Andreas Jaeger [BZ #5753] diff --git a/sysdeps/mips/fpu/fesetround.c b/sysdeps/mips/fpu/fesetround.c index 94771092cf..c28bd603c0 100644 --- a/sysdeps/mips/fpu/fesetround.c +++ b/sysdeps/mips/fpu/fesetround.c @@ -24,7 +24,7 @@ int fesetround (int round) { - unsigned short int cw; + fpu_control_t cw; if ((round & ~0x3) != 0) /* ROUND is no valid rounding mode. */ diff --git a/sysdeps/mips/fpu/fgetexcptflg.c b/sysdeps/mips/fpu/fgetexcptflg.c index 3412159816..27875b376e 100644 --- a/sysdeps/mips/fpu/fgetexcptflg.c +++ b/sysdeps/mips/fpu/fgetexcptflg.c @@ -24,7 +24,7 @@ int fegetexceptflag (fexcept_t *flagp, int excepts) { - fexcept_t temp; + fpu_control_t temp; /* Get the current exceptions. */ _FPU_GETCW (temp); diff --git a/sysdeps/mips/fpu/fsetexcptflg.c b/sysdeps/mips/fpu/fsetexcptflg.c index c65d793178..b1293753cb 100644 --- a/sysdeps/mips/fpu/fsetexcptflg.c +++ b/sysdeps/mips/fpu/fsetexcptflg.c @@ -24,7 +24,7 @@ int fesetexceptflag (const fexcept_t *flagp, int excepts) { - fexcept_t temp; + fpu_control_t temp; /* Get the current exceptions. */ _FPU_GETCW (temp); From 595cb734b2d4daba98ce8d092b98a04fa944e447 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 27 Mar 2008 15:19:41 +0000 Subject: [PATCH 3760/4487] Undefined ARG_MAX if has defined it. --- sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h index 9b27b1ff48..a7c9740a0a 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h @@ -1,5 +1,5 @@ /* Minimum guaranteed maximum values for system limits. Linux/Alpha version. - Copyright (C) 1993-1998,2000,2002,2003,2004 Free Software Foundation, Inc. + Copyright (C) 1993-1998,2000,2002-2004,2008 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 @@ -31,6 +31,9 @@ #ifndef OPEN_MAX # define __undef_OPEN_MAX #endif +#ifndef ARG_MAX +# define __undef_ARG_MAX +#endif /* The kernel sources contain a file with all the needed information. */ #include @@ -50,6 +53,11 @@ # undef OPEN_MAX # undef __undef_OPEN_MAX #endif +/* Have to remove ARG_MAX? */ +#ifdef __undef_ARG_MAX +# undef ARG_MAX +# undef __undef_ARG_MAX +#endif /* The number of data keys per process. */ #define _POSIX_THREAD_KEYS_MAX 128 From 285e04f887a752cc2ad7d74f89956894ac1ac82b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 27 Mar 2008 16:23:14 +0000 Subject: [PATCH 3761/4487] Remove open system call. --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 2 -- 1 file changed, 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 7b3f233566..de2c3ceac0 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -17,8 +17,6 @@ sigstack - sigstack 2 sigstack vfork - vfork 0 __vfork vfork getpriority - getpriority i:ii __getpriority getpriority -open - open Ci:siv __libc_open __open open !__libc_open64 __open64 open64 -open64 open - # proper socket implementations: accept - accept Ci:iBN __libc_accept __accept accept From 04d6ca32f128f2d5571bdeb36e34e306ec71e9f9 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 28 Mar 2008 12:23:06 +0000 Subject: [PATCH 3762/4487] 2008-03-28 Maxim Kuvyrkov Explicitly get address of _DYNAMIC. * sysdeps/m68k/dl-machine.h (elf_machine_dynamic): Retrieve _DYNAMIC from GOT instead of assuming value at GOT pointer. --- ChangeLog.m68k | 6 ++++++ sysdeps/m68k/dl-machine.h | 12 +++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 33323c6b3b..b6aa316ad5 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,9 @@ +2008-03-28 Maxim Kuvyrkov + + Explicitly get address of _DYNAMIC. + * sysdeps/m68k/dl-machine.h (elf_machine_dynamic): Retrieve _DYNAMIC + from GOT instead of assuming value at GOT pointer. + 2007-10-22 Daniel Jacobowitz * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h (F_DUPFD_CLOEXEC): Define. diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index fad1ef9e08..08a439641e 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -33,14 +33,16 @@ elf_machine_matches_host (const Elf32_Ehdr *ehdr) } -/* Return the link-time address of _DYNAMIC. Conveniently, this is the - first element of the GOT. This must be inlined in a function which - uses global data. */ +/* Return the link-time address of _DYNAMIC. + This must be inlined in a function which uses global data. */ static inline Elf32_Addr elf_machine_dynamic (void) { - register Elf32_Addr *got asm ("%a5"); - return *got; + Elf32_Addr addr; + + asm ("move.l _DYNAMIC@GOT.w(%%a5), %0" + : "=a" (addr)); + return addr; } From 625680f978077a09e210e5dcfc66e5700db26dad Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Fri, 28 Mar 2008 17:41:20 +0000 Subject: [PATCH 3763/4487] * sysdeps/unix/sysv/linux/mips/sys/tas.h (_test_and_set): Added memory barriers to enforce strict ordering on weakly ordered systems. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/sys/tas.h | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 711f23b730..0ca16cc546 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2008-03-27 Robin Randhawa + + * sysdeps/unix/sysv/linux/mips/sys/tas.h (_test_and_set): Added memory + barriers to enforce strict ordering on weakly ordered systems. + 2008-03-26 David Stephenson Daniel Jacobowitz diff --git a/sysdeps/unix/sysv/linux/mips/sys/tas.h b/sysdeps/unix/sysv/linux/mips/sys/tas.h index 309438d78a..b370ee4993 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/tas.h +++ b/sysdeps/unix/sysv/linux/mips/sys/tas.h @@ -40,17 +40,19 @@ __NTH (_test_and_set (int *p, int v)) __asm__ __volatile__ ("/* Inline test and set */\n" - "1:\n\t" ".set push\n\t" #if _MIPS_SIM == _ABIO32 ".set mips2\n\t" #endif + "sync\n\t" + "1:\n\t" "ll %0,%3\n\t" "move %1,%4\n\t" "beq %0,%4,2f\n\t" "sc %1,%2\n\t" - ".set pop\n\t" "beqz %1,1b\n" + "sync\n\t" + ".set pop\n\t" "2:\n\t" "/* End test and set */" : "=&r" (r), "=&r" (t), "=m" (*p) From 560bab76911818553f387db768b5c000b53cbbd3 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Fri, 28 Mar 2008 17:43:50 +0000 Subject: [PATCH 3764/4487] * sysdeps/unix/sysv/linux/mips/nptl/bits/local_lim.h: Undefine ARG_MAX if has defined it. --- ChangeLog.mips | 7 ++++++- sysdeps/unix/sysv/linux/mips/nptl/bits/local_lim.h | 10 +++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 0ca16cc546..a7a219e49d 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,4 +1,9 @@ -2008-03-27 Robin Randhawa +2008-03-28 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/nptl/bits/local_lim.h: Undefine + ARG_MAX if has defined it. + +2008-03-28 Robin Randhawa * sysdeps/unix/sysv/linux/mips/sys/tas.h (_test_and_set): Added memory barriers to enforce strict ordering on weakly ordered systems. diff --git a/sysdeps/unix/sysv/linux/mips/nptl/bits/local_lim.h b/sysdeps/unix/sysv/linux/mips/nptl/bits/local_lim.h index 4c3f5f6788..c6fae63a5f 100644 --- a/sysdeps/unix/sysv/linux/mips/nptl/bits/local_lim.h +++ b/sysdeps/unix/sysv/linux/mips/nptl/bits/local_lim.h @@ -1,5 +1,5 @@ /* Minimum guaranteed maximum values for system limits. MIPS Linux version. - Copyright (C) 1993-1998,2000,2002,2003,2004,2007 + Copyright (C) 1993-1998,2000,2002,2003,2004,2007,2008 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -32,6 +32,9 @@ #ifndef OPEN_MAX # define __undef_OPEN_MAX #endif +#ifndef ARG_MAX +# define __undef_ARG_MAX +#endif /* The kernel sources contain a file with all the needed information. */ #include @@ -51,6 +54,11 @@ # undef OPEN_MAX # undef __undef_OPEN_MAX #endif +/* Have to remove ARG_MAX? */ +#ifdef __undef_ARG_MAX +# undef ARG_MAX +# undef __undef_ARG_MAX +#endif /* The number of data keys per process. */ #define _POSIX_THREAD_KEYS_MAX 128 From 7221ac034cb358fc823301b886621d36020813ab Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Wed, 2 Apr 2008 12:58:39 +0000 Subject: [PATCH 3765/4487] 2008-04-02 Aurelien Jarno * sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list: Add truncate and ftruncate systems calls. * sysdeps/unix/sysv/linux/mips/mips64/n32/ftruncate64.c: Make an empty file. * sysdeps/unix/sysv/linux/mips/mips64/n32/truncate64.c: Ditto. --- ChangeLog.mips | 8 +++++ .../sysv/linux/mips/mips64/n32/ftruncate64.c | 29 +---------------- .../sysv/linux/mips/mips64/n32/syscalls.list | 2 ++ .../sysv/linux/mips/mips64/n32/truncate64.c | 31 +------------------ 4 files changed, 12 insertions(+), 58 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index a7a219e49d..cbc72efa83 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,11 @@ +2008-04-02 Aurelien Jarno + + * sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list: Add + truncate and ftruncate systems calls. + * sysdeps/unix/sysv/linux/mips/mips64/n32/ftruncate64.c: Make an + empty file. + * sysdeps/unix/sysv/linux/mips/mips64/n32/truncate64.c: Ditto. + 2008-03-28 Joseph Myers * sysdeps/unix/sysv/linux/mips/nptl/bits/local_lim.h: Undefine diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/ftruncate64.c b/sysdeps/unix/sysv/linux/mips/mips64/n32/ftruncate64.c index 42efcba315..6e25b021ab 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/ftruncate64.c +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/ftruncate64.c @@ -1,28 +1 @@ -/* Copyright (C) 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. */ - -#include - -#include - -extern int ftruncate (int fd, off64_t length); - -int __ftruncate64 (int fd, off64_t length) { - return ftruncate (fd, length); -} -weak_alias (__ftruncate64, ftruncate64) +/* Empty. */ diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list b/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list index babdba0ca6..2e4bed0905 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list @@ -3,3 +3,5 @@ readahead - readahead i:iii __readahead readahead sync_file_range - sync_file_range i:iiii sync_file_range posix_fadvise - fadvise64 i:iiii posix_fadvise +ftruncate - ftruncate i:ii __ftruncate ftruncate ftruncate64 __ftruncate64 +truncate - truncate i:si truncate truncate64 diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/truncate64.c b/sysdeps/unix/sysv/linux/mips/mips64/n32/truncate64.c index 339023f14f..6e25b021ab 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/truncate64.c +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/truncate64.c @@ -1,30 +1 @@ -/* Copyright (C) 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. */ - -#include - -#include -#include - -extern int truncate (const char *__unbounded path, int dummy, - off64_t length); - -int truncate64 (const char *__unbounded path, int dummy, - off64_t length) { - return truncate (path, dummy, length); -} +/* Empty. */ From f6fe80ef8d3f3ce12029ffabda3a01c465e0016b Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Fri, 4 Apr 2008 18:57:47 +0000 Subject: [PATCH 3766/4487] 2008-04-04 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/bits/atomic.h: Remove memory contraint and instead indicate that *mem is written to. --- ChangeLog.hppa | 6 ++++++ sysdeps/unix/sysv/linux/hppa/bits/atomic.h | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index abe017e929..d46a0e0eb9 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,9 @@ +2008-04-04 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/bits/atomic.h: Remove + memory contraint and instead indicate that *mem is + written to. + 2008-03-24 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/sys/user.h: New file. diff --git a/sysdeps/unix/sysv/linux/hppa/bits/atomic.h b/sysdeps/unix/sysv/linux/hppa/bits/atomic.h index 92a309d59f..b8959f7b68 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/atomic.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/atomic.h @@ -55,7 +55,7 @@ typedef uintmax_t uatomic_max_t; #define LWS "0xb0" #define LWS_CAS "0" /* Note r31 is the link register */ -#define LWS_CLOBBER "r1", "r26", "r25", "r24", "r23", "r22", "r21", "r20", "r28", "r31", "memory" +#define LWS_CLOBBER "r1", "r26", "r25", "r24", "r23", "r22", "r21", "r20", "r28", "r31" #define ASM_EAGAIN "11" #if __ASSUME_LWS_CAS @@ -76,7 +76,7 @@ typedef uintmax_t uatomic_max_t; "stw %%r28, %0 \n\t" \ "sub %%r0, %%r21, %%r21 \n\t" \ "stw %%r21, %1 \n\t" \ - : "=m" (lws_ret), "=m" (lws_errno), "=m" (*mem) \ + : "=m" (lws_ret), "=m" (lws_errno), "+m" (*mem) \ : "r" (mem), "r" (oldval), "r" (newval) \ : LWS_CLOBBER \ ); \ From 5f1d477bb4d11eef7be502c79cb8852122ec38d1 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Fri, 11 Apr 2008 14:21:43 +0000 Subject: [PATCH 3767/4487] 2008-04-11 Paul Brook Sandra Loosemore * sysdeps/arm/eabi/machine-gmon.h: New file. * sysdeps/arm/eabi/Versions: Add __gnu_mcount_nc. --- ChangeLog.arm | 6 ++ sysdeps/arm/eabi/Versions | 3 + sysdeps/arm/eabi/machine-gmon.h | 99 +++++++++++++++++++++++++++++++++ 3 files changed, 108 insertions(+) create mode 100644 sysdeps/arm/eabi/machine-gmon.h diff --git a/ChangeLog.arm b/ChangeLog.arm index f23b2b92d9..2ed314c6a2 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,9 @@ +2008-04-11 Paul Brook + Sandra Loosemore + + * sysdeps/arm/eabi/machine-gmon.h: New file. + * sysdeps/arm/eabi/Versions: Add __gnu_mcount_nc. + 2007-12-21 Daniel Jacobowitz * sysdeps/unix/sysv/linux/arm/profil-counter.h: Use the i386 version. diff --git a/sysdeps/arm/eabi/Versions b/sysdeps/arm/eabi/Versions index ca51099cd4..5f2af29c38 100644 --- a/sysdeps/arm/eabi/Versions +++ b/sysdeps/arm/eabi/Versions @@ -14,4 +14,7 @@ libc { # Helper routines __gnu_Unwind_Find_exidx; } + GLIBC_2.8 { + __gnu_mcount_nc; + } } diff --git a/sysdeps/arm/eabi/machine-gmon.h b/sysdeps/arm/eabi/machine-gmon.h new file mode 100644 index 0000000000..189a9a3c6c --- /dev/null +++ b/sysdeps/arm/eabi/machine-gmon.h @@ -0,0 +1,99 @@ +/* Machine-dependent definitions for profiling support. ARM EABI version. + Copyright (C) 2008 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. */ + +/* GCC for the ARM cannot compile __builtin_return_address(N) for N != 0, + so we must use an assembly stub. */ + +#include +static void mcount_internal (u_long frompc, u_long selfpc) __attribute_used__; + +#define _MCOUNT_DECL(frompc, selfpc) \ +static void mcount_internal (u_long frompc, u_long selfpc) + +/* Use an assembly stub with a special ABI. The calling lr has been + pushed to the stack (which will be misaligned). We should preserve + all registers except ip and pop a word off the stack. + + NOTE: This assumes mcount_internal does not clobber any non-core + (coprocessor) registers. Currently this is true, but may require + additional attention in the future. + + The calling sequence looks something like: +func: + push {lr} + bl __gnu_mount_nc + + */ + + +#define MCOUNT \ +void __attribute__((__naked__)) __gnu_mcount_nc(void) \ +{ \ + asm ("push {r0, r1, r2, r3, lr}\n\t" \ + "bic r1, lr, #1\n\t" \ + "ldr r0, [sp, #20]\n\t" \ + "bl mcount_internal\n\t" \ + "pop {r0, r1, r2, r3, ip, lr}\n\t" \ + "bx ip"); \ +} \ +OLD_MCOUNT + +/* Provide old mcount for backwards compatibility. This requires + code be compiled with APCS frame pointers. */ + +#ifndef NO_UNDERSCORES +/* The asm symbols for C functions are `_function'. + The canonical name for the counter function is `mcount', no _. */ +void _mcount (void) asm ("mcount"); +#else +/* The canonical name for the function is `_mcount' in both C and asm, + but some old asm code might assume it's `mcount'. */ +void _mcount (void); +weak_alias (_mcount, mcount) +#endif + +#ifdef __thumb2__ + +#define OLD_MCOUNT \ +void __attribute__((__naked__)) _mcount (void) \ +{ \ + __asm__("push {r0, r1, r2, r3, fp, lr};" \ + "movs r0, fp;" \ + "ittt ne;" \ + "ldrne r0, [r0, #-4];" \ + "movsne r1, lr;" \ + "blne mcount_internal;" \ + "pop {r0, r1, r2, r3, fp, pc}"); \ +} + +#else + +#define OLD_MCOUNT \ +void __attribute__((__naked__)) _mcount (void) \ +{ \ + __asm__("stmdb sp!, {r0, r1, r2, r3, fp, lr};" \ + "movs fp, fp;" \ + "ldrne r0, [fp, #-4];" \ + "movnes r1, lr;" \ + "blne mcount_internal;" \ + "ldmia sp!, {r0, r1, r2, r3, fp, lr};" \ + "bx lr"); \ +} + +#endif From e8d992d7089fab171c9c60fd6a313814f1ff58ee Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Mon, 21 Apr 2008 15:26:44 +0000 Subject: [PATCH 3768/4487] 2008-04-21 Khem Raj * sysdeps/unix/sysv/linux/arm/bits/shm.h: New file. --- ChangeLog.arm | 4 + sysdeps/unix/sysv/linux/arm/bits/shm.h | 104 +++++++++++++++++++++++++ 2 files changed, 108 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/bits/shm.h diff --git a/ChangeLog.arm b/ChangeLog.arm index 2ed314c6a2..5155ce5c3e 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,7 @@ +2008-04-21 Khem Raj + + * sysdeps/unix/sysv/linux/arm/bits/shm.h: New file. + 2008-04-11 Paul Brook Sandra Loosemore diff --git a/sysdeps/unix/sysv/linux/arm/bits/shm.h b/sysdeps/unix/sysv/linux/arm/bits/shm.h new file mode 100644 index 0000000000..4faa287bcc --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/bits/shm.h @@ -0,0 +1,104 @@ +/* Copyright (C) 1995,1996,1997,2000,2002,2004,2008 + 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 _SYS_SHM_H +# error "Never include directly; use instead." +#endif + +#include + +/* Permission flag for shmget. */ +#define SHM_R 0400 /* or S_IRUGO from */ +#define SHM_W 0200 /* or S_IWUGO from */ + +/* Flags for `shmat'. */ +#define SHM_RDONLY 010000 /* attach read-only else read-write */ +#define SHM_RND 020000 /* round attach address to SHMLBA */ +#define SHM_REMAP 040000 /* take-over region on attach */ + +/* Commands for `shmctl'. */ +#define SHM_LOCK 11 /* lock segment (root only) */ +#define SHM_UNLOCK 12 /* unlock segment (root only) */ + +__BEGIN_DECLS + +/* Segment low boundary address multiple. */ +#define SHMLBA (__getpagesize () << 2) +extern int __getpagesize (void) __THROW __attribute__ ((__const__)); + + +/* Type to count number of attaches. */ +typedef unsigned long int shmatt_t; + +/* Data structure describing a shared memory segment. */ +struct shmid_ds + { + struct ipc_perm shm_perm; /* operation permission struct */ + size_t shm_segsz; /* size of segment in bytes */ + __time_t shm_atime; /* time of last shmat() */ + unsigned long int __unused1; + __time_t shm_dtime; /* time of last shmdt() */ + unsigned long int __unused2; + __time_t shm_ctime; /* time of last change by shmctl() */ + unsigned long int __unused3; + __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 __unused4; + unsigned long int __unused5; + }; + +#ifdef __USE_MISC + +/* ipcs ctl commands */ +# define SHM_STAT 13 +# define SHM_INFO 14 + +/* shm_mode upper byte flags */ +# define SHM_DEST 01000 /* segment will be destroyed on last detach */ +# define SHM_LOCKED 02000 /* segment will not be swapped */ +# define SHM_HUGETLB 04000 /* segment is mapped via hugetlb */ +# define SHM_NORESERVE 010000 /* don't check for reservations */ + +struct shminfo + { + unsigned long int shmmax; + unsigned long int shmmin; + unsigned long int shmmni; + unsigned long int shmseg; + unsigned long int shmall; + unsigned long int __unused1; + unsigned long int __unused2; + unsigned long int __unused3; + unsigned long int __unused4; + }; + +struct shm_info + { + int used_ids; + unsigned long int shm_tot; /* total allocated shm */ + unsigned long int shm_rss; /* total resident shm */ + unsigned long int shm_swp; /* total swapped shm */ + unsigned long int swap_attempts; + unsigned long int swap_successes; + }; + +#endif /* __USE_MISC */ + +__END_DECLS From e6e41f0f4963bfb0c0e32f8263ae028b288b5453 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Mon, 21 Apr 2008 15:34:31 +0000 Subject: [PATCH 3769/4487] 2008-04-21 Mike Frysinger * sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h (DOCARGS_6, UNDOCARGS_6): Define. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog.arm b/ChangeLog.arm index 5155ce5c3e..661a68cf0e 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2008-04-21 Mike Frysinger + + * sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h (DOCARGS_6, + UNDOCARGS_6): Define. + 2008-04-21 Khem Raj * sysdeps/unix/sysv/linux/arm/bits/shm.h: New file. diff --git a/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h index 3fb2186d21..9c80771875 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h @@ -73,6 +73,9 @@ # define DOCARGS_5 DOCARGS_4 # define UNDOCARGS_5 UNDOCARGS_4 +# define DOCARGS_6 DOCARGS_5 +# define UNDOCARGS_6 UNDOCARGS_5 + # ifdef IS_IN_libpthread # define CENABLE bl PLTJMP(__pthread_enable_asynccancel) # define CDISABLE bl PLTJMP(__pthread_disable_asynccancel) From b5af13f121890eba73405e47e0b5fbbf6ecfa0cd Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Mon, 21 Apr 2008 15:37:36 +0000 Subject: [PATCH 3770/4487] 2008-04-21 Khem Raj * sysdeps/unix/sysv/linux/arm/ioperm.c: Don't include asm/page.h. --- ChangeLog.arm | 4 ++++ sysdeps/unix/sysv/linux/arm/ioperm.c | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 661a68cf0e..7a5ac15791 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,7 @@ +2008-04-21 Khem Raj + + * sysdeps/unix/sysv/linux/arm/ioperm.c: Don't include asm/page.h. + 2008-04-21 Mike Frysinger * sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h (DOCARGS_6, diff --git a/sysdeps/unix/sysv/linux/arm/ioperm.c b/sysdeps/unix/sysv/linux/arm/ioperm.c index 65ec077336..1fa849d246 100644 --- a/sysdeps/unix/sysv/linux/arm/ioperm.c +++ b/sysdeps/unix/sysv/linux/arm/ioperm.c @@ -45,7 +45,6 @@ #include #include -#include #include #define PATH_ARM_SYSTYPE "/etc/arm_systype" From 93ae51192837ed1f2a284819640d2b08fef68436 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Mon, 21 Apr 2008 15:41:06 +0000 Subject: [PATCH 3771/4487] 2008-04-21 Khem Raj * sysdeps/unix/sysv/linux/mips/xmknod.c: Delete file. --- ChangeLog.mips | 4 +++ sysdeps/unix/sysv/linux/mips/xmknod.c | 51 --------------------------- 2 files changed, 4 insertions(+), 51 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/mips/xmknod.c diff --git a/ChangeLog.mips b/ChangeLog.mips index cbc72efa83..9e8fb04cd4 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,7 @@ +2008-04-21 Khem Raj + + * sysdeps/unix/sysv/linux/mips/xmknod.c: Delete file. + 2008-04-02 Aurelien Jarno * sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list: Add diff --git a/sysdeps/unix/sysv/linux/mips/xmknod.c b/sysdeps/unix/sysv/linux/mips/xmknod.c deleted file mode 100644 index 2d09752405..0000000000 --- a/sysdeps/unix/sysv/linux/mips/xmknod.c +++ /dev/null @@ -1,51 +0,0 @@ -/* xmknod call using old-style Unix mknod system call. - Copyright (C) 1991, 1993, 1995, 1996, 1997, 1998, 2000, 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. */ - -#include -#include -#include -#include - -#include -#include -#include - -/* Create a device file named PATH, with permission and special bits MODE - and device number DEV (which can be constructed from major and minor - device numbers with the `makedev' macro above). */ -int -__xmknod (int vers, const char *path, mode_t mode, dev_t *dev) -{ - unsigned long k_dev; - - if (vers != _MKNOD_VER) - { - __set_errno (EINVAL); - return -1; - } - - /* We must convert the value to dev_t type used by the kernel. */ - k_dev = ((major (*dev) & 0xff) << 8) | (minor (*dev) & 0xff); - - return INLINE_SYSCALL (mknod, 3, CHECK_STRING (path), mode, k_dev); -} - -weak_alias (__xmknod, _xmknod) -libc_hidden_def (__xmknod) From 89e412f53587908cb894a98bea8966db6fe820e3 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Mon, 21 Apr 2008 15:45:00 +0000 Subject: [PATCH 3772/4487] * sysdeps/unix/sysv/linux/hppa/bits/shm.h: Fix comment describing shmid_ds. * sysdeps/unix/sysv/linux/mips/bits/shm.h: Fix comment describing shmid_ds. --- ChangeLog.hppa | 5 +++++ ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/hppa/bits/shm.h | 2 +- sysdeps/unix/sysv/linux/mips/bits/shm.h | 2 +- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index d46a0e0eb9..1bc6138db3 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,8 @@ +2008-04-21 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/hppa/bits/shm.h: Fix comment describing + shmid_ds. + 2008-04-04 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/bits/atomic.h: Remove diff --git a/ChangeLog.mips b/ChangeLog.mips index 9e8fb04cd4..b4253d8275 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2008-04-21 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/mips/bits/shm.h: Fix comment describing + shmid_ds. + 2008-04-21 Khem Raj * sysdeps/unix/sysv/linux/mips/xmknod.c: Delete file. diff --git a/sysdeps/unix/sysv/linux/hppa/bits/shm.h b/sysdeps/unix/sysv/linux/hppa/bits/shm.h index a91f1f575b..13efced9f8 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/shm.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/shm.h @@ -42,7 +42,7 @@ /* Type to count number of attaches. */ typedef unsigned long int shmatt_t; -/* Data structure describing a set of semaphores. */ +/* Data structure describing a shared memory segment. */ struct shmid_ds { struct ipc_perm shm_perm; /* operation permission struct */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/shm.h b/sysdeps/unix/sysv/linux/mips/bits/shm.h index b3083346dd..037980cfa6 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/shm.h +++ b/sysdeps/unix/sysv/linux/mips/bits/shm.h @@ -42,7 +42,7 @@ /* Type to count number of attaches. */ typedef unsigned long int shmatt_t; -/* Data structure describing a set of semaphores. */ +/* Data structure describing a shared memory segment. */ struct shmid_ds { struct ipc_perm shm_perm; /* operation permission struct */ From 7272ed4e474a398b8ce1e7374cdaa8592b840e2a Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Mon, 21 Apr 2008 15:54:22 +0000 Subject: [PATCH 3773/4487] * sysdeps/unix/sysv/linux/arm/check_pf.c: Update from generic version. --- ChangeLog.arm | 5 + sysdeps/unix/sysv/linux/arm/check_pf.c | 126 ++++++++++--------------- 2 files changed, 57 insertions(+), 74 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 7a5ac15791..f05963022d 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2008-04-21 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/arm/check_pf.c: Update from generic + version. + 2008-04-21 Khem Raj * sysdeps/unix/sysv/linux/arm/ioperm.c: Don't include asm/page.h. diff --git a/sysdeps/unix/sysv/linux/arm/check_pf.c b/sysdeps/unix/sysv/linux/arm/check_pf.c index dfca75d374..209f364381 100644 --- a/sysdeps/unix/sysv/linux/arm/check_pf.c +++ b/sysdeps/unix/sysv/linux/arm/check_pf.c @@ -1,5 +1,5 @@ /* Determine protocol families for which interfaces exist. Linux version. - Copyright (C) 2003, 2006, 2007 Free Software Foundation, Inc. + Copyright (C) 2003, 2006, 2007, 2008 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 @@ -35,12 +35,12 @@ #include -#ifndef IFA_F_TEMPORARY -# define IFA_F_TEMPORARY IFA_F_SECONDARY -#endif #ifndef IFA_F_HOMEADDRESS # define IFA_F_HOMEADDRESS 0 #endif +#ifndef IFA_F_OPTIMISTIC +# define IFA_F_OPTIMISTIC 0 +#endif static int @@ -140,89 +140,67 @@ make_request (int fd, pid_t pid, bool *seen_ipv4, bool *seen_ipv6, struct rtattr *rta = IFA_RTA (ifam); size_t len = nlmh->nlmsg_len - NLMSG_LENGTH (sizeof (*ifam)); - switch (ifam->ifa_family) - { - const void *local; - const void *address; + if (ifam->ifa_family != AF_INET + && ifam->ifa_family != AF_INET6) + continue; - case AF_INET: - local = NULL; - address = NULL; - while (RTA_OK (rta, len)) + const void *local = NULL; + const void *address = NULL; + while (RTA_OK (rta, len)) + { + switch (rta->rta_type) { - switch (rta->rta_type) - { - case IFA_LOCAL: - local = RTA_DATA (rta); - break; - - case IFA_ADDRESS: - address = RTA_DATA (rta); - goto out_v4; - } - - rta = RTA_NEXT (rta, len); + case IFA_LOCAL: + local = RTA_DATA (rta); + break; + + case IFA_ADDRESS: + address = RTA_DATA (rta); + goto out; } - if (local != NULL) + rta = RTA_NEXT (rta, len); + } + + if (local != NULL) + { + address = local; + out: + if (ifam->ifa_family == AF_INET) { - out_v4: - if (*(const in_addr_t *) (address ?: local) + if (*(const in_addr_t *) address != htonl (INADDR_LOOPBACK)) *seen_ipv4 = true; } - break; - - case AF_INET6: - local = NULL; - address = NULL; - while (RTA_OK (rta, len)) - { - switch (rta->rta_type) - { - case IFA_LOCAL: - local = RTA_DATA (rta); - break; - - case IFA_ADDRESS: - address = RTA_DATA (rta); - goto out_v6; - } - - rta = RTA_NEXT (rta, len); - } - - if (local != NULL) + else { - out_v6: - if (!IN6_IS_ADDR_LOOPBACK (address ?: local)) + if (!IN6_IS_ADDR_LOOPBACK (address)) *seen_ipv6 = true; } + } - if (ifam->ifa_flags & (IFA_F_DEPRECATED - | IFA_F_TEMPORARY - | IFA_F_HOMEADDRESS)) - { - struct in6ailist *newp = alloca (sizeof (*newp)); - newp->info.flags = (((ifam->ifa_flags & IFA_F_DEPRECATED) - ? in6ai_deprecated : 0) - | ((ifam->ifa_flags - & IFA_F_TEMPORARY) - ? in6ai_temporary : 0) - | ((ifam->ifa_flags - & IFA_F_HOMEADDRESS) - ? in6ai_homeaddress : 0)); - memcpy (newp->info.addr, address ?: local, - sizeof (newp->info.addr)); - newp->next = in6ailist; - in6ailist = newp; - ++in6ailistlen; - } - break; - default: - /* Ignore. */ - break; + struct in6ailist *newp = alloca (sizeof (*newp)); + newp->info.flags = (((ifam->ifa_flags + & (IFA_F_DEPRECATED + | IFA_F_OPTIMISTIC)) + ? in6ai_deprecated : 0) + | ((ifam->ifa_flags + & IFA_F_HOMEADDRESS) + ? in6ai_homeaddress : 0)); + newp->info.prefixlen = ifam->ifa_prefixlen; + newp->info.index = ifam->ifa_index; + if (ifam->ifa_family == AF_INET) + { + newp->info.addr[0] = 0; + newp->info.addr[1] = 0; + newp->info.addr[2] = htonl (0xffff); + newp->info.addr[3] = *(const in_addr_t *) address; } + else + memcpy (newp->info.addr, address, sizeof (newp->info.addr)); + newp->next = in6ailist; + in6ailist = newp; + ++in6ailistlen; } else if (nlmh->nlmsg_type == NLMSG_DONE) /* We found the end, leave the loop. */ From b38a90999fdcfd6f19832ffd0112e11e126d9b02 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 1 May 2008 05:37:45 +0000 Subject: [PATCH 3774/4487] Define RUSAGE_THREAD and RUSAGE_LWP. --- sysdeps/unix/sysv/linux/alpha/bits/resource.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/resource.h b/sysdeps/unix/sysv/linux/alpha/bits/resource.h index 2163745840..92d0199dcd 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/resource.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/resource.h @@ -158,8 +158,16 @@ enum __rusage_who #define RUSAGE_SELF RUSAGE_SELF /* All of its terminated child processes. */ - RUSAGE_CHILDREN = -1 + 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 From 098cab74db4db7c2a229069b9f54c55170f9a6db Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Thu, 1 May 2008 12:34:13 +0000 Subject: [PATCH 3775/4487] 2008-05-01 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/resource.h: Define RUSAGE_THREAD and RUSAGE_LWP. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/bits/resource.h | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index b4253d8275..398fac9cec 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2008-05-01 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/resource.h: Define + RUSAGE_THREAD and RUSAGE_LWP. + 2008-04-21 Daniel Jacobowitz * sysdeps/unix/sysv/linux/mips/bits/shm.h: Fix comment describing diff --git a/sysdeps/unix/sysv/linux/mips/bits/resource.h b/sysdeps/unix/sysv/linux/mips/bits/resource.h index 1c8b99a93d..3cfdc5dbef 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/resource.h +++ b/sysdeps/unix/sysv/linux/mips/bits/resource.h @@ -166,8 +166,16 @@ enum __rusage_who #define RUSAGE_SELF RUSAGE_SELF /* All of its terminated child processes. */ - RUSAGE_CHILDREN = -1 + 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 From 601352feab3364f14ccfc8db193bb3dbc5ad7771 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Mon, 12 May 2008 12:09:21 +0000 Subject: [PATCH 3776/4487] 2008-05-12 Aurelien Jarno [BZ #6506] * sysdeps/hppa/fpu/fesetenv.c: bufptr is always read, temp is read while writing back status word. --- ChangeLog.hppa | 6 ++++++ sysdeps/hppa/fpu/fesetenv.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 1bc6138db3..67524bae36 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,9 @@ +2008-05-12 Aurelien Jarno + + [BZ #6506] + * sysdeps/hppa/fpu/fesetenv.c: bufptr is always read, temp is + read while writing back status word. + 2008-04-21 Daniel Jacobowitz * sysdeps/unix/sysv/linux/hppa/bits/shm.h: Fix comment describing diff --git a/sysdeps/hppa/fpu/fesetenv.c b/sysdeps/hppa/fpu/fesetenv.c index b5753efabd..1a5ca65921 100644 --- a/sysdeps/hppa/fpu/fesetenv.c +++ b/sysdeps/hppa/fpu/fesetenv.c @@ -35,7 +35,7 @@ fesetenv (const fenv_t *envp) bufptr = temp.buf; __asm__ ( "fstd,ma %%fr0,8(%1)\n" - : "=m" (temp), "+r" (bufptr) : : "%r0"); + : "=m" (temp) : "r" (bufptr) : "%r0"); temp.env.__status_word &= ~(FE_ALL_EXCEPT | (FE_ALL_EXCEPT << 27) @@ -56,7 +56,7 @@ fesetenv (const fenv_t *envp) is loaded last and T-Bit is enabled. */ __asm__ ( "fldd,mb -8(%1),%%fr0\n" - : "=m" (temp), "+r" (bufptr) : : "%r0" ); + : : "m" (temp), "r" (bufptr) : "%r0" ); /* Success. */ return 0; From 83d53ff1aa05f0ca0d397f01cd20eef375514f93 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Wed, 21 May 2008 17:50:58 +0000 Subject: [PATCH 3777/4487] 2008-05-21 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/socket.h: Cleanup namespace. (SOCK_DCCP): Define. --- ChangeLog.mips | 5 ++ sysdeps/unix/sysv/linux/mips/bits/socket.h | 72 +++++++++++++++++++--- 2 files changed, 67 insertions(+), 10 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 398fac9cec..8a90a3d402 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2008-05-21 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/socket.h: Cleanup namespace. + (SOCK_DCCP): Define. + 2008-05-01 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/resource.h: Define diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h index 8748c0a04a..f3adf5f1a7 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/socket.h +++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h @@ -1,5 +1,5 @@ /* System-specific socket constants and types. Linux/MIPS version. - Copyright (C) 1991, 92, 1994-1999, 2000, 2001, 2004, 2005, 2006, 2007 + Copyright (C) 1991, 92, 1994-1999, 2000, 2001, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -26,10 +26,8 @@ #endif #define __need_size_t -#define __need_NULL #include -#include #include /* Type for length arguments in socket calls. */ @@ -54,6 +52,8 @@ enum __socket_type SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, datagrams of fixed maximum length. */ #define SOCK_SEQPACKET SOCK_SEQPACKET + SOCK_DCCP = 6, +#define SOCK_DCCP SOCK_DCCP /* Datagram Congestion Control Protocol. */ SOCK_PACKET = 10 /* Linux specific way of getting packets at the dev level. For writing rarp and other similar things on the user level. */ @@ -156,11 +156,7 @@ struct sockaddr /* Structure large enough to hold any socket address (with the historical exception of AF_UNIX). We reserve 128 bytes. */ -#if ULONG_MAX > 0xffffffff -# define __ss_aligntype __uint64_t -#else -# define __ss_aligntype __uint32_t -#endif +#define __ss_aligntype unsigned long int #define _SS_SIZE 128 #define _SS_PADSIZE (_SS_SIZE - (2 * sizeof (__ss_aligntype))) @@ -257,7 +253,7 @@ struct cmsghdr #define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg) #define CMSG_FIRSTHDR(mhdr) \ ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \ - ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL) + ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) 0) #define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \ & (size_t) ~(sizeof (size_t) - 1)) #define CMSG_SPACE(len) (CMSG_ALIGN (len) \ @@ -301,18 +297,74 @@ enum #endif }; +#ifdef __USE_GNU /* User visible structure for SCM_CREDENTIALS message */ - struct ucred { pid_t pid; /* PID of sending process. */ uid_t uid; /* UID of sending process. */ gid_t gid; /* GID of sending process. */ }; +#endif + +/* Ugly workaround for unclean kernel headers. */ +#if !defined __USE_MISC && !defined __USE_GNU +# ifndef FIOGETOWN +# define __SYS_SOCKET_H_undef_FIOGETOWN +# endif +# ifndef FIOSETOWN +# define __SYS_SOCKET_H_undef_FIOSETOWN +# endif +# ifndef SIOCATMARK +# define __SYS_SOCKET_H_undef_SIOCATMARK +# endif +# ifndef SIOCGPGRP +# define __SYS_SOCKET_H_undef_SIOCGPGRP +# endif +# ifndef SIOCGSTAMP +# define __SYS_SOCKET_H_undef_SIOCGSTAMP +# endif +# ifndef SIOCGSTAMPNS +# define __SYS_SOCKET_H_undef_SIOCGSTAMPNS +# endif +# ifndef SIOCSPGRP +# define __SYS_SOCKET_H_undef_SIOCSPGRP +# endif +#endif /* Get socket manipulation related informations from kernel headers. */ #include +#if !defined __USE_MISC && !defined __USE_GNU +# ifdef __SYS_SOCKET_H_undef_FIOGETOWN +# undef __SYS_SOCKET_H_undef_FIOGETOWN +# undef FIOGETOWN +# endif +# ifdef __SYS_SOCKET_H_undef_FIOSETOWN +# undef __SYS_SOCKET_H_undef_FIOSETOWN +# undef FIOSETOWN +# endif +# ifdef __SYS_SOCKET_H_undef_SIOCATMARK +# undef __SYS_SOCKET_H_undef_SIOCATMARK +# undef SIOCATMARK +# endif +# ifdef __SYS_SOCKET_H_undef_SIOCGPGRP +# undef __SYS_SOCKET_H_undef_SIOCGPGRP +# undef SIOCGPGRP +# endif +# ifdef __SYS_SOCKET_H_undef_SIOCGSTAMP +# undef __SYS_SOCKET_H_undef_SIOCGSTAMP +# undef SIOCGSTAMP +# endif +# ifdef __SYS_SOCKET_H_undef_SIOCGSTAMPNS +# undef __SYS_SOCKET_H_undef_SIOCGSTAMPNS +# undef SIOCGSTAMPNS +# endif +# ifdef __SYS_SOCKET_H_undef_SIOCSPGRP +# undef __SYS_SOCKET_H_undef_SIOCSPGRP +# undef SIOCSPGRP +# endif +#endif /* Structure used to manipulate the SO_LINGER option. */ struct linger From 1ba025a9a21eda65d8c36cc0dbb51d214a3ebb1a Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Mon, 2 Jun 2008 01:57:03 +0000 Subject: [PATCH 3778/4487] 2008-06-01 Paul Brook Zack Weinberg Daniel Jacobowitz * sysdeps/arm/nptl/pthread_spin_lock.S, sysdeps/arm/nptl/pthread_spin_trylock.S: Delete. * sysdeps/arm/nptl/pthread_spin_lock.c, sysdeps/arm/nptl/pthread_spin_trylock.c: New files using atomic_compare_and_exchange_val_acq to take spinlocks. * sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h (lll_trylock, lll_cond_trylock): Use atomic_compare_and_exchange_val_acq. (__lll_trylock, __lll_cond_trylock): Delete. * sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h (atomic_exchange_acq): Delete. (atomic_full_barrier): Define. (__arch_compare_and_exchange_val_32_acq): Use named operands. * sysdeps/unix/sysv/linux/arm/eabi/configure.in: Update arch_minimum_kernel to 2.6.16. * sysdeps/unix/sysv/linux/arm/eabi/configure: Regenerated. --- ChangeLog.arm | 20 ++++++++++ ...ead_spin_trylock.S => pthread_spin_lock.c} | 26 +++++------- ...ead_spin_lock.S => pthread_spin_trylock.c} | 22 +++++----- sysdeps/unix/sysv/linux/arm/eabi/configure | 2 +- sysdeps/unix/sysv/linux/arm/eabi/configure.in | 2 +- .../unix/sysv/linux/arm/nptl/bits/atomic.h | 39 +++++++----------- .../unix/sysv/linux/arm/nptl/lowlevellock.h | 40 ++----------------- 7 files changed, 61 insertions(+), 90 deletions(-) rename sysdeps/arm/nptl/{pthread_spin_trylock.S => pthread_spin_lock.c} (73%) rename sysdeps/arm/nptl/{pthread_spin_lock.S => pthread_spin_trylock.c} (76%) diff --git a/ChangeLog.arm b/ChangeLog.arm index f05963022d..212231a692 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,23 @@ +2008-06-01 Paul Brook + Zack Weinberg + Daniel Jacobowitz + + * sysdeps/arm/nptl/pthread_spin_lock.S, + sysdeps/arm/nptl/pthread_spin_trylock.S: Delete. + * sysdeps/arm/nptl/pthread_spin_lock.c, + sysdeps/arm/nptl/pthread_spin_trylock.c: New files using + atomic_compare_and_exchange_val_acq to take spinlocks. + * sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h (lll_trylock, + lll_cond_trylock): Use atomic_compare_and_exchange_val_acq. + (__lll_trylock, __lll_cond_trylock): Delete. + * sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h + (atomic_exchange_acq): Delete. + (atomic_full_barrier): Define. + (__arch_compare_and_exchange_val_32_acq): Use named operands. + * sysdeps/unix/sysv/linux/arm/eabi/configure.in: Update + arch_minimum_kernel to 2.6.16. + * sysdeps/unix/sysv/linux/arm/eabi/configure: Regenerated. + 2008-04-21 Daniel Jacobowitz * sysdeps/unix/sysv/linux/arm/check_pf.c: Update from generic diff --git a/sysdeps/arm/nptl/pthread_spin_trylock.S b/sysdeps/arm/nptl/pthread_spin_lock.c similarity index 73% rename from sysdeps/arm/nptl/pthread_spin_trylock.S rename to sysdeps/arm/nptl/pthread_spin_lock.c index 85931507a7..1217b899ab 100644 --- a/sysdeps/arm/nptl/pthread_spin_trylock.S +++ b/sysdeps/arm/nptl/pthread_spin_lock.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005 Free Software Foundation, Inc. +/* Copyright (C) 2008 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 @@ -16,19 +16,15 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#define _ERRNO_H 1 -#include +#include +#include "pthreadP.h" -#include +int +pthread_spin_lock (pthread_spinlock_t *lock) +{ + while (atomic_compare_and_exchange_val_acq (lock, 1, 0) != 0) + while (*lock != 0) + ; - .text - .align 4 - -ENTRY (pthread_spin_trylock) - mov r1, #1 - swp r2, r1, [r0] - teq r2, #0 - moveq r0, #0 - movne r0, #EBUSY - PSEUDO_RET_NOERRNO -END (pthread_spin_trylock) + return 0; +} diff --git a/sysdeps/arm/nptl/pthread_spin_lock.S b/sysdeps/arm/nptl/pthread_spin_trylock.c similarity index 76% rename from sysdeps/arm/nptl/pthread_spin_lock.S rename to sysdeps/arm/nptl/pthread_spin_trylock.c index bd6adf794a..fb998d2438 100644 --- a/sysdeps/arm/nptl/pthread_spin_lock.S +++ b/sysdeps/arm/nptl/pthread_spin_trylock.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005 Free Software Foundation, Inc. +/* Copyright (C) 2008 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 @@ -16,16 +16,12 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include +#include +#include +#include "pthreadP.h" - .text - .align 4 - -ENTRY (pthread_spin_lock) - mov r1, #1 -1: swp r2, r1, [r0] - teq r2, #0 - bne 1b - mov r0, #0 - PSEUDO_RET_NOERRNO -END (pthread_spin_lock) +int +pthread_spin_trylock (pthread_spinlock_t *lock) +{ + return atomic_compare_and_exchange_val_acq (lock, 1, 0) ? EBUSY : 0; +} diff --git a/sysdeps/unix/sysv/linux/arm/eabi/configure b/sysdeps/unix/sysv/linux/arm/eabi/configure index ab83048894..28fb9ef2de 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/configure +++ b/sysdeps/unix/sysv/linux/arm/eabi/configure @@ -1,5 +1,5 @@ # This file is generated from configure.in by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/unix/sysv/linux/arm/eabi. -arch_minimum_kernel=2.6.14 +arch_minimum_kernel=2.6.16 libc_cv_gcc_unwind_find_fde=no diff --git a/sysdeps/unix/sysv/linux/arm/eabi/configure.in b/sysdeps/unix/sysv/linux/arm/eabi/configure.in index 83aa8fccb4..d1fb7f4224 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/configure.in +++ b/sysdeps/unix/sysv/linux/arm/eabi/configure.in @@ -1,5 +1,5 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. # Local configure fragment for sysdeps/unix/sysv/linux/arm/eabi. -arch_minimum_kernel=2.6.14 +arch_minimum_kernel=2.6.16 libc_cv_gcc_unwind_find_fde=no diff --git a/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h b/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h index 71ed714f37..247ddd389b 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h +++ b/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h @@ -37,22 +37,12 @@ typedef uintmax_t uatomic_max_t; void __arm_link_error (void); -#define atomic_exchange_acq(mem, newvalue) \ - ({ __typeof (*mem) result; \ - if (sizeof (*mem) == 1) \ - __asm__ __volatile__ ("swpb %0, %1, [%2]" \ - : "=&r,&r" (result) \ - : "r,0" (newvalue), "r,r" (mem) : "memory"); \ - else if (sizeof (*mem) == 4) \ - __asm__ __volatile__ ("swp %0, %1, [%2]" \ - : "=&r,&r" (result) \ - : "r,0" (newvalue), "r,r" (mem) : "memory"); \ - else \ - { \ - result = 0; \ - abort (); \ - } \ - result; }) +#define atomic_full_barrier() \ + __asm__ __volatile__ \ + ("mov\tip, #0xffff0fff\n\t" \ + "mov\tlr, pc\n\t" \ + "add\tpc, ip, #(0xffff0fa0 - 0xffff0fff)" \ + : : : "ip", "lr", "cc", "memory"); /* Atomic compare and exchange. This sequence relies on the kernel to provide a compare and exchange operation which is atomic on the @@ -76,18 +66,19 @@ void __arm_link_error (void); register __typeof (oldval) a_tmp asm ("r3"); \ register __typeof (oldval) a_oldval2 asm ("r4") = (oldval); \ __asm__ __volatile__ \ - ("0:\tldr\t%1,[%3]\n\t" \ - "cmp\t%1, %4\n\t" \ + ("0:\tldr\t%[tmp],[%[ptr]]\n\t" \ + "cmp\t%[tmp], %[old2]\n\t" \ "bne\t1f\n\t" \ - "mov\t%0, %4\n\t" \ - "mov\t%1, #0xffff0fff\n\t" \ + "mov\t%[old], %[old2]\n\t" \ + "mov\t%[tmp], #0xffff0fff\n\t" \ "mov\tlr, pc\n\t" \ - "add\tpc, %1, #(0xffff0fc0 - 0xffff0fff)\n\t" \ + "add\tpc, %[tmp], #(0xffff0fc0 - 0xffff0fff)\n\t" \ "bcc\t0b\n\t" \ - "mov\t%1, %4\n\t" \ + "mov\t%[tmp], %[old2]\n\t" \ "1:" \ - : "=&r" (a_oldval), "=&r" (a_tmp) \ - : "r" (a_newval), "r" (a_ptr), "r" (a_oldval2) \ + : [old] "=&r" (a_oldval), [tmp] "=&r" (a_tmp) \ + : [new] "r" (a_newval), [ptr] "r" (a_ptr), \ + [old2] "r" (a_oldval2) \ : "ip", "lr", "cc", "memory"); \ a_tmp; }) diff --git a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h index f48e8679bf..889f97c0f8 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h @@ -126,43 +126,11 @@ }) -static inline int __attribute__((always_inline)) -__lll_trylock (int *futex) -{ - int flag = 1, old; - asm volatile ( - "\tswp %[old], %[flag], [%[futex]] @ try to take the lock\n" - "\tcmp %[old], #1 @ check old lock value\n" - "\tmovlo %[flag], #0 @ if we got it, return 0\n" - "\tswphi %[flag], %[old], [%[futex]] @ if it was contested,\n" - " @ restore the contested flag,\n" - " @ and check whether that won." - : [futex] "+&r" (futex), [flag] "+&r" (flag), [old] "=&r" (old) - : : "memory" ); - - return flag; -} -#define lll_trylock(lock) __lll_trylock (&(lock)) - - -static inline int __attribute__((always_inline)) -__lll_cond_trylock (int *futex) -{ - int flag = 2, old; - asm volatile ( - "\tswp %[old], %[flag], [%[futex]] @ try to take the lock\n" - "\tcmp %[old], #1 @ check old lock value\n" - "\tmovlo %[flag], #0 @ if we got it, return 0\n" - "\tswphi %[flag], %[old], [%[futex]] @ if it was contested,\n" - " @ restore the contested flag,\n" - " @ and check whether that won." - : [futex] "+&r" (futex), [flag] "+&r" (flag), [old] "=&r" (old) - : : "memory" ); - - return flag; -} -#define lll_cond_trylock(lock) __lll_cond_trylock (&(lock)) +#define lll_trylock(lock) \ + atomic_compare_and_exchange_val_acq(&(lock), 1, 0) +#define lll_cond_trylock(lock) \ + atomic_compare_and_exchange_val_acq(&(lock), 2, 0) #define __lll_robust_trylock(futex, id) \ (atomic_compare_and_exchange_val_acq (futex, id, 0) != 0) From 6f85344ee3492c36fc01f8fe77e9802dd24a66ab Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Tue, 17 Jun 2008 11:44:25 +0000 Subject: [PATCH 3779/4487] 2008-06-17 Guy Martin [BZ #5957] * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: Use shared futex in lll_wait_tid(). --- ChangeLog.hppa | 6 ++++++ sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h | 12 ++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 67524bae36..fc76d6d249 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,9 @@ +2008-06-17 Guy Martin + + [BZ #5957] + * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: + Use shared futex in lll_wait_tid(). + 2008-05-12 Aurelien Jarno [BZ #6506] diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h index ec907aefbf..6998a91b64 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h @@ -325,12 +325,12 @@ extern int lll_unlock_wake_cb (lll_lock_t *__futex) attribute_hidden; thread ID while the clone is running and is reset to zero afterwards. */ #define lll_wait_tid(tid) \ - do \ - { \ - __typeof (tid) __tid; \ - while ((__tid = (tid)) != 0) \ - lll_futex_wait (&(tid), __tid, 0); \ - } \ + do \ + { \ + __typeof (tid) __tid; \ + while ((__tid = (tid)) != 0) \ + lll_futex_wait (&(tid), __tid, LLL_SHARED); \ + } \ while (0) extern int __lll_timedwait_tid (int *, const struct timespec *) From 2906e90e245a5b496d89906549e99eccd23fb16c Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Tue, 17 Jun 2008 11:45:52 +0000 Subject: [PATCH 3780/4487] 2008-06-17 Aurelian Jarno Carlos O'Donell [BZ #6037] * sysdeps/unix/sysv/linux/hppa/bits/atomic.h: Check for -11 (-EAGAIN) instead of 11. Loop again when the kernel returns -45 (-EDEADLOCK). Add back memory clobber. Do not initialize lws_ret and lws_errno. --- ChangeLog.hppa | 9 +++++ sysdeps/unix/sysv/linux/hppa/bits/atomic.h | 41 +++++++++++++--------- 2 files changed, 33 insertions(+), 17 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index fc76d6d249..2a4a712dbf 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,12 @@ +2008-06-17 Aurelian Jarno + Carlos O'Donell + + [BZ #6037] + * sysdeps/unix/sysv/linux/hppa/bits/atomic.h: Check for -11 + (-EAGAIN) instead of 11. Loop again when the kernel + returns -45 (-EDEADLOCK). Add back memory clobber. + Do not initialize lws_ret and lws_errno. + 2008-06-17 Guy Martin [BZ #5957] diff --git a/sysdeps/unix/sysv/linux/hppa/bits/atomic.h b/sysdeps/unix/sysv/linux/hppa/bits/atomic.h index b8959f7b68..2964732f41 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/atomic.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/atomic.h @@ -51,34 +51,41 @@ typedef uintmax_t uatomic_max_t; *addr = new; return prev; */ -/* Use the kernel atomic light weight syscalls on hppa */ -#define LWS "0xb0" -#define LWS_CAS "0" -/* Note r31 is the link register */ -#define LWS_CLOBBER "r1", "r26", "r25", "r24", "r23", "r22", "r21", "r20", "r28", "r31" -#define ASM_EAGAIN "11" +/* Use the kernel atomic light weight syscalls on hppa. */ +#define _LWS "0xb0" +#define _LWS_CAS "0" +/* Note r31 is the link register. */ +#define _LWS_CLOBBER "r1", "r26", "r25", "r24", "r23", "r22", "r21", "r20", "r28", "r31", "memory" +/* String constant for -EAGAIN. */ +#define _ASM_EAGAIN "-11" +/* String constant for -EDEADLOCK. */ +#define _ASM_EDEADLOCK "-45" #if __ASSUME_LWS_CAS /* The only basic operation needed is compare and exchange. */ # define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \ ({ \ - volatile int lws_errno = EFAULT; \ - volatile int lws_ret = 0xdeadbeef; \ + volatile int lws_errno; \ + volatile int lws_ret; \ asm volatile( \ "0: \n\t" \ - "copy %3, %%r26 \n\t" \ - "copy %4, %%r25 \n\t" \ - "copy %5, %%r24 \n\t" \ - "ble " LWS "(%%sr2, %%r0) \n\t" \ - "ldi " LWS_CAS ", %%r20 \n\t" \ - "cmpib,=,n " ASM_EAGAIN ",%%r21,0b \n\t" \ + "copy %2, %%r26 \n\t" \ + "copy %3, %%r25 \n\t" \ + "copy %4, %%r24 \n\t" \ + "ble " _LWS "(%%sr2, %%r0) \n\t" \ + "ldi " _LWS_CAS ", %%r20 \n\t" \ + "ldi " _ASM_EAGAIN ", %%r24 \n\t" \ + "cmpb,=,n %%r24, %%r21, 0b \n\t" \ + "nop \n\t" \ + "ldi " _ASM_EDEADLOCK ", %%r25 \n\t" \ + "cmpb,=,n %%r25, %%r21, 0b \n\t" \ "nop \n\t" \ "stw %%r28, %0 \n\t" \ "sub %%r0, %%r21, %%r21 \n\t" \ "stw %%r21, %1 \n\t" \ - : "=m" (lws_ret), "=m" (lws_errno), "+m" (*mem) \ + : "=m" (lws_ret), "=m" (lws_errno) \ : "r" (mem), "r" (oldval), "r" (newval) \ - : LWS_CLOBBER \ + : _LWS_CLOBBER \ ); \ \ if(lws_errno == EFAULT || lws_errno == ENOSYS) \ @@ -91,7 +98,7 @@ typedef uintmax_t uatomic_max_t; ({ \ int ret; \ ret = atomic_compare_and_exchange_val_acq(mem, newval, oldval); \ - /* Return 1 if it was already acquired */ \ + /* Return 1 if it was already acquired. */ \ (ret != oldval); \ }) #else From 4cbcd54d99a64b845d9e8b19ef17d83df6a855cd Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Fri, 18 Jul 2008 13:18:53 +0000 Subject: [PATCH 3781/4487] 2008-07-18 Joseph Myers * sysdeps/arm/libm-test-ulps: Update. --- ChangeLog.arm | 4 + sysdeps/arm/libm-test-ulps | 374 ++++++++++++++++++++++++++++++++++++- 2 files changed, 372 insertions(+), 6 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 212231a692..ceebb11f18 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,7 @@ +2008-07-18 Joseph Myers + + * sysdeps/arm/libm-test-ulps: Update. + 2008-06-01 Paul Brook Zack Weinberg Daniel Jacobowitz diff --git a/sysdeps/arm/libm-test-ulps b/sysdeps/arm/libm-test-ulps index 6a4bcc6147..4fec86ee12 100644 --- a/sysdeps/arm/libm-test-ulps +++ b/sysdeps/arm/libm-test-ulps @@ -13,10 +13,24 @@ float: 2 idouble: 1 ifloat: 2 +# atan2 +Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025": +float: 1 +ifloat: 1 +Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025": +float: 1 +ifloat: 1 +Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772": +float: 1 +ifloat: 1 + # atanh Test "atanh (0.7) == 0.8673005276940531944": double: 1 idouble: 1 +Test "atanh (0.75) == 0.972955074527656652552676371721589865": +float: 1 +ifloat: 1 # cabs Test "cabs (-0.7 + 12.4 i) == 12.419742348374220601176836866763271": @@ -59,6 +73,9 @@ double: 1 float: 3 idouble: 1 ifloat: 3 +Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": +float: 1 +ifloat: 1 Test "Real part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459105272080819308 + 1.1351827477151551088992008271819053 i": double: 1 float: 1 @@ -74,6 +91,11 @@ ifloat: 2 Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i": float: 1 ifloat: 1 +Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 # casinh Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": @@ -92,6 +114,14 @@ idouble: 1 Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i": float: 1 ifloat: 1 +Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 # catan Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": @@ -124,14 +154,23 @@ double: 1 float: 6 idouble: 1 ifloat: 6 +Test "Real part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i": +double: 1 +idouble: 1 # cbrt Test "cbrt (-27.0) == -3.0": double: 1 idouble: 1 +Test "cbrt (0.75) == 0.908560296416069829445605878163630251": +double: 1 +idouble: 1 Test "cbrt (0.970299) == 0.99": double: 1 idouble: 1 +Test "cbrt (0.9921875) == 0.997389022060725270579075195353955217": +double: 1 +idouble: 1 # ccos Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i": @@ -143,6 +182,14 @@ idouble: 1 Test "Imaginary part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i": double: 1 idouble: 1 +Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": +float: 1 +ifloat: 1 # ccosh Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": @@ -159,6 +206,14 @@ ifloat: 1 Test "Imaginary part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i": double: 1 idouble: 1 +Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": +float: 1 +ifloat: 1 # cexp Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": @@ -172,6 +227,9 @@ ifloat: 1 Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i": float: 1 ifloat: 1 +Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": +float: 1 +ifloat: 1 # clog Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i": @@ -179,6 +237,9 @@ double: 1 float: 3 idouble: 1 ifloat: 3 +Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i": +float: 1 +ifloat: 1 # clog10 Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i": @@ -224,6 +285,9 @@ ifloat: 1 Test "Imaginary part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i": double: 1 idouble: 1 +Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i": +float: 1 +ifloat: 1 Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i": float: 1 ifloat: 1 @@ -260,6 +324,22 @@ idouble: 0.2758 ifloat: 0.3667 # cpow +Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": +float: 1 +ifloat: 1 +Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i": +double: 1 +float: 4 +idouble: 1 +ifloat: 4 +Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i": +double: 2 +float: 3 +idouble: 2 +ifloat: 3 Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": double: 1 float: 4 @@ -289,6 +369,12 @@ ifloat: 1 Test "Imaginary part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i": float: 1 ifloat: 1 +Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": +float: 1 +ifloat: 1 # csqrt Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": @@ -318,6 +404,9 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i": +double: 1 +idouble: 1 # ctanh Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": @@ -338,6 +427,14 @@ double: 2 float: 1 idouble: 2 ifloat: 1 +Test "Real part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i": +double: 1 +idouble: 1 + +# erf +Test "erf (1.25) == 0.922900128256458230136523481197281140": +double: 1 +idouble: 1 # erfc Test "erfc (0.7) == 0.32219880616258152702": @@ -351,11 +448,17 @@ ifloat: 2 Test "erfc (2.0) == 0.0046777349810472658379": double: 1 idouble: 1 +Test "erfc (2.0) == 0.00467773498104726583793074363274707139": +double: 1 +idouble: 1 Test "erfc (4.1) == 0.67000276540848983727e-8": double: 24 float: 12 idouble: 24 ifloat: 12 +Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8": +double: 1 +idouble: 1 # exp10 Test "exp10 (-1) == 0.1": @@ -366,6 +469,11 @@ ifloat: 1 Test "exp10 (0.7) == 5.0118723362727228500155418688494574": float: 1 ifloat: 1 +Test "exp10 (0.75) == 5.62341325190349080394951039776481231": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 Test "exp10 (3) == 1000": double: 6 float: 2 @@ -373,6 +481,9 @@ idouble: 6 ifloat: 2 # expm1 +Test "expm1 (0.75) == 1.11700001661267466854536981983709561": +double: 1 +idouble: 1 Test "expm1 (1) == M_El - 1.0": float: 1 ifloat: 1 @@ -429,6 +540,19 @@ float: 1 ifloat: 1 # j0 +Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "j0 (0.75) == 0.864242275166648623555731103820923211": +float: 1 +ifloat: 1 +Test "j0 (10.0) == -0.245935764451348335197760862485328754": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 Test "j0 (10.0) == -0.24593576445134833520": double: 2 float: 1 @@ -437,22 +561,55 @@ ifloat: 1 Test "j0 (2.0) == 0.22389077914123566805": float: 2 ifloat: 2 +Test "j0 (2.0) == 0.223890779141235668051827454649948626": +float: 2 +ifloat: 2 +Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 Test "j0 (8.0) == 0.17165080713755390609": float: 1 ifloat: 1 +Test "j0 (8.0) == 0.171650807137553906090869407851972001": +float: 1 +ifloat: 1 # j1 +Test "j1 (10.0) == 0.0434727461688614366697487680258592883": +float: 2 +ifloat: 2 Test "j1 (10.0) == 0.043472746168861436670": float: 2 ifloat: 2 Test "j1 (2.0) == 0.57672480775687338720": double: 1 idouble: 1 +Test "j1 (2.0) == 0.576724807756873387202448242269137087": +double: 1 +idouble: 1 Test "j1 (8.0) == 0.23463634685391462438": double: 1 idouble: 1 +Test "j1 (8.0) == 0.234636346853914624381276651590454612": +double: 1 +idouble: 1 # jn +Test "jn (0, -4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (0, 0.75) == 0.864242275166648623555731103820923211": +float: 1 +ifloat: 1 +Test "jn (0, 10.0) == -0.245935764451348335197760862485328754": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 Test "jn (0, 10.0) == -0.24593576445134833520": double: 2 float: 1 @@ -461,47 +618,105 @@ ifloat: 1 Test "jn (0, 2.0) == 0.22389077914123566805": float: 2 ifloat: 2 +Test "jn (0, 2.0) == 0.223890779141235668051827454649948626": +float: 2 +ifloat: 2 +Test "jn (0, 4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 Test "jn (0, 8.0) == 0.17165080713755390609": float: 1 ifloat: 1 +Test "jn (0, 8.0) == 0.171650807137553906090869407851972001": +float: 1 +ifloat: 1 +Test "jn (1, 10.0) == 0.0434727461688614366697487680258592883": +float: 2 +ifloat: 2 Test "jn (1, 10.0) == 0.043472746168861436670": float: 2 ifloat: 2 Test "jn (1, 2.0) == 0.57672480775687338720": double: 1 idouble: 1 +Test "jn (1, 2.0) == 0.576724807756873387202448242269137087": +double: 1 +idouble: 1 Test "jn (1, 8.0) == 0.23463634685391462438": double: 1 idouble: 1 +Test "jn (1, 8.0) == 0.234636346853914624381276651590454612": +double: 1 +idouble: 1 Test "jn (10, 0.1) == 0.26905328954342155795e-19": double: 6 float: 4 idouble: 6 ifloat: 4 +Test "jn (10, 0.125) == 0.250543369809369890173993791865771547e-18": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 Test "jn (10, 0.7) == 0.75175911502153953928e-11": double: 3 float: 1 idouble: 3 ifloat: 1 +Test "jn (10, 0.75) == 0.149621713117596814698712483621682835e-10": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (10, 10.0) == 0.207486106633358857697278723518753428": +double: 4 +float: 3 +idouble: 4 +ifloat: 3 Test "jn (10, 10.0) == 0.20748610663335885770": double: 4 float: 3 idouble: 4 ifloat: 3 +Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6": +float: 4 +ifloat: 4 Test "jn (10, 2.0) == 0.25153862827167367096e-6": float: 4 ifloat: 4 Test "jn (3, 0.1) == 0.000020820315754756261429": double: 1 idouble: 1 +Test "jn (3, 0.125) == 0.406503832554912875023029337653442868e-4": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 Test "jn (3, 0.7) == 0.0069296548267508408077": float: 1 ifloat: 1 +Test "jn (3, 0.75) == 0.848438342327410884392755236884386804e-2": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (3, 10.0) == 0.0583793793051868123429354784103409563": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 Test "jn (3, 10.0) == 0.058379379305186812343": double: 3 float: 1 idouble: 3 ifloat: 1 +Test "jn (3, 2.0) == 0.128943249474402051098793332969239835": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 Test "jn (3, 2.0) == 0.12894324947440205110": double: 1 float: 2 @@ -533,11 +748,19 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +Test "log10 (0.75) == -0.124938736608299953132449886193870744": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 Test "log10 (e) == log10(e)": float: 1 ifloat: 1 # log1p +Test "log1p (-0.25) == -0.287682072451780927439219005993827432": +float: 1 +ifloat: 1 Test "log1p (-0.3) == -0.35667494393873237891263871124118447": double: 1 float: 1 @@ -567,11 +790,19 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res": double: 0.2758 float: 0.3667 idouble: 0.2758 ifloat: 0.3667 +Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res": +float: 1 +ifloat: 1 Test "sincos (pi/6, &sin_res, &cos_res) puts 0.866025403784438646764 in cos_res": float: 1 ifloat: 1 @@ -616,11 +847,21 @@ double: 2 float: 1 idouble: 2 ifloat: 1 +Test "y0 (1.0) == 0.0882569642156769579829267660235151628": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 Test "y0 (1.0) == 0.088256964215676957983": double: 2 float: 1 idouble: 2 ifloat: 1 +Test "y0 (1.5) == 0.382448923797758843955068554978089862": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 Test "y0 (1.5) == 0.38244892379775884396": double: 2 float: 1 @@ -629,6 +870,14 @@ ifloat: 1 Test "y0 (10.0) == 0.055671167283599391424": float: 1 ifloat: 1 +Test "y0 (10.0) == 0.0556711672835993914244598774101900481": +float: 1 +ifloat: 1 +Test "y0 (8.0) == 0.223521489387566220527323400498620359": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 Test "y0 (8.0) == 0.22352148938756622053": double: 1 float: 1 @@ -639,6 +888,9 @@ ifloat: 1 Test "y1 (0.1) == -6.4589510947020269877": double: 1 idouble: 1 +Test "y1 (0.125) == -5.19993611253477499595928744876579921": +double: 1 +idouble: 1 Test "y1 (0.7) == -1.1032498719076333697": double: 1 float: 1 @@ -647,16 +899,34 @@ ifloat: 1 Test "y1 (1.5) == -0.41230862697391129595": float: 1 ifloat: 1 +Test "y1 (1.5) == -0.412308626973911295952829820633445323": +float: 1 +ifloat: 1 Test "y1 (10.0) == 0.24901542420695388392": double: 3 float: 1 idouble: 3 ifloat: 1 +Test "y1 (10.0) == 0.249015424206953883923283474663222803": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "y1 (2.0) == -0.107032431540937546888370772277476637": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 Test "y1 (2.0) == -0.10703243154093754689": double: 1 float: 1 idouble: 1 ifloat: 1 +Test "y1 (8.0) == -0.158060461731247494255555266187483550": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 Test "y1 (8.0) == -0.15806046173124749426": double: 1 float: 2 @@ -669,11 +939,21 @@ double: 2 float: 1 idouble: 2 ifloat: 1 +Test "yn (0, 1.0) == 0.0882569642156769579829267660235151628": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 Test "yn (0, 1.0) == 0.088256964215676957983": double: 2 float: 1 idouble: 2 ifloat: 1 +Test "yn (0, 1.5) == 0.382448923797758843955068554978089862": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 Test "yn (0, 1.5) == 0.38244892379775884396": double: 2 float: 1 @@ -682,6 +962,14 @@ ifloat: 1 Test "yn (0, 10.0) == 0.055671167283599391424": float: 1 ifloat: 1 +Test "yn (0, 10.0) == 0.0556711672835993914244598774101900481": +float: 1 +ifloat: 1 +Test "yn (0, 8.0) == 0.223521489387566220527323400498620359": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 Test "yn (0, 8.0) == 0.22352148938756622053": double: 1 float: 1 @@ -690,6 +978,9 @@ ifloat: 1 Test "yn (1, 0.1) == -6.4589510947020269877": double: 1 idouble: 1 +Test "yn (1, 0.125) == -5.19993611253477499595928744876579921": +double: 1 +idouble: 1 Test "yn (1, 0.7) == -1.1032498719076333697": double: 1 float: 1 @@ -698,16 +989,34 @@ ifloat: 1 Test "yn (1, 1.5) == -0.41230862697391129595": float: 1 ifloat: 1 +Test "yn (1, 1.5) == -0.412308626973911295952829820633445323": +float: 1 +ifloat: 1 Test "yn (1, 10.0) == 0.24901542420695388392": double: 3 float: 1 idouble: 3 ifloat: 1 +Test "yn (1, 10.0) == 0.249015424206953883923283474663222803": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "yn (1, 2.0) == -0.107032431540937546888370772277476637": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 Test "yn (1, 2.0) == -0.10703243154093754689": double: 1 float: 1 idouble: 1 ifloat: 1 +Test "yn (1, 8.0) == -0.158060461731247494255555266187483550": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 Test "yn (1, 8.0) == -0.15806046173124749426": double: 1 float: 2 @@ -718,17 +1027,36 @@ double: 2 float: 2 idouble: 2 ifloat: 2 +Test "yn (10, 0.125) == -127057845771019398.252538486899753195": +double: 1 +idouble: 1 Test "yn (10, 0.7) == -0.42447194260703866924e10": double: 3 idouble: 3 +Test "yn (10, 0.75) == -2133501638.90573424452445412893839236": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 Test "yn (10, 1.0) == -0.12161801427868918929e9": double: 1 idouble: 1 +Test "yn (10, 1.0) == -121618014.278689189288130426667971145": +double: 1 +idouble: 1 Test "yn (10, 10.0) == -0.35981415218340272205": double: 1 float: 1 idouble: 1 ifloat: 1 +Test "yn (10, 10.0) == -0.359814152183402722051986577343560609": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (10, 2.0) == -129184.542208039282635913145923304214": +double: 2 +idouble: 2 Test "yn (10, 2.0) == -129184.54220803928264": double: 2 idouble: 2 @@ -737,16 +1065,32 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +Test "yn (3, 0.125) == -2612.69757350066712600220955744091741": +double: 1 +idouble: 1 Test "yn (3, 0.7) == -15.819479052819633505": double: 3 float: 1 idouble: 3 ifloat: 1 +Test "yn (3, 0.75) == -12.9877176234475433186319774484809207": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (3, 10.0) == -0.251362657183837329779204747654240998": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 Test "yn (3, 10.0) == -0.25136265718383732978": double: 1 float: 1 idouble: 1 ifloat: 1 +Test "yn (3, 2.0) == -1.12778377684042778608158395773179238": +double: 1 +idouble: 1 Test "yn (3, 2.0) == -1.1277837768404277861": double: 1 idouble: 1 @@ -758,9 +1102,15 @@ float: 2 idouble: 1 ifloat: 2 +Function: "atan2": +float: 1 +ifloat: 1 + Function: "atanh": double: 1 +float: 1 idouble: 1 +ifloat: 1 Function: "cabs": double: 1 @@ -840,7 +1190,9 @@ idouble: 1 Function: Real part of "ccos": double: 1 +float: 1 idouble: 1 +ifloat: 1 Function: Imaginary part of "ccos": double: 1 @@ -870,6 +1222,10 @@ Function: Imaginary part of "cexp": float: 1 ifloat: 1 +Function: Real part of "clog": +float: 1 +ifloat: 1 + Function: Imaginary part of "clog": double: 1 float: 3 @@ -895,15 +1251,15 @@ idouble: 2 ifloat: 1 Function: Real part of "cpow": -double: 1 +double: 2 float: 4 -idouble: 1 +idouble: 2 ifloat: 4 Function: Imaginary part of "cpow": -double: 1.1031 +double: 2 float: 2 -idouble: 1.1031 +idouble: 2 ifloat: 2 Function: Imaginary part of "csin": @@ -954,6 +1310,10 @@ float: 1 idouble: 2 ifloat: 1 +Function: "erf": +double: 1 +idouble: 1 + Function: "erfc": double: 24 float: 12 @@ -967,7 +1327,9 @@ idouble: 6 ifloat: 2 Function: "expm1": +double: 1 float: 1 +idouble: 1 ifloat: 1 Function: "fmod": @@ -1014,9 +1376,9 @@ ifloat: 1 Function: "log10": double: 1 -float: 1 +float: 2 idouble: 1 -ifloat: 1 +ifloat: 2 Function: "log1p": double: 1 From e39762f948c1aeeeba236c09ae62071d3c1196f8 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Fri, 18 Jul 2008 13:20:51 +0000 Subject: [PATCH 3782/4487] 2008-07-18 Joseph Myers * sysdeps/arm/eabi/feupdateenv.c: New. --- ChangeLog.arm | 4 +++ sysdeps/arm/eabi/feupdateenv.c | 59 ++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 sysdeps/arm/eabi/feupdateenv.c diff --git a/ChangeLog.arm b/ChangeLog.arm index ceebb11f18..867bec49ea 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,7 @@ +2008-07-18 Joseph Myers + + * sysdeps/arm/eabi/feupdateenv.c: New. + 2008-07-18 Joseph Myers * sysdeps/arm/libm-test-ulps: Update. diff --git a/sysdeps/arm/eabi/feupdateenv.c b/sysdeps/arm/eabi/feupdateenv.c new file mode 100644 index 0000000000..9769867ab3 --- /dev/null +++ b/sysdeps/arm/eabi/feupdateenv.c @@ -0,0 +1,59 @@ +/* Install given floating-point environment and raise exceptions. + Copyright (C) 1997, 1999, 2000, 2008 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1997. + + 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. */ + +#include +#include + +#include +#include +#include +#include + +int +__feupdateenv (const fenv_t *envp) +{ + if (GLRO (dl_hwcap) & HWCAP_ARM_VFP) + { + unsigned int temp; + + /* Get the current exception state. */ + _FPU_GETCW (temp); + + /* Install new environment. */ + fesetenv (envp); + + /* Raise the saved exceptions. */ + feraiseexcept (temp & FE_ALL_EXCEPT); + + /* Success. */ + return 0; + } + + /* Unsupported, so fail. */ + return 1; +} + +#include +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) +strong_alias (__feupdateenv, __old_feupdateenv) +compat_symbol (libm, __old_feupdateenv, feupdateenv, GLIBC_2_1); +#endif + +versioned_symbol (libm, __feupdateenv, feupdateenv, GLIBC_2_2); From 6b3dc26c7673476400596dd8687fef8bfc2e43e2 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Fri, 18 Jul 2008 13:21:45 +0000 Subject: [PATCH 3783/4487] 2008-07-18 Joseph Myers * sysdeps/arm/eabi/fgetexcptflg.c: New. * sysdeps/arm/eabi/fsetexcptflg.c (__fesetexceptflag): Operate on set exception flags, not on mask of enabled exceptions. --- ChangeLog.arm | 6 ++++ sysdeps/arm/eabi/fgetexcptflg.c | 54 +++++++++++++++++++++++++++++++++ sysdeps/arm/eabi/fsetexcptflg.c | 6 ++-- 3 files changed, 63 insertions(+), 3 deletions(-) create mode 100644 sysdeps/arm/eabi/fgetexcptflg.c diff --git a/ChangeLog.arm b/ChangeLog.arm index 867bec49ea..5cca360553 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,9 @@ +2008-07-18 Joseph Myers + + * sysdeps/arm/eabi/fgetexcptflg.c: New. + * sysdeps/arm/eabi/fsetexcptflg.c (__fesetexceptflag): Operate on + set exception flags, not on mask of enabled exceptions. + 2008-07-18 Joseph Myers * sysdeps/arm/eabi/feupdateenv.c: New. diff --git a/sysdeps/arm/eabi/fgetexcptflg.c b/sysdeps/arm/eabi/fgetexcptflg.c new file mode 100644 index 0000000000..2259fa37ae --- /dev/null +++ b/sysdeps/arm/eabi/fgetexcptflg.c @@ -0,0 +1,54 @@ +/* Store current representation for exceptions. + Copyright (C) 1997, 1999, 2000, 2008 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1997. + + 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. */ + +#include +#include + +#include +#include +#include +#include + +int +__fegetexceptflag (fexcept_t *flagp, int excepts) +{ + if (GLRO (dl_hwcap) & HWCAP_ARM_VFP) + { + unsigned long temp; + + /* Get the current exceptions. */ + _FPU_GETCW (temp); + + *flagp = temp & excepts & FE_ALL_EXCEPT; + + /* Success. */ + return 0; + } + + /* Unsupported, so fail. */ + return 1; +} + +#include +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) +strong_alias (__fegetexceptflag, __old_fegetexceptflag) +compat_symbol (libm, __old_fegetexceptflag, fegetexceptflag, GLIBC_2_1); +#endif +versioned_symbol (libm, __fegetexceptflag, fegetexceptflag, GLIBC_2_2); diff --git a/sysdeps/arm/eabi/fsetexcptflg.c b/sysdeps/arm/eabi/fsetexcptflg.c index 2e05514f11..3dfeb2c295 100644 --- a/sysdeps/arm/eabi/fsetexcptflg.c +++ b/sysdeps/arm/eabi/fsetexcptflg.c @@ -1,5 +1,5 @@ /* Set floating-point environment exception handling. - Copyright (C) 1997,98,99,2000,01,05 Free Software Foundation, Inc. + Copyright (C) 1997,98,99,2000,01,05,08 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,8 +37,8 @@ __fesetexceptflag (const fexcept_t *flagp, int excepts) _FPU_GETCW (temp); /* Set the desired exception mask. */ - temp &= ~((excepts & FE_ALL_EXCEPT) << FE_EXCEPT_SHIFT); - temp |= (*flagp & excepts & FE_ALL_EXCEPT) << FE_EXCEPT_SHIFT; + temp &= ~(excepts & FE_ALL_EXCEPT); + temp |= (*flagp & excepts & FE_ALL_EXCEPT); /* Save state back to the FPU. */ _FPU_SETCW (temp); From e2570f301f48371a8ca7bbd94b010c4d333010b7 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Fri, 18 Jul 2008 13:24:21 +0000 Subject: [PATCH 3784/4487] * sysdeps/mips/bits/setjmp.h (__jmp_buf): Give name to structure type. --- ChangeLog.mips | 5 +++++ sysdeps/mips/bits/setjmp.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 8a90a3d402..e7aee501db 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2008-07-18 Joseph Myers + + * sysdeps/mips/bits/setjmp.h (__jmp_buf): Give name to structure + type. + 2008-05-21 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/socket.h: Cleanup namespace. diff --git a/sysdeps/mips/bits/setjmp.h b/sysdeps/mips/bits/setjmp.h index 4f159c4988..d3ced9827a 100644 --- a/sysdeps/mips/bits/setjmp.h +++ b/sysdeps/mips/bits/setjmp.h @@ -27,7 +27,7 @@ #include -typedef struct +typedef struct __jmp_buf_internal_tag { #if _MIPS_SIM == _ABIO32 /* Program counter. */ From e46adeb5b0cc2f882fd8243a135164ef025a4058 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 25 Jul 2008 04:43:46 +0000 Subject: [PATCH 3785/4487] epoll.h header for Linux/Alpha. --- sysdeps/unix/sysv/linux/alpha/sys/epoll.h | 143 ++++++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/sys/epoll.h diff --git a/sysdeps/unix/sysv/linux/alpha/sys/epoll.h b/sysdeps/unix/sysv/linux/alpha/sys/epoll.h new file mode 100644 index 0000000000..9f983a5156 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/sys/epoll.h @@ -0,0 +1,143 @@ +/* Copyright (C) 2002-2006, 2007, 2008 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 _SYS_EPOLL_H +#define _SYS_EPOLL_H 1 + +#include +#include + +/* Get __sigset_t. */ +#include + +#ifndef __sigset_t_defined +# define __sigset_t_defined +typedef __sigset_t sigset_t; +#endif + + +/* Flags to be passed to epoll_create2. */ +enum + { + EPOLL_CLOEXEC = 010000000, +#define EPOLL_CLOEXEC EPOLL_CLOEXEC + EPOLL_NONBLOCK = 04 +#define EPOLL_NONBLOCK EPOLL_NONBLOCK + }; + + +enum EPOLL_EVENTS + { + EPOLLIN = 0x001, +#define EPOLLIN EPOLLIN + EPOLLPRI = 0x002, +#define EPOLLPRI EPOLLPRI + EPOLLOUT = 0x004, +#define EPOLLOUT EPOLLOUT + EPOLLRDNORM = 0x040, +#define EPOLLRDNORM EPOLLRDNORM + EPOLLRDBAND = 0x080, +#define EPOLLRDBAND EPOLLRDBAND + EPOLLWRNORM = 0x100, +#define EPOLLWRNORM EPOLLWRNORM + EPOLLWRBAND = 0x200, +#define EPOLLWRBAND EPOLLWRBAND + EPOLLMSG = 0x400, +#define EPOLLMSG EPOLLMSG + EPOLLERR = 0x008, +#define EPOLLERR EPOLLERR + EPOLLHUP = 0x010, +#define EPOLLHUP EPOLLHUP + EPOLLRDHUP = 0x2000, +#define EPOLLRDHUP EPOLLRDHUP + EPOLLONESHOT = (1 << 30), +#define EPOLLONESHOT EPOLLONESHOT + EPOLLET = (1 << 31) +#define EPOLLET EPOLLET + }; + + +/* Valid opcodes ( "op" parameter ) to issue to epoll_ctl(). */ +#define EPOLL_CTL_ADD 1 /* Add a file descriptor to the interface. */ +#define EPOLL_CTL_DEL 2 /* Remove a file descriptor from the interface. */ +#define EPOLL_CTL_MOD 3 /* Change file descriptor epoll_event structure. */ + + +typedef union epoll_data +{ + void *ptr; + int fd; + uint32_t u32; + uint64_t u64; +} epoll_data_t; + +struct epoll_event +{ + uint32_t events; /* Epoll events */ + epoll_data_t data; /* User data variable */ +}; + + +__BEGIN_DECLS + +/* Creates an epoll instance. Returns an fd for the new instance. + The "size" parameter is a hint specifying the number of file + descriptors to be associated with the new instance. The fd + returned by epoll_create() should be closed with close(). */ +extern int epoll_create (int __size) __THROW; + +/* Same as epoll_create but with an additional FLAGS parameter. */ +extern int epoll_create2 (int __size, int __flags) __THROW; + + +/* Manipulate an epoll instance "epfd". Returns 0 in case of success, + -1 in case of error ( the "errno" variable will contain the + specific error code ) The "op" parameter is one of the EPOLL_CTL_* + constants defined above. The "fd" parameter is the target of the + operation. The "event" parameter describes which events the caller + is interested in and any associated user data. */ +extern int epoll_ctl (int __epfd, int __op, int __fd, + struct epoll_event *__event) __THROW; + + +/* Wait for events on an epoll instance "epfd". Returns the number of + triggered events returned in "events" buffer. Or -1 in case of + error with the "errno" variable set to the specific error code. The + "events" parameter is a buffer that will contain triggered + events. The "maxevents" is the maximum number of events to be + returned ( usually size of "events" ). The "timeout" parameter + specifies the maximum wait time in milliseconds (-1 == infinite). + + This function is a cancellation point and therefore not marked with + __THROW. */ +extern int epoll_wait (int __epfd, struct epoll_event *__events, + int __maxevents, int __timeout); + + +/* Same as epoll_wait, but the thread's signal mask is temporarily + and atomically replaced with the one provided as parameter. + + This function is a cancellation point and therefore not marked with + __THROW. */ +extern int epoll_pwait (int __epfd, struct epoll_event *__events, + int __maxevents, int __timeout, + __const __sigset_t *__ss); + +__END_DECLS + +#endif /* sys/epoll.h */ From b0ad350d1b5fbffe9935b68a83b30bae5bc8efec Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 25 Jul 2008 04:43:52 +0000 Subject: [PATCH 3786/4487] eventfd.h header for Linux/Alpha. --- sysdeps/unix/sysv/linux/alpha/sys/eventfd.h | 52 +++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/sys/eventfd.h diff --git a/sysdeps/unix/sysv/linux/alpha/sys/eventfd.h b/sysdeps/unix/sysv/linux/alpha/sys/eventfd.h new file mode 100644 index 0000000000..c8ce554625 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/sys/eventfd.h @@ -0,0 +1,52 @@ +/* Copyright (C) 2007, 2008 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 _SYS_EVENTFD_H +#define _SYS_EVENTFD_H 1 + +#include + + +/* Type for event counter. */ +typedef uint64_t eventfd_t; + +/* Flags for signalfd. */ +enum + { + EFD_CLOEXEC = 010000000, +#define EFD_CLOEXEC EFD_CLOEXEC + EFD_NONBLOCK = 04 +#define EFD_NONBLOCK EFD_NONBLOCK + }; + + +__BEGIN_DECLS + +/* Return file descriptor for generic event channel. Set initial + value to COUNT. */ +extern int eventfd (int __count, int __flags) __THROW; + +/* Read event counter and possibly wait for events. */ +extern int eventfd_read (int __fd, eventfd_t *__value); + +/* Increment event counter. */ +extern int eventfd_write (int __fd, eventfd_t value); + +__END_DECLS + +#endif /* sys/eventfd.h */ From 306d70cc922dff084691356623f30d076e5b2f26 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 25 Jul 2008 04:43:59 +0000 Subject: [PATCH 3787/4487] inotify.h header for Linux/Alpha. --- sysdeps/unix/sysv/linux/alpha/sys/inotify.h | 105 ++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/sys/inotify.h diff --git a/sysdeps/unix/sysv/linux/alpha/sys/inotify.h b/sysdeps/unix/sysv/linux/alpha/sys/inotify.h new file mode 100644 index 0000000000..d61c700d5d --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/sys/inotify.h @@ -0,0 +1,105 @@ +/* Copyright (C) 2005, 2006, 2008 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 _SYS_INOTIFY_H +#define _SYS_INOTIFY_H 1 + +#include + + +/* Flags for the parameter of inotify_init1. */ +enum + { + IN_CLOEXEC = 010000000, +#define IN_CLOEXEC IN_CLOEXEC + IN_NONBLOCK = 04 +#define IN_NONBLOCK IN_NONBLOCK + }; + + +/* Structure describing an inotify event. */ +struct inotify_event +{ + int wd; /* Watch descriptor. */ + uint32_t mask; /* Watch mask. */ + uint32_t cookie; /* Cookie to synchronize two events. */ + uint32_t len; /* Length (including NULs) of name. */ + char name __flexarr; /* Name. */ +}; + + +/* Supported events suitable for MASK parameter of INOTIFY_ADD_WATCH. */ +#define IN_ACCESS 0x00000001 /* File was accessed. */ +#define IN_MODIFY 0x00000002 /* File was modified. */ +#define IN_ATTRIB 0x00000004 /* Metadata changed. */ +#define IN_CLOSE_WRITE 0x00000008 /* Writtable file was closed. */ +#define IN_CLOSE_NOWRITE 0x00000010 /* Unwrittable file closed. */ +#define IN_CLOSE (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* Close. */ +#define IN_OPEN 0x00000020 /* File was opened. */ +#define IN_MOVED_FROM 0x00000040 /* File was moved from X. */ +#define IN_MOVED_TO 0x00000080 /* File was moved to Y. */ +#define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* Moves. */ +#define IN_CREATE 0x00000100 /* Subfile was created. */ +#define IN_DELETE 0x00000200 /* Subfile was deleted. */ +#define IN_DELETE_SELF 0x00000400 /* Self was deleted. */ +#define IN_MOVE_SELF 0x00000800 /* Self was moved. */ + +/* Events sent by the kernel. */ +#define IN_UNMOUNT 0x00002000 /* Backing fs was unmounted. */ +#define IN_Q_OVERFLOW 0x00004000 /* Event queued overflowed. */ +#define IN_IGNORED 0x00008000 /* File was ignored. */ + +/* Helper events. */ +#define IN_CLOSE (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* Close. */ +#define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* Moves. */ + +/* Special flags. */ +#define IN_ONLYDIR 0x01000000 /* Only watch the path if it is a + directory. */ +#define IN_DONT_FOLLOW 0x02000000 /* Do not follow a sym link. */ +#define IN_MASK_ADD 0x20000000 /* Add to the mask of an already + existing watch. */ +#define IN_ISDIR 0x40000000 /* Event occurred against dir. */ +#define IN_ONESHOT 0x80000000 /* Only send event once. */ + +/* All events which a program can wait on. */ +#define IN_ALL_EVENTS (IN_ACCESS | IN_MODIFY | IN_ATTRIB | IN_CLOSE_WRITE \ + | IN_CLOSE_NOWRITE | IN_OPEN | IN_MOVED_FROM \ + | IN_MOVED_TO | IN_CREATE | IN_DELETE \ + | IN_DELETE_SELF | IN_MOVE_SELF) + + +__BEGIN_DECLS + +/* Create and initialize inotify instance. */ +extern int inotify_init (void) __THROW; + +/* Create and initialize inotify instance. */ +extern int inotify_init1 (int __flags) __THROW; + +/* Add watch of object NAME to inotify instance FD. Notify about + events specified by MASK. */ +extern int inotify_add_watch (int __fd, const char *__name, uint32_t __mask) + __THROW; + +/* Remove the watch specified by WD from the inotify instance FD. */ +extern int inotify_rm_watch (int __fd, uint32_t __wd) __THROW; + +__END_DECLS + +#endif /* sys/inotify.h */ From 0cf15c596cce00d9b6270d03791ff6502d379349 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 25 Jul 2008 04:44:03 +0000 Subject: [PATCH 3788/4487] signalfd.h header for Linux/Alpha. --- sysdeps/unix/sysv/linux/alpha/sys/signalfd.h | 66 ++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/sys/signalfd.h diff --git a/sysdeps/unix/sysv/linux/alpha/sys/signalfd.h b/sysdeps/unix/sysv/linux/alpha/sys/signalfd.h new file mode 100644 index 0000000000..a820eafe79 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/sys/signalfd.h @@ -0,0 +1,66 @@ +/* Copyright (C) 2007, 2008 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 _SYS_SIGNALFD_H +#define _SYS_SIGNALFD_H 1 + +#define __need_sigset_t +#include +#include + + +struct signalfd_siginfo +{ + uint32_t ssi_signo; + int32_t ssi_errno; + int32_t ssi_code; + uint32_t ssi_pid; + uint32_t ssi_uid; + int32_t ssi_fd; + uint32_t ssi_tid; + uint32_t ssi_band; + uint32_t ssi_overrun; + uint32_t ssi_trapno; + int32_t ssi_status; + int32_t ssi_int; + uint64_t ssi_ptr; + uint64_t ssi_utime; + uint64_t ssi_stime; + uint64_t ssi_addr; + uint8_t __pad[48]; +}; + +/* Flags for signalfd. */ +enum + { + SFD_CLOEXEC = 010000000, +#define SFD_CLOEXEC SFD_CLOEXEC + SFD_NONBLOCK = 04 +#define SFD_NONBLOCK SFD_NONBLOCK + }; + +__BEGIN_DECLS + +/* Request notification for delivery of signals in MASK to be + performed using descriptor FD.*/ +extern int signalfd (int __fd, const sigset_t *__mask, int __flags) + __nonnull ((2)) __THROW; + +__END_DECLS + +#endif /* sys/signalfd.h */ From 3428a1a18438ea3c3df78d7520d81e55b8f712fb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 25 Jul 2008 04:44:10 +0000 Subject: [PATCH 3789/4487] timerfd.h header for Linux/Alpha. --- sysdeps/unix/sysv/linux/alpha/sys/timerfd.h | 60 +++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/sys/timerfd.h diff --git a/sysdeps/unix/sysv/linux/alpha/sys/timerfd.h b/sysdeps/unix/sysv/linux/alpha/sys/timerfd.h new file mode 100644 index 0000000000..09d6ccf6cc --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/sys/timerfd.h @@ -0,0 +1,60 @@ +/* Copyright (C) 2008 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 _SYS_TIMERFD_H +#define _SYS_TIMERFD_H 1 + +#include + + +/* Bits to be set in the FLAGS parameter of `timerfd_create'. */ +enum + { + TFD_CLOEXEC = 010000000, +#define TFD_CLOEXEC TFD_CLOEXEC + TFD_NONBLOCK = 04 +#define TFD_NONBLOCK TFD_NONBLOCK + }; + + +/* Bits to be set in the FLAGS parameter of `timerfd_settime'. */ +enum + { + TFD_TIMER_ABSTIME = 1 << 0 +#define TFD_TIMER_ABSTIME TFD_TIMER_ABSTIME + }; + + +__BEGIN_DECLS + +/* Return file descriptor for new interval timer source. */ +extern int timerfd_create (clockid_t __clock_id, int __flags) __THROW; + +/* Set next expiration time of interval timer source UFD to UTMR. If + FLAGS has the TFD_TIMER_ABSTIME flag set the timeout value is + absolute. Optionally return the old expiration time in OTMR. */ +extern int timerfd_settime (int __ufd, int __flags, + __const struct itimerspec *__utmr, + struct itimerspec *__otmr) __THROW; + +/* Return the next expiration time of UFD. */ +extern int timerfd_gettime (int __ufd, struct itimerspec *__otmr) __THROW; + +__END_DECLS + +#endif /* sys/timerfd.h */ From 5bccf6097250f388f18eca157031497b6976b883 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Thu, 7 Aug 2008 23:52:34 +0000 Subject: [PATCH 3790/4487] 2008-08-07 Helge Deller * sysdeps/unix/sysv/linux/hppa/ucontext_i.sym: New file. * sysdeps/unix/sysv/linux/hppa/Makefile: New file. * sysdeps/unix/sysv/linux/hppa/getcontext.S: New file. * sysdeps/unix/sysv/linux/hppa/makecontext.c: New file. * sysdeps/unix/sysv/linux/hppa/setcontext.S: New file. * sysdeps/unix/sysv/linux/hppa/swapcontext.c: New file. --- ChangeLog.hppa | 9 ++ sysdeps/unix/sysv/linux/hppa/Makefile | 5 + sysdeps/unix/sysv/linux/hppa/getcontext.S | 163 ++++++++++++++++++++ sysdeps/unix/sysv/linux/hppa/makecontext.c | 79 ++++++++++ sysdeps/unix/sysv/linux/hppa/setcontext.S | 154 ++++++++++++++++++ sysdeps/unix/sysv/linux/hppa/swapcontext.c | 43 ++++++ sysdeps/unix/sysv/linux/hppa/ucontext_i.sym | 59 +++++++ 7 files changed, 512 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/hppa/Makefile create mode 100644 sysdeps/unix/sysv/linux/hppa/getcontext.S create mode 100644 sysdeps/unix/sysv/linux/hppa/makecontext.c create mode 100644 sysdeps/unix/sysv/linux/hppa/setcontext.S create mode 100644 sysdeps/unix/sysv/linux/hppa/swapcontext.c create mode 100644 sysdeps/unix/sysv/linux/hppa/ucontext_i.sym diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 2a4a712dbf..3d570dba99 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,12 @@ +2008-08-07 Helge Deller + + * sysdeps/unix/sysv/linux/hppa/ucontext_i.sym: New file. + * sysdeps/unix/sysv/linux/hppa/Makefile: New file. + * sysdeps/unix/sysv/linux/hppa/getcontext.S: New file. + * sysdeps/unix/sysv/linux/hppa/makecontext.c: New file. + * sysdeps/unix/sysv/linux/hppa/setcontext.S: New file. + * sysdeps/unix/sysv/linux/hppa/swapcontext.c: New file. + 2008-06-17 Aurelian Jarno Carlos O'Donell diff --git a/sysdeps/unix/sysv/linux/hppa/Makefile b/sysdeps/unix/sysv/linux/hppa/Makefile new file mode 100644 index 0000000000..4c3a1148ca --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/Makefile @@ -0,0 +1,5 @@ +# Used by *context() functions +ifeq ($(subdir),stdlib) +gen-as-const-headers += ucontext_i.sym +endif + diff --git a/sysdeps/unix/sysv/linux/hppa/getcontext.S b/sysdeps/unix/sysv/linux/hppa/getcontext.S new file mode 100644 index 0000000000..f88fa03d91 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/getcontext.S @@ -0,0 +1,163 @@ +/* Get current user context. + Copyright (C) 2008 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Helge Deller , 2008. + + 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. */ + +#include + +#include "ucontext_i.h" + + + /* Trampoline function. */ + /* Can not use ENTRY(__getcontext_ret) here. */ + .type __getcontext_ret, @function + .hidden __getcontext_ret +__getcontext_ret: + .proc + .callinfo FRAME=0,NO_CALLS + copy %r23, %r3 + copy %r24, %r4 + copy %r25, %r5 + copy %r26, %r6 + bv 0(%r20) + copy %r0, %ret0 + .procend + .size __getcontext_ret, .-__getcontext_ret + + +ENTRY(__getcontext) + /* Save the registers. */ + stw %r0, oR0(%r26) + stw %r1, oR1(%r26) + /* stw %r2, oR2(%r26) - used for trampoline. */ + stw %r3, oR3(%r26) + stw %r4, oR4(%r26) + stw %r5, oR5(%r26) + stw %r6, oR6(%r26) + stw %r7, oR7(%r26) + stw %r8, oR8(%r26) + stw %r9, oR9(%r26) + stw %r10, oR10(%r26) + stw %r11, oR11(%r26) + stw %r12, oR12(%r26) + stw %r13, oR13(%r26) + stw %r14, oR14(%r26) + stw %r15, oR15(%r26) + stw %r16, oR16(%r26) + stw %r17, oR17(%r26) + stw %r18, oR18(%r26) + stw %r19, oR19(%r26) + /* stw %r20, oR20(%r26) - used for trampoline. */ + stw %r21, oR21(%r26) + stw %r22, oR22(%r26) + /* stw %r23, oR23(%r26) - used for trampoline. */ + /* stw %r24, oR24(%r26) - used for trampoline. */ + /* stw %r25, oR25(%r26) - used for trampoline. */ + /* stw %r26, oR26(%r26) - used for trampoline. */ + stw %r27, oR27(%r26) + stw %r28, oR28(%r26) + stw %r29, oR29(%r26) + ldo -64(%sp), %r1 /* Calculate %sp in %r1. */ + stw %r1, oR30(%r26) /* Save new %sp. */ + stw %r31, oR31(%r26) + + stw %r0, oUC_FLAGS(%r26) + /* stw %r0, oUC_LINK(%r26) - Do not overwrite. */ + stw %r1, oSS_SP(%r26) + stw %r0, oSS_FLAGS(%r26) + stw %r0, oSS_SIZE(%r26) + + stw %r0, oSC_FLAGS(%r26) + + stw %r0, oIASQ0(%r26) + stw %r0, oIASQ1(%r26) + stw %r0, oIAOQ0(%r26) + stw %r0, oIAOQ1(%r26) + stw %r0, oSAR(%r26) /* used as flag in swapcontext(). */ + + + /* Store floating-point regs. */ + ldo oFPREGS0(%r26),%r1 + fstds,ma %fr0, 8(%r1) + fstds,ma %fr1, 8(%r1) + fstds,ma %fr2, 8(%r1) + fstds,ma %fr3, 8(%r1) + fstds,ma %fr4, 8(%r1) + fstds,ma %fr5, 8(%r1) + fstds,ma %fr6, 8(%r1) + fstds,ma %fr7, 8(%r1) + fstds,ma %fr8, 8(%r1) + fstds,ma %fr9, 8(%r1) + fstds,ma %fr10, 8(%r1) + fstds,ma %fr11, 8(%r1) + fstds,ma %fr12, 8(%r1) + fstds,ma %fr13, 8(%r1) + fstds,ma %fr14, 8(%r1) + fstds,ma %fr15, 8(%r1) + fstds,ma %fr16, 8(%r1) + fstds,ma %fr17, 8(%r1) + fstds,ma %fr18, 8(%r1) + fstds,ma %fr19, 8(%r1) + fstds,ma %fr20, 8(%r1) + fstds,ma %fr21, 8(%r1) + fstds,ma %fr22, 8(%r1) + fstds,ma %fr23, 8(%r1) + fstds,ma %fr24, 8(%r1) + fstds,ma %fr25, 8(%r1) + fstds,ma %fr26, 8(%r1) + fstds,ma %fr27, 8(%r1) + fstds,ma %fr28, 8(%r1) + fstds,ma %fr29, 8(%r1) + fstds,ma %fr30, 8(%r1) + fstds %fr31, 0(%r1) + + /* Prologue */ + stwm %r4, 64(%r30) +#ifdef PIC + stw %r19, -32(%r30) +#endif + + /* Set up the trampoline registers. + r20, r23, r24, r25, r26 and r2 are clobbered + by call to getcontext() anyway. Reuse them. */ + stw %r2, oR20(%r26) + stw %r3, oR23(%r26) + stw %r4, oR24(%r26) + stw %r5, oR25(%r26) + stw %r6, oR26(%r26) + ldil L%__getcontext_ret, %r1 + ldo R%__getcontext_ret(%r1), %r1 + stw %r1, oR2(%r26) + + /* Save the current signal mask. */ + /* sigprocmask(SIG_BLOCK, NULL, &ucp->uc_sigmask); */ + ldo oSIGMASK(%r26), %r24 + copy %r0, %r25 + bl sigprocmask, %r2 + ldi SIG_BLOCK, %r26 + + /* Epilogue */ + ldw -84(%r30), %r2 +#ifdef PIC + ldw -96(%r30), %r19 +#endif + bv %r0(%r2) + ldwm -64(%r30), %r4 +END(__getcontext) + +weak_alias (__getcontext, getcontext) diff --git a/sysdeps/unix/sysv/linux/hppa/makecontext.c b/sysdeps/unix/sysv/linux/hppa/makecontext.c new file mode 100644 index 0000000000..69a18135d9 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/makecontext.c @@ -0,0 +1,79 @@ +/* Create new context. + Copyright (C) 2008 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Helge Deller , 2008. + + 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. */ + +#include +#include +#include +#include +#include +#include + +/* XXX: This implementation only handles integer arguments. */ + +void +__makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...) +{ + unsigned int *sp; + va_list ap; + int i; + + if (argc > 8) + { + fprintf (stderr, _("\ +makecontext: does not know how to handle more than 8 arguments\n")); + exit (-1); + } + + /* Get stack pointer. */ + sp = (unsigned int *) ucp->uc_stack.ss_sp; + + /* Store address to jump to. */ + ucp->uc_mcontext.sc_gr[2] = (unsigned long) func; + + va_start (ap, argc); + /* Handle arguments. */ + for (i = 0; i < argc; ++i) + switch (i) + { + case 0: + case 1: + case 2: + case 3: + ucp->uc_mcontext.sc_gr[26-i] = va_arg (ap, int); + break; + case 4: + case 5: + case 6: + case 7: + if (sizeof(unsigned long) == 4) { + /* 32bit: put arg7-arg4 on stack. */ + sp[7-i] = va_arg (ap, int); + } else { + /* 64bit: r19-r22 are arg7-arg4. */ + ucp->uc_mcontext.sc_gr[22+4-i] = va_arg (ap, int); + } + break; + } + va_end (ap); + +} + + +weak_alias(__makecontext, makecontext) diff --git a/sysdeps/unix/sysv/linux/hppa/setcontext.S b/sysdeps/unix/sysv/linux/hppa/setcontext.S new file mode 100644 index 0000000000..43ccf24d26 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/setcontext.S @@ -0,0 +1,154 @@ +/* Install given context. + Copyright (C) 2008 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Helge Deller , 2008. + + 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. */ + +#include + +#include "ucontext_i.h" + + +ENTRY(__setcontext) + /* Prologue */ + stwm %r3, 64(%r30) +#ifdef PIC + stw %r19, -32(%r30) +#endif + + /* Save ucp. */ + copy %r26, %r3 + +.Lagain: + /* Set the current signal mask. */ + /* sigprocmask(SIG_BLOCK, &ucp->uc_sigmask, NULL); */ + copy %r0, %r24 + ldo oSIGMASK(%r3), %r25 + bl sigprocmask, %r2 + ldi SIG_SETMASK, %r26 + + comib,<>,n 0,%ret0,.Lerror + + /* Save %sp, %dp. */ + copy %sp, %r4 + copy %dp, %r5 + copy %r19, %r6 + + /* Get the registers. */ + ldw oR1(%r3), %r1 + ldw oR2(%r3), %r2 + /* ldw oR3(%r3), %r3 - used for ucp pointer. */ + /* ldw oR4(%r3), %r4 - used for original %sp. */ + /* ldw oR5(%r3), %r5 - used for %dp / %r27. */ + /* ldw oR6(%r3), %r6 - used for %r19. */ + ldw oR7(%r3), %r7 + ldw oR8(%r3), %r8 + ldw oR9(%r3), %r9 + ldw oR10(%r3), %r10 + ldw oR11(%r3), %r11 + ldw oR12(%r3), %r12 + ldw oR13(%r3), %r13 + ldw oR14(%r3), %r14 + ldw oR15(%r3), %r15 + ldw oR16(%r3), %r16 + ldw oR17(%r3), %r17 + ldw oR18(%r3), %r18 + ldw oR19(%r3), %r19 + ldw oR20(%r3), %r20 + ldw oR21(%r3), %r21 + /* ldw oR22(%r3), %r22 - dyncall arg. */ + ldw oR23(%r3), %r23 + ldw oR24(%r3), %r24 + ldw oR25(%r3), %r25 + ldw oR26(%r3), %r26 + ldw oR27(%r3), %r27 + ldw oR28(%r3), %r28 + ldw oR29(%r3), %r29 + ldw oR30(%r3), %r30 + /* ldw oR31(%r3), %r31 - dyncall scratch register */ + + /* Restore floating-point registers. */ + ldo oFPREGS31(%r3), %r22 + fldds 0(%r22), %fr31 + fldds,mb -8(%r22), %fr30 + fldds,mb -8(%r22), %fr29 + fldds,mb -8(%r22), %fr28 + fldds,mb -8(%r22), %fr27 + fldds,mb -8(%r22), %fr26 + fldds,mb -8(%r22), %fr25 + fldds,mb -8(%r22), %fr24 + fldds,mb -8(%r22), %fr23 + fldds,mb -8(%r22), %fr22 + fldds,mb -8(%r22), %fr21 + fldds,mb -8(%r22), %fr20 + fldds,mb -8(%r22), %fr19 + fldds,mb -8(%r22), %fr18 + fldds,mb -8(%r22), %fr17 + fldds,mb -8(%r22), %fr16 + fldds,mb -8(%r22), %fr15 + fldds,mb -8(%r22), %fr14 + fldds,mb -8(%r22), %fr13 + fldds,mb -8(%r22), %fr12 + fldds,mb -8(%r22), %fr11 + fldds,mb -8(%r22), %fr10 + fldds,mb -8(%r22), %fr9 + fldds,mb -8(%r22), %fr8 + fldds,mb -8(%r22), %fr7 + fldds,mb -8(%r22), %fr6 + fldds,mb -8(%r22), %fr5 + fldds,mb -8(%r22), %fr4 + fldds,mb -8(%r22), %fr3 + fldds,mb -8(%r22), %fr2 + fldds,mb -8(%r22), %fr1 + fldds,mb -8(%r22), %fr0 + + /* Calculate new stack pointer. */ + ldw oSS_SP(%r3), %sp + ldo 64(%sp), %sp + + /* Call external function. */ + copy %r2, %r22 + bl $$dyncall, %r31 + copy %r31, %r2 + + /* We return here. Get new ucp in %r3, reload %sp. */ + ldw oUC_LINK(%r3), %r3 + copy %r4, %sp + copy %r5, %dp + copy %r6, %r19 + + /* Continue until ucp == NULL. */ + comib,<> 0,%r3,.Lagain + nop + + /* No further context available. Exit now. */ + bl _exit, %r2 + ldi -1, %r26 + + +.Lerror: + /* Epilogue */ + ldw -84(%r30), %r2 +#ifdef PIC + ldw -96(%r30), %r19 +#endif + bv %r0(%r2) + ldwm -64(%r30), %r3 +L(pseudo_end): +PSEUDO_END(__setcontext) + +weak_alias(__setcontext, setcontext) diff --git a/sysdeps/unix/sysv/linux/hppa/swapcontext.c b/sysdeps/unix/sysv/linux/hppa/swapcontext.c new file mode 100644 index 0000000000..8b33173be6 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/swapcontext.c @@ -0,0 +1,43 @@ +/* Swap to new context. + Copyright (C) 2008 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Helge Deller , 2008. + + 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. */ + +#include + +extern int __getcontext (ucontext_t *ucp); +extern int __setcontext (const ucontext_t *ucp); + +int +__swapcontext (ucontext_t *oucp, const ucontext_t *ucp) +{ + /* Save the current machine context to oucp. */ + __getcontext (oucp); + + /* mark sc_sar flag to skip the setcontext call on reactivation. */ + if (oucp->uc_mcontext.sc_sar == 0) { + oucp->uc_mcontext.sc_sar++; + + /* Restore the machine context in ucp. */ + __setcontext (ucp); + } + + return 0; +} + +weak_alias (__swapcontext, swapcontext) diff --git a/sysdeps/unix/sysv/linux/hppa/ucontext_i.sym b/sysdeps/unix/sysv/linux/hppa/ucontext_i.sym new file mode 100644 index 0000000000..ee33029a07 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/ucontext_i.sym @@ -0,0 +1,59 @@ +#include +#include +#include + +-- + +SIG_BLOCK +SIG_SETMASK + +#define ucontext(member) offsetof (ucontext_t, member) +#define mcontext(member) ucontext (uc_mcontext.member) +#define mreg(reg) mcontext (sc_gr[reg]) + +oUC_FLAGS ucontext (uc_flags) +oUC_LINK ucontext (uc_link) +oSS_SP ucontext (uc_stack.ss_sp) +oSS_FLAGS ucontext (uc_stack.ss_flags) +oSS_SIZE ucontext (uc_stack.ss_size) +oSC_FLAGS mcontext (sc_flags) +oR0 mreg (0) +oR1 mreg (1) +oR2 mreg (2) +oR3 mreg (3) +oR4 mreg (4) +oR5 mreg (5) +oR6 mreg (6) +oR7 mreg (7) +oR8 mreg (8) +oR9 mreg (9) +oR10 mreg (10) +oR11 mreg (11) +oR12 mreg (12) +oR13 mreg (13) +oR14 mreg (14) +oR15 mreg (15) +oR16 mreg (16) +oR17 mreg (17) +oR18 mreg (18) +oR19 mreg (19) +oR20 mreg (20) +oR21 mreg (21) +oR22 mreg (22) +oR23 mreg (23) +oR24 mreg (24) +oR25 mreg (25) +oR26 mreg (26) +oR27 mreg (27) +oR28 mreg (28) +oR29 mreg (29) +oR30 mreg (30) +oR31 mreg (31) +oFPREGS0 mcontext (sc_fr[0]) +oFPREGS31 mcontext (sc_fr[31]) +oIASQ0 mcontext (sc_iasq[0]) +oIASQ1 mcontext (sc_iasq[1]) +oIAOQ0 mcontext (sc_iaoq[0]) +oIAOQ1 mcontext (sc_iaoq[1]) +oSAR mcontext (sc_sar) +oSIGMASK ucontext (uc_sigmask) From d0a39e1daf2a06bada8990e352aa890f3929df1c Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 10 Aug 2008 08:43:09 +0000 Subject: [PATCH 3791/4487] 2008-08-10 Joseph Myers * sysdeps/m68k/bits/byteswap.h: Allow inclusion from . (__bswap_constant_16): Define. (__bswap_16): Allow arguments with side effects. (__bswap_constant_32): Ensure result is unsigned. (__bswap_32): Define as inline function in fallback case. (__bswap_constant_64): Define. (__bswap_64): Use it for constant arguments. * sysdeps/m68k/bits/setjmp.h (__jmp_buf): Give name to structure type. * sysdeps/m68k/m680x0/fpu/bits/mathinline.h: Only allow inclusion from . Do not use extern inline directly. * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Include . (O_CLOEXEC, SYNC_FILE_RANGE_WAIT_BEFORE, SYNC_FILE_RANGE_WRITE, SYNC_FILE_RANGE_WAIT_AFTER, SPLICE_F_MOVE, SPLICE_F_NONBLOCK, SPLICE_F_MORE, SPLICE_F_GIFT): Define. (sync_file_range, vmsplice, splice, tee): Declare. * sysdeps/unix/sysv/linux/m68k/bits/mman.h (MADV_REMOVE): Define. * sysdeps/unix/sysv/linux/m68k/bits/poll.h (POLLMSG, POLLREMOVE, POLLRDHUP): Define. * sysdeps/unix/sysv/linux/m68k/bits/stat.h (UTIME_NOW, UTIME_OMIT): Define. * sysdeps/unix/sysv/linux/m68k/kernel-features.h: New. * sysdeps/unix/sysv/linux/m68k/sys/user.h: New. --- ChangeLog.m68k | 26 ++++++++ sysdeps/m68k/bits/byteswap.h | 52 +++++++++++++--- sysdeps/m68k/bits/setjmp.h | 4 +- sysdeps/m68k/m680x0/fpu/bits/mathinline.h | 22 ++++--- sysdeps/unix/sysv/linux/m68k/bits/fcntl.h | 53 +++++++++++++++- sysdeps/unix/sysv/linux/m68k/bits/mman.h | 3 +- sysdeps/unix/sysv/linux/m68k/bits/poll.h | 9 ++- sysdeps/unix/sysv/linux/m68k/bits/stat.h | 8 ++- .../unix/sysv/linux/m68k/kernel-features.h | 41 +++++++++++++ sysdeps/unix/sysv/linux/m68k/sys/user.h | 61 +++++++++++++++++++ 10 files changed, 254 insertions(+), 25 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/m68k/kernel-features.h create mode 100644 sysdeps/unix/sysv/linux/m68k/sys/user.h diff --git a/ChangeLog.m68k b/ChangeLog.m68k index b6aa316ad5..c399a48686 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,29 @@ +2008-08-10 Joseph Myers + + * sysdeps/m68k/bits/byteswap.h: Allow inclusion from . + (__bswap_constant_16): Define. + (__bswap_16): Allow arguments with side effects. + (__bswap_constant_32): Ensure result is unsigned. + (__bswap_32): Define as inline function in fallback case. + (__bswap_constant_64): Define. + (__bswap_64): Use it for constant arguments. + * sysdeps/m68k/bits/setjmp.h (__jmp_buf): Give name to structure + type. + * sysdeps/m68k/m680x0/fpu/bits/mathinline.h: Only allow inclusion + from . Do not use extern inline directly. + * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Include . + (O_CLOEXEC, SYNC_FILE_RANGE_WAIT_BEFORE, SYNC_FILE_RANGE_WRITE, + SYNC_FILE_RANGE_WAIT_AFTER, SPLICE_F_MOVE, SPLICE_F_NONBLOCK, + SPLICE_F_MORE, SPLICE_F_GIFT): Define. + (sync_file_range, vmsplice, splice, tee): Declare. + * sysdeps/unix/sysv/linux/m68k/bits/mman.h (MADV_REMOVE): Define. + * sysdeps/unix/sysv/linux/m68k/bits/poll.h (POLLMSG, POLLREMOVE, + POLLRDHUP): Define. + * sysdeps/unix/sysv/linux/m68k/bits/stat.h (UTIME_NOW, + UTIME_OMIT): Define. + * sysdeps/unix/sysv/linux/m68k/kernel-features.h: New. + * sysdeps/unix/sysv/linux/m68k/sys/user.h: New. + 2008-03-28 Maxim Kuvyrkov Explicitly get address of _DYNAMIC. diff --git a/sysdeps/m68k/bits/byteswap.h b/sysdeps/m68k/bits/byteswap.h index 41b386b313..a2546c9a20 100644 --- a/sysdeps/m68k/bits/byteswap.h +++ b/sysdeps/m68k/bits/byteswap.h @@ -1,5 +1,5 @@ /* Macros to swap the order of bytes in integer values. m68k version. - Copyright (C) 1997, 2002 Free Software Foundation, Inc. + Copyright (C) 1997, 2002, 2008 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 @@ -17,7 +17,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#if !defined _BYTESWAP_H && !defined _NETINET_IN_H +#if !defined _BYTESWAP_H && !defined _NETINET_IN_H && !defined _ENDIAN_H # error "Never use directly; include instead." #endif @@ -27,13 +27,25 @@ /* Swap bytes in 16 bit value. We don't provide an assembler version because GCC is smart enough to generate optimal assembler output, and this allows for better cse. */ -#define __bswap_16(x) \ - ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)) +#define __bswap_constant_16(x) \ + ((((x) >> 8) & 0xffu) | (((x) & 0xffu) << 8)) + +#ifdef __GNUC__ +# define __bswap_16(x) \ + (__extension__ \ + ({ unsigned short int __bsx = (x); __bswap_constant_16 (__bsx); })) +#else +static __inline unsigned short int +__bswap_16 (unsigned short int __bsx) +{ + return __bswap_constant_16 (__bsx); +} +#endif /* Swap bytes in 32 bit value. */ #define __bswap_constant_32(x) \ - ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \ - (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24)) + ((((x) & 0xff000000u) >> 24) | (((x) & 0x00ff0000u) >> 8) | \ + (((x) & 0x0000ff00u) << 8) | (((x) & 0x000000ffu) << 24)) #if defined __GNUC__ && __GNUC__ >= 2 && !defined(__mcoldfire__) # define __bswap_32(x) \ @@ -49,18 +61,38 @@ : "0" ((unsigned int) (x))); \ __bswap_32_v; }) #else -# define __bswap_32(x) __bswap_constant_32 (x) +static __inline unsigned int +__bswap_32 (unsigned int __bsx) +{ + return __bswap_constant_32 (__bsx); +} #endif #if defined __GNUC__ && __GNUC__ >= 2 +/* Swap bytes in 64 bit value. */ +# define __bswap_constant_64(x) \ + ((((x) & 0xff00000000000000ull) >> 56) \ + | (((x) & 0x00ff000000000000ull) >> 40) \ + | (((x) & 0x0000ff0000000000ull) >> 24) \ + | (((x) & 0x000000ff00000000ull) >> 8) \ + | (((x) & 0x00000000ff000000ull) << 8) \ + | (((x) & 0x0000000000ff0000ull) << 24) \ + | (((x) & 0x000000000000ff00ull) << 40) \ + | (((x) & 0x00000000000000ffull) << 56)) + /* Swap bytes in 64 bit value. */ # define __bswap_64(x) \ __extension__ \ ({ union { unsigned long long int __ll; \ unsigned long int __l[2]; } __bswap_64_v, __bswap_64_r; \ - __bswap_64_v.__ll = (x); \ - __bswap_64_r.__l[0] = __bswap_32 (__bswap_64_v.__l[1]); \ - __bswap_64_r.__l[1] = __bswap_32 (__bswap_64_v.__l[0]); \ + if (__builtin_constant_p (x)) \ + __bswap_64_r.__ll = __bswap_constant_64 (x); \ + else \ + { \ + __bswap_64_v.__ll = (x); \ + __bswap_64_r.__l[0] = __bswap_32 (__bswap_64_v.__l[1]); \ + __bswap_64_r.__l[1] = __bswap_32 (__bswap_64_v.__l[0]); \ + } \ __bswap_64_r.__ll; }) #endif diff --git a/sysdeps/m68k/bits/setjmp.h b/sysdeps/m68k/bits/setjmp.h index 27ec051e5b..b2d8b2e60e 100644 --- a/sysdeps/m68k/bits/setjmp.h +++ b/sysdeps/m68k/bits/setjmp.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997,1998,2005,2006 Free Software Foundation, Inc. +/* Copyright (C) 1997,1998,2005,2006,2008 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 @@ -24,7 +24,7 @@ # error "Never include directly; use instead." #endif -typedef struct +typedef struct __jmp_buf_internal_tag { /* There are eight 4-byte data registers, but D0 is not saved. */ long int __dregs[7]; diff --git a/sysdeps/m68k/m680x0/fpu/bits/mathinline.h b/sysdeps/m68k/m680x0/fpu/bits/mathinline.h index acbac47aac..6b69f7a493 100644 --- a/sysdeps/m68k/m680x0/fpu/bits/mathinline.h +++ b/sysdeps/m68k/m680x0/fpu/bits/mathinline.h @@ -1,5 +1,5 @@ /* Definitions of inline math functions implemented by the m68881/2. - Copyright (C) 1991,92,93,94,96,97,98,99,2000,2002, 2003, 2004 + Copyright (C) 1991,92,93,94,96,97,98,99,2000,2002, 2003, 2004, 2008 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -18,6 +18,16 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#ifndef _MATH_H +# error "Never use directly; include instead." +#endif + +#ifndef __extern_inline +# define __MATH_INLINE __inline +#else +# define __MATH_INLINE __extern_inline +#endif + #ifdef __GNUC__ #ifdef __USE_ISOC99 @@ -89,11 +99,7 @@ # define __m81_inline static __inline #else # define __m81_u(x) x -# ifdef __cplusplus -# define __m81_inline __inline -# else -# define __m81_inline extern __inline -# endif +# define __m81_inline __MATH_INLINE # define __M81_MATH_INLINES 1 #endif @@ -351,14 +357,14 @@ __inline_functions (long double,l) /* Note that there must be no whitespace before the argument passed for NAME, to make token pasting work correctly with -traditional. */ # define __inline_forward_c(rettype, name, args1, args2) \ -extern __inline rettype __attribute__((__const__)) \ +__MATH_INLINE rettype __attribute__((__const__)) \ name args1 \ { \ return __CONCAT(__,name) args2; \ } # define __inline_forward(rettype, name, args1, args2) \ -extern __inline rettype name args1 \ +__MATH_INLINE rettype name args1 \ { \ return __CONCAT(__,name) args2; \ } diff --git a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h index 169a24b734..203d5a1a5a 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 2000, 2004 Free Software Foundation, Inc. + Copyright (C) 2000, 2004, 2008 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 @@ -21,8 +21,11 @@ # error "Never use directly; include instead." #endif - #include +#ifdef __USE_GNU +# include +#endif + /* open/fcntl - O_SYNC is only implemented on blocks devices and on files located on an ext2 file system */ @@ -46,6 +49,7 @@ # define O_NOFOLLOW 0100000 /* Do not follow links. */ # define O_DIRECT 0200000 /* Direct disk access. */ # define O_NOATIME 01000000 /* Do not set atime. */ +# define O_CLOEXEC 02000000 /* Set close_on_exec. */ #endif /* For now Linux has synchronisity options for data and read operations. @@ -181,10 +185,55 @@ struct flock64 # define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ #endif + +#ifdef __USE_GNU +/* 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. */ +# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those + dirty pages in the range which are + not presently under writeback. */ +# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in + the range after performing the + write. */ + +/* 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 + /* Provide kernel hint to read ahead. */ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count) __THROW; + +/* Selective file content synch'ing. */ +extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to, + unsigned int __flags); + + +/* Splice address range into a pipe. */ +extern ssize_t vmsplice (int __fdout, const struct iovec *__iov, + size_t __count, unsigned int __flags); + +/* Splice two files together. */ +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 ssize_t tee (int __fdin, int __fdout, size_t __len, + unsigned int __flags); + +#endif + __END_DECLS diff --git a/sysdeps/unix/sysv/linux/m68k/bits/mman.h b/sysdeps/unix/sysv/linux/m68k/bits/mman.h index fbec1a03f8..ab99176660 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/mman.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/m68k version. - Copyright (C) 1997, 2000, 2003, 2005 Free Software Foundation, Inc. + Copyright (C) 1997, 2000, 2003, 2005, 2008 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 @@ -88,6 +88,7 @@ # define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ # define MADV_WILLNEED 3 /* Will need these pages. */ # define MADV_DONTNEED 4 /* Don't need these pages. */ +# define MADV_REMOVE 9 /* Remove these pages and resources. */ # define MADV_DONTFORK 10 /* Do not inherit across fork. */ # define MADV_DOFORK 11 /* Do inherit across fork. */ #endif diff --git a/sysdeps/unix/sysv/linux/m68k/bits/poll.h b/sysdeps/unix/sysv/linux/m68k/bits/poll.h index f7a7393154..bc285799e1 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/poll.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/poll.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1997, 2001, 2008 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 @@ -35,6 +35,13 @@ # define POLLWRBAND 0x100 /* Priority data may be written. */ #endif +#ifdef __USE_GNU +/* These are extensions for Linux. */ +# define POLLMSG 0x400 +# define POLLREMOVE 0x1000 +# define POLLRDHUP 0x2000 +#endif + /* Event types always implicitly polled for. These bits need not be set in `events', but they will appear in `revents' to indicate the status of the file descriptor. */ diff --git a/sysdeps/unix/sysv/linux/m68k/bits/stat.h b/sysdeps/unix/sysv/linux/m68k/bits/stat.h index dc06b13e2f..6b6924037b 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/stat.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992,95,96,97,98,99,2000,2001,2002 +/* Copyright (C) 1992,95,96,97,98,99,2000,2001,2002,2008 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -162,3 +162,9 @@ struct stat64 #define __S_IREAD 0400 /* Read by owner. */ #define __S_IWRITE 0200 /* Write by owner. */ #define __S_IEXEC 0100 /* Execute by owner. */ + +#if defined __USE_ATFILE || defined __USE_GNU +/* XXX This will change to the macro for the next 2008 POSIX revision. */ +# define UTIME_NOW ((1l << 30) - 1l) +# define UTIME_OMIT ((1l << 30) - 2l) +#endif diff --git a/sysdeps/unix/sysv/linux/m68k/kernel-features.h b/sysdeps/unix/sysv/linux/m68k/kernel-features.h new file mode 100644 index 0000000000..9a6d23d3ee --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/kernel-features.h @@ -0,0 +1,41 @@ +/* Set flags signalling availability of kernel features based on given + kernel version number. + Copyright (C) 2008 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. */ + +/* These features were surely available with 2.4.12. */ +#if __LINUX_KERNEL_VERSION >= 132108 +# define __ASSUME_MMAP2_SYSCALL 1 +# define __ASSUME_TRUNCATE64_SYSCALL 1 +# define __ASSUME_STAT64_SYSCALL 1 +# define __ASSUME_FCNTL64 1 +# define __ASSUME_VFORK_SYSCALL 1 +#endif + +/* Many syscalls were added in 2.6.10 for m68k. */ +#if __LINUX_KERNEL_VERSION >= 132618 +# define __ASSUME_TGKILL 1 +# define __ASSUME_UTIMES 1 +# define __ASSUME_FADVISE64_64_SYSCALL 1 +#endif + +#include_next + +/* These syscalls are not implemented yet for m68k. */ +#undef __ASSUME_PSELECT +#undef __ASSUME_PPOLL diff --git a/sysdeps/unix/sysv/linux/m68k/sys/user.h b/sysdeps/unix/sysv/linux/m68k/sys/user.h new file mode 100644 index 0000000000..f8b19fcbe2 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/sys/user.h @@ -0,0 +1,61 @@ +/* Copyright (C) 2008 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 _SYS_USER_H +#define _SYS_USER_H 1 + +/* The whole purpose of this file is for GDB and GDB only. Don't read + too much into it. Don't use it for anything other than GDB unless + you know what you are doing. */ + +struct user_m68kfp_struct { + unsigned long fpregs[8*3]; + unsigned long fpcntl[3]; +}; + +struct user_regs_struct { + long d1, d2, d3, d4, d5, d6, d7; + long a0, a1, a2, a3, a4, a5, a6; + long d0; + long usp; + long orig_d0; + short stkadj; + short sr; + long pc; + short fmtvec; + short __fill; +}; + +struct user { + struct user_regs_struct regs; + int u_fpvalid; + struct user_m68kfp_struct m68kfp; + unsigned long int u_tsize; + unsigned long int u_dsize; + unsigned long int u_ssize; + unsigned long start_code; + unsigned long start_stack; + long int signal; + int reserved; + unsigned long u_ar0; + struct user_m68kfp_struct *u_fpstate; + unsigned long magic; + char u_comm[32]; +}; + +#endif From 606c1b1771ed7673a74aa97c8f1c47c64e94e5fb Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 19 Aug 2008 15:54:50 +0000 Subject: [PATCH 3792/4487] * sysdeps/mips/fpu_control.h (_FPU_GETCW, _FPU_SETCW): Make asms volatile. --- ChangeLog.mips | 5 +++++ sysdeps/mips/fpu_control.h | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index e7aee501db..409c2c9a84 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2008-08-19 Joseph Myers + + * sysdeps/mips/fpu_control.h (_FPU_GETCW, _FPU_SETCW): Make asms + volatile. + 2008-07-18 Joseph Myers * sysdeps/mips/bits/setjmp.h (__jmp_buf): Give name to structure diff --git a/sysdeps/mips/fpu_control.h b/sysdeps/mips/fpu_control.h index 5712ac5338..eb71928a5a 100644 --- a/sysdeps/mips/fpu_control.h +++ b/sysdeps/mips/fpu_control.h @@ -1,5 +1,6 @@ /* FPU control word bits. Mips version. - Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 1999, 2000, 2006, 2008 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Olaf Flebbe and Ralf Baechle. @@ -100,8 +101,8 @@ extern fpu_control_t __fpu_control; typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__SI__))); /* Macros for accessing the hardware control word. */ -#define _FPU_GETCW(cw) __asm__ ("cfc1 %0,$31" : "=r" (cw)) -#define _FPU_SETCW(cw) __asm__ ("ctc1 %0,$31" : : "r" (cw)) +#define _FPU_GETCW(cw) __asm__ volatile ("cfc1 %0,$31" : "=r" (cw)) +#define _FPU_SETCW(cw) __asm__ volatile ("ctc1 %0,$31" : : "r" (cw)) /* Default control word set at startup. */ extern fpu_control_t __fpu_control; From 5de92c17d793598f429917e2520c31b45e5d6111 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 19 Aug 2008 15:59:07 +0000 Subject: [PATCH 3793/4487] * data/c++-types-arm-linux-gnueabi.data: New. * data/localplt-arm-linux-gnueabi.data: New. * sysdeps/arm/bsd-_setjmp.S: Use HIDDEN_JUMPTARGET to call __sigsetjmp. * sysdeps/arm/bsd-setjmp.S: Likewise. * sysdeps/arm/eabi/aeabi_localeconv.c: Use __localeconv. * sysdeps/arm/eabi/find_exidx.c (__gnu_Unwind_Find_exidx): Use __dl_iterate_phdr. * sysdeps/arm/eabi/setjmp.S: Add hidden_def (__sigsetjmp). * sysdeps/arm/memmove.S: Use HIDDEN_JUMPTARGET to call memcpy from within libc. * sysdeps/arm/setjmp.S: Add hidden_def (__sigsetjmp). * sysdeps/unix/sysv/linux/arm/clone.S: Use HIDDEN_JUMPTARGET to call _exit. * sysdeps/unix/sysv/linux/arm/ioperm.c (init_iosys): Use __sysctl, __readlink and fgets_unlocked. (_ioperm): Use __open and __close. --- ChangeLog.arm | 20 ++++++++ data/c++-types-arm-linux-gnueabi.data | 67 +++++++++++++++++++++++++++ data/localplt-arm-linux-gnueabi.data | 13 ++++++ sysdeps/arm/bsd-_setjmp.S | 4 +- sysdeps/arm/bsd-setjmp.S | 4 +- sysdeps/arm/eabi/aeabi_localeconv.c | 4 +- sysdeps/arm/eabi/find_exidx.c | 4 +- sysdeps/arm/eabi/setjmp.S | 3 +- sysdeps/arm/memmove.S | 6 ++- sysdeps/arm/setjmp.S | 4 +- sysdeps/unix/sysv/linux/arm/clone.S | 4 +- sysdeps/unix/sysv/linux/arm/ioperm.c | 14 +++--- 12 files changed, 127 insertions(+), 20 deletions(-) create mode 100644 data/c++-types-arm-linux-gnueabi.data create mode 100644 data/localplt-arm-linux-gnueabi.data diff --git a/ChangeLog.arm b/ChangeLog.arm index 5cca360553..e409001858 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,23 @@ +2008-08-19 Joseph Myers + + * data/c++-types-arm-linux-gnueabi.data: New. + * data/localplt-arm-linux-gnueabi.data: New. + * sysdeps/arm/bsd-_setjmp.S: Use HIDDEN_JUMPTARGET to call + __sigsetjmp. + * sysdeps/arm/bsd-setjmp.S: Likewise. + * sysdeps/arm/eabi/aeabi_localeconv.c: Use __localeconv. + * sysdeps/arm/eabi/find_exidx.c (__gnu_Unwind_Find_exidx): Use + __dl_iterate_phdr. + * sysdeps/arm/eabi/setjmp.S: Add hidden_def (__sigsetjmp). + * sysdeps/arm/memmove.S: Use HIDDEN_JUMPTARGET to call memcpy from + within libc. + * sysdeps/arm/setjmp.S: Add hidden_def (__sigsetjmp). + * sysdeps/unix/sysv/linux/arm/clone.S: Use HIDDEN_JUMPTARGET to + call _exit. + * sysdeps/unix/sysv/linux/arm/ioperm.c (init_iosys): Use __sysctl, + __readlink and fgets_unlocked. + (_ioperm): Use __open and __close. + 2008-07-18 Joseph Myers * sysdeps/arm/eabi/fgetexcptflg.c: New. diff --git a/data/c++-types-arm-linux-gnueabi.data b/data/c++-types-arm-linux-gnueabi.data new file mode 100644 index 0000000000..fde53bf337 --- /dev/null +++ b/data/c++-types-arm-linux-gnueabi.data @@ -0,0 +1,67 @@ +blkcnt64_t:x +blkcnt_t:l +blksize_t:l +caddr_t:Pc +clockid_t:i +clock_t:l +daddr_t:i +dev_t:y +fd_mask:l +fsblkcnt64_t:y +fsblkcnt_t:m +fsfilcnt64_t:y +fsfilcnt_t:m +fsid_t:8__fsid_t +gid_t:j +id_t:j +ino64_t:y +ino_t:m +int16_t:s +int32_t:i +int64_t:x +int8_t:a +intptr_t:i +key_t:i +loff_t:x +mode_t:j +nlink_t:j +off64_t:x +off_t:l +pid_t:i +pthread_attr_t:14pthread_attr_t +pthread_barrier_t:17pthread_barrier_t +pthread_barrierattr_t:21pthread_barrierattr_t +pthread_cond_t:14pthread_cond_t +pthread_condattr_t:18pthread_condattr_t +pthread_key_t:j +pthread_mutex_t:15pthread_mutex_t +pthread_mutexattr_t:19pthread_mutexattr_t +pthread_once_t:i +pthread_rwlock_t:16pthread_rwlock_t +pthread_rwlockattr_t:20pthread_rwlockattr_t +pthread_spinlock_t:i +pthread_t:m +quad_t:x +register_t:i +rlim64_t:y +rlim_t:m +sigset_t:10__sigset_t +size_t:j +socklen_t:j +ssize_t:i +suseconds_t:l +time_t:l +u_char:h +uid_t:j +uint:j +u_int:j +u_int16_t:t +u_int32_t:j +u_int64_t:y +u_int8_t:h +ulong:m +u_long:m +u_quad_t:y +useconds_t:j +ushort:t +u_short:t diff --git a/data/localplt-arm-linux-gnueabi.data b/data/localplt-arm-linux-gnueabi.data new file mode 100644 index 0000000000..109522e37e --- /dev/null +++ b/data/localplt-arm-linux-gnueabi.data @@ -0,0 +1,13 @@ +libc.so: __signbit +libc.so: calloc +libc.so: free +libc.so: fscanf +libc.so: malloc +libc.so: memalign +libc.so: raise +libc.so: realloc +libm.so: __signbit +libm.so: __signbitf +libm.so: matherr +libpthread.so: __errno_location +libpthread.so: raise diff --git a/sysdeps/arm/bsd-_setjmp.S b/sysdeps/arm/bsd-_setjmp.S index c4a094e505..c3a4383277 100644 --- a/sysdeps/arm/bsd-_setjmp.S +++ b/sysdeps/arm/bsd-_setjmp.S @@ -1,5 +1,5 @@ /* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. ARM version. - Copyright (C) 1997, 1998, 2002 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 2002, 2008 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,6 +25,6 @@ ENTRY (_setjmp) mov r1, #0 - b PLTJMP(C_SYMBOL_NAME(__sigsetjmp)) + b PLTJMP(HIDDEN_JUMPTARGET(__sigsetjmp)) END (_setjmp) libc_hidden_def (_setjmp) diff --git a/sysdeps/arm/bsd-setjmp.S b/sysdeps/arm/bsd-setjmp.S index d227ba68a6..36c571c5ef 100644 --- a/sysdeps/arm/bsd-setjmp.S +++ b/sysdeps/arm/bsd-setjmp.S @@ -1,5 +1,5 @@ /* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. ARM version. - Copyright (C) 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 2008 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,5 +25,5 @@ ENTRY (setjmp) mov r1, #1 - b PLTJMP(C_SYMBOL_NAME(__sigsetjmp)) + b PLTJMP(HIDDEN_JUMPTARGET(__sigsetjmp)) END (setjmp) diff --git a/sysdeps/arm/eabi/aeabi_localeconv.c b/sysdeps/arm/eabi/aeabi_localeconv.c index f4e51d02e8..323148e0f2 100644 --- a/sysdeps/arm/eabi/aeabi_localeconv.c +++ b/sysdeps/arm/eabi/aeabi_localeconv.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2004, 2005, 2008 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 @@ -21,5 +21,5 @@ struct lconv * __aeabi_localeconv (void) { - return localeconv (); + return __localeconv (); } diff --git a/sysdeps/arm/eabi/find_exidx.c b/sysdeps/arm/eabi/find_exidx.c index 9e4f4012ff..59b33de5a4 100644 --- a/sysdeps/arm/eabi/find_exidx.c +++ b/sysdeps/arm/eabi/find_exidx.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005 Free Software Foundation, Inc. +/* Copyright (C) 2005, 2008 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 @@ -72,7 +72,7 @@ __gnu_Unwind_Find_exidx (_Unwind_Ptr pc, int * pcount) data.pc = pc; data.exidx_start = 0; - if (dl_iterate_phdr (find_exidx_callback, &data) <= 0) + if (__dl_iterate_phdr (find_exidx_callback, &data) <= 0) return 0; *pcount = data.exidx_len / 8; diff --git a/sysdeps/arm/eabi/setjmp.S b/sysdeps/arm/eabi/setjmp.S index b7d2400f96..835db714a6 100644 --- a/sysdeps/arm/eabi/setjmp.S +++ b/sysdeps/arm/eabi/setjmp.S @@ -1,5 +1,5 @@ /* setjmp for ARM. - Copyright (C) 1997, 1998, 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 2005, 2006, 2008 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 @@ -94,3 +94,4 @@ Lhwcap: END (__sigsetjmp) +hidden_def (__sigsetjmp) diff --git a/sysdeps/arm/memmove.S b/sysdeps/arm/memmove.S index 2dd0790a2f..eda1bcc9b7 100644 --- a/sysdeps/arm/memmove.S +++ b/sysdeps/arm/memmove.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 Free Software Foundation, Inc. +/* Copyright (C) 2006, 2008 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by MontaVista Software, Inc. (written by Nicolas Pitre) @@ -66,7 +66,11 @@ ENTRY(memmove) subs ip, r0, r1 cmphi r2, ip +#ifdef NOT_IN_libc bls memcpy +#else + bls HIDDEN_JUMPTARGET(memcpy) +#endif stmfd sp!, {r0, r4, lr} add r1, r1, r2 diff --git a/sysdeps/arm/setjmp.S b/sysdeps/arm/setjmp.S index 2e8c6940f4..3fff9e9b5e 100644 --- a/sysdeps/arm/setjmp.S +++ b/sysdeps/arm/setjmp.S @@ -1,5 +1,5 @@ /* setjmp for ARM. - Copyright (C) 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 2008 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 @@ -29,3 +29,5 @@ ENTRY (__sigsetjmp) /* Make a tail call to __sigjmp_save; it takes the same args. */ B PLTJMP(C_SYMBOL_NAME(__sigjmp_save)) END (__sigsetjmp) + +hidden_def (__sigsetjmp) diff --git a/sysdeps/unix/sysv/linux/arm/clone.S b/sysdeps/unix/sysv/linux/arm/clone.S index 6c8f8e8e28..cfd2e7ef71 100644 --- a/sysdeps/unix/sysv/linux/arm/clone.S +++ b/sysdeps/unix/sysv/linux/arm/clone.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998, 1999, 2002, 2005 +/* Copyright (C) 1996, 1997, 1998, 1999, 2002, 2005, 2008 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Pat Beirne @@ -100,7 +100,7 @@ ENTRY(__clone) ldr pc, [sp], #8 @ and we are done, passing the return value through r0 - b PLTJMP(_exit) + b PLTJMP(HIDDEN_JUMPTARGET(_exit)) PSEUDO_END (__clone) diff --git a/sysdeps/unix/sysv/linux/arm/ioperm.c b/sysdeps/unix/sysv/linux/arm/ioperm.c index 1fa849d246..8af1ea356e 100644 --- a/sysdeps/unix/sysv/linux/arm/ioperm.c +++ b/sysdeps/unix/sysv/linux/arm/ioperm.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999, 2003, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999, 2003, 2005, 2008 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Phil Blundell, based on the Alpha version by David Mosberger. @@ -110,14 +110,14 @@ init_iosys (void) static int ioshift_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_SHIFT }; size_t len = sizeof(io.base); - if (! sysctl (iobase_name, 3, &io.io_base, &len, NULL, 0) - && ! sysctl (ioshift_name, 3, &io.shift, &len, NULL, 0)) + if (! __sysctl (iobase_name, 3, &io.io_base, &len, NULL, 0) + && ! __sysctl (ioshift_name, 3, &io.shift, &len, NULL, 0)) { io.initdone = 1; return 0; } - n = readlink (PATH_ARM_SYSTYPE, systype, sizeof (systype) - 1); + n = __readlink (PATH_ARM_SYSTYPE, systype, sizeof (systype) - 1); if (n > 0) { systype[n] = '\0'; @@ -144,7 +144,7 @@ init_iosys (void) if (n == 1) break; else - fgets (systype, 256, fp); + fgets_unlocked (systype, 256, fp); } fclose (fp); @@ -195,7 +195,7 @@ _ioperm (unsigned long int from, unsigned long int num, int turn_on) { int fd; - fd = open ("/dev/mem", O_RDWR); + fd = __open ("/dev/mem", O_RDWR); if (fd < 0) return -1; @@ -203,7 +203,7 @@ _ioperm (unsigned long int from, unsigned long int num, int turn_on) (unsigned long int) __mmap (0, MAX_PORT << io.shift, PROT_READ | PROT_WRITE, MAP_SHARED, fd, io.io_base); - close (fd); + __close (fd); if ((long) io.base == -1) return -1; } From 7d6729c9db4b3a27b3b344bb2125ed16d71aaf72 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 19 Aug 2008 16:06:38 +0000 Subject: [PATCH 3794/4487] * sysdeps/powerpc/nofpu/shlib-versions: New. * c++-types-powerpcsoft-linux-gnu.data: New. * localplt-powerpcsoft-linux-gnu.data: New. * sysdeps/powerpc/nofpu/feholdexcpt.c (feholdexcept): Use __fegetenv. --- ChangeLog.powerpc | 8 +++ data/c++-types-powerpcsoft-linux-gnu.data | 67 +++++++++++++++++++++++ data/localplt-powerpcsoft-linux-gnu.data | 41 ++++++++++++++ sysdeps/powerpc/nofpu/feholdexcpt.c | 4 +- sysdeps/powerpc/nofpu/shlib-versions | 1 + 5 files changed, 119 insertions(+), 2 deletions(-) create mode 100644 data/c++-types-powerpcsoft-linux-gnu.data create mode 100644 data/localplt-powerpcsoft-linux-gnu.data create mode 100644 sysdeps/powerpc/nofpu/shlib-versions diff --git a/ChangeLog.powerpc b/ChangeLog.powerpc index 463dd291a5..136f97a2a2 100644 --- a/ChangeLog.powerpc +++ b/ChangeLog.powerpc @@ -1,3 +1,11 @@ +2008-08-19 Joseph Myers + + * sysdeps/powerpc/nofpu/shlib-versions: New. + * c++-types-powerpcsoft-linux-gnu.data: New. + * localplt-powerpcsoft-linux-gnu.data: New. + * sysdeps/powerpc/nofpu/feholdexcpt.c (feholdexcept): Use + __fegetenv. + 2007-08-29 Daniel Jacobowitz * sysdeps/powerpc/nofpu/fsetexcptflg.c (__fesetexceptflag): Do not diff --git a/data/c++-types-powerpcsoft-linux-gnu.data b/data/c++-types-powerpcsoft-linux-gnu.data new file mode 100644 index 0000000000..fde53bf337 --- /dev/null +++ b/data/c++-types-powerpcsoft-linux-gnu.data @@ -0,0 +1,67 @@ +blkcnt64_t:x +blkcnt_t:l +blksize_t:l +caddr_t:Pc +clockid_t:i +clock_t:l +daddr_t:i +dev_t:y +fd_mask:l +fsblkcnt64_t:y +fsblkcnt_t:m +fsfilcnt64_t:y +fsfilcnt_t:m +fsid_t:8__fsid_t +gid_t:j +id_t:j +ino64_t:y +ino_t:m +int16_t:s +int32_t:i +int64_t:x +int8_t:a +intptr_t:i +key_t:i +loff_t:x +mode_t:j +nlink_t:j +off64_t:x +off_t:l +pid_t:i +pthread_attr_t:14pthread_attr_t +pthread_barrier_t:17pthread_barrier_t +pthread_barrierattr_t:21pthread_barrierattr_t +pthread_cond_t:14pthread_cond_t +pthread_condattr_t:18pthread_condattr_t +pthread_key_t:j +pthread_mutex_t:15pthread_mutex_t +pthread_mutexattr_t:19pthread_mutexattr_t +pthread_once_t:i +pthread_rwlock_t:16pthread_rwlock_t +pthread_rwlockattr_t:20pthread_rwlockattr_t +pthread_spinlock_t:i +pthread_t:m +quad_t:x +register_t:i +rlim64_t:y +rlim_t:m +sigset_t:10__sigset_t +size_t:j +socklen_t:j +ssize_t:i +suseconds_t:l +time_t:l +u_char:h +uid_t:j +uint:j +u_int:j +u_int16_t:t +u_int32_t:j +u_int64_t:y +u_int8_t:h +ulong:m +u_long:m +u_quad_t:y +useconds_t:j +ushort:t +u_short:t diff --git a/data/localplt-powerpcsoft-linux-gnu.data b/data/localplt-powerpcsoft-linux-gnu.data new file mode 100644 index 0000000000..65fa5dac96 --- /dev/null +++ b/data/localplt-powerpcsoft-linux-gnu.data @@ -0,0 +1,41 @@ +libc.so: _Unwind_Find_FDE +libc.so: __adddf3 +libc.so: __addsf3 +libc.so: __divdf3 +libc.so: __divsf3 +libc.so: __eqdf2 +libc.so: __eqsf2 +libc.so: __extendsfdf2 +libc.so: __fixdfsi +libc.so: __fixsfsi +libc.so: __fixunsdfsi +libc.so: __floatsidf +libc.so: __floatsisf +libc.so: __floatunsidf +libc.so: __floatunsisf +libc.so: __gedf2 +libc.so: __gtdf2 +libc.so: __ledf2 +libc.so: __ltdf2 +libc.so: __muldf3 +libc.so: __mulsf3 +libc.so: __nedf2 +libc.so: __signbit +libc.so: __signbitl +libc.so: __subdf3 +libc.so: __subsf3 +libc.so: __truncdfsf2 +libc.so: __unorddf2 +libc.so: abort +libc.so: calloc +libc.so: free +libc.so: malloc +libc.so: memalign +libc.so: realloc +libm.so: __signbit +libm.so: __signbitf +libm.so: __signbitl +libm.so: copysignl +libm.so: fabsl +libm.so: fegetround +libm.so: matherr diff --git a/sysdeps/powerpc/nofpu/feholdexcpt.c b/sysdeps/powerpc/nofpu/feholdexcpt.c index ade9d19f4b..4074ac0414 100644 --- a/sysdeps/powerpc/nofpu/feholdexcpt.c +++ b/sysdeps/powerpc/nofpu/feholdexcpt.c @@ -1,6 +1,6 @@ /* Store current floating-point environment and clear exceptions (soft-float edition). - Copyright (C) 2002, 2007 Free Software Foundation, Inc. + Copyright (C) 2002, 2007, 2008 Free Software Foundation, Inc. Contributed by Aldy Hernandez , 2002. This file is part of the GNU C Library. @@ -28,7 +28,7 @@ feholdexcept (fenv_t *envp) fenv_union_t u; /* Get the current state. */ - fegetenv (envp); + __fegetenv (envp); u.fenv = *envp; /* Clear everything except the rounding mode. */ diff --git a/sysdeps/powerpc/nofpu/shlib-versions b/sysdeps/powerpc/nofpu/shlib-versions new file mode 100644 index 0000000000..72085ddf4c --- /dev/null +++ b/sysdeps/powerpc/nofpu/shlib-versions @@ -0,0 +1 @@ +powerpc.*-.*-.* ABI powerpcsoft-@OS@ From 72e2fdef91d3f504d91e0227e0ec98b7650d8c49 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 19 Aug 2008 16:12:35 +0000 Subject: [PATCH 3795/4487] * sysdeps/unix/sysv/linux/mips/bits/socket.h: Define SOCK_CLOEXEC, SOCK_NONBLOCK, PF_ISDN and AF_ISDN. * sysdeps/unix/sysv/linux/mips/sys/epoll.h: New file. * sysdeps/unix/sysv/linux/mips/sys/eventfd.h: New file. * sysdeps/unix/sysv/linux/mips/sys/inotify.h: New file. * sysdeps/unix/sysv/linux/mips/sys/signalfd.h: New file. * sysdeps/unix/sysv/linux/mips/sys/timerfd.h: New file. --- ChangeLog.mips | 10 ++ sysdeps/unix/sysv/linux/mips/bits/socket.h | 16 ++- sysdeps/unix/sysv/linux/mips/sys/epoll.h | 143 ++++++++++++++++++++ sysdeps/unix/sysv/linux/mips/sys/eventfd.h | 52 +++++++ sysdeps/unix/sysv/linux/mips/sys/inotify.h | 105 ++++++++++++++ sysdeps/unix/sysv/linux/mips/sys/signalfd.h | 66 +++++++++ sysdeps/unix/sysv/linux/mips/sys/timerfd.h | 60 ++++++++ 7 files changed, 450 insertions(+), 2 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/mips/sys/epoll.h create mode 100644 sysdeps/unix/sysv/linux/mips/sys/eventfd.h create mode 100644 sysdeps/unix/sysv/linux/mips/sys/inotify.h create mode 100644 sysdeps/unix/sysv/linux/mips/sys/signalfd.h create mode 100644 sysdeps/unix/sysv/linux/mips/sys/timerfd.h diff --git a/ChangeLog.mips b/ChangeLog.mips index 409c2c9a84..0e6a06b025 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,13 @@ +2008-08-19 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/socket.h: Define SOCK_CLOEXEC, + SOCK_NONBLOCK, PF_ISDN and AF_ISDN. + * sysdeps/unix/sysv/linux/mips/sys/epoll.h: New file. + * sysdeps/unix/sysv/linux/mips/sys/eventfd.h: New file. + * sysdeps/unix/sysv/linux/mips/sys/inotify.h: New file. + * sysdeps/unix/sysv/linux/mips/sys/signalfd.h: New file. + * sysdeps/unix/sysv/linux/mips/sys/timerfd.h: New file. + 2008-08-19 Joseph Myers * sysdeps/mips/fpu_control.h (_FPU_GETCW, _FPU_SETCW): Make asms diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h index f3adf5f1a7..4f219d5af9 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/socket.h +++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h @@ -54,10 +54,20 @@ enum __socket_type #define SOCK_SEQPACKET SOCK_SEQPACKET SOCK_DCCP = 6, #define SOCK_DCCP SOCK_DCCP /* Datagram Congestion Control Protocol. */ - SOCK_PACKET = 10 /* Linux specific way of getting packets + SOCK_PACKET = 10, /* Linux specific way of getting packets at the dev level. For writing rarp and other similar things on the user level. */ #define SOCK_PACKET SOCK_PACKET + + /* Flags to be ORed into the type parameter of socket and socketpair and + used for the flags parameter of paccept. */ + + SOCK_CLOEXEC = 02000000, /* Atomically set close-on-exec flag for the + new descriptor(s). */ +#define SOCK_CLOEXEC SOCK_CLOEXEC + SOCK_NONBLOCK = 0200 /* Atomically mark descriptor(s) as + non-blocking. */ +#define SOCK_NONBLOCK SOCK_NONBLOCK }; /* Protocol families. */ @@ -92,7 +102,8 @@ enum __socket_type #define PF_BLUETOOTH 31 /* Bluetooth sockets. */ #define PF_IUCV 32 /* IUCV sockets. */ #define PF_RXRPC 33 /* RxRPC sockets. */ -#define PF_MAX 34 /* For now.. */ +#define PF_ISDN 34 /* mISDN sockets. */ +#define PF_MAX 35 /* For now.. */ /* Address families. */ #define AF_UNSPEC PF_UNSPEC @@ -126,6 +137,7 @@ enum __socket_type #define AF_BLUETOOTH PF_BLUETOOTH #define AF_IUCV PF_IUCV #define AF_RXRPC PF_RXRPC +#define AF_ISDN PF_ISDN #define AF_MAX PF_MAX /* Socket level values. Others are defined in the appropriate headers. diff --git a/sysdeps/unix/sysv/linux/mips/sys/epoll.h b/sysdeps/unix/sysv/linux/mips/sys/epoll.h new file mode 100644 index 0000000000..72bed46409 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/sys/epoll.h @@ -0,0 +1,143 @@ +/* Copyright (C) 2002-2006, 2007, 2008 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 _SYS_EPOLL_H +#define _SYS_EPOLL_H 1 + +#include +#include + +/* Get __sigset_t. */ +#include + +#ifndef __sigset_t_defined +# define __sigset_t_defined +typedef __sigset_t sigset_t; +#endif + + +/* Flags to be passed to epoll_create2. */ +enum + { + EPOLL_CLOEXEC = 02000000, +#define EPOLL_CLOEXEC EPOLL_CLOEXEC + EPOLL_NONBLOCK = 0200 +#define EPOLL_NONBLOCK EPOLL_NONBLOCK + }; + + +enum EPOLL_EVENTS + { + EPOLLIN = 0x001, +#define EPOLLIN EPOLLIN + EPOLLPRI = 0x002, +#define EPOLLPRI EPOLLPRI + EPOLLOUT = 0x004, +#define EPOLLOUT EPOLLOUT + EPOLLRDNORM = 0x040, +#define EPOLLRDNORM EPOLLRDNORM + EPOLLRDBAND = 0x080, +#define EPOLLRDBAND EPOLLRDBAND + EPOLLWRNORM = 0x100, +#define EPOLLWRNORM EPOLLWRNORM + EPOLLWRBAND = 0x200, +#define EPOLLWRBAND EPOLLWRBAND + EPOLLMSG = 0x400, +#define EPOLLMSG EPOLLMSG + EPOLLERR = 0x008, +#define EPOLLERR EPOLLERR + EPOLLHUP = 0x010, +#define EPOLLHUP EPOLLHUP + EPOLLRDHUP = 0x2000, +#define EPOLLRDHUP EPOLLRDHUP + EPOLLONESHOT = (1 << 30), +#define EPOLLONESHOT EPOLLONESHOT + EPOLLET = (1 << 31) +#define EPOLLET EPOLLET + }; + + +/* Valid opcodes ( "op" parameter ) to issue to epoll_ctl(). */ +#define EPOLL_CTL_ADD 1 /* Add a file descriptor to the interface. */ +#define EPOLL_CTL_DEL 2 /* Remove a file descriptor from the interface. */ +#define EPOLL_CTL_MOD 3 /* Change file descriptor epoll_event structure. */ + + +typedef union epoll_data +{ + void *ptr; + int fd; + uint32_t u32; + uint64_t u64; +} epoll_data_t; + +struct epoll_event +{ + uint32_t events; /* Epoll events */ + epoll_data_t data; /* User data variable */ +}; + + +__BEGIN_DECLS + +/* Creates an epoll instance. Returns an fd for the new instance. + The "size" parameter is a hint specifying the number of file + descriptors to be associated with the new instance. The fd + returned by epoll_create() should be closed with close(). */ +extern int epoll_create (int __size) __THROW; + +/* Same as epoll_create but with an additional FLAGS parameter. */ +extern int epoll_create2 (int __size, int __flags) __THROW; + + +/* Manipulate an epoll instance "epfd". Returns 0 in case of success, + -1 in case of error ( the "errno" variable will contain the + specific error code ) The "op" parameter is one of the EPOLL_CTL_* + constants defined above. The "fd" parameter is the target of the + operation. The "event" parameter describes which events the caller + is interested in and any associated user data. */ +extern int epoll_ctl (int __epfd, int __op, int __fd, + struct epoll_event *__event) __THROW; + + +/* Wait for events on an epoll instance "epfd". Returns the number of + triggered events returned in "events" buffer. Or -1 in case of + error with the "errno" variable set to the specific error code. The + "events" parameter is a buffer that will contain triggered + events. The "maxevents" is the maximum number of events to be + returned ( usually size of "events" ). The "timeout" parameter + specifies the maximum wait time in milliseconds (-1 == infinite). + + This function is a cancellation point and therefore not marked with + __THROW. */ +extern int epoll_wait (int __epfd, struct epoll_event *__events, + int __maxevents, int __timeout); + + +/* Same as epoll_wait, but the thread's signal mask is temporarily + and atomically replaced with the one provided as parameter. + + This function is a cancellation point and therefore not marked with + __THROW. */ +extern int epoll_pwait (int __epfd, struct epoll_event *__events, + int __maxevents, int __timeout, + __const __sigset_t *__ss); + +__END_DECLS + +#endif /* sys/epoll.h */ diff --git a/sysdeps/unix/sysv/linux/mips/sys/eventfd.h b/sysdeps/unix/sysv/linux/mips/sys/eventfd.h new file mode 100644 index 0000000000..fa34c8cec1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/sys/eventfd.h @@ -0,0 +1,52 @@ +/* Copyright (C) 2007, 2008 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 _SYS_EVENTFD_H +#define _SYS_EVENTFD_H 1 + +#include + + +/* Type for event counter. */ +typedef uint64_t eventfd_t; + +/* Flags for signalfd. */ +enum + { + EFD_CLOEXEC = 02000000, +#define EFD_CLOEXEC EFD_CLOEXEC + EFD_NONBLOCK = 0200 +#define EFD_NONBLOCK EFD_NONBLOCK + }; + + +__BEGIN_DECLS + +/* Return file descriptor for generic event channel. Set initial + value to COUNT. */ +extern int eventfd (int __count, int __flags) __THROW; + +/* Read event counter and possibly wait for events. */ +extern int eventfd_read (int __fd, eventfd_t *__value); + +/* Increment event counter. */ +extern int eventfd_write (int __fd, eventfd_t value); + +__END_DECLS + +#endif /* sys/eventfd.h */ diff --git a/sysdeps/unix/sysv/linux/mips/sys/inotify.h b/sysdeps/unix/sysv/linux/mips/sys/inotify.h new file mode 100644 index 0000000000..a811c7fc36 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/sys/inotify.h @@ -0,0 +1,105 @@ +/* Copyright (C) 2005, 2006, 2008 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 _SYS_INOTIFY_H +#define _SYS_INOTIFY_H 1 + +#include + + +/* Flags for the parameter of inotify_init1. */ +enum + { + IN_CLOEXEC = 02000000, +#define IN_CLOEXEC IN_CLOEXEC + IN_NONBLOCK = 0200 +#define IN_NONBLOCK IN_NONBLOCK + }; + + +/* Structure describing an inotify event. */ +struct inotify_event +{ + int wd; /* Watch descriptor. */ + uint32_t mask; /* Watch mask. */ + uint32_t cookie; /* Cookie to synchronize two events. */ + uint32_t len; /* Length (including NULs) of name. */ + char name __flexarr; /* Name. */ +}; + + +/* Supported events suitable for MASK parameter of INOTIFY_ADD_WATCH. */ +#define IN_ACCESS 0x00000001 /* File was accessed. */ +#define IN_MODIFY 0x00000002 /* File was modified. */ +#define IN_ATTRIB 0x00000004 /* Metadata changed. */ +#define IN_CLOSE_WRITE 0x00000008 /* Writtable file was closed. */ +#define IN_CLOSE_NOWRITE 0x00000010 /* Unwrittable file closed. */ +#define IN_CLOSE (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* Close. */ +#define IN_OPEN 0x00000020 /* File was opened. */ +#define IN_MOVED_FROM 0x00000040 /* File was moved from X. */ +#define IN_MOVED_TO 0x00000080 /* File was moved to Y. */ +#define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* Moves. */ +#define IN_CREATE 0x00000100 /* Subfile was created. */ +#define IN_DELETE 0x00000200 /* Subfile was deleted. */ +#define IN_DELETE_SELF 0x00000400 /* Self was deleted. */ +#define IN_MOVE_SELF 0x00000800 /* Self was moved. */ + +/* Events sent by the kernel. */ +#define IN_UNMOUNT 0x00002000 /* Backing fs was unmounted. */ +#define IN_Q_OVERFLOW 0x00004000 /* Event queued overflowed. */ +#define IN_IGNORED 0x00008000 /* File was ignored. */ + +/* Helper events. */ +#define IN_CLOSE (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* Close. */ +#define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* Moves. */ + +/* Special flags. */ +#define IN_ONLYDIR 0x01000000 /* Only watch the path if it is a + directory. */ +#define IN_DONT_FOLLOW 0x02000000 /* Do not follow a sym link. */ +#define IN_MASK_ADD 0x20000000 /* Add to the mask of an already + existing watch. */ +#define IN_ISDIR 0x40000000 /* Event occurred against dir. */ +#define IN_ONESHOT 0x80000000 /* Only send event once. */ + +/* All events which a program can wait on. */ +#define IN_ALL_EVENTS (IN_ACCESS | IN_MODIFY | IN_ATTRIB | IN_CLOSE_WRITE \ + | IN_CLOSE_NOWRITE | IN_OPEN | IN_MOVED_FROM \ + | IN_MOVED_TO | IN_CREATE | IN_DELETE \ + | IN_DELETE_SELF | IN_MOVE_SELF) + + +__BEGIN_DECLS + +/* Create and initialize inotify instance. */ +extern int inotify_init (void) __THROW; + +/* Create and initialize inotify instance. */ +extern int inotify_init1 (int __flags) __THROW; + +/* Add watch of object NAME to inotify instance FD. Notify about + events specified by MASK. */ +extern int inotify_add_watch (int __fd, const char *__name, uint32_t __mask) + __THROW; + +/* Remove the watch specified by WD from the inotify instance FD. */ +extern int inotify_rm_watch (int __fd, uint32_t __wd) __THROW; + +__END_DECLS + +#endif /* sys/inotify.h */ diff --git a/sysdeps/unix/sysv/linux/mips/sys/signalfd.h b/sysdeps/unix/sysv/linux/mips/sys/signalfd.h new file mode 100644 index 0000000000..2fe7e379dc --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/sys/signalfd.h @@ -0,0 +1,66 @@ +/* Copyright (C) 2007, 2008 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 _SYS_SIGNALFD_H +#define _SYS_SIGNALFD_H 1 + +#define __need_sigset_t +#include +#include + + +struct signalfd_siginfo +{ + uint32_t ssi_signo; + int32_t ssi_errno; + int32_t ssi_code; + uint32_t ssi_pid; + uint32_t ssi_uid; + int32_t ssi_fd; + uint32_t ssi_tid; + uint32_t ssi_band; + uint32_t ssi_overrun; + uint32_t ssi_trapno; + int32_t ssi_status; + int32_t ssi_int; + uint64_t ssi_ptr; + uint64_t ssi_utime; + uint64_t ssi_stime; + uint64_t ssi_addr; + uint8_t __pad[48]; +}; + +/* Flags for signalfd. */ +enum + { + SFD_CLOEXEC = 02000000, +#define SFD_CLOEXEC SFD_CLOEXEC + SFD_NONBLOCK = 0200 +#define SFD_NONBLOCK SFD_NONBLOCK + }; + +__BEGIN_DECLS + +/* Request notification for delivery of signals in MASK to be + performed using descriptor FD.*/ +extern int signalfd (int __fd, const sigset_t *__mask, int __flags) + __nonnull ((2)) __THROW; + +__END_DECLS + +#endif /* sys/signalfd.h */ diff --git a/sysdeps/unix/sysv/linux/mips/sys/timerfd.h b/sysdeps/unix/sysv/linux/mips/sys/timerfd.h new file mode 100644 index 0000000000..ebd37ff4a5 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/sys/timerfd.h @@ -0,0 +1,60 @@ +/* Copyright (C) 2008 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 _SYS_TIMERFD_H +#define _SYS_TIMERFD_H 1 + +#include + + +/* Bits to be set in the FLAGS parameter of `timerfd_create'. */ +enum + { + TFD_CLOEXEC = 02000000, +#define TFD_CLOEXEC TFD_CLOEXEC + TFD_NONBLOCK = 0200 +#define TFD_NONBLOCK TFD_NONBLOCK + }; + + +/* Bits to be set in the FLAGS parameter of `timerfd_settime'. */ +enum + { + TFD_TIMER_ABSTIME = 1 << 0 +#define TFD_TIMER_ABSTIME TFD_TIMER_ABSTIME + }; + + +__BEGIN_DECLS + +/* Return file descriptor for new interval timer source. */ +extern int timerfd_create (clockid_t __clock_id, int __flags) __THROW; + +/* Set next expiration time of interval timer source UFD to UTMR. If + FLAGS has the TFD_TIMER_ABSTIME flag set the timeout value is + absolute. Optionally return the old expiration time in OTMR. */ +extern int timerfd_settime (int __ufd, int __flags, + __const struct itimerspec *__utmr, + struct itimerspec *__otmr) __THROW; + +/* Return the next expiration time of UFD. */ +extern int timerfd_gettime (int __ufd, struct itimerspec *__otmr) __THROW; + +__END_DECLS + +#endif /* sys/timerfd.h */ From a961a11ea20b9390c863fac1ea8a8b5f0c102ce1 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 19 Aug 2008 16:53:11 +0000 Subject: [PATCH 3796/4487] * sysdeps/unix/sysv/linux/mips/sys/epoll.h: Change epoll_create2 to epoll_create1. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/sys/epoll.h | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 0e6a06b025..065ac681ae 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2008-08-19 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/sys/epoll.h: Change epoll_create2 + to epoll_create1. + 2008-08-19 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/socket.h: Define SOCK_CLOEXEC, diff --git a/sysdeps/unix/sysv/linux/mips/sys/epoll.h b/sysdeps/unix/sysv/linux/mips/sys/epoll.h index 72bed46409..6d2ec8edf0 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/epoll.h +++ b/sysdeps/unix/sysv/linux/mips/sys/epoll.h @@ -31,7 +31,7 @@ typedef __sigset_t sigset_t; #endif -/* Flags to be passed to epoll_create2. */ +/* Flags to be passed to epoll_create1. */ enum { EPOLL_CLOEXEC = 02000000, @@ -101,8 +101,9 @@ __BEGIN_DECLS returned by epoll_create() should be closed with close(). */ extern int epoll_create (int __size) __THROW; -/* Same as epoll_create but with an additional FLAGS parameter. */ -extern int epoll_create2 (int __size, int __flags) __THROW; +/* Same as epoll_create but with an FLAGS parameter. The unused SIZE + parameter has been dropped. */ +extern int epoll_create1 (int __flags) __THROW; /* Manipulate an epoll instance "epfd". Returns 0 in case of success, From 63fb881a04bb46b83f95b83c3751ba9d0145e29a Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Wed, 1 Oct 2008 13:28:14 +0000 Subject: [PATCH 3797/4487] 2008-10-01 Mark Shinwell Daniel Jacobowitz Richard Sandiford * sysdeps/mips/dl-dtprocnum.h (DT_MIPS_NUM): Redefine. * sysdeps/mips/dl-lookup.c: New. * sysdeps/mips/do-lookup.h: New. * sysdeps/mips/dl-machine.h (ELF_MACHINE_NO_PLT): Remove definition. (STO_MIPS_PLT, R_MIPS_COPY, R_MIPS_JUMP_SLOT, DT_MIPS_PLTGOT): Define if needed. (ELF_MACHINE_JMP_SLOT): Alter definition and update comment. (elf_machine_type_class): Likewise. (ELF_MACHINE_PLT_REL): Define. (elf_machine_fixup_plt): New. (elf_machine_plt_value): New. (elf_machine_reloc): Handle jump slot and copy relocations. (elf_machine_lazy_rel): Point relocation place at PLT if required. (RESOLVE_GOTSYM): Take a relocation type argument. (elf_machine_got_rel): Bind lazy stubs directly to their target if !lazy. Skip lazy binding for PLT symbols. (elf_machine_runtime_setup): Fill in .got.plt header. * sysdeps/mips/dl-trampoline.c (IFNEWABI): New macro. (ELF_DL_PLT_FRAME_SIZE, ELF_DL_PLT_SAVE_ARG_REGS, ELF_DL_PLT_RESTORE_ARG_REGS): Define. (_dl_runtime_pltresolve): New. * sysdeps/mips/bits/linkmap.h: New file. * sysdeps/mips/tls-macros.h: Load $gp as required. Merge 32-bit and 64-bit versions. * sysdeps/unix/sysv/linux/mips/mips32/sysdep.h (SYSCALL_ERROR_LABEL): Delete definition. * sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h (PSEUDO_CPLOAD, PSEUDO_ERRJMP, PSEUDO_SAVEGP, PSEUDO_LOADGP): Define. (PSEUDO): Use them. Move outside __PIC__. (PSEUDO_JMP): New. (CENABLE, CDISABLE): Use it. --- ChangeLog.mips | 39 ++ sysdeps/mips/bits/linkmap.h | 4 + sysdeps/mips/dl-dtprocnum.h | 6 + sysdeps/mips/dl-lookup.c | 581 ++++++++++++++++++ sysdeps/mips/dl-machine.h | 168 ++++- sysdeps/mips/dl-trampoline.c | 87 +++ sysdeps/mips/do-lookup.h | 37 ++ sysdeps/mips/tls-macros.h | 94 ++- sysdeps/unix/sysv/linux/mips/mips32/sysdep.h | 10 +- .../unix/sysv/linux/mips/nptl/sysdep-cancel.h | 53 +- 10 files changed, 972 insertions(+), 107 deletions(-) create mode 100644 sysdeps/mips/bits/linkmap.h create mode 100644 sysdeps/mips/dl-lookup.c create mode 100644 sysdeps/mips/do-lookup.h diff --git a/ChangeLog.mips b/ChangeLog.mips index 065ac681ae..a4f03a731a 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,42 @@ +2008-10-01 Mark Shinwell + Daniel Jacobowitz + Richard Sandiford + + * sysdeps/mips/dl-dtprocnum.h (DT_MIPS_NUM): Redefine. + * sysdeps/mips/dl-lookup.c: New. + * sysdeps/mips/do-lookup.h: New. + * sysdeps/mips/dl-machine.h (ELF_MACHINE_NO_PLT): Remove + definition. + (STO_MIPS_PLT, R_MIPS_COPY, R_MIPS_JUMP_SLOT, DT_MIPS_PLTGOT): Define + if needed. + (ELF_MACHINE_JMP_SLOT): Alter definition and update comment. + (elf_machine_type_class): Likewise. + (ELF_MACHINE_PLT_REL): Define. + (elf_machine_fixup_plt): New. + (elf_machine_plt_value): New. + (elf_machine_reloc): Handle jump slot and copy relocations. + (elf_machine_lazy_rel): Point relocation place at PLT if + required. + (RESOLVE_GOTSYM): Take a relocation type argument. + (elf_machine_got_rel): Bind lazy stubs directly to their target if + !lazy. Skip lazy binding for PLT symbols. + (elf_machine_runtime_setup): Fill in .got.plt header. + * sysdeps/mips/dl-trampoline.c (IFNEWABI): New macro. + (ELF_DL_PLT_FRAME_SIZE, ELF_DL_PLT_SAVE_ARG_REGS, + ELF_DL_PLT_RESTORE_ARG_REGS): Define. + (_dl_runtime_pltresolve): New. + * sysdeps/mips/bits/linkmap.h: New file. + * sysdeps/mips/tls-macros.h: Load $gp as required. Merge 32-bit and + 64-bit versions. + + * sysdeps/unix/sysv/linux/mips/mips32/sysdep.h (SYSCALL_ERROR_LABEL): + Delete definition. + * sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h (PSEUDO_CPLOAD, + PSEUDO_ERRJMP, PSEUDO_SAVEGP, PSEUDO_LOADGP): Define. + (PSEUDO): Use them. Move outside __PIC__. + (PSEUDO_JMP): New. + (CENABLE, CDISABLE): Use it. + 2008-08-19 Joseph Myers * sysdeps/unix/sysv/linux/mips/sys/epoll.h: Change epoll_create2 diff --git a/sysdeps/mips/bits/linkmap.h b/sysdeps/mips/bits/linkmap.h new file mode 100644 index 0000000000..a6df7821e6 --- /dev/null +++ b/sysdeps/mips/bits/linkmap.h @@ -0,0 +1,4 @@ +struct link_map_machine + { + ElfW(Addr) plt; /* Address of .plt */ + }; diff --git a/sysdeps/mips/dl-dtprocnum.h b/sysdeps/mips/dl-dtprocnum.h index dfd03ba317..41ae000820 100644 --- a/sysdeps/mips/dl-dtprocnum.h +++ b/sysdeps/mips/dl-dtprocnum.h @@ -17,6 +17,12 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +/* Until elf/elf.h in glibc is updated. */ +#ifndef STO_MIPS_PLT +# undef DT_MIPS_NUM +# define DT_MIPS_NUM 0x35 +#endif + /* Number of extra dynamic section entries for this architecture. By default there are none. */ #define DT_THISPROCNUM DT_MIPS_NUM diff --git a/sysdeps/mips/dl-lookup.c b/sysdeps/mips/dl-lookup.c new file mode 100644 index 0000000000..015c153d18 --- /dev/null +++ b/sysdeps/mips/dl-lookup.c @@ -0,0 +1,581 @@ +/* Look up a symbol in the loaded objects. + MIPS/Linux version - this is identical to the common version, but + because it is in sysdeps/mips, it gets sysdeps/mips/do-lookup.h. + Using instead of "do-lookup.h" would work too. + + Copyright (C) 1995-2005, 2006, 2007 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. */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#define VERSTAG(tag) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (tag)) + +/* We need this string more than once. */ +static const char undefined_msg[] = "undefined symbol: "; + + +struct sym_val + { + const ElfW(Sym) *s; + struct link_map *m; + }; + + +#define make_string(string, rest...) \ + ({ \ + const char *all[] = { string, ## rest }; \ + size_t len, cnt; \ + char *result, *cp; \ + \ + len = 1; \ + for (cnt = 0; cnt < sizeof (all) / sizeof (all[0]); ++cnt) \ + len += strlen (all[cnt]); \ + \ + cp = result = alloca (len); \ + for (cnt = 0; cnt < sizeof (all) / sizeof (all[0]); ++cnt) \ + cp = __stpcpy (cp, all[cnt]); \ + \ + result; \ + }) + +/* Statistics function. */ +#ifdef SHARED +# define bump_num_relocations() ++GL(dl_num_relocations) +#else +# define bump_num_relocations() ((void) 0) +#endif + + +/* The actual lookup code. */ +#include "do-lookup.h" + + +static uint_fast32_t +dl_new_hash (const char *s) +{ + uint_fast32_t h = 5381; + for (unsigned char c = *s; c != '\0'; c = *++s) + h = h * 33 + c; + return h & 0xffffffff; +} + + +/* Add extra dependency on MAP to UNDEF_MAP. */ +static int +internal_function +add_dependency (struct link_map *undef_map, struct link_map *map, int flags) +{ + struct link_map *runp; + unsigned int i; + int result = 0; + + /* Avoid self-references and references to objects which cannot be + unloaded anyway. */ + if (undef_map == map) + return 0; + + /* Avoid references to objects which cannot be unloaded anyway. */ + assert (map->l_type == lt_loaded); + if ((map->l_flags_1 & DF_1_NODELETE) != 0) + return 0; + + struct link_map_reldeps *l_reldeps + = atomic_forced_read (undef_map->l_reldeps); + + /* Make sure l_reldeps is read before l_initfini. */ + atomic_read_barrier (); + + /* Determine whether UNDEF_MAP already has a reference to MAP. First + look in the normal dependencies. */ + struct link_map **l_initfini = atomic_forced_read (undef_map->l_initfini); + if (l_initfini != NULL) + { + for (i = 0; l_initfini[i] != NULL; ++i) + if (l_initfini[i] == map) + return 0; + } + + /* No normal dependency. See whether we already had to add it + to the special list of dynamic dependencies. */ + unsigned int l_reldepsact = 0; + if (l_reldeps != NULL) + { + struct link_map **list = &l_reldeps->list[0]; + l_reldepsact = l_reldeps->act; + for (i = 0; i < l_reldepsact; ++i) + if (list[i] == map) + return 0; + } + + /* Save serial number of the target MAP. */ + unsigned long long serial = map->l_serial; + + /* Make sure nobody can unload the object while we are at it. */ + if (__builtin_expect (flags & DL_LOOKUP_GSCOPE_LOCK, 0)) + { + /* We can't just call __rtld_lock_lock_recursive (GL(dl_load_lock)) + here, that can result in ABBA deadlock. */ + THREAD_GSCOPE_RESET_FLAG (); + __rtld_lock_lock_recursive (GL(dl_load_lock)); + /* While MAP value won't change, after THREAD_GSCOPE_RESET_FLAG () + it can e.g. point to unallocated memory. So avoid the optimizer + treating the above read from MAP->l_serial as ensurance it + can safely dereference it. */ + map = atomic_forced_read (map); + + /* From this point on it is unsafe to dereference MAP, until it + has been found in one of the lists. */ + + /* Redo the l_initfini check in case undef_map's l_initfini + changed in the mean time. */ + if (undef_map->l_initfini != l_initfini + && undef_map->l_initfini != NULL) + { + l_initfini = undef_map->l_initfini; + for (i = 0; l_initfini[i] != NULL; ++i) + if (l_initfini[i] == map) + goto out_check; + } + + /* Redo the l_reldeps check if undef_map's l_reldeps changed in + the mean time. */ + if (undef_map->l_reldeps != NULL) + { + if (undef_map->l_reldeps != l_reldeps) + { + struct link_map **list = &undef_map->l_reldeps->list[0]; + l_reldepsact = undef_map->l_reldeps->act; + for (i = 0; i < l_reldepsact; ++i) + if (list[i] == map) + goto out_check; + } + else if (undef_map->l_reldeps->act > l_reldepsact) + { + struct link_map **list + = &undef_map->l_reldeps->list[0]; + i = l_reldepsact; + l_reldepsact = undef_map->l_reldeps->act; + for (; i < l_reldepsact; ++i) + if (list[i] == map) + goto out_check; + } + } + } + else + __rtld_lock_lock_recursive (GL(dl_load_lock)); + + /* The object is not yet in the dependency list. Before we add + it make sure just one more time the object we are about to + reference is still available. There is a brief period in + which the object could have been removed since we found the + definition. */ + runp = GL(dl_ns)[undef_map->l_ns]._ns_loaded; + while (runp != NULL && runp != map) + runp = runp->l_next; + + if (runp != NULL) + { + /* The object is still available. */ + + /* MAP could have been dlclosed, freed and then some other dlopened + library could have the same link_map pointer. */ + if (map->l_serial != serial) + goto out_check; + + /* Redo the NODELETE check, as when dl_load_lock wasn't held + yet this could have changed. */ + if ((map->l_flags_1 & DF_1_NODELETE) != 0) + goto out; + + /* If the object with the undefined reference cannot be removed ever + just make sure the same is true for the object which contains the + definition. */ + if (undef_map->l_type != lt_loaded + || (undef_map->l_flags_1 & DF_1_NODELETE) != 0) + { + map->l_flags_1 |= DF_1_NODELETE; + goto out; + } + + /* Add the reference now. */ + if (__builtin_expect (l_reldepsact >= undef_map->l_reldepsmax, 0)) + { + /* Allocate more memory for the dependency list. Since this + can never happen during the startup phase we can use + `realloc'. */ + struct link_map_reldeps *newp; + unsigned int max + = undef_map->l_reldepsmax ? undef_map->l_reldepsmax * 2 : 10; + + newp = malloc (sizeof (*newp) + max * sizeof (struct link_map *)); + if (newp == NULL) + { + /* If we didn't manage to allocate memory for the list this is + no fatal problem. We simply make sure the referenced object + cannot be unloaded. This is semantically the correct + behavior. */ + map->l_flags_1 |= DF_1_NODELETE; + goto out; + } + else + { + if (l_reldepsact) + memcpy (&newp->list[0], &undef_map->l_reldeps->list[0], + l_reldepsact * sizeof (struct link_map *)); + newp->list[l_reldepsact] = map; + newp->act = l_reldepsact + 1; + atomic_write_barrier (); + void *old = undef_map->l_reldeps; + undef_map->l_reldeps = newp; + undef_map->l_reldepsmax = max; + if (old) + _dl_scope_free (old); + } + } + else + { + undef_map->l_reldeps->list[l_reldepsact] = map; + atomic_write_barrier (); + undef_map->l_reldeps->act = l_reldepsact + 1; + } + + /* Display information if we are debugging. */ + if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0)) + _dl_debug_printf ("\ +\nfile=%s [%lu]; needed by %s [%lu] (relocation dependency)\n\n", + map->l_name[0] ? map->l_name : rtld_progname, + map->l_ns, + undef_map->l_name[0] + ? undef_map->l_name : rtld_progname, + undef_map->l_ns); + } + else + /* Whoa, that was bad luck. We have to search again. */ + result = -1; + + out: + /* Release the lock. */ + __rtld_lock_unlock_recursive (GL(dl_load_lock)); + + if (__builtin_expect (flags & DL_LOOKUP_GSCOPE_LOCK, 0)) + THREAD_GSCOPE_SET_FLAG (); + + return result; + + out_check: + if (map->l_serial != serial) + result = -1; + goto out; +} + +static void +internal_function +_dl_debug_bindings (const char *undef_name, struct link_map *undef_map, + const ElfW(Sym) **ref, struct sym_val *value, + const struct r_found_version *version, int type_class, + int protected); + + +/* Search loaded objects' symbol tables for a definition of the symbol + UNDEF_NAME, perhaps with a requested version for the symbol. + + We must never have calls to the audit functions inside this function + or in any function which gets called. If this would happen the audit + code might create a thread which can throw off all the scope locking. */ +lookup_t +internal_function +_dl_lookup_symbol_x (const char *undef_name, struct link_map *undef_map, + const ElfW(Sym) **ref, + struct r_scope_elem *symbol_scope[], + const struct r_found_version *version, + int type_class, int flags, struct link_map *skip_map) +{ + const uint_fast32_t new_hash = dl_new_hash (undef_name); + unsigned long int old_hash = 0xffffffff; + struct sym_val current_value = { NULL, NULL }; + struct r_scope_elem **scope = symbol_scope; + + bump_num_relocations (); + + /* No other flag than DL_LOOKUP_ADD_DEPENDENCY or DL_LOOKUP_GSCOPE_LOCK + is allowed if we look up a versioned symbol. */ + assert (version == NULL + || (flags & ~(DL_LOOKUP_ADD_DEPENDENCY | DL_LOOKUP_GSCOPE_LOCK)) + == 0); + + size_t i = 0; + if (__builtin_expect (skip_map != NULL, 0)) + /* Search the relevant loaded objects for a definition. */ + while ((*scope)->r_list[i] != skip_map) + ++i; + + /* Search the relevant loaded objects for a definition. */ + for (size_t start = i; *scope != NULL; start = 0, ++scope) + { + int res = do_lookup_x (undef_name, new_hash, &old_hash, *ref, + ¤t_value, *scope, start, version, flags, + skip_map, type_class); + if (res > 0) + break; + + if (__builtin_expect (res, 0) < 0 && skip_map == NULL) + { + /* Oh, oh. The file named in the relocation entry does not + contain the needed symbol. This code is never reached + for unversioned lookups. */ + assert (version != NULL); + const char *reference_name = undef_map ? undef_map->l_name : NULL; + + /* XXX We cannot translate the message. */ + _dl_signal_cerror (0, (reference_name[0] + ? reference_name + : (rtld_progname ?: "
")), + N_("relocation error"), + make_string ("symbol ", undef_name, ", version ", + version->name, + " not defined in file ", + version->filename, + " with link time reference", + res == -2 + ? " (no version symbols)" : "")); + *ref = NULL; + return 0; + } + } + + if (__builtin_expect (current_value.s == NULL, 0)) + { + if ((*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK) + && skip_map == NULL) + { + /* We could find no value for a strong reference. */ + const char *reference_name = undef_map ? undef_map->l_name : ""; + const char *versionstr = version ? ", version " : ""; + const char *versionname = (version && version->name + ? version->name : ""); + + /* XXX We cannot translate the message. */ + _dl_signal_cerror (0, (reference_name[0] + ? reference_name + : (rtld_progname ?: "
")), + N_("symbol lookup error"), + make_string (undefined_msg, undef_name, + versionstr, versionname)); + } + *ref = NULL; + return 0; + } + + int protected = (*ref + && ELFW(ST_VISIBILITY) ((*ref)->st_other) == STV_PROTECTED); + if (__builtin_expect (protected != 0, 0)) + { + /* It is very tricky. We need to figure out what value to + return for the protected symbol. */ + if (type_class == ELF_RTYPE_CLASS_PLT) + { + if (current_value.s != NULL && current_value.m != undef_map) + { + current_value.s = *ref; + current_value.m = undef_map; + } + } + else + { + struct sym_val protected_value = { NULL, NULL }; + + for (scope = symbol_scope; *scope != NULL; i = 0, ++scope) + if (do_lookup_x (undef_name, new_hash, &old_hash, *ref, + &protected_value, *scope, i, version, flags, + skip_map, ELF_RTYPE_CLASS_PLT) != 0) + break; + + if (protected_value.s != NULL && protected_value.m != undef_map) + { + current_value.s = *ref; + current_value.m = undef_map; + } + } + } + + /* We have to check whether this would bind UNDEF_MAP to an object + in the global scope which was dynamically loaded. In this case + we have to prevent the latter from being unloaded unless the + UNDEF_MAP object is also unloaded. */ + if (__builtin_expect (current_value.m->l_type == lt_loaded, 0) + /* Don't do this for explicit lookups as opposed to implicit + runtime lookups. */ + && (flags & DL_LOOKUP_ADD_DEPENDENCY) != 0 + /* Add UNDEF_MAP to the dependencies. */ + && add_dependency (undef_map, current_value.m, flags) < 0) + /* Something went wrong. Perhaps the object we tried to reference + was just removed. Try finding another definition. */ + return _dl_lookup_symbol_x (undef_name, undef_map, ref, + (flags & DL_LOOKUP_GSCOPE_LOCK) + ? undef_map->l_scope : symbol_scope, + version, type_class, flags, skip_map); + + /* The object is used. */ + current_value.m->l_used = 1; + + if (__builtin_expect (GLRO(dl_debug_mask) + & (DL_DEBUG_BINDINGS|DL_DEBUG_PRELINK), 0)) + _dl_debug_bindings (undef_name, undef_map, ref, + ¤t_value, version, type_class, protected); + + *ref = current_value.s; + return LOOKUP_VALUE (current_value.m); +} + + +/* Cache the location of MAP's hash table. */ + +void +internal_function +_dl_setup_hash (struct link_map *map) +{ + Elf_Symndx *hash; + Elf_Symndx nchain; + + if (__builtin_expect (map->l_info[DT_ADDRTAGIDX (DT_GNU_HASH) + DT_NUM + + DT_THISPROCNUM + DT_VERSIONTAGNUM + + DT_EXTRANUM + DT_VALNUM] != NULL, 1)) + { + Elf32_Word *hash32 + = (void *) D_PTR (map, l_info[DT_ADDRTAGIDX (DT_GNU_HASH) + DT_NUM + + DT_THISPROCNUM + DT_VERSIONTAGNUM + + DT_EXTRANUM + DT_VALNUM]); + map->l_nbuckets = *hash32++; + Elf32_Word symbias = *hash32++; + Elf32_Word bitmask_nwords = *hash32++; + /* Must be a power of two. */ + assert ((bitmask_nwords & (bitmask_nwords - 1)) == 0); + map->l_gnu_bitmask_idxbits = bitmask_nwords - 1; + map->l_gnu_shift = *hash32++; + + map->l_gnu_bitmask = (ElfW(Addr) *) hash32; + hash32 += __ELF_NATIVE_CLASS / 32 * bitmask_nwords; + + map->l_gnu_buckets = hash32; + hash32 += map->l_nbuckets; + map->l_gnu_chain_zero = hash32 - symbias; + return; + } + + if (!map->l_info[DT_HASH]) + return; + hash = (void *) D_PTR (map, l_info[DT_HASH]); + + map->l_nbuckets = *hash++; + nchain = *hash++; + map->l_buckets = hash; + hash += map->l_nbuckets; + map->l_chain = hash; +} + + +static void +internal_function +_dl_debug_bindings (const char *undef_name, struct link_map *undef_map, + const ElfW(Sym) **ref, struct sym_val *value, + const struct r_found_version *version, int type_class, + int protected) +{ + const char *reference_name = undef_map->l_name; + + if (GLRO(dl_debug_mask) & DL_DEBUG_BINDINGS) + { + _dl_debug_printf ("binding file %s [%lu] to %s [%lu]: %s symbol `%s'", + (reference_name[0] + ? reference_name + : (rtld_progname ?: "
")), + undef_map->l_ns, + value->m->l_name[0] ? value->m->l_name : rtld_progname, + value->m->l_ns, + protected ? "protected" : "normal", undef_name); + if (version) + _dl_debug_printf_c (" [%s]\n", version->name); + else + _dl_debug_printf_c ("\n"); + } +#ifdef SHARED + if (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK) + { + int conflict = 0; + struct sym_val val = { NULL, NULL }; + + if ((GLRO(dl_trace_prelink_map) == NULL + || GLRO(dl_trace_prelink_map) == GL(dl_ns)[LM_ID_BASE]._ns_loaded) + && undef_map != GL(dl_ns)[LM_ID_BASE]._ns_loaded) + { + const uint_fast32_t new_hash = dl_new_hash (undef_name); + unsigned long int old_hash = 0xffffffff; + + do_lookup_x (undef_name, new_hash, &old_hash, *ref, &val, + undef_map->l_local_scope[0], 0, version, 0, NULL, + type_class); + + if (val.s != value->s || val.m != value->m) + conflict = 1; + } + + if (value->s + && (__builtin_expect (ELFW(ST_TYPE) (value->s->st_info) + == STT_TLS, 0))) + type_class = 4; + + if (conflict + || GLRO(dl_trace_prelink_map) == undef_map + || GLRO(dl_trace_prelink_map) == NULL + || type_class == 4) + { + _dl_printf ("%s 0x%0*Zx 0x%0*Zx -> 0x%0*Zx 0x%0*Zx ", + conflict ? "conflict" : "lookup", + (int) sizeof (ElfW(Addr)) * 2, + (size_t) undef_map->l_map_start, + (int) sizeof (ElfW(Addr)) * 2, + (size_t) (((ElfW(Addr)) *ref) - undef_map->l_map_start), + (int) sizeof (ElfW(Addr)) * 2, + (size_t) (value->s ? value->m->l_map_start : 0), + (int) sizeof (ElfW(Addr)) * 2, + (size_t) (value->s ? value->s->st_value : 0)); + + if (conflict) + _dl_printf ("x 0x%0*Zx 0x%0*Zx ", + (int) sizeof (ElfW(Addr)) * 2, + (size_t) (val.s ? val.m->l_map_start : 0), + (int) sizeof (ElfW(Addr)) * 2, + (size_t) (val.s ? val.s->st_value : 0)); + + _dl_printf ("/%x %s\n", type_class, undef_name); + } + } +#endif +} diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 1b8d0f3019..bca0dbe452 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -25,8 +25,6 @@ #define ELF_MACHINE_NAME "MIPS" -#define ELF_MACHINE_NO_PLT - #include #ifndef ENTRY_POINT @@ -55,11 +53,23 @@ ".size\t" __STRING(entry) ", . - " __STRING(entry) "\n\t" #endif +/* Until elf/elf.h in glibc is updated. */ +#ifndef STO_MIPS_PLT +#define STO_MIPS_PLT 0x8 +#define R_MIPS_COPY 126 +#define R_MIPS_JUMP_SLOT 127 +#define DT_MIPS_PLTGOT 0x70000032 +#endif + /* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. - This makes no sense on MIPS but we have to define this to R_MIPS_REL32 - to avoid the asserts in dl-lookup.c from blowing. */ -#define ELF_MACHINE_JMP_SLOT R_MIPS_REL32 -#define elf_machine_type_class(type) ELF_RTYPE_CLASS_PLT + This only makes sense on MIPS when using PLTs, so choose the + PLT relocation (not encountered when not using PLTs). */ +#define ELF_MACHINE_JMP_SLOT R_MIPS_JUMP_SLOT +#define elf_machine_type_class(type) \ + ((((type) == ELF_MACHINE_JMP_SLOT) * ELF_RTYPE_CLASS_PLT) \ + | (((type) == R_MIPS_COPY) * ELF_RTYPE_CLASS_COPY)) + +#define ELF_MACHINE_PLT_REL 1 /* Translate a processor specific dynamic tag to the index in l_info array. */ @@ -73,6 +83,15 @@ do { if ((l)->l_info[DT_MIPS (RLD_MAP)]) \ (ElfW(Addr)) (r); \ } while (0) +/* Allow ABIVERSION == 1, meaning PLTs and copy relocations are + required. */ +#define VALID_ELF_ABIVERSION(ver) (ver == 0 || ver == 2) +#define VALID_ELF_OSABI(osabi) (osabi == ELFOSABI_SYSV) +#define VALID_ELF_HEADER(hdr,exp,size) \ + memcmp (hdr,exp,size-2) == 0 \ + && VALID_ELF_OSABI (hdr[EI_OSABI]) \ + && VALID_ELF_ABIVERSION (hdr[EI_ABIVERSION]) + /* Return nonzero iff ELF header is compatible with the running host. */ static inline int __attribute_used__ elf_machine_matches_host (const ElfW(Ehdr) *ehdr) @@ -294,6 +313,24 @@ do { \ # define ARCH_LA_PLTEXIT mips_n64_gnu_pltexit # endif +/* For a non-writable PLT, rewrite the .got.plt entry at RELOC_ADDR to + point at the symbol with address VALUE. For a writable PLT, rewrite + the corresponding PLT entry instead. */ +static inline ElfW(Addr) +elf_machine_fixup_plt (struct link_map *map, lookup_t t, + const ElfW(Rel) *reloc, + ElfW(Addr) *reloc_addr, ElfW(Addr) value) +{ + return *reloc_addr = value; +} + +static inline ElfW(Addr) +elf_machine_plt_value (struct link_map *map, const ElfW(Rel) *reloc, + ElfW(Addr) value) +{ + return value; +} + #endif /* !dl_machine_h */ #ifdef RESOLVE_MAP @@ -461,6 +498,57 @@ elf_machine_reloc (struct link_map *map, ElfW(Addr) r_info, #endif case R_MIPS_NONE: /* Alright, Wilbur. */ break; + + case R_MIPS_JUMP_SLOT: + { + struct link_map *sym_map; + ElfW(Addr) value; + + /* The addend for a jump slot relocation must always be zero: + calls via the PLT always branch to the symbol's address and + not to the address plus a non-zero offset. */ + if (r_addend != 0) + _dl_signal_error (0, map->l_name, NULL, + "found jump slot relocation with non-zero addend"); + + sym_map = RESOLVE_MAP (&sym, version, r_type); + value = sym_map == NULL ? 0 : sym_map->l_addr + sym->st_value; + *addr_field = value; + + break; + } + + case R_MIPS_COPY: + { + const ElfW(Sym) *const refsym = sym; + struct link_map *sym_map; + ElfW(Addr) value; + + /* Calculate the address of the symbol. */ + sym_map = RESOLVE_MAP (&sym, version, r_type); + value = sym_map == NULL ? 0 : sym_map->l_addr + sym->st_value; + + if (__builtin_expect (sym == NULL, 0)) + /* This can happen in trace mode if an object could not be + found. */ + break; + if (__builtin_expect (sym->st_size > refsym->st_size, 0) + || (__builtin_expect (sym->st_size < refsym->st_size, 0) + && GLRO(dl_verbose))) + { + const char *strtab; + + strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]); + _dl_error_printf ("\ + %s: Symbol `%s' has different size in shared object, consider re-linking\n", + rtld_progname ?: "", + strtab + refsym->st_name); + } + memcpy (reloc_addr, (void *) value, + MIN (sym->st_size, refsym->st_size)); + break; + } + #if _MIPS_SIM == _ABI64 case R_MIPS_64: /* For full compliance with the ELF64 ABI, one must precede the @@ -504,9 +592,23 @@ elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc, auto inline void __attribute__((always_inline)) elf_machine_lazy_rel (struct link_map *map, - ElfW(Addr) l_addr, const ElfW(Rela) *reloc) + ElfW(Addr) l_addr, const ElfW(Rel) *reloc) { - /* Do nothing. */ + ElfW(Addr) *const reloc_addr = (void *) (l_addr + reloc->r_offset); + const unsigned int r_type = ELFW(R_TYPE) (reloc->r_info); + /* Check for unexpected PLT reloc type. */ + if (__builtin_expect (r_type == R_MIPS_JUMP_SLOT, 1)) + { + if (__builtin_expect (map->l_mach.plt, 0) == 0) + { + /* Nothing is required here since we only support lazy + relocation in executables. */ + } + else + *reloc_addr = map->l_mach.plt; + } + else + _dl_reloc_bad_type (map, r_type, 1); } auto inline void @@ -537,13 +639,13 @@ elf_machine_got_rel (struct link_map *map, int lazy) const ElfW(Half) *vernum; int i, n, symidx; -#define RESOLVE_GOTSYM(sym,vernum,sym_index) \ +#define RESOLVE_GOTSYM(sym,vernum,sym_index,reloc) \ ({ \ const ElfW(Sym) *ref = sym; \ const struct r_found_version *version \ = vernum ? &map->l_versions[vernum[sym_index] & 0x7fff] : NULL; \ struct link_map *sym_map; \ - sym_map = RESOLVE_MAP (&ref, version, R_MIPS_REL32); \ + sym_map = RESOLVE_MAP (&ref, version, reloc); \ ref ? sym_map->l_addr + ref->st_value : 0; \ }) @@ -584,25 +686,38 @@ elf_machine_got_rel (struct link_map *map, int lazy) { if (sym->st_shndx == SHN_UNDEF) { - if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC - && sym->st_value && lazy) - *got = sym->st_value + map->l_addr; + if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC && sym->st_value + && !(sym->st_other & STO_MIPS_PLT)) + { + if (lazy) + *got = sym->st_value + map->l_addr; + else + /* This is a lazy-binding stub, so we don't need the + canonical address. */ + *got = RESOLVE_GOTSYM (sym, vernum, symidx, R_MIPS_JUMP_SLOT); + } else - *got = RESOLVE_GOTSYM (sym, vernum, symidx); + *got = RESOLVE_GOTSYM (sym, vernum, symidx, R_MIPS_32); } else if (sym->st_shndx == SHN_COMMON) - *got = RESOLVE_GOTSYM (sym, vernum, symidx); + *got = RESOLVE_GOTSYM (sym, vernum, symidx, R_MIPS_32); else if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC - && *got != sym->st_value - && lazy) - *got += map->l_addr; + && *got != sym->st_value) + { + if (lazy) + *got += map->l_addr; + else + /* This is a lazy-binding stub, so we don't need the + canonical address. */ + *got = RESOLVE_GOTSYM (sym, vernum, symidx, R_MIPS_JUMP_SLOT); + } else if (ELFW(ST_TYPE) (sym->st_info) == STT_SECTION) { if (sym->st_other == 0) *got += map->l_addr; } else - *got = RESOLVE_GOTSYM (sym, vernum, symidx); + *got = RESOLVE_GOTSYM (sym, vernum, symidx, R_MIPS_32); ++got; ++sym; @@ -623,6 +738,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) # ifndef RTLD_BOOTSTRAP ElfW(Addr) *got; extern void _dl_runtime_resolve (ElfW(Word)); + extern void _dl_runtime_pltresolve (void); extern int _dl_mips_gnu_objects; if (lazy) @@ -649,6 +765,20 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) /* Relocate global offset table. */ elf_machine_got_rel (l, lazy); + /* If using PLTs, fill in the first two entries of .got.plt. */ + if (l->l_info[DT_JMPREL] && lazy) + { + ElfW(Addr) *gotplt; + gotplt = (ElfW(Addr) *) D_PTR (l, l_info[DT_MIPS (PLTGOT)]); + /* If a library is prelinked but we have to relocate anyway, + we have to be able to undo the prelinking of .got.plt. + The prelinker saved the address of .plt for us here. */ + if (gotplt[1]) + l->l_mach.plt = gotplt[1] + l->l_addr; + gotplt[0] = (ElfW(Addr)) &_dl_runtime_pltresolve; + gotplt[1] = (ElfW(Addr)) l; + } + # endif return lazy; } diff --git a/sysdeps/mips/dl-trampoline.c b/sysdeps/mips/dl-trampoline.c index 459adf9a8e..ff58b0d5e2 100644 --- a/sysdeps/mips/dl-trampoline.c +++ b/sysdeps/mips/dl-trampoline.c @@ -200,7 +200,24 @@ __dl_runtime_resolve (ElfW(Word) sym_index, lw $7, 28($29)\n \ " +/* The PLT resolver should also save and restore $2 and $3, which are used + as arguments to MIPS16 stub functions. */ +#define ELF_DL_PLT_FRAME_SIZE 48 + +#define ELF_DL_PLT_SAVE_ARG_REGS \ + ELF_DL_SAVE_ARG_REGS "\ + sw $2, 40($29)\n \ + sw $3, 44($29)\n \ +" + +#define ELF_DL_PLT_RESTORE_ARG_REGS \ + ELF_DL_RESTORE_ARG_REGS "\ + lw $2, 40($29)\n \ + lw $3, 44($29)\n \ +" + #define IFABIO32(X) X +#define IFNEWABI(X) #else /* _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64 */ @@ -230,7 +247,24 @@ __dl_runtime_resolve (ElfW(Word) sym_index, ld $11, 64($29)\n \ " +/* The PLT resolver should also save and restore $2 and $3, which are used + as arguments to MIPS16 stub functions. */ +#define ELF_DL_PLT_FRAME_SIZE 96 + +#define ELF_DL_PLT_SAVE_ARG_REGS \ + ELF_DL_SAVE_ARG_REGS "\ + sd $2, 80($29)\n \ + sd $3, 88($29)\n \ +" + +#define ELF_DL_PLT_RESTORE_ARG_REGS \ + ELF_DL_RESTORE_ARG_REGS "\ + ld $2, 80($29)\n \ + ld $3, 88($29)\n \ +" + #define IFABIO32(X) +#define IFNEWABI(X) X #endif @@ -270,3 +304,56 @@ _dl_runtime_resolve:\n\ .end _dl_runtime_resolve\n\ .previous\n\ "); + +/* Assembler veneer called from the PLT header code when using PLTs. + + Code in each PLT entry and the PLT header fills in the arguments to + this function: + + - $15 (o32 t7, n32/n64 t3) - caller's return address + - $24 (t8) - PLT entry index + - $25 (t9) - address of _dl_runtime_pltresolve + - o32 $28 (gp), n32/n64 $14 (t2) - address of .got.plt + + Different registers are used for .got.plt because the ABI was + originally designed for o32, where gp was available (call + clobbered). On n32/n64 gp is call saved. + + _dl_fixup needs: + + - $4 (a0) - link map address + - $5 (a1) - .rel.plt offset (== PLT entry index * 8) */ + +asm ("\n\ + .text\n\ + .align 2\n\ + .globl _dl_runtime_pltresolve\n\ + .type _dl_runtime_pltresolve,@function\n\ + .ent _dl_runtime_pltresolve\n\ +_dl_runtime_pltresolve:\n\ + .frame $29, " STRINGXP(ELF_DL_PLT_FRAME_SIZE) ", $31\n\ + .set noreorder\n\ + # Save arguments and sp value in stack.\n\ + " STRINGXP(PTR_SUBIU) " $29, " STRINGXP(ELF_DL_PLT_FRAME_SIZE) "\n\ + " IFABIO32(STRINGXP(PTR_L) " $13, " STRINGXP(PTRSIZE) "($28)") "\n\ + " IFNEWABI(STRINGXP(PTR_L) " $13, " STRINGXP(PTRSIZE) "($14)") "\n\ + # Modify t9 ($25) so as to point .cpload instruction.\n\ + " IFABIO32(STRINGXP(PTR_ADDIU) " $25, 12\n") "\ + # Compute GP.\n\ + " STRINGXP(SETUP_GP) "\n\ + " STRINGXV(SETUP_GP64 (0, _dl_runtime_pltresolve)) "\n\ + .set reorder\n\ + " IFABIO32(STRINGXP(CPRESTORE(32))) "\n\ + " ELF_DL_PLT_SAVE_ARG_REGS "\ + move $4, $13\n\ + sll $5, $24, " STRINGXP(PTRLOG) " + 1\n\ + jal _dl_fixup\n\ + move $25, $2\n\ + " ELF_DL_PLT_RESTORE_ARG_REGS "\ + " STRINGXP(RESTORE_GP64) "\n\ + " STRINGXP(PTR_ADDIU) " $29, " STRINGXP(ELF_DL_PLT_FRAME_SIZE) "\n\ + jr $25\n\ + .end _dl_runtime_pltresolve\n\ + .previous\n\ +"); + diff --git a/sysdeps/mips/do-lookup.h b/sysdeps/mips/do-lookup.h new file mode 100644 index 0000000000..0d92620ff7 --- /dev/null +++ b/sysdeps/mips/do-lookup.h @@ -0,0 +1,37 @@ +/* MIPS-specific veneer to GLIBC's do-lookup.h. + Copyright (C) 2008 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. */ + +/* The semantics of zero/non-zero values of undefined symbols differs + depending on whether the non-PIC ABI is in use. Under the non-PIC ABI, + a non-zero value indicates that there is an address reference to the + symbol and thus it must always be resolved (except when resolving a jump + slot relocation) to the PLT entry whose address is provided as the + symbol's value; a zero value indicates that this canonical-address + behaviour is not required. Yet under the classic MIPS psABI, a zero value + indicates that there is an address reference to the function and the + dynamic linker must resolve the symbol immediately upon loading. To + avoid conflict, symbols for which the dynamic linker must assume the + non-PIC ABI semantics are marked with the STO_MIPS_PLT flag. The + following ugly hack causes the code in the platform-independent + do-lookup.h file to check this flag correctly. */ +#define st_value st_shndx == SHN_UNDEF && !(sym->st_other & STO_MIPS_PLT)) \ + || (sym->st_value +#include_next "do-lookup.h" +#undef st_value + diff --git a/sysdeps/mips/tls-macros.h b/sysdeps/mips/tls-macros.h index 2d0516b3e4..8fe2e4a150 100644 --- a/sysdeps/mips/tls-macros.h +++ b/sysdeps/mips/tls-macros.h @@ -1,44 +1,56 @@ /* Macros to support TLS testing in times of missing compiler support. */ -#if _MIPS_SIM != _ABI64 +#include +#include -/* These versions are for o32 and n32. */ +#define __STRING2(X) __STRING(X) +#define ADDU __STRING2(PTR_ADDU) +#define ADDIU __STRING2(PTR_ADDIU) +#define LW __STRING2(PTR_L) -# define TLS_GD(x) \ - ({ void *__result; \ - extern void *__tls_get_addr (void *); \ - asm ("addiu %0, $28, %%tlsgd(" #x ")" \ - : "=r" (__result)); \ - (int *)__tls_get_addr (__result); }) +/* Load the GOT pointer, which may not be in $28 in a non-PIC + (abicalls pic0) function. */ +#ifndef __PIC__ +# if _MIPS_SIM != _ABI64 +# define LOAD_GP "move %[tmp], $28\n\tla $28, __gnu_local_gp\n\t" +# else +# define LOAD_GP "move %[tmp], $28\n\tdla $28, __gnu_local_gp\n\t" +# endif +# define UNLOAD_GP "\n\tmove $28, %[tmp]" #else +# define LOAD_GP +# define UNLOAD_GP +#endif + # define TLS_GD(x) \ - ({ void *__result; \ + ({ void *__result, *__tmp; \ extern void *__tls_get_addr (void *); \ - asm ("daddiu %0, $28, %%tlsgd(" #x ")" \ - : "=r" (__result)); \ + asm (LOAD_GP ADDIU " %0, $28, %%tlsgd(" #x ")" \ + UNLOAD_GP \ + : "=r" (__result), [tmp] "=&r" (__tmp)); \ (int *)__tls_get_addr (__result); }) -#endif - -#if _MIPS_SIM != _ABI64 # define TLS_LD(x) \ - ({ void *__result; \ + ({ void *__result, *__tmp; \ extern void *__tls_get_addr (void *); \ - asm ("addiu %0, $28, %%tlsldm(" #x ")" \ - : "=r" (__result)); \ + asm (LOAD_GP ADDIU " %0, $28, %%tlsldm(" #x ")" \ + UNLOAD_GP \ + : "=r" (__result), [tmp] "=&r" (__tmp)); \ __result = __tls_get_addr (__result); \ asm ("lui $3,%%dtprel_hi(" #x ")\n\t" \ "addiu $3,$3,%%dtprel_lo(" #x ")\n\t" \ - "addu %0,%0,$3" \ + ADDU " %0,%0,$3" \ : "+r" (__result) : : "$3"); \ __result; }) # define TLS_IE(x) \ - ({ void *__result; \ + ({ void *__result, *__tmp; \ asm (".set push\n\t.set mips32r2\n\t" \ "rdhwr\t%0,$29\n\t.set pop" \ : "=v" (__result)); \ - asm ("lw $3,%%gottprel(" #x ")($28)\n\t" \ - "addu %0,%0,$3" \ - : "+r" (__result) : : "$3"); \ + asm (LOAD_GP LW " $3,%%gottprel(" #x ")($28)\n\t" \ + ADDU " %0,%0,$3" \ + UNLOAD_GP \ + : "+r" (__result), [tmp] "=&r" (__tmp) \ + : : "$3"); \ __result; }) # define TLS_LE(x) \ ({ void *__result; \ @@ -47,42 +59,6 @@ : "=v" (__result)); \ asm ("lui $3,%%tprel_hi(" #x ")\n\t" \ "addiu $3,$3,%%tprel_lo(" #x ")\n\t" \ - "addu %0,%0,$3" \ + ADDU " %0,%0,$3" \ : "+r" (__result) : : "$3"); \ __result; }) - -#else - -/* These versions are for n64. */ - -# define TLS_LD(x) \ - ({ void *__result; \ - extern void *__tls_get_addr (void *); \ - asm ("daddiu %0, $28, %%tlsldm(" #x ")" \ - : "=r" (__result)); \ - __result = __tls_get_addr (__result); \ - asm ("lui $3,%%dtprel_hi(" #x ")\n\t" \ - "daddiu $3,$3,%%dtprel_lo(" #x ")\n\t" \ - "daddu %0,%0,$3" \ - : "+r" (__result) : : "$3"); \ - __result; }) -# define TLS_IE(x) \ - ({ void *__result; \ - asm (".set push\n\t.set mips32r2\n\t" \ - "rdhwr\t%0,$29\n\t.set pop" \ - : "=v" (__result)); \ - asm ("ld $3,%%gottprel(" #x ")($28)\n\t" \ - "daddu %0,%0,$3" \ - : "+r" (__result) : : "$3"); \ - __result; }) -# define TLS_LE(x) \ - ({ void *__result; \ - asm (".set push\n\t.set mips32r2\n\t" \ - "rdhwr\t%0,$29\n\t.set pop" \ - : "=v" (__result)); \ - asm ("lui $3,%%tprel_hi(" #x ")\n\t" \ - "daddiu $3,$3,%%tprel_lo(" #x ")\n\t" \ - "daddu %0,%0,$3" \ - : "+r" (__result) : : "$3"); \ - __result; }) -#endif diff --git a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h index 089fa9dc64..c3d59ddb8b 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h @@ -35,15 +35,7 @@ # define SYS_ify(syscall_name) __NR_/**/syscall_name #endif -#ifdef __ASSEMBLER__ - -/* We don't want the label for the error handler to be visible in the symbol - table when we define it here. */ -#ifdef __PIC__ -# define SYSCALL_ERROR_LABEL 99b -#endif - -#else /* ! __ASSEMBLER__ */ +#ifndef __ASSEMBLER__ /* Define a macro which expands into the inline wrapper code for a system call. */ diff --git a/sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h index f2bf2d7129..85ceff5659 100644 --- a/sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h @@ -25,28 +25,38 @@ #if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt -#ifdef __PIC__ +# ifdef __PIC__ +# define PSEUDO_CPLOAD .cpload t9; +# define PSEUDO_ERRJMP la t9, __syscall_error; jr t9; +# define PSEUDO_SAVEGP sw gp, 32(sp); cfi_rel_offset (gp, 32); +# define PSEUDO_LOADGP lw gp, 32(sp); +# else +# define PSEUDO_CPLOAD +# define PSEUDO_ERRJMP j __syscall_error; +# define PSEUDO_SAVEGP +# define PSEUDO_LOADGP +# endif + # undef PSEUDO # define PSEUDO(name, syscall_name, args) \ .align 2; \ L(pseudo_start): \ cfi_startproc; \ - 99: la t9,__syscall_error; \ - jr t9; \ + 99: PSEUDO_ERRJMP \ .type __##syscall_name##_nocancel, @function; \ .globl __##syscall_name##_nocancel; \ __##syscall_name##_nocancel: \ .set noreorder; \ - .cpload t9; \ + PSEUDO_CPLOAD \ li v0, SYS_ify(syscall_name); \ syscall; \ .set reorder; \ - bne a3, zero, SYSCALL_ERROR_LABEL; \ + bne a3, zero, 99b; \ ret; \ .size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel; \ ENTRY (name) \ .set noreorder; \ - .cpload t9; \ + PSEUDO_CPLOAD \ .set reorder; \ SINGLE_THREAD_P(v1); \ bne zero, v1, L(pseudo_cancel); \ @@ -54,17 +64,16 @@ li v0, SYS_ify(syscall_name); \ syscall; \ .set reorder; \ - bne a3, zero, SYSCALL_ERROR_LABEL; \ + bne a3, zero, 99b; \ ret; \ L(pseudo_cancel): \ SAVESTK_##args; \ sw ra, 28(sp); \ cfi_rel_offset (ra, 28); \ - sw gp, 32(sp); \ - cfi_rel_offset (gp, 32); \ + PSEUDO_SAVEGP \ PUSHARGS_##args; /* save syscall args */ \ CENABLE; \ - lw gp, 32(sp); \ + PSEUDO_LOADGP \ sw v0, 44(sp); /* save mask */ \ POPARGS_##args; /* restore syscall args */ \ .set noreorder; \ @@ -75,12 +84,12 @@ sw a3, 40(sp); /* save syscall error flag */ \ lw a0, 44(sp); /* pass mask as arg1 */ \ CDISABLE; \ - lw gp, 32(sp); \ + PSEUDO_LOADGP \ lw v0, 36(sp); /* restore syscall result */ \ lw a3, 40(sp); /* restore syscall error flag */ \ lw ra, 28(sp); /* restore return address */ \ .set noreorder; \ - bne a3, zero, SYSCALL_ERROR_LABEL; \ + bne a3, zero, 99b; \ RESTORESTK; \ L(pseudo_end): \ .set reorder; @@ -88,8 +97,6 @@ # undef PSEUDO_END # define PSEUDO_END(sym) cfi_endproc; .end sym; .size sym,.-sym -#endif - # define PUSHARGS_0 /* nothing to do */ # define PUSHARGS_1 PUSHARGS_0 sw a0, 0(sp); cfi_rel_offset (a0, 0); # define PUSHARGS_2 PUSHARGS_1 sw a1, 4(sp); cfi_rel_offset (a1, 4); @@ -136,19 +143,25 @@ # define RESTORESTK addu sp, STKSPACE; cfi_adjust_cfa_offset(-STKSPACE) +# ifdef __PIC__ /* We use jalr rather than jal. This means that the assembler will not automatically restore $gp (in case libc has multiple GOTs) so we must do it manually - which we have to do anyway since we don't use .cprestore. It also shuts up the assembler warning about not using .cprestore. */ +# define PSEUDO_JMP(sym) la t9, sym; jalr t9; +# else +# define PSEUDO_JMP(sym) jal sym; +# endif + # ifdef IS_IN_libpthread -# define CENABLE la t9, __pthread_enable_asynccancel; jalr t9; -# define CDISABLE la t9, __pthread_disable_asynccancel; jalr t9; +# define CENABLE PSEUDO_JMP (__pthread_enable_asynccancel) +# define CDISABLE PSEUDO_JMP (__pthread_disable_asynccancel) # elif defined IS_IN_librt -# define CENABLE la t9, __librt_enable_asynccancel; jalr t9; -# define CDISABLE la t9, __librt_disable_asynccancel; jalr t9; +# define CENABLE PSEUDO_JMP (__librt_enable_asynccancel) +# define CDISABLE PSEUDO_JMP (__librt_disable_asynccancel) # else -# define CENABLE la t9, __libc_enable_asynccancel; jalr t9; -# define CDISABLE la t9, __libc_disable_asynccancel; jalr t9; +# define CENABLE PSEUDO_JMP (__libc_enable_asynccancel) +# define CDISABLE PSEUDO_JMP (__libc_disable_asynccancel) # endif # ifndef __ASSEMBLER__ From f6e40d38942b13ae5347c52a5bc80ac23e233a21 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Wed, 15 Oct 2008 19:37:36 +0000 Subject: [PATCH 3798/4487] * sysdeps/mips/dl-dtprocnum.h (DT_MIPS_NUM): Do not redefine. * sysdeps/mips/dl-machine.h (STO_MIPS_PLT, R_MIPS_COPY, R_MIPS_JUMP_SLOT, DT_MIPS_PLTGOT): Do not redefine. --- ChangeLog.mips | 6 ++++++ sysdeps/mips/dl-dtprocnum.h | 6 ------ sysdeps/mips/dl-machine.h | 8 -------- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index a4f03a731a..e94e109811 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,9 @@ +2008-10-15 Daniel Jacobowitz + + * sysdeps/mips/dl-dtprocnum.h (DT_MIPS_NUM): Do not redefine. + * sysdeps/mips/dl-machine.h (STO_MIPS_PLT, R_MIPS_COPY, + R_MIPS_JUMP_SLOT, DT_MIPS_PLTGOT): Do not redefine. + 2008-10-01 Mark Shinwell Daniel Jacobowitz Richard Sandiford diff --git a/sysdeps/mips/dl-dtprocnum.h b/sysdeps/mips/dl-dtprocnum.h index 41ae000820..dfd03ba317 100644 --- a/sysdeps/mips/dl-dtprocnum.h +++ b/sysdeps/mips/dl-dtprocnum.h @@ -17,12 +17,6 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -/* Until elf/elf.h in glibc is updated. */ -#ifndef STO_MIPS_PLT -# undef DT_MIPS_NUM -# define DT_MIPS_NUM 0x35 -#endif - /* Number of extra dynamic section entries for this architecture. By default there are none. */ #define DT_THISPROCNUM DT_MIPS_NUM diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index bca0dbe452..ef088bff3b 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -53,14 +53,6 @@ ".size\t" __STRING(entry) ", . - " __STRING(entry) "\n\t" #endif -/* Until elf/elf.h in glibc is updated. */ -#ifndef STO_MIPS_PLT -#define STO_MIPS_PLT 0x8 -#define R_MIPS_COPY 126 -#define R_MIPS_JUMP_SLOT 127 -#define DT_MIPS_PLTGOT 0x70000032 -#endif - /* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. This only makes sense on MIPS when using PLTs, so choose the PLT relocation (not encountered when not using PLTs). */ From 9a3d967483c9bcaf9f72a24588913cbd6d94c0ed Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 16 Oct 2008 20:28:45 +0000 Subject: [PATCH 3799/4487] * sysdeps/unix/sysv/linux/sys/signalfd.h (signalfd): Fix __THROW vs. __nonnull order for C++. * sysdeps/unix/sysv/linux/alpha/sys/signalfd.h (signalfd): Likewise. * sysdeps/unix/sysv/linux/sparc/sys/signalfd.h (signalfd): Likewise. --- sysdeps/unix/sysv/linux/alpha/sys/signalfd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/sys/signalfd.h b/sysdeps/unix/sysv/linux/alpha/sys/signalfd.h index a820eafe79..4cbe977768 100644 --- a/sysdeps/unix/sysv/linux/alpha/sys/signalfd.h +++ b/sysdeps/unix/sysv/linux/alpha/sys/signalfd.h @@ -59,7 +59,7 @@ __BEGIN_DECLS /* Request notification for delivery of signals in MASK to be performed using descriptor FD.*/ extern int signalfd (int __fd, const sigset_t *__mask, int __flags) - __nonnull ((2)) __THROW; + __THROW __nonnull ((2)); __END_DECLS From 9c482dc51db55ff376598d1fa373d27a69b1764d Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Thu, 23 Oct 2008 16:57:15 +0000 Subject: [PATCH 3800/4487] Regenerated: autoconf ports/sysdeps/hppa/elf/configure.in --- sysdeps/hppa/elf/configure | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/hppa/elf/configure b/sysdeps/hppa/elf/configure index 226c30d3bb..ba69990fd5 100644 --- a/sysdeps/hppa/elf/configure +++ b/sysdeps/hppa/elf/configure @@ -4,8 +4,8 @@ if test "$usetls" != no; then # Check for support of thread-local storage handling in assembler and # linker. -echo "$as_me:$LINENO: checking for hppa TLS support" >&5 -echo $ECHO_N "checking for hppa TLS support... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for hppa TLS support" >&5 +echo $ECHO_N "checking for hppa TLS support... $ECHO_C" >&6; } if test "${libc_cv_hppa_tls+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -52,8 +52,8 @@ else fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $libc_cv_hppa_tls" >&5 -echo "${ECHO_T}$libc_cv_hppa_tls" >&6 +{ echo "$as_me:$LINENO: result: $libc_cv_hppa_tls" >&5 +echo "${ECHO_T}$libc_cv_hppa_tls" >&6; } if test $libc_cv_hppa_tls = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_TLS_SUPPORT 1 From 63ad0ed1d569a8e89b2e9b6202e884bc05339836 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Thu, 23 Oct 2008 16:57:35 +0000 Subject: [PATCH 3801/4487] Regenerated: autoconf ports/sysdeps/hppa/configure.in --- sysdeps/hppa/configure | 1613 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 1608 insertions(+), 5 deletions(-) diff --git a/sysdeps/hppa/configure b/sysdeps/hppa/configure index bc01e46b6c..22a61fb4f8 100644 --- a/sysdeps/hppa/configure +++ b/sysdeps/hppa/configure @@ -1,7 +1,1610 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.61. +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no +fi + + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + case $as_dir in + /*) + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell autoconf@gnu.org about your system, + echo including any error possibly output before this + echo message +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + + +exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Identity of this package. +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= + +ac_subst_vars='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias' +ac_subst_files='' + ac_precious_vars='build_alias +host_alias +target_alias' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; -echo "$as_me:$LINENO: checking for assembler line separator" >&5 -echo $ECHO_N "checking for assembler line separator... $ECHO_C" >&6 + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=\$ac_optarg ;; + + -without-* | --without-*) + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } +fi + +# Be sure to have absolute directory names. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { echo "$as_me: error: Working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$0" || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 + { (exit 1); exit 1; }; } + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures this package to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF +_ACEOF +fi + +if test -n "$ac_init_help"; then + + cat <<\_ACEOF + +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +configure +generated by GNU Autoconf 2.61 + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by $as_me, which was +generated by GNU Autoconf 2.61. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args '$ac_arg'" + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------------- ## +## File substitutions. ## +## ------------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer explicitly selected file to automatically selected ones. +if test -n "$CONFIG_SITE"; then + set x "$CONFIG_SITE" +elif test "x$prefix" != xNONE; then + set x "$prefix/share/config.site" "$prefix/etc/config.site" +else + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" +fi +shift +for ac_site_file +do + if test -r "$ac_site_file"; then + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } +fi + + + + + + + + + + + + + + + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +# This file is generated from configure.in by Autoconf. DO NOT EDIT! + { echo "$as_me:$LINENO: checking for assembler line separator" >&5 +echo $ECHO_N "checking for assembler line separator... $ECHO_C" >&6; } if test "${libc_cv_asm_line_sep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -25,8 +1628,8 @@ else fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $libc_cv_asm_line_sep" >&5 -echo "${ECHO_T}$libc_cv_asm_line_sep" >&6 +{ echo "$as_me:$LINENO: result: $libc_cv_asm_line_sep" >&5 +echo "${ECHO_T}$libc_cv_asm_line_sep" >&6; } cat >>confdefs.h <<_ACEOF #define ASM_LINE_SEP $libc_cv_asm_line_sep _ACEOF From d7f95e85c0d88a96de9e2c9fb650d322bc647e29 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Thu, 23 Oct 2008 17:11:06 +0000 Subject: [PATCH 3802/4487] Regenerated: autoconf ports/sysdeps/hppa/configure.in --- sysdeps/hppa/configure | 1607 +--------------------------------------- 1 file changed, 2 insertions(+), 1605 deletions(-) diff --git a/sysdeps/hppa/configure b/sysdeps/hppa/configure index 22a61fb4f8..b50ec17be1 100644 --- a/sysdeps/hppa/configure +++ b/sysdeps/hppa/configure @@ -1,1609 +1,6 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61. -# -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# CDPATH. -$as_unset CDPATH - - -if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes -else - as_have_required=no -fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : -else - as_candidate_shells= - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - case $as_dir in - /*) - for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" - done;; - esac -done -IFS=$as_save_IFS - - - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi - - - -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell autoconf@gnu.org about your system, - echo including any error possibly output before this - echo message -} - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; -esac - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - - -exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} - -# Identity of this package. -PACKAGE_NAME= -PACKAGE_TARNAME= -PACKAGE_VERSION= -PACKAGE_STRING= -PACKAGE_BUGREPORT= - -ac_subst_vars='SHELL -PATH_SEPARATOR -PACKAGE_NAME -PACKAGE_TARNAME -PACKAGE_VERSION -PACKAGE_STRING -PACKAGE_BUGREPORT -exec_prefix -prefix -program_transform_name -bindir -sbindir -libexecdir -datarootdir -datadir -sysconfdir -sharedstatedir -localstatedir -includedir -oldincludedir -docdir -infodir -htmldir -dvidir -pdfdir -psdir -libdir -localedir -mandir -DEFS -ECHO_C -ECHO_N -ECHO_T -LIBS -build_alias -host_alias -target_alias' -ac_subst_files='' - ac_precious_vars='build_alias -host_alias -target_alias' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=\$ac_optarg ;; - - -without-* | --without-*) - ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) { echo "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } -fi - -# Be sure to have absolute directory names. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { echo "$as_me: error: Working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$0" || -$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 - { (exit 1); exit 1; }; } - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures this package to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF -_ACEOF -fi - -if test -n "$ac_init_help"; then - - cat <<\_ACEOF - -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -configure -generated by GNU Autoconf 2.61 - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by $as_me, which was -generated by GNU Autoconf 2.61. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - echo "PATH: $as_dir" -done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; - 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - ac_configure_args="$ac_configure_args '$ac_arg'" - ;; - esac - done -done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - cat <<\_ASBOX -## ---------------- ## -## Cache variables. ## -## ---------------- ## -_ASBOX - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - cat <<\_ASBOX -## ----------------- ## -## Output variables. ## -## ----------------- ## -_ASBOX - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## -## File substitutions. ## -## ------------------- ## -_ASBOX - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## -## confdefs.h. ## -## ----------- ## -_ASBOX - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer explicitly selected file to automatically selected ones. -if test -n "$CONFIG_SITE"; then - set x "$CONFIG_SITE" -elif test "x$prefix" != xNONE; then - set x "$prefix/share/config.site" "$prefix/etc/config.site" -else - set x "$ac_default_prefix/share/config.site" \ - "$ac_default_prefix/etc/config.site" -fi -shift -for ac_site_file -do - if test -r "$ac_site_file"; then - { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then - { echo "$as_me:$LINENO: loading cache $cache_file" >&5 -echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { echo "$as_me:$LINENO: creating cache $cache_file" >&5 -echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 -echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 -echo "$as_me: current value: $ac_new_val" >&2;} - ac_cache_corrupted=: - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } -fi - - - - - - - - - - - - - - - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - # This file is generated from configure.in by Autoconf. DO NOT EDIT! - { echo "$as_me:$LINENO: checking for assembler line separator" >&5 + +{ echo "$as_me:$LINENO: checking for assembler line separator" >&5 echo $ECHO_N "checking for assembler line separator... $ECHO_C" >&6; } if test "${libc_cv_asm_line_sep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 From 9806fbba75e0103fdfcb641e72e5cdba93a717a2 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 25 Nov 2008 16:37:26 +0000 Subject: [PATCH 3803/4487] * sysdeps/unix/sysv/linux/arm/sysdep.h (LOAD_ARGS_1, LOAD_ARGS_2, LOAD_ARGS_3, LOAD_ARGS_4, LOAD_ARGS_5, LOAD_ARGS_6, LOAD_ARGS_7): Load all arguments into temporary variables before loading into registers. --- ChangeLog.arm | 7 ++++++ sysdeps/unix/sysv/linux/arm/sysdep.h | 35 +++++++++++++++++----------- 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index e409001858..74748f1d60 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,10 @@ +2008-11-25 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/sysdep.h (LOAD_ARGS_1, LOAD_ARGS_2, + LOAD_ARGS_3, LOAD_ARGS_4, LOAD_ARGS_5, LOAD_ARGS_6, LOAD_ARGS_7): + Load all arguments into temporary variables before loading into + registers. + 2008-08-19 Joseph Myers * data/c++-types-arm-linux-gnueabi.data: New. diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index 2952067b97..59ccbbcc32 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -238,32 +238,39 @@ __local_syscall_error: \ #define LOAD_ARGS_0() #define ASM_ARGS_0 #define LOAD_ARGS_1(a1) \ - _a1 = (int) (a1); \ - LOAD_ARGS_0 () + int _a1tmp = (int) (a1); \ + LOAD_ARGS_0 () \ + _a1 = _a1tmp; #define ASM_ARGS_1 ASM_ARGS_0, "r" (_a1) #define LOAD_ARGS_2(a1, a2) \ - register int _a2 asm ("a2") = (int) (a2); \ - LOAD_ARGS_1 (a1) + int _a2tmp = (int) (a2); \ + LOAD_ARGS_1 (a1) \ + register int _a2 asm ("a2") = _a2tmp; #define ASM_ARGS_2 ASM_ARGS_1, "r" (_a2) #define LOAD_ARGS_3(a1, a2, a3) \ - register int _a3 asm ("a3") = (int) (a3); \ - LOAD_ARGS_2 (a1, a2) + int _a3tmp = (int) (a3); \ + LOAD_ARGS_2 (a1, a2) \ + register int _a3 asm ("a3") = _a3tmp; #define ASM_ARGS_3 ASM_ARGS_2, "r" (_a3) #define LOAD_ARGS_4(a1, a2, a3, a4) \ - register int _a4 asm ("a4") = (int) (a4); \ - LOAD_ARGS_3 (a1, a2, a3) + int _a4tmp = (int) (a4); \ + LOAD_ARGS_3 (a1, a2, a3) \ + register int _a4 asm ("a4") = _a4tmp; #define ASM_ARGS_4 ASM_ARGS_3, "r" (_a4) #define LOAD_ARGS_5(a1, a2, a3, a4, a5) \ - register int _v1 asm ("v1") = (int) (a5); \ - LOAD_ARGS_4 (a1, a2, a3, a4) + int _v1tmp = (int) (a5); \ + LOAD_ARGS_4 (a1, a2, a3, a4) \ + register int _v1 asm ("v1") = _v1tmp; #define ASM_ARGS_5 ASM_ARGS_4, "r" (_v1) #define LOAD_ARGS_6(a1, a2, a3, a4, a5, a6) \ - register int _v2 asm ("v2") = (int) (a6); \ - LOAD_ARGS_5 (a1, a2, a3, a4, a5) + int _v2tmp = (int) (a6); \ + LOAD_ARGS_5 (a1, a2, a3, a4, a5) \ + register int _v2 asm ("v2") = _v2tmp; #define ASM_ARGS_6 ASM_ARGS_5, "r" (_v2) #define LOAD_ARGS_7(a1, a2, a3, a4, a5, a6, a7) \ - register int _v3 asm ("v3") = (int) (a7); \ - LOAD_ARGS_6 (a1, a2, a3, a4, a5, a6) + int _v3tmp = (int) (a7); \ + LOAD_ARGS_6 (a1, a2, a3, a4, a5, a6) \ + register int _v3 asm ("v3") = _v3tmp; #define ASM_ARGS_7 ASM_ARGS_6, "r" (_v3) /* We can't implement non-constant syscalls directly since the syscall From 10d461b5588149f453d8d8dc77f47355d36a5700 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 25 Nov 2008 16:45:39 +0000 Subject: [PATCH 3804/4487] * sysdeps/unix/sysv/linux/mips/sys/signalfd.h (signalfd): Fix __THROW vs. __nonnull order for C++. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/sys/signalfd.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index e94e109811..9bd9e042d4 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2008-11-25 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/sys/signalfd.h (signalfd): Fix + __THROW vs. __nonnull order for C++. + 2008-10-15 Daniel Jacobowitz * sysdeps/mips/dl-dtprocnum.h (DT_MIPS_NUM): Do not redefine. diff --git a/sysdeps/unix/sysv/linux/mips/sys/signalfd.h b/sysdeps/unix/sysv/linux/mips/sys/signalfd.h index 2fe7e379dc..08923c0862 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/signalfd.h +++ b/sysdeps/unix/sysv/linux/mips/sys/signalfd.h @@ -59,7 +59,7 @@ __BEGIN_DECLS /* Request notification for delivery of signals in MASK to be performed using descriptor FD.*/ extern int signalfd (int __fd, const sigset_t *__mask, int __flags) - __nonnull ((2)) __THROW; + __THROW __nonnull ((2)); __END_DECLS From 5823b5780d3b8d090b31dfbfe28ff37fb97faf20 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 26 Nov 2008 07:21:20 +0000 Subject: [PATCH 3805/4487] * ChangeLog.alpha: New file (this one). * sysdeps/alpha, sysdeps/unix/bsd/osf/alpha, sysdeps/unix/bsd/Attic/osf1/alpha, sysdeps/unix/sysv/linux/alpha, sysdeps/unix/sysv/linux/alpha/alpha, sysdeps/unix/alpha, sysdeps/mach/alpha, sysdeps/mach/hurd/alpha: Subdirectories moved here from main repository. * sysdeps/alpha/nptl, sysdeps/unix/sysv/linux/alpha/nptl: Subdirectories moved here from main repository's nptl/ subdirectory. * sysdeps/alpha/preconfigure: New file. * sysdeps/alpha/shlib-versions: New file. --- ChangeLog.alpha | 18 ++++++++++++++++++ sysdeps/alpha/preconfigure | 3 +++ sysdeps/alpha/shlib-versions | 14 ++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 ChangeLog.alpha create mode 100644 sysdeps/alpha/preconfigure create mode 100644 sysdeps/alpha/shlib-versions diff --git a/ChangeLog.alpha b/ChangeLog.alpha new file mode 100644 index 0000000000..2e101a84a5 --- /dev/null +++ b/ChangeLog.alpha @@ -0,0 +1,18 @@ +2008-11-25 Roland McGrath + + * ChangeLog.alpha: New file (this one). + * sysdeps/alpha, sysdeps/unix/bsd/osf/alpha, + sysdeps/unix/bsd/Attic/osf1/alpha, sysdeps/unix/sysv/linux/alpha, + sysdeps/unix/sysv/linux/alpha/alpha, sysdeps/unix/alpha, + sysdeps/mach/alpha, sysdeps/mach/hurd/alpha: + Subdirectories moved here from main repository. + * sysdeps/alpha/nptl, sysdeps/unix/sysv/linux/alpha/nptl: + Subdirectories moved here from main repository's nptl/ subdirectory. + * sysdeps/alpha/preconfigure: New file. + * sysdeps/alpha/shlib-versions: New file. + +Local Variables: +mode: change-log +left-margin: 8 +fill-column: 74 +End: diff --git a/sysdeps/alpha/preconfigure b/sysdeps/alpha/preconfigure new file mode 100644 index 0000000000..ad3dc69cf3 --- /dev/null +++ b/sysdeps/alpha/preconfigure @@ -0,0 +1,3 @@ +case "$machine" in +alpha*) base_machine=alpha machine=alpha/$machine ;; +esac diff --git a/sysdeps/alpha/shlib-versions b/sysdeps/alpha/shlib-versions new file mode 100644 index 0000000000..cd4b9af78d --- /dev/null +++ b/sysdeps/alpha/shlib-versions @@ -0,0 +1,14 @@ +alpha.*-.*-linux.* libm=6.1 +alpha.*-.*-linux.* libc=6.1 + +alpha.*-.*-linux.* ld=ld-linux.so.2 + +alpha.*-.*-linux.* libdl=2.1 + +alpha.*-.*-linux.* libutil=1.1 + +alpha.*-.*-linux.* libresolv=2.1 + +alpha.*-.*-linux.* libnsl=1.1 +alpha.*-.*-linux.* libcrypt=1.1 +alpha.*-.*-linux.* libBrokenLocale=1.1 From 751759ebd260c3091839fe9ed410d54903248cf4 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 26 Nov 2008 19:20:13 +0000 Subject: [PATCH 3806/4487] 2008-11-26 Roland McGrath * sysdeps/unix/sysv/linux/alpha/wordexp.c: Contents moved to main repository's ia64 file; #include that. * sysdeps/unix/sysv/linux/alpha/ipc_priv.h: Contents moved to main repository's powerpc file; #include that. --- sysdeps/unix/sysv/linux/alpha/ipc_priv.h | 48 +------------------ sysdeps/unix/sysv/linux/alpha/wordexp.c | 61 +----------------------- 2 files changed, 2 insertions(+), 107 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/ipc_priv.h b/sysdeps/unix/sysv/linux/alpha/ipc_priv.h index 0328dc08e2..67883be101 100644 --- a/sysdeps/unix/sysv/linux/alpha/ipc_priv.h +++ b/sysdeps/unix/sysv/linux/alpha/ipc_priv.h @@ -1,47 +1 @@ -/* Copyright (C) 1995-1999, 2000, 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. */ - -#include - -#define __IPC_64 0x100 - -struct __old_ipc_perm -{ - __key_t __key; /* Key. */ - unsigned int uid; /* Owner's user ID. */ - unsigned int gid; /* Owner's group ID. */ - unsigned int cuid; /* Creator's user ID. */ - unsigned int cgid; /* Creator's group ID. */ - unsigned int mode; /* Read/write permission. */ - unsigned short int __seq; /* Sequence number. */ -}; - - -/* The codes for the functions to use the ipc syscall multiplexer. */ -#define IPCOP_semop 1 -#define IPCOP_semget 2 -#define IPCOP_semctl 3 -#define IPCOP_semtimedop 4 -#define IPCOP_msgsnd 11 -#define IPCOP_msgrcv 12 -#define IPCOP_msgget 13 -#define IPCOP_msgctl 14 -#define IPCOP_shmat 21 -#define IPCOP_shmdt 22 -#define IPCOP_shmget 23 -#define IPCOP_shmctl 24 +#include diff --git a/sysdeps/unix/sysv/linux/alpha/wordexp.c b/sysdeps/unix/sysv/linux/alpha/wordexp.c index c2972e40c2..075b267bb4 100644 --- a/sysdeps/unix/sysv/linux/alpha/wordexp.c +++ b/sysdeps/unix/sysv/linux/alpha/wordexp.c @@ -1,60 +1 @@ -/* Copyright (C) 2001, 2004, 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 - 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. */ - -#include - -/* For Linux/Alpha we have to make the wordexp symbols versioned. */ -#define wordexp(words, pwordexp, flags) \ - __new_wordexp (words, pwordexp, flags) - -#include - -versioned_symbol (libc, __new_wordexp, wordexp, GLIBC_2_2_2); - - -#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2_2) -/* The old, incorrect wordexp_t definition. */ -typedef struct - { - int we_wordc; /* Count of words matched. */ - char **we_wordv; /* List of expanded words. */ - int we_offs; /* Slots to reserve in `we_wordv'. */ - } old_wordexp_t; - - -int -attribute_compat_text_section -__old_wordexp (const char *words, old_wordexp_t *pwordexp, int flags) -{ - wordexp_t we; - int result; - - we.we_wordc = pwordexp->we_wordc; - we.we_wordv = pwordexp->we_wordv; - we.we_offs = pwordexp->we_offs; - - result = __new_wordexp (words, &we, flags); - - pwordexp->we_wordc = we.we_wordc; - pwordexp->we_wordv = we.we_wordv; - pwordexp->we_offs = we.we_offs; - - return result; -} -compat_symbol (libc, __old_wordexp, wordexp, GLIBC_2_1); -#endif +#include From 7deeab197e80c9b3aea6eccbe912a52ee90fa4b8 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 26 Nov 2008 19:20:37 +0000 Subject: [PATCH 3807/4487] . --- ChangeLog.alpha | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 2e101a84a5..6bb3b7c3ed 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,10 @@ +2008-11-26 Roland McGrath + + * sysdeps/unix/sysv/linux/alpha/wordexp.c: Contents moved to main + repository's ia64 file; #include that. + * sysdeps/unix/sysv/linux/alpha/ipc_priv.h: Contents moved to main + repository's powerpc file; #include that. + 2008-11-25 Roland McGrath * ChangeLog.alpha: New file (this one). From 74af6970b86576628142ed49f313b2c14ea3a273 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 3 Dec 2008 23:36:56 +0000 Subject: [PATCH 3808/4487] * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h: Define FUTEX_WAIT_BITSET and FUTEX_WAKE_BITSET. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog.arm b/ChangeLog.arm index 74748f1d60..045b6d5b55 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2008-12-03 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h: Define + FUTEX_WAIT_BITSET and FUTEX_WAKE_BITSET. + 2008-11-25 Joseph Myers * sysdeps/unix/sysv/linux/arm/sysdep.h (LOAD_ARGS_1, LOAD_ARGS_2, diff --git a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h index 889f97c0f8..7a054620d8 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h @@ -35,6 +35,8 @@ #define FUTEX_LOCK_PI 6 #define FUTEX_UNLOCK_PI 7 #define FUTEX_TRYLOCK_PI 8 +#define FUTEX_WAIT_BITSET 9 +#define FUTEX_WAKE_BITSET 10 #define FUTEX_PRIVATE_FLAG 128 /* Values for 'private' parameter of locking macros. Yes, the From 9a9863b435e55a561d421599bad98e9d8093ec40 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 3 Dec 2008 23:37:48 +0000 Subject: [PATCH 3809/4487] * sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h: Define FUTEX_WAIT_BITSET and FUTEX_WAKE_BITSET. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog.mips b/ChangeLog.mips index 9bd9e042d4..91974a7ee6 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2008-12-03 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h: Define + FUTEX_WAIT_BITSET and FUTEX_WAKE_BITSET. + 2008-11-25 Joseph Myers * sysdeps/unix/sysv/linux/mips/sys/signalfd.h (signalfd): Fix diff --git a/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h index 1cb3d9b7c3..eae3f40f75 100644 --- a/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h @@ -35,6 +35,8 @@ #define FUTEX_LOCK_PI 6 #define FUTEX_UNLOCK_PI 7 #define FUTEX_TRYLOCK_PI 8 +#define FUTEX_WAIT_BITSET 9 +#define FUTEX_WAKE_BITSET 10 #define FUTEX_PRIVATE_FLAG 128 /* Values for 'private' parameter of locking macros. Yes, the From 64762db4138285bdcdd3804444f767c9c58d40df Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 9 Dec 2008 23:53:33 +0000 Subject: [PATCH 3810/4487] * sysdeps/unix/sysv/linux/mips/bits/socket.h (SCM_CREDENTIALS): Make available only for __USE_GNU. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/bits/socket.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 91974a7ee6..23c1e25f54 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2008-12-09 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/socket.h (SCM_CREDENTIALS): + Make available only for __USE_GNU. + 2008-12-03 Joseph Myers * sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h: Define diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h index 4f219d5af9..dad2c2d097 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/socket.h +++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h @@ -303,7 +303,7 @@ enum { SCM_RIGHTS = 0x01 /* Transfer file descriptors. */ #define SCM_RIGHTS SCM_RIGHTS -#ifdef __USE_BSD +#ifdef __USE_GNU , SCM_CREDENTIALS = 0x02 /* Credentials passing. */ # define SCM_CREDENTIALS SCM_CREDENTIALS #endif From 01aa93bd54bdda064240756ce5cab10bea65d636 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 19 Dec 2008 21:35:57 +0000 Subject: [PATCH 3811/4487] * sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate64.c, sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate.c, sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate64.c, sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate.c: New. --- ChangeLog.mips | 7 +++ .../linux/mips/mips64/n32/posix_fallocate.c | 58 ++++++++++++++++++ .../linux/mips/mips64/n32/posix_fallocate64.c | 60 +++++++++++++++++++ .../linux/mips/mips64/n64/posix_fallocate.c | 1 + .../linux/mips/mips64/n64/posix_fallocate64.c | 1 + 5 files changed, 127 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate.c create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate64.c create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate.c create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate64.c diff --git a/ChangeLog.mips b/ChangeLog.mips index 23c1e25f54..7aac3a14ff 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,10 @@ +2008-12-19 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate64.c, + sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate.c, + sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate64.c, + sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate.c: New. + 2008-12-09 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/socket.h (SCM_CREDENTIALS): diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate.c b/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate.c new file mode 100644 index 0000000000..5516885b9a --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate.c @@ -0,0 +1,58 @@ +/* Copyright (C) 2007, 2008 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. */ + +#include +#include +#include + +#define posix_fallocate static internal_fallocate +#include +#undef posix_fallocate + +#if !defined __ASSUME_FALLOCATE && defined __NR_fallocate +int __have_fallocate attribute_hidden; +#endif + + +/* Reserve storage for the data of the file associated with FD. */ +int +posix_fallocate (int fd, __off_t offset, __off_t len) +{ +#ifdef __NR_fallocate +# ifndef __ASSUME_FALLOCATE + if (__builtin_expect (__have_fallocate >= 0, 1)) +# endif + { + INTERNAL_SYSCALL_DECL (err); + int res = INTERNAL_SYSCALL (fallocate, err, 4, fd, 0, offset, len); + + if (! INTERNAL_SYSCALL_ERROR_P (res, err)) + return 0; + +# ifndef __ASSUME_FALLOCATE + if (__builtin_expect (INTERNAL_SYSCALL_ERRNO (res, err) == ENOSYS, 0)) + __have_fallocate = -1; + else +# endif + if (INTERNAL_SYSCALL_ERRNO (res, err) != EOPNOTSUPP) + return INTERNAL_SYSCALL_ERRNO (res, err); + } +#endif + + return internal_fallocate (fd, offset, len); +} diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate64.c b/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate64.c new file mode 100644 index 0000000000..10e9a4ac4b --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate64.c @@ -0,0 +1,60 @@ +/* Copyright (C) 2007, 2008 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. */ + +#include +#include +#include + +extern int __posix_fallocate64_l64 (int fd, __off64_t offset, __off64_t len); +#define __posix_fallocate64_l64 static internal_fallocate64 +#include +#undef __posix_fallocate64_l64 + +#if !defined __ASSUME_FALLOCATE && defined __NR_fallocate +/* Defined in posix_fallocate.c. */ +extern int __have_fallocate attribute_hidden; +#endif + + +/* Reserve storage for the data of the file associated with FD. */ +int +__posix_fallocate64_l64 (int fd, __off64_t offset, __off64_t len) +{ +#ifdef __NR_fallocate +# ifndef __ASSUME_FALLOCATE + if (__builtin_expect (__have_fallocate >= 0, 1)) +# endif + { + INTERNAL_SYSCALL_DECL (err); + int res = INTERNAL_SYSCALL (fallocate, err, 4, fd, 0, offset, len); + + if (! INTERNAL_SYSCALL_ERROR_P (res, err)) + return 0; + +# ifndef __ASSUME_FALLOCATE + if (__builtin_expect (INTERNAL_SYSCALL_ERRNO (res, err) == ENOSYS, 0)) + __have_fallocate = -1; + else +# endif + if (INTERNAL_SYSCALL_ERRNO (res, err) != EOPNOTSUPP) + return INTERNAL_SYSCALL_ERRNO (res, err); + } +#endif + + return internal_fallocate64 (fd, offset, len); +} diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate.c new file mode 100644 index 0000000000..b3fe81bc8c --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate64.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate64.c new file mode 100644 index 0000000000..f466f13e45 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate64.c @@ -0,0 +1 @@ +/* posix_fallocate64 is in posix_fallocate.c */ From 9b1af9bd983a4e79244c144e837b004125292b98 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 12 Jan 2009 16:37:27 +0000 Subject: [PATCH 3812/4487] * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h: Define FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 045b6d5b55..710d4269cc 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2009-01-12 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h: Define + FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY. + 2008-12-03 Joseph Myers * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h: Define diff --git a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h index 7a054620d8..95920ab495 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc. +/* Copyright (C) 2005, 2006, 2007, 2008, 2009 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 @@ -38,6 +38,9 @@ #define FUTEX_WAIT_BITSET 9 #define FUTEX_WAKE_BITSET 10 #define FUTEX_PRIVATE_FLAG 128 +#define FUTEX_CLOCK_REALTIME 256 + +#define FUTEX_BITSET_MATCH_ANY 0xffffffff /* Values for 'private' parameter of locking macros. Yes, the definition seems to be backwards. But it is not. The bit will be From bb3b3056df2d85d15a4052bad9461e30da646a4e Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 12 Jan 2009 16:38:17 +0000 Subject: [PATCH 3813/4487] * sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h: Define FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 7aac3a14ff..49b7167a4a 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2009-01-12 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h: Define + FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY. + 2008-12-19 Joseph Myers * sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate64.c, diff --git a/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h index eae3f40f75..ab284dfe8b 100644 --- a/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h @@ -1,4 +1,5 @@ -/* Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, + 2009 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 @@ -38,6 +39,9 @@ #define FUTEX_WAIT_BITSET 9 #define FUTEX_WAKE_BITSET 10 #define FUTEX_PRIVATE_FLAG 128 +#define FUTEX_CLOCK_REALTIME 256 + +#define FUTEX_BITSET_MATCH_ANY 0xffffffff /* Values for 'private' parameter of locking macros. Yes, the definition seems to be backwards. But it is not. The bit will be From e27433a86962048afbf94135b620b04ef15986a6 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 12 Jan 2009 16:45:43 +0000 Subject: [PATCH 3814/4487] * sysdeps/unix/sysv/linux/mips/bits/resource.h (enum __rusage_who): Avoid comma after RUSAGE_CHILDREN if not -D_GNU_SOURCE. --- ChangeLog.mips | 6 ++++++ sysdeps/unix/sysv/linux/mips/bits/resource.h | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 49b7167a4a..8d8d38ebe0 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,9 @@ +2009-01-12 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/resource.h (enum + __rusage_who): Avoid comma after RUSAGE_CHILDREN if not + -D_GNU_SOURCE. + 2009-01-12 Joseph Myers * sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h: Define diff --git a/sysdeps/unix/sysv/linux/mips/bits/resource.h b/sysdeps/unix/sysv/linux/mips/bits/resource.h index 3cfdc5dbef..39d17d74f7 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/resource.h +++ b/sysdeps/unix/sysv/linux/mips/bits/resource.h @@ -1,6 +1,6 @@ /* Bit values & structures for resource limits. Linux/MIPS version. - Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2004, 2005, 2006 - Free Software Foundation, Inc. + Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2004, 2005, 2006, 2008, + 2009 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 @@ -166,10 +166,11 @@ enum __rusage_who #define RUSAGE_SELF RUSAGE_SELF /* All of its terminated child processes. */ - RUSAGE_CHILDREN = -1, + RUSAGE_CHILDREN = -1 #define RUSAGE_CHILDREN RUSAGE_CHILDREN #ifdef __USE_GNU + , /* The calling thread. */ RUSAGE_THREAD = 1 # define RUSAGE_THREAD RUSAGE_THREAD From e5c922c9023a2dc498fc1a1abdda8b7d552b60b1 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 12 Jan 2009 16:49:33 +0000 Subject: [PATCH 3815/4487] 2009-01-12 Mike Frysinger * sysdeps/arm/fpu/setjmp.S: Add hidden_def (__sigsetjmp). --- ChangeLog.arm | 4 ++++ sysdeps/arm/fpu/setjmp.S | 2 ++ 2 files changed, 6 insertions(+) diff --git a/ChangeLog.arm b/ChangeLog.arm index 710d4269cc..4172ee4222 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,7 @@ +2009-01-12 Mike Frysinger + + * sysdeps/arm/fpu/setjmp.S: Add hidden_def (__sigsetjmp). + 2009-01-12 Joseph Myers * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h: Define diff --git a/sysdeps/arm/fpu/setjmp.S b/sysdeps/arm/fpu/setjmp.S index 84328369ac..82a7e194f1 100644 --- a/sysdeps/arm/fpu/setjmp.S +++ b/sysdeps/arm/fpu/setjmp.S @@ -33,3 +33,5 @@ ENTRY (__sigsetjmp) /* Make a tail call to __sigjmp_save; it takes the same args. */ B PLTJMP(C_SYMBOL_NAME(__sigjmp_save)) END (__sigsetjmp) + +hidden_def (__sigsetjmp) From 9290e553761b1cab417d5413cf12940b03849f12 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Tue, 27 Jan 2009 15:32:55 +0000 Subject: [PATCH 3816/4487] PR glibc/1048 * sysdeps/unix/sysv/linux/mips/dl-static.c: New file to support variable page size for MIPS. * sysdeps/unix/sysv/linux/mips/ldsodefs.h: Likewise. * sysdeps/unix/sysv/linux/mips/Makefile: Build dl-static in elf. * sysdeps/unix/sysv/linux/mips/Versions: Add _dl_var_init. --- ChangeLog.mips | 10 +++ sysdeps/unix/sysv/linux/mips/Makefile | 9 +++ sysdeps/unix/sysv/linux/mips/Versions | 6 ++ sysdeps/unix/sysv/linux/mips/dl-static.c | 92 ++++++++++++++++++++++++ sysdeps/unix/sysv/linux/mips/ldsodefs.h | 33 +++++++++ 5 files changed, 150 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/mips/dl-static.c create mode 100644 sysdeps/unix/sysv/linux/mips/ldsodefs.h diff --git a/ChangeLog.mips b/ChangeLog.mips index 8d8d38ebe0..d48e4df81c 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,13 @@ +2009-01-27 Maciej W. Rozycki + Atsushi Nemoto + + PR glibc/1048 + * sysdeps/unix/sysv/linux/mips/dl-static.c: New file to support + variable page size for MIPS. + * sysdeps/unix/sysv/linux/mips/ldsodefs.h: Likewise. + * sysdeps/unix/sysv/linux/mips/Makefile: Build dl-static in elf. + * sysdeps/unix/sysv/linux/mips/Versions: Add _dl_var_init. + 2009-01-12 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/resource.h (enum diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile index 72fa87b3ff..110fccb6ed 100644 --- a/sysdeps/unix/sysv/linux/mips/Makefile +++ b/sysdeps/unix/sysv/linux/mips/Makefile @@ -126,3 +126,12 @@ else mv -f $(@:.h=.d)-t $(@:.h=.d) endif endif + +ifeq ($(subdir),elf) +ifeq ($(build-shared),yes) +# This is needed for DSO loading from static binaries. +sysdep-dl-routines += dl-static +sysdep_routines += dl-static +sysdep-rtld-routines += dl-static +endif +endif diff --git a/sysdeps/unix/sysv/linux/mips/Versions b/sysdeps/unix/sysv/linux/mips/Versions index 50bfac5599..09df42df29 100644 --- a/sysdeps/unix/sysv/linux/mips/Versions +++ b/sysdeps/unix/sysv/linux/mips/Versions @@ -1,3 +1,9 @@ +ld { + GLIBC_PRIVATE { + # used for loading by static libraries + _dl_var_init; + } +} libc { # The comment lines with "#errlist-compat" are magic; see errlist-compat.awk. # When you get an error from errlist-compat.awk, you need to add a new diff --git a/sysdeps/unix/sysv/linux/mips/dl-static.c b/sysdeps/unix/sysv/linux/mips/dl-static.c new file mode 100644 index 0000000000..3a99e7ed85 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/dl-static.c @@ -0,0 +1,92 @@ +/* Variable initialization. MIPS version. + 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 + 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. */ + +#include + +#ifdef SHARED + +void +_dl_var_init (void *array[]) +{ + /* It has to match "variables" below. */ + enum + { + DL_PAGESIZE = 0 + }; + + GLRO(dl_pagesize) = *((size_t *) array[DL_PAGESIZE]); +} + +#else +#include + +__libc_lock_define_initialized_recursive (static, _dl_static_lock) + +static void *variables[] = +{ + &GLRO(dl_pagesize) +}; + +static void +_dl_unprotect_relro (struct link_map *l) +{ + ElfW(Addr) start = ((l->l_addr + l->l_relro_addr) + & ~(GLRO(dl_pagesize) - 1)); + ElfW(Addr) end = ((l->l_addr + l->l_relro_addr + l->l_relro_size) + & ~(GLRO(dl_pagesize) - 1)); + + if (start != end) + __mprotect ((void *) start, end - start, PROT_READ | PROT_WRITE); +} + +void +_dl_static_init (struct link_map *l) +{ + struct link_map *rtld_map = l; + struct r_scope_elem **scope; + const ElfW(Sym) *ref = NULL; + lookup_t loadbase; + void (*f) (void *[]); + size_t i; + + __libc_lock_lock_recursive (_dl_static_lock); + + loadbase = _dl_lookup_symbol_x ("_dl_var_init", l, &ref, l->l_local_scope, + NULL, 0, 1, NULL); + + for (scope = l->l_local_scope; *scope != NULL; scope++) + for (i = 0; i < (*scope)->r_nlist; i++) + if ((*scope)->r_list[i] == loadbase) + { + rtld_map = (*scope)->r_list[i]; + break; + } + + if (ref != NULL) + { + f = (void (*) (void *[])) DL_SYMBOL_ADDRESS (loadbase, ref); + _dl_unprotect_relro (rtld_map); + f (variables); + _dl_protect_relro (rtld_map); + } + + __libc_lock_unlock_recursive (_dl_static_lock); +} + +#endif diff --git a/sysdeps/unix/sysv/linux/mips/ldsodefs.h b/sysdeps/unix/sysv/linux/mips/ldsodefs.h new file mode 100644 index 0000000000..8d5efec8fb --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/ldsodefs.h @@ -0,0 +1,33 @@ +/* Run-time dynamic linker data structures for loaded ELF shared objects. MIPS. + Copyright (C) 2001, 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 _LDSODEFS_H + +/* Get the real definitions. */ +#include_next + +/* Now define our stuff. */ + +/* We need special support to initialize DSO loaded for statically linked + binaries. */ +extern void _dl_static_init (struct link_map *map); +#undef DL_STATIC_INIT +#define DL_STATIC_INIT(map) _dl_static_init (map) + +#endif /* ldsodefs.h */ From a68f927f95aeaa729ed920516fc49a9e639f6552 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Tue, 27 Jan 2009 15:36:22 +0000 Subject: [PATCH 3817/4487] * sysdeps/unix/sysv/linux/arm/sysdep.h: Include . --- ChangeLog.arm | 4 ++++ sysdeps/unix/sysv/linux/arm/sysdep.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/ChangeLog.arm b/ChangeLog.arm index 4172ee4222..eb0219166c 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,7 @@ +2009-01-27 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/arm/sysdep.h: Include . + 2009-01-12 Mike Frysinger * sysdeps/arm/fpu/setjmp.S: Add hidden_def (__sigsetjmp). diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index 59ccbbcc32..1df63f6075 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -28,6 +28,8 @@ /* Defines RTLD_PRIVATE_ERRNO and USE_DL_SYSINFO. */ #include +#include + /* For Linux we can use the system call table in the header file /usr/include/asm/unistd.h of the kernel. But these symbols do not follow the SYS_* syntax From 60acbff563ba810b33fed59133033380d4de9429 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Tue, 27 Jan 2009 15:48:44 +0000 Subject: [PATCH 3818/4487] * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h (lll_futex_wake_unlock, lll_futex_requeue): Return zero if success. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index eb0219166c..0d3eba20ea 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2009-01-27 Ryosei Takagi + + * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h + (lll_futex_wake_unlock, lll_futex_requeue): Return zero if success. + 2009-01-27 Daniel Jacobowitz * sysdeps/unix/sysv/linux/arm/sysdep.h: Include . diff --git a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h index 95920ab495..e745e6655f 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h @@ -114,7 +114,7 @@ __ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp), \ __lll_private_flag (FUTEX_CMP_REQUEUE, private),\ (nr_wake), (nr_move), (mutex), (val)); \ - __ret; \ + INTERNAL_SYSCALL_ERROR_P (__ret, __err); \ }) @@ -127,7 +127,7 @@ __lll_private_flag (FUTEX_WAKE_OP, private), \ (nr_wake), (nr_wake2), (futexp2), \ FUTEX_OP_CLEAR_WAKE_IF_GT_ONE); \ - __ret; \ + INTERNAL_SYSCALL_ERROR_P (__ret, __err); \ }) From 856cb7775f0dc086c62eb2610e6e5613926e0a99 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Tue, 27 Jan 2009 16:01:19 +0000 Subject: [PATCH 3819/4487] 2009-01-27 Kirill A. Shutemov * sysdeps/arm/elf/start.S (_start): Use position-independent code if SHARED. Clear lr. --- ChangeLog.arm | 5 +++++ sysdeps/arm/elf/start.S | 48 +++++++++++++++++++++++++++++++++-------- 2 files changed, 44 insertions(+), 9 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 0d3eba20ea..2a8a25203f 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2009-01-27 Kirill A. Shutemov + + * sysdeps/arm/elf/start.S (_start): Use position-independent code + if SHARED. Clear lr. + 2009-01-27 Ryosei Takagi * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h diff --git a/sysdeps/arm/elf/start.S b/sysdeps/arm/elf/start.S index 2e0a8b1d63..f63b3dba27 100644 --- a/sysdeps/arm/elf/start.S +++ b/sysdeps/arm/elf/start.S @@ -1,5 +1,5 @@ /* Startup code for ARM & ELF - Copyright (C) 1995, 1996, 1997, 1998, 2001, 2002, 2005 + Copyright (C) 1995, 1996, 1997, 1998, 2001, 2002, 2005, 2008 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -67,11 +67,9 @@ _start: /* Protect against unhandled exceptions. */ .fnstart #endif - /* Fetch address of fini */ - ldr ip, =__libc_csu_fini - - /* Clear the frame pointer since this is the outermost frame. */ + /* Clear the frame pointer and link register since this is the outermost frame. */ mov fp, #0 + mov lr, #0 /* Pop argc off the stack and save a pointer to argv */ ldr a2, [sp], #4 @@ -83,21 +81,53 @@ _start: /* Push rtld_fini */ str a1, [sp, #-4]! +#ifdef SHARED + ldr sl, .L_GOT +.L_GOT_OFF: + add sl, pc, sl + + ldr ip, .L_GOT+4 /* __libc_csu_fini */ + ldr ip, [sl, ip] + + str ip, [sp, #-4]! /* Push __libc_csu_fini */ + + ldr a4, .L_GOT+8 /* __libc_csu_init */ + ldr a4, [sl, a4] + + ldr a1, .L_GOT+12 /* main */ + ldr a1, [sl, a1] + + /* __libc_start_main (main, argc, argv, init, fini, rtld_fini, stack_end) */ + /* Let the libc call main and exit with its return code. */ + bl __libc_start_main(PLT) +#else + /* Fetch address of __libc_csu_fini */ + ldr ip, =__libc_csu_fini + + /* Push __libc_csu_fini */ + str ip, [sp, #-4]! + /* Set up the other arguments in registers */ ldr a1, =main ldr a4, =__libc_csu_init - /* Push fini */ - str ip, [sp, #-4]! - /* __libc_start_main (main, argc, argv, init, fini, rtld_fini, stack_end) */ - /* Let the libc call main and exit with its return code. */ bl __libc_start_main +#endif /* should never get here....*/ bl abort +#ifdef SHARED +.L_GOT: + .word _GLOBAL_OFFSET_TABLE_-(.L_GOT_OFF+8) + .word __libc_csu_fini(GOT) + .word __libc_csu_init(GOT) + .word main(GOT) +#endif + + #if !defined(__USING_SJLJ_EXCEPTIONS__) .cantunwind .fnend From f2c9d882070d2c4bc5a099690961562662b8522a Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Tue, 27 Jan 2009 17:10:08 +0000 Subject: [PATCH 3820/4487] 2009-01-27 Min Zhang * sysdeps/arm/memset.S (memset): Use stm instead of two str instructions. --- ChangeLog.arm | 5 +++++ sysdeps/arm/memset.S | 13 +++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 2a8a25203f..338d768a26 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2009-01-27 Min Zhang + + * sysdeps/arm/memset.S (memset): Use stm instead of two + str instructions. + 2009-01-27 Kirill A. Shutemov * sysdeps/arm/elf/start.S (_start): Use position-independent code diff --git a/sysdeps/arm/memset.S b/sysdeps/arm/memset.S index b37451bc17..a276570012 100644 --- a/sysdeps/arm/memset.S +++ b/sysdeps/arm/memset.S @@ -35,20 +35,17 @@ ENTRY(memset) and r1, r1, #255 @ clear any sign bits orr r1, r1, r1, lsl $8 orr r1, r1, r1, lsl $16 + mov ip, r1 1: subs r2, r2, #8 - strcs r1, [r3], #4 @ store up to 32 bytes per loop iteration - strcs r1, [r3], #4 + stmcsia r3!, {r1, ip} @ store up to 32 bytes per loop iteration subcss r2, r2, #8 - strcs r1, [r3], #4 - strcs r1, [r3], #4 + stmcsia r3!, {r1, ip} subcss r2, r2, #8 - strcs r1, [r3], #4 - strcs r1, [r3], #4 + stmcsia r3!, {r1, ip} subcss r2, r2, #8 - strcs r1, [r3], #4 - strcs r1, [r3], #4 + stmcsia r3!, {r1, ip} bcs 1b and r2, r2, #7 From 19df4df1752d9d0e9543a1f42579f625c1659a29 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 2 Feb 2009 15:35:22 +0000 Subject: [PATCH 3821/4487] * sysdeps/unix/sysv/linux/arm/bits/shm.h (SHM_EXEC): Define. --- ChangeLog.arm | 4 ++++ sysdeps/unix/sysv/linux/arm/bits/shm.h | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 338d768a26..52480aca41 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,7 @@ +2009-02-02 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/bits/shm.h (SHM_EXEC): Define. + 2009-01-27 Min Zhang * sysdeps/arm/memset.S (memset): Use stm instead of two diff --git a/sysdeps/unix/sysv/linux/arm/bits/shm.h b/sysdeps/unix/sysv/linux/arm/bits/shm.h index 4faa287bcc..b723cc9299 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/shm.h +++ b/sysdeps/unix/sysv/linux/arm/bits/shm.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,2000,2002,2004,2008 +/* Copyright (C) 1995,1996,1997,2000,2002,2004,2008,2009 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -31,6 +31,7 @@ #define SHM_RDONLY 010000 /* attach read-only else read-write */ #define SHM_RND 020000 /* round attach address to SHMLBA */ #define SHM_REMAP 040000 /* take-over region on attach */ +#define SHM_EXEC 0100000 /* execution access */ /* Commands for `shmctl'. */ #define SHM_LOCK 11 /* lock segment (root only) */ From 8085bd60e25f8697bd50e0e4658a26d23e16702a Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 2 Feb 2009 15:36:15 +0000 Subject: [PATCH 3822/4487] * sysdeps/unix/sysv/linux/mips/bits/shm.h (SHM_EXEC): Define. --- ChangeLog.mips | 4 ++++ sysdeps/unix/sysv/linux/mips/bits/shm.h | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index d48e4df81c..bccb10d796 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,7 @@ +2009-02-02 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/shm.h (SHM_EXEC): Define. + 2009-01-27 Maciej W. Rozycki Atsushi Nemoto diff --git a/sysdeps/unix/sysv/linux/mips/bits/shm.h b/sysdeps/unix/sysv/linux/mips/bits/shm.h index 037980cfa6..07f9743474 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/shm.h +++ b/sysdeps/unix/sysv/linux/mips/bits/shm.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,2000,2001,2002,2003 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,2000,2001,2002,2003,2009 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 @@ -30,6 +30,7 @@ #define SHM_RDONLY 010000 /* attach read-only else read-write */ #define SHM_RND 020000 /* round attach address to SHMLBA */ #define SHM_REMAP 040000 /* take-over region on attach */ +#define SHM_EXEC 0100000 /* execution access */ /* Commands for `shmctl'. */ #define SHM_LOCK 11 /* lock segment (root only) */ From 5631abde36e37c8031028d0d17e0a6822546404f Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 5 Feb 2009 14:46:41 +0000 Subject: [PATCH 3823/4487] 2009-02-05 Paul Brook Joseph Myers * sysdeps/arm/dl-machine.h (elf_machine_dynamic): Ditto. (elf_machine_load_address): Clear T bit of PLT entry contents. (RTLD_START): Mark function symbols as such. Tweak pc-relative addressing to avoid depending on pc read pipeline offset. * sysdeps/arm/machine-gmon.h (MCOUNT): Add Thumb-2 implementation. * sysdeps/arm/tls-macros.h: Add alignment for Thumb-2. (ARM_PC_OFFSET): Define. (TLS_IE): Define differently for Thumb-2. (TLS_LE, TLS_LD, TLS_GD): Use ARM_PC_OFFSET. * sysdeps/arm/elf/start.S: Switch to thumb mode for Thumb-2. * sysdeps/unix/sysv/linux/arm/eabi/sysdep.h (INTERNAL_SYSCALL_RAW): Add Thumb implementation. * sysdeps/unix/sysv/linux/arm/eabi/nptl/aio_misc.h: New. * sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c: Enforce alignment for Thumb-2. Adjust offset from PC for Thumb-2. * sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c: Ditto. * sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h (atomic_full_barrier, __arch_compare_and_exchange_val_32_acq): Add Thumb-2 implementation. --- ChangeLog.arm | 22 ++++++++ sysdeps/arm/dl-machine.h | 23 ++++++-- sysdeps/arm/elf/start.S | 4 ++ sysdeps/arm/machine-gmon.h | 23 ++++++++ sysdeps/arm/tls-macros.h | 31 ++++++++++- .../unix/sysv/linux/arm/eabi/nptl/aio_misc.h | 52 +++++++++++++++++++ .../linux/arm/eabi/nptl/unwind-forcedunwind.c | 5 ++ .../sysv/linux/arm/eabi/nptl/unwind-resume.c | 5 ++ sysdeps/unix/sysv/linux/arm/eabi/sysdep.h | 25 +++++++++ .../unix/sysv/linux/arm/nptl/bits/atomic.h | 36 +++++++++++++ 10 files changed, 221 insertions(+), 5 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/nptl/aio_misc.h diff --git a/ChangeLog.arm b/ChangeLog.arm index 52480aca41..fd520bcd9c 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,25 @@ +2009-02-05 Paul Brook + Joseph Myers + + * sysdeps/arm/dl-machine.h (elf_machine_dynamic): Ditto. + (elf_machine_load_address): Clear T bit of PLT entry contents. + (RTLD_START): Mark function symbols as such. Tweak pc-relative + addressing to avoid depending on pc read pipeline offset. + * sysdeps/arm/machine-gmon.h (MCOUNT): Add Thumb-2 implementation. + * sysdeps/arm/tls-macros.h: Add alignment for Thumb-2. + (ARM_PC_OFFSET): Define. + (TLS_IE): Define differently for Thumb-2. + (TLS_LE, TLS_LD, TLS_GD): Use ARM_PC_OFFSET. + * sysdeps/arm/elf/start.S: Switch to thumb mode for Thumb-2. + * sysdeps/unix/sysv/linux/arm/eabi/sysdep.h (INTERNAL_SYSCALL_RAW): + Add Thumb implementation. + * sysdeps/unix/sysv/linux/arm/eabi/nptl/aio_misc.h: New. + * sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c: Enforce + alignment for Thumb-2. Adjust offset from PC for Thumb-2. + * sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c: Ditto. + * sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h (atomic_full_barrier, + __arch_compare_and_exchange_val_32_acq): Add Thumb-2 implementation. + 2009-02-02 Joseph Myers * sysdeps/unix/sysv/linux/arm/bits/shm.h (SHM_EXEC): Define. diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 1a45a2613c..f839d97b18 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -53,11 +53,22 @@ static inline Elf32_Addr __attribute__ ((unused)) elf_machine_dynamic (void) { Elf32_Addr dynamic; +#ifdef __thumb2__ + long tmp; + asm ("ldr\t%0, 1f\n\t" + "adr\t%1, 1f\n\t" + "ldr\t%0, [%0, %1]\n\t" + "b 2f\n" + ".align 2\n" + "1: .word _GLOBAL_OFFSET_TABLE_ - 1b\n" + "2:" : "=r" (dynamic), "=r"(tmp)); +#else asm ("ldr %0, 2f\n" "1: ldr %0, [pc, %0]\n" "b 3f\n" "2: .word _GLOBAL_OFFSET_TABLE_ - (1b+8)\n" "3:" : "=r" (dynamic)); +#endif return dynamic; } @@ -69,6 +80,10 @@ elf_machine_load_address (void) extern void __dl_start asm ("_dl_start"); Elf32_Addr got_addr = (Elf32_Addr) &__dl_start; Elf32_Addr pcrel_addr; +#ifdef __thumb__ + /* Clear the low bit of the funciton address. */ + got_addr &= ~(Elf32_Addr) 1; +#endif asm ("adr %0, _dl_start" : "=r" (pcrel_addr)); return pcrel_addr - got_addr; } @@ -140,7 +155,9 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) #define RTLD_START asm ("\ .text\n\ .globl _start\n\ +.type _start, %function\n\ .globl _dl_start_user\n\ +.type _dl_start_user, %function\n\ _start:\n\ @ we are PIC code, so get global offset table\n\ ldr sl, .L_GET_GOT\n\ @@ -152,8 +169,8 @@ _start:\n\ bl _dl_start\n\ @ returns user entry point in r0\n\ _dl_start_user:\n\ - add sl, pc, sl\n\ -.L_GOT_GOT:\n\ + adr r6, .L_GET_GOT\n\ + add sl, sl, r6\n\ ldr r4, [sl, r4]\n\ @ save the entry point in another register\n\ mov r6, r0\n\ @@ -210,7 +227,7 @@ _dl_start_user:\n\ b .L_done_fixup\n\ \n\ .L_GET_GOT:\n\ - .word _GLOBAL_OFFSET_TABLE_ - .L_GOT_GOT - 4\n\ + .word _GLOBAL_OFFSET_TABLE_ - .L_GET_GOT\n\ .L_SKIP_ARGS:\n\ .word _dl_skip_args(GOTOFF)\n\ .L_FINI_PROC:\n\ diff --git a/sysdeps/arm/elf/start.S b/sysdeps/arm/elf/start.S index f63b3dba27..0cf4339b46 100644 --- a/sysdeps/arm/elf/start.S +++ b/sysdeps/arm/elf/start.S @@ -58,6 +58,10 @@ ... NULL */ +#if defined(__thumb2__) + .thumb + .syntax unified +#endif .text .globl _start diff --git a/sysdeps/arm/machine-gmon.h b/sysdeps/arm/machine-gmon.h index fa3f65237d..dbda0ddeba 100644 --- a/sysdeps/arm/machine-gmon.h +++ b/sysdeps/arm/machine-gmon.h @@ -50,6 +50,28 @@ static void mcount_internal (u_long frompc, u_long selfpc) } */ +#ifdef __thumb2__ + +#define MCOUNT \ +void _mcount (void) \ +{ \ + __asm__("push {r0, r1, r2, r3};" \ + "movs fp, fp;" \ + "it eq;" \ + "moveq r1, #0;" \ + "itttt ne;" \ + "ldrne r1, [fp, $-4];" \ + "ldrne r0, [fp, $-12];" \ + "movnes r0, r0;" \ + "ldrne r0, [r0, $-4];" \ + "movs r0, r0;" \ + "it ne;" \ + "blne mcount_internal;" \ + "pop {r0, r1, r2, r3}"); \ +} + +#else + #define MCOUNT \ void _mcount (void) \ { \ @@ -65,3 +87,4 @@ void _mcount (void) \ "ldmia sp!, {r0, r1, r2, r3}"); \ } +#endif diff --git a/sysdeps/arm/tls-macros.h b/sysdeps/arm/tls-macros.h index 94aa3a83b1..e41d3bc5aa 100644 --- a/sysdeps/arm/tls-macros.h +++ b/sysdeps/arm/tls-macros.h @@ -1,14 +1,36 @@ +#ifdef __thumb2__ +#define ARM_PC_OFFSET "4" +#else +#define ARM_PC_OFFSET "8" +#endif + #define TLS_LE(x) \ ({ int *__result; \ void *tp = __builtin_thread_pointer (); \ asm ("ldr %0, 1f; " \ "add %0, %1, %0; " \ "b 2f; " \ + ".align 2; " \ "1: .word " #x "(tpoff); " \ "2: " \ : "=&r" (__result) : "r" (tp)); \ __result; }) +#ifdef __thumb2__ +#define TLS_IE(x) \ + ({ int *__result; \ + void *tp = __builtin_thread_pointer (); \ + asm ("ldr %0, 1f; " \ + "3: add %0, pc, %0;" \ + "ldr %0, [%0];" \ + "add %0, %1, %0; " \ + "b 2f; " \ + ".align 2; " \ + "1: .word " #x "(gottpoff) + (. - 3b - 4); " \ + "2: " \ + : "=&r" (__result) : "r" (tp)); \ + __result; }) +#else #define TLS_IE(x) \ ({ int *__result; \ void *tp = __builtin_thread_pointer (); \ @@ -16,10 +38,12 @@ "3: ldr %0, [pc, %0];" \ "add %0, %1, %0; " \ "b 2f; " \ + ".align 2; " \ "1: .word " #x "(gottpoff) + (. - 3b - 8); " \ "2: " \ : "=&r" (__result) : "r" (tp)); \ __result; }) +#endif #define TLS_LD(x) \ ({ char *__result; \ @@ -28,12 +52,14 @@ asm ("ldr %0, 2f; " \ "1: add %0, pc, %0; " \ "b 3f; " \ - "2: .word " #x "(tlsldm) + (. - 1b - 8); " \ + ".align 2; " \ + "2: .word " #x "(tlsldm) + (. - 1b - "ARM_PC_OFFSET"); " \ "3: " \ : "=r" (__result)); \ __result = (char *)__tls_get_addr (__result); \ asm ("ldr %0, 1f; " \ "b 2f; " \ + ".align 2; " \ "1: .word " #x "(tlsldo); " \ "2: " \ : "=r" (__offset)); \ @@ -45,7 +71,8 @@ asm ("ldr %0, 2f; " \ "1: add %0, pc, %0; " \ "b 3f; " \ - "2: .word " #x "(tlsgd) + (. - 1b - 8); " \ + ".align 2; " \ + "2: .word " #x "(tlsgd) + (. - 1b - "ARM_PC_OFFSET"); " \ "3: " \ : "=r" (__result)); \ (int *)__tls_get_addr (__result); }) diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/aio_misc.h b/sysdeps/unix/sysv/linux/arm/eabi/nptl/aio_misc.h new file mode 100644 index 0000000000..3fb1ec95fd --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/aio_misc.h @@ -0,0 +1,52 @@ +/* Copyright (C) 2008 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. */ + +#include_next + +#ifdef __thumb2__ + +#include + +/* The Thumb-2 definition of INTERNAL_SYSCALL_RAW has to hide the use + of r7 from the compiler because it cannot handle asm clobbering the + hard frame pointer. In aio_suspend, GCC does not eliminate the + hard frame pointer because the function uses variable-length + arrays, so it generates unwind information using r7 as virtual + stack pointer. During system calls, when r7 has been saved on the + stack, this means the unwind information is invalid. Without extra + unwind directives, which would need to cause unwind information for + the asm to be generated separately from that for the parts of the + function before and after the asm (with three index table entries), + it is not possible to represent any temporary change to the virtual + stack pointer. Instead, we move the problematic system calls out + of line into a function that does not require a frame pointer. */ + +static __attribute_noinline__ void +aio_misc_wait (int *resultp, + volatile int *futexp, + const struct timespec *timeout, + int cancel) +{ + AIO_MISC_WAIT (*resultp, *futexp, timeout, cancel); +} + +#undef AIO_MISC_WAIT +#define AIO_MISC_WAIT(result, futex, timeout, cancel) \ + aio_misc_wait (&result, &futex, timeout, cancel) + +#endif diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c index 24ce61ba19..71ab77c6fa 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c +++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c @@ -89,7 +89,12 @@ asm ( "4: bl pthread_cancel_init\n" " ldr r3, [r4, r5]\n" " b 5b\n" +" .align 2\n" +#ifdef __thumb2__ +"1: .word _GLOBAL_OFFSET_TABLE_ - 3b - 4\n" +#else "1: .word _GLOBAL_OFFSET_TABLE_ - 3b - 8\n" +#endif "2: .word libgcc_s_resume(GOTOFF)\n" " .size _Unwind_Resume, .-_Unwind_Resume\n" ); diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c index a9c9d18217..3c780b7137 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c +++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c @@ -66,7 +66,12 @@ asm ( "4: bl init\n" " ldr r3, [r4, r5]\n" " b 5b\n" +" .align 2\n" +#ifdef __thumb2__ +"1: .word _GLOBAL_OFFSET_TABLE_ - 3b - 4\n" +#else "1: .word _GLOBAL_OFFSET_TABLE_ - 3b - 8\n" +#endif "2: .word libgcc_s_resume(GOTOFF)\n" " .size _Unwind_Resume, .-_Unwind_Resume\n" ); diff --git a/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h b/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h index 1444f40ebc..a7dd40d741 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h @@ -44,6 +44,30 @@ argument; otherwise the (optional) compatibility code for APCS binaries may be invoked. */ +#ifdef __thumb__ +/* Hide the use of r7 from the compiler, this would be a lot + easier but for the fact that the syscalls can exceed 255. + For the moment the LOAD_ARGS_7 is sacrificed. + We can't use push/pop inside the asm because that breaks + unwinding (ie. thread cancellation). */ +#undef LOAD_ARGS_7 +#undef INTERNAL_SYSCALL_RAW +#define INTERNAL_SYSCALL_RAW(name, err, nr, args...) \ + ({ \ + int _sys_buf[2]; \ + register int _a1 asm ("a1"); \ + register int *_r6 asm ("r6") = _sys_buf; \ + *_r6 = name; \ + LOAD_ARGS_##nr (args) \ + asm volatile ("str r7, [r6, #4]\n\t" \ + "ldr r7, [r6]\n\t" \ + "swi 0 @ syscall " #name "\n\t" \ + "ldr r7, [r6, #4]" \ + : "=r" (_a1) \ + : "r" (_r6) ASM_ARGS_##nr \ + : "memory"); \ + _a1; }) +#else /* ARM */ #undef INTERNAL_SYSCALL_RAW #define INTERNAL_SYSCALL_RAW(name, err, nr, args...) \ ({ \ @@ -55,6 +79,7 @@ : "r" (_nr) ASM_ARGS_##nr \ : "memory"); \ _a1; }) +#endif /* For EABI, non-constant syscalls are actually pretty easy... */ #undef INTERNAL_SYSCALL_NCS diff --git a/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h b/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h index 247ddd389b..b0586ea1ee 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h +++ b/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h @@ -37,12 +37,21 @@ typedef uintmax_t uatomic_max_t; void __arm_link_error (void); +#ifdef __thumb2__ +#define atomic_full_barrier() \ + __asm__ __volatile__ \ + ("movw\tip, #0x0fa0\n\t" \ + "movt\tip, #0xffff\n\t" \ + "blx\tip" \ + : : : "ip", "lr", "cc", "memory"); +#else #define atomic_full_barrier() \ __asm__ __volatile__ \ ("mov\tip, #0xffff0fff\n\t" \ "mov\tlr, pc\n\t" \ "add\tpc, ip, #(0xffff0fa0 - 0xffff0fff)" \ : : : "ip", "lr", "cc", "memory"); +#endif /* Atomic compare and exchange. This sequence relies on the kernel to provide a compare and exchange operation which is atomic on the @@ -59,6 +68,32 @@ void __arm_link_error (void); specify one to work around GCC PR rtl-optimization/21223. Otherwise it may cause a_oldval or a_tmp to be moved to a different register. */ +#ifdef __thumb2__ +/* Thumb-2 has ldrex/strex. However it does not have barrier instructions, + so we still need to use the kernel helper. */ +#define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \ + ({ register __typeof (oldval) a_oldval asm ("r0"); \ + register __typeof (oldval) a_newval asm ("r1") = (newval); \ + register __typeof (mem) a_ptr asm ("r2") = (mem); \ + register __typeof (oldval) a_tmp asm ("r3"); \ + register __typeof (oldval) a_oldval2 asm ("r4") = (oldval); \ + __asm__ __volatile__ \ + ("0:\tldr\t%[tmp],[%[ptr]]\n\t" \ + "cmp\t%[tmp], %[old2]\n\t" \ + "bne\t1f\n\t" \ + "mov\t%[old], %[old2]\n\t" \ + "movw\t%[tmp], #0x0fc0\n\t" \ + "movt\t%[tmp], #0xffff\n\t" \ + "blx\t%[tmp]\n\t" \ + "bcc\t0b\n\t" \ + "mov\t%[tmp], %[old2]\n\t" \ + "1:" \ + : [old] "=&r" (a_oldval), [tmp] "=&r" (a_tmp) \ + : [new] "r" (a_newval), [ptr] "r" (a_ptr), \ + [old2] "r" (a_oldval2) \ + : "ip", "lr", "cc", "memory"); \ + a_tmp; }) +#else #define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \ ({ register __typeof (oldval) a_oldval asm ("r0"); \ register __typeof (oldval) a_newval asm ("r1") = (newval); \ @@ -81,6 +116,7 @@ void __arm_link_error (void); [old2] "r" (a_oldval2) \ : "ip", "lr", "cc", "memory"); \ a_tmp; }) +#endif #define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \ ({ __arm_link_error (); oldval; }) From ab4340a815b484f6d462e7c40639f2f9856b83c8 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Mon, 9 Feb 2009 20:27:56 +0000 Subject: [PATCH 3824/4487] 2009-02-09 Arthur Loiret [BZ #9717] * sysdeps/unix/sysv/linux/hppa/linuxthreads/malloc-machine.h (MALLOC): Adjust __libc_tsd_define arguments. (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get} arguments. --- ChangeLog.hppa | 9 +++++++++ .../unix/sysv/linux/hppa/linuxthreads/malloc-machine.h | 6 +++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 3d570dba99..0fac875eea 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,12 @@ +2009-02-09 Arthur Loiret + + [BZ #9717] + + * sysdeps/unix/sysv/linux/hppa/linuxthreads/malloc-machine.h + (MALLOC): Adjust __libc_tsd_define arguments. + (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get} + arguments. + 2008-08-07 Helge Deller * sysdeps/unix/sysv/linux/hppa/ucontext_i.sym: New file. diff --git a/sysdeps/unix/sysv/linux/hppa/linuxthreads/malloc-machine.h b/sysdeps/unix/sysv/linux/hppa/linuxthreads/malloc-machine.h index 817cf59222..5dc6e6fa71 100644 --- a/sysdeps/unix/sysv/linux/hppa/linuxthreads/malloc-machine.h +++ b/sysdeps/unix/sysv/linux/hppa/linuxthreads/malloc-machine.h @@ -63,10 +63,10 @@ extern void *__dso_handle __attribute__ ((__weak__)); #include typedef int tsd_key_t[1]; /* no key data structure, libc magic does it */ -__libc_tsd_define (static, MALLOC) /* declaration/common definition */ +__libc_tsd_define (static, void *, MALLOC) /* declaration/common definition */ #define tsd_key_create(key, destr) ((void) (key)) -#define tsd_setspecific(key, data) __libc_tsd_set (MALLOC, (data)) -#define tsd_getspecific(key, vptr) ((vptr) = __libc_tsd_get (MALLOC)) +#define tsd_setspecific(key, data) __libc_tsd_set (void *, MALLOC, (data)) +#define tsd_getspecific(key, vptr) ((vptr) = __libc_tsd_get (void *, MALLOC)) #include From b3862ba3c8905a9332bd4338068a26062e1e2722 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 13 Feb 2009 17:34:30 +0000 Subject: [PATCH 3825/4487] 2009-02-13 Khem Raj * sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c (libgcc_s_handle): New variable. (pthread_cancel_init): Depend in libgcc_s_handle for decision to load DSO. Assign last. (__unwind_freeres): New function. --- ChangeLog.hppa | 8 ++++++++ .../linux/hppa/nptl/unwind-forcedunwind.c | 20 ++++++++++++++++--- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 0fac875eea..a817e5f025 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,11 @@ +2009-02-13 Khem Raj + + * sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c + (libgcc_s_handle): New variable. + (pthread_cancel_init): Depend in libgcc_s_handle for decision to + load DSO. Assign last. + (__unwind_freeres): New function. + 2009-02-09 Arthur Loiret [BZ #9717] diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c index 8666bbb3c8..cea5d3b39f 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c +++ b/sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2005, 2006, 2009 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,6 +23,7 @@ #define LIBGCC_S_SO "libgcc_s.so.4" +static void *libgcc_s_handle; static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); static _Unwind_Reason_Code (*libgcc_s_personality) (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, @@ -42,7 +43,7 @@ pthread_cancel_init (void) void *resume, *personality, *forcedunwind, *getcfa; void *handle; - if (__builtin_expect (libgcc_s_getcfa != NULL, 1)) + if (__builtin_expect (libgcc_s_handle != NULL, 1)) { /* Force gcc to reload all values. */ asm volatile ("" ::: "memory"); @@ -66,11 +67,24 @@ pthread_cancel_init (void) libgcc_s_resume = resume; libgcc_s_personality = personality; libgcc_s_forcedunwind = forcedunwind; + libgcc_s_getcfa = getcfa; /* Make sure libgcc_s_getcfa is written last. Otherwise, pthread_cancel_init might return early even when the pointer the caller is interested in is not initialized yet. */ atomic_write_barrier (); - libgcc_s_getcfa = getcfa; + libgcc_s_handle = handle; +} + +void +__libc_freeres_fn_section +__unwind_freeres (void) +{ + void *handle = libgcc_s_handle; + if (handle != NULL) + { + libgcc_s_handle = NULL; + __libc_dlclose (handle); + } } void From f281f9cfdae6156aca98c23cecc796907e9ca913 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 13 Feb 2009 17:35:07 +0000 Subject: [PATCH 3826/4487] 2009-02-13 Khem Raj * sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c (libgcc_s_handle): New variable. (pthread_cancel_init): Depend in libgcc_s_handle for decision to load DSO. Assign last. (__unwind_freeres): New function. * sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c: Likewise. --- ChangeLog.arm | 13 +++++++++++- .../linux/arm/eabi/nptl/unwind-forcedunwind.c | 20 ++++++++++++++++--- .../sysv/linux/arm/nptl/unwind-forcedunwind.c | 20 ++++++++++++++++--- 3 files changed, 46 insertions(+), 7 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index fd520bcd9c..864fd57117 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,14 @@ +2009-02-13 Khem Raj + + * sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c + (libgcc_s_handle): New variable. + (pthread_cancel_init): Depend in libgcc_s_handle for decision to + load DSO. Assign last. + (__unwind_freeres): New function. + + * sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c: + Likewise. + 2009-02-05 Paul Brook Joseph Myers @@ -36,7 +47,7 @@ 2009-01-27 Ryosei Takagi - * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h + * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h (lll_futex_wake_unlock, lll_futex_requeue): Return zero if success. 2009-01-27 Daniel Jacobowitz diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c index 71ab77c6fa..ed321a3964 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c +++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2005, 2007 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2005, 2007, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek . @@ -22,6 +22,7 @@ #include #include +static void *libgcc_s_handle; static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); static _Unwind_Reason_Code (*libgcc_s_personality) (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); @@ -36,7 +37,7 @@ pthread_cancel_init (void) void *resume, *personality, *forcedunwind, *getcfa; void *handle; - if (__builtin_expect (libgcc_s_getcfa != NULL, 1)) + if (__builtin_expect (libgcc_s_handle != NULL, 1)) { /* Force gcc to reload all values. */ asm volatile ("" ::: "memory"); @@ -60,11 +61,24 @@ pthread_cancel_init (void) libgcc_s_resume = resume; libgcc_s_personality = personality; libgcc_s_forcedunwind = forcedunwind; + libgcc_s_getcfa = getcfa; /* Make sure libgcc_s_getcfa is written last. Otherwise, pthread_cancel_init might return early even when the pointer the caller is interested in is not initialized yet. */ atomic_write_barrier (); - libgcc_s_getcfa = getcfa; + libgcc_s_handle = handle; +} + +void +__libc_freeres_fn_section +__unwind_freeres (void) +{ + void *handle = libgcc_s_handle; + if (handle != NULL) + { + libgcc_s_handle = NULL; + __libc_dlclose (handle); + } } /* It's vitally important that _Unwind_Resume not have a stack frame; the diff --git a/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c index b281963568..e19facfb89 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c +++ b/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek . @@ -22,6 +22,7 @@ #include #include +static void *libgcc_s_handle; static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); static _Unwind_Reason_Code (*libgcc_s_personality) (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, @@ -40,7 +41,7 @@ pthread_cancel_init (void) void *handle; void *sjlj_register, *sjlj_unregister; - if (__builtin_expect (libgcc_s_getcfa != NULL, 1)) + if (__builtin_expect (libgcc_s_handle != NULL, 1)) { /* Force gcc to reload all values. */ asm volatile ("" ::: "memory"); @@ -65,11 +66,24 @@ pthread_cancel_init (void) libgcc_s_forcedunwind = forcedunwind; libgcc_s_sjlj_register = sjlj_register; libgcc_s_sjlj_unregister = sjlj_unregister; + libgcc_s_getcfa = getcfa; /* Make sure libgcc_s_getcfa is written last. Otherwise, pthread_cancel_init might return early even when the pointer the caller is interested in is not initialized yet. */ atomic_write_barrier (); - libgcc_s_getcfa = getcfa; + libgcc_s_handle = handle; +} + +void +__libc_freeres_fn_section +__unwind_freeres (void) +{ + void *handle = libgcc_s_handle; + if (handle != NULL) + { + libgcc_s_handle = NULL; + __libc_dlclose (handle); + } } void From 1090d6bf1039732d6441f894f6713e9ab58e01fa Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 13 Feb 2009 17:38:50 +0000 Subject: [PATCH 3827/4487] [BZ #7040] * sysdeps/unix/sysv/linux/mips/sys/inotify.h: Second parameter of inotify_rm_watch should have type int. --- ChangeLog.mips | 6 ++++++ sysdeps/unix/sysv/linux/mips/sys/inotify.h | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index bccb10d796..a52748add1 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,9 @@ +2009-02-13 Joseph Myers + + [BZ #7040] + * sysdeps/unix/sysv/linux/mips/sys/inotify.h: Second parameter of + inotify_rm_watch should have type int. + 2009-02-02 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/shm.h (SHM_EXEC): Define. diff --git a/sysdeps/unix/sysv/linux/mips/sys/inotify.h b/sysdeps/unix/sysv/linux/mips/sys/inotify.h index a811c7fc36..49f39470e1 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/inotify.h +++ b/sysdeps/unix/sysv/linux/mips/sys/inotify.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2005, 2006, 2008 Free Software Foundation, Inc. +/* Copyright (C) 2005, 2006, 2008, 2009 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 @@ -98,7 +98,7 @@ extern int inotify_add_watch (int __fd, const char *__name, uint32_t __mask) __THROW; /* Remove the watch specified by WD from the inotify instance FD. */ -extern int inotify_rm_watch (int __fd, uint32_t __wd) __THROW; +extern int inotify_rm_watch (int __fd, int __wd) __THROW; __END_DECLS From 370b2f2c97815286f8a200880cbf8d0e14f6e6dd Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Sun, 22 Feb 2009 17:02:14 +0000 Subject: [PATCH 3828/4487] 2009-02-22 Carlos O'Donell * sysdeps/hppa/dl-machine.h: Use _dl_runtime_profile. --- ChangeLog.hppa | 4 ++++ sysdeps/hppa/dl-machine.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index a817e5f025..e575b36c5f 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,7 @@ +2009-02-22 Carlos O'Donell + + * sysdeps/hppa/dl-machine.h: Use _dl_runtime_profile. + 2009-02-13 Khem Raj * sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h index 08542951c4..503bbcab8c 100644 --- a/sysdeps/hppa/dl-machine.h +++ b/sysdeps/hppa/dl-machine.h @@ -233,7 +233,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) GL(dl_profile_map) = l; } - if((unsigned long) &_dl_runtime_resolve & 3) + if((unsigned long) &_dl_runtime_profile & 3) { got[-2] = (Elf32_Addr) ((struct fdesc *) ((unsigned long) &_dl_runtime_profile & ~3))->ip; From d4bf22dbef15246f2ed25e13c0a030f0210189f3 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Sun, 22 Feb 2009 17:15:19 +0000 Subject: [PATCH 3829/4487] 2009-02-22 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/Versions: Add missing bracket. --- ChangeLog.hppa | 4 ++++ sysdeps/unix/sysv/linux/hppa/Versions | 1 + 2 files changed, 5 insertions(+) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index e575b36c5f..350b11a124 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,7 @@ +2009-02-22 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/Versions: Add missing bracket. + 2009-02-22 Carlos O'Donell * sysdeps/hppa/dl-machine.h: Use _dl_runtime_profile. diff --git a/sysdeps/unix/sysv/linux/hppa/Versions b/sysdeps/unix/sysv/linux/hppa/Versions index 26eed69eb8..234c0baa60 100644 --- a/sysdeps/unix/sysv/linux/hppa/Versions +++ b/sysdeps/unix/sysv/linux/hppa/Versions @@ -19,6 +19,7 @@ libc { GLIBC_2.4 { #errlist-compat 256 _sys_errlist; sys_errlist; _sys_nerr; sys_nerr; + } } librt { GLIBC_2.3 { From cdc618aab40e9942181a8496d2bc29509cd32950 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Thu, 26 Feb 2009 19:46:02 +0000 Subject: [PATCH 3830/4487] 2009-02-25 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: Define FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME, and FUTEX_BITSET_MATCH_ANY. --- ChangeLog.hppa | 6 ++++++ sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 350b11a124..e99d768ac4 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,9 @@ +2009-02-25 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: Define + FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME, + and FUTEX_BITSET_MATCH_ANY. + 2009-02-22 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/Versions: Add missing bracket. diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h index 6998a91b64..10be11a01a 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h @@ -41,7 +41,12 @@ #define FUTEX_LOCK_PI 6 #define FUTEX_UNLOCK_PI 7 #define FUTEX_TRYLOCK_PI 8 +#define FUTEX_WAIT_BITSET 9 +#define FUTEX_WAKE_BITSET 10 #define FUTEX_PRIVATE_FLAG 128 +#define FUTEX_CLOCK_REALTIME 256 + +#define FUTEX_BITSET_MATCH_ANY 0xffffffff /* Bits used in robust mutex implementation. */ #define FUTEX_WAITERS 0x80000000 From 8ff04e6454adeb1887332341f3d6868db45d1dda Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Thu, 26 Feb 2009 21:29:22 +0000 Subject: [PATCH 3831/4487] 2009-02-25 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c: Update from nptl/sysdeps/pthread/unwind-forcedunwind.c * sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c: Update from nptl/sysdeps/pthread/unwind-resume.c --- ChangeLog.hppa | 7 +++ .../linux/hppa/nptl/unwind-forcedunwind.c | 52 ++++++++++++------- .../unix/sysv/linux/hppa/nptl/unwind-resume.c | 10 ++-- 3 files changed, 44 insertions(+), 25 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index e99d768ac4..538837ce53 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,10 @@ +2009-02-25 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c: + Update from nptl/sysdeps/pthread/unwind-forcedunwind.c + * sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c: + Update from nptl/sysdeps/pthread/unwind-resume.c + 2009-02-25 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: Define diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c index cea5d3b39f..e0eef901d0 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c +++ b/sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c @@ -1,5 +1,6 @@ -/* Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2005, 2006, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. + Contributed by Jakub Jelinek . 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 @@ -20,8 +21,7 @@ #include #include #include - -#define LIBGCC_S_SO "libgcc_s.so.4" +#include static void *libgcc_s_handle; static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); @@ -32,15 +32,16 @@ static _Unwind_Reason_Code (*libgcc_s_forcedunwind) (struct _Unwind_Exception *, _Unwind_Stop_Fn, void *); static _Unwind_Word (*libgcc_s_getcfa) (struct _Unwind_Context *); -#ifndef LIBGCC_S_SO -#define LIBGCC_S_SO "libgcc_s.so.1" -#endif +#define LIBGCC_S_SO "libgcc_s.so.4" void __attribute_noinline__ pthread_cancel_init (void) { - void *resume, *personality, *forcedunwind, *getcfa; + void *resume; + void *personality; + void *forcedunwind; + void *getcfa; void *handle; if (__builtin_expect (libgcc_s_handle != NULL, 1)) @@ -62,13 +63,17 @@ pthread_cancel_init (void) || ARCH_CANCEL_INIT (handle) #endif ) - __libc_fatal ("libgcc_s.so must be installed for pthread_cancel to work\n"); + __libc_fatal (LIBGCC_S_SO " must be installed for pthread_cancel to work\n"); + PTR_MANGLE (resume); libgcc_s_resume = resume; + PTR_MANGLE (personality); libgcc_s_personality = personality; + PTR_MANGLE (forcedunwind); libgcc_s_forcedunwind = forcedunwind; + PTR_MANGLE (getcfa); libgcc_s_getcfa = getcfa; - /* Make sure libgcc_s_getcfa is written last. Otherwise, + /* Make sure libgcc_s_handle is written last. Otherwise, pthread_cancel_init might return early even when the pointer the caller is interested in is not initialized yet. */ atomic_write_barrier (); @@ -90,10 +95,12 @@ __unwind_freeres (void) void _Unwind_Resume (struct _Unwind_Exception *exc) { - if (__builtin_expect (libgcc_s_resume == NULL, 0)) + if (__builtin_expect (libgcc_s_handle == NULL, 0)) pthread_cancel_init (); - libgcc_s_resume (exc); + void (*resume) (struct _Unwind_Exception *exc) = libgcc_s_resume; + PTR_DEMANGLE (resume); + resume (exc); } _Unwind_Reason_Code @@ -102,28 +109,37 @@ __gcc_personality_v0 (int version, _Unwind_Action actions, struct _Unwind_Exception *ue_header, struct _Unwind_Context *context) { - if (__builtin_expect (libgcc_s_personality == NULL, 0)) + if (__builtin_expect (libgcc_s_handle == NULL, 0)) pthread_cancel_init (); - return libgcc_s_personality (version, actions, exception_class, - ue_header, context); + _Unwind_Reason_Code (*personality) + (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, + struct _Unwind_Context *) = libgcc_s_personality; + PTR_DEMANGLE (personality); + return personality (version, actions, exception_class, ue_header, context); } _Unwind_Reason_Code _Unwind_ForcedUnwind (struct _Unwind_Exception *exc, _Unwind_Stop_Fn stop, void *stop_argument) { - if (__builtin_expect (libgcc_s_forcedunwind == NULL, 0)) + if (__builtin_expect (libgcc_s_handle == NULL, 0)) pthread_cancel_init (); - return libgcc_s_forcedunwind (exc, stop, stop_argument); + _Unwind_Reason_Code (*forcedunwind) + (struct _Unwind_Exception *, _Unwind_Stop_Fn, void *) + = libgcc_s_forcedunwind; + PTR_DEMANGLE (forcedunwind); + return forcedunwind (exc, stop, stop_argument); } _Unwind_Word _Unwind_GetCFA (struct _Unwind_Context *context) { - if (__builtin_expect (libgcc_s_getcfa == NULL, 0)) + if (__builtin_expect (libgcc_s_handle == NULL, 0)) pthread_cancel_init (); - return libgcc_s_getcfa (context); + _Unwind_Word (*getcfa) (struct _Unwind_Context *) = libgcc_s_getcfa; + PTR_DEMANGLE (getcfa); + return getcfa (context); } diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c b/sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c index a7485e950f..a31ba1aea1 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c +++ b/sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c @@ -1,5 +1,6 @@ -/* Copyright (C) 2005, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. + Contributed by Jakub Jelinek . 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 @@ -27,11 +28,6 @@ static _Unwind_Reason_Code (*libgcc_s_personality) (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, struct _Unwind_Context *); -#ifndef LIBGCC_S_SO -#error LIBGCC_S_SO -#define LIBGCC_S_SO "libgcc_s.so.1" -#endif - static void init (void) { @@ -43,7 +39,7 @@ init (void) if (handle == NULL || (resume = __libc_dlsym (handle, "_Unwind_Resume")) == NULL || (personality = __libc_dlsym (handle, "__gcc_personality_v0")) == NULL) - __libc_fatal ("libgcc_s.so must be installed for pthread_cancel to work\n"); + __libc_fatal (LIBGCC_S_SO " must be installed for pthread_cancel to work\n"); libgcc_s_resume = resume; libgcc_s_personality = personality; From 6f5d2fa8aa2f0d3d23780a769fe85f4f4fa73c2e Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Thu, 26 Feb 2009 21:36:13 +0000 Subject: [PATCH 3832/4487] 2009-02-25 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h: Adjust comment. Sort macros alphabetically. Remove old lock comments. --- ChangeLog.hppa | 6 ++++ .../sysv/linux/hppa/nptl/bits/pthreadtypes.h | 33 ++++++------------- 2 files changed, 16 insertions(+), 23 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 538837ce53..b6730005a1 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,9 @@ +2009-02-25 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h: + Adjust comment. Sort macros alphabetically. Remove old + lock comments. + 2009-02-25 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c: diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h index 62fc80cc5a..d6eb97540a 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h +++ b/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc. +/* Copyright (C) 2005, 2006, 2007, 2009 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 @@ -21,43 +21,30 @@ /* Linuxthread type sizes (bytes): sizeof(pthread_attr_t) = 0x24 (36) - sizeof(pthread_mutex_t) = 0x30 (48) - sizeof(pthread_mutexattr_t) = 0x4 (4) + sizeof(pthread_barrier_t) = 0x30 (48) + sizeof(pthread_barrierattr_t) = 0x4 (4) sizeof(pthread_cond_t) = 0x30 (48) - = Expanded to 64 bytes in NPTL. - sizeof(pthread_cond_compat_t) = 0xc (12) - = Did not exist in Linuxthreads. sizeof(pthread_condattr_t) = 0x4 (4) + sizeof(pthread_mutex_t) = 0x30 (48) + sizeof(pthread_mutexattr_t) = 0x4 (4) sizeof(pthread_rwlock_t) = 0x40 (64) sizeof(pthread_rwlockattr_t) = 0x8 (8) - sizeof(pthread_barrier_t) = 0x30 (48) - sizeof(pthread_barrierattr_t) = 0x4 (4) */ + sizeof(pthread_spinlock_t) = 0x10 (16) */ #define __SIZEOF_PTHREAD_ATTR_T 36 -#define __SIZEOF_PTHREAD_MUTEX_T 48 -#define __SIZEOF_PTHREAD_MUTEXATTR_T 4 +#define __SIZEOF_PTHREAD_BARRIER_T 48 +#define __SIZEOF_PTHREAD_BARRIERATTR_T 4 #define __SIZEOF_PTHREAD_COND_T 64 -#define __SIZEOF_PTHREAD_COND_COMPAT_T 12 #define __SIZEOF_PTHREAD_CONDATTR_T 4 +#define __SIZEOF_PTHREAD_MUTEX_T 48 +#define __SIZEOF_PTHREAD_MUTEXATTR_T 4 #define __SIZEOF_PTHREAD_RWLOCK_T 64 #define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 -#define __SIZEOF_PTHREAD_BARRIER_T 48 -#define __SIZEOF_PTHREAD_BARRIERATTR_T 4 /* Thread identifiers. The structure of the attribute type is not exposed on purpose. */ typedef unsigned long int pthread_t; -/* Our old basic lock type, listed here for posterity. - We needed self-aligning locks for linuxthreads LDCW - implementation. For NPTL we use LWS Compare and - Exchange to implement primitives. */ -#if 0 -typedef volatile struct { - int lock[4]; -} __attribute__ ((aligned(16))) __atomic_lock_t; -#endif - typedef union { char __size[__SIZEOF_PTHREAD_ATTR_T]; From 2e3804efbfcf4a7279d543181c0a63ff73f5f3c7 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 26 Feb 2009 23:25:24 +0000 Subject: [PATCH 3833/4487] * sysdeps/unix/sysv/linux/mips/bits/stat.h: Protect UTIME_NOW and UTIME_OMIT only with __USE_ATFILE. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/bits/stat.h | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index a52748add1..d3d575a9b7 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2009-02-26 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/stat.h: Protect UTIME_NOW and + UTIME_OMIT only with __USE_ATFILE. + 2009-02-13 Joseph Myers [BZ #7040] diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h index 4e0e30f9ed..af042516e2 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/stat.h +++ b/sysdeps/unix/sysv/linux/mips/bits/stat.h @@ -1,5 +1,5 @@ /* Copyright (C) 1992, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, - 2007 Free Software Foundation, Inc. + 2007, 2009 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 @@ -254,8 +254,7 @@ struct stat64 #define __S_IWRITE 0200 /* Write by owner. */ #define __S_IEXEC 0100 /* Execute by owner. */ -#if defined __USE_ATFILE || defined __USE_GNU -/* XXX This will change to the macro for the next 2008 POSIX revision. */ +#ifdef __USE_ATFILE # define UTIME_NOW ((1l << 30) - 1l) # define UTIME_OMIT ((1l << 30) - 2l) #endif From 9dcb49b6258c355c0d3a3951191f3f7973d64858 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 27 Feb 2009 13:16:51 +0000 Subject: [PATCH 3834/4487] * sysdeps/unix/sysv/linux/m68k/bits/stat.h: Protect UTIME_NOW and UTIME_OMIT only with __USE_ATFILE. --- ChangeLog.m68k | 5 +++++ sysdeps/unix/sysv/linux/m68k/bits/stat.h | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index c399a48686..f6af26a662 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2009-02-26 Joseph Myers + + * sysdeps/unix/sysv/linux/m68k/bits/stat.h: Protect UTIME_NOW and + UTIME_OMIT only with __USE_ATFILE. + 2008-08-10 Joseph Myers * sysdeps/m68k/bits/byteswap.h: Allow inclusion from . diff --git a/sysdeps/unix/sysv/linux/m68k/bits/stat.h b/sysdeps/unix/sysv/linux/m68k/bits/stat.h index 6b6924037b..8d18d6deee 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/stat.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992,95,96,97,98,99,2000,2001,2002,2008 +/* Copyright (C) 1992,95,96,97,98,99,2000,2001,2002,2008,2009 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -163,8 +163,7 @@ struct stat64 #define __S_IWRITE 0200 /* Write by owner. */ #define __S_IEXEC 0100 /* Execute by owner. */ -#if defined __USE_ATFILE || defined __USE_GNU -/* XXX This will change to the macro for the next 2008 POSIX revision. */ +#ifdef __USE_ATFILE # define UTIME_NOW ((1l << 30) - 1l) # define UTIME_OMIT ((1l << 30) - 2l) #endif From ae99295b0505317d1e3e7f11595ad2fab268f350 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 3 Mar 2009 23:18:56 +0000 Subject: [PATCH 3835/4487] * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Declare fallocate{,64}. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/bits/fcntl.h | 17 +++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/ChangeLog.arm b/ChangeLog.arm index 864fd57117..105ef7dbbd 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2009-03-03 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Declare + fallocate{,64}. + 2009-02-13 Khem Raj * sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h index 10d11f2837..277c97aedf 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h @@ -235,6 +235,23 @@ extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout, extern ssize_t tee (int __fdin, int __fdout, size_t __len, unsigned int __flags); +/* Reserve storage for the data of the file associated with FD. */ +# ifndef __USE_FILE_OFFSET64 +extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len); +# else +# ifdef __REDIRECT +extern int __REDIRECT (fallocate, (int __fd, int __mode, __off_t __offset, + __off_t __len), + fallocate64); +# else +# define fallocate fallocate64 +# endif +# endif +# ifdef __USE_LARGEFILE64 +extern int fallocate64 (int __fd, int __mode, __off64_t __offset, + __off64_t __len); +# endif + #endif __END_DECLS From 93311332ba2a6bdb77326af3a83962172a207b31 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 3 Mar 2009 23:19:19 +0000 Subject: [PATCH 3836/4487] * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Declare fallocate{,64}. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 17 +++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/ChangeLog.mips b/ChangeLog.mips index d3d575a9b7..fa78e91704 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2009-03-03 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Declare + fallocate{,64}. + 2009-02-26 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/stat.h: Protect UTIME_NOW and diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index e8107d704b..ef84e96d36 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -248,6 +248,23 @@ extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout, extern ssize_t tee (int __fdin, int __fdout, size_t __len, unsigned int __flags); +/* Reserve storage for the data of the file associated with FD. */ +# ifndef __USE_FILE_OFFSET64 +extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len); +# else +# ifdef __REDIRECT +extern int __REDIRECT (fallocate, (int __fd, int __mode, __off_t __offset, + __off_t __len), + fallocate64); +# else +# define fallocate fallocate64 +# endif +# endif +# ifdef __USE_LARGEFILE64 +extern int fallocate64 (int __fd, int __mode, __off64_t __offset, + __off64_t __len); +# endif + #endif __END_DECLS From 73ea734a9f1aaebc843353a20ddd51c944204633 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 4 Mar 2009 22:49:21 +0000 Subject: [PATCH 3837/4487] * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Declare fallocate{,64}. --- ChangeLog.m68k | 5 +++++ sysdeps/unix/sysv/linux/m68k/bits/fcntl.h | 17 +++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index f6af26a662..d199e36e0c 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2009-03-04 Joseph Myers + + * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Declare + fallocate{,64}. + 2009-02-26 Joseph Myers * sysdeps/unix/sysv/linux/m68k/bits/stat.h: Protect UTIME_NOW and diff --git a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h index 203d5a1a5a..1e396dcdbb 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h @@ -234,6 +234,23 @@ extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout, extern ssize_t tee (int __fdin, int __fdout, size_t __len, unsigned int __flags); +/* Reserve storage for the data of the file associated with FD. */ +# ifndef __USE_FILE_OFFSET64 +extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len); +# else +# ifdef __REDIRECT +extern int __REDIRECT (fallocate, (int __fd, int __mode, __off_t __offset, + __off_t __len), + fallocate64); +# else +# define fallocate fallocate64 +# endif +# endif +# ifdef __USE_LARGEFILE64 +extern int fallocate64 (int __fd, int __mode, __off64_t __offset, + __off64_t __len); +# endif + #endif __END_DECLS From 440eb79d6ce9ac8777bbd8307691cb90897444a5 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sun, 15 Mar 2009 16:53:46 +0000 Subject: [PATCH 3838/4487] * sysdeps/arm/bits/link.h: Uglify function parameter names. * sysdeps/unix/sysv/linux/arm/sys/io.h: Likewise. * sysdeps/arm/eabi/bits/setjmp.h: Uglify attribute name. --- ChangeLog.arm | 6 ++++++ sysdeps/arm/bits/link.h | 4 ++-- sysdeps/arm/eabi/bits/setjmp.h | 4 ++-- sysdeps/unix/sysv/linux/arm/sys/io.h | 14 +++++++------- 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 105ef7dbbd..a2915fdf97 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,9 @@ +2009-03-15 Joseph Myers + + * sysdeps/arm/bits/link.h: Uglify function parameter names. + * sysdeps/unix/sysv/linux/arm/sys/io.h: Likewise. + * sysdeps/arm/eabi/bits/setjmp.h: Uglify attribute name. + 2009-03-03 Joseph Myers * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Declare diff --git a/sysdeps/arm/bits/link.h b/sysdeps/arm/bits/link.h index 8dbd2c7ba4..44e4edae95 100644 --- a/sysdeps/arm/bits/link.h +++ b/sysdeps/arm/bits/link.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2005 Free Software Foundation, Inc. +/* Copyright (C) 2005, 2009 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 @@ -61,6 +61,6 @@ extern unsigned int la_arm_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx, uintptr_t *__defcook, const La_arm_regs *__inregs, La_arm_retval *__outregs, - const char *symname); + const char *__symname); __END_DECLS diff --git a/sysdeps/arm/eabi/bits/setjmp.h b/sysdeps/arm/eabi/bits/setjmp.h index dd7679d200..16c560d613 100644 --- a/sysdeps/arm/eabi/bits/setjmp.h +++ b/sysdeps/arm/eabi/bits/setjmp.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2004, 2005, 2006, 2009 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 @@ -32,7 +32,7 @@ recommends that the buffer contain 64 words. The first 28 words are occupied by v1-v6, sl, fp, sp, pc, d8-d15, and fpscr. (Note that d8-15 require 17 words, due to the use of fstmx.) */ -typedef int __jmp_buf[64] __attribute__((aligned (8))); +typedef int __jmp_buf[64] __attribute__((__aligned__ (8))); #endif #endif diff --git a/sysdeps/unix/sysv/linux/arm/sys/io.h b/sysdeps/unix/sysv/linux/arm/sys/io.h index 68639902c7..0712a47293 100644 --- a/sysdeps/unix/sysv/linux/arm/sys/io.h +++ b/sysdeps/unix/sysv/linux/arm/sys/io.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1998, 1999, 2009 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 @@ -35,13 +35,13 @@ extern int ioperm (unsigned long int __from, unsigned long int __num, extern int iopl (int __level) __THROW; /* The functions that actually perform reads and writes. */ -extern unsigned char inb (unsigned long int port) __THROW; -extern unsigned short int inw (unsigned long int port) __THROW; -extern unsigned long int inl (unsigned long int port) __THROW; +extern unsigned char inb (unsigned long int __port) __THROW; +extern unsigned short int inw (unsigned long int __port) __THROW; +extern unsigned long int inl (unsigned long int __port) __THROW; -extern void outb (unsigned char value, unsigned long int port) __THROW; -extern void outw (unsigned short value, unsigned long int port) __THROW; -extern void outl (unsigned long value, unsigned long int port) __THROW; +extern void outb (unsigned char __value, unsigned long int __port) __THROW; +extern void outw (unsigned short __value, unsigned long int __port) __THROW; +extern void outl (unsigned long __value, unsigned long int __port) __THROW; __END_DECLS From ad32d65a9f664c7b21c91a71b653a311effa06f2 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sun, 15 Mar 2009 16:54:26 +0000 Subject: [PATCH 3839/4487] * sysdeps/mips/bits/link.h: Uglify function parameter names. * sysdeps/unix/sysv/linux/mips/sys/cachectl.h: Likewise. * sysdeps/unix/sysv/linux/mips/sys/eventfd.h: Likewise. * sysdeps/unix/sysv/linux/mips/sys/sysmips.h: Likewise. * sysdeps/unix/sysv/linux/mips/sys/tas.h: Likewise. --- ChangeLog.mips | 8 ++++++++ sysdeps/mips/bits/link.h | 8 ++++---- sysdeps/unix/sysv/linux/mips/sys/cachectl.h | 10 +++++----- sysdeps/unix/sysv/linux/mips/sys/eventfd.h | 4 ++-- sysdeps/unix/sysv/linux/mips/sys/sysmips.h | 4 ++-- sysdeps/unix/sysv/linux/mips/sys/tas.h | 15 ++++++++------- 6 files changed, 29 insertions(+), 20 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index fa78e91704..96d2f46b7a 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,11 @@ +2009-03-15 Joseph Myers + + * sysdeps/mips/bits/link.h: Uglify function parameter names. + * sysdeps/unix/sysv/linux/mips/sys/cachectl.h: Likewise. + * sysdeps/unix/sysv/linux/mips/sys/eventfd.h: Likewise. + * sysdeps/unix/sysv/linux/mips/sys/sysmips.h: Likewise. + * sysdeps/unix/sysv/linux/mips/sys/tas.h: Likewise. + 2009-03-03 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Declare diff --git a/sysdeps/mips/bits/link.h b/sysdeps/mips/bits/link.h index 3d77a4c4a5..85e69cdfdb 100644 --- a/sysdeps/mips/bits/link.h +++ b/sysdeps/mips/bits/link.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2005 Free Software Foundation, Inc. +/* Copyright (C) 2005, 2009 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 @@ -79,7 +79,7 @@ extern unsigned int la_mips_o32_gnu_pltexit (Elf32_Sym *__sym, unsigned int __nd uintptr_t *__defcook, const La_mips_32_regs *__inregs, La_mips_32_retval *__outregs, - const char *symname); + const char *__symname); #elif _MIPS_SIM == _ABIN32 @@ -95,7 +95,7 @@ extern unsigned int la_mips_n32_gnu_pltexit (Elf32_Sym *__sym, unsigned int __nd uintptr_t *__defcook, const La_mips_64_regs *__inregs, La_mips_64_retval *__outregs, - const char *symname); + const char *__symname); #else @@ -111,7 +111,7 @@ extern unsigned int la_mips_n64_gnu_pltexit (Elf64_Sym *__sym, unsigned int __nd uintptr_t *__defcook, const La_mips_64_regs *__inregs, La_mips_64_retval *__outregs, - const char *symname); + const char *__symname); #endif diff --git a/sysdeps/unix/sysv/linux/mips/sys/cachectl.h b/sysdeps/unix/sysv/linux/mips/sys/cachectl.h index a93e1fb6d1..3d9f914b1b 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/cachectl.h +++ b/sysdeps/unix/sysv/linux/mips/sys/cachectl.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 2000, 2009 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 @@ -29,13 +29,13 @@ __BEGIN_DECLS #ifdef __USE_MISC -extern int cachectl (void *addr, __const int nbytes, __const int op) __THROW; +extern int cachectl (void *__addr, __const int __nbytes, __const int __op) __THROW; #endif -extern int __cachectl (void *addr, __const int nbytes, __const int op) __THROW; +extern int __cachectl (void *__addr, __const int __nbytes, __const int __op) __THROW; #ifdef __USE_MISC -extern int cacheflush (void *addr, __const int nbytes, __const int op) __THROW; +extern int cacheflush (void *__addr, __const int __nbytes, __const int __op) __THROW; #endif -extern int _flush_cache (char *addr, __const int nbytes, __const int op) __THROW; +extern int _flush_cache (char *__addr, __const int __nbytes, __const int __op) __THROW; __END_DECLS diff --git a/sysdeps/unix/sysv/linux/mips/sys/eventfd.h b/sysdeps/unix/sysv/linux/mips/sys/eventfd.h index fa34c8cec1..8b55ba6318 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/eventfd.h +++ b/sysdeps/unix/sysv/linux/mips/sys/eventfd.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2007, 2008 Free Software Foundation, Inc. +/* Copyright (C) 2007, 2008, 2009 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 @@ -45,7 +45,7 @@ extern int eventfd (int __count, int __flags) __THROW; extern int eventfd_read (int __fd, eventfd_t *__value); /* Increment event counter. */ -extern int eventfd_write (int __fd, eventfd_t value); +extern int eventfd_write (int __fd, eventfd_t __value); __END_DECLS diff --git a/sysdeps/unix/sysv/linux/mips/sys/sysmips.h b/sysdeps/unix/sysv/linux/mips/sys/sysmips.h index 0677cafaa4..aefc52e3dd 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/sysmips.h +++ b/sysdeps/unix/sysv/linux/mips/sys/sysmips.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1997, 2000, 2001, 2009 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 @@ -36,7 +36,7 @@ __BEGIN_DECLS -extern int sysmips (__const int cmd, ...) __THROW; +extern int sysmips (__const int __cmd, ...) __THROW; __END_DECLS diff --git a/sysdeps/unix/sysv/linux/mips/sys/tas.h b/sysdeps/unix/sysv/linux/mips/sys/tas.h index b370ee4993..c5c80550ed 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/tas.h +++ b/sysdeps/unix/sysv/linux/mips/sys/tas.h @@ -1,4 +1,5 @@ -/* Copyright (C) 2000, 2002, 2003, 2004, 2007 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002, 2003, 2004, 2007, 2009 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Maciej W. Rozycki , 2000. @@ -25,7 +26,7 @@ __BEGIN_DECLS -extern int _test_and_set (int *p, int v) __THROW; +extern int _test_and_set (int *__p, int __v) __THROW; #ifdef __USE_EXTERN_INLINES @@ -34,9 +35,9 @@ extern int _test_and_set (int *p, int v) __THROW; # endif _EXTERN_INLINE int -__NTH (_test_and_set (int *p, int v)) +__NTH (_test_and_set (int *__p, int __v)) { - int r, t; + int __r, __t; __asm__ __volatile__ ("/* Inline test and set */\n" @@ -55,11 +56,11 @@ __NTH (_test_and_set (int *p, int v)) ".set pop\n\t" "2:\n\t" "/* End test and set */" - : "=&r" (r), "=&r" (t), "=m" (*p) - : "m" (*p), "r" (v) + : "=&r" (__r), "=&r" (__t), "=m" (*__p) + : "m" (*__p), "r" (__v) : "memory"); - return r; + return __r; } #endif /* __USE_EXTERN_INLINES */ From bd855f39f173c9972b6e1892c03378738066ebd4 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sun, 15 Mar 2009 18:42:52 +0000 Subject: [PATCH 3840/4487] * sysdeps/m68k/bits/link.h: Uglify function parameter names. --- ChangeLog.m68k | 4 ++++ sysdeps/m68k/bits/link.h | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index d199e36e0c..32d01cf7bb 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,7 @@ +2009-03-15 Joseph Myers + + * sysdeps/m68k/bits/link.h: Uglify function parameter names. + 2009-03-04 Joseph Myers * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Declare diff --git a/sysdeps/m68k/bits/link.h b/sysdeps/m68k/bits/link.h index 9d0a94592f..ce4b5e0670 100644 --- a/sysdeps/m68k/bits/link.h +++ b/sysdeps/m68k/bits/link.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2005 Free Software Foundation, Inc. +/* Copyright (C) 2005, 2009 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 @@ -53,6 +53,6 @@ extern unsigned int la_m68k_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx, uintptr_t *__defcook, const La_m68k_regs *__inregs, La_m68k_retval *__outregs, - const char *symname); + const char *__symname); __END_DECLS From 26ed7fb1ffd871b37624d7247961b022d5f148bc Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 17 Mar 2009 12:32:06 +0000 Subject: [PATCH 3841/4487] 2009-03-16 Khem Raj * sysdeps/unix/sysv/linux/arm/sysdep.h: Include errno.h. --- ChangeLog.arm | 4 ++++ sysdeps/unix/sysv/linux/arm/sysdep.h | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog.arm b/ChangeLog.arm index a2915fdf97..d554bfb282 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,7 @@ +2009-03-16 Khem Raj + + * sysdeps/unix/sysv/linux/arm/sysdep.h: Include errno.h. + 2009-03-15 Joseph Myers * sysdeps/arm/bits/link.h: Uglify function parameter names. diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index 1df63f6075..3d7fafcb6f 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -30,6 +30,11 @@ #include +/* In order to get __set_errno() definition in INLINE_SYSCALL. */ +#ifndef __ASSEMBLER__ +#include +#endif + /* For Linux we can use the system call table in the header file /usr/include/asm/unistd.h of the kernel. But these symbols do not follow the SYS_* syntax From 340f79762887912b27b6cd56de5c6fa1f2fbfcef Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 17 Mar 2009 15:49:10 +0000 Subject: [PATCH 3842/4487] * sysdeps/unix/sysv/linux/mips/mips32/sysdep.h: Include errno.h. * sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h: Likewise. --- ChangeLog.mips | 6 ++++++ sysdeps/unix/sysv/linux/mips/mips32/sysdep.h | 8 +++++++- sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h | 7 ++++++- sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h | 7 ++++++- 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 96d2f46b7a..ee9c835024 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,9 @@ +2009-03-17 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/mips32/sysdep.h: Include errno.h. + * sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h: Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h: Likewise. + 2009-03-15 Joseph Myers * sysdeps/mips/bits/link.h: Uglify function parameter names. diff --git a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h index c3d59ddb8b..753f98aa96 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h @@ -1,4 +1,5 @@ -/* Copyright (C) 2000, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002, 2003, 2004, 2005, + 2009 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 @@ -24,6 +25,11 @@ #include +/* In order to get __set_errno() definition in INLINE_SYSCALL. */ +#ifndef __ASSEMBLER__ +#include +#endif + /* For Linux we can use the system call table in the header file /usr/include/asm/unistd.h of the kernel. But these symbols do not follow the SYS_* syntax diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h index b2bbbb0eee..1513306588 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006 +/* Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -25,6 +25,11 @@ #include +/* In order to get __set_errno() definition in INLINE_SYSCALL. */ +#ifndef __ASSEMBLER__ +#include +#endif + /* For Linux we can use the system call table in the header file /usr/include/asm/unistd.h of the kernel. But these symbols do not follow the SYS_* syntax diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h index 8862607ae8..af12bbdf6e 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006 +/* Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -25,6 +25,11 @@ #include +/* In order to get __set_errno() definition in INLINE_SYSCALL. */ +#ifndef __ASSEMBLER__ +#include +#endif + /* For Linux we can use the system call table in the header file /usr/include/asm/unistd.h of the kernel. But these symbols do not follow the SYS_* syntax From 4c8c18106e3f50e86804469fdbb4eb2f6f9fdac7 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 17 Mar 2009 15:52:15 +0000 Subject: [PATCH 3843/4487] * sysdeps/unix/sysv/linux/mips/getsysstats.c (GET_NPROCS_PARSER): Change parameters and use next_line. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/getsysstats.c | 9 +++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index ee9c835024..db31315907 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2009-03-17 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/getsysstats.c (GET_NPROCS_PARSER): + Change parameters and use next_line. + 2009-03-17 Joseph Myers * sysdeps/unix/sysv/linux/mips/mips32/sysdep.h: Include errno.h. diff --git a/sysdeps/unix/sysv/linux/mips/getsysstats.c b/sysdeps/unix/sysv/linux/mips/getsysstats.c index 9b521ac76a..805303326c 100644 --- a/sysdeps/unix/sysv/linux/mips/getsysstats.c +++ b/sysdeps/unix/sysv/linux/mips/getsysstats.c @@ -1,5 +1,5 @@ /* Determine various system internal values, Linux/MIPS version. - Copyright (C) 2001 Free Software Foundation, Inc. + Copyright (C) 2001, 2009 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 @@ -19,7 +19,7 @@ /* We need to define a special parser for /proc/cpuinfo. */ -#define GET_NPROCS_PARSER(FP, BUFFER, RESULT) \ +#define GET_NPROCS_PARSER(FD, BUFFER, CP, RE, BUFFER_END, RESULT) \ do \ { \ (RESULT) = 0; \ @@ -27,8 +27,9 @@ "cpu model". We don't have to fear extremely long lines since \ the kernel will not generate them. 8192 bytes are really \ enough. */ \ - while (fgets_unlocked (BUFFER, sizeof (BUFFER), FP) != NULL) \ - if (strncmp (BUFFER, "cpu model", 9) == 0) \ + char *l; \ + while ((l = next_line (FD, BUFFER, &CP, &RE, BUFFER_END)) != NULL) \ + if (strncmp (l, "cpu model", 9) == 0) \ ++(RESULT); \ } \ while (0) From edb1d6ef2fbfbc24fcf921d820b4d6c083a66dcb Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 17 Mar 2009 17:41:36 +0000 Subject: [PATCH 3844/4487] * sysdeps/unix/sysv/linux/m68k/getsysstats.c (GET_NPROCS_PARSER): Change parameters and use next_line. --- ChangeLog.m68k | 5 +++++ sysdeps/unix/sysv/linux/m68k/getsysstats.c | 9 +++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 32d01cf7bb..b6305783ad 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2009-03-17 Joseph Myers + + * sysdeps/unix/sysv/linux/m68k/getsysstats.c (GET_NPROCS_PARSER): + Change parameters and use next_line. + 2009-03-15 Joseph Myers * sysdeps/m68k/bits/link.h: Uglify function parameter names. diff --git a/sysdeps/unix/sysv/linux/m68k/getsysstats.c b/sysdeps/unix/sysv/linux/m68k/getsysstats.c index 23207e9bcb..51137204e3 100644 --- a/sysdeps/unix/sysv/linux/m68k/getsysstats.c +++ b/sysdeps/unix/sysv/linux/m68k/getsysstats.c @@ -1,5 +1,5 @@ /* Determine various system internal values, Linux/m68k version. - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2003, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab @@ -20,7 +20,7 @@ /* We need to define a special parser for /proc/cpuinfo. */ -#define GET_NPROCS_PARSER(FP, BUFFER, RESULT) \ +#define GET_NPROCS_PARSER(FD, BUFFER, CP, RE, BUFFER_END, RESULT) \ do \ { \ (RESULT) = 0; \ @@ -28,8 +28,9 @@ "CPU:". We don't have to fear extremely long lines since \ the kernel will not generate them. 8192 bytes are really \ enough. */ \ - while (fgets_unlocked (BUFFER, sizeof (BUFFER), FP) != NULL) \ - if (strncmp (BUFFER, "CPU:", 4) == 0) \ + char *l; \ + while ((l = next_line (FD, BUFFER, &CP, &RE, BUFFER_END)) != NULL) \ + if (strncmp (l, "CPU:", 4) == 0) \ ++(RESULT); \ } \ while (0) From 0262d0c47c55109b0ea10239eedc2695f57ad40e Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 18 Mar 2009 14:31:30 +0000 Subject: [PATCH 3845/4487] 2009-03-18 Zhang Le [BZ #7074] * sysdeps/unix/sysv/linux/mips/readelflib.c (process_elf_file): Fix the condition used to annotate n32 objects. --- ChangeLog.mips | 6 ++++++ sysdeps/unix/sysv/linux/mips/readelflib.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index db31315907..d4a38dca52 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,9 @@ +2009-03-18 Zhang Le + + [BZ #7074] + * sysdeps/unix/sysv/linux/mips/readelflib.c (process_elf_file): + Fix the condition used to annotate n32 objects. + 2009-03-17 Joseph Myers * sysdeps/unix/sysv/linux/mips/getsysstats.c (GET_NPROCS_PARSER): diff --git a/sysdeps/unix/sysv/linux/mips/readelflib.c b/sysdeps/unix/sysv/linux/mips/readelflib.c index baa92fe57c..99fbaaca86 100644 --- a/sysdeps/unix/sysv/linux/mips/readelflib.c +++ b/sysdeps/unix/sysv/linux/mips/readelflib.c @@ -43,7 +43,7 @@ process_elf_file (const char *file_name, const char *lib, int *flag, file_contents, file_length); /* n32 libraries are always libc.so.6+. */ - if (ret && (elf_header->e_flags & EF_MIPS_ABI2) != 0) + if (!ret && (elf_header->e_flags & EF_MIPS_ABI2) != 0) *flag = FLAG_MIPS64_LIBN32|FLAG_ELF_LIBC6; } else From d69fd0cbd2ec67b2dc4ba1e23bac6b9ed6b947c5 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 18 Mar 2009 14:38:51 +0000 Subject: [PATCH 3846/4487] 2009-03-18 Maciej W. Rozycki * sysdeps/unix/sysv/linux/mips/readelflib.c (process_elf_file): Use the Elf32_Ehdr type to check for EF_MIPS_ABI2 in the flags. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/readelflib.c | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index d4a38dca52..6f4b038e78 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2009-03-18 Maciej W. Rozycki + + * sysdeps/unix/sysv/linux/mips/readelflib.c (process_elf_file): + Use the Elf32_Ehdr type to check for EF_MIPS_ABI2 in the flags. + 2009-03-18 Zhang Le [BZ #7074] diff --git a/sysdeps/unix/sysv/linux/mips/readelflib.c b/sysdeps/unix/sysv/linux/mips/readelflib.c index 99fbaaca86..547362f31f 100644 --- a/sysdeps/unix/sysv/linux/mips/readelflib.c +++ b/sysdeps/unix/sysv/linux/mips/readelflib.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1999, 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2001, 2002, 2003, 2005, 2009 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Alexandre Oliva Based on work ../x86_64/readelflib.c, @@ -39,11 +40,13 @@ process_elf_file (const char *file_name, const char *lib, int *flag, if (elf_header->e_ident [EI_CLASS] == ELFCLASS32) { + Elf32_Ehdr *elf32_header = (Elf32_Ehdr *) elf_header; + ret = process_elf32_file (file_name, lib, flag, osversion, soname, file_contents, file_length); /* n32 libraries are always libc.so.6+. */ - if (!ret && (elf_header->e_flags & EF_MIPS_ABI2) != 0) + if (!ret && (elf32_header->e_flags & EF_MIPS_ABI2) != 0) *flag = FLAG_MIPS64_LIBN32|FLAG_ELF_LIBC6; } else From 70fdbfd9568cadea8ef14f31c5e4a5aaf7e8e18e Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 9 Apr 2009 22:14:47 +0000 Subject: [PATCH 3847/4487] * sysdeps/unix/sysv/linux/mips/bits/socket.h: Add missing protocol numbers. * sysdeps/unix/sysv/linux/mips/sys/eventfd.h (EFD_SEMAPHORE): Define. * sysdeps/unix/sysv/linux/mips/kernel-features.h: Add entries for preadv and pwritev. --- ChangeLog.mips | 9 +++++++++ sysdeps/unix/sysv/linux/mips/bits/socket.h | 12 +++++++++++- sysdeps/unix/sysv/linux/mips/kernel-features.h | 6 ++++++ sysdeps/unix/sysv/linux/mips/sys/eventfd.h | 2 ++ 4 files changed, 28 insertions(+), 1 deletion(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 6f4b038e78..6f5e4f731d 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,12 @@ +2009-04-09 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/socket.h: Add missing protocol + numbers. + * sysdeps/unix/sysv/linux/mips/sys/eventfd.h (EFD_SEMAPHORE): + Define. + * sysdeps/unix/sysv/linux/mips/kernel-features.h: Add entries for + preadv and pwritev. + 2009-03-18 Maciej W. Rozycki * sysdeps/unix/sysv/linux/mips/readelflib.c (process_elf_file): diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h index dad2c2d097..60db51554b 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/socket.h +++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h @@ -95,15 +95,20 @@ enum __socket_type #define PF_ASH 18 /* Ash. */ #define PF_ECONET 19 /* Acorn Econet. */ #define PF_ATMSVC 20 /* ATM SVCs. */ +#define PF_RDS 21 /* RDS sockets. */ #define PF_SNA 22 /* Linux SNA Project */ #define PF_IRDA 23 /* IRDA sockets. */ #define PF_PPPOX 24 /* PPPoX sockets. */ #define PF_WANPIPE 25 /* Wanpipe API sockets. */ +#define PF_LLC 26 /* Linux LLC. */ +#define PF_CAN 29 /* Controller Area Network. */ +#define PF_TIPC 30 /* TIPC sockets. */ #define PF_BLUETOOTH 31 /* Bluetooth sockets. */ #define PF_IUCV 32 /* IUCV sockets. */ #define PF_RXRPC 33 /* RxRPC sockets. */ #define PF_ISDN 34 /* mISDN sockets. */ -#define PF_MAX 35 /* For now.. */ +#define PF_PHONET 35 /* Phonet sockets. */ +#define PF_MAX 36 /* For now.. */ /* Address families. */ #define AF_UNSPEC PF_UNSPEC @@ -130,14 +135,19 @@ enum __socket_type #define AF_ASH PF_ASH #define AF_ECONET PF_ECONET #define AF_ATMSVC PF_ATMSVC +#define AF_RDS PF_RDS #define AF_SNA PF_SNA #define AF_IRDA PF_IRDA #define AF_PPPOX PF_PPPOX #define AF_WANPIPE PF_WANPIPE +#define AF_LLC PF_LLC +#define AF_CAN PF_CAN +#define AF_TIPC PF_TIPC #define AF_BLUETOOTH PF_BLUETOOTH #define AF_IUCV PF_IUCV #define AF_RXRPC PF_RXRPC #define AF_ISDN PF_ISDN +#define AF_PHONET PF_PHONET #define AF_MAX PF_MAX /* Socket level values. Others are defined in the appropriate headers. diff --git a/sysdeps/unix/sysv/linux/mips/kernel-features.h b/sysdeps/unix/sysv/linux/mips/kernel-features.h index f479b60636..1cdf19e3fc 100644 --- a/sysdeps/unix/sysv/linux/mips/kernel-features.h +++ b/sysdeps/unix/sysv/linux/mips/kernel-features.h @@ -31,4 +31,10 @@ # define __ASSUME_FCNTL64 1 #endif +/* Support for preadv and pwritev was added in 2.6.30. */ +#if __LINUX_KERNEL_VERSION >= 0x02061e +# define __ASSUME_PREADV 1 +# define __ASSUME_PWRITEV 1 +#endif + #include_next diff --git a/sysdeps/unix/sysv/linux/mips/sys/eventfd.h b/sysdeps/unix/sysv/linux/mips/sys/eventfd.h index 8b55ba6318..b30d09a83e 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/eventfd.h +++ b/sysdeps/unix/sysv/linux/mips/sys/eventfd.h @@ -28,6 +28,8 @@ typedef uint64_t eventfd_t; /* Flags for signalfd. */ enum { + EFD_SEMAPHORE = 1, +#define EFD_SEMAPHORE EFD_SEMAPHORE EFD_CLOEXEC = 02000000, #define EFD_CLOEXEC EFD_CLOEXEC EFD_NONBLOCK = 0200 From 6db53cd54801d6c1b018d1046fd848739643c5e4 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 15 Apr 2009 20:22:41 +0000 Subject: [PATCH 3848/4487] 2009-04-15 Maciej W. Rozycki * sysdeps/mips/sys/fpregdef.h: Update for new ABIs. --- ChangeLog.mips | 4 ++ sysdeps/mips/sys/fpregdef.h | 92 ++++++++++++++++++++++++++++++------- 2 files changed, 79 insertions(+), 17 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 6f5e4f731d..4e6ce796a9 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,7 @@ +2009-04-15 Maciej W. Rozycki + + * sysdeps/mips/sys/fpregdef.h: Update for new ABIs. + 2009-04-09 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/socket.h: Add missing protocol diff --git a/sysdeps/mips/sys/fpregdef.h b/sysdeps/mips/sys/fpregdef.h index 378115274f..d6c72bbcaa 100644 --- a/sysdeps/mips/sys/fpregdef.h +++ b/sysdeps/mips/sys/fpregdef.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 92, 94, 95, 96, 97, 98 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,94,95,96,97,98,2009 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 @@ -19,19 +19,52 @@ #ifndef _SYS_FPREGDEF_H #define _SYS_FPREGDEF_H -/* - * These definitions only cover the R3000-ish 16/32 register model. - * But we're trying to be R3000 friendly anyway ... - */ -#define fv0 $f0 /* return value */ -#define fv0f $f1 +#include + +/* Commonalities first, individualities next... */ + +#define fv0 $f0 /* return value */ #define fv1 $f2 + +#if _MIPS_SIM == _ABIO32 || _MIPS_SIM == _ABIN32 +#define fs0 $f20 /* callee saved */ +#define fs1 $f22 +#define fs2 $f24 +#define fs3 $f26 +#define fs4 $f28 +#define fs5 $f30 +#endif /* _MIPS_SIM == _ABIO32 || _MIPS_SIM == _ABIN32 */ + +#if _MIPS_SIM == _ABI64 || _MIPS_SIM == _ABIN32 +#define fa0 $f12 /* argument registers */ +#define fa1 $f13 +#define fa2 $f14 +#define fa3 $f15 +#define fa4 $f16 +#define fa5 $f17 +#define fa6 $f18 +#define fa7 $f19 + +#define ft0 $f4 /* caller saved */ +#define ft1 $f5 +#define ft2 $f6 +#define ft3 $f7 +#define ft4 $f8 +#define ft5 $f9 +#define ft6 $f10 +#define ft7 $f11 +#endif /* _MIPS_SIM == _ABI64 || _MIPS_SIM == _ABIN32 */ + +#if _MIPS_SIM == _ABIO32 +#define fv0f $f1 /* return value, high part */ #define fv1f $f3 -#define fa0 $f12 /* argument registers */ + +#define fa0 $f12 /* argument registers */ #define fa0f $f13 #define fa1 $f14 #define fa1f $f15 -#define ft0 $f4 /* caller saved */ + +#define ft0 $f4 /* caller saved */ #define ft0f $f5 #define ft1 $f6 #define ft1f $f7 @@ -43,19 +76,44 @@ #define ft4f $f17 #define ft5 $f18 #define ft5f $f19 -#define fs0 $f20 /* callee saved */ -#define fs0f $f21 -#define fs1 $f22 + +#define fs0f $f21 /* callee saved, high part */ #define fs1f $f23 -#define fs2 $f24 #define fs2f $f25 -#define fs3 $f26 #define fs3f $f27 -#define fs4 $f28 #define fs4f $f29 -#define fs5 $f30 #define fs5f $f31 +#endif /* _MIPS_SIM == _ABIO32 */ + +#if _MIPS_SIM == _ABI64 +#define ft8 $f20 /* caller saved */ +#define ft9 $f21 +#define ft10 $f22 +#define ft11 $f23 +#define ft12 $f1 +#define ft13 $f3 + +#define fs0 $f24 /* callee saved */ +#define fs1 $f25 +#define fs2 $f26 +#define fs3 $f27 +#define fs4 $f28 +#define fs5 $f29 +#define fs6 $f30 +#define fs7 $f31 +#endif /* _MIPS_SIM == _ABI64 */ + +#if _MIPS_SIM == _ABIN32 +#define ft8 $f21 /* caller saved */ +#define ft9 $f23 +#define ft10 $f25 +#define ft11 $f27 +#define ft12 $f29 +#define ft13 $f31 +#define ft14 $f1 +#define ft15 $f3 +#endif /* _MIPS_SIM == _ABIN32 */ -#define fcr31 $31 /* FPU status register */ +#define fcr31 $31 /* FPU status register */ #endif /* sys/fpregdef.h */ From 57d0274fe9028205f2431ab323f95a5021601a74 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sat, 18 Apr 2009 14:08:18 +0000 Subject: [PATCH 3849/4487] * sysdeps/unix/sysv/linux/mips/kernel-features.h (__ASSUME_PREADV, __ASSUME_PWRITEV): Don't define here. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/kernel-features.h | 6 ------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 4e6ce796a9..e8a7a11d80 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2009-04-18 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/kernel-features.h (__ASSUME_PREADV, + __ASSUME_PWRITEV): Don't define here. + 2009-04-15 Maciej W. Rozycki * sysdeps/mips/sys/fpregdef.h: Update for new ABIs. diff --git a/sysdeps/unix/sysv/linux/mips/kernel-features.h b/sysdeps/unix/sysv/linux/mips/kernel-features.h index 1cdf19e3fc..f479b60636 100644 --- a/sysdeps/unix/sysv/linux/mips/kernel-features.h +++ b/sysdeps/unix/sysv/linux/mips/kernel-features.h @@ -31,10 +31,4 @@ # define __ASSUME_FCNTL64 1 #endif -/* Support for preadv and pwritev was added in 2.6.30. */ -#if __LINUX_KERNEL_VERSION >= 0x02061e -# define __ASSUME_PREADV 1 -# define __ASSUME_PWRITEV 1 -#endif - #include_next From 80c0ce1cac739218fa077672903267fdebe34c7d Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sat, 18 Apr 2009 14:08:41 +0000 Subject: [PATCH 3850/4487] * sysdeps/unix/sysv/linux/arm/kernel-features.h (__ASSUME_PREADV, __ASSUME_PWRITEV): Undefine. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/kernel-features.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog.arm b/ChangeLog.arm index d554bfb282..779ef2d56f 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2009-04-18 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/kernel-features.h (__ASSUME_PREADV, + __ASSUME_PWRITEV): Undefine. + 2009-03-16 Khem Raj * sysdeps/unix/sysv/linux/arm/sysdep.h: Include errno.h. diff --git a/sysdeps/unix/sysv/linux/arm/kernel-features.h b/sysdeps/unix/sysv/linux/arm/kernel-features.h index ea439d5a06..b33c96865f 100644 --- a/sysdeps/unix/sysv/linux/arm/kernel-features.h +++ b/sysdeps/unix/sysv/linux/arm/kernel-features.h @@ -56,3 +56,5 @@ /* These syscalls are not implemented yet for ARM. */ #undef __ASSUME_PSELECT #undef __ASSUME_PPOLL +#undef __ASSUME_PREADV +#undef __ASSUME_PWRITEV From 19d6bdd79a7b35f36fda4b9b0e5cd860d4f5d656 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sat, 18 Apr 2009 16:26:00 +0000 Subject: [PATCH 3851/4487] * sysdeps/unix/sysv/linux/m68k/kernel-features.h (__ASSUME_PREADV, __ASSUME_PWRITEV): Undefine. --- ChangeLog.m68k | 5 +++++ sysdeps/unix/sysv/linux/m68k/kernel-features.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index b6305783ad..ef7d08d02c 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2009-04-18 Joseph Myers + + * sysdeps/unix/sysv/linux/m68k/kernel-features.h (__ASSUME_PREADV, + __ASSUME_PWRITEV): Undefine. + 2009-03-17 Joseph Myers * sysdeps/unix/sysv/linux/m68k/getsysstats.c (GET_NPROCS_PARSER): diff --git a/sysdeps/unix/sysv/linux/m68k/kernel-features.h b/sysdeps/unix/sysv/linux/m68k/kernel-features.h index 9a6d23d3ee..d897562a12 100644 --- a/sysdeps/unix/sysv/linux/m68k/kernel-features.h +++ b/sysdeps/unix/sysv/linux/m68k/kernel-features.h @@ -39,3 +39,5 @@ /* These syscalls are not implemented yet for m68k. */ #undef __ASSUME_PSELECT #undef __ASSUME_PPOLL +#undef __ASSUME_PREADV +#undef __ASSUME_PWRITEV From ff3475331e3007db16d792b1e1489170b71308a1 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sat, 18 Apr 2009 17:32:04 +0000 Subject: [PATCH 3852/4487] 2009-04-18 Maciej W. Rozycki * sysdeps/unix/sysv/linux/mips/getcontext.S: New file. * sysdeps/unix/sysv/linux/mips/makecontext.S: New file. * sysdeps/unix/sysv/linux/mips/setcontext.S: New file. * sysdeps/unix/sysv/linux/mips/swapcontext.S: New file. * sysdeps/unix/sysv/linux/mips/sys/ucontext.h (mcontext_t): Update comment. * sysdeps/unix/sysv/linux/mips/kernel_rt_sigframe.h: New file. * sysdeps/unix/sysv/linux/mips/ucontext_i.sym: New file. * sysdeps/unix/sysv/linux/mips/Makefile (gen-as-const-headers): Add ucontext_i.sym. --- ChangeLog.mips | 13 ++ sysdeps/unix/sysv/linux/mips/Makefile | 4 + sysdeps/unix/sysv/linux/mips/getcontext.S | 149 ++++++++++++ .../unix/sysv/linux/mips/kernel_rt_sigframe.h | 10 + sysdeps/unix/sysv/linux/mips/makecontext.S | 189 ++++++++++++++++ sysdeps/unix/sysv/linux/mips/setcontext.S | 192 ++++++++++++++++ sysdeps/unix/sysv/linux/mips/swapcontext.S | 212 ++++++++++++++++++ sysdeps/unix/sysv/linux/mips/sys/ucontext.h | 11 +- sysdeps/unix/sysv/linux/mips/ucontext_i.sym | 52 +++++ 9 files changed, 825 insertions(+), 7 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/mips/getcontext.S create mode 100644 sysdeps/unix/sysv/linux/mips/kernel_rt_sigframe.h create mode 100644 sysdeps/unix/sysv/linux/mips/makecontext.S create mode 100644 sysdeps/unix/sysv/linux/mips/setcontext.S create mode 100644 sysdeps/unix/sysv/linux/mips/swapcontext.S create mode 100644 sysdeps/unix/sysv/linux/mips/ucontext_i.sym diff --git a/ChangeLog.mips b/ChangeLog.mips index e8a7a11d80..5887530b28 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,16 @@ +2009-04-18 Maciej W. Rozycki + + * sysdeps/unix/sysv/linux/mips/getcontext.S: New file. + * sysdeps/unix/sysv/linux/mips/makecontext.S: New file. + * sysdeps/unix/sysv/linux/mips/setcontext.S: New file. + * sysdeps/unix/sysv/linux/mips/swapcontext.S: New file. + * sysdeps/unix/sysv/linux/mips/sys/ucontext.h (mcontext_t): + Update comment. + * sysdeps/unix/sysv/linux/mips/kernel_rt_sigframe.h: New file. + * sysdeps/unix/sysv/linux/mips/ucontext_i.sym: New file. + * sysdeps/unix/sysv/linux/mips/Makefile (gen-as-const-headers): + Add ucontext_i.sym. + 2009-04-18 Joseph Myers * sysdeps/unix/sysv/linux/mips/kernel-features.h (__ASSUME_PREADV, diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile index 110fccb6ed..162f1b93d4 100644 --- a/sysdeps/unix/sysv/linux/mips/Makefile +++ b/sysdeps/unix/sysv/linux/mips/Makefile @@ -135,3 +135,7 @@ sysdep_routines += dl-static sysdep-rtld-routines += dl-static endif endif + +ifeq ($(subdir),stdlib) +gen-as-const-headers += ucontext_i.sym +endif diff --git a/sysdeps/unix/sysv/linux/mips/getcontext.S b/sysdeps/unix/sysv/linux/mips/getcontext.S new file mode 100644 index 0000000000..1e77467cb2 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/getcontext.S @@ -0,0 +1,149 @@ +/* Save current context. + Copyright (C) 2009 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Maciej W. Rozycki . + + 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, 51 Franklin Street - Fifth Floor, Boston, MA + 02110-1301, USA. */ + +#include +#include +#include +#include + +#include "ucontext_i.h" + +/* int getcontext (ucontext_t *ucp) */ + + .text +LOCALSZ = 0 +MASK = 0x00000000 +#ifdef __PIC__ +LOCALSZ = 1 /* save gp */ +# if _MIPS_SIM != _ABIO32 +MASK = 0x10000000 +# endif +#endif +FRAMESZ = ((LOCALSZ * SZREG) + ALSZ) & ALMASK +GPOFF = FRAMESZ - (1 * SZREG) + +NESTED (__getcontext, FRAMESZ, ra) + .mask MASK, 0 + .fmask 0x00000000, 0 + +#ifdef __PIC__ + SETUP_GP + + move a2, sp +# define _SP a2 + +# if _MIPS_SIM != _ABIO32 + move a3, gp +# define _GP a3 +# endif + + PTR_ADDIU sp, -FRAMESZ + SETUP_GP64 (GPOFF, __getcontext) + SAVE_GP (GPOFF) + +#else /* ! __PIC__ */ +# define _SP sp +# define _GP gp + +#endif /* ! __PIC__ */ + +#ifdef PROF + .set noat + move AT, ra + jal _mcount + .set at +#endif + + /* Store a magic flag. */ + li v1, 1 + REG_S v1, (0 * SZREG + MCONTEXT_GREGS)(a0) /* zero */ + + REG_S s0, (16 * SZREG + MCONTEXT_GREGS)(a0) + REG_S s1, (17 * SZREG + MCONTEXT_GREGS)(a0) + REG_S s2, (18 * SZREG + MCONTEXT_GREGS)(a0) + REG_S s3, (19 * SZREG + MCONTEXT_GREGS)(a0) + REG_S s4, (20 * SZREG + MCONTEXT_GREGS)(a0) + REG_S s5, (21 * SZREG + MCONTEXT_GREGS)(a0) + REG_S s6, (22 * SZREG + MCONTEXT_GREGS)(a0) + REG_S s7, (23 * SZREG + MCONTEXT_GREGS)(a0) +#if ! defined (__PIC__) || _MIPS_SIM != _ABIO32 + REG_S _GP, (28 * SZREG + MCONTEXT_GREGS)(a0) +#endif + REG_S _SP, (29 * SZREG + MCONTEXT_GREGS)(a0) + REG_S fp, (30 * SZREG + MCONTEXT_GREGS)(a0) + REG_S ra, (31 * SZREG + MCONTEXT_GREGS)(a0) + REG_S ra, MCONTEXT_PC(a0) + +#ifdef __mips_hard_float +# if _MIPS_SIM == _ABI64 + s.d fs0, (24 * SZREG + MCONTEXT_FPREGS)(a0) + s.d fs1, (25 * SZREG + MCONTEXT_FPREGS)(a0) + s.d fs2, (26 * SZREG + MCONTEXT_FPREGS)(a0) + s.d fs3, (27 * SZREG + MCONTEXT_FPREGS)(a0) + s.d fs4, (28 * SZREG + MCONTEXT_FPREGS)(a0) + s.d fs5, (29 * SZREG + MCONTEXT_FPREGS)(a0) + s.d fs6, (30 * SZREG + MCONTEXT_FPREGS)(a0) + s.d fs7, (31 * SZREG + MCONTEXT_FPREGS)(a0) + +# else /* _MIPS_SIM != _ABI64 */ + s.d fs0, (20 * SZREG + MCONTEXT_FPREGS)(a0) + s.d fs1, (22 * SZREG + MCONTEXT_FPREGS)(a0) + s.d fs2, (24 * SZREG + MCONTEXT_FPREGS)(a0) + s.d fs3, (26 * SZREG + MCONTEXT_FPREGS)(a0) + s.d fs4, (28 * SZREG + MCONTEXT_FPREGS)(a0) + s.d fs5, (30 * SZREG + MCONTEXT_FPREGS)(a0) + +# endif /* _MIPS_SIM != _ABI64 */ + + cfc1 v1, fcr31 + sw v1, MCONTEXT_FPC_CSR(a0) +#endif /* __mips_hard_float */ + +/* rt_sigprocmask (SIG_BLOCK, NULL, &ucp->uc_sigmask, _NSIG8) */ + li a3, _NSIG8 + PTR_ADDU a2, a0, UCONTEXT_SIGMASK + move a1, zero + li a0, SIG_BLOCK + + li v0, SYS_ify (rt_sigprocmask) + syscall + bnez a3, 99f + +#ifdef __PIC__ + RESTORE_GP64 + PTR_ADDIU sp, FRAMESZ +#endif + move v0, zero + jr ra + +99: +#ifdef __PIC__ + PTR_LA t9, JUMPTARGET (__syscall_error) + RESTORE_GP64 + PTR_ADDIU sp, FRAMESZ + jr t9 + +#else /* ! __PIC__ */ + + j JUMPTARGET (__syscall_error) +#endif /* ! __PIC__ */ +PSEUDO_END (__getcontext) + +weak_alias (__getcontext, getcontext) diff --git a/sysdeps/unix/sysv/linux/mips/kernel_rt_sigframe.h b/sysdeps/unix/sysv/linux/mips/kernel_rt_sigframe.h new file mode 100644 index 0000000000..edf8d455c9 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/kernel_rt_sigframe.h @@ -0,0 +1,10 @@ +/* Linux kernel RT signal frame. */ +typedef struct kernel_rt_sigframe + { + uint32_t rs_ass[4]; + uint32_t rs_code[2]; + struct siginfo rs_info; + struct ucontext rs_uc; + uint32_t rs_altcode[8] __attribute__ ((__aligned__ (1 << 7))); + } +kernel_rt_sigframe_t; diff --git a/sysdeps/unix/sysv/linux/mips/makecontext.S b/sysdeps/unix/sysv/linux/mips/makecontext.S new file mode 100644 index 0000000000..cceee3f16c --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/makecontext.S @@ -0,0 +1,189 @@ +/* Modify saved context. + Copyright (C) 2009 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Maciej W. Rozycki . + + 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, 51 Franklin Street - Fifth Floor, Boston, MA + 02110-1301, USA. */ + +#include +#include +#include +#include + +#include "ucontext_i.h" + +/* int makecontext (ucontext_t *ucp, (void *func) (), int argc, ...) */ + + .text +LOCALSZ = 0 +ARGSZ = 0 +MASK = 0x00000000 +#ifdef __PIC__ +LOCALSZ = 1 /* save gp */ +#endif +#if _MIPS_SIM != _ABIO32 +ARGSZ = 5 /* save a3-a7 */ +# ifdef __PIC__ +MASK = 0x10000000 +# endif +#endif +FRAMESZ = (((ARGSZ + LOCALSZ) * SZREG) + ALSZ) & ALMASK +GPOFF = FRAMESZ - ((ARGSZ + 1) * SZREG) +#if _MIPS_SIM != _ABIO32 +A3OFF = FRAMESZ - (5 * SZREG) /* callee-allocated */ +A4OFF = FRAMESZ - (4 * SZREG) +A5OFF = FRAMESZ - (3 * SZREG) +A6OFF = FRAMESZ - (2 * SZREG) +A7OFF = FRAMESZ - (1 * SZREG) +NARGREGS = 8 +#else +A3OFF = FRAMESZ + (3 * SZREG) /* caller-allocated */ +NARGREGS = 4 +#endif + +NESTED (__makecontext, FRAMESZ, ra) + .mask MASK, -(ARGSZ * SZREG) + .fmask 0x00000000, 0 + +98: +#ifdef __PIC__ + SETUP_GP +#endif + + PTR_ADDIU sp, -FRAMESZ + +#ifdef __PIC__ + SETUP_GP64 (GPOFF, __makecontext) + SAVE_GP (GPOFF) +#endif + +#ifdef PROF + .set noat + move AT, ra + jal _mcount + .set at +#endif + + /* Store args to be passed. */ + REG_S a3, A3OFF(sp) +#if _MIPS_SIM != _ABIO32 + REG_S a4, A4OFF(sp) + REG_S a5, A5OFF(sp) + REG_S a6, A6OFF(sp) + REG_S a7, A7OFF(sp) +#endif + + /* Store a magic flag. */ + li v1, 1 + REG_S v1, (0 * SZREG + MCONTEXT_GREGS)(a0) /* zero */ + + /* Set up the stack. */ + PTR_L t0, STACK_SP(a0) + PTR_L t2, STACK_SIZE(a0) + PTR_ADDIU t1, sp, A3OFF + PTR_ADDU t0, t2 + and t0, ALMASK + blez a2, 2f /* no arguments */ + + /* Store register arguments. */ + PTR_ADDIU t2, a0, MCONTEXT_GREGS + 4 * SZREG + move t3, zero +0: + addiu t3, 1 + REG_L v1, (t1) + PTR_ADDIU t1, SZREG + REG_S v1, (t2) + PTR_ADDIU t2, SZREG + bgeu t3, a2, 2f /* all done */ + bltu t3, NARGREGS, 0b /* next */ + + /* Make room for stack arguments. */ + PTR_SUBU t2, a2, t3 + PTR_SLL t2, 3 + PTR_SUBU t0, t2 + and t0, ALMASK + + /* Store stack arguments. */ + move t2, t0 +1: + addiu t3, 1 + REG_L v1, (t1) + PTR_ADDIU t1, SZREG + REG_S v1, (t2) + PTR_ADDIU t2, SZREG + bltu t3, a2, 1b /* next */ + +2: +#if _MIPS_SIM == _ABIO32 + /* Make room for a0-a3 storage. */ + PTR_ADDIU t0, -(NARGSAVE * SZREG) +#endif + PTR_L v1, UCONTEXT_LINK(a0) +#ifdef __PIC__ + PTR_ADDIU t9, 99f - 98b +#else + PTR_LA t9, 99f +#endif + REG_S t0, (29 * SZREG + MCONTEXT_GREGS)(a0) /* sp */ + REG_S v1, (16 * SZREG + MCONTEXT_GREGS)(a0) /* s0 */ +#ifdef __PIC__ + REG_S gp, (17 * SZREG + MCONTEXT_GREGS)(a0) /* s1 */ +#endif + REG_S t9, (31 * SZREG + MCONTEXT_GREGS)(a0) /* ra */ + REG_S a1, MCONTEXT_PC(a0) + +#ifdef __PIC__ + RESTORE_GP64 + PTR_ADDIU sp, FRAMESZ +#endif + jr ra + +99: +#ifdef __PIC__ + move gp, s1 +#endif + move a0, zero + beqz s0, 0f + + /* setcontext (ucp) */ + move a0, s0 +#ifdef __PIC__ + PTR_LA t9, JUMPTARGET (__setcontext) + jalr t9 +# if _MIPS_SIM == _ABIO32 + move gp, s1 +# endif +#else + jal JUMPTARGET (__setcontext) +#endif + move a0, v0 + +0: + /* exit (a0) */ +#ifdef __PIC__ + PTR_LA t9, HIDDEN_JUMPTARGET (exit) + jalr t9 +#else + jal HIDDEN_JUMPTARGET (exit) +#endif + + /* You don't exist, you won't feel anything. */ +1: + lb zero, (zero) + b 1b +PSEUDO_END (__makecontext) + +weak_alias (__makecontext, makecontext) diff --git a/sysdeps/unix/sysv/linux/mips/setcontext.S b/sysdeps/unix/sysv/linux/mips/setcontext.S new file mode 100644 index 0000000000..186f3a7911 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/setcontext.S @@ -0,0 +1,192 @@ +/* Set current context. + Copyright (C) 2009 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Maciej W. Rozycki . + + 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, 51 Franklin Street - Fifth Floor, Boston, MA + 02110-1301, USA. */ + +#include +#include +#include +#include + +#include "ucontext_i.h" + +/* int setcontext (const ucontext_t *ucp) */ + + .text +LOCALSZ = 0 +ARGSZ = 0 +MASK = 0x00000000 +#ifdef __PIC__ +LOCALSZ = 1 /* save gp */ +#endif +#if _MIPS_SIM != _ABIO32 +ARGSZ = 1 /* save a0 */ +# ifdef __PIC__ +MASK = 0x10000000 +# endif +#endif +FRAMESZ = (((ARGSZ + LOCALSZ) * SZREG) + ALSZ) & ALMASK +GPOFF = FRAMESZ - ((ARGSZ + 1) * SZREG) +#if _MIPS_SIM != _ABIO32 +A0OFF = FRAMESZ - (1 * SZREG) /* callee-allocated */ +#else +A0OFF = FRAMESZ + (0 * SZREG) /* caller-allocated */ +#endif + +NESTED (__setcontext, FRAMESZ, ra) + .mask MASK, -(ARGSZ * SZREG) + .fmask 0x00000000, 0 + +#ifdef __PIC__ + SETUP_GP +#endif + + PTR_ADDIU sp, -FRAMESZ + +#ifdef __PIC__ + SETUP_GP64 (GPOFF, __setcontext) + SAVE_GP (GPOFF) +#endif + +#ifdef PROF + .set noat + move AT, ra + jal _mcount + .set at +#endif + + /* Check for the magic flag. */ + li v0, 1 + REG_L v1, (0 * SZREG + MCONTEXT_GREGS)(a0) /* zero */ + bne v0, v1, 98f + + REG_S a0, A0OFF(sp) + +/* rt_sigprocmask (SIG_SETMASK, &ucp->uc_sigmask, NULL, _NSIG8) */ + li a3, _NSIG8 + move a2, zero + PTR_ADDU a1, a0, UCONTEXT_SIGMASK + li a0, SIG_SETMASK + + li v0, SYS_ify (rt_sigprocmask) + syscall + bnez a3, 99f + + REG_L v0, A0OFF(sp) + +#ifdef __mips_hard_float +# if _MIPS_SIM == _ABI64 + l.d fs0, (24 * SZREG + MCONTEXT_FPREGS)(v0) + l.d fs1, (25 * SZREG + MCONTEXT_FPREGS)(v0) + l.d fs2, (26 * SZREG + MCONTEXT_FPREGS)(v0) + l.d fs3, (27 * SZREG + MCONTEXT_FPREGS)(v0) + l.d fs4, (28 * SZREG + MCONTEXT_FPREGS)(v0) + l.d fs5, (29 * SZREG + MCONTEXT_FPREGS)(v0) + l.d fs6, (30 * SZREG + MCONTEXT_FPREGS)(v0) + l.d fs7, (31 * SZREG + MCONTEXT_FPREGS)(v0) + +# else /* _MIPS_SIM != _ABI64 */ + l.d fs0, (20 * SZREG + MCONTEXT_FPREGS)(v0) + l.d fs1, (22 * SZREG + MCONTEXT_FPREGS)(v0) + l.d fs2, (24 * SZREG + MCONTEXT_FPREGS)(v0) + l.d fs3, (26 * SZREG + MCONTEXT_FPREGS)(v0) + l.d fs4, (28 * SZREG + MCONTEXT_FPREGS)(v0) + l.d fs5, (30 * SZREG + MCONTEXT_FPREGS)(v0) + +# endif /* _MIPS_SIM != _ABI64 */ + + lw v1, MCONTEXT_FPC_CSR(v0) + ctc1 v1, fcr31 +#endif /* __mips_hard_float */ + + /* Note the contents of argument registers will be random + unless makecontext() has been called. */ + REG_L a0, (4 * SZREG + MCONTEXT_GREGS)(v0) + REG_L a1, (5 * SZREG + MCONTEXT_GREGS)(v0) + REG_L a2, (6 * SZREG + MCONTEXT_GREGS)(v0) + REG_L a3, (7 * SZREG + MCONTEXT_GREGS)(v0) +#if _MIPS_SIM != _ABIO32 + REG_L a4, (8 * SZREG + MCONTEXT_GREGS)(v0) + REG_L a5, (9 * SZREG + MCONTEXT_GREGS)(v0) + REG_L a6, (10 * SZREG + MCONTEXT_GREGS)(v0) + REG_L a7, (11 * SZREG + MCONTEXT_GREGS)(v0) +#endif + + REG_L s0, (16 * SZREG + MCONTEXT_GREGS)(v0) + REG_L s1, (17 * SZREG + MCONTEXT_GREGS)(v0) + REG_L s2, (18 * SZREG + MCONTEXT_GREGS)(v0) + REG_L s3, (19 * SZREG + MCONTEXT_GREGS)(v0) + REG_L s4, (20 * SZREG + MCONTEXT_GREGS)(v0) + REG_L s5, (21 * SZREG + MCONTEXT_GREGS)(v0) + REG_L s6, (22 * SZREG + MCONTEXT_GREGS)(v0) + REG_L s7, (23 * SZREG + MCONTEXT_GREGS)(v0) +#if ! defined (__PIC__) || _MIPS_SIM != _ABIO32 + REG_L gp, (28 * SZREG + MCONTEXT_GREGS)(v0) +#endif + REG_L sp, (29 * SZREG + MCONTEXT_GREGS)(v0) + REG_L fp, (30 * SZREG + MCONTEXT_GREGS)(v0) + REG_L ra, (31 * SZREG + MCONTEXT_GREGS)(v0) + REG_L t9, MCONTEXT_PC(v0) + + move v0, zero + jr t9 + +98: + /* This is a context obtained from a signal handler. + Perform a full restore by pushing the context + passed onto a simulated signal frame on the stack + and call the signal return syscall as if a signal + handler exited normally. */ + PTR_ADDIU sp, -((RT_SIGFRAME_SIZE + ALSZ) & ALMASK) + + /* Only ucontext is referred to from rt_sigreturn, + copy it. */ + PTR_ADDIU t1, sp, RT_SIGFRAME_UCONTEXT + li t3, ((UCONTEXT_SIZE + SZREG - 1) / SZREG) - 1 +0: + REG_L t2, (a0) + PTR_ADDIU a0, SZREG + REG_S t2, (t1) + PTR_ADDIU t1, SZREG + .set noreorder + bgtz t3, 0b + addiu t3, -1 + .set reorder + +/* rt_sigreturn () -- no arguments, sp points to struct rt_sigframe. */ + li v0, SYS_ify (rt_sigreturn) + syscall + + /* Restore the stack and fall through to the error + path. Successful rt_sigreturn never returns to + its calling place. */ + PTR_ADDIU sp, ((RT_SIGFRAME_SIZE + ALSZ) & ALMASK) +99: +#ifdef __PIC__ + PTR_LA t9, JUMPTARGET (__syscall_error) + RESTORE_GP64 + PTR_ADDIU sp, FRAMESZ + jr t9 + +#else /* ! __PIC__ */ + + j JUMPTARGET (__syscall_error) +#endif /* ! __PIC__ */ +PSEUDO_END (__setcontext) + +weak_alias (__setcontext, setcontext) diff --git a/sysdeps/unix/sysv/linux/mips/swapcontext.S b/sysdeps/unix/sysv/linux/mips/swapcontext.S new file mode 100644 index 0000000000..b0b8417c46 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/swapcontext.S @@ -0,0 +1,212 @@ +/* Save and set current context. + Copyright (C) 2009 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Maciej W. Rozycki . + + 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, 51 Franklin Street - Fifth Floor, Boston, MA + 02110-1301, USA. */ + +#include +#include +#include +#include + +#include "ucontext_i.h" + +/* int swapcontext (ucontext_t *oucp, const ucontext_t *ucp) */ + + .text +LOCALSZ = 0 +ARGSZ = 0 +MASK = 0x00000000 +#ifdef __PIC__ +LOCALSZ = 1 /* save gp */ +#endif +#if _MIPS_SIM != _ABIO32 +ARGSZ = 1 /* save a1 */ +# ifdef __PIC__ +MASK = 0x10000000 +# endif +#endif +FRAMESZ = (((ARGSZ + LOCALSZ) * SZREG) + ALSZ) & ALMASK +GPOFF = FRAMESZ - ((ARGSZ + 1) * SZREG) +#if _MIPS_SIM != _ABIO32 +A1OFF = FRAMESZ - (1 * SZREG) /* callee-allocated */ +#else +A1OFF = FRAMESZ + (1 * SZREG) /* caller-allocated */ +#endif + +NESTED (__swapcontext, FRAMESZ, ra) + .mask MASK, -(ARGSZ * SZREG) + .fmask 0x00000000, 0 + +#ifdef __PIC__ + SETUP_GP + + move a2, sp +# define _SP a2 + +# if _MIPS_SIM != _ABIO32 + move a3, gp +# define _GP a3 +# endif + + PTR_ADDIU sp, -FRAMESZ + SETUP_GP64 (GPOFF, __swapcontext) + SAVE_GP (GPOFF) + +#else /* ! __PIC__ */ +# define _SP sp +# define _GP gp + +#endif /* ! __PIC__ */ + +#ifdef PROF + .set noat + move AT, ra + jal _mcount + .set at +#endif + + /* Store a magic flag. */ + li v1, 1 + REG_S v1, (0 * SZREG + MCONTEXT_GREGS)(a0) /* zero */ + + REG_S s0, (16 * SZREG + MCONTEXT_GREGS)(a0) + REG_S s1, (17 * SZREG + MCONTEXT_GREGS)(a0) + REG_S s2, (18 * SZREG + MCONTEXT_GREGS)(a0) + REG_S s3, (19 * SZREG + MCONTEXT_GREGS)(a0) + REG_S s4, (20 * SZREG + MCONTEXT_GREGS)(a0) + REG_S s5, (21 * SZREG + MCONTEXT_GREGS)(a0) + REG_S s6, (22 * SZREG + MCONTEXT_GREGS)(a0) + REG_S s7, (23 * SZREG + MCONTEXT_GREGS)(a0) +#if ! defined (__PIC__) || _MIPS_SIM != _ABIO32 + REG_S _GP, (28 * SZREG + MCONTEXT_GREGS)(a0) +#endif + REG_S _SP, (29 * SZREG + MCONTEXT_GREGS)(a0) + REG_S fp, (30 * SZREG + MCONTEXT_GREGS)(a0) + REG_S ra, (31 * SZREG + MCONTEXT_GREGS)(a0) + REG_S ra, MCONTEXT_PC(a0) + +#ifdef __mips_hard_float +# if _MIPS_SIM == _ABI64 + s.d fs0, (24 * SZREG + MCONTEXT_FPREGS)(a0) + s.d fs1, (25 * SZREG + MCONTEXT_FPREGS)(a0) + s.d fs2, (26 * SZREG + MCONTEXT_FPREGS)(a0) + s.d fs3, (27 * SZREG + MCONTEXT_FPREGS)(a0) + s.d fs4, (28 * SZREG + MCONTEXT_FPREGS)(a0) + s.d fs5, (29 * SZREG + MCONTEXT_FPREGS)(a0) + s.d fs6, (30 * SZREG + MCONTEXT_FPREGS)(a0) + s.d fs7, (31 * SZREG + MCONTEXT_FPREGS)(a0) + +# else /* _MIPS_SIM != _ABI64 */ + s.d fs0, (20 * SZREG + MCONTEXT_FPREGS)(a0) + s.d fs1, (22 * SZREG + MCONTEXT_FPREGS)(a0) + s.d fs2, (24 * SZREG + MCONTEXT_FPREGS)(a0) + s.d fs3, (26 * SZREG + MCONTEXT_FPREGS)(a0) + s.d fs4, (28 * SZREG + MCONTEXT_FPREGS)(a0) + s.d fs5, (30 * SZREG + MCONTEXT_FPREGS)(a0) + +# endif /* _MIPS_SIM != _ABI64 */ + + cfc1 v1, fcr31 + sw v1, MCONTEXT_FPC_CSR(a0) +#endif /* __mips_hard_float */ + + REG_S a1, A1OFF(sp) + +/* rt_sigprocmask (SIG_SETMASK, &ucp->uc_sigmask, &oucp->uc_sigmask, _NSIG8) */ + li a3, _NSIG8 + PTR_ADDU a2, a0, UCONTEXT_SIGMASK + PTR_ADDU a1, a1, UCONTEXT_SIGMASK + li a0, SIG_SETMASK + + li v0, SYS_ify (rt_sigprocmask) + syscall + bnez a3, 99f + + REG_L v0, A1OFF(sp) + +#ifdef __mips_hard_float +# if _MIPS_SIM == _ABI64 + l.d fs0, (24 * SZREG + MCONTEXT_FPREGS)(v0) + l.d fs1, (25 * SZREG + MCONTEXT_FPREGS)(v0) + l.d fs2, (26 * SZREG + MCONTEXT_FPREGS)(v0) + l.d fs3, (27 * SZREG + MCONTEXT_FPREGS)(v0) + l.d fs4, (28 * SZREG + MCONTEXT_FPREGS)(v0) + l.d fs5, (29 * SZREG + MCONTEXT_FPREGS)(v0) + l.d fs6, (30 * SZREG + MCONTEXT_FPREGS)(v0) + l.d fs7, (31 * SZREG + MCONTEXT_FPREGS)(v0) + +# else /* _MIPS_SIM != _ABI64 */ + l.d fs0, (20 * SZREG + MCONTEXT_FPREGS)(v0) + l.d fs1, (22 * SZREG + MCONTEXT_FPREGS)(v0) + l.d fs2, (24 * SZREG + MCONTEXT_FPREGS)(v0) + l.d fs3, (26 * SZREG + MCONTEXT_FPREGS)(v0) + l.d fs4, (28 * SZREG + MCONTEXT_FPREGS)(v0) + l.d fs5, (30 * SZREG + MCONTEXT_FPREGS)(v0) + +# endif /* _MIPS_SIM != _ABI64 */ + + lw v1, MCONTEXT_FPC_CSR(v0) + ctc1 v1, fcr31 +#endif /* __mips_hard_float */ + + /* Note the contents of argument registers will be random + unless makecontext() has been called. */ + REG_L a0, (4 * SZREG + MCONTEXT_GREGS)(v0) + REG_L a1, (5 * SZREG + MCONTEXT_GREGS)(v0) + REG_L a2, (6 * SZREG + MCONTEXT_GREGS)(v0) + REG_L a3, (7 * SZREG + MCONTEXT_GREGS)(v0) +#if _MIPS_SIM != _ABIO32 + REG_L a4, (8 * SZREG + MCONTEXT_GREGS)(v0) + REG_L a5, (9 * SZREG + MCONTEXT_GREGS)(v0) + REG_L a6, (10 * SZREG + MCONTEXT_GREGS)(v0) + REG_L a7, (11 * SZREG + MCONTEXT_GREGS)(v0) +#endif + + REG_L s0, (16 * SZREG + MCONTEXT_GREGS)(v0) + REG_L s1, (17 * SZREG + MCONTEXT_GREGS)(v0) + REG_L s2, (18 * SZREG + MCONTEXT_GREGS)(v0) + REG_L s3, (19 * SZREG + MCONTEXT_GREGS)(v0) + REG_L s4, (20 * SZREG + MCONTEXT_GREGS)(v0) + REG_L s5, (21 * SZREG + MCONTEXT_GREGS)(v0) + REG_L s6, (22 * SZREG + MCONTEXT_GREGS)(v0) + REG_L s7, (23 * SZREG + MCONTEXT_GREGS)(v0) +#if ! defined (__PIC__) || _MIPS_SIM != _ABIO32 + REG_L gp, (28 * SZREG + MCONTEXT_GREGS)(v0) +#endif + REG_L sp, (29 * SZREG + MCONTEXT_GREGS)(v0) + REG_L fp, (30 * SZREG + MCONTEXT_GREGS)(v0) + REG_L ra, (31 * SZREG + MCONTEXT_GREGS)(v0) + REG_L t9, MCONTEXT_PC(v0) + + move v0, zero + jr t9 + +99: +#ifdef __PIC__ + PTR_LA t9, JUMPTARGET (__syscall_error) + RESTORE_GP64 + PTR_ADDIU sp, FRAMESZ + jr t9 + +#else /* ! __PIC__ */ + + j JUMPTARGET (__syscall_error) +#endif /* ! __PIC__ */ +PSEUDO_END (__swapcontext) + +weak_alias (__swapcontext, swapcontext) diff --git a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h index ac496f3d6d..251f0c8106 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 2000, 2003, 2004, 2006 Free Software +/* Copyright (C) 1997, 1998, 2000, 2003, 2004, 2006, 2009 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 @@ -56,12 +56,9 @@ typedef struct fpregset { #if _MIPS_SIM == _ABIO32 /* Earlier versions of glibc for mips had an entirely different definition of mcontext_t, that didn't even resemble the - corresponding kernel data structure. Since all legitimate uses of - ucontext_t in glibc mustn't have accessed anything beyond - uc_mcontext and, even then, taking a pointer to it, casting it to - sigcontext_t, and accessing it as such, which is what it has always - been, this can still be rectified. Fortunately, makecontext, - [gs]etcontext et all have never been implemented. */ + corresponding kernel data structure. Fortunately, makecontext, + [gs]etcontext et all were not implemented back then, so this can + still be rectified. */ typedef struct { unsigned int regmask; diff --git a/sysdeps/unix/sysv/linux/mips/ucontext_i.sym b/sysdeps/unix/sysv/linux/mips/ucontext_i.sym new file mode 100644 index 0000000000..f14b886407 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/ucontext_i.sym @@ -0,0 +1,52 @@ +#include +#include +#include +#include + +#include + +-- Constants used by the rt_sigprocmask call. + +SIG_BLOCK +SIG_SETMASK + +_NSIG8 (_NSIG / 8) + +-- Offsets of the fields in the kernel rt_sigframe_t structure. +#define rt_sigframe(member) offsetof (kernel_rt_sigframe_t, member) + +RT_SIGFRAME_UCONTEXT rt_sigframe (rs_uc) + +RT_SIGFRAME_SIZE sizeof (kernel_rt_sigframe_t) + +-- Offsets of the fields in the ucontext_t structure. +#define ucontext(member) offsetof (ucontext_t, member) +#define stack(member) ucontext (uc_stack.member) +#define mcontext(member) ucontext (uc_mcontext.member) + +UCONTEXT_FLAGS ucontext (uc_flags) +UCONTEXT_LINK ucontext (uc_link) +UCONTEXT_STACK ucontext (uc_stack) +UCONTEXT_MCONTEXT ucontext (uc_mcontext) +UCONTEXT_SIGMASK ucontext (uc_sigmask) + +STACK_SP stack (ss_sp) +STACK_SIZE stack (ss_size) +STACK_FLAGS stack (ss_flags) + +MCONTEXT_GREGS mcontext (gregs) +MCONTEXT_FPREGS mcontext (fpregs) +MCONTEXT_MDHI mcontext (mdhi) +MCONTEXT_HI1 mcontext (hi1) +MCONTEXT_HI2 mcontext (hi2) +MCONTEXT_HI3 mcontext (hi3) +MCONTEXT_MDLO mcontext (mdlo) +MCONTEXT_LO1 mcontext (lo1) +MCONTEXT_LO2 mcontext (lo2) +MCONTEXT_LO3 mcontext (lo3) +MCONTEXT_PC mcontext (pc) +MCONTEXT_FPC_CSR mcontext (fpc_csr) +MCONTEXT_USED_MATH mcontext (used_math) +MCONTEXT_DSP mcontext (dsp) + +UCONTEXT_SIZE sizeof (ucontext_t) From fa34de41160e0a05a465666cb0ed930c9982a15b Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Fri, 24 Apr 2009 02:48:15 +0000 Subject: [PATCH 3853/4487] 2009-04-23 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/sysdep.h [!__ASSEMBLER__]: Include errno.h. --- ChangeLog.hppa | 5 +++++ sysdeps/unix/sysv/linux/hppa/sysdep.h | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index b6730005a1..aebfc575f3 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,8 @@ +2009-04-23 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/sysdep.h [!__ASSEMBLER__]: + Include errno.h. + 2009-02-25 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h: diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.h b/sysdeps/unix/sysv/linux/hppa/sysdep.h index 96632a1c42..e22e5718b4 100644 --- a/sysdeps/unix/sysv/linux/hppa/sysdep.h +++ b/sysdeps/unix/sysv/linux/hppa/sysdep.h @@ -24,6 +24,11 @@ #include #include +/* In order to get __set_errno() definition in INLINE_SYSCALL. */ +#ifndef __ASSEMBLER__ +#include +#endif + #undef ASM_LINE_SEP #define ASM_LINE_SEP ! From 783398d8c28a1686cf2202bf5740158e90ee034f Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Fri, 24 Apr 2009 02:50:30 +0000 Subject: [PATCH 3854/4487] 2009-04-23 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/bits/atomic.h: Do not include sysdep.h. Document the reason for other includes. --- ChangeLog.hppa | 5 +++++ sysdeps/unix/sysv/linux/hppa/bits/atomic.h | 7 +++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index aebfc575f3..e26de63bff 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,8 @@ +2009-04-23 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/bits/atomic.h: Do not include + sysdep.h. Document the reason for other includes. + 2009-04-23 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/sysdep.h [!__ASSEMBLER__]: diff --git a/sysdeps/unix/sysv/linux/hppa/bits/atomic.h b/sysdeps/unix/sysv/linux/hppa/bits/atomic.h index 2964732f41..d7c8b9ddf3 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/atomic.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/atomic.h @@ -17,10 +17,9 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include -#include -#include -#include +#include /* Required for type definitions e.g. uint8_t. */ +#include /* Required for ABORT_INSTRUCTIUON. */ +#include /* Required for __ASSUME_LWS_CAS. */ /* We need EFAULT, ENONSYS */ #if !defined EFAULT && !defined ENOSYS From ec4cafcbcd5304020bb3d938e7f37373d32d3168 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Fri, 24 Apr 2009 02:53:23 +0000 Subject: [PATCH 3855/4487] 2009-04-23 Carlos O'Donell * sysdeps/hppa/dl-machine.h: Remove VALID_ELF_OSABI, VALID_ELF_ABIVERSION, and VALID_ELF_HEADER. --- ChangeLog.hppa | 5 +++++ sysdeps/hppa/dl-machine.h | 7 ------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index e26de63bff..e43ad65712 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,8 @@ +2009-04-23 Carlos O'Donell + + * sysdeps/hppa/dl-machine.h: Remove VALID_ELF_OSABI, + VALID_ELF_ABIVERSION, and VALID_ELF_HEADER. + 2009-04-23 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/bits/atomic.h: Do not include diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h index 503bbcab8c..e462fd3354 100644 --- a/sysdeps/hppa/dl-machine.h +++ b/sysdeps/hppa/dl-machine.h @@ -33,13 +33,6 @@ #include #include -# define VALID_ELF_OSABI(osabi) ((osabi == ELFOSABI_SYSV) || (osabi == ELFOSABI_LINUX)) -# define VALID_ELF_ABIVERSION(ver) (ver == 0) -# define VALID_ELF_HEADER(hdr,exp,size) \ - memcmp (hdr,exp,size-2) == 0 \ - && VALID_ELF_OSABI (hdr[EI_OSABI]) \ - && VALID_ELF_ABIVERSION (hdr[EI_ABIVERSION]) - /* These two definitions must match the definition of the stub in bfd/elf32-hppa.c (see plt_stub[]). From 84c54b39d242e6c8231df015b7b7fb582dcf056e Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Fri, 24 Apr 2009 20:37:17 +0000 Subject: [PATCH 3856/4487] 2009-04-24 Carlos O'Donell * sysdeps/hppa/hppa1.1/s_signbit.c: New file. --- ChangeLog.hppa | 4 ++++ sysdeps/hppa/hppa1.1/s_signbit.c | 35 ++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 sysdeps/hppa/hppa1.1/s_signbit.c diff --git a/ChangeLog.hppa b/ChangeLog.hppa index e43ad65712..60480d1742 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,7 @@ +2009-04-24 Carlos O'Donell + + * sysdeps/hppa/hppa1.1/s_signbit.c: New file. + 2009-04-23 Carlos O'Donell * sysdeps/hppa/dl-machine.h: Remove VALID_ELF_OSABI, diff --git a/sysdeps/hppa/hppa1.1/s_signbit.c b/sysdeps/hppa/hppa1.1/s_signbit.c new file mode 100644 index 0000000000..d9d4f8b13f --- /dev/null +++ b/sysdeps/hppa/hppa1.1/s_signbit.c @@ -0,0 +1,35 @@ +/* Return nonzero value if number is negative. + Copyright (C) 1997, 2009 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1997. + + 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. */ + +#include + +#include "math_private.h" + +int +__signbit (double x) +{ + int32_t hx; + + GET_HIGH_WORD (hx, x); + return hx & 0x80000000; +} +#ifdef NO_LONG_DOUBLE +strong_alias (__signbit, __signbitl) +#endif From ba35741e51b9292eb52617d2382910d26e8a1da3 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sat, 25 Apr 2009 15:23:44 +0000 Subject: [PATCH 3857/4487] 2009-04-25 Aurelien Jarno * sysdeps/arm/eabi/fpu_control.h: If soft-float, don't use floating-point registers. --- ChangeLog.arm | 5 +++++ sysdeps/arm/eabi/fpu_control.h | 15 ++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 779ef2d56f..c9f44f4b8f 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2009-04-25 Aurelien Jarno + + * sysdeps/arm/eabi/fpu_control.h: If soft-float, don't use + floating-point registers. + 2009-04-18 Joseph Myers * sysdeps/unix/sysv/linux/arm/kernel-features.h (__ASSUME_PREADV, diff --git a/sysdeps/arm/eabi/fpu_control.h b/sysdeps/arm/eabi/fpu_control.h index 55d77649c3..9d29994579 100644 --- a/sysdeps/arm/eabi/fpu_control.h +++ b/sysdeps/arm/eabi/fpu_control.h @@ -1,5 +1,5 @@ /* FPU control word definitions. ARM VFP version. - Copyright (C) 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2004, 2005, 2009 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,6 +20,17 @@ #ifndef _FPU_CONTROL_H #define _FPU_CONTROL_H +#if !defined(_LIBC) && defined(__SOFTFP__) + +#define _FPU_RESERVED 0xffffffff +#define _FPU_DEFAULT 0x00000000 +typedef unsigned int fpu_control_t; +#define _FPU_GETCW(cw) 0 +#define _FPU_SETCW(cw) do { } while (0) +extern fpu_control_t __fpu_control; + +#else + /* masking of interrupts */ #define _FPU_MASK_IM 0x00000100 /* invalid operation */ #define _FPU_MASK_ZM 0x00000200 /* divide by zero */ @@ -48,4 +59,6 @@ typedef unsigned int fpu_control_t; /* Default control word set at startup. */ extern fpu_control_t __fpu_control; +#endif /* __SOFTFP__ */ + #endif /* _FPU_CONTROL_H */ From 2b2b217196eecc58505cca0d9cb6f6407d8780b3 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 25 Apr 2009 19:30:25 +0000 Subject: [PATCH 3858/4487] * sysdeps/unix/sysv/linux/m68k/kernel-features.h: Revert last change, the syscalls have been added to 2.6.30-rc4. --- ChangeLog.m68k | 7 ++++++- sysdeps/unix/sysv/linux/m68k/kernel-features.h | 4 +--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index ef7d08d02c..c68e94a631 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2009-04-25 Andreas Schwab + + * sysdeps/unix/sysv/linux/m68k/kernel-features.h: Revert last + change, the syscalls have been added to 2.6.30-rc4. + 2009-04-18 Joseph Myers * sysdeps/unix/sysv/linux/m68k/kernel-features.h (__ASSUME_PREADV, @@ -343,7 +348,7 @@ (catch_segfault): Likewise. (register_dump): Use the Coldfire-specific sigcontext fields to display call-saved data and address registers (rather than the - data stored in sc_fpstate by real_catch_segfault). Display 8-byte + data stored in sc_fpstate by real_catch_segfault). Display 8-byte floating-point registers on Coldfire. * sysdeps/unix/sysv/linux/m68k/socket.S (__socket): Pass a temporary register to SINGLE_THREAD_P. diff --git a/sysdeps/unix/sysv/linux/m68k/kernel-features.h b/sysdeps/unix/sysv/linux/m68k/kernel-features.h index d897562a12..2920943b18 100644 --- a/sysdeps/unix/sysv/linux/m68k/kernel-features.h +++ b/sysdeps/unix/sysv/linux/m68k/kernel-features.h @@ -1,6 +1,6 @@ /* Set flags signalling availability of kernel features based on given kernel version number. - Copyright (C) 2008 Free Software Foundation, Inc. + Copyright (C) 2008, 2009 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 @@ -39,5 +39,3 @@ /* These syscalls are not implemented yet for m68k. */ #undef __ASSUME_PSELECT #undef __ASSUME_PPOLL -#undef __ASSUME_PREADV -#undef __ASSUME_PWRITEV From 19afa982843fdffafb27213d8ca86acb34fcdd94 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 14 May 2009 22:24:35 +0000 Subject: [PATCH 3859/4487] Fix MIPS n64 build failure with preadv64/pwritev64 aliases. * sysdeps/unix/sysv/linux/mips/mips64/n64/preadv64.c, sysdeps/unix/sysv/linux/mips/mips64/n64/pwritev64.c: New files. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/mips64/n64/preadv64.c | 1 + sysdeps/unix/sysv/linux/mips/mips64/n64/pwritev64.c | 1 + 3 files changed, 7 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/preadv64.c create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/pwritev64.c diff --git a/ChangeLog.mips b/ChangeLog.mips index 5887530b28..a4759d91df 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2009-05-14 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/mips64/n64/preadv64.c, + sysdeps/unix/sysv/linux/mips/mips64/n64/pwritev64.c: New files. + 2009-04-18 Maciej W. Rozycki * sysdeps/unix/sysv/linux/mips/getcontext.S: New file. diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/preadv64.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/preadv64.c new file mode 100644 index 0000000000..fd9320cfc7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/preadv64.c @@ -0,0 +1 @@ +/* Empty since the preadv syscall is equivalent. */ diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/pwritev64.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/pwritev64.c new file mode 100644 index 0000000000..8b72a2928b --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/pwritev64.c @@ -0,0 +1 @@ +/* Empty since the pwritev syscall is equivalent. */ From 9c052b7cc1a903d5de8152d4cc9096c8f8f5f0e1 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 16 May 2009 10:36:20 +0200 Subject: [PATCH 3860/4487] Remove .cvsignore files --- .cvsignore | 1 - bare/.cvsignore | 6 ------ sysdeps/mips/.cvsignore | 4 ---- sysdeps/unix/bsd/sun/sunos4/.cvsignore | 4 ---- 4 files changed, 15 deletions(-) delete mode 100644 .cvsignore delete mode 100644 bare/.cvsignore delete mode 100644 sysdeps/mips/.cvsignore delete mode 100644 sysdeps/unix/bsd/sun/sunos4/.cvsignore diff --git a/.cvsignore b/.cvsignore deleted file mode 100644 index 613f66d7a8..0000000000 --- a/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -glibc-ports-*.tar* glibc-port-*.tar* diff --git a/bare/.cvsignore b/bare/.cvsignore deleted file mode 100644 index 3fc9f4cdf1..0000000000 --- a/bare/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/sysdeps/mips/.cvsignore b/sysdeps/mips/.cvsignore deleted file mode 100644 index 1f69fd919a..0000000000 --- a/sysdeps/mips/.cvsignore +++ /dev/null @@ -1,4 +0,0 @@ -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* diff --git a/sysdeps/unix/bsd/sun/sunos4/.cvsignore b/sysdeps/unix/bsd/sun/sunos4/.cvsignore deleted file mode 100644 index 1f69fd919a..0000000000 --- a/sysdeps/unix/bsd/sun/sunos4/.cvsignore +++ /dev/null @@ -1,4 +0,0 @@ -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* From db99b35dde877dfe4882809b802e932f4bd1fd52 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sat, 16 May 2009 14:29:06 +0000 Subject: [PATCH 3861/4487] Add fallocate64 export for ARM. * sysdeps/unix/sysv/linux/arm/Versions (libc): Add fallocate64@@GLIBC_2.11. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/Versions | 3 +++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog.arm b/ChangeLog.arm index c9f44f4b8f..4b304fb824 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2009-05-16 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/Versions (libc): Add + fallocate64@@GLIBC_2.11. + 2009-04-25 Aurelien Jarno * sysdeps/arm/eabi/fpu_control.h: If soft-float, don't use diff --git a/sysdeps/unix/sysv/linux/arm/Versions b/sysdeps/unix/sysv/linux/arm/Versions index 2ddb2af2b7..1d9e964640 100644 --- a/sysdeps/unix/sysv/linux/arm/Versions +++ b/sysdeps/unix/sysv/linux/arm/Versions @@ -34,4 +34,7 @@ libc { GLIBC_2.3.3 { posix_fadvise64; posix_fallocate64; } + GLIBC_2.11 { + fallocate64; + } } From c504ff3be9c3c63b9b772b84d2c517cd4f21881a Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sat, 16 May 2009 14:30:47 +0000 Subject: [PATCH 3862/4487] Add fallocate64 export for MIPS. * sysdeps/unix/sysv/linux/mips/Versions (libc): Add fallocate64@@GLIBC_2.11. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/Versions | 3 +++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog.mips b/ChangeLog.mips index a4759d91df..b951c0bd94 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2009-05-16 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/Versions (libc): Add + fallocate64@@GLIBC_2.11. + 2009-05-14 Joseph Myers * sysdeps/unix/sysv/linux/mips/mips64/n64/preadv64.c, diff --git a/sysdeps/unix/sysv/linux/mips/Versions b/sysdeps/unix/sysv/linux/mips/Versions index 09df42df29..a56322a8eb 100644 --- a/sysdeps/unix/sysv/linux/mips/Versions +++ b/sysdeps/unix/sysv/linux/mips/Versions @@ -34,4 +34,7 @@ libc { # _* _test_and_set; } + GLIBC_2.11 { + fallocate64; + } } From 3066cb224d3614d5859a4fac38675f95738ea713 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sat, 16 May 2009 15:14:44 +0000 Subject: [PATCH 3863/4487] * sysdeps/unix/sysv/linux/m68k/Versions (libc): Add fallocate64@@GLIBC_2.11. --- ChangeLog.m68k | 5 +++++ sysdeps/unix/sysv/linux/m68k/Versions | 3 +++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index c68e94a631..3afc3da05d 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2009-05-16 Joseph Myers + + * sysdeps/unix/sysv/linux/m68k/Versions (libc): Add + fallocate64@@GLIBC_2.11. + 2009-04-25 Andreas Schwab * sysdeps/unix/sysv/linux/m68k/kernel-features.h: Revert last diff --git a/sysdeps/unix/sysv/linux/m68k/Versions b/sysdeps/unix/sysv/linux/m68k/Versions index 0799bf310e..5650f7f77d 100644 --- a/sysdeps/unix/sysv/linux/m68k/Versions +++ b/sysdeps/unix/sysv/linux/m68k/Versions @@ -29,4 +29,7 @@ libc { # v* versionsort64; } + GLIBC_2.11 { + fallocate64; + } } From 9f8832d47f51d4abbbb1e9034f638653c730ec5b Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sat, 16 May 2009 15:19:32 +0000 Subject: [PATCH 3864/4487] Assume preadv and pwritev syscalls on ARM for 2.6.30. * sysdeps/unix/sysv/linux/arm/kernel-features.h (__ASSUME_PREADV, __ASSUME_PWRITEV): Don't undefine. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/kernel-features.h | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 4b304fb824..420c1532ba 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2009-05-16 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/kernel-features.h (__ASSUME_PREADV, + __ASSUME_PWRITEV): Don't undefine. + 2009-05-16 Joseph Myers * sysdeps/unix/sysv/linux/arm/Versions (libc): Add diff --git a/sysdeps/unix/sysv/linux/arm/kernel-features.h b/sysdeps/unix/sysv/linux/arm/kernel-features.h index b33c96865f..ea439d5a06 100644 --- a/sysdeps/unix/sysv/linux/arm/kernel-features.h +++ b/sysdeps/unix/sysv/linux/arm/kernel-features.h @@ -56,5 +56,3 @@ /* These syscalls are not implemented yet for ARM. */ #undef __ASSUME_PSELECT #undef __ASSUME_PPOLL -#undef __ASSUME_PREADV -#undef __ASSUME_PWRITEV From d9056ac6554d3d9635344d77375ae60f13707001 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sat, 16 May 2009 17:42:10 +0000 Subject: [PATCH 3865/4487] fallocate fixes for MIPS n32 and n64. * sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c, sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c, sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate.c, sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate64.c: New. --- ChangeLog.mips | 7 ++++ .../sysv/linux/mips/mips64/n32/fallocate.c | 34 +++++++++++++++++++ .../sysv/linux/mips/mips64/n32/fallocate64.c | 34 +++++++++++++++++++ .../sysv/linux/mips/mips64/n64/fallocate.c | 1 + .../sysv/linux/mips/mips64/n64/fallocate64.c | 1 + 5 files changed, 77 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate.c create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate64.c diff --git a/ChangeLog.mips b/ChangeLog.mips index b951c0bd94..4039c01815 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,10 @@ +2009-05-16 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c, + sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c, + sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate.c, + sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate64.c: New. + 2009-05-16 Joseph Myers * sysdeps/unix/sysv/linux/mips/Versions (libc): Add diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c b/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c new file mode 100644 index 0000000000..f973250ded --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c @@ -0,0 +1,34 @@ +/* Copyright (C) 2007, 2009 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. */ + +#include +#include +#include + + +/* Reserve storage for the data of the file associated with FD. */ +int +fallocate (int fd, int mode, __off_t offset, __off_t len) +{ +#ifdef __NR_fallocate + return INLINE_SYSCALL (fallocate, 4, fd, mode, offset, len); +#else + __set_errno (ENOSYS); + return -1; +#endif +} diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c b/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c new file mode 100644 index 0000000000..1f37f9121a --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c @@ -0,0 +1,34 @@ +/* Copyright (C) 2007, 2009 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. */ + +#include +#include +#include + + +/* Reserve storage for the data of the file associated with FD. */ +int +fallocate64 (int fd, int mode, __off64_t offset, __off64_t len) +{ +#ifdef __NR_fallocate + return INLINE_SYSCALL (fallocate, 4, fd, mode, offset, len); +#else + __set_errno (ENOSYS); + return -1; +#endif +} diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate.c new file mode 100644 index 0000000000..d3b72183ce --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate64.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate64.c new file mode 100644 index 0000000000..fb2b6813a2 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate64.c @@ -0,0 +1 @@ +/* fallocate64 is in fallocate.c */ From ef889ffe8d5cf704a67e084a56a70a4da2f9584e Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sat, 16 May 2009 22:20:23 +0000 Subject: [PATCH 3866/4487] ____longjmp_chk for ARM. * sysdeps/arm/____longjmp_chk.S: New file. * sysdeps/arm/__longjmp.S: If CHECK_SP is defined, use it. * sysdeps/arm/eabi/__longjmp.S: Likewise. --- ChangeLog.arm | 6 ++++ sysdeps/arm/____longjmp_chk.S | 55 +++++++++++++++++++++++++++++++++++ sysdeps/arm/__longjmp.S | 6 +++- sysdeps/arm/eabi/__longjmp.S | 6 +++- 4 files changed, 71 insertions(+), 2 deletions(-) create mode 100644 sysdeps/arm/____longjmp_chk.S diff --git a/ChangeLog.arm b/ChangeLog.arm index 420c1532ba..1088fc02a8 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,9 @@ +2009-05-16 Joseph Myers + + * sysdeps/arm/____longjmp_chk.S: New file. + * sysdeps/arm/__longjmp.S: If CHECK_SP is defined, use it. + * sysdeps/arm/eabi/__longjmp.S: Likewise. + 2009-05-16 Joseph Myers * sysdeps/unix/sysv/linux/arm/kernel-features.h (__ASSUME_PREADV, diff --git a/sysdeps/arm/____longjmp_chk.S b/sysdeps/arm/____longjmp_chk.S new file mode 100644 index 0000000000..9b65c368a0 --- /dev/null +++ b/sysdeps/arm/____longjmp_chk.S @@ -0,0 +1,55 @@ +/* Copyright (C) 2009 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 General Public License + along with GCC; see the file COPYING. If not, write to the Free + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. */ + + + .section .rodata.str1.1,"aMS",%progbits,1 + .type longjmp_msg,%object +longjmp_msg: + .string "longjmp causes uninitialized stack frame" + .size longjmp_msg, .-longjmp_msg + .text + +#define __longjmp ____longjmp_chk + +#ifdef PIC +# define CALL_FAIL \ + ldr sl, .L_GOT; \ +.L_GOT_OFF: \ + add sl, pc, sl; \ + ldr r0, .Lstr; \ + add r0, sl, r0; \ + B PLTJMP(HIDDEN_JUMPTARGET(__fortify_fail)); \ +.L_GOT: \ + .word _GLOBAL_OFFSET_TABLE_-(.L_GOT_OFF+8); \ +.Lstr: \ + .word longjmp_msg(GOTOFF); +#else +# define CALL_FAIL \ + ldr r0, .Lstr; \ + B HIDDEN_JUMPTARGET(__fortify_fail); \ +.Lstr: \ + .word longjmp_msg; +#endif + +#define CHECK_SP(reg) \ + cmp sp, reg; \ + ble .Lok; \ + CALL_FAIL \ +.Lok: + +#include <__longjmp.S> diff --git a/sysdeps/arm/__longjmp.S b/sysdeps/arm/__longjmp.S index 7b30160047..c834e7860b 100644 --- a/sysdeps/arm/__longjmp.S +++ b/sysdeps/arm/__longjmp.S @@ -1,5 +1,5 @@ /* longjmp for ARM. - Copyright (C) 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 2009 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 @@ -29,5 +29,9 @@ ENTRY (__longjmp) movs r0, r1 /* get the return value in place */ moveq r0, #1 /* can't let setjmp() return zero! */ +#ifdef CHECK_SP + ldr r1, [ip, #32] + CHECK_SP (r1) +#endif LOADREGS(ia, ip, {v1-v6, sl, fp, sp, pc}) END (__longjmp) diff --git a/sysdeps/arm/eabi/__longjmp.S b/sysdeps/arm/eabi/__longjmp.S index fff25cd948..1f3f791569 100644 --- a/sysdeps/arm/eabi/__longjmp.S +++ b/sysdeps/arm/eabi/__longjmp.S @@ -1,5 +1,5 @@ /* longjmp for ARM. - Copyright (C) 1997, 1998, 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 2005, 2006, 2009 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 @@ -30,6 +30,10 @@ ENTRY (__longjmp) movs r0, r1 /* get the return value in place */ moveq r0, #1 /* can't let setjmp() return zero! */ +#ifdef CHECK_SP + ldr r1, [ip, #32] + CHECK_SP (r1) +#endif LOADREGS(ia, ip!, {v1-v6, sl, fp, sp, lr}) #ifdef IS_IN_rtld From 6a9f82ac93563fa55cb5aed4cf20fa67352899c9 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sat, 16 May 2009 22:24:56 +0000 Subject: [PATCH 3867/4487] ____longjmp_chk for MIPS. * sysdeps/mips/____longjmp_chk.c: New file. * sysdeps/mips/__longjmp.c: If CHECK_SP is defined, use it. Don't undefine __longjmp. * sysdeps/mips64/__longjmp.c: Likewise. --- ChangeLog.mips | 7 +++++++ sysdeps/mips/____longjmp_chk.c | 22 ++++++++++++++++++++++ sysdeps/mips/__longjmp.c | 9 ++++++--- sysdeps/mips/mips64/__longjmp.c | 9 ++++++--- 4 files changed, 41 insertions(+), 6 deletions(-) create mode 100644 sysdeps/mips/____longjmp_chk.c diff --git a/ChangeLog.mips b/ChangeLog.mips index 4039c01815..9b0b7bddfb 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,10 @@ +2009-05-16 Joseph Myers + + * sysdeps/mips/____longjmp_chk.c: New file. + * sysdeps/mips/__longjmp.c: If CHECK_SP is defined, use it. Don't + undefine __longjmp. + * sysdeps/mips64/__longjmp.c: Likewise. + 2009-05-16 Joseph Myers * sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c, diff --git a/sysdeps/mips/____longjmp_chk.c b/sysdeps/mips/____longjmp_chk.c new file mode 100644 index 0000000000..a46ed150d7 --- /dev/null +++ b/sysdeps/mips/____longjmp_chk.c @@ -0,0 +1,22 @@ +/* Copyright (C) 2009 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. */ + +#include +#define __longjmp ____longjmp_chk +#define CHECK_SP +#include <__longjmp.c> diff --git a/sysdeps/mips/__longjmp.c b/sysdeps/mips/__longjmp.c index 386c05625b..340485de8c 100644 --- a/sysdeps/mips/__longjmp.c +++ b/sysdeps/mips/__longjmp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1995, 1997, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995, 1997, 2000, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -20,8 +20,6 @@ #include #include -#undef __longjmp - #ifndef __GNUC__ #error This file uses GNU C extensions; you must compile with GCC. #endif @@ -36,6 +34,11 @@ __longjmp (env, val_arg) Without this it saves $a1 in a register which gets clobbered along the way. */ register int val asm ("a1"); +#ifdef CHECK_SP + register long sp asm ("$29"); + if ((long) (env[0].__sp) < sp) + __fortify_fail ("longjmp causes uninitialized stack frame"); +#endif #ifdef __mips_hard_float /* Pull back the floating point callee-saved registers. */ diff --git a/sysdeps/mips/mips64/__longjmp.c b/sysdeps/mips/mips64/__longjmp.c index 973b078ae7..d7e36ff686 100644 --- a/sysdeps/mips/mips64/__longjmp.c +++ b/sysdeps/mips/mips64/__longjmp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1995, 1997, 2000, 2003, 2004 +/* Copyright (C) 1992, 1995, 1997, 2000, 2003, 2004, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -22,8 +22,6 @@ #include #include -#undef __longjmp - #ifndef __GNUC__ #error This file uses GNU C extensions; you must compile with GCC. #endif @@ -38,6 +36,11 @@ __longjmp (env, val_arg) Without this it saves $a1 in a register which gets clobbered along the way. */ register int val asm ("a1"); +#ifdef CHECK_SP + register long long sp asm ("$29"); + if ((long long) (env[0].__sp) < sp) + __fortify_fail ("longjmp causes uninitialized stack frame"); +#endif #ifdef __mips_hard_float /* Pull back the floating point callee-saved registers. */ From bf89c0e24509fe4817816c585f96329e3364303c Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 18 May 2009 19:48:54 +0000 Subject: [PATCH 3868/4487] Use unsigned comparison in ARM ____longjmp_chk. * sysdeps/arm/____longjmp_chk.S (CHECK_SP): Use unsigned comparison. --- ChangeLog.arm | 5 +++++ sysdeps/arm/____longjmp_chk.S | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 1088fc02a8..6750958141 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2009-05-18 Joseph Myers + + * sysdeps/arm/____longjmp_chk.S (CHECK_SP): Use unsigned + comparison. + 2009-05-16 Joseph Myers * sysdeps/arm/____longjmp_chk.S: New file. diff --git a/sysdeps/arm/____longjmp_chk.S b/sysdeps/arm/____longjmp_chk.S index 9b65c368a0..16fc4cdebb 100644 --- a/sysdeps/arm/____longjmp_chk.S +++ b/sysdeps/arm/____longjmp_chk.S @@ -48,7 +48,7 @@ longjmp_msg: #define CHECK_SP(reg) \ cmp sp, reg; \ - ble .Lok; \ + bls .Lok; \ CALL_FAIL \ .Lok: From 8200e168efbf54fe08a269fde8fcf986ad5360f0 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 18 Jun 2009 22:04:19 +0000 Subject: [PATCH 3869/4487] Define PF_IEEE802154 and AF_IEEE802154 for MIPS. * sysdeps/unix/sysv/linux/mips/bits/socket.h: Define PF_IEEE802154 and AF_IEEE802154. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/bits/socket.h | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 9b0b7bddfb..fd858bdf78 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2009-06-18 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/socket.h: Define PF_IEEE802154 + and AF_IEEE802154. + 2009-05-16 Joseph Myers * sysdeps/mips/____longjmp_chk.c: New file. diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h index 60db51554b..58a04099d2 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/socket.h +++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h @@ -1,6 +1,6 @@ /* System-specific socket constants and types. Linux/MIPS version. - Copyright (C) 1991, 92, 1994-1999, 2000, 2001, 2004, 2005, 2006, 2007, 2008 - Free Software Foundation, Inc. + Copyright (C) 1991, 92, 1994-1999, 2000, 2001, 2004, 2005, 2006, 2007, 2008, + 2009 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 @@ -108,7 +108,8 @@ enum __socket_type #define PF_RXRPC 33 /* RxRPC sockets. */ #define PF_ISDN 34 /* mISDN sockets. */ #define PF_PHONET 35 /* Phonet sockets. */ -#define PF_MAX 36 /* For now.. */ +#define PF_IEEE802154 36 /* IEEE 802.15.4 sockets. */ +#define PF_MAX 37 /* For now.. */ /* Address families. */ #define AF_UNSPEC PF_UNSPEC @@ -148,6 +149,7 @@ enum __socket_type #define AF_RXRPC PF_RXRPC #define AF_ISDN PF_ISDN #define AF_PHONET PF_PHONET +#define AF_IEEE802154 PF_IEEE802154 #define AF_MAX PF_MAX /* Socket level values. Others are defined in the appropriate headers. From b6dec1881f8d1dba619f6c08fdf50cb70dc1eff4 Mon Sep 17 00:00:00 2001 From: Maxim Kuvyrkov Date: Wed, 24 Jun 2009 15:55:04 +0000 Subject: [PATCH 3870/4487] ARM EABI backtrace using unwind information. 2009-06-24 Maxim Kuvyrkov Mark Mitchell Joseph Myers Kazu Hirata * sysdeps/arm/eabi/backtrace.c: New. * sysdeps/arm/eabi/Makefile (CFLAGS-backtrace.c): Add -funwind-tables. * sysdeps/arm/preconfigure: Add -fno-unwind-tables to CFLAGS. * sysdeps/unix/sysv/linux/arm/eabi/configure.in: Remove -fno-unwind-tables from CFLAGS. * sysdeps/unix/sysv/linux/arm/eabi/configure: Regenerate. * sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h (_Unwind_Trace_Fn): Define. (_Unwind_Backtrace): Declare. --- ChangeLog.arm | 16 +++ sysdeps/arm/eabi/Makefile | 4 + sysdeps/arm/eabi/backtrace.c | 126 ++++++++++++++++++ sysdeps/arm/preconfigure | 4 + sysdeps/unix/sysv/linux/arm/eabi/configure | 1 + sysdeps/unix/sysv/linux/arm/eabi/configure.in | 1 + .../unix/sysv/linux/arm/eabi/nptl/unwind.h | 7 +- 7 files changed, 158 insertions(+), 1 deletion(-) create mode 100644 sysdeps/arm/eabi/backtrace.c diff --git a/ChangeLog.arm b/ChangeLog.arm index 6750958141..dbc00f6f23 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,19 @@ +2009-06-24 Maxim Kuvyrkov + Mark Mitchell + Joseph Myers + Kazu Hirata + + * sysdeps/arm/eabi/backtrace.c: New. + * sysdeps/arm/eabi/Makefile (CFLAGS-backtrace.c): Add + -funwind-tables. + * sysdeps/arm/preconfigure: Add -fno-unwind-tables to CFLAGS. + * sysdeps/unix/sysv/linux/arm/eabi/configure.in: Remove + -fno-unwind-tables from CFLAGS. + * sysdeps/unix/sysv/linux/arm/eabi/configure: Regenerate. + * sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h (_Unwind_Trace_Fn): + Define. + (_Unwind_Backtrace): Declare. + 2009-05-18 Joseph Myers * sysdeps/arm/____longjmp_chk.S (CHECK_SP): Use unsigned diff --git a/sysdeps/arm/eabi/Makefile b/sysdeps/arm/eabi/Makefile index 0f92d7ad42..890d1d9836 100644 --- a/sysdeps/arm/eabi/Makefile +++ b/sysdeps/arm/eabi/Makefile @@ -11,6 +11,10 @@ static-only-routines += $(aeabi_constants) gen-as-const-headers += rtld-global-offsets.sym endif +ifeq ($(subdir),debug) +CFLAGS-backtrace.c += -funwind-tables +endif + ifeq ($(subdir),elf) sysdep_routines += aeabi_unwind_cpp_pr1 find_exidx shared-only-routines += aeabi_unwind_cpp_pr1 diff --git a/sysdeps/arm/eabi/backtrace.c b/sysdeps/arm/eabi/backtrace.c new file mode 100644 index 0000000000..752a435f08 --- /dev/null +++ b/sysdeps/arm/eabi/backtrace.c @@ -0,0 +1,126 @@ +/* Return backtrace of current program state. + Copyright (C) 2008, 2009 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Kazu Hirata , 2008. + + 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. */ + +#include +#include +#include +#include +#include + +struct trace_arg +{ + void **array; + int cnt, size; +}; + +#ifdef SHARED +static _Unwind_Reason_Code (*unwind_backtrace) (_Unwind_Trace_Fn, void *); +static _Unwind_VRS_Result (*unwind_vrs_get) (_Unwind_Context *, + _Unwind_VRS_RegClass, + _uw, + _Unwind_VRS_DataRepresentation, + void *); + +static void *libgcc_handle; + +static void +init (void) +{ + libgcc_handle = __libc_dlopen ("libgcc_s.so.1"); + + if (libgcc_handle == NULL) + return; + + unwind_backtrace = __libc_dlsym (libgcc_handle, "_Unwind_Backtrace"); + unwind_vrs_get = __libc_dlsym (libgcc_handle, "_Unwind_VRS_Get"); + if (unwind_vrs_get == NULL) + unwind_backtrace = NULL; +} + +/* This function is identical to "_Unwind_GetGR", except that it uses + "unwind_vrs_get" instead of "_Unwind_VRS_Get". */ +static inline _Unwind_Word +unwind_getgr (_Unwind_Context *context, int regno) +{ + _uw val; + unwind_vrs_get (context, _UVRSC_CORE, regno, _UVRSD_UINT32, &val); + return val; +} + +/* This macro is identical to the _Unwind_GetIP macro, except that it + uses "unwind_getgr" instead of "_Unwind_GetGR". */ +# define unwind_getip(context) \ + (unwind_getgr (context, 15) & ~(_Unwind_Word)1) +#else +# define unwind_backtrace _Unwind_Backtrace +# define unwind_getip _Unwind_GetIP +#endif + +static _Unwind_Reason_Code +backtrace_helper (struct _Unwind_Context *ctx, void *a) +{ + struct trace_arg *arg = a; + + /* We are first called with address in the __backtrace function. + Skip it. */ + if (arg->cnt != -1) + arg->array[arg->cnt] = (void *) unwind_getip (ctx); + if (++arg->cnt == arg->size) + return _URC_END_OF_STACK; + return _URC_NO_REASON; +} + +int +__backtrace (array, size) + void **array; + int size; +{ + struct trace_arg arg = { .array = array, .size = size, .cnt = -1 }; +#ifdef SHARED + __libc_once_define (static, once); + + __libc_once (once, init); + if (unwind_backtrace == NULL) + return 0; +#endif + + if (size >= 1) + unwind_backtrace (backtrace_helper, &arg); + + if (arg.cnt > 1 && arg.array[arg.cnt - 1] == NULL) + --arg.cnt; + return arg.cnt != -1 ? arg.cnt : 0; +} +weak_alias (__backtrace, backtrace) +libc_hidden_def (__backtrace) + + +#ifdef SHARED +/* Free all resources if necessary. */ +libc_freeres_fn (free_mem) +{ + unwind_backtrace = NULL; + if (libgcc_handle != NULL) + { + __libc_dlclose (libgcc_handle); + libgcc_handle = NULL; + } +} +#endif diff --git a/sysdeps/arm/preconfigure b/sysdeps/arm/preconfigure index 337e84f163..313da79692 100644 --- a/sysdeps/arm/preconfigure +++ b/sysdeps/arm/preconfigure @@ -11,3 +11,7 @@ arm*) esac ;; esac +if [ "${CFLAGS+set}" != "set" ]; then + CFLAGS="-g -O2" +fi +CFLAGS="$CFLAGS -fno-unwind-tables" diff --git a/sysdeps/unix/sysv/linux/arm/eabi/configure b/sysdeps/unix/sysv/linux/arm/eabi/configure index 28fb9ef2de..c7e20cfdc5 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/configure +++ b/sysdeps/unix/sysv/linux/arm/eabi/configure @@ -3,3 +3,4 @@ arch_minimum_kernel=2.6.16 libc_cv_gcc_unwind_find_fde=no +CFLAGS=${CFLAGS% -fno-unwind-tables} diff --git a/sysdeps/unix/sysv/linux/arm/eabi/configure.in b/sysdeps/unix/sysv/linux/arm/eabi/configure.in index d1fb7f4224..cc0e9b5bd3 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/configure.in +++ b/sysdeps/unix/sysv/linux/arm/eabi/configure.in @@ -3,3 +3,4 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. arch_minimum_kernel=2.6.16 libc_cv_gcc_unwind_find_fde=no +CFLAGS=${CFLAGS% -fno-unwind-tables} diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h index d625fb288c..eeb9cf8b62 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h +++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h @@ -1,5 +1,5 @@ /* Header file for the ARM EABI unwinder - Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2003, 2004, 2005, 2009 Free Software Foundation, Inc. Contributed by Paul Brook This file is free software; you can redistribute it and/or modify it @@ -267,6 +267,11 @@ extern "C" { #define _Unwind_SetIP(context, val) \ _Unwind_SetGR (context, 15, val | (_Unwind_GetGR (context, 15) & 1)) +typedef _Unwind_Reason_Code (*_Unwind_Trace_Fn) + (struct _Unwind_Context *, void *); + +extern _Unwind_Reason_Code _Unwind_Backtrace (_Unwind_Trace_Fn, void *); + #ifdef __cplusplus } /* extern "C" */ #endif From 5a6ba634c66e64aab5b070403d23fb22ab2bf6d9 Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Thu, 25 Jun 2009 13:27:59 +0000 Subject: [PATCH 3871/4487] Add missing CLIBABI variables __aeabi_stdin, __aeabi_stdout, __aeabi_stderr. * sysdeps/arm/eabi/aeabi_lcsts.c (__aeabi_stdin, __aeabi_stdout, __aeabi_stderr): New variables. (setup_aeabi_stdio): New function. Add it to .preinit_array. --- ChangeLog.arm | 6 ++++++ sysdeps/arm/eabi/aeabi_lcsts.c | 15 +++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/ChangeLog.arm b/ChangeLog.arm index dbc00f6f23..ebc4e30754 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,9 @@ +2009-06-25 Nathan Froyd + + * sysdeps/arm/eabi/aeabi_lcsts.c (__aeabi_stdin, __aeabi_stdout, + __aeabi_stderr): New variables. + (setup_aeabi_stdio): New function. Add it to .preinit_array. + 2009-06-24 Maxim Kuvyrkov Mark Mitchell Joseph Myers diff --git a/sysdeps/arm/eabi/aeabi_lcsts.c b/sysdeps/arm/eabi/aeabi_lcsts.c index 99c79851ee..0c620d4fef 100644 --- a/sysdeps/arm/eabi/aeabi_lcsts.c +++ b/sysdeps/arm/eabi/aeabi_lcsts.c @@ -81,4 +81,19 @@ eabi_constant (TMP_MAX); eabi_constant (FILENAME_MAX); eabi_constant (L_tmpnam); +FILE *__aeabi_stdin attribute_hidden; +FILE *__aeabi_stdout attribute_hidden; +FILE *__aeabi_stderr attribute_hidden; + +static void __attribute__ ((used)) +setup_aeabi_stdio (void) +{ + __aeabi_stdin = stdin; + __aeabi_stdout = stdout; + __aeabi_stderr = stderr; +} + +static void (*fp) (void) __attribute__ ((used, section (".preinit_array"))) + = setup_aeabi_stdio; + eabi_constant (CLOCKS_PER_SEC); From f40617927c9aee865a56af32f38354ea99b63b36 Mon Sep 17 00:00:00 2001 From: Paul Brook Date: Tue, 30 Jun 2009 20:10:14 +0000 Subject: [PATCH 3872/4487] Avoid invalid unwind directives when building crti.o and crtn.o for ARM EABI. * sysdeps/arm/eabi/Makefile (CFLAGS-initfini.s): Add -fno-asynchronous-unwind-tables -fno-unwind-tables. (CFLAGS-pt-initfini.s): Ditto. --- ChangeLog.arm | 6 ++++++ sysdeps/arm/eabi/Makefile | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/ChangeLog.arm b/ChangeLog.arm index ebc4e30754..47aa61d3f3 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,9 @@ +2009-06-30 Paul Brook + + * sysdeps/arm/eabi/Makefile (CFLAGS-initfini.s): Add + -fno-asynchronous-unwind-tables -fno-unwind-tables. + (CFLAGS-pt-initfini.s): Ditto. + 2009-06-25 Nathan Froyd * sysdeps/arm/eabi/aeabi_lcsts.c (__aeabi_stdin, __aeabi_stdout, diff --git a/sysdeps/arm/eabi/Makefile b/sysdeps/arm/eabi/Makefile index 890d1d9836..05aede6f3e 100644 --- a/sysdeps/arm/eabi/Makefile +++ b/sysdeps/arm/eabi/Makefile @@ -3,6 +3,7 @@ aeabi_constants = aeabi_lcsts aeabi_sighandlers aeabi_math aeabi_routines = aeabi_assert aeabi_localeconv aeabi_errno_addr \ aeabi_mb_cur_max aeabi_atexit aeabi_memclr aeabi_memcpy \ aeabi_memmove aeabi_memset +CFLAGS-initfini.s += -fno-asynchronous-unwind-tables -fno-unwind-tables sysdep_routines += $(aeabi_constants) $(aeabi_routines) static-only-routines += $(aeabi_constants) @@ -24,3 +25,7 @@ endif ifeq ($(subdir),math) $(objpfx)libm.so: $(elfobjdir)/ld.so endif + +ifeq ($(subdir),nptl) +CFLAGS-pt-initfini.s += -fno-asynchronous-unwind-tables -fno-unwind-tables +endif From cda50f828eda9ba114bea5e5a58afbde665760ea Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 17 Jul 2009 20:39:04 +0000 Subject: [PATCH 3873/4487] Update MIPS dl-lookup.c for changes to generic version. * sysdeps/mips/do-lookup.h: Remove. * sysdeps/mips/dl-lookup.c: Update from generic version, with non-PIC handling integrated. --- ChangeLog.mips | 6 + sysdeps/mips/dl-lookup.c | 411 +++++++++++++++++++++++++++++++++++++-- sysdeps/mips/do-lookup.h | 37 ---- 3 files changed, 402 insertions(+), 52 deletions(-) delete mode 100644 sysdeps/mips/do-lookup.h diff --git a/ChangeLog.mips b/ChangeLog.mips index fd858bdf78..925e5e659b 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,9 @@ +2009-07-17 Joseph Myers + + * sysdeps/mips/do-lookup.h: Remove. + * sysdeps/mips/dl-lookup.c: Update from generic version, with + non-PIC handling integrated. + 2009-06-18 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/socket.h: Define PF_IEEE802154 diff --git a/sysdeps/mips/dl-lookup.c b/sysdeps/mips/dl-lookup.c index 015c153d18..b7516dab1a 100644 --- a/sysdeps/mips/dl-lookup.c +++ b/sysdeps/mips/dl-lookup.c @@ -1,9 +1,6 @@ /* Look up a symbol in the loaded objects. - MIPS/Linux version - this is identical to the common version, but - because it is in sysdeps/mips, it gets sysdeps/mips/do-lookup.h. - Using instead of "do-lookup.h" would work too. - - Copyright (C) 1995-2005, 2006, 2007 Free Software Foundation, Inc. + MIPS/Linux version - special handling of non-PIC undefined symbol rules. + Copyright (C) 1995-2005, 2006, 2007, 2009 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 @@ -73,8 +70,387 @@ struct sym_val #endif -/* The actual lookup code. */ -#include "do-lookup.h" +/* Inner part of the lookup functions. We return a value > 0 if we + found the symbol, the value 0 if nothing is found and < 0 if + something bad happened. */ +static int +__attribute_noinline__ +do_lookup_x (const char *undef_name, uint_fast32_t new_hash, + unsigned long int *old_hash, const ElfW(Sym) *ref, + struct sym_val *result, struct r_scope_elem *scope, size_t i, + const struct r_found_version *const version, int flags, + struct link_map *skip, int type_class, struct link_map *undef_map) +{ + size_t n = scope->r_nlist; + /* Make sure we read the value before proceeding. Otherwise we + might use r_list pointing to the initial scope and r_nlist being + the value after a resize. That is the only path in dl-open.c not + protected by GSCOPE. A read barrier here might be to expensive. */ + __asm volatile ("" : "+r" (n), "+m" (scope->r_list)); + struct link_map **list = scope->r_list; + + do + { + /* These variables are used in the nested function. */ + Elf_Symndx symidx; + int num_versions = 0; + const ElfW(Sym) *versioned_sym = NULL; + + const struct link_map *map = list[i]->l_real; + + /* Here come the extra test needed for `_dl_lookup_symbol_skip'. */ + if (map == skip) + continue; + + /* Don't search the executable when resolving a copy reloc. */ + if ((type_class & ELF_RTYPE_CLASS_COPY) && map->l_type == lt_executable) + continue; + + /* Do not look into objects which are going to be removed. */ + if (map->l_removed) + continue; + + /* Print some debugging info if wanted. */ + if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SYMBOLS, 0)) + _dl_debug_printf ("symbol=%s; lookup in file=%s [%lu]\n", + undef_name, + map->l_name[0] ? map->l_name : rtld_progname, + map->l_ns); + + /* If the hash table is empty there is nothing to do here. */ + if (map->l_nbuckets == 0) + continue; + + /* The tables for this map. */ + const ElfW(Sym) *symtab = (const void *) D_PTR (map, l_info[DT_SYMTAB]); + const char *strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]); + + + /* Nested routine to check whether the symbol matches. */ + const ElfW(Sym) * + __attribute_noinline__ + check_match (const ElfW(Sym) *sym) + { + unsigned int stt = ELFW(ST_TYPE) (sym->st_info); + assert (ELF_RTYPE_CLASS_PLT == 1); + /* The semantics of zero/non-zero values of undefined symbols + differs depending on whether the non-PIC ABI is in use. + Under the non-PIC ABI, a non-zero value indicates that + there is an address reference to the symbol and thus it + must always be resolved (except when resolving a jump slot + relocation) to the PLT entry whose address is provided as + the symbol's value; a zero value indicates that this + canonical-address behaviour is not required. Yet under the + classic MIPS psABI, a zero value indicates that there is an + address reference to the function and the dynamic linker + must resolve the symbol immediately upon loading. To avoid + conflict, symbols for which the dynamic linker must assume + the non-PIC ABI semantics are marked with the STO_MIPS_PLT + flag. */ + if (__builtin_expect ((sym->st_value == 0 /* No value. */ + && stt != STT_TLS) + || (sym->st_shndx == SHN_UNDEF + && !(sym->st_other & STO_MIPS_PLT)) + || (type_class & (sym->st_shndx == SHN_UNDEF)), + 0)) + return NULL; + + /* Ignore all but STT_NOTYPE, STT_OBJECT, STT_FUNC, + STT_COMMON, STT_TLS, and STT_GNU_IFUNC since these are no + code/data definitions. */ +#define ALLOWED_STT \ + ((1 << STT_NOTYPE) | (1 << STT_OBJECT) | (1 << STT_FUNC) \ + | (1 << STT_COMMON) | (1 << STT_TLS) | (1 << STT_GNU_IFUNC)) + if (__builtin_expect (((1 << stt) & ALLOWED_STT) == 0, 0)) + return NULL; + + if (sym != ref && strcmp (strtab + sym->st_name, undef_name)) + /* Not the symbol we are looking for. */ + return NULL; + + const ElfW(Half) *verstab = map->l_versyms; + if (version != NULL) + { + if (__builtin_expect (verstab == NULL, 0)) + { + /* We need a versioned symbol but haven't found any. If + this is the object which is referenced in the verneed + entry it is a bug in the library since a symbol must + not simply disappear. + + It would also be a bug in the object since it means that + the list of required versions is incomplete and so the + tests in dl-version.c haven't found a problem.*/ + assert (version->filename == NULL + || ! _dl_name_match_p (version->filename, map)); + + /* Otherwise we accept the symbol. */ + } + else + { + /* We can match the version information or use the + default one if it is not hidden. */ + ElfW(Half) ndx = verstab[symidx] & 0x7fff; + if ((map->l_versions[ndx].hash != version->hash + || strcmp (map->l_versions[ndx].name, version->name)) + && (version->hidden || map->l_versions[ndx].hash + || (verstab[symidx] & 0x8000))) + /* It's not the version we want. */ + return NULL; + } + } + else + { + /* No specific version is selected. There are two ways we + can got here: + + - a binary which does not include versioning information + is loaded + + - dlsym() instead of dlvsym() is used to get a symbol which + might exist in more than one form + + If the library does not provide symbol version information + there is no problem at at: we simply use the symbol if it + is defined. + + These two lookups need to be handled differently if the + library defines versions. In the case of the old + unversioned application the oldest (default) version + should be used. In case of a dlsym() call the latest and + public interface should be returned. */ + if (verstab != NULL) + { + if ((verstab[symidx] & 0x7fff) + >= ((flags & DL_LOOKUP_RETURN_NEWEST) ? 2 : 3)) + { + /* Don't accept hidden symbols. */ + if ((verstab[symidx] & 0x8000) == 0 + && num_versions++ == 0) + /* No version so far. */ + versioned_sym = sym; + + return NULL; + } + } + } + + /* There cannot be another entry for this symbol so stop here. */ + return sym; + } + + const ElfW(Sym) *sym; + const ElfW(Addr) *bitmask = map->l_gnu_bitmask; + if (__builtin_expect (bitmask != NULL, 1)) + { + ElfW(Addr) bitmask_word + = bitmask[(new_hash / __ELF_NATIVE_CLASS) + & map->l_gnu_bitmask_idxbits]; + + unsigned int hashbit1 = new_hash & (__ELF_NATIVE_CLASS - 1); + unsigned int hashbit2 = ((new_hash >> map->l_gnu_shift) + & (__ELF_NATIVE_CLASS - 1)); + + if (__builtin_expect ((bitmask_word >> hashbit1) + & (bitmask_word >> hashbit2) & 1, 0)) + { + Elf32_Word bucket = map->l_gnu_buckets[new_hash + % map->l_nbuckets]; + if (bucket != 0) + { + const Elf32_Word *hasharr = &map->l_gnu_chain_zero[bucket]; + + do + if (((*hasharr ^ new_hash) >> 1) == 0) + { + symidx = hasharr - map->l_gnu_chain_zero; + sym = check_match (&symtab[symidx]); + if (sym != NULL) + goto found_it; + } + while ((*hasharr++ & 1u) == 0); + } + } + /* No symbol found. */ + symidx = SHN_UNDEF; + } + else + { + if (*old_hash == 0xffffffff) + *old_hash = _dl_elf_hash (undef_name); + + /* Use the old SysV-style hash table. Search the appropriate + hash bucket in this object's symbol table for a definition + for the same symbol name. */ + for (symidx = map->l_buckets[*old_hash % map->l_nbuckets]; + symidx != STN_UNDEF; + symidx = map->l_chain[symidx]) + { + sym = check_match (&symtab[symidx]); + if (sym != NULL) + goto found_it; + } + } + + /* If we have seen exactly one versioned symbol while we are + looking for an unversioned symbol and the version is not the + default version we still accept this symbol since there are + no possible ambiguities. */ + sym = num_versions == 1 ? versioned_sym : NULL; + + if (sym != NULL) + { + found_it: + switch (__builtin_expect (ELFW(ST_BIND) (sym->st_info), STB_GLOBAL)) + { + case STB_WEAK: + /* Weak definition. Use this value if we don't find another. */ + if (__builtin_expect (GLRO(dl_dynamic_weak), 0)) + { + if (! result->s) + { + result->s = sym; + result->m = (struct link_map *) map; + } + break; + } + /* FALLTHROUGH */ + case STB_GLOBAL: + success: + /* Global definition. Just what we need. */ + result->s = sym; + result->m = (struct link_map *) map; + return 1; + + case STB_GNU_UNIQUE:; + /* We have to determine whether we already found a + symbol with this name before. If not then we have to + add it to the search table. If we already found a + definition we have to use it. */ + void enter (struct unique_sym *table, size_t size, + unsigned int hash, const char *name, + const ElfW(Sym) *sym, const struct link_map *map) + { + size_t idx = hash % size; + size_t hash2 = 1 + hash % (size - 2); + while (1) + { + if (table[idx].hashval == 0) + { + table[idx].hashval = hash; + table[idx].name = strtab + sym->st_name; + if ((type_class & ELF_RTYPE_CLASS_COPY) != 0) + { + table[idx].sym = ref; + table[idx].map = undef_map; + } + else + { + table[idx].sym = sym; + table[idx].map = map; + } + return; + } + + idx += hash2; + if (idx >= size) + idx -= size; + } + } + + struct unique_sym_table *tab + = &GL(dl_ns)[map->l_ns]._ns_unique_sym_table; + + __rtld_lock_lock_recursive (tab->lock); + + struct unique_sym *entries = tab->entries; + size_t size = tab->size; + if (entries != NULL) + { + size_t idx = new_hash % size; + size_t hash2 = 1 + new_hash % (size - 2); + while (1) + { + if (entries[idx].hashval == new_hash + && strcmp (entries[idx].name, undef_name) == 0) + { + result->s = entries[idx].sym; + result->m = (struct link_map *) entries[idx].map; + __rtld_lock_unlock_recursive (tab->lock); + return 1; + } + + if (entries[idx].hashval == 0 + && entries[idx].name == NULL) + break; + + idx += hash2; + if (idx >= size) + idx -= size; + } + + if (size * 3 <= tab->n_elements) + { + /* Expand the table. */ + size_t newsize = _dl_higher_prime_number (size); + struct unique_sym *newentries + = calloc (sizeof (struct unique_sym), newsize); + if (newentries == NULL) + { + nomem: + __rtld_lock_unlock_recursive (tab->lock); + _dl_fatal_printf ("out of memory\n"); + } + + for (idx = 0; idx < size; ++idx) + if (entries[idx].hashval != 0) + enter (newentries, newsize, entries[idx].hashval, + entries[idx].name, entries[idx].sym, + entries[idx].map); + + tab->free (entries); + tab->size = newsize; + entries = tab->entries = newentries; + tab->free = free; + } + } + else + { +#define INITIAL_NUNIQUE_SYM_TABLE 31 + size = INITIAL_NUNIQUE_SYM_TABLE; + entries = calloc (sizeof (struct unique_sym), size); + if (entries == NULL) + goto nomem; + + tab->entries = entries; + tab->size = size; + tab->free = free; + } + + enter (entries, size, new_hash, strtab + sym->st_name, sym, map); + ++tab->n_elements; + + __rtld_lock_unlock_recursive (tab->lock); + + goto success; + + default: + /* Local symbols are ignored. */ + break; + } + } + + /* If this current map is the one mentioned in the verneed entry + and we have not found a weak entry, it is a bug. */ + if (symidx == STN_UNDEF && version != NULL && version->filename != NULL + && __builtin_expect (_dl_name_match_p (version->filename, map), 0)) + return -1; + } + while (++i < n); + + /* We have not found anything until now. */ + return 0; +} static uint_fast32_t @@ -341,7 +717,7 @@ _dl_lookup_symbol_x (const char *undef_name, struct link_map *undef_map, { int res = do_lookup_x (undef_name, new_hash, &old_hash, *ref, ¤t_value, *scope, start, version, flags, - skip_map, type_class); + skip_map, type_class, undef_map); if (res > 0) break; @@ -414,7 +790,7 @@ _dl_lookup_symbol_x (const char *undef_name, struct link_map *undef_map, for (scope = symbol_scope; *scope != NULL; i = 0, ++scope) if (do_lookup_x (undef_name, new_hash, &old_hash, *ref, &protected_value, *scope, i, version, flags, - skip_map, ELF_RTYPE_CLASS_PLT) != 0) + skip_map, ELF_RTYPE_CLASS_PLT, NULL) != 0) break; if (protected_value.s != NULL && protected_value.m != undef_map) @@ -540,21 +916,26 @@ _dl_debug_bindings (const char *undef_name, struct link_map *undef_map, do_lookup_x (undef_name, new_hash, &old_hash, *ref, &val, undef_map->l_local_scope[0], 0, version, 0, NULL, - type_class); + type_class, undef_map); if (val.s != value->s || val.m != value->m) conflict = 1; } - if (value->s - && (__builtin_expect (ELFW(ST_TYPE) (value->s->st_info) - == STT_TLS, 0))) - type_class = 4; + if (value->s) + { + if (__builtin_expect (ELFW(ST_TYPE) (value->s->st_info) + == STT_TLS, 0)) + type_class = 4; + else if (__builtin_expect (ELFW(ST_TYPE) (value->s->st_info) + == STT_GNU_IFUNC, 0)) + type_class |= 8; + } if (conflict || GLRO(dl_trace_prelink_map) == undef_map || GLRO(dl_trace_prelink_map) == NULL - || type_class == 4) + || type_class >= 4) { _dl_printf ("%s 0x%0*Zx 0x%0*Zx -> 0x%0*Zx 0x%0*Zx ", conflict ? "conflict" : "lookup", diff --git a/sysdeps/mips/do-lookup.h b/sysdeps/mips/do-lookup.h deleted file mode 100644 index 0d92620ff7..0000000000 --- a/sysdeps/mips/do-lookup.h +++ /dev/null @@ -1,37 +0,0 @@ -/* MIPS-specific veneer to GLIBC's do-lookup.h. - Copyright (C) 2008 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. */ - -/* The semantics of zero/non-zero values of undefined symbols differs - depending on whether the non-PIC ABI is in use. Under the non-PIC ABI, - a non-zero value indicates that there is an address reference to the - symbol and thus it must always be resolved (except when resolving a jump - slot relocation) to the PLT entry whose address is provided as the - symbol's value; a zero value indicates that this canonical-address - behaviour is not required. Yet under the classic MIPS psABI, a zero value - indicates that there is an address reference to the function and the - dynamic linker must resolve the symbol immediately upon loading. To - avoid conflict, symbols for which the dynamic linker must assume the - non-PIC ABI semantics are marked with the STO_MIPS_PLT flag. The - following ugly hack causes the code in the platform-independent - do-lookup.h file to check this flag correctly. */ -#define st_value st_shndx == SHN_UNDEF && !(sym->st_other & STO_MIPS_PLT)) \ - || (sym->st_value -#include_next "do-lookup.h" -#undef st_value - From c1592c256a9fa5039737a27ecbac537736f0b2b1 Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Mon, 13 Jul 2009 23:52:54 +0200 Subject: [PATCH 3874/4487] Adapt alpha version of getsysstats.c to the changes in the main Linux version * sysdeps/unix/sysv/linux/alpha/getsysstats.c (GET_NPROCS_PARSER): Change parameters and use next_line. --- ChangeLog.alpha | 6 ++++++ sysdeps/unix/sysv/linux/alpha/getsysstats.c | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 6bb3b7c3ed..cc7e059f1e 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,9 @@ +2009-07-13 Aurelien Jarno + + [BZ #10158] + * sysdeps/unix/sysv/linux/alpha/getsysstats.c (GET_NPROCS_PARSER): + Change parameters and use next_line. + 2008-11-26 Roland McGrath * sysdeps/unix/sysv/linux/alpha/wordexp.c: Contents moved to main diff --git a/sysdeps/unix/sysv/linux/alpha/getsysstats.c b/sysdeps/unix/sysv/linux/alpha/getsysstats.c index 0e49a84526..f667437b21 100644 --- a/sysdeps/unix/sysv/linux/alpha/getsysstats.c +++ b/sysdeps/unix/sysv/linux/alpha/getsysstats.c @@ -20,15 +20,16 @@ /* We need to define a special parser for /proc/cpuinfo. */ -#define GET_NPROCS_PARSER(FP, BUFFER, RESULT) \ +#define GET_NPROCS_PARSER(FD, BUFFER, CP, RE, BUFFER_END, RESULT) \ do \ { \ /* Find the line that contains the information about the number of \ active cpus. We don't have to fear extremely long lines since \ the kernel will not generate them. 8192 bytes are really enough. \ If there is no "CPUs ..." line then we are on a UP system. */ \ + char *l; \ (RESULT) = 1; \ - while (fgets_unlocked (BUFFER, sizeof (BUFFER), FP) != NULL) \ + while ((l = next_line (FD, BUFFER, &CP, &RE, BUFFER_END)) != NULL) \ if ((sscanf (BUFFER, "cpus active : %d", &(RESULT)) == 1) \ || (sscanf (BUFFER, "CPUs probed %*d active %d", \ &(RESULT)) == 1)) \ From 8cb716ea2c79bf98bef150961c999622fd83e208 Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Mon, 13 Jul 2009 23:57:18 +0200 Subject: [PATCH 3875/4487] * sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h: Define FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY. --- ChangeLog.alpha | 5 +++++ sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index cc7e059f1e..d2cedc55d2 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -4,6 +4,11 @@ * sysdeps/unix/sysv/linux/alpha/getsysstats.c (GET_NPROCS_PARSER): Change parameters and use next_line. + [BZ #10160] + * sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h: Define + FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and + FUTEX_BITSET_MATCH_ANY. + 2008-11-26 Roland McGrath * sysdeps/unix/sysv/linux/alpha/wordexp.c: Contents moved to main diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h index 93188234cb..7903745c22 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h @@ -37,7 +37,12 @@ #define FUTEX_LOCK_PI 6 #define FUTEX_UNLOCK_PI 7 #define FUTEX_TRYLOCK_PI 8 +#define FUTEX_WAIT_BITSET 9 +#define FUTEX_WAKE_BITSET 10 #define FUTEX_PRIVATE_FLAG 128 +#define FUTEX_CLOCK_REALTIME 256 + +#define FUTEX_BITSET_MATCH_ANY 0xffffffff /* Values for 'private' parameter of locking macros. Yes, the definition seems to be backwards. But it is not. The bit will be From 97d1e7c8e13eda1d57cb935cb20f91262c0db1ed Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Mon, 13 Jul 2009 23:59:25 +0200 Subject: [PATCH 3876/4487] Update include paths following the move of alpha to ports * sysdeps/unix/sysv/linux/alpha/getdents64.c: Adjust include path. * sysdeps/unix/sysv/linux/alpha/nptl/fork.c: Likewise. * sysdeps/unix/sysv/linux/alpha/nptl/sem_post.c: Likewise. * sysdeps/unix/sysv/linux/alpha/nptl/timer_create.c: Likewise. * sysdeps/unix/sysv/linux/alpha/nptl/timer_delete.c: Likewise. * sysdeps/unix/sysv/linux/alpha/nptl/timer_getoverr.c: Likewise. * sysdeps/unix/sysv/linux/alpha/nptl/timer_gettime.c: Likewise. * sysdeps/unix/sysv/linux/alpha/nptl/timer_settime.c: Likewise. * sysdeps/unix/sysv/linux/alpha/sysconf.c: Likewise. --- ChangeLog.alpha | 11 +++++++++++ sysdeps/unix/sysv/linux/alpha/getdents64.c | 2 +- sysdeps/unix/sysv/linux/alpha/nptl/fork.c | 2 +- sysdeps/unix/sysv/linux/alpha/nptl/sem_post.c | 2 +- sysdeps/unix/sysv/linux/alpha/nptl/timer_create.c | 2 +- sysdeps/unix/sysv/linux/alpha/nptl/timer_delete.c | 2 +- sysdeps/unix/sysv/linux/alpha/nptl/timer_getoverr.c | 2 +- sysdeps/unix/sysv/linux/alpha/nptl/timer_gettime.c | 2 +- sysdeps/unix/sysv/linux/alpha/nptl/timer_settime.c | 2 +- sysdeps/unix/sysv/linux/alpha/sysconf.c | 2 +- 10 files changed, 20 insertions(+), 9 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index d2cedc55d2..4737a1af9d 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -9,6 +9,17 @@ FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY. + [BZ #10161] + * sysdeps/unix/sysv/linux/alpha/getdents64.c: Adjust include path. + * sysdeps/unix/sysv/linux/alpha/nptl/fork.c: Likewise. + * sysdeps/unix/sysv/linux/alpha/nptl/sem_post.c: Likewise. + * sysdeps/unix/sysv/linux/alpha/nptl/timer_create.c: Likewise. + * sysdeps/unix/sysv/linux/alpha/nptl/timer_delete.c: Likewise. + * sysdeps/unix/sysv/linux/alpha/nptl/timer_getoverr.c: Likewise. + * sysdeps/unix/sysv/linux/alpha/nptl/timer_gettime.c: Likewise. + * sysdeps/unix/sysv/linux/alpha/nptl/timer_settime.c: Likewise. + * sysdeps/unix/sysv/linux/alpha/sysconf.c: Likewise. + 2008-11-26 Roland McGrath * sysdeps/unix/sysv/linux/alpha/wordexp.c: Contents moved to main diff --git a/sysdeps/unix/sysv/linux/alpha/getdents64.c b/sysdeps/unix/sysv/linux/alpha/getdents64.c index e53570c036..50f1368b74 100644 --- a/sysdeps/unix/sysv/linux/alpha/getdents64.c +++ b/sysdeps/unix/sysv/linux/alpha/getdents64.c @@ -1 +1 @@ -#include "../getdents64.c" +#include diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/fork.c b/sysdeps/unix/sysv/linux/alpha/nptl/fork.c index ca85fc008f..8cc99a2145 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/fork.c +++ b/sysdeps/unix/sysv/linux/alpha/nptl/fork.c @@ -27,4 +27,4 @@ CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID | SIGCHLD, \ NULL, NULL, &THREAD_SELF->tid, NULL) -#include "../fork.c" +#include diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/sem_post.c b/sysdeps/unix/sysv/linux/alpha/nptl/sem_post.c index 27fd817e65..befa49723b 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/sem_post.c +++ b/sysdeps/unix/sysv/linux/alpha/nptl/sem_post.c @@ -2,4 +2,4 @@ the acquire/release semantics of atomic_exchange_and_add. And even if we don't do this, we should be using atomic_full_barrier or otherwise. */ #define __lll_rel_instr "mb" -#include "../sem_post.c" +#include diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/timer_create.c b/sysdeps/unix/sysv/linux/alpha/nptl/timer_create.c index 172223af3f..1ac4c6a6b0 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/timer_create.c +++ b/sysdeps/unix/sysv/linux/alpha/nptl/timer_create.c @@ -1 +1 @@ -#include "../x86_64/timer_create.c" +#include diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/timer_delete.c b/sysdeps/unix/sysv/linux/alpha/nptl/timer_delete.c index 537516e0aa..9bffef3488 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/timer_delete.c +++ b/sysdeps/unix/sysv/linux/alpha/nptl/timer_delete.c @@ -1 +1 @@ -#include "../x86_64/timer_delete.c" +#include diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/timer_getoverr.c b/sysdeps/unix/sysv/linux/alpha/nptl/timer_getoverr.c index 3f21a73c98..24533a0c31 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/timer_getoverr.c +++ b/sysdeps/unix/sysv/linux/alpha/nptl/timer_getoverr.c @@ -1 +1 @@ -#include "../x86_64/timer_getoverr.c" +#include diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/timer_gettime.c b/sysdeps/unix/sysv/linux/alpha/nptl/timer_gettime.c index a50143adc5..c1106695e7 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/timer_gettime.c +++ b/sysdeps/unix/sysv/linux/alpha/nptl/timer_gettime.c @@ -1 +1 @@ -#include "../x86_64/timer_gettime.c" +#include diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/timer_settime.c b/sysdeps/unix/sysv/linux/alpha/nptl/timer_settime.c index 37baeffacc..c1106695e7 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/timer_settime.c +++ b/sysdeps/unix/sysv/linux/alpha/nptl/timer_settime.c @@ -1 +1 @@ -#include "../x86_64/timer_settime.c" +#include diff --git a/sysdeps/unix/sysv/linux/alpha/sysconf.c b/sysdeps/unix/sysv/linux/alpha/sysconf.c index 3e5b4ee85f..51a2a47986 100644 --- a/sysdeps/unix/sysv/linux/alpha/sysconf.c +++ b/sysdeps/unix/sysv/linux/alpha/sysconf.c @@ -149,4 +149,4 @@ __sysconf (int name) /* Now the generic Linux version. */ #undef __sysconf #define __sysconf static linux_sysconf -#include "../sysconf.c" +#include From 6b4e363a79674065338c1078c009dabe65d9a0a6 Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Tue, 14 Jul 2009 00:04:33 +0200 Subject: [PATCH 3877/4487] asm/elf.h don't exist anymore since linux kernel 2.6.25 * sysdeps/unix/sysv/linux/alpha/sys/procfs.h (ELF_NGREG, ELF_NFPREG, elf_greg_t, elf_gregset_t, elf_fpreg_t, elf_fpregset_t): Define. Don't include asm/elf.h. --- ChangeLog.alpha | 5 +++++ sysdeps/unix/sysv/linux/alpha/sys/procfs.h | 15 ++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 4737a1af9d..eb23873a9e 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -20,6 +20,11 @@ * sysdeps/unix/sysv/linux/alpha/nptl/timer_settime.c: Likewise. * sysdeps/unix/sysv/linux/alpha/sysconf.c: Likewise. + [BZ #6507] + * sysdeps/unix/sysv/linux/alpha/sys/procfs.h (ELF_NGREG, + ELF_NFPREG, elf_greg_t, elf_gregset_t, elf_fpreg_t, + elf_fpregset_t): Define. Don't include asm/elf.h. + 2008-11-26 Roland McGrath * sysdeps/unix/sysv/linux/alpha/wordexp.c: Contents moved to main diff --git a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h index bee51f94e2..cf4fa9f8e9 100644 --- a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h @@ -29,10 +29,23 @@ #include #include #include -#include __BEGIN_DECLS +/* + * The OSF/1 version of makes gregset_t 46 entries long. + * I have no idea why that is so. For now, we just leave it at 33 + * (32 general regs + processor status word). + */ +#define ELF_NGREG 33 +#define ELF_NFPREG 32 + +typedef unsigned long elf_greg_t; +typedef elf_greg_t elf_gregset_t[ELF_NGREG]; + +typedef double elf_fpreg_t; +typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; + struct elf_siginfo { int si_signo; /* Signal number. */ From 0a6ab2a600be0ff3ff0db95d6d38c6cb321e4be3 Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Wed, 29 Jul 2009 15:26:39 +0000 Subject: [PATCH 3878/4487] Define __ASSUME_EVENTFD2 and __ASSUME_SIGNALFD4 for ARM. * sysdeps/unix/sysv/linux/arm/kernel-features.h: Define __ASSUME_EVENTFD2 and __ASSUME_SIGNALFD4. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/kernel-features.h | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/ChangeLog.arm b/ChangeLog.arm index 47aa61d3f3..fe878096b8 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2009-07-29 Aurelien Jarno + + * sysdeps/unix/sysv/linux/arm/kernel-features.h: Define + __ASSUME_EVENTFD2 and __ASSUME_SIGNALFD4. + 2009-06-30 Paul Brook * sysdeps/arm/eabi/Makefile (CFLAGS-initfini.s): Add diff --git a/sysdeps/unix/sysv/linux/arm/kernel-features.h b/sysdeps/unix/sysv/linux/arm/kernel-features.h index ea439d5a06..1b0ab63380 100644 --- a/sysdeps/unix/sysv/linux/arm/kernel-features.h +++ b/sysdeps/unix/sysv/linux/arm/kernel-features.h @@ -51,6 +51,12 @@ # define __ASSUME_SIGFRAME_V2 1 #endif +/* Support for the eventfd2 and signalfd4 syscalls was added in 2.6.27. */ +#if __LINUX_KERNEL_VERSION >= 0x02061b +# define __ASSUME_EVENTFD2 1 +# define __ASSUME_SIGNALFD4 1 +#endif + #include_next /* These syscalls are not implemented yet for ARM. */ From 197aec2596ce699bc7b999ecf2dcd69bc5452c6e Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Wed, 29 Jul 2009 15:27:35 +0000 Subject: [PATCH 3879/4487] Define __ASSUME_EVENTFD2 and __ASSUME_SIGNALFD4 for MIPS. * sysdeps/unix/sysv/linux/mips/kernel-features.h: Define __ASSUME_EVENTFD2 and __ASSUME_SIGNALFD4. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/kernel-features.h | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/ChangeLog.mips b/ChangeLog.mips index 925e5e659b..282c65df66 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2009-07-20 Aurelien Jarno + + * sysdeps/unix/sysv/linux/mips/kernel-features.h: Define + __ASSUME_EVENTFD2 and __ASSUME_SIGNALFD4. + 2009-07-17 Joseph Myers * sysdeps/mips/do-lookup.h: Remove. diff --git a/sysdeps/unix/sysv/linux/mips/kernel-features.h b/sysdeps/unix/sysv/linux/mips/kernel-features.h index f479b60636..6fe9b0883a 100644 --- a/sysdeps/unix/sysv/linux/mips/kernel-features.h +++ b/sysdeps/unix/sysv/linux/mips/kernel-features.h @@ -31,4 +31,10 @@ # define __ASSUME_FCNTL64 1 #endif +/* Support for the eventfd2 and signalfd4 syscalls was added in 2.6.27. */ +#if __LINUX_KERNEL_VERSION >= 0x02061c +# define __ASSUME_EVENTFD2 1 +# define __ASSUME_SIGNALFD4 1 +#endif + #include_next From 9d84a81fe97400d669b5056ddcab9c59458d63e7 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 3 Aug 2009 16:48:38 +0000 Subject: [PATCH 3880/4487] Make accept4 for MIPS o32 avoid socketcall. sysdeps/unix/sysv/linux/internal_accept4.S expects socket.S to be present if __NR_socketcall is defined (which it is on MIPS o32, even though there are separate syscalls as well) and __NR_accept4 isn't. MIPS does not have socket.S, since it uses separate syscalls, but though the accept4 syscall should be added soon present kernel headers do not have it. This patch creates a dummy internal_accept4.S for MIPS o32, and an accept4.c wrapper that undefines __NR_socketcall so that the main accept4.c falls back to the ENOSYS implementation if __NR_accept4 isn't defined; it doesn't seem worthwhile to have a special socketcall-based assembly implementation just for o32 on a few kernels in the range between accept4 being available via socketcall and the accept4 syscall being available. --- ChangeLog.mips | 5 +++ sysdeps/unix/sysv/linux/mips/mips32/accept4.c | 32 +++++++++++++++++++ .../sysv/linux/mips/mips32/internal_accept4.S | 2 ++ 3 files changed, 39 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/mips/mips32/accept4.c create mode 100644 sysdeps/unix/sysv/linux/mips/mips32/internal_accept4.S diff --git a/ChangeLog.mips b/ChangeLog.mips index 282c65df66..9afd96130d 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2009-08-03 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/mips32/accept4.c, + sysdeps/unix/sysv/linux/mips/mips32/internal_accept4.S: New. + 2009-07-20 Aurelien Jarno * sysdeps/unix/sysv/linux/mips/kernel-features.h: Define diff --git a/sysdeps/unix/sysv/linux/mips/mips32/accept4.c b/sysdeps/unix/sysv/linux/mips/mips32/accept4.c new file mode 100644 index 0000000000..98a41f96d8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips32/accept4.c @@ -0,0 +1,32 @@ +/* Copyright (C) 2008, 2009 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. */ + +/* Avoid accept4.c trying to use a definition based on the socketcall + syscall and internal_accept4.S. */ + +#include +#include +#include + +#include +#include +#include + +#undef __NR_socketcall + +#include diff --git a/sysdeps/unix/sysv/linux/mips/mips32/internal_accept4.S b/sysdeps/unix/sysv/linux/mips/mips32/internal_accept4.S new file mode 100644 index 0000000000..30434d7334 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips32/internal_accept4.S @@ -0,0 +1,2 @@ +/* MIPS does not have socket.S and the socketcall syscall should + generally be avoided, though it exists. */ From c67273d5b28317c87d2e9ee636ead6d71635e0e5 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 5 Aug 2009 21:02:50 +0000 Subject: [PATCH 3881/4487] Signal stack support for MIPS ____longjmp_chk. * sysdeps/mips/____longjmp_chk.c: Remove. Replaced by.... * sysdeps/unix/sysv/linux/mips/____longjmp_chk.c: This. New file. * sysdeps/mips/__longjmp.c (__longjmp): Use explicit register variable for env. Use expansion of CHECK_SP macro for check. * sysdeps/mips/mips64/__longjmp.c (__Longjmp): Likewise. --- ChangeLog.mips | 8 +++++++ sysdeps/mips/__longjmp.c | 8 +++---- sysdeps/mips/mips64/__longjmp.c | 8 +++---- .../sysv/linux}/mips/____longjmp_chk.c | 22 ++++++++++++++++++- 4 files changed, 37 insertions(+), 9 deletions(-) rename sysdeps/{ => unix/sysv/linux}/mips/____longjmp_chk.c (55%) diff --git a/ChangeLog.mips b/ChangeLog.mips index 9afd96130d..5ba4297cf7 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,11 @@ +2009-08-05 Joseph Myers + + * sysdeps/mips/____longjmp_chk.c: Remove. Replaced by.... + * sysdeps/unix/sysv/linux/mips/____longjmp_chk.c: This. New file. + * sysdeps/mips/__longjmp.c (__longjmp): Use explicit register + variable for env. Use expansion of CHECK_SP macro for check. + * sysdeps/mips/mips64/__longjmp.c (__Longjmp): Likewise. + 2009-08-03 Joseph Myers * sysdeps/unix/sysv/linux/mips/mips32/accept4.c, diff --git a/sysdeps/mips/__longjmp.c b/sysdeps/mips/__longjmp.c index 340485de8c..2a917719fd 100644 --- a/sysdeps/mips/__longjmp.c +++ b/sysdeps/mips/__longjmp.c @@ -25,19 +25,19 @@ #endif void -__longjmp (env, val_arg) - __jmp_buf env; +__longjmp (env_arg, val_arg) + __jmp_buf env_arg; int val_arg; { /* gcc 1.39.19 miscompiled the longjmp routine (as it did setjmp before the hack around it); force it to use $a1 for the longjmp value. Without this it saves $a1 in a register which gets clobbered along the way. */ + register struct __jmp_buf_internal_tag *env asm ("a0"); register int val asm ("a1"); #ifdef CHECK_SP register long sp asm ("$29"); - if ((long) (env[0].__sp) < sp) - __fortify_fail ("longjmp causes uninitialized stack frame"); + CHECK_SP (env[0].__sp, sp, long); #endif #ifdef __mips_hard_float diff --git a/sysdeps/mips/mips64/__longjmp.c b/sysdeps/mips/mips64/__longjmp.c index d7e36ff686..99aac01a99 100644 --- a/sysdeps/mips/mips64/__longjmp.c +++ b/sysdeps/mips/mips64/__longjmp.c @@ -27,19 +27,19 @@ #endif void -__longjmp (env, val_arg) - __jmp_buf env; +__longjmp (env_arg, val_arg) + __jmp_buf env_arg; int val_arg; { /* gcc 1.39.19 miscompiled the longjmp routine (as it did setjmp before the hack around it); force it to use $a1 for the longjmp value. Without this it saves $a1 in a register which gets clobbered along the way. */ + register struct __jmp_buf_internal_tag *env asm ("a0"); register int val asm ("a1"); #ifdef CHECK_SP register long long sp asm ("$29"); - if ((long long) (env[0].__sp) < sp) - __fortify_fail ("longjmp causes uninitialized stack frame"); + CHECK_SP (env[0].__sp, sp, long long); #endif #ifdef __mips_hard_float diff --git a/sysdeps/mips/____longjmp_chk.c b/sysdeps/unix/sysv/linux/mips/____longjmp_chk.c similarity index 55% rename from sysdeps/mips/____longjmp_chk.c rename to sysdeps/unix/sysv/linux/mips/____longjmp_chk.c index a46ed150d7..9db339c2b8 100644 --- a/sysdeps/mips/____longjmp_chk.c +++ b/sysdeps/unix/sysv/linux/mips/____longjmp_chk.c @@ -16,7 +16,27 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include #include #define __longjmp ____longjmp_chk -#define CHECK_SP +#define CHECK_SP(saved_sp, cur_sp, sp_type) \ + do { \ + sp_type sp_saved = (sp_type) (saved_sp); \ + if (sp_saved < (cur_sp)) \ + { \ + struct __jmp_buf_internal_tag *env_save = env_arg; \ + int val_save = val_arg; \ + stack_t ss; \ + int ret = __sigaltstack (NULL, &ss); \ + if (ret == 0 \ + && (!(ss.ss_flags & SS_ONSTACK) \ + || ((unsigned sp_type) ((sp_type) ss.ss_sp \ + + (sp_type) ss.ss_size \ + - sp_saved) \ + < ss.ss_size))) \ + __fortify_fail ("longjmp causes uninitialized stack frame"); \ + asm volatile ("move %0, %1" : "=r" (env) : "r" (env_save)); \ + asm volatile ("move %0, %1" : "=r" (val) : "r" (val_save)); \ + } \ + } while (0) #include <__longjmp.c> From 53df8bcec0cc4a07dcb0d13f9105a9002d9183d8 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 6 Aug 2009 16:53:09 +0000 Subject: [PATCH 3882/4487] Add alternate signal stack support to ARM ____longjmp_chk. * sysdeps/arm/____longjmp_chk.S: Remove. Replaced by.... * sysdeps/unix/sysv/linux/arm/____longjmp_chk.S, sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S: This. New files. * sysdeps/arm/__longjmp.S, sysdeps/arm/eabi/__longjmp.S: Use r4 for saved sp. --- ChangeLog.arm | 9 +++ sysdeps/arm/__longjmp.S | 4 +- sysdeps/arm/eabi/__longjmp.S | 4 +- .../sysv/linux}/arm/____longjmp_chk.S | 22 +++++- .../sysv/linux/arm/eabi/____longjmp_chk.S | 76 +++++++++++++++++++ 5 files changed, 110 insertions(+), 5 deletions(-) rename sysdeps/{ => unix/sysv/linux}/arm/____longjmp_chk.S (79%) create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S diff --git a/ChangeLog.arm b/ChangeLog.arm index fe878096b8..9df8b0f424 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,12 @@ +2009-08-06 Joseph Myers + + * sysdeps/arm/____longjmp_chk.S: Remove. Replaced by.... + * sysdeps/unix/sysv/linux/arm/____longjmp_chk.S, + sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S: This. New + files. + * sysdeps/arm/__longjmp.S, sysdeps/arm/eabi/__longjmp.S: Use r4 + for saved sp. + 2009-07-29 Aurelien Jarno * sysdeps/unix/sysv/linux/arm/kernel-features.h: Define diff --git a/sysdeps/arm/__longjmp.S b/sysdeps/arm/__longjmp.S index c834e7860b..09e6386417 100644 --- a/sysdeps/arm/__longjmp.S +++ b/sysdeps/arm/__longjmp.S @@ -30,8 +30,8 @@ ENTRY (__longjmp) moveq r0, #1 /* can't let setjmp() return zero! */ #ifdef CHECK_SP - ldr r1, [ip, #32] - CHECK_SP (r1) + ldr r4, [ip, #32] + CHECK_SP (r4) #endif LOADREGS(ia, ip, {v1-v6, sl, fp, sp, pc}) END (__longjmp) diff --git a/sysdeps/arm/eabi/__longjmp.S b/sysdeps/arm/eabi/__longjmp.S index 1f3f791569..f283297089 100644 --- a/sysdeps/arm/eabi/__longjmp.S +++ b/sysdeps/arm/eabi/__longjmp.S @@ -31,8 +31,8 @@ ENTRY (__longjmp) moveq r0, #1 /* can't let setjmp() return zero! */ #ifdef CHECK_SP - ldr r1, [ip, #32] - CHECK_SP (r1) + ldr r4, [ip, #32] + CHECK_SP (r4) #endif LOADREGS(ia, ip!, {v1-v6, sl, fp, sp, lr}) diff --git a/sysdeps/arm/____longjmp_chk.S b/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S similarity index 79% rename from sysdeps/arm/____longjmp_chk.S rename to sysdeps/unix/sysv/linux/arm/____longjmp_chk.S index 16fc4cdebb..2fa727dcfe 100644 --- a/sysdeps/arm/____longjmp_chk.S +++ b/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S @@ -16,6 +16,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include .section .rodata.str1.1,"aMS",%progbits,1 .type longjmp_msg,%object @@ -47,9 +48,28 @@ longjmp_msg: #endif #define CHECK_SP(reg) \ - cmp sp, reg; \ + cmp sp, reg; \ bls .Lok; \ + mov r5, r0; \ + mov r0, #0; \ + sub sp, sp, #16; \ + mov r1, sp; \ + swi #SYS_ify(sigaltstack); \ + cmp r0, #0; \ + bne .Lok2; \ + ldr r1, [sp, #4]; \ + tst r1, #1; \ + beq .Lfail; \ + ldr r2, [sp, #0]; \ + ldr r3, [sp, #8]; \ + add r2, r2, r3; \ + sub r2, r2, reg; \ + cmp r2, r3; \ + bhi .Lok2; \ +.Lfail: \ CALL_FAIL \ +.Lok2: \ + mov r0, r5; \ .Lok: #include <__longjmp.S> diff --git a/sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S b/sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S new file mode 100644 index 0000000000..f92a382e44 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S @@ -0,0 +1,76 @@ +/* Copyright (C) 2009 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 General Public License + along with GCC; see the file COPYING. If not, write to the Free + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. */ + +#include + + .section .rodata.str1.1,"aMS",%progbits,1 + .type longjmp_msg,%object +longjmp_msg: + .string "longjmp causes uninitialized stack frame" + .size longjmp_msg, .-longjmp_msg + .text + +#define __longjmp ____longjmp_chk + +#ifdef PIC +# define CALL_FAIL \ + ldr sl, .L_GOT; \ +.L_GOT_OFF: \ + add sl, pc, sl; \ + ldr r0, .Lstr; \ + add r0, sl, r0; \ + B PLTJMP(HIDDEN_JUMPTARGET(__fortify_fail)); \ +.L_GOT: \ + .word _GLOBAL_OFFSET_TABLE_-(.L_GOT_OFF+8); \ +.Lstr: \ + .word longjmp_msg(GOTOFF); +#else +# define CALL_FAIL \ + ldr r0, .Lstr; \ + B HIDDEN_JUMPTARGET(__fortify_fail); \ +.Lstr: \ + .word longjmp_msg; +#endif + +#define CHECK_SP(reg) \ + cmp sp, reg; \ + bls .Lok; \ + mov r5, r0; \ + mov r7, #SYS_ify(sigaltstack); \ + mov r0, #0; \ + sub sp, sp, #16; \ + mov r1, sp; \ + swi #0; \ + cmp r0, #0; \ + bne .Lok2; \ + ldr r1, [sp, #4]; \ + tst r1, #1; \ + beq .Lfail; \ + ldr r2, [sp, #0]; \ + ldr r3, [sp, #8]; \ + add r2, r2, r3; \ + sub r2, r2, reg; \ + cmp r2, r3; \ + bhi .Lok2; \ +.Lfail: \ + CALL_FAIL \ +.Lok2: \ + mov r0, r5; \ +.Lok: + +#include <__longjmp.S> From f0e694490652893bd0957f8ded779133d883ebcd Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 6 Sep 2009 21:20:26 +0200 Subject: [PATCH 3883/4487] Add ____longjmp_chk for m68k-linux --- ChangeLog.m68k | 6 +++ sysdeps/m68k/__longjmp.c | 7 +++- .../unix/sysv/linux/m68k/____longjmp_chk.c | 39 +++++++++++++++++++ 3 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 sysdeps/unix/sysv/linux/m68k/____longjmp_chk.c diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 3afc3da05d..41ede0155f 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,9 @@ +2009-09-06 Andreas Schwab + + * sysdeps/unix/sysv/linux/m68k/____longjmp_chk.c: New file. + + * sysdeps/m68k/__longjmp.c (__longjmp): Call CHECK_SP if defined. + 2009-05-16 Joseph Myers * sysdeps/unix/sysv/linux/m68k/Versions (libc): Add diff --git a/sysdeps/m68k/__longjmp.c b/sysdeps/m68k/__longjmp.c index 7d876a7a14..5ba2478c0c 100644 --- a/sysdeps/m68k/__longjmp.c +++ b/sysdeps/m68k/__longjmp.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1991, 92, 93, 94, 95, 97 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1997, 2009 + 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 @@ -27,6 +28,10 @@ __longjmp (__jmp_buf env, int val) /* This restores the FP and SP that setjmp's caller had, and puts the return address into A0 and VAL into D0. */ +#ifdef CHECK_SP + CHECK_SP (env[0].__sp); +#endif + #if defined(__HAVE_68881__) || defined(__HAVE_FPU__) /* Restore the floating-point registers. */ asm volatile("fmovem%.x %0, %/fp0-%/fp7" : diff --git a/sysdeps/unix/sysv/linux/m68k/____longjmp_chk.c b/sysdeps/unix/sysv/linux/m68k/____longjmp_chk.c new file mode 100644 index 0000000000..8eaf59195b --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/____longjmp_chk.c @@ -0,0 +1,39 @@ +/* Copyright (C) 2009 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. */ + +#include +#include +#include +#define __longjmp ____longjmp_chk +#define CHECK_SP(sp) \ + do { \ + register unsigned long this_sp asm ("sp"); \ + if ((unsigned long) (sp) < this_sp) \ + { \ + struct sigaltstack oss; \ + INTERNAL_SYSCALL_DECL (err); \ + int result = INTERNAL_SYSCALL (sigaltstack, err, 2, NULL, &oss); \ + if (!INTERNAL_SYSCALL_ERROR_P (result, err) \ + && ((oss.ss_flags & SS_ONSTACK) == 0 \ + || ((unsigned long) oss.ss_sp + oss.ss_size \ + - (unsigned long) (sp)) < oss.ss_size)) \ + __fortify_fail ("longjmp causes uninitialized stack frame"); \ + } \ + } while (0) + +#include <__longjmp.c> From be0f2008ac41c83db39d1d1112c0392dbb8b18e9 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Tue, 8 Sep 2009 14:32:53 -0400 Subject: [PATCH 3884/4487] Implement new NPTL POSIX Threads ABI for HPPA. This version of the NPTL POSIX thread ABI for hppa does not break backwards compatibility with the the old Linuxthreads ABI, and is therefore suitable for release by distributions. sysdeps/unix/sysv/linux/hppa/ * internaltypes.h: New file. sysdeps/unix/sysv/linux/hppa/nptl/ * pthreadP.h: New file. * pthread.h: New file. * pthread_cond_broadcast.c: New file. * pthread_cond_destroy.c: New file. * pthread_cond_init.c: New file. * pthread_cond_signal.c: New file. * pthread_cond_timedwait.c: New file. * pthread_cond_wait.c: New file. * bits/pthreadtypes.h: Make pthread_mutex_t, pthread_rwlock_t, and pthread_cond_t backwards compatible. --- ChangeLog.hppa | 18 + sysdeps/unix/sysv/linux/hppa/internaltypes.h | 79 ++ .../sysv/linux/hppa/nptl/bits/pthreadtypes.h | 51 +- sysdeps/unix/sysv/linux/hppa/nptl/pthread.h | 1178 +++++++++++++++++ sysdeps/unix/sysv/linux/hppa/nptl/pthreadP.h | 17 + .../linux/hppa/nptl/pthread_cond_broadcast.c | 43 + .../linux/hppa/nptl/pthread_cond_destroy.c | 43 + .../sysv/linux/hppa/nptl/pthread_cond_init.c | 44 + .../linux/hppa/nptl/pthread_cond_signal.c | 43 + .../linux/hppa/nptl/pthread_cond_timedwait.c | 45 + .../sysv/linux/hppa/nptl/pthread_cond_wait.c | 44 + 11 files changed, 1601 insertions(+), 4 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/hppa/internaltypes.h create mode 100644 sysdeps/unix/sysv/linux/hppa/nptl/pthread.h create mode 100644 sysdeps/unix/sysv/linux/hppa/nptl/pthreadP.h create mode 100644 sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_broadcast.c create mode 100644 sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_destroy.c create mode 100644 sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_init.c create mode 100644 sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_signal.c create mode 100644 sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_timedwait.c create mode 100644 sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_wait.c diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 60480d1742..77227b08bd 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,21 @@ +2009-09-08 Carlos O'Donell + + sysdeps/unix/sysv/linux/hppa/ + * internaltypes.h: New file. + + sysdeps/unix/sysv/linux/hppa/nptl/ + * pthreadP.h: New file. + * pthread.h: New file. + * pthread_cond_broadcast.c: New file. + * pthread_cond_destroy.c: New file. + * pthread_cond_init.c: New file. + * pthread_cond_signal.c: New file. + * pthread_cond_timedwait.c: New file. + * pthread_cond_wait.c: New file. + * bits/pthreadtypes.h: Make pthread_mutex_t, + pthread_rwlock_t, and pthread_cond_t backwards + compatible. + 2009-04-24 Carlos O'Donell * sysdeps/hppa/hppa1.1/s_signbit.c: New file. diff --git a/sysdeps/unix/sysv/linux/hppa/internaltypes.h b/sysdeps/unix/sysv/linux/hppa/internaltypes.h new file mode 100644 index 0000000000..6eee0b3ba1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/internaltypes.h @@ -0,0 +1,79 @@ +#include_next +#ifndef _INTERNAL_TYPES_H_HPPA_ +#define _INTERNAL_TYPES_H_HPPA_ 1 +#include + +/* In GLIBC 2.10 HPPA switched from Linuxthreads to NPTL, and in order +to maintain ABI compatibility with pthread_cond_t, some care had to be +taken. + +The NPTL pthread_cond_t grew in size. When HPPA switched to NPTL, we +dropped the use of ldcw, and switched to the kernel helper routine for +compare-and-swap. This allowed HPPA to use the 4-word 16-byte aligned +lock words, and alignment words to store the additional pthread_cond_t +data. Once organized properly the new NPTL pthread_cond_t was 1 word +smaller than the Linuxthreads version. + +However, we were faced with the case that users may have initialized the +pthread_cond_t with PTHREAD_COND_INITIALIZER. In this case, the first +four words were set to one, and must be cleared before any NPTL code +used these words. + +We didn't want to use LDCW, because it continues to be a source of bugs +when applications memset pthread_cond_t to all zeroes by accident. This +works on all other architectures where lock words are unlocked at zero. +Remember that because of the semantics of LDCW, a locked word is set to +zero, and an unlocked word is set to 1. + +Instead we used atomic_compare_and_exchange_val_acq, but we couldn't use +this on any of the pthread_cond_t words, otherwise it might interfere +with the current operation of the structure. To solve this problem we +used the left over word. + +If the stucture was initialized by a legacy Linuxthread +PTHREAD_COND_INITIALIZER it contained a 1, and this indicates that the +structure requires zeroing for NPTL. The first thread to come upon a +pthread_cond_t with a 1 in the __initializer field, will +compare-and-swap the value, placing a 2 there which will cause all other +threads using the same pthread_cond_t to wait for the completion of the +initialization. Lastly, we use a store (with memory barrier) to change +__initializer from 2 to 0. Note that the store is strongly ordered, but +we use the PA 1.1 compatible form which is ",ma" with zero offset. + +In the future, when the application is recompiled with NPTL +PTHREAD_COND_INITIALIZER it will be a quick compare-and-swap, which +fails because __initializer is zero, and the structure will be used as +is correctly. */ + +#define cond_compat_clear(var) \ +({ \ + int tmp = 0; \ + var->__data.__lock = 0; \ + var->__data.__futex = 0; \ + var->__data.__mutex = NULL; \ + /* Clear __initializer last, to indicate initialization is done. */ \ + __asm__ __volatile__ ("stw,ma %1,0(%0)" \ + : : "r" (&var->__data.__initializer), "r" (tmp) : "memory"); \ +}) + +#define cond_compat_check_and_clear(var) \ +({ \ + int ret; \ + volatile int *value = &var->__data.__initializer; \ + if ((ret = atomic_compare_and_exchange_val_acq(value, 2, 1))) \ + { \ + if (ret == 1) \ + { \ + /* Initialize structure. */ \ + cond_compat_clear (var); \ + } \ + else \ + { \ + /* Yield until structure is initialized. */ \ + while (*value == 2) sched_yield (); \ + } \ + } \ +}) + +#endif + diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h index d6eb97540a..87c1a55215 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h +++ b/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h @@ -34,7 +34,7 @@ #define __SIZEOF_PTHREAD_ATTR_T 36 #define __SIZEOF_PTHREAD_BARRIER_T 48 #define __SIZEOF_PTHREAD_BARRIERATTR_T 4 -#define __SIZEOF_PTHREAD_COND_T 64 +#define __SIZEOF_PTHREAD_COND_T 48 #define __SIZEOF_PTHREAD_CONDATTR_T 4 #define __SIZEOF_PTHREAD_MUTEX_T 48 #define __SIZEOF_PTHREAD_MUTEXATTR_T 4 @@ -70,12 +70,22 @@ typedef union /* KIND must stay at this position in the structure to maintain binary compatibility. */ int __kind; + /* The old 4-word 16-byte aligned lock. This is initalized + to all ones by the Linuxthreads PTHREAD_MUTEX_INITIALIZER. + Unused in NPTL. */ + int __compat_padding[4]; + /* In the old structure there are 4 words left due to alignment. + In NPTL two words are used. */ unsigned int __nusers; __extension__ union { int __spins; __pthread_slist_t __list; }; + /* Two more words are left before the NPTL + pthread_mutex_t is larger than Linuxthreads. */ + int __reserved1; + int __reserved2; } __data; char __size[__SIZEOF_PTHREAD_MUTEX_T]; long int __align; @@ -89,19 +99,37 @@ typedef union /* Data structure for conditional variable handling. The structure of - the attribute type is not exposed on purpose. */ + the attribute type is not exposed on purpose. However, this structure + is exposed via PTHREAD_COND_INITIALIZER, and because of this, the + Linuxthreads version sets the first four ints to one. In the NPTL + version we must check, in every function using pthread_cond_t, + for the static Linuxthreads initializer and clear the appropriate + words. */ typedef union { struct { + /* In the old Linuxthreads pthread_cond_t, this is the + start of the 4-word lock structure, the next four words + are set all to 1 by the Linuxthreads + PTHREAD_COND_INITIALIZER. */ int __lock; + /* Tracks the initialization of this structure: + 0 initialized with NPTL PTHREAD_COND_INITIALIZER. + 1 initialized with Linuxthreads PTHREAD_COND_INITIALIZER. + 2 initialization in progress. */ + int __initializer; unsigned int __futex; + void *__mutex; + /* In the old Linuxthreads this would have been the start + of the pthread_fastlock status word. */ __extension__ unsigned long long int __total_seq; __extension__ unsigned long long int __wakeup_seq; __extension__ unsigned long long int __woken_seq; - void *__mutex; unsigned int __nwaiters; unsigned int __broadcast_seq; + /* The NPTL pthread_cond_t is exactly the same size as + the Linuxthreads version, there are no words to spare. */ } __data; char __size[__SIZEOF_PTHREAD_COND_T]; __extension__ long long int __align; @@ -129,19 +157,34 @@ typedef union { struct { + /* In the old Linuxthreads pthread_rwlock_t, this is the + start of the 4-word 16-byte aligned lock structure. The + next four words are all set to 1 by the Linuxthreads + PTHREAD_RWLOCK_INITIALIZER. We ignore them in NPTL. */ + int __compat_padding[4]; int __lock; unsigned int __nr_readers; unsigned int __readers_wakeup; unsigned int __writer_wakeup; unsigned int __nr_readers_queued; unsigned int __nr_writers_queued; + int __writer; + /* An unused word, reserved for future use. It was added + to maintain the location of the flags from the Linuxthreads + layout of this structure. */ + int __reserved1; /* FLAGS must stay at this position in the structure to maintain binary compatibility. */ unsigned char __pad2; unsigned char __pad1; unsigned char __shared; unsigned char __flags; - int __writer; + /* The NPTL pthread_rwlock_t is 4 words smaller than the + Linuxthreads version. One word is in the middle of the + structure, the other three are at the end. */ + int __reserved2; + int __reserved3; + int __reserved4; } __data; char __size[__SIZEOF_PTHREAD_RWLOCK_T]; long int __align; diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pthread.h b/sysdeps/unix/sysv/linux/hppa/nptl/pthread.h new file mode 100644 index 0000000000..7e279668d1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/nptl/pthread.h @@ -0,0 +1,1178 @@ +/* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 + 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 _PTHREAD_H +#define _PTHREAD_H 1 + +#include +#include +#include +#include + +#define __need_sigset_t +#include +#include +#include +#include + + +/* Detach state. */ +enum +{ + PTHREAD_CREATE_JOINABLE, +#define PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_JOINABLE + PTHREAD_CREATE_DETACHED +#define PTHREAD_CREATE_DETACHED PTHREAD_CREATE_DETACHED +}; + + +/* Mutex types. */ +enum +{ + PTHREAD_MUTEX_TIMED_NP, + PTHREAD_MUTEX_RECURSIVE_NP, + PTHREAD_MUTEX_ERRORCHECK_NP, + PTHREAD_MUTEX_ADAPTIVE_NP +#ifdef __USE_UNIX98 + , + PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP, + PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP, + PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP, + PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL +#endif +#ifdef __USE_GNU + /* For compatibility. */ + , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP +#endif +}; + + +#ifdef __USE_XOPEN2K +/* Robust mutex or not flags. */ +enum +{ + PTHREAD_MUTEX_STALLED, + PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED, + PTHREAD_MUTEX_ROBUST, + PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST +}; +#endif + + +#ifdef __USE_UNIX98 +/* Mutex protocols. */ +enum +{ + PTHREAD_PRIO_NONE, + PTHREAD_PRIO_INHERIT, + PTHREAD_PRIO_PROTECT +}; +#endif + + +/* Mutex initializers. */ +#if __WORDSIZE == 64 +# define PTHREAD_MUTEX_INITIALIZER \ + { { 0, 0, 0, 0, 0, 0, { 0, 0 } } } +# ifdef __USE_GNU +# define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \ + { { 0, 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0, { 0, 0 } } } +# define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \ + { { 0, 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, 0, { 0, 0 } } } +# define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \ + { { 0, 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, 0, { 0, 0 } } } +# endif +#else +# define PTHREAD_MUTEX_INITIALIZER \ + { { 0, 0, 0, 0, 0, { 0 } } } +# ifdef __USE_GNU +# define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \ + { { 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0, { 0 } } } +# define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \ + { { 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, 0, { 0 } } } +# define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \ + { { 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, 0, { 0 } } } +# endif +#endif + + +/* Read-write lock types. */ +#if defined __USE_UNIX98 || defined __USE_XOPEN2K +enum +{ + PTHREAD_RWLOCK_PREFER_READER_NP, + PTHREAD_RWLOCK_PREFER_WRITER_NP, + PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, + PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP +}; + +/* Read-write lock initializers. */ +# define PTHREAD_RWLOCK_INITIALIZER \ + { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } } +# ifdef __USE_GNU +# if __WORDSIZE == 64 +# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \ + { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP } } +# else +# if __BYTE_ORDER == __LITTLE_ENDIAN +# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \ + { { 0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, \ + 0, 0, 0, 0 } } +# else +# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \ + { { 0, 0, 0, 0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,\ + 0 } } +# endif +# endif +# endif +#endif /* Unix98 or XOpen2K */ + + +/* Scheduler inheritance. */ +enum +{ + PTHREAD_INHERIT_SCHED, +#define PTHREAD_INHERIT_SCHED PTHREAD_INHERIT_SCHED + PTHREAD_EXPLICIT_SCHED +#define PTHREAD_EXPLICIT_SCHED PTHREAD_EXPLICIT_SCHED +}; + + +/* Scope handling. */ +enum +{ + PTHREAD_SCOPE_SYSTEM, +#define PTHREAD_SCOPE_SYSTEM PTHREAD_SCOPE_SYSTEM + PTHREAD_SCOPE_PROCESS +#define PTHREAD_SCOPE_PROCESS PTHREAD_SCOPE_PROCESS +}; + + +/* Process shared or private flag. */ +enum +{ + PTHREAD_PROCESS_PRIVATE, +#define PTHREAD_PROCESS_PRIVATE PTHREAD_PROCESS_PRIVATE + PTHREAD_PROCESS_SHARED +#define PTHREAD_PROCESS_SHARED PTHREAD_PROCESS_SHARED +}; + + + +/* Conditional variable handling. */ +#define PTHREAD_COND_INITIALIZER { { 0, 0, 0, 0, 0, (void *) 0, 0, 0 } } + + +/* Cleanup buffers */ +struct _pthread_cleanup_buffer +{ + void (*__routine) (void *); /* Function to call. */ + void *__arg; /* Its argument. */ + int __canceltype; /* Saved cancellation type. */ + struct _pthread_cleanup_buffer *__prev; /* Chaining of cleanup functions. */ +}; + +/* Cancellation */ +enum +{ + PTHREAD_CANCEL_ENABLE, +#define PTHREAD_CANCEL_ENABLE PTHREAD_CANCEL_ENABLE + PTHREAD_CANCEL_DISABLE +#define PTHREAD_CANCEL_DISABLE PTHREAD_CANCEL_DISABLE +}; +enum +{ + PTHREAD_CANCEL_DEFERRED, +#define PTHREAD_CANCEL_DEFERRED PTHREAD_CANCEL_DEFERRED + PTHREAD_CANCEL_ASYNCHRONOUS +#define PTHREAD_CANCEL_ASYNCHRONOUS PTHREAD_CANCEL_ASYNCHRONOUS +}; +#define PTHREAD_CANCELED ((void *) -1) + + +/* Single execution handling. */ +#define PTHREAD_ONCE_INIT 0 + + +#ifdef __USE_XOPEN2K +/* Value returned by 'pthread_barrier_wait' for one of the threads after + the required number of threads have called this function. + -1 is distinct from 0 and all errno constants */ +# define PTHREAD_BARRIER_SERIAL_THREAD -1 +#endif + + +__BEGIN_DECLS + +/* Create a new thread, starting with execution of START-ROUTINE + getting passed ARG. Creation attributed come from ATTR. The new + handle is stored in *NEWTHREAD. */ +extern int pthread_create (pthread_t *__restrict __newthread, + __const pthread_attr_t *__restrict __attr, + void *(*__start_routine) (void *), + void *__restrict __arg) __THROW __nonnull ((1, 3)); + +/* Terminate calling thread. + + The registered cleanup handlers are called via exception handling + so we cannot mark this function with __THROW.*/ +extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__)); + +/* Make calling thread wait for termination of the thread TH. The + exit status of the thread is stored in *THREAD_RETURN, if THREAD_RETURN + is not NULL. + + This function is a cancellation point and therefore not marked with + __THROW. */ +extern int pthread_join (pthread_t __th, void **__thread_return); + +#ifdef __USE_GNU +/* Check whether thread TH has terminated. If yes return the status of + the thread in *THREAD_RETURN, if THREAD_RETURN is not NULL. */ +extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) __THROW; + +/* Make calling thread wait for termination of the thread TH, but only + until TIMEOUT. The exit status of the thread is stored in + *THREAD_RETURN, if THREAD_RETURN is not NULL. + + This function is a cancellation point and therefore not marked with + __THROW. */ +extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return, + __const struct timespec *__abstime); +#endif + +/* Indicate that the thread TH is never to be joined with PTHREAD_JOIN. + The resources of TH will therefore be freed immediately when it + terminates, instead of waiting for another thread to perform PTHREAD_JOIN + on it. */ +extern int pthread_detach (pthread_t __th) __THROW; + + +/* Obtain the identifier of the current thread. */ +extern pthread_t pthread_self (void) __THROW __attribute__ ((__const__)); + +/* Compare two thread identifiers. */ +extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) __THROW; + + +/* Thread attribute handling. */ + +/* Initialize thread attribute *ATTR with default attributes + (detachstate is PTHREAD_JOINABLE, scheduling policy is SCHED_OTHER, + no user-provided stack). */ +extern int pthread_attr_init (pthread_attr_t *__attr) __THROW __nonnull ((1)); + +/* Destroy thread attribute *ATTR. */ +extern int pthread_attr_destroy (pthread_attr_t *__attr) + __THROW __nonnull ((1)); + +/* Get detach state attribute. */ +extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr, + int *__detachstate) + __THROW __nonnull ((1, 2)); + +/* Set detach state attribute. */ +extern int pthread_attr_setdetachstate (pthread_attr_t *__attr, + int __detachstate) + __THROW __nonnull ((1)); + + +/* Get the size of the guard area created for stack overflow protection. */ +extern int pthread_attr_getguardsize (__const pthread_attr_t *__attr, + size_t *__guardsize) + __THROW __nonnull ((1, 2)); + +/* Set the size of the guard area created for stack overflow protection. */ +extern int pthread_attr_setguardsize (pthread_attr_t *__attr, + size_t __guardsize) + __THROW __nonnull ((1)); + + +/* Return in *PARAM the scheduling parameters of *ATTR. */ +extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict + __attr, + struct sched_param *__restrict __param) + __THROW __nonnull ((1, 2)); + +/* Set scheduling parameters (priority, etc) in *ATTR according to PARAM. */ +extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr, + __const struct sched_param *__restrict + __param) __THROW __nonnull ((1, 2)); + +/* Return in *POLICY the scheduling policy of *ATTR. */ +extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict + __attr, int *__restrict __policy) + __THROW __nonnull ((1, 2)); + +/* Set scheduling policy in *ATTR according to POLICY. */ +extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) + __THROW __nonnull ((1)); + +/* Return in *INHERIT the scheduling inheritance mode of *ATTR. */ +extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict + __attr, int *__restrict __inherit) + __THROW __nonnull ((1, 2)); + +/* Set scheduling inheritance mode in *ATTR according to INHERIT. */ +extern int pthread_attr_setinheritsched (pthread_attr_t *__attr, + int __inherit) + __THROW __nonnull ((1)); + + +/* Return in *SCOPE the scheduling contention scope of *ATTR. */ +extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr, + int *__restrict __scope) + __THROW __nonnull ((1, 2)); + +/* Set scheduling contention scope in *ATTR according to SCOPE. */ +extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) + __THROW __nonnull ((1)); + +/* Return the previously set address for the stack. */ +extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict + __attr, void **__restrict __stackaddr) + __THROW __nonnull ((1, 2)) __attribute_deprecated__; + +/* Set the starting address of the stack of the thread to be created. + Depending on whether the stack grows up or down the value must either + be higher or lower than all the address in the memory block. The + minimal size of the block must be PTHREAD_STACK_MIN. */ +extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, + void *__stackaddr) + __THROW __nonnull ((1)) __attribute_deprecated__; + +/* Return the currently used minimal stack size. */ +extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict + __attr, size_t *__restrict __stacksize) + __THROW __nonnull ((1, 2)); + +/* Add information about the minimum stack size needed for the thread + to be started. This size must never be less than PTHREAD_STACK_MIN + and must also not exceed the system limits. */ +extern int pthread_attr_setstacksize (pthread_attr_t *__attr, + size_t __stacksize) + __THROW __nonnull ((1)); + +#ifdef __USE_XOPEN2K +/* Return the previously set address for the stack. */ +extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr, + void **__restrict __stackaddr, + size_t *__restrict __stacksize) + __THROW __nonnull ((1, 2, 3)); + +/* The following two interfaces are intended to replace the last two. They + require setting the address as well as the size since only setting the + address will make the implementation on some architectures impossible. */ +extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, + size_t __stacksize) __THROW __nonnull ((1)); +#endif + +#ifdef __USE_GNU +/* Thread created with attribute ATTR will be limited to run only on + the processors represented in CPUSET. */ +extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr, + size_t __cpusetsize, + __const cpu_set_t *__cpuset) + __THROW __nonnull ((1, 3)); + +/* Get bit set in CPUSET representing the processors threads created with + ATTR can run on. */ +extern int pthread_attr_getaffinity_np (__const pthread_attr_t *__attr, + size_t __cpusetsize, + cpu_set_t *__cpuset) + __THROW __nonnull ((1, 3)); + + +/* Initialize thread attribute *ATTR with attributes corresponding to the + already running thread TH. It shall be called on uninitialized ATTR + and destroyed with pthread_attr_destroy when no longer needed. */ +extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) + __THROW __nonnull ((2)); +#endif + + +/* Functions for scheduling control. */ + +/* Set the scheduling parameters for TARGET_THREAD according to POLICY + and *PARAM. */ +extern int pthread_setschedparam (pthread_t __target_thread, int __policy, + __const struct sched_param *__param) + __THROW __nonnull ((3)); + +/* Return in *POLICY and *PARAM the scheduling parameters for TARGET_THREAD. */ +extern int pthread_getschedparam (pthread_t __target_thread, + int *__restrict __policy, + struct sched_param *__restrict __param) + __THROW __nonnull ((2, 3)); + +/* Set the scheduling priority for TARGET_THREAD. */ +extern int pthread_setschedprio (pthread_t __target_thread, int __prio) + __THROW; + + +#ifdef __USE_UNIX98 +/* Determine level of concurrency. */ +extern int pthread_getconcurrency (void) __THROW; + +/* Set new concurrency level to LEVEL. */ +extern int pthread_setconcurrency (int __level) __THROW; +#endif + +#ifdef __USE_GNU +/* Yield the processor to another thread or process. + This function is similar to the POSIX `sched_yield' function but + might be differently implemented in the case of a m-on-n thread + implementation. */ +extern int pthread_yield (void) __THROW; + + +/* Limit specified thread TH to run only on the processors represented + in CPUSET. */ +extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize, + __const cpu_set_t *__cpuset) + __THROW __nonnull ((3)); + +/* Get bit set in CPUSET representing the processors TH can run on. */ +extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize, + cpu_set_t *__cpuset) + __THROW __nonnull ((3)); +#endif + + +/* Functions for handling initialization. */ + +/* Guarantee that the initialization function INIT_ROUTINE will be called + only once, even if pthread_once is executed several times with the + same ONCE_CONTROL argument. ONCE_CONTROL must point to a static or + extern variable initialized to PTHREAD_ONCE_INIT. + + The initialization functions might throw exception which is why + this function is not marked with __THROW. */ +extern int pthread_once (pthread_once_t *__once_control, + void (*__init_routine) (void)) __nonnull ((1, 2)); + + +/* Functions for handling cancellation. + + Note that these functions are explicitly not marked to not throw an + exception in C++ code. If cancellation is implemented by unwinding + this is necessary to have the compiler generate the unwind information. */ + +/* Set cancelability state of current thread to STATE, returning old + state in *OLDSTATE if OLDSTATE is not NULL. */ +extern int pthread_setcancelstate (int __state, int *__oldstate); + +/* Set cancellation state of current thread to TYPE, returning the old + type in *OLDTYPE if OLDTYPE is not NULL. */ +extern int pthread_setcanceltype (int __type, int *__oldtype); + +/* Cancel THREAD immediately or at the next possibility. */ +extern int pthread_cancel (pthread_t __th); + +/* Test for pending cancellation for the current thread and terminate + the thread as per pthread_exit(PTHREAD_CANCELED) if it has been + cancelled. */ +extern void pthread_testcancel (void); + + +/* Cancellation handling with integration into exception handling. */ + +typedef struct +{ + struct + { + __jmp_buf __cancel_jmp_buf; + int __mask_was_saved; + } __cancel_jmp_buf[1]; + void *__pad[4]; +} __pthread_unwind_buf_t __attribute__ ((__aligned__)); + +/* No special attributes by default. */ +#ifndef __cleanup_fct_attribute +# define __cleanup_fct_attribute +#endif + + +/* Structure to hold the cleanup handler information. */ +struct __pthread_cleanup_frame +{ + void (*__cancel_routine) (void *); + void *__cancel_arg; + int __do_it; + int __cancel_type; +}; + +#if defined __GNUC__ && defined __EXCEPTIONS +# ifdef __cplusplus +/* Class to handle cancellation handler invocation. */ +class __pthread_cleanup_class +{ + void (*__cancel_routine) (void *); + void *__cancel_arg; + int __do_it; + int __cancel_type; + + public: + __pthread_cleanup_class (void (*__fct) (void *), void *__arg) + : __cancel_routine (__fct), __cancel_arg (__arg), __do_it (1) { } + ~__pthread_cleanup_class () { if (__do_it) __cancel_routine (__cancel_arg); } + void __setdoit (int __newval) { __do_it = __newval; } + void __defer () { pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, + &__cancel_type); } + void __restore () const { pthread_setcanceltype (__cancel_type, 0); } +}; + +/* Install a cleanup handler: ROUTINE will be called with arguments ARG + when the thread is canceled or calls pthread_exit. ROUTINE will also + be called with arguments ARG when the matching pthread_cleanup_pop + is executed with non-zero EXECUTE argument. + + pthread_cleanup_push and pthread_cleanup_pop are macros and must always + be used in matching pairs at the same nesting level of braces. */ +# define pthread_cleanup_push(routine, arg) \ + do { \ + __pthread_cleanup_class __clframe (routine, arg) + +/* Remove a cleanup handler installed by the matching pthread_cleanup_push. + If EXECUTE is non-zero, the handler function is called. */ +# define pthread_cleanup_pop(execute) \ + __clframe.__setdoit (execute); \ + } while (0) + +# ifdef __USE_GNU +/* Install a cleanup handler as pthread_cleanup_push does, but also + saves the current cancellation type and sets it to deferred + cancellation. */ +# define pthread_cleanup_push_defer_np(routine, arg) \ + do { \ + __pthread_cleanup_class __clframe (routine, arg); \ + __clframe.__defer () + +/* Remove a cleanup handler as pthread_cleanup_pop does, but also + restores the cancellation type that was in effect when the matching + pthread_cleanup_push_defer was called. */ +# define pthread_cleanup_pop_restore_np(execute) \ + __clframe.__restore (); \ + __clframe.__setdoit (execute); \ + } while (0) +# endif +# else +/* Function called to call the cleanup handler. As an extern inline + function the compiler is free to decide inlining the change when + needed or fall back on the copy which must exist somewhere + else. */ +__extern_inline void +__pthread_cleanup_routine (struct __pthread_cleanup_frame *__frame) +{ + if (__frame->__do_it) + __frame->__cancel_routine (__frame->__cancel_arg); +} + +/* Install a cleanup handler: ROUTINE will be called with arguments ARG + when the thread is canceled or calls pthread_exit. ROUTINE will also + be called with arguments ARG when the matching pthread_cleanup_pop + is executed with non-zero EXECUTE argument. + + pthread_cleanup_push and pthread_cleanup_pop are macros and must always + be used in matching pairs at the same nesting level of braces. */ +# define pthread_cleanup_push(routine, arg) \ + do { \ + struct __pthread_cleanup_frame __clframe \ + __attribute__ ((__cleanup__ (__pthread_cleanup_routine))) \ + = { .__cancel_routine = (routine), .__cancel_arg = (arg), \ + .__do_it = 1 }; + +/* Remove a cleanup handler installed by the matching pthread_cleanup_push. + If EXECUTE is non-zero, the handler function is called. */ +# define pthread_cleanup_pop(execute) \ + __clframe.__do_it = (execute); \ + } while (0) + +# ifdef __USE_GNU +/* Install a cleanup handler as pthread_cleanup_push does, but also + saves the current cancellation type and sets it to deferred + cancellation. */ +# define pthread_cleanup_push_defer_np(routine, arg) \ + do { \ + struct __pthread_cleanup_frame __clframe \ + __attribute__ ((__cleanup__ (__pthread_cleanup_routine))) \ + = { .__cancel_routine = (routine), .__cancel_arg = (arg), \ + .__do_it = 1 }; \ + (void) pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, \ + &__clframe.__cancel_type) + +/* Remove a cleanup handler as pthread_cleanup_pop does, but also + restores the cancellation type that was in effect when the matching + pthread_cleanup_push_defer was called. */ +# define pthread_cleanup_pop_restore_np(execute) \ + (void) pthread_setcanceltype (__clframe.__cancel_type, NULL); \ + __clframe.__do_it = (execute); \ + } while (0) +# endif +# endif +#else +/* Install a cleanup handler: ROUTINE will be called with arguments ARG + when the thread is canceled or calls pthread_exit. ROUTINE will also + be called with arguments ARG when the matching pthread_cleanup_pop + is executed with non-zero EXECUTE argument. + + pthread_cleanup_push and pthread_cleanup_pop are macros and must always + be used in matching pairs at the same nesting level of braces. */ +# define pthread_cleanup_push(routine, arg) \ + do { \ + __pthread_unwind_buf_t __cancel_buf; \ + void (*__cancel_routine) (void *) = (routine); \ + void *__cancel_arg = (arg); \ + int not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) (void *) \ + __cancel_buf.__cancel_jmp_buf, 0); \ + if (__builtin_expect (not_first_call, 0)) \ + { \ + __cancel_routine (__cancel_arg); \ + __pthread_unwind_next (&__cancel_buf); \ + /* NOTREACHED */ \ + } \ + \ + __pthread_register_cancel (&__cancel_buf); \ + do { +extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf) + __cleanup_fct_attribute; + +/* Remove a cleanup handler installed by the matching pthread_cleanup_push. + If EXECUTE is non-zero, the handler function is called. */ +# define pthread_cleanup_pop(execute) \ + do { } while (0);/* Empty to allow label before pthread_cleanup_pop. */\ + } while (0); \ + __pthread_unregister_cancel (&__cancel_buf); \ + if (execute) \ + __cancel_routine (__cancel_arg); \ + } while (0) +extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf) + __cleanup_fct_attribute; + +# ifdef __USE_GNU +/* Install a cleanup handler as pthread_cleanup_push does, but also + saves the current cancellation type and sets it to deferred + cancellation. */ +# define pthread_cleanup_push_defer_np(routine, arg) \ + do { \ + __pthread_unwind_buf_t __cancel_buf; \ + void (*__cancel_routine) (void *) = (routine); \ + void *__cancel_arg = (arg); \ + int not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) (void *) \ + __cancel_buf.__cancel_jmp_buf, 0); \ + if (__builtin_expect (not_first_call, 0)) \ + { \ + __cancel_routine (__cancel_arg); \ + __pthread_unwind_next (&__cancel_buf); \ + /* NOTREACHED */ \ + } \ + \ + __pthread_register_cancel_defer (&__cancel_buf); \ + do { +extern void __pthread_register_cancel_defer (__pthread_unwind_buf_t *__buf) + __cleanup_fct_attribute; + +/* Remove a cleanup handler as pthread_cleanup_pop does, but also + restores the cancellation type that was in effect when the matching + pthread_cleanup_push_defer was called. */ +# define pthread_cleanup_pop_restore_np(execute) \ + do { } while (0);/* Empty to allow label before pthread_cleanup_pop. */\ + } while (0); \ + __pthread_unregister_cancel_restore (&__cancel_buf); \ + if (execute) \ + __cancel_routine (__cancel_arg); \ + } while (0) +extern void __pthread_unregister_cancel_restore (__pthread_unwind_buf_t *__buf) + __cleanup_fct_attribute; +# endif + +/* Internal interface to initiate cleanup. */ +extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf) + __cleanup_fct_attribute __attribute__ ((__noreturn__)) +# ifndef SHARED + __attribute__ ((__weak__)) +# endif + ; +#endif + +/* Function used in the macros. */ +struct __jmp_buf_tag; +extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __THROW; + + +/* Mutex handling. */ + +/* Initialize a mutex. */ +extern int pthread_mutex_init (pthread_mutex_t *__mutex, + __const pthread_mutexattr_t *__mutexattr) + __THROW __nonnull ((1)); + +/* Destroy a mutex. */ +extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) + __THROW __nonnull ((1)); + +/* Try locking a mutex. */ +extern int pthread_mutex_trylock (pthread_mutex_t *__mutex) + __THROW __nonnull ((1)); + +/* Lock a mutex. */ +extern int pthread_mutex_lock (pthread_mutex_t *__mutex) + __THROW __nonnull ((1)); + +#ifdef __USE_XOPEN2K +/* Wait until lock becomes available, or specified time passes. */ +extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, + __const struct timespec *__restrict + __abstime) __THROW __nonnull ((1, 2)); +#endif + +/* Unlock a mutex. */ +extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) + __THROW __nonnull ((1)); + + +#ifdef __USE_UNIX98 +/* Get the priority ceiling of MUTEX. */ +extern int pthread_mutex_getprioceiling (__const pthread_mutex_t * + __restrict __mutex, + int *__restrict __prioceiling) + __THROW __nonnull ((1, 2)); + +/* Set the priority ceiling of MUTEX to PRIOCEILING, return old + priority ceiling value in *OLD_CEILING. */ +extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex, + int __prioceiling, + int *__restrict __old_ceiling) + __THROW __nonnull ((1, 3)); +#endif + + +#ifdef __USE_XOPEN2K8 +/* Declare the state protected by MUTEX as consistent. */ +extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex) + __THROW __nonnull ((1)); +# ifdef __USE_GNU +extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex) + __THROW __nonnull ((1)); +# endif +#endif + + +/* Functions for handling mutex attributes. */ + +/* Initialize mutex attribute object ATTR with default attributes + (kind is PTHREAD_MUTEX_TIMED_NP). */ +extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) + __THROW __nonnull ((1)); + +/* Destroy mutex attribute object ATTR. */ +extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) + __THROW __nonnull ((1)); + +/* Get the process-shared flag of the mutex attribute ATTR. */ +extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t * + __restrict __attr, + int *__restrict __pshared) + __THROW __nonnull ((1, 2)); + +/* Set the process-shared flag of the mutex attribute ATTR. */ +extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr, + int __pshared) + __THROW __nonnull ((1)); + +#ifdef __USE_UNIX98 +/* Return in *KIND the mutex kind attribute in *ATTR. */ +extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict + __attr, int *__restrict __kind) + __THROW __nonnull ((1, 2)); + +/* Set the mutex kind attribute in *ATTR to KIND (either PTHREAD_MUTEX_NORMAL, + PTHREAD_MUTEX_RECURSIVE, PTHREAD_MUTEX_ERRORCHECK, or + PTHREAD_MUTEX_DEFAULT). */ +extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) + __THROW __nonnull ((1)); + +/* Return in *PROTOCOL the mutex protocol attribute in *ATTR. */ +extern int pthread_mutexattr_getprotocol (__const pthread_mutexattr_t * + __restrict __attr, + int *__restrict __protocol) + __THROW __nonnull ((1, 2)); + +/* Set the mutex protocol attribute in *ATTR to PROTOCOL (either + PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT, or PTHREAD_PRIO_PROTECT). */ +extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr, + int __protocol) + __THROW __nonnull ((1)); + +/* Return in *PRIOCEILING the mutex prioceiling attribute in *ATTR. */ +extern int pthread_mutexattr_getprioceiling (__const pthread_mutexattr_t * + __restrict __attr, + int *__restrict __prioceiling) + __THROW __nonnull ((1, 2)); + +/* Set the mutex prioceiling attribute in *ATTR to PRIOCEILING. */ +extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr, + int __prioceiling) + __THROW __nonnull ((1)); +#endif + +#ifdef __USE_XOPEN2K +/* Get the robustness flag of the mutex attribute ATTR. */ +extern int pthread_mutexattr_getrobust (__const pthread_mutexattr_t *__attr, + int *__robustness) + __THROW __nonnull ((1, 2)); +# ifdef __USE_GNU +extern int pthread_mutexattr_getrobust_np (__const pthread_mutexattr_t *__attr, + int *__robustness) + __THROW __nonnull ((1, 2)); +# endif + +/* Set the robustness flag of the mutex attribute ATTR. */ +extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr, + int __robustness) + __THROW __nonnull ((1)); +# ifdef __USE_GNU +extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr, + int __robustness) + __THROW __nonnull ((1)); +# endif +#endif + + +#if defined __USE_UNIX98 || defined __USE_XOPEN2K +/* Functions for handling read-write locks. */ + +/* Initialize read-write lock RWLOCK using attributes ATTR, or use + the default values if later is NULL. */ +extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, + __const pthread_rwlockattr_t *__restrict + __attr) __THROW __nonnull ((1)); + +/* Destroy read-write lock RWLOCK. */ +extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) + __THROW __nonnull ((1)); + +/* Acquire read lock for RWLOCK. */ +extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) + __THROW __nonnull ((1)); + +/* Try to acquire read lock for RWLOCK. */ +extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) + __THROW __nonnull ((1)); + +# ifdef __USE_XOPEN2K +/* Try to acquire read lock for RWLOCK or return after specfied time. */ +extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, + __const struct timespec *__restrict + __abstime) __THROW __nonnull ((1, 2)); +# endif + +/* Acquire write lock for RWLOCK. */ +extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) + __THROW __nonnull ((1)); + +/* Try to acquire write lock for RWLOCK. */ +extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) + __THROW __nonnull ((1)); + +# ifdef __USE_XOPEN2K +/* Try to acquire write lock for RWLOCK or return after specfied time. */ +extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, + __const struct timespec *__restrict + __abstime) __THROW __nonnull ((1, 2)); +# endif + +/* Unlock RWLOCK. */ +extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) + __THROW __nonnull ((1)); + + +/* Functions for handling read-write lock attributes. */ + +/* Initialize attribute object ATTR with default values. */ +extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) + __THROW __nonnull ((1)); + +/* Destroy attribute object ATTR. */ +extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) + __THROW __nonnull ((1)); + +/* Return current setting of process-shared attribute of ATTR in PSHARED. */ +extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t * + __restrict __attr, + int *__restrict __pshared) + __THROW __nonnull ((1, 2)); + +/* Set process-shared attribute of ATTR to PSHARED. */ +extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, + int __pshared) + __THROW __nonnull ((1)); + +/* Return current setting of reader/writer preference. */ +extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t * + __restrict __attr, + int *__restrict __pref) + __THROW __nonnull ((1, 2)); + +/* Set reader/write preference. */ +extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr, + int __pref) __THROW __nonnull ((1)); +#endif + + +/* Functions for handling conditional variables. */ + +/* Initialize condition variable COND using attributes ATTR, or use + the default values if later is NULL. */ +extern int pthread_cond_init (pthread_cond_t *__restrict __cond, + __const pthread_condattr_t *__restrict + __cond_attr) __THROW __nonnull ((1)); + +/* Destroy condition variable COND. */ +extern int pthread_cond_destroy (pthread_cond_t *__cond) + __THROW __nonnull ((1)); + +/* Wake up one thread waiting for condition variable COND. */ +extern int pthread_cond_signal (pthread_cond_t *__cond) + __THROW __nonnull ((1)); + +/* Wake up all threads waiting for condition variables COND. */ +extern int pthread_cond_broadcast (pthread_cond_t *__cond) + __THROW __nonnull ((1)); + +/* Wait for condition variable COND to be signaled or broadcast. + MUTEX is assumed to be locked before. + + This function is a cancellation point and therefore not marked with + __THROW. */ +extern int pthread_cond_wait (pthread_cond_t *__restrict __cond, + pthread_mutex_t *__restrict __mutex) + __nonnull ((1, 2)); + +/* Wait for condition variable COND to be signaled or broadcast until + ABSTIME. MUTEX is assumed to be locked before. ABSTIME is an + absolute time specification; zero is the beginning of the epoch + (00:00:00 GMT, January 1, 1970). + + This function is a cancellation point and therefore not marked with + __THROW. */ +extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, + pthread_mutex_t *__restrict __mutex, + __const struct timespec *__restrict + __abstime) __nonnull ((1, 2, 3)); + +/* Functions for handling condition variable attributes. */ + +/* Initialize condition variable attribute ATTR. */ +extern int pthread_condattr_init (pthread_condattr_t *__attr) + __THROW __nonnull ((1)); + +/* Destroy condition variable attribute ATTR. */ +extern int pthread_condattr_destroy (pthread_condattr_t *__attr) + __THROW __nonnull ((1)); + +/* Get the process-shared flag of the condition variable attribute ATTR. */ +extern int pthread_condattr_getpshared (__const pthread_condattr_t * + __restrict __attr, + int *__restrict __pshared) + __THROW __nonnull ((1, 2)); + +/* Set the process-shared flag of the condition variable attribute ATTR. */ +extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, + int __pshared) __THROW __nonnull ((1)); + +#ifdef __USE_XOPEN2K +/* Get the clock selected for the conditon variable attribute ATTR. */ +extern int pthread_condattr_getclock (__const pthread_condattr_t * + __restrict __attr, + __clockid_t *__restrict __clock_id) + __THROW __nonnull ((1, 2)); + +/* Set the clock selected for the conditon variable attribute ATTR. */ +extern int pthread_condattr_setclock (pthread_condattr_t *__attr, + __clockid_t __clock_id) + __THROW __nonnull ((1)); +#endif + + +#ifdef __USE_XOPEN2K +/* Functions to handle spinlocks. */ + +/* Initialize the spinlock LOCK. If PSHARED is nonzero the spinlock can + be shared between different processes. */ +extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared) + __THROW __nonnull ((1)); + +/* Destroy the spinlock LOCK. */ +extern int pthread_spin_destroy (pthread_spinlock_t *__lock) + __THROW __nonnull ((1)); + +/* Wait until spinlock LOCK is retrieved. */ +extern int pthread_spin_lock (pthread_spinlock_t *__lock) + __THROW __nonnull ((1)); + +/* Try to lock spinlock LOCK. */ +extern int pthread_spin_trylock (pthread_spinlock_t *__lock) + __THROW __nonnull ((1)); + +/* Release spinlock LOCK. */ +extern int pthread_spin_unlock (pthread_spinlock_t *__lock) + __THROW __nonnull ((1)); + + +/* Functions to handle barriers. */ + +/* Initialize BARRIER with the attributes in ATTR. The barrier is + opened when COUNT waiters arrived. */ +extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier, + __const pthread_barrierattr_t *__restrict + __attr, unsigned int __count) + __THROW __nonnull ((1)); + +/* Destroy a previously dynamically initialized barrier BARRIER. */ +extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) + __THROW __nonnull ((1)); + +/* Wait on barrier BARRIER. */ +extern int pthread_barrier_wait (pthread_barrier_t *__barrier) + __THROW __nonnull ((1)); + + +/* Initialize barrier attribute ATTR. */ +extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) + __THROW __nonnull ((1)); + +/* Destroy previously dynamically initialized barrier attribute ATTR. */ +extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) + __THROW __nonnull ((1)); + +/* Get the process-shared flag of the barrier attribute ATTR. */ +extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t * + __restrict __attr, + int *__restrict __pshared) + __THROW __nonnull ((1, 2)); + +/* Set the process-shared flag of the barrier attribute ATTR. */ +extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr, + int __pshared) + __THROW __nonnull ((1)); +#endif + + +/* Functions for handling thread-specific data. */ + +/* Create a key value identifying a location in the thread-specific + data area. Each thread maintains a distinct thread-specific data + area. DESTR_FUNCTION, if non-NULL, is called with the value + associated to that key when the key is destroyed. + DESTR_FUNCTION is not called if the value associated is NULL when + the key is destroyed. */ +extern int pthread_key_create (pthread_key_t *__key, + void (*__destr_function) (void *)) + __THROW __nonnull ((1)); + +/* Destroy KEY. */ +extern int pthread_key_delete (pthread_key_t __key) __THROW; + +/* Return current value of the thread-specific data slot identified by KEY. */ +extern void *pthread_getspecific (pthread_key_t __key) __THROW; + +/* Store POINTER in the thread-specific data slot identified by KEY. */ +extern int pthread_setspecific (pthread_key_t __key, + __const void *__pointer) __THROW ; + + +#ifdef __USE_XOPEN2K +/* Get ID of CPU-time clock for thread THREAD_ID. */ +extern int pthread_getcpuclockid (pthread_t __thread_id, + __clockid_t *__clock_id) + __THROW __nonnull ((2)); +#endif + + +/* Install handlers to be called when a new process is created with FORK. + The PREPARE handler is called in the parent process just before performing + FORK. The PARENT handler is called in the parent process just after FORK. + The CHILD handler is called in the child process. Each of the three + handlers can be NULL, meaning that no handler needs to be called at that + point. + PTHREAD_ATFORK can be called several times, in which case the PREPARE + handlers are called in LIFO order (last added with PTHREAD_ATFORK, + first called before FORK), and the PARENT and CHILD handlers are called + in FIFO (first added, first called). */ + +extern int pthread_atfork (void (*__prepare) (void), + void (*__parent) (void), + void (*__child) (void)) __THROW; + + +#ifdef __USE_EXTERN_INLINES +/* Optimizations. */ +__extern_inline int +__NTH (pthread_equal (pthread_t __thread1, pthread_t __thread2)) +{ + return __thread1 == __thread2; +} +#endif + +__END_DECLS + +#endif /* pthread.h */ + +#ifndef _PTHREAD_H_HPPA_ +#define _PTHREAD_H_HPPA_ 1 + +/* The pthread_cond_t initializer is compatible only with NPTL. We do not + want to be forwards compatible, we eventually want to drop the code + that has to clear the old LT initializer. */ +#undef PTHREAD_COND_INITIALIZER +#define PTHREAD_COND_INITIALIZER { { 0, 0, 0, (void *) 0, 0, 0, 0, 0, 0 } } + +/* The pthread_mutex_t and pthread_rwlock_t initializers are compatible + only with NPTL. NPTL assumes pthread_rwlock_t is all zero. */ +#undef PTHREAD_MUTEX_INITIALIZER +#undef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP +#undef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP +#undef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP +/* Mutex initializers. */ +#define PTHREAD_MUTEX_INITIALIZER \ + { { 0, 0, 0, 0, { 0, 0, 0, 0 }, 0, { 0 }, 0, 0 } } +#ifdef __USE_GNU +# define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \ + { { 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, { 0, 0, 0, 0 }, 0, { 0 }, 0, 0 } } +# define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \ + { { 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, { 0, 0, 0, 0 }, 0, { 0 }, 0, 0 } } +# define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \ + { { 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, { 0, 0, 0, 0 }, 0, { 0 }, 0, 0 } } +#endif + +#undef PTHREAD_RWLOCK_INITIALIZER +#undef PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP +/* Read-write lock initializers. */ +#define PTHREAD_RWLOCK_INITIALIZER \ + { { { 0, 0, 0, 0 }, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } } +#ifdef __USE_GNU +# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \ + { { { 0, 0, 0, 0 }, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,\ + 0, 0, 0 } } +#endif /* Unix98 or XOpen2K */ + +#endif + diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pthreadP.h b/sysdeps/unix/sysv/linux/hppa/nptl/pthreadP.h new file mode 100644 index 0000000000..0e68ccf0f7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/nptl/pthreadP.h @@ -0,0 +1,17 @@ +#include_next +#ifndef _PTHREADP_H_HPPA_ +#define _PTHREADP_H_HPPA_ 1 + +/* Internal cond functions. */ +extern int __pthread_cond_broadcast_internal (pthread_cond_t *cond); +extern int __pthread_cond_destroy_internal (pthread_cond_t *cond); +extern int __pthread_cond_init_internal (pthread_cond_t *cond, + const pthread_condattr_t *cond_attr); +extern int __pthread_cond_signal_internal (pthread_cond_t *cond); +extern int __pthread_cond_timedwait_internal (pthread_cond_t *cond, + pthread_mutex_t *mutex, + const struct timespec *abstime); +extern int __pthread_cond_wait_internal (pthread_cond_t *cond, + pthread_mutex_t *mutex); +#endif + diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_broadcast.c b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_broadcast.c new file mode 100644 index 0000000000..e43ce349e2 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_broadcast.c @@ -0,0 +1,43 @@ +/* Copyright (C) 2009 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Carlos O'Donell , 2009. + + 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 INCLUDED_SELF +# define INCLUDED_SELF +# include +#else +# include +# include +# include +# include +int +__pthread_cond_broadcast (cond) + pthread_cond_t *cond; +{ + cond_compat_check_and_clear (cond); + return __pthread_cond_broadcast_internal (cond); +} +versioned_symbol (libpthread, __pthread_cond_broadcast, pthread_cond_broadcast, + GLIBC_2_3_2); +# undef versioned_symbol +# define versioned_symbol(lib, local, symbol, version) +# undef __pthread_cond_broadcast +# define __pthread_cond_broadcast __pthread_cond_broadcast_internal +# include_next +#endif + diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_destroy.c b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_destroy.c new file mode 100644 index 0000000000..3b606d9c6d --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_destroy.c @@ -0,0 +1,43 @@ +/* Copyright (C) 2009 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Carlos O'Donell , 2009. + + 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 INCLUDED_SELF +# define INCLUDED_SELF +# include +#else +# include +# include +# include +# include +int +__pthread_cond_destroy (cond) + pthread_cond_t *cond; +{ + cond_compat_check_and_clear (cond); + return __pthread_cond_destroy_internal (cond); +} +versioned_symbol (libpthread, __pthread_cond_destroy, pthread_cond_destroy, + GLIBC_2_3_2); +# undef versioned_symbol +# define versioned_symbol(lib, local, symbol, version) +# undef __pthread_cond_destroy +# define __pthread_cond_destroy __pthread_cond_destroy_internal +# include_next +#endif + diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_init.c b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_init.c new file mode 100644 index 0000000000..a55c285b10 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_init.c @@ -0,0 +1,44 @@ +/* Copyright (C) 2009 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Carlos O'Donell , 2009. + + 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 INCLUDED_SELF +# define INCLUDED_SELF +# include +#else +# include +# include +# include +# include +int +__pthread_cond_init (cond, cond_attr) + pthread_cond_t *cond; + const pthread_condattr_t *cond_attr; +{ + cond_compat_clear (cond); + return __pthread_cond_init_internal (cond, cond_attr); +} +versioned_symbol (libpthread, __pthread_cond_init, pthread_cond_init, + GLIBC_2_3_2); +# undef versioned_symbol +# define versioned_symbol(lib, local, symbol, version) +# undef __pthread_cond_init +# define __pthread_cond_init __pthread_cond_init_internal +# include_next +#endif + diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_signal.c b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_signal.c new file mode 100644 index 0000000000..34a9747ab9 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_signal.c @@ -0,0 +1,43 @@ +/* Copyright (C) 2009 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Carlos O'Donell , 2009. + + 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 INCLUDED_SELF +# define INCLUDED_SELF +# include +#else +# include +# include +# include +# include +int +__pthread_cond_signal (cond) + pthread_cond_t *cond; +{ + cond_compat_check_and_clear (cond); + return __pthread_cond_signal_internal (cond); +} +versioned_symbol (libpthread, __pthread_cond_signal, pthread_cond_signal, + GLIBC_2_3_2); +# undef versioned_symbol +# define versioned_symbol(lib, local, symbol, version) +# undef __pthread_cond_signal +# define __pthread_cond_signal __pthread_cond_signal_internal +# include_next +#endif + diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_timedwait.c b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_timedwait.c new file mode 100644 index 0000000000..5e05621619 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_timedwait.c @@ -0,0 +1,45 @@ +/* Copyright (C) 2009 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Carlos O'Donell , 2009. + + 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 INCLUDED_SELF +# define INCLUDED_SELF +# include +#else +# include +# include +# include +# include +int +__pthread_cond_timedwait (cond, mutex, abstime) + pthread_cond_t *cond; + pthread_mutex_t *mutex; + const struct timespec *abstime; +{ + cond_compat_check_and_clear (cond); + return __pthread_cond_timedwait_internal (cond, mutex, abstime); +} +versioned_symbol (libpthread, __pthread_cond_timedwait, pthread_cond_timedwait, + GLIBC_2_3_2); +# undef versioned_symbol +# define versioned_symbol(lib, local, symbol, version) +# undef __pthread_cond_timedwait +# define __pthread_cond_timedwait __pthread_cond_timedwait_internal +# include_next +#endif + diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_wait.c b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_wait.c new file mode 100644 index 0000000000..80115ed775 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_wait.c @@ -0,0 +1,44 @@ +/* Copyright (C) 2009 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Carlos O'Donell , 2009. + + 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 INCLUDED_SELF +# define INCLUDED_SELF +# include +#else +# include +# include +# include +# include +int +__pthread_cond_wait (cond, mutex) + pthread_cond_t *cond; + pthread_mutex_t *mutex; +{ + cond_compat_check_and_clear (cond); + return __pthread_cond_wait_internal (cond, mutex); +} +versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait, + GLIBC_2_3_2); +# undef versioned_symbol +# define versioned_symbol(lib, local, symbol, version) +# undef __pthread_cond_wait +# define __pthread_cond_wait __pthread_cond_wait_internal +# include_next +#endif + From f1297d79b2ec55f66a02399525879a30e99ea4a7 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Fri, 25 Sep 2009 18:19:03 -0400 Subject: [PATCH 3885/4487] Prevent GCC reusing "hi" and "lo" across system calls. * sysdeps/unix/sysv/linux/mips/mips32/sysdep.h (__SYSCALL_CLOBBERS): Add "hi" and "lo". * sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h (__SYSCALL_CLOBBERS): Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h (__SYSCALL_CLOBBERS): Likewise. --- ChangeLog.mips | 9 +++++++++ sysdeps/unix/sysv/linux/mips/mips32/sysdep.h | 2 +- sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h | 2 +- sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 5ba4297cf7..f8a651d3a7 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,12 @@ +2009-09-25 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/mips/mips32/sysdep.h + (__SYSCALL_CLOBBERS): Add "hi" and "lo". + * sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h + (__SYSCALL_CLOBBERS): Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h + (__SYSCALL_CLOBBERS): Likewise. + 2009-08-05 Joseph Myers * sysdeps/mips/____longjmp_chk.c: Remove. Replaced by.... diff --git a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h index 753f98aa96..20a345d536 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h @@ -285,7 +285,7 @@ }) #define __SYSCALL_CLOBBERS "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", \ - "$14", "$15", "$24", "$25", "memory" + "$14", "$15", "$24", "$25", "hi", "lo", "memory" #endif /* __ASSEMBLER__ */ diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h index 1513306588..665f88b068 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h @@ -253,7 +253,7 @@ }) #define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", \ - "$14", "$15", "$24", "$25", "memory" + "$14", "$15", "$24", "$25", "hi", "lo", "memory" #endif /* __ASSEMBLER__ */ /* Pointer mangling is not yet supported for MIPS. */ diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h index af12bbdf6e..b998a633ff 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h @@ -249,7 +249,7 @@ }) #define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", \ - "$14", "$15", "$24", "$25", "memory" + "$14", "$15", "$24", "$25", "hi", "lo", "memory" #endif /* __ASSEMBLER__ */ /* Pointer mangling is not yet supported for MIPS. */ From 4ba089f88e062e6980ffeb09316bb0de7f40dbf5 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sat, 3 Oct 2009 17:39:05 +0000 Subject: [PATCH 3886/4487] Define F_SETOWN_EX and F_GETOWN_EX for ARM. * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Define F_SETOWN_EX and F_GETOWN_EX. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/bits/fcntl.h | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 9df8b0f424..4fcce6106a 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2009-10-03 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Define F_SETOWN_EX and + F_GETOWN_EX. + 2009-08-06 Joseph Myers * sysdeps/arm/____longjmp_chk.S: Remove. Replaced by.... diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h index 277c97aedf..80ecee7125 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 1995-1998, 2000, 2004, 2006, 2007 + Copyright (C) 1995-1998, 2000, 2004, 2006, 2007, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -85,13 +85,15 @@ #define F_SETLKW64 14 /* Set record locking info (blocking). */ #if defined __USE_BSD || defined __USE_UNIX98 -# define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */ -# define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */ +# define F_SETOWN 8 /* Get owner (process receiving SIGIO). */ +# define F_GETOWN 9 /* Set owner (process receiving SIGIO). */ #endif #ifdef __USE_GNU # define F_SETSIG 10 /* Set number of signal to be sent. */ # define F_GETSIG 11 /* Get number of signal to be sent. */ +# define F_SETOWN_EX 12 /* Get owner (thread receiving SIGIO). */ +# define F_GETOWN_EX 13 /* Set owner (thread receiving SIGIO). */ #endif #ifdef __USE_GNU From afd09ae82a5f6cc0a358acfe72e8463b37003131 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sat, 3 Oct 2009 17:39:53 +0000 Subject: [PATCH 3887/4487] Define F_SETOWN_EX and F_GETOWN_EX for MIPS. * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Define F_SETOWN_EX and F_GETOWN_EX. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 10 ++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index f8a651d3a7..370c9c76c8 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2009-10-03 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Define F_SETOWN_EX + and F_GETOWN_EX. + 2009-09-25 Daniel Jacobowitz * sysdeps/unix/sysv/linux/mips/mips32/sysdep.h diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index ef84e96d36..e2c714b1e8 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -1,6 +1,6 @@ /* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2003, 2004, 2006, 2007 - Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2003, 2004, 2006, + 2007, 2009 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 @@ -87,13 +87,15 @@ #define F_SETLKW64 35 /* Set record locking info (blocking). */ #if defined __USE_BSD || defined __USE_UNIX98 -# define F_SETOWN 24 /* Get owner of socket (receiver of SIGIO). */ -# define F_GETOWN 23 /* Set owner of socket (receiver of SIGIO). */ +# define F_SETOWN 24 /* Get owner (process receiving SIGIO). */ +# define F_GETOWN 23 /* Set owner (process receiving SIGIO). */ #endif #ifdef __USE_GNU # define F_SETSIG 10 /* Set number of signal to be sent. */ # define F_GETSIG 11 /* Get number of signal to be sent. */ +# define F_SETOWN_EX 12 /* Get owner (thread receiving SIGIO). */ +# define F_GETOWN_EX 13 /* Set owner (thread receiving SIGIO). */ #endif #ifdef __USE_GNU From b5c2620bee9fb698c642fa609ee03d6a87ac1552 Mon Sep 17 00:00:00 2001 From: Julian Brown Date: Thu, 22 Oct 2009 19:22:35 +0000 Subject: [PATCH 3888/4487] Fix locating GOT for Thumb-2 PIE binaries. * sysdeps/arm/elf/start.S (_start): Avoid dependency on PC pipeline offset. --- ChangeLog.arm | 5 +++++ sysdeps/arm/elf/start.S | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 4fcce6106a..643a071c4e 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2009-10-22 Julian Brown + + * sysdeps/arm/elf/start.S (_start): Avoid dependency on PC pipeline + offset. + 2009-10-03 Joseph Myers * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Define F_SETOWN_EX and diff --git a/sysdeps/arm/elf/start.S b/sysdeps/arm/elf/start.S index 0cf4339b46..d21102ea58 100644 --- a/sysdeps/arm/elf/start.S +++ b/sysdeps/arm/elf/start.S @@ -87,8 +87,8 @@ _start: #ifdef SHARED ldr sl, .L_GOT -.L_GOT_OFF: - add sl, pc, sl + adr a4, .L_GOT + add sl, sl, a4 ldr ip, .L_GOT+4 /* __libc_csu_fini */ ldr ip, [sl, ip] @@ -125,7 +125,7 @@ _start: #ifdef SHARED .L_GOT: - .word _GLOBAL_OFFSET_TABLE_-(.L_GOT_OFF+8) + .word _GLOBAL_OFFSET_TABLE_ - .L_GOT .word __libc_csu_fini(GOT) .word __libc_csu_init(GOT) .word main(GOT) From fbc4c20a80a81ef6bc624a219ef5f2c746efe563 Mon Sep 17 00:00:00 2001 From: Andrew Stubbs Date: Thu, 22 Oct 2009 19:35:53 +0000 Subject: [PATCH 3889/4487] Fix register conflicts and avoid deprecated instructions in ARM EABI setjmp/longjmp. * setjmp and longjmp were using the obsolete fstmiax and fldmiax instructions. * Because of a confusion with two different sets of names for the same registers (r0...r3 and a1...a4), if VFP was present then the subsequent check for iWMMXt support would use a register that had been clobbered by saving/restoring the VFP registers. (The bit being checked was clobbered by a reserved bit of FPSCR that it always 0 on present hardware, and no present hardware has both VFP and iWMMXt, so this did not cause visible problems.) 2009-10-22 Andrew Stubbs Julian Brown * sysdeps/arm/eabi/setjmp.S (__sigsetjmp): Replace deprecated instruction fstmiax with vstmia. Correct register conflict and comment. * sysdeps/arm/eabi/__longjmp.S (__longjmp): Use vldmia not fldmiax. Don't clobber r1/a2 register before testing IWMMXT hwcap. --- ChangeLog.arm | 9 +++++++++ sysdeps/arm/eabi/__longjmp.S | 10 +++++----- sysdeps/arm/eabi/setjmp.S | 14 ++++++++------ 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 643a071c4e..f098f3c9a6 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,12 @@ +2009-10-22 Andrew Stubbs + Julian Brown + + * sysdeps/arm/eabi/setjmp.S (__sigsetjmp): Replace deprecated + instruction fstmiax with vstmia. + Correct register conflict and comment. + * sysdeps/arm/eabi/__longjmp.S (__longjmp): Use vldmia not fldmiax. + Don't clobber r1/a2 register before testing IWMMXT hwcap. + 2009-10-22 Julian Brown * sysdeps/arm/elf/start.S (_start): Avoid dependency on PC pipeline diff --git a/sysdeps/arm/eabi/__longjmp.S b/sysdeps/arm/eabi/__longjmp.S index f283297089..305919393d 100644 --- a/sysdeps/arm/eabi/__longjmp.S +++ b/sysdeps/arm/eabi/__longjmp.S @@ -59,12 +59,12 @@ ENTRY (__longjmp) beq Lno_vfp /* Restore the VFP registers. */ - /* Following instruction is fldmiax ip!, {d8-d15}. */ - ldc p11, cr8, [r12], #68 + /* Following instruction is vldmia ip!, {d8-d15}. */ + ldc p11, cr8, [r12], #64 /* Restore the floating-point status register. */ - ldr r1, [ip], #4 - /* Following instruction is fmxr fpscr, r1. */ - mcr p10, 7, r1, cr1, cr0, 0 + ldr a3, [ip], #4 + /* Following instruction is fmxr fpscr, a3. */ + mcr p10, 7, a3, cr1, cr0, 0 Lno_vfp: tst a2, #HWCAP_ARM_IWMMXT diff --git a/sysdeps/arm/eabi/setjmp.S b/sysdeps/arm/eabi/setjmp.S index 835db714a6..92f83af3f8 100644 --- a/sysdeps/arm/eabi/setjmp.S +++ b/sysdeps/arm/eabi/setjmp.S @@ -52,13 +52,15 @@ ENTRY (__sigsetjmp) tst a3, #HWCAP_ARM_VFP beq Lno_vfp - /* Store the VFP registers. */ - /* Following instruction is fstmiax ip!, {d8-d15}. */ - stc p11, cr8, [r12], #68 + /* Store the VFP registers. + Don't use VFP instructions directly because this code + is used in non-VFP multilibs. */ + /* Following instruction is vstmia ip!, {d8-d15}. */ + stc p11, cr8, [ip], #64 /* Store the floating-point status register. */ - /* Following instruction is fmrx r2, fpscr. */ - mrc p10, 7, r2, cr1, cr0, 0 - str r2, [ip], #4 + /* Following instruction is vmrs a4, fpscr. */ + mrc p10, 7, a4, cr1, cr0, 0 + str a4, [ip], #4 Lno_vfp: tst a3, #HWCAP_ARM_IWMMXT From 274895575e732a4ae6117c8a4469552b36c5d783 Mon Sep 17 00:00:00 2001 From: Daniel Gutson Date: Thu, 22 Oct 2009 19:39:47 +0000 Subject: [PATCH 3890/4487] Add ARM EABI build attributes. Ensure that all objects in ARM EABI glibc have the proper EABI build attributes to indicate that 8-byte stack alignment is required and preserved. (GNU ld does not currently give errors for mixing code requiring 8-byte alignment - such as anything built with GCC - and code not marked as preserving it, because of the prevalence of assembly code without proper markers to indicate that alignment is preserved. The ARM RealView linker does give such errors.) The bulk of the markers are accomplished by the change to sysdep.h, but a few .S files do not include sysdep.h. In the case of internal_accept4.S, no code is generated because EABI does not have socketcall, but for completeness a dummy file with the right attributes is used to override the default version in libc. * sysdeps/arm/sysdep.h: (Tag_ABI_align8_preserved, Tag_ABI_align8_needed): Attributes added. * sysdeps/arm/elf/start.S: Likewise. * sysdeps/arm/eabi/abi-note.S: New file. * sysdeps/unix/sysv/linux/arm/eabi/internal_accept4.S: New file. --- ChangeLog.arm | 9 +++++++++ sysdeps/arm/eabi/abi-note.S | 9 +++++++++ sysdeps/arm/elf/start.S | 10 ++++++++++ sysdeps/arm/sysdep.h | 9 +++++++++ sysdeps/unix/sysv/linux/arm/eabi/internal_accept4.S | 6 ++++++ 5 files changed, 43 insertions(+) create mode 100644 sysdeps/arm/eabi/abi-note.S create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/internal_accept4.S diff --git a/ChangeLog.arm b/ChangeLog.arm index f098f3c9a6..170d51a4dc 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,12 @@ +2009-10-22 Daniel Gutson + + * sysdeps/arm/sysdep.h: (Tag_ABI_align8_preserved, + Tag_ABI_align8_needed): Attributes added. + * sysdeps/arm/elf/start.S: Likewise. + * sysdeps/arm/eabi/abi-note.S: New file. + * sysdeps/unix/sysv/linux/arm/eabi/internal_accept4.S: New + file. + 2009-10-22 Andrew Stubbs Julian Brown diff --git a/sysdeps/arm/eabi/abi-note.S b/sysdeps/arm/eabi/abi-note.S new file mode 100644 index 0000000000..1060c3d280 --- /dev/null +++ b/sysdeps/arm/eabi/abi-note.S @@ -0,0 +1,9 @@ +/* Tag_ABI_align8_preserved: This code preserves 8-byte + alignment in any callee. */ + .eabi_attribute 25, 1 +/* Tag_ABI_align8_needed: This code may require 8-byte alignment from + the caller. */ + .eabi_attribute 24, 1 + +#include + diff --git a/sysdeps/arm/elf/start.S b/sysdeps/arm/elf/start.S index d21102ea58..c69f19d3bc 100644 --- a/sysdeps/arm/elf/start.S +++ b/sysdeps/arm/elf/start.S @@ -58,6 +58,16 @@ ... NULL */ + +#if defined(__ARM_EABI__) +/* Tag_ABI_align8_preserved: This code preserves 8-byte + alignment in any callee. */ + .eabi_attribute 25, 1 +/* Tag_ABI_align8_needed: This code may require 8-byte alignment from + the caller. */ + .eabi_attribute 24, 1 +#endif + #if defined(__thumb2__) .thumb .syntax unified diff --git a/sysdeps/arm/sysdep.h b/sysdeps/arm/sysdep.h index 8ca77a60cb..442d3a146e 100644 --- a/sysdeps/arm/sysdep.h +++ b/sysdeps/arm/sysdep.h @@ -105,4 +105,13 @@ #define mcount _mcount #endif +#if defined(__ARM_EABI__) +/* Tag_ABI_align8_preserved: This code preserves 8-byte + alignment in any callee. */ + .eabi_attribute 25, 1 +/* Tag_ABI_align8_needed: This code may require 8-byte alignment from + the caller. */ + .eabi_attribute 24, 1 +#endif + #endif /* __ASSEMBLER__ */ diff --git a/sysdeps/unix/sysv/linux/arm/eabi/internal_accept4.S b/sysdeps/unix/sysv/linux/arm/eabi/internal_accept4.S new file mode 100644 index 0000000000..eeb5f50a26 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/internal_accept4.S @@ -0,0 +1,6 @@ +/* Tag_ABI_align8_preserved: This code preserves 8-byte + alignment in any callee. */ + .eabi_attribute 25, 1 +/* Tag_ABI_align8_needed: This code may require 8-byte alignment from + the caller. */ + .eabi_attribute 24, 1 From 0366e55931df501a7d365ab4fa336a8af26869fa Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 29 Oct 2009 16:51:04 +0000 Subject: [PATCH 3891/4487] Define F_OWNER_* and f_owner_ex for ARM. * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Define F_OWNER_* and f_owner_ex. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/bits/fcntl.h | 17 +++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/ChangeLog.arm b/ChangeLog.arm index 170d51a4dc..16380331e1 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2009-10-29 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Define F_OWNER_* and + f_owner_ex. + 2009-10-22 Daniel Gutson * sysdeps/arm/sysdep.h: (Tag_ABI_align8_preserved, diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h index 80ecee7125..e5e70aab4c 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h @@ -168,6 +168,23 @@ struct flock64 }; #endif +#ifdef __USE_GNU +/* Owner types. */ +enum __pid_type + { + F_OWNER_TID = 0, /* Kernel thread. */ + F_OWNER_PID, /* Process. */ + F_OWNER_GID /* Process group. */ + }; + +/* Structure to use with F_GETOWN_EX and F_SETOWN_EX. */ +struct f_owner_ex + { + enum __pid_type type; /* Owner type of ID. */ + __pid_t pid; /* ID of owner. */ + }; +#endif + /* Define some more compatibility macros to be backward compatible with BSD systems which did not managed to hide these kernel macros. */ #ifdef __USE_BSD From a896552ef1c2e17e824dbff64495286a2267605e Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 29 Oct 2009 16:51:55 +0000 Subject: [PATCH 3892/4487] Define F_OWNER_* and f_owner_ex for MIPS. * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Define F_OWNER_* and f_owner_ex. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 17 +++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/ChangeLog.mips b/ChangeLog.mips index 370c9c76c8..d4afc96c8f 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2009-10-29 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Define F_OWNER_* and + f_owner_ex. + 2009-10-03 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Define F_SETOWN_EX diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index e2c714b1e8..e451696524 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -181,6 +181,23 @@ struct flock64 }; #endif +#ifdef __USE_GNU +/* Owner types. */ +enum __pid_type + { + F_OWNER_TID = 0, /* Kernel thread. */ + F_OWNER_PID, /* Process. */ + F_OWNER_GID /* Process group. */ + }; + +/* Structure to use with F_GETOWN_EX and F_SETOWN_EX. */ +struct f_owner_ex + { + enum __pid_type type; /* Owner type of ID. */ + __pid_t pid; /* ID of owner. */ + }; +#endif + /* Define some more compatibility macros to be backward compatible with BSD systems which did not managed to hide these kernel macros. */ #ifdef __USE_BSD From cb182378d7e8350b85ff1034352458711486bd14 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 30 Oct 2009 20:52:15 +0000 Subject: [PATCH 3893/4487] Fix m68k fchownat for empty file names. [BZ #10609] * sysdeps/unix/sysv/linux/m68k/fchownat.c (fchownat): Fix handling of empty parameters for file names. --- ChangeLog.m68k | 6 ++++++ sysdeps/unix/sysv/linux/m68k/fchownat.c | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 41ede0155f..59be68cc07 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,9 @@ +2009-10-30 Joseph Myers + + [BZ #10609] + * sysdeps/unix/sysv/linux/m68k/fchownat.c (fchownat): Fix handling + of empty parameters for file names. + 2009-09-06 Andreas Schwab * sysdeps/unix/sysv/linux/m68k/____longjmp_chk.c: New file. diff --git a/sysdeps/unix/sysv/linux/m68k/fchownat.c b/sysdeps/unix/sysv/linux/m68k/fchownat.c index 6cc093222d..cbf5380994 100644 --- a/sysdeps/unix/sysv/linux/m68k/fchownat.c +++ b/sysdeps/unix/sysv/linux/m68k/fchownat.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2005, 2006, 2009 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 @@ -51,6 +51,12 @@ fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag) if (fd != AT_FDCWD && file[0] != '/') { size_t filelen = strlen (file); + if (__builtin_expect (filelen == 0, 0)) + { + __set_errno (ENOENT); + return -1; + } + static const char procfd[] = "/proc/self/fd/%d/%s"; /* Buffer for the path name we are going to use. It consists of - the string /proc/self/fd/ From b2b2415fe0ec0ea0db880c5b5e9f3fb768f4197e Mon Sep 17 00:00:00 2001 From: Philip Blundell Date: Fri, 6 Nov 2009 08:07:18 +0000 Subject: [PATCH 3894/4487] Fix ARMv4T interworking. * sysdeps/unix/sysv/linux/arm/clone.S: Support V4T interworking. * sysdeps/unix/sysv/linux/arm/sysdep.h (__local_syscall_error): Likewise. * sysdeps/arm/memcpy.S: Likewise. * sysdeps/arm/memmove.S: Likewise. --- ChangeLog.arm | 7 +++++++ sysdeps/arm/memcpy.S | 7 ++++++- sysdeps/arm/memmove.S | 7 ++++++- sysdeps/unix/sysv/linux/arm/clone.S | 8 +++++++- sysdeps/unix/sysv/linux/arm/sysdep.h | 9 +++++++-- 5 files changed, 33 insertions(+), 5 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 16380331e1..d784564cf4 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,10 @@ +2009-11-04 Philip Blundell + + * sysdeps/unix/sysv/linux/arm/clone.S: Support V4T interworking. + * sysdeps/unix/sysv/linux/arm/sysdep.h (__local_syscall_error): Likewise. + * sysdeps/arm/memcpy.S: Likewise. + * sysdeps/arm/memmove.S: Likewise. + 2009-10-29 Joseph Myers * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Define F_OWNER_* and diff --git a/sysdeps/arm/memcpy.S b/sysdeps/arm/memcpy.S index 61cf33cbfb..7f669a6e90 100644 --- a/sysdeps/arm/memcpy.S +++ b/sysdeps/arm/memcpy.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 Free Software Foundation, Inc. +/* Copyright (C) 2006, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by MontaVista Software, Inc. (written by Nicolas Pitre) @@ -130,7 +130,12 @@ ENTRY(memcpy) strcsb r4, [r0], #1 strcsb ip, [r0] +#if defined (__ARM_ARCH_4T__) && defined(__THUMB_INTERWORK__) + ldmfd sp!, {r0, r4, lr} + bx lr +#else ldmfd sp!, {r0, r4, pc} +#endif 9: rsb ip, ip, #4 cmp ip, #2 diff --git a/sysdeps/arm/memmove.S b/sysdeps/arm/memmove.S index eda1bcc9b7..9c9b2344d2 100644 --- a/sysdeps/arm/memmove.S +++ b/sysdeps/arm/memmove.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2006, 2008 Free Software Foundation, Inc. +/* Copyright (C) 2006, 2008, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by MontaVista Software, Inc. (written by Nicolas Pitre) @@ -144,7 +144,12 @@ ENTRY(memmove) strneb r3, [r0, #-1]! strcsb r4, [r0, #-1]! strcsb ip, [r0, #-1] +#if defined (__ARM_ARCH_4T__) && defined (__THUMB_INTERWORK__) + ldmfd sp!, {r0, r4, lr} + bx lr +#else ldmfd sp!, {r0, r4, pc} +#endif 9: cmp ip, #2 ldrgtb r3, [r1, #-1]! diff --git a/sysdeps/unix/sysv/linux/arm/clone.S b/sysdeps/unix/sysv/linux/arm/clone.S index cfd2e7ef71..1a19f5b558 100644 --- a/sysdeps/unix/sysv/linux/arm/clone.S +++ b/sysdeps/unix/sysv/linux/arm/clone.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998, 1999, 2002, 2005, 2008 +/* Copyright (C) 1996, 1997, 1998, 1999, 2002, 2005, 2008, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Pat Beirne @@ -96,8 +96,14 @@ ENTRY(__clone) #endif @ pick the function arg and call address off the stack and execute ldr r0, [sp, #4] +#if defined(__ARM_ARCH_4T__) && defined(__THUMB_INTERWORK__) + ldr ip, [sp], #8 + mov lr, pc + bx ip +#else mov lr, pc ldr pc, [sp], #8 +#endif @ and we are done, passing the return value through r0 b PLTJMP(HIDDEN_JUMPTARGET(_exit)) diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index 3d7fafcb6f..3911aee626 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 93, 1995-2000, 2002, 2003, 2005, 2006 +/* Copyright (C) 1992, 93, 1995-2000, 2002, 2003, 2005, 2006, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, , August 1995. @@ -129,6 +129,11 @@ __local_syscall_error: \ DO_RET(lr); \ 1: .word C_SYMBOL_NAME(rtld_errno) - 0b - 8; # else +#if defined(__ARM_ARCH_4T__) && defined(__THUMB_INTERWORK__) +#define POP_PC ldr lr, [sp], #4; bx lr +#else +#define POP_PC ldr pc, [sp], #4 +#endif # define SYSCALL_ERROR_HANDLER \ __local_syscall_error: \ str lr, [sp, #-4]!; \ @@ -138,7 +143,7 @@ __local_syscall_error: \ rsb r1, r1, #0; \ str r1, [r0]; \ mvn r0, #0; \ - ldr pc, [sp], #4; + POP_PC; # endif #else # define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */ From b055d3f1f7e2d2ab315ef018390534b1a013cf31 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 6 Nov 2009 23:44:33 +0000 Subject: [PATCH 3895/4487] Fix ARM fallocate for -D_FILE_OFFSET_BITS=64. * sysdeps/unix/sysv/linux/arm/bits/fcntl.h (fallocate): Fix types of last two arguments when -D_FILE_OFFSET_BITS=64. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/bits/fcntl.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index d784564cf4..58bfada3cd 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2009-11-06 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/bits/fcntl.h (fallocate): Fix types + of last two arguments when -D_FILE_OFFSET_BITS=64. + 2009-11-04 Philip Blundell * sysdeps/unix/sysv/linux/arm/clone.S: Support V4T interworking. diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h index e5e70aab4c..6388904852 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h @@ -259,8 +259,8 @@ extern ssize_t tee (int __fdin, int __fdout, size_t __len, extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len); # else # ifdef __REDIRECT -extern int __REDIRECT (fallocate, (int __fd, int __mode, __off_t __offset, - __off_t __len), +extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset, + __off64_t __len), fallocate64); # else # define fallocate fallocate64 From 86ad0d12e1c7de85ca88c00fb8975b7a56be915e Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 6 Nov 2009 23:45:30 +0000 Subject: [PATCH 3896/4487] Fix MIPS fallocate for -D_FILE_OFFSET_BITS=64. * sysdeps/unix/sysv/linux/mips/bits/fcntl.h (fallocate): Fix types of last two arguments when -D_FILE_OFFSET_BITS=64. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index d4afc96c8f..e7a051811b 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2009-11-06 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/fcntl.h (fallocate): Fix types + of last two arguments when -D_FILE_OFFSET_BITS=64. + 2009-10-29 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Define F_OWNER_* and diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index e451696524..88f752db6a 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -272,8 +272,8 @@ extern ssize_t tee (int __fdin, int __fdout, size_t __len, extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len); # else # ifdef __REDIRECT -extern int __REDIRECT (fallocate, (int __fd, int __mode, __off_t __offset, - __off_t __len), +extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset, + __off64_t __len), fallocate64); # else # define fallocate fallocate64 From 1789cafb5705e51f83cdc2befa74fc9932e77f3c Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sat, 7 Nov 2009 13:30:54 +0000 Subject: [PATCH 3897/4487] Fix M68K fallocate for -D_FILE_OFFSET_BITS=64. * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h (fallocate): Fix types of last two arguments when -D_FILE_OFFSET_BITS=64. --- ChangeLog.m68k | 5 +++++ sysdeps/unix/sysv/linux/m68k/bits/fcntl.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 59be68cc07..6d8c26f038 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2009-11-07 Joseph Myers + + * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h (fallocate): Fix types + of last two arguments when -D_FILE_OFFSET_BITS=64. + 2009-10-30 Joseph Myers [BZ #10609] diff --git a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h index 1e396dcdbb..3d9ef2e577 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h @@ -239,8 +239,8 @@ extern ssize_t tee (int __fdin, int __fdout, size_t __len, extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len); # else # ifdef __REDIRECT -extern int __REDIRECT (fallocate, (int __fd, int __mode, __off_t __offset, - __off_t __len), +extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset, + __off64_t __len), fallocate64); # else # define fallocate fallocate64 From 52c693bd745209dfb9aacce873d516fc369d1e7c Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Tue, 10 Nov 2009 21:12:55 +0000 Subject: [PATCH 3898/4487] Fix alpha __fxstatat for empty file names. [BZ #10609] * sysdeps/unix/sysv/linux/alpha/fxstatat.c (__fxstatat): Fix handling of empty parameters for file names. --- ChangeLog.alpha | 6 ++++++ sysdeps/unix/sysv/linux/alpha/fxstatat.c | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index eb23873a9e..5a9b442ee3 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,9 @@ +2009-11-10 Matt Turner + + [BZ #10609] + * sysdeps/unix/sysv/linux/alpha/fxstatat.c (__fxstatat): Fix handling + of empty parameters for file names. + 2009-07-13 Aurelien Jarno [BZ #10158] diff --git a/sysdeps/unix/sysv/linux/alpha/fxstatat.c b/sysdeps/unix/sysv/linux/alpha/fxstatat.c index 497694619a..66cf4f7229 100644 --- a/sysdeps/unix/sysv/linux/alpha/fxstatat.c +++ b/sysdeps/unix/sysv/linux/alpha/fxstatat.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2005, 2006, 2009 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 @@ -46,6 +46,12 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag) if (fd != AT_FDCWD && file[0] != '/') { size_t filelen = strlen (file); + if (__builtin_expect (filelen == 0, 0)) + { + __set_errno (ENOENT); + return -1; + } + static const char procfd[] = "/proc/self/fd/%d/%s"; /* Buffer for the path name we are going to use. It consists of - the string /proc/self/fd/ From 06bda6deb5b623464e40ead2ded9c8b9a8cf8b00 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sat, 14 Nov 2009 22:39:23 +0000 Subject: [PATCH 3899/4487] Fix F_SETOWN_EX and F_GETOWN_EX definitions for ARM. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/bits/fcntl.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 58bfada3cd..068ce75608 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2009-11-14 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/bits/fcntl.h (F_SETOWN_EX, + F_GETOWN_EX): Update values. + 2009-11-06 Joseph Myers * sysdeps/unix/sysv/linux/arm/bits/fcntl.h (fallocate): Fix types diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h index 6388904852..e4b6187f91 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h @@ -92,8 +92,8 @@ #ifdef __USE_GNU # define F_SETSIG 10 /* Set number of signal to be sent. */ # define F_GETSIG 11 /* Get number of signal to be sent. */ -# define F_SETOWN_EX 12 /* Get owner (thread receiving SIGIO). */ -# define F_GETOWN_EX 13 /* Set owner (thread receiving SIGIO). */ +# define F_SETOWN_EX 15 /* Get owner (thread receiving SIGIO). */ +# define F_GETOWN_EX 16 /* Set owner (thread receiving SIGIO). */ #endif #ifdef __USE_GNU From 37a907cc8639abb450fb596e350fb08e17612f1a Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sat, 14 Nov 2009 22:40:19 +0000 Subject: [PATCH 3900/4487] Fix F_SETOWN_EX and F_GETOWN_EX definitions for MIPS. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index e7a051811b..b0d633794f 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2009-11-14 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/fcntl.h (F_SETOWN_EX, + F_GETOWN_EX): Update values. + 2009-11-06 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/fcntl.h (fallocate): Fix types diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index 88f752db6a..6fa74dd840 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -94,8 +94,8 @@ #ifdef __USE_GNU # define F_SETSIG 10 /* Set number of signal to be sent. */ # define F_GETSIG 11 /* Get number of signal to be sent. */ -# define F_SETOWN_EX 12 /* Get owner (thread receiving SIGIO). */ -# define F_GETOWN_EX 13 /* Set owner (thread receiving SIGIO). */ +# define F_SETOWN_EX 15 /* Get owner (thread receiving SIGIO). */ +# define F_GETOWN_EX 16 /* Set owner (thread receiving SIGIO). */ #endif #ifdef __USE_GNU From 722367f5d9ab031cdcc58c428ba50b51342205b4 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 14 Nov 2009 23:57:55 +0100 Subject: [PATCH 3901/4487] Define F_[GS]ETOWN_EX, F_OWNER_[TPG]ID, f_owner_ex for m68k --- ChangeLog.m68k | 6 ++++++ sysdeps/unix/sysv/linux/m68k/bits/fcntl.h | 21 ++++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 6d8c26f038..fd4dfdd5e8 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,9 @@ +2009-11-14 Andreas Schwab + + * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h (F_SETOWN_EX) + (F_GETOWN_EX, F_OWNER_TID, F_OWNER_PID, F_OWNER_GID, f_owner_ex): + Define. + 2009-11-07 Joseph Myers * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h (fallocate): Fix types diff --git a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h index 3d9ef2e577..6fc7a0aeb0 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 2000, 2004, 2008 Free Software Foundation, Inc. + Copyright (C) 2000, 2004, 2008, 2009 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 @@ -91,6 +91,8 @@ #ifdef __USE_GNU # define F_SETSIG 10 /* Set number of signal to be sent. */ # define F_GETSIG 11 /* Get number of signal to be sent. */ +# define F_SETOWN_EX 15 /* Get owner (thread receiving SIGIO). */ +# define F_GETOWN_EX 16 /* Set owner (thread receiving SIGIO). */ #endif #ifdef __USE_GNU @@ -165,6 +167,23 @@ struct flock64 }; #endif +#ifdef __USE_GNU +/* Owner types. */ +enum __pid_type + { + F_OWNER_TID = 0, /* Kernel thread. */ + F_OWNER_PID, /* Process. */ + F_OWNER_GID /* Process group. */ + }; + +/* Structure to use with F_GETOWN_EX and F_SETOWN_EX. */ +struct f_owner_ex + { + enum __pid_type type; /* Owner type of ID. */ + __pid_t pid; /* ID of owner. */ + }; +#endif + /* Define some more compatibility macros to be backward compatible with BSD systems which did not managed to hide these kernel macros. */ #ifdef __USE_BSD From a8e59aa896ea69fe6a7064686647f2dd178e170e Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 15 Nov 2009 00:15:17 +0100 Subject: [PATCH 3902/4487] Add libgcc_s.h for m68k --- ChangeLog.m68k | 4 ++++ sysdeps/m68k/libgcc_s.h | 2 ++ 2 files changed, 6 insertions(+) create mode 100644 sysdeps/m68k/libgcc_s.h diff --git a/ChangeLog.m68k b/ChangeLog.m68k index fd4dfdd5e8..4dc4f41b14 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,7 @@ +2009-11-15 Andreas Schwab + + * sysdeps/m68k/libgcc_s.h: New file. + 2009-11-14 Andreas Schwab * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h (F_SETOWN_EX) diff --git a/sysdeps/m68k/libgcc_s.h b/sysdeps/m68k/libgcc_s.h new file mode 100644 index 0000000000..8523ad135d --- /dev/null +++ b/sysdeps/m68k/libgcc_s.h @@ -0,0 +1,2 @@ +/* Name of libgcc_s library provided by gcc, m68k version. */ +#define LIBGCC_S_SO "libgcc_s.so.2" From 8ef75725cea68a7b64c457939d8eca552636729e Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Sun, 15 Nov 2009 14:19:25 -0500 Subject: [PATCH 3903/4487] Use LIBGCC_S_SO to override generic version. [BZ #10920] Use the new generic override to specify the hppa specific libgcc_s.so.4 version number. Remove the files which hppa no longer has to duplicate in order to accomplish overriding libgcc_s.so version number. 2009-11-08 Carlos O'Donell [BZ #10920] * sysdeps/hppa/libgcc_s.h: New file. * sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c: Remove. * sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c: Remove. --- ChangeLog.hppa | 8 + sysdeps/hppa/libgcc_s.h | 2 + .../linux/hppa/nptl/unwind-forcedunwind.c | 145 ------------------ .../unix/sysv/linux/hppa/nptl/unwind-resume.c | 66 -------- 4 files changed, 10 insertions(+), 211 deletions(-) create mode 100644 sysdeps/hppa/libgcc_s.h delete mode 100644 sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c delete mode 100644 sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 77227b08bd..1bec9eb823 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,11 @@ +2009-11-08 Carlos O'Donell + + [BZ #10920] + + * sysdeps/hppa/libgcc_s.h: New file. + * sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c: Remove. + * sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c: Remove. + 2009-09-08 Carlos O'Donell sysdeps/unix/sysv/linux/hppa/ diff --git a/sysdeps/hppa/libgcc_s.h b/sysdeps/hppa/libgcc_s.h new file mode 100644 index 0000000000..8dd1d72de0 --- /dev/null +++ b/sysdeps/hppa/libgcc_s.h @@ -0,0 +1,2 @@ +/* Name of libgcc_s library provided by gcc. */ +#define LIBGCC_S_SO "libgcc_s.so.4" diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c deleted file mode 100644 index e0eef901d0..0000000000 --- a/sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c +++ /dev/null @@ -1,145 +0,0 @@ -/* Copyright (C) 2003, 2005, 2006, 2009 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Jakub Jelinek . - - 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; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include -#include -#include -#include -#include - -static void *libgcc_s_handle; -static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -static _Unwind_Reason_Code (*libgcc_s_personality) - (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, - struct _Unwind_Context *); -static _Unwind_Reason_Code (*libgcc_s_forcedunwind) - (struct _Unwind_Exception *, _Unwind_Stop_Fn, void *); -static _Unwind_Word (*libgcc_s_getcfa) (struct _Unwind_Context *); - -#define LIBGCC_S_SO "libgcc_s.so.4" - -void -__attribute_noinline__ -pthread_cancel_init (void) -{ - void *resume; - void *personality; - void *forcedunwind; - void *getcfa; - void *handle; - - if (__builtin_expect (libgcc_s_handle != NULL, 1)) - { - /* Force gcc to reload all values. */ - asm volatile ("" ::: "memory"); - return; - } - - handle = __libc_dlopen (LIBGCC_S_SO); - - if (handle == NULL - || (resume = __libc_dlsym (handle, "_Unwind_Resume")) == NULL - || (personality = __libc_dlsym (handle, "__gcc_personality_v0")) == NULL - || (forcedunwind = __libc_dlsym (handle, "_Unwind_ForcedUnwind")) - == NULL - || (getcfa = __libc_dlsym (handle, "_Unwind_GetCFA")) == NULL -#ifdef ARCH_CANCEL_INIT - || ARCH_CANCEL_INIT (handle) -#endif - ) - __libc_fatal (LIBGCC_S_SO " must be installed for pthread_cancel to work\n"); - - PTR_MANGLE (resume); - libgcc_s_resume = resume; - PTR_MANGLE (personality); - libgcc_s_personality = personality; - PTR_MANGLE (forcedunwind); - libgcc_s_forcedunwind = forcedunwind; - PTR_MANGLE (getcfa); - libgcc_s_getcfa = getcfa; - /* Make sure libgcc_s_handle is written last. Otherwise, - pthread_cancel_init might return early even when the pointer the - caller is interested in is not initialized yet. */ - atomic_write_barrier (); - libgcc_s_handle = handle; -} - -void -__libc_freeres_fn_section -__unwind_freeres (void) -{ - void *handle = libgcc_s_handle; - if (handle != NULL) - { - libgcc_s_handle = NULL; - __libc_dlclose (handle); - } -} - -void -_Unwind_Resume (struct _Unwind_Exception *exc) -{ - if (__builtin_expect (libgcc_s_handle == NULL, 0)) - pthread_cancel_init (); - - void (*resume) (struct _Unwind_Exception *exc) = libgcc_s_resume; - PTR_DEMANGLE (resume); - resume (exc); -} - -_Unwind_Reason_Code -__gcc_personality_v0 (int version, _Unwind_Action actions, - _Unwind_Exception_Class exception_class, - struct _Unwind_Exception *ue_header, - struct _Unwind_Context *context) -{ - if (__builtin_expect (libgcc_s_handle == NULL, 0)) - pthread_cancel_init (); - - _Unwind_Reason_Code (*personality) - (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, - struct _Unwind_Context *) = libgcc_s_personality; - PTR_DEMANGLE (personality); - return personality (version, actions, exception_class, ue_header, context); -} - -_Unwind_Reason_Code -_Unwind_ForcedUnwind (struct _Unwind_Exception *exc, _Unwind_Stop_Fn stop, - void *stop_argument) -{ - if (__builtin_expect (libgcc_s_handle == NULL, 0)) - pthread_cancel_init (); - - _Unwind_Reason_Code (*forcedunwind) - (struct _Unwind_Exception *, _Unwind_Stop_Fn, void *) - = libgcc_s_forcedunwind; - PTR_DEMANGLE (forcedunwind); - return forcedunwind (exc, stop, stop_argument); -} - -_Unwind_Word -_Unwind_GetCFA (struct _Unwind_Context *context) -{ - if (__builtin_expect (libgcc_s_handle == NULL, 0)) - pthread_cancel_init (); - - _Unwind_Word (*getcfa) (struct _Unwind_Context *) = libgcc_s_getcfa; - PTR_DEMANGLE (getcfa); - return getcfa (context); -} diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c b/sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c deleted file mode 100644 index a31ba1aea1..0000000000 --- a/sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c +++ /dev/null @@ -1,66 +0,0 @@ -/* Copyright (C) 2003, 2009 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Jakub Jelinek . - - 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; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include -#include -#include - -#define LIBGCC_S_SO "libgcc_s.so.4" - -static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -static _Unwind_Reason_Code (*libgcc_s_personality) - (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, - struct _Unwind_Context *); - -static void -init (void) -{ - void *resume, *personality; - void *handle; - - handle = __libc_dlopen (LIBGCC_S_SO); - - if (handle == NULL - || (resume = __libc_dlsym (handle, "_Unwind_Resume")) == NULL - || (personality = __libc_dlsym (handle, "__gcc_personality_v0")) == NULL) - __libc_fatal (LIBGCC_S_SO " must be installed for pthread_cancel to work\n"); - - libgcc_s_resume = resume; - libgcc_s_personality = personality; -} - -void -_Unwind_Resume (struct _Unwind_Exception *exc) -{ - if (__builtin_expect (libgcc_s_resume == NULL, 0)) - init (); - libgcc_s_resume (exc); -} - -_Unwind_Reason_Code -__gcc_personality_v0 (int version, _Unwind_Action actions, - _Unwind_Exception_Class exception_class, - struct _Unwind_Exception *ue_header, - struct _Unwind_Context *context) -{ - if (__builtin_expect (libgcc_s_personality == NULL, 0)) - init (); - return libgcc_s_personality (version, actions, exception_class, - ue_header, context); -} From d086703d6c01362fd66a94923f3f615225f865fc Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Sun, 15 Nov 2009 14:30:29 -0500 Subject: [PATCH 3904/4487] Enable the use of -fPIE on hppa [BZ #6676] Use PIC relocations in start.S to support the use of -fPIE on hppa. 2009-11-15 Carlos O'Donell [BZ #6676] * sysdeps/hppa/elf/start.S: Use R_PARISC_DLTIND* relocations to support -fPIE. --- ChangeLog.hppa | 7 +++++++ sysdeps/hppa/elf/start.S | 14 +++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 1bec9eb823..7ad0561f2f 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,10 @@ +2009-11-15 Carlos O'Donell + + [BZ #6676] + + * sysdeps/hppa/elf/start.S: Use R_PARISC_DLTIND* relocations + to support -fPIE. + 2009-11-08 Carlos O'Donell [BZ #10920] diff --git a/sysdeps/hppa/elf/start.S b/sysdeps/hppa/elf/start.S index 216b14d5cc..c682e9cf79 100644 --- a/sysdeps/hppa/elf/start.S +++ b/sysdeps/hppa/elf/start.S @@ -1,5 +1,5 @@ /* ELF startup code for HPPA. - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2009 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 @@ -96,16 +96,16 @@ _start: #if SHARED /* load main (1st argument) */ - addil LR'.Lpmain, %r19 - ldw RR'.Lpmain(%r1), %r26 + addil LT'.Lpmain, %r19 + ldw RT'.Lpmain(%r1), %r26 ldw 0(%r26),%r26 /* void (*init) (void) (4th argument) */ - addil LR'.Lp__libc_csu_init, %r19 - ldw RR'.Lp__libc_csu_init(%r1), %r23 + addil LT'.Lp__libc_csu_init, %r19 + ldw RT'.Lp__libc_csu_init(%r1), %r23 ldw 0(%r23), %r23 /* void (*fini) (void) (5th argument) */ - addil LR'.Lp__libc_csu_fini, %r19 - ldw RR'.Lp__libc_csu_fini(%r1), %r22 + addil LT'.Lp__libc_csu_fini, %r19 + ldw RT'.Lp__libc_csu_fini(%r1), %r22 ldw 0(%r22), %r22 #else /* load main (1st argument) */ From 926d329540c726f47a3793840d4a472c24c89c18 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Sun, 15 Nov 2009 14:33:51 -0500 Subject: [PATCH 3905/4487] Fix socket constants. [BZ #10527] Provide corrected socket constants that match the kernel values. 2009-11-15 Carlos O'Donell Aurelian Jarno [BZ #10527] * sysdeps/unix/sysv/linux/hppa/socket.h: New file. --- ChangeLog.hppa | 7 + sysdeps/unix/sysv/linux/hppa/socket.h | 407 ++++++++++++++++++++++++++ 2 files changed, 414 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/hppa/socket.h diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 7ad0561f2f..9ab53aa87f 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,10 @@ +2009-11-15 Carlos O'Donell + Aurelian Jarno + + [BZ #10527] + + * sysdeps/unix/sysv/linux/hppa/socket.h: New file. + 2009-11-15 Carlos O'Donell [BZ #6676] diff --git a/sysdeps/unix/sysv/linux/hppa/socket.h b/sysdeps/unix/sysv/linux/hppa/socket.h new file mode 100644 index 0000000000..ac6e81b0ff --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/socket.h @@ -0,0 +1,407 @@ +/* System-specific socket constants and types. Linux version. + Copyright (C) 1991, 1992, 1994-2001, 2004, 2006, 2007, 2008, 2009 + 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_SOCKET_H +#define __BITS_SOCKET_H + +#ifndef _SYS_SOCKET_H +# error "Never include directly; use instead." +#endif + +#define __need_size_t +#include + +#include + +/* Type for length arguments in socket calls. */ +#ifndef __socklen_t_defined +typedef __socklen_t socklen_t; +# define __socklen_t_defined +#endif + +/* Types of sockets. */ +enum __socket_type +{ + SOCK_STREAM = 1, /* Sequenced, reliable, connection-based + byte streams. */ +#define SOCK_STREAM SOCK_STREAM + SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams + of fixed maximum length. */ +#define SOCK_DGRAM SOCK_DGRAM + SOCK_RAW = 3, /* Raw protocol interface. */ +#define SOCK_RAW SOCK_RAW + SOCK_RDM = 4, /* Reliably-delivered messages. */ +#define SOCK_RDM SOCK_RDM + SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, + datagrams of fixed maximum length. */ +#define SOCK_SEQPACKET SOCK_SEQPACKET + SOCK_DCCP = 6, /* Datagram Congestion Control Protocol. */ +#define SOCK_DCCP SOCK_DCCP + SOCK_PACKET = 10, /* Linux specific way of getting packets + at the dev level. For writing rarp and + other similar things on the user level. */ +#define SOCK_PACKET SOCK_PACKET + + /* Flags to be ORed into the type parameter of socket and socketpair and + used for the flags parameter of paccept. */ + + SOCK_CLOEXEC = 02000000, /* Atomically set close-on-exec flag for the + new descriptor(s). */ +#define SOCK_CLOEXEC SOCK_CLOEXEC +#undef SOCK_NONBLOCK + SOCK_NONBLOCK = 0x40000000 /* Atomically mark descriptor(s) as + non-blocking. */ +#define SOCK_NONBLOCK SOCK_NONBLOCK +}; + +/* Protocol families. */ +#define PF_UNSPEC 0 /* Unspecified. */ +#define PF_LOCAL 1 /* Local to host (pipes and file-domain). */ +#define PF_UNIX PF_LOCAL /* POSIX name for PF_LOCAL. */ +#define PF_FILE PF_LOCAL /* Another non-standard name for PF_LOCAL. */ +#define PF_INET 2 /* IP protocol family. */ +#define PF_AX25 3 /* Amateur Radio AX.25. */ +#define PF_IPX 4 /* Novell Internet Protocol. */ +#define PF_APPLETALK 5 /* Appletalk DDP. */ +#define PF_NETROM 6 /* Amateur radio NetROM. */ +#define PF_BRIDGE 7 /* Multiprotocol bridge. */ +#define PF_ATMPVC 8 /* ATM PVCs. */ +#define PF_X25 9 /* Reserved for X.25 project. */ +#define PF_INET6 10 /* IP version 6. */ +#define PF_ROSE 11 /* Amateur Radio X.25 PLP. */ +#define PF_DECnet 12 /* Reserved for DECnet project. */ +#define PF_NETBEUI 13 /* Reserved for 802.2LLC project. */ +#define PF_SECURITY 14 /* Security callback pseudo AF. */ +#define PF_KEY 15 /* PF_KEY key management API. */ +#define PF_NETLINK 16 +#define PF_ROUTE PF_NETLINK /* Alias to emulate 4.4BSD. */ +#define PF_PACKET 17 /* Packet family. */ +#define PF_ASH 18 /* Ash. */ +#define PF_ECONET 19 /* Acorn Econet. */ +#define PF_ATMSVC 20 /* ATM SVCs. */ +#define PF_RDS 21 /* RDS sockets. */ +#define PF_SNA 22 /* Linux SNA Project */ +#define PF_IRDA 23 /* IRDA sockets. */ +#define PF_PPPOX 24 /* PPPoX sockets. */ +#define PF_WANPIPE 25 /* Wanpipe API sockets. */ +#define PF_LLC 26 /* Linux LLC. */ +#define PF_CAN 29 /* Controller Area Network. */ +#define PF_TIPC 30 /* TIPC sockets. */ +#define PF_BLUETOOTH 31 /* Bluetooth sockets. */ +#define PF_IUCV 32 /* IUCV sockets. */ +#define PF_RXRPC 33 /* RxRPC sockets. */ +#define PF_ISDN 34 /* mISDN sockets. */ +#define PF_PHONET 35 /* Phonet sockets. */ +#define PF_IEEE802154 36 /* IEEE 802.15.4 sockets. */ +#define PF_MAX 37 /* For now.. */ + +/* Address families. */ +#define AF_UNSPEC PF_UNSPEC +#define AF_LOCAL PF_LOCAL +#define AF_UNIX PF_UNIX +#define AF_FILE PF_FILE +#define AF_INET PF_INET +#define AF_AX25 PF_AX25 +#define AF_IPX PF_IPX +#define AF_APPLETALK PF_APPLETALK +#define AF_NETROM PF_NETROM +#define AF_BRIDGE PF_BRIDGE +#define AF_ATMPVC PF_ATMPVC +#define AF_X25 PF_X25 +#define AF_INET6 PF_INET6 +#define AF_ROSE PF_ROSE +#define AF_DECnet PF_DECnet +#define AF_NETBEUI PF_NETBEUI +#define AF_SECURITY PF_SECURITY +#define AF_KEY PF_KEY +#define AF_NETLINK PF_NETLINK +#define AF_ROUTE PF_ROUTE +#define AF_PACKET PF_PACKET +#define AF_ASH PF_ASH +#define AF_ECONET PF_ECONET +#define AF_ATMSVC PF_ATMSVC +#define AF_RDS PF_RDS +#define AF_SNA PF_SNA +#define AF_IRDA PF_IRDA +#define AF_PPPOX PF_PPPOX +#define AF_WANPIPE PF_WANPIPE +#define AF_LLC PF_LLC +#define AF_CAN PF_CAN +#define AF_TIPC PF_TIPC +#define AF_BLUETOOTH PF_BLUETOOTH +#define AF_IUCV PF_IUCV +#define AF_RXRPC PF_RXRPC +#define AF_ISDN PF_ISDN +#define AF_PHONET PF_PHONET +#define AF_IEEE802154 PF_IEEE802154 +#define AF_MAX PF_MAX + +/* Socket level values. Others are defined in the appropriate headers. + + XXX These definitions also should go into the appropriate headers as + far as they are available. */ +#define SOL_RAW 255 +#define SOL_DECNET 261 +#define SOL_X25 262 +#define SOL_PACKET 263 +#define SOL_ATM 264 /* ATM layer (cell level). */ +#define SOL_AAL 265 /* ATM Adaption Layer (packet level). */ +#define SOL_IRDA 266 + +/* Maximum queue length specifiable by listen. */ +#define SOMAXCONN 128 + +/* Get the definition of the macro to define the common sockaddr members. */ +#include + +/* Structure describing a generic socket address. */ +struct sockaddr + { + __SOCKADDR_COMMON (sa_); /* Common data: address family and length. */ + char sa_data[14]; /* Address data. */ + }; + + +/* Structure large enough to hold any socket address (with the historical + exception of AF_UNIX). We reserve 128 bytes. */ +#define __ss_aligntype unsigned long int +#define _SS_SIZE 128 +#define _SS_PADSIZE (_SS_SIZE - (2 * sizeof (__ss_aligntype))) + +struct sockaddr_storage + { + __SOCKADDR_COMMON (ss_); /* Address family, etc. */ + __ss_aligntype __ss_align; /* Force desired alignment. */ + char __ss_padding[_SS_PADSIZE]; + }; + + +/* Bits in the FLAGS argument to `send', `recv', et al. */ +enum + { + MSG_OOB = 0x01, /* Process out-of-band data. */ +#define MSG_OOB MSG_OOB + MSG_PEEK = 0x02, /* Peek at incoming messages. */ +#define MSG_PEEK MSG_PEEK + MSG_DONTROUTE = 0x04, /* Don't use local routing. */ +#define MSG_DONTROUTE MSG_DONTROUTE +#ifdef __USE_GNU + /* DECnet uses a different name. */ + MSG_TRYHARD = MSG_DONTROUTE, +# define MSG_TRYHARD MSG_DONTROUTE +#endif + MSG_CTRUNC = 0x08, /* Control data lost before delivery. */ +#define MSG_CTRUNC MSG_CTRUNC + MSG_PROXY = 0x10, /* Supply or ask second address. */ +#define MSG_PROXY MSG_PROXY + MSG_TRUNC = 0x20, +#define MSG_TRUNC MSG_TRUNC + MSG_DONTWAIT = 0x40, /* Nonblocking IO. */ +#define MSG_DONTWAIT MSG_DONTWAIT + MSG_EOR = 0x80, /* End of record. */ +#define MSG_EOR MSG_EOR + MSG_WAITALL = 0x100, /* Wait for a full request. */ +#define MSG_WAITALL MSG_WAITALL + MSG_FIN = 0x200, +#define MSG_FIN MSG_FIN + MSG_SYN = 0x400, +#define MSG_SYN MSG_SYN + MSG_CONFIRM = 0x800, /* Confirm path validity. */ +#define MSG_CONFIRM MSG_CONFIRM + MSG_RST = 0x1000, +#define MSG_RST MSG_RST + MSG_ERRQUEUE = 0x2000, /* Fetch message from error queue. */ +#define MSG_ERRQUEUE MSG_ERRQUEUE + MSG_NOSIGNAL = 0x4000, /* Do not generate SIGPIPE. */ +#define MSG_NOSIGNAL MSG_NOSIGNAL + MSG_MORE = 0x8000, /* Sender will send more. */ +#define MSG_MORE MSG_MORE + + MSG_CMSG_CLOEXEC = 0x40000000 /* Set close_on_exit for file + descriptor received through + SCM_RIGHTS. */ +#define MSG_CMSG_CLOEXEC MSG_CMSG_CLOEXEC + }; + + +/* Structure describing messages sent by + `sendmsg' and received by `recvmsg'. */ +struct msghdr + { + void *msg_name; /* Address to send to/receive from. */ + socklen_t msg_namelen; /* Length of address data. */ + + struct iovec *msg_iov; /* Vector of data to send/receive into. */ + size_t msg_iovlen; /* Number of elements in the vector. */ + + void *msg_control; /* Ancillary data (eg BSD filedesc passing). */ + size_t msg_controllen; /* Ancillary data buffer length. + !! The type should be socklen_t but the + definition of the kernel is incompatible + with this. */ + + int msg_flags; /* Flags on received message. */ + }; + +/* Structure used for storage of ancillary data object information. */ +struct cmsghdr + { + size_t cmsg_len; /* Length of data in cmsg_data plus length + of cmsghdr structure. + !! The type should be socklen_t but the + definition of the kernel is incompatible + with this. */ + int cmsg_level; /* Originating protocol. */ + int cmsg_type; /* Protocol specific type. */ +#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L + __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */ +#endif + }; + +/* Ancillary data object manipulation macros. */ +#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L +# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data) +#else +# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1)) +#endif +#define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg) +#define CMSG_FIRSTHDR(mhdr) \ + ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \ + ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) 0) +#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \ + & (size_t) ~(sizeof (size_t) - 1)) +#define CMSG_SPACE(len) (CMSG_ALIGN (len) \ + + CMSG_ALIGN (sizeof (struct cmsghdr))) +#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len)) + +extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr, + struct cmsghdr *__cmsg) __THROW; +#ifdef __USE_EXTERN_INLINES +# ifndef _EXTERN_INLINE +# define _EXTERN_INLINE __extern_inline +# endif +_EXTERN_INLINE struct cmsghdr * +__NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg)) +{ + if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr)) + /* The kernel header does this so there may be a reason. */ + return 0; + + __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg + + CMSG_ALIGN (__cmsg->cmsg_len)); + if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control + + __mhdr->msg_controllen) + || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len) + > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen))) + /* No more entries. */ + return 0; + return __cmsg; +} +#endif /* Use `extern inline'. */ + +/* Socket level message types. This must match the definitions in + . */ +enum + { + SCM_RIGHTS = 0x01 /* Transfer file descriptors. */ +#define SCM_RIGHTS SCM_RIGHTS +#ifdef __USE_GNU + , SCM_CREDENTIALS = 0x02 /* Credentials passing. */ +# define SCM_CREDENTIALS SCM_CREDENTIALS +#endif + }; + +#ifdef __USE_GNU +/* User visible structure for SCM_CREDENTIALS message */ +struct ucred +{ + pid_t pid; /* PID of sending process. */ + uid_t uid; /* UID of sending process. */ + gid_t gid; /* GID of sending process. */ +}; +#endif + +/* Ugly workaround for unclean kernel headers. */ +#if !defined __USE_MISC && !defined __USE_GNU +# ifndef FIOGETOWN +# define __SYS_SOCKET_H_undef_FIOGETOWN +# endif +# ifndef FIOSETOWN +# define __SYS_SOCKET_H_undef_FIOSETOWN +# endif +# ifndef SIOCATMARK +# define __SYS_SOCKET_H_undef_SIOCATMARK +# endif +# ifndef SIOCGPGRP +# define __SYS_SOCKET_H_undef_SIOCGPGRP +# endif +# ifndef SIOCGSTAMP +# define __SYS_SOCKET_H_undef_SIOCGSTAMP +# endif +# ifndef SIOCGSTAMPNS +# define __SYS_SOCKET_H_undef_SIOCGSTAMPNS +# endif +# ifndef SIOCSPGRP +# define __SYS_SOCKET_H_undef_SIOCSPGRP +# endif +#endif + +/* Get socket manipulation related informations from kernel headers. */ +#include + +#if !defined __USE_MISC && !defined __USE_GNU +# ifdef __SYS_SOCKET_H_undef_FIOGETOWN +# undef __SYS_SOCKET_H_undef_FIOGETOWN +# undef FIOGETOWN +# endif +# ifdef __SYS_SOCKET_H_undef_FIOSETOWN +# undef __SYS_SOCKET_H_undef_FIOSETOWN +# undef FIOSETOWN +# endif +# ifdef __SYS_SOCKET_H_undef_SIOCATMARK +# undef __SYS_SOCKET_H_undef_SIOCATMARK +# undef SIOCATMARK +# endif +# ifdef __SYS_SOCKET_H_undef_SIOCGPGRP +# undef __SYS_SOCKET_H_undef_SIOCGPGRP +# undef SIOCGPGRP +# endif +# ifdef __SYS_SOCKET_H_undef_SIOCGSTAMP +# undef __SYS_SOCKET_H_undef_SIOCGSTAMP +# undef SIOCGSTAMP +# endif +# ifdef __SYS_SOCKET_H_undef_SIOCGSTAMPNS +# undef __SYS_SOCKET_H_undef_SIOCGSTAMPNS +# undef SIOCGSTAMPNS +# endif +# ifdef __SYS_SOCKET_H_undef_SIOCSPGRP +# undef __SYS_SOCKET_H_undef_SIOCSPGRP +# undef SIOCSPGRP +# endif +#endif + +/* Structure used to manipulate the SO_LINGER option. */ +struct linger + { + int l_onoff; /* Nonzero to linger on close. */ + int l_linger; /* Time to linger. */ + }; + +#endif /* bits/socket.h */ From a2ed3d2a8e01a7418dca1a7572effc10a33d67fe Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Sun, 15 Nov 2009 14:36:46 -0500 Subject: [PATCH 3906/4487] Remove constants which are now defined in generic file. Several constants are now defined in a generic file and no longer need to be defined in the hppa specific file. 2009-11-15 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: Remove FUTEX_WAITERS, FUTEX_OWNER_DIED, and FUTEX_TID_MASK. --- ChangeLog.hppa | 5 +++++ sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 9ab53aa87f..4d61147a3c 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,8 @@ +2009-11-15 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: + Remove FUTEX_WAITERS, FUTEX_OWNER_DIED, and FUTEX_TID_MASK. + 2009-11-15 Carlos O'Donell Aurelian Jarno diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h index 10be11a01a..b6f6923296 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h @@ -48,11 +48,6 @@ #define FUTEX_BITSET_MATCH_ANY 0xffffffff -/* Bits used in robust mutex implementation. */ -#define FUTEX_WAITERS 0x80000000 -#define FUTEX_OWNER_DIED 0x40000000 -#define FUTEX_TID_MASK 0x3fffffff - /* Values for 'private' parameter of locking macros. Yes, the definition seems to be backwards. But it is not. The bit will be reversed before passing to the system call. */ From 057c783bcab3331cddf1dde299b5ce4533d93e35 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Sun, 15 Nov 2009 15:11:48 -0500 Subject: [PATCH 3907/4487] Implement ELF_MACHINE_LOAD_ADDRESS using PC relative loads. The current ELF_MACHINE_LOAD_ADDRESS used by the generic function pointer code was not safe for use before relocation. The macro has been rewritten to use only PC relative loads. 2009-11-15 Carlos O'Donell * sysdeps/hppa/dl-fptr.h: Update copyright year. Reduce ELF_MACHINE_BOOT_FPTR_TABLE_LEN to 64. Implement ELF_MACHINE_LOAD_ADDRESS using PC relative loads. --- ChangeLog.hppa | 6 ++++++ sysdeps/hppa/dl-fptr.h | 20 +++++++++++--------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 4d61147a3c..342bf5e837 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,9 @@ +2009-11-15 Carlos O'Donell + + * sysdeps/hppa/dl-fptr.h: Update copyright year. + Reduce ELF_MACHINE_BOOT_FPTR_TABLE_LEN to 64. + Implement ELF_MACHINE_LOAD_ADDRESS using PC relative loads. + 2009-11-15 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: diff --git a/sysdeps/hppa/dl-fptr.h b/sysdeps/hppa/dl-fptr.h index 2ac9740e30..798ee8c969 100644 --- a/sysdeps/hppa/dl-fptr.h +++ b/sysdeps/hppa/dl-fptr.h @@ -1,5 +1,5 @@ /* Function descriptors. HPPA version. - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2003, 2009 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 @@ -22,14 +22,16 @@ #include -/* There are currently 20 dynamic symbols in ld.so. +/* There are currently 33 dynamic symbols in ld.so. ELF_MACHINE_BOOT_FPTR_TABLE_LEN needs to be at least that big. */ -#define ELF_MACHINE_BOOT_FPTR_TABLE_LEN 200 - -#define ELF_MACHINE_LOAD_ADDRESS(var, symbol) \ - asm (" addil LT%%" #symbol ", %%r19\n" \ - " ldw RT%%" #symbol "(%%sr0,%%r1), %0\n" \ - : "=&r" (var)); - +#define ELF_MACHINE_BOOT_FPTR_TABLE_LEN 64 + +#define ELF_MACHINE_LOAD_ADDRESS(var, symbol) \ + asm ( \ +" b,l 1f,%0\n" \ +" depi 0,31,2,%0\n" \ +"1: addil L'" #symbol " - ($PIC_pcrel$0 - 8),%0\n" \ +" ldo R'" #symbol " - ($PIC_pcrel$0 - 12)(%%r1),%0\n" \ + : "=&r" (var) : : "r1"); #endif /* !dl_hppa_fptr_h */ From c832a3a9b7a864fd875079f8525a38f0fba05535 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Sun, 15 Nov 2009 15:46:46 -0500 Subject: [PATCH 3908/4487] Update bits/fcntl.h for hppa. Define values for F_GETOWN_EX and F_SETOWN_EX. Define fallocate64@@GLIBC_2.11 and provide declarations in fcntl.h with appropriate aliases. 2009-11-15 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/Versions (libc): Add fallocate64@@GLIBC_2.11. * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h [__USE_GNU]: Define F_GETOWN_EX, and F_SETOWN_EX. [!__USE_FILE_OFFSET64]: Define fallocate. [__USE_FILE_OFFSET64 && __REDIRECT]: Define __REDIRECT. [__USE_FILE_OFFSET64 && !__REDIRECT]: Define fallocate as fallocate64. [__USE_LARGEFILE64]: define fallocate64. --- ChangeLog.hppa | 12 ++++++++++++ sysdeps/unix/sysv/linux/hppa/Versions | 3 +++ sysdeps/unix/sysv/linux/hppa/bits/fcntl.h | 21 ++++++++++++++++++++- 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 342bf5e837..3d70812465 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,15 @@ +2009-11-15 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/Versions (libc): Add + fallocate64@@GLIBC_2.11. + * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h + [__USE_GNU]: Define F_GETOWN_EX, and F_SETOWN_EX. + [!__USE_FILE_OFFSET64]: Define fallocate. + [__USE_FILE_OFFSET64 && __REDIRECT]: Define __REDIRECT. + [__USE_FILE_OFFSET64 && !__REDIRECT]: Define fallocate as + fallocate64. + [__USE_LARGEFILE64]: define fallocate64. + 2009-11-15 Carlos O'Donell * sysdeps/hppa/dl-fptr.h: Update copyright year. diff --git a/sysdeps/unix/sysv/linux/hppa/Versions b/sysdeps/unix/sysv/linux/hppa/Versions index 234c0baa60..3dbc9ac50d 100644 --- a/sysdeps/unix/sysv/linux/hppa/Versions +++ b/sysdeps/unix/sysv/linux/hppa/Versions @@ -20,6 +20,9 @@ libc { #errlist-compat 256 _sys_errlist; sys_errlist; _sys_nerr; sys_nerr; } + GLIBC_2.11 { + fallocate64; + } } librt { GLIBC_2.3 { diff --git a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h index ffc55a5a83..a0b0e07b06 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h @@ -89,6 +89,8 @@ #ifdef __USE_GNU # define F_SETSIG 13 /* Set number of signal to be sent. */ # define F_GETSIG 14 /* Get number of signal to be sent. */ +# define F_GETOWN_EX 15 +# define F_SETOWN_EX 16 #endif #ifdef __USE_GNU @@ -220,7 +222,24 @@ extern ssize_t splice (int __fdin, __off64_t *offin, int __fdout, /* In-kernel implementation of tee for pipe buffers. */ extern ssize_t tee (int __fdin, int __fdout, size_t __len, unsigned int __flags); - + +/* Reserve storage for the data of the file associated with FD. */ +# ifndef __USE_FILE_OFFSET64 +extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len); +# else +# ifdef __REDIRECT +extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset, + __off64_t __len), + fallocate64); +# else +# define fallocate fallocate64 +# endif +# endif +# ifdef __USE_LARGEFILE64 +extern int fallocate64 (int __fd, int __mode, __off64_t __offset, + __off64_t __len); +# endif + #endif __END_DECLS From b8b2e2b9d1150e734b0469eb9559713beebc0c29 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Sun, 15 Nov 2009 15:53:20 -0500 Subject: [PATCH 3909/4487] Move socket.h to bits/socket.h Place socket.h in the correct location. 2009-11-15 Carlos O'Donell [BZ #6676] * sysdeps/unix/sysv/linux/hppa/socket.h: Move from here... * sysdeps/unix/sysv/linux/hppa/bits/socket.h: ... to here. --- ChangeLog.hppa | 7 +++++++ sysdeps/unix/sysv/linux/hppa/{ => bits}/socket.h | 0 2 files changed, 7 insertions(+) rename sysdeps/unix/sysv/linux/hppa/{ => bits}/socket.h (100%) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 3d70812465..dbd0ed5595 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,10 @@ +2009-11-15 Carlos O'Donell + + [BZ #6676] + + * sysdeps/unix/sysv/linux/hppa/socket.h: Move from here... + * sysdeps/unix/sysv/linux/hppa/bits/socket.h: ... to here. + 2009-11-15 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/Versions (libc): Add diff --git a/sysdeps/unix/sysv/linux/hppa/socket.h b/sysdeps/unix/sysv/linux/hppa/bits/socket.h similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/socket.h rename to sysdeps/unix/sysv/linux/hppa/bits/socket.h From 87d2bea064f5bf730be841986b33685ade043915 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 17 Nov 2009 20:22:36 +0000 Subject: [PATCH 3910/4487] Define ERFKILL for MIPS. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/bits/errno.h | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog.mips b/ChangeLog.mips index b0d633794f..0f17f52431 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2009-11-17 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/errno.h (ERFKILL): Define if + not already defined. + 2009-11-14 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/fcntl.h (F_SETOWN_EX, diff --git a/sysdeps/unix/sysv/linux/mips/bits/errno.h b/sysdeps/unix/sysv/linux/mips/bits/errno.h index 5ff11c0e77..62b952cdac 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/errno.h +++ b/sysdeps/unix/sysv/linux/mips/bits/errno.h @@ -38,6 +38,10 @@ # define ENOTRECOVERABLE 166 # endif +# ifndef ERFKILL +# define ERFKILL 167 +# endif + # ifndef __ASSEMBLER__ /* Function to get address of global `errno' variable. */ extern int *__errno_location (void) __THROW __attribute__ ((__const__)); From 35141d00d46feaa7816c9e1099cc819a5ee1db66 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 17 Nov 2009 20:45:50 +0000 Subject: [PATCH 3911/4487] Add new MADV_* values for ARM. --- ChangeLog.arm | 6 ++++++ sysdeps/unix/sysv/linux/arm/bits/mman.h | 22 +++++++++++++--------- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 068ce75608..a95704b400 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,9 @@ +2009-11-17 Joseph Myers + + [BZ #10972] + * sysdeps/unix/sysv/linux/arm/bits/mman.h: Add new MADV_* + constants from recent kernels. + 2009-11-14 Joseph Myers * sysdeps/unix/sysv/linux/arm/bits/fcntl.h (F_SETOWN_EX, diff --git a/sysdeps/unix/sysv/linux/arm/bits/mman.h b/sysdeps/unix/sysv/linux/arm/bits/mman.h index 828ec944cc..0240aed8ab 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/mman.h +++ b/sysdeps/unix/sysv/linux/arm/bits/mman.h @@ -1,5 +1,6 @@ /* Definitions for POSIX memory map interface. Linux/ARM version. - Copyright (C) 1997, 2000, 2003, 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 1997, 2000, 2003, 2005, 2006, 2009 + 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 @@ -83,14 +84,17 @@ /* Advice to `madvise'. */ #ifdef __USE_BSD -# define MADV_NORMAL 0 /* No further special treatment. */ -# define MADV_RANDOM 1 /* Expect random page references. */ -# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define MADV_WILLNEED 3 /* Will need these pages. */ -# define MADV_DONTNEED 4 /* Don't need these pages. */ -# define MADV_REMOVE 9 /* Remove these pages and resources. */ -# define MADV_DONTFORK 10 /* Do not inherit across fork. */ -# define MADV_DOFORK 11 /* Do inherit across fork. */ +# define MADV_NORMAL 0 /* No further special treatment. */ +# define MADV_RANDOM 1 /* Expect random page references. */ +# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define MADV_WILLNEED 3 /* Will need these pages. */ +# define MADV_DONTNEED 4 /* Don't need these pages. */ +# define MADV_REMOVE 9 /* Remove these pages and resources. */ +# define MADV_DONTFORK 10 /* Do not inherit across fork. */ +# define MADV_DOFORK 11 /* Do inherit across fork. */ +# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */ +# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */ +# define MADV_HWPOISON 100 /* Poison a page for testing. */ #endif /* The POSIX people had to invent similar names for the same things. */ From 24bcda036c8de6d3183b2ed31f51cca32688bb55 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 17 Nov 2009 20:46:35 +0000 Subject: [PATCH 3912/4487] Add new MADV_* values for MIPS. --- ChangeLog.mips | 6 ++++++ sysdeps/unix/sysv/linux/mips/bits/mman.h | 21 ++++++++++++--------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 0f17f52431..f455724170 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,9 @@ +2009-11-17 Joseph Myers + + [BZ #10972] + * sysdeps/unix/sysv/linux/mips/bits/mman.h: Add new MADV_* + constants from recent kernels. + 2009-11-17 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/errno.h (ERFKILL): Define if diff --git a/sysdeps/unix/sysv/linux/mips/bits/mman.h b/sysdeps/unix/sysv/linux/mips/bits/mman.h index 47d33933ad..f639e0464f 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/mman.h +++ b/sysdeps/unix/sysv/linux/mips/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/MIPS version. - Copyright (C) 1997, 2000, 2003, 2004, 2005, 2006 + Copyright (C) 1997, 2000, 2003, 2004, 2005, 2006, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -86,14 +86,17 @@ /* Advice to `madvise'. */ #ifdef __USE_BSD -# define MADV_NORMAL 0 /* No further special treatment. */ -# define MADV_RANDOM 1 /* Expect random page references. */ -# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define MADV_WILLNEED 3 /* Will need these pages. */ -# define MADV_DONTNEED 4 /* Don't need these pages. */ -# define MADV_REMOVE 9 /* Remove these pages and resources. */ -# define MADV_DONTFORK 10 /* Do not inherit across fork. */ -# define MADV_DOFORK 11 /* Do inherit across fork. */ +# define MADV_NORMAL 0 /* No further special treatment. */ +# define MADV_RANDOM 1 /* Expect random page references. */ +# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define MADV_WILLNEED 3 /* Will need these pages. */ +# define MADV_DONTNEED 4 /* Don't need these pages. */ +# define MADV_REMOVE 9 /* Remove these pages and resources. */ +# define MADV_DONTFORK 10 /* Do not inherit across fork. */ +# define MADV_DOFORK 11 /* Do inherit across fork. */ +# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */ +# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */ +# define MADV_HWPOISON 100 /* Poison a page for testing. */ #endif /* The POSIX people had to invent similar names for the same things. */ From 862123a31624d0fe032784c98f55aa94c4ee25f6 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 17 Nov 2009 23:57:34 +0000 Subject: [PATCH 3913/4487] Add new MADV_* values for M68K. --- ChangeLog.m68k | 6 ++++++ sysdeps/unix/sysv/linux/m68k/bits/mman.h | 22 +++++++++++++--------- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 4dc4f41b14..7a3e8b7155 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,9 @@ +2009-11-17 Joseph Myers + + [BZ #10972] + * sysdeps/unix/sysv/linux/m68k/bits/mman.h: Add new MADV_* + constants from recent kernels. + 2009-11-15 Andreas Schwab * sysdeps/m68k/libgcc_s.h: New file. diff --git a/sysdeps/unix/sysv/linux/m68k/bits/mman.h b/sysdeps/unix/sysv/linux/m68k/bits/mman.h index ab99176660..15727ad1ba 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/mman.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/mman.h @@ -1,5 +1,6 @@ /* Definitions for POSIX memory map interface. Linux/m68k version. - Copyright (C) 1997, 2000, 2003, 2005, 2008 Free Software Foundation, Inc. + Copyright (C) 1997, 2000, 2003, 2005, 2008, 2009 + 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 @@ -83,14 +84,17 @@ /* Advice to `madvise'. */ #ifdef __USE_BSD -# define MADV_NORMAL 0 /* No further special treatment. */ -# define MADV_RANDOM 1 /* Expect random page references. */ -# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define MADV_WILLNEED 3 /* Will need these pages. */ -# define MADV_DONTNEED 4 /* Don't need these pages. */ -# define MADV_REMOVE 9 /* Remove these pages and resources. */ -# define MADV_DONTFORK 10 /* Do not inherit across fork. */ -# define MADV_DOFORK 11 /* Do inherit across fork. */ +# define MADV_NORMAL 0 /* No further special treatment. */ +# define MADV_RANDOM 1 /* Expect random page references. */ +# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define MADV_WILLNEED 3 /* Will need these pages. */ +# define MADV_DONTNEED 4 /* Don't need these pages. */ +# define MADV_REMOVE 9 /* Remove these pages and resources. */ +# define MADV_DONTFORK 10 /* Do not inherit across fork. */ +# define MADV_DOFORK 11 /* Do inherit across fork. */ +# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */ +# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */ +# define MADV_HWPOISON 100 /* Poison a page for testing. */ #endif /* The POSIX people had to invent similar names for the same things. */ From 0ecde27222f16244602b0caf50e3352ec5652213 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 18 Nov 2009 17:11:07 +0000 Subject: [PATCH 3914/4487] Change misleading names of parameters of sync_file_range for ARM. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/bits/fcntl.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index a95704b400..a3b558b40b 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2009-11-18 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Change misleading + names of parameters of sync_file_range. + 2009-11-17 Joseph Myers [BZ #10972] diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h index e4b6187f91..6993cb8587 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h @@ -237,7 +237,7 @@ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count) /* Selective file content synch'ing. */ -extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to, +extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count, unsigned int __flags); From 983ee7f2693707aae51f06a1c4b575fe61559714 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 18 Nov 2009 17:11:34 +0000 Subject: [PATCH 3915/4487] Change misleading names of parameters of sync_file_range for MIPS. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index f455724170..88506b2bac 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2009-11-18 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Change misleading + names of parameters of sync_file_range. + 2009-11-17 Joseph Myers [BZ #10972] diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index 6fa74dd840..43bc86def5 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -250,7 +250,7 @@ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count) /* Selective file content synch'ing. */ -extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to, +extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count, unsigned int __flags); From 6add932d9099ac27762c45e344416c1ee11f6d78 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 18 Nov 2009 17:30:48 +0000 Subject: [PATCH 3916/4487] Change misleading names of parameters of sync_file_range for M68K. --- ChangeLog.m68k | 5 +++++ sysdeps/unix/sysv/linux/m68k/bits/fcntl.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 7a3e8b7155..87117d3dc1 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2009-11-18 Joseph Myers + + * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Change misleading + names of parameters of sync_file_range. + 2009-11-17 Joseph Myers [BZ #10972] diff --git a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h index 6fc7a0aeb0..c6dd1a8352 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h @@ -236,7 +236,7 @@ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count) /* Selective file content synch'ing. */ -extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to, +extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count, unsigned int __flags); From 3a2e1f4e6a8a1d5523ebae4a1b938fdaf92e94bf Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 19 Nov 2009 16:36:58 +0000 Subject: [PATCH 3917/4487] Assume pselect6 and ppoll on ARM for kernels 2.6.32 and later. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/kernel-features.h | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index a3b558b40b..e095c22c76 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2009-11-19 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/kernel-features.h (__ASSUME_PSELECT, + __ASSUME_PPOLL): Don't undefine for kernel 2.6.32 and later. + 2009-11-18 Joseph Myers * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Change misleading diff --git a/sysdeps/unix/sysv/linux/arm/kernel-features.h b/sysdeps/unix/sysv/linux/arm/kernel-features.h index 1b0ab63380..3996ae9c13 100644 --- a/sysdeps/unix/sysv/linux/arm/kernel-features.h +++ b/sysdeps/unix/sysv/linux/arm/kernel-features.h @@ -59,6 +59,8 @@ #include_next -/* These syscalls are not implemented yet for ARM. */ -#undef __ASSUME_PSELECT -#undef __ASSUME_PPOLL +/* Support for pselect6, ppoll and epoll_pwait was added in 2.6.32. */ +#if __LINUX_KERNEL_VERSION < 0x020620 +# undef __ASSUME_PSELECT +# undef __ASSUME_PPOLL +#endif From bc97817ff608f75d67a61cb8fe3fe13e84fde985 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 19 Nov 2009 16:46:16 +0000 Subject: [PATCH 3918/4487] Define F_OWNER_PGRP for ARM. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/bits/fcntl.h | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index e095c22c76..c20b095226 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2009-11-19 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Introduce new symbol + F_OWNER_PGRP and mark F_OWNER_GID obsolete. + 2009-11-19 Joseph Myers * sysdeps/unix/sysv/linux/arm/kernel-features.h (__ASSUME_PSELECT, diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h index 6993cb8587..d597c10139 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h @@ -172,9 +172,10 @@ struct flock64 /* Owner types. */ enum __pid_type { - F_OWNER_TID = 0, /* Kernel thread. */ - F_OWNER_PID, /* Process. */ - F_OWNER_GID /* Process group. */ + F_OWNER_TID = 0, /* Kernel thread. */ + F_OWNER_PID, /* Process. */ + F_OWNER_PGRP, /* Process group. */ + F_OWNER_GID = F_OWNER_PGRP /* Alternative, obsolete name. */ }; /* Structure to use with F_GETOWN_EX and F_SETOWN_EX. */ From 78698bbbf1d98a923cfc5ad284df935cc64a0a5e Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 19 Nov 2009 16:46:57 +0000 Subject: [PATCH 3919/4487] Define F_OWNER_PGRP for MIPS. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 88506b2bac..1671dcbee2 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2009-11-19 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Introduce new symbol + F_OWNER_PGRP and mark F_OWNER_GID obsolete. + 2009-11-18 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Change misleading diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index 43bc86def5..5496912b7a 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -185,9 +185,10 @@ struct flock64 /* Owner types. */ enum __pid_type { - F_OWNER_TID = 0, /* Kernel thread. */ - F_OWNER_PID, /* Process. */ - F_OWNER_GID /* Process group. */ + F_OWNER_TID = 0, /* Kernel thread. */ + F_OWNER_PID, /* Process. */ + F_OWNER_PGRP, /* Process group. */ + F_OWNER_GID = F_OWNER_PGRP /* Alternative, obsolete name. */ }; /* Structure to use with F_GETOWN_EX and F_SETOWN_EX. */ From 76d306ec9888f824496ea7783266ea91e6825374 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 19 Nov 2009 22:34:08 +0000 Subject: [PATCH 3920/4487] Define F_OWNER_PGRP for M68K. --- ChangeLog.m68k | 5 +++++ sysdeps/unix/sysv/linux/m68k/bits/fcntl.h | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 87117d3dc1..74407c4c3e 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2009-11-19 Joseph Myers + + * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Introduce new symbol + F_OWNER_PGRP and mark F_OWNER_GID obsolete. + 2009-11-18 Joseph Myers * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Change misleading diff --git a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h index c6dd1a8352..8ed8eb6c31 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h @@ -171,9 +171,10 @@ struct flock64 /* Owner types. */ enum __pid_type { - F_OWNER_TID = 0, /* Kernel thread. */ - F_OWNER_PID, /* Process. */ - F_OWNER_GID /* Process group. */ + F_OWNER_TID = 0, /* Kernel thread. */ + F_OWNER_PID, /* Process. */ + F_OWNER_PGRP, /* Process group. */ + F_OWNER_GID = F_OWNER_PGRP /* Alternative, obsolete name. */ }; /* Structure to use with F_GETOWN_EX and F_SETOWN_EX. */ From 127f9dc1f0b7c21112007f476d710ea6b70d13c0 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 23 Nov 2009 16:34:39 +0100 Subject: [PATCH 3921/4487] Use struct timespec for timestamps in struct stat also if __USE_XOPEN2K8 --- ChangeLog.m68k | 5 +++++ sysdeps/unix/sysv/linux/m68k/bits/stat.h | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 74407c4c3e..42d6a9115b 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2009-11-23 Andreas Schwab + + * sysdeps/unix/sysv/linux/m68k/bits/stat.h: Use struct timespec + for timestamps also if __USE_XOPEN2K8. + 2009-11-19 Joseph Myers * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Introduce new symbol diff --git a/sysdeps/unix/sysv/linux/m68k/bits/stat.h b/sysdeps/unix/sysv/linux/m68k/bits/stat.h index 8d18d6deee..780104365c 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/stat.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/stat.h @@ -61,7 +61,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 @@ -107,7 +107,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 @@ -117,14 +117,14 @@ struct stat64 struct timespec st_atim; /* Time of last access. */ struct timespec st_mtim; /* Time of last modification. */ struct timespec st_ctim; /* Time of last status change. */ -#else +# else __time_t st_atime; /* Time of last access. */ unsigned long int st_atimensec; /* Nscecs of last access. */ __time_t st_mtime; /* Time of last modification. */ unsigned long int st_mtimensec; /* Nsecs of last modification. */ __time_t st_ctime; /* Time of last status change. */ unsigned long int st_ctimensec; /* Nsecs of last status change. */ -#endif +# endif __ino64_t st_ino; /* File serial number. */ }; #endif From b00ec948818f47f85c6c3eadac22e753feaaee95 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 23 Nov 2009 19:06:52 +0000 Subject: [PATCH 3922/4487] Use struct timespec for timestamps in struct stat for MIPS also if __USE_XOPEN2K8. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/bits/stat.h | 16 ++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 1671dcbee2..b679aa0228 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2009-11-23 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/stat.h: Use struct timespec + for timestamps also if __USE_XOPEN2K8. + 2009-11-19 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Introduce new symbol diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h index af042516e2..7eb86a4cc8 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/stat.h +++ b/sysdeps/unix/sysv/linux/mips/bits/stat.h @@ -61,7 +61,7 @@ struct stat long int st_pad2[3]; __off64_t st_size; /* Size of file, in bytes. */ #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 @@ -105,7 +105,7 @@ struct stat64 unsigned long int st_rdev; /* Device number, if device. */ long int st_pad2[3]; __off64_t st_size; /* Size of file, in bytes. */ -#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 @@ -115,14 +115,14 @@ struct stat64 struct timespec st_atim; /* Time of last access. */ struct timespec st_mtim; /* Time of last modification. */ struct timespec st_ctim; /* Time of last status change. */ -#else +# else __time_t st_atime; /* Time of last access. */ long int __reserved0; __time_t st_mtime; /* Time of last modification. */ long int __reserved1; __time_t st_ctime; /* Time of last status change. */ long int __reserved2; -#endif +# endif __blksize_t st_blksize; /* Optimal block size for I/O. */ long int st_pad3; __blkcnt64_t st_blocks; /* Number of 512-byte blocks allocated. */ @@ -152,7 +152,7 @@ struct stat unsigned int st_pad2[3]; /* Reserved for st_rdev expansion */ __off64_t st_size; #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 @@ -196,7 +196,7 @@ struct stat64 __dev_t st_rdev; unsigned int st_pad2[3]; /* Reserved for st_rdev expansion */ __off64_t st_size; -#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 @@ -206,14 +206,14 @@ struct stat64 struct timespec st_atim; /* Time of last access. */ struct timespec st_mtim; /* Time of last modification. */ struct timespec st_ctim; /* Time of last status change. */ -#else +# else __time_t st_atime; int __reserved0; __time_t st_mtime; int __reserved1; __time_t st_ctime; int __reserved2; -#endif +# endif __blksize_t st_blksize; unsigned int st_pad3; __blkcnt64_t st_blocks; From 8fe357d5c6517be5718be681cf8ff89a191a8e9b Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Sun, 22 Nov 2009 16:44:05 -0500 Subject: [PATCH 3923/4487] Avoid warnings when including atomic.h. Cast oldval to the same type as ret to avoid warnings when including atomic.h. 2009-11-22 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/bits/atomic.h: Avoid warnings by casting oldval to int. --- ChangeLog.hppa | 5 +++++ sysdeps/unix/sysv/linux/hppa/bits/atomic.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index dbd0ed5595..ac6acba45a 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,8 @@ +2009-11-22 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/bits/atomic.h: Avoid warnings + by casting oldval to int. + 2009-11-15 Carlos O'Donell [BZ #6676] diff --git a/sysdeps/unix/sysv/linux/hppa/bits/atomic.h b/sysdeps/unix/sysv/linux/hppa/bits/atomic.h index d7c8b9ddf3..120b19bd5e 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/atomic.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/atomic.h @@ -98,7 +98,7 @@ typedef uintmax_t uatomic_max_t; int ret; \ ret = atomic_compare_and_exchange_val_acq(mem, newval, oldval); \ /* Return 1 if it was already acquired. */ \ - (ret != oldval); \ + (ret != (int)oldval); \ }) #else # error __ASSUME_LWS_CAS is required to build glibc. From b80ec5369182532a06bf4972ff274bc152d5eda6 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Wed, 25 Nov 2009 18:18:56 -0500 Subject: [PATCH 3924/4487] Add correct aligment to pthread_*_t structures. In the switch to NPTL the pthrad_mutex_t, pthread_cond_t, and pthread_rwlock_t structures were made binary compatible with the Linuxthread versions. However, their aligment when embedded in other structures was changed. When rebuilding libstdc++ this was detected, and the following changes return the structures to their original Linuxthreads alignments. 2009-11-25 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h: Use correct alignment for pthread_mutex_t, pthread_cond_t, and pthread_rwlock_t. --- ChangeLog.hppa | 6 ++++++ sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index ac6acba45a..24a152e139 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,9 @@ +2009-11-25 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h: + Use correct alignment for pthread_mutex_t, pthread_cond_t, + and pthread_rwlock_t. + 2009-11-22 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/bits/atomic.h: Avoid warnings diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h index 87c1a55215..952e53c933 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h +++ b/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h @@ -64,7 +64,7 @@ typedef union { struct __pthread_mutex_s { - int __lock; + int __lock __attribute__ ((aligned(16))); unsigned int __count; int __owner; /* KIND must stay at this position in the structure to maintain @@ -113,7 +113,7 @@ typedef union start of the 4-word lock structure, the next four words are set all to 1 by the Linuxthreads PTHREAD_COND_INITIALIZER. */ - int __lock; + int __lock __attribute__ ((aligned(16))); /* Tracks the initialization of this structure: 0 initialized with NPTL PTHREAD_COND_INITIALIZER. 1 initialized with Linuxthreads PTHREAD_COND_INITIALIZER. @@ -161,7 +161,7 @@ typedef union start of the 4-word 16-byte aligned lock structure. The next four words are all set to 1 by the Linuxthreads PTHREAD_RWLOCK_INITIALIZER. We ignore them in NPTL. */ - int __compat_padding[4]; + int __compat_padding[4] __attribute__ ((aligned(16))); int __lock; unsigned int __nr_readers; unsigned int __readers_wakeup; From 84f926688b3e30910887020fd97456f996450eaf Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 1 Dec 2009 00:07:32 +0000 Subject: [PATCH 3925/4487] Update MIPS dl-lookup.c from generic version. --- ChangeLog.mips | 4 ++++ sysdeps/mips/dl-lookup.c | 38 +++++++++++++++++++++++++++++--------- 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index b679aa0228..ca8ebd9a58 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,7 @@ +2009-12-01 Joseph Myers + + * sysdeps/mips/dl-lookup.c: Update from generic version. + 2009-11-23 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/stat.h: Use struct timespec diff --git a/sysdeps/mips/dl-lookup.c b/sysdeps/mips/dl-lookup.c index b7516dab1a..c7deb4dc97 100644 --- a/sysdeps/mips/dl-lookup.c +++ b/sysdeps/mips/dl-lookup.c @@ -329,16 +329,16 @@ do_lookup_x (const char *undef_name, uint_fast32_t new_hash, definition we have to use it. */ void enter (struct unique_sym *table, size_t size, unsigned int hash, const char *name, - const ElfW(Sym) *sym, const struct link_map *map) + const ElfW(Sym) *sym, struct link_map *map) { size_t idx = hash % size; size_t hash2 = 1 + hash % (size - 2); while (1) { - if (table[idx].hashval == 0) + if (table[idx].name == NULL) { table[idx].hashval = hash; - table[idx].name = strtab + sym->st_name; + table[idx].name = name; if ((type_class & ELF_RTYPE_CLASS_COPY) != 0) { table[idx].sym = ref; @@ -348,7 +348,13 @@ do_lookup_x (const char *undef_name, uint_fast32_t new_hash, { table[idx].sym = sym; table[idx].map = map; + + if (map->l_type == lt_loaded) + /* Make sure we don't unload this object by + setting the appropriate flag. */ + map->l_flags_1 |= DF_1_NODELETE; } + return; } @@ -380,8 +386,7 @@ do_lookup_x (const char *undef_name, uint_fast32_t new_hash, return 1; } - if (entries[idx].hashval == 0 - && entries[idx].name == NULL) + if (entries[idx].name == NULL) break; idx += hash2; @@ -389,10 +394,14 @@ do_lookup_x (const char *undef_name, uint_fast32_t new_hash, idx -= size; } - if (size * 3 <= tab->n_elements) + if (size * 3 <= tab->n_elements * 4) { /* Expand the table. */ - size_t newsize = _dl_higher_prime_number (size); +#ifdef RTLD_CHECK_FOREIGN_CALL + /* This must not happen during runtime relocations. */ + assert (!RTLD_CHECK_FOREIGN_CALL); +#endif + size_t newsize = _dl_higher_prime_number (size + 1); struct unique_sym *newentries = calloc (sizeof (struct unique_sym), newsize); if (newentries == NULL) @@ -403,19 +412,25 @@ do_lookup_x (const char *undef_name, uint_fast32_t new_hash, } for (idx = 0; idx < size; ++idx) - if (entries[idx].hashval != 0) + if (entries[idx].name != NULL) enter (newentries, newsize, entries[idx].hashval, entries[idx].name, entries[idx].sym, entries[idx].map); tab->free (entries); tab->size = newsize; + size = newsize; entries = tab->entries = newentries; tab->free = free; } } else { +#ifdef RTLD_CHECK_FOREIGN_CALL + /* This must not happen during runtime relocations. */ + assert (!RTLD_CHECK_FOREIGN_CALL); +#endif + #define INITIAL_NUNIQUE_SYM_TABLE 31 size = INITIAL_NUNIQUE_SYM_TABLE; entries = calloc (sizeof (struct unique_sym), size); @@ -427,7 +442,8 @@ do_lookup_x (const char *undef_name, uint_fast32_t new_hash, tab->free = free; } - enter (entries, size, new_hash, strtab + sym->st_name, sym, map); + enter (entries, size, new_hash, strtab + sym->st_name, sym, + (struct link_map *) map); ++tab->n_elements; __rtld_lock_unlock_recursive (tab->lock); @@ -610,6 +626,10 @@ add_dependency (struct link_map *undef_map, struct link_map *map, int flags) unsigned int max = undef_map->l_reldepsmax ? undef_map->l_reldepsmax * 2 : 10; +#ifdef RTLD_PREPARE_FOREIGN_CALL + RTLD_PREPARE_FOREIGN_CALL; +#endif + newp = malloc (sizeof (*newp) + max * sizeof (struct link_map *)); if (newp == NULL) { From 2d68f6afef560a66d11d65738c2412b9cecf5d0a Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 1 Dec 2009 01:27:19 +0000 Subject: [PATCH 3926/4487] Fix MIPS64 posix_fadvise and posix_fadvise64. Similar to the problems I fixed for posix_fallocate and fallocate , MIPS64 posix_advise also needs fixes to use the correct syscall interfaces. Although the existing n32 posix_fadvise64 is OK, getting posix_fadvise from syscalls.list does not work correctly, as this function is supposed to return an error code instead of storing it in errno as the generic syscall implementations from syscalls.list do. --- ChangeLog.mips | 8 ++++ .../linux/mips/mips64/n32/posix_fadvise.c | 38 +++++++++++++++++++ .../sysv/linux/mips/mips64/n32/syscalls.list | 1 - .../linux/mips/mips64/n64/posix_fadvise.c | 1 + .../linux/mips/mips64/n64/posix_fadvise64.c | 1 + 5 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise.c create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise.c create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise64.c diff --git a/ChangeLog.mips b/ChangeLog.mips index ca8ebd9a58..bbcb223766 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,11 @@ +2009-12-01 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list + (posix_fadvise): Remove. + * sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise.c, + sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise.c, + sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise64.c: New. + 2009-12-01 Joseph Myers * sysdeps/mips/dl-lookup.c: Update from generic version. diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise.c b/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise.c new file mode 100644 index 0000000000..7bb197ae48 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise.c @@ -0,0 +1,38 @@ +/* Copyright (C) 2003, 2004, 2009 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. */ + +#include +#include +#include + +/* Advice the system about the expected behaviour of the application with + respect to the file associated with FD. */ + +int +posix_fadvise (int fd, off_t offset, off_t len, int advise) +{ +#ifdef __NR_fadvise64 + INTERNAL_SYSCALL_DECL (err); + int ret = INTERNAL_SYSCALL (fadvise64, err, 4, fd, offset, len, advise); + if (INTERNAL_SYSCALL_ERROR_P (ret, err)) + return INTERNAL_SYSCALL_ERRNO (ret, err); + return 0; +#else + return ENOSYS; +#endif +} diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list b/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list index 2e4bed0905..5ade6f0076 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list @@ -2,6 +2,5 @@ readahead - readahead i:iii __readahead readahead sync_file_range - sync_file_range i:iiii sync_file_range -posix_fadvise - fadvise64 i:iiii posix_fadvise ftruncate - ftruncate i:ii __ftruncate ftruncate ftruncate64 __ftruncate64 truncate - truncate i:si truncate truncate64 diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise.c new file mode 100644 index 0000000000..0287b833b8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise64.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise64.c new file mode 100644 index 0000000000..c9f72c4ce1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise64.c @@ -0,0 +1 @@ +/* posix_fadvise64 is in posix_fadvise.c */ From 4dc21b9db13ab863dcff04ff54ae97c4e1e9b4b6 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Mon, 23 Nov 2009 14:44:49 -0500 Subject: [PATCH 3927/4487] Add new MADV_* values Signed-off-by: Matt Turner --- ChangeLog.alpha | 6 ++++++ sysdeps/unix/sysv/linux/alpha/bits/mman.h | 22 +++++++++++++--------- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 5a9b442ee3..7f543736ea 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,9 @@ +2009-11-23 Matt Turner + + [BZ #10972] + * sysdeps/unix/sysv/linux/alpha/bits/mman.h: Add new MADV_* + constants from recent kernels. + 2009-11-10 Matt Turner [BZ #10609] diff --git a/sysdeps/unix/sysv/linux/alpha/bits/mman.h b/sysdeps/unix/sysv/linux/alpha/bits/mman.h index 2f0e564916..3c205f8b8e 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/mman.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/mman.h @@ -1,5 +1,6 @@ /* Definitions for POSIX memory map interface. Linux/Alpha version. - Copyright (C) 1997, 1998, 2000, 2003, 2006 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 2000, 2003, 2006, 2009 + 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 @@ -91,14 +92,17 @@ /* Advice to `madvise'. */ #ifdef __USE_BSD -# define MADV_NORMAL 0 /* No further special treatment. */ -# define MADV_RANDOM 1 /* Expect random page references. */ -# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define MADV_WILLNEED 3 /* Will need these pages. */ -# define MADV_DONTNEED 6 /* Don't need these pages. */ -# define MADV_REMOVE 9 /* Remove these pages and resources. */ -# define MADV_DONTFORK 10 /* Do not inherit across fork. */ -# define MADV_DOFORK 11 /* Do inherit across fork. */ +# define MADV_NORMAL 0 /* No further special treatment. */ +# define MADV_RANDOM 1 /* Expect random page references. */ +# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define MADV_WILLNEED 3 /* Will need these pages. */ +# define MADV_DONTNEED 6 /* Don't need these pages. */ +# define MADV_REMOVE 9 /* Remove these pages and resources. */ +# define MADV_DONTFORK 10 /* Do not inherit across fork. */ +# define MADV_DOFORK 11 /* Do inherit across fork. */ +# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */ +# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */ +# define MADV_HWPOISON 100 /* Poison a page for testing. */ #endif /* The POSIX people had to invent similar names for the same things. */ From 015a3d04853815fd891ddb3f936a2c6b313a8dbd Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Mon, 23 Nov 2009 14:47:54 -0500 Subject: [PATCH 3928/4487] Fix sync_file_range parameter names Signed-off-by: Matt Turner --- ChangeLog.alpha | 5 +++++ sysdeps/unix/sysv/linux/alpha/bits/fcntl.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 7f543736ea..a21c8b4bc5 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,8 @@ +2009-11-23 Matt Turner + + * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h: Change misleading + names of parameters of sync_file_range. + 2009-11-23 Matt Turner [BZ #10972] diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h index 710bace21f..1e716438db 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h @@ -210,7 +210,7 @@ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count) /* Selective file content synch'ing. */ -extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to, +extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count, unsigned int __flags); From 36a3800af83d4bcd262eccedcc7ecb694597688b Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Mon, 23 Nov 2009 14:56:01 -0500 Subject: [PATCH 3929/4487] Use struct timespec for timestamps in struct stat for Alpha also if __USE_XOPEN2K8. Signed-off-by: Matt Turner --- ChangeLog.alpha | 5 +++++ sysdeps/unix/sysv/linux/alpha/bits/stat.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index a21c8b4bc5..ed97e8b65b 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,8 @@ +2009-11-23 Matt Turner + + * sysdeps/unix/sysv/linux/alpha/bits/stat.h: Use struct timespec + for timestamps also if __USE_XOPEN2K8. + 2009-11-23 Matt Turner * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h: Change misleading diff --git a/sysdeps/unix/sysv/linux/alpha/bits/stat.h b/sysdeps/unix/sysv/linux/alpha/bits/stat.h index 42748be762..0aaabe295d 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/stat.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/stat.h @@ -41,7 +41,7 @@ Use neat tidy anonymous unions and structures when possible. */ -#ifdef __USE_MISC +#if defined __USE_MISC || defined __USE_XOPEN2K8 # if __GNUC_PREREQ(3,3) # define __ST_TIME(X) \ __extension__ union { \ From 5d5cb5a2e546b59b25addc1a557cba56638d548a Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 9 Dec 2009 16:51:18 +0000 Subject: [PATCH 3930/4487] Update MIPS bits/socket.h for mmsghdr and recvmmsg. --- ChangeLog.mips | 5 ++++ sysdeps/unix/sysv/linux/mips/bits/socket.h | 27 ++++++++++++++++++++-- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index bbcb223766..b3125f46d2 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2009-12-09 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/socket.h: Define mmsghdr and + declare recvmmsg. + 2009-12-01 Joseph Myers * sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h index 58a04099d2..4899077a96 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/socket.h +++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h @@ -234,8 +234,8 @@ enum #define MSG_MORE MSG_MORE MSG_CMSG_CLOEXEC = 0x40000000 /* Set close_on_exit for file - descriptor received through - SCM_RIGHTS. */ + descriptor received through + SCM_RIGHTS. */ #define MSG_CMSG_CLOEXEC MSG_CMSG_CLOEXEC }; @@ -256,6 +256,15 @@ struct msghdr int msg_flags; /* Flags on received message. */ }; +#ifdef __USE_GNU +/* For `recvmmsg'. */ +struct mmsghdr + { + struct msghdr msg_hdr; /* Actual message header. */ + unsigned int msg_len; /* Number of received bytes for the entry. */ + }; +#endif + /* Structure used for storage of ancillary data object information. */ struct cmsghdr { @@ -397,4 +406,18 @@ struct linger int l_linger; /* Time to linger. */ }; + +__BEGIN_DECLS + +/* Receive a message as described by MESSAGE from socket FD. + Returns the number of bytes read or -1 for errors. + + This function is a cancellation point and therefore not marked with + __THROW. */ +extern int recvmmsg (int __fd, struct mmsghdr *__vmessages, + unsigned int __vlen, int __flags, + __const struct timespec *__tmo); + +__END_DECLS + #endif /* bits/socket.h */ From 4d0f4f9f26f6185fef0be270fb5140be573af0f2 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 15 Dec 2009 18:11:13 +0000 Subject: [PATCH 3931/4487] Update ARM O_SYNC. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/bits/fcntl.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index c20b095226..03bfd34131 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2009-12-15 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Redefine O_SYNC and + O_DSYNC to match 2.6.33+ kernels. + 2009-11-19 Joseph Myers * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Introduce new symbol diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h index d597c10139..4971473c0c 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h @@ -41,7 +41,7 @@ #define O_APPEND 02000 #define O_NONBLOCK 04000 #define O_NDELAY O_NONBLOCK -#define O_SYNC 010000 +#define O_SYNC 04010000 #define O_FSYNC O_SYNC #define O_ASYNC 020000 @@ -57,7 +57,7 @@ We define the symbols here but let them do the same as O_SYNC since this is a superset. */ #if defined __USE_POSIX199309 || defined __USE_UNIX98 -# define O_DSYNC O_SYNC /* Synchronize data. */ +# define O_DSYNC 010000 /* Synchronize data. */ # define O_RSYNC O_SYNC /* Synchronize read operations. */ #endif From 93a0dfdaf4bdb1d0366da171794dd3e6b10287fe Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 15 Dec 2009 18:11:38 +0000 Subject: [PATCH 3932/4487] Update MIPS O_SYNC. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index b3125f46d2..9dfe2a5d1b 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2009-12-15 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Redefine O_SYNC and + O_DSYNC to match 2.6.33+ kernels. + 2009-12-09 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/socket.h: Define mmsghdr and diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index 5496912b7a..24fb974074 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -36,7 +36,7 @@ #define O_WRONLY 01 #define O_RDWR 02 #define O_APPEND 0x0008 -#define O_SYNC 0x0010 +#define O_SYNC 0x4010 #define O_NONBLOCK 0x0080 #define O_NDELAY O_NONBLOCK #define O_CREAT 0x0100 /* not fcntl */ @@ -58,7 +58,7 @@ We define the symbols here but let them do the same as O_SYNC since this is a superset. */ #if defined __USE_POSIX199309 || defined __USE_UNIX98 -# define O_DSYNC O_SYNC /* Synchronize data. */ +# define O_DSYNC 0x0010 /* Synchronize data. */ # define O_RSYNC O_SYNC /* Synchronize read operations. */ #endif From 4b8a7d2c3f00ac9a4e31e3c8c132b4b9aefbc5fe Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 16 Dec 2009 12:37:07 +0000 Subject: [PATCH 3933/4487] Update M68K O_SYNC. --- ChangeLog.m68k | 5 +++++ sysdeps/unix/sysv/linux/m68k/bits/fcntl.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 42d6a9115b..8411570b03 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2009-12-16 Joseph Myers + + * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Redefine O_SYNC and + O_DSYNC to match 2.6.33+ kernels. + 2009-11-23 Andreas Schwab * sysdeps/unix/sysv/linux/m68k/bits/stat.h: Use struct timespec diff --git a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h index 8ed8eb6c31..1f98cf583f 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h @@ -40,7 +40,7 @@ #define O_APPEND 02000 #define O_NONBLOCK 04000 #define O_NDELAY O_NONBLOCK -#define O_SYNC 010000 +#define O_SYNC 04010000 #define O_FSYNC O_SYNC #define O_ASYNC 020000 @@ -56,7 +56,7 @@ We define the symbols here but let them do the same as O_SYNC since this is a superset. */ #if defined __USE_POSIX199309 || defined __USE_UNIX98 -# define O_DSYNC O_SYNC /* Synchronize data. */ +# define O_DSYNC 010000 /* Synchronize data. */ # define O_RSYNC O_SYNC /* Synchronize read operations. */ #endif From 872083bf1559281ac2afc772ff2f093638e1d6e5 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 16 Dec 2009 17:44:03 +0000 Subject: [PATCH 3934/4487] Update MIPS dl-lookup.c. --- ChangeLog.mips | 4 ++++ sysdeps/mips/dl-lookup.c | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 9dfe2a5d1b..0f8f7c8796 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,7 @@ +2009-12-16 Joseph Myers + + * sysdeps/mips/dl-lookup.c: Update from generic version. + 2009-12-15 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Redefine O_SYNC and diff --git a/sysdeps/mips/dl-lookup.c b/sysdeps/mips/dl-lookup.c index c7deb4dc97..a9fff598a8 100644 --- a/sysdeps/mips/dl-lookup.c +++ b/sysdeps/mips/dl-lookup.c @@ -794,7 +794,7 @@ _dl_lookup_symbol_x (const char *undef_name, struct link_map *undef_map, if (__builtin_expect (protected != 0, 0)) { /* It is very tricky. We need to figure out what value to - return for the protected symbol. */ + return for the protected symbol. */ if (type_class == ELF_RTYPE_CLASS_PLT) { if (current_value.s != NULL && current_value.m != undef_map) @@ -839,7 +839,8 @@ _dl_lookup_symbol_x (const char *undef_name, struct link_map *undef_map, version, type_class, flags, skip_map); /* The object is used. */ - current_value.m->l_used = 1; + if (__builtin_expect (current_value.m->l_used == 0, 0)) + current_value.m->l_used = 1; if (__builtin_expect (GLRO(dl_debug_mask) & (DL_DEBUG_BINDINGS|DL_DEBUG_PRELINK), 0)) @@ -861,7 +862,7 @@ _dl_setup_hash (struct link_map *map) Elf_Symndx nchain; if (__builtin_expect (map->l_info[DT_ADDRTAGIDX (DT_GNU_HASH) + DT_NUM - + DT_THISPROCNUM + DT_VERSIONTAGNUM + + DT_THISPROCNUM + DT_VERSIONTAGNUM + DT_EXTRANUM + DT_VALNUM] != NULL, 1)) { Elf32_Word *hash32 From 8ef2c3b0f7f77ee6c7d20517aded3c0c52857911 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 16 Dec 2009 17:48:31 +0000 Subject: [PATCH 3935/4487] Update MIPS bits/poll.h for POSIX 2008. --- ChangeLog.mips | 6 ++++++ sysdeps/unix/sysv/linux/mips/bits/poll.h | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 0f8f7c8796..68ba90da56 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,9 @@ +2009-12-16 Joseph Myers + + [BZ #11093] + * sysdeps/unix/sysv/linux/mips/bits/poll.h: Define POLLRDNORM, + POLLRDBAND, POLLWRNORM, and POLLWRBAND also for POSIX 2008. + 2009-12-16 Joseph Myers * sysdeps/mips/dl-lookup.c: Update from generic version. diff --git a/sysdeps/unix/sysv/linux/mips/bits/poll.h b/sysdeps/unix/sysv/linux/mips/bits/poll.h index eee4ea253b..823123948e 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/poll.h +++ b/sysdeps/unix/sysv/linux/mips/bits/poll.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 2001, 2006 Free Software Foundation, Inc. +/* Copyright (C) 1997, 2001, 2006, 2009 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 @@ -27,7 +27,7 @@ #define POLLPRI 0x002 /* There is urgent data to read. */ #define POLLOUT 0x004 /* Writing now will not block. */ -#ifdef __USE_XOPEN +#if defined __USE_XOPEN || defined __USE_XOPEN2K8 /* These values are defined in XPG4.2. */ # define POLLRDNORM 0x040 /* Normal data may be read. */ # define POLLRDBAND 0x080 /* Priority data may be read. */ From 2423dc241af7be26cd91d34459da239f81a70f84 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Wed, 16 Dec 2009 18:02:51 +0000 Subject: [PATCH 3936/4487] Move ARM EABI mcount into a separate .S file. --- ChangeLog.arm | 9 ++++ sysdeps/arm/eabi/Makefile | 4 ++ sysdeps/arm/eabi/arm-mcount.S | 83 +++++++++++++++++++++++++++++++++ sysdeps/arm/eabi/machine-gmon.h | 83 ++++----------------------------- 4 files changed, 105 insertions(+), 74 deletions(-) create mode 100644 sysdeps/arm/eabi/arm-mcount.S diff --git a/ChangeLog.arm b/ChangeLog.arm index 03bfd34131..db1e93c119 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,12 @@ +2009-12-16 Thomas Schwinge + + * sysdeps/arm/eabi/Makefile [gmon] (sysdep_routines): Add arm-mcount. + * sysdeps/arm/eabi/machine-gmon.h (mcount_internal): Define to + `__mcount_internal'. + (MCOUNT (__gnu_mcount_nc), OLD_MCOUNT (_mcount), mcount): Move to... + * sysdeps/arm/eabi/arm-mcount.S: ... this new file as __gnu_mcount_nc, + _mcount, and mcount, respectively. + 2009-12-15 Joseph Myers * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Redefine O_SYNC and diff --git a/sysdeps/arm/eabi/Makefile b/sysdeps/arm/eabi/Makefile index 05aede6f3e..20572d43bc 100644 --- a/sysdeps/arm/eabi/Makefile +++ b/sysdeps/arm/eabi/Makefile @@ -12,6 +12,10 @@ static-only-routines += $(aeabi_constants) gen-as-const-headers += rtld-global-offsets.sym endif +ifeq ($(subdir),gmon) +sysdep_routines += arm-mcount +endif + ifeq ($(subdir),debug) CFLAGS-backtrace.c += -funwind-tables endif diff --git a/sysdeps/arm/eabi/arm-mcount.S b/sysdeps/arm/eabi/arm-mcount.S new file mode 100644 index 0000000000..2aa50b70e7 --- /dev/null +++ b/sysdeps/arm/eabi/arm-mcount.S @@ -0,0 +1,83 @@ +/* Implementation of profiling support. ARM EABI version. + Copyright (C) 2008, 2009 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. */ + +/* Don't call mcount when calling mcount... */ +#undef PROF + +#include + + +#ifdef __thumb2__ + .thumb + .syntax unified +#endif + + +/* Use an assembly stub with a special ABI. The calling lr has been + pushed to the stack (which will be misaligned). We should preserve + all registers except ip and pop a word off the stack. + + NOTE: This assumes mcount_internal does not clobber any non-core + (coprocessor) registers. Currently this is true, but may require + additional attention in the future. + + The calling sequence looks something like: +func: + push {lr} + bl __gnu_mount_nc + +*/ + +ENTRY(__gnu_mcount_nc) + push {r0, r1, r2, r3, lr} + bic r1, lr, #1 + ldr r0, [sp, #20] + bl __mcount_internal + pop {r0, r1, r2, r3, ip, lr} + bx ip +END(__gnu_mcount_nc) + + +/* Provide old mcount for backwards compatibility. This requires + code be compiled with APCS frame pointers. */ + +ENTRY(_mcount) + stmdb sp!, {r0, r1, r2, r3, fp, lr} +#ifdef __thumb2__ + movs r0, fp + ittt ne + ldrne r0, [r0, #-4] +#else + movs fp, fp + ldrne r0, [fp, #-4] +#endif + movnes r1, lr + blne __mcount_internal +#ifdef __thumb2__ + ldmia sp!, {r0, r1, r2, r3, fp, pc} +#else + ldmia sp!, {r0, r1, r2, r3, fp, lr} + bx lr +#endif +END(_mcount) + +/* The canonical name for the function is `_mcount' in both C and asm, + but some old asm code might assume it's `mcount'. */ +#undef mcount +weak_alias (_mcount, mcount) diff --git a/sysdeps/arm/eabi/machine-gmon.h b/sysdeps/arm/eabi/machine-gmon.h index 189a9a3c6c..aca23c9252 100644 --- a/sysdeps/arm/eabi/machine-gmon.h +++ b/sysdeps/arm/eabi/machine-gmon.h @@ -1,5 +1,5 @@ /* Machine-dependent definitions for profiling support. ARM EABI version. - Copyright (C) 2008 Free Software Foundation, Inc. + Copyright (C) 2008, 2009 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 @@ -17,83 +17,18 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include + /* GCC for the ARM cannot compile __builtin_return_address(N) for N != 0, so we must use an assembly stub. */ -#include -static void mcount_internal (u_long frompc, u_long selfpc) __attribute_used__; +/* We must not pollute the global namespace. */ +#define mcount_internal __mcount_internal +extern void mcount_internal (u_long frompc, u_long selfpc) internal_function; #define _MCOUNT_DECL(frompc, selfpc) \ -static void mcount_internal (u_long frompc, u_long selfpc) - -/* Use an assembly stub with a special ABI. The calling lr has been - pushed to the stack (which will be misaligned). We should preserve - all registers except ip and pop a word off the stack. - - NOTE: This assumes mcount_internal does not clobber any non-core - (coprocessor) registers. Currently this is true, but may require - additional attention in the future. - - The calling sequence looks something like: -func: - push {lr} - bl __gnu_mount_nc - - */ - - -#define MCOUNT \ -void __attribute__((__naked__)) __gnu_mcount_nc(void) \ -{ \ - asm ("push {r0, r1, r2, r3, lr}\n\t" \ - "bic r1, lr, #1\n\t" \ - "ldr r0, [sp, #20]\n\t" \ - "bl mcount_internal\n\t" \ - "pop {r0, r1, r2, r3, ip, lr}\n\t" \ - "bx ip"); \ -} \ -OLD_MCOUNT - -/* Provide old mcount for backwards compatibility. This requires - code be compiled with APCS frame pointers. */ - -#ifndef NO_UNDERSCORES -/* The asm symbols for C functions are `_function'. - The canonical name for the counter function is `mcount', no _. */ -void _mcount (void) asm ("mcount"); -#else -/* The canonical name for the function is `_mcount' in both C and asm, - but some old asm code might assume it's `mcount'. */ -void _mcount (void); -weak_alias (_mcount, mcount) -#endif - -#ifdef __thumb2__ - -#define OLD_MCOUNT \ -void __attribute__((__naked__)) _mcount (void) \ -{ \ - __asm__("push {r0, r1, r2, r3, fp, lr};" \ - "movs r0, fp;" \ - "ittt ne;" \ - "ldrne r0, [r0, #-4];" \ - "movsne r1, lr;" \ - "blne mcount_internal;" \ - "pop {r0, r1, r2, r3, fp, pc}"); \ -} - -#else + void internal_function mcount_internal (u_long frompc, u_long selfpc) -#define OLD_MCOUNT \ -void __attribute__((__naked__)) _mcount (void) \ -{ \ - __asm__("stmdb sp!, {r0, r1, r2, r3, fp, lr};" \ - "movs fp, fp;" \ - "ldrne r0, [fp, #-4];" \ - "movnes r1, lr;" \ - "blne mcount_internal;" \ - "ldmia sp!, {r0, r1, r2, r3, fp, lr};" \ - "bx lr"); \ -} -#endif +/* Define MCOUNT as empty since we have the implementation in another file. */ +#define MCOUNT From 5d79f83e907d938087a5a93c514e48a4ce438c9d Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 16 Dec 2009 19:35:09 +0000 Subject: [PATCH 3937/4487] Update M68K bits/poll.h for POSIX 2008. --- ChangeLog.m68k | 6 ++++++ sysdeps/unix/sysv/linux/m68k/bits/poll.h | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 8411570b03..978cd1a884 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,9 @@ +2009-12-16 Joseph Myers + + [BZ #11093] + * sysdeps/unix/sysv/linux/m68k/bits/poll.h: Define POLLRDNORM, + POLLRDBAND, POLLWRNORM, and POLLWRBAND also for POSIX 2008. + 2009-12-16 Joseph Myers * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Redefine O_SYNC and diff --git a/sysdeps/unix/sysv/linux/m68k/bits/poll.h b/sysdeps/unix/sysv/linux/m68k/bits/poll.h index bc285799e1..84219ba492 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/poll.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/poll.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 2001, 2008 Free Software Foundation, Inc. +/* Copyright (C) 1997, 2001, 2008, 2009 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 @@ -27,7 +27,7 @@ #define POLLPRI 0x002 /* There is urgent data to read. */ #define POLLOUT 0x004 /* Writing now will not block. */ -#ifdef __USE_XOPEN +#if defined __USE_XOPEN || defined __USE_XOPEN2K8 /* These values are defined in XPG4.2. */ # define POLLRDNORM 0x040 /* Normal data may be read. */ # define POLLRDBAND 0x080 /* Priority data may be read. */ From 0549913fb42c4af171849a1241a280ed9ab84c45 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sun, 10 Jan 2010 16:55:39 +0000 Subject: [PATCH 3938/4487] Update ARM bits/fcntl.h for XPG7. --- ChangeLog.arm | 6 ++++++ sysdeps/unix/sysv/linux/arm/bits/fcntl.h | 12 ++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index db1e93c119..9f3ee53912 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,9 @@ +2010-01-10 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Define O_DIRECTORY, + O_NOFOLLOW, O_CLOEXEC, F_DUPFD_CLOEXEC, F_SETOWN, and F_GETOWN for + XPG7. + 2009-12-16 Thomas Schwinge * sysdeps/arm/eabi/Makefile [gmon] (sysdep_routines): Add arm-mcount. diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h index 4971473c0c..77d6c5c761 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 1995-1998, 2000, 2004, 2006, 2007, 2009 + Copyright (C) 1995-1998, 2000, 2004, 2006, 2007, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -45,12 +45,14 @@ #define O_FSYNC O_SYNC #define O_ASYNC 020000 -#ifdef __USE_GNU +#ifdef __USE_XOPEN2K8 # define O_DIRECTORY 040000 /* Must be a directory. */ # define O_NOFOLLOW 0100000 /* Do not follow links. */ +# define O_CLOEXEC 02000000 /* Set close_on_exec. */ +#endif +#ifdef __USE_GNU # define O_DIRECT 0200000 /* Direct disk access. */ # define O_NOATIME 01000000 /* Do not set atime. */ -# define O_CLOEXEC 02000000 /* Set close_on_exec. */ #endif /* For now Linux has synchronisity options for data and read operations. @@ -84,7 +86,7 @@ #define F_SETLK64 13 /* Set record locking info (non-blocking). */ #define F_SETLKW64 14 /* Set record locking info (blocking). */ -#if defined __USE_BSD || defined __USE_UNIX98 +#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K8 # define F_SETOWN 8 /* Get owner (process receiving SIGIO). */ # define F_GETOWN 9 /* Set owner (process receiving SIGIO). */ #endif @@ -100,6 +102,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. */ +#endif +#ifdef __USE_XOPEN2K8 # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with close-on-exit set. */ #endif From 60a0880e369fb8fd1a3647c608b9ad1b6dfc1507 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sun, 10 Jan 2010 16:56:19 +0000 Subject: [PATCH 3939/4487] Update MIPS bits/fcntl.h for XPG7 and allow bits/stat.h inclusion from fcntl.h. --- ChangeLog.mips | 8 ++++++++ sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 14 +++++++++----- sysdeps/unix/sysv/linux/mips/bits/stat.h | 4 ++-- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 68ba90da56..31de4a2505 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,11 @@ +2010-01-10 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Define O_DIRECTORY, + O_NOFOLLOW, O_CLOEXEC, F_DUPFD_CLOEXEC, F_SETOWN, and F_GETOWN for + XPG7. + * sysdeps/unix/sysv/linux/mips/bits/stat.h: Enable using from + fcntl.h. + 2009-12-16 Joseph Myers [BZ #11093] diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index 24fb974074..37fb7e02c7 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -1,6 +1,6 @@ /* O_*, F_*, FD_* bit values for Linux. Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2003, 2004, 2006, - 2007, 2009 Free Software Foundation, Inc. + 2007, 2009, 2010 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 @@ -46,13 +46,15 @@ #define O_FSYNC O_SYNC #define O_ASYNC 0x1000 -#ifdef __USE_GNU +#ifdef __USE_XOPEN2K8 # define O_NOFOLLOW 0x20000 /* Do not follow links. */ -# define O_DIRECT 0x8000 /* Direct disk access hint. */ # define O_DIRECTORY 0x10000 /* Must be a directory. */ -# define O_NOATIME 0x40000 /* Do not set atime. */ # define O_CLOEXEC 02000000 /* Set close_on_exec. */ #endif +#ifdef __USE_GNU +# define O_DIRECT 0x8000 /* Direct disk access hint. */ +# define O_NOATIME 0x40000 /* Do not set atime. */ +#endif /* For now Linux has no synchronisity options for data and read operations. We define the symbols here but let them do the same as O_SYNC since @@ -86,7 +88,7 @@ #define F_SETLK64 34 /* Set record locking info (non-blocking). */ #define F_SETLKW64 35 /* Set record locking info (blocking). */ -#if defined __USE_BSD || defined __USE_UNIX98 +#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K8 # define F_SETOWN 24 /* Get owner (process receiving SIGIO). */ # define F_GETOWN 23 /* Set owner (process receiving SIGIO). */ #endif @@ -102,6 +104,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. */ +#endif +#ifdef __USE_XOPEN2K8 # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with close-on-exit set. */ #endif diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h index 7eb86a4cc8..5c00711dab 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/stat.h +++ b/sysdeps/unix/sysv/linux/mips/bits/stat.h @@ -1,5 +1,5 @@ /* Copyright (C) 1992, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, - 2007, 2009 Free Software Foundation, Inc. + 2007, 2009, 2010 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 @@ -17,7 +17,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#ifndef _SYS_STAT_H +#if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include directly; use instead." #endif From 2f12146a331fa728950cbe55da1efb406c26e5cb Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sun, 10 Jan 2010 19:02:51 +0000 Subject: [PATCH 3940/4487] Update M68K bits/fcntl.h for XPG7 and allow bits/stat.h inclusion from fcntl.h. --- ChangeLog.m68k | 8 ++++++++ sysdeps/unix/sysv/linux/m68k/bits/fcntl.h | 12 ++++++++---- sysdeps/unix/sysv/linux/m68k/bits/stat.h | 4 ++-- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 978cd1a884..094e7a8e77 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,11 @@ +2010-01-10 Joseph Myers + + * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Define O_DIRECTORY, + O_NOFOLLOW, O_CLOEXEC, F_DUPFD_CLOEXEC, F_SETOWN, and F_GETOWN for + XPG7. + * sysdeps/unix/sysv/linux/m68k/bits/stat.h: Enable using from + fcntl.h. + 2009-12-16 Joseph Myers [BZ #11093] diff --git a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h index 1f98cf583f..d1eb706c6b 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 2000, 2004, 2008, 2009 Free Software Foundation, Inc. + Copyright (C) 2000, 2004, 2008, 2009, 2010 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 @@ -44,12 +44,14 @@ #define O_FSYNC O_SYNC #define O_ASYNC 020000 -#ifdef __USE_GNU +#ifdef __USE_XOPEN2K8 # define O_DIRECTORY 040000 /* Must be a directory. */ # define O_NOFOLLOW 0100000 /* Do not follow links. */ +# define O_CLOEXEC 02000000 /* Set close_on_exec. */ +#endif +#ifdef __USE_GNU # define O_DIRECT 0200000 /* Direct disk access. */ # define O_NOATIME 01000000 /* Do not set atime. */ -# define O_CLOEXEC 02000000 /* Set close_on_exec. */ #endif /* For now Linux has synchronisity options for data and read operations. @@ -83,7 +85,7 @@ #define F_SETLK64 13 /* Set record locking info (non-blocking). */ #define F_SETLKW64 14 /* Set record locking info (blocking). */ -#if defined __USE_BSD || defined __USE_UNIX98 +#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K8 # define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */ # define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */ #endif @@ -99,6 +101,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. */ +#endif +#ifdef __USE_XOPEN2K8 # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with close-on-exit set. */ #endif diff --git a/sysdeps/unix/sysv/linux/m68k/bits/stat.h b/sysdeps/unix/sysv/linux/m68k/bits/stat.h index 780104365c..771a53aa24 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/stat.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992,95,96,97,98,99,2000,2001,2002,2008,2009 +/* Copyright (C) 1992,95,96,97,98,99,2000,2001,2002,2008,2009,2010 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -17,7 +17,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#ifndef _SYS_STAT_H +#if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include directly; use instead." #endif From 31afac471325a71831c3729e1a5bff6955304460 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 11 Jan 2010 13:28:37 +0000 Subject: [PATCH 3941/4487] Update MIPS bits/sigaction.h for XPG7. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/bits/sigaction.h | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 31de4a2505..dfc15dc6f3 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2010-01-11 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/sigaction.h: Define + SA_RESTART, SA_NODEFER and SA_RESETHAND if __USE_XOPEN2K8. + 2010-01-10 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Define O_DIRECTORY, diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h index d04e25f76f..ecddaf6555 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h +++ b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h @@ -1,5 +1,5 @@ /* The proper definitions for Linux/MIPS's sigaction. - Copyright (C) 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2003 + Copyright (C) 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2003, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -64,6 +64,8 @@ struct sigaction three arguments instead of one. */ #if defined __USE_UNIX98 || defined __USE_MISC # define SA_ONSTACK 0x08000000 /* Use signal stack by using `sa_restorer'. */ +#endif +#if defined __USE_UNIX98 || defined __USE_MISC || defined __USE_XOPEN2K8 # define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler. */ # define SA_RESTART 0x10000000 /* Restart syscall on signal return. */ # define SA_NODEFER 0x40000000 /* Don't automatically block the signal when From cbbf2c84d8842dcfc3137d79f4a26da72cfea78a Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 11 Jan 2010 21:00:28 +0000 Subject: [PATCH 3942/4487] Fix MIPS bits/stat.h double inclusion problem. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/bits/stat.h | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog.mips b/ChangeLog.mips index dfc15dc6f3..5795926d35 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2010-01-11 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/stat.h: Fix double-inclusion + problem. + 2010-01-11 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/sigaction.h: Define diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h index 5c00711dab..e8b016c944 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/stat.h +++ b/sysdeps/unix/sysv/linux/mips/bits/stat.h @@ -21,6 +21,9 @@ # error "Never include directly; use instead." #endif +#ifndef _BITS_STAT_H +#define _BITS_STAT_H 1 + #include /* Versions of the `struct stat' data structure. */ @@ -258,3 +261,5 @@ struct stat64 # define UTIME_NOW ((1l << 30) - 1l) # define UTIME_OMIT ((1l << 30) - 2l) #endif + +#endif /* bits/stat.h */ From fdefc0e1f176327cabedf4011673b3272321093e Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 11 Jan 2010 21:51:34 +0000 Subject: [PATCH 3943/4487] Fix M68K bits/stat.h double inclusion problem. --- ChangeLog.m68k | 5 +++++ sysdeps/unix/sysv/linux/m68k/bits/stat.h | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 094e7a8e77..cdc9242e4a 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2010-01-11 Joseph Myers + + * sysdeps/unix/sysv/linux/m68k/bits/stat.h: Fix double-inclusion + problem. + 2010-01-10 Joseph Myers * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Define O_DIRECTORY, diff --git a/sysdeps/unix/sysv/linux/m68k/bits/stat.h b/sysdeps/unix/sysv/linux/m68k/bits/stat.h index 771a53aa24..0c1d149d85 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/stat.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/stat.h @@ -21,6 +21,9 @@ # error "Never include directly; use instead." #endif +#ifndef _BITS_STAT_H +#define _BITS_STAT_H 1 + /* Versions of the `struct stat' data structure. */ #define _STAT_VER_LINUX_OLD 1 #define _STAT_VER_KERNEL 1 @@ -167,3 +170,5 @@ struct stat64 # define UTIME_NOW ((1l << 30) - 1l) # define UTIME_OMIT ((1l << 30) - 2l) #endif + +#endif /* bits/stat.h */ From 54b7103af4a93369e99a5df80d05dd6f70f17c0b Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 29 Jan 2010 01:54:52 +0000 Subject: [PATCH 3944/4487] Fix microMIPS glibc by avoiding hardcoded instruction length assumptions. microMIPS is a variable-length encoding of the MIPS32 instruction set (plus some extra instructions). As it supports almost all of MIPS32, assembly sources in glibc do not generally need changes to work with microMIPS, but dl-trampoline.c contains some code with a hardcoded assumption that three instructions occupy twelve bytes. This patch fixes this code for microMIPS by using the difference between two labels to let the assembler calculate the relevant length. --- ChangeLog.mips | 6 ++++++ sysdeps/mips/dl-trampoline.c | 12 ++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 5795926d35..6d47986f68 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,9 @@ +2010-01-28 Joseph Myers + + * sysdeps/mips/dl-trampoline.c (_dl_runtime_resolve, + _dl_runtime_pltresolve): Calculate offset from start of function + to .cpload instead of hardcoding instruction size. + 2010-01-11 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/stat.h: Fix double-inclusion diff --git a/sysdeps/mips/dl-trampoline.c b/sysdeps/mips/dl-trampoline.c index ff58b0d5e2..2c9414035c 100644 --- a/sysdeps/mips/dl-trampoline.c +++ b/sysdeps/mips/dl-trampoline.c @@ -278,13 +278,13 @@ _dl_runtime_resolve:\n\ .frame $29, " STRINGXP(ELF_DL_FRAME_SIZE) ", $31\n\ .set noreorder\n\ # Save GP.\n\ - move $3, $28\n\ +1: move $3, $28\n\ # Save arguments and sp value in stack.\n\ " STRINGXP(PTR_SUBIU) " $29, " STRINGXP(ELF_DL_FRAME_SIZE) "\n\ # Modify t9 ($25) so as to point .cpload instruction.\n\ - " IFABIO32(STRINGXP(PTR_ADDIU) " $25, 12\n") "\ + " IFABIO32(STRINGXP(PTR_ADDIU) " $25, (2f-1b)\n") "\ # Compute GP.\n\ - " STRINGXP(SETUP_GP) "\n\ +2: " STRINGXP(SETUP_GP) "\n\ " STRINGXV(SETUP_GP64 (0, _dl_runtime_resolve)) "\n\ .set reorder\n\ # Save slot call pc.\n\ @@ -334,13 +334,13 @@ _dl_runtime_pltresolve:\n\ .frame $29, " STRINGXP(ELF_DL_PLT_FRAME_SIZE) ", $31\n\ .set noreorder\n\ # Save arguments and sp value in stack.\n\ - " STRINGXP(PTR_SUBIU) " $29, " STRINGXP(ELF_DL_PLT_FRAME_SIZE) "\n\ +1: " STRINGXP(PTR_SUBIU) " $29, " STRINGXP(ELF_DL_PLT_FRAME_SIZE) "\n\ " IFABIO32(STRINGXP(PTR_L) " $13, " STRINGXP(PTRSIZE) "($28)") "\n\ " IFNEWABI(STRINGXP(PTR_L) " $13, " STRINGXP(PTRSIZE) "($14)") "\n\ # Modify t9 ($25) so as to point .cpload instruction.\n\ - " IFABIO32(STRINGXP(PTR_ADDIU) " $25, 12\n") "\ + " IFABIO32(STRINGXP(PTR_ADDIU) " $25, (2f-1b)\n") "\ # Compute GP.\n\ - " STRINGXP(SETUP_GP) "\n\ +2: " STRINGXP(SETUP_GP) "\n\ " STRINGXV(SETUP_GP64 (0, _dl_runtime_pltresolve)) "\n\ .set reorder\n\ " IFABIO32(STRINGXP(CPRESTORE(32))) "\n\ From 77b22d3e998132c5c27cd43c92f141ccb2175192 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 30 Jan 2010 00:11:54 +0000 Subject: [PATCH 3945/4487] alpha: fix typo in timer_settime include --- ChangeLog.alpha | 5 +++++ sysdeps/unix/sysv/linux/alpha/nptl/timer_settime.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index ed97e8b65b..e0fc5a38f5 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,8 @@ +2009-12-02 Mike Frysinger + + * sysdeps/unix/sysv/linux/alpha/nptl/timer_settime.c: Fix typo in + include timer_gettime.c -> timer_settime.c. + 2009-11-23 Matt Turner * sysdeps/unix/sysv/linux/alpha/bits/stat.h: Use struct timespec diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/timer_settime.c b/sysdeps/unix/sysv/linux/alpha/nptl/timer_settime.c index c1106695e7..93d4ad9344 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/timer_settime.c +++ b/sysdeps/unix/sysv/linux/alpha/nptl/timer_settime.c @@ -1 +1 @@ -#include +#include From 1f4a25ae2bf28e46fbb3a2443d86d00b0a296eef Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Sat, 30 Jan 2010 00:17:16 +0000 Subject: [PATCH 3946/4487] Update Alpha O_SYNC. --- ChangeLog.alpha | 5 +++++ sysdeps/unix/sysv/linux/alpha/bits/fcntl.h | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index e0fc5a38f5..2bf2d52353 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,8 @@ +2010-01-12 Matt Turner + + * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h: Redefine O_SYNC and + O_DSYNC to match 2.6.33+ kernels. + 2009-12-02 Mike Frysinger * sysdeps/unix/sysv/linux/alpha/nptl/timer_settime.c: Fix typo in diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h index 1e716438db..a6ea1caccc 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 1995-2000,2004,2005,2006,2007 Free Software Foundation, Inc. + Copyright (C) 1995-2000,2004,2005,2006,2007,2010 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 @@ -41,7 +41,7 @@ #define O_NONBLOCK 00004 #define O_APPEND 00010 #define O_NDELAY O_NONBLOCK -#define O_SYNC 040000 +#define O_SYNC 020040000 #define O_FSYNC O_SYNC #define O_ASYNC 020000 /* fcntl, for BSD compatibility */ @@ -62,7 +62,7 @@ We define the symbols here but let them do the same as O_SYNC since this is a superset. */ #if defined __USE_POSIX199309 || defined __USE_UNIX98 -# define O_DSYNC O_SYNC /* Synchronize data. */ +# define O_DSYNC 040000 /* Synchronize data. */ # define O_RSYNC O_SYNC /* Synchronize read operations. */ #endif From 54faff05177fa993e3d656ee1882c56e9da39393 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Sat, 30 Jan 2010 00:19:01 +0000 Subject: [PATCH 3947/4487] Update Alpha bits/fcntl.h for XPG7 and allow bits/stat.h inclusion from fcntl.h. --- ChangeLog.alpha | 8 ++++++++ sysdeps/unix/sysv/linux/alpha/bits/fcntl.h | 10 +++++++--- sysdeps/unix/sysv/linux/alpha/bits/stat.h | 4 ++-- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 2bf2d52353..ea50ee7513 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,11 @@ +2010-01-12 Matt Turner + + * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h: Define O_DIRECTORY, + O_NOFOLLOW, O_CLOEXEC, F_DUPFD_CLOEXEC, F_SETOWN, and F_GETOWN for + XPG7. + * sysdeps/unix/sysv/linux/alpha/bits/stat.h: Enable using from + fcntl.h. + 2010-01-12 Matt Turner * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h: Redefine O_SYNC and diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h index a6ea1caccc..7a6a3fd0f2 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h @@ -45,12 +45,14 @@ #define O_FSYNC O_SYNC #define O_ASYNC 020000 /* fcntl, for BSD compatibility */ -#ifdef __USE_GNU +#ifdef __USE_XOPEN2K8 # define O_DIRECTORY 0100000 /* Must be a directory. */ # define O_NOFOLLOW 0200000 /* Do not follow links. */ +# define O_CLOEXEC 010000000 /* Set close_on_exec. */ +#endif +#ifdef __USE_GNU # define O_DIRECT 02000000 /* Direct disk access. */ # define O_NOATIME 04000000 /* Do not set atime. */ -# define O_CLOEXEC 010000000 /* Set close_on_exec. */ #endif #ifdef __USE_LARGEFILE64 @@ -79,7 +81,7 @@ #define F_SETLK64 F_SETLK /* Set record locking info (non-blocking). */ #define F_SETLKW64 F_SETLKW /* Set record locking info (blocking). */ -#if defined __USE_BSD || defined __USE_UNIX98 +#if defined __USE_BSD || defined __USE_UNIX98 || defiend __USE_XOPEN2K8 # define F_SETOWN 5 /* Get owner of socket (receiver of SIGIO). */ # define F_GETOWN 6 /* Set owner of socket (receiver of SIGIO). */ #endif @@ -93,6 +95,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. */ +#endif +#ifdef __USE_XOPEN2K8 # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with close-on-exit set. */ #endif diff --git a/sysdeps/unix/sysv/linux/alpha/bits/stat.h b/sysdeps/unix/sysv/linux/alpha/bits/stat.h index 0aaabe295d..4dbfebe99f 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/stat.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996,1997,1998,1999,2000,2001,2004 +/* Copyright (C) 1996,1997,1998,1999,2000,2001,2004,2010 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -17,7 +17,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#ifndef _SYS_STAT_H +#if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include directly; use instead." #endif From 1480094d1fbd0e67c0a47b8bc6e417b039df5811 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Sat, 30 Jan 2010 00:21:08 +0000 Subject: [PATCH 3948/4487] Update Alpha bits/sigaction.h for XPG7. --- ChangeLog.alpha | 5 +++++ sysdeps/unix/sysv/linux/alpha/bits/sigaction.h | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index ea50ee7513..4eaf02f36d 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,8 @@ +2010-01-12 Matt Turner + + * sysdeps/unix/sysv/linux/alpha/bits/sigaction.h: Define + SA_RESTART, SA_NODEFER and SA_RESETHAND if __USE_XOPEN2K8. + 2010-01-12 Matt Turner * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h: Define O_DIRECTORY, diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h index 80feb2fa2d..cdf47588a3 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h @@ -1,5 +1,5 @@ /* The proper definitions for Linux/Alpha sigaction. - Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1999, 2000, 2010 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 @@ -54,6 +54,8 @@ struct sigaction three arguments instead of one. */ #if defined __USE_UNIX98 || defined __USE_MISC # define SA_ONSTACK 0x00000001 /* Use signal stack by using `sa_restorer'. */ +#endif +#if defined __USE_UNIX98 || defined __USE_MISC || defined __USE_XOPEN2K8 # define SA_RESTART 0x00000002 /* Restart syscall on signal return. */ # define SA_NODEFER 0x00000008 /* Don't automatically block the signal when its handler is being executed. */ From aa576322e055c8ab05b8d57301691d9efd2c4560 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Sat, 30 Jan 2010 00:22:01 +0000 Subject: [PATCH 3949/4487] Fix Alpha bits/stat.h double inclusion problem. --- ChangeLog.alpha | 5 +++++ sysdeps/unix/sysv/linux/alpha/bits/stat.h | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 4eaf02f36d..e41c202887 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,8 @@ +2010-01-12 Matt Turner + + * sysdeps/unix/sysv/linux/alpha/bits/stat.h: Fix double-inclusion + problem. + 2010-01-12 Matt Turner * sysdeps/unix/sysv/linux/alpha/bits/sigaction.h: Define diff --git a/sysdeps/unix/sysv/linux/alpha/bits/stat.h b/sysdeps/unix/sysv/linux/alpha/bits/stat.h index 4dbfebe99f..d7241bd1aa 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/stat.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/stat.h @@ -21,6 +21,9 @@ # error "Never include directly; use instead." #endif +#ifndef _BITS_STAT_H +#define _BITS_STAT_H 1 + /* Versions of the `struct stat' data structure. */ #define _STAT_VER_KERNEL 0 #define _STAT_VER_GLIBC2 1 @@ -155,3 +158,5 @@ struct stat64 # define UTIME_NOW ((1l << 30) - 1l) # define UTIME_OMIT ((1l << 30) - 2l) #endif + +#endif /* bits/stat.h */ From b8eca7ff8ca1cbc3e1d6bec2fed4213863fa441b Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Tue, 1 Dec 2009 10:45:41 -0500 Subject: [PATCH 3950/4487] Update constants and rearrange file. Update F_SETOWN_EX and F_GETOWN_EX. Rearrange the file to match other targets, reducing future diffs against other targets and making maintenance easier. --- ChangeLog.hppa | 7 ++ sysdeps/unix/sysv/linux/hppa/bits/fcntl.h | 119 ++++++++++++++-------- 2 files changed, 83 insertions(+), 43 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 24a152e139..be0a71a91d 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,10 @@ +2009-11-29 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h: + Rearrange file to reduce future maintenance. + [__USE_GNU]: Update F_GETOWN_EX, and F_SETOWN_EX. + Define f_owner_ex an __pid_type. + 2009-11-25 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h: diff --git a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h index a0b0e07b06..a2c64827ab 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h @@ -1,6 +1,6 @@ /* O_*, F_*, FD_* bit values for Linux/HPPA. Copyright (C) 1995,1996,1997,1998,1999,2000,2002,2004 - Free Software Foundation, Inc. + 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 @@ -18,7 +18,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#ifndef _FCNTL_H +#ifndef _FCNTL_H # error "Never use directly; include instead." #endif @@ -27,23 +27,24 @@ # include #endif + /* open/fcntl - O_SYNC is only implemented on blocks devices and on files located on an ext2 file system */ -#define O_RDONLY 00000000 -#define O_WRONLY 00000001 -#define O_RDWR 00000002 -#define O_ACCMODE 00000003 -#define O_APPEND 00000010 -#define O_BLKSEEK 00000100 /* HPUX only */ +#define O_ACCMODE 0003 +#define O_RDONLY 00 +#define O_WRONLY 01 +#define O_RDWR 02 #define O_CREAT 00000400 /* not fcntl */ -#define O_TRUNC 00001000 /* not fcntl */ #define O_EXCL 00002000 /* not fcntl */ -#define O_ASYNC 00020000 -#define O_SYNC 00100000 +#define O_NOCTTY 00400000 /* not fcntl */ +#define O_TRUNC 00001000 /* not fcntl */ +#define O_APPEND 00000010 #define O_NONBLOCK 00200004 /* HPUX has separate NDELAY & NONBLOCK */ #define O_NDELAY O_NONBLOCK -#define O_NOCTTY 00400000 /* not fcntl */ - +#define O_SYNC 00100000 +#define O_FSYNC O_SYNC +#define O_ASYNC 020000 +#define O_BLKSEEK 00000100 /* HPUX only */ #ifdef __USE_GNU # define O_DIRECT 000040000 /* Direct disk access. */ @@ -53,15 +54,18 @@ # define O_CLOEXEC 010000000 /* Set close_on_exec. */ #endif -#ifdef __USE_LARGEFILE64 -# define O_LARGEFILE 00004000 -#endif - +/* For now Linux has synchronisity options for data and read operations. + We define the symbols here but let them do the same as O_SYNC since + this is a superset. */ #if defined __USE_POSIX199309 || defined __USE_UNIX98 # define O_DSYNC 01000000 /* HPUX only */ # define O_RSYNC 02000000 /* HPUX only */ #endif +#ifdef __USE_LARGEFILE64 +# define O_LARGEFILE 00004000 +#endif + /* Values for the second argument to `fcntl'. */ #define F_DUPFD 0 /* Duplicate file descriptor. */ #define F_GETFD 1 /* Get file descriptor flags. */ @@ -70,11 +74,11 @@ #define F_SETFL 4 /* Set file status flags. */ #ifndef __USE_FILE_OFFSET64 # define F_GETLK 5 /* Get record locking info. */ -# define F_SETLK 6 /* Set record locking info (non-blocking). */ -# define F_SETLKW 7 /* Set record locking info (blocking). */ +# define F_SETLK 6 /* Set record locking info (non-blocking). */ +# define F_SETLKW 7 /* Set record locking info (blocking). */ #else -# define F_GETLK F_GETLK64 /* Get record locking info. */ -# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking). */ +# define F_GETLK F_GETLK64 /* Get record locking info. */ +# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/ # define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */ #endif #define F_GETLK64 8 /* Get record locking info. */ @@ -89,19 +93,19 @@ #ifdef __USE_GNU # define F_SETSIG 13 /* Set number of signal to be sent. */ # define F_GETSIG 14 /* Get number of signal to be sent. */ -# define F_GETOWN_EX 15 -# define F_SETOWN_EX 16 +# define F_SETOWN_EX 15 /* Get owner (thread receiving SIGIO). */ +# define F_GETOWN_EX 16 /* Set owner (thread receiving SIGIO). */ #endif #ifdef __USE_GNU -# 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_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. */ #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(). */ @@ -109,12 +113,12 @@ #define F_WRLCK 2 /* Write lock. */ #define F_UNLCK 3 /* Remove lock. */ -/* for old implementation of bsd flock () */ +/* For old implementation of bsd flock(). */ #define F_EXLCK 4 /* or 3 */ #define F_SHLCK 8 /* or 4 */ #ifdef __USE_BSD -/* operations for bsd flock(), also used by the kernel implementation */ +/* Operations for bsd flock(), also used by the kernel implementation. */ # define LOCK_SH 1 /* shared lock */ # define LOCK_EX 2 /* exclusive lock */ # define LOCK_NB 4 /* or'd with one of the above to prevent @@ -122,20 +126,27 @@ # define LOCK_UN 8 /* remove lock */ #endif +#ifdef __USE_GNU +# define LOCK_MAND 32 /* This is a mandatory flock: */ +# define LOCK_READ 64 /* ... which allows concurrent read operations. */ +# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */ +# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */ +#endif + #ifdef __USE_GNU /* Types of directory notifications that may be requested with F_NOTIFY. */ -# define DN_ACCESS 0x00000001 /* File accessed. */ -# define DN_MODIFY 0x00000002 /* File modified. */ -# define DN_CREATE 0x00000004 /* File created. */ -# define DN_DELETE 0x00000008 /* File removed. */ -# define DN_RENAME 0x00000010 /* File renamed. */ -# define DN_ATTRIB 0x00000020 /* File changed attibutes. */ -# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */ +# define DN_ACCESS 0x00000001 /* File accessed. */ +# define DN_MODIFY 0x00000002 /* File modified. */ +# define DN_CREATE 0x00000004 /* File created. */ +# define DN_DELETE 0x00000008 /* File removed. */ +# define DN_RENAME 0x00000010 /* File renamed. */ +# define DN_ATTRIB 0x00000020 /* File changed attibutes. */ +# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */ #endif struct flock { - short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ #ifndef __USE_FILE_OFFSET64 __off_t l_start; /* Offset where the lock begins. */ @@ -150,7 +161,7 @@ struct flock #ifdef __USE_LARGEFILE64 struct flock64 { - short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ __off64_t l_start; /* Offset where the lock begins. */ __off64_t l_len; /* Size of the locked area; zero means until EOF. */ @@ -158,6 +169,24 @@ struct flock64 }; #endif +#ifdef __USE_GNU +/* Owner types. */ +enum __pid_type + { + F_OWNER_TID = 0, /* Kernel thread. */ + F_OWNER_PID, /* Process. */ + F_OWNER_PGRP, /* Process group. */ + F_OWNER_GID = F_OWNER_PGRP /* Alternative, obsolete name. */ + }; + +/* Structure to use with F_GETOWN_EX and F_SETOWN_EX. */ +struct f_owner_ex + { + enum __pid_type type; /* Owner type of ID. */ + __pid_t pid; /* ID of owner. */ + }; +#endif + /* Define some more compatibility macros to be backward compatible with BSD systems which did not managed to hide these kernel macros. */ #ifdef __USE_BSD @@ -172,13 +201,15 @@ struct flock64 #ifdef __USE_XOPEN2K # define POSIX_FADV_NORMAL 0 /* No further special treatment. */ # define POSIX_FADV_RANDOM 1 /* Expect random page references. */ -# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */ # define POSIX_FADV_WILLNEED 3 /* Will need these pages. */ # define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */ # define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ #endif + #ifdef __USE_GNU +/* 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. */ @@ -206,16 +237,18 @@ __BEGIN_DECLS extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count) __THROW; + /* Selective file content synch'ing. */ -extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to, +extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count, unsigned int __flags); + /* Splice address range into a pipe. */ -extern ssize_t vmsplice (int __fdout, const struct iovec *__iov, +extern ssize_t vmsplice (int __fdout, const struct iovec *__iov, size_t __count, unsigned int __flags); /* Splice two files together. */ -extern ssize_t splice (int __fdin, __off64_t *offin, int __fdout, +extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout, __off64_t *__offout, size_t __len, unsigned int __flags); @@ -241,5 +274,5 @@ extern int fallocate64 (int __fd, int __mode, __off64_t __offset, # endif #endif - + __END_DECLS From cbbda7adb231ee3367f077b4ed9ec9620afd12db Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Mon, 1 Feb 2010 17:47:51 -0500 Subject: [PATCH 3951/4487] Adjust errlist-compat to 257 for GLIBC_2.12 Added definitions for EOWNERDEAD, ENOTRECOVERABLE and ERFKILL. --- ChangeLog.hppa | 9 +++++++++ sysdeps/unix/sysv/linux/hppa/Versions | 4 ++++ sysdeps/unix/sysv/linux/hppa/bits/errno.h | 12 ++++++++++++ 3 files changed, 25 insertions(+) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index be0a71a91d..4ccc1df435 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,12 @@ +2010-02-01 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/Versions: Bump + errlist-compat to 257 for GLIBC_2.12. + * sysdeps/unix/sysv/linux/hppa/bits/errno.h + (EOWNERDEAD): Define if not already defined. + (ENOTRECOVERABLE): Likewise. + (ERFKILL): Likewise. + 2009-11-29 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h: diff --git a/sysdeps/unix/sysv/linux/hppa/Versions b/sysdeps/unix/sysv/linux/hppa/Versions index 3dbc9ac50d..3bff6ec4fc 100644 --- a/sysdeps/unix/sysv/linux/hppa/Versions +++ b/sysdeps/unix/sysv/linux/hppa/Versions @@ -23,6 +23,10 @@ libc { GLIBC_2.11 { fallocate64; } + GLIBC_2.12 { + #errlist-compat 257 + _sys_errlist; sys_errlist; _sys_nerr; sys_nerr; + } } librt { GLIBC_2.3 { diff --git a/sysdeps/unix/sysv/linux/hppa/bits/errno.h b/sysdeps/unix/sysv/linux/hppa/bits/errno.h index 003d71f622..742448dd4e 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/errno.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/errno.h @@ -30,6 +30,18 @@ # define ECANCELED ECANCELLED # endif +# ifndef EOWNERDEAD +# define EOWNERDEAD 254 +# endif + +# ifndef ENOTRECOVERABLE +# define ENOTRECOVERABLE 255 +# endif + +# ifndef ERFKILL +# define ERFKILL 256 +# endif + # ifndef __ASSEMBLER__ /* Function to get address of global `errno' variable. */ extern int *__errno_location (void) __THROW __attribute__ ((__const__)); From fa1b9bae63e87161783dafaf3187251901216bad Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Mon, 1 Feb 2010 17:52:33 -0500 Subject: [PATCH 3952/4487] Fix SOCK_CLOEXEC for accept4 Adjust the value of SOCK_CLOEXEC to match the kernel value used for accept4. This has never worked in the past, and all old applications are broken, therefore we change this value to match the kernel value. --- ChangeLog.hppa | 5 +++++ sysdeps/unix/sysv/linux/hppa/bits/socket.h | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 4ccc1df435..28a3c44e72 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,8 @@ +2010-02-01 Kyle McMartin + + * sysdeps/unix/sysv/linux/hppa/bits/socket.h: Fix value of + SOCK_CLOEXEC to match O_CLOEXEC. + 2010-02-01 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/Versions: Bump diff --git a/sysdeps/unix/sysv/linux/hppa/bits/socket.h b/sysdeps/unix/sysv/linux/hppa/bits/socket.h index ac6e81b0ff..bcc27ccc6f 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/socket.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/socket.h @@ -1,6 +1,6 @@ /* System-specific socket constants and types. Linux version. - Copyright (C) 1991, 1992, 1994-2001, 2004, 2006, 2007, 2008, 2009 - Free Software Foundation, Inc. + Copyright (C) 1991, 1992, 1994-2001, 2004, 2006, 2007, 2008, 2009, + 2010 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 @@ -62,7 +62,7 @@ enum __socket_type /* Flags to be ORed into the type parameter of socket and socketpair and used for the flags parameter of paccept. */ - SOCK_CLOEXEC = 02000000, /* Atomically set close-on-exec flag for the + SOCK_CLOEXEC = 01000000, /* Atomically set close-on-exec flag for the new descriptor(s). */ #define SOCK_CLOEXEC SOCK_CLOEXEC #undef SOCK_NONBLOCK From caf557426d1d46e42f0f235bee4ca9d400d09d26 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 10 Feb 2010 15:14:41 +0000 Subject: [PATCH 3953/4487] Add hidden alias for ARM fegetenv. --- ChangeLog.arm | 5 +++++ sysdeps/arm/eabi/fegetenv.c | 3 ++- sysdeps/arm/fpu/fegetenv.c | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 9f3ee53912..fbd173ea84 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2010-02-10 Joseph Myers + + * sysdeps/arm/eabi/fegetenv.c, sysdeps/arm/fpu/fegetenv.c: Add + hidden alias. + 2010-01-10 Joseph Myers * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Define O_DIRECTORY, diff --git a/sysdeps/arm/eabi/fegetenv.c b/sysdeps/arm/eabi/fegetenv.c index 35bfac8434..0491381944 100644 --- a/sysdeps/arm/eabi/fegetenv.c +++ b/sysdeps/arm/eabi/fegetenv.c @@ -1,5 +1,5 @@ /* Store current floating-point environment. - Copyright (C) 1997,98,99,2000,01,05 Free Software Foundation, Inc. + Copyright (C) 1997,98,99,2000,01,05,10 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 @@ -48,4 +48,5 @@ strong_alias (__fegetenv, __old_fegetenv) compat_symbol (libm, __old_fegetenv, fegetenv, GLIBC_2_1); #endif +libm_hidden_ver (__fegetenv, fegetenv) versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2); diff --git a/sysdeps/arm/fpu/fegetenv.c b/sysdeps/arm/fpu/fegetenv.c index 0b40f183e2..e59d2ebc44 100644 --- a/sysdeps/arm/fpu/fegetenv.c +++ b/sysdeps/arm/fpu/fegetenv.c @@ -1,5 +1,5 @@ /* Store current floating-point environment. - Copyright (C) 1997,98,99,2000,01 Free Software Foundation, Inc. + Copyright (C) 1997,98,99,2000,01,10 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,4 +37,5 @@ strong_alias (__fegetenv, __old_fegetenv) compat_symbol (libm, __old_fegetenv, fegetenv, GLIBC_2_1); #endif +libm_hidden_ver (__fegetenv, fegetenv) versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2); From 8256e69afdc080d7e001422b5faf83e37d7f872a Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 10 Feb 2010 15:15:32 +0000 Subject: [PATCH 3954/4487] Add hidden alias for MIPS fegetenv. --- ChangeLog.mips | 4 ++++ sysdeps/mips/fpu/fegetenv.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 6d47986f68..c2609b07e8 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,7 @@ +2010-02-10 Joseph Myers + + * sysdeps/mips/fpu/fegetenv.c: Add hidden alias. + 2010-01-28 Joseph Myers * sysdeps/mips/dl-trampoline.c (_dl_runtime_resolve, diff --git a/sysdeps/mips/fpu/fegetenv.c b/sysdeps/mips/fpu/fegetenv.c index c1741385fd..da5d597746 100644 --- a/sysdeps/mips/fpu/fegetenv.c +++ b/sysdeps/mips/fpu/fegetenv.c @@ -1,5 +1,5 @@ /* Store current floating-point environment. - Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2002, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger , 1998. @@ -29,3 +29,4 @@ fegetenv (fenv_t *envp) /* Success. */ return 0; } +libm_hidden_def (fegetenv) From 5ed9c2ea8a804aa03ba487cbbf4aa30b9deb81ac Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 10 Feb 2010 15:15:58 +0000 Subject: [PATCH 3955/4487] Add hidden alias for soft-float PowerPC fegetenv. --- ChangeLog.powerpc | 4 ++++ sysdeps/powerpc/nofpu/fegetenv.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.powerpc b/ChangeLog.powerpc index 136f97a2a2..390c774d23 100644 --- a/ChangeLog.powerpc +++ b/ChangeLog.powerpc @@ -1,3 +1,7 @@ +2010-02-10 Joseph Myers + + * sysdeps/powerpc/nofpu/fegetenv.c: Add hidden alias. + 2008-08-19 Joseph Myers * sysdeps/powerpc/nofpu/shlib-versions: New. diff --git a/sysdeps/powerpc/nofpu/fegetenv.c b/sysdeps/powerpc/nofpu/fegetenv.c index 3cc8b13dac..64c0e8c48f 100644 --- a/sysdeps/powerpc/nofpu/fegetenv.c +++ b/sysdeps/powerpc/nofpu/fegetenv.c @@ -1,6 +1,6 @@ /* Store current floating-point environment (soft-float edition). Copyright (C) 2002 Free Software Foundation, Inc. - Contributed by Aldy Hernandez , 2002. + Contributed by Aldy Hernandez , 2002, 2010. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -46,4 +46,5 @@ strong_alias (__fegetenv, __old_fegetenv) compat_symbol (libm, BP_SYM (__old_fegetenv), BP_SYM (fegetenv), GLIBC_2_1); #endif +libm_hidden_ver (__fegetenv, fegetenv) versioned_symbol (libm, BP_SYM (__fegetenv), BP_SYM (fegetenv), GLIBC_2_2); From ee0c4dd1ccc424d57d97dc078a4aba0c70eeb8a4 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 10 Feb 2010 15:32:33 +0000 Subject: [PATCH 3956/4487] Add hidden alias for M68K fegetenv. --- ChangeLog.m68k | 4 ++++ sysdeps/m68k/fpu/fegetenv.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index cdc9242e4a..8487ba3e5c 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,7 @@ +2010-02-10 Joseph Myers + + * sysdeps/m68k/fpu/fegetenv.c: Add hidden alias. + 2010-01-11 Joseph Myers * sysdeps/unix/sysv/linux/m68k/bits/stat.h: Fix double-inclusion diff --git a/sysdeps/m68k/fpu/fegetenv.c b/sysdeps/m68k/fpu/fegetenv.c index 6f23e8b749..30f3fa5a5e 100644 --- a/sysdeps/m68k/fpu/fegetenv.c +++ b/sysdeps/m68k/fpu/fegetenv.c @@ -1,5 +1,5 @@ /* Store current floating-point environment. - Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc. + Copyright (C) 1997,99,2000,01,10 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab @@ -41,4 +41,5 @@ strong_alias (__fegetenv, __old_fegetenv) compat_symbol (libm, __old_fegetenv, fegetenv, GLIBC_2_1); #endif +libm_hidden_ver (__fegetenv, fegetenv) versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2); From 40215fde031482b484d993a91b9e64c6081c96eb Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Tue, 2 Feb 2010 16:36:48 -0500 Subject: [PATCH 3957/4487] Add unlimited argument support to makecontext() The initial implementation of makecontext() supported only 8 arguments. This change adds support for unlimited argument processing given a large enough stack. --- ChangeLog.hppa | 5 ++ sysdeps/unix/sysv/linux/hppa/makecontext.c | 61 ++++++++++------------ 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 28a3c44e72..ef389099c3 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,8 @@ +2010-02-02 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/makecontext.c (__makecontext): + Support more than 8 arguments. + 2010-02-01 Kyle McMartin * sysdeps/unix/sysv/linux/hppa/bits/socket.h: Fix value of diff --git a/sysdeps/unix/sysv/linux/hppa/makecontext.c b/sysdeps/unix/sysv/linux/hppa/makecontext.c index 69a18135d9..cb036d0412 100644 --- a/sysdeps/unix/sysv/linux/hppa/makecontext.c +++ b/sysdeps/unix/sysv/linux/hppa/makecontext.c @@ -1,5 +1,5 @@ /* Create new context. - Copyright (C) 2008 Free Software Foundation, Inc. + Copyright (C) 2008, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Helge Deller , 2008. @@ -25,24 +25,21 @@ #include #include -/* XXX: This implementation only handles integer arguments. */ +/* POSIX only supports integer arguments. */ +#define STACK_ALIGN 64 +#define FRAME_SIZE 8 void __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...) { - unsigned int *sp; + unsigned long *sp; va_list ap; int i; - if (argc > 8) - { - fprintf (stderr, _("\ -makecontext: does not know how to handle more than 8 arguments\n")); - exit (-1); - } - - /* Get stack pointer. */ - sp = (unsigned int *) ucp->uc_stack.ss_sp; + /* Get stack pointer (64-byte aligned). */ + sp = (unsigned long *)((((unsigned long) ucp->uc_stack.ss_sp) + + FRAME_SIZE + argc + STACK_ALIGN) + & ~(STACK_ALIGN - 1)); /* Store address to jump to. */ ucp->uc_mcontext.sc_gr[2] = (unsigned long) func; @@ -50,29 +47,27 @@ makecontext: does not know how to handle more than 8 arguments\n")); va_start (ap, argc); /* Handle arguments. */ for (i = 0; i < argc; ++i) - switch (i) - { - case 0: - case 1: - case 2: - case 3: - ucp->uc_mcontext.sc_gr[26-i] = va_arg (ap, int); - break; - case 4: - case 5: - case 6: - case 7: - if (sizeof(unsigned long) == 4) { - /* 32bit: put arg7-arg4 on stack. */ - sp[7-i] = va_arg (ap, int); - } else { - /* 64bit: r19-r22 are arg7-arg4. */ - ucp->uc_mcontext.sc_gr[22+4-i] = va_arg (ap, int); + { + if (i < 4) + { + ucp->uc_mcontext.sc_gr[26-i] = va_arg (ap, int); + continue; } - break; - } - va_end (ap); + if ((i < 8) && (sizeof(unsigned long) == 8)) + { + /* 64bit: r19-r22 are arg7-arg4. */ + ucp->uc_mcontext.sc_gr[22+4-i] = va_arg (ap, int); + continue; + } + + /* All other arguments go on the stack. */ + sp[-1 * (FRAME_SIZE + 1 + i)] = va_arg (ap, int); + } + va_end (ap); + + /* Adjust the stack pointer to last used argument. */ + ucp->uc_mcontext.sc_gr[30] = (unsigned long) sp; } From d143075adc1b95a2760fa9d81c9de39b0b803091 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Tue, 2 Feb 2010 16:40:28 -0500 Subject: [PATCH 3958/4487] Update __set_cr27() to mark r31 clobbered. The function __set_cr27() uses the `ble` instruction without marking the link register r31 as clobbered. This change adds r31 to the list of clobbers. The TLS thread register is cr27 and is set by calling __set_cr27(). --- ChangeLog.hppa | 5 +++++ sysdeps/hppa/nptl/tls.h | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index ef389099c3..4ddd2c353c 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,8 @@ +2010-02-02 Carlos O'Donell + + * sysdeps/hppa/nptl/tls.h (__set_cr27): Clobber + link register r31. + 2010-02-02 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/makecontext.c (__makecontext): diff --git a/sysdeps/hppa/nptl/tls.h b/sysdeps/hppa/nptl/tls.h index 2810d713fd..389cbb9494 100644 --- a/sysdeps/hppa/nptl/tls.h +++ b/sysdeps/hppa/nptl/tls.h @@ -1,5 +1,5 @@ /* Definition for thread-local data handling. NPTL/hppa version. - Copyright (C) 2005, 2007 Free Software Foundation, Inc. + Copyright (C) 2005, 2007, 2010 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 @@ -140,11 +140,13 @@ static inline struct pthread *__get_cr27(void) return (struct pthread *) cr27; } +/* We write to cr27, clobber r26 as the input argument, and clobber + r31 as the link register. */ static inline void __set_cr27(struct pthread *cr27) { asm ( "ble 0xe0(%%sr2, %%r0)\n\t" "copy %0, %%r26" - : : "r" (cr27) : "r26" ); + : : "r" (cr27) : "r26", "r31" ); } /* Get and set the global scope generation counter in struct pthread. */ From 317d0e66a01302c98367b8776d5e7936a80f8ffb Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Tue, 2 Feb 2010 16:50:15 -0500 Subject: [PATCH 3959/4487] Define MADV_MERGEABLE and MADV_UNMERGEABLE. Add MADV_MERGEABLE and MADV_UNMERGEABLE to bits/mman.h, matching HPPA values used in Linux kernel 2.6.32. --- ChangeLog.hppa | 5 +++++ sysdeps/unix/sysv/linux/hppa/bits/mman.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 4ddd2c353c..a74131e7e6 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,8 @@ +2010-02-02 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/bits/mman.h: Define + MADV_MERGEABLE and MADV_UNMERGEABLE. + 2010-02-02 Carlos O'Donell * sysdeps/hppa/nptl/tls.h (__set_cr27): Clobber diff --git a/sysdeps/unix/sysv/linux/hppa/bits/mman.h b/sysdeps/unix/sysv/linux/hppa/bits/mman.h index f065322175..780862a38d 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/mman.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/mman.h @@ -86,6 +86,8 @@ # define MADV_REMOVE 9 /* Remove these pages and resources. */ # define MADV_DONTFORK 10 /* Do not inherit across fork. */ # define MADV_DOFORK 11 /* Do inherit across fork. */ +# define MADV_MERGEABLE 65 /* KSM may merge identical pages */ +# define MADV_UNMERGEABLE 66 /* KSM may not merge identical pages */ #endif /* The range 12-64 is reserved for page size specification. */ From f3ed03373affbd13ee8dbbeb933959381ae492bb Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Wed, 17 Feb 2010 09:52:26 -0500 Subject: [PATCH 3960/4487] Fix SOCK_CLOEXEC on HPPA to match O_CLOEXEC. The kernel defines SOCK_CLOEXEC as include/linux/net.h:#define SOCK_CLOEXEC O_CLOEXEC arch/parisc/include/asm/fcntl.h:#define O_CLOEXEC 010000000 But glibc was defining sysdeps/unix/sysv/linux/hppa/bits/socket.h: SOCK_CLOEXEC = 01000000, Signed-off-by: Matt Turner Signed-off-by: Kyle McMartin Signed-off-by: Carlos O'Donell --- ChangeLog.hppa | 5 +++++ sysdeps/unix/sysv/linux/hppa/bits/socket.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index a74131e7e6..9fd9f89fb6 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,8 @@ +2010-02-17 Matt Turner + + * sysdeps/unix/sysv/linux/hppa/bits/socket.h: Actually fix + SOCK_CLOEXEC to match O_CLOEXEC. + 2010-02-02 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/bits/mman.h: Define diff --git a/sysdeps/unix/sysv/linux/hppa/bits/socket.h b/sysdeps/unix/sysv/linux/hppa/bits/socket.h index bcc27ccc6f..819b39820d 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/socket.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/socket.h @@ -62,7 +62,7 @@ enum __socket_type /* Flags to be ORed into the type parameter of socket and socketpair and used for the flags parameter of paccept. */ - SOCK_CLOEXEC = 01000000, /* Atomically set close-on-exec flag for the + SOCK_CLOEXEC = 010000000, /* Atomically set close-on-exec flag for the new descriptor(s). */ #define SOCK_CLOEXEC SOCK_CLOEXEC #undef SOCK_NONBLOCK From 42ae1878f326c413dd026373ebdb6bf6cd20e75d Mon Sep 17 00:00:00 2001 From: Maxim Kuvyrkov Date: Tue, 9 Mar 2010 02:20:36 -0800 Subject: [PATCH 3961/4487] m68k: update jmpbuf-unwind.h --- ChangeLog.m68k | 5 +++++ sysdeps/m68k/jmpbuf-unwind.h | 23 ++++++++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 8487ba3e5c..d14368e493 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2010-03-09 Maxim Kuvyrkov + + * sysdeps/m68k/jmpbuf-unwind.h (_JMPBUF_CFA_UNWINDS_ADJ) + (_jmpbuf_sp, _JMPBUF_UNWINDS_ADJ, __libc_unwind_longjmp): Define. + 2010-02-10 Joseph Myers * sysdeps/m68k/fpu/fegetenv.c: Add hidden alias. diff --git a/sysdeps/m68k/jmpbuf-unwind.h b/sysdeps/m68k/jmpbuf-unwind.h index 3490c79bdc..28b9537960 100644 --- a/sysdeps/m68k/jmpbuf-unwind.h +++ b/sysdeps/m68k/jmpbuf-unwind.h @@ -1,5 +1,5 @@ /* Examine __jmp_buf for unwinding frames. m68k version. - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006, 2010 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 @@ -18,8 +18,29 @@ 02111-1307 USA. */ #include +#include +#include /* Test if longjmp to JMPBUF would unwind the frame containing a local variable at ADDRESS. */ #define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \ ((void *) (address) < (void *) demangle ((jmpbuf)->__sp)) + +#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \ + _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj) + +static inline uintptr_t __attribute__ ((unused)) +_jmpbuf_sp (__jmp_buf regs) +{ + uintptr_t sp = regs[0].__sp; +#ifdef PTR_DEMANGLE + PTR_DEMANGLE (sp); +#endif + return sp; +} + +#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \ + ((uintptr_t) (_address) - (_adj) < _jmpbuf_sp (_jmpbuf) - (_adj)) + +/* We use the normal longjmp for unwinding. */ +#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val) From d8e90a15fedd2660d02f5d8e4e7da17e01916d30 Mon Sep 17 00:00:00 2001 From: Maxim Kuvyrkov Date: Tue, 9 Mar 2010 02:32:38 -0800 Subject: [PATCH 3962/4487] m68k: remove bits/siginfo.h in favor of generic one --- ChangeLog.m68k | 2 + sysdeps/unix/sysv/linux/m68k/bits/siginfo.h | 316 -------------------- 2 files changed, 2 insertions(+), 316 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/m68k/bits/siginfo.h diff --git a/ChangeLog.m68k b/ChangeLog.m68k index d14368e493..e2b54e5c5c 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,5 +1,7 @@ 2010-03-09 Maxim Kuvyrkov + * sysdeps/unix/sysv/linux/m68k/bits/siginfo.h: Remove. + * sysdeps/m68k/jmpbuf-unwind.h (_JMPBUF_CFA_UNWINDS_ADJ) (_jmpbuf_sp, _JMPBUF_UNWINDS_ADJ, __libc_unwind_longjmp): Define. diff --git a/sysdeps/unix/sysv/linux/m68k/bits/siginfo.h b/sysdeps/unix/sysv/linux/m68k/bits/siginfo.h deleted file mode 100644 index 1ded1c2a4a..0000000000 --- a/sysdeps/unix/sysv/linux/m68k/bits/siginfo.h +++ /dev/null @@ -1,316 +0,0 @@ -/* siginfo_t, sigevent and constants. m68k linux version. - Copyright (C) 1997-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. */ - -#if !defined _SIGNAL_H && !defined __need_siginfo_t \ - && !defined __need_sigevent_t -# error "Never include this file directly. Use instead" -#endif - -#include - -#if (!defined __have_sigval_t \ - && (defined _SIGNAL_H || defined __need_siginfo_t \ - || defined __need_sigevent_t)) -# define __have_sigval_t 1 - -/* Type for data associated with a signal. */ -typedef union sigval - { - int sival_int; - void *sival_ptr; - } sigval_t; -#endif - -#if (!defined __have_siginfo_t \ - && (defined _SIGNAL_H || defined __need_siginfo_t)) -# define __have_siginfo_t 1 - -# define __SI_MAX_SIZE 128 -# if __WORDSIZE == 64 -# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 4) -# else -# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3) -# endif - -typedef struct siginfo - { - int si_signo; /* Signal number. */ - int si_errno; /* If non-zero, an errno value associated with - this signal, as defined in . */ - int si_code; /* Signal code. */ - - union - { - int _pad[__SI_PAD_SIZE]; - - /* kill(). */ - struct - { - __pid_t si_pid; /* Sending process ID. */ - unsigned short __pad; /* 16-bit version of si_uid. */ - __uid_t si_uid; /* Real user ID of sending process. */ - } _kill; - - /* POSIX.1b timers. */ - struct - { - int si_tid; /* Timer ID. */ - int si_overrun; /* Overrun count. */ - sigval_t si_sigval; /* Signal value. */ - } _timer; - - /* POSIX.1b signals. */ - struct - { - __pid_t si_pid; /* Sending process ID. */ - unsigned short __pad; /* 16-bit version of si_uid. */ - sigval_t si_sigval; /* Signal value. */ - __uid_t si_uid; /* Real user ID of sending process. */ - } _rt; - - /* SIGCHLD. */ - struct - { - __pid_t si_pid; /* Which child. */ - unsigned short __pad; /* 16-bit version of si_uid. */ - int si_status; /* Exit value or signal. */ - __clock_t si_utime; - __clock_t si_stime; - __uid_t si_uid; /* Real user ID of sending process. */ - } _sigchld; - - /* SIGILL, SIGFPE, SIGSEGV, SIGBUS. */ - struct - { - void *si_addr; /* Faulting insn/memory ref. */ - } _sigfault; - - /* SIGPOLL. */ - struct - { - long int si_band; /* Band event for SIGPOLL. */ - int si_fd; - } _sigpoll; - } _sifields; - } siginfo_t; - - -/* X/Open requires some more fields with fixed names. */ -# define si_pid _sifields._kill.si_pid -# define si_uid _sifields._kill.si_uid -# define si_timerid _sifields._timer.si_tid -# define si_overrun _sifields._timer.si_overrun -# define si_status _sifields._sigchld.si_status -# define si_utime _sifields._sigchld.si_utime -# define si_stime _sifields._sigchld.si_stime -# define si_value _sifields._rt.si_sigval -# define si_int _sifields._rt.si_sigval.sival_int -# define si_ptr _sifields._rt.si_sigval.sival_ptr -# define si_addr _sifields._sigfault.si_addr -# define si_band _sifields._sigpoll.si_band -# define si_fd _sifields._sigpoll.si_fd - - -/* Values for `si_code'. Positive values are reserved for kernel-generated - signals. */ -enum -{ - SI_ASYNCNL = -60, /* Sent by asynch name lookup completion. */ -# define SI_ASYNCNL SI_ASYNCNL - SI_TKILL = -6, /* Sent by tkill. */ -# define SI_TKILL SI_TKILL - SI_SIGIO, /* Sent by queued SIGIO. */ -# define SI_SIGIO SI_SIGIO - SI_ASYNCIO, /* Sent by AIO completion. */ -# define SI_ASYNCIO SI_ASYNCIO - SI_MESGQ, /* Sent by real time mesq state change. */ -# define SI_MESGQ SI_MESGQ - SI_TIMER, /* Sent by timer expiration. */ -# define SI_TIMER SI_TIMER - SI_QUEUE, /* Sent by sigqueue. */ -# define SI_QUEUE SI_QUEUE - SI_USER, /* Sent by kill, sigsend, raise. */ -# define SI_USER SI_USER - SI_KERNEL = 0x80 /* Send by kernel. */ -#define SI_KERNEL SI_KERNEL -}; - - -/* `si_code' values for SIGILL signal. */ -enum -{ - ILL_ILLOPC = 1, /* Illegal opcode. */ -# define ILL_ILLOPC ILL_ILLOPC - ILL_ILLOPN, /* Illegal operand. */ -# define ILL_ILLOPN ILL_ILLOPN - ILL_ILLADR, /* Illegal addressing mode. */ -# define ILL_ILLADR ILL_ILLADR - ILL_ILLTRP, /* Illegal trap. */ -# define ILL_ILLTRP ILL_ILLTRP - ILL_PRVOPC, /* Privileged opcode. */ -# define ILL_PRVOPC ILL_PRVOPC - ILL_PRVREG, /* Privileged register. */ -# define ILL_PRVREG ILL_PRVREG - ILL_COPROC, /* Coprocessor error. */ -# define ILL_COPROC ILL_COPROC - ILL_BADSTK /* Internal stack error. */ -# define ILL_BADSTK ILL_BADSTK -}; - -/* `si_code' values for SIGFPE signal. */ -enum -{ - FPE_INTDIV = 1, /* Integer divide by zero. */ -# define FPE_INTDIV FPE_INTDIV - FPE_INTOVF, /* Integer overflow. */ -# define FPE_INTOVF FPE_INTOVF - FPE_FLTDIV, /* Floating point divide by zero. */ -# define FPE_FLTDIV FPE_FLTDIV - FPE_FLTOVF, /* Floating point overflow. */ -# define FPE_FLTOVF FPE_FLTOVF - FPE_FLTUND, /* Floating point underflow. */ -# define FPE_FLTUND FPE_FLTUND - FPE_FLTRES, /* Floating point inexact result. */ -# define FPE_FLTRES FPE_FLTRES - FPE_FLTINV, /* Floating point invalid operation. */ -# define FPE_FLTINV FPE_FLTINV - FPE_FLTSUB /* Subscript out of range. */ -# define FPE_FLTSUB FPE_FLTSUB -}; - -/* `si_code' values for SIGSEGV signal. */ -enum -{ - SEGV_MAPERR = 1, /* Address not mapped to object. */ -# define SEGV_MAPERR SEGV_MAPERR - SEGV_ACCERR /* Invalid permissions for mapped object. */ -# define SEGV_ACCERR SEGV_ACCERR -}; - -/* `si_code' values for SIGBUS signal. */ -enum -{ - BUS_ADRALN = 1, /* Invalid address alignment. */ -# define BUS_ADRALN BUS_ADRALN - BUS_ADRERR, /* Non-existant physical address. */ -# define BUS_ADRERR BUS_ADRERR - BUS_OBJERR /* Object specific hardware error. */ -# define BUS_OBJERR BUS_OBJERR -}; - -/* `si_code' values for SIGTRAP signal. */ -enum -{ - TRAP_BRKPT = 1, /* Process breakpoint. */ -# define TRAP_BRKPT TRAP_BRKPT - TRAP_TRACE /* Process trace trap. */ -# define TRAP_TRACE TRAP_TRACE -}; - -/* `si_code' values for SIGCHLD signal. */ -enum -{ - CLD_EXITED = 1, /* Child has exited. */ -# define CLD_EXITED CLD_EXITED - CLD_KILLED, /* Child was killed. */ -# define CLD_KILLED CLD_KILLED - CLD_DUMPED, /* Child terminated abnormally. */ -# define CLD_DUMPED CLD_DUMPED - CLD_TRAPPED, /* Traced child has trapped. */ -# define CLD_TRAPPED CLD_TRAPPED - CLD_STOPPED, /* Child has stopped. */ -# define CLD_STOPPED CLD_STOPPED - CLD_CONTINUED /* Stopped child has continued. */ -# define CLD_CONTINUED CLD_CONTINUED -}; - -/* `si_code' values for SIGPOLL signal. */ -enum -{ - POLL_IN = 1, /* Data input available. */ -# define POLL_IN POLL_IN - POLL_OUT, /* Output buffers available. */ -# define POLL_OUT POLL_OUT - POLL_MSG, /* Input message available. */ -# define POLL_MSG POLL_MSG - POLL_ERR, /* I/O error. */ -# define POLL_ERR POLL_ERR - POLL_PRI, /* High priority input available. */ -# define POLL_PRI POLL_PRI - POLL_HUP /* Device disconnected. */ -# define POLL_HUP POLL_HUP -}; - -# undef __need_siginfo_t -#endif /* !have siginfo_t && (have _SIGNAL_H || need siginfo_t). */ - - -#if (defined _SIGNAL_H || defined __need_sigevent_t) \ - && !defined __have_sigevent_t -# define __have_sigevent_t 1 - -/* Structure to transport application-defined values with signals. */ -# define __SIGEV_MAX_SIZE 64 -# if __WORDSIZE == 64 -# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4) -# else -# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3) -# endif - -typedef struct sigevent - { - sigval_t sigev_value; - int sigev_signo; - int sigev_notify; - - union - { - int _pad[__SIGEV_PAD_SIZE]; - - /* When SIGEV_SIGNAL and SIGEV_THREAD_ID set, LWP ID of the - thread to receive the signal. */ - __pid_t _tid; - - struct - { - void (*_function) (sigval_t); /* Function to start. */ - void *_attribute; /* Really pthread_attr_t. */ - } _sigev_thread; - } _sigev_un; - } sigevent_t; - -/* POSIX names to access some of the members. */ -# define sigev_notify_function _sigev_un._sigev_thread._function -# define sigev_notify_attributes _sigev_un._sigev_thread._attribute - -/* `sigev_notify' values. */ -enum -{ - SIGEV_SIGNAL = 0, /* Notify via signal. */ -# define SIGEV_SIGNAL SIGEV_SIGNAL - SIGEV_NONE, /* Other notification: meaningless. */ -# define SIGEV_NONE SIGEV_NONE - SIGEV_THREAD, /* Deliver via thread creation. */ -# define SIGEV_THREAD SIGEV_THREAD - - SIGEV_THREAD_ID = 4 /* Send signal to specific thread. */ -#define SIGEV_THREAD_ID SIGEV_THREAD_ID -}; - -#endif /* have _SIGNAL_H. */ From 75e73e66e49104a7aff24aa50043ae7ab02e38f3 Mon Sep 17 00:00:00 2001 From: Maxim Kuvyrkov Date: Tue, 9 Mar 2010 02:34:24 -0800 Subject: [PATCH 3963/4487] m68k: update ColdFire sigcontext ABI --- ChangeLog.m68k | 3 + .../unix/sysv/linux/m68k/bits/sigcontext.h | 62 ------------------- sysdeps/unix/sysv/linux/m68k/register-dump.h | 32 +++------- 3 files changed, 10 insertions(+), 87 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/m68k/bits/sigcontext.h diff --git a/ChangeLog.m68k b/ChangeLog.m68k index e2b54e5c5c..d63b88e495 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,5 +1,8 @@ 2010-03-09 Maxim Kuvyrkov + * sysdeps/unix/sysv/linux/m68k/bits/sigcontext.h: Remove. + * sysdeps/unix/sysv/linux/m68k/register-dump.h: Update. + * sysdeps/unix/sysv/linux/m68k/bits/siginfo.h: Remove. * sysdeps/m68k/jmpbuf-unwind.h (_JMPBUF_CFA_UNWINDS_ADJ) diff --git a/sysdeps/unix/sysv/linux/m68k/bits/sigcontext.h b/sysdeps/unix/sysv/linux/m68k/bits/sigcontext.h deleted file mode 100644 index 8ad0c96563..0000000000 --- a/sysdeps/unix/sysv/linux/m68k/bits/sigcontext.h +++ /dev/null @@ -1,62 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H -# error "Never use directly; include instead." -#endif - -#ifndef _BITS_SIGCONTEXT_H -#define _BITS_SIGCONTEXT_H 1 - -struct sigcontext { - unsigned long sc_mask; - unsigned long sc_usp; - unsigned long sc_d0; - unsigned long sc_d1; -#ifdef __mcoldfire__ - unsigned long sc_d2; - unsigned long sc_d3; - unsigned long sc_d4; - unsigned long sc_d5; - unsigned long sc_d6; - unsigned long sc_d7; -#endif - unsigned long sc_a0; - unsigned long sc_a1; -#ifdef __mcoldfire__ - unsigned long sc_a2; - unsigned long sc_a3; - unsigned long sc_a4; - unsigned long sc_a5; - unsigned long sc_a6; -#endif - unsigned short sc_sr; - unsigned long sc_pc; - unsigned short sc_formatvec; -#ifdef __mcoldfire__ - unsigned long sc_fpregs[8][2]; - unsigned long sc_fpcntl[3]; - unsigned char sc_fpstate[16]; -#else - unsigned long sc_fpregs[2*3]; - unsigned long sc_fpcntl[3]; - unsigned char sc_fpstate[216]; -#endif -}; - -#endif diff --git a/sysdeps/unix/sysv/linux/m68k/register-dump.h b/sysdeps/unix/sysv/linux/m68k/register-dump.h index 391902f494..78709d9cc6 100644 --- a/sysdeps/unix/sysv/linux/m68k/register-dump.h +++ b/sysdeps/unix/sysv/linux/m68k/register-dump.h @@ -40,7 +40,6 @@ */ -#ifndef __mcoldfire__ /* Linux saves only the call-clobbered registers in the sigcontext. We need to use a trampoline that saves the rest so that the C code can access them. We use the sc_fpstate field, since the handler is not @@ -59,14 +58,17 @@ catch_segfault:\n\ /* Clear the first 4 bytes to make it a null fp state, just\n\ in case the handler does return. */\n\ clr.l (%%a0)+\n\ - movem.l %%d2-%%d7/%%a2-%%a6,(%%a0)\n\ - fmovem.x %%fp2-%%fp7,11*4(%%a0)\n\ - jra real_catch_segfault" + movem.l %%d2-%%d7/%%a2-%%a6,(%%a0)\n" +#ifndef __mcoldfire__ + "fmovem.x %%fp2-%%fp7,11*4(%%a0)\n" +#elif defined __mcffpu__ + "fmovem.d %%fp2-%%fp7,11*4(%%a0)\n" +#endif + "jra real_catch_segfault" : : "n" (offsetof (struct sigcontext, sc_fpstate))); } #define catch_segfault(a,b) \ __attribute_used__ real_catch_segfault(a,b) -#endif static void hexvalue (unsigned long int value, char *buf, size_t len) @@ -104,36 +106,19 @@ register_dump (int fd, struct sigcontext *ctx) /* Generate strings of register contents. */ hexvalue (ctx->sc_d0, regs[0], 8); hexvalue (ctx->sc_d1, regs[1], 8); -#ifdef __mcoldfire__ - hexvalue (ctx->sc_d2, regs[2], 8); - hexvalue (ctx->sc_d3, regs[3], 8); - hexvalue (ctx->sc_d4, regs[4], 8); - hexvalue (ctx->sc_d5, regs[5], 8); - hexvalue (ctx->sc_d6, regs[6], 8); - hexvalue (ctx->sc_d7, regs[7], 8); -#else hexvalue (*p++, regs[2], 8); hexvalue (*p++, regs[3], 8); hexvalue (*p++, regs[4], 8); hexvalue (*p++, regs[5], 8); hexvalue (*p++, regs[6], 8); hexvalue (*p++, regs[7], 8); -#endif hexvalue (ctx->sc_a0, regs[8], 8); hexvalue (ctx->sc_a1, regs[9], 8); -#ifdef __mcoldfire__ - hexvalue (ctx->sc_a2, regs[10], 8); - hexvalue (ctx->sc_a3, regs[11], 8); - hexvalue (ctx->sc_a4, regs[12], 8); - hexvalue (ctx->sc_a5, regs[13], 8); - hexvalue (ctx->sc_a6, regs[14], 8); -#else hexvalue (*p++, regs[10], 8); hexvalue (*p++, regs[11], 8); hexvalue (*p++, regs[12], 8); hexvalue (*p++, regs[13], 8); hexvalue (*p++, regs[14], 8); -#endif hexvalue (ctx->sc_usp, regs[15], 8); hexvalue (ctx->sc_pc, regs[16], 8); hexvalue (ctx->sc_sr, regs[17], 4); @@ -142,9 +127,6 @@ register_dump (int fd, struct sigcontext *ctx) for (i = 0; i < 2; i++) for (j = 0; j < fpreg_size; j += 8) hexvalue (*pfp++, fpregs[i] + j, 8); -#ifdef __mcoldfire__ - p = pfp; -#endif for (i = 2; i < 8; i++) for (j = 0; j < fpreg_size; j += 8) hexvalue (*p++, fpregs[i] + j, 8); From 40111cb9e17a911c8913f00d9b913a71ceb6e609 Mon Sep 17 00:00:00 2001 From: Maxim Kuvyrkov Date: Fri, 12 Mar 2010 19:50:55 +0100 Subject: [PATCH 3964/4487] NPTL support for m68k/ColdFire --- ChangeLog.m68k | 40 +++ sysdeps/m68k/dl-machine.h | 34 ++- sysdeps/m68k/dl-tls.h | 48 +++ sysdeps/m68k/libc-tls.c | 38 +++ sysdeps/m68k/nptl/Makefile | 22 ++ sysdeps/m68k/nptl/pthread_spin_lock.c | 31 ++ sysdeps/m68k/nptl/pthread_spin_trylock.c | 28 ++ sysdeps/m68k/nptl/pthreaddef.h | 39 +++ sysdeps/m68k/nptl/tcb-offsets.sym | 11 + sysdeps/m68k/nptl/tls.h | 171 +++++++++++ sysdeps/m68k/tls-macros.h | 70 +++++ sysdeps/unix/sysv/linux/m68k/Makefile | 6 + sysdeps/unix/sysv/linux/m68k/Versions | 14 + sysdeps/unix/sysv/linux/m68k/bits/m68k-vdso.h | 61 ++++ sysdeps/unix/sysv/linux/m68k/clone.S | 52 +++- .../linux/m68k/coldfire/nptl/bits/atomic.h | 105 +++++++ sysdeps/unix/sysv/linux/m68k/init-first.c | 74 +++++ sysdeps/unix/sysv/linux/m68k/libc-m68k-vdso.c | 1 + sysdeps/unix/sysv/linux/m68k/m68k-helpers.S | 105 +++++++ sysdeps/unix/sysv/linux/m68k/m68k-vdso.c | 35 +++ .../sysv/linux/m68k/nptl/bits/pthreadtypes.h | 172 +++++++++++ .../sysv/linux/m68k/nptl/bits/semaphore.h | 36 +++ sysdeps/unix/sysv/linux/m68k/nptl/clone.S | 2 + .../unix/sysv/linux/m68k/nptl/createthread.c | 25 ++ sysdeps/unix/sysv/linux/m68k/nptl/fork.c | 30 ++ .../unix/sysv/linux/m68k/nptl/lowlevellock.h | 281 ++++++++++++++++++ sysdeps/unix/sysv/linux/m68k/nptl/pt-vfork.S | 36 +++ .../unix/sysv/linux/m68k/nptl/pthread_once.c | 91 ++++++ .../unix/sysv/linux/m68k/nptl/sysdep-cancel.h | 141 +++++++++ sysdeps/unix/sysv/linux/m68k/nptl/vfork.S | 38 +++ sysdeps/unix/sysv/linux/m68k/socket.S | 28 +- sysdeps/unix/sysv/linux/m68k/sysdep.h | 23 +- sysdeps/unix/sysv/linux/m68k/vfork.S | 18 +- 33 files changed, 1886 insertions(+), 20 deletions(-) create mode 100644 sysdeps/m68k/dl-tls.h create mode 100644 sysdeps/m68k/libc-tls.c create mode 100644 sysdeps/m68k/nptl/Makefile create mode 100644 sysdeps/m68k/nptl/pthread_spin_lock.c create mode 100644 sysdeps/m68k/nptl/pthread_spin_trylock.c create mode 100644 sysdeps/m68k/nptl/pthreaddef.h create mode 100644 sysdeps/m68k/nptl/tcb-offsets.sym create mode 100644 sysdeps/m68k/nptl/tls.h create mode 100644 sysdeps/m68k/tls-macros.h create mode 100644 sysdeps/unix/sysv/linux/m68k/bits/m68k-vdso.h create mode 100644 sysdeps/unix/sysv/linux/m68k/coldfire/nptl/bits/atomic.h create mode 100644 sysdeps/unix/sysv/linux/m68k/init-first.c create mode 100644 sysdeps/unix/sysv/linux/m68k/libc-m68k-vdso.c create mode 100644 sysdeps/unix/sysv/linux/m68k/m68k-helpers.S create mode 100644 sysdeps/unix/sysv/linux/m68k/m68k-vdso.c create mode 100644 sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h create mode 100644 sysdeps/unix/sysv/linux/m68k/nptl/bits/semaphore.h create mode 100644 sysdeps/unix/sysv/linux/m68k/nptl/clone.S create mode 100644 sysdeps/unix/sysv/linux/m68k/nptl/createthread.c create mode 100644 sysdeps/unix/sysv/linux/m68k/nptl/fork.c create mode 100644 sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h create mode 100644 sysdeps/unix/sysv/linux/m68k/nptl/pt-vfork.S create mode 100644 sysdeps/unix/sysv/linux/m68k/nptl/pthread_once.c create mode 100644 sysdeps/unix/sysv/linux/m68k/nptl/sysdep-cancel.h create mode 100644 sysdeps/unix/sysv/linux/m68k/nptl/vfork.S diff --git a/ChangeLog.m68k b/ChangeLog.m68k index d63b88e495..32681fff72 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,5 +1,45 @@ 2010-03-09 Maxim Kuvyrkov + NPTL support for m68k/ColdFire + * sysdeps/unix/sysv/linux/m68k/sysdep.h (tls.h): Include. + (INTERNAL_SYSCALL): Convert to INTERNAL_SYSCALL_NCS. + (PTR_MANGLE, PTR_DEMANGLE): Define. + (NEED_STATIC_SYSINFO_DSO): Define. + * sysdeps/unix/sysv/linux/m68k/clone.S: Support RESET_PID. + * sysdeps/unix/sysv/linux/m68k/m68k-helpers.S: New. + * sysdeps/unix/sysv/linux/m68k/Makefile: Add new files to lists. + * sysdeps/unix/sysv/linux/m68k/vfork.S: Add SAVE_PID/RESTORE_PID. + * sysdeps/unix/sysv/linux/m68k/m68k-vdso.c: New. + * sysdeps/unix/sysv/linux/m68k/libc-m68k-vdso.c: New. + * sysdeps/unix/sysv/linux/m68k/bits/m68k-vdso.h: New. + * sysdeps/unix/sysv/linux/m68k/coldfire/nptl/bits/atomic.h: New. + * sysdeps/unix/sysv/linux/m68k/Versions: Add symbols for NPTL support. + * sysdeps/unix/sysv/linux/m68k/init-first.c: New. + * sysdeps/unix/sysv/linux/m68k/nptl/sysdep-cancel.h: New. + * sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h: New. + * sysdeps/unix/sysv/linux/m68k/nptl/bits/semaphore.h: New. + * sysdeps/unix/sysv/linux/m68k/nptl/clone.S: New. + * sysdeps/unix/sysv/linux/m68k/nptl/fork.c: New. + * sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h: New. + * sysdeps/unix/sysv/linux/m68k/nptl/vfork.S: New. + * sysdeps/unix/sysv/linux/m68k/nptl/pt-vfork.S: New. + * sysdeps/unix/sysv/linux/m68k/nptl/createthread.c: New. + * sysdeps/unix/sysv/linux/m68k/nptl/pthread_once.c: New. + * sysdeps/unix/sysv/linux/m68k/socket.S: Update cancelation code. + * sysdeps/m68k/dl-tls.h: New. + * sysdeps/m68k/libc-tls.c: New. + * sysdeps/m68k/tls-macros.h: New. + * sysdeps/m68k/dl-machine.h (RTLD_START): Terminate stack frame to + generate better backtraces. + (elf_machine_type_class, elf_machine_rela): Handle TLS relocations. + * sysdeps/m68k/dl-machine.h: Handle TLS relocations. + * sysdeps/m68k/nptl/tcb-offsets.sym: New. + * sysdeps/m68k/nptl/pthread_spin_trylock.c: New. + * sysdeps/m68k/nptl/tls.h: New. + * sysdeps/m68k/nptl/pthread_spin_lock.c: New. + * sysdeps/m68k/nptl/pthreaddef.h: New. + * sysdeps/m68k/nptl/Makefile: New. + * sysdeps/unix/sysv/linux/m68k/bits/sigcontext.h: Remove. * sysdeps/unix/sysv/linux/m68k/register-dump.h: Update. diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index 08a439641e..9bc35e7694 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -1,5 +1,6 @@ /* Machine-dependent ELF dynamic relocation inline functions. m68k version. - Copyright (C) 1996-2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 1996-2001, 2002, 2003, 2004, 2005, 2010 + 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 @@ -24,6 +25,7 @@ #include #include +#include /* Return nonzero iff ELF header is compatible with the running host. */ static inline int @@ -121,6 +123,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) .globl _start\n\ .type _start,@function\n\ _start:\n\ + sub.l %fp, %fp\n\ move.l %sp, -(%sp)\n\ jbsr _dl_start\n\ addq.l #4, %sp\n\ @@ -159,12 +162,16 @@ _dl_start_user:\n\ .size _dl_start_user, . - _dl_start_user\n\ .previous"); -/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so - PLT entries should not be allowed to define the value. +/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry or + TLS variable, so undefined references should not be allowed to + define the value. ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one of the main executable's symbols, as for a COPY reloc. */ #define elf_machine_type_class(type) \ - ((((type) == R_68K_JMP_SLOT) * ELF_RTYPE_CLASS_PLT) \ + ((((type) == R_68K_JMP_SLOT \ + || (type) == R_68K_TLS_DTPMOD32 \ + || (type) == R_68K_TLS_DTPREL32 \ + || (type) == R_68K_TLS_TPREL32) * ELF_RTYPE_CLASS_PLT) \ | (((type) == R_68K_COPY) * ELF_RTYPE_CLASS_COPY)) /* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */ @@ -262,6 +269,25 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, case R_68K_PC32: *reloc_addr = value + reloc->r_addend - (Elf32_Addr) reloc_addr; break; +#if defined USE_TLS && !defined RTLD_BOOTSTRAP + case R_68K_TLS_DTPMOD32: + /* Get the information from the link map returned by the + resolv function. */ + if (sym_map != NULL) + *reloc_addr = sym_map->l_tls_modid; + break; + case R_68K_TLS_DTPREL32: + if (sym != NULL) + *reloc_addr = TLS_DTPREL_VALUE (sym, reloc); + break; + case R_68K_TLS_TPREL32: + if (sym != NULL) + { + CHECK_STATIC_TLS (map, sym_map); + *reloc_addr = TLS_TPREL_VALUE (sym_map, sym, reloc); + } + break; +#endif /* defined USE_TLS && !defined RTLD_BOOTSTRAP */ case R_68K_NONE: /* Alright, Wilbur. */ break; default: diff --git a/sysdeps/m68k/dl-tls.h b/sysdeps/m68k/dl-tls.h new file mode 100644 index 0000000000..f2ce9982f0 --- /dev/null +++ b/sysdeps/m68k/dl-tls.h @@ -0,0 +1,48 @@ +/* Thread-local storage handling in the ELF dynamic linker. M68K version. + Copyright (C) 2010 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Maxim Kuvyrkov , 2010. + + 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. */ + + +/* Type used for the representation of TLS information in the GOT. */ +typedef struct +{ + unsigned long int ti_module; + unsigned long int ti_offset; +} tls_index; + +/* The thread pointer points 0x7000 past the first static TLS block. */ +#define TLS_TP_OFFSET 0x7000 + +/* Dynamic thread vector pointers point 0x8000 past the start of each + TLS block. */ +#define TLS_DTV_OFFSET 0x8000 + +/* Compute the value for a TPREL reloc. */ +#define TLS_TPREL_VALUE(sym_map, sym, reloc) \ + ((sym_map)->l_tls_offset + (sym)->st_value + (reloc)->r_addend \ + - TLS_TP_OFFSET) + +/* Compute the value for a DTPREL reloc. */ +#define TLS_DTPREL_VALUE(sym, reloc) \ + ((sym)->st_value + (reloc)->r_addend - TLS_DTV_OFFSET) + +extern void *__tls_get_addr (tls_index *ti); + +#define GET_ADDR_OFFSET (ti->ti_offset + TLS_DTV_OFFSET) +#define __TLS_GET_ADDR(__ti) (__tls_get_addr (__ti) - TLS_DTV_OFFSET) diff --git a/sysdeps/m68k/libc-tls.c b/sysdeps/m68k/libc-tls.c new file mode 100644 index 0000000000..e865fac166 --- /dev/null +++ b/sysdeps/m68k/libc-tls.c @@ -0,0 +1,38 @@ +/* Thread-local storage handling in the ELF dynamic linker. m68k version. + Copyright (C) 2010 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Maxim Kuvyrkov , 2010. + + 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. */ + +#include +#include + +#if USE_TLS + +/* On M68K, linker optimizations are not required, so __tls_get_addr + can be called even in statically linked binaries. In this case module + must be always 1 and PT_TLS segment exist in the binary, otherwise it + would not link. */ + +void * +__tls_get_addr (tls_index *ti) +{ + dtv_t *dtv = THREAD_DTV (); + return (char *) dtv[1].pointer.val + GET_ADDR_OFFSET; +} + +#endif diff --git a/sysdeps/m68k/nptl/Makefile b/sysdeps/m68k/nptl/Makefile new file mode 100644 index 0000000000..f36fc8fa3f --- /dev/null +++ b/sysdeps/m68k/nptl/Makefile @@ -0,0 +1,22 @@ +# Copyright (C) 2010 Free Software Foundation, Inc. +# This file is part of the GNU C Library. +# Contributed by Maxim Kuvyrkov , 2010. +# +# 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. + +ifeq ($(subdir),csu) +gen-as-const-headers += tcb-offsets.sym +endif diff --git a/sysdeps/m68k/nptl/pthread_spin_lock.c b/sysdeps/m68k/nptl/pthread_spin_lock.c new file mode 100644 index 0000000000..1cc16c8b93 --- /dev/null +++ b/sysdeps/m68k/nptl/pthread_spin_lock.c @@ -0,0 +1,31 @@ +/* Copyright (C) 2010 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Maxim Kuvyrkov , 2010. + + 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. */ + +#include +#include "pthreadP.h" + +int +pthread_spin_lock (pthread_spinlock_t *lock) +{ + while (atomic_compare_and_exchange_val_acq(lock, 1, 0) != 0) + while (*lock != 0) + ; + + return 0; +} diff --git a/sysdeps/m68k/nptl/pthread_spin_trylock.c b/sysdeps/m68k/nptl/pthread_spin_trylock.c new file mode 100644 index 0000000000..831bffb603 --- /dev/null +++ b/sysdeps/m68k/nptl/pthread_spin_trylock.c @@ -0,0 +1,28 @@ +/* Copyright (C) 2010 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Maxim Kuvyrkov , 2010. + + 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. */ + +#include +#include +#include "pthreadP.h" + +int +pthread_spin_trylock (pthread_spinlock_t *lock) +{ + return atomic_compare_and_exchange_val_acq(lock, 1, 0) ? EBUSY : 0; +} diff --git a/sysdeps/m68k/nptl/pthreaddef.h b/sysdeps/m68k/nptl/pthreaddef.h new file mode 100644 index 0000000000..0a549070f2 --- /dev/null +++ b/sysdeps/m68k/nptl/pthreaddef.h @@ -0,0 +1,39 @@ +/* Copyright (C) 2010 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Maxim Kuvyrkov , 2010. + + 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. */ + +/* Default stack size. */ +#define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024) + +/* Required stack pointer alignment at beginning. */ +#define STACK_ALIGN 16 + +/* Minimal stack size after allocating thread descriptor and guard size. */ +#define MINIMAL_REST_STACK 2048 + +/* Alignment requirement for TCB. */ +#define TCB_ALIGNMENT 16 + + +/* Location of current stack frame. */ +#define CURRENT_STACK_FRAME __builtin_frame_address (0) + + +/* XXX Until we have a better place keep the definitions here. */ +#define __exit_thread_inline(val) \ + INLINE_SYSCALL (exit, 1, (val)) diff --git a/sysdeps/m68k/nptl/tcb-offsets.sym b/sysdeps/m68k/nptl/tcb-offsets.sym new file mode 100644 index 0000000000..b1bba65868 --- /dev/null +++ b/sysdeps/m68k/nptl/tcb-offsets.sym @@ -0,0 +1,11 @@ +#include +#include + +-- + +-- Derive offsets relative to the thread register. +#define thread_offsetof(mem) (long)(offsetof(struct pthread, mem) - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE) + +MULTIPLE_THREADS_OFFSET thread_offsetof (header.multiple_threads) +PID_OFFSET thread_offsetof (pid) +TID_OFFSET thread_offsetof (tid) diff --git a/sysdeps/m68k/nptl/tls.h b/sysdeps/m68k/nptl/tls.h new file mode 100644 index 0000000000..c29824cfbf --- /dev/null +++ b/sysdeps/m68k/nptl/tls.h @@ -0,0 +1,171 @@ +/* Definition for thread-local data handling. NPTL/m68k version. + Copyright (C) 2010 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Maxim Kuvyrkov , 2010. + + 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 _TLS_H +#define _TLS_H 1 + +#include + +#ifndef __ASSEMBLER__ +# include +# include +# include + +/* Type for the dtv. */ +typedef union dtv +{ + size_t counter; + struct + { + void *val; + bool is_static; + } pointer; +} dtv_t; + +#else /* __ASSEMBLER__ */ +# include +#endif /* __ASSEMBLER__ */ + +/* Signal that TLS support is available. */ +#define USE_TLS 1 + +#ifndef __ASSEMBLER__ + +/* Get system call information. */ +# include + +/* The TP points to the start of the thread blocks. */ +# define TLS_DTV_AT_TP 1 + +/* Get the thread descriptor definition. */ +# include + +typedef struct +{ + dtv_t *dtv; + void *private; +} tcbhead_t; + +/* This is the size of the initial TCB. Because our TCB is before the thread + pointer, we don't need this. */ +# define TLS_INIT_TCB_SIZE 0 + +/* Alignment requirements for the initial TCB. */ +# define TLS_INIT_TCB_ALIGN __alignof__ (struct pthread) + +/* This is the size of the TCB. Because our TCB is before the thread + pointer, we don't need this. */ +# define TLS_TCB_SIZE 0 + +/* Alignment requirements for the TCB. */ +# define TLS_TCB_ALIGN __alignof__ (struct pthread) + +/* This is the size we need before TCB - actually, it includes the TCB. */ +# define TLS_PRE_TCB_SIZE \ + (sizeof (struct pthread) \ + + ((sizeof (tcbhead_t) + TLS_TCB_ALIGN - 1) & ~(TLS_TCB_ALIGN - 1))) + +/* The thread pointer (TP) points to the end of the + TCB + 0x7000, as for PowerPC and MIPS. This implies that TCB address is + TP - 0x7000. As we define TLS_DTV_AT_TP we can + assume that the pthread struct is allocated immediately ahead of the + TCB. This implies that the pthread_descr address is + TP - (TLS_PRE_TCB_SIZE + 0x7000). */ +# define TLS_TCB_OFFSET 0x7000 + +/* Install the dtv pointer. The pointer passed is to the element with + index -1 which contain the length. */ +# define INSTALL_DTV(tcbp, dtvp) \ + ((tcbhead_t *) (tcbp))[-1].dtv = dtvp + 1 + +/* Install new dtv for current thread. */ +# define INSTALL_NEW_DTV(dtv) \ + (THREAD_DTV () = (dtv)) + +/* Return dtv of given thread descriptor. */ +# define GET_DTV(tcbp) \ + (((tcbhead_t *) (tcbp))[-1].dtv) + +/* Code to initially initialize the thread pointer. This might need + special attention since 'errno' is not yet available and if the + operation can cause a failure 'errno' must not be touched. */ +# define TLS_INIT_TP(tcbp, secondcall) \ + ({ \ + INTERNAL_SYSCALL_DECL (err); \ + int _sys_result; \ + \ + _sys_result = INTERNAL_SYSCALL (set_thread_area, err, 1, \ + ((void *) (tcbp)) + TLS_TCB_OFFSET); \ + INTERNAL_SYSCALL_ERROR_P (_sys_result, err) ? "unknown error" : NULL; }) + +extern void * __m68k_read_tp (void); + +/* Return the address of the dtv for the current thread. */ +# define THREAD_DTV() \ + (((tcbhead_t *) (__m68k_read_tp () - TLS_TCB_OFFSET))[-1].dtv) + +/* Return the thread descriptor for the current thread. */ +# define THREAD_SELF \ + ((struct pthread *) (__m68k_read_tp () - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE)) + +/* Magic for libthread_db to know how to do THREAD_SELF. */ +# define DB_THREAD_SELF \ + CONST_THREAD_AREA (32, TLS_TCB_OFFSET + TLS_PRE_TCB_SIZE) + +/* Access to data in the thread descriptor is easy. */ +# define THREAD_GETMEM(descr, member) \ + descr->member +# define THREAD_GETMEM_NC(descr, member, idx) \ + descr->member[idx] +# define THREAD_SETMEM(descr, member, value) \ + descr->member = (value) +# define THREAD_SETMEM_NC(descr, member, idx, value) \ + descr->member[idx] = (value) + +/* l_tls_offset == 0 is perfectly valid on M68K, so we have to use some + different value to mean unset l_tls_offset. */ +# define NO_TLS_OFFSET -1 + +/* Get and set the global scope generation counter in struct pthread. */ +#define THREAD_GSCOPE_FLAG_UNUSED 0 +#define THREAD_GSCOPE_FLAG_USED 1 +#define THREAD_GSCOPE_FLAG_WAIT 2 +#define THREAD_GSCOPE_RESET_FLAG() \ + do \ + { int __res \ + = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \ + THREAD_GSCOPE_FLAG_UNUSED); \ + if (__res == THREAD_GSCOPE_FLAG_WAIT) \ + lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1, LLL_PRIVATE); \ + } \ + while (0) +#define THREAD_GSCOPE_SET_FLAG() \ + do \ + { \ + THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \ + atomic_write_barrier (); \ + } \ + while (0) +#define THREAD_GSCOPE_WAIT() \ + GL(dl_wait_lookup_done) () + +#endif /* __ASSEMBLER__ */ + +#endif /* tls.h */ diff --git a/sysdeps/m68k/tls-macros.h b/sysdeps/m68k/tls-macros.h new file mode 100644 index 0000000000..d03d7b958d --- /dev/null +++ b/sysdeps/m68k/tls-macros.h @@ -0,0 +1,70 @@ +/* Macros for accessing thread-local storage. m68k version. + Copyright (C) 2010 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Maxim Kuvyrkov , 2010. + + 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. */ + +#define TLS_GD(x) \ + ({ \ + void *__result; \ + extern void *__tls_get_addr (void *); \ + \ + asm ("movel #_GLOBAL_OFFSET_TABLE_@GOTPC, %0\n\t" \ + "lea (-6, %%pc, %0), %0\n\t" \ + "lea " #x "@TLSGD(%0), %0" \ + : "=&a" (__result)); \ + (int *) __tls_get_addr (__result); }) + +#define TLS_LD(x) \ + ({ \ + char *__tp; \ + int __offset; \ + extern void *__tls_get_addr (void *); \ + \ + asm ("movel #_GLOBAL_OFFSET_TABLE_@GOTPC, %0\n\t" \ + "lea (-6, %%pc, %0), %0\n\t" \ + "lea " #x "@TLSLDM(%0), %0" \ + : "=&a" (__tp)); \ + __tp = (char *) __tls_get_addr (__tp); \ + asm ("movel #" #x "@TLSLDO, %0" \ + : "=a" (__offset)); \ + (int *) (__tp + __offset); }) + +#define TLS_IE(x) \ + ({ \ + char *__tp; \ + int __offset; \ + extern void * __m68k_read_tp (void); \ + \ + __tp = (char *) __m68k_read_tp (); \ + asm ("movel #_GLOBAL_OFFSET_TABLE_@GOTPC, %0\n\t" \ + "lea (-6, %%pc, %0), %0\n\t" \ + "movel " #x "@TLSIE(%0), %0" \ + : "=&a" (__offset)); \ + (int *) (__tp + __offset); }) + +#define TLS_LE(x) \ + ({ \ + char *__tp; \ + int __offset; \ + extern void * __m68k_read_tp (void); \ + \ + __tp = (char *) __m68k_read_tp (); \ + asm ("movel #" #x "@TLSLE, %0" \ + : "=a" (__offset)); \ + (int *) (__tp + __offset); }) + diff --git a/sysdeps/unix/sysv/linux/m68k/Makefile b/sysdeps/unix/sysv/linux/m68k/Makefile index 6bb4f6b816..97d95847ff 100644 --- a/sysdeps/unix/sysv/linux/m68k/Makefile +++ b/sysdeps/unix/sysv/linux/m68k/Makefile @@ -2,12 +2,18 @@ m68k-syntax-flag = -DMOTOROLA_SYNTAX +ifeq ($(subdir),csu) +sysdep_routines += m68k-helpers +endif + ifeq ($(subdir),misc) sysdep_routines += mremap sysdep_headers += sys/reg.h endif ifeq ($(subdir),elf) +sysdep_routines += dl-vdso libc-m68k-vdso +sysdep-rtld-routines += m68k-vdso sysdep-others += lddlibc4 install-bin += lddlibc4 endif diff --git a/sysdeps/unix/sysv/linux/m68k/Versions b/sysdeps/unix/sysv/linux/m68k/Versions index 5650f7f77d..8a941f8371 100644 --- a/sysdeps/unix/sysv/linux/m68k/Versions +++ b/sysdeps/unix/sysv/linux/m68k/Versions @@ -32,4 +32,18 @@ libc { GLIBC_2.11 { fallocate64; } + GLIBC_2.12 { + __m68k_read_tp; + } + GLIBC_PRIVATE { + __vdso_atomic_cmpxchg_32; __vdso_atomic_barrier; + } +} + +ld { + GLIBC_PRIVATE { + __rtld___vdso_read_tp; + __rtld___vdso_atomic_cmpxchg_32; + __rtld___vdso_atomic_barrier; + } } diff --git a/sysdeps/unix/sysv/linux/m68k/bits/m68k-vdso.h b/sysdeps/unix/sysv/linux/m68k/bits/m68k-vdso.h new file mode 100644 index 0000000000..c361060172 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/bits/m68k-vdso.h @@ -0,0 +1,61 @@ +/* Resolve function pointers to VDSO functions. + Copyright (C) 2010 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Maxim Kuvyrkov , 2010. + + 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 _M68K_VDSO_H +#define _M68K_VDSO_H + +#ifdef SHARED + +# ifdef IS_IN_rtld +# define M68K_VDSO_SYMBOL(name) __rtld_##name +# define STR_M68K_VDSO_SYMBOL(name) "__rtld_" #name +# else +# define M68K_VDSO_SYMBOL(name) name +# define STR_M68K_VDSO_SYMBOL(name) #name +# endif + +# ifndef __ASSEMBLER__ + +/* We define __rtld_* copies for rtld. + We need them visible in libc to initialize. */ +# if defined IS_IN_rtld || !defined NOT_IN_libc +extern void *__rtld___vdso_read_tp; +extern void *__rtld___vdso_atomic_cmpxchg_32; +extern void *__rtld___vdso_atomic_barrier; + +/* These stubs are meant to be invoked only from the assembly. */ +extern void __vdso_read_tp_stub (void); +extern void __vdso_atomic_cmpxchg_32_stub (void); +extern void __vdso_atomic_barrier_stub (void); +# endif /* IS_IN_rtld || !NOT_IN_libc */ + +/* RTLD should only use its own copies. */ +# ifndef IS_IN_rtld +extern void *__vdso_read_tp; +extern void *__vdso_atomic_cmpxchg_32; +extern void *__vdso_atomic_barrier; +# endif /* !IS_IN_rtld */ + +# endif /* !__ASSEMBLER__ */ + +#endif /* SHARED */ + +#endif /* _M68K_VDSO_H */ diff --git a/sysdeps/unix/sysv/linux/m68k/clone.S b/sysdeps/unix/sysv/linux/m68k/clone.S index a179f8e0fa..401e2ef3ac 100644 --- a/sysdeps/unix/sysv/linux/m68k/clone.S +++ b/sysdeps/unix/sysv/linux/m68k/clone.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996,97,98,2002 Free Software Foundation, Inc. +/* Copyright (C) 1996,97,98,2002,2010 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab (schwab@issan.informatik.uni-dortmund.de) @@ -17,14 +17,21 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -/* clone is even more special than fork as it mucks with stacks +/* clone() is even more special than fork() as it mucks with stacks and invokes a function in the right context after its all over. */ #include #define _ERRNO_H 1 #include +#ifdef RESET_PID +#include +#endif + +#define CLONE_VM 0x00000100 +#define CLONE_THREAD 0x00010000 -/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg); */ +/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg, + void *parent_tidptr, void *tls, void *child_tidptr) */ .text ENTRY (__clone) @@ -42,7 +49,17 @@ ENTRY (__clone) movel 16(%sp), -(%a1) /* Do the system call */ - movel 12(%sp), %d1 /* get flags */ + movel 12+0(%sp), %d1 /* get flags */ + movel %d3, -(%a1) /* save %d3 and get parent_tidptr */ + movel %d3, -(%sp) + movel 20+4(%sp), %d3 + movel %d4, -(%a1) /* save %d4 and get child_tidptr */ + movel %d4, -(%sp) + movel 28+8(%sp), %d4 + movel %d5, -(%a1) /* save %d5 and get tls */ + movel %d5, -(%sp) + movel 24+12(%sp), %d5 + /* save %d2 and get stack pointer */ #ifdef __mcoldfire__ movel %d2, -(%a1) movel %d2, -(%sp) @@ -57,6 +74,9 @@ ENTRY (__clone) #else exg %d2, %a1 /* restore %d2 */ #endif + movel (%sp)+, %d5 /* restore %d5, %d4 and %d3 */ + movel (%sp)+, %d4 + movel (%sp)+, %d3 tstl %d0 jmi SYSCALL_ERROR_LABEL @@ -65,11 +85,35 @@ ENTRY (__clone) rts thread_start: + cfi_startproc + cfi_undefined (pc) /* Mark end of stack */ subl %fp, %fp /* terminate the stack frame */ +#ifdef RESET_PID + /* Check and see if we need to reset the PID. */ + movel %d1, %a1 + andl #CLONE_THREAD, %d1 + jne donepid + movel %a1, %d1 + movel #-1, %d0 + andl #CLONE_VM, %d1 + jne gotpid + movel #SYS_ify (getpid), %d0 + trap #0 +gotpid: + movel %a0, -(%sp) + movel %d0, -(%sp) + bsrl __m68k_read_tp@PLTPC + movel (%sp)+, %d0 + movel %d0, PID_OFFSET(%a0) + movel %d0, TID_OFFSET(%a0) + movel (%sp)+, %a0 +donepid: +#endif jsr (%a0) movel %d0, %d1 movel #SYS_ify (exit), %d0 trap #0 + cfi_endproc PSEUDO_END (__clone) diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/bits/atomic.h b/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/bits/atomic.h new file mode 100644 index 0000000000..1198bb9c45 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/bits/atomic.h @@ -0,0 +1,105 @@ +/* Copyright (C) 2010 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Maxim Kuvyrkov , 2010. + + 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_ATOMIC_H +#define _BITS_ATOMIC_H 1 + +#include +#include +#include + +/* Coldfire has no atomic compare-and-exchange operation, but the + kernel provides userspace atomicity operations. Use them. */ + +typedef int32_t atomic32_t; +typedef uint32_t uatomic32_t; +typedef int_fast32_t atomic_fast32_t; +typedef uint_fast32_t uatomic_fast32_t; + +typedef intptr_t atomicptr_t; +typedef uintptr_t uatomicptr_t; +typedef intmax_t atomic_max_t; +typedef uintmax_t uatomic_max_t; + +/* The only basic operation needed is compare and exchange. */ +/* For ColdFire we'll have to trap into the kernel mode anyway, + so trap from the library rather then from the kernel wrapper. */ +#ifdef SHARED +# define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \ + ({ \ + /* Use temporary variables to workaround call-clobberness of */ \ + /* the registers. */ \ + __typeof (mem) _mem = mem; \ + __typeof (oldval) _oldval = oldval; \ + __typeof (newval) _newval = newval; \ + register __typeof (mem) _a0 asm ("a0") = _mem; \ + register __typeof (oldval) _d0 asm ("d0") = _oldval; \ + register __typeof (newval) _d1 asm ("d1") = _newval; \ + void *tmp; \ + \ + asm ("movel #_GLOBAL_OFFSET_TABLE_@GOTPC, %2\n\t" \ + "lea (-6, %%pc, %2), %2\n\t" \ + "movel " STR_M68K_VDSO_SYMBOL (__vdso_atomic_cmpxchg_32) \ + "@GOT(%2), %2\n\t" \ + "movel (%2), %2\n\t" \ + "jsr (%2)\n\t" \ + : "+d" (_d0), "+m" (*_a0), "=&a" (tmp) \ + : "a" (_a0), "d" (_d1)); \ + _d0; \ + }) +#else +# define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \ + ({ \ + /* Use temporary variables to workaround call-clobberness of */ \ + /* the registers. */ \ + __typeof (mem) _mem = mem; \ + __typeof (oldval) _oldval = oldval; \ + __typeof (newval) _newval = newval; \ + register __typeof (oldval) _d0 asm ("d0") \ + = SYS_ify (atomic_cmpxchg_32); \ + register __typeof (mem) _a0 asm ("a0") = _mem; \ + register __typeof (oldval) _d2 asm ("d2") = _oldval; \ + register __typeof (newval) _d1 asm ("d1") = _newval; \ + \ + asm ("trap #0" \ + : "+d" (_d0), "+m" (*_a0) \ + : "a" (_a0), "d" (_d2), "d" (_d1)); \ + _d0; \ + }) +#endif + +#ifdef SHARED +# define atomic_full_barrier() \ + ({ \ + void *tmp; \ + \ + asm ("movel #_GLOBAL_OFFSET_TABLE_@GOTPC, %0\n\t" \ + "lea (-6, %pc, %0), %0\n\t" \ + "movel " STR_M68K_VDSO_SYMBOL (__vdso_atomic_barrier) \ + "@GOT(%0), %0\n\t" \ + "movel (%0), %0\n\t" \ + "jsr (%0)\n\t" \ + : "=&a" (tmp)); \ + }) +#else +# define atomic_full_barrier() \ + (INTERNAL_SYSCALL (atomic_barrier, , 0), (void) 0) +#endif + +#endif diff --git a/sysdeps/unix/sysv/linux/m68k/init-first.c b/sysdeps/unix/sysv/linux/m68k/init-first.c new file mode 100644 index 0000000000..f8168d1292 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/init-first.c @@ -0,0 +1,74 @@ +/* Copyright (C) 2010 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Maxim Kuvyrkov , 2010. + + 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. */ + +/* Note: linking in vDSO to a static binary requires changes to + the main GLIBC proper. Not yet implemented. */ +#ifdef SHARED + +#include +#include + +static inline void +_libc_vdso_platform_setup (void) +{ + void *p; + + PREPARE_VERSION (linux26, "LINUX_2.6", 61765110); + + /* It may happen that rtld didn't initialize the vDSO, so fallback + to the syscall implementations if _dl_vdso_vsym returns NULL. + This may happen when a static executable dlopen's a dynamic library. + This really is nothing more than a workaround for rtld/csu + deficiency. Ideally, init code would setup the vDSO for static + binaries too. */ + + p = _dl_vdso_vsym ("__kernel_read_tp", &linux26); + if (p != NULL) + { + __vdso_read_tp = p; + __rtld___vdso_read_tp = p; + } + else + assert (__vdso_read_tp == (void *) __vdso_read_tp_stub); + + p = _dl_vdso_vsym ("__kernel_atomic_cmpxchg_32", &linux26); + if (p != NULL) + { + __vdso_atomic_cmpxchg_32 = p; + __rtld___vdso_atomic_cmpxchg_32 = p; + } + else + assert (__vdso_atomic_cmpxchg_32 + == (void *) __vdso_atomic_cmpxchg_32_stub); + + p = _dl_vdso_vsym ("__kernel_atomic_barrier", &linux26); + if (p != NULL) + { + __vdso_atomic_barrier = p; + __rtld___vdso_atomic_barrier = p; + } + else + assert (__vdso_atomic_barrier == (void *) __vdso_atomic_barrier_stub); +} + +#define VDSO_SETUP _libc_vdso_platform_setup + +#endif /* SHARED */ + +#include diff --git a/sysdeps/unix/sysv/linux/m68k/libc-m68k-vdso.c b/sysdeps/unix/sysv/linux/m68k/libc-m68k-vdso.c new file mode 100644 index 0000000000..45982e99b9 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/libc-m68k-vdso.c @@ -0,0 +1 @@ +#include "m68k-vdso.c" diff --git a/sysdeps/unix/sysv/linux/m68k/m68k-helpers.S b/sysdeps/unix/sysv/linux/m68k/m68k-helpers.S new file mode 100644 index 0000000000..00db4bb523 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/m68k-helpers.S @@ -0,0 +1,105 @@ +/* Copyright (C) 2010 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Maxim Kuvyrkov , 2010. + + 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. + + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + + 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. */ + +#include +#include + + .text + + .hidden __vdso_read_tp_stub +ENTRY (__vdso_read_tp_stub) + cfi_startproc + move.l #__NR_get_thread_area, %d0 + trap #0 + move.l %d0, %a0 + rts + cfi_endproc +END (__vdso_read_tp_stub) + +# ifdef SHARED +/* GCC will emit calls to this routine. Linux has an + equivalent helper function (which clobbers fewer registers than + a normal function call) in a vdso; tail call to the + helper. */ +# ifdef IS_IN_rtld +/* rtld gets a hidden copy of __m68k_read_tp. */ + .hidden __m68k_read_tp +# endif +ENTRY (__m68k_read_tp) + cfi_startproc + move.l #_GLOBAL_OFFSET_TABLE_@GOTPC, %a0 + lea (-6, %pc, %a0), %a0 + move.l M68K_VDSO_SYMBOL (__vdso_read_tp)@GOT(%a0), %a0 + move.l (%a0), %a0 + jmp (%a0) + cfi_endproc +END (__m68k_read_tp) + +/* The following two stubs are for macros in atomic.h, they can't + clobber anything. */ + + .hidden __vdso_atomic_cmpxchg_32_stub +ENTRY (__vdso_atomic_cmpxchg_32_stub) + cfi_startproc + move.l %d2, -(%sp) + cfi_adjust_cfa_offset (4) + cfi_rel_offset (%d2, 0) + move.l %d0, %d2 + move.l #SYS_ify (atomic_cmpxchg_32), %d0 + trap #0 + move.l (%sp)+, %d2 + cfi_adjust_cfa_offset (-4) + cfi_restore (%d2) + rts + cfi_endproc +END (__vdso_atomic_cmpxchg_32_stub) + + .hidden __vdso_atomic_barrier_stub +ENTRY (__vdso_atomic_barrier_stub) + cfi_startproc + move.l %d0, -(%sp) + cfi_adjust_cfa_offset (4) + move.l #SYS_ify (atomic_barrier), %d0 + trap #0 + move.l (%sp)+, %d0 + cfi_adjust_cfa_offset (-4) + rts + cfi_endproc +END (__vdso_atomic_barrier_stub) +# else /* !SHARED */ +/* If the vDSO is not available, use a syscall to get TP. */ + strong_alias (__vdso_read_tp_stub, __m68k_read_tp) +# endif /* SHARED */ diff --git a/sysdeps/unix/sysv/linux/m68k/m68k-vdso.c b/sysdeps/unix/sysv/linux/m68k/m68k-vdso.c new file mode 100644 index 0000000000..73b25709b3 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/m68k-vdso.c @@ -0,0 +1,35 @@ +/* Copyright (C) 2010 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Maxim Kuvyrkov , 2010. + + 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. */ + +#ifdef SHARED + +#include + +/* Because these pointers are used from other libraries than libc, + they are exported at GLIBC_PRIVATE version. + We initialize them to syscall implementation so that they will be ready + to use from the very beginning. */ +void * M68K_VDSO_SYMBOL (__vdso_read_tp) += (void *) __vdso_read_tp_stub; +void * M68K_VDSO_SYMBOL (__vdso_atomic_cmpxchg_32) += (void *) __vdso_atomic_cmpxchg_32_stub; +void * M68K_VDSO_SYMBOL (__vdso_atomic_barrier) += (void *) __vdso_atomic_barrier_stub; + +#endif /* SHARED */ diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h new file mode 100644 index 0000000000..01408101c6 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h @@ -0,0 +1,172 @@ +/* Copyright (C) 2010 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Maxim Kuvyrkov , 2010. + + 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_PTHREADTYPES_H +#define _BITS_PTHREADTYPES_H 1 + +#include + +#define __SIZEOF_PTHREAD_ATTR_T 36 +#define __SIZEOF_PTHREAD_MUTEX_T 24 +#define __SIZEOF_PTHREAD_MUTEXATTR_T 4 +#define __SIZEOF_PTHREAD_COND_T 48 +#define __SIZEOF_PTHREAD_CONDATTR_T 4 +#define __SIZEOF_PTHREAD_RWLOCK_T 32 +#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 +#define __SIZEOF_PTHREAD_BARRIER_T 20 +#define __SIZEOF_PTHREAD_BARRIERATTR_T 4 + + +/* Thread identifiers. The structure of the attribute type is + deliberately not exposed. */ +typedef unsigned long int pthread_t; + + +typedef union +{ + char __size[__SIZEOF_PTHREAD_ATTR_T]; + long int __align; +} pthread_attr_t; + + +typedef struct __pthread_internal_slist +{ + struct __pthread_internal_slist *__next; +} __pthread_slist_t; + + +/* Data structures for mutex handling. The structure of the attribute + type is deliberately not exposed. */ +typedef union +{ + struct __pthread_mutex_s + { + int __lock; + unsigned int __count; + int __owner; + /* KIND must stay at this position in the structure to maintain + binary compatibility. */ + int __kind; + unsigned int __nusers; + __extension__ union + { + int __spins; + __pthread_slist_t __list; + }; + } __data; + char __size[__SIZEOF_PTHREAD_MUTEX_T]; + long int __align; +} pthread_mutex_t; + +typedef union +{ + char __size[__SIZEOF_PTHREAD_MUTEXATTR_T]; + int __align; +} pthread_mutexattr_t; + + +/* Data structure for conditional variable handling. The structure of + the attribute type is deliberately not exposed. */ +typedef union +{ + struct + { + int __lock; + unsigned int __futex; + __extension__ unsigned long long int __total_seq; + __extension__ unsigned long long int __wakeup_seq; + __extension__ unsigned long long int __woken_seq; + void *__mutex; + unsigned int __nwaiters; + unsigned int __broadcast_seq; + } __data; + char __size[__SIZEOF_PTHREAD_COND_T]; + __extension__ long long int __align; +} pthread_cond_t; + +typedef union +{ + char __size[__SIZEOF_PTHREAD_CONDATTR_T]; + int __align; +} pthread_condattr_t; + + +/* Keys for thread-specific data */ +typedef unsigned int pthread_key_t; + + +/* Once-only execution */ +typedef int pthread_once_t; + + +#if defined __USE_UNIX98 || defined __USE_XOPEN2K +/* Data structure for read-write lock variable handling. The + structure of the attribute type is deliberately not exposed. */ +typedef union +{ + struct + { + int __lock; + unsigned int __nr_readers; + unsigned int __readers_wakeup; + unsigned int __writer_wakeup; + unsigned int __nr_readers_queued; + unsigned int __nr_writers_queued; + unsigned char __pad1; + unsigned char __pad2; + unsigned char __shared; + /* FLAGS must stay at this position in the structure to maintain + binary compatibility. */ + unsigned char __flags; + int __writer; + } __data; + char __size[__SIZEOF_PTHREAD_RWLOCK_T]; + long int __align; +} pthread_rwlock_t; + +typedef union +{ + char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T]; + long int __align; +} pthread_rwlockattr_t; +#endif + + +#ifdef __USE_XOPEN2K +/* POSIX spinlock data type. */ +typedef volatile int pthread_spinlock_t; + + +/* POSIX barriers data type. The structure of the type is + deliberately not exposed. */ +typedef union +{ + char __size[__SIZEOF_PTHREAD_BARRIER_T]; + long int __align; +} pthread_barrier_t; + +typedef union +{ + char __size[__SIZEOF_PTHREAD_BARRIERATTR_T]; + int __align; +} pthread_barrierattr_t; +#endif + + +#endif /* bits/pthreadtypes.h */ diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/bits/semaphore.h b/sysdeps/unix/sysv/linux/m68k/nptl/bits/semaphore.h new file mode 100644 index 0000000000..2950cc9a70 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/nptl/bits/semaphore.h @@ -0,0 +1,36 @@ +/* Copyright (C) 2010 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Maxim Kuvyrkov , 2010. + + 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 _SEMAPHORE_H +# error "Never use directly; include instead." +#endif + + +#define __SIZEOF_SEM_T 16 + + +/* Value returned if `sem_open' failed. */ +#define SEM_FAILED ((sem_t *) 0) + + +typedef union +{ + char __size[__SIZEOF_SEM_T]; + long int __align; +} sem_t; diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/clone.S b/sysdeps/unix/sysv/linux/m68k/nptl/clone.S new file mode 100644 index 0000000000..e7388fee71 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/nptl/clone.S @@ -0,0 +1,2 @@ +#define RESET_PID +#include "../clone.S" diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/createthread.c b/sysdeps/unix/sysv/linux/m68k/nptl/createthread.c new file mode 100644 index 0000000000..be1144435c --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/nptl/createthread.c @@ -0,0 +1,25 @@ +/* Copyright (C) 2010 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Maxim Kuvyrkov , 2010. + + 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. */ + +/* Value passed to 'clone' for initialization of the thread register. */ +#define TLS_VALUE ((void *) (pd) \ + + TLS_TCB_OFFSET + TLS_PRE_TCB_SIZE) + +/* Get the real implementation. */ +#include diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/fork.c b/sysdeps/unix/sysv/linux/m68k/nptl/fork.c new file mode 100644 index 0000000000..dc1584e2dd --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/nptl/fork.c @@ -0,0 +1,30 @@ +/* Copyright (C) 2010 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Maxim Kuvyrkov , 2010. + + 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. */ + +#include +#include +#include +#include + +#define ARCH_FORK() \ + INLINE_SYSCALL (clone, 5, \ + CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID | SIGCHLD, 0, \ + NULL, &THREAD_SELF->tid, NULL) + +#include diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h new file mode 100644 index 0000000000..926077dd0c --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h @@ -0,0 +1,281 @@ +/* Copyright (C) 2010 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Maxim Kuvyrkov , 2010. + + 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. */ + +/* Borrowed from ARM's version. */ + +#ifndef _LOWLEVELLOCK_H +#define _LOWLEVELLOCK_H 1 + +#include +#include +#include +#include +#include +#include + +#define FUTEX_WAIT 0 +#define FUTEX_WAKE 1 +#define FUTEX_REQUEUE 3 +#define FUTEX_CMP_REQUEUE 4 +#define FUTEX_WAKE_OP 5 +#define FUTEX_OP_CLEAR_WAKE_IF_GT_ONE ((4 << 24) | 1) +#define FUTEX_LOCK_PI 6 +#define FUTEX_UNLOCK_PI 7 +#define FUTEX_TRYLOCK_PI 8 +#define FUTEX_WAIT_BITSET 9 +#define FUTEX_WAKE_BITSET 10 +#define FUTEX_PRIVATE_FLAG 128 +#define FUTEX_CLOCK_REALTIME 256 + +#define FUTEX_BITSET_MATCH_ANY 0xffffffff + +/* Values for 'private' parameter of locking macros. Yes, the + definition seems to be backwards. But it is not. The bit will be + reversed before passing to the system call. */ +#define LLL_PRIVATE 0 +#define LLL_SHARED FUTEX_PRIVATE_FLAG + + +#if !defined NOT_IN_libc || defined IS_IN_rtld +/* In libc.so or ld.so all futexes are private. */ +# ifdef __ASSUME_PRIVATE_FUTEX +# define __lll_private_flag(fl, private) \ + ((fl) | FUTEX_PRIVATE_FLAG) +# else +# define __lll_private_flag(fl, private) \ + ((fl) | THREAD_GETMEM (THREAD_SELF, header.private_futex)) +# endif +#else +# ifdef __ASSUME_PRIVATE_FUTEX +# define __lll_private_flag(fl, private) \ + (((fl) | FUTEX_PRIVATE_FLAG) ^ (private)) +# else +# define __lll_private_flag(fl, private) \ + (__builtin_constant_p (private) \ + ? ((private) == 0 \ + ? ((fl) | THREAD_GETMEM (THREAD_SELF, header.private_futex)) \ + : (fl)) \ + : ((fl) | (((private) ^ FUTEX_PRIVATE_FLAG) \ + & THREAD_GETMEM (THREAD_SELF, header.private_futex)))) +# endif +#endif + + +#define lll_futex_wait(futexp, val, private) \ + lll_futex_timed_wait(futexp, val, NULL, private) + +#define lll_futex_timed_wait(futexp, val, timespec, private) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + __ret = INTERNAL_SYSCALL (futex, __err, 4, (futexp), \ + __lll_private_flag (FUTEX_WAIT, private), \ + (val), (timespec)); \ + __ret; \ + }) + +#define lll_futex_wake(futexp, nr, private) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + __ret = INTERNAL_SYSCALL (futex, __err, 4, (futexp), \ + __lll_private_flag (FUTEX_WAKE, private), \ + (nr), 0); \ + __ret; \ + }) + +#define lll_robust_dead(futexv, private) \ + do \ + { \ + int *__futexp = &(futexv); \ + atomic_or (__futexp, FUTEX_OWNER_DIED); \ + lll_futex_wake (__futexp, 1, private); \ + } \ + while (0) + +/* Returns non-zero if error happened, zero if success. */ +#define lll_futex_requeue(futexp, nr_wake, nr_move, mutex, val, private) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + __ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp), \ + __lll_private_flag (FUTEX_CMP_REQUEUE, private),\ + (nr_wake), (nr_move), (mutex), (val)); \ + INTERNAL_SYSCALL_ERROR_P (__ret, __err); \ + }) + +/* Returns non-zero if error happened, zero if success. */ +#define lll_futex_wake_unlock(futexp, nr_wake, nr_wake2, futexp2, private) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + __ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp), \ + __lll_private_flag (FUTEX_WAKE_OP, private), \ + (nr_wake), (nr_wake2), (futexp2), \ + FUTEX_OP_CLEAR_WAKE_IF_GT_ONE); \ + INTERNAL_SYSCALL_ERROR_P (__ret, __err); \ + }) + +#define lll_trylock(lock) \ + atomic_compare_and_exchange_val_acq (&(lock), 1, 0) + +#define lll_cond_trylock(lock) \ + atomic_compare_and_exchange_val_acq (&(lock), 2, 0) + +#define lll_robust_trylock(lock, id) \ + atomic_compare_and_exchange_val_acq (&(lock), id, 0) + +extern void __lll_lock_wait_private (int *futex) attribute_hidden; +extern void __lll_lock_wait (int *futex, int private) attribute_hidden; +extern int __lll_robust_lock_wait (int *futex, int private) attribute_hidden; + +#define __lll_lock(futex, private) \ + ((void) ({ \ + int *__futex = (futex); \ + if (__builtin_expect (atomic_compare_and_exchange_val_acq (__futex, \ + 1, 0), 0)) \ + { \ + if (__builtin_constant_p (private) && (private) == LLL_PRIVATE) \ + __lll_lock_wait_private (__futex); \ + else \ + __lll_lock_wait (__futex, private); \ + } \ + })) +#define lll_lock(futex, private) __lll_lock (&(futex), private) + + +#define __lll_robust_lock(futex, id, private) \ + ({ \ + int *__futex = (futex); \ + int __val = 0; \ + \ + if (__builtin_expect (atomic_compare_and_exchange_bool_acq (__futex, id, \ + 0), 0)) \ + __val = __lll_robust_lock_wait (__futex, private); \ + __val; \ + }) +#define lll_robust_lock(futex, id, private) \ + __lll_robust_lock (&(futex), id, private) + + +#define __lll_cond_lock(futex, private) \ + ((void) ({ \ + int *__futex = (futex); \ + if (__builtin_expect (atomic_exchange_acq (__futex, 2), 0)) \ + __lll_lock_wait (__futex, private); \ + })) +#define lll_cond_lock(futex, private) __lll_cond_lock (&(futex), private) + + +#define lll_robust_cond_lock(futex, id, private) \ + __lll_robust_lock (&(futex), (id) | FUTEX_WAITERS, private) + + +extern int __lll_timedlock_wait (int *futex, const struct timespec *, + int private) attribute_hidden; +extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *, + int private) attribute_hidden; + +#define __lll_timedlock(futex, abstime, private) \ + ({ \ + int *__futex = (futex); \ + int __val = 0; \ + \ + if (__builtin_expect (atomic_exchange_acq (__futex, 1), 0)) \ + __val = __lll_timedlock_wait (__futex, abstime, private); \ + __val; \ + }) +#define lll_timedlock(futex, abstime, private) \ + __lll_timedlock (&(futex), abstime, private) + + +#define __lll_robust_timedlock(futex, abstime, id, private) \ + ({ \ + int *__futex = (futex); \ + int __val = 0; \ + \ + if (__builtin_expect (atomic_compare_and_exchange_bool_acq (__futex, id, \ + 0), 0)) \ + __val = __lll_robust_timedlock_wait (__futex, abstime, private); \ + __val; \ + }) +#define lll_robust_timedlock(futex, abstime, id, private) \ + __lll_robust_timedlock (&(futex), abstime, id, private) + + +#define __lll_unlock(futex, private) \ + (void) \ + ({ int *__futex = (futex); \ + int __oldval = atomic_exchange_rel (__futex, 0); \ + if (__builtin_expect (__oldval > 1, 0)) \ + lll_futex_wake (__futex, 1, private); \ + }) +#define lll_unlock(futex, private) __lll_unlock(&(futex), private) + + +#define __lll_robust_unlock(futex, private) \ + (void) \ + ({ int *__futex = (futex); \ + int __oldval = atomic_exchange_rel (__futex, 0); \ + if (__builtin_expect (__oldval & FUTEX_WAITERS, 0)) \ + lll_futex_wake (__futex, 1, private); \ + }) +#define lll_robust_unlock(futex, private) \ + __lll_robust_unlock(&(futex), private) + + +#define lll_islocked(futex) \ + (futex != 0) + + +/* Our internal lock implementation is identical to the binary-compatible + mutex implementation. */ + +/* Initializers for lock. */ +#define LLL_LOCK_INITIALIZER (0) +#define LLL_LOCK_INITIALIZER_LOCKED (1) + +/* The states of a lock are: + 0 - untaken + 1 - taken by one user + >1 - taken by more users */ + +/* The kernel notifies a process which uses CLONE_CLEARTID via futex + wakeup when the clone terminates. The memory location contains the + thread ID while the clone is running and is reset to zero + afterwards. */ +#define lll_wait_tid(tid) \ + do { \ + __typeof (tid) __tid; \ + while ((__tid = (tid)) != 0) \ + lll_futex_wait (&(tid), __tid, LLL_SHARED); \ + } while (0) + +extern int __lll_timedwait_tid (int *, const struct timespec *) + attribute_hidden; + +#define lll_timedwait_tid(tid, abstime) \ + ({ \ + int __res = 0; \ + if ((tid) != 0) \ + __res = __lll_timedwait_tid (&(tid), (abstime)); \ + __res; \ + }) + +#endif /* lowlevellock.h */ diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/pt-vfork.S b/sysdeps/unix/sysv/linux/m68k/nptl/pt-vfork.S new file mode 100644 index 0000000000..36c92706a5 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/nptl/pt-vfork.S @@ -0,0 +1,36 @@ +/* Copyright (C) 2010 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Maxim Kuvyrkov , 2010. + + 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. */ + +#include + +#define SAVE_PID \ + bsrl __m68k_read_tp@PLTPC ; /* Get the thread pointer. */ \ + movel %a0, %a1 ; /* Save TP for RESTORE_PID. */ \ + movel PID_OFFSET(%a1), %d0 ; /* Get the PID. */ \ + movel %d0, %d1 ; /* Save PID for RESTORE_PID. */ \ + negl %d0 ; /* Negate the PID. */ \ + movel %d0, PID_OFFSET(%a1) ; /* Store the temporary PID. */ + +#define RESTORE_PID \ + tstl %d0 ; \ + beq 1f ; /* If we are the parent... */ \ + movel %d1, PID_OFFSET(%a1) ; /* Restore the PID. */ \ +1: + +#include diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/pthread_once.c b/sysdeps/unix/sysv/linux/m68k/nptl/pthread_once.c new file mode 100644 index 0000000000..415045f511 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/nptl/pthread_once.c @@ -0,0 +1,91 @@ +/* Copyright (C) 2010 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Maxim Kuvyrkov , 2010. + + 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. */ + +#include "pthreadP.h" +#include + +unsigned long int __fork_generation attribute_hidden; + +static void +clear_once_control (void *arg) +{ + pthread_once_t *once_control = (pthread_once_t *) arg; + + *once_control = 0; + lll_futex_wake (once_control, INT_MAX, LLL_PRIVATE); +} + +int +__pthread_once (pthread_once_t *once_control, void (*init_routine) (void)) +{ + for (;;) + { + int oldval; + int newval; + + /* Pseudo code: + newval = __fork_generation | 1; + oldval = *once_control; + if ((oldval & 2) == 0) + *once_control = newval; + Do this atomically. + */ + do + { + newval = __fork_generation | 1; + oldval = *once_control; + if (oldval & 2) + break; + } while (atomic_compare_and_exchange_val_acq (once_control, newval, oldval) != oldval); + + /* Check if the initializer has already been done. */ + if ((oldval & 2) != 0) + return 0; + + /* Check if another thread already runs the initializer. */ + if ((oldval & 1) == 0) + break; + + /* Check whether the initializer execution was interrupted by a fork. */ + if (oldval != newval) + break; + + /* Same generation, some other thread was faster. Wait. */ + lll_futex_wait (once_control, oldval, LLL_PRIVATE); + } + + /* This thread is the first here. Do the initialization. + Register a cleanup handler so that in case the thread gets + interrupted the initialization can be restarted. */ + pthread_cleanup_push (clear_once_control, once_control); + + init_routine (); + + pthread_cleanup_pop (0); + + /* Say that the initialisation is done. */ + *once_control = __fork_generation | 2; + + /* Wake up all other threads. */ + lll_futex_wake (once_control, INT_MAX, LLL_PRIVATE); + + return 0; +} +weak_alias (__pthread_once, pthread_once) +strong_alias (__pthread_once, __pthread_once_internal) diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/m68k/nptl/sysdep-cancel.h new file mode 100644 index 0000000000..87e2d55ee9 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/nptl/sysdep-cancel.h @@ -0,0 +1,141 @@ +/* Copyright (C) 2010 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Maxim Kuvyrkov , 2010. + + 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. */ + +#include +#include +#ifndef __ASSEMBLER__ +# include +#endif + +#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt + +# undef PSEUDO +# define PSEUDO(name, syscall_name, args) \ + .text; \ + ENTRY (name) \ + SINGLE_THREAD_P; \ + jne .Lpseudo_cancel; \ + .type __##syscall_name##_nocancel,@function; \ + .globl __##syscall_name##_nocancel; \ + __##syscall_name##_nocancel: \ + DO_CALL (syscall_name, args); \ + cmp.l &-4095, %d0; \ + jcc SYSCALL_ERROR_LABEL; \ + rts; \ + .size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel; \ + .Lpseudo_cancel: \ + cfi_startproc; \ + CENABLE; \ + DOCARGS_##args \ + move.l %d0, -(%sp); /* Save result of CENABLE. */ \ + cfi_adjust_cfa_offset (4); \ + move.l &SYS_ify (syscall_name), %d0; \ + trap &0; \ + move.l %d0, %d2; \ + CDISABLE; \ + addq.l &4, %sp; /* Remove result of CENABLE from the stack. */ \ + cfi_adjust_cfa_offset (-4); \ + move.l %d2, %d0; \ + UNDOCARGS_##args \ + cmp.l &-4095, %d0; \ + jcc SYSCALL_ERROR_LABEL; \ + cfi_endproc + +/* Note: we use D2 to save syscall's return value as D0 will be clobbered in + CDISABLE. */ +# define DOCARGS_0 move.l %d2, -(%sp); \ + cfi_adjust_cfa_offset (4); cfi_rel_offset (%d2, 0); +# define UNDOCARGS_0 move.l (%sp)+, %d2; \ + cfi_adjust_cfa_offset (-4); cfi_restore (%d2); + +# define DOCARGS_1 _DOCARGS_1 (4); DOCARGS_0 +# define _DOCARGS_1(n) move.l n(%sp), %d1; +# define UNDOCARGS_1 UNDOCARGS_0 + +# define DOCARGS_2 _DOCARGS_2 (8) +# define _DOCARGS_2(n) DOCARGS_0 move.l n+4(%sp), %d2; _DOCARGS_1 (n) +# define UNDOCARGS_2 UNDOCARGS_0 + +/* TODO: We can optimize DOCARGS_{3, 4} by saving registers to a0 and a1 + instead of pushing them on stack. */ +# define DOCARGS_3 _DOCARGS_3 (12) +# define _DOCARGS_3(n) move.l %d3, -(%sp); \ + cfi_adjust_cfa_offset (4); cfi_rel_offset (%d3, 0); \ + move.l n+4(%sp), %d3; _DOCARGS_2 (n) +# define UNDOCARGS_3 UNDOCARGS_2 move.l (%sp)+, %d3; \ + cfi_adjust_cfa_offset (-4); cfi_restore (%d3); + +# define DOCARGS_4 _DOCARGS_4 (16) +# define _DOCARGS_4(n) move.l %d4, -(%sp); \ + cfi_adjust_cfa_offset (4); cfi_rel_offset (%d4, 0); \ + move.l n+4(%sp), %d4; _DOCARGS_3 (n) +# define UNDOCARGS_4 UNDOCARGS_3 move.l (%sp)+, %d4; \ + cfi_adjust_cfa_offset (-4); cfi_restore (%d4); + +# define DOCARGS_5 _DOCARGS_5 (20) +# define _DOCARGS_5(n) move.l %d5, %a1; cfi_register (%d5, a1); \ + move.l n(%sp), %d5; _DOCARGS_4 (n-4) +# define UNDOCARGS_5 UNDOCARGS_4 move.l %a1, %d5; cfi_restore (%d5); + +# define DOCARGS_6 _DOCARGS_6 (24) +# define _DOCARGS_6(n) move.l n(%sp), %a0; _DOCARGS_5 (n-4) +# define UNDOCARGS_6 UNDOCARGS_5 + +# ifdef PIC +# define PSEUDO_JMP(sym) jbsr sym ## @PLTPC +# else +# define PSEUDO_JMP(sym) jbsr sym +# endif + +# ifdef IS_IN_libpthread +# define CENABLE PSEUDO_JMP (__pthread_enable_asynccancel) +# define CDISABLE PSEUDO_JMP (__pthread_disable_asynccancel) +# elif !defined NOT_IN_libc +# define CENABLE PSEUDO_JMP (__libc_enable_asynccancel) +# define CDISABLE PSEUDO_JMP (__libc_disable_asynccancel) +# elif defined IS_IN_librt +# define CENABLE PSEUDO_JMP (__librt_enable_asynccancel) +# define CDISABLE PSEUDO_JMP (__librt_disable_asynccancel) +# else +# error Unsupported library +# endif + +# ifndef __ASSEMBLER__ +# define SINGLE_THREAD_P \ + __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ + header.multiple_threads) == 0, 1) +# else +# define SINGLE_THREAD_P \ + PSEUDO_JMP (__m68k_read_tp); \ + tst.l MULTIPLE_THREADS_OFFSET(%a0) +# endif + +#elif !defined __ASSEMBLER__ + +# define SINGLE_THREAD_P (1) +# define NO_CANCELLATION (1) + +#endif + +#ifndef __ASSEMBLER__ +# define RTLD_SINGLE_THREAD_P \ + __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ + header.multiple_threads) == 0, \ + 1) +#endif diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/vfork.S b/sysdeps/unix/sysv/linux/m68k/nptl/vfork.S new file mode 100644 index 0000000000..8599c3dc71 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/nptl/vfork.S @@ -0,0 +1,38 @@ +/* Copyright (C) 2010 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Maxim Kuvyrkov , 2010. + + 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. */ + +#include + +#define SAVE_PID \ + bsrl __m68k_read_tp@PLTPC ; /* Get the thread pointer. */ \ + movel %a0, %a1 ; /* Save TP for RESTORE_PID. */ \ + movel PID_OFFSET(%a1), %d0 ; /* Get the PID. */ \ + movel %d0, %d1 ; /* Save PID for RESTORE_PID. */ \ + negl %d0 ; /* Negate the PID. */ \ + bne 1f ; /* If it was zero... */ \ + movel #0x80000000, %d0 ; /* use 0x80000000 instead. */ \ +1: movel %d0, PID_OFFSET(%a1) ; /* Store the temporary PID. */ + +#define RESTORE_PID \ + tstl %d0 ; \ + beq 1f ; /* If we are the parent... */ \ + movel %d1, PID_OFFSET(%a1) ; /* Restore the PID. */ \ +1: + +#include diff --git a/sysdeps/unix/sysv/linux/m68k/socket.S b/sysdeps/unix/sysv/linux/m68k/socket.S index 2690f182a8..147a3b2d48 100644 --- a/sysdeps/unix/sysv/linux/m68k/socket.S +++ b/sysdeps/unix/sysv/linux/m68k/socket.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998, 2010 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 @@ -41,8 +41,11 @@ .globl __socket ENTRY (__socket) -#if defined NEED_CANCELLATION && defined CENABLE - SINGLE_THREAD_P (%a0) +#ifdef NEED_CANCELLATION +# if !defined CENABLE || !defined CDISABLE +# error CENABLE and/or CDISABLE is not defined +# endif + SINGLE_THREAD_P jne 1f #endif @@ -69,21 +72,26 @@ ENTRY (__socket) /* Successful; return the syscall's value. */ rts -#if defined NEED_CANCELLATION && defined CENABLE -1: /* Enable asynchronous cancellation. */ +#ifdef NEED_CANCELLATION +1: cfi_startproc + /* Enable asynchronous cancellation. */ CENABLE - /* Save registers. */ + /* Save D2. */ move.l %d2, -(%sp) - move.l %d0, -(%sp) + cfi_adjust_cfa_offset (4) + cfi_rel_offset (%d2, 0) - move.l #SYS_ify (socketcall), %d0 /* System call number in %d0. */ + /* Save the result of CENABLE. */ + move.l %d0, -(%sp) + cfi_adjust_cfa_offset (4) /* Use ## so `socket' is a separate token that might be #define'd. */ move.l #P (SOCKOP_,socket), %d1 /* Subcode is first arg to syscall. */ lea 4+8(%sp), %a1 /* Address of args is 2nd arg. */ move.l %a1, %d2 + move.l #SYS_ify (socketcall), %d0 /* System call number in %d0. */ /* Do the system call trap. */ trap #0 @@ -91,14 +99,18 @@ ENTRY (__socket) move.l %d0, %d2 CDISABLE addq.l #4, %sp + cfi_adjust_cfa_offset (-4) move.l %d2, %d0 /* Restore registers. */ move.l (%sp)+, %d2 + cfi_adjust_cfa_offset (-4) + cfi_restore (%d2) /* %d0 is < 0 if there was an error. */ tst.l %d0 jmi SYSCALL_ERROR_LABEL + cfi_endproc /* Successful; return the syscall's value. */ rts diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h index 12687d8054..e3aed155bb 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -1,4 +1,5 @@ -/* Copyright (C) 1996, 1997, 1998, 2000, 2003, 2004, 2006 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998, 2000, 2003, 2004, 2006, 2010 + Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Andreas Schwab, , December 1995. @@ -23,6 +24,7 @@ #include #include +#include /* Defines RTLD_PRIVATE_ERRNO. */ #include @@ -148,9 +150,11 @@ SYSCALL_ERROR_LABEL: \ arg 3 %d3 call-saved arg 4 %d4 call-saved arg 5 %d5 call-saved + arg 6 %a0 call-clobbered The stack layout upon entering the function is: + 24(%sp) Arg# 6 20(%sp) Arg# 5 16(%sp) Arg# 4 12(%sp) Arg# 3 @@ -229,7 +233,7 @@ SYSCALL_ERROR_LABEL: \ normally. It will never touch errno. This returns just what the kernel gave back. */ #undef INTERNAL_SYSCALL -#define INTERNAL_SYSCALL(name, err, nr, args...) \ +#define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \ ({ unsigned int _sys_result; \ { \ /* Load argument values in temporary variables @@ -237,7 +241,7 @@ SYSCALL_ERROR_LABEL: \ before the call used registers are set. */ \ LOAD_ARGS_##nr (args) \ LOAD_REGS_##nr \ - register int _d0 asm ("%d0") = __NR_##name; \ + register int _d0 asm ("%d0") = name; \ asm volatile ("trap #0" \ : "=d" (_d0) \ : "0" (_d0) ASM_ARGS_##nr \ @@ -245,6 +249,8 @@ SYSCALL_ERROR_LABEL: \ _sys_result = _d0; \ } \ (int) _sys_result; }) +#define INTERNAL_SYSCALL(name, err, nr, args...) \ + INTERNAL_SYSCALL_NCS (__NR_##name, err, nr, ##args) #undef INTERNAL_SYSCALL_ERROR_P #define INTERNAL_SYSCALL_ERROR_P(val, err) \ @@ -300,4 +306,15 @@ SYSCALL_ERROR_LABEL: \ #define ASM_ARGS_6 ASM_ARGS_5, "a" (_a0) #endif /* not __ASSEMBLER__ */ + +/* Pointer mangling is not yet supported for M68K. */ +#define PTR_MANGLE(var) (void) (var) +#define PTR_DEMANGLE(var) (void) (var) + +#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO +/* M68K needs system-supplied DSO to access TLS helpers + even when statically linked. */ +# define NEED_STATIC_SYSINFO_DSO 1 +#endif + #endif diff --git a/sysdeps/unix/sysv/linux/m68k/vfork.S b/sysdeps/unix/sysv/linux/m68k/vfork.S index 8027b2f801..61bbf2f58a 100644 --- a/sysdeps/unix/sysv/linux/m68k/vfork.S +++ b/sysdeps/unix/sysv/linux/m68k/vfork.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2002, 2003, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab . @@ -22,6 +22,14 @@ #include #include +#ifndef SAVE_PID +#define SAVE_PID +#endif + +#ifndef RESTORE_PID +#define RESTORE_PID +#endif + /* Clone the calling process, but without copying the whole address space. The calling process is suspended until the new process exits or is replaced by a call to `execve'. Return -1 for errors, 0 to the new process, @@ -31,12 +39,20 @@ ENTRY (__vfork) #ifdef __NR_vfork + /* SAVE_PID clobbers call-clobbered registers and + saves data in D1 and A1. */ + + SAVE_PID + /* Pop the return PC value into A0. */ movel %sp@+, %a0 /* Stuff the syscall number in D0 and trap into the kernel. */ movel #SYS_ify (vfork), %d0 trap #0 + + RESTORE_PID + tstl %d0 jmi .Lerror /* Branch forward if it failed. */ From 2b3dafb0874b7843355e7e02b0009be6df52271d Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 12 Mar 2010 19:55:40 +0100 Subject: [PATCH 3965/4487] Whitespace cleanup --- sysdeps/unix/sysv/linux/m68k/m68k-helpers.S | 2 +- sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h | 2 +- sysdeps/unix/sysv/linux/m68k/nptl/pt-vfork.S | 2 +- sysdeps/unix/sysv/linux/m68k/nptl/vfork.S | 2 +- sysdeps/unix/sysv/linux/m68k/vfork.S | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sysdeps/unix/sysv/linux/m68k/m68k-helpers.S b/sysdeps/unix/sysv/linux/m68k/m68k-helpers.S index 00db4bb523..242d23d390 100644 --- a/sysdeps/unix/sysv/linux/m68k/m68k-helpers.S +++ b/sysdeps/unix/sysv/linux/m68k/m68k-helpers.S @@ -86,7 +86,7 @@ ENTRY (__vdso_atomic_cmpxchg_32_stub) rts cfi_endproc END (__vdso_atomic_cmpxchg_32_stub) - + .hidden __vdso_atomic_barrier_stub ENTRY (__vdso_atomic_barrier_stub) cfi_startproc diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h index 926077dd0c..bc2970e5b1 100644 --- a/sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h @@ -73,7 +73,7 @@ : (fl)) \ : ((fl) | (((private) ^ FUTEX_PRIVATE_FLAG) \ & THREAD_GETMEM (THREAD_SELF, header.private_futex)))) -# endif +# endif #endif diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/pt-vfork.S b/sysdeps/unix/sysv/linux/m68k/nptl/pt-vfork.S index 36c92706a5..639d5ed2c1 100644 --- a/sysdeps/unix/sysv/linux/m68k/nptl/pt-vfork.S +++ b/sysdeps/unix/sysv/linux/m68k/nptl/pt-vfork.S @@ -31,6 +31,6 @@ tstl %d0 ; \ beq 1f ; /* If we are the parent... */ \ movel %d1, PID_OFFSET(%a1) ; /* Restore the PID. */ \ -1: +1: #include diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/vfork.S b/sysdeps/unix/sysv/linux/m68k/nptl/vfork.S index 8599c3dc71..95e37642f3 100644 --- a/sysdeps/unix/sysv/linux/m68k/nptl/vfork.S +++ b/sysdeps/unix/sysv/linux/m68k/nptl/vfork.S @@ -33,6 +33,6 @@ tstl %d0 ; \ beq 1f ; /* If we are the parent... */ \ movel %d1, PID_OFFSET(%a1) ; /* Restore the PID. */ \ -1: +1: #include diff --git a/sysdeps/unix/sysv/linux/m68k/vfork.S b/sysdeps/unix/sysv/linux/m68k/vfork.S index 61bbf2f58a..4def7e3b4a 100644 --- a/sysdeps/unix/sysv/linux/m68k/vfork.S +++ b/sysdeps/unix/sysv/linux/m68k/vfork.S @@ -43,7 +43,7 @@ ENTRY (__vfork) saves data in D1 and A1. */ SAVE_PID - + /* Pop the return PC value into A0. */ movel %sp@+, %a0 From 7e261ba3d85d10eefbb55f2e9d67c55910dfae2f Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 12 Mar 2010 21:37:02 +0100 Subject: [PATCH 3966/4487] Add m68k-helpers optimized for m680x0 --- ChangeLog.m68k | 7 ++ .../linux/m68k/{ => coldfire}/m68k-helpers.S | 0 .../sysv/linux/m68k/m680x0/m68k-helpers.S | 103 ++++++++++++++++++ 3 files changed, 110 insertions(+) rename sysdeps/unix/sysv/linux/m68k/{ => coldfire}/m68k-helpers.S (100%) create mode 100644 sysdeps/unix/sysv/linux/m68k/m680x0/m68k-helpers.S diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 32681fff72..446a30707e 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,10 @@ +2010-03-12 Andreas Schwab + + * sysdeps/unix/sysv/linux/m68k/m68k-helpers.S: Renamed ... + * sysdeps/unix/sysv/linux/m68k/coldfire/m68k-helpers.S: ... to + this. + * sysdeps/unix/sysv/linux/m68k/m680x0/m68k-helpers.S: New file. + 2010-03-09 Maxim Kuvyrkov NPTL support for m68k/ColdFire diff --git a/sysdeps/unix/sysv/linux/m68k/m68k-helpers.S b/sysdeps/unix/sysv/linux/m68k/coldfire/m68k-helpers.S similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/m68k-helpers.S rename to sysdeps/unix/sysv/linux/m68k/coldfire/m68k-helpers.S diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/m68k-helpers.S b/sysdeps/unix/sysv/linux/m68k/m680x0/m68k-helpers.S new file mode 100644 index 0000000000..83ce56423a --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/m68k-helpers.S @@ -0,0 +1,103 @@ +/* Copyright (C) 2010 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Maxim Kuvyrkov , 2010. + + 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. + + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + + 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. */ + +#include +#include + + .text + + .hidden __vdso_read_tp_stub +ENTRY (__vdso_read_tp_stub) + cfi_startproc + move.l #__NR_get_thread_area, %d0 + trap #0 + move.l %d0, %a0 + rts + cfi_endproc +END (__vdso_read_tp_stub) + +# ifdef SHARED +/* GCC will emit calls to this routine. Linux has an + equivalent helper function (which clobbers fewer registers than + a normal function call) in a vdso; tail call to the + helper. */ +# ifdef IS_IN_rtld +/* rtld gets a hidden copy of __m68k_read_tp. */ + .hidden __m68k_read_tp +# endif +ENTRY (__m68k_read_tp) + cfi_startproc + lea _GLOBAL_OFFSET_TABLE_@GOTPC(%pc), %a0 + move.l M68K_VDSO_SYMBOL (__vdso_read_tp)@GOT(%a0), %a0 + jmp ([%a0]) + cfi_endproc +END (__m68k_read_tp) + +/* The following two stubs are for macros in atomic.h, they can't + clobber anything. */ + + .hidden __vdso_atomic_cmpxchg_32_stub +ENTRY (__vdso_atomic_cmpxchg_32_stub) + cfi_startproc + move.l %d2, -(%sp) + cfi_adjust_cfa_offset (4) + cfi_rel_offset (%d2, 0) + move.l %d0, %d2 + move.l #SYS_ify (atomic_cmpxchg_32), %d0 + trap #0 + move.l (%sp)+, %d2 + cfi_adjust_cfa_offset (-4) + cfi_restore (%d2) + rts + cfi_endproc +END (__vdso_atomic_cmpxchg_32_stub) + + .hidden __vdso_atomic_barrier_stub +ENTRY (__vdso_atomic_barrier_stub) + cfi_startproc + move.l %d0, -(%sp) + cfi_adjust_cfa_offset (4) + move.l #SYS_ify (atomic_barrier), %d0 + trap #0 + move.l (%sp)+, %d0 + cfi_adjust_cfa_offset (-4) + rts + cfi_endproc +END (__vdso_atomic_barrier_stub) +# else /* !SHARED */ +/* If the vDSO is not available, use a syscall to get TP. */ + strong_alias (__vdso_read_tp_stub, __m68k_read_tp) +# endif /* SHARED */ From 7d6cb729ed0451f51b63cb563271f1ce889d5a78 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 12 Mar 2010 22:15:23 +0100 Subject: [PATCH 3967/4487] m68k: don't include in lowlevellock.h --- ChangeLog.m68k | 3 +++ sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 446a30707e..712651da28 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,5 +1,8 @@ 2010-03-12 Andreas Schwab + * sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h: Don't include + . + * sysdeps/unix/sysv/linux/m68k/m68k-helpers.S: Renamed ... * sysdeps/unix/sysv/linux/m68k/coldfire/m68k-helpers.S: ... to this. diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h index bc2970e5b1..5ca78ec72c 100644 --- a/sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h @@ -26,7 +26,6 @@ #include #include #include -#include #include #define FUTEX_WAIT 0 From dbd0094b3f71213bc178cd1946496defbedb1d62 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 13 Mar 2010 01:00:03 +0100 Subject: [PATCH 3968/4487] m68k: TLS reference to errno in syscall stubs --- ChangeLog.m68k | 5 ++++ sysdeps/unix/sysv/linux/m68k/sysdep.h | 33 ++++++++++++++++++++------- 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 712651da28..b16fde2e50 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2010-03-13 Andreas Schwab + + * sysdeps/unix/sysv/linux/m68k/sysdep.h (SYSCALL_ERROR_HANDLER): + Add variant for USE__THREAD. + 2010-03-12 Andreas Schwab * sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h: Don't include diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h index e3aed155bb..8bd188b0bc 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -111,10 +111,27 @@ SYSCALL_ERROR_LABEL: \ a pointer (e.g., mmap). */ \ move.l %d0, %a0; \ rts; -# else /* !RTLD_PRIVATE_ERRNO */ -/* Store (- %d0) into errno through the GOT. */ -# if defined _LIBC_REENTRANT -# define SYSCALL_ERROR_HANDLER \ +# elif USE___THREAD +# ifndef NOT_IN_libc +# define SYSCALL_ERROR_ERRNO __libc_errno +# else +# define SYSCALL_ERROR_ERRNO errno +# endif +# define SYSCALL_ERROR_HANDLER \ +SYSCALL_ERROR_LABEL: \ + neg.l %d0; \ + move.l %d0, -(%sp); \ + jbsr __m68k_read_tp@PLTPC; \ + lea (_GLOBAL_OFFSET_TABLE_@GOTPC, %pc), %a1; \ + add.l (SYSCALL_ERROR_ERRNO@TLSIE, %a1), %a0; \ + move.l (%sp)+, (%a0); \ + move.l &-1, %d0; \ + /* Copy return value to %a0 for syscalls that are declared to return \ + a pointer (e.g., mmap). */ \ + move.l %d0, %a0; \ + rts; +# elif defined _LIBC_REENTRANT +# define SYSCALL_ERROR_HANDLER \ SYSCALL_ERROR_LABEL: \ neg.l %d0; \ move.l %d0, -(%sp); \ @@ -125,8 +142,9 @@ SYSCALL_ERROR_LABEL: \ a pointer (e.g., mmap). */ \ move.l %d0, %a0; \ rts; -# else /* !_LIBC_REENTRANT */ -# define SYSCALL_ERROR_HANDLER \ +# else /* !_LIBC_REENTRANT */ +/* Store (- %d0) into errno through the GOT. */ +# define SYSCALL_ERROR_HANDLER \ SYSCALL_ERROR_LABEL: \ move.l (errno@GOTPC, %pc), %a0; \ neg.l %d0; \ @@ -136,8 +154,7 @@ SYSCALL_ERROR_LABEL: \ a pointer (e.g., mmap). */ \ move.l %d0, %a0; \ rts; -# endif /* _LIBC_REENTRANT */ -# endif /* RTLD_PRIVATE_ERRNO */ +# endif /* _LIBC_REENTRANT */ #else # define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */ #endif /* PIC */ From 326a03edf9a702f60ea2116364d8177dc682b9a5 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 13 Mar 2010 16:59:42 +0100 Subject: [PATCH 3969/4487] m68k: define __signbit inlines --- ChangeLog.m68k | 3 +++ sysdeps/m68k/m680x0/fpu/bits/mathinline.h | 22 +++++++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index b16fde2e50..1c8d232365 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,5 +1,8 @@ 2010-03-13 Andreas Schwab + * sysdeps/m68k/m680x0/fpu/bits/mathinline.h (__signbit) + (__signbitf, __signbitl): Define. + * sysdeps/unix/sysv/linux/m68k/sysdep.h (SYSCALL_ERROR_HANDLER): Add variant for USE__THREAD. diff --git a/sysdeps/m68k/m680x0/fpu/bits/mathinline.h b/sysdeps/m68k/m680x0/fpu/bits/mathinline.h index 6b69f7a493..0da98e40ca 100644 --- a/sysdeps/m68k/m680x0/fpu/bits/mathinline.h +++ b/sysdeps/m68k/m680x0/fpu/bits/mathinline.h @@ -1,5 +1,5 @@ /* Definitions of inline math functions implemented by the m68881/2. - Copyright (C) 1991,92,93,94,96,97,98,99,2000,2002, 2003, 2004, 2008 + Copyright (C) 1991,92,93,94,96,97,98,99,2000,2002, 2003, 2004, 2008, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -85,6 +85,26 @@ : "=dm" (__result) : "f" (x), "f" (y)); \ __result != 0; }) # endif /* GCC 3.1 */ + +/* Test for negative number. Used in the signbit() macro. */ +__MATH_INLINE int +__NTH (__signbitf (float __x)) +{ + __extension__ union { float __f; int __i; } __u = { __f: __x }; + return __u.__i < 0; +} +__MATH_INLINE int +__NTH (__signbit (double __x)) +{ + __extension__ union { double __d; int __i[2]; } __u = { __d: __x }; + return __u.__i[0] < 0; +} +__MATH_INLINE int +__NTH (__signbitl (long double __x)) +{ + __extension__ union { long double __d; int __i[3]; } __u = { __d: __x }; + return __u.__i[0] < 0; +} #endif From b5e933757cbe34989698fc1b1390c9b2a9a6b0be Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 13 Mar 2010 17:28:12 +0100 Subject: [PATCH 3970/4487] m68k: remove duplicate __signbit definitions --- ChangeLog.m68k | 2 +- sysdeps/m68k/m680x0/fpu/bits/mathinline.h | 12 +----------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 1c8d232365..9fafc08c9f 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,7 +1,7 @@ 2010-03-13 Andreas Schwab * sysdeps/m68k/m680x0/fpu/bits/mathinline.h (__signbit) - (__signbitf, __signbitl): Define. + (__signbitf, __signbitl): Always define as inline. * sysdeps/unix/sysv/linux/m68k/sysdep.h (SYSCALL_ERROR_HANDLER): Add variant for USE__THREAD. diff --git a/sysdeps/m68k/m680x0/fpu/bits/mathinline.h b/sysdeps/m68k/m680x0/fpu/bits/mathinline.h index 0da98e40ca..975ffd8188 100644 --- a/sysdeps/m68k/m680x0/fpu/bits/mathinline.h +++ b/sysdeps/m68k/m680x0/fpu/bits/mathinline.h @@ -301,17 +301,7 @@ __inline_functions(long double,l) #ifdef __USE_ISOC99 # define __inline_functions(float_type, s) \ -__m81_defun (int, __CONCAT(__signbit,s), (float_type __value)) \ -{ \ - /* There is no branch-condition for the sign bit, so we must extract \ - and examine the condition codes manually. */ \ - unsigned long int __fpsr; \ - __asm ("ftst%.x %1\n" \ - "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \ - return (__fpsr >> 27) & 1; \ -} \ - \ - __m81_defun (float_type, __CONCAT(__scalbln,s), \ +__m81_defun (float_type, __CONCAT(__scalbln,s), \ (float_type __x, long int __n)) \ { \ return __CONCAT(__scalbn,s) (__x, __n); \ From 92dd2ecf169ac81a2fa16cbe246a1036c6b94656 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 13 Mar 2010 18:14:35 +0100 Subject: [PATCH 3971/4487] m68k: use signbit macro --- ChangeLog.m68k | 3 +++ sysdeps/m68k/m680x0/fpu/s_ccos.c | 4 ++-- sysdeps/m68k/m680x0/fpu/s_ccosh.c | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 9fafc08c9f..c7d068e36b 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,5 +1,8 @@ 2010-03-13 Andreas Schwab + * sysdeps/m68k/m680x0/fpu/s_ccosh.c: Use signbit macro. + * sysdeps/m68k/m680x0/fpu/s_ccos.c: Likewise. + * sysdeps/m68k/m680x0/fpu/bits/mathinline.h (__signbit) (__signbitf, __signbitl): Always define as inline. diff --git a/sysdeps/m68k/m680x0/fpu/s_ccos.c b/sysdeps/m68k/m680x0/fpu/s_ccos.c index d302d3d86b..8239159647 100644 --- a/sysdeps/m68k/m680x0/fpu/s_ccos.c +++ b/sysdeps/m68k/m680x0/fpu/s_ccos.c @@ -1,5 +1,5 @@ /* Complex cosine function. m68k fpu version - Copyright (C) 1997, 1999 Free Software Foundation, Inc. + Copyright (C) 1997, 1999, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab . @@ -48,7 +48,7 @@ s(__ccos) (__complex__ float_type x) : "f" (__real__ x)); __real__ retval = cos_rx * m81(__ieee754_cosh) (__imag__ x); if (rx_cond & __M81_COND_ZERO) - __imag__ retval = (m81(__signbit) (__imag__ x) + __imag__ retval = (signbit (__imag__ x) ? __real__ x : -__real__ x); else __imag__ retval = -sin_rx * m81(__ieee754_sinh) (__imag__ x); diff --git a/sysdeps/m68k/m680x0/fpu/s_ccosh.c b/sysdeps/m68k/m680x0/fpu/s_ccosh.c index 1698881b9f..d272e98f2a 100644 --- a/sysdeps/m68k/m680x0/fpu/s_ccosh.c +++ b/sysdeps/m68k/m680x0/fpu/s_ccosh.c @@ -1,5 +1,5 @@ /* Complex cosine hyperbole function. m68k fpu version - Copyright (C) 1997, 1999 Free Software Foundation, Inc. + Copyright (C) 1997, 1999, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab . @@ -48,7 +48,7 @@ s(__ccosh) (__complex__ float_type x) : "f" (__imag__ x)); __real__ retval = cos_ix * m81(__ieee754_cosh) (__real__ x); if (ix_cond & __M81_COND_ZERO) - __imag__ retval = (m81(__signbit) (__real__ x) + __imag__ retval = (signbit (__real__ x) ? -__imag__ x : __imag__ x); else __imag__ retval = sin_ix * m81(__ieee754_sinh) (__real__ x); From 1eb0725631701981b673daf9dd3c971b077b5fef Mon Sep 17 00:00:00 2001 From: Mischa Jonker Date: Tue, 23 Mar 2010 15:03:10 +0000 Subject: [PATCH 3972/4487] Fix bug 11291: add *mem as atomic operation output for MIPS. --- ChangeLog.mips | 10 ++++++++ sysdeps/mips/bits/atomic.h | 52 +++++++++++++++++++------------------- 2 files changed, 36 insertions(+), 26 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index c2609b07e8..2edc425760 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,13 @@ +2010-03-23 Mischa Jonker + + [BZ #11291] + * sysdeps/mips/bits/atomic.h + (__arch_compare_and_exchange_xxx_32_int, + __arch_compare_and_exchange_xxx_64_int, + __arch_exchange_xxx_32_int, __arch_exchange_xxx_64_int, + __arch_exchange_and_add_32_int, __arch_exchange_and_add_64_int): + Specify *mem as asm output as well as input. + 2010-02-10 Joseph Myers * sysdeps/mips/fpu/fegetenv.c: Add hidden alias. diff --git a/sysdeps/mips/bits/atomic.h b/sysdeps/mips/bits/atomic.h index 167d9a59c8..11b3467ee7 100644 --- a/sysdeps/mips/bits/atomic.h +++ b/sysdeps/mips/bits/atomic.h @@ -69,16 +69,16 @@ typedef uintmax_t uatomic_max_t; MIPS_PUSH_MIPS2 \ rel "\n" \ "1:\t" \ - "ll %0,%4\n\t" \ + "ll %0,%5\n\t" \ "move %1,$0\n\t" \ - "bne %0,%2,2f\n\t" \ - "move %1,%3\n\t" \ - "sc %1,%4\n\t" \ + "bne %0,%3,2f\n\t" \ + "move %1,%4\n\t" \ + "sc %1,%2\n\t" \ "beqz %1,1b\n" \ acq "\n\t" \ ".set pop\n" \ "2:\n\t" \ - : "=&r" (__prev), "=&r" (__cmp) \ + : "=&r" (__prev), "=&r" (__cmp), "=m" (*mem) \ : "r" (oldval), "r" (newval), "m" (*mem) \ : "memory") @@ -93,16 +93,16 @@ typedef uintmax_t uatomic_max_t; MIPS_PUSH_MIPS2 \ rel "\n" \ "1:\t" \ - "lld %0,%4\n\t" \ + "lld %0,%5\n\t" \ "move %1,$0\n\t" \ - "bne %0,%2,2f\n\t" \ - "move %1,%3\n\t" \ - "scd %1,%4\n\t" \ + "bne %0,%3,2f\n\t" \ + "move %1,%4\n\t" \ + "scd %1,%2\n\t" \ "beqz %1,1b\n" \ acq "\n\t" \ ".set pop\n" \ "2:\n\t" \ - : "=&r" (__prev), "=&r" (__cmp) \ + : "=&r" (__prev), "=&r" (__cmp), "=m" (*mem) \ : "r" (oldval), "r" (newval), "m" (*mem) \ : "memory") #endif @@ -189,14 +189,14 @@ typedef uintmax_t uatomic_max_t; MIPS_PUSH_MIPS2 \ rel "\n" \ "1:\t" \ - "ll %0,%3\n\t" \ - "move %1,%2\n\t" \ - "sc %1,%3\n\t" \ + "ll %0,%4\n\t" \ + "move %1,%3\n\t" \ + "sc %1,%2\n\t" \ "beqz %1,1b\n" \ acq "\n\t" \ ".set pop\n" \ "2:\n\t" \ - : "=&r" (__prev), "=&r" (__cmp) \ + : "=&r" (__prev), "=&r" (__cmp), "=m" (*mem) \ : "r" (newval), "m" (*mem) \ : "memory"); \ __prev; }) @@ -213,14 +213,14 @@ typedef uintmax_t uatomic_max_t; MIPS_PUSH_MIPS2 \ rel "\n" \ "1:\n" \ - "lld %0,%3\n\t" \ - "move %1,%2\n\t" \ - "scd %1,%3\n\t" \ + "lld %0,%4\n\t" \ + "move %1,%3\n\t" \ + "scd %1,%2\n\t" \ "beqz %1,1b\n" \ acq "\n\t" \ ".set pop\n" \ "2:\n\t" \ - : "=&r" (__prev), "=&r" (__cmp) \ + : "=&r" (__prev), "=&r" (__cmp), "=m" (*mem) \ : "r" (newval), "m" (*mem) \ : "memory"); \ __prev; }) @@ -248,14 +248,14 @@ typedef uintmax_t uatomic_max_t; MIPS_PUSH_MIPS2 \ rel "\n" \ "1:\t" \ - "ll %0,%3\n\t" \ - "addu %1,%0,%2\n\t" \ - "sc %1,%3\n\t" \ + "ll %0,%4\n\t" \ + "addu %1,%0,%3\n\t" \ + "sc %1,%2\n\t" \ "beqz %1,1b\n" \ acq "\n\t" \ ".set pop\n" \ "2:\n\t" \ - : "=&r" (__prev), "=&r" (__cmp) \ + : "=&r" (__prev), "=&r" (__cmp), "=m" (*mem) \ : "r" (value), "m" (*mem) \ : "memory"); \ __prev; }) @@ -272,14 +272,14 @@ typedef uintmax_t uatomic_max_t; MIPS_PUSH_MIPS2 \ rel "\n" \ "1:\t" \ - "lld %0,%3\n\t" \ - "daddu %1,%0,%2\n\t" \ - "scd %1,%3\n\t" \ + "lld %0,%4\n\t" \ + "daddu %1,%0,%3\n\t" \ + "scd %1,%2\n\t" \ "beqz %1,1b\n" \ acq "\n\t" \ ".set pop\n" \ "2:\n\t" \ - : "=&r" (__prev), "=&r" (__cmp) \ + : "=&r" (__prev), "=&r" (__cmp), "=m" (*mem) \ : "r" (value), "m" (*mem) \ : "memory"); \ __prev; }) From 0b37400ae41a175fa7f89bdf5411ff5d297e5ae4 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Tue, 23 Mar 2010 15:19:04 +0000 Subject: [PATCH 3973/4487] Create bits/socket.h for alpha, correct SOCK_CLOEXEC and SOCK_NONBLOCK values. --- ChangeLog.alpha | 5 + sysdeps/unix/sysv/linux/alpha/bits/socket.h | 407 ++++++++++++++++++++ 2 files changed, 412 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/socket.h diff --git a/ChangeLog.alpha b/ChangeLog.alpha index e41c202887..4cf27f4204 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,8 @@ +2010-03-23 Matt Turner + Aurelien Jarno + + * sysdeps/unix/sysv/linux/alpha/bits/socket.h: New file. + 2010-01-12 Matt Turner * sysdeps/unix/sysv/linux/alpha/bits/stat.h: Fix double-inclusion diff --git a/sysdeps/unix/sysv/linux/alpha/bits/socket.h b/sysdeps/unix/sysv/linux/alpha/bits/socket.h new file mode 100644 index 0000000000..52a22c3e29 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/bits/socket.h @@ -0,0 +1,407 @@ +/* System-specific socket constants and types. Linux version. + Copyright (C) 1991, 1992, 1994-2001, 2004, 2006, 2007, 2008, 2009 + 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_SOCKET_H +#define __BITS_SOCKET_H + +#ifndef _SYS_SOCKET_H +# error "Never include directly; use instead." +#endif + +#define __need_size_t +#include + +#include + +/* Type for length arguments in socket calls. */ +#ifndef __socklen_t_defined +typedef __socklen_t socklen_t; +# define __socklen_t_defined +#endif + +/* Types of sockets. */ +enum __socket_type +{ + SOCK_STREAM = 1, /* Sequenced, reliable, connection-based + byte streams. */ +#define SOCK_STREAM SOCK_STREAM + SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams + of fixed maximum length. */ +#define SOCK_DGRAM SOCK_DGRAM + SOCK_RAW = 3, /* Raw protocol interface. */ +#define SOCK_RAW SOCK_RAW + SOCK_RDM = 4, /* Reliably-delivered messages. */ +#define SOCK_RDM SOCK_RDM + SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, + datagrams of fixed maximum length. */ +#define SOCK_SEQPACKET SOCK_SEQPACKET + SOCK_DCCP = 6, /* Datagram Congestion Control Protocol. */ +#define SOCK_DCCP SOCK_DCCP + SOCK_PACKET = 10, /* Linux specific way of getting packets + at the dev level. For writing rarp and + other similar things on the user level. */ +#define SOCK_PACKET SOCK_PACKET + + /* Flags to be ORed into the type parameter of socket and socketpair and + used for the flags parameter of paccept. */ + + SOCK_CLOEXEC = 010000000, /* Atomically set close-on-exec flag for the + new descriptor(s). */ +#define SOCK_CLOEXEC SOCK_CLOEXEC +#undef SOCK_NONBLOCK + SOCK_NONBLOCK = 0x40000000 /* Atomically mark descriptor(s) as + non-blocking. */ +#define SOCK_NONBLOCK SOCK_NONBLOCK +}; + +/* Protocol families. */ +#define PF_UNSPEC 0 /* Unspecified. */ +#define PF_LOCAL 1 /* Local to host (pipes and file-domain). */ +#define PF_UNIX PF_LOCAL /* POSIX name for PF_LOCAL. */ +#define PF_FILE PF_LOCAL /* Another non-standard name for PF_LOCAL. */ +#define PF_INET 2 /* IP protocol family. */ +#define PF_AX25 3 /* Amateur Radio AX.25. */ +#define PF_IPX 4 /* Novell Internet Protocol. */ +#define PF_APPLETALK 5 /* Appletalk DDP. */ +#define PF_NETROM 6 /* Amateur radio NetROM. */ +#define PF_BRIDGE 7 /* Multiprotocol bridge. */ +#define PF_ATMPVC 8 /* ATM PVCs. */ +#define PF_X25 9 /* Reserved for X.25 project. */ +#define PF_INET6 10 /* IP version 6. */ +#define PF_ROSE 11 /* Amateur Radio X.25 PLP. */ +#define PF_DECnet 12 /* Reserved for DECnet project. */ +#define PF_NETBEUI 13 /* Reserved for 802.2LLC project. */ +#define PF_SECURITY 14 /* Security callback pseudo AF. */ +#define PF_KEY 15 /* PF_KEY key management API. */ +#define PF_NETLINK 16 +#define PF_ROUTE PF_NETLINK /* Alias to emulate 4.4BSD. */ +#define PF_PACKET 17 /* Packet family. */ +#define PF_ASH 18 /* Ash. */ +#define PF_ECONET 19 /* Acorn Econet. */ +#define PF_ATMSVC 20 /* ATM SVCs. */ +#define PF_RDS 21 /* RDS sockets. */ +#define PF_SNA 22 /* Linux SNA Project */ +#define PF_IRDA 23 /* IRDA sockets. */ +#define PF_PPPOX 24 /* PPPoX sockets. */ +#define PF_WANPIPE 25 /* Wanpipe API sockets. */ +#define PF_LLC 26 /* Linux LLC. */ +#define PF_CAN 29 /* Controller Area Network. */ +#define PF_TIPC 30 /* TIPC sockets. */ +#define PF_BLUETOOTH 31 /* Bluetooth sockets. */ +#define PF_IUCV 32 /* IUCV sockets. */ +#define PF_RXRPC 33 /* RxRPC sockets. */ +#define PF_ISDN 34 /* mISDN sockets. */ +#define PF_PHONET 35 /* Phonet sockets. */ +#define PF_IEEE802154 36 /* IEEE 802.15.4 sockets. */ +#define PF_MAX 37 /* For now.. */ + +/* Address families. */ +#define AF_UNSPEC PF_UNSPEC +#define AF_LOCAL PF_LOCAL +#define AF_UNIX PF_UNIX +#define AF_FILE PF_FILE +#define AF_INET PF_INET +#define AF_AX25 PF_AX25 +#define AF_IPX PF_IPX +#define AF_APPLETALK PF_APPLETALK +#define AF_NETROM PF_NETROM +#define AF_BRIDGE PF_BRIDGE +#define AF_ATMPVC PF_ATMPVC +#define AF_X25 PF_X25 +#define AF_INET6 PF_INET6 +#define AF_ROSE PF_ROSE +#define AF_DECnet PF_DECnet +#define AF_NETBEUI PF_NETBEUI +#define AF_SECURITY PF_SECURITY +#define AF_KEY PF_KEY +#define AF_NETLINK PF_NETLINK +#define AF_ROUTE PF_ROUTE +#define AF_PACKET PF_PACKET +#define AF_ASH PF_ASH +#define AF_ECONET PF_ECONET +#define AF_ATMSVC PF_ATMSVC +#define AF_RDS PF_RDS +#define AF_SNA PF_SNA +#define AF_IRDA PF_IRDA +#define AF_PPPOX PF_PPPOX +#define AF_WANPIPE PF_WANPIPE +#define AF_LLC PF_LLC +#define AF_CAN PF_CAN +#define AF_TIPC PF_TIPC +#define AF_BLUETOOTH PF_BLUETOOTH +#define AF_IUCV PF_IUCV +#define AF_RXRPC PF_RXRPC +#define AF_ISDN PF_ISDN +#define AF_PHONET PF_PHONET +#define AF_IEEE802154 PF_IEEE802154 +#define AF_MAX PF_MAX + +/* Socket level values. Others are defined in the appropriate headers. + + XXX These definitions also should go into the appropriate headers as + far as they are available. */ +#define SOL_RAW 255 +#define SOL_DECNET 261 +#define SOL_X25 262 +#define SOL_PACKET 263 +#define SOL_ATM 264 /* ATM layer (cell level). */ +#define SOL_AAL 265 /* ATM Adaption Layer (packet level). */ +#define SOL_IRDA 266 + +/* Maximum queue length specifiable by listen. */ +#define SOMAXCONN 128 + +/* Get the definition of the macro to define the common sockaddr members. */ +#include + +/* Structure describing a generic socket address. */ +struct sockaddr + { + __SOCKADDR_COMMON (sa_); /* Common data: address family and length. */ + char sa_data[14]; /* Address data. */ + }; + + +/* Structure large enough to hold any socket address (with the historical + exception of AF_UNIX). We reserve 128 bytes. */ +#define __ss_aligntype unsigned long int +#define _SS_SIZE 128 +#define _SS_PADSIZE (_SS_SIZE - (2 * sizeof (__ss_aligntype))) + +struct sockaddr_storage + { + __SOCKADDR_COMMON (ss_); /* Address family, etc. */ + __ss_aligntype __ss_align; /* Force desired alignment. */ + char __ss_padding[_SS_PADSIZE]; + }; + + +/* Bits in the FLAGS argument to `send', `recv', et al. */ +enum + { + MSG_OOB = 0x01, /* Process out-of-band data. */ +#define MSG_OOB MSG_OOB + MSG_PEEK = 0x02, /* Peek at incoming messages. */ +#define MSG_PEEK MSG_PEEK + MSG_DONTROUTE = 0x04, /* Don't use local routing. */ +#define MSG_DONTROUTE MSG_DONTROUTE +#ifdef __USE_GNU + /* DECnet uses a different name. */ + MSG_TRYHARD = MSG_DONTROUTE, +# define MSG_TRYHARD MSG_DONTROUTE +#endif + MSG_CTRUNC = 0x08, /* Control data lost before delivery. */ +#define MSG_CTRUNC MSG_CTRUNC + MSG_PROXY = 0x10, /* Supply or ask second address. */ +#define MSG_PROXY MSG_PROXY + MSG_TRUNC = 0x20, +#define MSG_TRUNC MSG_TRUNC + MSG_DONTWAIT = 0x40, /* Nonblocking IO. */ +#define MSG_DONTWAIT MSG_DONTWAIT + MSG_EOR = 0x80, /* End of record. */ +#define MSG_EOR MSG_EOR + MSG_WAITALL = 0x100, /* Wait for a full request. */ +#define MSG_WAITALL MSG_WAITALL + MSG_FIN = 0x200, +#define MSG_FIN MSG_FIN + MSG_SYN = 0x400, +#define MSG_SYN MSG_SYN + MSG_CONFIRM = 0x800, /* Confirm path validity. */ +#define MSG_CONFIRM MSG_CONFIRM + MSG_RST = 0x1000, +#define MSG_RST MSG_RST + MSG_ERRQUEUE = 0x2000, /* Fetch message from error queue. */ +#define MSG_ERRQUEUE MSG_ERRQUEUE + MSG_NOSIGNAL = 0x4000, /* Do not generate SIGPIPE. */ +#define MSG_NOSIGNAL MSG_NOSIGNAL + MSG_MORE = 0x8000, /* Sender will send more. */ +#define MSG_MORE MSG_MORE + + MSG_CMSG_CLOEXEC = 0x40000000 /* Set close_on_exit for file + descriptor received through + SCM_RIGHTS. */ +#define MSG_CMSG_CLOEXEC MSG_CMSG_CLOEXEC + }; + + +/* Structure describing messages sent by + `sendmsg' and received by `recvmsg'. */ +struct msghdr + { + void *msg_name; /* Address to send to/receive from. */ + socklen_t msg_namelen; /* Length of address data. */ + + struct iovec *msg_iov; /* Vector of data to send/receive into. */ + size_t msg_iovlen; /* Number of elements in the vector. */ + + void *msg_control; /* Ancillary data (eg BSD filedesc passing). */ + size_t msg_controllen; /* Ancillary data buffer length. + !! The type should be socklen_t but the + definition of the kernel is incompatible + with this. */ + + int msg_flags; /* Flags on received message. */ + }; + +/* Structure used for storage of ancillary data object information. */ +struct cmsghdr + { + size_t cmsg_len; /* Length of data in cmsg_data plus length + of cmsghdr structure. + !! The type should be socklen_t but the + definition of the kernel is incompatible + with this. */ + int cmsg_level; /* Originating protocol. */ + int cmsg_type; /* Protocol specific type. */ +#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L + __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */ +#endif + }; + +/* Ancillary data object manipulation macros. */ +#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L +# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data) +#else +# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1)) +#endif +#define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg) +#define CMSG_FIRSTHDR(mhdr) \ + ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \ + ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) 0) +#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \ + & (size_t) ~(sizeof (size_t) - 1)) +#define CMSG_SPACE(len) (CMSG_ALIGN (len) \ + + CMSG_ALIGN (sizeof (struct cmsghdr))) +#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len)) + +extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr, + struct cmsghdr *__cmsg) __THROW; +#ifdef __USE_EXTERN_INLINES +# ifndef _EXTERN_INLINE +# define _EXTERN_INLINE __extern_inline +# endif +_EXTERN_INLINE struct cmsghdr * +__NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg)) +{ + if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr)) + /* The kernel header does this so there may be a reason. */ + return 0; + + __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg + + CMSG_ALIGN (__cmsg->cmsg_len)); + if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control + + __mhdr->msg_controllen) + || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len) + > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen))) + /* No more entries. */ + return 0; + return __cmsg; +} +#endif /* Use `extern inline'. */ + +/* Socket level message types. This must match the definitions in + . */ +enum + { + SCM_RIGHTS = 0x01 /* Transfer file descriptors. */ +#define SCM_RIGHTS SCM_RIGHTS +#ifdef __USE_GNU + , SCM_CREDENTIALS = 0x02 /* Credentials passing. */ +# define SCM_CREDENTIALS SCM_CREDENTIALS +#endif + }; + +#ifdef __USE_GNU +/* User visible structure for SCM_CREDENTIALS message */ +struct ucred +{ + pid_t pid; /* PID of sending process. */ + uid_t uid; /* UID of sending process. */ + gid_t gid; /* GID of sending process. */ +}; +#endif + +/* Ugly workaround for unclean kernel headers. */ +#if !defined __USE_MISC && !defined __USE_GNU +# ifndef FIOGETOWN +# define __SYS_SOCKET_H_undef_FIOGETOWN +# endif +# ifndef FIOSETOWN +# define __SYS_SOCKET_H_undef_FIOSETOWN +# endif +# ifndef SIOCATMARK +# define __SYS_SOCKET_H_undef_SIOCATMARK +# endif +# ifndef SIOCGPGRP +# define __SYS_SOCKET_H_undef_SIOCGPGRP +# endif +# ifndef SIOCGSTAMP +# define __SYS_SOCKET_H_undef_SIOCGSTAMP +# endif +# ifndef SIOCGSTAMPNS +# define __SYS_SOCKET_H_undef_SIOCGSTAMPNS +# endif +# ifndef SIOCSPGRP +# define __SYS_SOCKET_H_undef_SIOCSPGRP +# endif +#endif + +/* Get socket manipulation related informations from kernel headers. */ +#include + +#if !defined __USE_MISC && !defined __USE_GNU +# ifdef __SYS_SOCKET_H_undef_FIOGETOWN +# undef __SYS_SOCKET_H_undef_FIOGETOWN +# undef FIOGETOWN +# endif +# ifdef __SYS_SOCKET_H_undef_FIOSETOWN +# undef __SYS_SOCKET_H_undef_FIOSETOWN +# undef FIOSETOWN +# endif +# ifdef __SYS_SOCKET_H_undef_SIOCATMARK +# undef __SYS_SOCKET_H_undef_SIOCATMARK +# undef SIOCATMARK +# endif +# ifdef __SYS_SOCKET_H_undef_SIOCGPGRP +# undef __SYS_SOCKET_H_undef_SIOCGPGRP +# undef SIOCGPGRP +# endif +# ifdef __SYS_SOCKET_H_undef_SIOCGSTAMP +# undef __SYS_SOCKET_H_undef_SIOCGSTAMP +# undef SIOCGSTAMP +# endif +# ifdef __SYS_SOCKET_H_undef_SIOCGSTAMPNS +# undef __SYS_SOCKET_H_undef_SIOCGSTAMPNS +# undef SIOCGSTAMPNS +# endif +# ifdef __SYS_SOCKET_H_undef_SIOCSPGRP +# undef __SYS_SOCKET_H_undef_SIOCSPGRP +# undef SIOCSPGRP +# endif +#endif + +/* Structure used to manipulate the SO_LINGER option. */ +struct linger + { + int l_onoff; /* Nonzero to linger on close. */ + int l_linger; /* Time to linger. */ + }; + +#endif /* bits/socket.h */ From b6c131119cff4a2a11f1766132f306464d9457da Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 23 Mar 2010 15:25:31 +0000 Subject: [PATCH 3974/4487] Really commit intended version of Alpha bits/socket.h. --- sysdeps/unix/sysv/linux/alpha/bits/socket.h | 30 ++++++++++++++++++--- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/socket.h b/sysdeps/unix/sysv/linux/alpha/bits/socket.h index 52a22c3e29..dedf8bc8be 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/socket.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/socket.h @@ -1,5 +1,5 @@ /* System-specific socket constants and types. Linux version. - Copyright (C) 1991, 1992, 1994-2001, 2004, 2006, 2007, 2008, 2009 + Copyright (C) 1991, 1992, 1994-2001, 2004, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -65,7 +65,6 @@ enum __socket_type SOCK_CLOEXEC = 010000000, /* Atomically set close-on-exec flag for the new descriptor(s). */ #define SOCK_CLOEXEC SOCK_CLOEXEC -#undef SOCK_NONBLOCK SOCK_NONBLOCK = 0x40000000 /* Atomically mark descriptor(s) as non-blocking. */ #define SOCK_NONBLOCK SOCK_NONBLOCK @@ -235,8 +234,8 @@ enum #define MSG_MORE MSG_MORE MSG_CMSG_CLOEXEC = 0x40000000 /* Set close_on_exit for file - descriptor received through - SCM_RIGHTS. */ + descriptor received through + SCM_RIGHTS. */ #define MSG_CMSG_CLOEXEC MSG_CMSG_CLOEXEC }; @@ -260,6 +259,15 @@ struct msghdr int msg_flags; /* Flags on received message. */ }; +#ifdef __USE_GNU +/* For `recvmmsg'. */ +struct mmsghdr + { + struct msghdr msg_hdr; /* Actual message header. */ + unsigned int msg_len; /* Number of received bytes for the entry. */ + }; +#endif + /* Structure used for storage of ancillary data object information. */ struct cmsghdr { @@ -404,4 +412,18 @@ struct linger int l_linger; /* Time to linger. */ }; + +__BEGIN_DECLS + +/* Receive a message as described by MESSAGE from socket FD. + Returns the number of bytes read or -1 for errors. + + This function is a cancellation point and therefore not marked with + __THROW. */ +extern int recvmmsg (int __fd, struct mmsghdr *__vmessages, + unsigned int __vlen, int __flags, + __const struct timespec *__tmo); + +__END_DECLS + #endif /* bits/socket.h */ From cca1fbbc2f53c8e515c76a2d61d1d5d826ae00d0 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 24 Mar 2010 18:05:37 +0000 Subject: [PATCH 3975/4487] Update MIPS dl-lookup.c from generic version. --- ChangeLog.mips | 4 +++ sysdeps/mips/dl-lookup.c | 54 ++++++++++++++++++++++++++++++++++++++-- 2 files changed, 56 insertions(+), 2 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 2edc425760..272b2f30c6 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,7 @@ +2010-03-24 Joseph Myers + + * sysdeps/mips/dl-lookup.c: Update from generic version. + 2010-03-23 Mischa Jonker [BZ #11291] diff --git a/sysdeps/mips/dl-lookup.c b/sysdeps/mips/dl-lookup.c index a9fff598a8..4090efeac1 100644 --- a/sysdeps/mips/dl-lookup.c +++ b/sysdeps/mips/dl-lookup.c @@ -1,6 +1,7 @@ /* Look up a symbol in the loaded objects. MIPS/Linux version - special handling of non-PIC undefined symbol rules. - Copyright (C) 1995-2005, 2006, 2007, 2009 Free Software Foundation, Inc. + Copyright (C) 1995-2005, 2006, 2007, 2009, 2010 + 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 @@ -431,6 +432,20 @@ do_lookup_x (const char *undef_name, uint_fast32_t new_hash, assert (!RTLD_CHECK_FOREIGN_CALL); #endif +#ifdef SHARED + /* If tab->entries is NULL, but tab->size is not, it means + this is the second, conflict finding, lookup for + LD_TRACE_PRELINKING in _dl_debug_bindings. Don't + allocate anything and don't enter anything into the + hash table. */ + if (__builtin_expect (tab->size, 0)) + { + assert (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK); + __rtld_lock_unlock_recursive (tab->lock); + goto success; + } +#endif + #define INITIAL_NUNIQUE_SYM_TABLE 31 size = INITIAL_NUNIQUE_SYM_TABLE; entries = calloc (sizeof (struct unique_sym), size); @@ -934,13 +949,48 @@ _dl_debug_bindings (const char *undef_name, struct link_map *undef_map, { const uint_fast32_t new_hash = dl_new_hash (undef_name); unsigned long int old_hash = 0xffffffff; + struct unique_sym *saved_entries + = GL(dl_ns)[LM_ID_BASE]._ns_unique_sym_table.entries; + GL(dl_ns)[LM_ID_BASE]._ns_unique_sym_table.entries = NULL; do_lookup_x (undef_name, new_hash, &old_hash, *ref, &val, undef_map->l_local_scope[0], 0, version, 0, NULL, type_class, undef_map); - if (val.s != value->s || val.m != value->m) conflict = 1; + else if (__builtin_expect (undef_map->l_symbolic_in_local_scope, 0) + && val.s + && __builtin_expect (ELFW(ST_BIND) (val.s->st_info), + STB_GLOBAL) == STB_GNU_UNIQUE) + { + /* If it is STB_GNU_UNIQUE and undef_map's l_local_scope + contains any DT_SYMBOLIC libraries, unfortunately there + can be conflicts even if the above is equal. As symbol + resolution goes from the last library to the first and + if a STB_GNU_UNIQUE symbol is found in some late DT_SYMBOLIC + library, it would be the one that is looked up. */ + struct sym_val val2 = { NULL, NULL }; + size_t n; + struct r_scope_elem *scope = undef_map->l_local_scope[0]; + + for (n = 0; n < scope->r_nlist; n++) + if (scope->r_list[n] == val.m) + break; + + for (n++; n < scope->r_nlist; n++) + if (scope->r_list[n]->l_info[DT_SYMBOLIC] != NULL + && do_lookup_x (undef_name, new_hash, &old_hash, *ref, + &val2, + &scope->r_list[n]->l_symbolic_searchlist, + 0, version, 0, NULL, type_class, + undef_map) > 0) + { + conflict = 1; + val = val2; + break; + } + } + GL(dl_ns)[LM_ID_BASE]._ns_unique_sym_table.entries = saved_entries; } if (value->s) From 01b32e7361d68ade13d88f7245af778bb3ba02fd Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Fri, 26 Mar 2010 18:12:56 +0000 Subject: [PATCH 3976/4487] Add CFI statements to ARM's assembly code. --- ChangeLog.arm | 50 ++++++ sysdeps/arm/configure | 33 ++++ sysdeps/arm/configure.in | 20 +++ sysdeps/arm/dl-trampoline.S | 4 +- sysdeps/arm/eabi/__longjmp.S | 16 +- sysdeps/arm/eabi/arm-mcount.S | 28 +++- sysdeps/arm/memcpy.S | 32 ++++ sysdeps/arm/memmove.S | 34 ++++ sysdeps/arm/sysdep.h | 17 +- sysdeps/unix/arm/sysdep.S | 7 +- sysdeps/unix/sysv/linux/arm/clone.S | 10 +- .../sysv/linux/arm/eabi/____longjmp_chk.S | 10 +- sysdeps/unix/sysv/linux/arm/eabi/mmap64.S | 15 +- .../sysv/linux/arm/eabi/nptl/sysdep-cancel.h | 155 ++++++++++++++---- .../linux/arm/eabi/nptl/unwind-forcedunwind.c | 17 +- .../sysv/linux/arm/eabi/nptl/unwind-resume.c | 17 +- .../unix/sysv/linux/arm/eabi/sigrestorer.S | 59 ++++++- sysdeps/unix/sysv/linux/arm/eabi/syscall.S | 12 +- sysdeps/unix/sysv/linux/arm/eabi/sysdep.h | 7 +- sysdeps/unix/sysv/linux/arm/mmap.S | 14 +- sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S | 6 +- sysdeps/unix/sysv/linux/arm/nptl/vfork.S | 6 +- sysdeps/unix/sysv/linux/arm/sysdep.h | 64 ++++++-- 23 files changed, 561 insertions(+), 72 deletions(-) create mode 100644 sysdeps/arm/configure create mode 100644 sysdeps/arm/configure.in diff --git a/ChangeLog.arm b/ChangeLog.arm index fbd173ea84..aa8f2d777b 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,53 @@ +2010-03-26 Thomas Schwinge + + * sysdeps/arm/configure.in: New file. + * sysdeps/arm/configure: Generate. + * sysdeps/arm/sysdep.h (ENTRY, END): Add CFI statements. + * sysdeps/unix/arm/sysdep.S (__syscall_error): Likewise. + * sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h + (PSEUDO, DOCARGS_0, RESTORE_LR_0, DOCARGS_1, UNDOCARGS_1, DOCARGS_2) + (UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3, DOCARGS_4, UNDOCARGS_4) + (DOCARGS_5, UNDOCARGS_5, RESTORE_LR_5, DOCARGS_6, UNDOCARGS_6): + Likewise. + [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise. + * sysdeps/unix/sysv/linux/arm/eabi/sysdep.h (DO_CALL): Likewise. + * sysdeps/unix/sysv/linux/arm/sysdep.h + (POP_PC, SYSCALL_ERROR_HANDLER (__local_syscall_error)) + (DOARGS_5, UNDOARGS_5, DOARGS_6, UNDOARGS_6, DOARGS_7, UNDOARGS_7): + Likewise. + * sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S + (__default_sa_restorer_v1, __default_sa_restorer_v2) + (__default_rt_sa_restorer_v1, __default_rt_sa_restorer_v2): Add END + statements. + * sysdeps/unix/sysv/linux/arm/eabi/syscall.S (syscall): Add CFI + statements. + * sysdeps/arm/memcpy.S (memcpy): Add CFI statements. + * sysdeps/arm/memmove.S (memmove): Likewise. + * sysdeps/unix/sysv/linux/arm/eabi/mmap64.S (__mmap64): Add CFI + statements. + * sysdeps/unix/sysv/linux/arm/mmap.S (__mmap): Likewise. + * sysdeps/arm/eabi/arm-mcount.S (__gnu_mcount_nc, _mcount): Add CFI + statements. + * sysdeps/arm/sysdep.h (CALL_MCOUNT): Likewise. + * sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c + (_Unwind_Resume): Add CFI statements. + * sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c + (_Unwind_Resume): Likewise. + * sysdeps/arm/dl-trampoline.S (_dl_runtime_resolve) + (_dl_runtime_profile) : Only emit .debug_frame. + * sysdeps/arm/eabi/__longjmp.S (__longjmp): Add CFI statements. + * sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S (CALL_FAIL) + (CHECK_SP): Likewise + * sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S (SAVE_PID): Add CFI + statements. + * sysdeps/unix/sysv/linux/arm/nptl/vfork.S (SAVE_PID): Likewise. + * sysdeps/unix/sysv/linux/arm/clone.S (__clone): Add CFI statements. + * sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S (cfi_startproc): + Redefine for signal frames. + (__default_sa_restorer_v1, __default_sa_restorer_v2) + (__default_rt_sa_restorer_v1, __default_rt_sa_restorer_v2): Add CFI + statements. + 2010-02-10 Joseph Myers * sysdeps/arm/eabi/fegetenv.c, sysdeps/arm/fpu/fegetenv.c: Add diff --git a/sysdeps/arm/configure b/sysdeps/arm/configure new file mode 100644 index 0000000000..066a8b69c5 --- /dev/null +++ b/sysdeps/arm/configure @@ -0,0 +1,33 @@ +# This file is generated from configure.in by Autoconf. DO NOT EDIT! + # Local configure fragment for sysdeps/arm. + +{ $as_echo "$as_me:$LINENO: checking whether the CFI directive .cfi_sections is supported" >&5 +$as_echo_n "checking whether the CFI directive .cfi_sections is supported... " >&6; } +if test "${libc_cv_asm_cfi_directive_sections+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat > conftest.s <&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + libc_cv_asm_cfi_directive_sections=yes + else + libc_cv_asm_cfi_directive_sections=no + fi + rm -f conftest* +fi +{ $as_echo "$as_me:$LINENO: result: $libc_cv_asm_cfi_directive_sections" >&5 +$as_echo "$libc_cv_asm_cfi_directive_sections" >&6; } +if test $libc_cv_asm_cfi_directive_sections != yes; then + { { $as_echo "$as_me:$LINENO: error: need .cfi_sections in this configuration" >&5 +$as_echo "$as_me: error: need .cfi_sections in this configuration" >&2;} + { (exit 1); exit 1; }; } +fi diff --git a/sysdeps/arm/configure.in b/sysdeps/arm/configure.in new file mode 100644 index 0000000000..9f4ff3b738 --- /dev/null +++ b/sysdeps/arm/configure.in @@ -0,0 +1,20 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/arm. + +AC_CACHE_CHECK([whether the CFI directive .cfi_sections is supported], + [libc_cv_asm_cfi_directive_sections], + [cat > conftest.s <&AS_MESSAGE_LOG_FD); then + libc_cv_asm_cfi_directive_sections=yes + else + libc_cv_asm_cfi_directive_sections=no + fi + rm -f conftest*]) +if test $libc_cv_asm_cfi_directive_sections != yes; then + AC_MSG_ERROR([need .cfi_sections in this configuration]) +fi diff --git a/sysdeps/arm/dl-trampoline.S b/sysdeps/arm/dl-trampoline.S index 0224fa1d1c..de8d891821 100644 --- a/sysdeps/arm/dl-trampoline.S +++ b/sysdeps/arm/dl-trampoline.S @@ -1,5 +1,5 @@ /* PLT trampolines. ARM version. - Copyright (C) 2005 Free Software Foundation, Inc. + Copyright (C) 2005, 2010 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 @@ -29,6 +29,7 @@ .text .globl _dl_runtime_resolve .type _dl_runtime_resolve, #function + .cfi_sections .debug_frame cfi_startproc .align 2 _dl_runtime_resolve: @@ -77,6 +78,7 @@ _dl_runtime_resolve: #ifndef PROF .globl _dl_runtime_profile .type _dl_runtime_profile, #function + .cfi_sections .debug_frame cfi_startproc .align 2 _dl_runtime_profile: diff --git a/sysdeps/arm/eabi/__longjmp.S b/sysdeps/arm/eabi/__longjmp.S index 305919393d..edabdad4a2 100644 --- a/sysdeps/arm/eabi/__longjmp.S +++ b/sysdeps/arm/eabi/__longjmp.S @@ -1,5 +1,6 @@ /* longjmp for ARM. - Copyright (C) 1997, 1998, 2005, 2006, 2009 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 2005, 2006, 2009, 2010 + 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 @@ -31,10 +32,21 @@ ENTRY (__longjmp) moveq r0, #1 /* can't let setjmp() return zero! */ #ifdef CHECK_SP - ldr r4, [ip, #32] + ldr r4, [ip, #32] /* jmpbuf's sp */ + cfi_undefined (r4) CHECK_SP (r4) #endif LOADREGS(ia, ip!, {v1-v6, sl, fp, sp, lr}) + cfi_restore (v1) + cfi_restore (v2) + cfi_restore (v3) + cfi_restore (v4) + cfi_restore (v5) + cfi_restore (v6) + cfi_restore (sl) + cfi_restore (fp) + cfi_restore (sp) + cfi_restore (lr) #ifdef IS_IN_rtld ldr a2, 1f diff --git a/sysdeps/arm/eabi/arm-mcount.S b/sysdeps/arm/eabi/arm-mcount.S index 2aa50b70e7..06e5f182d8 100644 --- a/sysdeps/arm/eabi/arm-mcount.S +++ b/sysdeps/arm/eabi/arm-mcount.S @@ -1,5 +1,5 @@ /* Implementation of profiling support. ARM EABI version. - Copyright (C) 2008, 2009 Free Software Foundation, Inc. + Copyright (C) 2008, 2009, 2010 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 @@ -46,10 +46,22 @@ func: ENTRY(__gnu_mcount_nc) push {r0, r1, r2, r3, lr} + cfi_adjust_cfa_offset (20) + cfi_rel_offset (r0, 0) + cfi_rel_offset (r1, 4) + cfi_rel_offset (r2, 8) + cfi_rel_offset (r3, 12) + cfi_rel_offset (lr, 16) bic r1, lr, #1 ldr r0, [sp, #20] bl __mcount_internal pop {r0, r1, r2, r3, ip, lr} + cfi_adjust_cfa_offset (-24) + cfi_restore (r0) + cfi_restore (r1) + cfi_restore (r2) + cfi_restore (r3) + cfi_register (lr, ip) bx ip END(__gnu_mcount_nc) @@ -59,6 +71,13 @@ END(__gnu_mcount_nc) ENTRY(_mcount) stmdb sp!, {r0, r1, r2, r3, fp, lr} + cfi_adjust_cfa_offset (24) + cfi_rel_offset (r0, 0) + cfi_rel_offset (r1, 4) + cfi_rel_offset (r2, 8) + cfi_rel_offset (r3, 12) + cfi_rel_offset (fp, 16) + cfi_rel_offset (lr, 20) #ifdef __thumb2__ movs r0, fp ittt ne @@ -73,6 +92,13 @@ ENTRY(_mcount) ldmia sp!, {r0, r1, r2, r3, fp, pc} #else ldmia sp!, {r0, r1, r2, r3, fp, lr} + cfi_adjust_cfa_offset (-24) + cfi_restore (r0) + cfi_restore (r1) + cfi_restore (r2) + cfi_restore (r3) + cfi_restore (fp) + cfi_restore (lr) bx lr #endif END(_mcount) diff --git a/sysdeps/arm/memcpy.S b/sysdeps/arm/memcpy.S index 7f669a6e90..673bf43c48 100644 --- a/sysdeps/arm/memcpy.S +++ b/sysdeps/arm/memcpy.S @@ -58,6 +58,11 @@ ENTRY(memcpy) stmfd sp!, {r0, r4, lr} + cfi_adjust_cfa_offset (12) + cfi_rel_offset (r4, 4) + cfi_rel_offset (lr, 8) + + cfi_remember_state subs r2, r2, #4 blt 8f @@ -69,6 +74,11 @@ ENTRY(memcpy) 1: subs r2, r2, #(28) stmfd sp!, {r5 - r8} + cfi_adjust_cfa_offset (16) + cfi_rel_offset (r5, 0) + cfi_rel_offset (r6, 4) + cfi_rel_offset (r7, 8) + cfi_rel_offset (r8, 12) blt 5f CALGN( ands ip, r1, #31 ) @@ -121,6 +131,11 @@ ENTRY(memcpy) CALGN( bcs 2b ) 7: ldmfd sp!, {r5 - r8} + cfi_adjust_cfa_offset (-16) + cfi_restore (r5) + cfi_restore (r6) + cfi_restore (r7) + cfi_restore (r8) 8: movs r2, r2, lsl #31 ldrneb r3, [r1], #1 @@ -132,11 +147,16 @@ ENTRY(memcpy) #if defined (__ARM_ARCH_4T__) && defined(__THUMB_INTERWORK__) ldmfd sp!, {r0, r4, lr} + cfi_adjust_cfa_offset (-12) + cfi_restore (r4) + cfi_restore (lr) bx lr #else ldmfd sp!, {r0, r4, pc} #endif + cfi_restore_state + 9: rsb ip, ip, #4 cmp ip, #2 ldrgtb r3, [r1], #1 @@ -169,6 +189,12 @@ ENTRY(memcpy) CALGN( bcc 15f ) 11: stmfd sp!, {r5 - r9} + cfi_adjust_cfa_offset (20) + cfi_rel_offset (r5, 0) + cfi_rel_offset (r6, 4) + cfi_rel_offset (r7, 8) + cfi_rel_offset (r8, 12) + cfi_rel_offset (r9, 16) PLD( pld [r1, #0] ) PLD( subs r2, r2, #96 ) @@ -203,6 +229,12 @@ ENTRY(memcpy) PLD( bge 13b ) ldmfd sp!, {r5 - r9} + cfi_adjust_cfa_offset (-20) + cfi_restore (r5) + cfi_restore (r6) + cfi_restore (r7) + cfi_restore (r8) + cfi_restore (r9) 14: ands ip, r2, #28 beq 16f diff --git a/sysdeps/arm/memmove.S b/sysdeps/arm/memmove.S index 9c9b2344d2..026d8e2bd1 100644 --- a/sysdeps/arm/memmove.S +++ b/sysdeps/arm/memmove.S @@ -73,6 +73,12 @@ ENTRY(memmove) #endif stmfd sp!, {r0, r4, lr} + cfi_adjust_cfa_offset (12) + cfi_rel_offset (r4, 4) + cfi_rel_offset (lr, 8) + + cfi_remember_state + add r1, r1, r2 add r0, r0, r2 subs r2, r2, #4 @@ -85,6 +91,11 @@ ENTRY(memmove) 1: subs r2, r2, #(28) stmfd sp!, {r5 - r8} + cfi_adjust_cfa_offset (16) + cfi_rel_offset (r5, 0) + cfi_rel_offset (r6, 4) + cfi_rel_offset (r7, 8) + cfi_rel_offset (r8, 12) blt 5f CALGN( ands ip, r1, #31 ) @@ -136,6 +147,11 @@ ENTRY(memmove) CALGN( bcs 2b ) 7: ldmfd sp!, {r5 - r8} + cfi_adjust_cfa_offset (-16) + cfi_restore (r5) + cfi_restore (r6) + cfi_restore (r7) + cfi_restore (r8) 8: movs r2, r2, lsl #31 ldrneb r3, [r1, #-1]! @@ -144,13 +160,19 @@ ENTRY(memmove) strneb r3, [r0, #-1]! strcsb r4, [r0, #-1]! strcsb ip, [r0, #-1] + #if defined (__ARM_ARCH_4T__) && defined (__THUMB_INTERWORK__) ldmfd sp!, {r0, r4, lr} + cfi_adjust_cfa_offset (-12) + cfi_restore (r4) + cfi_restore (lr) bx lr #else ldmfd sp!, {r0, r4, pc} #endif + cfi_restore_state + 9: cmp ip, #2 ldrgtb r3, [r1, #-1]! ldrgeb r4, [r1, #-1]! @@ -182,6 +204,12 @@ ENTRY(memmove) CALGN( bcc 15f ) 11: stmfd sp!, {r5 - r9} + cfi_adjust_cfa_offset (20) + cfi_rel_offset (r5, 0) + cfi_rel_offset (r6, 4) + cfi_rel_offset (r7, 8) + cfi_rel_offset (r8, 12) + cfi_rel_offset (r9, 16) PLD( pld [r1, #-4] ) PLD( subs r2, r2, #96 ) @@ -216,6 +244,12 @@ ENTRY(memmove) PLD( bge 13b ) ldmfd sp!, {r5 - r9} + cfi_adjust_cfa_offset (-20) + cfi_restore (r5) + cfi_restore (r6) + cfi_restore (r7) + cfi_restore (r8) + cfi_restore (r9) 14: ands ip, r2, #28 beq 16f diff --git a/sysdeps/arm/sysdep.h b/sysdeps/arm/sysdep.h index 442d3a146e..9ffd7df2b5 100644 --- a/sysdeps/arm/sysdep.h +++ b/sysdeps/arm/sysdep.h @@ -1,5 +1,5 @@ /* Assembler macros for ARM. - Copyright (C) 1997, 1998, 2003 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 2003, 2009, 2010 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 @@ -81,18 +81,25 @@ ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),function) \ .align ALIGNARG(4); \ C_LABEL(name) \ + .cfi_sections .debug_frame; \ + cfi_startproc; \ CALL_MCOUNT #undef END #define END(name) \ + cfi_endproc; \ ASM_SIZE_DIRECTIVE(name) /* If compiled for profiling, call `mcount' at the start of each function. */ #ifdef PROF -#define CALL_MCOUNT \ - str lr,[sp, #-4]! ; \ - bl PLTJMP(mcount) ; \ - ldr lr, [sp], #4 ; +#define CALL_MCOUNT \ + str lr,[sp, #-4]!; \ + cfi_adjust_cfa_offset (4); \ + cfi_rel_offset (lr, 0); \ + bl PLTJMP(mcount); \ + ldr lr, [sp], #4; \ + cfi_adjust_cfa_offset (-4); \ + cfi_restore (lr) #else #define CALL_MCOUNT /* Do nothing. */ #endif diff --git a/sysdeps/unix/arm/sysdep.S b/sysdeps/unix/arm/sysdep.S index dcb427e57f..d3ad81b7bd 100644 --- a/sysdeps/unix/arm/sysdep.S +++ b/sysdeps/unix/arm/sysdep.S @@ -1,5 +1,5 @@ /* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2002, 2003, - 2004, 2005 + 2004, 2005, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -44,6 +44,7 @@ syscall_error: #if USE___THREAD mov ip, lr + cfi_register (lr, ip) mov r1, r0 mov r0, #0xffff0fff @@ -66,9 +67,13 @@ syscall_error: 1: .word C_SYMBOL_NAME(rtld_errno) - 0b - 8 #elif defined(_LIBC_REENTRANT) str lr, [sp, #-4]! + cfi_adjust_cfa_offset (4) + cfi_rel_offset (lr, 0) str r0, [sp, #-4]! + cfi_adjust_cfa_offset (4) bl PLTJMP(C_SYMBOL_NAME(__errno_location)) ldr r1, [sp], #4 + cfi_adjust_cfa_offset (-4) str r1, [r0] mvn r0, $0 ldr pc, [sp], #4 diff --git a/sysdeps/unix/sysv/linux/arm/clone.S b/sysdeps/unix/sysv/linux/arm/clone.S index 1a19f5b558..178b0f1efd 100644 --- a/sysdeps/unix/sysv/linux/arm/clone.S +++ b/sysdeps/unix/sysv/linux/arm/clone.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998, 1999, 2002, 2005, 2008, 2009 +/* Copyright (C) 1996, 1997, 1998, 1999, 2002, 2005, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Pat Beirne @@ -52,8 +52,13 @@ ENTRY(__clone) @ new sp is already in r1 #ifdef __ARM_EABI__ stmfd sp!, {r4, r7} + cfi_adjust_cfa_offset (8) + cfi_rel_offset (r4, 0) + cfi_rel_offset (r7, 4) #else str r4, [sp, #-8]! + cfi_adjust_cfa_offset (8) + cfi_rel_offset (r4, 0) #endif ldr r2, [sp, #8] ldr r3, [sp, #12] @@ -64,6 +69,7 @@ ENTRY(__clone) #else swi SYS_ify(clone) #endif + cfi_endproc cmp r0, #0 beq 1f #ifdef __ARM_EABI__ @@ -74,6 +80,8 @@ ENTRY(__clone) blt PLTJMP(C_SYMBOL_NAME(__syscall_error)) RETINSTR(, lr) + cfi_startproc + cfi_undefined (lr) 1: #ifdef RESET_PID tst ip, #CLONE_THREAD diff --git a/sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S b/sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S index f92a382e44..423e7776ea 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S +++ b/sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S @@ -30,6 +30,7 @@ longjmp_msg: #ifdef PIC # define CALL_FAIL \ ldr sl, .L_GOT; \ + cfi_undefined (sl); \ .L_GOT_OFF: \ add sl, pc, sl; \ ldr r0, .Lstr; \ @@ -48,12 +49,17 @@ longjmp_msg: #endif #define CHECK_SP(reg) \ + cfi_remember_state; \ cmp sp, reg; \ bls .Lok; \ mov r5, r0; \ + cfi_undefined (r5); \ mov r7, #SYS_ify(sigaltstack); \ + cfi_undefined (r7); \ mov r0, #0; \ - sub sp, sp, #16; \ + sub sp, sp, #16; /* >= sizeof (stack_t) */ \ + cfi_adjust_cfa_offset (16); \ + cfi_remember_state; \ mov r1, sp; \ swi #0; \ cmp r0, #0; \ @@ -69,8 +75,10 @@ longjmp_msg: bhi .Lok2; \ .Lfail: \ CALL_FAIL \ + cfi_restore_state; \ .Lok2: \ mov r0, r5; \ + cfi_restore_state; \ .Lok: #include <__longjmp.S> diff --git a/sysdeps/unix/sysv/linux/arm/eabi/mmap64.S b/sysdeps/unix/sysv/linux/arm/eabi/mmap64.S index 38fac06c35..59352f71d4 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/mmap64.S +++ b/sysdeps/unix/sysv/linux/arm/eabi/mmap64.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2003, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2003, 2005, 2009 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 @@ -34,8 +34,13 @@ ENTRY (__mmap64) ldr ip, [sp, $LOW_OFFSET] str r5, [sp, #-4]! + cfi_adjust_cfa_offset (4) + cfi_rel_offset (r5, 0) ldr r5, [sp, $HIGH_OFFSET] str r4, [sp, #-4]! + cfi_adjust_cfa_offset (4) + cfi_rel_offset (r4, 0) + cfi_remember_state movs r4, ip, lsl $20 @ check that offset is page-aligned mov ip, ip, lsr $12 moveqs r4, r5, lsr $12 @ check for overflow @@ -45,11 +50,19 @@ ENTRY (__mmap64) DO_CALL (mmap2, 0) cmn r0, $4096 ldmfd sp!, {r4, r5} + cfi_adjust_cfa_offset (-8) + cfi_restore (r4) + cfi_restore (r5) RETINSTR(cc, lr) b PLTJMP(syscall_error) + + cfi_restore_state .Linval: mov r0, $-EINVAL ldmfd sp!, {r4, r5} + cfi_adjust_cfa_offset (-8) + cfi_restore (r4) + cfi_restore (r5) b PLTJMP(syscall_error) PSEUDO_END (__mmap64) diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h index 73912d5174..458558b9cf 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2005, 2009 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 @@ -36,17 +36,22 @@ .type __##syscall_name##_nocancel,%function; \ .globl __##syscall_name##_nocancel; \ __##syscall_name##_nocancel: \ + .cfi_sections .debug_frame; \ + cfi_startproc; \ DO_CALL (syscall_name, args); \ PSEUDO_RET; \ + cfi_endproc; \ .size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel; \ ENTRY (name); \ SINGLE_THREAD_P; \ DOARGS_##args; \ bne .Lpseudo_cancel; \ + cfi_remember_state; \ DO_CALL (syscall_name, 0); \ UNDOARGS_##args; \ cmn r0, $4096; \ PSEUDO_RET; \ + cfi_restore_state; \ .Lpseudo_cancel: \ .fnstart; \ DOCARGS_##args; /* save syscall args etc. around CENABLE. */ \ @@ -62,41 +67,127 @@ mov r0, r7; /* retrieve return value. */ \ RESTORE_LR_##args; \ UNDOARGS_##args; \ - cmn r0, $4096; + cmn r0, $4096 /* DOARGS pushes four bytes on the stack for five arguments, eight bytes for six arguments, and nothing for fewer. In order to preserve doubleword alignment, sometimes we must save an extra register. */ -# define RESTART_UNWIND .fnend; .fnstart; .save {r7, lr} - -# define DOCARGS_0 stmfd sp!, {r7, lr}; .save {r7, lr} +# define RESTART_UNWIND \ + .fnend; \ + .fnstart; \ + .save {r7, lr} + +# define DOCARGS_0 \ + stmfd sp!, {r7, lr}; \ + cfi_adjust_cfa_offset (8); \ + cfi_rel_offset (r7, 0); \ + cfi_rel_offset (lr, 4); \ + .save {r7, lr} # define UNDOCARGS_0 -# define RESTORE_LR_0 ldmfd sp!, {r7, lr}; - -# define DOCARGS_1 stmfd sp!, {r0, r1, r7, lr}; .save {r7, lr}; .pad #8 -# define UNDOCARGS_1 ldr r0, [sp], #8; RESTART_UNWIND -# define RESTORE_LR_1 RESTORE_LR_0 - -# define DOCARGS_2 stmfd sp!, {r0, r1, r7, lr}; .save {r7, lr}; .pad #8 -# define UNDOCARGS_2 ldmfd sp!, {r0, r1}; RESTART_UNWIND -# define RESTORE_LR_2 RESTORE_LR_0 - -# define DOCARGS_3 stmfd sp!, {r0, r1, r2, r3, r7, lr}; .save {r7, lr}; .pad #16 -# define UNDOCARGS_3 ldmfd sp!, {r0, r1, r2, r3}; RESTART_UNWIND -# define RESTORE_LR_3 RESTORE_LR_0 - -# define DOCARGS_4 stmfd sp!, {r0, r1, r2, r3, r7, lr}; .save {r7, lr}; .pad #16 -# define UNDOCARGS_4 ldmfd sp!, {r0, r1, r2, r3}; RESTART_UNWIND -# define RESTORE_LR_4 RESTORE_LR_0 - -# define DOCARGS_5 .save {r4}; stmfd sp!, {r0, r1, r2, r3, r4, r7, lr}; .save {r7, lr}; .pad #20 -# define UNDOCARGS_5 ldmfd sp!, {r0, r1, r2, r3}; .fnend; .fnstart; .save {r4}; .save {r7, lr}; .pad #4 -# define RESTORE_LR_5 ldmfd sp!, {r4, r7, lr} - -# define DOCARGS_6 .save {r4, r5}; stmfd sp!, {r0, r1, r2, r3, r7, lr}; .save {r7, lr}; .pad #16 -# define UNDOCARGS_6 ldmfd sp!, {r0, r1, r2, r3}; .fnend; .fnstart; .save {r4, r5}; .save {r7, lr} -# define RESTORE_LR_6 RESTORE_LR_0 +# define RESTORE_LR_0 \ + ldmfd sp!, {r7, lr}; \ + cfi_adjust_cfa_offset (-8); \ + cfi_restore (r7); \ + cfi_restore (lr) + +# define DOCARGS_1 \ + stmfd sp!, {r0, r1, r7, lr}; \ + cfi_adjust_cfa_offset (16); \ + cfi_rel_offset (r7, 8); \ + cfi_rel_offset (lr, 12); \ + .save {r7, lr}; \ + .pad #8 +# define UNDOCARGS_1 \ + ldr r0, [sp], #8; \ + cfi_adjust_cfa_offset (-8); \ + RESTART_UNWIND +# define RESTORE_LR_1 \ + RESTORE_LR_0 + +# define DOCARGS_2 \ + stmfd sp!, {r0, r1, r7, lr}; \ + cfi_adjust_cfa_offset (16); \ + cfi_rel_offset (r7, 8); \ + cfi_rel_offset (lr, 12); \ + .save {r7, lr}; \ + .pad #8 +# define UNDOCARGS_2 \ + ldmfd sp!, {r0, r1}; \ + cfi_adjust_cfa_offset (-8); \ + RESTART_UNWIND +# define RESTORE_LR_2 \ + RESTORE_LR_0 + +# define DOCARGS_3 \ + stmfd sp!, {r0, r1, r2, r3, r7, lr}; \ + cfi_adjust_cfa_offset (24); \ + cfi_rel_offset (r7, 16); \ + cfi_rel_offset (lr, 20); \ + .save {r7, lr}; \ + .pad #16 +# define UNDOCARGS_3 \ + ldmfd sp!, {r0, r1, r2, r3}; \ + cfi_adjust_cfa_offset (-16); \ + RESTART_UNWIND +# define RESTORE_LR_3 \ + RESTORE_LR_0 + +# define DOCARGS_4 \ + stmfd sp!, {r0, r1, r2, r3, r7, lr}; \ + cfi_adjust_cfa_offset (24); \ + cfi_rel_offset (r7, 16); \ + cfi_rel_offset (lr, 20); \ + .save {r7, lr}; \ + .pad #16 +# define UNDOCARGS_4 \ + ldmfd sp!, {r0, r1, r2, r3}; \ + cfi_adjust_cfa_offset (-16); \ + RESTART_UNWIND +# define RESTORE_LR_4 \ + RESTORE_LR_0 + +/* r4 is only stmfd'ed for correct stack alignment. */ +# define DOCARGS_5 \ + .save {r4}; \ + stmfd sp!, {r0, r1, r2, r3, r4, r7, lr}; \ + cfi_adjust_cfa_offset (28); \ + cfi_rel_offset (r7, 20); \ + cfi_rel_offset (lr, 24); \ + .save {r7, lr}; \ + .pad #20 +# define UNDOCARGS_5 \ + ldmfd sp!, {r0, r1, r2, r3}; \ + cfi_adjust_cfa_offset (-16); \ + .fnend; \ + .fnstart; \ + .save {r4}; \ + .save {r7, lr}; \ + .pad #4 +# define RESTORE_LR_5 \ + ldmfd sp!, {r4, r7, lr}; \ + cfi_adjust_cfa_offset (-12); \ + /* r4 will be marked as restored later. */ \ + cfi_restore (r7); \ + cfi_restore (lr) + +# define DOCARGS_6 \ + .save {r4, r5}; \ + stmfd sp!, {r0, r1, r2, r3, r7, lr}; \ + cfi_adjust_cfa_offset (24); \ + cfi_rel_offset (r7, 16); \ + cfi_rel_offset (lr, 20); \ + .save {r7, lr}; \ + .pad #16 +# define UNDOCARGS_6 \ + ldmfd sp!, {r0, r1, r2, r3}; \ + cfi_adjust_cfa_offset (-16); \ + .fnend; \ + .fnstart; \ + .save {r4, r5}; \ + .save {r7, lr} +# define RESTORE_LR_6 \ + RESTORE_LR_0 # ifdef IS_IN_libpthread # define CENABLE bl PLTJMP(__pthread_enable_asynccancel) @@ -136,9 +227,13 @@ extern int __local_multiple_threads attribute_hidden; # define PSEUDO_PROLOGUE # define SINGLE_THREAD_P \ stmfd sp!, {r0, lr}; \ + cfi_adjust_cfa_offset (8); \ + cfi_rel_offset (lr, 4); \ bl __aeabi_read_tp; \ ldr ip, [r0, #MULTIPLE_THREADS_OFFSET]; \ ldmfd sp!, {r0, lr}; \ + cfi_adjust_cfa_offset (-8); \ + cfi_restore (lr); \ teq ip, #0 # define SINGLE_THREAD_P_PIC(x) SINGLE_THREAD_P # endif diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c index ed321a3964..011746d0e8 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c +++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2005, 2007, 2009 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2005, 2007, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek . @@ -89,7 +89,15 @@ asm ( " .globl _Unwind_Resume\n" " .type _Unwind_Resume, %function\n" "_Unwind_Resume:\n" +" .cfi_sections .debug_frame\n" +" " CFI_STARTPROC "\n" " stmfd sp!, {r4, r5, r6, lr}\n" +" " CFI_ADJUST_CFA_OFFSET (16)" \n" +" " CFI_REL_OFFSET (r4, 0) "\n" +" " CFI_REL_OFFSET (r5, 4) "\n" +" " CFI_REL_OFFSET (r6, 8) "\n" +" " CFI_REL_OFFSET (lr, 12) "\n" +" " CFI_REMEMBER_STATE "\n" " ldr r4, 1f\n" " ldr r5, 2f\n" "3: add r4, pc, r4\n" @@ -99,10 +107,17 @@ asm ( " beq 4f\n" "5: mov r0, r6\n" " ldmfd sp!, {r4, r5, r6, lr}\n" +" " CFI_ADJUST_CFA_OFFSET (-16) "\n" +" " CFI_RESTORE (r4) "\n" +" " CFI_RESTORE (r5) "\n" +" " CFI_RESTORE (r6) "\n" +" " CFI_RESTORE (lr) "\n" " bx r3\n" +" " CFI_RESTORE_STATE "\n" "4: bl pthread_cancel_init\n" " ldr r3, [r4, r5]\n" " b 5b\n" +" " CFI_ENDPROC "\n" " .align 2\n" #ifdef __thumb2__ "1: .word _GLOBAL_OFFSET_TABLE_ - 3b - 4\n" diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c index 3c780b7137..cdab10e305 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c +++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2005, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek . @@ -52,7 +52,15 @@ asm ( " .globl _Unwind_Resume\n" " .type _Unwind_Resume, %function\n" "_Unwind_Resume:\n" +" .cfi_sections .debug_frame\n" +" " CFI_STARTPROC "\n" " stmfd sp!, {r4, r5, r6, lr}\n" +" " CFI_ADJUST_CFA_OFFSET (16)" \n" +" " CFI_REL_OFFSET (r4, 0) "\n" +" " CFI_REL_OFFSET (r5, 4) "\n" +" " CFI_REL_OFFSET (r6, 8) "\n" +" " CFI_REL_OFFSET (lr, 12) "\n" +" " CFI_REMEMBER_STATE "\n" " ldr r4, 1f\n" " ldr r5, 2f\n" "3: add r4, pc, r4\n" @@ -62,10 +70,17 @@ asm ( " beq 4f\n" "5: mov r0, r6\n" " ldmfd sp!, {r4, r5, r6, lr}\n" +" " CFI_ADJUST_CFA_OFFSET (-16) "\n" +" " CFI_RESTORE (r4) "\n" +" " CFI_RESTORE (r5) "\n" +" " CFI_RESTORE (r6) "\n" +" " CFI_RESTORE (lr) "\n" " bx r3\n" +" " CFI_RESTORE_STATE "\n" "4: bl init\n" " ldr r3, [r4, r5]\n" " b 5b\n" +" " CFI_ENDPROC "\n" " .align 2\n" #ifdef __thumb2__ "1: .word _GLOBAL_OFFSET_TABLE_ - 3b - 4\n" diff --git a/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S b/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S index cc06a55972..09ff9c7d91 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S +++ b/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2005, 2009, 2010 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 @@ -34,46 +34,89 @@ Because the signal frame layout changed in 2.6.18, we provide two copies of these functions with different unwind information. */ +/* Used in ENTRY. */ +#undef cfi_startproc +#define cfi_startproc \ + .cfi_startproc simple; \ + .cfi_signal_frame + +/* The CFA is not computed / used correctly here; this is neither trivial to + do, nor is it needed. */ +#define CFI \ + cfi_def_cfa (sp, 0); \ + cfi_offset (r0, OFFSET + 0 * 4); \ + cfi_offset (r1, OFFSET + 1 * 4); \ + cfi_offset (r2, OFFSET + 2 * 4); \ + cfi_offset (r3, OFFSET + 3 * 4); \ + cfi_offset (r4, OFFSET + 4 * 4); \ + cfi_offset (r5, OFFSET + 5 * 4); \ + cfi_offset (r6, OFFSET + 6 * 4); \ + cfi_offset (r7, OFFSET + 7 * 4); \ + cfi_offset (r8, OFFSET + 8 * 4); \ + cfi_offset (r9, OFFSET + 9 * 4); \ + cfi_offset (r10, OFFSET + 10 * 4); \ + cfi_offset (r11, OFFSET + 11 * 4); \ + cfi_offset (r12, OFFSET + 12 * 4); \ + cfi_offset (r13, OFFSET + 13 * 4); \ + cfi_offset (r14, OFFSET + 14 * 4); \ + cfi_offset (r15, OFFSET + 15 * 4) + #ifndef __ASSUME_SIGFRAME_V2 +#define OFFSET 12 .fnstart .save {r0-r15} - .pad #12 + .pad #OFFSET nop ENTRY(__default_sa_restorer_v1) + CFI mov r7, $SYS_ify(sigreturn) swi 0x0 .fnend -#endif +END(__default_sa_restorer_v1) +#undef OFFSET +#endif /* __ASSUME_SIGFRAME_V2 */ +#define OFFSET 32 .fnstart .save {r0-r15} - .pad #32 + .pad #OFFSET nop ENTRY(__default_sa_restorer_v2) + CFI mov r7, $SYS_ify(sigreturn) swi 0x0 .fnend +END(__default_sa_restorer_v2) +#undef OFFSET #ifdef __NR_rt_sigreturn #ifndef __ASSUME_SIGFRAME_V2 +#define OFFSET 168 .fnstart .save {r0-r15} - .pad #168 + .pad #OFFSET nop ENTRY(__default_rt_sa_restorer_v1) + CFI mov r7, $SYS_ify(rt_sigreturn) swi 0x0 .fnend -#endif +END(__default_rt_sa_restorer_v1) +#undef OFFSET +#endif /* __ASSUME_SIGFRAME_V2 */ +#define OFFSET 160 .fnstart .save {r0-r15} - .pad #160 + .pad #OFFSET nop ENTRY(__default_rt_sa_restorer_v2) + CFI mov r7, $SYS_ify(rt_sigreturn) swi 0x0 .fnend +END(__default_rt_sa_restorer_v2) +#undef OFFSET -#endif +#endif /* __NR_rt_sigreturn */ diff --git a/sysdeps/unix/sysv/linux/arm/eabi/syscall.S b/sysdeps/unix/sysv/linux/arm/eabi/syscall.S index 59ca051a8b..f6d775e0aa 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/syscall.S +++ b/sysdeps/unix/sysv/linux/arm/eabi/syscall.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2005 Free Software Foundation, Inc. +/* Copyright (C) 2005, 2009 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,6 +25,11 @@ ENTRY (syscall) mov ip, sp stmfd sp!, {r4, r5, r6, r7} + cfi_adjust_cfa_offset (16) + cfi_rel_offset (r4, 0) + cfi_rel_offset (r5, 4) + cfi_rel_offset (r6, 8) + cfi_rel_offset (r7, 12) mov r7, r0 mov r0, r1 mov r1, r2 @@ -32,6 +37,11 @@ ENTRY (syscall) ldmfd ip, {r3, r4, r5, r6} swi 0x0 ldmfd sp!, {r4, r5, r6, r7} + cfi_adjust_cfa_offset (-16) + cfi_restore (r4) + cfi_restore (r5) + cfi_restore (r6) + cfi_restore (r7) cmn r0, #4096 RETINSTR(cc, lr) b PLTJMP(syscall_error) diff --git a/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h b/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h index a7dd40d741..9d90f3e35f 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2005, 2006, 2007 +/* Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -50,6 +50,7 @@ For the moment the LOAD_ARGS_7 is sacrificed. We can't use push/pop inside the asm because that breaks unwinding (ie. thread cancellation). */ +/* FIXME: the str / ldr of r7 are not covered by CFI information. */ #undef LOAD_ARGS_7 #undef INTERNAL_SYSCALL_RAW #define INTERNAL_SYSCALL_RAW(name, err, nr, args...) \ @@ -100,11 +101,13 @@ #undef DO_CALL #define DO_CALL(syscall_name, args) \ - DOARGS_##args \ + DOARGS_##args; \ mov ip, r7; \ + cfi_register (r7, ip); \ ldr r7, =SYS_ify (syscall_name); \ swi 0x0; \ mov r7, ip; \ + cfi_restore (r7); \ UNDOARGS_##args #endif /* _LINUX_ARM_EABI_SYSDEP_H */ diff --git a/sysdeps/unix/sysv/linux/arm/mmap.S b/sysdeps/unix/sysv/linux/arm/mmap.S index 9227bd79f3..abac9e0669 100644 --- a/sysdeps/unix/sysv/linux/arm/mmap.S +++ b/sysdeps/unix/sysv/linux/arm/mmap.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2000, 2003, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2000, 2003, 2005, 2009 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 @@ -33,8 +33,13 @@ ENTRY (__mmap) /* shuffle args */ str r5, [sp, #-4]! + cfi_adjust_cfa_offset (4) + cfi_rel_offset (r5, 0) ldr r5, [sp, #8] str r4, [sp, #-4]! + cfi_adjust_cfa_offset (4) + cfi_rel_offset (r4, 0) + cfi_remember_state ldr r4, [sp, #8] /* convert offset to pages */ @@ -48,12 +53,17 @@ ENTRY (__mmap) /* restore registers */ 2: ldr r4, [sp], #4 + cfi_adjust_cfa_offset (-4) + cfi_restore (r4) ldr r5, [sp], #4 + cfi_adjust_cfa_offset (-4) + cfi_restore (r5) cmn r0, $4096 RETINSTR(cc, lr) b PLTJMP(syscall_error) + cfi_restore_state .Linval: mov r0, #-EINVAL b 2b @@ -74,6 +84,7 @@ ENTRY (__mmap) /* store args on the stack */ stmdb sp!, {a1-a4} + cfi_adjust_cfa_offset (16) /* do the syscall */ mov a1, sp @@ -81,6 +92,7 @@ ENTRY (__mmap) /* pop args off the stack. */ add sp, sp, #16 + cfi_adjust_cfa_offset (-16) cmn r0, $4096 RETINSTR(cc, lr) diff --git a/sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S b/sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S index 1c2e1f5547..964a389a65 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S +++ b/sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2005 Free Software Foundation, Inc. +/* Copyright (C) 2005, 2010 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 @@ -21,10 +21,14 @@ /* Save the PID value. */ #define SAVE_PID \ str lr, [sp, #-4]!; /* Save LR. */ \ + cfi_adjust_cfa_offset (4); \ + cfi_rel_offset (lr, 0); \ mov r0, #0xffff0fff; /* Point to the high page. */ \ mov lr, pc; /* Save our return address. */ \ sub pc, r0, #31; /* Jump to the TLS entry. */ \ ldr lr, [sp], #4; /* Restore LR. */ \ + cfi_adjust_cfa_offset (-4); \ + cfi_restore (lr); \ mov r2, r0; /* Save the TLS addr in r2. */ \ ldr r3, [r2, #PID_OFFSET]; /* Load the saved PID. */ \ rsb r0, r3, #0; /* Negate it. */ \ diff --git a/sysdeps/unix/sysv/linux/arm/nptl/vfork.S b/sysdeps/unix/sysv/linux/arm/nptl/vfork.S index 87e055e657..009d03ad95 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/vfork.S +++ b/sysdeps/unix/sysv/linux/arm/nptl/vfork.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2005 Free Software Foundation, Inc. +/* Copyright (C) 2005, 2010 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 @@ -21,10 +21,14 @@ /* Save the PID value. */ #define SAVE_PID \ str lr, [sp, #-4]!; /* Save LR. */ \ + cfi_adjust_cfa_offset (4); \ + cfi_rel_offset (lr, 0); \ mov r0, #0xffff0fff; /* Point to the high page. */ \ mov lr, pc; /* Save our return address. */ \ sub pc, r0, #31; /* Jump to the TLS entry. */ \ ldr lr, [sp], #4; /* Restore LR. */ \ + cfi_adjust_cfa_offset (-4); \ + cfi_restore (lr); \ mov r2, r0; /* Save the TLS addr in r2. */ \ ldr r3, [r2, #PID_OFFSET]; /* Load the saved PID. */ \ rsbs r0, r3, #0; /* Negate it. */ \ diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index 3911aee626..bd5b2ce3e4 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -84,7 +84,7 @@ #undef PSEUDO_END #define PSEUDO_END(name) \ - SYSCALL_ERROR_HANDLER \ + SYSCALL_ERROR_HANDLER; \ END (name) #undef PSEUDO_NOERRNO @@ -129,17 +129,26 @@ __local_syscall_error: \ DO_RET(lr); \ 1: .word C_SYMBOL_NAME(rtld_errno) - 0b - 8; # else -#if defined(__ARM_ARCH_4T__) && defined(__THUMB_INTERWORK__) -#define POP_PC ldr lr, [sp], #4; bx lr -#else -#define POP_PC ldr pc, [sp], #4 -#endif +# if defined(__ARM_ARCH_4T__) && defined(__THUMB_INTERWORK__) +# define POP_PC \ + ldr lr, [sp], #4; \ + cfi_adjust_cfa_offset (-4); \ + cfi_restore (lr); \ + bx lr +# else +# define POP_PC \ + ldr pc, [sp], #4 +# endif # define SYSCALL_ERROR_HANDLER \ __local_syscall_error: \ str lr, [sp, #-4]!; \ + cfi_adjust_cfa_offset (4); \ + cfi_rel_offset (lr, 0); \ str r0, [sp, #-4]!; \ + cfi_adjust_cfa_offset (4); \ bl PLTJMP(C_SYMBOL_NAME(__errno_location)); \ ldr r1, [sp], #4; \ + cfi_adjust_cfa_offset (-4); \ rsb r1, r1, #0; \ str r1, [r0]; \ mvn r0, #0; \ @@ -179,7 +188,7 @@ __local_syscall_error: \ #undef DO_CALL #define DO_CALL(syscall_name, args) \ - DOARGS_##args \ + DOARGS_##args; \ swi SYS_ify (syscall_name); \ UNDOARGS_##args @@ -188,18 +197,47 @@ __local_syscall_error: \ #define DOARGS_2 /* nothing */ #define DOARGS_3 /* nothing */ #define DOARGS_4 /* nothing */ -#define DOARGS_5 str r4, [sp, $-4]!; ldr r4, [sp, $4]; -#define DOARGS_6 mov ip, sp; stmfd sp!, {r4, r5}; ldmia ip, {r4, r5}; -#define DOARGS_7 mov ip, sp; stmfd sp!, {r4, r5, r6}; ldmia ip, {r4, r5, r6}; +#define DOARGS_5 \ + str r4, [sp, $-4]!; \ + cfi_adjust_cfa_offset (4); \ + cfi_rel_offset (r4, 0); \ + ldr r4, [sp, $4] +#define DOARGS_6 \ + mov ip, sp; \ + stmfd sp!, {r4, r5}; \ + cfi_adjust_cfa_offset (8); \ + cfi_rel_offset (r4, 0); \ + cfi_rel_offset (r5, 4); \ + ldmia ip, {r4, r5} +#define DOARGS_7 \ + mov ip, sp; \ + stmfd sp!, {r4, r5, r6}; \ + cfi_adjust_cfa_offset (12); \ + cfi_rel_offset (r4, 0); \ + cfi_rel_offset (r5, 4); \ + cfi_rel_offset (r6, 8); \ + ldmia ip, {r4, r5, r6} #define UNDOARGS_0 /* nothing */ #define UNDOARGS_1 /* nothing */ #define UNDOARGS_2 /* nothing */ #define UNDOARGS_3 /* nothing */ #define UNDOARGS_4 /* nothing */ -#define UNDOARGS_5 ldr r4, [sp], $4; -#define UNDOARGS_6 ldmfd sp!, {r4, r5}; -#define UNDOARGS_7 ldmfd sp!, {r4, r5, r6}; +#define UNDOARGS_5 \ + ldr r4, [sp], $4; \ + cfi_adjust_cfa_offset (-4); \ + cfi_restore (r4) +#define UNDOARGS_6 \ + ldmfd sp!, {r4, r5}; \ + cfi_adjust_cfa_offset (-8); \ + cfi_restore (r4); \ + cfi_restore (r5) +#define UNDOARGS_7 \ + ldmfd sp!, {r4, r5, r6}; \ + cfi_adjust_cfa_offset (-12); \ + cfi_restore (r4); \ + cfi_restore (r5); \ + cfi_restore (r6) #else /* not __ASSEMBLER__ */ From 6796df65e4d8320e1eb3b9e74dcd972a0bd6ae20 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 26 Mar 2010 10:25:53 -0700 Subject: [PATCH 3977/4487] alpha: Fix the return type of the atomic.h macros. Signed-off-by: Richard Henderson --- ChangeLog.alpha | 8 ++++++++ sysdeps/alpha/bits/atomic.h | 14 +++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 4cf27f4204..4e2eb5b844 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,11 @@ +2010-03-26 Richard Henderson + + * sysdeps/alpha/bits/atomic.h (__arch_exchange_8_int, + __arch_exchange_16_int, __arch_exchange_32_int, + __arch_exchange_64_int, __arch_exchange_and_add_32_int, + __arch_exchange_and_add_64_int): Use __typeof to get the + return type correct without warning. + 2010-03-23 Matt Turner Aurelien Jarno diff --git a/sysdeps/alpha/bits/atomic.h b/sysdeps/alpha/bits/atomic.h index 36a740c758..602fde3ff9 100644 --- a/sysdeps/alpha/bits/atomic.h +++ b/sysdeps/alpha/bits/atomic.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2010 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 @@ -221,7 +221,7 @@ typedef uintmax_t uatomic_max_t; #define __arch_exchange_8_int(mem, value, mb1, mb2) \ ({ \ - unsigned long __ret, __tmp, __addr64, __sval; \ + unsigned long __tmp, __addr64, __sval; __typeof(*mem) __ret; \ __asm__ __volatile__ ( \ mb1 \ " andnot %[__addr8],7,%[__addr64]\n" \ @@ -244,7 +244,7 @@ typedef uintmax_t uatomic_max_t; #define __arch_exchange_16_int(mem, value, mb1, mb2) \ ({ \ - unsigned long __ret, __tmp, __addr64, __sval; \ + unsigned long __tmp, __addr64, __sval; __typeof(*mem) __ret; \ __asm__ __volatile__ ( \ mb1 \ " andnot %[__addr16],7,%[__addr64]\n" \ @@ -267,7 +267,7 @@ typedef uintmax_t uatomic_max_t; #define __arch_exchange_32_int(mem, value, mb1, mb2) \ ({ \ - signed int __ret, __tmp; \ + signed int __tmp; __typeof(*mem) __ret; \ __asm__ __volatile__ ( \ mb1 \ "1: ldl_l %[__ret],%[__mem]\n" \ @@ -284,7 +284,7 @@ typedef uintmax_t uatomic_max_t; #define __arch_exchange_64_int(mem, value, mb1, mb2) \ ({ \ - unsigned long __ret, __tmp; \ + unsigned long __tmp; __typeof(*mem) __ret; \ __asm__ __volatile__ ( \ mb1 \ "1: ldq_l %[__ret],%[__mem]\n" \ @@ -316,7 +316,7 @@ typedef uintmax_t uatomic_max_t; #define __arch_exchange_and_add_32_int(mem, value, mb1, mb2) \ ({ \ - signed int __ret, __tmp; \ + signed int __tmp; __typeof(*mem) __ret; \ __asm__ __volatile__ ( \ mb1 \ "1: ldl_l %[__ret],%[__mem]\n" \ @@ -333,7 +333,7 @@ typedef uintmax_t uatomic_max_t; #define __arch_exchange_and_add_64_int(mem, value, mb1, mb2) \ ({ \ - unsigned long __ret, __tmp; \ + unsigned long __tmp; __typeof(*mem) __ret; \ __asm__ __volatile__ ( \ mb1 \ "1: ldq_l %[__ret],%[__mem]\n" \ From a9374d8174c2191b0cac73baf4a30a919f84443e Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 26 Mar 2010 10:27:37 -0700 Subject: [PATCH 3978/4487] alpha: Adjust the libc_cv_alpha_hidden_gprel test for gcc 4.5. GCC 4.5 was able to tell that BAR was read-only and zero, and elided the load. Which caused the pattern match to fail. Signed-off-by: Richard Henderson --- ChangeLog.alpha | 6 ++++++ sysdeps/alpha/elf/configure | 32 ++++++++++++++------------------ sysdeps/alpha/elf/configure.in | 8 ++------ 3 files changed, 22 insertions(+), 24 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 4e2eb5b844..948cdc69ab 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,9 @@ +2010-03-26 Richard Henderson + + * sysdep/alpha/elf/configure.in (libc_cv_alpha_hidden_gprel) + Adjust the test for gcc 4.5. + * sysdep/alpha/elf/configure: Rebuild. + 2010-03-26 Richard Henderson * sysdeps/alpha/bits/atomic.h (__arch_exchange_8_int, diff --git a/sysdeps/alpha/elf/configure b/sysdeps/alpha/elf/configure index ea99e35416..1d594dc787 100644 --- a/sysdeps/alpha/elf/configure +++ b/sysdeps/alpha/elf/configure @@ -4,10 +4,10 @@ if test "$usetls" != no; then # Check for support of thread-local storage handling in assembler and # linker. -echo "$as_me:$LINENO: checking for Alpha TLS support" >&5 -echo $ECHO_N "checking for Alpha TLS support... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for Alpha TLS support" >&5 +$as_echo_n "checking for Alpha TLS support... " >&6; } if test "${libc_cv_alpha_tls+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat > conftest.s <<\EOF .section ".tdata", "awT", @progbits @@ -47,7 +47,7 @@ if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then libc_cv_alpha_tls=yes else @@ -55,8 +55,8 @@ else fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $libc_cv_alpha_tls" >&5 -echo "${ECHO_T}$libc_cv_alpha_tls" >&6 +{ $as_echo "$as_me:$LINENO: result: $libc_cv_alpha_tls" >&5 +$as_echo "$libc_cv_alpha_tls" >&6; } if test $libc_cv_alpha_tls = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_TLS_SUPPORT 1 @@ -65,19 +65,15 @@ _ACEOF fi fi -echo "$as_me:$LINENO: checking for GP relative module local relocs" >&5 -echo $ECHO_N "checking for GP relative module local relocs... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for GP relative module local relocs" >&5 +$as_echo_n "checking for GP relative module local relocs... " >&6; } if test "${libc_cv_alpha_hidden_gprel+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat > conftest.c <<\EOF -static int bar; +static volatile int bar; int baz __attribute__((visibility("hidden"))); - -int foo (void) -{ - return bar + baz; -} +int f(void) { return bar + baz; } EOF libc_cv_alpha_hidden_gprel=no @@ -85,7 +81,7 @@ if { ac_try='${CC-cc} -S $CFLAGS -O2 -fpic conftest.c 1>&5' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then if grep -q 'bar.*!gprel' conftest.s \ && grep -q 'baz.*!gprel' conftest.s \ @@ -96,8 +92,8 @@ if { ac_try='${CC-cc} -S $CFLAGS -O2 -fpic conftest.c 1>&5' fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $libc_cv_alpha_hidden_gprel" >&5 -echo "${ECHO_T}$libc_cv_alpha_hidden_gprel" >&6 +{ $as_echo "$as_me:$LINENO: result: $libc_cv_alpha_hidden_gprel" >&5 +$as_echo "$libc_cv_alpha_hidden_gprel" >&6; } if test $libc_cv_alpha_hidden_gprel = yes; then cat >>confdefs.h <<\_ACEOF #define PI_STATIC_AND_HIDDEN 1 diff --git a/sysdeps/alpha/elf/configure.in b/sysdeps/alpha/elf/configure.in index 7986814548..3a479341e7 100644 --- a/sysdeps/alpha/elf/configure.in +++ b/sysdeps/alpha/elf/configure.in @@ -53,13 +53,9 @@ fi AC_CACHE_CHECK(for GP relative module local relocs, libc_cv_alpha_hidden_gprel, [dnl cat > conftest.c <<\EOF -static int bar; +static volatile int bar; int baz __attribute__((visibility("hidden"))); - -int foo (void) -{ - return bar + baz; -} +int f(void) { return bar + baz; } EOF dnl From c7b880234d57e2c09cb7d4c8e9bf155ec15077a3 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 26 Mar 2010 10:28:37 -0700 Subject: [PATCH 3979/4487] alpha: Add sysdep/unix/sysv/linux/alpha/creat.c. Signed-off-by: Richard Henderson --- ChangeLog.alpha | 4 ++++ sysdeps/unix/sysv/linux/alpha/creat.c | 8 ++++++++ 2 files changed, 12 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/creat.c diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 948cdc69ab..78ce8631a0 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,7 @@ +2010-03-26 Richard Henderson + + * sysdep/unix/sysv/linux/alpha/creat.c: New. + 2010-03-26 Richard Henderson * sysdep/alpha/elf/configure.in (libc_cv_alpha_hidden_gprel) diff --git a/sysdeps/unix/sysv/linux/alpha/creat.c b/sysdeps/unix/sysv/linux/alpha/creat.c new file mode 100644 index 0000000000..9e661bab04 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/creat.c @@ -0,0 +1,8 @@ +/* sysdeps/unix/sysv/linux/wordsize-64/syscalls.list defines creat and + creat64 for most linux targets, but on alpha creat is not a syscall. + If we do nothing, we'll wind up with creat64 being undefined, because + the syscalls.list assumes the creat->creat64 alias was created. We + could have overridden that with a create64.c, but we might as well do + the right thing and set up creat64 as an alias. */ +#include +weak_alias(__libc_creat, creat64) From cce01cf0a17e075204b8f2fae32900dda7211a71 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 26 Mar 2010 10:29:42 -0700 Subject: [PATCH 3980/4487] alpha: Avoid unused variable warnings with INTERNAL_SYSCALL_ERR*. Signed-off-by: Richard Henderson --- ChangeLog.alpha | 5 +++++ sysdeps/unix/alpha/sysdep.h | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 78ce8631a0..e4c4a6c473 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,8 @@ +2010-03-26 Richard Henderson + + * sysdeps/unix/alpha/sysdep.h (INTERNAL_SYSCALL_ERROR_P, + INTERNAL_SYSCALL_ERRNO): "Use" the "other" variable in each macro. + 2010-03-26 Richard Henderson * sysdep/unix/sysv/linux/alpha/creat.c: New. diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h index 2e5bc798eb..8accde0dc2 100644 --- a/sysdeps/unix/alpha/sysdep.h +++ b/sysdeps/unix/alpha/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1995, 1996, 2000, 2003, 2004, 2006 +/* Copyright (C) 1992, 1995, 1996, 2000, 2003, 2004, 2006, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -191,8 +191,10 @@ __LABEL(name) \ }) #define INTERNAL_SYSCALL_DECL(err) long int err -#define INTERNAL_SYSCALL_ERROR_P(val, err) err -#define INTERNAL_SYSCALL_ERRNO(val, err) val +/* Make sure and "use" the variable that we're not returning, + in order to suppress unused variable warnings. */ +#define INTERNAL_SYSCALL_ERROR_P(val, err) ((void)val, err) +#define INTERNAL_SYSCALL_ERRNO(val, err) ((void)err, val) #define inline_syscall_clobbers \ "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8", \ From ee390edfa9018351f794f73207a1dbb324feace0 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 26 Mar 2010 10:30:25 -0700 Subject: [PATCH 3981/4487] alpha: Define PTR_MANGLE for !PIC too. Signed-off-by: Richard Henderson --- ChangeLog.alpha | 5 +++++ sysdeps/unix/alpha/sysdep.h | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index e4c4a6c473..6cb84b87f9 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,8 @@ +2010-03-26 Richard Henderson + + * sysdeps/unix/alpha/sysdep.h (PTR_MANGLE): Define for !PIC too. + (PTR_DEMANGLE): Likewise. + 2010-03-26 Richard Henderson * sysdeps/unix/alpha/sysdep.h (INTERNAL_SYSCALL_ERROR_P, diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h index 8accde0dc2..d9009c1571 100644 --- a/sysdeps/unix/alpha/sysdep.h +++ b/sysdeps/unix/alpha/sysdep.h @@ -430,11 +430,21 @@ extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden; # define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp) # define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp) # else -extern uintptr_t __pointer_chk_guard attribute_relro; +extern const uintptr_t __pointer_chk_guard attribute_relro; # define PTR_MANGLE(var) \ - (var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard) + (var) = (__typeof(var)) ((uintptr_t) (var) ^ __pointer_chk_guard) # define PTR_DEMANGLE(var) PTR_MANGLE(var) # endif +#else +/* There exists generic C code that assumes that PTR_MANGLE is always + defined. When generating code for the static libc, we don't have + __pointer_chk_guard defined. Nor is there any place that would + initialize it if it were defined, so there's little point in doing + anything more than nothing. */ +# ifndef __ASSEMBLER__ +# define PTR_MANGLE(var) +# define PTR_DEMANGLE(var) +# endif #endif #endif /* ASSEMBLER */ From c735022ded3fb7967bf24b9f385cd7f8f1cdea77 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 26 Mar 2010 10:38:14 -0700 Subject: [PATCH 3982/4487] alpha: Update bits/fcntl.h for XPG7 and define f_owner_ex et al. Signed-off-by: Richard Henderson --- ChangeLog.alpha | 7 +++++++ sysdeps/unix/sysv/linux/alpha/bits/fcntl.h | 21 ++++++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 6cb84b87f9..84945a89c6 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,10 @@ +2010-03-26 Richard Henderson + + * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h (F_SETOWN_EX, + F_GETOWN_EX, F_OWNER_TID, F_OWNER_PID, F_OWNER_PGRP, + F_OWNER_GID, struct f_owner_ex): Define. + (F_SETOWN, F_GETOWN): Define with XPG7. + 2010-03-26 Richard Henderson * sysdeps/unix/alpha/sysdep.h (PTR_MANGLE): Define for !PIC too. diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h index 7a6a3fd0f2..860e9ac3ee 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h @@ -81,7 +81,7 @@ #define F_SETLK64 F_SETLK /* Set record locking info (non-blocking). */ #define F_SETLKW64 F_SETLKW /* Set record locking info (blocking). */ -#if defined __USE_BSD || defined __USE_UNIX98 || defiend __USE_XOPEN2K8 +#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K8 # define F_SETOWN 5 /* Get owner of socket (receiver of SIGIO). */ # define F_GETOWN 6 /* Set owner of socket (receiver of SIGIO). */ #endif @@ -89,6 +89,8 @@ #ifdef __USE_GNU # define F_SETSIG 10 /* Set number of signal to be sent. */ # define F_GETSIG 11 /* Get number of signal to be sent. */ +# define F_SETOWN_EX 15 /* Get owner (thread receiving SIGIO). */ +# define F_GETOWN_EX 16 /* Set owner (thread receiving SIGIO). */ #endif #ifdef __USE_GNU @@ -161,6 +163,23 @@ struct flock64 }; #endif +#ifdef __USE_GNU +/* Owner types. */ +enum __pid_type + { + F_OWNER_TID = 0, /* Kernel thread. */ + F_OWNER_PID, /* Process. */ + F_OWNER_PGRP, /* Process group. */ + F_OWNER_GID = F_OWNER_PGRP /* Alternative, obsolete name. */ + }; + +/* Structure to use with F_GETOWN_EX and F_SETOWN_EX. */ +struct f_owner_ex + { + enum __pid_type type; /* Owner type of ID. */ + __pid_t pid; /* ID of owner. */ + }; +#endif /* Define some more compatibility macros to be backward compatible with BSD systems which did not managed to hide these kernel macros. */ From 6546e0c4997c8af8075cb6b36b8bab7de492537d Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 26 Mar 2010 10:41:22 -0700 Subject: [PATCH 3983/4487] alpha: Don't include asm/page.h in sys/user.h. Signed-off-by: Richard Henderson --- ChangeLog.alpha | 5 +++++ sysdeps/unix/sysv/linux/alpha/sys/user.h | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 84945a89c6..739efce24c 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,8 @@ +2010-03-26 Richard Henderson + + * sysdeps/unix/sysv/linux/alpha/sys/user.h: Don't include asm/page.h. + (PAGE_SHIFT, PAGE_SIZE, PAGE_MASK): Define. + 2010-03-26 Richard Henderson * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h (F_SETOWN_EX, diff --git a/sysdeps/unix/sysv/linux/alpha/sys/user.h b/sysdeps/unix/sysv/linux/alpha/sys/user.h index 4cd29d2ff8..193085d5c5 100644 --- a/sysdeps/unix/sysv/linux/alpha/sys/user.h +++ b/sysdeps/unix/sysv/linux/alpha/sys/user.h @@ -23,7 +23,6 @@ only. Don't read too much into it. Don't use it for anything other than gdb/strace unless you know what you are doing. */ -#include #include struct user @@ -41,6 +40,9 @@ struct user char u_comm[32]; /* user command name */ }; +#define PAGE_SHIFT 13 +#define PAGE_SIZE (1UL << PAGE_SHIFT) +#define PAGE_MASK (~(PAGE_SIZE-1)) #define NBPG PAGE_SIZE #define UPAGES 1 #define HOST_TEXT_START_ADDR (u.start_code) From 45e3c406530f1a185fe236173b39ee74b6176d82 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 26 Mar 2010 11:10:23 -0700 Subject: [PATCH 3984/4487] alpha: Only define __libc_alpha_cache_shape in dl-sysdep.c. The static program builds in libc were getting multiple definition errors between dl-sysdep and dl-support. Signed-off-by: Richard Henderson --- ChangeLog.alpha | 6 ++++++ sysdeps/unix/sysv/linux/alpha/dl-auxv.h | 2 +- sysdeps/unix/sysv/linux/alpha/dl-sysdep.c | 3 +++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 739efce24c..784f6b7c82 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,9 @@ +2010-03-26 Richard Henderson + + * sysdeps/unix/sysv/linux/alpha/dl-auxv.h (__libc_alpha_cache_shape): + Define extern here; move definition... + * sysdeps/unix/sysv/linux/alpha/dl-sysdep.c: ... here. + 2010-03-26 Richard Henderson * sysdeps/unix/sysv/linux/alpha/sys/user.h: Don't include asm/page.h. diff --git a/sysdeps/unix/sysv/linux/alpha/dl-auxv.h b/sysdeps/unix/sysv/linux/alpha/dl-auxv.h index 8afc4dba3b..075797db08 100644 --- a/sysdeps/unix/sysv/linux/alpha/dl-auxv.h +++ b/sysdeps/unix/sysv/linux/alpha/dl-auxv.h @@ -19,7 +19,7 @@ /* Scan the Aux Vector for the cache shape entries. */ -long __libc_alpha_cache_shape[4] = { -2, -2, -2, -2 }; +extern long __libc_alpha_cache_shape[4]; #define DL_PLATFORM_AUXV \ case AT_L1I_CACHESHAPE: \ diff --git a/sysdeps/unix/sysv/linux/alpha/dl-sysdep.c b/sysdeps/unix/sysv/linux/alpha/dl-sysdep.c index 4034820f4d..5d0867a100 100644 --- a/sysdeps/unix/sysv/linux/alpha/dl-sysdep.c +++ b/sysdeps/unix/sysv/linux/alpha/dl-sysdep.c @@ -1,2 +1,5 @@ #include "dl-auxv.h" + +long __libc_alpha_cache_shape[4] = { -2, -2, -2, -2 }; + #include From 3a808c3df7710f930e9690ec422cea877a6680a9 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 26 Mar 2010 11:20:21 -0700 Subject: [PATCH 3985/4487] alpha: Add hidden alias for fegetenv. Signed-off-by: Richard Henderson --- ChangeLog.alpha | 4 ++++ sysdeps/alpha/fpu/fegetenv.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 784f6b7c82..fc386bbc5e 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,7 @@ +2010-03-26 Richard Henderson + + * sysdeps/alpha/fpu/fegetenv.c: Add hidden alias. + 2010-03-26 Richard Henderson * sysdeps/unix/sysv/linux/alpha/dl-auxv.h (__libc_alpha_cache_shape): diff --git a/sysdeps/alpha/fpu/fegetenv.c b/sysdeps/alpha/fpu/fegetenv.c index c1950fa3b9..ceaf9ed50d 100644 --- a/sysdeps/alpha/fpu/fegetenv.c +++ b/sysdeps/alpha/fpu/fegetenv.c @@ -1,5 +1,5 @@ /* Store current floating-point environment. - Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc. + Copyright (C) 1997,99,2000,2001,2010 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1997 @@ -45,3 +45,4 @@ compat_symbol (libm, __old_fegetenv, fegetenv, GLIBC_2_1); #endif versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2); +libm_hidden_ver(__fegetenv, fegetenv) From c87187fbb55984ea6bdc23e1f31744ea336786a8 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 26 Mar 2010 11:21:47 -0700 Subject: [PATCH 3986/4487] alpha: Fix errlist-compat for GLIBC_2.12. Signed-off-by: Richard Henderson --- ChangeLog.alpha | 5 +++++ sysdeps/unix/sysv/linux/alpha/Versions | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index fc386bbc5e..47e4aaaf68 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,8 @@ +2010-03-26 Richard Henderson + + * sysdeps/unix/sysv/linux/alpha/Versions: Update errlist-compat + for GLIBC_2.12. + 2010-03-26 Richard Henderson * sysdeps/alpha/fpu/fegetenv.c: Add hidden alias. diff --git a/sysdeps/unix/sysv/linux/alpha/Versions b/sysdeps/unix/sysv/linux/alpha/Versions index 8709dd2a38..5a617b4be2 100644 --- a/sysdeps/unix/sysv/linux/alpha/Versions +++ b/sysdeps/unix/sysv/linux/alpha/Versions @@ -77,6 +77,10 @@ libc { #errlist-compat 138 _sys_errlist; sys_errlist; _sys_nerr; sys_nerr; } + GLIBC_2.12 { + #errlist-compat 139 + _sys_errlist; sys_errlist; _sys_nerr; sys_nerr; + } GLIBC_PRIVATE { __libc_alpha_cache_shape; } From 05479f36bb5bf5fc48964fd1e2effc79406b36ef Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 26 Mar 2010 13:17:02 -0700 Subject: [PATCH 3987/4487] alpha: Implement ____longjmp_chk. Signed-off-by: Richard Henderson --- ChangeLog.alpha | 4 + .../unix/sysv/linux/alpha/____longjmp_chk.S | 139 ++++++++++++++++++ 2 files changed, 143 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/____longjmp_chk.S diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 47e4aaaf68..ded299ee48 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,7 @@ +2010-03-26 Richard Henderson + + * sysdeps/unix/sysv/linux/alpha/____longjmp_chk.S: New. + 2010-03-26 Richard Henderson * sysdeps/unix/sysv/linux/alpha/Versions: Update errlist-compat diff --git a/sysdeps/unix/sysv/linux/alpha/____longjmp_chk.S b/sysdeps/unix/sysv/linux/alpha/____longjmp_chk.S new file mode 100644 index 0000000000..5194ed818c --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/____longjmp_chk.S @@ -0,0 +1,139 @@ +/* Copyright (C) 1992, 1994, 1997, 2006, 2010 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. */ + +#include +#include + + + .section .rodata.str1.1,"aMS",@progbits,1 + .type longjmp_msg,@object +longjmp_msg: + .string "longjmp causes uninitialized stack frame" + .size longjmp_msg, .-longjmp_msg + + +/* Jump to the position specified by ENV, causing the + setjmp call there to return VAL, or 1 if VAL is 0. + void __longjmp (__jmp_buf env, int val). */ + .text + .align 4 + .globl ____longjmp_chk + .type ____longjmp_chk, @function + .usepv ____longjmp_chk, std + + cfi_startproc +____longjmp_chk: + ldgp gp, 0(pv) +#ifdef PROF + .set noat + lda AT, _mcount + jsr AT, (AT), _mcount + .set at +#endif + + ldq s2, JB_PC*8(a0) + mov a0, s0 + ldq fp, JB_FP*8(a0) + mov a1, s1 + ldq s3, JB_SP*8(a0) + cmoveq s1, 1, s1 + +#ifdef PTR_DEMANGLE + PTR_DEMANGLE(s2, t1) + PTR_DEMANGLE2(s3, t1) + PTR_DEMANGLE2(fp, t1) +#endif + cmpule t0, sp, t1 + bne t1, .Lfail + + .align 4 +.Lok: + mov s0, a0 + mov s1, v0 + mov s3, t0 + mov s2, ra + cfi_remember_state + cfi_def_cfa(a0, 0) + cfi_register(sp, t0) + cfi_offset(s0, JB_S0*8) + cfi_offset(s1, JB_S1*8) + cfi_offset(s2, JB_S2*8) + cfi_offset(s3, JB_S3*8) + cfi_offset(s4, JB_S4*8) + cfi_offset(s5, JB_S5*8) + cfi_offset(s3, JB_S3*8) + cfi_offset($f2, JB_F2*8) + cfi_offset($f3, JB_F3*8) + cfi_offset($f4, JB_F4*8) + cfi_offset($f5, JB_F5*8) + cfi_offset($f6, JB_F6*8) + cfi_offset($f7, JB_F7*8) + cfi_offset($f8, JB_F8*8) + cfi_offset($f9, JB_F9*8) + ldq s0, JB_S0*8(a0) + ldq s1, JB_S1*8(a0) + ldq s2, JB_S2*8(a0) + ldq s3, JB_S3*8(a0) + ldq s4, JB_S4*8(a0) + ldq s5, JB_S5*8(a0) + ldt $f2, JB_F2*8(a0) + ldt $f3, JB_F3*8(a0) + ldt $f4, JB_F4*8(a0) + ldt $f5, JB_F5*8(a0) + ldt $f6, JB_F6*8(a0) + ldt $f7, JB_F7*8(a0) + ldt $f8, JB_F8*8(a0) + ldt $f9, JB_F9*8(a0) + mov t0, sp + ret + + .align 4 +.Lfail: + cfi_restore_state + lda v0, __NR_sigaltstack + lda a0, 0 + lda a1, -32(sp) + lda sp, -32(sp) + cfi_adjust_cfa_offset(32) + callsys + ldq t0, 0(sp) /* ss_sp */ + ldl t1, 8(sp) /* ss_flags */ + ldq t2, 16(sp) /* ss_size */ + lda sp, 32(sp) + cfi_adjust_cfa_offset(-32) + + /* Without working sigaltstack we cannot perform the test. */ + bne a3, .Lok + + addq t0, t2, t0 /* t0 = ss_sp + ss_size */ + subq t0, s3, t0 /* t0 = (ss_sp + ss_size) - new_sp */ + cmpule t2, t0, t0 /* t0 = (t0 >= ss_size) */ + and t0, t1, t0 /* t0 = (t0 >= ss_size) & (ss_flags & SS_ONSTACK) */ + bne t0, .Lok + + ldah a0, longjmp_msg(gp) !gprelhigh + lda a0, longjmp_msg(a0) !gprellow +#ifdef PIC + jsr ra, HIDDEN_JUMPTARGET(__fortify_fail) +#else + bsr ra, HIDDEN_JUMPTARGET(__fortify_fail) !samegp +#endif + bugchk + + cfi_endproc + .size ____longjmp_chk, .-____longjmp_chk From e9823ee1b8175d246645ec8f2b388eef5a0d2772 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 30 Mar 2010 13:16:44 +0000 Subject: [PATCH 3988/4487] Define MSG_WAITFORONE for MIPS. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/bits/socket.h | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 272b2f30c6..58f0a34c68 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2010-03-30 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/socket.h: Define + MSG_WAITFORONE. + 2010-03-24 Joseph Myers * sysdeps/mips/dl-lookup.c: Update from generic version. diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h index 4899077a96..9f90216c97 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/socket.h +++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h @@ -1,6 +1,6 @@ /* System-specific socket constants and types. Linux/MIPS version. Copyright (C) 1991, 92, 1994-1999, 2000, 2001, 2004, 2005, 2006, 2007, 2008, - 2009 Free Software Foundation, Inc. + 2009, 2010 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 @@ -232,6 +232,8 @@ enum #define MSG_NOSIGNAL MSG_NOSIGNAL MSG_MORE = 0x8000, /* Sender will send more. */ #define MSG_MORE MSG_MORE + MSG_WAITFORONE = 0x10000, /* Wait for at least one packet to return.*/ +#define MSG_WAITFORONE MSG_WAITFORONE MSG_CMSG_CLOEXEC = 0x40000000 /* Set close_on_exit for file descriptor received through From b14e8cb2857b3cf617fac669d72946bc402bafa0 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Fri, 26 Mar 2010 16:49:55 -0400 Subject: [PATCH 3989/4487] alpha: create kernel-features.h. Signed-off-by: Matt Turner --- .../unix/sysv/linux/alpha/kernel-features.h | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/kernel-features.h diff --git a/sysdeps/unix/sysv/linux/alpha/kernel-features.h b/sysdeps/unix/sysv/linux/alpha/kernel-features.h new file mode 100644 index 0000000000..f611d58f01 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/kernel-features.h @@ -0,0 +1,68 @@ +/* Set flags signalling availability of kernel features based on given + kernel version number. + Copyright (C) 2010 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. */ + +/* alpha switched to a 64-bit timeval sometime before 2.2.0. */ +#if __LINUX_KERNEL_VERSION >= 131584 +# define __ASSUME_TIMEVAL64 1 +#endif + +/* The tgkill syscall was introduced for alpha 2.6.0-test1 which unfortunately + cannot be distinguished from 2.6.0. */ +#if __LINUX_KERNEL_VERSION >= 132609 +# define __ASSUME_TGKILL 1 +#endif + +#define __ASSUME_UTIMES 1 + +/* Starting with version 2.6.9, SSI_IEEE_RAISE_EXCEPTION exists. */ +#if __LINUX_KERNEL_VERSION >= 0x020609 +# define __ASSUME_IEEE_RAISE_EXCEPTION 1 +#endif + +#include_next + +#undef __ASSUME_ST_INO_64_BIT + +/* pselect/ppoll were introduced on alpha just after 2.6.22-rc1. */ +#if __LINUX_KERNEL_VERSION < 0x020617 +# undef __ASSUME_PSELECT +# undef __ASSUME_PPOLL +#endif + +/* The *at syscalls were introduced on alpha just after 2.6.22-rc1. */ +#if __LINUX_KERNEL_VERSION < 0x020617 +# undef __ASSUME_ATFCTS +#endif + +/* Support for inter-process robust mutexes was added on alpha just + after 2.6.22-rc1. */ +#if __LINUX_KERNEL_VERSION < 0x020617 +# undef __ASSUME_SET_ROBUST_LIST +#endif + +/* Support for utimensat was added on alpha after 2.6.22-rc1. */ +#if __LINUX_KERNEL_VERSION < 0x020617 +# undef __ASSUME_UTIMENSAT +#endif + +/* Support for fallocate was added on alpha for 2.6.33. */ +#if __LINUX_KERNEL_VERSION < 0x020621 +# undef __ASSUME_FALLOCATE +#endif From 742c00d3d9eb5e5a62e4e9ac7b8eae51b2f2d224 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Fri, 26 Mar 2010 16:49:56 -0400 Subject: [PATCH 3990/4487] alpha: update kernel-features.h for syscalls added in 2.6.33. Signed-off-by: Matt Turner --- .../unix/sysv/linux/alpha/kernel-features.h | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/kernel-features.h b/sysdeps/unix/sysv/linux/alpha/kernel-features.h index f611d58f01..0f236a222a 100644 --- a/sysdeps/unix/sysv/linux/alpha/kernel-features.h +++ b/sysdeps/unix/sysv/linux/alpha/kernel-features.h @@ -36,6 +36,31 @@ # define __ASSUME_IEEE_RAISE_EXCEPTION 1 #endif +/* Support for the O_CLOEXEC flag was added for alpha in 2.6.23. */ +#if __LINUX_KERNEL_VERSION >= 0x020617 +# define __ASSUME_O_CLOEXEC 1 +#endif + +/* Support for various CLOEXEC and NONBLOCK flags was added for alpha after + 2.6.33-rc1. */ +#if __LINUX_KERNEL_VERSION >= 0x020621 +# define __ASSUME_SOCK_CLOEXEC 1 +# define __ASSUME_IN_NONBLOCK 1 +#endif + +/* Support for the pipe2, eventfd2, signalfd4 syscalls was added for alpha + after 2.6.33-rc1. */ +#if __LINUX_KERNEL_VERSION >= 0x020621 +# define __ASSUME_PIPE2 1 +# define __ASSUME_EVENTFD2 1 +# define __ASSUME_SIGNALFD4 1 +#endif + +/* Support for accept4 was added for alpha after 2.6.33-rc1. */ +#if __LINUX_KERNEL_VERSION >= 0x020621 +# define __ASSUME_ACCEPT4 1 +#endif + #include_next #undef __ASSUME_ST_INO_64_BIT @@ -62,7 +87,7 @@ # undef __ASSUME_UTIMENSAT #endif -/* Support for fallocate was added on alpha for 2.6.33. */ +/* Support for fallocate was added for alpha after 2.6.33-rc1. */ #if __LINUX_KERNEL_VERSION < 0x020621 # undef __ASSUME_FALLOCATE #endif From 3648b8073b534d49b157cd0c071934697b9de300 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 30 Mar 2010 07:48:27 -0700 Subject: [PATCH 3991/4487] Update ChangeLog for alpha kernel-features.h pulls. --- ChangeLog.alpha | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index ded299ee48..c1be819c18 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,7 @@ +2010-03-30 Matt Turner + + * sysdeps/unix/sysv/linux/alpha/kernel-features.h: New. + 2010-03-26 Richard Henderson * sysdeps/unix/sysv/linux/alpha/____longjmp_chk.S: New. From 8eb49e8ae8161f7736697196bc26372f4f4d1f82 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 30 Mar 2010 07:50:27 -0700 Subject: [PATCH 3992/4487] alpha: Define MSG_WAITFORONE. Signed-off-by: Richard Henderson --- ChangeLog.alpha | 4 ++++ sysdeps/unix/sysv/linux/alpha/bits/socket.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index c1be819c18..80c57d3c2c 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,7 @@ +2010-03-30 Richard Henderson + + * sysdeps/unix/sysv/linux/alpha/bits/socket.h (MSG_WAITFORONE): New. + 2010-03-30 Matt Turner * sysdeps/unix/sysv/linux/alpha/kernel-features.h: New. diff --git a/sysdeps/unix/sysv/linux/alpha/bits/socket.h b/sysdeps/unix/sysv/linux/alpha/bits/socket.h index dedf8bc8be..a39629cc53 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/socket.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/socket.h @@ -232,6 +232,8 @@ enum #define MSG_NOSIGNAL MSG_NOSIGNAL MSG_MORE = 0x8000, /* Sender will send more. */ #define MSG_MORE MSG_MORE + MSG_WAITFORONE = 0x10000, /* Wait for at least one packet to return.*/ +#define MSG_WAITFORONE MSG_WAITFORONE MSG_CMSG_CLOEXEC = 0x40000000 /* Set close_on_exit for file descriptor received through From 848fa4a9c0642f6103c86aac7f3ea9786bf34c1f Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 30 Mar 2010 16:26:07 +0000 Subject: [PATCH 3993/4487] Update ARM for ABIVERSION changes. --- ChangeLog.arm | 6 +++ sysdeps/arm/dl-machine.h | 12 +---- sysdeps/unix/sysv/linux/arm/ldsodefs.h | 65 ++++++++++++++++++++++++++ 3 files changed, 73 insertions(+), 10 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/arm/ldsodefs.h diff --git a/ChangeLog.arm b/ChangeLog.arm index aa8f2d777b..d13f4a3c35 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,9 @@ +2010-03-30 Joseph Myers + + * sysdeps/arm/dl-machine.h (VALID_ELF_ABIVERSION, VALID_ELF_OSABI, + VALID_ELF_HEADER): Remove. + * sysdeps/unix/sysv/linux/arm/ldsodefs.h: New. + 2010-03-26 Thomas Schwinge * sysdeps/arm/configure.in: New file. diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index f839d97b18..c55576356a 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -1,6 +1,6 @@ /* Machine-dependent ELF dynamic relocation inline functions. ARM version. - Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005 - Free Software Foundation, Inc. + Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005, + 2006, 2009, 2010 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 @@ -26,14 +26,6 @@ #include #include -#define VALID_ELF_ABIVERSION(ver) (ver == 0) -#define VALID_ELF_OSABI(osabi) \ - (osabi == ELFOSABI_SYSV || osabi == ELFOSABI_ARM) -#define VALID_ELF_HEADER(hdr,exp,size) \ - memcmp (hdr,exp,size-2) == 0 \ - && VALID_ELF_OSABI (hdr[EI_OSABI]) \ - && VALID_ELF_ABIVERSION (hdr[EI_ABIVERSION]) - #define CLEAR_CACHE(BEG,END) \ INTERNAL_SYSCALL_ARM (cacheflush, , 3, (BEG), (END), 0) diff --git a/sysdeps/unix/sysv/linux/arm/ldsodefs.h b/sysdeps/unix/sysv/linux/arm/ldsodefs.h new file mode 100644 index 0000000000..3747c3b5ae --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/ldsodefs.h @@ -0,0 +1,65 @@ +/* Run-time dynamic linker data structures for loaded ELF shared objects. + Copyright (C) 2010 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 _ARM_LINUX_LDSODEFS_H +#define _ARM_LINUX_LDSODEFS_H 1 + +#include_next + +#undef VALID_ELF_HEADER +#undef VALID_ELF_OSABI + +#ifdef __ARM_EABI__ +#define EXTRA_OSABI ELFOSABI_ARM_AEABI +#else +#define EXTRA_OSABI ELFOSABI_ARM +#endif + +#define VALID_ELF_HEADER(hdr,exp,size) \ + (memcmp (hdr, exp, size) == 0 \ + || memcmp (hdr, expected2, size) == 0 \ + || memcmp (hdr, expected3, size) == 0) +#define VALID_ELF_OSABI(osabi) (osabi == ELFOSABI_SYSV \ + || osabi == EXTRA_OSABI \ + || osabi == ELFOSABI_LINUX) +#define MORE_ELF_HEADER_DATA \ + static const unsigned char expected2[EI_PAD] = \ + { \ + [EI_MAG0] = ELFMAG0, \ + [EI_MAG1] = ELFMAG1, \ + [EI_MAG2] = ELFMAG2, \ + [EI_MAG3] = ELFMAG3, \ + [EI_CLASS] = ELFW(CLASS), \ + [EI_DATA] = byteorder, \ + [EI_VERSION] = EV_CURRENT, \ + [EI_OSABI] = ELFOSABI_LINUX \ + }; \ + static const unsigned char expected3[EI_PAD] = \ + { \ + [EI_MAG0] = ELFMAG0, \ + [EI_MAG1] = ELFMAG1, \ + [EI_MAG2] = ELFMAG2, \ + [EI_MAG3] = ELFMAG3, \ + [EI_CLASS] = ELFW(CLASS), \ + [EI_DATA] = byteorder, \ + [EI_VERSION] = EV_CURRENT, \ + [EI_OSABI] = EXTRA_OSABI \ + } + +#endif From 3af825d53bb0c7c75df9518e3f8fbac31cc39ff4 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Wed, 31 Mar 2010 13:52:39 -0400 Subject: [PATCH 3994/4487] hppa: Define MSG_WAITFORONE. Signed-off-by: Carlos O'Donell --- ChangeLog.hppa | 5 +++++ sysdeps/unix/sysv/linux/hppa/bits/socket.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 9fd9f89fb6..7dd7ce6dcb 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,8 @@ +2010-03-30 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/bits/socket.h: Define + MSG_WAITFORONE. + 2010-02-17 Matt Turner * sysdeps/unix/sysv/linux/hppa/bits/socket.h: Actually fix diff --git a/sysdeps/unix/sysv/linux/hppa/bits/socket.h b/sysdeps/unix/sysv/linux/hppa/bits/socket.h index 819b39820d..05814a0021 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/socket.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/socket.h @@ -233,6 +233,8 @@ enum #define MSG_NOSIGNAL MSG_NOSIGNAL MSG_MORE = 0x8000, /* Sender will send more. */ #define MSG_MORE MSG_MORE + MSG_WAITFORONE = 0x10000, /* Wait for at least one packet to return.*/ +#define MSG_WAITFORONE MSG_WAITFORONE MSG_CMSG_CLOEXEC = 0x40000000 /* Set close_on_exit for file descriptor received through From 1dbb4edc731763ddf362c2fbfc13850e5f9267e2 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 6 Apr 2010 20:26:22 +0000 Subject: [PATCH 3995/4487] Fix abiversion handling for MIPS. --- ChangeLog | 4 ++++ ChangeLog.mips | 7 +++++++ libc-abis | 16 ++++++++++++++++ sysdeps/mips/dl-machine.h | 9 --------- sysdeps/unix/sysv/linux/mips/ldsodefs.h | 8 ++++++++ 5 files changed, 35 insertions(+), 9 deletions(-) create mode 100644 libc-abis diff --git a/ChangeLog b/ChangeLog index fcd20111fc..135c1f806e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-04-06 Joseph Myers + + * libc-abis: New. + 2006-03-06 Roland McGrath * Makefile (%.bz2, %.gz): New pattern rules. diff --git a/ChangeLog.mips b/ChangeLog.mips index 58f0a34c68..4ac587173f 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,10 @@ +2010-04-06 Joseph Myers + + * sysdeps/mips/dl-machine.h (VALID_ELF_ABIVERSION, + VALID_ELF_OSABI, VALID_ELF_HEADER): Remove. + * sysdeps/unix/sysv/linux/mips/ldsodefs.h (VALID_ELF_ABIVERSION): + Define. + 2010-03-30 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/socket.h: Define diff --git a/libc-abis b/libc-abis new file mode 100644 index 0000000000..a66a9ec3a4 --- /dev/null +++ b/libc-abis @@ -0,0 +1,16 @@ +# See the copy of this file in libc for detailed explanations. The +# ports copy needs to include all libc definitions applicable to any +# ports target; only one copy will be used. +# +# Feature Name Configuration +# ------------ ------------- +# +# MIPS PLTs. +MIPS_PLT mips*-*-linux* +# +# Unique symbol definitions for C++. +# Architecture independent, all ELF targets (== all targets) +UNIQUE +# +# Indirect PLT relocations. Architecture dependent. +IFUNC powerpc-*-linux* diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index ef088bff3b..123b4d6b78 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -75,15 +75,6 @@ do { if ((l)->l_info[DT_MIPS (RLD_MAP)]) \ (ElfW(Addr)) (r); \ } while (0) -/* Allow ABIVERSION == 1, meaning PLTs and copy relocations are - required. */ -#define VALID_ELF_ABIVERSION(ver) (ver == 0 || ver == 2) -#define VALID_ELF_OSABI(osabi) (osabi == ELFOSABI_SYSV) -#define VALID_ELF_HEADER(hdr,exp,size) \ - memcmp (hdr,exp,size-2) == 0 \ - && VALID_ELF_OSABI (hdr[EI_OSABI]) \ - && VALID_ELF_ABIVERSION (hdr[EI_ABIVERSION]) - /* Return nonzero iff ELF header is compatible with the running host. */ static inline int __attribute_used__ elf_machine_matches_host (const ElfW(Ehdr) *ehdr) diff --git a/sysdeps/unix/sysv/linux/mips/ldsodefs.h b/sysdeps/unix/sysv/linux/mips/ldsodefs.h index 8d5efec8fb..2cb7db687a 100644 --- a/sysdeps/unix/sysv/linux/mips/ldsodefs.h +++ b/sysdeps/unix/sysv/linux/mips/ldsodefs.h @@ -30,4 +30,12 @@ extern void _dl_static_init (struct link_map *map); #undef DL_STATIC_INIT #define DL_STATIC_INIT(map) _dl_static_init (map) +/* Allow ABIVERSION == 1, meaning PLTs and copy relocations are + required, with ELFOSABI_SYSV. */ +#undef VALID_ELF_ABIVERSION +#define VALID_ELF_ABIVERSION(osabi,ver) \ + (ver == 0 \ + || (osabi == ELFOSABI_SYSV && ver < 2) \ + || (osabi == ELFOSABI_LINUX && ver < LIBC_ABI_MAX)) + #endif /* ldsodefs.h */ From 2dcd7ed8fd149a5aefc8c7a7ff041ff389348b4f Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Thu, 8 Apr 2010 12:43:55 -0400 Subject: [PATCH 3996/4487] Fix unwinding through Thumb-2 system calls. --- ChangeLog.arm | 9 ++++ sysdeps/unix/sysv/linux/arm/eabi/Makefile | 31 +++++++++++ .../sysv/linux/arm/eabi/libc-do-syscall.S | 43 +++++++++++++++ .../unix/sysv/linux/arm/eabi/nptl/aio_misc.h | 52 ------------------- sysdeps/unix/sysv/linux/arm/eabi/sysdep.h | 38 ++++++++------ 5 files changed, 104 insertions(+), 69 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S delete mode 100644 sysdeps/unix/sysv/linux/arm/eabi/nptl/aio_misc.h diff --git a/ChangeLog.arm b/ChangeLog.arm index d13f4a3c35..363b86521a 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,12 @@ +2010-04-08 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S: New file. + * sysdeps/unix/sysv/linux/arm/eabi/sysdep.h [__thumb__] + (INTERNAL_SYSCALL_RAW): Rewrite to use __libc_do_syscall. + * sysdeps/unix/sysv/linux/arm/eabi/Makefile: Add libc-do-syscall + to libraries and tests that require it. + * sysdeps/unix/sysv/linux/arm/eabi/nptl/aio_misc.h: Delete. + 2010-03-30 Joseph Myers * sysdeps/arm/dl-machine.h (VALID_ELF_ABIVERSION, VALID_ELF_OSABI, diff --git a/sysdeps/unix/sysv/linux/arm/eabi/Makefile b/sysdeps/unix/sysv/linux/arm/eabi/Makefile index 9f2b0fe8f4..761c96406d 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/Makefile +++ b/sysdeps/unix/sysv/linux/arm/eabi/Makefile @@ -7,3 +7,34 @@ ifeq ($(subdir),csu) # unwind tables for __libc_start_main. CFLAGS-libc-start.c += -fexceptions endif + +# Add a syscall function to each library that needs one. + +ifeq ($(subdir),rt) +librt-sysdep_routines += libc-do-syscall +librt-shared-only-routines += libc-do-syscall +endif + +ifeq ($(subdir),nptl) +libpthread-sysdep_routines += libc-do-syscall +libpthread-shared-only-routines += libc-do-syscall +endif + +ifeq ($(subdir),resolv) +libanl-sysdep_routines += libc-do-syscall +libanl-shared-only-routines += libc-do-syscall +endif + +ifeq ($(subdir),csu) +sysdep_routines += libc-do-syscall +endif + +ifeq ($(subdir),nscd) +nscd-modules += libc-do-syscall +endif + +ifeq ($(subdir),posix) +LDFLAGS-tst-rfc3484 += $(common-objpfx)csu/libc-do-syscall.o +LDFLAGS-tst-rfc3484-2 += $(common-objpfx)csu/libc-do-syscall.o +LDFLAGS-tst-rfc3484-3 += $(common-objpfx)csu/libc-do-syscall.o +endif diff --git a/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S b/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S new file mode 100644 index 0000000000..d461712af0 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S @@ -0,0 +1,43 @@ +/* Copyright (C) 2010 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. */ + +#include + +/* Out-of-line syscall stub. We expect the system call number in ip + and return the raw result in r0. No registers are clobbered. + We could avoid using the stack for this, but the goal is accurate + unwind information - and while there is a reserved prefix in the + ARM unwind tables for register to register moves, the actual opcodes + are not defined. */ + + .thumb + .syntax unified + .hidden __libc_do_syscall + +ENTRY (__libc_do_syscall) + .fnstart + push {r7, lr} + .save {r7, lr} + cfi_adjust_cfa_offset (8) + cfi_rel_offset (r7, 0) + cfi_rel_offset (lr, 4) + mov r7, ip + swi 0x0 + pop {r7, pc} + .fnend +END (__libc_do_syscall) diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/aio_misc.h b/sysdeps/unix/sysv/linux/arm/eabi/nptl/aio_misc.h deleted file mode 100644 index 3fb1ec95fd..0000000000 --- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/aio_misc.h +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright (C) 2008 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. */ - -#include_next - -#ifdef __thumb2__ - -#include - -/* The Thumb-2 definition of INTERNAL_SYSCALL_RAW has to hide the use - of r7 from the compiler because it cannot handle asm clobbering the - hard frame pointer. In aio_suspend, GCC does not eliminate the - hard frame pointer because the function uses variable-length - arrays, so it generates unwind information using r7 as virtual - stack pointer. During system calls, when r7 has been saved on the - stack, this means the unwind information is invalid. Without extra - unwind directives, which would need to cause unwind information for - the asm to be generated separately from that for the parts of the - function before and after the asm (with three index table entries), - it is not possible to represent any temporary change to the virtual - stack pointer. Instead, we move the problematic system calls out - of line into a function that does not require a frame pointer. */ - -static __attribute_noinline__ void -aio_misc_wait (int *resultp, - volatile int *futexp, - const struct timespec *timeout, - int cancel) -{ - AIO_MISC_WAIT (*resultp, *futexp, timeout, cancel); -} - -#undef AIO_MISC_WAIT -#define AIO_MISC_WAIT(result, futex, timeout, cancel) \ - aio_misc_wait (&result, &futex, timeout, cancel) - -#endif diff --git a/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h b/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h index 9d90f3e35f..b7815babf4 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h @@ -44,30 +44,34 @@ argument; otherwise the (optional) compatibility code for APCS binaries may be invoked. */ -#ifdef __thumb__ -/* Hide the use of r7 from the compiler, this would be a lot - easier but for the fact that the syscalls can exceed 255. - For the moment the LOAD_ARGS_7 is sacrificed. +#if defined(__thumb__) +/* We can not expose the use of r7 to the compiler. GCC (as + of 4.5) uses r7 as the hard frame pointer for Thumb - although + for Thumb-2 it isn't obviously a better choice than r11. + And GCC does not support asms that conflict with the frame + pointer. + + This would be easier if syscall numbers never exceeded 255, + but they do. For the moment the LOAD_ARGS_7 is sacrificed. We can't use push/pop inside the asm because that breaks - unwinding (ie. thread cancellation). */ -/* FIXME: the str / ldr of r7 are not covered by CFI information. */ + unwinding (i.e. thread cancellation) for this frame. We can't + locally save and restore r7, because we do not know if this + function uses r7 or if it is our caller's r7; if it is our caller's, + then unwinding will fail higher up the stack. So we move the + syscall out of line and provide its own unwind information. */ #undef LOAD_ARGS_7 #undef INTERNAL_SYSCALL_RAW #define INTERNAL_SYSCALL_RAW(name, err, nr, args...) \ ({ \ - int _sys_buf[2]; \ register int _a1 asm ("a1"); \ - register int *_r6 asm ("r6") = _sys_buf; \ - *_r6 = name; \ + int _nametmp = name; \ LOAD_ARGS_##nr (args) \ - asm volatile ("str r7, [r6, #4]\n\t" \ - "ldr r7, [r6]\n\t" \ - "swi 0 @ syscall " #name "\n\t" \ - "ldr r7, [r6, #4]" \ - : "=r" (_a1) \ - : "r" (_r6) ASM_ARGS_##nr \ - : "memory"); \ - _a1; }) + register int _name asm ("ip") = _nametmp; \ + asm volatile ("bl __libc_do_syscall" \ + : "=r" (_a1) \ + : "r" (_name) ASM_ARGS_##nr \ + : "memory", "lr"); \ + _a1; }) #else /* ARM */ #undef INTERNAL_SYSCALL_RAW #define INTERNAL_SYSCALL_RAW(name, err, nr, args...) \ From b1ab8c5fd986325e22aba86ec54aa4df6695b555 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 14 Apr 2010 19:28:10 +0000 Subject: [PATCH 3997/4487] Update MIPS libc-abis configuration for libc changes. --- ChangeLog | 4 ++++ ChangeLog.mips | 4 ++++ libc-abis => sysdeps/unix/sysv/linux/mips/libc-abis | 9 +++------ 3 files changed, 11 insertions(+), 6 deletions(-) rename libc-abis => sysdeps/unix/sysv/linux/mips/libc-abis (57%) diff --git a/ChangeLog b/ChangeLog index 135c1f806e..e42182fda6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-04-14 Joseph Myers + + * libc-abis: Remove. + 2010-04-06 Joseph Myers * libc-abis: New. diff --git a/ChangeLog.mips b/ChangeLog.mips index 4ac587173f..2ea65732c9 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,7 @@ +2010-04-14 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/libc-abis: New. + 2010-04-06 Joseph Myers * sysdeps/mips/dl-machine.h (VALID_ELF_ABIVERSION, diff --git a/libc-abis b/sysdeps/unix/sysv/linux/mips/libc-abis similarity index 57% rename from libc-abis rename to sysdeps/unix/sysv/linux/mips/libc-abis index a66a9ec3a4..f180a03efd 100644 --- a/libc-abis +++ b/sysdeps/unix/sysv/linux/mips/libc-abis @@ -1,6 +1,6 @@ -# See the copy of this file in libc for detailed explanations. The -# ports copy needs to include all libc definitions applicable to any -# ports target; only one copy will be used. +# See the copy of this file in libc for detailed explanations. This +# copy needs to include all libc definitions applicable to MIPS; only +# one copy will be used. # # Feature Name Configuration # ------------ ------------- @@ -11,6 +11,3 @@ MIPS_PLT mips*-*-linux* # Unique symbol definitions for C++. # Architecture independent, all ELF targets (== all targets) UNIQUE -# -# Indirect PLT relocations. Architecture dependent. -IFUNC powerpc-*-linux* From 6a84c77c7162a3bef67c5faf7e27457e2fb5fff7 Mon Sep 17 00:00:00 2001 From: GOTO Masanori Date: Mon, 3 May 2010 23:25:04 -0400 Subject: [PATCH 3998/4487] alpha: fix *xstat.c build failure for Linux headers < 2.6.4 Fixes glibc bug 1026. http://sourceware.org/ml/libc-alpha/2005-02/msg00122.html Signed-off-by: Matt Turner --- ChangeLog.alpha | 13 ++++++++++ sysdeps/unix/sysv/linux/alpha/fxstat.c | 24 ++++++++++++++----- sysdeps/unix/sysv/linux/alpha/fxstatat.c | 15 ++++++++++++ .../unix/sysv/linux/alpha/kernel-features.h | 5 ++++ sysdeps/unix/sysv/linux/alpha/lxstat.c | 24 ++++++++++++++----- sysdeps/unix/sysv/linux/alpha/xstat.c | 24 ++++++++++++++----- sysdeps/unix/sysv/linux/alpha/xstatconv.c | 5 ++++ sysdeps/unix/sysv/linux/alpha/xstatconv.h | 5 ++++ 8 files changed, 97 insertions(+), 18 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 80c57d3c2c..80236fe3e2 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,16 @@ +2010-05-03 GOTO Masanori + + * sysdeps/unix/sysv/linux/alpha/kernel-features.h: Define + __ASSUME_STAT64_SYSCALL. + * sysdeps/unix/sysv/linux/alpha/fxstat.c: Check + __ASSUME_STAT64_SYSCALL. + * sysdeps/unix/sysv/linux/alpha/fxstatat.c: Likewise. + * sysdeps/unix/sysv/linux/alpha/lxstat.c: Likewise. + * sysdeps/unix/sysv/linux/alpha/xstat.c: Likewise. + * sysdeps/unix/sysv/linux/alpha/xstatconv.c: Don't define + __libc_missing_axp_stat64 when it's not needed. + * sysdeps/unix/sysv/linux/alpha/xstatconv.h: Likewise. + 2010-03-30 Richard Henderson * sysdeps/unix/sysv/linux/alpha/bits/socket.h (MSG_WAITFORONE): New. diff --git a/sysdeps/unix/sysv/linux/alpha/fxstat.c b/sysdeps/unix/sysv/linux/alpha/fxstat.c index 40e08fd86e..198986708e 100644 --- a/sysdeps/unix/sysv/linux/alpha/fxstat.c +++ b/sysdeps/unix/sysv/linux/alpha/fxstat.c @@ -35,27 +35,39 @@ int __fxstat (int vers, int fd, struct stat *buf) { INTERNAL_SYSCALL_DECL (err); - int result, errno_out; + int result; struct kernel_stat kbuf; +#if __ASSUME_STAT64_SYSCALL > 0 + if (vers == _STAT_VER_KERNEL64) + { + result = INTERNAL_SYSCALL (fstat64, err, 2, fd, buf); + if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) + return result; + __set_errno (INTERNAL_SYSCALL_ERRNO (result, err)); + return -1; + } +#elif defined __NR_fstat64 if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64) { + int errno_out; result = INTERNAL_SYSCALL (fstat64, err, 2, fd, buf); if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) return result; errno_out = INTERNAL_SYSCALL_ERRNO (result, err); if (errno_out != ENOSYS) - goto fail; + { + __set_errno (errno_out); + return -1; + } __libc_missing_axp_stat64 = 1; } +#endif result = INTERNAL_SYSCALL (fstat, err, 2, fd, &kbuf); if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) return __xstat_conv (vers, &kbuf, buf); - errno_out = INTERNAL_SYSCALL_ERRNO (result, err); - - fail: - __set_errno (errno_out); + __set_errno (INTERNAL_SYSCALL_ERRNO (result, err)); return -1; } hidden_def (__fxstat) diff --git a/sysdeps/unix/sysv/linux/alpha/fxstatat.c b/sysdeps/unix/sysv/linux/alpha/fxstatat.c index 66cf4f7229..6fa3aeb14b 100644 --- a/sysdeps/unix/sysv/linux/alpha/fxstatat.c +++ b/sysdeps/unix/sysv/linux/alpha/fxstatat.c @@ -71,6 +71,20 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag) int result, errno_out; struct kernel_stat kst; +#if __ASSUME_STAT64_SYSCALL > 0 + if (vers == _STAT_VER_KERNEL64) + { + if (flag & AT_SYMLINK_NOFOLLOW) + result = INTERNAL_SYSCALL (lstat64, err, 2, file, st); + else + result = INTERNAL_SYSCALL (stat64, err, 2, file, st); + + if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) + return result; + errno_out = INTERNAL_SYSCALL_ERRNO (result, err); + goto fail; + } +#elif defined __NR_stat64 if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64) { if (flag & AT_SYMLINK_NOFOLLOW) @@ -85,6 +99,7 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag) goto fail; __libc_missing_axp_stat64 = 1; } +#endif if (flag & AT_SYMLINK_NOFOLLOW) result = INTERNAL_SYSCALL (lstat, err, 2, file, &kst); diff --git a/sysdeps/unix/sysv/linux/alpha/kernel-features.h b/sysdeps/unix/sysv/linux/alpha/kernel-features.h index 0f236a222a..9c640f9849 100644 --- a/sysdeps/unix/sysv/linux/alpha/kernel-features.h +++ b/sysdeps/unix/sysv/linux/alpha/kernel-features.h @@ -29,6 +29,11 @@ # define __ASSUME_TGKILL 1 #endif +/* Starting with version 2.6.4, the stat64 syscalls are available. */ +#if __LINUX_KERNEL_VERSION >= 0x020604 && defined __alpha__ +# define __ASSUME_STAT64_SYSCALL 1 +#endif + #define __ASSUME_UTIMES 1 /* Starting with version 2.6.9, SSI_IEEE_RAISE_EXCEPTION exists. */ diff --git a/sysdeps/unix/sysv/linux/alpha/lxstat.c b/sysdeps/unix/sysv/linux/alpha/lxstat.c index 38fac2e2b2..8fa58688ad 100644 --- a/sysdeps/unix/sysv/linux/alpha/lxstat.c +++ b/sysdeps/unix/sysv/linux/alpha/lxstat.c @@ -35,27 +35,39 @@ int __lxstat (int vers, const char *name, struct stat *buf) { INTERNAL_SYSCALL_DECL (err); - int result, errno_out; + int result; struct kernel_stat kbuf; +#if __ASSUME_STAT64_SYSCALL > 0 + if (vers == _STAT_VER_KERNEL64) + { + result = INTERNAL_SYSCALL (lstat64, err, 2, name, buf); + if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) + return result; + __set_errno (INTERNAL_SYSCALL_ERRNO (result, err)); + return -1; + } +#elif defined __NR_lstat64 if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64) { + int errno_out; result = INTERNAL_SYSCALL (lstat64, err, 2, name, buf); if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) return result; errno_out = INTERNAL_SYSCALL_ERRNO (result, err); if (errno_out != ENOSYS) - goto fail; + { + __set_errno (errno_out); + return -1; + } __libc_missing_axp_stat64 = 1; } +#endif result = INTERNAL_SYSCALL (lstat, err, 2, name, &kbuf); if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) return __xstat_conv (vers, &kbuf, buf); - errno_out = INTERNAL_SYSCALL_ERRNO (result, err); - - fail: - __set_errno (errno_out); + __set_errno (INTERNAL_SYSCALL_ERRNO (result, err)); return -1; } hidden_def (__lxstat) diff --git a/sysdeps/unix/sysv/linux/alpha/xstat.c b/sysdeps/unix/sysv/linux/alpha/xstat.c index b7488e425c..530d399187 100644 --- a/sysdeps/unix/sysv/linux/alpha/xstat.c +++ b/sysdeps/unix/sysv/linux/alpha/xstat.c @@ -35,27 +35,39 @@ int __xstat (int vers, const char *name, struct stat *buf) { INTERNAL_SYSCALL_DECL (err); - int result, errno_out; + int result; struct kernel_stat kbuf; +#if __ASSUME_STAT64_SYSCALL > 0 + if (vers == _STAT_VER_KERNEL64) + { + result = INTERNAL_SYSCALL (stat64, err, 2, name, buf); + if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) + return result; + __set_errno (INTERNAL_SYSCALL_ERRNO (result, err)); + return -1; + } +#elif defined __NR_stat64 if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64) { + int errno_out; result = INTERNAL_SYSCALL (stat64, err, 2, name, buf); if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) return result; errno_out = INTERNAL_SYSCALL_ERRNO (result, err); if (errno_out != ENOSYS) - goto fail; + { + __set_errno (errno_out); + return -1; + } __libc_missing_axp_stat64 = 1; } +#endif result = INTERNAL_SYSCALL (stat, err, 2, name, &kbuf); if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) return __xstat_conv (vers, &kbuf, buf); - errno_out = INTERNAL_SYSCALL_ERRNO (result, err); - - fail: - __set_errno (errno_out); + __set_errno (INTERNAL_SYSCALL_ERRNO (result, err)); return -1; } hidden_def (__xstat) diff --git a/sysdeps/unix/sysv/linux/alpha/xstatconv.c b/sysdeps/unix/sysv/linux/alpha/xstatconv.c index a193b62ad1..86bb374745 100644 --- a/sysdeps/unix/sysv/linux/alpha/xstatconv.c +++ b/sysdeps/unix/sysv/linux/alpha/xstatconv.c @@ -22,9 +22,14 @@ #include #include #include +#include +#ifdef __NR_stat64 +# if __ASSUME_STAT64_SYSCALL == 0 int __libc_missing_axp_stat64; +# endif +#endif int __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf) diff --git a/sysdeps/unix/sysv/linux/alpha/xstatconv.h b/sysdeps/unix/sysv/linux/alpha/xstatconv.h index 094d11e5c9..21e1de8de6 100644 --- a/sysdeps/unix/sysv/linux/alpha/xstatconv.h +++ b/sysdeps/unix/sysv/linux/alpha/xstatconv.h @@ -18,7 +18,12 @@ 02111-1307 USA. */ #include +#include +#ifdef __NR_stat64 +# if __ASSUME_STAT64_SYSCALL == 0 extern int __libc_missing_axp_stat64 attribute_hidden; +# endif +#endif extern int __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf) attribute_hidden; From 116ff9ad1801108d084fd9ff94241f26a33dff1c Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Mon, 3 May 2010 23:25:05 -0400 Subject: [PATCH 3999/4487] alpha: fix corner cases in ceil, floor, rint. Partial revert of bebc49030c15. Even with the revert, ceil and floor are still faster than libcpml's equivalent. Fixes bug 5350. Signed-off-by: Matt Turner --- ChangeLog.alpha | 9 +++++++++ sysdeps/alpha/fpu/s_ceil.c | 27 +++++++++++++++----------- sysdeps/alpha/fpu/s_ceilf.c | 32 ++++++++++++++++++++----------- sysdeps/alpha/fpu/s_floor.c | 32 ++++++++++++++++++------------- sysdeps/alpha/fpu/s_floorf.c | 37 +++++++++++++++++++++++------------- sysdeps/alpha/fpu/s_rint.c | 27 +++++++++++++++++--------- sysdeps/alpha/fpu/s_rintf.c | 33 +++++++++++++++++++++++--------- 7 files changed, 131 insertions(+), 66 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 80236fe3e2..8b0a82428b 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,12 @@ +2010-05-03 Aurelien Jarno + + * sysdeps/alpha/fpu/s_ceil.c: Fix corner cases. + * sysdeps/alpha/fpu/s_ceilf.c: Likewise. + * sysdeps/alpha/fpu/s_floor.c: Likewise. + * sysdeps/alpha/fpu/s_floorf.c: Likewise. + * sysdeps/alpha/fpu/s_rint.c: Likewise. + * sysdeps/alpha/fpu/s_rintf.c: Likewise. + 2010-05-03 GOTO Masanori * sysdeps/unix/sysv/linux/alpha/kernel-features.h: Define diff --git a/sysdeps/alpha/fpu/s_ceil.c b/sysdeps/alpha/fpu/s_ceil.c index 40c2379286..fe20902450 100644 --- a/sysdeps/alpha/fpu/s_ceil.c +++ b/sysdeps/alpha/fpu/s_ceil.c @@ -27,20 +27,25 @@ double __ceil (double x) { - double two52 = copysign (0x1.0p52, x); - double r, tmp; - - __asm ( + if (isless (fabs (x), 9007199254740992.0)) /* 1 << DBL_MANT_DIG */ + { + double tmp1, new_x; + + new_x = -x; + __asm ( #ifdef _IEEE_FP_INEXACT - "addt/suim %2, %3, %1\n\tsubt/suim %1, %3, %0" + "cvttq/svim %2,%1\n\t" #else - "addt/sum %2, %3, %1\n\tsubt/sum %1, %3, %0" + "cvttq/svm %2,%1\n\t" #endif - : "=&f"(r), "=&f"(tmp) - : "f"(-x), "f"(-two52)); - - /* Fix up the negation we did above, as well as handling -0 properly. */ - return copysign (r, x); + "cvtqt/m %1,%0\n\t" + : "=f"(new_x), "=&f"(tmp1) + : "f"(new_x)); + + /* Fix up the negation we did above, as well as handling -0 properly. */ + x = copysign(new_x, x); + } + return x; } weak_alias (__ceil, ceil) diff --git a/sysdeps/alpha/fpu/s_ceilf.c b/sysdeps/alpha/fpu/s_ceilf.c index 0df651f405..c722e7294e 100644 --- a/sysdeps/alpha/fpu/s_ceilf.c +++ b/sysdeps/alpha/fpu/s_ceilf.c @@ -26,20 +26,30 @@ float __ceilf (float x) { - float two23 = copysignf (0x1.0p23, x); - float r, tmp; - - __asm ( + if (isless (fabsf (x), 16777216.0f)) /* 1 << FLT_MANT_DIG */ + { + /* Note that Alpha S_Floating is stored in registers in a + restricted T_Floating format, so we don't even need to + convert back to S_Floating in the end. The initial + conversion to T_Floating is needed to handle denormals. */ + + float tmp1, tmp2, new_x; + + new_x = -x; + __asm ("cvtst/s %3,%2\n\t" #ifdef _IEEE_FP_INEXACT - "adds/suim %2, %3, %1\n\tsubs/suim %1, %3, %0" + "cvttq/svim %2,%1\n\t" #else - "adds/sum %2, %3, %1\n\tsubs/sum %1, %3, %0" + "cvttq/svm %2,%1\n\t" #endif - : "=&f"(r), "=&f"(tmp) - : "f"(-x), "f"(-two23)); - - /* Fix up the negation we did above, as well as handling -0 properly. */ - return copysignf (r, x); + "cvtqt/m %1,%0\n\t" + : "=f"(new_x), "=&f"(tmp1), "=&f"(tmp2) + : "f"(new_x)); + + /* Fix up the negation we did above, as well as handling -0 properly. */ + x = copysignf(new_x, x); + } + return x; } weak_alias (__ceilf, ceilf) diff --git a/sysdeps/alpha/fpu/s_floor.c b/sysdeps/alpha/fpu/s_floor.c index 5af6386155..6b16401e43 100644 --- a/sysdeps/alpha/fpu/s_floor.c +++ b/sysdeps/alpha/fpu/s_floor.c @@ -21,26 +21,32 @@ #include -/* Use the -inf rounding mode conversion instructions to implement floor. */ +/* Use the -inf rounding mode conversion instructions to implement + floor. We note when the exponent is large enough that the value + must be integral, as this avoids unpleasant integer overflows. */ double __floor (double x) { - double two52 = copysign (0x1.0p52, x); - double r, tmp; - - __asm ( + if (isless (fabs (x), 9007199254740992.0)) /* 1 << DBL_MANT_DIG */ + { + double tmp1, new_x; + + __asm ( #ifdef _IEEE_FP_INEXACT - "addt/suim %2, %3, %1\n\tsubt/suim %1, %3, %0" + "cvttq/svim %2,%1\n\t" #else - "addt/sum %2, %3, %1\n\tsubt/sum %1, %3, %0" + "cvttq/svm %2,%1\n\t" #endif - : "=&f"(r), "=&f"(tmp) - : "f"(x), "f"(two52)); - - /* floor(-0) == -0, and in general we'll always have the same - sign as our input. */ - return copysign (r, x); + "cvtqt/m %1,%0\n\t" + : "=f"(new_x), "=&f"(tmp1) + : "f"(x)); + + /* floor(-0) == -0, and in general we'll always have the same + sign as our input. */ + x = copysign(new_x, x); + } + return x; } weak_alias (__floor, floor) diff --git a/sysdeps/alpha/fpu/s_floorf.c b/sysdeps/alpha/fpu/s_floorf.c index 8b421705cd..5da08ae107 100644 --- a/sysdeps/alpha/fpu/s_floorf.c +++ b/sysdeps/alpha/fpu/s_floorf.c @@ -20,26 +20,37 @@ #include -/* Use the -inf rounding mode conversion instructions to implement floor. */ +/* Use the -inf rounding mode conversion instructions to implement + floor. We note when the exponent is large enough that the value + must be integral, as this avoids unpleasant integer overflows. */ float __floorf (float x) { - float two23 = copysignf (0x1.0p23, x); - float r, tmp; - - __asm ( + if (isless (fabsf (x), 16777216.0f)) /* 1 << FLT_MANT_DIG */ + { + /* Note that Alpha S_Floating is stored in registers in a + restricted T_Floating format, so we don't even need to + convert back to S_Floating in the end. The initial + conversion to T_Floating is needed to handle denormals. */ + + float tmp1, tmp2, new_x; + + __asm ("cvtst/s %3,%2\n\t" #ifdef _IEEE_FP_INEXACT - "adds/suim %2, %3, %1\n\tsubs/suim %1, %3, %0" + "cvttq/svim %2,%1\n\t" #else - "adds/sum %2, %3, %1\n\tsubs/sum %1, %3, %0" + "cvttq/svm %2,%1\n\t" #endif - : "=&f"(r), "=&f"(tmp) - : "f"(x), "f"(two23)); - - /* floor(-0) == -0, and in general we'll always have the same - sign as our input. */ - return copysignf (r, x); + "cvtqt/m %1,%0\n\t" + : "=f"(new_x), "=&f"(tmp1), "=&f"(tmp2) + : "f"(x)); + + /* floor(-0) == -0, and in general we'll always have the same + sign as our input. */ + x = copysignf(new_x, x); + } + return x; } weak_alias (__floorf, floorf) diff --git a/sysdeps/alpha/fpu/s_rint.c b/sysdeps/alpha/fpu/s_rint.c index e9aa028822..9624631292 100644 --- a/sysdeps/alpha/fpu/s_rint.c +++ b/sysdeps/alpha/fpu/s_rint.c @@ -24,15 +24,24 @@ double __rint (double x) { - double two52 = copysign (0x1.0p52, x); - double r; - - r = x + two52; - r = r - two52; - - /* rint(-0.1) == -0, and in general we'll always have the same sign - as our input. */ - return copysign (r, x); + if (isless (fabs (x), 9007199254740992.0)) /* 1 << DBL_MANT_DIG */ + { + double tmp1, new_x; + __asm ( +#ifdef _IEEE_FP_INEXACT + "cvttq/svid %2,%1\n\t" +#else + "cvttq/svd %2,%1\n\t" +#endif + "cvtqt/d %1,%0\n\t" + : "=f"(new_x), "=&f"(tmp1) + : "f"(x)); + + /* rint(-0.1) == -0, and in general we'll always have the same + sign as our input. */ + x = copysign(new_x, x); + } + return x; } weak_alias (__rint, rint) diff --git a/sysdeps/alpha/fpu/s_rintf.c b/sysdeps/alpha/fpu/s_rintf.c index 9e4cbd1ffd..39fb72fb64 100644 --- a/sysdeps/alpha/fpu/s_rintf.c +++ b/sysdeps/alpha/fpu/s_rintf.c @@ -23,15 +23,30 @@ float __rintf (float x) { - float two23 = copysignf (0x1.0p23, x); - float r; - - r = x + two23; - r = r - two23; - - /* rint(-0.1) == -0, and in general we'll always have the same sign - as our input. */ - return copysign (r, x); + if (isless (fabsf (x), 16777216.0f)) /* 1 << FLT_MANT_DIG */ + { + /* Note that Alpha S_Floating is stored in registers in a + restricted T_Floating format, so we don't even need to + convert back to S_Floating in the end. The initial + conversion to T_Floating is needed to handle denormals. */ + + float tmp1, tmp2, new_x; + + __asm ("cvtst/s %3,%2\n\t" +#ifdef _IEEE_FP_INEXACT + "cvttq/svid %2,%1\n\t" +#else + "cvttq/svd %2,%1\n\t" +#endif + "cvtqt/d %1,%0\n\t" + : "=f"(new_x), "=&f"(tmp1), "=&f"(tmp2) + : "f"(x)); + + /* rint(-0.1) == -0, and in general we'll always have the same + sign as our input. */ + x = copysignf(new_x, x); + } + return x; } weak_alias (__rintf, rintf) From 2ec03f509faf40847d3b18b3dd51d0b003e935c8 Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Mon, 3 May 2010 23:25:06 -0400 Subject: [PATCH 4000/4487] alpha: add dl-procinfo support. Fixes glibc bug 6827. Signed-off-by: Matt Turner --- ChangeLog.alpha | 6 ++++ sysdeps/alpha/dl-machine.h | 12 +++++++ sysdeps/alpha/dl-procinfo.c | 64 ++++++++++++++++++++++++++++++++++ sysdeps/alpha/dl-procinfo.h | 68 +++++++++++++++++++++++++++++++++++++ 4 files changed, 150 insertions(+) create mode 100644 sysdeps/alpha/dl-procinfo.c create mode 100644 sysdeps/alpha/dl-procinfo.h diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 8b0a82428b..c3bbe12582 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,9 @@ +2010-05-03 Aurelien Jarno + + * sysdeps/alpha/dl-machine.h: Add dl-procinfo support. + * sysdeps/alpha/dl-procinfo.c: New. + * sysdeps/alpha/dl-procinfo.h: New. + 2010-05-03 Aurelien Jarno * sysdeps/alpha/fpu/s_ceil.c: Fix corner cases. diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 29f500b2d0..e4a502208c 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -249,6 +249,18 @@ _dl_start_user: \n\ /* The alpha never uses Elf64_Rel relocations. */ #define ELF_MACHINE_NO_REL 1 +/* We define an initialization functions. This is called very early in + * _dl_sysdep_start. */ +#define DL_PLATFORM_INIT dl_platform_init () + +static inline void __attribute__ ((unused)) +dl_platform_init (void) +{ + if (GLRO(dl_platform) != NULL && *GLRO(dl_platform) == '\0') + /* Avoid an empty string which would disturb us. */ + GLRO(dl_platform) = NULL; +} + /* Fix up the instructions of a PLT entry to invoke the function rather than the dynamic linker. */ static inline Elf64_Addr diff --git a/sysdeps/alpha/dl-procinfo.c b/sysdeps/alpha/dl-procinfo.c new file mode 100644 index 0000000000..d280cb2f80 --- /dev/null +++ b/sysdeps/alpha/dl-procinfo.c @@ -0,0 +1,64 @@ +/* Data for Alpha version of processor capability information. + Copyright (C) 2008 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Aurelien Jarno , 2008. + + 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. */ + +/* This information must be kept in sync with the _DL_PLATFORM_COUNT + definitions in procinfo.h. + + If anything should be added here check whether the size of each string + is still ok with the given array size. + + All the #ifdefs in the definitions are quite irritating but + necessary if we want to avoid duplicating the information. There + are three different modes: + + - PROCINFO_DECL is defined. This means we are only interested in + declarations. + + - PROCINFO_DECL is not defined: + + + if SHARED is defined the file is included in an array + initializer. The .element = { ... } syntax is needed. + + + if SHARED is not defined a normal array initialization is + needed. + */ + +#ifndef PROCINFO_CLASS +#define PROCINFO_CLASS +#endif + +#if !defined PROCINFO_DECL && defined SHARED + ._dl_alpha_platforms +#else +PROCINFO_CLASS const char _dl_alpha_platforms[5][5] +#endif +#ifndef PROCINFO_DECL += { + "ev4", "ev5", "ev56", "ev6", "ev67" + } +#endif +#if !defined SHARED || defined PROCINFO_DECL +; +#else +, +#endif + +#undef PROCINFO_DECL +#undef PROCINFO_CLASS diff --git a/sysdeps/alpha/dl-procinfo.h b/sysdeps/alpha/dl-procinfo.h new file mode 100644 index 0000000000..1372f0a2f2 --- /dev/null +++ b/sysdeps/alpha/dl-procinfo.h @@ -0,0 +1,68 @@ +/* Alpha version of processor capability information handling macros. + Copyright (C) 2008 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Aurelien Jarno , 2008. + + 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 _DL_PROCINFO_H +#define _DL_PROCINFO_H 1 + +#include + + +/* Mask to filter out platforms. */ +#define _DL_HWCAP_PLATFORM (-1ULL) + +#define _DL_PLATFORMS_COUNT 5 + +static inline const char * +__attribute__ ((unused)) +_dl_platform_string (int idx) +{ + return GLRO(dl_alpha_platforms)[idx]; +}; + +static inline int +__attribute__ ((unused, always_inline)) +_dl_string_platform (const char *str) +{ + int i; + + if (str != NULL) + for (i = 0; i < _DL_PLATFORMS_COUNT; ++i) + { + if (strcmp (str, _dl_platform_string (i)) == 0) + return i; + } + return -1; +}; + +/* We cannot provide a general printing function. */ +#define _dl_procinfo(word) -1 + +/* There are no hardware capabilities defined. */ +#define _dl_hwcap_string(idx) "" + +/* By default there is no important hardware capability. */ +#define HWCAP_IMPORTANT (0) + +/* We don't have any hardware capabilities. */ +#define _DL_HWCAP_COUNT 0 + +#define _dl_string_hwcap(str) (-1) + +#endif /* dl-procinfo.h */ From 200b5faee1cfac10d831e9b278ef294ca3119f53 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 4 May 2010 09:06:15 -0700 Subject: [PATCH 4001/4487] alpha: fix memchr to not cause memory faults. http://www.mail-archive.com/debian-alpha@lists.debian.org/msg25088.html Signed-off-by: Matt Turner --- ChangeLog.alpha | 5 +++++ sysdeps/alpha/alphaev6/memchr.S | 26 +++++++++++++------------- sysdeps/alpha/memchr.S | 22 +++++++++++----------- 3 files changed, 29 insertions(+), 24 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index c3bbe12582..39d58166bc 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,8 @@ +2010-05-03 Aurelien Jarno + + * sysdeps/alpha/memchr.S: Use prefetch load. + * sysdeps/alpha/alphaev6/memchr.S: Likewise. + 2010-05-03 Aurelien Jarno * sysdeps/alpha/dl-machine.h: Add dl-procinfo support. diff --git a/sysdeps/alpha/alphaev6/memchr.S b/sysdeps/alpha/alphaev6/memchr.S index 88e91fa988..fe77cd897b 100644 --- a/sysdeps/alpha/alphaev6/memchr.S +++ b/sysdeps/alpha/alphaev6/memchr.S @@ -127,7 +127,7 @@ $first_quad: cmpbge $31, $1, $2 # E : bne $2, $found_it # U : # At least one byte left to process. - ldq $1, 8($0) # L : + ldq $31, 8($0) # L : subq $5, 1, $18 # E : U L U L addq $0, 8, $0 # E : @@ -143,38 +143,38 @@ $first_quad: and $4, 8, $4 # E : odd number of quads? bne $4, $odd_quad_count # U : # At least three quads remain to be accessed - mov $1, $4 # E : L U L U : move prefetched value to correct reg + nop # E : L U L U : move prefetched value to correct reg .align 4 $unrolled_loop: - ldq $1, 8($0) # L : prefetch $1 - xor $17, $4, $2 # E : - cmpbge $31, $2, $2 # E : - bne $2, $found_it # U : U L U L + ldq $1, 0($0) # L : load quad + xor $17, $1, $2 # E : + ldq $31, 8($0) # L : prefetch next quad + cmpbge $31, $2, $2 # E : U L U L + bne $2, $found_it # U : addq $0, 8, $0 # E : nop # E : nop # E : - nop # E : $odd_quad_count: + ldq $1, 0($0) # L : load quad xor $17, $1, $2 # E : - ldq $4, 8($0) # L : prefetch $4 + ldq $31, 8($0) # L : prefetch $4 cmpbge $31, $2, $2 # E : - addq $0, 8, $6 # E : + addq $0, 8, $6 # E : bne $2, $found_it # U : cmpult $6, $18, $6 # E : addq $0, 8, $0 # E : - nop # E : bne $6, $unrolled_loop # U : - mov $4, $1 # E : move prefetched value into $1 nop # E : nop # E : - -$final: subq $5, $0, $18 # E : $18 <- number of bytes left to do nop # E : + +$final: ldq $1, 0($0) # L : load last quad + subq $5, $0, $18 # E : $18 <- number of bytes left to do nop # E : bne $18, $last_quad # U : diff --git a/sysdeps/alpha/memchr.S b/sysdeps/alpha/memchr.S index 5d713d53ba..87c7fb10c0 100644 --- a/sysdeps/alpha/memchr.S +++ b/sysdeps/alpha/memchr.S @@ -119,7 +119,7 @@ $first_quad: # At least one byte left to process. - ldq t0, 8(v0) # e0 : + ldq zero, 8(v0) # e0 : prefetch next quad subq t4, 1, a2 # .. e1 : addq v0, 8, v0 #-e0 : @@ -138,19 +138,19 @@ $first_quad: # At least three quads remain to be accessed - mov t0, t3 # e0 : move prefetched value to correct reg - .align 4 $unrolled_loop: - ldq t0, 8(v0) #-e0 : prefetch t0 - xor a1, t3, t1 # .. e1 : - cmpbge zero, t1, t1 # e0 : - bne t1, $found_it # .. e1 : + ldq t0, 0(v0) # e0 : load quad + xor a1, t0, t1 # .. e1 : + ldq zero, 8(v0) # e0 : prefetch next quad + cmpbge zero, t1, t1 # .. e1: + bne t1, $found_it # e0 : - addq v0, 8, v0 #-e0 : + addq v0, 8, v0 # e1 : $odd_quad_count: + ldq t0, 0(v0) # e0 : load quad xor a1, t0, t1 # .. e1 : - ldq t3, 8(v0) # e0 : prefetch t3 + ldq zero, 8(v0) # e0 : prefetch next quad cmpbge zero, t1, t1 # .. e1 : addq v0, 8, t5 #-e0 : bne t1, $found_it # .. e1 : @@ -159,8 +159,8 @@ $odd_quad_count: addq v0, 8, v0 # .. e1 : bne t5, $unrolled_loop #-e1 : - mov t3, t0 # e0 : move prefetched value into t0 -$final: subq t4, v0, a2 # .. e1 : a2 <- number of bytes left to do +$final: ldq t0, 0(v0) # e0 : load last quad + subq t4, v0, a2 # .. e1 : a2 <- number of bytes left to do bne a2, $last_quad # e1 : $not_found: From 9f99a411e6a5b94cf14cecefccb12515c487ddfa Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 4 May 2010 09:12:27 -0700 Subject: [PATCH 4002/4487] Add BZ markers. --- ChangeLog.alpha | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 39d58166bc..769be8bdc1 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -5,12 +5,14 @@ 2010-05-03 Aurelien Jarno + [BZ #6827] * sysdeps/alpha/dl-machine.h: Add dl-procinfo support. * sysdeps/alpha/dl-procinfo.c: New. * sysdeps/alpha/dl-procinfo.h: New. 2010-05-03 Aurelien Jarno + [BZ #5350] * sysdeps/alpha/fpu/s_ceil.c: Fix corner cases. * sysdeps/alpha/fpu/s_ceilf.c: Likewise. * sysdeps/alpha/fpu/s_floor.c: Likewise. @@ -20,6 +22,7 @@ 2010-05-03 GOTO Masanori + [BZ #1026] * sysdeps/unix/sysv/linux/alpha/kernel-features.h: Define __ASSUME_STAT64_SYSCALL. * sysdeps/unix/sysv/linux/alpha/fxstat.c: Check From 7ffd2bd725c3e4d77e6bfe36b76500d20427929d Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 5 May 2010 08:12:11 -0700 Subject: [PATCH 4003/4487] alpha: Do the 32/64-bit split on statfs routines. --- ChangeLog.alpha | 13 +++++++++++++ sysdeps/unix/sysv/linux/alpha/fstatfs64.c | 1 + sysdeps/unix/sysv/linux/alpha/fstatvfs.c | 1 + sysdeps/unix/sysv/linux/alpha/fstatvfs64.c | 1 + sysdeps/unix/sysv/linux/alpha/internal_statvfs64.c | 1 + sysdeps/unix/sysv/linux/alpha/statfs64.c | 1 + sysdeps/unix/sysv/linux/alpha/statvfs.c | 1 + sysdeps/unix/sysv/linux/alpha/statvfs64.c | 1 + sysdeps/unix/sysv/linux/alpha/syscalls.list | 5 +++++ 9 files changed, 25 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/fstatfs64.c create mode 100644 sysdeps/unix/sysv/linux/alpha/fstatvfs.c create mode 100644 sysdeps/unix/sysv/linux/alpha/fstatvfs64.c create mode 100644 sysdeps/unix/sysv/linux/alpha/internal_statvfs64.c create mode 100644 sysdeps/unix/sysv/linux/alpha/statfs64.c create mode 100644 sysdeps/unix/sysv/linux/alpha/statvfs.c create mode 100644 sysdeps/unix/sysv/linux/alpha/statvfs64.c diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 769be8bdc1..a12407cb99 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,16 @@ +2010-05-05 Richard Henderson + + [BZ #1864] + * sysdeps/unix/sysv/linux/alpha/fstatfs64.c: New. + * sysdeps/unix/sysv/linux/alpha/fstatvfs.c: New. + * sysdeps/unix/sysv/linux/alpha/fstatvfs64.c: New. + * sysdeps/unix/sysv/linux/alpha/internal_statvfs64.c: New. + * sysdeps/unix/sysv/linux/alpha/statfs64.c: New. + * sysdeps/unix/sysv/linux/alpha/statvfs.c: New. + * sysdeps/unix/sysv/linux/alpha/statvfs64.c: New. + * sysdeps/unix/sysv/linux/alpha/syscalls.list (fstatfs, statfs): + Define without 64-bit aliases. + 2010-05-03 Aurelien Jarno * sysdeps/alpha/memchr.S: Use prefetch load. diff --git a/sysdeps/unix/sysv/linux/alpha/fstatfs64.c b/sysdeps/unix/sysv/linux/alpha/fstatfs64.c new file mode 100644 index 0000000000..5639959adb --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/fstatfs64.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/alpha/fstatvfs.c b/sysdeps/unix/sysv/linux/alpha/fstatvfs.c new file mode 100644 index 0000000000..92e772347b --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/fstatvfs.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/alpha/fstatvfs64.c b/sysdeps/unix/sysv/linux/alpha/fstatvfs64.c new file mode 100644 index 0000000000..0f1e71027a --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/fstatvfs64.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/alpha/internal_statvfs64.c b/sysdeps/unix/sysv/linux/alpha/internal_statvfs64.c new file mode 100644 index 0000000000..81d18f7bb2 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/internal_statvfs64.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/alpha/statfs64.c b/sysdeps/unix/sysv/linux/alpha/statfs64.c new file mode 100644 index 0000000000..fe39cc4685 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/statfs64.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/alpha/statvfs.c b/sysdeps/unix/sysv/linux/alpha/statvfs.c new file mode 100644 index 0000000000..78069e96f4 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/statvfs.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/alpha/statvfs64.c b/sysdeps/unix/sysv/linux/alpha/statvfs64.c new file mode 100644 index 0000000000..c80e17751d --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/statvfs64.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index de2c3ceac0..412b675198 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -53,3 +53,8 @@ osf_setitimer - osf_setitimer 3 __setitimer_tv32 setitimer@GLIBC_2.0 osf_utimes - osf_utimes 2 __utimes_tv32 utimes@GLIBC_2.0 osf_getrusage - osf_getrusage 2 __getrusage_tv32 getrusage@GLIBC_2.0 osf_wait4 - osf_wait4 2 __wait4_tv32 wait4@GLIBC_2.0 + +# avoid 64-bit aliases on 32-bit statfs syscalls +fstatfs - fstatfs i:ip __fstatfs fstatfs +statfs - statfs i:sp __statfs statfs + From 6531684d50f28271843fe264db3f4319e9e5c903 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 21 May 2010 23:16:17 +0000 Subject: [PATCH 4004/4487] Fix recvmmsg for MIPS. --- ChangeLog.mips | 5 +++ .../linux/mips/mips32/internal_recvmmsg.S | 2 ++ .../unix/sysv/linux/mips/mips32/recvmmsg.c | 31 +++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/mips/mips32/internal_recvmmsg.S create mode 100644 sysdeps/unix/sysv/linux/mips/mips32/recvmmsg.c diff --git a/ChangeLog.mips b/ChangeLog.mips index 2ea65732c9..dbdb68c796 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2010-05-21 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/mips32/recvmmsg.c, + sysdeps/unix/sysv/linux/mips/mips32/internal_recvmmsg.S: New. + 2010-04-14 Joseph Myers * sysdeps/unix/sysv/linux/mips/libc-abis: New. diff --git a/sysdeps/unix/sysv/linux/mips/mips32/internal_recvmmsg.S b/sysdeps/unix/sysv/linux/mips/mips32/internal_recvmmsg.S new file mode 100644 index 0000000000..30434d7334 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips32/internal_recvmmsg.S @@ -0,0 +1,2 @@ +/* MIPS does not have socket.S and the socketcall syscall should + generally be avoided, though it exists. */ diff --git a/sysdeps/unix/sysv/linux/mips/mips32/recvmmsg.c b/sysdeps/unix/sysv/linux/mips/mips32/recvmmsg.c new file mode 100644 index 0000000000..ceb88eee81 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips32/recvmmsg.c @@ -0,0 +1,31 @@ +/* Copyright (C) 2010 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. */ + +/* Avoid recvmmsg.c trying to use a definition based on the socketcall + syscall and internal_recvmmsg.S. */ + +#include +#include + +#include +#include +#include + +#undef __NR_socketcall + +#include From d0160bcc1912e17ef3c8739a2ea75b944b786d7e Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 21 May 2010 23:18:13 +0000 Subject: [PATCH 4005/4487] Fix internal_recvmmsg build attributes for ARM EABI. --- ChangeLog.arm | 4 ++++ sysdeps/unix/sysv/linux/arm/eabi/internal_recvmmsg.S | 6 ++++++ 2 files changed, 10 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/internal_recvmmsg.S diff --git a/ChangeLog.arm b/ChangeLog.arm index 363b86521a..29d3fe98df 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,7 @@ +2010-05-21 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/eabi/internal_recvmmsg.S: New. + 2010-04-08 Daniel Jacobowitz * sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S: New file. diff --git a/sysdeps/unix/sysv/linux/arm/eabi/internal_recvmmsg.S b/sysdeps/unix/sysv/linux/arm/eabi/internal_recvmmsg.S new file mode 100644 index 0000000000..eeb5f50a26 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/internal_recvmmsg.S @@ -0,0 +1,6 @@ +/* Tag_ABI_align8_preserved: This code preserves 8-byte + alignment in any callee. */ + .eabi_attribute 25, 1 +/* Tag_ABI_align8_needed: This code may require 8-byte alignment from + the caller. */ + .eabi_attribute 24, 1 From 0a124d8bc7a3d99f461af942aebdd3a8848672e9 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 22 May 2010 21:04:42 +0200 Subject: [PATCH 4006/4487] m68k: add c++-types and localplt data for m68k-linux-gnu --- ChangeLog.m68k | 5 +++ data/c++-types-m68k-linux-gnu.data | 67 ++++++++++++++++++++++++++++++ data/localplt-m68k-linux-gnu.data | 8 ++++ 3 files changed, 80 insertions(+) create mode 100644 data/c++-types-m68k-linux-gnu.data create mode 100644 data/localplt-m68k-linux-gnu.data diff --git a/ChangeLog.m68k b/ChangeLog.m68k index c7d068e36b..cdc0ab5078 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2010-05-22 Andreas Schwab + + * data/c++-types-m68k-linux-gnu.data: New file. + * data/localplt-m68k-linux-gnu.data: New file. + 2010-03-13 Andreas Schwab * sysdeps/m68k/m680x0/fpu/s_ccosh.c: Use signbit macro. diff --git a/data/c++-types-m68k-linux-gnu.data b/data/c++-types-m68k-linux-gnu.data new file mode 100644 index 0000000000..fde53bf337 --- /dev/null +++ b/data/c++-types-m68k-linux-gnu.data @@ -0,0 +1,67 @@ +blkcnt64_t:x +blkcnt_t:l +blksize_t:l +caddr_t:Pc +clockid_t:i +clock_t:l +daddr_t:i +dev_t:y +fd_mask:l +fsblkcnt64_t:y +fsblkcnt_t:m +fsfilcnt64_t:y +fsfilcnt_t:m +fsid_t:8__fsid_t +gid_t:j +id_t:j +ino64_t:y +ino_t:m +int16_t:s +int32_t:i +int64_t:x +int8_t:a +intptr_t:i +key_t:i +loff_t:x +mode_t:j +nlink_t:j +off64_t:x +off_t:l +pid_t:i +pthread_attr_t:14pthread_attr_t +pthread_barrier_t:17pthread_barrier_t +pthread_barrierattr_t:21pthread_barrierattr_t +pthread_cond_t:14pthread_cond_t +pthread_condattr_t:18pthread_condattr_t +pthread_key_t:j +pthread_mutex_t:15pthread_mutex_t +pthread_mutexattr_t:19pthread_mutexattr_t +pthread_once_t:i +pthread_rwlock_t:16pthread_rwlock_t +pthread_rwlockattr_t:20pthread_rwlockattr_t +pthread_spinlock_t:i +pthread_t:m +quad_t:x +register_t:i +rlim64_t:y +rlim_t:m +sigset_t:10__sigset_t +size_t:j +socklen_t:j +ssize_t:i +suseconds_t:l +time_t:l +u_char:h +uid_t:j +uint:j +u_int:j +u_int16_t:t +u_int32_t:j +u_int64_t:y +u_int8_t:h +ulong:m +u_long:m +u_quad_t:y +useconds_t:j +ushort:t +u_short:t diff --git a/data/localplt-m68k-linux-gnu.data b/data/localplt-m68k-linux-gnu.data new file mode 100644 index 0000000000..d266b8f74b --- /dev/null +++ b/data/localplt-m68k-linux-gnu.data @@ -0,0 +1,8 @@ +libc.so: _Unwind_Find_FDE +libc.so: __m68k_read_tp +libc.so: calloc +libc.so: free +libc.so: malloc +libc.so: memalign +libc.so: realloc +libm.so: matherr From c14e796ff6cb04ed7b3f7016e7e3571a252a950c Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 7 Jun 2010 10:11:17 +0200 Subject: [PATCH 4007/4487] hppa: Update nptl/pthread.h to match generic file --- ChangeLog.hppa | 55 +++++++++++---------- sysdeps/unix/sysv/linux/hppa/nptl/pthread.h | 45 ++++++++++------- 2 files changed, 56 insertions(+), 44 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 7dd7ce6dcb..50a15d74cc 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,8 @@ +2010-06-07 Andreas Schwab + + * sysdeps/unix/sysv/linux/hppa/nptl/pthread.h: Update to agree + with generic file. + 2010-03-30 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/bits/socket.h: Define @@ -21,7 +26,7 @@ 2010-02-02 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/makecontext.c (__makecontext): - Support more than 8 arguments. + Support more than 8 arguments. 2010-02-01 Kyle McMartin @@ -48,7 +53,7 @@ * sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h: Use correct alignment for pthread_mutex_t, pthread_cond_t, - and pthread_rwlock_t. + and pthread_rwlock_t. 2009-11-22 Carlos O'Donell @@ -64,7 +69,7 @@ 2009-11-15 Carlos O'Donell - * sysdeps/unix/sysv/linux/hppa/Versions (libc): Add + * sysdeps/unix/sysv/linux/hppa/Versions (libc): Add fallocate64@@GLIBC_2.11. * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h [__USE_GNU]: Define F_GETOWN_EX, and F_SETOWN_EX. @@ -72,7 +77,7 @@ [__USE_FILE_OFFSET64 && __REDIRECT]: Define __REDIRECT. [__USE_FILE_OFFSET64 && !__REDIRECT]: Define fallocate as fallocate64. - [__USE_LARGEFILE64]: define fallocate64. + [__USE_LARGEFILE64]: define fallocate64. 2009-11-15 Carlos O'Donell @@ -108,10 +113,10 @@ * sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c: Remove. 2009-09-08 Carlos O'Donell - + sysdeps/unix/sysv/linux/hppa/ * internaltypes.h: New file. - + sysdeps/unix/sysv/linux/hppa/nptl/ * pthreadP.h: New file. * pthread.h: New file. @@ -159,7 +164,7 @@ 2009-02-25 Carlos O'Donell - * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: Define + * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: Define FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME, and FUTEX_BITSET_MATCH_ANY. @@ -173,7 +178,7 @@ 2009-02-13 Khem Raj - * sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c + * sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c (libgcc_s_handle): New variable. (pthread_cancel_init): Depend in libgcc_s_handle for decision to load DSO. Assign last. @@ -201,9 +206,9 @@ Carlos O'Donell [BZ #6037] - * sysdeps/unix/sysv/linux/hppa/bits/atomic.h: Check for -11 + * sysdeps/unix/sysv/linux/hppa/bits/atomic.h: Check for -11 (-EAGAIN) instead of 11. Loop again when the kernel - returns -45 (-EDEADLOCK). Add back memory clobber. + returns -45 (-EDEADLOCK). Add back memory clobber. Do not initialize lws_ret and lws_errno. 2008-06-17 Guy Martin @@ -237,7 +242,7 @@ Guy Martin [BZ #5923] - * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: Pass + * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: Pass timespec and futexp. 2008-02-22 Carlos O'Donell @@ -385,7 +390,7 @@ 2007-05-17 Carlos O'Donell - * sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h + * sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h (SEM_VALUE_MAX): Remove. 2007-05-17 Carlos O'Donell @@ -395,14 +400,14 @@ (INLINE_SYSCALL): Use PIC_REG_DEF, PIC_REG_USE. (INTERNAL_SYSCALL): Likewise. (INTERNAL_SYSCALL_NCS): Likewise. - * sysdeps/unix/sysv/linux/hppa/sysdep.c (syscall): Use + * sysdeps/unix/sysv/linux/hppa/sysdep.c (syscall): Use PIC_REG_DEF, PIC_REG_USE. 2007-05-01 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/pthreadtypes.h - [__USE_XOPEN2K]: Define pthread_rwlock_t and - pthread_rwlockattr_t. + [__USE_XOPEN2K]: Define pthread_rwlock_t and + pthread_rwlockattr_t. 2007-02-02 Carlos O'Donell @@ -436,18 +441,18 @@ 2006-09-20 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h (splice): Add offin - and offout arguments to the prototype. + and offout arguments to the prototype. 2006-09-15 Carlos O'Donell * sysdeps/hppa/nptl/tcb-offsets.sym: Define TID_THREAD_OFFSET. - * sysdeps/unix/sysv/linux/hppa/clone.S: Handle RESET_PID, and + * sysdeps/unix/sysv/linux/hppa/clone.S: Handle RESET_PID, and restore r19 before call to _exit. * sysdeps/unix/sysv/linux/hppa/nptl/clone.S: New file. 2006-09-13 Carlos O'Donell - * sysdeps/hppa/dl-machine.h (RTLD_START): Comment the use of + * sysdeps/hppa/dl-machine.h (RTLD_START): Comment the use of _dl_fini_plabel. * sysdeps/hppa/elf/start.S: Correctly pass r23 to argument 6 of __libc_start_main. Comment the order of arguments at entry and @@ -467,7 +472,7 @@ as -EAGAIN. * sysdeps/unix/sysv/linux/hppa/bits/mman.h: Adjust definitions to match required standards. - * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h + * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h (lll_futex_wait): Return __ret. (lll_futex_timed_wait): Likewise. (lll_futex_wake): Likewise. @@ -490,7 +495,7 @@ 2006-07-24 Carlos O'Donell - * sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h: + * sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h: __SIZEOF_PTHREAD_COND_T is 64 bytes. Remove __PAD_ATOMIC_LOCK_T. 2006-07-18 Carlos O'Donell @@ -516,7 +521,7 @@ * sysdeps/unix/sysv/linux/hppa/xstat.c: New file. * sysdeps/unix/sysv/linux/hppa/lxstat.c: Likewise. - * sysdeps/unix/sysv/linux/hppa/fxstat.c: Likewise. + * sysdeps/unix/sysv/linux/hppa/fxstat.c: Likewise. * sysdeps/unix/sysv/linux/hppa/fxstatat.c: Likewise. 2006-07-13 Carlos O'Donell @@ -545,12 +550,12 @@ 2006-06-08 Carlos O'Donell - * sysdeps/unix/sysv/linux/hppa/Versions: new errlist compat entry + * sysdeps/unix/sysv/linux/hppa/Versions: new errlist compat entry for up to 256 errnos 2006-06-08 Carlos O'Donell - * sysdeps/hppa/hppa1.1/Implies: Remove ieee754/ldbl-128. + * sysdeps/hppa/hppa1.1/Implies: Remove ieee754/ldbl-128. * sysdeps/unix/sysv/linux/hppa/kernel-features.h [__LINUX_KERNEL_VERSION >= 0x020609]: Define __ASSUME_LWS_CAS. * sysdeps/unix/sysv/linux/hppa/bits/atomic.h: New file. @@ -648,9 +653,9 @@ 2006-04-19 Carlos O'Donell - * sysdeps/unix/sysv/linux/hppa/bits/mman.h [__USE_GNU]: + * sysdeps/unix/sysv/linux/hppa/bits/mman.h [__USE_GNU]: Define MMAP_FIXED. - * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h [__USE_GNU]: + * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h [__USE_GNU]: Define SYNC_FILE_RANGE_WAIT_BEFORE, SYNC_FILE_RANGE_WRITE, SYNC_FILE_RANGE_WAIT_AFTER, sync_file_range, splice, tee. diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pthread.h b/sysdeps/unix/sysv/linux/hppa/nptl/pthread.h index 7e279668d1..ee91dbf5b7 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/pthread.h +++ b/sysdeps/unix/sysv/linux/hppa/nptl/pthread.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +/* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -25,8 +25,6 @@ #include #include -#define __need_sigset_t -#include #include #include #include @@ -49,7 +47,7 @@ enum PTHREAD_MUTEX_RECURSIVE_NP, PTHREAD_MUTEX_ERRORCHECK_NP, PTHREAD_MUTEX_ADAPTIVE_NP -#ifdef __USE_UNIX98 +#if defined __USE_UNIX98 || defined __USE_XOPEN2K8 , PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP, PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP, @@ -427,6 +425,18 @@ extern int pthread_setschedprio (pthread_t __target_thread, int __prio) __THROW; +#ifdef __USE_GNU +/* Get thread name visible in the kernel and its interfaces. */ +extern int pthread_getname_np (pthread_t __target_thread, char *__buf, + size_t __buflen) + __THROW __nonnull ((2)); + +/* Set thread name visible in the kernel and its interfaces. */ +extern int pthread_setname_np (pthread_t __target_thread, __const char *__name) + __THROW __nonnull ((2)); +#endif + + #ifdef __USE_UNIX98 /* Determine level of concurrency. */ extern int pthread_getconcurrency (void) __THROW; @@ -739,8 +749,8 @@ extern int pthread_mutex_lock (pthread_mutex_t *__mutex) #ifdef __USE_XOPEN2K /* Wait until lock becomes available, or specified time passes. */ extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, - __const struct timespec *__restrict - __abstime) __THROW __nonnull ((1, 2)); + __const struct timespec *__restrict + __abstime) __THROW __nonnull ((1, 2)); #endif /* Unlock a mutex. */ @@ -748,7 +758,6 @@ extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) __THROW __nonnull ((1)); -#ifdef __USE_UNIX98 /* Get the priority ceiling of MUTEX. */ extern int pthread_mutex_getprioceiling (__const pthread_mutex_t * __restrict __mutex, @@ -761,12 +770,11 @@ extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex, int __prioceiling, int *__restrict __old_ceiling) __THROW __nonnull ((1, 3)); -#endif #ifdef __USE_XOPEN2K8 /* Declare the state protected by MUTEX as consistent. */ -extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex) +extern int pthread_mutex_consistent (pthread_mutex_t *__mutex) __THROW __nonnull ((1)); # ifdef __USE_GNU extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex) @@ -797,7 +805,7 @@ extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr, int __pshared) __THROW __nonnull ((1)); -#ifdef __USE_UNIX98 +#if defined __USE_UNIX98 || defined __USE_XOPEN2K8 /* Return in *KIND the mutex kind attribute in *ATTR. */ extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict __attr, int *__restrict __kind) @@ -808,6 +816,7 @@ extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict PTHREAD_MUTEX_DEFAULT). */ extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) __THROW __nonnull ((1)); +#endif /* Return in *PROTOCOL the mutex protocol attribute in *ATTR. */ extern int pthread_mutexattr_getprotocol (__const pthread_mutexattr_t * @@ -831,7 +840,6 @@ extern int pthread_mutexattr_getprioceiling (__const pthread_mutexattr_t * extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr, int __prioceiling) __THROW __nonnull ((1)); -#endif #ifdef __USE_XOPEN2K /* Get the robustness flag of the mutex attribute ATTR. */ @@ -990,13 +998,13 @@ extern int pthread_condattr_destroy (pthread_condattr_t *__attr) /* Get the process-shared flag of the condition variable attribute ATTR. */ extern int pthread_condattr_getpshared (__const pthread_condattr_t * - __restrict __attr, - int *__restrict __pshared) + __restrict __attr, + int *__restrict __pshared) __THROW __nonnull ((1, 2)); /* Set the process-shared flag of the condition variable attribute ATTR. */ extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, - int __pshared) __THROW __nonnull ((1)); + int __pshared) __THROW __nonnull ((1)); #ifdef __USE_XOPEN2K /* Get the clock selected for the conditon variable attribute ATTR. */ @@ -1071,7 +1079,7 @@ extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t * /* Set the process-shared flag of the barrier attribute ATTR. */ extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr, - int __pshared) + int __pshared) __THROW __nonnull ((1)); #endif @@ -1136,11 +1144,11 @@ __END_DECLS #endif /* pthread.h */ -#ifndef _PTHREAD_H_HPPA_ +#ifndef _PTHREAD_H_HPPA_ #define _PTHREAD_H_HPPA_ 1 /* The pthread_cond_t initializer is compatible only with NPTL. We do not - want to be forwards compatible, we eventually want to drop the code + want to be forwards compatible, we eventually want to drop the code that has to clear the old LT initializer. */ #undef PTHREAD_COND_INITIALIZER #define PTHREAD_COND_INITIALIZER { { 0, 0, 0, (void *) 0, 0, 0, 0, 0, 0 } } @@ -1173,6 +1181,5 @@ __END_DECLS { { { 0, 0, 0, 0 }, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,\ 0, 0, 0 } } #endif /* Unix98 or XOpen2K */ - -#endif +#endif From 0df56592854fa25ce091883cb60fc417283383b8 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 11 Jun 2010 21:58:32 +0200 Subject: [PATCH 4008/4487] m68k: force alignment of futex variables --- ChangeLog.m68k | 5 +++++ sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index cdc0ab5078..6cf5d39959 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2010-06-11 Andreas Schwab + + * sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h: Force + alignment of futex variables. + 2010-05-22 Andreas Schwab * data/c++-types-m68k-linux-gnu.data: New file. diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h index 01408101c6..832609d543 100644 --- a/sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h +++ b/sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h @@ -57,7 +57,7 @@ typedef union { struct __pthread_mutex_s { - int __lock; + int __lock __attribute__ ((__aligned__ (4))); unsigned int __count; int __owner; /* KIND must stay at this position in the structure to maintain @@ -87,7 +87,7 @@ typedef union { struct { - int __lock; + int __lock __attribute__ ((__aligned__ (4))); unsigned int __futex; __extension__ unsigned long long int __total_seq; __extension__ unsigned long long int __wakeup_seq; @@ -112,7 +112,7 @@ typedef unsigned int pthread_key_t; /* Once-only execution */ -typedef int pthread_once_t; +typedef int __attribute__ ((__aligned__ (4))) pthread_once_t; #if defined __USE_UNIX98 || defined __USE_XOPEN2K @@ -122,7 +122,7 @@ typedef union { struct { - int __lock; + int __lock __attribute__ ((__aligned__ (4))); unsigned int __nr_readers; unsigned int __readers_wakeup; unsigned int __writer_wakeup; @@ -158,7 +158,7 @@ typedef volatile int pthread_spinlock_t; typedef union { char __size[__SIZEOF_PTHREAD_BARRIER_T]; - long int __align; + long int __align __attribute__ ((__aligned__ (4))); } pthread_barrier_t; typedef union From 08b1b36387286ed1ba48c56a32e52429b5ef6963 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 13 Jun 2010 21:09:38 +0200 Subject: [PATCH 4009/4487] m68k: Add required definitions to sys/user.h --- ChangeLog.m68k | 5 +++++ sysdeps/unix/sysv/linux/m68k/sys/user.h | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 6cf5d39959..bbc8a8c50c 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2010-06-13 Andreas Schwab + + * sysdeps/unix/sysv/linux/m68k/sys/user.h (NBPG, UPAGES) + (HOST_TEXT_START_ADDR, HOST_STACK_END_ADDR): Define. + 2010-06-11 Andreas Schwab * sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h: Force diff --git a/sysdeps/unix/sysv/linux/m68k/sys/user.h b/sysdeps/unix/sysv/linux/m68k/sys/user.h index f8b19fcbe2..2663ac6df2 100644 --- a/sysdeps/unix/sysv/linux/m68k/sys/user.h +++ b/sysdeps/unix/sysv/linux/m68k/sys/user.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2008 Free Software Foundation, Inc. +/* Copyright (C) 2008, 2010 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 @@ -58,4 +58,9 @@ struct user { char u_comm[32]; }; +#define NBPG 4096 +#define UPAGES 1 +#define HOST_TEXT_START_ADDR u.start_code +#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) + #endif From 9166f36fcc5390efb701e50564c63cb4534bd998 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 13 Jun 2010 22:30:17 +0200 Subject: [PATCH 4010/4487] m68k: mark all inline math functions as non-throwing --- ChangeLog.m68k | 3 +++ sysdeps/m68k/m680x0/fpu/bits/mathinline.h | 14 +++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index bbc8a8c50c..c5b5706adc 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,5 +1,8 @@ 2010-06-13 Andreas Schwab + * sysdeps/m68k/m680x0/fpu/bits/mathinline.h: Mark all functions as + non-throwing. + * sysdeps/unix/sysv/linux/m68k/sys/user.h (NBPG, UPAGES) (HOST_TEXT_START_ADDR, HOST_STACK_END_ADDR): Define. diff --git a/sysdeps/m68k/m680x0/fpu/bits/mathinline.h b/sysdeps/m68k/m680x0/fpu/bits/mathinline.h index 975ffd8188..8a171278b3 100644 --- a/sysdeps/m68k/m680x0/fpu/bits/mathinline.h +++ b/sysdeps/m68k/m680x0/fpu/bits/mathinline.h @@ -126,7 +126,7 @@ __NTH (__signbitl (long double __x)) /* Define a const math function. */ #define __m81_defun(rettype, func, args) \ __m81_inline rettype __attribute__((__const__)) \ - __m81_u(func) args + __NTH (__m81_u(func) args) /* Define the three variants of a math function that has a direct implementation in the m68k fpu. FUNC is the name for C (which will be @@ -329,8 +329,8 @@ __m81_defun (long int, __CONCAT(__lrint,s), (float_type __x)) \ } \ \ __m81_inline float_type \ -__m81_u(__CONCAT(__fma,s))(float_type __x, float_type __y, \ - float_type __z) \ +__NTH (__m81_u(__CONCAT(__fma,s))(float_type __x, float_type __y, \ + float_type __z)) \ { \ return (__x * __y) + __z; \ } @@ -346,8 +346,8 @@ __inline_functions (long double,l) # define __inline_functions(float_type, s) \ __m81_inline void \ -__m81_u(__CONCAT(__sincos,s))(float_type __x, float_type *__sinx, \ - float_type *__cosx) \ +__NTH (__m81_u(__CONCAT(__sincos,s))(float_type __x, float_type *__sinx, \ + float_type *__cosx)) \ { \ __asm ("fsincos%.x %2,%1:%0" \ : "=f" (*__sinx), "=f" (*__cosx) : "f" (__x)); \ @@ -368,13 +368,13 @@ __inline_functions (long double,l) NAME, to make token pasting work correctly with -traditional. */ # define __inline_forward_c(rettype, name, args1, args2) \ __MATH_INLINE rettype __attribute__((__const__)) \ - name args1 \ +__NTH (name args1) \ { \ return __CONCAT(__,name) args2; \ } # define __inline_forward(rettype, name, args1, args2) \ -__MATH_INLINE rettype name args1 \ +__MATH_INLINE rettype __NTH (name args1) \ { \ return __CONCAT(__,name) args2; \ } From ce47c0364079b28033bd7c6ff1bd08c1ccd88a0c Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 14 Jun 2010 22:09:08 +0000 Subject: [PATCH 4011/4487] Define F_SETPIPE_SZ and F_GETPIPE_SZ for ARM. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/bits/fcntl.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog.arm b/ChangeLog.arm index 29d3fe98df..8238431160 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2010-06-14 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/bits/fcntl.h (F_SETPIPE_SZ, + F_GETPIPE_SZ): Define. + 2010-05-21 Joseph Myers * sysdeps/unix/sysv/linux/arm/eabi/internal_recvmmsg.S: New. diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h index 77d6c5c761..952ae05b38 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h @@ -102,6 +102,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_SETPIPE_SZ 1031 /* Set pipe page size array. */ +# define F_GETPIPE_SZ 1032 /* Set pipe page size array. */ #endif #ifdef __USE_XOPEN2K8 # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with From fdb3ec206ee7671c697544502de6a650186c8cd2 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 14 Jun 2010 22:09:52 +0000 Subject: [PATCH 4012/4487] Define F_SETPIPE_SZ and F_GETPIPE_SZ for MIPS. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog.mips b/ChangeLog.mips index dbdb68c796..b43fc6591f 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2010-06-14 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/fcntl.h (F_SETPIPE_SZ, + F_GETPIPE_SZ): Define. + 2010-05-21 Joseph Myers * sysdeps/unix/sysv/linux/mips/mips32/recvmmsg.c, diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index 37fb7e02c7..31cb861120 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -104,6 +104,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_SETPIPE_SZ 1031 /* Set pipe page size array. */ +# define F_GETPIPE_SZ 1032 /* Set pipe page size array. */ #endif #ifdef __USE_XOPEN2K8 # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with From 131fafa7dac6437fd6bb320bac49b0198825b192 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Wed, 23 Jun 2010 17:03:11 -0400 Subject: [PATCH 4013/4487] [hppa] Fix *context stack usage for varargs The getcontext, and setcontext functions should not adjust the stack, and should load the stack pointer from the machine context. Calling makecontext should create a frame for spilled incoming arguments, and sync uc_stack.ss_sp to the machine context. We do not support calling getcontext, modifying ss_sp, and calling setcontext directly. --- ChangeLog.hppa | 13 ++++++ sysdeps/unix/sysv/linux/hppa/getcontext.S | 21 +++++---- sysdeps/unix/sysv/linux/hppa/makecontext.c | 53 ++++++++++++++++------ sysdeps/unix/sysv/linux/hppa/setcontext.S | 16 ++++--- 4 files changed, 75 insertions(+), 28 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 50a15d74cc..faad5e9a33 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,16 @@ +2010-06-23 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/getcontext.S (__getcontext_ret): + Document that this function is a non-standard calling ABI. + Document register usage. + (__getcontext): Use normal %sp without adjustment. Use named + resgister %sp. + * sysdeps/unix/sysv/linux/hppa/makecontext.c: Remove FRAME_SIZE. + Define FRAME_SIZE_UL, FRAME_SIZE_BYTES, ARGS. + (__makecontext): Create and setup a stack frame. + * sysdeps/unix/sysv/linux/hppa/setcontext.S (__setcontext): + Use named register %sp. Do not use oSS_SP. + 2010-06-07 Andreas Schwab * sysdeps/unix/sysv/linux/hppa/nptl/pthread.h: Update to agree diff --git a/sysdeps/unix/sysv/linux/hppa/getcontext.S b/sysdeps/unix/sysv/linux/hppa/getcontext.S index f88fa03d91..af810b3dfa 100644 --- a/sysdeps/unix/sysv/linux/hppa/getcontext.S +++ b/sysdeps/unix/sysv/linux/hppa/getcontext.S @@ -23,17 +23,21 @@ #include "ucontext_i.h" - /* Trampoline function. */ + /* Trampoline function. Non-standard calling ABI. */ /* Can not use ENTRY(__getcontext_ret) here. */ .type __getcontext_ret, @function .hidden __getcontext_ret __getcontext_ret: .proc .callinfo FRAME=0,NO_CALLS + /* r26-r23 contain original r3-r6, but because setcontext + does not reload r3-r6 (it's using them as temporaries) + we must save them elsewhere and swap them back in. */ copy %r23, %r3 copy %r24, %r4 copy %r25, %r5 copy %r26, %r6 + /* r20 contains original return pointer. */ bv 0(%r20) copy %r0, %ret0 .procend @@ -72,13 +76,12 @@ ENTRY(__getcontext) stw %r27, oR27(%r26) stw %r28, oR28(%r26) stw %r29, oR29(%r26) - ldo -64(%sp), %r1 /* Calculate %sp in %r1. */ - stw %r1, oR30(%r26) /* Save new %sp. */ + stw %sp, oR30(%r26) stw %r31, oR31(%r26) stw %r0, oUC_FLAGS(%r26) /* stw %r0, oUC_LINK(%r26) - Do not overwrite. */ - stw %r1, oSS_SP(%r26) + stw %sp, oSS_SP(%r26) stw %r0, oSS_FLAGS(%r26) stw %r0, oSS_SIZE(%r26) @@ -127,9 +130,9 @@ ENTRY(__getcontext) fstds %fr31, 0(%r1) /* Prologue */ - stwm %r4, 64(%r30) + stwm %r4, 64(%sp) #ifdef PIC - stw %r19, -32(%r30) + stw %r19, -32(%sp) #endif /* Set up the trampoline registers. @@ -152,12 +155,12 @@ ENTRY(__getcontext) ldi SIG_BLOCK, %r26 /* Epilogue */ - ldw -84(%r30), %r2 + ldw -84(%sp), %r2 #ifdef PIC - ldw -96(%r30), %r19 + ldw -96(%sp), %r19 #endif bv %r0(%r2) - ldwm -64(%r30), %r4 + ldwm -64(%sp), %r4 END(__getcontext) weak_alias (__getcontext, getcontext) diff --git a/sysdeps/unix/sysv/linux/hppa/makecontext.c b/sysdeps/unix/sysv/linux/hppa/makecontext.c index cb036d0412..d3e3fb8c78 100644 --- a/sysdeps/unix/sysv/linux/hppa/makecontext.c +++ b/sysdeps/unix/sysv/linux/hppa/makecontext.c @@ -26,26 +26,57 @@ #include /* POSIX only supports integer arguments. */ + +/* Stack must be 64-byte aligned at all times. */ #define STACK_ALIGN 64 -#define FRAME_SIZE 8 +/* Size of frame marker in unsigned long words. */ +#define FRAME_SIZE_UL 8 +/* Size of frame marker in bytes. */ +#define FRAME_SIZE_BYTES (8 * sizeof(unsigned long)) +/* Size of X arguments in bytes. */ +#define ARGS(x) (x * sizeof(unsigned long)) void __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...) { - unsigned long *sp; + unsigned long *sp, *osp; va_list ap; int i; - /* Get stack pointer (64-byte aligned). */ - sp = (unsigned long *)((((unsigned long) ucp->uc_stack.ss_sp) - + FRAME_SIZE + argc + STACK_ALIGN) - & ~(STACK_ALIGN - 1)); + /* Create a 64-byte aligned frame to store args. Use ss_sp if + it is available, otherwise be robust and use the currently + saved stack pointer. */ + if (ucp->uc_stack.ss_sp && ucp->uc_stack.ss_size) + osp = (unsigned long *)ucp->uc_stack.ss_sp; + else + osp = (unsigned long *)ucp->uc_mcontext.sc_gr[30]; + + sp = (unsigned long *)((((unsigned long) osp) + + FRAME_SIZE_BYTES + ARGS(argc) + STACK_ALIGN) + & ~(STACK_ALIGN - 1)); + + /* Use new frame. */ + ucp->uc_mcontext.sc_gr[30] = ((unsigned long) sp); + + /* Finish frame setup. */ + if (ucp->uc_link) + { + /* Returning to the next context and next frame. */ + sp[-4/sizeof(unsigned long)] = ucp->uc_link->uc_mcontext.sc_gr[30]; + sp[-20/sizeof(unsigned long)] = ucp->uc_link->uc_mcontext.sc_gr[2]; + } + else + { + /* This is the main context. No frame marker, and no return address. */ + sp[-4/sizeof(unsigned long)] = 0x0; + sp[-20/sizeof(unsigned long)] = 0x0; + } /* Store address to jump to. */ ucp->uc_mcontext.sc_gr[2] = (unsigned long) func; + /* Process arguments. */ va_start (ap, argc); - /* Handle arguments. */ for (i = 0; i < argc; ++i) { if (i < 4) @@ -62,13 +93,9 @@ __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...) } /* All other arguments go on the stack. */ - sp[-1 * (FRAME_SIZE + 1 + i)] = va_arg (ap, int); + sp[-1 * (FRAME_SIZE_UL + 1 + i)] = va_arg (ap, int); } va_end (ap); - - /* Adjust the stack pointer to last used argument. */ - ucp->uc_mcontext.sc_gr[30] = (unsigned long) sp; } - - weak_alias(__makecontext, makecontext) + diff --git a/sysdeps/unix/sysv/linux/hppa/setcontext.S b/sysdeps/unix/sysv/linux/hppa/setcontext.S index 43ccf24d26..3353d4e6e5 100644 --- a/sysdeps/unix/sysv/linux/hppa/setcontext.S +++ b/sysdeps/unix/sysv/linux/hppa/setcontext.S @@ -25,9 +25,9 @@ ENTRY(__setcontext) /* Prologue */ - stwm %r3, 64(%r30) + stwm %r3, 64(%sp) #ifdef PIC - stw %r19, -32(%r30) + stw %r19, -32(%sp) #endif /* Save ucp. */ @@ -78,7 +78,7 @@ ENTRY(__setcontext) ldw oR27(%r3), %r27 ldw oR28(%r3), %r28 ldw oR29(%r3), %r29 - ldw oR30(%r3), %r30 + ldw oR30(%r3), %sp /* ldw oR31(%r3), %r31 - dyncall scratch register */ /* Restore floating-point registers. */ @@ -116,9 +116,13 @@ ENTRY(__setcontext) fldds,mb -8(%r22), %fr1 fldds,mb -8(%r22), %fr0 - /* Calculate new stack pointer. */ - ldw oSS_SP(%r3), %sp - ldo 64(%sp), %sp + /* Do not load oSS_SP into %sp. The value of oSS_SP indicates + the start of the user allocated stack, but not the sp that + should be used by the new context. In fact makecontext + will create a frame, and adjust sp as required. We do not + support calling getcontext and modifying ss_sp without + a call to makecontext to synchronize ss_sp into the machine + context. */ /* Call external function. */ copy %r2, %r22 From 3680f14a7d12a9faa86e09aaea1b3aa20713355e Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Thu, 24 Jun 2010 12:13:36 -0400 Subject: [PATCH 4014/4487] [hppa] Fix incorrect stack frame usage in vfork. In a multithreaded environment the call to vfork was incorrectly creating a stack frame. Given that the child unwinds the stack frame first to call exec, it will corrupt any values the parent stored in the stack frame. The solution is to avoid creating a stack frame unless required to call an error function, in which case we are assured no child was created. --- ChangeLog.hppa | 6 +++++ sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S | 25 +++++++++++++------- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index faad5e9a33..2ccc911430 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,9 @@ +2010-06-24 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S: Only create stack + frame around call to SYSCALL_ERROR_HANDLER. Do not restore %rp + from the stack frame on successfull return. + 2010-06-23 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/getcontext.S (__getcontext_ret): diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S b/sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S index 83a70b71cb..15efa98d60 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S +++ b/sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2005 Free Software Foundation, Inc. +/* Copyright (C) 2005, 2010 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 @@ -50,10 +50,9 @@ /* r26, r25, r24, r23 are free since vfork has no arguments */ ENTRY(__vfork) - /* Prologue */ - stwm %r3, 64(%sp) - stw %sp, -4(%sp) - stw %r19, -32(%sp) + /* We must not create a frame. When the child unwinds to call + exec it will clobber the same frame that the parent + needs to unwind. */ /* Save the PIC register. */ #ifdef PIC @@ -75,12 +74,20 @@ ENTRY(__vfork) comclr,>>= %r1,%ret0,%r0 /* Note: unsigned compare. */ b,n .Lerror - /* Return, no need to restore the PIC register. */ - ldw -84(%sp), %rp - bv %r0(%rp) - ldwm -64(%sp), %r3 + /* Return, and DO NOT restore rp. The child may have called + functions that updated the frame's rp. This works because + the kernel ensures rp is preserved across the vfork + syscall. */ + bv,n %r0(%rp) .Lerror: + /* Now we need a stack to call a function. We are assured + that there is no child now, so it's safe to create + a frame. */ + stw %rp, -20(%sp) + stwm %r3, 64(%sp) + stw %sp, -4(%sp) + sub %r0,%ret0,%r3 SYSCALL_ERROR_HANDLER /* Restore the PIC register (in delay slot) on error */ From 71feaf72066abfe0e434e49d56e26b54152fb221 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 24 Jun 2010 16:18:51 +0000 Subject: [PATCH 4015/4487] Define F_SETPIPE_SZ and F_GETPIPE_SZ for M68K. --- ChangeLog.m68k | 5 +++++ sysdeps/unix/sysv/linux/m68k/bits/fcntl.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index c5b5706adc..be4956b810 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2010-06-24 Joseph Myers + + * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h (F_SETPIPE_SZ, + F_GETPIPE_SZ): Define. + 2010-06-13 Andreas Schwab * sysdeps/m68k/m680x0/fpu/bits/mathinline.h: Mark all functions as diff --git a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h index d1eb706c6b..f36507b3a9 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h @@ -101,6 +101,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_SETPIPE_SZ 1031 /* Set pipe page size array. */ +# define F_GETPIPE_SZ 1032 /* Set pipe page size array. */ #endif #ifdef __USE_XOPEN2K8 # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with From 2aed4f91fd55c07675dc656dc35418d99b35c4fd Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 2 Aug 2010 18:47:27 +0200 Subject: [PATCH 4016/4487] m68k: cleanup sysdep files Use sysdep files in subdirectories instead of testing cpu macros. --- ChangeLog.m68k | 12 +++++++ sysdeps/m68k/coldfire/sysdep.h | 36 +++++++++++++++++++ sysdeps/m68k/m680x0/sysdep.h | 36 +++++++++++++++++++ sysdeps/m68k/sysdep.h | 24 +------------ .../unix/sysv/linux/m68k/coldfire/sysdep.h | 26 ++++++++++++++ sysdeps/unix/sysv/linux/m68k/m680x0/sysdep.h | 26 ++++++++++++++ sysdeps/unix/sysv/linux/m68k/sysdep.h | 7 ---- 7 files changed, 137 insertions(+), 30 deletions(-) create mode 100644 sysdeps/m68k/coldfire/sysdep.h create mode 100644 sysdeps/m68k/m680x0/sysdep.h create mode 100644 sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h create mode 100644 sysdeps/unix/sysv/linux/m68k/m680x0/sysdep.h diff --git a/ChangeLog.m68k b/ChangeLog.m68k index be4956b810..6fdd4e13e4 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,15 @@ +2010-08-02 Andreas Schwab + + * sysdeps/m68k/coldfire/sysdep.h: New file. + (PCREL_OP): Define. + * sysdeps/m68k/m680x0/sysdep.h: New file. + (PCREL_OP): Define. + * sysdeps/m68k/sysdep.h (PCREL_OP): Don't define here. + * sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h: New file. + * sysdeps/unix/sysv/linux/m68k/m680x0/sysdep.h: New file. + * sysdeps/unix/sysv/linux/m68k/sysdep.h: Don't include subordinate + sysdep files. + 2010-06-24 Joseph Myers * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h (F_SETPIPE_SZ, diff --git a/sysdeps/m68k/coldfire/sysdep.h b/sysdeps/m68k/coldfire/sysdep.h new file mode 100644 index 0000000000..37f66d1c74 --- /dev/null +++ b/sysdeps/m68k/coldfire/sysdep.h @@ -0,0 +1,36 @@ +/* Assembler macros for Coldfire. + Copyright (C) 1998, 2003, 2010 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. */ + +#include + +#ifdef __ASSEMBLER__ + +/* Perform operation OP with PC-relative SRC as the first operand and + DST as the second. TMP is available as a temporary if needed. */ +# define PCREL_OP(OP, SRC, DST, TMP) \ + move.l &SRC - ., TMP; OP (-8, %pc, TMP), DST + +#else + +/* As above, but PC is the spelling of the PC register. We need this + so that the macro can be used in both normal and extended asms. */ +# define PCREL_OP(OP, SRC, DST, TMP, PC) \ + "move.l #" SRC " - ., " TMP "\n\t" OP " (-8, " PC ", " TMP "), " DST + +#endif /* __ASSEMBLER__ */ diff --git a/sysdeps/m68k/m680x0/sysdep.h b/sysdeps/m68k/m680x0/sysdep.h new file mode 100644 index 0000000000..013bc5eb66 --- /dev/null +++ b/sysdeps/m68k/m680x0/sysdep.h @@ -0,0 +1,36 @@ +/* Assembler macros for m680x0. + Copyright (C) 2010 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. */ + +#include + +#ifdef __ASSEMBLER__ + +/* Perform operation OP with PC-relative SRC as the first operand and + DST as the second. TMP is available as a temporary if needed. */ +#define PCREL_OP(OP, SRC, DST, TMP) \ + OP SRC(%pc), DST + +#else + +/* As above, but PC is the spelling of the PC register. We need this + so that the macro can be used in both normal and extended asms. */ +#define PCREL_OP(OP, SRC, DST, TMP, PC) \ + OP " " SRC "(" PC "), " DST + +#endif /* __ASSEMBLER__ */ diff --git a/sysdeps/m68k/sysdep.h b/sysdeps/m68k/sysdep.h index 3698628c30..ce70a0dfaa 100644 --- a/sysdeps/m68k/sysdep.h +++ b/sysdeps/m68k/sysdep.h @@ -1,5 +1,5 @@ /* Assembler macros for m68k. - Copyright (C) 1998, 2003 Free Software Foundation, Inc. + Copyright (C) 1998, 2003, 2010 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 @@ -97,26 +97,4 @@ # define JUMPTARGET(name) name # endif -/* Perform operation OP with PC-relative SRC as the first operand and - DST as the second. TMP is available as a temporary if needed. */ -#ifdef __mcoldfire__ -#define PCREL_OP(OP, SRC, DST, TMP) \ - move.l &SRC - ., TMP; OP (-8, %pc, TMP), DST -#else -#define PCREL_OP(OP, SRC, DST, TMP) \ - OP SRC(%pc), DST -#endif - -#else - -/* As above, but PC is the spelling of the PC register. We need this - so that the macro can be used in both normal and extended asms. */ -#ifdef __mcoldfire__ -#define PCREL_OP(OP, SRC, DST, TMP, PC) \ - "move.l #" SRC " - ., " TMP "\n\t" OP " (-8, " PC ", " TMP "), " DST -#else -#define PCREL_OP(OP, SRC, DST, TMP, PC) \ - OP " " SRC "(" PC "), " DST -#endif - #endif /* __ASSEMBLER__ */ diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h b/sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h new file mode 100644 index 0000000000..d7c523db40 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h @@ -0,0 +1,26 @@ +/* Copyright (C) 2010 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 _LINUX_M68K_COLDFIRE_SYSDEP_H +#define _LINUX_M68K_COLDFIRE_SYSDEP_H 1 + +#include +#include +#include + +#endif diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/sysdep.h b/sysdeps/unix/sysv/linux/m68k/m680x0/sysdep.h new file mode 100644 index 0000000000..651128cd4e --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/sysdep.h @@ -0,0 +1,26 @@ +/* Copyright (C) 2010 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 _LINUX_M68K_M680X0_SYSDEP_H +#define _LINUX_M68K_M680X0_SYSDEP_H 1 + +#include +#include +#include + +#endif diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h index 8bd188b0bc..3e7b105d0d 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -19,11 +19,6 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#ifndef _LINUX_M68K_SYSDEP_H -#define _LINUX_M68K_SYSDEP_H 1 - -#include -#include #include /* Defines RTLD_PRIVATE_ERRNO. */ @@ -333,5 +328,3 @@ SYSCALL_ERROR_LABEL: \ even when statically linked. */ # define NEED_STATIC_SYSINFO_DSO 1 #endif - -#endif From 690d264a40288c024fd8c59ca3cd42e70434a018 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 2 Aug 2010 18:48:56 +0200 Subject: [PATCH 4017/4487] m68k: fix loading of GOT for Coldfire --- ChangeLog.m68k | 4 ++++ sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h | 4 ++++ sysdeps/unix/sysv/linux/m68k/m680x0/sysdep.h | 3 +++ sysdeps/unix/sysv/linux/m68k/sysdep.h | 2 +- 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 6fdd4e13e4..284a3bf399 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -6,9 +6,13 @@ (PCREL_OP): Define. * sysdeps/m68k/sysdep.h (PCREL_OP): Don't define here. * sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h: New file. + (SYSCALL_ERROR_LOAD_GOT): Define. * sysdeps/unix/sysv/linux/m68k/m680x0/sysdep.h: New file. + (SYSCALL_ERROR_LOAD_GOT): Define. * sysdeps/unix/sysv/linux/m68k/sysdep.h: Don't include subordinate sysdep files. + (SYSCALL_ERROR_HANDLER) [PIC && USE___THREAD]: Use + SYSCALL_ERROR_LOAD_GOT. 2010-06-24 Joseph Myers diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h b/sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h index d7c523db40..e129dc1ec4 100644 --- a/sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h @@ -23,4 +23,8 @@ #include #include +#define SYSCALL_ERROR_LOAD_GOT(reg) \ + move.l #_GLOBAL_OFFSET_TABLE_@GOTPC, reg; \ + lea (-6, %pc, reg), reg + #endif diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/sysdep.h b/sysdeps/unix/sysv/linux/m68k/m680x0/sysdep.h index 651128cd4e..371befb275 100644 --- a/sysdeps/unix/sysv/linux/m68k/m680x0/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/sysdep.h @@ -23,4 +23,7 @@ #include #include +#define SYSCALL_ERROR_LOAD_GOT(reg) \ + lea (_GLOBAL_OFFSET_TABLE_@GOTPC, %pc), reg + #endif diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h index 3e7b105d0d..d381189fe5 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -117,7 +117,7 @@ SYSCALL_ERROR_LABEL: \ neg.l %d0; \ move.l %d0, -(%sp); \ jbsr __m68k_read_tp@PLTPC; \ - lea (_GLOBAL_OFFSET_TABLE_@GOTPC, %pc), %a1; \ + SYSCALL_ERROR_LOAD_GOT (%a1); \ add.l (SYSCALL_ERROR_ERRNO@TLSIE, %a1), %a0; \ move.l (%sp)+, (%a0); \ move.l &-1, %d0; \ From 3c11c98eaf31529a4ca7ca526a041cd0d943ca43 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 12 Aug 2010 15:38:57 +0000 Subject: [PATCH 4018/4487] Add prlimit64 for ARM. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/syscalls.list | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog.arm b/ChangeLog.arm index 8238431160..f8cb0565ab 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2010-08-12 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/syscalls.list: Add entry for + prlimit64 syscall. + 2010-06-14 Joseph Myers * sysdeps/unix/sysv/linux/arm/bits/fcntl.h (F_SETPIPE_SZ, diff --git a/sysdeps/unix/sysv/linux/arm/syscalls.list b/sysdeps/unix/sysv/linux/arm/syscalls.list index 1db0030b5b..cc75737c2f 100644 --- a/sysdeps/unix/sysv/linux/arm/syscalls.list +++ b/sysdeps/unix/sysv/linux/arm/syscalls.list @@ -3,3 +3,5 @@ syscall - syscall 7 syscall oldgetrlimit EXTRA getrlimit i:ip __old_getrlimit getrlimit@GLIBC_2.0 oldsetrlimit EXTRA setrlimit i:ip __old_setrlimit setrlimit@GLIBC_2.0 + +prlimit64 EXTRA prlimit64 i:iipp prlimit64 From c16fd24675beb336d1b2f1a65bbb1d644e5361c8 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 12 Aug 2010 15:40:29 +0000 Subject: [PATCH 4019/4487] Add prlimit64 for MIPS. --- ChangeLog.mips | 9 ++++++ sysdeps/unix/sysv/linux/mips/bits/resource.h | 30 ++++++++++++++++++- .../unix/sysv/linux/mips/mips32/syscalls.list | 3 ++ .../sysv/linux/mips/mips64/n32/syscalls.list | 2 ++ .../sysv/linux/mips/mips64/n64/syscalls.list | 3 ++ 5 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 sysdeps/unix/sysv/linux/mips/mips32/syscalls.list create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list diff --git a/ChangeLog.mips b/ChangeLog.mips index b43fc6591f..d33ccabba3 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,12 @@ +2010-08-12 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/resource.h: Declare prlimit + and prlimit64. + * sysdeps/unix/sysv/linux/mips/mips32/syscalls.list, + sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list: New files. + * sysdeps/unix/sysv/linux/mips/n32/syscalls.list: Add entry for + prlimit64 syscall. + 2010-06-14 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/fcntl.h (F_SETPIPE_SZ, diff --git a/sysdeps/unix/sysv/linux/mips/bits/resource.h b/sysdeps/unix/sysv/linux/mips/bits/resource.h index 39d17d74f7..a6454c4849 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/resource.h +++ b/sysdeps/unix/sysv/linux/mips/bits/resource.h @@ -1,6 +1,6 @@ /* Bit values & structures for resource limits. Linux/MIPS version. Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2004, 2005, 2006, 2008, - 2009 Free Software Foundation, Inc. + 2009, 2010 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 @@ -240,3 +240,31 @@ enum __priority_which PRIO_USER = 2 /* WHO is a user ID. */ #define PRIO_USER PRIO_USER }; + + +__BEGIN_DECLS + +#ifdef __USE_GNU +/* Modify and return resource limits of a process atomically. */ +# ifndef __USE_FILE_OFFSET64 +extern int prlimit (__pid_t __pid, enum __rlimit_resource __resource, + __const struct rlimit *__new_limit, + struct rlimit *__old_limit) __THROW; +# else +# ifdef __REDIRECT_NTH +extern int __REDIRECT_NTH (prlimit, (__pid_t __pid, + enum __rlimit_resource __resource, + __const struct rlimit *__new_limit, + struct rlimit *__old_limit), prlimit64); +# else +# define prlimit prlimit64 +# endif +# endif +# ifdef __USE_LARGEFILE64 +extern int prlimit64 (__pid_t __pid, enum __rlimit_resource __resource, + __const struct rlimit64 *__new_limit, + struct rlimit64 *__old_limit) __THROW; +# endif +#endif + +__END_DECLS diff --git a/sysdeps/unix/sysv/linux/mips/mips32/syscalls.list b/sysdeps/unix/sysv/linux/mips/mips32/syscalls.list new file mode 100644 index 0000000000..dbeb184d73 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips32/syscalls.list @@ -0,0 +1,3 @@ +# File name Caller Syscall name # args Strong name Weak names + +prlimit64 EXTRA prlimit64 i:iipp prlimit64 diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list b/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list index 5ade6f0076..7a6a777797 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list @@ -4,3 +4,5 @@ readahead - readahead i:iii __readahead readahead sync_file_range - sync_file_range i:iiii sync_file_range ftruncate - ftruncate i:ii __ftruncate ftruncate ftruncate64 __ftruncate64 truncate - truncate i:si truncate truncate64 + +prlimit64 EXTRA prlimit64 i:iipp prlimit64 diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list b/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list new file mode 100644 index 0000000000..a7bccdd376 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list @@ -0,0 +1,3 @@ +# File name Caller Syscall name # args Strong name Weak names + +prlimit EXTRA prlimit64 i:iipp prlimit prlimit64 From 9672c67a8c3c031511f33327cc71ee052df54100 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 12 Aug 2010 22:01:30 +0000 Subject: [PATCH 4020/4487] Add IN_EXCL_UNLINK for MIPS. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/sys/inotify.h | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index d33ccabba3..562364260a 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2010-08-12 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/sys/inotify.h (IN_EXCL_UNLINK): + Define. + 2010-08-12 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/resource.h: Declare prlimit diff --git a/sysdeps/unix/sysv/linux/mips/sys/inotify.h b/sysdeps/unix/sysv/linux/mips/sys/inotify.h index 49f39470e1..d1d0509213 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/inotify.h +++ b/sysdeps/unix/sysv/linux/mips/sys/inotify.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2005, 2006, 2008, 2009 Free Software Foundation, Inc. +/* Copyright (C) 2005, 2006, 2008, 2009, 2010 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 @@ -72,6 +72,8 @@ struct inotify_event #define IN_ONLYDIR 0x01000000 /* Only watch the path if it is a directory. */ #define IN_DONT_FOLLOW 0x02000000 /* Do not follow a sym link. */ +#define IN_EXCL_UNLINK 0x04000000 /* Exclude events on unlinked + objects. */ #define IN_MASK_ADD 0x20000000 /* Add to the mask of an already existing watch. */ #define IN_ISDIR 0x40000000 /* Event occurred against dir. */ From 09551806132f732bfe966b516c54f1f006b17d18 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 12 Aug 2010 22:18:00 +0000 Subject: [PATCH 4021/4487] Add f_flags to struct statfs for MIPS. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/bits/statfs.h | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 562364260a..2dbed6f8bc 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2010-08-12 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/statfs.h (struct statfs, + struct statfs64): Add f_flags field. + 2010-08-12 Joseph Myers * sysdeps/unix/sysv/linux/mips/sys/inotify.h (IN_EXCL_UNLINK): diff --git a/sysdeps/unix/sysv/linux/mips/bits/statfs.h b/sysdeps/unix/sysv/linux/mips/bits/statfs.h index 2f9bd54edc..22a9ddead8 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/statfs.h +++ b/sysdeps/unix/sysv/linux/mips/bits/statfs.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1997, 2000, 2010 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 @@ -45,7 +45,8 @@ struct statfs /* Linux specials */ __fsid_t f_fsid; long int f_namelen; - long int f_spare[6]; + long int f_flags; + long int f_spare[5]; }; #ifdef __USE_LARGEFILE64 @@ -64,7 +65,8 @@ struct statfs64 /* Linux specials */ __fsid_t f_fsid; long int f_namelen; - long int f_spare[6]; + long int f_flags; + long int f_spare[5]; }; #endif From 32b9acf3d9374ff0708ab5c1b590cfb7f7e867dc Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 13 Aug 2010 16:50:07 +0000 Subject: [PATCH 4022/4487] Define EXTPROC for MIPS. --- ChangeLog.mips | 4 ++++ sysdeps/unix/sysv/linux/mips/bits/termios.h | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 2dbed6f8bc..33dbdb1422 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,7 @@ +2010-08-13 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/termios.h (EXTPROC): Define. + 2010-08-12 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/statfs.h (struct statfs, diff --git a/sysdeps/unix/sysv/linux/mips/bits/termios.h b/sysdeps/unix/sysv/linux/mips/bits/termios.h index 4ff6e37ad6..7a90f99ac6 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/termios.h +++ b/sysdeps/unix/sysv/linux/mips/bits/termios.h @@ -1,5 +1,5 @@ /* termios type and macro definitions. Linux/MIPS version. - Copyright (C) 1993, 94, 95, 96, 97, 99 Free Software Foundation, Inc. + Copyright (C) 1993, 94, 95, 96, 97, 99, 2010 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 @@ -194,6 +194,9 @@ struct termios #endif #define TOSTOP 0100000 /* Send SIGTTOU for background output. */ #define ITOSTOP TOSTOP +#ifdef __USE_BSD +# define EXTPROC 0200000 +#endif /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ From fd5fe45924fd99a5a9a074da426a8833cc5bfcf3 Mon Sep 17 00:00:00 2001 From: Alexander Kanevskiy Date: Fri, 13 Aug 2010 19:43:35 +0000 Subject: [PATCH 4023/4487] ARM: Align hwcap names and definitions with kernel, mark VFP and NEON as HWCAP_IMPORTANT. - Align hwcap names with kernel (arch/arm/kernel/setup.c) - Align HWCAP_ARM_* definitions with kernel - Make VFP and NEON as HWCAP_IMPORTANT, this can help in scenarios where VFP/NEON HW optimizations can be utilized. --- ChangeLog.arm | 11 +++++++++++ sysdeps/unix/sysv/linux/arm/dl-procinfo.c | 6 +++--- sysdeps/unix/sysv/linux/arm/dl-procinfo.h | 4 ++-- sysdeps/unix/sysv/linux/arm/sysdep.h | 5 +++++ 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index f8cb0565ab..ef2a608c92 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,14 @@ +2010-08-13 Alexander Kanevskiy + + * sysdeps/unix/sysv/linux/arm/dl-procinfo.c (_dl_arm_cap_flags): + Change "fast-mult" to "fastmult". Add new HWCAP names. + * sysdeps/unix/sysv/linux/arm/dl-procinfo.h (_DL_HWCAP_COUNT): + Change to 15. + (HWCAP_IMPORTANT): Change to (HWCAP_ARM_VFP | HWCAP_ARM_NEON). + * sysdeps/unix/sysv/linux/arm/sysdep.h (HWCAP_ARM_CRUNCH, + HWCAP_ARM_THUMBEE, HWCAP_ARM_NEON, HWCAP_ARM_VFPv3, + HWCAP_ARM_VFPv3D16): Define. + 2010-08-12 Joseph Myers * sysdeps/unix/sysv/linux/arm/syscalls.list: Add entry for diff --git a/sysdeps/unix/sysv/linux/arm/dl-procinfo.c b/sysdeps/unix/sysv/linux/arm/dl-procinfo.c index 5c913f51a2..03e1511dc7 100644 --- a/sysdeps/unix/sysv/linux/arm/dl-procinfo.c +++ b/sysdeps/unix/sysv/linux/arm/dl-procinfo.c @@ -47,12 +47,12 @@ #if !defined PROCINFO_DECL && defined SHARED ._dl_arm_cap_flags #else -PROCINFO_CLASS const char _dl_arm_cap_flags[10][10] +PROCINFO_CLASS const char _dl_arm_cap_flags[15][10] #endif #ifndef PROCINFO_DECL = { - "swp", "half", "thumb", "26bit", "fast-mult", "fpa", "vfp", "edsp", - "java", "iwmmxt", + "swp", "half", "thumb", "26bit", "fastmult", "fpa", "vfp", "edsp", + "java", "iwmmxt", "crunch", "thumbee", "neon", "vfpv3", "vfpv3d16", } #endif #if !defined SHARED || defined PROCINFO_DECL diff --git a/sysdeps/unix/sysv/linux/arm/dl-procinfo.h b/sysdeps/unix/sysv/linux/arm/dl-procinfo.h index 0c675c60dc..d3fc385570 100644 --- a/sysdeps/unix/sysv/linux/arm/dl-procinfo.h +++ b/sysdeps/unix/sysv/linux/arm/dl-procinfo.h @@ -24,7 +24,7 @@ #include #include -#define _DL_HWCAP_COUNT 10 +#define _DL_HWCAP_COUNT 15 /* The kernel provides platform data but it is not interesting. */ #define _DL_HWCAP_PLATFORM 0 @@ -54,7 +54,7 @@ _dl_hwcap_string (int idx) return GLRO(dl_arm_cap_flags)[idx]; }; -#define HWCAP_IMPORTANT (HWCAP_ARM_HALF | HWCAP_ARM_FAST_MULT) +#define HWCAP_IMPORTANT (HWCAP_ARM_VFP | HWCAP_ARM_NEON) static inline int __attribute__ ((unused)) diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index bd5b2ce3e4..e647d42ea4 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -55,6 +55,11 @@ #define HWCAP_ARM_EDSP 128 #define HWCAP_ARM_JAVA 256 #define HWCAP_ARM_IWMMXT 512 +#define HWCAP_ARM_CRUNCH 1024 +#define HWCAP_ARM_THUMBEE 2048 +#define HWCAP_ARM_NEON 4096 +#define HWCAP_ARM_VFPv3 8192 +#define HWCAP_ARM_VFPv3D16 16384 #ifdef __ASSEMBLER__ From 5237c94b637a24f0bd34cf7b68877125dacf7c2f Mon Sep 17 00:00:00 2001 From: Chandrakala Chavva Date: Fri, 13 Aug 2010 23:25:10 +0000 Subject: [PATCH 4024/4487] Fix MIPS PSEUDO define for n32 and n64 non-PIC. --- ChangeLog.mips | 6 ++++++ sysdeps/unix/mips/mips64/n32/sysdep.h | 1 + sysdeps/unix/mips/mips64/n64/sysdep.h | 1 + 3 files changed, 8 insertions(+) diff --git a/ChangeLog.mips b/ChangeLog.mips index 33dbdb1422..bbcf8189e9 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,9 @@ +2010-08-13 Chandrakala Chavva + + * sysdeps/unix/mips/mips64/n64/sysdep.h (PSEUDO): Add 'nop' in + jump delay slot. + * sysdeps/unix/mips/mips64/n32/sysdep.h (PSEUDO): Ditto. + 2010-08-13 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/termios.h (EXTPROC): Define. diff --git a/sysdeps/unix/mips/mips64/n32/sysdep.h b/sysdeps/unix/mips/mips64/n32/sysdep.h index ec93fadc04..df1391d70f 100644 --- a/sysdeps/unix/mips/mips64/n32/sysdep.h +++ b/sysdeps/unix/mips/mips64/n32/sysdep.h @@ -45,6 +45,7 @@ L(syse1): .set noreorder; \ .align 2; \ 99: j __syscall_error; \ + nop; \ ENTRY(name) \ .set noreorder; \ li v0, SYS_ify(syscall_name); \ diff --git a/sysdeps/unix/mips/mips64/n64/sysdep.h b/sysdeps/unix/mips/mips64/n64/sysdep.h index 502b66797b..da5f6a047c 100644 --- a/sysdeps/unix/mips/mips64/n64/sysdep.h +++ b/sysdeps/unix/mips/mips64/n64/sysdep.h @@ -45,6 +45,7 @@ L(syse1): .set noreorder; \ .align 2; \ 99: j __syscall_error; \ + nop; \ ENTRY(name) \ .set noreorder; \ li v0, SYS_ify(syscall_name); \ From 5ccc178fd7df5cc1e1ed368c093cf207b6135879 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 13 Aug 2010 23:37:54 +0000 Subject: [PATCH 4025/4487] Undefine __ASSUME_GETDENTS64_SYSCALL for n32 before 2.6.35. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/kernel-features.h | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/ChangeLog.mips b/ChangeLog.mips index bbcf8189e9..3d0b975b72 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2010-08-13 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/kernel-features.h + (__ASSUME_GETDENTS64_SYSCALL): Undefine for n32 ABI before 2.6.35. + 2010-08-13 Chandrakala Chavva * sysdeps/unix/mips/mips64/n64/sysdep.h (PSEUDO): Add 'nop' in diff --git a/sysdeps/unix/sysv/linux/mips/kernel-features.h b/sysdeps/unix/sysv/linux/mips/kernel-features.h index 6fe9b0883a..e9cf191d15 100644 --- a/sysdeps/unix/sysv/linux/mips/kernel-features.h +++ b/sysdeps/unix/sysv/linux/mips/kernel-features.h @@ -37,4 +37,10 @@ # define __ASSUME_SIGNALFD4 1 #endif +/* The n32 syscall ABI did not have a getdents64 syscall until + 2.6.35. */ +#if _MIPS_SIM == _ABIN32 && __LINUX_KERNEL_VERSION < 0x020623 +# undef __ASSUME_GETDENTS64_SYSCALL +#endif + #include_next From 54c0ba292c2400e2a122d8770cd3f60311b8caac Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 13 Aug 2010 23:43:22 +0000 Subject: [PATCH 4026/4487] Correct #undef location in previous commit. --- sysdeps/unix/sysv/linux/mips/kernel-features.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/kernel-features.h b/sysdeps/unix/sysv/linux/mips/kernel-features.h index e9cf191d15..092c35d9f5 100644 --- a/sysdeps/unix/sysv/linux/mips/kernel-features.h +++ b/sysdeps/unix/sysv/linux/mips/kernel-features.h @@ -37,10 +37,10 @@ # define __ASSUME_SIGNALFD4 1 #endif +#include_next + /* The n32 syscall ABI did not have a getdents64 syscall until 2.6.35. */ #if _MIPS_SIM == _ABIN32 && __LINUX_KERNEL_VERSION < 0x020623 # undef __ASSUME_GETDENTS64_SYSCALL #endif - -#include_next From 9751fb5289f19647a6cd0ac90f886e9945b16861 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 14 Aug 2010 12:37:04 +0200 Subject: [PATCH 4027/4487] m68k: Add prlimit64, fanotify_init, fanotify_mask syscalls --- ChangeLog.m68k | 5 +++++ sysdeps/unix/sysv/linux/m68k/syscalls.list | 3 +++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 284a3bf399..ea606939f2 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2010-08-14 Andreas Schwab + + * sysdeps/unix/sysv/linux/m68k/syscalls.list: Add prlimit64, + fanotify_init, fanotify_mask. + 2010-08-02 Andreas Schwab * sysdeps/m68k/coldfire/sysdep.h: New file. diff --git a/sysdeps/unix/sysv/linux/m68k/syscalls.list b/sysdeps/unix/sysv/linux/m68k/syscalls.list index 5367ef0d0b..b7a6eac38c 100644 --- a/sysdeps/unix/sysv/linux/m68k/syscalls.list +++ b/sysdeps/unix/sysv/linux/m68k/syscalls.list @@ -1,3 +1,6 @@ # File name Caller Syscall name Args Strong name Weak names cacheflush EXTRA cacheflush i:iiii __cacheflush cacheflush +prlimit64 EXTRA prlimit64 i:iipp prlimit64 +fanotify_init EXTRA fanotify_init i:iii fanotify_init +fanotify_mark EXTRA fanotify_mark i:iiiiis fanotify_mark From 9ed28e47dc21521ca404d36d114c651c7cee42bf Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 14 Aug 2010 22:28:47 +0200 Subject: [PATCH 4028/4487] m68k: remove fanotify_init from syscalls list --- ChangeLog.m68k | 5 +++++ sysdeps/unix/sysv/linux/m68k/syscalls.list | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index ea606939f2..9b0752312d 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2010-08-17 Andreas Schwab + + * sysdeps/unix/sysv/linux/m68k/syscalls.list: Remove + fanotify_init. + 2010-08-14 Andreas Schwab * sysdeps/unix/sysv/linux/m68k/syscalls.list: Add prlimit64, diff --git a/sysdeps/unix/sysv/linux/m68k/syscalls.list b/sysdeps/unix/sysv/linux/m68k/syscalls.list index b7a6eac38c..3a1b7dbf89 100644 --- a/sysdeps/unix/sysv/linux/m68k/syscalls.list +++ b/sysdeps/unix/sysv/linux/m68k/syscalls.list @@ -2,5 +2,4 @@ cacheflush EXTRA cacheflush i:iiii __cacheflush cacheflush prlimit64 EXTRA prlimit64 i:iipp prlimit64 -fanotify_init EXTRA fanotify_init i:iii fanotify_init fanotify_mark EXTRA fanotify_mark i:iiiiis fanotify_mark From cf64098fc4aef77a4b708e5d92aedced16964390 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 25 Aug 2010 22:55:55 +0200 Subject: [PATCH 4029/4487] m68k: fix SYSCALL_ERROR_LOAD_GOT for Coldfire --- ChangeLog.m68k | 5 +++++ sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 9b0752312d..e66559a855 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2010-08-25 Andreas Schwab + + * sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h + (SYSCALL_ERROR_LOAD_GOT): Use & instead of #. + 2010-08-17 Andreas Schwab * sysdeps/unix/sysv/linux/m68k/syscalls.list: Remove diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h b/sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h index e129dc1ec4..bbbb1567e0 100644 --- a/sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h @@ -24,7 +24,7 @@ #include #define SYSCALL_ERROR_LOAD_GOT(reg) \ - move.l #_GLOBAL_OFFSET_TABLE_@GOTPC, reg; \ + move.l &_GLOBAL_OFFSET_TABLE_@GOTPC, reg; \ lea (-6, %pc, reg), reg #endif From 926cf114f7ca2b19116cac005303040648e17e77 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 15 Sep 2010 10:41:43 -0700 Subject: [PATCH 4030/4487] alpha: rewrite memchr. [BZ #12019] The new implementation does not read too much data. --- ChangeLog.alpha | 9 +- sysdeps/alpha/alphaev6/memchr.S | 193 -------------------------------- sysdeps/alpha/memchr.S | 176 ----------------------------- sysdeps/alpha/memchr.c | 175 +++++++++++++++++++++++++++++ 4 files changed, 183 insertions(+), 370 deletions(-) delete mode 100644 sysdeps/alpha/alphaev6/memchr.S delete mode 100644 sysdeps/alpha/memchr.S create mode 100644 sysdeps/alpha/memchr.c diff --git a/ChangeLog.alpha b/ChangeLog.alpha index a12407cb99..d1c0e126e9 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,4 +1,11 @@ -2010-05-05 Richard Henderson +2010-09-23 Richard Henderson + + [BZ #12019] + * sysdeps/alpha/alphaev6/memchr.S: Remove. + * sysdeps/alpha/memchr.S: Remove. + * sysdeps/alpha/memchr.c: New. + +2010-09-23 Richard Henderson [BZ #1864] * sysdeps/unix/sysv/linux/alpha/fstatfs64.c: New. diff --git a/sysdeps/alpha/alphaev6/memchr.S b/sysdeps/alpha/alphaev6/memchr.S deleted file mode 100644 index fe77cd897b..0000000000 --- a/sysdeps/alpha/alphaev6/memchr.S +++ /dev/null @@ -1,193 +0,0 @@ -/* Copyright (C) 2000, 2003 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David Mosberger (davidm@cs.arizona.edu). - EV6 optimized by Rick Gorton . - - 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. */ - -#include - - .arch ev6 - .set noreorder - .set noat - -ENTRY(__memchr) -#ifdef PROF - ldgp gp, 0(pv) - lda AT, _mcount - jsr AT, (AT), _mcount - .prologue 1 -#else - .prologue 0 -#endif - - # Hack -- if someone passes in (size_t)-1, hoping to just - # search til the end of the address space, we will overflow - # below when we find the address of the last byte. Given - # that we will never have a 56-bit address space, cropping - # the length is the easiest way to avoid trouble. - zap $18, 0x80, $5 # U : Bound length - beq $18, $not_found # U : - ldq_u $1, 0($16) # L : load first quadword Latency=3 - and $17, 0xff, $17 # E : L L U U : 00000000000000ch - - insbl $17, 1, $2 # U : 000000000000ch00 - cmpult $18, 9, $4 # E : small (< 1 quad) string? - or $2, $17, $17 # E : 000000000000chch - lda $3, -1($31) # E : U L L U - - sll $17, 16, $2 # U : 00000000chch0000 - addq $16, $5, $5 # E : Max search address - or $2, $17, $17 # E : 00000000chchchch - sll $17, 32, $2 # U : U L L U : chchchch00000000 - - or $2, $17, $17 # E : chchchchchchchch - extql $1, $16, $7 # U : $7 is upper bits - beq $4, $first_quad # U : - ldq_u $6, -1($5) # L : L U U L : eight or less bytes to search Latency=3 - - extqh $6, $16, $6 # U : 2 cycle stall for $6 - mov $16, $0 # E : - nop # E : - or $7, $6, $1 # E : L U L U $1 = quadword starting at $16 - - # Deal with the case where at most 8 bytes remain to be searched - # in $1. E.g.: - # $18 = 6 - # $1 = ????c6c5c4c3c2c1 -$last_quad: - negq $18, $6 # E : - xor $17, $1, $1 # E : - srl $3, $6, $6 # U : $6 = mask of $18 bits set - cmpbge $31, $1, $2 # E : L U L U - - nop - nop - and $2, $6, $2 # E : - beq $2, $not_found # U : U L U L - -$found_it: -#if defined(__alpha_fix__) && defined(__alpha_cix__) - /* - * Since we are guaranteed to have set one of the bits, we don't - * have to worry about coming back with a 0x40 out of cttz... - */ - cttz $2, $3 # U0 : - addq $0, $3, $0 # E : All done - nop # E : - ret # L0 : L U L U -#else - /* - * Slow and clunky. It can probably be improved. - * An exercise left for others. - */ - negq $2, $3 # E : - and $2, $3, $2 # E : - and $2, 0x0f, $1 # E : - addq $0, 4, $3 # E : - - cmoveq $1, $3, $0 # E : Latency 2, extra map cycle - nop # E : keep with cmov - and $2, 0x33, $1 # E : - addq $0, 2, $3 # E : U L U L : 2 cycle stall on $0 - - cmoveq $1, $3, $0 # E : Latency 2, extra map cycle - nop # E : keep with cmov - and $2, 0x55, $1 # E : - addq $0, 1, $3 # E : U L U L : 2 cycle stall on $0 - - cmoveq $1, $3, $0 # E : Latency 2, extra map cycle - nop - nop - ret # L0 : L U L U -#endif - - # Deal with the case where $18 > 8 bytes remain to be - # searched. $16 may not be aligned. - .align 4 -$first_quad: - andnot $16, 0x7, $0 # E : - insqh $3, $16, $2 # U : $2 = 0000ffffffffffff ($16<0:2> ff) - xor $1, $17, $1 # E : - or $1, $2, $1 # E : U L U L $1 = ====ffffffffffff - - cmpbge $31, $1, $2 # E : - bne $2, $found_it # U : - # At least one byte left to process. - ldq $31, 8($0) # L : - subq $5, 1, $18 # E : U L U L - - addq $0, 8, $0 # E : - # Make $18 point to last quad to be accessed (the - # last quad may or may not be partial). - andnot $18, 0x7, $18 # E : - cmpult $0, $18, $2 # E : - beq $2, $final # U : U L U L - - # At least two quads remain to be accessed. - - subq $18, $0, $4 # E : $4 <- nr quads to be processed - and $4, 8, $4 # E : odd number of quads? - bne $4, $odd_quad_count # U : - # At least three quads remain to be accessed - nop # E : L U L U : move prefetched value to correct reg - - .align 4 -$unrolled_loop: - ldq $1, 0($0) # L : load quad - xor $17, $1, $2 # E : - ldq $31, 8($0) # L : prefetch next quad - cmpbge $31, $2, $2 # E : U L U L - - bne $2, $found_it # U : - addq $0, 8, $0 # E : - nop # E : - nop # E : - -$odd_quad_count: - ldq $1, 0($0) # L : load quad - xor $17, $1, $2 # E : - ldq $31, 8($0) # L : prefetch $4 - cmpbge $31, $2, $2 # E : - - addq $0, 8, $6 # E : - bne $2, $found_it # U : - cmpult $6, $18, $6 # E : - addq $0, 8, $0 # E : - - bne $6, $unrolled_loop # U : - nop # E : - nop # E : - nop # E : - -$final: ldq $1, 0($0) # L : load last quad - subq $5, $0, $18 # E : $18 <- number of bytes left to do - nop # E : - bne $18, $last_quad # U : - -$not_found: - mov $31, $0 # E : - nop # E : - nop # E : - ret # L0 : - - END(__memchr) - -weak_alias (__memchr, memchr) -#if !__BOUNDED_POINTERS__ -weak_alias (__memchr, __ubp_memchr) -#endif -libc_hidden_builtin_def (memchr) diff --git a/sysdeps/alpha/memchr.S b/sysdeps/alpha/memchr.S deleted file mode 100644 index 87c7fb10c0..0000000000 --- a/sysdeps/alpha/memchr.S +++ /dev/null @@ -1,176 +0,0 @@ -/* Copyright (C) 1996, 2000, 2003 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David Mosberger (davidm@cs.arizona.edu). - - 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. */ - -/* Finds characters in a memory area. Optimized for the Alpha: - - - memory accessed as aligned quadwords only - - uses cmpbge to compare 8 bytes in parallel - - does binary search to find 0 byte in last - quadword (HAKMEM needed 12 instructions to - do this instead of the 9 instructions that - binary search needs). - -For correctness consider that: - - - only minimum number of quadwords may be accessed - - the third argument is an unsigned long -*/ - -#include - - .set noreorder - .set noat - -ENTRY(__memchr) -#ifdef PROF - ldgp gp, 0(pv) - lda AT, _mcount - jsr AT, (AT), _mcount - .prologue 1 -#else - .prologue 0 -#endif - - # Hack -- if someone passes in (size_t)-1, hoping to just - # search til the end of the address space, we will overflow - # below when we find the address of the last byte. Given - # that we will never have a 56-bit address space, cropping - # the length is the easiest way to avoid trouble. - zap a2, 0x80, t4 #-e0 : - - beq a2, $not_found # .. e1 : - ldq_u t0, 0(a0) # e1 : load first quadword - insbl a1, 1, t1 # .. e0 : t1 = 000000000000ch00 - and a1, 0xff, a1 #-e0 : a1 = 00000000000000ch - cmpult a2, 9, t3 # .. e1 : - or t1, a1, a1 # e0 : a1 = 000000000000chch - lda t2, -1(zero) # .. e1 : - sll a1, 16, t1 #-e0 : t1 = 00000000chch0000 - addq a0, t4, t4 # .. e1 : - or t1, a1, a1 # e1 : a1 = 00000000chchchch - unop # : - sll a1, 32, t1 #-e0 : t1 = chchchch00000000 - or t1, a1, a1 # e1 : a1 = chchchchchchchch - extql t0, a0, t6 # e0 : - beq t3, $first_quad # .. e1 : - - ldq_u t5, -1(t4) #-e1 : eight or less bytes to search - extqh t5, a0, t5 # .. e0 : - mov a0, v0 # e0 : - or t6, t5, t0 # .. e1 : t0 = quadword starting at a0 - - # Deal with the case where at most 8 bytes remain to be searched - # in t0. E.g.: - # a2 = 6 - # t0 = ????c6c5c4c3c2c1 -$last_quad: - negq a2, t5 #-e0 : - xor a1, t0, t0 # .. e1 : - srl t2, t5, t5 # e0 : t5 = mask of a2 bits set - cmpbge zero, t0, t1 # .. e1 : - and t1, t5, t1 #-e0 : - beq t1, $not_found # .. e1 : - -$found_it: - # Now, determine which byte matched: - negq t1, t2 # e0 : - and t1, t2, t1 # e1 : - - and t1, 0x0f, t0 #-e0 : - addq v0, 4, t2 # .. e1 : - cmoveq t0, t2, v0 # e0 : - - addq v0, 2, t2 # .. e1 : - and t1, 0x33, t0 #-e0 : - cmoveq t0, t2, v0 # .. e1 : - - and t1, 0x55, t0 # e0 : - addq v0, 1, t2 # .. e1 : - cmoveq t0, t2, v0 #-e0 : - -$done: ret # .. e1 : - - # Deal with the case where a2 > 8 bytes remain to be - # searched. a0 may not be aligned. - .align 4 -$first_quad: - andnot a0, 0x7, v0 #-e1 : - insqh t2, a0, t1 # .. e0 : t1 = 0000ffffffffffff (a0<0:2> ff) - xor t0, a1, t0 # e0 : - or t0, t1, t0 # e1 : t0 = ====ffffffffffff - cmpbge zero, t0, t1 #-e0 : - bne t1, $found_it # .. e1 : - - # At least one byte left to process. - - ldq zero, 8(v0) # e0 : prefetch next quad - subq t4, 1, a2 # .. e1 : - addq v0, 8, v0 #-e0 : - - # Make a2 point to last quad to be accessed (the - # last quad may or may not be partial). - - andnot a2, 0x7, a2 # .. e1 : - cmpult v0, a2, t1 # e0 : - beq t1, $final # .. e1 : - - # At least two quads remain to be accessed. - - subq a2, v0, t3 #-e0 : t3 <- nr quads to be processed - and t3, 8, t3 # e1 : odd number of quads? - bne t3, $odd_quad_count # e1 : - - # At least three quads remain to be accessed - - .align 4 -$unrolled_loop: - ldq t0, 0(v0) # e0 : load quad - xor a1, t0, t1 # .. e1 : - ldq zero, 8(v0) # e0 : prefetch next quad - cmpbge zero, t1, t1 # .. e1: - bne t1, $found_it # e0 : - - addq v0, 8, v0 # e1 : -$odd_quad_count: - ldq t0, 0(v0) # e0 : load quad - xor a1, t0, t1 # .. e1 : - ldq zero, 8(v0) # e0 : prefetch next quad - cmpbge zero, t1, t1 # .. e1 : - addq v0, 8, t5 #-e0 : - bne t1, $found_it # .. e1 : - - cmpult t5, a2, t5 # e0 : - addq v0, 8, v0 # .. e1 : - bne t5, $unrolled_loop #-e1 : - -$final: ldq t0, 0(v0) # e0 : load last quad - subq t4, v0, a2 # .. e1 : a2 <- number of bytes left to do - bne a2, $last_quad # e1 : - -$not_found: - mov zero, v0 #-e0 : - ret # .. e1 : - - END(__memchr) - -weak_alias (__memchr, memchr) -#if !__BOUNDED_POINTERS__ -weak_alias (__memchr, __ubp_memchr) -#endif -libc_hidden_builtin_def (memchr) diff --git a/sysdeps/alpha/memchr.c b/sysdeps/alpha/memchr.c new file mode 100644 index 0000000000..c52841b69d --- /dev/null +++ b/sysdeps/alpha/memchr.c @@ -0,0 +1,175 @@ +/* Copyright (C) 2010 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. */ + +#include + +typedef unsigned long word; + +static inline word +ldq_u(const void *s) +{ + return *(const word *)((word)s & -8); +} + +#define unlikely(X) __builtin_expect ((X), 0) +#define prefetch(X) __builtin_prefetch ((void *)(X), 0) + +#define cmpbeq0(X) __builtin_alpha_cmpbge(0, (X)) +#define find(X, Y) cmpbeq0 ((X) ^ (Y)) + +/* Search no more than N bytes of S for C. */ + +void * +__memchr (const void *s, int xc, size_t n) +{ + const word *s_align; + word t, current, found, mask, offset; + + if (unlikely (n == 0)) + return 0; + + current = ldq_u (s); + + /* Replicate low byte of XC into all bytes of C. */ + t = xc & 0xff; /* 0000000c */ + t = (t << 8) | t; /* 000000cc */ + t = (t << 16) | t; /* 0000cccc */ + const word c = (t << 32) | t; /* cccccccc */ + + /* Align the source, and decrement the count by the number + of bytes searched in the first word. */ + s_align = (const word *)(s & -8); + n += (s & 7); + + /* Deal with misalignment in the first word for the comparison. */ + mask = (1ul << (s & 7)) - 1; + + /* If the entire string fits within one word, we may need masking + at both the front and the back of the string. */ + if (unlikely (n <= 8)) + { + mask |= -1ul << n; + goto last_quad; + } + + found = find (current, c) & ~mask; + if (unlikely (found)) + goto found_it; + + s_align++; + n -= 8; + + /* If the block is sufficiently large, align to cacheline and prefetch. */ + if (unlikely (n >= 256)) + { + /* Prefetch 3 cache lines beyond the one we're working on. */ + prefetch (s_align + 8); + prefetch (s_align + 16); + prefetch (s_align + 24); + + while ((word)s_align & 63) + { + current = *s_align; + found = find (current, c); + if (found) + goto found_it; + s_align++; + n -= 8; + } + + /* Within each cacheline, advance the load for the next word + before the test for the previous word is complete. This + allows us to hide the 3 cycle L1 cache load latency. We + only perform this advance load within a cacheline to prevent + reading across page boundary. */ +#define CACHELINE_LOOP \ + do { \ + word i, next = s_align[0]; \ + for (i = 0; i < 7; ++i) \ + { \ + current = next; \ + next = s_align[1]; \ + found = find (current, c); \ + if (unlikely (found)) \ + goto found_it; \ + s_align++; \ + } \ + current = next; \ + found = find (current, c); \ + if (unlikely (found)) \ + goto found_it; \ + s_align++; \ + n -= 64; \ + } while (0) + + /* While there's still lots more data to potentially be read, + continue issuing prefetches for the 4th cacheline out. */ + while (n >= 256) + { + prefetch (s_align + 24); + CACHELINE_LOOP; + } + + /* Up to 3 cache lines remaining. Continue issuing advanced + loads, but stop prefetching. */ + while (n >= 64) + CACHELINE_LOOP; + + /* We may have exhausted the buffer. */ + if (n == 0) + return NULL; + } + + /* Quadword aligned loop. */ + current = *s_align; + while (n > 8) + { + found = find (current, c); + if (unlikely (found)) + goto found_it; + current = *++s_align; + n -= 8; + } + + /* The last word may need masking at the tail of the compare. */ + mask = -1ul << n; + last_quad: + found = find (current, c) & ~mask; + if (found == 0) + return NULL; + + found_it: +#ifdef __alpha_cix__ + offset = __builtin_alpha_cttz (found); +#else + /* Extract LSB. */ + found &= -found; + + /* Binary search for the LSB. */ + offset = (found & 0x0f ? 0 : 4); + offset += (found & 0x33 ? 0 : 2); + offset += (found & 0x55 ? 0 : 1); +#endif + + return (void *)((word)s_align + offset); +} + +#ifdef weak_alias +weak_alias (__memchr, BP_SYM (memchr)) +#endif +libc_hidden_builtin_def (memchr) From b54f998dc380ce327a7faf2c40e569fb2cf39bf0 Mon Sep 17 00:00:00 2001 From: Michael Cree Date: Sun, 26 Sep 2010 21:15:51 +1300 Subject: [PATCH 4031/4487] alpha: Fix compile errors in memchr Include missing header file and make some casts explicit. --- sysdeps/alpha/memchr.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sysdeps/alpha/memchr.c b/sysdeps/alpha/memchr.c index c52841b69d..7e16f8a17c 100644 --- a/sysdeps/alpha/memchr.c +++ b/sysdeps/alpha/memchr.c @@ -17,6 +17,7 @@ 02111-1307 USA. */ #include +#include typedef unsigned long word; @@ -53,11 +54,11 @@ __memchr (const void *s, int xc, size_t n) /* Align the source, and decrement the count by the number of bytes searched in the first word. */ - s_align = (const word *)(s & -8); - n += (s & 7); + s_align = (const word *)((word)s & -8); + n += ((word)s & 7); /* Deal with misalignment in the first word for the comparison. */ - mask = (1ul << (s & 7)) - 1; + mask = (1ul << ((word)s & 7)) - 1; /* If the entire string fits within one word, we may need masking at both the front and the back of the string. */ From 6c14d67f5f27701e0fd718cbf23850ca64d1af6e Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sun, 26 Sep 2010 11:13:04 -0700 Subject: [PATCH 4032/4487] Update changelog for last change. --- ChangeLog.alpha | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index d1c0e126e9..d2030d6638 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,8 @@ +2010-09-26 Michael Cree + + * sysdeps/alpha/memchr.c: Include + (__memchr): Add casts for integer arithmetic on pointers. + 2010-09-23 Richard Henderson [BZ #12019] From dc54bc1eaa0b1e2d700e0345a3f201240483a4a7 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 30 Sep 2010 18:17:22 +0000 Subject: [PATCH 4033/4487] Add fanotify_mark for ARM. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/syscalls.list | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog.arm b/ChangeLog.arm index ef2a608c92..96e53c0c28 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2010-09-30 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/syscalls.list: Add entry for + fanotify_mark syscall. + 2010-08-13 Alexander Kanevskiy * sysdeps/unix/sysv/linux/arm/dl-procinfo.c (_dl_arm_cap_flags): diff --git a/sysdeps/unix/sysv/linux/arm/syscalls.list b/sysdeps/unix/sysv/linux/arm/syscalls.list index cc75737c2f..820602b791 100644 --- a/sysdeps/unix/sysv/linux/arm/syscalls.list +++ b/sysdeps/unix/sysv/linux/arm/syscalls.list @@ -5,3 +5,5 @@ oldgetrlimit EXTRA getrlimit i:ip __old_getrlimit getrlimit@GLIBC_2.0 oldsetrlimit EXTRA setrlimit i:ip __old_setrlimit setrlimit@GLIBC_2.0 prlimit64 EXTRA prlimit64 i:iipp prlimit64 + +fanotify_mark EXTRA fanotify_mark i:iiiiis fanotify_mark From 323e2ce5e0f3478e3aa1e3193605fbd07723c866 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 11 Oct 2010 14:57:33 +0000 Subject: [PATCH 4034/4487] Add hidden feupdateenv and fetestexcept definitions for ARM. --- ChangeLog.arm | 8 ++++++++ sysdeps/arm/eabi/feupdateenv.c | 3 ++- sysdeps/arm/eabi/ftestexcept.c | 3 ++- sysdeps/arm/fpu/ftestexcept.c | 3 ++- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 96e53c0c28..02affa8ce3 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,11 @@ +2010-10-11 Joseph Myers + + * sysdeps/arm/eabi/feupdateenv.c (feupdateenv): Add + libm_hidden_ver. + * sysdeps/arm/eabi/ftestexcept.c (fetestexcept): Add + libm_hidden_def. + * sysdeps/arm/fpu/ftestexcept.c (fetestexcept): Likewise. + 2010-09-30 Joseph Myers * sysdeps/unix/sysv/linux/arm/syscalls.list: Add entry for diff --git a/sysdeps/arm/eabi/feupdateenv.c b/sysdeps/arm/eabi/feupdateenv.c index 9769867ab3..8c96858153 100644 --- a/sysdeps/arm/eabi/feupdateenv.c +++ b/sysdeps/arm/eabi/feupdateenv.c @@ -1,5 +1,5 @@ /* Install given floating-point environment and raise exceptions. - Copyright (C) 1997, 1999, 2000, 2008 Free Software Foundation, Inc. + Copyright (C) 1997, 1999, 2000, 2008, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -56,4 +56,5 @@ strong_alias (__feupdateenv, __old_feupdateenv) compat_symbol (libm, __old_feupdateenv, feupdateenv, GLIBC_2_1); #endif +libm_hidden_ver (__feupdateenv, feupdateenv) versioned_symbol (libm, __feupdateenv, feupdateenv, GLIBC_2_2); diff --git a/sysdeps/arm/eabi/ftestexcept.c b/sysdeps/arm/eabi/ftestexcept.c index 846bb01956..61b81cbb0e 100644 --- a/sysdeps/arm/eabi/ftestexcept.c +++ b/sysdeps/arm/eabi/ftestexcept.c @@ -1,5 +1,5 @@ /* Test exception in current environment. - Copyright (C) 1997, 1998, 2005 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 2005, 2010 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 @@ -41,3 +41,4 @@ fetestexcept (int excepts) /* Unsupported, return 0. */ return 0; } +libm_hidden_def (fetestexcept) diff --git a/sysdeps/arm/fpu/ftestexcept.c b/sysdeps/arm/fpu/ftestexcept.c index 328bcb05fd..c796b01ee4 100644 --- a/sysdeps/arm/fpu/ftestexcept.c +++ b/sysdeps/arm/fpu/ftestexcept.c @@ -1,5 +1,5 @@ /* Test exception in current environment. - Copyright (C) 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 2010 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 @@ -30,3 +30,4 @@ fetestexcept (int excepts) return temp & excepts & FE_ALL_EXCEPT; } +libm_hidden_def (fetestexcept) From 9431b1591b3536fe4a674cbffe69d48941c60cdc Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 11 Oct 2010 14:58:01 +0000 Subject: [PATCH 4035/4487] Add hidden feupdateenv and fetestexcept definitions for MIPS. --- ChangeLog.mips | 6 ++++++ sysdeps/mips/fpu/feupdateenv.c | 3 ++- sysdeps/mips/fpu/ftestexcept.c | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 3d0b975b72..8daa71c157 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,9 @@ +2010-10-11 Joseph Myers + + * sysdeps/mips/fpu/feupdateenv.c (feupdateenv): Add + libm_hidden_def. + * sysdeps/mips/fpu/ftestexcept.c (fetestexcept): Likewise. + 2010-08-13 Joseph Myers * sysdeps/unix/sysv/linux/mips/kernel-features.h diff --git a/sysdeps/mips/fpu/feupdateenv.c b/sysdeps/mips/fpu/feupdateenv.c index 20b20e14c0..5051562621 100644 --- a/sysdeps/mips/fpu/feupdateenv.c +++ b/sysdeps/mips/fpu/feupdateenv.c @@ -1,5 +1,5 @@ /* Install given floating-point environment and raise exceptions. - Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2002, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger , 1998. @@ -41,3 +41,4 @@ feupdateenv (const fenv_t *envp) /* Success. */ return 0; } +libm_hidden_def (feupdateenv) diff --git a/sysdeps/mips/fpu/ftestexcept.c b/sysdeps/mips/fpu/ftestexcept.c index 6a833f7563..385554c862 100644 --- a/sysdeps/mips/fpu/ftestexcept.c +++ b/sysdeps/mips/fpu/ftestexcept.c @@ -1,5 +1,5 @@ /* Test exception in current environment. - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1998, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger , 1998. @@ -31,3 +31,4 @@ fetestexcept (int excepts) return cw & excepts & FE_ALL_EXCEPT; } +libm_hidden_def (fetestexcept) From 0b5c1204bf1a2267913c2d9c896258c528928c83 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 11 Oct 2010 14:58:26 +0000 Subject: [PATCH 4036/4487] Add hidden feupdateenv and fetestexcept definitions for Power. --- ChangeLog.powerpc | 7 +++++++ sysdeps/powerpc/nofpu/feupdateenv.c | 3 ++- sysdeps/powerpc/nofpu/ftestexcept.c | 3 ++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog.powerpc b/ChangeLog.powerpc index 390c774d23..d8989b0b33 100644 --- a/ChangeLog.powerpc +++ b/ChangeLog.powerpc @@ -1,3 +1,10 @@ +2010-10-11 Joseph Myers + + * sysdeps/powerpc/nofpu/feupdateenv.c (feupdateenv): Add + libm_hidden_ver. + * sysdeps/powerpc/nofpu/ftestexcept.c (fetestexcept): Add + libm_hidden_def. + 2010-02-10 Joseph Myers * sysdeps/powerpc/nofpu/fegetenv.c: Add hidden alias. diff --git a/sysdeps/powerpc/nofpu/feupdateenv.c b/sysdeps/powerpc/nofpu/feupdateenv.c index 17af8d3ec0..f15e1681cc 100644 --- a/sysdeps/powerpc/nofpu/feupdateenv.c +++ b/sysdeps/powerpc/nofpu/feupdateenv.c @@ -1,6 +1,6 @@ /* Install given floating-point environment and raise exceptions (soft-float edition). - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2010 Free Software Foundation, Inc. Contributed by Aldy Hernandez , 2002. This file is part of the GNU C Library. @@ -49,4 +49,5 @@ strong_alias (__feupdateenv, __old_feupdateenv) compat_symbol (libm, BP_SYM (__old_feupdateenv), BP_SYM (feupdateenv), GLIBC_2_1); #endif +libm_hidden_ver (__feupdateenv, feupdateenv) versioned_symbol (libm, BP_SYM (__feupdateenv), BP_SYM (feupdateenv), GLIBC_2_2); diff --git a/sysdeps/powerpc/nofpu/ftestexcept.c b/sysdeps/powerpc/nofpu/ftestexcept.c index ce8044fe0a..ebd3b1505c 100644 --- a/sysdeps/powerpc/nofpu/ftestexcept.c +++ b/sysdeps/powerpc/nofpu/ftestexcept.c @@ -1,5 +1,5 @@ /* Test floating-point exceptions (soft-float edition). - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2010 Free Software Foundation, Inc. Contributed by Aldy Hernandez , 2002. This file is part of the GNU C Library. @@ -26,3 +26,4 @@ fetestexcept (int x) { return __sim_exceptions & x; } +libm_hidden_def (fetestexcept) From 2e1639a8a0bf8889cf3c1dc5d2c53dba0dc5a035 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 11 Oct 2010 23:14:37 +0200 Subject: [PATCH 4037/4487] m68k: add hidden feupdateenv and fetestexcept definitions --- ChangeLog.m68k | 7 +++++++ sysdeps/m68k/fpu/feupdateenv.c | 3 ++- sysdeps/m68k/fpu/ftestexcept.c | 3 ++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index e66559a855..a2c4ee286e 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,10 @@ +2010-10-11 Andreas Schwab + + * sysdeps/m68k/fpu/feupdateenv.c (feupdateenv): Add + libm_hidden_ver. + * sysdeps/m68k/fpu/ftestexcept.c (feupdateenv): Add + libm_hidden_def. + 2010-08-25 Andreas Schwab * sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h diff --git a/sysdeps/m68k/fpu/feupdateenv.c b/sysdeps/m68k/fpu/feupdateenv.c index 2a6831387e..9c0fb2119d 100644 --- a/sysdeps/m68k/fpu/feupdateenv.c +++ b/sysdeps/m68k/fpu/feupdateenv.c @@ -1,5 +1,5 @@ /* Install given floating-point environment and raise exceptions. - Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc. + Copyright (C) 1997,1999-2001,2010 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab @@ -47,4 +47,5 @@ strong_alias (__feupdateenv, __old_feupdateenv) compat_symbol (libm, __old_feupdateenv, feupdateenv, GLIBC_2_1); #endif +libm_hidden_ver (__feupdateenv, feupdateenv) versioned_symbol (libm, __feupdateenv, feupdateenv, GLIBC_2_2); diff --git a/sysdeps/m68k/fpu/ftestexcept.c b/sysdeps/m68k/fpu/ftestexcept.c index 3157c90d1a..ce180919bc 100644 --- a/sysdeps/m68k/fpu/ftestexcept.c +++ b/sysdeps/m68k/fpu/ftestexcept.c @@ -1,5 +1,5 @@ /* Test exception in current environment. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab @@ -30,3 +30,4 @@ fetestexcept (int excepts) return fpsr & excepts & FE_ALL_EXCEPT; } +libm_hidden_def (fetestexcept) From 16d6bc0bff4a2529bb7de4d664cd598a71fdd029 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 11 Oct 2010 23:15:17 +0200 Subject: [PATCH 4038/4487] m68k: remove fma inlines --- ChangeLog.m68k | 2 ++ sysdeps/m68k/m680x0/fpu/bits/mathinline.h | 14 -------------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index a2c4ee286e..2bf5a3752a 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,5 +1,7 @@ 2010-10-11 Andreas Schwab + * sysdeps/m68k/m680x0/fpu/bits/mathinline.h: Remove fma inlines. + * sysdeps/m68k/fpu/feupdateenv.c (feupdateenv): Add libm_hidden_ver. * sysdeps/m68k/fpu/ftestexcept.c (feupdateenv): Add diff --git a/sysdeps/m68k/m680x0/fpu/bits/mathinline.h b/sysdeps/m68k/m680x0/fpu/bits/mathinline.h index 8a171278b3..00ae076038 100644 --- a/sysdeps/m68k/m680x0/fpu/bits/mathinline.h +++ b/sysdeps/m68k/m680x0/fpu/bits/mathinline.h @@ -326,13 +326,6 @@ __m81_defun (long int, __CONCAT(__lrint,s), (float_type __x)) \ long int __result; \ __asm ("fmove%.l %1, %0" : "=dm" (__result) : "f" (__x)); \ return __result; \ -} \ - \ -__m81_inline float_type \ -__NTH (__m81_u(__CONCAT(__fma,s))(float_type __x, float_type __y, \ - float_type __z)) \ -{ \ - return (__x * __y) + __z; \ } __inline_functions (double,) @@ -397,8 +390,6 @@ __inline_forward_c(int,isnan, (double __value), (__value)) __inline_forward_c(double,scalbln, (double __x, long int __n), (__x, __n)) __inline_forward_c(double,nearbyint, (double __value), (__value)) __inline_forward_c(long int,lrint, (double __value), (__value)) -__inline_forward_c(double,fma, (double __x, double __y, double __z), - (__x, __y, __z)) # endif # ifdef __USE_GNU __inline_forward(void,sincos, (double __x, double *__sinx, double *__cosx), @@ -419,8 +410,6 @@ __inline_forward_c(int,isnanf, (float __value), (__value)) __inline_forward_c(float,scalblnf, (float __x, long int __n), (__x, __n)) __inline_forward_c(float,nearbyintf, (float __value), (__value)) __inline_forward_c(long int,lrintf, (float __value), (__value)) -__inline_forward_c(float,fmaf, (float __x, float __y, float __z), - (__x, __y, __z)) # endif # ifdef __USE_GNU __inline_forward(void,sincosf, (float __x, float *__sinx, float *__cosx), @@ -440,9 +429,6 @@ __inline_forward_c(long double,scalblnl, (long double __x, long int __n), (__x, __n)) __inline_forward_c(long double,nearbyintl, (long double __value), (__value)) __inline_forward_c(long int,lrintl, (long double __value), (__value)) -__inline_forward_c(long double,fmal, - (long double __x, long double __y, long double __z), - (__x, __y, __z)) # endif # ifdef __USE_GNU __inline_forward(void,sincosl, From c6d5d85ccbb8e7d98a790c5dec3e7244254852a2 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 19 Oct 2010 20:09:24 +0000 Subject: [PATCH 4039/4487] Conditionally define FP_FAST_FMA* for ARM. --- ChangeLog.arm | 5 +++++ sysdeps/arm/bits/mathdef.h | 16 +++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 02affa8ce3..69a28c6ba8 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2010-10-19 Joseph Myers + + * sysdeps/arm/bits/mathdef.h (FP_FAST_FMA, FP_FAST_FMAF, + FP_FAST_FMAL): Define if associated GCC macros are defined. + 2010-10-11 Joseph Myers * sysdeps/arm/eabi/feupdateenv.c (feupdateenv): Add diff --git a/sysdeps/arm/bits/mathdef.h b/sysdeps/arm/bits/mathdef.h index daca1102fc..97f5d4d227 100644 --- a/sysdeps/arm/bits/mathdef.h +++ b/sysdeps/arm/bits/mathdef.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000, 2004, 2006, 2007 +/* Copyright (C) 1999, 2000, 2004, 2006, 2007, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -34,6 +34,20 @@ typedef double double_t; /* `double' expressions are evaluated as # define FP_ILOGB0 (-2147483647) # define FP_ILOGBNAN (2147483647) +/* The GCC 4.6 compiler will define __FP_FAST_FMA{,F,L} if the fma{,f,l} + builtins are supported. */ +# if __FP_FAST_FMA +# define FP_FAST_FMA 1 +# endif + +# if __FP_FAST_FMAF +# define FP_FAST_FMAF 1 +# endif + +# if __FP_FAST_FMAL +# define FP_FAST_FMAL 1 +# endif + #endif /* ISO C99 */ #ifndef __NO_LONG_DOUBLE_MATH From 94a2483c911a8949c2834311afdffc0c2a0d2c24 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 21 Oct 2010 22:37:53 +0000 Subject: [PATCH 4040/4487] Add MIPS fanotify_mark. --- ChangeLog.mips | 7 +++++++ sysdeps/unix/sysv/linux/mips/mips32/syscalls.list | 2 ++ sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list | 2 ++ sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list | 2 ++ 4 files changed, 13 insertions(+) diff --git a/ChangeLog.mips b/ChangeLog.mips index 8daa71c157..8ea85cce9d 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,10 @@ +2010-10-21 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/mips32/syscalls.list, + sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list, + sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list: Add entries + for fanotify_mark. + 2010-10-11 Joseph Myers * sysdeps/mips/fpu/feupdateenv.c (feupdateenv): Add diff --git a/sysdeps/unix/sysv/linux/mips/mips32/syscalls.list b/sysdeps/unix/sysv/linux/mips/mips32/syscalls.list index dbeb184d73..f357b5c918 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/mips32/syscalls.list @@ -1,3 +1,5 @@ # File name Caller Syscall name # args Strong name Weak names prlimit64 EXTRA prlimit64 i:iipp prlimit64 + +fanotify_mark EXTRA fanotify_mark i:iiiiis fanotify_mark diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list b/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list index 7a6a777797..87c1949901 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list @@ -6,3 +6,5 @@ ftruncate - ftruncate i:ii __ftruncate ftruncate ftruncate64 __ftruncate64 truncate - truncate i:si truncate truncate64 prlimit64 EXTRA prlimit64 i:iipp prlimit64 + +fanotify_mark EXTRA fanotify_mark i:iiiis fanotify_mark diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list b/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list index a7bccdd376..2c8c4d4842 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list @@ -1,3 +1,5 @@ # File name Caller Syscall name # args Strong name Weak names prlimit EXTRA prlimit64 i:iipp prlimit prlimit64 + +fanotify_mark EXTRA fanotify_mark i:iiiis fanotify_mark From 3ef58249ea2450639bb135d6978009d26aba634f Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 5 Nov 2010 21:39:30 +0100 Subject: [PATCH 4041/4487] m68k: use i386 fchownat --- ChangeLog.m68k | 5 + sysdeps/unix/sysv/linux/m68k/fchownat.c | 129 +----------------------- 2 files changed, 6 insertions(+), 128 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 2bf5a3752a..821f292f44 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2010-11-05 Andreas Schwab + + * sysdeps/unix/sysv/linux/m68k/fchownat.c: Include + i386/fchownat.c. + 2010-10-11 Andreas Schwab * sysdeps/m68k/m680x0/fpu/bits/mathinline.h: Remove fma inlines. diff --git a/sysdeps/unix/sysv/linux/m68k/fchownat.c b/sysdeps/unix/sysv/linux/m68k/fchownat.c index cbf5380994..dfed76aeb4 100644 --- a/sysdeps/unix/sysv/linux/m68k/fchownat.c +++ b/sysdeps/unix/sysv/linux/m68k/fchownat.c @@ -1,128 +1 @@ -/* Copyright (C) 2005, 2006, 2009 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. */ - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include - -#ifdef __NR_chown32 -# if __ASSUME_32BITUIDS == 0 -/* This variable is shared with all files that need to check for 32bit - uids. */ -extern int __libc_missing_32bit_uids; -# endif -#endif /* __NR_chown32 */ - -int -fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag) -{ - if (flag & ~AT_SYMLINK_NOFOLLOW) - { - __set_errno (EINVAL); - return -1; - } - - char *buf = NULL; - - if (fd != AT_FDCWD && file[0] != '/') - { - size_t filelen = strlen (file); - if (__builtin_expect (filelen == 0, 0)) - { - __set_errno (ENOENT); - return -1; - } - - static const char procfd[] = "/proc/self/fd/%d/%s"; - /* Buffer for the path name we are going to use. It consists of - - the string /proc/self/fd/ - - the file descriptor number - - the file name provided. - The final NUL is included in the sizeof. A bit of overhead - due to the format elements compensates for possible negative - numbers. */ - size_t buflen = sizeof (procfd) + sizeof (int) * 3 + filelen; - buf = alloca (buflen); - - __snprintf (buf, buflen, procfd, fd, file); - file = buf; - } - - int result; - INTERNAL_SYSCALL_DECL (err); - -#if __ASSUME_32BITUIDS > 0 - if (flag & AT_SYMLINK_NOFOLLOW) - result = INTERNAL_SYSCALL (lchown32, err, 3, CHECK_STRING (file), owner, - group); - else - result = INTERNAL_SYSCALL (chown32, err, 3, CHECK_STRING (file), owner, - group); -#else -# ifdef __NR_chown32 - if (__libc_missing_32bit_uids <= 0) - { - if (flag & AT_SYMLINK_NOFOLLOW) - result = INTERNAL_SYSCALL (lchown32, err, 3, CHECK_STRING (file), - owner, group); - else - result = INTERNAL_SYSCALL (chown32, err, 3, CHECK_STRING (file), owner, - group); - - if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) - return result; - if (INTERNAL_SYSCALL_ERRNO (result, err) != ENOSYS) - goto fail; - - __libc_missing_32bit_uids = 1; - } -# endif /* __NR_chown32 */ - - if (((owner + 1) > (gid_t) ((__kernel_uid_t) -1U)) - || ((group + 1) > (gid_t) ((__kernel_gid_t) -1U))) - { - __set_errno (EINVAL); - return -1; - } - - if (flag & AT_SYMLINK_NOFOLLOW) - result = INTERNAL_SYSCALL (lchown, err, 3, CHECK_STRING (file), owner, - group); - else - result = INTERNAL_SYSCALL (chown, err, 3, CHECK_STRING (file), owner, - group); -#endif - - if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 0)) - { - fail: - __atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), fd, buf); - result = -1; - } - - return result; -} +#include From 82515b866b769460d18682a5fd2031a0bb9eef19 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 22 Nov 2010 17:20:19 +0100 Subject: [PATCH 4042/4487] arm: only modify CFLAGS when configuring for arm-linux*eabi --- ChangeLog.arm | 5 +++++ sysdeps/arm/preconfigure | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 69a28c6ba8..08ed967665 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2010-11-22 Andreas Schwab + + * sysdeps/arm/preconfigure: Only modify CFLAGS when configuring + for arm-linux*eabi. + 2010-10-19 Joseph Myers * sysdeps/arm/bits/mathdef.h (FP_FAST_FMA, FP_FAST_FMAF, diff --git a/sysdeps/arm/preconfigure b/sysdeps/arm/preconfigure index 313da79692..4b974cbe94 100644 --- a/sysdeps/arm/preconfigure +++ b/sysdeps/arm/preconfigure @@ -4,6 +4,10 @@ arm*) case $config_os in linux-gnueabi) machine=arm/eabi/$machine + if [ "${CFLAGS+set}" != "set" ]; then + CFLAGS="-g -O2" + fi + CFLAGS="$CFLAGS -fno-unwind-tables" ;; *) machine=arm/$machine @@ -11,7 +15,3 @@ arm*) esac ;; esac -if [ "${CFLAGS+set}" != "set" ]; then - CFLAGS="-g -O2" -fi -CFLAGS="$CFLAGS -fno-unwind-tables" From 2c2019389ef7286279edd1a120739906b1a61138 Mon Sep 17 00:00:00 2001 From: Ken Werner Date: Wed, 24 Nov 2010 23:23:48 +0000 Subject: [PATCH 4043/4487] Use __sync_* on ARM where supported by the compiler. --- ChangeLog.arm | 6 ++++++ sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h | 13 +++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 08ed967665..693d1e7ff7 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,9 @@ +2010-11-24 Ken Werner + + * sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h (atomic_full_barrier, + __arch_compare_and_exchange_val_32_acq): Use the atomic builtins + provided by GCC if __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 is defined. + 2010-11-22 Andreas Schwab * sysdeps/arm/preconfigure: Only modify CFLAGS when configuring diff --git a/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h b/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h index b0586ea1ee..979db9fe8d 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h +++ b/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h @@ -37,7 +37,12 @@ typedef uintmax_t uatomic_max_t; void __arm_link_error (void); -#ifdef __thumb2__ +/* Use the atomic builtins provided by GCC in case the backend provides + a pattern to do this efficiently. */ + +#ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 +#define atomic_full_barrier() __sync_synchronize () +#elif defined __thumb2__ #define atomic_full_barrier() \ __asm__ __volatile__ \ ("movw\tip, #0x0fa0\n\t" \ @@ -64,11 +69,15 @@ void __arm_link_error (void); #define __arch_compare_and_exchange_val_16_acq(mem, newval, oldval) \ ({ __arm_link_error (); oldval; }) +#ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 +#define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \ + __sync_val_compare_and_swap ((mem), (oldval), (newval)) + /* It doesn't matter what register is used for a_oldval2, but we must specify one to work around GCC PR rtl-optimization/21223. Otherwise it may cause a_oldval or a_tmp to be moved to a different register. */ -#ifdef __thumb2__ +#elif defined __thumb2__ /* Thumb-2 has ldrex/strex. However it does not have barrier instructions, so we still need to use the kernel helper. */ #define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \ From 604e89e473cda0e7039c2d626ec1de4e12a70584 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 6 Dec 2010 16:25:46 +0000 Subject: [PATCH 4044/4487] Increase minimum MIPS kernel to 2.4.1. --- ChangeLog.mips | 6 ++++++ sysdeps/unix/sysv/linux/mips/configure | 2 +- sysdeps/unix/sysv/linux/mips/configure.in | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 8ea85cce9d..42fcc787b7 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,9 @@ +2010-12-06 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/configure.in (arch_minimum_kernel): + Change to 2.4.1. + * sysdeps/unix/sysv/linux/mips/configure: Regenerate. + 2010-10-21 Joseph Myers * sysdeps/unix/sysv/linux/mips/mips32/syscalls.list, diff --git a/sysdeps/unix/sysv/linux/mips/configure b/sysdeps/unix/sysv/linux/mips/configure index cad59b5f7f..2233f6f1f5 100644 --- a/sysdeps/unix/sysv/linux/mips/configure +++ b/sysdeps/unix/sysv/linux/mips/configure @@ -107,6 +107,6 @@ case "$prefix" in esac if test -z "$arch_minimum_kernel"; then - arch_minimum_kernel=2.4.0 + arch_minimum_kernel=2.4.1 libc_cv_gcc_unwind_find_fde=yes fi diff --git a/sysdeps/unix/sysv/linux/mips/configure.in b/sysdeps/unix/sysv/linux/mips/configure.in index 7248e1f3f5..c2e66ede82 100644 --- a/sysdeps/unix/sysv/linux/mips/configure.in +++ b/sysdeps/unix/sysv/linux/mips/configure.in @@ -107,6 +107,6 @@ case "$prefix" in esac if test -z "$arch_minimum_kernel"; then - arch_minimum_kernel=2.4.0 + arch_minimum_kernel=2.4.1 libc_cv_gcc_unwind_find_fde=yes fi From 5811feed3da5a304ede0c364c9b5f85a9c650941 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Mon, 6 Dec 2010 16:29:02 +0000 Subject: [PATCH 4045/4487] Delete getpagesize.c for MIPS. --- sysdeps/unix/sysv/linux/mips/getpagesize.c | 1 - 1 file changed, 1 deletion(-) delete mode 100644 sysdeps/unix/sysv/linux/mips/getpagesize.c diff --git a/sysdeps/unix/sysv/linux/mips/getpagesize.c b/sysdeps/unix/sysv/linux/mips/getpagesize.c deleted file mode 100644 index 49492e5137..0000000000 --- a/sysdeps/unix/sysv/linux/mips/getpagesize.c +++ /dev/null @@ -1 +0,0 @@ -#include From 834956483fde48b31db5bf7e34a8370ac340943d Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Thu, 9 Dec 2010 13:34:30 +0000 Subject: [PATCH 4046/4487] Delete getpagesize.c for MIPS. (ChangeLog entry missing from previous commit.) --- ChangeLog.mips | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ChangeLog.mips b/ChangeLog.mips index 42fcc787b7..d7965e928f 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,7 @@ +2010-12-06 Matt Turner + + * sysdeps/unix/sysv/linux/mips/getpagesize.c: Delete file. + 2010-12-06 Joseph Myers * sysdeps/unix/sysv/linux/mips/configure.in (arch_minimum_kernel): From 7f3c9dd2cc378362e91ad366e63d8f729b487b7b Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 21 Dec 2010 00:39:39 +0000 Subject: [PATCH 4047/4487] Define DEFAULT_STACK_PERMS for ARM. --- ChangeLog.arm | 4 ++++ sysdeps/arm/stackinfo.h | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 693d1e7ff7..d02f269593 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,7 @@ +2010-12-21 Joseph Myers + + * sysdeps/arm/stackinfo.h: Define DEFAULT_STACK_PERMS with PF_X. + 2010-11-24 Ken Werner * sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h (atomic_full_barrier, diff --git a/sysdeps/arm/stackinfo.h b/sysdeps/arm/stackinfo.h index 2410ba9bd9..3f94ddf3d9 100644 --- a/sysdeps/arm/stackinfo.h +++ b/sysdeps/arm/stackinfo.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2001 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2010 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 @@ -22,7 +22,13 @@ #ifndef _STACKINFO_H #define _STACKINFO_H 1 +#include + /* On Arm the stack grows down. */ #define _STACK_GROWS_DOWN 1 +/* Default to an executable stack. PF_X can be overridden if PT_GNU_STACK is + * present, but it is presumed absent. */ +#define DEFAULT_STACK_PERMS (PF_R|PF_W|PF_X) + #endif /* stackinfo.h */ From 390651fd1d0220b5f07eedefee71a64b81bff7a0 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 21 Dec 2010 00:40:13 +0000 Subject: [PATCH 4048/4487] Define DEFAULT_STACK_PERMS for MIPS. --- ChangeLog.mips | 4 ++++ sysdeps/mips/stackinfo.h | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index d7965e928f..a52a7fd083 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,7 @@ +2010-12-21 Joseph Myers + + * sysdeps/mips/stackinfo.h: Define DEFAULT_STACK_PERMS with PF_X. + 2010-12-06 Matt Turner * sysdeps/unix/sysv/linux/mips/getpagesize.c: Delete file. diff --git a/sysdeps/mips/stackinfo.h b/sysdeps/mips/stackinfo.h index 86e3d621ba..7a5e3e01d2 100644 --- a/sysdeps/mips/stackinfo.h +++ b/sysdeps/mips/stackinfo.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2010 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 @@ -22,7 +22,13 @@ #ifndef _STACKINFO_H #define _STACKINFO_H 1 +#include + /* On MIPS the stack grows down. */ #define _STACK_GROWS_DOWN 1 +/* Default to an executable stack. PF_X can be overridden if PT_GNU_STACK is + * present, but it is presumed absent. */ +#define DEFAULT_STACK_PERMS (PF_R|PF_W|PF_X) + #endif /* stackinfo.h */ From a2bfcf6de8f306e7ff76c7859b8b93549641425c Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 26 Dec 2010 11:02:05 +0100 Subject: [PATCH 4049/4487] m68k: define DEFAULT_STACK_PERMS --- ChangeLog.m68k | 4 ++++ sysdeps/m68k/stackinfo.h | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 821f292f44..ccd8b4e60c 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,7 @@ +2010-12-26 Andreas Schwab + + * sysdeps/m68k/stackinfo.h (DEFAULT_STACK_PERMS): Define. + 2010-11-05 Andreas Schwab * sysdeps/unix/sysv/linux/m68k/fchownat.c: Include diff --git a/sysdeps/m68k/stackinfo.h b/sysdeps/m68k/stackinfo.h index 66e5a17fb4..b44d4d0ee9 100644 --- a/sysdeps/m68k/stackinfo.h +++ b/sysdeps/m68k/stackinfo.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1999 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2010 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 @@ -22,7 +22,13 @@ #ifndef _STACKINFO_H #define _STACKINFO_H 1 +#include + /* On m68k the stack grows down. */ #define _STACK_GROWS_DOWN 1 +/* Default to an executable stack. PF_X can be overridden if PT_GNU_STACK + is present, but it is presumed absent. */ +#define DEFAULT_STACK_PERMS (PF_R|PF_W|PF_X) + #endif /* stackinfo.h */ From 4f464927309f6c5a491f388e485c7ce5c95b0835 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 30 Dec 2010 21:36:54 +0000 Subject: [PATCH 4050/4487] Handle NO_CTORS_DTORS_SECTIONS for MIPS. --- ChangeLog.mips | 6 ++++++ sysdeps/mach/hurd/mips/init-first.c | 4 ++-- sysdeps/mips/init-first.c | 4 +++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index a52a7fd083..0d933f390a 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,9 @@ +2010-12-30 Joseph Myers + + * sysdeps/mips/init-first.c: Don't call __libc_global_ctors if + NO_CTORS_DTORS_SECTIONS is defined. + * sysdeps/mach/hurd/mips/init-first.c: Likewise. + 2010-12-21 Joseph Myers * sysdeps/mips/stackinfo.h: Define DEFAULT_STACK_PERMS with PF_X. diff --git a/sysdeps/mach/hurd/mips/init-first.c b/sysdeps/mach/hurd/mips/init-first.c index 6f53e839b3..2b16cdef44 100644 --- a/sysdeps/mach/hurd/mips/init-first.c +++ b/sysdeps/mach/hurd/mips/init-first.c @@ -1,5 +1,5 @@ /* Initialization code run first thing by the ELF startup code. For Mips/Hurd. - Copyright (C) 1996,1997,1998,2000,01,02,03 Free Software Foundation, Inc. + Copyright (C) 1996,1997,1998,2000,01,02,03,10 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 @@ -119,7 +119,7 @@ init1 (int argc, char *arg0, ...) __getopt_clean_environment (envp); #endif -#ifdef SHARED +#if defined SHARED && !defined NO_CTORS_DTORS_SECTIONS __libc_global_ctors (); #endif diff --git a/sysdeps/mips/init-first.c b/sysdeps/mips/init-first.c index b67a44431c..1390f99705 100644 --- a/sysdeps/mips/init-first.c +++ b/sysdeps/mips/init-first.c @@ -1,5 +1,5 @@ /* Initialization code run first thing by the ELF startup code. For mips/Unix. - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 2010 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 @@ -50,7 +50,9 @@ _init (int argc, ...) { init (&argc); +#ifndef NO_CTORS_DTORS_SECTIONS __libc_global_ctors (); +#endif } #endif From 038f24265e13491088a63c812ada06057a034993 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 7 Jan 2011 01:42:06 +0000 Subject: [PATCH 4051/4487] Fix ARM fenv.h fallbacks when excepts == 0. --- ChangeLog.arm | 7 +++++++ sysdeps/arm/eabi/fclrexcpt.c | 6 +++--- sysdeps/arm/eabi/fraiseexcpt.c | 6 +++--- sysdeps/arm/eabi/fsetexcptflg.c | 6 +++--- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index d02f269593..8951801aab 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,10 @@ +2011-01-07 Joseph Myers + + * sysdeps/arm/eabi/fclrexcpt.c (__feclearexcept): Return zero if + unsupported but nothing needs to be done. + * sysdeps/arm/eabi/fraiseexcpt.c (feraiseexcept): Likewise. + * sysdeps/arm/eabi/fsetexcptflg.c (__fesetexceptflag): Likewise. + 2010-12-21 Joseph Myers * sysdeps/arm/stackinfo.h: Define DEFAULT_STACK_PERMS with PF_X. diff --git a/sysdeps/arm/eabi/fclrexcpt.c b/sysdeps/arm/eabi/fclrexcpt.c index 8287dc61bd..0bdd6a14d3 100644 --- a/sysdeps/arm/eabi/fclrexcpt.c +++ b/sysdeps/arm/eabi/fclrexcpt.c @@ -1,5 +1,5 @@ /* Clear given exceptions in current floating-point environment. - Copyright (C) 1997,98,99,2000,01,05 Free Software Foundation, Inc. + Copyright (C) 1997,98,99,2000,01,05,11 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 @@ -48,8 +48,8 @@ __feclearexcept (int excepts) return 0; } - /* Unsupported, so fail. */ - return 1; + /* Unsupported, so fail unless nothing needs to be done. */ + return (excepts != 0); } #include diff --git a/sysdeps/arm/eabi/fraiseexcpt.c b/sysdeps/arm/eabi/fraiseexcpt.c index 53ccd9d01f..78441ec013 100644 --- a/sysdeps/arm/eabi/fraiseexcpt.c +++ b/sysdeps/arm/eabi/fraiseexcpt.c @@ -1,5 +1,5 @@ /* Raise given exceptions. - Copyright (C) 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2004, 2005, 2011 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 @@ -103,8 +103,8 @@ feraiseexcept (int excepts) return 0; } - /* Unsupported, so fail. */ - return 1; + /* Unsupported, so fail unless nothing needs to be done. */ + return (excepts != 0); } libm_hidden_def (feraiseexcept) diff --git a/sysdeps/arm/eabi/fsetexcptflg.c b/sysdeps/arm/eabi/fsetexcptflg.c index 3dfeb2c295..28966bb8f6 100644 --- a/sysdeps/arm/eabi/fsetexcptflg.c +++ b/sysdeps/arm/eabi/fsetexcptflg.c @@ -1,5 +1,5 @@ /* Set floating-point environment exception handling. - Copyright (C) 1997,98,99,2000,01,05,08 Free Software Foundation, Inc. + Copyright (C) 1997,98,99,2000,01,05,08,11 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 @@ -47,8 +47,8 @@ __fesetexceptflag (const fexcept_t *flagp, int excepts) return 0; } - /* Unsupported, so fail. */ - return 1; + /* Unsupported, so fail unless nothing needs to be done. */ + return (excepts != 0); } #include From 9524dbd1f3f91a9b381bb0e17dc5e150fe8be75a Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 2 Jan 2011 20:14:41 +0100 Subject: [PATCH 4052/4487] m68k: force alignment of sem_t --- ChangeLog.m68k | 5 +++++ sysdeps/unix/sysv/linux/m68k/nptl/bits/semaphore.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index ccd8b4e60c..feba28e20d 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2011-01-10 Andreas Schwab + + * sysdeps/unix/sysv/linux/m68k/nptl/bits/semaphore.h (sem_t): + Force alignment. + 2010-12-26 Andreas Schwab * sysdeps/m68k/stackinfo.h (DEFAULT_STACK_PERMS): Define. diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/bits/semaphore.h b/sysdeps/unix/sysv/linux/m68k/nptl/bits/semaphore.h index 2950cc9a70..baaa9eb25f 100644 --- a/sysdeps/unix/sysv/linux/m68k/nptl/bits/semaphore.h +++ b/sysdeps/unix/sysv/linux/m68k/nptl/bits/semaphore.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010 Free Software Foundation, Inc. +/* Copyright (C) 2010, 2011 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Maxim Kuvyrkov , 2010. @@ -32,5 +32,5 @@ typedef union { char __size[__SIZEOF_SEM_T]; - long int __align; + long int __align __attribute__ ((aligned (4))); } sem_t; From a72cc2b29d00207fd8e2ee4612502339a14816b6 Mon Sep 17 00:00:00 2001 From: Luis Machado Date: Wed, 12 Jan 2011 12:59:09 -0600 Subject: [PATCH 4053/4487] Enable optimized string routines for several PowerPC 4XX family processors. This patch provides optimized string routines for the 4XX family of PowerPC and Power Architecture processors. For the 476 processor, it can be configured for either hard-fp with -mcpu=476 --with-fp, or for soft-fp with -mcpu=476 (since the default is soft-fp). --- ChangeLog | 20 +++ sysdeps/powerpc/dl-procinfo.c | 96 ++++++++++ sysdeps/powerpc/dl-procinfo.h | 168 ++++++++++++++++++ sysdeps/powerpc/powerpc32/405/memcmp.S | 131 ++++++++++++++ sysdeps/powerpc/powerpc32/405/memcpy.S | 133 ++++++++++++++ sysdeps/powerpc/powerpc32/405/memset.S | 155 ++++++++++++++++ sysdeps/powerpc/powerpc32/405/strcmp.S | 137 ++++++++++++++ sysdeps/powerpc/powerpc32/405/strcpy.S | 110 ++++++++++++ sysdeps/powerpc/powerpc32/405/strlen.S | 78 ++++++++ sysdeps/powerpc/powerpc32/405/strncmp.S | 131 ++++++++++++++ sysdeps/powerpc/powerpc32/440/Implies | 2 + sysdeps/powerpc/powerpc32/464/Implies | 2 + sysdeps/powerpc/powerpc32/476/Implies | 2 + sysdeps/powerpc/powerpc32/Makefile | 8 + .../sysv/linux/powerpc/powerpc32/405/Implies | 2 + .../sysv/linux/powerpc/powerpc32/440/Implies | 2 + .../sysv/linux/powerpc/powerpc32/464/Implies | 2 + .../sysv/linux/powerpc/powerpc32/476/Implies | 2 + 18 files changed, 1181 insertions(+) create mode 100644 sysdeps/powerpc/dl-procinfo.c create mode 100644 sysdeps/powerpc/dl-procinfo.h create mode 100644 sysdeps/powerpc/powerpc32/405/memcmp.S create mode 100644 sysdeps/powerpc/powerpc32/405/memcpy.S create mode 100644 sysdeps/powerpc/powerpc32/405/memset.S create mode 100644 sysdeps/powerpc/powerpc32/405/strcmp.S create mode 100644 sysdeps/powerpc/powerpc32/405/strcpy.S create mode 100644 sysdeps/powerpc/powerpc32/405/strlen.S create mode 100644 sysdeps/powerpc/powerpc32/405/strncmp.S create mode 100644 sysdeps/powerpc/powerpc32/440/Implies create mode 100644 sysdeps/powerpc/powerpc32/464/Implies create mode 100644 sysdeps/powerpc/powerpc32/476/Implies create mode 100644 sysdeps/powerpc/powerpc32/Makefile create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/405/Implies create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/440/Implies create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/464/Implies create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/476/Implies diff --git a/ChangeLog b/ChangeLog index e42182fda6..3618387218 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,23 @@ +2010-09-03 Luis Machado + + * sysdeps/powerpc/dl-procinfo.c: New file. + * sysdeps/powerpc/dl-procinfo.h: New file. + * sysdeps/powerpc/powerpc32/405/memcmp.S: New file. + * sysdeps/powerpc/powerpc32/405/memcpy.S: New file. + * sysdeps/powerpc/powerpc32/405/memset.S: New file. + * sysdeps/powerpc/powerpc32/405/strcmp.S: New file. + * sysdeps/powerpc/powerpc32/405/strcpy.S: New file. + * sysdeps/powerpc/powerpc32/405/strlen.S: New file. + * sysdeps/powerpc/powerpc32/405/strncmp.S: New file. + * sysdeps/powerpc/powerpc32/440/Implies: New file. + * sysdeps/powerpc/powerpc32/464/Implies: New file. + * sysdeps/powerpc/powerpc32/476/Implies: New file. + * sysdeps/powerpc/powerpc32/Makefile: New file. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/405/Implies: New file. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/440/Implies: New file. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/464/Implies: New file. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/476/Implies: New file. + 2010-04-14 Joseph Myers * libc-abis: Remove. diff --git a/sysdeps/powerpc/dl-procinfo.c b/sysdeps/powerpc/dl-procinfo.c new file mode 100644 index 0000000000..60fb465956 --- /dev/null +++ b/sysdeps/powerpc/dl-procinfo.c @@ -0,0 +1,96 @@ +/* Data for processor capability information. PowerPC version. + Copyright (C) 2005, 2006, 2008 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. */ + +/* This information must be kept in sync with the _DL_HWCAP_COUNT and + _DL_PLATFORM_COUNT definitions in procinfo.h. + + If anything should be added here check whether the size of each string + is still ok with the given array size. + + All the #ifdefs in the definitions are quite irritating but + necessary if we want to avoid duplicating the information. There + are three different modes: + + - PROCINFO_DECL is defined. This means we are only interested in + declarations. + + - PROCINFO_DECL is not defined: + + + if SHARED is defined the file is included in an array + initializer. The .element = { ... } syntax is needed. + + + if SHARED is not defined a normal array initialization is + needed. + */ + +#ifndef PROCINFO_CLASS +# define PROCINFO_CLASS +#endif + +#if !defined PROCINFO_DECL && defined SHARED + ._dl_powerpc_cap_flags +#else +PROCINFO_CLASS const char _dl_powerpc_cap_flags[25][10] +#endif +#ifndef PROCINFO_DECL += { + "vsx", + "arch_2_06", "power6x", "dfp", "pa6t", + "arch_2_05", "ic_snoop", "smt", "booke", + "cellbe", "power5+", "power5", "power4", + "notb", "efpdouble", "efpsingle", "spe", + "ucache", "4xxmac", "mmu", "fpu", + "altivec", "ppc601", "ppc64", "ppc32", + } +#endif +#if !defined SHARED || defined PROCINFO_DECL +; +#else +, +#endif + +#if !defined PROCINFO_DECL && defined SHARED + ._dl_powerpc_platforms +#else +PROCINFO_CLASS const char _dl_powerpc_platforms[12][12] +#endif +#ifndef PROCINFO_DECL += { + [PPC_PLATFORM_POWER4] = "power4", + [PPC_PLATFORM_PPC970] = "ppc970", + [PPC_PLATFORM_POWER5] = "power5", + [PPC_PLATFORM_POWER5_PLUS] = "power5+", + [PPC_PLATFORM_POWER6] = "power6", + [PPC_PLATFORM_CELL_BE] = "ppc-cell-be", + [PPC_PLATFORM_POWER6X] = "power6x", + [PPC_PLATFORM_POWER7] = "power7", + [PPC_PLATFORM_PPC405] = "ppc405", + [PPC_PLATFORM_PPC440] = "ppc440", + [PPC_PLATFORM_PPC464] = "ppc464", + [PPC_PLATFORM_PPC476] = "ppc476" + } +#endif +#if !defined SHARED || defined PROCINFO_DECL +; +#else +, +#endif + +#undef PROCINFO_DECL +#undef PROCINFO_CLASS diff --git a/sysdeps/powerpc/dl-procinfo.h b/sysdeps/powerpc/dl-procinfo.h new file mode 100644 index 0000000000..e4a7edbf50 --- /dev/null +++ b/sysdeps/powerpc/dl-procinfo.h @@ -0,0 +1,168 @@ +/* Processor capability information handling macros. PowerPC version. + Copyright (C) 2005, 2006, 2008 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 _DL_PROCINFO_H +#define _DL_PROCINFO_H 1 + +#include +#include /* This defines the PPC_FEATURE_* macros. */ + +/* There are 25 bits used, but they are bits 7..31. */ +#define _DL_HWCAP_FIRST 7 +#define _DL_HWCAP_COUNT 32 + +/* These bits influence library search. */ +#define HWCAP_IMPORTANT (PPC_FEATURE_HAS_ALTIVEC \ + + PPC_FEATURE_HAS_DFP) + +#define _DL_PLATFORMS_COUNT 12 + +#define _DL_FIRST_PLATFORM 32 +/* Mask to filter out platforms. */ +#define _DL_HWCAP_PLATFORM (((1ULL << _DL_PLATFORMS_COUNT) - 1) \ + << _DL_FIRST_PLATFORM) + +/* Platform bits (relative to _DL_FIRST_PLATFORM). */ +#define PPC_PLATFORM_POWER4 0 +#define PPC_PLATFORM_PPC970 1 +#define PPC_PLATFORM_POWER5 2 +#define PPC_PLATFORM_POWER5_PLUS 3 +#define PPC_PLATFORM_POWER6 4 +#define PPC_PLATFORM_CELL_BE 5 +#define PPC_PLATFORM_POWER6X 6 +#define PPC_PLATFORM_POWER7 7 +#define PPC_PLATFORM_PPC405 8 +#define PPC_PLATFORM_PPC440 9 +#define PPC_PLATFORM_PPC464 10 +#define PPC_PLATFORM_PPC476 11 + +static inline const char * +__attribute__ ((unused)) +_dl_hwcap_string (int idx) +{ + return GLRO(dl_powerpc_cap_flags)[idx - _DL_HWCAP_FIRST]; +} + +static inline const char * +__attribute__ ((unused)) +_dl_platform_string (int idx) +{ + return GLRO(dl_powerpc_platforms)[idx - _DL_FIRST_PLATFORM]; +} + +static inline int +__attribute__ ((unused)) +_dl_string_hwcap (const char *str) +{ + for (int i = _DL_HWCAP_FIRST; i < _DL_HWCAP_COUNT; ++i) + if (strcmp (str, _dl_hwcap_string (i)) == 0) + return i; + return -1; +} + +static inline int +__attribute__ ((unused, always_inline)) +_dl_string_platform (const char *str) +{ + if (str == NULL) + return -1; + + if (strncmp (str, GLRO(dl_powerpc_platforms)[PPC_PLATFORM_POWER4], 5) == 0) + { + int ret; + str += 5; + switch (*str) + { + case '4': + ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER4; + break; + case '5': + ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER5; + if (str[1] == '+') + { + ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER5_PLUS; + ++str; + } + break; + case '6': + ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER6; + if (str[1] == 'x') + { + ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER6X; + ++str; + } + break; + case '7': + ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER7; + break; + default: + return -1; + } + if (str[1] == '\0') + return ret; + } + else if (strncmp (str, GLRO(dl_powerpc_platforms)[PPC_PLATFORM_PPC970], + 3) == 0) + { + if (strcmp (str + 3, GLRO(dl_powerpc_platforms)[PPC_PLATFORM_PPC970] + + 3) == 0) + return _DL_FIRST_PLATFORM + PPC_PLATFORM_PPC970; + else if (strcmp (str + 3, + GLRO(dl_powerpc_platforms)[PPC_PLATFORM_CELL_BE] + 3) + == 0) + return _DL_FIRST_PLATFORM + PPC_PLATFORM_CELL_BE; + else if (strcmp (str + 3, + GLRO(dl_powerpc_platforms)[PPC_PLATFORM_PPC405] + 3) + == 0) + return _DL_FIRST_PLATFORM + PPC_PLATFORM_PPC405; + else if (strcmp (str + 3, + GLRO(dl_powerpc_platforms)[PPC_PLATFORM_PPC440] + 3) + == 0) + return _DL_FIRST_PLATFORM + PPC_PLATFORM_PPC440; + else if (strcmp (str + 3, + GLRO(dl_powerpc_platforms)[PPC_PLATFORM_PPC464] + 3) + == 0) + return _DL_FIRST_PLATFORM + PPC_PLATFORM_PPC464; + else if (strcmp (str + 3, + GLRO(dl_powerpc_platforms)[PPC_PLATFORM_PPC476] + 3) + == 0) + return _DL_FIRST_PLATFORM + PPC_PLATFORM_PPC476; + } + + return -1; +} + +#ifdef IS_IN_rtld +static inline int +__attribute__ ((unused)) +_dl_procinfo (int word) +{ + _dl_printf ("AT_HWCAP: "); + + for (int i = _DL_HWCAP_FIRST; i < _DL_HWCAP_COUNT; ++i) + if (word & (1 << i)) + _dl_printf (" %s", _dl_hwcap_string (i)); + + _dl_printf ("\n"); + + return 0; +} +#endif + +#endif /* dl-procinfo.h */ diff --git a/sysdeps/powerpc/powerpc32/405/memcmp.S b/sysdeps/powerpc/powerpc32/405/memcmp.S new file mode 100644 index 0000000000..2598d3c1cb --- /dev/null +++ b/sysdeps/powerpc/powerpc32/405/memcmp.S @@ -0,0 +1,131 @@ +/* Optimized memcmp implementation for PowerPC476. + Copyright (C) 2010 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., 51 Franklin Street, Fifth Floor, Boston MA + 02110-1301 USA. */ + +#include +#include +#include + +/* memcmp + + r3:source1 address, return equality + r4:source2 address + r5:byte count + + Check 2 words from src1 and src2. If unequal jump to end and + return src1 > src2 or src1 < src2. + If count = zero check bytes before zero counter and then jump to end and + return src1 > src2, src1 < src2 or src1 = src2. + If src1 = src2 and no null, repeat. */ + +EALIGN (BP_SYM (memcmp), 5, 0) + srwi. r6,r5,5 + beq L(preword2_count_loop) + mtctr r6 + clrlwi r5,r5,27 + +L(word8_compare_loop): + lwz r10,0(r3) + lwz r6,4(r3) + lwz r8,0(r4) + lwz r9,4(r4) + cmplw cr5,r8,r10 + cmplw cr1,r9,r6 + bne cr5,L(st2) + bne cr1,L(st1) + lwz r10,8(r3) + lwz r6,12(r3) + lwz r8,8(r4) + lwz r9,12(r4) + cmplw cr5,r8,r10 + cmplw cr1,r9,r6 + bne cr5,L(st2) + bne cr1,L(st1) + lwz r10,16(r3) + lwz r6,20(r3) + lwz r8,16(r4) + lwz r9,20(r4) + cmplw cr5,r8,r10 + cmplw cr1,r9,r6 + bne cr5,L(st2) + bne cr1,L(st1) + lwz r10,24(r3) + lwz r6,28(r3) + addi r3,r3,0x20 + lwz r8,24(r4) + lwz r9,28(r4) + addi r4,r4,0x20 + cmplw cr5,r8,r10 + cmplw cr1,r9,r6 + bne cr5,L(st2) + bne cr1,L(st1) + bdnz L(word8_compare_loop) + +L(preword2_count_loop): + srwi. r6,r5,3 + beq L(prebyte_count_loop) + mtctr r6 + clrlwi r5,r5,29 + +L(word2_count_loop): + lwz r10,0(r3) + lwz r6,4(r3) + addi r3,r3,0x08 + lwz r8,0(r4) + lwz r9,4(r4) + addi r4,r4,0x08 + cmplw cr5,r8,r10 + cmplw cr1,r9,r6 + bne cr5,L(st2) + bne cr1,L(st1) + bdnz L(word2_count_loop) + +L(prebyte_count_loop): + addi r5,r5,1 + mtctr r5 + bdz L(end_memcmp) + +L(byte_count_loop): + lbz r6,0(r3) + addi r3,r3,0x01 + lbz r8,0(r4) + addi r4,r4,0x01 + cmplw cr5,r8,r6 + bne cr5,L(st2) + bdnz L(byte_count_loop) + +L(end_memcmp): + addi r3,r0,0 + blr + +L(l_r): + addi r3,r0,1 + blr + +L(st1): + blt cr1,L(l_r) + addi r3,r0,-1 + blr + +L(st2): + blt cr5,L(l_r) + addi r3,r0,-1 + blr +END (BP_SYM (memcmp)) +libc_hidden_builtin_def (memcmp) +weak_alias (memcmp,bcmp) diff --git a/sysdeps/powerpc/powerpc32/405/memcpy.S b/sysdeps/powerpc/powerpc32/405/memcpy.S new file mode 100644 index 0000000000..8b72ba7433 --- /dev/null +++ b/sysdeps/powerpc/powerpc32/405/memcpy.S @@ -0,0 +1,133 @@ +/* Optimized memcpy implementation for PowerPC476. + Copyright (C) 2010 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., 51 Franklin Street, Fifth Floor, Boston MA + 02110-1301 USA. */ + +#include +#include +#include + +/* memcpy + + r0:return address + r3:destination address + r4:source address + r5:byte count + + Save return address in r0. + If destinationn and source are unaligned and copy count is greater than 256 + then copy 0-3 bytes to make destination aligned. + If 32 or more bytes to copy we use 32 byte copy loop. + Finaly we copy 0-31 extra bytes. */ + +EALIGN (BP_SYM (memcpy), 5, 0) +/* Check if bytes to copy are greater than 256 and if + source and destination are unaligned */ + cmpwi r5,0x0100 + addi r0,r3,0 + ble L(string_count_loop) + neg r6,r3 + clrlwi. r6,r6,30 + beq L(string_count_loop) + neg r6,r4 + clrlwi. r6,r6,30 + beq L(string_count_loop) + mtctr r6 + subf r5,r6,r5 + +L(unaligned_bytecopy_loop): /* Align destination by coping 0-3 bytes */ + lbz r8,0x0(r4) + addi r4,r4,1 + stb r8,0x0(r3) + addi r3,r3,1 + bdnz L(unaligned_bytecopy_loop) + srwi. r7,r5,5 + beq L(preword2_count_loop) + mtctr r7 + +L(word8_count_loop_no_dcbt): /* Copy 32 bytes at a time */ + lwz r6,0(r4) + lwz r7,4(r4) + lwz r8,8(r4) + lwz r9,12(r4) + subi r5,r5,0x20 + stw r6,0(r3) + stw r7,4(r3) + stw r8,8(r3) + stw r9,12(r3) + lwz r6,16(r4) + lwz r7,20(r4) + lwz r8,24(r4) + lwz r9,28(r4) + addi r4,r4,0x20 + stw r6,16(r3) + stw r7,20(r3) + stw r8,24(r3) + stw r9,28(r3) + addi r3,r3,0x20 + bdnz L(word8_count_loop_no_dcbt) + +L(preword2_count_loop): /* Copy remaining 0-31 bytes */ + clrlwi. r12,r5,27 + beq L(end_memcpy) + mtxer r12 + lswx r5,0,r4 + stswx r5,0,r3 + mr r3,r0 + blr + +L(string_count_loop): /* Copy odd 0-31 bytes */ + clrlwi. r12,r5,28 + add r3,r3,r5 + add r4,r4,r5 + beq L(pre_string_copy) + mtxer r12 + subf r4,r12,r4 + subf r3,r12,r3 + lswx r6,0,r4 + stswx r6,0,r3 + +L(pre_string_copy): /* Check how many 32 byte chunck to copy */ + srwi. r7,r5,4 + beq L(end_memcpy) + mtctr r7 + +L(word4_count_loop_no_dcbt): /* Copy 32 bytes at a time */ + lwz r6,-4(r4) + lwz r7,-8(r4) + lwz r8,-12(r4) + lwzu r9,-16(r4) + stw r6,-4(r3) + stw r7,-8(r3) + stw r8,-12(r3) + stwu r9,-16(r3) + bdz L(end_memcpy) + lwz r6,-4(r4) + lwz r7,-8(r4) + lwz r8,-12(r4) + lwzu r9,-16(r4) + stw r6,-4(r3) + stw r7,-8(r3) + stw r8,-12(r3) + stwu r9,-16(r3) + bdnz L(word4_count_loop_no_dcbt) + +L(end_memcpy): + mr r3,r0 + blr +END (BP_SYM (memcpy)) +libc_hidden_builtin_def (memcpy) diff --git a/sysdeps/powerpc/powerpc32/405/memset.S b/sysdeps/powerpc/powerpc32/405/memset.S new file mode 100644 index 0000000000..0f57968384 --- /dev/null +++ b/sysdeps/powerpc/powerpc32/405/memset.S @@ -0,0 +1,155 @@ +/* Optimized memset implementation for PowerPC476. + Copyright (C) 2010 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., 51 Franklin Street, Fifth Floor, Boston MA + 02110-1301 USA. */ + +#include +#include +#include + +/* memset + + r3:destination address and return address + r4:source integer to copy + r5:byte count + r11:sources integer to copy in all 32 bits of reg + r12:temp return address + + Save return address in r12 + If destinationn is unaligned and count is greater tha 255 bytes + set 0-3 bytes to make destination aligned + If count is greater tha 255 bytes and setting zero to memory + use dbcz to set memeory when we can + otherwsie do the follwoing + If 16 or more words to set we use 16 word copy loop. + Finaly we set 0-15 extra bytes with string store. */ + +EALIGN (BP_SYM (memset), 5, 0) + rlwinm r11,r4,0,24,31 + rlwimi r11,r4,8,16,23 + rlwimi r11,r11,16,0,15 + addi r12,r3,0 + cmpwi r5,0x00FF + ble L(preword8_count_loop) + cmpwi r4,0x00 + beq L(use_dcbz) + neg r6,r3 + clrlwi. r6,r6,30 + beq L(preword8_count_loop) + addi r8,0,1 + mtctr r6 + subi r3,r3,1 + +L(unaligned_bytecopy_loop): + stbu r11,0x1(r3) + subf. r5,r8,r5 + beq L(end_memset) + bdnz L(unaligned_bytecopy_loop) + addi r3,r3,1 + +L(preword8_count_loop): + srwi. r6,r5,4 + beq L(preword2_count_loop) + mtctr r6 + addi r3,r3,-4 + mr r8,r11 + mr r9,r11 + mr r10,r11 + +L(word8_count_loop_no_dcbt): + stwu r8,4(r3) + stwu r9,4(r3) + subi r5,r5,0x10 + stwu r10,4(r3) + stwu r11,4(r3) + bdnz L(word8_count_loop_no_dcbt) + addi r3,r3,4 + +L(preword2_count_loop): + clrlwi. r7,r5,28 + beq L(end_memset) + mr r8,r11 + mr r9,r11 + mr r10,r11 + mtxer r7 + stswx r8,0,r3 + +L(end_memset): + addi r3,r12,0 + blr + +L(use_dcbz): + neg r6,r3 + clrlwi. r7,r6,28 + beq L(skip_string_loop) + mr r8,r11 + mr r9,r11 + mr r10,r11 + subf r5,r7,r5 + mtxer r7 + stswx r8,0,r3 + add r3,r3,r7 + +L(skip_string_loop): + clrlwi r8,r6,25 + srwi. r8,r8,4 + beq L(dcbz_pre_loop) + mtctr r8 + +L(word_loop): + stw r11,0(r3) + subi r5,r5,0x10 + stw r11,4(r3) + stw r11,8(r3) + stw r11,12(r3) + addi r3,r3,0x10 + bdnz L(word_loop) + +L(dcbz_pre_loop): + srwi r6,r5,7 + mtctr r6 + addi r7,0,0 + +L(dcbz_loop): + dcbz r3,r7 + addi r3,r3,0x80 + subi r5,r5,0x80 + bdnz L(dcbz_loop) + srwi. r6,r5,4 + beq L(postword2_count_loop) + mtctr r6 + +L(postword8_count_loop): + stw r11,0(r3) + subi r5,r5,0x10 + stw r11,4(r3) + stw r11,8(r3) + stw r11,12(r3) + addi r3,r3,0x10 + bdnz L(postword8_count_loop) + +L(postword2_count_loop): + clrlwi. r7,r5,28 + beq L(end_memset) + mr r8,r11 + mr r9,r11 + mr r10,r11 + mtxer r7 + stswx r8,0,r3 + b L(end_memset) +END (BP_SYM (memset)) +libc_hidden_builtin_def (memset) diff --git a/sysdeps/powerpc/powerpc32/405/strcmp.S b/sysdeps/powerpc/powerpc32/405/strcmp.S new file mode 100644 index 0000000000..4098977e27 --- /dev/null +++ b/sysdeps/powerpc/powerpc32/405/strcmp.S @@ -0,0 +1,137 @@ +/* Optimized strcmp implementation for PowerPC476. + Copyright (C) 2010 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., 51 Franklin Street, Fifth Floor, Boston MA + 02110-1301 USA. */ + +#include +#include +#include + +/* strcmp + + Register Use + r0:temp return equality + r3:source1 address, return equality + r4:source2 address + + Implementation description + Check 2 words from src1 and src2. If unequal jump to end and + return src1 > src2 or src1 < src2. + If null check bytes before null and then jump to end and + return src1 > src2, src1 < src2 or src1 = src2. + If src1 = src2 and no null, repeat. */ + +EALIGN (BP_SYM(strcmp),5,0) + neg r7,r3 + clrlwi r7,r7,20 + neg r8,r4 + clrlwi r8,r8,20 + srwi. r7,r7,5 + beq L(byte_loop) + srwi. r8,r8,5 + beq L(byte_loop) + cmplw r7,r8 + mtctr r7 + ble L(big_loop) + mtctr r8 + +L(big_loop): + lwz r5,0(r3) + lwz r6,4(r3) + lwz r8,0(r4) + lwz r9,4(r4) + dlmzb. r12,r5,r6 + bne L(end_check) + cmplw r5,r8 + bne L(st1) + cmplw r6,r9 + bne L(st1) + lwz r5,8(r3) + lwz r6,12(r3) + lwz r8,8(r4) + lwz r9,12(r4) + dlmzb. r12,r5,r6 + bne L(end_check) + cmplw r5,r8 + bne L(st1) + cmplw r6,r9 + bne L(st1) + lwz r5,16(r3) + lwz r6,20(r3) + lwz r8,16(r4) + lwz r9,20(r4) + dlmzb. r12,r5,r6 + bne L(end_check) + cmplw r5,r8 + bne L(st1) + cmplw r6,r9 + bne L(st1) + lwz r5,24(r3) + lwz r6,28(r3) + addi r3,r3,0x20 + lwz r8,24(r4) + lwz r9,28(r4) + addi r4,r4,0x20 + dlmzb. r12,r5,r6 + bne L(end_check) + cmplw r5,r8 + bne L(st1) + cmplw r6,r9 + bne L(st1) + bdnz L(big_loop) + b L(byte_loop) + +L(end_check): + subfic r12,r12,4 + blt L(end_check2) + rlwinm r12,r12,3,0,31 + srw r5,r5,r12 + srw r8,r8,r12 + cmplw r5,r8 + bne L(st1) + b L(end_strcmp) + +L(end_check2): + addi r12,r12,4 + cmplw r5,r8 + rlwinm r12,r12,3,0,31 + bne L(st1) + srw r6,r6,r12 + srw r9,r9,r12 + cmplw r6,r9 + bne L(st1) + +L(end_strcmp): + addi r3,r0,0 + blr + +L(st1): + mfcr r3 + blr + +L(byte_loop): + lbz r5,0(r3) + addi r3,r3,1 + lbz r6,0(r4) + addi r4,r4,1 + cmplw r5,r6 + bne L(st1) + cmpwi r5,0 + beq L(end_strcmp) + b L(byte_loop) +END (BP_SYM (strcmp)) +libc_hidden_builtin_def (strcmp) diff --git a/sysdeps/powerpc/powerpc32/405/strcpy.S b/sysdeps/powerpc/powerpc32/405/strcpy.S new file mode 100644 index 0000000000..62f7e3eb9b --- /dev/null +++ b/sysdeps/powerpc/powerpc32/405/strcpy.S @@ -0,0 +1,110 @@ +/* Optimized strcpy implementation for PowerPC476. + Copyright (C) 2010 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., 51 Franklin Street, Fifth Floor, Boston MA + 02110-1301 USA. */ + +#include +#include +#include + +/* strcpy + + Register Use + r3:destination and return address + r4:source address + r10:temp destination address + + Implementation description + Loop by checking 2 words at a time, with dlmzb. Check if there is a null + in the 2 words. If there is a null jump to end checking to determine + where in the last 8 bytes it is. Copy the appropriate bytes of the last + 8 according to the null position. */ + +EALIGN (BP_SYM (strcpy), 5, 0) + neg r7,r4 + subi r4,r4,1 + clrlwi. r8,r7,29 + subi r10,r3,1 + beq L(pre_word8_loop) + mtctr r8 + +L(loop): + lbzu r5,0x01(r4) + cmpi cr5,r5,0x0 + stbu r5,0x01(r10) + beq cr5,L(end_strcpy) + bdnz L(loop) + +L(pre_word8_loop): + subi r4,r4,3 + subi r10,r10,3 + +L(word8_loop): + lwzu r5,0x04(r4) + lwzu r6,0x04(r4) + dlmzb. r11,r5,r6 + bne L(byte_copy) + stwu r5,0x04(r10) + stwu r6,0x04(r10) + lwzu r5,0x04(r4) + lwzu r6,0x04(r4) + dlmzb. r11,r5,r6 + bne L(byte_copy) + stwu r5,0x04(r10) + stwu r6,0x04(r10) + lwzu r5,0x04(r4) + lwzu r6,0x04(r4) + dlmzb. r11,r5,r6 + bne L(byte_copy) + stwu r5,0x04(r10) + stwu r6,0x04(r10) + lwzu r5,0x04(r4) + lwzu r6,0x04(r4) + dlmzb. r11,r5,r6 + bne L(byte_copy) + stwu r5,0x04(r10) + stwu r6,0x04(r10) + b L(word8_loop) + +L(last_bytes_copy): + stwu r5,0x04(r10) + subi r11,r11,4 + mtctr r11 + addi r10,r10,3 + subi r4,r4,1 + +L(last_bytes_copy_loop): + lbzu r5,0x01(r4) + stbu r5,0x01(r10) + bdnz L(last_bytes_copy_loop) + blr + +L(byte_copy): + blt L(last_bytes_copy) + mtctr r11 + addi r10,r10,3 + subi r4,r4,5 + +L(last_bytes_copy_loop2): + lbzu r5,0x01(r4) + stbu r5,0x01(r10) + bdnz L(last_bytes_copy_loop2) + +L(end_strcpy): + blr +END (BP_SYM (strcpy)) +libc_hidden_builtin_def (strcpy) diff --git a/sysdeps/powerpc/powerpc32/405/strlen.S b/sysdeps/powerpc/powerpc32/405/strlen.S new file mode 100644 index 0000000000..d50b9d7f56 --- /dev/null +++ b/sysdeps/powerpc/powerpc32/405/strlen.S @@ -0,0 +1,78 @@ +/* Optimized strlen implementation for PowerPC476. + Copyright (C) 2010 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., 51 Franklin Street, Fifth Floor, Boston MA + 02110-1301 USA. */ + +#include +#include +#include + +/* strlen + + Register Use + r3:source address and return length of string + r4:byte counter + + Implementation description + Load 2 words at a time and count bytes, if we find null we subtract one from + the count and return the count value. We need to subtract one because + we don't count the null character as a byte. */ + +EALIGN (BP_SYM (strlen),5,0) + neg r7,r3 + clrlwi. r8,r7,29 + addi r4,0,0 + beq L(byte_count_loop) + mtctr r8 + +L(loop): + lbz r5,0(r3) + cmpi cr5,r5,0x0 + addi r3,r3,0x1 + addi r4,r4,0x1 + beq cr5,L(end_strlen) + bdnz L(loop) + +L(byte_count_loop): + lwz r5,0(r3) + lwz r6,4(r3) + dlmzb. r12,r5,r6 + add r4,r4,r12 + bne L(end_strlen) + lwz r5,8(r3) + lwz r6,12(r3) + dlmzb. r12,r5,r6 + add r4,r4,r12 + bne L(end_strlen) + lwz r5,16(r3) + lwz r6,20(r3) + dlmzb. r12,r5,r6 + add r4,r4,r12 + bne L(end_strlen) + lwz r5,24(r3) + lwz r6,28(r3) + addi r3,r3,0x20 + dlmzb. r12,r5,r6 + add r4,r4,r12 + bne L(end_strlen) + b L(byte_count_loop) + +L(end_strlen): + addi r3,r4,-1 + blr +END (BP_SYM (strlen)) +libc_hidden_builtin_def (strlen) diff --git a/sysdeps/powerpc/powerpc32/405/strncmp.S b/sysdeps/powerpc/powerpc32/405/strncmp.S new file mode 100644 index 0000000000..d4c8156bf0 --- /dev/null +++ b/sysdeps/powerpc/powerpc32/405/strncmp.S @@ -0,0 +1,131 @@ +/* Optimized strncmp implementation for PowerPC476. + Copyright (C) 2010 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., 51 Franklin Street, Fifth Floor, Boston MA + 02110-1301 USA. */ + +#include +#include +#include + +/* strncmp + + Register Use + r0:temp return equality + r3:source1 address, return equality + r4:source2 address + r5:byte count + + Implementation description + Touch in 3 lines of D-cache. + If source1 or source2 is unaligned copy 0-3 bytes to make source1 aligned + Check 2 words from src1 and src2. If unequal jump to end and + return src1 > src2 or src1 < src2. + If null check bytes before null and then jump to end and + return src1 > src2, src1 < src2 or src1 = src2. + If count = zero check bytes before zero counter and then jump to end and + return src1 > src2, src1 < src2 or src1 = src2. + If src1 = src2 and no null, repeat. */ + +EALIGN (BP_SYM(strncmp),5,0) + neg r7,r3 + clrlwi r7,r7,20 + neg r8,r4 + clrlwi r8,r8,20 + srwi. r7,r7,3 + beq L(prebyte_count_loop) + srwi. r8,r8,3 + beq L(prebyte_count_loop) + cmplw r7,r8 + mtctr r7 + ble L(preword2_count_loop) + mtctr r8 + +L(preword2_count_loop): + srwi. r6,r5,3 + beq L(prebyte_count_loop) + mfctr r7 + cmplw r6,r7 + bgt L(set_count_loop) + mtctr r6 + clrlwi r5,r5,29 + +L(word2_count_loop): + lwz r10,0(r3) + lwz r6,4(r3) + addi r3,r3,0x08 + lwz r8,0(r4) + lwz r9,4(r4) + addi r4,r4,0x08 + dlmzb. r12,r10,r6 + bne L(end_check) + cmplw r10,r8 + bne L(st1) + cmplw r6,r9 + bne L(st1) + bdnz L(word2_count_loop) + +L(prebyte_count_loop): + addi r5,r5,1 + mtctr r5 + bdz L(end_strncmp) + +L(byte_count_loop): + lbz r6,0(r3) + addi r3,r3,1 + lbz r7,0(r4) + addi r4,r4,1 + cmplw r6,r7 + bne L(st1) + cmpwi r6,0 + beq L(end_strncmp) + bdnz L(byte_count_loop) + b L(end_strncmp) + +L(set_count_loop): + slwi r7,r7,3 + subf r5,r7,r5 + b L(word2_count_loop) + +L(end_check): + subfic r12,r12,4 + blt L(end_check2) + rlwinm r12,r12,3,0,31 + srw r10,r10,r12 + srw r8,r8,r12 + cmplw r10,r8 + bne L(st1) + b L(end_strncmp) + +L(end_check2): + addi r12,r12,4 + cmplw r10,r8 + rlwinm r12,r12,3,0,31 + bne L(st1) + srw r6,r6,r12 + srw r9,r9,r12 + cmplw r6,r9 + bne L(st1) + +L(end_strncmp): + addi r3,r0,0 + blr + +L(st1): + mfcr r3 + blr +END (BP_SYM (strncmp)) +libc_hidden_builtin_def (strncmp) diff --git a/sysdeps/powerpc/powerpc32/440/Implies b/sysdeps/powerpc/powerpc32/440/Implies new file mode 100644 index 0000000000..70c0d2eda3 --- /dev/null +++ b/sysdeps/powerpc/powerpc32/440/Implies @@ -0,0 +1,2 @@ +powerpc/powerpc32/405/fpu +powerpc/powerpc32/405 diff --git a/sysdeps/powerpc/powerpc32/464/Implies b/sysdeps/powerpc/powerpc32/464/Implies new file mode 100644 index 0000000000..c3e52c5504 --- /dev/null +++ b/sysdeps/powerpc/powerpc32/464/Implies @@ -0,0 +1,2 @@ +powerpc/powerpc32/440/fpu +powerpc/powerpc32/440 diff --git a/sysdeps/powerpc/powerpc32/476/Implies b/sysdeps/powerpc/powerpc32/476/Implies new file mode 100644 index 0000000000..2829f9ccaf --- /dev/null +++ b/sysdeps/powerpc/powerpc32/476/Implies @@ -0,0 +1,2 @@ +powerpc/powerpc32/464/fpu +powerpc/powerpc32/464 diff --git a/sysdeps/powerpc/powerpc32/Makefile b/sysdeps/powerpc/powerpc32/Makefile new file mode 100644 index 0000000000..3d235deeb9 --- /dev/null +++ b/sysdeps/powerpc/powerpc32/Makefile @@ -0,0 +1,8 @@ +# Some Powerpc32 variants assume soft-fp is the default even though there is +# an fp variant so provide -mhard-float if --with-fp is explicitly passed. + +ifeq ($(with-fp),yes) ++cflags += -mhard-float +ASFLAGS += -mhard-float +sysdep-LDFLAGS += -mhard-float +endif diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/405/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/405/Implies new file mode 100644 index 0000000000..70c0d2eda3 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/405/Implies @@ -0,0 +1,2 @@ +powerpc/powerpc32/405/fpu +powerpc/powerpc32/405 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/440/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/440/Implies new file mode 100644 index 0000000000..c3e52c5504 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/440/Implies @@ -0,0 +1,2 @@ +powerpc/powerpc32/440/fpu +powerpc/powerpc32/440 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/464/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/464/Implies new file mode 100644 index 0000000000..2829f9ccaf --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/464/Implies @@ -0,0 +1,2 @@ +powerpc/powerpc32/464/fpu +powerpc/powerpc32/464 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/476/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/476/Implies new file mode 100644 index 0000000000..80f917079e --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/476/Implies @@ -0,0 +1,2 @@ +powerpc/powerpc32/476/fpu +powerpc/powerpc32/476 From fb88ab40aced6ba45d82321b32b43fd2ecdaa11c Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 18 Jan 2011 12:18:31 +0100 Subject: [PATCH 4054/4487] m68k: fix namespace pollution --- sysdeps/unix/sysv/linux/m68k/nptl/bits/semaphore.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/bits/semaphore.h b/sysdeps/unix/sysv/linux/m68k/nptl/bits/semaphore.h index baaa9eb25f..1648e92c27 100644 --- a/sysdeps/unix/sysv/linux/m68k/nptl/bits/semaphore.h +++ b/sysdeps/unix/sysv/linux/m68k/nptl/bits/semaphore.h @@ -32,5 +32,5 @@ typedef union { char __size[__SIZEOF_SEM_T]; - long int __align __attribute__ ((aligned (4))); + long int __align __attribute__ ((__aligned__ (4))); } sem_t; From bd44238d1afea9457789228f1e3495b5546a7153 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 18 Jan 2011 12:20:06 +0100 Subject: [PATCH 4055/4487] m68k: define MADV_HUGEPAGE and MADV_NOHUGEPAGE --- ChangeLog.m68k | 5 +++++ sysdeps/unix/sysv/linux/m68k/bits/mman.h | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index feba28e20d..6edab560b2 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2011-01-18 Andreas Schwab + + * sysdeps/unix/sysv/linux/m68k/bits/mman.h (MADV_HUGEPAGE) + (MADV_NOHUGEPAGE): Define. + 2011-01-10 Andreas Schwab * sysdeps/unix/sysv/linux/m68k/nptl/bits/semaphore.h (sem_t): diff --git a/sysdeps/unix/sysv/linux/m68k/bits/mman.h b/sysdeps/unix/sysv/linux/m68k/bits/mman.h index 15727ad1ba..4620213527 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/mman.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/m68k version. - Copyright (C) 1997, 2000, 2003, 2005, 2008, 2009 + Copyright (C) 1997, 2000, 2003, 2005, 2008, 2009, 2011 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -94,6 +94,8 @@ # define MADV_DOFORK 11 /* Do inherit across fork. */ # define MADV_MERGEABLE 12 /* KSM may merge identical pages. */ # define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */ +# define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */ +# define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */ # define MADV_HWPOISON 100 /* Poison a page for testing. */ #endif From eb76b06f882cf13ce8b5f51712e9c738db2b40d9 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 25 Jan 2011 20:49:51 +0000 Subject: [PATCH 4056/4487] Define new socket constants for MIPS. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/bits/socket.h | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 0d933f390a..16ca191ad4 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2011-01-25 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/socket.h (AF_CAIF, AF_ALG, + PF_CAIF, PF_ALG): Define. + 2010-12-30 Joseph Myers * sysdeps/mips/init-first.c: Don't call __libc_global_ctors if diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h index 9f90216c97..91af8b2f8a 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/socket.h +++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h @@ -1,6 +1,6 @@ /* System-specific socket constants and types. Linux/MIPS version. Copyright (C) 1991, 92, 1994-1999, 2000, 2001, 2004, 2005, 2006, 2007, 2008, - 2009, 2010 Free Software Foundation, Inc. + 2009, 2010, 2011 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 @@ -109,7 +109,9 @@ enum __socket_type #define PF_ISDN 34 /* mISDN sockets. */ #define PF_PHONET 35 /* Phonet sockets. */ #define PF_IEEE802154 36 /* IEEE 802.15.4 sockets. */ -#define PF_MAX 37 /* For now.. */ +#define PF_CAIF 37 /* CAIF sockets. */ +#define PF_ALG 38 /* Algorithm sockets. */ +#define PF_MAX 39 /* For now.. */ /* Address families. */ #define AF_UNSPEC PF_UNSPEC @@ -150,6 +152,8 @@ enum __socket_type #define AF_ISDN PF_ISDN #define AF_PHONET PF_PHONET #define AF_IEEE802154 PF_IEEE802154 +#define AF_CAIF PF_CAIF +#define AF_ALG PF_ALG #define AF_MAX PF_MAX /* Socket level values. Others are defined in the appropriate headers. From 2ca1e6719368b88a4375b271f276aaf0ac9c8027 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 25 Jan 2011 20:57:58 +0000 Subject: [PATCH 4057/4487] Define MADV_HUGEPAGE and MADV_NOHUGEPAGE for ARM. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/bits/mman.h | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 8951801aab..8ea3b9e34b 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2011-01-25 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/bits/mman.h (MADV_HUGEPAGE, + MADV_NOHUGEPAGE): Define. + 2011-01-07 Joseph Myers * sysdeps/arm/eabi/fclrexcpt.c (__feclearexcept): Return zero if diff --git a/sysdeps/unix/sysv/linux/arm/bits/mman.h b/sysdeps/unix/sysv/linux/arm/bits/mman.h index 0240aed8ab..058c7a0fba 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/mman.h +++ b/sysdeps/unix/sysv/linux/arm/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/ARM version. - Copyright (C) 1997, 2000, 2003, 2005, 2006, 2009 + Copyright (C) 1997, 2000, 2003, 2005, 2006, 2009, 2011 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -94,6 +94,8 @@ # define MADV_DOFORK 11 /* Do inherit across fork. */ # define MADV_MERGEABLE 12 /* KSM may merge identical pages. */ # define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */ +# define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */ +# define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */ # define MADV_HWPOISON 100 /* Poison a page for testing. */ #endif From 91a59c6a5db4906f101350197031671e853d163c Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 25 Jan 2011 20:58:24 +0000 Subject: [PATCH 4058/4487] Define MADV_HUGEPAGE and MADV_NOHUGEPAGE for MIPS. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/bits/mman.h | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 16ca191ad4..0c2285f137 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2011-01-25 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/mman.h (MADV_HUGEPAGE, + MADV_NOHUGEPAGE): Define. + 2011-01-25 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/socket.h (AF_CAIF, AF_ALG, diff --git a/sysdeps/unix/sysv/linux/mips/bits/mman.h b/sysdeps/unix/sysv/linux/mips/bits/mman.h index f639e0464f..097cb8f15f 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/mman.h +++ b/sysdeps/unix/sysv/linux/mips/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/MIPS version. - Copyright (C) 1997, 2000, 2003, 2004, 2005, 2006, 2009 + Copyright (C) 1997, 2000, 2003, 2004, 2005, 2006, 2009, 2011 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -96,6 +96,8 @@ # define MADV_DOFORK 11 /* Do inherit across fork. */ # define MADV_MERGEABLE 12 /* KSM may merge identical pages. */ # define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */ +# define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */ +# define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */ # define MADV_HWPOISON 100 /* Poison a page for testing. */ #endif From 75bbd6583321cfa8847065d2882f3a883c5228ed Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 25 Jan 2011 21:00:16 +0000 Subject: [PATCH 4059/4487] Move ChangeLog entry to correct file. --- ChangeLog | 20 -------------------- ChangeLog.powerpc | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3618387218..e42182fda6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,23 +1,3 @@ -2010-09-03 Luis Machado - - * sysdeps/powerpc/dl-procinfo.c: New file. - * sysdeps/powerpc/dl-procinfo.h: New file. - * sysdeps/powerpc/powerpc32/405/memcmp.S: New file. - * sysdeps/powerpc/powerpc32/405/memcpy.S: New file. - * sysdeps/powerpc/powerpc32/405/memset.S: New file. - * sysdeps/powerpc/powerpc32/405/strcmp.S: New file. - * sysdeps/powerpc/powerpc32/405/strcpy.S: New file. - * sysdeps/powerpc/powerpc32/405/strlen.S: New file. - * sysdeps/powerpc/powerpc32/405/strncmp.S: New file. - * sysdeps/powerpc/powerpc32/440/Implies: New file. - * sysdeps/powerpc/powerpc32/464/Implies: New file. - * sysdeps/powerpc/powerpc32/476/Implies: New file. - * sysdeps/powerpc/powerpc32/Makefile: New file. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/405/Implies: New file. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/440/Implies: New file. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/464/Implies: New file. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/476/Implies: New file. - 2010-04-14 Joseph Myers * libc-abis: Remove. diff --git a/ChangeLog.powerpc b/ChangeLog.powerpc index d8989b0b33..36a88d69d7 100644 --- a/ChangeLog.powerpc +++ b/ChangeLog.powerpc @@ -1,3 +1,23 @@ +2010-09-03 Luis Machado + + * sysdeps/powerpc/dl-procinfo.c: New file. + * sysdeps/powerpc/dl-procinfo.h: New file. + * sysdeps/powerpc/powerpc32/405/memcmp.S: New file. + * sysdeps/powerpc/powerpc32/405/memcpy.S: New file. + * sysdeps/powerpc/powerpc32/405/memset.S: New file. + * sysdeps/powerpc/powerpc32/405/strcmp.S: New file. + * sysdeps/powerpc/powerpc32/405/strcpy.S: New file. + * sysdeps/powerpc/powerpc32/405/strlen.S: New file. + * sysdeps/powerpc/powerpc32/405/strncmp.S: New file. + * sysdeps/powerpc/powerpc32/440/Implies: New file. + * sysdeps/powerpc/powerpc32/464/Implies: New file. + * sysdeps/powerpc/powerpc32/476/Implies: New file. + * sysdeps/powerpc/powerpc32/Makefile: New file. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/405/Implies: New file. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/440/Implies: New file. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/464/Implies: New file. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/476/Implies: New file. + 2010-10-11 Joseph Myers * sysdeps/powerpc/nofpu/feupdateenv.c (feupdateenv): Add From 94fd527b67373373ebf6364d8b42c1d9fac1ea1c Mon Sep 17 00:00:00 2001 From: Manjunath Matti Date: Wed, 16 Feb 2011 17:30:13 +0000 Subject: [PATCH 4060/4487] Fix profiling libc for ARM EABI to use __gnu_mcount_nc interface when available. --- ChangeLog.arm | 7 +++++++ sysdeps/arm/sysdep.h | 16 ++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/ChangeLog.arm b/ChangeLog.arm index 8ea3b9e34b..5e59f0964c 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,10 @@ +2011-02-16 Manjunath Matti + + * sysdeps/arm/sysdep.h (CALL_MCOUNT): Use __gnu_mcount_nc + interface for EABI with GCC 4.4 or later. + (mcount): Define to __gnu_mcount_nc for EABI with GCC 4.4 or + later. + 2011-01-25 Joseph Myers * sysdeps/unix/sysv/linux/arm/bits/mman.h (MADV_HUGEPAGE, diff --git a/sysdeps/arm/sysdep.h b/sysdeps/arm/sysdep.h index 9ffd7df2b5..5c01ef0e21 100644 --- a/sysdeps/arm/sysdep.h +++ b/sysdeps/arm/sysdep.h @@ -18,6 +18,7 @@ 02111-1307 USA. */ #include +#include #if (!defined (__ARM_ARCH_2__) && !defined (__ARM_ARCH_3__) \ && !defined (__ARM_ARCH_3M__) && !defined (__ARM_ARCH_4__)) @@ -92,6 +93,16 @@ /* If compiled for profiling, call `mcount' at the start of each function. */ #ifdef PROF +/* Call __gnu_mcount_nc if GCC >= 4.4 and abi = EABI. */ +#if __GNUC_PREREQ(4,4) && defined(__ARM_EABI__) +#define CALL_MCOUNT \ + str lr,[sp, #-4]!; \ + cfi_adjust_cfa_offset (4); \ + cfi_rel_offset (lr, 0); \ + bl PLTJMP(mcount); \ + cfi_adjust_cfa_offset (-4); \ + cfi_restore (lr) +#else /* else call _mcount */ #define CALL_MCOUNT \ str lr,[sp, #-4]!; \ cfi_adjust_cfa_offset (4); \ @@ -100,6 +111,7 @@ ldr lr, [sp], #4; \ cfi_adjust_cfa_offset (-4); \ cfi_restore (lr) +#endif #else #define CALL_MCOUNT /* Do nothing. */ #endif @@ -109,8 +121,12 @@ on this system, the asm identifier `syscall_error' intrudes on the C name space. Make sure we use an innocuous name. */ #define syscall_error __syscall_error +#if __GNUC_PREREQ(4,4) && defined(__ARM_EABI__) +#define mcount __gnu_mcount_nc +#else #define mcount _mcount #endif +#endif #if defined(__ARM_EABI__) /* Tag_ABI_align8_preserved: This code preserves 8-byte From 146c8734c741e7f592cf07e7fd12644506c4c4c5 Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Tue, 1 Mar 2011 09:59:13 +1000 Subject: [PATCH 4061/4487] alpha: Define F_GET/SETPIPE_SZ --- ChangeLog.alpha | 5 +++++ sysdeps/unix/sysv/linux/alpha/bits/fcntl.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index d2030d6638..ca354f10c7 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,8 @@ +2011-02-28 Aurelien Jarno + + * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h (F_SETPIPE_SZ, + F_GETPIPE_SZ): Define. + 2010-09-26 Michael Cree * sysdeps/alpha/memchr.c: Include diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h index 860e9ac3ee..e5e726bf4c 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h @@ -97,6 +97,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_SETPIPE_SZ 1031 /* Set pipe page size array. */ +# define F_GETPIPE_SZ 1032 /* Set pipe page size array. */ #endif #ifdef __USE_XOPEN2K8 # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with From 65342356965f356a7fb9b4578856c5ad0861d423 Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Tue, 1 Mar 2011 10:00:28 +1000 Subject: [PATCH 4062/4487] alpha: Define DEFAULT_STACK_PERMS --- ChangeLog.alpha | 4 ++++ sysdeps/alpha/stackinfo.h | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index ca354f10c7..473edac23b 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,7 @@ +2011-02-28 Aurelien Jarno + + * sysdeps/alpha/stackinfo.h: Define DEFAULT_STACK_PERMS with PF_X. + 2011-02-28 Aurelien Jarno * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h (F_SETPIPE_SZ, diff --git a/sysdeps/alpha/stackinfo.h b/sysdeps/alpha/stackinfo.h index 0a281bd435..d9dbc357a4 100644 --- a/sysdeps/alpha/stackinfo.h +++ b/sysdeps/alpha/stackinfo.h @@ -22,7 +22,13 @@ #ifndef _STACKINFO_H #define _STACKINFO_H 1 +#include + /* On Alpha the stack grows down. */ #define _STACK_GROWS_DOWN 1 +/* Default to an executable stack. PF_X can be overridden if PT_GNU_STACK is + * present, but it is presumed absent. */ +#define DEFAULT_STACK_PERMS (PF_R|PF_W|PF_X) + #endif /* stackinfo.h */ From 79abd1fbfcd082e5e9857d41d0acb4f64e9299de Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Tue, 1 Mar 2011 10:02:04 +1000 Subject: [PATCH 4063/4487] alpha: Add f_flags to struct statfs --- ChangeLog.alpha | 11 ++++++++--- sysdeps/unix/sysv/linux/alpha/bits/statfs.h | 6 ++++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 473edac23b..b841cc22c3 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,8 @@ +2011-02-28 Aurelien Jarno + + * sysdeps/unix/sysv/linux/alpha/bits/statfs.h (struct statfs, + struct statfs64): Add f_flags field. + 2011-02-28 Aurelien Jarno * sysdeps/alpha/stackinfo.h: Define DEFAULT_STACK_PERMS with PF_X. @@ -136,7 +141,7 @@ return type correct without warning. 2010-03-23 Matt Turner - Aurelien Jarno + Aurelien Jarno * sysdeps/unix/sysv/linux/alpha/bits/socket.h: New file. @@ -193,8 +198,8 @@ 2009-07-13 Aurelien Jarno [BZ #10158] - * sysdeps/unix/sysv/linux/alpha/getsysstats.c (GET_NPROCS_PARSER): - Change parameters and use next_line. + * sysdeps/unix/sysv/linux/alpha/getsysstats.c (GET_NPROCS_PARSER): + Change parameters and use next_line. [BZ #10160] * sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h: Define diff --git a/sysdeps/unix/sysv/linux/alpha/bits/statfs.h b/sysdeps/unix/sysv/linux/alpha/bits/statfs.h index d838e6bf4a..157591d2ea 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/statfs.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/statfs.h @@ -42,7 +42,8 @@ struct statfs __fsid_t f_fsid; int f_namelen; int f_frsize; - int f_spare[5]; + int f_flags; + int f_spare[4]; }; #ifdef __USE_LARGEFILE64 @@ -58,7 +59,8 @@ struct statfs64 __fsid_t f_fsid; int f_namelen; int f_frsize; - int f_spare[5]; + int f_flags; + int f_spare[4]; }; #endif From a8505de8a46aa0e70928c4e8d8a68d948436da4f Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Tue, 1 Mar 2011 10:04:15 +1000 Subject: [PATCH 4064/4487] alpha: Add libm_hidden_def to feupdateenv and fetestexcept --- sysdeps/alpha/fpu/feupdateenv.c | 1 + sysdeps/alpha/fpu/ftestexcept.c | 1 + 2 files changed, 2 insertions(+) diff --git a/sysdeps/alpha/fpu/feupdateenv.c b/sysdeps/alpha/fpu/feupdateenv.c index c798070bbb..7fc38163c0 100644 --- a/sysdeps/alpha/fpu/feupdateenv.c +++ b/sysdeps/alpha/fpu/feupdateenv.c @@ -46,4 +46,5 @@ strong_alias (__feupdateenv, __old_feupdateenv) compat_symbol (libm, __old_feupdateenv, feupdateenv, GLIBC_2_1); #endif +libm_hidden_ver (__feupdateenv, feupdateenv) versioned_symbol (libm, __feupdateenv, feupdateenv, GLIBC_2_2); diff --git a/sysdeps/alpha/fpu/ftestexcept.c b/sysdeps/alpha/fpu/ftestexcept.c index a4b3081875..34d8113b3d 100644 --- a/sysdeps/alpha/fpu/ftestexcept.c +++ b/sysdeps/alpha/fpu/ftestexcept.c @@ -30,3 +30,4 @@ fetestexcept (int excepts) return tmp & excepts & SWCR_STATUS_MASK; } +libm_hidden_def (fetestexcept) From 57d366bd22fdc1ae7e5320ea7dda145e9ea02dfc Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 1 Mar 2011 10:05:08 +1000 Subject: [PATCH 4065/4487] Missed changelog with last commit --- ChangeLog.alpha | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index b841cc22c3..82384ac7e1 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,8 @@ +2011-03-01 Aurelien Jarno + + * sysdeps/alpha/fpu/feupdateenv.c (feupdateenv): Add libm_hidden_def. + * sysdeps/alpha/fpu/ftestexcept.c (fetestexcept): Likewise. + 2011-02-28 Aurelien Jarno * sysdeps/unix/sysv/linux/alpha/bits/statfs.h (struct statfs, From 3447f0d785a18f1fc8efefefb0d22bd917044379 Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Sat, 5 Mar 2011 03:39:15 +0000 Subject: [PATCH 4066/4487] ARM TLS descriptors support. --- ChangeLog.arm | 20 ++++ sysdeps/arm/Makefile | 9 ++ sysdeps/arm/bits/linkmap.h | 1 + sysdeps/arm/dl-lookupcfg.h | 28 +++++ sysdeps/arm/dl-machine.h | 56 +++++++++- sysdeps/arm/dl-tls.h | 2 +- sysdeps/arm/dl-tlsdesc.S | 222 +++++++++++++++++++++++++++++++++++++ sysdeps/arm/dl-tlsdesc.h | 69 ++++++++++++ sysdeps/arm/tlsdesc.c | 164 +++++++++++++++++++++++++++ sysdeps/arm/tlsdesc.sym | 19 ++++ 10 files changed, 588 insertions(+), 2 deletions(-) create mode 100644 sysdeps/arm/Makefile create mode 100644 sysdeps/arm/dl-lookupcfg.h create mode 100644 sysdeps/arm/dl-tlsdesc.S create mode 100644 sysdeps/arm/dl-tlsdesc.h create mode 100644 sysdeps/arm/tlsdesc.c create mode 100644 sysdeps/arm/tlsdesc.sym diff --git a/ChangeLog.arm b/ChangeLog.arm index 5e59f0964c..1e05d41876 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,23 @@ +2011-03-05 Nathan Sidwell + Glauber de Oliveira Costa + + * sysdeps/arm/dl-tlsdesc.h: New. + * sysdeps/arm/dl-tls.h (struct dl_tls_index): Make non-anonymous. + * sysdeps/arm/Makefile: Add tlsdesc, dl-tlsdesc for elf + subdirectory. + * sysdeps/arm/tlsdesc.c: New. + * sysdeps/arm/dl-machine.h: #include sysdeps and dl-tlsdesc.h. + (elf_machine_runtime_setup): Record dl_tlsdesc_lazy_resolver + address. + (elf_machine_type_class): Check R_ARM_TLS_DESC. + (elf_machine_rel): Add R_ARM_TLS_DESC case. + (elf_machine_lazy_rel): Likewise. + * sysdeps/arm/dl-tlsdesc.S: New. + * sysdeps/arm/bits/linkmap.h (struct link_map_machine): Add + tlsdesc_table field. + * sysdeps/arm/tlsdesc.sym: New. + * sysdeps/arm/dl-lookupcfg.h: New. + 2011-02-16 Manjunath Matti * sysdeps/arm/sysdep.h (CALL_MCOUNT): Use __gnu_mcount_nc diff --git a/sysdeps/arm/Makefile b/sysdeps/arm/Makefile new file mode 100644 index 0000000000..5651161516 --- /dev/null +++ b/sysdeps/arm/Makefile @@ -0,0 +1,9 @@ +ifeq ($(subdir),elf) +sysdep-dl-routines += tlsdesc dl-tlsdesc +sysdep_routines += tlsdesc dl-tlsdesc +sysdep-rtld-routines += tlsdesc dl-tlsdesc +endif + +ifeq ($(subdir),csu) +gen-as-const-headers += tlsdesc.sym +endif diff --git a/sysdeps/arm/bits/linkmap.h b/sysdeps/arm/bits/linkmap.h index 648976d7d2..7c2b4a6da8 100644 --- a/sysdeps/arm/bits/linkmap.h +++ b/sysdeps/arm/bits/linkmap.h @@ -1,4 +1,5 @@ struct link_map_machine { Elf32_Addr plt; /* Address of .plt */ + void *tlsdesc_table; /* Address of TLS descriptor hash table. */ }; diff --git a/sysdeps/arm/dl-lookupcfg.h b/sysdeps/arm/dl-lookupcfg.h new file mode 100644 index 0000000000..29b2587b42 --- /dev/null +++ b/sysdeps/arm/dl-lookupcfg.h @@ -0,0 +1,28 @@ +/* Configuration of lookup functions. + Copyright (C) 2006, 2010 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. */ + +#define DL_UNMAP_IS_SPECIAL + +#include_next + +struct link_map; + +extern void internal_function _dl_unmap (struct link_map *map); + +#define DL_UNMAP(map) _dl_unmap (map) diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index c55576356a..9929f76c3e 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -25,6 +25,7 @@ #include #include +#include #define CLEAR_CACHE(BEG,END) \ INTERNAL_SYSCALL_ARM (cacheflush, , 3, (BEG), (END), 0) @@ -127,6 +128,11 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) the offset on the stack, and then jump to the resolved address. */ got[2] = (Elf32_Addr) &_dl_runtime_resolve; } + + if (l->l_info[ADDRIDX (DT_TLSDESC_GOT)] && lazy) + *(Elf32_Addr*)(D_PTR (l, l_info[ADDRIDX (DT_TLSDESC_GOT)]) + l->l_addr) + = (Elf32_Addr) &_dl_tlsdesc_lazy_resolver; + return lazy; } @@ -239,7 +245,8 @@ _dl_start_user:\n\ #if defined USE_TLS && (!defined RTLD_BOOTSTRAP || USE___THREAD) # define elf_machine_type_class(type) \ ((((type) == R_ARM_JUMP_SLOT || (type) == R_ARM_TLS_DTPMOD32 \ - || (type) == R_ARM_TLS_DTPOFF32 || (type) == R_ARM_TLS_TPOFF32) \ + || (type) == R_ARM_TLS_DTPOFF32 || (type) == R_ARM_TLS_TPOFF32 \ + || (type) == R_ARM_TLS_DESC) \ * ELF_RTYPE_CLASS_PLT) \ | (((type) == R_ARM_COPY) * ELF_RTYPE_CLASS_COPY)) #else @@ -421,6 +428,39 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, *reloc_addr += value; break; } + case R_ARM_TLS_DESC: + { + struct tlsdesc volatile *td = + (struct tlsdesc volatile *)reloc_addr; + +# ifndef RTLD_BOOTSTRAP + if (! sym) + td->entry = _dl_tlsdesc_undefweak; + else +# endif + { + value = sym->st_value + td->argument.value; + +# ifndef RTLD_BOOTSTRAP +# ifndef SHARED + CHECK_STATIC_TLS (map, sym_map); +# else + if (!TRY_STATIC_TLS (map, sym_map)) + { + td->argument.pointer + = _dl_make_tlsdesc_dynamic (sym_map, value); + td->entry = _dl_tlsdesc_dynamic; + } + else +# endif +# endif + { + td->argument.value = value + sym_map->l_tls_offset; + td->entry = _dl_tlsdesc_return; + } + } + } + break; case R_ARM_PC24: { Elf32_Sword addend; @@ -612,6 +652,20 @@ elf_machine_lazy_rel (struct link_map *map, else *reloc_addr = map->l_mach.plt; } +#ifdef USE_TLS + else if (__builtin_expect (r_type == R_ARM_TLS_DESC, 1)) + { + struct tlsdesc volatile *td = + (struct tlsdesc volatile *)reloc_addr; + + /* The linker must have given us the parameter we need in the + first GOT entry, and left the second one empty. We fill the + last with the resolver address */ + assert (td->entry == 0); + td->entry = (void*)(D_PTR (map, l_info[ADDRIDX (DT_TLSDESC_PLT)]) + + map->l_addr); + } +#endif else _dl_reloc_bad_type (map, r_type, 1); } diff --git a/sysdeps/arm/dl-tls.h b/sysdeps/arm/dl-tls.h index e0324a7b65..02285a7147 100644 --- a/sysdeps/arm/dl-tls.h +++ b/sysdeps/arm/dl-tls.h @@ -19,7 +19,7 @@ /* Type used for the representation of TLS information in the GOT. */ -typedef struct +typedef struct dl_tls_index { unsigned long int ti_module; unsigned long int ti_offset; diff --git a/sysdeps/arm/dl-tlsdesc.S b/sysdeps/arm/dl-tlsdesc.S new file mode 100644 index 0000000000..19e4ed3d01 --- /dev/null +++ b/sysdeps/arm/dl-tlsdesc.S @@ -0,0 +1,222 @@ +/* Thread-local storage handling in the ELF dynamic linker. ARM version. + Copyright (C) 2006, 2010 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. */ + +#include +#include +#include "tlsdesc.h" + +#ifdef __USE_BX__ + #define BX(x) bx x +#else + #define BX(x) mov pc, x +#endif + + .text + @ emit debug information with cfi + @ use arm-specific pseudos for unwinding itself + .cfi_sections .debug_frame +#ifdef USE_TLS + .hidden _dl_tlsdesc_return + .global _dl_tlsdesc_return + .type _dl_tlsdesc_return,#function + cfi_startproc + .fnstart + .align 2 +_dl_tlsdesc_return: + ldr r0, [r0] + BX (lr) + .fnend + cfi_endproc + .size _dl_tlsdesc_return, .-_dl_tlsdesc_return + + .hidden _dl_tlsdesc_undefweak + .global _dl_tlsdesc_undefweak + .type _dl_tlsdesc_undefweak,#function + cfi_startproc + .fnstart + .align 2 +_dl_tlsdesc_undefweak: + @ Are we allowed a misaligned stack pointer calling read_tp? + .save {lr} + stmdb sp!, {lr} + cfi_adjust_cfa_offset (4) + cfi_rel_offset (lr,0) + bl __aeabi_read_tp + rsb r0, r0, #0 + ldmia sp!, {lr} + cfi_adjust_cfa_offset (-4) + cfi_restore (lr) + BX (lr) + + cfi_endproc + .fnend + .size _dl_tlsdesc_undefweak, .-_dl_tlsdesc_undefweak + +#ifdef SHARED + .hidden _dl_tlsdesc_dynamic + .global _dl_tlsdesc_dynamic + .type _dl_tlsdesc_dynamic,#function + + +/* + The assembly code that follows is a rendition of the following + C code, hand-optimized a little bit. + +ptrdiff_t +_dl_tlsdesc_dynamic(struct tlsdesc *tdp) +{ + struct tlsdesc_dynamic_arg *td = tdp->argument.pointer; + dtv_t *dtv = (dtv_t *)THREAD_DTV(); + if (__builtin_expect (td->gen_count <= dtv[0].counter + && dtv[td->tlsinfo.ti_module].pointer.val + != TLS_DTV_UNALLOCATED, + 1)) + return dtv[td->tlsinfo.ti_module].pointer.val + + td->tlsinfo.ti_offset - __builtin_thread_pointer(); + + return __tls_get_addr (&td->tlsinfo) - __builtin_thread_pointer(); +} + +*/ + cfi_startproc + .fnstart + .align 2 +_dl_tlsdesc_dynamic: + /* Our calling convention is to clobber r0, r1 and the processor + flags. All others that are modified must be saved */ + .save {r2,r3,r4,lr} + stmdb sp!, {r2,r3,r4,lr} + cfi_adjust_cfa_offset (16) + cfi_rel_offset (r2,0) + cfi_rel_offset (r3,4) + cfi_rel_offset (r4,8) + cfi_rel_offset (lr,12) + ldr r1, [r0] /* td */ + bl __aeabi_read_tp + mov r4, r0 /* r4 = tp */ + ldr r0, [r0] + ldr r2, [r1, #8] /* gen_count */ + ldr r3, [r0] + cmp r2, r3 + bhi 1f + ldr r3, [r1] + ldr r2, [r0, r3, lsl #3] + cmn r2, #1 + ldrne r3, [r1, #4] + addne r3, r2, r3 + rsbne r0, r4, r3 + bne 2f +1: mov r0, r1 + bl __tls_get_addr + rsb r0, r4, r0 +2: ldmia sp!, {r2,r3,r4, lr} + cfi_adjust_cfa_offset (-16) + cfi_restore (lr) + cfi_restore (r4) + cfi_restore (r3) + cfi_restore (r2) + BX (lr) + .fnend + cfi_endproc + .size _dl_tlsdesc_dynamic, .-_dl_tlsdesc_dynamic +#endif /* SHARED */ + +/* lazy resolved for tls descriptors. */ + .hidden _dl_tlsdesc_lazy_resolver + .global _dl_tlsdesc_lazy_resolver + .type _dl_tlsdesc_lazy_resolver,#function + cfi_startproc + .fnstart + .align 2 +_dl_tlsdesc_lazy_resolver: + /* r0 points at the tlsdesc, + r1 points at the GOT + r2 was pushed by the trampoline and used as a temp, + we need to pop it here. + We push the remaining call-clobbered registers here, and also + R1 -- to keep the stack correctly aligned. */ + /* Tell the unwinder that r2 has already been pushed. */ + .save {r2} + cfi_adjust_cfa_offset (4) + cfi_rel_offset (r2, 0) + .save {r0,r1,r3,ip,lr} + stmdb sp!, {r0, r1, r3, ip, lr} + cfi_adjust_cfa_offset (20) + cfi_rel_offset (r0, 0) + cfi_rel_offset (r1, 4) + cfi_rel_offset (r3, 8) + cfi_rel_offset (ip, 12) + cfi_rel_offset (lr, 16) + bl _dl_tlsdesc_lazy_resolver_fixup + ldmia sp!, {r0, r1, r3, ip, lr} + cfi_adjust_cfa_offset (-20) + cfi_restore (lr) + cfi_restore (ip) + cfi_restore (r3) + cfi_restore (r1) + cfi_restore (r0) + ldmia sp!, {r2} + cfi_adjust_cfa_offset (-4) + cfi_restore (r2) + ldr r1, [r0, #4] + BX (r1) + .fnend + cfi_endproc + .size _dl_tlsdesc_lazy_resolver, .-_dl_tlsdesc_lazy_resolver + +/* Holder for lazy tls descriptors being resolve in another thread. + Same ABI as the lazy resolver itself. */ + .hidden _dl_tlsdesc_resolve_hold + .global _dl_tlsdesc_resolve_hold + .type _dl_tlsdesc_resolve_hold,#function + cfi_startproc + .fnstart + .align 2 +_dl_tlsdesc_resolve_hold: + /* Tell the unwinder that r2 has already been pushed. */ + .save {r2} + cfi_adjust_cfa_offset (4) + cfi_rel_offset (r2, 0) + .save {r0,r1,r3,ip,lr} + stmdb sp!, {r0, r1, r3, ip, lr} + cfi_adjust_cfa_offset (20) + cfi_rel_offset (r0, 0) + cfi_rel_offset (r1, 4) + cfi_rel_offset (r3, 8) + cfi_rel_offset (ip, 12) + cfi_rel_offset (lr, 16) + adr r2, _dl_tlsdesc_resolve_hold + bl _dl_tlsdesc_resolve_hold_fixup + ldmia sp!, {r0, r1, r3, ip, lr} + cfi_adjust_cfa_offset (-20) + cfi_restore (lr) + cfi_restore (ip) + cfi_restore (r3) + cfi_restore (r1) + cfi_restore (r0) + ldmia sp!, {r2} + cfi_adjust_cfa_offset (-4) + cfi_restore (r2) + ldr r1, [r0, #4] + BX (r1) + .fnend + cfi_endproc + .size _dl_tlsdesc_resolve_hold, .-_dl_tlsdesc_resolve_hold + +#endif /* USE_TLS */ diff --git a/sysdeps/arm/dl-tlsdesc.h b/sysdeps/arm/dl-tlsdesc.h new file mode 100644 index 0000000000..3817d7e5da --- /dev/null +++ b/sysdeps/arm/dl-tlsdesc.h @@ -0,0 +1,69 @@ +/* Thread-local storage descriptor handling in the ELF dynamic linker. + ARM version. + Copyright (C) 2005, 2010 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; witout 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 _ARM_DL_TLSDESC_H +# define _ARM_DL_TLSDESC_H 1 + +/* Use this to access DT_TLSDESC_PLT and DT_TLSDESC_GOT. */ +#ifndef ADDRIDX +# define ADDRIDX(tag) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGNUM \ + + DT_EXTRANUM + DT_VALNUM + DT_ADDRTAGIDX (tag)) +#endif + +/* Type used to represent a TLS descriptor in the GOT. */ +struct tlsdesc +{ + union + { + void *pointer; + long value; + } argument; + ptrdiff_t (*entry)(struct tlsdesc *); +}; + + +typedef struct dl_tls_index +{ + unsigned long int ti_module; + unsigned long int ti_offset; +} tls_index; + +/* Type used as the argument in a TLS descriptor for a symbol that + needs dynamic TLS offsets. */ +struct tlsdesc_dynamic_arg +{ + tls_index tlsinfo; + size_t gen_count; +}; + +extern ptrdiff_t attribute_hidden + _dl_tlsdesc_return(struct tlsdesc *), + _dl_tlsdesc_undefweak(struct tlsdesc *), + _dl_tlsdesc_resolve_hold(struct tlsdesc *), + _dl_tlsdesc_lazy_resolver(struct tlsdesc *); + +# ifdef SHARED +extern void *_dl_make_tlsdesc_dynamic (struct link_map *map, size_t ti_offset); + +extern ptrdiff_t attribute_hidden + _dl_tlsdesc_dynamic(struct tlsdesc *); +# endif + +#endif diff --git a/sysdeps/arm/tlsdesc.c b/sysdeps/arm/tlsdesc.c new file mode 100644 index 0000000000..e0b970f00d --- /dev/null +++ b/sysdeps/arm/tlsdesc.c @@ -0,0 +1,164 @@ +/* Manage TLS descriptors. ARM version. + Copyright (C) 2005, 2010 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. */ + +#include +#include +#include +#include +#include +#include + +#ifdef USE_TLS + +/* This function is used to lazily resolve TLS_DESC REL relocations + Besides the TLS descriptor itself, we get the module's got address + as the second parameter. */ + +void +attribute_hidden +_dl_tlsdesc_lazy_resolver_fixup (struct tlsdesc volatile *td, + Elf32_Addr *got) +{ + struct link_map *l = (struct link_map *)got[1]; + lookup_t result; + unsigned long value; + + if (_dl_tlsdesc_resolve_early_return_p + (td, (void*)(D_PTR (l, l_info[ADDRIDX (DT_TLSDESC_PLT)]) + l->l_addr))) + return; + + if (td->argument.value & 0x80000000) + { + /* A global symbol, this is the symbol index. */ + /* The code below was borrowed from _dl_fixup(). */ + const Elf_Symndx symndx = td->argument.value ^ 0x80000000; + const ElfW(Sym) *const symtab + = (const void *) D_PTR (l, l_info[DT_SYMTAB]); + const char *strtab = (const void *) D_PTR (l, l_info[DT_STRTAB]); + const ElfW(Sym) *sym = &symtab[symndx]; + + /* Look up the target symbol. If the normal lookup rules are not + used don't look in the global scope. */ + if (ELFW(ST_BIND) (sym->st_info) != STB_LOCAL + && __builtin_expect (ELFW(ST_VISIBILITY) (sym->st_other), 0) == 0) + { + const struct r_found_version *version = NULL; + + if (l->l_info[VERSYMIDX (DT_VERSYM)] != NULL) + { + const ElfW(Half) *vernum = + (const void *) D_PTR (l, l_info[VERSYMIDX (DT_VERSYM)]); + ElfW(Half) ndx = vernum[symndx] & 0x7fff; + version = &l->l_versions[ndx]; + if (version->hash == 0) + version = NULL; + } + + result = _dl_lookup_symbol_x + (strtab + sym->st_name, l, &sym, + l->l_scope, version, ELF_RTYPE_CLASS_PLT, + DL_LOOKUP_ADD_DEPENDENCY, NULL); + if (sym) + value = sym->st_value; + else + { + td->entry = _dl_tlsdesc_undefweak; + goto done; + } + } + else + { + /* We already found the symbol. The module (and therefore its load + address) is also known. */ + result = l; + value = sym->st_value; + } + } + else + { + /* A local symbol, this is the offset within our tls section. + */ + value = td->argument.value; + result = l; + } + +#ifndef SHARED + CHECK_STATIC_TLS (l, result); +#else + if (!TRY_STATIC_TLS (l, result)) + { + td->argument.pointer = _dl_make_tlsdesc_dynamic (result, value); + td->entry = _dl_tlsdesc_dynamic; + } + else +#endif + { + td->argument.value = value + result->l_tls_offset; + td->entry = _dl_tlsdesc_return; + } + + done: + _dl_tlsdesc_wake_up_held_fixups (); +} + +/* This function is used to avoid busy waiting for other threads to + complete the lazy relocation. Once another thread wins the race to + relocate a TLS descriptor, it sets the descriptor up such that this + function is called to wait until the resolver releases the + lock. */ + +void +attribute_hidden +_dl_tlsdesc_resolve_hold_fixup (struct tlsdesc volatile *td, + void *caller) +{ + /* Maybe we're lucky and can return early. */ + if (caller != td->entry) + return; + + /* Locking here will stop execution until the running resolver runs + _dl_tlsdesc_wake_up_held_fixups(), releasing the lock. + + FIXME: We'd be better off waiting on a condition variable, such + that we didn't have to hold the lock throughout the relocation + processing. */ + __rtld_lock_lock_recursive (GL(dl_load_lock)); + __rtld_lock_unlock_recursive (GL(dl_load_lock)); +} + +/* Unmap the dynamic object, but also release its TLS descriptor table + if there is one. */ + +void +internal_function +_dl_unmap (struct link_map *map) +{ + __munmap ((void *) (map)->l_map_start, + (map)->l_map_end - (map)->l_map_start); + +#if SHARED + /* _dl_unmap is only called for dlopen()ed libraries, for which + calling free() is safe, or before we've completed the initial + relocation, in which case calling free() is probably pointless, + but still safe. */ + if (map->l_mach.tlsdesc_table) + htab_delete (map->l_mach.tlsdesc_table); +#endif +} +#endif diff --git a/sysdeps/arm/tlsdesc.sym b/sysdeps/arm/tlsdesc.sym new file mode 100644 index 0000000000..a1deb21179 --- /dev/null +++ b/sysdeps/arm/tlsdesc.sym @@ -0,0 +1,19 @@ +#include +#include +#include +#include +#include + +-- + +-- Abuse tls.h macros to derive offsets relative to the thread register. +#if defined USE_TLS + + +TLSDESC_ARG offsetof(struct tlsdesc, argument.pointer) + +TLSDESC_GEN_COUNT offsetof(struct tlsdesc_dynamic_arg, gen_count) +TLSDESC_MODID offsetof(struct tlsdesc_dynamic_arg, tlsinfo.ti_module) +TLSDESC_MODOFF offsetof(struct tlsdesc_dynamic_arg, tlsinfo.ti_offset) + +#endif From fb3ed187478b4dfbf57c027e37354fb91e97e885 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 6 Mar 2011 19:52:43 +0100 Subject: [PATCH 4067/4487] m68k: reimplement byteswap macros as inlines --- ChangeLog.m68k | 5 ++++ sysdeps/m68k/bits/byteswap.h | 54 ++++++++++++++---------------------- 2 files changed, 26 insertions(+), 33 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 6edab560b2..5e45243a1e 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2011-03-06 Andreas Schwab + + * sysdeps/m68k/bits/byteswap.h (__bswap_16, __bswap_32) + (__bswap_64): Implement as inline functions. + 2011-01-18 Andreas Schwab * sysdeps/unix/sysv/linux/m68k/bits/mman.h (MADV_HUGEPAGE) diff --git a/sysdeps/m68k/bits/byteswap.h b/sysdeps/m68k/bits/byteswap.h index a2546c9a20..4f31d95bb6 100644 --- a/sysdeps/m68k/bits/byteswap.h +++ b/sysdeps/m68k/bits/byteswap.h @@ -1,5 +1,5 @@ /* Macros to swap the order of bytes in integer values. m68k version. - Copyright (C) 1997, 2002, 2008 Free Software Foundation, Inc. + Copyright (C) 1997, 2002, 2008, 2011 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 @@ -30,36 +30,29 @@ #define __bswap_constant_16(x) \ ((((x) >> 8) & 0xffu) | (((x) & 0xffu) << 8)) -#ifdef __GNUC__ -# define __bswap_16(x) \ - (__extension__ \ - ({ unsigned short int __bsx = (x); __bswap_constant_16 (__bsx); })) -#else static __inline unsigned short int __bswap_16 (unsigned short int __bsx) { return __bswap_constant_16 (__bsx); } -#endif /* Swap bytes in 32 bit value. */ #define __bswap_constant_32(x) \ ((((x) & 0xff000000u) >> 24) | (((x) & 0x00ff0000u) >> 8) | \ (((x) & 0x0000ff00u) << 8) | (((x) & 0x000000ffu) << 24)) -#if defined __GNUC__ && __GNUC__ >= 2 && !defined(__mcoldfire__) -# define __bswap_32(x) \ - __extension__ \ - ({ unsigned int __bswap_32_v; \ - if (__builtin_constant_p (x)) \ - __bswap_32_v = __bswap_constant_32 (x); \ - else \ - __asm__ __volatile__ ("ror%.w %#8, %0;" \ - "swap %0;" \ - "ror%.w %#8, %0" \ - : "=d" (__bswap_32_v) \ - : "0" ((unsigned int) (x))); \ - __bswap_32_v; }) +#if !defined(__mcoldfire__) +static __inline unsigned int +__bswap_32 (unsigned int __bsx) +{ + if (__builtin_constant_p (__bsx)) + return __bswap_constant_32 (__bsx); + __asm__ __volatile__ ("ror%.w %#8, %0;" + "swap %0;" + "ror%.w %#8, %0" + : "+d" (__bsx)); + return __bsx; +} #else static __inline unsigned int __bswap_32 (unsigned int __bsx) @@ -81,19 +74,14 @@ __bswap_32 (unsigned int __bsx) | (((x) & 0x00000000000000ffull) << 56)) /* Swap bytes in 64 bit value. */ -# define __bswap_64(x) \ - __extension__ \ - ({ union { unsigned long long int __ll; \ - unsigned long int __l[2]; } __bswap_64_v, __bswap_64_r; \ - if (__builtin_constant_p (x)) \ - __bswap_64_r.__ll = __bswap_constant_64 (x); \ - else \ - { \ - __bswap_64_v.__ll = (x); \ - __bswap_64_r.__l[0] = __bswap_32 (__bswap_64_v.__l[1]); \ - __bswap_64_r.__l[1] = __bswap_32 (__bswap_64_v.__l[0]); \ - } \ - __bswap_64_r.__ll; }) +static __inline unsigned long long +__bswap_64 (unsigned long long __bsx) +{ + if (__builtin_constant_p (__bsx)) + return __bswap_constant_64 (__bsx); + return (__bswap_32 (__bsx >> 32) + | ((unsigned long long) __bswap_32 (__bsx) << 32)); +} #endif #endif /* _BITS_BYTESWAP_H */ From 2242368302e983eb2ff6c985078686037534a31d Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 21 Mar 2011 15:40:37 +0000 Subject: [PATCH 4068/4487] Fix GPL and GCC references in last paragraphs of license notices. --- ChangeLog.arm | 14 ++++++++++++++ sysdeps/arm/eabi/__longjmp.S | 8 ++++---- sysdeps/arm/eabi/bits/fenv.h | 8 ++++---- sysdeps/arm/eabi/fclrexcpt.c | 8 ++++---- sysdeps/arm/eabi/fedisblxcpt.c | 8 ++++---- sysdeps/arm/eabi/feenablxcpt.c | 8 ++++---- sysdeps/arm/eabi/fegetenv.c | 8 ++++---- sysdeps/arm/eabi/fegetexcept.c | 8 ++++---- sysdeps/arm/eabi/fegetround.c | 8 ++++---- sysdeps/arm/eabi/feholdexcpt.c | 8 ++++---- sysdeps/arm/eabi/fesetenv.c | 8 ++++---- sysdeps/arm/eabi/fesetround.c | 8 ++++---- sysdeps/arm/eabi/fpu_control.h | 8 ++++---- sysdeps/arm/eabi/fraiseexcpt.c | 8 ++++---- sysdeps/arm/eabi/fsetexcptflg.c | 8 ++++---- sysdeps/arm/eabi/ftestexcept.c | 8 ++++---- sysdeps/arm/eabi/setjmp.S | 8 ++++---- sysdeps/unix/sysv/linux/arm/____longjmp_chk.S | 8 ++++---- sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S | 8 ++++---- 19 files changed, 86 insertions(+), 72 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 1e05d41876..346440446a 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,17 @@ +2011-03-21 Joseph Myers + + * sysdeps/arm/eabi/__longjmp.S, sysdeps/arm/eabi/bits/fenv.h, + sysdeps/arm/eabi/fclrexcpt.c, sysdeps/arm/eabi/fedisblxcpt.c, + sysdeps/arm/eabi/feenablxcpt.c, sysdeps/arm/eabi/fegetenv.c, + sysdeps/arm/eabi/fegetexcept.c, sysdeps/arm/eabi/fegetround.c, + sysdeps/arm/eabi/feholdexcpt.c, sysdeps/arm/eabi/fesetenv.c, + sysdeps/arm/eabi/fesetround.c, sysdeps/arm/eabi/fpu_control.h, + sysdeps/arm/eabi/fraiseexcpt.c, sysdeps/arm/eabi/fsetexcptflg.c, + sysdeps/arm/eabi/ftestexcept.c, sysdeps/arm/eabi/setjmp.S, + sysdeps/unix/sysv/linux/arm/____longjmp_chk.S, + sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S: Correct + license reference in last paragraph of license notice. + 2011-03-05 Nathan Sidwell Glauber de Oliveira Costa diff --git a/sysdeps/arm/eabi/__longjmp.S b/sysdeps/arm/eabi/__longjmp.S index edabdad4a2..f97489e971 100644 --- a/sysdeps/arm/eabi/__longjmp.S +++ b/sysdeps/arm/eabi/__longjmp.S @@ -13,10 +13,10 @@ 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 General Public License - along with GCC; see the file COPYING. If not, write to the Free - Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ + 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. */ #include #define _SETJMP_H diff --git a/sysdeps/arm/eabi/bits/fenv.h b/sysdeps/arm/eabi/bits/fenv.h index 49e386222d..816ebe773e 100644 --- a/sysdeps/arm/eabi/bits/fenv.h +++ b/sysdeps/arm/eabi/bits/fenv.h @@ -11,10 +11,10 @@ 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 General Public License - along with GCC; see the file COPYING. If not, write to the Free - Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ + 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 _FENV_H # error "Never use directly; include instead." diff --git a/sysdeps/arm/eabi/fclrexcpt.c b/sysdeps/arm/eabi/fclrexcpt.c index 0bdd6a14d3..fa326ecd5d 100644 --- a/sysdeps/arm/eabi/fclrexcpt.c +++ b/sysdeps/arm/eabi/fclrexcpt.c @@ -12,10 +12,10 @@ 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 General Public License - along with GCC; see the file COPYING. If not, write to the Free - Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ + 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. */ #include #include diff --git a/sysdeps/arm/eabi/fedisblxcpt.c b/sysdeps/arm/eabi/fedisblxcpt.c index ab6fe79dad..31a4dcd7a4 100644 --- a/sysdeps/arm/eabi/fedisblxcpt.c +++ b/sysdeps/arm/eabi/fedisblxcpt.c @@ -13,10 +13,10 @@ 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 General Public License - along with GCC; see the file COPYING. If not, write to the Free - Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ + 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. */ #include #include diff --git a/sysdeps/arm/eabi/feenablxcpt.c b/sysdeps/arm/eabi/feenablxcpt.c index f12b453200..9c4215870a 100644 --- a/sysdeps/arm/eabi/feenablxcpt.c +++ b/sysdeps/arm/eabi/feenablxcpt.c @@ -13,10 +13,10 @@ 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 General Public License - along with GCC; see the file COPYING. If not, write to the Free - Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ + 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. */ #include #include diff --git a/sysdeps/arm/eabi/fegetenv.c b/sysdeps/arm/eabi/fegetenv.c index 0491381944..d2afd77bce 100644 --- a/sysdeps/arm/eabi/fegetenv.c +++ b/sysdeps/arm/eabi/fegetenv.c @@ -12,10 +12,10 @@ 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 General Public License - along with GCC; see the file COPYING. If not, write to the Free - Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ + 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. */ #include #include diff --git a/sysdeps/arm/eabi/fegetexcept.c b/sysdeps/arm/eabi/fegetexcept.c index 8e29ff7c6a..b0e623db54 100644 --- a/sysdeps/arm/eabi/fegetexcept.c +++ b/sysdeps/arm/eabi/fegetexcept.c @@ -13,10 +13,10 @@ 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 General Public License - along with GCC; see the file COPYING. If not, write to the Free - Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ + 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. */ #include #include diff --git a/sysdeps/arm/eabi/fegetround.c b/sysdeps/arm/eabi/fegetround.c index 6a3442aa40..e8246368e2 100644 --- a/sysdeps/arm/eabi/fegetround.c +++ b/sysdeps/arm/eabi/fegetround.c @@ -12,10 +12,10 @@ 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 General Public License - along with GCC; see the file COPYING. If not, write to the Free - Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ + 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. */ #include #include diff --git a/sysdeps/arm/eabi/feholdexcpt.c b/sysdeps/arm/eabi/feholdexcpt.c index 33c88e7d10..04bb2fa922 100644 --- a/sysdeps/arm/eabi/feholdexcpt.c +++ b/sysdeps/arm/eabi/feholdexcpt.c @@ -12,10 +12,10 @@ 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 General Public License - along with GCC; see the file COPYING. If not, write to the Free - Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ + 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. */ #include #include diff --git a/sysdeps/arm/eabi/fesetenv.c b/sysdeps/arm/eabi/fesetenv.c index c47aa6582a..10bfa38c2c 100644 --- a/sysdeps/arm/eabi/fesetenv.c +++ b/sysdeps/arm/eabi/fesetenv.c @@ -12,10 +12,10 @@ 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 General Public License - along with GCC; see the file COPYING. If not, write to the Free - Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ + 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. */ #include #include diff --git a/sysdeps/arm/eabi/fesetround.c b/sysdeps/arm/eabi/fesetround.c index 5523522822..efa14b45ba 100644 --- a/sysdeps/arm/eabi/fesetround.c +++ b/sysdeps/arm/eabi/fesetround.c @@ -12,10 +12,10 @@ 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 General Public License - along with GCC; see the file COPYING. If not, write to the Free - Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ + 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. */ #include #include diff --git a/sysdeps/arm/eabi/fpu_control.h b/sysdeps/arm/eabi/fpu_control.h index 9d29994579..8b0fa14194 100644 --- a/sysdeps/arm/eabi/fpu_control.h +++ b/sysdeps/arm/eabi/fpu_control.h @@ -12,10 +12,10 @@ 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 General Public License - along with GCC; see the file COPYING. If not, write to the Free - Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ + 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 _FPU_CONTROL_H #define _FPU_CONTROL_H diff --git a/sysdeps/arm/eabi/fraiseexcpt.c b/sysdeps/arm/eabi/fraiseexcpt.c index 78441ec013..3a41b22540 100644 --- a/sysdeps/arm/eabi/fraiseexcpt.c +++ b/sysdeps/arm/eabi/fraiseexcpt.c @@ -12,10 +12,10 @@ 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 General Public License - along with GCC; see the file COPYING. If not, write to the Free - Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ + 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. */ #include #include diff --git a/sysdeps/arm/eabi/fsetexcptflg.c b/sysdeps/arm/eabi/fsetexcptflg.c index 28966bb8f6..a844854f6e 100644 --- a/sysdeps/arm/eabi/fsetexcptflg.c +++ b/sysdeps/arm/eabi/fsetexcptflg.c @@ -12,10 +12,10 @@ 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 General Public License - along with GCC; see the file COPYING. If not, write to the Free - Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ + 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. */ #include #include diff --git a/sysdeps/arm/eabi/ftestexcept.c b/sysdeps/arm/eabi/ftestexcept.c index 61b81cbb0e..144eef9c5e 100644 --- a/sysdeps/arm/eabi/ftestexcept.c +++ b/sysdeps/arm/eabi/ftestexcept.c @@ -12,10 +12,10 @@ 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 General Public License - along with GCC; see the file COPYING. If not, write to the Free - Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ + 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. */ #include #include diff --git a/sysdeps/arm/eabi/setjmp.S b/sysdeps/arm/eabi/setjmp.S index 92f83af3f8..0bc1a15471 100644 --- a/sysdeps/arm/eabi/setjmp.S +++ b/sysdeps/arm/eabi/setjmp.S @@ -12,10 +12,10 @@ 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 General Public License - along with GCC; see the file COPYING. If not, write to the Free - Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ + 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. */ #include #define _SETJMP_H diff --git a/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S b/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S index 2fa727dcfe..bac25635fa 100644 --- a/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S +++ b/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S @@ -11,10 +11,10 @@ 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 General Public License - along with GCC; see the file COPYING. If not, write to the Free - Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ + 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. */ #include diff --git a/sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S b/sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S index 423e7776ea..508b4babd7 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S +++ b/sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S @@ -11,10 +11,10 @@ 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 General Public License - along with GCC; see the file COPYING. If not, write to the Free - Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ + 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. */ #include From 738860089d5c510f3445f9830d9924ab58659c51 Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Mon, 21 Mar 2011 20:44:01 +0000 Subject: [PATCH 4069/4487] Create ARM unwind records for system call stubs. --- ChangeLog.arm | 27 +++++ .../sysv/linux/arm/eabi/nptl/sysdep-cancel.h | 103 +++++++++--------- sysdeps/unix/sysv/linux/arm/eabi/sysdep.h | 91 +++++++++++++++- sysdeps/unix/sysv/linux/arm/vfork.S | 23 +++- 4 files changed, 186 insertions(+), 58 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 346440446a..3f4ae8c5c0 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,30 @@ +2011-03-21 Ulrich Weigand + + * sysdeps/unix/sysv/arm/eabi/sysdep.h (DO_CALL): Do not save/restore + r7 into IP. + (DOARGS_0, UNDOARGS_0): Redefine to save/restore r7 to the stack. + Create appropriate ARM unwind record. + (DOARGS_1, UNDOARGS_1): Likewise. + (DOARGS_2, UNDOARGS_2): Likewise. + (DOARGS_3, UNDOARGS_3): Likewise. + (DOARGS_4, UNDOARGS_4): Likewise. + (DOARGS_5, UNDOARGS_5): Likewise. + (DOARGS_6, UNDOARGS_6): Likewise. + (DOARGS_7, UNDOARGS_7): Likewise. + * sysdeps/unix/sysv/arm/eabi/nptl/sysdep-cancel.h (PSEUDO): Adapt to + DO_CALL/DOARGS_xxx/UNDOARGS_xxx changes. + (RESTART_UNWIND): Likewise. + (DOCARGS_0, RESTORE_LR_0): Likewise. + (DOCARGS_1): Likewise. + (DOCARGS_2): Likewise. + (DOCARGS_3): Likewise. + (DOCARGS_4): Likewise. + (DOCARGS_5, UNDOCARGS_5, RESTORE_LR_5): Likewise. + (DOCARGS_6, UNDOCARGS_6): Likewise. + * sysdeps/unix/sysv/linux/arm/vfork.S (__vfork): Do no use DO_CALL to + call vfork. In the __ARM_EABI__ case, save r7 both to IP (to restore + from) and the stack (to create an ARM unwind record). + 2011-03-21 Joseph Myers * sysdeps/arm/eabi/__longjmp.S, sysdeps/arm/eabi/bits/fenv.h, diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h index 458558b9cf..f4a8af403a 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h @@ -47,20 +47,20 @@ DOARGS_##args; \ bne .Lpseudo_cancel; \ cfi_remember_state; \ - DO_CALL (syscall_name, 0); \ + ldr r7, =SYS_ify (syscall_name); \ + swi 0x0; \ UNDOARGS_##args; \ cmn r0, $4096; \ PSEUDO_RET; \ cfi_restore_state; \ .Lpseudo_cancel: \ - .fnstart; \ + .fnstart; /* matched by the .fnend in UNDOARGS below. */ \ DOCARGS_##args; /* save syscall args etc. around CENABLE. */ \ CENABLE; \ mov ip, r0; /* put mask in safe place. */ \ UNDOCARGS_##args; /* restore syscall args. */ \ ldr r7, =SYS_ify (syscall_name); \ swi 0x0; /* do the call. */ \ - .fnend; /* Past here we can't easily unwind. */ \ mov r7, r0; /* save syscall return value. */ \ mov r0, ip; /* get mask back. */ \ CDISABLE; \ @@ -69,34 +69,34 @@ UNDOARGS_##args; \ cmn r0, $4096 -/* DOARGS pushes four bytes on the stack for five arguments, eight bytes for - six arguments, and nothing for fewer. In order to preserve doubleword +/* DOARGS pushes eight bytes on the stack for five arguments, twelve bytes for + six arguments, and four bytes for fewer. In order to preserve doubleword alignment, sometimes we must save an extra register. */ # define RESTART_UNWIND \ .fnend; \ .fnstart; \ - .save {r7, lr} + .save {r7}; \ + .save {lr} # define DOCARGS_0 \ - stmfd sp!, {r7, lr}; \ - cfi_adjust_cfa_offset (8); \ - cfi_rel_offset (r7, 0); \ - cfi_rel_offset (lr, 4); \ - .save {r7, lr} + .save {r7}; \ + str lr, [sp, #-4]!; \ + cfi_adjust_cfa_offset (4); \ + cfi_rel_offset (lr, 0); \ + .save {lr} # define UNDOCARGS_0 # define RESTORE_LR_0 \ - ldmfd sp!, {r7, lr}; \ - cfi_adjust_cfa_offset (-8); \ - cfi_restore (r7); \ + ldr lr, [sp], #4; \ + cfi_adjust_cfa_offset (-4); \ cfi_restore (lr) # define DOCARGS_1 \ - stmfd sp!, {r0, r1, r7, lr}; \ - cfi_adjust_cfa_offset (16); \ - cfi_rel_offset (r7, 8); \ - cfi_rel_offset (lr, 12); \ - .save {r7, lr}; \ + .save {r7}; \ + stmfd sp!, {r0, r1, lr}; \ + cfi_adjust_cfa_offset (12); \ + cfi_rel_offset (lr, 8); \ + .save {lr}; \ .pad #8 # define UNDOCARGS_1 \ ldr r0, [sp], #8; \ @@ -106,11 +106,11 @@ RESTORE_LR_0 # define DOCARGS_2 \ - stmfd sp!, {r0, r1, r7, lr}; \ - cfi_adjust_cfa_offset (16); \ - cfi_rel_offset (r7, 8); \ - cfi_rel_offset (lr, 12); \ - .save {r7, lr}; \ + .save {r7}; \ + stmfd sp!, {r0, r1, lr}; \ + cfi_adjust_cfa_offset (12); \ + cfi_rel_offset (lr, 8); \ + .save {lr}; \ .pad #8 # define UNDOCARGS_2 \ ldmfd sp!, {r0, r1}; \ @@ -120,11 +120,11 @@ RESTORE_LR_0 # define DOCARGS_3 \ - stmfd sp!, {r0, r1, r2, r3, r7, lr}; \ - cfi_adjust_cfa_offset (24); \ - cfi_rel_offset (r7, 16); \ - cfi_rel_offset (lr, 20); \ - .save {r7, lr}; \ + .save {r7}; \ + stmfd sp!, {r0, r1, r2, r3, lr}; \ + cfi_adjust_cfa_offset (20); \ + cfi_rel_offset (lr, 16); \ + .save {lr}; \ .pad #16 # define UNDOCARGS_3 \ ldmfd sp!, {r0, r1, r2, r3}; \ @@ -134,11 +134,11 @@ RESTORE_LR_0 # define DOCARGS_4 \ - stmfd sp!, {r0, r1, r2, r3, r7, lr}; \ - cfi_adjust_cfa_offset (24); \ - cfi_rel_offset (r7, 16); \ - cfi_rel_offset (lr, 20); \ - .save {r7, lr}; \ + .save {r7}; \ + stmfd sp!, {r0, r1, r2, r3, lr}; \ + cfi_adjust_cfa_offset (20); \ + cfi_rel_offset (lr, 16); \ + .save {lr}; \ .pad #16 # define UNDOCARGS_4 \ ldmfd sp!, {r0, r1, r2, r3}; \ @@ -149,43 +149,40 @@ /* r4 is only stmfd'ed for correct stack alignment. */ # define DOCARGS_5 \ - .save {r4}; \ - stmfd sp!, {r0, r1, r2, r3, r4, r7, lr}; \ - cfi_adjust_cfa_offset (28); \ - cfi_rel_offset (r7, 20); \ - cfi_rel_offset (lr, 24); \ - .save {r7, lr}; \ + .save {r4, r7}; \ + stmfd sp!, {r0, r1, r2, r3, r4, lr}; \ + cfi_adjust_cfa_offset (24); \ + cfi_rel_offset (lr, 20); \ + .save {lr}; \ .pad #20 # define UNDOCARGS_5 \ ldmfd sp!, {r0, r1, r2, r3}; \ cfi_adjust_cfa_offset (-16); \ .fnend; \ .fnstart; \ - .save {r4}; \ - .save {r7, lr}; \ + .save {r4, r7}; \ + .save {lr}; \ .pad #4 # define RESTORE_LR_5 \ - ldmfd sp!, {r4, r7, lr}; \ - cfi_adjust_cfa_offset (-12); \ + ldmfd sp!, {r4, lr}; \ + cfi_adjust_cfa_offset (-8); \ /* r4 will be marked as restored later. */ \ - cfi_restore (r7); \ cfi_restore (lr) # define DOCARGS_6 \ - .save {r4, r5}; \ - stmfd sp!, {r0, r1, r2, r3, r7, lr}; \ - cfi_adjust_cfa_offset (24); \ - cfi_rel_offset (r7, 16); \ - cfi_rel_offset (lr, 20); \ - .save {r7, lr}; \ + .save {r4, r5, r7}; \ + stmfd sp!, {r0, r1, r2, r3, lr}; \ + cfi_adjust_cfa_offset (20); \ + cfi_rel_offset (lr, 16); \ + .save {lr}; \ .pad #16 # define UNDOCARGS_6 \ ldmfd sp!, {r0, r1, r2, r3}; \ cfi_adjust_cfa_offset (-16); \ .fnend; \ .fnstart; \ - .save {r4, r5}; \ - .save {r7, lr} + .save {r4, r5, r7}; \ + .save {lr}; # define RESTORE_LR_6 \ RESTORE_LR_0 diff --git a/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h b/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h index b7815babf4..a80621e142 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h @@ -106,12 +106,95 @@ #undef DO_CALL #define DO_CALL(syscall_name, args) \ DOARGS_##args; \ - mov ip, r7; \ - cfi_register (r7, ip); \ ldr r7, =SYS_ify (syscall_name); \ swi 0x0; \ - mov r7, ip; \ - cfi_restore (r7); \ UNDOARGS_##args +#undef DOARGS_0 +#define DOARGS_0 \ + .fnstart; \ + str r7, [sp, #-4]!; \ + cfi_adjust_cfa_offset (4); \ + cfi_rel_offset (r7, 0); \ + .save { r7 } +#undef DOARGS_1 +#define DOARGS_1 DOARGS_0 +#undef DOARGS_2 +#define DOARGS_2 DOARGS_0 +#undef DOARGS_3 +#define DOARGS_3 DOARGS_0 +#undef DOARGS_4 +#define DOARGS_4 DOARGS_0 +#undef DOARGS_5 +#define DOARGS_5 \ + .fnstart; \ + stmfd sp!, {r4, r7}; \ + cfi_adjust_cfa_offset (8); \ + cfi_rel_offset (r4, 0); \ + cfi_rel_offset (r7, 4); \ + .save { r4, r7 }; \ + ldr r4, [sp, #8] +#undef DOARGS_6 +#define DOARGS_6 \ + .fnstart; \ + mov ip, sp; \ + stmfd sp!, {r4, r5, r7}; \ + cfi_adjust_cfa_offset (12); \ + cfi_rel_offset (r4, 0); \ + cfi_rel_offset (r5, 4); \ + cfi_rel_offset (r7, 8); \ + .save { r4, r5, r7 }; \ + ldmia ip, {r4, r5} +#undef DOARGS_7 +#define DOARGS_7 \ + .fnstart; \ + mov ip, sp; \ + stmfd sp!, {r4, r5, r6, r7}; \ + cfi_adjust_cfa_offset (16); \ + cfi_rel_offset (r4, 0); \ + cfi_rel_offset (r5, 4); \ + cfi_rel_offset (r6, 8); \ + cfi_rel_offset (r7, 12); \ + .save { r4, r5, r6, r7 }; \ + ldmia ip, {r4, r5, r6} + +#undef UNDOARGS_0 +#define UNDOARGS_0 \ + ldr r7, [sp], #4; \ + cfi_adjust_cfa_offset (-4); \ + cfi_restore (r7); \ + .fnend +#undef UNDOARGS_1 +#define UNDOARGS_1 UNDOARGS_0 +#undef UNDOARGS_2 +#define UNDOARGS_2 UNDOARGS_0 +#undef UNDOARGS_3 +#define UNDOARGS_3 UNDOARGS_0 +#undef UNDOARGS_4 +#define UNDOARGS_4 UNDOARGS_0 +#undef UNDOARGS_5 +#define UNDOARGS_5 \ + ldmfd sp!, {r4, r7}; \ + cfi_adjust_cfa_offset (-8); \ + cfi_restore (r4); \ + cfi_restore (r7); \ + .fnend +#undef UNDOARGS_6 +#define UNDOARGS_6 \ + ldmfd sp!, {r4, r5, r7}; \ + cfi_adjust_cfa_offset (-12); \ + cfi_restore (r4); \ + cfi_restore (r5); \ + cfi_restore (r7); \ + .fnend +#undef UNDOARGS_7 +#define UNDOARGS_7 \ + ldmfd sp!, {r4, r5, r6, r7}; \ + cfi_adjust_cfa_offset (-16); \ + cfi_restore (r4); \ + cfi_restore (r5); \ + cfi_restore (r6); \ + cfi_restore (r7); \ + .fnend + #endif /* _LINUX_ARM_EABI_SYSDEP_H */ diff --git a/sysdeps/unix/sysv/linux/arm/vfork.S b/sysdeps/unix/sysv/linux/arm/vfork.S index a020658989..e63690eecb 100644 --- a/sysdeps/unix/sysv/linux/arm/vfork.S +++ b/sysdeps/unix/sysv/linux/arm/vfork.S @@ -33,7 +33,28 @@ ENTRY (__vfork) #ifdef SAVE_PID SAVE_PID #endif - DO_CALL (vfork, 0) +#ifdef __ARM_EABI__ + /* The DO_CALL macro saves r7 on the stack, to enable generation + of ARM unwind info. Since the stack is initially shared between + parent and child of vfork, that saved value could be corrupted. + To avoid this problem, we save r7 into ip as well, and restore + from there. */ + mov ip, r7 + cfi_register (r7, ip) + .fnstart + str r7, [sp, #-4]! + cfi_adjust_cfa_offset (4) + .save { r7 } + ldr r7, =SYS_ify (vfork) + swi 0x0 + .fnend + add sp, sp, #4 + cfi_adjust_cfa_offset (-4) + mov r7, ip + cfi_restore (r7); +#else + swi SYS_ify(vfork) +#endif #ifdef RESTORE_PID RESTORE_PID #endif From b53600e5ca4cf6a914a24246c0c71ba70be8dede Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Mon, 21 Mar 2011 20:44:55 +0000 Subject: [PATCH 4070/4487] [arm] Fix bug in _nocancel system call stubs. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h | 1 + 2 files changed, 6 insertions(+) diff --git a/ChangeLog.arm b/ChangeLog.arm index 3f4ae8c5c0..dd5767d55c 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2011-03-21 Ulrich Weigand + + * sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h (PSEUDO): Add + missing "cmn r0, $4096" for _nocancel system call stubs. + 2011-03-21 Ulrich Weigand * sysdeps/unix/sysv/arm/eabi/sysdep.h (DO_CALL): Do not save/restore diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h index f4a8af403a..3fadebde72 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h @@ -39,6 +39,7 @@ .cfi_sections .debug_frame; \ cfi_startproc; \ DO_CALL (syscall_name, args); \ + cmn r0, $4096; \ PSEUDO_RET; \ cfi_endproc; \ .size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel; \ From ea4774c3f3bafeb2b77593ada2d9e93bb5aef710 Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Mon, 21 Mar 2011 20:46:01 +0000 Subject: [PATCH 4071/4487] [arm] Remove linuxthreads support. --- ChangeLog.arm | 6 + sysdeps/arm/linuxthreads/pspinlock.c | 82 --------- sysdeps/arm/linuxthreads/pt-machine.h | 55 ------ sysdeps/arm/linuxthreads/tls.h | 172 ------------------ .../arm/eabi/linuxthreads/sysdep-cancel.h | 116 ------------ .../unix/sysv/linux/arm/linuxthreads/fork.c | 1 - .../linux/arm/linuxthreads/sysdep-cancel.h | 129 ------------- .../unix/sysv/linux/arm/linuxthreads/vfork.S | 78 -------- 8 files changed, 6 insertions(+), 633 deletions(-) delete mode 100644 sysdeps/arm/linuxthreads/pspinlock.c delete mode 100644 sysdeps/arm/linuxthreads/pt-machine.h delete mode 100644 sysdeps/arm/linuxthreads/tls.h delete mode 100644 sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h delete mode 100644 sysdeps/unix/sysv/linux/arm/linuxthreads/fork.c delete mode 100644 sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h delete mode 100644 sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S diff --git a/ChangeLog.arm b/ChangeLog.arm index dd5767d55c..805ab1a2c8 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,9 @@ +2011-03-21 Ulrich Weigand + + * sysdeps/arm/linuxthreads: Remove directory. + * sysdeps/unix/sysv/linux/arm/linuxthreads: Likewise. + * sysdeps/unix/sysv/linux/arm/eabi/linuxthreads: Likewise. + 2011-03-21 Ulrich Weigand * sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h (PSEUDO): Add diff --git a/sysdeps/arm/linuxthreads/pspinlock.c b/sysdeps/arm/linuxthreads/pspinlock.c deleted file mode 100644 index 665e270b69..0000000000 --- a/sysdeps/arm/linuxthreads/pspinlock.c +++ /dev/null @@ -1,82 +0,0 @@ -/* POSIX spinlock implementation. Arm version. - Copyright (C) 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 - 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; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include -#include -#include "internals.h" - - -int -__pthread_spin_lock (pthread_spinlock_t *lock) -{ - unsigned int val; - - do - asm volatile ("swp %0, %1, [%2]" - : "=r" (val) - : "0" (1), "r" (lock) - : "memory"); - while (val != 0); - - return 0; -} -weak_alias (__pthread_spin_lock, pthread_spin_lock) - - -int -__pthread_spin_trylock (pthread_spinlock_t *lock) -{ - unsigned int val; - - asm volatile ("swp %0, %1, [%2]" - : "=r" (val) - : "0" (1), "r" (lock) - : "memory"); - - return val ? EBUSY : 0; -} -weak_alias (__pthread_spin_trylock, pthread_spin_trylock) - - -int -__pthread_spin_unlock (pthread_spinlock_t *lock) -{ - return *lock = 0; -} -weak_alias (__pthread_spin_unlock, pthread_spin_unlock) - - -int -__pthread_spin_init (pthread_spinlock_t *lock, int pshared) -{ - /* We can ignore the `pshared' parameter. Since we are busy-waiting - all processes which can access the memory location `lock' points - to can use the spinlock. */ - return *lock = 0; -} -weak_alias (__pthread_spin_init, pthread_spin_init) - - -int -__pthread_spin_destroy (pthread_spinlock_t *lock) -{ - /* Nothing to do. */ - return 0; -} -weak_alias (__pthread_spin_destroy, pthread_spin_destroy) diff --git a/sysdeps/arm/linuxthreads/pt-machine.h b/sysdeps/arm/linuxthreads/pt-machine.h deleted file mode 100644 index a4c2f314cb..0000000000 --- a/sysdeps/arm/linuxthreads/pt-machine.h +++ /dev/null @@ -1,55 +0,0 @@ -/* Machine-dependent pthreads configuration and inline functions. - ARM version. - Copyright (C) 1997, 1998, 2000, 2002, 2003 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Philip Blundell . - - 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; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _PT_MACHINE_H -#define _PT_MACHINE_H 1 - -#ifndef PT_EI -# define PT_EI extern inline __attribute__ ((always_inline)) -#endif - -extern long int testandset (int *spinlock); -extern int __compare_and_swap (long int *p, long int oldval, long int newval); - -/* This will not work on ARM1 or ARM2 because SWP is lacking on those - machines. Unfortunately we have no way to detect this at compile - time; let's hope nobody tries to use one. */ - -/* Spinlock implementation; required. */ -PT_EI long int -testandset (int *spinlock) -{ - register unsigned int ret; - - __asm__ __volatile__("swp %0, %1, [%2]" - : "=r"(ret) - : "0"(1), "r"(spinlock)); - - return ret; -} - - -/* Get some notion of the current stack. Need not be exactly the top - of the stack, just something somewhere in the current frame. */ -#define CURRENT_STACK_FRAME stack_pointer -register char * stack_pointer __asm__ ("sp"); - -#endif /* pt-machine.h */ diff --git a/sysdeps/arm/linuxthreads/tls.h b/sysdeps/arm/linuxthreads/tls.h deleted file mode 100644 index 8057a54137..0000000000 --- a/sysdeps/arm/linuxthreads/tls.h +++ /dev/null @@ -1,172 +0,0 @@ -/* Definitions for thread-local data handling. linuxthreads/ARM version. - Copyright (C) 2004 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 _TLS_H -#define _TLS_H - -#ifndef __ASSEMBLER__ - -# include -# include -# include - -/* Type for the dtv. */ -typedef union dtv -{ - size_t counter; - struct - { - void *val; - bool is_static; - } pointer; -} dtv_t; - -typedef struct -{ - dtv_t *dtv; - - /* Reserved for the thread implementation. Unused in LinuxThreads. */ - void *private; -} tcbhead_t; -#endif - - -/* We can support TLS only if the floating-stack support is available. - However, we want to compile in the support and test at runtime whether - the running kernel can support it or not. To avoid bothering with the - TLS support code at all, use configure --without-tls. - - We need USE_TLS to be consistently defined, for ldsodefs.h conditionals. - But some of the code below can cause problems in building libpthread - (e.g. useldt.h will defined FLOATING_STACKS when it shouldn't). */ - -/* LinuxThreads can only support TLS if both floating stacks and support - from the tools are available. - - We have to define USE_TLS consistently, or ldsodefs.h will lay out types - differently between an NPTL build and a LinuxThreads build. It can be set - for libc.so and not libpthread.so, but only if we provide appropriate padding - in the _pthread_descr_struct. - - Currently nothing defines FLOATING_STACKS. We could assume this based on - kernel version once the TLS patches are available in kernel.org. - - To avoid bothering with the TLS support code at all, use configure - --without-tls. */ - -#if defined HAVE_TLS_SUPPORT \ - && (defined FLOATING_STACKS || !defined IS_IN_libpthread) - -/* Signal that TLS support is available. */ -# define USE_TLS 1 - -/* Include padding in _pthread_descr_struct so that libc can find p_errno, - if libpthread will only include the padding because of the !IS_IN_libpthread - check. */ -#ifndef FLOATING_STACKS -# define INCLUDE_TLS_PADDING 1 -#endif - -# ifndef __ASSEMBLER__ -/* Get system call information. */ -# include - -/* This is the size of the initial TCB. */ -# define TLS_INIT_TCB_SIZE sizeof (tcbhead_t) - -/* Alignment requirements for the initial TCB. */ -# define TLS_INIT_TCB_ALIGN __alignof__ (tcbhead_t) - -/* This is the size of the TCB. */ -# define TLS_TCB_SIZE sizeof (tcbhead_t) - -/* Alignment requirements for the TCB. */ -# define TLS_TCB_ALIGN __alignof__ (tcbhead_t) - -/* This is the size we need before TCB. */ -# define TLS_PRE_TCB_SIZE sizeof (struct _pthread_descr_struct) - -/* The DTV is allocated at the TP; the TCB is placed elsewhere. */ -# define TLS_DTV_AT_TP 1 - -/* Install the dtv pointer. The pointer passed is to the element with - index -1 which contain the length. */ -# define INSTALL_DTV(TCBP, DTVP) \ - (((tcbhead_t *) (TCBP))->dtv = (DTVP) + 1) - -/* Install new dtv for current thread. */ -# define INSTALL_NEW_DTV(DTV) \ - (((tcbhead_t *)__builtin_thread_pointer ())->dtv = (DTV)) - -/* Return dtv of given thread descriptor. */ -# define GET_DTV(TCBP) \ - (((tcbhead_t *) (TCBP))->dtv) - -/* Code to initially initialize the thread pointer. This might need - special attention since 'errno' is not yet available and if the - operation can cause a failure 'errno' must not be touched. */ -# define TLS_INIT_TP(TCBP, SECONDCALL) \ - ({ INTERNAL_SYSCALL_DECL (err); \ - long result_var; \ - result_var = INTERNAL_SYSCALL_ARM (set_tls, err, 1, (TCBP)); \ - INTERNAL_SYSCALL_ERROR_P (result_var, err) \ - ? "unknown error" : NULL; }) - -/* Return the address of the dtv for the current thread. */ -# define THREAD_DTV() \ - (((tcbhead_t *)__builtin_thread_pointer ())->dtv) - -/* Return the thread descriptor for the current thread. */ -# undef THREAD_SELF -# define THREAD_SELF \ - ((pthread_descr)__builtin_thread_pointer () - 1) - -# undef INIT_THREAD_SELF -# define INIT_THREAD_SELF(DESCR, NR) \ - TLS_INIT_TP ((struct _pthread_descr_struct *)(DESCR) + 1, 0) - -/* Get the thread descriptor definition. */ -# include - -/* ??? Generic bits of LinuxThreads may call these macros with - DESCR set to NULL. We are expected to be able to reference - the "current" value. - - In our case, we'd really prefer to use DESCR, since lots of - PAL_code calls would be expensive. We can only trust that - the compiler does its job and unifies the multiple - __builtin_thread_pointer instances. */ - -#define THREAD_GETMEM(descr, member) \ - ((void) sizeof (descr), THREAD_SELF->member) -#define THREAD_GETMEM_NC(descr, member) \ - ((void) sizeof (descr), THREAD_SELF->member) -#define THREAD_SETMEM(descr, member, value) \ - ((void) sizeof (descr), THREAD_SELF->member = (value)) -#define THREAD_SETMEM_NC(descr, member, value) \ - ((void) sizeof (descr), THREAD_SELF->member = (value)) - -/* Initializing the thread pointer will generate a SIGILL if the syscall - is not available. */ -#define TLS_INIT_TP_EXPENSIVE 1 - -# endif /* HAVE_TLS_SUPPORT */ -#endif /* __ASSEMBLER__ */ - -#endif /* tls.h */ diff --git a/sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h deleted file mode 100644 index bc520426ef..0000000000 --- a/sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h +++ /dev/null @@ -1,116 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include -#ifndef __ASSEMBLER__ -# include -#endif - -#if !defined NOT_IN_libc || defined IS_IN_libpthread - -# undef PSEUDO -# define PSEUDO(name, syscall_name, args) \ - .section ".text"; \ - PSEUDO_PROLOGUE; \ - ENTRY (name); \ - SINGLE_THREAD_P; \ - DOARGS_##args; \ - bne .Lpseudo_cancel; \ - mov ip, r7; \ - ldr r7, =SYS_ify (syscall_name); \ - swi 0x0; \ - mov r7, ip; \ - UNDOARGS_##args; \ - cmn r0, $4096; \ - PSEUDO_RET; \ - .Lpseudo_cancel: \ - DOCARGS_##args; /* save syscall args etc. around CENABLE. */ \ - CENABLE; \ - mov ip, r0; /* put mask in safe place. */ \ - UNDOCARGS_##args; /* restore syscall args. */ \ - ldr r7, =SYS_ify (syscall_name); \ - swi 0x0; /* do the call. */ \ - mov r7, r0; /* save syscall return value. */ \ - mov r0, ip; /* get mask back. */ \ - CDISABLE; \ - mov r0, r7; /* retrieve return value. */ \ - RESTORE_LR_##args; \ - UNDOARGS_##args; \ - cmn r0, $4096; - -/* DOARGS pushes four bytes on the stack for five arguments, eight bytes for - six arguments, and nothing for fewer. In order to preserve doubleword - alignment, sometimes we must save an extra register. */ - -# define DOCARGS_0 stmfd sp!, {r7, lr} -# define UNDOCARGS_0 -# define RESTORE_LR_0 ldmfd sp!, {r7, lr} - -# define DOCARGS_1 stmfd sp!, {r0, r1, r7, lr} -# define UNDOCARGS_1 ldr r0, [sp], #8 -# define RESTORE_LR_1 RESTORE_LR_0 - -# define DOCARGS_2 stmfd sp!, {r0, r1, r7, lr} -# define UNDOCARGS_2 ldmfd sp!, {r0, r1} -# define RESTORE_LR_2 RESTORE_LR_0 - -# define DOCARGS_3 stmfd sp!, {r0, r1, r2, r3, r7, lr} -# define UNDOCARGS_3 ldmfd sp!, {r0, r1, r2, r3} -# define RESTORE_LR_3 RESTORE_LR_0 - -# define DOCARGS_4 stmfd sp!, {r0, r1, r2, r3, r7, lr} -# define UNDOCARGS_4 ldmfd sp!, {r0, r1, r2, r3} -# define RESTORE_LR_4 RESTORE_LR_0 - -# define DOCARGS_5 stmfd sp!, {r0, r1, r2, r3, r4, r7, lr} -# define UNDOCARGS_5 ldmfd sp!, {r0, r1, r2, r3} -# define RESTORE_LR_5 ldmfd sp!, {r4, r7, lr} - -# define DOCARGS_6 stmfd sp!, {r0, r1, r2, r3, r7, lr} -# define UNDOCARGS_6 ldmfd sp!, {r0, r1, r2, r3} -# define RESTORE_LR_6 RESTORE_LR_0 - -# ifdef IS_IN_libpthread -# define CENABLE bl PLTJMP(__pthread_enable_asynccancel) -# define CDISABLE bl PLTJMP(__pthread_disable_asynccancel) -# define __local_multiple_threads __pthread_multiple_threads -# else -# define CENABLE bl PLTJMP(__libc_enable_asynccancel) -# define CDISABLE bl PLTJMP(__libc_disable_asynccancel) -# define __local_multiple_threads __libc_multiple_threads -# endif - -# ifndef __ASSEMBLER__ -extern int __local_multiple_threads attribute_hidden; -# define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1) -# else -# define SINGLE_THREAD_P \ - ldr ip, 1b; \ -2: \ - ldr ip, [pc, ip]; \ - teq ip, #0; -# define PSEUDO_PROLOGUE \ - 1: .word __local_multiple_threads - 2f - 8; -# endif - -#else - -/* For rtld, et cetera. */ -# define SINGLE_THREAD_P 1 - -#endif diff --git a/sysdeps/unix/sysv/linux/arm/linuxthreads/fork.c b/sysdeps/unix/sysv/linux/arm/linuxthreads/fork.c deleted file mode 100644 index 4fb0db2be9..0000000000 --- a/sysdeps/unix/sysv/linux/arm/linuxthreads/fork.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h deleted file mode 100644 index b35d34728d..0000000000 --- a/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h +++ /dev/null @@ -1,129 +0,0 @@ -/* Copyright (C) 2003, 2005 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Phil Blundell , 2003. - - 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. */ - -#include -#ifndef __ASSEMBLER__ -# include -#endif - -#if !defined NOT_IN_libc || defined IS_IN_libpthread - -/* We push lr onto the stack, so we have to use ldmib instead of ldmia - to find the saved arguments. */ -# ifdef PIC -# undef DOARGS_5 -# undef DOARGS_6 -# undef DOARGS_7 -# define DOARGS_5 str r4, [sp, $-4]!; ldr r4, [sp, $8]; -# define DOARGS_6 mov ip, sp; stmfd sp!, {r4, r5}; ldmib ip, {r4, r5}; -# define DOARGS_7 mov ip, sp; stmfd sp!, {r4, r5, r6}; ldmib ip, {r4, r5, r6}; -# endif - -# undef PSEUDO_RET -# define PSEUDO_RET \ - ldrcc pc, [sp], $4; \ - ldr lr, [sp], $4; \ - b PLTJMP(SYSCALL_ERROR) - -# undef PSEUDO -# define PSEUDO(name, syscall_name, args) \ - .section ".text"; \ - PSEUDO_PROLOGUE; \ - ENTRY (name); \ - SINGLE_THREAD_P; \ - bne .Lpseudo_cancel; \ - DO_CALL (syscall_name, args); \ - cmn r0, $4096; \ - RETINSTR(cc, lr); \ - b PLTJMP(SYSCALL_ERROR); \ - .Lpseudo_cancel: \ - str lr, [sp, $-4]!; \ - DOCARGS_##args; /* save syscall args around CENABLE. */ \ - CENABLE; \ - mov ip, r0; /* put mask in safe place. */ \ - UNDOCARGS_##args; /* restore syscall args. */ \ - swi SYS_ify (syscall_name); /* do the call. */ \ - str r0, [sp, $-4]!; /* save syscall return value. */ \ - mov r0, ip; /* get mask back. */ \ - CDISABLE; \ - ldr r0, [sp], $4; /* retrieve return value. */ \ - UNDOC2ARGS_##args; /* fix register damage. */ \ - cmn r0, $4096; - -# define DOCARGS_0 -# define UNDOCARGS_0 -# define UNDOC2ARGS_0 - -# define DOCARGS_1 str r0, [sp, #-4]!; -# define UNDOCARGS_1 ldr r0, [sp], #4; -# define UNDOC2ARGS_1 - -# define DOCARGS_2 str r1, [sp, #-4]!; str r0, [sp, #-4]!; -# define UNDOCARGS_2 ldr r0, [sp], #4; ldr r1, [sp], #4; -# define UNDOC2ARGS_2 - -# define DOCARGS_3 str r2, [sp, #-4]!; str r1, [sp, #-4]!; str r0, [sp, #-4]!; -# define UNDOCARGS_3 ldr r0, [sp], #4; ldr r1, [sp], #4; ldr r2, [sp], #4 -# define UNDOC2ARGS_3 - -# define DOCARGS_4 stmfd sp!, {r0-r3} -# define UNDOCARGS_4 ldmfd sp!, {r0-r3} -# define UNDOC2ARGS_4 - -# define DOCARGS_5 stmfd sp!, {r0-r3} -# define UNDOCARGS_5 ldmfd sp, {r0-r3}; str r4, [sp, #-4]!; ldr r4, [sp, #24] -# define UNDOC2ARGS_5 ldr r4, [sp], #20 - -# ifdef IS_IN_libpthread -# define CENABLE bl PLTJMP(__pthread_enable_asynccancel) -# define CDISABLE bl PLTJMP(__pthread_disable_asynccancel) -# define __local_multiple_threads __pthread_multiple_threads -# else -# define CENABLE bl PLTJMP(__libc_enable_asynccancel) -# define CDISABLE bl PLTJMP(__libc_disable_asynccancel) -# define __local_multiple_threads __libc_multiple_threads -# endif - -# ifndef __ASSEMBLER__ -extern int __local_multiple_threads attribute_hidden; -# define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1) -# else -# if !defined PIC -# define SINGLE_THREAD_P \ - ldr ip, =__local_multiple_threads; \ - ldr ip, [ip]; \ - teq ip, #0; -# define PSEUDO_PROLOGUE -# else -# define SINGLE_THREAD_P \ - ldr ip, 1b; \ -2: \ - ldr ip, [pc, ip]; \ - teq ip, #0; -# define PSEUDO_PROLOGUE \ - 1: .word __local_multiple_threads - 2f - 8; -# endif -# endif - -#elif !defined __ASSEMBLER__ - -/* This code should never be used but we define it anyhow. */ -# define SINGLE_THREAD_P (1) - -#endif diff --git a/sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S b/sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S deleted file mode 100644 index b826a99ad5..0000000000 --- a/sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S +++ /dev/null @@ -1,78 +0,0 @@ -/* Copyright (C) 1999, 2002, 2003, 2005 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Philip Blundell . - - 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. */ - -#include -#define _ERRNO_H 1 -#include -#include - -/* Clone the calling process, but without copying the whole address space. - The calling process is suspended until the new process exits or is - replaced by a call to `execve'. Return -1 for errors, 0 to the new process, - and the process ID of the new process to the old process. */ - -ENTRY (__vfork) - -#ifdef __NR_vfork - -#ifdef SHARED - ldr ip, 1f - ldr r0, 2f -3: add ip, pc, ip - ldr r0, [ip, r0] -#else - ldr r0, 1f -#endif - movs r0, r0 - bne HIDDEN_JUMPTARGET (__fork) - - DO_CALL (vfork, 0) - cmn a1, #4096 - RETINSTR(cc, lr) - -#ifndef __ASSUME_VFORK_SYSCALL - /* Check if vfork syscall is known at all. */ - cmn a1, #ENOSYS - bne PLTJMP(C_SYMBOL_NAME(__syscall_error)) -#endif - -#endif - -#ifndef __ASSUME_VFORK_SYSCALL - /* If we don't have vfork, fork is close enough. */ - DO_CALL (fork, 0) - cmn a1, #4096 - RETINSTR(cc, lr) -#elif !defined __NR_vfork -# error "__NR_vfork not available and __ASSUME_VFORK_SYSCALL defined" -#endif - b PLTJMP(C_SYMBOL_NAME(__syscall_error)) - -#ifdef SHARED -1: .word _GLOBAL_OFFSET_TABLE_ - 3b - 8 -2: .word __libc_pthread_functions(GOTOFF) -#else - .weak pthread_create -1: .word pthread_create -#endif - -PSEUDO_END (__vfork) -libc_hidden_def (__vfork) - -weak_alias (__vfork, vfork) From 8825867bdd4b0acb81f91729f54e202529581108 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 22 Mar 2011 20:42:13 +0000 Subject: [PATCH 4072/4487] Update MIPS dl-lookup.c from generic version. --- ChangeLog.mips | 4 ++++ sysdeps/mips/dl-lookup.c | 18 ++++++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 0c2285f137..8a72ec5702 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,7 @@ +2011-03-22 Joseph Myers + + * sysdeps/mips/dl-lookup.c: Update from generic version. + 2011-01-25 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/mman.h (MADV_HUGEPAGE, diff --git a/sysdeps/mips/dl-lookup.c b/sysdeps/mips/dl-lookup.c index 4090efeac1..50d42fcf96 100644 --- a/sysdeps/mips/dl-lookup.c +++ b/sysdeps/mips/dl-lookup.c @@ -1,7 +1,6 @@ /* Look up a symbol in the loaded objects. MIPS/Linux version - special handling of non-PIC undefined symbol rules. - Copyright (C) 1995-2005, 2006, 2007, 2009, 2010 - Free Software Foundation, Inc. + Copyright (C) 1995-2007, 2009, 2010, 2011 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 @@ -381,8 +380,19 @@ do_lookup_x (const char *undef_name, uint_fast32_t new_hash, if (entries[idx].hashval == new_hash && strcmp (entries[idx].name, undef_name) == 0) { - result->s = entries[idx].sym; - result->m = (struct link_map *) entries[idx].map; + if ((type_class & ELF_RTYPE_CLASS_COPY) != 0) + { + /* We possibly have to initialize the central + copy from the copy addressed through the + relocation. */ + result->s = sym; + result->m = (struct link_map *) map; + } + else + { + result->s = entries[idx].sym; + result->m = (struct link_map *) entries[idx].map; + } __rtld_lock_unlock_recursive (tab->lock); return 1; } From 39262cc898cdb3f6e26195aceb4e07c2b5c81df8 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 28 Mar 2011 14:44:49 -0700 Subject: [PATCH 4073/4487] [alpha] Fix wrong register use in ____longjmp_chk. --- ChangeLog.alpha | 5 +++++ .../unix/sysv/linux/alpha/____longjmp_chk.S | 21 ++++++++++++------- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 82384ac7e1..55f8768987 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,8 @@ +2011-03-28 Aurelien Jarno + + * sysdeps/unix/sysv/linux/alpha/____longjmp_chk.S(____longjmp_chk): + Fix wrong register in stack pointer comparison. + 2011-03-01 Aurelien Jarno * sysdeps/alpha/fpu/feupdateenv.c (feupdateenv): Add libm_hidden_def. diff --git a/sysdeps/unix/sysv/linux/alpha/____longjmp_chk.S b/sysdeps/unix/sysv/linux/alpha/____longjmp_chk.S index 5194ed818c..53eb0f2c51 100644 --- a/sysdeps/unix/sysv/linux/alpha/____longjmp_chk.S +++ b/sysdeps/unix/sysv/linux/alpha/____longjmp_chk.S @@ -1,4 +1,5 @@ -/* Copyright (C) 1992, 1994, 1997, 2006, 2010 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1994, 1997, 2006, 2010, 2011 + 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 @@ -58,11 +59,17 @@ ____longjmp_chk: PTR_DEMANGLE2(s3, t1) PTR_DEMANGLE2(fp, t1) #endif - cmpule t0, sp, t1 - bne t1, .Lfail + /* ??? While this is a proper test for detecting a longjmp to an + invalid frame within any given stack, the main thread stack is + located *below* almost everything in the address space. Which + means that the test at Lfail vs the signal stack will almost + certainly never pass. We ought bounds check top and bottom of + the current thread's stack. */ + cmpule s3, sp, t1 + bne t1, $Lfail .align 4 -.Lok: +$Lok: mov s0, a0 mov s1, v0 mov s3, t0 @@ -103,7 +110,7 @@ ____longjmp_chk: ret .align 4 -.Lfail: +$Lfail: cfi_restore_state lda v0, __NR_sigaltstack lda a0, 0 @@ -118,13 +125,13 @@ ____longjmp_chk: cfi_adjust_cfa_offset(-32) /* Without working sigaltstack we cannot perform the test. */ - bne a3, .Lok + bne a3, $Lok addq t0, t2, t0 /* t0 = ss_sp + ss_size */ subq t0, s3, t0 /* t0 = (ss_sp + ss_size) - new_sp */ cmpule t2, t0, t0 /* t0 = (t0 >= ss_size) */ and t0, t1, t0 /* t0 = (t0 >= ss_size) & (ss_flags & SS_ONSTACK) */ - bne t0, .Lok + bne t0, $Lok ldah a0, longjmp_msg(gp) !gprelhigh lda a0, longjmp_msg(a0) !gprellow From 6d9a4e5564565cecbf6aae27570cf44ebe9a0fcd Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 1 Apr 2011 16:04:38 +0000 Subject: [PATCH 4074/4487] Properly define MIPS n64 sync_file_range. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog.mips b/ChangeLog.mips index 8a72ec5702..c811fd73e2 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2011-04-01 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list: Add + sync_file_range. + 2011-03-22 Joseph Myers * sysdeps/mips/dl-lookup.c: Update from generic version. diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list b/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list index 2c8c4d4842..2404709eec 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list @@ -1,5 +1,7 @@ # File name Caller Syscall name # args Strong name Weak names +sync_file_range - sync_file_range i:iiii sync_file_range + prlimit EXTRA prlimit64 i:iipp prlimit prlimit64 fanotify_mark EXTRA fanotify_mark i:iiiis fanotify_mark From 0f53d140ec86a1a97722d922e2db5d38b4397388 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 1 Apr 2011 16:11:19 +0000 Subject: [PATCH 4075/4487] Make MIPS fallocate, fallocate64 and sync_file_range cancellation points. --- ChangeLog.mips | 11 ++++++++ .../sysv/linux/mips/mips32/sync_file_range.c | 25 ++++++++++++++----- .../sysv/linux/mips/mips64/n32/fallocate.c | 16 +++++++++--- .../sysv/linux/mips/mips64/n32/fallocate64.c | 16 +++++++++--- .../sysv/linux/mips/mips64/n32/syscalls.list | 2 +- .../sysv/linux/mips/mips64/n64/syscalls.list | 2 +- 6 files changed, 58 insertions(+), 14 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index c811fd73e2..04cab0c676 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,14 @@ +2011-04-01 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c: Make + cancelable. + * sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c: Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c: Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list: Mark + sync_file_range as cancellation point. + * sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list: Mark + sync_file_range as cancellation point. + 2011-04-01 Joseph Myers * sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list: Add diff --git a/sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c b/sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c index 13a21b0dac..21da50e3e6 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c +++ b/sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c @@ -1,5 +1,5 @@ /* Selective file content synch'ing. - Copyright (C) 2006, 2007 Free Software Foundation, Inc. + Copyright (C) 2006, 2007, 2011 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 @@ -21,7 +21,7 @@ #include #include -#include +#include #include @@ -29,10 +29,23 @@ int sync_file_range (int fd, __off64_t from, __off64_t to, unsigned int flags) { - return INLINE_SYSCALL (sync_file_range, 7, fd, 0, - __LONG_LONG_PAIR ((long) (from >> 32), (long) from), - __LONG_LONG_PAIR ((long) (to >> 32), (long) to), - flags); + if (SINGLE_THREAD_P) + return INLINE_SYSCALL (sync_file_range, 7, fd, 0, + __LONG_LONG_PAIR ((long) (from >> 32), (long) from), + __LONG_LONG_PAIR ((long) (to >> 32), (long) to), + flags); + + int result; + int oldtype = LIBC_CANCEL_ASYNC (); + + result = INLINE_SYSCALL (sync_file_range, 7, fd, 0, + __LONG_LONG_PAIR ((long) (from >> 32), (long) from), + __LONG_LONG_PAIR ((long) (to >> 32), (long) to), + flags); + + LIBC_CANCEL_RESET (oldtype); + + return result; } #else int diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c b/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c index f973250ded..0aecba10e8 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2007, 2009 Free Software Foundation, Inc. +/* Copyright (C) 2007, 2009, 2011 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 @@ -18,7 +18,7 @@ #include #include -#include +#include /* Reserve storage for the data of the file associated with FD. */ @@ -26,7 +26,17 @@ int fallocate (int fd, int mode, __off_t offset, __off_t len) { #ifdef __NR_fallocate - return INLINE_SYSCALL (fallocate, 4, fd, mode, offset, len); + if (SINGLE_THREAD_P) + return INLINE_SYSCALL (fallocate, 4, fd, mode, offset, len); + + int result; + int oldtype = LIBC_CANCEL_ASYNC (); + + result = INLINE_SYSCALL (fallocate, 4, fd, mode, offset, len); + + LIBC_CANCEL_RESET (oldtype); + + return result; #else __set_errno (ENOSYS); return -1; diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c b/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c index 1f37f9121a..670cb0e32c 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2007, 2009 Free Software Foundation, Inc. +/* Copyright (C) 2007, 2009, 2011 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 @@ -18,7 +18,7 @@ #include #include -#include +#include /* Reserve storage for the data of the file associated with FD. */ @@ -26,7 +26,17 @@ int fallocate64 (int fd, int mode, __off64_t offset, __off64_t len) { #ifdef __NR_fallocate - return INLINE_SYSCALL (fallocate, 4, fd, mode, offset, len); + if (SINGLE_THREAD_P) + return INLINE_SYSCALL (fallocate, 4, fd, mode, offset, len); + + int result; + int oldtype = LIBC_CANCEL_ASYNC (); + + result = INLINE_SYSCALL (fallocate, 4, fd, mode, offset, len); + + LIBC_CANCEL_RESET (oldtype); + + return result; #else __set_errno (ENOSYS); return -1; diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list b/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list index 87c1949901..0d37a9b48d 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list @@ -1,7 +1,7 @@ # File name Caller Syscall name # args Strong name Weak names readahead - readahead i:iii __readahead readahead -sync_file_range - sync_file_range i:iiii sync_file_range +sync_file_range - sync_file_range Ci:iiii sync_file_range ftruncate - ftruncate i:ii __ftruncate ftruncate ftruncate64 __ftruncate64 truncate - truncate i:si truncate truncate64 diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list b/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list index 2404709eec..8d70e457f1 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list @@ -1,6 +1,6 @@ # File name Caller Syscall name # args Strong name Weak names -sync_file_range - sync_file_range i:iiii sync_file_range +sync_file_range - sync_file_range Ci:iiii sync_file_range prlimit EXTRA prlimit64 i:iipp prlimit prlimit64 From 82be5f39a034bcbfedba2f20139438bad3a9e2ee Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 1 Apr 2011 16:18:40 +0000 Subject: [PATCH 4076/4487] Add name_to_handle_at, open_by_handle etc. to ARM bits/fcntl.h. --- ChangeLog.arm | 6 +++ sysdeps/unix/sysv/linux/arm/bits/fcntl.h | 48 +++++++++++++++++++++--- 2 files changed, 49 insertions(+), 5 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 805ab1a2c8..a55e6a03fe 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,9 @@ +2011-04-01 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Define struct + file_handle and MAX_HANDLE_SZ. Declare name_to_handle_at and + open_by_handle. Augment a few comments. + 2011-03-21 Ulrich Weigand * sysdeps/arm/linuxthreads: Remove directory. diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h index 952ae05b38..6a5f89ad1f 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 1995-1998, 2000, 2004, 2006, 2007, 2009, 2010 + Copyright (C) 1995-1998, 2000, 2004, 2006, 2007, 2009, 2010, 2011 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -232,6 +232,19 @@ struct f_owner_ex we splice from/to). */ # define SPLICE_F_MORE 4 /* Expect more data. */ # define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */ + + +/* File handle structure. */ +struct file_handle +{ + unsigned int handle_bytes; + int handle_type; + /* File identifier. */ + unsigned char f_handle[0]; +}; + +/* Maximum handle size (for now). */ +# define MAX_HANDLE_SZ 128 #endif __BEGIN_DECLS @@ -248,20 +261,32 @@ extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count, unsigned int __flags); -/* Splice address range into a pipe. */ +/* Splice address range into a pipe. + + This function is a possible cancellation point and therefore not + marked with __THROW. */ extern ssize_t vmsplice (int __fdout, const struct iovec *__iov, size_t __count, unsigned int __flags); -/* Splice two files together. */ +/* Splice two files together. + + This function is a possible cancellation point and therefore not + marked with __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. */ +/* In-kernel implementation of tee for pipe buffers. + + This function is a possible cancellation point and therefore not + marked with __THROW. */ extern ssize_t tee (int __fdin, int __fdout, size_t __len, unsigned int __flags); -/* Reserve storage for the data of the file associated with FD. */ +/* Reserve storage for the data of the file associated with FD. + + This function is a possible cancellation point and therefore not + marked with __THROW. */ # ifndef __USE_FILE_OFFSET64 extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len); # else @@ -278,6 +303,19 @@ extern int fallocate64 (int __fd, int __mode, __off64_t __offset, __off64_t __len); # endif + +/* Map file name to file handle. */ +extern int name_to_handle_at (int __dfd, const char *__name, + struct file_handle *__handle, int *__mnt_id, + int __flags) __THROW; + +/* Open file using the file handle. + + This function is a possible cancellation point and therefore not + marked with __THROW. */ +extern int open_by_handle (int __mountdirfd, struct file_handle *__handle, + int __flags); + #endif __END_DECLS From 01b5049d107460f5eca797eda983958d1a410ffd Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 1 Apr 2011 16:19:06 +0000 Subject: [PATCH 4077/4487] Add name_to_handle_at, open_by_handle etc. to MIPS bits/fcntl.h. --- ChangeLog.mips | 6 +++ sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 48 ++++++++++++++++++++--- 2 files changed, 49 insertions(+), 5 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 04cab0c676..b88dbca9ba 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,9 @@ +2011-04-01 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Define struct + file_handle and MAX_HANDLE_SZ. Declare name_to_handle_at and + open_by_handle. Augment a few comments. + 2011-04-01 Joseph Myers * sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c: Make diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index 31cb861120..e2855671e9 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -1,6 +1,6 @@ /* O_*, F_*, FD_* bit values for Linux. Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2003, 2004, 2006, - 2007, 2009, 2010 Free Software Foundation, Inc. + 2007, 2009, 2010, 2011 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 @@ -245,6 +245,19 @@ struct f_owner_ex we splice from/to). */ # define SPLICE_F_MORE 4 /* Expect more data. */ # define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */ + + +/* File handle structure. */ +struct file_handle +{ + unsigned int handle_bytes; + int handle_type; + /* File identifier. */ + unsigned char f_handle[0]; +}; + +/* Maximum handle size (for now). */ +# define MAX_HANDLE_SZ 128 #endif __BEGIN_DECLS @@ -261,20 +274,32 @@ extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count, unsigned int __flags); -/* Splice address range into a pipe. */ +/* Splice address range into a pipe. + + This function is a possible cancellation point and therefore not + marked with __THROW. */ extern ssize_t vmsplice (int __fdout, const struct iovec *__iov, size_t __count, unsigned int __flags); -/* Splice two files together. */ +/* Splice two files together. + + This function is a possible cancellation point and therefore not + marked with __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. */ +/* In-kernel implementation of tee for pipe buffers. + + This function is a possible cancellation point and therefore not + marked with __THROW. */ extern ssize_t tee (int __fdin, int __fdout, size_t __len, unsigned int __flags); -/* Reserve storage for the data of the file associated with FD. */ +/* Reserve storage for the data of the file associated with FD. + + This function is a possible cancellation point and therefore not + marked with __THROW. */ # ifndef __USE_FILE_OFFSET64 extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len); # else @@ -291,6 +316,19 @@ extern int fallocate64 (int __fd, int __mode, __off64_t __offset, __off64_t __len); # endif + +/* Map file name to file handle. */ +extern int name_to_handle_at (int __dfd, const char *__name, + struct file_handle *__handle, int *__mnt_id, + int __flags) __THROW; + +/* Open file using the file handle. + + This function is a possible cancellation point and therefore not + marked with __THROW. */ +extern int open_by_handle (int __mountdirfd, struct file_handle *__handle, + int __flags); + #endif __END_DECLS From adb252daea96e7e160553703d477b76ff6a7781e Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 1 Apr 2011 16:29:57 +0000 Subject: [PATCH 4078/4487] Define O_PATH for ARM. --- ChangeLog.arm | 4 ++++ sysdeps/unix/sysv/linux/arm/bits/fcntl.h | 1 + 2 files changed, 5 insertions(+) diff --git a/ChangeLog.arm b/ChangeLog.arm index a55e6a03fe..60f2c0b645 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,7 @@ +2011-04-01 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/bits/fcntl.h (O_PATH): Define. + 2011-04-01 Joseph Myers * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Define struct diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h index 6a5f89ad1f..aa2d36ca80 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h @@ -53,6 +53,7 @@ #ifdef __USE_GNU # define O_DIRECT 0200000 /* Direct disk access. */ # define O_NOATIME 01000000 /* Do not set atime. */ +# define O_PATH 010000000 /* Resolve pathname but do not open file. */ #endif /* For now Linux has synchronisity options for data and read operations. From cea44847924fe22ee2e1e112ef46880b6adf8d5e Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 1 Apr 2011 16:30:22 +0000 Subject: [PATCH 4079/4487] Define O_PATH for MIPS. --- ChangeLog.mips | 4 ++++ sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 1 + 2 files changed, 5 insertions(+) diff --git a/ChangeLog.mips b/ChangeLog.mips index b88dbca9ba..fd9d9929d3 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,7 @@ +2011-04-01 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/fcntl.h (O_PATH): Define. + 2011-04-01 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Define struct diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index e2855671e9..2edc7a2822 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -54,6 +54,7 @@ #ifdef __USE_GNU # define O_DIRECT 0x8000 /* Direct disk access hint. */ # define O_NOATIME 0x40000 /* Do not set atime. */ +# define O_PATH 010000000 /* Resolve pathname but do not open file. */ #endif /* For now Linux has no synchronisity options for data and read operations. From 420d6ddd5bbabbcffb02ba6ce35403d61d78567f Mon Sep 17 00:00:00 2001 From: Ryosei Takagi Date: Fri, 1 Apr 2011 16:44:42 +0000 Subject: [PATCH 4080/4487] Save and restore r7 and adjust stack on failure for ARM EABI ____longjmp_chk. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S | 13 ++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 60f2c0b645..e655775e5e 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2011-04-01 Ryosei Takagi + + * sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S: + Save and restore r7, and also adjust sp. + 2011-04-01 Joseph Myers * sysdeps/unix/sysv/linux/arm/bits/fcntl.h (O_PATH): Define. diff --git a/sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S b/sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S index 508b4babd7..9d8e464583 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S +++ b/sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S @@ -52,13 +52,15 @@ longjmp_msg: cfi_remember_state; \ cmp sp, reg; \ bls .Lok; \ + str r7, [sp, #-4]!; \ + cfi_adjust_cfa_offset (4); \ + cfi_rel_offset (r7, 0); \ mov r5, r0; \ cfi_undefined (r5); \ mov r7, #SYS_ify(sigaltstack); \ - cfi_undefined (r7); \ mov r0, #0; \ - sub sp, sp, #16; /* >= sizeof (stack_t) */ \ - cfi_adjust_cfa_offset (16); \ + sub sp, sp, #12; /* == sizeof (stack_t) */ \ + cfi_adjust_cfa_offset (12); \ cfi_remember_state; \ mov r1, sp; \ swi #0; \ @@ -74,6 +76,11 @@ longjmp_msg: cmp r2, r3; \ bhi .Lok2; \ .Lfail: \ + add sp, sp, #12; \ + cfi_adjust_cfa_offset (-12); \ + ldr r7, [sp], #4; \ + cfi_adjust_cfa_offset (-4); \ + cfi_restore (r7); \ CALL_FAIL \ cfi_restore_state; \ .Lok2: \ From 54feca395aac2213c61ef1b98ceb14cd9c625085 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 1 Apr 2011 19:19:52 +0000 Subject: [PATCH 4081/4487] Rename open_by_handle to open_by_handle_at for ARM. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/bits/fcntl.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index e655775e5e..31f478e5a0 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2011-04-01 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Rename open_by_handle + to open_by_handle_at. + 2011-04-01 Ryosei Takagi * sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S: diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h index aa2d36ca80..cf8e32a4fa 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h @@ -314,8 +314,8 @@ extern int name_to_handle_at (int __dfd, const char *__name, This function is a possible cancellation point and therefore not marked with __THROW. */ -extern int open_by_handle (int __mountdirfd, struct file_handle *__handle, - int __flags); +extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle, + int __flags); #endif From e6893dbaa5d11b6f004247aa8fcab988c0f94514 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 1 Apr 2011 19:20:14 +0000 Subject: [PATCH 4082/4487] Rename open_by_handle to open_by_handle_at for MIPS. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index fd9d9929d3..01703e8184 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2011-04-01 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Rename open_by_handle + to open_by_handle_at. + 2011-04-01 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/fcntl.h (O_PATH): Define. diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index 2edc7a2822..1da157617f 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -327,8 +327,8 @@ extern int name_to_handle_at (int __dfd, const char *__name, This function is a possible cancellation point and therefore not marked with __THROW. */ -extern int open_by_handle (int __mountdirfd, struct file_handle *__handle, - int __flags); +extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle, + int __flags); #endif From f3bb0652be33a75370f8ed4552bcae6b8c8acefc Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 3 Apr 2011 23:57:05 +0200 Subject: [PATCH 4083/4487] m68k: update comments in bits/fcntl.h --- ChangeLog.m68k | 4 ++++ sysdeps/unix/sysv/linux/m68k/bits/fcntl.h | 24 +++++++++++++++++------ 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 5e45243a1e..8b6a9dbf75 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,7 @@ +2011-04-03 Andreas Schwab + + * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Update comments. + 2011-03-06 Andreas Schwab * sysdeps/m68k/bits/byteswap.h (__bswap_16, __bswap_32) diff --git a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h index f36507b3a9..3bbc1bfa62 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 2000, 2004, 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2000, 2004, 2008, 2009, 2010, 2011 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 @@ /* open/fcntl - O_SYNC is only implemented on blocks devices and on files - located on an ext2 file system */ + located on a few file systems. */ #define O_ACCMODE 0003 #define O_RDONLY 00 #define O_WRONLY 01 @@ -247,20 +247,32 @@ extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count, unsigned int __flags); -/* Splice address range into a pipe. */ +/* Splice address range into a pipe. + + This function is a possible cancellation point and therefore not + marked with __THROW. */ extern ssize_t vmsplice (int __fdout, const struct iovec *__iov, size_t __count, unsigned int __flags); -/* Splice two files together. */ +/* Splice two files together. + + This function is a possible cancellation point and therefore not + marked with __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. */ +/* In-kernel implementation of tee for pipe buffers. + + This function is a possible cancellation point and therefore not + marked with __THROW. */ extern ssize_t tee (int __fdin, int __fdout, size_t __len, unsigned int __flags); -/* Reserve storage for the data of the file associated with FD. */ +/* Reserve storage for the data of the file associated with FD. + + This function is a possible cancellation point and therefore not + marked with __THROW. */ # ifndef __USE_FILE_OFFSET64 extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len); # else From ece7d80e58bcdc7ac02105099cda06a0b1b4918c Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 3 Apr 2011 23:57:44 +0200 Subject: [PATCH 4084/4487] m68k: add O_PATH to bits/fcntl.h --- ChangeLog.m68k | 1 + sysdeps/unix/sysv/linux/m68k/bits/fcntl.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 8b6a9dbf75..779dba170d 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,6 +1,7 @@ 2011-04-03 Andreas Schwab * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Update comments. + (O_PATH): Define. 2011-03-06 Andreas Schwab diff --git a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h index 3bbc1bfa62..aecf214cee 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h @@ -51,7 +51,8 @@ #endif #ifdef __USE_GNU # define O_DIRECT 0200000 /* Direct disk access. */ -# define O_NOATIME 01000000 /* Do not set atime. */ +# define O_NOATIME 01000000 /* Do not set atime. */ +# define O_PATH 010000000 /* Resolve pathname but do not open file. */ #endif /* For now Linux has synchronisity options for data and read operations. From 91456166c51940caeecf2f3edc460deb689f82a4 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 3 Apr 2011 23:58:21 +0200 Subject: [PATCH 4085/4487] m68k: declare name_to_handle_at and open_by_handle_at in bits/fcntl.h --- ChangeLog.m68k | 2 ++ sysdeps/unix/sysv/linux/m68k/bits/fcntl.h | 26 +++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 779dba170d..ad78ade760 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -2,6 +2,8 @@ * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Update comments. (O_PATH): Define. + (struct file_handle, MAX_HANDLE_SZ): Define. + (name_to_handle_at, open_by_handle_at): Declare. 2011-03-06 Andreas Schwab diff --git a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h index aecf214cee..54363b6a24 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h @@ -232,6 +232,19 @@ struct f_owner_ex we splice from/to). */ # define SPLICE_F_MORE 4 /* Expect more data. */ # define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */ + + +/* File handle structure. */ +struct file_handle +{ + unsigned int handle_bytes; + int handle_type; + /* File identifier. */ + unsigned char f_handle[0]; +}; + +/* Maximum handle size (for now). */ +# define MAX_HANDLE_SZ 128 #endif __BEGIN_DECLS @@ -290,6 +303,19 @@ extern int fallocate64 (int __fd, int __mode, __off64_t __offset, __off64_t __len); # endif + +/* Map file name to file handle. */ +extern int name_to_handle_at (int __dfd, const char *__name, + struct file_handle *__handle, int *__mnt_id, + int __flags) __THROW; + +/* Open file using the file handle. + + This function is a possible cancellation point and therefore not + marked with __THROW. */ +extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle, + int __flags); + #endif __END_DECLS From b6dd51368d348cda276032d851633dae32655ff2 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 11 Apr 2011 13:30:33 +0000 Subject: [PATCH 4086/4487] Define TLS_DTV_UNALLOCATED for ARM. --- ChangeLog.arm | 4 ++++ sysdeps/arm/dl-tls.h | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 31f478e5a0..9db4a3499e 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,7 @@ +2011-04-11 Joseph Myers + + * sysdeps/arm/dl-tls.h (TLS_DTV_UNALLOCATED): Define. + 2011-04-01 Joseph Myers * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Rename open_by_handle diff --git a/sysdeps/arm/dl-tls.h b/sysdeps/arm/dl-tls.h index 02285a7147..694d11d89d 100644 --- a/sysdeps/arm/dl-tls.h +++ b/sysdeps/arm/dl-tls.h @@ -1,5 +1,5 @@ /* Thread-local storage handling in the ELF dynamic linker. ARM version. - Copyright (C) 2005 Free Software Foundation, Inc. + Copyright (C) 2005, 2011 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 @@ -27,3 +27,6 @@ typedef struct dl_tls_index extern void *__tls_get_addr (tls_index *ti); + +/* Value used for dtv entries for which the allocation is delayed. */ +#define TLS_DTV_UNALLOCATED ((void *) -1l) From ed36e1de02d8986bb42e5cf58154acf501eedeec Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 11 Apr 2011 13:30:52 +0000 Subject: [PATCH 4087/4487] Define TLS_DTV_UNALLOCATED for MIPS. --- ChangeLog.mips | 4 ++++ sysdeps/mips/dl-tls.h | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 01703e8184..453774fbc0 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,7 @@ +2011-04-11 Joseph Myers + + * sysdeps/mips/dl-tls.h (TLS_DTV_UNALLOCATED): Define. + 2011-04-01 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Rename open_by_handle diff --git a/sysdeps/mips/dl-tls.h b/sysdeps/mips/dl-tls.h index 6d3ed6f5a4..75facb0e3a 100644 --- a/sysdeps/mips/dl-tls.h +++ b/sysdeps/mips/dl-tls.h @@ -1,5 +1,5 @@ /* Thread-local storage handling in the ELF dynamic linker. MIPS version. - Copyright (C) 2005 Free Software Foundation, Inc. + Copyright (C) 2005, 2011 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 @@ -44,3 +44,6 @@ extern void *__tls_get_addr (tls_index *ti); # define GET_ADDR_OFFSET (ti->ti_offset + TLS_DTV_OFFSET) # define __TLS_GET_ADDR(__ti) (__tls_get_addr (__ti) - TLS_DTV_OFFSET) + +/* Value used for dtv entries for which the allocation is delayed. */ +#define TLS_DTV_UNALLOCATED ((void *) -1l) From 04c46a1ce78ebc099f6ad9791653369cdef3c9cd Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 11 Apr 2011 12:59:31 +0200 Subject: [PATCH 4088/4487] m68k: define TLS_DTV_UNALLOCATED --- ChangeLog.m68k | 4 ++++ sysdeps/m68k/dl-tls.h | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index ad78ade760..f54a74cead 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,7 @@ +2011-04-11 Andreas Schwab + + * sysdeps/m68k/dl-tls.h (TLS_DTV_UNALLOCATED): Define. + 2011-04-03 Andreas Schwab * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Update comments. diff --git a/sysdeps/m68k/dl-tls.h b/sysdeps/m68k/dl-tls.h index f2ce9982f0..cebdc2d2be 100644 --- a/sysdeps/m68k/dl-tls.h +++ b/sysdeps/m68k/dl-tls.h @@ -1,5 +1,5 @@ /* Thread-local storage handling in the ELF dynamic linker. M68K version. - Copyright (C) 2010 Free Software Foundation, Inc. + Copyright (C) 2010, 2011 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Maxim Kuvyrkov , 2010. @@ -44,5 +44,8 @@ typedef struct extern void *__tls_get_addr (tls_index *ti); -#define GET_ADDR_OFFSET (ti->ti_offset + TLS_DTV_OFFSET) +#define GET_ADDR_OFFSET (ti->ti_offset + TLS_DTV_OFFSET) #define __TLS_GET_ADDR(__ti) (__tls_get_addr (__ti) - TLS_DTV_OFFSET) + +/* Value used for dtv entries for which the allocation is delayed. */ +#define TLS_DTV_UNALLOCATED ((void *) -1l) From 70063199c3d35faa725ae23b19a3c2470ff86414 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Tue, 26 Apr 2011 21:00:46 +0000 Subject: [PATCH 4089/4487] Support for R_ARM_IRELATIVE relocations. --- ChangeLog.arm | 7 +++++++ sysdeps/arm/dl-irel.h | 45 ++++++++++++++++++++++++++++++++++++++++ sysdeps/arm/dl-machine.h | 30 +++++++++++++++++++++++++-- 3 files changed, 80 insertions(+), 2 deletions(-) create mode 100644 sysdeps/arm/dl-irel.h diff --git a/ChangeLog.arm b/ChangeLog.arm index 9db4a3499e..4c1207ace1 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,10 @@ +2011-04-26 Richard Sandiford + + * sysdeps/arm/dl-machine.h (elf_machine_rel): Handle STT_GNU_IFUNC + and R_ARM_IRELATIVE. + (elf_machine_rela): Likewise. + * sysdeps/arm/dl-irel.h: New file. + 2011-04-11 Joseph Myers * sysdeps/arm/dl-tls.h (TLS_DTV_UNALLOCATED): Define. diff --git a/sysdeps/arm/dl-irel.h b/sysdeps/arm/dl-irel.h new file mode 100644 index 0000000000..735e0a3ad6 --- /dev/null +++ b/sysdeps/arm/dl-irel.h @@ -0,0 +1,45 @@ +/* Machine-dependent ELF indirect relocation inline functions. + ARM version. + Copyright (C) 2009, 2010 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 _DL_IREL_H +#define _DL_IREL_H + +#include +#include + +#define ELF_MACHINE_IREL 1 + +static inline void +__attribute ((always_inline)) +elf_irel (const Elf32_Rel *reloc) +{ + Elf32_Addr *const reloc_addr = (void *) reloc->r_offset; + const unsigned long int r_type = ELF32_R_TYPE (reloc->r_info); + + if (__builtin_expect (r_type == R_ARM_IRELATIVE, 1)) + { + Elf32_Addr value = ((Elf32_Addr (*) (void)) (*reloc_addr)) (); + *reloc_addr = value; + } + else + __libc_fatal ("unexpected reloc type in static binary"); +} + +#endif /* dl-irel.h */ diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 9929f76c3e..b5d477be61 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -374,6 +374,12 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type); Elf32_Addr value = sym_map == NULL ? 0 : sym_map->l_addr + sym->st_value; + if (sym != NULL + && __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, + 0) + && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1)) + value = ((Elf32_Addr (*) (void)) value) (); + switch (r_type) { case R_ARM_COPY: @@ -487,7 +493,8 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, *reloc_addr = value; } break; -#if defined USE_TLS && !defined RTLD_BOOTSTRAP +#if !defined RTLD_BOOTSTRAP +#if defined USE_TLS case R_ARM_TLS_DTPMOD32: /* Get the information from the link map returned by the resolv function. */ @@ -507,6 +514,12 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, *reloc_addr += sym->st_value + sym_map->l_tls_offset; } break; +#endif + case R_ARM_IRELATIVE: + value = map->l_addr + *reloc_addr; + value = ((Elf32_Addr (*) (void)) value) (); + *reloc_addr = value; + break; #endif default: _dl_reloc_bad_type (map, r_type, 0); @@ -537,6 +550,12 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type); Elf32_Addr value = sym_map == NULL ? 0 : sym_map->l_addr + sym->st_value; + if (sym != NULL + && __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, + 0) + && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1)) + value = ((Elf32_Addr (*) (void)) value) (); + switch (r_type) { # ifndef RESOLVE_CONFLICT_FIND_MAP @@ -588,7 +607,8 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, *reloc_addr = value; } break; -#if defined USE_TLS && !defined RTLD_BOOTSTRAP +#if !defined RTLD_BOOTSTRAP +#if defined USE_TLS case R_ARM_TLS_DTPMOD32: /* Get the information from the link map returned by the resolv function. */ @@ -608,6 +628,12 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, + reloc->r_addend); } break; +#endif + case R_ARM_IRELATIVE: + value = map->l_addr + *reloc_addr; + value = ((Elf32_Addr (*) (void)) value) (); + *reloc_addr = value; + break; #endif default: _dl_reloc_bad_type (map, r_type, 0); From a875971e8e15b04e29494d0604cbcd47748ad8b4 Mon Sep 17 00:00:00 2001 From: Manjunath Matti Date: Tue, 26 Apr 2011 22:15:46 +0000 Subject: [PATCH 4090/4487] Fix profiling build of __libc_do_syscall. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S | 3 +++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog.arm b/ChangeLog.arm index 4c1207ace1..e4e637173f 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2011-04-26 Manjunath Matti + + * sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S + (CALL_MCOUNT): Redefine to empty. + 2011-04-26 Richard Sandiford * sysdeps/arm/dl-machine.h (elf_machine_rel): Handle STT_GNU_IFUNC diff --git a/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S b/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S index d461712af0..0fca96939a 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S +++ b/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S @@ -29,6 +29,9 @@ .syntax unified .hidden __libc_do_syscall +#undef CALL_MCOUNT +#define CALL_MCOUNT + ENTRY (__libc_do_syscall) .fnstart push {r7, lr} From 58a9f49bf487bce34dad9101b74e892f35624eef Mon Sep 17 00:00:00 2001 From: Konstantinos Margaritis Date: Mon, 9 May 2011 14:10:56 +0000 Subject: [PATCH 4091/4487] Detect arm-linux-gnueabi* as ARM EABI. --- ChangeLog.arm | 5 +++++ sysdeps/arm/preconfigure | 2 +- sysdeps/arm/shlib-versions | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index e4e637173f..6a9bdde8fe 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2011-05-07 Konstantinos Margaritis + + * sysdeps/arm/preconfigure: Detect arm-linux-gnueabi* as ARM EABI. + * sysdeps/arm/shlib-versions: Ditto. + 2011-04-26 Manjunath Matti * sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S diff --git a/sysdeps/arm/preconfigure b/sysdeps/arm/preconfigure index 4b974cbe94..e7693d4e7d 100644 --- a/sysdeps/arm/preconfigure +++ b/sysdeps/arm/preconfigure @@ -2,7 +2,7 @@ case "$machine" in arm*) base_machine=arm case $config_os in - linux-gnueabi) + linux-gnueabi*) machine=arm/eabi/$machine if [ "${CFLAGS+set}" != "set" ]; then CFLAGS="-g -O2" diff --git a/sysdeps/arm/shlib-versions b/sysdeps/arm/shlib-versions index ed6603f076..491dd0adc7 100644 --- a/sysdeps/arm/shlib-versions +++ b/sysdeps/arm/shlib-versions @@ -1,4 +1,4 @@ -arm.*-.*-linux-gnueabi DEFAULT GLIBC_2.4 +arm.*-.*-linux-gnueabi.* DEFAULT GLIBC_2.4 -arm.*-.*-linux-gnueabi ld=ld-linux.so.3 +arm.*-.*-linux-gnueabi.* ld=ld-linux.so.3 arm.*-.*-linux.* ld=ld-linux.so.2 From a32d0d808b140e2d41672471059bd4572b3bcab0 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 10 May 2011 15:52:47 +0000 Subject: [PATCH 4092/4487] Update MIPS dl-lookup.c from generic version. --- ChangeLog.mips | 4 ++++ sysdeps/mips/dl-lookup.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 453774fbc0..2003dff4cf 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,7 @@ +2011-05-10 Joseph Myers + + * sysdeps/mips/dl-lookup.c: Update from generic version. + 2011-04-11 Joseph Myers * sysdeps/mips/dl-tls.h (TLS_DTV_UNALLOCATED): Define. diff --git a/sysdeps/mips/dl-lookup.c b/sysdeps/mips/dl-lookup.c index 50d42fcf96..78c9f8ea6b 100644 --- a/sysdeps/mips/dl-lookup.c +++ b/sysdeps/mips/dl-lookup.c @@ -211,7 +211,7 @@ do_lookup_x (const char *undef_name, uint_fast32_t new_hash, might exist in more than one form If the library does not provide symbol version information - there is no problem at at: we simply use the symbol if it + there is no problem at all: we simply use the symbol if it is defined. These two lookups need to be handled differently if the From f1d4d4beaf35988f3acf1b204cc97e71c1e35ef2 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 13 May 2011 10:11:25 +0000 Subject: [PATCH 4093/4487] Update MIPS dl-lookup.c. --- ChangeLog.mips | 4 ++++ sysdeps/mips/dl-lookup.c | 47 +++++++++++++++++----------------------- 2 files changed, 24 insertions(+), 27 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 2003dff4cf..bcc2c18b60 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,7 @@ +2011-05-13 Joseph Myers + + * sysdeps/mips/dl-lookup.c: Update from generic version. + 2011-05-10 Joseph Myers * sysdeps/mips/dl-lookup.c: Update from generic version. diff --git a/sysdeps/mips/dl-lookup.c b/sysdeps/mips/dl-lookup.c index 78c9f8ea6b..6b36c34a84 100644 --- a/sysdeps/mips/dl-lookup.c +++ b/sysdeps/mips/dl-lookup.c @@ -329,39 +329,21 @@ do_lookup_x (const char *undef_name, uint_fast32_t new_hash, definition we have to use it. */ void enter (struct unique_sym *table, size_t size, unsigned int hash, const char *name, - const ElfW(Sym) *sym, struct link_map *map) + const ElfW(Sym) *sym, const struct link_map *map) { size_t idx = hash % size; size_t hash2 = 1 + hash % (size - 2); - while (1) + while (table[idx].name != NULL) { - if (table[idx].name == NULL) - { - table[idx].hashval = hash; - table[idx].name = name; - if ((type_class & ELF_RTYPE_CLASS_COPY) != 0) - { - table[idx].sym = ref; - table[idx].map = undef_map; - } - else - { - table[idx].sym = sym; - table[idx].map = map; - - if (map->l_type == lt_loaded) - /* Make sure we don't unload this object by - setting the appropriate flag. */ - map->l_flags_1 |= DF_1_NODELETE; - } - - return; - } - idx += hash2; if (idx >= size) idx -= size; } + + table[idx].hashval = hash; + table[idx].name = name; + table[idx].sym = sym; + table[idx].map = map; } struct unique_sym_table *tab @@ -467,8 +449,19 @@ do_lookup_x (const char *undef_name, uint_fast32_t new_hash, tab->free = free; } - enter (entries, size, new_hash, strtab + sym->st_name, sym, - (struct link_map *) map); + if ((type_class & ELF_RTYPE_CLASS_COPY) != 0) + enter (entries, size, new_hash, strtab + sym->st_name, ref, + undef_map); + else + { + enter (entries, size, new_hash, strtab + sym->st_name, sym, + map); + + if (map->l_type == lt_loaded) + /* Make sure we don't unload this object by + setting the appropriate flag. */ + ((struct link_map *) map)->l_flags_1 |= DF_1_NODELETE; + } ++tab->n_elements; __rtld_lock_unlock_recursive (tab->lock); From 8969f4df1a526aa60dd0bc1c4736cf02104d4a05 Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Mon, 23 May 2011 20:34:36 +0000 Subject: [PATCH 4094/4487] Define RLIMIT_RTTIME for MIPS. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/bits/resource.h | 10 ++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index bcc2c18b60..d0a2b4a7b9 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2011-05-23 Aurelien Jarno + + * sysdeps/unix/sysv/linux/mips/bits/resource.h (RLIMIT_RTTIME): + Add. + 2011-05-13 Joseph Myers * sysdeps/mips/dl-lookup.c: Update from generic version. diff --git a/sysdeps/unix/sysv/linux/mips/bits/resource.h b/sysdeps/unix/sysv/linux/mips/bits/resource.h index a6454c4849..f64e9c09a2 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/resource.h +++ b/sysdeps/unix/sysv/linux/mips/bits/resource.h @@ -1,6 +1,6 @@ /* Bit values & structures for resource limits. Linux/MIPS version. Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2004, 2005, 2006, 2008, - 2009, 2010 Free Software Foundation, Inc. + 2009, 2010, 2011 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 @@ -100,7 +100,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 From 6b5adfe9dc64df1ce7f089d2a6cab550cb76ede1 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 20 Jun 2011 19:26:42 +0000 Subject: [PATCH 4095/4487] Don't mention raise in SI_USER comment for MIPS. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/bits/siginfo.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index d0a2b4a7b9..2ead239e46 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2011-06-20 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/siginfo.h (SI_USER): Don't + mention raise in the comment. + 2011-05-23 Aurelien Jarno * sysdeps/unix/sysv/linux/mips/bits/resource.h (RLIMIT_RTTIME): diff --git a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h index e0fc81a188..484668f449 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h +++ b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h @@ -1,5 +1,5 @@ /* siginfo_t, sigevent and constants. Linux/MIPS version. - Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 + Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2011 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -146,7 +146,7 @@ enum # define SI_ASYNCIO SI_ASYNCIO SI_QUEUE, /* Sent by sigqueue. */ # define SI_QUEUE SI_QUEUE - SI_USER, /* Sent by kill, sigsend, raise. */ + SI_USER, /* Sent by kill, sigsend. */ # define SI_USER SI_USER SI_KERNEL = 0x80 /* Send by kernel. */ #define SI_KERNEL SI_KERNEL From 45c99e6495a2b28746399749083694a950a0dce2 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 20 Jun 2011 19:34:43 +0000 Subject: [PATCH 4096/4487] sendmmsg for ARM. --- ChangeLog.arm | 4 ++++ sysdeps/unix/sysv/linux/arm/eabi/internal_sendmmsg.S | 6 ++++++ 2 files changed, 10 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/internal_sendmmsg.S diff --git a/ChangeLog.arm b/ChangeLog.arm index 6a9bdde8fe..30405dd108 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,7 @@ +2010-06-20 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/eabi/internal_sendmmsg.S: New. + 2011-05-07 Konstantinos Margaritis * sysdeps/arm/preconfigure: Detect arm-linux-gnueabi* as ARM EABI. diff --git a/sysdeps/unix/sysv/linux/arm/eabi/internal_sendmmsg.S b/sysdeps/unix/sysv/linux/arm/eabi/internal_sendmmsg.S new file mode 100644 index 0000000000..eeb5f50a26 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/internal_sendmmsg.S @@ -0,0 +1,6 @@ +/* Tag_ABI_align8_preserved: This code preserves 8-byte + alignment in any callee. */ + .eabi_attribute 25, 1 +/* Tag_ABI_align8_needed: This code may require 8-byte alignment from + the caller. */ + .eabi_attribute 24, 1 From 6cc02c7aaedec87cfb2d105f9682b12b2154e54f Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 20 Jun 2011 19:35:31 +0000 Subject: [PATCH 4097/4487] sendmmsg for MIPS. --- ChangeLog.mips | 5 +++ sysdeps/unix/sysv/linux/mips/bits/socket.h | 9 +++++- .../linux/mips/mips32/internal_sendmmsg.S | 2 ++ .../unix/sysv/linux/mips/mips32/sendmmsg.c | 31 +++++++++++++++++++ 4 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 sysdeps/unix/sysv/linux/mips/mips32/internal_sendmmsg.S create mode 100644 sysdeps/unix/sysv/linux/mips/mips32/sendmmsg.c diff --git a/ChangeLog.mips b/ChangeLog.mips index 2ead239e46..9abc018f05 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2011-06-20 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/mips32/sendmmsg.c, + sysdeps/unix/sysv/linux/mips/mips32/internal_sendmmsg.S: New. + 2011-06-20 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/siginfo.h (SI_USER): Don't diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h index 91af8b2f8a..698d508402 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/socket.h +++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h @@ -415,7 +415,7 @@ struct linger __BEGIN_DECLS -/* Receive a message as described by MESSAGE from socket FD. +/* Receive up to VLEN messages as described by VMESSAGES from socket FD. Returns the number of bytes read or -1 for errors. This function is a cancellation point and therefore not marked with @@ -424,6 +424,13 @@ extern int recvmmsg (int __fd, struct mmsghdr *__vmessages, unsigned int __vlen, int __flags, __const struct timespec *__tmo); +/* Send a VLEN messages as described by VMESSAGES to socket FD. + Return the number of datagrams successfully written or -1 for errors. +This function is a cancellation point and therefore not marked with + __THROW. */ +extern int sendmmsg (int __fd, struct mmsghdr *__vmessages, + unsigned int __vlen, int __flags); + __END_DECLS #endif /* bits/socket.h */ diff --git a/sysdeps/unix/sysv/linux/mips/mips32/internal_sendmmsg.S b/sysdeps/unix/sysv/linux/mips/mips32/internal_sendmmsg.S new file mode 100644 index 0000000000..30434d7334 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips32/internal_sendmmsg.S @@ -0,0 +1,2 @@ +/* MIPS does not have socket.S and the socketcall syscall should + generally be avoided, though it exists. */ diff --git a/sysdeps/unix/sysv/linux/mips/mips32/sendmmsg.c b/sysdeps/unix/sysv/linux/mips/mips32/sendmmsg.c new file mode 100644 index 0000000000..c4f9a9f18a --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips32/sendmmsg.c @@ -0,0 +1,31 @@ +/* Copyright (C) 2011 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. */ + +/* Avoid sendmmsg.c trying to use a definition based on the socketcall + syscall and internal_sendmmsg.S. */ + +#include +#include + +#include +#include +#include + +#undef __NR_socketcall + +#include From 5411b5632debd0c53902e82a9cd6e9fa0e8787ea Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 21 Jun 2011 14:19:45 +0000 Subject: [PATCH 4098/4487] Define elf_ifunc_invoke for ARM. --- ChangeLog.arm | 5 +++++ sysdeps/arm/dl-irel.h | 11 +++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 30405dd108..1737b24d06 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2011-06-21 Joseph Myers + + * sysdeps/arm/dl-irel.h (elf_ifunc_invoke): New. + (elf_irel): Use it. + 2010-06-20 Joseph Myers * sysdeps/unix/sysv/linux/arm/eabi/internal_sendmmsg.S: New. diff --git a/sysdeps/arm/dl-irel.h b/sysdeps/arm/dl-irel.h index 735e0a3ad6..ab33ef8393 100644 --- a/sysdeps/arm/dl-irel.h +++ b/sysdeps/arm/dl-irel.h @@ -1,6 +1,6 @@ /* Machine-dependent ELF indirect relocation inline functions. ARM version. - Copyright (C) 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2009, 2010, 2011 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 @@ -26,6 +26,13 @@ #define ELF_MACHINE_IREL 1 +static inline Elf32_Addr +__attribute ((always_inline)) +elf_ifunc_invoke (Elf32_Addr addr) +{ + return ((Elf32_Addr (*) (void)) (addr)) (); +} + static inline void __attribute ((always_inline)) elf_irel (const Elf32_Rel *reloc) @@ -35,7 +42,7 @@ elf_irel (const Elf32_Rel *reloc) if (__builtin_expect (r_type == R_ARM_IRELATIVE, 1)) { - Elf32_Addr value = ((Elf32_Addr (*) (void)) (*reloc_addr)) (); + Elf32_Addr value = elf_ifunc_invoke (*reloc_addr); *reloc_addr = value; } else From a437c0725b8251e09ba53a5e9f66f128b6699660 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Thu, 23 Jun 2011 00:19:46 +0200 Subject: [PATCH 4099/4487] m68k: fix saving %fp0 in _dl_profile_fixup for coldfire --- ChangeLog.m68k | 5 +++++ sysdeps/m68k/dl-trampoline.S | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index f54a74cead..8c85d5c81e 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2011-06-23 Andreas Schwab + + * sysdeps/m68k/dl-trampoline.S (_dl_runtime_profile) + [__mcoldfire__]: Fix typo saving %fp0. + 2011-04-11 Andreas Schwab * sysdeps/m68k/dl-tls.h (TLS_DTV_UNALLOCATED): Define. diff --git a/sysdeps/m68k/dl-trampoline.S b/sysdeps/m68k/dl-trampoline.S index e324da1085..0f4148b43f 100644 --- a/sysdeps/m68k/dl-trampoline.S +++ b/sysdeps/m68k/dl-trampoline.S @@ -1,5 +1,5 @@ /* PLT trampolines. m68k version. - Copyright (C) 2005 Free Software Foundation, Inc. + Copyright (C) 2005, 2011 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 @@ -139,7 +139,7 @@ _dl_runtime_profile: %sp %a0 */ #ifdef __mcoldfire__ - fmove.l %fp0, -(%sp) + fmove.d %fp0, -(%sp) #else fmove.x %fp0, -(%sp) #endif From e5cd24d4bdfdd6ae994c8d27bc896d844caf6e2e Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Thu, 30 Jun 2011 15:55:49 +0000 Subject: [PATCH 4100/4487] [ARM] Align _start constant pool to 4 bytes --- ChangeLog.arm | 4 ++++ sysdeps/arm/elf/start.S | 1 + 2 files changed, 5 insertions(+) diff --git a/ChangeLog.arm b/ChangeLog.arm index 1737b24d06..8fd7c4ec84 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,7 @@ +2011-06-30 Richard Sandiford + + * sysdeps/arm/elf/start.S (_start): Align the constant pool to 4 bytes. + 2011-06-21 Joseph Myers * sysdeps/arm/dl-irel.h (elf_ifunc_invoke): New. diff --git a/sysdeps/arm/elf/start.S b/sysdeps/arm/elf/start.S index c69f19d3bc..551b4677c3 100644 --- a/sysdeps/arm/elf/start.S +++ b/sysdeps/arm/elf/start.S @@ -134,6 +134,7 @@ _start: bl abort #ifdef SHARED + .align 2 .L_GOT: .word _GLOBAL_OFFSET_TABLE_ - .L_GOT .word __libc_csu_fini(GOT) From 9dc88b5c939737c959dc4b9e81934c080fa438fc Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 25 Jul 2011 15:19:56 +0000 Subject: [PATCH 4101/4487] Define PF_NFC and AF_NFC for MIPS. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/bits/socket.h | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 9abc018f05..aa29c02101 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2011-07-25 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/socket.h (PF_NFC, AF_NFC): + Define. + 2011-06-20 Joseph Myers * sysdeps/unix/sysv/linux/mips/mips32/sendmmsg.c, diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h index 698d508402..2399490926 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/socket.h +++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h @@ -111,7 +111,8 @@ enum __socket_type #define PF_IEEE802154 36 /* IEEE 802.15.4 sockets. */ #define PF_CAIF 37 /* CAIF sockets. */ #define PF_ALG 38 /* Algorithm sockets. */ -#define PF_MAX 39 /* For now.. */ +#define PF_NFC 39 /* NFC sockets. */ +#define PF_MAX 40 /* For now.. */ /* Address families. */ #define AF_UNSPEC PF_UNSPEC @@ -154,6 +155,7 @@ enum __socket_type #define AF_IEEE802154 PF_IEEE802154 #define AF_CAIF PF_CAIF #define AF_ALG PF_ALG +#define AF_NFC PF_NFC #define AF_MAX PF_MAX /* Socket level values. Others are defined in the appropriate headers. From e349dfdb68723dd076d22905a521ef6ab1601ba7 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Tue, 2 Aug 2011 15:18:06 +0000 Subject: [PATCH 4102/4487] Workaround R10K ll/sc errata. --- ChangeLog.mips | 4 ++++ sysdeps/mips/bits/atomic.h | 38 ++++++++++++++++++++++++++++++++------ 2 files changed, 36 insertions(+), 6 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index aa29c02101..b2998b8f11 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,7 @@ +2011-08-02 Matt Turner + + * sysdeps/mips/bits/atomic.h: Workaround R10K ll/sc errata. + 2011-07-25 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/socket.h (PF_NFC, AF_NFC): diff --git a/sysdeps/mips/bits/atomic.h b/sysdeps/mips/bits/atomic.h index 11b3467ee7..2bd723d6d4 100644 --- a/sysdeps/mips/bits/atomic.h +++ b/sysdeps/mips/bits/atomic.h @@ -49,6 +49,32 @@ typedef uintmax_t uatomic_max_t; # define MIPS_SYNC sync #endif +/* Certain revisions of the R10000 Processor need an LL/SC Workaround + enabled. Revisions before 3.0 misbehave on atomic operations, and + Revs 2.6 and lower deadlock after several seconds due to other errata. + + To quote the R10K Errata: + Workaround: The basic idea is to inhibit the four instructions + from simultaneously becoming active in R10000. Padding all + ll/sc sequences with nops or changing the looping branch in the + routines to a branch likely (which is always predicted taken + by R10000) will work. The nops should go after the loop, and the + number of them should be 28. This number could be decremented for + each additional instruction in the ll/sc loop such as the lock + modifier(s) between the ll and sc, the looping branch and its + delay slot. For typical short routines with one ll/sc loop, any + instructions after the loop could also count as a decrement. The + nop workaround pollutes the cache more but would be a few cycles + faster if all the code is in the cache and the looping branch + is predicted not taken. */ + + +#ifdef _MIPS_ARCH_R10000 +#define R10K_BEQZ_INSN "beqzl" +#else +#define R10K_BEQZ_INSN "beqz" +#endif + #define MIPS_SYNC_STR_2(X) #X #define MIPS_SYNC_STR_1(X) MIPS_SYNC_STR_2(X) #define MIPS_SYNC_STR MIPS_SYNC_STR_1(MIPS_SYNC) @@ -74,7 +100,7 @@ typedef uintmax_t uatomic_max_t; "bne %0,%3,2f\n\t" \ "move %1,%4\n\t" \ "sc %1,%2\n\t" \ - "beqz %1,1b\n" \ + R10K_BEQZ_INSN" %1,1b\n" \ acq "\n\t" \ ".set pop\n" \ "2:\n\t" \ @@ -98,7 +124,7 @@ typedef uintmax_t uatomic_max_t; "bne %0,%3,2f\n\t" \ "move %1,%4\n\t" \ "scd %1,%2\n\t" \ - "beqz %1,1b\n" \ + R10K_BEQZ_INSN" %1,1b\n" \ acq "\n\t" \ ".set pop\n" \ "2:\n\t" \ @@ -192,7 +218,7 @@ typedef uintmax_t uatomic_max_t; "ll %0,%4\n\t" \ "move %1,%3\n\t" \ "sc %1,%2\n\t" \ - "beqz %1,1b\n" \ + R10K_BEQZ_INSN" %1,1b\n" \ acq "\n\t" \ ".set pop\n" \ "2:\n\t" \ @@ -216,7 +242,7 @@ typedef uintmax_t uatomic_max_t; "lld %0,%4\n\t" \ "move %1,%3\n\t" \ "scd %1,%2\n\t" \ - "beqz %1,1b\n" \ + R10K_BEQZ_INSN" %1,1b\n" \ acq "\n\t" \ ".set pop\n" \ "2:\n\t" \ @@ -251,7 +277,7 @@ typedef uintmax_t uatomic_max_t; "ll %0,%4\n\t" \ "addu %1,%0,%3\n\t" \ "sc %1,%2\n\t" \ - "beqz %1,1b\n" \ + R10K_BEQZ_INSN" %1,1b\n" \ acq "\n\t" \ ".set pop\n" \ "2:\n\t" \ @@ -275,7 +301,7 @@ typedef uintmax_t uatomic_max_t; "lld %0,%4\n\t" \ "daddu %1,%0,%3\n\t" \ "scd %1,%2\n\t" \ - "beqz %1,1b\n" \ + R10K_BEQZ_INSN" %1,1b\n" \ acq "\n\t" \ ".set pop\n" \ "2:\n\t" \ From 3c6ac5cbe1b17f08bf66be4b1b1c6ffd01729af9 Mon Sep 17 00:00:00 2001 From: Andrew Haley Date: Tue, 2 Aug 2011 15:32:10 +0000 Subject: [PATCH 4103/4487] Mark ARM __clone as .cantunwind. --- ChangeLog.arm | 4 ++++ sysdeps/unix/sysv/linux/arm/clone.S | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 8fd7c4ec84..9a9cda251c 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,7 @@ +2011-08-02 Andrew Haley + + * sysdeps/unix/sysv/linux/arm/clone.S: Mark as .cantunwind. + 2011-06-30 Richard Sandiford * sysdeps/arm/elf/start.S (_start): Align the constant pool to 4 bytes. diff --git a/sysdeps/unix/sysv/linux/arm/clone.S b/sysdeps/unix/sysv/linux/arm/clone.S index 178b0f1efd..f3d6741f9f 100644 --- a/sysdeps/unix/sysv/linux/arm/clone.S +++ b/sysdeps/unix/sysv/linux/arm/clone.S @@ -81,8 +81,11 @@ ENTRY(__clone) RETINSTR(, lr) cfi_startproc - cfi_undefined (lr) +PSEUDO_END (__clone) + 1: + .fnstart + .cantunwind #ifdef RESET_PID tst ip, #CLONE_THREAD bne 3f @@ -116,6 +119,6 @@ ENTRY(__clone) @ and we are done, passing the return value through r0 b PLTJMP(HIDDEN_JUMPTARGET(_exit)) -PSEUDO_END (__clone) + .fnend weak_alias (__clone, clone) From 978f13ef739123a0f4dbc85519d4cacc23e35abf Mon Sep 17 00:00:00 2001 From: Ramana Radhakrishnan Date: Thu, 18 Aug 2011 14:13:12 +0000 Subject: [PATCH 4104/4487] [ARM] Add libc-do-syscall for libnss_db. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/eabi/Makefile | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog.arm b/ChangeLog.arm index 9a9cda251c..569b98f8af 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2011-08-18 Ramana Radhakrishnan + + * sysdeps/unix/sysv/linux/arm/eabi/Makefile: Add libc-do-syscall + for libnss_db. + 2011-08-02 Andrew Haley * sysdeps/unix/sysv/linux/arm/clone.S: Mark as .cantunwind. diff --git a/sysdeps/unix/sysv/linux/arm/eabi/Makefile b/sysdeps/unix/sysv/linux/arm/eabi/Makefile index 761c96406d..1318bc441e 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/Makefile +++ b/sysdeps/unix/sysv/linux/arm/eabi/Makefile @@ -33,6 +33,11 @@ ifeq ($(subdir),nscd) nscd-modules += libc-do-syscall endif +ifeq ($(subdir),nss) +libnss_db-sysdep_routines += libc-do-syscall +libnss_db-shared-only-routines += libc-do-syscall +endif + ifeq ($(subdir),posix) LDFLAGS-tst-rfc3484 += $(common-objpfx)csu/libc-do-syscall.o LDFLAGS-tst-rfc3484-2 += $(common-objpfx)csu/libc-do-syscall.o From c26e391dd3e01362f7c6ce575273f30580793ab3 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 6 Sep 2011 14:04:08 +0000 Subject: [PATCH 4105/4487] Fix statfs64/fstatfs64 for MIPS n64. --- ChangeLog.mips | 8 ++++++++ sysdeps/unix/sysv/linux/mips/mips64/n64/fstatfs64.c | 1 + sysdeps/unix/sysv/linux/mips/mips64/n64/statfs64.c | 1 + sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list | 3 +++ 4 files changed, 13 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/fstatfs64.c create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/statfs64.c diff --git a/ChangeLog.mips b/ChangeLog.mips index b2998b8f11..75f87fe418 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,11 @@ +2011-09-06 Joseph Myers + + [BZ #13109] + * sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list (fstatfs) + (statfs): New. + * sysdeps/unix/sysv/linux/mips/mips64/n64/fstatfs64.c, + sysdeps/unix/sysv/linux/mips/mips64/n64/statfs64.c: New. + 2011-08-02 Matt Turner * sysdeps/mips/bits/atomic.h: Workaround R10K ll/sc errata. diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/fstatfs64.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/fstatfs64.c new file mode 100644 index 0000000000..6e25b021ab --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/fstatfs64.c @@ -0,0 +1 @@ +/* Empty. */ diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/statfs64.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/statfs64.c new file mode 100644 index 0000000000..6e25b021ab --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/statfs64.c @@ -0,0 +1 @@ +/* Empty. */ diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list b/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list index 8d70e457f1..c94fe75a71 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list @@ -5,3 +5,6 @@ sync_file_range - sync_file_range Ci:iiii sync_file_range prlimit EXTRA prlimit64 i:iipp prlimit prlimit64 fanotify_mark EXTRA fanotify_mark i:iiiis fanotify_mark + +fstatfs - fstatfs i:ip __fstatfs fstatfs fstatfs64 __fstatfs64 +statfs - statfs i:sp __statfs statfs statfs64 __statfs64 From ce001f45bc3379962988f177214a9edd07d8d311 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sun, 11 Sep 2011 11:15:50 +0000 Subject: [PATCH 4106/4487] Remove non-TLS support for ARM. --- ChangeLog.arm | 8 ++++++++ sysdeps/arm/dl-machine.h | 16 ++------------- sysdeps/arm/dl-tlsdesc.S | 5 +---- sysdeps/arm/libc-tls.c | 6 +----- sysdeps/arm/nptl/tls.h | 5 +---- sysdeps/arm/tlsdesc.c | 5 +---- sysdeps/arm/tlsdesc.sym | 4 ---- sysdeps/unix/arm/sysdep.S | 43 +-------------------------------------- 8 files changed, 15 insertions(+), 77 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 569b98f8af..93eee307cf 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,11 @@ +2011-09-11 Joseph Myers + + * sysdeps/arm/dl-machine.h, sysdeps/arm/dl-tlsdesc.S, + sysdeps/arm/libc-tls.c, sysdeps/arm/nptl/tls.h, + sysdeps/arm/tlsdesc.c, sysdeps/arm/tlsdesc.sym, + sysdeps/unix/arm/sysdep.S: Remove !USE_THREAD and !USE_TLS cases. + Don't define USE_TLS. + 2011-08-18 Ramana Radhakrishnan * sysdeps/unix/sysv/linux/arm/eabi/Makefile: Add libc-do-syscall diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index b5d477be61..1ba77009b1 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -1,6 +1,6 @@ /* Machine-dependent ELF dynamic relocation inline functions. ARM version. Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005, - 2006, 2009, 2010 Free Software Foundation, Inc. + 2006, 2009, 2010, 2011 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 @@ -242,18 +242,12 @@ _dl_start_user:\n\ define the value. ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one of the main executable's symbols, as for a COPY reloc. */ -#if defined USE_TLS && (!defined RTLD_BOOTSTRAP || USE___THREAD) -# define elf_machine_type_class(type) \ +#define elf_machine_type_class(type) \ ((((type) == R_ARM_JUMP_SLOT || (type) == R_ARM_TLS_DTPMOD32 \ || (type) == R_ARM_TLS_DTPOFF32 || (type) == R_ARM_TLS_TPOFF32 \ || (type) == R_ARM_TLS_DESC) \ * ELF_RTYPE_CLASS_PLT) \ | (((type) == R_ARM_COPY) * ELF_RTYPE_CLASS_COPY)) -#else -#define elf_machine_type_class(type) \ - ((((type) == R_ARM_JUMP_SLOT) * ELF_RTYPE_CLASS_PLT) \ - | (((type) == R_ARM_COPY) * ELF_RTYPE_CLASS_COPY)) -#endif /* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */ #define ELF_MACHINE_JMP_SLOT R_ARM_JUMP_SLOT @@ -494,7 +488,6 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, } break; #if !defined RTLD_BOOTSTRAP -#if defined USE_TLS case R_ARM_TLS_DTPMOD32: /* Get the information from the link map returned by the resolv function. */ @@ -514,7 +507,6 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, *reloc_addr += sym->st_value + sym_map->l_tls_offset; } break; -#endif case R_ARM_IRELATIVE: value = map->l_addr + *reloc_addr; value = ((Elf32_Addr (*) (void)) value) (); @@ -608,7 +600,6 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, } break; #if !defined RTLD_BOOTSTRAP -#if defined USE_TLS case R_ARM_TLS_DTPMOD32: /* Get the information from the link map returned by the resolv function. */ @@ -628,7 +619,6 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, + reloc->r_addend); } break; -#endif case R_ARM_IRELATIVE: value = map->l_addr + *reloc_addr; value = ((Elf32_Addr (*) (void)) value) (); @@ -678,7 +668,6 @@ elf_machine_lazy_rel (struct link_map *map, else *reloc_addr = map->l_mach.plt; } -#ifdef USE_TLS else if (__builtin_expect (r_type == R_ARM_TLS_DESC, 1)) { struct tlsdesc volatile *td = @@ -691,7 +680,6 @@ elf_machine_lazy_rel (struct link_map *map, td->entry = (void*)(D_PTR (map, l_info[ADDRIDX (DT_TLSDESC_PLT)]) + map->l_addr); } -#endif else _dl_reloc_bad_type (map, r_type, 1); } diff --git a/sysdeps/arm/dl-tlsdesc.S b/sysdeps/arm/dl-tlsdesc.S index 19e4ed3d01..c192fc978e 100644 --- a/sysdeps/arm/dl-tlsdesc.S +++ b/sysdeps/arm/dl-tlsdesc.S @@ -1,5 +1,5 @@ /* Thread-local storage handling in the ELF dynamic linker. ARM version. - Copyright (C) 2006, 2010 Free Software Foundation, Inc. + Copyright (C) 2006, 2010, 2011 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 @@ -31,7 +31,6 @@ @ emit debug information with cfi @ use arm-specific pseudos for unwinding itself .cfi_sections .debug_frame -#ifdef USE_TLS .hidden _dl_tlsdesc_return .global _dl_tlsdesc_return .type _dl_tlsdesc_return,#function @@ -218,5 +217,3 @@ _dl_tlsdesc_resolve_hold: .fnend cfi_endproc .size _dl_tlsdesc_resolve_hold, .-_dl_tlsdesc_resolve_hold - -#endif /* USE_TLS */ diff --git a/sysdeps/arm/libc-tls.c b/sysdeps/arm/libc-tls.c index affb1899ed..a6271bb3b4 100644 --- a/sysdeps/arm/libc-tls.c +++ b/sysdeps/arm/libc-tls.c @@ -1,5 +1,5 @@ /* Thread-local storage handling in the ELF dynamic linker. ARM version. - Copyright (C) 2005 Free Software Foundation, Inc. + Copyright (C) 2005, 2011 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,8 +20,6 @@ #include #include -#if USE_TLS - /* On ARM, linker optimizations are not required, so __tls_get_addr can be called even in statically linked binaries. In this case module must be always 1 and PT_TLS segment exist in the binary, otherwise it @@ -33,5 +31,3 @@ __tls_get_addr (tls_index *ti) dtv_t *dtv = THREAD_DTV (); return (char *) dtv[1].pointer.val + ti->ti_offset; } - -#endif diff --git a/sysdeps/arm/nptl/tls.h b/sysdeps/arm/nptl/tls.h index f257b93fe7..82a6881652 100644 --- a/sysdeps/arm/nptl/tls.h +++ b/sysdeps/arm/nptl/tls.h @@ -1,5 +1,5 @@ /* Definition for thread-local data handling. NPTL/ARM version. - Copyright (C) 2005, 2007 Free Software Foundation, Inc. + Copyright (C) 2005, 2007, 2011 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 @@ -48,9 +48,6 @@ typedef union dtv # error "TLS support is required." #endif -/* Signal that TLS support is available. */ -# define USE_TLS 1 - #ifndef __ASSEMBLER__ /* Get system call information. */ diff --git a/sysdeps/arm/tlsdesc.c b/sysdeps/arm/tlsdesc.c index e0b970f00d..811d66b831 100644 --- a/sysdeps/arm/tlsdesc.c +++ b/sysdeps/arm/tlsdesc.c @@ -1,5 +1,5 @@ /* Manage TLS descriptors. ARM version. - Copyright (C) 2005, 2010 Free Software Foundation, Inc. + Copyright (C) 2005, 2010, 2011 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 @@ -24,8 +24,6 @@ #include #include -#ifdef USE_TLS - /* This function is used to lazily resolve TLS_DESC REL relocations Besides the TLS descriptor itself, we get the module's got address as the second parameter. */ @@ -161,4 +159,3 @@ _dl_unmap (struct link_map *map) htab_delete (map->l_mach.tlsdesc_table); #endif } -#endif diff --git a/sysdeps/arm/tlsdesc.sym b/sysdeps/arm/tlsdesc.sym index a1deb21179..3f3a13e2c4 100644 --- a/sysdeps/arm/tlsdesc.sym +++ b/sysdeps/arm/tlsdesc.sym @@ -7,13 +7,9 @@ -- -- Abuse tls.h macros to derive offsets relative to the thread register. -#if defined USE_TLS - TLSDESC_ARG offsetof(struct tlsdesc, argument.pointer) TLSDESC_GEN_COUNT offsetof(struct tlsdesc_dynamic_arg, gen_count) TLSDESC_MODID offsetof(struct tlsdesc_dynamic_arg, tlsinfo.ti_module) TLSDESC_MODOFF offsetof(struct tlsdesc_dynamic_arg, tlsinfo.ti_offset) - -#endif diff --git a/sysdeps/unix/arm/sysdep.S b/sysdeps/unix/arm/sysdep.S index d3ad81b7bd..dcd3ce2523 100644 --- a/sysdeps/unix/arm/sysdep.S +++ b/sysdeps/unix/arm/sysdep.S @@ -1,5 +1,5 @@ /* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2002, 2003, - 2004, 2005, 2009 + 2004, 2005, 2009, 2011 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -42,7 +42,6 @@ syscall_error: moveq r0, $EAGAIN /* Yes; translate it to EAGAIN. */ #endif -#if USE___THREAD mov ip, lr cfi_register (lr, ip) mov r1, r0 @@ -58,46 +57,6 @@ syscall_error: RETINSTR (, ip) 1: .word errno(gottpoff) + (. - 2b - 8) -#elif RTLD_PRIVATE_ERRNO - ldr r1, 1f -0: str r0, [pc, r1] - mvn r0, $0 - DO_RET(r14) - -1: .word C_SYMBOL_NAME(rtld_errno) - 0b - 8 -#elif defined(_LIBC_REENTRANT) - str lr, [sp, #-4]! - cfi_adjust_cfa_offset (4) - cfi_rel_offset (lr, 0) - str r0, [sp, #-4]! - cfi_adjust_cfa_offset (4) - bl PLTJMP(C_SYMBOL_NAME(__errno_location)) - ldr r1, [sp], #4 - cfi_adjust_cfa_offset (-4) - str r1, [r0] - mvn r0, $0 - ldr pc, [sp], #4 -#else -#ifndef PIC - ldr r1, 1f - str r0, [r1] - mvn r0, $0 - DO_RET (r14) - -1: .long C_SYMBOL_NAME(errno) -#else - @ we have to establish our PIC register - ldr r2, 1f - ldr r1, 2f -0: add r2, pc, r2 - str r0, [r1, r2] - mvn r0, $0 - DO_RET (r14) - -1: .word _GLOBAL_OFFSET_TABLE_ - 0b - 8 -2: .word C_SYMBOL_NAME(errno)(GOTOFF) -#endif -#endif #undef __syscall_error END (__syscall_error) From b8ead09ab7d5eebd3e1596e353622e2235e7deb5 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sun, 11 Sep 2011 11:22:32 +0000 Subject: [PATCH 4107/4487] Remove USE_TLS conditionals for MIPS. --- ChangeLog.mips | 5 +++++ sysdeps/mips/dl-machine.h | 4 ++-- sysdeps/mips/libc-tls.c | 6 +----- sysdeps/mips/nptl/tls.h | 3 --- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 75f87fe418..0694fe85fc 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2011-09-11 Joseph Myers + + * sysdeps/mips/dl-machine.h, sysdeps/mips/libc-tls.c, + sysdeps/mips/nptl/tls.h: Don't define or use USE_TLS. + 2011-09-06 Joseph Myers [BZ #13109] diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 123b4d6b78..26e1fcb7db 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. MIPS version. - Copyright (C) 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 + Copyright (C) 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2011 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Kazumoto Kojima . @@ -343,7 +343,7 @@ elf_machine_reloc (struct link_map *map, ElfW(Addr) r_info, switch (r_type) { -#if defined (USE_TLS) && !defined (RTLD_BOOTSTRAP) +#if !defined (RTLD_BOOTSTRAP) # if _MIPS_SIM == _ABI64 case R_MIPS_TLS_DTPMOD64: case R_MIPS_TLS_DTPREL64: diff --git a/sysdeps/mips/libc-tls.c b/sysdeps/mips/libc-tls.c index a3d6301d1d..2c7805625b 100644 --- a/sysdeps/mips/libc-tls.c +++ b/sysdeps/mips/libc-tls.c @@ -1,5 +1,5 @@ /* Thread-local storage handling in the ELF dynamic linker. MIPS version. - Copyright (C) 2005 Free Software Foundation, Inc. + Copyright (C) 2005, 2011 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,8 +20,6 @@ #include #include -#if USE_TLS - /* On MIPS, linker optimizations are not required, so __tls_get_addr can be called even in statically linked binaries. In this case module must be always 1 and PT_TLS segment exist in the binary, otherwise it @@ -33,5 +31,3 @@ __tls_get_addr (tls_index *ti) dtv_t *dtv = THREAD_DTV (); return (char *) dtv[1].pointer.val + GET_ADDR_OFFSET; } - -#endif diff --git a/sysdeps/mips/nptl/tls.h b/sysdeps/mips/nptl/tls.h index 20f9f96832..2a89e34aaf 100644 --- a/sysdeps/mips/nptl/tls.h +++ b/sysdeps/mips/nptl/tls.h @@ -61,9 +61,6 @@ typedef union dtv # error "TLS support is required." #endif -/* Signal that TLS support is available. */ -#define USE_TLS 1 - #ifndef __ASSEMBLER__ /* Get system call information. */ From df62b0cd513b56515cb6378b55952696193fc1ef Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 11 Sep 2011 16:47:45 +0200 Subject: [PATCH 4108/4487] m68k: remove use of USE___THREAD --- ChangeLog.m68k | 5 +++++ sysdeps/unix/sysv/linux/m68k/sysdep.h | 14 +------------- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 8c85d5c81e..9f9950c9de 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2011-09-11 Andreas Schwab + + * sysdeps/unix/sysv/linux/m68k/sysdep.h: Remove use of + USE___THREAD. + 2011-06-23 Andreas Schwab * sysdeps/m68k/dl-trampoline.S (_dl_runtime_profile) diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h index d381189fe5..28113ac5cb 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -106,7 +106,7 @@ SYSCALL_ERROR_LABEL: \ a pointer (e.g., mmap). */ \ move.l %d0, %a0; \ rts; -# elif USE___THREAD +# elif defined _LIBC_REENTRANT # ifndef NOT_IN_libc # define SYSCALL_ERROR_ERRNO __libc_errno # else @@ -125,18 +125,6 @@ SYSCALL_ERROR_LABEL: \ a pointer (e.g., mmap). */ \ move.l %d0, %a0; \ rts; -# elif defined _LIBC_REENTRANT -# define SYSCALL_ERROR_HANDLER \ -SYSCALL_ERROR_LABEL: \ - neg.l %d0; \ - move.l %d0, -(%sp); \ - jbsr __errno_location@PLTPC; \ - move.l (%sp)+, (%a0); \ - move.l &-1, %d0; \ - /* Copy return value to %a0 for syscalls that are declared to return \ - a pointer (e.g., mmap). */ \ - move.l %d0, %a0; \ - rts; # else /* !_LIBC_REENTRANT */ /* Store (- %d0) into errno through the GOT. */ # define SYSCALL_ERROR_HANDLER \ From 57d2b48d397a98adb6ec71a83e6fe1c72774a74b Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 11 Sep 2011 16:48:42 +0200 Subject: [PATCH 4109/4487] m68k: remove use of USE_TLS --- ChangeLog.m68k | 4 ++++ sysdeps/m68k/dl-machine.h | 6 +++--- sysdeps/m68k/libc-tls.c | 6 +----- sysdeps/m68k/nptl/tls.h | 3 --- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 9f9950c9de..bac7afe09d 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,5 +1,9 @@ 2011-09-11 Andreas Schwab + * sysdeps/m68k/nptl/tls.h: Don't define USE_TLS. + * sysdeps/m68k/dl-machine.h: Remove use of USE_TLS. + * sysdeps/m68k/libc-tls.c: Likewise. + * sysdeps/unix/sysv/linux/m68k/sysdep.h: Remove use of USE___THREAD. diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index 9bc35e7694..8f8091eb9f 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. m68k version. - Copyright (C) 1996-2001, 2002, 2003, 2004, 2005, 2010 + Copyright (C) 1996-2001, 2002, 2003, 2004, 2005, 2010, 2011 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -269,7 +269,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, case R_68K_PC32: *reloc_addr = value + reloc->r_addend - (Elf32_Addr) reloc_addr; break; -#if defined USE_TLS && !defined RTLD_BOOTSTRAP +#ifndef RTLD_BOOTSTRAP case R_68K_TLS_DTPMOD32: /* Get the information from the link map returned by the resolv function. */ @@ -287,7 +287,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, *reloc_addr = TLS_TPREL_VALUE (sym_map, sym, reloc); } break; -#endif /* defined USE_TLS && !defined RTLD_BOOTSTRAP */ +#endif /* !RTLD_BOOTSTRAP */ case R_68K_NONE: /* Alright, Wilbur. */ break; default: diff --git a/sysdeps/m68k/libc-tls.c b/sysdeps/m68k/libc-tls.c index e865fac166..b16eac21ef 100644 --- a/sysdeps/m68k/libc-tls.c +++ b/sysdeps/m68k/libc-tls.c @@ -1,5 +1,5 @@ /* Thread-local storage handling in the ELF dynamic linker. m68k version. - Copyright (C) 2010 Free Software Foundation, Inc. + Copyright (C) 2010, 2011 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Maxim Kuvyrkov , 2010. @@ -21,8 +21,6 @@ #include #include -#if USE_TLS - /* On M68K, linker optimizations are not required, so __tls_get_addr can be called even in statically linked binaries. In this case module must be always 1 and PT_TLS segment exist in the binary, otherwise it @@ -34,5 +32,3 @@ __tls_get_addr (tls_index *ti) dtv_t *dtv = THREAD_DTV (); return (char *) dtv[1].pointer.val + GET_ADDR_OFFSET; } - -#endif diff --git a/sysdeps/m68k/nptl/tls.h b/sysdeps/m68k/nptl/tls.h index c29824cfbf..3c5b165d8f 100644 --- a/sysdeps/m68k/nptl/tls.h +++ b/sysdeps/m68k/nptl/tls.h @@ -43,9 +43,6 @@ typedef union dtv # include #endif /* __ASSEMBLER__ */ -/* Signal that TLS support is available. */ -#define USE_TLS 1 - #ifndef __ASSEMBLER__ /* Get system call information. */ From 6136cdd6dd1558bffd067b8e766d1cdf35323a69 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 13 Sep 2011 15:52:57 +0000 Subject: [PATCH 4110/4487] Remove HAVE_TLS_SUPPORT conditionals for ARM. --- ChangeLog.arm | 9 ++ sysdeps/arm/elf/configure | 109 +++++++++++++++++--- sysdeps/arm/elf/configure.in | 6 +- sysdeps/arm/nptl/tls.h | 5 - sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S | 4 - 5 files changed, 104 insertions(+), 29 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 93eee307cf..51e477c8c1 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,12 @@ +2011-09-13 Joseph Myers + + * sysdeps/arm/elf/configure.in: Always test for TLS support and + error out in case it is missing. + * sysdeps/arm/elf/configure: Regenerate. + * sysdeps/arm/nptl/tls.h, + sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S: Remove tests for + HAVE_TLS_SUPPORT. + 2011-09-11 Joseph Myers * sysdeps/arm/dl-machine.h, sysdeps/arm/dl-tlsdesc.S, diff --git a/sysdeps/arm/elf/configure b/sysdeps/arm/elf/configure index 234fc20c5e..49d57a4da4 100644 --- a/sysdeps/arm/elf/configure +++ b/sysdeps/arm/elf/configure @@ -1,13 +1,94 @@ + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + # This file is generated from configure.in by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/arm/elf. -if test "$usetls" != no; then # Check for support of thread-local storage handling in assembler and # linker. -echo "$as_me:$LINENO: checking for ARM TLS support" >&5 -echo $ECHO_N "checking for ARM TLS support... $ECHO_C" >&6 -if test "${libc_cv_arm_tls+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ARM TLS support" >&5 +$as_echo_n "checking for ARM TLS support... " >&6; } +if ${libc_cv_arm_tls+:} false; then : + $as_echo_n "(cached) " >&6 else cat > conftest.s <<\EOF .section ".tdata", "awT", %progbits @@ -21,25 +102,21 @@ bar: .skip 4 .word foo(tlsgd) EOF if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then libc_cv_arm_tls=yes else libc_cv_arm_tls=no fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $libc_cv_arm_tls" >&5 -echo "${ECHO_T}$libc_cv_arm_tls" >&6 -if test $libc_cv_arm_tls = yes; then - cat >>confdefs.h <<\_ACEOF -#define HAVE_TLS_SUPPORT 1 -_ACEOF - -fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_arm_tls" >&5 +$as_echo "$libc_cv_arm_tls" >&6; } +if test $libc_cv_arm_tls = no; then + as_fn_error $? "the assembler must support TLS" "$LINENO" 5 fi #AC_DEFINE(PI_STATIC_AND_HIDDEN) diff --git a/sysdeps/arm/elf/configure.in b/sysdeps/arm/elf/configure.in index 1045296774..123a32186f 100644 --- a/sysdeps/arm/elf/configure.in +++ b/sysdeps/arm/elf/configure.in @@ -1,7 +1,6 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. # Local configure fragment for sysdeps/arm/elf. -if test "$usetls" != no; then # Check for support of thread-local storage handling in assembler and # linker. AC_CACHE_CHECK(for ARM TLS support, libc_cv_arm_tls, [dnl @@ -23,9 +22,8 @@ else libc_cv_arm_tls=no fi rm -f conftest*]) -if test $libc_cv_arm_tls = yes; then - AC_DEFINE(HAVE_TLS_SUPPORT) -fi +if test $libc_cv_arm_tls = no; then + AC_MSG_ERROR([the assembler must support TLS]) fi dnl It is always possible to access static and hidden symbols in an diff --git a/sysdeps/arm/nptl/tls.h b/sysdeps/arm/nptl/tls.h index 82a6881652..16c970643b 100644 --- a/sysdeps/arm/nptl/tls.h +++ b/sysdeps/arm/nptl/tls.h @@ -43,11 +43,6 @@ typedef union dtv #endif /* __ASSEMBLER__ */ -/* We require TLS support in the tools. */ -#ifndef HAVE_TLS_SUPPORT -# error "TLS support is required." -#endif - #ifndef __ASSEMBLER__ /* Get system call information. */ diff --git a/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S b/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S index 7691a94b1e..8eeff6b26a 100644 --- a/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S +++ b/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S @@ -35,8 +35,6 @@ #include -#ifdef HAVE_TLS_SUPPORT - /* GCC will emit calls to this routine under -mtp=soft. Linux has an equivalent helper function (which clobbers fewer registers than a normal function call) in a high page of memory; tail call to the @@ -47,5 +45,3 @@ ENTRY (__aeabi_read_tp) mov r0, #0xffff0fff sub pc, r0, #31 END (__aeabi_read_tp) - -#endif From 329c2e635813fac3a18bbe052474c1b1eea7526e Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 13 Sep 2011 15:55:38 +0000 Subject: [PATCH 4111/4487] Remove HAVE_TLS_SUPPORT conditionals for MIPS. --- ChangeLog.mips | 7 +++ sysdeps/mips/elf/configure | 109 +++++++++++++++++++++++++++++----- sysdeps/mips/elf/configure.in | 6 +- sysdeps/mips/nptl/tls.h | 5 -- 4 files changed, 102 insertions(+), 25 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 0694fe85fc..b99b3386c8 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,10 @@ +2011-09-13 Joseph Myers + + * sysdeps/mips/elf/configure.in: Always test for TLS support and + error out in case it is missing. + * sysdeps/mips/elf/configure: Regenerate. + * sysdeps/mips/nptl/tls.h: Remove test for HAVE_TLS_SUPPORT. + 2011-09-11 Joseph Myers * sysdeps/mips/dl-machine.h, sysdeps/mips/libc-tls.c, diff --git a/sysdeps/mips/elf/configure b/sysdeps/mips/elf/configure index 3d90a1e420..3cf02e0f12 100644 --- a/sysdeps/mips/elf/configure +++ b/sysdeps/mips/elf/configure @@ -1,13 +1,94 @@ + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + # This file is generated from configure.in by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/mips/elf. -if test "$usetls" != no; then # Check for support of thread-local storage handling in assembler and # linker. -echo "$as_me:$LINENO: checking for MIPS TLS support" >&5 -echo $ECHO_N "checking for MIPS TLS support... $ECHO_C" >&6 -if test "${libc_cv_mips_tls+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MIPS TLS support" >&5 +$as_echo_n "checking for MIPS TLS support... " >&6; } +if ${libc_cv_mips_tls+:} false; then : + $as_echo_n "(cached) " >&6 else cat > conftest.s <<\EOF .section ".tdata", "awT", %progbits @@ -23,24 +104,20 @@ bar: .skip 4 addiu $4, $28, %tlsgd(x) EOF if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then libc_cv_mips_tls=yes else libc_cv_mips_tls=no fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $libc_cv_mips_tls" >&5 -echo "${ECHO_T}$libc_cv_mips_tls" >&6 -if test $libc_cv_mips_tls = yes; then - cat >>confdefs.h <<\_ACEOF -#define HAVE_TLS_SUPPORT 1 -_ACEOF - -fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_mips_tls" >&5 +$as_echo "$libc_cv_mips_tls" >&6; } +if test $libc_cv_mips_tls = no; then + as_fn_error $? "the assembler must support TLS" "$LINENO" 5 fi diff --git a/sysdeps/mips/elf/configure.in b/sysdeps/mips/elf/configure.in index ecb9108c12..5cb5a742ec 100644 --- a/sysdeps/mips/elf/configure.in +++ b/sysdeps/mips/elf/configure.in @@ -1,7 +1,6 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. # Local configure fragment for sysdeps/mips/elf. -if test "$usetls" != no; then # Check for support of thread-local storage handling in assembler and # linker. AC_CACHE_CHECK(for MIPS TLS support, libc_cv_mips_tls, [dnl @@ -25,9 +24,8 @@ else libc_cv_mips_tls=no fi rm -f conftest*]) -if test $libc_cv_mips_tls = yes; then - AC_DEFINE(HAVE_TLS_SUPPORT) -fi +if test $libc_cv_mips_tls = no; then + AC_MSG_ERROR([the assembler must support TLS]) fi dnl No MIPS GCC supports accessing static and hidden symbols in an diff --git a/sysdeps/mips/nptl/tls.h b/sysdeps/mips/nptl/tls.h index 2a89e34aaf..0f215d4473 100644 --- a/sysdeps/mips/nptl/tls.h +++ b/sysdeps/mips/nptl/tls.h @@ -56,11 +56,6 @@ typedef union dtv #endif /* __ASSEMBLER__ */ -/* We require TLS support in the tools. */ -#ifndef HAVE_TLS_SUPPORT -# error "TLS support is required." -#endif - #ifndef __ASSEMBLER__ /* Get system call information. */ From 560d4a5882df782e1ede396870ec18e382842bae Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 13 Sep 2011 16:04:03 +0000 Subject: [PATCH 4112/4487] Cast __cmsg_nxthdr return value for MIPS. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/bits/socket.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index b99b3386c8..8da2af2fba 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2011-09-13 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/socket.h (__cmsg_nxthdr): Cast + return value to (struct cmsghdr *). + 2011-09-13 Joseph Myers * sysdeps/mips/elf/configure.in: Always test for TLS support and diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h index 2399490926..4aacfae994 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/socket.h +++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h @@ -312,7 +312,7 @@ __NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg)) { if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr)) /* The kernel header does this so there may be a reason. */ - return 0; + return (struct cmsghdr *) 0; __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)); @@ -321,7 +321,7 @@ __NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg)) || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len) > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen))) /* No more entries. */ - return 0; + return (struct cmsghdr *) 0; return __cmsg; } #endif /* Use `extern inline'. */ From 989edf2cb0254faa4c7a2e46410bede16c2c0219 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 5 Oct 2011 11:50:05 +0200 Subject: [PATCH 4113/4487] alpha: don't call ifunc functions in trace mode --- ChangeLog.alpha | 7 ++++++- sysdeps/alpha/dl-machine.h | 8 +++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 55f8768987..b7d6bb1afb 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,8 @@ +2011-10-05 Andreas Schwab + + * sysdeps/alpha/dl-machine.h (elf_machine_rela) + (elf_machine_lazy_rel): Add parameter skip_ifunc. + 2011-03-28 Aurelien Jarno * sysdeps/unix/sysv/linux/alpha/____longjmp_chk.S(____longjmp_chk): @@ -48,7 +53,7 @@ Define without 64-bit aliases. 2010-05-03 Aurelien Jarno - + * sysdeps/alpha/memchr.S: Use prefetch load. * sysdeps/alpha/alphaev6/memchr.S: Likewise. diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index e4a502208c..2790ae5702 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. Alpha version. - Copyright (C) 1996-2005, 2006 Free Software Foundation, Inc. + Copyright (C) 1996-2005, 2006, 2011 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson . @@ -371,7 +371,8 @@ elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc, const Elf64_Sym *sym, const struct r_found_version *version, - void *const reloc_addr_arg) + void *const reloc_addr_arg, + int skip_ifunc) { Elf64_Addr *const reloc_addr = reloc_addr_arg; unsigned long int const r_type = ELF64_R_TYPE (reloc->r_info); @@ -514,7 +515,8 @@ elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc, auto inline void __attribute__ ((always_inline)) elf_machine_lazy_rel (struct link_map *map, - Elf64_Addr l_addr, const Elf64_Rela *reloc) + Elf64_Addr l_addr, const Elf64_Rela *reloc, + int skip_ifunc) { Elf64_Addr * const reloc_addr = (void *)(l_addr + reloc->r_offset); unsigned long int const r_type = ELF64_R_TYPE (reloc->r_info); From bf5316f3a608b608da66b4d6e9b61a4da035fb35 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 5 Oct 2011 11:51:18 +0200 Subject: [PATCH 4114/4487] am33: don't call ifunc functions in trace mode --- ChangeLog.am33 | 5 +++++ sysdeps/am33/dl-machine.h | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog.am33 b/ChangeLog.am33 index e9b19bd3c4..ccffef38fc 100644 --- a/ChangeLog.am33 +++ b/ChangeLog.am33 @@ -1,3 +1,8 @@ +2011-10-05 Andreas Schwab + + * sysdeps/am33/dl-machine.h (elf_machine_rela) + (elf_machine_lazy_rel): Add parameter skip_ifunc. + 2007-10-22 Daniel Jacobowitz * sysdeps/unix/sysv/linux/am33/bits/fcntl.h (F_DUPFD_CLOEXEC): Define. diff --git a/sysdeps/am33/dl-machine.h b/sysdeps/am33/dl-machine.h index 808fd9cc82..ffd866ac1f 100644 --- a/sysdeps/am33/dl-machine.h +++ b/sysdeps/am33/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. AM33 version. - Copyright (C) 1995,96,97,98,99,2000,2001, 2004 + Copyright (C) 1995,96,97,98,99,2000,2001, 2004, 2011 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -296,7 +296,7 @@ elf_machine_plt_value (struct link_map *map, const Elf32_Rela *reloc, static inline void elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, const Elf32_Sym *sym, const struct r_found_version *version, - void *const reloc_addr_arg) + void *const reloc_addr_arg, int skip_ifunc) { const unsigned int r_type = ELF32_R_TYPE (reloc->r_info); Elf32_Addr value, *reloc_addr; @@ -457,7 +457,8 @@ elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, static inline void elf_machine_lazy_rel (struct link_map *map, - Elf32_Addr l_addr, const Elf32_Rela *reloc) + Elf32_Addr l_addr, const Elf32_Rela *reloc, + int skip_ifunc) { unsigned long int const r_type = ELF32_R_TYPE (reloc->r_info); From 0507f293c9b67d8eec92e8178308d72f1ed88449 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 5 Oct 2011 11:51:41 +0200 Subject: [PATCH 4115/4487] arm: don't call ifunc functions in trace mode --- ChangeLog.arm | 22 ++++++++++++++-------- sysdeps/arm/dl-machine.h | 29 +++++++++++++++-------------- 2 files changed, 29 insertions(+), 22 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 51e477c8c1..ba319b8320 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,9 @@ +2011-10-05 Andreas Schwab + + * sysdeps/arm/dl-machine.h (elf_machine_rel, elf_machine_rela) + (elf_machine_lazy_rel): Add parameter skip_ifunc, don't call ifunc + function if non-zero. + 2011-09-13 Joseph Myers * sysdeps/arm/elf/configure.in: Always test for TLS support and @@ -370,7 +376,7 @@ file. 2009-10-22 Andrew Stubbs - Julian Brown + Julian Brown * sysdeps/arm/eabi/setjmp.S (__sigsetjmp): Replace deprecated instruction fstmiax with vstmia. @@ -415,9 +421,9 @@ (setup_aeabi_stdio): New function. Add it to .preinit_array. 2009-06-24 Maxim Kuvyrkov - Mark Mitchell - Joseph Myers - Kazu Hirata + Mark Mitchell + Joseph Myers + Kazu Hirata * sysdeps/arm/eabi/backtrace.c: New. * sysdeps/arm/eabi/Makefile (CFLAGS-backtrace.c): Add @@ -478,17 +484,17 @@ 2009-02-13 Khem Raj - * sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c + * sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c (libgcc_s_handle): New variable. (pthread_cancel_init): Depend in libgcc_s_handle for decision to load DSO. Assign last. (__unwind_freeres): New function. - * sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c: + * sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c: Likewise. 2009-02-05 Paul Brook - Joseph Myers + Joseph Myers * sysdeps/arm/dl-machine.h (elf_machine_dynamic): Ditto. (elf_machine_load_address): Clear T bit of PLT entry contents. @@ -894,7 +900,7 @@ 2006-06-08 Mark Shinwell - * sysdeps/arm/nptl/pthreaddef.h (CURRENT_STACK_FRAME): Add -12. + * sysdeps/arm/nptl/pthreaddef.h (CURRENT_STACK_FRAME): Add -12. 2006-06-08 Daniel Jacobowitz diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 1ba77009b1..5a58965604 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -335,7 +335,7 @@ auto inline void __attribute__ ((always_inline)) elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, const Elf32_Sym *sym, const struct r_found_version *version, - void *const reloc_addr_arg) + void *const reloc_addr_arg, int skip_ifunc) { Elf32_Addr *const reloc_addr = reloc_addr_arg; const unsigned int r_type = ELF32_R_TYPE (reloc->r_info); @@ -369,9 +369,9 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, Elf32_Addr value = sym_map == NULL ? 0 : sym_map->l_addr + sym->st_value; if (sym != NULL - && __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, - 0) - && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1)) + && __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, 0) + && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1) + && __builtin_expect (!skip_ifunc, 1)) value = ((Elf32_Addr (*) (void)) value) (); switch (r_type) @@ -430,7 +430,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, } case R_ARM_TLS_DESC: { - struct tlsdesc volatile *td = + struct tlsdesc volatile *td = (struct tlsdesc volatile *)reloc_addr; # ifndef RTLD_BOOTSTRAP @@ -454,10 +454,10 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, else # endif # endif - { + { td->argument.value = value + sym_map->l_tls_offset; td->entry = _dl_tlsdesc_return; - } + } } } break; @@ -525,7 +525,7 @@ auto inline void __attribute__ ((always_inline)) elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, const Elf32_Sym *sym, const struct r_found_version *version, - void *const reloc_addr_arg) + void *const reloc_addr_arg, int skip_ifunc) { Elf32_Addr *const reloc_addr = reloc_addr_arg; const unsigned int r_type = ELF32_R_TYPE (reloc->r_info); @@ -543,9 +543,9 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, Elf32_Addr value = sym_map == NULL ? 0 : sym_map->l_addr + sym->st_value; if (sym != NULL - && __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, - 0) - && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1)) + && __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, 0) + && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1) + && __builtin_expect (!skip_ifunc, 1)) value = ((Elf32_Addr (*) (void)) value) (); switch (r_type) @@ -656,7 +656,8 @@ elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, auto inline void __attribute__ ((always_inline)) elf_machine_lazy_rel (struct link_map *map, - Elf32_Addr l_addr, const Elf32_Rel *reloc) + Elf32_Addr l_addr, const Elf32_Rel *reloc, + int skip_ifunc) { Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset); const unsigned int r_type = ELF32_R_TYPE (reloc->r_info); @@ -674,8 +675,8 @@ elf_machine_lazy_rel (struct link_map *map, (struct tlsdesc volatile *)reloc_addr; /* The linker must have given us the parameter we need in the - first GOT entry, and left the second one empty. We fill the - last with the resolver address */ + first GOT entry, and left the second one empty. We fill the + last with the resolver address */ assert (td->entry == 0); td->entry = (void*)(D_PTR (map, l_info[ADDRIDX (DT_TLSDESC_PLT)]) + map->l_addr); From 86a90a837cde86d73d23216ea22cb153cddf4959 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 5 Oct 2011 11:52:26 +0200 Subject: [PATCH 4116/4487] cris: don't call ifunc functions in trace mode --- ChangeLog.cris | 5 +++++ sysdeps/cris/dl-machine.h | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog.cris b/ChangeLog.cris index 810b53b329..da1ad973f1 100644 --- a/ChangeLog.cris +++ b/ChangeLog.cris @@ -1,3 +1,8 @@ +2011-10-05 Andreas Schwab + + * sysdeps/cris/dl-machine.h (elf_machine_rela) + (elf_machine_lazy_rel): Add parameter skip_ifunc. + 2007-10-22 Daniel Jacobowitz * sysdeps/unix/sysv/linux/cris/bits/fcntl.h (F_DUPFD_CLOEXEC): Define. diff --git a/sysdeps/cris/dl-machine.h b/sysdeps/cris/dl-machine.h index 368733e73f..cc3701e591 100644 --- a/sysdeps/cris/dl-machine.h +++ b/sysdeps/cris/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. CRIS version. - Copyright (C) 1996-2001, 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 1996-2001, 2002, 2003, 2011 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 @@ -285,7 +285,7 @@ elf_machine_plt_value (struct link_map *map, const Elf32_Rela *reloc, static inline void elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, const Elf32_Sym *sym, const struct r_found_version *version, - void *const reloc_addr_arg) + void *const reloc_addr_arg, int skip_ifunc) { Elf32_Addr *const reloc_addr = reloc_addr_arg; const unsigned int r_type = ELF32_R_TYPE (reloc->r_info); @@ -378,7 +378,8 @@ elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, static inline void elf_machine_lazy_rel (struct link_map *map, - Elf32_Addr l_addr, const Elf32_Rela *reloc) + Elf32_Addr l_addr, const Elf32_Rela *reloc, + int skip_ifunc) { Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset); const unsigned int r_type = ELF32_R_TYPE (reloc->r_info); From 09272d2c9fb2e6c73679d25e227e55c29f4362de Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 5 Oct 2011 11:52:45 +0200 Subject: [PATCH 4117/4487] hppa: don't call ifunc functions in trace mode --- ChangeLog.hppa | 15 ++- sysdeps/hppa/dl-machine.h | 244 +++++++++++++++++++------------------- 2 files changed, 133 insertions(+), 126 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 2ccc911430..f4cabb6b45 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,7 +1,12 @@ +2011-10-05 Andreas Schwab + + * sysdeps/hppa/dl-machine.h (elf_machine_rela) + (elf_machine_lazy_rel): Add parameter skip_ifunc. + 2010-06-24 Carlos O'Donell - * sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S: Only create stack - frame around call to SYSCALL_ERROR_HANDLER. Do not restore %rp + * sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S: Only create stack + frame around call to SYSCALL_ERROR_HANDLER. Do not restore %rp from the stack frame on successfull return. 2010-06-23 Carlos O'Donell @@ -10,12 +15,12 @@ Document that this function is a non-standard calling ABI. Document register usage. (__getcontext): Use normal %sp without adjustment. Use named - resgister %sp. + resgister %sp. * sysdeps/unix/sysv/linux/hppa/makecontext.c: Remove FRAME_SIZE. Define FRAME_SIZE_UL, FRAME_SIZE_BYTES, ARGS. - (__makecontext): Create and setup a stack frame. + (__makecontext): Create and setup a stack frame. * sysdeps/unix/sysv/linux/hppa/setcontext.S (__setcontext): - Use named register %sp. Do not use oSS_SP. + Use named register %sp. Do not use oSS_SP. 2010-06-07 Andreas Schwab diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h index e462fd3354..72dba8f204 100644 --- a/sysdeps/hppa/dl-machine.h +++ b/sysdeps/hppa/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. PA-RISC version. - Copyright (C) 1995-1997,1999-2003 + Copyright (C) 1995-1997,1999-2003,2011 Free Software Foundation, Inc. Contributed by David Huggins-Daines This file is part of the GNU C Library. @@ -33,19 +33,19 @@ #include #include -/* These two definitions must match the definition of the stub in +/* These two definitions must match the definition of the stub in bfd/elf32-hppa.c (see plt_stub[]). - + a. Define the size of the *entire* stub we place at the end of the PLT table (right up against the GOT). - + b. Define the number of bytes back from the GOT to the entry point of the PLT stub. You see the PLT stub must be entered in the middle - so it can depwi to find it's own address (long jump stub) - + so it can depwi to find it's own address (long jump stub) + c. Define the size of a single PLT entry so we can jump over the last entry to get the stub address */ - + #define SIZEOF_PLT_STUB (7*4) #define GOT_FROM_PLT_STUB (4*4) #define PLT_ENTRY_SIZE (2*4) @@ -110,8 +110,8 @@ elf_machine_load_address (void) return dynamic - elf_machine_dynamic (); } -/* Fixup a PLT entry to bounce directly to the function at VALUE. */ -static inline struct fdesc __attribute__ ((always_inline)) +/* Fixup a PLT entry to bounce directly to the function at VALUE. */ +static inline struct fdesc __attribute__ ((always_inline)) elf_machine_fixup_plt (struct link_map *map, lookup_t t, const Elf32_Rela *reloc, Elf32_Addr *reloc_addr, struct fdesc value) @@ -127,7 +127,7 @@ elf_machine_fixup_plt (struct link_map *map, lookup_t t, } /* Return the final value of a plt relocation. */ -static inline struct fdesc +static inline struct fdesc elf_machine_plt_value (struct link_map *map, const Elf32_Rela *reloc, struct fdesc value) { @@ -149,106 +149,106 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) unsigned char c[8]; Elf32_Addr i[2]; } sig = {{0x00,0xc0,0xff,0xee, 0xde,0xad,0xbe,0xef}}; - + /* If we don't have a PLT we can just skip all this... */ if (__builtin_expect (l->l_info[DT_JMPREL] == NULL,0)) return lazy; - - /* All paths use these values */ + + /* All paths use these values */ l_addr = l->l_addr; jmprel = D_PTR(l, l_info[DT_JMPREL]); end_jmprel = jmprel + l->l_info[DT_PLTRELSZ]->d_un.d_val; - + extern void _dl_runtime_resolve (void); extern void _dl_runtime_profile (void); - + /* Linking lazily */ if (lazy) { /* FIXME: Search for the got, but backwards through the relocs, technically we should - find it on the first try. However, assuming the relocs got out of order the - routine is made a bit more robust by searching them all in case of failure. */ + find it on the first try. However, assuming the relocs got out of order the + routine is made a bit more robust by searching them all in case of failure. */ for (iplt = (end_jmprel - sizeof(Elf32_Rela)); iplt >= jmprel; iplt -= sizeof (Elf32_Rela)) - { - + { + reloc = (const Elf32_Rela *) iplt; - r_type = ELF32_R_TYPE (reloc->r_info); - r_sym = ELF32_R_SYM (reloc->r_info); + r_type = ELF32_R_TYPE (reloc->r_info); + r_sym = ELF32_R_SYM (reloc->r_info); - got = (Elf32_Addr *) (reloc->r_offset + l_addr + PLT_ENTRY_SIZE + SIZEOF_PLT_STUB); + got = (Elf32_Addr *) (reloc->r_offset + l_addr + PLT_ENTRY_SIZE + SIZEOF_PLT_STUB); - /* If we aren't an IPLT, and we aren't NONE then it's a bad reloc */ - if (__builtin_expect (r_type != R_PARISC_IPLT, 0)) + /* If we aren't an IPLT, and we aren't NONE then it's a bad reloc */ + if (__builtin_expect (r_type != R_PARISC_IPLT, 0)) { if (__builtin_expect (r_type != R_PARISC_NONE, 0)) - _dl_reloc_bad_type (l, r_type, 1); + _dl_reloc_bad_type (l, r_type, 1); continue; } - - /* Check for the plt_stub that binutils placed here for us - to use with _dl_runtime_resolve */ - if (got[-2] != sig.i[0] || got[-1] != sig.i[1]) - { - got = NULL; /* Not the stub... keep looking */ - } - else + + /* Check for the plt_stub that binutils placed here for us + to use with _dl_runtime_resolve */ + if (got[-2] != sig.i[0] || got[-1] != sig.i[1]) + { + got = NULL; /* Not the stub... keep looking */ + } + else { - /* Found the GOT! */ - register Elf32_Addr ltp __asm__ ("%r19"); - - /* Identify this shared object. Second entry in the got. */ - got[1] = (Elf32_Addr) l; - - /* This function will be called to perform the relocation. */ - if (__builtin_expect (!profile, 1)) - { - /* If a static application called us, then _dl_runtime_resolve is not + /* Found the GOT! */ + register Elf32_Addr ltp __asm__ ("%r19"); + + /* Identify this shared object. Second entry in the got. */ + got[1] = (Elf32_Addr) l; + + /* This function will be called to perform the relocation. */ + if (__builtin_expect (!profile, 1)) + { + /* If a static application called us, then _dl_runtime_resolve is not a function descriptor, but the *real* address of the function... */ if((unsigned long) &_dl_runtime_resolve & 3) { - got[-2] = (Elf32_Addr) ((struct fdesc *) - ((unsigned long) &_dl_runtime_resolve & ~3))->ip; + got[-2] = (Elf32_Addr) ((struct fdesc *) + ((unsigned long) &_dl_runtime_resolve & ~3))->ip; } else { /* Static executable! */ - got[-2] = (Elf32_Addr) &_dl_runtime_resolve; + got[-2] = (Elf32_Addr) &_dl_runtime_resolve; } - } - else - { - if (GLRO(dl_profile) != NULL + } + else + { + if (GLRO(dl_profile) != NULL && _dl_name_match_p (GLRO(dl_profile), l)) - { + { /* This is the object we are looking for. Say that - we really want profiling and the timers are - started. */ - GL(dl_profile_map) = l; - } + we really want profiling and the timers are + started. */ + GL(dl_profile_map) = l; + } if((unsigned long) &_dl_runtime_profile & 3) { - got[-2] = (Elf32_Addr) ((struct fdesc *) - ((unsigned long) &_dl_runtime_profile & ~3))->ip; + got[-2] = (Elf32_Addr) ((struct fdesc *) + ((unsigned long) &_dl_runtime_profile & ~3))->ip; } else { /* Static executable */ - got[-2] = (Elf32_Addr) &_dl_runtime_profile; + got[-2] = (Elf32_Addr) &_dl_runtime_profile; } - } - /* Plunk in the gp of this function descriptor so we - can make the call to _dl_runtime_xxxxxx */ - got[-1] = ltp; - break; - /* Done looking for the GOT, and stub is setup */ - } /* else we found the GOT */ - } /* for, walk the relocs backwards */ - - if(!got) - return 0; /* No lazy linking for you! */ - - /* Process all the relocs, now that we know the GOT... */ + } + /* Plunk in the gp of this function descriptor so we + can make the call to _dl_runtime_xxxxxx */ + got[-1] = ltp; + break; + /* Done looking for the GOT, and stub is setup */ + } /* else we found the GOT */ + } /* for, walk the relocs backwards */ + + if(!got) + return 0; /* No lazy linking for you! */ + + /* Process all the relocs, now that we know the GOT... */ for (iplt = jmprel; iplt < end_jmprel; iplt += sizeof (Elf32_Rela)) { reloc = (const Elf32_Rela *) iplt; @@ -276,25 +276,25 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) fptr->gp = D_PTR (l, l_info[DT_PLTGOT]); } } /* r_type == R_PARISC_IPLT */ - } /* for all the relocations */ + } /* for all the relocations */ } /* if lazy */ else { for (iplt = jmprel; iplt < end_jmprel; iplt += sizeof (Elf32_Rela)) - { - reloc = (const Elf32_Rela *) iplt; - r_type = ELF32_R_TYPE (reloc->r_info); - r_sym = ELF32_R_SYM (reloc->r_info); - - if (__builtin_expect ((r_type == R_PARISC_IPLT) && (r_sym == 0), 1)) - { - fptr = (struct fdesc *) (reloc->r_offset + l_addr); - /* Relocate this *ABS* entry, set only the gp, the rest is set later - when elf_machine_rela_relative is called (WITHOUT the linkmap) */ - fptr->gp = D_PTR (l, l_info[DT_PLTGOT]); - } /* r_type == R_PARISC_IPLT */ - } /* for all the relocations */ - } + { + reloc = (const Elf32_Rela *) iplt; + r_type = ELF32_R_TYPE (reloc->r_info); + r_sym = ELF32_R_SYM (reloc->r_info); + + if (__builtin_expect ((r_type == R_PARISC_IPLT) && (r_sym == 0), 1)) + { + fptr = (struct fdesc *) (reloc->r_offset + l_addr); + /* Relocate this *ABS* entry, set only the gp, the rest is set later + when elf_machine_rela_relative is called (WITHOUT the linkmap) */ + fptr->gp = D_PTR (l, l_info[DT_PLTGOT]); + } /* r_type == R_PARISC_IPLT */ + } /* for all the relocations */ + } return lazy; } @@ -441,7 +441,7 @@ asm ( \ " ldw -44(%sp),%r24\n" \ \ /* _dl_fini is a local function in the loader, so we construct \ - a false OPD here and pass this to the application. */ \ + a false OPD here and pass this to the application. */ \ /* FIXME: Should be able to use P%, and LR RR to have the \ the linker construct a proper OPD. */ \ " .section .data\n" \ @@ -462,7 +462,7 @@ asm ( \ " depi 2,31,2,%r23\n" /* delay slot */ \ ); -/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry or +/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry or a TLS variable, so references should not be allowed to define the value. ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one of the main executable's symbols, as for a COPY reloc. */ @@ -505,7 +505,7 @@ dl_platform_init (void) /* Avoid an empty string which would disturb us. */ GLRO(dl_platform) = NULL; } - + #endif /* !dl_machine_h */ /* These are only actually used where RESOLVE_MAP is defined, anyway. */ @@ -523,11 +523,12 @@ dl_platform_init (void) | (((as14) & 0x2000) >> 13)) auto void __attribute__((always_inline)) -elf_machine_rela (struct link_map *map, +elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, - const Elf32_Sym *sym, + const Elf32_Sym *sym, const struct r_found_version *version, - void *const reloc_addr_arg) + void *const reloc_addr_arg, + int skip_ifunc) { Elf32_Addr *const reloc_addr = reloc_addr_arg; const Elf32_Sym *const refsym = sym; @@ -557,7 +558,7 @@ elf_machine_rela (struct link_map *map, # else sym_map = RESOLVE_MAP (&sym, version, r_type); # endif - + if (sym_map) { value = sym ? sym_map->l_addr + sym->st_value : 0; @@ -584,7 +585,7 @@ elf_machine_rela (struct link_map *map, case R_PARISC_DIR21L: { unsigned int insn = *(unsigned int *)reloc_addr; - value = sym_map->l_addr + sym->st_value + value = sym_map->l_addr + sym->st_value + ((reloc->r_addend + 0x1000) & -0x2000); value = value >> 11; insn = (insn &~ 0x1fffff) | reassemble_21 (value); @@ -595,7 +596,7 @@ elf_machine_rela (struct link_map *map, case R_PARISC_DIR14R: { unsigned int insn = *(unsigned int *)reloc_addr; - value = ((sym_map->l_addr + sym->st_value) & 0x7ff) + value = ((sym_map->l_addr + sym->st_value) & 0x7ff) + (((reloc->r_addend & 0x1fff) ^ 0x1000) - 0x1000); insn = (insn &~ 0x3fff) | reassemble_14 (value); *(unsigned int *)reloc_addr = insn; @@ -604,17 +605,17 @@ elf_machine_rela (struct link_map *map, case R_PARISC_PLABEL32: /* Easy rule: If there is a symbol and it is global, then we - need to make a dynamic function descriptor. Otherwise we - have the address of a PLT slot for a local symbol which we - know to be unique. */ + need to make a dynamic function descriptor. Otherwise we + have the address of a PLT slot for a local symbol which we + know to be unique. */ if (sym == NULL || sym_map == NULL || ELF32_ST_BIND (sym->st_info) == STB_LOCAL) - { + { break; - } + } /* Set bit 30 to indicate to $$dyncall that this is a PLABEL. - We have to do this outside of the generic function descriptor + We have to do this outside of the generic function descriptor code, since it doesn't know about our requirement for setting protection bits */ value = (Elf32_Addr)((unsigned int)_dl_make_fptr (sym_map, sym, value) | 2); @@ -625,17 +626,17 @@ elf_machine_rela (struct link_map *map, { unsigned int insn = *(unsigned int *)reloc_addr; - if (__builtin_expect (sym == NULL, 0)) - break; + if (__builtin_expect (sym == NULL, 0)) + break; - value = (Elf32_Addr)((unsigned int)_dl_make_fptr (sym_map, sym, value) | 2); + value = (Elf32_Addr)((unsigned int)_dl_make_fptr (sym_map, sym, value) | 2); - if (r_type == R_PARISC_PLABEL21L) + if (r_type == R_PARISC_PLABEL21L) { value >>= 11; insn = (insn &~ 0x1fffff) | reassemble_21 (value); } - else + else { value &= 0x7ff; insn = (insn &~ 0x3fff) | reassemble_14 (value); @@ -647,16 +648,16 @@ elf_machine_rela (struct link_map *map, case R_PARISC_IPLT: if (__builtin_expect (sym_map != NULL, 1)) - { - elf_machine_fixup_plt (NULL, sym_map, reloc, reloc_addr, + { + elf_machine_fixup_plt (NULL, sym_map, reloc, reloc_addr, DL_FIXUP_MAKE_VALUE(sym_map, value)); - } - else - { + } + else + { /* If we get here, it's a (weak) undefined sym. */ - elf_machine_fixup_plt (NULL, map, reloc, reloc_addr, + elf_machine_fixup_plt (NULL, map, reloc, reloc_addr, DL_FIXUP_MAKE_VALUE(map, value)); - } + } return; case R_PARISC_COPY: @@ -687,21 +688,21 @@ elf_machine_rela (struct link_map *map, case R_PARISC_TLS_DTPOFF32: /* During relocation all TLS symbols are defined and used. - Therefore the offset is already correct. */ + Therefore the offset is already correct. */ if (sym != NULL) - *reloc_addr = sym->st_value; + *reloc_addr = sym->st_value; return; case R_PARISC_TLS_TPREL32: /* The offset is negative, forward from the thread pointer */ if (sym != NULL) - { - CHECK_STATIC_TLS (map, sym_map); + { + CHECK_STATIC_TLS (map, sym_map); value = sym_map->l_tls_offset + sym->st_value + reloc->r_addend; } break; #endif /* use TLS */ - + case R_PARISC_NONE: /* Alright, Wilbur. */ return; @@ -721,13 +722,13 @@ elf_machine_rela_relative (Elf32_Addr l_addr, { unsigned long const r_type = ELF32_R_TYPE (reloc->r_info); Elf32_Addr *const reloc_addr = reloc_addr_arg; - static char msgbuf[] = { "Unknown" }; + static char msgbuf[] = { "Unknown" }; struct link_map map; Elf32_Addr value; value = l_addr + reloc->r_addend; - if (ELF32_R_SYM (reloc->r_info) != 0){ + if (ELF32_R_SYM (reloc->r_info) != 0){ _dl_error_printf ("%s: In elf_machine_rela_relative " "ELF32_R_SYM (reloc->r_info) != 0. Aborting.", rtld_progname ?: ""); @@ -769,7 +770,8 @@ elf_machine_rela_relative (Elf32_Addr l_addr, auto void __attribute__((always_inline)) elf_machine_lazy_rel (struct link_map *map, - Elf32_Addr l_addr, const Elf32_Rela *reloc) + Elf32_Addr l_addr, const Elf32_Rela *reloc, + int skip_ifunc) { /* We don't have anything to do here. elf_machine_runtime_setup has done all the relocs already. */ From 5c3bd235210874d41a5c851cfe147bf057199a95 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 5 Oct 2011 11:53:01 +0200 Subject: [PATCH 4118/4487] m68k: don't call ifunc functions in trace mode --- ChangeLog.m68k | 5 +++++ sysdeps/m68k/dl-machine.h | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index bac7afe09d..0e99a0fdb7 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2011-10-05 Andreas Schwab + + * sysdeps/m68k/dl-machine.h (elf_machine_rela) + (elf_machine_lazy_rel): Add parameter skip_ifunc. + 2011-09-11 Andreas Schwab * sysdeps/m68k/nptl/tls.h: Don't define USE_TLS. diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index 8f8091eb9f..51272125d9 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -211,7 +211,7 @@ elf_machine_plt_value (struct link_map *map, const Elf32_Rela *reloc, auto inline void __attribute__ ((unused, always_inline)) elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, const Elf32_Sym *sym, const struct r_found_version *version, - void *const reloc_addr_arg) + void *const reloc_addr_arg, int skip_ifunc) { Elf32_Addr *const reloc_addr = reloc_addr_arg; const unsigned int r_type = ELF32_R_TYPE (reloc->r_info); @@ -307,7 +307,8 @@ elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, auto inline void __attribute__ ((unused, always_inline)) elf_machine_lazy_rel (struct link_map *map, - Elf32_Addr l_addr, const Elf32_Rela *reloc) + Elf32_Addr l_addr, const Elf32_Rela *reloc, + int skip_ifunc) { Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset); if (ELF32_R_TYPE (reloc->r_info) == R_68K_JMP_SLOT) From 9a7e10917d5b1e3cf2cae864b336c1a4d1deb3c0 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 5 Oct 2011 11:53:16 +0200 Subject: [PATCH 4119/4487] mips: don't call ifunc functions in trace mode --- ChangeLog.mips | 11 ++++++++--- sysdeps/mips/dl-machine.h | 13 +++++++------ 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 8da2af2fba..5d9d772422 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2011-10-05 Andreas Schwab + + * sysdeps/mips/dl-machine.h (elf_machine_rel, elf_machine_rela) + (elf_machine_lazy_rel): Add parameter skip_ifunc. + 2011-09-13 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/socket.h (__cmsg_nxthdr): Cast @@ -389,7 +394,7 @@ Update comment. * sysdeps/unix/sysv/linux/mips/kernel_rt_sigframe.h: New file. * sysdeps/unix/sysv/linux/mips/ucontext_i.sym: New file. - * sysdeps/unix/sysv/linux/mips/Makefile (gen-as-const-headers): + * sysdeps/unix/sysv/linux/mips/Makefile (gen-as-const-headers): Add ucontext_i.sym. 2009-04-18 Joseph Myers @@ -594,7 +599,7 @@ 2008-04-02 Aurelien Jarno - * sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list: Add + * sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list: Add truncate and ftruncate systems calls. * sysdeps/unix/sysv/linux/mips/mips64/n32/ftruncate64.c: Make an empty file. @@ -980,7 +985,7 @@ (lll_robust_mutex_dead, lll_robust_mutex_trylock, lll_robust_mutex_lock, lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock, lll_robust_mutex_unlock): New macros. - (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes. + (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes. * sysdeps/unix/sysv/linux/mips/nptl/pt-vfork.S: Use correct path to vfork.S. * sysdeps/unix/sysv/linux/mips/nptl/vfork.S: Likewise. diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 26e1fcb7db..3e1d402cf2 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -528,7 +528,7 @@ elf_machine_reloc (struct link_map *map, ElfW(Addr) r_info, strtab + refsym->st_name); } memcpy (reloc_addr, (void *) value, - MIN (sym->st_size, refsym->st_size)); + MIN (sym->st_size, refsym->st_size)); break; } @@ -559,7 +559,7 @@ auto inline void __attribute__ ((always_inline)) elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, const ElfW(Sym) *sym, const struct r_found_version *version, - void *const reloc_addr) + void *const reloc_addr, int skip_ifunc) { elf_machine_reloc (map, reloc->r_info, sym, version, reloc_addr, 0, 1); } @@ -575,7 +575,8 @@ elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc, auto inline void __attribute__((always_inline)) elf_machine_lazy_rel (struct link_map *map, - ElfW(Addr) l_addr, const ElfW(Rel) *reloc) + ElfW(Addr) l_addr, const ElfW(Rel) *reloc, + int skip_ifunc) { ElfW(Addr) *const reloc_addr = (void *) (l_addr + reloc->r_offset); const unsigned int r_type = ELFW(R_TYPE) (reloc->r_info); @@ -598,7 +599,7 @@ auto inline void __attribute__ ((always_inline)) elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc, const ElfW(Sym) *sym, const struct r_found_version *version, - void *const reloc_addr) + void *const reloc_addr, int skip_ifunc) { elf_machine_reloc (map, reloc->r_info, sym, version, reloc_addr, reloc->r_addend, 0); @@ -626,7 +627,7 @@ elf_machine_got_rel (struct link_map *map, int lazy) ({ \ const ElfW(Sym) *ref = sym; \ const struct r_found_version *version \ - = vernum ? &map->l_versions[vernum[sym_index] & 0x7fff] : NULL; \ + = vernum ? &map->l_versions[vernum[sym_index] & 0x7fff] : NULL; \ struct link_map *sym_map; \ sym_map = RESOLVE_MAP (&ref, version, reloc); \ ref ? sym_map->l_addr + ref->st_value : 0; \ @@ -648,7 +649,7 @@ elf_machine_got_rel (struct link_map *map, int lazy) i = (got[1] & ELF_MIPS_GNU_GOT1_MASK)? 2 : 1; /* Add the run-time displacement to all local got entries if - needed. */ + needed. */ if (__builtin_expect (map->l_addr != 0, 0)) { while (i < n) From 74d3667f0459c64c7b09287368124b0cfb7b16d4 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 9 Oct 2011 13:58:11 +0200 Subject: [PATCH 4120/4487] m68k: remove obsolete non-fpu implementations of isinfl and isnanl --- ChangeLog.m68k | 5 ++++ sysdeps/m68k/m680x0/s_isinfl.c | 42 ---------------------------------- sysdeps/m68k/m680x0/s_isnanl.c | 38 ------------------------------ 3 files changed, 5 insertions(+), 80 deletions(-) delete mode 100644 sysdeps/m68k/m680x0/s_isinfl.c delete mode 100644 sysdeps/m68k/m680x0/s_isnanl.c diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 0e99a0fdb7..32ccf7e4d6 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2011-10-09 Andreas Schwab + + * sysdeps/m68k/m680x0/s_isinfl.c: Remove. + * sysdeps/m68k/m680x0/s_isnanl.c: Remove. + 2011-10-05 Andreas Schwab * sysdeps/m68k/dl-machine.h (elf_machine_rela) diff --git a/sysdeps/m68k/m680x0/s_isinfl.c b/sysdeps/m68k/m680x0/s_isinfl.c deleted file mode 100644 index 2502039087..0000000000 --- a/sysdeps/m68k/m680x0/s_isinfl.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (C) 1991, 1992, 1995, 1997, 2002 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. */ - -#include -#include "ieee754.h" - -/* Return 0 if VALUE is finite or NaN, +1 if it - is +Infinity, -1 if it is -Infinity. */ -int -__isinfl (long double value) -{ - union ieee854_long_double u; - - u.d = value; - - /* An IEEE 854 infinity has an exponent with the - maximum possible value and a zero mantissa. - In Motorola's interpretation the integer bit is ignored. */ - if ((u.ieee.exponent & 0x7fff) == 0x7fff && - (u.ieee.mantissa0 & 0x7fffffff) == 0 && u.ieee.mantissa1 == 0) - return u.ieee.negative ? -1 : 1; - - return 0; -} - -hidden_def (__isinfl) -weak_alias (__isinfl, isinfl); diff --git a/sysdeps/m68k/m680x0/s_isnanl.c b/sysdeps/m68k/m680x0/s_isnanl.c deleted file mode 100644 index 999746f29c..0000000000 --- a/sysdeps/m68k/m680x0/s_isnanl.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (C) 1991, 1992, 1995, 1997, 2002 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. */ - -#include -#include "ieee754.h" - -/* Return nonzero if VALUE is not a number. */ -int -__isnanl (long double value) -{ - union ieee854_long_double u; - - u.d = value; - - /* IEEE 854 NaN's have the maximum possible - exponent and a nonzero mantissa. In Motorola's - interpretation the integer bit is ignored. */ - return ((u.ieee.exponent & 0x7fff) == 0x7fff && - ((u.ieee.mantissa0 & 0x7fffffff) != 0 || u.ieee.mantissa1 != 0)); -} - -hidden_def (__isnanl) -weak_alias (__isnanl, isnanl); From c3beb302397b96c0d40063e7f46d8dfc8d3feeb5 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 12 Oct 2011 16:12:13 +0000 Subject: [PATCH 4121/4487] Add __sqrt*_finite aliases for MIPS. --- ChangeLog.mips | 6 ++++++ sysdeps/mips/fpu/e_sqrt.c | 3 ++- sysdeps/mips/fpu/e_sqrtf.c | 3 ++- sysdeps/mips/mips64/soft-fp/e_sqrtl.c | 3 ++- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 5d9d772422..78932d7a03 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,9 @@ +2011-10-12 Joseph Myers + + * sysdeps/mips/fpu/e_sqrt.c: Add __sqrt_finite alias. + * sysdeps/mips/fpu/e_sqrtf.c: Add __sqrtf_finite alias. + * sysdeps/mips/mips64/soft-fp/e_sqrtl.c: Add __sqrtl_finite alias. + 2011-10-05 Andreas Schwab * sysdeps/mips/dl-machine.h (elf_machine_rel, elf_machine_rela) diff --git a/sysdeps/mips/fpu/e_sqrt.c b/sysdeps/mips/fpu/e_sqrt.c index 5449710aff..d1a8afc3c5 100644 --- a/sysdeps/mips/fpu/e_sqrt.c +++ b/sysdeps/mips/fpu/e_sqrt.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2011 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Hartvig Ekner , 2002. @@ -30,6 +30,7 @@ __ieee754_sqrt (double x) __asm__ ("sqrt.d %0,%1" : "=f" (z) : "f" (x)); return z; } +strong_alias (__ieee754_sqrt, __sqrt_finite) #else diff --git a/sysdeps/mips/fpu/e_sqrtf.c b/sysdeps/mips/fpu/e_sqrtf.c index 3590ad46d5..da58b46f80 100644 --- a/sysdeps/mips/fpu/e_sqrtf.c +++ b/sysdeps/mips/fpu/e_sqrtf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2011 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Hartvig Ekner , 2002. @@ -30,6 +30,7 @@ __ieee754_sqrtf (float x) __asm__ ("sqrt.s %0,%1" : "=f" (z) : "f" (x)); return z; } +strong_alias (__ieee754_sqrtf, __sqrtf_finite) #else diff --git a/sysdeps/mips/mips64/soft-fp/e_sqrtl.c b/sysdeps/mips/mips64/soft-fp/e_sqrtl.c index 81fd58ae1a..c2e1faf24a 100644 --- a/sysdeps/mips/mips64/soft-fp/e_sqrtl.c +++ b/sysdeps/mips/mips64/soft-fp/e_sqrtl.c @@ -1,5 +1,5 @@ /* long double square root in software floating-point emulation. - Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc. + Copyright (C) 1997, 1999, 2006, 2011 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). @@ -37,3 +37,4 @@ __ieee754_sqrtl (const long double a) FP_HANDLE_EXCEPTIONS; return c; } +strong_alias (__ieee754_sqrtl, __sqrtl_finite) From d3d9bde5576a2fdd31c00a97a4c5522cdf1a6016 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Thu, 13 Oct 2011 18:43:01 +0200 Subject: [PATCH 4122/4487] m68k: add __*_finite aliases --- ChangeLog.m68k | 45 ++++++++++++++++++++++++++ sysdeps/m68k/m680x0/fpu/e_acos.c | 10 ++++-- sysdeps/m68k/m680x0/fpu/e_acosf.c | 3 +- sysdeps/m68k/m680x0/fpu/e_acosl.c | 3 +- sysdeps/m68k/m680x0/fpu/e_asin.c | 1 + sysdeps/m68k/m680x0/fpu/e_asinf.c | 3 +- sysdeps/m68k/m680x0/fpu/e_asinl.c | 1 + sysdeps/m68k/m680x0/fpu/e_atan2.c | 3 +- sysdeps/m68k/m680x0/fpu/e_atanh.c | 3 +- sysdeps/m68k/m680x0/fpu/e_atanhf.c | 3 +- sysdeps/m68k/m680x0/fpu/e_atanhl.c | 1 + sysdeps/m68k/m680x0/fpu/e_cosh.c | 3 +- sysdeps/m68k/m680x0/fpu/e_coshf.c | 3 +- sysdeps/m68k/m680x0/fpu/e_coshl.c | 1 + sysdeps/m68k/m680x0/fpu/e_exp10.c | 1 + sysdeps/m68k/m680x0/fpu/e_exp10f.c | 1 + sysdeps/m68k/m680x0/fpu/e_exp10l.c | 1 + sysdeps/m68k/m680x0/fpu/e_exp2.c | 1 + sysdeps/m68k/m680x0/fpu/e_exp2f.c | 1 + sysdeps/m68k/m680x0/fpu/e_exp2l.c | 1 + sysdeps/m68k/m680x0/fpu/e_fmod.c | 10 ++++-- sysdeps/m68k/m680x0/fpu/e_fmodf.c | 3 +- sysdeps/m68k/m680x0/fpu/e_fmodl.c | 3 +- sysdeps/m68k/m680x0/fpu/e_log.c | 3 +- sysdeps/m68k/m680x0/fpu/e_log10.c | 3 +- sysdeps/m68k/m680x0/fpu/e_log10f.c | 3 +- sysdeps/m68k/m680x0/fpu/e_log10l.c | 1 + sysdeps/m68k/m680x0/fpu/e_log2.c | 3 +- sysdeps/m68k/m680x0/fpu/e_log2f.c | 3 +- sysdeps/m68k/m680x0/fpu/e_log2l.c | 3 +- sysdeps/m68k/m680x0/fpu/e_logf.c | 3 +- sysdeps/m68k/m680x0/fpu/e_logl.c | 1 + sysdeps/m68k/m680x0/fpu/e_pow.c | 3 +- sysdeps/m68k/m680x0/fpu/e_remainder.c | 1 + sysdeps/m68k/m680x0/fpu/e_remainderf.c | 1 + sysdeps/m68k/m680x0/fpu/e_remainderl.c | 1 + sysdeps/m68k/m680x0/fpu/e_scalb.c | 3 +- sysdeps/m68k/m680x0/fpu/e_sinh.c | 3 +- sysdeps/m68k/m680x0/fpu/e_sinhf.c | 3 +- sysdeps/m68k/m680x0/fpu/e_sinhl.c | 1 + sysdeps/m68k/m680x0/fpu/e_sqrt.c | 3 +- sysdeps/m68k/m680x0/fpu/e_sqrtf.c | 3 +- sysdeps/m68k/m680x0/fpu/e_sqrtl.c | 1 + 43 files changed, 122 insertions(+), 29 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 32ccf7e4d6..9c6e72faf2 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,48 @@ +2011-10-13 Andreas Schwab + + * sysdeps/m68k/m680x0/fpu/e_acos.c: Add __*_finite alias. + * sysdeps/m68k/m680x0/fpu/e_acosf.c: Likewise. + * sysdeps/m68k/m680x0/fpu/e_acosl.c: Likewise. + * sysdeps/m68k/m680x0/fpu/e_asin.c: Likewise. + * sysdeps/m68k/m680x0/fpu/e_asinl.c: Likewise. + * sysdeps/m68k/m680x0/fpu/e_asinf.c: Likewise. + * sysdeps/m68k/m680x0/fpu/e_atan2.c: Likewise. + * sysdeps/m68k/m680x0/fpu/e_atanh.c: Likewise. + * sysdeps/m68k/m680x0/fpu/e_atanhf.c: Likewise. + * sysdeps/m68k/m680x0/fpu/e_atanhl.c: Likewise. + * sysdeps/m68k/m680x0/fpu/e_cosh.c: Likewise. + * sysdeps/m68k/m680x0/fpu/e_coshf.c: Likewise. + * sysdeps/m68k/m680x0/fpu/e_coshl.c: Likewise. + * sysdeps/m68k/m680x0/fpu/e_exp10.c: Likewise. + * sysdeps/m68k/m680x0/fpu/e_exp10f.c: Likewise. + * sysdeps/m68k/m680x0/fpu/e_exp10l.c: Likewise. + * sysdeps/m68k/m680x0/fpu/e_exp2.c: Likewise. + * sysdeps/m68k/m680x0/fpu/e_exp2l.c: Likewise. + * sysdeps/m68k/m680x0/fpu/e_exp2f.c: Likewise. + * sysdeps/m68k/m680x0/fpu/e_fmod.c: Likewise. + * sysdeps/m68k/m680x0/fpu/e_fmodf.c: Likewise. + * sysdeps/m68k/m680x0/fpu/e_fmodl.c: Likewise. + * sysdeps/m68k/m680x0/fpu/e_log.c: Likewise. + * sysdeps/m68k/m680x0/fpu/e_logl.c: Likewise. + * sysdeps/m68k/m680x0/fpu/e_logf.c: Likewise. + * sysdeps/m68k/m680x0/fpu/e_log10.c: Likewise. + * sysdeps/m68k/m680x0/fpu/e_log10f.c: Likewise. + * sysdeps/m68k/m680x0/fpu/e_log10l.c: Likewise. + * sysdeps/m68k/m680x0/fpu/e_log2.c: Likewise. + * sysdeps/m68k/m680x0/fpu/e_log2f.c: Likewise. + * sysdeps/m68k/m680x0/fpu/e_log2l.c: Likewise. + * sysdeps/m68k/m680x0/fpu/e_pow.c: Likewise. + * sysdeps/m68k/m680x0/fpu/e_remainder.c: Likewise. + * sysdeps/m68k/m680x0/fpu/e_remainderl.c: Likewise. + * sysdeps/m68k/m680x0/fpu/e_remainderf.c: Likewise. + * sysdeps/m68k/m680x0/fpu/e_scalb.c: Likewise. + * sysdeps/m68k/m680x0/fpu/e_sinh.c: Likewise. + * sysdeps/m68k/m680x0/fpu/e_sinhf.c: Likewise. + * sysdeps/m68k/m680x0/fpu/e_sinhl.c: Likewise. + * sysdeps/m68k/m680x0/fpu/e_sqrt.c: Likewise. + * sysdeps/m68k/m680x0/fpu/e_sqrtf.c: Likewise. + * sysdeps/m68k/m680x0/fpu/e_sqrtl.c: Likewise. + 2011-10-09 Andreas Schwab * sysdeps/m68k/m680x0/s_isinfl.c: Remove. diff --git a/sysdeps/m68k/m680x0/fpu/e_acos.c b/sysdeps/m68k/m680x0/fpu/e_acos.c index c9f6c6a162..5afa8bd9c3 100644 --- a/sysdeps/m68k/m680x0/fpu/e_acos.c +++ b/sysdeps/m68k/m680x0/fpu/e_acos.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1999, 2011 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 @@ -21,10 +21,11 @@ #include "mathimpl.h" #ifndef FUNC -#define FUNC __ieee754_acos +# define FUNC __ieee754_acos +# define FUNC_FINITE __acos_finite #endif #ifndef float_type -#define float_type double +# define float_type double #endif float_type @@ -33,3 +34,6 @@ FUNC (x) { return __m81_u(FUNC)(x); } +#ifdef FUNC_FINITE +strong_alias (FUNC, FUNC_FINITE) +#endif diff --git a/sysdeps/m68k/m680x0/fpu/e_acosf.c b/sysdeps/m68k/m680x0/fpu/e_acosf.c index 90665082d3..300fff601e 100644 --- a/sysdeps/m68k/m680x0/fpu/e_acosf.c +++ b/sysdeps/m68k/m680x0/fpu/e_acosf.c @@ -1,5 +1,6 @@ #ifndef FUNC -#define FUNC __ieee754_acosf +# define FUNC __ieee754_acosf +# define FUNC_FINITE __acosf_finite #endif #define float_type float #include diff --git a/sysdeps/m68k/m680x0/fpu/e_acosl.c b/sysdeps/m68k/m680x0/fpu/e_acosl.c index e3dcd170f3..35767f4e23 100644 --- a/sysdeps/m68k/m680x0/fpu/e_acosl.c +++ b/sysdeps/m68k/m680x0/fpu/e_acosl.c @@ -1,5 +1,6 @@ #ifndef FUNC -#define FUNC __ieee754_acosl +# define FUNC __ieee754_acosl +# define FUNC_FINITE __acosl_finite #endif #define float_type long double #include diff --git a/sysdeps/m68k/m680x0/fpu/e_asin.c b/sysdeps/m68k/m680x0/fpu/e_asin.c index b6176c708a..271a1f23d2 100644 --- a/sysdeps/m68k/m680x0/fpu/e_asin.c +++ b/sysdeps/m68k/m680x0/fpu/e_asin.c @@ -1,2 +1,3 @@ #define FUNC __ieee754_asin +#define FUNC_FINITE __asin_finite #include diff --git a/sysdeps/m68k/m680x0/fpu/e_asinf.c b/sysdeps/m68k/m680x0/fpu/e_asinf.c index 05fb82670b..ece691c6fb 100644 --- a/sysdeps/m68k/m680x0/fpu/e_asinf.c +++ b/sysdeps/m68k/m680x0/fpu/e_asinf.c @@ -1,2 +1,3 @@ -#define FUNC __ieee754_asinf +#define FUNC __ieee754_asinf +#define FUNC_FINITE __asinf_finite #include diff --git a/sysdeps/m68k/m680x0/fpu/e_asinl.c b/sysdeps/m68k/m680x0/fpu/e_asinl.c index 0dd89fb9da..0c136f30eb 100644 --- a/sysdeps/m68k/m680x0/fpu/e_asinl.c +++ b/sysdeps/m68k/m680x0/fpu/e_asinl.c @@ -1,2 +1,3 @@ #define FUNC __ieee754_asinl +#define FUNC_FINITE __asinl_finite #include diff --git a/sysdeps/m68k/m680x0/fpu/e_atan2.c b/sysdeps/m68k/m680x0/fpu/e_atan2.c index 551b14db81..ac5982eab5 100644 --- a/sysdeps/m68k/m680x0/fpu/e_atan2.c +++ b/sysdeps/m68k/m680x0/fpu/e_atan2.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1999, 2011 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 @@ -102,3 +102,4 @@ s(__ieee754_atan2) (float_type y, float_type x) } return z; } +strong_alias (s(__ieee754_atan2), CONCATX (s (__atan2), _finite)) diff --git a/sysdeps/m68k/m680x0/fpu/e_atanh.c b/sysdeps/m68k/m680x0/fpu/e_atanh.c index 11bf430686..f5f7e7b520 100644 --- a/sysdeps/m68k/m680x0/fpu/e_atanh.c +++ b/sysdeps/m68k/m680x0/fpu/e_atanh.c @@ -1,2 +1,3 @@ -#define FUNC __ieee754_atanh +#define FUNC __ieee754_atanh +#define FUNC_FINITE __atanh_finite #include diff --git a/sysdeps/m68k/m680x0/fpu/e_atanhf.c b/sysdeps/m68k/m680x0/fpu/e_atanhf.c index 7a8f92ecf3..cb464cbb7d 100644 --- a/sysdeps/m68k/m680x0/fpu/e_atanhf.c +++ b/sysdeps/m68k/m680x0/fpu/e_atanhf.c @@ -1,2 +1,3 @@ -#define FUNC __ieee754_atanhf +#define FUNC __ieee754_atanhf +#define FUNC_FINITE __atanhf_finite #include diff --git a/sysdeps/m68k/m680x0/fpu/e_atanhl.c b/sysdeps/m68k/m680x0/fpu/e_atanhl.c index d8975d6782..8f276f5fad 100644 --- a/sysdeps/m68k/m680x0/fpu/e_atanhl.c +++ b/sysdeps/m68k/m680x0/fpu/e_atanhl.c @@ -1,2 +1,3 @@ #define FUNC __ieee754_atanhl +#define FUNC_FINITE __atanhl_finite #include diff --git a/sysdeps/m68k/m680x0/fpu/e_cosh.c b/sysdeps/m68k/m680x0/fpu/e_cosh.c index 93d753c519..aaba11be3a 100644 --- a/sysdeps/m68k/m680x0/fpu/e_cosh.c +++ b/sysdeps/m68k/m680x0/fpu/e_cosh.c @@ -1,2 +1,3 @@ -#define FUNC __ieee754_cosh +#define FUNC __ieee754_cosh +#define FUNC_FINITE __cosh_finite #include diff --git a/sysdeps/m68k/m680x0/fpu/e_coshf.c b/sysdeps/m68k/m680x0/fpu/e_coshf.c index 433faf17b9..0884741c5c 100644 --- a/sysdeps/m68k/m680x0/fpu/e_coshf.c +++ b/sysdeps/m68k/m680x0/fpu/e_coshf.c @@ -1,2 +1,3 @@ -#define FUNC __ieee754_coshf +#define FUNC __ieee754_coshf +#define FUNC_FINITE __coshf_finite #include diff --git a/sysdeps/m68k/m680x0/fpu/e_coshl.c b/sysdeps/m68k/m680x0/fpu/e_coshl.c index 39144fd202..7fc9b7b91c 100644 --- a/sysdeps/m68k/m680x0/fpu/e_coshl.c +++ b/sysdeps/m68k/m680x0/fpu/e_coshl.c @@ -1,2 +1,3 @@ #define FUNC __ieee754_coshl +#define FUNC_FINITE __coshl_finite #include diff --git a/sysdeps/m68k/m680x0/fpu/e_exp10.c b/sysdeps/m68k/m680x0/fpu/e_exp10.c index a1dd224470..e66a80599c 100644 --- a/sysdeps/m68k/m680x0/fpu/e_exp10.c +++ b/sysdeps/m68k/m680x0/fpu/e_exp10.c @@ -1,2 +1,3 @@ #define FUNC __ieee754_exp10 +#define FUNC_FINITE __exp10_finite #include diff --git a/sysdeps/m68k/m680x0/fpu/e_exp10f.c b/sysdeps/m68k/m680x0/fpu/e_exp10f.c index 1b78bc3723..7a3bdd4186 100644 --- a/sysdeps/m68k/m680x0/fpu/e_exp10f.c +++ b/sysdeps/m68k/m680x0/fpu/e_exp10f.c @@ -1,2 +1,3 @@ #define FUNC __ieee754_exp10f +#define FUNC_FINITE __exp10f_finite #include diff --git a/sysdeps/m68k/m680x0/fpu/e_exp10l.c b/sysdeps/m68k/m680x0/fpu/e_exp10l.c index 5e901999fa..e2a6255a76 100644 --- a/sysdeps/m68k/m680x0/fpu/e_exp10l.c +++ b/sysdeps/m68k/m680x0/fpu/e_exp10l.c @@ -1,2 +1,3 @@ #define FUNC __ieee754_exp10l +#define FUNC_FINITE __exp10l_finite #include diff --git a/sysdeps/m68k/m680x0/fpu/e_exp2.c b/sysdeps/m68k/m680x0/fpu/e_exp2.c index 24fac4fce6..35e29ae653 100644 --- a/sysdeps/m68k/m680x0/fpu/e_exp2.c +++ b/sysdeps/m68k/m680x0/fpu/e_exp2.c @@ -1,2 +1,3 @@ #define FUNC __ieee754_exp2 +#define FUNC_FINITE __exp2_finite #include diff --git a/sysdeps/m68k/m680x0/fpu/e_exp2f.c b/sysdeps/m68k/m680x0/fpu/e_exp2f.c index 593842e4e5..e57ddb5365 100644 --- a/sysdeps/m68k/m680x0/fpu/e_exp2f.c +++ b/sysdeps/m68k/m680x0/fpu/e_exp2f.c @@ -1,2 +1,3 @@ #define FUNC __ieee754_exp2f +#define FUNC_FINITE __exp2f_finite #include diff --git a/sysdeps/m68k/m680x0/fpu/e_exp2l.c b/sysdeps/m68k/m680x0/fpu/e_exp2l.c index 0ab2a428c0..c5854ae427 100644 --- a/sysdeps/m68k/m680x0/fpu/e_exp2l.c +++ b/sysdeps/m68k/m680x0/fpu/e_exp2l.c @@ -1,2 +1,3 @@ #define FUNC __ieee754_exp2l +#define FUNC_FINITE __exp2l_finite #include diff --git a/sysdeps/m68k/m680x0/fpu/e_fmod.c b/sysdeps/m68k/m680x0/fpu/e_fmod.c index bd229ae4b0..293d7214d3 100644 --- a/sysdeps/m68k/m680x0/fpu/e_fmod.c +++ b/sysdeps/m68k/m680x0/fpu/e_fmod.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1999, 2011 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 @@ -21,10 +21,11 @@ #include "mathimpl.h" #ifndef FUNC -#define FUNC __ieee754_fmod +# define FUNC __ieee754_fmod +# define FUNC_FINITE __fmod_finite #endif #ifndef float_type -#define float_type double +# define float_type double #endif float_type @@ -34,3 +35,6 @@ FUNC (x, y) { return __m81_u(FUNC)(x, y); } +#ifdef FUNC_FINITE +strong_alias (FUNC, FUNC_FINITE) +#endif diff --git a/sysdeps/m68k/m680x0/fpu/e_fmodf.c b/sysdeps/m68k/m680x0/fpu/e_fmodf.c index 88c350ce9e..38995c3768 100644 --- a/sysdeps/m68k/m680x0/fpu/e_fmodf.c +++ b/sysdeps/m68k/m680x0/fpu/e_fmodf.c @@ -1,5 +1,6 @@ #ifndef FUNC -#define FUNC __ieee754_fmodf +# define FUNC __ieee754_fmodf +# define FUNC_FINITE __fmodf_finite #endif #define float_type float #include diff --git a/sysdeps/m68k/m680x0/fpu/e_fmodl.c b/sysdeps/m68k/m680x0/fpu/e_fmodl.c index a46f19ea9d..8d793b2de7 100644 --- a/sysdeps/m68k/m680x0/fpu/e_fmodl.c +++ b/sysdeps/m68k/m680x0/fpu/e_fmodl.c @@ -1,5 +1,6 @@ #ifndef FUNC -#define FUNC __ieee754_fmodl +# define FUNC __ieee754_fmodl +# define FUNC_FINITE __fmodl_finite #endif #define float_type long double #include diff --git a/sysdeps/m68k/m680x0/fpu/e_log.c b/sysdeps/m68k/m680x0/fpu/e_log.c index 146dc0c784..628c62b31a 100644 --- a/sysdeps/m68k/m680x0/fpu/e_log.c +++ b/sysdeps/m68k/m680x0/fpu/e_log.c @@ -1,2 +1,3 @@ -#define FUNC __ieee754_log +#define FUNC __ieee754_log +#define FUNC_FINITE __log_finite #include diff --git a/sysdeps/m68k/m680x0/fpu/e_log10.c b/sysdeps/m68k/m680x0/fpu/e_log10.c index 06a9b87cb9..78e0693e9d 100644 --- a/sysdeps/m68k/m680x0/fpu/e_log10.c +++ b/sysdeps/m68k/m680x0/fpu/e_log10.c @@ -1,2 +1,3 @@ -#define FUNC __ieee754_log10 +#define FUNC __ieee754_log10 +#define FUNC_FINITE __log10_finite #include diff --git a/sysdeps/m68k/m680x0/fpu/e_log10f.c b/sysdeps/m68k/m680x0/fpu/e_log10f.c index 3896864ecb..452a75ec15 100644 --- a/sysdeps/m68k/m680x0/fpu/e_log10f.c +++ b/sysdeps/m68k/m680x0/fpu/e_log10f.c @@ -1,2 +1,3 @@ -#define FUNC __ieee754_log10f +#define FUNC __ieee754_log10f +#define FUNC_FINITE __log10f_finite #include diff --git a/sysdeps/m68k/m680x0/fpu/e_log10l.c b/sysdeps/m68k/m680x0/fpu/e_log10l.c index 6dcfc5a101..7c5dcb8e18 100644 --- a/sysdeps/m68k/m680x0/fpu/e_log10l.c +++ b/sysdeps/m68k/m680x0/fpu/e_log10l.c @@ -1,2 +1,3 @@ #define FUNC __ieee754_log10l +#define FUNC_FINITE __log10l_finite #include diff --git a/sysdeps/m68k/m680x0/fpu/e_log2.c b/sysdeps/m68k/m680x0/fpu/e_log2.c index 5528922b9c..a00ddbdc96 100644 --- a/sysdeps/m68k/m680x0/fpu/e_log2.c +++ b/sysdeps/m68k/m680x0/fpu/e_log2.c @@ -1,2 +1,3 @@ -#define FUNC __ieee754_log2 +#define FUNC __ieee754_log2 +#define FUNC_FINITE __log2_finite #include diff --git a/sysdeps/m68k/m680x0/fpu/e_log2f.c b/sysdeps/m68k/m680x0/fpu/e_log2f.c index 6b4907686d..670b69c8a9 100644 --- a/sysdeps/m68k/m680x0/fpu/e_log2f.c +++ b/sysdeps/m68k/m680x0/fpu/e_log2f.c @@ -1,2 +1,3 @@ -#define FUNC __ieee754_log2f +#define FUNC __ieee754_log2f +#define FUNC_FINITE __log2f_finite #include diff --git a/sysdeps/m68k/m680x0/fpu/e_log2l.c b/sysdeps/m68k/m680x0/fpu/e_log2l.c index 4c92a11acf..4a97a00235 100644 --- a/sysdeps/m68k/m680x0/fpu/e_log2l.c +++ b/sysdeps/m68k/m680x0/fpu/e_log2l.c @@ -1,2 +1,3 @@ -#define FUNC __ieee754_log2l +#define FUNC __ieee754_log2l +#define FUNC_FINITE __log2l_finite #include diff --git a/sysdeps/m68k/m680x0/fpu/e_logf.c b/sysdeps/m68k/m680x0/fpu/e_logf.c index bc23217c38..1989a95431 100644 --- a/sysdeps/m68k/m680x0/fpu/e_logf.c +++ b/sysdeps/m68k/m680x0/fpu/e_logf.c @@ -1,2 +1,3 @@ -#define FUNC __ieee754_logf +#define FUNC __ieee754_logf +#define FUNC_FINITE __logf_finite #include diff --git a/sysdeps/m68k/m680x0/fpu/e_logl.c b/sysdeps/m68k/m680x0/fpu/e_logl.c index 03b1830759..9ab842c3fc 100644 --- a/sysdeps/m68k/m680x0/fpu/e_logl.c +++ b/sysdeps/m68k/m680x0/fpu/e_logl.c @@ -1,2 +1,3 @@ #define FUNC __ieee754_logl +#define FUNC_FINITE __logl_finite #include diff --git a/sysdeps/m68k/m680x0/fpu/e_pow.c b/sysdeps/m68k/m680x0/fpu/e_pow.c index 0b6cee6f15..1bded0b7b4 100644 --- a/sysdeps/m68k/m680x0/fpu/e_pow.c +++ b/sysdeps/m68k/m680x0/fpu/e_pow.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1999, 2011 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 @@ -124,3 +124,4 @@ s(__ieee754_pow) (float_type x, float_type y) z = m81(__ieee754_exp) (y * m81(__ieee754_log) (x)); return z; } +strong_alias (s(__ieee754_pow), CONCATX (s(__pow), _finite)) diff --git a/sysdeps/m68k/m680x0/fpu/e_remainder.c b/sysdeps/m68k/m680x0/fpu/e_remainder.c index aa31bc011e..f7732af8c5 100644 --- a/sysdeps/m68k/m680x0/fpu/e_remainder.c +++ b/sysdeps/m68k/m680x0/fpu/e_remainder.c @@ -1,2 +1,3 @@ #define FUNC __ieee754_remainder +#define FUNC_FINITE __remainder_finite #include diff --git a/sysdeps/m68k/m680x0/fpu/e_remainderf.c b/sysdeps/m68k/m680x0/fpu/e_remainderf.c index b04f0c87c2..94b53e7a80 100644 --- a/sysdeps/m68k/m680x0/fpu/e_remainderf.c +++ b/sysdeps/m68k/m680x0/fpu/e_remainderf.c @@ -1,2 +1,3 @@ #define FUNC __ieee754_remainderf +#define FUNC_FINITE __remainderf_finite #include diff --git a/sysdeps/m68k/m680x0/fpu/e_remainderl.c b/sysdeps/m68k/m680x0/fpu/e_remainderl.c index b9dc540cc5..d5b59607ab 100644 --- a/sysdeps/m68k/m680x0/fpu/e_remainderl.c +++ b/sysdeps/m68k/m680x0/fpu/e_remainderl.c @@ -1,2 +1,3 @@ #define FUNC __ieee754_remainderl +#define FUNC_FINITE __remainderl_finite #include diff --git a/sysdeps/m68k/m680x0/fpu/e_scalb.c b/sysdeps/m68k/m680x0/fpu/e_scalb.c index 88edba1ca8..c03fd671aa 100644 --- a/sysdeps/m68k/m680x0/fpu/e_scalb.c +++ b/sysdeps/m68k/m680x0/fpu/e_scalb.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1999, 2011 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab . @@ -58,3 +58,4 @@ s(__ieee754_scalb) (float_type x, float_type fn) __asm ("fscale%.x %1, %0" : "=f" (retval) : "f" (fn), "0" (x)); return retval; } +strong_alias (s(__ieee754_scalb), CONCATX (s(__scalb), _finite)) diff --git a/sysdeps/m68k/m680x0/fpu/e_sinh.c b/sysdeps/m68k/m680x0/fpu/e_sinh.c index c6fed7ff46..1e1b1c1180 100644 --- a/sysdeps/m68k/m680x0/fpu/e_sinh.c +++ b/sysdeps/m68k/m680x0/fpu/e_sinh.c @@ -1,2 +1,3 @@ -#define FUNC __ieee754_sinh +#define FUNC __ieee754_sinh +#define FUNC_FINITE __sinh_finite #include diff --git a/sysdeps/m68k/m680x0/fpu/e_sinhf.c b/sysdeps/m68k/m680x0/fpu/e_sinhf.c index b5034b7b0e..13c79f9d96 100644 --- a/sysdeps/m68k/m680x0/fpu/e_sinhf.c +++ b/sysdeps/m68k/m680x0/fpu/e_sinhf.c @@ -1,2 +1,3 @@ -#define FUNC __ieee754_sinhf +#define FUNC __ieee754_sinhf +#define FUNC_FINITE __sinhf_finite #include diff --git a/sysdeps/m68k/m680x0/fpu/e_sinhl.c b/sysdeps/m68k/m680x0/fpu/e_sinhl.c index 2f42d96a38..47f0f24401 100644 --- a/sysdeps/m68k/m680x0/fpu/e_sinhl.c +++ b/sysdeps/m68k/m680x0/fpu/e_sinhl.c @@ -1,2 +1,3 @@ #define FUNC __ieee754_sinhl +#define FUNC_FINITE __sinhl_finite #include diff --git a/sysdeps/m68k/m680x0/fpu/e_sqrt.c b/sysdeps/m68k/m680x0/fpu/e_sqrt.c index 70f19710cc..9a250cbc25 100644 --- a/sysdeps/m68k/m680x0/fpu/e_sqrt.c +++ b/sysdeps/m68k/m680x0/fpu/e_sqrt.c @@ -1,2 +1,3 @@ -#define FUNC __ieee754_sqrt +#define FUNC __ieee754_sqrt +#define FUNC_FINITE __sqrt_finite #include diff --git a/sysdeps/m68k/m680x0/fpu/e_sqrtf.c b/sysdeps/m68k/m680x0/fpu/e_sqrtf.c index 5dc1904cb6..372c3eb2f4 100644 --- a/sysdeps/m68k/m680x0/fpu/e_sqrtf.c +++ b/sysdeps/m68k/m680x0/fpu/e_sqrtf.c @@ -1,2 +1,3 @@ -#define FUNC __ieee754_sqrtf +#define FUNC __ieee754_sqrtf +#define FUNC_FINITE __sqrtf_finite #include diff --git a/sysdeps/m68k/m680x0/fpu/e_sqrtl.c b/sysdeps/m68k/m680x0/fpu/e_sqrtl.c index fede1024a2..df5f44e6a7 100644 --- a/sysdeps/m68k/m680x0/fpu/e_sqrtl.c +++ b/sysdeps/m68k/m680x0/fpu/e_sqrtl.c @@ -1,2 +1,3 @@ #define FUNC __ieee754_sqrtl +#define FUNC_FINITE __sqrtl_finite #include From db6a567d0ddd816b1134651ddb66b66dbea2f40d Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Thu, 20 Oct 2011 11:23:02 -0400 Subject: [PATCH 4123/4487] Add hppa values for *_CLOEXEC and *_NONBLOCK The following patch adds hppa specific files that define the various _CLOEXEC and _NONBLOCK values in order to match the ones from the kernel. Signed-off-by: Guy Martin Tested-by: Carlos O'Donell --- ChangeLog.hppa | 13 ++ sysdeps/unix/sysv/linux/hppa/sys/epoll.h | 144 ++++++++++++++++++++ sysdeps/unix/sysv/linux/hppa/sys/eventfd.h | 54 ++++++++ sysdeps/unix/sysv/linux/hppa/sys/inotify.h | 107 +++++++++++++++ sysdeps/unix/sysv/linux/hppa/sys/signalfd.h | 66 +++++++++ sysdeps/unix/sysv/linux/hppa/sys/timerfd.h | 60 ++++++++ 6 files changed, 444 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/hppa/sys/epoll.h create mode 100644 sysdeps/unix/sysv/linux/hppa/sys/eventfd.h create mode 100644 sysdeps/unix/sysv/linux/hppa/sys/inotify.h create mode 100644 sysdeps/unix/sysv/linux/hppa/sys/signalfd.h create mode 100644 sysdeps/unix/sysv/linux/hppa/sys/timerfd.h diff --git a/ChangeLog.hppa b/ChangeLog.hppa index f4cabb6b45..f19c693d90 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,16 @@ +2011-10-17 Guy Martin + + * sysdeps/unix/sysv/linux/hppa/sys/epoll.h + Fix EPOLL_CLOEXEC and EPOLL_NONBLOCK to match kernel definition. + * sysdeps/unix/sysv/linux/hppa/sys/eventfd.h + Fix EFD_CLOEXEC and EFD_NONBLOCK to match kernel definition. + * sysdeps/unix/sysv/linux/hppa/sys/inotify.h + Fix IN_CLOEXEC and IN_NONBLOCK to match kernel definition. + * sysdeps/unix/sysv/linux/hppa/sys/signalfd.h + Fix SFD_CLOEXEC and SFD_NONBLOCK to match kernel definition. + * sysdeps/unix/sysv/linux/hppa/sys/timerfd.h + Fix TFD_CLOEXEC and TFD_NONBLOCK to match kernel definition. + 2011-10-05 Andreas Schwab * sysdeps/hppa/dl-machine.h (elf_machine_rela) diff --git a/sysdeps/unix/sysv/linux/hppa/sys/epoll.h b/sysdeps/unix/sysv/linux/hppa/sys/epoll.h new file mode 100644 index 0000000000..1931cc687a --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/sys/epoll.h @@ -0,0 +1,144 @@ +/* Copyright (C) 2002-2006, 2007, 2008, 2009 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 _SYS_EPOLL_H +#define _SYS_EPOLL_H 1 + +#include +#include + +/* Get __sigset_t. */ +#include + +#ifndef __sigset_t_defined +# define __sigset_t_defined +typedef __sigset_t sigset_t; +#endif + + +/* Flags to be passed to epoll_create1. */ +enum + { + EPOLL_CLOEXEC = 010000000, +#define EPOLL_CLOEXEC EPOLL_CLOEXEC + EPOLL_NONBLOCK = 00200004 /* HPUX has separate NDELAY & NONBLOCK */ +#define EPOLL_NONBLOCK EPOLL_NONBLOCK + }; + + +enum EPOLL_EVENTS + { + EPOLLIN = 0x001, +#define EPOLLIN EPOLLIN + EPOLLPRI = 0x002, +#define EPOLLPRI EPOLLPRI + EPOLLOUT = 0x004, +#define EPOLLOUT EPOLLOUT + EPOLLRDNORM = 0x040, +#define EPOLLRDNORM EPOLLRDNORM + EPOLLRDBAND = 0x080, +#define EPOLLRDBAND EPOLLRDBAND + EPOLLWRNORM = 0x100, +#define EPOLLWRNORM EPOLLWRNORM + EPOLLWRBAND = 0x200, +#define EPOLLWRBAND EPOLLWRBAND + EPOLLMSG = 0x400, +#define EPOLLMSG EPOLLMSG + EPOLLERR = 0x008, +#define EPOLLERR EPOLLERR + EPOLLHUP = 0x010, +#define EPOLLHUP EPOLLHUP + EPOLLRDHUP = 0x2000, +#define EPOLLRDHUP EPOLLRDHUP + EPOLLONESHOT = (1 << 30), +#define EPOLLONESHOT EPOLLONESHOT + EPOLLET = (1 << 31) +#define EPOLLET EPOLLET + }; + + +/* Valid opcodes ( "op" parameter ) to issue to epoll_ctl(). */ +#define EPOLL_CTL_ADD 1 /* Add a file descriptor to the interface. */ +#define EPOLL_CTL_DEL 2 /* Remove a file descriptor from the interface. */ +#define EPOLL_CTL_MOD 3 /* Change file descriptor epoll_event structure. */ + + +typedef union epoll_data +{ + void *ptr; + int fd; + uint32_t u32; + uint64_t u64; +} epoll_data_t; + +struct epoll_event +{ + uint32_t events; /* Epoll events */ + epoll_data_t data; /* User data variable */ +}; + + +__BEGIN_DECLS + +/* Creates an epoll instance. Returns an fd for the new instance. + The "size" parameter is a hint specifying the number of file + descriptors to be associated with the new instance. The fd + returned by epoll_create() should be closed with close(). */ +extern int epoll_create (int __size) __THROW; + +/* Same as epoll_create but with an FLAGS parameter. The unused SIZE + parameter has been dropped. */ +extern int epoll_create1 (int __flags) __THROW; + + +/* Manipulate an epoll instance "epfd". Returns 0 in case of success, + -1 in case of error ( the "errno" variable will contain the + specific error code ) The "op" parameter is one of the EPOLL_CTL_* + constants defined above. The "fd" parameter is the target of the + operation. The "event" parameter describes which events the caller + is interested in and any associated user data. */ +extern int epoll_ctl (int __epfd, int __op, int __fd, + struct epoll_event *__event) __THROW; + + +/* Wait for events on an epoll instance "epfd". Returns the number of + triggered events returned in "events" buffer. Or -1 in case of + error with the "errno" variable set to the specific error code. The + "events" parameter is a buffer that will contain triggered + events. The "maxevents" is the maximum number of events to be + returned ( usually size of "events" ). The "timeout" parameter + specifies the maximum wait time in milliseconds (-1 == infinite). + + This function is a cancellation point and therefore not marked with + __THROW. */ +extern int epoll_wait (int __epfd, struct epoll_event *__events, + int __maxevents, int __timeout); + + +/* Same as epoll_wait, but the thread's signal mask is temporarily + and atomically replaced with the one provided as parameter. + + This function is a cancellation point and therefore not marked with + __THROW. */ +extern int epoll_pwait (int __epfd, struct epoll_event *__events, + int __maxevents, int __timeout, + __const __sigset_t *__ss); + +__END_DECLS + +#endif /* sys/epoll.h */ diff --git a/sysdeps/unix/sysv/linux/hppa/sys/eventfd.h b/sysdeps/unix/sysv/linux/hppa/sys/eventfd.h new file mode 100644 index 0000000000..751f276759 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/sys/eventfd.h @@ -0,0 +1,54 @@ +/* Copyright (C) 2007, 2008, 2009 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 _SYS_EVENTFD_H +#define _SYS_EVENTFD_H 1 + +#include + + +/* Type for event counter. */ +typedef uint64_t eventfd_t; + +/* Flags for signalfd. */ +enum + { + EFD_SEMAPHORE = 1, +#define EFD_SEMAPHORE EFD_SEMAPHORE + EFD_CLOEXEC = 010000000, +#define EFD_CLOEXEC EFD_CLOEXEC + EFD_NONBLOCK = 00200004 /* HPUX has separate NDELAY & NONBLOCK */ +#define EFD_NONBLOCK EFD_NONBLOCK + }; + + +__BEGIN_DECLS + +/* Return file descriptor for generic event channel. Set initial + value to COUNT. */ +extern int eventfd (int __count, int __flags) __THROW; + +/* Read event counter and possibly wait for events. */ +extern int eventfd_read (int __fd, eventfd_t *__value); + +/* Increment event counter. */ +extern int eventfd_write (int __fd, eventfd_t __value); + +__END_DECLS + +#endif /* sys/eventfd.h */ diff --git a/sysdeps/unix/sysv/linux/hppa/sys/inotify.h b/sysdeps/unix/sysv/linux/hppa/sys/inotify.h new file mode 100644 index 0000000000..080497d7be --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/sys/inotify.h @@ -0,0 +1,107 @@ +/* Copyright (C) 2005, 2006, 2008, 2009, 2010 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 _SYS_INOTIFY_H +#define _SYS_INOTIFY_H 1 + +#include + + +/* Flags for the parameter of inotify_init1. */ +enum + { + IN_CLOEXEC = 010000000, +#define IN_CLOEXEC IN_CLOEXEC + IN_NONBLOCK = 000200004 /* HPUX has separate NDELAY & NONBLOCK */ +#define IN_NONBLOCK IN_NONBLOCK + }; + + +/* Structure describing an inotify event. */ +struct inotify_event +{ + int wd; /* Watch descriptor. */ + uint32_t mask; /* Watch mask. */ + uint32_t cookie; /* Cookie to synchronize two events. */ + uint32_t len; /* Length (including NULs) of name. */ + char name __flexarr; /* Name. */ +}; + + +/* Supported events suitable for MASK parameter of INOTIFY_ADD_WATCH. */ +#define IN_ACCESS 0x00000001 /* File was accessed. */ +#define IN_MODIFY 0x00000002 /* File was modified. */ +#define IN_ATTRIB 0x00000004 /* Metadata changed. */ +#define IN_CLOSE_WRITE 0x00000008 /* Writtable file was closed. */ +#define IN_CLOSE_NOWRITE 0x00000010 /* Unwrittable file closed. */ +#define IN_CLOSE (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* Close. */ +#define IN_OPEN 0x00000020 /* File was opened. */ +#define IN_MOVED_FROM 0x00000040 /* File was moved from X. */ +#define IN_MOVED_TO 0x00000080 /* File was moved to Y. */ +#define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* Moves. */ +#define IN_CREATE 0x00000100 /* Subfile was created. */ +#define IN_DELETE 0x00000200 /* Subfile was deleted. */ +#define IN_DELETE_SELF 0x00000400 /* Self was deleted. */ +#define IN_MOVE_SELF 0x00000800 /* Self was moved. */ + +/* Events sent by the kernel. */ +#define IN_UNMOUNT 0x00002000 /* Backing fs was unmounted. */ +#define IN_Q_OVERFLOW 0x00004000 /* Event queued overflowed. */ +#define IN_IGNORED 0x00008000 /* File was ignored. */ + +/* Helper events. */ +#define IN_CLOSE (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* Close. */ +#define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* Moves. */ + +/* Special flags. */ +#define IN_ONLYDIR 0x01000000 /* Only watch the path if it is a + directory. */ +#define IN_DONT_FOLLOW 0x02000000 /* Do not follow a sym link. */ +#define IN_EXCL_UNLINK 0x04000000 /* Exclude events on unlinked + objects. */ +#define IN_MASK_ADD 0x20000000 /* Add to the mask of an already + existing watch. */ +#define IN_ISDIR 0x40000000 /* Event occurred against dir. */ +#define IN_ONESHOT 0x80000000 /* Only send event once. */ + +/* All events which a program can wait on. */ +#define IN_ALL_EVENTS (IN_ACCESS | IN_MODIFY | IN_ATTRIB | IN_CLOSE_WRITE \ + | IN_CLOSE_NOWRITE | IN_OPEN | IN_MOVED_FROM \ + | IN_MOVED_TO | IN_CREATE | IN_DELETE \ + | IN_DELETE_SELF | IN_MOVE_SELF) + + +__BEGIN_DECLS + +/* Create and initialize inotify instance. */ +extern int inotify_init (void) __THROW; + +/* Create and initialize inotify instance. */ +extern int inotify_init1 (int __flags) __THROW; + +/* Add watch of object NAME to inotify instance FD. Notify about + events specified by MASK. */ +extern int inotify_add_watch (int __fd, const char *__name, uint32_t __mask) + __THROW; + +/* Remove the watch specified by WD from the inotify instance FD. */ +extern int inotify_rm_watch (int __fd, int __wd) __THROW; + +__END_DECLS + +#endif /* sys/inotify.h */ diff --git a/sysdeps/unix/sysv/linux/hppa/sys/signalfd.h b/sysdeps/unix/sysv/linux/hppa/sys/signalfd.h new file mode 100644 index 0000000000..da8264e7c9 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/sys/signalfd.h @@ -0,0 +1,66 @@ +/* Copyright (C) 2007, 2008 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 _SYS_SIGNALFD_H +#define _SYS_SIGNALFD_H 1 + +#define __need_sigset_t +#include +#include + + +struct signalfd_siginfo +{ + uint32_t ssi_signo; + int32_t ssi_errno; + int32_t ssi_code; + uint32_t ssi_pid; + uint32_t ssi_uid; + int32_t ssi_fd; + uint32_t ssi_tid; + uint32_t ssi_band; + uint32_t ssi_overrun; + uint32_t ssi_trapno; + int32_t ssi_status; + int32_t ssi_int; + uint64_t ssi_ptr; + uint64_t ssi_utime; + uint64_t ssi_stime; + uint64_t ssi_addr; + uint8_t __pad[48]; +}; + +/* Flags for signalfd. */ +enum + { + SFD_CLOEXEC = 010000000, +#define SFD_CLOEXEC SFD_CLOEXEC + SFD_NONBLOCK = 00200004 /* HPUX has separate NDELAY & NONBLOCK */ +#define SFD_NONBLOCK SFD_NONBLOCK + }; + +__BEGIN_DECLS + +/* Request notification for delivery of signals in MASK to be + performed using descriptor FD.*/ +extern int signalfd (int __fd, const sigset_t *__mask, int __flags) + __THROW __nonnull ((2)); + +__END_DECLS + +#endif /* sys/signalfd.h */ diff --git a/sysdeps/unix/sysv/linux/hppa/sys/timerfd.h b/sysdeps/unix/sysv/linux/hppa/sys/timerfd.h new file mode 100644 index 0000000000..78cdfc4788 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/sys/timerfd.h @@ -0,0 +1,60 @@ +/* Copyright (C) 2008 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 _SYS_TIMERFD_H +#define _SYS_TIMERFD_H 1 + +#include + + +/* Bits to be set in the FLAGS parameter of `timerfd_create'. */ +enum + { + TFD_CLOEXEC = 010000000, +#define TFD_CLOEXEC TFD_CLOEXEC + TFD_NONBLOCK = 000200004 /* HPUX has separate NDELAY & NONBLOCK */ +#define TFD_NONBLOCK TFD_NONBLOCK + }; + + +/* Bits to be set in the FLAGS parameter of `timerfd_settime'. */ +enum + { + TFD_TIMER_ABSTIME = 1 << 0 +#define TFD_TIMER_ABSTIME TFD_TIMER_ABSTIME + }; + + +__BEGIN_DECLS + +/* Return file descriptor for new interval timer source. */ +extern int timerfd_create (clockid_t __clock_id, int __flags) __THROW; + +/* Set next expiration time of interval timer source UFD to UTMR. If + FLAGS has the TFD_TIMER_ABSTIME flag set the timeout value is + absolute. Optionally return the old expiration time in OTMR. */ +extern int timerfd_settime (int __ufd, int __flags, + __const struct itimerspec *__utmr, + struct itimerspec *__otmr) __THROW; + +/* Return the next expiration time of UFD. */ +extern int timerfd_gettime (int __ufd, struct itimerspec *__otmr) __THROW; + +__END_DECLS + +#endif /* sys/timerfd.h */ From ab653f4dbe37d6244057f3f2ab33078357b6d708 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Thu, 20 Oct 2011 11:42:02 -0400 Subject: [PATCH 4124/4487] Remove check for HAVE_TLS_SUPPORT TLS support is now required, remove checks. Signed-off-by: Carlos O'Donell --- ChangeLog.hppa | 7 ++++++- sysdeps/hppa/nptl/tls.h | 8 +------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index f19c693d90..e37a630309 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,4 +1,9 @@ -2011-10-17 Guy Martin +2011-10-20 Carlos O'Donell + + * sysdeps/hppa/nptl/tls.h: Update copyright year. + Remove HAVE_TLS_SUPPORT check. + +2011-10-17 Guy Martin * sysdeps/unix/sysv/linux/hppa/sys/epoll.h Fix EPOLL_CLOEXEC and EPOLL_NONBLOCK to match kernel definition. diff --git a/sysdeps/hppa/nptl/tls.h b/sysdeps/hppa/nptl/tls.h index 389cbb9494..8af75044c6 100644 --- a/sysdeps/hppa/nptl/tls.h +++ b/sysdeps/hppa/nptl/tls.h @@ -1,5 +1,5 @@ /* Definition for thread-local data handling. NPTL/hppa version. - Copyright (C) 2005, 2007, 2010 Free Software Foundation, Inc. + Copyright (C) 2005, 2007, 2010, 2011 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 @@ -42,12 +42,6 @@ typedef union dtv # include #endif /* __ASSEMBLER__ */ - -/* We require TLS support in the tools. */ -#ifndef HAVE_TLS_SUPPORT -# error "TLS support is required." -#endif - /* Signal that TLS support is available. */ #define USE_TLS 1 From 451398f8b87c2a7c6bed7d6650a6cfbca43f9189 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Thu, 20 Oct 2011 14:15:51 -0400 Subject: [PATCH 4125/4487] Always test for TLS support. Always test for TLS support on hppa and raise an error if the TLS support is missing. Signed-off-by: Carlos O'Donell --- ChangeLog.hppa | 7 +++ sysdeps/hppa/configure | 100 ++++++++++++++++++++++++++++--- sysdeps/hppa/elf/configure | 109 +++++++++++++++++++++++++++++----- sysdeps/hppa/elf/configure.in | 6 +- 4 files changed, 193 insertions(+), 29 deletions(-) mode change 100644 => 100755 sysdeps/hppa/elf/configure diff --git a/ChangeLog.hppa b/ChangeLog.hppa index e37a630309..3913e61f66 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,10 @@ +2011-10-20 Carlos O'Donell + + * sysdeps/hppa/elf/configure.in: Always test for TLS support + and error out if missing. + * sysdeps/hppa/elf/configure: Regenerate. + * sysdeps/hppa/configure: Regenerate. + 2011-10-20 Carlos O'Donell * sysdeps/hppa/nptl/tls.h: Update copyright year. diff --git a/sysdeps/hppa/configure b/sysdeps/hppa/configure index b50ec17be1..aafc420097 100644 --- a/sysdeps/hppa/configure +++ b/sysdeps/hppa/configure @@ -1,19 +1,101 @@ + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + # This file is generated from configure.in by Autoconf. DO NOT EDIT! -{ echo "$as_me:$LINENO: checking for assembler line separator" >&5 -echo $ECHO_N "checking for assembler line separator... $ECHO_C" >&6; } -if test "${libc_cv_asm_line_sep+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler line separator" >&5 +$as_echo_n "checking for assembler line separator... " >&6; } +if test "${libc_cv_asm_line_sep+set}" = set; then : + $as_echo_n "(cached) " >&6 else cat > conftest.s <&5 + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then libc_cv_asm_line_sep='!' else if test -z "$enable_hacker_mode"; then @@ -25,8 +107,8 @@ else fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $libc_cv_asm_line_sep" >&5 -echo "${ECHO_T}$libc_cv_asm_line_sep" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_asm_line_sep" >&5 +$as_echo "$libc_cv_asm_line_sep" >&6; } cat >>confdefs.h <<_ACEOF #define ASM_LINE_SEP $libc_cv_asm_line_sep _ACEOF diff --git a/sysdeps/hppa/elf/configure b/sysdeps/hppa/elf/configure old mode 100644 new mode 100755 index ba69990fd5..4df64a852b --- a/sysdeps/hppa/elf/configure +++ b/sysdeps/hppa/elf/configure @@ -1,13 +1,94 @@ + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + # This file is generated from configure.in by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/hppa/elf. -if test "$usetls" != no; then # Check for support of thread-local storage handling in assembler and # linker. -{ echo "$as_me:$LINENO: checking for hppa TLS support" >&5 -echo $ECHO_N "checking for hppa TLS support... $ECHO_C" >&6; } -if test "${libc_cv_hppa_tls+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hppa TLS support" >&5 +$as_echo_n "checking for hppa TLS support... " >&6; } +if test "${libc_cv_hppa_tls+set}" = set; then : + $as_echo_n "(cached) " >&6 else cat > conftest.s <<\EOF ; Setup tls data @@ -41,23 +122,19 @@ test3: ; Done all the TLS tests. EOF if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then libc_cv_hppa_tls=yes else libc_cv_hppa_tls=no fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $libc_cv_hppa_tls" >&5 -echo "${ECHO_T}$libc_cv_hppa_tls" >&6; } -if test $libc_cv_hppa_tls = yes; then - cat >>confdefs.h <<\_ACEOF -#define HAVE_TLS_SUPPORT 1 -_ACEOF - -fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_hppa_tls" >&5 +$as_echo "$libc_cv_hppa_tls" >&6; } +if test $libc_cv_hppa_tls = no; then + as_fn_error $? "the assembler must support TLS" "$LINENO" 5 fi diff --git a/sysdeps/hppa/elf/configure.in b/sysdeps/hppa/elf/configure.in index 1b70a5b740..e31c880c1e 100644 --- a/sysdeps/hppa/elf/configure.in +++ b/sysdeps/hppa/elf/configure.in @@ -1,7 +1,6 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. # Local configure fragment for sysdeps/hppa/elf. -if test "$usetls" != no; then # Check for support of thread-local storage handling in assembler and # linker. AC_CACHE_CHECK(for hppa TLS support, libc_cv_hppa_tls, [dnl @@ -43,7 +42,6 @@ else libc_cv_hppa_tls=no fi rm -f conftest*]) -if test $libc_cv_hppa_tls = yes; then - AC_DEFINE(HAVE_TLS_SUPPORT) -fi +if test $libc_cv_hppa_tls = no; then + AC_MSG_ERROR([the assembler must support TLS]) fi From 2ab0965cb022dfdbd397eb88f96447393b4118b7 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Thu, 20 Oct 2011 14:21:00 -0400 Subject: [PATCH 4126/4487] Define TLS_DTV_UNALLOCATED for hppa. Signed-off-by: Carlos O'Donell --- ChangeLog.hppa | 5 +++++ sysdeps/hppa/dl-tls.h | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 3913e61f66..91ddf8d750 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,8 @@ +2011-10-20 Carlos O'Donell + + * sysdeps/hppa/dl-tls.h: Update copyright year. + Define TLS_DTV_UNALLOCATED. + 2011-10-20 Carlos O'Donell * sysdeps/hppa/elf/configure.in: Always test for TLS support diff --git a/sysdeps/hppa/dl-tls.h b/sysdeps/hppa/dl-tls.h index 1bc9aae66c..91c3d44735 100644 --- a/sysdeps/hppa/dl-tls.h +++ b/sysdeps/hppa/dl-tls.h @@ -1,5 +1,5 @@ /* Thread-local storage handling in the ELF dynamic linker. hppa version. - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2003, 2011 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 @@ -27,3 +27,6 @@ typedef struct extern void *__tls_get_addr (tls_index *ti); + +/* Value used for dtv entries for which the allocation is delayed. */ +#define TLS_DTV_UNALLOCATED ((void *) -1l) From 5ce24e77ed89f2a6c11175e3798050246dfd9c04 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Thu, 20 Oct 2011 14:30:56 -0400 Subject: [PATCH 4127/4487] Add hidden aliases for fenv.h functions. Add hidden aliases for fegetenv, feupdateenv, and ftestexcept. This avoids libc needing to go through the PLT for these functions. Signed-off-by: Carlos O'Donell --- ChangeLog.hppa | 6 ++++++ sysdeps/hppa/fpu/fegetenv.c | 3 ++- sysdeps/hppa/fpu/feupdateenv.c | 3 ++- sysdeps/hppa/fpu/ftestexcept.c | 3 ++- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 91ddf8d750..41a779e98e 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,9 @@ +2011-10-20 Carlos O'Donell + + * sysdeps/hppa/fpu/fegetenv.c: Add hidden alias. + * sysdeps/hppa/fpu/feupdateenv.c: Likewise. + * sysdeps/hppa/fpu/ftestexcept.c: Likewise. + 2011-10-20 Carlos O'Donell * sysdeps/hppa/dl-tls.h: Update copyright year. diff --git a/sysdeps/hppa/fpu/fegetenv.c b/sysdeps/hppa/fpu/fegetenv.c index fcf5d2dcfe..aab3431b2c 100644 --- a/sysdeps/hppa/fpu/fegetenv.c +++ b/sysdeps/hppa/fpu/fegetenv.c @@ -1,5 +1,5 @@ /* Store current floating-point environment. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright (C) 2000, 2011 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Huggins-Daines , 2000 @@ -33,3 +33,4 @@ fegetenv (fenv_t *envp) memcpy(envp, buf, sizeof (*envp)); return 0; } +libm_hidden_def (fegetenv) diff --git a/sysdeps/hppa/fpu/feupdateenv.c b/sysdeps/hppa/fpu/feupdateenv.c index 17140060ad..6e1d5d4b6d 100644 --- a/sysdeps/hppa/fpu/feupdateenv.c +++ b/sysdeps/hppa/fpu/feupdateenv.c @@ -1,5 +1,5 @@ /* Install given floating-point environment and raise exceptions. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright (C) 2000, 2011 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Huggins-Daines , 2000 @@ -38,3 +38,4 @@ feupdateenv (const fenv_t *envp) /* Success. */ return 0; } +libm_hidden_def (feupdateenv) diff --git a/sysdeps/hppa/fpu/ftestexcept.c b/sysdeps/hppa/fpu/ftestexcept.c index ac6d4b2e35..c031ffe6e8 100644 --- a/sysdeps/hppa/fpu/ftestexcept.c +++ b/sysdeps/hppa/fpu/ftestexcept.c @@ -1,5 +1,5 @@ /* Test exception in current environment. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright (C) 2000, 2011 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Huggins-Daines , 2000 @@ -32,3 +32,4 @@ fetestexcept (int excepts) return (s.sw[0] >> 27) & excepts & FE_ALL_EXCEPT; } +libm_hidden_def (fetestexcept) From 930046be6fedf95d9fce6548bf58ad5e33023d67 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Thu, 20 Oct 2011 14:37:02 -0400 Subject: [PATCH 4128/4487] Syncrhonize fcntl.h with canonical source. Update fcntl.h to match canonical i386 fcntl.h, but update constants to match hppa linux kernel values. Signed-off-by: Carlos O'Donell --- ChangeLog.hppa | 5 ++ sysdeps/unix/sysv/linux/hppa/bits/fcntl.h | 66 +++++++++++++++++++---- 2 files changed, 60 insertions(+), 11 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 41a779e98e..14abdee318 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,8 @@ +2011-10-20 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h: Synchronize + with canonical fcntl.h. + 2011-10-20 Carlos O'Donell * sysdeps/hppa/fpu/fegetenv.c: Add hidden alias. diff --git a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h index a2c64827ab..8f42111cf4 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h @@ -1,5 +1,5 @@ -/* O_*, F_*, FD_* bit values for Linux/HPPA. - Copyright (C) 1995,1996,1997,1998,1999,2000,2002,2004 +/* O_*, F_*, FD_* bit values for Linux. + Copyright (C) 1995-1999, 2000, 2002, 2004, 2010, 2011 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -29,7 +29,7 @@ /* open/fcntl - O_SYNC is only implemented on blocks devices and on files - located on an ext2 file system */ + located on a few file systems. */ #define O_ACCMODE 0003 #define O_RDONLY 00 #define O_WRONLY 01 @@ -46,13 +46,15 @@ #define O_ASYNC 020000 #define O_BLKSEEK 00000100 /* HPUX only */ -#ifdef __USE_GNU -# define O_DIRECT 000040000 /* Direct disk access. */ +#ifdef __USE_XOPEN2K8 # define O_DIRECTORY 000010000 /* Must be a directory. */ # define O_NOFOLLOW 000000200 /* Do not follow links. */ -# define O_NOATIME 004000000 /* Do not set atime. */ # define O_CLOEXEC 010000000 /* Set close_on_exec. */ #endif +#ifdef __USE_GNU +# define O_DIRECT 040000 /* Direct disk access. */ +# define O_NOATIME 004000000 /* Do not set atime. */ +#endif /* For now Linux has synchronisity options for data and read operations. We define the symbols here but let them do the same as O_SYNC since @@ -85,7 +87,7 @@ #define F_SETLK64 9 /* Set record locking info (non-blocking). */ #define F_SETLKW64 10 /* Set record locking info (blocking). */ -#if defined __USE_BSD || defined __USE_UNIX98 +#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K8 # define F_GETOWN 11 /* Get owner of socket (receiver of SIGIO). */ # define F_SETOWN 12 /* Set owner of socket (receiver of SIGIO). */ #endif @@ -101,6 +103,10 @@ # 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_SETPIPE_SZ 1031 /* Set pipe page size array. */ +# define F_GETPIPE_SZ 1032 /* Set pipe page size array. */ +#endif +#ifdef __USE_XOPEN2K8 # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with close-on-exit set. */ #endif @@ -227,6 +233,19 @@ struct f_owner_ex we splice from/to). */ # define SPLICE_F_MORE 4 /* Expect more data. */ # define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */ + + +/* File handle structure. */ +struct file_handle +{ + unsigned int handle_bytes; + int handle_type; + /* File identifier. */ + unsigned char f_handle[0]; +}; + +/* Maximum handle size (for now). */ +# define MAX_HANDLE_SZ 128 #endif __BEGIN_DECLS @@ -243,20 +262,32 @@ extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count, unsigned int __flags); -/* Splice address range into a pipe. */ +/* Splice address range into a pipe. + + This function is a possible cancellation point and therefore not + marked with __THROW. */ extern ssize_t vmsplice (int __fdout, const struct iovec *__iov, size_t __count, unsigned int __flags); -/* Splice two files together. */ +/* Splice two files together. + + This function is a possible cancellation point and therefore not + marked with __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. */ +/* In-kernel implementation of tee for pipe buffers. + + This function is a possible cancellation point and therefore not + marked with __THROW. */ extern ssize_t tee (int __fdin, int __fdout, size_t __len, unsigned int __flags); -/* Reserve storage for the data of the file associated with FD. */ +/* Reserve storage for the data of the file associated with FD. + + This function is a possible cancellation point and therefore not + marked with __THROW. */ # ifndef __USE_FILE_OFFSET64 extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len); # else @@ -273,6 +304,19 @@ extern int fallocate64 (int __fd, int __mode, __off64_t __offset, __off64_t __len); # endif + +/* Map file name to file handle. */ +extern int name_to_handle_at (int __dfd, const char *__name, + struct file_handle *__handle, int *__mnt_id, + int __flags) __THROW; + +/* Open file using the file handle. + + This function is a possible cancellation point and therefore not + marked with __THROW. */ +extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle, + int __flags); + #endif __END_DECLS From 9dd87de7ff43261dc83c74cc561ae392a405663f Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Thu, 20 Oct 2011 14:42:56 -0400 Subject: [PATCH 4129/4487] Define DEFAULT_STACK_PERMS. Signed-off-by: Carlos O'Donell --- ChangeLog.hppa | 5 +++++ sysdeps/hppa/stackinfo.h | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 14abdee318..20385130b3 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,8 @@ +2011-10-20 Carlos O'Donell + + * sysdeps/hppa/stackinfo.h: Update copyright year. + Include elf.h and define DEFAULT_STACK_PERMS. + 2011-10-20 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h: Synchronize diff --git a/sysdeps/hppa/stackinfo.h b/sysdeps/hppa/stackinfo.h index 318de7143b..44929c46aa 100644 --- a/sysdeps/hppa/stackinfo.h +++ b/sysdeps/hppa/stackinfo.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1999 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2011 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 @@ -22,6 +22,12 @@ #ifndef _STACKINFO_H #define _STACKINFO_H 1 +#include + +/* Default to an executable stack. PF_X can be overridden if PT_GNU_STACK is + * present, but it is presumed absent. */ +#define DEFAULT_STACK_PERMS (PF_R|PF_W|PF_X) + /* On PA the stack grows up. */ #define _STACK_GROWS_UP 1 From 25f991b858ffc104a5b6720ae229cee4e88c976f Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Thu, 20 Oct 2011 14:49:52 -0400 Subject: [PATCH 4130/4487] Remove hppa linuxthreads support. We now require NPTL and TLS to build glibc therefore the hppa linuxthreads support is no longer needed. Debian has already transitioned to NPTL support and we will continue to work out NPTL issues. Signed-off-by: Carlos O'Donell --- ChangeLog.hppa | 9 + sysdeps/hppa/linuxthreads/pspinlock.c | 82 ------ sysdeps/hppa/linuxthreads/pt-machine.h | 134 ---------- sysdeps/hppa/linuxthreads/tls.h | 163 ------------ .../sysv/linux/hppa/linuxthreads/aio_cancel.c | 33 --- .../linux/hppa/linuxthreads/bits/initspin.h | 41 --- .../hppa/linuxthreads/bits/pthreadtypes.h | 159 ------------ .../linux/hppa/linuxthreads/malloc-machine.h | 73 ------ .../linux/hppa/linuxthreads/pt-initfini.c | 109 -------- .../linux/hppa/linuxthreads/sysdep-cancel.h | 242 ------------------ 10 files changed, 9 insertions(+), 1036 deletions(-) delete mode 100644 sysdeps/hppa/linuxthreads/pspinlock.c delete mode 100644 sysdeps/hppa/linuxthreads/pt-machine.h delete mode 100644 sysdeps/hppa/linuxthreads/tls.h delete mode 100644 sysdeps/unix/sysv/linux/hppa/linuxthreads/aio_cancel.c delete mode 100644 sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/initspin.h delete mode 100644 sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/pthreadtypes.h delete mode 100644 sysdeps/unix/sysv/linux/hppa/linuxthreads/malloc-machine.h delete mode 100644 sysdeps/unix/sysv/linux/hppa/linuxthreads/pt-initfini.c delete mode 100644 sysdeps/unix/sysv/linux/hppa/linuxthreads/sysdep-cancel.h diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 20385130b3..01e7d1af56 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,12 @@ +2011-10-20 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/linuxthreads/aio_cancel.c: Remove. + * sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/initspin.h: Remove. + * sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/pthreadtypes.h: Remove. + * sysdeps/unix/sysv/linux/hppa/linuxthreads/malloc-machine.h: Remove. + * sysdeps/unix/sysv/linux/hppa/linuxthreads/pt-initfini.c: Remove. + * sysdeps/unix/sysv/linux/hppa/linuxthreads/sysdep-cancel.h: Remove. + 2011-10-20 Carlos O'Donell * sysdeps/hppa/stackinfo.h: Update copyright year. diff --git a/sysdeps/hppa/linuxthreads/pspinlock.c b/sysdeps/hppa/linuxthreads/pspinlock.c deleted file mode 100644 index e5a5545227..0000000000 --- a/sysdeps/hppa/linuxthreads/pspinlock.c +++ /dev/null @@ -1,82 +0,0 @@ -/* POSIX spinlock implementation. hppa version. - Copyright (C) 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 - 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; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include -#include -#include "internals.h" - -int -__pthread_spin_lock (pthread_spinlock_t *lock) -{ - volatile unsigned int *addr = __ldcw_align (lock); - - while (__ldcw (addr) == 0) - while (*addr == 0) ; - - return 0; -} -weak_alias (__pthread_spin_lock, pthread_spin_lock) - - -int -__pthread_spin_trylock (pthread_spinlock_t *lock) -{ - volatile unsigned int *a = __ldcw_align (lock); - - return __ldcw (a) ? 0 : EBUSY; -} -weak_alias (__pthread_spin_trylock, pthread_spin_trylock) - - -int -__pthread_spin_unlock (pthread_spinlock_t *lock) -{ - volatile unsigned int *a = __ldcw_align (lock); - int tmp = 1; - /* This should be a memory barrier to newer compilers */ - __asm__ __volatile__ ("stw,ma %1,0(%0)" - : : "r" (a), "r" (tmp) : "memory"); - return 0; -} -weak_alias (__pthread_spin_unlock, pthread_spin_unlock) - - -int -__pthread_spin_init (pthread_spinlock_t *lock, int pshared) -{ - /* We can ignore the `pshared' parameter. Since we are busy-waiting - all processes which can access the memory location `lock' points - to can use the spinlock. */ - volatile unsigned int *a = __ldcw_align (lock); - int tmp = 1; - /* This should be a memory barrier to newer compilers */ - __asm__ __volatile__ ("stw,ma %1,0(%0)" - : : "r" (a), "r" (tmp) : "memory"); - return 0; -} -weak_alias (__pthread_spin_init, pthread_spin_init) - - -int -__pthread_spin_destroy (pthread_spinlock_t *lock) -{ - /* Nothing to do. */ - return 0; -} -weak_alias (__pthread_spin_destroy, pthread_spin_destroy) diff --git a/sysdeps/hppa/linuxthreads/pt-machine.h b/sysdeps/hppa/linuxthreads/pt-machine.h deleted file mode 100644 index f35523f0f3..0000000000 --- a/sysdeps/hppa/linuxthreads/pt-machine.h +++ /dev/null @@ -1,134 +0,0 @@ -/* Machine-dependent pthreads configuration and inline functions. - hppa version. - Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Richard Henderson . - - 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; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _PT_MACHINE_H -#define _PT_MACHINE_H 1 - -#include -#include - -#ifndef PT_EI -# define PT_EI extern inline __attribute__ ((always_inline)) -#endif - -extern inline long int testandset (__atomic_lock_t *spinlock); -extern inline int __compare_and_swap (long int *p, long int oldval, long int newval); -extern inline int lock_held (__atomic_lock_t *spinlock); -extern inline int __load_and_clear (__atomic_lock_t *spinlock); - -/* Get some notion of the current stack. Need not be exactly the top - of the stack, just something somewhere in the current frame. */ -#define CURRENT_STACK_FRAME stack_pointer -register char * stack_pointer __asm__ ("%r30"); - -/* Get/Set thread-specific pointer. We have to call into the kernel to - * modify it, but we can read it in user mode. */ -#ifndef THREAD_SELF -#define THREAD_SELF __get_cr27() -#endif - -#ifndef SET_THREAD_SELF -#define SET_THREAD_SELF(descr) __set_cr27(descr) -#endif -/* Use this to determine type */ -struct _pthread_descr_struct *__thread_self; - -static inline struct _pthread_descr_struct * __get_cr27(void) -{ - long cr27; - asm ("mfctl %%cr27, %0" : "=r" (cr27) : ); - return (struct _pthread_descr_struct *) cr27; -} - -#ifndef INIT_THREAD_SELF -#define INIT_THREAD_SELF(descr, nr) __set_cr27(descr) -#endif - -static inline void __set_cr27(struct _pthread_descr_struct * cr27) -{ - asm ( "ble 0xe0(%%sr2, %%r0)\n\t" - "copy %0, %%r26" - : : "r" (cr27) : "r26" ); -} - -/* We want the OS to assign stack addresses. */ -#define FLOATING_STACKS 1 -#define ARCH_STACK_MAX_SIZE 8*1024*1024 - -/* The hppa only has one atomic read and modify memory operation, - load and clear, so hppa spinlocks must use zero to signify that - someone is holding the lock. The address used for the ldcw - semaphore must be 16-byte aligned. */ -#define __ldcw(a) \ -({ \ - unsigned int __ret; \ - __asm__ __volatile__("ldcw 0(%1),%0" \ - : "=r" (__ret) : "r" (a) : "memory"); \ - __ret; \ -}) - -/* Strongly ordered lock reset */ -#define __lock_reset(lock_addr, tmp) \ -({ \ - __asm__ __volatile__ ("stw,ma %1,0(%0)" \ - : : "r" (lock_addr), "r" (tmp) : "memory"); \ -}) - -/* Because malloc only guarantees 8-byte alignment for malloc'd data, - and GCC only guarantees 8-byte alignment for stack locals, we can't - be assured of 16-byte alignment for atomic lock data even if we - specify "__attribute ((aligned(16)))" in the type declaration. So, - we use a struct containing an array of four ints for the atomic lock - type and dynamically select the 16-byte aligned int from the array - for the semaphore. */ -#define __PA_LDCW_ALIGNMENT 16 -#define __ldcw_align(a) ({ \ - volatile unsigned int __ret = (unsigned int) a; \ - if ((__ret & ~(__PA_LDCW_ALIGNMENT - 1)) < (unsigned int) a) \ - __ret = (__ret & ~(__PA_LDCW_ALIGNMENT - 1)) + __PA_LDCW_ALIGNMENT; \ - (unsigned int *) __ret; \ -}) - -/* Spinlock implementation; required. */ -PT_EI int -__load_and_clear (__atomic_lock_t *spinlock) -{ - volatile unsigned int *a = __ldcw_align (spinlock); - - return __ldcw (a); -} - -/* Emulate testandset */ -PT_EI long int -testandset (__atomic_lock_t *spinlock) -{ - return (__load_and_clear(spinlock) == 0); -} - -PT_EI int -lock_held (__atomic_lock_t *spinlock) -{ - volatile unsigned int *a = __ldcw_align (spinlock); - - return *a == 0; -} - -#endif /* pt-machine.h */ diff --git a/sysdeps/hppa/linuxthreads/tls.h b/sysdeps/hppa/linuxthreads/tls.h deleted file mode 100644 index 3d33a18923..0000000000 --- a/sysdeps/hppa/linuxthreads/tls.h +++ /dev/null @@ -1,163 +0,0 @@ -/* Definition for thread-local data handling. linuxthreads/hppa version. - Copyright (C) 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 - 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 _TLS_H -#define _TLS_H - -#ifndef __ASSEMBLER__ -# include -# include -# include - -/* Type for the dtv. */ -typedef union dtv -{ - size_t counter; - struct - { - void *val; - bool is_static; - } pointer; -} dtv_t; - -#else /* __ASSEMBLER__ */ -# include -#endif /* __ASSEMBLER__ */ - - -#if defined HAVE_TLS_SUPPORT - -/* Signal that TLS support is available. */ -# define USE_TLS 1 - -# ifndef __ASSEMBLER__ - -typedef struct -{ - dtv_t *dtv; - void *private; -} tcbhead_t; - -/* Include some syscall information for other headers */ -# include - -/* This is the size of the initial TCB. */ -# define TLS_INIT_TCB_SIZE sizeof (tcbhead_t) - -/* Alignment requirements for the initial TCB. */ -# define TLS_INIT_TCB_ALIGN __alignof__ (tcbhead_t) - -/* This is the size of the TCB. */ -# define TLS_TCB_SIZE sizeof (tcbhead_t) - -/* This is the size we need before TCB. */ -# define TLS_PRE_TCB_SIZE sizeof (struct _pthread_descr_struct) - -/* Alignment requirements for the TCB. */ -# define TLS_TCB_ALIGN __alignof__ (struct _pthread_descr_struct) - -/* The TLS blocks start right after the TCB. */ -# define TLS_DTV_AT_TP 1 - -/* Return the thread descriptor for the current thread. */ -# undef THREAD_SELF -# define THREAD_SELF \ - ({ struct _pthread_descr_struct *__self; \ - __self = __get_cr27(); \ - __self - 1; \ - }) - -# undef INIT_THREAD_SELF -# define INIT_THREAD_SELF(descr, nr) \ - ({ struct _pthread_descr_struct *__self = (void *)descr; \ - __set_cr27(__self + 1); \ - 0; \ - }) - -/* Access to data in the thread descriptor is easy. */ -#define THREAD_GETMEM(descr, member) \ - ((void) sizeof (descr), THREAD_SELF->member) -#define THREAD_GETMEM_NC(descr, member) \ - ((void) sizeof (descr), THREAD_SELF->member) -#define THREAD_SETMEM(descr, member, value) \ - ((void) sizeof (descr), THREAD_SELF->member = (value)) -#define THREAD_SETMEM_NC(descr, member, value) \ - ((void) sizeof (descr), THREAD_SELF->member = (value)) - -/* Install the dtv pointer. The pointer passed is to the element with - index -1 which contain the length. */ -# define INSTALL_DTV(tcbp, dtvp) \ - ((tcbhead_t *) (tcbp))->dtv = dtvp + 1 - -/* Install new dtv for current thread. */ -# define INSTALL_NEW_DTV(dtv) \ - ({ tcbhead_t *__tcbp = (tcbhead_t *)__get_cr27(); \ - __tcbp->dtv = dtv; \ - }) - -/* Return dtv of given thread descriptor. */ -# define GET_DTV(tcbp) \ - (((tcbhead_t *) (tcbp))->dtv) - -/* Code to initially initialize the thread pointer. This might need - special attention since 'errno' is not yet available and if the - operation can cause a failure 'errno' must not be touched. */ -# define TLS_INIT_TP(tcbp, secondcall) \ - ({ __set_cr27(tcbp); 0; }) - -/* Return the address of the dtv for the current thread. */ -# define THREAD_DTV() \ - ({ tcbhead_t *__tcbp = (tcbhead_t *)__get_cr27(); \ - __tcbp->dtv; \ - }) - -# define TLS_MULTIPLE_THREADS_IN_TCB 1 - -/* Get the thread descriptor definition. This must be after the - the definition of THREAD_SELF for TLS. */ -# include - -# endif /* __ASSEMBLER__ */ - -#else - -# ifndef __ASSEMBLER__ - -typedef struct -{ - void *tcb; - dtv_t *dtv; - void *self; - int multiple_threads; -} tcbhead_t; - -/* Get the thread descriptor definition. */ -# include - -# define NONTLS_INIT_TP \ - do { \ - static const tcbhead_t nontls_init_tp = { .multiple_threads = 0 }; \ - INIT_THREAD_SELF(&nontls_init_tp, 0); \ - } while (0) - -# endif /* __ASSEMBLER__ */ - -#endif /* HAVE_TLS_SUPPORT */ - -#endif /* tls.h */ diff --git a/sysdeps/unix/sysv/linux/hppa/linuxthreads/aio_cancel.c b/sysdeps/unix/sysv/linux/hppa/linuxthreads/aio_cancel.c deleted file mode 100644 index 0d6da82919..0000000000 --- a/sysdeps/unix/sysv/linux/hppa/linuxthreads/aio_cancel.c +++ /dev/null @@ -1,33 +0,0 @@ -#include - -#define aio_cancel64 XXX -#include -#undef aio_cancel64 -#include - -extern __typeof (aio_cancel) __new_aio_cancel; -extern __typeof (aio_cancel) __old_aio_cancel; - -#define aio_cancel __new_aio_cancel - -#include - -#undef aio_cancel -strong_alias (__new_aio_cancel, __new_aio_cancel64); -versioned_symbol (librt, __new_aio_cancel, aio_cancel, GLIBC_2_3); -versioned_symbol (librt, __new_aio_cancel64, aio_cancel64, GLIBC_2_3); - -#if SHLIB_COMPAT (librt, GLIBC_2_1, GLIBC_2_3) - -#undef ECANCELED -#define aio_cancel __old_aio_cancel -#define ECANCELED 125 - -#include - -#undef aio_cancel -strong_alias (__old_aio_cancel, __old_aio_cancel64); -compat_symbol (librt, __old_aio_cancel, aio_cancel, GLIBC_2_1); -compat_symbol (librt, __old_aio_cancel64, aio_cancel64, GLIBC_2_1); - -#endif diff --git a/sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/initspin.h b/sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/initspin.h deleted file mode 100644 index ff0ec200f7..0000000000 --- a/sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/initspin.h +++ /dev/null @@ -1,41 +0,0 @@ -/* PA-RISC specific definitions for spinlock initializers. - Copyright (C) 2000, 2001 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; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* Initial value of a spinlock. PA-RISC only implements atomic load - and clear so this must be non-zero. */ -#define __LT_SPINLOCK_INIT ((__atomic_lock_t) { { 1, 1, 1, 1 } }) - -/* Initialize global spinlocks without cast, generally macro wrapped */ -#define __LT_SPINLOCK_ALT_INIT { { 1, 1, 1, 1 } } - -/* Macros for lock initializers, not using the above definition. - The above definition is not used in the case that static initializers - use this value. */ -#define __LOCK_ALT_INITIALIZER { __LT_SPINLOCK_ALT_INIT, 0 } - -/* Used to initialize _pthread_fastlock's in non-static case */ -#define __LOCK_INITIALIZER ((struct _pthread_fastlock){ __LT_SPINLOCK_INIT, 0 }) - -/* Used in pthread_atomic initialization */ -#define __ATOMIC_INITIALIZER { 0, __LT_SPINLOCK_ALT_INIT } - -/* Tell the rest of the code that the initializer is non-zero without - explaining it's internal structure */ -#define __LT_INITIALIZER_NOT_ZERO - diff --git a/sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/pthreadtypes.h deleted file mode 100644 index 7173718318..0000000000 --- a/sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/pthreadtypes.h +++ /dev/null @@ -1,159 +0,0 @@ -/* Linuxthreads - a simple clone()-based implementation of Posix */ -/* threads for Linux. */ -/* Copyright (C) 1996 Xavier Leroy (Xavier.Leroy@inria.fr) */ -/* */ -/* This program is free software; you can redistribute it and/or */ -/* modify it under the terms of the GNU Library General Public License */ -/* as published by the Free Software Foundation; either version 2 */ -/* of the License, or (at your option) any later version. */ -/* */ -/* This program 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 Library General Public License for more details. */ - -#if !defined _BITS_TYPES_H && !defined _PTHREAD_H -# error "Never include directly; use instead." -#endif - -#ifndef _BITS_PTHREADTYPES_H -#define _BITS_PTHREADTYPES_H 1 - -#define __need_schedparam -#include - -/* We need 128-bit alignment for the ldcw semaphore. At most, we are - assured of 64-bit alignment for stack locals and malloc'd data. Thus, - we use a struct with four ints for the atomic lock type. The locking - code will figure out which of the four to use for the ldcw semaphore. */ -typedef volatile struct { - int lock[4]; -} __attribute__ ((aligned(16))) __atomic_lock_t; - -/* Fast locks (not abstract because mutexes and conditions aren't abstract). */ -struct _pthread_fastlock -{ - __atomic_lock_t __spinlock; /* Used by compare_and_swap emulation. Also, - adaptive SMP lock stores spin count here. */ - long int __status; /* "Free" or "taken" or head of waiting list */ -}; - -#ifndef _PTHREAD_DESCR_DEFINED -/* Thread descriptors */ -typedef struct _pthread_descr_struct *_pthread_descr; -# define _PTHREAD_DESCR_DEFINED -#endif - - -/* Attributes for threads. */ -typedef struct __pthread_attr_s -{ - int __detachstate; - int __schedpolicy; - struct __sched_param __schedparam; - int __inheritsched; - int __scope; - size_t __guardsize; - int __stackaddr_set; - void *__stackaddr; - size_t __stacksize; -} pthread_attr_t; - - -/* Conditions (not abstract because of PTHREAD_COND_INITIALIZER */ - -#ifdef __GLIBC_HAVE_LONG_LONG -__extension__ typedef long long __pthread_cond_align_t; -#else -typedef long __pthread_cond_align_t; -#endif - -typedef struct -{ - struct _pthread_fastlock __c_lock; /* Protect against concurrent access */ - _pthread_descr __c_waiting; /* Threads waiting on this condition */ - char __padding[48 - sizeof (struct _pthread_fastlock) - - sizeof (_pthread_descr) - sizeof (__pthread_cond_align_t)]; - __pthread_cond_align_t __align; -} pthread_cond_t; - - -/* Attribute for conditionally variables. */ -typedef struct -{ - int __dummy; -} pthread_condattr_t; - -/* Keys for thread-specific data */ -typedef unsigned int pthread_key_t; - - -/* Mutexes (not abstract because of PTHREAD_MUTEX_INITIALIZER). */ -/* (The layout is unnatural to maintain binary compatibility - with earlier releases of LinuxThreads.) */ -typedef struct -{ - int __m_reserved; /* Reserved for future use */ - int __m_count; /* Depth of recursive locking */ - _pthread_descr __m_owner; /* Owner thread (if recursive or errcheck) */ - int __m_kind; /* Mutex kind: fast, recursive or errcheck */ - struct _pthread_fastlock __m_lock; /* Underlying fast lock */ -} pthread_mutex_t; - - -/* Attribute for mutex. */ -typedef struct -{ - int __mutexkind; -} pthread_mutexattr_t; - - -/* Once-only execution */ -typedef int pthread_once_t; - -#if defined __USE_UNIX98 || defined __USE_XOPEN2K -/* Read-write locks. */ -typedef struct _pthread_rwlock_t -{ - struct _pthread_fastlock __rw_lock; /* Lock to guarantee mutual exclusion */ - int __rw_readers; /* Number of readers */ - _pthread_descr __rw_writer; /* Identity of writer, or NULL if none */ - _pthread_descr __rw_read_waiting; /* Threads waiting for reading */ - _pthread_descr __rw_write_waiting; /* Threads waiting for writing */ - int __rw_kind; /* Reader/Writer preference selection */ - int __rw_pshared; /* Shared between processes or not */ -} pthread_rwlock_t; - - -/* Attribute for read-write locks. */ -typedef struct -{ - int __lockkind; - int __pshared; -} pthread_rwlockattr_t; -#endif - -#ifdef __USE_XOPEN2K -/* POSIX spinlock data type. */ -typedef __atomic_lock_t pthread_spinlock_t; - -/* POSIX barrier. */ -typedef struct { - struct _pthread_fastlock __ba_lock; /* Lock to guarantee mutual exclusion */ - int __ba_required; /* Threads needed for completion */ - int __ba_present; /* Threads waiting */ - _pthread_descr __ba_waiting; /* Queue of waiting threads */ -} pthread_barrier_t; - -/* barrier attribute */ -typedef struct { - int __pshared; -} pthread_barrierattr_t; - -#endif - - -/* Thread identifiers */ -typedef unsigned long int pthread_t; - -#endif /* bits/pthreadtypes.h */ diff --git a/sysdeps/unix/sysv/linux/hppa/linuxthreads/malloc-machine.h b/sysdeps/unix/sysv/linux/hppa/linuxthreads/malloc-machine.h deleted file mode 100644 index 5dc6e6fa71..0000000000 --- a/sysdeps/unix/sysv/linux/hppa/linuxthreads/malloc-machine.h +++ /dev/null @@ -1,73 +0,0 @@ -/* HP-PARISC macro definitions for mutexes, thread-specific data - and parameters for malloc. - Copyright (C) 2003 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Carlos O'Donell , 2003. - - 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 _MALLOC_MACHINE_H -#define _MALLOC_MACHINE_H - -#undef thread_atfork_static - -#include -#include - -__libc_lock_define (typedef, mutex_t) - -/* Since our lock structure does not tolerate being initialized to zero, we must - modify the standard function calls made by malloc */ -# define mutex_init(m) \ - __libc_maybe_call (__pthread_mutex_init, (m, NULL), \ - (((m)->__m_lock.__spinlock = __LT_SPINLOCK_INIT),(*(int *)(m))) ) -# define mutex_lock(m) \ - __libc_maybe_call (__pthread_mutex_lock, (m), \ - (__load_and_clear(&((m)->__m_lock.__spinlock)), 0)) -# define mutex_trylock(m) \ - __libc_maybe_call (__pthread_mutex_trylock, (m), \ - (*(int *)(m) ? 1 : (__load_and_clear(&((m)->__m_lock.__spinlock)), 0))) -# define mutex_unlock(m) \ - __libc_maybe_call (__pthread_mutex_unlock, (m), \ - (((m)->__m_lock.__spinlock = __LT_SPINLOCK_INIT), (*(int *)(m))) ) - -/* This is defined by newer gcc version unique for each module. */ -extern void *__dso_handle __attribute__ ((__weak__)); - -#include - -#ifdef SHARED -# define thread_atfork(prepare, parent, child) \ - __register_atfork (prepare, parent, child, __dso_handle) -#else -# define thread_atfork(prepare, parent, child) \ - __register_atfork (prepare, parent, child, \ - &__dso_handle == NULL ? NULL : __dso_handle) -#endif - -/* thread specific data for glibc */ - -#include - -typedef int tsd_key_t[1]; /* no key data structure, libc magic does it */ -__libc_tsd_define (static, void *, MALLOC) /* declaration/common definition */ -#define tsd_key_create(key, destr) ((void) (key)) -#define tsd_setspecific(key, data) __libc_tsd_set (void *, MALLOC, (data)) -#define tsd_getspecific(key, vptr) ((vptr) = __libc_tsd_get (void *, MALLOC)) - -#include - -#endif /* !defined(_MALLOC_MACHINE_H) */ diff --git a/sysdeps/unix/sysv/linux/hppa/linuxthreads/pt-initfini.c b/sysdeps/unix/sysv/linux/hppa/linuxthreads/pt-initfini.c deleted file mode 100644 index 27f850cf8f..0000000000 --- a/sysdeps/unix/sysv/linux/hppa/linuxthreads/pt-initfini.c +++ /dev/null @@ -1,109 +0,0 @@ -/* Special .init and .fini section support for HPPA. Linuxthreads version. - Copyright (C) 2001, 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. - - In addition to the permissions in the GNU Lesser General Public - License, the Free Software Foundation gives you unlimited - permission to link the compiled version of this file with other - programs, and to distribute those programs without any restriction - coming from the use of this file. (The Lesser General Public - License restrictions do apply in other respects; for example, they - cover modification of the file, and distribution when not linked - into another program.) - - 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; see the file COPYING.LIB. If not, - write to the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* This file is compiled into assembly code which is then munged by a sed - script into two files: crti.s and crtn.s. - - * crti.s puts a function prologue at the beginning of the - .init and .fini sections and defines global symbols for - those addresses, so they can be called as functions. - - * crtn.s puts the corresponding function epilogues - in the .init and .fini sections. */ - -/* If we use the standard C version, the linkage table pointer won't - be properly preserved due to the splitting up of function prologues - and epilogues. Therefore we write these in assembly to make sure - they do the right thing. */ - -__asm__ ( -"#include \"defs.h\"\n" -"\n" -"/*@HEADER_ENDS*/\n" -"\n" -"/*@_init_PROLOG_BEGINS*/\n" -" .section .init\n" -" .align 4\n" -" .globl _init\n" -" .type _init,@function\n" -"_init:\n" -" stw %rp,-20(%sp)\n" -" stwm %r4,64(%sp)\n" -" stw %r19,-32(%sp)\n" -" bl __pthread_initialize_minimal,%rp\n" -" copy %r19,%r4 /* delay slot */\n" -" copy %r4,%r19\n" -"/*@_init_PROLOG_ENDS*/\n" -"\n" -"/*@_init_EPILOG_BEGINS*/\n" -"/* Here is the tail end of _init. */\n" -" .section .init\n" -" ldw -84(%sp),%rp\n" -" copy %r4,%r19\n" -" bv %r0(%rp)\n" -"_end_init:\n" -" ldwm -64(%sp),%r4\n" -"\n" -"/* Our very own unwind info, because the assembler can't handle\n" -" functions split into two or more pieces. */\n" -" .section .PARISC.unwind,\"a\",@progbits\n" -" .extern _init\n" -" .word _init, _end_init\n" -" .byte 0x08, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08\n" -"\n" -"/*@_init_EPILOG_ENDS*/\n" -"\n" -"/*@_fini_PROLOG_BEGINS*/\n" -" .section .fini\n" -" .align 4\n" -" .globl _fini\n" -" .type _fini,@function\n" -"_fini:\n" -" stw %rp,-20(%sp)\n" -" stwm %r4,64(%sp)\n" -" stw %r19,-32(%sp)\n" -" copy %r19,%r4\n" -"/*@_fini_PROLOG_ENDS*/\n" -"\n" -"/*@_fini_EPILOG_BEGINS*/\n" -" .section .fini\n" -" ldw -84(%sp),%rp\n" -" copy %r4,%r19\n" -" bv %r0(%rp)\n" -"_end_fini:\n" -" ldwm -64(%sp),%r4\n" -"\n" -" .section .PARISC.unwind,\"a\",@progbits\n" -" .extern _fini\n" -" .word _fini, _end_fini\n" -" .byte 0x08, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08\n" -"\n" -"/*@_fini_EPILOG_ENDS*/\n" -"\n" -"/*@TRAILER_BEGINS*/\n" -); diff --git a/sysdeps/unix/sysv/linux/hppa/linuxthreads/sysdep-cancel.h b/sysdeps/unix/sysv/linux/hppa/linuxthreads/sysdep-cancel.h deleted file mode 100644 index 51d6cf3943..0000000000 --- a/sysdeps/unix/sysv/linux/hppa/linuxthreads/sysdep-cancel.h +++ /dev/null @@ -1,242 +0,0 @@ -/* cancellable system calls for Linux/HPPA. - Copyright (C) 2003 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Carlos O'Donell , 2003. - - 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. */ - -#include -#include -#ifndef __ASSEMBLER__ -# include -#endif - -#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt - -# ifndef NO_ERROR -# define NO_ERROR -0x1000 -# endif - -/* The syscall cancellation mechanism requires userspace - assistance, the following code does roughly this: - - do arguments (read arg5 and arg6 to registers) - setup frame - - check if there are threads, yes jump to pseudo_cancel - - unthreaded: - syscall - check syscall return (jump to pre_end) - set errno - set return to -1 - (jump to pre_end) - - pseudo_cancel: - cenable - syscall - cdisable - check syscall return (jump to pre_end) - set errno - set return to -1 - - pre_end - restore stack - - It is expected that 'ret' and 'END' macros will - append an 'undo arguments' and 'return' to the - this PSEUDO macro. */ - -# undef PSEUDO -# define PSEUDO(name, syscall_name, args) \ - ENTRY (name) \ - DOARGS_##args ASM_LINE_SEP \ - copy TREG, %r1 ASM_LINE_SEP \ - copy %sp, TREG ASM_LINE_SEP \ - stwm %r1, 64(%sp) ASM_LINE_SEP \ - stw %rp, -20(%sp) ASM_LINE_SEP \ - stw TREG, -4(%sp) ASM_LINE_SEP \ - /* Done setting up frame, continue... */ ASM_LINE_SEP \ - SINGLE_THREAD_P ASM_LINE_SEP \ - cmpib,<>,n 0,%ret0,L(pseudo_cancel) ASM_LINE_SEP \ -L(unthreaded): ASM_LINE_SEP \ - /* Save r19 */ ASM_LINE_SEP \ - SAVE_PIC(TREG) ASM_LINE_SEP \ - /* Do syscall, delay loads # */ ASM_LINE_SEP \ - ble 0x100(%sr2,%r0) ASM_LINE_SEP \ - ldi SYS_ify (syscall_name), %r20 /* delay */ ASM_LINE_SEP \ - ldi NO_ERROR,%r1 ASM_LINE_SEP \ - cmpb,>>=,n %r1,%ret0,L(pre_end) ASM_LINE_SEP \ - /* Restore r19 from TREG */ ASM_LINE_SEP \ - LOAD_PIC(TREG) /* delay */ ASM_LINE_SEP \ - SYSCALL_ERROR_HANDLER ASM_LINE_SEP \ - /* Use TREG for temp storage */ ASM_LINE_SEP \ - copy %ret0, TREG /* delay */ ASM_LINE_SEP \ - /* OPTIMIZE: Don't reload r19 */ ASM_LINE_SEP \ - /* do a -1*syscall_ret0 */ ASM_LINE_SEP \ - sub %r0, TREG, TREG ASM_LINE_SEP \ - /* Store into errno location */ ASM_LINE_SEP \ - stw TREG, 0(%sr0,%ret0) ASM_LINE_SEP \ - b L(pre_end) ASM_LINE_SEP \ - /* return -1 as error */ ASM_LINE_SEP \ - ldo -1(%r0), %ret0 /* delay */ ASM_LINE_SEP \ -L(pseudo_cancel): ASM_LINE_SEP \ - PUSHARGS_##args /* Save args */ ASM_LINE_SEP \ - /* Save r19 into TREG */ ASM_LINE_SEP \ - CENABLE /* FUNC CALL */ ASM_LINE_SEP \ - SAVE_PIC(TREG) /* delay */ ASM_LINE_SEP \ - /* restore syscall args */ ASM_LINE_SEP \ - POPARGS_##args ASM_LINE_SEP \ - /* save mask from cenable (use stub rp slot) */ ASM_LINE_SEP \ - stw %ret0, -24(%sp) ASM_LINE_SEP \ - /* ... SYSCALL ... */ ASM_LINE_SEP \ - ble 0x100(%sr2,%r0) ASM_LINE_SEP \ - ldi SYS_ify (syscall_name), %r20 /* delay */ ASM_LINE_SEP \ - /* ............... */ ASM_LINE_SEP \ - LOAD_PIC(TREG) ASM_LINE_SEP \ - /* pass mask as arg0 to cdisable */ ASM_LINE_SEP \ - ldw -24(%sp), %r26 ASM_LINE_SEP \ - CDISABLE ASM_LINE_SEP \ - stw %ret0, -24(%sp) /* delay */ ASM_LINE_SEP \ - /* Restore syscall return */ ASM_LINE_SEP \ - ldw -24(%sp), %ret0 ASM_LINE_SEP \ - /* compare error */ ASM_LINE_SEP \ - ldi NO_ERROR,%r1 ASM_LINE_SEP \ - /* branch if no error */ ASM_LINE_SEP \ - cmpb,>>=,n %r1,%ret0,L(pre_end) ASM_LINE_SEP \ - LOAD_PIC(TREG) /* cond. nullify */ ASM_LINE_SEP \ - copy %ret0, TREG /* save syscall return */ ASM_LINE_SEP \ - SYSCALL_ERROR_HANDLER ASM_LINE_SEP \ - /* make syscall res value positive */ ASM_LINE_SEP \ - sub %r0, TREG, TREG /* delay */ ASM_LINE_SEP \ - /* No need to LOAD_PIC */ ASM_LINE_SEP \ - /* store into errno location */ ASM_LINE_SEP \ - stw TREG, 0(%sr0,%ret0) ASM_LINE_SEP \ - /* return -1 */ ASM_LINE_SEP \ - ldo -1(%r0), %ret0 ASM_LINE_SEP \ -L(pre_end): ASM_LINE_SEP \ - /* Restore rp before exit */ ASM_LINE_SEP \ - ldw -84(%sr0,%sp), %rp ASM_LINE_SEP \ - /* Undo frame */ ASM_LINE_SEP \ - ldwm -64(%sp),TREG ASM_LINE_SEP \ - /* No need to LOAD_PIC */ ASM_LINE_SEP - -/* Save arguments into our frame */ -# define PUSHARGS_0 /* nothing to do */ -# define PUSHARGS_1 PUSHARGS_0 stw %r26, -36(%sr0,%sp) ASM_LINE_SEP -# define PUSHARGS_2 PUSHARGS_1 stw %r25, -40(%sr0,%sp) ASM_LINE_SEP -# define PUSHARGS_3 PUSHARGS_2 stw %r24, -44(%sr0,%sp) ASM_LINE_SEP -# define PUSHARGS_4 PUSHARGS_3 stw %r23, -48(%sr0,%sp) ASM_LINE_SEP -# define PUSHARGS_5 PUSHARGS_4 stw %r22, -52(%sr0,%sp) ASM_LINE_SEP -# define PUSHARGS_6 PUSHARGS_5 stw %r21, -56(%sr0,%sp) ASM_LINE_SEP - -/* Bring them back from the stack */ -# define POPARGS_0 /* nothing to do */ -# define POPARGS_1 POPARGS_0 ldw -36(%sr0,%sp), %r26 ASM_LINE_SEP -# define POPARGS_2 POPARGS_1 ldw -40(%sr0,%sp), %r25 ASM_LINE_SEP -# define POPARGS_3 POPARGS_2 ldw -44(%sr0,%sp), %r24 ASM_LINE_SEP -# define POPARGS_4 POPARGS_3 ldw -48(%sr0,%sp), %r23 ASM_LINE_SEP -# define POPARGS_5 POPARGS_4 ldw -52(%sr0,%sp), %r22 ASM_LINE_SEP -# define POPARGS_6 POPARGS_5 ldw -56(%sr0,%sp), %r21 ASM_LINE_SEP - -# ifdef IS_IN_libpthread -# ifdef PIC -# define CENABLE .import __pthread_enable_asynccancel,code ASM_LINE_SEP \ - bl __pthread_enable_asynccancel,%r2 ASM_LINE_SEP -# define CDISABLE .import __pthread_disable_asynccancel,code ASM_LINE_SEP \ - bl __pthread_disable_asynccancel,%r2 ASM_LINE_SEP -# else -# define CENABLE .import __pthread_enable_asynccancel,code ASM_LINE_SEP \ - bl __pthread_enable_asynccancel,%r2 ASM_LINE_SEP -# define CDISABLE .import __pthread_disable_asynccancel,code ASM_LINE_SEP \ - bl __pthread_disable_asynccancel,%r2 ASM_LINE_SEP -# endif -# elif !defined NOT_IN_libc -# ifdef PIC -# define CENABLE .import __libc_enable_asynccancel,code ASM_LINE_SEP \ - bl __libc_enable_asynccancel,%r2 ASM_LINE_SEP -# define CDISABLE .import __libc_disable_asynccancel,code ASM_LINE_SEP \ - bl __libc_disable_asynccancel,%r2 ASM_LINE_SEP -# else -# define CENABLE .import __libc_enable_asynccancel,code ASM_LINE_SEP \ - bl __libc_enable_asynccancel,%r2 ASM_LINE_SEP -# define CDISABLE .import __libc_disable_asynccancel,code ASM_LINE_SEP \ - bl __libc_disable_asynccancel,%r2 ASM_LINE_SEP -# endif -# else -# ifdef PIC -# define CENABLE .import __librt_enable_asynccancel,code ASM_LINE_SEP \ - bl __librt_enable_asynccancel,%r2 ASM_LINE_SEP -# define CDISABLE .import __librt_disable_asynccancel,code ASM_LINE_SEP \ - bl __librt_disable_asynccancel,%r2 ASM_LINE_SEP -# else -# define CENABLE .import __librt_enable_asynccancel,code ASM_LINE_SEP \ - bl __librt_enable_asynccancel,%r2 ASM_LINE_SEP -# define CDISABLE .import __librt_disable_asynccancel,code ASM_LINE_SEP \ - bl __librt_disable_asynccancel,%r2 ASM_LINE_SEP -# endif -# endif - -/* p_header.multiple_threads is +12 from the pthread_descr struct start, - We could have called __get_cr27() but we really want less overhead */ -# define MULTIPLE_THREADS_OFFSET 0xC - -/* cr27 has been initialized to 0x0 by kernel */ -# define NO_THREAD_CR27 0x0 - -# ifdef IS_IN_libpthread -# define __local_multiple_threads __pthread_multiple_threads -# elif !defined NOT_IN_libc -# define __local_multiple_threads __libc_multiple_threads -# else -# define __local_multiple_threads __librt_multiple_threads -# endif - -# ifndef __ASSEMBLER__ -# if !defined NOT_IN_libc || defined IS_IN_libpthread -extern int __local_multiple_threads attribute_hidden; -# else -extern int __local_multiple_threads; -# endif -# define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1) -# else -/* This ALT version requires newer kernel support */ -# define SINGLE_THREAD_P_MFCTL \ - mfctl %cr27, %ret0 ASM_LINE_SEP \ - cmpib,= NO_THREAD_CR27,%ret0,L(stp) ASM_LINE_SEP \ - nop ASM_LINE_SEP \ - ldw MULTIPLE_THREADS_OFFSET(%sr0,%ret0),%ret0 ASM_LINE_SEP \ -L(stp): ASM_LINE_SEP -# ifdef PIC -/* Slower version uses GOT to get value of __local_multiple_threads */ -# define SINGLE_THREAD_P \ - addil LT%__local_multiple_threads, %r19 ASM_LINE_SEP \ - ldw RT%__local_multiple_threads(%sr0,%r1), %ret0 ASM_LINE_SEP \ - ldw 0(%sr0,%ret0), %ret0 ASM_LINE_SEP -# else -/* Slow non-pic version using DP */ -# define SINGLE_THREAD_P \ - addil LR%__local_multiple_threads-$global$,%r27 ASM_LINE_SEP \ - ldw RR%__local_multiple_threads-$global$(%sr0,%r1),%ret0 ASM_LINE_SEP -# endif -# endif -#elif !defined __ASSEMBLER__ - -/* This code should never be used but we define it anyhow. */ -# define SINGLE_THREAD_P (1) - -#endif -/* !defined NOT_IN_libc || defined IS_IN_libpthread */ From f84ed6825441096273a893b66a769e37ef68f2f3 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Thu, 20 Oct 2011 15:09:24 -0400 Subject: [PATCH 4131/4487] Update ChangeLog.hppa. Add missing entries to ChangeLog. Signed-off-by: Carlos O'Donell --- ChangeLog.hppa | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 01e7d1af56..b83f4f0a69 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -6,6 +6,9 @@ * sysdeps/unix/sysv/linux/hppa/linuxthreads/malloc-machine.h: Remove. * sysdeps/unix/sysv/linux/hppa/linuxthreads/pt-initfini.c: Remove. * sysdeps/unix/sysv/linux/hppa/linuxthreads/sysdep-cancel.h: Remove. + * sysdeps/hppa/linuxthreads/pspinlock.c: Remove. + * sysdeps/hppa/linuxthreads/pt-machine.h: Remove. + * sysdeps/hppa/linuxthreads/tls.h: Remove. 2011-10-20 Carlos O'Donell From 8cb8321faf2edcf36d5061e8fc4c8fec4b23fd39 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Fri, 21 Oct 2011 10:08:04 -0400 Subject: [PATCH 4132/4487] Update cancellable assembly system call wrappers. This patch updates sysdep-cancel.h to include the new no-cancel wrapper and provides CFI directives for all of the assembly. The CFI directives should allow unwinding information to be generated. Signed-off-by: Carlos O'Donell --- ChangeLog.hppa | 19 +++++ .../unix/sysv/linux/hppa/nptl/sysdep-cancel.h | 84 +++++++++++++++---- 2 files changed, 89 insertions(+), 14 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index b83f4f0a69..564ca0fe06 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,22 @@ +2011-10-20 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h: Update copyright + year. + (PSEUDO): Define __*_nocancel version. Add CFI directives to __*_nocancel + and normal version. + (PUSHARGS_1): Add CFI directive. + (PUSHARGS_2): Likewise. + (PUSHARGS_3): Likewise. + (PUSHARGS_4): Likewise. + (PUSHARGS_5): Likewise. + (PUSHARGS_6): Likewise. + (POPARGS_1): Likewise. + (POPARGS_2): Likewise. + (POPARGS_3): Likewise. + (POPARGS_4): Likewise. + (POPARGS_5): Likewise. + (POPARGS_6): Likewise. + 2011-10-20 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/linuxthreads/aio_cancel.c: Remove. diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h index 6cffa7631a..d704345fe8 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2005 Free Software Foundation, Inc. +/* Copyright (C) 2005, 2011 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 @@ -61,11 +61,53 @@ # undef PSEUDO # define PSEUDO(name, syscall_name, args) \ + ENTRY (__##syscall_name##_nocancel) \ + DOARGS_##args ASM_LINE_SEP \ + stwm TREG, 64(%sp) ASM_LINE_SEP \ + .cfi_offset TREG, 0 ASM_LINE_SEP \ + .cfi_adjust_cfa_offset 64 ASM_LINE_SEP \ + stw %sp, -4(%sp) ASM_LINE_SEP \ + .cfi_offset 30, -4 ASM_LINE_SEP \ + stw %r19, -32(%sp) ASM_LINE_SEP \ + .cfi_offset 19, -32 ASM_LINE_SEP \ + /* Save r19 */ ASM_LINE_SEP \ + SAVE_PIC(TREG) ASM_LINE_SEP \ + /* Do syscall, delay loads # */ ASM_LINE_SEP \ + ble 0x100(%sr2,%r0) ASM_LINE_SEP \ + ldi SYS_ify (syscall_name), %r20 /* delay */ ASM_LINE_SEP \ + ldi NO_ERROR,%r1 ASM_LINE_SEP \ + cmpb,>>=,n %r1,%ret0,L(pre_nc_end) ASM_LINE_SEP \ + /* Restore r19 from TREG */ ASM_LINE_SEP \ + LOAD_PIC(TREG) /* delay */ ASM_LINE_SEP \ + SYSCALL_ERROR_HANDLER ASM_LINE_SEP \ + /* Use TREG for temp storage */ ASM_LINE_SEP \ + copy %ret0, TREG /* delay */ ASM_LINE_SEP \ + /* OPTIMIZE: Don't reload r19 */ ASM_LINE_SEP \ + /* do a -1*syscall_ret0 */ ASM_LINE_SEP \ + sub %r0, TREG, TREG ASM_LINE_SEP \ + /* Store into errno location */ ASM_LINE_SEP \ + stw TREG, 0(%sr0,%ret0) ASM_LINE_SEP \ + /* return -1 as error */ ASM_LINE_SEP \ + ldi -1, %ret0 ASM_LINE_SEP \ +L(pre_nc_end): ASM_LINE_SEP \ + /* No need to LOAD_PIC */ ASM_LINE_SEP \ + /* Undo frame */ ASM_LINE_SEP \ + ldwm -64(%sp),TREG ASM_LINE_SEP \ + .cfi_adjust_cfa_offset -64 ASM_LINE_SEP \ + /* Restore rp before exit */ ASM_LINE_SEP \ + ldw -20(%sp), %rp ASM_LINE_SEP \ + .cfi_restore 2 ASM_LINE_SEP \ + ret ASM_LINE_SEP \ + END(__##syscall_name##_nocancel) ASM_LINE_SEP \ + /**********************************************/ASM_LINE_SEP \ ENTRY (name) \ DOARGS_##args ASM_LINE_SEP \ stwm TREG, 64(%sp) ASM_LINE_SEP \ + .cfi_adjust_cfa_offset 64 ASM_LINE_SEP \ stw %sp, -4(%sp) ASM_LINE_SEP \ + .cfi_offset 30, -4 ASM_LINE_SEP \ stw %r19, -32(%sp) ASM_LINE_SEP \ + .cfi_offset 19, -32 ASM_LINE_SEP \ /* Done setting up frame, continue... */ ASM_LINE_SEP \ SINGLE_THREAD_P ASM_LINE_SEP \ cmpib,<>,n 0,%ret0,L(pseudo_cancel) ASM_LINE_SEP \ @@ -128,26 +170,40 @@ L(pre_end): ASM_LINE_SEP \ /* No need to LOAD_PIC */ ASM_LINE_SEP \ /* Undo frame */ ASM_LINE_SEP \ ldwm -64(%sp),TREG ASM_LINE_SEP \ + .cfi_adjust_cfa_offset -64 ASM_LINE_SEP \ /* Restore rp before exit */ ASM_LINE_SEP \ - ldw -20(%sp), %rp ASM_LINE_SEP + ldw -20(%sp), %rp ASM_LINE_SEP \ + .cfi_restore 2 ASM_LINE_SEP /* Save arguments into our frame */ # define PUSHARGS_0 /* nothing to do */ -# define PUSHARGS_1 PUSHARGS_0 stw %r26, -36(%sr0,%sp) ASM_LINE_SEP -# define PUSHARGS_2 PUSHARGS_1 stw %r25, -40(%sr0,%sp) ASM_LINE_SEP -# define PUSHARGS_3 PUSHARGS_2 stw %r24, -44(%sr0,%sp) ASM_LINE_SEP -# define PUSHARGS_4 PUSHARGS_3 stw %r23, -48(%sr0,%sp) ASM_LINE_SEP -# define PUSHARGS_5 PUSHARGS_4 stw %r22, -52(%sr0,%sp) ASM_LINE_SEP -# define PUSHARGS_6 PUSHARGS_5 stw %r21, -56(%sr0,%sp) ASM_LINE_SEP +# define PUSHARGS_1 PUSHARGS_0 stw %r26, -36(%sr0,%sp) ASM_LINE_SEP \ + .cfi_offset 26, -36 ASM_LINE_SEP +# define PUSHARGS_2 PUSHARGS_1 stw %r25, -40(%sr0,%sp) ASM_LINE_SEP \ + .cfi_offset 25, -40 ASM_LINE_SEP +# define PUSHARGS_3 PUSHARGS_2 stw %r24, -44(%sr0,%sp) ASM_LINE_SEP \ + .cfi_offset 24, -44 ASM_LINE_SEP +# define PUSHARGS_4 PUSHARGS_3 stw %r23, -48(%sr0,%sp) ASM_LINE_SEP \ + .cfi_offset 23, -48 ASM_LINE_SEP +# define PUSHARGS_5 PUSHARGS_4 stw %r22, -52(%sr0,%sp) ASM_LINE_SEP \ + .cfi_offset 22, -52 ASM_LINE_SEP +# define PUSHARGS_6 PUSHARGS_5 stw %r21, -56(%sr0,%sp) ASM_LINE_SEP \ + .cfi_offset 21, -56 ASM_LINE_SEP /* Bring them back from the stack */ # define POPARGS_0 /* nothing to do */ -# define POPARGS_1 POPARGS_0 ldw -36(%sr0,%sp), %r26 ASM_LINE_SEP -# define POPARGS_2 POPARGS_1 ldw -40(%sr0,%sp), %r25 ASM_LINE_SEP -# define POPARGS_3 POPARGS_2 ldw -44(%sr0,%sp), %r24 ASM_LINE_SEP -# define POPARGS_4 POPARGS_3 ldw -48(%sr0,%sp), %r23 ASM_LINE_SEP -# define POPARGS_5 POPARGS_4 ldw -52(%sr0,%sp), %r22 ASM_LINE_SEP -# define POPARGS_6 POPARGS_5 ldw -56(%sr0,%sp), %r21 ASM_LINE_SEP +# define POPARGS_1 POPARGS_0 ldw -36(%sr0,%sp), %r26 ASM_LINE_SEP \ + .cfi_restore 26 ASM_LINE_SEP +# define POPARGS_2 POPARGS_1 ldw -40(%sr0,%sp), %r25 ASM_LINE_SEP \ + .cfi_restore 25 ASM_LINE_SEP +# define POPARGS_3 POPARGS_2 ldw -44(%sr0,%sp), %r24 ASM_LINE_SEP \ + .cfi_restore 24 ASM_LINE_SEP +# define POPARGS_4 POPARGS_3 ldw -48(%sr0,%sp), %r23 ASM_LINE_SEP \ + .cfi_restore 23 ASM_LINE_SEP +# define POPARGS_5 POPARGS_4 ldw -52(%sr0,%sp), %r22 ASM_LINE_SEP \ + .cfi_restore 22 ASM_LINE_SEP +# define POPARGS_6 POPARGS_5 ldw -56(%sr0,%sp), %r21 ASM_LINE_SEP \ + .cfi_restore 21 ASM_LINE_SEP # ifdef IS_IN_libpthread # ifdef PIC From f683020445f7fcb66100cfa8adcacd4025528694 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Fri, 21 Oct 2011 12:16:52 -0400 Subject: [PATCH 4133/4487] Update sys/procfs.h. The signal.h and sys/ucontext.h headers no longer need to be included directly into procfs.h. This syncrhonizes this file with other canonical targets and makes maintenance easier. Signed-off-by: Carlos O'Donell --- ChangeLog.hppa | 5 +++++ sysdeps/unix/sysv/linux/hppa/sys/procfs.h | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 564ca0fe06..be3a951a85 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,8 @@ +2011-10-21 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/sys/procfs.h: Update copyright year. + Do not include signal.h and sys/ucontext.h. + 2011-10-20 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h: Update copyright diff --git a/sysdeps/unix/sysv/linux/hppa/sys/procfs.h b/sysdeps/unix/sysv/linux/hppa/sys/procfs.h index ca35489f54..0c076337ee 100644 --- a/sysdeps/unix/sysv/linux/hppa/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/hppa/sys/procfs.h @@ -1,4 +1,5 @@ -/* Copyright (C) 1996, 1997, 1999, 2000, 2006 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1999, 2000, 2006, 2011 + 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 @@ -29,10 +30,8 @@ GDB unless you know what you are doing. */ #include -#include #include #include -#include #include __BEGIN_DECLS From b0835b4569c0b21deb318ed31b2ed7cabaaf078b Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 22 Oct 2011 11:21:37 +0200 Subject: [PATCH 4134/4487] m68k: use generic implementation of s_ccos --- ChangeLog.m68k | 6 +++ sysdeps/m68k/m680x0/fpu/s_ccos.c | 73 ------------------------------- sysdeps/m68k/m680x0/fpu/s_ccosf.c | 3 -- sysdeps/m68k/m680x0/fpu/s_ccosl.c | 3 -- 4 files changed, 6 insertions(+), 79 deletions(-) delete mode 100644 sysdeps/m68k/m680x0/fpu/s_ccos.c delete mode 100644 sysdeps/m68k/m680x0/fpu/s_ccosf.c delete mode 100644 sysdeps/m68k/m680x0/fpu/s_ccosl.c diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 9c6e72faf2..3c4adf64c4 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,9 @@ +2011-10-22 Andreas Schwab + + * sysdeps/m68k/m680x0/fpu/s_ccos.c: Remove. + * sysdeps/m68k/m680x0/fpu/s_ccosf.c: Remove. + * sysdeps/m68k/m680x0/fpu/s_ccosl.c: Remove. + 2011-10-13 Andreas Schwab * sysdeps/m68k/m680x0/fpu/e_acos.c: Add __*_finite alias. diff --git a/sysdeps/m68k/m680x0/fpu/s_ccos.c b/sysdeps/m68k/m680x0/fpu/s_ccos.c deleted file mode 100644 index 8239159647..0000000000 --- a/sysdeps/m68k/m680x0/fpu/s_ccos.c +++ /dev/null @@ -1,73 +0,0 @@ -/* Complex cosine function. m68k fpu version - Copyright (C) 1997, 1999, 2010 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Schwab . - - 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. */ - -#include -#include -#include "mathimpl.h" - -#ifndef SUFF -#define SUFF -#endif -#ifndef float_type -#define float_type double -#endif - -#define CONCATX(a,b) __CONCAT(a,b) -#define s(name) CONCATX(name,SUFF) -#define m81(func) __m81_u(s(func)) - -__complex__ float_type -s(__ccos) (__complex__ float_type x) -{ - __complex__ float_type retval; - unsigned long rx_cond = __m81_test (__real__ x); - - if ((rx_cond & (__M81_COND_INF|__M81_COND_NAN)) == 0) - { - /* Real part is finite. */ - float_type sin_rx, cos_rx; - - __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_rx), "=f" (cos_rx) - : "f" (__real__ x)); - __real__ retval = cos_rx * m81(__ieee754_cosh) (__imag__ x); - if (rx_cond & __M81_COND_ZERO) - __imag__ retval = (signbit (__imag__ x) - ? __real__ x : -__real__ x); - else - __imag__ retval = -sin_rx * m81(__ieee754_sinh) (__imag__ x); - } - else - { - unsigned long ix_cond = __m81_test (__imag__ x); - - if (ix_cond & __M81_COND_INF) - __real__ retval = s(fabs) (__imag__ x); - else - __real__ retval = __real__ x - __real__ x; - if (ix_cond & __M81_COND_ZERO) - __imag__ retval = __imag__ x; - else - __imag__ retval = __real__ x - __real__ x; - } - - return retval; -} -#define weak_aliasx(a,b) weak_alias(a,b) -weak_aliasx (s(__ccos), s(ccos)) diff --git a/sysdeps/m68k/m680x0/fpu/s_ccosf.c b/sysdeps/m68k/m680x0/fpu/s_ccosf.c deleted file mode 100644 index f5e8a41faf..0000000000 --- a/sysdeps/m68k/m680x0/fpu/s_ccosf.c +++ /dev/null @@ -1,3 +0,0 @@ -#define SUFF f -#define float_type float -#include diff --git a/sysdeps/m68k/m680x0/fpu/s_ccosl.c b/sysdeps/m68k/m680x0/fpu/s_ccosl.c deleted file mode 100644 index aaff365208..0000000000 --- a/sysdeps/m68k/m680x0/fpu/s_ccosl.c +++ /dev/null @@ -1,3 +0,0 @@ -#define SUFF l -#define float_type long double -#include From 0ea4e188a6b298ae1c5f5dee7432cf7270b91cf6 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 23 Oct 2011 14:25:00 +0200 Subject: [PATCH 4135/4487] m68k: add __exp*_finite aliases --- ChangeLog.m68k | 6 ++++++ sysdeps/m68k/m680x0/fpu/e_exp.c | 3 ++- sysdeps/m68k/m680x0/fpu/e_expf.c | 3 ++- sysdeps/m68k/m680x0/fpu/e_expl.c | 1 + 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 3c4adf64c4..69aa1ba85f 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,9 @@ +2011-10-23 Andreas Schwab + + * sysdeps/m68k/m680x0/fpu/e_exp.c (FUNC_FINITE): Define. + * sysdeps/m68k/m680x0/fpu/e_expf.c (FUNC_FINITE): Define. + * sysdeps/m68k/m680x0/fpu/e_expl.c (FUNC_FINITE): Define. + 2011-10-22 Andreas Schwab * sysdeps/m68k/m680x0/fpu/s_ccos.c: Remove. diff --git a/sysdeps/m68k/m680x0/fpu/e_exp.c b/sysdeps/m68k/m680x0/fpu/e_exp.c index 1e95ac474d..9f228034a1 100644 --- a/sysdeps/m68k/m680x0/fpu/e_exp.c +++ b/sysdeps/m68k/m680x0/fpu/e_exp.c @@ -1,2 +1,3 @@ -#define FUNC __ieee754_exp +#define FUNC __ieee754_exp +#define FUNC_FINITE __exp_finite #include diff --git a/sysdeps/m68k/m680x0/fpu/e_expf.c b/sysdeps/m68k/m680x0/fpu/e_expf.c index 2aeaacfab9..af1e019504 100644 --- a/sysdeps/m68k/m680x0/fpu/e_expf.c +++ b/sysdeps/m68k/m680x0/fpu/e_expf.c @@ -1,2 +1,3 @@ -#define FUNC __ieee754_expf +#define FUNC __ieee754_expf +#define FUNC_FINITE __expf_finite #include diff --git a/sysdeps/m68k/m680x0/fpu/e_expl.c b/sysdeps/m68k/m680x0/fpu/e_expl.c index 8805a1b83a..543eb0edf5 100644 --- a/sysdeps/m68k/m680x0/fpu/e_expl.c +++ b/sysdeps/m68k/m680x0/fpu/e_expl.c @@ -1,2 +1,3 @@ #define FUNC __ieee754_expl +#define FUNC_FINITE __expl_finite #include From f2d9d9095cfd950a8f187cecb77d8b84d2f86da2 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 23 Oct 2011 16:40:33 +0200 Subject: [PATCH 4136/4487] m68k/cf: add __sqrt*_finite aliases --- ChangeLog.m68k | 3 +++ sysdeps/m68k/coldfire/fpu/e_sqrt.c | 3 ++- sysdeps/m68k/coldfire/fpu/e_sqrtf.c | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 69aa1ba85f..d7e03efd2c 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,5 +1,8 @@ 2011-10-23 Andreas Schwab + * sysdeps/m68k/coldfire/fpu/e_sqrt.c: Add __sqrt_finite alias. + * sysdeps/m68k/coldfire/fpu/e_sqrtf.c: Add __sqrtf_finite alias. + * sysdeps/m68k/m680x0/fpu/e_exp.c (FUNC_FINITE): Define. * sysdeps/m68k/m680x0/fpu/e_expf.c (FUNC_FINITE): Define. * sysdeps/m68k/m680x0/fpu/e_expl.c (FUNC_FINITE): Define. diff --git a/sysdeps/m68k/coldfire/fpu/e_sqrt.c b/sysdeps/m68k/coldfire/fpu/e_sqrt.c index a160308bf2..b6c67e89a0 100644 --- a/sysdeps/m68k/coldfire/fpu/e_sqrt.c +++ b/sysdeps/m68k/coldfire/fpu/e_sqrt.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 Free Software Foundation, Inc. +/* Copyright (C) 2006, 2011 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 @@ -22,3 +22,4 @@ __ieee754_sqrt (double x) asm ("fdsqrt.d %1,%0" : "=f" (x) : "fm" (x)); return x; } +strong_alias (__ieee754_sqrt, __sqrt_finite) diff --git a/sysdeps/m68k/coldfire/fpu/e_sqrtf.c b/sysdeps/m68k/coldfire/fpu/e_sqrtf.c index 7cfc0dd655..e0481b805d 100644 --- a/sysdeps/m68k/coldfire/fpu/e_sqrtf.c +++ b/sysdeps/m68k/coldfire/fpu/e_sqrtf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 Free Software Foundation, Inc. +/* Copyright (C) 2006, 2011 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,3 +23,4 @@ __ieee754_sqrtf (float x) asm ("fssqrt.s %1,%0" : "=f" (result) : "dm" (x)); return result; } +strong_alias (__ieee754_sqrtf, __sqrtf_finite) From 88808f8a72ddff41af2e4b3075deb44741188e32 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 26 Oct 2011 11:32:38 +0200 Subject: [PATCH 4137/4487] m68k: replace unneeded sincostab --- ChangeLog.m68k | 4 ++++ sysdeps/m68k/m680x0/fpu/sincostab.c | 1 + 2 files changed, 5 insertions(+) create mode 100644 sysdeps/m68k/m680x0/fpu/sincostab.c diff --git a/ChangeLog.m68k b/ChangeLog.m68k index d7e03efd2c..7b2688eed7 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,7 @@ +2011-10-26 Andreas Schwab + + * sysdeps/m68k/m680x0/fpu/sincostab.c: New file. + 2011-10-23 Andreas Schwab * sysdeps/m68k/coldfire/fpu/e_sqrt.c: Add __sqrt_finite alias. diff --git a/sysdeps/m68k/m680x0/fpu/sincostab.c b/sysdeps/m68k/m680x0/fpu/sincostab.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/m68k/m680x0/fpu/sincostab.c @@ -0,0 +1 @@ +/* Not needed. */ From 290c9bd53bd0e4e7ae66fbc1c33d8a0e87e5f829 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 26 Oct 2011 11:34:30 +0200 Subject: [PATCH 4138/4487] m68k: add optimized math_opt_barrier and math_force_eval --- ChangeLog.m68k | 2 ++ sysdeps/m68k/m680x0/fpu/math_private.h | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 sysdeps/m68k/m680x0/fpu/math_private.h diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 7b2688eed7..09de15987b 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,5 +1,7 @@ 2011-10-26 Andreas Schwab + * sysdeps/m68k/m680x0/fpu/math_private.h: New file. + * sysdeps/m68k/m680x0/fpu/sincostab.c: New file. 2011-10-23 Andreas Schwab diff --git a/sysdeps/m68k/m680x0/fpu/math_private.h b/sysdeps/m68k/m680x0/fpu/math_private.h new file mode 100644 index 0000000000..3793cff203 --- /dev/null +++ b/sysdeps/m68k/m680x0/fpu/math_private.h @@ -0,0 +1,19 @@ +#ifndef _MATH_PRIVATE_H + +#define math_opt_barrier(x) \ +({ __typeof (x) __x; \ + __asm ("" : "=f" (__x) : "0" (x)); \ + __x; }) +#define math_force_eval(x) \ +do \ + { \ + __typeof (x) __x = (x); \ + if (sizeof (x) <= sizeof (double)) \ + __asm __volatile ("" : : "m" (__x)); \ + else \ + __asm __volatile ("" : : "f" (__x)); \ + } \ +while (0) + +#include +#endif From 6dcecc64865ece5109260fd89d876c83b173e6d8 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 26 Oct 2011 16:16:52 +0000 Subject: [PATCH 4139/4487] Restore non-__thread cases for ARM that were used in dynamic linker. --- ChangeLog.arm | 5 +++++ sysdeps/arm/dl-machine.h | 8 +++++++- sysdeps/unix/arm/sysdep.S | 11 +++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index ba319b8320..c61cfe461f 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2011-10-26 Joseph Myers + + * sysdeps/arm/dl-machine.h, sysdeps/unix/arm/sysdep.S: Restore + cases for use in rtld. + 2011-10-05 Andreas Schwab * sysdeps/arm/dl-machine.h (elf_machine_rel, elf_machine_rela) diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 5a58965604..5ceeaa979d 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -242,12 +242,18 @@ _dl_start_user:\n\ define the value. ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one of the main executable's symbols, as for a COPY reloc. */ -#define elf_machine_type_class(type) \ +#ifndef RTLD_BOOTSTRAP +# define elf_machine_type_class(type) \ ((((type) == R_ARM_JUMP_SLOT || (type) == R_ARM_TLS_DTPMOD32 \ || (type) == R_ARM_TLS_DTPOFF32 || (type) == R_ARM_TLS_TPOFF32 \ || (type) == R_ARM_TLS_DESC) \ * ELF_RTYPE_CLASS_PLT) \ | (((type) == R_ARM_COPY) * ELF_RTYPE_CLASS_COPY)) +#else +#define elf_machine_type_class(type) \ + ((((type) == R_ARM_JUMP_SLOT) * ELF_RTYPE_CLASS_PLT) \ + | (((type) == R_ARM_COPY) * ELF_RTYPE_CLASS_COPY)) +#endif /* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */ #define ELF_MACHINE_JMP_SLOT R_ARM_JUMP_SLOT diff --git a/sysdeps/unix/arm/sysdep.S b/sysdeps/unix/arm/sysdep.S index dcd3ce2523..2a534baf88 100644 --- a/sysdeps/unix/arm/sysdep.S +++ b/sysdeps/unix/arm/sysdep.S @@ -42,6 +42,7 @@ syscall_error: moveq r0, $EAGAIN /* Yes; translate it to EAGAIN. */ #endif +#ifndef IS_IN_rtld mov ip, lr cfi_register (lr, ip) mov r1, r0 @@ -57,6 +58,16 @@ syscall_error: RETINSTR (, ip) 1: .word errno(gottpoff) + (. - 2b - 8) +#elif RTLD_PRIVATE_ERRNO + ldr r1, 1f +0: str r0, [pc, r1] + mvn r0, $0 + DO_RET(r14) + +1: .word C_SYMBOL_NAME(rtld_errno) - 0b - 8 +#else +#error "Unsupported non-TLS case" +#endif #undef __syscall_error END (__syscall_error) From f335e01fe1240ea3e4a3759e68f6585c51ffcda3 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 1 Nov 2011 16:03:29 +0100 Subject: [PATCH 4140/4487] m68k: define stackinfo_get_sp, stackinfo_sub_sp --- ChangeLog.m68k | 5 +++++ sysdeps/m68k/stackinfo.h | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 09de15987b..42dcf75db0 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2011-11-01 Andreas Schwab + + * sysdeps/m68k/stackinfo.h (stackinfo_get_sp, stackinfo_sub_sp): + Define. + 2011-10-26 Andreas Schwab * sysdeps/m68k/m680x0/fpu/math_private.h: New file. diff --git a/sysdeps/m68k/stackinfo.h b/sysdeps/m68k/stackinfo.h index b44d4d0ee9..bcfdb12857 100644 --- a/sysdeps/m68k/stackinfo.h +++ b/sysdeps/m68k/stackinfo.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2010 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2010, 2011 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 @@ -31,4 +31,12 @@ is present, but it is presumed absent. */ #define DEFAULT_STACK_PERMS (PF_R|PF_W|PF_X) +/* Access to the stack pointer. */ +#define stackinfo_get_sp() \ + ({ void *p__; asm volatile ("move.l %%sp, %0" : "=r" (p__)); p__; }) +#define stackinfo_sub_sp(ptr) \ + ({ ptrdiff_t d__; \ + asm volatile ("sub.l %%sp, %0" : "=r" (d__) : "0" (ptr)); \ + d__; }) + #endif /* stackinfo.h */ From a9ff8724b374e0f914959eaeb1d6bfe7334e8ac2 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 11 Nov 2011 22:07:55 +0000 Subject: [PATCH 4141/4487] Update MIPS dl-lookup.c. --- ChangeLog.mips | 4 ++++ sysdeps/mips/dl-lookup.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 78932d7a03..74c7bdd54c 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,7 @@ +2011-11-11 Joseph Myers + + * sysdeps/mips/dl-lookup.c: Update from generic version. + 2011-10-12 Joseph Myers * sysdeps/mips/fpu/e_sqrt.c: Add __sqrt_finite alias. diff --git a/sysdeps/mips/dl-lookup.c b/sysdeps/mips/dl-lookup.c index 6b36c34a84..fed3b6c666 100644 --- a/sysdeps/mips/dl-lookup.c +++ b/sysdeps/mips/dl-lookup.c @@ -877,7 +877,6 @@ internal_function _dl_setup_hash (struct link_map *map) { Elf_Symndx *hash; - Elf_Symndx nchain; if (__builtin_expect (map->l_info[DT_ADDRTAGIDX (DT_GNU_HASH) + DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGNUM @@ -909,7 +908,8 @@ _dl_setup_hash (struct link_map *map) hash = (void *) D_PTR (map, l_info[DT_HASH]); map->l_nbuckets = *hash++; - nchain = *hash++; + /* Skip nchain. */ + hash++; map->l_buckets = hash; hash += map->l_nbuckets; map->l_chain = hash; From 84715d22e13fd99cb7dbe409f87509290435a63a Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 16 Nov 2011 16:07:33 +0000 Subject: [PATCH 4142/4487] Use fopen "rce" in ARM ioperm. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/ioperm.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index c61cfe461f..8c14f08982 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2011-11-16 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/ioperm.c (init_iosys): Use "c" and + "e" in fopen. + 2011-10-26 Joseph Myers * sysdeps/arm/dl-machine.h, sysdeps/unix/arm/sysdep.S: Restore diff --git a/sysdeps/unix/sysv/linux/arm/ioperm.c b/sysdeps/unix/sysv/linux/arm/ioperm.c index 8af1ea356e..8ac9b09c25 100644 --- a/sysdeps/unix/sysv/linux/arm/ioperm.c +++ b/sysdeps/unix/sysv/linux/arm/ioperm.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1998, 1999, 2003, 2005, 2008 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999, 2003, 2005, 2008, 2011 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Phil Blundell, based on the Alpha version by David Mosberger. @@ -135,7 +136,7 @@ init_iosys (void) { FILE * fp; - fp = fopen (PATH_CPUINFO, "r"); + fp = fopen (PATH_CPUINFO, "rce"); if (! fp) return -1; while ((n = fscanf (fp, "Hardware\t: %256[^\n]\n", systype)) From 61b01ec6893b6245057e419e9032080272ad3841 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 17 Nov 2011 02:31:55 +0000 Subject: [PATCH 4143/4487] Fix ftw64 for MIPS n64. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/mips64/n64/ftw.c | 1 + sysdeps/unix/sysv/linux/mips/mips64/n64/ftw64.c | 1 + 3 files changed, 7 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/ftw.c create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/ftw64.c diff --git a/ChangeLog.mips b/ChangeLog.mips index 74c7bdd54c..abfc2b4479 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2011-11-17 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/mips64/n64/ftw.c, + sysdeps/unix/sysv/linux/mips/mips64/n64/ftw64.c: New. + 2011-11-11 Joseph Myers * sysdeps/mips/dl-lookup.c: Update from generic version. diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/ftw.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/ftw.c new file mode 100644 index 0000000000..46389568b2 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/ftw.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/ftw64.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/ftw64.c new file mode 100644 index 0000000000..cb02172b3e --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/ftw64.c @@ -0,0 +1 @@ +#include From 01abd38ff2963bdeabdf10ba5e99428648931db6 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 29 Nov 2011 16:10:31 +0000 Subject: [PATCH 4144/4487] Remove bitrotten / unmaintained CPU and OS ports. --- ChangeLog | 10 + ChangeLog.aix | 4 + bare/Makefile | 55 --- bare/brdinit.c | 32 -- bare/console.c | 42 -- bare/strtsupp.c | 28 -- sysdeps/am29k/ffs.c | 43 -- sysdeps/i860/memcopy.h | 33 -- sysdeps/i960/Implies | 3 - sysdeps/i960/add_n.s | 21 - sysdeps/i960/addmul_1.s | 26 -- sysdeps/i960/ffs.c | 46 -- sysdeps/i960/mul_1.s | 23 - sysdeps/i960/sub_n.s | 21 - sysdeps/m88k/add_n.s | 104 ----- sysdeps/m88k/ffs.c | 45 -- sysdeps/m88k/m88100/add_n.S | 133 ------ sysdeps/m88k/m88100/add_n.s | 103 ----- sysdeps/m88k/m88100/mul_1.S | 127 ------ sysdeps/m88k/m88100/mul_1.s | 128 ------ sysdeps/m88k/m88100/sub_n.S | 134 ------ sysdeps/m88k/m88100/sub_n.s | 104 ----- sysdeps/m88k/m88110/add_n.S | 200 --------- sysdeps/m88k/m88110/addmul_1.s | 61 --- sysdeps/m88k/m88110/mul_1.S | 80 ---- sysdeps/m88k/m88110/mul_1.s | 59 --- sysdeps/m88k/m88110/sub_n.S | 276 ------------ sysdeps/m88k/mul_1.s | 127 ------ sysdeps/m88k/sub_n.s | 106 ----- sysdeps/mach/alpha/machine-lock.h | 80 ---- sysdeps/mach/alpha/machine-sp.h | 36 -- sysdeps/mach/alpha/setfpucw.c | 69 --- sysdeps/mach/alpha/syscall.S | 37 -- sysdeps/mach/alpha/sysdep.h | 59 --- sysdeps/mach/alpha/thread_state.h | 39 -- sysdeps/mach/hppa/machine-lock.h | 63 --- sysdeps/mach/hurd/alpha/bits/sigcontext.h | 73 --- sysdeps/mach/hurd/alpha/exc2signal.c | 75 ---- sysdeps/mach/hurd/alpha/init-first.c | 302 ------------- sysdeps/mach/hurd/alpha/intr-msg.h | 100 ----- sysdeps/mach/hurd/alpha/longjmp-ts.c | 49 --- sysdeps/mach/hurd/alpha/sigreturn.c | 211 --------- sysdeps/mach/hurd/alpha/static-start.S | 30 -- sysdeps/mach/hurd/alpha/trampoline.c | 249 ----------- sysdeps/mach/hurd/hppa/bits/sigcontext.h | 94 ---- sysdeps/mach/hurd/hppa/trampoline.c | 230 ---------- sysdeps/mach/hurd/mips/bits/sigcontext.h | 80 ---- sysdeps/mach/hurd/mips/dl-machine.c | 132 ------ sysdeps/mach/hurd/mips/exc2signal.c | 97 ---- sysdeps/mach/hurd/mips/init-fault.c | 41 -- sysdeps/mach/hurd/mips/init-first.c | 414 ------------------ sysdeps/mach/hurd/mips/intr-msg.h | 127 ------ sysdeps/mach/hurd/mips/longjmp-ctx.c | 41 -- sysdeps/mach/hurd/mips/longjmp-ts.c | 45 -- sysdeps/mach/hurd/mips/sigreturn.c | 223 ---------- sysdeps/mach/hurd/mips/trampoline.c | 292 ------------ sysdeps/mach/mips/Makefile | 3 - sysdeps/mach/mips/cacheflush.c | 44 -- sysdeps/mach/mips/machine-lock.h | 92 ---- sysdeps/mach/mips/machine-sp.h | 38 -- sysdeps/mach/mips/syscall.S | 48 -- sysdeps/mach/mips/sysdep.h | 83 ---- sysdeps/mach/mips/thread_state.h | 42 -- sysdeps/rs6000/add_n.s | 81 ---- sysdeps/rs6000/addmul_1.s | 123 ------ sysdeps/rs6000/ffs.c | 42 -- sysdeps/rs6000/lshift.s | 59 --- sysdeps/rs6000/memcopy.h | 86 ---- sysdeps/rs6000/mul_1.s | 110 ----- sysdeps/rs6000/rshift.s | 57 --- sysdeps/rs6000/sub_n.s | 82 ---- sysdeps/rs6000/submul_1.s | 128 ------ sysdeps/standalone/Subdirs | 4 - sysdeps/standalone/arm/bits/errno.h | 65 --- sysdeps/standalone/arm/sysdep.c | 32 -- sysdeps/standalone/bits/errno.h | 59 --- sysdeps/standalone/brk.c | 66 --- sysdeps/standalone/close.c | 43 -- sysdeps/standalone/dirstream.h | 43 -- sysdeps/standalone/filedesc.h | 48 -- sysdeps/standalone/i386/force_cpu386/Makefile | 26 -- sysdeps/standalone/i386/force_cpu386/_exit.c | 47 -- .../standalone/i386/force_cpu386/brdinit.c | 42 -- .../standalone/i386/force_cpu386/console.c | 163 ------- .../standalone/i386/force_cpu386/strtsupp.S | 87 ---- .../standalone/i386/force_cpu386/target.ld | 58 --- sysdeps/standalone/i386/i386.h | 326 -------------- sysdeps/standalone/i386/start.S | 338 -------------- sysdeps/standalone/i960/i960ca.h | 206 --------- sysdeps/standalone/i960/nindy960/Makefile | 24 - sysdeps/standalone/i960/nindy960/_exit.c | 55 --- sysdeps/standalone/i960/nindy960/brdinit.c | 64 --- sysdeps/standalone/i960/nindy960/console.c | 76 ---- sysdeps/standalone/i960/start.S | 152 ------- sysdeps/standalone/m68k/m68020/m68020.h | 87 ---- .../standalone/m68k/m68020/mvme135/Implies | 2 - .../standalone/m68k/m68020/mvme136/Makefile | 23 - .../standalone/m68k/m68020/mvme136/_exit.c | 50 --- .../standalone/m68k/m68020/mvme136/brdinit.c | 51 --- .../standalone/m68k/m68020/mvme136/console.c | 101 ----- .../standalone/m68k/m68020/mvme136/mvme136.ld | 61 --- sysdeps/standalone/m68k/m68020/start.S | 172 -------- sysdeps/standalone/open.c | 125 ------ sysdeps/standalone/read.c | 86 ---- sysdeps/standalone/standalone.h | 31 -- sysdeps/standalone/write.c | 73 --- sysdeps/tahoe/Implies | 2 - sysdeps/unix/bsd/hp/m68k/brk.S | 46 -- sysdeps/unix/bsd/hp/m68k/dl-brk.S | 1 - sysdeps/unix/bsd/hp/m68k/start.c | 10 - sysdeps/unix/bsd/hp/m68k/sysdep.h | 56 --- sysdeps/unix/bsd/hp/m68k/vfork.S | 56 --- sysdeps/unix/bsd/hp/m68k/wait3.S | 39 -- sysdeps/unix/bsd/m68k/pipe.S | 33 -- sysdeps/unix/bsd/m68k/start.c | 3 - sysdeps/unix/bsd/m68k/syscall.S | 26 -- sysdeps/unix/bsd/m68k/sysdep.S | 44 -- sysdeps/unix/bsd/m68k/wait.S | 35 -- sysdeps/unix/bsd/osf/Implies | 2 - sysdeps/unix/bsd/osf/Makefile | 3 - sysdeps/unix/bsd/osf/alpha/bits/stat.h | 79 ---- sysdeps/unix/bsd/osf/alpha/brk.S | 54 --- sysdeps/unix/bsd/osf/alpha/dl-brk.S | 1 - sysdeps/unix/bsd/osf/alpha/fork.S | 28 -- sysdeps/unix/bsd/osf/alpha/killpg.S | 27 -- sysdeps/unix/bsd/osf/alpha/recv.S | 26 -- sysdeps/unix/bsd/osf/alpha/send.S | 26 -- sysdeps/unix/bsd/osf/alpha/sigblock.S | 29 -- sysdeps/unix/bsd/osf/alpha/sigpause.S | 30 -- sysdeps/unix/bsd/osf/alpha/sigsetmask.S | 29 -- sysdeps/unix/bsd/osf/alpha/sigvec.S | 29 -- sysdeps/unix/bsd/osf/alpha/start.S | 83 ---- sysdeps/unix/bsd/osf/alpha/syscalls.list | 3 - sysdeps/unix/bsd/osf/alpha/sysdep.h | 30 -- sysdeps/unix/bsd/osf/alpha/vhangup.S | 26 -- sysdeps/unix/bsd/osf/alpha/waitpid.c | 1 - sysdeps/unix/bsd/osf/bits/mman.h | 71 --- sysdeps/unix/bsd/osf/bits/sigaction.h | 50 --- sysdeps/unix/bsd/osf/syscalls.list | 3 - sysdeps/unix/bsd/osf/system.c | 2 - sysdeps/unix/bsd/sequent/i386/getgroups.S | 44 -- sysdeps/unix/bsd/sequent/i386/sigvec.S | 45 -- sysdeps/unix/bsd/sequent/i386/syscall.S | 31 -- sysdeps/unix/bsd/sequent/i386/sysdep.h | 82 ---- sysdeps/unix/bsd/sony/newsos/m68k/Implies | 2 - sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h | 56 --- sysdeps/unix/bsd/sony/newsos4/Makefile | 3 - sysdeps/unix/bsd/sony/newsos4/syscalls.list | 3 - sysdeps/unix/bsd/sony/newsos4/wait.c | 1 - sysdeps/unix/bsd/sony/newsos4/wait3.c | 1 - sysdeps/unix/bsd/sony/newsos4/wait4.c | 1 - sysdeps/unix/bsd/sun/bits/signum.h | 69 --- sysdeps/unix/bsd/sun/m68k/Makefile | 3 - sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h | 30 -- sysdeps/unix/bsd/sun/m68k/brk.S | 45 -- sysdeps/unix/bsd/sun/m68k/dl-brk.S | 1 - sysdeps/unix/bsd/sun/m68k/sethostid.S | 40 -- sysdeps/unix/bsd/sun/m68k/sigtramp.c | 145 ------ sysdeps/unix/bsd/sun/m68k/syscall.S | 28 -- sysdeps/unix/bsd/sun/m68k/sysdep.h | 62 --- sysdeps/unix/bsd/sun/m68k/vfork.S | 56 --- sysdeps/unix/bsd/sun/sethostid.c | 1 - sysdeps/unix/bsd/sun/sigreturn.S | 28 -- sysdeps/unix/bsd/sun/sparc/Makefile | 7 - sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h | 34 -- sysdeps/unix/bsd/sun/sparc/sethostid.S | 43 -- sysdeps/unix/bsd/sun/sparc/sigtramp.c | 247 ----------- sysdeps/unix/bsd/sun/sunos4/Implies | 2 - sysdeps/unix/bsd/sun/sunos4/Makefile | 7 - sysdeps/unix/bsd/sun/sunos4/bits/fcntl.h | 142 ------ sysdeps/unix/bsd/sun/sunos4/bits/mman.h | 68 --- sysdeps/unix/bsd/sun/sunos4/bits/resource.h | 174 -------- sysdeps/unix/bsd/sun/sunos4/bits/termios.h | 212 --------- sysdeps/unix/bsd/sun/sunos4/bits/utsname.h | 24 - sysdeps/unix/bsd/sun/sunos4/mmap.c | 42 -- sysdeps/unix/bsd/sun/sunos4/speed.c | 118 ----- sysdeps/unix/bsd/sun/sunos4/sys/ttydefaults.h | 100 ----- sysdeps/unix/bsd/sun/sunos4/syscalls.list | 6 - sysdeps/unix/bsd/sun/sunos4/system.c | 2 - sysdeps/unix/bsd/sun/sunos4/tcflow.c | 30 -- sysdeps/unix/bsd/sun/sunos4/tcflush.c | 30 -- sysdeps/unix/bsd/sun/sunos4/tcgetattr.c | 33 -- sysdeps/unix/bsd/sun/sunos4/tcsendbrk.c | 32 -- sysdeps/unix/bsd/sun/sunos4/tcsetattr.c | 50 --- sysdeps/unix/bsd/sun/sunos4/wait.c | 1 - sysdeps/unix/bsd/sun/sunos4/wait3.c | 1 - sysdeps/unix/bsd/sun/sunos4/wait4.c | 50 --- sysdeps/unix/bsd/sun/sunos4/waitpid.c | 1 - sysdeps/unix/bsd/sun/syscalls.list | 3 - sysdeps/unix/bsd/tahoe/Implies | 1 - sysdeps/unix/bsd/tahoe/sysdep.h | 5 - sysdeps/unix/bsd/ultrix4/Implies | 2 - sysdeps/unix/bsd/ultrix4/Makefile | 3 - sysdeps/unix/bsd/ultrix4/bits/fcntl.h | 122 ------ sysdeps/unix/bsd/ultrix4/bits/mman.h | 51 --- sysdeps/unix/bsd/ultrix4/bits/posix_opt.h | 24 - sysdeps/unix/bsd/ultrix4/bits/utsname.h | 23 - sysdeps/unix/bsd/ultrix4/mips/Makefile | 3 - sysdeps/unix/bsd/ultrix4/mips/__handler.S | 115 ----- .../unix/bsd/ultrix4/mips/bits/sigcontext.h | 63 --- sysdeps/unix/bsd/ultrix4/mips/sigvec.c | 55 --- sysdeps/unix/bsd/ultrix4/mips/start.S | 87 ---- sysdeps/unix/bsd/ultrix4/mips/syscalls.list | 3 - sysdeps/unix/bsd/ultrix4/mips/sysdep.h | 3 - sysdeps/unix/bsd/ultrix4/mips/vfork.S | 36 -- sysdeps/unix/bsd/ultrix4/syscalls.list | 3 - sysdeps/unix/bsd/ultrix4/sysconf.c | 61 --- sysdeps/unix/bsd/ultrix4/system.c | 2 - sysdeps/unix/bsd/ultrix4/wait3.S | 26 -- sysdeps/unix/bsd/vax/brk.S | 47 -- sysdeps/unix/bsd/vax/dl-brk.S | 1 - sysdeps/unix/bsd/vax/pipe.S | 29 -- sysdeps/unix/bsd/vax/sysdep.S | 35 -- sysdeps/unix/bsd/vax/sysdep.h | 55 --- sysdeps/unix/bsd/vax/vfork.S | 57 --- sysdeps/unix/bsd/vax/wait.S | 27 -- sysdeps/unix/bsd/vax/wait3.S | 37 -- sysdeps/unix/sysv/aix/Implies | 8 - sysdeps/unix/sysv/aix/Makefile | 41 -- sysdeps/unix/sysv/aix/Versions | 6 - sysdeps/unix/sysv/aix/_exit.c | 29 -- sysdeps/unix/sysv/aix/accept.c | 30 -- sysdeps/unix/sysv/aix/access.c | 30 -- sysdeps/unix/sysv/aix/bind.c | 1 - sysdeps/unix/sysv/aix/bits/dirent.h | 55 --- sysdeps/unix/sysv/aix/bits/dlfcn.h | 47 -- sysdeps/unix/sysv/aix/bits/endian.h | 23 - sysdeps/unix/sysv/aix/bits/errno.h | 153 ------- sysdeps/unix/sysv/aix/bits/fcntl.h | 137 ------ sysdeps/unix/sysv/aix/bits/ioctl-types.h | 91 ---- sysdeps/unix/sysv/aix/bits/ioctls.h | 248 ----------- sysdeps/unix/sysv/aix/bits/poll.h | 43 -- sysdeps/unix/sysv/aix/bits/resource.h | 191 -------- sysdeps/unix/sysv/aix/bits/setjmp.h | 46 -- sysdeps/unix/sysv/aix/bits/sigaction.h | 72 --- sysdeps/unix/sysv/aix/bits/sigcontext.h | 32 -- sysdeps/unix/sysv/aix/bits/signum.h | 96 ---- sysdeps/unix/sysv/aix/bits/sigset.h | 125 ------ sysdeps/unix/sysv/aix/bits/sigstack.h | 46 -- sysdeps/unix/sysv/aix/bits/socket.h | 293 ------------- sysdeps/unix/sysv/aix/bits/stat.h | 119 ----- sysdeps/unix/sysv/aix/bits/statfs.h | 77 ---- sysdeps/unix/sysv/aix/bits/termios.h | 189 -------- sysdeps/unix/sysv/aix/bits/types.h | 136 ------ sysdeps/unix/sysv/aix/bits/uio.h | 42 -- sysdeps/unix/sysv/aix/bits/utmp.h | 73 --- sysdeps/unix/sysv/aix/bits/utmpx.h | 75 ---- sysdeps/unix/sysv/aix/bits/utsname.h | 23 - sysdeps/unix/sysv/aix/brk.c | 25 -- sysdeps/unix/sysv/aix/chdir.c | 25 -- sysdeps/unix/sysv/aix/chmod.c | 25 -- sysdeps/unix/sysv/aix/chown.c | 26 -- sysdeps/unix/sysv/aix/chroot.c | 1 - sysdeps/unix/sysv/aix/close.c | 26 -- sysdeps/unix/sysv/aix/configure | 6 - sysdeps/unix/sysv/aix/configure.in | 6 - sysdeps/unix/sysv/aix/connect.c | 11 - sysdeps/unix/sysv/aix/creat.c | 1 - sysdeps/unix/sysv/aix/dl-addr.c | 30 -- sysdeps/unix/sysv/aix/dl-close.c | 46 -- sysdeps/unix/sysv/aix/dl-error.c | 20 - sysdeps/unix/sysv/aix/dl-libc.c | 41 -- sysdeps/unix/sysv/aix/dl-open.c | 133 ------ sysdeps/unix/sysv/aix/dl-support.c | 20 - sysdeps/unix/sysv/aix/dl-sym.c | 58 --- sysdeps/unix/sysv/aix/dlldr.h | 111 ----- sysdeps/unix/sysv/aix/environ.c | 1 - sysdeps/unix/sysv/aix/euidaccess.c | 25 -- sysdeps/unix/sysv/aix/execve.c | 25 -- sysdeps/unix/sysv/aix/fchdir.c | 26 -- sysdeps/unix/sysv/aix/fchmod.c | 25 -- sysdeps/unix/sysv/aix/fchown.c | 25 -- sysdeps/unix/sysv/aix/fcntl.c | 43 -- sysdeps/unix/sysv/aix/fdatasync.c | 31 -- sysdeps/unix/sysv/aix/fork.c | 29 -- sysdeps/unix/sysv/aix/fstatfs.c | 27 -- sysdeps/unix/sysv/aix/fsync.c | 31 -- sysdeps/unix/sysv/aix/ftruncate.c | 28 -- sysdeps/unix/sysv/aix/ftruncate64.c | 28 -- sysdeps/unix/sysv/aix/fxstat.c | 32 -- sysdeps/unix/sysv/aix/fxstat64.c | 33 -- sysdeps/unix/sysv/aix/getdents.c | 28 -- sysdeps/unix/sysv/aix/getegid.c | 29 -- sysdeps/unix/sysv/aix/geteuid.c | 29 -- sysdeps/unix/sysv/aix/getgid.c | 30 -- sysdeps/unix/sysv/aix/getgroups.c | 25 -- sysdeps/unix/sysv/aix/gethostname.c | 27 -- sysdeps/unix/sysv/aix/getpeername.c | 28 -- sysdeps/unix/sysv/aix/getpgid.c | 29 -- sysdeps/unix/sysv/aix/getpgrp.c | 1 - sysdeps/unix/sysv/aix/getpid.c | 9 - sysdeps/unix/sysv/aix/getppid.c | 1 - sysdeps/unix/sysv/aix/getpriority.c | 1 - sysdeps/unix/sysv/aix/getrlimit.c | 25 -- sysdeps/unix/sysv/aix/getrlimit64.c | 25 -- sysdeps/unix/sysv/aix/getrusage.c | 27 -- sysdeps/unix/sysv/aix/getsid.c | 27 -- sysdeps/unix/sysv/aix/getsockname.c | 29 -- sysdeps/unix/sysv/aix/gettimeofday.c | 98 ----- sysdeps/unix/sysv/aix/getuid.c | 30 -- sysdeps/unix/sysv/aix/gnu/lib-names.h | 31 -- sysdeps/unix/sysv/aix/init-first.c | 103 ----- sysdeps/unix/sysv/aix/ioctl.c | 43 -- sysdeps/unix/sysv/aix/kernel_proto.h | 25 -- sysdeps/unix/sysv/aix/kill.c | 25 -- sysdeps/unix/sysv/aix/lchown.c | 25 -- sysdeps/unix/sysv/aix/libc-start.c | 290 ------------ sysdeps/unix/sysv/aix/link.c | 27 -- sysdeps/unix/sysv/aix/lockf.c | 27 -- sysdeps/unix/sysv/aix/lockf64.c | 27 -- sysdeps/unix/sysv/aix/lseek.c | 10 - sysdeps/unix/sysv/aix/lseek64.c | 35 -- sysdeps/unix/sysv/aix/lxstat.c | 32 -- sysdeps/unix/sysv/aix/lxstat64.c | 33 -- sysdeps/unix/sysv/aix/madvise.c | 1 - sysdeps/unix/sysv/aix/mkdir.c | 25 -- sysdeps/unix/sysv/aix/mknod.c | 28 -- sysdeps/unix/sysv/aix/mmap.c | 9 - sysdeps/unix/sysv/aix/mmap64.c | 30 -- sysdeps/unix/sysv/aix/mprotect.c | 25 -- sysdeps/unix/sysv/aix/msgctl.c | 1 - sysdeps/unix/sysv/aix/msgget.c | 1 - sysdeps/unix/sysv/aix/msgrcv.c | 1 - sysdeps/unix/sysv/aix/msgsnd.c | 1 - sysdeps/unix/sysv/aix/msync.c | 1 - sysdeps/unix/sysv/aix/munmap.c | 8 - sysdeps/unix/sysv/aix/nanosleep.c | 40 -- sysdeps/unix/sysv/aix/net/if.h | 196 --------- sysdeps/unix/sysv/aix/open.c | 40 -- sysdeps/unix/sysv/aix/pipe.c | 27 -- sysdeps/unix/sysv/aix/poll.c | 29 -- sysdeps/unix/sysv/aix/posix_madvise.c | 8 - sysdeps/unix/sysv/aix/powerpc/memset.c | 21 - sysdeps/unix/sysv/aix/powerpc/register-dump.h | 281 ------------ sysdeps/unix/sysv/aix/powerpc/s_lrint.c | 29 -- sysdeps/unix/sysv/aix/pread.c | 28 -- sysdeps/unix/sysv/aix/pread64.c | 28 -- sysdeps/unix/sysv/aix/profil-counter.h | 27 -- sysdeps/unix/sysv/aix/read.c | 31 -- sysdeps/unix/sysv/aix/readlink.c | 8 - sysdeps/unix/sysv/aix/readv.c | 38 -- sysdeps/unix/sysv/aix/recv.c | 28 -- sysdeps/unix/sysv/aix/recvfrom.c | 31 -- sysdeps/unix/sysv/aix/recvmsg.c | 29 -- sysdeps/unix/sysv/aix/rename.c | 1 - sysdeps/unix/sysv/aix/revoke.c | 41 -- sysdeps/unix/sysv/aix/rmdir.c | 25 -- sysdeps/unix/sysv/aix/sbrk.c | 26 -- sysdeps/unix/sysv/aix/sched_yield.c | 31 -- sysdeps/unix/sysv/aix/select.c | 31 -- sysdeps/unix/sysv/aix/semctl.c | 1 - sysdeps/unix/sysv/aix/semget.c | 1 - sysdeps/unix/sysv/aix/semop.c | 1 - sysdeps/unix/sysv/aix/sendmsg.c | 30 -- sysdeps/unix/sysv/aix/sendto.c | 1 - sysdeps/unix/sysv/aix/setegid.c | 32 -- sysdeps/unix/sysv/aix/seteuid.c | 32 -- sysdeps/unix/sysv/aix/setgid.c | 31 -- sysdeps/unix/sysv/aix/setgroups.c | 1 - sysdeps/unix/sysv/aix/setitimer.c | 68 --- sysdeps/unix/sysv/aix/setpgid.c | 28 -- sysdeps/unix/sysv/aix/setpgrp.c | 1 - sysdeps/unix/sysv/aix/setpriority.c | 1 - sysdeps/unix/sysv/aix/setregid.c | 41 -- sysdeps/unix/sysv/aix/setreuid.c | 41 -- sysdeps/unix/sysv/aix/setrlimit.c | 25 -- sysdeps/unix/sysv/aix/setrlimit64.c | 25 -- sysdeps/unix/sysv/aix/setsid.c | 25 -- sysdeps/unix/sysv/aix/setsockopt.c | 1 - sysdeps/unix/sysv/aix/setuid.c | 31 -- sysdeps/unix/sysv/aix/shmat.c | 1 - sysdeps/unix/sysv/aix/shmctl.c | 1 - sysdeps/unix/sysv/aix/shmdt.c | 1 - sysdeps/unix/sysv/aix/shmget.c | 1 - sysdeps/unix/sysv/aix/sigaction.c | 36 -- sysdeps/unix/sysv/aix/sigaltstack.c | 1 - sysdeps/unix/sysv/aix/sigpending.c | 30 -- sysdeps/unix/sysv/aix/sigprocmask.c | 8 - sysdeps/unix/sysv/aix/sigset-cvt-mask.h | 33 -- sysdeps/unix/sysv/aix/sigstack.c | 1 - sysdeps/unix/sysv/aix/sigsuspend.c | 33 -- sysdeps/unix/sysv/aix/sleep.c | 34 -- sysdeps/unix/sysv/aix/socket.c | 25 -- sysdeps/unix/sysv/aix/socketpair.c | 25 -- sysdeps/unix/sysv/aix/speed.c | 75 ---- sysdeps/unix/sysv/aix/start-libc.c | 265 ----------- sysdeps/unix/sysv/aix/start.s | 126 ------ sysdeps/unix/sysv/aix/statfs.c | 28 -- sysdeps/unix/sysv/aix/symlink.c | 27 -- sysdeps/unix/sysv/aix/sync.c | 1 - sysdeps/unix/sysv/aix/sys/param.h | 48 -- sysdeps/unix/sysv/aix/sys/ucontext.h | 113 ----- sysdeps/unix/sysv/aix/syscall.c | 2 - sysdeps/unix/sysv/aix/sysdep.h | 88 ---- sysdeps/unix/sysv/aix/sysv_termio.h | 155 ------- sysdeps/unix/sysv/aix/tcgetattr.c | 152 ------- sysdeps/unix/sysv/aix/tcsetattr.c | 198 --------- sysdeps/unix/sysv/aix/times.c | 30 -- sysdeps/unix/sysv/aix/truncate.c | 28 -- sysdeps/unix/sysv/aix/truncate64.c | 28 -- sysdeps/unix/sysv/aix/uitrunc.c | 42 -- sysdeps/unix/sysv/aix/ulimit.c | 37 -- sysdeps/unix/sysv/aix/umask.c | 26 -- sysdeps/unix/sysv/aix/uname.c | 1 - sysdeps/unix/sysv/aix/unlink.c | 26 -- sysdeps/unix/sysv/aix/usleep.c | 34 -- sysdeps/unix/sysv/aix/ustat.c | 1 - sysdeps/unix/sysv/aix/utimes.c | 27 -- sysdeps/unix/sysv/aix/utmpx.h | 89 ---- sysdeps/unix/sysv/aix/wait3.c | 42 -- sysdeps/unix/sysv/aix/wait4.c | 33 -- sysdeps/unix/sysv/aix/waitid.c | 83 ---- sysdeps/unix/sysv/aix/waitpid.c | 53 --- sysdeps/unix/sysv/aix/write.c | 36 -- sysdeps/unix/sysv/aix/writev.c | 38 -- sysdeps/unix/sysv/aix/xstat.c | 32 -- sysdeps/unix/sysv/aix/xstat64.c | 34 -- sysdeps/unix/sysv/hpux/bits/errno.h | 34 -- sysdeps/unix/sysv/hpux/bits/setjmp.h | 16 - sysdeps/unix/sysv/hpux/bits/stat.h | 128 ------ sysdeps/unix/sysv/hpux/bits/types.h | 128 ------ sysdeps/unix/sysv/hpux/sysdep.h | 26 -- sysdeps/unix/sysv/i386/signal.S | 31 -- sysdeps/unix/sysv/i386/sigreturn.S | 27 -- sysdeps/unix/sysv/irix4/Implies | 4 - sysdeps/unix/sysv/irix4/Makefile | 25 -- sysdeps/unix/sysv/irix4/__handler.S | 117 ----- sysdeps/unix/sysv/irix4/bits/confname.h | 84 ---- sysdeps/unix/sysv/irix4/bits/fcntl.h | 109 ----- sysdeps/unix/sysv/irix4/bits/mman.h | 64 --- sysdeps/unix/sysv/irix4/bits/signum.h | 69 --- sysdeps/unix/sysv/irix4/bits/stat.h | 65 --- sysdeps/unix/sysv/irix4/dup2.c | 3 - sysdeps/unix/sysv/irix4/fpathconf.c | 35 -- sysdeps/unix/sysv/irix4/getgroups.c | 34 -- sysdeps/unix/sysv/irix4/getpriority.c | 47 -- sysdeps/unix/sysv/irix4/getrusage.c | 35 -- sysdeps/unix/sysv/irix4/gettimeofday.c | 1 - sysdeps/unix/sysv/irix4/pathconf.c | 35 -- sysdeps/unix/sysv/irix4/readv.c | 1 - sysdeps/unix/sysv/irix4/reboot.c | 1 - sysdeps/unix/sysv/irix4/setgroups.c | 33 -- sysdeps/unix/sysv/irix4/setpriority.c | 42 -- sysdeps/unix/sysv/irix4/sigreturn.S | 26 -- sysdeps/unix/sysv/irix4/sigtramp.c | 53 --- sysdeps/unix/sysv/irix4/start.c | 75 ---- sysdeps/unix/sysv/irix4/swapon.c | 1 - sysdeps/unix/sysv/irix4/syscalls.list | 8 - sysdeps/unix/sysv/irix4/sysconf.c | 36 -- sysdeps/unix/sysv/irix4/uname.S | 26 -- sysdeps/unix/sysv/irix4/wait.S | 43 -- sysdeps/unix/sysv/irix4/waitpid.c | 1 - sysdeps/unix/sysv/irix4/writev.c | 1 - sysdeps/unix/sysv/isc2.2/syscalls.list | 2 - sysdeps/unix/sysv/minix/bits/sigaction.h | 53 --- sysdeps/unix/sysv/sco3.2.4/Makefile | 17 - sysdeps/unix/sysv/sco3.2.4/__setpgid.c | 33 -- sysdeps/unix/sysv/sco3.2.4/bits/confname.h | 54 --- sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h | 43 -- sysdeps/unix/sysv/sco3.2.4/getgroups.c | 45 -- sysdeps/unix/sysv/sco3.2.4/getpgid.c | 1 - sysdeps/unix/sysv/sco3.2.4/setpgid.c | 1 - sysdeps/unix/sysv/sco3.2.4/setsid.c | 1 - sysdeps/unix/sysv/sco3.2.4/sigaction.S | 30 -- sysdeps/unix/sysv/sco3.2.4/sys/syscall.h | 125 ------ sysdeps/unix/sysv/sco3.2.4/syscalls.list | 8 - sysdeps/unix/sysv/sco3.2.4/sysconf.S | 30 -- sysdeps/unix/sysv/sco3.2.4/system.c | 10 - sysdeps/unix/sysv/sco3.2.4/uname.S | 41 -- sysdeps/unix/sysv/sco3.2.4/waitpid.S | 37 -- sysdeps/unix/sysv/sco3.2/Makefile | 23 - sysdeps/unix/sysv/sco3.2/__fltused.c | 3 - sysdeps/unix/sysv/sco3.2/bits/local_lim.h | 37 -- sysdeps/unix/sysv/sysv4/Implies | 3 - sysdeps/unix/sysv/sysv4/Makefile | 29 -- sysdeps/unix/sysv/sysv4/__getpgid.c | 33 -- sysdeps/unix/sysv/sysv4/__setpgid.c | 34 -- sysdeps/unix/sysv/sysv4/bits/sigaction.h | 55 --- sysdeps/unix/sysv/sysv4/bits/signum.h | 66 --- sysdeps/unix/sysv/sysv4/bits/sigset.h | 98 ----- sysdeps/unix/sysv/sysv4/bits/utsname.h | 23 - sysdeps/unix/sysv/sysv4/bits/waitflags.h | 34 -- sysdeps/unix/sysv/sysv4/dup2.c | 2 - sysdeps/unix/sysv/sysv4/ftruncate.c | 37 -- sysdeps/unix/sysv/sysv4/gethostname.c | 35 -- sysdeps/unix/sysv/sysv4/getpagesize.c | 2 - sysdeps/unix/sysv/sysv4/getpgid.c | 32 -- sysdeps/unix/sysv/sysv4/i386/Makefile | 3 - sysdeps/unix/sysv/sysv4/i386/bits/stat.h | 93 ---- sysdeps/unix/sysv/sysv4/i386/sys-sig.S | 30 -- sysdeps/unix/sysv/sysv4/i386/syscalls.list | 6 - sysdeps/unix/sysv/sysv4/i386/sysdep.h | 38 -- sysdeps/unix/sysv/sysv4/i386/vfork.S | 1 - sysdeps/unix/sysv/sysv4/sethostname.c | 33 -- sysdeps/unix/sysv/sysv4/setpgid.c | 34 -- sysdeps/unix/sysv/sysv4/setsid.c | 33 -- sysdeps/unix/sysv/sysv4/sigaction.c | 80 ---- sysdeps/unix/sysv/sysv4/siginfo.h | 59 --- sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h | 37 -- sysdeps/unix/sysv/sysv4/solaris2/Makefile | 6 - .../unix/sysv/sysv4/solaris2/bits/dirent.h | 50 --- sysdeps/unix/sysv/sysv4/solaris2/bits/errno.h | 168 ------- .../unix/sysv/sysv4/solaris2/bits/signum.h | 76 ---- .../unix/sysv/sysv4/solaris2/bits/sigstack.h | 55 --- sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h | 119 ----- sysdeps/unix/sysv/sysv4/solaris2/bits/types.h | 120 ----- sysdeps/unix/sysv/sysv4/solaris2/fsync.S | 30 -- sysdeps/unix/sysv/sysv4/solaris2/getdents.c | 114 ----- sysdeps/unix/sysv/sysv4/solaris2/sigpending.c | 37 -- sysdeps/unix/sysv/sysv4/solaris2/sigstack.c | 3 - .../unix/sysv/sysv4/solaris2/sigwaitinfo.c | 2 - .../unix/sysv/sysv4/solaris2/sparc/Makefile | 11 - .../sysv4/solaris2/sparc/bits/sigcontext.h | 34 -- .../unix/sysv/sysv4/solaris2/sparc/errlist.c | 185 -------- .../sysv4/solaris2/sparc/sparc32/syscall.S | 2 - .../unix/sysv/sysv4/solaris2/sparc/start.c | 4 - .../unix/sysv/sysv4/solaris2/sparc/sys/trap.h | 36 -- .../sysv/sysv4/solaris2/sparc/sys/ucontext.h | 42 -- .../sysv/sysv4/solaris2/sparc/syscalls.list | 3 - .../unix/sysv/sysv4/solaris2/sparc/sysdep.S | 47 -- .../unix/sysv/sysv4/solaris2/sparc/sysdep.h | 56 --- sysdeps/unix/sysv/sysv4/solaris2/sys/param.h | 59 --- .../unix/sysv/sysv4/solaris2/sys/syscall.h | 245 ----------- .../unix/sysv/sysv4/solaris2/syscalls.list | 7 - sysdeps/unix/sysv/sysv4/syscalls.list | 7 - sysdeps/unix/sysv/sysv4/sysconf.c | 366 ---------------- sysdeps/unix/sysv/sysv4/sysconfig.h | 28 -- sysdeps/unix/sysv/sysv4/system.c | 2 - sysdeps/unix/sysv/sysv4/waitpid.c | 120 ----- sysdeps/vax/DEFS.h | 57 --- sysdeps/vax/Makefile | 32 -- sysdeps/vax/__longjmp.c | 129 ------ sysdeps/vax/add_n.s | 48 -- sysdeps/vax/addmul_1.s | 126 ------ sysdeps/vax/bcopy.s | 74 ---- sysdeps/vax/bits/huge_val.h | 26 -- sysdeps/vax/bits/setjmp.h | 11 - sysdeps/vax/bsd-_setjmp.S | 33 -- sysdeps/vax/bsd-setjmp.S | 32 -- sysdeps/vax/bzero.s | 50 --- sysdeps/vax/ffs.s | 45 -- sysdeps/vax/fl.h | 68 --- sysdeps/vax/gccframe.h | 22 - sysdeps/vax/gmp-mparam.h | 29 -- sysdeps/vax/htonl.s | 43 -- sysdeps/vax/htons.s | 43 -- sysdeps/vax/memccpy.c | 46 -- sysdeps/vax/memchr.s | 74 ---- sysdeps/vax/memcmp.s | 59 --- sysdeps/vax/memmove.s | 89 ---- sysdeps/vax/memset.s | 51 --- sysdeps/vax/mul_1.s | 123 ------ sysdeps/vax/setjmp.c | 62 --- sysdeps/vax/strcat.s | 62 --- sysdeps/vax/strchr.s | 103 ----- sysdeps/vax/strcmp.s | 81 ---- sysdeps/vax/strcpy.s | 58 --- sysdeps/vax/strcspn.s | 62 --- sysdeps/vax/strlen.s | 48 -- sysdeps/vax/strncat.s | 79 ---- sysdeps/vax/strncmp.s | 85 ---- sysdeps/vax/strncpy.s | 80 ---- sysdeps/vax/strpbrk.s | 64 --- sysdeps/vax/strrchr.s | 112 ----- sysdeps/vax/strsep.s | 81 ---- sysdeps/vax/strspn.s | 66 --- sysdeps/vax/strstr.s | 109 ----- sysdeps/vax/sub_n.s | 48 -- sysdeps/vax/submul_1.s | 126 ------ sysdeps/z8000/add_n.s | 53 --- sysdeps/z8000/gmp-mparam.h | 27 -- sysdeps/z8000/mul_1.s | 68 --- sysdeps/z8000/sub_n.s | 54 --- 573 files changed, 14 insertions(+), 30185 deletions(-) delete mode 100644 bare/Makefile delete mode 100644 bare/brdinit.c delete mode 100644 bare/console.c delete mode 100644 bare/strtsupp.c delete mode 100644 sysdeps/am29k/ffs.c delete mode 100644 sysdeps/i860/memcopy.h delete mode 100644 sysdeps/i960/Implies delete mode 100644 sysdeps/i960/add_n.s delete mode 100644 sysdeps/i960/addmul_1.s delete mode 100644 sysdeps/i960/ffs.c delete mode 100644 sysdeps/i960/mul_1.s delete mode 100644 sysdeps/i960/sub_n.s delete mode 100644 sysdeps/m88k/add_n.s delete mode 100644 sysdeps/m88k/ffs.c delete mode 100644 sysdeps/m88k/m88100/add_n.S delete mode 100644 sysdeps/m88k/m88100/add_n.s delete mode 100644 sysdeps/m88k/m88100/mul_1.S delete mode 100644 sysdeps/m88k/m88100/mul_1.s delete mode 100644 sysdeps/m88k/m88100/sub_n.S delete mode 100644 sysdeps/m88k/m88100/sub_n.s delete mode 100644 sysdeps/m88k/m88110/add_n.S delete mode 100644 sysdeps/m88k/m88110/addmul_1.s delete mode 100644 sysdeps/m88k/m88110/mul_1.S delete mode 100644 sysdeps/m88k/m88110/mul_1.s delete mode 100644 sysdeps/m88k/m88110/sub_n.S delete mode 100644 sysdeps/m88k/mul_1.s delete mode 100644 sysdeps/m88k/sub_n.s delete mode 100644 sysdeps/mach/alpha/machine-lock.h delete mode 100644 sysdeps/mach/alpha/machine-sp.h delete mode 100644 sysdeps/mach/alpha/setfpucw.c delete mode 100644 sysdeps/mach/alpha/syscall.S delete mode 100644 sysdeps/mach/alpha/sysdep.h delete mode 100644 sysdeps/mach/alpha/thread_state.h delete mode 100644 sysdeps/mach/hppa/machine-lock.h delete mode 100644 sysdeps/mach/hurd/alpha/bits/sigcontext.h delete mode 100644 sysdeps/mach/hurd/alpha/exc2signal.c delete mode 100644 sysdeps/mach/hurd/alpha/init-first.c delete mode 100644 sysdeps/mach/hurd/alpha/intr-msg.h delete mode 100644 sysdeps/mach/hurd/alpha/longjmp-ts.c delete mode 100644 sysdeps/mach/hurd/alpha/sigreturn.c delete mode 100644 sysdeps/mach/hurd/alpha/static-start.S delete mode 100644 sysdeps/mach/hurd/alpha/trampoline.c delete mode 100644 sysdeps/mach/hurd/hppa/bits/sigcontext.h delete mode 100644 sysdeps/mach/hurd/hppa/trampoline.c delete mode 100644 sysdeps/mach/hurd/mips/bits/sigcontext.h delete mode 100644 sysdeps/mach/hurd/mips/dl-machine.c delete mode 100644 sysdeps/mach/hurd/mips/exc2signal.c delete mode 100644 sysdeps/mach/hurd/mips/init-fault.c delete mode 100644 sysdeps/mach/hurd/mips/init-first.c delete mode 100644 sysdeps/mach/hurd/mips/intr-msg.h delete mode 100644 sysdeps/mach/hurd/mips/longjmp-ctx.c delete mode 100644 sysdeps/mach/hurd/mips/longjmp-ts.c delete mode 100644 sysdeps/mach/hurd/mips/sigreturn.c delete mode 100644 sysdeps/mach/hurd/mips/trampoline.c delete mode 100644 sysdeps/mach/mips/Makefile delete mode 100644 sysdeps/mach/mips/cacheflush.c delete mode 100644 sysdeps/mach/mips/machine-lock.h delete mode 100644 sysdeps/mach/mips/machine-sp.h delete mode 100644 sysdeps/mach/mips/syscall.S delete mode 100644 sysdeps/mach/mips/sysdep.h delete mode 100644 sysdeps/mach/mips/thread_state.h delete mode 100644 sysdeps/rs6000/add_n.s delete mode 100644 sysdeps/rs6000/addmul_1.s delete mode 100644 sysdeps/rs6000/ffs.c delete mode 100644 sysdeps/rs6000/lshift.s delete mode 100644 sysdeps/rs6000/memcopy.h delete mode 100644 sysdeps/rs6000/mul_1.s delete mode 100644 sysdeps/rs6000/rshift.s delete mode 100644 sysdeps/rs6000/sub_n.s delete mode 100644 sysdeps/rs6000/submul_1.s delete mode 100644 sysdeps/standalone/Subdirs delete mode 100644 sysdeps/standalone/arm/bits/errno.h delete mode 100644 sysdeps/standalone/arm/sysdep.c delete mode 100644 sysdeps/standalone/bits/errno.h delete mode 100644 sysdeps/standalone/brk.c delete mode 100644 sysdeps/standalone/close.c delete mode 100644 sysdeps/standalone/dirstream.h delete mode 100644 sysdeps/standalone/filedesc.h delete mode 100644 sysdeps/standalone/i386/force_cpu386/Makefile delete mode 100644 sysdeps/standalone/i386/force_cpu386/_exit.c delete mode 100644 sysdeps/standalone/i386/force_cpu386/brdinit.c delete mode 100644 sysdeps/standalone/i386/force_cpu386/console.c delete mode 100644 sysdeps/standalone/i386/force_cpu386/strtsupp.S delete mode 100644 sysdeps/standalone/i386/force_cpu386/target.ld delete mode 100644 sysdeps/standalone/i386/i386.h delete mode 100644 sysdeps/standalone/i386/start.S delete mode 100644 sysdeps/standalone/i960/i960ca.h delete mode 100644 sysdeps/standalone/i960/nindy960/Makefile delete mode 100644 sysdeps/standalone/i960/nindy960/_exit.c delete mode 100644 sysdeps/standalone/i960/nindy960/brdinit.c delete mode 100644 sysdeps/standalone/i960/nindy960/console.c delete mode 100644 sysdeps/standalone/i960/start.S delete mode 100644 sysdeps/standalone/m68k/m68020/m68020.h delete mode 100644 sysdeps/standalone/m68k/m68020/mvme135/Implies delete mode 100644 sysdeps/standalone/m68k/m68020/mvme136/Makefile delete mode 100644 sysdeps/standalone/m68k/m68020/mvme136/_exit.c delete mode 100644 sysdeps/standalone/m68k/m68020/mvme136/brdinit.c delete mode 100644 sysdeps/standalone/m68k/m68020/mvme136/console.c delete mode 100644 sysdeps/standalone/m68k/m68020/mvme136/mvme136.ld delete mode 100644 sysdeps/standalone/m68k/m68020/start.S delete mode 100644 sysdeps/standalone/open.c delete mode 100644 sysdeps/standalone/read.c delete mode 100644 sysdeps/standalone/standalone.h delete mode 100644 sysdeps/standalone/write.c delete mode 100644 sysdeps/tahoe/Implies delete mode 100644 sysdeps/unix/bsd/hp/m68k/brk.S delete mode 100644 sysdeps/unix/bsd/hp/m68k/dl-brk.S delete mode 100644 sysdeps/unix/bsd/hp/m68k/start.c delete mode 100644 sysdeps/unix/bsd/hp/m68k/sysdep.h delete mode 100644 sysdeps/unix/bsd/hp/m68k/vfork.S delete mode 100644 sysdeps/unix/bsd/hp/m68k/wait3.S delete mode 100644 sysdeps/unix/bsd/m68k/pipe.S delete mode 100644 sysdeps/unix/bsd/m68k/start.c delete mode 100644 sysdeps/unix/bsd/m68k/syscall.S delete mode 100644 sysdeps/unix/bsd/m68k/sysdep.S delete mode 100644 sysdeps/unix/bsd/m68k/wait.S delete mode 100644 sysdeps/unix/bsd/osf/Implies delete mode 100644 sysdeps/unix/bsd/osf/Makefile delete mode 100644 sysdeps/unix/bsd/osf/alpha/bits/stat.h delete mode 100644 sysdeps/unix/bsd/osf/alpha/brk.S delete mode 100644 sysdeps/unix/bsd/osf/alpha/dl-brk.S delete mode 100644 sysdeps/unix/bsd/osf/alpha/fork.S delete mode 100644 sysdeps/unix/bsd/osf/alpha/killpg.S delete mode 100644 sysdeps/unix/bsd/osf/alpha/recv.S delete mode 100644 sysdeps/unix/bsd/osf/alpha/send.S delete mode 100644 sysdeps/unix/bsd/osf/alpha/sigblock.S delete mode 100644 sysdeps/unix/bsd/osf/alpha/sigpause.S delete mode 100644 sysdeps/unix/bsd/osf/alpha/sigsetmask.S delete mode 100644 sysdeps/unix/bsd/osf/alpha/sigvec.S delete mode 100644 sysdeps/unix/bsd/osf/alpha/start.S delete mode 100644 sysdeps/unix/bsd/osf/alpha/syscalls.list delete mode 100644 sysdeps/unix/bsd/osf/alpha/sysdep.h delete mode 100644 sysdeps/unix/bsd/osf/alpha/vhangup.S delete mode 100644 sysdeps/unix/bsd/osf/alpha/waitpid.c delete mode 100644 sysdeps/unix/bsd/osf/bits/mman.h delete mode 100644 sysdeps/unix/bsd/osf/bits/sigaction.h delete mode 100644 sysdeps/unix/bsd/osf/syscalls.list delete mode 100644 sysdeps/unix/bsd/osf/system.c delete mode 100644 sysdeps/unix/bsd/sequent/i386/getgroups.S delete mode 100644 sysdeps/unix/bsd/sequent/i386/sigvec.S delete mode 100644 sysdeps/unix/bsd/sequent/i386/syscall.S delete mode 100644 sysdeps/unix/bsd/sequent/i386/sysdep.h delete mode 100644 sysdeps/unix/bsd/sony/newsos/m68k/Implies delete mode 100644 sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h delete mode 100644 sysdeps/unix/bsd/sony/newsos4/Makefile delete mode 100644 sysdeps/unix/bsd/sony/newsos4/syscalls.list delete mode 100644 sysdeps/unix/bsd/sony/newsos4/wait.c delete mode 100644 sysdeps/unix/bsd/sony/newsos4/wait3.c delete mode 100644 sysdeps/unix/bsd/sony/newsos4/wait4.c delete mode 100644 sysdeps/unix/bsd/sun/bits/signum.h delete mode 100644 sysdeps/unix/bsd/sun/m68k/Makefile delete mode 100644 sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h delete mode 100644 sysdeps/unix/bsd/sun/m68k/brk.S delete mode 100644 sysdeps/unix/bsd/sun/m68k/dl-brk.S delete mode 100644 sysdeps/unix/bsd/sun/m68k/sethostid.S delete mode 100644 sysdeps/unix/bsd/sun/m68k/sigtramp.c delete mode 100644 sysdeps/unix/bsd/sun/m68k/syscall.S delete mode 100644 sysdeps/unix/bsd/sun/m68k/sysdep.h delete mode 100644 sysdeps/unix/bsd/sun/m68k/vfork.S delete mode 100644 sysdeps/unix/bsd/sun/sethostid.c delete mode 100644 sysdeps/unix/bsd/sun/sigreturn.S delete mode 100644 sysdeps/unix/bsd/sun/sparc/Makefile delete mode 100644 sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h delete mode 100644 sysdeps/unix/bsd/sun/sparc/sethostid.S delete mode 100644 sysdeps/unix/bsd/sun/sparc/sigtramp.c delete mode 100644 sysdeps/unix/bsd/sun/sunos4/Implies delete mode 100644 sysdeps/unix/bsd/sun/sunos4/Makefile delete mode 100644 sysdeps/unix/bsd/sun/sunos4/bits/fcntl.h delete mode 100644 sysdeps/unix/bsd/sun/sunos4/bits/mman.h delete mode 100644 sysdeps/unix/bsd/sun/sunos4/bits/resource.h delete mode 100644 sysdeps/unix/bsd/sun/sunos4/bits/termios.h delete mode 100644 sysdeps/unix/bsd/sun/sunos4/bits/utsname.h delete mode 100644 sysdeps/unix/bsd/sun/sunos4/mmap.c delete mode 100644 sysdeps/unix/bsd/sun/sunos4/speed.c delete mode 100644 sysdeps/unix/bsd/sun/sunos4/sys/ttydefaults.h delete mode 100644 sysdeps/unix/bsd/sun/sunos4/syscalls.list delete mode 100644 sysdeps/unix/bsd/sun/sunos4/system.c delete mode 100644 sysdeps/unix/bsd/sun/sunos4/tcflow.c delete mode 100644 sysdeps/unix/bsd/sun/sunos4/tcflush.c delete mode 100644 sysdeps/unix/bsd/sun/sunos4/tcgetattr.c delete mode 100644 sysdeps/unix/bsd/sun/sunos4/tcsendbrk.c delete mode 100644 sysdeps/unix/bsd/sun/sunos4/tcsetattr.c delete mode 100644 sysdeps/unix/bsd/sun/sunos4/wait.c delete mode 100644 sysdeps/unix/bsd/sun/sunos4/wait3.c delete mode 100644 sysdeps/unix/bsd/sun/sunos4/wait4.c delete mode 100644 sysdeps/unix/bsd/sun/sunos4/waitpid.c delete mode 100644 sysdeps/unix/bsd/sun/syscalls.list delete mode 100644 sysdeps/unix/bsd/tahoe/Implies delete mode 100644 sysdeps/unix/bsd/tahoe/sysdep.h delete mode 100644 sysdeps/unix/bsd/ultrix4/Implies delete mode 100644 sysdeps/unix/bsd/ultrix4/Makefile delete mode 100644 sysdeps/unix/bsd/ultrix4/bits/fcntl.h delete mode 100644 sysdeps/unix/bsd/ultrix4/bits/mman.h delete mode 100644 sysdeps/unix/bsd/ultrix4/bits/posix_opt.h delete mode 100644 sysdeps/unix/bsd/ultrix4/bits/utsname.h delete mode 100644 sysdeps/unix/bsd/ultrix4/mips/Makefile delete mode 100644 sysdeps/unix/bsd/ultrix4/mips/__handler.S delete mode 100644 sysdeps/unix/bsd/ultrix4/mips/bits/sigcontext.h delete mode 100644 sysdeps/unix/bsd/ultrix4/mips/sigvec.c delete mode 100644 sysdeps/unix/bsd/ultrix4/mips/start.S delete mode 100644 sysdeps/unix/bsd/ultrix4/mips/syscalls.list delete mode 100644 sysdeps/unix/bsd/ultrix4/mips/sysdep.h delete mode 100644 sysdeps/unix/bsd/ultrix4/mips/vfork.S delete mode 100644 sysdeps/unix/bsd/ultrix4/syscalls.list delete mode 100644 sysdeps/unix/bsd/ultrix4/sysconf.c delete mode 100644 sysdeps/unix/bsd/ultrix4/system.c delete mode 100644 sysdeps/unix/bsd/ultrix4/wait3.S delete mode 100644 sysdeps/unix/bsd/vax/brk.S delete mode 100644 sysdeps/unix/bsd/vax/dl-brk.S delete mode 100644 sysdeps/unix/bsd/vax/pipe.S delete mode 100644 sysdeps/unix/bsd/vax/sysdep.S delete mode 100644 sysdeps/unix/bsd/vax/sysdep.h delete mode 100644 sysdeps/unix/bsd/vax/vfork.S delete mode 100644 sysdeps/unix/bsd/vax/wait.S delete mode 100644 sysdeps/unix/bsd/vax/wait3.S delete mode 100644 sysdeps/unix/sysv/aix/Implies delete mode 100644 sysdeps/unix/sysv/aix/Makefile delete mode 100644 sysdeps/unix/sysv/aix/Versions delete mode 100644 sysdeps/unix/sysv/aix/_exit.c delete mode 100644 sysdeps/unix/sysv/aix/accept.c delete mode 100644 sysdeps/unix/sysv/aix/access.c delete mode 100644 sysdeps/unix/sysv/aix/bind.c delete mode 100644 sysdeps/unix/sysv/aix/bits/dirent.h delete mode 100644 sysdeps/unix/sysv/aix/bits/dlfcn.h delete mode 100644 sysdeps/unix/sysv/aix/bits/endian.h delete mode 100644 sysdeps/unix/sysv/aix/bits/errno.h delete mode 100644 sysdeps/unix/sysv/aix/bits/fcntl.h delete mode 100644 sysdeps/unix/sysv/aix/bits/ioctl-types.h delete mode 100644 sysdeps/unix/sysv/aix/bits/ioctls.h delete mode 100644 sysdeps/unix/sysv/aix/bits/poll.h delete mode 100644 sysdeps/unix/sysv/aix/bits/resource.h delete mode 100644 sysdeps/unix/sysv/aix/bits/setjmp.h delete mode 100644 sysdeps/unix/sysv/aix/bits/sigaction.h delete mode 100644 sysdeps/unix/sysv/aix/bits/sigcontext.h delete mode 100644 sysdeps/unix/sysv/aix/bits/signum.h delete mode 100644 sysdeps/unix/sysv/aix/bits/sigset.h delete mode 100644 sysdeps/unix/sysv/aix/bits/sigstack.h delete mode 100644 sysdeps/unix/sysv/aix/bits/socket.h delete mode 100644 sysdeps/unix/sysv/aix/bits/stat.h delete mode 100644 sysdeps/unix/sysv/aix/bits/statfs.h delete mode 100644 sysdeps/unix/sysv/aix/bits/termios.h delete mode 100644 sysdeps/unix/sysv/aix/bits/types.h delete mode 100644 sysdeps/unix/sysv/aix/bits/uio.h delete mode 100644 sysdeps/unix/sysv/aix/bits/utmp.h delete mode 100644 sysdeps/unix/sysv/aix/bits/utmpx.h delete mode 100644 sysdeps/unix/sysv/aix/bits/utsname.h delete mode 100644 sysdeps/unix/sysv/aix/brk.c delete mode 100644 sysdeps/unix/sysv/aix/chdir.c delete mode 100644 sysdeps/unix/sysv/aix/chmod.c delete mode 100644 sysdeps/unix/sysv/aix/chown.c delete mode 100644 sysdeps/unix/sysv/aix/chroot.c delete mode 100644 sysdeps/unix/sysv/aix/close.c delete mode 100644 sysdeps/unix/sysv/aix/configure delete mode 100644 sysdeps/unix/sysv/aix/configure.in delete mode 100644 sysdeps/unix/sysv/aix/connect.c delete mode 100644 sysdeps/unix/sysv/aix/creat.c delete mode 100644 sysdeps/unix/sysv/aix/dl-addr.c delete mode 100644 sysdeps/unix/sysv/aix/dl-close.c delete mode 100644 sysdeps/unix/sysv/aix/dl-error.c delete mode 100644 sysdeps/unix/sysv/aix/dl-libc.c delete mode 100644 sysdeps/unix/sysv/aix/dl-open.c delete mode 100644 sysdeps/unix/sysv/aix/dl-support.c delete mode 100644 sysdeps/unix/sysv/aix/dl-sym.c delete mode 100644 sysdeps/unix/sysv/aix/dlldr.h delete mode 100644 sysdeps/unix/sysv/aix/environ.c delete mode 100644 sysdeps/unix/sysv/aix/euidaccess.c delete mode 100644 sysdeps/unix/sysv/aix/execve.c delete mode 100644 sysdeps/unix/sysv/aix/fchdir.c delete mode 100644 sysdeps/unix/sysv/aix/fchmod.c delete mode 100644 sysdeps/unix/sysv/aix/fchown.c delete mode 100644 sysdeps/unix/sysv/aix/fcntl.c delete mode 100644 sysdeps/unix/sysv/aix/fdatasync.c delete mode 100644 sysdeps/unix/sysv/aix/fork.c delete mode 100644 sysdeps/unix/sysv/aix/fstatfs.c delete mode 100644 sysdeps/unix/sysv/aix/fsync.c delete mode 100644 sysdeps/unix/sysv/aix/ftruncate.c delete mode 100644 sysdeps/unix/sysv/aix/ftruncate64.c delete mode 100644 sysdeps/unix/sysv/aix/fxstat.c delete mode 100644 sysdeps/unix/sysv/aix/fxstat64.c delete mode 100644 sysdeps/unix/sysv/aix/getdents.c delete mode 100644 sysdeps/unix/sysv/aix/getegid.c delete mode 100644 sysdeps/unix/sysv/aix/geteuid.c delete mode 100644 sysdeps/unix/sysv/aix/getgid.c delete mode 100644 sysdeps/unix/sysv/aix/getgroups.c delete mode 100644 sysdeps/unix/sysv/aix/gethostname.c delete mode 100644 sysdeps/unix/sysv/aix/getpeername.c delete mode 100644 sysdeps/unix/sysv/aix/getpgid.c delete mode 100644 sysdeps/unix/sysv/aix/getpgrp.c delete mode 100644 sysdeps/unix/sysv/aix/getpid.c delete mode 100644 sysdeps/unix/sysv/aix/getppid.c delete mode 100644 sysdeps/unix/sysv/aix/getpriority.c delete mode 100644 sysdeps/unix/sysv/aix/getrlimit.c delete mode 100644 sysdeps/unix/sysv/aix/getrlimit64.c delete mode 100644 sysdeps/unix/sysv/aix/getrusage.c delete mode 100644 sysdeps/unix/sysv/aix/getsid.c delete mode 100644 sysdeps/unix/sysv/aix/getsockname.c delete mode 100644 sysdeps/unix/sysv/aix/gettimeofday.c delete mode 100644 sysdeps/unix/sysv/aix/getuid.c delete mode 100644 sysdeps/unix/sysv/aix/gnu/lib-names.h delete mode 100644 sysdeps/unix/sysv/aix/init-first.c delete mode 100644 sysdeps/unix/sysv/aix/ioctl.c delete mode 100644 sysdeps/unix/sysv/aix/kernel_proto.h delete mode 100644 sysdeps/unix/sysv/aix/kill.c delete mode 100644 sysdeps/unix/sysv/aix/lchown.c delete mode 100644 sysdeps/unix/sysv/aix/libc-start.c delete mode 100644 sysdeps/unix/sysv/aix/link.c delete mode 100644 sysdeps/unix/sysv/aix/lockf.c delete mode 100644 sysdeps/unix/sysv/aix/lockf64.c delete mode 100644 sysdeps/unix/sysv/aix/lseek.c delete mode 100644 sysdeps/unix/sysv/aix/lseek64.c delete mode 100644 sysdeps/unix/sysv/aix/lxstat.c delete mode 100644 sysdeps/unix/sysv/aix/lxstat64.c delete mode 100644 sysdeps/unix/sysv/aix/madvise.c delete mode 100644 sysdeps/unix/sysv/aix/mkdir.c delete mode 100644 sysdeps/unix/sysv/aix/mknod.c delete mode 100644 sysdeps/unix/sysv/aix/mmap.c delete mode 100644 sysdeps/unix/sysv/aix/mmap64.c delete mode 100644 sysdeps/unix/sysv/aix/mprotect.c delete mode 100644 sysdeps/unix/sysv/aix/msgctl.c delete mode 100644 sysdeps/unix/sysv/aix/msgget.c delete mode 100644 sysdeps/unix/sysv/aix/msgrcv.c delete mode 100644 sysdeps/unix/sysv/aix/msgsnd.c delete mode 100644 sysdeps/unix/sysv/aix/msync.c delete mode 100644 sysdeps/unix/sysv/aix/munmap.c delete mode 100644 sysdeps/unix/sysv/aix/nanosleep.c delete mode 100644 sysdeps/unix/sysv/aix/net/if.h delete mode 100644 sysdeps/unix/sysv/aix/open.c delete mode 100644 sysdeps/unix/sysv/aix/pipe.c delete mode 100644 sysdeps/unix/sysv/aix/poll.c delete mode 100644 sysdeps/unix/sysv/aix/posix_madvise.c delete mode 100644 sysdeps/unix/sysv/aix/powerpc/memset.c delete mode 100644 sysdeps/unix/sysv/aix/powerpc/register-dump.h delete mode 100644 sysdeps/unix/sysv/aix/powerpc/s_lrint.c delete mode 100644 sysdeps/unix/sysv/aix/pread.c delete mode 100644 sysdeps/unix/sysv/aix/pread64.c delete mode 100644 sysdeps/unix/sysv/aix/profil-counter.h delete mode 100644 sysdeps/unix/sysv/aix/read.c delete mode 100644 sysdeps/unix/sysv/aix/readlink.c delete mode 100644 sysdeps/unix/sysv/aix/readv.c delete mode 100644 sysdeps/unix/sysv/aix/recv.c delete mode 100644 sysdeps/unix/sysv/aix/recvfrom.c delete mode 100644 sysdeps/unix/sysv/aix/recvmsg.c delete mode 100644 sysdeps/unix/sysv/aix/rename.c delete mode 100644 sysdeps/unix/sysv/aix/revoke.c delete mode 100644 sysdeps/unix/sysv/aix/rmdir.c delete mode 100644 sysdeps/unix/sysv/aix/sbrk.c delete mode 100644 sysdeps/unix/sysv/aix/sched_yield.c delete mode 100644 sysdeps/unix/sysv/aix/select.c delete mode 100644 sysdeps/unix/sysv/aix/semctl.c delete mode 100644 sysdeps/unix/sysv/aix/semget.c delete mode 100644 sysdeps/unix/sysv/aix/semop.c delete mode 100644 sysdeps/unix/sysv/aix/sendmsg.c delete mode 100644 sysdeps/unix/sysv/aix/sendto.c delete mode 100644 sysdeps/unix/sysv/aix/setegid.c delete mode 100644 sysdeps/unix/sysv/aix/seteuid.c delete mode 100644 sysdeps/unix/sysv/aix/setgid.c delete mode 100644 sysdeps/unix/sysv/aix/setgroups.c delete mode 100644 sysdeps/unix/sysv/aix/setitimer.c delete mode 100644 sysdeps/unix/sysv/aix/setpgid.c delete mode 100644 sysdeps/unix/sysv/aix/setpgrp.c delete mode 100644 sysdeps/unix/sysv/aix/setpriority.c delete mode 100644 sysdeps/unix/sysv/aix/setregid.c delete mode 100644 sysdeps/unix/sysv/aix/setreuid.c delete mode 100644 sysdeps/unix/sysv/aix/setrlimit.c delete mode 100644 sysdeps/unix/sysv/aix/setrlimit64.c delete mode 100644 sysdeps/unix/sysv/aix/setsid.c delete mode 100644 sysdeps/unix/sysv/aix/setsockopt.c delete mode 100644 sysdeps/unix/sysv/aix/setuid.c delete mode 100644 sysdeps/unix/sysv/aix/shmat.c delete mode 100644 sysdeps/unix/sysv/aix/shmctl.c delete mode 100644 sysdeps/unix/sysv/aix/shmdt.c delete mode 100644 sysdeps/unix/sysv/aix/shmget.c delete mode 100644 sysdeps/unix/sysv/aix/sigaction.c delete mode 100644 sysdeps/unix/sysv/aix/sigaltstack.c delete mode 100644 sysdeps/unix/sysv/aix/sigpending.c delete mode 100644 sysdeps/unix/sysv/aix/sigprocmask.c delete mode 100644 sysdeps/unix/sysv/aix/sigset-cvt-mask.h delete mode 100644 sysdeps/unix/sysv/aix/sigstack.c delete mode 100644 sysdeps/unix/sysv/aix/sigsuspend.c delete mode 100644 sysdeps/unix/sysv/aix/sleep.c delete mode 100644 sysdeps/unix/sysv/aix/socket.c delete mode 100644 sysdeps/unix/sysv/aix/socketpair.c delete mode 100644 sysdeps/unix/sysv/aix/speed.c delete mode 100644 sysdeps/unix/sysv/aix/start-libc.c delete mode 100644 sysdeps/unix/sysv/aix/start.s delete mode 100644 sysdeps/unix/sysv/aix/statfs.c delete mode 100644 sysdeps/unix/sysv/aix/symlink.c delete mode 100644 sysdeps/unix/sysv/aix/sync.c delete mode 100644 sysdeps/unix/sysv/aix/sys/param.h delete mode 100644 sysdeps/unix/sysv/aix/sys/ucontext.h delete mode 100644 sysdeps/unix/sysv/aix/syscall.c delete mode 100644 sysdeps/unix/sysv/aix/sysdep.h delete mode 100644 sysdeps/unix/sysv/aix/sysv_termio.h delete mode 100644 sysdeps/unix/sysv/aix/tcgetattr.c delete mode 100644 sysdeps/unix/sysv/aix/tcsetattr.c delete mode 100644 sysdeps/unix/sysv/aix/times.c delete mode 100644 sysdeps/unix/sysv/aix/truncate.c delete mode 100644 sysdeps/unix/sysv/aix/truncate64.c delete mode 100644 sysdeps/unix/sysv/aix/uitrunc.c delete mode 100644 sysdeps/unix/sysv/aix/ulimit.c delete mode 100644 sysdeps/unix/sysv/aix/umask.c delete mode 100644 sysdeps/unix/sysv/aix/uname.c delete mode 100644 sysdeps/unix/sysv/aix/unlink.c delete mode 100644 sysdeps/unix/sysv/aix/usleep.c delete mode 100644 sysdeps/unix/sysv/aix/ustat.c delete mode 100644 sysdeps/unix/sysv/aix/utimes.c delete mode 100644 sysdeps/unix/sysv/aix/utmpx.h delete mode 100644 sysdeps/unix/sysv/aix/wait3.c delete mode 100644 sysdeps/unix/sysv/aix/wait4.c delete mode 100644 sysdeps/unix/sysv/aix/waitid.c delete mode 100644 sysdeps/unix/sysv/aix/waitpid.c delete mode 100644 sysdeps/unix/sysv/aix/write.c delete mode 100644 sysdeps/unix/sysv/aix/writev.c delete mode 100644 sysdeps/unix/sysv/aix/xstat.c delete mode 100644 sysdeps/unix/sysv/aix/xstat64.c delete mode 100644 sysdeps/unix/sysv/hpux/bits/errno.h delete mode 100644 sysdeps/unix/sysv/hpux/bits/setjmp.h delete mode 100644 sysdeps/unix/sysv/hpux/bits/stat.h delete mode 100644 sysdeps/unix/sysv/hpux/bits/types.h delete mode 100644 sysdeps/unix/sysv/hpux/sysdep.h delete mode 100644 sysdeps/unix/sysv/i386/signal.S delete mode 100644 sysdeps/unix/sysv/i386/sigreturn.S delete mode 100644 sysdeps/unix/sysv/irix4/Implies delete mode 100644 sysdeps/unix/sysv/irix4/Makefile delete mode 100644 sysdeps/unix/sysv/irix4/__handler.S delete mode 100644 sysdeps/unix/sysv/irix4/bits/confname.h delete mode 100644 sysdeps/unix/sysv/irix4/bits/fcntl.h delete mode 100644 sysdeps/unix/sysv/irix4/bits/mman.h delete mode 100644 sysdeps/unix/sysv/irix4/bits/signum.h delete mode 100644 sysdeps/unix/sysv/irix4/bits/stat.h delete mode 100644 sysdeps/unix/sysv/irix4/dup2.c delete mode 100644 sysdeps/unix/sysv/irix4/fpathconf.c delete mode 100644 sysdeps/unix/sysv/irix4/getgroups.c delete mode 100644 sysdeps/unix/sysv/irix4/getpriority.c delete mode 100644 sysdeps/unix/sysv/irix4/getrusage.c delete mode 100644 sysdeps/unix/sysv/irix4/gettimeofday.c delete mode 100644 sysdeps/unix/sysv/irix4/pathconf.c delete mode 100644 sysdeps/unix/sysv/irix4/readv.c delete mode 100644 sysdeps/unix/sysv/irix4/reboot.c delete mode 100644 sysdeps/unix/sysv/irix4/setgroups.c delete mode 100644 sysdeps/unix/sysv/irix4/setpriority.c delete mode 100644 sysdeps/unix/sysv/irix4/sigreturn.S delete mode 100644 sysdeps/unix/sysv/irix4/sigtramp.c delete mode 100644 sysdeps/unix/sysv/irix4/start.c delete mode 100644 sysdeps/unix/sysv/irix4/swapon.c delete mode 100644 sysdeps/unix/sysv/irix4/syscalls.list delete mode 100644 sysdeps/unix/sysv/irix4/sysconf.c delete mode 100644 sysdeps/unix/sysv/irix4/uname.S delete mode 100644 sysdeps/unix/sysv/irix4/wait.S delete mode 100644 sysdeps/unix/sysv/irix4/waitpid.c delete mode 100644 sysdeps/unix/sysv/irix4/writev.c delete mode 100644 sysdeps/unix/sysv/isc2.2/syscalls.list delete mode 100644 sysdeps/unix/sysv/minix/bits/sigaction.h delete mode 100644 sysdeps/unix/sysv/sco3.2.4/Makefile delete mode 100644 sysdeps/unix/sysv/sco3.2.4/__setpgid.c delete mode 100644 sysdeps/unix/sysv/sco3.2.4/bits/confname.h delete mode 100644 sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h delete mode 100644 sysdeps/unix/sysv/sco3.2.4/getgroups.c delete mode 100644 sysdeps/unix/sysv/sco3.2.4/getpgid.c delete mode 100644 sysdeps/unix/sysv/sco3.2.4/setpgid.c delete mode 100644 sysdeps/unix/sysv/sco3.2.4/setsid.c delete mode 100644 sysdeps/unix/sysv/sco3.2.4/sigaction.S delete mode 100644 sysdeps/unix/sysv/sco3.2.4/sys/syscall.h delete mode 100644 sysdeps/unix/sysv/sco3.2.4/syscalls.list delete mode 100644 sysdeps/unix/sysv/sco3.2.4/sysconf.S delete mode 100644 sysdeps/unix/sysv/sco3.2.4/system.c delete mode 100644 sysdeps/unix/sysv/sco3.2.4/uname.S delete mode 100644 sysdeps/unix/sysv/sco3.2.4/waitpid.S delete mode 100644 sysdeps/unix/sysv/sco3.2/Makefile delete mode 100644 sysdeps/unix/sysv/sco3.2/__fltused.c delete mode 100644 sysdeps/unix/sysv/sco3.2/bits/local_lim.h delete mode 100644 sysdeps/unix/sysv/sysv4/Implies delete mode 100644 sysdeps/unix/sysv/sysv4/Makefile delete mode 100644 sysdeps/unix/sysv/sysv4/__getpgid.c delete mode 100644 sysdeps/unix/sysv/sysv4/__setpgid.c delete mode 100644 sysdeps/unix/sysv/sysv4/bits/sigaction.h delete mode 100644 sysdeps/unix/sysv/sysv4/bits/signum.h delete mode 100644 sysdeps/unix/sysv/sysv4/bits/sigset.h delete mode 100644 sysdeps/unix/sysv/sysv4/bits/utsname.h delete mode 100644 sysdeps/unix/sysv/sysv4/bits/waitflags.h delete mode 100644 sysdeps/unix/sysv/sysv4/dup2.c delete mode 100644 sysdeps/unix/sysv/sysv4/ftruncate.c delete mode 100644 sysdeps/unix/sysv/sysv4/gethostname.c delete mode 100644 sysdeps/unix/sysv/sysv4/getpagesize.c delete mode 100644 sysdeps/unix/sysv/sysv4/getpgid.c delete mode 100644 sysdeps/unix/sysv/sysv4/i386/Makefile delete mode 100644 sysdeps/unix/sysv/sysv4/i386/bits/stat.h delete mode 100644 sysdeps/unix/sysv/sysv4/i386/sys-sig.S delete mode 100644 sysdeps/unix/sysv/sysv4/i386/syscalls.list delete mode 100644 sysdeps/unix/sysv/sysv4/i386/sysdep.h delete mode 100644 sysdeps/unix/sysv/sysv4/i386/vfork.S delete mode 100644 sysdeps/unix/sysv/sysv4/sethostname.c delete mode 100644 sysdeps/unix/sysv/sysv4/setpgid.c delete mode 100644 sysdeps/unix/sysv/sysv4/setsid.c delete mode 100644 sysdeps/unix/sysv/sysv4/sigaction.c delete mode 100644 sysdeps/unix/sysv/sysv4/siginfo.h delete mode 100644 sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h delete mode 100644 sysdeps/unix/sysv/sysv4/solaris2/Makefile delete mode 100644 sysdeps/unix/sysv/sysv4/solaris2/bits/dirent.h delete mode 100644 sysdeps/unix/sysv/sysv4/solaris2/bits/errno.h delete mode 100644 sysdeps/unix/sysv/sysv4/solaris2/bits/signum.h delete mode 100644 sysdeps/unix/sysv/sysv4/solaris2/bits/sigstack.h delete mode 100644 sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h delete mode 100644 sysdeps/unix/sysv/sysv4/solaris2/bits/types.h delete mode 100644 sysdeps/unix/sysv/sysv4/solaris2/fsync.S delete mode 100644 sysdeps/unix/sysv/sysv4/solaris2/getdents.c delete mode 100644 sysdeps/unix/sysv/sysv4/solaris2/sigpending.c delete mode 100644 sysdeps/unix/sysv/sysv4/solaris2/sigstack.c delete mode 100644 sysdeps/unix/sysv/sysv4/solaris2/sigwaitinfo.c delete mode 100644 sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile delete mode 100644 sysdeps/unix/sysv/sysv4/solaris2/sparc/bits/sigcontext.h delete mode 100644 sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c delete mode 100644 sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/syscall.S delete mode 100644 sysdeps/unix/sysv/sysv4/solaris2/sparc/start.c delete mode 100644 sysdeps/unix/sysv/sysv4/solaris2/sparc/sys/trap.h delete mode 100644 sysdeps/unix/sysv/sysv4/solaris2/sparc/sys/ucontext.h delete mode 100644 sysdeps/unix/sysv/sysv4/solaris2/sparc/syscalls.list delete mode 100644 sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S delete mode 100644 sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h delete mode 100644 sysdeps/unix/sysv/sysv4/solaris2/sys/param.h delete mode 100644 sysdeps/unix/sysv/sysv4/solaris2/sys/syscall.h delete mode 100644 sysdeps/unix/sysv/sysv4/solaris2/syscalls.list delete mode 100644 sysdeps/unix/sysv/sysv4/syscalls.list delete mode 100644 sysdeps/unix/sysv/sysv4/sysconf.c delete mode 100644 sysdeps/unix/sysv/sysv4/sysconfig.h delete mode 100644 sysdeps/unix/sysv/sysv4/system.c delete mode 100644 sysdeps/unix/sysv/sysv4/waitpid.c delete mode 100644 sysdeps/vax/DEFS.h delete mode 100644 sysdeps/vax/Makefile delete mode 100644 sysdeps/vax/__longjmp.c delete mode 100644 sysdeps/vax/add_n.s delete mode 100644 sysdeps/vax/addmul_1.s delete mode 100644 sysdeps/vax/bcopy.s delete mode 100644 sysdeps/vax/bits/huge_val.h delete mode 100644 sysdeps/vax/bits/setjmp.h delete mode 100644 sysdeps/vax/bsd-_setjmp.S delete mode 100644 sysdeps/vax/bsd-setjmp.S delete mode 100644 sysdeps/vax/bzero.s delete mode 100644 sysdeps/vax/ffs.s delete mode 100644 sysdeps/vax/fl.h delete mode 100644 sysdeps/vax/gccframe.h delete mode 100644 sysdeps/vax/gmp-mparam.h delete mode 100644 sysdeps/vax/htonl.s delete mode 100644 sysdeps/vax/htons.s delete mode 100644 sysdeps/vax/memccpy.c delete mode 100644 sysdeps/vax/memchr.s delete mode 100644 sysdeps/vax/memcmp.s delete mode 100644 sysdeps/vax/memmove.s delete mode 100644 sysdeps/vax/memset.s delete mode 100644 sysdeps/vax/mul_1.s delete mode 100644 sysdeps/vax/setjmp.c delete mode 100644 sysdeps/vax/strcat.s delete mode 100644 sysdeps/vax/strchr.s delete mode 100644 sysdeps/vax/strcmp.s delete mode 100644 sysdeps/vax/strcpy.s delete mode 100644 sysdeps/vax/strcspn.s delete mode 100644 sysdeps/vax/strlen.s delete mode 100644 sysdeps/vax/strncat.s delete mode 100644 sysdeps/vax/strncmp.s delete mode 100644 sysdeps/vax/strncpy.s delete mode 100644 sysdeps/vax/strpbrk.s delete mode 100644 sysdeps/vax/strrchr.s delete mode 100644 sysdeps/vax/strsep.s delete mode 100644 sysdeps/vax/strspn.s delete mode 100644 sysdeps/vax/strstr.s delete mode 100644 sysdeps/vax/sub_n.s delete mode 100644 sysdeps/vax/submul_1.s delete mode 100644 sysdeps/z8000/add_n.s delete mode 100644 sysdeps/z8000/gmp-mparam.h delete mode 100644 sysdeps/z8000/mul_1.s delete mode 100644 sysdeps/z8000/sub_n.s diff --git a/ChangeLog b/ChangeLog index e42182fda6..0558e9b166 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2011-11-29 Joseph Myers + + * bare, sysdeps/am29k, sysdeps/i860, sysdeps/i960, sysdeps/m88k, + sysdeps/mach, sysdeps/rs6000, sysdeps/standalone, sysdeps/tahoe, + sysdeps/unix/bsd, sysdeps/unix/sysv/hpux, sysdeps/unix/sysv/i386, + sysdeps/unix/sysv/irix4, sysdeps/unix/sysv/isc2.2, + sysdeps/unix/sysv/minix, sysdeps/unix/sysv/sco3.2, + sysdeps/unix/sysv/sco3.2.4, sysdeps/unix/sysv/sysv4, sysdeps/vax, + sysdeps/z8000: Remove. + 2010-04-14 Joseph Myers * libc-abis: Remove. diff --git a/ChangeLog.aix b/ChangeLog.aix index 3e3e4df307..f47ad58e82 100644 --- a/ChangeLog.aix +++ b/ChangeLog.aix @@ -1,3 +1,7 @@ +2011-11-29 Joseph Myers + + * sysdeps/unix/sysv/aix: Remove. + 2007-07-10 Daniel Jacobowitz * sysdeps/unix/sysv/aix/bits/fcntl.h: Comment fix. diff --git a/bare/Makefile b/bare/Makefile deleted file mode 100644 index ddfa6ac5e9..0000000000 --- a/bare/Makefile +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright (C) 1994, 1997 Free Software Foundation, Inc. -# This file is part of the GNU C Library. -# Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), -# On-Line Applications Research Corporation. -# - -# 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. - -subdir := bare - -bare-routines := brdinit console strtsupp -routines = $(bare-routines) -elided-routines = $(bare-routines) -extra-objs = $(bare-routines:%=%.o) - -install-lib = lib$(config-vendor).a - -include ../Rules - -# -# For bare targets, the $(config-vendor) is the name of the board. -# We will place the board dependent code ONLY in a library which -# is board dependent. This way many target boards can share a -# single libc.a. To resolve all symbols and successfully link -# a program, the application must link against libc.a and libMY_TARGET.a. -# For example, the target specific library for the Motorola MVME135 -# board will be named libmvme135.a. To link a program for the -# MVME135, one must link against -lc and -lmvme135. -# - -lib: $(objpfx)lib$(config-vendor).a - -$(objpfx)lib$(config-vendor).a: $(bare-routines:%=$(objpfx)%.o) -# This library is small enough that it's simplest to recreate the archive -# from scratch each time. - rm -f $@ -ifdef objdir - cd $(objpfx); $(AR) cq$(verbose) $(@:$(objpfx)%=%) $(^:$(objpfx)%=%) -else - $(AR) cq$(verbose) $@ $^ -endif - $(RANLIB) $@ diff --git a/bare/brdinit.c b/bare/brdinit.c deleted file mode 100644 index af96bcd12a..0000000000 --- a/bare/brdinit.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), - On-Line Applications Research Corporation. - - 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. */ - -#include - -/* This file is only required when a "bare" board is configured. */ - -/* _Board_Initialize - -This routine normally performs board specific initialization. */ - -void -_Board_Initialize () -{ -} diff --git a/bare/console.c b/bare/console.c deleted file mode 100644 index 326ebed4a1..0000000000 --- a/bare/console.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), - On-Line Applications Research Corporation. - - 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. */ - -#include - -/* This file is only required when a "bare" board is configured. */ - -/* These routines provide console IO routines for your embedded target. */ - -int -_Console_Putc (ch) - char ch; -{ - /* eat the character */ - - return 0; -} - -int -_Console_Getc (poll) - int poll; -{ - /* boring user, never types anything */ - return -1; -} diff --git a/bare/strtsupp.c b/bare/strtsupp.c deleted file mode 100644 index c66495bb3d..0000000000 --- a/bare/strtsupp.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), - On-Line Applications Research Corporation. - - 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. */ - -#include - -/* This file is only required when a "bare" board is configured. */ - -/* Start Support Routines - -The start code for some CPUs (e.g. i386) require target dependent -support. For more info, consult the start file for your CPU. */ diff --git a/sysdeps/am29k/ffs.c b/sysdeps/am29k/ffs.c deleted file mode 100644 index 9abd2c6bca..0000000000 --- a/sysdeps/am29k/ffs.c +++ /dev/null @@ -1,43 +0,0 @@ -/* ffs -- find first set bit in a word, counted from least significant end. - For Amd 290x0. - Copyright (C) 1991, 1992, 1997, 2004, 2005 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Torbjorn Granlund (tege@sics.se). - - 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. */ - -#include - -#undef ffs - -#ifdef __GNUC__ - -int -__ffs (x) - int x; -{ - int cnt; - - asm ("clz %0,%1" : "=r" (cnt) : "r" (x & -x)); - - return 32 - cnt; -} -weak_alias (__ffs, ffs) -libc_hidden_builtin_def (ffs) - -#else -#include -#endif diff --git a/sysdeps/i860/memcopy.h b/sysdeps/i860/memcopy.h deleted file mode 100644 index 3bb9ba5138..0000000000 --- a/sysdeps/i860/memcopy.h +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (C) 1991, 1997 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. */ - -#include - -#if 0 -#undef MERGE -/* In order to make this work properly, an 's' constraint need to be added - to tm-i860.h, to mean the SC register. */ -#define MERGE(w0, sh_1, w1, sh_2) \ - ({ \ - unsigned int __merge; \ - asm("shrd %2,%1,%0" : \ - "=r" (__merge) : \ - "r" (w0), "r" (w1), "s" (sh_1)); \ - __merge; \ - }) -#endif diff --git a/sysdeps/i960/Implies b/sysdeps/i960/Implies deleted file mode 100644 index 1d569744ab..0000000000 --- a/sysdeps/i960/Implies +++ /dev/null @@ -1,3 +0,0 @@ -# i960 family uses IEEE 754 floating point. -ieee754/flt-32 -ieee754/dbl-64 diff --git a/sysdeps/i960/add_n.s b/sysdeps/i960/add_n.s deleted file mode 100644 index 6031f6d4c3..0000000000 --- a/sysdeps/i960/add_n.s +++ /dev/null @@ -1,21 +0,0 @@ -.text - .align 4 - .globl ___mpn_add_n -___mpn_add_n: - mov 0,g6 # clear carry-save register - cmpo 1,0 # clear cy - -Loop: subo 1,g3,g3 # update loop counter - ld (g1),g5 # load from s1_ptr - addo 4,g1,g1 # s1_ptr++ - ld (g2),g4 # load from s2_ptr - addo 4,g2,g2 # s2_ptr++ - cmpo g6,1 # restore cy from g6, relies on cy being 0 - addc g4,g5,g4 # main add - subc 0,0,g6 # save cy in g6 - st g4,(g0) # store result to res_ptr - addo 4,g0,g0 # res_ptr++ - cmpobne 0,g3,Loop # when branch is taken, clears C bit - - mov g6,g0 - ret diff --git a/sysdeps/i960/addmul_1.s b/sysdeps/i960/addmul_1.s deleted file mode 100644 index 1a3de95e50..0000000000 --- a/sysdeps/i960/addmul_1.s +++ /dev/null @@ -1,26 +0,0 @@ -.text - .align 4 - .globl ___mpn_mul_1 -___mpn_mul_1: - subo g2,0,g2 - shlo 2,g2,g4 - subo g4,g1,g1 - subo g4,g0,g13 - mov 0,g0 - - cmpo 1,0 # clear C bit on AC.cc - -Loop: ld (g1)[g2*4],g5 - emul g3,g5,g6 - ld (g13)[g2*4],g5 - - addc g0,g6,g6 # relies on that C bit is clear - addc 0,g7,g7 - addc g5,g6,g6 # relies on that C bit is clear - st g6,(g13)[g2*4] - addc 0,g7,g0 - - addo g2,1,g2 - cmpobne 0,g2,Loop # when branch is taken, clears C bit - - ret diff --git a/sysdeps/i960/ffs.c b/sysdeps/i960/ffs.c deleted file mode 100644 index 090d1148b5..0000000000 --- a/sysdeps/i960/ffs.c +++ /dev/null @@ -1,46 +0,0 @@ -/* ffs -- find first set bit in a word, counted from least significant end. - For i960 Core architecture - This file is part of the GNU C Library. - Copyright (C) 1994, 1997, 2004, 2005 Free Software Foundation, Inc. - Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), - On-Line Applications Research Corporation. - - 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. */ - -#include - -#undef ffs - -#if defined (__GNUC__) && defined (__i960__) - -int -__ffs (x) - int x; -{ - int cnt; - - asm ("scanbit %1,%0" : "=d" (cnt) : "rm" (x & -x)); - - return cnt; -} -weak_alias (__ffs, ffs) -libc_hidden_builtin_def (ffs) - -#else - -#include - -#endif diff --git a/sysdeps/i960/mul_1.s b/sysdeps/i960/mul_1.s deleted file mode 100644 index e75ea42d39..0000000000 --- a/sysdeps/i960/mul_1.s +++ /dev/null @@ -1,23 +0,0 @@ -.text - .align 4 - .globl ___mpn_mul_1 -___mpn_mul_1: - subo g2,0,g2 - shlo 2,g2,g4 - subo g4,g1,g1 - subo g4,g0,g13 - mov 0,g0 - - cmpo 1,0 # clear C bit on AC.cc - -Loop: ld (g1)[g2*4],g5 - emul g3,g5,g6 - - addc g0,g6,g6 # relies on that C bit is clear - st g6,(g13)[g2*4] - addc 0,g7,g0 - - addo g2,1,g2 - cmpobne 0,g2,Loop # when branch is taken, clears C bit - - ret diff --git a/sysdeps/i960/sub_n.s b/sysdeps/i960/sub_n.s deleted file mode 100644 index 13ebbfa9f2..0000000000 --- a/sysdeps/i960/sub_n.s +++ /dev/null @@ -1,21 +0,0 @@ -.text - .align 4 - .globl ___mpn_sub_n -___mpn_sub_n: - mov 1,g6 # set carry-save register - cmpo 1,0 # clear cy - -Loop: subo 1,g3,g3 # update loop counter - ld (g1),g5 # load from s1_ptr - addo 4,g1,g1 # s1_ptr++ - ld (g2),g4 # load from s2_ptr - addo 4,g2,g2 # s2_ptr++ - cmpo g6,1 # restore cy from g6, relies on cy being 0 - subc g4,g5,g4 # main subtract - subc 0,0,g6 # save cy in g6 - st g4,(g0) # store result to res_ptr - addo 4,g0,g0 # res_ptr++ - cmpobne 0,g3,Loop # when branch is taken, cy will be 0 - - mov g6,g0 - ret diff --git a/sysdeps/m88k/add_n.s b/sysdeps/m88k/add_n.s deleted file mode 100644 index a10730d7c4..0000000000 --- a/sysdeps/m88k/add_n.s +++ /dev/null @@ -1,104 +0,0 @@ -; mc88100 __mpn_add -- Add two limb vectors of the same length > 0 and store -; sum in a third limb vector. - -; Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc. - -; This file is part of the GNU MP Library. - -; The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -; MA 02111-1307, USA. - - -; INPUT PARAMETERS -; res_ptr r2 -; s1_ptr r3 -; s2_ptr r4 -; size r5 - -; This code has been optimized to run one instruction per clock, avoiding -; load stalls and writeback contention. As a result, the instruction -; order is not always natural. - -; The speed is about 4.6 clocks/limb + 18 clocks/limb-vector on an 88100, -; but on the 88110, it seems to run much slower, 6.6 clocks/limb. - - text - align 16 - global ___mpn_add_n -___mpn_add_n: - ld r6,r3,0 ; read first limb from s1_ptr - extu r10,r5,3 - ld r7,r4,0 ; read first limb from s2_ptr - - subu.co r5,r0,r5 ; (clear carry as side effect) - mak r5,r5,3<4> - bcnd eq0,r5,Lzero - - or r12,r0,lo16(Lbase) - or.u r12,r12,hi16(Lbase) - addu r12,r12,r5 ; r12 is address for entering in loop - - extu r5,r5,2 ; divide by 4 - subu r2,r2,r5 ; adjust res_ptr - subu r3,r3,r5 ; adjust s1_ptr - subu r4,r4,r5 ; adjust s2_ptr - - or r8,r6,r0 - - jmp.n r12 - or r9,r7,r0 - -Loop: addu r3,r3,32 - st r8,r2,28 - addu r4,r4,32 - ld r6,r3,0 - addu r2,r2,32 - ld r7,r4,0 -Lzero: subu r10,r10,1 ; add 0 + 8r limbs (adj loop cnt) -Lbase: ld r8,r3,4 - addu.cio r6,r6,r7 - ld r9,r4,4 - st r6,r2,0 - ld r6,r3,8 ; add 7 + 8r limbs - addu.cio r8,r8,r9 - ld r7,r4,8 - st r8,r2,4 - ld r8,r3,12 ; add 6 + 8r limbs - addu.cio r6,r6,r7 - ld r9,r4,12 - st r6,r2,8 - ld r6,r3,16 ; add 5 + 8r limbs - addu.cio r8,r8,r9 - ld r7,r4,16 - st r8,r2,12 - ld r8,r3,20 ; add 4 + 8r limbs - addu.cio r6,r6,r7 - ld r9,r4,20 - st r6,r2,16 - ld r6,r3,24 ; add 3 + 8r limbs - addu.cio r8,r8,r9 - ld r7,r4,24 - st r8,r2,20 - ld r8,r3,28 ; add 2 + 8r limbs - addu.cio r6,r6,r7 - ld r9,r4,28 - st r6,r2,24 - bcnd.n ne0,r10,Loop ; add 1 + 8r limbs - addu.cio r8,r8,r9 - - st r8,r2,28 ; store most significant limb - - jmp.n r1 - addu.ci r2,r0,r0 ; return carry-out from most sign. limb diff --git a/sysdeps/m88k/ffs.c b/sysdeps/m88k/ffs.c deleted file mode 100644 index 9381f54b0b..0000000000 --- a/sysdeps/m88k/ffs.c +++ /dev/null @@ -1,45 +0,0 @@ -/* ffs -- find first set bit in a word, counted from least significant end. - For Motorola 88000. - This file is part of the GNU C Library. - Copyright (C) 1991, 1992, 1997, 2004, 2005 Free Software Foundation, Inc. - Contributed by Torbjorn Granlund (tege@sics.se). - - 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. */ - -#include - -#undef ffs - -#ifdef __GNUC__ - -int -__ffs (x) - int x; -{ - int cnt; - - if (x == 0) - return 0; - - asm ("ff1 %0,%1" : "=r" (cnt) : "r" (x & -x)); - return cnt + 1; -} -weak_alias (__ffs, ffs) -libc_hidden_builtin_def (ffs) - -#else -#include -#endif diff --git a/sysdeps/m88k/m88100/add_n.S b/sysdeps/m88k/m88100/add_n.S deleted file mode 100644 index 2107eb55cb..0000000000 --- a/sysdeps/m88k/m88100/add_n.S +++ /dev/null @@ -1,133 +0,0 @@ -; mc88100 __mpn_add -- Add two limb vectors of the same length > 0 and store -; sum in a third limb vector. - -; Copyright (C) 1992, 1994 Free Software Foundation, Inc. - -; This file is part of the GNU MP Library. - -; The GNU MP Library is free software; you can redistribute it and/or modify -; it under the terms of the GNU General Public License as published by -; the Free Software Foundation; either version 2, or (at your option) -; any later version. - -; The GNU MP 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 General Public License for more details. - -; You should have received a copy of the GNU General Public License -; along with the GNU MP Library; see the file COPYING. If not, write to -; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. - - -; INPUT PARAMETERS -; res_ptr r2 -; s1_ptr r3 -; s2_ptr r4 -; size r5 - -; This code has been optimized to run one instruction per clock, avoiding -; load stalls and writeback contention. As a result, the instruction -; order is not always natural. - -; The speed is approximately 4.3 clocks/limb + 18 clocks/limb-vector. - -#include "sysdep.h" - -ENTRY (__mpn_add_n) - ld r6,r3,0 ; read first limb from s1_ptr - extu r10,r5,4 - ld r7,r4,0 ; read first limb from s2_ptr - - subu.co r5,r0,r5 ; (clear carry as side effect) - mak r5,r5,4<4> - bcnd eq0,r5,Lzero - - or r12,r0,lo16(Lbase) - or.u r12,r12,hi16(Lbase) - addu r12,r12,r5 ; r12 is address for entering in loop - - extu r5,r5,2 ; divide by 4 - subu r2,r2,r5 ; adjust res_ptr - subu r3,r3,r5 ; adjust s1_ptr - subu r4,r4,r5 ; adjust s2_ptr - - or r8,r6,r0 - - jmp.n r12 - or r9,r7,r0 - -Loop: addu r3,r3,64 - st r8,r2,60 - addu r4,r4,64 - ld r6,r3,0 - addu r2,r2,64 - ld r7,r4,0 -Lzero: subu r10,r10,1 ; add 0 + 16r limbs (adjust loop counter) -Lbase: ld r8,r3,4 - addu.cio r6,r6,r7 - ld r9,r4,4 - st r6,r2,0 - ld r6,r3,8 ; add 15 + 16r limbs - addu.cio r8,r8,r9 - ld r7,r4,8 - st r8,r2,4 - ld r8,r3,12 ; add 14 + 16r limbs - addu.cio r6,r6,r7 - ld r9,r4,12 - st r6,r2,8 - ld r6,r3,16 ; add 13 + 16r limbs - addu.cio r8,r8,r9 - ld r7,r4,16 - st r8,r2,12 - ld r8,r3,20 ; add 12 + 16r limbs - addu.cio r6,r6,r7 - ld r9,r4,20 - st r6,r2,16 - ld r6,r3,24 ; add 11 + 16r limbs - addu.cio r8,r8,r9 - ld r7,r4,24 - st r8,r2,20 - ld r8,r3,28 ; add 10 + 16r limbs - addu.cio r6,r6,r7 - ld r9,r4,28 - st r6,r2,24 - ld r6,r3,32 ; add 9 + 16r limbs - addu.cio r8,r8,r9 - ld r7,r4,32 - st r8,r2,28 - ld r8,r3,36 ; add 8 + 16r limbs - addu.cio r6,r6,r7 - ld r9,r4,36 - st r6,r2,32 - ld r6,r3,40 ; add 7 + 16r limbs - addu.cio r8,r8,r9 - ld r7,r4,40 - st r8,r2,36 - ld r8,r3,44 ; add 6 + 16r limbs - addu.cio r6,r6,r7 - ld r9,r4,44 - st r6,r2,40 - ld r6,r3,48 ; add 5 + 16r limbs - addu.cio r8,r8,r9 - ld r7,r4,48 - st r8,r2,44 - ld r8,r3,52 ; add 4 + 16r limbs - addu.cio r6,r6,r7 - ld r9,r4,52 - st r6,r2,48 - ld r6,r3,56 ; add 3 + 16r limbs - addu.cio r8,r8,r9 - ld r7,r4,56 - st r8,r2,52 - ld r8,r3,60 ; add 2 + 16r limbs - addu.cio r6,r6,r7 - ld r9,r4,60 - st r6,r2,56 - bcnd.n ne0,r10,Loop ; add 1 + 16r limbs - addu.cio r8,r8,r9 - - st r8,r2,60 ; store most significant limb - - jmp.n r1 - addu.ci r2,r0,r0 ; return carry-out from most sign. limb diff --git a/sysdeps/m88k/m88100/add_n.s b/sysdeps/m88k/m88100/add_n.s deleted file mode 100644 index 0741ec91de..0000000000 --- a/sysdeps/m88k/m88100/add_n.s +++ /dev/null @@ -1,103 +0,0 @@ -; mc88100 __mpn_add -- Add two limb vectors of the same length > 0 and store -; sum in a third limb vector. - -; Copyright (C) 1992, 1994 Free Software Foundation, Inc. - -; This file is part of the GNU MP Library. - -; The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - -; INPUT PARAMETERS -; res_ptr r2 -; s1_ptr r3 -; s2_ptr r4 -; size r5 - -; This code has been optimized to run one instruction per clock, avoiding -; load stalls and writeback contention. As a result, the instruction -; order is not always natural. - -; The speed is about 4.6 clocks/limb + 18 clocks/limb-vector on an 88100, -; but on the 88110, it seems to run much slower, 6.6 clocks/limb. - - text - align 16 - global ___mpn_add_n -___mpn_add_n: - ld r6,r3,0 ; read first limb from s1_ptr - extu r10,r5,3 - ld r7,r4,0 ; read first limb from s2_ptr - - subu.co r5,r0,r5 ; (clear carry as side effect) - mak r5,r5,3<4> - bcnd eq0,r5,Lzero - - or r12,r0,lo16(Lbase) - or.u r12,r12,hi16(Lbase) - addu r12,r12,r5 ; r12 is address for entering in loop - - extu r5,r5,2 ; divide by 4 - subu r2,r2,r5 ; adjust res_ptr - subu r3,r3,r5 ; adjust s1_ptr - subu r4,r4,r5 ; adjust s2_ptr - - or r8,r6,r0 - - jmp.n r12 - or r9,r7,r0 - -Loop: addu r3,r3,32 - st r8,r2,28 - addu r4,r4,32 - ld r6,r3,0 - addu r2,r2,32 - ld r7,r4,0 -Lzero: subu r10,r10,1 ; add 0 + 8r limbs (adj loop cnt) -Lbase: ld r8,r3,4 - addu.cio r6,r6,r7 - ld r9,r4,4 - st r6,r2,0 - ld r6,r3,8 ; add 7 + 8r limbs - addu.cio r8,r8,r9 - ld r7,r4,8 - st r8,r2,4 - ld r8,r3,12 ; add 6 + 8r limbs - addu.cio r6,r6,r7 - ld r9,r4,12 - st r6,r2,8 - ld r6,r3,16 ; add 5 + 8r limbs - addu.cio r8,r8,r9 - ld r7,r4,16 - st r8,r2,12 - ld r8,r3,20 ; add 4 + 8r limbs - addu.cio r6,r6,r7 - ld r9,r4,20 - st r6,r2,16 - ld r6,r3,24 ; add 3 + 8r limbs - addu.cio r8,r8,r9 - ld r7,r4,24 - st r8,r2,20 - ld r8,r3,28 ; add 2 + 8r limbs - addu.cio r6,r6,r7 - ld r9,r4,28 - st r6,r2,24 - bcnd.n ne0,r10,Loop ; add 1 + 8r limbs - addu.cio r8,r8,r9 - - st r8,r2,28 ; store most significant limb - - jmp.n r1 - addu.ci r2,r0,r0 ; return carry-out from most sign. limb diff --git a/sysdeps/m88k/m88100/mul_1.S b/sysdeps/m88k/m88100/mul_1.S deleted file mode 100644 index 503897b298..0000000000 --- a/sysdeps/m88k/m88100/mul_1.S +++ /dev/null @@ -1,127 +0,0 @@ -; mc88100 __mpn_mul_1 -- Multiply a limb vector with a single limb and -; store the product in a second limb vector. - -; Copyright (C) 1992, 1994 Free Software Foundation, Inc. - -; This file is part of the GNU MP Library. - -; The GNU MP Library is free software; you can redistribute it and/or modify -; it under the terms of the GNU General Public License as published by -; the Free Software Foundation; either version 2, or (at your option) -; any later version. - -; The GNU MP 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 General Public License for more details. - -; You should have received a copy of the GNU General Public License -; along with the GNU MP Library; see the file COPYING. If not, write to -; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. - - -; INPUT PARAMETERS -; res_ptr r2 -; s1_ptr r3 -; size r4 -; s2_limb r5 - -; Common overhead is about 11 cycles/invocation. - -; The speed for S2_LIMB >= 0x10000 is approximately 21 cycles/limb. (The -; pipeline stalls 2 cycles due to WB contention.) - -; The speed for S2_LIMB < 0x10000 is approximately 16 cycles/limb. (The -; pipeline stalls 2 cycles due to WB contention and 1 cycle due to latency.) - -; To enhance speed: -; 1. Unroll main loop 4-8 times. -; 2. Schedule code to avoid WB contention. It might be tempting to move the -; ld instruction in the loops down to save 2 cycles (less WB contention), -; but that looses because the ultimate value will be read from outside -; the allocated space. But if we handle the ultimate multiplication in -; the tail, we can do this. -; 3. Make the multiplication with less instructions. I think the code for -; (S2_LIMB >= 0x10000) is not minimal. -; With these techniques the (S2_LIMB >= 0x10000) case would run in 17 or -; less cycles/limb; the (S2_LIMB < 0x10000) case would run in 11 -; cycles/limb. (Assuming infinite unrolling.) - -#include "sysdep.h" - -ENTRY (__mpn_mul_1) - - ; Make S1_PTR and RES_PTR point at the end of their blocks - ; and negate SIZE. - lda r3,r3[r4] - lda r6,r2[r4] ; RES_PTR in r6 since r2 is retval - subu r4,r0,r4 - - addu.co r2,r0,r0 ; r2 = cy = 0 - ld r9,r3[r4] - mask r7,r5,0xffff ; r7 = lo(S2_LIMB) - extu r8,r5,16 ; r8 = hi(S2_LIMB) - bcnd.n eq0,r8,Lsmall ; jump if (hi(S2_LIMB) == 0) - subu r6,r6,4 - -; General code for any value of S2_LIMB. - - ; Make a stack frame and save r25 and r26 - subu r31,r31,16 - st.d r25,r31,8 - - ; Enter the loop in the middle - br.n L1 - addu r4,r4,1 - -Loop: - ld r9,r3[r4] - st r26,r6[r4] -; bcnd ne0,r0,0 ; bubble - addu r4,r4,1 -L1: mul r26,r9,r5 ; low word of product mul_1 WB ld - mask r12,r9,0xffff ; r12 = lo(s1_limb) mask_1 - mul r11,r12,r7 ; r11 = prod_0 mul_2 WB mask_1 - mul r10,r12,r8 ; r10 = prod_1a mul_3 - extu r13,r9,16 ; r13 = hi(s1_limb) extu_1 WB mul_1 - mul r12,r13,r7 ; r12 = prod_1b mul_4 WB extu_1 - mul r25,r13,r8 ; r25 = prod_2 mul_5 WB mul_2 - extu r11,r11,16 ; r11 = hi(prod_0) extu_2 WB mul_3 - addu r10,r10,r11 ; addu_1 WB extu_2 -; bcnd ne0,r0,0 ; bubble WB addu_1 - addu.co r10,r10,r12 ; WB mul_4 - mask.u r10,r10,0xffff ; move the 16 most significant bits... - addu.ci r10,r10,r0 ; ...to the low half of the word... - rot r10,r10,16 ; ...and put carry in pos 16. - addu.co r26,r26,r2 ; add old carry limb - bcnd.n ne0,r4,Loop - addu.ci r2,r25,r10 ; compute new carry limb - - st r26,r6[r4] - ld.d r25,r31,8 - jmp.n r1 - addu r31,r31,16 - -; Fast code for S2_LIMB < 0x10000 -Lsmall: - ; Enter the loop in the middle - br.n SL1 - addu r4,r4,1 - -SLoop: - ld r9,r3[r4] ; - st r8,r6[r4] ; - addu r4,r4,1 ; -SL1: mul r8,r9,r5 ; low word of product - mask r12,r9,0xffff ; r12 = lo(s1_limb) - extu r13,r9,16 ; r13 = hi(s1_limb) - mul r11,r12,r7 ; r11 = prod_0 - mul r12,r13,r7 ; r12 = prod_1b - addu.cio r8,r8,r2 ; add old carry limb - extu r10,r11,16 ; r11 = hi(prod_0) - addu r10,r10,r12 ; - bcnd.n ne0,r4,SLoop - extu r2,r10,16 ; r2 = new carry limb - - jmp.n r1 - st r8,r6[r4] diff --git a/sysdeps/m88k/m88100/mul_1.s b/sysdeps/m88k/m88100/mul_1.s deleted file mode 100644 index 77242778d7..0000000000 --- a/sysdeps/m88k/m88100/mul_1.s +++ /dev/null @@ -1,128 +0,0 @@ -; mc88100 __mpn_mul_1 -- Multiply a limb vector with a single limb and -; store the product in a second limb vector. - -; Copyright (C) 1992, 1994 Free Software Foundation, Inc. - -; This file is part of the GNU MP Library. - -; The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - -; INPUT PARAMETERS -; res_ptr r2 -; s1_ptr r3 -; size r4 -; s2_limb r5 - -; Common overhead is about 11 cycles/invocation. - -; The speed for S2_LIMB >= 0x10000 is approximately 21 cycles/limb. (The -; pipeline stalls 2 cycles due to WB contention.) - -; The speed for S2_LIMB < 0x10000 is approximately 16 cycles/limb. (The -; pipeline stalls 2 cycles due to WB contention and 1 cycle due to latency.) - -; To enhance speed: -; 1. Unroll main loop 4-8 times. -; 2. Schedule code to avoid WB contention. It might be tempting to move the -; ld instruction in the loops down to save 2 cycles (less WB contention), -; but that looses because the ultimate value will be read from outside -; the allocated space. But if we handle the ultimate multiplication in -; the tail, we can do this. -; 3. Make the multiplication with less instructions. I think the code for -; (S2_LIMB >= 0x10000) is not minimal. -; With these techniques the (S2_LIMB >= 0x10000) case would run in 17 or -; less cycles/limb; the (S2_LIMB < 0x10000) case would run in 11 -; cycles/limb. (Assuming infinite unrolling.) - - text - align 16 - global ___mpn_mul_1 -___mpn_mul_1: - - ; Make S1_PTR and RES_PTR point at the end of their blocks - ; and negate SIZE. - lda r3,r3[r4] - lda r6,r2[r4] ; RES_PTR in r6 since r2 is retval - subu r4,r0,r4 - - addu.co r2,r0,r0 ; r2 = cy = 0 - ld r9,r3[r4] - mask r7,r5,0xffff ; r7 = lo(S2_LIMB) - extu r8,r5,16 ; r8 = hi(S2_LIMB) - bcnd.n eq0,r8,Lsmall ; jump if (hi(S2_LIMB) == 0) - subu r6,r6,4 - -; General code for any value of S2_LIMB. - - ; Make a stack frame and save r25 and r26 - subu r31,r31,16 - st.d r25,r31,8 - - ; Enter the loop in the middle - br.n L1 - addu r4,r4,1 - -Loop: - ld r9,r3[r4] - st r26,r6[r4] -; bcnd ne0,r0,0 ; bubble - addu r4,r4,1 -L1: mul r26,r9,r5 ; low word of product mul_1 WB ld - mask r12,r9,0xffff ; r12 = lo(s1_limb) mask_1 - mul r11,r12,r7 ; r11 = prod_0 mul_2 WB mask_1 - mul r10,r12,r8 ; r10 = prod_1a mul_3 - extu r13,r9,16 ; r13 = hi(s1_limb) extu_1 WB mul_1 - mul r12,r13,r7 ; r12 = prod_1b mul_4 WB extu_1 - mul r25,r13,r8 ; r25 = prod_2 mul_5 WB mul_2 - extu r11,r11,16 ; r11 = hi(prod_0) extu_2 WB mul_3 - addu r10,r10,r11 ; addu_1 WB extu_2 -; bcnd ne0,r0,0 ; bubble WB addu_1 - addu.co r10,r10,r12 ; WB mul_4 - mask.u r10,r10,0xffff ; move the 16 most significant bits... - addu.ci r10,r10,r0 ; ...to the low half of the word... - rot r10,r10,16 ; ...and put carry in pos 16. - addu.co r26,r26,r2 ; add old carry limb - bcnd.n ne0,r4,Loop - addu.ci r2,r25,r10 ; compute new carry limb - - st r26,r6[r4] - ld.d r25,r31,8 - jmp.n r1 - addu r31,r31,16 - -; Fast code for S2_LIMB < 0x10000 -Lsmall: - ; Enter the loop in the middle - br.n SL1 - addu r4,r4,1 - -SLoop: - ld r9,r3[r4] ; - st r8,r6[r4] ; - addu r4,r4,1 ; -SL1: mul r8,r9,r5 ; low word of product - mask r12,r9,0xffff ; r12 = lo(s1_limb) - extu r13,r9,16 ; r13 = hi(s1_limb) - mul r11,r12,r7 ; r11 = prod_0 - mul r12,r13,r7 ; r12 = prod_1b - addu.cio r8,r8,r2 ; add old carry limb - extu r10,r11,16 ; r11 = hi(prod_0) - addu r10,r10,r12 ; - bcnd.n ne0,r4,SLoop - extu r2,r10,16 ; r2 = new carry limb - - jmp.n r1 - st r8,r6[r4] diff --git a/sysdeps/m88k/m88100/sub_n.S b/sysdeps/m88k/m88100/sub_n.S deleted file mode 100644 index 927ece4f15..0000000000 --- a/sysdeps/m88k/m88100/sub_n.S +++ /dev/null @@ -1,134 +0,0 @@ -; mc88100 __mpn_sub -- Subtract two limb vectors of the same length > 0 and -; store difference in a third limb vector. - -; Copyright (C) 1992, 1994 Free Software Foundation, Inc. - -; This file is part of the GNU MP Library. - -; The GNU MP Library is free software; you can redistribute it and/or modify -; it under the terms of the GNU General Public License as published by -; the Free Software Foundation; either version 2, or (at your option) -; any later version. - -; The GNU MP 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 General Public License for more details. - -; You should have received a copy of the GNU General Public License -; along with the GNU MP Library; see the file COPYING. If not, write to -; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. - - -; INPUT PARAMETERS -; res_ptr r2 -; s1_ptr r3 -; s2_ptr r4 -; size r5 - -; This code has been optimized to run one instruction per clock, avoiding -; load stalls and writeback contention. As a result, the instruction -; order is not always natural. - -; The speed is approximately 4.3 clocks/limb + 18 clocks/limb-vector. - -#include "sysdep.h" - -ENTRY (__mpn_sub_n) - ld r6,r3,0 ; read first limb from s1_ptr - extu r10,r5,4 - ld r7,r4,0 ; read first limb from s2_ptr - - subu.co r5,r0,r5 ; (clear carry as side effect) - mak r5,r5,4<4> - bcnd eq0,r5,Lzero - - or r12,r0,lo16(Lbase) - or.u r12,r12,hi16(Lbase) - addu r12,r12,r5 ; r12 is address for entering in loop - - extu r5,r5,2 ; divide by 4 - subu r2,r2,r5 ; adjust res_ptr - subu r3,r3,r5 ; adjust s1_ptr - subu r4,r4,r5 ; adjust s2_ptr - - or r8,r6,r0 - - jmp.n r12 - or r9,r7,r0 - -Loop: addu r3,r3,64 - st r8,r2,60 - addu r4,r4,64 - ld r6,r3,0 - addu r2,r2,64 - ld r7,r4,0 -Lzero: subu r10,r10,1 ; subtract 0 + 16r limbs (adjust loop counter) -Lbase: ld r8,r3,4 - subu.cio r6,r6,r7 - ld r9,r4,4 - st r6,r2,0 - ld r6,r3,8 ; subtract 15 + 16r limbs - subu.cio r8,r8,r9 - ld r7,r4,8 - st r8,r2,4 - ld r8,r3,12 ; subtract 14 + 16r limbs - subu.cio r6,r6,r7 - ld r9,r4,12 - st r6,r2,8 - ld r6,r3,16 ; subtract 13 + 16r limbs - subu.cio r8,r8,r9 - ld r7,r4,16 - st r8,r2,12 - ld r8,r3,20 ; subtract 12 + 16r limbs - subu.cio r6,r6,r7 - ld r9,r4,20 - st r6,r2,16 - ld r6,r3,24 ; subtract 11 + 16r limbs - subu.cio r8,r8,r9 - ld r7,r4,24 - st r8,r2,20 - ld r8,r3,28 ; subtract 10 + 16r limbs - subu.cio r6,r6,r7 - ld r9,r4,28 - st r6,r2,24 - ld r6,r3,32 ; subtract 9 + 16r limbs - subu.cio r8,r8,r9 - ld r7,r4,32 - st r8,r2,28 - ld r8,r3,36 ; subtract 8 + 16r limbs - subu.cio r6,r6,r7 - ld r9,r4,36 - st r6,r2,32 - ld r6,r3,40 ; subtract 7 + 16r limbs - subu.cio r8,r8,r9 - ld r7,r4,40 - st r8,r2,36 - ld r8,r3,44 ; subtract 6 + 16r limbs - subu.cio r6,r6,r7 - ld r9,r4,44 - st r6,r2,40 - ld r6,r3,48 ; subtract 5 + 16r limbs - subu.cio r8,r8,r9 - ld r7,r4,48 - st r8,r2,44 - ld r8,r3,52 ; subtract 4 + 16r limbs - subu.cio r6,r6,r7 - ld r9,r4,52 - st r6,r2,48 - ld r6,r3,56 ; subtract 3 + 16r limbs - subu.cio r8,r8,r9 - ld r7,r4,56 - st r8,r2,52 - ld r8,r3,60 ; subtract 2 + 16r limbs - subu.cio r6,r6,r7 - ld r9,r4,60 - st r6,r2,56 - bcnd.n ne0,r10,Loop ; subtract 1 + 16r limbs - subu.cio r8,r8,r9 - - st r8,r2,60 ; store most significant limb - - addu.ci r2,r0,r0 ; return carry-out from most sign. limb - jmp.n r1 - xor r2,r2,1 diff --git a/sysdeps/m88k/m88100/sub_n.s b/sysdeps/m88k/m88100/sub_n.s deleted file mode 100644 index a132c212a6..0000000000 --- a/sysdeps/m88k/m88100/sub_n.s +++ /dev/null @@ -1,104 +0,0 @@ -; mc88100 __mpn_sub -- Subtract two limb vectors of the same length > 0 and -; store difference in a third limb vector. - -; Copyright (C) 1992, 1994 Free Software Foundation, Inc. - -; This file is part of the GNU MP Library. - -; The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - -; INPUT PARAMETERS -; res_ptr r2 -; s1_ptr r3 -; s2_ptr r4 -; size r5 - -; This code has been optimized to run one instruction per clock, avoiding -; load stalls and writeback contention. As a result, the instruction -; order is not always natural. - -; The speed is about 4.6 clocks/limb + 18 clocks/limb-vector on an 88100, -; but on the 88110, it seems to run much slower, 6.6 clocks/limb. - - text - align 16 - global ___mpn_sub_n -___mpn_sub_n: - ld r6,r3,0 ; read first limb from s1_ptr - extu r10,r5,3 - ld r7,r4,0 ; read first limb from s2_ptr - - subu.co r5,r0,r5 ; (clear carry as side effect) - mak r5,r5,3<4> - bcnd eq0,r5,Lzero - - or r12,r0,lo16(Lbase) - or.u r12,r12,hi16(Lbase) - addu r12,r12,r5 ; r12 is address for entering in loop - - extu r5,r5,2 ; divide by 4 - subu r2,r2,r5 ; adjust res_ptr - subu r3,r3,r5 ; adjust s1_ptr - subu r4,r4,r5 ; adjust s2_ptr - - or r8,r6,r0 - - jmp.n r12 - or r9,r7,r0 - -Loop: addu r3,r3,32 - st r8,r2,28 - addu r4,r4,32 - ld r6,r3,0 - addu r2,r2,32 - ld r7,r4,0 -Lzero: subu r10,r10,1 ; subtract 0 + 8r limbs (adj loop cnt) -Lbase: ld r8,r3,4 - subu.cio r6,r6,r7 - ld r9,r4,4 - st r6,r2,0 - ld r6,r3,8 ; subtract 7 + 8r limbs - subu.cio r8,r8,r9 - ld r7,r4,8 - st r8,r2,4 - ld r8,r3,12 ; subtract 6 + 8r limbs - subu.cio r6,r6,r7 - ld r9,r4,12 - st r6,r2,8 - ld r6,r3,16 ; subtract 5 + 8r limbs - subu.cio r8,r8,r9 - ld r7,r4,16 - st r8,r2,12 - ld r8,r3,20 ; subtract 4 + 8r limbs - subu.cio r6,r6,r7 - ld r9,r4,20 - st r6,r2,16 - ld r6,r3,24 ; subtract 3 + 8r limbs - subu.cio r8,r8,r9 - ld r7,r4,24 - st r8,r2,20 - ld r8,r3,28 ; subtract 2 + 8r limbs - subu.cio r6,r6,r7 - ld r9,r4,28 - st r6,r2,24 - bcnd.n ne0,r10,Loop ; subtract 1 + 8r limbs - subu.cio r8,r8,r9 - - st r8,r2,28 ; store most significant limb - - addu.ci r2,r0,r0 ; return carry-out from most sign. limb - jmp.n r1 - xor r2,r2,1 diff --git a/sysdeps/m88k/m88110/add_n.S b/sysdeps/m88k/m88110/add_n.S deleted file mode 100644 index 3c90674483..0000000000 --- a/sysdeps/m88k/m88110/add_n.S +++ /dev/null @@ -1,200 +0,0 @@ -; mc88110 __mpn_add_n -- Add two limb vectors of the same length > 0 and store -; sum in a third limb vector. - -; Copyright (C) 1995, 1996 Free Software Foundation, Inc. - -; This file is part of the GNU MP Library. - -; The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -; MA 02111-1307, USA. - - -; INPUT PARAMETERS -#define res_ptr r2 -#define s1_ptr r3 -#define s2_ptr r4 -#define size r5 - -#include "sysdep.h" - - text - align 16 - global C_SYMBOL_NAME(__mpn_add_n) -C_SYMBOL_NAME(__mpn_add_n): - addu.co r0,r0,r0 ; clear cy flag - xor r12,s2_ptr,res_ptr - bb1 2,r12,L1 -; ** V1a ** -L0: bb0 2,res_ptr,L_v1 ; branch if res_ptr is aligned? -/* Add least significant limb separately to align res_ptr and s2_ptr */ - ld r10,s1_ptr,0 - addu s1_ptr,s1_ptr,4 - ld r8,s2_ptr,0 - addu s2_ptr,s2_ptr,4 - subu size,size,1 - addu.co r6,r10,r8 - st r6,res_ptr,0 - addu res_ptr,res_ptr,4 -L_v1: cmp r12,size,2 - bb1 lt,r12,Lend2 - - ld r10,s1_ptr,0 - ld r12,s1_ptr,4 - ld.d r8,s2_ptr,0 - subu size,size,10 - bcnd lt0,size,Lfin1 -/* Add blocks of 8 limbs until less than 8 limbs remain */ - align 8 -Loop1: subu size,size,8 - addu.cio r6,r10,r8 - ld r10,s1_ptr,8 - addu.cio r7,r12,r9 - ld r12,s1_ptr,12 - ld.d r8,s2_ptr,8 - st.d r6,res_ptr,0 - addu.cio r6,r10,r8 - ld r10,s1_ptr,16 - addu.cio r7,r12,r9 - ld r12,s1_ptr,20 - ld.d r8,s2_ptr,16 - st.d r6,res_ptr,8 - addu.cio r6,r10,r8 - ld r10,s1_ptr,24 - addu.cio r7,r12,r9 - ld r12,s1_ptr,28 - ld.d r8,s2_ptr,24 - st.d r6,res_ptr,16 - addu.cio r6,r10,r8 - ld r10,s1_ptr,32 - addu.cio r7,r12,r9 - ld r12,s1_ptr,36 - addu s1_ptr,s1_ptr,32 - ld.d r8,s2_ptr,32 - addu s2_ptr,s2_ptr,32 - st.d r6,res_ptr,24 - addu res_ptr,res_ptr,32 - bcnd ge0,size,Loop1 - -Lfin1: addu size,size,8-2 - bcnd lt0,size,Lend1 -/* Add blocks of 2 limbs until less than 2 limbs remain */ -Loope1: addu.cio r6,r10,r8 - ld r10,s1_ptr,8 - addu.cio r7,r12,r9 - ld r12,s1_ptr,12 - ld.d r8,s2_ptr,8 - st.d r6,res_ptr,0 - subu size,size,2 - addu s1_ptr,s1_ptr,8 - addu s2_ptr,s2_ptr,8 - addu res_ptr,res_ptr,8 - bcnd ge0,size,Loope1 -Lend1: addu.cio r6,r10,r8 - addu.cio r7,r12,r9 - st.d r6,res_ptr,0 - - bb0 0,size,Lret1 -/* Add last limb */ - ld r10,s1_ptr,8 - ld r8,s2_ptr,8 - addu.cio r6,r10,r8 - st r6,res_ptr,8 - -Lret1: jmp.n r1 - addu.ci r2,r0,r0 ; return carry-out from most sign. limb - -L1: xor r12,s1_ptr,res_ptr - bb1 2,r12,L2 -; ** V1b ** - or r12,r0,s2_ptr - or s2_ptr,r0,s1_ptr - or s1_ptr,r0,r12 - br L0 - -; ** V2 ** -/* If we come here, the alignment of s1_ptr and res_ptr as well as the - alignment of s2_ptr and res_ptr differ. Since there are only two ways - things can be aligned (that we care about) we now know that the alignment - of s1_ptr and s2_ptr are the same. */ - -L2: cmp r12,size,1 - bb1 eq,r12,Ljone - bb0 2,s1_ptr,L_v2 ; branch if s1_ptr is aligned -/* Add least significant limb separately to align res_ptr and s2_ptr */ - ld r10,s1_ptr,0 - addu s1_ptr,s1_ptr,4 - ld r8,s2_ptr,0 - addu s2_ptr,s2_ptr,4 - subu size,size,1 - addu.co r6,r10,r8 - st r6,res_ptr,0 - addu res_ptr,res_ptr,4 - -L_v2: subu size,size,8 - bcnd lt0,size,Lfin2 -/* Add blocks of 8 limbs until less than 8 limbs remain */ - align 8 -Loop2: subu size,size,8 - ld.d r8,s1_ptr,0 - ld.d r6,s2_ptr,0 - addu.cio r8,r8,r6 - st r8,res_ptr,0 - addu.cio r9,r9,r7 - st r9,res_ptr,4 - ld.d r8,s1_ptr,8 - ld.d r6,s2_ptr,8 - addu.cio r8,r8,r6 - st r8,res_ptr,8 - addu.cio r9,r9,r7 - st r9,res_ptr,12 - ld.d r8,s1_ptr,16 - ld.d r6,s2_ptr,16 - addu.cio r8,r8,r6 - st r8,res_ptr,16 - addu.cio r9,r9,r7 - st r9,res_ptr,20 - ld.d r8,s1_ptr,24 - ld.d r6,s2_ptr,24 - addu.cio r8,r8,r6 - st r8,res_ptr,24 - addu.cio r9,r9,r7 - st r9,res_ptr,28 - addu s1_ptr,s1_ptr,32 - addu s2_ptr,s2_ptr,32 - addu res_ptr,res_ptr,32 - bcnd ge0,size,Loop2 - -Lfin2: addu size,size,8-2 - bcnd lt0,size,Lend2 -Loope2: ld.d r8,s1_ptr,0 - ld.d r6,s2_ptr,0 - addu.cio r8,r8,r6 - st r8,res_ptr,0 - addu.cio r9,r9,r7 - st r9,res_ptr,4 - subu size,size,2 - addu s1_ptr,s1_ptr,8 - addu s2_ptr,s2_ptr,8 - addu res_ptr,res_ptr,8 - bcnd ge0,size,Loope2 -Lend2: bb0 0,size,Lret2 -/* Add last limb */ -Ljone: ld r10,s1_ptr,0 - ld r8,s2_ptr,0 - addu.cio r6,r10,r8 - st r6,res_ptr,0 - -Lret2: jmp.n r1 - addu.ci r2,r0,r0 ; return carry-out from most sign. limb diff --git a/sysdeps/m88k/m88110/addmul_1.s b/sysdeps/m88k/m88110/addmul_1.s deleted file mode 100644 index a9845efa38..0000000000 --- a/sysdeps/m88k/m88110/addmul_1.s +++ /dev/null @@ -1,61 +0,0 @@ -; mc88110 __mpn_addmul_1 -- Multiply a limb vector with a single limb and -; store the product in a second limb vector. - -; Copyright (C) 1996 Free Software Foundation, Inc. - -; This file is part of the GNU MP Library. - -; The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -; MA 02111-1307, USA. - - -; INPUT PARAMETERS -; res_ptr r2 -; s1_ptr r3 -; size r4 -; s2_limb r5 - - text - align 16 - global ___mpn_addmul_1 -___mpn_addmul_1: - lda r3,r3[r4] - lda r8,r2[r4] ; RES_PTR in r8 since r2 is retval - subu r4,r0,r4 - addu.co r2,r0,r0 ; r2 = cy = 0 - - ld r6,r3[r4] - addu r4,r4,1 - subu r8,r8,4 - bcnd.n eq0,r4,Lend - mulu.d r10,r6,r5 - -Loop: ld r7,r8[r4] - ld r6,r3[r4] - addu.cio r9,r11,r2 - addu.ci r2,r10,r0 - addu.co r9,r9,r7 - st r9,r8[r4] - addu r4,r4,1 - mulu.d r10,r6,r5 - bcnd ne0,r4,Loop - -Lend: ld r7,r8,0 - addu.cio r9,r11,r2 - addu.ci r2,r10,r0 - addu.co r9,r9,r7 - st r9,r8,0 - jmp.n r1 - addu.ci r2,r2,r0 diff --git a/sysdeps/m88k/m88110/mul_1.S b/sysdeps/m88k/m88110/mul_1.S deleted file mode 100644 index 7a07623865..0000000000 --- a/sysdeps/m88k/m88110/mul_1.S +++ /dev/null @@ -1,80 +0,0 @@ -; mc88110 __mpn_mul_1 -- Multiply a limb vector with a single limb and -; store the product in a second limb vector. - -; Copyright (C) 1992, 1994 Free Software Foundation, Inc. - -; This file is part of the GNU MP Library. - -; The GNU MP Library is free software; you can redistribute it and/or modify -; it under the terms of the GNU General Public License as published by -; the Free Software Foundation; either version 2, or (at your option) -; any later version. - -; The GNU MP 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 General Public License for more details. - -; You should have received a copy of the GNU General Public License -; along with the GNU MP Library; see the file COPYING. If not, write to -; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. - - -; INPUT PARAMETERS -; res_ptr r2 -; s1_ptr r3 -; size r4 -; s2_limb r5 - -#include "sysdep.h" - -ENTRY (__mpn_mul_1) - ld r6,r3,0 - sub r4,r0,r4 - sub r3,r3,r4 ; r3 is offset s1_ptr - sub r2,r2,r4 - sub r8,r2,8 ; r8 is offset res_ptr - mulu.d r10,r6,r5 - - addu r4,r4,1 - bcnd eq0,r4,Lend - addu.co r2,r0,0 ; clear cy_limb - -Loop: ld r6,r3[r4] - addu.cio r9,r11,r2 - or r2,r10,r0 ; could be avoided if unrolled - addu r4,r4,1 - mulu.d r10,r6,r5 - bcnd ne0,r4,Loop - st r9,r8[r4] - -Lend: addu.cio r9,r11,r2 - st r9,r8,4 - jmp.n r1 - addu.ci r2,r10,r0 - -; This is the Right Way to do this on '110. 4 cycles / 64-bit limb. -; ld.d r10, -; mulu.d -; addu.cio -; addu.cio -; st.d -; mulu.d ,r11,r5 -; ld.d r12, -; mulu.d ,r10,r5 -; addu.cio -; addu.cio -; st.d -; mulu.d -; ld.d r10, -; mulu.d -; addu.cio -; addu.cio -; st.d -; mulu.d -; ld.d r10, -; mulu.d -; addu.cio -; addu.cio -; st.d -; mulu.d diff --git a/sysdeps/m88k/m88110/mul_1.s b/sysdeps/m88k/m88110/mul_1.s deleted file mode 100644 index 103869dc42..0000000000 --- a/sysdeps/m88k/m88110/mul_1.s +++ /dev/null @@ -1,59 +0,0 @@ -; mc88110 __mpn_mul_1 -- Multiply a limb vector with a single limb and -; store the product in a second limb vector. - -; Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc. - -; This file is part of the GNU MP Library. - -; The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -; MA 02111-1307, USA. - - -; INPUT PARAMETERS -; res_ptr r2 -; s1_ptr r3 -; size r4 -; s2_limb r5 - - text - align 16 - global ___mpn_mul_1 -___mpn_mul_1: - ; Make S1_PTR and RES_PTR point at the end of their blocks - ; and negate SIZE. - lda r3,r3[r4] - lda r8,r2[r4] ; RES_PTR in r8 since r2 is retval - subu r4,r0,r4 - - addu.co r2,r0,r0 ; r2 = cy = 0 - - ld r6,r3[r4] - addu r4,r4,1 - mulu.d r10,r6,r5 - bcnd.n eq0,r4,Lend - subu r8,r8,8 - -Loop: ld r6,r3[r4] - addu.cio r9,r11,r2 - or r2,r10,r0 ; could be avoided if unrolled - addu r4,r4,1 - mulu.d r10,r6,r5 - bcnd.n ne0,r4,Loop - st r9,r8[r4] - -Lend: addu.cio r9,r11,r2 - st r9,r8,4 - jmp.n r1 - addu.ci r2,r10,r0 diff --git a/sysdeps/m88k/m88110/sub_n.S b/sysdeps/m88k/m88110/sub_n.S deleted file mode 100644 index a937882dbd..0000000000 --- a/sysdeps/m88k/m88110/sub_n.S +++ /dev/null @@ -1,276 +0,0 @@ -; mc88110 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and -; store difference in a third limb vector. - -; Copyright (C) 1995, 1996 Free Software Foundation, Inc. - -; This file is part of the GNU MP Library. - -; The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -; MA 02111-1307, USA. - - -; INPUT PARAMETERS -#define res_ptr r2 -#define s1_ptr r3 -#define s2_ptr r4 -#define size r5 - -#include "sysdep.h" - - text - align 16 - global C_SYMBOL_NAME(__mpn_sub_n) -C_SYMBOL_NAME(__mpn_sub_n): - subu.co r0,r0,r0 ; set cy flag - xor r12,s2_ptr,res_ptr - bb1 2,r12,L1 -; ** V1a ** -L0: bb0 2,res_ptr,L_v1 ; branch if res_ptr is aligned -/* Add least significant limb separately to align res_ptr and s2_ptr */ - ld r10,s1_ptr,0 - addu s1_ptr,s1_ptr,4 - ld r8,s2_ptr,0 - addu s2_ptr,s2_ptr,4 - subu size,size,1 - subu.co r6,r10,r8 - st r6,res_ptr,0 - addu res_ptr,res_ptr,4 -L_v1: cmp r12,size,2 - bb1 lt,r12,Lend2 - - ld r10,s1_ptr,0 - ld r12,s1_ptr,4 - ld.d r8,s2_ptr,0 - subu size,size,10 - bcnd lt0,size,Lfin1 -/* Add blocks of 8 limbs until less than 8 limbs remain */ - align 8 -Loop1: subu size,size,8 - subu.cio r6,r10,r8 - ld r10,s1_ptr,8 - subu.cio r7,r12,r9 - ld r12,s1_ptr,12 - ld.d r8,s2_ptr,8 - st.d r6,res_ptr,0 - subu.cio r6,r10,r8 - ld r10,s1_ptr,16 - subu.cio r7,r12,r9 - ld r12,s1_ptr,20 - ld.d r8,s2_ptr,16 - st.d r6,res_ptr,8 - subu.cio r6,r10,r8 - ld r10,s1_ptr,24 - subu.cio r7,r12,r9 - ld r12,s1_ptr,28 - ld.d r8,s2_ptr,24 - st.d r6,res_ptr,16 - subu.cio r6,r10,r8 - ld r10,s1_ptr,32 - subu.cio r7,r12,r9 - ld r12,s1_ptr,36 - addu s1_ptr,s1_ptr,32 - ld.d r8,s2_ptr,32 - addu s2_ptr,s2_ptr,32 - st.d r6,res_ptr,24 - addu res_ptr,res_ptr,32 - bcnd ge0,size,Loop1 - -Lfin1: addu size,size,8-2 - bcnd lt0,size,Lend1 -/* Add blocks of 2 limbs until less than 2 limbs remain */ -Loope1: subu.cio r6,r10,r8 - ld r10,s1_ptr,8 - subu.cio r7,r12,r9 - ld r12,s1_ptr,12 - ld.d r8,s2_ptr,8 - st.d r6,res_ptr,0 - subu size,size,2 - addu s1_ptr,s1_ptr,8 - addu s2_ptr,s2_ptr,8 - addu res_ptr,res_ptr,8 - bcnd ge0,size,Loope1 -Lend1: subu.cio r6,r10,r8 - subu.cio r7,r12,r9 - st.d r6,res_ptr,0 - - bb0 0,size,Lret1 -/* Add last limb */ - ld r10,s1_ptr,8 - ld r8,s2_ptr,8 - subu.cio r6,r10,r8 - st r6,res_ptr,8 - -Lret1: addu.ci r2,r0,r0 ; return carry-out from most sign. limb - jmp.n r1 - xor r2,r2,1 - -L1: xor r12,s1_ptr,res_ptr - bb1 2,r12,L2 -; ** V1b ** - bb0 2,res_ptr,L_v1b ; branch if res_ptr is aligned -/* Add least significant limb separately to align res_ptr and s1_ptr */ - ld r10,s2_ptr,0 - addu s2_ptr,s2_ptr,4 - ld r8,s1_ptr,0 - addu s1_ptr,s1_ptr,4 - subu size,size,1 - subu.co r6,r8,r10 - st r6,res_ptr,0 - addu res_ptr,res_ptr,4 -L_v1b: cmp r12,size,2 - bb1 lt,r12,Lend2 - - ld r10,s2_ptr,0 - ld r12,s2_ptr,4 - ld.d r8,s1_ptr,0 - subu size,size,10 - bcnd lt0,size,Lfin1b -/* Add blocks of 8 limbs until less than 8 limbs remain */ - align 8 -Loop1b: subu size,size,8 - subu.cio r6,r8,r10 - ld r10,s2_ptr,8 - subu.cio r7,r9,r12 - ld r12,s2_ptr,12 - ld.d r8,s1_ptr,8 - st.d r6,res_ptr,0 - subu.cio r6,r8,r10 - ld r10,s2_ptr,16 - subu.cio r7,r9,r12 - ld r12,s2_ptr,20 - ld.d r8,s1_ptr,16 - st.d r6,res_ptr,8 - subu.cio r6,r8,r10 - ld r10,s2_ptr,24 - subu.cio r7,r9,r12 - ld r12,s2_ptr,28 - ld.d r8,s1_ptr,24 - st.d r6,res_ptr,16 - subu.cio r6,r8,r10 - ld r10,s2_ptr,32 - subu.cio r7,r9,r12 - ld r12,s2_ptr,36 - addu s2_ptr,s2_ptr,32 - ld.d r8,s1_ptr,32 - addu s1_ptr,s1_ptr,32 - st.d r6,res_ptr,24 - addu res_ptr,res_ptr,32 - bcnd ge0,size,Loop1b - -Lfin1b: addu size,size,8-2 - bcnd lt0,size,Lend1b -/* Add blocks of 2 limbs until less than 2 limbs remain */ -Loope1b:subu.cio r6,r8,r10 - ld r10,s2_ptr,8 - subu.cio r7,r9,r12 - ld r12,s2_ptr,12 - ld.d r8,s1_ptr,8 - st.d r6,res_ptr,0 - subu size,size,2 - addu s1_ptr,s1_ptr,8 - addu s2_ptr,s2_ptr,8 - addu res_ptr,res_ptr,8 - bcnd ge0,size,Loope1b -Lend1b: subu.cio r6,r8,r10 - subu.cio r7,r9,r12 - st.d r6,res_ptr,0 - - bb0 0,size,Lret1b -/* Add last limb */ - ld r10,s2_ptr,8 - ld r8,s1_ptr,8 - subu.cio r6,r8,r10 - st r6,res_ptr,8 - -Lret1b: addu.ci r2,r0,r0 ; return carry-out from most sign. limb - jmp.n r1 - xor r2,r2,1 - -; ** V2 ** -/* If we come here, the alignment of s1_ptr and res_ptr as well as the - alignment of s2_ptr and res_ptr differ. Since there are only two ways - things can be aligned (that we care about) we now know that the alignment - of s1_ptr and s2_ptr are the same. */ - -L2: cmp r12,size,1 - bb1 eq,r12,Ljone - bb0 2,s1_ptr,L_v2 ; branch if s1_ptr is aligned -/* Add least significant limb separately to align res_ptr and s2_ptr */ - ld r10,s1_ptr,0 - addu s1_ptr,s1_ptr,4 - ld r8,s2_ptr,0 - addu s2_ptr,s2_ptr,4 - subu size,size,1 - subu.co r6,r10,r8 - st r6,res_ptr,0 - addu res_ptr,res_ptr,4 - -L_v2: subu size,size,8 - bcnd lt0,size,Lfin2 -/* Add blocks of 8 limbs until less than 8 limbs remain */ - align 8 -Loop2: subu size,size,8 - ld.d r8,s1_ptr,0 - ld.d r6,s2_ptr,0 - subu.cio r8,r8,r6 - st r8,res_ptr,0 - subu.cio r9,r9,r7 - st r9,res_ptr,4 - ld.d r8,s1_ptr,8 - ld.d r6,s2_ptr,8 - subu.cio r8,r8,r6 - st r8,res_ptr,8 - subu.cio r9,r9,r7 - st r9,res_ptr,12 - ld.d r8,s1_ptr,16 - ld.d r6,s2_ptr,16 - subu.cio r8,r8,r6 - st r8,res_ptr,16 - subu.cio r9,r9,r7 - st r9,res_ptr,20 - ld.d r8,s1_ptr,24 - ld.d r6,s2_ptr,24 - subu.cio r8,r8,r6 - st r8,res_ptr,24 - subu.cio r9,r9,r7 - st r9,res_ptr,28 - addu s1_ptr,s1_ptr,32 - addu s2_ptr,s2_ptr,32 - addu res_ptr,res_ptr,32 - bcnd ge0,size,Loop2 - -Lfin2: addu size,size,8-2 - bcnd lt0,size,Lend2 -Loope2: ld.d r8,s1_ptr,0 - ld.d r6,s2_ptr,0 - subu.cio r8,r8,r6 - st r8,res_ptr,0 - subu.cio r9,r9,r7 - st r9,res_ptr,4 - subu size,size,2 - addu s1_ptr,s1_ptr,8 - addu s2_ptr,s2_ptr,8 - addu res_ptr,res_ptr,8 - bcnd ge0,size,Loope2 -Lend2: bb0 0,size,Lret2 -/* Add last limb */ -Ljone: ld r10,s1_ptr,0 - ld r8,s2_ptr,0 - subu.cio r6,r10,r8 - st r6,res_ptr,0 - -Lret2: addu.ci r2,r0,r0 ; return carry-out from most sign. limb - jmp.n r1 - xor r2,r2,1 diff --git a/sysdeps/m88k/mul_1.s b/sysdeps/m88k/mul_1.s deleted file mode 100644 index 7aa6d64064..0000000000 --- a/sysdeps/m88k/mul_1.s +++ /dev/null @@ -1,127 +0,0 @@ -; mc88100 __mpn_mul_1 -- Multiply a limb vector with a single limb and -; store the product in a second limb vector. - -; Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc. - -; This file is part of the GNU MP Library. - -; The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -; MA 02111-1307, USA. - - -; INPUT PARAMETERS -; res_ptr r2 -; s1_ptr r3 -; size r4 -; s2_limb r5 - -; Common overhead is about 11 cycles/invocation. - -; The speed for S2_LIMB >= 0x10000 is approximately 21 cycles/limb. (The -; pipeline stalls 2 cycles due to WB contention.) - -; The speed for S2_LIMB < 0x10000 is approximately 16 cycles/limb. (The -; pipeline stalls 2 cycles due to WB contention and 1 cycle due to latency.) - -; To enhance speed: -; 1. Unroll main loop 4-8 times. -; 2. Schedule code to avoid WB contention. It might be tempting to move the -; ld instruction in the loops down to save 2 cycles (less WB contention), -; but that looses because the ultimate value will be read from outside -; the allocated space. But if we handle the ultimate multiplication in -; the tail, we can do this. -; 3. Make the multiplication with less instructions. I think the code for -; (S2_LIMB >= 0x10000) is not minimal. -; With these techniques the (S2_LIMB >= 0x10000) case would run in 17 or -; less cycles/limb; the (S2_LIMB < 0x10000) case would run in 11 -; cycles/limb. (Assuming infinite unrolling.) - - text - align 16 - global ___mpn_mul_1 -___mpn_mul_1: - - ; Make S1_PTR and RES_PTR point at the end of their blocks - ; and negate SIZE. - lda r3,r3[r4] - lda r6,r2[r4] ; RES_PTR in r6 since r2 is retval - subu r4,r0,r4 - - addu.co r2,r0,r0 ; r2 = cy = 0 - ld r9,r3[r4] - mask r7,r5,0xffff ; r7 = lo(S2_LIMB) - extu r8,r5,16 ; r8 = hi(S2_LIMB) - bcnd.n eq0,r8,Lsmall ; jump if (hi(S2_LIMB) == 0) - subu r6,r6,4 - -; General code for any value of S2_LIMB. - - ; Make a stack frame and save r25 and r26 - subu r31,r31,16 - st.d r25,r31,8 - - ; Enter the loop in the middle - br.n L1 - addu r4,r4,1 - -Loop: ld r9,r3[r4] - st r26,r6[r4] -; bcnd ne0,r0,0 ; bubble - addu r4,r4,1 -L1: mul r26,r9,r5 ; low word of product mul_1 WB ld - mask r12,r9,0xffff ; r12 = lo(s1_limb) mask_1 - mul r11,r12,r7 ; r11 = prod_0 mul_2 WB mask_1 - mul r10,r12,r8 ; r10 = prod_1a mul_3 - extu r13,r9,16 ; r13 = hi(s1_limb) extu_1 WB mul_1 - mul r12,r13,r7 ; r12 = prod_1b mul_4 WB extu_1 - mul r25,r13,r8 ; r25 = prod_2 mul_5 WB mul_2 - extu r11,r11,16 ; r11 = hi(prod_0) extu_2 WB mul_3 - addu r10,r10,r11 ; addu_1 WB extu_2 -; bcnd ne0,r0,0 ; bubble WB addu_1 - addu.co r10,r10,r12 ; WB mul_4 - mask.u r10,r10,0xffff ; move the 16 most significant bits... - addu.ci r10,r10,r0 ; ...to the low half of the word... - rot r10,r10,16 ; ...and put carry in pos 16. - addu.co r26,r26,r2 ; add old carry limb - bcnd.n ne0,r4,Loop - addu.ci r2,r25,r10 ; compute new carry limb - - st r26,r6[r4] - ld.d r25,r31,8 - jmp.n r1 - addu r31,r31,16 - -; Fast code for S2_LIMB < 0x10000 -Lsmall: - ; Enter the loop in the middle - br.n SL1 - addu r4,r4,1 - -SLoop: ld r9,r3[r4] ; - st r8,r6[r4] ; - addu r4,r4,1 ; -SL1: mul r8,r9,r5 ; low word of product - mask r12,r9,0xffff ; r12 = lo(s1_limb) - extu r13,r9,16 ; r13 = hi(s1_limb) - mul r11,r12,r7 ; r11 = prod_0 - mul r12,r13,r7 ; r12 = prod_1b - addu.cio r8,r8,r2 ; add old carry limb - extu r10,r11,16 ; r11 = hi(prod_0) - addu r10,r10,r12 ; - bcnd.n ne0,r4,SLoop - extu r2,r10,16 ; r2 = new carry limb - - jmp.n r1 - st r8,r6[r4] diff --git a/sysdeps/m88k/sub_n.s b/sysdeps/m88k/sub_n.s deleted file mode 100644 index 7616dc46b4..0000000000 --- a/sysdeps/m88k/sub_n.s +++ /dev/null @@ -1,106 +0,0 @@ -; mc88100 __mpn_sub -- Subtract two limb vectors of the same length > 0 and -; store difference in a third limb vector. - -; Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc. - -; This file is part of the GNU MP Library. - -; The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -; MA 02111-1307, USA. - - -; INPUT PARAMETERS -; res_ptr r2 -; s1_ptr r3 -; s2_ptr r4 -; size r5 - -; This code has been optimized to run one instruction per clock, avoiding -; load stalls and writeback contention. As a result, the instruction -; order is not always natural. - -; The speed is about 4.6 clocks/limb + 18 clocks/limb-vector on an 88100, -; but on the 88110, it seems to run much slower, 6.6 clocks/limb. - - text - align 16 - global ___mpn_sub_n -___mpn_sub_n: - ld r6,r3,0 ; read first limb from s1_ptr - extu r10,r5,3 - ld r7,r4,0 ; read first limb from s2_ptr - - subu r5,r0,r5 - mak r5,r5,3<4> - bcnd.n eq0,r5,Lzero - subu.co r0,r0,r0 ; initialize carry - - or r12,r0,lo16(Lbase) - or.u r12,r12,hi16(Lbase) - addu r12,r12,r5 ; r12 is address for entering in loop - - extu r5,r5,2 ; divide by 4 - subu r2,r2,r5 ; adjust res_ptr - subu r3,r3,r5 ; adjust s1_ptr - subu r4,r4,r5 ; adjust s2_ptr - - or r8,r6,r0 - - jmp.n r12 - or r9,r7,r0 - -Loop: addu r3,r3,32 - st r8,r2,28 - addu r4,r4,32 - ld r6,r3,0 - addu r2,r2,32 - ld r7,r4,0 -Lzero: subu r10,r10,1 ; subtract 0 + 8r limbs (adj loop cnt) -Lbase: ld r8,r3,4 - subu.cio r6,r6,r7 - ld r9,r4,4 - st r6,r2,0 - ld r6,r3,8 ; subtract 7 + 8r limbs - subu.cio r8,r8,r9 - ld r7,r4,8 - st r8,r2,4 - ld r8,r3,12 ; subtract 6 + 8r limbs - subu.cio r6,r6,r7 - ld r9,r4,12 - st r6,r2,8 - ld r6,r3,16 ; subtract 5 + 8r limbs - subu.cio r8,r8,r9 - ld r7,r4,16 - st r8,r2,12 - ld r8,r3,20 ; subtract 4 + 8r limbs - subu.cio r6,r6,r7 - ld r9,r4,20 - st r6,r2,16 - ld r6,r3,24 ; subtract 3 + 8r limbs - subu.cio r8,r8,r9 - ld r7,r4,24 - st r8,r2,20 - ld r8,r3,28 ; subtract 2 + 8r limbs - subu.cio r6,r6,r7 - ld r9,r4,28 - st r6,r2,24 - bcnd.n ne0,r10,Loop ; subtract 1 + 8r limbs - subu.cio r8,r8,r9 - - st r8,r2,28 ; store most significant limb - - addu.ci r2,r0,r0 ; return carry-out from most sign. limb - jmp.n r1 - xor r2,r2,1 diff --git a/sysdeps/mach/alpha/machine-lock.h b/sysdeps/mach/alpha/machine-lock.h deleted file mode 100644 index bd27d2a51f..0000000000 --- a/sysdeps/mach/alpha/machine-lock.h +++ /dev/null @@ -1,80 +0,0 @@ -/* Machine-specific definition for spin locks. Alpha version. - Copyright (C) 1994, 1997, 2007 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 _MACHINE_LOCK_H -#define _MACHINE_LOCK_H - -/* The type of a spin lock variable. */ - -typedef __volatile long int __spin_lock_t; - -/* Value to initialize `__spin_lock_t' variables to. */ - -#define __SPIN_LOCK_INITIALIZER 0L - - -#ifndef _EXTERN_INLINE -#define _EXTERN_INLINE __extern_inline -#endif - -/* Unlock LOCK. */ - -_EXTERN_INLINE void -__spin_unlock (__spin_lock_t *__lock) -{ - __asm__ __volatile__ ("mb; stq $31, %0; mb" - : "=m" (__lock)); -} - -/* Try to lock LOCK; return nonzero if we locked it, zero if another has. */ - -_EXTERN_INLINE int -__spin_try_lock (register __spin_lock_t *__lock) -{ - register long int __rtn, __tmp; - - do - { - __asm__ __volatile__ ("mb; ldq_l %0,%1" /* Load lock value into TMP. */ - : "=r" (__tmp) : "m" (*__lock)); - __rtn = 2; /* Load locked value into RTN. */ - if (__tmp) - /* The lock is already taken. */ - return 0; - - /* The lock is not taken; try to get it now. */ - __asm__ __volatile__ ("stq_c %0,%1" - : "=r" (__rtn), "=m" (*__lock) - : "0" (__rtn), "1" (*__lock)); - /* RTN is clear if stq_c was interrupted; loop to try the lock again. */ - } while (! __rtn); - /* RTN is now nonzero; we have the lock. */ - return __rtn; -} - -/* Return nonzero if LOCK is locked. */ - -_EXTERN_INLINE int -__spin_lock_locked (__spin_lock_t *__lock) -{ - return *__lock != 0; -} - - -#endif /* machine-lock.h */ diff --git a/sysdeps/mach/alpha/machine-sp.h b/sysdeps/mach/alpha/machine-sp.h deleted file mode 100644 index e6df63c9ac..0000000000 --- a/sysdeps/mach/alpha/machine-sp.h +++ /dev/null @@ -1,36 +0,0 @@ -/* Machine-specific function to return the stack pointer. Alpha version. - Copyright (C) 1994, 1997, 2007 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 _MACHINE_SP_H -#define _MACHINE_SP_H - -/* Return the current stack pointer. */ - -#ifndef _EXTERN_INLINE -#define _EXTERN_INLINE __extern_inline -#endif - -_EXTERN_INLINE void * -__thread_stack_pointer (void) -{ - register void *__sp__ __asm__ ("$30"); - return __sp__; -} - -#endif /* machine-sp.h */ diff --git a/sysdeps/mach/alpha/setfpucw.c b/sysdeps/mach/alpha/setfpucw.c deleted file mode 100644 index a2887c8dfb..0000000000 --- a/sysdeps/mach/alpha/setfpucw.c +++ /dev/null @@ -1,69 +0,0 @@ -/* Set FP exception mask and rounding mode. Mach/Alpha version. - Copyright (C) 2002 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. */ - -#include - - -#define FPCR_DYN_SHIFT 58 /* first dynamic rounding mode bit */ -#define FPCR_DYN_CHOPPED (0x0UL << FPCR_DYN_SHIFT) /* towards 0 */ -#define FPCR_DYN_MINUS (0x1UL << FPCR_DYN_SHIFT) /* towards -INF */ -#define FPCR_DYN_NORMAL (0x2UL << FPCR_DYN_SHIFT) /* towards nearest */ -#define FPCR_DYN_PLUS (0x3UL << FPCR_DYN_SHIFT) /* towards +INF */ -#define FPCR_DYN_MASK (0x3UL << FPCR_DYN_SHIFT) - -static inline unsigned long -rdfpcr (void) -{ - unsigned long fpcr; - asm ("excb; mf_fpcr %0" : "=f"(fpcr)); - return fpcr; -} - -static inline void -wrfpcr (unsigned long fpcr) -{ - asm volatile ("mt_fpcr %0; excb" : : "f"(fpcr)); -} - - -void -__setfpucw (fpu_control_t fpu_control) -{ - unsigned long fpcr; - - if (!fpu_control) - fpu_control = _FPU_DEFAULT; - - /* first, set dynamic rounding mode: */ - - fpcr = rdfpcr(); - fpcr &= ~FPCR_DYN_MASK; - switch (fpu_control & 0xc00) - { - case _FPU_RC_NEAREST: fpcr |= FPCR_DYN_NORMAL; break; - case _FPU_RC_DOWN: fpcr |= FPCR_DYN_MINUS; break; - case _FPU_RC_UP: fpcr |= FPCR_DYN_PLUS; break; - case _FPU_RC_ZERO: fpcr |= FPCR_DYN_CHOPPED; break; - } - wrfpcr(fpcr); - - /* XXX trap bits? */ - - __fpu_control = fpu_control; /* update global copy */ -} diff --git a/sysdeps/mach/alpha/syscall.S b/sysdeps/mach/alpha/syscall.S deleted file mode 100644 index 15fc5b75b7..0000000000 --- a/sysdeps/mach/alpha/syscall.S +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (C) 1994,97,2002 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. */ - -#include - -ENTRY (syscall) - mov a0, v0 /* Load system call number from first arg. */ - mov a1, a0 - mov a2, a1 - mov a3, a2 - mov a4, a3 - mov a5, a4 - /* Load the remaining possible args (up to 11) from the stack. */ - ldq a5,0(sp) - ldq t0,8(sp) - ldq t1,16(sp) - ldq t2,24(sp) - ldq t3,32(sp) - ldq t4,40(sp) - callsys - ret -END (syscall) diff --git a/sysdeps/mach/alpha/sysdep.h b/sysdeps/mach/alpha/sysdep.h deleted file mode 100644 index 84e21c8d5d..0000000000 --- a/sysdeps/mach/alpha/sysdep.h +++ /dev/null @@ -1,59 +0,0 @@ -/* Copyright (C) 1994,97,2002 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. */ - -#define MOVE(x,y) mov x, y - -#define LOSE asm volatile ("call_pal 0") /* halt */ - -#define START_MACHDEP \ - asm ("_start: mov $30, $16\n" /* Put initial SP in a0. */ \ - " br $27, 1f\n" /* Load GP from PC. */ \ - "1: ldgp $29, 0($27)\n" \ - " jmp $26, _start0"); /* Jump to _start0; don't return. */ -#define START_ARGS char **sparg -#define SNARF_ARGS(argc, argv, envp) \ - (envp = &(argv = &sparg[1])[(argc = *(int *) sparg) + 1]) - -#define CALL_WITH_SP(fn, sp) \ - ({ register long int __fn = (long int) fn, __sp = (long int) sp; \ - asm volatile ("mov %0,$30; jmp $31, (%1); ldgp $29, 0(%1)" \ - : : "r" (__sp), "r" (__fn)); }) - -#define STACK_GROWTH_DOWN - -#define RETURN_TO(sp, pc, retval) \ - asm volatile ("mov %0,$30; jmp $31, (%1); mov %2,$0" \ - : : "r" (sp), "r" (pc), "r" ((long int) (retval))); - -#define ALIGN 3 -#include - -/* Alpha needs the .ent and .frame magic that the generic version lacks. */ -#undef ENTRY -#define ENTRY(name) \ - .globl name; \ - .align 3; \ - .ent name, 0; \ - name##: \ - .frame sp, 0, ra - -#include -#undef at -#define at 28 -#define AT $28 -#define fp s6 diff --git a/sysdeps/mach/alpha/thread_state.h b/sysdeps/mach/alpha/thread_state.h deleted file mode 100644 index 0c9527bd26..0000000000 --- a/sysdeps/mach/alpha/thread_state.h +++ /dev/null @@ -1,39 +0,0 @@ -/* Mach thread state definitions for machine-independent code. Alpha version. - Copyright (C) 1994, 1997 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. */ - -#include - -#define MACHINE_THREAD_STATE_FLAVOR ALPHA_THREAD_STATE -#define MACHINE_THREAD_STATE_COUNT ALPHA_THREAD_STATE_COUNT - -#define machine_thread_state alpha_thread_state - -#define PC pc -#define SP r30 -#define SYSRETURN r0 - -struct machine_thread_all_state - { - int set; /* Mask of bits (1 << FLAVOR). */ - struct alpha_thread_state basic; - struct alpha_exc_state exc; - struct alpha_float_state fpu; - }; - -#include diff --git a/sysdeps/mach/hppa/machine-lock.h b/sysdeps/mach/hppa/machine-lock.h deleted file mode 100644 index 8c71d40a5a..0000000000 --- a/sysdeps/mach/hppa/machine-lock.h +++ /dev/null @@ -1,63 +0,0 @@ -/* Machine-specific definition for spin locks. HPPA version. - Copyright (C) 1995, 1997 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 _MACHINE_LOCK_H -#define _MACHINE_LOCK_H - -/* The type of a spin lock variable. */ - -typedef __volatile int __spin_lock_t __attribute__ ((__aligned__ (16))); - -/* Value to initialize `__spin_lock_t' variables to. */ - -#define __SPIN_LOCK_INITIALIZER -1 - - -#ifndef _EXTERN_INLINE -#define _EXTERN_INLINE extern __inline -#endif - -/* Unlock LOCK. */ - -_EXTERN_INLINE void -__spin_unlock (__spin_lock_t *__lock) -{ - *__lock = -1; -} - -/* Try to lock LOCK; return nonzero if we locked it, zero if another has. */ - -_EXTERN_INLINE int -__spin_try_lock (__spin_lock_t *__lock) -{ - register int __result; - __asm__ __volatile__ ("ldcws %0, %1" : "=m" (*__lock), "=r" (__result)); - return __result != 0; -} - -/* Return nonzero if LOCK is locked. */ - -_EXTERN_INLINE int -__spin_lock_locked (__spin_lock_t *__lock) -{ - return *__lock == 0; -} - - -#endif /* machine-lock.h */ diff --git a/sysdeps/mach/hurd/alpha/bits/sigcontext.h b/sysdeps/mach/hurd/alpha/bits/sigcontext.h deleted file mode 100644 index 4f13a2c9b2..0000000000 --- a/sysdeps/mach/hurd/alpha/bits/sigcontext.h +++ /dev/null @@ -1,73 +0,0 @@ -/* Machine-dependent signal context structure for GNU Hurd. Alpha version. - Copyright (C) 1994,97,2001 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. */ - -#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H -# error "Never use directly; include instead." -#endif - -#ifndef sc_alpha_thread_state - -/* Signal handlers are actually called: - void handler (int sig, int code, struct sigcontext *scp); */ - -/* State of this thread when the signal was taken. */ -struct sigcontext - { - /* These first members are machine-independent. */ - - long int sc_onstack; /* Nonzero if running on sigstack. */ - __sigset_t sc_mask; /* Blocked signals to restore. */ - - /* MiG reply port this thread is using. */ - unsigned long int sc_reply_port; - - /* Port this thread is doing an interruptible RPC on. */ - unsigned long int sc_intr_port; - - /* Error code associated with this signal (interpreted as `error_t'). */ - int sc_error; - - /* All following members are machine-dependent. The rest of this - structure is written to be laid out identically to: - { - struct alpha_thread_state basic; - struct alpha_exc_state exc; - struct alpha_float_state fpu; - } - trampoline.c knows this, so it must be changed if this changes. */ - -#define sc_alpha_thread_state sc_regs /* Beginning of correspondence. */ - long int sc_regs[31]; /* General registers $0..$30. */ - long int sc_pc; /* Program counter. */ - - /* struct alpha_exc_state */ -#define sc_alpha_exc_state sc_badvaddr - unsigned long int sc_badvaddr; - unsigned int sc_cause; /* Machine-level trap code. */ -#define SC_CAUSE_SET_SSTEP 1 - int sc_used_fpa; /* Nonzero if FPU was used. */ - - /* struct alpha_float_state - This is only filled in if sc_used_fpa is nonzero. */ -#define sc_alpha_float_state sc_fpregs - double sc_fpregs[31]; /* Floating point registers $f0..$f30. */ - long int sc_fpcsr; /* Floating point control/status register. */ - }; - -#endif /* sc_alpha_thread_state */ diff --git a/sysdeps/mach/hurd/alpha/exc2signal.c b/sysdeps/mach/hurd/alpha/exc2signal.c deleted file mode 100644 index 5f3fbbbbb1..0000000000 --- a/sysdeps/mach/hurd/alpha/exc2signal.c +++ /dev/null @@ -1,75 +0,0 @@ -/* Translate Mach exception codes into signal numbers. Alpha version. - Copyright (C) 1994,97,2002 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. */ - -#include -#include -#include - -/* Translate the Mach exception codes, as received in an `exception_raise' RPC, - into a signal number and signal subcode. */ - -void -_hurd_exception2signal (struct hurd_signal_detail *detail, int *signo) -{ - detail->error = 0; - - switch (detail->exc) - { - default: - *signo = SIGIOT; - detail->code = detail->exc; - break; - - case EXC_BAD_ACCESS: - if (detail->exc_code == KERN_PROTECTION_FAILURE) - *signo = SIGSEGV; - else - *signo = SIGBUS; - detail->code = detail->exc_subcode; - detail->error = detail->exc_code; - break; - - case EXC_BAD_INSTRUCTION: - *signo = SIGILL; - detail->code = detail->exc_code; - break; - - case EXC_ARITHMETIC: - *signo = SIGFPE; - detail->code = detail->exc_code; - break; - break; - - case EXC_EMULATION: - /* 3.0 doesn't give this one, why, I don't know. */ - *signo = SIGEMT; - detail->code = detail->exc_code; - break; - - case EXC_SOFTWARE: - *signo = SIGEMT; - detail->code = detail->exc_code; - break; - - case EXC_BREAKPOINT: - *signo = SIGTRAP; - detail->code = detail->exc_code; - break; - } -} diff --git a/sysdeps/mach/hurd/alpha/init-first.c b/sysdeps/mach/hurd/alpha/init-first.c deleted file mode 100644 index 6e55225890..0000000000 --- a/sysdeps/mach/hurd/alpha/init-first.c +++ /dev/null @@ -1,302 +0,0 @@ -/* Initialization code run first thing by the ELF startup code. Alpha/Hurd. - Copyright (C) 1995,96,97,98,99,2000,01,02,03 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. */ - -#include -#include -#include -#include -#include -#include -#include -#include "hurdstartup.h" -#include "hurdmalloc.h" /* XXX */ - -extern void __mach_init (void); -extern void __init_misc (int, char **, char **); -#ifdef USE_NONOPTION_FLAGS -extern void __getopt_clean_environment (char **); -#endif -#ifndef SHARED -extern void _dl_non_dynamic_init (void) internal_function; -#endif -extern void __libc_global_ctors (void); - -unsigned int __hurd_threadvar_max; -unsigned long int __hurd_threadvar_stack_offset; -unsigned long int __hurd_threadvar_stack_mask; - -#ifndef SHARED -int __libc_enable_secure; -#endif -int __libc_multiple_libcs attribute_hidden = 1; - -extern int __libc_argc attribute_hidden; -extern char **__libc_argv attribute_hidden; -extern char **_dl_argv; - -void *(*_cthread_init_routine) (void); /* Returns new SP to use. */ -void (*_cthread_exit_routine) (int status) __attribute__ ((__noreturn__)); - -/* Things that want to be run before _hurd_init or much anything else. - Importantly, these are called before anything tries to use malloc. */ -DEFINE_HOOK (_hurd_preinit_hook, (void)); - - -/* We call this once the Hurd magic is all set up and we are ready to be a - Posixoid program. This does the same things the generic version does. */ -static void -posixland_init (int argc, char **argv, char **envp) -{ - __libc_argc = argc; - __libc_argv = argv; - __environ = envp; - -#ifndef SHARED - _dl_non_dynamic_init (); -#endif - __init_misc (argc, argv, envp); - -#ifdef USE_NONOPTION_FLAGS - /* This is a hack to make the special getopt in GNU libc working. */ - __getopt_clean_environment (envp); -#endif - -#ifdef SHARED - __libc_global_ctors (); -#endif -} - - -static void -init1 (intptr_t *data) -{ - int argc = (intptr_t) *data; - char **argv = (char **) &data[1]; - char **envp = &argv[argc + 1]; - struct hurd_startup_data *d; - - while (*envp) - ++envp; - d = (void *) ++envp; - - /* If we are the bootstrap task started by the kernel, - then after the environment pointers there is no Hurd - data block; the argument strings start there. */ - /* OSF Mach starts the bootstrap task with argc == 0. - XXX This fails if a non-bootstrap task gets started - with argc == 0. */ - if (argc && (void *) d != argv[0]) - { - _hurd_init_dtable = d->dtable; - _hurd_init_dtablesize = d->dtablesize; - - { - /* Check if the stack we are now on is different from - the one described by _hurd_stack_{base,size}. */ - - char dummy; - const vm_address_t newsp = (vm_address_t) &dummy; - - if (d->stack_size != 0 && (newsp < d->stack_base || - newsp - d->stack_base > d->stack_size)) - /* The new stack pointer does not intersect with the - stack the exec server set up for us, so free that stack. */ - __vm_deallocate (__mach_task_self (), d->stack_base, d->stack_size); - } - } - - if ((void *) d != argv[0] && (d->portarray || d->intarray)) - /* Initialize library data structures, start signal processing, etc. */ - _hurd_init (d->flags, argv, - d->portarray, d->portarraysize, - d->intarray, d->intarraysize); - -#ifndef SHARED - __libc_enable_secure = d->flags & EXEC_SECURE; -#endif -} - - -static inline void -init (intptr_t *data) -{ - int argc = *data; - char **argv = (void *) (data + 1); - char **envp = &argv[argc + 1]; - struct hurd_startup_data *d; - unsigned long int threadvars[_HURD_THREADVAR_MAX]; - - /* Provide temporary storage for thread-specific variables on the - startup stack so the cthreads initialization code can use them - for malloc et al, or so we can use malloc below for the real - threadvars array. */ - memset (threadvars, 0, sizeof threadvars); - __hurd_threadvar_stack_offset = (unsigned long int) threadvars; - - /* Since the cthreads initialization code uses malloc, and the - malloc initialization code needs to get at the environment, make - sure we can find it. We'll need to do this again later on since - switching stacks changes the location where the environment is - stored. */ - __environ = envp; - - while (*envp) - ++envp; - d = (void *) ++envp; - - /* The user might have defined a value for this, to get more variables. - Otherwise it will be zero on startup. We must make sure it is set - properly before before cthreads initialization, so cthreads can know - how much space to leave for thread variables. */ - if (__hurd_threadvar_max < _HURD_THREADVAR_MAX) - __hurd_threadvar_max = _HURD_THREADVAR_MAX; - - - /* After possibly switching stacks, call `init1' (above) with the user - code as the return address, and the argument data immediately above - that on the stack. */ - - if (_cthread_init_routine) - { - /* Initialize cthreads, which will allocate us a new stack to run on. */ - void *newsp = (*_cthread_init_routine) (); - struct hurd_startup_data *od; - - void switch_stacks (void); - - /* Copy per-thread variables from that temporary - area onto the new cthread stack. */ - memcpy (__hurd_threadvar_location_from_sp (0, newsp), - threadvars, sizeof threadvars); - - /* Copy the argdata from the old stack to the new one. */ - newsp = memcpy (newsp - ((char *) &d[1] - (char *) data), data, - (char *) d - (char *) data); - -#ifdef SHARED - /* And readjust the dynamic linker's idea of where the argument - vector lives. */ - assert (_dl_argv == argv); - _dl_argv = (void *) ((int *) newsp + 1); -#endif - - /* Set up the Hurd startup data block immediately following - the argument and environment pointers on the new stack. */ - od = (newsp + ((char *) d - (char *) data)); - if ((void *) argv[0] == d) - /* We were started up by the kernel with arguments on the stack. - There is no Hurd startup data, so zero the block. */ - memset (od, 0, sizeof *od); - else - /* Copy the Hurd startup data block to the new stack. */ - *od = *d; - - /* - Force NEWSP into sp and &init1 into pv, then branch to pv (call init1). - */ - asm volatile ("lda $30,0(%0); lda $27,0(%1); jsr $26,($27)" - : : "r" (newsp), "r" (&init1)); - } - else - { - /* We are not using cthreads, so we will have just a single allocated - area for the per-thread variables of the main user thread. */ - unsigned long int *array; - unsigned int i; - - array = malloc (__hurd_threadvar_max * sizeof (unsigned long int)); - if (array == NULL) - __libc_fatal ("Can't allocate single-threaded thread variables."); - - /* Copy per-thread variables from the temporary array into the - newly malloc'd space. */ - memcpy (array, threadvars, sizeof threadvars); - __hurd_threadvar_stack_offset = (unsigned long int) array; - for (i = _HURD_THREADVAR_MAX; i < __hurd_threadvar_max; ++i) - array[i] = 0; - - init1 (data); - } -} - - -/* Do the first essential initializations that must precede all else. */ -static inline void -first_init (void) -{ - /* Initialize data structures so we can do RPCs. */ - __mach_init (); - - RUN_HOOK (_hurd_preinit_hook, ()); -} - -#ifdef SHARED -/* This function is called specially by the dynamic linker to do early - initialization of the shared C library before normal initializers - expecting a Posixoid environment can run. It gets called with the - stack set up just as the user will see it, so it can switch stacks. */ - -void -_dl_init_first (intptr_t argc, ...) -{ - first_init (); - - init (&argc); -} -#endif - - -#ifdef SHARED -/* The regular posixland initialization is what goes into libc's - normal initializer. */ -/* NOTE! The linker notices the magical name `_init' and sets the DT_INIT - pointer in the dynamic section based solely on that. It is convention - for this function to be in the `.init' section, but the symbol name is - the only thing that really matters!! */ -strong_alias (posixland_init, _init); - -void -__libc_init_first (int argc, char **argv, char **envp) -{ - /* Everything was done in the shared library initializer, _init. */ -} -#else -strong_alias (posixland_init, __libc_init_first); - - -void -_hurd_stack_setup (volatile intptr_t argc, ...) -{ - first_init (); - - _hurd_startup ((void **) &argc, &init); -} -#endif - - -/* This function is defined here so that if this file ever gets into - ld.so we will get a link error. Having this file silently included - in ld.so causes disaster, because the _init definition above will - cause ld.so to gain an init function, which is not a cool thing. */ - -void -_dl_start (void) -{ - abort (); -} diff --git a/sysdeps/mach/hurd/alpha/intr-msg.h b/sysdeps/mach/hurd/alpha/intr-msg.h deleted file mode 100644 index 4f172124e3..0000000000 --- a/sysdeps/mach/hurd/alpha/intr-msg.h +++ /dev/null @@ -1,100 +0,0 @@ -/* Machine-dependent details of interruptible RPC messaging. Alpha version. - Copyright (C) 2002 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. */ - -#define INTR_MSG_TRAP(msg, option, send_size, rcv_size, rcv_name, timeout, notify) \ -({ \ - error_t err; \ - asm (".globl _hurd_intr_rpc_msg_do_trap\n" \ - ".globl _hurd_intr_rpc_msg_in_trap\n" \ - " mov %1, $16\n" \ - " mov %2, $17\n" \ - " mov %3, $18\n" \ - " mov %4, $19\n" \ - " mov %5, $20\n" \ - " mov %6, $21\n" \ - " mov %7, $1\n" \ - " lda $0, -25\n" \ - "_hurd_intr_rpc_msg_do_trap: callsys\n" \ - "_hurd_intr_rpc_msg_in_trap: ret\n" \ - : "=r" (err) \ - : "r" (msg), "r" (option), "r" (send_size), "r" (rcv_size), \ - "r" (rcv_name), "r" (timeout), "r" (notify) \ - : "16", "17", "18", "19", "20", "21", "1", "0"); \ - err; \ -}) - -static void inline -INTR_MSG_BACK_OUT (struct alpha_thread_state *state) -{ - return; -} - -#include "hurdfault.h" - -/* This cannot be an inline function because it calls setjmp. */ -#define SYSCALL_EXAMINE(state, callno) \ -({ \ - u_int32_t *p = (void *) ((state)->pc - 4); \ - int result; \ - _hurdsig_catch_memory_fault (p) ? 0 : \ - ({ \ - result = (*p == 0x00000083); \ - _hurdsig_end_catch_fault (); \ - if (result) \ - /* The PC is just after a `callsys' instruction. \ - This is a system call in progress; v0 holds the call number. */ \ - *(callno) = (state)->r0; \ - result; \ - }); \ -}) - -struct mach_msg_trap_args - { - /* This is the order of arguments to mach_msg_trap. */ - mach_msg_header_t *msg; - mach_msg_option_t option; - mach_msg_size_t send_size; - mach_msg_size_t rcv_size; - mach_port_t rcv_name; - mach_msg_timeout_t timeout; - mach_port_t notify; - }; - -/* This cannot be an inline function because it calls setjmp. */ -#define MSG_EXAMINE(state, msgid, rcv_name, send_name, option, timeout) \ -({ \ - mach_msg_header_t *msg = (mach_msg_header_t *) (state)->r16; \ - *(option) = (mach_msg_option_t) (state)->r17; \ - *(rcv_name) = (mach_port_t) (state)->r18; \ - *(timeout) = (mach_msg_timeout_t) (state)->r19; \ - (msg == 0) ? \ - ({ \ - *(send_name) = MACH_PORT_NULL; \ - *(msgid) = 0; \ - 0; \ - }) : \ - (_hurdsig_catch_memory_fault (msg) ? -1 : \ - ({ \ - *(send_name) = msg->msgh_remote_port; \ - *(msgid) = msg->msgh_id; \ - _hurdsig_end_catch_fault (); \ - 0; \ - }) \ - ); \ -}) diff --git a/sysdeps/mach/hurd/alpha/longjmp-ts.c b/sysdeps/mach/hurd/alpha/longjmp-ts.c deleted file mode 100644 index f472dbcb30..0000000000 --- a/sysdeps/mach/hurd/alpha/longjmp-ts.c +++ /dev/null @@ -1,49 +0,0 @@ -/* Perform a `longjmp' on a Mach thread_state. Alpha version. - Copyright (C) 2002, 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 - 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. */ - -#include -#include -#include -#include - - -/* Set up STATE to do the equivalent of `longjmp (ENV, VAL);'. */ - -void -_hurd_longjmp_thread_state (void *state, jmp_buf env, int val) -{ - struct alpha_thread_state *const ts = state; - - ts->r9 = env[0].__jmpbuf[JB_S0]; - ts->r10 = env[0].__jmpbuf[JB_S1]; - ts->r11 = env[0].__jmpbuf[JB_S2]; - ts->r12 = env[0].__jmpbuf[JB_S3]; - ts->r13 = env[0].__jmpbuf[JB_S4]; - ts->r13 = env[0].__jmpbuf[JB_S5]; - ts->pc = env[0].__jmpbuf[JB_PC]; - ts->r15 = env[0].__jmpbuf[JB_FP]; - ts->r30 = env[0].__jmpbuf[JB_SP]; - ts->r0 = val ?: 1; - - /* XXX - To mimic longjmp we ought to restore some fp registers too. - But those registers are in struct alpha_float_state. - The only use of this is in fork, and it probably won't matter. - */ -} diff --git a/sysdeps/mach/hurd/alpha/sigreturn.c b/sysdeps/mach/hurd/alpha/sigreturn.c deleted file mode 100644 index 182d4cbd84..0000000000 --- a/sysdeps/mach/hurd/alpha/sigreturn.c +++ /dev/null @@ -1,211 +0,0 @@ -/* Return from signal handler in GNU C library for Hurd. Alpha version. - Copyright (C) 1994,95,97,98,2002 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. */ - -#include -#include -#include -#include -#include -#include - -int -__sigreturn (struct sigcontext *scp) -{ - struct hurd_sigstate *ss; - mach_port_t *reply_port; - - if (scp == NULL || (scp->sc_mask & _SIG_CANT_MASK)) - { - errno = EINVAL; - return -1; - } - - ss = _hurd_self_sigstate (); - __spin_lock (&ss->lock); - - /* Restore the set of blocked signals, and the intr_port slot. */ - ss->blocked = scp->sc_mask; - ss->intr_port = scp->sc_intr_port; - - /* Check for pending signals that were blocked by the old set. */ - if (ss->pending & ~ss->blocked) - { - /* There are pending signals that just became unblocked. Wake up the - signal thread to deliver them. But first, squirrel away SCP where - the signal thread will notice it if it runs another handler, and - arrange to have us called over again in the new reality. */ - ss->context = scp; - /* Clear the intr_port slot, since we are not in fact doing - an interruptible RPC right now. If SS->intr_port is not null, - the SCP context is doing an interruptible RPC, but the signal - thread will examine us while we are blocked in the sig_post RPC. */ - ss->intr_port = MACH_PORT_NULL; - __spin_unlock (&ss->lock); - __msg_sig_post (_hurd_msgport, 0, 0, __mach_task_self ()); - /* If a pending signal was handled, sig_post never returned. */ - __spin_lock (&ss->lock); - } - - if (scp->sc_onstack) - { - ss->sigaltstack.ss_flags &= ~SS_ONSTACK; /* XXX threadvars */ - /* XXX cannot unlock until off sigstack */ - abort (); - } - else - __spin_unlock (&ss->lock); - - /* Destroy the MiG reply port used by the signal handler, and restore the - reply port in use by the thread when interrupted. */ - reply_port = - (mach_port_t *) __hurd_threadvar_location (_HURD_THREADVAR_MIG_REPLY); - if (*reply_port) - __mach_port_destroy (__mach_task_self (), *reply_port); - *reply_port = scp->sc_reply_port; - - if (scp->sc_used_fpa) - { - /* Restore FPU state. */ - - /* Restore the floating-point control/status register. - We must do this first because the compiler will need - a temporary FP register for the load. */ - asm volatile ("mt_fpcr %0" : : "f" (scp->sc_fpcsr)); - - /* Restore floating-point registers. */ -#define restore_fpr(n) \ - asm volatile ("ldt $f" #n ",%0" : : "m" (scp->sc_fpregs[n])) - restore_fpr (0); - restore_fpr (1); - restore_fpr (2); - restore_fpr (3); - restore_fpr (4); - restore_fpr (5); - restore_fpr (6); - restore_fpr (7); - restore_fpr (8); - restore_fpr (9); - restore_fpr (10); - restore_fpr (11); - restore_fpr (12); - restore_fpr (13); - restore_fpr (14); - restore_fpr (15); - restore_fpr (16); - restore_fpr (17); - restore_fpr (18); - restore_fpr (19); - restore_fpr (20); - restore_fpr (21); - restore_fpr (22); - restore_fpr (23); - restore_fpr (24); - restore_fpr (25); - restore_fpr (26); - restore_fpr (27); - restore_fpr (28); - restore_fpr (29); - restore_fpr (30); - } - - /* Load all the registers from the sigcontext. */ -#define restore_gpr(n) \ - asm volatile ("ldq $" #n ",%0" : : "m" (scpreg->sc_regs[n])) - - { - /* The `rei' PAL pseudo-instruction restores registers $2..$7, the PC - and processor status. So we can use these few registers for our - working variables. Unfortunately, it finds its data on the stack - and merely pops the SP ($30) over the words of state restored, - allowing no other option for the new SP value. So we must push the - registers and PSW it will to restore, onto the user's stack and let - it pop them from there. */ - register const struct sigcontext *const scpreg asm ("$2") = scp; - register integer_t *usp asm ("$3") = (integer_t *) scpreg->sc_regs[30]; - register integer_t usp_align asm ("$4"); - - /* Push an 8-word "trap frame" onto the user stack for `rei': - registers $2..$7, the PC, and the PSW. */ - - register struct rei_frame - { - integer_t regs[5], pc, ps; - } *rei_frame asm ("$5"); - - usp -= 8; - /* `rei' demands that the stack be aligned to a 64 byte (8 word) - boundary; bits 61..56 of the PSW are OR'd back into the SP value - after popping the 8-word trap frame, so we store (sp % 64) - there and this restores the original user SP. */ - usp_align = (integer_t) usp & 63L; - rei_frame = (void *) ((integer_t) usp & ~63L); - - /* Copy the registers and PC from the sigcontext. */ - memcpy (rei_frame->regs, &scpreg->sc_regs[2], sizeof rei_frame->regs); - rei_frame->pc = scpreg->sc_pc; - - /* Compute the new PS value to be restored. `rei' adds the value at - bits 61..56 to the SP to compensate for the alignment above that - cleared the low 6 bits; bits 5..3 are the new mode/privilege level - (must be >= current mode; 3 == user mode); bits 2..0 are "software", - unused by the processor or kernel (XXX should trampoline save these? - How?); in user mode, `rei' demands that all other bits be zero. */ - rei_frame->ps = (usp_align << 56) | (3 << 3); /* XXX low 3 bits??? */ - - /* Restore the other general registers: everything except $2..$7, which - are in the `rei' trap frame we set up above, and $30, which is the - SP which is popped by `rei'. */ - restore_gpr (1); - restore_gpr (8); - restore_gpr (9); - restore_gpr (10); - restore_gpr (11); - restore_gpr (12); - restore_gpr (13); - restore_gpr (14); - restore_gpr (15); - restore_gpr (16); - restore_gpr (17); - restore_gpr (18); - restore_gpr (19); - restore_gpr (20); - restore_gpr (21); - restore_gpr (22); - restore_gpr (23); - restore_gpr (24); - restore_gpr (25); - restore_gpr (26); - restore_gpr (27); - restore_gpr (28); - restore_gpr (29); - - /* Switch the stack pointer to the trap frame set up on - the user stack and do the magical `rei' PAL call. */ - asm volatile ("mov %0, $30\n" - "call_pal %1" - : : "r" (rei_frame), "i" (63)); /* PAL_rti */ - /* Firewall. */ - asm volatile ("halt"); - } - - /* NOTREACHED */ - return -1; -} - -weak_alias (__sigreturn, sigreturn) diff --git a/sysdeps/mach/hurd/alpha/static-start.S b/sysdeps/mach/hurd/alpha/static-start.S deleted file mode 100644 index a31d0d097a..0000000000 --- a/sysdeps/mach/hurd/alpha/static-start.S +++ /dev/null @@ -1,30 +0,0 @@ -/* Startup code for statically linked Hurd/Alpha binaries. - Copyright (C) 2002 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. */ - -#include - - .text - .align 3 - .globl _start - .type _start,@function -_start: - jsr ra, _hurd_stack_setup - -#define _start _start1 -#include diff --git a/sysdeps/mach/hurd/alpha/trampoline.c b/sysdeps/mach/hurd/alpha/trampoline.c deleted file mode 100644 index 2360cbb469..0000000000 --- a/sysdeps/mach/hurd/alpha/trampoline.c +++ /dev/null @@ -1,249 +0,0 @@ -/* Set thread_state for sighandler, and sigcontext to recover. Alpha version. - Copyright (C) 1994,95,97,98,2002 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. */ - -#include -#include "thread_state.h" -#include "hurdfault.h" -#include - -struct mach_msg_trap_args - { - /* This is the order of arguments to mach_msg_trap. */ - mach_msg_header_t *msg; - mach_msg_option_t option; - mach_msg_size_t send_size; - mach_msg_size_t rcv_size; - mach_port_t rcv_name; - mach_msg_timeout_t timeout; - mach_port_t notify; - }; - - -struct sigcontext * -_hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, - int signo, struct hurd_signal_detail *detail, - int rpc_wait, struct machine_thread_all_state *state) -{ - __label__ trampoline, rpc_wait_trampoline; - void *sigsp; - struct sigcontext *scp; - - if (ss->context) - { - /* We have a previous sigcontext that sigreturn was about - to restore when another signal arrived. We will just base - our setup on that. */ - if (! _hurdsig_catch_memory_fault (ss->context)) - { - memcpy (&state->basic, &ss->context->sc_alpha_thread_state, - sizeof (state->basic)); - memcpy (&state->exc, &ss->context->sc_alpha_exc_state, - sizeof (state->exc)); - state->set = (1 << ALPHA_THREAD_STATE) | (1 << ALPHA_EXC_STATE); - if (state->exc.used_fpa) - { - memcpy (&state->fpu, &ss->context->sc_alpha_float_state, - sizeof (state->fpu)); - state->set |= (1 << ALPHA_FLOAT_STATE); - } - assert (! rpc_wait); - /* The intr_port slot was cleared before sigreturn sent us the - sig_post that made us notice this pending signal, so - _hurd_internal_post_signal wouldn't do interrupt_operation. - After we return, our caller will set SCP->sc_intr_port (in the - new context) from SS->intr_port and clear SS->intr_port. Now - that we are restoring this old context recorded by sigreturn, - we want to restore its intr_port too; so store it in - SS->intr_port now, so it will end up in SCP->sc_intr_port - later. */ - ss->intr_port = ss->context->sc_intr_port; - } - _hurdsig_end_catch_fault (); - - /* If the sigreturn context was bogus, just ignore it. */ - ss->context = NULL; - } - else if (! machine_get_basic_state (ss->thread, state)) - return NULL; - - if ((ss->actions[signo].sa_flags & SA_ONSTACK) && - !(ss->sigaltstack.ss_flags & (SS_DISABLE|SS_ONSTACK))) - { - sigsp = ss->sigaltstack.ss_sp + ss->sigaltstack.ss_size; - ss->sigaltstack.ss_flags |= SS_ONSTACK; - /* XXX need to set up base of new stack for - per-thread variables, cthreads. */ - } - else - sigsp = (char *) state->basic.SP; - - /* Set up the sigcontext structure on the stack. This is all the stack - needs, since the args are passed in registers (below). */ - sigsp -= sizeof (*scp); - scp = sigsp; - - if (_hurdsig_catch_memory_fault (scp)) - { - /* We got a fault trying to write the stack frame. - We cannot set up the signal handler. - Returning NULL tells our caller, who will nuke us with a SIGILL. */ - return NULL; - } - else - { - /* Set up the sigcontext from the current state of the thread. */ - - scp->sc_onstack = ss->sigaltstack.ss_flags & SS_ONSTACK ? 1 : 0; - - /* struct sigcontext is laid out so that starting at sc_regs - mimics a struct alpha_thread_state. */ - memcpy (&scp->sc_alpha_thread_state, - &state->basic, sizeof (state->basic)); - - /* struct sigcontext is laid out so that starting at sc_badvaddr - mimics a struct mips_exc_state. */ - if (! machine_get_state (ss->thread, state, ALPHA_EXC_STATE, - &state->exc, &scp->sc_alpha_exc_state, - sizeof (state->exc))) - return NULL; - - if (state->exc.used_fpa && - /* struct sigcontext is laid out so that starting at sc_fpregs - mimics a struct alpha_float_state. This state - is only meaningful if the coprocessor was used. */ - ! machine_get_state (ss->thread, state, ALPHA_FLOAT_STATE, - &state->fpu, - &scp->sc_alpha_float_state, - sizeof (state->fpu))) - return NULL; - - _hurdsig_end_catch_fault (); - } - - /* Modify the thread state to call the trampoline code on the new stack. */ - if (rpc_wait) - { - /* The signalee thread was blocked in a mach_msg_trap system call, - still waiting for a reply. We will have it run the special - trampoline code which retries the message receive before running - the signal handler. - - To do this we change the OPTION argument in its registers to - enable only message reception, since the request message has - already been sent. */ - - /* The system call arguments are stored in consecutive registers - starting with a0 ($16). */ - struct mach_msg_trap_args *args = (void *) &state->basic.r16; - - assert (args->option & MACH_RCV_MSG); - /* Disable the message-send, since it has already completed. The - calls we retry need only wait to receive the reply message. */ - args->option &= ~MACH_SEND_MSG; - - /* Limit the time to receive the reply message, in case the server - claimed that `interrupt_operation' succeeded but in fact the RPC - is hung. */ - args->option |= MACH_RCV_TIMEOUT; - args->timeout = _hurd_interrupted_rpc_timeout; - - state->basic.pc = (long int) &&rpc_wait_trampoline; - /* After doing the message receive, the trampoline code will need to - update the v0 ($0) value to be restored by sigreturn. To simplify - the assembly code, we pass the address of its slot in SCP to the - trampoline code in at ($28). */ - state->basic.r28 = (long int) &scp->sc_regs[0]; - /* We must preserve the mach_msg_trap args in a0..a5 and t0 - ($16..$21, $1). Pass the handler args to the trampoline code in - t8..t10 ($22.$24). */ - state->basic.r22 = signo; - state->basic.r23 = detail->code; - state->basic.r24 = (long int) scp; - } - else - { - state->basic.pc = (long int) &&trampoline; - state->basic.r16 = signo; - state->basic.r17 = detail->code; - state->basic.r18 = (long int) scp; - } - - state->basic.r30 = (long int) sigsp; /* $30 is the stack pointer. */ - - /* We pass the handler function to the trampoline code in ra ($26). */ - state->basic.r26 = (long int) handler; - /* In the callee-saved register t12/pv ($27), we store the - address of __sigreturn itself, for the trampoline code to use. */ - state->basic.r27 = (long int) &__sigreturn; - /* In the callee-saved register t11/ai ($25), we save the SCP value to pass - to __sigreturn after the handler returns. */ - state->basic.r25 = (long int) scp; - - return scp; - - /* The trampoline code follows. This is not actually executed as part of - this function, it is just convenient to write it that way. */ - - rpc_wait_trampoline: - /* This is the entry point when we have an RPC reply message to receive - before running the handler. The MACH_MSG_SEND bit has already been - cleared in the OPTION argument in our registers. For our convenience, - at ($28) points to the sc_regs[0] member of the sigcontext (saved v0 - ($0)). */ - asm volatile - (/* Retry the interrupted mach_msg system call. */ - "lda $0, -25($31)\n" /* mach_msg_trap */ - "callsys\n" /* Magic system call instruction. */ - /* When the sigcontext was saved, v0 was MACH_RCV_INTERRUPTED. But - now the message receive has completed and the original caller of - the RPC (i.e. the code running when the signal arrived) needs to - see the final return value of the message receive in v0. So - store the new v0 value into the sc_regs[0] member of the sigcontext - (whose address is in at to make this code simpler). */ - "stq $0, 0($28)\n" - /* Since the argument registers needed to have the mach_msg_trap - arguments, we've stored the arguments to the handler function - in registers t8..t10 ($22..$24). */ - "mov $22, $16\n" - "mov $23, $17\n" - "mov $24, $18\n"); - - trampoline: - /* Entry point for running the handler normally. The arguments to the - handler function are already in the standard registers: - - a0 SIGNO - a1 SIGCODE - a2 SCP - - t12 also contains SCP; this value is callee-saved (and so should not get - clobbered by running the handler). We use this saved value to pass to - __sigreturn, so the handler can clobber the argument registers if it - likes. */ - /* Call the handler function, saving return address in ra ($26). */ - asm volatile ("jsr $26, ($26)"); - /* Reset gp ($29) from the return address (here) in ra ($26). */ - asm volatile ("ldgp $29, 0($26)"); - asm volatile ("mov $25, $16"); /* Move saved SCP to argument register. */ - /* Call __sigreturn (SCP); this cannot return. */ - asm volatile ("jmp $31, ($27)"); - - /* NOTREACHED */ - return NULL; -} diff --git a/sysdeps/mach/hurd/hppa/bits/sigcontext.h b/sysdeps/mach/hurd/hppa/bits/sigcontext.h deleted file mode 100644 index 5db43fc22c..0000000000 --- a/sysdeps/mach/hurd/hppa/bits/sigcontext.h +++ /dev/null @@ -1,94 +0,0 @@ -/* Machine-dependent signal context structure for GNU Hurd. HPPA version. - Copyright (C) 1995,97,2001 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. */ - -#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H -# error "Never use directly; include instead." -#endif - -#ifndef sc_parisc_thread_state - -/* Signal handlers are actually called: - void handler (int sig, int code, struct sigcontext *scp); */ - -/* State of this thread when the signal was taken. */ -struct sigcontext - { - /* These first members are machine-independent. */ - - int sc_onstack; /* Nonzero if running on sigstack. */ - __sigset_t sc_mask; /* Blocked signals to restore. */ - - /* MiG reply port this thread is using. */ - unsigned int sc_reply_port; - - /* Port this thread is doing an interruptible RPC on. */ - unsigned int sc_intr_port; - - /* Error code associated with this signal (interpreted as `error_t'). */ - int sc_error; - - /* All following members are machine-dependent. The rest of this - structure is written to be laid out identically to a `struct - parisc_thread_state'. trampoline.c knows this, so it must be - changed if this changes. */ - -#define sc_parisc_thread_state sc_flags /* Beginning of correspondence. */ - /* "General" registers $1..$31. */ - unsigned int sc_regs[31]; - - /* Control registers. */ - unsigned int sc_cr11; /* sar */ - /* These four registers make up the PC. */ - unsigned int iioq_head; - unsigned int iisq_head; - unsigned int iioq_tail; - unsigned int iisq_tail; - unsigned int sc_cr15; - unsigned int sc_cr19; - unsigned int sc_cr20; - unsigned int sc_cr21; - unsigned int sc_cr22; /* ipsw */ - unsigned int sc_bsd_goto; /* unused */ - unsigned int sc_sr4; - unsigned int sc_sr0; - unsigned int sc_sr1; - unsigned int sc_sr2; - unsigned int sc_sr3; - unsigned int sc_sr5; - unsigned int sc_sr6; - unsigned int sc_sr7; - unsigned int sc_cr0; - unsigned int sc_cr8; - unsigned int sc_cr9; - unsigned int sc_cr10; /* unused */ - unsigned int sc_cr12; - unsigned int sc_cr13; - unsigned int sc_cr24; /* unused */ - unsigned int sc_cr25; /* unused */ - unsigned int sc_cr26; /* unused */ - unsigned sc_mpsfu_high; /* unused */ - unsigned sc_mpsfu_low; /* unused */ - unsigned sc_mpsfu_ovflo; /* unused */ - int sc_pad; - - /* Floating point registers $f0..$f31. */ - double sc_fpregs[32]; - }; - -#endif /* sc_parisc_thread_state */ diff --git a/sysdeps/mach/hurd/hppa/trampoline.c b/sysdeps/mach/hurd/hppa/trampoline.c deleted file mode 100644 index fc811c5e7b..0000000000 --- a/sysdeps/mach/hurd/hppa/trampoline.c +++ /dev/null @@ -1,230 +0,0 @@ -/* Set thread_state for sighandler, and sigcontext to recover. HPPA version. - Copyright (C) 1995, 1997, 1998, 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 - 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. */ - -#include -#include -#include -#include -#include "hurdfault.h" - - -struct mach_msg_trap_regargs - { - /* These first four arguments are in registers 26..23. */ - mach_msg_size_t rcv_size; /* arg3 */ - mach_msg_size_t send_size; /* arg2 */ - mach_msg_option_t option; /* arg1 */ - mach_msg_header_t *msg; /* arg0 */ - }; - -struct sigcontext * -_hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, - int signo, long int sigcode, - volatile int rpc_wait, - struct machine_thread_all_state *state) -{ - __label__ trampoline, rpc_wait_trampoline; - void *volatile sigsp; - struct sigcontext *scp; - - if (ss->context) - { - /* We have a previous sigcontext that sigreturn was about - to restore when another signal arrived. We will just base - our setup on that. */ - if (_hurdsig_catch_fault (SIGSEGV)) - assert (_hurdsig_fault_sigcode >= (long int) ss->context && - _hurdsig_fault_sigcode < (long int) (ss->context + 1)); - else - { - memcpy (&state->basic, &ss->context->sc_parisc_thread_state, - sizeof (state->basic)); - state->set = (1 << PARISC_THREAD_STATE); - assert (! rpc_wait); - /* The intr_port slot was cleared before sigreturn sent us the - sig_post that made us notice this pending signal, so - _hurd_internal_post_signal wouldn't do interrupt_operation. - After we return, our caller will set SCP->sc_intr_port (in the - new context) from SS->intr_port and clear SS->intr_port. Now - that we are restoring this old context recorded by sigreturn, - we want to restore its intr_port too; so store it in - SS->intr_port now, so it will end up in SCP->sc_intr_port - later. */ - ss->intr_port = ss->context->sc_intr_port; - } - /* If the sigreturn context was bogus, just ignore it. */ - ss->context = NULL; - } - else if (! machine_get_basic_state (ss->thread, state)) - return NULL; - - if ((ss->actions[signo].sa_flags & SA_ONSTACK) && - !(ss->sigaltstack.ss_flags & (SS_DISABLE|SS_ONSTACK))) - { - sigsp = ss->sigaltstack.ss_sp + ss->sigaltstack.ss_size; - ss->sigaltstack.ss_flags |= SS_ONSTACK; - /* XXX need to set up base of new stack for - per-thread variables, cthreads. */ - } - else - sigsp = (char *) state->basic.uesp; - - /* Push the signal context on the stack. */ - sigsp -= sizeof (*scp); - scp = sigsp; - - if (_hurdsig_catch_fault (SIGSEGV)) - { - assert (_hurdsig_fault_sigcode >= (long int) scp && - _hurdsig_fault_sigcode <= (long int) (scp + 1)); - /* We got a fault trying to write the stack frame. - We cannot set up the signal handler. - Returning NULL tells our caller, who will nuke us with a SIGILL. */ - return NULL; - } - else - { - int ok; - - /* Set up the sigcontext from the current state of the thread. */ - - scp->sc_onstack = ss->sigaltstack.ss_flags & SS_ONSTACK ? 1 : 0; - - /* struct sigcontext is laid out so that starting at sc_regs mimics a - struct parisc_thread_state. */ - memcpy (&scp->sc_parisc_thread_state, - &state->basic, sizeof (state->basic)); - - _hurdsig_end_catch_fault (); - - if (! ok) - return NULL; - } - - /* Modify the thread state to call the trampoline code on the new stack. */ - if (rpc_wait) - { - /* The signalee thread was blocked in a mach_msg_trap system call, - still waiting for a reply. We will have it run the special - trampoline code which retries the message receive before running - the signal handler. - - To do this we change the OPTION argument on its stack to enable only - message reception, since the request message has already been - sent. */ - - struct mach_msg_trap_regargs *args = (void *) &state->basic.r23; - - if (_hurdsig_catch_fault (SIGSEGV)) - { - assert (_hurdsig_fault_sigcode >= (long int) args && - _hurdsig_fault_sigcode < (long int) (args + 1)); - /* Faulted accessing ARGS. Bomb. */ - return NULL; - } - - assert (args->option & MACH_RCV_MSG); - /* Disable the message-send, since it has already completed. The - calls we retry need only wait to receive the reply message. */ - args->option &= ~MACH_SEND_MSG; - - /* Limit the time to receive the reply message, in case the server - claimed that `interrupt_operation' succeeded but in fact the RPC - is hung. */ - args->option |= MACH_RCV_TIMEOUT; - args->timeout = _hurd_interrupted_rpc_timeout; - - _hurdsig_end_catch_fault (); - - MACHINE_THREAD_STATE_SET_PC (&state->basic, &&rpc_wait_trampoline); - /* The reply-receiving trampoline code runs initially on the original - user stack. We pass it the signal stack pointer in %r5. */ - state->basic.r5 = (int) sigsp; - /* After doing the message receive, the trampoline code will need to - update the %r28 value to be restored by sigreturn. To simplify - the assembly code, we pass the address of its slot in SCP to the - trampoline code in %r4. */ - state->basic.r4 = (unsigned int) &scp->sc_regs[27]; - /* Set up the arguments for the handler function in callee-saved - registers that we will move to the argument registers after - mach_msg_trap returns. */ - state->basic.r6 = signo; - state->basic.r7 = sigcode; - state->basic.r8 = (unsigned int) scp; - } - else - { - MACHINE_THREAD_STATE_SET_PC (&state->basic, &&trampoline); - state->basic.r20 = (unsigned int) sigsp; - /* Set up the arguments for the handler function. */ - state->basic.r26 = signo; - state->basic.r25 = sigcode; - state->basic.r24 = (unsigned int) scp; - } - - /* We pass the handler function to the trampoline code in %r9. */ - state->basic.r9 = (unsigned int) handler; - /* For convenience, we pass the address of __sigreturn in %r10. */ - state->basic.r10 = (unsigned int) &__sigreturn; - /* The extra copy of SCP for the __sigreturn arg goes in %r8. */ - state->basic.r10 = (unsigned int) scp; - - return scp; - - /* The trampoline code follows. This is not actually executed as part of - this function, it is just convenient to write it that way. */ - - rpc_wait_trampoline: - /* This is the entry point when we have an RPC reply message to receive - before running the handler. The MACH_MSG_SEND bit has already been - cleared in the OPTION argument on our stack. The interrupted user - stack pointer has not been changed, so the system call can find its - arguments; the signal stack pointer is in %ebx. For our convenience, - %ecx points to the sc_eax member of the sigcontext. */ - asm volatile - (/* Retry the interrupted mach_msg system call. */ - "ldil L%0xC0000000,%r1\nble 4(%sr7,%r1)\n" - "ldi -25, %r22\n" /* mach_msg_trap */ - /* When the sigcontext was saved, %r28 was MACH_RCV_INTERRUPTED. But - now the message receive has completed and the original caller of - the RPC (i.e. the code running when the signal arrived) needs to - see the final return value of the message receive in %r28. So - store the new %r28 value into the sc_regs[27] member of the sigcontext - (whose address is in %r4 to make this code simpler). */ - "stw (%r4), %r28\n" - /* Switch to the signal stack. */ - "copy %r5, %r30\n" - /* Copy the handler arguments to the argument registers. */ - "copy %r6, %r26\n" - "copy %r7, %r25\n" - "copy %r8, %r24\n" - ); - - trampoline: - /* Entry point for running the handler normally. The arguments to the - handler function are already in the argument registers. */ - asm volatile - ("bv (%r9); nop" /* Call the handler function. */ - "bv (%r10)\n" /* Call __sigreturn (SCP); never returns. */ - "copy %r8, %r26" /* Set up arg in delay slot. */ - : : "i" (&__sigreturn)); - - /* NOTREACHED */ - return NULL; -} diff --git a/sysdeps/mach/hurd/mips/bits/sigcontext.h b/sysdeps/mach/hurd/mips/bits/sigcontext.h deleted file mode 100644 index 14c618857e..0000000000 --- a/sysdeps/mach/hurd/mips/bits/sigcontext.h +++ /dev/null @@ -1,80 +0,0 @@ -/* Machine-dependent signal context structure for GNU Hurd. MIPS version. - Copyright (C) 1994,97,2001 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. */ - -#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H -# error "Never use directly; include instead." -#endif - -#ifndef sc_mips_thread_state - -/* Signal handlers are actually called: - void handler (int sig, int code, struct sigcontext *scp); */ - -/* State of this thread when the signal was taken. */ -struct sigcontext - { - /* These first members are machine-independent. */ - - int sc_onstack; /* Nonzero if running on sigstack. */ - __sigset_t sc_mask; /* Blocked signals to restore. */ - - /* MiG reply port this thread is using. */ - unsigned int sc_reply_port; - - /* Port this thread is doing an interruptible RPC on. */ - unsigned int sc_intr_port; - - /* Error code associated with this signal (interpreted as `error_t'). */ - int sc_error; - - /* All following members are machine-dependent. The rest of this - structure is written to be laid out identically to: - { - struct mips_thread_state ts; - struct mips_exc_state es; - struct mips_float_state fs; - } - trampoline.c knows this, so it must be changed if this changes. */ -#define sc_mips_thread_state sc_gpr /* Beginning of correspondence. */ - int sc_gpr[31]; /* "General" registers; [0] is r1. */ - int sc_mdlo, sc_mdhi; /* Low and high multiplication results. */ - int sc_pc; /* Instruction pointer. */ - - /* struct mips_exc_state */ -#define sc_mips_exc_state sc_cause - unsigned int sc_cause; /* Machine-level trap code. */ -#define SC_CAUSE_SST 0x00000044 - unsigned int sc_badvaddr; - unsigned int sc_coproc_used; /* Which coprocessors the thread has used. */ -#define SC_COPROC_USE_COP0 1 /* (by definition) */ -#define SC_COPROC_USE_COP1 2 /* FPA */ -#define SC_COPROC_USE_FPU SC_COPROC_USE_COP1 -#define SC_COPROC_USE_COP2 4 -#define SC_COPROC_USE_COP3 8 - - /* struct mips_float_state - This is only filled in if the SC_COPROC_USE_FPU bit - is set in sc_coproc_used. */ -#define sc_mips_float_state sc_fpr - int sc_fpr[32]; /* FP registers. */ - int sc_fpcsr; /* FPU status register. */ - int sc_fpeir; /* FP exception instruction register. */ - }; - -#endif /* sc_mips_thread_state */ diff --git a/sysdeps/mach/hurd/mips/dl-machine.c b/sysdeps/mach/hurd/mips/dl-machine.c deleted file mode 100644 index ce2d5db510..0000000000 --- a/sysdeps/mach/hurd/mips/dl-machine.c +++ /dev/null @@ -1,132 +0,0 @@ -/* Operating system support for run-time dynamic linker. MIPS specific - stuffs on Hurd. - Copyright (C) 1996, 1997 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. */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "../stdio-common/_itoa.h" -#include -#include -#include -#include - -void weak_function -abort (void) -{ - _exit (127); -} - - -#include -#include -#include - -#undef _ -#define _(x) x - -/* Return a string describing the errno code in ERRNUM. */ -char * weak_function -_strerror_internal (int errnum, char *buf, size_t buflen) -{ - int system; - int sub; - int code; - const struct error_system *es; - extern void __mach_error_map_compat (int *); - - __mach_error_map_compat (&errnum); - - system = err_get_system (errnum); - sub = err_get_sub (errnum); - code = err_get_code (errnum); - - if (system > err_max_system || ! __mach_error_systems[system].bad_sub) - { - const char *unk = _("Error in unknown error system: "); - const size_t unklen = strlen (unk); - char *p = buf + buflen; - *--p = '\0'; - p = _itoa (errnum, p, 16, 1); - return memcpy (p - unklen, unk, unklen); - } - - es = &__mach_error_systems[system]; - - if (sub >= es->max_sub) - return (char *) es->bad_sub; - - if (code >= es->subsystem[sub].max_code) - { - const char *unk = _("Unknown error "); - const size_t unklen = strlen (unk); - char *p = buf + buflen; - size_t len = strlen (es->subsystem[sub].subsys_name); - *--p = '\0'; - p = _itoa (errnum, p, 16, 1); - *p-- = ' '; - p = memcpy (p - len, es->subsystem[sub].subsys_name, len); - return memcpy (p - unklen, unk, unklen); - } - - return (char *) _(es->subsystem[sub].codes[code]); -} - -/* Read the whole contents of FILE into new mmap'd space with given - protections. The size of the file is returned in SIZE. */ -void * -_dl_sysdep_read_whole_file (const char *file, size_t *size, int prot) -{ - struct stat stat; - mach_port_t memobj_rd; - void *contents; - error_t err; - - memobj_rd = __open (file, O_RDONLY, 0); - if (memobj_rd) - { - err = __io_stat ((file_t) memobj_rd, &stat); - if (err) - { - __hurd_fail (err); - contents = 0; - } - else - { - /* Map a copy of the file contents. */ - contents = __mmap (0, stat.st_size, prot, MAP_COPY, memobj_rd, 0); - if (contents == (void *)-1) - contents = 0; - else - *size = stat.st_size; - } - - __mach_port_deallocate (__mach_task_self (), memobj_rd); - } - else - contents = 0; - - return contents; -} diff --git a/sysdeps/mach/hurd/mips/exc2signal.c b/sysdeps/mach/hurd/mips/exc2signal.c deleted file mode 100644 index c505ae5b22..0000000000 --- a/sysdeps/mach/hurd/mips/exc2signal.c +++ /dev/null @@ -1,97 +0,0 @@ -/* Translate Mach exception codes into signal numbers. MIPS version. - Copyright (C) 1996, 1997 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. */ - -#include -#include -#include - -/* Translate the Mach exception codes, as received in an `exception_raise' RPC, - into a signal number and signal subcode. */ - -void -_hurd_exception2signal (struct hurd_signal_detail *detail, int *signo) -{ - detail->error = 0; - - switch (detail->exc) - { - default: - *signo = SIGIOT; - detail->code = detail->exc; - break; - - case EXC_BAD_ACCESS: - if (detail->exc_code == KERN_PROTECTION_FAILURE) - *signo = SIGSEGV; - else - *signo = SIGBUS; - detail->code = detail->exc_subcode; - detail->error = detail->exc_code; - break; - - case EXC_BAD_INSTRUCTION: - *signo = SIGILL; - if (detail->exc_code == EXC_MIPS_II) - detail->code = detail->exc_subcode; - else - detail->code = 0; - break; - - case EXC_ARITHMETIC: - switch (detail->exc_code) - { - case EXC_MIPS_OV: /* integer overflow */ - *signo = SIGFPE; - detail->code = detail->exc_subcode; - break; - - default: - *signo = SIGFPE; - detail->code = 0; - break; - - case EXC_MIPS_INT: - /* Subcode is the fp_status word saved by the hardware. - Give an error code corresponding to the first bit set. */ - if (detail->exc_subcode == EXC_MIPS_FLT_UNIMP) - *signo = SIGILL; - else - *signo = SIGFPE; - detail->code = detail->exc_subcode; - break; - } - break; - - case EXC_EMULATION: - /* 3.0 doesn't give this one, why, I don't know. */ - *signo = SIGEMT; - detail->code = 0; - break; - - case EXC_SOFTWARE: - *signo = SIGEMT; - detail->code = 0; - break; - - case EXC_BREAKPOINT: - *signo = SIGTRAP; - detail->code = 0; - break; - } -} diff --git a/sysdeps/mach/hurd/mips/init-fault.c b/sysdeps/mach/hurd/mips/init-fault.c deleted file mode 100644 index 05f48a3a56..0000000000 --- a/sysdeps/mach/hurd/mips/init-fault.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Set up a thread_state for proc_handle_exceptions. MIPS version. - Copyright (C) 1996, 1997 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. */ - -#include -#include -#include -#include - -extern jmp_buf _hurd_sigthread_fault_env; - -static char fault_stack[32]; -static volatile void -faulted (void) -{ - __longjmp (_hurd_sigthread_fault_env, 1); -} - -void -_hurd_initialize_fault_recovery_state (void *state) -{ - struct mips_thread_state *ts = state; - memset (ts, 0, sizeof (*ts)); - ts->r29 = (int) &fault_stack[sizeof (fault_stack)]; - ts->pc = (int) &faulted; -} diff --git a/sysdeps/mach/hurd/mips/init-first.c b/sysdeps/mach/hurd/mips/init-first.c deleted file mode 100644 index 2b16cdef44..0000000000 --- a/sysdeps/mach/hurd/mips/init-first.c +++ /dev/null @@ -1,414 +0,0 @@ -/* Initialization code run first thing by the ELF startup code. For Mips/Hurd. - Copyright (C) 1996,1997,1998,2000,01,02,03,10 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. */ - -#include -#include -#include -#include -#include "hurdstartup.h" -#include "set-hooks.h" -#include "hurdmalloc.h" /* XXX */ - -extern void __mach_init (void); -extern void __init_misc (int, char **, char **); -#ifdef USE_NONOPTION_FLAGS -extern void __getopt_clean_environment (char **); -#endif -#ifndef SHARED -extern void _dl_non_dynamic_init (void) internal_function; -#endif -extern void __libc_global_ctors (void); - -unsigned int __hurd_threadvar_max; -unsigned long int __hurd_threadvar_stack_offset; -unsigned long int __hurd_threadvar_stack_mask; - -int __libc_multiple_libcs attribute_hidden = 1; - -int __libc_argc attribute_hidden; -char **__libc_argv attribute_hidden; - -void *(*_cthread_init_routine) (void); /* Returns new SP to use. */ -void (*_cthread_exit_routine) (int status) __attribute__ ((__noreturn__)); - - -/* Things that want to be run before _hurd_init or much anything else. - Importantly, these are called before anything tries to use malloc. */ -DEFINE_HOOK (_hurd_preinit_hook, (void)); - -static void -init1 (int argc, char *arg0, ...) -{ - char **argv = &arg0; - char **envp = &argv[argc + 1]; - struct hurd_startup_data *d; - - __libc_argc = argc; - __libc_argv = argv; - __environ = envp; - while (*envp) - ++envp; - d = (void *) ++envp; - - /* If we are the bootstrap task started by the kernel, - then after the environment pointers there is no Hurd - data block; the argument strings start there. */ - if ((void *) d != argv[0]) - { - _hurd_init_dtable = d->dtable; - _hurd_init_dtablesize = d->dtablesize; - - { - /* Check if the stack we are now on is different from - the one described by _hurd_stack_{base,size}. */ - - char dummy; - const vm_address_t newsp = (vm_address_t) &dummy; - - if (d->stack_size != 0 && (newsp < d->stack_base || - newsp - d->stack_base > d->stack_size)) - /* The new stack pointer does not intersect with the - stack the exec server set up for us, so free that stack. */ - __vm_deallocate (__mach_task_self (), d->stack_base, d->stack_size); - } - } - - if (__hurd_threadvar_stack_mask == 0) - { - /* We are not using cthreads, so we will have just a single allocated - area for the per-thread variables of the main user thread. */ - unsigned long int i; - __hurd_threadvar_stack_offset - = (unsigned long int) malloc (__hurd_threadvar_max * - sizeof (unsigned long int)); - if (__hurd_threadvar_stack_offset == 0) - __libc_fatal ("Can't allocate single-threaded per-thread variables."); - for (i = 0; i < __hurd_threadvar_max; ++i) - ((unsigned long int *) __hurd_threadvar_stack_offset)[i] = 0; - } - - if ((void *) d != argv[0] && (d->portarray || d->intarray)) - /* Initialize library data structures, start signal processing, etc. */ - _hurd_init (d->flags, argv, - d->portarray, d->portarraysize, - d->intarray, d->intarraysize); - -#ifndef SHARED - _dl_non_dynamic_init (); -#endif - __init_misc (argc, argv, __environ); - -#ifdef USE_NONOPTION_FLAGS - /* This is a hack to make the special getopt in GNU libc working. */ - __getopt_clean_environment (envp); -#endif - -#if defined SHARED && !defined NO_CTORS_DTORS_SECTIONS - __libc_global_ctors (); -#endif - - (void) &init1; -} - -static void * -__init (int *data) -{ - int argc = *data; - char **argv = (void *) (data + 1); - char **envp = &argv[argc + 1]; - struct hurd_startup_data *d; - - __environ = envp; - while (*envp) - ++envp; - d = (void *) ++envp; - - /* The user might have defined a value for this, to get more variables. - Otherwise it will be zero on startup. We must make sure it is set - properly before before cthreads initialization, so cthreads can know - how much space to leave for thread variables. */ - if (__hurd_threadvar_max < _HURD_THREADVAR_MAX) - __hurd_threadvar_max = _HURD_THREADVAR_MAX; - - - /* After possibly switching stacks, call `init1' (above) with the user - code as the return address, and the argument data immediately above - that on the stack. */ - - if (_cthread_init_routine) - { - /* Initialize cthreads, which will allocate us a new stack to run on. */ - void *newsp = (*_cthread_init_routine) (); - struct hurd_startup_data *od; - - /* Copy the argdata from the old stack to the new one. */ - newsp = memcpy (newsp - ((char *) &d[1] - (char *) data), data, - (char *) d - (char *) data); - - /* Set up the Hurd startup data block immediately following - the argument and environment pointers on the new stack. */ - od = (newsp + ((char *) d - (char *) data)); - if ((void *) argv[0] == d) - /* We were started up by the kernel with arguments on the stack. - There is no Hurd startup data, so zero the block. */ - memset (od, 0, sizeof *od); - else - /* Copy the Hurd startup data block to the new stack. */ - *od = *d; - - /* Push the user code address on the top of the new stack. It will - be the return address for `init1'; we will jump there with NEWSP - as the stack pointer. */ - return newsp; - } - - /* The argument data is just above the stack frame we will unwind by - returning. */ - return (void *) data; - - (void) &__init; -} - -#ifdef SHARED -/* This function is called to initialize the shared C library. - It is called just before the user _start code from mips/elf/start.S, - with the stack set up as that code gets it. */ - -/* NOTE! The linker notices the magical name `_init' and sets the DT_INIT - pointer in the dynamic section based solely on that. It is convention - for this function to be in the `.init' section, but the symbol name is - the only thing that really matters!! */ -/*void _init (int argc, ...) __attribute__ ((unused, section (".init")));*/ - -#if __mips64 -asm ("\ - .section .init,\"ax\",@progbits\n\ - .align 3\n\ - .globl _init\n\ - .type _init,@function\n\ - .ent _init\n\ -_init:\n\ - .set noreorder\n\ - .cpload $25\n\ - .set reorder\n\ - dsubu $29, 8*8\n\ - .cprestore 6*8\n\ - sd $16, 4*8($29)\n\ - sd $31, 5*8($29)\n\ - jal preinit\n\ - sd $28, 6*8($29)\n\ - move $16, $29 # Save the old stack pointer to s0 ($16)\n\ - daddu $4, $29, 4*8\n\ - jal __init\n\ - # Restore saved registers from the old stack.\n\ - ld $28, 6*8($16)\n\ - ld $31, 5*8($16)\n\ - ld $16, 4*8($16)\n\ - move $29, $2 # set new sp to SP\n\ -call_init1:\n\ - ld $4, 0($29)\n\ - ld $5, 1*8($29)\n\ - ld $6, 2*8($29)\n\ - ld $7, 3*8($29)\n\ - dla $25, init1\n\ - jr $25\n\ - .end _init\n\ - .text\n\ -"); -#else -asm ("\ - .section .init,\"ax\",@progbits\n\ - .align 2\n\ - .globl _init\n\ - .type _init,@function\n\ - .ent _init\n\ -_init:\n\ - .set noreorder\n\ - .cpload $25\n\ - .set reorder\n\ - subu $29, 32\n\ - .cprestore 24\n\ - sw $16, 16($29)\n\ - sw $31, 20($29)\n\ - jal preinit\n\ - sw $28, 24($29)\n\ - move $16, $29 # Save the old stack pointer to s0 ($16)\n\ - addu $4, $29, 32\n\ - jal __init\n\ - # Restore saved registers from the old stack.\n\ - lw $28, 24($16)\n\ - lw $31, 20($16)\n\ - lw $16, 16($16)\n\ - move $29, $2 # set new sp to SP\n\ -call_init1:\n\ - lw $4, 0($29)\n\ - lw $5, 4($29)\n\ - lw $6, 8($29)\n\ - lw $7, 12($29)\n\ - la $25, init1\n\ - jr $25\n\ - .end _init\n\ - .text\n\ -"); -#endif - -static void -preinit (void) -{ - /* Initialize data structures so we can do RPCs. */ - __mach_init (); - - RUN_HOOK (_hurd_preinit_hook, ()); - - (void) &preinit; -} - -void __libc_init_first (int argc, ...) -{ -} -#endif - -#ifndef SHARED -/* An assembler code wrapping c function __init. */ -#ifdef __mips64 -asm ("\ - .text\n\ - .align 3\n\ -init:\n\ - dsubu $29, 8*8\n\ - sd $16, 4*8($29)\n\ - sd $31, 5*8($29)\n\ - move $16, $29\n\ - jal __init\n\ - ld $31, 5*8($16)\n\ - ld $16, 4*8($16)\n\ - move $29, $2 # set new sp to SP\n\ -call_init1:\n\ - ld $4, 0($29)\n\ - ld $5, 1*8($29)\n\ - ld $6, 2*8($29)\n\ - ld $7, 3*8($29)\n\ - dla $25, init1\n\ - jr $25\n\ -"); -#else -asm ("\ - .text\n\ - .align 2\n\ -init:\n\ - subu $29, 32\n\ - sw $16, 16($29)\n\ - sw $31, 20($29)\n\ - move $16, $29\n\ - jal __init\n\ - lw $31, 20($16)\n\ - lw $16, 16($16)\n\ - move $29, $2 # set new sp to SP\n\ -call_init1:\n\ - lw $4, 0($29)\n\ - lw $5, 4($29)\n\ - lw $6, 8($29)\n\ - lw $7, 12($29)\n\ - la $25, init1\n\ - jr $25\n\ -"); -#endif - -/* An assembler code wrapping c function ___libc_init_first. - ___libc_init_first does an RPC call to flush cache to put doinit - function on the stack, so we should call __mach_init first in - this wrap. */ -#ifdef __mips64 -asm ("\ - .text\n\ - .align 3\n\ - .globl __libc_init_first\n\ -__libc_init_first:\n\ - dsubu $29, 8\n\ - sd $31, 0($29)\n\ - jal __mach_init\n\ - ld $4, 0($29)\n\ - ld $5, 1*8($29)\n\ - ld $6, 2*8($29)\n\ - ld $7, 3*8($29)\n\ - j ___libc_init_first\n\ -"); -#else -asm ("\ - .text\n\ - .align 2\n\ - .globl __libc_init_first\n\ -__libc_init_first:\n\ - subu $29, 4\n\ - sw $31, 0($29)\n\ - jal __mach_init\n\ - lw $4, 0($29)\n\ - lw $5, 4($29)\n\ - lw $6, 8($29)\n\ - lw $7, 12($29)\n\ - j ___libc_init_first\n\ -"); -#endif - -static void -___libc_init_first (int return_addr, int argc, ...) -{ - void doinit (int *data) - { -#if 0 - /* This function gets called with the argument data at TOS. */ - void doinit1 (int argc, ...) - { - init (&argc); - } -#endif - extern void init (int *data); - - /* Push the user return address after the argument data, and then - jump to `doinit1' (above), so it is as if __libc_init_first's - caller had called `init' with the argument data already on the - stack. */ - *--data = return_addr; - -#ifdef __mips64 - asm volatile ("ld $31, 0(%0)\n" /* Load the original return address. */ - "daddu $29, %0, 8\n" /* Switch to new outermost stack. */ - "move $4, $29\n" - "jr %1" : : "r" (data), "r" (&init)); -#else - asm volatile ("lw $31, 0(%0)\n" /* Load the original return address. */ - "addu $29, %0, 4\n" /* Switch to new outermost stack. */ - "move $4, $29\n" - "jr %1" : : "r" (data), "r" (&init)); -#endif - /* NOTREACHED */ - } - -#if 0 - /* Initialize data structures so we can do RPCs. */ - __mach_init (); -#endif - - RUN_HOOK (_hurd_preinit_hook, ()); - - _hurd_startup ((void **) &argc, &doinit); - - (void) &___libc_init_first; -} -#endif diff --git a/sysdeps/mach/hurd/mips/intr-msg.h b/sysdeps/mach/hurd/mips/intr-msg.h deleted file mode 100644 index 16c78972ac..0000000000 --- a/sysdeps/mach/hurd/mips/intr-msg.h +++ /dev/null @@ -1,127 +0,0 @@ -/* Machine-dependent details of interruptible RPC messaging. Mips version. - Copyright (C) 1996, 1997 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. */ - - -#ifdef __mips64 -#define INTR_MSG_TRAP(msg, option, send_size, rcv_size, rcv_name, timeout, notify) \ -({ \ - error_t err; \ - mach_port_t __rcv_name = (rcv_name); \ - mach_msg_timeout_t __timeout = (timeout); \ - mach_port_t __notify = (notify); \ - asm (".globl _hurd_intr_rpc_msg_do_trap\n" \ - ".globl _hurd_intr_rpc_msg_in_trap\n" \ - " move $4, %1\n" \ - " move $5, %2\n" \ - " move $6, %3\n" \ - " move $7, %4\n" \ - " move $8, %5\n" \ - " move $9, %6\n" \ - " move $10, %7\n" \ - " dli $2, -25\n" \ - "_hurd_intr_rpc_msg_do_trap: syscall\n" \ - "_hurd_intr_rpc_msg_in_trap: move %0, $2\n" \ - : "=r" (err) \ - : "r" (msg), "r" (option), "r" (send_size), "r" (rcv_size), \ - "r" (__rcv_name), "r" (__timeout), "r" (__notify) \ - : "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8", "$9", "$10", \ - "$11", "$12", "$13", "$14", "$15", "$24", "$25", "$28"); \ - err; \ -}) -#else -#define INTR_MSG_TRAP(msg, option, send_size, rcv_size, rcv_name, timeout, notify) \ -({ \ - error_t err; \ - mach_port_t __rcv_name = (rcv_name); \ - mach_msg_timeout_t __timeout = (timeout); \ - mach_port_t __notify = (notify); \ - asm (".globl _hurd_intr_rpc_msg_do_trap\n" \ - ".globl _hurd_intr_rpc_msg_in_trap\n" \ - " move $4, %1\n" \ - " move $5, %2\n" \ - " move $6, %3\n" \ - " move $7, %4\n" \ - " move $8, %5\n" \ - " move $9, %6\n" \ - " move $10, %7\n" \ - " li $2, -25\n" \ - "_hurd_intr_rpc_msg_do_trap: syscall\n" \ - "_hurd_intr_rpc_msg_in_trap: move %0, $2\n" \ - : "=r" (err) \ - : "r" (msg), "r" (option), "r" (send_size), "r" (rcv_size), \ - "r" (__rcv_name), "r" (__timeout), "r" (__notify) \ - : "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8", "$9", "$10", \ - "$11", "$12", "$13", "$14", "$15", "$24", "$25", "$28"); \ - err; \ -}) -#endif - -static inline void -INTR_MSG_BACK_OUT (struct mips_thread_state *state) -{ - return; -} - -#include "hurdfault.h" - -static inline int -SYSCALL_EXAMINE (struct mips_thread_state *state, int *callno) -{ - u_int32_t *p = (void *) (state->pc - 4); - int result; - if (_hurdsig_catch_memory_fault (p)) - return 0; - if (result = (*p == 0x0000000c)) - /* The PC is just after a `syscall' instruction. - This is a system call in progress; v0($2) holds the call number. */ - *callno = state->r2; - _hurdsig_end_catch_fault (); - return result; -} - - -struct mach_msg_trap_args - { - /* This is the order of arguments to mach_msg_trap. */ - mach_msg_header_t *msg; - mach_msg_option_t option; - mach_msg_size_t send_size; - mach_msg_size_t rcv_size; - mach_port_t rcv_name; - mach_msg_timeout_t timeout; - mach_port_t notify; - }; - - -static inline mach_port_t -MSG_EXAMINE (struct mips_thread_state *state, int *msgid) -{ - mach_msg_header_t *msg; - mach_port_t send_port; - - msg = (mach_msg_header_t *) state->r4; - - if (_hurdsig_catch_memory_fault (msg)) - return MACH_PORT_NULL; - send_port = msg->msgh_remote_port; - *msgid = msg->msgh_id; - _hurdsig_end_catch_fault (); - - return send_port; -} diff --git a/sysdeps/mach/hurd/mips/longjmp-ctx.c b/sysdeps/mach/hurd/mips/longjmp-ctx.c deleted file mode 100644 index 66ee7b6fb8..0000000000 --- a/sysdeps/mach/hurd/mips/longjmp-ctx.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Perform a `longjmp' on a `struct sigcontext'. MIPS version. - Copyright (C) 1996, 1997 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. */ - -#include -#include -#include - -void -_hurd_longjmp_sigcontext (struct sigcontext *scp, jmp_buf env, int retval) -{ - scp->sc_gpr[16] = env[0].__regs[0]; - scp->sc_gpr[17] = env[0].__regs[1]; - scp->sc_gpr[18] = env[0].__regs[2]; - scp->sc_gpr[19] = env[0].__regs[3]; - scp->sc_gpr[20] = env[0].__regs[4]; - scp->sc_gpr[21] = env[0].__regs[5]; - scp->sc_gpr[22] = env[0].__regs[6]; - scp->sc_gpr[23] = env[0].__regs[7]; - - scp->sc_gpr[28] = (int) env[0].__gp; - scp->sc_fp = (int) env[0].__fp; - scp->sc_sp = (int) env[0].__sp; - scp->sc_pc = (int) env[0].__pc; - scp->sc_gpr[2] = retval ?: 1; -} diff --git a/sysdeps/mach/hurd/mips/longjmp-ts.c b/sysdeps/mach/hurd/mips/longjmp-ts.c deleted file mode 100644 index 4c69e4e2b9..0000000000 --- a/sysdeps/mach/hurd/mips/longjmp-ts.c +++ /dev/null @@ -1,45 +0,0 @@ -/* Perform a `longjmp' on a Mach thread_state. MIPS version. - Copyright (C) 1996, 1997 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. */ - -#include -#include -#include - - -/* Set up STATE to do the equivalent of `longjmp (ENV, VAL);'. */ - -void -_hurd_longjmp_thread_state (void *state, jmp_buf env, int val) -{ - struct mips_thread_state *ts = state; - - ts->r16 = env[0].__jmpbuf[0].__regs[0]; - ts->r17 = env[0].__jmpbuf[0].__regs[1]; - ts->r18 = env[0].__jmpbuf[0].__regs[2]; - ts->r19 = env[0].__jmpbuf[0].__regs[3]; - ts->r20 = env[0].__jmpbuf[0].__regs[4]; - ts->r21 = env[0].__jmpbuf[0].__regs[5]; - ts->r22 = env[0].__jmpbuf[0].__regs[6]; - ts->r23 = env[0].__jmpbuf[0].__regs[7]; - ts->r28 = (int) env[0].__jmpbuf[0].__gp; - ts->r29 = (int) env[0].__jmpbuf[0].__sp; - ts->r30 = (int) env[0].__jmpbuf[0].__fp; - ts->pc = (int) env[0].__jmpbuf[0].__pc; - ts->r2 = val ?: 1; -} diff --git a/sysdeps/mach/hurd/mips/sigreturn.c b/sysdeps/mach/hurd/mips/sigreturn.c deleted file mode 100644 index a9f7673eb5..0000000000 --- a/sysdeps/mach/hurd/mips/sigreturn.c +++ /dev/null @@ -1,223 +0,0 @@ -/* Copyright (C) 1996, 1997, 1998 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. */ - -#include -#include -#include -#include -#include - -int -__sigreturn (struct sigcontext *scp) -{ - struct hurd_sigstate *ss; - struct hurd_userlink *link = (void *) &scp[1]; - mach_port_t *reply_port; - - if (scp == NULL || (scp->sc_mask & _SIG_CANT_MASK)) - { - errno = EINVAL; - return -1; - } - - ss = _hurd_self_sigstate (); - __spin_lock (&ss->lock); - - /* Remove the link on the `active resources' chain added by - _hurd_setup_sighandler. Its purpose was to make sure - that we got called; now we have, it is done. */ - _hurd_userlink_unlink (link); - - /* Restore the set of blocked signals, and the intr_port slot. */ - ss->blocked = scp->sc_mask; - ss->intr_port = scp->sc_intr_port; - - /* Check for pending signals that were blocked by the old set. */ - if (ss->pending & ~ss->blocked) - { - /* There are pending signals that just became unblocked. Wake up the - signal thread to deliver them. But first, squirrel away SCP where - the signal thread will notice it if it runs another handler, and - arrange to have us called over again in the new reality. */ - ss->context = scp; - __spin_unlock (&ss->lock); - __msg_sig_post (_hurd_msgport, 0, 0, __mach_task_self ()); - /* If a pending signal was handled, sig_post never returned. */ - __spin_lock (&ss->lock); - ss->context = NULL; - } - - if (scp->sc_onstack) - { - ss->sigaltstack.ss_flags &= ~SS_ONSTACK; /* XXX threadvars */ - /* XXX cannot unlock until off sigstack */ - abort (); - } - else - __spin_unlock (&ss->lock); - - /* Destroy the MiG reply port used by the signal handler, and restore the - reply port in use by the thread when interrupted. */ - reply_port = - (mach_port_t *) __hurd_threadvar_location (_HURD_THREADVAR_MIG_REPLY); - if (*reply_port) - { - mach_port_t port = *reply_port; - - /* Assigning MACH_PORT_DEAD here tells libc's mig_get_reply_port not to - get another reply port, but avoids mig_dealloc_reply_port trying to - deallocate it after the receive fails (which it will, because the - reply port will be bogus, whether we do this or not). */ - *reply_port = MACH_PORT_DEAD; - - __mach_port_destroy (__mach_task_self (), port); - } - *reply_port = scp->sc_reply_port; - - if (scp->sc_coproc_used & SC_COPROC_USE_FPU) - { - /* Restore FPU state. */ -#define restore_fpr(n) \ - asm volatile ("l.d $f" #n ",%0" : : "m" (scp->sc_fpr[n])) - - /* Restore floating-point registers. */ -#ifdef __mips64 - restore_fpr (0); - restore_fpr (1); - restore_fpr (2); - restore_fpr (3); - restore_fpr (4); - restore_fpr (5); - restore_fpr (6); - restore_fpr (7); - restore_fpr (8); - restore_fpr (9); - restore_fpr (10); - restore_fpr (11); - restore_fpr (12); - restore_fpr (13); - restore_fpr (14); - restore_fpr (15); - restore_fpr (16); - restore_fpr (17); - restore_fpr (18); - restore_fpr (19); - restore_fpr (20); - restore_fpr (21); - restore_fpr (22); - restore_fpr (23); - restore_fpr (24); - restore_fpr (25); - restore_fpr (26); - restore_fpr (27); - restore_fpr (28); - restore_fpr (29); - restore_fpr (30); - restore_fpr (31); -#else - restore_fpr (0); - restore_fpr (2); - restore_fpr (4); - restore_fpr (6); - restore_fpr (8); - restore_fpr (10); - restore_fpr (12); - restore_fpr (14); - restore_fpr (16); - restore_fpr (18); - restore_fpr (20); - restore_fpr (22); - restore_fpr (24); - restore_fpr (26); - restore_fpr (28); - restore_fpr (30); -#endif - - /* Restore the floating-point control/status register ($f31). */ - asm volatile ("ctc1 %0,$f31" : : "r" (scp->sc_fpcsr)); - } - - /* Load all the registers from the sigcontext. */ -#ifdef __mips64 -#define restore_gpr(n) \ - asm volatile ("ld $" #n ",%0" : : "m" (scpreg->sc_gpr[n - 1])) -#else -#define restore_gpr(n) \ - asm volatile ("lw $" #n ",%0" : : "m" (scpreg->sc_gpr[n - 1])) -#endif - - { - register const struct sigcontext *const scpreg asm ("$1") = scp; - register int *at asm ("$1"); - - /* First restore the multiplication result registers. The compiler - will use some temporary registers, so we do this before restoring - the general registers. */ - asm volatile ("mtlo %0" : : "r" (scpreg->sc_mdlo)); - asm volatile ("mthi %0" : : "r" (scpreg->sc_mdhi)); - - /* In the word after the saved PC, store the saved $1 value. */ - (&scpreg->sc_pc)[1] = scpreg->sc_gpr[0]; - - asm volatile (".set noreorder; .set noat;"); - - /* Restore the normal registers. */ - restore_gpr (2); - restore_gpr (3); - restore_gpr (4); - restore_gpr (5); - restore_gpr (6); - restore_gpr (7); - restore_gpr (8); - restore_gpr (9); - restore_gpr (10); - restore_gpr (11); - restore_gpr (12); - restore_gpr (13); - restore_gpr (14); - restore_gpr (15); - restore_gpr (16); - restore_gpr (17); - restore_gpr (18); - restore_gpr (19); - restore_gpr (20); - restore_gpr (21); - restore_gpr (22); - restore_gpr (23); - restore_gpr (24); - restore_gpr (25); - /* Registers 26-27 are kernel-only. */ - restore_gpr (28); - restore_gpr (29); /* Stack pointer. */ - restore_gpr (30); /* Frame pointer. */ - restore_gpr (31); /* Return address. */ - - at = &scpreg->sc_pc; - /* This is an emulated instruction that will find at the address in $1 - two words: the PC value to restore, and the $1 value to restore. */ - asm volatile (".word %0" : : "i" (op_sigreturn)); - asm volatile (".set reorder; .set at;"); - /* NOTREACHED */ - return at; /* To prevent optimization. */ - } - - /* NOTREACHED */ - return -1; -} - -weak_alias (__sigreturn, sigreturn) diff --git a/sysdeps/mach/hurd/mips/trampoline.c b/sysdeps/mach/hurd/mips/trampoline.c deleted file mode 100644 index 34e363b1aa..0000000000 --- a/sysdeps/mach/hurd/mips/trampoline.c +++ /dev/null @@ -1,292 +0,0 @@ -/* Set thread_state for sighandler, and sigcontext to recover. MIPS version. - Copyright (C) 1996, 1997, 1998, 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 - 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. */ - -#include -#include -#include -#include -#include -#include "hurdfault.h" -#include - - -struct sigcontext * -_hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, - int signo, struct hurd_signal_detail *detail, - volatile int rpc_wait, - struct machine_thread_all_state *state) -{ - __label__ trampoline, rpc_wait_trampoline, firewall; - void *volatile sigsp; - struct sigcontext *scp; - struct - { - int signo; - long int sigcode; - struct sigcontext *scp; /* Points to ctx, below. */ - void *sigreturn_addr; - void *sigreturn_returns_here; - struct sigcontext *return_scp; /* Same; arg to sigreturn. */ - struct sigcontext ctx; - struct hurd_userlink link; - } *stackframe; - - if (ss->context) - { - /* We have a previous sigcontext that sigreturn was about - to restore when another signal arrived. We will just base - our setup on that. */ - if (! _hurdsig_catch_memory_fault (ss->context)) - { - memcpy (&state->basic, &ss->context->sc_mips_thread_state, - sizeof (state->basic)); - memcpy (&state->exc, &ss->context->sc_mips_exc_state, - sizeof (state->exc)); - state->set = (1 << MIPS_THREAD_STATE) | (1 << MIPS_EXC_STATE); - if (state->exc.coproc_state & SC_COPROC_USE_FPU) - { - memcpy (&state->fpu, &ss->context->sc_mips_float_state, - sizeof (state->fpu)); - state->set |= (1 << MIPS_FLOAT_STATE); - } - } - } - - if (! machine_get_basic_state (ss->thread, state)) - return NULL; - - /* Save the original SP in the gratuitous s0 ($16) slot. - We may need to reset the SP (the `r29' slot) to avoid clobbering an - interrupted RPC frame. */ - state->basic.r16 = state->basic.r29; - - if ((ss->actions[signo].sa_flags & SA_ONSTACK) && - !(ss->sigaltstack.ss_flags & (SS_DISABLE|SS_ONSTACK))) - { - sigsp = ss->sigaltstack.ss_sp + ss->sigaltstack.ss_size; - ss->sigaltstack.ss_flags |= SS_ONSTACK; - /* XXX need to set up base of new stack for - per-thread variables, cthreads. */ - } - else - sigsp = (char *) state->basic.r29; - - /* Push the arguments to call `trampoline' on the stack. */ - sigsp -= sizeof (*stackframe); - stackframe = sigsp; - - if (_hurdsig_catch_memory_fault (stackframe)) - { - /* We got a fault trying to write the stack frame. - We cannot set up the signal handler. - Returning NULL tells our caller, who will nuke us with a SIGILL. */ - return NULL; - } - else - { - int ok; - - extern void _hurdsig_longjmp_from_handler (void *, jmp_buf, int); - - /* Add a link to the thread's active-resources list. We mark this as - the only user of the "resource", so the cleanup function will be - called by any longjmp which is unwinding past the signal frame. - The cleanup function (in sigunwind.c) will make sure that all the - appropriate cleanups done by sigreturn are taken care of. */ - stackframe->link.cleanup = &_hurdsig_longjmp_from_handler; - stackframe->link.cleanup_data = &stackframe->ctx; - stackframe->link.resource.next = NULL; - stackframe->link.resource.prevp = NULL; - stackframe->link.thread.next = ss->active_resources; - stackframe->link.thread.prevp = &ss->active_resources; - if (stackframe->link.thread.next) - stackframe->link.thread.next->thread.prevp - = &stackframe->link.thread.next; - ss->active_resources = &stackframe->link; - - /* Set up the arguments for the signal handler. */ - stackframe->signo = signo; - stackframe->sigcode = detail->code; - stackframe->scp = stackframe->return_scp = scp = &stackframe->ctx; - stackframe->sigreturn_addr = &__sigreturn; - stackframe->sigreturn_returns_here = &&firewall; /* Crash on return. */ - - /* Set up the sigcontext from the current state of the thread. */ - - scp->sc_onstack = ss->sigaltstack.ss_flags & SS_ONSTACK ? 1 : 0; - - /* struct sigcontext is laid out so that starting at sc_gpr - mimics a struct mips_thread_state. */ - memcpy (&scp->sc_mips_thread_state, - &state->basic, sizeof (state->basic)); - - /* struct sigcontext is laid out so that starting at sc_cause - mimics a struct mips_exc_state. */ - ok = machine_get_state (ss->thread, state, MIPS_EXC_STATE, - &state->exc, &scp->sc_cause, - sizeof (state->exc)); - - if (ok && (scp->sc_coproc_used & SC_COPROC_USE_FPU)) - /* struct sigcontext is laid out so that starting at sc_fpr - mimics a struct mips_float_state. This state - is only meaningful if the coprocessor was used. */ - ok = machine_get_state (ss->thread, state, MIPS_FLOAT_STATE, - &state->fpu, &scp->sc_mips_float_state, - sizeof (state->fpu)); - - _hurdsig_end_catch_fault (); - - if (! ok) - return NULL; - } - - /* Modify the thread state to call the trampoline code on the new stack. */ - if (rpc_wait) - { - /* The signalee thread was blocked in a mach_msg_trap system call, - still waiting for a reply. We will have it run the special - trampoline code which retries the message receive before running - the signal handler. - - To do this we change the OPTION argument in its registers to - enable only message reception, since the request message has - already been sent. */ - - /* The system call arguments are stored in consecutive registers - starting with a0 ($4). */ - struct mach_msg_trap_args *args = (void *) &state->basic.r4; - - if (_hurdsig_catch_memory_fault (args)) - { - /* Faulted accessing ARGS. Bomb. */ - return NULL; - } - - assert (args->option & MACH_RCV_MSG); - /* Disable the message-send, since it has already completed. The - calls we retry need only wait to receive the reply message. */ - args->option &= ~MACH_SEND_MSG; - - /* Limit the time to receive the reply message, in case the server - claimed that `interrupt_operation' succeeded but in fact the RPC - is hung. */ - args->option |= MACH_RCV_TIMEOUT; - args->timeout = _hurd_interrupted_rpc_timeout; - - _hurdsig_end_catch_fault (); - - state->basic.pc = (int) &&rpc_wait_trampoline; - /* The reply-receiving trampoline code runs initially on the original - user stack. We pass it the signal stack pointer in s4 ($20). */ - state->basic.r29 = state->basic.r16; /* Restore mach_msg syscall SP. */ - state->basic.r20 = (int) sigsp; - /* After doing the message receive, the trampoline code will need to - update the v0 ($2) value to be restored by sigreturn. To simplify - the assembly code, we pass the address of its slot in SCP to the - trampoline code in s5 ($21). */ - state->basic.r21 = (int) &scp->sc_gpr[1]; - /* We must preserve the mach_msg_trap args in a0..t2 ($4..$10). - Pass the handler args to the trampoline code in s1..s3 ($17..$19). */ - state->basic.r17 = signo; - state->basic.r18 = detail->code; - state->basic.r19 = (int) scp; - } - else - { - state->basic.pc = (int) &&trampoline; - state->basic.r29 = (int) sigsp; - state->basic.r4 = signo; - state->basic.r5 = detail->code; - state->basic.r6 = (int) scp; - } - - /* We pass the handler function to the trampoline code in s6 ($22). */ - state->basic.r22 = (int) handler; - /* In the callee-saved register s0 ($16), we save the SCP value to pass - to __sigreturn after the handler returns. */ - state->basic.r16 = (int) scp; - - return scp; - - /* The trampoline code follows. This is not actually executed as part of - this function, it is just convenient to write it that way. */ - - rpc_wait_trampoline: - /* This is the entry point when we have an RPC reply message to receive - before running the handler. The MACH_MSG_SEND bit has already been - cleared in the OPTION argument in our registers. For our convenience, - $3 points to the sc_gpr[1] member of the sigcontext (saved v0 ($2)). */ - asm volatile - (".set noat; .set noreorder; .set nomacro\n" - /* Retry the interrupted mach_msg system call. */ -#ifdef __mips64 - "dli $2, -25\n" /* mach_msg_trap */ -#else - "li $2, -25\n" /* mach_msg_trap */ -#endif - "syscall\n" - /* When the sigcontext was saved, v0 was MACH_RCV_INTERRUPTED. But - now the message receive has completed and the original caller of - the RPC (i.e. the code running when the signal arrived) needs to - see the final return value of the message receive in v0. So - store the new v0 value into the sc_gpr[1] member of the sigcontext - (whose address is in s5 to make this code simpler). */ -#ifdef __mips64 - "sd $2, ($21)\n" -#else - "sw $2, ($21)\n" -#endif - /* Since the argument registers needed to have the mach_msg_trap - arguments, we've stored the arguments to the handler function - in registers s1..s3 ($17..$19). */ - "move $4, $17\n" - "move $5, $18\n" - "move $6, $19\n" - /* Switch to the signal stack. */ - "move $29, $20\n"); - - trampoline: - /* Entry point for running the handler normally. The arguments to the - handler function are already in the standard registers: - - a0 SIGNO - a1 SIGCODE - a2 SCP - */ - asm volatile - ("move $25, $22\n" /* Copy s6 to t9 for MIPS ABI. */ - "jal $25; nop\n" /* Call the handler function. */ - /* Call __sigreturn (SCP); this cannot return. */ -#ifdef __mips64 - "dla $1,%0\n" -#else - "la $1,%0\n" -#endif - "j $1\n" - "move $4, $16" /* Set up arg from saved SCP in delay slot. */ - : : "i" (&__sigreturn)); - - /* NOTREACHED */ - asm volatile (".set reorder; .set at; .set macro"); - - firewall: - asm volatile ("hlt: j hlt"); - - return NULL; -} diff --git a/sysdeps/mach/mips/Makefile b/sysdeps/mach/mips/Makefile deleted file mode 100644 index a890ae7b46..0000000000 --- a/sysdeps/mach/mips/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ifeq ($(subdir),gnulib) -sysdep_routines += cacheflush -endif diff --git a/sysdeps/mach/mips/cacheflush.c b/sysdeps/mach/mips/cacheflush.c deleted file mode 100644 index 2a283e3e89..0000000000 --- a/sysdeps/mach/mips/cacheflush.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Flush the insn cache after GCC writes a closure on the stack. Mach/MIPS. - Copyright (C) 1996, 1997 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. */ - -#include -#include - -/* Stupid name, but this is what GCC generates (config/mips/mips.h). */ -void -cacheflush (void *addr, unsigned size, int flag) -{ - vm_machine_attribute_val_t val; - - switch (flag) - { - case 0: /* ? */ - val = MATTR_VAL_DCACHE_FLUSH; - case 1: /* This is the only value GCC uses. */ - val = MATTR_VAL_ICACHE_FLUSH; - break; - default: - val = MATTR_VAL_CACHE_FLUSH; - } - - __vm_machine_attribute (__mach_task_self (), - (vm_address_t) addr, size, - MATTR_CACHE, - &val); -} diff --git a/sysdeps/mach/mips/machine-lock.h b/sysdeps/mach/mips/machine-lock.h deleted file mode 100644 index eccc720dfa..0000000000 --- a/sysdeps/mach/mips/machine-lock.h +++ /dev/null @@ -1,92 +0,0 @@ -/* Machine-specific definition for spin locks. MIPS version. - Copyright (C) 1996, 1997 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 _MACHINE_LOCK_H -#define _MACHINE_LOCK_H - -/* To get the TAS pseudo-instruction. */ -#include - -/* The type of a spin lock variable. */ - -typedef __volatile int __spin_lock_t; - -/* Value to initialize `__spin_lock_t' variables to. */ - -#define __SPIN_LOCK_INITIALIZER 0 - - -#ifndef _EXTERN_INLINE -#define _EXTERN_INLINE extern __inline -#endif - -/* Unlock LOCK. */ - -_EXTERN_INLINE void -__spin_unlock (__spin_lock_t *__lock) -{ - *__lock = 0; -} - -/* Try to lock LOCK; return nonzero if we locked it, zero if another has. */ - -_EXTERN_INLINE int -__spin_try_lock (register __spin_lock_t *__lock) -{ -#if (__mips >= 2) - int __rtn; - - __asm__ __volatile (".set noreorder"); -#if (__mips64) - __asm__ __volatile ("lld %0,0(%1)" : "=r" (__rtn) : "r" (__lock)); -#else - __asm__ __volatile ("ll %0,0(%1)" : "=r" (__rtn) : "r" (__lock)); -#endif - if (__rtn) - return 0; - __asm__ __volatile ("move %0,%1" : "=r" (__rtn) : "r" (__lock)); -#if (__mips64) - __asm__ __volatile ("scd %0,0(%1)" : "=r" (__rtn) : "r" (__lock)); -#else - __asm__ __volatile ("sc %0,0(%1)" : "=r" (__rtn) : "r" (__lock)); -#endif - __asm__ __volatile (".set reorder"); - return __rtn; -#else - register int __rtn __asm__ ("a0"); - - /* Use the Mach microkernel's emulated TAS pseudo-instruction. */ - __asm__ __volatile (".set noreorder"); - __asm__ __volatile (".word %1" : "=r" (__rtn) : "i" (op_tas), "0" (__lock)); - __asm__ __volatile ("nop"); - __asm__ __volatile (".set reorder"); - return __rtn ^ (int) __lock; -#endif -} - -/* Return nonzero if LOCK is locked. */ - -_EXTERN_INLINE int -__spin_lock_locked (__spin_lock_t *__lock) -{ - return *__lock != 0; -} - - -#endif /* machine-lock.h */ diff --git a/sysdeps/mach/mips/machine-sp.h b/sysdeps/mach/mips/machine-sp.h deleted file mode 100644 index 144356a39f..0000000000 --- a/sysdeps/mach/mips/machine-sp.h +++ /dev/null @@ -1,38 +0,0 @@ -/* Machine-specific function to return the stack pointer. MIPS version. - Copyright (C) 1996, 1997 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 _MACHINE_SP_H -#define _MACHINE_SP_H - -/* Return the current stack pointer. */ - -#ifndef _EXTERN_INLINE -#define _EXTERN_INLINE extern __inline -#endif - -_EXTERN_INLINE void * -__thread_stack_pointer (void) -{ - void *__sp__; - __asm__ ("move %0,$29" : "=r" (__sp__)); - return __sp__; -} - -#endif /* machine-sp.h */ - diff --git a/sysdeps/mach/mips/syscall.S b/sysdeps/mach/mips/syscall.S deleted file mode 100644 index f2fc29df15..0000000000 --- a/sysdeps/mach/mips/syscall.S +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (C) 1996, 1997 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. */ - -#include - -#ifdef PIC - .option pic2 -#endif -ENTRY (syscall) - move v0, a0 /* Load system call number from first arg. */ - move a0, a1 /* Move the next three args up a register. */ - move a1, a2 - move a2, a3 - /* Load the remaining possible args (up to 11) from the stack. */ -#ifdef __mips64 - ld t0,4*8(sp) - ld t1,5*8(sp) - ld t2,6*8(sp) - ld t3,7*8(sp) - ld t4,8*8(sp) - ld t5,9*8(sp) - ld t6,10*8(sp) -#else - lw t0,4*4(sp) - lw t1,5*4(sp) - lw t2,6*4(sp) - lw t3,7*4(sp) - lw t4,8*4(sp) - lw t5,9*4(sp) - lw t6,10*4(sp) -#endif - syscall /* Do the system call. */ - j ra /* Return to caller. */ diff --git a/sysdeps/mach/mips/sysdep.h b/sysdeps/mach/mips/sysdep.h deleted file mode 100644 index 8136f95bf2..0000000000 --- a/sysdeps/mach/mips/sysdep.h +++ /dev/null @@ -1,83 +0,0 @@ -/* Copyright (C) 1996, 1997 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. */ - -#define LOSE asm volatile ("1: b 1b") - -#define START_MACHDEP asm ("\ - .text\n\ - .globl _start\n\ - .ent _start\n\ -_start:\n\ - # Put initial SP in a0.\n\ - move $4, $29\n\ - # Jump to _start0; don't return.\n\ - j _start0\n\ - .end _start\n\ -"); -#define START_ARGS int *entry_sp -#define SNARF_ARGS(argc, argv, envp) \ - do \ - { \ - register char **p; \ - \ - argc = *entry_sp; \ - argv = (char **) (entry_sp + 1); \ - p = argv; \ - while (*p++ != NULL) \ - ; \ - if (p >= (char **) argv[0]) \ - --p; \ - envp = p; \ - } while (0) - -#define CALL_WITH_SP(fn, sp) \ - ({ register int __fn = fn, __sp = (int) sp; \ - asm volatile ("move $sp,%0; j %1" : : "r" (__sp), "r" (__fn));}) - -#define RETURN_TO(sp, pc, retval) \ - asm volatile ("move $29, %0; move $2, %2; move $25, %1; jr $25" \ - : : "r" (sp), "r" (pc), "r" (retval)) - -#define STACK_GROWTH_DOWN - -#include - -#if defined (__ASSEMBLER__) - -#define ALIGN 2 - -#define MOVE(x,y) move y , x - -#define SYSCALL(name, args) \ - .globl syscall_error; \ - kernel_trap(name,SYS_##name,args); \ - beq $1,$0,1f; \ - j syscall_error; \ -1: - -#define SYSCALL__(name, args) \ - .globl syscall_error; \ - kernel_trap(__##name,SYS_##name,args); \ - beq $1,$0,1f; \ - j syscall_error; \ -1: - -#define ret j ra; nop -#endif - -#include diff --git a/sysdeps/mach/mips/thread_state.h b/sysdeps/mach/mips/thread_state.h deleted file mode 100644 index a0800de2d0..0000000000 --- a/sysdeps/mach/mips/thread_state.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Mach thread state definitions for machine-independent code. MIPS version. - Copyright (C) 1996, 1997, 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 - 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. */ - -#define MACHINE_THREAD_STATE_FLAVOR MIPS_THREAD_STATE -#define MACHINE_THREAD_STATE_COUNT MIPS_THREAD_STATE_COUNT - -#ifdef __PIC__ -#define MACHINE_THREAD_STATE_SET_PC(ts, pc) \ - ((ts)->PC = (ts)->r25 = (unsigned long int) (pc)) -#endif - -#define machine_thread_state mips_thread_state - -#define PC pc -#define SP r29 -#define SYSRETURN r2 - -struct machine_thread_all_state - { - int set; /* Mask of bits (1 << FLAVOR). */ - struct mips_thread_state basic; - struct mips_exc_state exc; - struct mips_float_state fpu; - }; - -#include diff --git a/sysdeps/rs6000/add_n.s b/sysdeps/rs6000/add_n.s deleted file mode 100644 index 216874e7a4..0000000000 --- a/sysdeps/rs6000/add_n.s +++ /dev/null @@ -1,81 +0,0 @@ -# IBM POWER __mpn_add_n -- Add two limb vectors of equal, non-zero length. - -# Copyright (C) 1992, 1994, 1995, 1996 Free Software Foundation, Inc. - -# This file is part of the GNU MP Library. - -# The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -# MA 02111-1307, USA. - - -# INPUT PARAMETERS -# res_ptr r3 -# s1_ptr r4 -# s2_ptr r5 -# size r6 - - .toc - .extern __mpn_add_n[DS] - .extern .__mpn_add_n -.csect [PR] - .align 2 - .globl __mpn_add_n - .globl .__mpn_add_n - .csect __mpn_add_n[DS] -__mpn_add_n: - .long .__mpn_add_n, TOC[tc0], 0 - .csect [PR] -.__mpn_add_n: - andil. 10,6,1 # odd or even number of limbs? - l 8,0(4) # load least significant s1 limb - l 0,0(5) # load least significant s2 limb - cal 3,-4(3) # offset res_ptr, it's updated before it's used - sri 10,6,1 # count for unrolled loop - a 7,0,8 # add least significant limbs, set cy - mtctr 10 # copy count into CTR - beq 0,Leven # branch if even # of limbs (# of limbs >= 2) - -# We have an odd # of limbs. Add the first limbs separately. - cmpi 1,10,0 # is count for unrolled loop zero? - bne 1,L1 # branch if not - st 7,4(3) - aze 3,10 # use the fact that r10 is zero... - br # return - -# We added least significant limbs. Now reload the next limbs to enter loop. -L1: lu 8,4(4) # load s1 limb and update s1_ptr - lu 0,4(5) # load s2 limb and update s2_ptr - stu 7,4(3) - ae 7,0,8 # add limbs, set cy -Leven: lu 9,4(4) # load s1 limb and update s1_ptr - lu 10,4(5) # load s2 limb and update s2_ptr - bdz Lend # If done, skip loop - -Loop: lu 8,4(4) # load s1 limb and update s1_ptr - lu 0,4(5) # load s2 limb and update s2_ptr - ae 11,9,10 # add previous limbs with cy, set cy - stu 7,4(3) # - lu 9,4(4) # load s1 limb and update s1_ptr - lu 10,4(5) # load s2 limb and update s2_ptr - ae 7,0,8 # add previous limbs with cy, set cy - stu 11,4(3) # - bdn Loop # decrement CTR and loop back - -Lend: ae 11,9,10 # add limbs with cy, set cy - st 7,4(3) # - st 11,8(3) # - lil 3,0 # load cy into ... - aze 3,3 # ... return value register - br diff --git a/sysdeps/rs6000/addmul_1.s b/sysdeps/rs6000/addmul_1.s deleted file mode 100644 index 7cd743cede..0000000000 --- a/sysdeps/rs6000/addmul_1.s +++ /dev/null @@ -1,123 +0,0 @@ -# IBM POWER __mpn_addmul_1 -- Multiply a limb vector with a limb and add -# the result to a second limb vector. - -# Copyright (C) 1992, 1994 Free Software Foundation, Inc. - -# This file is part of the GNU MP Library. - -# The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -# MA 02111-1307, USA. - - -# INPUT PARAMETERS -# res_ptr r3 -# s1_ptr r4 -# size r5 -# s2_limb r6 - -# The RS/6000 has no unsigned 32x32->64 bit multiplication instruction. To -# obtain that operation, we have to use the 32x32->64 signed multiplication -# instruction, and add the appropriate compensation to the high limb of the -# result. We add the multiplicand if the multiplier has its most significant -# bit set, and we add the multiplier if the multiplicand has its most -# significant bit set. We need to preserve the carry flag between each -# iteration, so we have to compute the compensation carefully (the natural, -# srai+and doesn't work). Since the POWER architecture has a branch unit -# we can branch in zero cycles, so that's how we perform the additions. - - .toc - .csect .__mpn_addmul_1[PR] - .align 2 - .globl __mpn_addmul_1 - .globl .__mpn_addmul_1 - .csect __mpn_addmul_1[DS] -__mpn_addmul_1: - .long .__mpn_addmul_1[PR], TOC[tc0], 0 - .csect .__mpn_addmul_1[PR] -.__mpn_addmul_1: - - cal 3,-4(3) - l 0,0(4) - cmpi 0,6,0 - mtctr 5 - mul 9,0,6 - srai 7,0,31 - and 7,7,6 - mfmq 8 - cax 9,9,7 - l 7,4(3) - a 8,8,7 # add res_limb - blt Lneg -Lpos: bdz Lend - -Lploop: lu 0,4(4) - stu 8,4(3) - cmpi 0,0,0 - mul 10,0,6 - mfmq 0 - ae 8,0,9 # low limb + old_cy_limb + old cy - l 7,4(3) - aze 10,10 # propagate cy to new cy_limb - a 8,8,7 # add res_limb - bge Lp0 - cax 10,10,6 # adjust high limb for negative limb from s1 -Lp0: bdz Lend0 - lu 0,4(4) - stu 8,4(3) - cmpi 0,0,0 - mul 9,0,6 - mfmq 0 - ae 8,0,10 - l 7,4(3) - aze 9,9 - a 8,8,7 - bge Lp1 - cax 9,9,6 # adjust high limb for negative limb from s1 -Lp1: bdn Lploop - - b Lend - -Lneg: cax 9,9,0 - bdz Lend -Lnloop: lu 0,4(4) - stu 8,4(3) - cmpi 0,0,0 - mul 10,0,6 - mfmq 7 - ae 8,7,9 - l 7,4(3) - ae 10,10,0 # propagate cy to new cy_limb - a 8,8,7 # add res_limb - bge Ln0 - cax 10,10,6 # adjust high limb for negative limb from s1 -Ln0: bdz Lend0 - lu 0,4(4) - stu 8,4(3) - cmpi 0,0,0 - mul 9,0,6 - mfmq 7 - ae 8,7,10 - l 7,4(3) - ae 9,9,0 # propagate cy to new cy_limb - a 8,8,7 # add res_limb - bge Ln1 - cax 9,9,6 # adjust high limb for negative limb from s1 -Ln1: bdn Lnloop - b Lend - -Lend0: cal 9,0(10) -Lend: st 8,4(3) - aze 3,9 - br diff --git a/sysdeps/rs6000/ffs.c b/sysdeps/rs6000/ffs.c deleted file mode 100644 index 619412cb50..0000000000 --- a/sysdeps/rs6000/ffs.c +++ /dev/null @@ -1,42 +0,0 @@ -/* ffs -- find first set bit in a word, counted from least significant end. - For IBM rs6000. - Copyright (C) 1991, 1992, 1997, 2004, 2005 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Torbjorn Granlund (tege@sics.se). - - 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. */ - -#include - -#undef ffs - -#ifdef __GNUC__ - -int -__ffs (x) - int x; -{ - int cnt; - - asm ("cntlz %0,%1" : "=r" (cnt) : "r" (x & -x)); - return 32 - cnt; -} -weak_alias (__ffs, ffs) -libc_hidden_builtin_def (ffs) - -#else -#include -#endif diff --git a/sysdeps/rs6000/lshift.s b/sysdeps/rs6000/lshift.s deleted file mode 100644 index 8ccba7407e..0000000000 --- a/sysdeps/rs6000/lshift.s +++ /dev/null @@ -1,59 +0,0 @@ -# IBM POWER __mpn_lshift -- - -# Copyright (C) 1992, 1994 Free Software Foundation, Inc. - -# This file is part of the GNU MP Library. - -# The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -# MA 02111-1307, USA. - - -# INPUT PARAMETERS -# res_ptr r3 -# s_ptr r4 -# size r5 -# cnt r6 - - .toc - .extern __mpn_lshift[DS] - .extern .__mpn_lshift -.csect [PR] - .align 2 - .globl __mpn_lshift - .globl .__mpn_lshift - .csect __mpn_lshift[DS] -__mpn_lshift: - .long .__mpn_lshift, TOC[tc0], 0 - .csect [PR] -.__mpn_lshift: - sli 0,5,2 - cax 9,3,0 - cax 4,4,0 - sfi 8,6,32 - mtctr 5 # put limb count in CTR loop register - lu 0,-4(4) # read most significant limb - sre 3,0,8 # compute carry out limb, and init MQ register - bdz Lend2 # if just one limb, skip loop - lu 0,-4(4) # read 2:nd most significant limb - sreq 7,0,8 # compute most significant limb of result - bdz Lend # if just two limb, skip loop -Loop: lu 0,-4(4) # load next lower limb - stu 7,-4(9) # store previous result during read latency - sreq 7,0,8 # compute result limb - bdn Loop # loop back until CTR is zero -Lend: stu 7,-4(9) # store 2:nd least significant limb -Lend2: sle 7,0,6 # compute least significant limb - st 7,-4(9) # store it" \ - br diff --git a/sysdeps/rs6000/memcopy.h b/sysdeps/rs6000/memcopy.h deleted file mode 100644 index 8bdb6e9766..0000000000 --- a/sysdeps/rs6000/memcopy.h +++ /dev/null @@ -1,86 +0,0 @@ -/* Copyright (C) 1991, 1997 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. */ - -#include - -#undef OP_T_THRES -#define OP_T_THRES 32 - -#undef BYTE_COPY_FWD -#define BYTE_COPY_FWD(dst_bp, src_bp, nbytes) \ - do \ - { \ - size_t __nbytes = nbytes; \ - asm volatile("mtspr 1,%2\n" \ - "lsx 6,0,%1\n" \ - "stsx 6,0,%0" : /* No outputs. */ : \ - "b" (dst_bp), "b" (src_bp), "r" (__nbytes) : \ - "6", "7", "8", "9", "10", "11", "12", "13"); \ - dst_bp += __nbytes; \ - src_bp += __nbytes; \ - } while (0) - -#undef BYTE_COPY_BWD -#define BYTE_COPY_BWD(dst_ep, src_ep, nbytes) \ - do \ - { \ - size_t __nbytes = (nbytes); \ - dst_ep -= __nbytes; \ - src_ep -= __nbytes; \ - asm volatile("mtspr 1,%2\n" \ - "lsx 6,0,%1\n" \ - "stsx 6,0,%0" : /* No outputs. */ : \ - "b" (dst_ep), "b" (src_ep), "r" (__nbytes) : \ - "6", "7", "8", "9", "10", "11", "12", "13"); \ - } while (0) - -#undef WORD_COPY_FWD -#define WORD_COPY_FWD(dst_bp, src_bp, nbytes_left, nbytes) \ - do \ - { \ - size_t __nblocks = (nbytes) / 32; \ - if (__nblocks != 0) \ - asm volatile("mtctr %4\n" \ - "lsi 6,%1,32\n" \ - "ai %1,%1,32\n" \ - "stsi 6,%0,32\n" \ - "ai %0,%0,32\n" \ - "bdn $-16" : \ - "=b" (dst_bp), "=b" (src_bp) : \ - "0" (dst_bp), "1" (src_bp), "r" (__nblocks) : \ - "6", "7", "8", "9", "10", "11", "12", "13"); \ - (nbytes_left) = (nbytes) % 32; \ - } while (0) - -#undef WORD_COPY_BWD -#define WORD_COPY_BWD(dst_ep, src_ep, nbytes_left, nbytes) \ - do \ - { \ - size_t __nblocks = (nbytes) / 32; \ - if (__nblocks != 0) \ - asm volatile("mtctr %4\n" \ - "ai %1,%1,-32\n" \ - "lsi 6,%1,32\n" \ - "ai %0,%0,-32\n" \ - "stsi 6,%0,32\n" \ - "bdn $-16" : \ - "=b" (dst_ep), "=b" (src_ep) : \ - "0" (dst_ep), "1" (src_ep), "r" (__nblocks) : \ - "6", "7", "8", "9", "10", "11", "12", "13"); \ - (nbytes_left) = (nbytes) % 32; \ - } while (0) diff --git a/sysdeps/rs6000/mul_1.s b/sysdeps/rs6000/mul_1.s deleted file mode 100644 index c0feef4b72..0000000000 --- a/sysdeps/rs6000/mul_1.s +++ /dev/null @@ -1,110 +0,0 @@ -# IBM POWER __mpn_mul_1 -- Multiply a limb vector with a limb and store -# the result in a second limb vector. - -# Copyright (C) 1992, 1994 Free Software Foundation, Inc. - -# This file is part of the GNU MP Library. - -# The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -# MA 02111-1307, USA. - - -# INPUT PARAMETERS -# res_ptr r3 -# s1_ptr r4 -# size r5 -# s2_limb r6 - -# The RS/6000 has no unsigned 32x32->64 bit multiplication instruction. To -# obtain that operation, we have to use the 32x32->64 signed multiplication -# instruction, and add the appropriate compensation to the high limb of the -# result. We add the multiplicand if the multiplier has its most significant -# bit set, and we add the multiplier if the multiplicand has its most -# significant bit set. We need to preserve the carry flag between each -# iteration, so we have to compute the compensation carefully (the natural, -# srai+and doesn't work). Since the POWER architecture has a branch unit -# we can branch in zero cycles, so that's how we perform the additions. - - .toc - .csect .__mpn_mul_1[PR] - .align 2 - .globl __mpn_mul_1 - .globl .__mpn_mul_1 - .csect __mpn_mul_1[DS] -__mpn_mul_1: - .long .__mpn_mul_1[PR], TOC[tc0], 0 - .csect .__mpn_mul_1[PR] -.__mpn_mul_1: - - cal 3,-4(3) - l 0,0(4) - cmpi 0,6,0 - mtctr 5 - mul 9,0,6 - srai 7,0,31 - and 7,7,6 - mfmq 8 - ai 0,0,0 # reset carry - cax 9,9,7 - blt Lneg -Lpos: bdz Lend -Lploop: lu 0,4(4) - stu 8,4(3) - cmpi 0,0,0 - mul 10,0,6 - mfmq 0 - ae 8,0,9 - bge Lp0 - cax 10,10,6 # adjust high limb for negative limb from s1 -Lp0: bdz Lend0 - lu 0,4(4) - stu 8,4(3) - cmpi 0,0,0 - mul 9,0,6 - mfmq 0 - ae 8,0,10 - bge Lp1 - cax 9,9,6 # adjust high limb for negative limb from s1 -Lp1: bdn Lploop - b Lend - -Lneg: cax 9,9,0 - bdz Lend -Lnloop: lu 0,4(4) - stu 8,4(3) - cmpi 0,0,0 - mul 10,0,6 - cax 10,10,0 # adjust high limb for negative s2_limb - mfmq 0 - ae 8,0,9 - bge Ln0 - cax 10,10,6 # adjust high limb for negative limb from s1 -Ln0: bdz Lend0 - lu 0,4(4) - stu 8,4(3) - cmpi 0,0,0 - mul 9,0,6 - cax 9,9,0 # adjust high limb for negative s2_limb - mfmq 0 - ae 8,0,10 - bge Ln1 - cax 9,9,6 # adjust high limb for negative limb from s1 -Ln1: bdn Lnloop - b Lend - -Lend0: cal 9,0(10) -Lend: st 8,4(3) - aze 3,9 - br diff --git a/sysdeps/rs6000/rshift.s b/sysdeps/rs6000/rshift.s deleted file mode 100644 index 145218fabd..0000000000 --- a/sysdeps/rs6000/rshift.s +++ /dev/null @@ -1,57 +0,0 @@ -# IBM POWER __mpn_rshift -- - -# Copyright (C) 1992, 1994 Free Software Foundation, Inc. - -# This file is part of the GNU MP Library. - -# The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -# MA 02111-1307, USA. - - -# INPUT PARAMETERS -# res_ptr r3 -# s_ptr r4 -# size r5 -# cnt r6 - - .toc - .extern __mpn_rshift[DS] - .extern .__mpn_rshift -.csect [PR] - .align 2 - .globl __mpn_rshift - .globl .__mpn_rshift - .csect __mpn_rshift[DS] -__mpn_rshift: - .long .__mpn_rshift, TOC[tc0], 0 - .csect [PR] -.__mpn_rshift: - sfi 8,6,32 - mtctr 5 # put limb count in CTR loop register - l 0,0(4) # read least significant limb - ai 9,3,-4 # adjust res_ptr since it's offset in the stu:s - sle 3,0,8 # compute carry limb, and init MQ register - bdz Lend2 # if just one limb, skip loop - lu 0,4(4) # read 2:nd least significant limb - sleq 7,0,8 # compute least significant limb of result - bdz Lend # if just two limb, skip loop -Loop: lu 0,4(4) # load next higher limb - stu 7,4(9) # store previous result during read latency - sleq 7,0,8 # compute result limb - bdn Loop # loop back until CTR is zero -Lend: stu 7,4(9) # store 2:nd most significant limb -Lend2: sre 7,0,6 # compute most significant limb - st 7,4(9) # store it" \ - br diff --git a/sysdeps/rs6000/sub_n.s b/sysdeps/rs6000/sub_n.s deleted file mode 100644 index d931870935..0000000000 --- a/sysdeps/rs6000/sub_n.s +++ /dev/null @@ -1,82 +0,0 @@ -# IBM POWER __mpn_sub_n -- Subtract two limb vectors of equal, non-zero length. - -# Copyright (C) 1992, 1994, 1995, 1996 Free Software Foundation, Inc. - -# This file is part of the GNU MP Library. - -# The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -# MA 02111-1307, USA. - - -# INPUT PARAMETERS -# res_ptr r3 -# s1_ptr r4 -# s2_ptr r5 -# size r6 - - .toc - .extern __mpn_sub_n[DS] - .extern .__mpn_sub_n -.csect [PR] - .align 2 - .globl __mpn_sub_n - .globl .__mpn_sub_n - .csect __mpn_sub_n[DS] -__mpn_sub_n: - .long .__mpn_sub_n, TOC[tc0], 0 - .csect [PR] -.__mpn_sub_n: - andil. 10,6,1 # odd or even number of limbs? - l 8,0(4) # load least significant s1 limb - l 0,0(5) # load least significant s2 limb - cal 3,-4(3) # offset res_ptr, it's updated before it's used - sri 10,6,1 # count for unrolled loop - sf 7,0,8 # subtract least significant limbs, set cy - mtctr 10 # copy count into CTR - beq 0,Leven # branch if even # of limbs (# of limbs >= 2) - -# We have an odd # of limbs. Add the first limbs separately. - cmpi 1,10,0 # is count for unrolled loop zero? - bne 1,L1 # branch if not - st 7,4(3) - sfe 3,0,0 # load !cy into ... - sfi 3,3,0 # ... return value register - br # return - -# We added least significant limbs. Now reload the next limbs to enter loop. -L1: lu 8,4(4) # load s1 limb and update s1_ptr - lu 0,4(5) # load s2 limb and update s2_ptr - stu 7,4(3) - sfe 7,0,8 # subtract limbs, set cy -Leven: lu 9,4(4) # load s1 limb and update s1_ptr - lu 10,4(5) # load s2 limb and update s2_ptr - bdz Lend # If done, skip loop - -Loop: lu 8,4(4) # load s1 limb and update s1_ptr - lu 0,4(5) # load s2 limb and update s2_ptr - sfe 11,10,9 # subtract previous limbs with cy, set cy - stu 7,4(3) # - lu 9,4(4) # load s1 limb and update s1_ptr - lu 10,4(5) # load s2 limb and update s2_ptr - sfe 7,0,8 # subtract previous limbs with cy, set cy - stu 11,4(3) # - bdn Loop # decrement CTR and loop back - -Lend: sfe 11,10,9 # subtract limbs with cy, set cy - st 7,4(3) # - st 11,8(3) # - sfe 3,0,0 # load !cy into ... - sfi 3,3,0 # ... return value register - br diff --git a/sysdeps/rs6000/submul_1.s b/sysdeps/rs6000/submul_1.s deleted file mode 100644 index 41095ab001..0000000000 --- a/sysdeps/rs6000/submul_1.s +++ /dev/null @@ -1,128 +0,0 @@ -# IBM POWER __mpn_submul_1 -- Multiply a limb vector with a limb and subtract -# the result from a second limb vector. - -# Copyright (C) 1992, 1994 Free Software Foundation, Inc. - -# This file is part of the GNU MP Library. - -# The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -# MA 02111-1307, USA. - - -# INPUT PARAMETERS -# res_ptr r3 -# s1_ptr r4 -# size r5 -# s2_limb r6 - -# The RS/6000 has no unsigned 32x32->64 bit multiplication instruction. To -# obtain that operation, we have to use the 32x32->64 signed multiplication -# instruction, and add the appropriate compensation to the high limb of the -# result. We add the multiplicand if the multiplier has its most significant -# bit set, and we add the multiplier if the multiplicand has its most -# significant bit set. We need to preserve the carry flag between each -# iteration, so we have to compute the compensation carefully (the natural, -# srai+and doesn't work). Since the POWER architecture has a branch unit -# we can branch in zero cycles, so that's how we perform the additions. - - .toc - .csect .__mpn_submul_1[PR] - .align 2 - .globl __mpn_submul_1 - .globl .__mpn_submul_1 - .csect __mpn_submul_1[DS] -__mpn_submul_1: - .long .__mpn_submul_1[PR], TOC[tc0], 0 - .csect .__mpn_submul_1[PR] -.__mpn_submul_1: - - cal 3,-4(3) - l 0,0(4) - cmpi 0,6,0 - mtctr 5 - mul 9,0,6 - srai 7,0,31 - and 7,7,6 - mfmq 11 - cax 9,9,7 - l 7,4(3) - sf 8,11,7 # add res_limb - a 11,8,11 # invert cy (r11 is junk) - blt Lneg -Lpos: bdz Lend - -Lploop: lu 0,4(4) - stu 8,4(3) - cmpi 0,0,0 - mul 10,0,6 - mfmq 0 - ae 11,0,9 # low limb + old_cy_limb + old cy - l 7,4(3) - aze 10,10 # propagate cy to new cy_limb - sf 8,11,7 # add res_limb - a 11,8,11 # invert cy (r11 is junk) - bge Lp0 - cax 10,10,6 # adjust high limb for negative limb from s1 -Lp0: bdz Lend0 - lu 0,4(4) - stu 8,4(3) - cmpi 0,0,0 - mul 9,0,6 - mfmq 0 - ae 11,0,10 - l 7,4(3) - aze 9,9 - sf 8,11,7 - a 11,8,11 # invert cy (r11 is junk) - bge Lp1 - cax 9,9,6 # adjust high limb for negative limb from s1 -Lp1: bdn Lploop - - b Lend - -Lneg: cax 9,9,0 - bdz Lend -Lnloop: lu 0,4(4) - stu 8,4(3) - cmpi 0,0,0 - mul 10,0,6 - mfmq 7 - ae 11,7,9 - l 7,4(3) - ae 10,10,0 # propagate cy to new cy_limb - sf 8,11,7 # add res_limb - a 11,8,11 # invert cy (r11 is junk) - bge Ln0 - cax 10,10,6 # adjust high limb for negative limb from s1 -Ln0: bdz Lend0 - lu 0,4(4) - stu 8,4(3) - cmpi 0,0,0 - mul 9,0,6 - mfmq 7 - ae 11,7,10 - l 7,4(3) - ae 9,9,0 # propagate cy to new cy_limb - sf 8,11,7 # add res_limb - a 11,8,11 # invert cy (r11 is junk) - bge Ln1 - cax 9,9,6 # adjust high limb for negative limb from s1 -Ln1: bdn Lnloop - b Lend - -Lend0: cal 9,0(10) -Lend: st 8,4(3) - aze 3,9 - br diff --git a/sysdeps/standalone/Subdirs b/sysdeps/standalone/Subdirs deleted file mode 100644 index 4125ae86db..0000000000 --- a/sysdeps/standalone/Subdirs +++ /dev/null @@ -1,4 +0,0 @@ -# The `bare' subdirectory defines some structure for a target-specific -# library of functions which are actually implemented in -# sysdeps/standalone/CPU/TARGET. -bare diff --git a/sysdeps/standalone/arm/bits/errno.h b/sysdeps/standalone/arm/bits/errno.h deleted file mode 100644 index 8e10754330..0000000000 --- a/sysdeps/standalone/arm/bits/errno.h +++ /dev/null @@ -1,65 +0,0 @@ -/* Copyright (C) 1991,1994,1996,1997,1998,2004 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. */ - -/* This file defines the `errno' constants for standalone ARM machines. - These constants are essentially arbitrary. */ - -#if !defined __Emath_defined && (defined _ERRNO_H || defined __need_Emath) -# undef __need_Emath -# define __Emath_defined 1 - -# define EDOM 1 -# define ERANGE 2 -#endif - -#ifdef _ERRNO_H -# define ENOSYS 3 -# define EINVAL 4 -# define ESPIPE 5 -# define EBADF 6 -# define ENOMEM 7 -# define EACCES 8 -# define ENFILE 9 -# define EMFILE 10 -# define ENAMETOOLONG 11 /* File name too long */ -# define ELOOP 12 /* Too many symbolic links encountered */ -# define ENOMSG 13 /* No message of desired type */ -# define E2BIG 14 /* Arg list too long */ -# define EINTR 15 -# define EILSEQ 16 -# define ENOEXEC 17 -# define ENOENT 18 -# define EPROTOTYPE 19 -# define ESRCH 20 -# define EPERM 21 -# define ENOTDIR 22 -# define ESTALE 23 -# define EISDIR 24 -# define EOPNOTSUPP 25 /* Operation not supported. */ -# define ENOTTY 26 -# define EAGAIN 27 -# define EIO 28 -# define ENOSPC 29 -# define EEXIST 30 -# define EBUSY 31 -# define EOVERFLOW 32 -#endif - - -/* Function to get address of global `errno' variable. */ -extern int *__errno_location (void) __THROW __attribute__ ((__const__)); diff --git a/sysdeps/standalone/arm/sysdep.c b/sysdeps/standalone/arm/sysdep.c deleted file mode 100644 index 8c17234226..0000000000 --- a/sysdeps/standalone/arm/sysdep.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997 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. */ - -#include - -/* errno has to be defined somewhere, and it might as well be here. */ -int errno = 0; - -/* The same goes for these magic signal functions. This is a standalone - environment so we do nothing. */ -void _sig_dfl(int sig) -{ -} - -void _sig_ign(int sig) -{ -} diff --git a/sysdeps/standalone/bits/errno.h b/sysdeps/standalone/bits/errno.h deleted file mode 100644 index 217c6d5d82..0000000000 --- a/sysdeps/standalone/bits/errno.h +++ /dev/null @@ -1,59 +0,0 @@ -/* Copyright (C) 1991, 1994, 1996, 1997, 1998 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. */ - -/* This file defines the `errno' constants. */ - -#if !defined __Emath_defined && (defined _ERRNO_H || defined __need_Emath) -#undef __need_Emath -#define __Emath_defined 1 - -# define EDOM 1 -# define EILSEQ 17 -# define ERANGE 2 -#endif - -#ifdef _ERRNO_H -# define ENOSYS 3 -# define EINVAL 4 -# define ESPIPE 5 -# define EBADF 6 -# define ENOMEM 7 -# define EACCES 8 -# define ENFILE 9 -# define EMFILE 10 -# define ENOMSG 11 -# define ENAMETOOLONG 12 -# define ELOOP 13 -# define E2BIG 15 -# define EINTR 16 -# define ENOEXEC 18 -# define ENOENT 19 -# define EPROTOTYPE 20 -# define ESRCH 21 -# define EPERM 22 -# define EEXIST 23 -# define ENOTDIR 24 -# define ESTALE 25 -# define ENOTTY 26 -# define EISDIR 27 -# define EOPNOTSUPP 28 -# define EAGAIN 29 -# define EIO 30 -# define ENOSPC 31 -# define EBUSY 32 -#endif diff --git a/sysdeps/standalone/brk.c b/sysdeps/standalone/brk.c deleted file mode 100644 index 32e148edcc..0000000000 --- a/sysdeps/standalone/brk.c +++ /dev/null @@ -1,66 +0,0 @@ -/* Copyright (C) 1991, 1994, 1995, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil, - On-Line Applications Research Corporation. - - 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. */ - -#include - -void *__curbrk; -void *__rorig; -void *__rlimit; - -int -__brk (inaddr) - void *inaddr; -{ - - if ( ( (void *)inaddr > (void *)__rlimit ) || - ( (void *)inaddr < (void *)__rorig ) ) - return -1; - - __curbrk = inaddr; - return 0; -} - -/* Initialization Code for Memory Allocation */ - -void *__C_heap_start; -int __C_heap_size; - -#ifdef HAVE_GNU_LD -static -#endif -void -__NONE_set_memvals (argc, argv, envp) - int argc; - char **argv; - char **envp; -{ - - __rorig = - __curbrk = __C_heap_start; - __rlimit = __curbrk + __C_heap_size; - - (void) &__NONE_set_memvals; /* Avoid "defined but not used" warning. */ -} - -#ifdef HAVE_GNU_LD -text_set_element (__libc_subinit, __NONE_set_memvals); -#endif - -weak_alias (__brk, brk) diff --git a/sysdeps/standalone/close.c b/sysdeps/standalone/close.c deleted file mode 100644 index 8c2caf1975..0000000000 --- a/sysdeps/standalone/close.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright (C) 1994, 1995, 1996, 1997, 2002 Free Software Foundation, Inc. - Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil, - On-Line Applications Research Corporation. - 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. */ - -#include -#include - -#define _STDIO_H -#include -#include "filedesc.h" - -/* Close the file descriptor FD. */ -int -__close (fd) - int fd; -{ - if ( !__FD_Is_valid( fd ) || !__FD_Table[ fd ].in_use ) - { - __set_errno (EBADF); - return -1; - } - - __FD_Table[ fd ].in_use = 0; - return 0; -} -libc_hidden_def (__close) -weak_alias (__close, close) diff --git a/sysdeps/standalone/dirstream.h b/sysdeps/standalone/dirstream.h deleted file mode 100644 index 6f58294b4c..0000000000 --- a/sysdeps/standalone/dirstream.h +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright (C) 1993, 1997 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 _DIRSTREAM_H - -#define _DIRSTREAM_H 1 - -#define __need_size_t -#include - -/* Directory stream type. - - The miscellaneous Unix `readdir' implementations read directory data - into a buffer and fill in a `struct dirent' copy in the `DIR' object. */ - -struct __dirstream - { - int __fd; /* File descriptor. */ - - char *__data; /* Directory block. */ - size_t __allocation; /* Space allocated for the block. */ - size_t __offset; /* Current offset into the block. */ - size_t __size; /* Total valid data in the block. */ - - struct dirent __entry; /* Returned by `readdir'. */ - }; - -#endif /* dirstream.h */ diff --git a/sysdeps/standalone/filedesc.h b/sysdeps/standalone/filedesc.h deleted file mode 100644 index b7c15b5010..0000000000 --- a/sysdeps/standalone/filedesc.h +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (C) 1994, 1997, 1998 Free Software Foundation, Inc. - Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil, - On-Line Applications Research Corporation. - 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. */ - -/* - * This is the file descriptor used by the no OS implementation - * of __open, __read, __write, and __close. - */ - -#ifndef __FILEDESC_h -#define __FILEDESC_h - -#define __need_FOPEN_MAX -#include - -#ifndef __DECLARE_FILE_DESCRIPTORS__ -#define FILEDESC_EXTERN extern -#else -#define FILEDESC_EXTERN -#endif - -typedef struct { - int in_use; /* 1 if in use, 0 otherwise */ - int flags; /* Flags from open */ -} __no_os_file_descriptor; - -#define __FD_Is_valid( _fd ) \ - ( (_fd) >= 0 && (_fd) < FOPEN_MAX ) - -FILEDESC_EXTERN __no_os_file_descriptor __FD_Table[ FOPEN_MAX ]; - -#endif diff --git a/sysdeps/standalone/i386/force_cpu386/Makefile b/sysdeps/standalone/i386/force_cpu386/Makefile deleted file mode 100644 index 5cb4f2819d..0000000000 --- a/sysdeps/standalone/i386/force_cpu386/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (C) 1994, 1997 Free Software Foundation, Inc. -# This file is part of the GNU C Library. -# Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), -# On-Line Applications Research Corporation. - -# 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. - -ifeq (bare,$(subdir)) -install-others += $(inst_libdir)/force_cpu386.ld -$(inst_libdir)/force_cpu386.ld: $(sysdep_dir)/standalone/i386/target.ld \ - $(+force) - $(do-install) -endif diff --git a/sysdeps/standalone/i386/force_cpu386/_exit.c b/sysdeps/standalone/i386/force_cpu386/_exit.c deleted file mode 100644 index 2da822e99b..0000000000 --- a/sysdeps/standalone/i386/force_cpu386/_exit.c +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (C) 1991, 1997, 1999, 2004 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), - On-Line Applications Research Corporation. - - 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. */ - -#include -#include - -/* This returns control to FORCEbug. */ - -void Bsp_cleanup (void); - -/* The function `_exit' should take a status argument and simply - terminate program execution, using the low-order 8 bits of the - given integer as status. */ - -__NORETURN void -_exit (status) - int status; -{ - /* status is ignored */ - Bsp_cleanup(); -} -weak_alias (_exit, _Exit) - -#ifdef HAVE_GNU_LD - -#include - -stub_warning(_exit); - -#endif /* GNU stabs. */ diff --git a/sysdeps/standalone/i386/force_cpu386/brdinit.c b/sysdeps/standalone/i386/force_cpu386/brdinit.c deleted file mode 100644 index 8392ce5857..0000000000 --- a/sysdeps/standalone/i386/force_cpu386/brdinit.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (C) 1994, 1997, 2004 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), - On-Line Applications Research Corporation. - - 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. */ - -#include -#include "i386.h" - -/* _Board_Initialize() - -This routine initializes the FORCE CPU386 board. */ - -void _Console_Initialize (void); - -void -_Board_Initialize () -{ - /* - * FORCE documentation incorrectly states that the bus request - * level is initialized to 3. It is actually initialized by - * FORCEbug to 0. - */ - - outport_byte (0x00, 0x3f); /* resets VMEbus request level */ - - _Console_Initialize (); -} diff --git a/sysdeps/standalone/i386/force_cpu386/console.c b/sysdeps/standalone/i386/force_cpu386/console.c deleted file mode 100644 index 4c7271b660..0000000000 --- a/sysdeps/standalone/i386/force_cpu386/console.c +++ /dev/null @@ -1,163 +0,0 @@ -/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), - On-Line Applications Research Corporation. - - 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. */ - -#include -#include "i386.h" - -/* Console IO routines for a FORCE CPU386 board. */ - -/* Force CPU/386 specific IO addressing - * - * The following determines whether Port B or the Console should - * be used for console I/O. Setting ONE (and only ONE) of these to 1 - * enables I/O on that port. - * - * PORT A - DUSCC MC68562 Channel A (*** not supported here ***) - * PORT B - DUSCC MC68562 Channel B - * PORT C - MFP MC68901 Channel (*** FORCEbug console ***) - */ - -#define PORTB 1 /* use port b as console */ -#define PORTC 0 /* use console port as console */ - -#if ( PORTB == 1 ) -#define TX_STATUS 0x1b6 /* DUSCC General Status Register */ -#define RX_STATUS 0x1b6 /* DUSCC General Status Register */ -#define TX_BUFFER 0x1e0 /* DUSCC Transmitter Channel B */ -#define RX_BUFFER 0x1e8 /* DUSCC Receiver Channel B */ -#define Is_tx_ready( _status ) ( (_status) & 0x20 ) -#define Is_rx_ready( _status ) ( (_status) & 0x10 ) -#endif - -#if ( PORTC == 1 ) -#define TX_STATUS 0x12c /* MFP Transmit Status Register */ -#define RX_STATUS 0x12a /* MFP Receive Status Register */ -#define TX_BUFFER 0x12e /* MFP Transmitter Channel */ -#define RX_BUFFER 0x12e /* MFP Receiver Channel */ -#define Is_tx_ready( _status ) ( (_status) & 0x80 ) -#define Is_rx_ready( _status ) ( (_status) & 0x80 ) -#endif - -/* _Console_Initialize - -On the Force board the console require some initialization. */ - -void -_Console_Initialize () -{ - register unsigned8 ignored; - - /* FORCE technical support mentioned that it may be necessary to - read the DUSCC RX_BUFFER port four times to remove all junk. - This code is a little more paranoid. */ - - inport_byte( RX_BUFFER, ignored ); - inport_byte( RX_BUFFER, ignored ); - inport_byte( RX_BUFFER, ignored ); - inport_byte( RX_BUFFER, ignored ); - inport_byte( RX_BUFFER, ignored ); -} - -/* Miscellaneous support for console IO */ - -static inline int _Force386_is_rx_ready () -{ - register unsigned8 status; - - inport_byte( RX_STATUS, status ); - - if ( Is_rx_ready( status ) ) return 1; - else return 0; -} - -static inline int _Force386_is_tx_ready () -{ - register unsigned8 status; - - inport_byte( TX_STATUS, status ); - - if ( Is_tx_ready( status ) ) return 1; - else return 0; -} - - -static inline int _Force386_read_data () -{ - register unsigned8 ch; - -#if ( PORTB == 1 ) - /* Force example code resets the Channel B Receiver here. - * It appears to cause XON's to be lost. - */ - - /* outport_byte( RX_STATUS, 0x10 ); */ -#endif - - inport_byte( RX_BUFFER, ch ); - - return ch; -} - -/* _Console_Putc - -This routine transmits a character. It supports XON/XOFF flow control. */ - -#define XON 0x11 /* control-Q */ -#define XOFF 0x13 /* control-S */ - -int -_Console_Putc (ch) - char ch; -{ - register unsigned8 inch; - - while ( !_Force386_is_tx_ready() ); - - while ( _Force386_is_rx_ready() == 1 ) { /* must be an XOFF */ - inch = _Force386_read_data(); - if ( inch == XOFF ) - do { - while ( _Force386_is_rx_ready() == 0 ); - inch = _Force386_read_data(); - } while ( inch != XON ); - } - - outport_byte( TX_BUFFER, ch ); - return( 0 ); -} - -/* _Console_Getc - -This routine reads a character from the UART and returns it. */ - -int -_Console_Getc (poll) - int poll; -{ - if ( poll ) { - if ( !_Force386_is_rx_ready() ) - return -1; - else - return _Force386_read_data(); - } else { - while ( !_Force386_is_rx_ready() ); - return _Force386_read_data(); - } -} diff --git a/sysdeps/standalone/i386/force_cpu386/strtsupp.S b/sysdeps/standalone/i386/force_cpu386/strtsupp.S deleted file mode 100644 index 5d9ac5c4a1..0000000000 --- a/sysdeps/standalone/i386/force_cpu386/strtsupp.S +++ /dev/null @@ -1,87 +0,0 @@ -/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. - Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), - On-Line Applications Research Corporation. - 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. */ - -/* This file assists the board independent startup code by - * loading the proper segment register values. The values - * loaded are dependent on the FORCEBUG. - * - * NOTE: No stack has been established when this routine - * is invoked. It returns by jumping back to the start code. - * - */ - -/* - * FORCEBUG loads us into a virtual address space which - * really starts at PHYSICAL_ADDRESS_BASE. - * - */ - -.set PHYSICAL_ADDRESS_BASE, 0x00002000 - -/* - * At reset time, FORCEBUG normally has the segment selectors preloaded. - * If a human resets the instruction pointer, this will not have occurred. - * However, no guarantee can be made of the other registers if cs:ip was - * modified to restart the program. Because of this, the BSP reloads all - * segment registers (except cs) with the values they have following - * a reset. - */ - - -.set RESET_SS, 0x40 # initial value of stack segment register -.set RESET_DS, 0x40 # initial value of data segment register -.set RESET_ES, 0x40 # initial value of extra segment register -.set RESET_FS, 0x40 # initial value of "f" segment register -.set RESET_GS, 0x30 # initial value of "g" segment register - - -#define LOAD_SEGMENTS(_value,_segreg) \ - movw $_value##,%ax ; \ - movw %ax,##_segreg - - - .global _load_segments - - .global _establish_stack - -_load_segments: - - LOAD_SEGMENTS( RESET_SS, %ss ) - LOAD_SEGMENTS( RESET_DS, %ds ) - LOAD_SEGMENTS( RESET_ES, %es ) - LOAD_SEGMENTS( RESET_FS, %fs ) - LOAD_SEGMENTS( RESET_GS, %gs ) - - jmp _establish_stack # return to the bsp entry code - - .global _return_to_monitor -_return_to_monitor: - - movb $0,%al - int $0x20 # restart FORCEbug - jmp start # FORCEbug does not reset PC - - .data - - .global _Do_Load_IDT -_Do_Load_IDT: .byte 1 - - .global _Do_Load_GDT -_Do_Load_GDT: .byte 0 diff --git a/sysdeps/standalone/i386/force_cpu386/target.ld b/sysdeps/standalone/i386/force_cpu386/target.ld deleted file mode 100644 index d040cf9784..0000000000 --- a/sysdeps/standalone/i386/force_cpu386/target.ld +++ /dev/null @@ -1,58 +0,0 @@ -/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. - Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), - On-Line Applications Research Corporation. - 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. */ - -/* This file contains directives for the GNU linker which are specific -to the FORCE CPU386 board. */ - -MEMORY - { - ram : org = 0x0, l = 1M - } - -/* This value is also when the space is allocated. If you change -this one, change the other one!!! */ - -heap_size = 0x20000; - -SECTIONS -{ - .text 0x0 : - { - _text_start = ABSOLUTE(.) ; - *(.text) - _etext = ALIGN( 0x10 ) ; - } - .data ADDR( .text ) + SIZEOF( .text ): - { - _data_start = . ; - *(.data) - _edata = ALIGN( 0x10 ) ; - } - .bss ADDR( .data ) + SIZEOF( .data ): - { - _bss_start = . ; - *(.bss) - *(COMMON) - heap_memory = .; - . += 0x20000; - _end = . ; - __end = . ; - } -} diff --git a/sysdeps/standalone/i386/i386.h b/sysdeps/standalone/i386/i386.h deleted file mode 100644 index 364e8abb3d..0000000000 --- a/sysdeps/standalone/i386/i386.h +++ /dev/null @@ -1,326 +0,0 @@ -/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. - Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), - On-Line Applications Research Corporation. - 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. */ - -/* i386.h - * - * This file contains macros which are used to access i80386 - * registers which are not addressable by C. This file contains - * functions which are useful to those developing target - * specific support routines. - */ - -#ifndef i386_h__ -#define i386_h__ - -typedef unsigned char unsigned8; -typedef unsigned short unsigned16; -typedef unsigned int unsigned32; - -#define disable_intr( isrlevel ) \ - { (isrlevel) = 0; \ - asm volatile ( "pushf ; \ - pop %0 ; \ - cli " \ - : "=r" ((isrlevel)) : "0" ((isrlevel)) ); \ - } - - -#define enable_intr( isrlevel ) \ - { asm volatile ( "push %0 ; \ - popf " \ - : "=r" ((isrlevel)) : "0" ((isrlevel)) ); \ - } - -#define delay( _microseconds ) \ - { \ - unsigned32 _counter; \ - \ - _counter = (_microseconds); \ - \ - asm volatile ( "0: nop;" \ - " mov %0,%0 ;" \ - " loop 0" : "=c" (_counter) \ - : "0" (_counter) \ - ); \ - \ - } - -/* segment access functions */ - -static inline unsigned16 get_cs() -{ - register unsigned16 segment = 0; - - asm volatile ( "movw %%cs,%0" : "=r" (segment) : "0" (segment) ); - - return segment; -} - -static inline unsigned16 get_ds() -{ - register unsigned16 segment = 0; - - asm volatile ( "movw %%ds,%0" : "=r" (segment) : "0" (segment) ); - - return segment; -} - -static inline unsigned16 get_es() -{ - register unsigned16 segment = 0; - - asm volatile ( "movw %%es,%0" : "=r" (segment) : "0" (segment) ); - - return segment; -} - -static inline unsigned16 get_ss() -{ - register unsigned16 segment = 0; - - asm volatile ( "movw %%ss,%0" : "=r" (segment) : "0" (segment) ); - - return segment; -} - -static inline unsigned16 get_fs() -{ - register unsigned16 segment = 0; - - asm volatile ( "movw %%fs,%0" : "=r" (segment) : "0" (segment) ); - - return segment; -} - -static inline unsigned16 get_gs() -{ - register unsigned16 segment = 0; - - asm volatile ( "movw %%gs,%0" : "=r" (segment) : "0" (segment) ); - - return segment; -} - -/* i80x86 I/O instructions */ - -#define outport_byte( _port, _value ) \ - { register unsigned16 __port = _port; \ - register unsigned8 __value = _value; \ - \ - asm volatile ( "outb %0,%1" : "=a" (__value), "=d" (__port) \ - : "0" (__value), "1" (__port) \ - ); \ - } - -#define outport_word( _port, _value ) \ - { register unsigned16 __port = _port; \ - register unsigned16 __value = _value; \ - \ - asm volatile ( "outw %0,%1" : "=a" (__value), "=d" (__port) \ - : "0" (__value), "1" (__port) \ - ); \ - } - -#define outport_long( _port, _value ) \ - { register unsigned16 __port = _port; \ - register unsigned32 __value = _value; \ - \ - asm volatile ( "outl %0,%1" : "=a" (__value), "=d" (__port) \ - : "0" (__value), "1" (__port) \ - ); \ - } - -#define inport_byte( _port, _value ) \ - { register unsigned16 __port = _port; \ - register unsigned8 __value = 0; \ - \ - asm volatile ( "inb %1,%0" : "=a" (__value), "=d" (__port) \ - : "0" (__value), "1" (__port) \ - ); \ - _value = __value; \ - } - -#define inport_word( _port, _value ) \ - { register unsigned16 __port = _port; \ - register unsigned16 __value = 0; \ - \ - asm volatile ( "inw %1,%0" : "=a" (__value), "=d" (__port) \ - : "0" (__value), "1" (__port) \ - ); \ - _value = __value; \ - } - -#define inport_long( _port, _value ) \ - { register unsigned16 __port = _port; \ - register unsigned32 __value = 0; \ - \ - asm volatile ( "inl %1,%0" : "=a" (__value), "=d" (__port) \ - : "0" (__value), "1" (__port) \ - ); \ - _value = __value; \ - } - -/* structures */ - -/* See Chapter 5 - Memory Management in i386 manual */ - -struct GDT_slot { - unsigned16 limit_0_15; - unsigned16 base_0_15; - unsigned8 base_16_23; - unsigned8 type_dt_dpl_p; - unsigned8 limit_16_19_granularity; - unsigned8 base_24_31; -}; - -/* See Chapter 9 - Exceptions and Interrupts in i386 manual - * - * NOTE: This is the IDT entry for interrupt gates ONLY. - */ - -struct IDT_slot { - unsigned16 offset_0_15; - unsigned16 segment_selector; - unsigned8 reserved; - unsigned8 p_dpl; - unsigned16 offset_16_31; -}; - -struct DTR_load_save_format { - unsigned16 limit; - unsigned32 physical_address; -}; - -/* variables */ - -extern struct IDT_slot Interrupt_descriptor_table[ 256 ]; -extern struct GDT_slot Global_descriptor_table[ 8192 ]; - -/* functions */ - -#ifdef CPU_INITIALIZE -#define EXTERN -#else -#undef EXTERN -#define EXTERN extern -#endif - -void *Logical_to_physical( - unsigned16 segment, - void *address -); - -void *Physical_to_logical( - unsigned16 segment, - void *address -); - -/* complicated static inline functions */ - -#define get_GDTR( _gdtr_address ) \ - { \ - void *_gdtr = (_gdtr_address); \ - \ - asm volatile( "sgdt (%0)" : "=r" (_gdtr) : "0" (_gdtr) ); \ - } - -#define get_GDT_slot( _gdtr_base, _segment, _slot_address ) \ - { \ - register unsigned32 _gdt_slot = (_gdtr_base) + (_segment); \ - register volatile void *_slot = (_slot_address); \ - register unsigned32 _temporary = 0; \ - \ - asm volatile( "movl %%gs:(%0),%1 ; \ - movl %1,(%2) ; \ - movl %%gs:4(%0),%1 ; \ - movl %1,4(%2)" \ - : "=r" (_gdt_slot), "=r" (_temporary), "=r" (_slot) \ - : "0" (_gdt_slot), "1" (_temporary), "2" (_slot) \ - ); \ - } - -#define set_GDT_slot( _gdtr_base, _segment, _slot_address ) \ - { \ - register unsigned32 _gdt_slot = (_gdtr_base) + (_segment); \ - register volatile void *_slot = (_slot_address); \ - register unsigned32 _temporary = 0; \ - \ - asm volatile( "movl (%2),%1 ; \ - movl %1,%%gs:(%0) ; \ - movl 4(%2),%1 ; \ - movl %1,%%gs:4(%0) \ - " \ - : "=r" (_gdt_slot), "=r" (_temporary), "=r" (_slot) \ - : "0" (_gdt_slot), "1" (_temporary), "2" (_slot) \ - ); \ - } - -static inline void set_segment( - unsigned16 segment, - unsigned32 base, - unsigned32 limit -) -{ - struct DTR_load_save_format gdtr; - volatile struct GDT_slot Gdt_slot; - volatile struct GDT_slot *gdt_slot = &Gdt_slot; - unsigned16 tmp_segment = 0; - unsigned32 limit_adjusted; - - - /* load physical address of the GDT */ - - get_GDTR( &gdtr ); - - gdt_slot->type_dt_dpl_p = 0x92; /* present, dpl=0, */ - /* application=1, */ - /* type=data read/write */ - gdt_slot->limit_16_19_granularity = 0x40; /* 32 bit segment */ - - limit_adjusted = limit; - if ( limit > 4095 ) { - gdt_slot->limit_16_19_granularity |= 0x80; /* set granularity bit */ - limit_adjusted /= 4096; - } - - gdt_slot->limit_16_19_granularity |= (limit_adjusted >> 16) & 0xff; - gdt_slot->limit_0_15 = limit_adjusted & 0xffff; - - gdt_slot->base_0_15 = base & 0xffff; - gdt_slot->base_16_23 = (base >> 16) & 0xff; - gdt_slot->base_24_31 = (base >> 24); - - set_GDT_slot( gdtr.physical_address, segment, gdt_slot ); - - /* Now, reload all segment registers so the limit takes effect. */ - - asm volatile( "movw %%ds,%0 ; movw %0,%%ds\n" - "movw %%es,%0 ; movw %0,%%es\n" - "movw %%fs,%0 ; movw %0,%%fs\n" - "movw %%gs,%0 ; movw %0,%%gs\n" - "movw %%ss,%0 ; movw %0,%%ss" - : "=r" (tmp_segment) - : "0" (tmp_segment) - ); - -} - -#endif -/* end of include file */ diff --git a/sysdeps/standalone/i386/start.S b/sysdeps/standalone/i386/start.S deleted file mode 100644 index b3fd315e5a..0000000000 --- a/sysdeps/standalone/i386/start.S +++ /dev/null @@ -1,338 +0,0 @@ -/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. - Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), - On-Line Applications Research Corporation. - 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. - - In addition to the permissions in the GNU Lesser General Public - License, the Free Software Foundation gives you unlimited - permission to link the compiled version of this file with other - programs, and to distribute those programs without any restriction - coming from the use of this file. (The GNU Lesser General Public - License restrictions do apply in other respects; for example, they - cover modification of the file, and distribution when not linked - into another program.) - - Note that people who make modified versions of this file are not - obligated to grant this special exception for their modified - versions; it is their choice whether to do so. The GNU Lesser - General Public License gives permission to release a modified - version without this exception; this exception also makes it - possible to release a modified version which carries forward this - exception. - - 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. */ - -/* entry.s - * - * This file contains the entry point for the application. - * The name of this entry point is compiler dependent. - * It jumps to the BSP which is responsible for performing - * all initialization. - * - */ - - .data - .global _Do_Load_IDT - .global _Do_Load_GDT - - .text - .global start # GNU default entry point - .global _establish_stack - - .global _bsp_start - .global _load_segments - .global __exit - -start: - nop - cli # DISABLE INTERRUPTS!!! -# -# Load the segment registers -# -# NOTE: Upon return, gs will contain the segment descriptor for -# a segment which maps directly to all of physical memory. -# - jmp _load_segments # load board dependent segments - -# -# Set up the stack -# - -_establish_stack: - - movl $stack_end,%esp # set stack pointer - movl $stack_end,%ebp # set base pointer - -# -# Zero out the BSS segment -# -zero_bss: - cld # make direction flag count up - movl $_end,%ecx # find end of .bss - movl $_bss_start,%edi # edi = beginning of .bss - subl %edi,%ecx # ecx = size of .bss in bytes - shrl $2,%ecx # size of .bss in longs - xorl %eax,%eax # value to clear out memory - repne # while ecx != 0 - stosl # clear a long in the bss - -# -# Set the C heap information for malloc -# - movl $heap_size,___C_heap_size # set ___C_heap_size - movl $heap_memory,___C_heap_start # set ___C_heap_start - -# -# Copy the Global Descriptor Table to our space -# - - sgdt _Original_GDTR # save original GDT - movzwl _Original_GDTR_limit,%ecx # size of GDT in bytes; limit - # is 8192 entries * 8 bytes per - - # make ds:esi point to the original GDT - - movl _Original_GDTR_base,%esi - push %ds # save ds - movw %gs,%ax - movw %ax,%ds - - # make es:edi point to the new (our copy) GDT - movl $_Global_descriptor_table,%edi - - rep - movsb # copy the GDT (ds:esi -> es:edi) - - pop %ds # restore ds - - # Build and load new contents of GDTR - movw _Original_GDTR_limit,%ecx # set new limit - movw %cx,_New_GDTR_limit - - push $_Global_descriptor_table - push %es - call _Logical_to_physical - addl $6,%esp - movl %eax,_New_GDTR_base # set new base - - cmpb $0,_Do_Load_GDT # Should the new GDT be loaded? - je no_gdt_load # NO, then branch - lgdt _New_GDTR # load the new GDT -no_gdt_load: - -# -# Copy the Interrupt Descriptor Table to our space -# - - sidt _Original_IDTR # save original IDT - movzwl _Original_IDTR_limit,%ecx # size of IDT in bytes; limit - # is 256 entries * 8 bytes per - - - # make ds:esi point to the original IDT - movl _Original_IDTR_base,%esi - - push %ds # save ds - movw %gs,%ax - movw %ax,%ds - - # make es:edi point to the new (our copy) IDT - movl $_Interrupt_descriptor_table,%edi - - rep - movsb # copy the IDT (ds:esi -> es:edi) - pop %ds # restore ds - - # Build and load new contents of IDTR - movw _Original_IDTR_limit,%ecx # set new limit - movw %cx,_New_IDTR_limit - - push $_Interrupt_descriptor_table - push %es - call _Logical_to_physical - addl $6,%esp - movl %eax,_New_IDTR_base # set new base - - cmpb $0,_Do_Load_IDT # Should the new IDT be loaded? - je no_idt_load # NO, then branch - lidt _New_IDTR # load the new IDT -no_idt_load: - -# -# Initialize the i387. -# -# Using the NO WAIT form of the instruction insures that if -# it is not present the board will not lock up or get an -# exception. -# - - fninit # MUST USE NO-WAIT FORM - - call __Board_Initialize # initialize the board - - pushl $0 # envp = NULL - pushl $0 # argv = NULL - pushl $0 # argc = NULL - call ___libc_init # initialize the library and - # call main - addl $12,%esp - - pushl $0 # argc = NULL - call __exit # call the Board specific exit - addl $4,%esp - -# -# Clean up -# - - - .global _Bsp_cleanup - - .global _return_to_monitor - -_Bsp_cleanup: - cmpb $0,_Do_Load_IDT # Was the new IDT loaded? - je no_idt_restore # NO, then branch - lidt _Original_IDTR # restore the new IDT -no_idt_restore: - - cmpb $0,_Do_Load_GDT # Was the new GDT loaded? - je no_gdt_restore # NO, then branch - lgdt _Original_GDTR # restore the new GDT -no_gdt_restore: - jmp _return_to_monitor - -# -# void *Logical_to_physical( -# rtems_unsigned16 segment, -# void *address -# ); -# -# Returns thirty-two bit physical address for segment:address. -# - - .global _Logical_to_physical - -.set SEGMENT_ARG, 4 -.set ADDRESS_ARG, 8 - -_Logical_to_physical: - - xorl %eax,%eax # clear eax - movzwl SEGMENT_ARG(%esp),%ecx # ecx = segment value - movl $_Global_descriptor_table,%edx # edx = address of our GDT - addl %ecx,%edx # edx = address of desired entry - movb 7(%edx),%ah # ah = base 31:24 - movb 4(%edx),%al # al = base 23:16 - shll $16,%eax # move ax into correct bits - movw 2(%edx),%ax # ax = base 0:15 - movl ADDRESS_ARG(%esp),%ecx # ecx = address to convert - addl %eax,%ecx # ecx = physical address equivalent - movl %ecx,%eax # eax = ecx - ret - -# -# void *Physical_to_logical( -# rtems_unsigned16 segment, -# void *address -# ); -# -# Returns thirty-two bit physical address for segment:address. -# - - .global _Physical_to_logical - -#.set SEGMENT_ARG, 4 -#.set ADDRESS_ARG, 8 -- use sets from above - -_Physical_to_logical: - - xorl %eax,%eax # clear eax - movzwl SEGMENT_ARG(%esp),%ecx # ecx = segment value - movl $_Global_descriptor_table,%edx # edx = address of our GDT - addl %ecx,%edx # edx = address of desired entry - movb 7(%edx),%ah # ah = base 31:24 - movb 4(%edx),%al # al = base 23:16 - shll $16,%eax # move ax into correct bits - movw 2(%edx),%ax # ax = base 0:15 - movl ADDRESS_ARG(%esp),%ecx # ecx = address to convert - subl %eax,%ecx # ecx = logical address equivalent - movl %ecx,%eax # eax = ecx - ret - - -/* - * Data Declarations. Start with a macro which helps declare space. - */ - - .bss - -#define DECLARE_SPACE(_name,_space,_align) \ - .globl _name ; \ - .align _align ; \ -_name##: .space _space - -#define DECLARE_LABEL(_name) \ - .globl _name ; \ -_name##: - -#define DECLARE_PTR(_name) DECLARE_SPACE(_name,4,2) -#define DECLARE_U32(_name) DECLARE_SPACE(_name,4,2) -#define DECLARE_U16(_name) DECLARE_SPACE(_name,2,1) - -/* - * Require environment stuff - */ - -DECLARE_LABEL(_environ) -DECLARE_PTR(environ) - -DECLARE_LABEL(_errno) -DECLARE_U32(errno) - -/* - * Miscellaneous Variables used to restore the CPU state. - * - * Start with a macro to declare the space for the contents of - * a Descriptor Table register. - */ - -#define DECLARE_DTR_SPACE(_name) \ - .global _name ; \ - .align 4 ; \ -_name##: ; \ -_name##_limit: .space 2 ; \ -_name##_base: .space 4 - -DECLARE_SPACE(_Interrupt_descriptor_table,256*8,4) -DECLARE_SPACE(_Global_descriptor_table,8192*8,4) - -DECLARE_DTR_SPACE(_Original_IDTR) -DECLARE_DTR_SPACE(_New_IDTR) -DECLARE_DTR_SPACE(_Original_GDTR) -DECLARE_DTR_SPACE(_New_GDTR) - -DECLARE_SPACE(_Physical_base_of_ds,4,4) -DECLARE_SPACE(_Physical_base_of_cs,4,4) - -/* - * Stack Size and Space - */ - - .set stack_size, 0x20000 - -DECLARE_SPACE(stack_memory,stack_size,4) -DECLARE_LABEL(stack_end) diff --git a/sysdeps/standalone/i960/i960ca.h b/sysdeps/standalone/i960/i960ca.h deleted file mode 100644 index 0dcf5c374a..0000000000 --- a/sysdeps/standalone/i960/i960ca.h +++ /dev/null @@ -1,206 +0,0 @@ -/* Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), - On-Line Applications Research Corporation. - - 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. */ - -/* i960ca.h - * - * This file contains macros which are used to access i80960CA - * registers which are not addressable by C. The functions - * in this file should be useful to the developer of target - * specific code. - */ - -#ifndef i960ca_h__ -#define i960ca_h__ - -typedef unsigned char unsigned8; -typedef unsigned short unsigned16; -typedef unsigned int unsigned32; - -/* - * Intel i80960CA Processor Control Block - */ - -struct i80960ca_prcb { - unsigned32 *fault_tbl; /* fault table base address */ - struct i80960ca_ctltbl - *control_tbl; /* control table base address */ - unsigned32 initial_ac; /* AC register initial value */ - unsigned32 fault_config; /* fault configuration word */ - void *intr_tbl; /* interrupt table base address */ - void *sys_proc_tbl; /* system procedure table */ - /* base address */ - unsigned32 reserved; /* reserved */ - unsigned32 *intr_stack; /* interrupt stack pointer */ - unsigned32 ins_cache_cfg; /* instruction cache */ - /* configuration word */ - unsigned32 reg_cache_cfg; /* register cache */ - /* configuration word */ -}; - -/* - * Intel i80960CA Control Table - */ - -struct i80960ca_ctltbl { - /* Control Group 0 */ - unsigned32 ipb0; /* IP breakpoint 0 */ - unsigned32 ipb1; /* IP breakpoint 1 */ - unsigned32 dab0; /* data address breakpoint 0 */ - unsigned32 dab1; /* data address breakpoint 1 */ - /* Control Group 1 */ - unsigned32 imap0; /* interrupt map 0 */ - unsigned32 imap1; /* interrupt map 1 */ - unsigned32 imap2; /* interrupt map 2 */ - unsigned32 icon; /* interrupt control */ - /* Control Group 2 */ - unsigned32 mcon0; /* memory region 0 configuration */ - unsigned32 mcon1; /* memory region 1 configuration */ - unsigned32 mcon2; /* memory region 2 configuration */ - unsigned32 mcon3; /* memory region 3 configuration */ - /* Control Group 3 */ - unsigned32 mcon4; /* memory region 4 configuration */ - unsigned32 mcon5; /* memory region 5 configuration */ - unsigned32 mcon6; /* memory region 6 configuration */ - unsigned32 mcon7; /* memory region 7 configuration */ - /* Control Group 4 */ - unsigned32 mcon8; /* memory region 8 configuration */ - unsigned32 mcon9; /* memory region 9 configuration */ - unsigned32 mcon10; /* memory region 10 configuration */ - unsigned32 mcon11; /* memory region 11 configuration */ - /* Control Group 5 */ - unsigned32 mcon12; /* memory region 12 configuration */ - unsigned32 mcon13; /* memory region 13 configuration */ - unsigned32 mcon14; /* memory region 14 configuration */ - unsigned32 mcon15; /* memory region 15 configuration */ - /* Control Group 6 */ - unsigned32 bpcon; /* breakpoint control */ - unsigned32 tc; /* trace control */ - unsigned32 bcon; /* bus configuration control */ - unsigned32 reserved; /* reserved */ -}; - -#define disable_intr( oldlevel ) \ - { (oldlevel) = 0x1f0000; \ - asm volatile ( "modpc 0,%1,%1" \ - : "=d" ((oldlevel)) \ - : "0" ((oldlevel)) ); \ - } - -#define enable_intr( oldlevel ) \ - { unsigned32 _mask = 0x1f0000; \ - asm volatile ( "modpc 0,%0,%1" \ - : "=d" (_mask), "=d" ((oldlevel)) \ - : "0" (_mask), "1" ((oldlevel)) ); \ - } - -#define flash_intr( oldlevel ) \ - { unsigned32 _mask = 0x1f0000; \ - asm volatile ( "modpc 0,%0,%1 ; \ - mov %0,%1 ; \ - modpc 0,%0,%1" \ - : "=d" (_mask), "=d" ((oldlevel)) \ - : "0" (_mask), "1" ((oldlevel)) ); \ - } - -#define atomic_modify( mask, addr, prev ) \ - { register unsigned32 _mask = (mask); \ - register unsigned32 *_addr = (unsigned32 *)(addr); \ - asm volatile( "atmod %0,%1,%1" \ - : "=d" (_addr), "=d" (_mask) \ - : "0" (_addr), "1" (_mask) ); \ - (prev) = _mask; \ - } - -#define delay( microseconds ) \ - { register unsigned32 _delay=(microseconds); \ - register unsigned32 _tmp; \ - asm volatile( "delay0: \ - remo 3,31,%0 ; \ - cmpo 0,%0 ; \ - subo 1,%1,%1 ; \ - cmpobne.t 0,%1,delay0 " \ - : "=d" (_tmp), "=d" (_delay) \ - : "0" (_tmp), "1" (_delay) ); \ - } - -#define enable_tracing() \ - { register unsigned32 _pc = 0x1; \ - asm volatile( "modpc 0,%0,%0" : "=d" (_pc) : "0" (_pc) ); \ - } - -#define unmask_intr( xint ) \ - { register unsigned32 _mask= (1<<(xint)); \ - asm volatile( "or sf1,%0,sf1" : "=d" (_mask) : "0" (_mask) ); \ - } - -#define mask_intr( xint ) \ - { register unsigned32 _mask= (1<<(xint)); \ - asm volatile( "andnot %0,sf1,sf1" : "=d" (_mask) : "0" (_mask) ); \ - } - -#define clear_intr( xint ) \ - { register unsigned32 _xint=(xint); \ - asm volatile( "loop_til_cleared:" \ - " clrbit %0,sf0,sf0 ;" \ - " bbs %0,sf0,loop_til_cleared" \ - : "=d" (_xint) : "0" (_xint) ); \ - } - -#define reload_ctl_group( group ) \ - { register int _cmd = ((group)|0x400) ; \ - asm volatile( "sysctl %0,%0,%0" : "=d" (_cmd) : "0" (_cmd) ); \ - } - -#define cause_intr( intr ) \ - { register int _intr = (intr); \ - asm volatile( "sysctl %0,%0,%0" : "=d" (_intr) : "0" (_intr) ); \ - } - -#define soft_reset( prcb ) \ - { register struct i80960ca_prcb *_prcb = (prcb); \ - register unsigned32 *_next=0; \ - register unsigned32 _cmd = 0x30000; \ - asm volatile( "lda next,%1; \ - sysctl %0,%1,%2; \ - next: mov g0,g0" \ - : "=d" (_cmd), "=d" (_next), "=d" (_prcb) \ - : "0" (_cmd), "1" (_next), "2" (_prcb) ); \ - } - -static inline unsigned32 pend_intrs() -{ register unsigned32 _intr=0; - asm volatile( "mov sf0,%0" : "=d" (_intr) : "0" (_intr) ); - return ( _intr ); -} - -static inline unsigned32 mask_intrs() -{ register unsigned32 _intr=0; - asm volatile( "mov sf1,%0" : "=d" (_intr) : "0" (_intr) ); - return( _intr ); -} - -static inline unsigned32 get_fp() -{ register unsigned32 _fp=0; - asm volatile( "mov fp,%0" : "=d" (_fp) : "0" (_fp) ); - return ( _fp ); -} - -#endif -/* end of include file */ diff --git a/sysdeps/standalone/i960/nindy960/Makefile b/sysdeps/standalone/i960/nindy960/Makefile deleted file mode 100644 index 40ead970ad..0000000000 --- a/sysdeps/standalone/i960/nindy960/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (C) 1993, 1997 Free Software Foundation, Inc. -# This file is part of the GNU C Library. -# Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), -# On-Line Applications Research Corporation. - -# 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. - - -# The nindy960 support has only been tested on the following boards: -# -# + Cyclone CVME961 VMEbus single board computer. diff --git a/sysdeps/standalone/i960/nindy960/_exit.c b/sysdeps/standalone/i960/nindy960/_exit.c deleted file mode 100644 index 9cd3f8519e..0000000000 --- a/sysdeps/standalone/i960/nindy960/_exit.c +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright (C) 1991, 1997, 1999 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), - On-Line Applications Research Corporation. - - 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. */ - -#include -#include - -/* The function `_exit' should take a status argument and simply - terminate program execution, using the low-order 8 bits of the - given integer as status. */ - -/* This returns control to Nindy. */ -/* XXX where is __NORETURN ? */ -__NORETURN void -_exit (status) - int status; -{ - /* status is ignored */ - - asm volatile( "mov 0,g0; \ - fmark ; \ - syncf ; \ - .word 0xfeedface ; \ - bx start" : : ); - /* The constant 0xfeedface is a magic word for break which - * is defined by NINDY. The branch extended restarts the - * application if the user types "go". - */ -} -weak_alias (_exit, _Exit) - - -#ifdef HAVE_GNU_LD - -#include - -stub_warning(_exit); - -#endif /* GNU stabs. */ diff --git a/sysdeps/standalone/i960/nindy960/brdinit.c b/sysdeps/standalone/i960/nindy960/brdinit.c deleted file mode 100644 index 9985a9930e..0000000000 --- a/sysdeps/standalone/i960/nindy960/brdinit.c +++ /dev/null @@ -1,64 +0,0 @@ -/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), - On-Line Applications Research Corporation. - - 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. */ - -#include -#include "i960ca.h" - -/* _Board_Initialize() - -This routine initializes the board. - -NOTE: Only tested on a Cyclone CVME961 but should be OK on any i960ca board. */ - -void -_Board_Initialize () -{ - struct i80960ca_prcb *prcb; /* ptr to processor control block */ - struct i80960ca_ctltbl *ctl_tbl; /* ptr to control table */ - - static inline struct i80960ca_prcb *get_prcb() - { register struct i80960ca_prcb *_prcb = 0; - asm volatile( "calls 5; \ - mov g0,%0" \ - : "=d" (_prcb) \ - : "0" (_prcb) ); - return ( _prcb ); - } - - prcb = get_prcb (); - ctl_tbl = prcb->control_tbl; - - /* The following configures the data breakpoint (which must be set - * before this is executed) to break on writes only. - */ - - ctl_tbl->bpcon &= ~0x00cc0000; - reload_ctl_group (6); - - /* bit 31 of the Register Cache Control can be set to - * enable an alternative caching algorithm. It does - * not appear to help our applications. - */ - - /* Configure Number of Register Caches */ - - prcb->reg_cache_cfg = 8; - soft_reset (prcb); -} diff --git a/sysdeps/standalone/i960/nindy960/console.c b/sysdeps/standalone/i960/nindy960/console.c deleted file mode 100644 index b062d9215b..0000000000 --- a/sysdeps/standalone/i960/nindy960/console.c +++ /dev/null @@ -1,76 +0,0 @@ -/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), - On-Line Applications Research Corporation. - - 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. */ - -#include -#include "i960ca.h" - -/* Console IO routines for a NINDY960 board. */ - -/* - * NINDY_IO( ... ) - * - * Interface to NINDY. - */ - -#define NINDY_INPUT 0 -#define NINDY_OUTPUT 1 - -void ___NINDY_IO_WRAPPER( void ) /* never called */ -{ - asm volatile ( " .text" ); - asm volatile ( " .align 4" ); - asm volatile ( " .globl _NINDY_IO" ); - asm volatile ( "_NINDY_IO:" ); - asm volatile ( " calls 0 /* call console routines */" ); - asm volatile ( " ret" ); -} - -/***** !!!! HOW DO I EXFUN NINDY_IO? !!!! *****/ - -/* _Console_Putc - -This routine transmits a character using NINDY. */ - -int -_Console_Putc (ch) - char ch; -{ - NINDY_IO( NINDY_OUTPUT, ch ); - return( 0 ); -} - -/* _Console_Getc - -This routine reads a character from NINDY and returns it. */ - -int -_Console_Getc (poll) - int poll; -{ - char ch; - - if ( poll ) { - /* I don't know how to poll with NINDY */ - return -1; - } else { - NINDY_IO( NINDY_INPUT, &ch ); - return ch; - } -} diff --git a/sysdeps/standalone/i960/start.S b/sysdeps/standalone/i960/start.S deleted file mode 100644 index 579beb77fb..0000000000 --- a/sysdeps/standalone/i960/start.S +++ /dev/null @@ -1,152 +0,0 @@ -/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. - Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), - On-Line Applications Research Corporation. - 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. - - In addition to the permissions in the GNU Lesser General Public - License, the Free Software Foundation gives you unlimited - permission to link the compiled version of this file with other - programs, and to distribute those programs without any restriction - coming from the use of this file. (The GNU Lesser General Public - License restrictions do apply in other respects; for example, they - cover modification of the file, and distribution when not linked - into another program.) - - Note that people who make modified versions of this file are not - obligated to grant this special exception for their modified - versions; it is their choice whether to do so. The GNU Lesser - General Public License gives permission to release a modified - version without this exception; this exception also makes it - possible to release a modified version which carries forward this - exception. - - 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. */ - -/* entry.s - * - * This file contains the entry point for the application. - * The name of this entry point is compiler dependent. - * It jumps to the BSP which is responsible for performing - * all initialization. - * - */ - - .text - .globl start # GNU960 default entry point - -start: - mov 3, r12 - modpc r12, r12, r12 # enable tracing/trace faults - mov g5, g5 # NOP - mov 0, g14 # initialize constant for C - - /* - * zero out uninitialized data area - */ -zerobss: - lda _end, r4 /* find end of .bss */ - lda _bss_start, r5 /* find beginning of .bss */ - ldconst 0, r6 - -loop: st r6, (r5) /* to zero out uninitialized */ - addo 4, r5, r5 /* data area */ - cmpobl r5, r4, loop /* loop until _end reached */ - - - lda heap_memory, r12 /* tell C lib where heap is */ - st r12,___C_heap_start - lda heap_size, r12 /* tell C lib how big heap is */ - st r12,___C_heap_size - lda stack_memory,r12 /* set up stack pointer: */ - mov r12, sp - mov 0, g14 /* initialize constant for C */ - - call init_frames - ret /* return to monitor */ - -init_frames: - ldconst 0x3b001000, g0 - ldconst 0x00009107, g1 - modac g1, g0, g0 /* set AC controls */ - - /* - * Call application mainline. - * Someday, real values of argc and argv will be set up. - * For now, they are set to 0. - */ - - callx __Board_Initialize /* Initialize the board */ - - ldconst 0,g0 - ldconst 0,g1 - ldconst 0,g2 - callx ___libc_init /* initialize the library and */ - /* call main */ - /* - * if we return from main, we have "fallen" off the end - * of the program, therefore status is 0 - * so move 0 to g0 (exit parameter) - */ - - mov 0, g0 - callx __exit - ret - - -/* - * Data Declarations. Start with a macro which helps declare space. - */ - -#define DECLARE_SPACE(_name,_space,_align) \ - .globl _name ; \ - .align _align ; \ -.comm _name##,_space - -#define DECLARE_LABEL(_name) \ - .globl _name ; \ -_name##: - -#define DECLARE_PTR(_name) DECLARE_SPACE(_name,4,2) -#define DECLARE_U32(_name) DECLARE_SPACE(_name,4,2) -#define DECLARE_U16(_name) DECLARE_SPACE(_name,2,1) - -/* - * Require environment stuff - */ - -DECLARE_LABEL(_environ) -DECLARE_PTR(environ) - -DECLARE_LABEL(_errno) -DECLARE_U32(errno) - -/* - * Stack Size and Space - */ - - .set stack_size, 0x20000 - -DECLARE_SPACE(stack_memory,stack_size,4) -DECLARE_LABEL(stack_end) - -/* - * Heap Size and Space - */ - - .set heap_size, 0x20000 - -DECLARE_SPACE(heap_memory,heap_size,4) -DECLARE_LABEL(heap_end) diff --git a/sysdeps/standalone/m68k/m68020/m68020.h b/sysdeps/standalone/m68k/m68020/m68020.h deleted file mode 100644 index 8eee00753e..0000000000 --- a/sysdeps/standalone/m68k/m68020/m68020.h +++ /dev/null @@ -1,87 +0,0 @@ -/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. - Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), - On-Line Applications Research Corporation. - 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. */ - -/* m68020.h - * - * This file contains macros which are used to access MC68020 - * registers which are not addressable by C. These are - * useful when developing the board specific support. - */ - -#ifndef m68020_h__ -#define m68020_h__ - -typedef void ( *mc68020_isr )( void ); - -#define disable_intr( level ) \ - { (level) = 0; \ - asm volatile ( "movew %%sr,%0 ; \ - orw #0x0700,%%sr" \ - : "=d" ((level)) : "0" ((level)) ); \ - } - -#define enable_intr( level ) \ - { asm volatile ( "movew %0,%%sr " \ - : "=d" ((level)) : "0" ((level)) ); \ - } - -#define flash_intr( level ) \ - { asm volatile ( "movew %0,%%sr ; \ - orw #0x0700,%%sr" \ - : "=d" ((level)) : "0" ((level)) ); \ - } - -#define get_vbr( vbr ) \ - { (vbr) = 0; \ - asm volatile ( "movec %%vbr,%0 " \ - : "=a" (vbr) : "0" (vbr) ); \ - } - -#define set_vbr( vbr ) \ - { register mc68020_isr *_vbr= (mc68020_isr *)(vbr); \ - asm volatile ( "movec %0,%%vbr " \ - : "=a" (_vbr) : "0" (_vbr) ); \ - } - -#define enable_caching() \ - { register unsigned int _ctl=0x01; \ - asm volatile ( "movec %0,%%cacr" \ - : "=d" (_ctl) : "0" (_ctl) ); \ - } - -#define delay( microseconds ) \ - { register unsigned int _delay=(microseconds); \ - register unsigned int _tmp=123; \ - asm volatile( "0: \ - nbcd %0 ; \ - nbcd %0 ; \ - dbf %1,0 " \ - : "=d" (_tmp), "=d" (_delay) \ - : "0" (_tmp), "1" (_delay) ); \ - } - -#define enable_tracing() -#define cause_intr( X ) -#define clear_intr( X ) - -extern mc68020_isr M68Kvec[]; /* vector table address */ - -#endif -/* end of include file */ diff --git a/sysdeps/standalone/m68k/m68020/mvme135/Implies b/sysdeps/standalone/m68k/m68020/mvme135/Implies deleted file mode 100644 index 7142fe2985..0000000000 --- a/sysdeps/standalone/m68k/m68020/mvme135/Implies +++ /dev/null @@ -1,2 +0,0 @@ -# Motorola MVME135 and MVME136 are compatible. -standalone/m68k/m68020/mvme136 diff --git a/sysdeps/standalone/m68k/m68020/mvme136/Makefile b/sysdeps/standalone/m68k/m68020/mvme136/Makefile deleted file mode 100644 index 122c1b183e..0000000000 --- a/sysdeps/standalone/m68k/m68020/mvme136/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (C) 1993, 1997 Free Software Foundation, Inc. -# This file is part of the GNU C Library. -# Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), -# On-Line Applications Research Corporation. - -# 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. - -ifeq (bare,$(subdir)) -install-lib += mvme136.ld -endif diff --git a/sysdeps/standalone/m68k/m68020/mvme136/_exit.c b/sysdeps/standalone/m68k/m68020/mvme136/_exit.c deleted file mode 100644 index e5e078c198..0000000000 --- a/sysdeps/standalone/m68k/m68020/mvme136/_exit.c +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright (C) 1994, 1997, 1999 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), - On-Line Applications Research Corporation. - - 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. */ - -#include -#include -#include "m68020.h" - -/* Return control to 135Bug */ - -void -__exit_trap () -{ - set_vbr( 0 ); /* restore 135Bug vectors */ - asm volatile( "trap #15" ); /* trap to 135Bug */ - asm volatile( ".short 0x63" ); /* return to 135Bug (.RETURN) */ - asm volatile( "jmp main" ); /* restart program */ -} - -/* The function `_exit' should take a status argument and simply - terminate program execution, using the low-order 8 bits of the - given integer as status. */ - -void -__attribute__ ((noreturn)) -_exit (status) - int status; -{ - /* status is ignored */ - - M68Kvec[ 45 ] = __exit_trap; /* install exit_trap handler */ - asm volatile( "trap #13" ); /* insures SUPV mode */ -} -weak_alias (_exit, _Exit) diff --git a/sysdeps/standalone/m68k/m68020/mvme136/brdinit.c b/sysdeps/standalone/m68k/m68020/mvme136/brdinit.c deleted file mode 100644 index 95b81c1e1b..0000000000 --- a/sysdeps/standalone/m68k/m68020/mvme136/brdinit.c +++ /dev/null @@ -1,51 +0,0 @@ -/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), - On-Line Applications Research Corporation. - - 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. */ - -#include -#include "m68020.h" - -/* _Board_Initialize() - -This routine initializes the Motorola MVME135/MVME136. */ - -void -_Board_Initialize () -{ - mc68020_isr *monitors_vector_table; - int index; - - monitors_vector_table = (mc68020_isr *)0; /* 135Bug Vectors are at 0 */ - set_vbr( monitors_vector_table ); - - for ( index=2 ; index<=255 ; index++ ) - M68Kvec[ index ] = monitors_vector_table[ 32 ]; - - M68Kvec[ 2 ] = monitors_vector_table[ 2 ]; /* bus error vector */ - M68Kvec[ 4 ] = monitors_vector_table[ 4 ]; /* breakpoints vector */ - M68Kvec[ 9 ] = monitors_vector_table[ 9 ]; /* trace vector */ - M68Kvec[ 47 ] = monitors_vector_table[ 47 ]; /* system call vector */ - - set_vbr( &M68Kvec ); - - (*(unsigned char *)0xfffb0067) = 0x7f; /* make VME access round-robin */ - - enable_caching (); - -} diff --git a/sysdeps/standalone/m68k/m68020/mvme136/console.c b/sysdeps/standalone/m68k/m68020/mvme136/console.c deleted file mode 100644 index 85dee983bf..0000000000 --- a/sysdeps/standalone/m68k/m68020/mvme136/console.c +++ /dev/null @@ -1,101 +0,0 @@ -/* Copyright (C) 1994, 1996 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), - On-Line Applications Research Corporation. - - 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. */ - -#include -#include "m68020.h" - -/* Console IO routines for a Motorola MVME135/MVME136 board. - -They currently use the B port. It should be possible to -use the A port by filling in the reset of the chip structure, -adding an ifdef for PORTA/PORTB, and switching the addresses, -and maybe the macros based on the macro. */ - -/* M68681 DUART chip register structures and constants */ - -typedef struct { - volatile unsigned char fill1[ 5 ]; /* channel A regs ( not used ) */ - volatile unsigned char isr; /* interrupt status reg */ - volatile unsigned char fill2[ 2 ]; /* counter regs (not used) */ - volatile unsigned char mr1mr2b; /* MR1B and MR2B regs */ - volatile unsigned char srb; /* status reg channel B */ - volatile unsigned char fill3; /* do not access */ - volatile unsigned char rbb; /* receive buffer channel B */ - volatile unsigned char ivr; /* interrupt vector register */ -} r_m681_info; - -typedef struct { - volatile unsigned char fill1[ 4 ]; /* channel A regs (not used) */ - volatile unsigned char acr; /* auxillary control reg */ - volatile unsigned char imr; /* interrupt mask reg */ - volatile unsigned char fill2[ 2 ]; /* counter regs (not used) */ - volatile unsigned char mr1mr2b; /* MR1B and MR2B regs */ - volatile unsigned char csrb; /* clock select reg */ - volatile unsigned char crb; /* command reg */ - volatile unsigned char tbb; /* transmit buffer channel B */ - volatile unsigned char ivr; /* interrupt vector register */ -} w_m681_info; - -#define RD_M68681 ((r_m681_info *)0xfffb0040) /* ptr to the M68681 */ -#define WR_M68681 ((w_m681_info *)0xfffb0040) /* ptr to the M68681 */ -#define RXRDYB 0x01 /* status reg recv ready mask */ -#define TXRDYB 0x04 /* status reg trans ready mask */ - -/* _Console_Putc - -This routine transmits a character out the M68681. It supports -XON/XOFF flow control. */ - -#define XON 0x11 /* control-Q */ -#define XOFF 0x13 /* control-S */ - -int -_Console_Putc (ch) - char ch; -{ - while ( ! (RD_M68681->srb & TXRDYB) ) ; - while ( RD_M68681->srb & RXRDYB ) /* must be an XOFF */ - if ( RD_M68681->rbb == XOFF ) - do { - while ( ! (RD_M68681->srb & RXRDYB) ) ; - } while ( RD_M68681->rbb != XON ); - - WR_M68681->tbb = ch; - return( 0 ); -} - -/* _Console_Getc - -This routine reads a character from the UART and returns it. */ - -int -_Console_Getc (poll) - int poll; -{ - if ( poll ) { - if ( !(RD_M68681->srb & RXRDYB) ) - return -1; - else - return RD_M68681->rbb; - } else { - while ( !(RD_M68681->srb & RXRDYB) ); - return RD_M68681->rbb; - } -} diff --git a/sysdeps/standalone/m68k/m68020/mvme136/mvme136.ld b/sysdeps/standalone/m68k/m68020/mvme136/mvme136.ld deleted file mode 100644 index 9a352f0095..0000000000 --- a/sysdeps/standalone/m68k/m68020/mvme136/mvme136.ld +++ /dev/null @@ -1,61 +0,0 @@ -/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. - Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), - On-Line Applications Research Corporation. - 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. */ - -/* This file contains directives for the GNU linker which are specific -to the Motorola MVME136/MVME135 boards. */ - -MEMORY - { - ram : org = 0x3000, l = 1M - } - -/* This value is also when the space is allocated. If you change -this one, change the other one!!! */ - -heap_size = 0x20000; - -SECTIONS -{ - .text 0x3000 : - { - text_start = ABSOLUTE(.) ; - *(.text) - etext = ALIGN( 0x10 ) ; - } - - .data ADDR( .text ) + SIZEOF( .text ): - { - data_start = . ; - *(.data) - edata = ALIGN( 0x10 ) ; - } - - .bss ADDR( .data ) + SIZEOF( .data ): - { - bss_start = . ; - _bss_start = . ; - *(.bss) - *(COMMON) - heap_memory = .; - . += 0x20000; - end = . ; - _end = . ; - } -} diff --git a/sysdeps/standalone/m68k/m68020/start.S b/sysdeps/standalone/m68k/m68020/start.S deleted file mode 100644 index 166605fb4f..0000000000 --- a/sysdeps/standalone/m68k/m68020/start.S +++ /dev/null @@ -1,172 +0,0 @@ -/* Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc. - Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), - On-Line Applications Research Corporation. - 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. - - In addition to the permissions in the GNU Lesser General Public - License, the Free Software Foundation gives you unlimited - permission to link the compiled version of this file with other - programs, and to distribute those programs without any restriction - coming from the use of this file. (The GNU Lesser General Public - License restrictions do apply in other respects; for example, they - cover modification of the file, and distribution when not linked - into another program.) - - Note that people who make modified versions of this file are not - obligated to grant this special exception for their modified - versions; it is their choice whether to do so. The GNU Lesser - General Public License gives permission to release a modified - version without this exception; this exception also makes it - possible to release a modified version which carries forward this - exception. - - 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. */ - -/* entry.s - * - * This file contains the entry point for the application. - * The name of this entry point is compiler dependent. - * It jumps to the BSP which is responsible for performing - * all initialization. - */ - - .text - .globl start | Default entry point - .globl _start | Default entry point - .globl M68Kvec | Vector Table - .globl _M68Kvec | Vector Table - -start: -_start: -M68Kvec: | standard location for vectors -_M68Kvec: | standard location for vectors - nop | for linkers with problem - | using location zero as entry - jmp around - .space 4088 | to avoid initial intr stack - | from 135BUG on MVME13? as entry - | and start code at 0x4000 -around: - move.w %sr,initial_sr | save initial values - movec %isp,%a0 - movel %a0,initial_isp - movec %usp,%a0 - movel %a0,initial_usp - movec %msp,%a0 - movel %a0,initial_msp - oriw #0x0700,%sr | INTERRUPTS OFF!!! - - - - | - | zero out uninitialized data area - | -zerobss: - moveal #end,%a0 | find end of .bss - moveal #_bss_start,%a1 | find beginning of .bss - movel #0,%d0 - -loop: movel #0,%a1@+ | to zero out uninitialized - cmpal %a0,%a1 - jlt loop | loop until _end reached - - movel #heap_size,__C_heap_size | set ___C_heap_size - movel #heap_memory,__C_heap_start | set ___C_heap_start - moveal #interrupt_stack_end,%a0 | set interrupt stack pointer - movec %a0,%isp - moveal #stack_end,%a0 | set master stack pointer - movec %a0,%msp - moveal #stack_end,%a6 | set base pointer - movw #0x3000,%sr | SUPV MODE,INTERRUPTS ON!!! - -#ifdef NEED_UNDERSCORES - jsr __Board_Initialize | initialize the board -#else - jsr _Board_Initialize | initialize the board -#endif - - move.l #0,%sp@- | envp = NULL - move.l #0,%sp@- | argv = NULL - move.l #0,%sp@- | argc = NULL -#ifdef NEED_UNDERSCORES - jsr ___libc_init | initialize the library and - | call main -#else - jsr __libc_init | initialize the library and - | call main -#endif - add.l #12,%sp - - move.l #0,%sp@- | argc = NULL - jsr __exit | call the Board specific exit - addq.l #4,%sp - - move.l initial_isp,%a0 | if __exit returns then we can - movec %a0,%isp | restore the initial values - move.l initial_usp,%a0 - movec %a0,%usp - move.l initial_msp,%a0 - movec %a0,%msp - move.w initial_sr,%sr - rts - - - .bss - -/* - * So initial stack registers and status register can be saved. - */ - -#define DECLARE_SPACE(_name,_space,_align) \ - .globl _name ; \ - .align _align ; \ -_name##: .space _space - -#define DECLARE_LABEL(_name) \ - .globl _name ; \ -_name##: - -#define DECLARE_PTR(_name) DECLARE_SPACE(_name,4,2) -#define DECLARE_U32(_name) DECLARE_SPACE(_name,4,2) -#define DECLARE_U16(_name) DECLARE_SPACE(_name,2,1) - -DECLARE_U32(initial_isp) -DECLARE_U32(initial_msp) -DECLARE_U32(initial_usp) -DECLARE_U16(initial_sr) - -/* - * Require environment stuff - */ - -DECLARE_LABEL(_environ) -DECLARE_PTR(environ) - -DECLARE_LABEL(__errno) -DECLARE_LABEL(_errno) -DECLARE_U32(errno) - -/* - * Stack Size and Space - */ - - .set stack_size, 0x20000 - -DECLARE_SPACE(stack_memory,stack_size,4) -DECLARE_LABEL(stack_end) - -DECLARE_SPACE(interrupt_stack_memory,0x1000,4) -DECLARE_LABEL(interrupt_stack_end) diff --git a/sysdeps/standalone/open.c b/sysdeps/standalone/open.c deleted file mode 100644 index e0a3432415..0000000000 --- a/sysdeps/standalone/open.c +++ /dev/null @@ -1,125 +0,0 @@ -/* Copyright (C) 1994, 1995, 1996, 1997, 2002 Free Software Foundation, Inc. - Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil, - On-Line Applications Research Corporation. - 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. */ - -#include -#include -#include -#include - -#include -#include -#include - -#define __DECLARE_FILE_DESCRIPTORS__ - -#include "filedesc.h" - -/* Open FILE with access OFLAG. If OFLAG includes O_CREAT, - a third argument is the file protection. */ -int -__open (file, oflag) - const char *file; - int oflag; -{ - int mode; - int newfd; - int index; - - if (file == NULL) - { - __set_errno (EINVAL); - return -1; - } - - if (oflag & O_CREAT) - { - va_list arg; - va_start(arg, oflag); - mode = va_arg(arg, int); - va_end(arg); - } - - /* - * Find an open slot. - */ - - newfd = -1; - - for ( index=0 ; index< FOPEN_MAX ; index++ ) - if ( !__FD_Table[ index ].in_use ) { - newfd = index; - break; - } - - if ( newfd == -1 ) { - __set_errno (ENFILE); - return -1; - } - - /* - * Initialize the open slot - */ - - __FD_Table[ newfd ].in_use = 1; - __FD_Table[ newfd ].flags = oflag; - - return newfd; -} -libc_hidden_def (__open) - -/* Initialization Code for Console I/O */ - -#ifdef HAVE_GNU_LD -static -#endif -void -__NONE_init_console_io (argc, argv, envp) - int argc; - char **argv; - char **envp; -{ - int index; - - for ( index=0 ; index< FOPEN_MAX ; index++ ) - __FD_Table[ index ].in_use = 0; - - stdin = fopen( "", "r" ); - - stdout = fopen( "", "w" ); - - stderr = fopen( "", "w" ); - - /* - * Line buffer the standard input and output and use no buffering for - * standard error. - */ - - setvbuf( stdin, NULL, _IOLBF, BUFSIZ ); - setvbuf( stdout, NULL, _IOLBF, BUFSIZ ); - setvbuf( stderr, NULL, _IONBF, BUFSIZ ); - - (void) &__NONE_init_console_io; /* Avoid "defined but not used" warning. */ -} - -#ifdef HAVE_GNU_LD -text_set_element (__libc_subinit, __NONE_init_console_io); -#endif - -weak_alias (__open, open) diff --git a/sysdeps/standalone/read.c b/sysdeps/standalone/read.c deleted file mode 100644 index 0fb9e7a1ec..0000000000 --- a/sysdeps/standalone/read.c +++ /dev/null @@ -1,86 +0,0 @@ -/* Copyright (C) 1994, 1995, 1996, 1997, 2002 Free Software Foundation, Inc. - Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil, - On-Line Applications Research Corporation. - 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. */ - -#include -#include -#include - -#include "filedesc.h" -#include -#include - -/* Read NBYTES into BUF from FD. Return the number read or -1. */ -ssize_t -__libc_read (int fd, void *buf, size_t nbytes) -{ - char *buffer = (char *) buf; - int data; - int poll; - - __set_errno (0); - - if (nbytes == 0) - return 0; - - if ( !__FD_Is_valid( fd ) || !__FD_Table[ fd ].in_use ) - { - __set_errno (EBADF); - return -1; - } - if (buf == NULL) - { - __set_errno (EINVAL); - return -1; - } - - if ( __FD_Table[ fd ].flags & O_WRONLY ) /* is it write only? */ - { - __set_errno (EBADF); - return -1; - } - - /* If this is a non-blocking fd, then we want to poll the console. */ - - poll = ( __FD_Table[ fd ].flags & O_NONBLOCK ) ? 1 : 0; - - /* Read a single character. This is a cheap way to insure that the - upper layers get every character because _Console_Getc can't timeout - or otherwise know when to stop. */ - - - data = _Console_Getc(poll); - - if ( data == -1 ) /* if no data return */ - return -1; - - (void) _Console_Putc(data); /* echo the character */ - - if ( data == '\r' ) { /* translate CR -> CR/LF */ - (void) _Console_Putc('\n'); - data = '\n'; - } - - *buffer = data; - return 1; -} -libc_hidden_def (__libc_read) -weak_alias (__libc_read, __read) -libc_hidden_weak (__read) -weak_alias (__libc_read, read) diff --git a/sysdeps/standalone/standalone.h b/sysdeps/standalone/standalone.h deleted file mode 100644 index 20a0c33806..0000000000 --- a/sysdeps/standalone/standalone.h +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (C) 1994, 1997, 2004 Free Software Foundation, Inc. - Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), - On-Line Applications Research Corporation. - 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 _STANDALONE_H -#define _STANDALONE_H - -#include - -extern void _Board_Initialize (void); - -extern int _Console_Putc (char c); -extern int _Console_Getc (int poll); - -#endif diff --git a/sysdeps/standalone/write.c b/sysdeps/standalone/write.c deleted file mode 100644 index 5d3823065f..0000000000 --- a/sysdeps/standalone/write.c +++ /dev/null @@ -1,73 +0,0 @@ -/* Copyright (C) 1994, 1995, 1996, 1997, 2002 Free Software Foundation, Inc. - Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil, - On-Line Applications Research Corporation. - 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. */ - -#include -#include -#include -#include - -#include "filedesc.h" -#include -#include - -/* Write NBYTES of BUF to FD. Return the number written, or -1. */ -ssize_t -__libc_write (int fd, const void *buf, size_t nbytes) -{ - int count; - const char *data = buf; - - if (nbytes == 0) - return 0; - if ( !__FD_Is_valid( fd ) || !__FD_Table[ fd ].in_use ) - { - __set_errno (EBADF); - return -1; - } - if (buf == NULL) - { - __set_errno (EINVAL); - return -1; - } - - if ( !(__FD_Table[ fd ].flags & (O_WRONLY|O_RDWR)) ) /* is it writeable? */ - { - __set_errno (EBADF); - return -1; - } - - /* - * All open file descriptors are mapped to the console. - */ - - for ( count=0 ; count != nbytes ; count++ ) { - if ( _Console_Putc(data[ count ]) == -1 ) - return -1; - if ( data[count] == '\n' && _Console_Putc('\r') == -1 ) - return -1; - } - - return count; -} - -libc_hidden_def (__libc_write) -weak_alias (__libc_write, __write) -libc_hidden_weak (__write) -weak_alias (__libc_write, write) diff --git a/sysdeps/tahoe/Implies b/sysdeps/tahoe/Implies deleted file mode 100644 index 5a3163701f..0000000000 --- a/sysdeps/tahoe/Implies +++ /dev/null @@ -1,2 +0,0 @@ -# A Tahoe is mostly just like a Vax. -vax diff --git a/sysdeps/unix/bsd/hp/m68k/brk.S b/sysdeps/unix/bsd/hp/m68k/brk.S deleted file mode 100644 index 037d4d0d07..0000000000 --- a/sysdeps/unix/bsd/hp/m68k/brk.S +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (C) 1991, 1993, 1994, 1995, 1997 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. */ - -#include - -#ifndef SYS_brk -#define SYS_brk 17 -#endif - -#ifndef HAVE_GNU_LD -#define __end _end -#endif - -.data -.globl ___curbrk -___curbrk: - .long __end - -.text -ENTRY (__brk) - movel #__end, d0 - cmpl sp@(4), d0 - ble 0f - movel d0, sp@(4) -0: DO_CALL (#SYS_brk, 1) - movel sp@(4), ___curbrk - clrl d0 - rts -error: jmp syscall_error - -weak_alias (__brk, brk) diff --git a/sysdeps/unix/bsd/hp/m68k/dl-brk.S b/sysdeps/unix/bsd/hp/m68k/dl-brk.S deleted file mode 100644 index eeb96544e3..0000000000 --- a/sysdeps/unix/bsd/hp/m68k/dl-brk.S +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/bsd/hp/m68k/start.c b/sysdeps/unix/bsd/hp/m68k/start.c deleted file mode 100644 index e04ca0632d..0000000000 --- a/sysdeps/unix/bsd/hp/m68k/start.c +++ /dev/null @@ -1,10 +0,0 @@ -/* hp300 4.3 BSD starts at 4, rather than 0, when the start address is 0. - Go figure. */ -asm(".globl __start"); -asm("__start: .long 0"); - -#define _start __start0 - -#define DUMMIES dummy0 - -#include diff --git a/sysdeps/unix/bsd/hp/m68k/sysdep.h b/sysdeps/unix/bsd/hp/m68k/sysdep.h deleted file mode 100644 index 75aee674f5..0000000000 --- a/sysdeps/unix/bsd/hp/m68k/sysdep.h +++ /dev/null @@ -1,56 +0,0 @@ -/* Copyright (C) 1991, 92, 93, 94, 95, 97 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. */ - -/* This code wants to be run through m4. */ - -#include - -#ifdef __ASSEMBLER__ - -#define POUND # - -#ifdef __STDC__ -#define ENTRY(name) \ - .globl _##name; \ - .even; \ - _##name##: -#else -#define ENTRY(name) \ - .globl _/**/name; \ - .even; \ - _/**/name/**/: -#endif - -#define PSEUDO(name, syscall_name, args) \ - .even; \ - .globl syscall_error; \ - error: jmp syscall_error; \ - ENTRY (name) \ - DO_CALL (POUND SYS_ify (syscall_name), args) - -#define DO_CALL(syscall, args) \ - movel syscall, d0; \ - trap POUND 0; \ - bcs error - -#define ret rts -#define r0 d0 -#define r1 d1 -#define MOVE(x,y) movel x , y - -#endif /* __ASSEMBLER__ */ diff --git a/sysdeps/unix/bsd/hp/m68k/vfork.S b/sysdeps/unix/bsd/hp/m68k/vfork.S deleted file mode 100644 index abcc1c3389..0000000000 --- a/sysdeps/unix/bsd/hp/m68k/vfork.S +++ /dev/null @@ -1,56 +0,0 @@ -/* Copyright (C) 1991, 1994, 1995, 1997, 2002 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. */ - -#include - -#ifndef SYS_vfork -#define SYS_vfork 66 -#endif - -/* Clone the calling process, but without copying the whole address space. - The calling process is suspended until the new process exits or is - replaced by a call to `execve'. Return -1 for errors, 0 to the new process, - and the process ID of the new process to the old process. */ -.globl ___vfork -___vfork: - /* Pop the return PC value into A0. */ - moveal sp@+, a0 - - /* Stuff the syscall number in D0 and trap into the kernel. */ - movel #SYS_vfork, d0 - trap #0 - bcs error /* Branch forward if it failed. */ - - /* It succeeded. See which fork we're in. D1 is now 0 for the - parent and 1 for the child. Decrement it to make it -1 (all - bits set) for the parent, and 0 (no bits set) for the child. - Then AND it with D0, so the parent gets D0&-1==R0, and the child - gets D0&0==0. */ - subl #1, d1 - andl d1, d0 - - /* Jump to the return PC. */ - jmp a0@ - -error: - movel d0, _errno - moveq #-1, d0 - jmp a0@ -libc_hidden_def (__vfork) - -weak_alias (__vfork, vfork) diff --git a/sysdeps/unix/bsd/hp/m68k/wait3.S b/sysdeps/unix/bsd/hp/m68k/wait3.S deleted file mode 100644 index 5b63191827..0000000000 --- a/sysdeps/unix/bsd/hp/m68k/wait3.S +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright (C) 1991, 1992, 1995, 1997 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. */ - -#include - -ENTRY(__wait3) - movel sp@(8), d1 - moveal sp@(12), a0 - movel #SYS_wait, d0 - /* Set all condition codes to tell the kernel this is wait3. */ - movew #31, ccr - trap #0 - bcs error - - tstl sp@(4) - beq 1f - moveal sp@(4), a0 - movel d1, a0@ -1: rts - -.globl syscall_error -error: jmp syscall_error - -weak_alias (__wait3, wait3) diff --git a/sysdeps/unix/bsd/m68k/pipe.S b/sysdeps/unix/bsd/m68k/pipe.S deleted file mode 100644 index d7b8ec28d5..0000000000 --- a/sysdeps/unix/bsd/m68k/pipe.S +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (C) 1991,1992,1993,1995,1997,2002 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. */ - -#include - -SYSCALL__ (pipe, 1) -#ifdef __motorola__ - move.l 4(sp), a0 - movem.l d0-d1, (a0) -#else - movel sp@(4), a0 - moveml d0-d1, a0@ -#endif - clrl d0 - rts - -libc_hidden_def (__pipe) -weak_alias (__pipe, pipe) diff --git a/sysdeps/unix/bsd/m68k/start.c b/sysdeps/unix/bsd/m68k/start.c deleted file mode 100644 index 1067853d61..0000000000 --- a/sysdeps/unix/bsd/m68k/start.c +++ /dev/null @@ -1,3 +0,0 @@ -#define DUMMIES ignore0 - -#include diff --git a/sysdeps/unix/bsd/m68k/syscall.S b/sysdeps/unix/bsd/m68k/syscall.S deleted file mode 100644 index eb1a8ec7a9..0000000000 --- a/sysdeps/unix/bsd/m68k/syscall.S +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright (C) 1993, 1997 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. */ - -#include - -ENTRY (syscall) - movel sp@+, a0 /* Pop return address into A0. */ - DO_CALL (sp@, 0) /* Do system call. */ - jmp a0@ /* Return to A0. */ -error: movel a0, sp@- /* Error; push return address */ - jmp syscall_error /* and jump to error handler. */ diff --git a/sysdeps/unix/bsd/m68k/sysdep.S b/sysdeps/unix/bsd/m68k/sysdep.S deleted file mode 100644 index 90f35c9bcc..0000000000 --- a/sysdeps/unix/bsd/m68k/sysdep.S +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (C) 1991, 1992, 1993, 1994, 1997 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. */ - -#define _ERRNO_H -#include - -.globl syscall_error -syscall_error: - /* We translate the system's EWOULDBLOCK error into EAGAIN. - The GNU C library always defines EWOULDBLOCK==EAGAIN. - EWOULDBLOCK_sys is the original number. */ -#ifdef __motorola__ -#if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN - cmp.l #EWOULDBLOCK_sys, d0 - bne store - moveq.l #EAGAIN, d0 -#endif -store: move.l d0, _errno - moveq.l #-1, d0 -#else -#if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN - cmpl #EWOULDBLOCK_sys, d0 - bne store - moveq #EAGAIN, d0 -#endif -store: movel d0, _errno - moveq #-1, d0 -#endif - rts diff --git a/sysdeps/unix/bsd/m68k/wait.S b/sysdeps/unix/bsd/m68k/wait.S deleted file mode 100644 index 9fb4fd93bd..0000000000 --- a/sysdeps/unix/bsd/m68k/wait.S +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright (C) 1991, 1992, 1993, 1995, 1997 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. */ - -#include - -SYSCALL__ (wait, 1) -#ifdef __motorola__ - tst.l 4(sp) - beq 1f - movea.l 4(sp), a0 - move.l d1, (a0) -#else - tstl sp@(4) - beq 1f - moveal sp@(4), a0 - movel d1, a0@ -#endif -1: rts - -weak_alias (__wait, wait) diff --git a/sysdeps/unix/bsd/osf/Implies b/sysdeps/unix/bsd/osf/Implies deleted file mode 100644 index 82719f5a5d..0000000000 --- a/sysdeps/unix/bsd/osf/Implies +++ /dev/null @@ -1,2 +0,0 @@ -# OSF/1 has the canonical set of system calls. -unix/mman diff --git a/sysdeps/unix/bsd/osf/Makefile b/sysdeps/unix/bsd/osf/Makefile deleted file mode 100644 index 743788a41a..0000000000 --- a/sysdeps/unix/bsd/osf/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -# Without -non_shared (via the compiler's -static flag), we'll end up -# with some unresolved symbols wrt exceptions. -LDFLAGS := $(LDFLAGS) -static diff --git a/sysdeps/unix/bsd/osf/alpha/bits/stat.h b/sysdeps/unix/bsd/osf/alpha/bits/stat.h deleted file mode 100644 index 20f358f70a..0000000000 --- a/sysdeps/unix/bsd/osf/alpha/bits/stat.h +++ /dev/null @@ -1,79 +0,0 @@ -/* Copyright (C) 1993, 1996, 1997, 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 - 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 _SYS_STAT_H -# error "Never include directly; use instead." -#endif - -#include - -/* Structure describing file characteristics. */ -struct stat - { - int st_dev; /* Device. */ - unsigned int st_ino; /* File serial number. */ - unsigned int st_mode; /* File mode. */ - unsigned short st_nlink; /* Link count. */ - unsigned int st_uid; /* User ID of the file's owner. */ - unsigned int st_gid; /* Group ID of the file's group.*/ - int st_rdev; /* Device number, if device. */ - - long st_size; /* Size of file, in bytes. */ - - int st_atime; /* Time of last access. */ - int st_atime_usec; - int st_mtime; /* Time of last modification. */ - int st_mtime_usec; - int st_ctime; /* Time of last status change. */ - int st_ctime_usec; - - __blksize_t st_blksize; /* Optimal block size for I/O. */ -#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ - - __blkcnt_t st_blocks; /* Number of 512-byte blocks allocated. */ - unsigned int st_flags; - unsigned int st_gen; - }; - -/* Encoding of the file mode. */ - -#define __S_IFMT 0170000 /* These bits determine file type. */ - -/* File types. */ -#define __S_IFDIR 0040000 /* Directory. */ -#define __S_IFCHR 0020000 /* Character device. */ -#define __S_IFBLK 0060000 /* Block device. */ -#define __S_IFREG 0100000 /* Regular file. */ -#define __S_IFIFO 0010000 /* FIFO. */ - -#define __S_IFLNK 0120000 /* Symbolic link. */ -#define __S_IFSOCK 0140000 /* Socket. */ - -/* POSIX.1b objects. */ -#define __S_TYPEISMQ(buf) (0) -#define __S_TYPEISSEM(buf) (0) -#define __S_TYPEISSHM(buf) (0) - -/* Protection bits. */ - -#define __S_ISUID 04000 /* Set user ID on execution. */ -#define __S_ISGID 02000 /* Set group ID on execution. */ -#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ -#define __S_IREAD 0400 /* Read by owner. */ -#define __S_IWRITE 0200 /* Write by owner. */ -#define __S_IEXEC 0100 /* Execute by owner. */ diff --git a/sysdeps/unix/bsd/osf/alpha/brk.S b/sysdeps/unix/bsd/osf/alpha/brk.S deleted file mode 100644 index 51abaa6c1b..0000000000 --- a/sysdeps/unix/bsd/osf/alpha/brk.S +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@zen.org). - - 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. */ - -#include - -#ifndef SYS_brk -#define SYS_brk 17 -#endif - -#ifndef HAVE_GNU_LD -#define __end end -#endif - -.data - .extern __end,8 - .globl __curbrk -__curbrk: - .quad __end - -.text -ENTRY(__brk) - /* FIXME We do not check for asking for less than a page yet. */ - ldiq v0, SYS_brk - call_pal PAL_callsys - bne a3, error - - /* Update __curbrk and exit cleanly. */ -/* ldgp gp, 0(t12) */ - stq a0, __curbrk - - mov zero, v0 - ret - /* What a horrible way to die. */ -error: ldgp gp,0(gp) - jmp zero,syscall_error - .end __brk - -weak_alias (__brk, brk) diff --git a/sysdeps/unix/bsd/osf/alpha/dl-brk.S b/sysdeps/unix/bsd/osf/alpha/dl-brk.S deleted file mode 100644 index eeb96544e3..0000000000 --- a/sysdeps/unix/bsd/osf/alpha/dl-brk.S +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/bsd/osf/alpha/fork.S b/sysdeps/unix/bsd/osf/alpha/fork.S deleted file mode 100644 index a4ec14b56f..0000000000 --- a/sysdeps/unix/bsd/osf/alpha/fork.S +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 1993, 1995, 1997, 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@zen.org). - - 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. */ - -#include - -SYSCALL__ (fork, 0) - cmovne a4, 0, v0 - ret - .end __fork -libc_hidden_def (__fork) - -weak_alias (__fork, fork) diff --git a/sysdeps/unix/bsd/osf/alpha/killpg.S b/sysdeps/unix/bsd/osf/alpha/killpg.S deleted file mode 100644 index 741616bc76..0000000000 --- a/sysdeps/unix/bsd/osf/alpha/killpg.S +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 1993, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@zen.org). - - 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. */ - -#include - -#include -#define SYS_killpg SYS_ult_killpg - -SYSCALL (killpg, 2) - ret - .end killpg diff --git a/sysdeps/unix/bsd/osf/alpha/recv.S b/sysdeps/unix/bsd/osf/alpha/recv.S deleted file mode 100644 index 92a273d150..0000000000 --- a/sysdeps/unix/bsd/osf/alpha/recv.S +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright (C) 1991, 1992, 1997 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. */ - -#include - -#include -#define SYS_recv SYS_ult_recv - -SYSCALL (recv, 4) - ret - .end recv diff --git a/sysdeps/unix/bsd/osf/alpha/send.S b/sysdeps/unix/bsd/osf/alpha/send.S deleted file mode 100644 index 7d61d46a1b..0000000000 --- a/sysdeps/unix/bsd/osf/alpha/send.S +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright (C) 1991, 1992, 1997 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. */ - -#include - -#include -#define SYS_send SYS_ult_send - -SYSCALL (send, 4) - ret - .end send diff --git a/sysdeps/unix/bsd/osf/alpha/sigblock.S b/sysdeps/unix/bsd/osf/alpha/sigblock.S deleted file mode 100644 index 5db55f4474..0000000000 --- a/sysdeps/unix/bsd/osf/alpha/sigblock.S +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@zen.org). - - 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. */ - -#include - -#include -#define SYS_sigblock SYS_ult_sigblock - -SYSCALL__ (sigblock, 1) - ret - .end __sigblock - -weak_alias (__sigblock, sigblock) diff --git a/sysdeps/unix/bsd/osf/alpha/sigpause.S b/sysdeps/unix/bsd/osf/alpha/sigpause.S deleted file mode 100644 index 7646366473..0000000000 --- a/sysdeps/unix/bsd/osf/alpha/sigpause.S +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright (C) 1993,95,97,2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@zen.org). - - 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. */ - -#include - -#include -#define SYS_sigpause SYS_ult_sigpause - -SYSCALL__ (sigpause, 1) - ret - .end __sigpause -libc_hidden_def (__sigpause) - -weak_alias (__sigpause, sigpause) diff --git a/sysdeps/unix/bsd/osf/alpha/sigsetmask.S b/sysdeps/unix/bsd/osf/alpha/sigsetmask.S deleted file mode 100644 index 93333aa0b6..0000000000 --- a/sysdeps/unix/bsd/osf/alpha/sigsetmask.S +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@zen.org). - - 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. */ - -#include - -#include -#define SYS_sigsetmask SYS_ult_sigsetmask - -SYSCALL__ (sigsetmask, 1) - ret - .end __sigsetmask - -weak_alias (__sigsetmask, sigsetmask) diff --git a/sysdeps/unix/bsd/osf/alpha/sigvec.S b/sysdeps/unix/bsd/osf/alpha/sigvec.S deleted file mode 100644 index 45fcc58a03..0000000000 --- a/sysdeps/unix/bsd/osf/alpha/sigvec.S +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@zen.org). - - 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. */ - -#include - -#include -#define SYS_sigvec SYS_ult_sigvec - -SYSCALL__ (sigvec, 3) - ret - .end __sigvec - -weak_alias (__sigvec, sigvec) diff --git a/sysdeps/unix/bsd/osf/alpha/start.S b/sysdeps/unix/bsd/osf/alpha/start.S deleted file mode 100644 index 1fa52a6430..0000000000 --- a/sysdeps/unix/bsd/osf/alpha/start.S +++ /dev/null @@ -1,83 +0,0 @@ -/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@zen.org). - - 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. - - In addition to the permissions in the GNU Lesser General Public - License, the Free Software Foundation gives you unlimited - permission to link the compiled version of this file with other - programs, and to distribute those programs without any restriction - coming from the use of this file. (The GNU Lesser General Public - License restrictions do apply in other respects; for example, they - cover modification of the file, and distribution when not linked - into another program.) - - Note that people who make modified versions of this file are not - obligated to grant this special exception for their modified - versions; it is their choice whether to do so. The GNU Lesser - General Public License gives permission to release a modified - version without this exception; this exception also makes it - possible to release a modified version which carries forward this - exception. - - 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. */ - -#include - -#if 0 -.sdata -.globl STARTFRM -STARTFRM = 0 -#endif - -.text -ENTRY(__start) - lda sp, -16(sp) - stq zero, 8(sp) - - /* This branch puts the address of the current insn in t0. */ - br t0, 10f -10: - /* We set the GP register by using the address of the ldgp */ - /* (what we just put into t0). */ - ldgp gp, 0(t0) - - /* get argc */ - ldl a0, 16(sp) - - /* get argv */ - lda a1, 24(sp) - - /* move ahead to envp */ - s8addq a0, a1, a2 - addq a2, 0x8, a2 - - /* Store in environ. */ - stq a2, environ - - /* Clear out errno. */ -/* ldgp gp, 0(t12) */ - stl zero, errno - - /* Call main. */ - jsr ra, main - ldgp gp, 0(ra) - - mov v0, a0 - - jsr ra, exit - ldgp gp, 0(ra) - - .end __start diff --git a/sysdeps/unix/bsd/osf/alpha/syscalls.list b/sysdeps/unix/bsd/osf/alpha/syscalls.list deleted file mode 100644 index ac883925e1..0000000000 --- a/sysdeps/unix/bsd/osf/alpha/syscalls.list +++ /dev/null @@ -1,3 +0,0 @@ -# File name Caller Syscall name # args Strong name Weak names - -wait4 - wait4 4 __wait4 wait4 diff --git a/sysdeps/unix/bsd/osf/alpha/sysdep.h b/sysdeps/unix/bsd/osf/alpha/sysdep.h deleted file mode 100644 index 84ac541aa1..0000000000 --- a/sysdeps/unix/bsd/osf/alpha/sysdep.h +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@zen.org). - - 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. */ - -/* OSF/1 does not precede the asm names of C symbols with a `_'. */ -#define NO_UNDERSCORES - -#include - -#ifdef __ASSEMBLER__ - -#include /* get PAL_callsys */ -#include - -#endif diff --git a/sysdeps/unix/bsd/osf/alpha/vhangup.S b/sysdeps/unix/bsd/osf/alpha/vhangup.S deleted file mode 100644 index 3c2b04af7d..0000000000 --- a/sysdeps/unix/bsd/osf/alpha/vhangup.S +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright (C) 1991, 1992, 1997 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. */ - -#include - -#include -#define SYS_vhangup SYS_ult_vhangup - -SYSCALL (vhangup, 1) - ret - .end vhangup diff --git a/sysdeps/unix/bsd/osf/alpha/waitpid.c b/sysdeps/unix/bsd/osf/alpha/waitpid.c deleted file mode 100644 index 8378982ac7..0000000000 --- a/sysdeps/unix/bsd/osf/alpha/waitpid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/bsd/osf/bits/mman.h b/sysdeps/unix/bsd/osf/bits/mman.h deleted file mode 100644 index d4672cccab..0000000000 --- a/sysdeps/unix/bsd/osf/bits/mman.h +++ /dev/null @@ -1,71 +0,0 @@ -/* Flags for BSD-style memory management. OSF/1 version. - Copyright (C) 1994, 1995, 1996, 1997, 1998 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_MMAN_H -#define _BITS_MMAN_H 1 - -/* Protections are chosen from these bits, OR'd together. The - implementation does not necessarily support PROT_EXEC or PROT_WRITE - without PROT_READ. The only guarantees are that no writing will be - allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ - -#define PROT_NONE 0x00 /* No access. */ -#define PROT_READ 0x01 /* Pages can be read. */ -#define PROT_WRITE 0x02 /* Pages can be written. */ -#define PROT_EXEC 0x04 /* Pages can be executed. */ - -/* Flags contain mapping type, sharing type and options. */ - -/* Mapping type (must choose one and only one of these). */ -#ifdef __USE_BSD -# define MAP_FILE 0x00 /* Mapped from a file or device. */ -# define MAP_ANON 0x10 /* Allocated from anonymous virtual memory. */ -# define MAP_ANONYMOUS MAP_ANON -# define MAP_TYPE 0xf0 /* Mask for type field. */ -#endif - -/* Sharing types (must choose one and only one of these). */ -#define MAP_SHARED 0x01 /* Share changes. */ -#define MAP_PRIVATE 0x02 /* Changes private; copy pages on write. */ - -/* Other flags. */ -#define MAP_FIXED 0x0100 /* Map address must be exactly as requested. */ -#ifdef __USE_BSD -# define MAP_VARIABLE 0 /* Absence of MAP_FIXED. */ -# define MAP_HASSEMPHORE 0x0200 /* Region may contain semaphores. */ -# define MAP_INHERIT 0x0400 /* Region is retained after exec. */ -# define MAP_UNALIGNED 0x0800 /* File offset need not be page-aligned. */ -#endif - -/* Advice to `madvise'. */ -#ifdef __USE_BSD -# define MADV_NORMAL 0 /* No further special treatment. */ -# define MADV_RANDOM 1 /* Expect random page references. */ -# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define MADV_WILLNEED 3 /* Will need these pages. */ -# define MADV_DONTNEED 4 /* Don't need these pages. */ -# define MADV_SPACEAVAIL 5 /* Ensure that resources are available. */ -#endif - -/* Flags to `msync'. */ -#define MS_ASYNC 1 /* Asynchronous cache flush. */ -#define MS_SYNC 3 /* Synchronous cache flush. */ -#define MS_INVALIDATE 4 /* Invalidate cached pages. */ - -#endif /* bits/mman.h */ diff --git a/sysdeps/unix/bsd/osf/bits/sigaction.h b/sysdeps/unix/bsd/osf/bits/sigaction.h deleted file mode 100644 index 13f9144fa2..0000000000 --- a/sysdeps/unix/bsd/osf/bits/sigaction.h +++ /dev/null @@ -1,50 +0,0 @@ -/* Structure and constant definitions for sigaction et al. OSF/1 version. - Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@zen.org). - - 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 _SIGNAL_H -# error "Never include directly; use instead." -#endif - -/* Structure describing the action to be taken when a signal arrives. */ -struct sigaction - { - /* Signal handler. */ - __sighandler_t sa_handler; - - /* Additional set of signals to be blocked. */ - __sigset_t sa_mask; - - /* Special flags. */ - int sa_flags; - }; - -/* Bits in `sa_flags'. */ -#ifdef __USE_BSD -# define SA_ONSTACK 0x1 /* Take signal on signal stack. */ -# define SA_RESTART 0x2 /* Restart syscall on signal return. */ -# define SA_DISABLE 0x4 /* Disable alternate signal stack. */ -#endif -#define SA_NOCLDSTOP 0x4 /* Don't send SIGCHLD when children stop. */ - - -/* Values for the HOW argument to `sigprocmask'. */ -#define SIG_BLOCK 1 /* Block signals. */ -#define SIG_UNBLOCK 2 /* Unblock signals. */ -#define SIG_SETMASK 3 /* Set the set of blocked signals. */ diff --git a/sysdeps/unix/bsd/osf/syscalls.list b/sysdeps/unix/bsd/osf/syscalls.list deleted file mode 100644 index 731763b3eb..0000000000 --- a/sysdeps/unix/bsd/osf/syscalls.list +++ /dev/null @@ -1,3 +0,0 @@ -# File name Caller Syscall name # args Strong name Weak names - -msync - msync 3 msync diff --git a/sysdeps/unix/bsd/osf/system.c b/sysdeps/unix/bsd/osf/system.c deleted file mode 100644 index ef42ea2155..0000000000 --- a/sysdeps/unix/bsd/osf/system.c +++ /dev/null @@ -1,2 +0,0 @@ -/* OSF/1 does have `waitpid'. Avoid unix/system.c, which says we don't. */ -#include diff --git a/sysdeps/unix/bsd/sequent/i386/getgroups.S b/sysdeps/unix/bsd/sequent/i386/getgroups.S deleted file mode 100644 index 55fa7288d4..0000000000 --- a/sysdeps/unix/bsd/sequent/i386/getgroups.S +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (C) 1994, 1995, 1997 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. */ - -#include -#include - -/* Dynix erroneously reports `getgroups (0, 0)' as an error. - We fix up for that case. */ - -#define syscall_error myerror -SYSCALL__ (getgroups, 2) -#undef syscall_error - ret -myerror: - tstl 4(%esp) /* Was the first arg 0? */ - jnz syscall_error /* If not, go to the normal error case. */ - /* When called with (0, 0), we want to return the number of groups - without storing anything. The Dynix system call gives an error - for this case, so we fix up by calling it with a local array we - never use, and just use the return value. */ - subl %esp, $(NGROUPS_MAX * 4) /* Allocate a local array. */ - movl $NGROUPS_MAX, %ecx /* Pass NGROUPS_MAX for first arg. */ - movl %esp, %edx /* Pass local array for second arg. */ - DO_CALL (getgroups, 2) /* Do the system call. */ - addl %esp, $(NGROUPS_MAX * 4) /* Pop the local array. */ - jb syscall_error /* Check for error from the system call. */ - ret /* Return its value. */ - -weak_alias (__getgroups, getgroups) diff --git a/sysdeps/unix/bsd/sequent/i386/sigvec.S b/sysdeps/unix/bsd/sequent/i386/sigvec.S deleted file mode 100644 index 62373e1315..0000000000 --- a/sysdeps/unix/bsd/sequent/i386/sigvec.S +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (C) 1993, 1995, 1997 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. */ - -#include - -/* The Dynix `sigvec' system call takes an extra argument, - which is the address of the trampoline function. */ - -.text -.align 4 -trampoline: - cld /* Clear direction flag. */ - call %eax /* Call the handler, address in %eax. */ - addl $8, %esp /* Pop signum & code off the stack. */ - /* __sigreturn will restore the context, and never return here. */ - call C_SYMBOL_NAME (__sigreturn) - -.globl syscall_error -ENTRY (__sigvec) - pushl $trampoline /* Push fourth arg: trampoline address. */ - pushl 16(%esp) /* Push third arg: our third arg. */ - pushl 16(%esp) /* Push second arg: our second arg. */ - pushl 16(%esp) /* Push first arg: our first arg. */ - mov %esp, %ecx /* Point the syscall at the arguments. */ - addl $16, %esp /* Pop those four args. */ - DO_CALL (sigvec, 4) /* Do the system call. */ - jb syscall_error /* Check for error. */ - ret - -weak_alias (__sigvec, sigvec) diff --git a/sysdeps/unix/bsd/sequent/i386/syscall.S b/sysdeps/unix/bsd/sequent/i386/syscall.S deleted file mode 100644 index 9ff189885b..0000000000 --- a/sysdeps/unix/bsd/sequent/i386/syscall.S +++ /dev/null @@ -1,31 +0,0 @@ -/* `syscall' function for Sequent Symmetry running Dynix version 3. - Copyright (C) 1994, 1997 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. */ - -#include - -.text -.globl syscall_error -.align 4 -ENTRY (syscall) - leal 8(%esp), %ecx /* Load address of second argument. */ - movl $SYS_HANDLER, %eax /* Use BSD system calls. */ - movw 4(%esp), %ax /* Load system call number into low word. */ - int $T_SVC6 /* Pretend it takes six args. */ - jb syscall_error - ret diff --git a/sysdeps/unix/bsd/sequent/i386/sysdep.h b/sysdeps/unix/bsd/sequent/i386/sysdep.h deleted file mode 100644 index c3d9d919b7..0000000000 --- a/sysdeps/unix/bsd/sequent/i386/sysdep.h +++ /dev/null @@ -1,82 +0,0 @@ -/* System call interface code for Sequent Symmetry running Dynix version 3. - Copyright (C) 1993, 1995, 1997 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. */ - -#include - -#ifdef __ASSEMBLER__ - -/* Get the symbols for system call interrupts. */ -#include - -/* Use the BSD versions of system calls, by setting the high 16 bits - of the syscall number (see /usr/include/syscall.h). */ -#define SYS_HANDLER (SYS_bsd << 16) - -/* Dynix uses an interrupt interface to system calls. - "int $T_SVCn" are syscall interfaces for 0-6 arg functions. - (see /usr/include/machine/trap.h). */ - -#undef DO_CALL - -#ifdef __STDC__ -#define DO_CALL(syscall_name, args) \ - movl $(SYS_HANDLER | SYS_##syscall_name), %eax; \ - int $T_SVC##args; -#else -#define DO_CALL(syscall_name, args) \ - movl $(SYS_HANDLER | SYS_/**/syscall_name), %eax; \ - int $T_SVC/**/args; -#endif - -#undef PSEUDO -#define PSEUDO(name, syscall_name, args) \ - .text; \ - .globl syscall_error; \ - .align 4; \ - ENTRY (name) \ - ARGS (args) \ - DO_CALL (syscall_name, args) \ - jb syscall_error - -/* For one and two-argument calls, Dynix takes the arguments in %ecx and - %edx. For 3-6 argument calls, Dynix takes the address of the first - argument in %ecx. */ - -#ifdef __STDC__ -#define ARGS(n) ARGS_##n -#else -#define ARGS(n) ARGS_/**/n -#endif - -#define ARGS_0 -#define ARGS_1 movl 4(%esp), %ecx; -#define ARGS_2 movl 4(%esp), %ecx; movl 8(%esp), %edx; -#define ARGS_3 leal 4(%esp), %ecx; -#define ARGS_4 ARGS_3 -#define ARGS_5 ARGS_3 -#define ARGS_6 ARGS_3 - -/* Dynix reverses %ecx and %edx relative to most i386 Unices. */ - -#undef r1 -#define r1 %ecx /* Secondary return-value register. */ -#undef scratch -#define scratch %edx /* Call-clobbered register for random use. */ - -#endif /* __ASSEMBLER__ */ diff --git a/sysdeps/unix/bsd/sony/newsos/m68k/Implies b/sysdeps/unix/bsd/sony/newsos/m68k/Implies deleted file mode 100644 index 7b5f3cfc96..0000000000 --- a/sysdeps/unix/bsd/sony/newsos/m68k/Implies +++ /dev/null @@ -1,2 +0,0 @@ -# A news800 is almost exactly like an hp300 -unix/bsd/hp/m68k diff --git a/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h b/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h deleted file mode 100644 index db124fa15f..0000000000 --- a/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h +++ /dev/null @@ -1,56 +0,0 @@ -/* Copyright (C) 1993, 1994, 1995, 1997 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. */ - -#include - -#ifdef __ASSEMBLER__ - -#define POUND # - -#ifdef __STDC__ -#define ENTRY(name) \ - .globl _##name; \ - .even; \ - _##name##: -#else -#define ENTRY(name) \ - .globl _/**/name; \ - .even; \ - _/**/name/**/: -#endif - -#define PSEUDO(name, syscall_name, args) \ - .even; \ - .globl syscall_error; \ - error: jmp syscall_error; \ - ENTRY (name) \ - DO_CALL (POUND SYS_ify (syscall_name), args) - -#define DO_CALL(syscall, args) \ - movel syscall, d0; \ - linkw a6, POUND(0); \ - trap POUND(0); \ - unlk a6; \ - bcs error - -#define ret rts -#define r0 d0 -#define r1 d1 -#define MOVE(x,y) movel x , y - -#endif diff --git a/sysdeps/unix/bsd/sony/newsos4/Makefile b/sysdeps/unix/bsd/sony/newsos4/Makefile deleted file mode 100644 index 053da568d8..0000000000 --- a/sysdeps/unix/bsd/sony/newsos4/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ifeq ($(subdir),posix) -sysdep_routines := $(sysdep_routines) sys_wait4 -endif diff --git a/sysdeps/unix/bsd/sony/newsos4/syscalls.list b/sysdeps/unix/bsd/sony/newsos4/syscalls.list deleted file mode 100644 index b90087f426..0000000000 --- a/sysdeps/unix/bsd/sony/newsos4/syscalls.list +++ /dev/null @@ -1,3 +0,0 @@ -# File name Caller Syscall name # args Strong name Weak names - -sys_wait4 wait4 wait4 4 __wait4_syscall diff --git a/sysdeps/unix/bsd/sony/newsos4/wait.c b/sysdeps/unix/bsd/sony/newsos4/wait.c deleted file mode 100644 index 79d54580fd..0000000000 --- a/sysdeps/unix/bsd/sony/newsos4/wait.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/bsd/sony/newsos4/wait3.c b/sysdeps/unix/bsd/sony/newsos4/wait3.c deleted file mode 100644 index 0b3bdee771..0000000000 --- a/sysdeps/unix/bsd/sony/newsos4/wait3.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/bsd/sony/newsos4/wait4.c b/sysdeps/unix/bsd/sony/newsos4/wait4.c deleted file mode 100644 index 856c99fd61..0000000000 --- a/sysdeps/unix/bsd/sony/newsos4/wait4.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/bsd/sun/bits/signum.h b/sysdeps/unix/bsd/sun/bits/signum.h deleted file mode 100644 index c13e7cd742..0000000000 --- a/sysdeps/unix/bsd/sun/bits/signum.h +++ /dev/null @@ -1,69 +0,0 @@ -/* Signal number definitions. SunOS version. - Copyright (C) 1994, 1996 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. */ - -#ifdef _SIGNAL_H - -/* This file defines the fake signal functions and signal - number constants for SunOS 3 and 4 Unix systems. */ - -/* Fake signal functions. */ -#define SIG_ERR ((__sighandler_t) -1) /* Error return. */ -#define SIG_DFL ((__sighandler_t) 0) /* Default action. */ -#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */ - - -/* Signals. */ -#define SIGHUP 1 /* Hangup (POSIX). */ -#define SIGINT 2 /* Interrupt (ANSI). */ -#define SIGQUIT 3 /* Quit (POSIX). */ -#define SIGILL 4 /* Illegal instruction (ANSI). */ -#define SIGABRT SIGIOT /* Abort (ANSI). */ -#define SIGTRAP 5 /* Trace trap (POSIX). */ -#define SIGIOT 6 /* IOT trap (4.2 BSD). */ -#define SIGEMT 7 /* EMT trap (4.2 BSD). */ -#define SIGFPE 8 /* Floating-point exception (ANSI). */ -#define SIGKILL 9 /* Kill, unblockable (POSIX). */ -#define SIGBUS 10 /* Bus error (4.2 BSD). */ -#define SIGSEGV 11 /* Segmentation violation (ANSI). */ -#define SIGSYS 12 /* Bad argument to system call (4.2 BSD). */ -#define SIGPIPE 13 /* Broken pipe (POSIX). */ -#define SIGALRM 14 /* Alarm clock (POSIX). */ -#define SIGTERM 15 /* Termination (ANSI). */ -#define SIGURG 16 /* Urgent condition on socket (4.2 BSD). */ -#define SIGSTOP 17 /* Stop, unblockable (POSIX). */ -#define SIGTSTP 18 /* Keyboard stop (POSIX). */ -#define SIGCONT 19 /* Continue (POSIX). */ -#define SIGCHLD 20 /* Child status has changed (POSIX). */ -#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */ -#define SIGTTIN 21 /* Background read from tty (POSIX). */ -#define SIGTTOU 22 /* Background write to tty (POSIX). */ -#define SIGIO 23 /* I/O now possible (4.2 BSD). */ -#define SIGPOLL SIGIO /* Same as SIGIO? (SVID). */ -#define SIGXCPU 24 /* CPU limit exceeded (4.2 BSD). */ -#define SIGXFSZ 25 /* File size limit exceeded (4.2 BSD). */ -#define SIGVTALRM 26 /* Virtual alarm clock (4.2 BSD). */ -#define SIGPROF 27 /* Profiling alarm clock (4.2 BSD). */ -#define SIGWINCH 28 /* Window size change (4.3 BSD, Sun). */ -#define SIGLOST 29 /* Resource lost (Sun). */ -#define SIGUSR1 30 /* User-defined signal 1 (POSIX). */ -#define SIGUSR2 31 /* User-defined signal 2 (POSIX). */ - -#endif /* included. */ - -#define _NSIG 32 /* Biggest signal number + 1. */ diff --git a/sysdeps/unix/bsd/sun/m68k/Makefile b/sysdeps/unix/bsd/sun/m68k/Makefile deleted file mode 100644 index ac4121dc2c..0000000000 --- a/sysdeps/unix/bsd/sun/m68k/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ifeq ($(subdir),signal) -sysdep_routines := $(sysdep_routines) sigtramp -endif diff --git a/sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h b/sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h deleted file mode 100644 index 99a0506a8d..0000000000 --- a/sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h +++ /dev/null @@ -1,30 +0,0 @@ -/* Structure describing state saved while handling a signal. Sun 3 version. - Copyright (C) 1993, 1994, 1997 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 _SIGNAL_H -# error "Never use directly; include instead." -#endif - -struct sigcontext - { - int sc_onstack; - __sigset_t sc_mask; - - int sc_sp, sc_pc, sc_ps; - }; diff --git a/sysdeps/unix/bsd/sun/m68k/brk.S b/sysdeps/unix/bsd/sun/m68k/brk.S deleted file mode 100644 index 9f821a0604..0000000000 --- a/sysdeps/unix/bsd/sun/m68k/brk.S +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (C) 1991,1992,1994,1995,1997,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 - 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. */ - -#include - -#ifndef SYS_brk -#define SYS_brk 17 -#endif - -.data -.globl ___curbrk -___curbrk: - .long __end - -.text -ENTRY (__brk) - movel #__end, d0 - cmpl sp@(4), d0 - ble 0f - movel d0, sp@(4) -0: pea SYS_brk - trap #0 - bcs 1f - movel sp@(4), ___curbrk - clrl d0 - rts -1: - jmp syscall_error - -weak_alias (__brk, brk) diff --git a/sysdeps/unix/bsd/sun/m68k/dl-brk.S b/sysdeps/unix/bsd/sun/m68k/dl-brk.S deleted file mode 100644 index eeb96544e3..0000000000 --- a/sysdeps/unix/bsd/sun/m68k/dl-brk.S +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/bsd/sun/m68k/sethostid.S b/sysdeps/unix/bsd/sun/m68k/sethostid.S deleted file mode 100644 index 13af476df7..0000000000 --- a/sysdeps/unix/bsd/sun/m68k/sethostid.S +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (C) 1991, 1992, 1997, 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 - 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. */ - -#include - -#ifdef SYS_sethostid - -SYSCALL (sethostid, 1) - ret - -#else - -#include - -.globl _sethostid -.even -_sethostid: - movel #ENOSYS, _errno - moveq #-1, d0 - rts - -.stabs "warning: sethostid is not implemented and will always fail",30,0,0,0 -.stabs "_sethostid",1,0,0,0 - -#endif diff --git a/sysdeps/unix/bsd/sun/m68k/sigtramp.c b/sysdeps/unix/bsd/sun/m68k/sigtramp.c deleted file mode 100644 index 5a3ca3cf10..0000000000 --- a/sysdeps/unix/bsd/sun/m68k/sigtramp.c +++ /dev/null @@ -1,145 +0,0 @@ -/* Copyright (C) 1993, 1996, 1997, 2004 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 __GNUC__ - #error This file uses GNU C extensions; you must compile with GCC. -#endif - -/* Get the definition of `struct sigcontext'. */ -#define KERNEL -#define sigvec sun_sigvec -#define sigstack sun_sigstack -#define sigcontext sun_sigcontext -#include "/usr/include/sys/signal.h" -#undef sigvec -#undef sigstack -#undef sigcontext -#undef NSIG -#undef SIGABRT -#undef SIGCLD -#undef SV_ONSTACK -#undef SV_RESETHAND -#undef SV_INTERRUPT -#undef SA_ONSTACK -#undef SA_NOCLDSTOP -#undef SIG_ERR -#undef SIG_DFL -#undef SIG_IGN -#undef sigmask -#undef SIG_BLOCK -#undef SIG_UNBLOCK -#undef SIG_SETMASK - -#include -#include -#include - -/* Defined in __sigvec.S. */ -extern int __raw_sigvec (int sig, const struct sigvec *vec, - struct sigvec *ovec); - -/* User-specified signal handlers. */ -#define mytramp 1 -#ifdef mytramp -static __sighandler_t handlers[NSIG]; -#else -#define handlers _sigfunc -extern __sighandler_t _sigfunc[]; -#endif - -#if mytramp - -/* Handler for all signals that are handled by a user-specified function. - Saves and restores the general regs %g2-%g7, the %y register, and - all the FPU regs (including %fsr), around calling the user's handler. */ -static void -trampoline (sig, code, context, addr) - int sig; - int code; - struct sigcontext *context; - void *addr; -{ - int save[4]; - - /* Save the call-clobbered registers. */ - asm volatile ("movem%.l d0-d1/a0-a1, %0" : : "m" (save[0])); - - /* XXX should save/restore FP regs */ - - /* Call the user's handler. */ - (*((void (*) (int sig, int code, struct sigcontext *context, - PTR addr)) handlers[sig])) - (sig, code, context, addr); - - /* Restore the call-clobbered registers. */ - asm volatile ("movem%.l %0, d0-d1/a0-a1" : : "g" (save[0]) : - "d0", "d1", "a0", "a1"); - - __sigreturn (context); -} - -#endif - -int -__sigvec (sig, vec, ovec) - int sig; - const struct sigvec *vec; - struct sigvec *ovec; -{ -#ifndef mytramp - extern void _sigtramp (int); -#define trampoline _sigtramp -#endif - struct sigvec myvec; - int mask; - __sighandler_t ohandler; - - if (sig <= 0 || sig >= NSIG) - { - __set_errno (EINVAL); - return -1; - } - - mask = __sigblock(sigmask(sig)); - - ohandler = handlers[sig]; - - if (vec != NULL && - vec->sv_handler != SIG_IGN && vec->sv_handler != SIG_DFL) - { - handlers[sig] = vec->sv_handler; - myvec = *vec; - myvec.sv_handler = trampoline; - vec = &myvec; - } - - if (__raw_sigvec(sig, vec, ovec) < 0) - { - int save = errno; - (void) __sigsetmask(mask); - errno = save; - return -1; - } - - if (ovec != NULL && ovec->sv_handler == trampoline) - ovec->sv_handler = ohandler; - - (void) __sigsetmask(mask); - - return 0; -} diff --git a/sysdeps/unix/bsd/sun/m68k/syscall.S b/sysdeps/unix/bsd/sun/m68k/syscall.S deleted file mode 100644 index 1d4d5be42f..0000000000 --- a/sysdeps/unix/bsd/sun/m68k/syscall.S +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 1993, 1997 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. */ - -#include - -ENTRY (syscall) - movel sp@, d0 /* Save return address in D0. */ - movel sp@(4), sp@ /* Put syscall number at top of stack. */ - movel d0, sp@(4) /* Put return address under it. */ - trap #0 /* Do syscall; pops number from stack. */ - jcs error - ret -error: jmp syscall_error diff --git a/sysdeps/unix/bsd/sun/m68k/sysdep.h b/sysdeps/unix/bsd/sun/m68k/sysdep.h deleted file mode 100644 index e51ab0a8e4..0000000000 --- a/sysdeps/unix/bsd/sun/m68k/sysdep.h +++ /dev/null @@ -1,62 +0,0 @@ -/* Copyright (C) 1991, 1992, 1994, 1995, 1997 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. */ - -#include - -#ifdef __ASSEMBLER__ - -#define POUND # - -#ifdef __STDC__ -#define ENTRY(name) \ - .globl _##name; \ - .even; \ - _##name##: -#else -#define ENTRY(name) \ - .globl _/**/name; \ - .even; \ - _/**/name/**/: -#endif - -#ifdef __STDC__ -#define PSEUDO(name, syscall_name, args) \ - .even; \ - .globl syscall_error; \ - error: jmp syscall_error; \ - ENTRY (name) \ - pea SYS_##syscall_name; \ - trap POUND 0; \ - bcs error -#else -#define PSEUDO(name, syscall_name, args) \ - .even; \ - .globl syscall_error; \ - error: jmp syscall_error; \ - ENTRY (name) \ - pea SYS_/**/syscall_name; \ - trap POUND 0; \ - bcs error -#endif - -#define ret rts -#define r0 d0 -#define r1 d1 -#define MOVE(x,y) movel x , y - -#endif /* __ASSEMBLER__ */ diff --git a/sysdeps/unix/bsd/sun/m68k/vfork.S b/sysdeps/unix/bsd/sun/m68k/vfork.S deleted file mode 100644 index cf9e2e9e1a..0000000000 --- a/sysdeps/unix/bsd/sun/m68k/vfork.S +++ /dev/null @@ -1,56 +0,0 @@ -/* Copyright (C) 1991, 92, 93, 94, 95, 97, 2002 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. */ - -#include - -#ifndef SYS_vfork -#define SYS_vfork 66 -#endif - -/* Clone the calling process, but without copying the whole address space. - The calling process is suspended until the new process exits or is - replaced by a call to `execve'. Return -1 for errors, 0 to the new process, - and the process ID of the new process to the old process. */ -.globl ___vfork -___vfork: - /* Pop the return PC value into A0. */ - movel sp@+, a0 - - /* Push the syscall number and trap into the kernel. */ - movel #SYS_vfork, sp@- - trap #0 - bcs error /* Branch forward if it failed. */ - - /* It succeeded. See which fork we're in. D1 is now 0 for the - parent and 1 for the child. Decrement it to make it -1 (all - bits set) for the parent, and 0 (no bits set) for the child. - Then AND it with D0, so the parent gets D0&-1==R0, and the child - gets D0&0==0. */ - subql #1, d1 - andl d1, d0 - - /* Jump to the return PC. */ - jmp a0@ - -error: - movel d0, _errno - moveq #-1, d0 - jmp a0@ -libc_hidden_def (__vfork) - -weak_alias (__vfork, vfork) diff --git a/sysdeps/unix/bsd/sun/sethostid.c b/sysdeps/unix/bsd/sun/sethostid.c deleted file mode 100644 index 6c0d39db5c..0000000000 --- a/sysdeps/unix/bsd/sun/sethostid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/bsd/sun/sigreturn.S b/sysdeps/unix/bsd/sun/sigreturn.S deleted file mode 100644 index a3ea8e3fae..0000000000 --- a/sysdeps/unix/bsd/sun/sigreturn.S +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 1993, 1995, 1997 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. */ - -#include - -#ifndef SYS_sigreturn -#define SYS_sigreturn 139 -#endif - -SYSCALL__ (sigreturn, 1) - /* Does not return. */ - -weak_alias (__sigreturn, sigreturn) diff --git a/sysdeps/unix/bsd/sun/sparc/Makefile b/sysdeps/unix/bsd/sun/sparc/Makefile deleted file mode 100644 index 59d10dbdbf..0000000000 --- a/sysdeps/unix/bsd/sun/sparc/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -# Basically `-e start' is magical to the Sun linker. You would think that -# having start.o first would be enough, but you would be wrong. -LDFLAGS := $(LDFLAGS) -Xlinker -e -Xlinker start - -ifeq ($(subdir),signal) -sysdep_routines := $(sysdep_routines) sigtramp -endif diff --git a/sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h b/sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h deleted file mode 100644 index 7c4bca6049..0000000000 --- a/sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h +++ /dev/null @@ -1,34 +0,0 @@ -/* Structure describing state saved while handling a signal. Sparc version. - Copyright (C) 1992, 1994, 1997 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 _SIGNAL_H -# error "Never use directly; include instead." -#endif - -struct sigcontext - { - int sc_onstack; - __sigset_t sc_mask; - -#define SPARC_MAXREGWINDOW 31 /* Maximum usable register windows. */ - int sc_sp, sc_pc, sc_npc, sc_psr, sc_g1, sc_o0; - int sc_wbcnt; /* Number of outstanding windows. */ - __ptr_t sc_spbuf[SPARC_MAXREGWINDOW]; /* SP's for each window. */ - int sc_wbuf[SPARC_MAXREGWINDOW][16]; /* Saved register windows. */ - }; diff --git a/sysdeps/unix/bsd/sun/sparc/sethostid.S b/sysdeps/unix/bsd/sun/sparc/sethostid.S deleted file mode 100644 index 100fb1c1ca..0000000000 --- a/sysdeps/unix/bsd/sun/sparc/sethostid.S +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright (C) 1991, 1992, 1997, 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 - 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. */ - -#include - -#ifdef SYS_sethostid - -SYSCALL (sethostid, 1) - ret - -#else - -/* only defines E* #ifdef _ERRNO_H. */ -#define _ERRNO_H -#include - -ENTRY (sethostid) - mov ENOSYS, %o0 - sethi %hi(_errno), %g1 - st %o0, [%g1 + %lo(_errno)] - retl - sub %g0, 1, %o0 - - -.stabs "warning: sethostid is not implemented and will always fail",30,0,0,0 -.stabs "_sethostid",1,0,0,0 - -#endif diff --git a/sysdeps/unix/bsd/sun/sparc/sigtramp.c b/sysdeps/unix/bsd/sun/sparc/sigtramp.c deleted file mode 100644 index e11f7e51d3..0000000000 --- a/sysdeps/unix/bsd/sun/sparc/sigtramp.c +++ /dev/null @@ -1,247 +0,0 @@ -/* Copyright (C) 1991,1992,1994,1996,1997,2004 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 __GNUC__ - #error This file uses GNU C extensions; you must compile with GCC. -#endif - -/* Get the definition of `struct sigcontext'. */ -#define KERNEL -#define sigvec sun_sigvec -#define sigstack sun_sigstack -#define sigcontext sun_sigcontext -#include "/usr/include/sys/signal.h" -#undef sigvec -#undef sigstack -#undef sigcontext -#undef NSIG -#undef SIGABRT -#undef SIGCLD -#undef SV_ONSTACK -#undef SV_RESETHAND -#undef SV_INTERRUPT -#undef SA_ONSTACK -#undef SA_NOCLDSTOP -#undef SIG_ERR -#undef SIG_DFL -#undef SIG_IGN -#undef sigmask -#undef SIG_BLOCK -#undef SIG_UNBLOCK -#undef SIG_SETMASK - -#include -#include -#include - -/* Defined in __sigvec.S. */ -extern int __raw_sigvec (int sig, CONST struct sigvec *vec, - struct sigvec *ovec); - -/* User-specified signal handlers. */ -#define mytramp 1 -#ifdef mytramp -static __sighandler_t handlers[NSIG]; -#else -#define handlers _sigfunc -extern __sighandler_t _sigfunc[]; -#endif - -#if mytramp - -/* Handler for all signals that are handled by a user-specified function. - Saves and restores the general regs %g2-%g7, the %y register, and - all the FPU regs (including %fsr), around calling the user's handler. */ -static void -trampoline (sig) - int sig; -{ - /* We use `double' and `long long int' so `std' (store doubleword) insns, - which might be faster than single-word stores, will be generated. */ - register double f0 asm("%f0"); - register double f2 asm("%f2"); - register double f4 asm("%f4"); - register double f6 asm("%f6"); - register double f8 asm("%f8"); - register double f10 asm("%f10"); - register double f12 asm("%f12"); - register double f14 asm("%f14"); - register double f16 asm("%f16"); - register double f18 asm("%f18"); - register double f20 asm("%f20"); - register double f22 asm("%f22"); - register double f24 asm("%f24"); - register double f26 asm("%f26"); - register double f28 asm("%f28"); - register double f30 asm("%f30"); - register long long int g2 asm("%g2"); - register long long int g4 asm("%g4"); - register long long int g6 asm("%g6"); - register int *fp asm("%fp"); - - int code; - register struct sigcontext *context asm("%i0"); /* See end of fn. */ - void *addr; - int y; - double fpsave[16]; - int fsr; - int savefpu; - long long int glsave[3]; - - /* SIG isn't really passed as an arg. - The args to the signal handler are at fp[16..19]. */ - sig = fp[16]; - code = fp[17]; - context = (struct sigcontext *) fp[18]; - addr = (PTR) fp[19]; - - /* Save the Y register. */ - asm("rd %%y, %0" : "=r" (y)); - - /* Save the FPU regs if the FPU enable bit is set in the PSR, - and the signal isn't an FP exception. */ - savefpu = (context->sc_psr & 0x1000) && sig != SIGFPE; - if (savefpu) - { - fpsave[0] = f0; - fpsave[1] = f2; - fpsave[2] = f4; - fpsave[3] = f6; - fpsave[4] = f8; - fpsave[5] = f10; - fpsave[6] = f12; - fpsave[7] = f14; - fpsave[8] = f16; - fpsave[9] = f18; - fpsave[10] = f20; - fpsave[11] = f22; - fpsave[12] = f24; - fpsave[13] = f26; - fpsave[14] = f28; - fpsave[15] = f30; - - /* Force it into a stack slot so the asm won't barf. Sigh. */ - (void) &fsr; - asm("st %%fsr, %0" : "=m" (fsr)); - } - - /* Save the global registers (except for %g1, which is a scratch reg). */ - glsave[0] = g2; - glsave[1] = g4; - glsave[2] = g6; - - /* Call the user's handler. */ - (*((void (*) (int sig, int code, struct sigcontext *context, - void *addr)) handlers[sig])) - (sig, code, context, addr); - - /* Restore the Y register. */ - asm("mov %0, %%y" : : "r" (y)); - - if (savefpu) - { - /* Restore the FPU regs. */ - f0 = fpsave[0]; - f2 = fpsave[1]; - f4 = fpsave[2]; - f6 = fpsave[3]; - f8 = fpsave[4]; - f10 = fpsave[5]; - f12 = fpsave[6]; - f14 = fpsave[7]; - f16 = fpsave[8]; - f18 = fpsave[9]; - f20 = fpsave[10]; - f22 = fpsave[11]; - f24 = fpsave[12]; - f26 = fpsave[13]; - f28 = fpsave[14]; - f30 = fpsave[15]; - - asm("ld %0, %%fsr" : : "m" (fsr)); - } - - /* Restore the globals. */ - g2 = glsave[0]; - g4 = glsave[1]; - g6 = glsave[2]; - - /* Unwind a frame, and do a "sigcleanup" system call. - The system call apparently does a return. - I don't know what it's for. Ask Sun. */ - asm("restore %%g0, 139, %%g1\n" - "ta 0\n" - "! this should be i0: %0" /* Useless insn that will never be executed, */ - /* here to make the compiler happy. */ - : /* No outputs. */ : - /* CONTEXT is bound to %i0. We reference it as an input here to make - sure the compiler considers it live at this point, and preserves - the value in that register. The restore makes %i0 become %o0, the - argument to the system call. */ - "r" (context)); -} -#endif - -int -__sigvec (sig, vec, ovec) - int sig; - const struct sigvec *vec; - struct sigvec *ovec; -{ -#ifndef mytramp - extern void _sigtramp (int); -#define trampoline _sigtramp -#endif - struct sigvec myvec; - int mask; - __sighandler_t ohandler; - - if (sig <= 0 || sig >= NSIG) - { - __set_errno (EINVAL); - return -1; - } - - mask = __sigblock (sigmask(sig)); - - ohandler = handlers[sig]; - - if (vec != NULL && - vec->sv_handler != SIG_IGN && vec->sv_handler != SIG_DFL) - { - handlers[sig] = vec->sv_handler; - myvec = *vec; - myvec.sv_handler = trampoline; - vec = &myvec; - } - - if (__raw_sigvec(sig, vec, ovec) < 0) - { - int save = errno; - (void) __sigsetmask(mask); - errno = save; - return -1; - } - - if (ovec != NULL && ovec->sv_handler == trampoline) - ovec->sv_handler = ohandler; - - (void) __sigsetmask (mask); - - return 0; -} diff --git a/sysdeps/unix/bsd/sun/sunos4/Implies b/sysdeps/unix/bsd/sun/sunos4/Implies deleted file mode 100644 index c99e256ac1..0000000000 --- a/sysdeps/unix/bsd/sun/sunos4/Implies +++ /dev/null @@ -1,2 +0,0 @@ -# SunOS 4 has the canonical set of system calls. -unix/mman diff --git a/sysdeps/unix/bsd/sun/sunos4/Makefile b/sysdeps/unix/bsd/sun/sunos4/Makefile deleted file mode 100644 index d17654a30f..0000000000 --- a/sysdeps/unix/bsd/sun/sunos4/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -ifeq ($(subdir),posix) -sysdep_routines := $(sysdep_routines) sys_wait4 -endif - -ifeq ($(subdir),misc) -sysdep_routines := $(sysdep_routines) sys_mmap -endif diff --git a/sysdeps/unix/bsd/sun/sunos4/bits/fcntl.h b/sysdeps/unix/bsd/sun/sunos4/bits/fcntl.h deleted file mode 100644 index a30b352592..0000000000 --- a/sysdeps/unix/bsd/sun/sunos4/bits/fcntl.h +++ /dev/null @@ -1,142 +0,0 @@ -/* O_*, F_*, FD_* bit values for SunOS 4. - Copyright (C) 1991, 1992, 1997, 2004 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 _FCNTL_H -#error "Never use directly; include instead." -#endif - - -/* File access modes for `open' and `fcntl'. */ -#define O_RDONLY 0 /* Open read-only. */ -#define O_WRONLY 1 /* Open write-only. */ -#define O_RDWR 2 /* Open read/write. */ - - -/* Bits OR'd into the second argument to open. */ -#define O_CREAT 0x0200 /* Create file if it doesn't exist. */ -#define O_EXCL 0x0800 /* Fail if file already exists. */ -#define O_TRUNC 0x0400 /* Truncate file to zero length. */ -#define O_NOCTTY 0x8000 /* Don't assign a controlling terminal. */ -#if defined __USE_BSD || defined __USE_SVID -#define O_ASYNC 0x0040 /* Send SIGIO to owner when data is ready. */ -#define O_FSYNC 0x2000 /* Synchronous writes. */ -#define O_SYNC O_FSYNC -#endif - -/* File status flags for `open' and `fcntl'. */ -#define O_APPEND 0x0008 /* Writes append to the file. */ -#define O_NONBLOCK 0x4000 /* Non-blocking I/O. */ - -/* Sun defines O_NDELAY one way for BSD behavior and another for System V - behavior. In the GNU C library, you get the BSD behavior unless you - define _USG_SOURCE without also defining _BSD_SOURCE or _GNU_SOURCE. */ -#ifdef __USE_BSD -#define O_NDELAY 0x0004 -#endif -#if !defined (O_NDELAY) && defined (__USE_SVID) -#define O_NDELAY 0x1000 -#endif - -#ifdef __USE_BSD -/* Bits in the file status flags returned by F_GETFL. - These are all the O_* flags, plus FREAD and FWRITE, which are - independent bits set by which of O_RDONLY, O_WRONLY, and O_RDWR, was - given to `open'. */ -#define FREAD 1 -#define FWRITE 2 - -/* Traditional Unix names the O_* bits. */ -#define FASYNC O_ASYNC -#define FCREAT O_CREAT -#define FEXCL O_EXCL -#define FTRUNC O_TRUNC -#define FNOCTTY O_NOCTTY -#define FFSYNC O_FSYNC -#define FSYNC O_SYNC -#define FAPPEND O_APPEND -#define FNONBLOCK O_NONBLOCK -#define FNONBIO O_NONBLOCK -#define FNDELAY 0x0004 /* BSD O_NDELAY. */ -#define FNBIO 0x1000 /* System V O_NDELAY. */ -#endif - -/* Mask for file access modes. This is system-dependent in case - some system ever wants to define some other flavor of access. */ -#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR) - -/* Values for the second argument to `fcntl'. */ -#define F_DUPFD 0 /* Duplicate file descriptor. */ -#define F_GETFD 1 /* Get file descriptor flags. */ -#define F_SETFD 2 /* Set file descriptor flags. */ -#define F_GETFL 3 /* Get file status flags. */ -#define F_SETFL 4 /* Set file status flags. */ -#if defined __USE_BSD || defined __USE_UNIX98 -#define F_GETOWN 5 /* Get owner (receiver of SIGIO). */ -#define F_SETOWN 6 /* Set owner (receiver of SIGIO). */ -#endif -#define F_GETLK 7 /* Get record locking info. */ -#define F_SETLK 8 /* Set record locking info (non-blocking). */ -#define F_SETLKW 9 /* Set record locking info (blocking). */ -#ifdef __USE_BSD -#define F_RGETLK 10 /* Get remote record locking info. */ -#define F_RSETLK 11 /* Set remote locking info (non-blocking). */ -#define F_CNVT 12 /* Convert a fhandle to an open fd. */ -#define F_RSETLKW 13 /* Set remote locking info (blocking). */ -#endif - -/* File descriptor flags used with F_GETFD and F_SETFD. */ -#define FD_CLOEXEC 1 /* Close on exec. */ - - -#include - -/* The structure describing an advisory lock. This is the type of the third - argument to `fcntl' for the F_GETLK, F_SETLK, and F_SETLKW requests. */ -struct flock - { - short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ - short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ - __off_t l_start; /* Offset where the lock begins. */ - __off_t l_len; /* Size of the locked area; zero means until EOF. */ - short int l_pid; /* Process holding the lock. */ - short int l_xxx; /* Reserved for future use. */ - }; - -#ifdef __USE_BSD -/* The structure describing a remote advisory lock. This is the type of the - third arg to `fcntl' for the F_RGETLK, F_RSETLK, and F_RSETLKW requests. */ -struct eflock - { - short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ - short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ - __off_t l_start; /* Offset where the lock begins. */ - __off_t l_len; /* Size of the locked area; zero means until EOF. */ - short int l_pid; /* Process holding the lock. */ - short int l_xxx; /* Reserved for future use. */ - long int l_rpid; /* Remote process ID wanting this lock. */ - long int l_rsys; /* Remote system ID wanting this lock. */ - }; - -#endif - - -/* Values for the `l_type' field of a `struct flock'. */ -#define F_RDLCK 1 /* Read lock. */ -#define F_WRLCK 2 /* Write lock. */ -#define F_UNLCK 3 /* Remove lock. */ diff --git a/sysdeps/unix/bsd/sun/sunos4/bits/mman.h b/sysdeps/unix/bsd/sun/sunos4/bits/mman.h deleted file mode 100644 index fdef46522a..0000000000 --- a/sysdeps/unix/bsd/sun/sunos4/bits/mman.h +++ /dev/null @@ -1,68 +0,0 @@ -/* Definitions for BSD-style memory management. SunOS 4 version. - Copyright (C) 1994, 1995, 1996, 1997, 1998 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_MMAN_H -#define _BITS_MMAN_H 1 - -/* Protections are chosen from these bits, OR'd together. The - implementation does not necessarily support PROT_EXEC or PROT_WRITE - without PROT_READ. The only guarantees are that no writing will be - allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ - -#define PROT_NONE 0x00 /* No access. */ -#define PROT_READ 0x01 /* Pages can be read. */ -#define PROT_WRITE 0x02 /* Pages can be written. */ -#define PROT_EXEC 0x04 /* Pages can be executed. */ - -/* Sharing types (must choose one and only one of these). */ -#define MAP_SHARED 0x01 /* Share changes. */ -#define MAP_PRIVATE 0x02 /* Changes private; copy pages on write. */ -#ifdef __USE_BSD -# define MAP_TYPE 0x0f /* Mask for sharing type. */ -#endif - -/* Other flags. */ -#define MAP_FIXED 0x10 /* Map address must be exactly as requested. */ -/* The following three flags are not actually implemented in SunOS 4.1. */ -#ifdef __USE_BSD -# define MAP_RENAME 0x20 /* Rename private pages to file. */ -# define MAP_NORESERVE 0x40 /* Don't reserve needed swap area. */ -# define MAP_INHERIT 0x80 /* Region is retained after exec. */ -#endif - -/* This is an internal flag that is always set in `mmap' system calls. In - older versions of SunOS 4 `mmap' did not return the actual mapping - address, but always returned zero. This flag says to return the - address; the `mmap' C library function always sets it. */ -#define _MAP_NEW 0x80000000 - -/* Advice to `madvise'. */ -#ifdef __USE_BSD -# define MADV_NORMAL 0 /* No further special treatment. */ -# define MADV_RANDOM 1 /* Expect random page references. */ -# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define MADV_WILLNEED 3 /* Will need these pages. */ -# define MADV_DONTNEED 4 /* Don't need these pages. */ -#endif - -/* Flags to `msync'. */ -#define MS_ASYNC 0x1 /* Return immediately, don't fsync. */ -#define MS_INVALIDATE 0x2 /* Invalidate caches. */ - -#endif /* bits/mman.h */ diff --git a/sysdeps/unix/bsd/sun/sunos4/bits/resource.h b/sysdeps/unix/bsd/sun/sunos4/bits/resource.h deleted file mode 100644 index 2f0d2dc73f..0000000000 --- a/sysdeps/unix/bsd/sun/sunos4/bits/resource.h +++ /dev/null @@ -1,174 +0,0 @@ -/* Bit values for resource limits. SunOS 4 version. - Copyright (C) 1994, 1996, 1997 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 _SYS_RESOURCE_H -# error "Never use directly; include instead." -#endif - -/* These are the values for 4.4 BSD and GNU. Earlier BSD systems have a - subset of these kinds of resource limit. In systems where `getrlimit' - and `setrlimit' are not system calls, these are the values used by the C - library to emulate them. */ - -#include - -/* Kinds of resource limit. */ -enum __rlimit_resource - { - /* Per-process CPU limit, in seconds. */ - RLIMIT_CPU, -#define RLIMIT_CPU RLIMIT_CPU - /* Largest file that can be created, in bytes. */ - RLIMIT_FSIZE, -#define RLIMIT_FSIZE RLIMIT_FSIZE - /* Maximum size of data segment, in bytes. */ - RLIMIT_DATA, -#define RLIMIT_DATA RLIMIT_DATA - /* Maximum size of stack segment, in bytes. */ - RLIMIT_STACK, -#define RLIMIT_STACK RLIMIT_STACK - /* Largest core file that can be created, in bytes. */ - RLIMIT_CORE, -#define RLIMIT_CORE RLIMIT_CORE - /* Largest resident set size, in bytes. - This affects swapping; processes that are exceeding their - resident set size will be more likely to have physical memory - taken from them. */ - RLIMIT_RSS, -#define RLIMIT_RSS RLIMIT_RSS - /* Number of open files. */ - RLIMIT_NOFILE, - RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */ -#define RLIMIT_NOFILE RLIMIT_NOFILE -#define RLIMIT_OFILE RLIMIT_OFILE - - RLIM_NLIMITS - }; - -/* Value to indicate that there is no limit. */ -#ifndef __USE_FILE_OFFSET64 -# define RLIM_INFINITY 0x7fffffff -#else -# define RLIM_INFINITY 0x7fffffffffffffffLL -#endif - -#ifdef __USE_LARGEFILE64 -# define RLIM64_INFINITY 0x7fffffffffffffffLL -#endif - - -/* Type to represent quantities in resource limits. */ -#ifndef __USE_FILE_OFFSET64 -typedef __rlim_t rlim_t; -#else -typedef __rlim64_t rlim_t; -#endif - -struct rlimit - { - /* The current (soft) limit. */ - rlim_t rlim_cur; - /* The hard limit. */ - rlim_t rlim_max; - }; - -#ifdef __USE_LARGEFILE64 -typedef __rlim64_t rlim64_t; - -struct rlimit64 - { - /* The current (soft) limit. */ - rlim64_t rlim_cur; - /* The hard limit. */ - rlim64_t rlim_max; - }; -#endif - -/* Whose usage statistics do you want? */ -enum __rusage_who -/* The macro definitions are necessary because some programs want - to test for operating system features with #ifdef RUSAGE_SELF. - In ISO C the reflexive definition is a no-op. */ - { - /* The calling process. */ - RUSAGE_SELF = 0, -#define RUSAGE_SELF RUSAGE_SELF - /* All of its terminated child processes. */ - RUSAGE_CHILDREN = -1 -#define RUSAGE_CHILDREN RUSAGE_CHILDREN - }; - -#define __need_timeval -#include /* For `struct timeval'. */ - -/* Structure which says how much of each resource has been used. */ -struct rusage - { - /* Total amount of user time used. */ - struct timeval ru_utime; - /* Total amount of system time used. */ - struct timeval ru_stime; - /* Maximum resident set size (in kilobytes). */ - long int ru_maxrss; - /* Amount of sharing of text segment memory - with other processes (kilobyte-seconds). */ - long int ru_ixrss; - /* Amount of data segment memory used (kilobyte-seconds). */ - long int ru_idrss; - /* Amount of stack memory used (kilobyte-seconds). */ - long int ru_isrss; - /* Number of soft page faults (i.e. those serviced by reclaiming - a page from the list of pages awaiting reallocation. */ - long int ru_minflt; - /* Number of hard page faults (i.e. those that required I/O). */ - long int ru_majflt; - /* Number of times a process was swapped out of physical memory. */ - long int ru_nswap; - /* Number of input operations via the file system. Note: This - and `ru_oublock' do not include operations with the cache. */ - long int ru_inblock; - /* Number of output operations via the file system. */ - long int ru_oublock; - /* Number of IPC messages sent. */ - long int ru_msgsnd; - /* Number of IPC messages received. */ - long int ru_msgrcv; - /* Number of signals delivered. */ - long int ru_nsignals; - /* Number of voluntary context switches, i.e. because the process - gave up the process before it had to (usually to wait for some - resource to be available). */ - long int ru_nvcsw; - /* Number of involuntary context switches, i.e. a higher priority process - became runnable or the current process used up its time slice. */ - long int ru_nivcsw; - }; - -/* Priority limits. */ -#define PRIO_MIN -20 /* Minimum priority a process can have. */ -#define PRIO_MAX 20 /* Maximum priority a process can have. */ - -/* The type of the WHICH argument to `getpriority' and `setpriority', - indicating what flavor of entity the WHO argument specifies. */ -enum __priority_which - { - PRIO_PROCESS = 0, /* WHO is a process ID. */ - PRIO_PGRP = 1, /* WHO is a process group ID. */ - PRIO_USER = 2 /* WHO is a user ID. */ - }; diff --git a/sysdeps/unix/bsd/sun/sunos4/bits/termios.h b/sysdeps/unix/bsd/sun/sunos4/bits/termios.h deleted file mode 100644 index 97612c8f0b..0000000000 --- a/sysdeps/unix/bsd/sun/sunos4/bits/termios.h +++ /dev/null @@ -1,212 +0,0 @@ -/* termios type and macro definitions. SunOS 4 version. - Copyright (C) 1993, 1994, 1996, 1997 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 _TERMIOS_H -# error "Never include directly; use instead." -#endif - -/* Type of terminal control flag masks. */ -typedef unsigned long int tcflag_t; - -/* Type of control characters. */ -typedef unsigned char cc_t; - -/* Type of baud rate specifiers. */ -typedef unsigned int speed_t; - -/* Terminal control structure. */ -struct termios -{ - /* Input modes. */ - tcflag_t c_iflag; -#define IGNBRK 0x0001 /* Ignore break condition. */ -#define BRKINT 0x0002 /* Signal interrupt on break. */ -#define IGNPAR 0x0004 /* Ignore characters with parity errors. */ -#define PARMRK 0x0008 /* Mark parity and framing errors. */ -#define INPCK 0x0010 /* Enable input parity check. */ -#define ISTRIP 0x0020 /* Strip 8th bit off characters. */ -#define INLCR 0x0040 /* Map NL to CR on input. */ -#define IGNCR 0x0080 /* Ignore CR. */ -#define ICRNL 0x0100 /* Map CR to NL on input. */ -#ifdef __USE_BSD -# define IUCLC 0x0200 /* Map upper case to lower case on input. */ -#endif -#define IXON 0x0400 /* Enable start/stop output control. */ -#define IXOFF 0x1000 /* Enable start/stop input control. */ -#ifdef __USE_BSD -# define IXANY 0x0800 /* Any character will restart after stop. */ -# define IMAXBEL 0x2000 /* Ring bell when input queue is full. */ -#endif - - /* Output modes. */ - tcflag_t c_oflag; -#define OPOST 0x0001 /* Perform output processing. */ -#ifdef __USE_BSD -# define OLCUC 0x00000002 /* Map lower case to upper case on output. */ -# define ONLCR 0x00000004 /* Map NL to CR-NL on output. */ -# define OCRNL 0x00000008 -# define ONOCR 0x00000010 -# define ONLRET 0x00000020 -# define OFILL 0x00000040 -# define OFDEL 0x00000080 -# define NLDLY 0x00000100 -# define NL0 0 -# define NL1 0x00000100 -# define CRDLY 0x00000600 -# define CR0 0 -# define CR1 0x00000200 -# define CR2 0x00000400 -# define CR3 0x00000600 -# define TABDLY 0x00001800 -# define TAB0 0 -# define TAB1 0x00000800 -# define TAB2 0x00001000 -# define XTABS 0x00001800 -# define TAB3 XTABS -# define BSDLY 0x00002000 -# define BS0 0 -# define BS1 0x00002000 -# define VTDLY 0x00004000 -# define VT0 0 -# define VT1 0x00004000 -# define FFDLY 0x00008000 -# define FF0 0 -# define FF1 0x00008000 -# define PAGEOUT 0x00010000 -# define WRAP 0x00020000 -#endif - - /* Control modes. */ - tcflag_t c_cflag; -#define CSIZE (CS5|CS6|CS7|CS8) /* Number of bits per byte (mask). */ -#define CS5 0 /* 5 bits per byte. */ -#define CS6 0x00000010 /* 6 bits per byte. */ -#define CS7 0x00000020 /* 7 bits per byte. */ -#define CS8 0x00000030 /* 8 bits per byte. */ -#define CSTOPB 0x00000040 /* Two stop bits instead of one. */ -#define CREAD 0x00000080 /* Enable receiver. */ -#define PARENB 0x00000100 /* Parity enable. */ -#define PARODD 0x00000200 /* Odd parity instead of even. */ -#define HUPCL 0x00000400 /* Hang up on last close. */ -#define CLOCAL 0x00000800 /* Ignore modem status lines. */ -#ifdef __USE_BSD -# define LOBLK 0x00001000 -# define CRTSCTS 0x80000000 -# define CIBAUD 0x000f0000 /* Mask for input speed from c_cflag. */ -# define CBAUD 0x0000000f /* Mask for output speed from c_cflag. */ -# define IBSHIFT 16 /* Bits to shift for input speed. */ -#endif - - /* Input and output baud rates. These are encoded in c_cflag. */ -#define B0 0 -#define B50 1 -#define B75 2 -#define B110 3 -#define B134 4 -#define B150 5 -#define B200 6 -#define B300 7 -#define B600 8 -#define B1200 9 -#define B1800 10 -#define B2400 11 -#define B4800 12 -#define B9600 13 -#define B19200 14 -#define B38400 15 -#ifdef __USE_BSD -# define EXTA 14 -# define EXTB 15 -#endif - - /* Local modes. */ - tcflag_t c_lflag; -#ifdef __USE_BSD -# define ECHOKE 0x00000800 /* Visual erase for KILL. */ -#endif -#define ECHOE 0x00000010 /* Visual erase for ERASE. */ -#define ECHOK 0x00000020 /* Echo NL after KILL. */ -#define ECHO 0x00000008 /* Enable echo. */ -#define ECHONL 0x00000040 /* Echo NL even if ECHO is off. */ -#ifdef __USE_BSD -# define ECHOPRT 0x00000400 /* Hardcopy visual erase. */ -# define ECHOCTL 0x00000200 /* Echo control characters as ^X. */ -#endif -#define ISIG 0x00000001 /* Enable signals. */ -#define ICANON 0x00000002 /* Do erase and kill processing. */ -#define IEXTEN 0x00008000 /* Enable DISCARD and LNEXT. */ -#define TOSTOP 0x00000100 /* Send SIGTTOU for background output. */ -#ifdef __USE_BSD -# define PENDIN 0x00004000 /* Retype pending input (state). */ -#endif -#define NOFLSH 0x00000080 /* Disable flush after interrupt. */ - - char c_line; /* Line discipline (?) */ - - /* Control characters. */ -#define VEOF 4 /* End-of-file character [ICANON]. */ -#define VEOL 5 /* End-of-line character [ICANON]. */ -#ifdef __USE_BSD -# define VEOL2 6 /* Second EOL character [ICANON]. */ -# define VSWTCH 7 /* ??? */ -#endif -#define VERASE 2 /* Erase character [ICANON]. */ -#ifdef __USE_BSD -# define VWERASE 14 /* Word-erase character [ICANON]. */ -#endif -#define VKILL 3 /* Kill-line character [ICANON]. */ -#ifdef __USE_BSD -# define VREPRINT 12 /* Reprint-line character [ICANON]. */ -#endif -#define VINTR 0 /* Interrupt character [ISIG]. */ -#define VQUIT 1 /* Quit character [ISIG]. */ -#define VSUSP 10 /* Suspend character [ISIG]. */ -#ifdef __USE_BSD -# define VDSUSP 11 /* Delayed suspend character [ISIG]. */ -#endif -#define VSTART 8 /* Start (X-ON) character [IXON, IXOFF]. */ -#define VSTOP 9 /* Stop (X-OFF) character [IXON, IXOFF]. */ -#ifdef __USE_BSD -# define VLNEXT 15 /* Literal-next character [IEXTEN]. */ -# define VDISCARD 13 /* Discard character [IEXTEN]. */ -#endif -#define VMIN VEOF /* Minimum number of bytes read at once [!ICANON]. */ -#define VTIME VEOL /* Time-out value (tenths of a second) [!ICANON]. */ -#define NCCS 17 - cc_t c_cc[NCCS]; -}; - -#define _IOT_termios /* Hurd ioctl type field. */ \ - _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2) - -/* Values for the OPTIONAL_ACTIONS argument to `tcsetattr'. */ -#define TCSANOW 0 /* Change immediately. */ -#define TCSADRAIN 1 /* Change when pending output is written. */ -#define TCSAFLUSH 2 /* Flush pending input before changing. */ - -/* Values for the QUEUE_SELECTOR argument to `tcflush'. */ -#define TCIFLUSH 0 /* Discard data received but not yet read. */ -#define TCOFLUSH 1 /* Discard data written but not yet sent. */ -#define TCIOFLUSH 2 /* Discard all pending data. */ - -/* Values for the ACTION argument to `tcflow'. */ -#define TCOOFF 0 /* Suspend output. */ -#define TCOON 1 /* Restart suspended output. */ -#define TCIOFF 2 /* Send a STOP character. */ -#define TCION 3 /* Send a START character. */ diff --git a/sysdeps/unix/bsd/sun/sunos4/bits/utsname.h b/sysdeps/unix/bsd/sun/sunos4/bits/utsname.h deleted file mode 100644 index a0246c2a36..0000000000 --- a/sysdeps/unix/bsd/sun/sunos4/bits/utsname.h +++ /dev/null @@ -1,24 +0,0 @@ -/* Copyright (C) 1997, 2002 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 _SYS_UTSNAME_H -# error "Never include directly; use instead." -#endif - -#define _UTSNAME_LENGTH 9 -#define _UTSNAME_NODENAME_LENGTH 65 diff --git a/sysdeps/unix/bsd/sun/sunos4/mmap.c b/sysdeps/unix/bsd/sun/sunos4/mmap.c deleted file mode 100644 index c513ae27eb..0000000000 --- a/sysdeps/unix/bsd/sun/sunos4/mmap.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (C) 1994, 1995, 1997 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. */ - -#include -#include -#include - -/* Map addresses starting near ADDR and extending for LEN bytes. from - OFFSET into the file FD describes according to PROT and FLAGS. If ADDR - is nonzero, it is the desired mapping address. If the MAP_FIXED bit is - set in FLAGS, the mapping will be at ADDR exactly (which must be - page-aligned); otherwise the system chooses a convenient nearby address. - The return value is the actual mapping address chosen or MAP_FAILED - for errors (in which case `errno' is set). A successful `mmap' call - deallocates any previous mapping for the affected region. */ - -extern __ptr_t __mmap_syscall (__ptr_t addr, size_t len, - int prot, int flags, int fd, off_t offset); - - -__ptr_t -__mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset) -{ - return __mmap_syscall (addr, len, prot, flags | _MAP_NEW, fd, offset); -} - -weak_alias (__mmap, mmap) diff --git a/sysdeps/unix/bsd/sun/sunos4/speed.c b/sysdeps/unix/bsd/sun/sunos4/speed.c deleted file mode 100644 index 262d70fdfb..0000000000 --- a/sysdeps/unix/bsd/sun/sunos4/speed.c +++ /dev/null @@ -1,118 +0,0 @@ -/* `struct termios' speed frobnication functions. SunOS 4 version. - Copyright (C) 1991,1992,1993,1996,1997,2002 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. */ - -#include -#include -#include - -static const speed_t speeds[] = - { - 0, - 50, - 75, - 110, - 134, - 150, - 200, - 300, - 600, - 1200, - 1800, - 2400, - 4800, - 9600, - 19200, - 38400, - }; - - -/* Return the output baud rate stored in *TERMIOS_P. */ -speed_t -cfgetospeed (termios_p) - const struct termios *termios_p; -{ - return termios_p->c_cflag & CBAUD; -} - -/* Return the input baud rate stored in *TERMIOS_P. */ -speed_t -cfgetispeed (termios_p) - const struct termios *termios_p; -{ - return (termios_p->c_cflag & CIBAUD) >> IBSHIFT; -} - -/* Set the output baud rate stored in *TERMIOS_P to SPEED. */ -int -cfsetospeed (termios_p, speed) - struct termios *termios_p; - speed_t speed; -{ - register unsigned int i; - - if (termios_p == NULL) - { - __set_errno (EINVAL); - return -1; - } - - /* This allows either B1200 or 1200 to work. XXX - Do we really want to try to support this, given that - fetching the speed must return one or the other? */ - - for (i = 0; i < sizeof (speeds) / sizeof (speeds[0]); ++i) - if (i == speed || speeds[i] == speed) - { - termios_p->c_cflag &= ~CBAUD; - termios_p->c_cflag |= i; - return 0; - } - - __set_errno (EINVAL); - return -1; -} -libc_hidden_def (cfsetospeed) - -/* Set the input baud rate stored in *TERMIOS_P to SPEED. */ -int -cfsetispeed (termios_p, speed) - struct termios *termios_p; - speed_t speed; -{ - register unsigned int i; - - if (termios_p == NULL) - { - __set_errno (EINVAL); - return -1; - } - - /* See comment in cfsetospeed (above). */ - for (i = 0; i < sizeof (speeds) / sizeof (speeds[0]); ++i) - if (i == speed || speeds[i] == speed) - { - termios_p->c_cflag &= ~CIBAUD; - termios_p->c_cflag |= i << IBSHIFT; - return 0; - } - - __set_errno (EINVAL); - return -1; -} -libc_hidden_def (cfsetispeed) diff --git a/sysdeps/unix/bsd/sun/sunos4/sys/ttydefaults.h b/sysdeps/unix/bsd/sun/sunos4/sys/ttydefaults.h deleted file mode 100644 index d18433c6fe..0000000000 --- a/sysdeps/unix/bsd/sun/sunos4/sys/ttydefaults.h +++ /dev/null @@ -1,100 +0,0 @@ -/*- - * Copyright (c) 1982, 1986, 1993 - * The Regents of the University of California. All rights reserved. - * (c) UNIX System Laboratories, Inc. - * All or some portions of this file are derived from material licensed - * to the University of California by American Telephone and Telegraph - * Co. or Unix System Laboratories, Inc. and are reproduced herein with - * the permission of UNIX System Laboratories, Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)ttydefaults.h 8.4 (Berkeley) 1/21/94 - */ - -/* - * System wide defaults for terminal state. SunOS 4 version. - */ -#ifndef _SYS_TTYDEFAULTS_H_ -#define _SYS_TTYDEFAULTS_H_ - -/* - * Defaults on "first" open. - */ -#define TTYDEF_IFLAG (BRKINT | ISTRIP | ICRNL | IMAXBEL | IXON | IXANY) -#define TTYDEF_OFLAG (OPOST | ONLCR | XTABS) -#define TTYDEF_LFLAG (ECHO | ICANON | ISIG | IEXTEN | ECHOE|ECHOKE|ECHOCTL) -#define TTYDEF_CFLAG (CREAD | CS7 | PARENB | HUPCL) -#define TTYDEF_SPEED (B9600) - -/* - * Control Character Defaults - */ -#define CTRL(x) (x&037) -#define CEOF CTRL('d') -#ifdef _POSIX_VDISABLE -# define CEOL _POSIX_VDISABLE -#else -# define CEOL ((unsigned char)'\377') /* XXX avoid _POSIX_VDISABLE */ -#endif -#define CERASE 0177 -#define CINTR CTRL('c') -#ifdef _POSIX_VDISABLE -# define CSTATUS _POSIX_VDISABLE -#else -# define CSTATUS ((unsigned char)'\377') /* XXX avoid _POSIX_VDISABLE */ -#endif -#define CKILL CTRL('u') -#define CMIN 1 -#define CQUIT 034 /* FS, ^\ */ -#define CSUSP CTRL('z') -#define CTIME 0 -#define CDSUSP CTRL('y') -#define CSTART CTRL('q') -#define CSTOP CTRL('s') -#define CLNEXT CTRL('v') -#define CDISCARD CTRL('o') -#define CWERASE CTRL('w') -#define CREPRINT CTRL('r') -#define CEOT CEOF -/* compat */ -#define CBRK CEOL -#define CRPRNT CREPRINT -#define CFLUSH CDISCARD - -/* PROTECTED INCLUSION ENDS HERE */ -#endif /* !_SYS_TTYDEFAULTS_H_ */ - -/* - * #define TTYDEFCHARS to include an array of default control characters. - */ -#ifdef TTYDEFCHARS -cc_t ttydefchars[NCCS] = { - CEOF, CEOL, CEOL, CERASE, CWERASE, CKILL, CREPRINT, - _POSIX_VDISABLE, CINTR, CQUIT, CSUSP, CDSUSP, CSTART, CSTOP, CLNEXT, - CDISCARD, CMIN, CTIME, CSTATUS, _POSIX_VDISABLE -}; -#undef TTYDEFCHARS -#endif diff --git a/sysdeps/unix/bsd/sun/sunos4/syscalls.list b/sysdeps/unix/bsd/sun/sunos4/syscalls.list deleted file mode 100644 index 59992eed53..0000000000 --- a/sysdeps/unix/bsd/sun/sunos4/syscalls.list +++ /dev/null @@ -1,6 +0,0 @@ -# File name Caller Syscall name # args Strong name Weak names - -msync - msync 3 msync -poll - poll 3 poll -sys_mmap mmap mmap 5 __mmap_syscall -sys_wait4 wait4 wait4 4 __wait4_syscall diff --git a/sysdeps/unix/bsd/sun/sunos4/system.c b/sysdeps/unix/bsd/sun/sunos4/system.c deleted file mode 100644 index 2c8e634bc8..0000000000 --- a/sysdeps/unix/bsd/sun/sunos4/system.c +++ /dev/null @@ -1,2 +0,0 @@ -/* SunOS 4 does have `waitpid'. Avoid unix/system.c, which says we don't. */ -#include diff --git a/sysdeps/unix/bsd/sun/sunos4/tcflow.c b/sysdeps/unix/bsd/sun/sunos4/tcflow.c deleted file mode 100644 index 6fcc606f61..0000000000 --- a/sysdeps/unix/bsd/sun/sunos4/tcflow.c +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright (C) 1993, 1997 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. */ - -#include -#include -#include - -/* Suspend or restart transmission on FD. */ -int -tcflow (fd, action) - int fd; - int action; -{ - return __ioctl (fd, TCXONC, action); -} diff --git a/sysdeps/unix/bsd/sun/sunos4/tcflush.c b/sysdeps/unix/bsd/sun/sunos4/tcflush.c deleted file mode 100644 index 9e78aadd07..0000000000 --- a/sysdeps/unix/bsd/sun/sunos4/tcflush.c +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright (C) 1993, 1997 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. */ - -#include -#include -#include - -/* Flush pending data on FD. */ -int -tcflush (fd, queue_selector) - int fd; - int queue_selector; -{ - return __ioctl (fd, TCFLSH, queue_selector); -} diff --git a/sysdeps/unix/bsd/sun/sunos4/tcgetattr.c b/sysdeps/unix/bsd/sun/sunos4/tcgetattr.c deleted file mode 100644 index ab74fddf24..0000000000 --- a/sysdeps/unix/bsd/sun/sunos4/tcgetattr.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (C) 1993, 1995, 1997 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. */ - -#include -#include -#include -#include - -/* Put the state of FD into *TERMIOS_P. */ -int -__tcgetattr (fd, termios_p) - int fd; - struct termios *termios_p; -{ - return __ioctl (fd, TCGETS, termios_p); -} - -weak_alias (__tcgetattr, tcgetattr) diff --git a/sysdeps/unix/bsd/sun/sunos4/tcsendbrk.c b/sysdeps/unix/bsd/sun/sunos4/tcsendbrk.c deleted file mode 100644 index db5ea8c831..0000000000 --- a/sysdeps/unix/bsd/sun/sunos4/tcsendbrk.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright (C) 1993, 1997 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. */ - -#include -#include -#include -#include /* Sun header file. */ - -/* Send zero bits on FD. */ -int -tcsendbreak (fd, duration) - int fd; - int duration; -{ - /* According to SunOS 4.1's termios(4), you can't specify a duration. */ - return __ioctl (fd, TCSBRK, 0); -} diff --git a/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c b/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c deleted file mode 100644 index 934c4c8cf8..0000000000 --- a/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright (C) 1993, 1996, 1997, 2002 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. */ - -#include -#include -#include - -/* Set the state of FD to *TERMIOS_P. */ -int -tcsetattr (fd, optional_actions, termios_p) - int fd; - int optional_actions; - const struct termios *termios_p; -{ - unsigned long cmd; - - switch (optional_actions) - { - case TCSANOW: - cmd = TCSETS; - break; - case TCSADRAIN: - cmd = TCSETSW; - break; - case TCSAFLUSH: - cmd = TCSETSF; - break; - default: - __set_errno (EINVAL); - return -1; - } - - return __ioctl (fd, cmd, termios_p); -} -libc_hidden_def (tcsetattr) diff --git a/sysdeps/unix/bsd/sun/sunos4/wait.c b/sysdeps/unix/bsd/sun/sunos4/wait.c deleted file mode 100644 index 79d54580fd..0000000000 --- a/sysdeps/unix/bsd/sun/sunos4/wait.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/bsd/sun/sunos4/wait3.c b/sysdeps/unix/bsd/sun/sunos4/wait3.c deleted file mode 100644 index 0b3bdee771..0000000000 --- a/sysdeps/unix/bsd/sun/sunos4/wait3.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/bsd/sun/sunos4/wait4.c b/sysdeps/unix/bsd/sun/sunos4/wait4.c deleted file mode 100644 index 097c15e7d9..0000000000 --- a/sysdeps/unix/bsd/sun/sunos4/wait4.c +++ /dev/null @@ -1,50 +0,0 @@ -/* This implements wait4 with the 4.4 BSD semantics (also those documented in - SunOS 4.1) on top of SunOS's wait4 system call, which has semantics - different from those documented. Go Sun! - Copyright (C) 1991,1992,1993,1995,1997,2004 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. */ - -#include -#include -#include - -extern pid_t __wait4_syscall (pid_t pid, __WAIT_STATUS_DEFN stat_loc, - int options, struct rusage *usage); - -pid_t -__wait4 (pid, stat_loc, options, usage) - pid_t pid; - __WAIT_STATUS_DEFN stat_loc; - int options; - struct rusage *usage; -{ - switch (pid) - { - case WAIT_ANY: - pid = 0; - break; - - case WAIT_MYPGRP: - pid = - getpgrp (); - break; - } - - return __wait4_syscall (pid, stat_loc, options, usage); -} - -weak_alias (__wait4, wait4) diff --git a/sysdeps/unix/bsd/sun/sunos4/waitpid.c b/sysdeps/unix/bsd/sun/sunos4/waitpid.c deleted file mode 100644 index 8378982ac7..0000000000 --- a/sysdeps/unix/bsd/sun/sunos4/waitpid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/bsd/sun/syscalls.list b/sysdeps/unix/bsd/sun/syscalls.list deleted file mode 100644 index 079aa9157a..0000000000 --- a/sysdeps/unix/bsd/sun/syscalls.list +++ /dev/null @@ -1,3 +0,0 @@ -# File name Caller Syscall name # args Strong name Weak names - -sigvec - sigvec 3 __raw_sigvec diff --git a/sysdeps/unix/bsd/tahoe/Implies b/sysdeps/unix/bsd/tahoe/Implies deleted file mode 100644 index a7ecf58273..0000000000 --- a/sysdeps/unix/bsd/tahoe/Implies +++ /dev/null @@ -1 +0,0 @@ -unix/bsd/vax diff --git a/sysdeps/unix/bsd/tahoe/sysdep.h b/sysdeps/unix/bsd/tahoe/sysdep.h deleted file mode 100644 index b875906320..0000000000 --- a/sysdeps/unix/bsd/tahoe/sysdep.h +++ /dev/null @@ -1,5 +0,0 @@ -/* The Tahoe is just like the Vax, except the - `chmk' instruction is called `kcall'. */ - -#define chmk kcall -#include diff --git a/sysdeps/unix/bsd/ultrix4/Implies b/sysdeps/unix/bsd/ultrix4/Implies deleted file mode 100644 index b0e08ef1db..0000000000 --- a/sysdeps/unix/bsd/ultrix4/Implies +++ /dev/null @@ -1,2 +0,0 @@ -# Ultrix 4 has the canonical set of system calls. -unix/mman diff --git a/sysdeps/unix/bsd/ultrix4/Makefile b/sysdeps/unix/bsd/ultrix4/Makefile deleted file mode 100644 index 26b90346ee..0000000000 --- a/sysdeps/unix/bsd/ultrix4/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ifeq ($(subdir),posix) -sysdep_routines := $(sysdep_routines) getsysinfo -endif diff --git a/sysdeps/unix/bsd/ultrix4/bits/fcntl.h b/sysdeps/unix/bsd/ultrix4/bits/fcntl.h deleted file mode 100644 index 6392bc3415..0000000000 --- a/sysdeps/unix/bsd/ultrix4/bits/fcntl.h +++ /dev/null @@ -1,122 +0,0 @@ -/* O_*, F_*, FD_* bit values for Ultrix 4. - Copyright (C) 1991, 1992, 1997, 2004 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 _FCNTL_H -#error "Never use directly; include instead." -#endif - - -/* File access modes for `open' and `fcntl'. */ -#define O_RDONLY 0 /* Open read-only. */ -#define O_WRONLY 1 /* Open write-only. */ -#define O_RDWR 2 /* Open read/write. */ - - -/* Bits OR'd into the second argument to open. */ -#define O_CREAT 0x0200 /* Create file if it doesn't exist. */ -#define O_EXCL 0x0800 /* Fail if file already exists. */ -#define O_TRUNC 0x0400 /* Truncate file to zero length. */ -#ifdef __USE_MISC -#define O_ASYNC 0x0040 /* Send SIGIO to owner when data is ready. */ -#define O_FSYNC 0x8000 /* Synchronous writes. */ -#define O_SYNC O_FSYNC -#define O_BLKINUSE 0x1000 /* Block if "in use". */ -#define O_BLKANDSET 0x3000 /* Block, test and set "in use" flag. */ -#define O_TERMIO 0x40000 /* "termio style program". */ -#endif -#define O_NOCTTY 0x80000 /* Don't assign a controlling terminal. */ - -/* File status flags for `open' and `fcntl'. */ -#define O_APPEND 0x0008 /* Writes append to the file. */ -#define O_NONBLOCK 0x20000 /* Non-blocking I/O. */ - -#ifdef __USE_BSD -#define O_NDELAY 0x0004 -#endif - -#ifdef __USE_BSD -/* Bits in the file status flags returned by F_GETFL. - These are all the O_* flags, plus FREAD and FWRITE, which are - independent bits set by which of O_RDONLY, O_WRONLY, and O_RDWR, was - given to `open'. */ -#define FREAD 1 -#define FWRITE 2 - -/* Traditional BSD names the O_* bits. */ -#define FASYNC O_ASYNC -#define FCREAT O_CREAT -#define FEXCL O_EXCL -#define FTRUNC O_TRUNC -#define FNOCTTY O_NOCTTY -#define FFSYNC O_FSYNC -#define FSYNC O_SYNC -#define FAPPEND O_APPEND -#define FNONBLOCK O_NONBLOCK -#define FNDELAY O_NDELAY -#define FNBLOCK O_NONBLOCK -#define FTERMIO O_TERMIO -#define FNOCTTY O_NOCTTY -#define FSYNCRON O_FSYNC -#define FBLKINUSE O_BLKINUSE -#define FBLKANDSET O_BLKANDSET -#endif - -/* Mask for file access modes. This is system-dependent in case - some system ever wants to define some other flavor of access. */ -#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR) - -/* Values for the second argument to `fcntl'. */ -#define F_DUPFD 0 /* Duplicate file descriptor. */ -#define F_GETFD 1 /* Get file descriptor flags. */ -#define F_SETFD 2 /* Set file descriptor flags. */ -#define F_GETFL 3 /* Get file status flags. */ -#define F_SETFL 4 /* Set file status flags. */ -#if defined __USE_BSD || defined __USE_UNIX98 -#define F_GETOWN 5 /* Get owner (receiver of SIGIO). */ -#define F_SETOWN 6 /* Set owner (receiver of SIGIO). */ -#endif -#define F_GETLK 7 /* Get record locking info. */ -#define F_SETLK 8 /* Set record locking info (non-blocking). */ -#define F_SETLKW 9 /* Set record locking info (blocking). */ -#ifdef __USE_MISC -#define F_SETSYN 10 /* Set synchronous writing. */ -#define F_CLRSYN 10 /* Clear synchronous writing. */ -#endif - -/* File descriptor flags used with F_GETFD and F_SETFD. */ -#define FD_CLOEXEC 1 /* Close on exec. */ - - -#include - -/* The structure describing an advisory lock. This is the type of the third - argument to `fcntl' for the F_GETLK, F_SETLK, and F_SETLKW requests. */ -struct flock - { - short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ - short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ - __off_t l_start; /* Offset where the lock begins. */ - __off_t l_len; /* Size of the locked area; zero means until EOF. */ - __pid_t l_pid; /* Process holding the lock. */ - }; - -/* Values for the `l_type' field of a `struct flock'. */ -#define F_RDLCK 1 /* Read lock. */ -#define F_WRLCK 2 /* Write lock. */ -#define F_UNLCK 3 /* Remove lock. */ diff --git a/sysdeps/unix/bsd/ultrix4/bits/mman.h b/sysdeps/unix/bsd/ultrix4/bits/mman.h deleted file mode 100644 index 918b535634..0000000000 --- a/sysdeps/unix/bsd/ultrix4/bits/mman.h +++ /dev/null @@ -1,51 +0,0 @@ -/* Definitions for BSD-style memory management. Ultrix 4 version. - Copyright (C) 1994, 1995, 1996, 1997, 1998 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_MMAN_H -#define _BITS_MMAN_H 1 - -/* Protections are chosen from these bits, OR'd together. The - implementation does not necessarily support PROT_EXEC or PROT_WRITE - without PROT_READ. The only guarantees are that no writing will be - allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ - -#define PROT_NONE 0x00 /* No access. */ -#define PROT_READ 0x01 /* Pages can be read. */ -#define PROT_WRITE 0x02 /* Pages can be written. */ -#define PROT_EXEC 0x04 /* Pages can be executed. */ -/* Sharing types (must choose one and only one of these). */ -#define MAP_SHARED 0x01 /* Share changes. */ -#define MAP_PRIVATE 0x02 /* Changes private; copy pages on write. */ -#ifdef __USE_BSD -# define MAP_TYPE 0x0f /* Mask for sharing type. */ -#endif - -/* Other flags. */ -#define MAP_FIXED 0x10 /* Map address must be exactly as requested. */ - -/* Advice to `madvise'. */ -#ifdef __USE_BSD -# define MADV_NORMAL 0 /* No further special treatment. */ -# define MADV_RANDOM 1 /* Expect random page references. */ -# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define MADV_WILLNEED 3 /* Will need these pages. */ -# define MADV_DONTNEED 4 /* Don't need these pages. */ -#endif - -#endif /* bits/mman.h */ diff --git a/sysdeps/unix/bsd/ultrix4/bits/posix_opt.h b/sysdeps/unix/bsd/ultrix4/bits/posix_opt.h deleted file mode 100644 index aba6852e1f..0000000000 --- a/sysdeps/unix/bsd/ultrix4/bits/posix_opt.h +++ /dev/null @@ -1,24 +0,0 @@ -/* Copyright (C) 1992, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ian Lance Taylor (ian@airs.com). - - 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. */ - -#define _POSIX_JOB_CONTROL 1 -#define _POSIX_SAVED_IDS 1 -#define _POSIX_CHOWN_RESTRICTED 1 -#define _POSIX_NO_TRUNC 1 -#define _POSIX_VDISABLE ((unsigned char) -1) diff --git a/sysdeps/unix/bsd/ultrix4/bits/utsname.h b/sysdeps/unix/bsd/ultrix4/bits/utsname.h deleted file mode 100644 index 57820471a2..0000000000 --- a/sysdeps/unix/bsd/ultrix4/bits/utsname.h +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright (C) 1997, 2002 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 _SYS_UTSNAME_H -# error "Never include directly; use instead." -#endif - -#define _UTSNAME_LENGTH 32 diff --git a/sysdeps/unix/bsd/ultrix4/mips/Makefile b/sysdeps/unix/bsd/ultrix4/mips/Makefile deleted file mode 100644 index 74e3b04f6c..0000000000 --- a/sysdeps/unix/bsd/ultrix4/mips/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ifeq ($(subdir),signal) -sysdep_routines := $(sysdep_routines) __handler -endif diff --git a/sysdeps/unix/bsd/ultrix4/mips/__handler.S b/sysdeps/unix/bsd/ultrix4/mips/__handler.S deleted file mode 100644 index 2b815c46dd..0000000000 --- a/sysdeps/unix/bsd/ultrix4/mips/__handler.S +++ /dev/null @@ -1,115 +0,0 @@ -/* Copyright (C) 1992, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@zen.org). - Also hacked by Ian Lance Taylor (ian@airs.com). - - 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. */ - -#include - -/* This function saves all the registers, calls the - user function, and then executes a sigreturn system call. The - sigreturn call wants the address of a sigcontext structure. This - is all hideously system dependent and, for all intents and - purposes, undocumented. - - When we enter here, a3 holds the user's signal handler. We are - supposed to fill in the context given in a2, and then pass it and - the first two arguments to the user's function. If the user's - function returns, we execute a sigreturn system call. - - The sc_onstack, sc_mask and sc_pc elements of the context are - already set by the kernel. For some reason we don't have to save - the floating point state or the coprocessor state; the kernel may - have saved them for us, or it doesn't use them. */ - -.set noat -ENTRY (__handler) - /* Store zero and the asm temp reg. */ - sw $0, 12(a2) - sw AT, 16(a2) - - /* Put v1 in sc_regs[3]. */ - sw v1, 24(a2) - - /* Save the caller saved registers in sc_regs[8..15]. */ - sw t0, 44(a2) - sw t1, 48(a2) - sw t2, 52(a2) - sw t3, 56(a2) - sw t4, 60(a2) - sw t5, 64(a2) - sw t6, 68(a2) - sw t7, 72(a2) - - /* Save the callee saved registers in sc_regs[16..23]. */ - sw s0, 76(a2) - sw s1, 80(a2) - sw s2, 84(a2) - sw s3, 88(a2) - sw s4, 92(a2) - sw s5, 96(a2) - sw s6, 100(a2) - sw s7, 104(a2) - - /* Save the code generator registers in sc_regs[24] & sc_regs[25]. */ - sw t8, 108(a2) - sw t9, 112(a2) - - /* Save the kernel temp regs in sc_regs[26] & sc_regs[27]. */ - sw k0, 116(a2) - sw k1, 120(a2) - - /* Save the global pointer in sc_regs[28]. */ - sw gp, 124(a2) - - /* ... and also the return address in sc_regs[31]. */ - sw ra, 136(a2) - - /* Note: we don't save the stack pointer in sc_regs[29]; - instead, we use the one that was already there. */ -#if 0 - sw sp, 128(a2) -#endif - - /* Save the floating pointer in sc_regs[30]. */ - sw $fp, 132(a2) - - /* Save the mul/div stuff in sc_mdlo and sc_mdhi. */ - mflo t0 - sw t0, 140(a2) - mfhi t0 - sw t0, 144(a2) - - /* Move the stack up four. This will save the context. */ - addu sp, sp, -32 - sw a2, 16(sp) - - /* Call their handler with the signal, code, and context; note - this will clobber the context. */ - .set noreorder - jal ra, a3 - nop - .set reorder - - /* When we come back, restore the context and pass it right - on into sigreturn(). */ - lw a0, 16(sp) - - /* Do a sigreturn syscall; this doesn't return. */ - la v0, __sigreturn - jal ra, v0 - .end __handler diff --git a/sysdeps/unix/bsd/ultrix4/mips/bits/sigcontext.h b/sysdeps/unix/bsd/ultrix4/mips/bits/sigcontext.h deleted file mode 100644 index 3674651372..0000000000 --- a/sysdeps/unix/bsd/ultrix4/mips/bits/sigcontext.h +++ /dev/null @@ -1,63 +0,0 @@ -/* Copyright (C) 1992, 1994, 1997 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 _SIGNAL_H -# error "Never use directly; include instead." -#endif - -/* Note that ANY change to this instantly implies a change to __handler.S. */ - -struct sigcontext - { - /* Nonzero if running on signal stack. */ - int sc_onstack; - - /* Signal mask to restore. */ - __sigset_t sc_mask; - - /* Program counter when the signal hit. */ - __ptr_t sc_pc; - - /* Registers 0 through 31. */ - int sc_regs[32]; - - /* mul/div low and hi; these aren't part of a jmp_buf, but are part of the - sigcontext and are referenced from the signal trampoline code. */ - int sc_mdlo; - int sc_mdhi; - - /* Flag to see if the FP's been used. */ - int sc_ownedfp; - - /* Floating point registers 0 to 31. */ - int sc_fpregs[32]; - /* Control & status register for FP. */ - int sc_fpc_csr; - - /* Exception instruction register for FP. */ - int sc_fpc_eir; - - /* The coprocessor's cause register. */ - int sc_cause; - - /* CPU bad virtual address. */ - __ptr_t sc_badvaddr; - - /* CPU board bad physical address. */ - __ptr_t sc_badpaddr; - }; diff --git a/sysdeps/unix/bsd/ultrix4/mips/sigvec.c b/sysdeps/unix/bsd/ultrix4/mips/sigvec.c deleted file mode 100644 index 5775c9adb9..0000000000 --- a/sysdeps/unix/bsd/ultrix4/mips/sigvec.c +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright (C) 1992, 1996, 1997, 2004 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. */ - -/* The sigvec system call on MIPS Ultrix takes an additional - parameter, which is the address that is actually called when the - signal occurs. - - When a signal occurs, we arrange for the kernel to call __handler. - That will save the frame and stack pointers into the context, and - then jump to this routine. See __handler.S. - - This code is based on sysdeps/unix/bsd/sun4/sigtramp.c, but it's - different because since we get passed the user signal handler we - don't actually need a trampoline. */ - -#include -#include -#include - -/* The user's signal handler is called with three arguments. */ -typedef void (*handler_type) (int sig, int code, struct sigcontext *); - -extern int __raw_sigvec (int sig, CONST struct sigvec *vec, - struct sigvec *ovec, - void (*)(int sig, int code, - struct sigcontext *, - handler_type)); - -extern void __handler (int sig, int code, - struct sigcontext *, - handler_type); - -int -__sigvec (sig, vec, ovec) - int sig; - const struct sigvec *vec; - struct sigvec *ovec; -{ - return __raw_sigvec (sig, vec, ovec, __handler); -} diff --git a/sysdeps/unix/bsd/ultrix4/mips/start.S b/sysdeps/unix/bsd/ultrix4/mips/start.S deleted file mode 100644 index a88268af45..0000000000 --- a/sysdeps/unix/bsd/ultrix4/mips/start.S +++ /dev/null @@ -1,87 +0,0 @@ -/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@zen.org). - - 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. - - In addition to the permissions in the GNU Lesser General Public - License, the Free Software Foundation gives you unlimited - permission to link the compiled version of this file with other - programs, and to distribute those programs without any restriction - coming from the use of this file. (The GNU Lesser General Public - License restrictions do apply in other respects; for example, they - cover modification of the file, and distribution when not linked - into another program.) - - Note that people who make modified versions of this file are not - obligated to grant this special exception for their modified - versions; it is their choice whether to do so. The GNU Lesser - General Public License gives permission to release a modified - version without this exception; this exception also makes it - possible to release a modified version which carries forward this - exception. - - 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. */ - -#include - -ENTRY(__start) - .set noreorder - - /* The first thing on the stack is argc. */ - lw s0, 0(sp) - nop - - /* Set up the global pointer. */ - la gp, _gp - - /* Then set up argv. */ - addiu s1, sp, 4 - - /* To compute where envp is, first we have to jump ahead four - bytes from what argv was. This will bring us ahead, so we don't - need to compute the NULL at the end of argv later. */ - addiu v1, s1, 4 - - /* Now, compute the space to skip given the number of arguments - we've got. We do this by multiplying argc by 4. */ - sll v0, s0, 2 - - /* Now, add (argv+4) with the space to skip...that's envp. */ - addu s2, v1, v0 - - /* __environ = envp; */ - sw s2, __environ - - addiu sp, sp, -24 - - /* __libc_init (argc, argv, envp); */ - move a0, s0 - move a1, s1 - jal __libc_init - move a2, s2 - - /* errno = 0; */ - sw zero, errno - - /* exit (main (argc, argv, envp)); */ - move a0, s0 - move a1, s1 - jal main - move a2, s2 - - /* Make the value returned by main be the argument to exit. */ - jal exit - move a0, v0 - .end __start diff --git a/sysdeps/unix/bsd/ultrix4/mips/syscalls.list b/sysdeps/unix/bsd/ultrix4/mips/syscalls.list deleted file mode 100644 index f7d0bba6a8..0000000000 --- a/sysdeps/unix/bsd/ultrix4/mips/syscalls.list +++ /dev/null @@ -1,3 +0,0 @@ -# File name Caller Syscall name # args Strong name Weak names - -raw-sigvec sigvec sigvec 4 __raw_sigvec diff --git a/sysdeps/unix/bsd/ultrix4/mips/sysdep.h b/sysdeps/unix/bsd/ultrix4/mips/sysdep.h deleted file mode 100644 index 09b69ff854..0000000000 --- a/sysdeps/unix/bsd/ultrix4/mips/sysdep.h +++ /dev/null @@ -1,3 +0,0 @@ -#define NO_UNDERSCORES - -#include diff --git a/sysdeps/unix/bsd/ultrix4/mips/vfork.S b/sysdeps/unix/bsd/ultrix4/mips/vfork.S deleted file mode 100644 index d413e45dc1..0000000000 --- a/sysdeps/unix/bsd/ultrix4/mips/vfork.S +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright (C) 1992, 1995, 1997, 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@zen.org). - - 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. */ - -#include - -#ifndef SYS_vfork -#define SYS_vfork 66 -#endif - -SYSCALL__ (vfork, 0) - beq v1, zero, parent /* Branch if parent. */ - nop - move v0, zero -parent: - ret - nop - .end __vfork -libc_hidden_def (__vfork) - -weak_alias (__vfork, vfork) diff --git a/sysdeps/unix/bsd/ultrix4/syscalls.list b/sysdeps/unix/bsd/ultrix4/syscalls.list deleted file mode 100644 index 68df0a766a..0000000000 --- a/sysdeps/unix/bsd/ultrix4/syscalls.list +++ /dev/null @@ -1,3 +0,0 @@ -# File name Caller Syscall name # args Strong name Weak names - -getsysinfo sysconf getsysinfo 5 __getsysinfo diff --git a/sysdeps/unix/bsd/ultrix4/sysconf.c b/sysdeps/unix/bsd/ultrix4/sysconf.c deleted file mode 100644 index 0982fc832d..0000000000 --- a/sysdeps/unix/bsd/ultrix4/sysconf.c +++ /dev/null @@ -1,61 +0,0 @@ -/* Copyright (C) 1992, 1995, 1996, 1997, 2004 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ian Lance Taylor (ian@airs.com). - - 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. */ - -/* On Ultrix we can use the getsysinfo call to get the right return - value for _SC_CHILD_MAX. Everything else is from , - which the default sysconf already knows how to handle. */ - -#include -#include - -/* This is an Ultrix header file. */ -#include - -extern int __getsysinfo (unsigned int op, void *buffer, - size_t nbytes, int *start, void *arg); -extern long int __default_sysconf (int name); - -long int -__sysconf (name) - int name; -{ - if (name == _SC_CHILD_MAX) - { - int save = errno; - int start = 0; - int ret; - - /* getsysinfo returns the number of values it put into the - buffer, or 0 if not available, or -1 on error. */ - if (__getsysinfo (GSI_MAX_UPROCS, &ret, sizeof (ret), &start, - (void *) 0) > 0) - { - __set_errno (save); - return ret; - } - - __set_errno (save); - } - - return __default_sysconf (name); -} - -#define __sysconf __default_sysconf - -#include diff --git a/sysdeps/unix/bsd/ultrix4/system.c b/sysdeps/unix/bsd/ultrix4/system.c deleted file mode 100644 index b133fe77c0..0000000000 --- a/sysdeps/unix/bsd/ultrix4/system.c +++ /dev/null @@ -1,2 +0,0 @@ -/* Ultrix 4 does have `waitpid'. Avoid unix/system.c, which says we don't. */ -#include diff --git a/sysdeps/unix/bsd/ultrix4/wait3.S b/sysdeps/unix/bsd/ultrix4/wait3.S deleted file mode 100644 index b20ecfa242..0000000000 --- a/sysdeps/unix/bsd/ultrix4/wait3.S +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright (C) 1992, 1995, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@zen.org). - - 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. */ - -#include - -SYSCALL__ (wait3, 3) - ret - .end __wait3 - -weak_alias (__wait3, wait3) diff --git a/sysdeps/unix/bsd/vax/brk.S b/sysdeps/unix/bsd/vax/brk.S deleted file mode 100644 index 52377bc43e..0000000000 --- a/sysdeps/unix/bsd/vax/brk.S +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (C) 1991, 1995, 1997 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. */ - -#include - -#ifndef SYS_brk -#define SYS_brk 17 -#endif - -#ifndef HAVE_GNU_LD -#define __end _end -#endif - -.data -.globl ___curbrk -___curbrk: - .long __end - -.text -ENTRY (__brk) - cmpl 4(ap), __end - bgeq 0f - movl __env, 4(ap) -0: chmk $SYS_brk - bcs 1f - movl 4(ap), ___curbrk - clrl r0 - ret -1: - jmp syscall_error - -weak_alias (__brk, brk) diff --git a/sysdeps/unix/bsd/vax/dl-brk.S b/sysdeps/unix/bsd/vax/dl-brk.S deleted file mode 100644 index eeb96544e3..0000000000 --- a/sysdeps/unix/bsd/vax/dl-brk.S +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/bsd/vax/pipe.S b/sysdeps/unix/bsd/vax/pipe.S deleted file mode 100644 index 3ed784264c..0000000000 --- a/sysdeps/unix/bsd/vax/pipe.S +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 1991, 1992, 1995, 1997, 2002 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. */ - -#include - -SYSCALL__ (pipe, 1) - movl 4(ap), r2 - movl r0, (r2)+ - movl r1, (r2) - clrl r0 - ret - -libc_hidden_def (__pipe) -weak_alias (__pipe, pipe) diff --git a/sysdeps/unix/bsd/vax/sysdep.S b/sysdeps/unix/bsd/vax/sysdep.S deleted file mode 100644 index 786aed2d1a..0000000000 --- a/sysdeps/unix/bsd/vax/sysdep.S +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright (C) 1991, 1992, 1993, 1994, 1997 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. */ - -#define _ERRNO_H -#include - -.globl _errno -.globl syscall_error -syscall_error: -#if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN - /* We translate the system's EWOULDBLOCK error into EAGAIN. - The GNU C library always defines EWOULDBLOCK==EAGAIN. - EWOULDBLOCK_sys is the original number. */ - cmpl r0, $EWOULDBLOCK_sys - bne 0f - movl $EAGAIN, r0 -#endif -0: movl r0, _errno - mnegl $1, r0 - ret diff --git a/sysdeps/unix/bsd/vax/sysdep.h b/sysdeps/unix/bsd/vax/sysdep.h deleted file mode 100644 index 563ad26c18..0000000000 --- a/sysdeps/unix/bsd/vax/sysdep.h +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright (C) 1991, 1992, 1995, 1997 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. */ - -#include - -#ifdef __ASSEMBLER__ - -#ifdef __STDC__ -#define ENTRY(name) \ - .globl _##name; \ - .even; \ - _##name##: -#else -#define ENTRY(name) \ - .globl _/**/name; \ - .even; \ - _/**/name/**/: -#endif - -#ifdef __STDC__ -#define PSEUDO(name, syscall_name, args) \ - .even; \ - .globl syscall_error \ - error: jmp syscall_error; \ - ENTRY (name) \ - chmk $SYS_##syscall_name \ - bcs error -#else -#define PSEUDO(name, syscall_name, args) \ - .even; \ - .globl syscall_error \ - error: jmp syscall_error; \ - ENTRY (name) \ - chmk $SYS_/**/syscall_name \ - bcs error -#endif - -#define MOVE(x,y) movl x , y - -#endif /* __ASSEMBLER__ */ diff --git a/sysdeps/unix/bsd/vax/vfork.S b/sysdeps/unix/bsd/vax/vfork.S deleted file mode 100644 index 6c7e754ac7..0000000000 --- a/sysdeps/unix/bsd/vax/vfork.S +++ /dev/null @@ -1,57 +0,0 @@ -/* Copyright (C) 1991, 1992, 1995, 1997, 2002 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. */ - -#include - -#ifndef SYS_vfork -#define SYS_vfork 66 -#endif - -/* Clone the calling process, but without copying the whole address space. - The calling process is suspended until the new process exits or is - replaced by a call to `execve'. Return -1 for errors, 0 to the new process, - and the process ID of the new process to the old process. */ -.globl ___vfork -___vfork: - .word 0 - /* Save our return address in R2, and return to code below. */ - movl 16(fp), r2 - movab unwind, 16(fp) - ret -unwind: - /* Do the system call. */ - chmk $SYS_vfork - bcs error - - tstl r1 - beq parent - - /* We are the child. Return zero. */ - clrl r0 - - /* Return to the saved address. */ -parent: jmp (r2) - -.globl _errno -error: - movl r0, _errno - mnegl $1, r0 - jmp (r2) -libc_hidden_def (__vfork) - -weak_alias (__vfork, vfork) diff --git a/sysdeps/unix/bsd/vax/wait.S b/sysdeps/unix/bsd/vax/wait.S deleted file mode 100644 index 19396f06e8..0000000000 --- a/sysdeps/unix/bsd/vax/wait.S +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 1991, 1992, 1995, 1997 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. */ - -#include - -SYSCALL__ (wait, 1) - movl 4(ap), r2 - beq 1f - movl r1, (r2) -1: ret - -weak_alias (__wait, wait) diff --git a/sysdeps/unix/bsd/vax/wait3.S b/sysdeps/unix/bsd/vax/wait3.S deleted file mode 100644 index e0ceec1de0..0000000000 --- a/sysdeps/unix/bsd/vax/wait3.S +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (C) 1991, 1992, 1995, 1997 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. */ - -#include - -ENTRY(___wait3) - movel 8(ap), r1 - movel 12(ap), r0 - /* Set all condition codes to tell the kernel this is wait3. */ - bispsw $15 - chmk $SYS_wait - bcs error - - movl 4(ap), r2 - beq 1f - movl r1, (r2) -1: ret - -.globl syscall_error -error: jmp syscall_error - -weak_alias (__wait3, wait3) diff --git a/sysdeps/unix/sysv/aix/Implies b/sysdeps/unix/sysv/aix/Implies deleted file mode 100644 index 279438d433..0000000000 --- a/sysdeps/unix/sysv/aix/Implies +++ /dev/null @@ -1,8 +0,0 @@ -# AIX shares most of the syscalls which are also common to BSD and SVR4. -unix/common - -# AIX has all functions of the mmap family which are described in POSIX.4. -unix/mman - -# AIX has network support in the kernel. -unix/inet diff --git a/sysdeps/unix/sysv/aix/Makefile b/sysdeps/unix/sysv/aix/Makefile deleted file mode 100644 index 2da5311091..0000000000 --- a/sysdeps/unix/sysv/aix/Makefile +++ /dev/null @@ -1,41 +0,0 @@ -# XXX For now always link against the syscalls export file. -# This is a hack until the import/export stuff is worked out. -+postctor += /lib/syscalls.exp - -ifeq ($(subdir),csu) - -sysdep_routines += aix-syscalls - -# -# The foo.c is a workaround for the linker complaining about no input files. -$(objpfx)aix-syscalls.o : /lib/syscalls.exp - echo "static int a;" > foo.c - $(CC) -c foo.c - ld -bM:SRE -bpT:0x00000000 -bpD:0x00000000 -bnoentry -bI:/lib/syscalls.exp -bE:/lib/syscalls.exp foo.o -o $@ - rm foo.c foo.o - - -endif - -ifeq ($(subdir),misc) -sysdep_routines += dl-error dl-support dl-libc dl-open dl-sym \ - dl-close dl-addr uitrunc - -static-only-routines = gprsave0 gprrest0 gprsave1 gprrest1 fprsave fprrest -endif - -ifeq ($(subdir),login) -sysdep_routines += setutxent getutxent endutxent getutxid getutxline \ - pututxline utmpxname - -#sysdep_headers += utmpx.h bits/utmpx.h -#sysdep_headers += bits/utmp.h bits/utmpx.h -endif - -# Don't compile the ctype glue code, since there is no old non-GNU C library. -inhibit-glue = yes - -# XXX Don't know yet why this is needed in the moment. -ifeq ($(subdir),timezone) -CPPFLAGS-zic.c = -Dunix -endif diff --git a/sysdeps/unix/sysv/aix/Versions b/sysdeps/unix/sysv/aix/Versions deleted file mode 100644 index 4c32bbbe77..0000000000 --- a/sysdeps/unix/sysv/aix/Versions +++ /dev/null @@ -1,6 +0,0 @@ -libc { - GLIBC_2.2 { - # u* - umount; - } -} diff --git a/sysdeps/unix/sysv/aix/_exit.c b/sysdeps/unix/sysv/aix/_exit.c deleted file mode 100644 index 510f3ae88b..0000000000 --- a/sysdeps/unix/sysv/aix/_exit.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 1999 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. */ - -#include - - -/* We define only thr alias introduced in ISO C99 because _exit itself - is a system call. */ -void -_Exit (status) - int status; -{ - _exit (status); -} diff --git a/sysdeps/unix/sysv/aix/accept.c b/sysdeps/unix/sysv/aix/accept.c deleted file mode 100644 index 73f11499f2..0000000000 --- a/sysdeps/unix/sysv/aix/accept.c +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright (C) 2000, 2002 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. */ - -#include -#include - -extern int naccept (int s, void *uap_name, int *uap_anamelen); - -int -accept (int fd, __SOCKADDR_ARG addr, socklen_t *addr_len) -{ - assert (sizeof (socklen_t) == sizeof (int)); - return naccept (fd, addr.__sockaddr__, addr_len); -} -libc_hidden_def (accept) diff --git a/sysdeps/unix/sysv/aix/access.c b/sysdeps/unix/sysv/aix/access.c deleted file mode 100644 index 97f8e68799..0000000000 --- a/sysdeps/unix/sysv/aix/access.c +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -#define ACC_INVOKER 0x01 - -extern int accessx (const char *name, int type, int who); - -int -__access (const char *name, int type) -{ - return accessx (name, type, ACC_INVOKER); -} -strong_alias (__access, access) diff --git a/sysdeps/unix/sysv/aix/bind.c b/sysdeps/unix/sysv/aix/bind.c deleted file mode 100644 index 6036fbbffd..0000000000 --- a/sysdeps/unix/sysv/aix/bind.c +++ /dev/null @@ -1 +0,0 @@ -/* This is a system call. */ diff --git a/sysdeps/unix/sysv/aix/bits/dirent.h b/sysdeps/unix/sysv/aix/bits/dirent.h deleted file mode 100644 index 48eeb32887..0000000000 --- a/sysdeps/unix/sysv/aix/bits/dirent.h +++ /dev/null @@ -1,55 +0,0 @@ -/* Directory entry structure `struct dirent'. Old System V version. - Copyright (C) 1996, 1997, 1999 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 _DIRENT_H -# error "Never use directly; include instead." -#endif - -struct dirent - { -#ifndef __USE_FILE_OFFSET64 - __off_t d_off; - __ino_t d_ino; -#else - __off64_t d_off; - __ino64_t d_ino; -#endif - unsigned short int d_reclen; - unsigned short int d_namlen; - char d_name[256]; - }; - -#ifdef __USE_LARGEFILE64 -struct dirent64 - { - __off64_t d_off; - __ino64_t d_ino; - unsigned short int d_reclen; - unsigned short int d_namlen; - char d_name[256]; - }; -#endif - -#define d_fileno d_ino /* Backwards compatibility. */ -#define d_offset d_off - -#define _DIRENT_HAVE_D_NAMLEN -#define _DIRENT_HAVE_D_RECLEN -#define _DIRENT_HAVE_D_OFF -#undef _DIRENT_HAVE_D_TYPE diff --git a/sysdeps/unix/sysv/aix/bits/dlfcn.h b/sysdeps/unix/sysv/aix/bits/dlfcn.h deleted file mode 100644 index e184175275..0000000000 --- a/sysdeps/unix/sysv/aix/bits/dlfcn.h +++ /dev/null @@ -1,47 +0,0 @@ -/* AIX dependent definitions for run-time dynamic loading. - Copyright (C) 1996, 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 - 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 _DLFCN_H -# error "Never use directly; include instead." -#endif - -/* The MODE argument to `dlopen' contains one of the following: */ -#define RTLD_LAZY 0x004 /* Lazy function call binding. */ -#define RTLD_NOW 0x002 /* Immediate function call binding. */ -#define RTLD_BINDING_MASK 0x6 /* Mask of binding time value. */ - -/* If the following bit is set in the MODE argument to `dlopen', - the symbols of the loaded object and its dependencies are made - visible as if the object were linked directly into the program. */ -#define RTLD_GLOBAL 0x10000 - -/* Unix98 demands the following flag which is the inverse to RTLD_GLOBAL. - The implementation does this by default and so we can define the - value to zero. */ -#define RTLD_LOCAL 0x800000 - -#ifdef __USE_GNU -/* These are extensions of the AIX kernel. */ -# define RTLD_NOAUTODEFER 0x020000 -# define RTLD_MEMBER 0x040000 -# define RTLD_UNIX_LATEST 0x100000 -#endif - -/* No support to profile shared libraries available. */ -# define DL_CALL_FCT(fctp, args) fctp args diff --git a/sysdeps/unix/sysv/aix/bits/endian.h b/sysdeps/unix/sysv/aix/bits/endian.h deleted file mode 100644 index 8e9b98ef78..0000000000 --- a/sysdeps/unix/sysv/aix/bits/endian.h +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright (C) 1997, 1998, 1999 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 _ENDIAN_H -# error "Never use directly; include instead." -#endif - -#define __BYTE_ORDER __BIG_ENDIAN diff --git a/sysdeps/unix/sysv/aix/bits/errno.h b/sysdeps/unix/sysv/aix/bits/errno.h deleted file mode 100644 index 9f22a965e1..0000000000 --- a/sysdeps/unix/sysv/aix/bits/errno.h +++ /dev/null @@ -1,153 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -/* This file defines the `errno' constants. */ - -#if !defined __Emath_defined && (defined _ERRNO_H || defined __need_Emath) -#undef __need_Emath -#define __Emath_defined 1 - -#endif - -#ifdef _ERRNO_H -# undef EDOM -# undef EILSEQ -# undef ERANGE - -# define EPERM 1 /* Operation not permitted. */ -# define ENOENT 2 /* No such file or directory. */ -# define ESRCH 3 /* No such process. */ -# define EINTR 4 /* interrupted system call. */ -# define EIO 5 /* I/O error. */ -# define ENXIO 6 /* No such device or address. */ -# define E2BIG 7 /* Arg list too long. */ -# define ENOEXEC 8 /* Exec format error. */ -# define EBADF 9 /* Bad file descriptor. */ -# define ECHILD 10 /* No child processes. */ -# define EAGAIN 11 /* Resource temporarily unavailable. */ -# define ENOMEM 12 /* Not enough space. */ -# define EACCES 13 /* Permission denied. */ -# define EFAULT 14 /* Bad address. */ -# define ENOTBLK 15 /* Block device required. */ -# define EBUSY 16 /* Resource busy. */ -# define EEXIST 17 /* File exists. */ -# define EXDEV 18 /* Improper link. */ -# define ENODEV 19 /* No such device. */ -# define ENOTDIR 20 /* Not a directory. */ -# define EISDIR 21 /* Is a directory. */ -# define EINVAL 22 /* Invalid argument. */ -# define ENFILE 23 /* Too many open files in system. */ -# define EMFILE 24 /* Too many open files. */ -# define ENOTTY 25 /* Inappropriate I/O control operation. */ -# define ETXTBSY 26 /* Text file busy. */ -# define EFBIG 27 /* File too large. */ -# define ENOSPC 28 /* No space left on device. */ -# define ESPIPE 29 /* Invalid seek. */ -# define EROFS 30 /* Read only file system. */ -# define EMLINK 31 /* Too many links. */ -# define EPIPE 32 /* Broken pipe. */ -# define EDOM 33 /* Domain error within math function. */ -# define ERANGE 34 /* Result too large. */ -# define ENOMSG 35 /* No message of desired type. */ -# define EIDRM 36 /* Identifier removed. */ -# define ECHRNG 37 /* Channel number out of range. */ -# define EL2NSYNC 38 /* Level 2 not synchronized. */ -# define EL3HLT 39 /* Level 3 halted. */ -# define EL3RST 40 /* Level 3 reset. */ -# define ELNRNG 41 /* Link number out of range. */ -# define EUNATCH 42 /* Protocol driver not attached. */ -# define ENOCSI 43 /* No CSI structure available. */ -# define EL2HLT 44 /* Level 2 halted. */ -# define EDEADLK 45 /* Resource deadlock avoided. */ -# define ENOTREADY 46 /* Device not ready. */ -# define EWRPROTECT 47 /* Write-protected media. */ -# define EFORMAT 48 /* Unformatted media. */ -# define ENOLCK 49 /* No locks available. */ -# define ENOCONNECT 50 /* No connection. */ -# define ESTALE 52 /* No filesystem. */ -# define EDIST 53 /* Old, currently unused AIX errno. */ -# if __USE_XOPEN_EXTENDED -# define EWOULDBLOCK EAGAIN /* Operation would block. */ -# else /* __USE_XOPEN_EXTENDED */ -# define EWOULDBLOCK 54 -# endif /* __USE_XOPEN_EXTENDED */ -# define EINPROGRESS 55 /* Operation now in progress. */ -# define EALREADY 56 /* Operation already in progress. */ -# define ENOTSOCK 57 /* Socket operation on non-socket. */ -# define EDESTADDRREQ 58 /* Destination address required. */ -# define EDESTADDREQ EDESTADDRREQ /* Destination address required. */ -# define EMSGSIZE 59 /* Message too long. */ -# define EPROTOTYPE 60 /* Protocol wrong type for socket. */ -# define ENOPROTOOPT 61 /* Protocol not available. */ -# define EPROTONOSUPPORT 62 /* Protocol not supported. */ -# define ESOCKTNOSUPPORT 63 /* Socket type not supported. */ -# define EOPNOTSUPP 64 /* Operation not supported on socket. */ -# define EPFNOSUPPORT 65 /* Protocol family not supported. */ -# define EAFNOSUPPORT 66 /* Address family not supported by protocol - family. */ -# define EADDRINUSE 67 /* Address already in use. */ -# define EADDRNOTAVAIL 68 /* Can't assign requested address. */ -# define ENETDOWN 69 /* Network is down. */ -# define ENETUNREACH 70 /* Network is unreachable. */ -# define ENETRESET 71 /* Network dropped connection on reset. */ -# define ECONNABORTED 72 /* Software caused connection abort. */ -# define ECONNRESET 73 /* Connection reset by peer. */ -# define ENOBUFS 74 /* No buffer space available. */ -# define EISCONN 75 /* Socket is already connected. */ -# define ENOTCONN 76 /* Socket is not connected. */ -# define ESHUTDOWN 77 /* Can't send after socket shutdown. */ -# define ETIMEDOUT 78 /* Connection timed out. */ -# define ECONNREFUSED 79 /* Connection refused. */ -# define EHOSTDOWN 80 /* Host is down. */ -# define EHOSTUNREACH 81 /* No route to host. */ -# define ERESTART 82 /* Restart the system call. */ -# define EPROCLIM 83 /* Too many processes. */ -# define EUSERS 84 /* Too many users. */ -# define ELOOP 85 /* Too many levels of symbolic links. */ -# define ENAMETOOLONG 86 /* File name too long. */ -# define ENOTEMPTY EEXIST /* Directory not empty. */ -# define EDQUOT 88 /* Disc quota exceeded. */ -# define ECORRUPT 89 /* Invalid file system control data. */ -# define EREMOTE 93 /* Item is not local to host. */ -# define ENOSYS 109 /* Function not implemented POSIX. */ -# define EMEDIA 110 /* Media surface error. */ -# define ESOFT 111 /* I/O completed, but needs relocation. */ -# define ENOATTR 112 /* No attribute found. */ -# define ESAD 113 /* Security authentication denied. */ -# define ENOTRUST 114 /* Not a trusted program. */ -# define ETOOMANYREFS 115 /* Too many references: can't splice. */ -# define EILSEQ 116 /* Invalid wide character. */ -# define ECANCELED 117 /* Asynchronous i/o cancelled. */ -# define ENOSR 118 /* Temp out of streams resources. */ -# define ETIME 119 /* I_STR ioctl timed out. */ -# define EBADMSG 120 /* Wrong message type at stream head. */ -# define EPROTO 121 /* STREAMS protocol error. */ -# define ENODATA 122 /* No message ready at stream head. */ -# define ENOSTR 123 /* Fd is not a stream. */ -# define ECLONEME ERESTART /* This is the way we clone a stream. */ -# define ENOTSUP 124 /* POSIX threads unsupported value. */ -# define EMULTIHOP 125 /* Multihop is not allowed. */ -# define ENOLINK 126 /* The link has been severed. */ -# define EOVERFLOW 127 /* Value too large to be stored in data type.*/ -#endif - -#if !defined _ERRNO_H && defined __need_Emath -# define EDOM 33 /* Math argument out of domain of function. */ -# define EILSEQ 116 /* Illegal byte sequence. */ -# define ERANGE 34 /* Math result not representable. */ -#endif /* !_ERRNO_H && __need_Emath */ diff --git a/sysdeps/unix/sysv/aix/bits/fcntl.h b/sysdeps/unix/sysv/aix/bits/fcntl.h deleted file mode 100644 index d53c0f7d9b..0000000000 --- a/sysdeps/unix/sysv/aix/bits/fcntl.h +++ /dev/null @@ -1,137 +0,0 @@ -/* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 1995-1999, 2000, 2004 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 _FCNTL_H -# error "Never use directly; include instead." -#endif - - -#include - -/* open/fcntl. */ -#define O_ACCMODE 0003 -#define O_RDONLY 00 -#define O_WRONLY 01 -#define O_RDWR 02 -#define O_NONBLOCK 04 -#define O_NDELAY O_NONBLOCK -#define O_APPEND 010 -#define O_SYNC 020 -#define O_FSYNC O_SYNC -#define O_CREAT 0400 /* not fcntl */ -#define O_TRUNC 01000 /* not fcntl */ -#define O_EXCL 02000 /* not fcntl */ -#define O_NOCTTY 04000 /* not fcntl */ -#define O_ASYNC 0400000 - -#ifdef __USE_LARGEFILE64 -# define O_LARGEFILE 0400000000 -#endif - -/* For now Linux has synchronisity options for data and read operations. - We define the symbols here but let them do the same as O_SYNC since - this is a superset. */ -#if defined __USE_POSIX199309 || defined __USE_UNIX98 -# define O_DSYNC 020000000 /* Synchronize data. */ -# define O_RSYNC 010000000 /* Synchronize read operations. */ -#endif - -/* Values for the second argument to `fcntl'. */ -#define F_DUPFD 0 /* Duplicate file descriptor. */ -#define F_GETFD 1 /* Get file descriptor flags. */ -#define F_SETFD 2 /* Set file descriptor flags. */ -#define F_GETFL 3 /* Get file status flags. */ -#define F_SETFL 4 /* Set file status flags. */ -#ifndef __USE_FILE_OFFSET64 -# define F_GETLK 5 /* Get record locking info. */ -# define F_SETLK 6 /* Set record locking info (non-blocking). */ -# define F_SETLKW 7 /* Set record locking info (blocking). */ -#else -# define F_GETLK 11 /* Get record locking info. */ -# define F_SETLK 12 /* Set record locking info (non-blocking). */ -# define F_SETLKW 13 /* Set record locking info (blocking). */ -#endif - -#ifdef __USE_LARGEFILE64 -# define F_GETLK64 11 /* Get record locking info. */ -# define F_SETLK64 12 /* Set record locking info (non-blocking). */ -# define F_SETLKW64 13 /* Set record locking info (blocking). */ -#endif - -#if defined __USE_BSD || defined __USE_UNIX98 -# define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */ -# define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */ -#endif - -/* 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(). */ -#define F_RDLCK 1 /* Read lock. */ -#define F_WRLCK 2 /* Write lock. */ -#define F_UNLCK 3 /* Remove lock. */ - -#ifdef __USE_BSD -/* Operations for bsd flock(), also used by the kernel implementation */ -# define LOCK_SH 1 /* shared lock */ -# define LOCK_EX 2 /* exclusive lock */ -# define LOCK_NB 4 /* or'd with one of the above to prevent - blocking */ -# define LOCK_UN 8 /* remove lock */ -#endif - -struct flock - { - short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ - short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ -#ifndef __USE_FILE_OFFSET64 - __off_t l_start; /* Offset where the lock begins. */ - __off_t l_len; /* Size of the locked area; zero means until EOF. */ -#endif - unsigned int l_sysid; - __pid_t l_pid; /* Process holding the lock. */ - int l_vfs; -#ifdef __USE_FILE_OFFSET64 - __off64_t l_start; /* Offset where the lock begins. */ - __off64_t l_len; /* Size of the locked area; zero means until EOF. */ -#endif - }; - -#ifdef __USE_LARGEFILE64 -struct flock64 - { - short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ - short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ - unsigned int l_sysid; - __pid_t l_pid; /* Process holding the lock. */ - int l_vfs; - __off64_t l_start; /* Offset where the lock begins. */ - __off64_t l_len; /* Size of the locked area; zero means until EOF. */ - }; -#endif - -/* Define some more compatibility macros to be backward compatible with - BSD systems which did not managed to hide these kernel macros. */ -#ifdef __USE_BSD -# define FAPPEND O_APPEND -# define FFSYNC O_FSYNC -# define FASYNC O_ASYNC -# define FNONBLOCK O_NONBLOCK -# define FNDELAY O_NDELAY -#endif /* Use BSD. */ diff --git a/sysdeps/unix/sysv/aix/bits/ioctl-types.h b/sysdeps/unix/sysv/aix/bits/ioctl-types.h deleted file mode 100644 index d8fe8c8d5b..0000000000 --- a/sysdeps/unix/sysv/aix/bits/ioctl-types.h +++ /dev/null @@ -1,91 +0,0 @@ -/* Structure types for pre-termios terminal ioctls. AIX version. - Copyright (C) 1999, 2000, 2002 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 _SYS_IOCTL_H -# error "Never use directly; include instead." -#endif - -/* Constants for use with `ioctl'. */ -#define TIOC ('T' << 8) -#define TCGETS (TIOC | 1) -#define TCSETS (TIOC | 2) -#define TCSETSW (TIOC | 3) -#define TCSETSF (TIOC | 4) -#define TCGETA (TIOC | 5) -#define TCSETA (TIOC | 6) -#define TCSETAW (TIOC | 7) -#define TCSETAF (TIOC | 8) -#define TCSBRK (TIOC | 9) -#define TCSBREAK (TIOC | 10) -#define TCXONC (TIOC | 11) -#define TCFLSH (TIOC | 12) -#define TCGLEN (TIOC | 13) -#define TCSLEN (TIOC | 14) -#define TCSAK (TIOC | 15) -#define TCQSAK (TIOC | 16) -#define TCTRUST (TIOC | 17) -#define TCQTRUST (TIOC | 18) -#define TCSMAP (TIOC | 19) -#define TCGMAP (TIOC | 20) -#define TCKEP (TIOC | 21) -#define TCGSAK (TIOC | 22) -#define TCLOOP (TIOC | 23) -#define TCVPD (TIOC | 24) -#define TCREG (TIOC | 25) -#define TCGSTATUS (TIOC | 26) -#define TCSCONTROL (TIOC | 27) -#define TCSCSMAP (TIOC | 28) -#define TCGCSMAP (TIOC | 29) -#define TCMGR TCSAK -#define TCQMGR TCQSAK -#define TIONREAD FIONREAD - - - -struct winsize -{ - unsigned short int ws_row; - unsigned short int ws_col; - unsigned short int ws_xpixel; - unsigned short int ws_ypixel; -}; - -#define NCC 8 -struct termio -{ - unsigned short int c_iflag; /* input mode flags */ - unsigned short int c_oflag; /* output mode flags */ - unsigned short int c_cflag; /* control mode flags */ - unsigned short int c_lflag; /* local mode flags */ - char c_line; /* line discipline */ - unsigned char c_cc[NCC]; /* control characters */ -}; - -/* modem lines */ -#define TIOCM_LE 0x001 -#define TIOCM_DTR 0x002 -#define TIOCM_RTS 0x004 -#define TIOCM_ST 0x008 -#define TIOCM_SR 0x010 -#define TIOCM_CTS 0x020 -#define TIOCM_CAR 0x040 -#define TIOCM_RNG 0x080 -#define TIOCM_DSR 0x100 -#define TIOCM_CD TIOCM_CAR -#define TIOCM_RI TIOCM_RNG diff --git a/sysdeps/unix/sysv/aix/bits/ioctls.h b/sysdeps/unix/sysv/aix/bits/ioctls.h deleted file mode 100644 index 8023c144df..0000000000 --- a/sysdeps/unix/sysv/aix/bits/ioctls.h +++ /dev/null @@ -1,248 +0,0 @@ -/* Copyright (C) 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 - 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 _SYS_IOCTL_H -# error "Never use directly; include instead." -#endif - - -#define IOCPARM_MASK 0x7f /* parameters must be < 128 bytes */ -#define IOC_VOID 0x20000000 /* no parameters */ -#define IOC_OUT 0x40000000 /* copy out parameters */ -#define IOC_IN (0x40000000<<1) /* copy in parameters */ -#define IOC_INOUT (IOC_IN|IOC_OUT) -#define _IO(x,y) (IOC_VOID|(x<<8)|y) -#define _IOR(x,y,t) (IOC_OUT|((sizeof(t)&IOCPARM_MASK)<<16)|(x<<8)|y) -#define _IOW(x,y,t) (IOC_IN|((sizeof(t)&IOCPARM_MASK)<<16)|(x<<8)|y) -#define _IOWR(x,y,t) (IOC_INOUT|((sizeof(t)&IOCPARM_MASK)<<16)|(x<<8)|y) - -#define TIOCGETD _IOR('t', 0, int) /* get line discipline */ -#define TIOCSETD _IOW('t', 1, int) /* set line discipline */ -#define TIOCHPCL _IO('t', 2) /* hang up on last close */ -#define TIOCMODG _IOR('t', 3, int) /* get modem control state */ -#define TIOCMODS _IOW('t', 4, int) /* set modem control state */ -#define TIOCGETP _IOR('t', 8,struct sgttyb)/* get parameters -- gtty */ -#define TIOCSETP _IOW('t', 9,struct sgttyb)/* set parameters -- stty */ -#define TIOCSETN _IOW('t',10,struct sgttyb)/* as above, but no flushtty */ -#define TIOCEXCL _IO('t', 13) /* set exclusive use of tty */ -#define TIOCNXCL _IO('t', 14) /* reset exclusive use of tty */ -#define TIOCFLUSH _IOW('t', 16, int) /* flush buffers */ -#define TIOCSETC _IOW('t',17,struct tchars)/* set special characters */ -#define TIOCGETC _IOR('t',18,struct tchars)/* get special characters */ -#define TANDEM 0x00000001 /* send stopc on out q full */ -#define CBREAK 0x00000002 /* half-cooked mode */ -#define LCASE 0x00000004 /* simulate lower case */ -#define CRMOD 0x00000010 /* map \r to \r\n on output */ -#define RAW 0x00000020 /* no i/o processing */ -#define ODDP 0x00000040 /* get/send odd parity */ -#define EVENP 0x00000080 /* get/send even parity */ -#define ANYP 0x000000c0 /* get any parity/send none */ -#define CRDELAY 0x00000300 /* \r delay */ -#define TBDELAY 0x00000c00 /* horizontal tab delay */ -#define XTABS 0x00000c00 /* expand tabs on output */ -#define BSDELAY 0x00001000 /* \b delay */ -#define VTDELAY 0x00002000 /* vertical tab delay */ -#define NLDELAY 0x0000c000 /* \n delay */ -#define NL2 0x00008000 /* vt05 */ -#define NL3 0x0000c000 -#define ALLDELAY (NLDELAY|TBDELAY|CRDELAY|VTDELAY|BSDELAY) -#define PRTERA 0x00020000 /* \ ... / erase */ -#define CRTERA 0x00040000 /* " \b " to wipe out char */ -#define TILDE 0x00080000 /* hazeltine tilde kludge */ -#define LITOUT 0x00200000 /* literal output */ -#define CRTBS 0x00400000 /* do backspacing for crt */ -#define MDMBUF 0x00800000 /* dtr pacing */ -#define NOHANG 0x01000000 /* no SIGHUP on carrier drop */ -#define L001000 0x02000000 -#define CRTKIL 0x04000000 /* kill line with " \b " */ -#define PASS8 0x08000000 -#define CTLECH 0x10000000 /* echo control chars as ^X */ -#define DECCTQ 0x40000000 /* only ^Q starts after ^S */ -#define NOFLUSH 0x80000000 /* no output flush on signal */ - - -/* SYS V REL. 4 PTY IOCTLs */ -#define UNLKPT _IO('t',70) /* unlock slave pty */ -#define ISPTM _IO('t',71) /* ret. maj+min of pty master */ -#define ISPTS _IO('t',73) /* return maj+min of slave */ -#define GRTPT _IO('t',74) /* grantpt slave pty*/ -#define RLOGIND _IO('t',75) /* for rlogind protocol in ptydd */ -#define TELNETDP _IO('t',76) /* for telnetd protocol in ptydd */ - -#define TIOCCONS _IOW('t', 98, int) /* become virtual console */ -#define TIOCGSID _IOR('t', 72, int) /* get the tty session id */ - - /* locals, from 127 down */ -#define TIOCLBIS _IOW('t', 127, int) /* bis local mode bits */ -#define TIOCLBIC _IOW('t', 126, int) /* bic local mode bits */ -#define TIOCLSET _IOW('t', 125, int) /* set entire mode word */ -#define TIOCLGET _IOR('t', 124, int) /* get local modes */ -#define LCRTBS (CRTBS>>16) -#define LPRTERA (PRTERA>>16) -#define LCRTERA (CRTERA>>16) -#define LTILDE (TILDE>>16) -#define LMDMBUF (MDMBUF>>16) -#define LLITOUT (LITOUT>>16) -#define LTOSTOP (TOSTOP>>16) -#define LFLUSHO (FLUSHO>>16) -#define LNOHANG (NOHANG>>16) -#define LCRTKIL (CRTKIL>>16) -#define LPASS8 (PASS8>>16) -#define LCTLECH (CTLECH>>16) -#define LPENDIN (PENDIN>>16) -#define LDECCTQ (DECCTQ>>16) -#define LNOFLSH (NOFLUSH>>16) -#define TIOCSBRK _IO('t', 123) /* set break bit */ -#define TIOCCBRK _IO('t', 122) /* clear break bit */ -#define TIOCSDTR _IO('t', 121) /* set data terminal ready */ -#define TIOCCDTR _IO('t', 120) /* clear data terminal ready */ -#define TIOCGPGRP _IOR('t', 119, int) /* get process group */ -#define TIOCSPGRP _IOW('t', 118, int) /* set process gorup */ -#define TIOCSLTC _IOW('t',117,struct ltchars)/* set local special chars */ -#define TIOCGLTC _IOR('t',116,struct ltchars)/* get local special chars */ -#define TIOCOUTQ _IOR('t', 115, int) /* output queue size */ -#define TIOCSTI _IOW('t', 114, char) /* simulate terminal input */ -#define TIOCNOTTY _IO('t', 113) /* void tty association */ -#define TIOCPKT _IOW('t', 112, int) /* pty: set/clear packet mode */ -#define TIOCPKT_DATA 0x00 /* data packet */ -#define TIOCPKT_FLUSHREAD 0x01 /* flush packet */ -#define TIOCPKT_FLUSHWRITE 0x02 /* flush packet */ -#define TIOCPKT_STOP 0x04 /* stop output */ -#define TIOCPKT_START 0x08 /* start output */ -#define TIOCPKT_NOSTOP 0x10 /* no more ^S, ^Q */ -#define TIOCPKT_DOSTOP 0x20 /* now do ^S ^Q */ -#define TIOCSTOP _IO('t', 111) /* stop output, like ^S */ -#define TIOCSTART _IO('t', 110) /* start output, like ^Q */ -#define TIOCMSET _IOW('t', 109, int) /* set all modem bits */ -#define TIOCMBIS _IOW('t', 108, int) /* bis modem bits */ -#define TIOCMBIC _IOW('t', 107, int) /* bic modem bits */ -#define TIOCMGET _IOR('t', 106, int) /* get all modem bits */ -#define TIOCREMOTE _IOW('t', 105, int) /* remote input editing */ -#define TIOCGWINSZ _IOR('t', 104, struct winsize) /* get window size */ -#define TIOCSWINSZ _IOW('t', 103, struct winsize) /* set window size */ -#define TIOCUCNTL _IOW('t', 102, int) /* pty: set/clr usr cntl mode */ -/* SLIP (Serial Line IP) ioctl's */ -#define SLIOCGUNIT _IOR('t', 101, int) /* get slip unit number */ -#define SLIOCSFLAGS _IOW('t', 89, int) /* set configuration flags */ -#define SLIOCGFLAGS _IOR('t', 90, int) /* get configuration flags */ -#define SLIOCSATTACH _IOWR('t', 91, int) /* Attach slip i.f. to tty */ -#define UIOCCMD(n) _IO('u', n) /* usr cntl op "n" */ - -#define OTTYDISC 0 /* old, v7 std tty driver */ -#define NETLDISC 1 /* line discip for berk net */ -#define NTTYDISC 2 /* new tty discipline */ -#define TABLDISC 3 /* tablet discipline */ -#define SLIPDISC 4 /* serial IP discipline */ - -#define FIOCLEX _IO('f', 1) /* set close on exec */ -#define FIONCLEX _IO('f', 2) /* clear close on exec */ -/* another local */ - -#define FIONREAD _IOR('f', 127, int) /* get # bytes to read */ -#define FIONBIO _IOW('f', 126, int) /* set/clear non-blocking i/o */ -#define FIOASYNC _IOW('f', 125, int) /* set/clear async i/o */ - -#define FIOSETOWN _IOW('f', 124, int) /* set owner */ -#define FIOGETOWN _IOR('f', 123, int) /* get owner */ -#define FIOASYNCQX _IOW('f', 122, int) /* set/clear async queueing */ - -/* socket i/o controls */ -#define SIOCSHIWAT _IOW('s', 0, int) /* set high watermark */ -#define SIOCGHIWAT _IOR('s', 1, int) /* get high watermark */ -#define SIOCSLOWAT _IOW('s', 2, int) /* set low watermark */ -#define SIOCGLOWAT _IOR('s', 3, int) /* get low watermark */ -#define SIOCATMARK _IOR('s', 7, int) /* at oob mark? */ -#define SIOCSPGRP _IOW('s', 8, int) /* set process group */ -#define SIOCGPGRP _IOR('s', 9, int) /* get process group */ - -#define SIOCADDRT (int)_IOW('r', 10, struct ortentry) /* add route */ -#define SIOCDELRT (int)_IOW('r', 11, struct ortentry) /* delete route */ - -#define SIOCSIFADDR (int)_IOW('i', 12, struct oifreq) /* set ifnet address */ -#define OSIOCGIFADDR (int)_IOWR('i',13, struct oifreq) /* get ifnet address */ -#define SIOCGIFADDR (int)_IOWR('i',33, struct oifreq) /* get ifnet address */ -#define SIOCSIFDSTADDR (int)_IOW('i', 14, struct oifreq) /* set p-p address */ -#define OSIOCGIFDSTADDR (int)_IOWR('i',15, struct oifreq) /* get p-p address */ -#define SIOCGIFDSTADDR (int)_IOWR('i',34, struct oifreq) /* get p-p address */ -#define SIOCSIFFLAGS (int)_IOW('i', 16, struct oifreq) /* set ifnet flags */ -#define SIOCGIFFLAGS (int)_IOWR('i',17, struct oifreq) /* get ifnet flags */ -#define OSIOCGIFBRDADDR (int)_IOWR('i',18, struct oifreq) /* get broadcast addr */ -#define SIOCGIFBRDADDR (int)_IOWR('i',35, struct oifreq) /* get broadcast addr */ -#define SIOCSIFBRDADDR (int)_IOW('i',19, struct oifreq) /* set broadcast addr */ -#define OSIOCGIFCONF (int)_IOWR('i',20, struct ifconf) /* get ifnet list */ -#define CSIOCGIFCONF (int)_IOWR('i',36, struct ifconf) /* get ifnet list */ -#define SIOCGIFCONF (int)_IOWR('i',69, struct ifconf) /* get ifnet list */ -#define OSIOCGIFNETMASK (int)_IOWR('i',21, struct oifreq) /* get net addr mask */ -#define SIOCGIFNETMASK (int)_IOWR('i',37, struct oifreq) /* get net addr mask */ -#define SIOCSIFNETMASK (int)_IOW('i',22, struct oifreq) /* set net addr mask */ -#define SIOCGIFMETRIC (int)_IOWR('i',23, struct oifreq) /* get IF metric */ -#define SIOCSIFMETRIC (int)_IOW('i',24, struct oifreq) /* set IF metric */ -#define SIOCDIFADDR (int)_IOW('i',25, struct oifreq) /* delete IF addr */ -#define SIOCAIFADDR (int)_IOW('i',26, struct ifaliasreq) /* add/chg IF alias */ -#define SIOCSIFSUBCHAN (int)_IOW('i',27, struct oifreq) /* set subchannel adr.*/ -#define SIOCSIFNETDUMP (int)_IOW('i',28, struct oifreq) /* set netdump fastwrt*/ - -#define SIOCSARP (int)_IOW('i', 30, struct arpreq) /* set arp entry */ -#define OSIOCGARP (int)_IOWR('i',31, struct arpreq) /* get arp entry */ -#define SIOCGARP (int)_IOWR('i',38, struct arpreq) /* get arp entry */ -#define SIOCDARP (int)_IOW('i', 32, struct arpreq) /* delete arp entry */ - -#define SIOCSIFOPTIONS (int)_IOW('i', 41, struct oifreq) /* set ifnet options */ -#define SIOCGIFOPTIONS (int)_IOWR('i',42, struct oifreq) /* get ifnet options */ -#define SIOCADDMULTI (int)_IOW('i', 49, struct ifreq) /* add multicast addr */ -#define SIOCDELMULTI (int)_IOW('i', 50, struct ifreq) /* del multicast addr */ -#define SIOCGETVIFCNT (int)_IOWR('u', 51, struct sioc_vif_req)/* vif pkt cnt */ -#define SIOCGETSGCNT (int)_IOWR('u', 52, struct sioc_sg_req) /* s,g pkt cnt */ - -#define SIOCADDNETID (int)_IOW('i',87, struct oifreq) /* set netids */ -#define SIOCSIFMTU (int)_IOW('i',88, struct oifreq) /* set mtu */ -#define SIOCGIFMTU (int)_IOWR('i',86, struct oifreq) /* get mtu */ - -#define SIOCSNETOPT (int)_IOW('i', 90, struct optreq) /* set network option */ -#define SIOCGNETOPT (int)_IOWR('i', 91, struct optreq) /* get network option */ -#define SIOCDNETOPT (int)_IOWR('i', 92, struct optreq) /* set default */ - -#define SIOCSX25XLATE (int)_IOW('i', 99, struct oifreq) /* set xlate tab */ -#define SIOCGX25XLATE (int)_IOWR('i',100, struct oifreq) /* get xlate tab */ -#define SIOCDX25XLATE (int)_IOW('i', 101, struct oifreq) /* delete xlate tab */ - -#define SIOCIFDETACH (int)_IOW('i', 102, struct ifreq) /* detach an ifnet */ -#define SIOCIFATTACH (int)_IOW('i', 103, struct ifreq) /* attach an ifnet */ - -#define SIOCGNMTUS (int)_IO('i',110) /* get NMTUs */ -#define SIOCGETMTUS (int)_IO('i',111) /* get common_mtus */ -#define SIOCADDMTU (int)_IOW('i',112, int) /* add mtu */ -#define SIOCDELMTU (int)_IOW('i',113, int) /* delete mtu */ - -#define SIOCGIFGIDLIST (int)_IO('i', 104) /* get gidlist */ -#define SIOCSIFGIDLIST (int)_IO('i', 105) /* set gidlist */ - -#define SIOCGSIZIFCONF (int)_IOR('i', 106, int) /* get size for SIOCGIFCONF */ - -#define SIOCIF_ATM_UBR (int)_IOW('i',120,struct ifreq) /* set ubr rate */ -#define SIOCIF_ATM_SNMPARP (int)_IOW('i',121,struct ifreq) /* atm snmp arp */ -#define SIOCIF_ATM_IDLE (int)_IOW('i',122,struct ifreq) /* set idle time */ -#define SIOCIF_ATM_DUMPARP (int)_IOW('i',123,struct ifreq) /* atm dump arp */ -#define SIOCIF_ATM_SVC (int)_IOW('i',124,struct ifreq) /* atmif init */ -#define SIOCIF_ATM_DARP (int)_IOW('i',125,struct ifreq) /* del atmarp */ -#define SIOCIF_ATM_GARP (int)_IOW('i',126,struct ifreq) /* get atmarp */ -#define SIOCIF_ATM_SARP (int)_IOW('i',127,struct ifreq) /* set atmarp */ - -#define SIOCGISNO (int)_IOWR('i',107, struct oifreq) /* get IF network options */ -#define SIOCSISNO (int)_IOW('i', 108, struct oifreq) /* set IF network options */ -#define SIOCGIFBAUDRATE (int)_IOWR('i', 109, struct oifreq) /* get ifnet's if_baudrate */ diff --git a/sysdeps/unix/sysv/aix/bits/poll.h b/sysdeps/unix/sysv/aix/bits/poll.h deleted file mode 100644 index b9f2f71558..0000000000 --- a/sysdeps/unix/sysv/aix/bits/poll.h +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright (C) 1997, 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 - 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 _SYS_POLL_H -# error "Never use directly; include instead." -#endif - -/* Event types that can be polled for. These bits may be set in `events' - to indicate the interesting event types; they will appear in `revents' - to indicate the status of the file descriptor. */ -#define POLLIN 0x0001 /* There is data to read. */ -#define POLLPRI 0x0002 /* There is urgent data to read. */ -#define POLLOUT 0x0004 /* Writing now will not block. */ - -#ifdef __USE_XOPEN -/* These values are defined in XPG4.2. */ -# define POLLRDNORM 0x0010 /* Normal data may be read. */ -# define POLLRDBAND 0x0020 /* Priority data may be read. */ -# define POLLWRNORM POLLOUT /* Writing now will not block. */ -# define POLLWRBAND 0x0040 /* Priority data may be written. */ -#endif - -/* Event types always implicitly polled for. These bits need not be set in - `events', but they will appear in `revents' to indicate the status of - the file descriptor. */ -#define POLLERR 0x4000 /* Error condition. */ -#define POLLHUP 0x2000 /* Hung up. */ -#define POLLNVAL 0x8000 /* Invalid polling request. */ diff --git a/sysdeps/unix/sysv/aix/bits/resource.h b/sysdeps/unix/sysv/aix/bits/resource.h deleted file mode 100644 index cc851e8a06..0000000000 --- a/sysdeps/unix/sysv/aix/bits/resource.h +++ /dev/null @@ -1,191 +0,0 @@ -/* Bit values & structures for resource limits. AIX version. - Copyright (C) 1994, 1996-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 - 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 _SYS_RESOURCE_H -# error "Never use directly; include instead." -#endif - -#include - -/* Transmute defines to enumerations. The macro re-definitions are - necessary because some programs want to test for operating system - features with #ifdef RUSAGE_SELF. In ISO C the reflexive - definition is a no-op. */ - -/* Kinds of resource limit. */ -enum __rlimit_resource -{ - /* Per-process CPU limit, in seconds. */ - RLIMIT_CPU = 0, -#define RLIMIT_CPU RLIMIT_CPU - - /* Largest file that can be created, in bytes. */ - RLIMIT_FSIZE = 1, -#define RLIMIT_FSIZE RLIMIT_FSIZE - - /* Maximum size of data segment, in bytes. */ - RLIMIT_DATA = 2, -#define RLIMIT_DATA RLIMIT_DATA - - /* Maximum size of stack segment, in bytes. */ - RLIMIT_STACK = 3, -#define RLIMIT_STACK RLIMIT_STACK - - /* Largest core file that can be created, in bytes. */ - RLIMIT_CORE = 4, -#define RLIMIT_CORE RLIMIT_CORE - - /* Largest resident set size, in bytes. - This affects swapping; processes that are exceeding their - resident set size will be more likely to have physical memory - taken from them. */ - RLIMIT_RSS = 5, -#define RLIMIT_RSS RLIMIT_RSS - - /* Address space limit (?) */ - RLIMIT_AS = 6, -#define RLIMIT_AS RLIMIT_AS - - /* Number of open files. */ - RLIMIT_NOFILE = 7, - RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */ -#define RLIMIT_NOFILE RLIMIT_NOFILE -#define RLIMIT_OFILE RLIMIT_OFILE - - RLIM_NLIMITS = 10 -#define RLIMIT_NLIMITS RLIMIT_NLIMITS -#define RLIM_NLIMITS RLIM_NLIMITS -}; - -/* Value to indicate that there is no limit. */ -#ifndef __USE_FILE_OFFSET64 -# define RLIM_INFINITY ((long int)(~0UL >> 1)) -#else -# define RLIM_INFINITY 0x7fffffffffffffffLL -#endif - -#ifdef __USE_LARGEFILE64 -# define RLIM64_INFINITY 0x7fffffffffffffffLL -#endif - -#define RLIM_SAVED_MAX (RLIM_INFINITY - 1) -#define RLIM_SAVED_CUR (RLIM_INFINITY - 2) - - -/* Type for resource quantity measurement. */ -#ifndef __USE_FILE_OFFSET64 -typedef __rlim_t rlim_t; -#else -typedef __rlim64_t rlim_t; -#endif -#ifdef __USE_LARGEFILE64 -typedef __rlim64_t rlim64_t; -#endif - -struct rlimit - { - /* The current (soft) limit. */ - rlim_t rlim_cur; - /* The hard limit. */ - rlim_t rlim_max; - }; - -#ifdef __USE_LARGEFILE64 -struct rlimit64 - { - /* The current (soft) limit. */ - rlim64_t rlim_cur; - /* The hard limit. */ - rlim64_t rlim_max; - }; -#endif - -/* Whose usage statistics do you want? */ -enum __rusage_who -{ - /* The calling process. */ - RUSAGE_SELF = 0, -#define RUSAGE_SELF RUSAGE_SELF - - /* All of its terminated child processes. */ - RUSAGE_CHILDREN = -1 -#define RUSAGE_CHILDREN RUSAGE_CHILDREN -}; - -#define __need_timeval -#include /* For `struct timeval'. */ - -/* Structure which says how much of each resource has been used. */ -struct rusage - { - /* Total amount of user time used. */ - struct timeval ru_utime; - /* Total amount of system time used. */ - struct timeval ru_stime; - /* Maximum resident set size (in kilobytes). */ - long int ru_maxrss; - /* Amount of sharing of text segment memory - with other processes (kilobyte-seconds). */ - long int ru_ixrss; - /* Amount of data segment memory used (kilobyte-seconds). */ - long int ru_idrss; - /* Amount of stack memory used (kilobyte-seconds). */ - long int ru_isrss; - /* Number of soft page faults (i.e. those serviced by reclaiming - a page from the list of pages awaiting reallocation. */ - long int ru_minflt; - /* Number of hard page faults (i.e. those that required I/O). */ - long int ru_majflt; - /* Number of times a process was swapped out of physical memory. */ - long int ru_nswap; - /* Number of input operations via the file system. Note: This - and `ru_oublock' do not include operations with the cache. */ - long int ru_inblock; - /* Number of output operations via the file system. */ - long int ru_oublock; - /* Number of IPC messages sent. */ - long int ru_msgsnd; - /* Number of IPC messages received. */ - long int ru_msgrcv; - /* Number of signals delivered. */ - long int ru_nsignals; - /* Number of voluntary context switches, i.e. because the process - gave up the process before it had to (usually to wait for some - resource to be available). */ - long int ru_nvcsw; - /* Number of involuntary context switches, i.e. a higher priority process - became runnable or the current process used up its time slice. */ - long int ru_nivcsw; - }; - -/* Priority limits. */ -#define PRIO_MIN -20 /* Minimum priority a process can have. */ -#define PRIO_MAX 20 /* Maximum priority a process can have. */ - -/* The type of the WHICH argument to `getpriority' and `setpriority', - indicating what flavor of entity the WHO argument specifies. */ -enum __priority_which -{ - PRIO_PROCESS = 0, /* WHO is a process ID. */ -#define PRIO_PROCESS PRIO_PROCESS - PRIO_PGRP = 1, /* WHO is a process group ID. */ -#define PRIO_PGRP PRIO_PGRP - PRIO_USER = 2 /* WHO is a user ID. */ -#define PRIO_USER PRIO_USER -}; diff --git a/sysdeps/unix/sysv/aix/bits/setjmp.h b/sysdeps/unix/sysv/aix/bits/setjmp.h deleted file mode 100644 index c7a736bc38..0000000000 --- a/sysdeps/unix/sysv/aix/bits/setjmp.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (C) 1997, 1998, 1999, 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 - 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. */ - -/* Define the machine-dependent type `jmp_buf'. PowerPC version. */ - -#ifndef _SETJMP_H -# error "Never include directly; use instead." -#endif - -/* The previous bits/setjmp.h had __jmp_buf defined as a structure. - We use an array of 'long int' instead, to make writing the - assembler easier. Naturally, user code should not depend on - either representation. */ - -#if defined __USE_MISC || defined _ASM -# define JB_GPR1 0 /* Also known as the stack pointer */ -# define JB_GPR2 1 -# define JB_LR 2 /* The address we will return to */ -# define JB_GPRS 3 /* GPRs 14 through 31 are saved, 18 in total */ -# define JB_CR 21 /* Condition code registers. */ -# define JB_FPRS 22 /* FPRs 14 through 31 are saved, 18*2 words total */ -#endif - -#ifndef _ASM -typedef long int __jmp_buf[64]; -#endif - -/* Test if longjmp to JMPBUF would unwind the frame - containing a local variable at ADDRESS. */ -#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \ - ((void *) (address) < (void *) demangle ((jmpbuf)[JB_GPR1])) diff --git a/sysdeps/unix/sysv/aix/bits/sigaction.h b/sysdeps/unix/sysv/aix/bits/sigaction.h deleted file mode 100644 index 55414b8f1f..0000000000 --- a/sysdeps/unix/sysv/aix/bits/sigaction.h +++ /dev/null @@ -1,72 +0,0 @@ -/* The proper definitions for AIX's sigaction. - Copyright (C) 1993-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 - 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 _SIGNAL_H -# error "Never include directly; use instead." -#endif - -/* Structure describing the action to be taken when a signal arrives. */ -struct sigaction - { - /* Signal handler. */ -#ifdef __USE_POSIX199309 - union - { - /* Used if SA_SIGINFO is not set. */ - __sighandler_t sa_handler; - /* Used if SA_SIGINFO is set. */ - void (*sa_sigaction) (int, siginfo_t *, void *); - } - __sigaction_handler; -# define sa_handler __sigaction_handler.sa_handler -# define sa_sigaction __sigaction_handler.sa_sigaction -#else - __sighandler_t sa_handler; -#endif - - /* Additional set of signals to be blocked. */ - __sigset_t sa_mask; - - /* Special flags. */ - int sa_flags; - }; - -/* Bits in `sa_flags'. */ -#define SA_NOCLDSTOP 4 /* Don't send SIGCHLD when children stop. */ -#define SA_NOCLDWAIT 0x400 /* Don't create on death of child. */ -#define SA_SIGINFO 0x100 /* Invoke signal-catching function with - three arguments instead of one. */ -#if defined __USE_UNIX98 || defined __USE_MISC -# define SA_ONSTACK 0x00000001 /* Use signal stack by using `sa_restorer'. */ -# define SA_RESTART 0x00000008 /* Restart syscall on signal return. */ -# define SA_NODEFER 0x00000200 /* Don't automatically block the signal when - its handler is being executed. */ -# define SA_RESETHAND 0x00000002 /* Reset to SIG_DFL on entry to handler. */ -#endif -#ifdef __USE_MISC -/* Some aliases for the SA_ constants. */ -# define SA_NOMASK SA_NODEFER -# define SA_ONESHOT SA_RESETHAND -# define SA_STACK SA_ONSTACK -#endif - -/* Values for the HOW argument to `sigprocmask'. */ -#define SIG_BLOCK 0 /* Block signals. */ -#define SIG_UNBLOCK 1 /* Unblock signals. */ -#define SIG_SETMASK 2 /* Set the set of blocked signals. */ diff --git a/sysdeps/unix/sysv/aix/bits/sigcontext.h b/sysdeps/unix/sysv/aix/bits/sigcontext.h deleted file mode 100644 index 40bec1b710..0000000000 --- a/sysdeps/unix/sysv/aix/bits/sigcontext.h +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright (C) 1996, 1997, 1998, 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 - 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. */ - -#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H -# error "Never use directly; include instead." -#endif - -#include - - -struct sigcontext -{ - int sc_onstack; /* Sigstack state to restore. */ - sigset_t sc_mask; /* Signal mask to restore. */ - int sc_uerror; /* u_error to restore. */ - struct mcontext_t sc_jmpbuf; /* Process context to restore. */ -}; diff --git a/sysdeps/unix/sysv/aix/bits/signum.h b/sysdeps/unix/sysv/aix/bits/signum.h deleted file mode 100644 index 67eb949600..0000000000 --- a/sysdeps/unix/sysv/aix/bits/signum.h +++ /dev/null @@ -1,96 +0,0 @@ -/* Signal number definitions. AIX version. - Copyright (C) 1995-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 - 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. */ - -#ifdef _SIGNAL_H - -/* Fake signal functions. */ -#define SIG_ERR ((__sighandler_t) -1) /* Error return. */ -#define SIG_DFL ((__sighandler_t) 0) /* Default action. */ -#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */ - -#ifdef __USE_UNIX98 -# define SIG_HOLD ((__sighandler_t) 2) /* Add signal to hold mask. */ -# define SIG_CATCHE ((__sighandler_t) 3) -#endif - - -/* Signals. */ -#define SIGHUP 1 /* Hangup (POSIX). */ -#define SIGINT 2 /* Interrupt (ANSI). */ -#define SIGQUIT 3 /* Quit (POSIX). */ -#define SIGILL 4 /* Illegal instruction (ANSI). */ -#define SIGTRAP 5 /* Trace trap (POSIX). */ -#define SIGABRT 6 /* Abort (ANSI). */ -#define SIGIOT SIGABRT /* Abort (terminal) process. */ -#define SIGEMT 7 /* EMT instruction. */ -#define SIGFPE 8 /* Floating-point exception (ANSI). */ -#define SIGKILL 9 /* Kill, unblockable (POSIX). */ -#define SIGBUS 10 /* BUS error (4.2 BSD). */ -#define SIGSEGV 11 /* Segmentation violation (ANSI). */ -#define SIGSYS 12 /* Bad system call. */ -#define SIGPIPE 13 /* Broken pipe (POSIX). */ -#define SIGALRM 14 /* Alarm clock (POSIX). */ -#define SIGTERM 15 /* Termination (ANSI). */ -#define SIGURG 16 /* Urgent condition on socket (4.2 BSD). */ -#define SIGIOINT SIGURG /* Printer to backend error signal. */ -#define SIGSTOP 17 /* Stop, unblockable (POSIX). */ -#define SIGTSTP 18 /* Keyboard stop (POSIX). */ -#define SIGCONT 19 /* Continue (POSIX). */ -#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */ -#define SIGCHLD 20 /* Child status has changed (POSIX). */ -#define SIGTTIN 21 /* Background read from tty (POSIX). */ -#define SIGTTOU 22 /* Background write to tty (POSIX). */ -#define SIGIO 23 /* I/O now possible (4.2 BSD). */ -#define SIGAIO SIGIO /* Base LAN I/O. */ -#define SIGPTY SIGIO /* PTY I/O. */ -#define SIGPOLL SIGIO /* ANother I/O event. */ -#define SIGXCPU 24 /* CPU limit exceeded (4.2 BSD). */ -#define SIGXFSZ 25 /* File size limit exceeded (4.2 BSD). */ -#define SIGMSG 27 /* Input data is in the ring buffer. */ -#define SIGWINCH 28 /* Window size change (4.3 BSD, Sun). */ -#define SIGPWR 29 /* Power failure restart (System V). */ -#define SIGUSR1 30 /* User-defined signal 1 (POSIX). */ -#define SIGUSR2 31 /* User-defined signal 2 (POSIX). */ -#define SIGPROF 32 /* Profiling alarm clock (4.2 BSD). */ -#define SIGDANGER 33 /* System crash imminent. */ -#define SIGVTALRM 34 /* Virtual alarm clock (4.2 BSD). */ -#define SIGMIGRATE 35 /* Migrate process. */ -#define SIGPRE 36 /* Programming exception. */ -#define SIGVIRT 37 /* AIX virtual time alarm. */ -#define SIGARLM1 38 /* Reserved, don't use. */ -#define SIGWAITING 39 /* Reserved, don't use. */ -#define SIGCPUFAIL 59 /* Predictive de-configuration of processors.*/ -#define SIGKAP 60 /* Keep alive poll from native keyboard. */ -#define SIGGRANT SIGKAP /* Monitor mode granted. */ -#define SIGRETRACT 61 /* Monitor mode should be relinguished. */ -#define SIGSOUND 62 /* Sound control has completed. */ -#define SIGSAK 63 /* Secure attentation key. */ - -#define _NSIG 64 /* Biggest signal number + 1 - (including real-time signals). */ - -#define SIGRTMIN (__libc_current_sigrtmin ()) -#define SIGRTMAX (__libc_current_sigrtmax ()) - -/* These are the hard limits of the kernel. These values should not be - used directly at user level. */ -#define __SIGRTMIN 888 -#define __SIGRTMAX 999 - -#endif /* included. */ diff --git a/sysdeps/unix/sysv/aix/bits/sigset.h b/sysdeps/unix/sysv/aix/bits/sigset.h deleted file mode 100644 index 0dc6b40a7c..0000000000 --- a/sysdeps/unix/sysv/aix/bits/sigset.h +++ /dev/null @@ -1,125 +0,0 @@ -/* __sig_atomic_t, __sigset_t, and related definitions. AIX version. - Copyright (C) 1991,1992,1994,1996,1997,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 - 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 _SIGSET_H_types -# define _SIGSET_H_types 1 - -typedef int __sig_atomic_t; - -/* A `sigset_t' has a bit for each signal. */ - -typedef struct - { - unsigned int __losigs; - unsigned int __hisigs; - } __sigset_t; - -#endif - - -/* We only want to define these functions if was actually - included; otherwise we were included just to define the types. Since we - are namespace-clean, it wouldn't hurt to define extra macros. But - trouble can be caused by functions being defined (e.g., any global - register vars declared later will cause compilation errors). */ - -#if !defined _SIGSET_H_fns && defined _SIGNAL_H -# define _SIGSET_H_fns 1 - -# ifndef _EXTERN_INLINE -# define _EXTERN_INLINE extern __inline -# endif - -/* Return a mask that includes the bit for SIG only. */ -# define __sigmask(sig) \ - (((unsigned long int) 1) << (((sig) - 1) % (8 * sizeof (unsigned int)))) - -# if defined __GNUC__ && __GNUC__ >= 2 -# define __sigemptyset(set) \ - (__extension__ ({ sigset_t *__set = (set); \ - __set->__losigs = __set->__hisigs = 0; \ - 0; })) -# define __sigfillset(set) \ - (__extension__ ({ sigset_t *__set = (set); \ - __set->__losigs = __set->__hisigs = ~0u; \ - 0; })) - -# ifdef __USE_GNU -/* The POSIX does not specify for handling the whole signal set in one - command. This is often wanted and so we define three more functions - here. */ -# define __sigisemptyset(set) \ - (__extension__ ({ const sigset_t *__set = (set); \ - (__set->__losigs | __set->__hisigs) == 0; })) -# define __sigandset(dest, left, right) \ - (__extension__ ({ sigset_t *__dest = (dest); \ - const sigset_t *__left = (left); \ - const sigset_t *__right = (right); \ - __dest->__losigs = __left->__losigs & __right->__losigs; \ - __dest->__hisigs = __left->__hisigs & __right->__hisigs; \ - 0; })) -# define __sigorset(dest, left, right) \ - (__extension__ ({ sigset_t *__dest = (dest); \ - const sigset_t *__left = (left); \ - const sigset_t *__right = (right); \ - __dest->__losigs = __left->__losigs | __right->__losigs; \ - __dest->__hisigs = __left->__hisigs | __right->__hisigs; \ - 0; })) -# endif -# endif - -/* These functions needn't check for a bogus signal number -- error - checking is done in the non __ versions. */ - -extern int __sigismember (__const __sigset_t *, int); -extern int __sigaddset (__sigset_t *, int); -extern int __sigdelset (__sigset_t *, int); - -# ifdef __USE_EXTERN_INLINES -_EXTERN_INLINE int -__sigismember (__const __sigset_t *__set, int __sig) -{ - unsigned int __mask = __sigmask (__sig); - - return ((__sig < 33 ? __set->__losigs : __set->__hisigs) & __mask ) ? 1 : 0; -} - -_EXTERN_INLINE int -__sigaddset (__sigset_t *__set, int __sig) -{ - unsigned int __mask = __sigmask (__sig); - - (__sig < 33 ? __set->__losigs : __set->__hisigs) |= __mask; - - return 0; -} - -_EXTERN_INLINE int -__sigdelset (__sigset_t *__set, int __sig) -{ - unsigned int __mask = __sigmask (__sig); - - (__sig < 33 ? __set->__losigs : __set->__hisigs) &= ~__mask; - - return 0; -} -# endif - - -#endif /* ! _SIGSET_H_fns. */ diff --git a/sysdeps/unix/sysv/aix/bits/sigstack.h b/sysdeps/unix/sysv/aix/bits/sigstack.h deleted file mode 100644 index cefd33c231..0000000000 --- a/sysdeps/unix/sysv/aix/bits/sigstack.h +++ /dev/null @@ -1,46 +0,0 @@ -/* sigstack, sigaltstack definitions. - Copyright (C) 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 - 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 _SIGNAL_H -# error "Never include this file directly. Use instead" -#endif - - -/* Structure describing a signal stack (obsolete). */ -struct sigstack - { - void *ss_sp; /* Signal stack pointer. */ - int ss_onstack; /* Nonzero if executing on this stack. */ - }; - - -/* Possible values for `ss_flags.'. */ -enum -{ - SS_ONSTACK = 1, -#define SS_ONSTACK SS_ONSTACK - SS_DISABLE -#define SS_DISABLE SS_DISABLE -}; - -/* Minimum stack size for a signal handler. */ -#define MINSIGSTKSZ 1024 - -/* System default stack size. */ -#define SIGSTKSZ 4096 diff --git a/sysdeps/unix/sysv/aix/bits/socket.h b/sysdeps/unix/sysv/aix/bits/socket.h deleted file mode 100644 index 1fdadfe082..0000000000 --- a/sysdeps/unix/sysv/aix/bits/socket.h +++ /dev/null @@ -1,293 +0,0 @@ -/* System-specific socket constants and types. AIX version. - Copyright (C) 1991,92,1994-1999,2000,2001 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_SOCKET_H -#define __BITS_SOCKET_H - -#if !defined _SYS_SOCKET_H && !defined _NETINET_IN_H -# error "Never include directly; use instead." -#endif - -#define __need_size_t -#define __need_NULL -#include - -#include -#include - -/* Type for length arguments in socket calls. */ -#ifndef __socklen_t_defined -typedef __socklen_t socklen_t; -# define __socklen_t_defined -#endif - -/* Types of sockets. */ -enum __socket_type -{ - SOCK_STREAM = 1, /* Sequenced, reliable, connection-based - byte streams. */ -#define SOCK_STREAM SOCK_STREAM - SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams - of fixed maximum length. */ -#define SOCK_DGRAM SOCK_DGRAM - SOCK_RAW = 3, /* Raw protocol interface. */ -#define SOCK_RAW SOCK_RAW - SOCK_RDM = 4, /* Reliably-delivered messages. */ -#define SOCK_RDM SOCK_RDM - SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, - datagrams of fixed maximum length. */ -#define SOCK_SEQPACKET SOCK_SEQPACKET - SOCK_CONN_DGRAM = 6 /* Conneciton datagram. */ -#define SOCK_CONN_DGRAM SOCK_CONN_DGRAM -}; - -/* Protocol families. */ -#define PF_UNSPEC 0 /* Unspecified. */ -#define PF_LOCAL 1 /* Local to host (pipes and file-domain). */ -#define PF_UNIX PF_LOCAL /* Old BSD name for PF_LOCAL. */ -#define PF_FILE PF_LOCAL /* Another non-standard name for PF_LOCAL. */ -#define PF_INET 2 /* IP protocol family. */ -#define PF_IMPLINK 3 /* ARPAnet IMP addresses. */ -#define PF_PUP 4 /* PUP protocols (e.g., BSP). */ -#define PF_CHAOS 5 /* MIT CHAOS protocols. */ -#define PF_NS 6 /* XEROX NS protocols. */ -#define PF_ISO 7 /* ISO protocols. */ -#define PF_OSI PF_ISO -#define PF_ECMA 8 /* European Computer Manufacturers. */ -#define PF_DATAKIT 9 /* Datakit protocols. */ -#define PF_CCITT 10 /* CCITT protocols, X.25 etc. */ -#define PF_SNA 11 /* IBM SNA. */ -#define PF_DECnet 12 /* DECnet. */ -#define PF_DLI 13 /* DEC Direct data link interface. */ -#define PF_LAT 14 /* LAT. */ -#define PF_HYLINK 15 /* NSC Hyperchannel. */ -#define PF_APPLETALK 16 /* Apple Talk. */ -#define PF_NETLINK 17 /* Internet Routing Protocol. */ -#define PF_ROUTE PF_NETLINK /* Alias to emulate 4.4BSD. */ -#define PF_LINK 18 /* Link layer interface. */ -#define PF_XTP 19 /* eXpress Transfer Protocol (no AF). */ -#define PF_INTF 20 /* Debugging use only. */ -#define PF_RIF 21 /* Raw interface. */ -#define PF_NETWARE 22 -#define PF_NDD 23 -#define PF_INET6 24 /* IPv6. */ -#define PF_MAX 30 /* For now.. */ - -/* Address families. */ -#define AF_UNSPEC PF_UNSPEC -#define AF_LOCAL PF_LOCAL -#define AF_UNIX PF_UNIX -#define AF_FILE PF_FILE -#define AF_INET PF_INET -#define AF_IMPLINK PF_IMPLINK -#define AF_PUP PF_PUP -#define AF_CHAOS PF_CHAOS -#define AF_NS PF_NS -#define AF_ISO PF_ISO -#define AF_OSI PF_OSI -#define AF_ECMA PF_ECMA -#define AF_DATAKIT PF_DATAKIT -#define AF_CCITT PF_CCITT -#define AF_SNA PF_SNA -#define AF_DECnet PF_DECnet -#define AF_DLI PF_DLI -#define AF_LAT PF_LAT -#define AF_HYLINK PF_HYLINK -#define AF_APPLETALK PF_APPLETALK -#define AF_NETLINK PF_NETLINK -#define AF_ROUTE PF_ROUTE -#define AF_LINK PF_LINK -#define AF_INTF PF_INTF -#define AF_RIF PF_RIF -#define AF_NETWARE PF_NETWARE -#define AF_NDD PF_NDD -#define AF_INET6 PF_INET6 -#define AF_MAX PF_MAX - -/* Socket level values. Others are defined in the appropriate headers. - - XXX These definitions also should go into the appropriate headers as - far as they are available. */ -#define SOL_SOCKET 0xffff - -/* Maximum queue length specifiable by listen. */ -#define SOMAXCONN 1024 - -/* Get the definition of the macro to define the common sockaddr members. */ -#include - -/* Structure describing a generic socket address. */ -struct sockaddr - { - __SOCKADDR_COMMON (sa_); /* Common data: address family and length. */ - char sa_data[14]; /* Address data. */ - }; - - -/* Structure large enough to hold any socket address (with the historical - exception of AF_UNIX). We reserve 128 bytes. */ -#if ULONG_MAX > 0xffffffff -# define __ss_aligntype __uint64_t -#else -# define __ss_aligntype __uint32_t -#endif -#define _SS_SIZE 128 -#define _SS_PADSIZE (_SS_SIZE - (2 * sizeof (__ss_aligntype))) - -struct sockaddr_storage - { - __SOCKADDR_COMMON (ss_); /* Address family, etc. */ - __ss_aligntype __ss_align; /* Force desired alignment. */ - char __ss_padding[_SS_PADSIZE]; - }; - - -/* Bits in the FLAGS argument to `send', `recv', et al. */ -enum - { - MSG_OOB = 0x01, /* Process out-of-band data. */ -#define MSG_OOB MSG_OOB - MSG_PEEK = 0x02, /* Peek at incoming messages. */ -#define MSG_PEEK MSG_PEEK - MSG_DONTROUTE = 0x04, /* Don't use local routing. */ -#define MSG_DONTROUTE MSG_DONTROUTE - MSG_EOR = 0x08, /* End of record. */ -#define MSG_EOR MSG_EOR - MSG_TRUNC = 0x10, -#define MSG_TRUNC MSG_TRUNC - MSG_CTRUNC = 0x20, /* Control data lost before delivery. */ -#define MSG_CTRUNC MSG_CTRUNC - MSG_WAITALL = 0x40, /* Wait for a full request. */ -#define MSG_WAITALL MSG_WAITALL - MSG_MPEG2 = 0x80, /* Message contain MPEG2 data. */ -#define MSG_MPEG2 MSG_MPEG2 - }; - - -/* Structure describing messages sent by - `sendmsg' and received by `recvmsg'. */ -struct msghdr - { - void *msg_name; /* Address to send to/receive from. */ - socklen_t msg_namelen; /* Length of address data. */ - - struct iovec *msg_iov; /* Vector of data to send/receive into. */ - int msg_iovlen; /* Number of elements in the vector. */ - - void *msg_control; /* Ancillary data (eg BSD filedesc passing). */ - socklen_t msg_controllen; /* Ancillary data buffer length. */ - - int msg_flags; /* Flags on received message. */ - }; - -/* Structure used for storage of ancillary data object information. */ -struct cmsghdr - { - socklen_t cmsg_len; /* Length of data in cmsg_data plus length - of cmsghdr structure. */ - int cmsg_level; /* Originating protocol. */ - int cmsg_type; /* Protocol specific type. */ -#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L - __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */ -#endif - }; - -/* Ancillary data object manipulation macros. */ -#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L -# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data) -#else -# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1)) -#endif -#define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg) -#define CMSG_FIRSTHDR(mhdr) \ - ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \ - ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL) -#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \ - & ~(sizeof (size_t) - 1)) -#define CMSG_SPACE(len) (CMSG_ALIGN (len) \ - + CMSG_ALIGN (sizeof (struct cmsghdr))) -#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len)) - -extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr, - struct cmsghdr *__cmsg) __THROW; -#ifdef __USE_EXTERN_INLINES -# ifndef _EXTERN_INLINE -# define _EXTERN_INLINE extern __inline -# endif -_EXTERN_INLINE struct cmsghdr * -__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW -{ - if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr)) - /* The kernel header does this so there may be a reason. */ - return 0; - - __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg - + CMSG_ALIGN (__cmsg->cmsg_len)); - if ((unsigned char *) (__cmsg + 1) >= ((unsigned char *) __mhdr->msg_control - + __mhdr->msg_controllen) - || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len) - > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen))) - /* No more entries. */ - return 0; - return __cmsg; -} -#endif /* Use `extern inline'. */ - -/* Socket level message types. This must match the definitions in - . */ -enum - { - SCM_RIGHTS = 0x01 /* Transfer file descriptors. */ -#define SCM_RIGHTS SCM_RIGHTS - }; - -/* Options flags per socket. */ -#define SO_DEBUG 0x0001 /* Turn on debugging info recording. */ -#define SO_ACCEPTCONN 0x0002 /* Socket has had listen(). */ -#define SO_REUSEADDR 0x0004 /* Allow local address reuse. */ -#define SO_KEEPALIVE 0x0008 /* Keep connections alive. */ -#define SO_DONTROUTE 0x0010 /* Just use interface addresses. */ -#define SO_BROADCAST 0x0020 /* Permit sending of broadcast msgs. */ -#define SO_USELOOPBACK 0x0040 /* Bypass hardware when possible. */ -#define SO_LINGER 0x0080 /* Linger on close if data present. */ -#define SO_OOBINLINE 0x0100 /* Leave received OOB data in line. */ -#define SO_REUSEPORT 0x0200 /* Allow local address & port reuse. */ -#define SO_USE_IFBUFS 0x0400 /* Interface will supply buffers. */ -#define SO_CKSUMRECV 0x0800 /* Defer checksum until receive. */ -#define SO_NOREUSEADDR 0x1000 /* Prevent local address reuse. */ -#define SO_SNDBUF 0x1001 /* Send buffer size. */ -#define SO_RCVBUF 0x1002 /* Receive buffer size. */ -#define SO_SNDLOWAT 0x1003 /* Send low-water mark. */ -#define SO_RCVLOWAT 0x1004 /* Receive low-water mark. */ -#define SO_SNDTIMEO 0x1005 /* Send timeout. */ -#define SO_RCVTIMEO 0x1006 /* Receive timeout. */ -#define SO_ERROR 0x1007 /* Get error status and clear. */ -#define SO_TYPE 0x1008 /* Get socket type. */ -#define SO_KERNACCEPT 0x2000 /* Derive a in-kernel only socket. */ -#define SO_AUDIT 0x8000 /* Turn on socket auditing. */ - - -/* Structure used to manipulate the SO_LINGER option. */ -struct linger - { - int l_onoff; /* Nonzero to linger on close. */ - int l_linger; /* Time to linger. */ - }; - -#endif /* bits/socket.h */ diff --git a/sysdeps/unix/sysv/aix/bits/stat.h b/sysdeps/unix/sysv/aix/bits/stat.h deleted file mode 100644 index adcb1d1019..0000000000 --- a/sysdeps/unix/sysv/aix/bits/stat.h +++ /dev/null @@ -1,119 +0,0 @@ -/* Copyright (C) 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 - 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 _SYS_STAT_H -# error "Never include directly; use instead." -#endif - -struct stat - { - __dev_t st_dev; /* Device. */ - __ino_t st_ino; /* File serial number. */ - __mode_t st_mode; /* File mode. */ - __nlink_t st_nlink; /* Link count. */ - unsigned short int st_flag; /* Flag word. */ - __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. */ -#ifndef __USE_FILE_OFFSET64 - __off_t st_size; /* Size of file, in bytes. */ -#else - int st_ssize; /* Size of file, in bytes. */ -#endif - __time_t st_atime; /* Time of last access. */ - unsigned long int __unused1; - __time_t st_mtime; /* Time of last modification. */ - unsigned long int __unused2; - __time_t st_ctime; /* Time of last status change. */ - unsigned long int __unused3; - __blksize_t st_blksize; /* Optimal block size for I/O. */ - __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ - int st_vfstype; /* Type of the filesystem. */ - unsigned int st_vfs; /* Vfs number. */ - unsigned int st_type; /* Vnode type. */ - unsigned int st_gen; /* Inode generation number. */ - -#define _STATBUF_RESERVED_SPACE 9 - unsigned int st_reserved[_STATBUF_RESERVED_SPACE]; - -#ifdef __USE_FILE_OFFSET64 - unsigned int st_padto_ll; - __off64_t st_size; /* 64 bit file size in bytes. */ -#endif - }; - -#ifdef __USE_LARGEFILE64 -struct stat64 - { - __dev_t st_dev; /* Device. */ - __ino_t st_ino; /* File serial number. */ - __mode_t st_mode; /* File mode. */ - __nlink_t st_nlink; /* Link count. */ - unsigned short int st_flag; /* Flag word. */ - __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. */ - int st_ssize; /* Size of file, in bytes. */ - __time_t st_atime; /* Time of last access. */ - unsigned long int __unused1; - __time_t st_mtime; /* Time of last modification. */ - unsigned long int __unused2; - __time_t st_ctime; /* Time of last status change. */ - unsigned long int __unused3; - __blksize_t st_blksize; /* Optimal block size for I/O. */ - __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ - int st_vfstype; /* Type of the filesystem. */ - unsigned int st_vfs; /* Vfs number. */ - unsigned int st_type; /* Vnode type. */ - unsigned int st_gen; /* Inode generation number. */ - unsigned int st_reserved[_STATBUF_RESERVED_SPACE]; - unsigned int st_padto_ll; - __off64_t st_size; /* 64 bit file size in bytes. */ - }; -#endif - -/* Tell code we have these members. */ -#define _STATBUF_ST_BLKSIZE -#define _STATBUF_ST_RDEV - -/* Encoding of the file mode. */ - -#define __S_IFMT 0170000 /* These bits determine file type. */ - -/* File types. */ -#define __S_IFDIR 0040000 /* Directory. */ -#define __S_IFCHR 0020000 /* Character device. */ -#define __S_IFBLK 0060000 /* Block device. */ -#define __S_IFREG 0100000 /* Regular file. */ -#define __S_IFIFO 0010000 /* FIFO. */ -#define __S_IFLNK 0120000 /* Symbolic link. */ -#define __S_IFSOCK 0140000 /* Socket. */ - -/* POSIX.1b objects. */ -#define __S_TYPEISMQ(buf) (0) -#define __S_TYPEISSEM(buf) (0) -#define __S_TYPEISSHM(buf) (0) - -/* Protection bits. */ - -#define __S_ISUID 04000 /* Set user ID on execution. */ -#define __S_ISGID 02000 /* Set group ID on execution. */ -#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ -#define __S_IREAD 0400 /* Read by owner. */ -#define __S_IWRITE 0200 /* Write by owner. */ -#define __S_IEXEC 0100 /* Execute by owner. */ diff --git a/sysdeps/unix/sysv/aix/bits/statfs.h b/sysdeps/unix/sysv/aix/bits/statfs.h deleted file mode 100644 index 0a1c0a5e65..0000000000 --- a/sysdeps/unix/sysv/aix/bits/statfs.h +++ /dev/null @@ -1,77 +0,0 @@ -/* Copyright (C) 1997, 1998, 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 - 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 _SYS_STATFS_H -# error "Never include directly; use instead." -#endif - -#include /* for __fsid_t and __fsblkcnt_t*/ - -struct statfs - { - int f_version; - int f_type; - int f_bsize; - /* The following five elements have type `int' since AIX's fsfilcnt_t - and fsblkcnt_t types do not fit. */ - int f_blocks; - int f_bfree; - int f_bavail; - int f_files; - int f_ffree; - __fsid_t f_fsid; - int f_vfstype; - int f_fsize; - int f_vfsnumber; - int f_vfsoff; - int f_vfslen; - int f_vfsvers; - char f_fname[32]; - char f_fpack[32]; - int f_name_max; - }; - -#ifdef __USE_LARGEFILE64 -/* XXX There seems to be no 64-bit versio of this structure. */ -struct statfs64 - { - int f_version; - int f_type; - int f_bsize; - /* The following five elements have type `int' since AIX's fsfilcnt_t - and fsblkcnt_t types do not fit. */ - int f_blocks; - int f_bfree; - int f_bavail; - int f_files; - int f_ffree; - __fsid_t f_fsid; - int f_vfstype; - int f_fsize; - int f_vfsnumber; - int f_vfsoff; - int f_vfslen; - int f_vfsvers; - char f_fname[32]; - char f_fpack[32]; - int f_name_max; - }; -#endif - -/* Tell code we have these members. */ -#define _STATFS_F_NAME_MAX diff --git a/sysdeps/unix/sysv/aix/bits/termios.h b/sysdeps/unix/sysv/aix/bits/termios.h deleted file mode 100644 index b178d9c1b3..0000000000 --- a/sysdeps/unix/sysv/aix/bits/termios.h +++ /dev/null @@ -1,189 +0,0 @@ -/* termios type and macro definitions. AIX version. - Copyright (C) 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 - 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 _TERMIOS_H -# error "Never include directly; use instead." -#endif - -typedef unsigned char cc_t; -typedef unsigned int speed_t; -typedef unsigned int tcflag_t; - -#define NCCS 16 -struct termios - { - tcflag_t c_iflag; /* input mode flags */ - tcflag_t c_oflag; /* output mode flags */ - tcflag_t c_cflag; /* control mode flags */ - tcflag_t c_lflag; /* local mode flags */ - cc_t c_cc[NCCS]; /* control characters */ - }; - -/* c_cc characters */ -#define VINTR 0 -#define VQUIT 1 -#define VERASE 2 -#define VKILL 3 -#define VEOF 4 -#define VEOL 5 -#define VSTART 7 -#define VSTOP 8 -#define VSUSP 9 -#define VMIN 4 -#define VTIME 5 -#define VEOL2 6 -#define VDSUSP 10 -#define VREPRINT 11 -#define VDISCARD 12 -#define VWERSE 13 -#define VWERASE VWERSE -#define VLNEXT 14 -#define VSTRT VSTART - -/* c_iflag bits */ -#define IGNBRK 0000001 -#define BRKINT 0000002 -#define IGNPAR 0000004 -#define PARMRK 0000010 -#define INPCK 0000020 -#define ISTRIP 0000040 -#define INLCR 0000100 -#define IGNCR 0000200 -#define ICRNL 0000400 -#define IXON 0001000 -#define IXOFF 0002000 -#define IUCLC 0004000 -#define IXANY 0010000 -#define IMAXBEL 0200000 - -/* c_oflag bits */ -#define OPOST 0000001 -#define OLCUC 0000002 -#define ONLCR 0000004 -#define OCRNL 0000010 -#define ONOCR 0000020 -#define ONLRET 0000040 -#define OFILL 0000100 -#define OFDEL 0000200 -#if defined __USE_MISC || defined __USE_XOPEN -# define CRDLY 0001400 -# define CR0 0000000 -# define CR1 0000400 -# define CR2 0001000 -# define CR3 0001400 -# define TABDLY 0006000 -# define TAB0 0000000 -# define TAB1 0002000 -# define TAB2 0004000 -# define TAB3 0006000 -# define BSDLY 0010000 -# define BS0 0000000 -# define BS1 0010000 -# define FFDLY 0020000 -# define FF0 0000000 -# define FF1 0020000 -# define NLDLY 0040000 -# define NL0 0000000 -# define NL1 0040000 -#endif - -#define VTDLY 0100000 -#define VT0 0000000 -#define VT1 0100000 - -/* c_cflag bit meaning */ -#ifdef __USE_MISC -# define CBAUD 0000017 -#endif -#define B0 0000000 /* hang up */ -#define B50 0000001 -#define B75 0000002 -#define B110 0000003 -#define B134 0000004 -#define B150 0000005 -#define B200 0000006 -#define B300 0000007 -#define B600 0000010 -#define B1200 0000011 -#define B1800 0000012 -#define B2400 0000013 -#define B4800 0000014 -#define B9600 0000015 -#define B19200 0000016 -#define B38400 0000017 -#ifdef __USE_MISC -# define EXTA B19200 -# define EXTB B38400 -#endif -#define CSIZE 0000060 -#define CS5 0000000 -#define CS6 0000020 -#define CS7 0000040 -#define CS8 0000060 -#define CSTOPB 0000100 -#define CREAD 0000200 -#define PARENB 0000400 -#define PARODD 0001000 -#define HUPCL 0002000 -#define CLOCAL 0004000 -#ifdef __USE_MISC -# define CIBAUD 000003600000 /* input baud rate (not used) */ -# define CRTSCTS 020000000000 /* flow control */ -#endif - -/* c_lflag bits */ -#define ISIG 0000001 -#define ICANON 0000002 -#if defined __USE_MISC || defined __USE_XOPEN -# define XCASE 0000004 -#endif -#define ECHO 0000010 -#define ECHOE 0000020 -#define ECHOK 0000040 -#define ECHONL 0000100 -#define NOFLSH 0000200 -#define TOSTOP 0200000 -#ifdef __USE_MISC -# define ECHOCTL 0400000 -# define ECHOPRT 01000000 -# define ECHOKE 02000000 -# define FLUSHO 004000000 -# define PENDIN 04000000000 -#endif -#define IEXTEN 010000000 - -/* tcflow() and TCXONC use these */ -#define TCOOFF 0 -#define TCOON 1 -#define TCIOFF 2 -#define TCION 3 - -/* tcflush() and TCFLSH use these */ -#define TCIFLUSH 0 -#define TCOFLUSH 1 -#define TCIOFLUSH 2 - -/* tcsetattr uses these */ -#define TCSANOW 0 -#define TCSADRAIN 1 -#define TCSAFLUSH 2 - - -#define _IOT_termios /* Hurd ioctl type field. */ \ - _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2) diff --git a/sysdeps/unix/sysv/aix/bits/types.h b/sysdeps/unix/sysv/aix/bits/types.h deleted file mode 100644 index 12c3be730e..0000000000 --- a/sysdeps/unix/sysv/aix/bits/types.h +++ /dev/null @@ -1,136 +0,0 @@ -/* Copyright (C) 1991,92,1994-1999,2000,2001 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. */ - -/* - * Never include this file directly; use instead. - */ - -#ifndef _BITS_TYPES_H -#define _BITS_TYPES_H 1 - -#include - -#define __need_NULL -#define __need_size_t -#include - -/* Convenience types. */ -typedef unsigned char __u_char; -typedef unsigned short __u_short; -typedef unsigned int __u_int; -typedef unsigned long __u_long; -#ifdef __GNUC__ -__extension__ typedef unsigned long long int __u_quad_t; -__extension__ typedef long long int __quad_t; -#else -typedef struct - { - long int __val[2]; - } __quad_t; -typedef struct - { - __u_long __val[2]; - } __u_quad_t; -#endif -typedef signed char __int8_t; -typedef unsigned char __uint8_t; -typedef signed short int __int16_t; -typedef unsigned short int __uint16_t; -typedef signed int __int32_t; -typedef unsigned int __uint32_t; -#ifdef __GNUC__ -__extension__ typedef signed long long int __int64_t; -__extension__ typedef unsigned long long int __uint64_t; -#endif -typedef __quad_t *__qaddr_t; - -typedef __u_long __dev_t; /* Type of device numbers. */ -typedef __u_int __uid_t; /* Type of user identifications. */ -typedef __u_int __gid_t; /* Type of group identifications. */ -typedef __u_long __ino_t; /* Type of file serial numbers. */ -typedef __u_int __mode_t; /* Type of file attribute bitmasks. */ -typedef short int __nlink_t; /* Type of file link counts. */ -typedef long int __off_t; /* Type of file sizes and offsets. */ -typedef __quad_t __loff_t; /* Type of file sizes and offsets. */ -typedef int __pid_t; /* Type of process identifications. */ -typedef long int __ssize_t; /* Type of a byte count, or error. */ -typedef __u_long __rlim_t; /* Type of resource counts. */ -typedef __u_quad_t __rlim64_t; /* Type of resource counts (LFS). */ -typedef unsigned int __id_t; /* General type for ID. */ - -typedef struct - { - unsigned long int __val[2]; - } __fsid_t; /* Type of file system IDs. */ - -/* Everythin' else. */ -typedef long int __daddr_t; /* The type of a disk address. */ -typedef char *__caddr_t; -typedef long int __time_t; -typedef unsigned int __useconds_t; -typedef int __suseconds_t; -typedef long int __swblk_t; /* Type of a swap block maybe? */ - -typedef int __clock_t; - -/* Clock ID used in clock and timer functions. */ -typedef int __clockid_t; - -/* Timer ID returned by `timer_create'. */ -typedef int __timer_t; - -/* Number of descriptors that can fit in an `fd_set'. */ -#define __FD_SETSIZE 1024 - - -typedef long int __key_t; - -/* Type to represent block size. */ -typedef int __blksize_t; - -/* Types from the Large File Support interface. */ - -/* Type to count number os disk blocks. */ -typedef int __blkcnt_t; -typedef __quad_t __blkcnt64_t; - -/* Type to count file system blocks. */ -typedef __u_long __fsblkcnt_t; -typedef __u_quad_t __fsblkcnt64_t; - -/* Type to count file system inodes. */ -typedef __u_long __fsfilcnt_t; -typedef __u_quad_t __fsfilcnt64_t; - -/* Type of file serial numbers. */ -typedef __u_quad_t __ino64_t; - -/* Type of file sizes and offsets. */ -typedef __loff_t __off64_t; - -/* Used in XTI. */ -typedef int __t_scalar_t; -typedef unsigned int __t_uscalar_t; - -/* Duplicates info from stdint.h but this is used in unistd.h. */ -typedef signed long __intptr_t; - -/* Duplicate info from sys/socket.h. */ -typedef unsigned int __socklen_t; - -#endif /* bits/types.h */ diff --git a/sysdeps/unix/sysv/aix/bits/uio.h b/sysdeps/unix/sysv/aix/bits/uio.h deleted file mode 100644 index 60781532ab..0000000000 --- a/sysdeps/unix/sysv/aix/bits/uio.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (C) 1996, 1997, 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 - 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 _SYS_UIO_H -# error "Never include directly; use instead." -#endif - - -#include - - -/* Size of object which can be written atomically. - - This macro has different values in different kernel versions. The - latest versions of ther kernel use 1024 and this is good choice. Since - the C library implementation of readv/writev is able to emulate the - functionality even if the currently running kernel does not support - this large value the readv/writev call will not fail because of this. */ -#define UIO_MAXIOV 16 - - -/* Structure for scatter/gather I/O. */ -struct iovec - { - void *iov_base; /* Pointer to data. */ - size_t iov_len; /* Length of data. */ - }; diff --git a/sysdeps/unix/sysv/aix/bits/utmp.h b/sysdeps/unix/sysv/aix/bits/utmp.h deleted file mode 100644 index b78a2afdaf..0000000000 --- a/sysdeps/unix/sysv/aix/bits/utmp.h +++ /dev/null @@ -1,73 +0,0 @@ -/* The `struct utmp' type, describing entries in the utmp file. AIX. - Copyright (C) 1996, 1997, 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 - 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 _UTMP_H -# error "Never include directly; use instead." -#endif - -#include -#include -#include - - -#define UT_LINESIZE 12 -#define UT_NAMESIZE 8 -#define UT_HOSTSIZE 16 - - -struct utmp - { -#define ut_name ut_user - char ut_user[UT_NAMESIZE]; - char ut_id[14]; - char ut_line[UT_LINESIZE]; - short int ut_type; - short int ut_pid; - struct exit_status - { - short int e_termination; - short int e_exit; - } ut_exit; - __time_t ut_time; - char ut_host[UT_HOSTSIZE]; - }; - - -/* Values for the `ut_type' field of a `struct utmp'. */ -#define EMPTY 0 /* No valid user accounting information. */ - -#define RUN_LVL 1 /* The system's runlevel. */ -#define BOOT_TIME 2 /* Time of system boot. */ -#define OLD_TIME 3 /* Time when system clock changed. */ -#define NEW_TIME 4 /* Time after system clock changed. */ - -#define INIT_PROCESS 5 /* Process spawned by the init process. */ -#define LOGIN_PROCESS 6 /* Session leader of a logged in user. */ -#define USER_PROCESS 7 /* Normal process. */ -#define DEAD_PROCESS 8 /* Terminated process. */ - -#define ACCOUNTING 9 - - -/* Tell the user that we have a modern system with UT_HOST, UT_TYPE, and - UT_ID fields. */ -#define _HAVE_UT_TYPE 1 -#define _HAVE_UT_PID 1 -#define _HAVE_UT_ID 1 -#define _HAVE_UT_HOST 1 diff --git a/sysdeps/unix/sysv/aix/bits/utmpx.h b/sysdeps/unix/sysv/aix/bits/utmpx.h deleted file mode 100644 index 438b5f3a51..0000000000 --- a/sysdeps/unix/sysv/aix/bits/utmpx.h +++ /dev/null @@ -1,75 +0,0 @@ -/* Structures and defenitions for the user accounting database. AIX. - Copyright (C) 1997, 1998, 1999 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 _UTMPX_H -# error "Never include directly; use instead." -#endif - -#include -#include - - -#ifdef __USE_GNU -# include -# define _PATH_UTMPX _PATH_UTMP -# define _PATH_WTMPX _PATH_WTMP -#endif - - -#define __UT_LINESIZE 12 -#define __UT_NAMESIZE 8 -#define __UT_HOSTSIZE 16 - - -/* The structure describing an entry in the user accounting database. */ -struct utmpx -{ - char ut_user[__UT_NAMESIZE]; /* Username. */ - char ut_id[14]; /* Inittab ID. */ - char ut_line[__UT_LINESIZE]; /* Devicename. */ - short int ut_type; /* Type of login. */ - __pid_t ut_pid; /* Process ID of login process. */ - struct timeval ut_tv; /* Time entry was made. */ - char ut_host[__UT_HOSTSIZE]; /* Hostname for remote login. */ -}; - - -/* Values for the `ut_type' field of a `struct utmpx'. */ -#define EMPTY 0 /* No valid user accounting information. */ - -#define RUN_LVL 1 /* The system's runlevel. */ -#define BOOT_TIME 2 /* Time of system boot. */ -#define NEW_TIME 3 /* Time after system clock changed. */ -#define OLD_TIME 4 /* Time when system clock changed. */ - -#define INIT_PROCESS 5 /* Process spawned by the init process. */ -#define LOGIN_PROCESS 6 /* Session leader of a logged in user. */ -#define USER_PROCESS 7 /* Normal process. */ -#define DEAD_PROCESS 8 /* Terminated process. */ - -#ifdef __USE_GNU -# define ACCOUNTING 9 /* System accounting. */ -#endif - -#define _HAVE_UT_TYPE 1 -#define _HAVE_UT_PID 1 -#define _HAVE_UT_ID 1 -#define _HAVE_UT_TV 1 -#define _HAVE_UT_HOST 1 - diff --git a/sysdeps/unix/sysv/aix/bits/utsname.h b/sysdeps/unix/sysv/aix/bits/utsname.h deleted file mode 100644 index d238f5efda..0000000000 --- a/sysdeps/unix/sysv/aix/bits/utsname.h +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright (C) 1997, 1999 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 _SYS_UTSNAME_H -# error "Never include directly; use instead." -#endif - -#define _UTSNAME_LENGTH 32 diff --git a/sysdeps/unix/sysv/aix/brk.c b/sysdeps/unix/sysv/aix/brk.c deleted file mode 100644 index 66707fe60f..0000000000 --- a/sysdeps/unix/sysv/aix/brk.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -int -__brk (void *addr) -{ - return brk (addr); -} diff --git a/sysdeps/unix/sysv/aix/chdir.c b/sysdeps/unix/sysv/aix/chdir.c deleted file mode 100644 index 153084eb60..0000000000 --- a/sysdeps/unix/sysv/aix/chdir.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -int -__chdir (const char *path) -{ - return chdir (path); -} diff --git a/sysdeps/unix/sysv/aix/chmod.c b/sysdeps/unix/sysv/aix/chmod.c deleted file mode 100644 index 628d09cceb..0000000000 --- a/sysdeps/unix/sysv/aix/chmod.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -int -__chmod (const char *path, mode_t mode) -{ - return chmod (path, mode); -} diff --git a/sysdeps/unix/sysv/aix/chown.c b/sysdeps/unix/sysv/aix/chown.c deleted file mode 100644 index 2b6e82e739..0000000000 --- a/sysdeps/unix/sysv/aix/chown.c +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright (C) 1999, 2000, 2002 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. */ - -#include - -int -__chown (const char *file, uid_t owner, gid_t group) -{ - return chown (file, owner, group); -} -libc_hidden_def (__chown) diff --git a/sysdeps/unix/sysv/aix/chroot.c b/sysdeps/unix/sysv/aix/chroot.c deleted file mode 100644 index 6036fbbffd..0000000000 --- a/sysdeps/unix/sysv/aix/chroot.c +++ /dev/null @@ -1 +0,0 @@ -/* This is a system call. */ diff --git a/sysdeps/unix/sysv/aix/close.c b/sysdeps/unix/sysv/aix/close.c deleted file mode 100644 index 7be595643f..0000000000 --- a/sysdeps/unix/sysv/aix/close.c +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright (C) 1999, 2000, 2002 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. */ - -#include - -int -__close (int fd) -{ - return close (fd); -} -libc_hidden_def (__close) diff --git a/sysdeps/unix/sysv/aix/configure b/sysdeps/unix/sysv/aix/configure deleted file mode 100644 index 2c07b415f6..0000000000 --- a/sysdeps/unix/sysv/aix/configure +++ /dev/null @@ -1,6 +0,0 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! - # Local configure fragment for sysdeps/unix/sysv/aix. - -# Don't bother trying to generate any glue code to be compatible with the -# existing system library, because we are the only system library. -inhibit_glue=yes diff --git a/sysdeps/unix/sysv/aix/configure.in b/sysdeps/unix/sysv/aix/configure.in deleted file mode 100644 index bb783fc0ce..0000000000 --- a/sysdeps/unix/sysv/aix/configure.in +++ /dev/null @@ -1,6 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/unix/sysv/aix. - -# Don't bother trying to generate any glue code to be compatible with the -# existing system library, because we are the only system library. -inhibit_glue=yes diff --git a/sysdeps/unix/sysv/aix/connect.c b/sysdeps/unix/sysv/aix/connect.c deleted file mode 100644 index 2f58be1ede..0000000000 --- a/sysdeps/unix/sysv/aix/connect.c +++ /dev/null @@ -1,11 +0,0 @@ -/* This is a system call. We only have to provide the wrapper. */ -#include - -#undef __connect - -int -__connect (int fd, __CONST_SOCKADDR_ARG addr, socklen_t len) -{ - return connect (fd, addr, len); -} -INTDEF(__connect) diff --git a/sysdeps/unix/sysv/aix/creat.c b/sysdeps/unix/sysv/aix/creat.c deleted file mode 100644 index 6036fbbffd..0000000000 --- a/sysdeps/unix/sysv/aix/creat.c +++ /dev/null @@ -1 +0,0 @@ -/* This is a system call. */ diff --git a/sysdeps/unix/sysv/aix/dl-addr.c b/sysdeps/unix/sysv/aix/dl-addr.c deleted file mode 100644 index b8dbddfe41..0000000000 --- a/sysdeps/unix/sysv/aix/dl-addr.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - Copyright (C) 1996, 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 - 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. */ - -#include -#include -#include - -int -internal_function -_dl_addr (const void *address, Dl_info *info) -{ - return 0; -} - diff --git a/sysdeps/unix/sysv/aix/dl-close.c b/sysdeps/unix/sysv/aix/dl-close.c deleted file mode 100644 index edd45851f6..0000000000 --- a/sysdeps/unix/sysv/aix/dl-close.c +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (C) 2001 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. */ - -#include -#include -#include -#include -#include -#include - -extern int _dl_numso; -extern DL_SODATA *_dl_sotable; - -void -_dl_close (void *handle) -{ - if ((int) handle < 0 || (int) handle >= _dl_numso || _dl_sotable == NULL) - { - errno = EINVAL; - return; - } - - if (_dl_sotable[(int) handle].handle != 0) - __unload (_dl_sotable[(int) handle].handle); - - _dl_sotable[(int) handle].index = 0; - _dl_sotable[(int) handle].dataorg = 0; - _dl_sotable[(int) handle].handle = 0; - _dl_sotable[(int) handle].type = 0; -} - diff --git a/sysdeps/unix/sysv/aix/dl-error.c b/sysdeps/unix/sysv/aix/dl-error.c deleted file mode 100644 index 9c6335b591..0000000000 --- a/sysdeps/unix/sysv/aix/dl-error.c +++ /dev/null @@ -1,20 +0,0 @@ -/* Copyright (C) 2001 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. */ - - -#include diff --git a/sysdeps/unix/sysv/aix/dl-libc.c b/sysdeps/unix/sysv/aix/dl-libc.c deleted file mode 100644 index 69c627c19c..0000000000 --- a/sysdeps/unix/sysv/aix/dl-libc.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Handle loading and unloading shared objects for internal libc purposes. - Copyright (C) 2001 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. */ - -#include -#include -#include - -void * -__libc_dlopen (const char *name) -{ - return _dl_open (name, RTLD_LAZY, NULL); -} - -void * -__libc_dlsym (void *map, const char *name) -{ - return _dl_sym (map, name, NULL); -} - -int -__libc_dlclose (void *map) -{ - _dl_close (map); - return 0; -} diff --git a/sysdeps/unix/sysv/aix/dl-open.c b/sysdeps/unix/sysv/aix/dl-open.c deleted file mode 100644 index 070471d513..0000000000 --- a/sysdeps/unix/sysv/aix/dl-open.c +++ /dev/null @@ -1,133 +0,0 @@ -/* Copyright (C) 1999, 2000, 2001 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. */ - -#include -#include -#include -#include -#include -#include -#include - -#define NUM_SHARED_OBJECTS 32 - -int _dl_numso = NUM_SHARED_OBJECTS; -DL_SODATA *_dl_sotable = NULL; - -void * -_dl_open (const char *file, int mode, const void *caller) -{ - DL_SODATA *new_so; - void *handle; - int entry; - int bsize = _dl_numso * sizeof (DL_INFO); - DL_INFO *dl_info = malloc (bsize); - - if (dl_info == NULL) - return NULL; - - /* 1st time thru initial shared object data table. */ - if (_dl_sotable == NULL) - { - _dl_sotable = (DL_SODATA *) calloc (_dl_numso, sizeof (DL_SODATA)); - if (_dl_sotable == NULL) - return NULL; - - __loadx (DL_POSTLOADQ, dl_info, bsize, NULL); - while (!(dl_info[0].dlinfo_xflags & DL_INFO_OK) - || dl_info[0].dlinfo_arraylen == 0) - { - bsize *= 2; - dl_info = realloc (dl_info, bsize); - if (dl_info == NULL) - return NULL; - - __loadx (DL_POSTLOADQ, dl_info, bsize, NULL); - } - } - - /* Validate mode bits. */ - if (!(mode & RTLD_NOW) && !(mode & RTLD_LAZY)) - { - free (dl_info); - errno = EINVAL; - return NULL; - } - - /* Load the module. */ - handle = (void *) __loadx (DL_LOAD | DL_LOAD_RTL | DL_LOAD_LDX1, - dl_info, bsize, file, NULL); - if (handle == NULL) - { - free (dl_info); - errno = EINVAL; - return NULL; - } - - /* Was dl_info buffer to small to get info. */ - while (!(dl_info[0].dlinfo_xflags & DL_INFO_OK) - || dl_info[0].dlinfo_arraylen == 0) - { - bsize *= 2; - dl_info = realloc (dl_info, bsize); - if (dl_info == NULL) - { - (void) __unload ((void *) handle); - errno = ENOMEM; - return NULL; - } - __loadx (DL_POSTLOADQ | DL_LOAD_RTL, dl_info, bsize, handle); - } - - /* Get an empty entry in the shared object table. */ - for (entry = 0; entry < _dl_numso; ++entry) - if (_dl_sotable[entry].type == 0) - break; - - /* See if the table needs to be increased. */ - if (entry == _dl_numso) - { - new_so = (DL_SODATA *) realloc (_dl_sotable, - _dl_numso * 2 * sizeof (DL_SODATA)); - if (new_so == NULL) - return NULL; - - memset (new_so + _dl_numso, '\0', _dl_numso * sizeof (DL_SODATA)); - _dl_numso *= 2; - _dl_sotable = new_so; - } - - /* See if this is syscall (look for /unix in file). */ - if (strcmp ("/unix", file) == 0) - { - _dl_sotable[entry].index = dl_info[1].dlinfo_index; - _dl_sotable[entry].dataorg = dl_info[1].dlinfo_dataorg; - _dl_sotable[entry].handle = handle; - _dl_sotable[entry].type = DL_UNIX_SYSCALL; - } - else - { - _dl_sotable[entry].index = dl_info[1].dlinfo_index; - _dl_sotable[entry].dataorg = dl_info[1].dlinfo_dataorg; - _dl_sotable[entry].handle = handle; - _dl_sotable[entry].type = DL_GETSYM; - } - - free (dl_info); - return (void *) entry; -} diff --git a/sysdeps/unix/sysv/aix/dl-support.c b/sysdeps/unix/sysv/aix/dl-support.c deleted file mode 100644 index 6172c853d4..0000000000 --- a/sysdeps/unix/sysv/aix/dl-support.c +++ /dev/null @@ -1,20 +0,0 @@ -/* Copyright (C) 2001 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. */ - - -#include diff --git a/sysdeps/unix/sysv/aix/dl-sym.c b/sysdeps/unix/sysv/aix/dl-sym.c deleted file mode 100644 index 3f48b12cd9..0000000000 --- a/sysdeps/unix/sysv/aix/dl-sym.c +++ /dev/null @@ -1,58 +0,0 @@ -/* Copyright (C) 2001 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. */ - -#include -#include -#include -#include -#include -#include - -extern int _dl_numso; -extern DL_SODATA *_dl_sotable; - -void * -_dl_sym (void *handle, const char *symbol, void *who) -{ - void *rt_function; - - if ((int) handle < 0 || (int) handle >= _dl_numso || _dl_sotable == NULL) - { - errno = EINVAL; - return NULL; - } - - switch (_dl_sotable[(int) handle].type) - { - case DL_UNIX_SYSCALL: - rt_function = (void *) __loadx (DL_UNIX_SYSCALL, (void *) symbol); - break; - - case DL_GETSYM: - rt_function = (void *) __loadx (DL_GETSYM, (void *) symbol, - _dl_sotable[(int) handle].index, - _dl_sotable[(int) handle].dataorg); - break; - - default: - errno = EINVAL; - return NULL; - } - - return rt_function; -} diff --git a/sysdeps/unix/sysv/aix/dlldr.h b/sysdeps/unix/sysv/aix/dlldr.h deleted file mode 100644 index e0f3740d26..0000000000 --- a/sysdeps/unix/sysv/aix/dlldr.h +++ /dev/null @@ -1,111 +0,0 @@ -/* Copyright (C) 2001 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. */ - - -/* - - int __loadx(flag, module, arg1, arg2, arg3) - - The __loadx() is a call to ld_loadutil() kernel function, which - does the real work. Note ld_loadutil() is not exported an cannot be - called directly from user space. - - void *ld_loadutil() call is a utility function used for loader extensions - supporting run-time linking and dl*() functions. - - void * - will return the modules entry point if it succeds of NULL - on failure. - - int flag - the flag field performas a dual role: the top 8 bits specify - the work for __loadx() to perform, the bottom 8 bits are - used to pass flags to the work routines, all other bits are - reserved. - -*/ - -#define DL_LOAD 0x1000000 /* __loadx(flag,buf, buf_len, filename, libr_path) */ -#define DL_POSTLOADQ 0x2000000 /* __loadx(flag,buf, buf_len, module_handle) */ -#define DL_EXECQ 0x3000000 /* __loadx(flag,buf, buf_len) */ -#define DL_EXITQ 0x4000000 /* __loadx(flag,buf, buf_len) */ -#define DL_PREUNLOADQ 0x5000000 /* __loadx(flag,buf, buf_len, module_handle) */ -#define DL_INIT 0x6000000 /* __loadx(flag,NULL) */ -#define DL_GETSYM 0x7000000 /* __loadx(flag,symbol, index, modules_data_origin) */ -#define DL_SETDEPEND 0x8000000 /* __loadx(flag,import_data_org, import_index, */ - /* export_data_org, export_index) */ -#define DL_DELDEPEND 0x9000000 /* __loadx(flag,import_data_org, import_index, */ - /* export_data_org, export_index) */ -#define DL_GLOBALSYM 0xA000000 /* __loadx(flag,symbol_name, ptr_to_rec_index, */ - /* ptr_to_rec_data_org) */ -#define DL_UNIX_SYSCALL 0xB000000 /* __loadx(flag,syscall_symbol_name) */ - -#define DL_FUNCTION_MASK 0xFF000000 -#define DL_SRCHDEPENDS 0x00100000 -#define DL_SRCHMODULE 0x00080000 -#define DL_SRCHLOADLIST 0x00040000 -#define DL_LOAD_LDX1 0x00040000 -#define DL_LOAD_RTL 0x00020000 -#define DL_HASHSTRING 0x00020000 -#define DL_INFO_OK 0x00010000 -#define DL_LOAD_DLINFO 0x00010000 -#define DL_UNLOADED 0x00020000 - -typedef union _dl_info -{ - struct { - uint _xflags; /* flag bits in the array */ - uint _size; /* size of this structure */ - uint _arraylen; /* number of following elements */ - } _dl_stat; - struct { - caddr_t _textorg; /* start of loaded program image */ - caddr_t _dataorg; /* start of data instance */ - uint _datasize; /* size of data instance */ - ushort _index; /* index of this le in la_dynlist */ - ushort _mflags; /* info about module from load() */ - } _dl_array; -} DL_INFO; - -#define dlinfo_xflags _dl_stat._xflags -#define dlinfo_arraylen _dl_stat._arraylen -#define dlinfo_size _dl_stat._size - -#define dlinfo_textorg _dl_array._textorg -#define dlinfo_datasize _dl_array._datasize -#define dlinfo_dataorg _dl_array._dataorg -#define dlinfo_index _dl_array._index -#define dlinfo_flags _dl_array._mflags - -#define DL_HAS_RTINIT 0x1 /* indicates the module __rtinit symbols */ -#define DL_IS_NEW 0x2 /* indicates that the module is newly loaded */ - -struct _xArgs -{ - char *libpath; - DL_INFO *info; - uint infosize; -}; - -/* Shared Object DATA used for dl-open,dl-sym & dl-close support */ -typedef struct -{ - void *handle; /* handle for __loadx */ - uint type; /* type of __loadx flag */ - ushort index; /* dlinfo_index */ - caddr_t dataorg; /* dlinfo_dataorg */ -} DL_SODATA; - diff --git a/sysdeps/unix/sysv/aix/environ.c b/sysdeps/unix/sysv/aix/environ.c deleted file mode 100644 index 01e7ba8281..0000000000 --- a/sysdeps/unix/sysv/aix/environ.c +++ /dev/null @@ -1 +0,0 @@ -/* We don't need to define environ, the kernel does it. */ diff --git a/sysdeps/unix/sysv/aix/euidaccess.c b/sysdeps/unix/sysv/aix/euidaccess.c deleted file mode 100644 index c666af5fd0..0000000000 --- a/sysdeps/unix/sysv/aix/euidaccess.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#define ACC_SELF 0 - -int -euidaccess (const char *name, int type) -{ - return accessx (name, type, ACC_SELF); -} diff --git a/sysdeps/unix/sysv/aix/execve.c b/sysdeps/unix/sysv/aix/execve.c deleted file mode 100644 index f8cc07d556..0000000000 --- a/sysdeps/unix/sysv/aix/execve.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -int -__execve (const char *path, char *const argv[], char *const envp[]) -{ - return execve (path, argv, envp); -} diff --git a/sysdeps/unix/sysv/aix/fchdir.c b/sysdeps/unix/sysv/aix/fchdir.c deleted file mode 100644 index 9fe7e8bec9..0000000000 --- a/sysdeps/unix/sysv/aix/fchdir.c +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -int -__fchdir (fd) - int fd; -{ - return fchdir (fd); -} diff --git a/sysdeps/unix/sysv/aix/fchmod.c b/sysdeps/unix/sysv/aix/fchmod.c deleted file mode 100644 index d4f0ac9580..0000000000 --- a/sysdeps/unix/sysv/aix/fchmod.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -int -__fchmod (int fd, mode_t mode) -{ - return fchmod (fd, mode); -} diff --git a/sysdeps/unix/sysv/aix/fchown.c b/sysdeps/unix/sysv/aix/fchown.c deleted file mode 100644 index 64252c038b..0000000000 --- a/sysdeps/unix/sysv/aix/fchown.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -int -__fchown (int fds, uid_t owner, gid_t group) -{ - return fchown (fds, owner, group); -} diff --git a/sysdeps/unix/sysv/aix/fcntl.c b/sysdeps/unix/sysv/aix/fcntl.c deleted file mode 100644 index 7f16cbe013..0000000000 --- a/sysdeps/unix/sysv/aix/fcntl.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright (C) 1999, 2000, 2001, 2002 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. */ - -#include -#include - -extern int kfcntl (int fdes, int cmd, unsigned long int arg); - -int -__fcntl (int fdes, int cmd, ...) -{ - va_list va; - int res; - unsigned long int arg; - - va_start (va, cmd); - arg = va_arg (va, unsigned long int); - - res = kfcntl (fdes, cmd, arg); - - va_end (va); - - return res; -} -libc_hidden_def (__fcntl) -strong_alias (__fcntl, fcntl) -strong_alias (__fcntl, __libc_fcntl) -libc_hidden_def (__libc_fcntl) diff --git a/sysdeps/unix/sysv/aix/fdatasync.c b/sysdeps/unix/sysv/aix/fdatasync.c deleted file mode 100644 index 851f2e5701..0000000000 --- a/sysdeps/unix/sysv/aix/fdatasync.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -#define _FDATASYNC 0x00400000 -#define FDATASYNC _FDATASYNC - -extern int kfsync_range (int fd, int how, long long int off, - long long int len); - -int -fdatasync (int fd) -{ - return kfsync_range (fd, FDATASYNC, 0, 0); -} diff --git a/sysdeps/unix/sysv/aix/fork.c b/sysdeps/unix/sysv/aix/fork.c deleted file mode 100644 index 478d4afad1..0000000000 --- a/sysdeps/unix/sysv/aix/fork.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 1999, 2000, 2002 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. */ - -#include - -#undef __fork - -pid_t -__fork (void) -{ - return kfork (); -} -libc_hidden_def (__fork) -strong_alias (__fork, fork) diff --git a/sysdeps/unix/sysv/aix/fstatfs.c b/sysdeps/unix/sysv/aix/fstatfs.c deleted file mode 100644 index 3f531f2a84..0000000000 --- a/sysdeps/unix/sysv/aix/fstatfs.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -extern int fstatfs (int fd, struct statfs *buf); - -int -__fstatfs (int fd, struct statfs *buf) -{ - return fstatfs (fd, buf); -} diff --git a/sysdeps/unix/sysv/aix/fsync.c b/sysdeps/unix/sysv/aix/fsync.c deleted file mode 100644 index 58734b6e89..0000000000 --- a/sysdeps/unix/sysv/aix/fsync.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -#define _FSYNC 0x00000010 -#define FFILESYNC _FSYNC - -extern int kfsync_range (int fd, int how, long long int off, - long long int len); - -int -fsync (int fd) -{ - return kfsync_range (fd, FFILESYNC, 0, 0); -} diff --git a/sysdeps/unix/sysv/aix/ftruncate.c b/sysdeps/unix/sysv/aix/ftruncate.c deleted file mode 100644 index 758f2a423b..0000000000 --- a/sysdeps/unix/sysv/aix/ftruncate.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -extern int kftruncate (int fd, long long int length); - -int -__ftruncate (int fd, off_t length) -{ - return kftruncate (fd, length); -} -strong_alias (__ftruncate, ftruncate) diff --git a/sysdeps/unix/sysv/aix/ftruncate64.c b/sysdeps/unix/sysv/aix/ftruncate64.c deleted file mode 100644 index 5e7e4be4ca..0000000000 --- a/sysdeps/unix/sysv/aix/ftruncate64.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 1999, 2000, 2001 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. */ - -#include - -extern int kftruncate (int fd, long long int length); - -int -__ftruncate64 (int fd, off64_t length) -{ - return kftruncate (fd, length); -} -weak_alias (__ftruncate64, ftruncate64) diff --git a/sysdeps/unix/sysv/aix/fxstat.c b/sysdeps/unix/sysv/aix/fxstat.c deleted file mode 100644 index 1ba56f690f..0000000000 --- a/sysdeps/unix/sysv/aix/fxstat.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright (C) 1999, 2000, 2002 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. */ - -#include -#include - -#define STX_NORMAL 0x00 - -extern int fstatx (int fd, struct stat *st, int len, int cmd); - -int -__fxstat (int ver, int fd, struct stat *st) -{ - assert (ver == 0); - return fstatx (fd, st, sizeof (*st), STX_NORMAL); -} -hidden_def (__fxstat) diff --git a/sysdeps/unix/sysv/aix/fxstat64.c b/sysdeps/unix/sysv/aix/fxstat64.c deleted file mode 100644 index 5f75e070c4..0000000000 --- a/sysdeps/unix/sysv/aix/fxstat64.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (C) 1999, 2000, 2002 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. */ - -#include -#include - -#define STX_NORMAL 0x00 -#define STX_64 0x08 - -extern int fstatx (int fd, struct stat64 *st, int len, int cmd); - -int -__fxstat64 (int ver, int fd, struct stat64 *st) -{ - assert (ver == 0); - return fstatx (fd, st, sizeof (*st), STX_NORMAL | STX_64); -} -hidden_def (__fxstat64) diff --git a/sysdeps/unix/sysv/aix/getdents.c b/sysdeps/unix/sysv/aix/getdents.c deleted file mode 100644 index ca896c3323..0000000000 --- a/sysdeps/unix/sysv/aix/getdents.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include -#include - -extern int getdirent (int fd, char *buf, size_t count); - -ssize_t -__getdents (int fd, char *buf, size_t count) -{ - return getdirent (fd, buf, count); -} diff --git a/sysdeps/unix/sysv/aix/getegid.c b/sysdeps/unix/sysv/aix/getegid.c deleted file mode 100644 index c24692502c..0000000000 --- a/sysdeps/unix/sysv/aix/getegid.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -#define ID_EFFECTIVE 0x01 - - -gid_t -__getegid (void) -{ - return getgidx (ID_EFFECTIVE); -} -strong_alias (__getegid, getegid) diff --git a/sysdeps/unix/sysv/aix/geteuid.c b/sysdeps/unix/sysv/aix/geteuid.c deleted file mode 100644 index b0722134b4..0000000000 --- a/sysdeps/unix/sysv/aix/geteuid.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -#define ID_EFFECTIVE 0x01 - - -uid_t -__geteuid (void) -{ - return getuidx (ID_EFFECTIVE); -} -strong_alias (__geteuid, geteuid) diff --git a/sysdeps/unix/sysv/aix/getgid.c b/sysdeps/unix/sysv/aix/getgid.c deleted file mode 100644 index 8b102b137f..0000000000 --- a/sysdeps/unix/sysv/aix/getgid.c +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -#define ID_REAL 2 - -extern gid_t getgidx (int which); - -gid_t -__getgid (void) -{ - return getgidx (ID_REAL); -} -strong_alias (__getgid, getgid) diff --git a/sysdeps/unix/sysv/aix/getgroups.c b/sysdeps/unix/sysv/aix/getgroups.c deleted file mode 100644 index f7c813b190..0000000000 --- a/sysdeps/unix/sysv/aix/getgroups.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -int -__getgroups (int size, gid_t list[]) -{ - return getgroups (size, list); -} diff --git a/sysdeps/unix/sysv/aix/gethostname.c b/sysdeps/unix/sysv/aix/gethostname.c deleted file mode 100644 index a42384059c..0000000000 --- a/sysdeps/unix/sysv/aix/gethostname.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 1999, 2000, 2001 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. */ - -#include - -int -__gethostname (name, len) - char *name; - size_t len; -{ - return gethostname (name, len); -} diff --git a/sysdeps/unix/sysv/aix/getpeername.c b/sysdeps/unix/sysv/aix/getpeername.c deleted file mode 100644 index bec9bac2ae..0000000000 --- a/sysdeps/unix/sysv/aix/getpeername.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2000, 2001 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. */ - -#include - -extern int ngetpeername (int s, void *uap_asa, int *uap_alen); - -int -getpeername (int fd, __SOCKADDR_ARG addr, socklen_t *len) -{ - return ngetpeername (fd, addr.__sockaddr__, len); -} -weak_alias (getpeername,__getpeername) diff --git a/sysdeps/unix/sysv/aix/getpgid.c b/sysdeps/unix/sysv/aix/getpgid.c deleted file mode 100644 index a6e75f3f9c..0000000000 --- a/sysdeps/unix/sysv/aix/getpgid.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 1999, 2000, 2002 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. */ - -#include - -extern int kgetpgidx (pid_t pid); - -int -__getgpid (pid_t pid) -{ - return kgetpgidx (pid); -} -libc_hidden_def (__getgpid) -strong_alias (__getpgid, getpgid) diff --git a/sysdeps/unix/sysv/aix/getpgrp.c b/sysdeps/unix/sysv/aix/getpgrp.c deleted file mode 100644 index ce37738beb..0000000000 --- a/sysdeps/unix/sysv/aix/getpgrp.c +++ /dev/null @@ -1 +0,0 @@ -/* This function is available as a system call. */ diff --git a/sysdeps/unix/sysv/aix/getpid.c b/sysdeps/unix/sysv/aix/getpid.c deleted file mode 100644 index 8a74e22da7..0000000000 --- a/sysdeps/unix/sysv/aix/getpid.c +++ /dev/null @@ -1,9 +0,0 @@ -/* This is a system call. We only have to provide the wrapper. */ -#include - -int -__getpid (void) -{ - return getpid (); -} -libc_hidden_def (__getpid) diff --git a/sysdeps/unix/sysv/aix/getppid.c b/sysdeps/unix/sysv/aix/getppid.c deleted file mode 100644 index 6036fbbffd..0000000000 --- a/sysdeps/unix/sysv/aix/getppid.c +++ /dev/null @@ -1 +0,0 @@ -/* This is a system call. */ diff --git a/sysdeps/unix/sysv/aix/getpriority.c b/sysdeps/unix/sysv/aix/getpriority.c deleted file mode 100644 index 6036fbbffd..0000000000 --- a/sysdeps/unix/sysv/aix/getpriority.c +++ /dev/null @@ -1 +0,0 @@ -/* This is a system call. */ diff --git a/sysdeps/unix/sysv/aix/getrlimit.c b/sysdeps/unix/sysv/aix/getrlimit.c deleted file mode 100644 index 0699cec644..0000000000 --- a/sysdeps/unix/sysv/aix/getrlimit.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -int -__getrlimit (enum __rlimit_resource resource, struct rlimit *rlimits) -{ - return getrlimit (resource, rlimits); -} diff --git a/sysdeps/unix/sysv/aix/getrlimit64.c b/sysdeps/unix/sysv/aix/getrlimit64.c deleted file mode 100644 index dd33ca9c73..0000000000 --- a/sysdeps/unix/sysv/aix/getrlimit64.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -int -__getrlimit64 (enum __rlimit_resource resource, struct rlimit64 *rlimits) -{ - return getrlimit64 (resource, rlimits); -} diff --git a/sysdeps/unix/sysv/aix/getrusage.c b/sysdeps/unix/sysv/aix/getrusage.c deleted file mode 100644 index b578b75aa7..0000000000 --- a/sysdeps/unix/sysv/aix/getrusage.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -int -__getrusage (who, usage) - enum __rusage_who who; - struct rusage *usage; -{ - return getrusage (who, usage); -} diff --git a/sysdeps/unix/sysv/aix/getsid.c b/sysdeps/unix/sysv/aix/getsid.c deleted file mode 100644 index 6994eb8dda..0000000000 --- a/sysdeps/unix/sysv/aix/getsid.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -extern int kgetsid (pid_t pid); - -int -getsid (pid_t pid) -{ - return kgetsid (pid); -} diff --git a/sysdeps/unix/sysv/aix/getsockname.c b/sysdeps/unix/sysv/aix/getsockname.c deleted file mode 100644 index ac1bf34fcb..0000000000 --- a/sysdeps/unix/sysv/aix/getsockname.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 2000, 2002 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. */ - -#include - -extern int ngetsockname (int s, void *uap_asa, int *uap_alen); - -int -__getsockname (int fd, __SOCKADDR_ARG addr, socklen_t *len) -{ - return ngetsockname (fd, addr.__sockaddr__, len); -} - -weak_alias (__getsockname, getsockname) diff --git a/sysdeps/unix/sysv/aix/gettimeofday.c b/sysdeps/unix/sysv/aix/gettimeofday.c deleted file mode 100644 index 34a92eb391..0000000000 --- a/sysdeps/unix/sysv/aix/gettimeofday.c +++ /dev/null @@ -1,98 +0,0 @@ -/* Copyright (C) 1991,92,94,95,96,97,2001,2002 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. */ - -#include -#include -#include - -#ifndef HAVE_GNU_LD -# define __daylight daylight -# define __timezone timezone -# define __tzname tzname -#endif - -#undef __gettimeofday - -extern int rtc_upper (void); -extern int rtc_lower (void); - -/* Assembler Routines to access the timer registers */ -asm("\n\ -.rtc_upper: mfspr 3,4 # copy RTCU to return register\n\ - blr\n\ -\n\ -.rtc_lower: mfspr 3,5 # copy RTCL to return register\n\ - blr\n\ -"); - -/* Get the current time of day and timezone information, - putting it into *TV and *TZ. If TZ is NULL, *TZ is not filled. - Returns 0 on success, -1 on errors. */ -int -__gettimeofday (tv, tz) - struct timeval *tv; - struct timezone *tz; -{ - int ts, tl, tu; - - if (tv == NULL) - { - __set_errno (EINVAL); - return -1; - } - - ts = rtc_upper (); /* Seconds. */ - tl = rtc_lower (); /* Nanoseconds. */ - tu = rtc_upper (); /* Check for a carry from. */ - if (ts != tu) /* The lower reg to the upper. */ - tl = rtc_lower (); /* Recover from the race condition. */ - - tv->tv_sec = (long int) (tu + (double) tl / 1000000000); - tv->tv_usec = (long int) ((double) tl / 1000); - - if (tz != NULL) - { - const time_t timer = tv->tv_sec; - struct tm tm; - const struct tm *tmp; - - const long int save_timezone = __timezone; - const long int save_daylight = __daylight; - char *save_tzname[2]; - save_tzname[0] = __tzname[0]; - save_tzname[1] = __tzname[1]; - - tmp = localtime_r (&timer, &tm); - - tz->tz_minuteswest = __timezone / 60; - tz->tz_dsttime = __daylight; - - __timezone = save_timezone; - __daylight = save_daylight; - __tzname[0] = save_tzname[0]; - __tzname[1] = save_tzname[1]; - - if (tmp == NULL) - return -1; - } - - return 0; -} - -INTDEF(__gettimeofday) -weak_alias (__gettimeofday, gettimeofday) diff --git a/sysdeps/unix/sysv/aix/getuid.c b/sysdeps/unix/sysv/aix/getuid.c deleted file mode 100644 index e042666fe9..0000000000 --- a/sysdeps/unix/sysv/aix/getuid.c +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -#define ID_REAL 2 - -extern uid_t getuidx (int which); - -uid_t -__getuid (void) -{ - return getuidx (ID_REAL); -} -strong_alias (__getuid, getuid) diff --git a/sysdeps/unix/sysv/aix/gnu/lib-names.h b/sysdeps/unix/sysv/aix/gnu/lib-names.h deleted file mode 100644 index d41f822f16..0000000000 --- a/sysdeps/unix/sysv/aix/gnu/lib-names.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef __GNU_LIB_NAMES_H -#define __GNU_LIB_NAMES_H 1 - -#define LIBBROKENLOCALE_SO "libBrokenLocale.a" -#define LIBCRYPT_SO "libcrypt.a" -#define LIBC_SO "libc.a" -#define LIBDB1_SO "libdb1.a" -#define LIBDB_SO "libdb.a" -#define LIBDL_SO "libdl.a" -#define LIBM_SO "libm.a" -#define LIBNOVERSION_SO "libNoVersion.a" -#define LIBNSL_SO "libnsl.a" -#define LIBNSS1_COMPAT_SO "libnss1_compat.a" -#define LIBNSS1_DB_SO "libnss1_db.a" -#define LIBNSS1_DNS_SO "libnss1_dns.a" -#define LIBNSS1_FILES_SO "libnss1_files.a" -#define LIBNSS1_NIS_SO "libnss1_nis.a" -#define LIBNSS_COMPAT_SO "libnss_compat.a" -#define LIBNSS_DB_SO "libnss_db.a" -#define LIBNSS_DNS_SO "libnss_dns.a" -#define LIBNSS_FILES_SO "libnss_files.a" -#define LIBNSS_HESIOD_SO "libnss_hesiod.a" -#define LIBNSS_LDAP_SO "libnss_ldap.a" -#define LIBNSS_NISPLUS_SO "libnss_nisplus.a" -#define LIBNSS_NIS_SO "libnss_nis.a" -#define LIBPTHREAD_SO "libpthread.a" -#define LIBRESOLV_SO "libresolv.a" -#define LIBRT_SO "librt.a" -#define LIBUTIL_SO "libutil.a" - -#endif /* gnu/lib-names.h */ diff --git a/sysdeps/unix/sysv/aix/init-first.c b/sysdeps/unix/sysv/aix/init-first.c deleted file mode 100644 index 24ef109dd2..0000000000 --- a/sysdeps/unix/sysv/aix/init-first.c +++ /dev/null @@ -1,103 +0,0 @@ -/* Initialization code run first thing by the XCOFF startup code. AIX version. - Copyright (C) 2001, 2002 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. */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef SHARED -# include -# include "dl-osinfo.h" -#endif - -extern void __libc_init (int, char **, char **); - -/* The function is called from assembly stubs the compiler can't see. */ -static void init (int, char **, char **) __attribute__ ((unused)); - -/* Set nonzero if we have to be prepared for more then one libc being - used in the process. Safe assumption if initializer never runs. */ -int __libc_multiple_libcs attribute_hidden = 1; - -/* Remember the command line argument and enviroment contents for - later calls of initializers for dynamic libraries. */ -int __libc_argc attribute_hidden; -char **__libc_argv attribute_hidden; - - -static void -init (int argc, char **argv, char **envp) -{ -#ifdef USE_NONOPTION_FLAGS - extern void __getopt_clean_environment (char **); -#endif - /* The next variable is only here to work around a bug in gcc <= 2.7.2.2. - If the address would be taken inside the expression the optimizer - would try to be too smart and throws it away. Grrr. */ - - /* XXX disable dl for now - __libc_multiple_libcs = &_dl_starting_up && !_dl_starting_up; */ - - /* Save the command-line arguments. */ - __libc_argc = argc; - __libc_argv = argv; - __environ = envp; - -#ifndef SHARED - __libc_init_secure (); -#endif - - __libc_init (argc, argv, envp); - -#ifdef USE_NONOPTION_FLAGS - /* This is a hack to make the special getopt in GNU libc working. */ - __getopt_clean_environment (envp); -#endif - -#ifdef SHARED - __libc_global_ctors (); -#endif -} - -#ifdef SHARED - -strong_alias (init, _init); - -extern void __libc_init_first (void); - -void -__libc_init_first (void) -{ -} - -#else -extern void __libc_init_first (int argc, char **argv, char **envp); - -void -__libc_init_first (int argc, char **argv, char **envp) -{ - init (argc, argv, envp); -} -#endif diff --git a/sysdeps/unix/sysv/aix/ioctl.c b/sysdeps/unix/sysv/aix/ioctl.c deleted file mode 100644 index f47b699be4..0000000000 --- a/sysdeps/unix/sysv/aix/ioctl.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include -#include - -extern int kioctl (int fdes, int cmd, unsigned long int arg, - unsigned long int ext); - -int -__ioctl (int fdes, unsigned long int cmd, ...) -{ - va_list va; - int res; - unsigned long int arg; - unsigned long int ext; - - va_start (va, cmd); - arg = va_arg (va, unsigned long int); - ext = va_arg (va, unsigned long int); - - res = kioctl (fdes, cmd, arg, ext); - - va_end (va); - - return res; -} -strong_alias (__ioctl, ioctl) diff --git a/sysdeps/unix/sysv/aix/kernel_proto.h b/sysdeps/unix/sysv/aix/kernel_proto.h deleted file mode 100644 index e9ad06dc3a..0000000000 --- a/sysdeps/unix/sysv/aix/kernel_proto.h +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (C) 1999 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 1999. - - 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. */ - -/* This file contains prototypes for the "functions" exported by /unix - on AIX. */ -#include - - -extern ssize_t kwrite (int, const void *, size_t); diff --git a/sysdeps/unix/sysv/aix/kill.c b/sysdeps/unix/sysv/aix/kill.c deleted file mode 100644 index 8538e29f81..0000000000 --- a/sysdeps/unix/sysv/aix/kill.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -int -__kill (pid_t pid, int sig) -{ - return kill (pid, sig); -} diff --git a/sysdeps/unix/sysv/aix/lchown.c b/sysdeps/unix/sysv/aix/lchown.c deleted file mode 100644 index 44e3b749e4..0000000000 --- a/sysdeps/unix/sysv/aix/lchown.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -int -__lchown (const char *file, uid_t owner, gid_t group) -{ - return lchown (file, owner, group); -} diff --git a/sysdeps/unix/sysv/aix/libc-start.c b/sysdeps/unix/sysv/aix/libc-start.c deleted file mode 100644 index 813e28d09b..0000000000 --- a/sysdeps/unix/sysv/aix/libc-start.c +++ /dev/null @@ -1,290 +0,0 @@ -/* Initialization code run first thing by the XCOFF startup code. AIX version. - Copyright (C) 2001, 2002 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. */ - -#include -#include -#include - -/* hack to use uchar's */ -typedef unsigned char uchar; -#include -#include -#include -#include - -extern void __libc_init_first (int argc, char **argv, char **envp); - -/* XXX disable for now -extern int __libc_multiple_libcs; */ - -/* XXX normally defined in generic/dl-sydep.c, hack it into existance -extern void *__libc_stack_end; */ -void *__libc_stack_end; - - struct __libc_start_data_rec { - void *stack; - void *toc; - int argc; - char **argv; - char **envp; - char *data; - char *text; - unsigned mcount; - unsigned special; - int (*main)(int, char **, char **); - void (*init)(void); - void (*fini)(void); - void (*rtld_fini)(void); - }; - -extern struct __libc_start_data_rec __libc_start_data; -extern int errno; - -/* The first piece of initialized data. */ -int __data_start = 0; - -#ifndef HAVE_ELF -/* Since gcc/crtstuff.c won't define it unless the ELF format is used - we will need to define it here. */ -void *__dso_handle = NULL; -#endif - -/* AIX kernel function */ -extern int __loadx (int flag, void *module, void *arg1, void *arg2, - void *arg3); -/* Needed by setenv */ -char **__environ; - -/* - * Find __rtinit symbol - * - * __RTINIT *find_rtinit() - * - * __RTINIT *rti - pointer to __rtinit data structure - */ - -static __RTINIT * -find_rtinit (void) -{ - struct xcoffhdr *xcoff_hdr; - SCNHDR *sec_hdr; - SCNHDR *ldr_sec_hdr; - SCNHDR *data_sec_hdr; - LDSYM *ldsym_hdr; - __RTINIT *rtl; - - xcoff_hdr = (struct xcoffhdr *) __libc_start_data.text; - sec_hdr = (SCNHDR *) ((caddr_t) &xcoff_hdr->aouthdr - + xcoff_hdr->filehdr.f_opthdr); - ldr_sec_hdr = (SCNHDR *) (sec_hdr + (xcoff_hdr->aouthdr.o_snloader - 1)); - ldsym_hdr = (LDSYM *) ((caddr_t) xcoff_hdr + ldr_sec_hdr->s_scnptr - + LDHDRSZ); - - if (__libc_start_data.mcount <= 0) - { - if (!ldr_sec_hdr->s_scnptr) - return NULL; - - if (memcmp (ldsym_hdr, RTINIT_NAME, sizeof(RTINIT_NAME) - 1) != 0) - return NULL; - } - - data_sec_hdr = (SCNHDR *) (sec_hdr + (xcoff_hdr->aouthdr.o_sndata - 1)); - rtl = (__RTINIT *) (ldsym_hdr->l_value - + (__libc_start_data.data - data_sec_hdr->s_vaddr)); - return rtl; -} - -/* The mod_init1 calls every initialization function - for a given module. - - void mod_init1(handler, rti) - - void *handler - if NULL init funtions for modules loaded at exec time - are being executed. Otherwise, the handler points to the - module loaded. - - __RTINIT *rti - pointer to __rtinit data structure (with rti->init_offset - not equal to zero) - */ - -static void -mod_init1 (void *handler,__RTINIT *rtl) -{ - __RTINIT_DESCRIPTOR *descriptor; - - descriptor = (__RTINIT_DESCRIPTOR *) ((caddr_t) &rtl->rtl - + rtl->init_offset); - while (descriptor->f != NULL) - { - if (!(descriptor->flags & _RT_CALLED)) - { - descriptor->flags |= _RT_CALLED; - /* Execute init/fini. */ - descriptor->f (handler, rtl, descriptor); - } - descriptor = (__RTINIT_DESCRIPTOR *) ((caddr_t) descriptor - + rtl->__rtinit_descriptor_size); - } -} - -/* The modinit() function performs run-time linking, if enabled, and calling - the init() function for all loaded modules. - - int modinit() - */ - -#define DL_BUFFER_SIZE 1000 - -static int -modinit (void) -{ - int *handler = NULL; - __RTINIT *rtinit_info = NULL; - int flag; - DL_INFO dl_buffer[DL_BUFFER_SIZE]; - DL_INFO *dl_info = dl_buffer; - int i; - - /* Find __rtinit symbols */ - rtinit_info = find_rtinit (); - - flag = DL_EXECQ; - if (rtinit_info && rtinit_info->rtl) - flag |= DL_LOAD_RTL; - - /* Get a list of modules that have __rtinit. */ - if (__loadx (flag, dl_info, (void *) sizeof (dl_buffer), NULL, NULL)) - exit (0x90); - - if (( dl_info[0].dlinfo_xflags & DL_INFO_OK)) - { - rtinit_info = find_rtinit (); - if ((rtinit_info != NULL) & (rtinit_info->rtl != NULL)) - { - if ((*rtinit_info->rtl) (dl_info, 0)) - exit (0x90); - } - } - - /* Initialization each module loaded that has __rtinit. */ - if (dl_info[0].dlinfo_xflags & DL_INFO_OK) - { - for (i = 1; i < dl_info[0].dlinfo_arraylen + 1; ++i) - if (dl_info[i].dlinfo_flags & DL_HAS_RTINIT) - { - rtinit_info = find_rtinit (); - if (rtinit_info) - mod_init1 (handler, rtinit_info); - } - } - - return 0; -} - - -void -__libc_start_init (void) -{ - /* Do run-time linking, if enabled and call the init() - for all loaded modules. */ - if (__libc_start_data.mcount != __libc_start_data.special) - modinit (); -} - -/* For now these are just stubs. */ -void -__libc_start_fini (void) -{ -} - -void -__libc_start_rtld_fini (void) -{ -} - -void -__libc_start_main (void) -{ -#ifndef SHARED - - /* The next variable is only here to work around a bug in gcc <= 2.7.2.2. - If the address would be taken inside the expression the optimizer - would try to be too smart and throws it away. Grrr. */ - - /* XXX disable for now - int *dummy_addr = &_dl_starting_up; - - __libc_multiple_libcs = dummy_addr && !_dl_starting_up; */ -#endif - - /* Store the lowest stack address. */ - __libc_stack_end = __libc_start_data.stack; - - /* Used by setenv */ - __environ = __libc_start_data.envp; - -#ifndef SHARED - /* Clear errno. */ - errno = 0; - - /* Some security at this point. Prevent starting a SUID binary where - the standard file descriptors are not opened. We have to do this - only for statically linked applications since otherwise the dynamic - loader did the work already. */ - if (__builtin_expect (__libc_enable_secure, 0)) - __libc_check_standard_fds (); - -#endif - - /* Register the destructor of the dynamic linker if there is any. */ - if (__builtin_expect (__libc_start_data.rtld_fini != NULL, 1)) - __cxa_atexit ((void (*) (void *)) __libc_start_data.rtld_fini, NULL, NULL); - - /* Call the initializer of the libc. This is only needed here if we - are compiling for the static library in which case we haven't - run the constructors in `_dl_start_user'. */ -#ifndef SHARED - __libc_init_first (__libc_start_data.argc, __libc_start_data.argv, - __libc_start_data.envp); -#endif - - /* Register the destructor of the program, if any. */ - if (__libc_start_data.fini) - __cxa_atexit ((void (*) (void *)) __libc_start_data.fini, NULL, NULL); - - /* Call the initializer of the program, if any. */ -#ifdef SHARED - if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_IMPCALLS, 0)) - _dl_debug_printf ("\ninitialize program: %s\n\n", - __libc_start_data.argv[0]); -#endif - if (__libc_start_data.init) - (*__libc_start_data.init) (); - -#ifdef SHARED - if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_IMPCALLS, 0)) - _dl_debug_printf ("\ntransferring control: %s\n\n", - __libc_start_data.argv[0]); -#endif - - exit ((*__libc_start_data.main) (__libc_start_data.argc, - __libc_start_data.argv, - __libc_start_data.envp)); -} diff --git a/sysdeps/unix/sysv/aix/link.c b/sysdeps/unix/sysv/aix/link.c deleted file mode 100644 index 2cacbebc37..0000000000 --- a/sysdeps/unix/sysv/aix/link.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 1997, 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 - 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. */ - -#include - -int -__link (from, to) - const char *from; - const char *to; -{ - return link (from, to); -} diff --git a/sysdeps/unix/sysv/aix/lockf.c b/sysdeps/unix/sysv/aix/lockf.c deleted file mode 100644 index 4a8c14fd6e..0000000000 --- a/sysdeps/unix/sysv/aix/lockf.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -extern int klockf (int fd, int function, long long int size); - -int -lockf (int fd, int cmd, off_t len) -{ - return klockf (fd, cmd, len); -} diff --git a/sysdeps/unix/sysv/aix/lockf64.c b/sysdeps/unix/sysv/aix/lockf64.c deleted file mode 100644 index 529c2b4473..0000000000 --- a/sysdeps/unix/sysv/aix/lockf64.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -extern int klockf (int fd, int function, long long int size); - -int -lockf64 (int fd, int cmd, off64_t len) -{ - return klockf (fd, cmd, len); -} diff --git a/sysdeps/unix/sysv/aix/lseek.c b/sysdeps/unix/sysv/aix/lseek.c deleted file mode 100644 index d4cbdbe702..0000000000 --- a/sysdeps/unix/sysv/aix/lseek.c +++ /dev/null @@ -1,10 +0,0 @@ -/* This is a system call. We only have to provide the wrapper. */ -#include - -off_t -__lseek (int fd, off_t offset, int whence) -{ - return lseek (fd, offset, whence); -} -strong_alias (__lseek, __libc_lseek) -libc_hidden_def (__lseek) diff --git a/sysdeps/unix/sysv/aix/lseek64.c b/sysdeps/unix/sysv/aix/lseek64.c deleted file mode 100644 index 5892663d8f..0000000000 --- a/sysdeps/unix/sysv/aix/lseek64.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -extern int klseek (int fd, long long int offset, int sbase, - long long int *new_offp); - -off64_t -__libc_lseek64 (int fd, off64_t offset, int whence) -{ - long long int res; - - if (klseek (fd, offset, whence, &res) < 0) - res = -1ll; - - return res; -} -strong_alias (__libc_lseek64, __lseek64) -strong_alias (__libc_lseek64, lseek64) diff --git a/sysdeps/unix/sysv/aix/lxstat.c b/sysdeps/unix/sysv/aix/lxstat.c deleted file mode 100644 index 879e80cbe8..0000000000 --- a/sysdeps/unix/sysv/aix/lxstat.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright (C) 1999, 2000, 2002 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. */ - -#include -#include - -#define STX_LINK 0x01 - -extern int statx (const char *pathname, struct stat *st, int len, int cmd); - -int -__lxstat (int ver, const char *pathname, struct stat *st) -{ - assert (ver == 0); - return statx (pathname, st, sizeof (*st), STX_LINK); -} -hidden_def (__lxstat) diff --git a/sysdeps/unix/sysv/aix/lxstat64.c b/sysdeps/unix/sysv/aix/lxstat64.c deleted file mode 100644 index 73324fe55b..0000000000 --- a/sysdeps/unix/sysv/aix/lxstat64.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (C) 1999, 2000, 2002 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. */ - -#include -#include - -#define STX_LINK 0x01 -#define STX_64 0x08 - -extern int statx (const char *pathname, struct stat64 *st, int len, int cmd); - -int -__lxstat64 (int ver, const char *pathname, struct stat64 *st) -{ - assert (ver == 0); - return statx (pathname, st, sizeof (*st), STX_LINK | STX_64); -} -hidden_def (__lxstat64) diff --git a/sysdeps/unix/sysv/aix/madvise.c b/sysdeps/unix/sysv/aix/madvise.c deleted file mode 100644 index 6036fbbffd..0000000000 --- a/sysdeps/unix/sysv/aix/madvise.c +++ /dev/null @@ -1 +0,0 @@ -/* This is a system call. */ diff --git a/sysdeps/unix/sysv/aix/mkdir.c b/sysdeps/unix/sysv/aix/mkdir.c deleted file mode 100644 index 4a4e5ceefe..0000000000 --- a/sysdeps/unix/sysv/aix/mkdir.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -int -__mkdir (const char *name, mode_t mode) -{ - return mkdir (name, mode); -} diff --git a/sysdeps/unix/sysv/aix/mknod.c b/sysdeps/unix/sysv/aix/mknod.c deleted file mode 100644 index 8ed3d6b53e..0000000000 --- a/sysdeps/unix/sysv/aix/mknod.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -int -__mknod (path, mode, device) - const char *path; - mode_t mode; - dev_t device; -{ - return mknod (path, mode, device); -} diff --git a/sysdeps/unix/sysv/aix/mmap.c b/sysdeps/unix/sysv/aix/mmap.c deleted file mode 100644 index cd967d36bc..0000000000 --- a/sysdeps/unix/sysv/aix/mmap.c +++ /dev/null @@ -1,9 +0,0 @@ -/* This is a system call. We only have to provide the wrapper. */ -#include -#include - -void * -__mmap (void *addr, size_t len, int prot, int flags, int fd, off_t offset) -{ - return mmap (addr, len, prot, flags, fd, offset); -} diff --git a/sysdeps/unix/sysv/aix/mmap64.c b/sysdeps/unix/sysv/aix/mmap64.c deleted file mode 100644 index ae70ef4acb..0000000000 --- a/sysdeps/unix/sysv/aix/mmap64.c +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include -#include - -extern int kmmap (void *addr, size_t len, int prot, int flags, int fd, - long long int offset); - -void * -__mmap64 (void *addr, size_t len, int prot, int flags, int fd, off64_t offset) -{ - return kmmap (addr, len, prot, flags, fd, offset); -} -strong_alias (__mmap64, mmap64) diff --git a/sysdeps/unix/sysv/aix/mprotect.c b/sysdeps/unix/sysv/aix/mprotect.c deleted file mode 100644 index 8bf95abb0e..0000000000 --- a/sysdeps/unix/sysv/aix/mprotect.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -int -__mprotect (void *addr, size_t len, int prot) -{ - return mprotect (addr, len, prot); -} diff --git a/sysdeps/unix/sysv/aix/msgctl.c b/sysdeps/unix/sysv/aix/msgctl.c deleted file mode 100644 index 6036fbbffd..0000000000 --- a/sysdeps/unix/sysv/aix/msgctl.c +++ /dev/null @@ -1 +0,0 @@ -/* This is a system call. */ diff --git a/sysdeps/unix/sysv/aix/msgget.c b/sysdeps/unix/sysv/aix/msgget.c deleted file mode 100644 index 6036fbbffd..0000000000 --- a/sysdeps/unix/sysv/aix/msgget.c +++ /dev/null @@ -1 +0,0 @@ -/* This is a system call. */ diff --git a/sysdeps/unix/sysv/aix/msgrcv.c b/sysdeps/unix/sysv/aix/msgrcv.c deleted file mode 100644 index 6036fbbffd..0000000000 --- a/sysdeps/unix/sysv/aix/msgrcv.c +++ /dev/null @@ -1 +0,0 @@ -/* This is a system call. */ diff --git a/sysdeps/unix/sysv/aix/msgsnd.c b/sysdeps/unix/sysv/aix/msgsnd.c deleted file mode 100644 index 6036fbbffd..0000000000 --- a/sysdeps/unix/sysv/aix/msgsnd.c +++ /dev/null @@ -1 +0,0 @@ -/* This is a system call. */ diff --git a/sysdeps/unix/sysv/aix/msync.c b/sysdeps/unix/sysv/aix/msync.c deleted file mode 100644 index 6036fbbffd..0000000000 --- a/sysdeps/unix/sysv/aix/msync.c +++ /dev/null @@ -1 +0,0 @@ -/* This is a system call. */ diff --git a/sysdeps/unix/sysv/aix/munmap.c b/sysdeps/unix/sysv/aix/munmap.c deleted file mode 100644 index 7f583be358..0000000000 --- a/sysdeps/unix/sysv/aix/munmap.c +++ /dev/null @@ -1,8 +0,0 @@ -/* This is a system call. We only have to provide the wrapper. */ -#include - -int -__munmap (void *addr, size_t len) -{ - return munmap (addr, len); -} diff --git a/sysdeps/unix/sysv/aix/nanosleep.c b/sysdeps/unix/sysv/aix/nanosleep.c deleted file mode 100644 index 842275f77a..0000000000 --- a/sysdeps/unix/sysv/aix/nanosleep.c +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (C) 2000, 2002 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. */ - -#include -#include -#include - -struct timestruc_t -{ - time_t tv_sec; /* seconds. */ - suseconds_t tv_nsec; /* and nanoseconds. */ -}; - - -extern int _nsleep (struct timestruc_t *rqtp, struct timestruc_t *rmtp); - -int -__libc_nanosleep (const struct timespec *req, struct timespec *rem) -{ - assert (sizeof (struct timestruc_t) == sizeof (*req)); - return _nsleep ((struct timestruc_t *) req, (struct timestruc_t *) rem); -} -strong_alias (__libc_nanosleep, __nanosleep) -libc_hidden_def (__nanosleep) -strong_alias (__libc_nanosleep, nanosleep) diff --git a/sysdeps/unix/sysv/aix/net/if.h b/sysdeps/unix/sysv/aix/net/if.h deleted file mode 100644 index 20256d3adb..0000000000 --- a/sysdeps/unix/sysv/aix/net/if.h +++ /dev/null @@ -1,196 +0,0 @@ -/* 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 - 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 _NET_IF_H - -#define _NET_IF_H 1 -#include - -#include -#include - -/* Standard interface flags. */ -enum - { - IFF_UP = 0x1, /* Interface is up. */ -#define IFF_UP IFF_UP - IFF_BROADCAST = 0x2, /* Broadcast address valid. */ -#define IFF_BROADCAST IFF_BROADCAST - IFF_DEBUG = 0x4, /* Turn on debugging. */ -#define IFF_DEBUG IFF_DEBUG - IFF_LOOPBACK = 0x8, /* Is a loopback net. */ -#define IFF_LOOPBACK IFF_LOOPBACK - IFF_POINTOPOINT = 0x10, /* Interface is point-to-point link. */ -#define IFF_POINTOPOINT IFF_POINTOPOINT - IFF_NOTRAILERS = 0x20, /* Avoid use of trailers. */ -#define IFF_NOTRAILERS IFF_NOTRAILERS - IFF_RUNNING = 0x40, /* Resources allocated. */ -#define IFF_RUNNING IFF_RUNNING - IFF_NOARP = 0x80, /* No address resolution protocol. */ -#define IFF_NOARP IFF_NOARP - IFF_PROMISC = 0x100, /* Receive all packets. */ -#define IFF_PROMISC IFF_PROMISC - - /* Not supported */ - IFF_ALLMULTI = 0x200, /* Receive all multicast packets. */ -#define IFF_ALLMULTI IFF_ALLMULTI - - IFF_OACTIVE = 0x400, /* Transmission in progress. */ -#define IFF_OACTIVE IFF_OACTIVE - IFF_SIMPLEX = 0x800, /* Cannot hear own transmissions. */ -#define IFF_SIMPLEX IFF_SIMPLEX - IFF_DO_HW_LOOPBACK = 0x10000, /* Force loopback through hardware. */ -#define IFF_DO_HW_LOOPBACK IFF_DO_HW_LOOPBACK - IFF_ALLCAST = 0x20000, /* Global broadcast. */ -#define IFF_ALLCAST IFF_ALLCAST - IFF_BRIDGE = 0x40000, /* Receive all bridge packets. */ -#define IFF_BRIDGE IFF_BRIDGE - IFF_NOECHO = IFF_SIMPLEX, /* Reeives echo packets. */ -#define IFF_NOECHO IFF_NOECHO - }; - -/* The ifaddr structure contains information about one address of an - interface. They are maintained by the different address families, - are allocated and attached when an address is set, and are linked - together so all addresses for an interface can be located. */ - -struct ifaddr - { - struct sockaddr ifa_addr; /* Address of interface. */ - union - { - struct sockaddr ifu_broadaddr; - struct sockaddr ifu_dstaddr; - } ifa_ifu; - struct sockaddr *ifa_netmask; /* Used to determine subnet. */ - struct iface *ifa_ifp; /* Back-pointer to interface. */ - struct ifaddr *ifa_next; /* Next address for interface. */ - void (*ifa_rtrequest) (void); - struct rtentry *ifa_rt; - unsigned short int ifa_flags; - short int ifa_refcnt; - }; - -#define ifa_broadaddr ifa_ifu.ifu_broadaddr /* broadcast address */ -#define ifa_dstaddr ifa_ifu.ifu_dstaddr /* other end of link */ - -/* Interface request structure used for socket ioctl's. All interface - ioctl's must have parameter definitions which begin with ifr_name. - The remainder may be interface specific. */ - -struct ifreq - { -#define IFHWADDRLEN 6 -#define IFNAMSIZ 16 - union - { - char ifrn_name[IFNAMSIZ]; /* Interface name, e.g. "en0". */ - } ifr_ifrn; - - union - { - struct sockaddr ifru_addr; - struct sockaddr ifru_dstaddr; - struct sockaddr ifru_broadaddr; - struct sockaddr ifru_netmask; - struct sockaddr ifru_hwaddr; - short int ifru_flags; - int ifru_ivalue; - unsigned int ifru_mtu; - char ifru_slave[IFNAMSIZ]; /* Just fits the size */ - __caddr_t ifru_data; - unsigned short int ifru_site6; - } ifr_ifru; - }; - -/* Old AIX 3.1 version. */ -struct oifreq -{ - char ifr_name[IFNAMSIZ]; /* if name, e.g. "en0" */ - union - { - struct sockaddr ifru_addr; - struct sockaddr ifru_dstaddr; - struct sockaddr ifru_broadaddr; - int ifru_flags; - int ifru_metric; - caddr_t ifru_data; - unsigned int ifru_mtu; - } ifr_ifru; - unsigned char reserved[8]; -}; - - -#define ifr_name ifr_ifrn.ifrn_name /* interface name */ -#define ifr_hwaddr ifr_ifru.ifru_hwaddr /* MAC address */ -#define ifr_addr ifr_ifru.ifru_addr /* address */ -#define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-p lnk */ -#define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */ -#define ifr_netmask ifr_ifru.ifru_netmask /* interface net mask */ -#define ifr_flags ifr_ifru.ifru_flags /* flags */ -#define ifr_metric ifr_ifru.ifru_ivalue /* metric */ -#define ifr_mtu ifr_ifru.ifru_mtu /* mtu */ -#define ifr_slave ifr_ifru.ifru_slave /* slave device */ -#define ifr_data ifr_ifru.ifru_data /* for use by interface */ -#define ifr_ifindex ifr_ifru.ifru_ivalue /* interface index */ -#define ifr_bandwidth ifr_ifru.ifru_ivalue /* link bandwidth */ -#define ifr_baudrate ifr_ifru.ifru_ivalue /* link bandwidth */ -#define ifr_qlen ifr_ifru.ifru_ivalue /* queue length */ -#define ifr_site6 ifr_ifru.ifru_site6 /* IPv6 site index */ - - -/* Structure used in SIOCGIFCONF request. Used to retrieve interface - configuration for machine (useful for programs which must know all - networks accessible). */ - -struct ifconf - { - int ifc_len; /* Size of buffer. */ - union - { - __caddr_t ifcu_buf; - struct ifreq *ifcu_req; - } ifc_ifcu; - }; -#define ifc_buf ifc_ifcu.ifcu_buf /* Buffer address. */ -#define ifc_req ifc_ifcu.ifcu_req /* Array of structures. */ - -__BEGIN_DECLS - -/* Convert an interface name to an index, and vice versa. */ - -extern unsigned int if_nametoindex (__const char *__ifname) __THROW; -extern char *if_indextoname (unsigned int __ifindex, char *__ifname) __THROW; - -/* Return a list of all interfaces and their indices. */ - -struct if_nameindex - { - unsigned int if_index; /* 1, 2, ... */ - char *if_name; /* null terminated name: "eth0", ... */ - }; - -extern struct if_nameindex *if_nameindex (void) __THROW; - -/* Free the data returned from if_nameindex. */ - -extern void if_freenameindex (struct if_nameindex *__ptr) __THROW; - -__END_DECLS - -#endif /* net/if.h */ diff --git a/sysdeps/unix/sysv/aix/open.c b/sysdeps/unix/sysv/aix/open.c deleted file mode 100644 index 2b42f8e81b..0000000000 --- a/sysdeps/unix/sysv/aix/open.c +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (C) 1999, 2000, 2002 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. */ - -#include -#include -#include - -int -__open (const char *file, int oflag, ...) -{ - int mode = 0; - - if (oflag & O_CREAT) - { - va_list arg; - va_start (arg, oflag); - mode = va_arg (arg, int); - va_end (arg); - } - - return open (file, oflag, mode); -} -libc_hidden_def (__open) -strong_alias (__open, __libc_open) -libc_hidden_def (__libc_open) diff --git a/sysdeps/unix/sysv/aix/pipe.c b/sysdeps/unix/sysv/aix/pipe.c deleted file mode 100644 index 4a3ba1c041..0000000000 --- a/sysdeps/unix/sysv/aix/pipe.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 1999, 2000, 2002 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. */ - -#include - -int -__pipe (pipedes) - int pipedes[2]; -{ - return pipe (pipedes); -} -libc_hidden_def (__pipe) diff --git a/sysdeps/unix/sysv/aix/poll.c b/sysdeps/unix/sysv/aix/poll.c deleted file mode 100644 index 5ce5409914..0000000000 --- a/sysdeps/unix/sysv/aix/poll.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 1999, 2000, 2001, 2002 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. */ - -#include - -int -__poll (fds, nfds, timeout) - struct pollfd *fds; - nfds_t nfds; - int timeout; -{ - return poll (fds, nfds, timeout); -} -libc_hidden_def (__poll) diff --git a/sysdeps/unix/sysv/aix/posix_madvise.c b/sysdeps/unix/sysv/aix/posix_madvise.c deleted file mode 100644 index 7ab4bed8e0..0000000000 --- a/sysdeps/unix/sysv/aix/posix_madvise.c +++ /dev/null @@ -1,8 +0,0 @@ -#include -#include - -int -posix_madvise (void *addr, size_t len, int advise) -{ - return madvise (addr, len, advise) ? errno : 0; -} diff --git a/sysdeps/unix/sysv/aix/powerpc/memset.c b/sysdeps/unix/sysv/aix/powerpc/memset.c deleted file mode 100644 index 352db13085..0000000000 --- a/sysdeps/unix/sysv/aix/powerpc/memset.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (C) 2001, 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 - 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. */ - - -/* Until the cache line issues are resolved use the generic implementation. */ -#include diff --git a/sysdeps/unix/sysv/aix/powerpc/register-dump.h b/sysdeps/unix/sysv/aix/powerpc/register-dump.h deleted file mode 100644 index f0d8b99837..0000000000 --- a/sysdeps/unix/sysv/aix/powerpc/register-dump.h +++ /dev/null @@ -1,281 +0,0 @@ -/* Dump registers. - Copyright (C) 1998 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. */ - -#include -#include -#include - -/* We will print the register dump in this format: - -Register dump: -fp0-3: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 -fp4-7: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 -fp8-11: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 -fp12-15: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 -fp16-19: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 -fp20-23: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 -fp24-27: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 -fp28-31: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 - -r00-07 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 -r08-15 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 -r16-23 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 -r24-31 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 - - trap 00000000 iar 00000000 msr 00000000 cr 00000000 - lr 00000000 ctr 00000000 xer 00000000 mq 00000000 - tid 00000000 fpscr 00000000 - -*/ - - -static void -hexvalue (unsigned long int value, char *buf, size_t len) -{ - char *cp = _itoa_word (value, buf + len, 16, 0); - while (cp > buf) - *--cp = '0'; -} - - -static void -register_dump (int fd, struct sigcontext *ctx) -{ - char regs[108][8]; - struct iovec iov[38]; - struct __mstsafe *reg_state; - int i; - int ii; - size_t nr = 0; - -#define ADD_STRING(str) \ - iov[nr].iov_base = (char *) str; \ - iov[nr].iov_len = strlen (str); \ - ++nr -#define ADD_MEM(str, len) \ - iov[nr].iov_base = str; \ - iov[nr].iov_len = len; \ - ++nr - - reg_state = (struct __mstsafe *)&ctx->sc_jmpbuf.__jmp_context; - - hexvalue (reg_state->__excp_type, regs[0], 8); - hexvalue (reg_state->__iar, regs[1], 8); - hexvalue (reg_state->__msr, regs[2], 8); - hexvalue (reg_state->__cr, regs[3], 8); - hexvalue (reg_state->__lr, regs[4], 8); - hexvalue (reg_state->__ctr, regs[5], 8); - hexvalue (reg_state->__xer, regs[6], 8); - hexvalue (reg_state->__mq, regs[7], 8); - hexvalue (reg_state->__tid, regs[8], 8); - hexvalue (reg_state->__fpscr, regs[9], 8); - - ii=10; - for (i = 0; i <= 96; i++,ii++) - hexvalue (reg_state->__gpr[i], regs[ii], 8); - - /* Generate the output. */ - ADD_STRING ("Register dump:\n\nfp0-3: "); - ADD_MEM (regs[42], 8); - ADD_MEM (regs[43], 8); - ADD_STRING (" "); - ADD_MEM (regs[44], 8); - ADD_MEM (regs[45], 8); - ADD_STRING (" "); - ADD_MEM (regs[46], 8); - ADD_MEM (regs[47], 8); - ADD_STRING (" "); - ADD_MEM (regs[48], 8); - ADD_MEM (regs[49], 8); - ADD_STRING ("\nfp4-7: "); - ADD_MEM (regs[50], 8); - ADD_MEM (regs[51], 8); - ADD_STRING (" "); - ADD_MEM (regs[52], 8); - ADD_MEM (regs[53], 8); - ADD_STRING (" "); - ADD_MEM (regs[54], 8); - ADD_MEM (regs[55], 8); - ADD_STRING (" "); - ADD_MEM (regs[56], 8); - ADD_MEM (regs[57], 8); - ADD_STRING ("\nfp8-11: "); - ADD_MEM (regs[58], 8); - ADD_MEM (regs[59], 8); - ADD_STRING (" "); - ADD_MEM (regs[60], 8); - ADD_MEM (regs[61], 8); - ADD_STRING (" "); - ADD_MEM (regs[62], 8); - ADD_MEM (regs[63], 8); - ADD_STRING (" "); - ADD_MEM (regs[64], 8); - ADD_MEM (regs[65], 8); - ADD_STRING ("\nfp12-15: "); - ADD_MEM (regs[66], 8); - ADD_MEM (regs[67], 8); - ADD_STRING (" "); - ADD_MEM (regs[68], 8); - ADD_MEM (regs[69], 8); - ADD_STRING (" "); - ADD_MEM (regs[70], 8); - ADD_MEM (regs[71], 8); - ADD_STRING (" "); - ADD_MEM (regs[72], 8); - ADD_MEM (regs[73], 8); - ADD_STRING ("\nfp16-19: "); - ADD_MEM (regs[74], 8); - ADD_MEM (regs[75], 8); - ADD_STRING (" "); - ADD_MEM (regs[76], 8); - ADD_MEM (regs[78], 8); - ADD_STRING (" "); - ADD_MEM (regs[79], 8); - ADD_MEM (regs[80], 8); - ADD_STRING (" "); - ADD_MEM (regs[81], 8); - ADD_MEM (regs[82], 8); - ADD_STRING ("\nfp20-23: "); - ADD_MEM (regs[83], 8); - ADD_MEM (regs[84], 8); - ADD_STRING (" "); - ADD_MEM (regs[85], 8); - ADD_MEM (regs[86], 8); - ADD_STRING (" "); - ADD_MEM (regs[87], 8); - ADD_MEM (regs[88], 8); - ADD_STRING (" "); - ADD_MEM (regs[89], 8); - ADD_MEM (regs[90], 8); - ADD_STRING ("\nfp24-27: "); - ADD_MEM (regs[91], 8); - ADD_MEM (regs[92], 8); - ADD_STRING (" "); - ADD_MEM (regs[93], 8); - ADD_MEM (regs[94], 8); - ADD_STRING (" "); - ADD_MEM (regs[95], 8); - ADD_MEM (regs[96], 8); - ADD_STRING (" "); - ADD_MEM (regs[97], 8); - ADD_MEM (regs[98], 8); - ADD_STRING ("\nfp28-31: "); - ADD_MEM (regs[99], 8); - ADD_MEM (regs[100], 8); - ADD_STRING (" "); - ADD_MEM (regs[101], 8); - ADD_MEM (regs[102], 8); - ADD_STRING (" "); - ADD_MEM (regs[103], 8); - ADD_MEM (regs[104], 8); - ADD_STRING (" "); - ADD_MEM (regs[105], 8); - ADD_MEM (regs[106], 8); - ADD_STRING ("\n\nr00-07 "); - ADD_MEM (regs[10], 8); - ADD_STRING (" "); - ADD_MEM (regs[11], 8); - ADD_STRING (" "); - ADD_MEM (regs[12], 8); - ADD_STRING (" "); - ADD_MEM (regs[13], 8); - ADD_STRING (" "); - ADD_MEM (regs[14], 8); - ADD_STRING (" "); - ADD_MEM (regs[15], 8); - ADD_STRING (" "); - ADD_MEM (regs[16], 8); - ADD_STRING (" "); - ADD_MEM (regs[17], 8); - ADD_STRING ("\nr08-15 "); - ADD_MEM (regs[18], 8); - ADD_STRING (" "); - ADD_MEM (regs[19], 8); - ADD_STRING (" "); - ADD_MEM (regs[20], 8); - ADD_STRING (" "); - ADD_MEM (regs[21], 8); - ADD_STRING (" "); - ADD_MEM (regs[22], 8); - ADD_STRING (" "); - ADD_MEM (regs[23], 8); - ADD_STRING (" "); - ADD_MEM (regs[24], 8); - ADD_STRING (" "); - ADD_MEM (regs[25], 8); - ADD_STRING ("\nr16-23 "); - ADD_MEM (regs[26], 8); - ADD_STRING (" "); - ADD_MEM (regs[27], 8); - ADD_STRING (" "); - ADD_MEM (regs[28], 8); - ADD_STRING (" "); - ADD_MEM (regs[29], 8); - ADD_STRING (" "); - ADD_MEM (regs[30], 8); - ADD_STRING (" "); - ADD_MEM (regs[31], 8); - ADD_STRING (" "); - ADD_MEM (regs[32], 8); - ADD_STRING (" "); - ADD_MEM (regs[33], 8); - ADD_STRING ("\nr24-31 "); - ADD_MEM (regs[34], 8); - ADD_STRING (" "); - ADD_MEM (regs[35], 8); - ADD_STRING (" "); - ADD_MEM (regs[36], 8); - ADD_STRING (" "); - ADD_MEM (regs[37], 8); - ADD_STRING (" "); - ADD_MEM (regs[38], 8); - ADD_STRING (" "); - ADD_MEM (regs[39], 8); - ADD_STRING (" "); - ADD_MEM (regs[40], 8); - ADD_STRING (" "); - ADD_MEM (regs[41], 8); - ADD_STRING ("\n\n trap "); - ADD_MEM (regs[0], 8); - ADD_STRING (" iar "); - ADD_MEM (regs[1], 8); - ADD_STRING (" msr "); - ADD_MEM (regs[2], 8); - ADD_STRING (" cr "); - ADD_MEM (regs[3], 8); - ADD_STRING ("\n lr "); - ADD_MEM (regs[4], 8); - ADD_STRING (" ctr "); - ADD_MEM (regs[5], 8); - ADD_STRING (" xer "); - ADD_MEM (regs[6], 8); - ADD_STRING (" mq "); - ADD_MEM (regs[7], 8); - ADD_STRING ("\n tid "); - ADD_MEM (regs[8], 8); - ADD_STRING (" fpscr "); - ADD_MEM (regs[9], 8); - ADD_STRING ("\n"); - - /* Write the stuff out. */ - writev (fd, iov, nr); -} - -#define REGISTER_DUMP register_dump (fd, ctx) - diff --git a/sysdeps/unix/sysv/aix/powerpc/s_lrint.c b/sysdeps/unix/sysv/aix/powerpc/s_lrint.c deleted file mode 100644 index 1a8b590d23..0000000000 --- a/sysdeps/unix/sysv/aix/powerpc/s_lrint.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Round floating-point to integer. AIX/PowerPC version. - Copyright (C) 1997, 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 - 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. */ - -#include - -/* This code will also work for a 'float' argument. */ -asm ("\ - .globl .__lrintf - .globl .lrintf - .weak .lrintf - .set .__lrintf,.__lrint - .set .lrintf,.__lrint -"); diff --git a/sysdeps/unix/sysv/aix/pread.c b/sysdeps/unix/sysv/aix/pread.c deleted file mode 100644 index 8d8bfd741e..0000000000 --- a/sysdeps/unix/sysv/aix/pread.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -extern int kpread (int fd, void *buf, size_t len, long long int off); - -ssize_t -__pread (int fd, void *buf, size_t len, off_t off) -{ - return kpread (fd, buf, len, off); -} -weak_alias (__pread, pread) diff --git a/sysdeps/unix/sysv/aix/pread64.c b/sysdeps/unix/sysv/aix/pread64.c deleted file mode 100644 index 0d4df22634..0000000000 --- a/sysdeps/unix/sysv/aix/pread64.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -extern int kpread (int fd, void *buf, size_t len, long long int off); - -ssize_t -__pread64 (int fd, void *buf, size_t len, off64_t off) -{ - return kpread (fd, buf, len, off); -} -weak_alias (__pread64, pread64) diff --git a/sysdeps/unix/sysv/aix/profil-counter.h b/sysdeps/unix/sysv/aix/profil-counter.h deleted file mode 100644 index 2492a63ba3..0000000000 --- a/sysdeps/unix/sysv/aix/profil-counter.h +++ /dev/null @@ -1,27 +0,0 @@ -/* Machine-dependent SIGPROF signal handler. AIX version. - Copyright (C) 1996, 1997, 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 - 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. */ - -/* In many Unix systems signal handlers are called like this - and the interrupted PC is easily findable in the `struct sigcontext'. */ - -static void -profil_counter (int signr, int code, struct sigcontext *scp) -{ - profil_count ((void *) scp->sc_jmpbuf.__jmp_context.__gpr[0]); -} diff --git a/sysdeps/unix/sysv/aix/read.c b/sysdeps/unix/sysv/aix/read.c deleted file mode 100644 index ca0edb30d5..0000000000 --- a/sysdeps/unix/sysv/aix/read.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (C) 1999, 2000, 2002 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. */ - -#include - -extern int kread (int fd, void *buf, size_t len); - -ssize_t -__libc_read (int fd, void *buf, size_t len) -{ - return kread (fd, buf, len); -} -libc_hidden_def (__libc_read) -strong_alias (__libc_read, __read) -libc_hidden_def (__read) -strong_alias (__libc_read, read) diff --git a/sysdeps/unix/sysv/aix/readlink.c b/sysdeps/unix/sysv/aix/readlink.c deleted file mode 100644 index 2770358b98..0000000000 --- a/sysdeps/unix/sysv/aix/readlink.c +++ /dev/null @@ -1,8 +0,0 @@ -/* This is a system call. We only have to provide the wrapper. */ -#include - -int -__readlink (const char *path, char *buf, size_t len) -{ - return readlink (path, buf, len); -} diff --git a/sysdeps/unix/sysv/aix/readv.c b/sysdeps/unix/sysv/aix/readv.c deleted file mode 100644 index eddca0fc87..0000000000 --- a/sysdeps/unix/sysv/aix/readv.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (C) 1991, 1995-1998, 2000, 2002 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. */ - -#include - -extern ssize_t kreadv (int fd, const struct iovec *iovp, size_t iovcnt, - long int ext); - -/* Read data from file descriptor FD, and put the result in the - buffers described by VECTOR, which is a vector of COUNT `struct iovec's. - The buffers are filled in the order specified. - Operates just like `read' (see ) except that data are - put in VECTOR instead of a contiguous buffer. */ -ssize_t -__libc_readv (fd, vector, count) - int fd; - const struct iovec *vector; - int count; -{ - return kreadv (fd, vector, count, 0); -} -strong_alias (__libc_readv, __readv) -weak_alias (__libc_readv, readv) diff --git a/sysdeps/unix/sysv/aix/recv.c b/sysdeps/unix/sysv/aix/recv.c deleted file mode 100644 index b8ae73e200..0000000000 --- a/sysdeps/unix/sysv/aix/recv.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2000, 2001 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. */ - -#include - -extern ssize_t recv (int fd, void *buf, size_t n, int flags); - - -ssize_t -__recv (int fd, void *buf, size_t n, int flags) -{ - return recv (fd, buf, n, flags); -} diff --git a/sysdeps/unix/sysv/aix/recvfrom.c b/sysdeps/unix/sysv/aix/recvfrom.c deleted file mode 100644 index 08ff1113f4..0000000000 --- a/sysdeps/unix/sysv/aix/recvfrom.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (C) 1999, 2000, 2001, 2002 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. */ - -#include - -extern ssize_t nrecvfrom (int s, void *uap_buf, size_t len, int flags, - void *uap_from, socklen_t *uap_fromlenaddr); - -ssize_t -__recvfrom (int fd, void *buf, size_t n, int flags, __SOCKADDR_ARG addr, - socklen_t *addr_len) -{ - return nrecvfrom (fd, buf, n, flags, addr.__sockaddr__, addr_len); -} - -weak_alias (__recvfrom, recvfrom) diff --git a/sysdeps/unix/sysv/aix/recvmsg.c b/sysdeps/unix/sysv/aix/recvmsg.c deleted file mode 100644 index 201c26741c..0000000000 --- a/sysdeps/unix/sysv/aix/recvmsg.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 1999, 2000, 2001, 2002 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. */ - -#include - -extern ssize_t nrecvmsg (int s, struct msghdr *uap_msg, int flags); - -ssize_t -__recvmsg (int fd, struct msghdr *message, int flags) -{ - return nrecvmsg (fd, message, flags); -} - -weak_alias (__recvmsg, recvmsg) diff --git a/sysdeps/unix/sysv/aix/rename.c b/sysdeps/unix/sysv/aix/rename.c deleted file mode 100644 index 6036fbbffd..0000000000 --- a/sysdeps/unix/sysv/aix/rename.c +++ /dev/null @@ -1 +0,0 @@ -/* This is a system call. */ diff --git a/sysdeps/unix/sysv/aix/revoke.c b/sysdeps/unix/sysv/aix/revoke.c deleted file mode 100644 index 8f6a4848d5..0000000000 --- a/sysdeps/unix/sysv/aix/revoke.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Revoke the access of all descriptors currently open on a file. AIX version. - Copyright (C) 1995, 1996, 1997, 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 - 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. */ - -#include -#include -#include - -extern int frevoke (int fdes); - -int -revoke (file) - const char *file; -{ - int fd; - int res; - - fd = open (file, O_RDONLY); - if (fd < 0) - return -1; - - res = frevoke (fd); - (void) close (fd); - - return res; -} diff --git a/sysdeps/unix/sysv/aix/rmdir.c b/sysdeps/unix/sysv/aix/rmdir.c deleted file mode 100644 index 91c600694b..0000000000 --- a/sysdeps/unix/sysv/aix/rmdir.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -int -__rmdir (const char *name) -{ - return rmdir (name); -} diff --git a/sysdeps/unix/sysv/aix/sbrk.c b/sysdeps/unix/sysv/aix/sbrk.c deleted file mode 100644 index 0a590ee8c6..0000000000 --- a/sysdeps/unix/sysv/aix/sbrk.c +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright (C) 1999, 2000, 2002 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. */ - -#include - -void * -__sbrk (intptr_t delta) -{ - return sbrk (delta); -} -libc_hidden_def (__sbrk) diff --git a/sysdeps/unix/sysv/aix/sched_yield.c b/sysdeps/unix/sysv/aix/sched_yield.c deleted file mode 100644 index b5fbc07535..0000000000 --- a/sysdeps/unix/sysv/aix/sched_yield.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (C) 1996, 1997, 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 - 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. */ - -#include - -extern void yield (void); - - -/* Yield the processor. */ -int -__sched_yield (void) -{ - yield (); - return 0; -} -strong_alias (__sched_yield, sched_yield) diff --git a/sysdeps/unix/sysv/aix/select.c b/sysdeps/unix/sysv/aix/select.c deleted file mode 100644 index 9bf5bae47c..0000000000 --- a/sysdeps/unix/sysv/aix/select.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (C) 1999, 2000, 2002 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. */ - -#include - -int -__select (nfds, readfds, writefds, exceptfds, timeout) - int nfds; - fd_set *readfds; - fd_set *writefds; - fd_set *exceptfds; - struct timeval *timeout; -{ - return select (nfds, readfds, writefds, exceptfds, timeout); -} -libc_hidden_def (__select) diff --git a/sysdeps/unix/sysv/aix/semctl.c b/sysdeps/unix/sysv/aix/semctl.c deleted file mode 100644 index 6036fbbffd..0000000000 --- a/sysdeps/unix/sysv/aix/semctl.c +++ /dev/null @@ -1 +0,0 @@ -/* This is a system call. */ diff --git a/sysdeps/unix/sysv/aix/semget.c b/sysdeps/unix/sysv/aix/semget.c deleted file mode 100644 index 6036fbbffd..0000000000 --- a/sysdeps/unix/sysv/aix/semget.c +++ /dev/null @@ -1 +0,0 @@ -/* This is a system call. */ diff --git a/sysdeps/unix/sysv/aix/semop.c b/sysdeps/unix/sysv/aix/semop.c deleted file mode 100644 index 6036fbbffd..0000000000 --- a/sysdeps/unix/sysv/aix/semop.c +++ /dev/null @@ -1 +0,0 @@ -/* This is a system call. */ diff --git a/sysdeps/unix/sysv/aix/sendmsg.c b/sysdeps/unix/sysv/aix/sendmsg.c deleted file mode 100644 index 5b1baf63a5..0000000000 --- a/sysdeps/unix/sysv/aix/sendmsg.c +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright (C) 1999, 2000, 2001, 2002 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. */ - -#include - -extern int nsendmsg (int s, const void *uap_msg, int flags); - -ssize_t -__sendmsg (int fd, const struct msghdr *message, int flags) -{ - return nsendmsg (fd, message, flags); -} - -weak_alias (__sendmsg, sendmsg) - diff --git a/sysdeps/unix/sysv/aix/sendto.c b/sysdeps/unix/sysv/aix/sendto.c deleted file mode 100644 index 6036fbbffd..0000000000 --- a/sysdeps/unix/sysv/aix/sendto.c +++ /dev/null @@ -1 +0,0 @@ -/* This is a system call. */ diff --git a/sysdeps/unix/sysv/aix/setegid.c b/sysdeps/unix/sysv/aix/setegid.c deleted file mode 100644 index 75123cedfd..0000000000 --- a/sysdeps/unix/sysv/aix/setegid.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright (C) 2000, 2002 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. */ - -#include - -#define ID_EFFECTIVE 0x01 - - -extern int setgidx (int mask, gid_t gid); - -int -__setegid (gid_t gid) -{ - return setgidx (ID_EFFECTIVE, gid); -} -strong_alias (__setegid, setegid) -libc_hidden_def (setegid) diff --git a/sysdeps/unix/sysv/aix/seteuid.c b/sysdeps/unix/sysv/aix/seteuid.c deleted file mode 100644 index 6ea7e7ba03..0000000000 --- a/sysdeps/unix/sysv/aix/seteuid.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright (C) 2000, 2002 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. */ - -#include - -#define ID_EFFECTIVE 0x01 - - -extern int setuidx (int mask, uid_t uid); - -int -__seteuid (uid_t uid) -{ - return setuidx (ID_EFFECTIVE, uid); -} -strong_alias (__seteuid, seteuid) -libc_hidden_def (seteuid) diff --git a/sysdeps/unix/sysv/aix/setgid.c b/sysdeps/unix/sysv/aix/setgid.c deleted file mode 100644 index 5b8038110b..0000000000 --- a/sysdeps/unix/sysv/aix/setgid.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -#define ID_REAL 0x02 - - -extern int setgidx (int mask, gid_t gid); - -int -__setgid (gid_t gid) -{ - return setgidx (ID_REAL, gid); -} -strong_alias (__setgid, setgid) diff --git a/sysdeps/unix/sysv/aix/setgroups.c b/sysdeps/unix/sysv/aix/setgroups.c deleted file mode 100644 index 6036fbbffd..0000000000 --- a/sysdeps/unix/sysv/aix/setgroups.c +++ /dev/null @@ -1 +0,0 @@ -/* This is a system call. */ diff --git a/sysdeps/unix/sysv/aix/setitimer.c b/sysdeps/unix/sysv/aix/setitimer.c deleted file mode 100644 index d7e741abe7..0000000000 --- a/sysdeps/unix/sysv/aix/setitimer.c +++ /dev/null @@ -1,68 +0,0 @@ -/* Copyright (C) 1991, 1994, 1995, 1996, 1997 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. */ - -#include -#include -#include -#include -#include - -extern int __libc_nanosleep (const struct timespec *requested_time, - struct timespec *remaining); -int -__setitimer (which, new, old) - enum __itimer_which which; - const struct itimerval *new; - struct itimerval *old; -{ - if (new == NULL) - { - __set_errno (EINVAL); - return -1; - } - - switch (which) - { - default: - __set_errno (EINVAL); - return -1; - - case ITIMER_VIRTUAL: - case ITIMER_PROF: - __set_errno (ENOSYS); - return -1; - - case ITIMER_REAL: - break; - } - - switch (__fork()) - { - case -1: exit(-1); - case 0: - { - struct timespec ts ={.tv_sec = (long int)new->it_value.tv_sec, .tv_nsec = 0}; - __libc_nanosleep(&ts,&ts); - __kill(getppid(), SIGALRM); - exit(0); - } - default: - } - return 0; -} -weak_alias (__setitimer, setitimer) diff --git a/sysdeps/unix/sysv/aix/setpgid.c b/sysdeps/unix/sysv/aix/setpgid.c deleted file mode 100644 index b076f28ed6..0000000000 --- a/sysdeps/unix/sysv/aix/setpgid.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 1999, 2000, 2002 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. */ - -#include - -int -__setpgid (pid, pgid) - int pid; - int pgid; -{ - return setpgid (pid, pgid); -} -libc_hidden_def (__setpgid) diff --git a/sysdeps/unix/sysv/aix/setpgrp.c b/sysdeps/unix/sysv/aix/setpgrp.c deleted file mode 100644 index 6036fbbffd..0000000000 --- a/sysdeps/unix/sysv/aix/setpgrp.c +++ /dev/null @@ -1 +0,0 @@ -/* This is a system call. */ diff --git a/sysdeps/unix/sysv/aix/setpriority.c b/sysdeps/unix/sysv/aix/setpriority.c deleted file mode 100644 index 6036fbbffd..0000000000 --- a/sysdeps/unix/sysv/aix/setpriority.c +++ /dev/null @@ -1 +0,0 @@ -/* This is a system call. */ diff --git a/sysdeps/unix/sysv/aix/setregid.c b/sysdeps/unix/sysv/aix/setregid.c deleted file mode 100644 index 35812300b9..0000000000 --- a/sysdeps/unix/sysv/aix/setregid.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -#define ID_EFFECTIVE 0x01 -#define ID_REAL 0x02 - - -extern int setgidx (int mask, gid_t gid); - -int -__setregid (gid_t rgid, gid_t egid) -{ - int res; - - if (rgid == egid) - return setgidx (ID_EFFECTIVE | ID_REAL, egid); - - res = setgidx (ID_REAL, rgid); - if (res == 0) - res = setgidx (ID_EFFECTIVE, egid); - - return res; -} -strong_alias (__setregid, setregid) diff --git a/sysdeps/unix/sysv/aix/setreuid.c b/sysdeps/unix/sysv/aix/setreuid.c deleted file mode 100644 index 430d2fedc7..0000000000 --- a/sysdeps/unix/sysv/aix/setreuid.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -#define ID_EFFECTIVE 0x01 -#define ID_REAL 0x02 - - -extern int setuidx (int mask, uid_t uid); - -int -__setreuid (uid_t ruid, uid_t euid) -{ - int res; - - if (ruid == euid) - return setuidx (ID_EFFECTIVE | ID_REAL, euid); - - res = setuidx (ID_REAL, ruid); - if (res == 0) - res = setuidx (ID_EFFECTIVE, euid); - - return res; -} -strong_alias (__setreuid, setreuid) diff --git a/sysdeps/unix/sysv/aix/setrlimit.c b/sysdeps/unix/sysv/aix/setrlimit.c deleted file mode 100644 index 818819d8ec..0000000000 --- a/sysdeps/unix/sysv/aix/setrlimit.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -int -__setrlimit (enum __rlimit_resource resource, const struct rlimit *rlimits) -{ - return setrlimit (resource, rlimits); -} diff --git a/sysdeps/unix/sysv/aix/setrlimit64.c b/sysdeps/unix/sysv/aix/setrlimit64.c deleted file mode 100644 index f305c6f82f..0000000000 --- a/sysdeps/unix/sysv/aix/setrlimit64.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -int -__setrlimit64 (enum __rlimit_resource resource, const struct rlimit64 *rlimits) -{ - return setrlimit64 (resource, rlimits); -} diff --git a/sysdeps/unix/sysv/aix/setsid.c b/sysdeps/unix/sysv/aix/setsid.c deleted file mode 100644 index c017c122bf..0000000000 --- a/sysdeps/unix/sysv/aix/setsid.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -int -__setsid () -{ - return setsid (); -} diff --git a/sysdeps/unix/sysv/aix/setsockopt.c b/sysdeps/unix/sysv/aix/setsockopt.c deleted file mode 100644 index 6036fbbffd..0000000000 --- a/sysdeps/unix/sysv/aix/setsockopt.c +++ /dev/null @@ -1 +0,0 @@ -/* This is a system call. */ diff --git a/sysdeps/unix/sysv/aix/setuid.c b/sysdeps/unix/sysv/aix/setuid.c deleted file mode 100644 index 1772fc797a..0000000000 --- a/sysdeps/unix/sysv/aix/setuid.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -#define ID_REAL 0x02 - - -extern int setuidx (int mask, uid_t uid); - -int -__setuid (uid_t uid) -{ - return setuidx (ID_REAL, uid); -} -strong_alias (__setuid, setuid) diff --git a/sysdeps/unix/sysv/aix/shmat.c b/sysdeps/unix/sysv/aix/shmat.c deleted file mode 100644 index 6036fbbffd..0000000000 --- a/sysdeps/unix/sysv/aix/shmat.c +++ /dev/null @@ -1 +0,0 @@ -/* This is a system call. */ diff --git a/sysdeps/unix/sysv/aix/shmctl.c b/sysdeps/unix/sysv/aix/shmctl.c deleted file mode 100644 index 6036fbbffd..0000000000 --- a/sysdeps/unix/sysv/aix/shmctl.c +++ /dev/null @@ -1 +0,0 @@ -/* This is a system call. */ diff --git a/sysdeps/unix/sysv/aix/shmdt.c b/sysdeps/unix/sysv/aix/shmdt.c deleted file mode 100644 index 6036fbbffd..0000000000 --- a/sysdeps/unix/sysv/aix/shmdt.c +++ /dev/null @@ -1 +0,0 @@ -/* This is a system call. */ diff --git a/sysdeps/unix/sysv/aix/shmget.c b/sysdeps/unix/sysv/aix/shmget.c deleted file mode 100644 index 6036fbbffd..0000000000 --- a/sysdeps/unix/sysv/aix/shmget.c +++ /dev/null @@ -1 +0,0 @@ -/* This is a system call. */ diff --git a/sysdeps/unix/sysv/aix/sigaction.c b/sysdeps/unix/sysv/aix/sigaction.c deleted file mode 100644 index 6b48a505c0..0000000000 --- a/sysdeps/unix/sysv/aix/sigaction.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright (C) 1991,1995,1996,1997,2000,2002 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. */ - -#include -#include - -extern int _sigaction (int sig, const struct sigaction *act, - struct sigaction *oact); - -/* If ACT is not NULL, change the action for SIG to *ACT. - If OACT is not NULL, put the old action for SIG in *OACT. */ -int -__sigaction (sig, act, oact) - int sig; - const struct sigaction *act; - struct sigaction *oact; -{ - return _sigaction (sig, act, oact); -} -libc_hidden_def (__sigaction) -strong_alias (__sigaction, sigaction) diff --git a/sysdeps/unix/sysv/aix/sigaltstack.c b/sysdeps/unix/sysv/aix/sigaltstack.c deleted file mode 100644 index 6036fbbffd..0000000000 --- a/sysdeps/unix/sysv/aix/sigaltstack.c +++ /dev/null @@ -1 +0,0 @@ -/* This is a system call. */ diff --git a/sysdeps/unix/sysv/aix/sigpending.c b/sysdeps/unix/sysv/aix/sigpending.c deleted file mode 100644 index 729b75a3be..0000000000 --- a/sysdeps/unix/sysv/aix/sigpending.c +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright (C) 1991, 1995, 1996, 1997, 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 - 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. */ - -#include - -extern int _sigpending (sigset_t *set); - - -/* Store in SET all signals that are blocked and pending. */ -int -sigpending (set) - sigset_t *set; -{ - return _sigpending (set); -} diff --git a/sysdeps/unix/sysv/aix/sigprocmask.c b/sysdeps/unix/sysv/aix/sigprocmask.c deleted file mode 100644 index 1046903b9c..0000000000 --- a/sysdeps/unix/sysv/aix/sigprocmask.c +++ /dev/null @@ -1,8 +0,0 @@ -/* This is a system call. We only have to provide the wrapper. */ -#include - -int -__sigprocmask (int how, const sigset_t *set, sigset_t *oset) -{ - return sigprocmask (how, set, oset); -} diff --git a/sysdeps/unix/sysv/aix/sigset-cvt-mask.h b/sysdeps/unix/sysv/aix/sigset-cvt-mask.h deleted file mode 100644 index cc05fb70fa..0000000000 --- a/sysdeps/unix/sysv/aix/sigset-cvt-mask.h +++ /dev/null @@ -1,33 +0,0 @@ -/* Convert between lowlevel sigmask and libc representation of sigset_t. - AIX version. - Copyright (C) 1998,2000,02 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. */ - -static inline int __attribute__ ((unused)) -sigset_set_old_mask (sigset_t *set, int mask) -{ - set->__losigs = (unsigned int) mask; - set->__hisigs = 0; - return 0; -} - -static inline int __attribute__ ((unused)) -sigset_get_old_mask (const sigset_t *set) -{ - return (unsigned int) set->__losigs; -} diff --git a/sysdeps/unix/sysv/aix/sigstack.c b/sysdeps/unix/sysv/aix/sigstack.c deleted file mode 100644 index 6036fbbffd..0000000000 --- a/sysdeps/unix/sysv/aix/sigstack.c +++ /dev/null @@ -1 +0,0 @@ -/* This is a system call. */ diff --git a/sysdeps/unix/sysv/aix/sigsuspend.c b/sysdeps/unix/sysv/aix/sigsuspend.c deleted file mode 100644 index c9120d6e97..0000000000 --- a/sysdeps/unix/sysv/aix/sigsuspend.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (C) 1991, 1995-1998, 2000, 2002 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. */ - -#include - -extern int _sigsuspend (const sigset_t *sigmask); - - -/* Change the set of blocked signals to SET, - wait until a signal arrives, and restore the set of blocked signals. */ -int -__sigsuspend (set) - const sigset_t *set; -{ - return _sigsuspend (set); -} -libc_hidden_def (__sigsuspend) -weak_alias (__sigsuspend, sigsuspend) diff --git a/sysdeps/unix/sysv/aix/sleep.c b/sysdeps/unix/sysv/aix/sleep.c deleted file mode 100644 index aa8d76d3d2..0000000000 --- a/sysdeps/unix/sysv/aix/sleep.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (C) 1991, 1992, 1995, 1996, 1997 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. */ - -#include -#include -#include - -extern int __libc_nanosleep (const struct timespec *requested_time, - struct timespec *remaining); - -unsigned int -__sleep (seconds) - unsigned int seconds; -{ - struct timespec ts ={.tv_sec = (long int)seconds, .tv_nsec = 0}; - __libc_nanosleep(&ts,&ts); - return 0; -} -weak_alias (__sleep, sleep) diff --git a/sysdeps/unix/sysv/aix/socket.c b/sysdeps/unix/sysv/aix/socket.c deleted file mode 100644 index 236b1b1686..0000000000 --- a/sysdeps/unix/sysv/aix/socket.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -int -__socket (int domain, int type, int protocol) -{ - return socket (domain, type, protocol); -} diff --git a/sysdeps/unix/sysv/aix/socketpair.c b/sysdeps/unix/sysv/aix/socketpair.c deleted file mode 100644 index 8adeac97ff..0000000000 --- a/sysdeps/unix/sysv/aix/socketpair.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -int -__socketpair (int domain, int type, int protocol, int fds[2]) -{ - return socketpair (domain, type, protocol, fds); -} diff --git a/sysdeps/unix/sysv/aix/speed.c b/sysdeps/unix/sysv/aix/speed.c deleted file mode 100644 index 3a453a7bef..0000000000 --- a/sysdeps/unix/sysv/aix/speed.c +++ /dev/null @@ -1,75 +0,0 @@ -/* `struct termios' speed frobnication functions. AIX version. - Copyright (C) 2000, 2002 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. */ - -#include -#include -#include - -/* Return the output baud rate stored in *TERMIOS_P. */ -speed_t -cfgetospeed (termios_p) - const struct termios *termios_p; -{ - return termios_p->c_cflag & 0x0000000f; -} - -/* Return the input baud rate stored in *TERMIOS_P. */ -speed_t -cfgetispeed (termios_p) - const struct termios *termios_p; -{ - return (termios_p->c_cflag & 0x000f0000) >> 16; -} - -/* Set the output baud rate stored in *TERMIOS_P to SPEED. */ -int -cfsetospeed (termios_p, speed) - struct termios *termios_p; - speed_t speed; -{ - if (termios_p == NULL) - { - __set_errno (EINVAL); - return -1; - } - - termios_p->c_cflag &= ~0x0000000f; - termios_p->c_cflag |= speed & 0x0000000f; - return 0; -} -libc_hidden_def (cfsetospeed) - - -/* Set the input baud rate stored in *TERMIOS_P to SPEED. */ -int -cfsetispeed (termios_p, speed) - struct termios *termios_p; - speed_t speed; -{ - if (termios_p == NULL) - { - __set_errno (EINVAL); - return -1; - } - - termios_p->c_cflag &= ~0x000f0000; - termios_p->c_cflag |= (speed << 16) & ~0x000f0000; - return 0; -} -libc_hidden_def (cfsetispeed) diff --git a/sysdeps/unix/sysv/aix/start-libc.c b/sysdeps/unix/sysv/aix/start-libc.c deleted file mode 100644 index 0cbe79d0b1..0000000000 --- a/sysdeps/unix/sysv/aix/start-libc.c +++ /dev/null @@ -1,265 +0,0 @@ -/* Initialization code run first thing by the XCOFF startup code. AIX version. - Copyright (C) 2001, 2002 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. */ - -#include -#include -#include - -/* hack to use uchar's */ -typedef unsigned char uchar; -#include -#include -#include -#include - -extern void __libc_init_first (int argc, char **argv, char **envp); - -/* XXX disable for now -extern int __libc_multiple_libcs; */ - -/* XXX normally defined in generic/dl-sydep.c, hack it into existance -extern void *__libc_stack_end; */ -void *__libc_stack_end; - -struct __libc_start_data_rec -{ - void *stack; - void *toc; - int argc; - char **argv; - char **envp; - char *data; - char *text; - unsigned int mcount; - unsigned int special; - int (*main) (int, char **, char **); - void (*init) (void); - void (*fini) (void); - void (*rtld_fini) (void); -}; - -extern struct __libc_start_data_rec __libc_start_data; -extern int errno; - -/* The first piece of initialized data. */ -int __data_start = 0; - -#ifndef HAVE_ELF -/* Since gcc/crtstuff.c won't define it unless the ELF format is used - we will need to define it here. */ -void *__dso_handle = NULL; -#endif - -/* AIX kernel function */ -extern int __loadx (int flag, void *module, void *arg1, void *arg2, - void *arg3); -/* Needed by setenv */ -char **__environ; - -/* - Find __rtinit symbol - - __RTINIT *find_rtinit() - - __RTINIT *rti - pointer to __rtinit data structure - */ - -static __RTINIT * -find_rtinit (void) -{ - struct xcoffhdr *xcoff_hdr; - SCNHDR *sec_hdr; - SCNHDR *ldr_sec_hdr; - SCNHDR *data_sec_hdr; - LDSYM *ldsym_hdr; - __RTINIT *rtl; - - xcoff_hdr = (struct xcoffhdr *) __libc_start_data.text; - sec_hdr = (SCNHDR *) ((caddr_t) &xcoff_hdr->aouthdr - + xcoff_hdr->filehdr.f_opthdr); - ldr_sec_hdr = (SCNHDR *) (sec_hdr + (xcoff_hdr->aouthdr.o_snloader - 1)); - ldsym_hdr = (LDSYM *) ((caddr_t)xcoff_hdr + ldr_sec_hdr->s_scnptr - + LDHDRSZ); - - if ( __libc_start_data.mcount <= 0) - { - if (!ldr_sec_hdr->s_scnptr) - return (__RTINIT *) 0; - - if (memcmp (ldsym_hdr, RTINIT_NAME, sizeof (RTINIT_NAME) - 1)) - return (__RTINIT *) 0; - } - - data_sec_hdr = (SCNHDR *) (sec_hdr + (xcoff_hdr->aouthdr.o_sndata - 1)); - rtl = (__RTINIT *) (ldsym_hdr->l_value - + (__libc_start_data.data - data_sec_hdr->s_vaddr)); - return rtl; -} - -/* - The mod_init1 calls every initialization function for a given module. - - void mod_init1(handler, rti) - - void *handler - if NULL init funtions for modules loaded at exec time - are being executed. Otherwise, the handler points to the - module loaded. - - __RTINIT *rti - pointer to __rtinit data structure (with rti->init_offset - not equal to zero) - */ - -static void -mod_init1 (void *handler,__RTINIT *rtl) -{ - __RTINIT_DESCRIPTOR *descriptor; - - descriptor = (__RTINIT_DESCRIPTOR *) ((caddr_t) &rtl->rtl - + rtl->init_offset); - while (descriptor->f != NULL) - { - if (!(descriptor->flags & _RT_CALLED)) - { - descriptor->flags |= _RT_CALLED; - (descriptor->f) (handler, rtl, descriptor); /* execute init/fini */ - } - descriptor = (__RTINIT_DESCRIPTOR *) ((caddr_t) descriptor - + rtl->__rtinit_descriptor_size); - } -} - -/* The modinit() function performs run-time linking, if enabled, and calling - the init() function for all loaded modules. */ - -#define DL_BUFFER_SIZE 1000 - -static int -modinit (void) -{ - int *handler = 0; - __RTINIT *rtinit_info = 0; - int flag; - DL_INFO dl_buffer[DL_BUFFER_SIZE]; - DL_INFO *dl_info = dl_buffer; - int i; - - /* Find __rtinit symbols */ - rtinit_info = find_rtinit (); - - flag = DL_EXECQ; - if (rtinit_info && rtinit_info->rtl) - flag |= DL_LOAD_RTL; - - /* Get a list of modules that have __rtinit */ - if (__loadx (flag, dl_info, (void *) sizeof (dl_buffer), NULL, NULL)) - exit (0x90); - - if (dl_info[0].dlinfo_xflags & DL_INFO_OK) - { - rtinit_info = find_rtinit (); - if ((rtinit_info != NULL) & (rtinit_info->rtl != NULL)) - { - if ((*rtinit_info->rtl) (dl_info, 0)) - exit (0x90); - } - } - - /* Initialization each module loaded that has __rtinit. */ - if (dl_info[0].dlinfo_xflags & DL_INFO_OK) - { - for (i = 1; i < dl_info[0].dlinfo_arraylen + 1; ++i) - if (dl_info[i].dlinfo_flags & DL_HAS_RTINIT) - { - rtinit_info = find_rtini t(); - if (rtinit_info) - mod_init1 (handler, rtinit_info); - } - } - - return 0; -} - - -void -__libc_start_init (void) -{ - /* Do run-time linking, if enabled and call the init() - for all loaded modules. */ - if (__libc_start_data.mcount != __libc_start_data.special) - modinit (); -} - -/* For now these are just stubs. */ -void -__libc_start_fini (void) -{ -} - -void -__libc_start_rtld_fini (void) -{ -} - - -int -__libc_start_main (void) -{ - /* Store the lowest stack address. */ - __libc_stack_end = __libc_start_data.stack; - - /* Used by setenv */ - __environ = __libc_start_data.envp; - -#ifndef SHARED - /* Clear errno. */ - errno = 0; - - /* Some security at this point. Prevent starting a SUID binary where - the standard file descriptors are not opened. We have to do this - only for statically linked applications since otherwise the dynamic - loader did the work already. */ - if (__builtin_expect (__libc_enable_secure, 0)) - __libc_check_standard_fds (); - -#endif - - /* Register the destructor of the dynamic linker if there is any. */ - if (__builtin_expect (__libc_start_data.rtld_fini != NULL, 1)) - __cxa_atexit ((void (*) (void *)) __libc_start_data.rtld_fini, NULL, NULL); - - /* Call the initializer of the libc. This is only needed here if we - are compiling for the static library in which case we haven't - run the constructors in `_dl_start_user'. */ -#ifndef SHARED - __libc_init_first (__libc_start_data.argc, __libc_start_data.argv, - __libc_start_data.envp); -#endif - - /* Register the destructor of the program, if any. */ - if (__libc_start_data.fini) - __cxa_atexit ((void (*) (void *)) __libc_start_data.fini, NULL, NULL); - - /* Call the initializer of the program, if any. */ - if (__libc_start_data.init) - (*__libc_start_data.init) (); - - exit ((*__libc_start_data.main) (__libc_start_data.argc, - __libc_start_data.argv, - __libc_start_data.envp)); -} diff --git a/sysdeps/unix/sysv/aix/start.s b/sysdeps/unix/sysv/aix/start.s deleted file mode 100644 index 79d8ef4891..0000000000 --- a/sysdeps/unix/sysv/aix/start.s +++ /dev/null @@ -1,126 +0,0 @@ -/* Copyright (C) 2001 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. - - In addition to the permissions in the GNU Lesser General Public - License, the Free Software Foundation gives you unlimited - permission to link the compiled version of this file with other - programs, and to distribute those programs without any restriction - coming from the use of this file. (The GNU Lesser General Public - License restrictions do apply in other respects; for example, they - cover modification of the file, and distribution when not linked - into another program.) - - Note that people who make modified versions of this file are not - obligated to grant this special exception for their modified - versions; it is their choice whether to do so. The GNU Lesser - General Public License gives permission to release a modified - version without this exception; this exception also makes it - possible to release a modified version which carries forward this - exception. - - 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. */ - - .file "start.s" - .toc -T.lsd: .tc __libc_start_data[tc], __libc_start_data[rw] -T.main: .tc main[tc], main[rw] -T.init: .tc __libc_start_init[tc], __libc_start_init[rw] -T.fini: .tc __libc_start_fini[tc], __libc_start_init[rw] -T.rtld_fini : .tc __libc_start_rtld_fini[tc], __libc_start_rtld_fini[rw] - - .globl __start - .globl .__start - .globl __libc_start_data - - .extern .__libc_start_main - .extern .main - .extern main - .extern __libc_start_init - .extern __libc_start_fini - .extern __libc_start_rtld_fini - -/* Text */ - - .csect __start[ds] -__start: - .long .__start, TOC[tc0], 0 - - .csect .text[pr] -.__start: - -/* No prologue needed, __start does not have to follow the ABI. - - Input from kernel/loader - r1 : stack - r2 : TOC - r3 : argc - r4 : argv - r5 : envp - r28 : data origin - r29 : text origin - r30 : module count - r31 : default processing flag - - If r31 == r30, no special processing is needed, ie r28, r29 & r30 - are not used - - Save input in __libc_start_data */ - l 16, T.lsd(2) - st 1, 0(16) /* stack */ - st 2, 4(16) /* toc */ - st 3, 8(16) /* argc */ - st 4, 12(16) /* argv */ - st 5, 16(16) /* envp */ - st 28, 20(16) /* data origin */ - st 29, 24(16) /* text origin */ - st 30, 28(16) /* module count */ - st 31, 32(16) /* special */ - -/* Call __libc_start_main() */ - - bl .__libc_start_main - nop - -/* No epilog needed, __start does not have to follow the ABI */ - -/* Trace back */ -TB.__start: - .long 0x0 - .long 0xc2040 - .long 0x0 - .long TB.__start - .__start - .short 7 - .byte "__start" - .byte 0,0,0 - -/* Data - __libc_start_data - Space to keep libc initialization information */ - - .csect __libc_start_data[rw] -__libc_start_data: -/* For kernel/loader input args */ - .space 36 - -/* Externs */ - .long main -init: - .long __libc_start_init -fini: - .long __libc_start_fini -rtld_fini: - .long __libc_start_rtld_fini - .space 0x1000 + (4 + rtld_fini - __libc_start_data) diff --git a/sysdeps/unix/sysv/aix/statfs.c b/sysdeps/unix/sysv/aix/statfs.c deleted file mode 100644 index 1ead597da6..0000000000 --- a/sysdeps/unix/sysv/aix/statfs.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 1999, 2000, 2002 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. */ - -#include - -extern int statfs (const char *file, struct statfs *buf); - -int -__statfs (const char *file, struct statfs *buf) -{ - return statfs (file, buf); -} -libc_hidden_def (__statfs) diff --git a/sysdeps/unix/sysv/aix/symlink.c b/sysdeps/unix/sysv/aix/symlink.c deleted file mode 100644 index cb24965952..0000000000 --- a/sysdeps/unix/sysv/aix/symlink.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -int -__symlink (from, to) - const char *from; - const char *to; -{ - return symlink (from, to); -} diff --git a/sysdeps/unix/sysv/aix/sync.c b/sysdeps/unix/sysv/aix/sync.c deleted file mode 100644 index 6036fbbffd..0000000000 --- a/sysdeps/unix/sysv/aix/sync.c +++ /dev/null @@ -1 +0,0 @@ -/* This is a system call. */ diff --git a/sysdeps/unix/sysv/aix/sys/param.h b/sysdeps/unix/sysv/aix/sys/param.h deleted file mode 100644 index 7448f1a6eb..0000000000 --- a/sysdeps/unix/sysv/aix/sys/param.h +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (C) 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 - 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 _SYS_PARAM_H -#define _SYS_PARAM_H 1 - -/* This file should contain various parameter macros appropriate for the - machine and operating system. There is no standard set of macros; this - file is just for compatibility with programs written for Unix that - expect it to define things. On Unix systems that do not have their own - sysdep version of this file, it is generated at build time by examining - the installed headers on the system. */ - -#include - -#define MAXSYMLINKS 1 -#define MAXPATHLEN 256 - -/* The pagesize is 4096. */ -#define EXEC_PAGESIZE 4096 - -/* maximum number of supplemental groups. */ -#define NGROUPS 32 - -/* Macros for min/max. */ -#define MIN(a,b) (((a)<(b))?(a):(b)) -#define MAX(a,b) (((a)>(b))?(a):(b)) - - -/* Maximum length of hostname. */ -#define MAXHOSTNAMELEN 256 - -#endif /* sys/param.h */ diff --git a/sysdeps/unix/sysv/aix/sys/ucontext.h b/sysdeps/unix/sysv/aix/sys/ucontext.h deleted file mode 100644 index ddb3f010c9..0000000000 --- a/sysdeps/unix/sysv/aix/sys/ucontext.h +++ /dev/null @@ -1,113 +0,0 @@ -/* 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 - 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 _SYS_UCONTEXT_H -#define _SYS_UCONTEXT_H 1 - -#include -#include -#include - - -/* Alternate, preferred interface. */ -typedef struct sigaltstack - { - void *ss_sp; - size_t ss_size; - int ss_flags; - int __pad[4]; - } stack_t; - - -/* Forward declaration of AIX type. */ -typedef struct label_t label_t; - - - -typedef unsigned int kvmhandle_t; -typedef struct - { - unsigned long int __alloc; - kvmhandle_t __srval[16]; - } adspace_t; - - - -#define _NGPRS 32 -#define _NFPRS 32 - -struct __mstsafe -{ - struct __mstsave *__prev; /* Previous save area. */ - label_t *__kjmpbuf; /* Pointer to saved context. */ - char *__stackfix; /* Stack fix pointer. */ - char __intpri; /* Interrupt priority. */ - char __backt; /* Back-track flag. */ - char __rsvd[2]; /* Reserved. */ - __pid_t __curid; /* Copy of curid. */ - - int __excp_type; /* Exception type for debugger. */ - unsigned long int __iar; /* Instruction address register. */ - unsigned long int __msr; /* Machine state register. */ - unsigned long int __cr; /* Condition register. */ - unsigned long int __lr; /* Link register. */ - unsigned long int __ctr; /* Count register. */ - unsigned long int __xer; /* Fixed point exception. */ - unsigned long int __mq; /* Multiply/quotient register. */ - unsigned long int __tid; /* TID register. */ - unsigned long int __fpscr; /* Floating point status reg. */ - char __fpeu; /* Floating point ever used. */ - char __fpinfo; /* Floating point status flags. */ - char __pad[2]; /* Pad to dword boundary. */ - /* 1 implies state is in mstext */ - unsigned long int __except[5]; /* exception structure. */ - char __pad1[4]; /* Old bus field. */ - unsigned long int __o_iar; /* Old iar (for longjmp excpt). */ - unsigned long int __o_toc; /* Old toc (for longjmp excpt). */ - unsigned long int __o_arg1; /* Old arg1 (for longjmp excpt). */ - unsigned long int __excbranch; /* If not NULL, address to branch - to on exception. Used by - assembler routines for low - cost exception handling. */ - unsigned long int __fpscrx; /* Software extension to fpscr. */ - unsigned long int __o_vaddr; /* Saved vaddr for vmexception. */ - unsigned long int __cachealign[7]; /* Reserved. */ - adspace_t __as; /* Segment registers. */ - unsigned long int __gpr[_NGPRS]; /* General purpose registers. */ - double __fpr[_NFPRS]; /* Floating point registers. */ - }; - -typedef struct mcontext_t - { - struct __mstsafe __jmp_context; - } mcontext_t; - - -typedef struct ucontext_t - { - int __sc_onstack; /* Sigstack state to restore. */ - __sigset_t uc_sigmask; /* The set of signals that are blocked when - this context is active. */ - int __sc_uerror; /* u_error to restore. */ - mcontext_t uc_mcontext; /* Machine-specific image of saved context. */ - struct ucontext_t *uc_link; /* context resumed after this one returns */ - stack_t uc_stack; /* stack used by context */ - int __pad[4]; - } ucontext_t; - -#endif /* sys/ucontext.h */ diff --git a/sysdeps/unix/sysv/aix/syscall.c b/sysdeps/unix/sysv/aix/syscall.c deleted file mode 100644 index 6f204ff809..0000000000 --- a/sysdeps/unix/sysv/aix/syscall.c +++ /dev/null @@ -1,2 +0,0 @@ -/* XXX We will have to see whether it is possible to implement this - function at all. */ diff --git a/sysdeps/unix/sysv/aix/sysdep.h b/sysdeps/unix/sysv/aix/sysdep.h deleted file mode 100644 index dcf37f2533..0000000000 --- a/sysdeps/unix/sysv/aix/sysdep.h +++ /dev/null @@ -1,88 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - - -/* This seems to always be the case on PPC. */ -#define ALIGNARG(log2) log2 - -/* How to define local lables. */ -#define L(name) L..##name - -/* Label in text section. */ -#define C_TEXT(name) .##name - -/* Function descriptor. */ -#define FUNCDESC(real, code) \ - .toc; \ - .csect real##[DS], 3; \ - .globl real; \ -real: \ - .long code, TOC[tc0], 0; - -/* Code to generate function entry code. */ -#define ENTRY(name) \ - FUNCDESC (name, C_TEXT (name)) \ - .csect .text[PR], 2; \ - .globl C_TEXT (name); \ -C_TEXT (name): - -/* XXX For now we don't define any code. */ -#define CALL_MCOUNT - -#define EALIGN_W_0 /* No words to insert. */ -#define EALIGN_W_1 nop -#define EALIGN_W_2 nop;nop -#define EALIGN_W_3 nop;nop;nop -#define EALIGN_W_4 EALIGN_W_3;nop -#define EALIGN_W_5 EALIGN_W_4;nop -#define EALIGN_W_6 EALIGN_W_5;nop -#define EALIGN_W_7 EALIGN_W_6;nop - -/* EALIGN is like ENTRY, but does alignment to 'words'*4 bytes - past a 2^align boundary. */ -#ifdef PROF -#define EALIGN(name, alignt, words) \ - FUNCDESC (name, C_TEXT (name)) \ - .csect .text[PR], 2; \ - .align ALIGNARG(2); \ - .globl C_TEXT (name); \ -C_TEXT (name): \ - CALL_MCOUNT \ - b L(align_0); \ - .align ALIGNARG(alignt); \ - EALIGN_W_##words; \ -L(align_0): -#else /* PROF */ -#define EALIGN(name, alignt, words) \ - FUNCDESC (name, C_TEXT (name)) \ - .csect .text[PR], 2; \ - .align ALIGNARG(alignt); \ - EALIGN_W_##words; \ - .globl C_TEXT (name); \ -C_TEXT (name): -#endif - -/* No special end code for now. We will eventually add to usual prolog - with function length etc. */ -#define END(name) - - -/* Jumping to another function. We are jumping to the TOC entry. */ -#define JUMPTARGET(name) C_TEXT (name) diff --git a/sysdeps/unix/sysv/aix/sysv_termio.h b/sysdeps/unix/sysv/aix/sysv_termio.h deleted file mode 100644 index f314c0e16f..0000000000 --- a/sysdeps/unix/sysv/aix/sysv_termio.h +++ /dev/null @@ -1,155 +0,0 @@ -/* Copyright (C) 1992, 1997, 2001 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. */ - -/* In various parts of this file we define the System V values for - things as _SYSV_. Those are the values that System V - uses for termio, and also (SVR4) termios. Not necessarily the - same as the GNU termios that the library user sees. */ - -/* Number of elements of c_cc. termio only. */ -#define _SYSV_NCC 8 - -#define _SYSV_VINTR 0 -#define _SYSV_VQUIT 1 -#define _SYSV_VERASE 2 -#define _SYSV_VKILL 3 -#define _SYSV_VEOF 4 -/* This field means VEOF if ICANON, VMIN if not. */ -#define _SYSV_VMIN 4 -#define _SYSV_VEOL 5 -/* This field means VEOL if ICANON, VTIME if not. */ -#define _SYSV_VTIME 5 -#define _SYSV_VEOL2 6 - -/* Flags in c_iflag. */ -#define _SYSV_IGNBRK 1 -#define _SYSV_BRKINT 2 -#define _SYSV_IGNPAR 4 -#define _SYSV_PARMRK 8 -#define _SYSV_INPCK 0x10 -#define _SYSV_ISTRIP 0x20 -#define _SYSV_INLCR 0x40 -#define _SYSV_IGNCR 0x80 -#define _SYSV_ICRNL 0x100 -#define _SYSV_IUCLC 0x200 -#define _SYSV_IXON 0x400 -#define _SYSV_IXANY 0x800 -#define _SYSV_IXOFF 0x1000 -#define _SYSV_IMAXBEL 0x2000 - -/* Flags in c_cflag. */ -#define _SYSV_CBAUD 0xf -#define _SYSV_CIBAUD 0xf0000 /* termios only. */ -#define _SYSV_IBSHIFT 16 -/* Values for CBAUD and CIBAUD. */ -#define _SYSV_B0 0 -#define _SYSV_B50 1 -#define _SYSV_B75 2 -#define _SYSV_B110 3 -#define _SYSV_B134 4 -#define _SYSV_B150 5 -#define _SYSV_B200 6 -#define _SYSV_B300 7 -#define _SYSV_B600 8 -#define _SYSV_B1200 9 -#define _SYSV_B1800 10 -#define _SYSV_B2400 11 -#define _SYSV_B4800 12 -#define _SYSV_B9600 13 -#define _SYSV_B19200 14 -#define _SYSV_B38400 15 - -#define _SYSV_CS5 0 -#define _SYSV_CS6 0x10 -#define _SYSV_CS7 0x20 -#define _SYSV_CS8 0x30 -#define _SYSV_CSIZE 0x30 -#define _SYSV_CSTOPB 0x40 -#define _SYSV_CREAD 0x80 -#define _SYSV_PARENB 0x100 -#define _SYSV_PARODD 0x200 -#define _SYSV_HUPCL 0x400 -#define _SYSV_CLOCAL 0x800 - -/* Flags in c_lflag. */ -#define _SYSV_ISIG 1 -#define _SYSV_ICANON 2 -#define _SYSV_ECHO 8 -#define _SYSV_ECHOE 0x10 -#define _SYSV_ECHOK 0x20 -#define _SYSV_ECHONL 0x40 -#define _SYSV_NOFLSH 0x80 -#define _SYSV_TOSTOP 0x100 -#define _SYSV_ECHOCTL 0x200 -#define _SYSV_ECHOPRT 0x400 -#define _SYSV_ECHOKE 0x800 -#define _SYSV_FLUSHO 0x2000 -#define _SYSV_PENDIN 0x4000 -#define _SYSV_IEXTEN 0x8000 - -/* Flags in c_oflag. */ -#define _SYSV_OPOST 1 -#define _SYSV_OLCUC 2 -#define _SYSV_ONLCR 4 -#define _SYSV_NLDLY 0x100 -#define _SYSV_NL0 0 -#define _SYSV_NL1 0x100 -#define _SYSV_CRDLY 0x600 -#define _SYSV_CR0 0 -#define _SYSV_CR1 0x200 -#define _SYSV_CR2 0x400 -#define _SYSV_CR3 0x600 -#define _SYSV_TABDLY 0x1800 -#define _SYSV_TAB0 0 -#define _SYSV_TAB1 0x0800 -#define _SYSV_TAB2 0x1000 -/* TAB3 is an obsolete name for XTABS. But we provide it since some - programs expect it to exist. */ -#define _SYSV_TAB3 0x1800 -#define _SYSV_XTABS 0x1800 -#define _SYSV_BSDLY 0x2000 -#define _SYSV_BS0 0 -#define _SYSV_BS1 0x2000 -#define _SYSV_VTDLY 0x4000 -#define _SYSV_VT0 0 -#define _SYSV_VT1 0x4000 -#define _SYSV_FFDLY 0x8000 -#define _SYSV_FF0 0 -#define _SYSV_FF1 0x8000 - -/* ioctl's. */ - -#define _TCGETA 0x5405 -#define _TCSETA 0x5406 -#define _TCSETAW 0x5407 -#define _TCSETAF 0x5408 -#define _TCSBRK 0x5409 -#define _TCXONC 0x540B -#define _TCFLSH 0x540C -#define _TIOCGPGRP 0x7414 -#define _TIOCSPGRP 0x7415 - -struct __sysv_termio - { - unsigned short c_iflag; - unsigned short c_oflag; - unsigned short c_cflag; - unsigned short c_lflag; - char c_line; - unsigned char c_cc[_SYSV_NCC]; - }; diff --git a/sysdeps/unix/sysv/aix/tcgetattr.c b/sysdeps/unix/sysv/aix/tcgetattr.c deleted file mode 100644 index 01ffd55eff..0000000000 --- a/sysdeps/unix/sysv/aix/tcgetattr.c +++ /dev/null @@ -1,152 +0,0 @@ -/* Copyright (C) 1992, 1995, 1996, 1997, 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 - 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. */ - -#include -#include -#include -#include -#include - -/* Put the state of FD into *TERMIOS_P. */ -int -__tcgetattr (fd, termios_p) - int fd; - struct termios *termios_p; -{ - struct __sysv_termio buf; - - if (termios_p == NULL) - { - __set_errno (EINVAL); - return -1; - } - - if (__ioctl (fd, _TCGETA, &buf) < 0) - return -1; - - termios_p->c_cflag &= ~0x000f0000; - termios_p->c_cflag |= (termios_p->c_cflag & 0xf) << 16; - - termios_p->c_iflag = 0; - if (buf.c_iflag & _SYSV_IGNBRK) - termios_p->c_iflag |= IGNBRK; - if (buf.c_iflag & _SYSV_BRKINT) - termios_p->c_iflag |= BRKINT; - if (buf.c_iflag & _SYSV_IGNPAR) - termios_p->c_iflag |= IGNPAR; - if (buf.c_iflag & _SYSV_PARMRK) - termios_p->c_iflag |= PARMRK; - if (buf.c_iflag & _SYSV_INPCK) - termios_p->c_iflag |= INPCK; - if (buf.c_iflag & _SYSV_ISTRIP) - termios_p->c_iflag |= ISTRIP; - if (buf.c_iflag & _SYSV_INLCR) - termios_p->c_iflag |= INLCR; - if (buf.c_iflag & _SYSV_IGNCR) - termios_p->c_iflag |= IGNCR; - if (buf.c_iflag & _SYSV_ICRNL) - termios_p->c_iflag |= ICRNL; - if (buf.c_iflag & _SYSV_IXON) - termios_p->c_iflag |= IXON; - if (buf.c_iflag & _SYSV_IXOFF) - termios_p->c_iflag |= IXOFF; - if (buf.c_iflag & _SYSV_IXANY) - termios_p->c_iflag |= IXANY; - if (buf.c_iflag & _SYSV_IMAXBEL) - termios_p->c_iflag |= IMAXBEL; - - termios_p->c_oflag = 0; - if (buf.c_oflag & OPOST) - termios_p->c_oflag |= OPOST; - if (buf.c_oflag & ONLCR) - termios_p->c_oflag |= ONLCR; - termios_p->c_cflag = 0; - switch (buf.c_cflag & _SYSV_CSIZE) - { - case _SYSV_CS5: - termios_p->c_cflag |= CS5; - break; - case _SYSV_CS6: - termios_p->c_cflag |= CS6; - break; - case _SYSV_CS7: - termios_p->c_cflag |= CS7; - break; - case _SYSV_CS8: - termios_p->c_cflag |= CS8; - break; - } - if (buf.c_cflag & _SYSV_CSTOPB) - termios_p->c_cflag |= CSTOPB; - if (buf.c_cflag & _SYSV_CREAD) - termios_p->c_cflag |= CREAD; - if (buf.c_cflag & _SYSV_PARENB) - termios_p->c_cflag |= PARENB; - if (buf.c_cflag & _SYSV_PARODD) - termios_p->c_cflag |= PARODD; - if (buf.c_cflag & _SYSV_HUPCL) - termios_p->c_cflag |= HUPCL; - if (buf.c_cflag & _SYSV_CLOCAL) - termios_p->c_cflag |= CLOCAL; - termios_p->c_lflag = 0; - if (buf.c_lflag & _SYSV_ISIG) - termios_p->c_lflag |= ISIG; - if (buf.c_lflag & _SYSV_ICANON) - termios_p->c_lflag |= ICANON; - if (buf.c_lflag & _SYSV_ECHO) - termios_p->c_lflag |= ECHO; - if (buf.c_lflag & _SYSV_ECHOE) - termios_p->c_lflag |= ECHOE; - if (buf.c_lflag & _SYSV_ECHOK) - termios_p->c_lflag |= ECHOK; - if (buf.c_lflag & _SYSV_ECHONL) - termios_p->c_lflag |= ECHONL; - if (buf.c_lflag & _SYSV_NOFLSH) - termios_p->c_lflag |= NOFLSH; - if (buf.c_lflag & _SYSV_TOSTOP) - termios_p->c_lflag |= TOSTOP; - if (buf.c_lflag & _SYSV_ECHOKE) - termios_p->c_lflag |= ECHOKE; - if (buf.c_lflag & _SYSV_ECHOPRT) - termios_p->c_lflag |= ECHOPRT; - if (buf.c_lflag & _SYSV_ECHOCTL) - termios_p->c_lflag |= ECHOCTL; - if (buf.c_lflag & _SYSV_FLUSHO) - termios_p->c_lflag |= FLUSHO; - if (buf.c_lflag & _SYSV_PENDIN) - termios_p->c_lflag |= PENDIN; - if (buf.c_lflag & _SYSV_IEXTEN) - termios_p->c_lflag |= IEXTEN; - - termios_p->c_cc[VEOF] = buf.c_cc[_SYSV_VEOF]; - termios_p->c_cc[VEOL] = buf.c_cc[_SYSV_VEOL]; - termios_p->c_cc[VEOL2] = buf.c_cc[_SYSV_VEOL2]; - termios_p->c_cc[VERASE] = buf.c_cc[_SYSV_VERASE]; - termios_p->c_cc[VKILL] = buf.c_cc[_SYSV_VKILL]; - termios_p->c_cc[VINTR] = buf.c_cc[_SYSV_VINTR]; - termios_p->c_cc[VQUIT] = buf.c_cc[_SYSV_VQUIT]; - termios_p->c_cc[VSTART] = '\021'; /* XON (^Q). */ - termios_p->c_cc[VSTOP] = '\023'; /* XOFF (^S). */ - termios_p->c_cc[VSUSP] = '\0'; /* System V release 3 lacks job control. */ - termios_p->c_cc[VMIN] = buf.c_cc[_SYSV_VMIN]; - termios_p->c_cc[VTIME] = buf.c_cc[_SYSV_VTIME]; - - return 0; -} - -weak_alias (__tcgetattr, tcgetattr) diff --git a/sysdeps/unix/sysv/aix/tcsetattr.c b/sysdeps/unix/sysv/aix/tcsetattr.c deleted file mode 100644 index 8e78da1c2c..0000000000 --- a/sysdeps/unix/sysv/aix/tcsetattr.c +++ /dev/null @@ -1,198 +0,0 @@ -/* Copyright (C) 1992,1995,1996,1997,2000,2002 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. */ - -#include -#include -#include -#include - -#include - - -const speed_t __unix_speeds[] = - { - 0, - 50, - 75, - 110, - 134, - 150, - 200, - 300, - 600, - 1200, - 1800, - 2400, - 4800, - 9600, - 19200, - 38400, - }; - - -/* Set the state of FD to *TERMIOS_P. */ -int -tcsetattr (fd, optional_actions, termios_p) - int fd; - int optional_actions; - const struct termios *termios_p; -{ - struct __sysv_termio buf; - int ioctl_function; - - if (termios_p == NULL) - { - __set_errno (EINVAL); - return -1; - } - switch (optional_actions) - { - case TCSANOW: - ioctl_function = _TCSETA; - break; - case TCSADRAIN: - ioctl_function = _TCSETAW; - break; - case TCSAFLUSH: - ioctl_function = _TCSETAF; - break; - default: - __set_errno (EINVAL); - return -1; - } - - if ((termios_p->c_cflag & 0x000f0000) >> 16 != (termios_p->c_cflag & 0xf)) - { - __set_errno (EINVAL); - return -1; - } - - buf.c_iflag = 0; - if (termios_p->c_iflag & IGNBRK) - buf.c_iflag |= _SYSV_IGNBRK; - if (termios_p->c_iflag & BRKINT) - buf.c_iflag |= _SYSV_BRKINT; - if (termios_p->c_iflag & IGNPAR) - buf.c_iflag |= _SYSV_IGNPAR; - if (termios_p->c_iflag & PARMRK) - buf.c_iflag |= _SYSV_PARMRK; - if (termios_p->c_iflag & INPCK) - buf.c_iflag |= _SYSV_INPCK; - if (termios_p->c_iflag & ISTRIP) - buf.c_iflag |= _SYSV_ISTRIP; - if (termios_p->c_iflag & INLCR) - buf.c_iflag |= _SYSV_INLCR; - if (termios_p->c_iflag & IGNCR) - buf.c_iflag |= _SYSV_IGNCR; - if (termios_p->c_iflag & ICRNL) - buf.c_iflag |= _SYSV_ICRNL; - if (termios_p->c_iflag & IXON) - buf.c_iflag |= _SYSV_IXON; - if (termios_p->c_iflag & IXOFF) - buf.c_iflag |= _SYSV_IXOFF; - if (termios_p->c_iflag & IXANY) - buf.c_iflag |= _SYSV_IXANY; - if (termios_p->c_iflag & IMAXBEL) - buf.c_iflag |= _SYSV_IMAXBEL; - - buf.c_oflag = 0; - if (termios_p->c_oflag & OPOST) - buf.c_oflag |= _SYSV_OPOST; - if (termios_p->c_oflag & ONLCR) - buf.c_oflag |= _SYSV_ONLCR; - - /* So far, buf.c_cflag contains the speed in CBAUD. */ - if (termios_p->c_cflag & CSTOPB) - buf.c_cflag |= _SYSV_CSTOPB; - if (termios_p->c_cflag & CREAD) - buf.c_cflag |= _SYSV_CREAD; - if (termios_p->c_cflag & PARENB) - buf.c_cflag |= _SYSV_PARENB; - if (termios_p->c_cflag & PARODD) - buf.c_cflag |= _SYSV_PARODD; - if (termios_p->c_cflag & HUPCL) - buf.c_cflag |= _SYSV_HUPCL; - if (termios_p->c_cflag & CLOCAL) - buf.c_cflag |= _SYSV_CLOCAL; - switch (termios_p->c_cflag & CSIZE) - { - case CS5: - buf.c_cflag |= _SYSV_CS5; - break; - case CS6: - buf.c_cflag |= _SYSV_CS6; - break; - case CS7: - buf.c_cflag |= _SYSV_CS7; - break; - case CS8: - buf.c_cflag |= _SYSV_CS8; - break; - } - - buf.c_lflag = 0; - if (termios_p->c_lflag & ISIG) - buf.c_lflag |= _SYSV_ISIG; - if (termios_p->c_lflag & ICANON) - buf.c_lflag |= _SYSV_ICANON; - if (termios_p->c_lflag & ECHO) - buf.c_lflag |= _SYSV_ECHO; - if (termios_p->c_lflag & ECHOE) - buf.c_lflag |= _SYSV_ECHOE; - if (termios_p->c_lflag & ECHOK) - buf.c_lflag |= _SYSV_ECHOK; - if (termios_p->c_lflag & ECHONL) - buf.c_lflag |= _SYSV_ECHONL; - if (termios_p->c_lflag & NOFLSH) - buf.c_lflag |= _SYSV_NOFLSH; - if (termios_p->c_lflag & TOSTOP) - buf.c_lflag |= _SYSV_TOSTOP; - if (termios_p->c_lflag & ECHOCTL) - buf.c_lflag |= _SYSV_ECHOCTL; - if (termios_p->c_lflag & ECHOPRT) - buf.c_lflag |= _SYSV_ECHOPRT; - if (termios_p->c_lflag & ECHOKE) - buf.c_lflag |= _SYSV_ECHOKE; - if (termios_p->c_lflag & FLUSHO) - buf.c_lflag |= _SYSV_FLUSHO; - if (termios_p->c_lflag & PENDIN) - buf.c_lflag |= _SYSV_PENDIN; - if (termios_p->c_lflag & IEXTEN) - buf.c_lflag |= _SYSV_IEXTEN; - - buf.c_cc[_SYSV_VINTR] = termios_p->c_cc[VINTR]; - buf.c_cc[_SYSV_VQUIT] = termios_p->c_cc[VQUIT]; - buf.c_cc[_SYSV_VERASE] = termios_p->c_cc[VERASE]; - buf.c_cc[_SYSV_VKILL] = termios_p->c_cc[VKILL]; - if (buf.c_lflag & _SYSV_ICANON) - { - buf.c_cc[_SYSV_VEOF] = termios_p->c_cc[VEOF]; - buf.c_cc[_SYSV_VEOL] = termios_p->c_cc[VEOL]; - } - else - { - buf.c_cc[_SYSV_VMIN] = termios_p->c_cc[VMIN]; - buf.c_cc[_SYSV_VTIME] = termios_p->c_cc[VTIME]; - } - buf.c_cc[_SYSV_VEOL2] = termios_p->c_cc[VEOL2]; - - if (__ioctl (fd, ioctl_function, &buf) < 0) - return -1; - return 0; -} -libc_hidden_def (tcsetattr) diff --git a/sysdeps/unix/sysv/aix/times.c b/sysdeps/unix/sysv/aix/times.c deleted file mode 100644 index 8ebc40b021..0000000000 --- a/sysdeps/unix/sysv/aix/times.c +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -/* Store the CPU time used by this process and all its - dead children (and their dead children) in BUFFER. - Return the elapsed real time, or (clock_t) -1 for errors. - All times are in CLK_TCKths of a second. */ -clock_t -__times (buffer) - struct tms *buffer; -{ - return times (buffer); -} diff --git a/sysdeps/unix/sysv/aix/truncate.c b/sysdeps/unix/sysv/aix/truncate.c deleted file mode 100644 index 247aebb330..0000000000 --- a/sysdeps/unix/sysv/aix/truncate.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -extern int ktruncate (const char *name, long long int length); - -int -__truncate (const char *name, off_t length) -{ - return ktruncate (name, length); -} -strong_alias (__truncate, truncate) diff --git a/sysdeps/unix/sysv/aix/truncate64.c b/sysdeps/unix/sysv/aix/truncate64.c deleted file mode 100644 index 3a219c0184..0000000000 --- a/sysdeps/unix/sysv/aix/truncate64.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -extern int ktruncate (const char *name, long long int length); - -int -__truncate64 (const char *name, off64_t length) -{ - return ktruncate (name, length); -} -strong_alias (__truncate64, truncate64) diff --git a/sysdeps/unix/sysv/aix/uitrunc.c b/sysdeps/unix/sysv/aix/uitrunc.c deleted file mode 100644 index 54cdc3af76..0000000000 --- a/sysdeps/unix/sysv/aix/uitrunc.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -/* The uitrunc function returns the nearest unsigned integer - to the x parameter in the direction of 0. This actions is - equivalent to truncation off the fraction bits of the x - parameter and then converting x to an unsigned integer. */ -unsigned int -__uitrunc (double x) -{ - double xrf; - unsigned int xr; - xr = (unsigned int) x; - xrf = (double) xr; - if (x >= 0.0) - if (x - xrf >= 0.5 && x - xrf < 1.0 && x + 1 > 0) - return x + 1; - else - return x; - else - if (xrf - x >= 0.5 && xrf - x < 1.0 && x - 1 < 0) - return x - 1; - else - return x; -} diff --git a/sysdeps/unix/sysv/aix/ulimit.c b/sysdeps/unix/sysv/aix/ulimit.c deleted file mode 100644 index 44fef64493..0000000000 --- a/sysdeps/unix/sysv/aix/ulimit.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include -#include - -long int -__ulimit (int cmd, ...) -{ - va_list va; - long int arg; - long int res; - - va_start (va, cmd); - arg = va_arg (va, long int); - - res = ulimit (cmd, arg); - - va_end (va); - - return res; -} diff --git a/sysdeps/unix/sysv/aix/umask.c b/sysdeps/unix/sysv/aix/umask.c deleted file mode 100644 index e8c45e40b6..0000000000 --- a/sysdeps/unix/sysv/aix/umask.c +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -mode_t -__umask (mask) - mode_t mask; -{ - return umask (mask); -} diff --git a/sysdeps/unix/sysv/aix/uname.c b/sysdeps/unix/sysv/aix/uname.c deleted file mode 100644 index 6036fbbffd..0000000000 --- a/sysdeps/unix/sysv/aix/uname.c +++ /dev/null @@ -1 +0,0 @@ -/* This is a system call. */ diff --git a/sysdeps/unix/sysv/aix/unlink.c b/sysdeps/unix/sysv/aix/unlink.c deleted file mode 100644 index 6fe9b59c61..0000000000 --- a/sysdeps/unix/sysv/aix/unlink.c +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -int -__unlink (name) - const char *name; -{ - return unlink (name); -} diff --git a/sysdeps/unix/sysv/aix/usleep.c b/sysdeps/unix/sysv/aix/usleep.c deleted file mode 100644 index a1d55eb2bc..0000000000 --- a/sysdeps/unix/sysv/aix/usleep.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (C) 1991, 1992, 1995, 1996, 1997 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. */ - -#include -#include -#include - -extern int __libc_nanosleep (const struct timespec *requested_time, - struct timespec *remaining); - -/* Sleep USECONDS microseconds, or until a previously set timer goes off. */ -int -usleep (useconds) - useconds_t useconds; -{ - struct timespec ts ={.tv_sec = 0, .tv_nsec = (long int)useconds * 1000}; - __libc_nanosleep(&ts,&ts); - return 0; -} diff --git a/sysdeps/unix/sysv/aix/ustat.c b/sysdeps/unix/sysv/aix/ustat.c deleted file mode 100644 index 6036fbbffd..0000000000 --- a/sysdeps/unix/sysv/aix/ustat.c +++ /dev/null @@ -1 +0,0 @@ -/* This is a system call. */ diff --git a/sysdeps/unix/sysv/aix/utimes.c b/sysdeps/unix/sysv/aix/utimes.c deleted file mode 100644 index 9bef02ae03..0000000000 --- a/sysdeps/unix/sysv/aix/utimes.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 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 - 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. */ - -#include - -int -__utimes (file, tvp) - const char *file; - const struct timeval tvp[2]; -{ - return utimes (file, tvp); -} diff --git a/sysdeps/unix/sysv/aix/utmpx.h b/sysdeps/unix/sysv/aix/utmpx.h deleted file mode 100644 index 1647bfe681..0000000000 --- a/sysdeps/unix/sysv/aix/utmpx.h +++ /dev/null @@ -1,89 +0,0 @@ -/* Copyright (C) 1997, 1998, 1999 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 _UTMPX_H -#define _UTMPX_H 1 - -#include -#include - -/* Required according to Unix98. */ -#ifndef __pid_t_defined -typedef __pid_t pid_t; -# define __pid_t_defined -#endif - -/* Get system dependent values and data structures. */ -#include - -#ifdef __USE_GNU -/* Compatibility names for the strings of the canonical file names. */ -# define UTMPX_FILE _PATH_UTMPX -# define UTMPX_FILENAME _PATH_UTMPX -# define WTMPX_FILE _PATH_WTMPX -# define WTMPX_FILENAME _PATH_WTMPX -#endif - -/* For the getutmp{,x} functions we need the `struct utmp'. */ -#ifdef __USE_GNU -struct utmp; -#endif - - -__BEGIN_DECLS - -/* Open user accounting database. */ -extern void setutxent (void) __THROW; - -/* Close user accounting database. */ -extern void endutxent (void) __THROW; - -/* Get the next entry from the user accounting database. */ -extern struct utmpx *getutxent (void) __THROW; - -/* Get the user accounting database entry corresponding to ID. */ -extern struct utmpx *getutxid (__const struct utmpx *__id) __THROW; - -/* Get the user accounting database entry corresponding to LINE. */ -extern struct utmpx *getutxline (__const struct utmpx *__line) __THROW; - -/* Write the entry UTMPX into the user accounting database. */ -extern struct utmpx *pututxline (__const struct utmpx *__utmpx) __THROW; - - -#ifdef __USE_GNU -/* Change name of the utmpx file to be examined. */ -extern int utmpxname (__const char *__file) __THROW; - -/* Append entry UTMP to the wtmpx-like file WTMPX_FILE. */ -extern void updwtmpx (__const char *__wtmpx_file, - __const struct utmpx *__utmpx) __THROW; - - -/* Copy the information in UTMPX to UTMP. */ -extern void getutmp (__const struct utmpx *__utmpx, - struct utmp *__utmp) __THROW; - -/* Copy the information in UTMP to UTMPX. */ -extern void getutmpx (__const struct utmp *__utmp, - struct utmpx *__utmpx) __THROW; -#endif - -__END_DECLS - -#endif /* utmpx.h */ diff --git a/sysdeps/unix/sysv/aix/wait3.c b/sysdeps/unix/sysv/aix/wait3.c deleted file mode 100644 index b0f7faa150..0000000000 --- a/sysdeps/unix/sysv/aix/wait3.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (C) 1992, 93, 1995-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 - 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. */ - -#include -#include -#include -#include - -extern pid_t kwaitpid (int *stat_loc, pid_t pid, int options, - struct rusage *ru_loc, siginfo_t *infop); - -/* Wait for a child to exit. When one does, put its status in *STAT_LOC and - return its process ID. For errors return (pid_t) -1. If USAGE is not nil, - store information about the child's resource usage (as a `struct rusage') - there. If the WUNTRACED bit is set in OPTIONS, return status for stopped - children; otherwise don't. */ -pid_t -__wait3 (__WAIT_STATUS stat_loc, int options, struct rusage *usage) -{ - if (usage != NULL) - { - __set_errno (ENOSYS); - return (pid_t) -1; - } - return kwaitpid (stat_loc.__iptr, WAIT_ANY, options, usage, NULL); -} -strong_alias (__wait3, wait3) diff --git a/sysdeps/unix/sysv/aix/wait4.c b/sysdeps/unix/sysv/aix/wait4.c deleted file mode 100644 index dd08f42782..0000000000 --- a/sysdeps/unix/sysv/aix/wait4.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (C) 1991, 1992, 1995-1997, 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 - 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. */ - -#include -#include -#include -#include - -extern pid_t kwaitpid (int *stat_loc, pid_t pid, int options, - struct rusage *ru_loc, siginfo_t *infop); - -pid_t -__wait4 (__pid_t pid, __WAIT_STATUS stat_loc, int options, - struct rusage *usage) -{ - return kwaitpid (stat_loc.__iptr, pid, options, usage, NULL); -} -strong_alias (__wait4, wait4) diff --git a/sysdeps/unix/sysv/aix/waitid.c b/sysdeps/unix/sysv/aix/waitid.c deleted file mode 100644 index 1d637df76e..0000000000 --- a/sysdeps/unix/sysv/aix/waitid.c +++ /dev/null @@ -1,83 +0,0 @@ -/* Pseudo implementation of waitid. - Copyright (C) 1997, 1998, 2000, 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Zack Weinberg , 1997. - - 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. */ - -#include -#include -#define __need_NULL -#include -#include -#include - -#include - -extern pid_t kwaitpid (int *stat_loc, pid_t pid, int options, - struct rusage *ru_loc, siginfo_t *infop); - -int -__waitid (idtype, id, infop, options) - idtype_t idtype; - id_t id; - siginfo_t *infop; - int options; -{ - pid_t pid, child; - int status; - - switch (idtype) - { - case P_PID: - if(id <= 0) - goto invalid; - pid = (pid_t) id; - break; - case P_PGID: - if (id < 0 || id == 1) - goto invalid; - pid = (pid_t) -id; - break; - case P_ALL: - pid = -1; - break; - default: - invalid: - __set_errno (EINVAL); - return -1; - } - - /* Technically we're supposed to return EFAULT if infop is bogus, - but that would involve mucking with signals, which is - too much hassle. User will have to deal with SIGSEGV/SIGBUS. - We just check for a null pointer. */ - - if (infop == NULL) - { - __set_errno (EFAULT); - return -1; - } - - child = kwaitpid (&status, pid, options, NULL, infop); - - if (child == -1) - /* `waitpid' set `errno' for us. */ - return -1; - - return 0; -} -weak_alias (__waitid, waitid) diff --git a/sysdeps/unix/sysv/aix/waitpid.c b/sysdeps/unix/sysv/aix/waitpid.c deleted file mode 100644 index 19bcbab722..0000000000 --- a/sysdeps/unix/sysv/aix/waitpid.c +++ /dev/null @@ -1,53 +0,0 @@ -/* Copyright (C) 1991,95,96,97,2000,02 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. */ - -#include -#include -#include -#include - -extern pid_t kwaitpid (int *stat_loc, pid_t pid, int options, - struct rusage *ru_loc, siginfo_t *infop); - - -/* Wait for a child matching PID to die. - If PID is greater than 0, match any process whose process ID is PID. - If PID is (pid_t) -1, match any process. - If PID is (pid_t) 0, match any process with the - same process group as the current process. - If PID is less than -1, match any process whose - process group is the absolute value of PID. - If the WNOHANG bit is set in OPTIONS, and that child - is not already dead, return (pid_t) 0. If successful, - return PID and store the dead child's status in STAT_LOC. - Return (pid_t) -1 for errors. If the WUNTRACED bit is set in OPTIONS, - return status for stopped children; otherwise don't. */ -pid_t -__libc_waitpid (pid_t pid, int *stat_loc, int options) -{ - if ((options & ~(WNOHANG|WUNTRACED)) != 0) - { - __set_errno (EINVAL); - return (pid_t) -1; - } - - return kwaitpid (stat_loc, pid, options, NULL, NULL); -} -weak_alias (__libc_waitpid, __waitpid) -libc_hidden_weak (__waitpid) -weak_alias (__libc_waitpid, waitpid) diff --git a/sysdeps/unix/sysv/aix/write.c b/sysdeps/unix/sysv/aix/write.c deleted file mode 100644 index 0cc5d33aca..0000000000 --- a/sysdeps/unix/sysv/aix/write.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 1999. - - 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. */ - -#include - -#include "kernel_proto.h" - -ssize_t -__write (fd, ptr, n) - int fd; - const void *ptr; - size_t n; -{ - return kwrite (fd, ptr, n); -} -libc_hidden_def (__write) -/* AIX has no weak aliases (yet) but let's hope for better times. */ -weak_alias (__write, write) -strong_alias (__write, __libc_write) -libc_hidden_def (__libc_write) diff --git a/sysdeps/unix/sysv/aix/writev.c b/sysdeps/unix/sysv/aix/writev.c deleted file mode 100644 index d0e5741590..0000000000 --- a/sysdeps/unix/sysv/aix/writev.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (C) 1991, 1995-1998, 2000, 2002 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. */ - -#include - -extern ssize_t kwritev (int fd, const struct iovec *iovp, size_t iovcnt, - long int ext); - -/* Read data from file descriptor FD, and put the result in the - buffers described by VECTOR, which is a vector of COUNT `struct iovec's. - The buffers are filled in the order specified. - Operates just like `read' (see ) except that data are - put in VECTOR instead of a contiguous buffer. */ -ssize_t -__libc_writev (fd, vector, count) - int fd; - const struct iovec *vector; - int count; -{ - return kwritev (fd, vector, count, 0); -} -strong_alias (__libc_writev, __writev) -weak_alias (__libc_writev, writev) diff --git a/sysdeps/unix/sysv/aix/xstat.c b/sysdeps/unix/sysv/aix/xstat.c deleted file mode 100644 index c76ad07999..0000000000 --- a/sysdeps/unix/sysv/aix/xstat.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright (C) 1999, 2000, 2002 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. */ - -#include -#include - -#define STX_NORMAL 0x00 - -extern int statx (const char *pathname, struct stat *st, int len, int cmd); - -int -__xstat (int ver, const char *pathname, struct stat *st) -{ - assert (ver == 0); - return statx (pathname, st, sizeof (*st), STX_NORMAL); -} -hidden_def (__xstat) diff --git a/sysdeps/unix/sysv/aix/xstat64.c b/sysdeps/unix/sysv/aix/xstat64.c deleted file mode 100644 index cb1bea1182..0000000000 --- a/sysdeps/unix/sysv/aix/xstat64.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (C) 1999, 2000, 2002 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. */ - -#include -#include - -#define STX_NORMAL 0x00 -#define STX_64 0x08 - - -extern int statx (const char *pathname, struct stat64 *st, int len, int cmd); - -int -__xstat64 (int ver, const char *pathname, struct stat64 *st) -{ - assert (ver == 0); - return statx (pathname, st, sizeof (*st), STX_NORMAL | STX_64); -} -hidden_def (__xstat64) diff --git a/sysdeps/unix/sysv/hpux/bits/errno.h b/sysdeps/unix/sysv/hpux/bits/errno.h deleted file mode 100644 index c9903c6dfe..0000000000 --- a/sysdeps/unix/sysv/hpux/bits/errno.h +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (C) 1991, 1994, 1996, 1997 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. */ - -/* This file defines the `errno' constants. */ - -#if !defined __Emath_defined && (defined _ERRNO_H || defined __need_Emath) -#undef __need_Emath -#define __Emath_defined 1 - -#endif - -#ifdef _ERRNO_H -#define EBADF 9 -#define ENOMEM 12 -#define EINVAL 22 -#define ERANGE 34 -#define ENOMSG 35 -#define ENOSYS 251 -#endif diff --git a/sysdeps/unix/sysv/hpux/bits/setjmp.h b/sysdeps/unix/sysv/hpux/bits/setjmp.h deleted file mode 100644 index 216d7bdd64..0000000000 --- a/sysdeps/unix/sysv/hpux/bits/setjmp.h +++ /dev/null @@ -1,16 +0,0 @@ -/* Define the machine-dependent type `jmp_buf'. Stub version. */ - -#ifndef _SETJMP_H -# error "Never include directly; use instead." -#endif - -/* XXX This should go into different files!!! */ - -#ifdef __hp9000s300 -typedef int __jmp_buf[100]; -#endif /* __hp9000s300 */ - -#ifdef __hp9000s800 -typedef double __jmp_buf[25]; -#endif /* __hp9000s800 */ - diff --git a/sysdeps/unix/sysv/hpux/bits/stat.h b/sysdeps/unix/sysv/hpux/bits/stat.h deleted file mode 100644 index 845b29765f..0000000000 --- a/sysdeps/unix/sysv/hpux/bits/stat.h +++ /dev/null @@ -1,128 +0,0 @@ -/* Copyright (C) 1992, 95, 96, 97, 98, 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 - 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 _SYS_STAT_H -# error "Never include directly; use instead." -#endif - -/* Versions of the `struct stat' data structure. */ -#define _STAT_VER_SVR4 1 -#define _STAT_VER _STAT_VER_SVR4 /* The one defined below. */ - -/* Versions of the `xmknod' interface. */ -#define _MKNOD_VER_SVR4 1 -#define _MKNOD_VER _MKNOD_VER_SVR4 /* The bits defined below. */ - - -struct stat - { - __dev_t st_dev; /* Device. */ - unsigned short int __pad1; -#ifndef __USE_FILE_OFFSET64 - __ino_t st_ino; /* File serial number. */ -#else - __ino64_t st_ino; /* File serial number. */ -#endif - __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. */ - unsigned short int __pad2; -#ifndef __USE_FILE_OFFSET64 - __off_t st_size; /* Size of file, in bytes. */ -#else - __off64_t st_size; /* Size of file, in bytes. */ -#endif - unsigned long int st_blksize; /* Optimal block size for I/O. */ - -#ifndef __USE_FILE_OFFSET64 - __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ -#else - __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ -#endif - __time_t st_atime; /* Time of last access. */ - unsigned long int __unused1; - __time_t st_mtime; /* Time of last modification. */ - unsigned long int __unused2; - __time_t st_ctime; /* Time of last status change. */ - unsigned long int __unused3; - unsigned long int __unused4; - unsigned long int __unused5; - }; - -#ifdef __USE_LARGEFILE64 -struct stat64 - { - __dev_t st_dev; /* Device. */ - unsigned short int __pad1; - - __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. */ - unsigned short int __pad2; - __off64_t st_size; /* Size of file, in bytes. */ - unsigned long int st_blksize; /* Optimal block size for I/O. */ - - __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ - __time_t st_atime; /* Time of last access. */ - unsigned long int __unused1; - __time_t st_mtime; /* Time of last modification. */ - unsigned long int __unused2; - __time_t st_ctime; /* Time of last status change. */ - unsigned long int __unused3; - unsigned long int __unused4; - unsigned long int __unused5; - }; -#endif - -/* Tell code we have these members. */ -#define _STATBUF_ST_BLKSIZE -#define _STATBUF_ST_RDEV - -/* Encoding of the file mode. */ - -#define __S_IFMT 0170000 /* These bits determine file type. */ - -/* File types. */ -#define __S_IFDIR 0040000 /* Directory. */ -#define __S_IFCHR 0020000 /* Character device. */ -#define __S_IFBLK 0060000 /* Block device. */ -#define __S_IFREG 0100000 /* Regular file. */ -#define __S_IFIFO 0010000 /* FIFO. */ - -/* These don't actually exist on System V, but having them doesn't hurt. */ -#define __S_IFLNK 0120000 /* Symbolic link. */ -#define __S_IFSOCK 0140000 /* Socket. */ - -/* POSIX.1b objects. */ -#define __S_TYPEISMQ(buf) (0) -#define __S_TYPEISSEM(buf) (0) -#define __S_TYPEISSHM(buf) (0) - -/* Protection bits. */ - -#define __S_ISUID 04000 /* Set user ID on execution. */ -#define __S_ISGID 02000 /* Set group ID on execution. */ -#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ -#define __S_IREAD 0400 /* Read by owner. */ -#define __S_IWRITE 0200 /* Write by owner. */ -#define __S_IEXEC 0100 /* Execute by owner. */ diff --git a/sysdeps/unix/sysv/hpux/bits/types.h b/sysdeps/unix/sysv/hpux/bits/types.h deleted file mode 100644 index e231841a83..0000000000 --- a/sysdeps/unix/sysv/hpux/bits/types.h +++ /dev/null @@ -1,128 +0,0 @@ -/* Copyright (C) 1991,1992,1994-1998,2000,2001 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. */ - -/* - * Never include this file directly; use instead. - */ - -#ifndef _BITS_TYPES_H -#define _BITS_TYPES_H 1 - -#include - -#define __need_size_t -#include - -/* Convenience types. */ -typedef unsigned char __u_char; -typedef unsigned short __u_short; -typedef unsigned int __u_int; -typedef unsigned long __u_long; -#ifdef __GNUC__ -__extension__ typedef unsigned long long int __u_quad_t; -__extension__ typedef long long int __quad_t; -#else -typedef struct - { - long int __val[2]; - } __quad_t; -typedef struct - { - __u_long __val[2]; - } __u_quad_t; -#endif -typedef signed char __int8_t; -typedef unsigned char __uint8_t; -typedef signed short int __int16_t; -typedef unsigned short int __uint16_t; -typedef signed int __int32_t; -typedef unsigned int __uint32_t; -#ifdef __GNUC__ -__extension__ typedef signed long long int __int64_t; -__extension__ typedef unsigned long long int __uint64_t; -#endif -typedef __quad_t *__qaddr_t; - -typedef long int __dev_t; /* Type of device numbers. */ -typedef long int __uid_t; /* Type of user identifications. */ -typedef long int __gid_t; /* Type of group identifications. */ -typedef __u_long __ino_t; /* Type of file serial numbers. */ -typedef __u_short __mode_t; /* Type of file attribute bitmasks. */ -typedef short __nlink_t; /* Type of file link counts. */ -typedef long int __off_t; /* Type of file sizes and offsets. */ -typedef __quad_t __loff_t; /* Type of file sizes and offsets. */ -typedef long int __pid_t; /* Type of process identifications. */ -typedef long int __ssize_t; /* Type of a byte count, or error. */ -typedef __u_long __rlim_t; /* Type of resource counts. */ -typedef __quad_t __rlim64_t; /* Type of resource counts (LFS). */ -typedef long int __id_t; /* General type for ID. */ - -typedef struct - { - long int __val[2]; - } __fsid_t; /* Type of file system IDs. */ - -/* Everythin' else. */ -typedef long int __daddr_t; /* The type of a disk address. */ -typedef char *__caddr_t; -typedef long int __time_t; -typedef long int __swblk_t; /* Type of a swap block maybe? */ - -typedef __u_long __clock_t; - -/* Number of descriptors that can fit in an `fd_set'. */ -#define __FD_SETSIZE 2048 - - -typedef long int __key_t; - -/* Used in `struct shmid_ds'. */ -typedef unsigned short int __ipc_pid_t; - - -/* Types from the Large File Support interface. */ - -/* Type to count number os disk blocks. */ -typedef __u_long __blkcnt_t; -typedef __u_quad_t __blkcnt64_t; - -/* Type to count file system blocks. */ -typedef long int __fsblkcnt_t; -typedef __quad_t __fsblkcnt64_t; - -/* Type to count file system inodes. */ -typedef __u_long __fsfilcnt_t; -typedef __u_quad_t __fsfilcnt64_t; - -/* Type of file serial numbers. */ -typedef __u_long __ino64_t; - -/* Type of file sizes and offsets. */ -typedef __loff_t __off64_t; - -/* Used in XTI. */ -typedef int __t_scalar_t; -typedef unsigned int __t_uscalar_t; - -/* Duplicates info from stdint.h but this is used in unistd.h. */ -typedef int __intptr_t; - -/* Duplicate info from sys/socket.h. */ -typedef unsigned int __socklen_t; - -#endif /* bits/types.h */ diff --git a/sysdeps/unix/sysv/hpux/sysdep.h b/sysdeps/unix/sysv/hpux/sysdep.h deleted file mode 100644 index 89a3377116..0000000000 --- a/sysdeps/unix/sysv/hpux/sysdep.h +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright (C) 1999 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper, , August 1999. - - 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. */ - -/* No underscores necessary. */ -#define NO_UNDERSCORES - -#include - -/* HPUX uses the usual syscall naming. */ -#define SYS_ify(name) SYS_##name diff --git a/sysdeps/unix/sysv/i386/signal.S b/sysdeps/unix/sysv/i386/signal.S deleted file mode 100644 index af51bc5182..0000000000 --- a/sysdeps/unix/sysv/i386/signal.S +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (C) 1992, 1997 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. */ - -#include - -/* This is just a standard system call, except we need to load %edx - with the address of the `__sigreturn' function. */ - - .globl syscall_error - .globl C_SYMBOL_NAME(__sigreturn) -ENTRY (signal) - lea SYS_signal, %eax - lea C_SYMBOL_NAME(__sigreturn), %edx - .byte 0x9a, 0, 0, 0, 0, 7, 0 /* lcall $7, $0 -- GAS bug. */ - jb syscall_error - ret diff --git a/sysdeps/unix/sysv/i386/sigreturn.S b/sysdeps/unix/sysv/i386/sigreturn.S deleted file mode 100644 index edf4418c5b..0000000000 --- a/sysdeps/unix/sysv/i386/sigreturn.S +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 1994, 1995, 1997 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. */ - -#include - -.text -ENTRY (__sigreturn) - addl $4, %esp /* Pop the return PC. */ - lcall $0xf, $0 /* Do the magic sigreturn trap. */ - /* NOTREACHED */ - -weak_alias (__sigreturn, sigreturn) diff --git a/sysdeps/unix/sysv/irix4/Implies b/sysdeps/unix/sysv/irix4/Implies deleted file mode 100644 index 35e1edd830..0000000000 --- a/sysdeps/unix/sysv/irix4/Implies +++ /dev/null @@ -1,4 +0,0 @@ -# Irix 4 has the set of things which are also common to BSD and SVR4. -unix/common -# Irix 4 has the canonical set of system calls. -unix/mman diff --git a/sysdeps/unix/sysv/irix4/Makefile b/sysdeps/unix/sysv/irix4/Makefile deleted file mode 100644 index d07981e8f7..0000000000 --- a/sysdeps/unix/sysv/irix4/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright (C) 1993, 1997 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. - -ifeq ($(subdir),signal) -sysdep_routines := $(sysdep_routines) sigtramp __handler -endif - -ifeq ($(subdir),misc) -sysdep_routines := $(sysdep_routines) syssgi sysmp -endif diff --git a/sysdeps/unix/sysv/irix4/__handler.S b/sysdeps/unix/sysv/irix4/__handler.S deleted file mode 100644 index f02121a0c2..0000000000 --- a/sysdeps/unix/sysv/irix4/__handler.S +++ /dev/null @@ -1,117 +0,0 @@ -/* Copyright (C) 1992, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@cs.widener.edu). - Also hacked by Ian Lance Taylor (ian@airs.com). - - 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. */ - -#include - -/* This function saves all the registers, calls the - user function, and then executes a sigreturn system call. The - sigreturn call wants the address of a sigcontext structure. This - is all hideously system dependent and, for all intents and - purposes, undocumented. - - When we enter here, a3 holds the user's signal handler. We are - supposed to fill in the context given in a2, and then pass it and - the first two arguments to the user's function. If the user's - function returns, we execute a sigreturn system call. - - The sc_onstack, sc_mask and sc_pc elements of the context are - already set by the kernel. For some reason we don't have to save - the floating point state or the coprocessor state; the kernel may - have saved them for us, or it doesn't use them. */ - -.set noat -ENTRY (__handler) -#if 0 - /* Store zero and the asm temp reg. */ - sw $0, 12(a2) - sw AT, 16(a2) - - /* Put v1 in sc_regs[3]. */ - sw v1, 24(a2) - - /* Save the caller saved registers in sc_regs[8..15]. */ - sw t0, 44(a2) - sw t1, 48(a2) - sw t2, 52(a2) - sw t3, 56(a2) - sw t4, 60(a2) - sw t5, 64(a2) - sw t6, 68(a2) - sw t7, 72(a2) - - /* Save the callee saved registers in sc_regs[16..23]. */ - sw s0, 76(a2) - sw s1, 80(a2) - sw s2, 84(a2) - sw s3, 88(a2) - sw s4, 92(a2) - sw s5, 96(a2) - sw s6, 100(a2) - sw s7, 104(a2) - - /* Save the code generator registers in sc_regs[24] & sc_regs[25]. */ - sw t8, 108(a2) - sw t9, 112(a2) - - /* Save the kernel temp regs in sc_regs[26] & sc_regs[27]. */ - sw k0, 116(a2) - sw k1, 120(a2) - - /* Save the global pointer in sc_regs[28]. */ - sw gp, 124(a2) - - /* ... and also the return address in sc_regs[31]. */ - sw ra, 136(a2) - - /* Note: we don't save the stack pointer in sc_regs[29]; - instead, we use the one that was already there. */ -#if 0 - sw sp, 128(a2) -#endif - - /* Save the floating pointer in sc_regs[30]. */ - sw fp, 132(a2) - - /* Save the mul/div stuff in sc_mdlo and sc_mdhi. */ - mflo t0 - sw t0, 140(a2) - mfhi t0 - sw t0, 144(a2) - -#endif - /* Move the stack up six. This will save the context. */ - addu sp, sp, -24 - sw a2, 16(sp) - - /* Call their handler with the signal, code, and context; note - this will clobber the context. */ - .set noreorder - jal ra, a3 - nop - .set reorder - - /* When we come back, restore the context and pass it right - on into sigreturn(). */ - lw a0, 16(sp) - - /* Do a sigreturn syscall; this doesn't return. */ - li v0, SYS_sigreturn - syscall - nop diff --git a/sysdeps/unix/sysv/irix4/bits/confname.h b/sysdeps/unix/sysv/irix4/bits/confname.h deleted file mode 100644 index ed334694cd..0000000000 --- a/sysdeps/unix/sysv/irix4/bits/confname.h +++ /dev/null @@ -1,84 +0,0 @@ -/* `sysconf', `pathconf', and `confstr' NAME values. Irix 4 version. - Copyright (C) 1994, 1997 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 _UNISTD_H -# error "Never use directly; include instead." -#endif - -/* Values for the NAME argument to `pathconf' and `fpathconf'. */ -enum - { - _PC_LINK_MAX = 1, - _PC_MAX_CANON, - _PC_MAX_INPUT, - _PC_NAME_MAX, - _PC_PATH_MAX, - _PC_PIPE_BUF, - _PC_CHOWN_RESTRICTED, - _PC_NO_TRUNC, - _PC_VDISABLE - }; - -/* Values for the argument to `sysconf'. */ -enum - { - _SC_ARG_MAX = 1, - _SC_CHILD_MAX, - _SC_CLK_TCK, - _SC_NGROUPS_MAX, - _SC_OPEN_MAX, - _SC_JOB_CONTROL, - _SC_SAVED_IDS, - _SC_VERSION, - - /* Above are done by the Irix system call. - The rest are done by the C library (or are not really implemented). */ - - _SC_STREAM_MAX, - _SC_TZNAME_MAX, - _SC_PAGESIZE, - - /* Values for the argument to `sysconf' - corresponding to _POSIX2_* symbols. */ - _SC_BC_BASE_MAX, - _SC_BC_DIM_MAX, - _SC_BC_SCALE_MAX, - _SC_BC_STRING_MAX, - _SC_COLL_WEIGHTS_MAX, - _SC_EQUIV_CLASS_MAX, - _SC_EXPR_NEST_MAX, - _SC_LINE_MAX, - _SC_RE_DUP_MAX, - - _SC_2_VERSION, - _SC_2_C_BIND, - _SC_2_C_DEV, - _SC_2_FORT_DEV, - _SC_2_FORT_RUN, - _SC_2_SW_DEV, - _SC_2_LOCALEDEF - }; - -#ifdef __USE_POSIX2 -/* Values for the NAME argument to `confstr'. */ -enum - { - _CS_PATH /* The default search path. */ - }; -#endif diff --git a/sysdeps/unix/sysv/irix4/bits/fcntl.h b/sysdeps/unix/sysv/irix4/bits/fcntl.h deleted file mode 100644 index 5eb7c76eb7..0000000000 --- a/sysdeps/unix/sysv/irix4/bits/fcntl.h +++ /dev/null @@ -1,109 +0,0 @@ -/* O_*, F_*, FD_* bit values for SGI Irix 4. - Copyright (C) 1994, 1997, 2004 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 _FCNTL_H -#error "Never use directly; include instead." -#endif - - -/* File access modes for `open' and `fcntl'. */ -#define O_RDONLY 0 /* Open read-only. */ -#define O_WRONLY 1 /* Open write-only. */ -#define O_RDWR 2 /* Open read/write. */ - - -/* Bits OR'd into the second argument to open. */ -#define O_CREAT 00400 /* Create file if it doesn't exist. */ -#define O_EXCL 02000 /* Fail if file already exists. */ -#define O_TRUNC 01000 /* Truncate file to zero length. */ -#ifdef __USE_MISC -#define O_SYNC 00020 /* Synchronous writes. */ -#define O_FSYNC O_SYNC -#define O_ASYNC 00100 /* Send SIGIO to owner when data is ready. */ -#endif - -/* File status flags for `open' and `fcntl'. */ -#define O_APPEND 000010 /* Writes append to the file. */ -#ifdef __USE_BSD -#define O_NDELAY 000004 /* Non-blocking I/O. */ -#endif -#define O_NONBLOCK 000200 /* POSIX.1 non-blocking I/O. */ - -/* Mask for file access modes. This is system-dependent in case - some system ever wants to define some other flavor of access. */ -#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR) - -/* Values for the second argument to `fcntl'. */ -#define F_DUPFD 0 /* Duplicate file descriptor. */ -#define F_GETFD 1 /* Get file descriptor flags. */ -#define F_SETFD 2 /* Set file descriptor flags. */ -#define F_GETFL 3 /* Get file status flags. */ -#define F_SETFL 4 /* Set file status flags. */ -#define F_GETLK 5 /* Get record locking info. */ -#define F_SETLK 6 /* Set record locking info. */ -#define F_SETLKW 7 /* Set record locking info, wait. */ -#ifdef __USE_MISC -#define F_CHKFL 8 /* Check legality of file flag changes. */ -#define F_ALLOCSP 10 -#define F_FREESP 11 -#define F_SETBSDLK 12 /* Set Berkeley record lock. */ -#define F_SETBSDLKW 13 /* Set Berkeley record lock and wait. */ -#define F_RGETLK 20 /* Get info on a remote lock. */ -#define F_RSETLK 21 /* Set or unlock a remote lock. */ -#define F_RSETLKW 22 /* Set or unlock a remote lock and wait. */ -#endif -#if defined __USE_BSD || defined __USE_UNIX98 -#define F_GETOWN 10 /* Get owner; only works on sockets. */ -#define F_SETOWN 11 /* Set owner; only works on sockets. */ -#endif - - -/* File descriptor flags used with F_GETFD and F_SETFD. */ -#define FD_CLOEXEC 1 /* Close on exec. */ - - -#include - -/* The structure describing an advisory lock. This is the type of the third - argument to `fcntl' for the F_GETLK, F_SETLK, and F_SETLKW requests. */ -struct flock - { - short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ - short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ - __off_t l_start; /* Offset where the lock begins. */ - __off_t l_len; /* Size of the locked area; zero means until EOF. */ - short int l_sysid; /* System ID where locking process resides. */ - short int l_pid; /* Process holding the lock. */ - }; - -/* Values for the `l_type' field of a `struct flock'. */ -#define F_RDLCK 1 /* Read lock. */ -#define F_WRLCK 2 /* Write lock. */ -#define F_UNLCK 3 /* Remove lock. */ - - -/* Define some more compatibility macros to be backward compatible with - BSD systems which did not managed to hide these kernel macros. */ -#ifdef __USE_BSD -#define FAPPEND O_APPEND -#define FFSYNC O_FSYNC -#define FASYNC O_ASYNC -#define FNONBLOCK O_NONBLOCK -#define FNDELAY O_NDELAY -#endif /* Use BSD. */ diff --git a/sysdeps/unix/sysv/irix4/bits/mman.h b/sysdeps/unix/sysv/irix4/bits/mman.h deleted file mode 100644 index 1549ff01c7..0000000000 --- a/sysdeps/unix/sysv/irix4/bits/mman.h +++ /dev/null @@ -1,64 +0,0 @@ -/* Definitions for BSD-style memory management. Irix 4 version. - Copyright (C) 1994, 1995, 1996, 1997, 1998 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_MMAN_H -#define _BITS_MMAN_H 1 - -/* Protections are chosen from these bits, OR'd together. The - implementation does not necessarily support PROT_EXEC or PROT_WRITE - without PROT_READ. The only guarantees are that no writing will be - allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ - -#define PROT_NONE 0x00 /* No access. */ -#define PROT_READ 0x04 /* Pages can be read. */ -#define PROT_WRITE 0x02 /* Pages can be written. */ -#define PROT_EXEC 0x01 /* Pages can be executed. */ -#ifdef __USE_MISC -# define PROT_EXECUTE PROT_EXEC -#endif - -/* Sharing types (must choose one and only one of these). */ -#define MAP_SHARED 0x01 /* Share changes. */ -#define MAP_PRIVATE 0x02 /* Changes private; copy pages on write. */ -#ifdef __USE_BSD -# define MAP_TYPE 0x0f /* Mask for sharing type. */ -#endif - -/* Other flags. */ -#define MAP_FIXED 0x10 /* Map address must be exactly as requested. */ -#ifdef __USE_MISC -# define MAP_RENAME 0x20 /* Rename private pages to file. */ -# define MAP_AUTOGROW 0x40 /* Grow file as pages are written. */ -# define MAP_LOCAL 0x80 /* Copy the mapped region on fork. */ -#endif - -/* Advice to `madvise'. */ -#ifdef __USE_BSD -# define MADV_NORMAL 0 /* No further special treatment. */ -# define MADV_RANDOM 1 /* Expect random page references. */ -# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define MADV_WILLNEED 3 /* Will need these pages. */ -# define MADV_DONTNEED 4 /* Don't need these pages. */ -#endif - -/* Flags to `msync'. */ -#define MS_ASYNC 0x1 /* Return immediately, don't fsync. */ -#define MS_INVALIDATE 0x2 /* Invalidate caches. */ - -#endif /* bits/mman.h */ diff --git a/sysdeps/unix/sysv/irix4/bits/signum.h b/sysdeps/unix/sysv/irix4/bits/signum.h deleted file mode 100644 index c96ab9d2b9..0000000000 --- a/sysdeps/unix/sysv/irix4/bits/signum.h +++ /dev/null @@ -1,69 +0,0 @@ -/* Signal number definitions. Irix4 version. - Copyright (C) 1994, 1996 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. */ - -#ifdef _SIGNAL_H - -/* This file defines the fake signal functions and signal - number constants for SGI Irix 4. */ - -/* Fake signal functions. */ -#define SIG_ERR ((__sighandler_t) -1) -#define SIG_DFL ((__sighandler_t) 0) -#define SIG_IGN ((__sighandler_t) 1) - - -/* Signals. */ -#define SIGHUP 1 /* Hangup (POSIX). */ -#define SIGINT 2 /* Interrupt (ANSI). */ -#define SIGQUIT 3 /* Quit (POSIX). */ -#define SIGILL 4 /* Illegal instruction (ANSI). */ -#define SIGABRT SIGIOT /* Abort (ANSI). */ -#define SIGTRAP 5 /* Trace trap (POSIX). */ -#define SIGIOT 6 /* IOT trap. */ -#define SIGEMT 7 /* EMT trap. */ -#define SIGFPE 8 /* Floating-point exception (ANSI). */ -#define SIGKILL 9 /* Kill, unblockable (POSIX). */ -#define SIGBUS 10 /* Bus error. */ -#define SIGSEGV 11 /* Segmentation violation (ANSI). */ -#define SIGSYS 12 /* Bad argument to system call*/ -#define SIGPIPE 13 /* Broken pipe (POSIX). */ -#define SIGALRM 14 /* Alarm clock (POSIX). */ -#define SIGTERM 15 /* Termination (ANSI). */ -#define SIGUSR1 16 /* User-defined signal 1 (POSIX). */ -#define SIGUSR2 17 /* User-defined signal 2 (POSIX). */ -#define SIGCHLD 18 /* Child status has changed (POSIX). */ -#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */ -#define SIGPWR 19 /* Power going down. */ -#define SIGSTOP 20 /* Stop, unblockable (POSIX). */ -#define SIGTSTP 21 /* Keyboard stop (POSIX). */ -#define SIGPOLL 22 /* Same as SIGIO? (SVID). */ -#define SIGIO 23 /* I/O now possible. */ -#define SIGURG 24 /* Urgent condition on socket.*/ -#define SIGWINCH 25 /* Window size change. */ -#define SIGVTALRM 26 /* Virtual alarm clock. */ -#define SIGPROF 27 /* Profiling alarm clock. */ -#define SIGCONT 28 /* Continue (POSIX). */ -#define SIGTTIN 29 /* Background read from tty (POSIX). */ -#define SIGTTOU 30 /* Background write to tty (POSIX). */ -#define SIGXCPU 31 /* CPU limit exceeded. */ -#define SIGXFSZ 32 /* File size limit exceeded. */ - -#endif /* included. */ - -#define _NSIG 33 /* Biggest signal number + 1. */ diff --git a/sysdeps/unix/sysv/irix4/bits/stat.h b/sysdeps/unix/sysv/irix4/bits/stat.h deleted file mode 100644 index 33f575db1c..0000000000 --- a/sysdeps/unix/sysv/irix4/bits/stat.h +++ /dev/null @@ -1,65 +0,0 @@ -/* Copyright (C) 1992, 1996, 1997, 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 - 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 _SYS_STAT_H -# error "Never include directly; use instead." -#endif - -struct stat - { - unsigned long st_ino; - short int st_dev; - unsigned short int st_mode; - short int st_nlink; - unsigned short int st_uid; - unsigned short int st_gid; - short int st_rdev; - long int st_size; - long int st_atime; - long int st_mtime; - long int st_ctime; - }; - -/* Encoding of the file mode. */ - -#define __S_IFMT 0170000 /* These bits determine file type. */ - -/* File types. */ -#define __S_IFDIR 0040000 /* Directory. */ -#define __S_IFCHR 0020000 /* Character device. */ -#define __S_IFBLK 0060000 /* Block device. */ -#define __S_IFREG 0100000 /* Regular file. */ -#define __S_IFIFO 0010000 /* FIFO. */ - -/* These don't actually exist on System V, but having them doesn't hurt. */ -#define __S_IFLNK 0120000 /* Symbolic link. */ -#define __S_IFSOCK 0140000 /* Socket. */ - -/* POSIX.1b objects. */ -#define __S_TYPEISMQ(buf) (0) -#define __S_TYPEISSEM(buf) (0) -#define __S_TYPEISSHM(buf) (0) - -/* Protection bits. */ - -#define __S_ISUID 04000 /* Set user ID on execution. */ -#define __S_ISGID 02000 /* Set group ID on execution. */ -#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ -#define __S_IREAD 0400 /* Read by owner. */ -#define __S_IWRITE 0200 /* Write by owner. */ -#define __S_IEXEC 0100 /* Execute by owner. */ diff --git a/sysdeps/unix/sysv/irix4/dup2.c b/sysdeps/unix/sysv/irix4/dup2.c deleted file mode 100644 index 86720b1b70..0000000000 --- a/sysdeps/unix/sysv/irix4/dup2.c +++ /dev/null @@ -1,3 +0,0 @@ -#include - -weak_alias (__dup2, dup2) diff --git a/sysdeps/unix/sysv/irix4/fpathconf.c b/sysdeps/unix/sysv/irix4/fpathconf.c deleted file mode 100644 index 236eb1a6bc..0000000000 --- a/sysdeps/unix/sysv/irix4/fpathconf.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright (C) 1994, 1995, 1997, 2004 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. */ - -#include -#include -#include -#include - -extern int __syssgi (int, ...); - -/* Get file-specific information about descriptor FD. */ -long int -__fpathconf (fd, name) - int fd; - int name; -{ - return __syssgi (SGI_PATHCONF, FPATHCONF, fd, name); -} - -weak_alias (__fpathconf, fpathconf) diff --git a/sysdeps/unix/sysv/irix4/getgroups.c b/sysdeps/unix/sysv/irix4/getgroups.c deleted file mode 100644 index 4c859eac83..0000000000 --- a/sysdeps/unix/sysv/irix4/getgroups.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (C) 1994, 1995, 1997, 2004 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. */ - -#include -#include -#include - -extern int __syssgi (int, ...); - -/* Set the group set for the current user to GROUPS (N of them). */ -int -__getgroups (n, groups) - size_t n; - gid_t *groups; -{ - return __syssgi (SGI_GETGROUPS, n, groups); -} - -weak_alias (__getgroups, getgroups) diff --git a/sysdeps/unix/sysv/irix4/getpriority.c b/sysdeps/unix/sysv/irix4/getpriority.c deleted file mode 100644 index 807ac2fba7..0000000000 --- a/sysdeps/unix/sysv/irix4/getpriority.c +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (C) 1994,96,97,2000,02, 2004 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. */ - -#include -#include -#include - -extern int __sysmp (int, ...); - -/* Return the highest priority of any process specified by WHICH and WHO - (see ); if WHO is zero, the current process, process group, - or user (as specified by WHO) is used. A lower priority number means higher - priority. Priorities range from PRIO_MIN to PRIO_MAX. */ -int -getpriority (which, who) - enum __priority_which which; - id_t who; -{ - switch (which) - { - case PRIO_PROCESS: - return __sysmp (MP_SCHED, MPTS_GTNICE_PROC, who); - case PRIO_PGRP: - return __sysmp (MP_SCHED, MPTS_GTNICE_PGRP, who); - case PRIO_USER: - return __sysmp (MP_SCHED, MPTS_GTNICE_USER, who); - } - - __set_errno (EINVAL); - return -1; -} -libc_hidden_def (getpriority) diff --git a/sysdeps/unix/sysv/irix4/getrusage.c b/sysdeps/unix/sysv/irix4/getrusage.c deleted file mode 100644 index 3cabbdf3e2..0000000000 --- a/sysdeps/unix/sysv/irix4/getrusage.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright (C) 1994, 1995, 1997, 2004 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. */ - -#include -#include -#include - -extern int __syssgi (int, ...); - -/* Return resource usage information on process indicated by WHO - and put it in *USAGE. Returns 0 for success, -1 for failure. */ -int -__getrusage (who, usage) - enum __rusage_who who; - struct rusage *usage; -{ - return __syssgi (SGI_RUSAGE, who, usage); -} - -weak_alias (__getrusage, getrusage) diff --git a/sysdeps/unix/sysv/irix4/gettimeofday.c b/sysdeps/unix/sysv/irix4/gettimeofday.c deleted file mode 100644 index d7055be82e..0000000000 --- a/sysdeps/unix/sysv/irix4/gettimeofday.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/irix4/pathconf.c b/sysdeps/unix/sysv/irix4/pathconf.c deleted file mode 100644 index 51da0c5635..0000000000 --- a/sysdeps/unix/sysv/irix4/pathconf.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright (C) 1994, 1995, 1997, 2004 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. */ - -#include -#include -#include -#include - -extern int __syssgi (int, ...); - -/* Get file-specific information about PATH. */ -long int -__pathconf (path, name) - const char *path; - int name; -{ - return __syssgi (SGI_PATHCONF, PATHCONF, path, name); -} - -weak_alias (__pathconf, pathconf) diff --git a/sysdeps/unix/sysv/irix4/readv.c b/sysdeps/unix/sysv/irix4/readv.c deleted file mode 100644 index baa976da6d..0000000000 --- a/sysdeps/unix/sysv/irix4/readv.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/irix4/reboot.c b/sysdeps/unix/sysv/irix4/reboot.c deleted file mode 100644 index 7c9dbba770..0000000000 --- a/sysdeps/unix/sysv/irix4/reboot.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/irix4/setgroups.c b/sysdeps/unix/sysv/irix4/setgroups.c deleted file mode 100644 index cca816bcff..0000000000 --- a/sysdeps/unix/sysv/irix4/setgroups.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (C) 1994,97,2002, 2004 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. */ - -#include -#include -#include - -extern int __syssgi (int, ...); - -/* Set the group set for the current user to GROUPS (N of them). */ -int -setgroups (n, groups) - size_t n; - const gid_t *groups; -{ - return __syssgi (SGI_SETGROUPS, n, groups); -} -libc_hidden_def (setgroups) diff --git a/sysdeps/unix/sysv/irix4/setpriority.c b/sysdeps/unix/sysv/irix4/setpriority.c deleted file mode 100644 index 99353187f6..0000000000 --- a/sysdeps/unix/sysv/irix4/setpriority.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (C) 1994,96,97,2000,02 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. */ - -#include -#include -#include - -int -setpriority (which, who, prio) - enum __priority_which which; - id_t who; - int prio; -{ - switch (which) - { - case PRIO_PROCESS: - return __sysmp (MP_SCHED, MPTS_RENICE_PROC, who, prio); - case PRIO_PGRP: - return __sysmp (MP_SCHED, MPTS_RENICE_PGRP, who, prio); - case PRIO_USER: - return __sysmp (MP_SCHED, MPTS_RENICE_USER, who, prio); - } - - __set_errno (EINVAL); - return -1; -} -libc_hidden_def (setpriority) diff --git a/sysdeps/unix/sysv/irix4/sigreturn.S b/sysdeps/unix/sysv/irix4/sigreturn.S deleted file mode 100644 index 296db1d47d..0000000000 --- a/sysdeps/unix/sysv/irix4/sigreturn.S +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright (C) 1992, 1995, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@cs.widener.edu). - - 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. */ - -#include - -ENTRY(__sigreturn) - li v0, SYS_sigreturn - syscall - -weak_alias (__sigreturn, sigreturn) diff --git a/sysdeps/unix/sysv/irix4/sigtramp.c b/sysdeps/unix/sysv/irix4/sigtramp.c deleted file mode 100644 index f8de75a7cd..0000000000 --- a/sysdeps/unix/sysv/irix4/sigtramp.c +++ /dev/null @@ -1,53 +0,0 @@ -/* Copyright (C) 1992, 1997, 2004 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. */ - -/* The sigvec system call on MIPS Ultrix takes an additional - parameter, which is the address that is actually called when the - signal occurs. - - When a signal occurs, we arrange for the kernel to call __handler. - That will save the frame and stack pointers into the context, and - then jump to this routine. See __handler.S. - - This code is based on sysdeps/unix/bsd/sun4/sigtramp.c, but it's - different because since we get passed the user signal handler we - don't actually need a trampoline. */ - -#include -#include -#include - -/* The user's signal handler is called with three arguments. */ -typedef void (*handler_type) (int sig, int code, struct sigcontext *); - -/* Defined in signal.S. */ -extern __sighandler_t __raw_signal (int sig, __sighandler_t func, - void (*)(int sig, int code, - struct sigcontext *, - handler_type)); - -extern void __handler (int sig, int code, struct sigcontext *, - handler_type); - -__sighandler_t -signal (sig, func) - int sig; - __sighandler_t func; -{ - return __raw_signal (sig, func, __handler); -} diff --git a/sysdeps/unix/sysv/irix4/start.c b/sysdeps/unix/sysv/irix4/start.c deleted file mode 100644 index fdda8809e6..0000000000 --- a/sysdeps/unix/sysv/irix4/start.c +++ /dev/null @@ -1,75 +0,0 @@ -/* Copyright (C) 1991,1992,1995,1996,1997,2004 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. - - In addition to the permissions in the GNU Lesser General Public - License, the Free Software Foundation gives you unlimited - permission to link the compiled version of this file with other - programs, and to distribute those programs without any restriction - coming from the use of this file. (The GNU Lesser General Public - License restrictions do apply in other respects; for example, they - cover modification of the file, and distribution when not linked - into another program.) - - Note that people who make modified versions of this file are not - obligated to grant this special exception for their modified - versions; it is their choice whether to do so. The GNU Lesser - General Public License gives permission to release a modified - version without this exception; this exception also makes it - possible to release a modified version which carries forward this - exception. - - 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. */ - -#include -#include -#include - -#ifndef __GNUC__ - #error This file uses GNU C extensions; you must compile with GCC. -#endif - -/* The first piece of initialized data. */ -int __data_start = 0; - -extern void __libc_init (int argc, char **argv, char **envp); -extern int main (int argc, char **argv, char **envp); - -/* Use the stack pointer to access the arguments. This assumes that - we can guess how big the frame will be. */ -register long int sp asm("sp"); -#ifdef __OPTIMIZE__ -#define STACKSIZE 8 -#else -#define STACKSIZE 10 -#endif - -void -__start () -{ - int argc; - char **argv, **envp; - - /* Set up the global pointer. */ - asm volatile ("la $28,_gp"); - argc = ((int *) sp)[STACKSIZE]; - argv = (char **) &((int *) sp)[STACKSIZE + 1]; - envp = &argv[argc + 1]; - __environ = envp; - - __libc_init (argc, argv, envp); - errno = 0; - exit (main (argc, argv, envp)); -} diff --git a/sysdeps/unix/sysv/irix4/swapon.c b/sysdeps/unix/sysv/irix4/swapon.c deleted file mode 100644 index 43c5222a43..0000000000 --- a/sysdeps/unix/sysv/irix4/swapon.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/irix4/syscalls.list b/sysdeps/unix/sysv/irix4/syscalls.list deleted file mode 100644 index a57529e9ad..0000000000 --- a/sysdeps/unix/sysv/irix4/syscalls.list +++ /dev/null @@ -1,8 +0,0 @@ -# File name Caller Syscall name # args Strong name Weak names - -getpgid - bsdgetpgrp 1 __getpgid getpgid -msync - msync 3 msync -setpgid - bsdsetpgrp 2 __setpgid setpgid -signal - signal 3 __raw_signal -sysmp - sysmp 4 __sysmp -syssgi - syssgi 2 __syssgi diff --git a/sysdeps/unix/sysv/irix4/sysconf.c b/sysdeps/unix/sysv/irix4/sysconf.c deleted file mode 100644 index ef7606edad..0000000000 --- a/sysdeps/unix/sysv/irix4/sysconf.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright (C) 1994, 1995, 1997, 2002, 2004 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. */ - -#include -#include - -extern int __syssgi ((int, ...); - -/* Get the value of the system variable NAME. */ -long int -__sysconf (name) - int name; -{ - if (name == _SC_TZNAME_MAX) - return __tzname_max (); - - return __syssgi (SGI_SYSCONF, name); -} - -weak_alias (__sysconf, sysconf) -libc_hidden_def (__sysconf) diff --git a/sysdeps/unix/sysv/irix4/uname.S b/sysdeps/unix/sysv/irix4/uname.S deleted file mode 100644 index 0b6536fd29..0000000000 --- a/sysdeps/unix/sysv/irix4/uname.S +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright (C) 1994, 1997 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. */ - -#include - -ENTRY(uname) - li a2, 0 - li a3, 0 -SYSCALL__ (utssys, 1) - j ra - move v0, zero diff --git a/sysdeps/unix/sysv/irix4/wait.S b/sysdeps/unix/sysv/irix4/wait.S deleted file mode 100644 index 90cd5948e7..0000000000 --- a/sysdeps/unix/sysv/irix4/wait.S +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright (C) 1992, 1995, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@cs.widener.edu). - - 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. */ - -#include - -.set noreorder - -ENTRY(__wait) - /* Prep it for wait */ - move a1, zero - move a2, zero - - li v0, SYS_wait - syscall - beq a3, zero, noerror - nop - j syscall_error - nop -noerror: - beq a0, zero, noarg - nop - sw v1, 0(a0) - nop -noarg: - ret - -weak_alias (__wait, wait) diff --git a/sysdeps/unix/sysv/irix4/waitpid.c b/sysdeps/unix/sysv/irix4/waitpid.c deleted file mode 100644 index 8378982ac7..0000000000 --- a/sysdeps/unix/sysv/irix4/waitpid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/irix4/writev.c b/sysdeps/unix/sysv/irix4/writev.c deleted file mode 100644 index 0dc6a76014..0000000000 --- a/sysdeps/unix/sysv/irix4/writev.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/isc2.2/syscalls.list b/sysdeps/unix/sysv/isc2.2/syscalls.list deleted file mode 100644 index 0ea253e3ca..0000000000 --- a/sysdeps/unix/sysv/isc2.2/syscalls.list +++ /dev/null @@ -1,2 +0,0 @@ -# File name Caller Syscall name # args Strong name Weak names - diff --git a/sysdeps/unix/sysv/minix/bits/sigaction.h b/sysdeps/unix/sysv/minix/bits/sigaction.h deleted file mode 100644 index 4b04b7b559..0000000000 --- a/sysdeps/unix/sysv/minix/bits/sigaction.h +++ /dev/null @@ -1,53 +0,0 @@ -/* Copyright (C) 1992, 1996, 1997 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 _SIGNAL_H -# error "Never include directly; use instead." -#endif - -/* Structure describing the action to be taken when a signal arrives. */ -struct sigaction - { - /* Signal handler. */ - __sighandler_t sa_handler; - - /* Additional set of signals to be blocked. */ - __sigset_t sa_mask; - - /* Special flags. */ - int sa_flags; - }; - -/* Bits in `sa_flags'. */ -#ifdef __USE_MISC -# define SA_ONSTACK 0x1 /* Take signal on signal stack. */ -# define SA_RESETHAND 0x2 /* Reset signal handler when signal caught. */ -# define SA_NODEFER 0x4 /* Don't block signal while catching it. */ -# define SA_RESTART 0x8 /* Restart syscall on signal return. */ -# define SA_SIGINFO 0x10 /* Extended signal handling. */ -# define SA_NOCLDWAIT 0x20 /* Don't create zombies. */ -# define SA_COMPAT 0x80 /* Internal flag for old signal catchers. */ -# define SA_DISABLE 0x100 /* Disable alternate signal stack. */ -#endif -#define SA_NOCLDSTOP 0x40 /* Don't send SIGCHLD when children stop. */ - - -/* Values for the HOW argument to `sigprocmask'. */ -#define SIG_BLOCK 0 /* Block signals. */ -#define SIG_UNBLOCK 1 /* Unblock signals. */ -#define SIG_SETMASK 2 /* Set the set of blocked signals. */ diff --git a/sysdeps/unix/sysv/sco3.2.4/Makefile b/sysdeps/unix/sysv/sco3.2.4/Makefile deleted file mode 100644 index a199ba9003..0000000000 --- a/sysdeps/unix/sysv/sco3.2.4/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -ifeq (posix,$(subdir)) -sysdep_routines := $(sysdep_routines) pgrpsys sco_getgrp -endif - -ifeq (csu,$(subdir)) - -# SCO uses crt1.o, and expects that single initializer file to also start -# the .init and .fini sections as crti.o normally does. -start-installed-name = crt1.o -start-installed-name-rule = yes - -# Link together start.o and crti.o into the expected crt1.o. -# Now crt1.o as initializer and crtn.o as finalizer will work. -$(objpfx)crt1.o: $(objpfx)start.o $(objpfx)crti.o - $(CC) -nostdlib -nostartfiles -Wl,-r -o $@ $^ - -endif diff --git a/sysdeps/unix/sysv/sco3.2.4/__setpgid.c b/sysdeps/unix/sysv/sco3.2.4/__setpgid.c deleted file mode 100644 index d51fa602c9..0000000000 --- a/sysdeps/unix/sysv/sco3.2.4/__setpgid.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (C) 1994, 1997, 2002, 2004 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. */ - -#include -#include -#include - -extern int __pgrpsys (int type, ...); - -/* Get the process group ID of process PID. */ -int -__setpgid (pid, pgid) - pid_t pid; - pid_t pgid; -{ - return __pgrpsys (2, pid, pgid); -} -libc_hidden_def (__setpgid) diff --git a/sysdeps/unix/sysv/sco3.2.4/bits/confname.h b/sysdeps/unix/sysv/sco3.2.4/bits/confname.h deleted file mode 100644 index 42e6ed0ead..0000000000 --- a/sysdeps/unix/sysv/sco3.2.4/bits/confname.h +++ /dev/null @@ -1,54 +0,0 @@ -/* `sysconf', `pathconf', and `confstr' NAME values. Generic version. - Copyright (C) 1993, 1997 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 _UNISTD_H -# error "Never use directly; include instead." -#endif - -/* Values for the NAME argument to `pathconf' and `fpathconf'. */ -#define _PC_LINK_MAX 0 -#define _PC_MAX_CANON 1 -#define _PC_MAX_INPUT 2 -#define _PC_NAME_MAX 3 -#define _PC_PATH_MAX 4 -#define _PC_PIPE_BUF 5 -#define _PC_CHOWN_RESTRICTED 6 -#define _PC_NO_TRUNC 7 -#define _PC_VDISABLE 8 - -/* Values for the argument to `sysconf'. */ -#define _SC_ARG_MAX 0 -#define _SC_CHILD_MAX 1 -#define _SC_CLK_TCK 2 -#define _SC_NGROUPS_MAX 3 -#define _SC_OPEN_MAX 4 -#define _SC_JOB_CONTROL 5 -#define _SC_SAVED_IDS 6 -#define _SC_VERSION 7 -#define _SC_PASS_MAX 8 -#define _SC_XOPEN_VERSION 9 -#define _SC_TZNAME_MAX 666 /* Not handled by SCO's system call. */ - -#ifdef __USE_POSIX2 -/* Values for the NAME argument to `confstr'. */ -enum - { - _CS_PATH /* The default search path. */ - }; -#endif diff --git a/sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h b/sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h deleted file mode 100644 index f087388556..0000000000 --- a/sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h +++ /dev/null @@ -1,43 +0,0 @@ -/* The proper definitions for SCO's sigaction. - Copyright (C) 1993, 1994, 1996, 1997 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 _SIGNAL_H -# error "Never include directly; use instead." -#endif - -/* Structure describing the action to be taken when a signal arrives. */ -struct sigaction - { - /* Signal handler. */ - __sighandler_t sa_handler; - - /* Additional set of signals to be blocked. */ - __sigset_t sa_mask; - - /* Special flags. */ - int sa_flags; - }; - -/* Bits in `sa_flags'. */ -#define SA_NOCLDSTOP 0x01 /* Don't send SIGCHLD when children stop. */ - -/* Values for the HOW argument to `sigprocmask'. */ -#define SIG_SETMASK 0 /* Set the set of blocked signals. */ -#define SIG_BLOCK 1 /* Block signals. */ -#define SIG_UNBLOCK 2 /* Unblock signals. */ diff --git a/sysdeps/unix/sysv/sco3.2.4/getgroups.c b/sysdeps/unix/sysv/sco3.2.4/getgroups.c deleted file mode 100644 index 2aac40bddd..0000000000 --- a/sysdeps/unix/sysv/sco3.2.4/getgroups.c +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (C) 1994, 1995, 1997, 2004 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. */ - -#include -#include -#include -#include - -extern int __sco_getgroups (int size, unsigned short int *list); - -int -__getgroups (size, list) - int size; gid_t *list; -{ - int i; - unsigned short int *shortlist; - - if (size <= 0) - return __sco_getgroups (size, NULL); - - shortlist = __alloca (size * sizeof (*shortlist)); - - size = __sco_getgroups (size, shortlist); - for (i = 0; i < size; ++i) - list[i] = shortlist[i]; - - return size; -} - -weak_alias (__getgroups, getgroups) diff --git a/sysdeps/unix/sysv/sco3.2.4/getpgid.c b/sysdeps/unix/sysv/sco3.2.4/getpgid.c deleted file mode 100644 index 3b47d9dee2..0000000000 --- a/sysdeps/unix/sysv/sco3.2.4/getpgid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/sco3.2.4/setpgid.c b/sysdeps/unix/sysv/sco3.2.4/setpgid.c deleted file mode 100644 index cc9c4cd61b..0000000000 --- a/sysdeps/unix/sysv/sco3.2.4/setpgid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/sco3.2.4/setsid.c b/sysdeps/unix/sysv/sco3.2.4/setsid.c deleted file mode 100644 index 6337652552..0000000000 --- a/sysdeps/unix/sysv/sco3.2.4/setsid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/sco3.2.4/sigaction.S b/sysdeps/unix/sysv/sco3.2.4/sigaction.S deleted file mode 100644 index ae50c17d93..0000000000 --- a/sysdeps/unix/sysv/sco3.2.4/sigaction.S +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright (C) 1993, 1994, 1995, 1997, 2002 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. */ - -#include - -.globl C_SYMBOL_NAME(__sigreturn) - -ENTRY (__sigaction) - movl $C_SYMBOL_NAME(__sigreturn), %ecx - DO_CALL (sigaction, 3) - jb syscall_error - ret - -libc_hidden_def (__sigaction) -weak_alias (__sigaction, sigaction) diff --git a/sysdeps/unix/sysv/sco3.2.4/sys/syscall.h b/sysdeps/unix/sysv/sco3.2.4/sys/syscall.h deleted file mode 100644 index 05bbb89f34..0000000000 --- a/sysdeps/unix/sysv/sco3.2.4/sys/syscall.h +++ /dev/null @@ -1,125 +0,0 @@ -/* Copyright (C) 1994, 1996 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. */ - -/* From Scott Bartram. */ - -#ifndef _SYSCALL_H -#define _SYSCALL_H - -#define SYS_access 33 -#define SYS_acct 51 -#define SYS_advfs 70 -#define SYS_alarm 27 -#define SYS_break 17 -#define SYS_brk 17 -#define SYS_chdir 12 -#define SYS_chmod 15 -#define SYS_chown 16 -#define SYS_chroot 61 -#define SYS_chsize 0x0a28 -#define SYS_close 6 -#define SYS_creat 8 -#define SYS_dup 41 -#define SYS_exec 11 -#define SYS_exece 59 -#define SYS_exit 1 -#define SYS_fcntl 62 -#define SYS_fork 2 -#define SYS_fpathconf 0x2f28 -#define SYS_fstat 28 -#define SYS_fstatfs 38 -#define SYS_ftime 0x0b28 -#define SYS_getdents 81 -#define SYS_getgid 47 -#define SYS_getgroups 0x2b28 -#define SYS_getitimer 0x3728 -#define SYS_getmsg 85 -#define SYS_getpid 20 -#define SYS_getuid 24 -#define SYS_gtty 32 -#define SYS_ioctl 54 -#define SYS_kill 37 -#define SYS_link 9 -#define SYS_lock 45 -#define SYS_lseek 19 -#define SYS_lstat 91 -#define SYS_mkdir 80 -#define SYS_mknod 14 -#define SYS_mount 21 -#define SYS_msgsys 49 -#define SYS_nap 0x0c28 -#define SYS_nice 34 -#define SYS_open 5 -#define SYS_pathconf 0x2e28 -#define SYS_pause 29 -#define SYS_pgrpsys 39 -#define SYS_pipe 42 -#define SYS_plock 45 -#define SYS_poll 87 -#define SYS_prof 44 -#define SYS_ptrace 26 -#define SYS_putmsg 86 -#define SYS_rdebug 76 -#define SYS_read 3 -#define SYS_readlink 92 -#define SYS_rename 0x3028 -#define SYS_rfstart 74 -#define SYS_rfstop 77 -#define SYS_rfsys 78 -#define SYS_rmdir 79 -#define SYS_rmount 72 -#define SYS_rumount 73 -#define SYS_seek 19 -#define SYS_select 0x2428 -#define SYS_semsys 53 -#define SYS_setgid 46 -#define SYS_setgroups 0x2c28 -#define SYS_setitimer 0x3828 -#define SYS_setpgrp 39 -#define SYS_setuid 23 -#define SYS_shmsys 52 -#define SYS_sigaction 0x2728 -#define SYS_signal 48 -#define SYS_sigpending 0x2928 -#define SYS_sigprocmask 0x2828 -#define SYS_sigsuspend 0x2a28 -#define SYS_stat 18 -#define SYS_statfs 35 -#define SYS_stime 25 -#define SYS_stty 31 -#define SYS_symlink 90 -#define SYS_sync 36 -#define SYS_sys3b 50 -#define SYS_sysacct 51 -#define SYS_sysconf 0x2d28 -#define SYS_sysfs 84 -#define SYS_sysi86 50 -#define SYS_time 13 -#define SYS_times 43 -#define SYS_uadmin 55 -#define SYS_ulimit 63 -#define SYS_umask 60 -#define SYS_umount 22 -#define SYS_unadvfs 71 -#define SYS_unlink 10 -#define SYS_utime 30 -#define SYS_utssys 57 -#define SYS_wait 7 -#define SYS_write 4 - -#endif diff --git a/sysdeps/unix/sysv/sco3.2.4/syscalls.list b/sysdeps/unix/sysv/sco3.2.4/syscalls.list deleted file mode 100644 index bda6c16c76..0000000000 --- a/sysdeps/unix/sysv/sco3.2.4/syscalls.list +++ /dev/null @@ -1,8 +0,0 @@ -# File name Caller Syscall name # args Strong name Weak names - -pathconf - pathconf 2 __pathconf pathconf -pgrpsys - pgrpsys 3 __pgrpsys -sco_getgrp getgroups getgroups 2 __sco_getgroups -sigpending - sigpending 1 sigpending -sigprocmask - sigprocmask 3 __sigprocmask sigprocmask -sigsuspend - sigsuspend 1 sigsuspend diff --git a/sysdeps/unix/sysv/sco3.2.4/sysconf.S b/sysdeps/unix/sysv/sco3.2.4/sysconf.S deleted file mode 100644 index 9780bd4881..0000000000 --- a/sysdeps/unix/sysv/sco3.2.4/sysconf.S +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright (C) 1993, 1994, 1995, 1997 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. */ - -#include -#include - -.globl __tzname_max -ENTRY (__sysconf) - cmpl $_SC_TZNAME_MAX, 4(%esp) /* Is the arg _SC_TZNAME_MAX? */ - je tzname - DO_CALL (sysconf, 1) /* No; use the SCO system call. */ - ret -tzname: jmp C_SYMBOL_NAME(__tzname_max) /* Yes; bounce to __tzname_max (). */ - -weak_alias (__sysconf, sysconf) diff --git a/sysdeps/unix/sysv/sco3.2.4/system.c b/sysdeps/unix/sysv/sco3.2.4/system.c deleted file mode 100644 index 06dc066b88..0000000000 --- a/sysdeps/unix/sysv/sco3.2.4/system.c +++ /dev/null @@ -1,10 +0,0 @@ -/* SCO has a bug where `waitpid' will never return if SIGCHLD is blocked. - They have acknowledged that this is a bug but I have not seen nor heard - of any forthcoming fix. */ - -#define WAITPID_CANNOT_BLOCK_SIGCHLD - -/* SCO 3.2v4 does have `waitpid'. - Avoid unix/system.c, which says we don't. */ - -#include diff --git a/sysdeps/unix/sysv/sco3.2.4/uname.S b/sysdeps/unix/sysv/sco3.2.4/uname.S deleted file mode 100644 index bc61089d65..0000000000 --- a/sysdeps/unix/sysv/sco3.2.4/uname.S +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (C) 1993, 1994, 1997 Free Software Foundation, Inc. - Contributed by Scott Bartram. - 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. */ - -#include - -/* - before lcall, stack contents should be: - - 4(%esp) -> name - 8(%esp) -> unspecified - 12(%esp) -> 0 - */ - -ENTRY (uname) - pushl $0x0 /* Push the discriminator flag. */ - pushl $0x0 /* Push dummy placeholder. */ - pushl 12(%esp,1) /* Push NAME (ptr to struct utsname) */ - subl $0x4, %esp /* Adjust stack pointer. */ - DO_CALL (utssys, 3) - jb error /* Test for error. */ - addl $0x10, %esp /* Adjust the stack pointer. */ - xorl %eax, %eax /* Clear return value. */ - ret -error: addl $0x10, %esp /* Adjust the stack pointer. */ - jmp syscall_error diff --git a/sysdeps/unix/sysv/sco3.2.4/waitpid.S b/sysdeps/unix/sysv/sco3.2.4/waitpid.S deleted file mode 100644 index ccbc81274e..0000000000 --- a/sysdeps/unix/sysv/sco3.2.4/waitpid.S +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (C) 1993,94,95,97,2002 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. */ - -#include - -ENTRY (__waitpid) - /* The `waitpid' system call is distinguished from plain - `wait' by setting lots of bits in the processor flags. */ - pushfl /* Push the flags word. */ - popl %eax /* Pop it into the accumulator. */ - orl $0x8c4, %eax /* Set lots of bits. */ - pushl %eax /* Push the new flags word. */ - popfl /* Pop it into the flags. */ - DO_CALL (wait, 2) - movl 8(%esp), scratch /* Put status pointer in scratch register. */ - testl scratch, scratch /* Is it non-nil? */ - je null - movl r1, (scratch) /* Yes; store the status there. */ -null: ret - -libc_hidden_def (__waitpid) -weak_alias (__waitpid, waitpid) diff --git a/sysdeps/unix/sysv/sco3.2/Makefile b/sysdeps/unix/sysv/sco3.2/Makefile deleted file mode 100644 index c4d9da7a06..0000000000 --- a/sysdeps/unix/sysv/sco3.2/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (C) 1993, 1997 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. - -ifeq ($(subdir),misc) - -sysdep_routines := $(sysdep_routines) __fltused - -endif diff --git a/sysdeps/unix/sysv/sco3.2/__fltused.c b/sysdeps/unix/sysv/sco3.2/__fltused.c deleted file mode 100644 index 5d1d67f0b1..0000000000 --- a/sysdeps/unix/sysv/sco3.2/__fltused.c +++ /dev/null @@ -1,3 +0,0 @@ -/* Code compiled by the SCO compiler apparently likes this to be defined. */ - -int __fltused = 1; diff --git a/sysdeps/unix/sysv/sco3.2/bits/local_lim.h b/sysdeps/unix/sysv/sco3.2/bits/local_lim.h deleted file mode 100644 index b4141d0dbf..0000000000 --- a/sysdeps/unix/sysv/sco3.2/bits/local_lim.h +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (C) 1993, 1996 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_LOCAL_LIM_H -#define _BITS_LOCAL_LIM_H 1 - -#define NGROUPS_MAX 8 /* Maximum number of supplementary groups. */ -#define ARG_MAX 5120 -#define CHILD_MAX 25 -#define OPEN_MAX 60 -#define LINK_MAX 1000 -#define MAX_CANON 256 - -/* For SVR3, this is 14. For SVR4, it is 255, at least on ufs - file systems, even though the System V limits.h incorrectly - defines it as 14. Giving it a value which is too large - is harmless (it is a maximum). */ -#define NAME_MAX 255 - -#define PATH_MAX 1024 - -#endif /* bits/local_lim.h */ diff --git a/sysdeps/unix/sysv/sysv4/Implies b/sysdeps/unix/sysv/sysv4/Implies deleted file mode 100644 index 953822ea48..0000000000 --- a/sysdeps/unix/sysv/sysv4/Implies +++ /dev/null @@ -1,3 +0,0 @@ -# The directory unix/common contains things which are common to both BSD -# and SVR4. -unix/common diff --git a/sysdeps/unix/sysv/sysv4/Makefile b/sysdeps/unix/sysv/sysv4/Makefile deleted file mode 100644 index 6f7155c716..0000000000 --- a/sysdeps/unix/sysv/sysv4/Makefile +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright (C) 1992, 1993, 1995, 1996, 1997 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. - -ifeq ($(subdir),posix) - -sysdep_routines := $(sysdep_routines) sysconfig pgrpsys __waitid - -endif - -ifeq ($(subdir),misc) - -sysdep_routines := $(sysdep_routines) sysinfo - -endif diff --git a/sysdeps/unix/sysv/sysv4/__getpgid.c b/sysdeps/unix/sysv/sysv4/__getpgid.c deleted file mode 100644 index 74ca3e0f9a..0000000000 --- a/sysdeps/unix/sysv/sysv4/__getpgid.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (C) 1993, 1997, 2002, 2004 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@zen.org). - - 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. */ - -#include -#include -#include - -extern int __pgrpsys (int type, ...); - -/* Get the process group ID of process PID. */ -int -__getpgid (pid) - pid_t pid; -{ - return __pgrpsys (4, pid); -} -libc_hidden_def (__getpgid) diff --git a/sysdeps/unix/sysv/sysv4/__setpgid.c b/sysdeps/unix/sysv/sysv4/__setpgid.c deleted file mode 100644 index 36ad5cc77b..0000000000 --- a/sysdeps/unix/sysv/sysv4/__setpgid.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (C) 1993, 1997, 2002, 2004 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@zen.org). - - 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. */ - -#include -#include -#include - -extern int __pgrpsys (int type, ...); - -/* Get the process group ID of process PID. */ -int -__setpgid (pid, pgid) - pid_t pid; - pid_t pgid; -{ - return __pgrpsys (5, pid, pgid); -} -libc_hidden_def (__setpgid) diff --git a/sysdeps/unix/sysv/sysv4/bits/sigaction.h b/sysdeps/unix/sysv/sysv4/bits/sigaction.h deleted file mode 100644 index faf07e5ff5..0000000000 --- a/sysdeps/unix/sysv/sysv4/bits/sigaction.h +++ /dev/null @@ -1,55 +0,0 @@ -/* The proper definitions for SVR4's sigaction. - Copyright (C) 1993, 1994, 1996, 1997 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 _SIGNAL_H -# error "Never include directly; use instead." -#endif - -/* Structure describing the action to be taken when a signal arrives. */ -struct sigaction - { - /* Special flags. */ - int sa_flags; - - /* Signal handler. */ - __sighandler_t sa_handler; - - /* Additional set of signals to be blocked. */ - __sigset_t sa_mask; - - /* Padding. */ - int sa_resv[2]; - }; - -/* Bits in `sa_flags'. */ -#ifdef __USE_MISC -# define SA_ONSTACK 0x1 /* Take signal on signal stack. */ -# define SA_RESETHAND 0x2 /* Reset to SIG_DFL on entry to handler. */ -# define SA_RESTART 0x4 /* Restart syscall on signal return. */ -# define SA_SIGINFO 0x8 /* Provide additional info to the handler. */ -# define SA_NODEFER 0x10 /* Don't automatically block the signal when - its handler is being executed. */ -# define SA_NOCLDWAIT 0x10000 /* Don't save zombie processes. */ -#endif -#define SA_NOCLDSTOP 0x20000 /* Don't send SIGCHLD when children stop. */ - -/* Values for the HOW argument to `sigprocmask'. */ -#define SIG_BLOCK 1 /* Block signals. */ -#define SIG_UNBLOCK 2 /* Unblock signals. */ -#define SIG_SETMASK 3 /* Set the set of blocked signals. */ diff --git a/sysdeps/unix/sysv/sysv4/bits/signum.h b/sysdeps/unix/sysv/sysv4/bits/signum.h deleted file mode 100644 index 07f900a78b..0000000000 --- a/sysdeps/unix/sysv/sysv4/bits/signum.h +++ /dev/null @@ -1,66 +0,0 @@ -/* Signal number definitions. SVR4 version. - Copyright (C) 1994, 1996 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. */ - -#ifdef _SIGNAL_H - -/* Fake signal functions. */ -#define SIG_ERR ((__sighandler_t) -1) /* Error return. */ -#define SIG_DFL ((__sighandler_t) 0) /* Default action. */ -#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */ - - -/* Signals. */ -#define SIGHUP 1 /* Hangup (POSIX). */ -#define SIGINT 2 /* Interrupt (ANSI). */ -#define SIGQUIT 3 /* Quit (POSIX). */ -#define SIGILL 4 /* Illegal instruction (ANSI). */ -#define SIGABRT SIGIOT /* Abort (ANSI). */ -#define SIGTRAP 5 /* Trace trap (POSIX). */ -#define SIGIOT 6 /* IOT trap (4.2 BSD). */ -#define SIGEMT 7 /* EMT trap (4.2 BSD). */ -#define SIGFPE 8 /* Floating-point exception (ANSI). */ -#define SIGKILL 9 /* Kill, unblockable (POSIX). */ -#define SIGBUS 10 /* Bus error (4.2 BSD). */ -#define SIGSEGV 11 /* Segmentation violation (ANSI). */ -#define SIGSYS 12 /* Bad argument to system call (4.2 BSD)*/ -#define SIGPIPE 13 /* Broken pipe (POSIX). */ -#define SIGALRM 14 /* Alarm clock (POSIX). */ -#define SIGTERM 15 /* Termination (ANSI). */ -#define SIGUSR1 16 /* User-defined signal 1 (POSIX). */ -#define SIGUSR2 17 /* User-defined signal 2 (POSIX). */ -#define SIGCHLD 18 /* Child status has changed (POSIX). */ -#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */ -#define SIGPWR 19 /* Power failure restart (System V). */ -#define SIGWINCH 20 /* Window size change (4.3 BSD, Sun). */ -#define SIGURG 21 /* Urgent condition on socket (4.2 BSD).*/ -#define SIGPOLL 22 /* Pollable event occurred (System V). */ -#define SIGIO SIGPOLL /* I/O now possible (4.2 BSD). */ -#define SIGSTOP 23 /* Stop, unblockable (POSIX). */ -#define SIGTSTP 24 /* Keyboard stop (POSIX). */ -#define SIGCONT 25 /* Continue (POSIX). */ -#define SIGTTIN 26 /* Background read from tty (POSIX). */ -#define SIGTTOU 27 /* Background write to tty (POSIX). */ -#define SIGVTALRM 28 /* Virtual alarm clock (4.2 BSD). */ -#define SIGPROF 29 /* Profiling alarm clock (4.2 BSD). */ -#define SIGXCPU 30 /* CPU limit exceeded (4.2 BSD). */ -#define SIGXFSZ 31 /* File size limit exceeded (4.2 BSD). */ - -#endif /* included. */ - -#define _NSIG 32 /* Biggest signal number + 1. */ diff --git a/sysdeps/unix/sysv/sysv4/bits/sigset.h b/sysdeps/unix/sysv/sysv4/bits/sigset.h deleted file mode 100644 index 9093c72952..0000000000 --- a/sysdeps/unix/sysv/sysv4/bits/sigset.h +++ /dev/null @@ -1,98 +0,0 @@ -/* __sig_atomic_t, __sigset_t, and related definitions. SVR4 version. - Copyright (C) 1994-1996, 2002 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 _SIGSET_H_types -#define _SIGSET_H_types 1 - -typedef int __sig_atomic_t; - -/* A `sigset_t' has a bit for each signal. */ -typedef struct - { - unsigned long int __sigbits[4]; - } __sigset_t; - -#endif /* ! _SIGSET_H_types */ - -/* We only want to define these functions if was actually - included; otherwise we were included just to define the types. Since we - are namespace-clean, it wouldn't hurt to define extra macros. But - trouble can be caused by functions being defined (e.g., any global - register vars declared later will cause compilation errors). */ - -#if !defined (_SIGSET_H_fns) && defined (_SIGNAL_H) -#define _SIGSET_H_fns 1 - -/* Return a mask that includes SIG only. */ -#define __sigmask(sig) (1 << ((sig) - 1)) - - -/* It's easier to assume 8-bit bytes than to get CHAR_BIT. */ -#define __NSSBITS (sizeof (unsigned long int) * 8) -#define __SSELT(s) ((s) / __NSSBITS) -#define __SSMASK(s) (1 << ((s) % __NSSBITS)) - -#ifdef __USE_EXTERN_INLINES -# ifndef _EXTERN_INLINE -# define _EXTERN_INLINE extern __inline -# endif - -_EXTERN_INLINE int -__sigemptyset (__sigset_t *__set) -{ - __set->__sigbits[0] = __set->__sigbits[1] = - __set->__sigbits[2] = __set->__sigbits[3] = 0L; - return 0; -} - -_EXTERN_INLINE int -__sigfillset (__sigset_t *__set) -{ - /* SVR4 has a system call for `sigfillset' (!), and it only sets the bits - for signals [1,31]. Setting bits for unimplemented signals seems - harmless (and we will find out if it really is). */ - __set->__sigbits[0] = __set->__sigbits[1] = - __set->__sigbits[2] = __set->__sigbits[3] = ~0L; - return 0; -} - -_EXTERN_INLINE int -__sigaddset (__sigset_t *__set, int __sig) -{ - __set->__sigbits[__SSELT (__sig)] |= __SSMASK (__sig); - return 0; -} - -_EXTERN_INLINE int -__sigdelset (__sigset_t *__set, int __sig) -{ - __set->__sigbits[__SSELT (__sig)] &= ~__SSMASK (__sig); - return 0; -} - -_EXTERN_INLINE int -__sigismember (__const __sigset_t *__set, int __sig) -{ - if (__set->__sigbits[__SSELT (__sig)] & __SSMASK (__sig)) - return 1; - return 0; -} -#endif /* use extern inlines. */ - -#endif /* ! _SIGSET_H_fns */ diff --git a/sysdeps/unix/sysv/sysv4/bits/utsname.h b/sysdeps/unix/sysv/sysv4/bits/utsname.h deleted file mode 100644 index 891ae68628..0000000000 --- a/sysdeps/unix/sysv/sysv4/bits/utsname.h +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997, 1998 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 _SYS_UTSNAME_H -# error "Never include directly; use instead." -#endif - -#define _UTSNAME_LENGTH 257 diff --git a/sysdeps/unix/sysv/sysv4/bits/waitflags.h b/sysdeps/unix/sysv/sysv4/bits/waitflags.h deleted file mode 100644 index 40bc823de6..0000000000 --- a/sysdeps/unix/sysv/sysv4/bits/waitflags.h +++ /dev/null @@ -1,34 +0,0 @@ -/* Definitions of flag bits for `waitpid' et al. - Copyright (C) 1993, 1996, 1997, 2000 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@zen.org). - - 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. */ - -#if !defined _SYS_WAIT_H && !defined _STDLIB_H -# error "Never include directly; use instead." -#endif - - -/* Bits in the third argument to `waitpid'. */ -#define WNOHANG 64 /* Don't block waiting. */ -#define WUNTRACED 4 /* Report status of stopped children. */ - -#ifdef __USE_SVID -# define WEXITED 1 /* Look for children that have exited. */ -# define WTRAPPED 2 /* Look for processes that stopped - while tracing. */ -#endif diff --git a/sysdeps/unix/sysv/sysv4/dup2.c b/sysdeps/unix/sysv/sysv4/dup2.c deleted file mode 100644 index 7d36e0e352..0000000000 --- a/sysdeps/unix/sysv/sysv4/dup2.c +++ /dev/null @@ -1,2 +0,0 @@ -/* SVR4 uses the POSIX dup2. */ -#include diff --git a/sysdeps/unix/sysv/sysv4/ftruncate.c b/sysdeps/unix/sysv/sysv4/ftruncate.c deleted file mode 100644 index 47e040eb2c..0000000000 --- a/sysdeps/unix/sysv/sysv4/ftruncate.c +++ /dev/null @@ -1,37 +0,0 @@ -/* ftruncate for SVR4 using the fcntl F_FREESP command. - Copyright (C) 1995, 1997 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. */ - -#include -#include -#include -#include - -/* Truncate the file FD refers to to LENGTH bytes. */ -int -ftruncate (fd, length) - int fd; - off_t length; -{ - struct flock fl; - - memset (&fl, 0, sizeof fl); - fl.l_type = F_WRLCK; - fl.l_start = length; - return fcntl (fd, F_FREESP, &fl); -} diff --git a/sysdeps/unix/sysv/sysv4/gethostname.c b/sysdeps/unix/sysv/sysv4/gethostname.c deleted file mode 100644 index 4a058b51c1..0000000000 --- a/sysdeps/unix/sysv/sysv4/gethostname.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright (C) 1994, 1995, 1997, 2000, 2001 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@zen.org). - - 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. */ - -#include -#include -#include -#include - -extern int __sysinfo (int command, char *buf, long int count); - -int -__gethostname (name, namelen) - char *name; - size_t namelen; -{ - return __sysinfo (SI_HOSTNAME, name, namelen); -} - -weak_alias (__gethostname, gethostname) diff --git a/sysdeps/unix/sysv/sysv4/getpagesize.c b/sysdeps/unix/sysv/sysv4/getpagesize.c deleted file mode 100644 index 6119640758..0000000000 --- a/sysdeps/unix/sysv/sysv4/getpagesize.c +++ /dev/null @@ -1,2 +0,0 @@ -/* Solaris uses sysconf ala POSIX.1. */ -#include diff --git a/sysdeps/unix/sysv/sysv4/getpgid.c b/sysdeps/unix/sysv/sysv4/getpgid.c deleted file mode 100644 index 95f96417cc..0000000000 --- a/sysdeps/unix/sysv/sysv4/getpgid.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright (C) 1993,1995,1997,1999,2002,2004 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. */ - -#include -#include - -extern pid_t __pgrpsys (int type, ...); - -/* Get the process group ID of process PID. */ -pid_t -__getpgid (pid) - pid_t pid; -{ - return __pgrpsys (4, pid); -} -libc_hidden_def (__getpgid) -weak_alias (__getpgid, getpgid) diff --git a/sysdeps/unix/sysv/sysv4/i386/Makefile b/sysdeps/unix/sysv/sysv4/i386/Makefile deleted file mode 100644 index 56f0a37de1..0000000000 --- a/sysdeps/unix/sysv/sysv4/i386/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ifeq ($(subdir),signal) -sysdep_routines := $(sysdep_routines) sys-sig -endif diff --git a/sysdeps/unix/sysv/sysv4/i386/bits/stat.h b/sysdeps/unix/sysv/sysv4/i386/bits/stat.h deleted file mode 100644 index c1016a9228..0000000000 --- a/sysdeps/unix/sysv/sysv4/i386/bits/stat.h +++ /dev/null @@ -1,93 +0,0 @@ -/* Copyright (C) 1993, 1996, 1997, 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 - 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 _SYS_STAT_H -# error "Never include directly; use instead." -#endif - -#include - -/* Versions of the `struct stat' data structure and - the bits of the `xmknod' interface. */ -#define _STAT_VER 2 -#define _MKNOD_VER 2 - -/* Structure describing file characteristics. */ -struct stat - { - unsigned long itn st_dev; /* Device. */ - long int st_filler1[3]; - unsigned long int st_ino; /* File serial number. */ - unsigned long int st_mode; /* File mode. */ - unsigned long int st_nlink; /* Link count. */ - long int st_uid; /* User ID of the file's owner. */ - long int st_gid; /* Group ID of the file's group.*/ - unsigned long int st_rdev; /* Device number, if device. */ - long int st_filler2[2]; - - long int st_size; /* Size of file, in bytes. */ - /* SVR4 added this extra long to allow for expansion of off_t. */ - long int st_filler3; - - long int st_atime; /* Time of last access. */ - unsigned long int st_atime_usec; - long int st_mtime; /* Time of last modification. */ - unsigned long int st_mtime_usec; - long int st_ctime; /* Time of last status change. */ - unsigned long int st_ctime_usec; - - __blksize_t st_blksize; /* Optimal block size for I/O. */ -#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ - - __blkcnt_t st_blocks; /* Number of 512-byte blocks allocated. */ - char st_fstype[16]; /* The type of this filesystem. */ - int st_aclcnt; - unsigned long int st_level; - unsigned long int st_flags; - unsigned long int st_cmwlevel; - long int st_filler4[4]; - }; - -/* Encoding of the file mode. */ - -#define __S_IFMT 0170000 /* These bits determine file type. */ - -/* File types. */ -#define __S_IFDIR 0040000 /* Directory. */ -#define __S_IFCHR 0020000 /* Character device. */ -#define __S_IFBLK 0060000 /* Block device. */ -#define __S_IFREG 0100000 /* Regular file. */ -#define __S_IFIFO 0010000 /* FIFO. */ - -/* These don't actually exist on System V, but having them doesn't hurt. */ -#define __S_IFLNK 0120000 /* Symbolic link. */ -#define __S_IFSOCK 0140000 /* Socket. */ - -/* POSIX.1b objects. */ -#define __S_TYPEISMQ(buf) (0) -#define __S_TYPEISSEM(buf) (0) -#define __S_TYPEISSHM(buf) (0) - -/* Protection bits. */ - -#define __S_ISUID 04000 /* Set user ID on execution. */ -#define __S_ISGID 02000 /* Set group ID on execution. */ -#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ -#define __S_IREAD 0400 /* Read by owner. */ -#define __S_IWRITE 0200 /* Write by owner. */ -#define __S_IEXEC 0100 /* Execute by owner. */ diff --git a/sysdeps/unix/sysv/sysv4/i386/sys-sig.S b/sysdeps/unix/sysv/sysv4/i386/sys-sig.S deleted file mode 100644 index 6e2d1abde3..0000000000 --- a/sysdeps/unix/sysv/sysv4/i386/sys-sig.S +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright (C) 1994, 1997 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. */ - -#include - -.globl C_SYMBOL_NAME(__sigreturn) - -ENTRY (__sigaction_syscall) - movl $C_SYMBOL_NAME(__sigreturn), %edx - DO_CALL (sigaction, 3) - jb syscall_error - ret - -PSEUDO (__context_syscall, context, 2) - ret diff --git a/sysdeps/unix/sysv/sysv4/i386/syscalls.list b/sysdeps/unix/sysv/sysv4/i386/syscalls.list deleted file mode 100644 index 560cd8366e..0000000000 --- a/sysdeps/unix/sysv/sysv4/i386/syscalls.list +++ /dev/null @@ -1,6 +0,0 @@ -# File name Caller Syscall name # args Strong name Weak names - -xstat - xstat 3 __xstat _xstat -fxstat - fxstat 3 __fxstat _fxstat -lxstat - lxstat 3 __lxstat _lxstat -xmknod - xmknod 4 __xmknod _xmknod diff --git a/sysdeps/unix/sysv/sysv4/i386/sysdep.h b/sysdeps/unix/sysv/sysv4/i386/sysdep.h deleted file mode 100644 index daecdb6222..0000000000 --- a/sysdeps/unix/sysv/sysv4/i386/sysdep.h +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (C) 1994, 1997 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. */ - -#include - -/* In SVR4 some system calls can fail with the error ERESTART, - and this means the call should be retried. */ - -#ifndef _ERRNO_H -#define _ERRNO_H -#endif -#include - -#undef PSEUDO -#define PSEUDO(name, syscall_name, args) \ - .globl syscall_error; \ - ENTRY (name) \ - DO_CALL (syscall_name, args); \ - jae noerror; \ - cmpb $ERESTART, %al; \ - je C_SYMBOL_NAME (name); \ - jmp syscall_error; \ - noerror: diff --git a/sysdeps/unix/sysv/sysv4/i386/vfork.S b/sysdeps/unix/sysv/sysv4/i386/vfork.S deleted file mode 100644 index bbe99fbc41..0000000000 --- a/sysdeps/unix/sysv/sysv4/i386/vfork.S +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/sysv4/sethostname.c b/sysdeps/unix/sysv/sysv4/sethostname.c deleted file mode 100644 index d74b0f4f3b..0000000000 --- a/sysdeps/unix/sysv/sysv4/sethostname.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (C) 1994, 1997, 2004 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@zen.org). - - 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. */ - -#include -#include -#include -#include - -extern int __sysinfo (int command, const char *buf, long count); - -int -sethostname (name, namelen) - const char *name; - size_t namelen; -{ - return __sysinfo (SI_SET_HOSTNAME, name, namelen); -} diff --git a/sysdeps/unix/sysv/sysv4/setpgid.c b/sysdeps/unix/sysv/sysv4/setpgid.c deleted file mode 100644 index 80f4ad6430..0000000000 --- a/sysdeps/unix/sysv/sysv4/setpgid.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (C) 1993,1995-1997,1999,2002,2004 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. */ - -#include -#include - -extern int __pgrpsys (pid_t type, ...); - -/* Set the process group ID of the process matching PID to PGID. - If PID is zero, the current process's process group ID is set. - If PGID is zero, the process ID of the process is used. */ -int -__setpgid (pid, pgid) - pid_t pid, pgid; -{ - return __pgrpsys (5, pid, pgid); -} -libc_hidden_def (__setpgid) -weak_alias (__setpgid, setpgid) diff --git a/sysdeps/unix/sysv/sysv4/setsid.c b/sysdeps/unix/sysv/sysv4/setsid.c deleted file mode 100644 index faa2c42d7d..0000000000 --- a/sysdeps/unix/sysv/sysv4/setsid.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (C) 1993, 1995, 1997, 1999, 2004 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. */ - -#include -#include - -extern pid_t __pgrpsys (int type, ...); - -/* Create a new session with the calling process as its leader. - The process group IDs of the session and the calling process - are set to the process ID of the calling process, which is returned. */ -pid_t -__setsid () -{ - return __pgrpsys (3); -} - -weak_alias (__setsid, setsid) diff --git a/sysdeps/unix/sysv/sysv4/sigaction.c b/sysdeps/unix/sysv/sysv4/sigaction.c deleted file mode 100644 index d5926b3d42..0000000000 --- a/sysdeps/unix/sysv/sysv4/sigaction.c +++ /dev/null @@ -1,80 +0,0 @@ -/* Copyright (C) 1994,1995,1996,1997,2002 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. */ - -#include -#include -#include - -static __sighandler_t user_handlers[NSIG]; - -extern int __context_syscall (int, struct sigcontext *); -extern int __sigaction_syscall (int, - const struct sigaction *, struct sigaction *); - -static void -trampoline (int sig, int code, struct sigcontext *context) -{ - (*(void (*) (int, int, struct sigcontext *)) user_handlers[sig]) - (sig, code, context); - __context_syscall (1, context); -} - -/* If ACT is not NULL, change the action for SIG to *ACT. - If OACT is not NULL, put the old action for SIG in *OACT. */ -int -__sigaction (sig, act, oact) - int sig; - const struct sigaction *act; - struct sigaction *oact; -{ - struct sigaction myact; - __sighandler_t ohandler; - - if (sig <= 0 || sig >= NSIG) - { - __set_errno (EINVAL); - return -1; - } - - ohandler = user_handlers[sig]; - - if (act != NULL) - { - user_handlers[sig] = act->sa_handler; - if (act->sa_handler != SIG_DFL && act->sa_handler != SIG_IGN) - { - myact = *act; - act = &myact; - act->sa_handler = (__sighandler_t) trampoline; - } - } - - if (__sigaction_syscall (sig, act, oact) < 0) - { - /* The syscall got an error. Restore the old handler and return -1. */ - user_handlers[sig] = ohandler; - return -1; - } - - if (oact != NULL && oact->sa_handler == (__sighandler_t) trampoline) - oact->sa_handler = ohandler; - - return 0; -} -libc_hidden_def (__sigaction) -weak_alias (__sigaction, sigaction) diff --git a/sysdeps/unix/sysv/sysv4/siginfo.h b/sysdeps/unix/sysv/sysv4/siginfo.h deleted file mode 100644 index 2bb925738c..0000000000 --- a/sysdeps/unix/sysv/sysv4/siginfo.h +++ /dev/null @@ -1,59 +0,0 @@ -/* Definitions of the siginfo structure. - Copyright (C) 1993, 1994, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@zen.org). - - 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 _SIGINFO_H -#define _SIGINFO_H 1 - -#ifdef __USE_SVID -/* SVR4 puts a ton of other stuff in this structure. For now, we'll just - define the two things we really need out of it, and hope for the best. */ - -/* These define the different states a child can have on exit. - We need these to build the status return for things like waitpid. */ -#define EXITED 1 -#define KILLED 2 -#define CORED 3 -#define TRAPPED 4 -#define STOPPED 5 -#define CONTINUED 6 - -typedef struct __siginfo - { - int filler1; - - /* Code indicating child's status */ - int __code; - - int filler2; - - /* The PID of the child. */ - long __pid; - - int filler3; - - /* The child's status. */ - int __status; - - int filler4[26]; - - } __siginfo_t; - -#endif /* __USE_SVID */ -#endif /* siginfo.h */ diff --git a/sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h b/sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h deleted file mode 100644 index 5b7ea25885..0000000000 --- a/sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h +++ /dev/null @@ -1,37 +0,0 @@ -/* Convert between lowlevel sigmask and libc representation of sigset_t. - SysVr4 version. - Copyright (C) 1998, 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Joe Keane . - - 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. */ - -static inline int __attribute__ ((unused)) -sigset_set_old_mask (sigset_t *set, int mask) -{ - set->__sigbits[0] = (unsigned int) mask; - set->__sigbits[1] = 0ul; - set->__sigbits[2] = 0ul; - set->__sigbits[3] = 0ul; - - return 0; -} - -static inline int __attribute__ ((unused)) -sigset_get_old_mask (const sigset_t *set) -{ - return (unsigned int) set->__sigbits[0]; -} diff --git a/sysdeps/unix/sysv/sysv4/solaris2/Makefile b/sysdeps/unix/sysv/sysv4/solaris2/Makefile deleted file mode 100644 index 3ad90f748a..0000000000 --- a/sysdeps/unix/sysv/sysv4/solaris2/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# The linker supplied with Solaris looks in the current directory -# before searching others. Compiling the various programs that come -# along the way (e.g., glue-ctype) will fail because it'll try to link -# with the libc.a being *constructed* in $(objdir). As a work-around, -# we add this to each native-compile. -ALL_BUILD_CFLAGS += -L/lib diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/dirent.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/dirent.h deleted file mode 100644 index fa0250eb3e..0000000000 --- a/sysdeps/unix/sysv/sysv4/solaris2/bits/dirent.h +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright (C) 1996, 1997, 1999 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 _DIRENT_H -# error "Never use directly; include instead." -#endif - -struct dirent - { -#ifndef __USE_FILE_OFFSET64 - __ino_t d_ino; - __off_t d_off; -#else - __ino64_t d_ino; - __off64_t d_off; -#endif - unsigned short int d_reclen; - char d_name[256]; /* We must not include limits.h! */ - }; - -#ifdef __USE_LARGEFILE64 -struct dirent64 - { - __ino64_t d_ino; - __off64_t d_off; - unsigned short int d_reclen; - char d_name[256]; /* We must not include limits.h! */ - }; -#endif - -#define d_fileno d_ino /* Backwards compatibility. */ - -#undef _DIRENT_HAVE_D_NAMLEN -#define _DIRENT_HAVE_D_RECLEN -#define _DIRENT_HAVE_D_OFF diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/errno.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/errno.h deleted file mode 100644 index 6c0de92151..0000000000 --- a/sysdeps/unix/sysv/sysv4/solaris2/bits/errno.h +++ /dev/null @@ -1,168 +0,0 @@ -/* Copyright (C) 1991, 1994, 1996, 1997, 1998 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. */ - -/* This file defines the `errno' constants. */ - -#if !defined __Emath_defined && (defined _ERRNO_H || defined __need_Emath) -#undef __need_Emath -#define __Emath_defined 1 - -# define EDOM 33 /* Math argument out of domain of function. */ -# define EILSEQ 88 /* Illegal byte sequence. */ -# define ERANGE 34 /* Math result not representable. */ -#endif - -#ifdef _ERRNO_H -/* All error codes the system knows about. */ - -# define EPERM 1 /* Not super-user. */ -# define ENOENT 2 /* No such file or directory. */ -# define ESRCH 3 /* No such process. */ -# define EINTR 4 /* Interrupted system call. */ -# define EIO 5 /* I/O error. */ -# define ENXIO 6 /* No such device or address. */ -# define E2BIG 7 /* Arg list too long. */ -# define ENOEXEC 8 /* Exec format error. */ -# define EBADF 9 /* Bad file number. */ -# define ECHILD 10 /* No children. */ -# define EAGAIN 11 /* Resource temporarily unavailable. */ -# define EWOULDBLOCK EAGAIN -# define ENOMEM 12 /* Not enough core. */ -# define EACCES 13 /* Permission denied. */ -# define EFAULT 14 /* Bad address. */ -# define ENOTBLK 15 /* Block device required. */ -# define EBUSY 16 /* Mount device busy. */ -# define EEXIST 17 /* File exists. */ -# define EXDEV 18 /* Cross-device link. */ -# define ENODEV 19 /* No such device. */ -# define ENOTDIR 20 /* Not a directory. */ -# define EISDIR 21 /* Is a directory. */ -# define EINVAL 22 /* Invalid argument. */ -# define ENFILE 23 /* File table overflow. */ -# define EMFILE 24 /* Too many open files. */ -# define ENOTTY 25 /* Inappropriate ioctl for device. */ -# define ETXTBSY 26 /* Text file busy. */ -# define EFBIG 27 /* File too large. */ -# define ENOSPC 28 /* No space left on device. */ -# define ESPIPE 29 /* Illegal seek. */ -# define EROFS 30 /* Read only file system. */ -# define EMLINK 31 /* Too many links. */ -# define EPIPE 32 /* Broken pipe. */ -# define ENOMSG 35 /* No message of desired type. */ -# define EIDRM 36 /* Identifier removed. */ -# define ECHRNG 37 /* Channel number out of range. */ -# define EL2NSYNC 38 /* Level 2 not synchronized. */ -# define EL3HLT 39 /* Level 3 halted. */ -# define EL3RST 40 /* Level 3 reset. */ -# define ELNRNG 41 /* Link number out of range. */ -# define EUNATCH 42 /* Protocol driver not attached. */ -# define ENOCSI 43 /* No CSI structure available. */ -# define EL2HLT 44 /* Level 2 halted. */ -# define EDEADLK 45 /* Deadlock condition. */ -# define ENOLCK 46 /* No record locks available. */ -# define ECANCELED 47 /* Operation canceled. */ -# define ENOTSUP 48 /* Operation not supported. */ - -/* Filesystem Quotas. */ -# define EDQUOT 49 /* Disc quota exceeded. */ - -/* Convergent Error Returns. */ -# define EBADE 50 /* Invalid exchange. */ -# define EBADR 51 /* Invalid request descriptor. */ -# define EXFULL 52 /* Exchange full. */ -# define ENOANO 53 /* No anode. */ -# define EBADRQC 54 /* Invalid request code. */ -# define EBADSLT 55 /* Invalid slot. */ -# define EDEADLOCK 56 /* File locking deadlock error. */ - -# define EBFONT 57 /* Bad font file fmt. */ - -/* STREAM problems. */ -# define ENOSTR 60 /* Device not a stream. */ -# define ENODATA 61 /* No data (for no delay io). */ -# define ETIME 62 /* Timer expired. */ -# define ENOSR 63 /* Out of streams resources. */ - -# define ENONET 64 /* Machine is not on the network. */ -# define ENOPKG 65 /* Package not installed. */ -# define EREMOTE 66 /* The object is remote. */ -# define ENOLINK 67 /* The link has been severed. */ -# define EADV 68 /* Advertise error. */ -# define ESRMNT 69 /* Srmount error. */ - -# define ECOMM 70 /* Communication error on send. */ -# define EPROTO 71 /* Protocol error. */ -# define EMULTIHOP 74 /* Multihop attempted. */ -# define EBADMSG 77 /* Trying to read unreadable message. */ -# define ENAMETOOLONG 78 /* Path name is too long. */ -# define EOVERFLOW 79 /* Value too large to be stored in data type.*/ -# define ENOTUNIQ 80 /* Given log. name not unique. */ -# define EBADFD 81 /* F.d. invalid for this operation. */ -# define EREMCHG 82 /* Remote address changed. */ - -/* Shared library problems. */ -# define ELIBACC 83 /* Can't access a needed shared lib. */ -# define ELIBBAD 84 /* Accessing a corrupted shared lib. */ -# define ELIBSCN 85 /* .lib section in a.out corrupted. */ -# define ELIBMAX 86 /* Attempting to link in too many libs. */ -# define ELIBEXEC 87 /* Attempting to exec a shared library. */ -# define ENOSYS 89 /* Unsupported file system operation. */ -# define ELOOP 90 /* Symbolic link loop. */ -# define ERESTART 91 /* Restartable system call. */ -# define ESTRPIPE 92 /* If pipe/FIFO, don't sleep in stream head. */ -# define ENOTEMPTY 93 /* Directory not empty. */ -# define EUSERS 94 /* Too many users (for UFS). */ - -/* BSD Networking Software: argument errors. */ -# define ENOTSOCK 95 /* Socket operation on non-socket. */ -# define EDESTADDRREQ 96 /* Destination address required. */ -# define EMSGSIZE 97 /* Message too long. */ -# define EPROTOTYPE 98 /* Protocol wrong type for socket. */ -# define ENOPROTOOPT 99 /* Protocol not available. */ -# define EPROTONOSUPPORT 120 /* Protocol not supported. */ -# define ESOCKTNOSUPPORT 121 /* Socket type not supported. */ -# define EOPNOTSUPP 122 /* Operation not supported on socket. */ -# define EPFNOSUPPORT 123 /* Protocol family not supported. */ -# define EAFNOSUPPORT 124 /* Address family not supported by - protocol family. */ -# define EADDRINUSE 125 /* Address already in use. */ -# define EADDRNOTAVAIL 126 /* Can't assign requested address. */ -/* BSD Networking Software: operational errors. */ -# define ENETDOWN 127 /* Network is down. */ -# define ENETUNREACH 128 /* Network is unreachable. */ -# define ENETRESET 129 /* Network dropped connection because - of reset. */ -# define ECONNABORTED 130 /* Software caused connection abort. */ -# define ECONNRESET 131 /* Connection reset by peer. */ -# define ENOBUFS 132 /* No buffer space available. */ -# define EISCONN 133 /* Socket is already connected. */ -# define ENOTCONN 134 /* Socket is not connected. */ -/* XENIX has 135 - 142. */ -# define ESHUTDOWN 143 /* Can't send after socket shutdown. */ -# define ETOOMANYREFS 144 /* Too many references: can't splice. */ -# define ETIMEDOUT 145 /* Connection timed out. */ -# define ECONNREFUSED 146 /* Connection refused. */ -# define EHOSTDOWN 147 /* Host is down. */ -# define EHOSTUNREACH 148 /* No route to host. */ -# define EALREADY 149 /* operation already in progress. */ -# define EINPROGRESS 150 /* operation now in progress. */ - -/* SUN Network File System. */ -# define ESTALE 151 /* Stale NFS file handle. */ - -#endif diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/signum.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/signum.h deleted file mode 100644 index a2659530b6..0000000000 --- a/sysdeps/unix/sysv/sysv4/solaris2/bits/signum.h +++ /dev/null @@ -1,76 +0,0 @@ -/* Signal number definitions. Solaris 2 version. - Copyright (C) 1994, 1996, 1998 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. */ - -#ifdef _SIGNAL_H - -/* Fake signal functions. */ -#define SIG_ERR ((__sighandler_t) -1) /* Error return. */ -#define SIG_DFL ((__sighandler_t) 0) /* Default action. */ -#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */ -#ifdef __USE_UNIX98 -# define SIG_HOLD ((__sighandler_t) 2) /* Add signal to hold mask. */ -#endif - - -/* Signals. */ -#define SIGHUP 1 /* Hangup (POSIX). */ -#define SIGINT 2 /* Interrupt (ANSI). */ -#define SIGQUIT 3 /* Quit (POSIX). */ -#define SIGILL 4 /* Illegal instruction (ANSI). */ -#define SIGABRT SIGIOT /* Abort (ANSI). */ -#define SIGTRAP 5 /* Trace trap (POSIX). */ -#define SIGIOT 6 /* IOT trap (4.2 BSD). */ -#define SIGEMT 7 /* EMT trap (4.2 BSD). */ -#define SIGFPE 8 /* Floating-point exception (ANSI). */ -#define SIGKILL 9 /* Kill, unblockable (POSIX). */ -#define SIGBUS 10 /* Bus error (4.2 BSD). */ -#define SIGSEGV 11 /* Segmentation violation (ANSI). */ -#define SIGSYS 12 /* Bad argument to system call (4.2 BSD)*/ -#define SIGPIPE 13 /* Broken pipe (POSIX). */ -#define SIGALRM 14 /* Alarm clock (POSIX). */ -#define SIGTERM 15 /* Termination (ANSI). */ -#define SIGUSR1 16 /* User-defined signal 1 (POSIX). */ -#define SIGUSR2 17 /* User-defined signal 2 (POSIX). */ -#define SIGCHLD 18 /* Child status has changed (POSIX). */ -#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */ -#define SIGPWR 19 /* Power failure restart (System V). */ -#define SIGWINCH 20 /* Window size change (4.3 BSD, Sun). */ -#define SIGURG 21 /* Urgent condition on socket (4.2 BSD).*/ -#define SIGPOLL 22 /* Pollable event occurred (System V). */ -#define SIGIO SIGPOLL /* I/O now possible (4.2 BSD). */ -#define SIGSTOP 23 /* Stop, unblockable (POSIX). */ -#define SIGTSTP 24 /* Keyboard stop (POSIX). */ -#define SIGCONT 25 /* Continue (POSIX). */ -#define SIGTTIN 26 /* Background read from tty (POSIX). */ -#define SIGTTOU 27 /* Background write to tty (POSIX). */ -#define SIGVTALRM 28 /* Virtual alarm clock (4.2 BSD). */ -#define SIGPROF 29 /* Profiling alarm clock (4.2 BSD). */ -#define SIGXCPU 30 /* CPU limit exceeded (4.2 BSD). */ -#define SIGXFSZ 31 /* File size limit exceeded (4.2 BSD). */ -/* The following signals are new in Solaris 2. */ -#define SIGWAITING 32 /* Process's lwps are blocked. */ -#define SIGLWP 33 /* Special signal used by thread library. */ -#define SIGFREEZE 34 /* Special signal used by CPR. */ -#define SIGTHAW 35 /* Special signal used by CPR. */ -#define _SIGRTMIN 36 /* First (highest-priority) realtime signal. */ -#define _SIGRTMAX 43 /* Last (lowest-priority) realtime signal. */ - -#endif /* included. */ - -#define _NSIG 44 /* Biggest signal number + 1. */ diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/sigstack.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/sigstack.h deleted file mode 100644 index 753caac8a8..0000000000 --- a/sysdeps/unix/sysv/sysv4/solaris2/bits/sigstack.h +++ /dev/null @@ -1,55 +0,0 @@ -/* sigstack, sigaltstack definitions. - Copyright (C) 1998 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 _SIGNAL_H -# error "Never include this file directly. Use instead" -#endif - - -/* Structure describing a signal stack (obsolete). */ -struct sigstack - { - __ptr_t ss_sp; /* Signal stack pointer. */ - int ss_onstack; /* Nonzero if executing on this stack. */ - }; - - -/* Possible values for `ss_flags.'. */ -enum -{ - SS_ONSTACK = 1, -#define SS_ONSTACK SS_ONSTACK - SS_DISABLE -#define SS_DISABLE SS_DISABLE -}; - -/* Minimum stack size for a signal handler. */ -#define MINSIGSTKSZ 2048 - -/* System default stack size. */ -#define SIGSTKSZ 8192 - - -/* Alternate, preferred interface. */ -typedef struct sigaltstack - { - __ptr_t ss_sp; - int ss_flags; - size_t ss_size; - } stack_t; diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h deleted file mode 100644 index 22c1c1f855..0000000000 --- a/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h +++ /dev/null @@ -1,119 +0,0 @@ -/* Copyright (C) 1993, 96, 97, 98, 99, 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 - 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 _SYS_STAT_H -# error "Never include directly; use instead." -#endif - -#include - -/* Length of array allocated for file system type name. */ -#define _ST_FSTYPSZ 16 - - -/* Structure describing file characteristics. */ -struct stat - { - __dev_t st_dev; - long int st_filler1[3]; - __ino_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_filler2[2]; - - __off_t st_size; /* Size of file, in bytes. */ - /* SVR4 added this extra long to allow for expansion of off_t. */ - long int st_filler3; - - __time_t st_atime; /* Time of last access. */ - unsigned long int st_atime_usec; - __time_t st_mtime; /* Time of last modification. */ - unsigned long int st_mtime_usec; - __time_t st_ctime; /* Time of last status change. */ - unsigned long int st_ctime_usec; - - __blksize_t st_blksize; /* Optimal block size for I/O. */ -#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ - - __blkcnt_t st_blocks; /* Number of 512-byte blocks allocated. */ - char st_fstype[_ST_FSTYPSZ]; - long int st_filler4[8]; - }; - -#ifdef __USE_LARGEFILE64 -/* struct stat64 has the shape as stat */ -struct stat64 - { - __dev_t st_dev; /* Device */ - long int st_filler1[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_filler2; - - __off64_t st_size; /* Size of file, in bytes. */ - - __time_t st_atime; /* Time of last access */ - unsigned long int st_atime_usec; - __time_t st_mtime; /* Time of last modification */ - unsigned long int st_mtime_usec; - __time_t st_ctime; /* Time of last status change */ - unsigned long int st_ctime_usec; - - __blksize_t st_blksize; - __blkcnt64_t st_blocks; - char st_fstype[_ST_FSTYPSZ]; - long int st_filler3[8]; -}; -#endif - - -/* Encoding of the file mode. */ - -#define __S_IFMT 0170000 /* These bits determine file type. */ - -/* File types. */ -#define __S_IFDIR 0040000 /* Directory. */ -#define __S_IFCHR 0020000 /* Character device. */ -#define __S_IFBLK 0060000 /* Block device. */ -#define __S_IFREG 0100000 /* Regular file. */ -#define __S_IFIFO 0010000 /* FIFO. */ - -/* These don't actually exist on System V, but having them doesn't hurt. */ -#define __S_IFLNK 0120000 /* Symbolic link. */ -#define __S_IFSOCK 0140000 /* Socket. */ - -/* POSIX.1b objects. */ -#define __S_TYPEISMQ(buf) (0) -#define __S_TYPEISSEM(buf) (0) -#define __S_TYPEISSHM(buf) (0) - -/* Protection bits. */ - -#define __S_ISUID 04000 /* Set user ID on execution. */ -#define __S_ISGID 02000 /* Set group ID on execution. */ -#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ -#define __S_IREAD 0400 /* Read by owner. */ -#define __S_IWRITE 0200 /* Write by owner. */ -#define __S_IEXEC 0100 /* Execute by owner. */ diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h deleted file mode 100644 index a9ce216c69..0000000000 --- a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h +++ /dev/null @@ -1,120 +0,0 @@ -/* Copyright (C) 1991,92,1994-1999,2000,2001 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. */ - -/* - * Never include this file directly; use instead. - */ - -#ifndef _BITS_TYPES_H -#define _BITS_TYPES_H 1 - -#include - -#define __need_size_t -#include - -/* Convenience types. */ -typedef unsigned char __u_char; -typedef unsigned short __u_short; -typedef unsigned int __u_int; -typedef unsigned long __u_long; -#ifdef __GNUC__ -typedef unsigned long long int __u_quad_t; -typedef long long int __quad_t; -#else -typedef struct -{ - long __val[2]; -} __quad_t; -typedef struct -{ - __u_long __val[2]; -} __u_quad_t; -#endif -typedef signed char __int8_t; -typedef unsigned char __uint8_t; -typedef signed short int __int16_t; -typedef unsigned short int __uint16_t; -typedef signed int __int32_t; -typedef unsigned int __uint32_t; -#ifdef __GNUC__ -typedef signed long long int __int64_t; -typedef unsigned long long int __uint64_t; -#endif -typedef __quad_t *__qaddr_t; -typedef unsigned long int __dev_t; /* Type of device numbers. */ -typedef long int __uid_t; /* Type of user identifications. */ -typedef long int __gid_t; /* Type of group identifications. */ -typedef unsigned long int __ino_t; /* Type of file serial numbers. */ -typedef unsigned long int __mode_t; /* Type of file attribute bitmasks. */ -typedef unsigned long int __nlink_t; /* Type of file link counts. */ -typedef long int __off_t; /* Type of file sizes and offsets. */ -typedef __quad_t __loff_t; /* Type of file sizes and offsets. */ -typedef long int __pid_t; /* Type of process identifications. */ -typedef int __ssize_t; /* Type of a byte count, or error. */ -typedef __u_quad_t __fsid_t; /* Type of file system IDs. */ -typedef long int __clock_t; /* Type of CPU usage counts. */ -typedef long int __rlim_t; /* Type for resource measurement. */ -typedef __quad_t __rlim64_t; /* Type for resource measurement (LFS). */ -typedef __quad_t __ino64_t; /* Type for file serial numbers. */ -typedef __loff_t __off64_t; /* Type of file izes and offsets. */ -typedef unsigned int __id_t; /* General type for IDs. */ - -/* Everythin' else. */ -typedef long int __daddr_t; /* The type of a disk address. */ -typedef char *__caddr_t; -typedef long int __time_t; -typedef unsigned int __useconds_t; -typedef int __suseconds_t; -typedef long int __swblk_t; /* Type of a swap block maybe? */ -typedef int __key_t; /* Type of an IPC key */ - -/* fd_set for select. */ - -/* Number of descriptors that can fit in an `fd_set'. */ -#define __FD_SETSIZE 1024 - - -/* Type to represent block size. */ -typedef long int __blksize_t; - -/* Types from the Large File Support interface. */ - -/* Type to count number os disk blocks. */ -typedef long int __blkcnt_t; -typedef __quad_t __blkcnt64_t; - -/* Type to count file system blocks. */ -typedef unsigned int __fsblkcnt_t; -typedef __u_quad_t __fsblkcnt64_t; - -/* Type to count file system inodes. */ -typedef unsigned long int __fsfilcnt_t; -typedef __u_quad_t __fsfilcnt64_t; - -/* Used in XTI. */ -typedef int __t_scalar_t; -typedef unsigned int __t_uscalar_t; - -/* Duplicates info from stdint.h but this is used in unistd.h. */ -typedef long int __intptr_t; - -/* Duplicate info from sys/socket.h. */ -typedef unsigned int __socklen_t; - -#endif /* bits/types.h */ diff --git a/sysdeps/unix/sysv/sysv4/solaris2/fsync.S b/sysdeps/unix/sysv/sysv4/solaris2/fsync.S deleted file mode 100644 index 493926a98c..0000000000 --- a/sysdeps/unix/sysv/sysv4/solaris2/fsync.S +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@zen.org). - - 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. */ - -#include - -/* Solaris uses fdsync for the normal fsync. */ -ENTRY(fsync) - mov 16, %i1 - mov SYS_ify(fdsync), %g1 - ta 8 - bcs syscall_error - nop - mov %g0, %o0 - ret diff --git a/sysdeps/unix/sysv/sysv4/solaris2/getdents.c b/sysdeps/unix/sysv/sysv4/solaris2/getdents.c deleted file mode 100644 index ab782ffaac..0000000000 --- a/sysdeps/unix/sysv/sysv4/solaris2/getdents.c +++ /dev/null @@ -1,114 +0,0 @@ -/* Copyright (C) 1993,95,96,97,98, 2004 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. */ - -#include -#include -#include -#include -#include -#include -#include - -#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) - - -extern int __getdents (int fd, char *buf, size_t nbytes); - -/* For Solaris we need a special version of this file since the - definition of `struct dirent' is not the same for the kernel and - the libc. There is one additional field which might be introduced - in the kernel structure in the future. - - He is the system definition of `struct dirent' as of 2.6: */ - -struct kernel_dirent - { - ino_t d_ino; - off_t d_off; - unsigned short int d_reclen; - char d_name[256]; - }; - -#ifdef GETDENTS64 -#define __getdirentries __getdirentries64 -#define dirent dirent64 -#endif - -/* The problem here is that we cannot simply read the next NBYTES - bytes. We need to take the additional field into account. We use - some heuristic. Assuming the directory contains names with 14 - characters on average we can compute an estimate number of entries - which fit in the buffer. Taking this number allows us to specify a - correct number of bytes to read. If we should be wrong, we can reset - the file descriptor. */ -ssize_t -__getdirentries (int fd, char *buf, size_t nbytes, off_t *basep) -{ - off_t base = __lseek (fd, (off_t) 0, SEEK_CUR); - off_t last_offset = base; - size_t red_nbytes; - struct kernel_dirent *skdp, *kdp; - struct dirent *dp; - int retval; - const size_t size_diff = (offsetof (struct dirent, d_name) - - offsetof (struct kernel_dirent, d_name)); - - red_nbytes = nbytes - ((nbytes / (offsetof (struct dirent, d_name) + 14)) - * size_diff); - - dp = (struct dirent *) buf; - skdp = kdp = __alloca (red_nbytes); - - retval = __getdents (fd, (char *) kdp, red_nbytes); - - while ((char *) kdp < (char *) skdp + retval) - { - const size_t alignment = __alignof__ (struct dirent); - /* Since kdp->d_reclen is already aligned for the kernel structure - this may compute a value that is bigger than necessary. */ - size_t new_reclen = ((kdp->d_reclen + size_diff + alignment - 1) - & ~(alignment - 1)); - if ((char *) dp + new_reclen > buf + nbytes) - { - /* Our heuristic failed. We read too many entries. Reset - the stream. */ - __lseek (fd, last_offset, SEEK_SET); - break; - } - - last_offset = kdp->d_off; - dp->d_ino = kdp->d_ino; - dp->d_off = kdp->d_off; - dp->d_reclen = new_reclen; - dp->d_type = DT_UNKNOWN; - memcpy (dp->d_name, kdp->d_name, - kdp->d_reclen - offsetof (struct kernel_dirent, d_name)); - - dp = (struct dirent *) ((char *) dp + new_reclen); - kdp = (struct kernel_dirent *) (((char *) kdp) + kdp->d_reclen); - } - - if (basep) - *basep = base; - - return (char *) dp - buf; -} - -#ifndef GETDENTS64 -weak_alias (__getdirentries, getdirentries) -#endif diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sigpending.c b/sysdeps/unix/sysv/sysv4/solaris2/sigpending.c deleted file mode 100644 index 2723d79f7a..0000000000 --- a/sysdeps/unix/sysv/sysv4/solaris2/sigpending.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (C) 1998 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. */ - -#include -#include -#include - -extern int __syscall_sigpending (int subcode, sigset_t *set); - - -/* Store in SET all signals that are blocked and pending. */ -int -sigpending (sigset_t *set) -{ - if (set == NULL) - { - __set_errno (EINVAL); - return -1; - } - - return __syscall_sigpending (1, set); -} diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sigstack.c b/sysdeps/unix/sysv/sysv4/solaris2/sigstack.c deleted file mode 100644 index 5aa73c8dcb..0000000000 --- a/sysdeps/unix/sysv/sysv4/solaris2/sigstack.c +++ /dev/null @@ -1,3 +0,0 @@ -/* We can reuse the Linux implementation with some tricks. */ -#define __NR_sigaltstack 1 -#include diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sigwaitinfo.c b/sysdeps/unix/sysv/sysv4/solaris2/sigwaitinfo.c deleted file mode 100644 index f246640023..0000000000 --- a/sysdeps/unix/sysv/sysv4/solaris2/sigwaitinfo.c +++ /dev/null @@ -1,2 +0,0 @@ -/* We can reuse the Linux implementation. */ -#include diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile b/sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile deleted file mode 100644 index 1c17ea168e..0000000000 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -# This flag is necessary because GCC now tries to call _Q_{mul, etc...} -# instead of doing the stuff the hard way. For now, printf_fp.o, __vfscanf.o, -# and difftime.o don't work because of this. The long-term fix is to actually -# implement what they're doing, but for the short-term, we must do this. -sysdep-CFLAGS := $(sysdep-CFLAGS) -mhard-quad-float - -ifeq ($(subdir),crypt) - -crypt := crypt.solar - -endif diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/bits/sigcontext.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/bits/sigcontext.h deleted file mode 100644 index 7c4bca6049..0000000000 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/bits/sigcontext.h +++ /dev/null @@ -1,34 +0,0 @@ -/* Structure describing state saved while handling a signal. Sparc version. - Copyright (C) 1992, 1994, 1997 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 _SIGNAL_H -# error "Never use directly; include instead." -#endif - -struct sigcontext - { - int sc_onstack; - __sigset_t sc_mask; - -#define SPARC_MAXREGWINDOW 31 /* Maximum usable register windows. */ - int sc_sp, sc_pc, sc_npc, sc_psr, sc_g1, sc_o0; - int sc_wbcnt; /* Number of outstanding windows. */ - __ptr_t sc_spbuf[SPARC_MAXREGWINDOW]; /* SP's for each window. */ - int sc_wbuf[SPARC_MAXREGWINDOW][16]; /* Saved register windows. */ - }; diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c b/sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c deleted file mode 100644 index 3c75e3f011..0000000000 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c +++ /dev/null @@ -1,185 +0,0 @@ -/* Copyright (C) 1999 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. */ - -#include -#include - - -/* This is a list of all known `errno' codes. */ - - -const int _sys_nerr = 152; - -const char *const _sys_errlist[] = -{ - N_("Error 0"), - N_("Not owner"), - N_("No such file or directory"), - N_("No such process"), - N_("Interrupted system call"), - N_("I/O error"), - N_("No such device or address"), - N_("Arg list too long"), - N_("Exec format error"), - N_("Bad file number"), - N_("No child processes"), - N_("Resource temporarily unavailable"), - N_("Not enough space"), - N_("Permission denied"), - N_("Bad address"), - N_("Block device required"), - N_("Device busy"), - N_("File exists"), - N_("Cross-device link"), - N_("No such device"), - N_("Not a directory"), - N_("Is a directory"), - N_("Invalid argument"), - N_("File table overflow"), - N_("Too many open files"), - N_("Inappropriate ioctl for device"), - N_("Text file busy"), - N_("File too large"), - N_("No space left on device"), - N_("Illegal seek"), - N_("Read-only file system"), - N_("Too many links"), - N_("Broken pipe"), - N_("Argument out of domain"), - N_("Result too large"), - N_("No message of desired type"), - N_("Identifier removed"), - N_("Channel number out of range"), - N_("Level 2 not synchronized"), - N_("Level 3 halted"), - N_("Level 3 reset"), - N_("Link number out of range"), - N_("Protocol driver not attached"), - N_("No CSI structure available"), - N_("Level 2 halted"), - N_("Deadlock situation detected/avoided"), - N_("No record locks available"), - N_("Operation canceled"), - N_("Operation not supported"), - N_("Disc quota exceeded"), - N_("Bad exchange descriptor"), - N_("Bad request descriptor"), - N_("Message tables full"), - N_("Anode table overflow"), - N_("Bad request code"), - N_("Invalid slot"), - N_("File locking deadlock"), - N_("Bad font file format"), - N_("Error 58"), - N_("Error 59"), - N_("Not a stream device"), - N_("No data available"), - N_("Timer expired"), - N_("Out of stream resources"), - N_("Machine is not on the network"), - N_("Package not installed"), - N_("Object is remote"), - N_("Link has been severed"), - N_("Advertise error"), - N_("Srmount error"), - N_("Communication error on send"), - N_("Protocol error"), - N_("Error 72"), - N_("Error 73"), - N_("Multihop attempted"), - N_("Error 75"), - N_("Error 76"), - N_("Not a data message"), - N_("File name too long"), - N_("Value too large for defined data type"), - N_("Name not unique on network"), - N_("File descriptor in bad state"), - N_("Remote address changed"), - N_("Can not access a needed shared library"), - N_("Accessing a corrupted shared library"), - N_(".lib section in a.out corrupted"), - N_("Attempting to link in more shared libraries than system limit"), - N_("Can not exec a shared library directly"), - N_("Illegal byte sequence"), - N_("Operation not applicable"), - N_("Number of symbolic links encountered during path name traversal exceeds MAXSYMLINKS"), - N_("Error 91"), - N_("Error 92"), - N_("Directory not empty"), - N_("Too many users"), - N_("Socket operation on non-socket"), - N_("Destination address required"), - N_("Message too long"), - N_("Protocol wrong type for socket"), - N_("Option not supported by protocol"), - N_("Error 100"), - N_("Error 101"), - N_("Error 102"), - N_("Error 103"), - N_("Error 104"), - N_("Error 105"), - N_("Error 106"), - N_("Error 107"), - N_("Error 108"), - N_("Error 109"), - N_("Error 110"), - N_("Error 111"), - N_("Error 112"), - N_("Error 113"), - N_("Error 114"), - N_("Error 115"), - N_("Error 116"), - N_("Error 117"), - N_("Error 118"), - N_("Error 119"), - N_("Protocol not supported"), - N_("Socket type not supported"), - N_("Operation not supported on transport endpoint"), - N_("Protocol family not supported"), - N_("Address family not supported by protocol family"), - N_("Address already in use"), - N_("Cannot assign requested address"), - N_("Network is down"), - N_("Network is unreachable"), - N_("Network dropped connection because of reset"), - N_("Software caused connection abort"), - N_("Connection reset by peer"), - N_("No buffer space available"), - N_("Transport endpoint is already connected"), - N_("Transport endpoint is not connected"), - N_("Structure needs cleaning"), - N_("Error 136"), - N_("Not a name file"), - N_("Not available"), - N_("Is a name file"), - N_("Remote I/O error"), - N_("Reserved for future use"), - N_("Error 142"), - N_("Cannot send after socket shutdown"), - N_("Too many references: cannot splice"), - N_("Connection timed out"), - N_("Connection refused"), - N_("Host is down"), - N_("No route to host"), - N_("Operation already in progress"), - N_("Operation now in progress"), - N_("Stale NFS file handle") -}; - -weak_alias (_sys_errlist, sys_errlist) -weak_alias (_sys_nerr, sys_nerr) diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/syscall.S b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/syscall.S deleted file mode 100644 index b9f2996e31..0000000000 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/syscall.S +++ /dev/null @@ -1,2 +0,0 @@ -/* Bets are that the Linux code works... */ -#include diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/start.c b/sysdeps/unix/sysv/sysv4/solaris2/sparc/start.c deleted file mode 100644 index afdfaaa2e5..0000000000 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/start.c +++ /dev/null @@ -1,4 +0,0 @@ -#define NO_SHLIB -/* Solaris needs start named `_start', not `start'. */ -#define NO_EXPLICIT_START -#include diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys/trap.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys/trap.h deleted file mode 100644 index 39d2645973..0000000000 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys/trap.h +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright (C) 1998 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 _SYS_TRAP_H -#define _SYS_TRAP_H 1 - -/* Solaris2 software traps. */ - -#define ST_OSYSCALL 0x00 -#define ST_BREAKPOINT 0x01 -#define ST_DIV0 0x02 -#define ST_FLUSH_WINDOWS 0x03 -#define ST_CLEAN_WINDOWS 0x04 -#define ST_RANGE_CHECK 0x05 -#define ST_FIX_ALIGN 0x06 -#define ST_INT_OVERFLOW 0x07 -#define ST_SYSCALL 0x08 - -/* Traps 0x10 through 0x1f are allotted to the user. */ - -#endif /* sys/trap.h */ diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys/ucontext.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys/ucontext.h deleted file mode 100644 index 6e9f69067d..0000000000 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys/ucontext.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (C) 1998 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 _SYS_UCONTEXT_H -#define _SYS_UCONTEXT_H 1 - -#include -#include -#include - -typedef struct -{ - long int mc_filler[78]; -} mcontext_t; - -struct ucontext -{ - unsigned long int uc_flags; - struct ucontext *uc_link; - sigset_t uc_sigmask; - stack_t uc_stack; - mcontext_t uc_mcontext; - long int uc_filler[23]; -}; -typedef struct ucontext ucontext_t; - -#endif /* sys/ucontext.h */ diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/syscalls.list b/sysdeps/unix/sysv/sysv4/solaris2/sparc/syscalls.list deleted file mode 100644 index d96fbba7e2..0000000000 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/syscalls.list +++ /dev/null @@ -1,3 +0,0 @@ -# File name Caller Syscall name # args Strong name Weak names - -sys-sig - context 2 __context_syscall diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S deleted file mode 100644 index 2ac767c987..0000000000 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (C) 1993, 1994, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@zen.org). - - 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. */ - -#include -#define _ERRNO_H -#include - -ENTRY(syscall_error) - /* If it was a syscall that got interrupted, but can - be restarted, drop EINTR in. */ - cmp %o0, ERESTART - be,a notint - mov EINTR, %o0 - -notint: -#if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN - /* We translate the system's EWOULDBLOCK error into EAGAIN. - The GNU C library always defines EWOULDBLOCK==EAGAIN. - EWOULDBLOCK_sys is the original number. */ - cmp %o0, EWOULDBLOCK_sys - be,a notblock - mov EAGAIN, %o0 -#endif - -notblock:/* Store it in errno... */ - sethi %hi(C_SYMBOL_NAME(errno)), %g1 - st %o0, [%g1 + %lo(C_SYMBOL_NAME(errno))] - - /* And just kick back a -1. */ - retl - mov -1, %o0 diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h deleted file mode 100644 index 9a0db6afe1..0000000000 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h +++ /dev/null @@ -1,56 +0,0 @@ -/* Copyright (C) 1993,1994,1995,1997,1998,2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@zen.org). - - 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. */ - -/* Solaris 2 does not precede the asm names of C symbols with a `_'. */ -#ifndef NO_UNDERSCORES -#define NO_UNDERSCORES -#endif - -#include - -#ifdef __ASSEMBLER__ - -/* As of gcc-2.6.0, it complains about pound signs in front of things - that aren't arguments to the macro. So we use this to pull it off - instead. */ -#define cat(a,b) a##b -#define poundfnc cat(#,function) - -#define ENTRY(name) \ - .section ".text"; \ - .align 4; \ - .global C_SYMBOL_NAME(name); \ - .type C_SYMBOL_NAME(name), poundfnc; \ - C_LABEL(name) - -#define PSEUDO(name, syscall_name, args) \ - ENTRY (name) \ - mov SYS_ify(syscall_name), %g1; \ - ta 8; \ - bcs C_SYMBOL_NAME(syscall_error); \ - nop - -#define ret retl; nop -#define r0 %o0 -#define r1 %o1 -#define MOVE(x,y) mov x, y - -#define LOC(name) .L##name - -#endif /* __ASSEMBLER__ */ diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sys/param.h b/sysdeps/unix/sysv/sysv4/solaris2/sys/param.h deleted file mode 100644 index bbd7b06a11..0000000000 --- a/sysdeps/unix/sysv/sysv4/solaris2/sys/param.h +++ /dev/null @@ -1,59 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997, 1998 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 _SYS_PARAM_H -#define _SYS_PARAM_H 1 - -#include - -/* BSD names for some values. */ - -#define NBBY CHAR_BIT -#ifndef NGROUPS -# define NGROUPS NGROUPS_MAX -#endif -#define MAXSYMLINKS 5 -#define CANBSIZ MAX_CANON -#define NCARGS ARG_MAX -#define MAXPATHLEN PATH_MAX -#define NOFILE OPEN_MAX - - -#include - -/* Bit map related macros. */ -#define setbit(a,i) ((a)[(i)/NBBY] |= 1<<((i)%NBBY)) -#define clrbit(a,i) ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY))) -#define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY))) -#define isclr(a,i) (((a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0) - -/* Macros for counting and rounding. */ -#ifndef howmany -# define howmany(x, y) (((x)+((y)-1))/(y)) -#endif -#define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) -#define powerof2(x) ((((x)-1)&(x))==0) - -/* Macros for min/max. */ -#define MIN(a,b) (((a)<(b))?(a):(b)) -#define MAX(a,b) (((a)>(b))?(a):(b)) - -/* Unit of `st_blocks'. */ -#define DEV_BSIZE 512 - -#endif /* sys/param.h */ diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sys/syscall.h b/sysdeps/unix/sysv/sysv4/solaris2/sys/syscall.h deleted file mode 100644 index 15c43a3c33..0000000000 --- a/sysdeps/unix/sysv/sysv4/solaris2/sys/syscall.h +++ /dev/null @@ -1,245 +0,0 @@ -/* Copyright (C) 1998 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 _SYSCALL_H -#define _SYSCALL_H 1 - -/* Solaris 2 syscall numbers */ - -#define SYS_syscall 0 -#define SYS_exit 1 -#define SYS_fork 2 -#define SYS_read 3 -#define SYS_write 4 -#define SYS_open 5 -#define SYS_close 6 -#define SYS_wait 7 -#define SYS_creat 8 -#define SYS_link 9 -#define SYS_unlink 10 -#define SYS_exec 11 -#define SYS_chdir 12 -#define SYS_time 13 -#define SYS_mknod 14 -#define SYS_chmod 15 -#define SYS_chown 16 -#define SYS_brk 17 -#define SYS_stat 18 -#define SYS_lseek 19 -#define SYS_getpid 20 -#define SYS_mount 21 -#define SYS_umount 22 -#define SYS_setuid 23 -#define SYS_getuid 24 -#define SYS_stime 25 -#define SYS_ptrace 26 -#define SYS_alarm 27 -#define SYS_fstat 28 -#define SYS_pause 29 -#define SYS_utime 30 -#define SYS_stty 31 -#define SYS_gtty 32 -#define SYS_access 33 -#define SYS_nice 34 -#define SYS_statfs 35 -#define SYS_sync 36 -#define SYS_kill 37 -#define SYS_fstatfs 38 -#define SYS_pgrpsys 39 -#define SYS_xenix 40 -#define SYS_dup 41 -#define SYS_pipe 42 -#define SYS_times 43 -#define SYS_profil 44 -#define SYS_plock 45 -#define SYS_setgid 46 -#define SYS_getgid 47 -#define SYS_signal 48 -#define SYS_msgsys 49 -#define SYS_syssun 50 -#define SYS_sysi86 50 -#define SYS_sysppc 50 -#define SYS_acct 51 -#define SYS_shmsys 52 -#define SYS_semsys 53 -#define SYS_ioctl 54 -#define SYS_uadmin 55 -#define SYS_utssys 57 -#define SYS_fdsync 58 -#define SYS_execve 59 -#define SYS_umask 60 -#define SYS_chroot 61 -#define SYS_fcntl 62 -#define SYS_ulimit 63 -#define SYS_rmdir 79 -#define SYS_mkdir 80 -#define SYS_getdents 81 -#define SYS_sysfs 84 -#define SYS_getmsg 85 -#define SYS_putmsg 86 -#define SYS_poll 87 -#define SYS_lstat 88 -#define SYS_symlink 89 -#define SYS_readlink 90 -#define SYS_setgroups 91 -#define SYS_getgroups 92 -#define SYS_fchmod 93 -#define SYS_fchown 94 -#define SYS_sigprocmask 95 -#define SYS_sigsuspend 96 -#define SYS_sigaltstack 97 -#define SYS_sigaction 98 -#define SYS_sigpending 99 -#define SYS_context 100 -#define SYS_evsys 101 -#define SYS_evtrapret 102 -#define SYS_statvfs 103 -#define SYS_fstatvfs 104 -#define SYS_nfssys 106 -#define SYS_waitsys 107 -#define SYS_sigsendsys 108 -#define SYS_hrtsys 109 -#define SYS_acancel 110 -#define SYS_async 111 -#define SYS_priocntlsys 112 -#define SYS_pathconf 113 -#define SYS_mincore 114 -#define SYS_mmap 115 -#define SYS_mprotect 116 -#define SYS_munmap 117 -#define SYS_fpathconf 118 -#define SYS_vfork 119 -#define SYS_fchdir 120 -#define SYS_readv 121 -#define SYS_writev 122 -#define SYS_xstat 123 -#define SYS_lxstat 124 -#define SYS_fxstat 125 -#define SYS_xmknod 126 -#define SYS_clocal 127 -#define SYS_setrlimit 128 -#define SYS_getrlimit 129 -#define SYS_lchown 130 -#define SYS_memcntl 131 -#define SYS_getpmsg 132 -#define SYS_putpmsg 133 -#define SYS_rename 134 -#define SYS_uname 135 -#define SYS_setegid 136 -#define SYS_sysconfig 137 -#define SYS_adjtime 138 -#define SYS_systeminfo 139 -#define SYS_seteuid 141 -#define SYS_vtrace 142 -#define SYS_fork1 143 -#define SYS_sigtimedwait 144 -#define SYS_lwp_info 145 -#define SYS_yield 146 -#define SYS_lwp_sema_wait 147 -#define SYS_lwp_sema_post 148 -#define SYS_lwp_sema_trywait 149 -#define SYS_modctl 152 -#define SYS_fchroot 153 -#define SYS_utimes 154 -#define SYS_vhangup 155 -#define SYS_gettimeofday 156 -#define SYS_getitimer 157 -#define SYS_setitimer 158 -#define SYS_lwp_create 159 -#define SYS_lwp_exit 160 -#define SYS_lwp_suspend 161 -#define SYS_lwp_continue 162 -#define SYS_lwp_kill 163 -#define SYS_lwp_self 164 -#define SYS_lwp_setprivate 165 -#define SYS_lwp_getprivate 166 -#define SYS_lwp_wait 167 -#define SYS_lwp_mutex_unlock 168 -#define SYS_lwp_mutex_lock 169 -#define SYS_lwp_cond_wait 170 -#define SYS_lwp_cond_signal 171 -#define SYS_lwp_cond_broadcast 172 -#define SYS_pread 173 -#define SYS_pwrite 174 -#define SYS_llseek 175 -#define SYS_inst_sync 176 -#define SYS_kaio 178 -#define SYS_tsolsys 184 -#define SYS_acl 185 -#define SYS_auditsys 186 -#define SYS_processor_bind 187 -#define SYS_processor_info 188 -#define SYS_p_online 189 -#define SYS_sigqueue 190 -#define SYS_clock_gettime 191 -#define SYS_clock_settime 192 -#define SYS_clock_getres 193 -#define SYS_timer_create 194 -#define SYS_timer_delete 195 -#define SYS_timer_settime 196 -#define SYS_timer_gettime 197 -#define SYS_timer_getoverrun 198 -#define SYS_nanosleep 199 -#define SYS_facl 200 -#define SYS_door 201 -#define SYS_setreuid 202 -#define SYS_setregid 203 -#define SYS_install_utrap 204 -#define SYS_signotify 205 -#define SYS_schedctl 206 -#define SYS_pset 207 -#define SYS_resolvepath 209 -#define SYS_signotifywait 210 -#define SYS_lwp_sigredirect 211 -#define SYS_lwp_alarm 212 -#define SYS_getdents64 213 -#define SYS_mmap64 214 -#define SYS_stat64 215 -#define SYS_lstat64 216 -#define SYS_fstat64 217 -#define SYS_statvfs64 218 -#define SYS_fstatvfs64 219 -#define SYS_setrlimit64 220 -#define SYS_getrlimit64 221 -#define SYS_pread64 222 -#define SYS_pwrite64 223 -#define SYS_creat64 224 -#define SYS_open64 225 -#define SYS_rpcsys 226 -#define SYS_so_socket 230 -#define SYS_so_socketpair 231 -#define SYS_bind 232 -#define SYS_listen 233 -#define SYS_accept 234 -#define SYS_connect 235 -#define SYS_shutdown 236 -#define SYS_recv 237 -#define SYS_recvfrom 238 -#define SYS_recvmsg 239 -#define SYS_send 240 -#define SYS_sendmsg 241 -#define SYS_sendto 242 -#define SYS_getpeername 243 -#define SYS_getsockname 244 -#define SYS_getsockopt 245 -#define SYS_setsockopt 246 -#define SYS_sockconfig 247 -#define SYS_ntp_gettime 248 -#define SYS_ntp_adjtime 249 - -#endif /* sys/syscall.h */ diff --git a/sysdeps/unix/sysv/sysv4/solaris2/syscalls.list b/sysdeps/unix/sysv/sysv4/solaris2/syscalls.list deleted file mode 100644 index 092d869efc..0000000000 --- a/sysdeps/unix/sysv/sysv4/solaris2/syscalls.list +++ /dev/null @@ -1,7 +0,0 @@ -# File name Caller Syscall name # args Strong name Weak names - -sigaction - sigaction 3 __sigaction sigaction -sigaltstack - sigaltstack 2 sigaltstack -sigpending - sigpending 2 __syscall_sigpending -sigqueue - sigqueue 3 __sigqueue sigqueue -sigtimedwait - sigtimedwait 3 __sigtimedwait sigtime diff --git a/sysdeps/unix/sysv/sysv4/syscalls.list b/sysdeps/unix/sysv/sysv4/syscalls.list deleted file mode 100644 index 7b75d55248..0000000000 --- a/sysdeps/unix/sysv/sysv4/syscalls.list +++ /dev/null @@ -1,7 +0,0 @@ -# File name Caller Syscall name # args Strong name Weak names - -pgrpsys - pgrpsys 3 __pgrpsys -sigprocmask - sigprocmask 3 __sigprocmask sigprocmask -sysconfig - sysconfig 1 __sysconfig -sysinfo - systeminfo 3 __sysinfo -__waitid waitpid waitsys 3 __waitid diff --git a/sysdeps/unix/sysv/sysv4/sysconf.c b/sysdeps/unix/sysv/sysv4/sysconf.c deleted file mode 100644 index bfe7823c4c..0000000000 --- a/sysdeps/unix/sysv/sysv4/sysconf.c +++ /dev/null @@ -1,366 +0,0 @@ -/* Copyright (C) 1993,1995,1996,1997,2002,2004 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@zen.org). - - 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. */ - -#include -#include -#include -#include -#include -#include - -extern int __sysconfig (int); - -/* Get the value of the system variable NAME. */ -long int -__sysconf (name) - int name; -{ - switch (name) - { - default: - __set_errno (EINVAL); - return -1; - - case _SC_ARG_MAX: -#ifdef ARG_MAX - return ARG_MAX; -#else - return -1; -#endif - - case _SC_CHILD_MAX: -#ifdef CHILD_MAX - return CHILD_MAX; -#else - return -1; -#endif - - case _SC_CLK_TCK: - return __sysconfig (_CONFIG_CLK_TCK); - - case _SC_NGROUPS_MAX: -#ifdef NGROUPS_MAX - return NGROUPS_MAX; -#else - return -1; -#endif - - /* Both of these are looking for _CONFIG_OPEN_FILES. */ - case _SC_OPEN_MAX: - case _SC_STREAM_MAX: - return __sysconfig (_CONFIG_OPEN_FILES); - - case _SC_TZNAME_MAX: - return __tzname_max (); - - case _SC_JOB_CONTROL: -#ifdef _POSIX_JOB_CONTROL - return 1; -#else - return -1; -#endif - - case _SC_SAVED_IDS: -#ifdef _POSIX_SAVED_IDS - return 1; -#else - return -1; -#endif - - case _SC_REALTIME_SIGNALS: -#ifdef _POSIX_REALTIME_SIGNALS - return 1; -#else - return -1; -#endif - - case _SC_PRIORITY_SCHEDULING: -#ifdef _POSIX_PRIORITY_SCHEDULING - return 1; -#else - return -1; -#endif - - case _SC_TIMERS: -#ifdef _POSIX_TIMERS - return 1; -#else - return -1; -#endif - - case _SC_ASYNCHRONOUS_IO: -#ifdef _POSIX_ASYNCHRONOUS_IO - return 1; -#else - return -1; -#endif - - case _SC_PRIORITIZED_IO: -#ifdef _POSIX_PRIORITIZED_IO - return 1; -#else - return -1; -#endif - - case _SC_SYNCHRONIZED_IO: -#ifdef _POSIX_SYNCHRONIZED_IO - return 1; -#else - return -1; -#endif - - case _SC_FSYNC: -#ifdef _POSIX_FSYNC - return 1; -#else - return -1; -#endif - - case _SC_MAPPED_FILES: -#ifdef _POSIX_MAPPED_FILES - return 1; -#else - return -1; -#endif - - case _SC_MEMLOCK: -#ifdef _POSIX_MEMLOCK - return 1; -#else - return -1; -#endif - - case _SC_MEMLOCK_RANGE: -#ifdef _POSIX_MEMLOCK_RANGE - return 1; -#else - return -1; -#endif - - case _SC_MEMORY_PROTECTION: -#ifdef _POSIX_MEMORY_PROTECTION - return 1; -#else - return -1; -#endif - - case _SC_MESSAGE_PASSING: -#ifdef _POSIX_MESSAGE_PASSING - return 1; -#else - return -1; -#endif - - case _SC_SEMAPHORES: -#ifdef _POSIX_SEMAPHORES - return 1; -#else - return -1; -#endif - - case _SC_SHARED_MEMORY_OBJECTS: -#ifdef _POSIX_SHARED_MEMORY_OBJECTS - return 1; -#else - return -1; -#endif - - case _SC_VERSION: - return _POSIX_VERSION; - - case _SC_PAGESIZE: - return __sysconfig (_CONFIG_PAGESIZE); - - case _SC_AIO_LISTIO_MAX: -#ifdef AIO_LISTIO_MAX - return AIO_LISTIO_MAX; -#else - return -1; -#endif - - case _SC_AIO_MAX: -#ifdef AIO_MAX - return AIO_MAX; -#else - return -1; -#endif - - case _SC_AIO_PRIO_DELTA_MAX: -#ifdef AIO_PRIO_DELTA_MAX - return AIO_PRIO_DELTA_MAX; -#else - return -1; -#endif - - case _SC_DELAYTIMER_MAX: -#ifdef DELAYTIMER_MAX - return DELAYTIMER_MAX; -#else - return -1; -#endif - - case _SC_MQ_OPEN_MAX: -#ifdef MQ_OPEN_MAX - return MQ_OPEN_MAX; -#else - return -1; -#endif - - case _SC_MQ_PRIO_MAX: -#ifdef MQ_PRIO_MAX - return MQ_PRIO_MAX; -#else - return -1; -#endif - - case _SC_RTSIG_MAX: -#ifdef RTSIG_MAX - return RTSIG_MAX; -#else - return -1; -#endif - - case _SC_SEM_NSEMS_MAX: -#ifdef SEM_NSEMS_MAX - return SEM_NSEMS_MAX; -#else - return -1; -#endif - - case _SC_SEM_VALUE_MAX: -#ifdef SEM_VALUE_MAX - return SEM_VALUE_MAX; -#else - return -1; -#endif - - case _SC_SIGQUEUE_MAX: -#ifdef SIGQUEUE_MAX - return SIGQUEUE_MAX; -#else - return -1; -#endif - - case _SC_TIMER_MAX: -#ifdef TIMER_MAX - return TIMER_MAX; -#else - return -1; -#endif - - case _SC_BC_BASE_MAX: -#ifdef BC_BASE_MAX - return BC_BASE_MAX; -#else - return -1; -#endif - - case _SC_BC_DIM_MAX: -#ifdef BC_DIM_MAX - return BC_DIM_MAX; -#else - return -1; -#endif - - case _SC_BC_SCALE_MAX: -#ifdef BC_SCALE_MAX - return BC_SCALE_MAX; -#else - return -1; -#endif - - case _SC_BC_STRING_MAX: -#ifdef BC_STRING_MAX - return BC_STRING_MAX; -#else - return -1; -#endif - - case _SC_EQUIV_CLASS_MAX: -#ifdef EQUIV_CLASS_MAX - return EQUIV_CLASS_MAX; -#else - return -1; -#endif - - case _SC_EXPR_NEST_MAX: -#ifdef EXPR_NEST_MAX - return EXPR_NEST_MAX; -#else - return -1; -#endif - - case _SC_LINE_MAX: -#ifdef LINE_MAX - return LINE_MAX; -#else - return -1; -#endif - - case _SC_RE_DUP_MAX: -#ifdef RE_DUP_MAX - return RE_DUP_MAX; -#else - return -1; -#endif - - case _SC_CHARCLASS_NAME_MAX: -#ifdef CHARCLASS_NAME_MAX - return CHARCLASS_NAME_MAX; -#else - return -1; -#endif - - case _SC_2_VERSION: - /* This is actually supposed to return the version - of the 1003.2 utilities on the system {POSIX2_VERSION}. */ - return _POSIX2_C_VERSION; - - case _SC_2_C_BIND: -#ifdef _POSIX2_C_BIND - return _POSIX2_C_BIND; -#else - return -1; -#endif - - case _SC_2_C_DEV: -#ifdef _POSIX2_C_DEV - return _POSIX2_C_DEV; -#else - return -1; -#endif - - case _SC_2_FORT_DEV: -#ifdef _POSIX2_FORT_DEV - return _POSIX2_FORT_DEV; -#else - return -1; -#endif - - case _SC_2_SW_DEV: -#ifdef _POSIX2_SW_DEV - return _POSIX2_SW_DEV; -#else - return -1; -#endif - } -} - -weak_alias (__sysconf, sysconf) -libc_hidden_def (__sysconf) diff --git a/sysdeps/unix/sysv/sysv4/sysconfig.h b/sysdeps/unix/sysv/sysv4/sysconfig.h deleted file mode 100644 index b51a3649a4..0000000000 --- a/sysdeps/unix/sysv/sysv4/sysconfig.h +++ /dev/null @@ -1,28 +0,0 @@ -/* `__sysconfig' NAME values. - Copyright (C) 1993, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@zen.org). - - 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 __SYSCONFIG_H -#define __SYSCONFIG_H - -#define _CONFIG_OPEN_FILES 4 /* process limit on open files */ -#define _CONFIG_PAGESIZE 6 /* MMU page size */ -#define _CONFIG_CLK_TCK 7 /* all times are in CLK_TCKths of a second */ - -#endif diff --git a/sysdeps/unix/sysv/sysv4/system.c b/sysdeps/unix/sysv/sysv4/system.c deleted file mode 100644 index fbfe43f19a..0000000000 --- a/sysdeps/unix/sysv/sysv4/system.c +++ /dev/null @@ -1,2 +0,0 @@ -/* SVR4 does have `waitpid'. Avoid unix/system.c, which says we don't. */ -#include diff --git a/sysdeps/unix/sysv/sysv4/waitpid.c b/sysdeps/unix/sysv/sysv4/waitpid.c deleted file mode 100644 index 23f9ceb029..0000000000 --- a/sysdeps/unix/sysv/sysv4/waitpid.c +++ /dev/null @@ -1,120 +0,0 @@ -/* Copyright (C) 1993,94,95,96,97,2002,2004 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@zen.org). - - 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. */ - -#include -#include -#include -#include -#include "siginfo.h" - -typedef enum __idtype - { - /* Look for processes based upon a given PID. */ - P_PID, - - /* Look for processes based upon a given process-group ID. */ - P_PGID = 2, - - /* Look for any process. */ - P_ALL = 7, - } __idtype_t; - -extern __pid_t __getpgid (__pid_t pid); -extern int __waitid (__idtype_t idtype, __pid_t id, - __siginfo_t *infop, int options); - -/* Wait for a child matching PID to die. - If PID is greater than 0, match any process whose process ID is PID. - If PID is (pid_t) -1, match any process. - If PID is (pid_t) 0, match any process with the - same process group as the current process. - If PID is less than -1, match any process whose - process group is the absolute value of PID. - If the WNOHANG bit is set in OPTIONS, and that child - is not already dead, return (pid_t) 0. If successful, - return PID and store the dead child's status in STAT_LOC. - Return (pid_t) -1 for errors. If the WUNTRACED bit is set in OPTIONS, - return status for stopped children; otherwise don't. */ - -__pid_t -__libc_waitpid (__pid_t pid, int *stat_loc, int options) -{ - __idtype_t idtype; - __pid_t tmp_pid = pid; - __siginfo_t infop; - - if (pid <= WAIT_MYPGRP) - { - if (pid == WAIT_ANY) - { - /* Request the status for any child. */ - idtype = P_ALL; - } - else if (pid == WAIT_MYPGRP) - { - /* Request the status for any child process that has - a pgid that's equal to that of our parent. */ - tmp_pid = __getpgid (0); - idtype = P_PGID; - } - else /* PID < -1 */ - { - /* Request the status for any child whose pgid is equal - to the absolute value of PID. */ - tmp_pid = pid & ~0; /* XXX not pseudo-insn */ - idtype = P_PGID; - } - } - else - { - /* Request the status for the child whose pid is PID. */ - idtype = P_PID; - } - - if (__waitid (idtype, tmp_pid, &infop, options | WEXITED | WTRAPPED) < 0) - return -1; - - switch (infop.__code) - { - case EXITED: - *stat_loc = W_EXITCODE (infop.__status, 0); - break; - case STOPPED: - case TRAPPED: - *stat_loc = W_STOPCODE (infop.__status); - break; - case KILLED: - /* Don't know what to do with continue, since it isn't documented. - Putting it here seemed the right place though. */ - case CONTINUED: - *stat_loc = infop.__status; - /* FALLTHROUGH */ - case CORED: - *stat_loc |= WCOREFLAG; - break; - } - - /* Return the PID out of the INFOP structure instead of the one we were - called with, to account for cases of being called with -1 to signify - any PID. */ - return infop.__pid; -} -weak_alias (__libc_waitpid, __waitpid) -weak_alias (__libc_waitpid, waitpid) -libc_hidden_weak (__waitpid) diff --git a/sysdeps/vax/DEFS.h b/sysdeps/vax/DEFS.h deleted file mode 100644 index 50f8b7e131..0000000000 --- a/sysdeps/vax/DEFS.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 1982, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)DEFS.h 8.1 (Berkeley) 6/4/93 - */ - -#define R0 0x001 -#define R1 0x002 -#define R2 0x004 -#define R3 0x008 -#define R4 0x010 -#define R5 0x020 -#define R6 0x040 -#define R7 0x080 -#define R8 0x100 -#define R9 0x200 -#define R10 0x400 -#define R11 0x800 - -#ifdef PROF -#define ENTRY(x, regs) \ - .globl _/**/x; .align 2; _/**/x: .word regs; \ - .data; 1:; .long 0; .text; moval 1b,r0; jsb mcount -#define ASENTRY(x, regs) \ - .globl x; .align 2; x: .word regs; \ - .data; 1:; .long 0; .text; moval 1b,r0; jsb mcount -#else -#define ENTRY(x, regs) \ - .globl _/**/x; .align 2; _/**/x: .word regs -#define ASENTRY(x, regs) \ - .globl x; .align 2; x: .word regs -#endif diff --git a/sysdeps/vax/Makefile b/sysdeps/vax/Makefile deleted file mode 100644 index 909fc29f33..0000000000 --- a/sysdeps/vax/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (C) 1991, 1994, 1997 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. - -ifeq ($(subdir),math) -ifndef math-twiddled - -elided-routines := $(elided-routines) acos asin cos sin ceil rint hypot \ - __copysign __scalb __drem __logb __finite -sysdep_routines := $(sysdep_routines) asincos sincos argred \ - support exp__E log__L - -math-twiddled := t -endif - -bsdmath_dirs := $(bsdmath_dirs) vax - -endif diff --git a/sysdeps/vax/__longjmp.c b/sysdeps/vax/__longjmp.c deleted file mode 100644 index 8ffb8cd4b6..0000000000 --- a/sysdeps/vax/__longjmp.c +++ /dev/null @@ -1,129 +0,0 @@ -/* Copyright (C) 1991, 1992, 1994, 1997 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. - - Derived from @(#)_setjmp.s 5.7 (Berkeley) 6/27/88, - Copyright (C) 1980 Regents of the University of California. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 4. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE.*/ - -#include - -#ifndef __GNUC__ - #error This file uses GNU C extensions; you must compile with GCC. -#endif - - -#define REI 02 /* Vax `rei' opcode. */ - -/* Jump to the position specified by ENV, causing the - setjmp call there to return VAL, or 1 if VAL is 0. */ -__NORETURN -void -__longjmp (env, val) - const __jmp_buf env; - int val; -{ - register long int *fp asm("fp"); - long int *regsave; - unsigned long int flags; - - if (env.__fp == NULL) - __libc_fatal("longjmp: Invalid ENV argument.\n"); - - if (val == 0) - val = 1; - - asm volatile("loop:"); - - flags = *(long int *) (6 + (char *) fp); - regsave = (long int *) (20 + (char *) fp); - if (flags & 1) - /* R0 was saved by the caller. - Store VAL where it will be restored from. */ - *regsave++ = val; - if (flags & 2) - /* R1 was saved by the caller. - Store ENV where it will be restored from. */ - *regsave = env; - - /* Was the FP saved in the last call the same one in ENV? */ - asm volatile("cmpl %0, 12(fp);" - /* Yes, return to it. */ - "beql done;" - /* The FP in ENV is less than the one saved in the last call. - This means we have already returned from the function that - called `setjmp' with ENV! */ - "blssu latejump;" : /* No outputs. */ : "g" (env.__fp)); - - /* We are more than one level below the state in ENV. - Return to where we will pop another stack frame. */ - asm volatile("movl $loop, 16(fp);" - "ret"); - - asm volatile("done:"); - { - char return_insn asm("*16(fp)"); - if (return_insn == REI) - /* We're returning with an `rei' instruction. - Do a return with PSL-PC pop. */ - asm volatile("movab 0f, 16(fp)"); - else - /* Do a standard return. */ - asm volatile("movab 1f, 16(fp)"); - - /* Return. */ - asm volatile("ret"); - } - - asm volatile("0:" /* `rei' return. */ - /* Compensate for PSL-PC push. */ - "addl2 %0, sp;" - "1:" /* Standard return. */ - /* Return to saved PC. */ - "jmp %1" : /* No outputs. */ : - "g" (8), "g" (env.__pc)); - - /* Jump here when the FP saved in ENV points - to a function that has already returned. */ - asm volatile("latejump:"); - __libc_fatal("longjmp: Attempt to jump to a function that has returned.\n"); -} diff --git a/sysdeps/vax/add_n.s b/sysdeps/vax/add_n.s deleted file mode 100644 index 265a8c7881..0000000000 --- a/sysdeps/vax/add_n.s +++ /dev/null @@ -1,48 +0,0 @@ -# VAX __mpn_add_n -- Add two limb vectors of the same length > 0 and store -# sum in a third limb vector. - -# Copyright (C) 1992, 1994 Free Software Foundation, Inc. - -# This file is part of the GNU MP Library. - -# The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -# MA 02111-1307, USA. - - -# INPUT PARAMETERS -# res_ptr (sp + 4) -# s1_ptr (sp + 8) -# s2_ptr (sp + 12) -# size (sp + 16) - -.text - .align 1 -.globl ___mpn_add_n -___mpn_add_n: - .word 0x0 - movl 16(ap),r0 - movl 12(ap),r1 - movl 8(ap),r2 - movl 4(ap),r3 - subl2 r4,r4 - -Loop: - movl (r2)+,r4 - adwc (r1)+,r4 - movl r4,(r3)+ - jsobgtr r0,Loop - - adwc r0,r0 - ret diff --git a/sysdeps/vax/addmul_1.s b/sysdeps/vax/addmul_1.s deleted file mode 100644 index c6d657dcf3..0000000000 --- a/sysdeps/vax/addmul_1.s +++ /dev/null @@ -1,126 +0,0 @@ -# VAX __mpn_addmul_1 -- Multiply a limb vector with a limb and add -# the result to a second limb vector. - -# Copyright (C) 1992, 1994 Free Software Foundation, Inc. - -# This file is part of the GNU MP Library. - -# The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -# MA 02111-1307, USA. - - -# INPUT PARAMETERS -# res_ptr (sp + 4) -# s1_ptr (sp + 8) -# size (sp + 12) -# s2_limb (sp + 16) - -.text - .align 1 -.globl ___mpn_addmul_1 -___mpn_addmul_1: - .word 0xfc0 - movl 12(ap),r4 - movl 8(ap),r8 - movl 4(ap),r9 - movl 16(ap),r6 - jlss s2_big - - clrl r3 - incl r4 - ashl $-1,r4,r7 - jlbc r4,L1 - clrl r11 - -# Loop for S2_LIMB < 0x80000000 -Loop1: movl (r8)+,r1 - jlss L1n0 - emul r1,r6,$0,r2 - addl2 r11,r2 - adwc $0,r3 - addl2 r2,(r9)+ - adwc $0,r3 -L1: movl (r8)+,r1 - jlss L1n1 -L1p1: emul r1,r6,$0,r10 - addl2 r3,r10 - adwc $0,r11 - addl2 r10,(r9)+ - adwc $0,r11 - - jsobgtr r7,Loop1 - movl r11,r0 - ret - -L1n0: emul r1,r6,$0,r2 - addl2 r11,r2 - adwc r6,r3 - addl2 r2,(r9)+ - adwc $0,r3 - movl (r8)+,r1 - jgeq L1p1 -L1n1: emul r1,r6,$0,r10 - addl2 r3,r10 - adwc r6,r11 - addl2 r10,(r9)+ - adwc $0,r11 - - jsobgtr r7,Loop1 - movl r11,r0 - ret - - -s2_big: clrl r3 - incl r4 - ashl $-1,r4,r7 - jlbc r4,L2 - clrl r11 - -# Loop for S2_LIMB >= 0x80000000 -Loop2: movl (r8)+,r1 - jlss L2n0 - emul r1,r6,$0,r2 - addl2 r11,r2 - adwc r1,r3 - addl2 r2,(r9)+ - adwc $0,r3 -L2: movl (r8)+,r1 - jlss L2n1 -L2p1: emul r1,r6,$0,r10 - addl2 r3,r10 - adwc r1,r11 - addl2 r10,(r9)+ - adwc $0,r11 - - jsobgtr r7,Loop2 - movl r11,r0 - ret - -L2n0: emul r1,r6,$0,r2 - addl2 r11,r2 - adwc r6,r3 - addl2 r2,(r9)+ - adwc r1,r3 - movl (r8)+,r1 - jgeq L2p1 -L2n1: emul r1,r6,$0,r10 - addl2 r3,r10 - adwc r6,r11 - addl2 r10,(r9)+ - adwc r1,r11 - - jsobgtr r7,Loop2 - movl r11,r0 - ret diff --git a/sysdeps/vax/bcopy.s b/sysdeps/vax/bcopy.s deleted file mode 100644 index 186ad365f8..0000000000 --- a/sysdeps/vax/bcopy.s +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 1983 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#if defined(LIBC_SCCS) && !defined(lint) - .asciz "@(#)bcopy.s 5.6 (Berkeley) 6/1/90" -#endif /* LIBC_SCCS and not lint */ - -/* bcopy(from, to, size) */ - -#include "DEFS.h" - -ENTRY(bcopy, R6) - movl 4(ap),r1 - movl 8(ap),r3 - movl 12(ap),r6 - cmpl r1,r3 - bgtr 2f # normal forward case - blss 3f # overlapping, must do backwards - ret # equal, nothing to do -1: - subl2 r0,r6 - movc3 r0,(r1),(r3) -2: - movzwl $65535,r0 - cmpl r6,r0 - jgtr 1b - movc3 r6,(r1),(r3) - ret -3: - addl2 r6,r1 - addl2 r6,r3 - movzwl $65535,r0 - jbr 5f -4: - subl2 r0,r6 - subl2 r0,r1 - subl2 r0,r3 - movc3 r0,(r1),(r3) - movzwl $65535,r0 - subl2 r0,r1 - subl2 r0,r3 -5: - cmpl r6,r0 - jgtr 4b - subl2 r6,r1 - subl2 r6,r3 - movc3 r6,(r1),(r3) - ret diff --git a/sysdeps/vax/bits/huge_val.h b/sysdeps/vax/bits/huge_val.h deleted file mode 100644 index 63395b15e3..0000000000 --- a/sysdeps/vax/bits/huge_val.h +++ /dev/null @@ -1,26 +0,0 @@ -/* `HUGE_VAL' constant for Vaxen. - Used by and functions for overflow. - Copyright (C) 1992, 1996, 1997 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 _MATH_H -# error "Never use directly; include instead." -#endif - - -#define HUGE_VAL 1.70141182460469227e38 diff --git a/sysdeps/vax/bits/setjmp.h b/sysdeps/vax/bits/setjmp.h deleted file mode 100644 index 10ca170a2a..0000000000 --- a/sysdeps/vax/bits/setjmp.h +++ /dev/null @@ -1,11 +0,0 @@ -/* Define the machine-dependent type `jmp_buf'. Vax version. */ - -#ifndef _SETJMP_H -# error "Never include directly; use instead." -#endif - -typedef struct - { - PTR __fp; - PTR __pc; - } __jmp_buf[1]; diff --git a/sysdeps/vax/bsd-_setjmp.S b/sysdeps/vax/bsd-_setjmp.S deleted file mode 100644 index 756e96b707..0000000000 --- a/sysdeps/vax/bsd-_setjmp.S +++ /dev/null @@ -1,33 +0,0 @@ -/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. Vax version. - Copyright (C) 1994, 1997, 2002 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. */ - -/* This just does a tail-call to `__sigsetjmp (ARG, 0)'. - We cannot do it in C because it must be a tail-call, so frame-unwinding - in setjmp doesn't clobber the state restored by longjmp. */ - -#include - -ENTRY (_setjmp) - popl r0 /* Pop return PC. */ - popl r1 /* Pop jmp_buf argument. */ - pushl $0 /* Push second argument of zero. */ - pushl r1 /* Push back first argument. */ - pushl r0 /* Push back return PC. */ - jmp C_SYMBOL_NAME (__sigsetjmp) -libc_hidden_def (_setjmp) diff --git a/sysdeps/vax/bsd-setjmp.S b/sysdeps/vax/bsd-setjmp.S deleted file mode 100644 index 792fcf7a69..0000000000 --- a/sysdeps/vax/bsd-setjmp.S +++ /dev/null @@ -1,32 +0,0 @@ -/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. Vax version. - Copyright (C) 1994, 1997 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. */ - -/* This just does a tail-call to `__sigsetjmp (ARG, 1)'. - We cannot do it in C because it must be a tail-call, so frame-unwinding - in setjmp doesn't clobber the state restored by longjmp. */ - -#include - -ENTRY (setjmp) - popl r0 /* Pop return PC. */ - popl r1 /* Pop jmp_buf argument. */ - pushl $1 /* Push second argument of one. */ - pushl r1 /* Push back first argument. */ - pushl r0 /* Push back return PC. */ - jmp C_SYMBOL_NAME (__sigsetjmp) diff --git a/sysdeps/vax/bzero.s b/sysdeps/vax/bzero.s deleted file mode 100644 index be61a97d89..0000000000 --- a/sysdeps/vax/bzero.s +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 1983 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#if defined(LIBC_SCCS) && !defined(lint) - .asciz "@(#)bzero.s 5.6 (Berkeley) 6/1/90" -#endif /* LIBC_SCCS and not lint */ - -/* bzero(base, length) */ - -#include "DEFS.h" - -ENTRY(__bzero, 0) - movl 4(ap),r3 - jbr 2f -1: - subl2 r0,8(ap) - movc5 $0,(r3),$0,r0,(r3) -2: - movzwl $65535,r0 - cmpl 8(ap),r0 - jgtr 1b - movc5 $0,(r3),$0,8(ap),(r3) - ret -weak_alias (__bzero, bzero) diff --git a/sysdeps/vax/ffs.s b/sysdeps/vax/ffs.s deleted file mode 100644 index 6272cfd59f..0000000000 --- a/sysdeps/vax/ffs.s +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 1983 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#if defined(LIBC_SCCS) && !defined(lint) - .asciz "@(#)ffs.s 5.6 (Berkeley) 6/1/90" -#endif /* LIBC_SCCS and not lint */ - -/* bit = ffs(value) */ - -#include "DEFS.h" - -ENTRY(__ffs, 0) - ffs $0,$32,4(ap),r0 - bneq 1f - mnegl $1,r0 -1: - incl r0 - ret -weak_alias (__ffs, ffs) diff --git a/sysdeps/vax/fl.h b/sysdeps/vax/fl.h deleted file mode 100644 index 79cbeb247a..0000000000 --- a/sysdeps/vax/fl.h +++ /dev/null @@ -1,68 +0,0 @@ -/* Copyright (C) 1991, 1997 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 __need_HUGE_VAL - -/* Floating-point constants for Vaxen. */ - -#define FLT_RADIX 2 - -#define FLT_ROUNDS _FLT_ROUNDS_TONEAREST - -#define FLT_MANT_DIG 23 -#define DBL_MANT_DIG 55 -#define LDBL_MANT_DIG 55 - -#define FLT_DIG 6 -#define DBL_DIG 16 -#define LDBL_DIG 16 - -#define FLT_MIN_EXP (-128) -#define DBL_MIN_EXP (-128) -#define LDBL_MIN_EXP (-128) - -#define FLT_MIN_10_EXP (-38) -#define DBL_MIN_10_EXP (-38) -#define LDBL_MIN_10_EXP (-38) - -#define FLT_MAX_EXP 127 -#define DBL_MAX_EXP 127 -#define LDBL_MAX_EXP 127 - -#define FLT_MAX_10_EXP 38 -#define DBL_MAX_10_EXP 38 -#define LDBL_MAX_10_EXP 38 - -#define FLT_MAX 1.7014116e38 -#define DBL_MAX 1.70141182460469227e38 -#define LDBL_MAX DBL_MAX - -#define FLT_EPSILON 2.384186e-7 -#define DBL_EPSILON 5.55111512312578270e-17 -#define LDBL_EPSILON DBL_EPSILON - -#define FLT_MIN 0.2938736e-38 -#define DBL_MIN 0.29387358770557187e-38 -#define LDBL_MIN DBL_MIN - -#else /* Need HUGE_VAL. */ - -/* Used by and functions for overflow. */ -#define HUGE_VAL 1.70141182460469227e38 - -#endif /* Don't need HUGE_VAL. */ diff --git a/sysdeps/vax/gccframe.h b/sysdeps/vax/gccframe.h deleted file mode 100644 index 323d5115d4..0000000000 --- a/sysdeps/vax/gccframe.h +++ /dev/null @@ -1,22 +0,0 @@ -/* Definition of object in frame unwind info. vax version. - Copyright (C) 2001 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. */ - -#define DWARF_FRAME_REGISTERS 16 - -#include diff --git a/sysdeps/vax/gmp-mparam.h b/sysdeps/vax/gmp-mparam.h deleted file mode 100644 index 1ebfa19c5f..0000000000 --- a/sysdeps/vax/gmp-mparam.h +++ /dev/null @@ -1,29 +0,0 @@ -/* gmp-mparam.h -- Compiler/machine parameter header file. - -Copyright (C) 1991, 1993, 1994, 1995 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -MA 02111-1307, USA. */ - -#define BITS_PER_MP_LIMB 32 -#define BYTES_PER_MP_LIMB 4 -#define BITS_PER_LONGINT 32 -#define BITS_PER_INT 32 -#define BITS_PER_SHORTINT 16 -#define BITS_PER_CHAR 8 - -#define IEEE_DOUBLE_BIG_ENDIAN 0 diff --git a/sysdeps/vax/htonl.s b/sysdeps/vax/htonl.s deleted file mode 100644 index f3e2195c00..0000000000 --- a/sysdeps/vax/htonl.s +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) 1983 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#if defined(LIBC_SCCS) && !defined(lint) - .asciz "@(#)htonl.s 5.5 (Berkeley) 6/27/88" -#endif /* LIBC_SCCS and not lint */ - -/* netorder = htonl(hostorder) */ - -#include "DEFS.h" - -ENTRY(htonl, 0) - rotl $-8,4(ap),r0 - insv r0,$16,$8,r0 - movb 7(ap),r0 - ret -weak_alias (htonl, ntohl) diff --git a/sysdeps/vax/htons.s b/sysdeps/vax/htons.s deleted file mode 100644 index 5f9ea7384d..0000000000 --- a/sysdeps/vax/htons.s +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) 1983 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#if defined(LIBC_SCCS) && !defined(lint) - .asciz "@(#)htons.s 5.5 (Berkeley) 6/27/88" -#endif /* LIBC_SCCS and not lint */ - -/* hostorder = htons(netorder) */ - -#include "DEFS.h" - -ENTRY(htons, 0) - rotl $8,4(ap),r0 - movb 5(ap),r0 - movzwl r0,r0 - ret -weak_alias (htons, ntohs) diff --git a/sysdeps/vax/memccpy.c b/sysdeps/vax/memccpy.c deleted file mode 100644 index 9a459ff5eb..0000000000 --- a/sysdeps/vax/memccpy.c +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (C) 1991, 1992, 1995, 1997 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. */ - -#include - -/* Copy no more than N bytes of SRC to DEST, stopping when C is found. - Return the position in DEST one byte past where C was copied, - or NULL if C was not found in the first N bytes of SRC. */ -void * -__memccpy (dest, src, c, n) - void *dest; - const void *src; - int c; - size_t nbytes; -{ - /* Except when N > 65535, this is what a hand-coded version would - do anyway. */ - - void *found = memchr (src, c, n); - - if (found == NULL) - { - (void) memcpy (dest, src, n); - return NULL; - } - - (void) memcpy (dest, src, (char *) found + 1 - (char *) src); - return (PTR) ((char *) dest + ((char *) found + 1 - (char *) src)); -} - -weak_alias (__memccpy, memccpy) diff --git a/sysdeps/vax/memchr.s b/sysdeps/vax/memchr.s deleted file mode 100644 index 5c54ba8e79..0000000000 --- a/sysdeps/vax/memchr.s +++ /dev/null @@ -1,74 +0,0 @@ -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#if defined(LIBC_SCCS) && !defined(lint) - .asciz "@(#)memchr.s 5.1 (Berkeley) 5/29/90" -#endif /* LIBC_SCCS and not lint */ - -/* - * Find the first occurrence of c in the memory at cp (length n). - * Return pointer to match or null pointer. - * - * This code optimises the usual case (0 < n < 65535). - * - * void * - * memchr(cp, c, n) - * char *cp, c; - * size_t n; - */ - -#include "DEFS.h" - -ENTRY(__memchr, 0) - movq 4(ap),r1 # r1 = cp; r2 = c - movl 12(ap),r0 # r0 = n - movzwl $65535,r4 # handy constant -0: - cmpl r0,r4 # check for annoying locc limit - bgtru 3f - - /* n <= 65535 */ - locc r2,r0,(r1) # search n bytes for c - beql 2f # done if not found (r0 already 0) -1: /* found character c at (r1) */ - movl r1,r0 -2: - ret - -3: /* n > 65535 */ - locc r2,r4,(r1) # search 65535 bytes for c - beql 1b # done if found - decw r0 # from 0 to 65535 - subl2 r0,r4 # adjust n - brb 0b # and loop - -weak_alias (__memchr, memchr) -#if !__BOUNDED_POINTERS__ -weak_alias (__memchr, __ubp_memchr) -#endif diff --git a/sysdeps/vax/memcmp.s b/sysdeps/vax/memcmp.s deleted file mode 100644 index e32fe24f41..0000000000 --- a/sysdeps/vax/memcmp.s +++ /dev/null @@ -1,59 +0,0 @@ -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#if defined(LIBC_SCCS) && !defined(lint) - .asciz "@(#)memcmp.s 5.1 (Berkeley) 5/15/90" -#endif /* LIBC_SCCS and not lint */ - -/* int memcmp(s1, s2, n) */ - -#include "DEFS.h" - -ENTRY(memcmp, 0) - movl 4(ap),r1 /* r1 = s1 */ - movq 8(ap),r3 /* r3 = s2; r4 = n */ - movzwl $65535,r5 -0: - cmpl r4,r5 - jgtru 3f /* handle stupid cmpc3 limitation */ - cmpc3 r4,(r1),(r3) /* compare */ - beql 2f /* done if same (r0 = 0) */ -1: - movzbl (r1),r0 - movzbl (r3),r2 - subl2 r2,r0 /* return *s1 - *s2; s1,s2 unsigned chars */ -2: - ret -3: - subl2 r5,r4 /* do 64K; adjust count */ - cmpc3 r5,(r1),(r3) - jeql 0b /* loop if same */ - jbr 1b - -weak_alias (memcmp, bcmp) diff --git a/sysdeps/vax/memmove.s b/sysdeps/vax/memmove.s deleted file mode 100644 index 738544142f..0000000000 --- a/sysdeps/vax/memmove.s +++ /dev/null @@ -1,89 +0,0 @@ -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#if defined(LIBC_SCCS) && !defined(lint) - .asciz "@(#)memmove.s 5.1 (Berkeley) 5/15/90" -#endif /* LIBC_SCCS and not lint */ - -/* - * void *memmove(dst, src, size) - * returns dst - * - * This optimises the usual case (count < 65536) at the expense - * of some extra memory references and branches when count >= 65536. - */ - -#include "DEFS.h" - -ENTRY(memmove, 0) - movzwl $65535,r0 /* r0 = 64K (needed below) */ - movq 8(ap),r1 /* r1 = src, r2 = length */ - movl 4(ap),r3 /* r3 = dst */ - cmpl r1,r3 - bgtru 1f /* normal forward case */ - beql 2f /* equal, nothing to do */ - addl2 r2,r1 /* overlaps iff srcdst */ - cmpl r1,r3 - bgtru 4f /* overlapping, must move backwards */ - subl2 r2,r1 - -1: /* move forward */ - cmpl r2,r0 - bgtru 3f /* stupid movc3 limitation */ - movc3 r2,(r1),(r3) /* move it all */ -2: - movl 4(ap),r0 /* return original dst */ - ret -3: - subl2 r0,12(ap) /* adjust length by 64K */ - movc3 r0,(r1),(r3) /* move 64K */ - movl 12(ap),r2 - decw r0 /* from 0 to 65535 */ - brb 1b /* retry */ - -4: /* move backward */ - addl2 r2,r3 -5: - cmpl r2,r0 - bgtru 6f /* stupid movc3 limitation */ - subl2 r2,r1 - subl2 r2,r3 - movc3 r2,(r1),(r3) /* move it all */ - movl 4(ap),r0 /* return original dst */ - ret -6: - subl2 r0,12(ap) /* adjust length by 64K */ - subl2 r0,r1 - subl2 r0,r3 - movc3 r0,(r1),(r3) /* move 64K */ - movl 12(ap),r2 - decw r0 - subl2 r0,r1 - subl2 r0,r3 - brb 5b diff --git a/sysdeps/vax/memset.s b/sysdeps/vax/memset.s deleted file mode 100644 index dda14868f9..0000000000 --- a/sysdeps/vax/memset.s +++ /dev/null @@ -1,51 +0,0 @@ -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#if defined(LIBC_SCCS) && !defined(lint) - .asciz "@(#)memset.s 5.2 (Berkeley) 5/12/91" -#endif /* LIBC_SCCS and not lint */ - -/* void *memset(base, c, length) */ - -#include "DEFS.h" - -ENTRY(memset, 0) - movl 4(ap),r3 -1: - movzwl $65535,r0 - movq 8(ap),r1 - cmpl r2,r0 - jgtru 2f - movc5 $0,(r3),r1,r2,(r3) - movl r1,r0 - ret -2: - subl2 r0,12(ap) - movc5 $0,(r3),r1,r0,(r3) - jbr 1b diff --git a/sysdeps/vax/mul_1.s b/sysdeps/vax/mul_1.s deleted file mode 100644 index 295638b06e..0000000000 --- a/sysdeps/vax/mul_1.s +++ /dev/null @@ -1,123 +0,0 @@ -# VAX __mpn_mul_1 -- Multiply a limb vector with a limb and store -# the result in a second limb vector. - -# Copyright (C) 1992, 1994 Free Software Foundation, Inc. - -# This file is part of the GNU MP Library. - -# The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -# MA 02111-1307, USA. - - -# INPUT PARAMETERS -# res_ptr (sp + 4) -# s1_ptr (sp + 8) -# size (sp + 12) -# s2_limb (sp + 16) - -.text - .align 1 -.globl ___mpn_mul_1 -___mpn_mul_1: - .word 0xfc0 - movl 12(ap),r4 - movl 8(ap),r8 - movl 4(ap),r9 - movl 16(ap),r6 - jlss s2_big - -# One might want to combine the addl2 and the store below, but that -# is actually just slower according to my timing tests. (VAX 3600) - - clrl r3 - incl r4 - ashl $-1,r4,r7 - jlbc r4,L1 - clrl r11 - -# Loop for S2_LIMB < 0x80000000 -Loop1: movl (r8)+,r1 - jlss L1n0 - emul r1,r6,$0,r2 - addl2 r11,r2 - adwc $0,r3 - movl r2,(r9)+ -L1: movl (r8)+,r1 - jlss L1n1 -L1p1: emul r1,r6,$0,r10 - addl2 r3,r10 - adwc $0,r11 - movl r10,(r9)+ - - jsobgtr r7,Loop1 - movl r11,r0 - ret - -L1n0: emul r1,r6,$0,r2 - addl2 r11,r2 - adwc r6,r3 - movl r2,(r9)+ - movl (r8)+,r1 - jgeq L1p1 -L1n1: emul r1,r6,$0,r10 - addl2 r3,r10 - adwc r6,r11 - movl r10,(r9)+ - - jsobgtr r7,Loop1 - movl r11,r0 - ret - - -s2_big: clrl r3 - incl r4 - ashl $-1,r4,r7 - jlbc r4,L2 - clrl r11 - -# Loop for S2_LIMB >= 0x80000000 -Loop2: movl (r8)+,r1 - jlss L2n0 - emul r1,r6,$0,r2 - addl2 r11,r2 - adwc r1,r3 - movl r2,(r9)+ -L2: movl (r8)+,r1 - jlss L2n1 -L2p1: emul r1,r6,$0,r10 - addl2 r3,r10 - adwc r1,r11 - movl r10,(r9)+ - - jsobgtr r7,Loop2 - movl r11,r0 - ret - -L2n0: emul r1,r6,$0,r2 - addl2 r1,r3 - addl2 r11,r2 - adwc r6,r3 - movl r2,(r9)+ - movl (r8)+,r1 - jgeq L2p1 -L2n1: emul r1,r6,$0,r10 - addl2 r1,r11 - addl2 r3,r10 - adwc r6,r11 - movl r10,(r9)+ - - jsobgtr r7,Loop2 - movl r11,r0 - ret diff --git a/sysdeps/vax/setjmp.c b/sysdeps/vax/setjmp.c deleted file mode 100644 index 0e38f3974a..0000000000 --- a/sysdeps/vax/setjmp.c +++ /dev/null @@ -1,62 +0,0 @@ -/* Copyright (C) 1991, 1992, 1994, 1997 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. - - Derived from @(#)_setjmp.s 5.7 (Berkeley) 6/27/88, - Copyright (C) 1980 Regents of the University of California. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 4. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. -*/ - -#include - - -/* Save the current program position in ENV and return 0. */ -int -__sigsetjmp (jmp_buf env, int savemask) -{ - /* Save our caller's FP and PC. */ - asm ("movl 12(fp), %0" : "=g" (env[0].__jmpbuf[0].__fp)); - asm ("movl 16(fp), %0" : "=g" (env[0].__jmpbuf[0].__pc)); - - /* Save the signal mask if requested. */ - return __sigjmp_save (env, savemask); -} diff --git a/sysdeps/vax/strcat.s b/sysdeps/vax/strcat.s deleted file mode 100644 index bfe64e61a3..0000000000 --- a/sysdeps/vax/strcat.s +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) 1983 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#if defined(LIBC_SCCS) && !defined(lint) - .asciz "@(#)strcat.s 5.6 (Berkeley) 6/1/90" -#endif /* LIBC_SCCS and not lint */ - -/* - * Concatenate string s2 to the end of s1 - * and return the base of s1. - * - * char * - * strcat(s1, s2) - * char *s1, *s2; - */ -#include "DEFS.h" - -ENTRY(strcat, R6|R7) - movq 4(ap), r6 # r6 = s1; r7 = s2 - movl r6,r1 -0: - locc $0,$65535,(r1) # look for '\0' - beql 0b - movl r1,r3 # save end of s1 -1: - locc $0,$65535,(r7) # find length of s2 - bneq 2f - movc3 $65535,(r7),(r3)# copy full block - movl r1,r7 - jbr 1b -2: - subl2 r7,r1 # calculate length - incl r1 - movc3 r1,(r7),(r3) # copy remainder - movl r6,r0 - ret diff --git a/sysdeps/vax/strchr.s b/sysdeps/vax/strchr.s deleted file mode 100644 index d56cb4b0a0..0000000000 --- a/sysdeps/vax/strchr.s +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) 1988 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#if defined(LIBC_SCCS) && !defined(lint) - .asciz "@(#)strchr.s 5.4 (Berkeley) 6/1/90" -#endif /* LIBC_SCCS and not lint */ - -/* - * Find the first occurrence of c in the string cp. - * Return pointer to match or null pointer. - * - * char * - * strchr(cp, c) - * char *cp, c; - */ -#include "DEFS.h" - - .lcomm tbl,256 - -ENTRY(strchr, 0) - movzwl $65535,r4 /* handy constant */ - movq 4(ap),r1 /* r1 = cp; r2 = c */ - movzbl r2,r2 - beql Lzero /* special case for c == '\0' */ - -/* - * Fancy scanc version. Alas, it is not reentrant. - */ - movab tbl,r3 /* r3 = base of table */ - bbss $0,(r3),Lreent /* ensure not reentering */ - movab (r3)[r2],r5 - incb (r5) /* mark both '\0' and c */ -0: - scanc r4,(r1),(r3),$1 /* look for c or '\0' */ - beql 0b /* still looking */ - movl r1,r0 /* return whatever we found */ - tstb (r0) - bneq 1f # unless it was '\0': - clrl r0 # then return NULL -1: - clrb (r5) /* clean up table */ - clrb (r3) - ret - -/* - * Special case for \0. - */ -Lzero: - locc r2,r4,(r1) /* just find end of string */ - beql Lzero /* still looking */ - movl r1,r0 /* found it */ - ret - -/* - * Slower reentrant version is two two-step searches. The first - * phase runs until we know where the string ends; it locates the - * first occurrence of c within a 65535-byte block. If we find - * the end of the string first, we switch to the second phase, - * were we look only up to the known end of string. - */ -Lreent: -0: /* first phase */ - movl r1,r3 - locc $0,r4,(r3) /* look for '\0' */ - bneq 1f - locc r2,r4,(r3) /* look for c */ - beql 0b /* not found: reset pointer and loop */ - movl r1,r0 /* found: return it */ - ret -1: /* second phase */ - subl3 r3,r1,r0 /* length of short block */ - locc r2,r0,(r3) /* look for c */ - beql 2f /* not found: return NULL */ - movl r1,r0 -2: ret - -weak_alias (strchr, index) diff --git a/sysdeps/vax/strcmp.s b/sysdeps/vax/strcmp.s deleted file mode 100644 index 479e14f301..0000000000 --- a/sysdeps/vax/strcmp.s +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 1983 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#if defined(LIBC_SCCS) && !defined(lint) - .asciz "@(#)strcmp.s 5.6 (Berkeley) 6/1/90" -#endif /* LIBC_SCCS and not lint */ - -/* - * Compare string s1 lexicographically to string s2. - * Return: - * 0 s1 == s2 - * > 0 s1 > s2 - * < 0 s2 < s2 - * - * strcmp(s1, s2) - * char *s1, *s2; - */ -#include "DEFS.h" - -ENTRY(strcmp, 0) - movl 4(ap),r1 # r1 = s1 - movl 8(ap),r3 # r3 = s2 - subb3 (r3),(r1),r0 # quick check for first char different - beql 1f # have to keep checking - cvtbl r0,r0 - ret -1: - clrl r5 # calculate min bytes to next page boundary - subb3 r1,$255,r5 # r5 = (bytes - 1) to end of page for s1 - subb3 r3,$255,r0 # r0 = (bytes - 1) to end of page for s2 - cmpb r0,r5 # r5 = min(r0, r5); - bgtru 2f - movb r0,r5 -2: - incl r5 # r5 = min bytes to next page boundary - cmpc3 r5,(r1),(r3) # compare strings - bneq 3f - subl2 r5,r1 # check if found null yet - locc $0,r5,(r1) - beql 1b # not yet done, continue checking - subl2 r0,r3 - mnegb (r3),r0 # r0 = '\0' - *s2 - cvtbl r0,r0 - ret -3: - subl2 r0,r5 # check for null in matching string - subl2 r5,r1 - locc $0,r5,(r1) - bneq 4f - subb3 (r3),(r1),r0 # r0 = *s1 - *s2 - cvtbl r0,r0 - ret -4: - clrl r0 # both the same to null - ret diff --git a/sysdeps/vax/strcpy.s b/sysdeps/vax/strcpy.s deleted file mode 100644 index 1eb00ba6c3..0000000000 --- a/sysdeps/vax/strcpy.s +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 1983 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#if defined(LIBC_SCCS) && !defined(lint) - .asciz "@(#)strcpy.s 5.6 (Berkeley) 6/1/90" -#endif /* LIBC_SCCS and not lint */ - -/* - * Copy string s2 over top of s1. - * Return base of s1. - * - * char * - * strcpy(s1, s2) - * char *s1, *s2; - */ -#include "DEFS.h" - -ENTRY(strcpy, R6) - movl 4(ap), r3 # r3 = s1 - movl 8(ap), r6 # r6 = s2 -1: - locc $0,$65535,(r6) # find length of s2 - bneq 2f - movc3 $65535,(r6),(r3)# copy full block - movl r1,r6 - jbr 1b -2: - subl2 r6,r1 # calculate length - incl r1 - movc3 r1,(r6),(r3) # copy remainder - movl 4(ap),r0 # return base of s1 - ret diff --git a/sysdeps/vax/strcspn.s b/sysdeps/vax/strcspn.s deleted file mode 100644 index 155b783089..0000000000 --- a/sysdeps/vax/strcspn.s +++ /dev/null @@ -1,62 +0,0 @@ -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#if defined(LIBC_SCCS) && !defined(lint) - .asciz "@(#)strcspn.s 5.1 (Berkeley) 5/15/90" -#endif /* LIBC_SCCS and not lint */ - -/* - * Span the complement of string s2 (skip characters that are not in s2). - * Return the number of characters in s1 that were skipped. - * - * size_t - * strcspn(s1, s2) - * const char *s1, *s2; - */ -#include "DEFS.h" - -ENTRY(strcspn, 0) - subl2 $32,sp /* make 256 bit table */ - movc5 $0,(sp),$0,$32,(sp) - movq 4(ap),r1 /* r1 = s1, r2 = s2 */ - - /* turn on bit for each character in s2, including '\0' */ -1: - movzbl (r2)+,r0 - bbss r0,(sp),1b - bneq 1b - movl r1,r0 /* r0 = s (current pos in s1) */ - - /* look for a character that is in s2 */ -2: - movzbl (r0)+,r2 /* c = *s++ */ - bbc r2,(sp),2b /* loop until c is in table */ - decl r0 /* s-- */ - subl2 r1,r0 /* r0 = s - s1 = count */ - ret diff --git a/sysdeps/vax/strlen.s b/sysdeps/vax/strlen.s deleted file mode 100644 index 9479fbbf65..0000000000 --- a/sysdeps/vax/strlen.s +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 1983 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#if defined(LIBC_SCCS) && !defined(lint) - .asciz "@(#)strlen.s 5.6 (Berkeley) 6/1/90" -#endif /* LIBC_SCCS and not lint */ - -/* - * Return the length of cp (not counting '\0'). - * - * strlen(cp) - * char *cp; - */ -#include "DEFS.h" - -ENTRY(strlen, 0) - movl 4(ap),r1 -1: - locc $0,$65535,(r1) # look for '\0' - beql 1b - subl3 4(ap),r1,r0 # len = cp - base - ret diff --git a/sysdeps/vax/strncat.s b/sysdeps/vax/strncat.s deleted file mode 100644 index 2387d1b1bb..0000000000 --- a/sysdeps/vax/strncat.s +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 1983 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#if defined(LIBC_SCCS) && !defined(lint) - .asciz "@(#)strncat.s 5.6 (Berkeley) 6/1/90" -#endif /* LIBC_SCCS and not lint */ - -/* - * Concatenate string s2 on the end of s1 - * and return the base of s1. The parameter - * n is the maximum length of string s2 to - * concatenate. - * - * char * - * strncat(s1, s2, n) - * char *s1, *s2; - * int n; - */ -#include "DEFS.h" - -ENTRY(strncat, R6) - movl 12(ap),r6 # r6 = n - bleq done # n <= 0 - movl 4(ap),r3 # r3 = s1 - movl r3,r1 -0: - locc $0,$65535,(r1) - beql 0b - movl r1,r3 # r3 = index(s1, '\0'); - movl 8(ap),r1 # r1 = s2 -1: - movzwl $65535,r2 # r2 = bytes in first chunk - cmpl r6,r2 # r2 = min(bytes in chunk, n); - jgeq 2f - movl r6,r2 -2: - subl2 r2,r6 # update n - locc $0,r2,(r1) # '\0' found? - jneq 3f - subl2 r2,r1 # back up pointer updated by locc - movc3 r2,(r1),(r3) # copy in next piece - tstl r6 # run out of space? - jneq 1b - clrb (r3) # force '\0' termination - jbr done -3: - subl2 r0,r2 # r2 = number of bytes to move - subl2 r2,r1 # back up pointer updated by locc - incl r2 # copy '\0' as well - movc3 r2,(r1),(r3) # copy in last piece -done: - movl 4(ap),r0 # return s1 - ret diff --git a/sysdeps/vax/strncmp.s b/sysdeps/vax/strncmp.s deleted file mode 100644 index 8d8f5d419a..0000000000 --- a/sysdeps/vax/strncmp.s +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) 1983 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#if defined(LIBC_SCCS) && !defined(lint) - .asciz "@(#)strncmp.s 5.6 (Berkeley) 6/1/90" -#endif /* LIBC_SCCS and not lint */ - -/* - * Compare at most n characters of string - * s1 lexicographically to string s2. - * Return: - * 0 s1 == s2 - * > 0 s1 > s2 - * < 0 s2 < s2 - * - * strncmp(s1, s2, n) - * char *s1, *s2; - * int n; - */ -#include "DEFS.h" - -ENTRY(strncmp, 0) - movl 4(ap),r1 # r1 = s1 - movq 8(ap),r3 # r3 = s2; r4 = n -1: - clrl r5 # calculate min bytes to next page boundary - subb3 r1,$255,r5 # r5 = (bytes - 1) to end of page for s1 - subb3 r3,$255,r0 # r0 = (bytes - 1) to end of page for s2 - cmpb r0,r5 # r5 = min(r0, r5); - bgtru 2f - movb r0,r5 -2: - incl r5 # r5 = min bytes to next page boundary - cmpl r4,r5 # r5 = min(n, r5); - bgeq 3f - movl r4,r5 -3: - cmpc3 r5,(r1),(r3) # compare strings - bneq 4f - subl2 r5,r4 # check for end of comparison - beql 5f - subl2 r5,r1 # check if found null yet - locc $0,r5,(r1) - beql 1b # not yet done, continue checking - subl2 r0,r3 - mnegb (r3),r0 # r0 = '\0' - *s2 - cvtbl r0,r0 - ret -4: - subl2 r0,r5 # check for null in matching string - subl2 r5,r1 - locc $0,r5,(r1) - bneq 5f - subb3 (r3),(r1),r0 # r0 = *s1 - *s2 - cvtbl r0,r0 - ret -5: - clrl r0 # both the same to null - ret diff --git a/sysdeps/vax/strncpy.s b/sysdeps/vax/strncpy.s deleted file mode 100644 index ade70e9dca..0000000000 --- a/sysdeps/vax/strncpy.s +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 1983 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#if defined(LIBC_SCCS) && !defined(lint) - .asciz "@(#)strncpy.s 5.6 (Berkeley) 6/1/90" -#endif /* LIBC_SCCS and not lint */ - -/* - * Copy string s2 over top of string s1. - * Truncate or null-pad to n bytes. - * - * char * - * strncpy(s1, s2, n) - * char *s1, *s2; - */ -#include "DEFS.h" - -ENTRY(strncpy, R6) - movl 12(ap),r6 # r6 = n - bleq done # n <= 0 - movl 4(ap),r3 # r3 = s1 - movl 8(ap),r1 # r1 = s2 -1: - movzwl $65535,r2 # r2 = bytes in first chunk - cmpl r6,r2 # r2 = min(bytes in chunk, n); - jgeq 2f - movl r6,r2 -2: - subl2 r2,r6 # update n - locc $0,r2,(r1) # '\0' found? - jneq 3f - subl2 r2,r1 # back up pointer updated by locc - movc3 r2,(r1),(r3) # copy in next piece - tstl r6 # run out of space? - jneq 1b - jbr done -3: # copy up to '\0' logic - addl2 r0,r6 # r6 = number of null-pad bytes - subl2 r0,r2 # r2 = number of bytes to move - subl2 r2,r1 # back up pointer updated by locc - movc3 r2,(r1),(r3) # copy in last piece -4: # null-pad logic - movzwl $65535,r2 # r2 = bytes in first chunk - cmpl r6,r2 # r2 = min(bytes in chunk, n); - jgeq 5f - movl r6,r2 -5: - subl2 r2,r6 # update n - movc5 $0,(r3),$0,r2,(r3)# pad with '\0's - tstl r6 # finished padding? - jneq 4b -done: - movl 4(ap),r0 # return s1 - ret diff --git a/sysdeps/vax/strpbrk.s b/sysdeps/vax/strpbrk.s deleted file mode 100644 index 4a0e541719..0000000000 --- a/sysdeps/vax/strpbrk.s +++ /dev/null @@ -1,64 +0,0 @@ -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#if defined(LIBC_SCCS) && !defined(lint) - .asciz "@(#)strpbrk.s 5.1 (Berkeley) 5/15/90" -#endif /* LIBC_SCCS and not lint */ - -/* - * Find in s1 the first occurrence of any character from s2. - * If there are none, return NULL. - * - * char * - * strpbrk(s1, s2) - * const char *s1, *s2; - */ -#include "DEFS.h" - -ENTRY(strpbrk, 0) - subl2 $32,sp /* make 256 bit table */ - movc5 $0,(sp),$0,$32,(sp) - movq 4(ap),r0 /* r0 = s1, r1 = s2 */ - - /* turn on bit for each character in s2, including '\0' */ -1: - movzbl (r1)+,r2 - bbss r2,(sp),1b - bneq 1b - - /* look for a character that is in s2 */ -2: - movzbl (r0)+,r2 /* c = *s++ */ - bbc r2,(sp),2b /* loop until c is in table */ - beql 3f /* if c==0, go return NULL */ - decl r0 /* s-- */ - ret -3: - clrl r0 - ret diff --git a/sysdeps/vax/strrchr.s b/sysdeps/vax/strrchr.s deleted file mode 100644 index b0e482c9fa..0000000000 --- a/sysdeps/vax/strrchr.s +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (c) 1988 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#if defined(LIBC_SCCS) && !defined(lint) - .asciz "@(#)strrchr.s 5.4 (Berkeley) 6/1/90" -#endif /* LIBC_SCCS and not lint */ - -/* - * Find the last occurrence of c in the string cp. - * Return pointer to match or null pointer. - * - * char * - * strrchr(cp, c) - * char *cp, c; - */ -#include "DEFS.h" - - .lcomm tbl,256 - -ENTRY(strrchr, 0) - movzwl $65535,r4 /* handy 65535 */ - movq 4(ap),r1 /* r1 = cp; r2 = c */ - movzbl r2,r2 - beql Lzero /* special case for c == '\0' */ - - clrl r5 /* r5 = pointer to last match */ - -/* - * Fancy scanc version. Alas, it is not reentrant. - */ - movab tbl,r3 /* r3 = address of table */ - bbss $0,(r3),Lreent /* ensure not reentering */ - movab (r3)[r2],r4 - incb (r4) /* mark both '\0' and c */ -0: - scanc $65535,(r1),(r3),$1 /* look for c or '\0' */ - beql 0b /* keep looking */ - tstb (r1) - beql 1f /* done if '\0' */ - movab (r1)+,r5 /* save most recently found, and skip over it */ - jbr 0b /* keep looking */ -1: - movl r5,r0 /* return last found (if any) */ - clrb (r4) /* clean up table */ - clrb (r3) - ret - -/* - * Special case for \0. - */ -Lzero: - locc $0,r4,(r1) /* just find end of string */ - beql Lzero /* still looking */ - movl r1,r0 /* found it */ - ret - -/* - * Slower reentrant version is two two-step searches. The first - * phase runs until we know where the string ends; it locates any - * occurrences of c within a 65535-byte block. Once we have found - * the end of the string, we find any further occurrences before - * that location. - */ -Lreent: -0: /* first phase */ - movl r1,r3 - locc $0,r4,(r3) /* look for '\0' */ - bneq 1f - locc r2,r4,(r3) /* continue phase 1 search for c */ - beql 0b - movab (r1)+,r5 /* found c: save and increment pointer */ - brb 0b /* and continue */ - -1: /* second phase */ - subl3 r3,r1,r0 /* length of short block */ - movl r3,r1 -2: - locc r2,r0,(r1) /* look for c */ - beql 3f /* skip if not found */ - movab (r1)+,r5 /* save pointer as before */ - sobgtr r0,2b /* adjust count and loop */ -3: - movl r5,r0 /* return stashed pointer */ - ret - -weak_alias (strrchr, rindex) diff --git a/sysdeps/vax/strsep.s b/sysdeps/vax/strsep.s deleted file mode 100644 index dcf2a7caaa..0000000000 --- a/sysdeps/vax/strsep.s +++ /dev/null @@ -1,81 +0,0 @@ -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#if defined(LIBC_SCCS) && !defined(lint) - .asciz "@(#)strsep.s 5.1 (Berkeley) 5/15/90" -#endif /* LIBC_SCCS and not lint */ - -/* - * Get next word from string *stringp, where words are - * strings separated by characters from delim. - * - * Writes NULs into the string at *stringp to end tokens. - * On return, *stringp points past the last NUL written (if there might - * be further tokens), or is NULL (if there are definitely no more tokens). - * - * If *stringp is NULL, strtoken returns NULL. - * - * char * - * strtoken(stringp, delim) - * register char **stringp; - * register char const *delim; - */ -#include "DEFS.h" - -ENTRY(strsep, 0) - tstl *4(ap) /* if (*stringp == NULL) */ - bneq 0f - clrl r0 # return (NULL); - ret - -0: - subl2 $32,sp /* make room for 256 bit table */ - movc5 $0,(sp),$0,$32,(sp) - movq 4(ap),r1 /* r1 = stringp, r2 = delim */ - - /* turn on bit for each character in s2, including '\0' */ -1: - movzbl (r2)+,r0 - bbss r0,(sp),1b - bneq 1b - - movl (r1),r3 /* r3 = s = *stringp */ - movl r3,r0 /* save return value */ - - /* scan for delimiters */ -2: - movzbl (r3)+,r2 /* c = *s++ */ - bbc r2,(sp),2b /* loop until c is in table */ - beql 3f - clrb -1(r3) /* if c!='\0', s[-1] = 0 */ - movl r3,(r1) /* and *stringp = s */ - ret -3: - clrl (r1) /* else *stringp = NULL */ - ret diff --git a/sysdeps/vax/strspn.s b/sysdeps/vax/strspn.s deleted file mode 100644 index ca944828cd..0000000000 --- a/sysdeps/vax/strspn.s +++ /dev/null @@ -1,66 +0,0 @@ -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#if defined(LIBC_SCCS) && !defined(lint) - .asciz "@(#)strspn.s 5.1 (Berkeley) 5/15/90" -#endif /* LIBC_SCCS and not lint */ - -/* - * Span the string s2 (skip characters that are in s2). - * Return the number of characters in s1 that were skipped. - * - * size_t - * strspn(s1, s2) - * const char *s1, *s2; - */ -#include "DEFS.h" - -ENTRY(strspn, 0) - subl2 $32,sp /* make 256 bit table */ - movc5 $0,(sp),$0,$32,(sp) - movq 4(ap),r1 /* r1 = s1, r2 = s2 */ - - /* turn on bit for each character in s2, including '\0' */ -1: - movzbl (r2)+,r0 - bbss r0,(sp),1b - bneq 1b - - /* now clear bit for '\0' */ - /* (this is easier than avoiding setting it in the first place) */ - bicb2 $1,(sp) /* stop at '\0' */ - movl r1,r0 /* r0 = s (current pos in s1) */ - - /* look for a character that is not in s2 */ -2: - movzbl (r0)+,r2 /* c = *s++ */ - bbs r2,(sp),2b /* loop while c is in table */ - decl r0 /* s-- */ - subl2 r1,r0 /* r0 = s - s1 = count */ - ret diff --git a/sysdeps/vax/strstr.s b/sysdeps/vax/strstr.s deleted file mode 100644 index 0283a57dcf..0000000000 --- a/sysdeps/vax/strstr.s +++ /dev/null @@ -1,109 +0,0 @@ -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#if defined(LIBC_SCCS) && !defined(lint) - .asciz "@(#)strstr.s 5.2 (Berkeley) 8/21/90" -#endif /* LIBC_SCCS and not lint */ - -/* - * Find the first occurrence of s2 as a substring in s1. - * If s2 is empty, return s1. - * - * char *strstr(s1, s2) - * const char *s1, *s2; - */ -#include "DEFS.h" - -ENTRY(strstr, 0) - movq 4(ap),r3 /* r3 = s1, r4 = s2 */ - movzwl $65535,r2 /* r2 = locc/matchc limit */ - locc $0,r2,(r4) /* find '\0' in s2 */ - beql 4f - subl3 r4,r1,r5 /* r5 = strlen(s2) */ - beql 1f /* if r5 == 0, return s1 */ - - /* - * s2 is short enough to apply matchc. - * If s1 is long, we have to do it in stages. - */ -0: locc $0,r2,(r3) /* find '\0' in s1 */ - beql 3f - - /* - * Both strings are `short'; we can use matchc directly. - */ - subl3 r3,r1,r1 /* r1 = strlen(s1) */ - matchc r5,(r4),r1,(r3) /* find substring */ - bneq 2f - - /* - * r3 points r5 bytes past match. Return the match. - */ -1: subl3 r5,r3,r0 /* return (byte_past_match - strlen(s2)) */ - ret - - /* - * There is no matching substring. - */ -2: clrl r0 /* return NULL */ - ret - - /* - * s1 is too long (> 65535 bytes) to apply matchc directly, - * but s2 is short enough. Apply s2 to s1, then (if not - * found yet) advancing s1 by (65536-strlen(s2)) bytes and - * loop. - */ -3: matchc r5,(r4),r2,(r3) /* search */ - beql 1b /* if found, go return it */ - decw r2 /* from 0 to 65535 */ - incl r3 /* already advanced 65535, now 65536 */ - subl2 r5,r3 /* ... minus strlen(s2) */ - brb 0b - - /* - * s2 is too long (> 65535 bytes) to bother with matchc. - */ -4: locc $0,r2,(r1) /* continue working on strlen(s2) */ - beql 4b - subl3 r1,r4,r5 /* r5 = strlen(s2) */ - movb (r4)+,r2 /* r2 = *s2++ */ - decl r5 /* fix up length */ -5: movb (r3)+,r0 /* r0 = *s1++ */ - beql 2b /* if '\0', return NULL */ - cmpb r0,r2 - bneq 5b /* loop until first char found */ - pushr R5|R4|R3|R2 /* save c, s1, s2, n */ - pushr R5|R4|R3 /* strncmp(s1, s2, n) */ - calls $3,_strncmp - popr R2|R3|R4|R5 /* restore */ - tstl r0 - bneq 5b /* loop until strncmp says rest same too */ - subl3 $1,r3,r0 /* return previous s1 */ - ret diff --git a/sysdeps/vax/sub_n.s b/sysdeps/vax/sub_n.s deleted file mode 100644 index 14ba343f96..0000000000 --- a/sysdeps/vax/sub_n.s +++ /dev/null @@ -1,48 +0,0 @@ -# VAX __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and store -# difference in a third limb vector. - -# Copyright (C) 1992, 1994 Free Software Foundation, Inc. - -# This file is part of the GNU MP Library. - -# The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -# MA 02111-1307, USA. - - -# INPUT PARAMETERS -# res_ptr (sp + 4) -# s1_ptr (sp + 8) -# s2_ptr (sp + 12) -# size (sp + 16) - -.text - .align 1 -.globl ___mpn_sub_n -___mpn_sub_n: - .word 0x0 - movl 16(ap),r0 - movl 12(ap),r1 - movl 8(ap),r2 - movl 4(ap),r3 - subl2 r4,r4 - -Loop: - movl (r2)+,r4 - sbwc (r1)+,r4 - movl r4,(r3)+ - jsobgtr r0,Loop - - adwc r0,r0 - ret diff --git a/sysdeps/vax/submul_1.s b/sysdeps/vax/submul_1.s deleted file mode 100644 index 5ff8d016ce..0000000000 --- a/sysdeps/vax/submul_1.s +++ /dev/null @@ -1,126 +0,0 @@ -# VAX __mpn_submul_1 -- Multiply a limb vector with a limb and subtract -# the result from a second limb vector. - -# Copyright (C) 1992, 1994 Free Software Foundation, Inc. - -# This file is part of the GNU MP Library. - -# The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -# MA 02111-1307, USA. - - -# INPUT PARAMETERS -# res_ptr (sp + 4) -# s1_ptr (sp + 8) -# size (sp + 12) -# s2_limb (sp + 16) - -.text - .align 1 -.globl ___mpn_submul_1 -___mpn_submul_1: - .word 0xfc0 - movl 12(ap),r4 - movl 8(ap),r8 - movl 4(ap),r9 - movl 16(ap),r6 - jlss s2_big - - clrl r3 - incl r4 - ashl $-1,r4,r7 - jlbc r4,L1 - clrl r11 - -# Loop for S2_LIMB < 0x80000000 -Loop1: movl (r8)+,r1 - jlss L1n0 - emul r1,r6,$0,r2 - addl2 r11,r2 - adwc $0,r3 - subl2 r2,(r9)+ - adwc $0,r3 -L1: movl (r8)+,r1 - jlss L1n1 -L1p1: emul r1,r6,$0,r10 - addl2 r3,r10 - adwc $0,r11 - subl2 r10,(r9)+ - adwc $0,r11 - - jsobgtr r7,Loop1 - movl r11,r0 - ret - -L1n0: emul r1,r6,$0,r2 - addl2 r11,r2 - adwc r6,r3 - subl2 r2,(r9)+ - adwc $0,r3 - movl (r8)+,r1 - jgeq L1p1 -L1n1: emul r1,r6,$0,r10 - addl2 r3,r10 - adwc r6,r11 - subl2 r10,(r9)+ - adwc $0,r11 - - jsobgtr r7,Loop1 - movl r11,r0 - ret - - -s2_big: clrl r3 - incl r4 - ashl $-1,r4,r7 - jlbc r4,L2 - clrl r11 - -# Loop for S2_LIMB >= 0x80000000 -Loop2: movl (r8)+,r1 - jlss L2n0 - emul r1,r6,$0,r2 - addl2 r11,r2 - adwc r1,r3 - subl2 r2,(r9)+ - adwc $0,r3 -L2: movl (r8)+,r1 - jlss L2n1 -L2p1: emul r1,r6,$0,r10 - addl2 r3,r10 - adwc r1,r11 - subl2 r10,(r9)+ - adwc $0,r11 - - jsobgtr r7,Loop2 - movl r11,r0 - ret - -L2n0: emul r1,r6,$0,r2 - addl2 r11,r2 - adwc r6,r3 - subl2 r2,(r9)+ - adwc r1,r3 - movl (r8)+,r1 - jgeq L2p1 -L2n1: emul r1,r6,$0,r10 - addl2 r3,r10 - adwc r6,r11 - subl2 r10,(r9)+ - adwc r1,r11 - - jsobgtr r7,Loop2 - movl r11,r0 - ret diff --git a/sysdeps/z8000/add_n.s b/sysdeps/z8000/add_n.s deleted file mode 100644 index 4d290265a5..0000000000 --- a/sysdeps/z8000/add_n.s +++ /dev/null @@ -1,53 +0,0 @@ -! Z8000 __mpn_add_n -- Add two limb vectors of equal, non-zero length. - -! Copyright (C) 1993, 1994 Free Software Foundation, Inc. - -! This file is part of the GNU MP Library. - -! The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -! MA 02111-1307, USA. - - -! INPUT PARAMETERS -! res_ptr r7 -! s1_ptr r6 -! s2_ptr r5 -! size r4 - -! If we are really crazy, we can use push to write a few result words -! backwards, using push just because it is faster than reg+disp. We'd -! then add 2x the number of words written to r7... - - unseg - .text - even - global ___mpn_add_n -___mpn_add_n: - pop r0,@r6 - pop r1,@r5 - add r0,r1 - ld @r7,r0 - dec r4 - jr eq,Lend -Loop: pop r0,@r6 - pop r1,@r5 - adc r0,r1 - inc r7,#2 - ld @r7,r0 - dec r4 - jr ne,Loop -Lend: ld r2,r4 ! use 0 already in r4 - adc r2,r2 - ret t diff --git a/sysdeps/z8000/gmp-mparam.h b/sysdeps/z8000/gmp-mparam.h deleted file mode 100644 index 4216df673c..0000000000 --- a/sysdeps/z8000/gmp-mparam.h +++ /dev/null @@ -1,27 +0,0 @@ -/* gmp-mparam.h -- Compiler/machine parameter header file. - -Copyright (C) 1991, 1993, 1994 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -MA 02111-1307, USA. */ - -#define BITS_PER_MP_LIMB 16 -#define BYTES_PER_MP_LIMB 2 -#define BITS_PER_LONGINT 32 -#define BITS_PER_INT 16 -#define BITS_PER_SHORTINT 16 -#define BITS_PER_CHAR 8 diff --git a/sysdeps/z8000/mul_1.s b/sysdeps/z8000/mul_1.s deleted file mode 100644 index e449dfacb0..0000000000 --- a/sysdeps/z8000/mul_1.s +++ /dev/null @@ -1,68 +0,0 @@ -! Z8000 __mpn_mul_1 -- Multiply a limb vector with a limb and store -! the result in a second limb vector. - -! Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. - -! This file is part of the GNU MP Library. - -! The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -! MA 02111-1307, USA. - - -! INPUT PARAMETERS -! res_ptr r7 -! s1_ptr r6 -! size r5 -! s2_limb r4 - - unseg - .text - even - global ___mpn_mul_1 -___mpn_mul_1: - sub r2,r2 ! zero carry limb - and r4,r4 - jr mi,Lneg - -Lpos: pop r1,@r6 - ld r9,r1 - mult rr8,r4 - and r1,r1 ! shift msb of loaded limb into cy - jr mi,Lp ! branch if loaded limb's msb is set - add r8,r4 ! hi_limb += sign_comp2 -Lp: add r9,r2 ! lo_limb += cy_limb - xor r2,r2 - adc r2,r8 - ld @r7,r9 - inc r7,#2 - dec r5 - jr ne,Lpos - ret t - -Lneg: pop r1,@r6 - ld r9,r1 - mult rr8,r4 - add r8,r1 ! hi_limb += sign_comp1 - and r1,r1 - jr mi,Ln - add r8,r4 ! hi_limb += sign_comp2 -Ln: add r9,r2 ! lo_limb += cy_limb - xor r2,r2 - adc r2,r8 - ld @r7,r9 - inc r7,#2 - dec r5 - jr ne,Lneg - ret t diff --git a/sysdeps/z8000/sub_n.s b/sysdeps/z8000/sub_n.s deleted file mode 100644 index c0787755c6..0000000000 --- a/sysdeps/z8000/sub_n.s +++ /dev/null @@ -1,54 +0,0 @@ -! Z8000 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and -! store difference in a third limb vector. - -! Copyright (C) 1993, 1994 Free Software Foundation, Inc. - -! This file is part of the GNU MP Library. - -! The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to -! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -! MA 02111-1307, USA. - - -! INPUT PARAMETERS -! res_ptr r7 -! s1_ptr r6 -! s2_ptr r5 -! size r4 - -! If we are really crazy, we can use push to write a few result words -! backwards, using push just because it is faster than reg+disp. We'd -! then add 2x the number of words written to r7... - - unseg - .text - even - global ___mpn_sub_n -___mpn_sub_n: - pop r0,@r6 - pop r1,@r5 - sub r0,r1 - ld @r7,r0 - dec r4 - jr eq,Lend -Loop: pop r0,@r6 - pop r1,@r5 - sbc r0,r1 - inc r7,#2 - ld @r7,r0 - dec r4 - jr ne,Loop -Lend: ld r2,r4 ! use 0 already in r4 - adc r2,r2 - ret t From a63c7fa1856d6d4ef6573111e5700ac01b0bf6b2 Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Sat, 3 Dec 2011 21:13:38 -0500 Subject: [PATCH 4145/4487] Add sysdeps/unix/sysv/linux/generic/. Changes are tracked in ChangeLog.linux-generic. --- ChangeLog.linux-generic | 80 +++++ sysdeps/unix/sysv/linux/generic/Makefile | 3 + .../unix/sysv/linux/generic/____longjmp_chk.c | 58 +++ sysdeps/unix/sysv/linux/generic/access.c | 32 ++ sysdeps/unix/sysv/linux/generic/bits/fcntl.h | 340 ++++++++++++++++++ sysdeps/unix/sysv/linux/generic/bits/sem.h | 93 +++++ sysdeps/unix/sysv/linux/generic/bits/stat.h | 172 +++++++++ sysdeps/unix/sysv/linux/generic/bits/statfs.h | 87 +++++ .../unix/sysv/linux/generic/bits/typesizes.h | 67 ++++ sysdeps/unix/sysv/linux/generic/brk.c | 46 +++ sysdeps/unix/sysv/linux/generic/chmod.c | 32 ++ sysdeps/unix/sysv/linux/generic/chown.c | 33 ++ sysdeps/unix/sysv/linux/generic/creat.c | 39 ++ sysdeps/unix/sysv/linux/generic/dl-origin.c | 82 +++++ sysdeps/unix/sysv/linux/generic/dup2.c | 38 ++ .../unix/sysv/linux/generic/epoll_create.c | 39 ++ sysdeps/unix/sysv/linux/generic/epoll_wait.c | 31 ++ sysdeps/unix/sysv/linux/generic/futimesat.c | 53 +++ sysdeps/unix/sysv/linux/generic/getdents.c | 1 + sysdeps/unix/sysv/linux/generic/getdents64.c | 38 ++ .../unix/sysv/linux/generic/inotify_init.c | 33 ++ sysdeps/unix/sysv/linux/generic/kernel_stat.h | 27 ++ sysdeps/unix/sysv/linux/generic/lchown.c | 33 ++ sysdeps/unix/sysv/linux/generic/link.c | 32 ++ sysdeps/unix/sysv/linux/generic/lxstat.c | 49 +++ sysdeps/unix/sysv/linux/generic/mkdir.c | 34 ++ .../unix/sysv/linux/generic/nptl/not-cancel.h | 1 + sysdeps/unix/sysv/linux/generic/open.c | 72 ++++ sysdeps/unix/sysv/linux/generic/open64.c | 56 +++ sysdeps/unix/sysv/linux/generic/pause.c | 64 ++++ sysdeps/unix/sysv/linux/generic/pipe.c | 34 ++ sysdeps/unix/sysv/linux/generic/poll.c | 54 +++ sysdeps/unix/sysv/linux/generic/readlink.c | 32 ++ .../unix/sysv/linux/generic/readlink_chk.c | 40 +++ sysdeps/unix/sysv/linux/generic/recv.c | 46 +++ sysdeps/unix/sysv/linux/generic/rename.c | 30 ++ sysdeps/unix/sysv/linux/generic/rmdir.c | 32 ++ sysdeps/unix/sysv/linux/generic/select.c | 75 ++++ sysdeps/unix/sysv/linux/generic/send.c | 44 +++ sysdeps/unix/sysv/linux/generic/symlink.c | 31 ++ sysdeps/unix/sysv/linux/generic/syscalls.list | 32 ++ sysdeps/unix/sysv/linux/generic/sysctl.c | 34 ++ sysdeps/unix/sysv/linux/generic/sysdep.h | 42 +++ sysdeps/unix/sysv/linux/generic/umount.c | 31 ++ sysdeps/unix/sysv/linux/generic/unlink.c | 32 ++ sysdeps/unix/sysv/linux/generic/ustat.c | 34 ++ sysdeps/unix/sysv/linux/generic/utimes.c | 46 +++ .../sysv/linux/generic/wordsize-32/Versions | 5 + .../sysv/linux/generic/wordsize-32/fcntl.c | 88 +++++ .../sysv/linux/generic/wordsize-32/fstatfs.c | 33 ++ .../linux/generic/wordsize-32/ftruncate.c | 32 ++ .../linux/generic/wordsize-32/ftruncate64.c | 33 ++ .../sysv/linux/generic/wordsize-32/fxstat.c | 46 +++ .../sysv/linux/generic/wordsize-32/fxstatat.c | 46 +++ .../sysv/linux/generic/wordsize-32/getdents.c | 116 ++++++ .../sysv/linux/generic/wordsize-32/llseek.c | 47 +++ .../sysv/linux/generic/wordsize-32/lseek.c | 39 ++ .../sysv/linux/generic/wordsize-32/lxstat.c | 44 +++ .../sysv/linux/generic/wordsize-32/lxstat64.c | 39 ++ .../sysv/linux/generic/wordsize-32/mmap.c | 41 +++ .../sysv/linux/generic/wordsize-32/overflow.h | 61 ++++ .../linux/generic/wordsize-32/posix_fadvise.c | 38 ++ .../sysv/linux/generic/wordsize-32/pread.c | 59 +++ .../sysv/linux/generic/wordsize-32/pread64.c | 59 +++ .../sysv/linux/generic/wordsize-32/preadv.c | 56 +++ .../sysv/linux/generic/wordsize-32/preadv64.c | 57 +++ .../sysv/linux/generic/wordsize-32/pwrite.c | 60 ++++ .../sysv/linux/generic/wordsize-32/pwrite64.c | 60 ++++ .../sysv/linux/generic/wordsize-32/pwritev.c | 57 +++ .../linux/generic/wordsize-32/pwritev64.c | 58 +++ .../sysv/linux/generic/wordsize-32/sendfile.c | 46 +++ .../sysv/linux/generic/wordsize-32/statfs.c | 34 ++ .../linux/generic/wordsize-32/syscalls.list | 5 + .../sysv/linux/generic/wordsize-32/truncate.c | 32 ++ .../linux/generic/wordsize-32/truncate64.c | 32 ++ .../sysv/linux/generic/wordsize-32/xstat.c | 44 +++ .../sysv/linux/generic/wordsize-32/xstat64.c | 39 ++ sysdeps/unix/sysv/linux/generic/xmknod.c | 55 +++ sysdeps/unix/sysv/linux/generic/xstat.c | 49 +++ 79 files changed, 3944 insertions(+) create mode 100644 ChangeLog.linux-generic create mode 100644 sysdeps/unix/sysv/linux/generic/Makefile create mode 100644 sysdeps/unix/sysv/linux/generic/____longjmp_chk.c create mode 100644 sysdeps/unix/sysv/linux/generic/access.c create mode 100644 sysdeps/unix/sysv/linux/generic/bits/fcntl.h create mode 100644 sysdeps/unix/sysv/linux/generic/bits/sem.h create mode 100644 sysdeps/unix/sysv/linux/generic/bits/stat.h create mode 100644 sysdeps/unix/sysv/linux/generic/bits/statfs.h create mode 100644 sysdeps/unix/sysv/linux/generic/bits/typesizes.h create mode 100644 sysdeps/unix/sysv/linux/generic/brk.c create mode 100644 sysdeps/unix/sysv/linux/generic/chmod.c create mode 100644 sysdeps/unix/sysv/linux/generic/chown.c create mode 100644 sysdeps/unix/sysv/linux/generic/creat.c create mode 100644 sysdeps/unix/sysv/linux/generic/dl-origin.c create mode 100644 sysdeps/unix/sysv/linux/generic/dup2.c create mode 100644 sysdeps/unix/sysv/linux/generic/epoll_create.c create mode 100644 sysdeps/unix/sysv/linux/generic/epoll_wait.c create mode 100644 sysdeps/unix/sysv/linux/generic/futimesat.c create mode 100644 sysdeps/unix/sysv/linux/generic/getdents.c create mode 100644 sysdeps/unix/sysv/linux/generic/getdents64.c create mode 100644 sysdeps/unix/sysv/linux/generic/inotify_init.c create mode 100644 sysdeps/unix/sysv/linux/generic/kernel_stat.h create mode 100644 sysdeps/unix/sysv/linux/generic/lchown.c create mode 100644 sysdeps/unix/sysv/linux/generic/link.c create mode 100644 sysdeps/unix/sysv/linux/generic/lxstat.c create mode 100644 sysdeps/unix/sysv/linux/generic/mkdir.c create mode 100644 sysdeps/unix/sysv/linux/generic/nptl/not-cancel.h create mode 100644 sysdeps/unix/sysv/linux/generic/open.c create mode 100644 sysdeps/unix/sysv/linux/generic/open64.c create mode 100644 sysdeps/unix/sysv/linux/generic/pause.c create mode 100644 sysdeps/unix/sysv/linux/generic/pipe.c create mode 100644 sysdeps/unix/sysv/linux/generic/poll.c create mode 100644 sysdeps/unix/sysv/linux/generic/readlink.c create mode 100644 sysdeps/unix/sysv/linux/generic/readlink_chk.c create mode 100644 sysdeps/unix/sysv/linux/generic/recv.c create mode 100644 sysdeps/unix/sysv/linux/generic/rename.c create mode 100644 sysdeps/unix/sysv/linux/generic/rmdir.c create mode 100644 sysdeps/unix/sysv/linux/generic/select.c create mode 100644 sysdeps/unix/sysv/linux/generic/send.c create mode 100644 sysdeps/unix/sysv/linux/generic/symlink.c create mode 100644 sysdeps/unix/sysv/linux/generic/syscalls.list create mode 100644 sysdeps/unix/sysv/linux/generic/sysctl.c create mode 100644 sysdeps/unix/sysv/linux/generic/sysdep.h create mode 100644 sysdeps/unix/sysv/linux/generic/umount.c create mode 100644 sysdeps/unix/sysv/linux/generic/unlink.c create mode 100644 sysdeps/unix/sysv/linux/generic/ustat.c create mode 100644 sysdeps/unix/sysv/linux/generic/utimes.c create mode 100644 sysdeps/unix/sysv/linux/generic/wordsize-32/Versions create mode 100644 sysdeps/unix/sysv/linux/generic/wordsize-32/fcntl.c create mode 100644 sysdeps/unix/sysv/linux/generic/wordsize-32/fstatfs.c create mode 100644 sysdeps/unix/sysv/linux/generic/wordsize-32/ftruncate.c create mode 100644 sysdeps/unix/sysv/linux/generic/wordsize-32/ftruncate64.c create mode 100644 sysdeps/unix/sysv/linux/generic/wordsize-32/fxstat.c create mode 100644 sysdeps/unix/sysv/linux/generic/wordsize-32/fxstatat.c create mode 100644 sysdeps/unix/sysv/linux/generic/wordsize-32/getdents.c create mode 100644 sysdeps/unix/sysv/linux/generic/wordsize-32/llseek.c create mode 100644 sysdeps/unix/sysv/linux/generic/wordsize-32/lseek.c create mode 100644 sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat.c create mode 100644 sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat64.c create mode 100644 sysdeps/unix/sysv/linux/generic/wordsize-32/mmap.c create mode 100644 sysdeps/unix/sysv/linux/generic/wordsize-32/overflow.h create mode 100644 sysdeps/unix/sysv/linux/generic/wordsize-32/posix_fadvise.c create mode 100644 sysdeps/unix/sysv/linux/generic/wordsize-32/pread.c create mode 100644 sysdeps/unix/sysv/linux/generic/wordsize-32/pread64.c create mode 100644 sysdeps/unix/sysv/linux/generic/wordsize-32/preadv.c create mode 100644 sysdeps/unix/sysv/linux/generic/wordsize-32/preadv64.c create mode 100644 sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite.c create mode 100644 sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite64.c create mode 100644 sysdeps/unix/sysv/linux/generic/wordsize-32/pwritev.c create mode 100644 sysdeps/unix/sysv/linux/generic/wordsize-32/pwritev64.c create mode 100644 sysdeps/unix/sysv/linux/generic/wordsize-32/sendfile.c create mode 100644 sysdeps/unix/sysv/linux/generic/wordsize-32/statfs.c create mode 100644 sysdeps/unix/sysv/linux/generic/wordsize-32/syscalls.list create mode 100644 sysdeps/unix/sysv/linux/generic/wordsize-32/truncate.c create mode 100644 sysdeps/unix/sysv/linux/generic/wordsize-32/truncate64.c create mode 100644 sysdeps/unix/sysv/linux/generic/wordsize-32/xstat.c create mode 100644 sysdeps/unix/sysv/linux/generic/wordsize-32/xstat64.c create mode 100644 sysdeps/unix/sysv/linux/generic/xmknod.c create mode 100644 sysdeps/unix/sysv/linux/generic/xstat.c diff --git a/ChangeLog.linux-generic b/ChangeLog.linux-generic new file mode 100644 index 0000000000..30ca51d6ac --- /dev/null +++ b/ChangeLog.linux-generic @@ -0,0 +1,80 @@ +2011-12-03 Chris Metcalf + + * sysdeps/unix/sysv/linux/generic/Makefile: New file. + * sysdeps/unix/sysv/linux/generic/____longjmp_chk.c: New file. + * sysdeps/unix/sysv/linux/generic/access.c: New file. + * sysdeps/unix/sysv/linux/generic/bits/fcntl.h: New file. + * sysdeps/unix/sysv/linux/generic/bits/sem.h: New file. + * sysdeps/unix/sysv/linux/generic/bits/stat.h: New file. + * sysdeps/unix/sysv/linux/generic/bits/statfs.h: New file. + * sysdeps/unix/sysv/linux/generic/bits/typesizes.h: New file. + * sysdeps/unix/sysv/linux/generic/brk.c: New file. + * sysdeps/unix/sysv/linux/generic/chmod.c: New file. + * sysdeps/unix/sysv/linux/generic/chown.c: New file. + * sysdeps/unix/sysv/linux/generic/creat.c: New file. + * sysdeps/unix/sysv/linux/generic/dl-origin.c: New file. + * sysdeps/unix/sysv/linux/generic/dup2.c: New file. + * sysdeps/unix/sysv/linux/generic/epoll_create.c: New file. + * sysdeps/unix/sysv/linux/generic/epoll_wait.c: New file. + * sysdeps/unix/sysv/linux/generic/futimesat.c: New file. + * sysdeps/unix/sysv/linux/generic/getdents.c: New file. + * sysdeps/unix/sysv/linux/generic/getdents64.c: New file. + * sysdeps/unix/sysv/linux/generic/inotify_init.c: New file. + * sysdeps/unix/sysv/linux/generic/kernel_stat.h: New file. + * sysdeps/unix/sysv/linux/generic/lchown.c: New file. + * sysdeps/unix/sysv/linux/generic/link.c: New file. + * sysdeps/unix/sysv/linux/generic/lxstat.c: New file. + * sysdeps/unix/sysv/linux/generic/mkdir.c: New file. + * sysdeps/unix/sysv/linux/generic/nptl/not-cancel.h: New file. + * sysdeps/unix/sysv/linux/generic/open.c: New file. + * sysdeps/unix/sysv/linux/generic/open64.c: New file. + * sysdeps/unix/sysv/linux/generic/pause.c: New file. + * sysdeps/unix/sysv/linux/generic/pipe.c: New file. + * sysdeps/unix/sysv/linux/generic/poll.c: New file. + * sysdeps/unix/sysv/linux/generic/readlink.c: New file. + * sysdeps/unix/sysv/linux/generic/readlink_chk.c: New file. + * sysdeps/unix/sysv/linux/generic/recv.c: New file. + * sysdeps/unix/sysv/linux/generic/rename.c: New file. + * sysdeps/unix/sysv/linux/generic/rmdir.c: New file. + * sysdeps/unix/sysv/linux/generic/select.c: New file. + * sysdeps/unix/sysv/linux/generic/send.c: New file. + * sysdeps/unix/sysv/linux/generic/symlink.c: New file. + * sysdeps/unix/sysv/linux/generic/syscalls.list: New file. + * sysdeps/unix/sysv/linux/generic/sysctl.c: New file. + * sysdeps/unix/sysv/linux/generic/sysdep.h: New file. + * sysdeps/unix/sysv/linux/generic/umount.c: New file. + * sysdeps/unix/sysv/linux/generic/unlink.c: New file. + * sysdeps/unix/sysv/linux/generic/ustat.c: New file. + * sysdeps/unix/sysv/linux/generic/utimes.c: New file. + * sysdeps/unix/sysv/linux/generic/wordsize-32/Versions: New file. + * sysdeps/unix/sysv/linux/generic/wordsize-32/fcntl.c: New file. + * sysdeps/unix/sysv/linux/generic/wordsize-32/fstatfs.c: New file. + * sysdeps/unix/sysv/linux/generic/wordsize-32/ftruncate.c: New file. + * sysdeps/unix/sysv/linux/generic/wordsize-32/ftruncate64.c: New file. + * sysdeps/unix/sysv/linux/generic/wordsize-32/fxstat.c: New file. + * sysdeps/unix/sysv/linux/generic/wordsize-32/fxstatat.c: New file. + * sysdeps/unix/sysv/linux/generic/wordsize-32/getdents.c: New file. + * sysdeps/unix/sysv/linux/generic/wordsize-32/llseek.c: New file. + * sysdeps/unix/sysv/linux/generic/wordsize-32/lseek.c: New file. + * sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat.c: New file. + * sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat64.c: New file. + * sysdeps/unix/sysv/linux/generic/wordsize-32/mmap.c: New file. + * sysdeps/unix/sysv/linux/generic/wordsize-32/overflow.h: New file. + * sysdeps/unix/sysv/linux/generic/wordsize-32/posix_fadvise.c: New file. + * sysdeps/unix/sysv/linux/generic/wordsize-32/pread.c: New file. + * sysdeps/unix/sysv/linux/generic/wordsize-32/pread64.c: New file. + * sysdeps/unix/sysv/linux/generic/wordsize-32/preadv.c: New file. + * sysdeps/unix/sysv/linux/generic/wordsize-32/preadv64.c: New file. + * sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite.c: New file. + * sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite64.c: New file. + * sysdeps/unix/sysv/linux/generic/wordsize-32/pwritev.c: New file. + * sysdeps/unix/sysv/linux/generic/wordsize-32/pwritev64.c: New file. + * sysdeps/unix/sysv/linux/generic/wordsize-32/sendfile.c: New file. + * sysdeps/unix/sysv/linux/generic/wordsize-32/statfs.c: New file. + * sysdeps/unix/sysv/linux/generic/wordsize-32/syscalls.list: New file. + * sysdeps/unix/sysv/linux/generic/wordsize-32/truncate.c: New file. + * sysdeps/unix/sysv/linux/generic/wordsize-32/truncate64.c: New file. + * sysdeps/unix/sysv/linux/generic/wordsize-32/xstat.c: New file. + * sysdeps/unix/sysv/linux/generic/wordsize-32/xstat64.c: New file. + * sysdeps/unix/sysv/linux/generic/xmknod.c: New file. + * sysdeps/unix/sysv/linux/generic/xstat.c: New file. diff --git a/sysdeps/unix/sysv/linux/generic/Makefile b/sysdeps/unix/sysv/linux/generic/Makefile new file mode 100644 index 0000000000..c1daee2396 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/Makefile @@ -0,0 +1,3 @@ +ifeq ($(subdir),misc) +sysdep_routines += epoll_create epoll_wait inotify_init +endif diff --git a/sysdeps/unix/sysv/linux/generic/____longjmp_chk.c b/sysdeps/unix/sysv/linux/generic/____longjmp_chk.c new file mode 100644 index 0000000000..62b7905aed --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/____longjmp_chk.c @@ -0,0 +1,58 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include +#include +#include +#include + +#ifdef _STACK_GROWS_DOWN +#define called_from(this, saved) ((this) < (saved)) +#else +#define called_from(this, saved) ((this) > (saved)) +#endif + +extern void ____longjmp_chk (__jmp_buf __env, int __val) + __attribute__ ((__noreturn__)); + +void ____longjmp_chk (__jmp_buf env, int val) +{ + void *this_frame = __builtin_frame_address (0); + void *saved_frame = JB_FRAME_ADDRESS (env); + INTERNAL_SYSCALL_DECL (err); + stack_t ss; + + /* If "env" is from a frame that called us, we're all set. */ + if (called_from(this_frame, saved_frame)) + __longjmp (env, val); + + /* If we can't get the current stack state, give up and do the longjmp. */ + if (INTERNAL_SYSCALL (sigaltstack, err, 2, NULL, &ss) != 0) + __longjmp (env, val); + + /* If we we are executing on the alternate stack and within the + bounds, do the longjmp. */ + if (ss.ss_flags == SS_ONSTACK && + (this_frame >= ss.ss_sp && this_frame < (ss.ss_sp + ss.ss_size))) + __longjmp (env, val); + + __fortify_fail ("longjmp causes uninitialized stack frame"); +} diff --git a/sysdeps/unix/sysv/linux/generic/access.c b/sysdeps/unix/sysv/linux/generic/access.c new file mode 100644 index 0000000000..96b1cd0955 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/access.c @@ -0,0 +1,32 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include +#include +#include + +/* Test for access to FILE. */ +int +__access (const char *file, int type) +{ + return INLINE_SYSCALL (faccessat, 3, AT_FDCWD, file, type); +} +weak_alias (__access, access) diff --git a/sysdeps/unix/sysv/linux/generic/bits/fcntl.h b/sysdeps/unix/sysv/linux/generic/bits/fcntl.h new file mode 100644 index 0000000000..cbea2a435c --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/bits/fcntl.h @@ -0,0 +1,340 @@ +/* O_*, F_*, FD_* bit values for the generic Linux ABI. + Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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 _FCNTL_H +# error "Never use directly; include instead." +#endif + +#include +#include +#ifdef __USE_GNU +# include +#endif + + +/* open/fcntl - O_SYNC is only implemented on blocks devices and on files + located on a few file systems. */ +#define O_ACCMODE 0003 +#define O_RDONLY 00 +#define O_WRONLY 01 +#define O_RDWR 02 +#define O_CREAT 0100 /* not fcntl */ +#define O_EXCL 0200 /* not fcntl */ +#define O_NOCTTY 0400 /* not fcntl */ +#define O_TRUNC 01000 /* not fcntl */ +#define O_APPEND 02000 +#define O_NONBLOCK 04000 +#define O_NDELAY O_NONBLOCK +#define O_SYNC 04010000 +#define O_FSYNC O_SYNC +#define O_ASYNC 020000 + +#ifdef __USE_XOPEN2K8 +# define O_DIRECTORY 0200000 /* Must be a directory. */ +# define O_NOFOLLOW 0400000 /* Do not follow links. */ +# define O_CLOEXEC 02000000 /* Set close_on_exec. */ +#endif +#ifdef __USE_GNU +# define O_DIRECT 040000 /* Direct disk access. */ +# define O_NOATIME 01000000 /* Do not set atime. */ +# define O_PATH 010000000 /* Resolve pathname but do not open file. */ +#endif + +/* For now Linux has synchronisity options for data and read operations. + We define the symbols here but let them do the same as O_SYNC since + this is a superset. */ +#if defined __USE_POSIX199309 || defined __USE_UNIX98 +# define O_DSYNC 010000 /* Synchronize data. */ +# define O_RSYNC O_SYNC /* Synchronize read operations. */ +#endif + +#ifdef __USE_LARGEFILE64 +# if __WORDSIZE == 64 +# define O_LARGEFILE 0 +# else +# define O_LARGEFILE 0100000 +# endif +#endif + +/* Values for the second argument to `fcntl'. */ +#define F_DUPFD 0 /* Duplicate file descriptor. */ +#define F_GETFD 1 /* Get file descriptor flags. */ +#define F_SETFD 2 /* Set file descriptor flags. */ +#define F_GETFL 3 /* Get file status flags. */ +#define F_SETFL 4 /* Set file status flags. */ +#if __WORDSIZE == 64 +# define F_GETLK 5 /* Get record locking info. */ +# define F_SETLK 6 /* Set record locking info (non-blocking). */ +# define F_SETLKW 7 /* Set record locking info (blocking). */ +/* Not necessary, we always have 64-bit offsets. */ +# define F_GETLK64 5 /* Get record locking info. */ +# define F_SETLK64 6 /* Set record locking info (non-blocking). */ +# define F_SETLKW64 7 /* Set record locking info (blocking). */ +#else +# ifndef __USE_FILE_OFFSET64 +# define F_GETLK 5 /* Get record locking info. */ +# define F_SETLK 6 /* Set record locking info (non-blocking). */ +# define F_SETLKW 7 /* Set record locking info (blocking). */ +# else +# define F_GETLK F_GETLK64 /* Get record locking info. */ +# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/ +# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */ +# endif +# define F_GETLK64 12 /* Get record locking info. */ +# define F_SETLK64 13 /* Set record locking info (non-blocking). */ +# define F_SETLKW64 14 /* Set record locking info (blocking). */ +#endif + +#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K8 +# define F_SETOWN 8 /* Get owner (process receiving SIGIO). */ +# define F_GETOWN 9 /* Set owner (process receiving SIGIO). */ +#endif + +#ifdef __USE_GNU +# define F_SETSIG 10 /* Set number of signal to be sent. */ +# define F_GETSIG 11 /* Get number of signal to be sent. */ +# define F_SETOWN_EX 15 /* Get owner (thread receiving SIGIO). */ +# define F_GETOWN_EX 16 /* Set owner (thread receiving SIGIO). */ +#endif + +#ifdef __USE_GNU +# 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_SETPIPE_SZ 1031 /* Set pipe page size array. */ +# define F_GETPIPE_SZ 1032 /* Set pipe page size array. */ +#endif +#ifdef __USE_XOPEN2K8 +# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with + close-on-exit set. */ +#endif + +/* 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(). */ +#define F_RDLCK 0 /* Read lock. */ +#define F_WRLCK 1 /* Write lock. */ +#define F_UNLCK 2 /* Remove lock. */ + +/* For old implementation of bsd flock(). */ +#define F_EXLCK 4 /* or 3 */ +#define F_SHLCK 8 /* or 4 */ + +#ifdef __USE_BSD +/* Operations for bsd flock(), also used by the kernel implementation. */ +# define LOCK_SH 1 /* shared lock */ +# define LOCK_EX 2 /* exclusive lock */ +# define LOCK_NB 4 /* or'd with one of the above to prevent + blocking */ +# define LOCK_UN 8 /* remove lock */ +#endif + +#ifdef __USE_GNU +# define LOCK_MAND 32 /* This is a mandatory flock: */ +# define LOCK_READ 64 /* ... which allows concurrent read operations. */ +# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */ +# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */ +#endif + +#ifdef __USE_GNU +/* Types of directory notifications that may be requested with F_NOTIFY. */ +# define DN_ACCESS 0x00000001 /* File accessed. */ +# define DN_MODIFY 0x00000002 /* File modified. */ +# define DN_CREATE 0x00000004 /* File created. */ +# define DN_DELETE 0x00000008 /* File removed. */ +# define DN_RENAME 0x00000010 /* File renamed. */ +# define DN_ATTRIB 0x00000020 /* File changed attibutes. */ +# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */ +#endif + +struct flock + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ +#ifndef __USE_FILE_OFFSET64 + __off_t l_start; /* Offset where the lock begins. */ + __off_t l_len; /* Size of the locked area; zero means until EOF. */ +#else + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ +#endif + __pid_t l_pid; /* Process holding the lock. */ + }; + +#ifdef __USE_LARGEFILE64 +struct flock64 + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ + __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. */ + }; +#endif + +#ifdef __USE_GNU +/* Owner types. */ +enum __pid_type + { + F_OWNER_TID = 0, /* Kernel thread. */ + F_OWNER_PID, /* Process. */ + F_OWNER_PGRP, /* Process group. */ + F_OWNER_GID = F_OWNER_PGRP /* Alternative, obsolete name. */ + }; + +/* Structure to use with F_GETOWN_EX and F_SETOWN_EX. */ +struct f_owner_ex + { + enum __pid_type type; /* Owner type of ID. */ + __pid_t pid; /* ID of owner. */ + }; +#endif + +/* Define some more compatibility macros to be backward compatible with + BSD systems which did not managed to hide these kernel macros. */ +#ifdef __USE_BSD +# define FAPPEND O_APPEND +# define FFSYNC O_FSYNC +# define FASYNC O_ASYNC +# define FNONBLOCK O_NONBLOCK +# define FNDELAY O_NDELAY +#endif /* Use BSD. */ + +/* Advise to `posix_fadvise'. */ +#ifdef __USE_XOPEN2K +# define POSIX_FADV_NORMAL 0 /* No further special treatment. */ +# define POSIX_FADV_RANDOM 1 /* Expect random page references. */ +# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */ +# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */ +# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ +#endif + + +#ifdef __USE_GNU +/* 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. */ +# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those + dirty pages in the range which are + not presently under writeback. */ +# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in + the range after performing the + write. */ + +/* 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. */ + + +/* File handle structure. */ +struct file_handle +{ + unsigned int handle_bytes; + int handle_type; + /* File identifier. */ + unsigned char f_handle[0]; +}; + +/* Maximum handle size (for now). */ +# define MAX_HANDLE_SZ 128 +#endif + +__BEGIN_DECLS + +#ifdef __USE_GNU + +/* Provide kernel hint to read ahead. */ +extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count) + __THROW; + + +/* Selective file content synch'ing. + + This function is a possible cancellation point and therefore not + marked with __THROW. */ +extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count, + unsigned int __flags); + + +/* Splice address range into a pipe. + + This function is a possible cancellation point and therefore not + marked with __THROW. */ +extern ssize_t vmsplice (int __fdout, const struct iovec *__iov, + size_t __count, unsigned int __flags); + +/* Splice two files together. + + This function is a possible cancellation point and therefore not + marked with __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. + + This function is a possible cancellation point and therefore not + marked with __THROW. */ +extern ssize_t tee (int __fdin, int __fdout, size_t __len, + unsigned int __flags); + +/* Reserve storage for the data of the file associated with FD. + + This function is a possible cancellation point and therefore not + marked with __THROW. */ +# ifndef __USE_FILE_OFFSET64 +extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len); +# else +# ifdef __REDIRECT +extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset, + __off64_t __len), + fallocate64); +# else +# define fallocate fallocate64 +# endif +# endif +# ifdef __USE_LARGEFILE64 +extern int fallocate64 (int __fd, int __mode, __off64_t __offset, + __off64_t __len); +# endif + + +/* Map file name to file handle. */ +extern int name_to_handle_at (int __dfd, const char *__name, + struct file_handle *__handle, int *__mnt_id, + int __flags) __THROW; + +/* Open file using the file handle. + + This function is a possible cancellation point and therefore not + marked with __THROW. */ +extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle, + int __flags); + +#endif /* use GNU */ + +__END_DECLS diff --git a/sysdeps/unix/sysv/linux/generic/bits/sem.h b/sysdeps/unix/sysv/linux/generic/bits/sem.h new file mode 100644 index 0000000000..bfb87dbef4 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/bits/sem.h @@ -0,0 +1,93 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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 _SYS_SEM_H +# error "Never include directly; use instead." +#endif + +#include +#include + +/* Flags for `semop'. */ +#define SEM_UNDO 0x1000 /* undo the operation on exit */ + +/* Commands for `semctl'. */ +#define GETPID 11 /* get sempid */ +#define GETVAL 12 /* get semval */ +#define GETALL 13 /* get all semval's */ +#define GETNCNT 14 /* get semncnt */ +#define GETZCNT 15 /* get semzcnt */ +#define SETVAL 16 /* set semval */ +#define SETALL 17 /* set all semval's */ + + +/* Data structure describing a set of semaphores. */ +struct semid_ds +{ + struct ipc_perm sem_perm; /* operation permission struct */ + __time_t sem_otime; /* last semop() time */ +#if __WORDSIZE == 32 + unsigned long int __unused1; +#endif + __time_t sem_ctime; /* last time changed by semctl() */ +#if __WORDSIZE == 32 + unsigned long int __unused2; +#endif + unsigned long int sem_nsems; /* number of semaphores in set */ + unsigned long int __unused3; + unsigned long int __unused4; +}; + +/* The user should define a union like the following to use it for arguments + for `semctl'. + + union semun + { + int val; <= value for SETVAL + struct semid_ds *buf; <= buffer for IPC_STAT & IPC_SET + unsigned short int *array; <= array for GETALL & SETALL + struct seminfo *__buf; <= buffer for IPC_INFO + }; + + Previous versions of this file used to define this union but this is + incorrect. One can test the macro _SEM_SEMUN_UNDEFINED to see whether + one must define the union or not. */ +#define _SEM_SEMUN_UNDEFINED 1 + +#ifdef __USE_MISC + +/* ipcs ctl cmds */ +# define SEM_STAT 18 +# define SEM_INFO 19 + +struct seminfo +{ + int semmap; + int semmni; + int semmns; + int semmnu; + int semmsl; + int semopm; + int semume; + int semusz; + int semvmx; + int semaem; +}; + +#endif /* __USE_MISC */ diff --git a/sysdeps/unix/sysv/linux/generic/bits/stat.h b/sysdeps/unix/sysv/linux/generic/bits/stat.h new file mode 100644 index 0000000000..d3cec6ff3e --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/bits/stat.h @@ -0,0 +1,172 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#if !defined _SYS_STAT_H && !defined _FCNTL_H +# error "Never include directly; use instead." +#endif + +#ifndef _BITS_STAT_H +#define _BITS_STAT_H 1 + +#include +#include + +/* 64-bit libc uses the kernel's 'struct stat', accessed via the + stat() syscall; 32-bit libc uses the kernel's 'struct stat64' + and accesses it via the stat64() syscall. All the various + APIs offered by libc use the kernel shape for their struct stat + structure; the only difference is that 32-bit programs not + using __USE_FILE_OFFSET64 only see the low 32 bits of some + of the fields (specifically st_ino, st_size, and st_blocks). */ +#define _STAT_VER_KERNEL 0 +#define _STAT_VER_LINUX 0 +#define _STAT_VER _STAT_VER_KERNEL + +/* Versions of the `xmknod' interface. */ +#define _MKNOD_VER_LINUX 0 + +#if defined __USE_FILE_OFFSET64 +# define __field64(type, type64, name) type64 name +#elif __WORDSIZE == 64 +# define __field64(type, type64, name) type name +#elif __BYTE_ORDER == __LITTLE_ENDIAN +# define __field64(type, type64, name) \ + type name __attribute__((aligned(8))); int __##name##_pad +#else +# define __field64(type, type64, name) \ + int __##name##_pad __attribute__((aligned(8))); type name +#endif + +struct stat + { + __dev_t st_dev; /* Device. */ + __field64(__ino_t, __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. */ + __dev_t __pad1; + __field64(__off_t, __off64_t, st_size); /* Size of file, in bytes. */ + __blksize_t st_blksize; /* Optimal block size for I/O. */ + int __pad2; + __field64(__blkcnt_t, __blkcnt64_t, st_blocks); /* 512-byte blocks */ +#ifdef __USE_MISC + /* 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 + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +#else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +#endif + int __unused[2]; + }; + +#undef __field64 + +#ifdef __USE_LARGEFILE64 +struct stat64 + { + __dev_t st_dev; /* Device. */ + __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. */ + __dev_t __pad1; + __off64_t st_size; /* Size of file, in bytes. */ + __blksize_t st_blksize; /* Optimal block size for I/O. */ + int __pad2; + __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */ +#ifdef __USE_MISC + /* 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 + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +#else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +#endif + int __unused[2]; + }; +#endif + +/* Tell code we have these members. */ +#define _STATBUF_ST_BLKSIZE +#define _STATBUF_ST_RDEV +/* Nanosecond resolution time values are supported. */ +#define _STATBUF_ST_NSEC + +/* Encoding of the file mode. */ + +#define __S_IFMT 0170000 /* These bits determine file type. */ + +/* File types. */ +#define __S_IFDIR 0040000 /* Directory. */ +#define __S_IFCHR 0020000 /* Character device. */ +#define __S_IFBLK 0060000 /* Block device. */ +#define __S_IFREG 0100000 /* Regular file. */ +#define __S_IFIFO 0010000 /* FIFO. */ +#define __S_IFLNK 0120000 /* Symbolic link. */ +#define __S_IFSOCK 0140000 /* Socket. */ + +/* POSIX.1b objects. Note that these macros always evaluate to zero. But + they do it by enforcing the correct use of the macros. */ +#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode) + +/* Protection bits. */ + +#define __S_ISUID 04000 /* Set user ID on execution. */ +#define __S_ISGID 02000 /* Set group ID on execution. */ +#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ +#define __S_IREAD 0400 /* Read by owner. */ +#define __S_IWRITE 0200 /* Write by owner. */ +#define __S_IEXEC 0100 /* Execute by owner. */ + +#ifdef __USE_ATFILE +# define UTIME_NOW ((1l << 30) - 1l) +# define UTIME_OMIT ((1l << 30) - 2l) +#endif + +#endif /* bits/stat.h */ diff --git a/sysdeps/unix/sysv/linux/generic/bits/statfs.h b/sysdeps/unix/sysv/linux/generic/bits/statfs.h new file mode 100644 index 0000000000..bde1958a9e --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/bits/statfs.h @@ -0,0 +1,87 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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 _SYS_STATFS_H +# error "Never include directly; use instead." +#endif + +#include +#include +#include + +/* 64-bit libc uses the kernel's 'struct statfs', accessed via the + statfs() syscall; 32-bit libc uses the kernel's 'struct statfs64' + and accesses it via the statfs64() syscall. All the various + APIs offered by libc use the kernel shape for their struct statfs + structure; the only difference is that 32-bit programs not + using __USE_FILE_OFFSET64 only see the low 32 bits of some + of the fields (the __fsblkcnt_t and __fsfilcnt_t fields). */ + +#if defined __USE_FILE_OFFSET64 +# define __field64(type, type64, name) type64 name +#elif __WORDSIZE == 64 +# define __field64(type, type64, name) type name +#elif __BYTE_ORDER == __LITTLE_ENDIAN +# define __field64(type, type64, name) \ + type name __attribute__((aligned(8))); int __##name##_pad +#else +# define __field64(type, type64, name) \ + int __##name##_pad __attribute__((aligned(8))); type name +#endif + +struct statfs + { + __SWORD_TYPE f_type; + __SWORD_TYPE f_bsize; + __field64(__fsblkcnt_t, __fsblkcnt64_t, f_blocks); + __field64(__fsblkcnt_t, __fsblkcnt64_t, f_bfree); + __field64(__fsblkcnt_t, __fsblkcnt64_t, f_bavail); + __field64(__fsfilcnt_t, __fsfilcnt64_t, f_files); + __field64(__fsfilcnt_t, __fsfilcnt64_t, f_ffree); + __fsid_t f_fsid; + __SWORD_TYPE f_namelen; + __SWORD_TYPE f_frsize; + __SWORD_TYPE f_flags; + __SWORD_TYPE f_spare[4]; + } __attribute__((aligned(8))); + +#undef __field64 + +#ifdef __USE_LARGEFILE64 +struct statfs64 + { + __SWORD_TYPE f_type; + __SWORD_TYPE f_bsize; + __fsblkcnt64_t f_blocks; + __fsblkcnt64_t f_bfree; + __fsblkcnt64_t f_bavail; + __fsfilcnt64_t f_files; + __fsfilcnt64_t f_ffree; + __fsid_t f_fsid; + __SWORD_TYPE f_namelen; + __SWORD_TYPE f_frsize; + __SWORD_TYPE f_flags; + __SWORD_TYPE f_spare[4]; + } __attribute__((aligned(8))); +#endif + +/* Tell code we have these members. */ +#define _STATFS_F_NAMELEN +#define _STATFS_F_FRSIZE +#define _STATFS_F_FLAGS diff --git a/sysdeps/unix/sysv/linux/generic/bits/typesizes.h b/sysdeps/unix/sysv/linux/generic/bits/typesizes.h new file mode 100644 index 0000000000..9ff568d933 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/bits/typesizes.h @@ -0,0 +1,67 @@ +/* bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI. + Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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 directly; use instead." +#endif + +#ifndef _BITS_TYPESIZES_H +#define _BITS_TYPESIZES_H 1 + +/* See for the meaning of these macros. This file exists so + that 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 __SLONGWORD_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 __S32_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 */ diff --git a/sysdeps/unix/sysv/linux/generic/brk.c b/sysdeps/unix/sysv/linux/generic/brk.c new file mode 100644 index 0000000000..eb2bc6b9d5 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/brk.c @@ -0,0 +1,46 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include + +/* This must be initialized data because commons can't have aliases. */ +void *__curbrk = 0; + +/* Old braindamage in GCC's crtstuff.c requires this symbol in an attempt + to work around different old braindamage in the old Linux ELF dynamic + linker. */ +weak_alias (__curbrk, ___brk_addr) + +int +__brk (void *addr) +{ + INTERNAL_SYSCALL_DECL (err); + + __curbrk = (void *) INTERNAL_SYSCALL (brk, err, 1, addr); + if (__curbrk < addr) + { + __set_errno (ENOMEM); + return -1; + } + + return 0; +} +weak_alias (__brk, brk) diff --git a/sysdeps/unix/sysv/linux/generic/chmod.c b/sysdeps/unix/sysv/linux/generic/chmod.c new file mode 100644 index 0000000000..96e5641c89 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/chmod.c @@ -0,0 +1,32 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include +#include +#include + +/* Change the protections of FILE to MODE. */ +int +__chmod (const char *file, mode_t mode) +{ + return INLINE_SYSCALL (fchmodat, 3, AT_FDCWD, file, mode); +} +weak_alias (__chmod, chmod) diff --git a/sysdeps/unix/sysv/linux/generic/chown.c b/sysdeps/unix/sysv/linux/generic/chown.c new file mode 100644 index 0000000000..6ec0263f6d --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/chown.c @@ -0,0 +1,33 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include +#include +#include + +/* Change the owner and group of FILE. */ +int +__chown (const char *file, uid_t owner, gid_t group) +{ + return INLINE_SYSCALL (fchownat, 5, AT_FDCWD, file, owner, group, 0); +} +libc_hidden_def (__chown) +weak_alias (__chown, chown) diff --git a/sysdeps/unix/sysv/linux/generic/creat.c b/sysdeps/unix/sysv/linux/generic/creat.c new file mode 100644 index 0000000000..8ef5c03763 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/creat.c @@ -0,0 +1,39 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include + +#undef creat + +/* Create FILE with protections MODE. */ +int +__libc_creat (const char *file, mode_t mode) +{ + return __open (file, O_WRONLY | O_CREAT | O_TRUNC, mode); +} +weak_alias (__libc_creat, creat) + +/* __open handles cancellation. */ +LIBC_CANCEL_HANDLED (); + +#if __WORDSIZE == 64 +weak_alias (__libc_creat, creat64) +#endif diff --git a/sysdeps/unix/sysv/linux/generic/dl-origin.c b/sysdeps/unix/sysv/linux/generic/dl-origin.c new file mode 100644 index 0000000000..46bbbb1180 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/dl-origin.c @@ -0,0 +1,82 @@ +/* Find path of executable. + Copyright (C) 1998, 1999, 2000, 2002, 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1998. + + 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. */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +/* On Linux >= 2.1 systems which have the dcache implementation we can get + the path of the application from the /proc/self/exe symlink. Try this + first and fall back on the generic method if necessary. */ + +const char * +_dl_get_origin (void) +{ + char linkval[PATH_MAX]; + char *result; + int len; + INTERNAL_SYSCALL_DECL (err); + + len = INTERNAL_SYSCALL (readlinkat, err, 4, AT_FDCWD, "/proc/self/exe", + linkval, sizeof (linkval)); + if (! INTERNAL_SYSCALL_ERROR_P (len, err) && len > 0 && linkval[0] != '[') + { + /* We can use this value. */ + assert (linkval[0] == '/'); + while (len > 1 && linkval[len - 1] != '/') + --len; + result = (char *) malloc (len + 1); + if (result == NULL) + result = (char *) -1; + else if (len == 1) + memcpy (result, "/", 2); + else + *((char *) __mempcpy (result, linkval, len - 1)) = '\0'; + } + else + { + result = (char *) -1; + /* We use the environment variable LD_ORIGIN_PATH. If it is set make + a copy and strip out trailing slashes. */ + if (GLRO(dl_origin_path) != NULL) + { + size_t len = strlen (GLRO(dl_origin_path)); + result = (char *) malloc (len + 1); + if (result == NULL) + result = (char *) -1; + else + { + char *cp = __mempcpy (result, GLRO(dl_origin_path), len); + while (cp > result + 1 && cp[-1] == '/') + --cp; + *cp = '\0'; + } + } + } + + return result; +} diff --git a/sysdeps/unix/sysv/linux/generic/dup2.c b/sysdeps/unix/sysv/linux/generic/dup2.c new file mode 100644 index 0000000000..4562f19adf --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/dup2.c @@ -0,0 +1,38 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include +#include + +/* Duplicate FD to FD2, closing the old FD2 and making FD2 be + open the same file as FD is. Return FD2 or -1. */ +int +__dup2 (int fd, int fd2) +{ + /* For the degenerate case, check if the fd is valid (by trying to + get the file status flags) and return it, or else return EBADF. */ + if (fd == fd2) + return __libc_fcntl (fd, F_GETFL, 0) < 0 ? -1 : fd; + + return INLINE_SYSCALL (dup3, 3, fd, fd2, 0); +} +libc_hidden_def (__dup2) +weak_alias (__dup2, dup2) diff --git a/sysdeps/unix/sysv/linux/generic/epoll_create.c b/sysdeps/unix/sysv/linux/generic/epoll_create.c new file mode 100644 index 0000000000..ab6b158a76 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/epoll_create.c @@ -0,0 +1,39 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include +#include +#include + +libc_hidden_proto (epoll_create) + +int +epoll_create (int size) +{ + if (size <= 0) + { + __set_errno (EINVAL); + return -1; + } + + return INLINE_SYSCALL (epoll_create1, 1, 0); +} +libc_hidden_def (epoll_create) diff --git a/sysdeps/unix/sysv/linux/generic/epoll_wait.c b/sysdeps/unix/sysv/linux/generic/epoll_wait.c new file mode 100644 index 0000000000..eda64bc946 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/epoll_wait.c @@ -0,0 +1,31 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include +#include + +libc_hidden_proto (epoll_pwait) + +int +epoll_wait (int epfd, struct epoll_event *events, int maxevents, int timeout) +{ + return epoll_pwait (epfd, events, maxevents, timeout, NULL); +} diff --git a/sysdeps/unix/sysv/linux/generic/futimesat.c b/sysdeps/unix/sysv/linux/generic/futimesat.c new file mode 100644 index 0000000000..20153661c0 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/futimesat.c @@ -0,0 +1,53 @@ +/* Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +/* Change the access time of FILE relative to FD to TVP[0] and + the modification time of FILE to TVP[1]. */ +int +futimesat (int fd, const char *file, const struct timeval tvp[2]) +{ + struct timespec tsp[2]; + int result; + + if (tvp) + { + if (tvp[0].tv_usec >= 1000000 || tvp[0].tv_usec < 0 || + tvp[1].tv_usec >= 1000000 || tvp[1].tv_usec < 0) + { + __set_errno (EINVAL); + return -1; + } + TIMEVAL_TO_TIMESPEC (&tvp[0], &tsp[0]); + TIMEVAL_TO_TIMESPEC (&tvp[1], &tsp[1]); + } + + result = INLINE_SYSCALL (utimensat, 4, fd, file, tvp ? tsp : NULL, 0); + return result; +} diff --git a/sysdeps/unix/sysv/linux/generic/getdents.c b/sysdeps/unix/sysv/linux/generic/getdents.c new file mode 100644 index 0000000000..14dbbc71a0 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/getdents.c @@ -0,0 +1 @@ +/* Defined in getdents64.c */ diff --git a/sysdeps/unix/sysv/linux/generic/getdents64.c b/sysdeps/unix/sysv/linux/generic/getdents64.c new file mode 100644 index 0000000000..9a01f4bf6b --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/getdents64.c @@ -0,0 +1,38 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include +#include +#include + +#include +#include + +/* The kernel struct linux_dirent64 matches the 'struct getdents64' type. */ +ssize_t +__getdents64 (int fd, char *buf, size_t nbytes) +{ + return INLINE_SYSCALL (getdents64, 3, fd, buf, nbytes); +} + +#if __WORDSIZE == 64 +strong_alias (__getdents64, __getdents) +#endif diff --git a/sysdeps/unix/sysv/linux/generic/inotify_init.c b/sysdeps/unix/sysv/linux/generic/inotify_init.c new file mode 100644 index 0000000000..84c0b357e4 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/inotify_init.c @@ -0,0 +1,33 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include +#include +#include + +libc_hidden_proto (inotify_init) + +int +inotify_init (void) +{ + return INLINE_SYSCALL (inotify_init1, 1, 0); +} +libc_hidden_def (inotify_init) diff --git a/sysdeps/unix/sysv/linux/generic/kernel_stat.h b/sysdeps/unix/sysv/linux/generic/kernel_stat.h new file mode 100644 index 0000000000..7343d83f64 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/kernel_stat.h @@ -0,0 +1,27 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include + +#define STAT_IS_KERNEL_STAT 1 + +/* We provide separate 32-bit API versions that check for EOVERFLOW. */ +#if __WORDSIZE == 64 +# define XSTAT_IS_XSTAT64 1 +#endif diff --git a/sysdeps/unix/sysv/linux/generic/lchown.c b/sysdeps/unix/sysv/linux/generic/lchown.c new file mode 100644 index 0000000000..a35ef951c9 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/lchown.c @@ -0,0 +1,33 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include +#include +#include + +/* Change the owner and group of FILE. */ +int +__lchown (const char *file, uid_t owner, gid_t group) +{ + return INLINE_SYSCALL (fchownat, 5, AT_FDCWD, file, owner, group, + AT_SYMLINK_NOFOLLOW); +} +weak_alias (__lchown, lchown) diff --git a/sysdeps/unix/sysv/linux/generic/link.c b/sysdeps/unix/sysv/linux/generic/link.c new file mode 100644 index 0000000000..bab52d1da0 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/link.c @@ -0,0 +1,32 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include +#include + +/* Make a link to FROM called TO. */ +int +__link (const char *from, const char *to) +{ + return INLINE_SYSCALL (linkat, 5, AT_FDCWD, from, AT_FDCWD, to, 0); +} + +weak_alias (__link, link) diff --git a/sysdeps/unix/sysv/linux/generic/lxstat.c b/sysdeps/unix/sysv/linux/generic/lxstat.c new file mode 100644 index 0000000000..c99ead1620 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/lxstat.c @@ -0,0 +1,49 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +/* Ignore prototype to avoid error if we alias __lxstat and __lxstat64. */ +#define __lxstat64 __lxstat64_disable + +#include +#include +#include +#include +#include + +#include +#include + +/* Get information about the file NAME in BUF. */ +int +__lxstat (int vers, const char *name, struct stat *buf) +{ + if (vers == _STAT_VER_KERNEL) + return INLINE_SYSCALL (newfstatat, 4, AT_FDCWD, name, buf, + AT_SYMLINK_NOFOLLOW); + errno = EINVAL; + return -1; +} + +hidden_def (__lxstat) +weak_alias (__lxstat, _lxstat); +#ifdef XSTAT_IS_XSTAT64 +#undef __lxstat64 +strong_alias (__lxstat, __lxstat64); +hidden_ver (__lxstat, __lxstat64) +#endif diff --git a/sysdeps/unix/sysv/linux/generic/mkdir.c b/sysdeps/unix/sysv/linux/generic/mkdir.c new file mode 100644 index 0000000000..bf345bc538 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/mkdir.c @@ -0,0 +1,34 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include +#include +#include +#include + + +/* Create a directory named PATH with protections MODE. */ +int +__mkdir (const char *path, mode_t mode) +{ + return INLINE_SYSCALL (mkdirat, 3, AT_FDCWD, path, mode); +} +weak_alias (__mkdir, mkdir) diff --git a/sysdeps/unix/sysv/linux/generic/nptl/not-cancel.h b/sysdeps/unix/sysv/linux/generic/nptl/not-cancel.h new file mode 100644 index 0000000000..e6a0d135c8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/nptl/not-cancel.h @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/generic/open.c b/sysdeps/unix/sysv/linux/generic/open.c new file mode 100644 index 0000000000..c985835cae --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/open.c @@ -0,0 +1,72 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include +#include +#include + +/* Open FILE with access OFLAG. If OFLAG includes O_CREAT, + a third argument is the file protection. */ +int +__libc_open (const char *file, int oflag, ...) +{ + int mode = 0; + + if (oflag & O_CREAT) + { + va_list arg; + va_start (arg, oflag); + mode = va_arg (arg, int); + va_end (arg); + } + + if (SINGLE_THREAD_P) + return INLINE_SYSCALL (openat, 4, AT_FDCWD, file, oflag, mode); + + int oldtype = LIBC_CANCEL_ASYNC (); + + int result = INLINE_SYSCALL (openat, 4, AT_FDCWD, file, oflag, mode); + + LIBC_CANCEL_RESET (oldtype); + + return result; +} +libc_hidden_def (__libc_open) + +weak_alias (__libc_open, __open) +libc_hidden_weak (__open) +weak_alias (__libc_open, open) + +int +__open_nocancel (const char *file, int oflag, ...) +{ + int mode = 0; + + if (oflag & O_CREAT) + { + va_list arg; + va_start (arg, oflag); + mode = va_arg (arg, int); + va_end (arg); + } + + return INLINE_SYSCALL (openat, 4, AT_FDCWD, file, oflag, mode); +} diff --git a/sysdeps/unix/sysv/linux/generic/open64.c b/sysdeps/unix/sysv/linux/generic/open64.c new file mode 100644 index 0000000000..199699a1c9 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/open64.c @@ -0,0 +1,56 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include +#include +#include + +/* Open FILE with access OFLAG. If OFLAG includes O_CREAT, + a third argument is the file protection. */ +int +__libc_open64 (const char *file, int oflag, ...) +{ + int mode = 0; + + if (oflag & O_CREAT) + { + va_list arg; + va_start (arg, oflag); + mode = va_arg (arg, int); + va_end (arg); + } + + if (SINGLE_THREAD_P) + return INLINE_SYSCALL (openat, 4, AT_FDCWD, file, + oflag | O_LARGEFILE, mode); + + int oldtype = LIBC_CANCEL_ASYNC (); + + int result = INLINE_SYSCALL (openat, 4, AT_FDCWD, file, + oflag | O_LARGEFILE, mode); + + LIBC_CANCEL_RESET (oldtype); + + return result; +} +weak_alias (__libc_open64, __open64) +libc_hidden_weak (__open64) +weak_alias (__libc_open64, open64) diff --git a/sysdeps/unix/sysv/linux/generic/pause.c b/sysdeps/unix/sysv/linux/generic/pause.c new file mode 100644 index 0000000000..f1333cb5ac --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/pause.c @@ -0,0 +1,64 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include + +/* Suspend the process until a signal arrives. + This always returns -1 and sets errno to EINTR. */ + +static int +__syscall_pause (void) +{ + sigset_t set; + + int rc = + INLINE_SYSCALL (rt_sigprocmask, 4, SIG_BLOCK, NULL, &set, _NSIG / 8); + if (rc == 0) + rc = INLINE_SYSCALL (rt_sigsuspend, 2, &set, _NSIG / 8); + + return rc; +} + +int +__libc_pause (void) +{ + if (SINGLE_THREAD_P) + return __syscall_pause (); + + int oldtype = LIBC_CANCEL_ASYNC (); + + int result = __syscall_pause (); + + LIBC_CANCEL_RESET (oldtype); + + return result; +} +weak_alias (__libc_pause, pause) + +#ifndef NO_CANCELLATION +# include + +int +__pause_nocancel (void) +{ + return __syscall_pause (); +} +#endif diff --git a/sysdeps/unix/sysv/linux/generic/pipe.c b/sysdeps/unix/sysv/linux/generic/pipe.c new file mode 100644 index 0000000000..d6d5ef1ab7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/pipe.c @@ -0,0 +1,34 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include + +/* Create a one-way communication channel (__pipe). + If successful, two file descriptors are stored in PIPEDES; + bytes written on PIPEDES[1] can be read from PIPEDES[0]. + Returns 0 if successful, -1 if not. */ +int +__pipe (int __pipedes[2]) +{ + return INLINE_SYSCALL (pipe2, 2, __pipedes, 0); +} +libc_hidden_def (__pipe) +weak_alias (__pipe, pipe) diff --git a/sysdeps/unix/sysv/linux/generic/poll.c b/sysdeps/unix/sysv/linux/generic/poll.c new file mode 100644 index 0000000000..1fac1e7744 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/poll.c @@ -0,0 +1,54 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include + +#include +#include + +#include + +int +__poll (struct pollfd *fds, nfds_t nfds, int timeout) +{ + struct timespec timeout_ts; + struct timespec *timeout_ts_p = NULL; + + if (timeout >= 0) + { + timeout_ts.tv_sec = timeout / 1000; + timeout_ts.tv_nsec = (timeout % 1000) * 1000000; + timeout_ts_p = &timeout_ts; + } + + if (SINGLE_THREAD_P) + return INLINE_SYSCALL (ppoll, 5, fds, nfds, timeout_ts_p, NULL, 0); + + int oldtype = LIBC_CANCEL_ASYNC (); + + int result = INLINE_SYSCALL (ppoll, 5, fds, nfds, timeout_ts_p, NULL, 0); + + LIBC_CANCEL_RESET (oldtype); + + return result; +} +libc_hidden_def (__poll) +weak_alias (__poll, poll) +strong_alias (__poll, __libc_poll) diff --git a/sysdeps/unix/sysv/linux/generic/readlink.c b/sysdeps/unix/sysv/linux/generic/readlink.c new file mode 100644 index 0000000000..ee46c19611 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/readlink.c @@ -0,0 +1,32 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include + +/* Read the contents of the symbolic link PATH into no more than + LEN bytes of BUF. The contents are not null-terminated. + Returns the number of characters read, or -1 for errors. */ +ssize_t +__readlink (const char *path, char *buf, size_t len) +{ + return INLINE_SYSCALL (readlinkat, 4, AT_FDCWD, path, buf, len); +} +weak_alias (__readlink, readlink) diff --git a/sysdeps/unix/sysv/linux/generic/readlink_chk.c b/sysdeps/unix/sysv/linux/generic/readlink_chk.c new file mode 100644 index 0000000000..db8aa20556 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/readlink_chk.c @@ -0,0 +1,40 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include +#ifdef HAVE_INLINED_SYSCALLS +# include +# include +#endif + + +ssize_t +__readlink_chk (const char *path, void *buf, size_t len, size_t buflen) +{ + if (len > buflen) + __chk_fail (); + +#ifdef HAVE_INLINED_SYSCALLS + return INLINE_SYSCALL (readlinkat, 4, AT_FDCWD, path, buf, len); +#else + return __readlink (path, buf, len); +#endif +} diff --git a/sysdeps/unix/sysv/linux/generic/recv.c b/sysdeps/unix/sysv/linux/generic/recv.c new file mode 100644 index 0000000000..d76a9e60b0 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/recv.c @@ -0,0 +1,46 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include +#include + +ssize_t +__libc_recv (int sockfd, void *buffer, size_t len, int flags) +{ + ssize_t result; + + if (SINGLE_THREAD_P) + result = INLINE_SYSCALL (recvfrom, 6, sockfd, buffer, len, flags, + NULL, NULL); + else + { + int oldtype = LIBC_CANCEL_ASYNC (); + + result = INLINE_SYSCALL (recvfrom, 6, sockfd, buffer, len, flags, + NULL, NULL); + + LIBC_CANCEL_RESET (oldtype); + } + + return result; +} +strong_alias (__libc_recv, __recv) +weak_alias (__libc_recv, recv) diff --git a/sysdeps/unix/sysv/linux/generic/rename.c b/sysdeps/unix/sysv/linux/generic/rename.c new file mode 100644 index 0000000000..7e501a40fb --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/rename.c @@ -0,0 +1,30 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include +#include + +/* Rename the file OLD to NEW. */ +int +rename (const char *old, const char *new) +{ + return INLINE_SYSCALL (renameat, 4, AT_FDCWD, old, AT_FDCWD, new); +} diff --git a/sysdeps/unix/sysv/linux/generic/rmdir.c b/sysdeps/unix/sysv/linux/generic/rmdir.c new file mode 100644 index 0000000000..2478fc6d80 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/rmdir.c @@ -0,0 +1,32 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include +#include + + +/* Remove the directory PATH. */ +int +__rmdir (const char *path) +{ + return INLINE_SYSCALL (unlinkat, 3, AT_FDCWD, path, AT_REMOVEDIR); +} +weak_alias (__rmdir, rmdir) diff --git a/sysdeps/unix/sysv/linux/generic/select.c b/sysdeps/unix/sysv/linux/generic/select.c new file mode 100644 index 0000000000..d206040d1f --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/select.c @@ -0,0 +1,75 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include +#include +#include + +/* Check the first NFDS descriptors each in READFDS (if not NULL) for read + readiness, in WRITEFDS (if not NULL) for write readiness, and in EXCEPTFDS + (if not NULL) for exceptional conditions. If TIMEOUT is not NULL, time out + after waiting the interval specified therein. Returns the number of ready + descriptors, or -1 for errors. */ + +int +__select(int nfds, fd_set *readfds, + fd_set *writefds, fd_set *exceptfds, + struct timeval *timeout) +{ + int result; + struct timespec ts, *tsp = NULL; + + if (timeout) + { + TIMEVAL_TO_TIMESPEC (timeout, &ts); + tsp = &ts; + } + + if (SINGLE_THREAD_P) + { + result = INLINE_SYSCALL (pselect6, 6, nfds, readfds, writefds, exceptfds, + tsp, NULL); + } + else + { + int oldtype = LIBC_CANCEL_ASYNC (); + + result = INLINE_SYSCALL (pselect6, 6, nfds, readfds, writefds, exceptfds, + tsp, NULL); + + LIBC_CANCEL_RESET (oldtype); + } + + if (timeout) + { + /* Linux by default will update the timeout after a pselect6 syscall + (though the pselect() glibc call suppresses this behavior). + Since select() on Linux has the same behavior as the pselect6 + syscall, we update the timeout here. */ + TIMESPEC_TO_TIMEVAL (timeout, &ts); + } + + return result; +} +libc_hidden_def (__select) + +weak_alias (__select, select) +weak_alias (__select, __libc_select) diff --git a/sysdeps/unix/sysv/linux/generic/send.c b/sysdeps/unix/sysv/linux/generic/send.c new file mode 100644 index 0000000000..1ff25c51b9 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/send.c @@ -0,0 +1,44 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include +#include + +ssize_t +__libc_send (int sockfd, const void *buffer, size_t len, int flags) +{ + ssize_t result; + + if (SINGLE_THREAD_P) + result = INLINE_SYSCALL (sendto, 6, sockfd, buffer, len, flags, NULL, 0); + else + { + int oldtype = LIBC_CANCEL_ASYNC (); + + result = INLINE_SYSCALL (sendto, 6, sockfd, buffer, len, flags, NULL, 0); + + LIBC_CANCEL_RESET (oldtype); + } + + return result; +} +strong_alias (__libc_send, __send) +weak_alias (__libc_send, send) diff --git a/sysdeps/unix/sysv/linux/generic/symlink.c b/sysdeps/unix/sysv/linux/generic/symlink.c new file mode 100644 index 0000000000..ed2b2ab529 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/symlink.c @@ -0,0 +1,31 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include +#include + +/* Make a link to FROM called TO. */ +int +__symlink (const char *from, const char *to) +{ + return INLINE_SYSCALL (symlinkat, 3, from, AT_FDCWD, to); +} +weak_alias (__symlink, symlink) diff --git a/sysdeps/unix/sysv/linux/generic/syscalls.list b/sysdeps/unix/sysv/linux/generic/syscalls.list new file mode 100644 index 0000000000..c9602ca870 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/syscalls.list @@ -0,0 +1,32 @@ +# File name Caller Syscall name # args Strong name Weak names + +# SysV APIs +msgget - msgget i:ii __msgget msgget +msgctl - msgctl i:iip __msgctl msgctl +msgrcv - msgrcv Ci:ibnii __msgrcv msgrcv +msgsnd - msgsnd Ci:ibni __msgsnd msgsnd +semget - semget i:iii __semget semget +semctl - semctl i:iiii __semctl semctl +semtimedop - semtimedop i:ipip semtimedop +semop - semop i:ipi __semop semop +shmget - shmget i:iii __shmget shmget +shmctl - shmctl i:iip __shmctl shmctl +shmat - shmat i:ipi __shmat shmat +shmdt - shmdt i:s __shmdt shmdt + +# Socket APIs +socket - socket i:iii __socket socket +socketpair - socketpair i:iiif __socketpair socketpair +bind - bind i:ipi __bind bind +listen - listen i:ii __listen listen +accept - accept Ci:iBN __libc_accept __accept accept +connect - connect Ci:ipi __libc_connect __connect_internal __connect connect +getsockname - getsockname i:ipp __getsockname getsockname +getpeername - getpeername i:ipp __getpeername getpeername +sendto - sendto Ci:ibnibn __libc_sendto __sendto sendto +recvfrom - recvfrom Ci:ibniBN __libc_recvfrom __recvfrom recvfrom +setsockopt - setsockopt i:iiibn __setsockopt setsockopt +getsockopt - getsockopt i:iiiBN __getsockopt getsockopt +shutdown - shutdown i:ii __shutdown shutdown +sendmsg - sendmsg Ci:ipi __libc_sendmsg __sendmsg sendmsg +recvmsg - recvmsg Ci:ipi __libc_recvmsg __recvmsg recvmsg diff --git a/sysdeps/unix/sysv/linux/generic/sysctl.c b/sysdeps/unix/sysv/linux/generic/sysctl.c new file mode 100644 index 0000000000..7cab3a4c25 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/sysctl.c @@ -0,0 +1,34 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include + +#include +#include + +/* This deprecated syscall is no longer used (replaced with /proc/sys). */ +int +sysctl (int *name, int nlen, void *oldval, size_t *oldlenp, + void *newval, size_t newlen) +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (sysctl) +#include diff --git a/sysdeps/unix/sysv/linux/generic/sysdep.h b/sysdeps/unix/sysv/linux/generic/sysdep.h new file mode 100644 index 0000000000..45151c07e1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/sysdep.h @@ -0,0 +1,42 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include + +/* Provide the common name to allow more code reuse. */ +#define __NR__llseek __NR_llseek + +#if __WORDSIZE == 64 +/* By defining the older names, glibc will build syscall wrappers for + both pread and pread64; sysdeps/unix/sysv/linux/wordsize-64/pread64.c + will suppress generating any separate code for pread64.c. */ +#define __NR_pread __NR_pread64 +#define __NR_pwrite __NR_pwrite64 +#endif + +/* Provide a dummy argument that can be used to force register + alignment for register pairs if required by the syscall ABI. */ +#ifdef __ASSUME_ALIGNED_REGISTER_PAIRS +#define __ALIGNMENT_ARG 0, +#define __ALIGNMENT_COUNT(a,b) b +#else +#define __ALIGNMENT_ARG +#define __ALIGNMENT_COUNT(a,b) a +#endif diff --git a/sysdeps/unix/sysv/linux/generic/umount.c b/sysdeps/unix/sysv/linux/generic/umount.c new file mode 100644 index 0000000000..9b92ffe7bd --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/umount.c @@ -0,0 +1,31 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +/* Since the generic Linux syscall ABI doesn't have an oldumount system call, + do what the kernel does down here. */ + +extern long int __umount2 (const char *name, int flags); + +long int +__umount (const char *name) +{ + return __umount2 (name, 0); +} + +weak_alias (__umount, umount); diff --git a/sysdeps/unix/sysv/linux/generic/unlink.c b/sysdeps/unix/sysv/linux/generic/unlink.c new file mode 100644 index 0000000000..b115212d52 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/unlink.c @@ -0,0 +1,32 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include +#include + + +/* Remove the link named NAME. */ +int +__unlink (const char *name) +{ + return INLINE_SYSCALL (unlinkat, 3, AT_FDCWD, name, 0); +} +weak_alias (__unlink, unlink) diff --git a/sysdeps/unix/sysv/linux/generic/ustat.c b/sysdeps/unix/sysv/linux/generic/ustat.c new file mode 100644 index 0000000000..73e789216f --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/ustat.c @@ -0,0 +1,34 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include + +#include +#include + +/* This deprecated syscall is no longer used (replaced with fstat). */ +int +ustat (dev_t dev, struct ustat *ubuf) +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (ustat) +#include diff --git a/sysdeps/unix/sysv/linux/generic/utimes.c b/sysdeps/unix/sysv/linux/generic/utimes.c new file mode 100644 index 0000000000..c366e6a759 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/utimes.c @@ -0,0 +1,46 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include +#include +#include +#include + + +/* Change the access time of FILE to TVP[0] and + the modification time of FILE to TVP[1]. */ +int +__utimes (const char *file, const struct timeval tvp[2]) +{ + struct timespec ts[2]; + struct timespec *tsp = NULL; + + if (tvp) + { + TIMEVAL_TO_TIMESPEC (&tvp[0], &ts[0]); + TIMEVAL_TO_TIMESPEC (&tvp[1], &ts[1]); + tsp = &ts[0]; + } + + return INLINE_SYSCALL (utimensat, 4, AT_FDCWD, file, tsp, 0); +} + +weak_alias (__utimes, utimes) diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/Versions b/sysdeps/unix/sysv/linux/generic/wordsize-32/Versions new file mode 100644 index 0000000000..cdc6022015 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/Versions @@ -0,0 +1,5 @@ +libc { + GLIBC_2.15 { + fallocate64; + } +} diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/fcntl.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/fcntl.c new file mode 100644 index 0000000000..6619ff7527 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/fcntl.c @@ -0,0 +1,88 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include /* Must come before . */ +#include +#include + +#include +#include + + +static int +do_fcntl (int fd, int cmd, void *arg) +{ + if (cmd != F_GETOWN) + return INLINE_SYSCALL (fcntl64, 3, fd, cmd, arg); + + INTERNAL_SYSCALL_DECL (err); + struct f_owner_ex fex; + int res = INTERNAL_SYSCALL (fcntl64, err, 3, fd, F_GETOWN_EX, &fex); + if (!INTERNAL_SYSCALL_ERROR_P (res, err)) + return fex.type == F_OWNER_GID ? -fex.pid : fex.pid; + + __set_errno (INTERNAL_SYSCALL_ERRNO (res, err)); + return -1; +} + + +#ifndef NO_CANCELLATION +int +__fcntl_nocancel (int fd, int cmd, ...) +{ + va_list ap; + void *arg; + + va_start (ap, cmd); + arg = va_arg (ap, void *); + va_end (ap); + + return do_fcntl (fd, cmd, arg); +} +#endif + + +int +__libc_fcntl (int fd, int cmd, ...) +{ + va_list ap; + void *arg; + + va_start (ap, cmd); + arg = va_arg (ap, void *); + va_end (ap); + + if (SINGLE_THREAD_P || cmd != F_SETLKW) + return do_fcntl (fd, cmd, arg); + + int oldtype = LIBC_CANCEL_ASYNC (); + + int result = do_fcntl (fd, cmd, arg); + + LIBC_CANCEL_RESET (oldtype); + + return result; +} +libc_hidden_def (__libc_fcntl) + +weak_alias (__libc_fcntl, __fcntl) +libc_hidden_weak (__fcntl) +weak_alias (__libc_fcntl, fcntl) diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/fstatfs.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/fstatfs.c new file mode 100644 index 0000000000..aa866edde1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/fstatfs.c @@ -0,0 +1,33 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include + +#include "overflow.h" + +/* Return information about the filesystem on which FD resides. */ +int +__fstatfs (int fd, struct statfs *buf) +{ + int rc = INLINE_SYSCALL (fstatfs64, 3, fd, sizeof (*buf), buf); + return rc ?: statfs_overflow (buf); +} +weak_alias (__fstatfs, fstatfs) diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/ftruncate.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/ftruncate.c new file mode 100644 index 0000000000..d962e4528f --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/ftruncate.c @@ -0,0 +1,32 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include + +/* Truncate the file FD refers to to LENGTH bytes. */ +int +__ftruncate (int fd, off_t length) +{ + return INLINE_SYSCALL (ftruncate64, __ALIGNMENT_COUNT (3, 4), fd, + __ALIGNMENT_ARG + __LONG_LONG_PAIR (length >> 31, length)); +} +weak_alias (__ftruncate, ftruncate) diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/ftruncate64.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/ftruncate64.c new file mode 100644 index 0000000000..b0e52b9d58 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/ftruncate64.c @@ -0,0 +1,33 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include + +/* Truncate the file FD refers to to LENGTH bytes. */ +int +__ftruncate64 (int fd, off64_t length) +{ + unsigned int low = length & 0xffffffff; + unsigned int high = length >> 32; + return INLINE_SYSCALL (ftruncate64, __ALIGNMENT_COUNT (3, 4), fd, + __ALIGNMENT_ARG __LONG_LONG_PAIR (high, low)); +} +weak_alias (__ftruncate64, ftruncate64) diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstat.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstat.c new file mode 100644 index 0000000000..7df3240f4c --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstat.c @@ -0,0 +1,46 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include +#include +#include + +#include +#include + +#include "overflow.h" + +/* Get information about the file FD in BUF. */ +int +__fxstat (int vers, int fd, struct stat *buf) +{ + if (vers == _STAT_VER_KERNEL) + { + int rc = INLINE_SYSCALL (fstat64, 2, fd, buf); + return rc ?: stat_overflow (buf); + } + + errno = EINVAL; + return -1; +} + +hidden_def (__fxstat) +weak_alias (__fxstat, _fxstat); diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstatat.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstatat.c new file mode 100644 index 0000000000..2ab639a73b --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstatat.c @@ -0,0 +1,46 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "overflow.h" + +/* Get information about the file NAME in BUF. */ +int +__fxstatat (int vers, int fd, const char *file, struct stat *buf, int flag) +{ + if (vers == _STAT_VER_KERNEL) + { + int rc = INLINE_SYSCALL (fstatat64, 4, fd, file, buf, flag); + return rc ?: stat_overflow (buf); + } + + errno = EINVAL; + return -1; +} +libc_hidden_def (__fxstatat) diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/getdents.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/getdents.c new file mode 100644 index 0000000000..2f22b89a6c --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/getdents.c @@ -0,0 +1,116 @@ +/* Copyright (C) 1993, 1995-2003, 2004, 2006, 2007, 2011 + This file is part of the GNU C Library. + Simplified from sysdeps/unix/sysv/linux/getdents.c. + + 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. */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +/* Pack the dirent64 struct down into 32-bit offset/inode fields, and + ensure that no overflow occurs. */ +ssize_t +__getdents (int fd, char *buf, size_t nbytes) +{ + union + { + struct dirent64 k; /* Kernel structure. */ + struct dirent u; + char b[1]; + } *kbuf = (void *) buf, *outp, *inp; + size_t kbytes = nbytes; + off64_t last_offset = -1; + ssize_t retval; + + const size_t size_diff = (offsetof (struct dirent64, d_name) + - offsetof (struct dirent, d_name)); + if (nbytes <= sizeof (struct dirent)) + { + kbytes = nbytes + offsetof (struct dirent64, d_name) + - offsetof (struct dirent, d_name); + kbuf = __alloca(kbytes); + } + + retval = INLINE_SYSCALL (getdents64, 3, fd, kbuf, kbytes); + if (retval == -1) + return -1; + + /* These two pointers might alias the same memory buffer. + Standard C requires that we always use the same type for them, + so we must use the union type. */ + inp = kbuf; + outp = (void *) buf; + + while (&inp->b < &kbuf->b + retval) + { + const size_t alignment = __alignof__ (struct dirent); + /* Since inp->k.d_reclen is already aligned for the kernel + structure this may compute a value that is bigger + than necessary. */ + size_t old_reclen = inp->k.d_reclen; + size_t new_reclen = ((old_reclen - size_diff + alignment - 1) + & ~(alignment - 1)); + + /* Copy the data out of the old structure into temporary space. + Then copy the name, which may overlap if BUF == KBUF. */ + const uint64_t d_ino = inp->k.d_ino; + const int64_t d_off = inp->k.d_off; + const uint8_t d_type = inp->k.d_type; + + memmove (outp->u.d_name, inp->k.d_name, + old_reclen - offsetof (struct dirent64, d_name)); + + /* Now we have copied the data from INP and access only OUTP. */ + + outp->u.d_ino = d_ino; + outp->u.d_off = d_off; + if ((sizeof (outp->u.d_ino) != sizeof (inp->k.d_ino) + && outp->u.d_ino != d_ino) + || (sizeof (outp->u.d_off) != sizeof (inp->k.d_off) + && outp->u.d_off != d_off)) + { + /* Overflow. If there was at least one entry before this one, + return them without error, otherwise signal overflow. */ + if (last_offset != -1) + { + __lseek64 (fd, last_offset, SEEK_SET); + return outp->b - buf; + } + __set_errno (EOVERFLOW); + return -1; + } + + last_offset = d_off; + outp->u.d_reclen = new_reclen; + outp->u.d_type = d_type; + + inp = (void *) inp + old_reclen; + outp = (void *) outp + new_reclen; + } + + return outp->b - buf; +} diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/llseek.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/llseek.c new file mode 100644 index 0000000000..835595761e --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/llseek.c @@ -0,0 +1,47 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include + +#include +#include + +/* Seek to OFFSET on FD, starting from WHENCE. */ +extern loff_t __llseek (int fd, loff_t offset, int whence); + +loff_t +__llseek (int fd, loff_t offset, int whence) +{ + loff_t retval; + + return (loff_t) (INLINE_SYSCALL (_llseek, 5, fd, (off_t) (offset >> 32), + (off_t) (offset & 0xffffffff), + &retval, whence) ?: retval); +} +weak_alias (__llseek, llseek) +strong_alias (__llseek, __libc_lseek64) +strong_alias (__llseek, __lseek64) +weak_alias (__llseek, lseek64) + +/* llseek doesn't have a prototype. Since the second parameter is a + 64bit type, this results in wrong behaviour if no prototype is + provided. */ +link_warning (llseek, "\ +the `llseek' function may be dangerous; use `lseek64' instead.") diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/lseek.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/lseek.c new file mode 100644 index 0000000000..ed5d18b1dd --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/lseek.c @@ -0,0 +1,39 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include + +#include +#include + +#include "overflow.h" + +off_t +__lseek (int fd, off_t offset, int whence) +{ + loff_t res; + int rc = INLINE_SYSCALL (_llseek, 5, fd, (off_t) (offset >> 31), + (off_t) offset, &res, whence); + return rc ?: lseek_overflow (res); +} +libc_hidden_def (__lseek) +weak_alias (__lseek, lseek) +strong_alias (__lseek, __libc_lseek) diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat.c new file mode 100644 index 0000000000..0fa91ecb0d --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat.c @@ -0,0 +1,44 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include +#include +#include + +#include +#include + +#include "overflow.h" + +/* Get information about the file NAME in BUF. */ +int +__lxstat (int vers, const char *name, struct stat *buf) +{ + if (vers == _STAT_VER_KERNEL) + { + int rc = INLINE_SYSCALL (fstatat64, 4, AT_FDCWD, name, buf, + AT_SYMLINK_NOFOLLOW); + return rc ?: stat_overflow (buf); + } + errno = EINVAL; + return -1; +} +hidden_def (__lxstat) diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat64.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat64.c new file mode 100644 index 0000000000..3d65692d17 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat64.c @@ -0,0 +1,39 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include +#include +#include + +#include +#include + +/* Get information about the file NAME in BUF. */ +int +__lxstat64 (int vers, const char *name, struct stat64 *buf) +{ + if (vers == _STAT_VER_KERNEL) + return INLINE_SYSCALL (fstatat64, 4, AT_FDCWD, name, buf, + AT_SYMLINK_NOFOLLOW); + errno = EINVAL; + return -1; +} +hidden_def (__lxstat64) diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/mmap.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/mmap.c new file mode 100644 index 0000000000..1c2d8ddf7a --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/mmap.c @@ -0,0 +1,41 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include +#include + +#ifndef MMAP_PAGE_SHIFT +#define MMAP_PAGE_SHIFT 12 +#endif + +__ptr_t +__mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset) +{ + if (offset & ((1 << MMAP_PAGE_SHIFT) - 1)) + { + __set_errno (EINVAL); + return MAP_FAILED; + } + return (__ptr_t) INLINE_SYSCALL (mmap2, 6, addr, len, prot, flags, fd, + offset >> MMAP_PAGE_SHIFT); +} + +weak_alias (__mmap, mmap) diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/overflow.h b/sysdeps/unix/sysv/linux/generic/wordsize-32/overflow.h new file mode 100644 index 0000000000..2bfa7d9cda --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/overflow.h @@ -0,0 +1,61 @@ +/* Overflow tests for stat, statfs, and lseek functions. + Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include + +/* Test for overflows of structures where we ask the kernel to fill them + in with standard 64-bit syscalls but return them through APIs that + only expose the low 32 bits of some fields. */ + +static inline off_t lseek_overflow (loff_t res) +{ + off_t retval = (off_t) res; + if (retval == res) + return retval; + + __set_errno (EOVERFLOW); + return (off_t) -1; +} + +static inline int stat_overflow (struct stat *buf) +{ + if (buf->__st_ino_pad == 0 && buf->__st_size_pad == 0 && + buf->__st_blocks_pad == 0) + return 0; + + __set_errno (EOVERFLOW); + return -1; +} + +/* Note that f_files and f_ffree may validly be a sign-extended -1. */ +static inline int statfs_overflow (struct statfs *buf) +{ + if (buf->__f_blocks_pad == 0 && buf->__f_bfree_pad == 0 && + buf->__f_bavail_pad == 0 && + (buf->__f_files_pad == 0 || + (buf->f_files == -1U && buf->__f_files_pad == -1)) && + (buf->__f_ffree_pad == 0 || + (buf->f_ffree == -1U && buf->__f_ffree_pad == -1))) + return 0; + + __set_errno (EOVERFLOW); + return -1; +} diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/posix_fadvise.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/posix_fadvise.c new file mode 100644 index 0000000000..735b676747 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/posix_fadvise.c @@ -0,0 +1,38 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include + +/* Advice the system about the expected behaviour of the application with + respect to the file associated with FD. */ + +int +posix_fadvise (int fd, off_t offset, off_t len, int advise) +{ + INTERNAL_SYSCALL_DECL (err); + int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd, + __LONG_LONG_PAIR (offset >> 31, offset), + __LONG_LONG_PAIR (len >> 31, len), + advise); + if (INTERNAL_SYSCALL_ERROR_P (ret, err)) + return INTERNAL_SYSCALL_ERRNO (ret, err); + return 0; +} diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/pread.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/pread.c new file mode 100644 index 0000000000..86362107c3 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/pread.c @@ -0,0 +1,59 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + Based on work contributed by Ulrich Drepper , 1997. + + 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. */ + +#include +#include +#include +#include + +#include +#include + +#include + +static ssize_t +do_pread (int fd, void *buf, size_t count, off_t offset) +{ + assert (sizeof (offset) == 4); + return INLINE_SYSCALL (pread64, __ALIGNMENT_COUNT (5, 6), fd, + buf, count, __ALIGNMENT_ARG + __LONG_LONG_PAIR (offset >> 31, offset)); +} + +ssize_t +__libc_pread (fd, buf, count, offset) + int fd; + void *buf; + size_t count; + off_t offset; +{ + if (SINGLE_THREAD_P) + return do_pread (fd, buf, count, offset); + + int oldtype = LIBC_CANCEL_ASYNC (); + + ssize_t result = do_pread (fd, buf, count, offset); + + LIBC_CANCEL_RESET (oldtype); + + return result; +} +strong_alias (__libc_pread, __pread) +weak_alias (__libc_pread, pread) diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/pread64.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/pread64.c new file mode 100644 index 0000000000..1e58c3188e --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/pread64.c @@ -0,0 +1,59 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + Based on work contributed by Ulrich Drepper , 1997. + + 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. */ + +#include +#include +#include + +#include +#include + +#include + +static ssize_t +do_pread64 (int fd, void *buf, size_t count, off64_t offset) +{ + return INLINE_SYSCALL (pread64, __ALIGNMENT_COUNT (5, 6), fd, + buf, count, __ALIGNMENT_ARG + __LONG_LONG_PAIR ((off_t) (offset >> 32), + (off_t) (offset & 0xffffffff))); +} + + +ssize_t +__libc_pread64 (fd, buf, count, offset) + int fd; + void *buf; + size_t count; + off64_t offset; +{ + if (SINGLE_THREAD_P) + return do_pread64 (fd, buf, count, offset); + + int oldtype = LIBC_CANCEL_ASYNC (); + + ssize_t result = do_pread64 (fd, buf, count, offset); + + LIBC_CANCEL_RESET (oldtype); + + return result; +} + +weak_alias (__libc_pread64, __pread64) weak_alias (__libc_pread64, pread64) diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/preadv.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/preadv.c new file mode 100644 index 0000000000..e1825cebb8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/preadv.c @@ -0,0 +1,56 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + Based on work contributed by Ulrich Drepper , 1997. + + 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. */ + +#include +#include +#include +#include +#include + +#include +#include + +#include + +static ssize_t +do_preadv (int fd, const struct iovec *vector, int count, off_t offset) +{ + assert (sizeof (offset) == 4); + return INLINE_SYSCALL (preadv, __ALIGNMENT_COUNT (5, 6), fd, + vector, count, __ALIGNMENT_ARG + __LONG_LONG_PAIR (offset >> 31, offset)); +} + +ssize_t +__libc_preadv (int fd, const struct iovec *vector, int count, off_t offset) +{ + if (SINGLE_THREAD_P) + return do_preadv (fd, vector, count, offset); + + int oldtype = LIBC_CANCEL_ASYNC (); + + ssize_t result = do_preadv (fd, vector, count, offset); + + LIBC_CANCEL_RESET (oldtype); + + return result; +} +strong_alias (__libc_preadv, __preadv) +weak_alias (__libc_preadv, preadv) diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/preadv64.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/preadv64.c new file mode 100644 index 0000000000..ed6eeed527 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/preadv64.c @@ -0,0 +1,57 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + Based on work contributed by Ulrich Drepper , 1997. + + 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. */ + +#include +#include +#include +#include + +#include +#include + +#include + +static ssize_t +do_preadv64 (int fd, const struct iovec *vector, int count, off64_t offset) +{ + return INLINE_SYSCALL (preadv, __ALIGNMENT_COUNT (5, 6), fd, + vector, count, __ALIGNMENT_ARG + __LONG_LONG_PAIR ((off_t) (offset >> 32), + (off_t) (offset & 0xffffffff))); +} + + +ssize_t +__libc_preadv64 (int fd, const struct iovec *vector, int count, off64_t offset) +{ + if (SINGLE_THREAD_P) + return do_preadv64 (fd, vector, count, offset); + + int oldtype = LIBC_CANCEL_ASYNC (); + + ssize_t result = do_preadv64 (fd, vector, count, offset); + + LIBC_CANCEL_RESET (oldtype); + + return result; +} + +strong_alias (__libc_preadv64, __preadv64) +weak_alias (__libc_preadv64, preadv64) diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite.c new file mode 100644 index 0000000000..84d5d2f6af --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite.c @@ -0,0 +1,60 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + Based on work contributed by Ulrich Drepper , 1997. + + 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. */ + +#include +#include +#include +#include + +#include +#include + +#include + +static ssize_t +do_pwrite (int fd, const void *buf, size_t count, off_t offset) +{ + assert (sizeof (offset) == 4); + return INLINE_SYSCALL (pwrite64, __ALIGNMENT_COUNT (5, 6), fd, + buf, count, __ALIGNMENT_ARG + __LONG_LONG_PAIR (offset >> 31, offset)); +} + + +ssize_t +__libc_pwrite (fd, buf, count, offset) + int fd; + const void *buf; + size_t count; + off_t offset; +{ + if (SINGLE_THREAD_P) + return do_pwrite (fd, buf, count, offset); + + int oldtype = LIBC_CANCEL_ASYNC (); + + ssize_t result = do_pwrite (fd, buf, count, offset); + + LIBC_CANCEL_RESET (oldtype); + + return result; +} +strong_alias (__libc_pwrite, __pwrite) +weak_alias (__libc_pwrite, pwrite) diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite64.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite64.c new file mode 100644 index 0000000000..f1629fa059 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite64.c @@ -0,0 +1,60 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + Based on work contributed by Ulrich Drepper , 1997. + + 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. */ + +#include +#include +#include + +#include +#include + +#include + +static ssize_t +do_pwrite64 (int fd, const void *buf, size_t count, off64_t offset) +{ + return INLINE_SYSCALL (pwrite64, __ALIGNMENT_COUNT (5, 6), fd, + buf, count, __ALIGNMENT_ARG + __LONG_LONG_PAIR ((off_t) (offset >> 32), + (off_t) (offset & 0xffffffff))); +} + + +ssize_t +__libc_pwrite64 (fd, buf, count, offset) + int fd; + const void *buf; + size_t count; + off64_t offset; +{ + if (SINGLE_THREAD_P) + return do_pwrite64 (fd, buf, count, offset); + + int oldtype = LIBC_CANCEL_ASYNC (); + + ssize_t result = do_pwrite64 (fd, buf, count, offset); + + LIBC_CANCEL_RESET (oldtype); + + return result; +} + +weak_alias (__libc_pwrite64, __pwrite64) +libc_hidden_weak (__pwrite64) weak_alias (__libc_pwrite64, pwrite64) diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/pwritev.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/pwritev.c new file mode 100644 index 0000000000..68cdf942f4 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/pwritev.c @@ -0,0 +1,57 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + Based on work contributed by Ulrich Drepper , 1997. + + 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. */ + +#include +#include +#include +#include +#include + +#include +#include + +#include + +static ssize_t +do_pwritev (int fd, const struct iovec *vector, int count, off_t offset) +{ + assert (sizeof (offset) == 4); + return INLINE_SYSCALL (pwritev, __ALIGNMENT_COUNT (5, 6), fd, + vector, count, __ALIGNMENT_ARG + __LONG_LONG_PAIR (offset >> 31, offset)); +} + + +ssize_t +__libc_pwritev (int fd, const struct iovec *vector, int count, off_t offset) +{ + if (SINGLE_THREAD_P) + return do_pwritev (fd, vector, count, offset); + + int oldtype = LIBC_CANCEL_ASYNC (); + + ssize_t result = do_pwritev (fd, vector, count, offset); + + LIBC_CANCEL_RESET (oldtype); + + return result; +} +strong_alias (__libc_pwritev, __pwritev) +weak_alias (__libc_pwritev, pwritev) diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/pwritev64.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/pwritev64.c new file mode 100644 index 0000000000..0e25d0ceb6 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/pwritev64.c @@ -0,0 +1,58 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + Based on work contributed by Ulrich Drepper , 1997. + + 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. */ + +#include +#include +#include +#include + +#include +#include + +#include + +static ssize_t +do_pwritev64 (int fd, const struct iovec *vector, int count, off64_t offset) +{ + return INLINE_SYSCALL (pwritev, __ALIGNMENT_COUNT (5, 6), fd, + vector, count, __ALIGNMENT_ARG + __LONG_LONG_PAIR ((off_t) (offset >> 32), + (off_t) (offset & 0xffffffff))); +} + + +ssize_t +__libc_pwritev64 (int fd, const struct iovec *vector, int count, + off64_t offset) +{ + if (SINGLE_THREAD_P) + return do_pwritev64 (fd, vector, count, offset); + + int oldtype = LIBC_CANCEL_ASYNC (); + + ssize_t result = do_pwritev64 (fd, vector, count, offset); + + LIBC_CANCEL_RESET (oldtype); + + return result; +} + +strong_alias (__libc_pwritev64, pwritev64) +weak_alias (__libc_pwritev64, __pwritev64) diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/sendfile.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/sendfile.c new file mode 100644 index 0000000000..120fe2f09a --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/sendfile.c @@ -0,0 +1,46 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include + +/* Send COUNT bytes from file associated with IN_FD starting at OFFSET to + descriptor OUT_FD. */ +ssize_t +sendfile (int out_fd, int in_fd, off_t *offset, size_t count) +{ + __off64_t off64; + int rc; + + if (offset != NULL) + { + if (*offset < 0 || (off_t) (*offset + count) < 0) + { + __set_errno (EINVAL); + return -1; + } + off64 = *offset; + } + + rc = INLINE_SYSCALL (sendfile64, 4, out_fd, in_fd, + offset ? &off64 : NULL, count); + if (offset) + *offset = off64; + return rc; +} diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/statfs.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/statfs.c new file mode 100644 index 0000000000..a5156b8829 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/statfs.c @@ -0,0 +1,34 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include + +#include "overflow.h" + +/* Return information about the filesystem on which FILE resides. */ +int +__statfs (const char *file, struct statfs *buf) +{ + int rc = INLINE_SYSCALL (statfs64, 3, file, sizeof (*buf), buf); + return rc ?: statfs_overflow (buf); +} +libc_hidden_def (__statfs) +weak_alias (__statfs, statfs) diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/syscalls.list b/sysdeps/unix/sysv/linux/generic/wordsize-32/syscalls.list new file mode 100644 index 0000000000..d1ae0290f5 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/syscalls.list @@ -0,0 +1,5 @@ +# File name Caller Syscall name # args Strong name Weak names + +# rlimit APIs +getrlimit - getrlimit i:ip __getrlimit getrlimit +setrlimit - setrlimit i:ip __setrlimit setrlimit diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/truncate.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/truncate.c new file mode 100644 index 0000000000..0692d05ca7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/truncate.c @@ -0,0 +1,32 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include + +/* Truncate PATH to LENGTH bytes. */ +int +__truncate (const char *path, off_t length) +{ + return INLINE_SYSCALL (truncate64, __ALIGNMENT_COUNT (3, 4), path, + __ALIGNMENT_ARG + __LONG_LONG_PAIR (length >> 31, length)); +} +weak_alias (__truncate, truncate) diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/truncate64.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/truncate64.c new file mode 100644 index 0000000000..b7bb0d962a --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/truncate64.c @@ -0,0 +1,32 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include + +/* Truncate the file PATH to LENGTH bytes. */ +int +truncate64 (const char *path, off64_t length) +{ + unsigned int low = length & 0xffffffff; + unsigned int high = length >> 32; + return INLINE_SYSCALL (truncate64, __ALIGNMENT_COUNT (3, 4), path, + __ALIGNMENT_ARG __LONG_LONG_PAIR (high, low)); +} diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/xstat.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/xstat.c new file mode 100644 index 0000000000..721afbe954 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/xstat.c @@ -0,0 +1,44 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include +#include +#include + +#include +#include + +#include "overflow.h" + +/* Get information about the file NAME in BUF. */ +int +__xstat (int vers, const char *name, struct stat *buf) +{ + if (vers == _STAT_VER_KERNEL) + { + int rc = INLINE_SYSCALL (fstatat64, 4, AT_FDCWD, name, buf, 0); + return rc ?: stat_overflow (buf); + } + + errno = EINVAL; + return -1; +} +hidden_def (__xstat) diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/xstat64.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/xstat64.c new file mode 100644 index 0000000000..5358b291b2 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/xstat64.c @@ -0,0 +1,39 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include +#include +#include + +#include +#include + +/* Get information about the file NAME in BUF. */ +int +__xstat64 (int vers, const char *name, struct stat64 *buf) +{ + if (vers == _STAT_VER_KERNEL) + return INLINE_SYSCALL (fstatat64, 4, AT_FDCWD, name, buf, 0); + + errno = EINVAL; + return -1; +} +hidden_def (__xstat64) diff --git a/sysdeps/unix/sysv/linux/generic/xmknod.c b/sysdeps/unix/sysv/linux/generic/xmknod.c new file mode 100644 index 0000000000..6f3f535d9e --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/xmknod.c @@ -0,0 +1,55 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include +#include +#include + +#include +#include + +/* Create a device file named PATH, with permission and special bits MODE + and device number DEV (which can be constructed from major and minor + device numbers with the `makedev' macro above). */ +int +__xmknod (int vers, const char *path, mode_t mode, dev_t *dev) +{ + unsigned long long int k_dev; + + if (vers != _MKNOD_VER) + { + __set_errno (EINVAL); + return -1; + } + + /* We must convert the value to dev_t type used by the kernel. */ + k_dev = (*dev) & ((1ULL << 32) - 1); + if (k_dev != *dev) + { + __set_errno (EINVAL); + return -1; + } + + return INLINE_SYSCALL (mknodat, 4, AT_FDCWD, path, mode, + (unsigned int) k_dev); +} +weak_alias (__xmknod, _xmknod) +libc_hidden_def (__xmknod) diff --git a/sysdeps/unix/sysv/linux/generic/xstat.c b/sysdeps/unix/sysv/linux/generic/xstat.c new file mode 100644 index 0000000000..4fd963a1d5 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/xstat.c @@ -0,0 +1,49 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +/* Ignore prototype to avoid error if we alias __xstat and __xstat64. */ +#define __xstat64 __xstat64_disable + +#include +#include +#include +#include +#include + +#include +#include + +/* Get information about the file NAME in BUF. */ +int +__xstat (int vers, const char *name, struct stat *buf) +{ + if (vers == _STAT_VER_KERNEL) + return INLINE_SYSCALL (newfstatat, 4, AT_FDCWD, name, buf, 0); + + errno = EINVAL; + return -1; +} + +hidden_def (__xstat) +weak_alias (__xstat, _xstat); +#ifdef XSTAT_IS_XSTAT64 +#undef __xstat64 +strong_alias (__xstat, __xstat64); +hidden_ver (__xstat, __xstat64) +#endif From 63d143a25de663958186bcd6ab6d9a2356c40324 Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Sat, 3 Dec 2011 21:14:25 -0500 Subject: [PATCH 4146/4487] Add sysdeps/tile, sysdeps/unix/sysv/linux/tile. Changes are tracked in ChangeLog.tile. Also add data/c++-types-tile-linux-gnu.data. --- ChangeLog.tile | 134 +++ data/c++-types-tile-linux-gnu.data | 67 ++ sysdeps/tile/Implies | 2 + sysdeps/tile/Makefile | 18 + sysdeps/tile/Versions | 6 + sysdeps/tile/__longjmp.S | 58 ++ sysdeps/tile/__tls_get_addr.S | 150 +++ sysdeps/tile/_mcount.S | 88 ++ sysdeps/tile/abort-instr.h | 2 + sysdeps/tile/backtrace.c | 1 + sysdeps/tile/bits/atomic.h | 87 ++ sysdeps/tile/bits/byteswap.h | 36 + sysdeps/tile/bits/endian.h | 13 + sysdeps/tile/bits/fenv.h | 43 + sysdeps/tile/bits/link.h | 58 ++ sysdeps/tile/bits/mathdef.h | 49 + sysdeps/tile/bits/mathinline.h | 45 + sysdeps/tile/bits/setjmp.h | 37 + sysdeps/tile/bsd-_setjmp.S | 1 + sysdeps/tile/bsd-setjmp.S | 1 + sysdeps/tile/bzero.S | 31 + sysdeps/tile/dl-lookupcfg.h | 28 + sysdeps/tile/dl-machine.h | 918 ++++++++++++++++++ sysdeps/tile/dl-runtime.c | 80 ++ sysdeps/tile/dl-start.S | 114 +++ sysdeps/tile/dl-tls.c | 28 + sysdeps/tile/dl-tls.h | 46 + sysdeps/tile/dl-trampoline.S | 194 ++++ sysdeps/tile/elf/start.S | 184 ++++ sysdeps/tile/fegetenv.c | 28 + sysdeps/tile/fegetround.c | 26 + sysdeps/tile/feholdexcpt.c | 28 + sysdeps/tile/fesetenv.c | 32 + sysdeps/tile/fesetround.c | 27 + sysdeps/tile/feupdateenv.c | 28 + sysdeps/tile/ffs.c | 45 + sysdeps/tile/ffsll.c | 1 + sysdeps/tile/gccframe.h | 22 + sysdeps/tile/jmpbuf-offsets.h | 63 ++ sysdeps/tile/jmpbuf-unwind.h | 49 + sysdeps/tile/ldsodefs.h | 41 + sysdeps/tile/machine-gmon.h | 26 + sysdeps/tile/nptl/Makefile | 21 + sysdeps/tile/nptl/pthread_spin_lock.c | 57 ++ sysdeps/tile/nptl/pthread_spin_trylock.c | 33 + sysdeps/tile/nptl/pthreaddef.h | 42 + sysdeps/tile/nptl/tcb-offsets.sym | 17 + sysdeps/tile/nptl/tls.h | 195 ++++ sysdeps/tile/preconfigure | 17 + sysdeps/tile/s_fma.c | 3 + sysdeps/tile/s_fmaf.c | 3 + sysdeps/tile/setjmp.S | 47 + sysdeps/tile/shlib-versions | 2 + sysdeps/tile/stackinfo.h | 49 + sysdeps/tile/sysdep.h | 120 +++ sysdeps/tile/tilegx/bits/atomic.h | 50 + sysdeps/tile/tilegx/bits/wordsize.h | 8 + sysdeps/tile/tilegx/memchr.c | 74 ++ sysdeps/tile/tilegx/memcpy.c | 196 ++++ sysdeps/tile/tilegx/memset.c | 151 +++ sysdeps/tile/tilegx/memusage.h | 31 + sysdeps/tile/tilegx/rawmemchr.c | 46 + sysdeps/tile/tilegx/strchr.c | 68 ++ sysdeps/tile/tilegx/strchrnul.c | 65 ++ sysdeps/tile/tilegx/string-endian.h | 36 + sysdeps/tile/tilegx/strlen.c | 40 + sysdeps/tile/tilegx/strrchr.c | 69 ++ sysdeps/tile/tilegx/tilegx32/Implies | 3 + sysdeps/tile/tilegx/tilegx64/Implies | 3 + sysdeps/tile/tilepro/Implies | 2 + sysdeps/tile/tilepro/bits/atomic.h | 82 ++ sysdeps/tile/tilepro/bits/wordsize.h | 3 + sysdeps/tile/tilepro/memchr.c | 73 ++ sysdeps/tile/tilepro/memcpy.S | 398 ++++++++ sysdeps/tile/tilepro/memset.c | 152 +++ sysdeps/tile/tilepro/memusage.h | 30 + sysdeps/tile/tilepro/rawmemchr.c | 46 + sysdeps/tile/tilepro/strchr.c | 69 ++ sysdeps/tile/tilepro/strchrnul.c | 66 ++ sysdeps/tile/tilepro/strlen.c | 40 + sysdeps/tile/tilepro/strrchr.c | 74 ++ sysdeps/tile/tls-macros.h | 57 ++ sysdeps/tile/tst-audit.h | 24 + sysdeps/unix/sysv/linux/tile/Makefile | 15 + sysdeps/unix/sysv/linux/tile/Versions | 11 + .../unix/sysv/linux/tile/bits/environments.h | 101 ++ sysdeps/unix/sysv/linux/tile/bits/local_lim.h | 101 ++ sysdeps/unix/sysv/linux/tile/bits/mman.h | 110 +++ sysdeps/unix/sysv/linux/tile/bits/mman.h~ | 173 ++++ sysdeps/unix/sysv/linux/tile/bits/sigaction.h | 78 ++ sysdeps/unix/sysv/linux/tile/bits/siginfo.h | 319 ++++++ sysdeps/unix/sysv/linux/tile/cacheflush.c | 35 + sysdeps/unix/sysv/linux/tile/configure | 4 + sysdeps/unix/sysv/linux/tile/configure.in | 4 + sysdeps/unix/sysv/linux/tile/getcontext.S | 96 ++ .../unix/sysv/linux/tile/kernel-features.h | 44 + sysdeps/unix/sysv/linux/tile/makecontext.c | 68 ++ sysdeps/unix/sysv/linux/tile/nptl/Makefile | 7 + .../sysv/linux/tile/nptl/bits/pthreadtypes.h | 221 +++++ .../sysv/linux/tile/nptl/bits/semaphore.h | 42 + sysdeps/unix/sysv/linux/tile/nptl/clone.S | 220 +++++ .../unix/sysv/linux/tile/nptl/createthread.c | 25 + sysdeps/unix/sysv/linux/tile/nptl/fork.c | 32 + .../unix/sysv/linux/tile/nptl/lowlevellock.h | 281 ++++++ sysdeps/unix/sysv/linux/tile/nptl/pt-vfork.S | 2 + .../unix/sysv/linux/tile/nptl/pthread_once.c | 95 ++ .../unix/sysv/linux/tile/nptl/sysdep-cancel.h | 155 +++ sysdeps/unix/sysv/linux/tile/nptl/vfork.S | 81 ++ sysdeps/unix/sysv/linux/tile/nptl/waitpid.S | 20 + sysdeps/unix/sysv/linux/tile/profil-counter.h | 27 + sysdeps/unix/sysv/linux/tile/set_dataplane.c | 37 + sysdeps/unix/sysv/linux/tile/setcontext.S | 202 ++++ sysdeps/unix/sysv/linux/tile/sigcontextinfo.h | 28 + sysdeps/unix/sysv/linux/tile/swapcontext.S | 87 ++ sysdeps/unix/sysv/linux/tile/sys/cachectl.h | 37 + sysdeps/unix/sysv/linux/tile/sys/dataplane.h | 32 + sysdeps/unix/sysv/linux/tile/sys/procfs.h | 129 +++ sysdeps/unix/sysv/linux/tile/sys/ptrace.h | 145 +++ sysdeps/unix/sysv/linux/tile/sys/reg.h | 2 + sysdeps/unix/sysv/linux/tile/sys/ucontext.h | 71 ++ sysdeps/unix/sysv/linux/tile/sys/user.h | 1 + sysdeps/unix/sysv/linux/tile/syscall.S | 33 + sysdeps/unix/sysv/linux/tile/sysdep.c | 34 + sysdeps/unix/sysv/linux/tile/sysdep.h | 224 +++++ sysdeps/unix/sysv/linux/tile/tilegx/ioctl.S | 42 + .../unix/sysv/linux/tile/tilegx/ldconfig.h | 27 + .../sysv/linux/tile/tilegx/register-dump.h | 124 +++ .../sysv/linux/tile/tilegx/tilegx32/Implies | 4 + .../sysv/linux/tile/tilegx/tilegx64/Implies | 4 + sysdeps/unix/sysv/linux/tile/tilepro/Implies | 3 + .../unix/sysv/linux/tile/tilepro/ldconfig.h | 26 + .../sysv/linux/tile/tilepro/register-dump.h | 112 +++ sysdeps/unix/sysv/linux/tile/ucontext_i.h | 42 + 133 files changed, 9310 insertions(+) create mode 100644 ChangeLog.tile create mode 100644 data/c++-types-tile-linux-gnu.data create mode 100644 sysdeps/tile/Implies create mode 100644 sysdeps/tile/Makefile create mode 100644 sysdeps/tile/Versions create mode 100644 sysdeps/tile/__longjmp.S create mode 100644 sysdeps/tile/__tls_get_addr.S create mode 100644 sysdeps/tile/_mcount.S create mode 100644 sysdeps/tile/abort-instr.h create mode 100644 sysdeps/tile/backtrace.c create mode 100644 sysdeps/tile/bits/atomic.h create mode 100644 sysdeps/tile/bits/byteswap.h create mode 100644 sysdeps/tile/bits/endian.h create mode 100644 sysdeps/tile/bits/fenv.h create mode 100644 sysdeps/tile/bits/link.h create mode 100644 sysdeps/tile/bits/mathdef.h create mode 100644 sysdeps/tile/bits/mathinline.h create mode 100644 sysdeps/tile/bits/setjmp.h create mode 100644 sysdeps/tile/bsd-_setjmp.S create mode 100644 sysdeps/tile/bsd-setjmp.S create mode 100644 sysdeps/tile/bzero.S create mode 100644 sysdeps/tile/dl-lookupcfg.h create mode 100644 sysdeps/tile/dl-machine.h create mode 100644 sysdeps/tile/dl-runtime.c create mode 100644 sysdeps/tile/dl-start.S create mode 100644 sysdeps/tile/dl-tls.c create mode 100644 sysdeps/tile/dl-tls.h create mode 100644 sysdeps/tile/dl-trampoline.S create mode 100644 sysdeps/tile/elf/start.S create mode 100644 sysdeps/tile/fegetenv.c create mode 100644 sysdeps/tile/fegetround.c create mode 100644 sysdeps/tile/feholdexcpt.c create mode 100644 sysdeps/tile/fesetenv.c create mode 100644 sysdeps/tile/fesetround.c create mode 100644 sysdeps/tile/feupdateenv.c create mode 100644 sysdeps/tile/ffs.c create mode 100644 sysdeps/tile/ffsll.c create mode 100644 sysdeps/tile/gccframe.h create mode 100644 sysdeps/tile/jmpbuf-offsets.h create mode 100644 sysdeps/tile/jmpbuf-unwind.h create mode 100644 sysdeps/tile/ldsodefs.h create mode 100644 sysdeps/tile/machine-gmon.h create mode 100644 sysdeps/tile/nptl/Makefile create mode 100644 sysdeps/tile/nptl/pthread_spin_lock.c create mode 100644 sysdeps/tile/nptl/pthread_spin_trylock.c create mode 100644 sysdeps/tile/nptl/pthreaddef.h create mode 100644 sysdeps/tile/nptl/tcb-offsets.sym create mode 100644 sysdeps/tile/nptl/tls.h create mode 100644 sysdeps/tile/preconfigure create mode 100644 sysdeps/tile/s_fma.c create mode 100644 sysdeps/tile/s_fmaf.c create mode 100644 sysdeps/tile/setjmp.S create mode 100644 sysdeps/tile/shlib-versions create mode 100644 sysdeps/tile/stackinfo.h create mode 100644 sysdeps/tile/sysdep.h create mode 100644 sysdeps/tile/tilegx/bits/atomic.h create mode 100644 sysdeps/tile/tilegx/bits/wordsize.h create mode 100644 sysdeps/tile/tilegx/memchr.c create mode 100644 sysdeps/tile/tilegx/memcpy.c create mode 100644 sysdeps/tile/tilegx/memset.c create mode 100644 sysdeps/tile/tilegx/memusage.h create mode 100644 sysdeps/tile/tilegx/rawmemchr.c create mode 100644 sysdeps/tile/tilegx/strchr.c create mode 100644 sysdeps/tile/tilegx/strchrnul.c create mode 100644 sysdeps/tile/tilegx/string-endian.h create mode 100644 sysdeps/tile/tilegx/strlen.c create mode 100644 sysdeps/tile/tilegx/strrchr.c create mode 100644 sysdeps/tile/tilegx/tilegx32/Implies create mode 100644 sysdeps/tile/tilegx/tilegx64/Implies create mode 100644 sysdeps/tile/tilepro/Implies create mode 100644 sysdeps/tile/tilepro/bits/atomic.h create mode 100644 sysdeps/tile/tilepro/bits/wordsize.h create mode 100644 sysdeps/tile/tilepro/memchr.c create mode 100644 sysdeps/tile/tilepro/memcpy.S create mode 100644 sysdeps/tile/tilepro/memset.c create mode 100644 sysdeps/tile/tilepro/memusage.h create mode 100644 sysdeps/tile/tilepro/rawmemchr.c create mode 100644 sysdeps/tile/tilepro/strchr.c create mode 100644 sysdeps/tile/tilepro/strchrnul.c create mode 100644 sysdeps/tile/tilepro/strlen.c create mode 100644 sysdeps/tile/tilepro/strrchr.c create mode 100644 sysdeps/tile/tls-macros.h create mode 100644 sysdeps/tile/tst-audit.h create mode 100644 sysdeps/unix/sysv/linux/tile/Makefile create mode 100644 sysdeps/unix/sysv/linux/tile/Versions create mode 100644 sysdeps/unix/sysv/linux/tile/bits/environments.h create mode 100644 sysdeps/unix/sysv/linux/tile/bits/local_lim.h create mode 100644 sysdeps/unix/sysv/linux/tile/bits/mman.h create mode 100644 sysdeps/unix/sysv/linux/tile/bits/mman.h~ create mode 100644 sysdeps/unix/sysv/linux/tile/bits/sigaction.h create mode 100644 sysdeps/unix/sysv/linux/tile/bits/siginfo.h create mode 100644 sysdeps/unix/sysv/linux/tile/cacheflush.c create mode 100644 sysdeps/unix/sysv/linux/tile/configure create mode 100644 sysdeps/unix/sysv/linux/tile/configure.in create mode 100644 sysdeps/unix/sysv/linux/tile/getcontext.S create mode 100644 sysdeps/unix/sysv/linux/tile/kernel-features.h create mode 100644 sysdeps/unix/sysv/linux/tile/makecontext.c create mode 100644 sysdeps/unix/sysv/linux/tile/nptl/Makefile create mode 100644 sysdeps/unix/sysv/linux/tile/nptl/bits/pthreadtypes.h create mode 100644 sysdeps/unix/sysv/linux/tile/nptl/bits/semaphore.h create mode 100644 sysdeps/unix/sysv/linux/tile/nptl/clone.S create mode 100644 sysdeps/unix/sysv/linux/tile/nptl/createthread.c create mode 100644 sysdeps/unix/sysv/linux/tile/nptl/fork.c create mode 100644 sysdeps/unix/sysv/linux/tile/nptl/lowlevellock.h create mode 100644 sysdeps/unix/sysv/linux/tile/nptl/pt-vfork.S create mode 100644 sysdeps/unix/sysv/linux/tile/nptl/pthread_once.c create mode 100644 sysdeps/unix/sysv/linux/tile/nptl/sysdep-cancel.h create mode 100644 sysdeps/unix/sysv/linux/tile/nptl/vfork.S create mode 100644 sysdeps/unix/sysv/linux/tile/nptl/waitpid.S create mode 100644 sysdeps/unix/sysv/linux/tile/profil-counter.h create mode 100644 sysdeps/unix/sysv/linux/tile/set_dataplane.c create mode 100644 sysdeps/unix/sysv/linux/tile/setcontext.S create mode 100644 sysdeps/unix/sysv/linux/tile/sigcontextinfo.h create mode 100644 sysdeps/unix/sysv/linux/tile/swapcontext.S create mode 100644 sysdeps/unix/sysv/linux/tile/sys/cachectl.h create mode 100644 sysdeps/unix/sysv/linux/tile/sys/dataplane.h create mode 100644 sysdeps/unix/sysv/linux/tile/sys/procfs.h create mode 100644 sysdeps/unix/sysv/linux/tile/sys/ptrace.h create mode 100644 sysdeps/unix/sysv/linux/tile/sys/reg.h create mode 100644 sysdeps/unix/sysv/linux/tile/sys/ucontext.h create mode 100644 sysdeps/unix/sysv/linux/tile/sys/user.h create mode 100644 sysdeps/unix/sysv/linux/tile/syscall.S create mode 100644 sysdeps/unix/sysv/linux/tile/sysdep.c create mode 100644 sysdeps/unix/sysv/linux/tile/sysdep.h create mode 100644 sysdeps/unix/sysv/linux/tile/tilegx/ioctl.S create mode 100644 sysdeps/unix/sysv/linux/tile/tilegx/ldconfig.h create mode 100644 sysdeps/unix/sysv/linux/tile/tilegx/register-dump.h create mode 100644 sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/Implies create mode 100644 sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/Implies create mode 100644 sysdeps/unix/sysv/linux/tile/tilepro/Implies create mode 100644 sysdeps/unix/sysv/linux/tile/tilepro/ldconfig.h create mode 100644 sysdeps/unix/sysv/linux/tile/tilepro/register-dump.h create mode 100644 sysdeps/unix/sysv/linux/tile/ucontext_i.h diff --git a/ChangeLog.tile b/ChangeLog.tile new file mode 100644 index 0000000000..7e97f5fa42 --- /dev/null +++ b/ChangeLog.tile @@ -0,0 +1,134 @@ +2011-12-03 Chris Metcalf + + * data/c++-types-tile-linux-gnu.data: New file. + * sysdeps/tile/Implies: New file. + * sysdeps/tile/Makefile: New file. + * sysdeps/tile/Versions: New file. + * sysdeps/tile/__longjmp.S: New file. + * sysdeps/tile/__tls_get_addr.S: New file. + * sysdeps/tile/_mcount.S: New file. + * sysdeps/tile/abort-instr.h: New file. + * sysdeps/tile/backtrace.c: New file. + * sysdeps/tile/bits/atomic.h: New file. + * sysdeps/tile/bits/byteswap.h: New file. + * sysdeps/tile/bits/endian.h: New file. + * sysdeps/tile/bits/fenv.h: New file. + * sysdeps/tile/bits/link.h: New file. + * sysdeps/tile/bits/mathdef.h: New file. + * sysdeps/tile/bits/mathinline.h: New file. + * sysdeps/tile/bits/setjmp.h: New file. + * sysdeps/tile/bsd-_setjmp.S: New file. + * sysdeps/tile/bsd-setjmp.S: New file. + * sysdeps/tile/bzero.S: New file. + * sysdeps/tile/dl-lookupcfg.h: New file. + * sysdeps/tile/dl-machine.h: New file. + * sysdeps/tile/dl-runtime.c: New file. + * sysdeps/tile/dl-start.S: New file. + * sysdeps/tile/dl-tls.c: New file. + * sysdeps/tile/dl-tls.h: New file. + * sysdeps/tile/dl-trampoline.S: New file. + * sysdeps/tile/elf/start.S: New file. + * sysdeps/tile/fegetenv.c: New file. + * sysdeps/tile/fegetround.c: New file. + * sysdeps/tile/feholdexcpt.c: New file. + * sysdeps/tile/fesetenv.c: New file. + * sysdeps/tile/fesetround.c: New file. + * sysdeps/tile/feupdateenv.c: New file. + * sysdeps/tile/ffs.c: New file. + * sysdeps/tile/ffsll.c: New file. + * sysdeps/tile/gccframe.h: New file. + * sysdeps/tile/jmpbuf-offsets.h: New file. + * sysdeps/tile/jmpbuf-unwind.h: New file. + * sysdeps/tile/ldsodefs.h: New file. + * sysdeps/tile/machine-gmon.h: New file. + * sysdeps/tile/nptl/Makefile: New file. + * sysdeps/tile/nptl/pthread_spin_lock.c: New file. + * sysdeps/tile/nptl/pthread_spin_trylock.c: New file. + * sysdeps/tile/nptl/pthreaddef.h: New file. + * sysdeps/tile/nptl/tcb-offsets.sym: New file. + * sysdeps/tile/nptl/tls.h: New file. + * sysdeps/tile/preconfigure: New file. + * sysdeps/tile/s_fma.c: New file. + * sysdeps/tile/s_fmaf.c: New file. + * sysdeps/tile/setjmp.S: New file. + * sysdeps/tile/shlib-versions: New file. + * sysdeps/tile/stackinfo.h: New file. + * sysdeps/tile/sysdep.h: New file. + * sysdeps/tile/tilegx/bits/atomic.h: New file. + * sysdeps/tile/tilegx/bits/wordsize.h: New file. + * sysdeps/tile/tilegx/memchr.c: New file. + * sysdeps/tile/tilegx/memcpy.c: New file. + * sysdeps/tile/tilegx/memset.c: New file. + * sysdeps/tile/tilegx/memusage.h: New file. + * sysdeps/tile/tilegx/rawmemchr.c: New file. + * sysdeps/tile/tilegx/strchr.c: New file. + * sysdeps/tile/tilegx/strchrnul.c: New file. + * sysdeps/tile/tilegx/string-endian.h: New file. + * sysdeps/tile/tilegx/strlen.c: New file. + * sysdeps/tile/tilegx/strrchr.c: New file. + * sysdeps/tile/tilegx/tilegx32/Implies: New file. + * sysdeps/tile/tilegx/tilegx64/Implies: New file. + * sysdeps/tile/tilepro/Implies: New file. + * sysdeps/tile/tilepro/bits/atomic.h: New file. + * sysdeps/tile/tilepro/bits/wordsize.h: New file. + * sysdeps/tile/tilepro/memchr.c: New file. + * sysdeps/tile/tilepro/memcpy.S: New file. + * sysdeps/tile/tilepro/memset.c: New file. + * sysdeps/tile/tilepro/memusage.h: New file. + * sysdeps/tile/tilepro/rawmemchr.c: New file. + * sysdeps/tile/tilepro/strchr.c: New file. + * sysdeps/tile/tilepro/strchrnul.c: New file. + * sysdeps/tile/tilepro/strlen.c: New file. + * sysdeps/tile/tilepro/strrchr.c: New file. + * sysdeps/tile/tls-macros.h: New file. + * sysdeps/tile/tst-audit.h: New file. + * sysdeps/unix/sysv/linux/tile/Makefile: New file. + * sysdeps/unix/sysv/linux/tile/Versions: New file. + * sysdeps/unix/sysv/linux/tile/bits/environments.h: New file. + * sysdeps/unix/sysv/linux/tile/bits/local_lim.h: New file. + * sysdeps/unix/sysv/linux/tile/bits/mman.h: New file. + * sysdeps/unix/sysv/linux/tile/bits/mman.h~: New file. + * sysdeps/unix/sysv/linux/tile/bits/sigaction.h: New file. + * sysdeps/unix/sysv/linux/tile/bits/siginfo.h: New file. + * sysdeps/unix/sysv/linux/tile/cacheflush.c: New file. + * sysdeps/unix/sysv/linux/tile/configure: New file. + * sysdeps/unix/sysv/linux/tile/configure.in: New file. + * sysdeps/unix/sysv/linux/tile/getcontext.S: New file. + * sysdeps/unix/sysv/linux/tile/kernel-features.h: New file. + * sysdeps/unix/sysv/linux/tile/makecontext.c: New file. + * sysdeps/unix/sysv/linux/tile/nptl/Makefile: New file. + * sysdeps/unix/sysv/linux/tile/nptl/bits/pthreadtypes.h: New file. + * sysdeps/unix/sysv/linux/tile/nptl/bits/semaphore.h: New file. + * sysdeps/unix/sysv/linux/tile/nptl/clone.S: New file. + * sysdeps/unix/sysv/linux/tile/nptl/createthread.c: New file. + * sysdeps/unix/sysv/linux/tile/nptl/fork.c: New file. + * sysdeps/unix/sysv/linux/tile/nptl/lowlevellock.h: New file. + * sysdeps/unix/sysv/linux/tile/nptl/pt-vfork.S: New file. + * sysdeps/unix/sysv/linux/tile/nptl/pthread_once.c: New file. + * sysdeps/unix/sysv/linux/tile/nptl/sysdep-cancel.h: New file. + * sysdeps/unix/sysv/linux/tile/nptl/vfork.S: New file. + * sysdeps/unix/sysv/linux/tile/nptl/waitpid.S: New file. + * sysdeps/unix/sysv/linux/tile/profil-counter.h: New file. + * sysdeps/unix/sysv/linux/tile/set_dataplane.c: New file. + * sysdeps/unix/sysv/linux/tile/setcontext.S: New file. + * sysdeps/unix/sysv/linux/tile/sigcontextinfo.h: New file. + * sysdeps/unix/sysv/linux/tile/swapcontext.S: New file. + * sysdeps/unix/sysv/linux/tile/sys/cachectl.h: New file. + * sysdeps/unix/sysv/linux/tile/sys/dataplane.h: New file. + * sysdeps/unix/sysv/linux/tile/sys/procfs.h: New file. + * sysdeps/unix/sysv/linux/tile/sys/ptrace.h: New file. + * sysdeps/unix/sysv/linux/tile/sys/reg.h: New file. + * sysdeps/unix/sysv/linux/tile/sys/ucontext.h: New file. + * sysdeps/unix/sysv/linux/tile/sys/user.h: New file. + * sysdeps/unix/sysv/linux/tile/syscall.S: New file. + * sysdeps/unix/sysv/linux/tile/sysdep.c: New file. + * sysdeps/unix/sysv/linux/tile/sysdep.h: New file. + * sysdeps/unix/sysv/linux/tile/tilegx/ioctl.S: New file. + * sysdeps/unix/sysv/linux/tile/tilegx/ldconfig.h: New file. + * sysdeps/unix/sysv/linux/tile/tilegx/register-dump.h: New file. + * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/Implies: New file. + * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/Implies: New file. + * sysdeps/unix/sysv/linux/tile/tilepro/Implies: New file. + * sysdeps/unix/sysv/linux/tile/tilepro/ldconfig.h: New file. + * sysdeps/unix/sysv/linux/tile/tilepro/register-dump.h: New file. + * sysdeps/unix/sysv/linux/tile/ucontext_i.h: New file. diff --git a/data/c++-types-tile-linux-gnu.data b/data/c++-types-tile-linux-gnu.data new file mode 100644 index 0000000000..303f4570c8 --- /dev/null +++ b/data/c++-types-tile-linux-gnu.data @@ -0,0 +1,67 @@ +blkcnt64_t:x +blkcnt_t:l +blksize_t:i +caddr_t:Pc +clockid_t:i +clock_t:l +daddr_t:i +dev_t:y +fd_mask:l +fsblkcnt64_t:y +fsblkcnt_t:m +fsfilcnt64_t:y +fsfilcnt_t:m +fsid_t:8__fsid_t +gid_t:j +id_t:j +ino64_t:y +ino_t:m +int16_t:s +int32_t:i +int64_t:x +int8_t:a +intptr_t:i +key_t:i +loff_t:x +mode_t:j +nlink_t:j +off64_t:x +off_t:l +pid_t:i +pthread_attr_t:14pthread_attr_t +pthread_barrier_t:17pthread_barrier_t +pthread_barrierattr_t:21pthread_barrierattr_t +pthread_cond_t:14pthread_cond_t +pthread_condattr_t:18pthread_condattr_t +pthread_key_t:j +pthread_mutex_t:15pthread_mutex_t +pthread_mutexattr_t:19pthread_mutexattr_t +pthread_once_t:i +pthread_rwlock_t:16pthread_rwlock_t +pthread_rwlockattr_t:20pthread_rwlockattr_t +pthread_spinlock_t:i +pthread_t:m +quad_t:x +register_t:i +rlim64_t:y +rlim_t:m +sigset_t:10__sigset_t +size_t:j +socklen_t:j +ssize_t:i +suseconds_t:l +time_t:l +u_char:h +uid_t:j +uint:j +u_int:j +u_int16_t:t +u_int32_t:j +u_int64_t:y +u_int8_t:h +ulong:m +u_long:m +u_quad_t:y +useconds_t:j +ushort:t +u_short:t diff --git a/sysdeps/tile/Implies b/sysdeps/tile/Implies new file mode 100644 index 0000000000..5b29b26128 --- /dev/null +++ b/sysdeps/tile/Implies @@ -0,0 +1,2 @@ +ieee754/dbl-64 +ieee754/flt-32 diff --git a/sysdeps/tile/Makefile b/sysdeps/tile/Makefile new file mode 100644 index 0000000000..08c3385502 --- /dev/null +++ b/sysdeps/tile/Makefile @@ -0,0 +1,18 @@ +# We don't support long doubles as a distinct type. We don't need to set +# this variable; it's here mostly for documentational purposes. + +long-double-fcts = no + +ifeq ($(subdir),gmon) +sysdep_routines += _mcount +endif + +ifeq ($(subdir),elf) +# Extra shared linker files to link only into dl-allobjs.so. +sysdep-rtld-routines += dl-start __tls_get_addr +endif + +ifeq ($(subdir),csu) +# Avoid .cfi_startproc/endproc markers when creating init and fini pieces. +CFLAGS-initfini.s += -fno-asynchronous-unwind-tables +endif diff --git a/sysdeps/tile/Versions b/sysdeps/tile/Versions new file mode 100644 index 0000000000..b275d7ff3b --- /dev/null +++ b/sysdeps/tile/Versions @@ -0,0 +1,6 @@ +libc { + GLIBC_2.12 { + # name requested by gcc community. + __mcount; + } +} diff --git a/sysdeps/tile/__longjmp.S b/sysdeps/tile/__longjmp.S new file mode 100644 index 0000000000..f31c662499 --- /dev/null +++ b/sysdeps/tile/__longjmp.S @@ -0,0 +1,58 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include +#include + +/* PL to return to via iret in longjmp */ +#define RETURN_PL 0 + + .text +ENTRY (__longjmp) + FEEDBACK_ENTER(__longjmp) + +#define RESTORE(r) { LD r, r0 ; ADDI_PTR r0, r0, REGSIZE } + FOR_EACH_CALLEE_SAVED_REG(RESTORE) + + /* Make longjmp(buf, 0) return "1" instead. + At the same time, construct our iret context; we set ICS so + we can validly load EX_CONTEXT for iret without being + interrupted halfway through. */ + { + LD r2, r0 /* retrieve ICS bit from jmp_buf */ + movei r3, 1 + CMPEQI r0, r1, 0 + } + { + mtspr INTERRUPT_CRITICAL_SECTION, r3 + shli r2, r2, SPR_EX_CONTEXT_0_1__ICS_SHIFT + } + { + mtspr EX_CONTEXT_0_0, lr + ori r2, r2, RETURN_PL + } + { + or r0, r1, r0 + mtspr EX_CONTEXT_0_1, r2 + } + iret + jrp lr /* Keep the backtracer happy. */ +END (__longjmp) diff --git a/sysdeps/tile/__tls_get_addr.S b/sysdeps/tile/__tls_get_addr.S new file mode 100644 index 0000000000..ca491c51b7 --- /dev/null +++ b/sysdeps/tile/__tls_get_addr.S @@ -0,0 +1,150 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include + +#ifdef _LP64 +#define LOG_SIZEOF_DTV_T 4 +#else +#define LOG_SIZEOF_DTV_T 3 +#endif + +/* On entry, r0 points to two words, the module and the offset. + On return, r0 holds the pointer to the relevant TLS memory. + Only registers r25..r29 are clobbered by the call. */ + + .text +ENTRY (__tls_get_addr) + { + lnk r25 + ADDI_PTR r27, tp, DTV_OFFSET + } +.Llnk: +#ifdef __tilegx__ + { + LD_PTR r27, r27 /* r27 = THREAD_DTV() */ + moveli r26, hw1_last(_rtld_local + TLS_GENERATION_OFFSET - .Llnk) + } + shl16insli r26, r26, hw0(_rtld_local + TLS_GENERATION_OFFSET - .Llnk) + { + ADD_PTR r25, r25, r26 + LD_PTR r26, r0 /* r26 = ti_module */ + } +#else + { + LD_PTR r27, r27 /* r27 = THREAD_DTV() */ + addli r25, r25, lo16(_rtld_local + TLS_GENERATION_OFFSET - .Llnk) + } + { + auli r25, r25, ha16(_rtld_local + TLS_GENERATION_OFFSET - .Llnk) + LD_PTR r26, r0 /* r26 = ti_module */ + } +#endif + LD_PTR r25, r25 /* r25 = DL(dl_tls_generation) */ + { + LD_PTR r28, r27 /* r28 = THREAD_DTV()->counter */ + ADDI_PTR r29, r0, __SIZEOF_POINTER__ + } + { + LD_PTR r29, r29 /* r29 = ti_offset */ + CMPEQ r25, r28, r25 /* r25 nonzero if generation OK */ + shli r28, r26, LOG_SIZEOF_DTV_T /* byte index into dtv array */ + } + { + BEQZ r25, .Lslowpath + CMPEQI r25, r26, -1 /* r25 nonzero if ti_module invalid */ + } + { + BNEZ r25, .Lslowpath + ADD_PTR r28, r28, r27 /* pointer into module array */ + } + LD_PTR r26, r28 /* r26 = module TLS pointer */ + { + ADD_PTR r0, r26, r29 + jrp lr + } + +.Lslowpath: + { + ST sp, lr + ADDLI_PTR r29, sp, - (25 * REGSIZE) + } + cfi_offset (lr, 0) + { + ST r29, sp + ADDLI_PTR sp, sp, - (26 * REGSIZE) + } + cfi_def_cfa_offset (26 * REGSIZE) + ADDI_PTR r29, sp, (2 * REGSIZE) + { ST r29, r1; ADDI_PTR r29, r29, REGSIZE } + { ST r29, r2; ADDI_PTR r29, r29, REGSIZE } + { ST r29, r3; ADDI_PTR r29, r29, REGSIZE } + { ST r29, r4; ADDI_PTR r29, r29, REGSIZE } + { ST r29, r5; ADDI_PTR r29, r29, REGSIZE } + { ST r29, r6; ADDI_PTR r29, r29, REGSIZE } + { ST r29, r7; ADDI_PTR r29, r29, REGSIZE } + { ST r29, r8; ADDI_PTR r29, r29, REGSIZE } + { ST r29, r9; ADDI_PTR r29, r29, REGSIZE } + { ST r29, r10; ADDI_PTR r29, r29, REGSIZE } + { ST r29, r11; ADDI_PTR r29, r29, REGSIZE } + { ST r29, r12; ADDI_PTR r29, r29, REGSIZE } + { ST r29, r13; ADDI_PTR r29, r29, REGSIZE } + { ST r29, r14; ADDI_PTR r29, r29, REGSIZE } + { ST r29, r15; ADDI_PTR r29, r29, REGSIZE } + { ST r29, r16; ADDI_PTR r29, r29, REGSIZE } + { ST r29, r17; ADDI_PTR r29, r29, REGSIZE } + { ST r29, r18; ADDI_PTR r29, r29, REGSIZE } + { ST r29, r19; ADDI_PTR r29, r29, REGSIZE } + { ST r29, r20; ADDI_PTR r29, r29, REGSIZE } + { ST r29, r21; ADDI_PTR r29, r29, REGSIZE } + { ST r29, r22; ADDI_PTR r29, r29, REGSIZE } + { ST r29, r23; ADDI_PTR r29, r29, REGSIZE } + { ST r29, r24; ADDI_PTR r29, r29, REGSIZE } + .hidden __tls_get_addr_slow + jal __tls_get_addr_slow + ADDI_PTR r29, sp, (2 * REGSIZE) + { LD r1, r29; ADDI_PTR r29, r29, REGSIZE } + { LD r2, r29; ADDI_PTR r29, r29, REGSIZE } + { LD r3, r29; ADDI_PTR r29, r29, REGSIZE } + { LD r4, r29; ADDI_PTR r29, r29, REGSIZE } + { LD r5, r29; ADDI_PTR r29, r29, REGSIZE } + { LD r6, r29; ADDI_PTR r29, r29, REGSIZE } + { LD r7, r29; ADDI_PTR r29, r29, REGSIZE } + { LD r8, r29; ADDI_PTR r29, r29, REGSIZE } + { LD r9, r29; ADDI_PTR r29, r29, REGSIZE } + { LD r10, r29; ADDI_PTR r29, r29, REGSIZE } + { LD r11, r29; ADDI_PTR r29, r29, REGSIZE } + { LD r12, r29; ADDI_PTR r29, r29, REGSIZE } + { LD r13, r29; ADDI_PTR r29, r29, REGSIZE } + { LD r14, r29; ADDI_PTR r29, r29, REGSIZE } + { LD r15, r29; ADDI_PTR r29, r29, REGSIZE } + { LD r16, r29; ADDI_PTR r29, r29, REGSIZE } + { LD r17, r29; ADDI_PTR r29, r29, REGSIZE } + { LD r18, r29; ADDI_PTR r29, r29, REGSIZE } + { LD r19, r29; ADDI_PTR r29, r29, REGSIZE } + { LD r20, r29; ADDI_PTR r29, r29, REGSIZE } + { LD r21, r29; ADDI_PTR r29, r29, REGSIZE } + { LD r22, r29; ADDI_PTR r29, r29, REGSIZE } + { LD r23, r29; ADDI_PTR r29, r29, REGSIZE } + { LD r24, r29; ADDLI_PTR sp, sp, (26 * REGSIZE) } + cfi_def_cfa_offset (0) + LD lr, sp + jrp lr +END (__tls_get_addr) diff --git a/sysdeps/tile/_mcount.S b/sysdeps/tile/_mcount.S new file mode 100644 index 0000000000..63708a1ddd --- /dev/null +++ b/sysdeps/tile/_mcount.S @@ -0,0 +1,88 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + Based on work contributed by David Mosberger (davidm@cs.arizona.edu). + + 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. */ + +/* Assembly stub to invoke __mcount_internal(). Compiler-generated + code calls mcount after executing a function's prologue, placing + the "lr" register in "r10" for the call. As a result "lr" is the + function that invoked mcount, and "r10" is mcount's caller's + caller. However, we have to save all the parameter registers here + before invoking _mcount_internal. Callee-save and temporary + registers need no special attention. We save r10 and restore it to + lr on the way out, to properly handle the case of ENTRY() in + assembly code, before lr is saved. We use the name __mcount since + the gcc community prefers using the reserved namespace. */ + +#include + + .text +ENTRY(__mcount) + { + ST sp, lr + ADDI_PTR r29, sp, - (12 * REGSIZE) + } + cfi_offset (lr, 0) + { + ADDI_PTR sp, sp, - (13 * REGSIZE) + ST r29, sp + ADDI_PTR r29, r29, REGSIZE + } + cfi_def_cfa_offset (13 * REGSIZE) + { ST r29, r0; ADDI_PTR r29, r29, REGSIZE } + { ST r29, r1; ADDI_PTR r29, r29, REGSIZE } + { ST r29, r2; ADDI_PTR r29, r29, REGSIZE } + { ST r29, r3; ADDI_PTR r29, r29, REGSIZE } + { ST r29, r4; ADDI_PTR r29, r29, REGSIZE } + { ST r29, r5; ADDI_PTR r29, r29, REGSIZE } + { ST r29, r6; ADDI_PTR r29, r29, REGSIZE } + { ST r29, r7; ADDI_PTR r29, r29, REGSIZE } + { ST r29, r8; ADDI_PTR r29, r29, REGSIZE } + { ST r29, r9; ADDI_PTR r29, r29, REGSIZE } + { ST r29, r10; ADDI_PTR r29, r29, REGSIZE; move r0, r10 } + { + move r1, lr + jal __mcount_internal + } + { + ADDI_PTR r29, sp, (2 * REGSIZE) + } + { LD r0, r29; ADDI_PTR r29, r29, REGSIZE } + { LD r1, r29; ADDI_PTR r29, r29, REGSIZE } + { LD r2, r29; ADDI_PTR r29, r29, REGSIZE } + { LD r3, r29; ADDI_PTR r29, r29, REGSIZE } + { LD r4, r29; ADDI_PTR r29, r29, REGSIZE } + { LD r5, r29; ADDI_PTR r29, r29, REGSIZE } + { LD r6, r29; ADDI_PTR r29, r29, REGSIZE } + { LD r7, r29; ADDI_PTR r29, r29, REGSIZE } + { LD r8, r29; ADDI_PTR r29, r29, REGSIZE } + { LD r9, r29; ADDI_PTR r29, r29, REGSIZE } + { LD r10, r29; ADDI_PTR sp, sp, (13 * REGSIZE) } + cfi_def_cfa_offset (0) + { + LD lr, sp + } + { + move lr, r10 + jrp lr + } +END(__mcount) + +#undef mcount +weak_alias (__mcount, _mcount) /* exported in gmon/Versions */ +weak_alias (__mcount, mcount) /* exported in stdlib/Versions */ diff --git a/sysdeps/tile/abort-instr.h b/sysdeps/tile/abort-instr.h new file mode 100644 index 0000000000..0f57da5198 --- /dev/null +++ b/sysdeps/tile/abort-instr.h @@ -0,0 +1,2 @@ +/* An instruction which should crash any program is `hlt'. */ +#define ABORT_INSTRUCTION asm ("ill") diff --git a/sysdeps/tile/backtrace.c b/sysdeps/tile/backtrace.c new file mode 100644 index 0000000000..297029456d --- /dev/null +++ b/sysdeps/tile/backtrace.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/tile/bits/atomic.h b/sysdeps/tile/bits/atomic.h new file mode 100644 index 0000000000..a0fdb6fbc0 --- /dev/null +++ b/sysdeps/tile/bits/atomic.h @@ -0,0 +1,87 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +/* The sub-architecture headers provide definitions for these macros + that work for "int" and "long" size values only: + + atomic_compare_and_exchange_val_acq() + atomic_exchange_acq() + atomic_exchange_and_add() + atomic_and_val() + atomic_or_val() + atomic_decrement_if_positive() [tilegx only] + + Here we provide generic definitions true for all Tilera chips. */ + +#include +#include + +typedef int32_t atomic32_t; +typedef uint32_t uatomic32_t; +typedef int_fast32_t atomic_fast32_t; +typedef uint_fast32_t uatomic_fast32_t; + +typedef int64_t atomic64_t; +typedef uint64_t uatomic64_t; +typedef int_fast64_t atomic_fast64_t; +typedef uint_fast64_t uatomic_fast64_t; + +typedef intptr_t atomicptr_t; +typedef uintptr_t uatomicptr_t; +typedef intmax_t atomic_max_t; +typedef uintmax_t uatomic_max_t; + +/* Barrier macro. */ +#define atomic_full_barrier() __sync_synchronize() + +/* APIs with "release" semantics. */ +#define atomic_compare_and_exchange_val_rel(mem, n, o) \ + ({ \ + atomic_full_barrier (); \ + atomic_compare_and_exchange_val_acq ((mem), (n), (o)); \ + }) +#define atomic_compare_and_exchange_bool_rel(mem, n, o) \ + ({ \ + atomic_full_barrier (); \ + atomic_compare_and_exchange_bool_acq ((mem), (n), (o)); \ + }) +#define atomic_exchange_rel(mem, n) \ + ({ \ + atomic_full_barrier (); \ + atomic_exchange_acq ((mem), (n)); \ + }) + +/* Various macros that should just be synonyms. */ +#define catomic_exchange_and_add atomic_exchange_and_add +#define atomic_and(mem, mask) ((void) atomic_and_val ((mem), (mask))) +#define catomic_and atomic_and +#define atomic_or(mem, mask) ((void) atomic_or_val ((mem), (mask))) +#define catomic_or atomic_or + +/* atomic_bit_test_set in terms of atomic_or_val. */ +#define atomic_bit_test_set(mem, bit) \ + ({ __typeof (*(mem)) __att0_mask = ((__typeof (*(mem))) 1 << (bit)); \ + atomic_or_val ((mem), __att0_mask) & __att0_mask; }) + +/* + * This non-existent symbol is called for unsupporrted sizes, + * indicating a bug in the caller. + */ +extern int __atomic_error_bad_argument_size(void) + __attribute__ ((warning ("bad sizeof atomic argument"))); diff --git a/sysdeps/tile/bits/byteswap.h b/sysdeps/tile/bits/byteswap.h new file mode 100644 index 0000000000..6858a3018d --- /dev/null +++ b/sysdeps/tile/bits/byteswap.h @@ -0,0 +1,36 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#if !defined _BYTESWAP_H && !defined _NETINET_IN_H && !defined _ENDIAN_H +# error "Never use directly; include instead." +#endif + +#ifndef _BITS_BYTESWAP_H +#define _BITS_BYTESWAP_H 1 + +/* gcc __builtin_bswap64() can constant-fold, etc, so always use it. */ +#define __bswap_16(x) ((unsigned short)(__builtin_bswap32(x) >> 16)) +#define __bswap_32(x) ((unsigned int)__builtin_bswap32(x)) +#define __bswap_64(x) ((unsigned long long)__builtin_bswap64(x)) + +#define __bswap_constant_16(x) __bswap_16(x) +#define __bswap_constant_32(x) __bswap_32(x) +#define __bswap_constant_64(x) __bswap_64(x) + +#endif /* _BITS_BYTESWAP_H */ diff --git a/sysdeps/tile/bits/endian.h b/sysdeps/tile/bits/endian.h new file mode 100644 index 0000000000..43d94bb7a7 --- /dev/null +++ b/sysdeps/tile/bits/endian.h @@ -0,0 +1,13 @@ +/* Set endianness for tile. */ + +#ifndef _ENDIAN_H +# error "Never use directly; include instead." +#endif + +#if defined __BIG_ENDIAN__ +# define __BYTE_ORDER __BIG_ENDIAN +#elif defined __LITTLE_ENDIAN__ +# define __BYTE_ORDER __LITTLE_ENDIAN +#else +# error "Endianness not declared!!" +#endif diff --git a/sysdeps/tile/bits/fenv.h b/sysdeps/tile/bits/fenv.h new file mode 100644 index 0000000000..56fe6fd911 --- /dev/null +++ b/sysdeps/tile/bits/fenv.h @@ -0,0 +1,43 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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 _FENV_H +# error "Never use directly; include instead." +#endif + +/* The TILE-Gx hardware does not provide floating-point exception + handling, and TILEPro does not support any floating-point operations. */ +#define FE_ALL_EXCEPT 0 + +/* TILE-Gx supports only round-to-nearest. The software + floating-point support also acts this way. */ +enum + { + FE_TONEAREST = 1, +#define FE_TONEAREST FE_TONEAREST + }; + +/* Type representing exception flags (if there were any). */ +typedef unsigned int fexcept_t; + +/* Type representing floating-point environment. */ +typedef unsigned int fenv_t; + +/* If the default argument is used we use this value. */ +#define FE_DFL_ENV ((__const fenv_t *) -1l) diff --git a/sysdeps/tile/bits/link.h b/sysdeps/tile/bits/link.h new file mode 100644 index 0000000000..f4b7462172 --- /dev/null +++ b/sysdeps/tile/bits/link.h @@ -0,0 +1,58 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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 _LINK_H +# error "Never include directly; use instead." +#endif + +#define __need_int_reg_t +#include + + +/* Registers for entry into PLT. */ +typedef struct La_tile_regs +{ + __uint_reg_t lr_reg[10]; +} La_tile_regs; + +/* Return values for calls from PLT. */ +typedef struct La_tile_retval +{ + /* Up to ten registers can be used for a return value (e.g. small struct). */ + __uint_reg_t lrv_reg[10]; +} La_tile_retval; + + +__BEGIN_DECLS + +extern ElfW(Addr) la_tile_gnu_pltenter (ElfW(Sym) *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + La_tile_regs *__regs, + unsigned int *__flags, + const char *__symname, + long int *__framesizep); +extern unsigned int la_tile_gnu_pltexit (ElfW(Sym) *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + const La_tile_regs *__inregs, + La_tile_retval *__outregs, + const char *__symname); + +__END_DECLS diff --git a/sysdeps/tile/bits/mathdef.h b/sysdeps/tile/bits/mathdef.h new file mode 100644 index 0000000000..7c7ef5dd97 --- /dev/null +++ b/sysdeps/tile/bits/mathdef.h @@ -0,0 +1,49 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#if !defined _MATH_H && !defined _COMPLEX_H +# error "Never use directly; include instead" +#endif + +#if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF +# define _MATH_H_MATHDEF 1 + +/* "float" and "double" expressions evaluated as "float" and "double". */ +typedef float float_t; +typedef double double_t; + +/* The values returned by `ilogb' for 0 and NaN respectively. */ +# define FP_ILOGB0 (-2147483647) +# define FP_ILOGBNAN (2147483647) + +/* The GCC 4.6 compiler will define __FP_FAST_FMA{,F,L} if the fma{,f,l} + builtins are supported. */ +# if __FP_FAST_FMA +# define FP_FAST_FMA 1 +# endif + +# if __FP_FAST_FMAF +# define FP_FAST_FMAF 1 +# endif + +# if __FP_FAST_FMAL +# define FP_FAST_FMAL 1 +# endif + +#endif /* ISO C99 */ diff --git a/sysdeps/tile/bits/mathinline.h b/sysdeps/tile/bits/mathinline.h new file mode 100644 index 0000000000..09bdd79186 --- /dev/null +++ b/sysdeps/tile/bits/mathinline.h @@ -0,0 +1,45 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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 _MATH_H +# error "Never use directly; include instead." +#endif + +#ifndef __extern_always_inline +# define __MATH_INLINE __inline +#else +# define __MATH_INLINE __extern_always_inline +#endif + + +#if defined __USE_ISOC99 && defined __GNUC__ + +/* Test for negative number. Used in the signbit() macro. */ +__MATH_INLINE int +__NTH (__signbitf (float __x)) +{ + return __builtin_signbitf (__x); +} +__MATH_INLINE int +__NTH (__signbit (double __x)) +{ + return __builtin_signbit (__x); +} + +#endif diff --git a/sysdeps/tile/bits/setjmp.h b/sysdeps/tile/bits/setjmp.h new file mode 100644 index 0000000000..49612591ed --- /dev/null +++ b/sysdeps/tile/bits/setjmp.h @@ -0,0 +1,37 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +/* Define the machine-dependent type `jmp_buf'. TILE version. */ +#ifndef _BITS_SETJMP_H +#define _BITS_SETJMP_H 1 + +#if !defined _SETJMP_H && !defined _PTHREAD_H +# error "Never include directly; use instead." +#endif + +#ifndef _ASM + +#define __need_int_reg_t +#include + +typedef __uint_reg_t __jmp_buf[32]; + +#endif + +#endif /* bits/setjmp.h */ diff --git a/sysdeps/tile/bsd-_setjmp.S b/sysdeps/tile/bsd-_setjmp.S new file mode 100644 index 0000000000..4e6a2da560 --- /dev/null +++ b/sysdeps/tile/bsd-_setjmp.S @@ -0,0 +1 @@ +/* _setjmp is in setjmp.S */ diff --git a/sysdeps/tile/bsd-setjmp.S b/sysdeps/tile/bsd-setjmp.S new file mode 100644 index 0000000000..1da848d2f1 --- /dev/null +++ b/sysdeps/tile/bsd-setjmp.S @@ -0,0 +1 @@ +/* setjmp is in setjmp.S */ diff --git a/sysdeps/tile/bzero.S b/sysdeps/tile/bzero.S new file mode 100644 index 0000000000..5b5b9da235 --- /dev/null +++ b/sysdeps/tile/bzero.S @@ -0,0 +1,31 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include + + .text +ENTRY(__bzero) + FEEDBACK_ENTER(__bzero) + { + move r2, r1 + move r1, zero + } + j __memset +END(__bzero) +weak_alias (__bzero, bzero) diff --git a/sysdeps/tile/dl-lookupcfg.h b/sysdeps/tile/dl-lookupcfg.h new file mode 100644 index 0000000000..e1a5b26da9 --- /dev/null +++ b/sysdeps/tile/dl-lookupcfg.h @@ -0,0 +1,28 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#define DL_UNMAP_IS_SPECIAL + +#include_next + +struct link_map; + +void internal_function _dl_unmap (struct link_map *map); + +#define DL_UNMAP(map) _dl_unmap (map) diff --git a/sysdeps/tile/dl-machine.h b/sysdeps/tile/dl-machine.h new file mode 100644 index 0000000000..8b3c534a94 --- /dev/null +++ b/sysdeps/tile/dl-machine.h @@ -0,0 +1,918 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + Based on work contributed by by Carl Pederson & Martin Schwidefsky. + + 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 dl_machine_h +#define dl_machine_h + +#ifdef __tilegx__ +#define ELF_MACHINE_NAME "tilegx" +#else +#define ELF_MACHINE_NAME "tilepro" +#endif + +#include +#include +#include +#include +#include +#include + +/* Return nonzero iff ELF header is compatible with the running host. */ +static inline int +elf_machine_matches_host (const ElfW(Ehdr) *ehdr) +{ +#if defined __tilegx__ + if (ehdr->e_machine != EM_TILEGX) + return 0; +# if __WORDSIZE == 32 + return (ehdr->e_ident[EI_CLASS] == ELFCLASS32); +# else + return (ehdr->e_ident[EI_CLASS] == ELFCLASS64); +# endif +#elif defined __tilepro__ + return ehdr->e_machine == EM_TILEPRO; +#else +# error "Unknown tile architecture." +#endif +} + + +/* Return the link-time address of _DYNAMIC. Conveniently, this is the + first element of the GOT. This must be inlined in a function which + uses global data. */ + +static inline ElfW(Addr) +elf_machine_dynamic (void) +{ + ElfW(Addr) *got; + +#ifdef __tilegx__ + ElfW(Addr) tmp; + asm( " { lnk %0; moveli %1, hw2_last(_GLOBAL_OFFSET_TABLE_ - 1f) }\n" + "1: shl16insli %1, %1, hw1(_GLOBAL_OFFSET_TABLE_ - 1b)\n" + " shl16insli %1, %1, hw0(_GLOBAL_OFFSET_TABLE_ - 1b)\n" + " add %0, %0, %1" + : "=r" (got), "=r" (tmp)); +#else + asm( " lnk %0\n" + "1: addli %0, %0, lo16(_GLOBAL_OFFSET_TABLE_ - 1b)\n" + " auli %0, %0, ha16(_GLOBAL_OFFSET_TABLE_ - 1b)" + : "=r" (got)); +#endif + + return *got; +} + + +/* Return the run-time load address of the shared object. */ +static inline ElfW(Addr) +elf_machine_load_address (void) +{ + ElfW(Addr) *got; + ElfW(Addr) dynamic; + +#ifdef __tilegx__ + ElfW(Addr) tmp; + asm( " lnk %2\n" + "1: {\n" + " moveli %0, hw2_last(_GLOBAL_OFFSET_TABLE_ - 1b)\n" + " moveli %1, hw2_last(_DYNAMIC - 1b)\n" + " }\n" + " {\n" + " shl16insli %0, %0, hw1(_GLOBAL_OFFSET_TABLE_ - 1b)\n" + " shl16insli %1, %1, hw1(_DYNAMIC - 1b)\n" + " }\n" + " {\n" + " shl16insli %0, %0, hw0(_GLOBAL_OFFSET_TABLE_ - 1b)\n" + " shl16insli %1, %1, hw0(_DYNAMIC - 1b)\n" + " }\n" + " {\n" + " add %0, %0, %2\n" + " add %1, %1, %2\n" + " }" + : "=r" (got), "=r" (dynamic), "=r" (tmp)); +#else + asm( " lnk %0\n" + "1: {\n" + " addli %0, %0, lo16(_GLOBAL_OFFSET_TABLE_ - 1b)\n" + " addli %1, %0, lo16(_DYNAMIC - 1b)\n" + " }\n" + " {\n" + " auli %0, %0, ha16(_GLOBAL_OFFSET_TABLE_ - 1b)\n" + " auli %1, %1, ha16(_DYNAMIC - 1b)\n" + " }\n" + : "=r" (got), "=r" (dynamic)); +#endif + + return dynamic - *got; +} + +/* Flush some range of the instruction cache. If invoked prior to + actually setting dl_pagesize, we conservatively use 4KB, which + is the smallest page size we could plausibly be running with. */ +static inline void +_dl_flush_icache (const void *addr, unsigned long size) +{ + invalidate_icache (addr, size, GLRO(dl_pagesize) ? : 4096); +} + +/* Set up the loaded object described by L so its unrelocated PLT + entries will jump to the on-demand fixup code in dl-runtime.c. */ + +static inline int __attribute__ ((unused)) +elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) +{ + ElfW(Addr) *gotplt; + extern void _dl_runtime_resolve (ElfW(Word)); + extern void _dl_runtime_profile (ElfW(Word)); + + if (l->l_info[DT_JMPREL] && lazy) + { + gotplt = (ElfW(Addr) *) D_PTR (l, l_info[DT_PLTGOT]); + + /* The GOT entries for functions in the PLT have not yet been filled + in. Their initial contents will arrange when called to put in + registers an offset into the .rel.plt section, and gotplt[0], then + jump to gotplt[1]. */ + + /* Identify this shared object. */ + gotplt[0] = (ElfW(Addr)) l; + + /* The gotplt[1] entry contains the address of a function which gets + called to get the address of a so far unresolved function and jump + to it. The profiling extension of the dynamic linker allows to + intercept the calls to collect information. In this case we don't + store the address in the GOTPLT so that all future calls also end + in this function. */ + if (__builtin_expect (profile, 0)) + { + gotplt[1] = (ElfW(Addr)) &_dl_runtime_profile; + + if (GLRO(dl_profile) != NULL + && _dl_name_match_p (GLRO(dl_profile), l)) + /* This is the object we are looking for. Say that we really + want profiling and the timers are started. */ + GL(dl_profile_map) = l; + } + else + /* This function will get called to fix up the GOTPLT entry + indicated by the offset on the stack, and then jump to the + resolved address. */ + gotplt[1] = (ElfW(Addr)) &_dl_runtime_resolve; + } + + return lazy; +} + +#if __WORDSIZE == 32 +/* Mask identifying addresses reserved for the user program, + where the dynamic linker should not map anything. */ +#define ELF_MACHINE_USER_ADDRESS_MASK 0xf8000000UL +#endif + +/* Initial entry point code for the dynamic linker. + The C function `_dl_start' is the real entry point; + its return value is the user program's entry point. */ + +#define RTLD_START asm (".globl _dl_start"); + +#ifndef RTLD_START_SPECIAL_INIT +#define RTLD_START_SPECIAL_INIT /* nothing */ +#endif + +/* Wrap a generic Tilera relocation type. */ +#ifdef __tilegx__ +#define R_TILE(x) R_TILEGX_##x +#define __R_TILE_TLS(x,c) R_TILEGX_TLS_##x##c +#define _R_TILE_TLS(x,c) __R_TILE_TLS(x,c) +#define R_TILE_TLS(x) _R_TILE_TLS(x,__ELF_NATIVE_CLASS) +#else +#define R_TILE(x) R_TILEPRO_##x +#define R_TILE_TLS(x) R_TILEPRO_TLS_##x##32 +#endif + +/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry or + TLS variable, so undefined references should not be allowed to + define the value. + ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one + of the main executable's symbols, as for a COPY reloc. */ +#define elf_machine_type_class(type) \ + ((((type) == R_TILE(JMP_SLOT) || (type) == R_TILE_TLS(DTPMOD) \ + || (type) == R_TILE_TLS(DTPOFF) || (type) == R_TILE_TLS(TPOFF)) \ + * ELF_RTYPE_CLASS_PLT) \ + | (((type) == R_TILE(COPY)) * ELF_RTYPE_CLASS_COPY)) + +/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */ +#define ELF_MACHINE_JMP_SLOT R_TILE(JMP_SLOT) + +/* TILE never uses Elf32_Rel relocations. */ +#define ELF_MACHINE_NO_REL 1 + +/* TILE overlaps DT_RELA and DT_PLTREL. */ +#define ELF_MACHINE_PLTREL_OVERLAP 1 + +/* We define an initialization functions. This is called very early in + _dl_sysdep_start. */ +#define DL_PLATFORM_INIT dl_platform_init () + +static inline void __attribute__ ((unused)) +dl_platform_init (void) +{ + if (GLRO(dl_platform) != NULL && *GLRO(dl_platform) == '\0') + /* Avoid an empty string which would disturb us. */ + GLRO(dl_platform) = NULL; +} + +static inline ElfW(Addr) +elf_machine_fixup_plt (struct link_map *map, lookup_t t, + const ElfW(Rela) *reloc, + ElfW(Addr) *reloc_addr, ElfW(Addr) value) +{ + return *reloc_addr = value; +} + +/* Return the final value of a plt relocation. */ +static inline ElfW(Addr) +elf_machine_plt_value (struct link_map *map, const ElfW(Rela) *reloc, + ElfW(Addr) value) +{ + return value; +} + +/* Support notifying the simulator about new objects. */ +void internal_function _dl_arch_map_object (struct link_map *l); +#define _dl_arch_map_object _dl_arch_map_object + +/* Names of the architecture-specific auditing callback functions. */ +#define ARCH_LA_PLTENTER tile_gnu_pltenter +#define ARCH_LA_PLTEXIT tile_gnu_pltexit + +#endif /* !dl_machine_h */ + + +#ifdef RESOLVE_MAP + +struct reloc_howto +{ + /* Right shift operand by this number of bits. */ + unsigned char right_shift; + +#ifdef __tilegx__ + /* If nonzero, this is updating a code bundle. */ + unsigned char is_bundle_update; +#else + /* If nonzero, add 0x8000 to the value. */ + unsigned char add_0x8000; +#endif + + /* If nonzero, subtract the containing address from the address. */ + unsigned char is_pcrel; + + /* Size in bytes, or 0 if this table entry should be ignored. */ + unsigned char byte_size; +}; + +/* Relocation information. Cannot contain create_* function pointers + because then the table would not be position-independent. */ +static const struct reloc_howto howto[] = +{ +#ifdef __tilegx__ + +# if __WORDSIZE == 32 + /* The GX -m32 loader only handles 32-bit types, so it will be confused + by shifts larger than that. We convert them to just sign-extend; + they usually indicate a program bug or missed optimization, but we + have to handle them correctly anyway. */ +# define S32 31 +# define S48 31 +# else +# define S32 32 +# define S48 48 +# endif + + /* R_TILEGX_NONE */ { 0, 0, 0, 0 }, + /* R_TILEGX_64 */ { 0, 0, 0, 8 }, + /* R_TILEGX_32 */ { 0, 0, 0, 4 }, + /* R_TILEGX_16 */ { 0, 0, 0, 2 }, + /* R_TILEGX_8 */ { 0, 0, 0, 1 }, + /* R_TILEGX_64_PCREL */ { 0, 0, 1, 8 }, + /* R_TILEGX_32_PCREL */ { 0, 0, 1, 4 }, + /* R_TILEGX_16_PCREL */ { 0, 0, 1, 2 }, + /* R_TILEGX_8_PCREL */ { 0, 0, 1, 1 }, + /* R_TILEGX_HW0 */ { 0, 0, 0, 0 }, + /* R_TILEGX_HW1 */ { 16, 0, 0, 0 }, + /* R_TILEGX_HW2 */ { S32, 0, 0, 0 }, + /* R_TILEGX_HW3 */ { S48, 0, 0, 0 }, + /* R_TILEGX_HW0_LAST */ { 0, 0, 0, 0 }, + /* R_TILEGX_HW1_LAST */ { 16, 0, 0, 0 }, + /* R_TILEGX_HW2_LAST */ { S32, 0, 0, 0 }, + /* R_TILEGX_COPY */ { 0, 0, 0, 0 }, + /* R_TILEGX_GLOB_DAT */ { 0, 0, 0, 8 }, + /* R_TILEGX_JMP_SLOT */ { 0, 0, 0, 0 }, + /* R_TILEGX_RELATIVE */ { 0, 0, 0, 0 }, + /* R_TILEGX_BROFF_X1 */ { 3, 1, 1, 8 }, + /* R_TILEGX_JUMPOFF_X1 */ { 3, 1, 1, 8 }, + /* R_TILEGX_JUMPOFF_X1_PLT */ { 3, 1, 1, 8 }, + /* R_TILEGX_IMM8_X0 */ { 0, 1, 0, 8 }, + /* R_TILEGX_IMM8_Y0 */ { 0, 1, 0, 8 }, + /* R_TILEGX_IMM8_X1 */ { 0, 1, 0, 8 }, + /* R_TILEGX_IMM8_Y1 */ { 0, 1, 0, 8 }, + /* R_TILEGX_DEST_IMM8_X1 */ { 0, 1, 0, 8 }, + /* R_TILEGX_MT_IMM14_X1 */ { 0, 1, 0, 8 }, + /* R_TILEGX_MF_IMM14_X1 */ { 0, 1, 0, 8 }, + /* R_TILEGX_MMSTART_X0 */ { 0, 1, 0, 8 }, + /* R_TILEGX_MMEND_X0 */ { 0, 1, 0, 8 }, + /* R_TILEGX_SHAMT_X0 */ { 0, 1, 0, 8 }, + /* R_TILEGX_SHAMT_X1 */ { 0, 1, 0, 8 }, + /* R_TILEGX_SHAMT_Y0 */ { 0, 1, 0, 8 }, + /* R_TILEGX_SHAMT_Y1 */ { 0, 1, 0, 8 }, + /* R_TILEGX_IMM16_X0_HW0 */ { 0, 1, 0, 8 }, + /* R_TILEGX_IMM16_X1_HW0 */ { 0, 1, 0, 8 }, + /* R_TILEGX_IMM16_X0_HW1 */ { 16, 1, 0, 8 }, + /* R_TILEGX_IMM16_X1_HW1 */ { 16, 1, 0, 8 }, + /* R_TILEGX_IMM16_X0_HW2 */ { S32, 1, 0, 8 }, + /* R_TILEGX_IMM16_X1_HW2 */ { S32, 1, 0, 8 }, + /* R_TILEGX_IMM16_X0_HW3 */ { S48, 1, 0, 8 }, + /* R_TILEGX_IMM16_X1_HW3 */ { S48, 1, 0, 8 }, + /* R_TILEGX_IMM16_X0_HW0_LAST */ { 0, 1, 0, 8 }, + /* R_TILEGX_IMM16_X1_HW0_LAST */ { 0, 1, 0, 8 }, + /* R_TILEGX_IMM16_X0_HW1_LAST */ { 16, 1, 0, 8 }, + /* R_TILEGX_IMM16_X1_HW1_LAST */ { 16, 1, 0, 8 }, + /* R_TILEGX_IMM16_X0_HW2_LAST */ { S32, 1, 0, 8 }, + /* R_TILEGX_IMM16_X1_HW2_LAST */ { S32, 1, 0, 8 }, + /* R_TILEGX_IMM16_X0_HW0_PCREL */ { 0, 1, 1, 8 }, + /* R_TILEGX_IMM16_X1_HW0_PCREL */ { 0, 1, 1, 8 }, + /* R_TILEGX_IMM16_X0_HW1_PCREL */ { 16, 1, 1, 8 }, + /* R_TILEGX_IMM16_X1_HW1_PCREL */ { 16, 1, 1, 8 }, + /* R_TILEGX_IMM16_X0_HW2_PCREL */ { S32, 1, 1, 8 }, + /* R_TILEGX_IMM16_X1_HW2_PCREL */ { S32, 1, 1, 8 }, + /* R_TILEGX_IMM16_X0_HW3_PCREL */ { S48, 1, 1, 8 }, + /* R_TILEGX_IMM16_X1_HW3_PCREL */ { S48, 1, 1, 8 }, + /* R_TILEGX_IMM16_X0_HW0_LAST_PCREL */ { 0, 1, 1, 8 }, + /* R_TILEGX_IMM16_X1_HW0_LAST_PCREL */ { 0, 1, 1, 8 }, + /* R_TILEGX_IMM16_X0_HW1_LAST_PCREL */ { 16, 1, 1, 8 }, + /* R_TILEGX_IMM16_X1_HW1_LAST_PCREL */ { 16, 1, 1, 8 }, + /* R_TILEGX_IMM16_X0_HW2_LAST_PCREL */ { S32, 1, 1, 8 }, + /* R_TILEGX_IMM16_X1_HW2_LAST_PCREL */ { S32, 1, 1, 8 }, + /* R_TILEGX_IMM16_X0_HW0_GOT */ { 0, 1, 0, 0 }, + /* R_TILEGX_IMM16_X1_HW0_GOT */ { 0, 1, 0, 0 }, + /* R_TILEGX_IMM16_X0_HW1_GOT */ { 16, 1, 0, 0 }, + /* R_TILEGX_IMM16_X1_HW1_GOT */ { 16, 1, 0, 0 }, + /* R_TILEGX_IMM16_X0_HW2_GOT */ { S32, 1, 0, 0 }, + /* R_TILEGX_IMM16_X1_HW2_GOT */ { S32, 1, 0, 0 }, + /* R_TILEGX_IMM16_X0_HW3_GOT */ { S48, 1, 0, 0 }, + /* R_TILEGX_IMM16_X1_HW3_GOT */ { S48, 1, 0, 0 }, + /* R_TILEGX_IMM16_X0_HW0_LAST_GOT */ { 0, 1, 0, 0 }, + /* R_TILEGX_IMM16_X1_HW0_LAST_GOT */ { 0, 1, 0, 0 }, + /* R_TILEGX_IMM16_X0_HW1_LAST_GOT */ { 16, 1, 0, 0 }, + /* R_TILEGX_IMM16_X1_HW1_LAST_GOT */ { 16, 1, 0, 0 }, + /* R_TILEGX_IMM16_X0_HW2_LAST_GOT */ { S32, 1, 0, 0 }, + /* R_TILEGX_IMM16_X1_HW2_LAST_GOT */ { S32, 1, 0, 0 }, + /* R_TILEGX_IMM16_X0_HW0_TLS_GD */ { 0, 1, 0, 8 }, + /* R_TILEGX_IMM16_X1_HW0_TLS_GD */ { 0, 1, 0, 8 }, + /* R_TILEGX_IMM16_X0_HW1_TLS_GD */ { 16, 1, 0, 8 }, + /* R_TILEGX_IMM16_X1_HW1_TLS_GD */ { 16, 1, 0, 8 }, + /* R_TILEGX_IMM16_X0_HW2_TLS_GD */ { S32, 1, 0, 8 }, + /* R_TILEGX_IMM16_X1_HW2_TLS_GD */ { S32, 1, 0, 8 }, + /* R_TILEGX_IMM16_X0_HW3_TLS_GD */ { S48, 1, 0, 8 }, + /* R_TILEGX_IMM16_X1_HW3_TLS_GD */ { S48, 1, 0, 8 }, + /* R_TILEGX_IMM16_X0_HW0_LAST_TLS_GD */{ 0, 1, 0, 8 }, + /* R_TILEGX_IMM16_X1_HW0_LAST_TLS_GD */{ 0, 1, 0, 8 }, + /* R_TILEGX_IMM16_X0_HW1_LAST_TLS_GD */{ 16, 1, 0, 8 }, + /* R_TILEGX_IMM16_X1_HW1_LAST_TLS_GD */{ 16, 1, 0, 8 }, + /* R_TILEGX_IMM16_X0_HW2_LAST_TLS_GD */{ S32, 1, 0, 8 }, + /* R_TILEGX_IMM16_X1_HW2_LAST_TLS_GD */{ S32, 1, 0, 8 }, + /* R_TILEGX_IMM16_X0_HW0_TLS_IE */ { 0, 1, 0, 8 }, + /* R_TILEGX_IMM16_X1_HW0_TLS_IE */ { 0, 1, 0, 8 }, + /* R_TILEGX_IMM16_X0_HW1_TLS_IE */ { 16, 1, 0, 8 }, + /* R_TILEGX_IMM16_X1_HW1_TLS_IE */ { 16, 1, 0, 8 }, + /* R_TILEGX_IMM16_X0_HW2_TLS_IE */ { S32, 1, 0, 8 }, + /* R_TILEGX_IMM16_X1_HW2_TLS_IE */ { S32, 1, 0, 8 }, + /* R_TILEGX_IMM16_X0_HW3_TLS_IE */ { S48, 1, 0, 8 }, + /* R_TILEGX_IMM16_X1_HW3_TLS_IE */ { S48, 1, 0, 8 }, + /* R_TILEGX_IMM16_X0_HW0_LAST_TLS_IE */{ 0, 1, 0, 8 }, + /* R_TILEGX_IMM16_X1_HW0_LAST_TLS_IE */{ 0, 1, 0, 8 }, + /* R_TILEGX_IMM16_X0_HW1_LAST_TLS_IE */{ 16, 1, 0, 8 }, + /* R_TILEGX_IMM16_X1_HW1_LAST_TLS_IE */{ 16, 1, 0, 8 }, + /* R_TILEGX_IMM16_X0_HW2_LAST_TLS_IE */{ S32, 1, 0, 8 }, + /* R_TILEGX_IMM16_X1_HW2_LAST_TLS_IE */{ S32, 1, 0, 8 }, + /* R_TILEGX_TLS_DTPMOD64 */ { 0, 0, 0, 0 }, + /* R_TILEGX_TLS_DTPOFF64 */ { 0, 0, 0, 0 }, + /* R_TILEGX_TLS_TPOFF64 */ { 0, 0, 0, 0 }, + /* R_TILEGX_TLS_DTPMOD32 */ { 0, 0, 0, 0 }, + /* R_TILEGX_TLS_DTPOFF32 */ { 0, 0, 0, 0 }, + /* R_TILEGX_TLS_TPOFF32 */ { 0, 0, 0, 0 } +#else + /* R_TILEPRO_NONE */ { 0, 0, 0, 0 }, + /* R_TILEPRO_32 */ { 0, 0, 0, 4 }, + /* R_TILEPRO_16 */ { 0, 0, 0, 2 }, + /* R_TILEPRO_8 */ { 0, 0, 0, 1 }, + /* R_TILEPRO_32_PCREL */ { 0, 0, 1, 4 }, + /* R_TILEPRO_16_PCREL */ { 0, 0, 1, 2 }, + /* R_TILEPRO_8_PCREL */ { 0, 0, 1, 1 }, + /* R_TILEPRO_LO16 */ { 0, 0, 0, 2 }, + /* R_TILEPRO_HI16 */ { 16, 0, 0, 2 }, + /* R_TILEPRO_HA16 */ { 16, 1, 0, 2 }, + /* R_TILEPRO_COPY */ { 0, 0, 0, 0 }, + /* R_TILEPRO_GLOB_DAT */ { 0, 0, 0, 4 }, + /* R_TILEPRO_JMP_SLOT */ { 0, 0, 0, 0 }, + /* R_TILEPRO_RELATIVE */ { 0, 0, 0, 0 }, + /* R_TILEPRO_BROFF_X1 */ { 3, 0, 1, 8 }, + /* R_TILEPRO_JOFFLONG_X1 */ { 3, 0, 1, 8 }, + /* R_TILEPRO_JOFFLONG_X1_PLT */ { 3, 0, 1, 8 }, + /* R_TILEPRO_IMM8_X0 */ { 0, 0, 0, 8 }, + /* R_TILEPRO_IMM8_Y0 */ { 0, 0, 0, 8 }, + /* R_TILEPRO_IMM8_X1 */ { 0, 0, 0, 8 }, + /* R_TILEPRO_IMM8_Y1 */ { 0, 0, 0, 8 }, + /* R_TILEPRO_MT_IMM15_X1 */ { 0, 0, 0, 8 }, + /* R_TILEPRO_MF_IMM15_X1 */ { 0, 0, 0, 8 }, + /* R_TILEPRO_IMM16_X0 */ { 0, 0, 0, 8 }, + /* R_TILEPRO_IMM16_X1 */ { 0, 0, 0, 8 }, + /* R_TILEPRO_IMM16_X0_LO */ { 0, 0, 0, 8 }, + /* R_TILEPRO_IMM16_X1_LO */ { 0, 0, 0, 8 }, + /* R_TILEPRO_IMM16_X0_HI */ { 16, 0, 0, 8 }, + /* R_TILEPRO_IMM16_X1_HI */ { 16, 0, 0, 8 }, + /* R_TILEPRO_IMM16_X0_HA */ { 16, 1, 0, 8 }, + /* R_TILEPRO_IMM16_X1_HA */ { 16, 1, 0, 8 }, + /* R_TILEPRO_IMM16_X0_PCREL */ { 0, 0, 1, 8 }, + /* R_TILEPRO_IMM16_X1_PCREL */ { 0, 0, 1, 8 }, + /* R_TILEPRO_IMM16_X0_LO_PCREL */ { 0, 0, 1, 8 }, + /* R_TILEPRO_IMM16_X1_LO_PCREL */ { 0, 0, 1, 8 }, + /* R_TILEPRO_IMM16_X0_HI_PCREL */ { 16, 0, 1, 8 }, + /* R_TILEPRO_IMM16_X1_HI_PCREL */ { 16, 0, 1, 8 }, + /* R_TILEPRO_IMM16_X0_HA_PCREL */ { 16, 1, 1, 8 }, + /* R_TILEPRO_IMM16_X1_HA_PCREL */ { 16, 1, 1, 8 }, + /* R_TILEPRO_IMM16_X0_GOT */ { 0, 0, 0, 0 }, + /* R_TILEPRO_IMM16_X1_GOT */ { 0, 0, 0, 0 }, + /* R_TILEPRO_IMM16_X0_GOT_LO */ { 0, 0, 0, 0 }, + /* R_TILEPRO_IMM16_X1_GOT_LO */ { 0, 0, 0, 0 }, + /* R_TILEPRO_IMM16_X0_GOT_HI */ { 0, 0, 0, 0 }, + /* R_TILEPRO_IMM16_X1_GOT_HI */ { 0, 0, 0, 0 }, + /* R_TILEPRO_IMM16_X0_GOT_HA */ { 0, 0, 0, 0 }, + /* R_TILEPRO_IMM16_X1_GOT_HA */ { 0, 0, 0, 0 }, + /* R_TILEPRO_MMSTART_X0 */ { 0, 0, 0, 8 }, + /* R_TILEPRO_MMEND_X0 */ { 0, 0, 0, 8 }, + /* R_TILEPRO_MMSTART_X1 */ { 0, 0, 0, 8 }, + /* R_TILEPRO_MMEND_X1 */ { 0, 0, 0, 8 }, + /* R_TILEPRO_SHAMT_X0 */ { 0, 0, 0, 8 }, + /* R_TILEPRO_SHAMT_X1 */ { 0, 0, 0, 8 }, + /* R_TILEPRO_SHAMT_Y0 */ { 0, 0, 0, 8 }, + /* R_TILEPRO_SHAMT_Y1 */ { 0, 0, 0, 8 }, + /* R_TILEPRO_SN_BROFF */ { 0, 0, 0, 0 }, + /* R_TILEPRO_SN_IMM8 */ { 0, 0, 0, 0 }, + /* R_TILEPRO_SN_UIMM8 */ { 0, 0, 0, 0 }, + /* R_TILEPRO_SN_BYTE0 */ { 0, 0, 0, 0 }, + /* R_TILEPRO_SN_BYTE1 */ { 0, 0, 0, 0 }, + /* R_TILEPRO_SN_BYTE2 */ { 0, 0, 0, 0 }, + /* R_TILEPRO_SN_BYTE3 */ { 0, 0, 0, 0 }, + /* R_TILEPRO_SN_SPCREL0 */ { 0, 0, 0, 0 }, + /* R_TILEPRO_SN_SPCREL1 */ { 0, 0, 0, 0 }, + /* R_TILEPRO_SN_SPCREL2 */ { 0, 0, 0, 0 }, + /* R_TILEPRO_SN_SPCREL3 */ { 0, 0, 0, 0 }, + /* R_TILEPRO_IMM16_X0_TLS_GD */ { 0, 0, 0, 8 }, + /* R_TILEPRO_IMM16_X1_TLS_GD */ { 0, 0, 0, 8 }, + /* R_TILEPRO_IMM16_X0_TLS_GD_LO */ { 0, 0, 0, 8 }, + /* R_TILEPRO_IMM16_X1_TLS_GD_LO */ { 0, 0, 0, 8 }, + /* R_TILEPRO_IMM16_X0_TLS_GD_HI */ { 16, 0, 0, 8 }, + /* R_TILEPRO_IMM16_X1_TLS_GD_HI */ { 16, 0, 0, 8 }, + /* R_TILEPRO_IMM16_X0_TLS_GD_HA */ { 16, 1, 0, 8 }, + /* R_TILEPRO_IMM16_X1_TLS_GD_HA */ { 16, 1, 0, 8 }, + /* R_TILEPRO_IMM16_X0_TLS_IE */ { 0, 0, 0, 8 }, + /* R_TILEPRO_IMM16_X1_TLS_IE */ { 0, 0, 0, 8 }, + /* R_TILEPRO_IMM16_X0_TLS_IE_LO */ { 0, 0, 0, 8 }, + /* R_TILEPRO_IMM16_X1_TLS_IE_LO */ { 0, 0, 0, 8 }, + /* R_TILEPRO_IMM16_X0_TLS_IE_HI */ { 16, 0, 0, 8 }, + /* R_TILEPRO_IMM16_X1_TLS_IE_HI */ { 16, 0, 0, 8 }, + /* R_TILEPRO_IMM16_X0_TLS_IE_HA */ { 16, 1, 0, 8 }, + /* R_TILEPRO_IMM16_X1_TLS_IE_HA */ { 16, 1, 0, 8 }, + /* R_TILEPRO_TLS_DTPMOD32 */ { 0, 0, 0, 0 }, + /* R_TILEPRO_TLS_DTPOFF32 */ { 0, 0, 0, 0 }, + /* R_TILEPRO_TLS_TPOFF32 */ { 0, 0, 0, 0 }, +#endif +}; + +#if __ELF_NATIVE_CLASS == 32 +#define ELFW_R_TYPE ELF32_R_TYPE +#define ELFW_ST_TYPE ELF32_ST_TYPE +#else +#define ELFW_R_TYPE ELF64_R_TYPE +#define ELFW_ST_TYPE ELF64_ST_TYPE +#endif + +/* Perform the relocation specified by RELOC and SYM (which is fully resolved). + MAP is the object containing the reloc. */ + +auto inline void __attribute__ ((always_inline)) +elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc, + const ElfW(Sym) *sym, const struct r_found_version *version, + void *const reloc_addr_arg, int skip_ifunc) +{ + ElfW(Addr) *const reloc_addr = reloc_addr_arg; + const unsigned int r_type = ELFW_R_TYPE (reloc->r_info); + +#if !defined RTLD_BOOTSTRAP || !defined HAVE_Z_COMBRELOC + if (__builtin_expect (r_type == R_TILE(RELATIVE), 0)) + { +# if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC + /* This is defined in rtld.c, but nowhere in the static libc.a; + make the reference weak so static programs can still link. + This declaration cannot be done when compiling rtld.c + (i.e. #ifdef RTLD_BOOTSTRAP) because rtld.c contains the + common defn for _dl_rtld_map, which is incompatible with a + weak decl in the same file. */ +# ifndef SHARED + weak_extern (GL(dl_rtld_map)); +# endif + if (map != &GL(dl_rtld_map)) /* Already done in rtld itself. */ +# endif + *reloc_addr = map->l_addr + reloc->r_addend; + return; + } +#endif + + if (__builtin_expect (r_type == R_TILE(NONE), 0)) + return; + +#if !defined RTLD_BOOTSTRAP && !defined RESOLVE_CONFLICT_FIND_MAP + const ElfW(Sym) *const refsym = sym; +#endif + struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type); + ElfW(Addr) value; + + if (sym == NULL) + value = 0; + else if (ELFW_ST_TYPE (sym->st_info) == STT_SECTION) + value = map->l_addr; /* like a RELATIVE reloc */ + else + value = sym_map->l_addr + sym->st_value; + + if (sym != NULL + && __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, 0) + && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1) + && __builtin_expect (!skip_ifunc, 1)) + value = ((Elf64_Addr (*) (void)) value) (); + + switch (r_type) + { + case R_TILE(JMP_SLOT): + elf_machine_fixup_plt (map, 0, reloc, reloc_addr, + value + reloc->r_addend); + return; + +#ifndef RESOLVE_CONFLICT_FIND_MAP + case R_TILE_TLS(DTPMOD): +# ifdef RTLD_BOOTSTRAP + /* During startup the dynamic linker is always the module + with index 1. + XXX If this relocation is necessary move before RESOLVE + call. */ + *reloc_addr = 1; +# else + /* Get the information from the link map returned by the + resolv function. */ + if (sym_map != NULL) + *reloc_addr = sym_map->l_tls_modid; +# endif + return; + case R_TILE_TLS(DTPOFF): +# ifndef RTLD_BOOTSTRAP + /* During relocation all TLS symbols are defined and used. + Therefore the offset is already correct. */ + if (sym != NULL) + *reloc_addr = sym->st_value + reloc->r_addend; +# endif + return; + case R_TILE_TLS(TPOFF): +# ifdef RTLD_BOOTSTRAP + *reloc_addr = sym->st_value + reloc->r_addend + map->l_tls_offset; +# else + if (sym != NULL) + { + CHECK_STATIC_TLS (map, sym_map); + *reloc_addr = (sym->st_value + reloc->r_addend + + sym_map->l_tls_offset); + } +#endif + return; +#endif /* use TLS */ + +#if !defined RTLD_BOOTSTRAP && !defined RESOLVE_CONFLICT_FIND_MAP + /* Not needed in dl-conflict.c. */ + case R_TILE(COPY): + if (sym == NULL) + /* This can happen in trace mode if an object could not be found. */ + return; + if (__builtin_expect (sym->st_size > refsym->st_size, 0) + || (__builtin_expect (sym->st_size < refsym->st_size, 0) + && __builtin_expect (GLRO(dl_verbose), 0))) + { + const char *strtab; + + strtab = (const char *) D_PTR (map,l_info[DT_STRTAB]); + _dl_error_printf ("%s: Symbol `%s' has different size in shared" + " object, consider re-linking\n", + rtld_progname ?: "", + strtab + refsym->st_name); + } + memcpy (reloc_addr_arg, (void *) value, + MIN (sym->st_size, refsym->st_size)); + return; +#endif + } + + /* All remaining relocations must be in the lookup table. */ + const struct reloc_howto *h = &howto[r_type]; + if ((unsigned int) r_type >= sizeof howto / sizeof howto[0] || + h->byte_size == 0) + { +#if !defined RTLD_BOOTSTRAP || defined _NDEBUG + /* We add these checks in the version to relocate ld.so only + if we are still debugging. */ + _dl_reloc_bad_type (map, r_type, 0); +#endif + return; + } + + value += reloc->r_addend; + + /* The lookup table entry knows how to perform this reloc. */ + if (h->is_pcrel) + value -= (ElfW(Addr)) reloc_addr; + +#ifndef __tilegx__ + if (h->add_0x8000) + value += 0x8000; +#endif + + value >>= h->right_shift; + + switch (h->byte_size) + { + case 1: + *(char *) reloc_addr = value; + return; + case 2: + *(short *) reloc_addr = value; + return; + case 4: + *(int *) reloc_addr = value; + return; +#ifdef __tilegx__ + case 8: + if (!h->is_bundle_update) + { + *(ElfW(Addr) *) reloc_addr = value; + return; + } +#endif + } + + /* We are updating a bundle, so use the function pointer that + swizzles the operand bits into the right location. */ + + tile_bundle_bits *p = (tile_bundle_bits *) reloc_addr; + tile_bundle_bits bits = *p; + +#define MUNGE(func) do { \ + bits = ((bits & ~create_##func (-1)) | create_##func (value)); \ + if (get_##func (bits) != value) \ + _dl_signal_error (0, map->l_name, NULL, \ + "relocation value too large for " #func); \ + } while (0) + +#define MUNGE_NOCHECK(func) \ + bits = ((bits & ~create_##func (-1)) | create_##func (value)) + + switch (r_type) + { +#ifdef __tilegx__ + case R_TILEGX_BROFF_X1: + MUNGE (BrOff_X1); + break; + case R_TILEGX_JUMPOFF_X1: + case R_TILEGX_JUMPOFF_X1_PLT: + MUNGE (JumpOff_X1); + break; + case R_TILEGX_IMM8_X0: + MUNGE (Imm8_X0); + break; + case R_TILEGX_IMM8_Y0: + MUNGE (Imm8_Y0); + break; + case R_TILEGX_IMM8_X1: + MUNGE (Imm8_X1); + break; + case R_TILEGX_IMM8_Y1: + MUNGE (Imm8_Y1); + break; + case R_TILEGX_MT_IMM14_X1: + MUNGE (MT_Imm14_X1); + break; + case R_TILEGX_MF_IMM14_X1: + MUNGE (MF_Imm14_X1); + break; + case R_TILEGX_IMM16_X0_HW0: + case R_TILEGX_IMM16_X0_HW1: + case R_TILEGX_IMM16_X0_HW2: + case R_TILEGX_IMM16_X0_HW3: + case R_TILEGX_IMM16_X0_HW0_PCREL: + case R_TILEGX_IMM16_X0_HW1_PCREL: + case R_TILEGX_IMM16_X0_HW2_PCREL: + case R_TILEGX_IMM16_X0_HW3_PCREL: + case R_TILEGX_IMM16_X0_HW0_TLS_GD: + case R_TILEGX_IMM16_X0_HW0_TLS_IE: + MUNGE_NOCHECK (Imm16_X0); + break; + case R_TILEGX_IMM16_X0_HW0_LAST: + case R_TILEGX_IMM16_X0_HW1_LAST: + case R_TILEGX_IMM16_X0_HW2_LAST: + case R_TILEGX_IMM16_X0_HW0_LAST_PCREL: + case R_TILEGX_IMM16_X0_HW1_LAST_PCREL: + case R_TILEGX_IMM16_X0_HW2_LAST_PCREL: + case R_TILEGX_IMM16_X0_HW0_LAST_TLS_GD: + case R_TILEGX_IMM16_X0_HW1_LAST_TLS_GD: + case R_TILEGX_IMM16_X0_HW0_LAST_TLS_IE: + case R_TILEGX_IMM16_X0_HW1_LAST_TLS_IE: + MUNGE (Imm16_X0); + break; + case R_TILEGX_IMM16_X1_HW0: + case R_TILEGX_IMM16_X1_HW1: + case R_TILEGX_IMM16_X1_HW2: + case R_TILEGX_IMM16_X1_HW3: + case R_TILEGX_IMM16_X1_HW0_PCREL: + case R_TILEGX_IMM16_X1_HW1_PCREL: + case R_TILEGX_IMM16_X1_HW2_PCREL: + case R_TILEGX_IMM16_X1_HW3_PCREL: + case R_TILEGX_IMM16_X1_HW0_TLS_GD: + case R_TILEGX_IMM16_X1_HW0_TLS_IE: + MUNGE_NOCHECK (Imm16_X1); + break; + case R_TILEGX_IMM16_X1_HW0_LAST: + case R_TILEGX_IMM16_X1_HW1_LAST: + case R_TILEGX_IMM16_X1_HW2_LAST: + case R_TILEGX_IMM16_X1_HW0_LAST_PCREL: + case R_TILEGX_IMM16_X1_HW1_LAST_PCREL: + case R_TILEGX_IMM16_X1_HW2_LAST_PCREL: + case R_TILEGX_IMM16_X1_HW0_LAST_TLS_GD: + case R_TILEGX_IMM16_X1_HW1_LAST_TLS_GD: + case R_TILEGX_IMM16_X1_HW0_LAST_TLS_IE: + case R_TILEGX_IMM16_X1_HW1_LAST_TLS_IE: + MUNGE (Imm16_X1); + break; + case R_TILEGX_MMSTART_X0: + MUNGE (BFStart_X0); + break; + case R_TILEGX_MMEND_X0: + MUNGE (BFEnd_X0); + break; + case R_TILEGX_SHAMT_X0: + MUNGE (ShAmt_X0); + break; + case R_TILEGX_SHAMT_X1: + MUNGE (ShAmt_X1); + break; + case R_TILEGX_SHAMT_Y0: + MUNGE (ShAmt_Y0); + break; + case R_TILEGX_SHAMT_Y1: + MUNGE (ShAmt_Y1); + break; +#else + case R_TILEPRO_BROFF_X1: + MUNGE (BrOff_X1); + break; + case R_TILEPRO_JOFFLONG_X1: + case R_TILEPRO_JOFFLONG_X1_PLT: + MUNGE_NOCHECK (JOffLong_X1); /* holds full 32-bit value */ + break; + case R_TILEPRO_IMM8_X0: + MUNGE (Imm8_X0); + break; + case R_TILEPRO_IMM8_Y0: + MUNGE (Imm8_Y0); + break; + case R_TILEPRO_IMM8_X1: + MUNGE (Imm8_X1); + break; + case R_TILEPRO_IMM8_Y1: + MUNGE (Imm8_Y1); + break; + case R_TILEPRO_MT_IMM15_X1: + MUNGE (MT_Imm15_X1); + break; + case R_TILEPRO_MF_IMM15_X1: + MUNGE (MF_Imm15_X1); + break; + case R_TILEPRO_IMM16_X0_LO: + case R_TILEPRO_IMM16_X0_HI: + case R_TILEPRO_IMM16_X0_HA: + case R_TILEPRO_IMM16_X0_LO_PCREL: + case R_TILEPRO_IMM16_X0_HI_PCREL: + case R_TILEPRO_IMM16_X0_HA_PCREL: + case R_TILEPRO_IMM16_X0_TLS_GD_LO: + case R_TILEPRO_IMM16_X0_TLS_GD_HI: + case R_TILEPRO_IMM16_X0_TLS_GD_HA: + case R_TILEPRO_IMM16_X0_TLS_IE_LO: + case R_TILEPRO_IMM16_X0_TLS_IE_HI: + case R_TILEPRO_IMM16_X0_TLS_IE_HA: + MUNGE_NOCHECK (Imm16_X0); + break; + case R_TILEPRO_IMM16_X0: + case R_TILEPRO_IMM16_X0_PCREL: + case R_TILEPRO_IMM16_X0_TLS_GD: + case R_TILEPRO_IMM16_X0_TLS_IE: + MUNGE (Imm16_X0); + break; + case R_TILEPRO_IMM16_X1_LO: + case R_TILEPRO_IMM16_X1_HI: + case R_TILEPRO_IMM16_X1_HA: + case R_TILEPRO_IMM16_X1_LO_PCREL: + case R_TILEPRO_IMM16_X1_HI_PCREL: + case R_TILEPRO_IMM16_X1_HA_PCREL: + case R_TILEPRO_IMM16_X1_TLS_GD_LO: + case R_TILEPRO_IMM16_X1_TLS_GD_HI: + case R_TILEPRO_IMM16_X1_TLS_GD_HA: + case R_TILEPRO_IMM16_X1_TLS_IE_LO: + case R_TILEPRO_IMM16_X1_TLS_IE_HI: + case R_TILEPRO_IMM16_X1_TLS_IE_HA: + MUNGE_NOCHECK (Imm16_X1); + break; + case R_TILEPRO_IMM16_X1: + case R_TILEPRO_IMM16_X1_PCREL: + case R_TILEPRO_IMM16_X1_TLS_GD: + case R_TILEPRO_IMM16_X1_TLS_IE: + MUNGE (Imm16_X1); + break; + case R_TILEPRO_MMSTART_X0: + MUNGE (MMStart_X0); + break; + case R_TILEPRO_MMEND_X0: + MUNGE (MMEnd_X0); + break; + case R_TILEPRO_MMSTART_X1: + MUNGE (MMStart_X1); + break; + case R_TILEPRO_MMEND_X1: + MUNGE (MMEnd_X1); + break; + case R_TILEPRO_SHAMT_X0: + MUNGE (ShAmt_X0); + break; + case R_TILEPRO_SHAMT_X1: + MUNGE (ShAmt_X1); + break; + case R_TILEPRO_SHAMT_Y0: + MUNGE (ShAmt_Y0); + break; + case R_TILEPRO_SHAMT_Y1: + MUNGE (ShAmt_Y1); + break; +#endif + } +#undef MUNGE + *p = bits; + _dl_flush_icache (p, sizeof (*p)); +} + +auto inline void __attribute__ ((always_inline)) +elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc, + void *const reloc_addr_arg) +{ + ElfW(Addr) *const reloc_addr = reloc_addr_arg; + *reloc_addr = l_addr + reloc->r_addend; +} + +auto inline void __attribute__ ((always_inline)) +elf_machine_lazy_rel (struct link_map *map, + ElfW(Addr) l_addr, const ElfW(Rela) *reloc, + int skip_ifunc) +{ + const unsigned int r_type = ELF32_R_TYPE (reloc->r_info); + + /* Check for unexpected PLT reloc type. */ + if (__builtin_expect (r_type == R_TILE(JMP_SLOT), 1)) + { + *(ElfW(Addr) *) (l_addr + reloc->r_offset) += l_addr; + } + else + _dl_reloc_bad_type (map, r_type, 1); +} + +#endif /* RESOLVE_MAP */ diff --git a/sysdeps/tile/dl-runtime.c b/sysdeps/tile/dl-runtime.c new file mode 100644 index 0000000000..e8a8361e27 --- /dev/null +++ b/sysdeps/tile/dl-runtime.c @@ -0,0 +1,80 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +/* Like x86_64, we pass the index of the relocation and not its offset. + In _dl_profile_fixup and _dl_call_pltexit we also use the index. + Therefore it is wasteful to compute the offset in the trampoline + just to reverse the operation immediately afterwards. */ +#define reloc_offset reloc_arg * sizeof (PLTREL) +#define reloc_index reloc_arg + +#include + +#include +#include + +/* Support notifying the simulator about new objects. */ +void internal_function +_dl_arch_map_object (struct link_map *l) +{ + int shift; + +#define DLPUTC(c) __insn_mtspr(SPR_SIM_CONTROL, \ + (SIM_CONTROL_DLOPEN \ + | ((c) << _SIM_CONTROL_OPERATOR_BITS))) + + /* Write the library address in hex. */ + DLPUTC ('0'); + DLPUTC ('x'); + for (shift = (int) sizeof (unsigned long) * 8 - 4; shift >= 0; shift -= 4) + DLPUTC ("0123456789abcdef"[(l->l_map_start >> shift) & 0xF]); + DLPUTC (':'); + + /* Write the library path, including the terminating '\0'. */ + for (size_t i = 0;; i++) + { + DLPUTC (l->l_name[i]); + if (l->l_name[i] == '\0') + break; + } +#undef DLPUTC +} + +/* Support notifying the simulator about removed objects prior to munmap(). */ +void internal_function +_dl_unmap (struct link_map *l) +{ + int shift; + +#define DLPUTC(c) __insn_mtspr(SPR_SIM_CONTROL, \ + (SIM_CONTROL_DLCLOSE \ + | ((c) << _SIM_CONTROL_OPERATOR_BITS))) + + /* Write the library address in hex. */ + DLPUTC ('0'); + DLPUTC ('x'); + for (shift = (int) sizeof (unsigned long) * 8 - 4; shift >= 0; shift -= 4) + DLPUTC ("0123456789abcdef"[(l->l_map_start >> shift) & 0xF]); + DLPUTC ('\0'); +#undef DLPUTC + + __munmap ((void *) l->l_map_start, l->l_map_end - l->l_map_start); +} + +#define DL_UNMAP(map) _dl_unmap (map) diff --git a/sysdeps/tile/dl-start.S b/sysdeps/tile/dl-start.S new file mode 100644 index 0000000000..2991374285 --- /dev/null +++ b/sysdeps/tile/dl-start.S @@ -0,0 +1,114 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include + + /* Get address of "sym" in "reg" assuming r51 holds ".Llink". */ + .macro pic_addr reg, sym +#ifdef __tilegx__ + moveli \reg, hw1_last(\sym - .Llink) + shl16insli \reg, \reg, hw0(\sym - .Llink) + ADD_PTR \reg, r51, \reg +#else + ADDLI_PTR \reg, r51, lo16(\sym - .Llink) + auli \reg, \reg, ha16(\sym - .Llink) +#endif + .endm + + .text +ENTRY (_start) + /* Linux starts us with sp pointing at the conventional Elf layout, + but we need to allow two 'caller' words for our ABI convention. */ + { + move r52, sp + andi sp, sp, -8 + } + cfi_def_cfa_register (r52) + { + /* Point sp at base of ABI area; point r4 to the caller-sp word. */ + ADDI_PTR sp, sp, -(2 * REGSIZE) + ADDI_PTR r4, sp, -REGSIZE + } + { + /* Save zero for caller sp in our 'caller' save area, and make + sure lr has a zero value, to limit backtraces. */ + move lr, zero + ST r4, zero + } + { + move r0, r52 + jal _dl_start + } + /* Save returned start of user program address for later. */ + move r50, r0 + + /* See if we were invoked explicitly with the dynamic loader, + in which case we have to adjust the argument vector. */ + lnk r51; .Llink: + pic_addr r4, _dl_skip_args + LD4U r4, r4 + BEQZT r4, .Lno_skip + + /* Load the argc word at the initial sp and adjust it. + We basically jump "sp" up over the first few argv entries + and write "argc" a little higher up in memory, to be the + base of the new kernel-initialized stack area. */ + LD_PTR r0, r52 + { + sub r0, r0, r4 + SHL_PTR_ADD r52, r4, r52 + } + { + ST_PTR r52, r0 + SHL_PTR_ADD sp, r4, sp + } + +.Lno_skip: + /* Call_dl_init (_dl_loaded, argc, argv, envp). See elf/start.s + for the layout of memory here; r52 is pointing to "+0". */ + pic_addr r0, _rtld_local + { + LD_PTR r1, r52 /* load argc in r1 */ + ADDLI_PTR r2, r52, __SIZEOF_POINTER__ /* point r2 at argv */ + } + { + LD_PTR r0, r0 /* yields _rtld_global._ns_loaded */ + addi r3, r1, 1 + move lr, zero + } + { + SHL_PTR_ADD r3, r3, r2 /* point r3 at envp */ + jal _dl_init_internal + } + + /* Call user program whose address we saved in r50. + We invoke it just like a static binary, but with _dl_fini + in r0 so we can distinguish. */ + + pic_addr r0, _dl_fini + move lr, zero + { + move sp, r52 + jr r50 + } + + /* Tell backtracer to give up (_start has no caller). */ + info 2 /* INFO_OP_CANNOT_BACKTRACE */ + +END (_start) diff --git a/sysdeps/tile/dl-tls.c b/sysdeps/tile/dl-tls.c new file mode 100644 index 0000000000..096539b4a7 --- /dev/null +++ b/sysdeps/tile/dl-tls.c @@ -0,0 +1,28 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#ifdef SHARED +/* We provide a fast-path version of __tls_get_addr to allow for + the normal case to be fast, both by coding the function tightly, + and more importantly by fixing its register clobber API so the + compiler can avoid having to set up frames, etc., unnecessarily. */ +#define __tls_get_addr __tls_get_addr_slow +#endif + +#include diff --git a/sysdeps/tile/dl-tls.h b/sysdeps/tile/dl-tls.h new file mode 100644 index 0000000000..baa0c12686 --- /dev/null +++ b/sysdeps/tile/dl-tls.h @@ -0,0 +1,46 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + + +/* Type used for the representation of TLS information in the GOT. */ +typedef struct +{ + unsigned long int ti_module; + unsigned long int ti_offset; +} tls_index; + +/* Fast-path function to get a TLS pointer. */ +extern void *__tls_get_addr (tls_index *ti); + +/* The thread pointer points to the first static TLS block. */ +#define TLS_TP_OFFSET 0 + +/* Dynamic thread vector pointers at the start of each TLS block. */ +#define TLS_DTV_OFFSET 0 + +/* Compute the value for a GOTTPREL reloc. */ +#define TLS_TPREL_VALUE(sym_map, sym) \ + ((sym_map)->l_tls_offset + (sym)->st_value - TLS_TP_OFFSET) + +/* Compute the value for a DTPREL reloc. */ +#define TLS_DTPREL_VALUE(sym) \ + ((sym)->st_value - TLS_DTV_OFFSET) + +/* Value used for dtv entries for which the allocation is delayed. */ +#define TLS_DTV_UNALLOCATED ((void *) -1l) diff --git a/sysdeps/tile/dl-trampoline.S b/sysdeps/tile/dl-trampoline.S new file mode 100644 index 0000000000..486b958ed5 --- /dev/null +++ b/sysdeps/tile/dl-trampoline.S @@ -0,0 +1,194 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include + +/* This function is called via the PLT header, which is called + from an individual PLT entry. + + At this point we have several values passed in: + + lr: return address to original user code + r28: the tpnt value to pass to _dl_runtime_resolver + r29: the PLT index of the invoked jump table entry. + + We set up a frame entry that looks like this (in int_reg_t units): + + +57: r25 return values from function... + +56: r24 + [...] + +33: r1 + +32: r0 + +31: PLT index + +30: tpnt + +29: stackframe + +28: caller lr + +27: r25 arguments to function... + +26: r24 + [...] + +3: r1 + +2: r0 + +1: standard ABI slot (sp) + +0: standard ABI slot (callee lr) + + The entries from "stackframe" up are only used in _dl_profile_resolve. + We save and restore r0 through r25, rather than the strictly + architected r0 through r9, to support unusual calling conventions; + for example, __tls_get_addr takes r0 and returns r0, but promises + not to clobber r1 through r24 to support its usual fast path. */ + +#define FRAME_SP (1 * REGSIZE) +#define FRAME_REGS (2 * REGSIZE) +#define FRAME_LR (28 * REGSIZE) /* Must follow FRAME_REGS */ +#define FRAME_STACKFRAME (29 * REGSIZE) +#define FRAME_TPNT (30 * REGSIZE) +#define FRAME_INDEX (31 * REGSIZE) +#define FRAME_RETVAL (32 * REGSIZE) + +#define FRAME_SIZE_SMALL (30 * REGSIZE) +#define FRAME_SIZE_LARGE (58 * REGSIZE) + +#define FOR_EACH_REG(f) \ + f(r0); f(r1); f(r2); f(r3); \ + f(r4); f(r5); f(r6); f(r7); \ + f(r8); f(r9); f(r10); f(r11); \ + f(r12); f(r13); f(r14); f(r15); \ + f(r16); f(r17); f(r18); f(r19); \ + f(r20); f(r21); f(r22); f(r23); \ + f(r24); f(r25) + +#define SAVE(REG) { ST r27, REG; ADDI_PTR r27, r27, REGSIZE } +#define RESTORE(REG) { LD REG, r27; ADDI_PTR r27, r27, REGSIZE } + + .macro dl_resolve, name, profile, framesize +.text +.global \name +.hidden \name +/* Note that cpp expands ENTRY(\name) incorrectly. */ +.type \name,@function +.align 8 +\name: + cfi_startproc + { + ST sp, lr + move r26, sp + } + { + ADDLI_PTR sp, sp, -\framesize + ADDLI_PTR r27, sp, FRAME_SP - \framesize + } + cfi_def_cfa_offset (\framesize) + { + ST r27, r26 + ADDI_PTR r27, r27, FRAME_REGS - FRAME_SP + } + FOR_EACH_REG(SAVE) + { + ST r27, lr + ADDLI_PTR r27, sp, FRAME_TPNT + } + cfi_offset (lr, FRAME_LR - \framesize) + .if \profile + { + move r0, r28 /* tpnt value */ + ST r27, r28 + ADDI_PTR r27, r27, FRAME_INDEX - FRAME_TPNT + } + { + move r1, r29 /* PLT index */ + ST r27, r29 + } + { + move r2, lr /* retaddr */ + ADDI_PTR r3, sp, FRAME_REGS /* La_tile_regs pointer */ + } + { + ADDLI_PTR r4, sp, FRAME_STACKFRAME /* framesize pointer */ + jal _dl_profile_fixup + } + ADDLI_PTR r28, sp, FRAME_STACKFRAME + LD_PTR r28, r28 + BGTZ r28, 1f + .else + { + move r0, r28 /* tpnt value 1 */ + move r1, r29 /* PLT index 2 */ + } + jal _dl_fixup + .endif + { + /* Copy aside the return value so we can restore r0 below. */ + move r29, r0 + /* Set up r27 to let us start restoring registers. */ + ADDLI_PTR r27, sp, FRAME_REGS + } + FOR_EACH_REG(RESTORE) + .if \profile + ADDLI_PTR r28, sp, FRAME_STACKFRAME + LD r28, r28 + BGTZ r28, 1f + .endif + { + /* Restore original user return address. */ + LD lr, r27 + /* Pop off our stack frame. */ + ADDLI_PTR sp, sp, \framesize + } + cfi_def_cfa_offset (0) + jr r29 /* Transfer control to freshly loaded code. */ + jrp lr /* Keep backtracer happy. */ + + .if \profile +1: jalr r29 /* Call resolved function. */ + { + ADDLI_PTR r28, sp, FRAME_TPNT + ADDLI_PTR r27, sp, FRAME_RETVAL + } + FOR_EACH_REG(SAVE) + { + LD r0, r28 + ADDI_PTR r28, r28, FRAME_INDEX - FRAME_TPNT + } + { + LD r1, r28 + ADDLI_PTR r2, sp, FRAME_REGS + } + { + ADDLI_PTR r3, sp, FRAME_RETVAL + jal _dl_call_pltexit + } + { + ADDLI_PTR lr, sp, FRAME_LR + ADDLI_PTR r27, sp, FRAME_RETVAL + } + FOR_EACH_REG(RESTORE) + { + LD lr, lr + ADDLI_PTR sp, sp, \framesize + } + jrp lr + .endif +END (\name) + .endm + + dl_resolve _dl_runtime_resolve, 0, FRAME_SIZE_SMALL +#ifndef PROF + dl_resolve _dl_runtime_profile, 1, FRAME_SIZE_LARGE +#endif diff --git a/sysdeps/tile/elf/start.S b/sysdeps/tile/elf/start.S new file mode 100644 index 0000000000..71a2c8bc1f --- /dev/null +++ b/sysdeps/tile/elf/start.S @@ -0,0 +1,184 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. + + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + + 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. */ + +/* This is the canonical entry point, usually the first thing in the text + segment. The ELF standard tells us that the stack is set up like this on + entry (the left side is the offset from "sp"), in units of + __SIZEOF_POINTER__ entries: + + +0 argc + +1 argv[0] + ... + +(argc+1) NULL + +(argc+2) envp[0] + ... + NULL + ... ElfInfo + + The ElfInfo is pairs of key/value long words following the envp + pointers and terminated by a zero-valued key. + + Although not mandated by the standard, it happens to be the case + that we store the actual argv and envp strings immediately after + the ElfInfo data on the stack. + + On entry r0 points to the shared library termination function, or 0 + if there isn't one. +*/ + +#include +#include +#include + + .text + .global _start + .type _start,@function + .align 8 +_start: + /* Linux starts us with sp pointing at the conventional Elf layout, + but we need to allow two "caller" words for our ABI convention. */ + { + /* Load argc (stored as a "long", equivalent to a pointer type). */ + LD_PTR r1, sp + + /* Save incoming 'sp', which points to the Elf argument block. */ + move r52, sp + } + + { + /* Allocate stack frame callee space for __libc_start_main. */ + ADDI_PTR r12, sp, -(2 * REGSIZE) + } + + { + /* Get our PC. */ + lnk r13 + + /* sp is not necessarily properly aligned on startup because + of the way ld.so pops off leading argv elements. So align it. */ + andi sp, r12, -8 + } +.Lmy_pc: + + { + /* Pass the address of the shared library termination function. */ + move r5, r0 + + /* Compute location where __libc_start_main's caller is supposed to + store its frame pointer. */ + ADDI_PTR r12, sp, REGSIZE + + /* Zero out callee space for return address. Unnecessary but free. + This is just paranoia to help backtracing not go awry. */ + ST sp, zero + } + { + /* Zero out our frame pointer for __libc_start_main. */ + ST r12, zero + + /* Zero out lr to make __libc_start_main the end of backtrace. */ + move lr, zero + + /* Compute a pointer to argv. envp will be determined + later in __libc_start_main. We set up the first argument + (the address of main) below. */ + ADDI_PTR r2, r52, __SIZEOF_POINTER__ + } + { + /* Pass the highest stack address to user code. */ + ADDI_PTR r6, sp, (2 * REGSIZE) + + /* Pass address of main() in r0, and of our own entry + points to .fini and .init in r3 and r4. */ +#ifdef __tilegx__ + moveli r0, hw2_last(main - .Lmy_pc) + } + { + moveli r3, hw2_last(__libc_csu_init - .Lmy_pc) + shl16insli r0, r0, hw1(main - .Lmy_pc) + } + { + shl16insli r3, r3, hw1(__libc_csu_init - .Lmy_pc) + shl16insli r0, r0, hw0(main - .Lmy_pc) + } + { + shl16insli r3, r3, hw0(__libc_csu_init - .Lmy_pc) + moveli r4, hw2_last(__libc_csu_fini - .Lmy_pc) + } + { + ADD_PTR r0, r0, r13 + shl16insli r4, r4, hw1(__libc_csu_fini - .Lmy_pc) + } + { + ADD_PTR r3, r3, r13 + shl16insli r4, r4, hw0(__libc_csu_fini - .Lmy_pc) + } + { + ADD_PTR r4, r4, r13 +#else + addli r0, r13, lo16(main - .Lmy_pc) + } + { + auli r0, r0, ha16(main - .Lmy_pc) + addli r3, r13, lo16(__libc_csu_init - .Lmy_pc) + } + { + auli r3, r3, ha16(__libc_csu_init - .Lmy_pc) + addli r4, r13, lo16(__libc_csu_fini - .Lmy_pc) + } + { + auli r4, r4, ha16(__libc_csu_fini - .Lmy_pc) + +#endif + + /* Call the user's main function, and exit with its value. + But let the libc call main. */ + j plt(__libc_start_main) + } + { + /* Tell backtracer to give up (_start has no caller). */ + info INFO_OP_CANNOT_BACKTRACE + } +.size _start, .-_start + +/* Define a symbol for the first piece of initialized data. */ + .data + .global __data_start + .align 8 +__data_start: + .long 0 + .weak data_start + data_start = __data_start diff --git a/sysdeps/tile/fegetenv.c b/sysdeps/tile/fegetenv.c new file mode 100644 index 0000000000..f6e2bb173a --- /dev/null +++ b/sysdeps/tile/fegetenv.c @@ -0,0 +1,28 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include + +int +__fegetenv (fenv_t *envp) +{ + /* As a no-op, this always succeeds. */ + return 0; +} +libm_hidden_ver (__fegetenv, fegetenv) diff --git a/sysdeps/tile/fegetround.c b/sysdeps/tile/fegetround.c new file mode 100644 index 0000000000..f1217bf819 --- /dev/null +++ b/sysdeps/tile/fegetround.c @@ -0,0 +1,26 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include + +int +fegetround (void) +{ + return FE_TONEAREST; +} diff --git a/sysdeps/tile/feholdexcpt.c b/sysdeps/tile/feholdexcpt.c new file mode 100644 index 0000000000..384b696abd --- /dev/null +++ b/sysdeps/tile/feholdexcpt.c @@ -0,0 +1,28 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include + +/* Tile has no exception flags, so this routine can be a no-op. */ +int +feholdexcept (fenv_t *envp) +{ + return 0; +} +libm_hidden_def (feholdexcept) diff --git a/sysdeps/tile/fesetenv.c b/sysdeps/tile/fesetenv.c new file mode 100644 index 0000000000..ceb45e4d4d --- /dev/null +++ b/sysdeps/tile/fesetenv.c @@ -0,0 +1,32 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include + +/* The only way to get an initialized fenv_t on Tile is with feholdexcept() + or via FE_DFL_ENV, either of which restores the environment to its + normal state, i.e. FE_DFL_ENV. */ +int +__fesetenv (const fenv_t *envp) +{ + return 0; +} +libm_hidden_ver (__fesetenv, fesetenv) +versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2); diff --git a/sysdeps/tile/fesetround.c b/sysdeps/tile/fesetround.c new file mode 100644 index 0000000000..b29ecea915 --- /dev/null +++ b/sysdeps/tile/fesetround.c @@ -0,0 +1,27 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include + +int +fesetround (int round) +{ + return (round == FE_TONEAREST) ? 0 : 1; +} +libm_hidden_def (fesetround) diff --git a/sysdeps/tile/feupdateenv.c b/sysdeps/tile/feupdateenv.c new file mode 100644 index 0000000000..5b021933e2 --- /dev/null +++ b/sysdeps/tile/feupdateenv.c @@ -0,0 +1,28 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include + +/* Tile has no exception flags, so this routine can be a no-op. */ +int +feupdateenv (const fenv_t *envp) +{ + return 0; +} +libm_hidden_def (feupdateenv) diff --git a/sysdeps/tile/ffs.c b/sysdeps/tile/ffs.c new file mode 100644 index 0000000000..498559ca84 --- /dev/null +++ b/sysdeps/tile/ffs.c @@ -0,0 +1,45 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#define ffsl __something_else +#include + +#undef ffs +int +__ffs (int x) +{ + return __builtin_ffs (x); +} +weak_alias (__ffs, ffs) +libc_hidden_builtin_def (ffs) + +#undef ffsll +int +ffsll (long long x) +{ + return __builtin_ffsll (x); +} + +#undef ffsl +#if ULONG_MAX == UINT_MAX +weak_alias (__ffs, ffsl) +#else +weak_alias (ffsll, ffsl) +#endif diff --git a/sysdeps/tile/ffsll.c b/sysdeps/tile/ffsll.c new file mode 100644 index 0000000000..180eaa8c23 --- /dev/null +++ b/sysdeps/tile/ffsll.c @@ -0,0 +1 @@ +/* This function is defined in ffs.c. */ diff --git a/sysdeps/tile/gccframe.h b/sysdeps/tile/gccframe.h new file mode 100644 index 0000000000..041d3d87a5 --- /dev/null +++ b/sysdeps/tile/gccframe.h @@ -0,0 +1,22 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#define FIRST_PSEUDO_REGISTER 64 + +#include diff --git a/sysdeps/tile/jmpbuf-offsets.h b/sysdeps/tile/jmpbuf-offsets.h new file mode 100644 index 0000000000..ce4f1b2daa --- /dev/null +++ b/sysdeps/tile/jmpbuf-offsets.h @@ -0,0 +1,63 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +/* We don't use most of these symbols; they are here for documentation. */ +#define JB_R30 0 +#define JB_R31 1 +#define JB_R32 2 +#define JB_R33 3 +#define JB_R34 4 +#define JB_R35 5 +#define JB_R36 6 +#define JB_R37 7 +#define JB_R38 8 +#define JB_R39 9 +#define JB_R40 10 +#define JB_R41 11 +#define JB_R42 12 +#define JB_R43 13 +#define JB_R44 14 +#define JB_R45 15 +#define JB_R46 16 +#define JB_R47 17 +#define JB_R48 18 +#define JB_R49 19 +#define JB_R50 20 +#define JB_R51 21 +#define JB_FP 22 /* r52 */ +#define JB_TP 23 /* r53 */ +#define JB_SP 24 /* r54 */ +#define JB_PC 25 /* normally LR, r55 */ +#define JB_ICS 26 /* interrupt critical section bit */ + +/* We save space for some extra state to accomodate future changes. */ +#define JB_LEN 32 /* number of words */ + +#define JB_SIZE (JB_LEN * REGSIZE) + +/* Helper macro used by all the setjmp/longjmp assembly code. */ +#define FOR_EACH_CALLEE_SAVED_REG(f) \ + .no_require_canonical_reg_names; f(r30); f(r31); \ + f(r32); f(r33); f(r34); f(r35); f(r36); f(r37); f(r38); f(r39); \ + f(r40); f(r41); f(r42); f(r43); f(r44); f(r45); f(r46); f(r47); \ + f(r48); f(r49); f(r50); f(r51); f(r52); f(r53); f(r54); f(r55) + +/* Helper for generic ____longjmp_chk(). */ +#define JB_FRAME_ADDRESS(buf) \ + ((void *) (unsigned long) (buf[JB_SP])) diff --git a/sysdeps/tile/jmpbuf-unwind.h b/sysdeps/tile/jmpbuf-unwind.h new file mode 100644 index 0000000000..624a014868 --- /dev/null +++ b/sysdeps/tile/jmpbuf-unwind.h @@ -0,0 +1,49 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + Based on work contributed by Jakub Jelinek , 2003. + + 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. */ + +#include +#include +#include +#include +#include + +/* Test if longjmp to JMPBUF would unwind the frame + containing a local variable at ADDRESS. */ +#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \ + ((void *) (address) < (void *) demangle ((jmpbuf)[JB_SP])) + +#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \ + _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj) + +static inline uintptr_t __attribute__ ((unused)) +_jmpbuf_sp (__jmp_buf regs) +{ + uintptr_t sp = regs[JB_SP]; +#ifdef PTR_DEMANGLE + PTR_DEMANGLE (sp); +#endif + return sp; +} + +#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \ + ((uintptr_t) (_address) - (_adj) < _jmpbuf_sp (_jmpbuf) - (_adj)) + +/* We use the normal longjmp for unwinding. */ +#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val) diff --git a/sysdeps/tile/ldsodefs.h b/sysdeps/tile/ldsodefs.h new file mode 100644 index 0000000000..e90de56c0c --- /dev/null +++ b/sysdeps/tile/ldsodefs.h @@ -0,0 +1,41 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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 _TILE_LDSODEFS_H +#define _TILE_LDSODEFS_H 1 + +#include + +struct La_tile_regs; +struct La_tile_retval; + +#define ARCH_PLTENTER_MEMBERS \ + ElfW(Addr) (*tile_gnu_pltenter) (ElfW(Sym) *, unsigned int, uintptr_t *, \ + uintptr_t *, struct La_tile_regs *, \ + unsigned int *, const char *, \ + long int *) + +#define ARCH_PLTEXIT_MEMBERS \ + ElfW(Addr) (*tile_gnu_pltexit) (ElfW(Sym) *, unsigned int, uintptr_t *, \ + uintptr_t *, struct La_tile_regs *, \ + struct La_tile_retval *, const char *) + +#include_next + +#endif diff --git a/sysdeps/tile/machine-gmon.h b/sysdeps/tile/machine-gmon.h new file mode 100644 index 0000000000..473707b037 --- /dev/null +++ b/sysdeps/tile/machine-gmon.h @@ -0,0 +1,26 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#define _MCOUNT_DECL(from, self) \ + void __mcount_internal (u_long from, u_long self) + +/* Call __mcount_internal with our the return PC for our caller, and + the return PC our caller will return to. Empty since we use an + assembly stub instead. */ +#define MCOUNT diff --git a/sysdeps/tile/nptl/Makefile b/sysdeps/tile/nptl/Makefile new file mode 100644 index 0000000000..24990a2b7e --- /dev/null +++ b/sysdeps/tile/nptl/Makefile @@ -0,0 +1,21 @@ +# 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. + +ifeq ($(subdir),csu) +gen-as-const-headers += tcb-offsets.sym +endif diff --git a/sysdeps/tile/nptl/pthread_spin_lock.c b/sysdeps/tile/nptl/pthread_spin_lock.c new file mode 100644 index 0000000000..ee055623a5 --- /dev/null +++ b/sysdeps/tile/nptl/pthread_spin_lock.c @@ -0,0 +1,57 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include "pthreadP.h" +#include +#include + +/* Bound point for bounded exponential backoff */ +#define BACKOFF_MAX 2048 + +/* Initial cycle delay for exponential backoff */ +#define BACKOFF_START 32 + +#ifdef __tilegx__ +/* Use cmpexch() after the initial fast-path exch to avoid + invalidating the cache line of the lock holder. */ +# define TNS(p) atomic_exchange_acq((p), 1) +# define CMPTNS(p) atomic_compare_and_exchange_val_acq((p), 1, 0) +#else +# define TNS(p) __insn_tns(p) +# define CMPTNS(p) __insn_tns(p) +# define SPR_CYCLE SPR_CYCLE_LOW /* The low 32 bits are sufficient. */ +#endif + +int +pthread_spin_lock (pthread_spinlock_t *lock) +{ + if (__builtin_expect (TNS (lock) != 0, 0)) + { + unsigned int backoff = BACKOFF_START; + while (CMPTNS (lock) != 0) + { + unsigned int start = __insn_mfspr (SPR_CYCLE); + while (__insn_mfspr (SPR_CYCLE) - start < backoff) + ; + if (backoff < BACKOFF_MAX) + backoff *= 2; + } + } + return 0; +} diff --git a/sysdeps/tile/nptl/pthread_spin_trylock.c b/sysdeps/tile/nptl/pthread_spin_trylock.c new file mode 100644 index 0000000000..f111cc7c24 --- /dev/null +++ b/sysdeps/tile/nptl/pthread_spin_trylock.c @@ -0,0 +1,33 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include "pthreadP.h" +#include + +#ifdef __tilegx__ +#define TNS(p) __insn_exch4((p), 1) +#else +#define TNS(p) __insn_tns(p) +#endif + +int +pthread_spin_trylock (pthread_spinlock_t *lock) +{ + return (TNS (lock) == 0) ? 0 : EBUSY; +} diff --git a/sysdeps/tile/nptl/pthreaddef.h b/sysdeps/tile/nptl/pthreaddef.h new file mode 100644 index 0000000000..4ba1adb0fa --- /dev/null +++ b/sysdeps/tile/nptl/pthreaddef.h @@ -0,0 +1,42 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include + +/* Default stack size. */ +#define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024) + +/* Required stack pointer alignment at beginning. */ +#define STACK_ALIGN 16 + +/* Minimal stack size after allocating thread descriptor and guard size. */ +#define MINIMAL_REST_STACK 2048 + +/* Alignment requirement for TCB. */ +#define TCB_ALIGNMENT 16 + + +/* Location of current stack frame. */ +#define CURRENT_STACK_FRAME __builtin_frame_address (0) + +/* XXX Until we have a better place keep the definitions here. */ + +#define __exit_thread_inline(val) \ + INLINE_SYSCALL (exit, 1, (val)) diff --git a/sysdeps/tile/nptl/tcb-offsets.sym b/sysdeps/tile/nptl/tcb-offsets.sym new file mode 100644 index 0000000000..6740bc976f --- /dev/null +++ b/sysdeps/tile/nptl/tcb-offsets.sym @@ -0,0 +1,17 @@ +#define SHARED /* needed to get struct rtld_global from */ +#include +#include +#include + +-- + +-- Abuse tls.h macros to derive offsets relative to the thread register. +#define thread_offsetof(mem) (long)(offsetof(struct pthread, mem) - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE) + +MULTIPLE_THREADS_OFFSET thread_offsetof (header.multiple_threads) +PID_OFFSET thread_offsetof (pid) +TID_OFFSET thread_offsetof (tid) +POINTER_GUARD (offsetof (tcbhead_t, pointer_guard) - TLS_TCB_OFFSET - sizeof (tcbhead_t)) +FEEDBACK_DATA_OFFSET (offsetof (tcbhead_t, feedback_data) - TLS_TCB_OFFSET - sizeof (tcbhead_t)) +DTV_OFFSET (offsetof (tcbhead_t, dtv) - TLS_TCB_OFFSET - sizeof (tcbhead_t)) +TLS_GENERATION_OFFSET offsetof (struct rtld_global, _dl_tls_generation) diff --git a/sysdeps/tile/nptl/tls.h b/sysdeps/tile/nptl/tls.h new file mode 100644 index 0000000000..106451aa7a --- /dev/null +++ b/sysdeps/tile/nptl/tls.h @@ -0,0 +1,195 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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 _TLS_H +#define _TLS_H 1 + +# include + +#ifndef __ASSEMBLER__ +# include +# include +# include + +/* Type for the dtv. */ +typedef union dtv +{ + size_t counter; + struct + { + void *val; + bool is_static; + } pointer; +} dtv_t; + +#else /* __ASSEMBLER__ */ +# include +#endif /* __ASSEMBLER__ */ + + +#ifndef __ASSEMBLER__ + +/* Get system call information. */ +# include + +/* The TP points to the start of the thread blocks. */ +# define TLS_DTV_AT_TP 1 + +/* We use the multiple_threads field in the pthread struct */ +#define TLS_MULTIPLE_THREADS_IN_TCB 1 + +/* Get the thread descriptor definition. */ +# include + +/* The stack_guard is accessed directly by GCC -fstack-protector code, + so it is a part of public ABI. The dtv and pointer_guard fields + are private. */ +typedef struct +{ + void *feedback_data; + uintptr_t pointer_guard; + uintptr_t stack_guard; + dtv_t *dtv; +} tcbhead_t; + +/* This is the size of the initial TCB. Because our TCB is before the thread + pointer, we don't need this. */ +# define TLS_INIT_TCB_SIZE 0 + +/* Alignment requirements for the initial TCB. */ +# define TLS_INIT_TCB_ALIGN __alignof__ (struct pthread) + +/* This is the size of the TCB. Because our TCB is before the thread + pointer, we don't need this. */ +# define TLS_TCB_SIZE 0 + +/* Alignment requirements for the TCB. */ +# define TLS_TCB_ALIGN __alignof__ (struct pthread) + +/* This is the size we need before TCB - actually, it includes the TCB. */ +# define TLS_PRE_TCB_SIZE \ + (sizeof (struct pthread) \ + + ((sizeof (tcbhead_t) + TLS_TCB_ALIGN - 1) & ~(TLS_TCB_ALIGN - 1))) + +/* Return the thread descriptor (tp) for the current thread. */ +register void *__thread_pointer asm ("tp"); + +/* The thread pointer (in hardware register tp) points to the end of + the TCB. The pthread_descr structure is immediately in front of the TCB. */ +# define TLS_TCB_OFFSET 0 + +/* Install the dtv pointer. The pointer passed is to the element with + index -1 which contain the length. */ +# define INSTALL_DTV(tcbp, dtvp) \ + (((tcbhead_t *) (tcbp))[-1].dtv = (dtvp) + 1) + +/* Install new dtv for current thread. */ +# define INSTALL_NEW_DTV(dtv) (THREAD_DTV() = (dtv)) + +/* Return dtv of given thread descriptor. */ +# define GET_DTV(tcbp) (((tcbhead_t *) (tcbp))[-1].dtv) + +/* Code to initially initialize the thread pointer (tp). */ +# define TLS_INIT_TP(tcbp, secondcall) \ + (__thread_pointer = (char *)(tcbp) + TLS_TCB_OFFSET, NULL) + +/* Return the address of the dtv for the current thread. */ +# define THREAD_DTV() \ + (((tcbhead_t *) (__thread_pointer - TLS_TCB_OFFSET))[-1].dtv) + +/* Return the thread descriptor for the current thread. */ +# define THREAD_SELF \ + ((struct pthread *) (__thread_pointer \ + - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE)) + +/* Magic for libthread_db to know how to do THREAD_SELF. */ +#ifdef __tilegx__ +# define DB_THREAD_SELF \ + REGISTER (64, 64, REG_TP * 8, - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE) +#else +# define DB_THREAD_SELF \ + REGISTER (32, 32, REG_TP * 4, - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE) +#endif + +/* Read member of the thread descriptor directly. */ +# define THREAD_GETMEM(descr, member) (descr->member) + +/* Same as THREAD_GETMEM, but the member offset can be non-constant. */ +# define THREAD_GETMEM_NC(descr, member, idx) \ + (descr->member[idx]) + +/* Set member of the thread descriptor directly. */ +# define THREAD_SETMEM(descr, member, value) \ + (descr->member = (value)) + +/* Same as THREAD_SETMEM, but the member offset can be non-constant. */ +# define THREAD_SETMEM_NC(descr, member, idx, value) \ + (descr->member[idx] = (value)) + +/* Set the stack guard field in TCB head. */ +# define THREAD_SET_STACK_GUARD(value) \ + (((tcbhead_t *) ((char *) __thread_pointer \ + - TLS_TCB_OFFSET))[-1].stack_guard = (value)) +# define THREAD_COPY_STACK_GUARD(descr) \ + (((tcbhead_t *) ((char *) (descr) \ + + TLS_PRE_TCB_SIZE))[-1].stack_guard \ + = ((tcbhead_t *) ((char *) __thread_pointer \ + - TLS_TCB_OFFSET))[-1].stack_guard) + +/* Set the pointer guard field in TCB head. */ +# define THREAD_GET_POINTER_GUARD() \ + (((tcbhead_t *) ((char *) __thread_pointer \ + - TLS_TCB_OFFSET))[-1].pointer_guard) +# define THREAD_SET_POINTER_GUARD(value) \ + (THREAD_GET_POINTER_GUARD () = (value)) +# define THREAD_COPY_POINTER_GUARD(descr) \ + (((tcbhead_t *) ((char *) (descr) \ + + TLS_PRE_TCB_SIZE))[-1].pointer_guard \ + = THREAD_GET_POINTER_GUARD()) + +/* l_tls_offset == 0 is perfectly valid on Tile, so we have to use some + different value to mean unset l_tls_offset. */ +# define NO_TLS_OFFSET -1 + +/* Get and set the global scope generation counter in struct pthread. */ +#define THREAD_GSCOPE_FLAG_UNUSED 0 +#define THREAD_GSCOPE_FLAG_USED 1 +#define THREAD_GSCOPE_FLAG_WAIT 2 +#define THREAD_GSCOPE_RESET_FLAG() \ + do \ + { int __res \ + = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \ + THREAD_GSCOPE_FLAG_UNUSED); \ + if (__res == THREAD_GSCOPE_FLAG_WAIT) \ + lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1, LLL_PRIVATE); \ + } \ + while (0) +#define THREAD_GSCOPE_SET_FLAG() \ + do \ + { \ + THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \ + atomic_write_barrier (); \ + } \ + while (0) +#define THREAD_GSCOPE_WAIT() \ + GL(dl_wait_lookup_done) () + +#endif /* __ASSEMBLER__ */ + +#endif /* tls.h */ diff --git a/sysdeps/tile/preconfigure b/sysdeps/tile/preconfigure new file mode 100644 index 0000000000..9dba5b1040 --- /dev/null +++ b/sysdeps/tile/preconfigure @@ -0,0 +1,17 @@ +# This is a -*- sh -*- +case "$machine" in + tilepro) + base_machine=tile machine=tile/tilepro ;; + tilegx) + base_machine=tile + if $CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null | grep -q __LP64__; then + machine=tile/tilegx/tilegx64 + else + machine=tile/tilegx/tilegx32 + fi ;; +esac +case "$machine" in + tile*) + libc_commonpagesize=0x10000 + libc_relro_required=yes ;; +esac diff --git a/sysdeps/tile/s_fma.c b/sysdeps/tile/s_fma.c new file mode 100644 index 0000000000..355b4edf6a --- /dev/null +++ b/sysdeps/tile/s_fma.c @@ -0,0 +1,3 @@ +/* Although tile uses ieee754/dbl-64, it does not support the + rounding modes required to use the standard dbl-64 s_fma.c. */ +#include diff --git a/sysdeps/tile/s_fmaf.c b/sysdeps/tile/s_fmaf.c new file mode 100644 index 0000000000..caa8e40654 --- /dev/null +++ b/sysdeps/tile/s_fmaf.c @@ -0,0 +1,3 @@ +/* Although tile uses ieee754/dbl-64, it does not support the + rounding modes required to use the standard dbl-64 s_fmaf.c. */ +#include diff --git a/sysdeps/tile/setjmp.S b/sysdeps/tile/setjmp.S new file mode 100644 index 0000000000..253990997e --- /dev/null +++ b/sysdeps/tile/setjmp.S @@ -0,0 +1,47 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include + + .text + + /* Keep traditional entry points in with sigsetjmp(). */ +ENTRY(setjmp) + { movei r1, 1; j 1f } +END(setjmp) + +ENTRY(_setjmp) + { movei r1, 0; j 1f } +END(_setjmp) +libc_hidden_def (_setjmp) + +ENTRY(__sigsetjmp) + FEEDBACK_ENTER(__sigsetjmp) +1: + move r2, r0 + +#define SAVE(r) { ST r2, r ; ADDI_PTR r2, r2, REGSIZE } + FOR_EACH_CALLEE_SAVED_REG(SAVE) + + mfspr r3, INTERRUPT_CRITICAL_SECTION + ST r2, r3 + j plt(__sigjmp_save) + jrp lr /* Keep the backtracer happy. */ +END(__sigsetjmp) diff --git a/sysdeps/tile/shlib-versions b/sysdeps/tile/shlib-versions new file mode 100644 index 0000000000..f50868ff64 --- /dev/null +++ b/sysdeps/tile/shlib-versions @@ -0,0 +1,2 @@ +# glibc 2.12 was released to customers; 2.15 was the first community version. +tile.*-.*-linux-gnu DEFAULT GLIBC_2.12 GLIBC_2.15 diff --git a/sysdeps/tile/stackinfo.h b/sysdeps/tile/stackinfo.h new file mode 100644 index 0000000000..e3233ac10f --- /dev/null +++ b/sysdeps/tile/stackinfo.h @@ -0,0 +1,49 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +/* This file contains a bit of information about the stack allocation + of the processor. */ + +#ifndef _STACKINFO_H +#define _STACKINFO_H 1 + +#include + +/* On tile the stack grows down. */ +#define _STACK_GROWS_DOWN 1 + +/* Default to a non-executable stack. */ +#define DEFAULT_STACK_PERMS (PF_R|PF_W) + +/* Access to the stack pointer. The macros are used in alloca_account + for which they need to act as barriers as well, hence the additional + (unnecessary) parameters. */ +#define stackinfo_get_sp() \ + ({ void *p__; asm volatile ("move %0, sp" : "=r" (p__)); p__; }) +#if defined __tilegx__ && __WORDSIZE == 32 +#define __stackinfo_sub "subx" +#else +#define __stackinfo_sub "sub" +#endif +#define stackinfo_sub_sp(ptr) \ + ({ ptrdiff_t d__; \ + asm volatile (__stackinfo_sub " %0, %0, sp" : "=r" (d__) : "0" (ptr)); \ + d__; }) + +#endif /* stackinfo.h */ diff --git a/sysdeps/tile/sysdep.h b/sysdeps/tile/sysdep.h new file mode 100644 index 0000000000..758d28b9fa --- /dev/null +++ b/sysdeps/tile/sysdep.h @@ -0,0 +1,120 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include + +#ifndef HAVE_ELF +# error "ELF is assumed." +#endif + +#ifndef NO_UNDERSCORES +# error "User-label prefix (underscore) assumed absent." +#endif + +#if defined __ASSEMBLER__ || defined REQUEST_ASSEMBLER_MACROS + +#include + +/* Make use of .type and .size directives. */ +#define ASM_TYPE_DIRECTIVE(name,typearg) .type name,typearg; +#define ASM_SIZE_DIRECTIVE(name) .size name,.-name; + +/* Define an entry point visible from C. */ +#define ENTRY(name) \ + ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name); \ + ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function) \ + .align 8; \ + C_LABEL(name) \ + cfi_startproc; \ + CALL_MCOUNT + +#undef END +#define END(name) \ + cfi_endproc; \ + ASM_SIZE_DIRECTIVE(name) + +/* Since C identifiers are not normally prefixed with an underscore + on this system, the asm identifier `syscall_error' intrudes on the + C name space. Make sure we use an innocuous name. */ +#define syscall_error __syscall_error +#define mcount __mcount + +/* If compiled for profiling, call `mcount' at the start of each function. + The mcount code requires the caller PC in r10. The `mcount' function + sets lr back to the value r10 had on entry when it returns. */ +#ifdef PROF +#define CALL_MCOUNT { move r10, lr; jal mcount } +#else +#define CALL_MCOUNT /* Do nothing. */ +#endif + +/* Local label name for asm code. */ +#define L(name) .L##name + +/* Specify the size in bytes of a machine register. */ +#ifdef __tilegx__ +#define REGSIZE 8 +#else +#define REGSIZE 4 +#endif + +/* Support a limited form of shared assembly between tile and tilegx. + The presumption is that LD/ST are used for manipulating registers. + Since opcode parsing is case-insensitive, we don't need to provide + definitions for these on tilegx. */ +#ifndef __tilegx__ +#define LD lw +#define LD4U lw +#define ST sw +#define ST4 sw +#define BNEZ bnz +#define BEQZ bz +#define BEQZT bzt +#define BGTZ bgz +#define CMPEQI seqi +#define CMPEQ seq +#define CMOVEQZ mvz +#define CMOVNEZ mvnz +#endif + +/* Provide "pointer-oriented" instruction variants. These differ not + just for tile vs tilegx, but also for tilegx -m64 vs -m32. */ +#if defined __tilegx__ && __WORDSIZE == 32 +#define ADD_PTR addx +#define ADDI_PTR addxi +#define ADDLI_PTR addxli +#define LD_PTR ld4s +#define ST_PTR st4 +#define SHL_PTR_ADD shl2add +#else +#define ADD_PTR add +#define ADDI_PTR addi +#define ADDLI_PTR addli +#define LD_PTR LD +#define ST_PTR ST +#ifdef __tilegx__ +#define SHL_PTR_ADD shl3add +#else +#define SHL_PTR_ADD s2a +#endif +#endif + +#endif /* __ASSEMBLER__ */ diff --git a/sysdeps/tile/tilegx/bits/atomic.h b/sysdeps/tile/tilegx/bits/atomic.h new file mode 100644 index 0000000000..1cb4e2b71b --- /dev/null +++ b/sysdeps/tile/tilegx/bits/atomic.h @@ -0,0 +1,50 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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_ATOMIC_H +#define _BITS_ATOMIC_H 1 + +#include + +/* Pick appropriate 8- or 4-byte instruction. */ +#define __atomic_update(mem, v, op) \ + ((__typeof (*(mem))) (__typeof (*(mem) - *(mem))) \ + ((sizeof (*(mem)) == 8) ? \ + __insn_##op ((void *) (mem), (int64_t) (__typeof((v) - (v))) (v)) : \ + (sizeof (*(mem)) == 4) ? \ + __insn_##op##4 ((void *) (mem), (int32_t) (__typeof ((v) - (v))) (v)) : \ + __atomic_error_bad_argument_size())) + +#define atomic_compare_and_exchange_val_acq(mem, n, o) \ + ({ __insn_mtspr (SPR_CMPEXCH_VALUE, (int64_t) (__typeof ((o) - (o))) (o)); \ + __atomic_update (mem, n, cmpexch); }) +#define atomic_exchange_acq(mem, newvalue) \ + __atomic_update (mem, newvalue, exch) +#define atomic_exchange_and_add(mem, value) \ + __atomic_update (mem, value, fetchadd) +#define atomic_and_val(mem, mask) \ + __atomic_update (mem, mask, fetchand) +#define atomic_or_val(mem, mask) \ + __atomic_update (mem, mask, fetchor) +#define atomic_decrement_if_positive(mem) \ + __atomic_update (mem, -1, fetchaddgez) + +#include + +#endif /* bits/atomic.h */ diff --git a/sysdeps/tile/tilegx/bits/wordsize.h b/sysdeps/tile/tilegx/bits/wordsize.h new file mode 100644 index 0000000000..78f34817d5 --- /dev/null +++ b/sysdeps/tile/tilegx/bits/wordsize.h @@ -0,0 +1,8 @@ +/* Determine the wordsize from the preprocessor defines. */ + +#ifdef __LP64__ +# define __WORDSIZE 64 +# define __WORDSIZE_COMPAT32 1 +#else +# define __WORDSIZE 32 +#endif diff --git a/sysdeps/tile/tilegx/memchr.c b/sysdeps/tile/tilegx/memchr.c new file mode 100644 index 0000000000..52a20b6daa --- /dev/null +++ b/sysdeps/tile/tilegx/memchr.c @@ -0,0 +1,74 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include "string-endian.h" + +void * +__memchr (const void *s, int c, size_t n) +{ + const uint64_t *last_word_ptr; + const uint64_t *p; + const char *last_byte_ptr; + uintptr_t s_int; + uint64_t goal, before_mask, v, bits; + char *ret; + + if (__builtin_expect (n == 0, 0)) + { + /* Don't dereference any memory if the array is empty. */ + return NULL; + } + + /* Get an aligned pointer. */ + s_int = (uintptr_t) s; + p = (const uint64_t *) (s_int & -8); + + /* Create eight copies of the byte for which we are looking. */ + goal = 0x0101010101010101ULL * (uint8_t) c; + + /* Read the first word, but munge it so that bytes before the array + will not match goal. */ + before_mask = MASK (s_int); + v = (*p | before_mask) ^ (goal & before_mask); + + /* Compute the address of the last byte. */ + last_byte_ptr = (const char *) s + n - 1; + + /* Compute the address of the word containing the last byte. */ + last_word_ptr = (const uint64_t *) ((uintptr_t) last_byte_ptr & -8); + + while ((bits = __insn_v1cmpeq (v, goal)) == 0) + { + if (__builtin_expect (p == last_word_ptr, 0)) + { + /* We already read the last word in the array, so give up. */ + return NULL; + } + v = *++p; + } + + /* We found a match, but it might be in a byte past the end + of the array. */ + ret = ((char *) p) + (CFZ (bits) >> 3); + return (ret <= last_byte_ptr) ? ret : NULL; +} +weak_alias (__memchr, memchr) +libc_hidden_builtin_def (memchr) diff --git a/sysdeps/tile/tilegx/memcpy.c b/sysdeps/tile/tilegx/memcpy.c new file mode 100644 index 0000000000..35495be569 --- /dev/null +++ b/sysdeps/tile/tilegx/memcpy.c @@ -0,0 +1,196 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include +#include + +/* Must be 8 bytes in size. */ +#define word_t uint64_t + +/* How many cache lines ahead should we prefetch? */ +#define PREFETCH_LINES_AHEAD 3 + +void * +__memcpy (void *__restrict dstv, const void *__restrict srcv, size_t n) +{ + char *__restrict dst1 = (char *) dstv; + const char *__restrict src1 = (const char *) srcv; + const char *__restrict src1_end; + const char *__restrict prefetch; + word_t *__restrict dst8; /* 8-byte pointer to destination memory. */ + word_t final; /* Final bytes to write to trailing word, if any */ + long i; + + if (n < 16) + { + for (; n; n--) + *dst1++ = *src1++; + return dstv; + } + + /* Locate the end of source memory we will copy. Don't prefetch + past this. */ + src1_end = src1 + n - 1; + + /* Prefetch ahead a few cache lines, but not past the end. */ + prefetch = src1; + for (i = 0; i < PREFETCH_LINES_AHEAD; i++) + { + __insn_prefetch (prefetch); + prefetch += CHIP_L2_LINE_SIZE (); + prefetch = (prefetch > src1_end) ? prefetch : src1; + } + + /* Copy bytes until dst is word-aligned. */ + for (; (uintptr_t) dst1 & (sizeof (word_t) - 1); n--) + *dst1++ = *src1++; + + /* 8-byte pointer to destination memory. */ + dst8 = (word_t *) dst1; + + if (__builtin_expect ((uintptr_t) src1 & (sizeof (word_t) - 1), 0)) + { + /* Misaligned copy. Copy 8 bytes at a time, but don't bother + with other fanciness. + TODO: Consider prefetching and using wh64 as well. */ + + /* Create an aligned src8. */ + const word_t *__restrict src8 = + (const word_t *) ((uintptr_t) src1 & -sizeof (word_t)); + word_t b; + + word_t a = *src8++; + for (; n >= sizeof (word_t); n -= sizeof (word_t)) + { + b = *src8++; + a = __insn_dblalign (a, b, src1); + *dst8++ = a; + a = b; + } + + if (n == 0) + return dstv; + + b = ((const char *) src8 <= src1_end) ? *src8 : 0; + + /* Final source bytes to write to trailing partial word, if any. */ + final = __insn_dblalign (a, b, src1); + } + else + { + /* Aligned copy. */ + + const word_t *__restrict src8 = (const word_t *) src1; + + /* src8 and dst8 are both word-aligned. */ + if (n >= CHIP_L2_LINE_SIZE ()) + { + /* Copy until 'dst' is cache-line-aligned. */ + for (; (uintptr_t) dst8 & (CHIP_L2_LINE_SIZE () - 1); + n -= sizeof (word_t)) + *dst8++ = *src8++; + + for (; n >= CHIP_L2_LINE_SIZE ();) + { + __insn_wh64 (dst8); + + /* Prefetch and advance to next line to prefetch, but + don't go past the end. */ + __insn_prefetch (prefetch); + prefetch += CHIP_L2_LINE_SIZE (); + prefetch = (prefetch > src1_end) ? prefetch : + (const char *) src8; + + /* Copy an entire cache line. Manually unrolled to + avoid idiosyncracies of compiler unrolling. */ +#define COPY_WORD(offset) ({ dst8[offset] = src8[offset]; n -= 8; }) + COPY_WORD (0); + COPY_WORD (1); + COPY_WORD (2); + COPY_WORD (3); + COPY_WORD (4); + COPY_WORD (5); + COPY_WORD (6); + COPY_WORD (7); +#if CHIP_L2_LINE_SIZE() != 64 +# error "Fix code that assumes particular L2 cache line size." +#endif + + dst8 += CHIP_L2_LINE_SIZE () / sizeof (word_t); + src8 += CHIP_L2_LINE_SIZE () / sizeof (word_t); + } + } + + for (; n >= sizeof (word_t); n -= sizeof (word_t)) + *dst8++ = *src8++; + + if (__builtin_expect (n == 0, 1)) + return dstv; + + final = *src8; + } + + /* n != 0 if we get here. Write out any trailing bytes. */ + dst1 = (char *) dst8; +#ifndef __BIG_ENDIAN__ + if (n & 4) + { + *(uint32_t *) dst1 = final; + dst1 += 4; + final >>= 32; + n &= 3; + } + if (n & 2) + { + *(uint16_t *) dst1 = final; + dst1 += 2; + final >>= 16; + n &= 1; + } + if (n) + *(uint8_t *) dst1 = final; +#else + if (n & 4) + { + *(uint32_t *) dst1 = final >> 32; + dst1 += 4; + } + else + { + final >>= 32; + } + if (n & 2) + { + *(uint16_t *) dst1 = final >> 16; + dst1 += 2; + } + else + { + final >>= 16; + } + if (n & 1) + *(uint8_t *) dst1 = final >> 8; +#endif + + return dstv; +} +weak_alias (__memcpy, memcpy) +libc_hidden_builtin_def (memcpy) diff --git a/sysdeps/tile/tilegx/memset.c b/sysdeps/tile/tilegx/memset.c new file mode 100644 index 0000000000..ddde05fea3 --- /dev/null +++ b/sysdeps/tile/tilegx/memset.c @@ -0,0 +1,151 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include + +void * +__memset (void *s, int c, size_t n) +{ + uint64_t *out64; + int n64, to_align64; + uint64_t v64; + uint8_t *out8 = s; + + /* Experimentation shows that a trivial tight loop is a win up until + around a size of 20, where writing a word at a time starts to win. */ +#define BYTE_CUTOFF 20 + +#if BYTE_CUTOFF < 7 + /* This must be at least at least this big, or some code later + on doesn't work. */ +# error "BYTE_CUTOFF is too small." +#endif + + if (n < BYTE_CUTOFF) + { + /* Strangely, this turns out to be the tightest way to write + this loop. */ + if (n != 0) + { + do + { + /* Strangely, combining these into one line performs worse. */ + *out8 = c; + out8++; + } + while (--n != 0); + } + + return s; + } + + /* Align 'out8'. We know n >= 7 so this won't write past the end. */ + while (((uintptr_t) out8 & 7) != 0) + { + *out8++ = c; + --n; + } + + /* Align 'n'. */ + while (n & 7) + out8[--n] = c; + + out64 = (uint64_t *) out8; + n64 = n >> 3; + + /* Tile input byte out to 64 bits. */ + v64 = 0x0101010101010101ULL * (uint8_t) c; + + /* This must be at least 8 or the following loop doesn't work. */ +#define CACHE_LINE_SIZE_IN_DOUBLEWORDS (CHIP_L2_LINE_SIZE() / 8) + + /* Determine how many words we need to emit before the 'out32' + pointer becomes aligned modulo the cache line size. */ + to_align64 = (-((uintptr_t) out64 >> 3)) & + (CACHE_LINE_SIZE_IN_DOUBLEWORDS - 1); + + /* Only bother aligning and using wh64 if there is at least + one full cache line to process. This check also prevents + overrunning the end of the buffer with alignment words. */ + if (to_align64 <= n64 - CACHE_LINE_SIZE_IN_DOUBLEWORDS) + { + int lines_left; + + /* Align out64 mod the cache line size so we can use wh64. */ + n64 -= to_align64; + for (; to_align64 != 0; to_align64--) + { + *out64 = v64; + out64++; + } + + /* Use unsigned divide to turn this into a right shift. */ + lines_left = (unsigned) n64 / CACHE_LINE_SIZE_IN_DOUBLEWORDS; + + do + { + /* Only wh64 a few lines at a time, so we don't exceed the + maximum number of victim lines. */ + int x = ((lines_left < CHIP_MAX_OUTSTANDING_VICTIMS ()) ? lines_left + : CHIP_MAX_OUTSTANDING_VICTIMS ()); + uint64_t *wh = out64; + int i = x; + int j; + + lines_left -= x; + + do + { + __insn_wh64 (wh); + wh += CACHE_LINE_SIZE_IN_DOUBLEWORDS; + } + while (--i); + + for (j = x * (CACHE_LINE_SIZE_IN_DOUBLEWORDS / 4); j != 0; j--) + { + *out64++ = v64; + *out64++ = v64; + *out64++ = v64; + *out64++ = v64; + } + } + while (lines_left != 0); + + /* We processed all full lines above, so only this many + words remain to be processed. */ + n64 &= CACHE_LINE_SIZE_IN_DOUBLEWORDS - 1; + } + + /* Now handle any leftover values. */ + if (n64 != 0) + { + do + { + *out64 = v64; + out64++; + } + while (--n64 != 0); + } + + return s; +} +weak_alias (__memset, memset) +libc_hidden_builtin_def (memset) diff --git a/sysdeps/tile/tilegx/memusage.h b/sysdeps/tile/tilegx/memusage.h new file mode 100644 index 0000000000..7afb50a929 --- /dev/null +++ b/sysdeps/tile/tilegx/memusage.h @@ -0,0 +1,31 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include + +#define GETSP() ({ register uintptr_t stack_ptr asm ("sp"); stack_ptr; }) + +#define GETTIME(low,high) \ + { \ + uint64_t cycles = __insn_mfspr (SPR_CYCLE); \ + low = cycles & 0xffffffff; \ + high = cycles >> 32; \ + } + +#include diff --git a/sysdeps/tile/tilegx/rawmemchr.c b/sysdeps/tile/tilegx/rawmemchr.c new file mode 100644 index 0000000000..cd0f2fd878 --- /dev/null +++ b/sysdeps/tile/tilegx/rawmemchr.c @@ -0,0 +1,46 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include "string-endian.h" + +void * +__rawmemchr (const void *s, int c) +{ + /* Get an aligned pointer. */ + const uintptr_t s_int = (uintptr_t) s; + const uint64_t *p = (const uint64_t *) (s_int & -8); + + /* Create eight copies of the byte for which we are looking. */ + const uint64_t goal = 0x0101010101010101ULL * (uint8_t) c; + + /* Read the first word, but munge it so that bytes before the array + will not match goal. */ + const uint64_t before_mask = MASK (s_int); + uint64_t v = (*p | before_mask) ^ (goal & before_mask); + + uint64_t bits; + while ((bits = __insn_v1cmpeq (v, goal)) == 0) + v = *++p; + + return ((char *) p) + (CFZ (bits) >> 3); +} +libc_hidden_def (__rawmemchr) +weak_alias (__rawmemchr, rawmemchr) diff --git a/sysdeps/tile/tilegx/strchr.c b/sysdeps/tile/tilegx/strchr.c new file mode 100644 index 0000000000..2dc75060d6 --- /dev/null +++ b/sysdeps/tile/tilegx/strchr.c @@ -0,0 +1,68 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include "string-endian.h" + +#undef strchr + +char * +strchr (const char *s, int c) +{ + int z, g; + + /* Get an aligned pointer. */ + const uintptr_t s_int = (uintptr_t) s; + const uint64_t *p = (const uint64_t *) (s_int & -8); + + /* Create eight copies of the byte for which we are looking. */ + const uint64_t goal = 0x0101010101010101ULL * (uint8_t) c; + + /* Read the first aligned word, but force bytes before the string to + match neither zero nor goal (we make sure the high bit of each byte + is 1, and the low 7 bits are all the opposite of the goal byte). */ + const uint64_t before_mask = MASK (s_int); + uint64_t v = (*p | before_mask) ^ (goal & __insn_v1shrui (before_mask, 1)); + + uint64_t zero_matches, goal_matches; + while (1) + { + /* Look for a terminating '\0'. */ + zero_matches = __insn_v1cmpeqi (v, 0); + + /* Look for the goal byte. */ + goal_matches = __insn_v1cmpeq (v, goal); + + if (__builtin_expect ((zero_matches | goal_matches) != 0, 0)) + break; + + v = *++p; + } + + z = CFZ (zero_matches); + g = CFZ (goal_matches); + + /* If we found c before '\0' we got a match. Note that if c == '\0' + then g == z, and we correctly return the address of the '\0' + rather than NULL. */ + return (g <= z) ? ((char *) p) + (g >> 3) : NULL; +} +weak_alias (strchr, index) +libc_hidden_builtin_def (strchr) diff --git a/sysdeps/tile/tilegx/strchrnul.c b/sysdeps/tile/tilegx/strchrnul.c new file mode 100644 index 0000000000..bb165b5b51 --- /dev/null +++ b/sysdeps/tile/tilegx/strchrnul.c @@ -0,0 +1,65 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include "string-endian.h" + +char * +__strchrnul (const char *s, int c) +{ + int z, g; + + /* Get an aligned pointer. */ + const uintptr_t s_int = (uintptr_t) s; + const uint64_t *p = (const uint64_t *) (s_int & -8); + + /* Create eight copies of the byte for which we are looking. */ + const uint64_t goal = 0x0101010101010101ULL * (uint8_t) c; + + /* Read the first aligned word, but force bytes before the string to + match neither zero nor goal (we make sure the high bit of each byte + is 1, and the low 7 bits are all the opposite of the goal byte). */ + const uint64_t before_mask = MASK (s_int); + uint64_t v = (*p | before_mask) ^ (goal & __insn_v1shrui (before_mask, 1)); + + uint64_t zero_matches, goal_matches; + while (1) + { + /* Look for a terminating '\0'. */ + zero_matches = __insn_v1cmpeqi (v, 0); + + /* Look for the goal byte. */ + goal_matches = __insn_v1cmpeq (v, goal); + + if (__builtin_expect ((zero_matches | goal_matches) != 0, 0)) + break; + + v = *++p; + } + + z = CFZ (zero_matches); + g = CFZ (goal_matches); + + /* Return a pointer to the NUL or goal, whichever is first. */ + if (z < g) + g = z; + return ((char *) p) + (g >> 3); +} +weak_alias (__strchrnul, strchrnul) diff --git a/sysdeps/tile/tilegx/string-endian.h b/sysdeps/tile/tilegx/string-endian.h new file mode 100644 index 0000000000..29ca793af1 --- /dev/null +++ b/sysdeps/tile/tilegx/string-endian.h @@ -0,0 +1,36 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +/* Provide a mask based on the pointer alignment that + sets up non-zero bytes before the beginning of the string. + The MASK expression works because shift counts are taken mod 64. + Also, specify how to count "first" and "last" bits + when the bits have been read as a word. */ + +#ifndef __BIG_ENDIAN__ +#define MASK(x) (__insn_shl(1ULL, (x << 3)) - 1) +#define NULMASK(x) ((2ULL << x) - 1) +#define CFZ(x) __insn_ctz(x) +#define REVCZ(x) __insn_clz(x) +#else +#define MASK(x) (__insn_shl(-2LL, ((-x << 3) - 1))) +#define NULMASK(x) (-2LL << (63 - x)) +#define CFZ(x) __insn_clz(x) +#define REVCZ(x) __insn_ctz(x) +#endif diff --git a/sysdeps/tile/tilegx/strlen.c b/sysdeps/tile/tilegx/strlen.c new file mode 100644 index 0000000000..a729e991de --- /dev/null +++ b/sysdeps/tile/tilegx/strlen.c @@ -0,0 +1,40 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include "string-endian.h" + +size_t +strlen (const char *s) +{ + /* Get an aligned pointer. */ + const uintptr_t s_int = (uintptr_t) s; + const uint64_t *p = (const uint64_t *) (s_int & -8); + + /* Read and MASK the first word. */ + uint64_t v = *p | MASK (s_int); + + uint64_t bits; + while ((bits = __insn_v1cmpeqi (v, 0)) == 0) + v = *++p; + + return ((const char *) p) + (CFZ (bits) >> 3) - s; +} +libc_hidden_builtin_def (strlen) diff --git a/sysdeps/tile/tilegx/strrchr.c b/sysdeps/tile/tilegx/strrchr.c new file mode 100644 index 0000000000..9724d02c1b --- /dev/null +++ b/sysdeps/tile/tilegx/strrchr.c @@ -0,0 +1,69 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include "string-endian.h" + +char * +strrchr (const char *s, int c) +{ + /* Get an aligned pointer. */ + const uintptr_t s_int = (uintptr_t) s; + const uint64_t *p = (const uint64_t *) (s_int & -8); + + /* Create eight copies of the byte for which we are looking. */ + const uint64_t goal = 0x0101010101010101ULL * (uint8_t) c; + + /* Read the first aligned word, but force bytes before the string to + match neither zero nor goal (we make sure the high bit of each byte + is 1, and the low 7 bits are all the opposite of the goal byte). */ + const uint64_t before_mask = MASK (s_int); + uint64_t v = (*p | before_mask) ^ (goal & __insn_v1shrui (before_mask, 1)); + const char *found = NULL; + uint64_t zero_matches, goal_matches; + while (1) + { + /* Look for a terminating '\0'. */ + zero_matches = __insn_v1cmpeqi (v, 0); + + /* Look for the goal byte. */ + goal_matches = __insn_v1cmpeq (v, goal); + + /* If we found the goal, record the last offset. */ + if (__builtin_expect (goal_matches != 0, 0)) + { + if (__builtin_expect (zero_matches != 0, 0)) + { + /* Clear any goal after the first zero. */ + int first_nul = CFZ (zero_matches); + goal_matches &= NULMASK (first_nul); + } + if (__builtin_expect (goal_matches != 0, 1)) + found = ((char *) p) + 7 - (REVCZ (goal_matches) >> 3); + } + + if (__builtin_expect (zero_matches != 0, 0)) + return (char *) found; + + v = *++p; + } +} +weak_alias (strrchr, rindex) +libc_hidden_builtin_def (strrchr) diff --git a/sysdeps/tile/tilegx/tilegx32/Implies b/sysdeps/tile/tilegx/tilegx32/Implies new file mode 100644 index 0000000000..993b7f4cd1 --- /dev/null +++ b/sysdeps/tile/tilegx/tilegx32/Implies @@ -0,0 +1,3 @@ +tile/tilegx +tile +wordsize-32 diff --git a/sysdeps/tile/tilegx/tilegx64/Implies b/sysdeps/tile/tilegx/tilegx64/Implies new file mode 100644 index 0000000000..eb0686e0e6 --- /dev/null +++ b/sysdeps/tile/tilegx/tilegx64/Implies @@ -0,0 +1,3 @@ +tile/tilegx +tile +wordsize-64 diff --git a/sysdeps/tile/tilepro/Implies b/sysdeps/tile/tilepro/Implies new file mode 100644 index 0000000000..709e1dc122 --- /dev/null +++ b/sysdeps/tile/tilepro/Implies @@ -0,0 +1,2 @@ +tile +wordsize-32 diff --git a/sysdeps/tile/tilepro/bits/atomic.h b/sysdeps/tile/tilepro/bits/atomic.h new file mode 100644 index 0000000000..9d996cbcfd --- /dev/null +++ b/sysdeps/tile/tilepro/bits/atomic.h @@ -0,0 +1,82 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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_ATOMIC_H +#define _BITS_ATOMIC_H 1 + +#include + +/* 32-bit integer compare-and-exchange. */ +static __inline __attribute__ ((always_inline)) +int __atomic_cmpxchg_32 (volatile int *mem, int newval, int oldval) +{ + int result; + __asm__ __volatile__ ("swint1" + : "=R00" (result), "=m" (*mem) + : "R10" (__NR_FAST_cmpxchg), "R00" (mem), + "R01" (oldval), "R02" (newval), "m" (*mem) + : "r20", "r21", "r22", "r23", "r24", + "r25", "r26", "r27", "r28", "r29", "memory"); + return result; +} + +#define atomic_compare_and_exchange_val_acq(mem, n, o) \ + ((__typeof (*(mem))) \ + ((sizeof (*(mem)) == 4) ? \ + __atomic_cmpxchg_32 ((int *) (mem), (int) (n), (int) (o)) : \ + __atomic_error_bad_argument_size())) + +/* Atomically compute: + int old = *ptr; + *ptr = (old & mask) + addend; + return old; */ + +static __inline __attribute__ ((always_inline)) +int __atomic_update_32 (volatile int *mem, int mask, int addend) +{ + int result; + __asm__ __volatile__ ("swint1" + : "=R00" (result), "=m" (*mem) + : "R10" (__NR_FAST_atomic_update), "R00" (mem), + "R01" (mask), "R02" (addend), "m" (*mem) + : "r20", "r21", "r22", "r23", "r24", + "r25", "r26", "r27", "r28", "r29", "memory"); + return result; +} + +/* Size-checked verson of __atomic_update_32. */ +#define __atomic_update(mem, mask, addend) \ + ((__typeof (*(mem))) \ + ((sizeof (*(mem)) == 4) ? \ + __atomic_update_32 ((int *) (mem), (int) (mask), (int) (addend)) : \ + __atomic_error_bad_argument_size ())) + +#define atomic_exchange_acq(mem, newvalue) \ + __atomic_update ((mem), 0, (newvalue)) +#define atomic_exchange_and_add(mem, value) \ + __atomic_update ((mem), -1, (value)) +#define atomic_and_val(mem, mask) \ + __atomic_update ((mem), (mask), 0) +#define atomic_or_val(mem, mask) \ + ({ __typeof (mask) __att1_v = (mask); \ + __atomic_update ((mem), ~__att1_v, __att1_v); }) + +#include + +#endif /* bits/atomic.h */ diff --git a/sysdeps/tile/tilepro/bits/wordsize.h b/sysdeps/tile/tilepro/bits/wordsize.h new file mode 100644 index 0000000000..da587a2f12 --- /dev/null +++ b/sysdeps/tile/tilepro/bits/wordsize.h @@ -0,0 +1,3 @@ +/* Determine the wordsize from the preprocessor defines. */ + +#define __WORDSIZE 32 diff --git a/sysdeps/tile/tilepro/memchr.c b/sysdeps/tile/tilepro/memchr.c new file mode 100644 index 0000000000..125fd0d39b --- /dev/null +++ b/sysdeps/tile/tilepro/memchr.c @@ -0,0 +1,73 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include + +void * +__memchr (const void *s, int c, size_t n) +{ + const uint32_t *last_word_ptr; + const uint32_t *p; + const char *last_byte_ptr; + uintptr_t s_int; + uint32_t goal, before_mask, v, bits; + char *ret; + + if (__builtin_expect (n == 0, 0)) + { + /* Don't dereference any memory if the array is empty. */ + return NULL; + } + + /* Get an aligned pointer. */ + s_int = (uintptr_t) s; + p = (const uint32_t *) (s_int & -4); + + /* Create four copies of the byte for which we are looking. */ + goal = 0x01010101 * (uint8_t) c; + + /* Read the first word, but munge it so that bytes before the array + will not match goal. Note that this shift count expression works + because we know shift counts are taken mod 32. */ + before_mask = (1 << (s_int << 3)) - 1; + v = (*p | before_mask) ^ (goal & before_mask); + + /* Compute the address of the last byte. */ + last_byte_ptr = (const char *) s + n - 1; + + /* Compute the address of the word containing the last byte. */ + last_word_ptr = (const uint32_t *) ((uintptr_t) last_byte_ptr & -4); + + while ((bits = __insn_seqb (v, goal)) == 0) + { + if (__builtin_expect (p == last_word_ptr, 0)) + { + /* We already read the last word in the array, so give up. */ + return NULL; + } + v = *++p; + } + + /* We found a match, but it might be in a byte past the end of the array. */ + ret = ((char *) p) + (__insn_ctz (bits) >> 3); + return (ret <= last_byte_ptr) ? ret : NULL; +} +weak_alias (__memchr, memchr) +libc_hidden_builtin_def (memchr) diff --git a/sysdeps/tile/tilepro/memcpy.S b/sysdeps/tile/tilepro/memcpy.S new file mode 100644 index 0000000000..4bddeede4b --- /dev/null +++ b/sysdeps/tile/tilepro/memcpy.S @@ -0,0 +1,398 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include + + .text +ENTRY (__memcpy) + FEEDBACK_ENTER(__memcpy) + + /* r0 is the dest, r1 is the source, r2 is the size. */ + + /* Save aside original dest so we can return it at the end. */ + { sw sp, lr; move r23, r0; or r4, r0, r1 } + cfi_offset (lr, 0) + + /* Check for an empty size. */ + { bz r2, .Ldone; andi r4, r4, 3 } + + /* Check for an unaligned source or dest. */ + { bnz r4, .Lcopy_unaligned_maybe_many; addli r4, r2, -256 } + +.Lcheck_aligned_copy_size: + /* If we are copying < 256 bytes, branch to simple case. */ + { blzt r4, .Lcopy_8_check; slti_u r8, r2, 8 } + + /* Copying >= 256 bytes, so jump to complex prefetching loop. */ + { andi r6, r1, 63; j .Lcopy_many } + +/* Aligned 4 byte at a time copy loop. */ + +.Lcopy_8_loop: + /* Copy two words at a time to hide load latency. */ + { lw r3, r1; addi r1, r1, 4; slti_u r8, r2, 16 } + { lw r4, r1; addi r1, r1, 4 } + { sw r0, r3; addi r0, r0, 4; addi r2, r2, -4 } + { sw r0, r4; addi r0, r0, 4; addi r2, r2, -4 } +.Lcopy_8_check: + { bzt r8, .Lcopy_8_loop; slti_u r4, r2, 4 } + + /* Copy odd leftover word, if any. */ + { bnzt r4, .Lcheck_odd_stragglers } + { lw r3, r1; addi r1, r1, 4 } + { sw r0, r3; addi r0, r0, 4; addi r2, r2, -4 } + +.Lcheck_odd_stragglers: + { bnz r2, .Lcopy_unaligned_few } + +.Ldone: + { move r0, r23; jrp lr } + +/* Prefetching multiple cache line copy handler (for large transfers). */ + + /* Copy words until r1 is cache-line-aligned. */ +.Lalign_loop: + { lw r3, r1; addi r1, r1, 4 } + { andi r6, r1, 63 } + { sw r0, r3; addi r0, r0, 4; addi r2, r2, -4 } +.Lcopy_many: + { bnzt r6, .Lalign_loop; addi r9, r0, 63 } + + { addi r3, r1, 60; andi r9, r9, -64 } + + /* No need to prefetch dst, we'll just do the wh64 + right before we copy a line. */ + { lw r5, r3; addi r3, r3, 64; movei r4, 1 } + /* Intentionally stall for a few cycles to leave L2 cache alone. */ + { bnzt zero, .; move r27, lr } + { lw r6, r3; addi r3, r3, 64 } + /* Intentionally stall for a few cycles to leave L2 cache alone. */ + { bnzt zero, . } + { lw r7, r3; addi r3, r3, 64 } + /* Intentionally stall for a few cycles to leave L2 cache alone. */ + { bz zero, .Lbig_loop2 } + + /* On entry to this loop: + - r0 points to the start of dst line 0 + - r1 points to start of src line 0 + - r2 >= (256 - 60), only the first time the loop trips. + - r3 contains r1 + 128 + 60 [pointer to end of source line 2] + This is our prefetch address. When we get near the end + rather than prefetching off the end this is changed to point + to some "safe" recently loaded address. + - r5 contains *(r1 + 60) [i.e. last word of source line 0] + - r6 contains *(r1 + 64 + 60) [i.e. last word of source line 1] + - r9 contains ((r0 + 63) & -64) + [start of next dst cache line.] */ + +.Lbig_loop: + { jal .Lcopy_line2; add r15, r1, r2 } + +.Lbig_loop2: + /* Copy line 0, first stalling until r5 is ready. */ + { move r12, r5; lw r16, r1 } + { bz r4, .Lcopy_8_check; slti_u r8, r2, 8 } + /* Prefetch several lines ahead. */ + { lw r5, r3; addi r3, r3, 64 } + { jal .Lcopy_line } + + /* Copy line 1, first stalling until r6 is ready. */ + { move r12, r6; lw r16, r1 } + { bz r4, .Lcopy_8_check; slti_u r8, r2, 8 } + /* Prefetch several lines ahead. */ + { lw r6, r3; addi r3, r3, 64 } + { jal .Lcopy_line } + + /* Copy line 2, first stalling until r7 is ready. */ + { move r12, r7; lw r16, r1 } + { bz r4, .Lcopy_8_check; slti_u r8, r2, 8 } + /* Prefetch several lines ahead. */ + { lw r7, r3; addi r3, r3, 64 } + /* Use up a caches-busy cycle by jumping back to the top of the + loop. Might as well get it out of the way now. */ + { j .Lbig_loop } + + + /* On entry: + - r0 points to the destination line. + - r1 points to the source line. + - r3 is the next prefetch address. + - r9 holds the last address used for wh64. + - r12 = WORD_15 + - r16 = WORD_0. + - r17 == r1 + 16. + - r27 holds saved lr to restore. + + On exit: + - r0 is incremented by 64. + - r1 is incremented by 64, unless that would point to a word + beyond the end of the source array, in which case it is redirected + to point to an arbitrary word already in the cache. + - r2 is decremented by 64. + - r3 is unchanged, unless it points to a word beyond the + end of the source array, in which case it is redirected + to point to an arbitrary word already in the cache. + Redirecting is OK since if we are that close to the end + of the array we will not come back to this subroutine + and use the contents of the prefetched address. + - r4 is nonzero iff r2 >= 64. + - r9 is incremented by 64, unless it points beyond the + end of the last full destination cache line, in which + case it is redirected to a "safe address" that can be + clobbered (sp - 64) + - lr contains the value in r27. */ + +/* r26 unused */ + +.Lcopy_line: + /* TODO: when r3 goes past the end, we would like to redirect it + to prefetch the last partial cache line (if any) just once, for the + benefit of the final cleanup loop. But we don't want to + prefetch that line more than once, or subsequent prefetches + will go into the RTF. But then .Lbig_loop should unconditionally + branch to top of loop to execute final prefetch, and its + nop should become a conditional branch. */ + + /* We need two non-memory cycles here to cover the resources + used by the loads initiated by the caller. */ + { add r15, r1, r2 } +.Lcopy_line2: + { slt_u r13, r3, r15; addi r17, r1, 16 } + + /* NOTE: this will stall for one cycle as L1 is busy. */ + + /* Fill second L1D line. */ + { lw r17, r17; addi r1, r1, 48; mvz r3, r13, r1 } /* r17 = WORD_4 */ + + /* Prepare destination line for writing. */ + { wh64 r9; addi r9, r9, 64 } + + /* Load seven words that are L1D hits to cover wh64 L2 usage. */ + + /* Load the three remaining words from the last L1D line, which + we know has already filled the L1D. */ + { lw r4, r1; addi r1, r1, 4; addi r20, r1, 16 } /* r4 = WORD_12 */ + { lw r8, r1; addi r1, r1, 4; slt_u r13, r20, r15 }/* r8 = WORD_13 */ + { lw r11, r1; addi r1, r1, -52; mvz r20, r13, r1 } /* r11 = WORD_14 */ + + /* Load the three remaining words from the first L1D line, first + stalling until it has filled by "looking at" r16. */ + { lw r13, r1; addi r1, r1, 4; move zero, r16 } /* r13 = WORD_1 */ + { lw r14, r1; addi r1, r1, 4 } /* r14 = WORD_2 */ + { lw r15, r1; addi r1, r1, 8; addi r10, r0, 60 } /* r15 = WORD_3 */ + + /* Load second word from the second L1D line, first + stalling until it has filled by "looking at" r17. */ + { lw r19, r1; addi r1, r1, 4; move zero, r17 } /* r19 = WORD_5 */ + + /* Store last word to the destination line, potentially dirtying it + for the first time, which keeps the L2 busy for two cycles. */ + { sw r10, r12 } /* store(WORD_15) */ + + /* Use two L1D hits to cover the sw L2 access above. */ + { lw r10, r1; addi r1, r1, 4 } /* r10 = WORD_6 */ + { lw r12, r1; addi r1, r1, 4 } /* r12 = WORD_7 */ + + /* Fill third L1D line. */ + { lw r18, r1; addi r1, r1, 4 } /* r18 = WORD_8 */ + + /* Store first L1D line. */ + { sw r0, r16; addi r0, r0, 4; add r16, r0, r2 } /* store(WORD_0) */ + { sw r0, r13; addi r0, r0, 4; andi r16, r16, -64 } /* store(WORD_1) */ + { sw r0, r14; addi r0, r0, 4; slt_u r16, r9, r16 } /* store(WORD_2) */ + { sw r0, r15; addi r0, r0, 4; addi r13, sp, -64 } /* store(WORD_3) */ + + /* Store second L1D line. */ + { sw r0, r17; addi r0, r0, 4; mvz r9, r16, r13 }/* store(WORD_4) */ + { sw r0, r19; addi r0, r0, 4 } /* store(WORD_5) */ + { sw r0, r10; addi r0, r0, 4 } /* store(WORD_6) */ + { sw r0, r12; addi r0, r0, 4 } /* store(WORD_7) */ + + { lw r13, r1; addi r1, r1, 4; move zero, r18 } /* r13 = WORD_9 */ + { lw r14, r1; addi r1, r1, 4 } /* r14 = WORD_10 */ + { lw r15, r1; move r1, r20 } /* r15 = WORD_11 */ + + /* Store third L1D line. */ + { sw r0, r18; addi r0, r0, 4 } /* store(WORD_8) */ + { sw r0, r13; addi r0, r0, 4 } /* store(WORD_9) */ + { sw r0, r14; addi r0, r0, 4 } /* store(WORD_10) */ + { sw r0, r15; addi r0, r0, 4 } /* store(WORD_11) */ + + /* Store rest of fourth L1D line. */ + { sw r0, r4; addi r0, r0, 4 } /* store(WORD_12) */ + { + sw r0, r8 /* store(WORD_13) */ + addi r0, r0, 4 + /* Will r2 be > 64 after we subtract 64 below? */ + shri r4, r2, 7 + } + { + sw r0, r11 /* store(WORD_14) */ + addi r0, r0, 8 + /* Record 64 bytes successfully copied. */ + addi r2, r2, -64 + } + + { jrp lr; move lr, r27 } + + /* Convey to the backtrace library that the stack frame is + size zero, and the real return address is on the stack + rather than in 'lr'. */ + { info 8 } + + .align 64 +.Lcopy_unaligned_maybe_many: + /* Skip the setup overhead if we aren't copying many bytes. */ + { slti_u r8, r2, 20; sub r4, zero, r0 } + { bnzt r8, .Lcopy_unaligned_few; andi r4, r4, 3 } + { bz r4, .Ldest_is_word_aligned; add r18, r1, r2 } + +/* Unaligned 4 byte at a time copy handler. */ + + /* Copy single bytes until r0 == 0 mod 4, so we can store words. */ +.Lalign_dest_loop: + { lb_u r3, r1; addi r1, r1, 1; addi r4, r4, -1 } + { sb r0, r3; addi r0, r0, 1; addi r2, r2, -1 } + { bnzt r4, .Lalign_dest_loop; andi r3, r1, 3 } + + /* If source and dest are now *both* aligned, do an aligned copy. */ + { bz r3, .Lcheck_aligned_copy_size; addli r4, r2, -256 } + +.Ldest_is_word_aligned: + + { andi r8, r0, 63; lwadd_na r6, r1, 4} + { slti_u r9, r2, 64; bz r8, .Ldest_is_L2_line_aligned } + + /* This copies unaligned words until either there are fewer + than 4 bytes left to copy, or until the destination pointer + is cache-aligned, whichever comes first. + + On entry: + - r0 is the next store address. + - r1 points 4 bytes past the load address corresponding to r0. + - r2 >= 4 + - r6 is the next aligned word loaded. */ +.Lcopy_unaligned_src_words: + { lwadd_na r7, r1, 4; slti_u r8, r2, 4 + 4 } + /* stall */ + { dword_align r6, r7, r1; slti_u r9, r2, 64 + 4 } + { swadd r0, r6, 4; addi r2, r2, -4 } + { bnz r8, .Lcleanup_unaligned_words; andi r8, r0, 63 } + { bnzt r8, .Lcopy_unaligned_src_words; move r6, r7 } + + /* On entry: + - r0 is the next store address. + - r1 points 4 bytes past the load address corresponding to r0. + - r2 >= 4 (# of bytes left to store). + - r6 is the next aligned src word value. + - r9 = (r2 < 64U). + - r18 points one byte past the end of source memory. */ +.Ldest_is_L2_line_aligned: + + { + /* Not a full cache line remains. */ + bnz r9, .Lcleanup_unaligned_words + move r7, r6 + } + + /* r2 >= 64 */ + + /* Kick off two prefetches, but don't go past the end. */ + { addi r3, r1, 63 - 4; addi r8, r1, 64 + 63 - 4 } + { prefetch r3; move r3, r8; slt_u r8, r8, r18 } + { mvz r3, r8, r1; addi r8, r3, 64 } + { prefetch r3; move r3, r8; slt_u r8, r8, r18 } + { mvz r3, r8, r1; movei r17, 0 } + +.Lcopy_unaligned_line: + /* Prefetch another line. */ + { prefetch r3; addi r15, r1, 60; addi r3, r3, 64 } + /* Fire off a load of the last word we are about to copy. */ + { lw_na r15, r15; slt_u r8, r3, r18 } + + { mvz r3, r8, r1; wh64 r0 } + + /* This loop runs twice. + + On entry: + - r17 is even before the first iteration, and odd before + the second. It is incremented inside the loop. Encountering + an even value at the end of the loop makes it stop. */ +.Lcopy_half_an_unaligned_line: + { + /* Stall until the last byte is ready. In the steady state this + guarantees all words to load below will be in the L2 cache, which + avoids shunting the loads to the RTF. */ + move zero, r15 + lwadd_na r7, r1, 16 + } + { lwadd_na r11, r1, 12 } + { lwadd_na r14, r1, -24 } + { lwadd_na r8, r1, 4 } + { lwadd_na r9, r1, 4 } + { + lwadd_na r10, r1, 8 + /* r16 = (r2 < 64), after we subtract 32 from r2 below. */ + slti_u r16, r2, 64 + 32 + } + { lwadd_na r12, r1, 4; addi r17, r17, 1 } + { lwadd_na r13, r1, 8; dword_align r6, r7, r1 } + { swadd r0, r6, 4; dword_align r7, r8, r1 } + { swadd r0, r7, 4; dword_align r8, r9, r1 } + { swadd r0, r8, 4; dword_align r9, r10, r1 } + { swadd r0, r9, 4; dword_align r10, r11, r1 } + { swadd r0, r10, 4; dword_align r11, r12, r1 } + { swadd r0, r11, 4; dword_align r12, r13, r1 } + { swadd r0, r12, 4; dword_align r13, r14, r1 } + { swadd r0, r13, 4; addi r2, r2, -32 } + { move r6, r14; bbst r17, .Lcopy_half_an_unaligned_line } + + { bzt r16, .Lcopy_unaligned_line; move r7, r6 } + + /* On entry: + - r0 is the next store address. + - r1 points 4 bytes past the load address corresponding to r0. + - r2 >= 0 (# of bytes left to store). + - r7 is the next aligned src word value. */ +.Lcleanup_unaligned_words: + /* Handle any trailing bytes. */ + { bz r2, .Lcopy_unaligned_done; slti_u r8, r2, 4 } + { bzt r8, .Lcopy_unaligned_src_words; move r6, r7 } + + /* Move r1 back to the point where it corresponds to r0. */ + { addi r1, r1, -4 } + + /* Fall through */ + +/* 1 byte at a time copy handler. */ + +.Lcopy_unaligned_few: + { lb_u r3, r1; addi r1, r1, 1 } + { sb r0, r3; addi r0, r0, 1; addi r2, r2, -1 } + { bnzt r2, .Lcopy_unaligned_few } + +.Lcopy_unaligned_done: + + { move r0, r23; jrp lr } + +END (__memcpy) + +weak_alias (__memcpy, memcpy) +libc_hidden_builtin_def (memcpy) diff --git a/sysdeps/tile/tilepro/memset.c b/sysdeps/tile/tilepro/memset.c new file mode 100644 index 0000000000..bfdc3d4193 --- /dev/null +++ b/sysdeps/tile/tilepro/memset.c @@ -0,0 +1,152 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include + +void * +__memset (void *s, int c, size_t n) +{ + uint32_t *out32; + int n32; + uint32_t v16, v32; + uint8_t *out8 = s; + int to_align32; + + /* Experimentation shows that a trivial tight loop is a win up until + around a size of 20, where writing a word at a time starts to win. */ +#define BYTE_CUTOFF 20 + +#if BYTE_CUTOFF < 3 + /* This must be at least at least this big, or some code later + on doesn't work. */ +# error "BYTE_CUTOFF is too small." +#endif + + if (n < BYTE_CUTOFF) + { + /* Strangely, this turns out to be the tightest way to write + this loop. */ + if (n != 0) + { + do + { + /* Strangely, combining these into one line performs worse. */ + *out8 = c; + out8++; + } + while (--n != 0); + } + + return s; + } + + /* Align 'out8'. We know n >= 3 so this won't write past the end. */ + while (((uintptr_t) out8 & 3) != 0) + { + *out8++ = c; + --n; + } + + /* Align 'n'. */ + while (n & 3) + out8[--n] = c; + + out32 = (uint32_t *) out8; + n32 = n >> 2; + + /* Tile input byte out to 32 bits. */ + v16 = __insn_intlb (c, c); + v32 = __insn_intlh (v16, v16); + + /* This must be at least 8 or the following loop doesn't work. */ +#define CACHE_LINE_SIZE_IN_WORDS (CHIP_L2_LINE_SIZE() / 4) + + /* Determine how many words we need to emit before the 'out32' + pointer becomes aligned modulo the cache line size. */ + to_align32 = (-((uintptr_t) out32 >> 2)) & (CACHE_LINE_SIZE_IN_WORDS - 1); + + /* Only bother aligning and using wh64 if there is at least one full + cache line to process. This check also prevents overrunning the + end of the buffer with alignment words. */ + if (to_align32 <= n32 - CACHE_LINE_SIZE_IN_WORDS) + { + int lines_left; + + /* Align out32 mod the cache line size so we can use wh64. */ + n32 -= to_align32; + for (; to_align32 != 0; to_align32--) + { + *out32 = v32; + out32++; + } + + /* Use unsigned divide to turn this into a right shift. */ + lines_left = (unsigned) n32 / CACHE_LINE_SIZE_IN_WORDS; + + do + { + /* Only wh64 a few lines at a time, so we don't exceed the + maximum number of victim lines. */ + int x = ((lines_left < CHIP_MAX_OUTSTANDING_VICTIMS ())? lines_left + : CHIP_MAX_OUTSTANDING_VICTIMS ()); + uint32_t *wh = out32; + int i = x; + int j; + + lines_left -= x; + + do + { + __insn_wh64 (wh); + wh += CACHE_LINE_SIZE_IN_WORDS; + } + while (--i); + + for (j = x * (CACHE_LINE_SIZE_IN_WORDS / 4); j != 0; j--) + { + *out32++ = v32; + *out32++ = v32; + *out32++ = v32; + *out32++ = v32; + } + } + while (lines_left != 0); + + /* We processed all full lines above, so only this many words + remain to be processed. */ + n32 &= CACHE_LINE_SIZE_IN_WORDS - 1; + } + + /* Now handle any leftover values. */ + if (n32 != 0) + { + do + { + *out32 = v32; + out32++; + } + while (--n32 != 0); + } + + return s; +} +weak_alias (__memset, memset) +libc_hidden_builtin_def (memset) diff --git a/sysdeps/tile/tilepro/memusage.h b/sysdeps/tile/tilepro/memusage.h new file mode 100644 index 0000000000..700c08b700 --- /dev/null +++ b/sysdeps/tile/tilepro/memusage.h @@ -0,0 +1,30 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include + +#define GETSP() ({ register uintptr_t stack_ptr asm ("sp"); stack_ptr; }) + +#define GETTIME(low,high) \ + { \ + low = __insn_mfspr (SPR_CYCLE_LOW); \ + high = __insn_mfspr (SPR_CYCLE_HIGH); \ + } + +#include diff --git a/sysdeps/tile/tilepro/rawmemchr.c b/sysdeps/tile/tilepro/rawmemchr.c new file mode 100644 index 0000000000..c1a58ec1fd --- /dev/null +++ b/sysdeps/tile/tilepro/rawmemchr.c @@ -0,0 +1,46 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include + +void * +__rawmemchr (const void *s, int c) +{ + /* Get an aligned pointer. */ + const uintptr_t s_int = (uintptr_t) s; + const uint32_t *p = (const uint32_t *) (s_int & -4); + + /* Create four copies of the byte for which we are looking. */ + const uint32_t goal = 0x01010101 * (uint8_t) c; + + /* Read the first word, but munge it so that bytes before the array + will not match goal. Note that this shift count expression works + because we know shift counts are taken mod 32. */ + const uint32_t before_mask = (1 << (s_int << 3)) - 1; + uint32_t v = (*p | before_mask) ^ (goal & before_mask); + + uint32_t bits; + while ((bits = __insn_seqb (v, goal)) == 0) + v = *++p; + + return ((char *) p) + (__insn_ctz (bits) >> 3); +} +libc_hidden_def (__rawmemchr) +weak_alias (__rawmemchr, rawmemchr) diff --git a/sysdeps/tile/tilepro/strchr.c b/sysdeps/tile/tilepro/strchr.c new file mode 100644 index 0000000000..e116ea9c55 --- /dev/null +++ b/sysdeps/tile/tilepro/strchr.c @@ -0,0 +1,69 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include + +#undef strchr + +char * +strchr (const char *s, int c) +{ + int z, g; + + /* Get an aligned pointer. */ + const uintptr_t s_int = (uintptr_t) s; + const uint32_t *p = (const uint32_t *) (s_int & -4); + + /* Create four copies of the byte for which we are looking. */ + const uint32_t goal = 0x01010101 * (uint8_t) c; + + /* Read the first aligned word, but force bytes before the string to + match neither zero nor goal (we make sure the high bit of each + byte is 1, and the low 7 bits are all the opposite of the goal + byte). Note that this shift count expression works because we + know shift counts are taken mod 32. */ + const uint32_t before_mask = (1 << (s_int << 3)) - 1; + uint32_t v = (*p | before_mask) ^ (goal & __insn_shrib (before_mask, 1)); + + uint32_t zero_matches, goal_matches; + while (1) + { + /* Look for a terminating '\0'. */ + zero_matches = __insn_seqb (v, 0); + + /* Look for the goal byte. */ + goal_matches = __insn_seqb (v, goal); + + if (__builtin_expect ((zero_matches | goal_matches) != 0, 0)) + break; + + v = *++p; + } + + z = __insn_ctz (zero_matches); + g = __insn_ctz (goal_matches); + + /* If we found c before '\0' we got a match. Note that if c == '\0' + then g == z, and we correctly return the address of the '\0' + rather than NULL. */ + return (g <= z) ? ((char *) p) + (g >> 3) : NULL; +} +weak_alias (strchr, index) +libc_hidden_builtin_def (strchr) diff --git a/sysdeps/tile/tilepro/strchrnul.c b/sysdeps/tile/tilepro/strchrnul.c new file mode 100644 index 0000000000..6e7bba9c0a --- /dev/null +++ b/sysdeps/tile/tilepro/strchrnul.c @@ -0,0 +1,66 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include + +char * +__strchrnul (const char *s, int c) +{ + int z, g; + + /* Get an aligned pointer. */ + const uintptr_t s_int = (uintptr_t) s; + const uint32_t *p = (const uint32_t *) (s_int & -4); + + /* Create four copies of the byte for which we are looking. */ + const uint32_t goal = 0x01010101 * (uint8_t) c; + + /* Read the first aligned word, but force bytes before the string to + match neither zero nor goal (we make sure the high bit of each + byte is 1, and the low 7 bits are all the opposite of the goal + byte). Note that this shift count expression works because we + know shift counts are taken mod 32. */ + const uint32_t before_mask = (1 << (s_int << 3)) - 1; + uint32_t v = (*p | before_mask) ^ (goal & __insn_shrib (before_mask, 1)); + + uint32_t zero_matches, goal_matches; + while (1) + { + /* Look for a terminating '\0'. */ + zero_matches = __insn_seqb (v, 0); + + /* Look for the goal byte. */ + goal_matches = __insn_seqb (v, goal); + + if (__builtin_expect ((zero_matches | goal_matches) != 0, 0)) + break; + + v = *++p; + } + + z = __insn_ctz (zero_matches); + g = __insn_ctz (goal_matches); + + /* Return a pointer to the NUL or goal, whichever is first. */ + if (z < g) + g = z; + return ((char *) p) + (g >> 3); +} +weak_alias (__strchrnul, strchrnul) diff --git a/sysdeps/tile/tilepro/strlen.c b/sysdeps/tile/tilepro/strlen.c new file mode 100644 index 0000000000..26120681ba --- /dev/null +++ b/sysdeps/tile/tilepro/strlen.c @@ -0,0 +1,40 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include + +size_t +strlen (const char *s) +{ + /* Get an aligned pointer. */ + const uintptr_t s_int = (uintptr_t) s; + const uint32_t *p = (const uint32_t *) (s_int & -4); + + /* Read the first word, but force bytes before the string to be nonzero. + This expression works because we know shift counts are taken mod 32. */ + uint32_t v = *p | ((1 << (s_int << 3)) - 1); + + uint32_t bits; + while ((bits = __insn_seqb (v, 0)) == 0) + v = *++p; + + return ((const char *) p) + (__insn_ctz (bits) >> 3) - s; +} +libc_hidden_builtin_def (strlen) diff --git a/sysdeps/tile/tilepro/strrchr.c b/sysdeps/tile/tilepro/strrchr.c new file mode 100644 index 0000000000..b91b02b349 --- /dev/null +++ b/sysdeps/tile/tilepro/strrchr.c @@ -0,0 +1,74 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include + +char * +strrchr (const char *s, int c) +{ + /* Get an aligned pointer. */ + const uintptr_t s_int = (uintptr_t) s; + const uint32_t *p = (const uint32_t *) (s_int & -4); + + /* Create four copies of the byte for which we are looking. */ + const uint32_t goal = 0x01010101 * (uint8_t) c; + + /* Read the first aligned word, but force bytes before the string to + match neither zero nor goal (we make sure the high bit of each + byte is 1, and the low 7 bits are all the opposite of the goal + byte). Note that this shift count expression works because we + know shift counts are taken mod 32. */ + const uint32_t before_mask = (1 << (s_int << 3)) - 1; + uint32_t v = (*p | before_mask) ^ (goal & __insn_shrib (before_mask, 1)); + const char *found = NULL; + uint32_t zero_matches, goal_matches; + while (1) + { + /* Look for a terminating '\0'. */ + zero_matches = __insn_seqb (v, 0); + + /* Look for the goal byte. */ + goal_matches = __insn_seqb (v, goal); + + /* If we found the goal, record the last offset. */ + if (__builtin_expect (goal_matches != 0, 0)) + { + if (__builtin_expect (zero_matches != 0, 0)) + { + /* Clear any goal after the first zero. */ + int first_nul = __insn_ctz (zero_matches); + /* The number of top bits we need to clear is + 32 - (first_nul + 8). */ + int shift_amt = (24 - first_nul); + goal_matches <<= shift_amt; + goal_matches >>= shift_amt; + } + if (__builtin_expect (goal_matches != 0, 1)) + found = ((char *) p) + 3 - (__insn_clz (goal_matches) >> 3); + } + + if (__builtin_expect (zero_matches != 0, 0)) + return (char *) found; + + v = *++p; + } +} +weak_alias (strrchr, rindex) +libc_hidden_builtin_def (strrchr) diff --git a/sysdeps/tile/tls-macros.h b/sysdeps/tile/tls-macros.h new file mode 100644 index 0000000000..807ccdb0b7 --- /dev/null +++ b/sysdeps/tile/tls-macros.h @@ -0,0 +1,57 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#ifdef __tilegx__ +#define TLS_GD_REL "hw0_last_tls_gd" +#define TLS_IE_REL "hw0_last_tls_ie" +#define LD_TLS "ld_tls" +#else +#define TLS_GD_REL "tls_gd_lo16" +#define TLS_IE_REL "tls_ie_lo16" +#define LD_TLS "lw_tls" +#endif + +#define TLS_GD(x) \ + ({ \ + int *__retval; \ + extern char _GLOBAL_OFFSET_TABLE_[]; \ + \ + asm ("addli r0, %1, " TLS_GD_REL "(" #x ")\n\t" \ + "jal tls_gd_call(" #x ")\n\t" \ + "addi %0, r0, tls_gd_add(" #x ")" : \ + "=r" (__retval) : "r" (_GLOBAL_OFFSET_TABLE_) : \ + "r25", "r26", "r27", "r28", "r29"); \ + __retval; }) + +/* No special support for LD mode. */ +#define TLS_LD TLS_GD + +#define TLS_IE(x) \ + ({ \ + int *__retval; \ + extern char _GLOBAL_OFFSET_TABLE_[]; \ + \ + asm ("addli %0, %1, " TLS_IE_REL "(" #x ")\n\t" \ + LD_TLS " %0, %0, tls_ie_load(" #x ")\n\t" \ + "add %0, %0, tp" : \ + "=r" (__retval) : "r" (_GLOBAL_OFFSET_TABLE_)); \ + __retval; }) + +/* No special support for LE mode. */ +#define TLS_LE TLS_IE diff --git a/sysdeps/tile/tst-audit.h b/sysdeps/tile/tst-audit.h new file mode 100644 index 0000000000..fd4f3d6157 --- /dev/null +++ b/sysdeps/tile/tst-audit.h @@ -0,0 +1,24 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#define pltenter la_tile_gnu_pltenter +#define pltexit la_tile_gnu_pltexit +#define La_regs La_tile_regs +#define La_retval La_tile_retval +#define int_retval lrv_reg[0] diff --git a/sysdeps/unix/sysv/linux/tile/Makefile b/sysdeps/unix/sysv/linux/tile/Makefile new file mode 100644 index 0000000000..0cbfdd0e39 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/Makefile @@ -0,0 +1,15 @@ +ifeq ($(subdir),misc) + +# provides something like x86 compatibility. +# New code should probably use instead. +sysdep_headers += sys/reg.h + +# MIPS-style cacheflush routine +sysdep_headers += sys/cachectl.h +sysdep_routines += cacheflush + +# Control dataplane properties of current thread. +sysdep_headers += sys/dataplane.h +sysdep_routines += set_dataplane + +endif diff --git a/sysdeps/unix/sysv/linux/tile/Versions b/sysdeps/unix/sysv/linux/tile/Versions new file mode 100644 index 0000000000..1df7518c78 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/Versions @@ -0,0 +1,11 @@ +libc { + GLIBC_2.12 { + _flush_cache; + cacheflush; + fallocate64; + set_dataplane; + } + GLIBC_PRIVATE { + __syscall_error; + } +} diff --git a/sysdeps/unix/sysv/linux/tile/bits/environments.h b/sysdeps/unix/sysv/linux/tile/bits/environments.h new file mode 100644 index 0000000000..f1835179f3 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/bits/environments.h @@ -0,0 +1,101 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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 _UNISTD_H +# error "Never include this file directly. Use instead" +#endif + +#include + +/* This header should define the following symbols under the described + situations. A value `1' means that the model is always supported, + `-1' means it is never supported. Undefined means it cannot be + statically decided. + + _POSIX_V7_ILP32_OFF32 32bit int, long, pointers, and off_t type + _POSIX_V7_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type + + _POSIX_V7_LP64_OFF32 64bit long and pointers and 32bit off_t type + _POSIX_V7_LPBIG_OFFBIG 64bit long and pointers and large off_t type + + The macros _POSIX_V6_ILP32_OFF32, _POSIX_V6_ILP32_OFFBIG, + _POSIX_V6_LP64_OFF32, _POSIX_V6_LPBIG_OFFBIG, _XBS5_ILP32_OFF32, + _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and _XBS5_LPBIG_OFFBIG were + used in previous versions of the Unix standard and are available + only for compatibility. +*/ + +#if __WORDSIZE == 64 + +/* Environments with 32-bit wide pointers are optionally provided. + Therefore following macros aren't defined: + # undef _POSIX_V7_ILP32_OFF32 + # undef _POSIX_V7_ILP32_OFFBIG + # undef _POSIX_V6_ILP32_OFF32 + # undef _POSIX_V6_ILP32_OFFBIG + # undef _XBS5_ILP32_OFF32 + # undef _XBS5_ILP32_OFFBIG + and users need to check at runtime. */ + +/* We also have no use (for now) for an environment with bigger pointers + and offsets. */ +# define _POSIX_V7_LPBIG_OFFBIG -1 +# define _POSIX_V6_LPBIG_OFFBIG -1 +# define _XBS5_LPBIG_OFFBIG -1 + +/* By default we have 64-bit wide `long int', pointers and `off_t'. */ +# define _POSIX_V7_LP64_OFF64 1 +# define _POSIX_V6_LP64_OFF64 1 +# define _XBS5_LP64_OFF64 1 + +#else /* __WORDSIZE == 32 */ + +/* By default we have 32-bit wide `int', `long int', pointers and `off_t' + and all platforms support LFS. */ +# define _POSIX_V7_ILP32_OFF32 1 +# define _POSIX_V7_ILP32_OFFBIG 1 +# define _POSIX_V6_ILP32_OFF32 1 +# define _POSIX_V6_ILP32_OFFBIG 1 +# define _XBS5_ILP32_OFF32 1 +# define _XBS5_ILP32_OFFBIG 1 + +/* We optionally provide an environment with the above size but an 64-bit + side `off_t'. Therefore we don't define _POSIX_V7_ILP32_OFFBIG. */ + +/* Environments with 64-bit wide pointers can be provided, + so these macros aren't defined: + # undef _POSIX_V7_LP64_OFF64 + # undef _POSIX_V7_LPBIG_OFFBIG + # undef _POSIX_V6_LP64_OFF64 + # undef _POSIX_V6_LPBIG_OFFBIG + # undef _XBS5_LP64_OFF64 + # undef _XBS5_LPBIG_OFFBIG + and sysconf tests for it at runtime. */ + +#endif /* __WORDSIZE == 32 */ + +#ifdef __tilegx__ +/* Only TILE-Gx has the ability to choose 32- or 64-bit. */ +#define __ILP32_OFF32_CFLAGS "-m32" +#define __ILP32_OFFBIG_CFLAGS "-m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" +#define __ILP32_OFF32_LDFLAGS "-m32" +#define __ILP32_OFFBIG_LDFLAGS "-m32" +#define __LP64_OFF64_CFLAGS "-m64" +#define __LP64_OFF64_LDFLAGS "-m64" +#endif diff --git a/sysdeps/unix/sysv/linux/tile/bits/local_lim.h b/sysdeps/unix/sysv/linux/tile/bits/local_lim.h new file mode 100644 index 0000000000..6eb45c998d --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/bits/local_lim.h @@ -0,0 +1,101 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +/* The kernel header pollutes the namespace with the NR_OPEN symbol + and defines LINK_MAX although filesystems have different maxima. A + similar thing is true for OPEN_MAX: the limit can be changed at + runtime and therefore the macro must not be defined. Remove this + after including the header if necessary. */ +#ifndef NR_OPEN +# define __undef_NR_OPEN +#endif +#ifndef LINK_MAX +# define __undef_LINK_MAX +#endif +#ifndef OPEN_MAX +# define __undef_OPEN_MAX +#endif +#ifndef ARG_MAX +# define __undef_ARG_MAX +#endif + +/* The kernel sources contain a file with all the needed information. */ +#include + +/* Have to remove NR_OPEN? */ +#ifdef __undef_NR_OPEN +# undef NR_OPEN +# undef __undef_NR_OPEN +#endif +/* Have to remove LINK_MAX? */ +#ifdef __undef_LINK_MAX +# undef LINK_MAX +# undef __undef_LINK_MAX +#endif +/* Have to remove OPEN_MAX? */ +#ifdef __undef_OPEN_MAX +# undef OPEN_MAX +# undef __undef_OPEN_MAX +#endif +/* Have to remove ARG_MAX? */ +#ifdef __undef_ARG_MAX +# undef ARG_MAX +# undef __undef_ARG_MAX +#endif + +/* The number of data keys per process. */ +#define _POSIX_THREAD_KEYS_MAX 128 +/* This is the value this implementation supports. */ +#define PTHREAD_KEYS_MAX 1024 + +/* Controlling the iterations of destructors for thread-specific data. */ +#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 +/* Number of iterations this implementation does. */ +#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS + +/* The number of threads per process. */ +#define _POSIX_THREAD_THREADS_MAX 64 +/* We have no predefined limit on the number of threads. */ +#undef PTHREAD_THREADS_MAX + +/* Maximum amount by which a process can descrease its asynchronous I/O + priority level. */ +#define AIO_PRIO_DELTA_MAX 20 + +/* Minimum size for a thread. At least two pages for systems with 64k + pages. */ +#define PTHREAD_STACK_MIN 131072 + +/* Maximum number of timer expiration overruns. */ +#define DELAYTIMER_MAX 2147483647 + +/* Maximum tty name length. */ +#define TTY_NAME_MAX 32 + +/* Maximum login name length. This is arbitrary. */ +#define LOGIN_NAME_MAX 256 + +/* Maximum host name length. */ +#define HOST_NAME_MAX 64 + +/* Maximum message queue priority level. */ +#define MQ_PRIO_MAX 32768 + +/* Maximum value the semaphore can have. */ +#define SEM_VALUE_MAX (2147483647) diff --git a/sysdeps/unix/sysv/linux/tile/bits/mman.h b/sysdeps/unix/sysv/linux/tile/bits/mman.h new file mode 100644 index 0000000000..35863af458 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/bits/mman.h @@ -0,0 +1,110 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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 _SYS_MMAN_H +# error "Never use directly; include instead." +#endif + +/* The following definitions basically come from the kernel headers. + But the kernel header is not namespace clean. */ + + +/* Protections are chosen from these bits, OR'd together. The + implementation does not necessarily support PROT_EXEC or PROT_WRITE + without PROT_READ. The only guarantees are that no writing will be + allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ + +#define PROT_READ 0x1 /* Page can be read. */ +#define PROT_WRITE 0x2 /* Page can be written. */ +#define PROT_EXEC 0x4 /* Page can be executed. */ +#define PROT_NONE 0x0 /* Page can not be accessed. */ +#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of + growsdown vma (mprotect only). */ +#define PROT_GROWSUP 0x02000000 /* Extend change to start of + growsup vma (mprotect only). */ + +/* Sharing types (must choose one and only one of these). */ +#define MAP_SHARED 0x01 /* Share changes. */ +#define MAP_PRIVATE 0x02 /* Changes are private. */ +#ifdef __USE_MISC +# define MAP_TYPE 0x0f /* Mask for type of mapping. */ +#endif + +/* Other flags. */ +#define MAP_FIXED 0x10 /* Interpret addr exactly. */ +#ifdef __USE_MISC +# define MAP_FILE 0 +# define MAP_ANONYMOUS 0x20 /* Don't use a file. */ +# define MAP_ANON MAP_ANONYMOUS +#endif + +#ifdef __USE_MISC +/* These are Linux-specific. */ +# define MAP_NONBLOCK 0x00080 /* Do not block on IO. */ +# define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */ +# define MAP_STACK MAP_GROWSDOWN /* Provide convenience alias. */ +# define MAP_LOCKED 0x00200 /* Lock the mapping. */ +# define MAP_NORESERVE 0x00400 /* Don't check for reservations. */ +# define MAP_DENYWRITE 0x00800 /* ETXTBSY */ +# define MAP_EXECUTABLE 0x01000 /* Mark it as an executable. */ +# define MAP_POPULATE 0x00040 /* Populate (prefault) pagetables. */ +# define MAP_HUGETLB 0x04000 /* Create huge page mapping. */ +#endif + +/* Flags to `msync'. */ +#define MS_ASYNC 1 /* Sync memory asynchronously. */ +#define MS_SYNC 4 /* Synchronous memory sync. */ +#define MS_INVALIDATE 2 /* Invalidate the caches. */ + +/* Flags for `mlockall'. */ +#define MCL_CURRENT 1 /* Lock all currently mapped pages. */ +#define MCL_FUTURE 2 /* Lock all additions to address + space. */ + +/* Flags for `mremap'. */ +#ifdef __USE_GNU +# define MREMAP_MAYMOVE 1 +# define MREMAP_FIXED 2 +#endif + +/* Advice to `madvise'. */ +#ifdef __USE_BSD +# define MADV_NORMAL 0 /* No further special treatment. */ +# define MADV_RANDOM 1 /* Expect random page references. */ +# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define MADV_WILLNEED 3 /* Will need these pages. */ +# define MADV_DONTNEED 4 /* Don't need these pages. */ +# define MADV_REMOVE 9 /* Remove these pages and resources. */ +# define MADV_DONTFORK 10 /* Do not inherit across fork. */ +# define MADV_DOFORK 11 /* Do inherit across fork. */ +# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */ +# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */ +# define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */ +# define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */ +# define MADV_HWPOISON 100 /* Poison a page for testing. */ +#endif + +/* The POSIX people had to invent similar names for the same things. */ +#ifdef __USE_XOPEN2K +# define POSIX_MADV_NORMAL 0 /* No further special treatment. */ +# define POSIX_MADV_RANDOM 1 /* Expect random page references. */ +# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */ +# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */ +#endif diff --git a/sysdeps/unix/sysv/linux/tile/bits/mman.h~ b/sysdeps/unix/sysv/linux/tile/bits/mman.h~ new file mode 100644 index 0000000000..cb010312e7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/bits/mman.h~ @@ -0,0 +1,173 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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 _SYS_MMAN_H +# error "Never use directly; include instead." +#endif + +/* The following definitions basically come from the kernel headers. + But the kernel header is not namespace clean. */ + + +/* Protections are chosen from these bits, OR'd together. The + implementation does not necessarily support PROT_EXEC or PROT_WRITE + without PROT_READ. The only guarantees are that no writing will be + allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ + +#define PROT_READ 0x1 /* Page can be read. */ +#define PROT_WRITE 0x2 /* Page can be written. */ +#define PROT_EXEC 0x4 /* Page can be executed. */ +#define PROT_NONE 0x0 /* Page can not be accessed. */ +#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of + growsdown vma (mprotect only). */ +#define PROT_GROWSUP 0x02000000 /* Extend change to start of + growsup vma (mprotect only). */ + +/* Sharing types (must choose one and only one of these). */ +#define MAP_SHARED 0x01 /* Share changes. */ +#define MAP_PRIVATE 0x02 /* Changes are private. */ +#ifdef __USE_MISC +# define MAP_TYPE 0x0f /* Mask for type of mapping. */ +#endif + +/* Other flags. */ +#define MAP_FIXED 0x10 /* Interpret addr exactly. */ +#ifdef __USE_MISC +# define MAP_FILE 0 +# define MAP_ANONYMOUS 0x20 /* Don't use a file. */ +# define MAP_ANON MAP_ANONYMOUS +#endif + +#ifdef __USE_MISC +/* These are Linux-specific. */ +# define MAP_NONBLOCK 0x00080 /* Do not block on IO. */ +# define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */ +# define MAP_STACK MAP_GROWSDOWN /* Provide convenience alias. */ +# define MAP_LOCKED 0x00200 /* Lock the mapping. */ +# define MAP_NORESERVE 0x00400 /* Don't check for reservations. */ +# define MAP_DENYWRITE 0x00800 /* ETXTBSY */ +# define MAP_EXECUTABLE 0x01000 /* Mark it as an executable. */ +# define MAP_POPULATE 0x00040 /* Populate (prefault) pagetables. */ +# define MAP_HUGETLB 0x04000 /* Create huge page mapping. */ +#endif + +/* Specify the "home cache" for the page explicitly. The home cache is + the cache of one particular "home" cpu, which is used as a coherence + point for normal cached operations. Normally the kernel chooses for + you, but you can use the MAP_CACHE_HOME_xxx flags to override. + + User code should not use any symbols with a leading "_" as they are + implementation specific and may change from release to release + without warning. */ + +/* Implementation details; do not use directly. */ +#define _MAP_CACHE_INCOHERENT 0x40000 +#define _MAP_CACHE_HOME 0x80000 +#define _MAP_CACHE_HOME_SHIFT 20 +#define _MAP_CACHE_HOME_MASK 0x3ff +#define _MAP_CACHE_MKHOME(n) \ + (_MAP_CACHE_HOME | (((n) & _MAP_CACHE_HOME_MASK) << _MAP_CACHE_HOME_SHIFT)) + +/* Set the home cache to the specified cpu. */ +#define MAP_CACHE_HOME(n) _MAP_CACHE_MKHOME(n) + +/* Set the home cache to the current cpu. */ +#define _MAP_CACHE_HOME_HERE (_MAP_CACHE_HOME_MASK - 0) +#define MAP_CACHE_HOME_HERE _MAP_CACHE_MKHOME(_MAP_CACHE_HOME_HERE) + +/* Request no on-chip home, i.e. read from memory. Invalid with PROT_WRITE. */ +#define _MAP_CACHE_HOME_NONE (_MAP_CACHE_HOME_MASK - 1) +#define MAP_CACHE_HOME_NONE _MAP_CACHE_MKHOME(_MAP_CACHE_HOME_NONE) + +/* Request no on-chip home, and allow incoherent PROT_WRITE mappings. */ +#define MAP_CACHE_INCOHERENT (_MAP_CACHE_INCOHERENT | MAP_CACHE_HOME_NONE) + +/* Force the system to choose a single home cache, on a cpu of its choice. */ +#define _MAP_CACHE_HOME_SINGLE (_MAP_CACHE_HOME_MASK - 2) +#define MAP_CACHE_HOME_SINGLE _MAP_CACHE_MKHOME(_MAP_CACHE_HOME_SINGLE) + +/* Create a mapping that follows the task when it migrates. */ +#define _MAP_CACHE_HOME_TASK (_MAP_CACHE_HOME_MASK - 3) +#define MAP_CACHE_HOME_TASK _MAP_CACHE_MKHOME(_MAP_CACHE_HOME_TASK) + +/* Create a hash-for-home mapping. */ +#define _MAP_CACHE_HOME_HASH (_MAP_CACHE_HOME_MASK - 4) +#define MAP_CACHE_HOME_HASH _MAP_CACHE_MKHOME(_MAP_CACHE_HOME_HASH) + +/* Specify local caching attributes for the mapping. Normally the kernel + chooses whether to use the local cache, but these flags can be used + to override the kernel. */ + +/* Disable use of local L2 (on tile64, true for any writable mapping). */ +#define MAP_CACHE_NO_L2 0x20000 + +/* Disable use of local L1 (on tile64, ignored; L1 is disabled with L2). */ +#define MAP_CACHE_NO_L1 0x08000 + +/* Convenience alias that should be used for forward compatibility. */ +#define MAP_CACHE_NO_LOCAL (MAP_CACHE_NO_L1 | MAP_CACHE_NO_L2) + +/* Convenience alias for direct-to-RAM mappings. */ +#define MAP_CACHE_NONE (MAP_CACHE_HOME_NONE | MAP_CACHE_NO_LOCAL) + +/* Arrange for this mapping to take priority in the cache. */ +#define MAP_CACHE_PRIORITY 0x02000 + +/* Environment variable that controls hash-for-home in user programs. */ +#define MAP_CACHE_HASH_ENV_VAR "LD_CACHE_HASH" + +/* Flags to `msync'. */ +#define MS_ASYNC 1 /* Sync memory asynchronously. */ +#define MS_SYNC 4 /* Synchronous memory sync. */ +#define MS_INVALIDATE 2 /* Invalidate the caches. */ + +/* Flags for `mlockall'. */ +#define MCL_CURRENT 1 /* Lock all currently mapped pages. */ +#define MCL_FUTURE 2 /* Lock all additions to address + space. */ + +/* Flags for `mremap'. */ +#ifdef __USE_GNU +# define MREMAP_MAYMOVE 1 +# define MREMAP_FIXED 2 +#endif + +/* Advice to `madvise'. */ +#ifdef __USE_BSD +# define MADV_NORMAL 0 /* No further special treatment. */ +# define MADV_RANDOM 1 /* Expect random page references. */ +# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define MADV_WILLNEED 3 /* Will need these pages. */ +# define MADV_DONTNEED 4 /* Don't need these pages. */ +# define MADV_REMOVE 9 /* Remove these pages and resources. */ +# define MADV_DONTFORK 10 /* Do not inherit across fork. */ +# define MADV_DOFORK 11 /* Do inherit across fork. */ +# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */ +# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */ +# define MADV_HWPOISON 100 /* Poison a page for testing. */ +#endif + +/* The POSIX people had to invent similar names for the same things. */ +#ifdef __USE_XOPEN2K +# define POSIX_MADV_NORMAL 0 /* No further special treatment. */ +# define POSIX_MADV_RANDOM 1 /* Expect random page references. */ +# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */ +# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */ +#endif diff --git a/sysdeps/unix/sysv/linux/tile/bits/sigaction.h b/sysdeps/unix/sysv/linux/tile/bits/sigaction.h new file mode 100644 index 0000000000..1696d7481a --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/bits/sigaction.h @@ -0,0 +1,78 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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 _SIGNAL_H +# error "Never include directly; use instead." +#endif + +/* Structure describing the action to be taken when a signal arrives. */ +struct sigaction + { + /* Signal handler. */ +#ifdef __USE_POSIX199309 + union + { + /* Used if SA_SIGINFO is not set. */ + __sighandler_t sa_handler; + /* Used if SA_SIGINFO is set. */ + void (*sa_sigaction) (int, siginfo_t *, void *); + } + __sigaction_handler; +# define sa_handler __sigaction_handler.sa_handler +# define sa_sigaction __sigaction_handler.sa_sigaction +#else + __sighandler_t sa_handler; +#endif + + /* Additional set of signals to be blocked. */ + __sigset_t sa_mask; + + /* Special flags. */ + int sa_flags; + + /* Restore handler. */ + void (*sa_restorer) (void); + }; + +/* Bits in `sa_flags'. */ +#define SA_NOCLDSTOP 1 /* Don't send SIGCHLD when children stop. */ +#define SA_NOCLDWAIT 2 /* Don't create zombie on child death. */ +#define SA_SIGINFO 4 /* Invoke signal-catching function with + three arguments instead of one. */ +#if defined __USE_UNIX98 || defined __USE_MISC +# define SA_NOPTRACE 0x02000000 /* Don't ptrace this signal. */ +# define SA_ONSTACK 0x08000000 /* Use signal stack by using `sa_restorer'. */ +# define SA_RESTART 0x10000000 /* Restart syscall on signal return. */ +# define SA_NODEFER 0x40000000 /* Don't automatically block the signal when + its handler is being executed. */ +# define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler. */ +#endif +#ifdef __USE_MISC +# define SA_INTERRUPT 0x20000000 /* Historical no-op. */ + +/* Some aliases for the SA_ constants. */ +# define SA_NOMASK SA_NODEFER +# define SA_ONESHOT SA_RESETHAND +# define SA_STACK SA_ONSTACK +#endif + +/* Values for the HOW argument to `sigprocmask'. */ +#define SIG_BLOCK 0 /* Block signals. */ +#define SIG_UNBLOCK 1 /* Unblock signals. */ +#define SIG_SETMASK 2 /* Set the set of blocked signals. */ diff --git a/sysdeps/unix/sysv/linux/tile/bits/siginfo.h b/sysdeps/unix/sysv/linux/tile/bits/siginfo.h new file mode 100644 index 0000000000..a6d1c21917 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/bits/siginfo.h @@ -0,0 +1,319 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#if !defined _SIGNAL_H && !defined __need_siginfo_t \ + && !defined __need_sigevent_t +# error "Never include this file directly. Use instead" +#endif + +#include + +#if (!defined __have_sigval_t \ + && (defined _SIGNAL_H || defined __need_siginfo_t \ + || defined __need_sigevent_t)) +# define __have_sigval_t 1 + +/* Type for data associated with a signal. */ +typedef union sigval + { + int sival_int; + void *sival_ptr; + } sigval_t; +#endif + +#if (!defined __have_siginfo_t \ + && (defined _SIGNAL_H || defined __need_siginfo_t)) +# define __have_siginfo_t 1 + +# define __SI_MAX_SIZE 128 +# if __WORDSIZE == 64 +# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 4) +# else +# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3) +# endif + +typedef struct siginfo + { + int si_signo; /* Signal number. */ + int si_errno; /* If non-zero, an errno value associated with + this signal, as defined in . */ + int si_code; /* Signal code. */ + + union + { + int _pad[__SI_PAD_SIZE]; + + /* kill(). */ + struct + { + __pid_t si_pid; /* Sending process ID. */ + __uid_t si_uid; /* Real user ID of sending process. */ + } _kill; + + /* POSIX.1b timers. */ + struct + { + int si_tid; /* Timer ID. */ + int si_overrun; /* Overrun count. */ + sigval_t si_sigval; /* Signal value. */ + } _timer; + + /* POSIX.1b signals. */ + struct + { + __pid_t si_pid; /* Sending process ID. */ + __uid_t si_uid; /* Real user ID of sending process. */ + sigval_t si_sigval; /* Signal value. */ + } _rt; + + /* SIGCHLD. */ + struct + { + __pid_t si_pid; /* Which child. */ + __uid_t si_uid; /* Real user ID of sending process. */ + int si_status; /* Exit value or signal. */ + __clock_t si_utime; + __clock_t si_stime; + } _sigchld; + + /* SIGILL, SIGFPE, SIGSEGV, SIGBUS. */ + struct + { + void *si_addr; /* Faulting insn/memory ref. */ + int si_trapno; /* TRAP # which caused the signal */ + } _sigfault; + + /* SIGPOLL. */ + struct + { + long int si_band; /* Band event for SIGPOLL. */ + int si_fd; + } _sigpoll; + } _sifields; + } siginfo_t; + + +/* X/Open requires some more fields with fixed names. */ +# define si_pid _sifields._kill.si_pid +# define si_uid _sifields._kill.si_uid +# define si_timerid _sifields._timer.si_tid +# define si_overrun _sifields._timer.si_overrun +# define si_status _sifields._sigchld.si_status +# define si_utime _sifields._sigchld.si_utime +# define si_stime _sifields._sigchld.si_stime +# define si_value _sifields._rt.si_sigval +# define si_int _sifields._rt.si_sigval.sival_int +# define si_ptr _sifields._rt.si_sigval.sival_ptr +# define si_addr _sifields._sigfault.si_addr +# define si_trapno _sifields._sigfault.si_trapno +# define si_band _sifields._sigpoll.si_band +# define si_fd _sifields._sigpoll.si_fd + + +/* Values for `si_code'. Positive values are reserved for kernel-generated + signals. */ +enum +{ + SI_ASYNCNL = -60, /* Sent by asynch name lookup completion. */ +# define SI_ASYNCNL SI_ASYNCNL + SI_TKILL = -6, /* Sent by tkill. */ +# define SI_TKILL SI_TKILL + SI_SIGIO, /* Sent by queued SIGIO. */ +# define SI_SIGIO SI_SIGIO + SI_ASYNCIO, /* Sent by AIO completion. */ +# define SI_ASYNCIO SI_ASYNCIO + SI_MESGQ, /* Sent by real time mesq state change. */ +# define SI_MESGQ SI_MESGQ + SI_TIMER, /* Sent by timer expiration. */ +# define SI_TIMER SI_TIMER + SI_QUEUE, /* Sent by sigqueue. */ +# define SI_QUEUE SI_QUEUE + SI_USER, /* Sent by kill, sigsend, raise. */ +# define SI_USER SI_USER + SI_KERNEL = 0x80 /* Send by kernel. */ +#define SI_KERNEL SI_KERNEL +}; + + +/* `si_code' values for SIGILL signal. */ +enum +{ + ILL_ILLOPC = 1, /* Illegal opcode. */ +# define ILL_ILLOPC ILL_ILLOPC + ILL_ILLOPN, /* Illegal operand. */ +# define ILL_ILLOPN ILL_ILLOPN + ILL_ILLADR, /* Illegal addressing mode. */ +# define ILL_ILLADR ILL_ILLADR + ILL_ILLTRP, /* Illegal trap. */ +# define ILL_ILLTRP ILL_ILLTRP + ILL_PRVOPC, /* Privileged opcode. */ +# define ILL_PRVOPC ILL_PRVOPC + ILL_PRVREG, /* Privileged register. */ +# define ILL_PRVREG ILL_PRVREG + ILL_COPROC, /* Coprocessor error. */ +# define ILL_COPROC ILL_COPROC + ILL_BADSTK, /* Internal stack error. */ +# define ILL_BADSTK ILL_BADSTK + ILL_DBLFLT, /* Double fault. */ +# define ILL_DBLFLT ILL_DBLFLT + ILL_HARDWALL /* User networks hardwall violation. */ +# define ILL_HARDWALL ILL_HARDWALL +}; + +/* `si_code' values for SIGFPE signal. */ +enum +{ + FPE_INTDIV = 1, /* Integer divide by zero. */ +# define FPE_INTDIV FPE_INTDIV + FPE_INTOVF, /* Integer overflow. */ +# define FPE_INTOVF FPE_INTOVF + FPE_FLTDIV, /* Floating point divide by zero. */ +# define FPE_FLTDIV FPE_FLTDIV + FPE_FLTOVF, /* Floating point overflow. */ +# define FPE_FLTOVF FPE_FLTOVF + FPE_FLTUND, /* Floating point underflow. */ +# define FPE_FLTUND FPE_FLTUND + FPE_FLTRES, /* Floating point inexact result. */ +# define FPE_FLTRES FPE_FLTRES + FPE_FLTINV, /* Floating point invalid operation. */ +# define FPE_FLTINV FPE_FLTINV + FPE_FLTSUB /* Subscript out of range. */ +# define FPE_FLTSUB FPE_FLTSUB +}; + +/* `si_code' values for SIGSEGV signal. */ +enum +{ + SEGV_MAPERR = 1, /* Address not mapped to object. */ +# define SEGV_MAPERR SEGV_MAPERR + SEGV_ACCERR /* Invalid permissions for mapped object. */ +# define SEGV_ACCERR SEGV_ACCERR +}; + +/* `si_code' values for SIGBUS signal. */ +enum +{ + BUS_ADRALN = 1, /* Invalid address alignment. */ +# define BUS_ADRALN BUS_ADRALN + BUS_ADRERR, /* Non-existant physical address. */ +# define BUS_ADRERR BUS_ADRERR + BUS_OBJERR /* Object specific hardware error. */ +# define BUS_OBJERR BUS_OBJERR +}; + +/* `si_code' values for SIGTRAP signal. */ +enum +{ + TRAP_BRKPT = 1, /* Process breakpoint. */ +# define TRAP_BRKPT TRAP_BRKPT + TRAP_TRACE /* Process trace trap. */ +# define TRAP_TRACE TRAP_TRACE +}; + +/* `si_code' values for SIGCHLD signal. */ +enum +{ + CLD_EXITED = 1, /* Child has exited. */ +# define CLD_EXITED CLD_EXITED + CLD_KILLED, /* Child was killed. */ +# define CLD_KILLED CLD_KILLED + CLD_DUMPED, /* Child terminated abnormally. */ +# define CLD_DUMPED CLD_DUMPED + CLD_TRAPPED, /* Traced child has trapped. */ +# define CLD_TRAPPED CLD_TRAPPED + CLD_STOPPED, /* Child has stopped. */ +# define CLD_STOPPED CLD_STOPPED + CLD_CONTINUED /* Stopped child has continued. */ +# define CLD_CONTINUED CLD_CONTINUED +}; + +/* `si_code' values for SIGPOLL signal. */ +enum +{ + POLL_IN = 1, /* Data input available. */ +# define POLL_IN POLL_IN + POLL_OUT, /* Output buffers available. */ +# define POLL_OUT POLL_OUT + POLL_MSG, /* Input message available. */ +# define POLL_MSG POLL_MSG + POLL_ERR, /* I/O error. */ +# define POLL_ERR POLL_ERR + POLL_PRI, /* High priority input available. */ +# define POLL_PRI POLL_PRI + POLL_HUP /* Device disconnected. */ +# define POLL_HUP POLL_HUP +}; + +# undef __need_siginfo_t +#endif /* !have siginfo_t && (have _SIGNAL_H || need siginfo_t). */ + + +#if (defined _SIGNAL_H || defined __need_sigevent_t) \ + && !defined __have_sigevent_t +# define __have_sigevent_t 1 + +/* Structure to transport application-defined values with signals. */ +# define __SIGEV_MAX_SIZE 64 +# if __WORDSIZE == 64 +# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4) +# else +# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3) +# endif + +typedef struct sigevent + { + sigval_t sigev_value; + int sigev_signo; + int sigev_notify; + + union + { + int _pad[__SIGEV_PAD_SIZE]; + + /* When SIGEV_SIGNAL and SIGEV_THREAD_ID set, LWP ID of the + thread to receive the signal. */ + __pid_t _tid; + + struct + { + void (*_function) (sigval_t); /* Function to start. */ + void *_attribute; /* Really pthread_attr_t. */ + } _sigev_thread; + } _sigev_un; + } sigevent_t; + +/* POSIX names to access some of the members. */ +# define sigev_notify_function _sigev_un._sigev_thread._function +# define sigev_notify_attributes _sigev_un._sigev_thread._attribute + +/* `sigev_notify' values. */ +enum +{ + SIGEV_SIGNAL = 0, /* Notify via signal. */ +# define SIGEV_SIGNAL SIGEV_SIGNAL + SIGEV_NONE, /* Other notification: meaningless. */ +# define SIGEV_NONE SIGEV_NONE + SIGEV_THREAD, /* Deliver via thread creation. */ +# define SIGEV_THREAD SIGEV_THREAD + + SIGEV_THREAD_ID = 4 /* Send signal to specific thread. */ +#define SIGEV_THREAD_ID SIGEV_THREAD_ID +}; + +#endif /* have _SIGNAL_H. */ diff --git a/sysdeps/unix/sysv/linux/tile/cacheflush.c b/sysdeps/unix/sysv/linux/tile/cacheflush.c new file mode 100644 index 0000000000..d23a6c5c53 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/cacheflush.c @@ -0,0 +1,35 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include + +/* Flush cache(s). */ +int +_flush_cache (char *addr, const int nbytes, const int op) +{ +#ifdef __NR_cacheflush + return INLINE_SYSCALL (cacheflush, 3, addr, nbytes, op); +#else + __set_errno (ENOSYS); + return -1; +#endif +} +weak_alias (_flush_cache, cacheflush) diff --git a/sysdeps/unix/sysv/linux/tile/configure b/sysdeps/unix/sysv/linux/tile/configure new file mode 100644 index 0000000000..88b5788481 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/configure @@ -0,0 +1,4 @@ +# This file is generated from configure.in by Autoconf. DO NOT EDIT! + # Local configure fragment for sysdeps/unix/sysv/linux/tile. + +arch_minimum_kernel=2.6.32 diff --git a/sysdeps/unix/sysv/linux/tile/configure.in b/sysdeps/unix/sysv/linux/tile/configure.in new file mode 100644 index 0000000000..b983e28be6 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/configure.in @@ -0,0 +1,4 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/unix/sysv/linux/tile. + +arch_minimum_kernel=2.6.32 diff --git a/sysdeps/unix/sysv/linux/tile/getcontext.S b/sysdeps/unix/sysv/linux/tile/getcontext.S new file mode 100644 index 0000000000..34bc7d8ca2 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/getcontext.S @@ -0,0 +1,96 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include + +#include "ucontext_i.h" + +/* int getcontext (ucontext_t *ucp) */ + + .text +ENTRY (__getcontext) + FEEDBACK_ENTER(__getcontext) + + /* Save the callee-saved GPRs. There's no need to save the + caller-saved GPRs since the eventual setcontext() or + swapcontext() will assume those registers are all dead. + Save value "1" to uc_flags to later recognize getcontext(). */ + { movei r11, 1; ADDI_PTR r10, r0, UC_FLAGS_OFFSET } + { ST r10, r11; addli r10, r0, UC_REG(30) } + { ST r10, r30; ADDI_PTR r10, r10, REGSIZE } + { ST r10, r31; ADDI_PTR r10, r10, REGSIZE } + { ST r10, r32; ADDI_PTR r10, r10, REGSIZE } + { ST r10, r33; ADDI_PTR r10, r10, REGSIZE } + { ST r10, r34; ADDI_PTR r10, r10, REGSIZE } + { ST r10, r35; ADDI_PTR r10, r10, REGSIZE } + { ST r10, r36; ADDI_PTR r10, r10, REGSIZE } + { ST r10, r37; ADDI_PTR r10, r10, REGSIZE } + { ST r10, r38; ADDI_PTR r10, r10, REGSIZE } + { ST r10, r39; ADDI_PTR r10, r10, REGSIZE } + { ST r10, r40; ADDI_PTR r10, r10, REGSIZE } + { ST r10, r41; ADDI_PTR r10, r10, REGSIZE } + { ST r10, r42; ADDI_PTR r10, r10, REGSIZE } + { ST r10, r43; ADDI_PTR r10, r10, REGSIZE } + { ST r10, r44; ADDI_PTR r10, r10, REGSIZE } + { ST r10, r45; ADDI_PTR r10, r10, REGSIZE } + { ST r10, r46; ADDI_PTR r10, r10, REGSIZE } + { ST r10, r47; ADDI_PTR r10, r10, REGSIZE } + { ST r10, r48; ADDI_PTR r10, r10, REGSIZE } + { ST r10, r49; ADDI_PTR r10, r10, REGSIZE } + { ST r10, r50; ADDI_PTR r10, r10, REGSIZE } + { ST r10, r51; ADDI_PTR r10, r10, REGSIZE } + { ST r10, r52; ADDI_PTR r10, r10, REGSIZE } + { ST r10, tp; ADDI_PTR r10, r10, REGSIZE } + { ST r10, sp; ADDI_PTR r10, r10, REGSIZE } + { ST r10, lr; ADDI_PTR r10, r10, REGSIZE } + lnk r11 /* Point PC at the "jrp lr" instruction. */ + addli r11, r11, .Lreturn - . + { ST r10, r11; ADDI_PTR r10, r10, REGSIZE } + mfspr r11, INTERRUPT_CRITICAL_SECTION + { + ST r10, r11 + movei r1, 0 + } + + /* rt_sigprocmask (SIG_BLOCK, NULL, &ucp->uc_sigmask, _NSIG / 8) */ + { + movei r3, _NSIG / 8 + addli r2, r0, UC_SIGMASK_OFFSET + } + { + movei r0, SIG_BLOCK + moveli TREG_SYSCALL_NR_NAME, __NR_rt_sigprocmask + } + swint1 + BNEZ r1, .Lsyscall_error + +.Lreturn: + { + movei r0, 0 + jrp lr + } + +.Lsyscall_error: + j SYSCALL_ERROR_NAME + +END (__getcontext) +.hidden __getcontext + +weak_alias (__getcontext, getcontext) diff --git a/sysdeps/unix/sysv/linux/tile/kernel-features.h b/sysdeps/unix/sysv/linux/tile/kernel-features.h new file mode 100644 index 0000000000..d234922983 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/kernel-features.h @@ -0,0 +1,44 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + + +/* TILE glibc support starts with 2.6.36, guaranteeing many kernel features. */ +#define __ASSUME_NEW_GETRLIMIT_SYSCALL 1 +#define __ASSUME_TRUNCATE64_SYSCALL 1 +#define __ASSUME_MMAP2_SYSCALL 1 +#define __ASSUME_STAT64_SYSCALL 1 +#define __ASSUME_FCNTL64 1 +#define __ASSUME_CLONE_THREAD_FLAGS 1 +#define __ASSUME_TGKILL 1 +#define __ASSUME_UTIMES 1 +#define __ASSUME_FADVISE64_64_SYSCALL 1 +#define __ASSUME_O_CLOEXEC 1 +#define __ASSUME_SOCK_CLOEXEC 1 +#define __ASSUME_IN_NONBLOCK 1 +#define __ASSUME_PIPE2 1 +#define __ASSUME_EVENTFD2 1 +#define __ASSUME_SIGNALFD4 1 +#define __ASSUME_ACCEPT4 1 +#define __ASSUME_DUP3 1 + +#include_next + +/* Define this if your 32-bit syscall API requires 64-bit register + pairs to start with an even-number register. */ +#define __ASSUME_ALIGNED_REGISTER_PAIRS 1 diff --git a/sysdeps/unix/sysv/linux/tile/makecontext.c b/sysdeps/unix/sysv/linux/tile/makecontext.c new file mode 100644 index 0000000000..060cf74bc2 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/makecontext.c @@ -0,0 +1,68 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include +#include +#include +#include + +void +__makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...) +{ + extern void __startcontext (void); + uint_reg_t *sp, *args; + va_list ap; + int i; + + /* Initialize the top of stack. */ + sp = (uint_reg_t *) ((((intptr_t) ucp->uc_stack.ss_sp + + ucp->uc_stack.ss_size) & -16L) - 16); + + /* Allow room for memory-passed arguments if necessary. */ + if (argc > 10) + sp -= 2 + (argc - 10); + + sp[0] = sp[1] = 0; + + /* Set parameters. */ + va_start (ap, argc); + args = &ucp->uc_mcontext.gregs[0]; + for (i = 0; i < argc; i++) + { + if (i == 10) + args = &sp[2]; + *args++ = va_arg (ap, long); + } + va_end (ap); + + /* Pass (*func) to __startcontext in pc. */ + ucp->uc_mcontext.pc = (long) func; + + /* Set stack pointer. */ + ucp->uc_mcontext.sp = (long) sp; + + /* Set the return address to trampoline. */ + ucp->uc_mcontext.lr = (long) __startcontext; + + /* Pass ucp->uc_link to __start_context in r30. */ + ucp->uc_mcontext.gregs[30] = (long) ucp->uc_link; +} +weak_alias (__makecontext, makecontext) diff --git a/sysdeps/unix/sysv/linux/tile/nptl/Makefile b/sysdeps/unix/sysv/linux/tile/nptl/Makefile new file mode 100644 index 0000000000..79e03546fc --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/nptl/Makefile @@ -0,0 +1,7 @@ +# pull in __syscall_error routine +libpthread-routines += sysdep + +ifeq ($(subdir),nptl) +# Avoid .cfi_startproc/endproc markers when creating init and fini pieces. +CFLAGS-pt-initfini.s += -fno-asynchronous-unwind-tables +endif diff --git a/sysdeps/unix/sysv/linux/tile/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/tile/nptl/bits/pthreadtypes.h new file mode 100644 index 0000000000..a71a4b77ec --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/nptl/bits/pthreadtypes.h @@ -0,0 +1,221 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Based on work contributed by Ulrich Drepper , 2002. + Contributed by Chris Metcalf , 2011. + + 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_PTHREADTYPES_H +#define _BITS_PTHREADTYPES_H 1 + +#include + +#if __WORDSIZE == 64 +# define __SIZEOF_PTHREAD_ATTR_T 56 +# define __SIZEOF_PTHREAD_MUTEX_T 40 +# define __SIZEOF_PTHREAD_MUTEXATTR_T 4 +# define __SIZEOF_PTHREAD_COND_T 48 +# define __SIZEOF_PTHREAD_CONDATTR_T 4 +# define __SIZEOF_PTHREAD_RWLOCK_T 56 +# define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 +# define __SIZEOF_PTHREAD_BARRIER_T 32 +# define __SIZEOF_PTHREAD_BARRIERATTR_T 4 +#else +# define __SIZEOF_PTHREAD_ATTR_T 36 +# define __SIZEOF_PTHREAD_MUTEX_T 24 +# define __SIZEOF_PTHREAD_MUTEXATTR_T 4 +# define __SIZEOF_PTHREAD_COND_T 48 +# define __SIZEOF_PTHREAD_CONDATTR_T 4 +# define __SIZEOF_PTHREAD_RWLOCK_T 32 +# define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 +# define __SIZEOF_PTHREAD_BARRIER_T 20 +# define __SIZEOF_PTHREAD_BARRIERATTR_T 4 +#endif + + +/* Thread identifiers. The structure of the attribute type is not + exposed on purpose. */ +typedef unsigned long int pthread_t; + + +typedef union +{ + char __size[__SIZEOF_PTHREAD_ATTR_T]; + long int __align; +} pthread_attr_t; + + +#if __WORDSIZE == 64 +typedef struct __pthread_internal_list +{ + struct __pthread_internal_list *__prev; + struct __pthread_internal_list *__next; +} __pthread_list_t; +#else +typedef struct __pthread_internal_slist +{ + struct __pthread_internal_slist *__next; +} __pthread_slist_t; +#endif + + +/* Data structures for mutex handling. The structure of the attribute + type is not exposed on purpose. */ +typedef union +{ + struct __pthread_mutex_s + { + int __lock; + unsigned int __count; + int __owner; +#if __WORDSIZE == 64 + unsigned int __nusers; +#endif + /* KIND must stay at this position in the structure to maintain + binary compatibility. */ + int __kind; +#if __WORDSIZE == 64 + int __spins; + __pthread_list_t __list; +# define __PTHREAD_MUTEX_HAVE_PREV 1 +#else + unsigned int __nusers; + __extension__ union + { + int __spins; + __pthread_slist_t __list; + }; +#endif + } __data; + char __size[__SIZEOF_PTHREAD_MUTEX_T]; + long int __align; +} pthread_mutex_t; + +typedef union +{ + char __size[__SIZEOF_PTHREAD_MUTEXATTR_T]; + int __align; +} pthread_mutexattr_t; + + +/* Data structure for conditional variable handling. The structure of + the attribute type is not exposed on purpose. */ +typedef union +{ + struct + { + int __lock; + unsigned int __futex; + __extension__ unsigned long long int __total_seq; + __extension__ unsigned long long int __wakeup_seq; + __extension__ unsigned long long int __woken_seq; + void *__mutex; + unsigned int __nwaiters; + unsigned int __broadcast_seq; + } __data; + char __size[__SIZEOF_PTHREAD_COND_T]; + __extension__ long long int __align; +} pthread_cond_t; + +typedef union +{ + char __size[__SIZEOF_PTHREAD_CONDATTR_T]; + int __align; +} pthread_condattr_t; + + +/* Keys for thread-specific data */ +typedef unsigned int pthread_key_t; + + +/* Once-only execution */ +typedef int pthread_once_t; + + +#if defined __USE_UNIX98 || defined __USE_XOPEN2K +/* Data structure for read-write lock variable handling. The + structure of the attribute type is not exposed on purpose. */ +typedef union +{ +# if __WORDSIZE == 64 + struct + { + int __lock; + unsigned int __nr_readers; + unsigned int __readers_wakeup; + unsigned int __writer_wakeup; + unsigned int __nr_readers_queued; + unsigned int __nr_writers_queued; + int __writer; + int __shared; + unsigned long int __pad1; + unsigned long int __pad2; + /* FLAGS must stay at this position in the structure to maintain + binary compatibility. */ + unsigned int __flags; + } __data; +# else + struct + { + int __lock; + unsigned int __nr_readers; + unsigned int __readers_wakeup; + unsigned int __writer_wakeup; + unsigned int __nr_readers_queued; + unsigned int __nr_writers_queued; + /* FLAGS must stay at this position in the structure to maintain + binary compatibility. */ + unsigned char __flags; + unsigned char __shared; + unsigned char __pad1; + unsigned char __pad2; + int __writer; + } __data; +# endif + char __size[__SIZEOF_PTHREAD_RWLOCK_T]; + long int __align; +} pthread_rwlock_t; + +typedef union +{ + char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T]; + long int __align; +} pthread_rwlockattr_t; +#endif + + +#ifdef __USE_XOPEN2K +/* POSIX spinlock data type. */ +typedef volatile int pthread_spinlock_t; + + +/* POSIX barriers data type. The structure of the type is + deliberately not exposed. */ +typedef union +{ + char __size[__SIZEOF_PTHREAD_BARRIER_T]; + long int __align; +} pthread_barrier_t; + +typedef union +{ + char __size[__SIZEOF_PTHREAD_BARRIERATTR_T]; + int __align; +} pthread_barrierattr_t; +#endif + + +#endif /* bits/pthreadtypes.h */ diff --git a/sysdeps/unix/sysv/linux/tile/nptl/bits/semaphore.h b/sysdeps/unix/sysv/linux/tile/nptl/bits/semaphore.h new file mode 100644 index 0000000000..b1eca926ad --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/nptl/bits/semaphore.h @@ -0,0 +1,42 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + Based on work contributed by Ulrich Drepper , 2002. + + 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 _SEMAPHORE_H +# error "Never use directly; include instead." +#endif + +#include + +#if __WORDSIZE == 64 +# define __SIZEOF_SEM_T 32 +#else +# define __SIZEOF_SEM_T 16 +#endif + + +/* Value returned if `sem_open' failed. */ +#define SEM_FAILED ((sem_t *) 0) + + +typedef union +{ + char __size[__SIZEOF_SEM_T]; + long int __align; +} sem_t; diff --git a/sysdeps/unix/sysv/linux/tile/nptl/clone.S b/sysdeps/unix/sysv/linux/tile/nptl/clone.S new file mode 100644 index 0000000000..73a5e84617 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/nptl/clone.S @@ -0,0 +1,220 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +/* clone() is even more special than fork() as it mucks with stacks + and invokes a function in the right context after it's all over. */ + +#include +#define _ERRNO_H 1 +#include + +#include +#include +#include +#include + +/* What we save where in the stack frame; must include all callee-saves. */ +#define FRAME_NEXT_LR (0 * REGSIZE) /* reserved by ABI; not used here */ +#define FRAME_SP (1 * REGSIZE) +#define FRAME_R30 (2 * REGSIZE) +#define FRAME_R31 (3 * REGSIZE) +#define FRAME_R32 (4 * REGSIZE) +#define FRAME_SIZE (5 * REGSIZE) + +/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg, + pid_t *ptid, struct user_desc *tls, pid_t *ctid); */ + + .text +ENTRY (__clone) + /* sanity check arguments */ + BEQZ r0, .Linvalid + BEQZ r1, .Linvalid + + /* Create a stack frame so we can pass callee-saves to new task. */ + { + move r10, sp + ST sp, lr + ADDI_PTR sp, sp, -FRAME_SIZE + } + cfi_offset (lr, 0) + cfi_def_cfa_offset (FRAME_SIZE) + ADDI_PTR r11, sp, FRAME_SP + { + ST r11, r10 + ADDI_PTR r11, sp, FRAME_R30 + } + { + ST r11, r30 + ADDI_PTR r11, sp, FRAME_R31 + } + cfi_offset (r30, FRAME_R30 - FRAME_SIZE) + { + ST r11, r31 + ADDI_PTR r11, sp, FRAME_R32 + } + cfi_offset (r31, FRAME_R31 - FRAME_SIZE) + ST r11, r32 + cfi_offset (r32, FRAME_R32 - FRAME_SIZE) + + /* Make sure child stack is properly aligned, and set up the + top frame so that we can call out of it immediately in the + child. Setting it up here means we fault in the parent if + it's bogus, which is probably cleaner than faulting first + thing in the child. */ + ADDI_PTR r1, r1, -C_ABI_SAVE_AREA_SIZE + andi r1, r1, -C_ABI_SAVE_AREA_SIZE + ADDI_PTR r9, r1, REGSIZE /* sp of this frame on entry, i.e. zero */ + ST r9, zero + + /* We need to switch the argument convention around from + libc to kernel: + + libc: + r0 fn + r1 child_stack + r2 flags + r3 arg + r4 ptid + r5 tls + r6 ctid + + kernel: + r0 flags + r1 child_stack [same as libc] + r2 ptid + r3 ctid + r4 tls + + Plus the callee-saves as described at .Lthread_start, below. */ + { + move r32, r0 + move r0, r2 + } + { + move r31, r3 + move r3, r6 + } + { + move r30, r2 + move r2, r4 + } + { + move r4, r5 + moveli TREG_SYSCALL_NR_NAME, __NR_clone + } + swint1 + BEQZ r0, .Lthread_start /* If in child task. */ + + /* Restore the callee-saved registers and return. */ + ADDLI_PTR lr, sp, FRAME_SIZE + { + LD lr, lr + ADDLI_PTR r30, sp, FRAME_R30 + } + { + LD r30, r30 + ADDLI_PTR r31, sp, FRAME_R31 + } + { + LD r31, r31 + ADDLI_PTR r32, sp, FRAME_R32 + } + { + LD r32, r32 + ADDI_PTR sp, sp, FRAME_SIZE + } + cfi_def_cfa_offset (0) + + BNEZ r1, .Lerror + jrp lr + +.Lerror: + j SYSCALL_ERROR_NAME + +.Linvalid: + { + movei r1, EINVAL + j SYSCALL_ERROR_NAME + } + +/* This function expects to receive: + + sp: the top of a valid stack area + r30: clone() flags + r31: the argument to pass to the user function + r32: the user function pointer */ + +.Lthread_start: + /* Check and see if we need to reset the PID, which we do if + CLONE_THREAD isn't set, i.e. we're not staying in the thread group. + If CLONE_VM is set, we're doing some kind of thread-like clone, + so we set the tid/pid to -1 to disable using the cached values + in getpid(). Otherwise (if CLONE_VM isn't set), it's a + fork-like clone, and we go ahead and write the cached values + from the true system pid (retrieved via __NR_getpid syscall). */ +#ifdef __tilegx__ + { + moveli r0, hw1_last(CLONE_VM) + moveli r1, hw1_last(CLONE_THREAD) + } + { + shl16insli r0, r0, hw0(CLONE_VM) + shl16insli r1, r1, hw0(CLONE_THREAD) + } +#else + { + moveli r0, lo16(CLONE_VM) + moveli r1, lo16(CLONE_THREAD) + } + { + auli r0, r0, ha16(CLONE_VM) + auli r1, r1, ha16(CLONE_THREAD) + } +#endif + { + and r0, r30, r0 + and r1, r30, r1 + } + BNEZ r1, .Lno_reset_pid /* CLONE_THREAD is set */ + { + movei r0, -1 + BNEZ r0, .Lgotpid /* CLONE_VM is set */ + } + moveli TREG_SYSCALL_NR_NAME, __NR_getpid + swint1 +.Lgotpid: + ADDLI_PTR r2, tp, PID_OFFSET + { + ST4 r2, r0 + ADDLI_PTR r2, tp, TID_OFFSET + } + ST4 r2, r0 +.Lno_reset_pid: + { + /* Invoke user function with specified argument. */ + move r0, r31 + jalr r32 + } + { + j HIDDEN_JUMPTARGET(_exit) + info INFO_OP_CANNOT_BACKTRACE /* Notify backtracer to stop. */ + } +PSEUDO_END (__clone) + +weak_alias (__clone, clone) diff --git a/sysdeps/unix/sysv/linux/tile/nptl/createthread.c b/sysdeps/unix/sysv/linux/tile/nptl/createthread.c new file mode 100644 index 0000000000..816316b1d8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/nptl/createthread.c @@ -0,0 +1,25 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +/* Value passed to 'clone' for initialization of the thread register. */ +#define TLS_VALUE ((void *) (pd) \ + + TLS_TCB_OFFSET + TLS_PRE_TCB_SIZE) + +/* Get the real implementation. */ +#include diff --git a/sysdeps/unix/sysv/linux/tile/nptl/fork.c b/sysdeps/unix/sysv/linux/tile/nptl/fork.c new file mode 100644 index 0000000000..4267fa48e4 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/nptl/fork.c @@ -0,0 +1,32 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + Based on work contributed by Ulrich Drepper , 2002. + + 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. */ + +#include +#include +#include +#include +#include + +#define ARCH_FORK() \ + INLINE_SYSCALL (clone, 4, \ + CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID | SIGCHLD, \ + 0, NULL, &THREAD_SELF->tid) + +#include diff --git a/sysdeps/unix/sysv/linux/tile/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/tile/nptl/lowlevellock.h new file mode 100644 index 0000000000..55bddd5ba8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/nptl/lowlevellock.h @@ -0,0 +1,281 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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 _LOWLEVELLOCK_H +#define _LOWLEVELLOCK_H 1 + +#include +#include +#include +#include +#include +#include + + +#define FUTEX_WAIT 0 +#define FUTEX_WAKE 1 +#define FUTEX_REQUEUE 3 +#define FUTEX_CMP_REQUEUE 4 +#define FUTEX_WAKE_OP 5 +#define FUTEX_OP_CLEAR_WAKE_IF_GT_ONE ((4 << 24) | 1) +#define FUTEX_LOCK_PI 6 +#define FUTEX_UNLOCK_PI 7 +#define FUTEX_TRYLOCK_PI 8 +#define FUTEX_WAIT_BITSET 9 +#define FUTEX_WAKE_BITSET 10 +#define FUTEX_PRIVATE_FLAG 128 +#define FUTEX_CLOCK_REALTIME 256 + +#define FUTEX_BITSET_MATCH_ANY 0xffffffff + +/* Values for 'private' parameter of locking macros. Yes, the + definition seems to be backwards. But it is not. The bit will be + reversed before passing to the system call. */ +#define LLL_PRIVATE 0 +#define LLL_SHARED FUTEX_PRIVATE_FLAG + + +#if !defined NOT_IN_libc || defined IS_IN_rtld +/* In libc.so or ld.so all futexes are private. */ +# ifdef __ASSUME_PRIVATE_FUTEX +# define __lll_private_flag(fl, private) \ + ((fl) | FUTEX_PRIVATE_FLAG) +# else +# define __lll_private_flag(fl, private) \ + ((fl) | THREAD_GETMEM (THREAD_SELF, header.private_futex)) +# endif +#else +# ifdef __ASSUME_PRIVATE_FUTEX +# define __lll_private_flag(fl, private) \ + (((fl) | FUTEX_PRIVATE_FLAG) ^ (private)) +# else +# define __lll_private_flag(fl, private) \ + (__builtin_constant_p (private) \ + ? ((private) == 0 \ + ? ((fl) | THREAD_GETMEM (THREAD_SELF, header.private_futex)) \ + : (fl)) \ + : ((fl) | (((private) ^ FUTEX_PRIVATE_FLAG) \ + & THREAD_GETMEM (THREAD_SELF, header.private_futex)))) +# endif +#endif + + +#define lll_futex_wait(futexp, val, private) \ + lll_futex_timed_wait (futexp, val, NULL, private) + +#define lll_futex_timed_wait(futexp, val, timespec, private) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + INTERNAL_SYSCALL (futex, __err, 4, (futexp), \ + __lll_private_flag (FUTEX_WAIT, private), \ + (val), (timespec)); \ + }) + +#define lll_futex_wake(futexp, nr, private) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + INTERNAL_SYSCALL (futex, __err, 4, (futexp), \ + __lll_private_flag (FUTEX_WAKE, private), \ + (nr), 0); \ + }) + +#define lll_robust_dead(futexv, private) \ + do \ + { \ + int *__futexp = &(futexv); \ + atomic_or (__futexp, FUTEX_OWNER_DIED); \ + lll_futex_wake (__futexp, 1, private); \ + } \ + while (0) + +/* Returns non-zero if error happened, zero if success. */ +#define lll_futex_requeue(futexp, nr_wake, nr_move, mutex, val, private) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + __ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp), \ + __lll_private_flag (FUTEX_CMP_REQUEUE, private),\ + (nr_wake), (nr_move), (mutex), (val)); \ + INTERNAL_SYSCALL_ERROR_P (__ret, __err); \ + }) + +/* Returns non-zero if error happened, zero if success. */ +#define lll_futex_wake_unlock(futexp, nr_wake, nr_wake2, futexp2, private) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + __ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp), \ + __lll_private_flag (FUTEX_WAKE_OP, private), \ + (nr_wake), (nr_wake2), (futexp2), \ + FUTEX_OP_CLEAR_WAKE_IF_GT_ONE); \ + INTERNAL_SYSCALL_ERROR_P (__ret, __err); \ + }) + + + + +static inline int __attribute__ ((always_inline)) +__lll_trylock (int *futex) +{ + return atomic_compare_and_exchange_val_acq (futex, 1, 0) != 0; +} +#define lll_trylock(lock) __lll_trylock (&(lock)) + + +static inline int __attribute__ ((always_inline)) +__lll_cond_trylock (int *futex) +{ + return atomic_compare_and_exchange_val_acq (futex, 2, 0) != 0; +} +#define lll_cond_trylock(lock) __lll_cond_trylock (&(lock)) + + +static inline int __attribute__ ((always_inline)) +__lll_robust_trylock (int *futex, int id) +{ + return atomic_compare_and_exchange_val_acq (futex, id, 0) != 0; +} +#define lll_robust_trylock(lock, id) \ + __lll_robust_trylock (&(lock), id) + +extern void __lll_lock_wait_private (int *futex) attribute_hidden; +extern void __lll_lock_wait (int *futex, int private) attribute_hidden; +extern int __lll_robust_lock_wait (int *futex, int private) attribute_hidden; + +static inline void __attribute__ ((always_inline)) +__lll_lock (int *futex, int private) +{ + if (atomic_compare_and_exchange_bool_acq (futex, 1, 0) != 0) + { + if (__builtin_constant_p (private) && private == LLL_PRIVATE) + __lll_lock_wait_private (futex); + else + __lll_lock_wait (futex, private); + } +} +#define lll_lock(futex, private) __lll_lock (&(futex), private) + + +static inline int __attribute__ ((always_inline)) +__lll_robust_lock (int *futex, int id, int private) +{ + int result = 0; + if (atomic_compare_and_exchange_bool_acq (futex, id, 0) != 0) + result = __lll_robust_lock_wait (futex, private); + return result; +} +#define lll_robust_lock(futex, id, private) \ + __lll_robust_lock (&(futex), id, private) + + +static inline void __attribute__ ((always_inline)) +__lll_cond_lock (int *futex, int private) +{ + if (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0) + __lll_lock_wait (futex, private); +} +#define lll_cond_lock(futex, private) __lll_cond_lock (&(futex), private) + + +#define lll_robust_cond_lock(futex, id, private) \ + __lll_robust_lock (&(futex), (id) | FUTEX_WAITERS, private) + + +extern int __lll_timedlock_wait (int *futex, const struct timespec *, + int private) attribute_hidden; +extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *, + int private) attribute_hidden; + +static inline int __attribute__ ((always_inline)) +__lll_timedlock (int *futex, const struct timespec *abstime, int private) +{ + int result = 0; + if (atomic_compare_and_exchange_bool_acq (futex, 1, 0) != 0) + result = __lll_timedlock_wait (futex, abstime, private); + return result; +} +#define lll_timedlock(futex, abstime, private) \ + __lll_timedlock (&(futex), abstime, private) + + +static inline int __attribute__ ((always_inline)) +__lll_robust_timedlock (int *futex, const struct timespec *abstime, + int id, int private) +{ + int result = 0; + if (atomic_compare_and_exchange_bool_acq (futex, id, 0) != 0) + result = __lll_robust_timedlock_wait (futex, abstime, private); + return result; +} +#define lll_robust_timedlock(futex, abstime, id, private) \ + __lll_robust_timedlock (&(futex), abstime, id, private) + + +#define __lll_unlock(futex, private) \ + (void) \ + ({ int *__futex = (futex); \ + int __oldval = atomic_exchange_rel (__futex, 0); \ + if (__builtin_expect (__oldval > 1, 0)) \ + lll_futex_wake (__futex, 1, private); \ + }) +#define lll_unlock(futex, private) __lll_unlock(&(futex), private) + + +#define __lll_robust_unlock(futex, private) \ + (void) \ + ({ int *__futex = (futex); \ + int __oldval = atomic_exchange_rel (__futex, 0); \ + if (__builtin_expect (__oldval & FUTEX_WAITERS, 0)) \ + lll_futex_wake (__futex, 1, private); \ + }) +#define lll_robust_unlock(futex, private) \ + __lll_robust_unlock(&(futex), private) + + +#define lll_islocked(futex) \ + (futex != 0) + +/* Initializers for lock. */ +#define LLL_LOCK_INITIALIZER (0) +#define LLL_LOCK_INITIALIZER_LOCKED (1) + + +/* The kernel notifies a process which uses CLONE_CLEARTID via futex + wakeup when the clone terminates. The memory location contains the + thread ID while the clone is running and is reset to zero + afterwards. */ +#define lll_wait_tid(tid) \ + do { \ + __typeof (tid) __tid; \ + while ((__tid = (tid)) != 0) \ + lll_futex_wait (&(tid), __tid, LLL_SHARED); \ + } while (0) + +extern int __lll_timedwait_tid (int *, const struct timespec *) + attribute_hidden; + +#define lll_timedwait_tid(tid, abstime) \ + ({ \ + int __res = 0; \ + if ((tid) != 0) \ + __res = __lll_timedwait_tid (&(tid), (abstime)); \ + __res; \ + }) + +#endif /* lowlevellock.h */ diff --git a/sysdeps/unix/sysv/linux/tile/nptl/pt-vfork.S b/sysdeps/unix/sysv/linux/tile/nptl/pt-vfork.S new file mode 100644 index 0000000000..a6ccb1f51f --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/nptl/pt-vfork.S @@ -0,0 +1,2 @@ +#define PT_VFORK 1 /* pid is never zero */ +#include "vfork.S" diff --git a/sysdeps/unix/sysv/linux/tile/nptl/pthread_once.c b/sysdeps/unix/sysv/linux/tile/nptl/pthread_once.c new file mode 100644 index 0000000000..1272be0dab --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/nptl/pthread_once.c @@ -0,0 +1,95 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + Based on work contributed by Jakub Jelinek , 2003. + + 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. */ + +#include +#include + + +unsigned long int __fork_generation attribute_hidden; + + +static void +clear_once_control (void *arg) +{ + pthread_once_t *once_control = (pthread_once_t *) arg; + + *once_control = 0; + lll_futex_wake (once_control, INT_MAX, LLL_PRIVATE); +} + + +int +__pthread_once (once_control, init_routine) + pthread_once_t *once_control; + void (*init_routine) (void); +{ + while (1) + { + int oldval, val, newval; + + val = *once_control; + do + { + /* Check if the initialized has already been done. */ + if ((val & 2) != 0) + return 0; + + oldval = val; + newval = (oldval & 3) | __fork_generation | 1; + val = atomic_compare_and_exchange_val_acq (once_control, newval, + oldval); + } + while (__builtin_expect (val != oldval, 0)); + + /* Check if another thread already runs the initializer. */ + if ((oldval & 1) != 0) + { + /* Check whether the initializer execution was interrupted + by a fork. */ + if (((oldval ^ newval) & -4) == 0) + { + /* Same generation, some other thread was faster. Wait. */ + lll_futex_wait (once_control, newval, LLL_PRIVATE); + continue; + } + } + + /* This thread is the first here. Do the initialization. + Register a cleanup handler so that in case the thread gets + interrupted the initialization can be restarted. */ + pthread_cleanup_push (clear_once_control, once_control); + + init_routine (); + + pthread_cleanup_pop (0); + + + /* Add one to *once_control. */ + atomic_increment (once_control); + + /* Wake up all other threads. */ + lll_futex_wake (once_control, INT_MAX, LLL_PRIVATE); + break; + } + + return 0; +} +weak_alias (__pthread_once, pthread_once) +strong_alias (__pthread_once, __pthread_once_internal) diff --git a/sysdeps/unix/sysv/linux/tile/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/tile/nptl/sysdep-cancel.h new file mode 100644 index 0000000000..e00ea50a7b --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/nptl/sysdep-cancel.h @@ -0,0 +1,155 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#ifndef __ASSEMBLER__ +# include +#endif + +#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt + +/* Allow hacking in some extra code if desired. */ +#ifndef PSEUDO_EXTRA +#define PSEUDO_EXTRA +#endif + +#undef PSEUDO +#define PSEUDO(name, syscall_name, args) \ + ENTRY(__##syscall_name##_nocancel); \ + PSEUDO_EXTRA \ + moveli TREG_SYSCALL_NR_NAME, SYS_ify(syscall_name); \ + swint1; \ + BNEZ r1, 0f; \ + jrp lr; \ + END(__##syscall_name##_nocancel); \ + ENTRY (name) \ + SINGLE_THREAD_P(r11); \ + BEQZ r11, L(pseudo_cancel); \ + PSEUDO_EXTRA \ + moveli TREG_SYSCALL_NR_NAME, SYS_ify(syscall_name); \ + swint1; \ + BNEZ r1, 0f; \ + jrp lr; \ + L(pseudo_cancel): \ + { \ + move r11, sp; \ + ST sp, lr; \ + ADDI_PTR sp, sp, -STKSPACE; \ + }; \ + cfi_offset (lr, 0); \ + cfi_def_cfa_offset (STKSPACE); \ + { \ + ADDI_PTR r12, sp, REGSIZE; \ + ADDI_PTR r13, sp, 2 * REGSIZE; /* set up for PUSHARGS_0 */ \ + }; \ + ST r12, r11; \ + PUSHARGS_##args /* save syscall args */ \ + CENABLE; \ + ADDI_PTR r12, sp, 10 * REGSIZE; \ + { \ + ST r12, r0; /* save mask */ \ + ADDI_PTR r13, sp, 2 * REGSIZE; /* set up for POPARGS_0 */ \ + }; \ + POPARGS_##args /* restore syscall args */ \ + PSEUDO_EXTRA \ + moveli TREG_SYSCALL_NR_NAME, SYS_ify(syscall_name); \ + swint1; \ + ADDI_PTR r12, sp, 12 * REGSIZE; \ + { \ + ST r12, r1; /* save syscall result */ \ + ADDI_PTR r12, sp, 11 * REGSIZE; \ + }; \ + { \ + ST r12, r0; \ + ADDI_PTR r13, sp, 10 * REGSIZE; \ + }; \ + LD r0, r13; /* pass mask as arg1 */ \ + CDISABLE; \ + { \ + ADDI_PTR lr, sp, STKSPACE; \ + ADDI_PTR r0, sp, 11 * REGSIZE; \ + }; \ + { \ + LD r0, r0; \ + ADDI_PTR r1, sp, 12 * REGSIZE; \ + }; \ + LD r1, r1; \ + { \ + LD lr, lr; \ + ADDI_PTR sp, sp, STKSPACE; \ + }; \ + cfi_def_cfa_offset (0); \ + BNEZ r1, 0f + +# define PUSHARGS_0 /* nothing to do */ +# define PUSHARGS_1 PUSHARGS_0 { ADDI_PTR r14, sp, 3 * REGSIZE; ST r13, r0 }; +# define PUSHARGS_2 PUSHARGS_1 { ADDI_PTR r13, sp, 4 * REGSIZE; ST r14, r1 }; +# define PUSHARGS_3 PUSHARGS_2 { ADDI_PTR r14, sp, 5 * REGSIZE; ST r13, r2 }; +# define PUSHARGS_4 PUSHARGS_3 { ADDI_PTR r13, sp, 6 * REGSIZE; ST r14, r3 }; +# define PUSHARGS_5 PUSHARGS_4 { ADDI_PTR r14, sp, 7 * REGSIZE; ST r13, r4 }; +# define PUSHARGS_6 PUSHARGS_5 { ADDI_PTR r13, sp, 8 * REGSIZE; ST r14, r5 }; +# define PUSHARGS_7 PUSHARGS_6 { ADDI_PTR r14, sp, 9 * REGSIZE; ST r13, r6 }; + +# define POPARGS_0 /* nothing to do */ +# define POPARGS_1 POPARGS_0 { ADDI_PTR r14, sp, 3 * REGSIZE; LD r0, r13 }; +# define POPARGS_2 POPARGS_1 { ADDI_PTR r13, sp, 4 * REGSIZE; LD r1, r14 }; +# define POPARGS_3 POPARGS_2 { ADDI_PTR r14, sp, 5 * REGSIZE; LD r2, r13 }; +# define POPARGS_4 POPARGS_3 { ADDI_PTR r13, sp, 6 * REGSIZE; LD r3, r14 }; +# define POPARGS_5 POPARGS_4 { ADDI_PTR r14, sp, 7 * REGSIZE; LD r4, r13 }; +# define POPARGS_6 POPARGS_5 { ADDI_PTR r13, sp, 8 * REGSIZE; LD r5, r14 }; +# define POPARGS_7 POPARGS_6 { ADDI_PTR r14, sp, 9 * REGSIZE; LD r6, r13 }; + +# define STKSPACE (13 * REGSIZE) + +# ifdef IS_IN_libpthread +# define CENABLE jal __pthread_enable_asynccancel +# define CDISABLE jal __pthread_disable_asynccancel +# elif defined IS_IN_librt +# define CENABLE jal __librt_enable_asynccancel +# define CDISABLE jal __librt_disable_asynccancel +# else +# define CENABLE jal __libc_enable_asynccancel +# define CDISABLE jal __libc_disable_asynccancel +# endif + +# ifndef __ASSEMBLER__ +# define SINGLE_THREAD_P \ + __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ + header.multiple_threads) \ + == 0, 1) +# else +# define SINGLE_THREAD_P(reg) \ + ADDLI_PTR reg, tp, MULTIPLE_THREADS_OFFSET; \ + LD reg, reg; \ + CMPEQI reg, reg, 0 +#endif + +#elif !defined __ASSEMBLER__ + +# define SINGLE_THREAD_P 1 +# define NO_CANCELLATION 1 + +#endif + +#ifndef __ASSEMBLER__ +# define RTLD_SINGLE_THREAD_P \ + __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ + header.multiple_threads) == 0, 1) +#endif diff --git a/sysdeps/unix/sysv/linux/tile/nptl/vfork.S b/sysdeps/unix/sysv/linux/tile/nptl/vfork.S new file mode 100644 index 0000000000..ed581ae864 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/nptl/vfork.S @@ -0,0 +1,81 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#define __ASSEMBLY__ /* for kernel headers */ +#include +#include +#include + +/* Clone the calling process, but without copying the whole address space. + The calling process is suspended until the new process exits or is + replaced by a call to `execve'. Return -1 for errors, 0 to the new process, + and the process ID of the new process to the old process. */ + + .text +ENTRY (__vfork) + { + addli r11, tp, PID_OFFSET /* Point at PID. */ + movei r13, 1 + } + { + LD4U r12, r11 /* Load the saved PID. */ + shli r13, r13, 31 /* Build 0x80000000. */ + } + sub r12, zero, r12 /* Negate it. */ +#ifndef PT_VFORK + CMOVEQZ r12, r12, r13 /* Replace zero pids. */ +#endif + ST4 r11, r12 /* Store the temporary PID. */ + + { + moveli r0, CLONE_VFORK | CLONE_VM | SIGCHLD + move r1, zero + } + { + move r2, zero + move r3, zero + } + moveli TREG_SYSCALL_NR_NAME, __NR_clone + swint1 + + BEQZ r0, 1f /* If we are the parent... */ + { + addli r11, tp, PID_OFFSET /* Point at PID. */ + movei r13, 1 + } + { + LD4U r12, r11 /* Load the saved PID. */ + shli r13, r13, 31 /* Build 0x80000000. */ + } + { + CMPEQ r13, r12, r12 /* Test for that value. */ + sub r12, zero, r12 /* Re-negate it. */ + } +#ifndef PT_VFORK + CMOVNEZ r12, r13, zero /* Replace zero pids. */ +#endif + ST4 r11, r12 /* Restore the PID. */ +1: + BNEZ r1, 0f + jrp lr +PSEUDO_END (__vfork) +libc_hidden_def (__vfork) + +weak_alias (__vfork, vfork) diff --git a/sysdeps/unix/sysv/linux/tile/nptl/waitpid.S b/sysdeps/unix/sysv/linux/tile/nptl/waitpid.S new file mode 100644 index 0000000000..9aa793e12b --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/nptl/waitpid.S @@ -0,0 +1,20 @@ +/* +extern pid_t __waitpid_nocancel (pid_t, int *, int) attribute_hidden; +*/ +#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt + +/* Call __NR_wait4, providing fourth argument (struct rusage *) as NULL. */ +#define PSEUDO_EXTRA move r3, zero; +#include + +PSEUDO (__waitpid, wait4, 3) +ret +PSEUDO_END(__waitpid) + +libc_hidden_def (__waitpid) +weak_alias (__waitpid, waitpid) +libc_hidden_weak (waitpid) +weak_alias (__waitpid, __libc_waitpid) +libc_hidden_weak (__libc_waitpid) + +#endif diff --git a/sysdeps/unix/sysv/linux/tile/profil-counter.h b/sysdeps/unix/sysv/linux/tile/profil-counter.h new file mode 100644 index 0000000000..38cecedcc5 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/profil-counter.h @@ -0,0 +1,27 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include + +static void +profil_counter (int signo, SIGCONTEXT scp) +{ + profil_count ((void *) GET_PC (scp)); +} diff --git a/sysdeps/unix/sysv/linux/tile/set_dataplane.c b/sysdeps/unix/sysv/linux/tile/set_dataplane.c new file mode 100644 index 0000000000..5e82a23357 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/set_dataplane.c @@ -0,0 +1,37 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include +#ifdef __NR_set_dataplane +#include +#endif + +/* Request dataplane modes from the kernel. */ +int +set_dataplane (int flags) +{ +#ifdef __NR_set_dataplane + return INLINE_SYSCALL (set_dataplane, 1, flags); +#else + __set_errno (ENOSYS); + return -1; +#endif +} diff --git a/sysdeps/unix/sysv/linux/tile/setcontext.S b/sysdeps/unix/sysv/linux/tile/setcontext.S new file mode 100644 index 0000000000..6c22bbdac9 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/setcontext.S @@ -0,0 +1,202 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include +#include + +#include "ucontext_i.h" + +/* PL to return to via iret in setcontext */ +#define RETURN_PL 0 + +/* int setcontext (const ucontext_t *ucp) */ + + .text +ENTRY (__setcontext) + FEEDBACK_ENTER(__setcontext) + + /* See if this is a true signal context (flags == 0). + If so, restore by invoking rt_sigreturn(). */ +#if UC_FLAGS_OFFSET != 0 +# error "Add offset to r0 prior to load." +#endif + LD r10, r0 + { + BEQZ r10, .Lsigreturn + addi r10, r10, -1 /* Confirm that it has value "1". */ + } + BNEZ r10, .Lbadcontext + + /* Save lr and r0 briefly on the stack and set the signal mask: + rt_sigprocmask (SIG_SETMASK, &ucp->uc_sigmask, NULL, _NSIG / 8). */ + { + ST sp, lr + ADDI_PTR r11, sp, -(2 * REGSIZE) + move r10, sp + } + cfi_offset (lr, 0) + { + ST r11, r10 + ADDI_PTR r10, sp, -REGSIZE + ADDI_PTR sp, sp, -(3 * REGSIZE) + } + cfi_def_cfa_offset (3 * REGSIZE) + { + ST r10, r0 + ADDLI_PTR r1, r0, UC_SIGMASK_OFFSET + } + cfi_offset (r0, -REGSIZE) + { + movei r3, _NSIG / 8 + movei r2, 0 + } + { + movei r0, SIG_SETMASK + moveli TREG_SYSCALL_NR_NAME, __NR_rt_sigprocmask + } + swint1 + { + ADDI_PTR sp, sp, 3 * REGSIZE + ADDI_PTR r11, sp, 2 * REGSIZE /* Restore uc_context to r11. */ + } + cfi_def_cfa_offset (0) + LD lr, sp + LD r11, r11 + { + ADDI_PTR r10, r11, UC_REG(0) + BNEZ r1, .Lsyscall_error + } + + /* Restore the argument registers; note they will be random + unless makecontext() has been called. */ + { LD r0, r10; ADDI_PTR r10, r10, REGSIZE } + { LD r1, r10; ADDI_PTR r10, r10, REGSIZE } + { LD r2, r10; ADDI_PTR r10, r10, REGSIZE } + { LD r3, r10; ADDI_PTR r10, r10, REGSIZE } + { LD r4, r10; ADDI_PTR r10, r10, REGSIZE } + { LD r5, r10; ADDI_PTR r10, r10, REGSIZE } + { LD r6, r10; ADDI_PTR r10, r10, REGSIZE } + { LD r7, r10; ADDI_PTR r10, r10, REGSIZE } + { LD r8, r10; ADDI_PTR r10, r10, REGSIZE } + { LD r9, r10; ADDLI_PTR r10, r10, UC_REG(30) - UC_REG(9) } + + /* Restore the callee-saved GPRs. */ + { LD r30, r10; ADDI_PTR r10, r10, REGSIZE } + { LD r31, r10; ADDI_PTR r10, r10, REGSIZE } + { LD r32, r10; ADDI_PTR r10, r10, REGSIZE } + { LD r33, r10; ADDI_PTR r10, r10, REGSIZE } + { LD r34, r10; ADDI_PTR r10, r10, REGSIZE } + { LD r35, r10; ADDI_PTR r10, r10, REGSIZE } + { LD r36, r10; ADDI_PTR r10, r10, REGSIZE } + { LD r37, r10; ADDI_PTR r10, r10, REGSIZE } + { LD r38, r10; ADDI_PTR r10, r10, REGSIZE } + { LD r39, r10; ADDI_PTR r10, r10, REGSIZE } + { LD r40, r10; ADDI_PTR r10, r10, REGSIZE } + { LD r41, r10; ADDI_PTR r10, r10, REGSIZE } + { LD r42, r10; ADDI_PTR r10, r10, REGSIZE } + { LD r43, r10; ADDI_PTR r10, r10, REGSIZE } + { LD r44, r10; ADDI_PTR r10, r10, REGSIZE } + { LD r45, r10; ADDI_PTR r10, r10, REGSIZE } + { LD r46, r10; ADDI_PTR r10, r10, REGSIZE } + { LD r47, r10; ADDI_PTR r10, r10, REGSIZE } + { LD r48, r10; ADDI_PTR r10, r10, REGSIZE } + { LD r49, r10; ADDI_PTR r10, r10, REGSIZE } + { LD r50, r10; ADDI_PTR r10, r10, REGSIZE } + { LD r51, r10; ADDI_PTR r10, r10, REGSIZE } + { LD r52, r10; ADDI_PTR r10, r10, REGSIZE * 2 } + /* Skip tp since it must not change for a given thread. */ + { LD sp, r10; ADDI_PTR r10, r10, REGSIZE } + { LD lr, r10; ADDI_PTR r10, r10, REGSIZE } + { LD r11, r10; ADDI_PTR r10, r10, REGSIZE } + + /* Construct an iret context; we set ICS so we can validly load + EX_CONTEXT for iret without being interrupted halfway through. */ + { + LD r12, r10 + movei r13, 1 + } + { + mtspr INTERRUPT_CRITICAL_SECTION, r13 + shli r12, r12, SPR_EX_CONTEXT_0_1__ICS_SHIFT + } + { + mtspr EX_CONTEXT_0_0, r11 + ori r12, r12, RETURN_PL + } + mtspr EX_CONTEXT_0_1, r12 + iret + jrp lr /* keep the backtracer happy */ + +.Lsigreturn: + /* This is a context obtained from a signal handler. + Perform a full restore by pushing the context + passed onto a simulated signal frame on the stack + and call the signal return syscall as if a signal + handler exited normally. */ + { + ADDLI_PTR sp, sp, -(C_ABI_SAVE_AREA_SIZE + SI_MAX_SIZE + UC_SIZE) + ADDLI_PTR r1, sp, -UC_SIZE + } + cfi_def_cfa_offset (C_ABI_SAVE_AREA_SIZE + SI_MAX_SIZE + UC_SIZE) + moveli r2, UC_SIZE / REGSIZE +0: { + LD r10, r0 + ADDI_PTR r0, r0, REGSIZE + } + { + ST r1, r10 + ADDI_PTR r1, r1, REGSIZE + addi r2, r2, -1 + } + BNEZ r2, 0b + moveli TREG_SYSCALL_NR_NAME, __NR_rt_sigreturn + swint1 + + /* Restore the stack and fall through to the error + path. Successful rt_sigreturn never returns to + its calling place. */ + ADDLI_PTR sp, sp, (C_ABI_SAVE_AREA_SIZE + SI_MAX_SIZE + UC_SIZE) + cfi_def_cfa_offset (0) + +.Lsyscall_error: + j SYSCALL_ERROR_NAME + +.Lbadcontext: + { + movei r1, EINVAL + j SYSCALL_ERROR_NAME + } + +END (__setcontext) + +.hidden __setcontext +weak_alias (__setcontext, setcontext) + +ENTRY (__startcontext) + FEEDBACK_ENTER(__startcontext) + BEQZ r30, 1f + { + move r0, r30 + jal __setcontext + } +1: j HIDDEN_JUMPTARGET(exit) +END (__startcontext) +.hidden __startcontext diff --git a/sysdeps/unix/sysv/linux/tile/sigcontextinfo.h b/sysdeps/unix/sysv/linux/tile/sigcontextinfo.h new file mode 100644 index 0000000000..fe700eaff4 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/sigcontextinfo.h @@ -0,0 +1,28 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include + +#define SIGCONTEXT siginfo_t *_si, struct ucontext * +#define SIGCONTEXT_EXTRA_ARGS _si, +#define GET_PC(ctx) ((void *) (long) ctx->uc_mcontext.pc) +#define GET_FRAME(ctx) ((void *) (long) ctx->uc_mcontext.regs[TREG_FP]) +#define GET_STACK(ctx) ((void *) (long) ctx->uc_mcontext.sp) +#define CALL_SIGHANDLER(handler, signo, ctx) \ + (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx)) diff --git a/sysdeps/unix/sysv/linux/tile/swapcontext.S b/sysdeps/unix/sysv/linux/tile/swapcontext.S new file mode 100644 index 0000000000..95d3afa827 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/swapcontext.S @@ -0,0 +1,87 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include + +#include "ucontext_i.h" + +/* int swapcontext (ucontext_t *oucp, const ucontext_t *ucp) */ + + .text +ENTRY (__swapcontext) + FEEDBACK_ENTER(__swapcontext) + /* Set up a frame and save r0 and r1. */ + { + ST sp, lr + ADDI_PTR r11, sp, -(3 * REGSIZE) + move r10, sp + } + cfi_offset (lr, 0) + { + ST r11, r10 + ADDI_PTR r10, sp, -(2 * REGSIZE) + } + { + ST r10, r0 + ADDI_PTR r10, sp, -REGSIZE + ADDI_PTR sp, sp, -(4 * REGSIZE) + } + cfi_def_cfa_offset (4 * REGSIZE) + ST r10, r1 + + /* Save the current context. */ + jal __getcontext + + /* Tear down the frame and restore r0, r1, and lr. */ + { + BNEZ r0, .Lerror + ADDI_PTR r1, sp, 3 * REGSIZE + } + { + LD r1, r1 + ADDI_PTR r0, sp, 2 * REGSIZE + } + { + LD r0, r0 + ADDI_PTR sp, sp, 4 * REGSIZE + } + cfi_def_cfa_offset (0) + { + LD lr, sp + ADDLI_PTR r10, r0, UC_REG(54) + } + + /* Update the stored sp and lr. */ + { + ST r10, sp + ADDLI_PTR r10, r0, UC_REG(55) + } + ST r10, lr + + /* Tail-call setcontext to finish up. */ + { + move r0, r1 + j __setcontext + } + +.Lerror: + jrp lr +END (__swapcontext) + +weak_alias (__swapcontext, swapcontext) diff --git a/sysdeps/unix/sysv/linux/tile/sys/cachectl.h b/sysdeps/unix/sysv/linux/tile/sys/cachectl.h new file mode 100644 index 0000000000..72d9e21381 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/sys/cachectl.h @@ -0,0 +1,37 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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 _SYS_CACHECTL_H +#define _SYS_CACHECTL_H 1 + +#include + +/* Get the kernel definition for the op bits. */ +#include + +__BEGIN_DECLS + +#ifdef __USE_MISC +extern int cacheflush (void *__addr, __const int __nbytes, __const int __op) __THROW; +#endif +extern int _flush_cache (char *__addr, __const int __nbytes, __const int __op) __THROW; + +__END_DECLS + +#endif /* sys/cachectl.h */ diff --git a/sysdeps/unix/sysv/linux/tile/sys/dataplane.h b/sysdeps/unix/sysv/linux/tile/sys/dataplane.h new file mode 100644 index 0000000000..d491affdb1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/sys/dataplane.h @@ -0,0 +1,32 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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 _SYS_DATAPLANE_H +#define _SYS_DATAPLANE_H 1 + +/* Get the kernel definition for the flag bits. */ +#include + +__BEGIN_DECLS + +extern int set_dataplane (int flags); + +__END_DECLS + +#endif /* sys/dataplane.h */ diff --git a/sysdeps/unix/sysv/linux/tile/sys/procfs.h b/sysdeps/unix/sysv/linux/tile/sys/procfs.h new file mode 100644 index 0000000000..585a223dbb --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/sys/procfs.h @@ -0,0 +1,129 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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 _SYS_PROCFS_H +#define _SYS_PROCFS_H 1 + +/* This is somewhat modelled after the file of the same name on SVR4 + systems. It provides a definition of the core file format for ELF + used on Linux. It doesn't have anything to do with the /proc file + system, even though Linux has one. + + Anyway, the whole purpose of this file is for GDB and GDB only. + Don't read too much into it. Don't use it for anything other than + GDB unless you know what you are doing. */ + +#include +#include +#include + +#define __need_int_reg_t +#include + +__BEGIN_DECLS + +/* Type for a general-purpose register. */ +typedef __uint_reg_t elf_greg_t; + +/* And the whole bunch of them. We could have used `struct pt_regs' + from directly in the typedef, but tradition says that + the register set is an array, which does have some peculiar + semantics, so leave it that way. */ +#define ELF_NGREG 64 +#define ELF_NFPREG 0 +typedef elf_greg_t elf_gregset_t[ELF_NGREG]; +typedef elf_greg_t elf_fpregset_t[ELF_NFPREG]; + +/* Signal info. */ +struct elf_siginfo + { + int si_signo; /* Signal number. */ + int si_code; /* Extra code. */ + int si_errno; /* Errno. */ + }; + + +/* Definitions to generate Intel SVR4-like core files. These mostly + have the same names as the SVR4 types with "elf_" tacked on the + front to prevent clashes with Linux definitions, and the typedef + forms have been avoided. This is mostly like the SVR4 structure, + but more Linuxy, with things that Linux does not support and which + GDB doesn't really use excluded. */ + +struct elf_prstatus + { + struct elf_siginfo pr_info; /* Info associated with signal. */ + short int pr_cursig; /* Current signal. */ + unsigned long int pr_sigpend; /* Set of pending signals. */ + unsigned long int pr_sighold; /* Set of held signals. */ + __pid_t pr_pid; + __pid_t pr_ppid; + __pid_t pr_pgrp; + __pid_t pr_sid; + struct timeval pr_utime; /* User time. */ + struct timeval pr_stime; /* System time. */ + struct timeval pr_cutime; /* Cumulative user time. */ + struct timeval pr_cstime; /* Cumulative system time. */ + elf_gregset_t pr_reg; /* GP registers. */ + int pr_fpvalid; /* True if math copro being used. */ + }; + + +#define ELF_PRARGSZ (80) /* Number of chars for args. */ + +struct elf_prpsinfo + { + char pr_state; /* Numeric process state. */ + char pr_sname; /* Char for pr_state. */ + char pr_zomb; /* Zombie. */ + char pr_nice; /* Nice val. */ + unsigned long int pr_flag; /* Flags. */ + unsigned int pr_uid; + unsigned int pr_gid; + int pr_pid, pr_ppid, pr_pgrp, pr_sid; + /* Lots missing */ + char pr_fname[16]; /* Filename of executable. */ + char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ + }; + + +/* The rest of this file provides the types for emulation of the + Solaris interfaces that should be implemented by + users of libthread_db. */ + +/* Addresses. */ +typedef void *psaddr_t; + +/* Register sets. Linux has different names. */ +typedef elf_gregset_t prgregset_t; + +/* Provide dummy declaration here; we don't have FP registers. */ +typedef int prfpregset_t; + +/* We don't have any differences between processes and threads, + therefore have only one PID type. */ +typedef __pid_t lwpid_t; + +/* Process status and info. In the end we do provide typedefs for them. */ +typedef struct elf_prstatus prstatus_t; +typedef struct elf_prpsinfo prpsinfo_t; + +__END_DECLS + +#endif /* sys/procfs.h */ diff --git a/sysdeps/unix/sysv/linux/tile/sys/ptrace.h b/sysdeps/unix/sysv/linux/tile/sys/ptrace.h new file mode 100644 index 0000000000..554171a377 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/sys/ptrace.h @@ -0,0 +1,145 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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 _SYS_PTRACE_H +#define _SYS_PTRACE_H 1 + +#include + +__BEGIN_DECLS + +/* Type of the REQUEST argument to `ptrace.' */ +enum __ptrace_request +{ + /* Indicate that the process making this request should be traced. + All signals received by this process can be intercepted by its + parent, and its parent can use the other `ptrace' requests. */ + PTRACE_TRACEME = 0, +#define PT_TRACE_ME PTRACE_TRACEME + + /* Return the word in the process's text space at address ADDR. */ + PTRACE_PEEKTEXT = 1, +#define PT_READ_I PTRACE_PEEKTEXT + + /* Return the word in the process's data space at address ADDR. */ + PTRACE_PEEKDATA = 2, +#define PT_READ_D PTRACE_PEEKDATA + + /* Return the word in the process's user area at offset ADDR. */ + PTRACE_PEEKUSER = 3, +#define PT_READ_U PTRACE_PEEKUSER + + /* Write the word DATA into the process's text space at address ADDR. */ + PTRACE_POKETEXT = 4, +#define PT_WRITE_I PTRACE_POKETEXT + + /* Write the word DATA into the process's data space at address ADDR. */ + PTRACE_POKEDATA = 5, +#define PT_WRITE_D PTRACE_POKEDATA + + /* Write the word DATA into the process's user area at offset ADDR. */ + PTRACE_POKEUSER = 6, +#define PT_WRITE_U PTRACE_POKEUSER + + /* Continue the process. */ + PTRACE_CONT = 7, +#define PT_CONTINUE PTRACE_CONT + + /* Kill the process. */ + PTRACE_KILL = 8, +#define PT_KILL PTRACE_KILL + + /* Single step the process. */ + PTRACE_SINGLESTEP = 9, +#define PT_STEP PTRACE_SINGLESTEP + + /* Get all general purpose registers used by a processes. */ + PTRACE_GETREGS = 12, +#define PT_GETREGS PTRACE_GETREGS + + /* Set all general purpose registers used by a processes. */ + PTRACE_SETREGS = 13, +#define PT_SETREGS PTRACE_SETREGS + + /* Attach to a process that is already running. */ + PTRACE_ATTACH = 16, +#define PT_ATTACH PTRACE_ATTACH + + /* Detach from a process attached to with PTRACE_ATTACH. */ + PTRACE_DETACH = 17, +#define PT_DETACH PTRACE_DETACH + + /* Continue and stop at the next (return from) syscall. */ + PTRACE_SYSCALL = 24, +#define PT_SYSCALL PTRACE_SYSCALL + + /* Set ptrace filter options. */ + PTRACE_SETOPTIONS = 0x4200, +#define PT_SETOPTIONS PTRACE_SETOPTIONS + + /* Get last ptrace message. */ + PTRACE_GETEVENTMSG = 0x4201, +#define PT_GETEVENTMSG PTRACE_GETEVENTMSG + + /* Get siginfo for process. */ + PTRACE_GETSIGINFO = 0x4202, +#define PT_GETSIGINFO PTRACE_GETSIGINFO + + /* Set new siginfo for process. */ + PTRACE_SETSIGINFO = 0x4203 +#define PT_SETSIGINFO PTRACE_SETSIGINFO +}; + + +/* Options set using PTRACE_SETOPTIONS. */ +enum __ptrace_setoptions { + PTRACE_O_TRACESYSGOOD = 0x00000001, + PTRACE_O_TRACEFORK = 0x00000002, + PTRACE_O_TRACEVFORK = 0x00000004, + PTRACE_O_TRACECLONE = 0x00000008, + PTRACE_O_TRACEEXEC = 0x00000010, + PTRACE_O_TRACEVFORKDONE = 0x00000020, + PTRACE_O_TRACEEXIT = 0x00000040, + PTRACE_O_MASK = 0x0000007f +}; + +/* Wait extended result codes for the above trace options. */ +enum __ptrace_eventcodes { + PTRACE_EVENT_FORK = 1, + PTRACE_EVENT_VFORK = 2, + PTRACE_EVENT_CLONE = 3, + PTRACE_EVENT_EXEC = 4, + PTRACE_EVENT_VFORK_DONE = 5, + PTRACE_EVENT_EXIT = 6 +}; + +/* Perform process tracing functions. REQUEST is one of the values + above, and determines the action to be taken. + For all requests except PTRACE_TRACEME, PID specifies the process to be + traced. + + PID and the other arguments described above for the various requests should + appear (those that are used for the particular request) as: + pid_t PID, void *ADDR, int DATA, void *ADDR2 + after REQUEST. */ +extern long int ptrace (enum __ptrace_request __request, ...) __THROW; + +__END_DECLS + +#endif /* _SYS_PTRACE_H */ diff --git a/sysdeps/unix/sysv/linux/tile/sys/reg.h b/sysdeps/unix/sysv/linux/tile/sys/reg.h new file mode 100644 index 0000000000..1ab17ce82a --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/sys/reg.h @@ -0,0 +1,2 @@ +/* The traditional purpose of "sys/reg.h" is satisfied by "arch/abi.h". */ +#include diff --git a/sysdeps/unix/sysv/linux/tile/sys/ucontext.h b/sysdeps/unix/sysv/linux/tile/sys/ucontext.h new file mode 100644 index 0000000000..530802359b --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/sys/ucontext.h @@ -0,0 +1,71 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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 _SYS_UCONTEXT_H +#define _SYS_UCONTEXT_H 1 + +#include +#include + +/* We need the signal context definitions even if they are not used + included in . */ +#include + +/* Get register type and register names. */ +#include + +/* Type for general register. */ +typedef uint_reg_t greg_t; + +/* Number of general registers. Must agree with . */ +#define NGREG 64 + +/* Container for all general registers. */ +typedef greg_t gregset_t[NGREG]; + +#ifdef __USE_GNU +/* Names for interesting registers in the `gregset_t' array. */ +enum +{ + /* ... r0 through r51 are just 0 through 51 ... */ + REG_FP = TREG_FP, +# define REG_FP REG_FP + REG_TP = TREG_TP, +# define REG_TP REG_TP + REG_SP = TREG_SP, +# define REG_SP REG_SP + REG_LR = TREG_LR, +# define REG_LR REG_LR +}; +#endif + +/* A machine context is exactly a sigcontext. */ +typedef struct sigcontext mcontext_t; + +/* Userlevel context. */ +typedef struct ucontext + { + unsigned long int uc_flags; + struct ucontext *uc_link; + stack_t uc_stack; + mcontext_t uc_mcontext; + __sigset_t uc_sigmask; + } ucontext_t; + +#endif /* sys/ucontext.h */ diff --git a/sysdeps/unix/sysv/linux/tile/sys/user.h b/sysdeps/unix/sysv/linux/tile/sys/user.h new file mode 100644 index 0000000000..c871f1a03d --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/sys/user.h @@ -0,0 +1 @@ +/* This file is not needed, but in practice gdb might try to include it. */ diff --git a/sysdeps/unix/sysv/linux/tile/syscall.S b/sysdeps/unix/sysv/linux/tile/syscall.S new file mode 100644 index 0000000000..d802959185 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/syscall.S @@ -0,0 +1,33 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include + + .text +ENTRY (syscall) + FEEDBACK_ENTER(syscall) + { move TREG_SYSCALL_NR_NAME, r0; move r0, r1 } + { move r1, r2; move r2, r3 } + { move r3, r4; move r4, r5 } + { move r5, r6; move r6, r7 } + swint1 + BNEZ r1, 0f + jrp lr +PSEUDO_END (syscall) diff --git a/sysdeps/unix/sysv/linux/tile/sysdep.c b/sysdeps/unix/sysv/linux/tile/sysdep.c new file mode 100644 index 0000000000..f578e91888 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/sysdep.c @@ -0,0 +1,34 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include + +int __syscall_error (int dummy, int err); +hidden_proto (__syscall_error) + +/* This routine is jumped to by all the syscall handlers, to stash + an error number into errno. */ +int +__syscall_error (int dummy, int err) +{ + __set_errno (err); + return -1; +} +hidden_def (__syscall_error) diff --git a/sysdeps/unix/sysv/linux/tile/sysdep.h b/sysdeps/unix/sysv/linux/tile/sysdep.h new file mode 100644 index 0000000000..cf6763de2c --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/sysdep.h @@ -0,0 +1,224 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include +#include +#include + +#undef SYS_ify +#define SYS_ify(syscall_name) __NR_##syscall_name + + +#ifdef __ASSEMBLER__ + +/* The actual implementation of doing a syscall. */ +#define DO_CALL(syscall_name, args) \ + moveli TREG_SYSCALL_NR_NAME, SYS_ify(syscall_name); \ + swint1 + +/* TILE Linux returns the result in r0 (or a negative errno). + The kernel "owns" the code to decide if a given value is an error, + and puts errno in r1 if so, or otherwise zero. */ +#define PSEUDO(name, syscall_name, args) \ + ENTRY (name); \ + DO_CALL(syscall_name, args); \ + BNEZ r1, 0f + +#define ret jrp lr + +#ifndef PIC +/* For static code, on error jump to __syscall_error directly. */ +# define SYSCALL_ERROR_NAME __syscall_error +#elif !defined NOT_IN_libc || defined IS_IN_libpthread +/* Use the internal name for libc/libpthread shared objects. */ +# define SYSCALL_ERROR_NAME __GI___syscall_error +#else +/* Otherwise, on error do a full PLT jump. */ +# define SYSCALL_ERROR_NAME plt(__syscall_error) +#endif + +#define PSEUDO_END(name) \ +0: \ + j SYSCALL_ERROR_NAME; \ + END (name) + +#define PSEUDO_NOERRNO(name, syscall_name, args) \ + ENTRY (name); \ + DO_CALL(syscall_name, args) + +#define ret_NOERRNO jrp lr + +#define PSEUDO_END_NOERRNO(name) \ + END (name) + +/* Convenience wrappers. */ +#define SYSCALL__(name, args) PSEUDO (__##name, name, args) +#define SYSCALL(name, args) PSEUDO (name, name, args) + +#else /* not __ASSEMBLER__ */ + +#include + +/* Define a macro which expands inline into the wrapper code for a system + call. */ +# undef INLINE_SYSCALL +# define INLINE_SYSCALL(name, nr, args...) \ + ({ \ + INTERNAL_SYSCALL_DECL (err); \ + unsigned long val = INTERNAL_SYSCALL (name, err, nr, args); \ + if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (val, err), 0)) \ + { \ + __set_errno (INTERNAL_SYSCALL_ERRNO (val, err)); \ + val = -1; \ + } \ + (long) val; }) + +#undef INTERNAL_SYSCALL +#define INTERNAL_SYSCALL(name, err, nr, args...) \ + internal_syscall##nr (SYS_ify (name), err, args) + +#undef INTERNAL_SYSCALL_NCS +#define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \ + internal_syscall##nr (number, err, args) + +#undef INTERNAL_SYSCALL_DECL +#define INTERNAL_SYSCALL_DECL(err) int err + +#undef INTERNAL_SYSCALL_ERROR_P +#define INTERNAL_SYSCALL_ERROR_P(val, err) ({ (void) (val); (err) != 0; }) + +#undef INTERNAL_SYSCALL_ERRNO +#define INTERNAL_SYSCALL_ERRNO(val, err) ({ (void) (val); (err); }) + +#define internal_syscall0(num, err, dummy...) \ + ({ \ + long _sys_result, __SYSCALL_CLOBBER_DECLS; \ + __asm__ __volatile__ ( \ + "swint1" \ + : "=R00" (_sys_result), "=R01" (err), __SYSCALL_CLOBBER_OUTPUTS \ + : "R10" (num) \ + : __SYSCALL_CLOBBERS); \ + _sys_result; \ + }) + +#define internal_syscall1(num, err, arg0) \ + ({ \ + long _sys_result, __SYSCALL_CLOBBER_DECLS; \ + __asm__ __volatile__ ( \ + "swint1" \ + : "=R00" (_sys_result), "=R01" (err), __SYSCALL_CLOBBER_OUTPUTS \ + : "R10" (num), "R00" (arg0) \ + : __SYSCALL_CLOBBERS); \ + _sys_result; \ + }) + +#define internal_syscall2(num, err, arg0, arg1) \ + ({ \ + long _sys_result, __SYSCALL_CLOBBER_DECLS; \ + __asm__ __volatile__ ( \ + "swint1" \ + : "=R00" (_sys_result), "=R01" (err), __SYSCALL_CLOBBER_OUTPUTS \ + : "R10" (num), "R00" (arg0), "R01" (arg1) \ + : __SYSCALL_CLOBBERS); \ + _sys_result; \ + }) + +#define internal_syscall3(num, err, arg0, arg1, arg2) \ + ({ \ + long _sys_result, __SYSCALL_CLOBBER_DECLS; \ + __asm__ __volatile__ ( \ + "swint1" \ + : "=R00" (_sys_result), "=R01" (err), __SYSCALL_CLOBBER_OUTPUTS \ + : "R10" (num), "R00" (arg0), "R01" (arg1), "R02" (arg2) \ + : __SYSCALL_CLOBBERS); \ + _sys_result; \ + }) + +#define internal_syscall4(num, err, arg0, arg1, arg2, arg3) \ + ({ \ + long _sys_result, __SYSCALL_CLOBBER_DECLS; \ + __asm__ __volatile__ ( \ + "swint1" \ + : "=R00" (_sys_result), "=R01" (err), __SYSCALL_CLOBBER_OUTPUTS \ + : "R10" (num), "R00" (arg0), "R01" (arg1), "R02" (arg2), \ + "R03" (arg3) \ + : __SYSCALL_CLOBBERS); \ + _sys_result; \ + }) + +#define internal_syscall5(num, err, arg0, arg1, arg2, arg3, arg4) \ + ({ \ + long _sys_result, __SYSCALL_CLOBBER_DECLS; \ + __asm__ __volatile__ ( \ + "swint1" \ + : "=R00" (_sys_result), "=R01" (err), __SYSCALL_CLOBBER_OUTPUTS \ + : "R10" (num), "R00" (arg0), "R01" (arg1), "R02" (arg2), \ + "R03" (arg3), "R04" (arg4) \ + : __SYSCALL_CLOBBERS); \ + _sys_result; \ + }) + +#define internal_syscall6(num, err, arg0, arg1, arg2, arg3, arg4, arg5) \ + ({ \ + long _sys_result, __SYSCALL_CLOBBER_DECLS; \ + __asm__ __volatile__ ( \ + "swint1" \ + : "=R00" (_sys_result), "=R01" (err), __SYSCALL_CLOBBER_OUTPUTS \ + : "R10" (num), "R00" (arg0), "R01" (arg1), "R02" (arg2), \ + "R03" (arg3), "R04" (arg4), "R05" (arg5) \ + : __SYSCALL_CLOBBERS); \ + _sys_result; \ + }) + +#undef __SYSCALL_CLOBBERS +#define __SYSCALL_CLOBBERS \ + "r6", "r7", \ + "r8", "r9", "r11", "r12", "r13", "r14", "r15", \ + "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", \ + "r24", "r25", "r26", "r27", "r28", "r29", "memory" + +/* gcc doesn't seem to allow an input operand to be clobbered, so we + fake it with dummy outputs. */ +#define __SYSCALL_CLOBBER_DECLS \ + _clobber_r2, _clobber_r3, _clobber_r4, _clobber_r5, _clobber_r10 + +#define __SYSCALL_CLOBBER_OUTPUTS \ + "=R02" (_clobber_r2), "=R03" (_clobber_r3), "=R04" (_clobber_r4), \ + "=R05" (_clobber_r5), "=R10" (_clobber_r10) + +#endif /* not __ASSEMBLER__ */ + +/* Pointer mangling support. */ +#if defined NOT_IN_libc && defined IS_IN_rtld +/* We cannot use the thread descriptor because in ld.so we use setjmp + earlier than the descriptor is initialized. */ +#else +# ifdef __ASSEMBLER__ +# define PTR_MANGLE(reg, tmpreg) \ + ADDLI_PTR tmpreg, pt, POINTER_GUARD; \ + LD tmpreg, tmpreg; \ + xor reg, tmpreg, reg +# define PTR_DEMANGLE(reg, tmpreg) PTR_MANGLE (reg, tmpreg) +# else +# define PTR_MANGLE(var) \ + (var) = (__typeof (var)) ((uintptr_t) (var) ^ THREAD_GET_POINTER_GUARD ()) +# define PTR_DEMANGLE(var) PTR_MANGLE (var) +# endif +#endif diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/ioctl.S b/sysdeps/unix/sysv/linux/tile/tilegx/ioctl.S new file mode 100644 index 0000000000..9ccedd4c81 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilegx/ioctl.S @@ -0,0 +1,42 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + + +/* TILE-Gx specifies that "unsigned int" is sign extended in the high + 32 bits. But since the userspace API claims to be "unsigned long", + calls into __ioctl() will not be sign extended, but rather pass all + 64 bits of the argument. Therefore, when we pass the "request" + value to the kernel, we must explicitly sign-extend it to match the + kernel's internal use of "unsigned int" as the second argument, + which we do by casting to "unsigned int". */ + +#include + + .text +ENTRY (__ioctl) + FEEDBACK_ENTER(__ioctl) + { + addxi r1, r1, 0 + moveli TREG_SYSCALL_NR_NAME, __NR_ioctl + } + swint1 + BNEZ r1, 0f + jrp lr +PSEUDO_END (__ioctl) +weak_alias (__ioctl, ioctl) diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/ldconfig.h b/sysdeps/unix/sysv/linux/tile/tilegx/ldconfig.h new file mode 100644 index 0000000000..4610347a53 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilegx/ldconfig.h @@ -0,0 +1,27 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include + +#define SYSDEP_KNOWN_INTERPRETER_NAMES \ + { "/lib/ld.so.1", FLAG_ELF_LIBC6 }, \ + { "/lib32/ld.so.1", FLAG_ELF_LIBC6 }, +#define SYSDEP_KNOWN_LIBRARY_NAMES \ + { "libc.so.6", FLAG_ELF_LIBC6 }, \ + { "libm.so.6", FLAG_ELF_LIBC6 }, diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/register-dump.h b/sysdeps/unix/sysv/linux/tile/tilegx/register-dump.h new file mode 100644 index 0000000000..092c32b8fb --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilegx/register-dump.h @@ -0,0 +1,124 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include +#include + +/* We will print the register dump in this format: + + R0: XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX + R4: XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX + R8: XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX + R12: XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX + R16: XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX + R20: XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX + R24: XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX + R28: XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX + R32: XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX + R36: XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX + R40: XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX + R44: XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX + R48: XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX + R52: XXXXXXXXXXXXXXXX TP: XXXXXXXXXXXXXXXX + SP: XXXXXXXXXXXXXXXX LR: XXXXXXXXXXXXXXXX + + PC: XXXXXXXXXXXXXXXX ICS: X FAULTNUM: XX + + */ + +static void +hexvalue (unsigned long int value, char *buf, size_t len) +{ + char *cp = _itoa_word (value, buf + len, 16, 0); + while (cp > buf) + *--cp = '0'; +} + +static void +register_dump (int fd, mcontext_t *ctx) +{ + char regs[59][16]; + struct iovec iov[132]; + size_t nr = 0; + unsigned int i; + +#define ADD_STRING(str) \ + iov[nr].iov_base = (char *) str; \ + iov[nr].iov_len = strlen (str); \ + ++nr +#define ADD_MEM(str, len) \ + iov[nr].iov_base = str; \ + iov[nr].iov_len = len; \ + ++nr + + /* Generate strings of register contents. */ + for (i = 0; i < 56; ++i) + hexvalue (ctx->gregs[i], regs[i], 16); + hexvalue (ctx->pc, regs[56], 16); + hexvalue (ctx->ics, regs[57], 1); + hexvalue (ctx->faultnum, regs[58], 2); + + /* Generate the output. */ + for (i = 0; i < 56;) + { + const char *prefixes[] = { + "Register dump:\n\n R0: ", + "\n R4: ", + "\n R8: ", + "\n R12: ", + "\n R16: ", + "\n R20: ", + "\n R24: ", + "\n R28: ", + "\n R32: ", + "\n R36: ", + "\n R40: ", + "\n R44: ", + "\n R48: " + }; + ADD_STRING (prefixes[i / 4]); + do + { + ADD_MEM (regs[i], 16); + ADD_STRING (" "); + } + while (++i % 4); + } + ADD_STRING ("\n R52: "); + ADD_MEM (regs[52], 16); + ADD_STRING (" TP: "); + ADD_MEM (regs[53], 16); + ADD_STRING ("\n SP: "); + ADD_MEM (regs[54], 16); + ADD_STRING (" LR: "); + ADD_MEM (regs[55], 16); + ADD_STRING ("\n\n PC: "); + ADD_MEM (regs[56], 16); + ADD_STRING (" ICS: "); + ADD_MEM (regs[57], 1); + ADD_STRING (" FAULTNUM: "); + ADD_MEM (regs[58], 2); + ADD_STRING ("\n"); + + /* Write the stuff out. */ + writev (fd, iov, nr); +} + + +#define REGISTER_DUMP register_dump (fd, &ctx->uc_mcontext) diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/Implies b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/Implies new file mode 100644 index 0000000000..9090d3fb8b --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/Implies @@ -0,0 +1,4 @@ +unix/sysv/linux/tile/tilegx +unix/sysv/linux/tile +unix/sysv/linux/generic/wordsize-32 +unix/sysv/linux/generic diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/Implies b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/Implies new file mode 100644 index 0000000000..e4e0800c0a --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/Implies @@ -0,0 +1,4 @@ +unix/sysv/linux/tile/tilegx +unix/sysv/linux/tile +unix/sysv/linux/generic +unix/sysv/linux/wordsize-64 diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/Implies b/sysdeps/unix/sysv/linux/tile/tilepro/Implies new file mode 100644 index 0000000000..0023bb77aa --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilepro/Implies @@ -0,0 +1,3 @@ +unix/sysv/linux/tile +unix/sysv/linux/generic/wordsize-32 +unix/sysv/linux/generic diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/ldconfig.h b/sysdeps/unix/sysv/linux/tile/tilepro/ldconfig.h new file mode 100644 index 0000000000..5a10db2575 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilepro/ldconfig.h @@ -0,0 +1,26 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +#include + +#define SYSDEP_KNOWN_INTERPRETER_NAMES \ + { "/lib/ld.so.1", FLAG_ELF_LIBC6 }, +#define SYSDEP_KNOWN_LIBRARY_NAMES \ + { "libc.so.6", FLAG_ELF_LIBC6 }, \ + { "libm.so.6", FLAG_ELF_LIBC6 }, diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/register-dump.h b/sysdeps/unix/sysv/linux/tile/tilepro/register-dump.h new file mode 100644 index 0000000000..f559d15032 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilepro/register-dump.h @@ -0,0 +1,112 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + Based on work contributed by Ulrich Drepper , 1998. + + 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. */ + +#include +#include + +/* We will print the register dump in this format: + + R0: XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX + R8: XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX + R16: XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX + R24: XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX + R32: XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX + R40: XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX + R48: XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX + R52: XXXXXXXX TP: XXXXXXXX SP: XXXXXXXX LR: XXXXXXXX + + PC: XXXXXXXX ICS: X FAULTNUM: XX + + */ + +static void +hexvalue (unsigned long int value, char *buf, size_t len) +{ + char *cp = _itoa_word (value, buf + len, 16, 0); + while (cp > buf) + *--cp = '0'; +} + +static void +register_dump (int fd, mcontext_t *ctx) +{ + char regs[59][8]; + struct iovec iov[143]; + size_t nr = 0; + unsigned int i; + +#define ADD_STRING(str) \ + iov[nr].iov_base = (char *) str; \ + iov[nr].iov_len = strlen (str); \ + ++nr +#define ADD_MEM(str, len) \ + iov[nr].iov_base = str; \ + iov[nr].iov_len = len; \ + ++nr + + /* Generate strings of register contents. */ + for (i = 0; i < 56; ++i) + hexvalue (ctx->gregs[i], regs[i], 8); + hexvalue (ctx->pc, regs[56], 8); + hexvalue (ctx->ics, regs[57], 1); + hexvalue (ctx->faultnum, regs[58], 2); + + /* Generate the output. */ + for (i = 0; i < 52;) + { + const char *prefixes[] = { + "Register dump:\n\n R0: ", + "\n R8: ", + "\n R16: ", + "\n R24: ", + "\n R32: ", + "\n R40: ", + "\n R48: " + }; + ADD_STRING (prefixes[i / 8]); + do + { + ADD_MEM (regs[i], 8); + ADD_STRING (" "); + } + while (++i % 8 && i < 52); + } + ADD_STRING ("\n R52: "); + ADD_MEM (regs[52], 8); + ADD_STRING (" TP: "); + ADD_MEM (regs[53], 8); + ADD_STRING (" SP: "); + ADD_MEM (regs[54], 8); + ADD_STRING (" LR: "); + ADD_MEM (regs[55], 8); + ADD_STRING ("\n\n PC: "); + ADD_MEM (regs[56], 8); + ADD_STRING (" ICS: "); + ADD_MEM (regs[57], 1); + ADD_STRING (" FAULTNUM: "); + ADD_MEM (regs[58], 2); + ADD_STRING ("\n"); + + /* Write the stuff out. */ + writev (fd, iov, nr); +} + + +#define REGISTER_DUMP register_dump (fd, &ctx->uc_mcontext) diff --git a/sysdeps/unix/sysv/linux/tile/ucontext_i.h b/sysdeps/unix/sysv/linux/tile/ucontext_i.h new file mode 100644 index 0000000000..f255572ead --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/ucontext_i.h @@ -0,0 +1,42 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +/* Definitions of offsets within the ucontext_t structure. Note + that for convenience we use __SIZEOF_POINTER__ for "long" and + "ssize_t" fields (and their unsigned counterparts) as well. */ + +#define UC_FLAGS_OFFSET 0 +#define UC_LINK_OFFSET (UC_FLAGS_OFFSET + __SIZEOF_POINTER__) +#define UC_STACK_SP_OFFSET (UC_LINK_OFFSET + __SIZEOF_POINTER__) +#define UC_STACK_FLAGS_OFFSET (UC_STACK_SP_OFFSET + __SIZEOF_POINTER__) +#define UC_STACK_SIZE_OFFSET (UC_STACK_FLAGS_OFFSET + __SIZEOF_POINTER__) +#define UC_STACK_MCONTEXT_OFFSET (UC_STACK_SIZE_OFFSET + __SIZEOF_POINTER__) +#define UC_REG(i) (UC_STACK_MCONTEXT_OFFSET + ((i) * REGSIZE)) +#define UC_NREGS 64 +#define UC_SIGMASK_OFFSET UC_REG(UC_NREGS) +#define UC_SIZE (UC_SIGMASK_OFFSET + (_NSIG / 8)) + +/* From */ +#define SI_MAX_SIZE 128 + +/* From */ +#define _NSIG 64 +#define SIG_BLOCK 0 /* for blocking signals */ +#define SIG_UNBLOCK 1 /* for unblocking signals */ +#define SIG_SETMASK 2 /* for setting the signal mask */ From cd27e7cdf2d064438636675c2a34e7b4ba762f5c Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Sun, 4 Dec 2011 11:14:36 -0500 Subject: [PATCH 4147/4487] Remove a backup file that was accidentally committed. --- sysdeps/unix/sysv/linux/tile/bits/mman.h~ | 173 ---------------------- 1 file changed, 173 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/tile/bits/mman.h~ diff --git a/sysdeps/unix/sysv/linux/tile/bits/mman.h~ b/sysdeps/unix/sysv/linux/tile/bits/mman.h~ deleted file mode 100644 index cb010312e7..0000000000 --- a/sysdeps/unix/sysv/linux/tile/bits/mman.h~ +++ /dev/null @@ -1,173 +0,0 @@ -/* Copyright (C) 2011 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Chris Metcalf , 2011. - - 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 _SYS_MMAN_H -# error "Never use directly; include instead." -#endif - -/* The following definitions basically come from the kernel headers. - But the kernel header is not namespace clean. */ - - -/* Protections are chosen from these bits, OR'd together. The - implementation does not necessarily support PROT_EXEC or PROT_WRITE - without PROT_READ. The only guarantees are that no writing will be - allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ - -#define PROT_READ 0x1 /* Page can be read. */ -#define PROT_WRITE 0x2 /* Page can be written. */ -#define PROT_EXEC 0x4 /* Page can be executed. */ -#define PROT_NONE 0x0 /* Page can not be accessed. */ -#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of - growsdown vma (mprotect only). */ -#define PROT_GROWSUP 0x02000000 /* Extend change to start of - growsup vma (mprotect only). */ - -/* Sharing types (must choose one and only one of these). */ -#define MAP_SHARED 0x01 /* Share changes. */ -#define MAP_PRIVATE 0x02 /* Changes are private. */ -#ifdef __USE_MISC -# define MAP_TYPE 0x0f /* Mask for type of mapping. */ -#endif - -/* Other flags. */ -#define MAP_FIXED 0x10 /* Interpret addr exactly. */ -#ifdef __USE_MISC -# define MAP_FILE 0 -# define MAP_ANONYMOUS 0x20 /* Don't use a file. */ -# define MAP_ANON MAP_ANONYMOUS -#endif - -#ifdef __USE_MISC -/* These are Linux-specific. */ -# define MAP_NONBLOCK 0x00080 /* Do not block on IO. */ -# define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */ -# define MAP_STACK MAP_GROWSDOWN /* Provide convenience alias. */ -# define MAP_LOCKED 0x00200 /* Lock the mapping. */ -# define MAP_NORESERVE 0x00400 /* Don't check for reservations. */ -# define MAP_DENYWRITE 0x00800 /* ETXTBSY */ -# define MAP_EXECUTABLE 0x01000 /* Mark it as an executable. */ -# define MAP_POPULATE 0x00040 /* Populate (prefault) pagetables. */ -# define MAP_HUGETLB 0x04000 /* Create huge page mapping. */ -#endif - -/* Specify the "home cache" for the page explicitly. The home cache is - the cache of one particular "home" cpu, which is used as a coherence - point for normal cached operations. Normally the kernel chooses for - you, but you can use the MAP_CACHE_HOME_xxx flags to override. - - User code should not use any symbols with a leading "_" as they are - implementation specific and may change from release to release - without warning. */ - -/* Implementation details; do not use directly. */ -#define _MAP_CACHE_INCOHERENT 0x40000 -#define _MAP_CACHE_HOME 0x80000 -#define _MAP_CACHE_HOME_SHIFT 20 -#define _MAP_CACHE_HOME_MASK 0x3ff -#define _MAP_CACHE_MKHOME(n) \ - (_MAP_CACHE_HOME | (((n) & _MAP_CACHE_HOME_MASK) << _MAP_CACHE_HOME_SHIFT)) - -/* Set the home cache to the specified cpu. */ -#define MAP_CACHE_HOME(n) _MAP_CACHE_MKHOME(n) - -/* Set the home cache to the current cpu. */ -#define _MAP_CACHE_HOME_HERE (_MAP_CACHE_HOME_MASK - 0) -#define MAP_CACHE_HOME_HERE _MAP_CACHE_MKHOME(_MAP_CACHE_HOME_HERE) - -/* Request no on-chip home, i.e. read from memory. Invalid with PROT_WRITE. */ -#define _MAP_CACHE_HOME_NONE (_MAP_CACHE_HOME_MASK - 1) -#define MAP_CACHE_HOME_NONE _MAP_CACHE_MKHOME(_MAP_CACHE_HOME_NONE) - -/* Request no on-chip home, and allow incoherent PROT_WRITE mappings. */ -#define MAP_CACHE_INCOHERENT (_MAP_CACHE_INCOHERENT | MAP_CACHE_HOME_NONE) - -/* Force the system to choose a single home cache, on a cpu of its choice. */ -#define _MAP_CACHE_HOME_SINGLE (_MAP_CACHE_HOME_MASK - 2) -#define MAP_CACHE_HOME_SINGLE _MAP_CACHE_MKHOME(_MAP_CACHE_HOME_SINGLE) - -/* Create a mapping that follows the task when it migrates. */ -#define _MAP_CACHE_HOME_TASK (_MAP_CACHE_HOME_MASK - 3) -#define MAP_CACHE_HOME_TASK _MAP_CACHE_MKHOME(_MAP_CACHE_HOME_TASK) - -/* Create a hash-for-home mapping. */ -#define _MAP_CACHE_HOME_HASH (_MAP_CACHE_HOME_MASK - 4) -#define MAP_CACHE_HOME_HASH _MAP_CACHE_MKHOME(_MAP_CACHE_HOME_HASH) - -/* Specify local caching attributes for the mapping. Normally the kernel - chooses whether to use the local cache, but these flags can be used - to override the kernel. */ - -/* Disable use of local L2 (on tile64, true for any writable mapping). */ -#define MAP_CACHE_NO_L2 0x20000 - -/* Disable use of local L1 (on tile64, ignored; L1 is disabled with L2). */ -#define MAP_CACHE_NO_L1 0x08000 - -/* Convenience alias that should be used for forward compatibility. */ -#define MAP_CACHE_NO_LOCAL (MAP_CACHE_NO_L1 | MAP_CACHE_NO_L2) - -/* Convenience alias for direct-to-RAM mappings. */ -#define MAP_CACHE_NONE (MAP_CACHE_HOME_NONE | MAP_CACHE_NO_LOCAL) - -/* Arrange for this mapping to take priority in the cache. */ -#define MAP_CACHE_PRIORITY 0x02000 - -/* Environment variable that controls hash-for-home in user programs. */ -#define MAP_CACHE_HASH_ENV_VAR "LD_CACHE_HASH" - -/* Flags to `msync'. */ -#define MS_ASYNC 1 /* Sync memory asynchronously. */ -#define MS_SYNC 4 /* Synchronous memory sync. */ -#define MS_INVALIDATE 2 /* Invalidate the caches. */ - -/* Flags for `mlockall'. */ -#define MCL_CURRENT 1 /* Lock all currently mapped pages. */ -#define MCL_FUTURE 2 /* Lock all additions to address - space. */ - -/* Flags for `mremap'. */ -#ifdef __USE_GNU -# define MREMAP_MAYMOVE 1 -# define MREMAP_FIXED 2 -#endif - -/* Advice to `madvise'. */ -#ifdef __USE_BSD -# define MADV_NORMAL 0 /* No further special treatment. */ -# define MADV_RANDOM 1 /* Expect random page references. */ -# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define MADV_WILLNEED 3 /* Will need these pages. */ -# define MADV_DONTNEED 4 /* Don't need these pages. */ -# define MADV_REMOVE 9 /* Remove these pages and resources. */ -# define MADV_DONTFORK 10 /* Do not inherit across fork. */ -# define MADV_DOFORK 11 /* Do inherit across fork. */ -# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */ -# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */ -# define MADV_HWPOISON 100 /* Poison a page for testing. */ -#endif - -/* The POSIX people had to invent similar names for the same things. */ -#ifdef __USE_XOPEN2K -# define POSIX_MADV_NORMAL 0 /* No further special treatment. */ -# define POSIX_MADV_RANDOM 1 /* Expect random page references. */ -# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */ -# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */ -#endif From 4a40b38f6355ac2b1942ac10341eabbd6d3b793b Mon Sep 17 00:00:00 2001 From: Thorsten Glaser Date: Sun, 4 Dec 2011 19:18:08 +0100 Subject: [PATCH 4148/4487] m68k: allow six arguments in syscall function --- ChangeLog.m68k | 4 ++++ sysdeps/unix/sysv/linux/m68k/syscall.S | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 42dcf75db0..bd8631763d 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,7 @@ +2011-12-04 Thorsten Glaser + + * sysdeps/unix/sysv/linux/m68k/syscall.S: Allow six arguments. + 2011-11-01 Andreas Schwab * sysdeps/m68k/stackinfo.h (stackinfo_get_sp, stackinfo_sub_sp): diff --git a/sysdeps/unix/sysv/linux/m68k/syscall.S b/sysdeps/unix/sysv/linux/m68k/syscall.S index 4f2c747c27..d1f5c83ca4 100644 --- a/sysdeps/unix/sysv/linux/m68k/syscall.S +++ b/sysdeps/unix/sysv/linux/m68k/syscall.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1998, 2011 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 @@ -24,9 +24,9 @@ .text ENTRY (syscall) move.l 4(%sp), %d0 /* Load syscall number. */ - _DOARGS_5 (24) /* Frob arguments. */ + _DOARGS_6 (28) /* Frob arguments. */ trap &0 /* Do the system call. */ - UNDOARGS_5 /* Unfrob arguments. */ + UNDOARGS_6 /* Unfrob arguments. */ cmp.l &-4095, %d0 /* Check %d0 for error. */ jcc SYSCALL_ERROR_LABEL /* Jump to error handler if negative. */ rts /* Return to caller. */ From b21cb02fa2595b22c0e3d6535adc5d156fda88ae Mon Sep 17 00:00:00 2001 From: David Alan Gilbert Date: Thu, 8 Dec 2011 15:45:14 +0000 Subject: [PATCH 4149/4487] Add ARMv6t2+ memchr. --- ChangeLog.arm | 7 ++ sysdeps/arm/eabi/armv6t2/memchr.S | 164 ++++++++++++++++++++++++++++++ sysdeps/arm/eabi/armv7/Implies | 2 + sysdeps/arm/preconfigure | 32 ++++++ 4 files changed, 205 insertions(+) create mode 100644 sysdeps/arm/eabi/armv6t2/memchr.S create mode 100644 sysdeps/arm/eabi/armv7/Implies diff --git a/ChangeLog.arm b/ChangeLog.arm index 8c14f08982..b5d7fcbde3 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,10 @@ +2011-12-08 David Alan Gilbert + + * sysdeps/arm/preconfigure: Identify architecture version from + preprocessor defines. + * sysdeps/arm/eabi/armv6t2/memchr.S, + sysdeps/arm/eabi/armv7/Implies: New. + 2011-11-16 Joseph Myers * sysdeps/unix/sysv/linux/arm/ioperm.c (init_iosys): Use "c" and diff --git a/sysdeps/arm/eabi/armv6t2/memchr.S b/sysdeps/arm/eabi/armv6t2/memchr.S new file mode 100644 index 0000000000..a7f5367cd3 --- /dev/null +++ b/sysdeps/arm/eabi/armv6t2/memchr.S @@ -0,0 +1,164 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Code contributed by Dave Gilbert + + 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. */ + +#include + +@ This memchr routine is optimised on a Cortex-A9 and should work on all ARMv7 +@ and ARMv6T2 processors. It has a fast path for short sizes, and has an +@ optimised path for large data sets; the worst case is finding the match early +@ in a large data set. +@ Note: The use of cbz/cbnz means it's Thumb only + +@ 2011-07-15 david.gilbert@linaro.org +@ Copy from Cortex strings release 21 and change license +@ http://bazaar.launchpad.net/~linaro-toolchain-dev/cortex-strings/trunk/view/head:/src/linaro-a9/memchr.S +@ Change function declarations/entry/exit +@ 2011-12-01 david.gilbert@linaro.org +@ Add some fixes from comments received (including use of ldrd instead ldm) +@ 2011-12-07 david.gilbert@linaro.org +@ Removed cbz from align loop - can't be taken + +@ this lets us check a flag in a 00/ff byte easily in either endianness +#ifdef __ARMEB__ +#define CHARTSTMASK(c) 1<<(31-(c*8)) +#else +#define CHARTSTMASK(c) 1<<(c*8) +#endif + .syntax unified + + .text + .thumb + +@ --------------------------------------------------------------------------- + .thumb_func + .global memchr + .type memchr,%function +ENTRY(memchr) + @ r0 = start of memory to scan + @ r1 = character to look for + @ r2 = length + @ returns r0 = pointer to character or NULL if not found + and r1,r1,#0xff @ Don't think we can trust the caller to actually pass a char + + cmp r2,#16 @ If it's short don't bother with anything clever + blt 20f + + tst r0, #7 @ If it's already aligned skip the next bit + beq 10f + + @ Work up to an aligned point +5: + ldrb r3, [r0],#1 + subs r2, r2, #1 + cmp r3, r1 + beq 50f @ If it matches exit found + tst r0, #7 + bne 5b @ If not aligned yet then do next byte + +10: + @ At this point, we are aligned, we know we have at least 8 bytes to work with + push {r4,r5,r6,r7} + cfi_adjust_cfa_offset (16) + cfi_rel_offset (r4, 0) + cfi_rel_offset (r5, 4) + cfi_rel_offset (r6, 8) + cfi_rel_offset (r7, 12) + + cfi_remember_state + + orr r1, r1, r1, lsl #8 @ expand the match word across to all bytes + orr r1, r1, r1, lsl #16 + bic r4, r2, #7 @ Number of double words to work with * 8 + mvns r7, #0 @ all F's + movs r3, #0 + +15: + ldrd r5,r6, [r0],#8 + subs r4, r4, #8 + eor r5,r5, r1 @ Get it so that r5,r6 have 00's where the bytes match the target + eor r6,r6, r1 + uadd8 r5, r5, r7 @ Parallel add 0xff - sets the GE bits for anything that wasn't 0 + sel r5, r3, r7 @ bytes are 00 for none-00 bytes, or ff for 00 bytes - NOTE INVERSION + uadd8 r6, r6, r7 @ Parallel add 0xff - sets the GE bits for anything that wasn't 0 + sel r6, r5, r7 @ chained....bytes are 00 for none-00 bytes, or ff for 00 bytes - NOTE INVERSION + cbnz r6, 60f + bne 15b @ (Flags from the subs above) If not run out of bytes then go around again + + pop {r4,r5,r6,r7} + cfi_adjust_cfa_offset (-16) + cfi_restore (r4) + cfi_restore (r5) + cfi_restore (r6) + cfi_restore (r7) + + and r1,r1,#0xff @ Get r1 back to a single character from the expansion above + and r2,r2,#7 @ Leave the count remaining as the number after the double words have been done + +20: + cbz r2, 40f @ 0 length or hit the end already then not found + +21: @ Post aligned section, or just a short call + ldrb r3,[r0],#1 + subs r2,r2,#1 + eor r3,r3,r1 @ r3 = 0 if match - doesn't break flags from sub + cbz r3, 50f + bne 21b @ on r2 flags + +40: + movs r0,#0 @ not found + DO_RET(lr) + +50: + subs r0,r0,#1 @ found + DO_RET(lr) + +60: @ We're here because the fast path found a hit - now we have to track down exactly which word it was + @ r0 points to the start of the double word after the one that was tested + @ r5 has the 00/ff pattern for the first word, r6 has the chained value + cfi_restore_state + cmp r5, #0 + itte eq + moveq r5, r6 @ the end is in the 2nd word + subeq r0,r0,#3 @ Points to 2nd byte of 2nd word + subne r0,r0,#7 @ or 2nd byte of 1st word + + @ r0 currently points to the 2nd byte of the word containing the hit + tst r5, # CHARTSTMASK(0) @ 1st character + bne 61f + adds r0,r0,#1 + tst r5, # CHARTSTMASK(1) @ 2nd character + ittt eq + addeq r0,r0,#1 + tsteq r5, # (3<<15) @ 2nd & 3rd character + @ If not the 3rd must be the last one + addeq r0,r0,#1 + +61: + pop {r4,r5,r6,r7} + cfi_adjust_cfa_offset (-16) + cfi_restore (r4) + cfi_restore (r5) + cfi_restore (r6) + cfi_restore (r7) + + subs r0,r0,#1 + DO_RET(lr) + +END(memchr) +libc_hidden_builtin_def (memchr) diff --git a/sysdeps/arm/eabi/armv7/Implies b/sysdeps/arm/eabi/armv7/Implies new file mode 100644 index 0000000000..8a784407f7 --- /dev/null +++ b/sysdeps/arm/eabi/armv7/Implies @@ -0,0 +1,2 @@ +# We can do everything that 6T2 can +arm/eabi/armv6t2 diff --git a/sysdeps/arm/preconfigure b/sysdeps/arm/preconfigure index e7693d4e7d..276661dab1 100644 --- a/sysdeps/arm/preconfigure +++ b/sysdeps/arm/preconfigure @@ -3,6 +3,38 @@ arm*) base_machine=arm case $config_os in linux-gnueabi*) + # Lets ask the compiler which ARM family we've got + # Unfortunately it doesn't define any flags for implementations + # that you might pass to -mcpu or -mtune + # Note if you add patterns here you must ensure that + # an appropriate directory exists in sysdeps/arm/eabi + archcppflag=`echo "" | + $CC $CFLAGS $CPPFLAGS -E -dM - | + grep __ARM_ARCH | + sed -e 's/^#define //' -e 's/ .*//'` + + case x$archcppflag in + x__ARM_ARCH_[89]*__) + machine=armv7 + echo "Found compiler is configured for something newer than v7 - using v7" + ;; + + x__ARM_ARCH_7A__) + machine=armv7 + echo "Found compiler is configured for $machine" + ;; + + x__ARM_ARCH_6T2__) + machine=armv6t2 + echo "Found compiler is configured for $machine" + ;; + + *) + machine=arm + echo 2>&1 "arm/preconfigure: Did not find ARM architecture type; using default" + ;; + esac + machine=arm/eabi/$machine if [ "${CFLAGS+set}" != "set" ]; then CFLAGS="-g -O2" From 4a93ed423ae14e06ccfa584e99e0dc7b2fa0514d Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Fri, 9 Dec 2011 10:47:35 -0500 Subject: [PATCH 4150/4487] linux-generic: add and . Just like the other architectures, we need to avoid adding the padding fields for the time_t fields in shmid_ds and msqid_ds. The linux-generic versions are exactly like the x86_64 versions, except I added a missing #include in . --- ChangeLog.linux-generic | 5 + sysdeps/unix/sysv/linux/generic/bits/msq.h | 84 ++++++++++++++++ sysdeps/unix/sysv/linux/generic/bits/shm.h | 112 +++++++++++++++++++++ 3 files changed, 201 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/generic/bits/msq.h create mode 100644 sysdeps/unix/sysv/linux/generic/bits/shm.h diff --git a/ChangeLog.linux-generic b/ChangeLog.linux-generic index 30ca51d6ac..4a0b9084c5 100644 --- a/ChangeLog.linux-generic +++ b/ChangeLog.linux-generic @@ -1,3 +1,8 @@ +2011-12-09 Chris Metcalf + + * sysdeps/unix/sysv/linux/generic/bits/msq.h: New file. + * sysdeps/unix/sysv/linux/generic/bits/shm.h: New file. + 2011-12-03 Chris Metcalf * sysdeps/unix/sysv/linux/generic/Makefile: New file. diff --git a/sysdeps/unix/sysv/linux/generic/bits/msq.h b/sysdeps/unix/sysv/linux/generic/bits/msq.h new file mode 100644 index 0000000000..351af358f7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/bits/msq.h @@ -0,0 +1,84 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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 _SYS_MSG_H +# error "Never use directly; include instead." +#endif + +#include +#include + +/* Define options for message queue functions. */ +#define MSG_NOERROR 010000 /* no error if message is too big */ +#ifdef __USE_GNU +# define MSG_EXCEPT 020000 /* recv any msg except of specified type */ +#endif + +/* Types used in the structure definition. */ +typedef unsigned long int msgqnum_t; +typedef unsigned long int msglen_t; + +/* Structure of record for one message inside the kernel. + The type `struct msg' is opaque. */ +struct msqid_ds +{ + struct ipc_perm msg_perm; /* structure describing operation permission */ + __time_t msg_stime; /* time of last msgsnd command */ +#if __WORDSIZE == 32 + unsigned long int __unused1; +#endif + __time_t msg_rtime; /* time of last msgrcv command */ +#if __WORDSIZE == 32 + unsigned long int __unused2; +#endif + __time_t msg_ctime; /* time of last change */ +#if __WORDSIZE == 32 + unsigned long int __unused3; +#endif + unsigned long int __msg_cbytes; /* current number of bytes on queue */ + msgqnum_t msg_qnum; /* number of messages currently on queue */ + 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 __unused4; + unsigned long int __unused5; +}; + +#ifdef __USE_MISC + +# define msg_cbytes __msg_cbytes + +/* ipcs ctl commands */ +# define MSG_STAT 11 +# define MSG_INFO 12 + +/* buffer for msgctl calls IPC_INFO, MSG_INFO */ +struct msginfo + { + int msgpool; + int msgmap; + int msgmax; + int msgmnb; + int msgmni; + int msgssz; + int msgtql; + unsigned short int msgseg; + }; + +#endif /* __USE_MISC */ diff --git a/sysdeps/unix/sysv/linux/generic/bits/shm.h b/sysdeps/unix/sysv/linux/generic/bits/shm.h new file mode 100644 index 0000000000..8aec5fc2db --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/bits/shm.h @@ -0,0 +1,112 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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 _SYS_SHM_H +# error "Never include directly; use instead." +#endif + +#include +#include + +/* Permission flag for shmget. */ +#define SHM_R 0400 /* or S_IRUGO from */ +#define SHM_W 0200 /* or S_IWUGO from */ + +/* Flags for `shmat'. */ +#define SHM_RDONLY 010000 /* attach read-only else read-write */ +#define SHM_RND 020000 /* round attach address to SHMLBA */ +#define SHM_REMAP 040000 /* take-over region on attach */ +#define SHM_EXEC 0100000 /* execution access */ + +/* Commands for `shmctl'. */ +#define SHM_LOCK 11 /* lock segment (root only) */ +#define SHM_UNLOCK 12 /* unlock segment (root only) */ + +__BEGIN_DECLS + +/* Segment low boundary address multiple. */ +#define SHMLBA (__getpagesize ()) +extern int __getpagesize (void) __THROW __attribute__ ((__const__)); + + +/* Type to count number of attaches. */ +typedef unsigned long int shmatt_t; + +/* Data structure describing a shared memory segment. */ +struct shmid_ds + { + struct ipc_perm shm_perm; /* operation permission struct */ + size_t shm_segsz; /* size of segment in bytes */ + __time_t shm_atime; /* time of last shmat() */ +#if __WORDSIZE == 32 + unsigned long int __unused1; +#endif + __time_t shm_dtime; /* time of last shmdt() */ +#if __WORDSIZE == 32 + unsigned long int __unused2; +#endif + __time_t shm_ctime; /* time of last change by shmctl() */ +#if __WORDSIZE == 32 + unsigned long int __unused3; +#endif + __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 __unused4; + unsigned long int __unused5; + }; + +#ifdef __USE_MISC + +/* ipcs ctl commands */ +# define SHM_STAT 13 +# define SHM_INFO 14 + +/* shm_mode upper byte flags */ +# define SHM_DEST 01000 /* segment will be destroyed on last detach */ +# define SHM_LOCKED 02000 /* segment will not be swapped */ +# define SHM_HUGETLB 04000 /* segment is mapped via hugetlb */ +# define SHM_NORESERVE 010000 /* don't check for reservations */ + +struct shminfo + { + unsigned long int shmmax; + unsigned long int shmmin; + unsigned long int shmmni; + unsigned long int shmseg; + unsigned long int shmall; + unsigned long int __unused1; + unsigned long int __unused2; + unsigned long int __unused3; + unsigned long int __unused4; + }; + +struct shm_info + { + int used_ids; + unsigned long int shm_tot; /* total allocated shm */ + unsigned long int shm_rss; /* total resident shm */ + unsigned long int shm_swp; /* total swapped shm */ + unsigned long int swap_attempts; + unsigned long int swap_successes; + }; + +#endif /* __USE_MISC */ + +__END_DECLS From d92b0dd4edf2b61d429c8db1cbe9a42d6f17dd6a Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 19 Dec 2011 22:08:23 +0000 Subject: [PATCH 4151/4487] Use sysdeps path to locate sys/syscall.h in MIPS bits/syscall.h rule. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/Makefile | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index abfc2b4479..9d79aea6db 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2011-12-19 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/Makefile ($(objpfx)syscall-%.h + $(objpfx)syscall-%.d): Use sysdeps path to locate sys/syscall.h. + 2011-11-17 Joseph Myers * sysdeps/unix/sysv/linux/mips/mips64/n64/ftw.c, diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile index 162f1b93d4..cff3484431 100644 --- a/sysdeps/unix/sysv/linux/mips/Makefile +++ b/sysdeps/unix/sysv/linux/mips/Makefile @@ -72,7 +72,7 @@ mips_list_syscalls = $(filter-out -m%,$(CC)) -E -x c $(+includes) \ # Here, __NR_N32_open and __NR_O32_open are used to detect case (2) # over case (3). The n64 SYS_* macros can always use the normal # ABI-less names. -$(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/mips/sys/syscall.h +$(objpfx)syscall-%.h $(objpfx)syscall-%.d: $(firstword $(wildcard $(sysdirs:=/sys/syscall.h))) $(make-target-directory) $(CC) -E -x c $(+includes) $(sysincludes) -D_LIBC $< -MD -MP \ -MF $(@:.h=.d)-t -MT '$(@:.d=.h) $(@:.h=.d)' > /dev/null From c1e30fd8bffd53aa9849fe410ca8a4204c91f836 Mon Sep 17 00:00:00 2001 From: Peter Green Date: Tue, 20 Dec 2011 16:02:29 +0000 Subject: [PATCH 4152/4487] Reduce ARM sys/ucontext.h namespace polution. --- ChangeLog.arm | 24 ++++++ sysdeps/unix/sysv/linux/arm/sys/ucontext.h | 88 +++++++++++++--------- 2 files changed, 76 insertions(+), 36 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index b5d7fcbde3..9108624c12 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,27 @@ +2011-12-20 Peter Green + + * sysdeps/unix/sysv/linux/arm/sys/ucontext.h: Don't include + . + (gregset_t): Define without using elf_gregset_t. + (R0): Rename to REG_R0. + (R1): Rename to REG_R1. + (R2): Rename to REG_R2. + (R3): Rename to REG_R3. + (R4): Rename to REG_R4. + (R5): Rename to REG_R5. + (R6): Rename to REG_R6. + (R7): Rename to REG_R7. + (R8): Rename to REG_R8. + (R9): Rename to REG_R9. + (R10): Rename to REG_R10. + (R11): Rename to REG_R11. + (R12): Rename to REG_R12. + (R13): Rename to REG_R13. + (R14): Rename to REG_R14. + (R15): Rename to REG_R15. + (struct _libc_fpstate): New. + (fpregset_t): Define using struct _libc_fpstate. + 2011-12-08 David Alan Gilbert * sysdeps/arm/preconfigure: Identify architecture version from diff --git a/sysdeps/unix/sysv/linux/arm/sys/ucontext.h b/sysdeps/unix/sysv/linux/arm/sys/ucontext.h index 9ecff7b595..58f438cf43 100644 --- a/sysdeps/unix/sysv/linux/arm/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/arm/sys/ucontext.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999, 2001, 2006 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999, 2001, 2006, 2011 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,6 @@ #include #include -#include /* We need the signal context definitions even if they are not used included in . */ @@ -35,47 +34,64 @@ typedef int greg_t; #define NGREG 18 /* Container for all general registers. */ -typedef elf_gregset_t gregset_t; +typedef greg_t gregset_t[NGREG]; /* Number of each register is the `gregset_t' array. */ enum { - R0 = 0, -#define R0 R0 - R1 = 1, -#define R1 R1 - R2 = 2, -#define R2 R2 - R3 = 3, -#define R3 R3 - R4 = 4, -#define R4 R4 - R5 = 5, -#define R5 R5 - R6 = 6, -#define R6 R6 - R7 = 7, -#define R7 R7 - R8 = 8, -#define R8 R8 - R9 = 9, -#define R9 R9 - R10 = 10, -#define R10 R10 - R11 = 11, -#define R11 R11 - R12 = 12, -#define R12 R12 - R13 = 13, -#define R13 R13 - R14 = 14, -#define R14 R14 - R15 = 15 -#define R15 R15 + REG_R0 = 0, +#define REG_R0 REG_R0 + REG_R1 = 1, +#define REG_R1 REG_R1 + REG_R2 = 2, +#define REG_R2 REG_R2 + REG_R3 = 3, +#define REG_R3 REG_R3 + REG_R4 = 4, +#define REG_R4 REG_R4 + REG_R5 = 5, +#define REG_R5 REG_R5 + REG_R6 = 6, +#define REG_R6 REG_R6 + REG_R7 = 7, +#define REG_R7 REG_R7 + REG_R8 = 8, +#define REG_R8 REG_R8 + REG_R9 = 9, +#define REG_R9 REG_R9 + REG_R10 = 10, +#define REG_R10 REG_R10 + REG_R11 = 11, +#define REG_R11 REG_R11 + REG_R12 = 12, +#define REG_R12 REG_R12 + REG_R13 = 13, +#define REG_R13 REG_R13 + REG_R14 = 14, +#define REG_R14 REG_R14 + REG_R15 = 15 +#define REG_R15 REG_R15 }; +struct _libc_fpstate +{ + struct + { + unsigned int sign1:1; + unsigned int unused:15; + unsigned int sign2:1; + unsigned int exponent:14; + unsigned int j:1; + unsigned int mantissa1:31; + unsigned int mantissa0:32; + } fpregs[8]; + unsigned int fpsr:32; + unsigned int fpcr:32; + unsigned char ftype[8]; + unsigned int init_flag; +}; /* Structure to describe FPU registers. */ -typedef elf_fpregset_t fpregset_t; +typedef struct _libc_fpstate fpregset_t; /* Context to describe whole processor state. This only describes the core registers; coprocessor registers get saved elsewhere From c2aeee16c8cf480b15f1cc4ca92e80797e940dfa Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 22 Dec 2011 13:05:21 +0000 Subject: [PATCH 4153/4487] Define EPOLLONESHOT and EPOLLET using unsigned values for MIPS. --- ChangeLog.mips | 6 ++++++ sysdeps/unix/sysv/linux/mips/sys/epoll.h | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 9d79aea6db..2779bed104 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,9 @@ +2011-12-22 Joseph Myers + + [BZ #13538] + * sysdeps/unix/sysv/linux/mips/sys/epoll.h (EPOLLONESHOT) + (EPOLLET): Initialize with unsigned values. + 2011-12-19 Joseph Myers * sysdeps/unix/sysv/linux/mips/Makefile ($(objpfx)syscall-%.h diff --git a/sysdeps/unix/sysv/linux/mips/sys/epoll.h b/sysdeps/unix/sysv/linux/mips/sys/epoll.h index 6d2ec8edf0..51a657a5b5 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/epoll.h +++ b/sysdeps/unix/sysv/linux/mips/sys/epoll.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2006, 2007, 2008 Free Software Foundation, Inc. +/* Copyright (C) 2002-2006, 2007, 2008, 2011 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 @@ -65,9 +65,9 @@ enum EPOLL_EVENTS #define EPOLLHUP EPOLLHUP EPOLLRDHUP = 0x2000, #define EPOLLRDHUP EPOLLRDHUP - EPOLLONESHOT = (1 << 30), + EPOLLONESHOT = 1u << 30, #define EPOLLONESHOT EPOLLONESHOT - EPOLLET = (1 << 31) + EPOLLET = 1u << 31 #define EPOLLET EPOLLET }; From 25bb26d0e80e25d9612bac0c7307122e6b4c4201 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 22 Dec 2011 18:30:43 +0000 Subject: [PATCH 4154/4487] Fix bits/syscall.h generation for MIPS using generic code. --- ChangeLog.mips | 14 +++ sysdeps/unix/sysv/linux/mips/Makefile | 126 ++------------------- sysdeps/unix/sysv/linux/mips/configure | 76 ------------- sysdeps/unix/sysv/linux/mips/configure.in | 75 ------------ sysdeps/unix/sysv/linux/mips/sys/syscall.h | 42 ------- 5 files changed, 22 insertions(+), 311 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/mips/sys/syscall.h diff --git a/ChangeLog.mips b/ChangeLog.mips index 2779bed104..8e60fb276a 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,17 @@ +2011-12-22 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/Makefile (no_syscall_list_h) + (mips_list_syscalls, $(objpfx)syscall-%.h $(objpfx)syscall-%.d): + Remove. + (syscall-list-variants, syscall-list-includes) + (syscall-list-o32-options, syscall-list-o32-condition) + (syscall-list-n32-options, syscall-list-n32-condition) + (syscall-list-n64-options, syscall-list-n64-condition): Define. + * sysdeps/unix/sysv/linux/mips/configure.in: Don't generate + asm-unistd.h. + * sysdeps/unix/sysv/linux/mips/configure: Regenerate. + * sysdeps/unix/sysv/linux/mips/sys/syscall.h: Remove. + 2011-12-22 Joseph Myers [BZ #13538] diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile index cff3484431..41e92581a7 100644 --- a/sysdeps/unix/sysv/linux/mips/Makefile +++ b/sysdeps/unix/sysv/linux/mips/Makefile @@ -7,124 +7,14 @@ sysdep_routines += cachectl cacheflush sysmips _test_and_set sysdep_headers += sys/cachectl.h sys/sysmips.h sys/tas.h -no_syscall_list_h = 1 - -# A callable macro that expands to a shell command. Preprocess file $(1) -# using ABI option $(2) and see which macros it defines. Print FOO for each -# macro of the form __NR$(3)_FOO, filtering out ABI-specific __NR macros -# that have a prefix other than $(3). -mips_list_syscalls = $(filter-out -m%,$(CC)) -E -x c $(+includes) \ - $(sysincludes) -D_LIBC -dM -mabi=$(2) $(1) | \ - sed -n 's@^\#define __NR$(3)_\([^ ]*\) .*@\1@p' | \ - sed -e '/^[ON]32_/d' -e '/^N64_/d' -e '/^64_/d' | \ - LC_ALL=C sort - -# Generate a list of SYS_* macros from the linux __NR macros. -# -# Before version 2.6, linux had separate 32-bit and 64-bit MIPS ports, -# each with its own set of headers. The ports were merged for 2.6 and -# this merged port defines the syscalls in a slightly different way. -# There are therefore three sets of headers that we need to consider: -# -# (1) Headers from the separate 32-bit MIPS port. They just define -# a single list of __NR macros. -# -# (2) Headers from the separate 64-bit MIPS port. They unconditionally -# define syscalls for all three ABIs, with o32 syscalls prefixed -# by __NR_O32, n32 syscalls prefixed by __NR_N32 and n64 syscalls -# prefixed by plain __NR. -# -# (3) Headers from the combined port. They use the _MIPS_SIM macro to -# define the right set of syscalls for the current ABI. The syscalls -# themselves have no special ABI prefix, but the headers also define: -# -# __NR_O32_Linux{,_syscalls} -# __NR_N32_Linux{,_syscalls} -# __NR_64_Linux{,_syscalls} -# -# In case (1) we just want a simple list of SYS_* macros. In cases (2) -# and (3) we want a file that will work for all three ABIs, regardless -# of which ABI we are currently using. We also want the file to work -# if the user later moves from (2) to (3). Thus the file we create -# for (2) and (3) has the form: -# -# #if _MIPS_SIM == _ABIN32 -# # ifdef __NR_N32_open -# # define SYS_n32syscall1 __NR_N32_n32syscall1 -# # ... -# # else -# # define SYS_n32syscall1 __NR_n32syscall1 -# # ... -# # endif -# #elif _MIPS_SIM == _ABI64 -# # define SYS_n64syscall1 __NR_n64syscall1 -# # ... -# #else -# # ifdef __NR_O32_open -# # define SYS_o32syscall1 __NR_O32_o32syscall1 -# # ... -# # else -# # define SYS_o32syscall1 __NR_o32syscall1 -# # ... -# # endif -# #endif -# -# Here, __NR_N32_open and __NR_O32_open are used to detect case (2) -# over case (3). The n64 SYS_* macros can always use the normal -# ABI-less names. -$(objpfx)syscall-%.h $(objpfx)syscall-%.d: $(firstword $(wildcard $(sysdirs:=/sys/syscall.h))) - $(make-target-directory) - $(CC) -E -x c $(+includes) $(sysincludes) -D_LIBC $< -MD -MP \ - -MF $(@:.h=.d)-t -MT '$(@:.d=.h) $(@:.h=.d)' > /dev/null - { \ - echo '/* Generated at libc build time from kernel syscall list. */';\ - echo ''; \ - echo '#ifndef _SYSCALL_H'; \ - echo '# error "Never use directly; include instead."'; \ - echo '#endif'; \ - echo ''; \ - echo '#include '; \ - rm -f $(@:.d=.h).new32 $(@:.d=.h).newn32 $(@:.d=.h).new64; \ - $(call mips_list_syscalls,$<,n32,_N32) > $(@:.d=.h).newn32; \ - if test -s $(@:.d=.h).newn32; then \ - if grep open $(@:.d=.h).newn32 > /dev/null; then \ - $(call mips_list_syscalls,$<,32,_O32) > $(@:.d=.h).new32; \ - $(call mips_list_syscalls,$<,64,) > $(@:.d=.h).new64; \ - else \ - $(call mips_list_syscalls,$<,32,) > $(@:.d=.h).new32; \ - $(call mips_list_syscalls,$<,n32,) > $(@:.d=.h).newn32; \ - $(call mips_list_syscalls,$<,64,) > $(@:.d=.h).new64; \ - fi; \ - echo '#if _MIPS_SIM == _ABIN32'; \ - echo '# ifdef __NR_N32_open'; \ - sed 's@\(.*\)@# define SYS_\1 __NR_N32_\1@' < $(@:.d=.h).newn32; \ - echo '# else'; \ - sed 's@\(.*\)@# define SYS_\1 __NR_\1@' < $(@:.d=.h).newn32; \ - echo '# endif'; \ - echo '#elif _MIPS_SIM == _ABI64'; \ - sed 's@\(.*\)@# define SYS_\1 __NR_\1@' < $(@:.d=.h).new64; \ - echo '#else'; \ - echo '# ifdef __NR_O32_open'; \ - sed 's@\(.*\)@# define SYS_\1 __NR_O32_\1@' < $(@:.d=.h).new32; \ - echo '# else'; \ - sed 's@\(.*\)@# define SYS_\1 __NR_\1@' < $(@:.d=.h).new32; \ - echo '# endif'; \ - echo '#endif'; \ - else \ - $(CC) -E -x c $(+includes) $(sysincludes) -D_LIBC -dM $< | \ - sed -n 's@^\#define __NR_\([^ ]*\) .*@\#define SYS_\1 __NR_\1@p' | \ - LC_ALL=C sort; \ - fi; \ - rm -f $(@:.d=.h).new32 $(@:.d=.h).newn32 $(@:.d=.h).new64; \ - } > $(@:.d=.h).new - mv -f $(@:.d=.h).new $(@:.d=.h) -ifneq (,$(objpfx)) - sed $(sed-remove-objpfx) $(@:.h=.d)-t > $(@:.h=.d)-t2 - rm -f $(@:.h=.d)-t - mv -f $(@:.h=.d)-t2 $(@:.h=.d) -else - mv -f $(@:.h=.d)-t $(@:.h=.d) -endif +syscall-list-variants := o32 n32 n64 +syscall-list-includes := sgidefs.h +syscall-list-o32-options := -mabi=32 +syscall-list-o32-condition := _MIPS_SIM == _MIPS_SIM_ABI32 +syscall-list-n32-options := -mabi=n32 +syscall-list-n32-condition := _MIPS_SIM == _MIPS_SIM_ABIN32 +syscall-list-n64-options := -mabi=64 +syscall-list-n64-condition := _MIPS_SIM == _MIPS_SIM_ABI64 endif ifeq ($(subdir),elf) diff --git a/sysdeps/unix/sysv/linux/mips/configure b/sysdeps/unix/sysv/linux/mips/configure index 2233f6f1f5..d8f1304484 100644 --- a/sysdeps/unix/sysv/linux/mips/configure +++ b/sysdeps/unix/sysv/linux/mips/configure @@ -1,82 +1,6 @@ # This file is generated from configure.in by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/unix/sysv/linux/mips. -case $machine in -mips*64*) - rm -f asm-unistd.h - asm_unistd_h=$sysheaders/asm/unistd.h - if test ! -f $asm_unistd_h; then - # Try to find asm/unistd.h in compiler header search path. - try_asm_unistd_h=`echo '#include ' | $CPP - | - sed -n '/^# 1 "\(\/[^"]*\)".*/{s,,\1,p;q;}'` - if test -n "$try_asm_unistd_h" && - test -f "$try_asm_unistd_h"; then - asm_unistd_h=$try_asm_unistd_h - fi - fi - if test ! -f "$asm_unistd_h"; then - { echo "$as_me:$LINENO: WARNING: *** asm/unistd.h not found, it will not be pre-processed" >&5 -echo "$as_me: WARNING: *** asm/unistd.h not found, it will not be pre-processed" >&2;} - echo '#include ' > asm-unistd.h - elif grep __NR_N32_open "$asm_unistd_h" > /dev/null; then - # The point of this preprocessing is to turn __NR_ into - # __NR_N64_, as well as to define __NR_ to - # __NR__, if __NR__ is defined - # and is the compiler-enabled ABI. - cat "$asm_unistd_h" | - sed -e 's,__NR_,__NR_N64_,g' \ - -e 's,__NR_N64_##,__NR_##,g' \ - -e 's,__NR_N64_O32_,__NR_O32_,g' \ - -e 's,__NR_N64_N32_,__NR_N32_,g' \ - -e 's,__NR_N64_N64_,__NR_N64_,g' \ - | awk > asm-unistd.h ' -BEGIN { print "#include "; } -/^#define __NR.*unused/ { print; next; } -/^#define __NR_N64__exit __NR_N64_exit/ { - print "#define __NR__exit __NR_exit"; - print "#define __NR_O32__exit __NR_O32_exit"; - print "#define __NR_N32__exit __NR_N32_exit"; - print; next; -} -/^#define __NR_O32_/ { - name = $2; - sub (/_O32_/, "_", name); - print; - print "#if _MIPS_SIM == _ABIO32"; - print "# define " name " " $2; - print "#endif"; - next; -} -/^#define __NR_N32_/ { - name = $2; - sub (/_N32_/, "_", name); - print; - print "#if _MIPS_SIM == _ABIN32"; - print "# define " name " " $2; - print "#endif"; - next; -} -/^#define __NR_N64_/ { - name = $2; - sub (/_N64_/, "_", name); - print; - print "#if _MIPS_SIM == _ABI64"; - print "# define " name " " $2; - print "#endif"; - next; -} -{ - print; -}' - else - echo '#include ' > asm-unistd.h - fi ;; -mips*) - rm -f asm-unistd.h - echo '#include ' > asm-unistd.h - ;; -esac - case "$prefix" in /usr | /usr/) # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib. diff --git a/sysdeps/unix/sysv/linux/mips/configure.in b/sysdeps/unix/sysv/linux/mips/configure.in index c2e66ede82..4871382100 100644 --- a/sysdeps/unix/sysv/linux/mips/configure.in +++ b/sysdeps/unix/sysv/linux/mips/configure.in @@ -2,81 +2,6 @@ sinclude(./aclocal.m4)dnl Autoconf lossage GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. # Local configure fragment for sysdeps/unix/sysv/linux/mips. -case $machine in -mips*64*) - rm -f asm-unistd.h - asm_unistd_h=$sysheaders/asm/unistd.h - if test ! -f $asm_unistd_h; then - # Try to find asm/unistd.h in compiler header search path. - try_asm_unistd_h=`echo '#include ' | $CPP - | - sed -n '/^# 1 "\(\/[^"]*\)".*/{s,,\1,p;q;}'` - if test -n "$try_asm_unistd_h" && - test -f "$try_asm_unistd_h"; then - asm_unistd_h=$try_asm_unistd_h - fi - fi - if test ! -f "$asm_unistd_h"; then - AC_MSG_WARN([*** asm/unistd.h not found, it will not be pre-processed]) - echo '#include ' > asm-unistd.h - elif grep __NR_N32_open "$asm_unistd_h" > /dev/null; then - # The point of this preprocessing is to turn __NR_ into - # __NR_N64_, as well as to define __NR_ to - # __NR__, if __NR__ is defined - # and is the compiler-enabled ABI. - cat "$asm_unistd_h" | - sed -e 's,__NR_,__NR_N64_,g' \ - -e 's,__NR_N64_##,__NR_##,g' \ - -e 's,__NR_N64_O32_,__NR_O32_,g' \ - -e 's,__NR_N64_N32_,__NR_N32_,g' \ - -e 's,__NR_N64_N64_,__NR_N64_,g' \ - | awk > asm-unistd.h ' -BEGIN { print "#include "; } -/^#define __NR.*unused/ { print; next; } -/^#define __NR_N64__exit __NR_N64_exit/ { - print "#define __NR__exit __NR_exit"; - print "#define __NR_O32__exit __NR_O32_exit"; - print "#define __NR_N32__exit __NR_N32_exit"; - print; next; -} -/^#define __NR_O32_/ { - name = $2; - sub (/_O32_/, "_", name); - print; - print "#if _MIPS_SIM == _ABIO32"; - print "# define " name " " $2; - print "#endif"; - next; -} -/^#define __NR_N32_/ { - name = $2; - sub (/_N32_/, "_", name); - print; - print "#if _MIPS_SIM == _ABIN32"; - print "# define " name " " $2; - print "#endif"; - next; -} -/^#define __NR_N64_/ { - name = $2; - sub (/_N64_/, "_", name); - print; - print "#if _MIPS_SIM == _ABI64"; - print "# define " name " " $2; - print "#endif"; - next; -} -{ - print; -}' - else - echo '#include ' > asm-unistd.h - fi ;; -mips*) - rm -f asm-unistd.h - echo '#include ' > asm-unistd.h - ;; -esac - case "$prefix" in /usr | /usr/) # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib. diff --git a/sysdeps/unix/sysv/linux/mips/sys/syscall.h b/sysdeps/unix/sysv/linux/mips/sys/syscall.h deleted file mode 100644 index f6458cd316..0000000000 --- a/sysdeps/unix/sysv/linux/mips/sys/syscall.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997, 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 _SYSCALL_H -#define _SYSCALL_H 1 - -/* This file should list the numbers of the system the system knows. - But instead of duplicating this we use the information available - from the kernel sources. */ -#ifdef _LIBC -/* Since the kernel doesn't define macro names in a way usable for - glibc, we preprocess this header, and use it during the glibc build - process. */ -# include -#else -# include -#endif - -#ifndef _LIBC -/* The Linux kernel header file defines macros `__NR_', but some - programs expect the traditional form `SYS_'. So in building libc - we scan the kernel's list and produce with macros for - all the `SYS_' names. */ -# include -#endif - -#endif From 8a70b2dcabbfaae8e027f8aacb3168ffbfcba5d5 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 23 Dec 2011 20:34:10 +0100 Subject: [PATCH 4155/4487] m68k: prevent warnings due to long long constants --- ChangeLog.m68k | 5 +++++ sysdeps/m68k/bits/byteswap.h | 23 ++++++++++++----------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index bd8631763d..a234cfae61 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2011-12-23 Andreas Schwab + + * sysdeps/m68k/bits/byteswap.h (__bswap_constant_64): Protect long + long constant with __extension__. + 2011-12-04 Thorsten Glaser * sysdeps/unix/sysv/linux/m68k/syscall.S: Allow six arguments. diff --git a/sysdeps/m68k/bits/byteswap.h b/sysdeps/m68k/bits/byteswap.h index 4f31d95bb6..5e08805c5f 100644 --- a/sysdeps/m68k/bits/byteswap.h +++ b/sysdeps/m68k/bits/byteswap.h @@ -28,7 +28,7 @@ because GCC is smart enough to generate optimal assembler output, and this allows for better cse. */ #define __bswap_constant_16(x) \ - ((((x) >> 8) & 0xffu) | (((x) & 0xffu) << 8)) + ((((x) >> 8) & 0xffu) | (((x) & 0xffu) << 8)) static __inline unsigned short int __bswap_16 (unsigned short int __bsx) @@ -38,8 +38,8 @@ __bswap_16 (unsigned short int __bsx) /* Swap bytes in 32 bit value. */ #define __bswap_constant_32(x) \ - ((((x) & 0xff000000u) >> 24) | (((x) & 0x00ff0000u) >> 8) | \ - (((x) & 0x0000ff00u) << 8) | (((x) & 0x000000ffu) << 24)) + ((((x) & 0xff000000u) >> 24) | (((x) & 0x00ff0000u) >> 8) | \ + (((x) & 0x0000ff00u) << 8) | (((x) & 0x000000ffu) << 24)) #if !defined(__mcoldfire__) static __inline unsigned int @@ -64,14 +64,15 @@ __bswap_32 (unsigned int __bsx) #if defined __GNUC__ && __GNUC__ >= 2 /* Swap bytes in 64 bit value. */ # define __bswap_constant_64(x) \ - ((((x) & 0xff00000000000000ull) >> 56) \ - | (((x) & 0x00ff000000000000ull) >> 40) \ - | (((x) & 0x0000ff0000000000ull) >> 24) \ - | (((x) & 0x000000ff00000000ull) >> 8) \ - | (((x) & 0x00000000ff000000ull) << 8) \ - | (((x) & 0x0000000000ff0000ull) << 24) \ - | (((x) & 0x000000000000ff00ull) << 40) \ - | (((x) & 0x00000000000000ffull) << 56)) + __extension__ \ + ((((x) & 0xff00000000000000ull) >> 56) \ + | (((x) & 0x00ff000000000000ull) >> 40) \ + | (((x) & 0x0000ff0000000000ull) >> 24) \ + | (((x) & 0x000000ff00000000ull) >> 8) \ + | (((x) & 0x00000000ff000000ull) << 8) \ + | (((x) & 0x0000000000ff0000ull) << 24) \ + | (((x) & 0x000000000000ff00ull) << 40) \ + | (((x) & 0x00000000000000ffull) << 56)) /* Swap bytes in 64 bit value. */ static __inline unsigned long long From 04d450263622ae7c37cb841f93b3bcf4e9397a88 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Tue, 3 Jan 2012 16:20:45 +0000 Subject: [PATCH 4156/4487] Use IA64 backtrace on MIPS. --- ChangeLog.mips | 5 +++++ sysdeps/mips/Makefile | 4 ++++ sysdeps/mips/backtrace.c | 1 + 3 files changed, 10 insertions(+) create mode 100644 sysdeps/mips/backtrace.c diff --git a/ChangeLog.mips b/ChangeLog.mips index 8e60fb276a..4bb1a4db5e 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2012-01-03 Tom de Vries + + * sysdeps/mips/backtrace.c: New file, including ia64 backtrace.c. + * sysdeps/mips/Makefile: Compile backtrace.c with -funwind-tables. + 2011-12-22 Joseph Myers * sysdeps/unix/sysv/linux/mips/Makefile (no_syscall_list_h) diff --git a/sysdeps/mips/Makefile b/sysdeps/mips/Makefile index 9d01522a37..b7e5e6192b 100644 --- a/sysdeps/mips/Makefile +++ b/sysdeps/mips/Makefile @@ -11,4 +11,8 @@ ifeq ($(subdir),rt) librt-sysdep_routines += rt-sysdep endif +ifeq ($(subdir),debug) +CFLAGS-backtrace.c += -funwind-tables +endif + ASFLAGS-.os += $(pic-ccflag) diff --git a/sysdeps/mips/backtrace.c b/sysdeps/mips/backtrace.c new file mode 100644 index 0000000000..297029456d --- /dev/null +++ b/sysdeps/mips/backtrace.c @@ -0,0 +1 @@ +#include From 8117345d2231ba93f5684c63f2b512e4d7fca9d2 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 3 Jan 2012 16:32:28 +0000 Subject: [PATCH 4157/4487] Use ENTRY/END macros in old-ABI ARM sysdep-cancel.h. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h | 9 ++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 9108624c12..de9a2c1ff0 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2012-01-03 Mike Frysinger + + * sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h (PSEUDO): Change + .type/.globl/label to ENTRY(). Change .size to END(). + 2011-12-20 Peter Green * sysdeps/unix/sysv/linux/arm/sys/ucontext.h: Don't include diff --git a/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h index 9c80771875..506558d3f7 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h @@ -1,4 +1,5 @@ -/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2005, 2007, 2008, 2012 + 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,12 +29,10 @@ # define PSEUDO(name, syscall_name, args) \ .section ".text"; \ PSEUDO_PROLOGUE; \ - .type __##syscall_name##_nocancel,%function; \ - .globl __##syscall_name##_nocancel; \ - __##syscall_name##_nocancel: \ + ENTRY (__##syscall_name##_nocancel); \ DO_CALL (syscall_name, args); \ PSEUDO_RET; \ - .size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel; \ + END (__##syscall_name##_nocancel); \ ENTRY (name); \ SINGLE_THREAD_P; \ DOARGS_##args; \ From a80fb816722dcc790c761af7aa9d0c0e1b9be9a5 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 3 Jan 2012 16:34:40 +0000 Subject: [PATCH 4158/4487] Use END in ARM old-ABI sigrestorer.S. --- ChangeLog.arm | 7 +++++++ sysdeps/unix/sysv/linux/arm/sigrestorer.S | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index de9a2c1ff0..36027d56a1 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,10 @@ +2012-01-03 Mike Frysinger + + [BZ #12354] + * sysdeps/unix/sysv/linux/arm/sigrestorer.S (__default_sa_restorer): + Add END(__default_sa_restorer). + (__default_rt_sa_restorer): Add END(__default_rt_sa_restorer). + 2012-01-03 Mike Frysinger * sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h (PSEUDO): Change diff --git a/sysdeps/unix/sysv/linux/arm/sigrestorer.S b/sysdeps/unix/sysv/linux/arm/sigrestorer.S index 98e33cb8bc..d9cc40fb0f 100644 --- a/sysdeps/unix/sysv/linux/arm/sigrestorer.S +++ b/sysdeps/unix/sysv/linux/arm/sigrestorer.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1999 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2012 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 @@ -24,10 +24,12 @@ ENTRY(__default_sa_restorer) swi SYS_ify(sigreturn) +END(__default_sa_restorer) #ifdef __NR_rt_sigreturn ENTRY(__default_rt_sa_restorer) swi SYS_ify(rt_sigreturn) +END(__default_rt_sa_restorer) #endif From 32a6153180751322aa1c0518fabb6c697dc4ed79 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Wed, 4 Jan 2012 12:03:20 +0000 Subject: [PATCH 4159/4487] Use -fno-unwind-tables for *initfini* on MIPS. --- ChangeLog.mips | 5 +++++ sysdeps/mips/Makefile | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/ChangeLog.mips b/ChangeLog.mips index 4bb1a4db5e..36cae0dd87 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2012-01-04 Tom de Vries + + * sysdeps/mips/Makefile: Compile initfini.c, pt-initfini.c with + -fno-unwind-tables. + 2012-01-03 Tom de Vries * sysdeps/mips/backtrace.c: New file, including ia64 backtrace.c. diff --git a/sysdeps/mips/Makefile b/sysdeps/mips/Makefile index b7e5e6192b..7937d25dcf 100644 --- a/sysdeps/mips/Makefile +++ b/sysdeps/mips/Makefile @@ -15,4 +15,12 @@ ifeq ($(subdir),debug) CFLAGS-backtrace.c += -funwind-tables endif +ifeq ($(subdir),csu) +CFLAGS-initfini.s += -fno-unwind-tables +endif + +ifeq ($(subdir),nptl) +CFLAGS-pt-initfini.s += -fno-unwind-tables +endif + ASFLAGS-.os += $(pic-ccflag) From 50e73d1379b4ed494f733ab699c638f8587a4137 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Thu, 5 Jan 2012 14:52:48 +0100 Subject: [PATCH 4160/4487] m68k: add cfi directives --- ChangeLog.m68k | 29 +++++++++ sysdeps/m68k/dl-trampoline.S | 59 ++++++++++++++++++- sysdeps/m68k/m680x0/add_n.S | 10 +++- sysdeps/m68k/m680x0/lshift.S | 25 +++++++- sysdeps/m68k/m680x0/m68020/addmul_1.S | 12 +++- sysdeps/m68k/m680x0/m68020/mul_1.S | 20 +++---- sysdeps/m68k/m680x0/m68020/submul_1.S | 12 +++- sysdeps/m68k/m680x0/rshift.S | 25 +++++++- sysdeps/m68k/m680x0/sub_n.S | 10 +++- sysdeps/m68k/memchr.S | 35 ++++++++++- sysdeps/m68k/rawmemchr.S | 10 +++- sysdeps/m68k/strchr.S | 16 ++++- sysdeps/m68k/strchrnul.S | 8 +++ sysdeps/m68k/sysdep.h | 14 +++-- sysdeps/unix/sysv/linux/m68k/clone.S | 17 +++++- .../sysv/linux/m68k/coldfire/m68k-helpers.S | 10 +--- .../sysv/linux/m68k/m680x0/m68k-helpers.S | 10 +--- .../unix/sysv/linux/m68k/nptl/sysdep-cancel.h | 6 +- sysdeps/unix/sysv/linux/m68k/semtimedop.S | 12 +++- sysdeps/unix/sysv/linux/m68k/socket.S | 8 +-- sysdeps/unix/sysv/linux/m68k/sysdep.S | 4 +- sysdeps/unix/sysv/linux/m68k/sysdep.h | 35 +++++++---- sysdeps/unix/sysv/linux/m68k/vfork.S | 6 +- 23 files changed, 327 insertions(+), 66 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index a234cfae61..8f62c71509 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,32 @@ +2012-01-05 Andreas Schwab + + * sysdeps/m68k/dl-trampoline.S: Add cfi directives. + * sysdeps/m68k/memchr.S: Likewise. + * sysdeps/m68k/rawmemchr.S: Likewise. + * sysdeps/m68k/strchr.S: Likewise. + * sysdeps/m68k/strchrnul.S: Likewise. + * sysdeps/m68k/m680x0/add_n.S: Likewise. + * sysdeps/m68k/m680x0/lshift.S: Likewise. + * sysdeps/m68k/m680x0/rshift.S: Likewise. + * sysdeps/m68k/m680x0/sub_n.S: Likewise. + * sysdeps/m68k/m680x0/m68020/addmul_1.S: Likewise. + * sysdeps/m68k/m680x0/m68020/mul_1.S: Likewise. + * sysdeps/m68k/m680x0/m68020/submul_1.S: Likewise. + * sysdeps/unix/sysv/linux/m68k/clone.S: Likewise. + * sysdeps/unix/sysv/linux/m68k/semtimedop.S: Likewise. + * sysdeps/unix/sysv/linux/m68k/socket.S: Likewise. + * sysdeps/unix/sysv/linux/m68k/sysdep.S: Likewise. + * sysdeps/unix/sysv/linux/m68k/sysdep.h: Likewise. + * sysdeps/unix/sysv/linux/m68k/vfork.S: Likewise. + * sysdeps/m68k/sysdep.h (CALL_MCOUNT): Likewise. + (ENTRY): Add cfi_startproc. + (END): Add cfi_endproc. + * sysdeps/unix/sysv/linux/m68k/coldfire/m68k-helpers.S: Remove + cfi_startproc/cfi_endproc. + * sysdeps/unix/sysv/linux/m68k/m680x0/m68k-helpers.S: Likewise. + * sysdeps/unix/sysv/linux/m68k/nptl/sysdep-cancel.h (PSEUDO): + Likewise. + 2011-12-23 Andreas Schwab * sysdeps/m68k/bits/byteswap.h (__bswap_constant_64): Protect long diff --git a/sysdeps/m68k/dl-trampoline.S b/sysdeps/m68k/dl-trampoline.S index 0f4148b43f..bdf3974e8c 100644 --- a/sysdeps/m68k/dl-trampoline.S +++ b/sysdeps/m68k/dl-trampoline.S @@ -1,5 +1,5 @@ /* PLT trampolines. m68k version. - Copyright (C) 2005, 2011 Free Software Foundation, Inc. + Copyright (C) 2005, 2011, 2012 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,54 +23,81 @@ .globl _dl_runtime_resolve .type _dl_runtime_resolve, @function _dl_runtime_resolve: + cfi_startproc + cfi_adjust_cfa_offset (8) | Save %a0 (struct return address) and %a1. move.l %a0, -(%sp) + cfi_adjust_cfa_offset (4) move.l %a1, -(%sp) + cfi_adjust_cfa_offset (4) | Call the real address resolver. jbsr _dl_fixup | Restore register %a0 and %a1. move.l (%sp)+, %a1 + cfi_adjust_cfa_offset (-4) move.l (%sp)+, %a0 + cfi_adjust_cfa_offset (-4) | Pop parameters addq.l #8, %sp + cfi_adjust_cfa_offset (-8) | Call real function. #ifdef __mcoldfire__ move.l %d0,-(%sp) + cfi_adjust_cfa_offset (4) rts #else jmp (%d0) #endif + cfi_endproc .size _dl_runtime_resolve, . - _dl_runtime_resolve .text .globl _dl_runtime_profile .type _dl_runtime_profile, @function _dl_runtime_profile: + cfi_startproc + cfi_adjust_cfa_offset (8) pea 8(%sp) + cfi_adjust_cfa_offset (4) move.l %a1, -(%sp) + cfi_adjust_cfa_offset (4) move.l %a0, -(%sp) + cfi_adjust_cfa_offset (4) pea -1.w + cfi_adjust_cfa_offset (4) | Push parameters for _dl_profile_fixup pea (%sp) + cfi_adjust_cfa_offset (4) pea 8(%sp) + cfi_adjust_cfa_offset (4) move.l 32(%sp), -(%sp) + cfi_adjust_cfa_offset (4) move.l 32(%sp), -(%sp) + cfi_adjust_cfa_offset (4) move.l 32(%sp), -(%sp) + cfi_adjust_cfa_offset (4) subq.l #8, %sp + cfi_adjust_cfa_offset (8) | Call the real address resolver. jbsr _dl_profile_fixup | Pop parameters lea 28(%sp), %sp + cfi_adjust_cfa_offset (-28) move.l (%sp), %d1 jpl 1f addq.l #4, %sp + cfi_adjust_cfa_offset (-4) | Restore register %a0 and %a1. move.l (%sp)+, %a0 + cfi_adjust_cfa_offset (-4) move.l (%sp)+, %a1 + cfi_adjust_cfa_offset (-4) lea 12(%sp), %sp + cfi_adjust_cfa_offset (-12) | Call real function. #ifdef __mcoldfire__ move.l %d0,-(%sp) + cfi_adjust_cfa_offset (4) rts #else jmp (%d0) @@ -85,7 +112,13 @@ _dl_runtime_profile: +4 %a0 %sp free */ +#ifdef __mcoldfire__ + cfi_adjust_cfa_offset (20) +#else + cfi_adjust_cfa_offset (24) +#endif 1: move.l %a2, (%sp) + cfi_rel_offset (%a2, 0) move.l %sp, %a2 move.l %sp, %a0 lea 28(%sp), %a1 @@ -94,6 +127,7 @@ _dl_runtime_profile: and.l #-3, %d1 sub.l %d1, %a0 move.l %a0, %sp + cfi_def_cfa_register (%a2) #ifdef __mcoldfire__ tst.l %d1 beq 2f @@ -129,7 +163,10 @@ _dl_runtime_profile: jsr (%d0) #endif move.l %a2, %sp + cfi_def_cfa_register (%sp) move.l (%sp)+, %a2 + cfi_adjust_cfa_offset (4) + cfi_restore (%a2) /* +20 return address +16 PLT1 @@ -140,32 +177,52 @@ _dl_runtime_profile: */ #ifdef __mcoldfire__ fmove.d %fp0, -(%sp) + cfi_adjust_cfa_offset (8) #else fmove.x %fp0, -(%sp) + cfi_adjust_cfa_offset (12) #endif move.l %a0, -(%sp) + cfi_adjust_cfa_offset (4) move.l %d1, -(%sp) + cfi_adjust_cfa_offset (4) move.l %d0, -(%sp) + cfi_adjust_cfa_offset (4) pea (%sp) + cfi_adjust_cfa_offset (4) #ifdef __mcoldfire__ pea 24(%sp) + cfi_adjust_cfa_offset (4) move.l 40(%sp), -(%sp) + cfi_adjust_cfa_offset (4) move.l 40(%sp), -(%sp) + cfi_adjust_cfa_offset (4) #else pea 28(%sp) + cfi_adjust_cfa_offset (4) move.l 44(%sp), -(%sp) + cfi_adjust_cfa_offset (4) move.l 44(%sp), -(%sp) + cfi_adjust_cfa_offset (4) #endif jbsr _dl_call_pltexit lea 16(%sp), %sp + cfi_adjust_cfa_offset (-16) move.l (%sp)+, %d0 + cfi_adjust_cfa_offset (-4) move.l (%sp)+, %d1 + cfi_adjust_cfa_offset (-4) move.l (%sp)+, %a0 + cfi_adjust_cfa_offset (-4) #ifdef __mcoldfire__ fmove.d (%sp)+, %fp0 + cfi_adjust_cfa_offset (-8) #else fmove.x (%sp)+, %fp0 + cfi_adjust_cfa_offset (-12) #endif lea 20(%sp), %sp + cfi_adjust_cfa_offset (-20) rts + cfi_endproc .size _dl_runtime_profile, . - _dl_runtime_profile diff --git a/sysdeps/m68k/m680x0/add_n.S b/sysdeps/m68k/m680x0/add_n.S index a9558491e8..3011de6afc 100644 --- a/sysdeps/m68k/m680x0/add_n.S +++ b/sysdeps/m68k/m680x0/add_n.S @@ -1,7 +1,7 @@ /* mc68020 __mpn_add_n -- Add two limb vectors of the same length > 0 and store sum in a third limb vector. -Copyright (C) 1992, 1994, 1996, 1998 Free Software Foundation, Inc. +Copyright (C) 1992, 1994, 1996, 1998, 2012 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -35,7 +35,11 @@ MA 02111-1307, USA. */ ENTRY(__mpn_add_n) /* Save used registers on the stack. */ movel R(d2),MEM_PREDEC(sp) + cfi_adjust_cfa_offset (4) movel R(a2),MEM_PREDEC(sp) + cfi_adjust_cfa_offset (4) + cfi_rel_offset (R(d2), 4) + cfi_rel_offset (R(a2), 0) /* Copy the arguments to registers. Better use movem? */ movel MEM_DISP(sp,12),R(a2) @@ -70,7 +74,11 @@ L(L2:) /* Restore used registers from stack frame. */ movel MEM_POSTINC(sp),R(a2) + cfi_adjust_cfa_offset (-4) + cfi_restore (R(a2)) movel MEM_POSTINC(sp),R(d2) + cfi_adjust_cfa_offset (-4) + cfi_restore (R(d2)) rts END(__mpn_add_n) diff --git a/sysdeps/m68k/m680x0/lshift.S b/sysdeps/m68k/m680x0/lshift.S index 434b344bd4..047241ff5a 100644 --- a/sysdeps/m68k/m680x0/lshift.S +++ b/sysdeps/m68k/m680x0/lshift.S @@ -1,6 +1,6 @@ /* mc68020 __mpn_lshift -- Shift left a low-level natural-number integer. -Copyright (C) 1996, 1998 Free Software Foundation, Inc. +Copyright (C) 1996, 1998, 2012 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -40,6 +40,13 @@ ENTRY(__mpn_lshift) /* Save used registers on the stack. */ moveml R(d2)-R(d6)/R(a2),MEM_PREDEC(sp) + cfi_adjust_cfa_offset (6*4) + cfi_rel_offset (R(d2), 0) + cfi_rel_offset (R(d3), 4) + cfi_rel_offset (R(d4), 8) + cfi_rel_offset (R(d5), 12) + cfi_rel_offset (R(d6), 16) + cfi_rel_offset (R(a2), 20) /* Copy the arguments to registers. */ movel MEM_DISP(sp,28),R(res_ptr) @@ -111,12 +118,21 @@ L(Lend:) /* Restore used registers from stack frame. */ moveml MEM_POSTINC(sp),R(d2)-R(d6)/R(a2) + cfi_remember_state + cfi_adjust_cfa_offset (-6*4) + cfi_restore (R(d2)) + cfi_restore (R(d3)) + cfi_restore (R(d4)) + cfi_restore (R(d5)) + cfi_restore (R(d6)) + cfi_restore (R(a2)) rts /* We loop from least significant end of the arrays, which is only permissible if the source and destination don't overlap, since the function is documented to work for overlapping source and destination. */ + cfi_restore_state L(Lspecial:) clrl R(d0) /* initialize carry */ eorw #1,R(s_size) @@ -143,5 +159,12 @@ L(LL1:) L(LLend:) /* Restore used registers from stack frame. */ moveml MEM_POSTINC(sp),R(d2)-R(d6)/R(a2) + cfi_adjust_cfa_offset (-6*4) + cfi_restore (R(d2)) + cfi_restore (R(d3)) + cfi_restore (R(d4)) + cfi_restore (R(d5)) + cfi_restore (R(d6)) + cfi_restore (R(a2)) rts END(__mpn_lshift) diff --git a/sysdeps/m68k/m680x0/m68020/addmul_1.S b/sysdeps/m68k/m680x0/m68020/addmul_1.S index 05d1d8a804..478bff3dce 100644 --- a/sysdeps/m68k/m680x0/m68020/addmul_1.S +++ b/sysdeps/m68k/m680x0/m68020/addmul_1.S @@ -1,7 +1,7 @@ /* mc68020 __mpn_addmul_1 -- Multiply a limb vector with a limb and add the result to a second limb vector. -Copyright (C) 1992, 1994, 1996, 1998 Free Software Foundation, Inc. +Copyright (C) 1992, 1994, 1996, 1998, 2012 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -41,6 +41,11 @@ ENTRY(__mpn_addmul_1) /* Save used registers on the stack. */ moveml R(d2)-R(d5),MEM_PREDEC(sp) + cfi_adjust_cfa_offset (4*4) + cfi_rel_offset (R(d2), 0) + cfi_rel_offset (R(d3), 4) + cfi_rel_offset (R(d4), 8) + cfi_rel_offset (R(d5), 12) /* Copy the arguments to registers. Better use movem? */ movel MEM_DISP(sp,20),R(res_ptr) @@ -75,6 +80,11 @@ L(L1:) movel MEM_POSTINC(s1_ptr),R(d3) /* Restore used registers from stack frame. */ moveml MEM_POSTINC(sp),R(d2)-R(d5) + cfi_adjust_cfa_offset (-4*4) + cfi_restore (R(d2)) + cfi_restore (R(d3)) + cfi_restore (R(d4)) + cfi_restore (R(d5)) rts END(__mpn_addmul_1) diff --git a/sysdeps/m68k/m680x0/m68020/mul_1.S b/sysdeps/m68k/m680x0/m68020/mul_1.S index f3e450ed93..6f68500210 100644 --- a/sysdeps/m68k/m680x0/m68020/mul_1.S +++ b/sysdeps/m68k/m680x0/m68020/mul_1.S @@ -1,7 +1,7 @@ /* mc68020 __mpn_mul_1 -- Multiply a limb vector with a limb and store the result in a second limb vector. -Copyright (C) 1992, 1994, 1996, 1998 Free Software Foundation, Inc. +Copyright (C) 1992, 1994, 1996, 1998, 2012 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -41,11 +41,10 @@ ENTRY(__mpn_mul_1) /* Save used registers on the stack. */ moveml R(d2)-R(d4),MEM_PREDEC(sp) -#if 0 - movel R(d2),MEM_PREDEC(sp) - movel R(d3),MEM_PREDEC(sp) - movel R(d4),MEM_PREDEC(sp) -#endif + cfi_adjust_cfa_offset (3*4) + cfi_rel_offset (R(d2), 0) + cfi_rel_offset (R(d3), 4) + cfi_rel_offset (R(d4), 8) /* Copy the arguments to registers. Better use movem? */ movel MEM_DISP(sp,16),R(res_ptr) @@ -78,10 +77,9 @@ L(L1:) movel MEM_POSTINC(s1_ptr),R(d3) /* Restore used registers from stack frame. */ moveml MEM_POSTINC(sp),R(d2)-R(d4) -#if 0 - movel MEM_POSTINC(sp),R(d4) - movel MEM_POSTINC(sp),R(d3) - movel MEM_POSTINC(sp),R(d2) -#endif + cfi_adjust_cfa_offset (-3*4) + cfi_restore (R(d2)) + cfi_restore (R(d3)) + cfi_restore (R(d4)) rts END(__mpn_mul_1) diff --git a/sysdeps/m68k/m680x0/m68020/submul_1.S b/sysdeps/m68k/m680x0/m68020/submul_1.S index 7522046b43..bc1fd3aa63 100644 --- a/sysdeps/m68k/m680x0/m68020/submul_1.S +++ b/sysdeps/m68k/m680x0/m68020/submul_1.S @@ -1,7 +1,7 @@ /* mc68020 __mpn_submul_1 -- Multiply a limb vector with a limb and subtract the result from a second limb vector. -Copyright (C) 1992, 1994, 1996, 1998 Free Software Foundation, Inc. +Copyright (C) 1992, 1994, 1996, 1998, 2012 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -41,6 +41,11 @@ ENTRY(__mpn_submul_1) /* Save used registers on the stack. */ moveml R(d2)-R(d5),MEM_PREDEC(sp) + cfi_adjust_cfa_offset (4*4) + cfi_rel_offset (R(d2), 0) + cfi_rel_offset (R(d3), 4) + cfi_rel_offset (R(d4), 8) + cfi_rel_offset (R(d5), 12) /* Copy the arguments to registers. Better use movem? */ movel MEM_DISP(sp,20),R(res_ptr) @@ -75,6 +80,11 @@ L(L1:) movel MEM_POSTINC(s1_ptr),R(d3) /* Restore used registers from stack frame. */ moveml MEM_POSTINC(sp),R(d2)-R(d5) + cfi_adjust_cfa_offset (-4*4) + cfi_restore (R(d2)) + cfi_restore (R(d3)) + cfi_restore (R(d4)) + cfi_restore (R(d5)) rts END(__mpn_submul_1) diff --git a/sysdeps/m68k/m680x0/rshift.S b/sysdeps/m68k/m680x0/rshift.S index 5e6abceb97..c6c720ae89 100644 --- a/sysdeps/m68k/m680x0/rshift.S +++ b/sysdeps/m68k/m680x0/rshift.S @@ -1,6 +1,6 @@ /* mc68020 __mpn_rshift -- Shift right a low-level natural-number integer. -Copyright (C) 1996, 1998 Free Software Foundation, Inc. +Copyright (C) 1996, 1998, 2012 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -39,6 +39,13 @@ MA 02111-1307, USA. */ ENTRY(__mpn_rshift) /* Save used registers on the stack. */ moveml R(d2)-R(d6)/R(a2),MEM_PREDEC(sp) + cfi_adjust_cfa_offset (6*4) + cfi_rel_offset (R(d2), 0) + cfi_rel_offset (R(d3), 4) + cfi_rel_offset (R(d4), 8) + cfi_rel_offset (R(d5), 12) + cfi_rel_offset (R(d6), 16) + cfi_rel_offset (R(a2), 20) /* Copy the arguments to registers. */ movel MEM_DISP(sp,28),R(res_ptr) @@ -100,12 +107,21 @@ L(Lend:) /* Restore used registers from stack frame. */ moveml MEM_POSTINC(sp),R(d2)-R(d6)/R(a2) + cfi_remember_state + cfi_adjust_cfa_offset (-6*4) + cfi_restore (R(d2)) + cfi_restore (R(d3)) + cfi_restore (R(d4)) + cfi_restore (R(d5)) + cfi_restore (R(d6)) + cfi_restore (R(a2)) rts /* We loop from most significant end of the arrays, which is only permissible if the source and destination don't overlap, since the function is documented to work for overlapping source and destination. */ + cfi_restore_state L(Lspecial:) #if (defined (__mc68020__) || defined (__NeXT__) || defined(mc68020)) lea MEM_INDX1(s_ptr,s_size,l,4),R(s_ptr) @@ -142,5 +158,12 @@ L(LL1:) L(LLend:) /* Restore used registers from stack frame. */ moveml MEM_POSTINC(sp),R(d2)-R(d6)/R(a2) + cfi_adjust_cfa_offset (-6*4) + cfi_restore (R(d2)) + cfi_restore (R(d3)) + cfi_restore (R(d4)) + cfi_restore (R(d5)) + cfi_restore (R(d6)) + cfi_restore (R(a2)) rts END(__mpn_rshift) diff --git a/sysdeps/m68k/m680x0/sub_n.S b/sysdeps/m68k/m680x0/sub_n.S index 5833dd2719..ab42743fee 100644 --- a/sysdeps/m68k/m680x0/sub_n.S +++ b/sysdeps/m68k/m680x0/sub_n.S @@ -1,7 +1,7 @@ /* mc68020 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and store difference in a third limb vector. -Copyright (C) 1992, 1994, 1996, 1998 Free Software Foundation, Inc. +Copyright (C) 1992, 1994, 1996, 1998, 2012 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -35,7 +35,11 @@ MA 02111-1307, USA. */ ENTRY(__mpn_sub_n) /* Save used registers on the stack. */ movel R(d2),MEM_PREDEC(sp) + cfi_adjust_cfa_offset (4) movel R(a2),MEM_PREDEC(sp) + cfi_adjust_cfa_offset (4) + cfi_rel_offset (R(d2), 4) + cfi_rel_offset (R(a2), 0) /* Copy the arguments to registers. Better use movem? */ movel MEM_DISP(sp,12),R(a2) @@ -70,7 +74,11 @@ L(L2:) /* Restore used registers from stack frame. */ movel MEM_POSTINC(sp),R(a2) + cfi_adjust_cfa_offset (-4) + cfi_restore (R(a2)) movel MEM_POSTINC(sp),R(d2) + cfi_adjust_cfa_offset (-4) + cfi_restore (R(d2)) rts END(__mpn_sub_n) diff --git a/sysdeps/m68k/memchr.S b/sysdeps/m68k/memchr.S index 77e86a32bd..e5c767759b 100644 --- a/sysdeps/m68k/memchr.S +++ b/sysdeps/m68k/memchr.S @@ -1,7 +1,7 @@ /* memchr (str, ch, n) -- Return pointer to first occurrence of CH in the first N bytes of STR. For Motorola 68000. - Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2003, 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab . @@ -28,10 +28,20 @@ ENTRY(__memchr) /* Save the callee-saved registers we use. */ #ifdef __mcoldfire__ movel R(d2),MEM_PREDEC(sp) + cfi_adjust_cfa_offset (4) movel R(d3),MEM_PREDEC(sp) + cfi_adjust_cfa_offset (4) movel R(d4),MEM_PREDEC(sp) + cfi_adjust_cfa_offset (4) + cfi_rel_offset (R(d2), 8) + cfi_rel_offset (R(d3), 4) + cfi_rel_offset (R(d4), 0) #else moveml R(d2)-R(d4),MEM_PREDEC(sp) + cfi_adjust_cfa_offset (3*4) + cfi_rel_offset (R(d2), 0) + cfi_rel_offset (R(d3), 4) + cfi_rel_offset (R(d4), 8) #endif /* Get string pointer, character and length. */ @@ -234,13 +244,26 @@ L(L7:) movel R(d0),R(a0) #ifdef __mcoldfire__ movel MEM_POSTINC(sp),R(d4) + cfi_remember_state + cfi_adjust_cfa_offset (-4) + cfi_restore (R(d4)) movel MEM_POSTINC(sp),R(d3) + cfi_adjust_cfa_offset (-4) + cfi_restore (R(d3)) movel MEM_POSTINC(sp),R(d2) + cfi_adjust_cfa_offset (-4) + cfi_restore (R(d2)) #else moveml MEM_POSTINC(sp),R(d2)-R(d4) + cfi_remember_state + cfi_adjust_cfa_offset (-3*4) + cfi_restore (R(d2)) + cfi_restore (R(d3)) + cfi_restore (R(d4)) #endif rts + cfi_restore_state L(L8:) /* We have a hit. Check to see which byte it was. First compensate for the autoincrement in the loop. */ @@ -263,10 +286,20 @@ L(L9:) movel R(a0),R(d0) #ifdef __mcoldfire__ movel MEM_POSTINC(sp),R(d4) + cfi_adjust_cfa_offset (-4) + cfi_restore (R(d4)) movel MEM_POSTINC(sp),R(d3) + cfi_adjust_cfa_offset (-4) + cfi_restore (R(d3)) movel MEM_POSTINC(sp),R(d2) + cfi_adjust_cfa_offset (-4) + cfi_restore (R(d2)) #else moveml MEM_POSTINC(sp),R(d2)-R(d4) + cfi_adjust_cfa_offset (-3*4) + cfi_restore (R(d2)) + cfi_restore (R(d3)) + cfi_restore (R(d4)) #endif rts END(__memchr) diff --git a/sysdeps/m68k/rawmemchr.S b/sysdeps/m68k/rawmemchr.S index 97735f669d..dd446cf798 100644 --- a/sysdeps/m68k/rawmemchr.S +++ b/sysdeps/m68k/rawmemchr.S @@ -1,6 +1,6 @@ /* rawmemchr (str, ch) -- Return pointer to first occurrence of CH in STR. For Motorola 68000. - Copyright (C) 1999, 2002 Free Software Foundation, Inc. + Copyright (C) 1999, 2002, 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab . @@ -26,7 +26,11 @@ ENTRY(__rawmemchr) /* Save the callee-saved registers we use. */ movel R(d2),MEM_PREDEC(sp) + cfi_adjust_cfa_offset (4) movel R(d3),MEM_PREDEC(sp) + cfi_adjust_cfa_offset (4) + cfi_rel_offset (R(d2), 4) + cfi_rel_offset (R(d3), 0) /* Get string pointer and character. */ movel MEM_DISP(sp,12),R(a0) @@ -182,7 +186,11 @@ L(L8:) L(L9:) movel R(a0),R(d0) movel MEM_POSTINC(sp),R(d3) + cfi_adjust_cfa_offset (-4) + cfi_restore (R(d3)) movel MEM_POSTINC(sp),R(d2) + cfi_adjust_cfa_offset (-4) + cfi_restore (R(d2)) rts END(__rawmemchr) diff --git a/sysdeps/m68k/strchr.S b/sysdeps/m68k/strchr.S index 2e1e3249f6..6c6a08fe2a 100644 --- a/sysdeps/m68k/strchr.S +++ b/sysdeps/m68k/strchr.S @@ -1,6 +1,6 @@ /* strchr (str, ch) -- Return pointer to first occurrence of CH in STR. For Motorola 68000. - Copyright (C) 1999, 2003 Free Software Foundation, Inc. + Copyright (C) 1999, 2003, 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab . @@ -26,7 +26,11 @@ ENTRY(strchr) /* Save the callee-saved registers we use. */ movel R(d2),MEM_PREDEC(sp) + cfi_adjust_cfa_offset (4) movel R(d3),MEM_PREDEC(sp) + cfi_adjust_cfa_offset (4) + cfi_rel_offset (R(d2),4) + cfi_rel_offset (R(d3),0) /* Get string pointer and character. */ movel MEM_DISP(sp,12),R(a0) @@ -227,9 +231,15 @@ L(L3:) clrl R(d0) movel R(d0),R(a0) movel MEM_POSTINC(sp),R(d3) + cfi_remember_state + cfi_adjust_cfa_offset (-4) + cfi_restore (R(d3)) movel MEM_POSTINC(sp),R(d2) + cfi_adjust_cfa_offset (-4) + cfi_restore (R(d2)) rts + cfi_restore_state L(L8:) /* We have a hit. Check to see which byte it was. First compensate for the autoincrement in the loop. */ @@ -260,7 +270,11 @@ L(L8:) L(L9:) movel R(a0),R(d0) movel MEM_POSTINC(sp),R(d3) + cfi_adjust_cfa_offset (-4) + cfi_restore (R(d3)) movel MEM_POSTINC(sp),R(d2) + cfi_adjust_cfa_offset (-4) + cfi_restore (R(d2)) rts END(strchr) diff --git a/sysdeps/m68k/strchrnul.S b/sysdeps/m68k/strchrnul.S index 9d13ec16a0..e31cb0c4d3 100644 --- a/sysdeps/m68k/strchrnul.S +++ b/sysdeps/m68k/strchrnul.S @@ -27,7 +27,11 @@ ENTRY(__strchrnul) /* Save the callee-saved registers we use. */ movel R(d2),MEM_PREDEC(sp) + cfi_adjust_cfa_offset (4) movel R(d3),MEM_PREDEC(sp) + cfi_adjust_cfa_offset (4) + cfi_rel_offset (R(d2), 4) + cfi_rel_offset (R(d3), 0) /* Get string pointer and character. */ movel MEM_DISP(sp,12),R(a0) @@ -253,7 +257,11 @@ L(L8:) L(L9:) movel R(a0),R(d0) movel MEM_POSTINC(sp),R(d3) + cfi_adjust_cfa_offset (-4) + cfi_restore (R(d3)) movel MEM_POSTINC(sp),R(d2) + cfi_adjust_cfa_offset (-4) + cfi_restore (R(d2)) rts END(__strchrnul) diff --git a/sysdeps/m68k/sysdep.h b/sysdeps/m68k/sysdep.h index ce70a0dfaa..2b0e936bde 100644 --- a/sysdeps/m68k/sysdep.h +++ b/sysdeps/m68k/sysdep.h @@ -1,5 +1,5 @@ /* Assembler macros for m68k. - Copyright (C) 1998, 2003, 2010 Free Software Foundation, Inc. + Copyright (C) 1998, 2003, 2010, 2012 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 @@ -54,10 +54,13 @@ ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function); \ .align ALIGNARG(2); \ C_LABEL(name) \ + cfi_startproc; \ CALL_MCOUNT # undef END -# define END(name) ASM_SIZE_DIRECTIVE(name) +# define END(name) \ + cfi_endproc; \ + ASM_SIZE_DIRECTIVE(name) /* If compiled for profiling, call `_mcount' at the start of each function. */ @@ -65,9 +68,12 @@ /* The mcount code relies on a normal frame pointer being on the stack to locate our caller, so push one just for its benefit. */ # define CALL_MCOUNT \ - move.l %fp, -(%sp); move.l %sp, %fp; \ + move.l %fp, -(%sp); \ + cfi_adjust_cfa_offset (4); cfi_rel_offset (%fp, 0); \ + move.l %sp, %fp; \ jbsr JUMPTARGET (mcount); \ - move.l (%sp)+, %fp; + move.l (%sp)+, %fp; \ + cfi_adjust_cfa_offset (-4); cfi_restore (%fp); # else # define CALL_MCOUNT /* Do nothing. */ # endif diff --git a/sysdeps/unix/sysv/linux/m68k/clone.S b/sysdeps/unix/sysv/linux/m68k/clone.S index 401e2ef3ac..fa1b6b3877 100644 --- a/sysdeps/unix/sysv/linux/m68k/clone.S +++ b/sysdeps/unix/sysv/linux/m68k/clone.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996,97,98,2002,2010 Free Software Foundation, Inc. +/* Copyright (C) 1996,97,98,2002,2010,2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab (schwab@issan.informatik.uni-dortmund.de) @@ -52,22 +52,36 @@ ENTRY (__clone) movel 12+0(%sp), %d1 /* get flags */ movel %d3, -(%a1) /* save %d3 and get parent_tidptr */ movel %d3, -(%sp) + cfi_adjust_cfa_offset (4) + cfi_rel_offset (%d3, 0) movel 20+4(%sp), %d3 movel %d4, -(%a1) /* save %d4 and get child_tidptr */ movel %d4, -(%sp) + cfi_adjust_cfa_offset (4) + cfi_rel_offset (%d4, 0) movel 28+8(%sp), %d4 movel %d5, -(%a1) /* save %d5 and get tls */ movel %d5, -(%sp) + cfi_adjust_cfa_offset (4) + cfi_rel_offset (%d5, 0) movel 24+12(%sp), %d5 /* save %d2 and get stack pointer */ #ifdef __mcoldfire__ movel %d2, -(%a1) movel %d2, -(%sp) + cfi_adjust_cfa_offset (4) + cfi_rel_offset (%d2, 0) movel %a1, %d2 #else exg %d2, %a1 /* save %d2 and get stack pointer */ + cfi_register (%d2, %a1) #endif movel #SYS_ify (clone), %d0 + + /* End FDE now, because in the child the unwind info will be + wrong. */ + cfi_endproc + trap #0 #ifdef __mcoldfire__ movel (%sp)+, %d2 @@ -115,6 +129,7 @@ donepid: trap #0 cfi_endproc + cfi_startproc PSEUDO_END (__clone) weak_alias (__clone, clone) diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/m68k-helpers.S b/sysdeps/unix/sysv/linux/m68k/coldfire/m68k-helpers.S index 242d23d390..91f697bd82 100644 --- a/sysdeps/unix/sysv/linux/m68k/coldfire/m68k-helpers.S +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/m68k-helpers.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2010 Free Software Foundation, Inc. +/* Copyright (C) 2010, 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Maxim Kuvyrkov , 2010. @@ -41,12 +41,10 @@ .hidden __vdso_read_tp_stub ENTRY (__vdso_read_tp_stub) - cfi_startproc move.l #__NR_get_thread_area, %d0 trap #0 move.l %d0, %a0 rts - cfi_endproc END (__vdso_read_tp_stub) # ifdef SHARED @@ -59,13 +57,11 @@ END (__vdso_read_tp_stub) .hidden __m68k_read_tp # endif ENTRY (__m68k_read_tp) - cfi_startproc move.l #_GLOBAL_OFFSET_TABLE_@GOTPC, %a0 lea (-6, %pc, %a0), %a0 move.l M68K_VDSO_SYMBOL (__vdso_read_tp)@GOT(%a0), %a0 move.l (%a0), %a0 jmp (%a0) - cfi_endproc END (__m68k_read_tp) /* The following two stubs are for macros in atomic.h, they can't @@ -73,7 +69,6 @@ END (__m68k_read_tp) .hidden __vdso_atomic_cmpxchg_32_stub ENTRY (__vdso_atomic_cmpxchg_32_stub) - cfi_startproc move.l %d2, -(%sp) cfi_adjust_cfa_offset (4) cfi_rel_offset (%d2, 0) @@ -84,12 +79,10 @@ ENTRY (__vdso_atomic_cmpxchg_32_stub) cfi_adjust_cfa_offset (-4) cfi_restore (%d2) rts - cfi_endproc END (__vdso_atomic_cmpxchg_32_stub) .hidden __vdso_atomic_barrier_stub ENTRY (__vdso_atomic_barrier_stub) - cfi_startproc move.l %d0, -(%sp) cfi_adjust_cfa_offset (4) move.l #SYS_ify (atomic_barrier), %d0 @@ -97,7 +90,6 @@ ENTRY (__vdso_atomic_barrier_stub) move.l (%sp)+, %d0 cfi_adjust_cfa_offset (-4) rts - cfi_endproc END (__vdso_atomic_barrier_stub) # else /* !SHARED */ /* If the vDSO is not available, use a syscall to get TP. */ diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/m68k-helpers.S b/sysdeps/unix/sysv/linux/m68k/m680x0/m68k-helpers.S index 83ce56423a..46e117633e 100644 --- a/sysdeps/unix/sysv/linux/m68k/m680x0/m68k-helpers.S +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/m68k-helpers.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2010 Free Software Foundation, Inc. +/* Copyright (C) 2010, 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Maxim Kuvyrkov , 2010. @@ -41,12 +41,10 @@ .hidden __vdso_read_tp_stub ENTRY (__vdso_read_tp_stub) - cfi_startproc move.l #__NR_get_thread_area, %d0 trap #0 move.l %d0, %a0 rts - cfi_endproc END (__vdso_read_tp_stub) # ifdef SHARED @@ -59,11 +57,9 @@ END (__vdso_read_tp_stub) .hidden __m68k_read_tp # endif ENTRY (__m68k_read_tp) - cfi_startproc lea _GLOBAL_OFFSET_TABLE_@GOTPC(%pc), %a0 move.l M68K_VDSO_SYMBOL (__vdso_read_tp)@GOT(%a0), %a0 jmp ([%a0]) - cfi_endproc END (__m68k_read_tp) /* The following two stubs are for macros in atomic.h, they can't @@ -71,7 +67,6 @@ END (__m68k_read_tp) .hidden __vdso_atomic_cmpxchg_32_stub ENTRY (__vdso_atomic_cmpxchg_32_stub) - cfi_startproc move.l %d2, -(%sp) cfi_adjust_cfa_offset (4) cfi_rel_offset (%d2, 0) @@ -82,12 +77,10 @@ ENTRY (__vdso_atomic_cmpxchg_32_stub) cfi_adjust_cfa_offset (-4) cfi_restore (%d2) rts - cfi_endproc END (__vdso_atomic_cmpxchg_32_stub) .hidden __vdso_atomic_barrier_stub ENTRY (__vdso_atomic_barrier_stub) - cfi_startproc move.l %d0, -(%sp) cfi_adjust_cfa_offset (4) move.l #SYS_ify (atomic_barrier), %d0 @@ -95,7 +88,6 @@ ENTRY (__vdso_atomic_barrier_stub) move.l (%sp)+, %d0 cfi_adjust_cfa_offset (-4) rts - cfi_endproc END (__vdso_atomic_barrier_stub) # else /* !SHARED */ /* If the vDSO is not available, use a syscall to get TP. */ diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/m68k/nptl/sysdep-cancel.h index 87e2d55ee9..f52b0fe2d7 100644 --- a/sysdeps/unix/sysv/linux/m68k/nptl/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/m68k/nptl/sysdep-cancel.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010 Free Software Foundation, Inc. +/* Copyright (C) 2010, 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Maxim Kuvyrkov , 2010. @@ -40,7 +40,6 @@ rts; \ .size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel; \ .Lpseudo_cancel: \ - cfi_startproc; \ CENABLE; \ DOCARGS_##args \ move.l %d0, -(%sp); /* Save result of CENABLE. */ \ @@ -54,8 +53,7 @@ move.l %d2, %d0; \ UNDOCARGS_##args \ cmp.l &-4095, %d0; \ - jcc SYSCALL_ERROR_LABEL; \ - cfi_endproc + jcc SYSCALL_ERROR_LABEL /* Note: we use D2 to save syscall's return value as D0 will be clobbered in CDISABLE. */ diff --git a/sysdeps/unix/sysv/linux/m68k/semtimedop.S b/sysdeps/unix/sysv/linux/m68k/semtimedop.S index 2775c124c6..9da88b90a2 100644 --- a/sysdeps/unix/sysv/linux/m68k/semtimedop.S +++ b/sysdeps/unix/sysv/linux/m68k/semtimedop.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab , 2003. @@ -34,7 +34,12 @@ ENTRY (semtimedop) /* Save registers. */ move.l %d2, %a1 move.l %d3, -(%sp) + cfi_adjust_cfa_offset (4) move.l %d5, -(%sp) + cfi_adjust_cfa_offset (4) + cfi_register (%d2, %a1) + cfi_rel_offset (%d3, 0) + cfi_rel_offset (%d5, 4) move.l #SYSOP_semtimedop, %d1 move.l SEMID(%sp), %d2 @@ -47,8 +52,13 @@ ENTRY (semtimedop) /* Restore registers. */ move.l (%sp)+, %d5 + cfi_adjust_cfa_offset (-4) + cfi_restore (%d5) move.l (%sp)+, %d3 + cfi_adjust_cfa_offset (-4) + cfi_restore (%d3) move.l %a1, %d2 + cfi_restore (%d2) /* Check for error. */ tst.l %d0 diff --git a/sysdeps/unix/sysv/linux/m68k/socket.S b/sysdeps/unix/sysv/linux/m68k/socket.S index 147a3b2d48..38aaa17196 100644 --- a/sysdeps/unix/sysv/linux/m68k/socket.S +++ b/sysdeps/unix/sysv/linux/m68k/socket.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998, 2010 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998, 2010, 2012 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 @@ -51,6 +51,7 @@ ENTRY (__socket) /* Save registers. */ move.l %d2, %a0 + cfi_register (%d2, %a0) move.l #SYS_ify (socketcall), %d0 /* System call number in %d0. */ @@ -64,6 +65,7 @@ ENTRY (__socket) /* Restore registers. */ move.l %a0, %d2 + cfi_restore (%d2) /* %d0 is < 0 if there was an error. */ tst.l %d0 @@ -73,8 +75,7 @@ ENTRY (__socket) rts #ifdef NEED_CANCELLATION -1: cfi_startproc - /* Enable asynchronous cancellation. */ +1: /* Enable asynchronous cancellation. */ CENABLE /* Save D2. */ @@ -110,7 +111,6 @@ ENTRY (__socket) /* %d0 is < 0 if there was an error. */ tst.l %d0 jmi SYSCALL_ERROR_LABEL - cfi_endproc /* Successful; return the syscall's value. */ rts diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.S b/sysdeps/unix/sysv/linux/m68k/sysdep.S index e4ec92d836..2277aab6b4 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.S +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1996, 2002, 2012 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,8 +37,10 @@ ENTRY (__syscall_error) move.l %d0, errno #else move.l %d0, -(%sp) + cfi_adjust_cfa_offset (4) jbsr __errno_location move.l (%sp)+, (%a0) + cfi_adjust_cfa_offset (-4) #endif move.l #-1, %d0 /* Copy return value to %a0 for syscalls that are declared to diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h index 28113ac5cb..1e2755493b 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998, 2000, 2003, 2004, 2006, 2010 +/* Copyright (C) 1996, 1997, 1998, 2000, 2003, 2004, 2006, 2010, 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Andreas Schwab, , @@ -116,10 +116,12 @@ SYSCALL_ERROR_LABEL: \ SYSCALL_ERROR_LABEL: \ neg.l %d0; \ move.l %d0, -(%sp); \ + cfi_adjust_cfa_offset (4); \ jbsr __m68k_read_tp@PLTPC; \ SYSCALL_ERROR_LOAD_GOT (%a1); \ add.l (SYSCALL_ERROR_ERRNO@TLSIE, %a1), %a0; \ move.l (%sp)+, (%a0); \ + cfi_adjust_cfa_offset (-4); \ move.l &-1, %d0; \ /* Copy return value to %a0 for syscalls that are declared to return \ a pointer (e.g., mmap). */ \ @@ -184,24 +186,35 @@ SYSCALL_ERROR_LABEL: \ #define UNDOARGS_1 UNDOARGS_0 #define DOARGS_2 _DOARGS_2 (8) -#define _DOARGS_2(n) move.l %d2, %a0; move.l n(%sp), %d2; _DOARGS_1 (n-4) -#define UNDOARGS_2 UNDOARGS_1; move.l %a0, %d2 +#define _DOARGS_2(n) move.l %d2, %a0; cfi_register (%d2, %a0); \ + move.l n(%sp), %d2; _DOARGS_1 (n-4) +#define UNDOARGS_2 UNDOARGS_1; move.l %a0, %d2; cfi_restore (%d2) #define DOARGS_3 _DOARGS_3 (12) -#define _DOARGS_3(n) move.l %d3, %a1; move.l n(%sp), %d3; _DOARGS_2 (n-4) -#define UNDOARGS_3 UNDOARGS_2; move.l %a1, %d3 +#define _DOARGS_3(n) move.l %d3, %a1; cfi_register (%d3, %a1); \ + move.l n(%sp), %d3; _DOARGS_2 (n-4) +#define UNDOARGS_3 UNDOARGS_2; move.l %a1, %d3; cfi_restore (%d3) #define DOARGS_4 _DOARGS_4 (16) -#define _DOARGS_4(n) move.l %d4, -(%sp); move.l n+4(%sp), %d4; _DOARGS_3 (n) -#define UNDOARGS_4 UNDOARGS_3; move.l (%sp)+, %d4 +#define _DOARGS_4(n) move.l %d4, -(%sp); \ + cfi_adjust_cfa_offset (4); cfi_rel_offset (%d4, 0); \ + move.l n+4(%sp), %d4; _DOARGS_3 (n) +#define UNDOARGS_4 UNDOARGS_3; move.l (%sp)+, %d4; \ + cfi_adjust_cfa_offset (-4); cfi_restore (%d4) #define DOARGS_5 _DOARGS_5 (20) -#define _DOARGS_5(n) move.l %d5, -(%sp); move.l n+4(%sp), %d5; _DOARGS_4 (n) -#define UNDOARGS_5 UNDOARGS_4; move.l (%sp)+, %d5 +#define _DOARGS_5(n) move.l %d5, -(%sp); \ + cfi_adjust_cfa_offset (4); cfi_rel_offset (%d5, 0); \ + move.l n+4(%sp), %d5; _DOARGS_4 (n) +#define UNDOARGS_5 UNDOARGS_4; move.l (%sp)+, %d5; \ + cfi_adjust_cfa_offset (-4); cfi_restore (%d5) #define DOARGS_6 _DOARGS_6 (24) -#define _DOARGS_6(n) _DOARGS_5 (n-4); move.l %a0, -(%sp); move.l n+12(%sp), %a0; -#define UNDOARGS_6 move.l (%sp)+, %a0; UNDOARGS_5 +#define _DOARGS_6(n) _DOARGS_5 (n-4); move.l %a0, -(%sp); \ + cfi_adjust_cfa_offset (4); \ + move.l n+12(%sp), %a0; +#define UNDOARGS_6 move.l (%sp)+, %a0; cfi_adjust_cfa_offset (-4); \ + UNDOARGS_5 #define ret rts diff --git a/sysdeps/unix/sysv/linux/m68k/vfork.S b/sysdeps/unix/sysv/linux/m68k/vfork.S index 4def7e3b4a..9747302995 100644 --- a/sysdeps/unix/sysv/linux/m68k/vfork.S +++ b/sysdeps/unix/sysv/linux/m68k/vfork.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2002, 2003, 2010 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2002, 2003, 2010, 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab . @@ -46,6 +46,8 @@ ENTRY (__vfork) /* Pop the return PC value into A0. */ movel %sp@+, %a0 + cfi_adjust_cfa_offset (-4) + cfi_register (%pc, %a0) /* Stuff the syscall number in D0 and trap into the kernel. */ movel #SYS_ify (vfork), %d0 @@ -62,6 +64,8 @@ ENTRY (__vfork) .Lerror: /* Push back the return PC. */ movel %a0,%sp@- + cfi_adjust_cfa_offset (4) + cfi_rel_offset (%pc, 0) # ifdef __ASSUME_VFORK_SYSCALL # ifndef PIC From 2d80bda39073a35af4b904d27fa1511cd309b26f Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Fri, 6 Jan 2012 20:14:44 +0000 Subject: [PATCH 4161/4487] Add ARM dependency of libmemusage.so on libc_nonshared.a. --- ChangeLog.arm | 6 ++++++ sysdeps/arm/Makefile | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/ChangeLog.arm b/ChangeLog.arm index 36027d56a1..0d0b6ff584 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,9 @@ +2012-01-05 Nathan Sidwell + Tom de Vries + + * sysdeps/arm/Makefile (libmemusage.so): Add libc_nonshared.a + dependency. + 2012-01-03 Mike Frysinger [BZ #12354] diff --git a/sysdeps/arm/Makefile b/sysdeps/arm/Makefile index 5651161516..1a88430a2c 100644 --- a/sysdeps/arm/Makefile +++ b/sysdeps/arm/Makefile @@ -7,3 +7,8 @@ endif ifeq ($(subdir),csu) gen-as-const-headers += tlsdesc.sym endif + +# to pull in __aeabi_read_tp, needed for tls +ifeq ($(subdir),malloc) +$(objpfx)libmemusage.so: $(common-objpfx)libc_nonshared.a +endif From 7191c0cfd18f6cbee1632e8cdc00379796b1ae34 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sat, 7 Jan 2012 16:52:21 +0000 Subject: [PATCH 4162/4487] Update alpha files for removal of ia64 from libc. --- ChangeLog.alpha | 6 ++++++ sysdeps/alpha/backtrace.c | 2 +- sysdeps/unix/sysv/linux/alpha/wordexp.c | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index b7d6bb1afb..b011d3ca33 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,9 @@ +2012-01-07 Joseph Myers + + * sysdeps/alpha/backtrace.c: Use x86_64 version of backtrace.c. + * sysdeps/unix/sysv/linux/alpha/wordexp.c: Use sparc64 version of + wordexp.c. + 2011-10-05 Andreas Schwab * sysdeps/alpha/dl-machine.h (elf_machine_rela) diff --git a/sysdeps/alpha/backtrace.c b/sysdeps/alpha/backtrace.c index 297029456d..27ce597b39 100644 --- a/sysdeps/alpha/backtrace.c +++ b/sysdeps/alpha/backtrace.c @@ -1 +1 @@ -#include +#include diff --git a/sysdeps/unix/sysv/linux/alpha/wordexp.c b/sysdeps/unix/sysv/linux/alpha/wordexp.c index 075b267bb4..32aefe579b 100644 --- a/sysdeps/unix/sysv/linux/alpha/wordexp.c +++ b/sysdeps/unix/sysv/linux/alpha/wordexp.c @@ -1 +1 @@ -#include +#include From e3950b2956fe9a4d99c8d2f0a50c1e37eeb7df7e Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sat, 7 Jan 2012 16:52:54 +0000 Subject: [PATCH 4163/4487] Update mips files for removal of ia64 from libc. --- ChangeLog.mips | 4 ++++ sysdeps/mips/backtrace.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 36cae0dd87..ca7820ee65 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,7 @@ +2012-01-07 Joseph Myers + + * sysdeps/mips/backtrace.c: Use x86_64 version of backtrace.c. + 2012-01-04 Tom de Vries * sysdeps/mips/Makefile: Compile initfini.c, pt-initfini.c with diff --git a/sysdeps/mips/backtrace.c b/sysdeps/mips/backtrace.c index 297029456d..27ce597b39 100644 --- a/sysdeps/mips/backtrace.c +++ b/sysdeps/mips/backtrace.c @@ -1 +1 @@ -#include +#include From 647b14570e349c6d269eba14828d76ae982cf1cc Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sat, 7 Jan 2012 16:53:16 +0000 Subject: [PATCH 4164/4487] Update tile files for removal of ia64 from libc. --- ChangeLog.tile | 4 ++++ sysdeps/tile/backtrace.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog.tile b/ChangeLog.tile index 7e97f5fa42..00bbe00b2d 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,3 +1,7 @@ +2012-01-07 Joseph Myers + + * sysdeps/tile/backtrace.c: Use x86_64 version of backtrace.c. + 2011-12-03 Chris Metcalf * data/c++-types-tile-linux-gnu.data: New file. diff --git a/sysdeps/tile/backtrace.c b/sysdeps/tile/backtrace.c index 297029456d..27ce597b39 100644 --- a/sysdeps/tile/backtrace.c +++ b/sysdeps/tile/backtrace.c @@ -1 +1 @@ -#include +#include From 3538f2fb1445c2992cd66503755f7dcd8f3ba6cb Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sat, 7 Jan 2012 18:31:08 +0000 Subject: [PATCH 4165/4487] Add MIPS NPTL shlib-versions file replacing entry in libc copy. --- ChangeLog.mips | 4 ++++ sysdeps/mips/nptl/shlib-versions | 1 + 2 files changed, 5 insertions(+) create mode 100644 sysdeps/mips/nptl/shlib-versions diff --git a/ChangeLog.mips b/ChangeLog.mips index ca7820ee65..73da420653 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,7 @@ +2012-01-07 Joseph Myers + + * sysdeps/mips/nptl/shlib-versions: New. + 2012-01-07 Joseph Myers * sysdeps/mips/backtrace.c: Use x86_64 version of backtrace.c. diff --git a/sysdeps/mips/nptl/shlib-versions b/sysdeps/mips/nptl/shlib-versions new file mode 100644 index 0000000000..97e41aa904 --- /dev/null +++ b/sysdeps/mips/nptl/shlib-versions @@ -0,0 +1 @@ +mips.*-.*-linux.* libpthread=0 GLIBC_2.0 GLIBC_2.2 From 4706886146a93c13efe6fccd0538cdaef31d5508 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 7 Jan 2012 20:12:49 +0100 Subject: [PATCH 4166/4487] m68k: restore configure settings --- ChangeLog.m68k | 6 ++++++ sysdeps/unix/sysv/linux/m68k/configure | 5 +++++ sysdeps/unix/sysv/linux/m68k/configure.in | 5 +++++ 3 files changed, 16 insertions(+) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 8f62c71509..8c81807582 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,9 @@ +2012-01-07 Andreas Schwab + + * sysdeps/unix/sysv/linux/m68k/configure.in: Set + arch_minimum_kernel, libc_cv_gcc_unwind_find_fde and + ldd_rewrite_script. + 2012-01-05 Andreas Schwab * sysdeps/m68k/dl-trampoline.S: Add cfi directives. diff --git a/sysdeps/unix/sysv/linux/m68k/configure b/sysdeps/unix/sysv/linux/m68k/configure index 94ccc508cc..80ba90191f 100644 --- a/sysdeps/unix/sysv/linux/m68k/configure +++ b/sysdeps/unix/sysv/linux/m68k/configure @@ -3,4 +3,9 @@ m68k/coldfire) arch_minimum_kernel=2.6.10 ;; +*) + arch_minimum_kernel=2.0.10 + ;; esac +libc_cv_gcc_unwind_find_fde=yes +ldd_rewrite_script=sysdeps/unix/sysv/linux/ldd-rewrite.sed diff --git a/sysdeps/unix/sysv/linux/m68k/configure.in b/sysdeps/unix/sysv/linux/m68k/configure.in index 285b81f475..e5a94ab8e6 100644 --- a/sysdeps/unix/sysv/linux/m68k/configure.in +++ b/sysdeps/unix/sysv/linux/m68k/configure.in @@ -4,4 +4,9 @@ case $machine in m68k/coldfire) arch_minimum_kernel=2.6.10 ;; +*) + arch_minimum_kernel=2.0.10 + ;; esac +libc_cv_gcc_unwind_find_fde=yes +ldd_rewrite_script=sysdeps/unix/sysv/linux/ldd-rewrite.sed From 5155e70cbe179919d3d10a7b8d91ba9ee775c9fc Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sat, 7 Jan 2012 20:32:29 +0000 Subject: [PATCH 4167/4487] Remove ARM old-ABI support (straightforward parts). --- ChangeLog.arm | 44 +++ sysdeps/arm/__longjmp.S | 37 --- sysdeps/arm/bits/atomic.h | 101 ------ sysdeps/arm/bits/huge_val.h | 56 ---- sysdeps/arm/bits/setjmp.h | 34 -- sysdeps/arm/fpu/__longjmp.S | 36 -- sysdeps/arm/fpu/bits/fenv.h | 58 ---- sysdeps/arm/fpu/bits/setjmp.h | 34 -- sysdeps/arm/fpu/fclrexcpt.c | 50 --- sysdeps/arm/fpu/fedisblxcpt.c | 40 --- sysdeps/arm/fpu/feenablxcpt.c | 40 --- sysdeps/arm/fpu/fegetenv.c | 41 --- sysdeps/arm/fpu/fegetexcept.c | 32 -- sysdeps/arm/fpu/fegetround.c | 26 -- sysdeps/arm/fpu/feholdexcpt.c | 39 --- sysdeps/arm/fpu/fesetenv.c | 45 --- sysdeps/arm/fpu/fesetround.c | 29 -- sysdeps/arm/fpu/fpu_control.h | 102 ------ sysdeps/arm/fpu/fraiseexcpt.c | 44 --- sysdeps/arm/fpu/fsetexcptflg.c | 49 --- sysdeps/arm/fpu/ftestexcept.c | 33 -- sysdeps/arm/fpu/jmpbuf-offsets.h | 20 -- sysdeps/arm/fpu/setjmp.S | 37 --- sysdeps/arm/jmpbuf-offsets.h | 20 -- sysdeps/arm/machine-gmon.h | 90 ----- sysdeps/arm/preconfigure | 3 +- sysdeps/arm/setjmp.S | 33 -- sysdeps/unix/sysv/linux/arm/____longjmp_chk.S | 75 ----- sysdeps/unix/sysv/linux/arm/check_pf.c | 312 ------------------ sysdeps/unix/sysv/linux/arm/eabi/Makefile | 3 - sysdeps/unix/sysv/linux/arm/eabi/check_pf.c | 1 - sysdeps/unix/sysv/linux/arm/mmap64.S | 89 ----- sysdeps/unix/sysv/linux/arm/msgctl.c | 1 - sysdeps/unix/sysv/linux/arm/nptl/Makefile | 8 - .../unix/sysv/linux/arm/nptl/sysdep-cancel.h | 136 -------- .../sysv/linux/arm/nptl/unwind-forcedunwind.c | 146 -------- .../unix/sysv/linux/arm/nptl/unwind-resume.c | 87 ----- sysdeps/unix/sysv/linux/arm/nptl/unwind.h | 31 -- sysdeps/unix/sysv/linux/arm/semctl.c | 1 - sysdeps/unix/sysv/linux/arm/shmctl.c | 1 - sysdeps/unix/sysv/linux/arm/sigrestorer.S | 35 -- 41 files changed, 46 insertions(+), 2053 deletions(-) delete mode 100644 sysdeps/arm/__longjmp.S delete mode 100644 sysdeps/arm/bits/atomic.h delete mode 100644 sysdeps/arm/bits/huge_val.h delete mode 100644 sysdeps/arm/bits/setjmp.h delete mode 100644 sysdeps/arm/fpu/__longjmp.S delete mode 100644 sysdeps/arm/fpu/bits/fenv.h delete mode 100644 sysdeps/arm/fpu/bits/setjmp.h delete mode 100644 sysdeps/arm/fpu/fclrexcpt.c delete mode 100644 sysdeps/arm/fpu/fedisblxcpt.c delete mode 100644 sysdeps/arm/fpu/feenablxcpt.c delete mode 100644 sysdeps/arm/fpu/fegetenv.c delete mode 100644 sysdeps/arm/fpu/fegetexcept.c delete mode 100644 sysdeps/arm/fpu/fegetround.c delete mode 100644 sysdeps/arm/fpu/feholdexcpt.c delete mode 100644 sysdeps/arm/fpu/fesetenv.c delete mode 100644 sysdeps/arm/fpu/fesetround.c delete mode 100644 sysdeps/arm/fpu/fpu_control.h delete mode 100644 sysdeps/arm/fpu/fraiseexcpt.c delete mode 100644 sysdeps/arm/fpu/fsetexcptflg.c delete mode 100644 sysdeps/arm/fpu/ftestexcept.c delete mode 100644 sysdeps/arm/fpu/jmpbuf-offsets.h delete mode 100644 sysdeps/arm/fpu/setjmp.S delete mode 100644 sysdeps/arm/jmpbuf-offsets.h delete mode 100644 sysdeps/arm/machine-gmon.h delete mode 100644 sysdeps/arm/setjmp.S delete mode 100644 sysdeps/unix/sysv/linux/arm/____longjmp_chk.S delete mode 100644 sysdeps/unix/sysv/linux/arm/check_pf.c delete mode 100644 sysdeps/unix/sysv/linux/arm/eabi/check_pf.c delete mode 100644 sysdeps/unix/sysv/linux/arm/mmap64.S delete mode 100644 sysdeps/unix/sysv/linux/arm/msgctl.c delete mode 100644 sysdeps/unix/sysv/linux/arm/nptl/Makefile delete mode 100644 sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h delete mode 100644 sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c delete mode 100644 sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c delete mode 100644 sysdeps/unix/sysv/linux/arm/nptl/unwind.h delete mode 100644 sysdeps/unix/sysv/linux/arm/semctl.c delete mode 100644 sysdeps/unix/sysv/linux/arm/shmctl.c delete mode 100644 sysdeps/unix/sysv/linux/arm/sigrestorer.S diff --git a/ChangeLog.arm b/ChangeLog.arm index 0d0b6ff584..70bc5404b9 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,47 @@ +2012-01-07 Joseph Myers + + * sysdeps/arm/preconfigure: Give error for old-ABI ARM. + * sysdeps/unix/sysv/linux/arm/eabi/Makefile (arm-using-eabi): + Don't define. + * sysdeps/arm/__longjmp.S: Remove. + * sysdeps/arm/bits/atomic.h: Remove. + * sysdeps/arm/bits/huge_val.h: Remove. + * sysdeps/arm/bits/setjmp.h: Remove. + * sysdeps/arm/fpu/__longjmp.S: Remove. + * sysdeps/arm/fpu/bits/fenv.h: Remove. + * sysdeps/arm/fpu/bits/setjmp.h: Remove. + * sysdeps/arm/fpu/fclrexcpt.c: Remove. + * sysdeps/arm/fpu/fedisblxcpt.c: Remove. + * sysdeps/arm/fpu/feenablxcpt.c: Remove. + * sysdeps/arm/fpu/fegetenv.c: Remove. + * sysdeps/arm/fpu/fegetexcept.c: Remove. + * sysdeps/arm/fpu/fegetround.c: Remove. + * sysdeps/arm/fpu/feholdexcpt.c: Remove. + * sysdeps/arm/fpu/fesetenv.c: Remove. + * sysdeps/arm/fpu/fesetround.c: Remove. + * sysdeps/arm/fpu/fpu_control.h: Remove. + * sysdeps/arm/fpu/fraiseexcpt.c: Remove. + * sysdeps/arm/fpu/fsetexcptflg.c: Remove. + * sysdeps/arm/fpu/ftestexcept.c: Remove. + * sysdeps/arm/fpu/jmpbuf-offsets.h: Remove. + * sysdeps/arm/fpu/setjmp.S: Remove. + * sysdeps/arm/jmpbuf-offsets.h: Remove. + * sysdeps/arm/machine-gmon.h: Remove. + * sysdeps/arm/setjmp.S: Remove. + * sysdeps/unix/sysv/linux/arm/____longjmp_chk.S: Remove. + * sysdeps/unix/sysv/linux/arm/check_pf.c: Remove. + * sysdeps/unix/sysv/linux/arm/eabi/check_pf.c: Remove. + * sysdeps/unix/sysv/linux/arm/mmap64.S: Remove. + * sysdeps/unix/sysv/linux/arm/msgctl.c: Remove. + * sysdeps/unix/sysv/linux/arm/nptl/Makefile: Remove. + * sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h: Remove. + * sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c: Remove. + * sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c: Remove. + * sysdeps/unix/sysv/linux/arm/nptl/unwind.h: Remove. + * sysdeps/unix/sysv/linux/arm/semctl.c: Remove. + * sysdeps/unix/sysv/linux/arm/shmctl.c: Remove. + * sysdeps/unix/sysv/linux/arm/sigrestorer.S: Remove. + 2012-01-05 Nathan Sidwell Tom de Vries diff --git a/sysdeps/arm/__longjmp.S b/sysdeps/arm/__longjmp.S deleted file mode 100644 index 09e6386417..0000000000 --- a/sysdeps/arm/__longjmp.S +++ /dev/null @@ -1,37 +0,0 @@ -/* longjmp for ARM. - Copyright (C) 1997, 1998, 2009 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. */ - -#include -#define _SETJMP_H -#define _ASM -#include - -/* __longjmp(jmpbuf, val) */ - -ENTRY (__longjmp) - mov ip, r0 - movs r0, r1 /* get the return value in place */ - moveq r0, #1 /* can't let setjmp() return zero! */ - -#ifdef CHECK_SP - ldr r4, [ip, #32] - CHECK_SP (r4) -#endif - LOADREGS(ia, ip, {v1-v6, sl, fp, sp, pc}) -END (__longjmp) diff --git a/sysdeps/arm/bits/atomic.h b/sysdeps/arm/bits/atomic.h deleted file mode 100644 index 14d2dbe0e9..0000000000 --- a/sysdeps/arm/bits/atomic.h +++ /dev/null @@ -1,101 +0,0 @@ -/* Copyright (C) 2002, 2003, 2004, 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 - 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. */ - -#include -#include - - -typedef int8_t atomic8_t; -typedef uint8_t uatomic8_t; -typedef int_fast8_t atomic_fast8_t; -typedef uint_fast8_t uatomic_fast8_t; - -typedef int32_t atomic32_t; -typedef uint32_t uatomic32_t; -typedef int_fast32_t atomic_fast32_t; -typedef uint_fast32_t uatomic_fast32_t; - -typedef intptr_t atomicptr_t; -typedef uintptr_t uatomicptr_t; -typedef intmax_t atomic_max_t; -typedef uintmax_t uatomic_max_t; - -void __arm_link_error (void); - -#define atomic_exchange_acq(mem, newvalue) \ - ({ __typeof (*mem) result; \ - if (sizeof (*mem) == 1) \ - __asm__ __volatile__ ("swpb %0, %1, [%2]" \ - : "=&r,&r" (result) \ - : "r,0" (newvalue), "r,r" (mem) : "memory"); \ - else if (sizeof (*mem) == 4) \ - __asm__ __volatile__ ("swp %0, %1, [%2]" \ - : "=&r,&r" (result) \ - : "r,0" (newvalue), "r,r" (mem) : "memory"); \ - else \ - { \ - result = 0; \ - abort (); \ - } \ - result; }) - -/* Atomic compare and exchange. These sequences are not actually atomic; - there is a race if *MEM != OLDVAL and we are preempted between the two - swaps. However, they are very close to atomic, and are the best that a - pre-ARMv6 implementation can do without operating system support. - LinuxThreads has been using these sequences for many years. */ - -#define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval) \ - ({ __typeof (oldval) result, tmp; \ - __asm__ ("\n" \ - "0:\tldr\t%1,[%2]\n\t" \ - "cmp\t%1,%4\n\t" \ - "movne\t%0,%1\n\t" \ - "bne\t1f\n\t" \ - "swpb\t%0,%3,[%2]\n\t" \ - "cmp\t%1,%0\n\t" \ - "swpbne\t%1,%0,[%2]\n\t" \ - "bne\t0b\n\t" \ - "1:" \ - : "=&r" (result), "=&r" (tmp) \ - : "r" (mem), "r" (newval), "r" (oldval) \ - : "cc", "memory"); \ - result; }) - -#define __arch_compare_and_exchange_val_16_acq(mem, newval, oldval) \ - ({ __arm_link_error (); oldval; }) - -#define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \ - ({ __typeof (oldval) result, tmp; \ - __asm__ ("\n" \ - "0:\tldr\t%1,[%2]\n\t" \ - "cmp\t%1,%4\n\t" \ - "movne\t%0,%1\n\t" \ - "bne\t1f\n\t" \ - "swp\t%0,%3,[%2]\n\t" \ - "cmp\t%1,%0\n\t" \ - "swpne\t%1,%0,[%2]\n\t" \ - "bne\t0b\n\t" \ - "1:" \ - : "=&r" (result), "=&r" (tmp) \ - : "r" (mem), "r" (newval), "r" (oldval) \ - : "cc", "memory"); \ - result; }) - -#define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \ - ({ __arm_link_error (); oldval; }) diff --git a/sysdeps/arm/bits/huge_val.h b/sysdeps/arm/bits/huge_val.h deleted file mode 100644 index 3339a0d01c..0000000000 --- a/sysdeps/arm/bits/huge_val.h +++ /dev/null @@ -1,56 +0,0 @@ -/* `HUGE_VAL' constant for IEEE 754 machines (where it is infinity). - Used by and functions for overflow. - ARM version. - Copyright (C) 1992, 95, 96, 97, 98, 99, 2000, 2004 - 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 _MATH_H -# error "Never use directly; include instead." -#endif - -/* IEEE positive infinity (-HUGE_VAL is negative infinity). */ - -#if __GNUC_PREREQ(3,3) -# define HUGE_VAL (__builtin_huge_val()) -#elif __GNUC_PREREQ(2,96) -# define HUGE_VAL (__extension__ 0x1.0p2047) -#elif defined __GNUC__ - -# define HUGE_VAL \ - (__extension__ \ - ((union { unsigned __l __attribute__((__mode__(__DI__))); double __d; }) \ - { __l: 0x000000007ff00000ULL }).__d) - -#else /* not GCC */ - -# include - -typedef union { unsigned char __c[8]; double __d; } __huge_val_t; - -# if __BYTE_ORDER == __BIG_ENDIAN -# define __HUGE_VAL_bytes { 0, 0, 0, 0, 0x7f, 0xf0, 0, 0 } -# endif -# if __BYTE_ORDER == __LITTLE_ENDIAN -# define __HUGE_VAL_bytes { 0, 0, 0xf0, 0x7f, 0, 0, 0, 0 } -# endif - -static __huge_val_t __huge_val = { __HUGE_VAL_bytes }; -# define HUGE_VAL (__huge_val.__d) - -#endif /* GCC. */ diff --git a/sysdeps/arm/bits/setjmp.h b/sysdeps/arm/bits/setjmp.h deleted file mode 100644 index 2792350f8b..0000000000 --- a/sysdeps/arm/bits/setjmp.h +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (C) 1997,1998,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 - 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. */ - -/* Define the machine-dependent type `jmp_buf'. ARM version. */ - -#ifndef _BITS_SETJMP_H -#define _BITS_SETJMP_H 1 - -#if !defined _SETJMP_H && !defined _PTHREAD_H -# error "Never include directly; use instead." -#endif - -#ifndef _ASM -/* Jump buffer contains v1-v6, sl, fp, sp and pc. Other registers are not - saved. */ -typedef int __jmp_buf[10]; -#endif - -#endif diff --git a/sysdeps/arm/fpu/__longjmp.S b/sysdeps/arm/fpu/__longjmp.S deleted file mode 100644 index 90efeec1eb..0000000000 --- a/sysdeps/arm/fpu/__longjmp.S +++ /dev/null @@ -1,36 +0,0 @@ -/* longjmp for ARM. - Copyright (C) 1997, 1998 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. */ - -#include -#define _SETJMP_H -#define _ASM -#include - -/* __longjmp(jmpbuf, val) */ - -ENTRY (__longjmp) - mov ip, r0 /* save jmp_buf pointer */ - - movs r0, r1 /* get the return value in place */ - moveq r0, #1 /* can't let setjmp() return zero! */ - - lfmfd f4, 4, [ip] ! /* load the floating point regs */ - - LOADREGS(ia, ip, {v1-v6, sl, fp, sp, pc}) -END (__longjmp) diff --git a/sysdeps/arm/fpu/bits/fenv.h b/sysdeps/arm/fpu/bits/fenv.h deleted file mode 100644 index 7bd242385f..0000000000 --- a/sysdeps/arm/fpu/bits/fenv.h +++ /dev/null @@ -1,58 +0,0 @@ -/* Copyright (C) 1997, 1998, 1999 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 _FENV_H -# error "Never use directly; include instead." -#endif - -/* Define bits representing exceptions in the FPU status word. */ -enum - { - FE_INVALID = 1, -#define FE_INVALID FE_INVALID - FE_DIVBYZERO = 2, -#define FE_DIVBYZERO FE_DIVBYZERO - FE_OVERFLOW = 4, -#define FE_OVERFLOW FE_OVERFLOW - FE_UNDERFLOW = 8, -#define FE_UNDERFLOW FE_UNDERFLOW - }; - -/* Amount to shift by to convert an exception to a mask bit. */ -#define FE_EXCEPT_SHIFT 16 - -/* All supported exceptions. */ -#define FE_ALL_EXCEPT \ - (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW) - -/* The ARM FPU basically only supports round-to-nearest. Other rounding - modes exist, but you have to encode them in the actual instruction. */ -#define FE_TONEAREST 0 - -/* Type representing exception flags. */ -typedef unsigned long int fexcept_t; - -/* Type representing floating-point environment. */ -typedef struct - { - unsigned long int __cw; - } -fenv_t; - -/* If the default argument is used we use this value. */ -#define FE_DFL_ENV ((fenv_t *) -1l) diff --git a/sysdeps/arm/fpu/bits/setjmp.h b/sysdeps/arm/fpu/bits/setjmp.h deleted file mode 100644 index 431fa039a2..0000000000 --- a/sysdeps/arm/fpu/bits/setjmp.h +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (C) 1997, 1998, 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 - 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. */ - -/* Define the machine-dependent type `jmp_buf'. ARM version. */ - -#ifndef _BITS_SETJMP_H -#define _BITS_SETJMP_H 1 - -#if !defined _SETJMP_H && !defined _PTHREAD_H -# error "Never include directly; use instead." -#endif - -#ifndef _ASM -/* Jump buffer contains v1-v6, sl, fp, sp and pc. Other registers are not - saved. */ -typedef int __jmp_buf[22]; -#endif - -#endif diff --git a/sysdeps/arm/fpu/fclrexcpt.c b/sysdeps/arm/fpu/fclrexcpt.c deleted file mode 100644 index c6a53df45a..0000000000 --- a/sysdeps/arm/fpu/fclrexcpt.c +++ /dev/null @@ -1,50 +0,0 @@ -/* Clear given exceptions in current floating-point environment. - Copyright (C) 1997,98,99,2000,01 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. */ - -#include -#include - -int -__feclearexcept (int excepts) -{ - unsigned long int temp; - - /* Mask out unsupported bits/exceptions. */ - excepts &= FE_ALL_EXCEPT; - - /* Get the current floating point status. */ - _FPU_GETCW (temp); - - /* Clear the relevant bits. */ - temp &= excepts ^ FE_ALL_EXCEPT; - - /* Put the new data in effect. */ - _FPU_SETCW (temp); - - /* Success. */ - return 0; -} - -#include -#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) -strong_alias (__feclearexcept, __old_feclearexcept) -compat_symbol (libm, __old_feclearexcept, feclearexcept, GLIBC_2_1); -#endif - -versioned_symbol (libm, __feclearexcept, feclearexcept, GLIBC_2_2); diff --git a/sysdeps/arm/fpu/fedisblxcpt.c b/sysdeps/arm/fpu/fedisblxcpt.c deleted file mode 100644 index 91f60a9c90..0000000000 --- a/sysdeps/arm/fpu/fedisblxcpt.c +++ /dev/null @@ -1,40 +0,0 @@ -/* Disable floating-point exceptions. - Copyright (C) 2001 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Philip Blundell , 2001. - - 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. */ - -#include -#include - -int -fedisableexcept (int excepts) -{ - unsigned long int new_exc, old_exc; - - _FPU_GETCW(new_exc); - - old_exc = (new_exc >> FE_EXCEPT_SHIFT) & FE_ALL_EXCEPT; - - excepts &= FE_ALL_EXCEPT; - - new_exc &= ~(excepts << FE_EXCEPT_SHIFT); - - _FPU_SETCW(new_exc); - - return old_exc; -} diff --git a/sysdeps/arm/fpu/feenablxcpt.c b/sysdeps/arm/fpu/feenablxcpt.c deleted file mode 100644 index e77e45a523..0000000000 --- a/sysdeps/arm/fpu/feenablxcpt.c +++ /dev/null @@ -1,40 +0,0 @@ -/* Enable floating-point exceptions. - Copyright (C) 2001 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Philip Blundell , 2001. - - 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. */ - -#include -#include - -int -feenableexcept (int excepts) -{ - unsigned long int new_exc, old_exc; - - _FPU_GETCW(new_exc); - - old_exc = (new_exc >> FE_EXCEPT_SHIFT) & FE_ALL_EXCEPT; - - excepts &= FE_ALL_EXCEPT; - - new_exc |= (excepts << FE_EXCEPT_SHIFT); - - _FPU_SETCW(new_exc); - - return old_exc; -} diff --git a/sysdeps/arm/fpu/fegetenv.c b/sysdeps/arm/fpu/fegetenv.c deleted file mode 100644 index e59d2ebc44..0000000000 --- a/sysdeps/arm/fpu/fegetenv.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Store current floating-point environment. - Copyright (C) 1997,98,99,2000,01,10 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. */ - -#include -#include - -int -__fegetenv (fenv_t *envp) -{ - unsigned long int temp; - _FPU_GETCW (temp); - envp->__cw = temp; - - /* Success. */ - return 0; -} - -#include -#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) -strong_alias (__fegetenv, __old_fegetenv) -compat_symbol (libm, __old_fegetenv, fegetenv, GLIBC_2_1); -#endif - -libm_hidden_ver (__fegetenv, fegetenv) -versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2); diff --git a/sysdeps/arm/fpu/fegetexcept.c b/sysdeps/arm/fpu/fegetexcept.c deleted file mode 100644 index 653c8d5a0d..0000000000 --- a/sysdeps/arm/fpu/fegetexcept.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Get floating-point exceptions. - Copyright (C) 2001 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Philip Blundell , 2001 - - 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. */ - -#include -#include - -int -fegetexcept (void) -{ - unsigned long temp; - - _FPU_GETCW (temp); - - return (temp >> FE_EXCEPT_SHIFT) & FE_ALL_EXCEPT; -} diff --git a/sysdeps/arm/fpu/fegetround.c b/sysdeps/arm/fpu/fegetround.c deleted file mode 100644 index 6bf65f5b5e..0000000000 --- a/sysdeps/arm/fpu/fegetround.c +++ /dev/null @@ -1,26 +0,0 @@ -/* Return current rounding direction. - Copyright (C) 1997, 1998 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. */ - -#include - -int -fegetround (void) -{ - return FE_TONEAREST; /* Easy. :-) */ -} diff --git a/sysdeps/arm/fpu/feholdexcpt.c b/sysdeps/arm/fpu/feholdexcpt.c deleted file mode 100644 index ae8c6a6d6b..0000000000 --- a/sysdeps/arm/fpu/feholdexcpt.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Store current floating-point environment and clear exceptions. - Copyright (C) 1997, 1998, 1999 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. */ - -#include -#include - -int -feholdexcept (fenv_t *envp) -{ - unsigned long int temp; - - /* Store the environment. */ - _FPU_GETCW(temp); - envp->__cw = temp; - - /* Now set all exceptions to non-stop. */ - temp &= ~(FE_ALL_EXCEPT << FE_EXCEPT_SHIFT); - _FPU_SETCW(temp); - - return 0; -} - -libm_hidden_def (feholdexcept) diff --git a/sysdeps/arm/fpu/fesetenv.c b/sysdeps/arm/fpu/fesetenv.c deleted file mode 100644 index bb8812acaf..0000000000 --- a/sysdeps/arm/fpu/fesetenv.c +++ /dev/null @@ -1,45 +0,0 @@ -/* Install given floating-point environment. - Copyright (C) 1997,98,99,2000,01,02 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. */ - -#include -#include - -int -__fesetenv (const fenv_t *envp) -{ - if (envp == FE_DFL_ENV) - _FPU_SETCW (_FPU_DEFAULT); - else - { - unsigned long int temp = envp->__cw; - _FPU_SETCW (temp); - } - - /* Success. */ - return 0; -} - -#include -#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) -strong_alias (__fesetenv, __old_fesetenv) -compat_symbol (libm, __old_fesetenv, fesetenv, GLIBC_2_1); -#endif - -libm_hidden_ver (__fesetenv, fesetenv) -versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2); diff --git a/sysdeps/arm/fpu/fesetround.c b/sysdeps/arm/fpu/fesetround.c deleted file mode 100644 index 2733e7f5dd..0000000000 --- a/sysdeps/arm/fpu/fesetround.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Set current rounding direction. - Copyright (C) 1997, 1998 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. */ - -#include - -int -fesetround (int round) -{ - /* We only support FE_TONEAREST, so there is no need for any work. */ - return (round == FE_TONEAREST)?0:1; -} - -libm_hidden_def (fesetround) diff --git a/sysdeps/arm/fpu/fpu_control.h b/sysdeps/arm/fpu/fpu_control.h deleted file mode 100644 index 65912e4962..0000000000 --- a/sysdeps/arm/fpu/fpu_control.h +++ /dev/null @@ -1,102 +0,0 @@ -/* FPU control word definitions. ARM version. - Copyright (C) 1996, 1997, 1998, 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 - 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 _FPU_CONTROL_H -#define _FPU_CONTROL_H - -/* We have a slight terminology confusion here. On the ARM, the register - * we're interested in is actually the FPU status word - the FPU control - * word is something different (which is implementation-defined and only - * accessible from supervisor mode.) - * - * The FPSR looks like this: - * - * 31-24 23-16 15-8 7-0 - * | system ID | trap enable | system control | exception flags | - * - * We ignore the system ID bits; for interest's sake they are: - * - * 0000 "old" FPE - * 1000 FPPC hardware - * 0001 FPE 400 - * 1001 FPA hardware - * - * The trap enable and exception flags are both structured like this: - * - * 7 - 5 4 3 2 1 0 - * | reserved | INX | UFL | OFL | DVZ | IVO | - * - * where a `1' bit in the enable byte means that the trap can occur, and - * a `1' bit in the flags byte means the exception has occurred. - * - * The exceptions are: - * - * IVO - invalid operation - * DVZ - divide by zero - * OFL - overflow - * UFL - underflow - * INX - inexact (do not use; implementations differ) - * - * The system control byte looks like this: - * - * 7-5 4 3 2 1 0 - * | reserved | AC | EP | SO | NE | ND | - * - * where the bits mean - * - * ND - no denormalised numbers (force them all to zero) - * NE - enable NaN exceptions - * SO - synchronous operation - * EP - use expanded packed-decimal format - * AC - use alternate definition for C flag on compare operations - */ - -/* masking of interrupts */ -#define _FPU_MASK_IM 0x00010000 /* invalid operation */ -#define _FPU_MASK_ZM 0x00020000 /* divide by zero */ -#define _FPU_MASK_OM 0x00040000 /* overflow */ -#define _FPU_MASK_UM 0x00080000 /* underflow */ -#define _FPU_MASK_PM 0x00100000 /* inexact */ -#define _FPU_MASK_DM 0x00000000 /* denormalized operation */ - -/* The system id bytes cannot be changed. - Only the bottom 5 bits in the trap enable byte can be changed. - Only the bottom 5 bits in the system control byte can be changed. - Only the bottom 5 bits in the exception flags are used. - The exception flags are set by the fpu, but can be zeroed by the user. */ -#define _FPU_RESERVED 0xffe0e0e0 /* These bits are reserved. */ - -/* The fdlibm code requires strict IEEE double precision arithmetic, - no interrupts for exceptions, rounding to nearest. Changing the - rounding mode will break long double I/O. Turn on the AC bit, - the compiler generates code that assumes it is on. */ -#define _FPU_DEFAULT 0x00001000 /* Default value. */ -#define _FPU_IEEE 0x001f1000 /* Default + exceptions enabled. */ - -/* Type of the control word. */ -typedef unsigned int fpu_control_t; - -/* Macros for accessing the hardware control word. */ -#define _FPU_GETCW(cw) __asm__ ("rfs %0" : "=r" (cw)) -#define _FPU_SETCW(cw) __asm__ ("wfs %0" : : "r" (cw)) - -/* Default control word set at startup. */ -extern fpu_control_t __fpu_control; - -#endif /* _FPU_CONTROL_H */ diff --git a/sysdeps/arm/fpu/fraiseexcpt.c b/sysdeps/arm/fpu/fraiseexcpt.c deleted file mode 100644 index f7dede2fe2..0000000000 --- a/sysdeps/arm/fpu/fraiseexcpt.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Raise given exceptions. - Copyright (C) 1997,98,99,2000,01,02 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. */ - -#include -#include -#include - -int -__feraiseexcept (int excepts) -{ - /* Raise exceptions represented by EXPECTS. */ - fexcept_t temp; - _FPU_GETCW (temp); - temp |= (excepts & FE_ALL_EXCEPT); - _FPU_SETCW (temp); - - /* Success. */ - return 0; -} - -#include -#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) -strong_alias (__feraiseexcept, __old_feraiseexcept) -compat_symbol (libm, __old_feraiseexcept, feraiseexcept, GLIBC_2_1); -#endif - -libm_hidden_ver (__feraiseexcept, feraiseexcept) -versioned_symbol (libm, __feraiseexcept, feraiseexcept, GLIBC_2_2); diff --git a/sysdeps/arm/fpu/fsetexcptflg.c b/sysdeps/arm/fpu/fsetexcptflg.c deleted file mode 100644 index 4e1d2cba4a..0000000000 --- a/sysdeps/arm/fpu/fsetexcptflg.c +++ /dev/null @@ -1,49 +0,0 @@ -/* Set floating-point environment exception handling. - Copyright (C) 1997,98,99,2000,01 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. */ - -#include -#include -#include - -int -__fesetexceptflag (const fexcept_t *flagp, int excepts) -{ - fexcept_t temp; - - /* Get the current environment. */ - _FPU_GETCW (temp); - - /* Set the desired exception mask. */ - temp &= ~((excepts & FE_ALL_EXCEPT) << FE_EXCEPT_SHIFT); - temp |= (*flagp & excepts & FE_ALL_EXCEPT) << FE_EXCEPT_SHIFT; - - /* Save state back to the FPU. */ - _FPU_SETCW (temp); - - /* Success. */ - return 0; -} - -#include -#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) -strong_alias (__fesetexceptflag, __old_fesetexceptflag) -compat_symbol (libm, __old_fesetexceptflag, fesetexceptflag, GLIBC_2_1); -#endif - -versioned_symbol (libm, __fesetexceptflag, fesetexceptflag, GLIBC_2_2); diff --git a/sysdeps/arm/fpu/ftestexcept.c b/sysdeps/arm/fpu/ftestexcept.c deleted file mode 100644 index c796b01ee4..0000000000 --- a/sysdeps/arm/fpu/ftestexcept.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Test exception in current environment. - Copyright (C) 1997, 1998, 2010 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. */ - -#include -#include - -int -fetestexcept (int excepts) -{ - fexcept_t temp; - - /* Get current exceptions. */ - _FPU_GETCW(temp); - - return temp & excepts & FE_ALL_EXCEPT; -} -libm_hidden_def (fetestexcept) diff --git a/sysdeps/arm/fpu/jmpbuf-offsets.h b/sysdeps/arm/fpu/jmpbuf-offsets.h deleted file mode 100644 index ad2a75ba0f..0000000000 --- a/sysdeps/arm/fpu/jmpbuf-offsets.h +++ /dev/null @@ -1,20 +0,0 @@ -/* Private macros for accessing __jmp_buf contents. ARM/FPU version. - Copyright (C) 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 - 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. */ - -#define __JMP_BUF_SP 20 diff --git a/sysdeps/arm/fpu/setjmp.S b/sysdeps/arm/fpu/setjmp.S deleted file mode 100644 index 82a7e194f1..0000000000 --- a/sysdeps/arm/fpu/setjmp.S +++ /dev/null @@ -1,37 +0,0 @@ -/* setjmp for ARM. - Copyright (C) 1997, 1998 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. */ - -#include -#define _SETJMP_H -#define _ASM -#include - -ENTRY (__sigsetjmp) - /* Save registers */ - sfmea f4, 4, [r0]! - stmia r0, {v1-v6, sl, fp, sp, lr} - - /* Restore pointer to jmp_buf */ - sub r0, r0, #48 - - /* Make a tail call to __sigjmp_save; it takes the same args. */ - B PLTJMP(C_SYMBOL_NAME(__sigjmp_save)) -END (__sigsetjmp) - -hidden_def (__sigsetjmp) diff --git a/sysdeps/arm/jmpbuf-offsets.h b/sysdeps/arm/jmpbuf-offsets.h deleted file mode 100644 index d4f7fe2bf3..0000000000 --- a/sysdeps/arm/jmpbuf-offsets.h +++ /dev/null @@ -1,20 +0,0 @@ -/* Private macros for accessing __jmp_buf contents. ARM version. - Copyright (C) 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 - 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. */ - -#define __JMP_BUF_SP 8 diff --git a/sysdeps/arm/machine-gmon.h b/sysdeps/arm/machine-gmon.h deleted file mode 100644 index dbda0ddeba..0000000000 --- a/sysdeps/arm/machine-gmon.h +++ /dev/null @@ -1,90 +0,0 @@ -/* Machine-dependent definitions for profiling support. ARM version. - Copyright (C) 1996, 1997, 1998 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. */ - -/* GCC for the ARM cannot compile __builtin_return_address(N) for N != 0, - so we must use an assembly stub. */ - -#include -#ifndef NO_UNDERSCORES -/* The asm symbols for C functions are `_function'. - The canonical name for the counter function is `mcount', no _. */ -void _mcount (void) asm ("mcount"); -#else -/* The canonical name for the function is `_mcount' in both C and asm, - but some old asm code might assume it's `mcount'. */ -void _mcount (void); -weak_alias (_mcount, mcount) -#endif - -static void mcount_internal (u_long frompc, u_long selfpc) __attribute_used__; - -#define _MCOUNT_DECL(frompc, selfpc) \ -static void mcount_internal (u_long frompc, u_long selfpc) - -/* This macro/func MUST save r0, r1 because the compiler inserts - blind calls to _mount(), ignoring the fact that _mcount may - clobber registers; therefore, _mcount may NOT clobber registers */ -/* if (this_fp!=0) { - r0 = this_fp - r1 = this_lr - r1 = [r1-4] which is caller's lr - if (r1!=0) - r1 = caller's lr - call mcount_internal(this_lr, caller's_lr) - } -*/ - -#ifdef __thumb2__ - -#define MCOUNT \ -void _mcount (void) \ -{ \ - __asm__("push {r0, r1, r2, r3};" \ - "movs fp, fp;" \ - "it eq;" \ - "moveq r1, #0;" \ - "itttt ne;" \ - "ldrne r1, [fp, $-4];" \ - "ldrne r0, [fp, $-12];" \ - "movnes r0, r0;" \ - "ldrne r0, [r0, $-4];" \ - "movs r0, r0;" \ - "it ne;" \ - "blne mcount_internal;" \ - "pop {r0, r1, r2, r3}"); \ -} - -#else - -#define MCOUNT \ -void _mcount (void) \ -{ \ - __asm__("stmdb sp!, {r0, r1, r2, r3};" \ - "movs fp, fp;" \ - "moveq r1, #0;" \ - "ldrne r1, [fp, $-4];" \ - "ldrne r0, [fp, $-12];" \ - "movnes r0, r0;" \ - "ldrne r0, [r0, $-4];" \ - "movs r0, r0;" \ - "blne mcount_internal;" \ - "ldmia sp!, {r0, r1, r2, r3}"); \ -} - -#endif diff --git a/sysdeps/arm/preconfigure b/sysdeps/arm/preconfigure index 276661dab1..a4967004f4 100644 --- a/sysdeps/arm/preconfigure +++ b/sysdeps/arm/preconfigure @@ -42,7 +42,8 @@ arm*) CFLAGS="$CFLAGS -fno-unwind-tables" ;; *) - machine=arm/$machine + echo "Old ABI no longer supported" 2>&1 + exit 1 ;; esac ;; diff --git a/sysdeps/arm/setjmp.S b/sysdeps/arm/setjmp.S deleted file mode 100644 index 3fff9e9b5e..0000000000 --- a/sysdeps/arm/setjmp.S +++ /dev/null @@ -1,33 +0,0 @@ -/* setjmp for ARM. - Copyright (C) 1997, 1998, 2008 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. */ - -#include -#define _SETJMP_H -#define _ASM -#include - -ENTRY (__sigsetjmp) - /* Save registers */ - stmia r0, {v1-v6, sl, fp, sp, lr} - - /* Make a tail call to __sigjmp_save; it takes the same args. */ - B PLTJMP(C_SYMBOL_NAME(__sigjmp_save)) -END (__sigsetjmp) - -hidden_def (__sigsetjmp) diff --git a/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S b/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S deleted file mode 100644 index bac25635fa..0000000000 --- a/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S +++ /dev/null @@ -1,75 +0,0 @@ -/* Copyright (C) 2009 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. */ - -#include - - .section .rodata.str1.1,"aMS",%progbits,1 - .type longjmp_msg,%object -longjmp_msg: - .string "longjmp causes uninitialized stack frame" - .size longjmp_msg, .-longjmp_msg - .text - -#define __longjmp ____longjmp_chk - -#ifdef PIC -# define CALL_FAIL \ - ldr sl, .L_GOT; \ -.L_GOT_OFF: \ - add sl, pc, sl; \ - ldr r0, .Lstr; \ - add r0, sl, r0; \ - B PLTJMP(HIDDEN_JUMPTARGET(__fortify_fail)); \ -.L_GOT: \ - .word _GLOBAL_OFFSET_TABLE_-(.L_GOT_OFF+8); \ -.Lstr: \ - .word longjmp_msg(GOTOFF); -#else -# define CALL_FAIL \ - ldr r0, .Lstr; \ - B HIDDEN_JUMPTARGET(__fortify_fail); \ -.Lstr: \ - .word longjmp_msg; -#endif - -#define CHECK_SP(reg) \ - cmp sp, reg; \ - bls .Lok; \ - mov r5, r0; \ - mov r0, #0; \ - sub sp, sp, #16; \ - mov r1, sp; \ - swi #SYS_ify(sigaltstack); \ - cmp r0, #0; \ - bne .Lok2; \ - ldr r1, [sp, #4]; \ - tst r1, #1; \ - beq .Lfail; \ - ldr r2, [sp, #0]; \ - ldr r3, [sp, #8]; \ - add r2, r2, r3; \ - sub r2, r2, reg; \ - cmp r2, r3; \ - bhi .Lok2; \ -.Lfail: \ - CALL_FAIL \ -.Lok2: \ - mov r0, r5; \ -.Lok: - -#include <__longjmp.S> diff --git a/sysdeps/unix/sysv/linux/arm/check_pf.c b/sysdeps/unix/sysv/linux/arm/check_pf.c deleted file mode 100644 index 209f364381..0000000000 --- a/sysdeps/unix/sysv/linux/arm/check_pf.c +++ /dev/null @@ -1,312 +0,0 @@ -/* Determine protocol families for which interfaces exist. Linux version. - Copyright (C) 2003, 2006, 2007, 2008 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. */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include - - -#ifndef IFA_F_HOMEADDRESS -# define IFA_F_HOMEADDRESS 0 -#endif -#ifndef IFA_F_OPTIMISTIC -# define IFA_F_OPTIMISTIC 0 -#endif - - -static int -make_request (int fd, pid_t pid, bool *seen_ipv4, bool *seen_ipv6, - struct in6addrinfo **in6ai, size_t *in6ailen) -{ - struct req - { - struct nlmsghdr nlh; - struct rtgenmsg g; - } req; - struct sockaddr_nl nladdr; - - /* struct rtgenmsg consists of a single byte but the ARM ABI rounds - it up to a word. Clear the padding explicitly here. */ - assert (sizeof (req.g) == 4); - memset (&req.g, '\0', sizeof (req.g)); - - req.nlh.nlmsg_len = sizeof (req); - req.nlh.nlmsg_type = RTM_GETADDR; - req.nlh.nlmsg_flags = NLM_F_ROOT | NLM_F_MATCH | NLM_F_REQUEST; - req.nlh.nlmsg_pid = 0; - req.nlh.nlmsg_seq = time (NULL); - req.g.rtgen_family = AF_UNSPEC; - - memset (&nladdr, '\0', sizeof (nladdr)); - nladdr.nl_family = AF_NETLINK; - -#ifdef PAGE_SIZE - /* Help the compiler optimize out the malloc call if PAGE_SIZE - is constant and smaller or equal to PTHREAD_STACK_MIN/4. */ - const size_t buf_size = PAGE_SIZE; -#else - const size_t buf_size = __getpagesize (); -#endif - bool use_malloc = false; - char *buf; - - if (__libc_use_alloca (buf_size)) - buf = alloca (buf_size); - else - { - buf = malloc (buf_size); - if (buf != NULL) - use_malloc = true; - else - goto out_fail; - } - - struct iovec iov = { buf, buf_size }; - - if (TEMP_FAILURE_RETRY (__sendto (fd, (void *) &req, sizeof (req), 0, - (struct sockaddr *) &nladdr, - sizeof (nladdr))) < 0) - goto out_fail; - - *seen_ipv4 = false; - *seen_ipv6 = false; - - bool done = false; - struct in6ailist - { - struct in6addrinfo info; - struct in6ailist *next; - } *in6ailist = NULL; - size_t in6ailistlen = 0; - - do - { - struct msghdr msg = - { - (void *) &nladdr, sizeof (nladdr), - &iov, 1, - NULL, 0, - 0 - }; - - ssize_t read_len = TEMP_FAILURE_RETRY (__recvmsg (fd, &msg, 0)); - if (read_len < 0) - goto out_fail; - - if (msg.msg_flags & MSG_TRUNC) - goto out_fail; - - struct nlmsghdr *nlmh; - for (nlmh = (struct nlmsghdr *) buf; - NLMSG_OK (nlmh, (size_t) read_len); - nlmh = (struct nlmsghdr *) NLMSG_NEXT (nlmh, read_len)) - { - if (nladdr.nl_pid != 0 || (pid_t) nlmh->nlmsg_pid != pid - || nlmh->nlmsg_seq != req.nlh.nlmsg_seq) - continue; - - if (nlmh->nlmsg_type == RTM_NEWADDR) - { - struct ifaddrmsg *ifam = (struct ifaddrmsg *) NLMSG_DATA (nlmh); - struct rtattr *rta = IFA_RTA (ifam); - size_t len = nlmh->nlmsg_len - NLMSG_LENGTH (sizeof (*ifam)); - - if (ifam->ifa_family != AF_INET - && ifam->ifa_family != AF_INET6) - continue; - - const void *local = NULL; - const void *address = NULL; - while (RTA_OK (rta, len)) - { - switch (rta->rta_type) - { - case IFA_LOCAL: - local = RTA_DATA (rta); - break; - - case IFA_ADDRESS: - address = RTA_DATA (rta); - goto out; - } - - rta = RTA_NEXT (rta, len); - } - - if (local != NULL) - { - address = local; - out: - if (ifam->ifa_family == AF_INET) - { - if (*(const in_addr_t *) address - != htonl (INADDR_LOOPBACK)) - *seen_ipv4 = true; - } - else - { - if (!IN6_IS_ADDR_LOOPBACK (address)) - *seen_ipv6 = true; - } - } - - struct in6ailist *newp = alloca (sizeof (*newp)); - newp->info.flags = (((ifam->ifa_flags - & (IFA_F_DEPRECATED - | IFA_F_OPTIMISTIC)) - ? in6ai_deprecated : 0) - | ((ifam->ifa_flags - & IFA_F_HOMEADDRESS) - ? in6ai_homeaddress : 0)); - newp->info.prefixlen = ifam->ifa_prefixlen; - newp->info.index = ifam->ifa_index; - if (ifam->ifa_family == AF_INET) - { - newp->info.addr[0] = 0; - newp->info.addr[1] = 0; - newp->info.addr[2] = htonl (0xffff); - newp->info.addr[3] = *(const in_addr_t *) address; - } - else - memcpy (newp->info.addr, address, sizeof (newp->info.addr)); - newp->next = in6ailist; - in6ailist = newp; - ++in6ailistlen; - } - else if (nlmh->nlmsg_type == NLMSG_DONE) - /* We found the end, leave the loop. */ - done = true; - } - } - while (! done); - - close_not_cancel_no_status (fd); - - if (*seen_ipv6 && in6ailist != NULL) - { - *in6ai = malloc (in6ailistlen * sizeof (**in6ai)); - if (*in6ai == NULL) - goto out_fail; - - *in6ailen = in6ailistlen; - - do - { - (*in6ai)[--in6ailistlen] = in6ailist->info; - in6ailist = in6ailist->next; - } - while (in6ailist != NULL); - } - - if (use_malloc) - free (buf); - return 0; - -out_fail: - if (use_malloc) - free (buf); - return -1; -} - - -/* We don't know if we have NETLINK support compiled in in our - Kernel. */ -#if __ASSUME_NETLINK_SUPPORT == 0 -/* Define in ifaddrs.h. */ -extern int __no_netlink_support attribute_hidden; -#else -# define __no_netlink_support 0 -#endif - - -void -attribute_hidden -__check_pf (bool *seen_ipv4, bool *seen_ipv6, - struct in6addrinfo **in6ai, size_t *in6ailen) -{ - *in6ai = NULL; - *in6ailen = 0; - - if (! __no_netlink_support) - { - int fd = __socket (PF_NETLINK, SOCK_RAW, NETLINK_ROUTE); - - struct sockaddr_nl nladdr; - memset (&nladdr, '\0', sizeof (nladdr)); - nladdr.nl_family = AF_NETLINK; - - socklen_t addr_len = sizeof (nladdr); - - if (fd >= 0 - && __bind (fd, (struct sockaddr *) &nladdr, sizeof (nladdr)) == 0 - && __getsockname (fd, (struct sockaddr *) &nladdr, &addr_len) == 0 - && make_request (fd, nladdr.nl_pid, seen_ipv4, seen_ipv6, - in6ai, in6ailen) == 0) - /* It worked. */ - return; - - if (fd >= 0) - __close (fd); - -#if __ASSUME_NETLINK_SUPPORT == 0 - /* Remember that there is no netlink support. */ - __no_netlink_support = 1; -#else - /* We cannot determine what interfaces are available. Be - pessimistic. */ - *seen_ipv4 = true; - *seen_ipv6 = true; -#endif - } - -#if __ASSUME_NETLINK_SUPPORT == 0 - /* No netlink. Get the interface list via getifaddrs. */ - struct ifaddrs *ifa = NULL; - if (getifaddrs (&ifa) != 0) - { - /* We cannot determine what interfaces are available. Be - pessimistic. */ - *seen_ipv4 = true; - *seen_ipv6 = true; - return; - } - - struct ifaddrs *runp; - for (runp = ifa; runp != NULL; runp = runp->ifa_next) - if (runp->ifa_addr->sa_family == PF_INET) - *seen_ipv4 = true; - else if (runp->ifa_addr->sa_family == PF_INET6) - *seen_ipv6 = true; - - (void) freeifaddrs (ifa); -#endif -} diff --git a/sysdeps/unix/sysv/linux/arm/eabi/Makefile b/sysdeps/unix/sysv/linux/arm/eabi/Makefile index 1318bc441e..b7baae9e91 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/Makefile +++ b/sysdeps/unix/sysv/linux/arm/eabi/Makefile @@ -1,6 +1,3 @@ -# Set this flag here so that arm/nptl/Makefile will see it. -arm-using-eabi = yes - ifeq ($(subdir),csu) # In order for unwinding to fail when it falls out of main, we need a # cantunwind marker. There's one in start.S. To make sure we reach it, add diff --git a/sysdeps/unix/sysv/linux/arm/eabi/check_pf.c b/sysdeps/unix/sysv/linux/arm/eabi/check_pf.c deleted file mode 100644 index 3e80bbdf51..0000000000 --- a/sysdeps/unix/sysv/linux/arm/eabi/check_pf.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/arm/mmap64.S b/sysdeps/unix/sysv/linux/arm/mmap64.S deleted file mode 100644 index 3c1f247ed9..0000000000 --- a/sysdeps/unix/sysv/linux/arm/mmap64.S +++ /dev/null @@ -1,89 +0,0 @@ -/* Copyright (C) 2000, 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 - 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. */ - -#include - -#define EINVAL 22 -#define ENOSYS 38 - -#include "kernel-features.h" - -#ifdef __ARMEB__ -# define LOW_OFFSET 4 + 4 -/* The initial + 4 is for the stack postdecrement. */ -# define HIGH_OFFSET 4 + 4 + 0 -#else -# define LOW_OFFSET 4 + 0 -# define HIGH_OFFSET 4 + 4 + 4 -#endif - - /* The mmap2 system call takes six arguments, all in registers. */ - .text -ENTRY (__mmap64) -#ifdef __NR_mmap2 - ldr ip, [sp, $LOW_OFFSET] - str r5, [sp, #-4]! - ldr r5, [sp, $HIGH_OFFSET] - str r4, [sp, #-4]! - movs r4, ip, lsl $20 @ check that offset is page-aligned - mov ip, ip, lsr $12 - moveqs r4, r5, lsr $12 @ check for overflow - bne .Linval - ldr r4, [sp, $8] @ load fd - orr r5, ip, r5, lsl $20 @ compose page offset - mov ip, r0 - DO_CALL (mmap2, 0) - cmn r0, $4096 -# ifdef __ASSUME_MMAP2_SYSCALL - ldr r4, [sp], #4 - ldr r5, [sp], #4 - RETINSTR(cc, lr) - b PLTJMP(syscall_error) -# else - ldrcc r4, [sp], #4 - ldrcc r5, [sp], #4 - RETINSTR(cc, lr) - cmn r0, $ENOSYS - bne .Lerror - /* The current kernel does not support mmap2. Fall back to plain - mmap if the offset is small enough. */ - ldr r5, [sp, $16] - mov r0, ip @ first arg was clobbered - teq r5, $0 - ldreq r4, [sp], #4 - ldreq r5, [sp], #4 - beq PLTJMP(__mmap) -# endif -.Linval: - mov r0, $-EINVAL -.Lerror: - ldr r4, [sp], #4 - ldr r5, [sp], #4 - b PLTJMP(syscall_error) -#else - /* The kernel headers do not support mmap2. Fall back to plain - mmap if the offset is small enough. */ - ldr ip, [sp, $8] - teq ip, $0 - beq PLTJMP(__mmap) - mov r0, $-EINVAL - b PLTJMP(syscall_error) -#endif -PSEUDO_END (__mmap64) - -weak_alias (__mmap64, mmap64) diff --git a/sysdeps/unix/sysv/linux/arm/msgctl.c b/sysdeps/unix/sysv/linux/arm/msgctl.c deleted file mode 100644 index 9f9b8431a3..0000000000 --- a/sysdeps/unix/sysv/linux/arm/msgctl.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/arm/nptl/Makefile b/sysdeps/unix/sysv/linux/arm/nptl/Makefile deleted file mode 100644 index f270f19435..0000000000 --- a/sysdeps/unix/sysv/linux/arm/nptl/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -ifeq ($(subdir),nptl) -ifneq ($(arm-using-eabi),yes) -# These tests rely on PTHREAD_KEYS_MAX. The SJLJ exception machinery -# in libgcc registers one key, however, so only PTHREAD_KEYS_MAX-1 -# keys are available. This works fine for EABI targets. -tests := $(filter-out tst-key1 tst-key4,$(tests)) -endif -endif diff --git a/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h deleted file mode 100644 index 506558d3f7..0000000000 --- a/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h +++ /dev/null @@ -1,136 +0,0 @@ -/* Copyright (C) 2003, 2004, 2005, 2007, 2008, 2012 - 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. */ - -#include -#include -#ifndef __ASSEMBLER__ -# include -#endif - -#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt - -# undef PSEUDO -# define PSEUDO(name, syscall_name, args) \ - .section ".text"; \ - PSEUDO_PROLOGUE; \ - ENTRY (__##syscall_name##_nocancel); \ - DO_CALL (syscall_name, args); \ - PSEUDO_RET; \ - END (__##syscall_name##_nocancel); \ - ENTRY (name); \ - SINGLE_THREAD_P; \ - DOARGS_##args; \ - bne .Lpseudo_cancel; \ - DO_CALL (syscall_name, 0); \ - UNDOARGS_##args; \ - cmn r0, $4096; \ - PSEUDO_RET; \ - .Lpseudo_cancel: \ - DOCARGS_##args; /* save syscall args etc. around CENABLE. */ \ - CENABLE; \ - mov ip, r0; /* put mask in safe place. */ \ - UNDOCARGS_##args; /* restore syscall args. */ \ - swi SYS_ify (syscall_name); /* do the call. */ \ - str r0, [sp, $-4]!; /* save syscall return value. */ \ - mov r0, ip; /* get mask back. */ \ - CDISABLE; \ - ldmfd sp!, {r0, lr}; /* retrieve return value and address. */ \ - UNDOARGS_##args; \ - cmn r0, $4096; - -# define DOCARGS_0 str lr, [sp, #-4]!; -# define UNDOCARGS_0 - -# define DOCARGS_1 stmfd sp!, {r0, lr}; -# define UNDOCARGS_1 ldr r0, [sp], #4; - -# define DOCARGS_2 stmfd sp!, {r0, r1, lr}; -# define UNDOCARGS_2 ldmfd sp!, {r0, r1}; - -# define DOCARGS_3 stmfd sp!, {r0, r1, r2, lr}; -# define UNDOCARGS_3 ldmfd sp!, {r0, r1, r2}; - -# define DOCARGS_4 stmfd sp!, {r0, r1, r2, r3, lr}; -# define UNDOCARGS_4 ldmfd sp!, {r0, r1, r2, r3}; - -# define DOCARGS_5 DOCARGS_4 -# define UNDOCARGS_5 UNDOCARGS_4 - -# define DOCARGS_6 DOCARGS_5 -# define UNDOCARGS_6 UNDOCARGS_5 - -# ifdef IS_IN_libpthread -# define CENABLE bl PLTJMP(__pthread_enable_asynccancel) -# define CDISABLE bl PLTJMP(__pthread_disable_asynccancel) -# define __local_multiple_threads __pthread_multiple_threads -# elif !defined NOT_IN_libc -# define CENABLE bl PLTJMP(__libc_enable_asynccancel) -# define CDISABLE bl PLTJMP(__libc_disable_asynccancel) -# define __local_multiple_threads __libc_multiple_threads -# elif defined IS_IN_librt -# define CENABLE bl PLTJMP(__librt_enable_asynccancel) -# define CDISABLE bl PLTJMP(__librt_disable_asynccancel) -# else -# error Unsupported library -# endif - -# if defined IS_IN_libpthread || !defined NOT_IN_libc -# ifndef __ASSEMBLER__ -extern int __local_multiple_threads attribute_hidden; -# define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1) -# else -# define SINGLE_THREAD_P \ - ldr ip, 1b; \ -2: \ - ldr ip, [pc, ip]; \ - teq ip, #0; -# define PSEUDO_PROLOGUE \ - 1: .word __local_multiple_threads - 2f - 8; -# endif -# else -/* There is no __local_multiple_threads for librt, so use the TCB. */ -# ifndef __ASSEMBLER__ -# define SINGLE_THREAD_P \ - __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ - header.multiple_threads) == 0, 1) -# else -# define PSEUDO_PROLOGUE -# define SINGLE_THREAD_P \ - stmfd sp!, {r0, lr}; \ - bl __aeabi_read_tp; \ - ldr ip, [r0, #MULTIPLE_THREADS_OFFSET]; \ - ldmfd sp!, {r0, lr}; \ - teq ip, #0 -# define SINGLE_THREAD_P_PIC(x) SINGLE_THREAD_P -# endif -# endif - -#elif !defined __ASSEMBLER__ - -/* For rtld, et cetera. */ -# define SINGLE_THREAD_P 1 -# define NO_CANCELLATION 1 - -#endif - -#ifndef __ASSEMBLER__ -# define RTLD_SINGLE_THREAD_P \ - __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ - header.multiple_threads) == 0, 1) -#endif diff --git a/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c deleted file mode 100644 index e19facfb89..0000000000 --- a/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c +++ /dev/null @@ -1,146 +0,0 @@ -/* Copyright (C) 2003, 2009 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Jakub Jelinek . - - 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; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include -#include -#include -#include - -static void *libgcc_s_handle; -static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -static _Unwind_Reason_Code (*libgcc_s_personality) - (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, - struct _Unwind_Context *); -static _Unwind_Reason_Code (*libgcc_s_forcedunwind) - (struct _Unwind_Exception *, _Unwind_Stop_Fn, void *); -static _Unwind_Word (*libgcc_s_getcfa) (struct _Unwind_Context *); -static void (*libgcc_s_sjlj_register) (struct SjLj_Function_Context *); -static void (*libgcc_s_sjlj_unregister) (struct SjLj_Function_Context *); - -void -__attribute_noinline__ -pthread_cancel_init (void) -{ - void *resume, *personality, *forcedunwind, *getcfa; - void *handle; - void *sjlj_register, *sjlj_unregister; - - if (__builtin_expect (libgcc_s_handle != NULL, 1)) - { - /* Force gcc to reload all values. */ - asm volatile ("" ::: "memory"); - return; - } - - handle = __libc_dlopen ("libgcc_s.so.1"); - - if (handle == NULL - || (sjlj_register = __libc_dlsym (handle, "_Unwind_SjLj_Register")) == NULL - || (sjlj_unregister = __libc_dlsym (handle, "_Unwind_SjLj_Unregister")) == NULL - || (resume = __libc_dlsym (handle, "_Unwind_SjLj_Resume")) == NULL - || (personality = __libc_dlsym (handle, "__gcc_personality_sj0")) == NULL - || (forcedunwind = __libc_dlsym (handle, "_Unwind_SjLj_ForcedUnwind")) - == NULL - || (getcfa = __libc_dlsym (handle, "_Unwind_GetCFA")) == NULL - ) - __libc_fatal ("libgcc_s.so.1 must be installed for pthread_cancel to work\n"); - - libgcc_s_resume = resume; - libgcc_s_personality = personality; - libgcc_s_forcedunwind = forcedunwind; - libgcc_s_sjlj_register = sjlj_register; - libgcc_s_sjlj_unregister = sjlj_unregister; - libgcc_s_getcfa = getcfa; - /* Make sure libgcc_s_getcfa is written last. Otherwise, - pthread_cancel_init might return early even when the pointer the - caller is interested in is not initialized yet. */ - atomic_write_barrier (); - libgcc_s_handle = handle; -} - -void -__libc_freeres_fn_section -__unwind_freeres (void) -{ - void *handle = libgcc_s_handle; - if (handle != NULL) - { - libgcc_s_handle = NULL; - __libc_dlclose (handle); - } -} - -void -_Unwind_Resume (struct _Unwind_Exception *exc) -{ - if (__builtin_expect (libgcc_s_resume == NULL, 0)) - pthread_cancel_init (); - - libgcc_s_resume (exc); -} - -_Unwind_Reason_Code -__gcc_personality_v0 (int version, _Unwind_Action actions, - _Unwind_Exception_Class exception_class, - struct _Unwind_Exception *ue_header, - struct _Unwind_Context *context) -{ - if (__builtin_expect (libgcc_s_personality == NULL, 0)) - pthread_cancel_init (); - - return libgcc_s_personality (version, actions, exception_class, - ue_header, context); -} - -_Unwind_Reason_Code -_Unwind_ForcedUnwind (struct _Unwind_Exception *exc, _Unwind_Stop_Fn stop, - void *stop_argument) -{ - if (__builtin_expect (libgcc_s_forcedunwind == NULL, 0)) - pthread_cancel_init (); - - return libgcc_s_forcedunwind (exc, stop, stop_argument); -} - -_Unwind_Word -_Unwind_GetCFA (struct _Unwind_Context *context) -{ - if (__builtin_expect (libgcc_s_getcfa == NULL, 0)) - pthread_cancel_init (); - - return libgcc_s_getcfa (context); -} - -void -_Unwind_SjLj_Register (struct SjLj_Function_Context *fc) -{ - if (__builtin_expect (libgcc_s_sjlj_register == NULL, 0)) - pthread_cancel_init (); - - libgcc_s_sjlj_register (fc); -} - -void -_Unwind_SjLj_Unregister (struct SjLj_Function_Context *fc) -{ - if (__builtin_expect (libgcc_s_sjlj_unregister == NULL, 0)) - pthread_cancel_init (); - - libgcc_s_sjlj_unregister (fc); -} diff --git a/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c deleted file mode 100644 index 8dcfd34b16..0000000000 --- a/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c +++ /dev/null @@ -1,87 +0,0 @@ -/* Copyright (C) 2003 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Jakub Jelinek . - - 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; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include -#include -#include - -static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -static _Unwind_Reason_Code (*libgcc_s_personality) - (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, - struct _Unwind_Context *); -static void (*libgcc_s_sjlj_register) (struct SjLj_Function_Context *); -static void (*libgcc_s_sjlj_unregister) (struct SjLj_Function_Context *); - -static void -init (void) -{ - void *resume, *personality; - void *handle; - void *sjlj_register, *sjlj_unregister; - - handle = __libc_dlopen ("libgcc_s.so.1"); - - if (handle == NULL - || (sjlj_register = __libc_dlsym (handle, "_Unwind_SjLj_Register")) == NULL - || (sjlj_unregister = __libc_dlsym (handle, "_Unwind_SjLj_Unregister")) == NULL - || (resume = __libc_dlsym (handle, "_Unwind_SjLj_Resume")) == NULL - || (personality = __libc_dlsym (handle, "__gcc_personality_sj0")) == NULL) - __libc_fatal ("libgcc_s.so.1 must be installed for pthread_cancel to work\n"); - - libgcc_s_resume = resume; - libgcc_s_personality = personality; - libgcc_s_sjlj_register = sjlj_register; - libgcc_s_sjlj_unregister = sjlj_unregister; -} - -void -_Unwind_Resume (struct _Unwind_Exception *exc) -{ - if (__builtin_expect (libgcc_s_resume == NULL, 0)) - init (); - libgcc_s_resume (exc); -} - -_Unwind_Reason_Code -__gcc_personality_v0 (int version, _Unwind_Action actions, - _Unwind_Exception_Class exception_class, - struct _Unwind_Exception *ue_header, - struct _Unwind_Context *context) -{ - if (__builtin_expect (libgcc_s_personality == NULL, 0)) - init (); - return libgcc_s_personality (version, actions, exception_class, - ue_header, context); -} - -void -_Unwind_SjLj_Register (struct SjLj_Function_Context *fc) -{ - if (__builtin_expect (libgcc_s_sjlj_register == NULL, 0)) - init (); - libgcc_s_sjlj_register (fc); -} - -void -_Unwind_SjLj_Unregister (struct SjLj_Function_Context *fc) -{ - if (__builtin_expect (libgcc_s_sjlj_unregister == NULL, 0)) - init (); - libgcc_s_sjlj_unregister (fc); -} diff --git a/sysdeps/unix/sysv/linux/arm/nptl/unwind.h b/sysdeps/unix/sysv/linux/arm/nptl/unwind.h deleted file mode 100644 index 8dd834eddb..0000000000 --- a/sysdeps/unix/sysv/linux/arm/nptl/unwind.h +++ /dev/null @@ -1,31 +0,0 @@ -/* Exception handling and frame unwind runtime interface routines. - Copyright (C) 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 - 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 _ARM_UNWIND_H -#define _ARM_UNWIND_H 1 - -#include - -/* Call the SjLj versions of these functions. */ -#define _Unwind_ForcedUnwind _Unwind_SjLj_ForcedUnwind -#define _Unwind_Resume _Unwind_SjLj_Resume -#define __gcc_personality_v0 __gcc_personality_sj0 - -#endif /* unwind.h */ diff --git a/sysdeps/unix/sysv/linux/arm/semctl.c b/sysdeps/unix/sysv/linux/arm/semctl.c deleted file mode 100644 index e9b1a483c9..0000000000 --- a/sysdeps/unix/sysv/linux/arm/semctl.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/arm/shmctl.c b/sysdeps/unix/sysv/linux/arm/shmctl.c deleted file mode 100644 index 7eac6380dd..0000000000 --- a/sysdeps/unix/sysv/linux/arm/shmctl.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/arm/sigrestorer.S b/sysdeps/unix/sysv/linux/arm/sigrestorer.S deleted file mode 100644 index d9cc40fb0f..0000000000 --- a/sysdeps/unix/sysv/linux/arm/sigrestorer.S +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright (C) 1999, 2012 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. */ - -#include - -/* If no SA_RESTORER function was specified by the application we use - one of these. This avoids the need for the kernel to synthesise a return - instruction on the stack, which would involve expensive cache flushes. */ - -ENTRY(__default_sa_restorer) - swi SYS_ify(sigreturn) -END(__default_sa_restorer) - -#ifdef __NR_rt_sigreturn - -ENTRY(__default_rt_sa_restorer) - swi SYS_ify(rt_sigreturn) -END(__default_rt_sa_restorer) - -#endif From 10fd25cc3baa3bbce2c00e66bb05e2939ad3239f Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sun, 8 Jan 2012 02:01:21 +0000 Subject: [PATCH 4168/4487] Remove HAVE_ELF conditional for ARM. --- ChangeLog.arm | 4 ++++ sysdeps/arm/sysdep.h | 15 ++------------- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 70bc5404b9..dd88d9ea2d 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,7 @@ +2012-01-08 Joseph Myers + + * sysdeps/arm/sysdep.h: Remove non-ELF support. + 2012-01-07 Joseph Myers * sysdeps/arm/preconfigure: Give error for old-ABI ARM. diff --git a/sysdeps/arm/sysdep.h b/sysdeps/arm/sysdep.h index 5c01ef0e21..62fee04a9e 100644 --- a/sysdeps/arm/sysdep.h +++ b/sysdeps/arm/sysdep.h @@ -1,5 +1,6 @@ /* Assembler macros for ARM. - Copyright (C) 1997, 1998, 2003, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 2003, 2009, 2010, 2012 + 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 @@ -29,8 +30,6 @@ /* Syntactic details of assembler. */ -#ifdef HAVE_ELF - #define ALIGNARG(log2) log2 /* For ELF we need the `.type' directive to make shared libs work right. */ #define ASM_TYPE_DIRECTIVE(name,typearg) .type name,%##typearg; @@ -42,16 +41,6 @@ #define PLTJMP(_x) _x##(PLT) -#else - -#define ALIGNARG(log2) log2 -#define ASM_TYPE_DIRECTIVE(name,type) /* Nothing is specified. */ -#define ASM_SIZE_DIRECTIVE(name) /* Nothing is specified. */ - -#define PLTJMP(_x) _x - -#endif - /* APCS-32 doesn't preserve the condition codes across function call. */ #ifdef __APCS_32__ #define LOADREGS(cond, base, reglist...)\ From 5de7dd3ece0d3f0ad1805c3ebec8c13807ded305 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 8 Jan 2012 10:59:42 +0100 Subject: [PATCH 4169/4487] m68k: remove non-ELF support --- ChangeLog.m68k | 5 +++++ sysdeps/m68k/asm-syntax.h | 19 +------------------ sysdeps/m68k/sysdep.h | 21 +++++---------------- 3 files changed, 11 insertions(+), 34 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 8c81807582..3190368104 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2012-01-08 Andreas Schwab + + * sysdeps/m68k/sysdep.h: Remove non-ELF support. + * sysdeps/m68k/asm-syntax.h: Likewise. + 2012-01-07 Andreas Schwab * sysdeps/unix/sysv/linux/m68k/configure.in: Set diff --git a/sysdeps/m68k/asm-syntax.h b/sysdeps/m68k/asm-syntax.h index 645e906762..4a5e14e655 100644 --- a/sysdeps/m68k/asm-syntax.h +++ b/sysdeps/m68k/asm-syntax.h @@ -1,5 +1,5 @@ /* Definitions for 68k syntax variations. - Copyright (C) 1992, 1994, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1992, 1994, 1996, 1997, 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Its master source is NOT part of the C library, however. The master source lives in the GNU MP Library. @@ -18,32 +18,15 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#ifdef HAVE_ELF - /* ELF uses byte-counts for .align, most others use log2 of count of bytes. */ #define ALIGNARG(log2) 1< Date: Sun, 8 Jan 2012 13:02:02 +0000 Subject: [PATCH 4170/4487] Don't define or test NO_UNDERSCORES or HAVE_WEAK_SYMBOLS for ARM. --- ChangeLog.arm | 7 +++++++ sysdeps/arm/sysdep.h | 6 ------ sysdeps/unix/arm/start.c | 13 +------------ sysdeps/unix/arm/sysdep.S | 6 +----- 4 files changed, 9 insertions(+), 23 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index dd88d9ea2d..377439a665 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,10 @@ +2012-01-08 Joseph Myers + + * sysdeps/arm/sysdep.h: Don't test or define NO_UNDERSCORES. + * sysdeps/unix/arm/start.c: Don't test HAVE_WEAK_SYMBOLS or + NO_UNDERSCORES. + * sysdeps/unix/arm/sysdep.S: Don't test NO_UNDERSCORES. + 2012-01-08 Joseph Myers * sysdeps/arm/sysdep.h: Remove non-ELF support. diff --git a/sysdeps/arm/sysdep.h b/sysdeps/arm/sysdep.h index 62fee04a9e..4fa10d90e9 100644 --- a/sysdeps/arm/sysdep.h +++ b/sysdeps/arm/sysdep.h @@ -35,10 +35,6 @@ #define ASM_TYPE_DIRECTIVE(name,typearg) .type name,%##typearg; #define ASM_SIZE_DIRECTIVE(name) .size name,.-name -/* In ELF C symbols are asm symbols. */ -#undef NO_UNDERSCORES -#define NO_UNDERSCORES - #define PLTJMP(_x) _x##(PLT) /* APCS-32 doesn't preserve the condition codes across function call. */ @@ -105,7 +101,6 @@ #define CALL_MCOUNT /* Do nothing. */ #endif -#ifdef NO_UNDERSCORES /* Since C identifiers are not normally prefixed with an underscore on this system, the asm identifier `syscall_error' intrudes on the C name space. Make sure we use an innocuous name. */ @@ -115,7 +110,6 @@ #else #define mcount _mcount #endif -#endif #if defined(__ARM_EABI__) /* Tag_ABI_align8_preserved: This code preserves 8-byte diff --git a/sysdeps/unix/arm/start.c b/sysdeps/unix/arm/start.c index 6bf08b1d7f..3bfb6d2d7e 100644 --- a/sysdeps/unix/arm/start.c +++ b/sysdeps/unix/arm/start.c @@ -1,5 +1,5 @@ /* Special startup code for ARM a.out binaries. - Copyright (C) 1998, 2004 Free Software Foundation, Inc. + Copyright (C) 1998, 2004, 2012 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 @@ -41,9 +41,7 @@ /* The first piece of initialized data. */ int __data_start = 0; -#ifdef HAVE_WEAK_SYMBOLS weak_alias (__data_start, data_start) -#endif extern void __libc_init (int argc, char **argv, char **envp); extern int main (int argc, char **argv, char **envp); @@ -53,16 +51,7 @@ extern int main (int argc, char **argv, char **envp); /* If this was in C it might create its own stack frame and screw up the arguments. */ -#ifdef NO_UNDERSCORES asm (".text; .globl _start; _start: B start1"); -#else -asm (".text; .globl __start; __start: B _start1"); - -/* Make an alias called `start' (no leading underscore, so it can't - conflict with C symbols) for `_start'. This is the name vendor crt0.o's - tend to use, and thus the name most linkers expect. */ -asm (".set start, __start"); -#endif /* Fool gcc into thinking that more args are passed. This makes it look on the stack (correctly) for the real arguments. It causes somewhat diff --git a/sysdeps/unix/arm/sysdep.S b/sysdeps/unix/arm/sysdep.S index 2a534baf88..41386fe516 100644 --- a/sysdeps/unix/arm/sysdep.S +++ b/sysdeps/unix/arm/sysdep.S @@ -1,5 +1,5 @@ /* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2002, 2003, - 2004, 2005, 2009, 2011 + 2004, 2005, 2009, 2011, 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -29,11 +29,7 @@ #include #undef syscall_error -#ifdef NO_UNDERSCORES __syscall_error: -#else -syscall_error: -#endif #if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN /* We translate the system's EWOULDBLOCK error into EAGAIN. The GNU C library always defines EWOULDBLOCK==EAGAIN. From 57920720f2dceb5ee711409c0fb63229e4ceceb5 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sun, 8 Jan 2012 13:06:46 +0000 Subject: [PATCH 4171/4487] Use const instead of __const for ARM. --- ChangeLog.arm | 4 ++++ sysdeps/arm/eabi/bits/fenv.h | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 377439a665..62531a4493 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,7 @@ +2012-01-08 Joseph Myers + + * sysdeps/arm/eabi/bits/fenv.h: Use const instead of __const. + 2012-01-08 Joseph Myers * sysdeps/arm/sysdep.h: Don't test or define NO_UNDERSCORES. diff --git a/sysdeps/arm/eabi/bits/fenv.h b/sysdeps/arm/eabi/bits/fenv.h index 816ebe773e..3bef3980cb 100644 --- a/sysdeps/arm/eabi/bits/fenv.h +++ b/sysdeps/arm/eabi/bits/fenv.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2004, 2005, 2012 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 @@ -70,5 +70,5 @@ fenv_t; #ifdef __USE_GNU /* Floating-point environment where none of the exceptions are masked. */ -# define FE_NOMASK_ENV ((__const fenv_t *) -2) +# define FE_NOMASK_ENV ((const fenv_t *) -2) #endif From 7b966fcb4841623f3c35722e92eb8ac7517ea5b8 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sun, 8 Jan 2012 13:13:21 +0000 Subject: [PATCH 4172/4487] Use const instead of __const for MIPS. --- ChangeLog.mips | 10 ++++++++++ sysdeps/mips/bits/fenv.h | 6 +++--- sysdeps/unix/sysv/linux/mips/bits/resource.h | 8 ++++---- sysdeps/unix/sysv/linux/mips/bits/socket.h | 4 ++-- sysdeps/unix/sysv/linux/mips/sys/cachectl.h | 11 ++++++----- sysdeps/unix/sysv/linux/mips/sys/epoll.h | 5 +++-- sysdeps/unix/sysv/linux/mips/sys/sysmips.h | 5 +++-- sysdeps/unix/sysv/linux/mips/sys/timerfd.h | 4 ++-- 8 files changed, 33 insertions(+), 20 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 73da420653..81ea2a315b 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,13 @@ +2012-01-08 Joseph Myers + + * sysdeps/mips/bits/fenv.h: Use const instead of __const. + * sysdeps/unix/sysv/linux/mips/bits/resource.h: Likewise. + * sysdeps/unix/sysv/linux/mips/bits/socket.h: Likewise. + * sysdeps/unix/sysv/linux/mips/sys/cachectl.h: Likewise. + * sysdeps/unix/sysv/linux/mips/sys/epoll.h: Likewise. + * sysdeps/unix/sysv/linux/mips/sys/sysmips.h: Likewise. + * sysdeps/unix/sysv/linux/mips/sys/timerfd.h: Likewise. + 2012-01-07 Joseph Myers * sysdeps/mips/nptl/shlib-versions: New. diff --git a/sysdeps/mips/bits/fenv.h b/sysdeps/mips/bits/fenv.h index 24e0694ca5..8efb890c59 100644 --- a/sysdeps/mips/bits/fenv.h +++ b/sysdeps/mips/bits/fenv.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999, 2000, 2012 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 @@ -69,9 +69,9 @@ typedef struct fenv_t; /* If the default argument is used we use this value. */ -#define FE_DFL_ENV ((__const fenv_t *) -1) +#define FE_DFL_ENV ((const fenv_t *) -1) #ifdef __USE_GNU /* Floating-point environment where none of the exception is masked. */ -# define FE_NOMASK_ENV ((__const fenv_t *) -2) +# define FE_NOMASK_ENV ((const fenv_t *) -2) #endif diff --git a/sysdeps/unix/sysv/linux/mips/bits/resource.h b/sysdeps/unix/sysv/linux/mips/bits/resource.h index f64e9c09a2..519d7364eb 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/resource.h +++ b/sysdeps/unix/sysv/linux/mips/bits/resource.h @@ -1,6 +1,6 @@ /* Bit values & structures for resource limits. Linux/MIPS version. Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2004, 2005, 2006, 2008, - 2009, 2010, 2011 Free Software Foundation, Inc. + 2009, 2010, 2011, 2012 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 @@ -254,13 +254,13 @@ __BEGIN_DECLS /* Modify and return resource limits of a process atomically. */ # ifndef __USE_FILE_OFFSET64 extern int prlimit (__pid_t __pid, enum __rlimit_resource __resource, - __const struct rlimit *__new_limit, + const struct rlimit *__new_limit, struct rlimit *__old_limit) __THROW; # else # ifdef __REDIRECT_NTH extern int __REDIRECT_NTH (prlimit, (__pid_t __pid, enum __rlimit_resource __resource, - __const struct rlimit *__new_limit, + const struct rlimit *__new_limit, struct rlimit *__old_limit), prlimit64); # else # define prlimit prlimit64 @@ -268,7 +268,7 @@ extern int __REDIRECT_NTH (prlimit, (__pid_t __pid, # endif # ifdef __USE_LARGEFILE64 extern int prlimit64 (__pid_t __pid, enum __rlimit_resource __resource, - __const struct rlimit64 *__new_limit, + const struct rlimit64 *__new_limit, struct rlimit64 *__old_limit) __THROW; # endif #endif diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h index 4aacfae994..cfd7dd778c 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/socket.h +++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h @@ -1,6 +1,6 @@ /* System-specific socket constants and types. Linux/MIPS version. Copyright (C) 1991, 92, 1994-1999, 2000, 2001, 2004, 2005, 2006, 2007, 2008, - 2009, 2010, 2011 Free Software Foundation, Inc. + 2009, 2010, 2011, 2012 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 @@ -424,7 +424,7 @@ __BEGIN_DECLS __THROW. */ extern int recvmmsg (int __fd, struct mmsghdr *__vmessages, unsigned int __vlen, int __flags, - __const struct timespec *__tmo); + const struct timespec *__tmo); /* Send a VLEN messages as described by VMESSAGES to socket FD. Return the number of datagrams successfully written or -1 for errors. diff --git a/sysdeps/unix/sysv/linux/mips/sys/cachectl.h b/sysdeps/unix/sysv/linux/mips/sys/cachectl.h index 3d9f914b1b..650c609286 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/cachectl.h +++ b/sysdeps/unix/sysv/linux/mips/sys/cachectl.h @@ -1,4 +1,5 @@ -/* Copyright (C) 1995, 1996, 1997, 2000, 2009 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 2000, 2009, 2012 + 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 @@ -29,13 +30,13 @@ __BEGIN_DECLS #ifdef __USE_MISC -extern int cachectl (void *__addr, __const int __nbytes, __const int __op) __THROW; +extern int cachectl (void *__addr, const int __nbytes, const int __op) __THROW; #endif -extern int __cachectl (void *__addr, __const int __nbytes, __const int __op) __THROW; +extern int __cachectl (void *__addr, const int __nbytes, const int __op) __THROW; #ifdef __USE_MISC -extern int cacheflush (void *__addr, __const int __nbytes, __const int __op) __THROW; +extern int cacheflush (void *__addr, const int __nbytes, const int __op) __THROW; #endif -extern int _flush_cache (char *__addr, __const int __nbytes, __const int __op) __THROW; +extern int _flush_cache (char *__addr, const int __nbytes, const int __op) __THROW; __END_DECLS diff --git a/sysdeps/unix/sysv/linux/mips/sys/epoll.h b/sysdeps/unix/sysv/linux/mips/sys/epoll.h index 51a657a5b5..05b979bc6b 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/epoll.h +++ b/sysdeps/unix/sysv/linux/mips/sys/epoll.h @@ -1,4 +1,5 @@ -/* Copyright (C) 2002-2006, 2007, 2008, 2011 Free Software Foundation, Inc. +/* Copyright (C) 2002-2006, 2007, 2008, 2011, 2012 + 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 @@ -137,7 +138,7 @@ extern int epoll_wait (int __epfd, struct epoll_event *__events, __THROW. */ extern int epoll_pwait (int __epfd, struct epoll_event *__events, int __maxevents, int __timeout, - __const __sigset_t *__ss); + const __sigset_t *__ss); __END_DECLS diff --git a/sysdeps/unix/sysv/linux/mips/sys/sysmips.h b/sysdeps/unix/sysv/linux/mips/sys/sysmips.h index aefc52e3dd..5534a1f11d 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/sysmips.h +++ b/sysdeps/unix/sysv/linux/mips/sys/sysmips.h @@ -1,4 +1,5 @@ -/* Copyright (C) 1995, 1997, 2000, 2001, 2009 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1997, 2000, 2001, 2009, 2012 + 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 @@ -36,7 +37,7 @@ __BEGIN_DECLS -extern int sysmips (__const int __cmd, ...) __THROW; +extern int sysmips (const int __cmd, ...) __THROW; __END_DECLS diff --git a/sysdeps/unix/sysv/linux/mips/sys/timerfd.h b/sysdeps/unix/sysv/linux/mips/sys/timerfd.h index ebd37ff4a5..1238698d25 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/timerfd.h +++ b/sysdeps/unix/sysv/linux/mips/sys/timerfd.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2008 Free Software Foundation, Inc. +/* Copyright (C) 2008, 2012 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 @@ -49,7 +49,7 @@ extern int timerfd_create (clockid_t __clock_id, int __flags) __THROW; FLAGS has the TFD_TIMER_ABSTIME flag set the timeout value is absolute. Optionally return the old expiration time in OTMR. */ extern int timerfd_settime (int __ufd, int __flags, - __const struct itimerspec *__utmr, + const struct itimerspec *__utmr, struct itimerspec *__otmr) __THROW; /* Return the next expiration time of UFD. */ From 30cfd5f601428d5ec27ded3d75245d463cc1b8b8 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 8 Jan 2012 13:47:30 +0100 Subject: [PATCH 4173/4487] m68k: remove NO_UNDERSCORES --- ChangeLog.m68k | 5 +++-- sysdeps/m68k/sysdep.h | 18 +++--------------- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 3190368104..459f9bc1e5 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,7 +1,8 @@ 2012-01-08 Andreas Schwab - * sysdeps/m68k/sysdep.h: Remove non-ELF support. - * sysdeps/m68k/asm-syntax.h: Likewise. + * sysdeps/m68k/asm-syntax.h: Remove non-ELF support. + * sysdeps/m68k/sysdep.h: Likewise. + (NO_UNDERSCORES): Don't define. 2012-01-07 Andreas Schwab diff --git a/sysdeps/m68k/sysdep.h b/sysdeps/m68k/sysdep.h index 2888781287..f36b584ee7 100644 --- a/sysdeps/m68k/sysdep.h +++ b/sysdeps/m68k/sysdep.h @@ -29,10 +29,6 @@ # define ASM_TYPE_DIRECTIVE(name,typearg) .type name,typearg # define ASM_SIZE_DIRECTIVE(name) .size name,.-name -/* In ELF C symbols are asm symbols. */ -# undef NO_UNDERSCORES -# define NO_UNDERSCORES - /* Define an entry point visible from C. There is currently a bug in gdb which prevents us from specifying @@ -60,26 +56,18 @@ move.l %fp, -(%sp); \ cfi_adjust_cfa_offset (4); cfi_rel_offset (%fp, 0); \ move.l %sp, %fp; \ - jbsr JUMPTARGET (mcount); \ + jbsr JUMPTARGET (_mcount); \ move.l (%sp)+, %fp; \ cfi_adjust_cfa_offset (-4); cfi_restore (%fp); # else # define CALL_MCOUNT /* Do nothing. */ # endif -# ifdef NO_UNDERSCORES -/* Since C identifiers are not normally prefixed with an underscore - on this system, the asm identifier `syscall_error' intrudes on the - C name space. Make sure we use an innocuous name. */ -# define syscall_error __syscall_error -# define mcount _mcount -# endif - # define PSEUDO(name, syscall_name, args) \ - .globl syscall_error; \ + .globl __syscall_error; \ ENTRY (name) \ DO_CALL (syscall_name, args); \ - jcc JUMPTARGET(syscall_error) + jcc JUMPTARGET(__syscall_error) # undef PSEUDO_END # define PSEUDO_END(name) \ From ae9df5c8a091933d78ba148362053b5bd80206ca Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 8 Jan 2012 14:21:01 +0100 Subject: [PATCH 4174/4487] m68k: use const instead of __const --- ChangeLog.m68k | 3 +++ sysdeps/m68k/fpu/bits/fenv.h | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 459f9bc1e5..a668b4e81d 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,5 +1,8 @@ 2012-01-08 Andreas Schwab + * sysdeps/m68k/fpu/bits/fenv.h (FE_DFL_ENV, FE_NOMASK_ENV): Use + const intead of __const. + * sysdeps/m68k/asm-syntax.h: Remove non-ELF support. * sysdeps/m68k/sysdep.h: Likewise. (NO_UNDERSCORES): Don't define. diff --git a/sysdeps/m68k/fpu/bits/fenv.h b/sysdeps/m68k/fpu/bits/fenv.h index 7c0bcb6697..885728434e 100644 --- a/sysdeps/m68k/fpu/bits/fenv.h +++ b/sysdeps/m68k/fpu/bits/fenv.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999, 2000, 2012 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 @@ -71,9 +71,9 @@ typedef struct fenv_t; /* If the default argument is used we use this value. */ -#define FE_DFL_ENV ((__const fenv_t *) -1) +#define FE_DFL_ENV ((const fenv_t *) -1) #ifdef __USE_GNU /* Floating-point environment where none of the exceptions are masked. */ -# define FE_NOMASK_ENV ((__const fenv_t *) -2) +# define FE_NOMASK_ENV ((const fenv_t *) -2) #endif From 2f4e78942c441cd249533dcffb3cd5ed1de33424 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Sun, 8 Jan 2012 23:33:42 -0500 Subject: [PATCH 4175/4487] HPPA: Use const instead of __const Adjust sys/epoll.h and sys/timerfd.h to use const instead of __const. --- ChangeLog.hppa | 5 +++++ sysdeps/unix/sysv/linux/hppa/sys/epoll.h | 4 ++-- sysdeps/unix/sysv/linux/hppa/sys/timerfd.h | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index be3a951a85..28b9f21996 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,8 @@ +2012-01-08 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/sys/epoll.h: Use const instead of __const. + * sysdeps/unix/sysv/linux/hppa/sys/timerfd.h: Likewise. + 2011-10-21 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/sys/procfs.h: Update copyright year. diff --git a/sysdeps/unix/sysv/linux/hppa/sys/epoll.h b/sysdeps/unix/sysv/linux/hppa/sys/epoll.h index 1931cc687a..b11a34d459 100644 --- a/sysdeps/unix/sysv/linux/hppa/sys/epoll.h +++ b/sysdeps/unix/sysv/linux/hppa/sys/epoll.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2006, 2007, 2008, 2009 Free Software Foundation, Inc. +/* Copyright (C) 2002-2009, 2012 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 @@ -137,7 +137,7 @@ extern int epoll_wait (int __epfd, struct epoll_event *__events, __THROW. */ extern int epoll_pwait (int __epfd, struct epoll_event *__events, int __maxevents, int __timeout, - __const __sigset_t *__ss); + const __sigset_t *__ss); __END_DECLS diff --git a/sysdeps/unix/sysv/linux/hppa/sys/timerfd.h b/sysdeps/unix/sysv/linux/hppa/sys/timerfd.h index 78cdfc4788..ca696c215a 100644 --- a/sysdeps/unix/sysv/linux/hppa/sys/timerfd.h +++ b/sysdeps/unix/sysv/linux/hppa/sys/timerfd.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2008 Free Software Foundation, Inc. +/* Copyright (C) 2008, 2012 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 @@ -49,7 +49,7 @@ extern int timerfd_create (clockid_t __clock_id, int __flags) __THROW; FLAGS has the TFD_TIMER_ABSTIME flag set the timeout value is absolute. Optionally return the old expiration time in OTMR. */ extern int timerfd_settime (int __ufd, int __flags, - __const struct itimerspec *__utmr, + const struct itimerspec *__utmr, struct itimerspec *__otmr) __THROW; /* Return the next expiration time of UFD. */ From c27dd89f4b9cdb40f07439a23705bccde9853f31 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Sun, 8 Jan 2012 23:38:50 -0500 Subject: [PATCH 4176/4487] HPPA: Update pthread.h Sync from libc pthread.h to get all the recent changes including the use of const instead of __const and __NOTHROWNL where appropriate. --- ChangeLog.hppa | 4 + sysdeps/unix/sysv/linux/hppa/nptl/pthread.h | 132 ++++++++++---------- 2 files changed, 69 insertions(+), 67 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 28b9f21996..8988cf4f38 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,7 @@ +2012-01-08 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/nptl/pthread.h: Sync from libc copy. + 2012-01-08 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/sys/epoll.h: Use const instead of __const. diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pthread.h b/sysdeps/unix/sysv/linux/hppa/nptl/pthread.h index ee91dbf5b7..8bb30c9493 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/pthread.h +++ b/sysdeps/unix/sysv/linux/hppa/nptl/pthread.h @@ -1,5 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 - Free Software Foundation, Inc. +/* Copyright (C) 2002-2011, 2012 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 @@ -223,9 +222,9 @@ __BEGIN_DECLS getting passed ARG. Creation attributed come from ATTR. The new handle is stored in *NEWTHREAD. */ extern int pthread_create (pthread_t *__restrict __newthread, - __const pthread_attr_t *__restrict __attr, + const pthread_attr_t *__restrict __attr, void *(*__start_routine) (void *), - void *__restrict __arg) __THROW __nonnull ((1, 3)); + void *__restrict __arg) __THROWNL __nonnull ((1, 3)); /* Terminate calling thread. @@ -253,7 +252,7 @@ extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) __THROW; This function is a cancellation point and therefore not marked with __THROW. */ extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return, - __const struct timespec *__abstime); + const struct timespec *__abstime); #endif /* Indicate that the thread TH is never to be joined with PTHREAD_JOIN. @@ -282,7 +281,7 @@ extern int pthread_attr_destroy (pthread_attr_t *__attr) __THROW __nonnull ((1)); /* Get detach state attribute. */ -extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr, +extern int pthread_attr_getdetachstate (const pthread_attr_t *__attr, int *__detachstate) __THROW __nonnull ((1, 2)); @@ -293,7 +292,7 @@ extern int pthread_attr_setdetachstate (pthread_attr_t *__attr, /* Get the size of the guard area created for stack overflow protection. */ -extern int pthread_attr_getguardsize (__const pthread_attr_t *__attr, +extern int pthread_attr_getguardsize (const pthread_attr_t *__attr, size_t *__guardsize) __THROW __nonnull ((1, 2)); @@ -304,18 +303,17 @@ extern int pthread_attr_setguardsize (pthread_attr_t *__attr, /* Return in *PARAM the scheduling parameters of *ATTR. */ -extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict - __attr, +extern int pthread_attr_getschedparam (const pthread_attr_t *__restrict __attr, struct sched_param *__restrict __param) __THROW __nonnull ((1, 2)); /* Set scheduling parameters (priority, etc) in *ATTR according to PARAM. */ extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr, - __const struct sched_param *__restrict + const struct sched_param *__restrict __param) __THROW __nonnull ((1, 2)); /* Return in *POLICY the scheduling policy of *ATTR. */ -extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict +extern int pthread_attr_getschedpolicy (const pthread_attr_t *__restrict __attr, int *__restrict __policy) __THROW __nonnull ((1, 2)); @@ -324,7 +322,7 @@ extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) __THROW __nonnull ((1)); /* Return in *INHERIT the scheduling inheritance mode of *ATTR. */ -extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict +extern int pthread_attr_getinheritsched (const pthread_attr_t *__restrict __attr, int *__restrict __inherit) __THROW __nonnull ((1, 2)); @@ -335,7 +333,7 @@ extern int pthread_attr_setinheritsched (pthread_attr_t *__attr, /* Return in *SCOPE the scheduling contention scope of *ATTR. */ -extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr, +extern int pthread_attr_getscope (const pthread_attr_t *__restrict __attr, int *__restrict __scope) __THROW __nonnull ((1, 2)); @@ -344,7 +342,7 @@ extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) __THROW __nonnull ((1)); /* Return the previously set address for the stack. */ -extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict +extern int pthread_attr_getstackaddr (const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr) __THROW __nonnull ((1, 2)) __attribute_deprecated__; @@ -357,7 +355,7 @@ extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, __THROW __nonnull ((1)) __attribute_deprecated__; /* Return the currently used minimal stack size. */ -extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict +extern int pthread_attr_getstacksize (const pthread_attr_t *__restrict __attr, size_t *__restrict __stacksize) __THROW __nonnull ((1, 2)); @@ -370,7 +368,7 @@ extern int pthread_attr_setstacksize (pthread_attr_t *__attr, #ifdef __USE_XOPEN2K /* Return the previously set address for the stack. */ -extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr, +extern int pthread_attr_getstack (const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr, size_t *__restrict __stacksize) __THROW __nonnull ((1, 2, 3)); @@ -387,12 +385,12 @@ extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, the processors represented in CPUSET. */ extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr, size_t __cpusetsize, - __const cpu_set_t *__cpuset) + const cpu_set_t *__cpuset) __THROW __nonnull ((1, 3)); /* Get bit set in CPUSET representing the processors threads created with ATTR can run on. */ -extern int pthread_attr_getaffinity_np (__const pthread_attr_t *__attr, +extern int pthread_attr_getaffinity_np (const pthread_attr_t *__attr, size_t __cpusetsize, cpu_set_t *__cpuset) __THROW __nonnull ((1, 3)); @@ -411,7 +409,7 @@ extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) /* Set the scheduling parameters for TARGET_THREAD according to POLICY and *PARAM. */ extern int pthread_setschedparam (pthread_t __target_thread, int __policy, - __const struct sched_param *__param) + const struct sched_param *__param) __THROW __nonnull ((3)); /* Return in *POLICY and *PARAM the scheduling parameters for TARGET_THREAD. */ @@ -432,7 +430,7 @@ extern int pthread_getname_np (pthread_t __target_thread, char *__buf, __THROW __nonnull ((2)); /* Set thread name visible in the kernel and its interfaces. */ -extern int pthread_setname_np (pthread_t __target_thread, __const char *__name) +extern int pthread_setname_np (pthread_t __target_thread, const char *__name) __THROW __nonnull ((2)); #endif @@ -456,7 +454,7 @@ extern int pthread_yield (void) __THROW; /* Limit specified thread TH to run only on the processors represented in CPUSET. */ extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize, - __const cpu_set_t *__cpuset) + const cpu_set_t *__cpuset) __THROW __nonnull ((3)); /* Get bit set in CPUSET representing the processors TH can run on. */ @@ -650,9 +648,9 @@ __pthread_cleanup_routine (struct __pthread_cleanup_frame *__frame) __pthread_unwind_buf_t __cancel_buf; \ void (*__cancel_routine) (void *) = (routine); \ void *__cancel_arg = (arg); \ - int not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) (void *) \ - __cancel_buf.__cancel_jmp_buf, 0); \ - if (__builtin_expect (not_first_call, 0)) \ + int __not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) (void *) \ + __cancel_buf.__cancel_jmp_buf, 0); \ + if (__builtin_expect (__not_first_call, 0)) \ { \ __cancel_routine (__cancel_arg); \ __pthread_unwind_next (&__cancel_buf); \ @@ -685,9 +683,9 @@ extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf) __pthread_unwind_buf_t __cancel_buf; \ void (*__cancel_routine) (void *) = (routine); \ void *__cancel_arg = (arg); \ - int not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) (void *) \ - __cancel_buf.__cancel_jmp_buf, 0); \ - if (__builtin_expect (not_first_call, 0)) \ + int __not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) (void *) \ + __cancel_buf.__cancel_jmp_buf, 0); \ + if (__builtin_expect (__not_first_call, 0)) \ { \ __cancel_routine (__cancel_arg); \ __pthread_unwind_next (&__cancel_buf); \ @@ -731,7 +729,7 @@ extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __THROW; /* Initialize a mutex. */ extern int pthread_mutex_init (pthread_mutex_t *__mutex, - __const pthread_mutexattr_t *__mutexattr) + const pthread_mutexattr_t *__mutexattr) __THROW __nonnull ((1)); /* Destroy a mutex. */ @@ -740,26 +738,26 @@ extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) /* Try locking a mutex. */ extern int pthread_mutex_trylock (pthread_mutex_t *__mutex) - __THROW __nonnull ((1)); + __THROWNL __nonnull ((1)); /* Lock a mutex. */ extern int pthread_mutex_lock (pthread_mutex_t *__mutex) - __THROW __nonnull ((1)); + __THROWNL __nonnull ((1)); #ifdef __USE_XOPEN2K /* Wait until lock becomes available, or specified time passes. */ extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, - __const struct timespec *__restrict - __abstime) __THROW __nonnull ((1, 2)); + const struct timespec *__restrict + __abstime) __THROWNL __nonnull ((1, 2)); #endif /* Unlock a mutex. */ extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) - __THROW __nonnull ((1)); + __THROWNL __nonnull ((1)); /* Get the priority ceiling of MUTEX. */ -extern int pthread_mutex_getprioceiling (__const pthread_mutex_t * +extern int pthread_mutex_getprioceiling (const pthread_mutex_t * __restrict __mutex, int *__restrict __prioceiling) __THROW __nonnull ((1, 2)); @@ -795,7 +793,7 @@ extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) __THROW __nonnull ((1)); /* Get the process-shared flag of the mutex attribute ATTR. */ -extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t * +extern int pthread_mutexattr_getpshared (const pthread_mutexattr_t * __restrict __attr, int *__restrict __pshared) __THROW __nonnull ((1, 2)); @@ -807,7 +805,7 @@ extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr, #if defined __USE_UNIX98 || defined __USE_XOPEN2K8 /* Return in *KIND the mutex kind attribute in *ATTR. */ -extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict +extern int pthread_mutexattr_gettype (const pthread_mutexattr_t *__restrict __attr, int *__restrict __kind) __THROW __nonnull ((1, 2)); @@ -819,7 +817,7 @@ extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) #endif /* Return in *PROTOCOL the mutex protocol attribute in *ATTR. */ -extern int pthread_mutexattr_getprotocol (__const pthread_mutexattr_t * +extern int pthread_mutexattr_getprotocol (const pthread_mutexattr_t * __restrict __attr, int *__restrict __protocol) __THROW __nonnull ((1, 2)); @@ -831,7 +829,7 @@ extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr, __THROW __nonnull ((1)); /* Return in *PRIOCEILING the mutex prioceiling attribute in *ATTR. */ -extern int pthread_mutexattr_getprioceiling (__const pthread_mutexattr_t * +extern int pthread_mutexattr_getprioceiling (const pthread_mutexattr_t * __restrict __attr, int *__restrict __prioceiling) __THROW __nonnull ((1, 2)); @@ -843,11 +841,11 @@ extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr, #ifdef __USE_XOPEN2K /* Get the robustness flag of the mutex attribute ATTR. */ -extern int pthread_mutexattr_getrobust (__const pthread_mutexattr_t *__attr, +extern int pthread_mutexattr_getrobust (const pthread_mutexattr_t *__attr, int *__robustness) __THROW __nonnull ((1, 2)); # ifdef __USE_GNU -extern int pthread_mutexattr_getrobust_np (__const pthread_mutexattr_t *__attr, +extern int pthread_mutexattr_getrobust_np (const pthread_mutexattr_t *__attr, int *__robustness) __THROW __nonnull ((1, 2)); # endif @@ -870,7 +868,7 @@ extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr, /* Initialize read-write lock RWLOCK using attributes ATTR, or use the default values if later is NULL. */ extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, - __const pthread_rwlockattr_t *__restrict + const pthread_rwlockattr_t *__restrict __attr) __THROW __nonnull ((1)); /* Destroy read-write lock RWLOCK. */ @@ -879,37 +877,37 @@ extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) /* Acquire read lock for RWLOCK. */ extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) - __THROW __nonnull ((1)); + __THROWNL __nonnull ((1)); /* Try to acquire read lock for RWLOCK. */ extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) - __THROW __nonnull ((1)); + __THROWNL __nonnull ((1)); # ifdef __USE_XOPEN2K /* Try to acquire read lock for RWLOCK or return after specfied time. */ extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, - __const struct timespec *__restrict - __abstime) __THROW __nonnull ((1, 2)); + const struct timespec *__restrict + __abstime) __THROWNL __nonnull ((1, 2)); # endif /* Acquire write lock for RWLOCK. */ extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) - __THROW __nonnull ((1)); + __THROWNL __nonnull ((1)); /* Try to acquire write lock for RWLOCK. */ extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) - __THROW __nonnull ((1)); + __THROWNL __nonnull ((1)); # ifdef __USE_XOPEN2K /* Try to acquire write lock for RWLOCK or return after specfied time. */ extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, - __const struct timespec *__restrict - __abstime) __THROW __nonnull ((1, 2)); + const struct timespec *__restrict + __abstime) __THROWNL __nonnull ((1, 2)); # endif /* Unlock RWLOCK. */ extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) - __THROW __nonnull ((1)); + __THROWNL __nonnull ((1)); /* Functions for handling read-write lock attributes. */ @@ -923,7 +921,7 @@ extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) __THROW __nonnull ((1)); /* Return current setting of process-shared attribute of ATTR in PSHARED. */ -extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t * +extern int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t * __restrict __attr, int *__restrict __pshared) __THROW __nonnull ((1, 2)); @@ -934,7 +932,7 @@ extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, __THROW __nonnull ((1)); /* Return current setting of reader/writer preference. */ -extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t * +extern int pthread_rwlockattr_getkind_np (const pthread_rwlockattr_t * __restrict __attr, int *__restrict __pref) __THROW __nonnull ((1, 2)); @@ -950,8 +948,8 @@ extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr, /* Initialize condition variable COND using attributes ATTR, or use the default values if later is NULL. */ extern int pthread_cond_init (pthread_cond_t *__restrict __cond, - __const pthread_condattr_t *__restrict - __cond_attr) __THROW __nonnull ((1)); + const pthread_condattr_t *__restrict __cond_attr) + __THROW __nonnull ((1)); /* Destroy condition variable COND. */ extern int pthread_cond_destroy (pthread_cond_t *__cond) @@ -959,11 +957,11 @@ extern int pthread_cond_destroy (pthread_cond_t *__cond) /* Wake up one thread waiting for condition variable COND. */ extern int pthread_cond_signal (pthread_cond_t *__cond) - __THROW __nonnull ((1)); + __THROWNL __nonnull ((1)); /* Wake up all threads waiting for condition variables COND. */ extern int pthread_cond_broadcast (pthread_cond_t *__cond) - __THROW __nonnull ((1)); + __THROWNL __nonnull ((1)); /* Wait for condition variable COND to be signaled or broadcast. MUTEX is assumed to be locked before. @@ -983,8 +981,8 @@ extern int pthread_cond_wait (pthread_cond_t *__restrict __cond, __THROW. */ extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, pthread_mutex_t *__restrict __mutex, - __const struct timespec *__restrict - __abstime) __nonnull ((1, 2, 3)); + const struct timespec *__restrict __abstime) + __nonnull ((1, 2, 3)); /* Functions for handling condition variable attributes. */ @@ -997,7 +995,7 @@ extern int pthread_condattr_destroy (pthread_condattr_t *__attr) __THROW __nonnull ((1)); /* Get the process-shared flag of the condition variable attribute ATTR. */ -extern int pthread_condattr_getpshared (__const pthread_condattr_t * +extern int pthread_condattr_getpshared (const pthread_condattr_t * __restrict __attr, int *__restrict __pshared) __THROW __nonnull ((1, 2)); @@ -1008,7 +1006,7 @@ extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, #ifdef __USE_XOPEN2K /* Get the clock selected for the conditon variable attribute ATTR. */ -extern int pthread_condattr_getclock (__const pthread_condattr_t * +extern int pthread_condattr_getclock (const pthread_condattr_t * __restrict __attr, __clockid_t *__restrict __clock_id) __THROW __nonnull ((1, 2)); @@ -1034,15 +1032,15 @@ extern int pthread_spin_destroy (pthread_spinlock_t *__lock) /* Wait until spinlock LOCK is retrieved. */ extern int pthread_spin_lock (pthread_spinlock_t *__lock) - __THROW __nonnull ((1)); + __THROWNL __nonnull ((1)); /* Try to lock spinlock LOCK. */ extern int pthread_spin_trylock (pthread_spinlock_t *__lock) - __THROW __nonnull ((1)); + __THROWNL __nonnull ((1)); /* Release spinlock LOCK. */ extern int pthread_spin_unlock (pthread_spinlock_t *__lock) - __THROW __nonnull ((1)); + __THROWNL __nonnull ((1)); /* Functions to handle barriers. */ @@ -1050,7 +1048,7 @@ extern int pthread_spin_unlock (pthread_spinlock_t *__lock) /* Initialize BARRIER with the attributes in ATTR. The barrier is opened when COUNT waiters arrived. */ extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier, - __const pthread_barrierattr_t *__restrict + const pthread_barrierattr_t *__restrict __attr, unsigned int __count) __THROW __nonnull ((1)); @@ -1060,7 +1058,7 @@ extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) /* Wait on barrier BARRIER. */ extern int pthread_barrier_wait (pthread_barrier_t *__barrier) - __THROW __nonnull ((1)); + __THROWNL __nonnull ((1)); /* Initialize barrier attribute ATTR. */ @@ -1072,7 +1070,7 @@ extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) __THROW __nonnull ((1)); /* Get the process-shared flag of the barrier attribute ATTR. */ -extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t * +extern int pthread_barrierattr_getpshared (const pthread_barrierattr_t * __restrict __attr, int *__restrict __pshared) __THROW __nonnull ((1, 2)); @@ -1104,7 +1102,7 @@ extern void *pthread_getspecific (pthread_key_t __key) __THROW; /* Store POINTER in the thread-specific data slot identified by KEY. */ extern int pthread_setspecific (pthread_key_t __key, - __const void *__pointer) __THROW ; + const void *__pointer) __THROW ; #ifdef __USE_XOPEN2K From ad8ae7daffc0231884874888d8a7aeeac34c8ebe Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Mon, 9 Jan 2012 00:47:04 -0500 Subject: [PATCH 4177/4487] HPPA: Initialize EPOLLONESHOT and EPOLLET correctly. The value of EPOLLONESHOT and EPOLLET should be initialized with an unsigned value. --- ChangeLog.hppa | 5 +++++ sysdeps/unix/sysv/linux/hppa/sys/epoll.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 8988cf4f38..e7a80e50d0 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,8 @@ +2012-01-08 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/sys/epoll.h (EPOLLONESHOT) + (EPOLLET): Initialize with unsiged values. + 2012-01-08 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/nptl/pthread.h: Sync from libc copy. diff --git a/sysdeps/unix/sysv/linux/hppa/sys/epoll.h b/sysdeps/unix/sysv/linux/hppa/sys/epoll.h index b11a34d459..53037d6320 100644 --- a/sysdeps/unix/sysv/linux/hppa/sys/epoll.h +++ b/sysdeps/unix/sysv/linux/hppa/sys/epoll.h @@ -65,9 +65,9 @@ enum EPOLL_EVENTS #define EPOLLHUP EPOLLHUP EPOLLRDHUP = 0x2000, #define EPOLLRDHUP EPOLLRDHUP - EPOLLONESHOT = (1 << 30), + EPOLLONESHOT = 1u << 30, #define EPOLLONESHOT EPOLLONESHOT - EPOLLET = (1 << 31) + EPOLLET = 1u << 31 #define EPOLLET EPOLLET }; From 2aee89493501536e597725caf45b428fa6567b68 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 26 Jan 2012 20:53:57 +0000 Subject: [PATCH 4178/4487] MIPS: Remove __STDC__ conditionals. --- ChangeLog.mips | 7 +++++++ sysdeps/mips/sys/asm.h | 8 ++------ sysdeps/unix/sysv/linux/mips/mips32/sysdep.h | 8 ++------ sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h | 8 ++------ sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h | 8 ++------ 5 files changed, 15 insertions(+), 24 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 81ea2a315b..f92ae72e04 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,10 @@ +2012-01-26 Joseph Myers + + * sysdeps/mips/sys/asm.h: Remove __STDC__ conditionals. + * sysdeps/unix/sysv/linux/mips/mips32/sysdep.h: Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h: Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h: Likewise. + 2012-01-08 Joseph Myers * sysdeps/mips/bits/fenv.h: Use const instead of __const. diff --git a/sysdeps/mips/sys/asm.h b/sysdeps/mips/sys/asm.h index b590802fd9..a3e7a0077b 100644 --- a/sysdeps/mips/sys/asm.h +++ b/sysdeps/mips/sys/asm.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 2002, 2003, 2004, 2005 +/* Copyright (C) 1997, 1998, 2002, 2003, 2004, 2005, 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ralf Baechle . @@ -24,11 +24,7 @@ #include #ifndef CAT -# ifdef __STDC__ -# define __CAT(str1,str2) str1##str2 -# else -# define __CAT(str1,str2) str1/**/str2 -# endif +# define __CAT(str1,str2) str1##str2 # define CAT(str1,str2) __CAT(str1,str2) #endif diff --git a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h index 20a345d536..061e322448 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h @@ -1,5 +1,5 @@ /* Copyright (C) 2000, 2002, 2003, 2004, 2005, - 2009 Free Software Foundation, Inc. + 2009, 2012 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 @@ -35,11 +35,7 @@ of the kernel. But these symbols do not follow the SYS_* syntax so we have to redefine the `SYS_ify' macro here. */ #undef SYS_ify -#ifdef __STDC__ -# define SYS_ify(syscall_name) __NR_##syscall_name -#else -# define SYS_ify(syscall_name) __NR_/**/syscall_name -#endif +#define SYS_ify(syscall_name) __NR_##syscall_name #ifndef __ASSEMBLER__ diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h index 665f88b068..6222785505 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006, 2009 +/* Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006, 2009, 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -35,11 +35,7 @@ of the kernel. But these symbols do not follow the SYS_* syntax so we have to redefine the `SYS_ify' macro here. */ #undef SYS_ify -#ifdef __STDC__ -# define SYS_ify(syscall_name) __NR_##syscall_name -#else -# define SYS_ify(syscall_name) __NR_/**/syscall_name -#endif +#define SYS_ify(syscall_name) __NR_##syscall_name #ifdef __ASSEMBLER__ diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h index b998a633ff..6b18f2731a 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006, 2009 +/* Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006, 2009, 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -35,11 +35,7 @@ of the kernel. But these symbols do not follow the SYS_* syntax so we have to redefine the `SYS_ify' macro here. */ #undef SYS_ify -#ifdef __STDC__ -# define SYS_ify(syscall_name) __NR_##syscall_name -#else -# define SYS_ify(syscall_name) __NR_/**/syscall_name -#endif +#define SYS_ify(syscall_name) __NR_##syscall_name #ifdef __ASSEMBLER__ From 53bce1b5f9f7a78076798acbe11f438d063b5e04 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 29 Jan 2012 16:23:28 +0100 Subject: [PATCH 4179/4487] m68k: remove __STDC__ conditionals --- ChangeLog.m68k | 6 ++++++ sysdeps/m68k/asm-syntax.h | 5 ----- sysdeps/m68k/m680x0/fpu/s_nextafterl.c | 7 +------ sysdeps/unix/sysv/linux/m68k/sysdep.h | 6 +----- 4 files changed, 8 insertions(+), 16 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index a668b4e81d..4b0e7ba481 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,9 @@ +2012-01-29 Andreas Schwab + + * sysdeps/m68k/asm-syntax.h: Remove __STDC__ conditionals. + * sysdeps/m68k/m680x0/fpu/s_nextafterl.c: Likewise. + * sysdeps/unix/sysv/linux/m68k/sysdep.h: Likewise. + 2012-01-08 Andreas Schwab * sysdeps/m68k/fpu/bits/fenv.h (FE_DFL_ENV, FE_NOMASK_ENV): Use diff --git a/sysdeps/m68k/asm-syntax.h b/sysdeps/m68k/asm-syntax.h index 4a5e14e655..04b8e594b2 100644 --- a/sysdeps/m68k/asm-syntax.h +++ b/sysdeps/m68k/asm-syntax.h @@ -52,15 +52,10 @@ #define MEM_DISP(base,displacement)(displacement,R(base)) #define MEM_PREDEC(memory_base)-(R(memory_base)) #define MEM_POSTINC(memory_base)(R(memory_base))+ -#ifdef __STDC__ #define MEM_INDX_(base,idx,size_suffix)(R(base),R(idx##.##size_suffix)) #define MEM_INDX(base,idx,size_suffix)MEM_INDX_(base,idx,size_suffix) #define MEM_INDX1_(base,idx,size_suffix,scale)(R(base),R(idx##.##size_suffix*scale)) #define MEM_INDX1(base,idx,size_suffix,scale)MEM_INDX1_(base,idx,size_suffix,scale) -#else -#define MEM_INDX(base,idx,size_suffix)(R(base),R(idx).size_suffix) -#define MEM_INDX1(base,idx,size_suffix,scale)(R(base),R(idx).size_suffix*scale) -#endif #define TEXT .text #define ALIGN .align ALIGNARG(2) #define GLOBL .globl diff --git a/sysdeps/m68k/m680x0/fpu/s_nextafterl.c b/sysdeps/m68k/m680x0/fpu/s_nextafterl.c index 70ab5a4784..dcccdf1762 100644 --- a/sysdeps/m68k/m680x0/fpu/s_nextafterl.c +++ b/sysdeps/m68k/m680x0/fpu/s_nextafterl.c @@ -29,12 +29,7 @@ static char rcsid[] = "$NetBSD: $"; #include "math.h" #include "math_private.h" -#ifdef __STDC__ - long double __nextafterl(long double x, long double y) -#else - long double __nextafterl(x,y) - long double x,y; -#endif +long double __nextafterl(long double x, long double y) { int32_t ix,iy,esx,esy; u_int32_t hx,hy,lx,ly; diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h index 1e2755493b..5523fa64f0 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -29,11 +29,7 @@ of the kernel. But these symbols do not follow the SYS_* syntax so we have to redefine the `SYS_ify' macro here. */ #undef SYS_ify -#ifdef __STDC__ -# define SYS_ify(syscall_name) __NR_##syscall_name -#else -# define SYS_ify(syscall_name) __NR_/**/syscall_name -#endif +#define SYS_ify(syscall_name) __NR_##syscall_name #ifdef __ASSEMBLER__ From 8525497961ef5979a2a14faee4324914230092e7 Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Mon, 30 Jan 2012 12:40:37 -0500 Subject: [PATCH 4180/4487] Remove libc_hidden_proto in sysdeps/unix/sysv/linux/generic/epoll_wait.c. --- ChangeLog.linux-generic | 5 +++++ sysdeps/unix/sysv/linux/generic/epoll_wait.c | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ChangeLog.linux-generic b/ChangeLog.linux-generic index 4a0b9084c5..83a2db1933 100644 --- a/ChangeLog.linux-generic +++ b/ChangeLog.linux-generic @@ -1,3 +1,8 @@ +2012-01-30 Chris Metcalf + + * sysdeps/unix/sysv/linux/generic/epoll_wait.c: Remove + libc_hidden_proto declaration now it's in sys/epoll.h override. + 2011-12-09 Chris Metcalf * sysdeps/unix/sysv/linux/generic/bits/msq.h: New file. diff --git a/sysdeps/unix/sysv/linux/generic/epoll_wait.c b/sysdeps/unix/sysv/linux/generic/epoll_wait.c index eda64bc946..0fa06e8e39 100644 --- a/sysdeps/unix/sysv/linux/generic/epoll_wait.c +++ b/sysdeps/unix/sysv/linux/generic/epoll_wait.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2011 Free Software Foundation, Inc. +/* Copyright (C) 2011, 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Chris Metcalf , 2011. @@ -22,8 +22,6 @@ #include #include -libc_hidden_proto (epoll_pwait) - int epoll_wait (int epfd, struct epoll_event *events, int maxevents, int timeout) { From 57809f28c033ee5a1391a1e78487b4afb98744f0 Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Mon, 30 Jan 2012 12:42:05 -0500 Subject: [PATCH 4181/4487] Add sysdeps/unix/sysv/linux/generic/not-cancel.h to override standard Linux version with openat(). --- ChangeLog.linux-generic | 4 +++ sysdeps/unix/sysv/linux/generic/not-cancel.h | 30 ++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/generic/not-cancel.h diff --git a/ChangeLog.linux-generic b/ChangeLog.linux-generic index 83a2db1933..a2f6a56935 100644 --- a/ChangeLog.linux-generic +++ b/ChangeLog.linux-generic @@ -1,3 +1,7 @@ +2012-01-30 Chris Metcalf + + * sysdeps/unix/sysv/linux/generic/not-cancel.h: New file. + 2012-01-30 Chris Metcalf * sysdeps/unix/sysv/linux/generic/epoll_wait.c: Remove diff --git a/sysdeps/unix/sysv/linux/generic/not-cancel.h b/sysdeps/unix/sysv/linux/generic/not-cancel.h new file mode 100644 index 0000000000..a95e2e9773 --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/not-cancel.h @@ -0,0 +1,30 @@ +/* Uncancelable versions of cancelable interfaces. Linux asm-generic version. + Copyright (C) 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2012. + + 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. */ + +#include +#include + +/* Uncancelable open with openat. */ +#undef open_not_cancel +#define open_not_cancel(name, flags, mode) \ + INLINE_SYSCALL (openat, 4, AT_FDCWD, (const char *) (name), (flags), (mode)) +#undef open_not_cancel_2 +#define open_not_cancel_2(name, flags) \ + INLINE_SYSCALL (openat, 3, AT_FDCWD, (const char *) (name), (flags)) From 3d31999a90f9c3e12f1910df22a513dccffe3e7a Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Mon, 30 Jan 2012 12:43:25 -0500 Subject: [PATCH 4182/4487] Don't check HAVE_ELF or NO_UNDERSCORES in sysdeps/tile/sysdep.h. --- ChangeLog.tile | 4 ++++ sysdeps/tile/sysdep.h | 8 -------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/ChangeLog.tile b/ChangeLog.tile index 00bbe00b2d..8842f16910 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,3 +1,7 @@ +2012-01-30 Chris Metcalf + + * sysdeps/tile/sysdep.h: Don't check HAVE_ELF or NO_UNDERSCORES. + 2012-01-07 Joseph Myers * sysdeps/tile/backtrace.c: Use x86_64 version of backtrace.c. diff --git a/sysdeps/tile/sysdep.h b/sysdeps/tile/sysdep.h index 758d28b9fa..87fbd5ec70 100644 --- a/sysdeps/tile/sysdep.h +++ b/sysdeps/tile/sysdep.h @@ -21,14 +21,6 @@ #include #include -#ifndef HAVE_ELF -# error "ELF is assumed." -#endif - -#ifndef NO_UNDERSCORES -# error "User-label prefix (underscore) assumed absent." -#endif - #if defined __ASSEMBLER__ || defined REQUEST_ASSEMBLER_MACROS #include From 1353ed1385a50c8b933a9fbfefeec503a9a35291 Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Tue, 31 Jan 2012 08:59:30 -0500 Subject: [PATCH 4183/4487] tile: Ignore feraiseexcept() internally. --- ChangeLog.tile | 4 ++++ sysdeps/tile/math_private.h | 12 ++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 sysdeps/tile/math_private.h diff --git a/ChangeLog.tile b/ChangeLog.tile index 8842f16910..aded10da79 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,3 +1,7 @@ +2012-01-31 Chris Metcalf + + * sysdeps/tile/math_private.h: Ignore feraiseexcept() internally. + 2012-01-30 Chris Metcalf * sysdeps/tile/sysdep.h: Don't check HAVE_ELF or NO_UNDERSCORES. diff --git a/sysdeps/tile/math_private.h b/sysdeps/tile/math_private.h new file mode 100644 index 0000000000..ea4c8eadf7 --- /dev/null +++ b/sysdeps/tile/math_private.h @@ -0,0 +1,12 @@ +#ifndef _MATH_PRIVATE_H + +#include + +/* We have no exception support, so feraiseexcept() must be a no-op. + And since we don't define FE_INVALID, FE_DIVBYZERO, etc., we + must ignore the argument of feraiseexcept() as well. we return + "1" to indicate we failed to raise an exception, though none of + the callers in glibc actually care. */ +#define feraiseexcept(excepts) 1 + +#endif From 975e4ecfd450f9c249cb47368d170630eb1bfd2f Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Tue, 31 Jan 2012 11:26:00 -0500 Subject: [PATCH 4184/4487] tile: use instead of in sysdep.h. --- ChangeLog.tile | 5 +++++ sysdeps/tile/sysdep.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.tile b/ChangeLog.tile index aded10da79..09495c43c9 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,3 +1,8 @@ +2012-01-31 Chris Metcalf + + * sysdeps/tile/sysdep.h: Use not + to reflect change from gcc community giveback. + 2012-01-31 Chris Metcalf * sysdeps/tile/math_private.h: Ignore feraiseexcept() internally. diff --git a/sysdeps/tile/sysdep.h b/sysdeps/tile/sysdep.h index 87fbd5ec70..fe481a24d4 100644 --- a/sysdeps/tile/sysdep.h +++ b/sysdeps/tile/sysdep.h @@ -23,7 +23,7 @@ #if defined __ASSEMBLER__ || defined REQUEST_ASSEMBLER_MACROS -#include +#include /* Make use of .type and .size directives. */ #define ASM_TYPE_DIRECTIVE(name,typearg) .type name,typearg; From 5dfe919c9fb31bdabc5352ee0b91863b30cbfad1 Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Tue, 31 Jan 2012 11:46:09 -0500 Subject: [PATCH 4185/4487] tile: use const instead of __const. --- ChangeLog.tile | 5 +++++ sysdeps/tile/bits/fenv.h | 2 +- sysdeps/unix/sysv/linux/tile/sys/cachectl.h | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog.tile b/ChangeLog.tile index 09495c43c9..095b4fe8b3 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,3 +1,8 @@ +2012-01-31 Chris Metcalf + + * sysdeps/tile/bits/fenv.h: Use const instead of __const. + * sysdeps/unix/sysv/linux/tile/sys/cachectl.h: Likewise. + 2012-01-31 Chris Metcalf * sysdeps/tile/sysdep.h: Use not diff --git a/sysdeps/tile/bits/fenv.h b/sysdeps/tile/bits/fenv.h index 56fe6fd911..0e12c04034 100644 --- a/sysdeps/tile/bits/fenv.h +++ b/sysdeps/tile/bits/fenv.h @@ -40,4 +40,4 @@ typedef unsigned int fexcept_t; typedef unsigned int fenv_t; /* If the default argument is used we use this value. */ -#define FE_DFL_ENV ((__const fenv_t *) -1l) +#define FE_DFL_ENV ((const fenv_t *) -1l) diff --git a/sysdeps/unix/sysv/linux/tile/sys/cachectl.h b/sysdeps/unix/sysv/linux/tile/sys/cachectl.h index 72d9e21381..308aefbbe5 100644 --- a/sysdeps/unix/sysv/linux/tile/sys/cachectl.h +++ b/sysdeps/unix/sysv/linux/tile/sys/cachectl.h @@ -28,9 +28,9 @@ __BEGIN_DECLS #ifdef __USE_MISC -extern int cacheflush (void *__addr, __const int __nbytes, __const int __op) __THROW; +extern int cacheflush (void *__addr, const int __nbytes, const int __op) __THROW; #endif -extern int _flush_cache (char *__addr, __const int __nbytes, __const int __op) __THROW; +extern int _flush_cache (char *__addr, const int __nbytes, const int __op) __THROW; __END_DECLS From e1102f7294b11d3eeeed20c2b7a9f4ef8bffea11 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 7 Feb 2012 12:52:31 +0000 Subject: [PATCH 4186/4487] Document copyright year ranges for ports. --- ChangeLog | 4 ++++ README | 9 +++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0558e9b166..378cf268d6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2012-02-07 Joseph Myers + + * README: Document use of ranges in copyright notices. + 2011-11-29 Joseph Myers * bare, sysdeps/am29k, sysdeps/i860, sysdeps/i960, sysdeps/m88k, diff --git a/README b/README index f395a05c35..3ad8078542 100644 --- a/README +++ b/README @@ -39,5 +39,10 @@ into a single add-on without interfering with each other. Like all glibc add-ons, this must be used by specifying the directory in the --enable-add-ons option when running glibc's configure script. - -$Id$ +The GNU C Library is free software. See the file COPYING.LIB in the +libc repository for copying conditions, and LICENSES for notices about +a few contributions that require these additional notices to be +distributed. License copyright years may be listed using range +notation, e.g., 2000-2011, indicating that every year in the range, +inclusive, is a copyrightable year that would otherwise be listed +individually. From b3c737fd390dc11c8613e725ef2db377ea7641bf Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 7 Feb 2012 12:56:48 +0000 Subject: [PATCH 4187/4487] Update ports README file. --- ChangeLog | 4 ++++ README | 14 ++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 378cf268d6..6a37d349fc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2012-02-07 Joseph Myers + + * README: Update. + 2012-02-07 Joseph Myers * README: Document use of ranges in copyright notices. diff --git a/README b/README index 3ad8078542..51e0a303b6 100644 --- a/README +++ b/README @@ -9,11 +9,12 @@ some optimized functions tailored for specific CPU implementations of an architecture, to be selected using --with-cpu. The ports repository is cooperatively maintained by volunteers on the - mailing list, and housed in the glibc CVS as a -module called "ports". See http://www.gnu.org/software/libc/resources.html -for details on using CVS. To report a bug in code housed in the ports -repository, please go to http://sources.redhat.com/bugzilla/ and file a bug -report under the glibc "ports" component. + mailing list, and housed in a separate +ports git repository. See +http://www.gnu.org/software/libc/download.html for details on using +git. To report a bug in code housed in the ports repository, please +go to http://sources.redhat.com/bugzilla/ and file a bug report under +the glibc "ports" component. An add-on for an individual port can be made from just the sysdeps/ subdirectories containing the port's code. You may want to include a @@ -34,7 +35,8 @@ sysdeps/CPU/preconfigure file; this can either be written by hand or generated by Autoconf from sysdeps/CPU/preconfigure.in, and follow the rules for glibc add-on configure fragments. No preconfigure file should do anything on an unrelated configuration, so that disparate ports can be put -into a single add-on without interfering with each other. +into a single add-on without interfering with each other. Files that +would go in scripts/data/ for libc go in data/ in ports. Like all glibc add-ons, this must be used by specifying the directory in the --enable-add-ons option when running glibc's configure script. From 662d5c4052225ca8248ef55deb992310a5a2e5b2 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 8 Feb 2012 13:34:32 +0100 Subject: [PATCH 4188/4487] m68k: don't set libc_cv_gcc_unwind_find_fde on coldfire --- ChangeLog.m68k | 5 +++++ sysdeps/unix/sysv/linux/m68k/configure | 2 +- sysdeps/unix/sysv/linux/m68k/configure.in | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 4b0e7ba481..54baf63f63 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2012-02-08 Andreas Schwab + + * sysdeps/unix/sysv/linux/m68k/configure.in + (libc_cv_gcc_unwind_find_fde): Don't set on coldfire. + 2012-01-29 Andreas Schwab * sysdeps/m68k/asm-syntax.h: Remove __STDC__ conditionals. diff --git a/sysdeps/unix/sysv/linux/m68k/configure b/sysdeps/unix/sysv/linux/m68k/configure index 80ba90191f..708b7a1a3c 100644 --- a/sysdeps/unix/sysv/linux/m68k/configure +++ b/sysdeps/unix/sysv/linux/m68k/configure @@ -5,7 +5,7 @@ m68k/coldfire) ;; *) arch_minimum_kernel=2.0.10 + libc_cv_gcc_unwind_find_fde=yes ;; esac -libc_cv_gcc_unwind_find_fde=yes ldd_rewrite_script=sysdeps/unix/sysv/linux/ldd-rewrite.sed diff --git a/sysdeps/unix/sysv/linux/m68k/configure.in b/sysdeps/unix/sysv/linux/m68k/configure.in index e5a94ab8e6..b25f4dbb7f 100644 --- a/sysdeps/unix/sysv/linux/m68k/configure.in +++ b/sysdeps/unix/sysv/linux/m68k/configure.in @@ -6,7 +6,7 @@ m68k/coldfire) ;; *) arch_minimum_kernel=2.0.10 + libc_cv_gcc_unwind_find_fde=yes ;; esac -libc_cv_gcc_unwind_find_fde=yes ldd_rewrite_script=sysdeps/unix/sysv/linux/ldd-rewrite.sed From 74b24e3d462c96e632c4bbfaa01d36a6c332572c Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 8 Feb 2012 13:35:36 +0100 Subject: [PATCH 4189/4487] m68k: unify m68k-helpers.S --- ChangeLog.m68k | 6 ++ sysdeps/m68k/coldfire/sysdep.h | 7 +- sysdeps/m68k/m680x0/sysdep.h | 8 +- .../sysv/linux/m68k/coldfire/m68k-helpers.S | 97 ------------------- .../linux/m68k/{m680x0 => }/m68k-helpers.S | 5 +- 5 files changed, 21 insertions(+), 102 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/m68k/coldfire/m68k-helpers.S rename sysdeps/unix/sysv/linux/m68k/{m680x0 => }/m68k-helpers.S (98%) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 54baf63f63..78f718fe37 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,5 +1,11 @@ 2012-02-08 Andreas Schwab + * sysdeps/m68k/m680x0/sysdep.h (LOAD_GOT): Define. + * sysdeps/m68k/coldfire/sysdep.h (LOAD_GOT): Define. + * sysdeps/unix/sysv/linux/m68k/coldfire/m68k-helper.S: Remove. + * sysdeps/unix/sysv/linux/m68k/m680x0/m68k-helper.S: Remove. + * sysdeps/unix/sysv/linux/m68k/m68k-helper.S: New file. + * sysdeps/unix/sysv/linux/m68k/configure.in (libc_cv_gcc_unwind_find_fde): Don't set on coldfire. diff --git a/sysdeps/m68k/coldfire/sysdep.h b/sysdeps/m68k/coldfire/sysdep.h index 37f66d1c74..25feee9784 100644 --- a/sysdeps/m68k/coldfire/sysdep.h +++ b/sysdeps/m68k/coldfire/sysdep.h @@ -1,5 +1,5 @@ /* Assembler macros for Coldfire. - Copyright (C) 1998, 2003, 2010 Free Software Foundation, Inc. + Copyright (C) 1998, 2003, 2010, 2012 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 @@ -26,6 +26,11 @@ # define PCREL_OP(OP, SRC, DST, TMP) \ move.l &SRC - ., TMP; OP (-8, %pc, TMP), DST +/* Load the address of the GOT into register R. */ +# define LOAD_GOT(R) \ + move.l &_GLOBAL_OFFSET_TABLE_@GOTPC, R; \ + lea (-6, %pc, R), R + #else /* As above, but PC is the spelling of the PC register. We need this diff --git a/sysdeps/m68k/m680x0/sysdep.h b/sysdeps/m68k/m680x0/sysdep.h index 013bc5eb66..ca90e8c03e 100644 --- a/sysdeps/m68k/m680x0/sysdep.h +++ b/sysdeps/m68k/m680x0/sysdep.h @@ -1,5 +1,5 @@ /* Assembler macros for m680x0. - Copyright (C) 2010 Free Software Foundation, Inc. + Copyright (C) 2010, 2012 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,9 +23,13 @@ /* Perform operation OP with PC-relative SRC as the first operand and DST as the second. TMP is available as a temporary if needed. */ -#define PCREL_OP(OP, SRC, DST, TMP) \ +# define PCREL_OP(OP, SRC, DST, TMP) \ OP SRC(%pc), DST +/* Load the address of the GOT into register R. */ +# define LOAD_GOT(R) \ + lea _GLOBAL_OFFSET_TABLE_@GOTPC (%pc), R + #else /* As above, but PC is the spelling of the PC register. We need this diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/m68k-helpers.S b/sysdeps/unix/sysv/linux/m68k/coldfire/m68k-helpers.S deleted file mode 100644 index 91f697bd82..0000000000 --- a/sysdeps/unix/sysv/linux/m68k/coldfire/m68k-helpers.S +++ /dev/null @@ -1,97 +0,0 @@ -/* Copyright (C) 2010, 2012 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Maxim Kuvyrkov , 2010. - - 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. - - In addition to the permissions in the GNU Lesser General Public - License, the Free Software Foundation gives you unlimited - permission to link the compiled version of this file with other - programs, and to distribute those programs without any restriction - coming from the use of this file. (The GNU Lesser General Public - License restrictions do apply in other respects; for example, they - cover modification of the file, and distribution when not linked - into another program.) - - Note that people who make modified versions of this file are not - obligated to grant this special exception for their modified - versions; it is their choice whether to do so. The GNU Lesser - General Public License gives permission to release a modified - version without this exception; this exception also makes it - possible to release a modified version which carries forward this - exception. - - 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. */ - -#include -#include - - .text - - .hidden __vdso_read_tp_stub -ENTRY (__vdso_read_tp_stub) - move.l #__NR_get_thread_area, %d0 - trap #0 - move.l %d0, %a0 - rts -END (__vdso_read_tp_stub) - -# ifdef SHARED -/* GCC will emit calls to this routine. Linux has an - equivalent helper function (which clobbers fewer registers than - a normal function call) in a vdso; tail call to the - helper. */ -# ifdef IS_IN_rtld -/* rtld gets a hidden copy of __m68k_read_tp. */ - .hidden __m68k_read_tp -# endif -ENTRY (__m68k_read_tp) - move.l #_GLOBAL_OFFSET_TABLE_@GOTPC, %a0 - lea (-6, %pc, %a0), %a0 - move.l M68K_VDSO_SYMBOL (__vdso_read_tp)@GOT(%a0), %a0 - move.l (%a0), %a0 - jmp (%a0) -END (__m68k_read_tp) - -/* The following two stubs are for macros in atomic.h, they can't - clobber anything. */ - - .hidden __vdso_atomic_cmpxchg_32_stub -ENTRY (__vdso_atomic_cmpxchg_32_stub) - move.l %d2, -(%sp) - cfi_adjust_cfa_offset (4) - cfi_rel_offset (%d2, 0) - move.l %d0, %d2 - move.l #SYS_ify (atomic_cmpxchg_32), %d0 - trap #0 - move.l (%sp)+, %d2 - cfi_adjust_cfa_offset (-4) - cfi_restore (%d2) - rts -END (__vdso_atomic_cmpxchg_32_stub) - - .hidden __vdso_atomic_barrier_stub -ENTRY (__vdso_atomic_barrier_stub) - move.l %d0, -(%sp) - cfi_adjust_cfa_offset (4) - move.l #SYS_ify (atomic_barrier), %d0 - trap #0 - move.l (%sp)+, %d0 - cfi_adjust_cfa_offset (-4) - rts -END (__vdso_atomic_barrier_stub) -# else /* !SHARED */ -/* If the vDSO is not available, use a syscall to get TP. */ - strong_alias (__vdso_read_tp_stub, __m68k_read_tp) -# endif /* SHARED */ diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/m68k-helpers.S b/sysdeps/unix/sysv/linux/m68k/m68k-helpers.S similarity index 98% rename from sysdeps/unix/sysv/linux/m68k/m680x0/m68k-helpers.S rename to sysdeps/unix/sysv/linux/m68k/m68k-helpers.S index 46e117633e..4a475b1970 100644 --- a/sysdeps/unix/sysv/linux/m68k/m680x0/m68k-helpers.S +++ b/sysdeps/unix/sysv/linux/m68k/m68k-helpers.S @@ -57,9 +57,10 @@ END (__vdso_read_tp_stub) .hidden __m68k_read_tp # endif ENTRY (__m68k_read_tp) - lea _GLOBAL_OFFSET_TABLE_@GOTPC(%pc), %a0 + LOAD_GOT (%a0) move.l M68K_VDSO_SYMBOL (__vdso_read_tp)@GOT(%a0), %a0 - jmp ([%a0]) + move.l (%a0), %a0 + jmp (%a0) END (__m68k_read_tp) /* The following two stubs are for macros in atomic.h, they can't From 06285c87857a33930a8e3c4b1ca5226b28130864 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 8 Feb 2012 13:35:50 +0100 Subject: [PATCH 4190/4487] m68k: add crt files --- ChangeLog.m68k | 3 ++ sysdeps/m68k/crti.S | 83 +++++++++++++++++++++++++++++++++++++++++++++ sysdeps/m68k/crtn.S | 48 ++++++++++++++++++++++++++ 3 files changed, 134 insertions(+) create mode 100644 sysdeps/m68k/crti.S create mode 100644 sysdeps/m68k/crtn.S diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 78f718fe37..7eace9206d 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,5 +1,8 @@ 2012-02-08 Andreas Schwab + * sysdeps/m68k/crti.S: New file. + * sysdeps/m68k/crtn.S: New file. + * sysdeps/m68k/m680x0/sysdep.h (LOAD_GOT): Define. * sysdeps/m68k/coldfire/sysdep.h (LOAD_GOT): Define. * sysdeps/unix/sysv/linux/m68k/coldfire/m68k-helper.S: Remove. diff --git a/sysdeps/m68k/crti.S b/sysdeps/m68k/crti.S new file mode 100644 index 0000000000..138bb02b52 --- /dev/null +++ b/sysdeps/m68k/crti.S @@ -0,0 +1,83 @@ +/* Special .init and .fini section support for m68k. + Copyright (C) 2012 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. + + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + + 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. */ + +/* crti.S puts a function prologue at the beginning of the .init and + .fini sections and defines global symbols for those addresses, so + they can be called as functions. The symbols _init and _fini are + magic and cause the linker to emit DT_INIT and DT_FINI. */ + +#include +#include + +#ifndef PREINIT_FUNCTION +# define PREINIT_FUNCTION __gmon_start__ +#endif + +#ifndef PREINIT_FUNCTION_WEAK +# define PREINIT_FUNCTION_WEAK 1 +#endif + +#if PREINIT_FUNCTION_WEAK + weak_extern (PREINIT_FUNCTION) +#else + .hidden PREINIT_FUNCTION +#endif + + .section .init,"ax",@progbits + .align 2 + .globl _init + .type _init, @function +_init: + link.w %fp, #0 + move.l %a5, -(%sp) + LOAD_GOT (%a5) +#if PREINIT_FUNCTION_WEAK + tst.l PREINIT_FUNCTION@GOT(%a5) + jeq 1f + jbsr PREINIT_FUNCTION@PLTPC +1: +#else + jbsr PREINIT_FUNCTION +#endif + + .section .fini,"ax",@progbits + .align 2 + .globl _fini + .type _fini, @function +_fini: + link.w %fp, #0 + move.l %a5, -(%sp) + LOAD_GOT (%a5) diff --git a/sysdeps/m68k/crtn.S b/sysdeps/m68k/crtn.S new file mode 100644 index 0000000000..7e76d775d6 --- /dev/null +++ b/sysdeps/m68k/crtn.S @@ -0,0 +1,48 @@ +/* Special .init and .fini section support for m68k. + Copyright (C) 2012 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. + + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + + 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. */ + +/* crtn.S puts function epilogues in the .init and .fini sections + corresponding to the prologues in crti.S. */ + + .section .init,"ax",@progbits + move.l -4(%fp), %a5 + unlk %fp + rts + + .section .fini,"ax",@progbits + move.l -4(%fp), %a5 + unlk %fp + rts From 92e47068b33040b59efdbedfbeedab1cba1e1e62 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 8 Feb 2012 23:35:36 +0000 Subject: [PATCH 4191/4487] Convert ARM to crti.S/crtn.S. --- ChangeLog.arm | 8 +++ sysdeps/arm/crti.S | 94 ++++++++++++++++++++++++++++++ sysdeps/arm/{initfini.c => crtn.S} | 30 +++++++--- sysdeps/arm/eabi/Makefile | 5 -- 4 files changed, 124 insertions(+), 13 deletions(-) create mode 100644 sysdeps/arm/crti.S rename sysdeps/arm/{initfini.c => crtn.S} (78%) diff --git a/ChangeLog.arm b/ChangeLog.arm index 62531a4493..75c8f54cf0 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,11 @@ +2012-02-08 Joseph Myers + + * sysdeps/arm/crti.S, sysdeps/arm/crtn.S: New files, based on + compiler output for sysdeps/generic/initfini.c. + * sysdeps/arm/initfini.c: Remove file. + * sysdeps/arm/eabi/Makefile (CFLAGS-initfini.s) + (CFLAGS-pt-initfini.s): Remove variables. + 2012-01-08 Joseph Myers * sysdeps/arm/eabi/bits/fenv.h: Use const instead of __const. diff --git a/sysdeps/arm/crti.S b/sysdeps/arm/crti.S new file mode 100644 index 0000000000..facb1e6c61 --- /dev/null +++ b/sysdeps/arm/crti.S @@ -0,0 +1,94 @@ +/* Special .init and .fini section support for ARM. + Copyright (C) 1995-2012 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. + + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + + 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. */ + +/* crti.S puts a function prologue at the beginning of the .init and + .fini sections and defines global symbols for those addresses, so + they can be called as functions. The symbols _init and _fini are + magic and cause the linker to emit DT_INIT and DT_FINI. */ + +#include +#include + +#ifndef PREINIT_FUNCTION +# define PREINIT_FUNCTION __gmon_start__ +#endif + +#ifndef PREINIT_FUNCTION_WEAK +# define PREINIT_FUNCTION_WEAK 1 +#endif + +#if PREINIT_FUNCTION_WEAK + weak_extern (PREINIT_FUNCTION) +#else + .hidden PREINIT_FUNCTION +#endif + +#if PREINIT_FUNCTION_WEAK + .p2align 2 + .type call_weak_fn, %function +call_weak_fn: + ldr r3, .LGOT + ldr r2, .LGOT+4 +.LPIC: + add r3, pc, r3 + ldr r2, [r3, r2] + cmp r2, #0 + bxeq lr + b PREINIT_FUNCTION + .p2align 2 +.LGOT: + .word _GLOBAL_OFFSET_TABLE_-(.LPIC+8) + .word PREINIT_FUNCTION(GOT) +#endif + + .section .init,"ax",%progbits + .p2align 2 + .globl _init + .type _init, %function +_init: + stmfd sp!, {r3, lr} +#if PREINIT_FUNCTION_WEAK + bl call_weak_fn +#else + bl PREINIT_FUNCTION +#endif + + .section .fini,"ax",%progbits + .p2align 2 + .globl _fini + .type _fini, %function +_fini: + stmfd sp!, {r3, lr} diff --git a/sysdeps/arm/initfini.c b/sysdeps/arm/crtn.S similarity index 78% rename from sysdeps/arm/initfini.c rename to sysdeps/arm/crtn.S index 659ee91401..18be5cc6d3 100644 --- a/sysdeps/arm/initfini.c +++ b/sysdeps/arm/crtn.S @@ -1,5 +1,5 @@ -/* Special .init and .fini section support. ARM version. - Copyright (C) 2006 Free Software Foundation, Inc. +/* Special .init and .fini section support for ARM. + Copyright (C) 1995-2012 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 @@ -34,9 +34,23 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -/* Prevent this function from being inlined. Otherwise half of its - constant pool will end up in crti and the other half in crtn. */ - -static void call_gmon_start (void) __attribute__((noinline)); - -#include +#include + +/* crtn.S puts function epilogues in the .init and .fini sections + corresponding to the prologues in crti.S. */ + + .section .init,"ax",%progbits +#ifdef __ARM_ARCH_4T__ + ldmfd sp!, {r3, lr} + bx lr +#else + ldmfd sp!, {r3, pc} +#endif + + .section .fini,"ax",%progbits +#ifdef __ARM_ARCH_4T__ + ldmfd sp!, {r3, lr} + bx lr +#else + ldmfd sp!, {r3, pc} +#endif diff --git a/sysdeps/arm/eabi/Makefile b/sysdeps/arm/eabi/Makefile index 20572d43bc..025465ad2a 100644 --- a/sysdeps/arm/eabi/Makefile +++ b/sysdeps/arm/eabi/Makefile @@ -3,7 +3,6 @@ aeabi_constants = aeabi_lcsts aeabi_sighandlers aeabi_math aeabi_routines = aeabi_assert aeabi_localeconv aeabi_errno_addr \ aeabi_mb_cur_max aeabi_atexit aeabi_memclr aeabi_memcpy \ aeabi_memmove aeabi_memset -CFLAGS-initfini.s += -fno-asynchronous-unwind-tables -fno-unwind-tables sysdep_routines += $(aeabi_constants) $(aeabi_routines) static-only-routines += $(aeabi_constants) @@ -29,7 +28,3 @@ endif ifeq ($(subdir),math) $(objpfx)libm.so: $(elfobjdir)/ld.so endif - -ifeq ($(subdir),nptl) -CFLAGS-pt-initfini.s += -fno-asynchronous-unwind-tables -fno-unwind-tables -endif From f81b9186fff072e96954399a479bf2eb6b32a228 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 8 Feb 2012 10:06:06 -0800 Subject: [PATCH 4192/4487] alpha: Remove HAVE_TLS_SUPPORT and HAVE___THREAD tests. --- ChangeLog.alpha | 8 +++ sysdeps/alpha/elf/configure | 122 ++++++++++++++++++++++++++------- sysdeps/alpha/elf/configure.in | 9 +-- sysdeps/alpha/nptl/tls.h | 16 +---- sysdeps/unix/alpha/sysdep.h | 64 ++++++----------- 5 files changed, 132 insertions(+), 87 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index b011d3ca33..9c304d77ac 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,11 @@ +2012-02-08 Richard Henderson + + * sysdeps/alpha/nptl/tls.h: Don't test HAVE_TLS_SUPPORT. + * sysdeps/unix/alpha/sysdep.h: Don't test HAVE___THREAD. + * sysdeps/alpha/elf/configure.in (libc_cv_alpha_tls): Error out if + the test fails. Don't set HAVE_TLS_SUPPORT. + * sysdeps/alpha/elf/configure: Rebuild. + 2012-01-07 Joseph Myers * sysdeps/alpha/backtrace.c: Use x86_64 version of backtrace.c. diff --git a/sysdeps/alpha/elf/configure b/sysdeps/alpha/elf/configure index 1d594dc787..5da9875910 100644 --- a/sysdeps/alpha/elf/configure +++ b/sysdeps/alpha/elf/configure @@ -1,12 +1,92 @@ + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + # This file is generated from configure.in by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/alpha/elf. -if test "$usetls" != no; then -# Check for support of thread-local storage handling in assembler and -# linker. -{ $as_echo "$as_me:$LINENO: checking for Alpha TLS support" >&5 +# Check for support of thread-local storage handling in assembler and linker. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Alpha TLS support" >&5 $as_echo_n "checking for Alpha TLS support... " >&6; } -if test "${libc_cv_alpha_tls+set}" = set; then +if ${libc_cv_alpha_tls+:} false; then : $as_echo_n "(cached) " >&6 else cat > conftest.s <<\EOF @@ -44,30 +124,26 @@ baz: lda $16, n($31) !tprel EOF if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then libc_cv_alpha_tls=yes else libc_cv_alpha_tls=no fi rm -f conftest* fi -{ $as_echo "$as_me:$LINENO: result: $libc_cv_alpha_tls" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_alpha_tls" >&5 $as_echo "$libc_cv_alpha_tls" >&6; } -if test $libc_cv_alpha_tls = yes; then - cat >>confdefs.h <<\_ACEOF -#define HAVE_TLS_SUPPORT 1 -_ACEOF - -fi +if test $libc_cv_alpha_tls = no; then + as_fn_error $? "the assembler must support TLS" "$LINENO" 5 fi -{ $as_echo "$as_me:$LINENO: checking for GP relative module local relocs" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GP relative module local relocs" >&5 $as_echo_n "checking for GP relative module local relocs... " >&6; } -if test "${libc_cv_alpha_hidden_gprel+set}" = set; then +if ${libc_cv_alpha_hidden_gprel+:} false; then : $as_echo_n "(cached) " >&6 else cat > conftest.c <<\EOF @@ -78,11 +154,11 @@ EOF libc_cv_alpha_hidden_gprel=no if { ac_try='${CC-cc} -S $CFLAGS -O2 -fpic conftest.c 1>&5' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then if grep -q 'bar.*!gprel' conftest.s \ && grep -q 'baz.*!gprel' conftest.s \ && ! grep -q 'bar.*!literal' conftest.s \ @@ -92,11 +168,9 @@ if { ac_try='${CC-cc} -S $CFLAGS -O2 -fpic conftest.c 1>&5' fi rm -f conftest* fi -{ $as_echo "$as_me:$LINENO: result: $libc_cv_alpha_hidden_gprel" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_alpha_hidden_gprel" >&5 $as_echo "$libc_cv_alpha_hidden_gprel" >&6; } if test $libc_cv_alpha_hidden_gprel = yes; then - cat >>confdefs.h <<\_ACEOF -#define PI_STATIC_AND_HIDDEN 1 -_ACEOF + $as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h fi diff --git a/sysdeps/alpha/elf/configure.in b/sysdeps/alpha/elf/configure.in index 3a479341e7..75fff5374c 100644 --- a/sysdeps/alpha/elf/configure.in +++ b/sysdeps/alpha/elf/configure.in @@ -1,9 +1,7 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. # Local configure fragment for sysdeps/alpha/elf. -if test "$usetls" != no; then -# Check for support of thread-local storage handling in assembler and -# linker. +# Check for support of thread-local storage handling in assembler and linker. AC_CACHE_CHECK(for Alpha TLS support, libc_cv_alpha_tls, [dnl cat > conftest.s <<\EOF .section ".tdata", "awT", @progbits @@ -46,9 +44,8 @@ else libc_cv_alpha_tls=no fi rm -f conftest*]) -if test $libc_cv_alpha_tls = yes; then - AC_DEFINE(HAVE_TLS_SUPPORT) -fi +if test $libc_cv_alpha_tls = no; then + AC_MSG_ERROR([the assembler must support TLS]) fi AC_CACHE_CHECK(for GP relative module local relocs, libc_cv_alpha_hidden_gprel, [dnl diff --git a/sysdeps/alpha/nptl/tls.h b/sysdeps/alpha/nptl/tls.h index e77b1ffca9..887a4576a4 100644 --- a/sysdeps/alpha/nptl/tls.h +++ b/sysdeps/alpha/nptl/tls.h @@ -1,5 +1,5 @@ /* Definition for thread-local data handling. NPTL/Alpha version. - Copyright (C) 2003, 2005, 2006, 2007 Free Software Foundation, Inc. + Copyright (C) 2003, 2005, 2006, 2007, 2012 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 @@ -38,18 +38,6 @@ typedef union dtv } pointer; } dtv_t; -#else /* __ASSEMBLER__ */ -# include -#endif /* __ASSEMBLER__ */ - - -/* We require TLS support in the tools. */ -#ifndef HAVE_TLS_SUPPORT -# error "TLS support is required." -#endif - -#ifndef __ASSEMBLER__ - /* Get system call information. */ # include @@ -144,6 +132,8 @@ typedef struct #define THREAD_GSCOPE_WAIT() \ GL(dl_wait_lookup_done) () +#else /* __ASSEMBLER__ */ +# include #endif /* __ASSEMBLER__ */ #endif /* tls.h */ diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h index d9009c1571..64add9e339 100644 --- a/sysdeps/unix/alpha/sysdep.h +++ b/sysdeps/unix/alpha/sysdep.h @@ -200,39 +200,19 @@ __LABEL(name) \ "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8", \ "$22", "$23", "$24", "$25", "$27", "$28", "memory" -/* If TLS is in use, we have a conflict between the PAL_rduniq primitive, - as modeled within GCC, and explicit use of the R0 register. If we use - the register via the asm, the scheduler may place the PAL_rduniq insn - before we've copied the data from R0 into _sc_ret. If this happens - we'll get a reload abort, since R0 is live at the same time it is - needed for the PAL_rduniq. - - Solve this by using the "v" constraint instead of an asm for the syscall - output. We don't do this unconditionally to allow compilation with - older compilers. */ - -#ifdef HAVE___THREAD -#define inline_syscall_r0_asm -#define inline_syscall_r0_out_constraint "=v" -#else -#define inline_syscall_r0_asm __asm__("$0") -#define inline_syscall_r0_out_constraint "=r" -#endif - /* It is moderately important optimization-wise to limit the lifetime of the hard-register variables as much as possible. Thus we copy in/out as close to the asm as possible. */ #define inline_syscall0(name, args...) \ { \ - register long _sc_0 inline_syscall_r0_asm; \ + register long _sc_0; \ register long _sc_19 __asm__("$19"); \ \ _sc_0 = name; \ __asm__ __volatile__ \ ("callsys # %0 %1 <= %2" \ - : inline_syscall_r0_out_constraint (_sc_0), \ - "=r"(_sc_19) \ + : "=v"(_sc_0), "=r"(_sc_19) \ : "0"(_sc_0) \ : inline_syscall_clobbers, \ "$16", "$17", "$18", "$20", "$21"); \ @@ -241,7 +221,7 @@ __LABEL(name) \ #define inline_syscall1(name,arg1) \ { \ - register long _sc_0 inline_syscall_r0_asm; \ + register long _sc_0; \ register long _sc_16 __asm__("$16"); \ register long _sc_19 __asm__("$19"); \ register long _tmp_16 = (long) (arg1); \ @@ -250,8 +230,7 @@ __LABEL(name) \ _sc_16 = _tmp_16; \ __asm__ __volatile__ \ ("callsys # %0 %1 <= %2 %3" \ - : inline_syscall_r0_out_constraint (_sc_0), \ - "=r"(_sc_19), "=r"(_sc_16) \ + : "=v"(_sc_0), "=r"(_sc_19), "=r"(_sc_16) \ : "0"(_sc_0), "2"(_sc_16) \ : inline_syscall_clobbers, \ "$17", "$18", "$20", "$21"); \ @@ -260,7 +239,7 @@ __LABEL(name) \ #define inline_syscall2(name,arg1,arg2) \ { \ - register long _sc_0 inline_syscall_r0_asm; \ + register long _sc_0; \ register long _sc_16 __asm__("$16"); \ register long _sc_17 __asm__("$17"); \ register long _sc_19 __asm__("$19"); \ @@ -272,8 +251,8 @@ __LABEL(name) \ _sc_17 = _tmp_17; \ __asm__ __volatile__ \ ("callsys # %0 %1 <= %2 %3 %4" \ - : inline_syscall_r0_out_constraint (_sc_0), \ - "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17) \ + : "=v"(_sc_0), "=r"(_sc_19), \ + "=r"(_sc_16), "=r"(_sc_17) \ : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17) \ : inline_syscall_clobbers, \ "$18", "$20", "$21"); \ @@ -282,7 +261,7 @@ __LABEL(name) \ #define inline_syscall3(name,arg1,arg2,arg3) \ { \ - register long _sc_0 inline_syscall_r0_asm; \ + register long _sc_0; \ register long _sc_16 __asm__("$16"); \ register long _sc_17 __asm__("$17"); \ register long _sc_18 __asm__("$18"); \ @@ -297,9 +276,8 @@ __LABEL(name) \ _sc_18 = _tmp_18; \ __asm__ __volatile__ \ ("callsys # %0 %1 <= %2 %3 %4 %5" \ - : inline_syscall_r0_out_constraint (_sc_0), \ - "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \ - "=r"(_sc_18) \ + : "=v"(_sc_0), "=r"(_sc_19), "=r"(_sc_16), \ + "=r"(_sc_17), "=r"(_sc_18) \ : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \ "4"(_sc_18) \ : inline_syscall_clobbers, "$20", "$21"); \ @@ -308,7 +286,7 @@ __LABEL(name) \ #define inline_syscall4(name,arg1,arg2,arg3,arg4) \ { \ - register long _sc_0 inline_syscall_r0_asm; \ + register long _sc_0; \ register long _sc_16 __asm__("$16"); \ register long _sc_17 __asm__("$17"); \ register long _sc_18 __asm__("$18"); \ @@ -325,9 +303,8 @@ __LABEL(name) \ _sc_19 = _tmp_19; \ __asm__ __volatile__ \ ("callsys # %0 %1 <= %2 %3 %4 %5 %6" \ - : inline_syscall_r0_out_constraint (_sc_0), \ - "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \ - "=r"(_sc_18) \ + : "=v"(_sc_0), "=r"(_sc_19), "=r"(_sc_16), \ + "=r"(_sc_17), "=r"(_sc_18) \ : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \ "4"(_sc_18), "1"(_sc_19) \ : inline_syscall_clobbers, "$20", "$21"); \ @@ -336,7 +313,7 @@ __LABEL(name) \ #define inline_syscall5(name,arg1,arg2,arg3,arg4,arg5) \ { \ - register long _sc_0 inline_syscall_r0_asm; \ + register long _sc_0; \ register long _sc_16 __asm__("$16"); \ register long _sc_17 __asm__("$17"); \ register long _sc_18 __asm__("$18"); \ @@ -356,9 +333,8 @@ __LABEL(name) \ _sc_20 = _tmp_20; \ __asm__ __volatile__ \ ("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7" \ - : inline_syscall_r0_out_constraint (_sc_0), \ - "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \ - "=r"(_sc_18), "=r"(_sc_20) \ + : "=v"(_sc_0), "=r"(_sc_19), "=r"(_sc_16), \ + "=r"(_sc_17), "=r"(_sc_18), "=r"(_sc_20) \ : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \ "4"(_sc_18), "1"(_sc_19), "5"(_sc_20) \ : inline_syscall_clobbers, "$21"); \ @@ -367,7 +343,7 @@ __LABEL(name) \ #define inline_syscall6(name,arg1,arg2,arg3,arg4,arg5,arg6) \ { \ - register long _sc_0 inline_syscall_r0_asm; \ + register long _sc_0; \ register long _sc_16 __asm__("$16"); \ register long _sc_17 __asm__("$17"); \ register long _sc_18 __asm__("$18"); \ @@ -390,9 +366,9 @@ __LABEL(name) \ _sc_21 = _tmp_21; \ __asm__ __volatile__ \ ("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7 %8" \ - : inline_syscall_r0_out_constraint (_sc_0), \ - "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \ - "=r"(_sc_18), "=r"(_sc_20), "=r"(_sc_21) \ + : "=v"(_sc_0), "=r"(_sc_19), "=r"(_sc_16), \ + "=r"(_sc_17), "=r"(_sc_18), "=r"(_sc_20), \ + "=r"(_sc_21) \ : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), "4"(_sc_18), \ "1"(_sc_19), "5"(_sc_20), "6"(_sc_21) \ : inline_syscall_clobbers); \ From fe7b738e7a0cf88f28bb40f55daa4237733f290f Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 8 Feb 2012 11:43:50 -0800 Subject: [PATCH 4193/4487] alpha: Require kernel version 2.6.0. The minimum version that supports TLS. Also avoids having to fix the build for ancient __ASSUME_* settings. --- ChangeLog.alpha | 5 +++++ sysdeps/unix/sysv/linux/alpha/configure | 8 ++++++++ sysdeps/unix/sysv/linux/alpha/configure.in | 8 ++++++++ sysdeps/unix/sysv/linux/alpha/kernel-features.h | 9 +++++++++ 4 files changed, 30 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/configure create mode 100644 sysdeps/unix/sysv/linux/alpha/configure.in diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 9c304d77ac..a1732f90e8 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,5 +1,10 @@ 2012-02-08 Richard Henderson + * sysdeps/unix/sysv/linux/alpha/configure.in: New file. + * sysdeps/unix/sysv/linux/alpha/configure: Build. + * sysdeps/unix/sysv/linux/alpha/kernel-features.h: Protect from + multiple includes. Disable statfs64 entirely. + * sysdeps/alpha/nptl/tls.h: Don't test HAVE_TLS_SUPPORT. * sysdeps/unix/alpha/sysdep.h: Don't test HAVE___THREAD. * sysdeps/alpha/elf/configure.in (libc_cv_alpha_tls): Error out if diff --git a/sysdeps/unix/sysv/linux/alpha/configure b/sysdeps/unix/sysv/linux/alpha/configure new file mode 100644 index 0000000000..80528ee54a --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/configure @@ -0,0 +1,8 @@ +# This file is generated from configure.in by Autoconf. DO NOT EDIT! + # Local configure fragment for sysdeps/unix/sysv/linux/alpha + +# There are several bits that no longer compile cleanly without +# realtime signal support (ver 2.2.0). Given that we also now +# require TLS (ver 2.6.0), it seems pointless to fix them. +# ??? Surely this should now be the generic default. +arch_minimum_kernel=2.6.0 diff --git a/sysdeps/unix/sysv/linux/alpha/configure.in b/sysdeps/unix/sysv/linux/alpha/configure.in new file mode 100644 index 0000000000..7136b858e0 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/configure.in @@ -0,0 +1,8 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/unix/sysv/linux/alpha + +# There are several bits that no longer compile cleanly without +# realtime signal support (ver 2.2.0). Given that we also now +# require TLS (ver 2.6.0), it seems pointless to fix them. +# ??? Surely this should now be the generic default. +arch_minimum_kernel=2.6.0 diff --git a/sysdeps/unix/sysv/linux/alpha/kernel-features.h b/sysdeps/unix/sysv/linux/alpha/kernel-features.h index 9c640f9849..ce4d1607de 100644 --- a/sysdeps/unix/sysv/linux/alpha/kernel-features.h +++ b/sysdeps/unix/sysv/linux/alpha/kernel-features.h @@ -18,6 +18,9 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#ifndef _KERNEL_FEATURES_H +#define _KERNEL_FEATURES_H 1 + /* alpha switched to a 64-bit timeval sometime before 2.2.0. */ #if __LINUX_KERNEL_VERSION >= 131584 # define __ASSUME_TIMEVAL64 1 @@ -96,3 +99,9 @@ #if __LINUX_KERNEL_VERSION < 0x020621 # undef __ASSUME_FALLOCATE #endif + +/* There never has been support for fstat64. */ +#undef __ASSUME_STATFS64 +#define __ASSUME_STATFS64 0 + +#endif /* _KERNEL_FEATURES_H */ From 6aa8bd8cd15f1563db859805e9681cb750247667 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 8 Feb 2012 11:44:40 -0800 Subject: [PATCH 4194/4487] alpha: Define TLS_DTV_UNALLOCATED. --- ChangeLog.alpha | 2 ++ sysdeps/alpha/dl-tls.h | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index a1732f90e8..ae6839df43 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,5 +1,7 @@ 2012-02-08 Richard Henderson + * sysdeps/alpha/dl-tls.h (TLS_DTV_UNALLOCATED): New. + * sysdeps/unix/sysv/linux/alpha/configure.in: New file. * sysdeps/unix/sysv/linux/alpha/configure: Build. * sysdeps/unix/sysv/linux/alpha/kernel-features.h: Protect from diff --git a/sysdeps/alpha/dl-tls.h b/sysdeps/alpha/dl-tls.h index f81f95d75e..d40d0a4ac5 100644 --- a/sysdeps/alpha/dl-tls.h +++ b/sysdeps/alpha/dl-tls.h @@ -25,5 +25,7 @@ typedef struct unsigned long int ti_offset; } tls_index; - extern void *__tls_get_addr (tls_index *ti); + +/* Value used for dtv entries for which the allocation is delayed. */ +#define TLS_DTV_UNALLOCATED ((void *) -1l) From 2011e6018cece62599c78e9a3c500ec887335a90 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 8 Feb 2012 11:48:38 -0800 Subject: [PATCH 4195/4487] alpha: Define _STAT_VER_LINUX. --- ChangeLog.alpha | 2 ++ sysdeps/unix/sysv/linux/alpha/bits/stat.h | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index ae6839df43..afcf75aa10 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,5 +1,7 @@ 2012-02-08 Richard Henderson + * sysdeps/unix/sysv/linux/alpha/bits/stat.h (_STAT_VER_LINUX): New. + * sysdeps/alpha/dl-tls.h (TLS_DTV_UNALLOCATED): New. * sysdeps/unix/sysv/linux/alpha/configure.in: New file. diff --git a/sysdeps/unix/sysv/linux/alpha/bits/stat.h b/sysdeps/unix/sysv/linux/alpha/bits/stat.h index d7241bd1aa..e70e83636d 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/stat.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996,1997,1998,1999,2000,2001,2004,2010 +/* Copyright (C) 1996,1997,1998,1999,2000,2001,2004,2010,2012 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -30,7 +30,8 @@ #define _STAT_VER_GLIBC2_1 2 #define _STAT_VER_KERNEL64 3 #define _STAT_VER_GLIBC2_3_4 3 -#define _STAT_VER _STAT_VER_GLIBC2_3_4 +#define _STAT_VER_LINUX 3 +#define _STAT_VER _STAT_VER_LINUX /* Versions of the `xmknod' interface. */ #define _MKNOD_VER_LINUX 0 From e544dcd508d61c3736d43ab6bbaf1fe83130819c Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 8 Feb 2012 12:36:16 -0800 Subject: [PATCH 4196/4487] alpha: Eliminate set-but-not-used warnings with internal syscalls. --- ChangeLog.alpha | 2 ++ sysdeps/unix/alpha/sysdep.h | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index afcf75aa10..42e3c8500c 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,5 +1,7 @@ 2012-02-08 Richard Henderson + * sysdeps/unix/alpha/sysdep.h (INTERNAL_SYSCALL_DECL): Mark unused. + * sysdeps/unix/sysv/linux/alpha/bits/stat.h (_STAT_VER_LINUX): New. * sysdeps/alpha/dl-tls.h (TLS_DTV_UNALLOCATED): New. diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h index 64add9e339..224c95d3b5 100644 --- a/sysdeps/unix/alpha/sysdep.h +++ b/sysdeps/unix/alpha/sysdep.h @@ -190,7 +190,9 @@ __LABEL(name) \ _sc_ret; \ }) -#define INTERNAL_SYSCALL_DECL(err) long int err +#define INTERNAL_SYSCALL_DECL(err) \ + long int err __attribute__((unused)) + /* Make sure and "use" the variable that we're not returning, in order to suppress unused variable warnings. */ #define INTERNAL_SYSCALL_ERROR_P(val, err) ((void)val, err) From 9fb2a6b9af5612cf99789f17a8f4cfb095715bf8 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 8 Feb 2012 13:40:03 -0800 Subject: [PATCH 4197/4487] alpha: Convert to crt[in].S. A particularly trivial conversion, since we were already using assembler, smuggled inside the C file. --- ChangeLog.alpha | 4 + sysdeps/alpha/elf/{initfini.c => crti.S} | 120 +++++++++++------------ sysdeps/alpha/elf/crtn.S | 50 ++++++++++ sysdeps/alpha/nptl/elf/pt-initfini.c | 89 ----------------- 4 files changed, 109 insertions(+), 154 deletions(-) rename sysdeps/alpha/elf/{initfini.c => crti.S} (55%) create mode 100644 sysdeps/alpha/elf/crtn.S delete mode 100644 sysdeps/alpha/nptl/elf/pt-initfini.c diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 42e3c8500c..e76205dbf5 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,5 +1,9 @@ 2012-02-08 Richard Henderson + * sysdeps/alpha/elf/crti.S, sysdeps/alpha/elf/crtn.S: New files... + * sysdeps/alpha/elf/initfini.c: ... split from here. Remove file. + * sysdeps/alpha/nptl/elf/pt-initfini.c: Remove file. + * sysdeps/unix/alpha/sysdep.h (INTERNAL_SYSCALL_DECL): Mark unused. * sysdeps/unix/sysv/linux/alpha/bits/stat.h (_STAT_VER_LINUX): New. diff --git a/sysdeps/alpha/elf/initfini.c b/sysdeps/alpha/elf/crti.S similarity index 55% rename from sysdeps/alpha/elf/initfini.c rename to sysdeps/alpha/elf/crti.S index 4d3342db9b..b5989bfb49 100644 --- a/sysdeps/alpha/elf/initfini.c +++ b/sysdeps/alpha/elf/crti.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for Alpha. - Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 2001, 2002, 2003, 2012 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 @@ -34,17 +34,12 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -/* This file is compiled into assembly code which is then munged by a sed - script into two files: crti.s and crtn.s. +/* crti.S puts a function prologue at the beginning of the .init and + .fini sections and defines global symbols for those addresses, so + they can be called as functions. The symbols _init and _fini are + magic and cause the linker to emit DT_INIT and DT_FINI. - * crti.s puts a function prologue at the beginning of the .init and .fini - sections and defines global symbols for those addresses, so they can be - called as functions. - - * crtn.s puts the corresponding function epilogues in the .init and .fini - sections. - - This differs from what would be generated by the generic code in that + This differs from what would be generated for ordinary code in that we save and restore the GP within the function. In order for linker relaxation to work, the value in the GP register on exit from a function must be valid for the function entry point. Normally, a function is @@ -54,57 +49,52 @@ files, all of which may have different GP values. So we must reload the GP value from crti.o in crtn.o. */ -__asm__ (" \n\ -#include \"defs.h\" \n\ - \n\ -/*@HEADER_ENDS*/ \n\ - \n\ -/*@_init_PROLOG_BEGINS*/ \n\ - .section .init, \"ax\", @progbits \n\ - .globl _init \n\ - .type _init, @function \n\ - .usepv _init, std \n\ -_init: \n\ - ldgp $29, 0($27) \n\ - subq $30, 16, $30 \n\ - lda $27, __gmon_start__ \n\ - stq $26, 0($30) \n\ - stq $29, 8($30) \n\ - beq $27, 1f \n\ - jsr $26, ($27), __gmon_start__ \n\ - ldq $29, 8($30) \n\ - .align 3 \n\ -1: \n\ -/*@_init_PROLOG_ENDS*/ \n\ - \n\ -/*@_init_EPILOG_BEGINS*/ \n\ - .section .init, \"ax\", @progbits \n\ - ldq $26, 0($30) \n\ - ldq $29, 8($30) \n\ - addq $30, 16, $30 \n\ - ret \n\ -/*@_init_EPILOG_ENDS*/ \n\ - \n\ -/*@_fini_PROLOG_BEGINS*/ \n\ - .section .fini, \"ax\", @progbits \n\ - .globl _fini \n\ - .type _fini,@function \n\ - .usepv _fini,std \n\ -_fini: \n\ - ldgp $29, 0($27) \n\ - subq $30, 16, $30 \n\ - stq $26, 0($30) \n\ - stq $29, 8($30) \n\ - .align 3 \n\ -/*@_fini_PROLOG_ENDS*/ \n\ - \n\ -/*@_fini_EPILOG_BEGINS*/ \n\ - .section .fini, \"ax\", @progbits \n\ - ldq $26, 0($30) \n\ - ldq $29, 8($30) \n\ - addq $30, 16, $30 \n\ - ret \n\ -/*@_fini_EPILOG_ENDS*/ \n\ - \n\ -/*@TRAILER_BEGINS*/ \n\ -"); +#include +#include + +#ifndef PREINIT_FUNCTION +# define PREINIT_FUNCTION __gmon_start__ +#endif + +#ifndef PREINIT_FUNCTION_WEAK +# define PREINIT_FUNCTION_WEAK 1 +#endif + +#if PREINIT_FUNCTION_WEAK + weak_extern (PREINIT_FUNCTION) +#else + .hidden PREINIT_FUNCTION +#endif + + .section .init, "ax", @progbits + .globl _init + .type _init, @function + .usepv _init, std +_init: + ldgp $29, 0($27) + subq $30, 16, $30 +#if PREINIT_FUNCTION_WEAK + lda $27, PREINIT_FUNCTION +#endif + stq $26, 0($30) + stq $29, 8($30) +#if PREINIT_FUNCTION_WEAK + beq $27, 1f + jsr $26, ($27), PREINIT_FUNCTION + ldq $29, 8($30) +1: +#else + bsr $26, PREINIT_FUNCTION !samegp +#endif + .p2align 3 + + .section .fini, "ax", @progbits + .globl _fini + .type _fini,@function + .usepv _fini,std +_fini: + ldgp $29, 0($27) + subq $30, 16, $30 + stq $26, 0($30) + stq $29, 8($30) + .p2align 3 diff --git a/sysdeps/alpha/elf/crtn.S b/sysdeps/alpha/elf/crtn.S new file mode 100644 index 0000000000..50e772fb62 --- /dev/null +++ b/sysdeps/alpha/elf/crtn.S @@ -0,0 +1,50 @@ +/* Special .init and .fini section support for Alpha. + Copyright (C) 2001, 2002, 2003, 2012 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. + + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + + 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. */ + +/* crtn.S puts function epilogues in the .init and .fini sections + corresponding to the prologues in crti.S. */ + + .section .init, "ax", @progbits + ldq $26, 0($30) + ldq $29, 8($30) + addq $30, 16, $30 + ret + + .section .fini, "ax", @progbits + ldq $26, 0($30) + ldq $29, 8($30) + addq $30, 16, $30 + ret diff --git a/sysdeps/alpha/nptl/elf/pt-initfini.c b/sysdeps/alpha/nptl/elf/pt-initfini.c deleted file mode 100644 index ba2e419d61..0000000000 --- a/sysdeps/alpha/nptl/elf/pt-initfini.c +++ /dev/null @@ -1,89 +0,0 @@ -/* Special .init and .fini section support for Alpha. NPTL version. - Copyright (C) 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. */ - -/* This file is compiled into assembly code which is then munged by a sed - script into two files: crti.s and crtn.s. - - * crti.s puts a function prologue at the beginning of the .init and .fini - sections and defines global symbols for those addresses, so they can be - called as functions. - - * crtn.s puts the corresponding function epilogues in the .init and .fini - sections. - - This differs from what would be generated by the generic code in that - we save and restore the GP within the function. In order for linker - relaxation to work, the value in the GP register on exit from a function - must be valid for the function entry point. Normally, a function is - contained within one object file and this is not an issue, provided - that the function reloads the gp after making any function calls. - However, _init and _fini are constructed from pieces of many object - files, all of which may have different GP values. So we must reload - the GP value from crti.o in crtn.o. */ - -__asm__ (" \n\ -#include \"defs.h\" \n\ - \n\ -/*@HEADER_ENDS*/ \n\ - \n\ -/*@_init_PROLOG_BEGINS*/ \n\ - .section .init, \"ax\", @progbits \n\ - .globl _init \n\ - .type _init,@function \n\ - .usepv _init,std \n\ -_init: \n\ - ldgp $29, 0($27) \n\ - subq $30, 16, $30 \n\ - stq $26, 0($30) \n\ - stq $29, 8($30) \n\ - bsr $26, __pthread_initialize_minimal_internal !samegp \n\ - .align 3 \n\ -/*@_init_PROLOG_ENDS*/ \n\ - \n\ -/*@_init_EPILOG_BEGINS*/ \n\ - .section .init, \"ax\", @progbits \n\ - ldq $26, 0($30) \n\ - ldq $29, 8($30) \n\ - addq $30, 16, $30 \n\ - ret \n\ -/*@_init_EPILOG_ENDS*/ \n\ - \n\ -/*@_fini_PROLOG_BEGINS*/ \n\ - .section .fini, \"ax\", @progbits \n\ - .globl _fini \n\ - .type _fini,@function \n\ - .usepv _fini,std \n\ -_fini: \n\ - ldgp $29, 0($27) \n\ - subq $30, 16, $30 \n\ - stq $26, 0($30) \n\ - stq $29, 8($30) \n\ - .align 3 \n\ -/*@_fini_PROLOG_ENDS*/ \n\ - \n\ -/*@_fini_EPILOG_BEGINS*/ \n\ - .section .fini, \"ax\", @progbits \n\ - ldq $26, 0($30) \n\ - ldq $29, 8($30) \n\ - addq $30, 16, $30 \n\ - ret \n\ -/*@_fini_EPILOG_ENDS*/ \n\ - \n\ -/*@TRAILER_BEGINS*/ \n\ -"); From be917baf452416e1a9e56137ed884d6d89789e58 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 8 Feb 2012 15:17:41 -0800 Subject: [PATCH 4198/4487] alpha: Support __NR_fstatat64. --- sysdeps/unix/sysv/linux/alpha/dl-fxstatat64.c | 9 +++ sysdeps/unix/sysv/linux/alpha/fxstatat.c | 63 ++++++++++++------- 2 files changed, 51 insertions(+), 21 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/alpha/dl-fxstatat64.c diff --git a/sysdeps/unix/sysv/linux/alpha/dl-fxstatat64.c b/sysdeps/unix/sysv/linux/alpha/dl-fxstatat64.c new file mode 100644 index 0000000000..41e83bcf11 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/dl-fxstatat64.c @@ -0,0 +1,9 @@ +/* In this implementation we do not really care whether the call fails + because of missing kernel support since we do not even call the + function in this case. */ +/* For Alpha, in we redefine the default definition of + when __ASSUME_ATFCTS is present. The hack must wait until after that. */ +#include +#undef __ASSUME_ATFCTS +#define __ASSUME_ATFCTS 1 +#include "fxstatat.c" diff --git a/sysdeps/unix/sysv/linux/alpha/fxstatat.c b/sysdeps/unix/sysv/linux/alpha/fxstatat.c index 6fa3aeb14b..a6fd06b1d6 100644 --- a/sysdeps/unix/sysv/linux/alpha/fxstatat.c +++ b/sysdeps/unix/sysv/linux/alpha/fxstatat.c @@ -30,11 +30,44 @@ #undef __fxstatat64 +#ifdef __ASSUME_ATFCTS +# define __have_atfcts 1 +#endif +#ifdef __ASSUME_STAT64_SYSCALL +# define __libc_missing_axp_stat64 0 +#endif /* Get information about the file NAME in BUF. */ int __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag) { + INTERNAL_SYSCALL_DECL (err); + int result, errno_out; + + /* ??? The __fxstatat entry point is new enough that it must be using + vers == _STAT_VER_KERNEL64. For the benefit of dl-fxstatat64.c, we + cannot actually check this, lest the compiler not optimize the rest + of the function away. */ + +#ifdef __NR_fstatat64 + if (__have_atfcts >= 0) + { + result = INTERNAL_SYSCALL (fstatat64, err, 4, fd, file, st, flag); + if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) + return result; + errno_out = INTERNAL_SYSCALL_ERRNO (result, err); +#ifndef __ASSUME_ATFCTS + if (errno_out == ENOSYS) + __have_atfcts = -1; + else +#endif + { + __set_errno (errno_out); + return -1; + } + } +#endif /* __NR_fstatat64 */ + if (flag & ~AT_SYMLINK_NOFOLLOW) { __set_errno (EINVAL); @@ -67,12 +100,8 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag) file = buf; } - INTERNAL_SYSCALL_DECL (err); - int result, errno_out; - struct kernel_stat kst; - -#if __ASSUME_STAT64_SYSCALL > 0 - if (vers == _STAT_VER_KERNEL64) +#ifdef __NR_stat64 + if (!__libc_missing_axp_stat64) { if (flag & AT_SYMLINK_NOFOLLOW) result = INTERNAL_SYSCALL (lstat64, err, 2, file, st); @@ -82,24 +111,16 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag) if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) return result; errno_out = INTERNAL_SYSCALL_ERRNO (result, err); - goto fail; - } -#elif defined __NR_stat64 - if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64) - { - if (flag & AT_SYMLINK_NOFOLLOW) - result = INTERNAL_SYSCALL (lstat64, err, 2, file, st); +# if __ASSUME_STAT64_SYSCALL == 0 + if (errno_out == ENOSYS) + __libc_missing_axp_stat64 = 1; else - result = INTERNAL_SYSCALL (stat64, err, 2, file, st); - - if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) - return result; - errno_out = INTERNAL_SYSCALL_ERRNO (result, err); - if (errno_out != ENOSYS) +# endif goto fail; - __libc_missing_axp_stat64 = 1; } -#endif +#endif /* __NR_stat64 */ + + struct kernel_stat kst; if (flag & AT_SYMLINK_NOFOLLOW) result = INTERNAL_SYSCALL (lstat, err, 2, file, &kst); From 23a7453bbd725b826f9589c2e1c17002a548f0de Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 8 Feb 2012 15:55:41 -0800 Subject: [PATCH 4199/4487] alpha: Remove HAVE_ELF tests. --- ChangeLog.alpha | 9 +++++++++ sysdeps/unix/sysv/linux/alpha/getitimer.S | 6 +++--- sysdeps/unix/sysv/linux/alpha/getrusage.S | 6 +++--- sysdeps/unix/sysv/linux/alpha/gettimeofday.S | 6 +++--- sysdeps/unix/sysv/linux/alpha/select.S | 6 +++--- sysdeps/unix/sysv/linux/alpha/setitimer.S | 6 +++--- sysdeps/unix/sysv/linux/alpha/settimeofday.S | 6 +++--- sysdeps/unix/sysv/linux/alpha/utimes.S | 6 +++--- sysdeps/unix/sysv/linux/alpha/wait4.S | 6 +++--- 9 files changed, 33 insertions(+), 24 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index e76205dbf5..8ade5822e7 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,5 +1,14 @@ 2012-02-08 Richard Henderson + * sysdeps/unix/sysv/linux/alpha/getitimer.S: Don't check HAVE_ELF. + * sysdeps/unix/sysv/linux/alpha/getrusage.S: Likewise. + * sysdeps/unix/sysv/linux/alpha/gettimeofday.S: Likewise. + * sysdeps/unix/sysv/linux/alpha/select.S: Likewise. + * sysdeps/unix/sysv/linux/alpha/setitimer.S: Likewise. + * sysdeps/unix/sysv/linux/alpha/settimeofday.S: Likewise. + * sysdeps/unix/sysv/linux/alpha/utimes.S: Likewise. + * sysdeps/unix/sysv/linux/alpha/wait4.S: Likewise. + * sysdeps/alpha/elf/crti.S, sysdeps/alpha/elf/crtn.S: New files... * sysdeps/alpha/elf/initfini.c: ... split from here. Remove file. * sysdeps/alpha/nptl/elf/pt-initfini.c: Remove file. diff --git a/sysdeps/unix/sysv/linux/alpha/getitimer.S b/sysdeps/unix/sysv/linux/alpha/getitimer.S index 6644a5c36d..c29b3bdbce 100644 --- a/sysdeps/unix/sysv/linux/alpha/getitimer.S +++ b/sysdeps/unix/sysv/linux/alpha/getitimer.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2003, 2006 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2003, 2006, 2012 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 @@ .text -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +#if defined PIC && defined DO_VERSIONING #define GETITIMER __getitimer_tv64 #else #define GETITIMER getitimer @@ -108,6 +108,6 @@ $error: END(GETITIMER) #endif /* __ASSUME_TIMEVAL64 */ -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +#if defined PIC && defined DO_VERSIONING default_symbol_version (__getitimer_tv64, getitimer, GLIBC_2.1) #endif diff --git a/sysdeps/unix/sysv/linux/alpha/getrusage.S b/sysdeps/unix/sysv/linux/alpha/getrusage.S index 0bca4b5f23..2516ab022c 100644 --- a/sysdeps/unix/sysv/linux/alpha/getrusage.S +++ b/sysdeps/unix/sysv/linux/alpha/getrusage.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2003, 2006 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2003, 2006, 2012 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 @@ .text -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +#if defined PIC && defined DO_VERSIONING #define GETRUSAGE __getrusage_tv64 #else #define GETRUSAGE __getrusage @@ -140,7 +140,7 @@ $error: END(GETRUSAGE) #endif /* __ASSUME_TIMEVAL64 */ -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +#if defined PIC && defined DO_VERSIONING strong_alias(__getrusage_tv64, ____getrusage_tv64) default_symbol_version (____getrusage_tv64, __getrusage, GLIBC_2.1) default_symbol_version (__getrusage_tv64, getrusage, GLIBC_2.1) diff --git a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S index 7c9183a4fe..2910830c08 100644 --- a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S +++ b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2002, 2003, 2006 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2002, 2003, 2006, 2012 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 @@ .text -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +#if defined PIC && defined DO_VERSIONING #define GETTIMEOFDAY __gettimeofday_tv64 #else #define GETTIMEOFDAY __gettimeofday @@ -106,7 +106,7 @@ $error: END(GETTIMEOFDAY) #endif /* __ASSUME_TIMEVAL64 */ -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +#if defined PIC && defined DO_VERSIONING default_symbol_version (__gettimeofday_tv64, __gettimeofday, GLIBC_2.1) /* It seems to me to be a misfeature of the assembler that we can only diff --git a/sysdeps/unix/sysv/linux/alpha/select.S b/sysdeps/unix/sysv/linux/alpha/select.S index 35a81e949f..94f209bff1 100644 --- a/sysdeps/unix/sysv/linux/alpha/select.S +++ b/sysdeps/unix/sysv/linux/alpha/select.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1998,2002,2003,2006 Free Software Foundation, Inc. +/* Copyright (C) 1998,2002,2003,2006,2012 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 @@ .text -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +#if defined PIC && defined DO_VERSIONING #define SELECT __select_tv64 #else #define SELECT __select @@ -224,7 +224,7 @@ $error: END(SELECT) #endif /* __ASSUME_TIMEVAL64 */ -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +#if defined PIC && defined DO_VERSIONING default_symbol_version (__select_tv64, __select, GLIBC_2.1) /* It seems to me to be a misfeature of the assembler that we can only diff --git a/sysdeps/unix/sysv/linux/alpha/setitimer.S b/sysdeps/unix/sysv/linux/alpha/setitimer.S index 59caeac680..59f97f75d9 100644 --- a/sysdeps/unix/sysv/linux/alpha/setitimer.S +++ b/sysdeps/unix/sysv/linux/alpha/setitimer.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2003, 2006 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2003, 2006, 2012 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 @@ .text -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +#if defined PIC && defined DO_VERSIONING #define SETITIMER __setitimer_tv64 #else #define SETITIMER __setitimer @@ -124,7 +124,7 @@ $error: END(SETITIMER) #endif /* __ASSUME_TIMEVAL64 */ -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +#if defined PIC && defined DO_VERSIONING default_symbol_version (__setitimer_tv64, __setitimer, GLIBC_2.1) /* It seems to me to be a misfeature of the assembler that we can only diff --git a/sysdeps/unix/sysv/linux/alpha/settimeofday.S b/sysdeps/unix/sysv/linux/alpha/settimeofday.S index e39eadc208..e80d05478a 100644 --- a/sysdeps/unix/sysv/linux/alpha/settimeofday.S +++ b/sysdeps/unix/sysv/linux/alpha/settimeofday.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2003, 2006 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2003, 2006, 2012 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 @@ .text -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +#if defined PIC && defined DO_VERSIONING #define SETTIMEOFDAY __settimeofday_tv64 #else #define SETTIMEOFDAY __settimeofday @@ -105,7 +105,7 @@ $error: END(SETTIMEOFDAY) #endif /* __ASSUME_TIMEVAL64 */ -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +#if defined PIC && defined DO_VERSIONING default_symbol_version (__settimeofday_tv64, __settimeofday, GLIBC_2.1) /* It seems to me to be a misfeature of the assembler that we can only diff --git a/sysdeps/unix/sysv/linux/alpha/utimes.S b/sysdeps/unix/sysv/linux/alpha/utimes.S index 0dd0a9372b..2ab2b19c0d 100644 --- a/sysdeps/unix/sysv/linux/alpha/utimes.S +++ b/sysdeps/unix/sysv/linux/alpha/utimes.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2003, 2006 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2003, 2006, 2012 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 @@ .text -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +#if defined PIC && defined DO_VERSIONING #define UTIMES __utimes_tv64 #else #define UTIMES __utimes @@ -110,7 +110,7 @@ $error: END(UTIMES) #endif /* __ASSUME_TIMEVAL64 */ -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +#if defined PIC && defined DO_VERSIONING default_symbol_version (__utimes_tv64, __utimes, GLIBC_2.1) /* It seems to me to be a misfeature of the assembler that we can only diff --git a/sysdeps/unix/sysv/linux/alpha/wait4.S b/sysdeps/unix/sysv/linux/alpha/wait4.S index 634993deb8..5e1e5d4603 100644 --- a/sysdeps/unix/sysv/linux/alpha/wait4.S +++ b/sysdeps/unix/sysv/linux/alpha/wait4.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2003, 2006 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2003, 2006, 2012 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 @@ .text -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +#if defined PIC && defined DO_VERSIONING #define WAIT4 __wait4_tv64 #else #define WAIT4 __wait4 @@ -143,7 +143,7 @@ $error: END(WAIT4) #endif /* __ASSUME_TIMEVAL64 */ -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +#if defined PIC && defined DO_VERSIONING default_symbol_version (__wait4_tv64, __wait4, GLIBC_2.1) /* It seems to me to be a misfeature of the assembler that we can only From dd0c700a975b6e47fdfaff63b924931f3a698302 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 8 Feb 2012 16:59:11 -0800 Subject: [PATCH 4200/4487] alpha: Add tls-macros.h. --- ChangeLog.alpha | 2 ++ sysdeps/alpha/tls-macros.h | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 sysdeps/alpha/tls-macros.h diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 8ade5822e7..804dd647eb 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,5 +1,7 @@ 2012-02-08 Richard Henderson + * sysdeps/alpha/tls-macros.h: New file. + * sysdeps/unix/sysv/linux/alpha/getitimer.S: Don't check HAVE_ELF. * sysdeps/unix/sysv/linux/alpha/getrusage.S: Likewise. * sysdeps/unix/sysv/linux/alpha/gettimeofday.S: Likewise. diff --git a/sysdeps/alpha/tls-macros.h b/sysdeps/alpha/tls-macros.h new file mode 100644 index 0000000000..0385d93e2a --- /dev/null +++ b/sysdeps/alpha/tls-macros.h @@ -0,0 +1,25 @@ +/* Macros to support TLS testing in times of missing compiler support. */ + +extern void *__tls_get_addr (void *); + +# define TLS_GD(x) \ + ({ void *__result; \ + asm ("lda %0, " #x "($gp) !tlsgd" : "=r" (__result)); \ + __tls_get_addr (__result); }) + +# define TLS_LD(x) \ + ({ void *__result; \ + asm ("lda %0, " #x "($gp) !tlsldm" : "=r" (__result)); \ + __result = __tls_get_addr (__result); \ + asm ("lda %0, " #x "(%0) !dtprel" : "+r" (__result)); \ + __result; }) + +# define TLS_IE(x) \ + ({ long ofs; \ + asm ("ldq %0, " #x "($gp) !gottprel" : "=r"(ofs)); \ + __builtin_thread_pointer () + ofs; }) + +# define TLS_LE(x) \ + ({ void *__result = __builtin_thread_pointer (); \ + asm ("lda %0, " #x "(%0) !tprel" : "+r" (__result)); \ + __result; }) From 8c7adf8e7921c02c5cdb27841dd204b0ec0be56f Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 8 Feb 2012 17:00:52 -0800 Subject: [PATCH 4201/4487] alpha: Add ldsodefs.h and tst-audit.h. --- ChangeLog.alpha | 2 ++ sysdeps/alpha/ldsodefs.h | 43 +++++++++++++++++++++++++++++++++++++++ sysdeps/alpha/tst-audit.h | 24 ++++++++++++++++++++++ 3 files changed, 69 insertions(+) create mode 100644 sysdeps/alpha/ldsodefs.h create mode 100644 sysdeps/alpha/tst-audit.h diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 804dd647eb..b82edba710 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,5 +1,7 @@ 2012-02-08 Richard Henderson + * sysdeps/alpha/ldsodefs.h: New file. + * sysdeps/alpha/tst-audit.h: New file. * sysdeps/alpha/tls-macros.h: New file. * sysdeps/unix/sysv/linux/alpha/getitimer.S: Don't check HAVE_ELF. diff --git a/sysdeps/alpha/ldsodefs.h b/sysdeps/alpha/ldsodefs.h new file mode 100644 index 0000000000..a059cb15b8 --- /dev/null +++ b/sysdeps/alpha/ldsodefs.h @@ -0,0 +1,43 @@ +/* Run-time dynamic linker data structures for loaded ELF shared objects. + Copyright (C) 2012 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 __LDSODEFS_H + +#include + +struct La_alpha_regs; +struct La_alpha_retval; + +#define ARCH_PLTENTER_MEMBERS \ + Elf64_Addr (*alpha_gnu_pltenter) (Elf64_Sym *, unsigned int, \ + uintptr_t *, uintptr_t *, \ + const struct La_alpha_regs *, \ + unsigned int *, const char *name, \ + long int *framesizep); + +#define ARCH_PLTEXIT_MEMBERS \ + unsigned int (*alpha_gnu_pltexit) (Elf64_Sym *, unsigned int, \ + uintptr_t *, uintptr_t *, \ + const struct La_alpha_regs *, \ + struct La_alpha_retval *, \ + const char *); + +#include_next + +#endif diff --git a/sysdeps/alpha/tst-audit.h b/sysdeps/alpha/tst-audit.h new file mode 100644 index 0000000000..3bc50fa3be --- /dev/null +++ b/sysdeps/alpha/tst-audit.h @@ -0,0 +1,24 @@ +/* Definitions for testing PLT entry/exit auditing. Alpha version. + Copyright (C) 2012 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. */ + +#define pltenter la_alpha_gnu_pltenter +#define pltexit la_alpha_gnu_pltexit +#define La_regs La_alpha_regs +#define La_retval La_alpha_retval From 93519140c05d66197eb8ba3479cd4ceeae321c3a Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Thu, 9 Feb 2012 11:15:22 -0800 Subject: [PATCH 4202/4487] alpha: Re-enable export of the unwind functions, and relro detection. --- ChangeLog.alpha | 5 +++++ sysdeps/alpha/preconfigure | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index b82edba710..7c77c1abd3 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,8 @@ +2012-02-09 Richard Henderson + + * sysdeps/alpha/preconfigure (libc_cv_gcc_unwind_find_fde): New. + (libc_commonpagesize, libc_relro_required): New. + 2012-02-08 Richard Henderson * sysdeps/alpha/ldsodefs.h: New file. diff --git a/sysdeps/alpha/preconfigure b/sysdeps/alpha/preconfigure index ad3dc69cf3..1a66d103f7 100644 --- a/sysdeps/alpha/preconfigure +++ b/sysdeps/alpha/preconfigure @@ -1,3 +1,10 @@ case "$machine" in alpha*) base_machine=alpha machine=alpha/$machine ;; esac + +# We did historically export the unwinder from glibc. +libc_cv_gcc_unwind_find_fde=yes + +# Parameters to allow auto-detection of -z relro. +libc_commonpagesize=0x2000 +libc_relro_required=yes From 25a368f23182607b0b3ab3f822fa92212e1c4796 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 10 Feb 2012 12:28:07 +0000 Subject: [PATCH 4203/4487] Convert MIPS to crti.S/crtn.S. --- ChangeLog.mips | 14 ++++++ sysdeps/mips/Makefile | 6 ++- sysdeps/mips/mips32/crti.S | 92 ++++++++++++++++++++++++++++++++++ sysdeps/mips/mips32/crtn.S | 56 +++++++++++++++++++++ sysdeps/mips/mips64/n32/crti.S | 92 ++++++++++++++++++++++++++++++++++ sysdeps/mips/mips64/n32/crtn.S | 58 +++++++++++++++++++++ sysdeps/mips/mips64/n64/crti.S | 92 ++++++++++++++++++++++++++++++++++ sysdeps/mips/mips64/n64/crtn.S | 58 +++++++++++++++++++++ 8 files changed, 466 insertions(+), 2 deletions(-) create mode 100644 sysdeps/mips/mips32/crti.S create mode 100644 sysdeps/mips/mips32/crtn.S create mode 100644 sysdeps/mips/mips64/n32/crti.S create mode 100644 sysdeps/mips/mips64/n32/crtn.S create mode 100644 sysdeps/mips/mips64/n64/crti.S create mode 100644 sysdeps/mips/mips64/n64/crtn.S diff --git a/ChangeLog.mips b/ChangeLog.mips index f92ae72e04..c3d305e550 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,17 @@ +2012-02-10 Joseph Myers + + * sysdeps/mips/mips32/crti.S: New file, based on compiler output + for sysdeps/generic/initfini.c. + * sysdeps/mips/mips32/crtn.S: Likewise. + * sysdeps/mips/mips64/n32/crti.S: Likewise. + * sysdeps/mips/mips64/n32/crtn.S: Likewise. + * sysdeps/mips/mips64/n64/crti.S: Likewise. + * sysdeps/mips/mips64/n64/crtn.S: Likewise. + * sysdeps/mips/Makefile (CFLAGS-initfini.s): Remove variable. + (CFLAGS-pt-initfini.s): Likewise. + (CPPFLAGS-crti.S, CPPFLAGS-crtn.S, CPPFLAGS-pt-crti.S): Define + variables. + 2012-01-26 Joseph Myers * sysdeps/mips/sys/asm.h: Remove __STDC__ conditionals. diff --git a/sysdeps/mips/Makefile b/sysdeps/mips/Makefile index 7937d25dcf..a1526998e0 100644 --- a/sysdeps/mips/Makefile +++ b/sysdeps/mips/Makefile @@ -16,11 +16,13 @@ CFLAGS-backtrace.c += -funwind-tables endif ifeq ($(subdir),csu) -CFLAGS-initfini.s += -fno-unwind-tables +CPPFLAGS-crti.S += $(pic-ccflag) +CPPFLAGS-crtn.S += $(pic-ccflag) endif ifeq ($(subdir),nptl) -CFLAGS-pt-initfini.s += -fno-unwind-tables +CPPFLAGS-pt-crti.S += $(pic-ccflag) +CPPFLAGS-crtn.S += $(pic-ccflag) endif ASFLAGS-.os += $(pic-ccflag) diff --git a/sysdeps/mips/mips32/crti.S b/sysdeps/mips/mips32/crti.S new file mode 100644 index 0000000000..1c7e95d4dd --- /dev/null +++ b/sysdeps/mips/mips32/crti.S @@ -0,0 +1,92 @@ +/* Special .init and .fini section support for MIPS (o32). + Copyright (C) 1995-2012 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. + + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + + 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. */ + +/* crti.S puts a function prologue at the beginning of the .init and + .fini sections and defines global symbols for those addresses, so + they can be called as functions. The symbols _init and _fini are + magic and cause the linker to emit DT_INIT and DT_FINI. */ + +#include + +#ifndef PREINIT_FUNCTION +# define PREINIT_FUNCTION __gmon_start__ +#endif + +#ifndef PREINIT_FUNCTION_WEAK +# define PREINIT_FUNCTION_WEAK 1 +#endif + +#if PREINIT_FUNCTION_WEAK + weak_extern (PREINIT_FUNCTION) +#else + .hidden PREINIT_FUNCTION +#endif + + .section .init,"ax",@progbits + .p2align 2 + .globl _init + .type _init, @function +_init: + .set noreorder + .cpload $25 + .set reorder + addiu $sp,$sp,-32 + .cprestore 16 + sw $31,28($sp) +#if PREINIT_FUNCTION_WEAK + lw $2,%got(PREINIT_FUNCTION)($28) + beq $2,$0,.Lno_weak_fn + lw $25,%call16(PREINIT_FUNCTION)($28) + .reloc 1f,R_MIPS_JALR,PREINIT_FUNCTION +1: jalr $25 +.Lno_weak_fn: +#else + lw $25,%got(PREINIT_FUNCTION)($28) + .reloc 1f,R_MIPS_JALR,PREINIT_FUNCTION +1: jalr $25 +#endif + + .section .fini,"ax",@progbits + .p2align 2 + .globl _fini + .type _fini, @function +_fini: + .set noreorder + .cpload $25 + .set reorder + addiu $sp,$sp,-32 + .cprestore 16 + sw $31,28($sp) diff --git a/sysdeps/mips/mips32/crtn.S b/sysdeps/mips/mips32/crtn.S new file mode 100644 index 0000000000..9fb564d46a --- /dev/null +++ b/sysdeps/mips/mips32/crtn.S @@ -0,0 +1,56 @@ +/* Special .init and .fini section support for MIPS (o32). + Copyright (C) 1995-2012 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. + + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + + 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. */ + +/* crtn.S puts function epilogues in the .init and .fini sections + corresponding to the prologues in crti.S. */ + + .section .init,"ax",@progbits + lw $31,28($sp) + .set noreorder + .set nomacro + j $31 + addiu $sp,$sp,32 + .set macro + .set reorder + + .section .fini,"ax",@progbits + lw $31,28($sp) + .set noreorder + .set nomacro + j $31 + addiu $sp,$sp,32 + .set macro + .set reorder diff --git a/sysdeps/mips/mips64/n32/crti.S b/sysdeps/mips/mips64/n32/crti.S new file mode 100644 index 0000000000..92b00c20e4 --- /dev/null +++ b/sysdeps/mips/mips64/n32/crti.S @@ -0,0 +1,92 @@ +/* Special .init and .fini section support for MIPS (n32). + Copyright (C) 1995-2012 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. + + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + + 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. */ + +/* crti.S puts a function prologue at the beginning of the .init and + .fini sections and defines global symbols for those addresses, so + they can be called as functions. The symbols _init and _fini are + magic and cause the linker to emit DT_INIT and DT_FINI. */ + +#include + +#ifndef PREINIT_FUNCTION +# define PREINIT_FUNCTION __gmon_start__ +#endif + +#ifndef PREINIT_FUNCTION_WEAK +# define PREINIT_FUNCTION_WEAK 1 +#endif + +#if PREINIT_FUNCTION_WEAK + weak_extern (PREINIT_FUNCTION) +#else + .hidden PREINIT_FUNCTION +#endif + + .section .init,"ax",@progbits + .p2align 2 + .globl _init + .type _init, @function +_init: + addiu $sp,$sp,-16 + sd $28,0($sp) + lui $28,%hi(%neg(%gp_rel(_init))) + addu $28,$28,$25 + sd $31,8($sp) + addiu $28,$28,%lo(%neg(%gp_rel(_init))) +#if PREINIT_FUNCTION_WEAK + lw $2,%got_disp(PREINIT_FUNCTION)($28) + beq $2,$0,.Lno_weak_fn + lw $25,%call16(PREINIT_FUNCTION)($28) + .reloc 1f,R_MIPS_JALR,PREINIT_FUNCTION +1: jalr $25 +.Lno_weak_fn: +#else + lw $25,%got_disp(PREINIT_FUNCTION)($28) + .reloc 1f,R_MIPS_JALR,PREINIT_FUNCTION +1: jalr $25 +#endif + + .section .fini,"ax",@progbits + .p2align 2 + .globl _fini + .type _fini, @function +_fini: + addiu $sp,$sp,-16 + sd $28,0($sp) + lui $28,%hi(%neg(%gp_rel(_fini))) + addu $28,$28,$25 + sd $31,8($sp) + addiu $28,$28,%lo(%neg(%gp_rel(_fini))) diff --git a/sysdeps/mips/mips64/n32/crtn.S b/sysdeps/mips/mips64/n32/crtn.S new file mode 100644 index 0000000000..376582a696 --- /dev/null +++ b/sysdeps/mips/mips64/n32/crtn.S @@ -0,0 +1,58 @@ +/* Special .init and .fini section support for MIPS (n32). + Copyright (C) 1995-2012 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. + + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + + 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. */ + +/* crtn.S puts function epilogues in the .init and .fini sections + corresponding to the prologues in crti.S. */ + + .section .init,"ax",@progbits + ld $31,8($sp) + ld $28,0($sp) + .set noreorder + .set nomacro + j $31 + addiu $sp,$sp,16 + .set macro + .set reorder + + .section .fini,"ax",@progbits + ld $31,8($sp) + ld $28,0($sp) + .set noreorder + .set nomacro + j $31 + addiu $sp,$sp,16 + .set macro + .set reorder diff --git a/sysdeps/mips/mips64/n64/crti.S b/sysdeps/mips/mips64/n64/crti.S new file mode 100644 index 0000000000..42b26dc2b5 --- /dev/null +++ b/sysdeps/mips/mips64/n64/crti.S @@ -0,0 +1,92 @@ +/* Special .init and .fini section support for MIPS (n64). + Copyright (C) 1995-2012 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. + + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + + 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. */ + +/* crti.S puts a function prologue at the beginning of the .init and + .fini sections and defines global symbols for those addresses, so + they can be called as functions. The symbols _init and _fini are + magic and cause the linker to emit DT_INIT and DT_FINI. */ + +#include + +#ifndef PREINIT_FUNCTION +# define PREINIT_FUNCTION __gmon_start__ +#endif + +#ifndef PREINIT_FUNCTION_WEAK +# define PREINIT_FUNCTION_WEAK 1 +#endif + +#if PREINIT_FUNCTION_WEAK + weak_extern (PREINIT_FUNCTION) +#else + .hidden PREINIT_FUNCTION +#endif + + .section .init,"ax",@progbits + .p2align 2 + .globl _init + .type _init, @function +_init: + daddiu $sp,$sp,-16 + sd $28,0($sp) + lui $28,%hi(%neg(%gp_rel(_init))) + daddu $28,$28,$25 + sd $31,8($sp) + daddiu $28,$28,%lo(%neg(%gp_rel(_init))) +#if PREINIT_FUNCTION_WEAK + ld $2,%got_disp(PREINIT_FUNCTION)($28) + beq $2,$0,.Lno_weak_fn + ld $25,%call16(PREINIT_FUNCTION)($28) + .reloc 1f,R_MIPS_JALR,PREINIT_FUNCTION +1: jalr $25 +.Lno_weak_fn: +#else + ld $25,%got_disp(PREINIT_FUNCTION)($28) + .reloc 1f,R_MIPS_JALR,PREINIT_FUNCTION +1: jalr $25 +#endif + + .section .fini,"ax",@progbits + .p2align 2 + .globl _fini + .type _fini, @function +_fini: + daddiu $sp,$sp,-16 + sd $28,0($sp) + lui $28,%hi(%neg(%gp_rel(_fini))) + daddu $28,$28,$25 + sd $31,8($sp) + daddiu $28,$28,%lo(%neg(%gp_rel(_fini))) diff --git a/sysdeps/mips/mips64/n64/crtn.S b/sysdeps/mips/mips64/n64/crtn.S new file mode 100644 index 0000000000..3f901c8c99 --- /dev/null +++ b/sysdeps/mips/mips64/n64/crtn.S @@ -0,0 +1,58 @@ +/* Special .init and .fini section support for MIPS (n64). + Copyright (C) 1995-2012 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. + + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + + 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. */ + +/* crtn.S puts function epilogues in the .init and .fini sections + corresponding to the prologues in crti.S. */ + + .section .init,"ax",@progbits + ld $31,8($sp) + ld $28,0($sp) + .set noreorder + .set nomacro + j $31 + daddiu $sp,$sp,16 + .set macro + .set reorder + + .section .fini,"ax",@progbits + ld $31,8($sp) + ld $28,0($sp) + .set noreorder + .set nomacro + j $31 + daddiu $sp,$sp,16 + .set macro + .set reorder From 67939f7c1e5a73f15cce63f72ac9d50109999c9c Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 13 Feb 2012 20:35:16 +0000 Subject: [PATCH 4204/4487] Replace MIPS sys/eventfd.h with bits/eventfd.h. --- ChangeLog.mips | 5 ++ sysdeps/unix/sysv/linux/mips/bits/eventfd.h | 31 ++++++++++++ sysdeps/unix/sysv/linux/mips/sys/eventfd.h | 54 --------------------- 3 files changed, 36 insertions(+), 54 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/mips/bits/eventfd.h delete mode 100644 sysdeps/unix/sysv/linux/mips/sys/eventfd.h diff --git a/ChangeLog.mips b/ChangeLog.mips index c3d305e550..c998c99912 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2012-02-13 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/eventfd.h: New file. + * sysdeps/unix/sysv/linux/mips/sys/eventfd.h: Remove. + 2012-02-10 Joseph Myers * sysdeps/mips/mips32/crti.S: New file, based on compiler output diff --git a/sysdeps/unix/sysv/linux/mips/bits/eventfd.h b/sysdeps/unix/sysv/linux/mips/bits/eventfd.h new file mode 100644 index 0000000000..6ac2cd83d9 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/bits/eventfd.h @@ -0,0 +1,31 @@ +/* Copyright (C) 2007-2012 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, see + . */ + +#ifndef _SYS_EVENTFD_H +# error "Never use directly; include instead." +#endif + +/* Flags for eventfd. */ +enum + { + EFD_SEMAPHORE = 00000001, +#define EFD_SEMAPHORE EFD_SEMAPHORE + EFD_CLOEXEC = 02000000, +#define EFD_CLOEXEC EFD_CLOEXEC + EFD_NONBLOCK = 00000200 +#define EFD_NONBLOCK EFD_NONBLOCK + }; diff --git a/sysdeps/unix/sysv/linux/mips/sys/eventfd.h b/sysdeps/unix/sysv/linux/mips/sys/eventfd.h deleted file mode 100644 index b30d09a83e..0000000000 --- a/sysdeps/unix/sysv/linux/mips/sys/eventfd.h +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (C) 2007, 2008, 2009 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 _SYS_EVENTFD_H -#define _SYS_EVENTFD_H 1 - -#include - - -/* Type for event counter. */ -typedef uint64_t eventfd_t; - -/* Flags for signalfd. */ -enum - { - EFD_SEMAPHORE = 1, -#define EFD_SEMAPHORE EFD_SEMAPHORE - EFD_CLOEXEC = 02000000, -#define EFD_CLOEXEC EFD_CLOEXEC - EFD_NONBLOCK = 0200 -#define EFD_NONBLOCK EFD_NONBLOCK - }; - - -__BEGIN_DECLS - -/* Return file descriptor for generic event channel. Set initial - value to COUNT. */ -extern int eventfd (int __count, int __flags) __THROW; - -/* Read event counter and possibly wait for events. */ -extern int eventfd_read (int __fd, eventfd_t *__value); - -/* Increment event counter. */ -extern int eventfd_write (int __fd, eventfd_t __value); - -__END_DECLS - -#endif /* sys/eventfd.h */ From 15dd57e85cf7d1ad1ef01f7b5877f9e6bd1edc12 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 13 Feb 2012 15:35:18 -0800 Subject: [PATCH 4205/4487] Replace Alpha sys/eventfd.h with bits/eventfd.h --- ChangeLog.alpha | 5 ++ sysdeps/unix/sysv/linux/alpha/bits/eventfd.h | 31 ++++++++++++ sysdeps/unix/sysv/linux/alpha/sys/eventfd.h | 52 -------------------- 3 files changed, 36 insertions(+), 52 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/eventfd.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/sys/eventfd.h diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 7c77c1abd3..7eea904290 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,8 @@ +2012-02-13 Richard Henderson + + * sysdeps/unix/sysv/linux/alpha/bits/eventfd.h: New file. + * sysdeps/unix/sysv/linux/alpha/sys/eventfd.h: Remove. + 2012-02-09 Richard Henderson * sysdeps/alpha/preconfigure (libc_cv_gcc_unwind_find_fde): New. diff --git a/sysdeps/unix/sysv/linux/alpha/bits/eventfd.h b/sysdeps/unix/sysv/linux/alpha/bits/eventfd.h new file mode 100644 index 0000000000..346794ad0f --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/bits/eventfd.h @@ -0,0 +1,31 @@ +/* Copyright (C) 2007-2012 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, see + . */ + +#ifndef _SYS_EVENTFD_H +# error "Never use directly; include instead." +#endif + +/* Flags for eventfd. */ +enum + { + EFD_SEMAPHORE = 000000001, +#define EFD_SEMAPHORE EFD_SEMAPHORE + EFD_CLOEXEC = 010000000, +#define EFD_CLOEXEC EFD_CLOEXEC + EFD_NONBLOCK = 000000004 +#define EFD_NONBLOCK EFD_NONBLOCK + }; diff --git a/sysdeps/unix/sysv/linux/alpha/sys/eventfd.h b/sysdeps/unix/sysv/linux/alpha/sys/eventfd.h deleted file mode 100644 index c8ce554625..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/sys/eventfd.h +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright (C) 2007, 2008 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 _SYS_EVENTFD_H -#define _SYS_EVENTFD_H 1 - -#include - - -/* Type for event counter. */ -typedef uint64_t eventfd_t; - -/* Flags for signalfd. */ -enum - { - EFD_CLOEXEC = 010000000, -#define EFD_CLOEXEC EFD_CLOEXEC - EFD_NONBLOCK = 04 -#define EFD_NONBLOCK EFD_NONBLOCK - }; - - -__BEGIN_DECLS - -/* Return file descriptor for generic event channel. Set initial - value to COUNT. */ -extern int eventfd (int __count, int __flags) __THROW; - -/* Read event counter and possibly wait for events. */ -extern int eventfd_read (int __fd, eventfd_t *__value); - -/* Increment event counter. */ -extern int eventfd_write (int __fd, eventfd_t value); - -__END_DECLS - -#endif /* sys/eventfd.h */ From c5430dd06948d96900e3da8057c05ebc18e89882 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 14 Feb 2012 00:17:32 +0000 Subject: [PATCH 4206/4487] Replace MIPS sys/inotify.h with bits/inotify.h. --- ChangeLog.mips | 5 + sysdeps/unix/sysv/linux/mips/bits/inotify.h | 29 ++++++ sysdeps/unix/sysv/linux/mips/sys/inotify.h | 107 -------------------- 3 files changed, 34 insertions(+), 107 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/mips/bits/inotify.h delete mode 100644 sysdeps/unix/sysv/linux/mips/sys/inotify.h diff --git a/ChangeLog.mips b/ChangeLog.mips index c998c99912..ff8cfc2fdd 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2012-02-13 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/inotify.h: New file. + * sysdeps/unix/sysv/linux/mips/sys/inotify.h: Remove. + 2012-02-13 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/eventfd.h: New file. diff --git a/sysdeps/unix/sysv/linux/mips/bits/inotify.h b/sysdeps/unix/sysv/linux/mips/bits/inotify.h new file mode 100644 index 0000000000..67d648bd94 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/bits/inotify.h @@ -0,0 +1,29 @@ +/* Copyright (C) 2005-2012 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, see + . */ + +#ifndef _SYS_INOTIFY_H +# error "Never use directly; include instead." +#endif + +/* Flags for the parameter of inotify_init1. */ +enum + { + IN_CLOEXEC = 02000000, +#define IN_CLOEXEC IN_CLOEXEC + IN_NONBLOCK = 00000200 +#define IN_NONBLOCK IN_NONBLOCK + }; diff --git a/sysdeps/unix/sysv/linux/mips/sys/inotify.h b/sysdeps/unix/sysv/linux/mips/sys/inotify.h deleted file mode 100644 index d1d0509213..0000000000 --- a/sysdeps/unix/sysv/linux/mips/sys/inotify.h +++ /dev/null @@ -1,107 +0,0 @@ -/* Copyright (C) 2005, 2006, 2008, 2009, 2010 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 _SYS_INOTIFY_H -#define _SYS_INOTIFY_H 1 - -#include - - -/* Flags for the parameter of inotify_init1. */ -enum - { - IN_CLOEXEC = 02000000, -#define IN_CLOEXEC IN_CLOEXEC - IN_NONBLOCK = 0200 -#define IN_NONBLOCK IN_NONBLOCK - }; - - -/* Structure describing an inotify event. */ -struct inotify_event -{ - int wd; /* Watch descriptor. */ - uint32_t mask; /* Watch mask. */ - uint32_t cookie; /* Cookie to synchronize two events. */ - uint32_t len; /* Length (including NULs) of name. */ - char name __flexarr; /* Name. */ -}; - - -/* Supported events suitable for MASK parameter of INOTIFY_ADD_WATCH. */ -#define IN_ACCESS 0x00000001 /* File was accessed. */ -#define IN_MODIFY 0x00000002 /* File was modified. */ -#define IN_ATTRIB 0x00000004 /* Metadata changed. */ -#define IN_CLOSE_WRITE 0x00000008 /* Writtable file was closed. */ -#define IN_CLOSE_NOWRITE 0x00000010 /* Unwrittable file closed. */ -#define IN_CLOSE (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* Close. */ -#define IN_OPEN 0x00000020 /* File was opened. */ -#define IN_MOVED_FROM 0x00000040 /* File was moved from X. */ -#define IN_MOVED_TO 0x00000080 /* File was moved to Y. */ -#define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* Moves. */ -#define IN_CREATE 0x00000100 /* Subfile was created. */ -#define IN_DELETE 0x00000200 /* Subfile was deleted. */ -#define IN_DELETE_SELF 0x00000400 /* Self was deleted. */ -#define IN_MOVE_SELF 0x00000800 /* Self was moved. */ - -/* Events sent by the kernel. */ -#define IN_UNMOUNT 0x00002000 /* Backing fs was unmounted. */ -#define IN_Q_OVERFLOW 0x00004000 /* Event queued overflowed. */ -#define IN_IGNORED 0x00008000 /* File was ignored. */ - -/* Helper events. */ -#define IN_CLOSE (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* Close. */ -#define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* Moves. */ - -/* Special flags. */ -#define IN_ONLYDIR 0x01000000 /* Only watch the path if it is a - directory. */ -#define IN_DONT_FOLLOW 0x02000000 /* Do not follow a sym link. */ -#define IN_EXCL_UNLINK 0x04000000 /* Exclude events on unlinked - objects. */ -#define IN_MASK_ADD 0x20000000 /* Add to the mask of an already - existing watch. */ -#define IN_ISDIR 0x40000000 /* Event occurred against dir. */ -#define IN_ONESHOT 0x80000000 /* Only send event once. */ - -/* All events which a program can wait on. */ -#define IN_ALL_EVENTS (IN_ACCESS | IN_MODIFY | IN_ATTRIB | IN_CLOSE_WRITE \ - | IN_CLOSE_NOWRITE | IN_OPEN | IN_MOVED_FROM \ - | IN_MOVED_TO | IN_CREATE | IN_DELETE \ - | IN_DELETE_SELF | IN_MOVE_SELF) - - -__BEGIN_DECLS - -/* Create and initialize inotify instance. */ -extern int inotify_init (void) __THROW; - -/* Create and initialize inotify instance. */ -extern int inotify_init1 (int __flags) __THROW; - -/* Add watch of object NAME to inotify instance FD. Notify about - events specified by MASK. */ -extern int inotify_add_watch (int __fd, const char *__name, uint32_t __mask) - __THROW; - -/* Remove the watch specified by WD from the inotify instance FD. */ -extern int inotify_rm_watch (int __fd, int __wd) __THROW; - -__END_DECLS - -#endif /* sys/inotify.h */ From 1b006be5c5f286a308aef2424164e13a65e9fc52 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 13 Feb 2012 17:03:46 -0800 Subject: [PATCH 4207/4487] Replace Alpha sys/inotify.h with bits/inotify.h --- sysdeps/unix/sysv/linux/alpha/bits/inotify.h | 29 +++++ sysdeps/unix/sysv/linux/alpha/sys/inotify.h | 105 ------------------- 2 files changed, 29 insertions(+), 105 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/inotify.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/sys/inotify.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/inotify.h b/sysdeps/unix/sysv/linux/alpha/bits/inotify.h new file mode 100644 index 0000000000..3fbe3b8ec9 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/bits/inotify.h @@ -0,0 +1,29 @@ +/* Copyright (C) 2005-2012 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, see + . */ + +#ifndef _SYS_INOTIFY_H +# error "Never use directly; include instead." +#endif + +/* Flags for the parameter of inotify_init1. */ +enum + { + IN_CLOEXEC = 010000000, +#define IN_CLOEXEC IN_CLOEXEC + IN_NONBLOCK = 000000004 +#define IN_NONBLOCK IN_NONBLOCK + }; diff --git a/sysdeps/unix/sysv/linux/alpha/sys/inotify.h b/sysdeps/unix/sysv/linux/alpha/sys/inotify.h deleted file mode 100644 index d61c700d5d..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/sys/inotify.h +++ /dev/null @@ -1,105 +0,0 @@ -/* Copyright (C) 2005, 2006, 2008 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 _SYS_INOTIFY_H -#define _SYS_INOTIFY_H 1 - -#include - - -/* Flags for the parameter of inotify_init1. */ -enum - { - IN_CLOEXEC = 010000000, -#define IN_CLOEXEC IN_CLOEXEC - IN_NONBLOCK = 04 -#define IN_NONBLOCK IN_NONBLOCK - }; - - -/* Structure describing an inotify event. */ -struct inotify_event -{ - int wd; /* Watch descriptor. */ - uint32_t mask; /* Watch mask. */ - uint32_t cookie; /* Cookie to synchronize two events. */ - uint32_t len; /* Length (including NULs) of name. */ - char name __flexarr; /* Name. */ -}; - - -/* Supported events suitable for MASK parameter of INOTIFY_ADD_WATCH. */ -#define IN_ACCESS 0x00000001 /* File was accessed. */ -#define IN_MODIFY 0x00000002 /* File was modified. */ -#define IN_ATTRIB 0x00000004 /* Metadata changed. */ -#define IN_CLOSE_WRITE 0x00000008 /* Writtable file was closed. */ -#define IN_CLOSE_NOWRITE 0x00000010 /* Unwrittable file closed. */ -#define IN_CLOSE (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* Close. */ -#define IN_OPEN 0x00000020 /* File was opened. */ -#define IN_MOVED_FROM 0x00000040 /* File was moved from X. */ -#define IN_MOVED_TO 0x00000080 /* File was moved to Y. */ -#define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* Moves. */ -#define IN_CREATE 0x00000100 /* Subfile was created. */ -#define IN_DELETE 0x00000200 /* Subfile was deleted. */ -#define IN_DELETE_SELF 0x00000400 /* Self was deleted. */ -#define IN_MOVE_SELF 0x00000800 /* Self was moved. */ - -/* Events sent by the kernel. */ -#define IN_UNMOUNT 0x00002000 /* Backing fs was unmounted. */ -#define IN_Q_OVERFLOW 0x00004000 /* Event queued overflowed. */ -#define IN_IGNORED 0x00008000 /* File was ignored. */ - -/* Helper events. */ -#define IN_CLOSE (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* Close. */ -#define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* Moves. */ - -/* Special flags. */ -#define IN_ONLYDIR 0x01000000 /* Only watch the path if it is a - directory. */ -#define IN_DONT_FOLLOW 0x02000000 /* Do not follow a sym link. */ -#define IN_MASK_ADD 0x20000000 /* Add to the mask of an already - existing watch. */ -#define IN_ISDIR 0x40000000 /* Event occurred against dir. */ -#define IN_ONESHOT 0x80000000 /* Only send event once. */ - -/* All events which a program can wait on. */ -#define IN_ALL_EVENTS (IN_ACCESS | IN_MODIFY | IN_ATTRIB | IN_CLOSE_WRITE \ - | IN_CLOSE_NOWRITE | IN_OPEN | IN_MOVED_FROM \ - | IN_MOVED_TO | IN_CREATE | IN_DELETE \ - | IN_DELETE_SELF | IN_MOVE_SELF) - - -__BEGIN_DECLS - -/* Create and initialize inotify instance. */ -extern int inotify_init (void) __THROW; - -/* Create and initialize inotify instance. */ -extern int inotify_init1 (int __flags) __THROW; - -/* Add watch of object NAME to inotify instance FD. Notify about - events specified by MASK. */ -extern int inotify_add_watch (int __fd, const char *__name, uint32_t __mask) - __THROW; - -/* Remove the watch specified by WD from the inotify instance FD. */ -extern int inotify_rm_watch (int __fd, uint32_t __wd) __THROW; - -__END_DECLS - -#endif /* sys/inotify.h */ From b991ef778a9e56dce09664f24dd35b0ae5c4b4e2 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 15 Feb 2012 08:02:19 -0800 Subject: [PATCH 4208/4487] alpha: Don't let preconfigure interfere with other targets. --- ChangeLog.alpha | 8 ++++++++ sysdeps/alpha/preconfigure | 11 ++++------- sysdeps/unix/sysv/linux/alpha/configure | 3 +++ sysdeps/unix/sysv/linux/alpha/configure.in | 3 +++ 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 7eea904290..a5271de425 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,11 @@ +2012-02-14 Joseph Myers + Tom de Vries + + * sysdeps/alpha/preconfigure: Make setting of libc_commonpagesize and + libc_relro_required conditional on alpha machine. Move setting of + libc_cv_gcc_unwind_find_fde ... + * sysdeps/unix/sysv/linux/alpha/configure.in: ... here. + 2012-02-13 Richard Henderson * sysdeps/unix/sysv/linux/alpha/bits/eventfd.h: New file. diff --git a/sysdeps/alpha/preconfigure b/sysdeps/alpha/preconfigure index 1a66d103f7..09559b9de4 100644 --- a/sysdeps/alpha/preconfigure +++ b/sysdeps/alpha/preconfigure @@ -1,10 +1,7 @@ case "$machine" in -alpha*) base_machine=alpha machine=alpha/$machine ;; +alpha*) base_machine=alpha machine=alpha/$machine + # Parameters to allow auto-detection of -z relro. + libc_commonpagesize=0x2000 + libc_relro_required=yes ;; esac -# We did historically export the unwinder from glibc. -libc_cv_gcc_unwind_find_fde=yes - -# Parameters to allow auto-detection of -z relro. -libc_commonpagesize=0x2000 -libc_relro_required=yes diff --git a/sysdeps/unix/sysv/linux/alpha/configure b/sysdeps/unix/sysv/linux/alpha/configure index 80528ee54a..c7c4feeea1 100644 --- a/sysdeps/unix/sysv/linux/alpha/configure +++ b/sysdeps/unix/sysv/linux/alpha/configure @@ -6,3 +6,6 @@ # require TLS (ver 2.6.0), it seems pointless to fix them. # ??? Surely this should now be the generic default. arch_minimum_kernel=2.6.0 + +# We did historically export the unwinder from glibc. +libc_cv_gcc_unwind_find_fde=yes diff --git a/sysdeps/unix/sysv/linux/alpha/configure.in b/sysdeps/unix/sysv/linux/alpha/configure.in index 7136b858e0..5a1af62073 100644 --- a/sysdeps/unix/sysv/linux/alpha/configure.in +++ b/sysdeps/unix/sysv/linux/alpha/configure.in @@ -6,3 +6,6 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. # require TLS (ver 2.6.0), it seems pointless to fix them. # ??? Surely this should now be the generic default. arch_minimum_kernel=2.6.0 + +# We did historically export the unwinder from glibc. +libc_cv_gcc_unwind_find_fde=yes From 7865d19cf68bcfb32c12fa3e7ce6a85fb4738383 Mon Sep 17 00:00:00 2001 From: Viju Vincent Date: Wed, 15 Feb 2012 17:25:51 +0000 Subject: [PATCH 4209/4487] Resolve race between dlopen and lazy binding on MIPS. --- ChangeLog.mips | 5 +++++ sysdeps/mips/dl-trampoline.c | 30 +++++++++++++++++++++++++++++- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index ff8cfc2fdd..2a9ed6c583 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2012-02-15 Viju Vincent + + * sysdeps/mips/dl-trampoline.c (__dl_runtime_resolve): Use locking + around calls to _dl_lookup_symbol_x. + 2012-02-13 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/inotify.h: New file. diff --git a/sysdeps/mips/dl-trampoline.c b/sysdeps/mips/dl-trampoline.c index 2c9414035c..c4367f7a3d 100644 --- a/sysdeps/mips/dl-trampoline.c +++ b/sysdeps/mips/dl-trampoline.c @@ -26,6 +26,7 @@ #include #include #include +#include /* Get link map for callers object containing STUB_PC. */ static inline struct link_map * @@ -153,17 +154,44 @@ __dl_runtime_resolve (ElfW(Word) sym_index, if (version->hash != 0) { + /* We need to keep the scope around so do some locking. This is + not necessary for objects which cannot be unloaded or when + we are not using any threads (yet). */ + if (!RTLD_SINGLE_THREAD_P) + THREAD_GSCOPE_SET_FLAG (); + sym_map = _dl_lookup_symbol_x (strtab + sym->st_name, l, &sym, l->l_scope, version, ELF_RTYPE_CLASS_PLT, 0, 0); + + /* We are done with the global scope. */ + if (!RTLD_SINGLE_THREAD_P) + THREAD_GSCOPE_RESET_FLAG (); + break; } /* Fall through. */ } case 0: + { + /* We need to keep the scope around so do some locking. This is + not necessary for objects which cannot be unloaded or when + we are not using any threads (yet). */ + int flags = DL_LOOKUP_ADD_DEPENDENCY; + if (!RTLD_SINGLE_THREAD_P) + { + THREAD_GSCOPE_SET_FLAG (); + flags |= DL_LOOKUP_GSCOPE_LOCK; + } + sym_map = _dl_lookup_symbol_x (strtab + sym->st_name, l, &sym, l->l_scope, 0, ELF_RTYPE_CLASS_PLT, - DL_LOOKUP_ADD_DEPENDENCY, 0); + flags, 0); + + /* We are done with the global scope. */ + if (!RTLD_SINGLE_THREAD_P) + THREAD_GSCOPE_RESET_FLAG (); + } } /* Currently value contains the base load address of the object From 4c85d632e4f9782a2abf0d99cb159c960adcba1d Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 15 Feb 2012 12:16:31 -0800 Subject: [PATCH 4210/4487] BZ #13361 alpha: More Linux additions copied from generic/bits/fcntl.h. --- ChangeLog.alpha | 6 +++ sysdeps/unix/sysv/linux/alpha/bits/fcntl.h | 46 +++++++++++++++++++++- 2 files changed, 51 insertions(+), 1 deletion(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index a5271de425..08d2c31b70 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,9 @@ +2012-02-15 Richard Henderson + + [BZ #13361] + * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h (struct file_handle): New. + (fallocate, name_to_handle_at, open_by_handle_at): Declare. + 2012-02-14 Joseph Myers Tom de Vries diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h index e5e726bf4c..d1cebfa684 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 1995-2000,2004,2005,2006,2007,2010 Free Software Foundation, Inc. + Copyright (C) 1995-2012 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 @@ -223,6 +223,18 @@ struct f_owner_ex we splice from/to). */ # define SPLICE_F_MORE 4 /* Expect more data. */ # define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */ + +/* File handle structure. */ +struct file_handle +{ + unsigned int handle_bytes; + int handle_type; + /* File identifier. */ + unsigned char f_handle[0]; +}; + +/* Maximum handle size (for now). */ +# define MAX_HANDLE_SZ 128 #endif __BEGIN_DECLS @@ -252,6 +264,38 @@ extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout, extern ssize_t tee (int __fdin, int __fdout, size_t __len, unsigned int __flags); +/* Reserve storage for the data of the file associated with FD. + + This function is a possible cancellation point and therefore not + marked with __THROW. */ +# ifndef __USE_FILE_OFFSET64 +extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len); +# else +# ifdef __REDIRECT +extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset, + __off64_t __len), + fallocate64); +# else +# define fallocate fallocate64 +# endif +# endif +# ifdef __USE_LARGEFILE64 +extern int fallocate64 (int __fd, int __mode, __off64_t __offset, + __off64_t __len); +# endif + +/* Map file name to file handle. */ +extern int name_to_handle_at (int __dfd, const char *__name, + struct file_handle *__handle, int *__mnt_id, + int __flags) __THROW; + +/* Open file using the file handle. + + This function is a possible cancellation point and therefore not + marked with __THROW. */ +extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle, + int __flags); + #endif __END_DECLS From 15be932dfc8d227474006f268deb4592555359ac Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 15 Feb 2012 12:19:03 -0800 Subject: [PATCH 4211/4487] alpha: Don't check USE___THREAD in __syscall_error. --- ChangeLog.alpha | 5 ++ sysdeps/unix/alpha/sysdep.S | 114 ++++++++---------------------------- 2 files changed, 28 insertions(+), 91 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 08d2c31b70..7fc6f07a63 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,8 @@ +2012-02-15 Richard Henderson + + * sysdeps/unix/alpha/sysdeps.S: Don't check __ELF__, USE___THREAD, + or _LIBC_REENTRANT. + 2012-02-15 Richard Henderson [BZ #13361] diff --git a/sysdeps/unix/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S index c67a6542f6..8003fdca8b 100644 --- a/sysdeps/unix/alpha/sysdep.S +++ b/sysdeps/unix/alpha/sysdep.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1996, 1998, 2002, 2003, 2004 +/* Copyright (C) 1993, 1996, 1998, 2002, 2003, 2004, 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -21,7 +21,7 @@ #include #include -#if defined(__ELF__) && defined(PIC) +#if defined(PIC) /* Put this at the end of libc's text segment so that all of the direct branches from the syscalls are forward, and thus predicted not taken. */ @@ -30,106 +30,38 @@ .text #endif -#ifdef PIC - /* When building a shared library, we branch here without - having loaded the GP. Nor, since it was a direct branch, - have we loaded PV with our address. Do both. */ -# define LOADGP br pv, 1f; 1: ldgp gp, 0(pv) -# define PROLOGUE .prologue 0 -# define EPILOGUE +#ifndef NOT_IN_libc +# define SYSCALL_ERROR_ERRNO __libc_errno #else - /* When building the static library, we tail call here from - elsewhere, which might use a different GP. The entertaining - part is that we have to return with the GP of our caller - in place, so that linker relaxation works properly. */ - /* ??? This is so ugly. Consider always putting the errno - setting code with the syscall in the static case. */ -# define GPSAVEREG t10 -# define LOADGP ldah t11, 0(pv) !gpdisp!1; \ - br 1f; \ - .subsection 2; \ - 1: mov gp, GPSAVEREG; \ - lda gp, 0(t11) !gpdisp!1; \ - br 2f; \ - .previous; \ - mov gp, GPSAVEREG; \ - 2: -# define PROLOGUE .prologue 1 -# define EPILOGUE mov GPSAVEREG, gp +# define SYSCALL_ERROR_ERRNO errno #endif .align 4 - .globl __syscall_error - .ent __syscall_error + .globl __syscall_error + .ent __syscall_error __syscall_error: + /* When building a shared library, we branch here without having + loaded the GP. Nor, since it was a direct branch, have we + loaded PV with our address. -#if defined(_LIBC_REENTRANT) && USE___THREAD - -#ifndef NOT_IN_libc -# define SYSCALL_ERROR_ERRNO __libc_errno -#else -# define SYSCALL_ERROR_ERRNO errno -#endif + When building a static library, we tail call here from another + object file, possibly with a different GP, and must return with + the GP of our caller in place so that linker relaxation works. - LOADGP - PROLOGUE + Both issues are solved by computing the GP into T1 instead of + clobbering the traditional GP register. */ + .prologue 0 mov v0, t0 + br t1, 1f +1: ldah t1, 0(t1) !gpdisp!1 call_pal PAL_rduniq - ldq t1, SYSCALL_ERROR_ERRNO(gp) !gottprel - addq v0, t1, v0 - stl t0, 0(v0) - lda v0, -1 - EPILOGUE - ret - -#elif defined(_LIBC_REENTRANT) - - LOADGP - lda sp, -32(sp) - .frame sp, 32, ra, 0 - stq ra, 0(sp) - stq v0, 8(sp) -#ifdef GPSAVEREG - stq GPSAVEREG, 16(sp) -#endif - .mask 0x4000001, -32 - PROLOGUE - /* Find our per-thread errno address */ -#if defined PIC && !defined IS_IN_librt - bsr ra, __errno_location !samegp -#else - jsr ra, __errno_location -#ifndef GPSAVEREG - ldgp gp, 0(ra) -#endif -#endif - - /* Store the error value. */ - ldq t0, 8(sp) - stl t0, 0(v0) - - /* And kick back a -1. */ - ldi v0, -1 - -#ifdef GPSAVEREG - ldq GPSAVEREG, 16(sp) -#endif - ldq ra, 0(sp) - lda sp, 32(sp) - EPILOGUE - ret - -#else - - LOADGP - PROLOGUE - stl v0, errno + lda t1, 0(t1) !gpdisp!1 + ldq t1, SYSCALL_ERROR_ERRNO(t1) !gottprel + addq v0, t1, t1 lda v0, -1 - EPILOGUE - ret -#endif + stl t0, 0(t1) + ret - .subsection 3 .end __syscall_error From 7504de5a6a8def5070df3b9f56983de4ea7ef72d Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 15 Feb 2012 20:21:01 +0000 Subject: [PATCH 4212/4487] Replace MIPS sys/signalfd.h with bits/signalfd.h. --- ChangeLog.mips | 5 ++ sysdeps/unix/sysv/linux/mips/bits/signalfd.h | 29 +++++++++ sysdeps/unix/sysv/linux/mips/sys/signalfd.h | 66 -------------------- 3 files changed, 34 insertions(+), 66 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/mips/bits/signalfd.h delete mode 100644 sysdeps/unix/sysv/linux/mips/sys/signalfd.h diff --git a/ChangeLog.mips b/ChangeLog.mips index 2a9ed6c583..0453f36ed5 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2012-02-15 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/signalfd.h: New file. + * sysdeps/unix/sysv/linux/mips/sys/signalfd.h: Remove. + 2012-02-15 Viju Vincent * sysdeps/mips/dl-trampoline.c (__dl_runtime_resolve): Use locking diff --git a/sysdeps/unix/sysv/linux/mips/bits/signalfd.h b/sysdeps/unix/sysv/linux/mips/bits/signalfd.h new file mode 100644 index 0000000000..c2bea7605a --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/bits/signalfd.h @@ -0,0 +1,29 @@ +/* Copyright (C) 2007-2012 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, see + . */ + +#ifndef _SYS_SIGNALFD_H +# error "Never use directly; include instead." +#endif + +/* Flags for signalfd. */ +enum + { + SFD_CLOEXEC = 02000000, +#define SFD_CLOEXEC SFD_CLOEXEC + SFD_NONBLOCK = 00000200 +#define SFD_NONBLOCK SFD_NONBLOCK + }; diff --git a/sysdeps/unix/sysv/linux/mips/sys/signalfd.h b/sysdeps/unix/sysv/linux/mips/sys/signalfd.h deleted file mode 100644 index 08923c0862..0000000000 --- a/sysdeps/unix/sysv/linux/mips/sys/signalfd.h +++ /dev/null @@ -1,66 +0,0 @@ -/* Copyright (C) 2007, 2008 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 _SYS_SIGNALFD_H -#define _SYS_SIGNALFD_H 1 - -#define __need_sigset_t -#include -#include - - -struct signalfd_siginfo -{ - uint32_t ssi_signo; - int32_t ssi_errno; - int32_t ssi_code; - uint32_t ssi_pid; - uint32_t ssi_uid; - int32_t ssi_fd; - uint32_t ssi_tid; - uint32_t ssi_band; - uint32_t ssi_overrun; - uint32_t ssi_trapno; - int32_t ssi_status; - int32_t ssi_int; - uint64_t ssi_ptr; - uint64_t ssi_utime; - uint64_t ssi_stime; - uint64_t ssi_addr; - uint8_t __pad[48]; -}; - -/* Flags for signalfd. */ -enum - { - SFD_CLOEXEC = 02000000, -#define SFD_CLOEXEC SFD_CLOEXEC - SFD_NONBLOCK = 0200 -#define SFD_NONBLOCK SFD_NONBLOCK - }; - -__BEGIN_DECLS - -/* Request notification for delivery of signals in MASK to be - performed using descriptor FD.*/ -extern int signalfd (int __fd, const sigset_t *__mask, int __flags) - __THROW __nonnull ((2)); - -__END_DECLS - -#endif /* sys/signalfd.h */ From 3fdf1316ac44fb22cc1ffca1bcc1c9e722504445 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 15 Feb 2012 22:09:44 +0000 Subject: [PATCH 4213/4487] Only build libc-do-syscall.S in Thumb mode. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 75c8f54cf0..a690d10eb8 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2012-02-15 Khem Raj + + * sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S: Disable + contents unless __thumb__. + 2012-02-08 Joseph Myers * sysdeps/arm/crti.S, sysdeps/arm/crtn.S: New files, based on diff --git a/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S b/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S index 0fca96939a..3d3792a9be 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S +++ b/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2010 Free Software Foundation, Inc. +/* Copyright (C) 2010-2012 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,6 +25,7 @@ ARM unwind tables for register to register moves, the actual opcodes are not defined. */ +#if defined(__thumb__) .thumb .syntax unified .hidden __libc_do_syscall @@ -44,3 +45,5 @@ ENTRY (__libc_do_syscall) pop {r7, pc} .fnend END (__libc_do_syscall) + +#endif /* __thumb__ */ From 87ae60cc22347daab652864dd01c966f774f7729 Mon Sep 17 00:00:00 2001 From: Robert Millan Date: Wed, 15 Feb 2012 22:20:07 +0000 Subject: [PATCH 4214/4487] Add dl-procinfo support for MIPS. --- ChangeLog.mips | 7 ++++ sysdeps/mips/dl-machine.h | 15 +++++++-- sysdeps/mips/dl-procinfo.c | 64 +++++++++++++++++++++++++++++++++++ sysdeps/mips/dl-procinfo.h | 68 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 152 insertions(+), 2 deletions(-) create mode 100644 sysdeps/mips/dl-procinfo.c create mode 100644 sysdeps/mips/dl-procinfo.h diff --git a/ChangeLog.mips b/ChangeLog.mips index 0453f36ed5..da5b93e84f 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,10 @@ +2012-02-15 Robert Millan + + * sysdeps/mips/dl-machine.h (DL_PLATFORM_INIT, dl_platform_init): + Define. + * sysdeps/mips/dl-procinfo.c: New file. + * sysdeps/mips/dl-procinfo.h: Likewise. + 2012-02-15 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/signalfd.h: New file. diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 3e1d402cf2..38470d1d0a 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -1,6 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. MIPS version. - Copyright (C) 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2011 - Free Software Foundation, Inc. + Copyright (C) 1996-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Kazumoto Kojima . @@ -296,6 +295,18 @@ do { \ # define ARCH_LA_PLTEXIT mips_n64_gnu_pltexit # endif +/* We define an initialization function. This is called very early in + _dl_sysdep_start. */ +#define DL_PLATFORM_INIT dl_platform_init () + +static inline void __attribute__ ((unused)) +dl_platform_init (void) +{ + if (GLRO(dl_platform) != NULL && *GLRO(dl_platform) == '\0') + /* Avoid an empty string which would disturb us. */ + GLRO(dl_platform) = NULL; +} + /* For a non-writable PLT, rewrite the .got.plt entry at RELOC_ADDR to point at the symbol with address VALUE. For a writable PLT, rewrite the corresponding PLT entry instead. */ diff --git a/sysdeps/mips/dl-procinfo.c b/sysdeps/mips/dl-procinfo.c new file mode 100644 index 0000000000..3e8a4fb591 --- /dev/null +++ b/sysdeps/mips/dl-procinfo.c @@ -0,0 +1,64 @@ +/* Data for Mips version of processor capability information. + Copyright (C) 2007-2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Robert Millan . + + 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. */ + +/* This information must be kept in sync with the _DL_PLATFORM_COUNT + definitions in procinfo.h. + + If anything should be added here check whether the size of each string + is still ok with the given array size. + + All the #ifdefs in the definitions are quite irritating but + necessary if we want to avoid duplicating the information. There + are three different modes: + + - PROCINFO_DECL is defined. This means we are only interested in + declarations. + + - PROCINFO_DECL is not defined: + + + if SHARED is defined the file is included in an array + initializer. The .element = { ... } syntax is needed. + + + if SHARED is not defined a normal array initialization is + needed. + */ + +#ifndef PROCINFO_CLASS +#define PROCINFO_CLASS +#endif + +#if !defined PROCINFO_DECL && defined SHARED + ._dl_mips_platforms +#else +PROCINFO_CLASS const char _dl_mips_platforms[4][11] +#endif +#ifndef PROCINFO_DECL += { + "loongson2e", "loongson2f", "octeon", "octeon2" + } +#endif +#if !defined SHARED || defined PROCINFO_DECL +; +#else +, +#endif + +#undef PROCINFO_DECL +#undef PROCINFO_CLASS diff --git a/sysdeps/mips/dl-procinfo.h b/sysdeps/mips/dl-procinfo.h new file mode 100644 index 0000000000..35f7fb759b --- /dev/null +++ b/sysdeps/mips/dl-procinfo.h @@ -0,0 +1,68 @@ +/* Mips version of processor capability information handling macros. + Copyright (C) 2007-2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Robert Millan . + + 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 _DL_PROCINFO_H +#define _DL_PROCINFO_H 1 + +#include + + +/* Mask to filter out platforms. */ +#define _DL_HWCAP_PLATFORM (-1ULL) + +#define _DL_PLATFORMS_COUNT 1 + +static inline const char * +__attribute__ ((unused)) +_dl_platform_string (int idx) +{ + return GLRO(dl_mips_platforms)[idx]; +}; + +static inline int +__attribute__ ((unused, always_inline)) +_dl_string_platform (const char *str) +{ + int i; + + if (str != NULL) + for (i = 0; i < _DL_PLATFORMS_COUNT; ++i) + { + if (strcmp (str, _dl_platform_string (i)) == 0) + return i; + } + return -1; +}; + +/* We cannot provide a general printing function. */ +#define _dl_procinfo(word) -1 + +/* There are no hardware capabilities defined. */ +#define _dl_hwcap_string(idx) "" + +/* By default there is no important hardware capability. */ +#define HWCAP_IMPORTANT (0) + +/* We don't have any hardware capabilities. */ +#define _DL_HWCAP_COUNT 0 + +#define _dl_string_hwcap(str) (-1) + +#endif /* dl-procinfo.h */ From 7e7aa31b39f0b945059acd224ac00c9a9666dda9 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 15 Feb 2012 22:26:00 +0000 Subject: [PATCH 4215/4487] Add BZ# numbers to ChangeLogs. --- ChangeLog.arm | 1 + ChangeLog.mips | 1 + 2 files changed, 2 insertions(+) diff --git a/ChangeLog.arm b/ChangeLog.arm index a690d10eb8..aa44ca757a 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,5 +1,6 @@ 2012-02-15 Khem Raj + [BZ #12097] * sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S: Disable contents unless __thumb__. diff --git a/ChangeLog.mips b/ChangeLog.mips index da5b93e84f..98feab1496 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,5 +1,6 @@ 2012-02-15 Robert Millan + [BZ #12193] * sysdeps/mips/dl-machine.h (DL_PLATFORM_INIT, dl_platform_init): Define. * sysdeps/mips/dl-procinfo.c: New file. From d05f2edbc2d69ba8dbfc5666085eb9623dab4e4e Mon Sep 17 00:00:00 2001 From: Robert Millan Date: Wed, 15 Feb 2012 22:29:31 +0000 Subject: [PATCH 4216/4487] Use __start for all Unices on MIPS. --- ChangeLog.mips | 7 +++++++ sysdeps/mips/dl-machine.h | 2 +- sysdeps/unix/{sysv/linux => }/mips/entry.h | 0 3 files changed, 8 insertions(+), 1 deletion(-) rename sysdeps/unix/{sysv/linux => }/mips/entry.h (100%) diff --git a/ChangeLog.mips b/ChangeLog.mips index 98feab1496..07cbeab4a5 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,10 @@ +2012-02-15 Robert Millan + + [BZ #12297] + * sysdeps/mips/dl-machine.h: Fix a comment regarding __start. + * sysdeps/unix/sysv/linux/mips/entry.h: Moved to ... + * sysdeps/unix/mips/entry.h: ... here. + 2012-02-15 Robert Millan [BZ #12193] diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 38470d1d0a..6f2ed7ab20 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -208,7 +208,7 @@ do { \ when it is called to store away the arguments passed to it. - 2) That under Linux the entry is named __start + 2) That under Unix the entry is named __start and not just plain _start. */ #define RTLD_START asm (\ diff --git a/sysdeps/unix/sysv/linux/mips/entry.h b/sysdeps/unix/mips/entry.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/entry.h rename to sysdeps/unix/mips/entry.h From d2cc32ab719a825c825061c6b5dcf959968ead5d Mon Sep 17 00:00:00 2001 From: Robert Millan Date: Wed, 15 Feb 2012 22:35:18 +0000 Subject: [PATCH 4217/4487] Provide sys/tas.h for all MIPS systems. --- ChangeLog.mips | 6 ++++++ sysdeps/{unix/sysv/linux => }/mips/sys/tas.h | 0 2 files changed, 6 insertions(+) rename sysdeps/{unix/sysv/linux => }/mips/sys/tas.h (100%) diff --git a/ChangeLog.mips b/ChangeLog.mips index 07cbeab4a5..4d66c84e2a 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,9 @@ +2012-02-15 Robert Millan + + [BZ #12298] + * sysdeps/unix/sysv/linux/mips/sys/tas.h: Moved to ... + * sysdeps/mips/sys/tas.h: ... here. + 2012-02-15 Robert Millan [BZ #12297] diff --git a/sysdeps/unix/sysv/linux/mips/sys/tas.h b/sysdeps/mips/sys/tas.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/sys/tas.h rename to sysdeps/mips/sys/tas.h From a31567f46f9b30f2979223c42502c7a57f41b703 Mon Sep 17 00:00:00 2001 From: Robert Millan Date: Wed, 15 Feb 2012 22:39:15 +0000 Subject: [PATCH 4218/4487] Define SYSCALL_ERROR_LABEL for mips32. --- ChangeLog.mips | 6 ++++++ sysdeps/unix/sysv/linux/mips/mips32/sysdep.h | 10 +++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 4d66c84e2a..0d43038df3 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,9 @@ +2012-02-15 Robert Millan + + [BZ #12301] + * sysdeps/unix/sysv/linux/mips/mips32/sysdep.h [__ASSEMBLER__] + [__PIC__] (SYSCALL_ERROR_LABEL): New macro. + 2012-02-15 Robert Millan [BZ #12298] diff --git a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h index 061e322448..57de0a4342 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h @@ -37,7 +37,15 @@ #undef SYS_ify #define SYS_ify(syscall_name) __NR_##syscall_name -#ifndef __ASSEMBLER__ +#ifdef __ASSEMBLER__ + +/* We don't want the label for the error handler to be visible in the symbol + table when we define it here. */ +#ifdef __PIC__ +# define SYSCALL_ERROR_LABEL 99b +#endif + +#else /* ! __ASSEMBLER__ */ /* Define a macro which expands into the inline wrapper code for a system call. */ From 7b4f30e3563c45999ea28f4c8bada9856b00bb95 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 15 Feb 2012 13:48:44 -0800 Subject: [PATCH 4219/4487] alpha: Don't test USE___THREAD in dl-machine.h. --- ChangeLog.alpha | 2 ++ sysdeps/alpha/dl-machine.h | 7 ------- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 7fc6f07a63..5b4be14df3 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,5 +1,7 @@ 2012-02-15 Richard Henderson + * sysdeps/alpha/dl-machine.h: Don't check USE___THREAD. + * sysdeps/unix/alpha/sysdeps.S: Don't check __ELF__, USE___THREAD, or _LIBC_REENTRANT. diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 2790ae5702..5ab71b1d1d 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -232,16 +232,11 @@ _dl_start_user: \n\ to one of the main executable's symbols, as for a COPY reloc. This is unused on Alpha. */ -#if !defined RTLD_BOOTSTRAP || USE___THREAD # define elf_machine_type_class(type) \ (((type) == R_ALPHA_JMP_SLOT \ || (type) == R_ALPHA_DTPMOD64 \ || (type) == R_ALPHA_DTPREL64 \ || (type) == R_ALPHA_TPREL64) * ELF_RTYPE_CLASS_PLT) -#else -# define elf_machine_type_class(type) \ - (((type) == R_ALPHA_JMP_SLOT) * ELF_RTYPE_CLASS_PLT) -#endif /* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */ #define ELF_MACHINE_JMP_SLOT R_ALPHA_JMP_SLOT @@ -452,7 +447,6 @@ elf_machine_rela (struct link_map *map, memcpy (reloc_addr_arg, &sym_value, 8); } #endif -#if !defined RTLD_BOOTSTRAP || USE___THREAD else if (r_type == R_ALPHA_DTPMOD64) { # ifdef RTLD_BOOTSTRAP @@ -485,7 +479,6 @@ elf_machine_rela (struct link_map *map, } # endif } -#endif else _dl_reloc_bad_type (map, r_type, 0); } From 64e65bc1aea72e5daa7d4540f848c1e0e53605ac Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 15 Feb 2012 13:51:58 -0800 Subject: [PATCH 4220/4487] alpha: Correct relocation markup for PIC SYSCALL_ERROR_HANDLER. --- ChangeLog.alpha | 4 ++++ sysdeps/unix/alpha/sysdep.h | 9 +++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 5b4be14df3..eb5544cbb3 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,5 +1,9 @@ 2012-02-15 Richard Henderson + * sysdeps/unux/alpha/sysdep.h: Don't include + [PIC] (SYSCALL_ERROR_HANDLER): Emit nothing. + [PIC] (SYSCALL_ERROR_LABEL): Add !samegp markup. + * sysdeps/alpha/dl-machine.h: Don't check USE___THREAD. * sysdeps/unix/alpha/sysdeps.S: Don't check __ELF__, USE___THREAD, diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h index 224c95d3b5..e82784225b 100644 --- a/sysdeps/unix/alpha/sysdep.h +++ b/sysdeps/unix/alpha/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1995, 1996, 2000, 2003, 2004, 2006, 2010 +/* Copyright (C) 1992, 1995, 1996, 2000, 2003, 2004, 2006, 2010, 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -28,8 +28,6 @@ # include #endif -#include /* Defines USE___THREAD. */ - #ifdef IS_IN_rtld # include /* Defines RTLD_PRIVATE_ERRNO. */ #endif @@ -86,9 +84,8 @@ lda v0, -1; \ ret #elif defined(PIC) -# define SYSCALL_ERROR_LABEL __syscall_error -# define SYSCALL_ERROR_HANDLER \ - br $31, __syscall_error !samegp +# define SYSCALL_ERROR_LABEL __syscall_error !samegp +# define SYSCALL_ERROR_HANDLER #else # define SYSCALL_ERROR_LABEL $syscall_error # define SYSCALL_ERROR_HANDLER \ From f0a81bf387d3ac69da3b1087f31d292fbed68912 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 15 Feb 2012 16:06:17 -0800 Subject: [PATCH 4221/4487] alpha: Do signed promotion of 32-bit arguments to syscalls --- ChangeLog.alpha | 11 +- sysdeps/unix/alpha/sysdep.h | 190 +++++++++------------- sysdeps/unix/sysv/linux/alpha/setregid.c | 31 ---- sysdeps/unix/sysv/linux/alpha/setresgid.c | 33 ---- sysdeps/unix/sysv/linux/alpha/setresuid.c | 33 ---- sysdeps/unix/sysv/linux/alpha/setreuid.c | 31 ---- 6 files changed, 85 insertions(+), 244 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/alpha/setregid.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/setresgid.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/setresuid.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/setreuid.c diff --git a/ChangeLog.alpha b/ChangeLog.alpha index eb5544cbb3..912fe332db 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,6 +1,15 @@ 2012-02-15 Richard Henderson - * sysdeps/unux/alpha/sysdep.h: Don't include + * sysdeps/unix/alpha/sysdep.h (syscall_promote): New. + (inline_syscall0, inline_syscall1, inline_syscall2, + inline_syscall3, inline_syscall4, inline_syscall5, + inline_syscall6): Use it. + * sysdeps/unix/sysv/linux/alpha/setregid.c: Remove. + * sysdeps/unix/sysv/linux/alpha/setreuid.c: Remove. + * sysdeps/unix/sysv/linux/alpha/setresgid.c: Remove. + * sysdeps/unix/sysv/linux/alpha/setresuid.c: Remove. + + * sysdeps/unix/alpha/sysdep.h: Don't include [PIC] (SYSCALL_ERROR_HANDLER): Emit nothing. [PIC] (SYSCALL_ERROR_LABEL): Add !samegp markup. diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h index e82784225b..c3f5920ad0 100644 --- a/sysdeps/unix/alpha/sysdep.h +++ b/sysdeps/unix/alpha/sysdep.h @@ -190,6 +190,12 @@ __LABEL(name) \ #define INTERNAL_SYSCALL_DECL(err) \ long int err __attribute__((unused)) +/* The normal Alpha calling convention sign-extends 32-bit quantties + no matter what the "real" sign of the 32-bit type. We want to + preserve that when filling in values for the kernel. */ +#define syscall_promote(arg) \ + (sizeof(arg) == 4 ? (long)(int)(long)(arg) : (long)(arg)) + /* Make sure and "use" the variable that we're not returning, in order to suppress unused variable warnings. */ #define INTERNAL_SYSCALL_ERROR_P(val, err) ((void)val, err) @@ -205,172 +211,126 @@ __LABEL(name) \ #define inline_syscall0(name, args...) \ { \ - register long _sc_0; \ register long _sc_19 __asm__("$19"); \ - \ - _sc_0 = name; \ + register long _sc_0 = name; \ __asm__ __volatile__ \ ("callsys # %0 %1 <= %2" \ - : "=v"(_sc_0), "=r"(_sc_19) \ - : "0"(_sc_0) \ - : inline_syscall_clobbers, \ + : "+v"(_sc_0), "=r"(_sc_19) \ + : : inline_syscall_clobbers, \ "$16", "$17", "$18", "$20", "$21"); \ _sc_ret = _sc_0, _sc_err = _sc_19; \ } #define inline_syscall1(name,arg1) \ { \ - register long _sc_0; \ - register long _sc_16 __asm__("$16"); \ + register long _tmp_16 = syscall_promote (arg1); \ + register long _sc_0 = name; \ + register long _sc_16 __asm__("$16") = _tmp_16; \ register long _sc_19 __asm__("$19"); \ - register long _tmp_16 = (long) (arg1); \ - \ - _sc_0 = name; \ - _sc_16 = _tmp_16; \ __asm__ __volatile__ \ ("callsys # %0 %1 <= %2 %3" \ - : "=v"(_sc_0), "=r"(_sc_19), "=r"(_sc_16) \ - : "0"(_sc_0), "2"(_sc_16) \ - : inline_syscall_clobbers, \ + : "+v"(_sc_0), "=r"(_sc_19), "+r"(_sc_16) \ + : : inline_syscall_clobbers, \ "$17", "$18", "$20", "$21"); \ _sc_ret = _sc_0, _sc_err = _sc_19; \ } #define inline_syscall2(name,arg1,arg2) \ { \ - register long _sc_0; \ - register long _sc_16 __asm__("$16"); \ - register long _sc_17 __asm__("$17"); \ + register long _tmp_16 = syscall_promote (arg1); \ + register long _tmp_17 = syscall_promote (arg2); \ + register long _sc_0 = name; \ + register long _sc_16 __asm__("$16") = _tmp_16; \ + register long _sc_17 __asm__("$17") = _tmp_17; \ register long _sc_19 __asm__("$19"); \ - register long _tmp_16 = (long) (arg1); \ - register long _tmp_17 = (long) (arg2); \ - \ - _sc_0 = name; \ - _sc_16 = _tmp_16; \ - _sc_17 = _tmp_17; \ __asm__ __volatile__ \ ("callsys # %0 %1 <= %2 %3 %4" \ - : "=v"(_sc_0), "=r"(_sc_19), \ - "=r"(_sc_16), "=r"(_sc_17) \ - : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17) \ - : inline_syscall_clobbers, \ + : "+v"(_sc_0), "=r"(_sc_19), \ + "+r"(_sc_16), "+r"(_sc_17) \ + : : inline_syscall_clobbers, \ "$18", "$20", "$21"); \ _sc_ret = _sc_0, _sc_err = _sc_19; \ } #define inline_syscall3(name,arg1,arg2,arg3) \ { \ - register long _sc_0; \ - register long _sc_16 __asm__("$16"); \ - register long _sc_17 __asm__("$17"); \ - register long _sc_18 __asm__("$18"); \ + register long _tmp_16 = syscall_promote (arg1); \ + register long _tmp_17 = syscall_promote (arg2); \ + register long _tmp_18 = syscall_promote (arg3); \ + register long _sc_0 = name; \ + register long _sc_16 __asm__("$16") = _tmp_16; \ + register long _sc_17 __asm__("$17") = _tmp_17; \ + register long _sc_18 __asm__("$18") = _tmp_18; \ register long _sc_19 __asm__("$19"); \ - register long _tmp_16 = (long) (arg1); \ - register long _tmp_17 = (long) (arg2); \ - register long _tmp_18 = (long) (arg3); \ - \ - _sc_0 = name; \ - _sc_16 = _tmp_16; \ - _sc_17 = _tmp_17; \ - _sc_18 = _tmp_18; \ __asm__ __volatile__ \ ("callsys # %0 %1 <= %2 %3 %4 %5" \ - : "=v"(_sc_0), "=r"(_sc_19), "=r"(_sc_16), \ - "=r"(_sc_17), "=r"(_sc_18) \ - : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \ - "4"(_sc_18) \ - : inline_syscall_clobbers, "$20", "$21"); \ + : "+v"(_sc_0), "=r"(_sc_19), "+r"(_sc_16), \ + "+r"(_sc_17), "+r"(_sc_18) \ + : : inline_syscall_clobbers, "$20", "$21"); \ _sc_ret = _sc_0, _sc_err = _sc_19; \ } #define inline_syscall4(name,arg1,arg2,arg3,arg4) \ { \ - register long _sc_0; \ - register long _sc_16 __asm__("$16"); \ - register long _sc_17 __asm__("$17"); \ - register long _sc_18 __asm__("$18"); \ - register long _sc_19 __asm__("$19"); \ - register long _tmp_16 = (long) (arg1); \ - register long _tmp_17 = (long) (arg2); \ - register long _tmp_18 = (long) (arg3); \ - register long _tmp_19 = (long) (arg4); \ - \ - _sc_0 = name; \ - _sc_16 = _tmp_16; \ - _sc_17 = _tmp_17; \ - _sc_18 = _tmp_18; \ - _sc_19 = _tmp_19; \ + register long _tmp_16 = syscall_promote (arg1); \ + register long _tmp_17 = syscall_promote (arg2); \ + register long _tmp_18 = syscall_promote (arg3); \ + register long _tmp_19 = syscall_promote (arg4); \ + register long _sc_0 = name; \ + register long _sc_16 __asm__("$16") = _tmp_16; \ + register long _sc_17 __asm__("$17") = _tmp_17; \ + register long _sc_18 __asm__("$18") = _tmp_18; \ + register long _sc_19 __asm__("$19") = _tmp_19; \ __asm__ __volatile__ \ ("callsys # %0 %1 <= %2 %3 %4 %5 %6" \ - : "=v"(_sc_0), "=r"(_sc_19), "=r"(_sc_16), \ - "=r"(_sc_17), "=r"(_sc_18) \ - : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \ - "4"(_sc_18), "1"(_sc_19) \ - : inline_syscall_clobbers, "$20", "$21"); \ + : "+v"(_sc_0), "+r"(_sc_19), "+r"(_sc_16), \ + "+r"(_sc_17), "+r"(_sc_18) \ + : : inline_syscall_clobbers, "$20", "$21"); \ _sc_ret = _sc_0, _sc_err = _sc_19; \ } #define inline_syscall5(name,arg1,arg2,arg3,arg4,arg5) \ { \ - register long _sc_0; \ - register long _sc_16 __asm__("$16"); \ - register long _sc_17 __asm__("$17"); \ - register long _sc_18 __asm__("$18"); \ - register long _sc_19 __asm__("$19"); \ - register long _sc_20 __asm__("$20"); \ - register long _tmp_16 = (long) (arg1); \ - register long _tmp_17 = (long) (arg2); \ - register long _tmp_18 = (long) (arg3); \ - register long _tmp_19 = (long) (arg4); \ - register long _tmp_20 = (long) (arg5); \ - \ - _sc_0 = name; \ - _sc_16 = _tmp_16; \ - _sc_17 = _tmp_17; \ - _sc_18 = _tmp_18; \ - _sc_19 = _tmp_19; \ - _sc_20 = _tmp_20; \ + register long _tmp_16 = syscall_promote (arg1); \ + register long _tmp_17 = syscall_promote (arg2); \ + register long _tmp_18 = syscall_promote (arg3); \ + register long _tmp_19 = syscall_promote (arg4); \ + register long _tmp_20 = syscall_promote (arg5); \ + register long _sc_0 = name; \ + register long _sc_16 __asm__("$16") = _tmp_16; \ + register long _sc_17 __asm__("$17") = _tmp_17; \ + register long _sc_18 __asm__("$18") = _tmp_18; \ + register long _sc_19 __asm__("$19") = _tmp_19; \ + register long _sc_20 __asm__("$20") = _tmp_20; \ __asm__ __volatile__ \ ("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7" \ - : "=v"(_sc_0), "=r"(_sc_19), "=r"(_sc_16), \ - "=r"(_sc_17), "=r"(_sc_18), "=r"(_sc_20) \ - : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \ - "4"(_sc_18), "1"(_sc_19), "5"(_sc_20) \ - : inline_syscall_clobbers, "$21"); \ + : "+v"(_sc_0), "+r"(_sc_19), "+r"(_sc_16), \ + "+r"(_sc_17), "+r"(_sc_18), "+r"(_sc_20) \ + : : inline_syscall_clobbers, "$21"); \ _sc_ret = _sc_0, _sc_err = _sc_19; \ } #define inline_syscall6(name,arg1,arg2,arg3,arg4,arg5,arg6) \ { \ - register long _sc_0; \ - register long _sc_16 __asm__("$16"); \ - register long _sc_17 __asm__("$17"); \ - register long _sc_18 __asm__("$18"); \ - register long _sc_19 __asm__("$19"); \ - register long _sc_20 __asm__("$20"); \ - register long _sc_21 __asm__("$21"); \ - register long _tmp_16 = (long) (arg1); \ - register long _tmp_17 = (long) (arg2); \ - register long _tmp_18 = (long) (arg3); \ - register long _tmp_19 = (long) (arg4); \ - register long _tmp_20 = (long) (arg5); \ - register long _tmp_21 = (long) (arg6); \ - \ - _sc_0 = name; \ - _sc_16 = _tmp_16; \ - _sc_17 = _tmp_17; \ - _sc_18 = _tmp_18; \ - _sc_19 = _tmp_19; \ - _sc_20 = _tmp_20; \ - _sc_21 = _tmp_21; \ + register long _tmp_16 = syscall_promote (arg1); \ + register long _tmp_17 = syscall_promote (arg2); \ + register long _tmp_18 = syscall_promote (arg3); \ + register long _tmp_19 = syscall_promote (arg4); \ + register long _tmp_20 = syscall_promote (arg5); \ + register long _tmp_21 = syscall_promote (arg6); \ + register long _sc_0 = name; \ + register long _sc_16 __asm__("$16") = _tmp_16; \ + register long _sc_17 __asm__("$17") = _tmp_17; \ + register long _sc_18 __asm__("$18") = _tmp_18; \ + register long _sc_19 __asm__("$19") = _tmp_19; \ + register long _sc_20 __asm__("$20") = _tmp_20; \ + register long _sc_21 __asm__("$21") = _tmp_21; \ __asm__ __volatile__ \ ("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7 %8" \ - : "=v"(_sc_0), "=r"(_sc_19), "=r"(_sc_16), \ - "=r"(_sc_17), "=r"(_sc_18), "=r"(_sc_20), \ - "=r"(_sc_21) \ - : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), "4"(_sc_18), \ - "1"(_sc_19), "5"(_sc_20), "6"(_sc_21) \ - : inline_syscall_clobbers); \ + : "+v"(_sc_0), "+r"(_sc_19), "+r"(_sc_16), \ + "+r"(_sc_17), "+r"(_sc_18), "+r"(_sc_20), \ + "+r"(_sc_21) \ + : : inline_syscall_clobbers); \ _sc_ret = _sc_0, _sc_err = _sc_19; \ } diff --git a/sysdeps/unix/sysv/linux/alpha/setregid.c b/sysdeps/unix/sysv/linux/alpha/setregid.c deleted file mode 100644 index 0973fe4ac1..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/setregid.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (C) 1998, 2000, 2003, 2004 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. */ - -#include -#include -#include - - -int -__setregid (gid_t rgid, gid_t egid) -{ - return INLINE_SETXID_SYSCALL (setregid, 2, (int) rgid, (int) egid); -} -#ifndef __setregid -weak_alias (__setregid, setregid) -#endif diff --git a/sysdeps/unix/sysv/linux/alpha/setresgid.c b/sysdeps/unix/sysv/linux/alpha/setresgid.c deleted file mode 100644 index 50e29e3c76..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/setresgid.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (C) 1998, 2000, 2003, 2004 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. */ - -#include -#include -#include - - -int -__setresgid (gid_t rgid, gid_t egid, gid_t sgid) -{ - return INLINE_SETXID_SYSCALL (setresgid, 3, (int) rgid, - (int) egid, (int) sgid); -} -libc_hidden_def (__setresgid) -#ifndef __setresgid -weak_alias (__setresgid, setresgid) -#endif diff --git a/sysdeps/unix/sysv/linux/alpha/setresuid.c b/sysdeps/unix/sysv/linux/alpha/setresuid.c deleted file mode 100644 index e76413bf6a..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/setresuid.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (C) 1998, 2000, 2003, 2004 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. */ - -#include -#include -#include - - -int -__setresuid (uid_t ruid, uid_t euid, uid_t suid) -{ - return INLINE_SETXID_SYSCALL (setresuid, 3, (int) ruid, - (int) euid, (int) suid); -} -libc_hidden_def (__setresuid) -#ifndef __setresuid -weak_alias (__setresuid, setresuid) -#endif diff --git a/sysdeps/unix/sysv/linux/alpha/setreuid.c b/sysdeps/unix/sysv/linux/alpha/setreuid.c deleted file mode 100644 index a23a34792e..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/setreuid.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (C) 1998, 2000, 2003, 2004 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. */ - -#include -#include -#include - - -int -__setreuid (uid_t ruid, uid_t euid) -{ - return INLINE_SETXID_SYSCALL (setreuid, 2, (int) ruid, (int) euid); -} -#ifndef __setreuid -weak_alias (__setreuid, setreuid) -#endif From 596720af7a36d043f4f5f887d9ac7c72b411d3f1 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 15 Feb 2012 16:24:45 -0800 Subject: [PATCH 4222/4487] alpha: Convert to bits/signalfd.h. --- ChangeLog.alpha | 3 + sysdeps/unix/sysv/linux/alpha/bits/signalfd.h | 29 ++++++++ sysdeps/unix/sysv/linux/alpha/sys/signalfd.h | 66 ------------------- 3 files changed, 32 insertions(+), 66 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/signalfd.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/sys/signalfd.h diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 912fe332db..87f3cf856f 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,5 +1,8 @@ 2012-02-15 Richard Henderson + * sysdeps/unix/sysv/linux/alpha/bits/signalfd.h: New file. + * sysdeps/unix/sysv/linux/alpha/sys/signalfd.h: Remove. + * sysdeps/unix/alpha/sysdep.h (syscall_promote): New. (inline_syscall0, inline_syscall1, inline_syscall2, inline_syscall3, inline_syscall4, inline_syscall5, diff --git a/sysdeps/unix/sysv/linux/alpha/bits/signalfd.h b/sysdeps/unix/sysv/linux/alpha/bits/signalfd.h new file mode 100644 index 0000000000..7ea70faef3 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/bits/signalfd.h @@ -0,0 +1,29 @@ +/* Copyright (C) 2007-2012 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, see + . */ + +#ifndef _SYS_SIGNALFD_H +# error "Never use directly; include instead." +#endif + +/* Flags for signalfd. */ +enum + { + SFD_CLOEXEC = 010000000, +#define SFD_CLOEXEC SFD_CLOEXEC + SFD_NONBLOCK = 000000004 +#define SFD_NONBLOCK SFD_NONBLOCK + }; diff --git a/sysdeps/unix/sysv/linux/alpha/sys/signalfd.h b/sysdeps/unix/sysv/linux/alpha/sys/signalfd.h deleted file mode 100644 index 4cbe977768..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/sys/signalfd.h +++ /dev/null @@ -1,66 +0,0 @@ -/* Copyright (C) 2007, 2008 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 _SYS_SIGNALFD_H -#define _SYS_SIGNALFD_H 1 - -#define __need_sigset_t -#include -#include - - -struct signalfd_siginfo -{ - uint32_t ssi_signo; - int32_t ssi_errno; - int32_t ssi_code; - uint32_t ssi_pid; - uint32_t ssi_uid; - int32_t ssi_fd; - uint32_t ssi_tid; - uint32_t ssi_band; - uint32_t ssi_overrun; - uint32_t ssi_trapno; - int32_t ssi_status; - int32_t ssi_int; - uint64_t ssi_ptr; - uint64_t ssi_utime; - uint64_t ssi_stime; - uint64_t ssi_addr; - uint8_t __pad[48]; -}; - -/* Flags for signalfd. */ -enum - { - SFD_CLOEXEC = 010000000, -#define SFD_CLOEXEC SFD_CLOEXEC - SFD_NONBLOCK = 04 -#define SFD_NONBLOCK SFD_NONBLOCK - }; - -__BEGIN_DECLS - -/* Request notification for delivery of signals in MASK to be - performed using descriptor FD.*/ -extern int signalfd (int __fd, const sigset_t *__mask, int __flags) - __THROW __nonnull ((2)); - -__END_DECLS - -#endif /* sys/signalfd.h */ From f3ce45f370b011485280a60ec9823f5be85b4735 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Wed, 15 Feb 2012 16:27:55 -0800 Subject: [PATCH 4223/4487] alpha: Support 6th argument to syscall --- ChangeLog.alpha | 5 +++++ sysdeps/unix/sysv/linux/alpha/syscall.S | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 87f3cf856f..5b98b1ec4b 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,8 @@ +2012-02-15 Mike Hommey + + [BZ #11677] + * sysdeps/unix/sysv/linux/alpha/syscall.S: Support 6th argument. + 2012-02-15 Richard Henderson * sysdeps/unix/sysv/linux/alpha/bits/signalfd.h: New file. diff --git a/sysdeps/unix/sysv/linux/alpha/syscall.S b/sysdeps/unix/sysv/linux/alpha/syscall.S index 0c4081363a..02d5d65194 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscall.S +++ b/sysdeps/unix/sysv/linux/alpha/syscall.S @@ -31,13 +31,13 @@ * * Usage: * - * long syscall(syscall_number, arg1, arg2, arg3, arg4, arg5) + * long syscall(syscall_number, arg1, arg2, arg3, arg4, arg5, arg6) * * syscall_number = the index of the system call we're invoking - * arg1-arg5 = up to 5 integer arguments to the system call + * arg1-arg6 = up to 6 integer arguments to the system call * * We need to do some arg shifting: the kernel expects the - * syscall number in v0 and the first five args in a0-a4. + * syscall number in v0 and the first six args in a0-a5. * */ @@ -60,6 +60,7 @@ LEAF(__syscall, 0) mov a3, a2 mov a4, a3 mov a5, a4 + ldq a5,0(sp) /* arg6 -> a5 */ call_pal PAL_callsys /* Invoke system call */ bne a3, $error From d653a08bfb42d68076bb6f38d0cb61bd060cda18 Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Fri, 17 Feb 2012 17:31:09 +0100 Subject: [PATCH 4224/4487] Adjust ARM ULPS to take into account the new jn tests. --- ChangeLog.arm | 4 ++++ sysdeps/arm/libm-test-ulps | 42 ++++++++++++++++++++++++++++++++++++-- 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index aa44ca757a..9eef7e7d62 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,7 @@ +2012-02-17 Aurelien Jarno + + * sysdeps/arm/libm-test-ulps: Adjust ULPs for jn tests. + 2012-02-15 Khem Raj [BZ #12097] diff --git a/sysdeps/arm/libm-test-ulps b/sysdeps/arm/libm-test-ulps index 4fec86ee12..ba025fdc49 100644 --- a/sysdeps/arm/libm-test-ulps +++ b/sysdeps/arm/libm-test-ulps @@ -681,11 +681,18 @@ float: 3 idouble: 4 ifloat: 3 Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6": +double: 1 float: 4 +idouble: 1 ifloat: 4 Test "jn (10, 2.0) == 0.25153862827167367096e-6": float: 4 ifloat: 4 +Test "jn (2, 2.4048255576957729) == 0.43175480701968038399746111312430703": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 Test "jn (3, 0.1) == 0.000020820315754756261429": double: 1 idouble: 1 @@ -722,6 +729,37 @@ double: 1 float: 2 idouble: 1 ifloat: 2 +Test "jn (3, 2.4048255576957729) == 0.19899990535769083404042146764530813": +double: 3 +idouble: 3 +Test "jn (4, 2.4048255576957729) == 0.647466661641779720084932282551219891E-1": +double: 1 +idouble: 1 +Test "jn (5, 2.4048255576957729) == 0.163892432048058525099230549946147698E-1": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "jn (6, 2.4048255576957729) == 0.34048184720278336646673682895929161E-2": +double: 4 +float: 3 +idouble: 4 +ifloat: 3 +Test "jn (7, 2.4048255576957729) == 0.60068836573295394221291569249883076E-3": +double: 3 +float: 5 +idouble: 3 +ifloat: 5 +Test "jn (8, 2.4048255576957729) == 0.92165786705344923232879022467054148E-4": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 +Test "jn (9, 2.4048255576957729) == 0.12517270977961513005428966643852564E-4": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 # lgamma Test "lgamma (0.7) == 0.260867246531666514385732417016759578": @@ -1358,9 +1396,9 @@ ifloat: 2 Function: "jn": double: 6 -float: 4 +float: 5 idouble: 6 -ifloat: 4 +ifloat: 5 Function: "lgamma": double: 1 From cec96a4f3dbd65bf4d04136b41a0c03c0cedaaea Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Fri, 17 Feb 2012 17:29:12 +0100 Subject: [PATCH 4225/4487] Adjust MIPS ULPS to take into account the new jn tests. --- ChangeLog.mips | 6 ++++ sysdeps/mips/fpu/libm-test-ulps | 42 ++++++++++++++++++++++++-- sysdeps/mips/mips64/n32/libm-test-ulps | 42 ++++++++++++++++++++++++-- sysdeps/mips/mips64/n64/libm-test-ulps | 42 ++++++++++++++++++++++++-- 4 files changed, 126 insertions(+), 6 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 0d43038df3..8d3ea991a9 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,9 @@ +2012-02-17 Aurelien Jarno + + * sysdeps/mips/fpu/libm-test-ulps: Adjust ULPs for jn tests. + * sysdeps/mips/mips64/n32/fpu/libm-test-ulps: Likewise. + * sysdeps/mips/mips64/n64/fpu/libm-test-ulps: Likewise. + 2012-02-15 Robert Millan [BZ #12301] diff --git a/sysdeps/mips/fpu/libm-test-ulps b/sysdeps/mips/fpu/libm-test-ulps index b514496676..ff24b738ce 100644 --- a/sysdeps/mips/fpu/libm-test-ulps +++ b/sysdeps/mips/fpu/libm-test-ulps @@ -429,8 +429,15 @@ float: 3 idouble: 4 ifloat: 3 Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6": +double: 1 float: 4 +idouble: 1 ifloat: 4 +Test "jn (2, 2.4048255576957729) == 0.43175480701968038399746111312430703": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 Test "jn (3, 0.125) == 0.406503832554912875023029337653442868e-4": double: 1 float: 1 @@ -451,6 +458,37 @@ double: 1 float: 2 idouble: 1 ifloat: 2 +Test "jn (3, 2.4048255576957729) == 0.19899990535769083404042146764530813": +double: 3 +idouble: 3 +Test "jn (4, 2.4048255576957729) == 0.647466661641779720084932282551219891E-1": +double: 1 +idouble: 1 +Test "jn (5, 2.4048255576957729) == 0.163892432048058525099230549946147698E-1": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "jn (6, 2.4048255576957729) == 0.34048184720278336646673682895929161E-2": +double: 4 +float: 3 +idouble: 4 +ifloat: 3 +Test "jn (7, 2.4048255576957729) == 0.60068836573295394221291569249883076E-3": +double: 3 +float: 5 +idouble: 3 +ifloat: 5 +Test "jn (8, 2.4048255576957729) == 0.92165786705344923232879022467054148E-4": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 +Test "jn (9, 2.4048255576957729) == 0.12517270977961513005428966643852564E-4": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 # lgamma Test "lgamma (0.7) == 0.260867246531666514385732417016759578": @@ -833,9 +871,9 @@ ifloat: 2 Function: "jn": double: 4 -float: 4 +float: 5 idouble: 4 -ifloat: 4 +ifloat: 5 Function: "lgamma": double: 1 diff --git a/sysdeps/mips/mips64/n32/libm-test-ulps b/sysdeps/mips/mips64/n32/libm-test-ulps index d9df631d7c..f66e4cb6b1 100644 --- a/sysdeps/mips/mips64/n32/libm-test-ulps +++ b/sysdeps/mips/mips64/n32/libm-test-ulps @@ -612,8 +612,15 @@ ifloat: 3 ildouble: 2 ldouble: 2 Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6": +double: 1 float: 4 +idouble: 1 ifloat: 4 +Test "jn (2, 2.4048255576957729) == 0.43175480701968038399746111312430703": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 Test "jn (3, 0.125) == 0.406503832554912875023029337653442868e-4": double: 1 float: 1 @@ -636,6 +643,37 @@ double: 1 float: 2 idouble: 1 ifloat: 2 +Test "jn (3, 2.4048255576957729) == 0.19899990535769083404042146764530813": +double: 3 +idouble: 3 +Test "jn (4, 2.4048255576957729) == 0.647466661641779720084932282551219891E-1": +double: 1 +idouble: 1 +Test "jn (5, 2.4048255576957729) == 0.163892432048058525099230549946147698E-1": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "jn (6, 2.4048255576957729) == 0.34048184720278336646673682895929161E-2": +double: 4 +float: 3 +idouble: 4 +ifloat: 3 +Test "jn (7, 2.4048255576957729) == 0.60068836573295394221291569249883076E-3": +double: 3 +float: 5 +idouble: 3 +ifloat: 5 +Test "jn (8, 2.4048255576957729) == 0.92165786705344923232879022467054148E-4": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 +Test "jn (9, 2.4048255576957729) == 0.12517270977961513005428966643852564E-4": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 # lgamma Test "lgamma (-0.5) == log(2*sqrt(pi))": @@ -1158,9 +1196,9 @@ ldouble: 4 Function: "jn": double: 4 -float: 4 +float: 5 idouble: 4 -ifloat: 4 +ifloat: 5 ildouble: 4 ldouble: 4 diff --git a/sysdeps/mips/mips64/n64/libm-test-ulps b/sysdeps/mips/mips64/n64/libm-test-ulps index d9df631d7c..f66e4cb6b1 100644 --- a/sysdeps/mips/mips64/n64/libm-test-ulps +++ b/sysdeps/mips/mips64/n64/libm-test-ulps @@ -612,8 +612,15 @@ ifloat: 3 ildouble: 2 ldouble: 2 Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6": +double: 1 float: 4 +idouble: 1 ifloat: 4 +Test "jn (2, 2.4048255576957729) == 0.43175480701968038399746111312430703": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 Test "jn (3, 0.125) == 0.406503832554912875023029337653442868e-4": double: 1 float: 1 @@ -636,6 +643,37 @@ double: 1 float: 2 idouble: 1 ifloat: 2 +Test "jn (3, 2.4048255576957729) == 0.19899990535769083404042146764530813": +double: 3 +idouble: 3 +Test "jn (4, 2.4048255576957729) == 0.647466661641779720084932282551219891E-1": +double: 1 +idouble: 1 +Test "jn (5, 2.4048255576957729) == 0.163892432048058525099230549946147698E-1": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "jn (6, 2.4048255576957729) == 0.34048184720278336646673682895929161E-2": +double: 4 +float: 3 +idouble: 4 +ifloat: 3 +Test "jn (7, 2.4048255576957729) == 0.60068836573295394221291569249883076E-3": +double: 3 +float: 5 +idouble: 3 +ifloat: 5 +Test "jn (8, 2.4048255576957729) == 0.92165786705344923232879022467054148E-4": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 +Test "jn (9, 2.4048255576957729) == 0.12517270977961513005428966643852564E-4": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 # lgamma Test "lgamma (-0.5) == log(2*sqrt(pi))": @@ -1158,9 +1196,9 @@ ldouble: 4 Function: "jn": double: 4 -float: 4 +float: 5 idouble: 4 -ifloat: 4 +ifloat: 5 ildouble: 4 ldouble: 4 From 22f7e902913d4a9af5cd927ee67e6413c1708f23 Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Fri, 17 Feb 2012 17:33:44 +0100 Subject: [PATCH 4226/4487] Fix dl-procinfo support for MIPS. --- ChangeLog.mips | 5 +++++ sysdeps/mips/dl-procinfo.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 8d3ea991a9..172d48da7f 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2012-02-17 Aurelien Jarno + + * sysdeps/mips/dl-procinfo.h(_DL_PLATFORMS_COUNT): define to 4, + matching the array in dl-procinfo.c. + 2012-02-17 Aurelien Jarno * sysdeps/mips/fpu/libm-test-ulps: Adjust ULPs for jn tests. diff --git a/sysdeps/mips/dl-procinfo.h b/sysdeps/mips/dl-procinfo.h index 35f7fb759b..3493d81dee 100644 --- a/sysdeps/mips/dl-procinfo.h +++ b/sysdeps/mips/dl-procinfo.h @@ -27,7 +27,7 @@ /* Mask to filter out platforms. */ #define _DL_HWCAP_PLATFORM (-1ULL) -#define _DL_PLATFORMS_COUNT 1 +#define _DL_PLATFORMS_COUNT 4 static inline const char * __attribute__ ((unused)) From b98de9639c5d161f9408cd88e654e0725fc54c1d Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Thu, 16 Feb 2012 12:06:54 -0800 Subject: [PATCH 4227/4487] alpha: Eliminate plt entries for __ieee_[sg]et_fp_control --- ChangeLog.alpha | 5 +++++ sysdeps/alpha/fpu/fenv_libc.h | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 5b98b1ec4b..b48d421078 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,8 @@ +2012-02-16 Richard Henderson + + * sysdeps/alpha/fpu/fenv_libc.h (__ieee_set_fp_control, + __ieee_get_fp_control): Mark as hidden proto. + 2012-02-15 Mike Hommey [BZ #11677] diff --git a/sysdeps/alpha/fpu/fenv_libc.h b/sysdeps/alpha/fpu/fenv_libc.h index f1d187d9e2..edcc654960 100644 --- a/sysdeps/alpha/fpu/fenv_libc.h +++ b/sysdeps/alpha/fpu/fenv_libc.h @@ -1,5 +1,5 @@ /* Internal libc stuff for floating point environment routines. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright (C) 2000, 2012 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 @@ -33,4 +33,8 @@ | SWCR_MAP_MASK \ | SWCR_STATUS_MASK) +/* These are declared for public consumption in . */ +libc_hidden_proto(__ieee_set_fp_control) +libc_hidden_proto(__ieee_get_fp_control) + #endif /* fenv_libc.h */ From 3287d4162fd765d905f19a8fc4847a455e71e3ff Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Mon, 20 Feb 2012 08:38:54 -0800 Subject: [PATCH 4228/4487] alpha: Fix _SC_LEVEL*CACHE* --- ChangeLog.alpha | 4 ++++ sysdeps/unix/sysv/linux/alpha/sysconf.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index b48d421078..e629a44cfe 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,7 @@ +2012-02-20 Aurelien Jarno + + * sysdeps/unix/sysv/linux/alpha/sysconf.c: Fix cache sysconf switch. + 2012-02-16 Richard Henderson * sysdeps/alpha/fpu/fenv_libc.h (__ieee_set_fp_control, diff --git a/sysdeps/unix/sysv/linux/alpha/sysconf.c b/sysdeps/unix/sysv/linux/alpha/sysconf.c index 51a2a47986..5623328c90 100644 --- a/sysdeps/unix/sysv/linux/alpha/sysconf.c +++ b/sysdeps/unix/sysv/linux/alpha/sysconf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2004 Free Software Foundation, Inc. +/* Copyright (C) 2004, 2012 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 @@ -135,7 +135,7 @@ __sysconf (int name) if (shape <= 0) return shape; - switch (name % 3) + switch ((name - _SC_LEVEL1_ICACHE_SIZE) % 3) { case 0: /* total size */ return shape & -0x100; From d6353c0f81b74f8bdecb76af3f36857cfe966754 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 19 Feb 2012 18:21:03 +0100 Subject: [PATCH 4229/4487] mips: Add support for Linux error EHWPOISON --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/bits/errno.h | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 172d48da7f..41239d71ff 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2012-02-20 Andreas Schwab + + * sysdeps/unix/sysv/linux/mips/bits/errno.h (EHWPOISON): Define if + not defined. + 2012-02-17 Aurelien Jarno * sysdeps/mips/dl-procinfo.h(_DL_PLATFORMS_COUNT): define to 4, diff --git a/sysdeps/unix/sysv/linux/mips/bits/errno.h b/sysdeps/unix/sysv/linux/mips/bits/errno.h index 62b952cdac..1cf339f0b6 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/errno.h +++ b/sysdeps/unix/sysv/linux/mips/bits/errno.h @@ -1,5 +1,5 @@ /* Error constants. MIPS/Linux specific version. - Copyright (C) 1996, 1997, 1998, 1999, 2000, 2006 + Copyright (C) 1996, 1997, 1998, 1999, 2000, 2006, 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -42,6 +42,10 @@ # define ERFKILL 167 # endif +# ifndef EHWPOISON +# define EHWPOISON 168 +# endif + # ifndef __ASSEMBLER__ /* Function to get address of global `errno' variable. */ extern int *__errno_location (void) __THROW __attribute__ ((__const__)); From f157a61945c5c576d0223020b351f666b0dc2886 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 19 Feb 2012 18:20:39 +0100 Subject: [PATCH 4230/4487] alpha: Add support for Linux error EHWPOISON --- ChangeLog.alpha | 7 +++++++ sysdeps/unix/sysv/linux/alpha/Versions | 4 ++++ sysdeps/unix/sysv/linux/alpha/bits/errno.h | 10 +++++++++- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index e629a44cfe..8d66469640 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,10 @@ +2012-02-20 Andreas Schwab + + * sysdeps/unix/sysv/linux/alpha/bits/errno.h (ERFKILL, EHWPOISON): + Define if not defined. + * sysdeps/unix/sysv/linux/alpha/Versions: Add new errlist compat + entry for 2.16. + 2012-02-20 Aurelien Jarno * sysdeps/unix/sysv/linux/alpha/sysconf.c: Fix cache sysconf switch. diff --git a/sysdeps/unix/sysv/linux/alpha/Versions b/sysdeps/unix/sysv/linux/alpha/Versions index 5a617b4be2..b3cec3a75f 100644 --- a/sysdeps/unix/sysv/linux/alpha/Versions +++ b/sysdeps/unix/sysv/linux/alpha/Versions @@ -81,6 +81,10 @@ libc { #errlist-compat 139 _sys_errlist; sys_errlist; _sys_nerr; sys_nerr; } + GLIBC_2.16 { + #errlist-compat 140 + _sys_errlist; sys_errlist; _sys_nerr; sys_nerr; + } GLIBC_PRIVATE { __libc_alpha_cache_shape; } diff --git a/sysdeps/unix/sysv/linux/alpha/bits/errno.h b/sysdeps/unix/sysv/linux/alpha/bits/errno.h index 8b2f152a1c..5c72a56cd2 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/errno.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/errno.h @@ -1,5 +1,5 @@ /* Error constants. Linux/Alpha specific version. - Copyright (C) 1996,1997,1998,1999,2002,2005 Free Software Foundation, Inc. + Copyright (C) 1996,1997,1998,1999,2002,2005,2012 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,6 +37,14 @@ # define ENOTRECOVERABLE 137 # endif +# ifndef ERFKILL +# define ERFKILL 138 +# endif + +# ifndef EHWPOISON +# define EHWPOISON 139 +# endif + # ifndef __ASSEMBLER__ /* Function to get address of global `errno' variable. */ extern int *__errno_location (void) __THROW __attribute__ ((__const__)); From 56526a6f75e09952a0ce1e62ad037d34f79bd3af Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 20 Feb 2012 18:16:28 +0100 Subject: [PATCH 4231/4487] Whitespace cleanup --- ChangeLog.alpha | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 8d66469640..aff39f09d3 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -7,7 +7,7 @@ 2012-02-20 Aurelien Jarno - * sysdeps/unix/sysv/linux/alpha/sysconf.c: Fix cache sysconf switch. + * sysdeps/unix/sysv/linux/alpha/sysconf.c: Fix cache sysconf switch. 2012-02-16 Richard Henderson @@ -21,8 +21,8 @@ 2012-02-15 Richard Henderson - * sysdeps/unix/sysv/linux/alpha/bits/signalfd.h: New file. - * sysdeps/unix/sysv/linux/alpha/sys/signalfd.h: Remove. + * sysdeps/unix/sysv/linux/alpha/bits/signalfd.h: New file. + * sysdeps/unix/sysv/linux/alpha/sys/signalfd.h: Remove. * sysdeps/unix/alpha/sysdep.h (syscall_promote): New. (inline_syscall0, inline_syscall1, inline_syscall2, @@ -58,8 +58,8 @@ 2012-02-13 Richard Henderson - * sysdeps/unix/sysv/linux/alpha/bits/eventfd.h: New file. - * sysdeps/unix/sysv/linux/alpha/sys/eventfd.h: Remove. + * sysdeps/unix/sysv/linux/alpha/bits/eventfd.h: New file. + * sysdeps/unix/sysv/linux/alpha/sys/eventfd.h: Remove. 2012-02-09 Richard Henderson @@ -169,7 +169,7 @@ 2010-05-03 Aurelien Jarno - [BZ #6827] + [BZ #6827] * sysdeps/alpha/dl-machine.h: Add dl-procinfo support. * sysdeps/alpha/dl-procinfo.c: New. * sysdeps/alpha/dl-procinfo.h: New. From 02bf118c08e98bceb47b20208c392c6aa840043e Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 20 Feb 2012 18:09:13 +0000 Subject: [PATCH 4232/4487] Resort ULPs file (Power soft-float) with gen-libm-test.pl -n in C locale. --- ChangeLog.powerpc | 5 ++ sysdeps/powerpc/nofpu/libm-test-ulps | 106 +++++++++++++-------------- 2 files changed, 57 insertions(+), 54 deletions(-) diff --git a/ChangeLog.powerpc b/ChangeLog.powerpc index 36a88d69d7..f258b4633f 100644 --- a/ChangeLog.powerpc +++ b/ChangeLog.powerpc @@ -1,3 +1,8 @@ +2012-02-20 Joseph Myers + + * sysdeps/powerpc/nofpu/libm-test-ulps: Resort with + gen-libm-test.pl -n in C locale. + 2010-09-03 Luis Machado * sysdeps/powerpc/dl-procinfo.c: New file. diff --git a/sysdeps/powerpc/nofpu/libm-test-ulps b/sysdeps/powerpc/nofpu/libm-test-ulps index c7d58be414..4d6b48a66a 100644 --- a/sysdeps/powerpc/nofpu/libm-test-ulps +++ b/sysdeps/powerpc/nofpu/libm-test-ulps @@ -11,6 +11,9 @@ ildouble: 2 ldouble: 2 # atan2 +Test "atan2 (-0.00756827042671106339, -.001792735857538728036) == -1.80338464113663849327153994379639112": +ildouble: 1 +ldouble: 1 Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025": float: 3 ifloat: 3 @@ -22,9 +25,6 @@ float: 1 ifloat: 1 ildouble: 1 ldouble: 1 -Test "atan2 (-0.00756827042671106339, -.001792735857538728036) == -1.80338464113663849327153994379639112": -ildouble: 1 -ldouble: 1 # atanh Test "atanh (0.75) == 0.972955074527656652552676371721589865": @@ -49,6 +49,9 @@ idouble: 1 ifloat: 1 # casin +Test "Real part of: casin (-2 - 3 i) == -0.57065278432109940071028387968566963 - 1.9833870299165354323470769028940395 i": +ildouble: 1 +ldouble: 1 Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": double: 1 float: 1 @@ -56,9 +59,6 @@ idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 -Test "Real part of: casin (-2 - 3 i) == -0.57065278432109940071028387968566963 - 1.9833870299165354323470769028940395 i": -ildouble: 1 -ldouble: 1 # casinh Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": @@ -156,8 +156,6 @@ ldouble: 1 Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": float: 1 ifloat: 1 -ildouble: 1 -ldouble: 1 ildouble: 2 ldouble: 2 @@ -165,14 +163,14 @@ ldouble: 2 Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": float: 1 ifloat: 1 -Test "Imaginary part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": -ildouble: 1 -ldouble: 1 Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": float: 1 ifloat: 1 ildouble: 2 ldouble: 2 +Test "Imaginary part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": +ildouble: 1 +ldouble: 1 # clog Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i": @@ -191,15 +189,15 @@ ldouble: 1 # clog10 Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i": -float: 1 -ifloat: 1 double: 1 -idouble: 1 -Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i": float: 1 +idouble: 1 ifloat: 1 +Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i": double: 1 +float: 1 idouble: 1 +ifloat: 1 Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i": double: 1 float: 5 @@ -208,75 +206,75 @@ ifloat: 5 ildouble: 1 ldouble: 1 Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i": -float: 1 -ifloat: 1 double: 1 +float: 1 idouble: 1 +ifloat: 1 ildouble: 1 ldouble: 1 Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i": -float: 1 -ifloat: 1 double: 1 -idouble: 1 -Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i": float: 1 +idouble: 1 ifloat: 1 +Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i": double: 1 +float: 1 idouble: 1 +ifloat: 1 Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i": +double: 1 float: 1 +idouble: 1 ifloat: 1 +Test "Imaginary part of: clog10 (-inf + inf i) == inf + 3/4 pi*log10(e) i": double: 1 idouble: 1 Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i": -float: 1 -ifloat: 1 double: 1 -idouble: 1 -Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i": float: 1 +idouble: 1 ifloat: 1 +Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i": double: 1 -idouble: 1 -Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i": float: 1 +idouble: 1 ifloat: 1 +Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i": double: 1 -idouble: 1 -Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i": float: 1 +idouble: 1 ifloat: 1 +Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i": double: 1 +float: 1 idouble: 1 +ifloat: 1 Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i": float: 1 ifloat: 1 ildouble: 3 ldouble: 3 Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i": -float: 1 -ifloat: 1 double: 1 -idouble: 1 -Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i": float: 1 -ifloat: 1 -double: 1 idouble: 1 -Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i": -float: 1 ifloat: 1 +Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i": double: 1 -idouble: 1 -Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i": float: 1 +idouble: 1 ifloat: 1 +Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i": double: 1 +float: 1 idouble: 1 -Test "Imaginary part of: clog10 (-inf + inf i) == inf + 3/4 pi*log10(e) i": +ifloat: 1 +Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i": double: 1 +float: 1 idouble: 1 +ifloat: 1 # cos Test "cos (M_PI_6l * 2.0) == 0.5": @@ -349,18 +347,18 @@ ldouble: 2 Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i": double: 1 idouble: 1 -ldouble: 1 ildouble: 1 +ldouble: 1 Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": float: 1 ifloat: 1 -ldouble: 1 ildouble: 1 +ldouble: 1 Test "Imaginary part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": float: 1 ifloat: 1 -ldouble: 1 ildouble: 1 +ldouble: 1 # csqrt Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": @@ -447,10 +445,10 @@ Test "expm1 (0.75) == 1.11700001661267466854536981983709561": double: 1 idouble: 1 Test "expm1 (1) == M_El - 1.0": -float: 1 -ifloat: 1 double: 1 +float: 1 idouble: 1 +ifloat: 1 # hypot Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271": @@ -471,15 +469,15 @@ ifloat: 1 Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 +Test "hypot (0.75, 1.25) == 1.45773797371132511771853821938639577": +ildouble: 1 +ldouble: 1 Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (0.75, 1.25) == 1.45773797371132511771853821938639577": -ildouble: 1 -ldouble: 1 # j0 Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1": @@ -651,16 +649,16 @@ Test "log10 (e) == log10(e)": float: 1 ifloat: 1 -# log2 -Test "log2 (e) == M_LOG2El": -ldouble: 1 -ildouble: 1 - # log1p Test "log1p (-0.25) == -0.287682072451780927439219005993827432": float: 1 ifloat: 1 +# log2 +Test "log2 (e) == M_LOG2El": +ildouble: 1 +ldouble: 1 + # sincos Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": double: 1 @@ -690,8 +688,8 @@ ldouble: 1 Test "tan (pi/4) == 1": double: 1 idouble: 1 -ldouble: 1 ildouble: 1 +ldouble: 1 # tanh Test "tanh (-0.75) == -0.635148952387287319214434357312496495": From 8864c99fe4432e4ec218ce4fe248061985f70230 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 21 Feb 2012 00:40:35 +0000 Subject: [PATCH 4233/4487] Replace MIPS sys/epoll.h and sys/timerfd.h with bits/epoll.h and bits/timerfd.h. --- ChangeLog.mips | 7 + sysdeps/unix/sysv/linux/mips/bits/epoll.h | 29 ++++ sysdeps/unix/sysv/linux/mips/bits/timerfd.h | 29 ++++ sysdeps/unix/sysv/linux/mips/sys/epoll.h | 145 -------------------- sysdeps/unix/sysv/linux/mips/sys/timerfd.h | 60 -------- 5 files changed, 65 insertions(+), 205 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/mips/bits/epoll.h create mode 100644 sysdeps/unix/sysv/linux/mips/bits/timerfd.h delete mode 100644 sysdeps/unix/sysv/linux/mips/sys/epoll.h delete mode 100644 sysdeps/unix/sysv/linux/mips/sys/timerfd.h diff --git a/ChangeLog.mips b/ChangeLog.mips index 41239d71ff..bcea57fb66 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,10 @@ +2012-02-21 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/epoll.h: New file. + * sysdeps/unix/sysv/linux/mips/bits/timerfd.h: Likewise. + * sysdeps/unix/sysv/linux/mips/sys/epoll.h: Remove. + * sysdeps/unix/sysv/linux/mips/sys/timerfd.h: Likewise. + 2012-02-20 Andreas Schwab * sysdeps/unix/sysv/linux/mips/bits/errno.h (EHWPOISON): Define if diff --git a/sysdeps/unix/sysv/linux/mips/bits/epoll.h b/sysdeps/unix/sysv/linux/mips/bits/epoll.h new file mode 100644 index 0000000000..4c6eb3bb73 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/bits/epoll.h @@ -0,0 +1,29 @@ +/* Copyright (C) 2002-2012 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, see + . */ + +#ifndef _SYS_EPOLL_H +# error "Never use directly; include instead." +#endif + +/* Flags to be passed to epoll_create1. */ +enum + { + EPOLL_CLOEXEC = 02000000, +#define EPOLL_CLOEXEC EPOLL_CLOEXEC + EPOLL_NONBLOCK = 00000200 +#define EPOLL_NONBLOCK EPOLL_NONBLOCK + }; diff --git a/sysdeps/unix/sysv/linux/mips/bits/timerfd.h b/sysdeps/unix/sysv/linux/mips/bits/timerfd.h new file mode 100644 index 0000000000..032735d015 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/bits/timerfd.h @@ -0,0 +1,29 @@ +/* Copyright (C) 2008-2012 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, see + . */ + +#ifndef _SYS_TIMERFD_H +# error "Never use directly; include instead." +#endif + +/* Bits to be set in the FLAGS parameter of `timerfd_create'. */ +enum + { + TFD_CLOEXEC = 02000000, +#define TFD_CLOEXEC TFD_CLOEXEC + TFD_NONBLOCK = 00000200 +#define TFD_NONBLOCK TFD_NONBLOCK + }; diff --git a/sysdeps/unix/sysv/linux/mips/sys/epoll.h b/sysdeps/unix/sysv/linux/mips/sys/epoll.h deleted file mode 100644 index 05b979bc6b..0000000000 --- a/sysdeps/unix/sysv/linux/mips/sys/epoll.h +++ /dev/null @@ -1,145 +0,0 @@ -/* Copyright (C) 2002-2006, 2007, 2008, 2011, 2012 - 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 _SYS_EPOLL_H -#define _SYS_EPOLL_H 1 - -#include -#include - -/* Get __sigset_t. */ -#include - -#ifndef __sigset_t_defined -# define __sigset_t_defined -typedef __sigset_t sigset_t; -#endif - - -/* Flags to be passed to epoll_create1. */ -enum - { - EPOLL_CLOEXEC = 02000000, -#define EPOLL_CLOEXEC EPOLL_CLOEXEC - EPOLL_NONBLOCK = 0200 -#define EPOLL_NONBLOCK EPOLL_NONBLOCK - }; - - -enum EPOLL_EVENTS - { - EPOLLIN = 0x001, -#define EPOLLIN EPOLLIN - EPOLLPRI = 0x002, -#define EPOLLPRI EPOLLPRI - EPOLLOUT = 0x004, -#define EPOLLOUT EPOLLOUT - EPOLLRDNORM = 0x040, -#define EPOLLRDNORM EPOLLRDNORM - EPOLLRDBAND = 0x080, -#define EPOLLRDBAND EPOLLRDBAND - EPOLLWRNORM = 0x100, -#define EPOLLWRNORM EPOLLWRNORM - EPOLLWRBAND = 0x200, -#define EPOLLWRBAND EPOLLWRBAND - EPOLLMSG = 0x400, -#define EPOLLMSG EPOLLMSG - EPOLLERR = 0x008, -#define EPOLLERR EPOLLERR - EPOLLHUP = 0x010, -#define EPOLLHUP EPOLLHUP - EPOLLRDHUP = 0x2000, -#define EPOLLRDHUP EPOLLRDHUP - EPOLLONESHOT = 1u << 30, -#define EPOLLONESHOT EPOLLONESHOT - EPOLLET = 1u << 31 -#define EPOLLET EPOLLET - }; - - -/* Valid opcodes ( "op" parameter ) to issue to epoll_ctl(). */ -#define EPOLL_CTL_ADD 1 /* Add a file descriptor to the interface. */ -#define EPOLL_CTL_DEL 2 /* Remove a file descriptor from the interface. */ -#define EPOLL_CTL_MOD 3 /* Change file descriptor epoll_event structure. */ - - -typedef union epoll_data -{ - void *ptr; - int fd; - uint32_t u32; - uint64_t u64; -} epoll_data_t; - -struct epoll_event -{ - uint32_t events; /* Epoll events */ - epoll_data_t data; /* User data variable */ -}; - - -__BEGIN_DECLS - -/* Creates an epoll instance. Returns an fd for the new instance. - The "size" parameter is a hint specifying the number of file - descriptors to be associated with the new instance. The fd - returned by epoll_create() should be closed with close(). */ -extern int epoll_create (int __size) __THROW; - -/* Same as epoll_create but with an FLAGS parameter. The unused SIZE - parameter has been dropped. */ -extern int epoll_create1 (int __flags) __THROW; - - -/* Manipulate an epoll instance "epfd". Returns 0 in case of success, - -1 in case of error ( the "errno" variable will contain the - specific error code ) The "op" parameter is one of the EPOLL_CTL_* - constants defined above. The "fd" parameter is the target of the - operation. The "event" parameter describes which events the caller - is interested in and any associated user data. */ -extern int epoll_ctl (int __epfd, int __op, int __fd, - struct epoll_event *__event) __THROW; - - -/* Wait for events on an epoll instance "epfd". Returns the number of - triggered events returned in "events" buffer. Or -1 in case of - error with the "errno" variable set to the specific error code. The - "events" parameter is a buffer that will contain triggered - events. The "maxevents" is the maximum number of events to be - returned ( usually size of "events" ). The "timeout" parameter - specifies the maximum wait time in milliseconds (-1 == infinite). - - This function is a cancellation point and therefore not marked with - __THROW. */ -extern int epoll_wait (int __epfd, struct epoll_event *__events, - int __maxevents, int __timeout); - - -/* Same as epoll_wait, but the thread's signal mask is temporarily - and atomically replaced with the one provided as parameter. - - This function is a cancellation point and therefore not marked with - __THROW. */ -extern int epoll_pwait (int __epfd, struct epoll_event *__events, - int __maxevents, int __timeout, - const __sigset_t *__ss); - -__END_DECLS - -#endif /* sys/epoll.h */ diff --git a/sysdeps/unix/sysv/linux/mips/sys/timerfd.h b/sysdeps/unix/sysv/linux/mips/sys/timerfd.h deleted file mode 100644 index 1238698d25..0000000000 --- a/sysdeps/unix/sysv/linux/mips/sys/timerfd.h +++ /dev/null @@ -1,60 +0,0 @@ -/* Copyright (C) 2008, 2012 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 _SYS_TIMERFD_H -#define _SYS_TIMERFD_H 1 - -#include - - -/* Bits to be set in the FLAGS parameter of `timerfd_create'. */ -enum - { - TFD_CLOEXEC = 02000000, -#define TFD_CLOEXEC TFD_CLOEXEC - TFD_NONBLOCK = 0200 -#define TFD_NONBLOCK TFD_NONBLOCK - }; - - -/* Bits to be set in the FLAGS parameter of `timerfd_settime'. */ -enum - { - TFD_TIMER_ABSTIME = 1 << 0 -#define TFD_TIMER_ABSTIME TFD_TIMER_ABSTIME - }; - - -__BEGIN_DECLS - -/* Return file descriptor for new interval timer source. */ -extern int timerfd_create (clockid_t __clock_id, int __flags) __THROW; - -/* Set next expiration time of interval timer source UFD to UTMR. If - FLAGS has the TFD_TIMER_ABSTIME flag set the timeout value is - absolute. Optionally return the old expiration time in OTMR. */ -extern int timerfd_settime (int __ufd, int __flags, - const struct itimerspec *__utmr, - struct itimerspec *__otmr) __THROW; - -/* Return the next expiration time of UFD. */ -extern int timerfd_gettime (int __ufd, struct itimerspec *__otmr) __THROW; - -__END_DECLS - -#endif /* sys/timerfd.h */ From 7ae95db5d7517789269eac2502a0b4f0f4be52ed Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 21 Feb 2012 08:48:08 -0800 Subject: [PATCH 4234/4487] alpha: Convert to bits/timerfd.h and bits/epoll.h. --- ChangeLog.alpha | 7 + sysdeps/unix/sysv/linux/alpha/bits/epoll.h | 29 ++++ sysdeps/unix/sysv/linux/alpha/bits/timerfd.h | 29 ++++ sysdeps/unix/sysv/linux/alpha/sys/epoll.h | 143 ------------------- sysdeps/unix/sysv/linux/alpha/sys/timerfd.h | 60 -------- 5 files changed, 65 insertions(+), 203 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/epoll.h create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/timerfd.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/sys/epoll.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/sys/timerfd.h diff --git a/ChangeLog.alpha b/ChangeLog.alpha index aff39f09d3..32e851528c 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,10 @@ +2012-02-21 Richard Henderson + + * sysdeps/unix/sysv/linux/alpha/bits/epoll.h: New file. + * sysdeps/unix/sysv/linux/alpha/bits/timerfd.h: Likewise. + * sysdeps/unix/sysv/linux/alpha/sys/epoll.h: Remove. + * sysdeps/unix/sysv/linux/alpha/sys/timerfd.h: Likewise. + 2012-02-20 Andreas Schwab * sysdeps/unix/sysv/linux/alpha/bits/errno.h (ERFKILL, EHWPOISON): diff --git a/sysdeps/unix/sysv/linux/alpha/bits/epoll.h b/sysdeps/unix/sysv/linux/alpha/bits/epoll.h new file mode 100644 index 0000000000..7f9f37497e --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/bits/epoll.h @@ -0,0 +1,29 @@ +/* Copyright (C) 2002-2012 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, see + . */ + +#ifndef _SYS_EPOLL_H +# error "Never use directly; include instead." +#endif + +/* Flags to be passed to epoll_create1. */ +enum + { + EPOLL_CLOEXEC = 010000000, +#define EPOLL_CLOEXEC EPOLL_CLOEXEC + EPOLL_NONBLOCK = 000000004 +#define EPOLL_NONBLOCK EPOLL_NONBLOCK + }; diff --git a/sysdeps/unix/sysv/linux/alpha/bits/timerfd.h b/sysdeps/unix/sysv/linux/alpha/bits/timerfd.h new file mode 100644 index 0000000000..f04833d3fd --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/bits/timerfd.h @@ -0,0 +1,29 @@ +/* Copyright (C) 2008-2012 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, see + . */ + +#ifndef _SYS_TIMERFD_H +# error "Never use directly; include instead." +#endif + +/* Bits to be set in the FLAGS parameter of `timerfd_create'. */ +enum + { + TFD_CLOEXEC = 010000000, +#define TFD_CLOEXEC TFD_CLOEXEC + TFD_NONBLOCK = 000000004 +#define TFD_NONBLOCK TFD_NONBLOCK + }; diff --git a/sysdeps/unix/sysv/linux/alpha/sys/epoll.h b/sysdeps/unix/sysv/linux/alpha/sys/epoll.h deleted file mode 100644 index 9f983a5156..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/sys/epoll.h +++ /dev/null @@ -1,143 +0,0 @@ -/* Copyright (C) 2002-2006, 2007, 2008 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 _SYS_EPOLL_H -#define _SYS_EPOLL_H 1 - -#include -#include - -/* Get __sigset_t. */ -#include - -#ifndef __sigset_t_defined -# define __sigset_t_defined -typedef __sigset_t sigset_t; -#endif - - -/* Flags to be passed to epoll_create2. */ -enum - { - EPOLL_CLOEXEC = 010000000, -#define EPOLL_CLOEXEC EPOLL_CLOEXEC - EPOLL_NONBLOCK = 04 -#define EPOLL_NONBLOCK EPOLL_NONBLOCK - }; - - -enum EPOLL_EVENTS - { - EPOLLIN = 0x001, -#define EPOLLIN EPOLLIN - EPOLLPRI = 0x002, -#define EPOLLPRI EPOLLPRI - EPOLLOUT = 0x004, -#define EPOLLOUT EPOLLOUT - EPOLLRDNORM = 0x040, -#define EPOLLRDNORM EPOLLRDNORM - EPOLLRDBAND = 0x080, -#define EPOLLRDBAND EPOLLRDBAND - EPOLLWRNORM = 0x100, -#define EPOLLWRNORM EPOLLWRNORM - EPOLLWRBAND = 0x200, -#define EPOLLWRBAND EPOLLWRBAND - EPOLLMSG = 0x400, -#define EPOLLMSG EPOLLMSG - EPOLLERR = 0x008, -#define EPOLLERR EPOLLERR - EPOLLHUP = 0x010, -#define EPOLLHUP EPOLLHUP - EPOLLRDHUP = 0x2000, -#define EPOLLRDHUP EPOLLRDHUP - EPOLLONESHOT = (1 << 30), -#define EPOLLONESHOT EPOLLONESHOT - EPOLLET = (1 << 31) -#define EPOLLET EPOLLET - }; - - -/* Valid opcodes ( "op" parameter ) to issue to epoll_ctl(). */ -#define EPOLL_CTL_ADD 1 /* Add a file descriptor to the interface. */ -#define EPOLL_CTL_DEL 2 /* Remove a file descriptor from the interface. */ -#define EPOLL_CTL_MOD 3 /* Change file descriptor epoll_event structure. */ - - -typedef union epoll_data -{ - void *ptr; - int fd; - uint32_t u32; - uint64_t u64; -} epoll_data_t; - -struct epoll_event -{ - uint32_t events; /* Epoll events */ - epoll_data_t data; /* User data variable */ -}; - - -__BEGIN_DECLS - -/* Creates an epoll instance. Returns an fd for the new instance. - The "size" parameter is a hint specifying the number of file - descriptors to be associated with the new instance. The fd - returned by epoll_create() should be closed with close(). */ -extern int epoll_create (int __size) __THROW; - -/* Same as epoll_create but with an additional FLAGS parameter. */ -extern int epoll_create2 (int __size, int __flags) __THROW; - - -/* Manipulate an epoll instance "epfd". Returns 0 in case of success, - -1 in case of error ( the "errno" variable will contain the - specific error code ) The "op" parameter is one of the EPOLL_CTL_* - constants defined above. The "fd" parameter is the target of the - operation. The "event" parameter describes which events the caller - is interested in and any associated user data. */ -extern int epoll_ctl (int __epfd, int __op, int __fd, - struct epoll_event *__event) __THROW; - - -/* Wait for events on an epoll instance "epfd". Returns the number of - triggered events returned in "events" buffer. Or -1 in case of - error with the "errno" variable set to the specific error code. The - "events" parameter is a buffer that will contain triggered - events. The "maxevents" is the maximum number of events to be - returned ( usually size of "events" ). The "timeout" parameter - specifies the maximum wait time in milliseconds (-1 == infinite). - - This function is a cancellation point and therefore not marked with - __THROW. */ -extern int epoll_wait (int __epfd, struct epoll_event *__events, - int __maxevents, int __timeout); - - -/* Same as epoll_wait, but the thread's signal mask is temporarily - and atomically replaced with the one provided as parameter. - - This function is a cancellation point and therefore not marked with - __THROW. */ -extern int epoll_pwait (int __epfd, struct epoll_event *__events, - int __maxevents, int __timeout, - __const __sigset_t *__ss); - -__END_DECLS - -#endif /* sys/epoll.h */ diff --git a/sysdeps/unix/sysv/linux/alpha/sys/timerfd.h b/sysdeps/unix/sysv/linux/alpha/sys/timerfd.h deleted file mode 100644 index 09d6ccf6cc..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/sys/timerfd.h +++ /dev/null @@ -1,60 +0,0 @@ -/* Copyright (C) 2008 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 _SYS_TIMERFD_H -#define _SYS_TIMERFD_H 1 - -#include - - -/* Bits to be set in the FLAGS parameter of `timerfd_create'. */ -enum - { - TFD_CLOEXEC = 010000000, -#define TFD_CLOEXEC TFD_CLOEXEC - TFD_NONBLOCK = 04 -#define TFD_NONBLOCK TFD_NONBLOCK - }; - - -/* Bits to be set in the FLAGS parameter of `timerfd_settime'. */ -enum - { - TFD_TIMER_ABSTIME = 1 << 0 -#define TFD_TIMER_ABSTIME TFD_TIMER_ABSTIME - }; - - -__BEGIN_DECLS - -/* Return file descriptor for new interval timer source. */ -extern int timerfd_create (clockid_t __clock_id, int __flags) __THROW; - -/* Set next expiration time of interval timer source UFD to UTMR. If - FLAGS has the TFD_TIMER_ABSTIME flag set the timeout value is - absolute. Optionally return the old expiration time in OTMR. */ -extern int timerfd_settime (int __ufd, int __flags, - __const struct itimerspec *__utmr, - struct itimerspec *__otmr) __THROW; - -/* Return the next expiration time of UFD. */ -extern int timerfd_gettime (int __ufd, struct itimerspec *__otmr) __THROW; - -__END_DECLS - -#endif /* sys/timerfd.h */ From 429ee403b87a92e05bef7a5ab2124d4de8d3cfaa Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 21 Feb 2012 17:32:26 +0000 Subject: [PATCH 4235/4487] Remove CRIS port. --- ChangeLog.cris | 5 + sysdeps/cris/Implies | 3 - sysdeps/cris/Makefile | 44 -- sysdeps/cris/__longjmp.S | 38 -- sysdeps/cris/_mcount.S | 36 -- sysdeps/cris/bits/endian.h | 7 - sysdeps/cris/bits/setjmp.h | 54 --- sysdeps/cris/bits/string.h | 26 -- sysdeps/cris/configure | 7 - sysdeps/cris/configure.in | 5 - sysdeps/cris/dl-machine.h | 392 ------------------ sysdeps/cris/elf/start.S | 141 ------- sysdeps/cris/machine-gmon.h | 28 -- sysdeps/cris/memcopy.h | 57 --- sysdeps/cris/memusage.h | 27 -- sysdeps/cris/setjmp.S | 66 --- sysdeps/cris/stackinfo.h | 28 -- sysdeps/cris/sysdep.h | 114 ----- sysdeps/cris/wordcopy.c | 1 - sysdeps/unix/sysv/linux/cris/_G_config.h | 106 ----- sysdeps/unix/sysv/linux/cris/bits/fcntl.h | 191 --------- sysdeps/unix/sysv/linux/cris/bits/mman.h | 97 ----- sysdeps/unix/sysv/linux/cris/brk.c | 44 -- sysdeps/unix/sysv/linux/cris/chown.c | 1 - sysdeps/unix/sysv/linux/cris/clone.S | 88 ---- sysdeps/unix/sysv/linux/cris/fchown.c | 1 - sysdeps/unix/sysv/linux/cris/fcntl.c | 1 - sysdeps/unix/sysv/linux/cris/fxstat.c | 1 - sysdeps/unix/sysv/linux/cris/getegid.c | 1 - sysdeps/unix/sysv/linux/cris/geteuid.c | 1 - sysdeps/unix/sysv/linux/cris/getgid.c | 1 - sysdeps/unix/sysv/linux/cris/getgroups.c | 2 - sysdeps/unix/sysv/linux/cris/getresgid.c | 1 - sysdeps/unix/sysv/linux/cris/getresuid.c | 1 - sysdeps/unix/sysv/linux/cris/getrlimit.c | 1 - sysdeps/unix/sysv/linux/cris/getrlimit64.c | 1 - sysdeps/unix/sysv/linux/cris/getuid.c | 1 - sysdeps/unix/sysv/linux/cris/lchown.c | 1 - sysdeps/unix/sysv/linux/cris/lockf64.c | 1 - sysdeps/unix/sysv/linux/cris/lxstat.c | 2 - sysdeps/unix/sysv/linux/cris/mmap.S | 68 --- sysdeps/unix/sysv/linux/cris/mmap64.S | 91 ---- sysdeps/unix/sysv/linux/cris/msgctl.c | 1 - sysdeps/unix/sysv/linux/cris/profil-counter.h | 26 -- sysdeps/unix/sysv/linux/cris/register-dump.h | 117 ------ sysdeps/unix/sysv/linux/cris/semctl.c | 1 - sysdeps/unix/sysv/linux/cris/setegid.c | 1 - sysdeps/unix/sysv/linux/cris/seteuid.c | 1 - sysdeps/unix/sysv/linux/cris/setfsgid.c | 1 - sysdeps/unix/sysv/linux/cris/setfsuid.c | 1 - sysdeps/unix/sysv/linux/cris/setgid.c | 1 - sysdeps/unix/sysv/linux/cris/setgroups.c | 2 - sysdeps/unix/sysv/linux/cris/setregid.c | 1 - sysdeps/unix/sysv/linux/cris/setresgid.c | 1 - sysdeps/unix/sysv/linux/cris/setresuid.c | 1 - sysdeps/unix/sysv/linux/cris/setreuid.c | 1 - sysdeps/unix/sysv/linux/cris/setrlimit.c | 1 - sysdeps/unix/sysv/linux/cris/setuid.c | 1 - sysdeps/unix/sysv/linux/cris/shmctl.c | 1 - sysdeps/unix/sysv/linux/cris/socket.S | 96 ----- sysdeps/unix/sysv/linux/cris/sys/ucontext.h | 56 --- sysdeps/unix/sysv/linux/cris/syscall.S | 40 -- sysdeps/unix/sysv/linux/cris/sysdep.S | 66 --- sysdeps/unix/sysv/linux/cris/sysdep.h | 226 ---------- sysdeps/unix/sysv/linux/cris/vfork.S | 27 -- sysdeps/unix/sysv/linux/cris/xstat.c | 1 - 66 files changed, 5 insertions(+), 2448 deletions(-) delete mode 100644 sysdeps/cris/Implies delete mode 100644 sysdeps/cris/Makefile delete mode 100644 sysdeps/cris/__longjmp.S delete mode 100644 sysdeps/cris/_mcount.S delete mode 100644 sysdeps/cris/bits/endian.h delete mode 100644 sysdeps/cris/bits/setjmp.h delete mode 100644 sysdeps/cris/bits/string.h delete mode 100755 sysdeps/cris/configure delete mode 100644 sysdeps/cris/configure.in delete mode 100644 sysdeps/cris/dl-machine.h delete mode 100644 sysdeps/cris/elf/start.S delete mode 100644 sysdeps/cris/machine-gmon.h delete mode 100644 sysdeps/cris/memcopy.h delete mode 100644 sysdeps/cris/memusage.h delete mode 100644 sysdeps/cris/setjmp.S delete mode 100644 sysdeps/cris/stackinfo.h delete mode 100644 sysdeps/cris/sysdep.h delete mode 100644 sysdeps/cris/wordcopy.c delete mode 100644 sysdeps/unix/sysv/linux/cris/_G_config.h delete mode 100644 sysdeps/unix/sysv/linux/cris/bits/fcntl.h delete mode 100644 sysdeps/unix/sysv/linux/cris/bits/mman.h delete mode 100644 sysdeps/unix/sysv/linux/cris/brk.c delete mode 100644 sysdeps/unix/sysv/linux/cris/chown.c delete mode 100644 sysdeps/unix/sysv/linux/cris/clone.S delete mode 100644 sysdeps/unix/sysv/linux/cris/fchown.c delete mode 100644 sysdeps/unix/sysv/linux/cris/fcntl.c delete mode 100644 sysdeps/unix/sysv/linux/cris/fxstat.c delete mode 100644 sysdeps/unix/sysv/linux/cris/getegid.c delete mode 100644 sysdeps/unix/sysv/linux/cris/geteuid.c delete mode 100644 sysdeps/unix/sysv/linux/cris/getgid.c delete mode 100644 sysdeps/unix/sysv/linux/cris/getgroups.c delete mode 100644 sysdeps/unix/sysv/linux/cris/getresgid.c delete mode 100644 sysdeps/unix/sysv/linux/cris/getresuid.c delete mode 100644 sysdeps/unix/sysv/linux/cris/getrlimit.c delete mode 100644 sysdeps/unix/sysv/linux/cris/getrlimit64.c delete mode 100644 sysdeps/unix/sysv/linux/cris/getuid.c delete mode 100644 sysdeps/unix/sysv/linux/cris/lchown.c delete mode 100644 sysdeps/unix/sysv/linux/cris/lockf64.c delete mode 100644 sysdeps/unix/sysv/linux/cris/lxstat.c delete mode 100644 sysdeps/unix/sysv/linux/cris/mmap.S delete mode 100644 sysdeps/unix/sysv/linux/cris/mmap64.S delete mode 100644 sysdeps/unix/sysv/linux/cris/msgctl.c delete mode 100644 sysdeps/unix/sysv/linux/cris/profil-counter.h delete mode 100644 sysdeps/unix/sysv/linux/cris/register-dump.h delete mode 100644 sysdeps/unix/sysv/linux/cris/semctl.c delete mode 100644 sysdeps/unix/sysv/linux/cris/setegid.c delete mode 100644 sysdeps/unix/sysv/linux/cris/seteuid.c delete mode 100644 sysdeps/unix/sysv/linux/cris/setfsgid.c delete mode 100644 sysdeps/unix/sysv/linux/cris/setfsuid.c delete mode 100644 sysdeps/unix/sysv/linux/cris/setgid.c delete mode 100644 sysdeps/unix/sysv/linux/cris/setgroups.c delete mode 100644 sysdeps/unix/sysv/linux/cris/setregid.c delete mode 100644 sysdeps/unix/sysv/linux/cris/setresgid.c delete mode 100644 sysdeps/unix/sysv/linux/cris/setresuid.c delete mode 100644 sysdeps/unix/sysv/linux/cris/setreuid.c delete mode 100644 sysdeps/unix/sysv/linux/cris/setrlimit.c delete mode 100644 sysdeps/unix/sysv/linux/cris/setuid.c delete mode 100644 sysdeps/unix/sysv/linux/cris/shmctl.c delete mode 100644 sysdeps/unix/sysv/linux/cris/socket.S delete mode 100644 sysdeps/unix/sysv/linux/cris/sys/ucontext.h delete mode 100644 sysdeps/unix/sysv/linux/cris/syscall.S delete mode 100644 sysdeps/unix/sysv/linux/cris/sysdep.S delete mode 100644 sysdeps/unix/sysv/linux/cris/sysdep.h delete mode 100644 sysdeps/unix/sysv/linux/cris/vfork.S delete mode 100644 sysdeps/unix/sysv/linux/cris/xstat.c diff --git a/ChangeLog.cris b/ChangeLog.cris index da1ad973f1..2f8cd7c4e3 100644 --- a/ChangeLog.cris +++ b/ChangeLog.cris @@ -1,3 +1,8 @@ +2012-02-21 Joseph Myers + + * sysdeps/cris: Remove. + * sysdeps/unix/sysv/linux/cris: Likewise. + 2011-10-05 Andreas Schwab * sysdeps/cris/dl-machine.h (elf_machine_rela) diff --git a/sysdeps/cris/Implies b/sysdeps/cris/Implies deleted file mode 100644 index 780c4e2467..0000000000 --- a/sysdeps/cris/Implies +++ /dev/null @@ -1,3 +0,0 @@ -wordsize-32 -ieee754/flt-32 -ieee754/dbl-64 diff --git a/sysdeps/cris/Makefile b/sysdeps/cris/Makefile deleted file mode 100644 index 1ecb78c3e0..0000000000 --- a/sysdeps/cris/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (C) 1999, 2000, 2001 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. - -# We don't support long doubles as a distinct type. We don't need to set -# this variable; it's here mostly for documentational purposes. - -long-double-fcts = no - -# FIXME: Note that this is a machine-specific stub; profiling is not -# implemented. -ifeq ($(subdir),gmon) -sysdep_routines += _mcount -endif - -# FIXME: This test seems generally bogus. Wrong types in function calls -# and assumes FE_TONEAREST is defined. Does it work somewhere? -# Presumably it does, so let's settle for filtering it out target-wise -# until it's agreed what should be done. -ifeq ($(subdir),math) -tests := $(filter-out test-fenv, $(tests)) -endif - -# PIC code must be assembled with special options, passed on by gcc when -# given the -fpic option. -ASFLAGS-.os = -fpic - -# Overflow occurs at 2**15/4 (8192) symbols. Glibc uses about 2000. -# So use -fpic: smaller-size relocs; smaller, faster code. -pic-ccflag = -fpic diff --git a/sysdeps/cris/__longjmp.S b/sysdeps/cris/__longjmp.S deleted file mode 100644 index cce27ca25e..0000000000 --- a/sysdeps/cris/__longjmp.S +++ /dev/null @@ -1,38 +0,0 @@ -/* longjmp for CRIS. - Copyright (C) 2001 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. */ - -#include -#define _SETJMP_H -#define _ASM -#include - - .syntax no_register_prefix - -/* Saving and restoring CCR is meaningless, so we don't do it. */ -ENTRY (__longjmp) - /* Note that r10 = jmp_buf, r11 = retval. */ - move [r10+16*4],srp - test.d r11 - beq 0f /* Already a 1 in place. */ - nop - /* Offset for r9, the return value (see setjmp). */ - move.d r11,[r10+6*4] -0: - movem [r10],pc -END (__longjmp) diff --git a/sysdeps/cris/_mcount.S b/sysdeps/cris/_mcount.S deleted file mode 100644 index a939131645..0000000000 --- a/sysdeps/cris/_mcount.S +++ /dev/null @@ -1,36 +0,0 @@ -/* Machine-specific calling sequence for `mcount' profiling function for CRIS. - Copyright (C) 2001 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. */ - -/* FIXME: This isn't implemented yet. This is just a machine-specific - stub. Perhaps a real implementation can make use of it. */ - -#include - -#undef CALL_MCOUNT -#define CALL_MCOUNT - -ENTRY (_mcount) - SETUP_PIC - /* Sorry, isn't implemented yet. - Can't call abort; that will recurse. Force SEGV instead. */ - test.d [99] -1: - ba 1b - nop -END (_mcount) diff --git a/sysdeps/cris/bits/endian.h b/sysdeps/cris/bits/endian.h deleted file mode 100644 index 034307e395..0000000000 --- a/sysdeps/cris/bits/endian.h +++ /dev/null @@ -1,7 +0,0 @@ -/* CRIS is little-endian. */ - -#ifndef _ENDIAN_H -# error "Never use directly; include instead." -#endif - -#define __BYTE_ORDER __LITTLE_ENDIAN diff --git a/sysdeps/cris/bits/setjmp.h b/sysdeps/cris/bits/setjmp.h deleted file mode 100644 index fa62a85deb..0000000000 --- a/sysdeps/cris/bits/setjmp.h +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (C) 1997, 1998, 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 - 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. */ - -/* Define the machine-dependent type `jmp_buf', CRIS version. */ - -/* Note that saving and restoring CCR has no meaning in user mode, so we - don't actually do it; the slot is now reserved. - - jmp_buf[0] - PC - jmp_buf[1] - SP (R14) - jmp_buf[2] - R13 - jmp_buf[3] - R12 - jmp_buf[4] - R11 - jmp_buf[5] - R10 - jmp_buf[6] - R9 - jmp_buf[7] - R8 - jmp_buf[8] - R7 - jmp_buf[9] - R6 - jmp_buf[10] - R5 - jmp_buf[11] - R4 - jmp_buf[12] - R3 - jmp_buf[13] - R2 - jmp_buf[14] - R1 - jmp_buf[15] - R0 - jmp_buf[16] - SRP - jmp_buf[17] - CCR */ - -#ifndef _ASM -typedef unsigned long int __jmp_buf[18]; -#endif - -#if defined (__USE_MISC) || defined (_ASM) -#define JB_SP 1 -#endif - -/* Test if longjmp to JMPBUF would unwind the frame - containing a local variable at ADDRESS. */ -#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \ - ((unsigned long int) (address) < demangle ((jmpbuf)[JB_SP])) diff --git a/sysdeps/cris/bits/string.h b/sysdeps/cris/bits/string.h deleted file mode 100644 index fa893d3653..0000000000 --- a/sysdeps/cris/bits/string.h +++ /dev/null @@ -1,26 +0,0 @@ -/* Optimized, inlined string functions. CRIS version. - Copyright (C) 1997, 2001 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 _STRING_H -# error "Never use directly; include instead." -#endif - -/* Currently the only purpose of this file is to tell the generic inline - macros that unaligned memory access is possible. */ -#define _STRING_ARCH_unaligned 1 diff --git a/sysdeps/cris/configure b/sysdeps/cris/configure deleted file mode 100755 index 205bbac85d..0000000000 --- a/sysdeps/cris/configure +++ /dev/null @@ -1,7 +0,0 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! - -libc_cv_asm_line_sep='@' -cat >>confdefs.h <<_ACEOF -#define ASM_LINE_SEP $libc_cv_asm_line_sep -_ACEOF - diff --git a/sysdeps/cris/configure.in b/sysdeps/cris/configure.in deleted file mode 100644 index 94bc13750b..0000000000 --- a/sysdeps/cris/configure.in +++ /dev/null @@ -1,5 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. - -dnl CRIS uses `;' to start comments and `@' for line separator. -libc_cv_asm_line_sep='@' -AC_DEFINE_UNQUOTED(ASM_LINE_SEP, $libc_cv_asm_line_sep) diff --git a/sysdeps/cris/dl-machine.h b/sysdeps/cris/dl-machine.h deleted file mode 100644 index cc3701e591..0000000000 --- a/sysdeps/cris/dl-machine.h +++ /dev/null @@ -1,392 +0,0 @@ -/* Machine-dependent ELF dynamic relocation inline functions. CRIS version. - Copyright (C) 1996-2001, 2002, 2003, 2011 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 dl_machine_h -#define dl_machine_h - -#define ELF_MACHINE_NAME "CRIS" - -#include - -#ifdef __PIC__ -# define CALL_FN(x) \ - "move.d $pc,$r9\n\t" \ - "add.d " #x " - .,$r9\n\t" \ - "jsr $r9" -#else -# define CALL_FN(x) "jsr " #x -#endif - -/* Return nonzero iff ELF header is compatible with the running host. */ - -static inline int -elf_machine_matches_host (const Elf32_Ehdr *ehdr) -{ - return ehdr->e_machine == EM_CRIS; -} - -/* Return the link-time address of _DYNAMIC. Conveniently, this is the - first element of the GOT. This must be inlined in a function which - uses global data. */ - -static inline Elf32_Addr -elf_machine_dynamic (void) -{ - /* Don't just set this to an asm variable "r0" since that's not logical - (like, the variable is uninitialized and the register is fixed) and - may make GCC trip over itself doing register allocation. Yes, I'm - paranoid. Why do you ask? */ - Elf32_Addr *got; - - __asm__ ("move.d $r0,%0" : "=rm" (got)); - return *got; -} - -/* Return the run-time load address of the shared object. We do it like - m68k and i386, by taking an arbitrary local symbol, forcing a GOT entry - for it, and peeking into the GOT table, which is set to the link-time - file-relative symbol value (regardless of whether the target is REL or - RELA). We subtract this link-time file-relative value from the "local" - value we calculate from GOT position and GOT offset. FIXME: Perhaps - there's some other symbol we could use, that we don't *have* to force a - GOT entry for. */ - -static inline Elf32_Addr -elf_machine_load_address (void) -{ - Elf32_Addr gotaddr_diff; - __asm__ ("sub.d [$r0+_dl_start:GOT16],$r0,%0\n\t" - "add.d _dl_start:GOTOFF,%0" : "=r" (gotaddr_diff)); - return gotaddr_diff; -} - -/* Set up the loaded object described by L so its unrelocated PLT - entries will jump to the on-demand fixup code in dl-runtime.c. */ - -static inline int -elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) -{ - Elf32_Addr *got; - extern void _dl_runtime_resolve (Elf32_Word); - extern void _dl_runtime_profile (Elf32_Word); - - if (l->l_info[DT_JMPREL] && lazy) - { - /* The GOT entries for functions in the PLT have not yet been - filled in. Their initial contents will arrange when called - to push an offset into the .rela.plt section, push - _GLOBAL_OFFSET_TABLE_[1], and then jump to - _GLOBAL_OFFSET_TABLE_[2]. */ - got = (Elf32_Addr *) D_PTR (l, l_info[DT_PLTGOT]); - got[1] = (Elf32_Addr) l; /* Identify this shared object. */ - - /* The got[2] entry contains the address of a function which gets - called to get the address of a so far unresolved function and - jump to it. The profiling extension of the dynamic linker allows - to intercept the calls to collect information. In this case we - don't store the address in the GOT so that all future calls also - end in this function. */ - if (__builtin_expect (profile, 0)) - { - got[2] = (Elf32_Addr) &_dl_runtime_profile; - - if (_dl_name_match_p (GL(dl_profile), l)) - { - /* This is the object we are looking for. Say that we really - want profiling and the timers are started. */ - GL(dl_profile_map) = l; - } - } - else - /* This function will get called to fix up the GOT entry indicated by - the offset on the stack, and then jump to the resolved address. */ - got[2] = (Elf32_Addr) &_dl_runtime_resolve; - } - - return lazy; -} - -/* This code is used in dl-runtime.c to call the `fixup' function - and then redirect to the address it returns. - - We get here with the offset into the relocation table pushed on stack, - and the link map in MOF. */ - -#define TRAMPOLINE_TEMPLATE(tramp_name, fixup_name) \ -"; Trampoline for " #fixup_name "\n\ - .globl " #tramp_name "\n\ - .type " #tramp_name ", @function\n\ -" #tramp_name ":\n\ - push $r13\n\ - push $r12\n\ - push $r11\n\ - push $r10\n\ - push $r9\n\ - push $srp\n\ - move.d [$sp+6*4],$r11\n\ - move $mof,$r10\n\ - " CALL_FN (fixup_name) "\n\ - move.d $r10,[$sp+6*4]\n\ - pop $srp\n\ - pop $r9\n\ - pop $r10\n\ - pop $r11\n\ - pop $r12\n\ - pop $r13\n\ - jump [$sp+]\n\ - .size " #tramp_name ", . - " #tramp_name "\n" -#ifndef PROF -#define ELF_MACHINE_RUNTIME_TRAMPOLINE \ -asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \ - TRAMPOLINE_TEMPLATE (_dl_runtime_profile, profile_fixup)); -#else -#define ELF_MACHINE_RUNTIME_TRAMPOLINE \ -asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \ - ".globl _dl_runtime_profile\n" \ - ".set _dl_runtime_profile, _dl_runtime_resolve"); -#endif - - -/* Mask identifying addresses reserved for the user program, - where the dynamic linker should not map anything. */ -#define ELF_MACHINE_USER_ADDRESS_MASK 0xf8000000UL - -/* Initial entry point code for the dynamic linker. - The C function `_dl_start' is the real entry point; - its return value is the user program's entry point. */ - -#define RTLD_START asm ("\ - .text\n\ - .globl _start\n\ - .type _start,@function\n\ -_start:\n\ - move.d $sp,$r10\n\ - " CALL_FN (_dl_start) "\n\ - /* FALLTHRU */\n\ -\n\ - .globl _dl_start_user\n\ - .type _dl_start_user,@function\n\ -_dl_start_user:\n\ - ; Save the user entry point address in R1.\n\ - move.d $r10,$r1\n\ - ; Point R0 at the GOT.\n\ - move.d $pc,$r0\n\ - sub.d .:GOTOFF,$r0\n\ - ; See if we were run as a command with the executable file\n\ - ; name as an extra leading argument.\n\ - move.d [$r0+_dl_skip_args:GOT16],$r13\n\ - move.d [$r13],$r9\n\ - ; Get the original argument count\n\ - move.d [$sp],$r11\n\ - ; Subtract _dl_skip_args from it.\n\ - sub.d $r9,$r11\n\ - ; Adjust the stack pointer to skip _dl_skip_args words.\n\ - addi $r9.d,$sp\n\ - ; Put the new argc in place as expected by the user entry.\n\ - move.d $r11,[$sp]\n\ - ; Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env)\n\ - ; env: skip scaled argc and skip stored argc and NULL at end of argv[].\n\ - move.d $sp,$r13\n\ - addi $r11.d,$r13\n\ - addq 8,$r13\n\ - ; argv: skip stored argc.\n\ - move.d $sp,$r12\n\ - addq 4,$r12\n\ - ; main_map: at _dl_loaded.\n\ - move.d [$r0+_rtld_local:GOT16],$r9\n\ - move.d [$r9],$r10\n\ - move.d _dl_init_internal:PLTG,$r9\n\ - add.d $r0,$r9\n\ - jsr $r9\n\ - ; Pass our finalizer function to the user in R10.\n\ - move.d [$r0+_dl_fini:GOT16],$r10\n\ - ; Terminate the frame-pointer.\n\ - moveq 0,$r8\n\ - ; Cause SEGV if user entry returns.\n\ - move $r8,$srp\n\ - ; Jump to the user's entry point.\n\ - jump $r1\n\ - .size _dl_start_user, . - _dl_start_user\n\ - .previous"); - -/* The union of reloc-type-classes where the reloc TYPE is a member. - - TYPE is in the class ELF_RTYPE_CLASS_PLT if it can describe a - relocation for a PLT entry, that is, for which a PLT entry should not - be allowed to define the value. The GNU linker for CRIS can merge a - .got.plt entry (R_CRIS_JUMP_SLOT) with a .got entry (R_CRIS_GLOB_DAT), - so we need to match both these reloc types. - - TYPE is in the class ELF_RTYPE_CLASS_NOCOPY if it should not be allowed - to resolve to one of the main executable's symbols, as for a COPY - reloc. */ -#define elf_machine_type_class(type) \ - ((((((type) == R_CRIS_JUMP_SLOT)) \ - || ((type) == R_CRIS_GLOB_DAT)) * ELF_RTYPE_CLASS_PLT) \ - | (((type) == R_CRIS_COPY) * ELF_RTYPE_CLASS_COPY)) - -/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */ -#define ELF_MACHINE_JMP_SLOT R_CRIS_JUMP_SLOT - -/* CRIS never uses Elf32_Rel relocations. */ -#define ELF_MACHINE_NO_REL 1 - -/* We define an initialization functions. This is called very early in - _dl_sysdep_start. */ -#define DL_PLATFORM_INIT dl_platform_init () - -static inline void __attribute__ ((unused)) -dl_platform_init (void) -{ - if (GL(dl_platform) != NULL && *GL(dl_platform) == '\0') - /* Avoid an empty string which would disturb us. */ - GL(dl_platform) = NULL; -} - -static inline Elf32_Addr -elf_machine_fixup_plt (struct link_map *map, lookup_t t, - const Elf32_Rela *reloc, - Elf32_Addr *reloc_addr, Elf32_Addr value) -{ - return *reloc_addr = value; -} - -/* Return the final value of a plt relocation. */ -static inline Elf32_Addr -elf_machine_plt_value (struct link_map *map, const Elf32_Rela *reloc, - Elf32_Addr value) -{ - return value + reloc->r_addend; -} - -#endif /* !dl_machine_h */ - -#ifdef RESOLVE - -/* Perform the relocation specified by RELOC and SYM (which is fully resolved). - MAP is the object containing the reloc. */ - -static inline void -elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, - const Elf32_Sym *sym, const struct r_found_version *version, - void *const reloc_addr_arg, int skip_ifunc) -{ - Elf32_Addr *const reloc_addr = reloc_addr_arg; - const unsigned int r_type = ELF32_R_TYPE (reloc->r_info); - - if (__builtin_expect (r_type == R_CRIS_RELATIVE, 0)) - *reloc_addr = map->l_addr + reloc->r_addend; - else - { -#ifndef RTLD_BOOTSTRAP - const Elf32_Sym *const refsym = sym; -#endif - Elf32_Addr value; - if (sym->st_shndx != SHN_UNDEF - && ELF32_ST_BIND (sym->st_info) == STB_LOCAL) - value = map->l_addr; - else - { - value = RESOLVE (&sym, version, r_type); - if (sym) - value += sym->st_value; - } - value += reloc->r_addend; /* Assume copy relocs have zero addend. */ - - switch (r_type) - { -#ifndef RTLD_BOOTSTRAP - case R_CRIS_COPY: - if (sym == NULL) - /* This can happen in trace mode if an object could not be - found. */ - break; - if (sym->st_size > refsym->st_size - || (GL(dl_verbose) && sym->st_size < refsym->st_size)) - { - const char *strtab; - - strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]); - _dl_error_printf ("\ -%s: Symbol `%s' has different size in shared object, consider re-linking\n", - rtld_progname ?: "", - strtab + refsym->st_name); - } - memcpy (reloc_addr_arg, (void *) value, - MIN (sym->st_size, refsym->st_size)); - break; - - case R_CRIS_32: -#endif - case R_CRIS_GLOB_DAT: - case R_CRIS_JUMP_SLOT: - *reloc_addr = value; - break; -#ifndef RTLD_BOOTSTRAP - case R_CRIS_8: - *(char *) reloc_addr = value; - break; - case R_CRIS_16: - *(short *) reloc_addr = value; - break; - case R_CRIS_8_PCREL: - *(char *) reloc_addr - = value + reloc->r_addend - (Elf32_Addr) reloc_addr - 1; - break; - case R_CRIS_16_PCREL: - *(short *) reloc_addr - = value + reloc->r_addend - (Elf32_Addr) reloc_addr - 2; - break; - case R_CRIS_32_PCREL: - *reloc_addr = value + reloc->r_addend - (Elf32_Addr) reloc_addr - 4; - break; -#endif - case R_CRIS_NONE: - break; -#if !defined RTLD_BOOTSTRAP || defined _NDEBUG - default: - _dl_reloc_bad_type (map, r_type, 0); - break; -#endif - } - } -} - -static inline void -elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, - void *const reloc_addr_arg) -{ - Elf32_Addr *const reloc_addr = reloc_addr_arg; - *reloc_addr = l_addr + reloc->r_addend; -} - -static inline void -elf_machine_lazy_rel (struct link_map *map, - Elf32_Addr l_addr, const Elf32_Rela *reloc, - int skip_ifunc) -{ - Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset); - const unsigned int r_type = ELF32_R_TYPE (reloc->r_info); - if (__builtin_expect (r_type == R_CRIS_JUMP_SLOT, 1)) - *reloc_addr += l_addr; - else - _dl_reloc_bad_type (map, r_type, 1); -} - -#endif /* RESOLVE */ diff --git a/sysdeps/cris/elf/start.S b/sysdeps/cris/elf/start.S deleted file mode 100644 index a3f85bcd01..0000000000 --- a/sysdeps/cris/elf/start.S +++ /dev/null @@ -1,141 +0,0 @@ -/* Startup code compliant to the ELF CRIS ABI (to-be-written). - Copyright (C) 2001, 2002 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. - - In addition to the permissions in the GNU Lesser General Public - License, the Free Software Foundation gives you unlimited - permission to link the compiled version of this file with other - programs, and to distribute those programs without any restriction - coming from the use of this file. (The GNU Lesser General Public - License restrictions do apply in other respects; for example, they - cover modification of the file, and distribution when not linked - into another program.) - - Note that people who make modified versions of this file are not - obligated to grant this special exception for their modified - versions; it is their choice whether to do so. The GNU Lesser - General Public License gives permission to release a modified - version without this exception; this exception also makes it - possible to release a modified version which carries forward this - exception. - - 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. */ - -#include - -/* This is the canonical entry point, usually the first thing in the text - segment. When the entry point runs, most registers' values are - unspecified, except for: - - R10 Contains a function pointer to be registered with `atexit'. - This is how the dynamic linker arranges to have DT_FINI - functions called for shared libraries that have been loaded - before this code runs. - - SP The stack contains the arguments and environment: - [SP] argc - [SP+4] argv[0] - ... - [SP+4*argc] NULL - [SP+4*(argc+1)] envp[0] - ... - NULL -*/ - - .syntax no_register_prefix - - .text - .globl _start - .type _start,@function -_start: - /* Clear the frame pointer, to mark the outermost frame. */ - moveq 0,r8 - - /* Move the shared library termination function to the right place - for __libc_main. */ - move.d r10,r9 - - /* Extract the arguments as encoded on the stack and set up the - arguments for `main': argc, argv. envp will be determined - later in __libc_start_main. */ - - /* Get the argument count. */ - move.d [sp],r11 - - /* Store the stack pointer as end of stack. We overwrite - the incoming argc. */ - move.d sp,[sp] - - /* The argument vector starts just after the argument count. */ - move.d sp,r12 - addq 4,r12 - - /* There are seven arguments to __libc_start_main: - r10: main - Address of it. - r11: argc - r12: argv - r13: init - Function to call. - - [sp]: fini - Function to register with atexit. - [sp+4]: rtld_fini - Another function to register with atexit. - [sp+8]: stack_end - Top of stack (actually same as argv). - - The last two are passed on stack. */ - - /* Store the fini function coming from the dynamic loader. */ - push r9 - - /* Get the addresses of our own entry points to `.fini' and - `.init'. */ - -#ifdef __PIC__ - /* If for some reason this program is compiled as PIC, set up R0. */ - move.d pc,r0 - sub.d .:GOTOFF,r0 - - move.d __libc_csu_init:PLTG,r13 - add.d r0,r13 - move.d __libc_csu_fini:PLTG,r9 - add.d r0,r9 - move.d main:PLTG,r10 - add.d r0,r10 -#else - move.d __libc_csu_init,r13 - move.d __libc_csu_fini,r9 - move.d main,r10 -#endif - push r9 - - /* Call the user's main function, and exit with its value. But - let the libc call main. */ - PLTCALL (__libc_start_main) - - /* Crash if somehow `exit' does return. We have at least 8192 - invalid addresses to choose from. */ - test.d [6502] - - /* Stop the unstoppable. */ -0: - ba 0b - nop - -/* Define a symbol for the first piece of initialized data. */ - .data - .globl __data_start -__data_start: - .long 0 - .weak data_start - data_start = __data_start diff --git a/sysdeps/cris/machine-gmon.h b/sysdeps/cris/machine-gmon.h deleted file mode 100644 index 2f36a34d67..0000000000 --- a/sysdeps/cris/machine-gmon.h +++ /dev/null @@ -1,28 +0,0 @@ -/* PowerPC-specific implementation of profiling support. - Copyright (C) 1997, 2001 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. */ - -void __mcount_internal (unsigned long frompc, unsigned long selfpc); - -#define _MCOUNT_DECL(frompc, selfpc) \ -void __mcount_internal (unsigned long frompc, unsigned long selfpc) - - -/* Define MCOUNT as empty since we have the implementation in another - file. FIXME: Just stubs, currently. */ -#define MCOUNT diff --git a/sysdeps/cris/memcopy.h b/sysdeps/cris/memcopy.h deleted file mode 100644 index 134d361217..0000000000 --- a/sysdeps/cris/memcopy.h +++ /dev/null @@ -1,57 +0,0 @@ -/* Copyright (C) 2001 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. */ - -#include - -/* We override the word-copying macros, partly because misalignment in one - pointer isn't cause for a special function, partly because we want to - get rid of wordcopy.c; these macros are only used in memmove.c (and - it's sibling bcopy) since we have arch-specific mempcpy, memcpy and - memset. */ - -#undef OP_T_THRES -#define OP_T_THRES OPSIZ - -#define WORD_COPY_FWD(dst_bp, src_bp, nbytes_left, nbytes) \ - do \ - { \ - unsigned long enddst_bp = dst_bp + nbytes - (nbytes % OPSIZ); \ - nbytes_left = (nbytes % OPSIZ); \ - while (dst_bp < (unsigned long) enddst_bp) \ - { \ - op_t x = *(op_t *) src_bp; \ - src_bp += sizeof x; \ - *(op_t *) dst_bp = x; \ - dst_bp += sizeof x; \ - } \ - } while (0) - -#define WORD_COPY_BWD(dst_bp, src_bp, nbytes_left, nbytes) \ - do \ - { \ - unsigned long enddst_bp = dst_bp - nbytes + (nbytes % OPSIZ); \ - nbytes_left = (nbytes % OPSIZ); \ - while (dst_bp > enddst_bp) \ - { \ - op_t x; \ - src_bp -= sizeof x; \ - x = *(op_t *) src_bp; \ - dst_bp -= sizeof x; \ - *(op_t *) dst_bp = x; \ - } \ - } while (0) diff --git a/sysdeps/cris/memusage.h b/sysdeps/cris/memusage.h deleted file mode 100644 index 58b57ff370..0000000000 --- a/sysdeps/cris/memusage.h +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 2001 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. */ - -/* No asm variables, just for reasons of solid healthy paranoia. */ -#define GETSP() \ - ({ \ - uintptr_t stack_ptr; \ - __asm__ ("move.d $sp,%0" : "=rm" (stack_ptr)); \ - stack_ptr; \ - }) - -#include diff --git a/sysdeps/cris/setjmp.S b/sysdeps/cris/setjmp.S deleted file mode 100644 index c5a512f49b..0000000000 --- a/sysdeps/cris/setjmp.S +++ /dev/null @@ -1,66 +0,0 @@ -/* setjmp for CRIS. - Copyright (C) 2001 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. */ - -#include -#define _SETJMP_H -#define _ASM -#include - - .syntax no_register_prefix - -ENTRY (__sigsetjmp) -.Local__sigsetjmp: - moveq 1,r9 - movem sp,[r10+1*4] -#ifdef __PIC__ - move.d pc,r9 - addq 0f-.,r9 -#else - move.d 0f,r9 -#endif - move.d r9,[r10] - move srp,[r10+16*4] - move ccr,[r10+17*4] - PLTJUMP (__sigjmp_save) -0: /* This is where longjmp returns. (Don't use "ret" - it's a macro. */ - Ret - move.d r9,r10 -END (__sigsetjmp) - -/* Binary compatibility entry points. Having these in separate files - is not meaningful and just adds library overhead. */ - -ENTRY (__setjmp) - ba .Local__sigsetjmp - moveq 0,r11 -END (__setjmp) - -ENTRY (_setjmp) - ba .Local__sigsetjmp - moveq 0,r11 -END (_setjmp) - -ENTRY (setjmp) - ba .Local__sigsetjmp - moveq 1,r11 -END (setjmp) - -weak_extern (__setjmp) -weak_extern (_setjmp) -weak_extern (setjmp) diff --git a/sysdeps/cris/stackinfo.h b/sysdeps/cris/stackinfo.h deleted file mode 100644 index 43c944834f..0000000000 --- a/sysdeps/cris/stackinfo.h +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2002 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. */ - -/* This file contains a bit of information about the stack allocation - of the processor. */ - -#ifndef _STACKINFO_H -#define _STACKINFO_H 1 - -/* On cris the stack grows down. */ -#define _STACK_GROWS_DOWN 1 - -#endif /* stackinfo.h */ diff --git a/sysdeps/cris/sysdep.h b/sysdeps/cris/sysdep.h deleted file mode 100644 index 913d5ad9b7..0000000000 --- a/sysdeps/cris/sysdep.h +++ /dev/null @@ -1,114 +0,0 @@ -/* Assembler macros for CRIS. - Copyright (C) 1999, 2000, 2001 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. */ - -#include - -#ifndef HAVE_ELF -# error ELF is assumed. Generalize the code and retry. -#endif - -#ifndef NO_UNDERSCORES -# error User-label prefix (underscore) assumed absent. Generalize the code and retry. -#endif - -#ifdef __ASSEMBLER__ - -/* Syntactic details of assembly-code. */ - -/* It is *not* generally true that "ELF uses byte-counts for .align, most - others use log2 of count of bytes", like some neighboring configs say. - See "align" in gas/read.c which is not overridden by - gas/config/obj-elf.c. It takes a log2 argument. *Some* targets - override it to take a byte argument. People should read source instead - of relying on hearsay. */ -# define ALIGNARG(log2) log2 - -# define ASM_TYPE_DIRECTIVE(name,typearg) .type name,typearg -# define ASM_SIZE_DIRECTIVE(name) .size name,.-name - -/* The non-PIC jump is preferred, since it does not stall, and does not - invoke generation of a PLT. These macros assume that $r0 is set up as - GOT register. */ -# ifdef __PIC__ -# define PLTJUMP(_x) \ - add.d C_SYMBOL_NAME (_x):PLT,$pc - -# define PLTCALL(_x) \ - move.d C_SYMBOL_NAME (_x):PLTG,$r9 @ \ - add.d $r0,$r9 @ \ - jsr $r9 - -# define SETUP_PIC \ - push $r0 @ \ - move.d $pc,$r0 @ \ - sub.d .:GOTOFF,$r0 - -# define TEARDOWN_PIC pop $r0 -# else -# define PLTJUMP(_x) jump C_SYMBOL_NAME (_x) -# define PLTCALL(_x) jsr C_SYMBOL_NAME (_x) -# define SETUP_PIC -# define TEARDOWN_PIC -# endif - -/* Define an entry point visible from C. */ -# define ENTRY(name) \ - .text @ \ - ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (name) @ \ - ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME (name), function) @ \ - .align ALIGNARG (2) @ \ - C_LABEL(name) @ \ - CALL_MCOUNT - -# undef END -# define END(name) \ - ASM_SIZE_DIRECTIVE (C_SYMBOL_NAME (name)) - -/* If compiled for profiling, call `mcount' at the start of each function. - FIXME: Note that profiling is not actually implemented. This is just - example code which might not even compile, though it is believed to be - correct. */ -# ifdef PROF -# define CALL_MCOUNT \ - push $srp @ \ - push $r9 @ \ - push $r10 @ \ - push $r11 @ \ - push $r12 @ \ - push $r13 @ \ - SETUP_PIC @ \ - PLTCALL (mcount) @ \ - TEARDOWN_PIC @ \ - pop $r13 @ \ - pop $r12 @ \ - pop $r11 @ \ - pop $r10 @ \ - pop $r9 @ \ - pop $srp -# else -# define CALL_MCOUNT /* Do nothing. */ -# endif - -/* Since C identifiers are not normally prefixed with an underscore - on this system, the asm identifier `syscall_error' intrudes on the - C name space. Make sure we use an innocuous name. */ -# define syscall_error __syscall_error -# define mcount _mcount - -#endif /* __ASSEMBLER__ */ diff --git a/sysdeps/cris/wordcopy.c b/sysdeps/cris/wordcopy.c deleted file mode 100644 index 6525e9f035..0000000000 --- a/sysdeps/cris/wordcopy.c +++ /dev/null @@ -1 +0,0 @@ -/* Empty; not needed. */ diff --git a/sysdeps/unix/sysv/linux/cris/_G_config.h b/sysdeps/unix/sysv/linux/cris/_G_config.h deleted file mode 100644 index 083a00abfb..0000000000 --- a/sysdeps/unix/sysv/linux/cris/_G_config.h +++ /dev/null @@ -1,106 +0,0 @@ -/* This file is needed by libio to define various configuration parameters. - These are always the same in the GNU C library. */ - -/* We have to keep a separate copy for CRIS, because we don't use thunks, - and libstdc++-v2 (which we currently use) cares. The C++ ABI is - changed totally with GCC 3.0, where we should not need a separate file. */ - -#ifndef _G_config_h -#define _G_config_h 1 - -/* Define types for libio in terms of the standard internal type names. */ - -#include -#define __need_size_t -#define __need_wchar_t -#define __need_wint_t -#define __need_NULL -#include -#ifndef _WINT_T -/* Integral type unchanged by default argument promotions that can - hold any value corresponding to members of the extended character - set, as well as at least one value that does not correspond to any - member of the extended character set. */ -# define _WINT_T -typedef unsigned int wint_t; -#endif -#define __need_mbstate_t -#include -#define _G_size_t size_t -typedef struct -{ - __off_t __pos; - __mbstate_t __state; -} _G_fpos_t; -typedef struct -{ - __off64_t __pos; - __mbstate_t __state; -} _G_fpos64_t; -#define _G_ssize_t __ssize_t -#define _G_off_t __off_t -#define _G_off64_t __off64_t -#define _G_pid_t __pid_t -#define _G_uid_t __uid_t -#define _G_wchar_t wchar_t -#define _G_wint_t wint_t -#define _G_stat64 stat64 -#include -typedef union -{ - struct __gconv_info __cd; - struct - { - struct __gconv_info __cd; - struct __gconv_step_data __data; - } __combined; -} _G_iconv_t; - -typedef int _G_int16_t __attribute__ ((__mode__ (__HI__))); -typedef int _G_int32_t __attribute__ ((__mode__ (__SI__))); -typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__))); -typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__))); - -#define _G_HAVE_BOOL 1 - - -/* These library features are always available in the GNU C library. */ -#define _G_HAVE_ATEXIT 1 -#define _G_HAVE_SYS_CDEFS 1 -#define _G_HAVE_SYS_WAIT 1 -#define _G_NEED_STDARG_H 1 -#define _G_va_list __gnuc_va_list - -#define _G_HAVE_PRINTF_FP 1 -#define _G_HAVE_MMAP 1 -#define _G_HAVE_LONG_DOUBLE_IO 1 -#define _G_HAVE_IO_FILE_OPEN 1 -#define _G_HAVE_IO_GETLINE_INFO 1 - -#define _G_IO_IO_FILE_VERSION 0x20001 - -#define _G_OPEN64 __open64 -#define _G_LSEEK64 __lseek64 -#define _G_MMAP64 __mmap64 -#define _G_FSTAT64(fd,buf) __fxstat64 (_STAT_VER, fd, buf) - -/* This is defined by if `st_blksize' exists. */ -#define _G_HAVE_ST_BLKSIZE defined (_STATBUF_ST_BLKSIZE) - -#define _G_BUFSIZ 8192 - -/* These are the vtbl details for ELF. */ -#define _G_NAMES_HAVE_UNDERSCORE 0 -#define _G_VTABLE_LABEL_HAS_LENGTH 1 -#undef _G_USING_THUNKS -#define _G_VTABLE_LABEL_PREFIX "_vt." -#define _G_VTABLE_LABEL_PREFIX_ID _vt. - - -#if defined __cplusplus || defined __STDC__ -# define _G_ARGS(ARGLIST) ARGLIST -#else -# define _G_ARGS(ARGLIST) () -#endif - -#endif /* _G_config.h */ diff --git a/sysdeps/unix/sysv/linux/cris/bits/fcntl.h b/sysdeps/unix/sysv/linux/cris/bits/fcntl.h deleted file mode 100644 index e14ca2536b..0000000000 --- a/sysdeps/unix/sysv/linux/cris/bits/fcntl.h +++ /dev/null @@ -1,191 +0,0 @@ -/* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001, 2004 - 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 _FCNTL_H -# error "Never use directly; include instead." -#endif - - -#include - -/* open/fcntl - O_SYNC is only implemented on blocks devices and on files - located on an ext2 file system */ -#define O_ACCMODE 0003 -#define O_RDONLY 00 -#define O_WRONLY 01 -#define O_RDWR 02 -#define O_CREAT 0100 /* not fcntl */ -#define O_EXCL 0200 /* not fcntl */ -#define O_NOCTTY 0400 /* not fcntl */ -#define O_TRUNC 01000 /* not fcntl */ -#define O_APPEND 02000 -#define O_NONBLOCK 04000 -#define O_NDELAY O_NONBLOCK -#define O_SYNC 010000 -#define O_FSYNC O_SYNC -#define O_ASYNC 020000 - -#ifdef __USE_GNU -# define O_DIRECT 040000 /* Direct disk access. */ -# define O_DIRECTORY 0200000 /* Must be a directory. */ -# define O_NOFOLLOW 0400000 /* Do not follow links. */ -# define O_NOATIME 01000000 /* Do not set atime. */ -#endif - -/* For now Linux has synchronisity options for data and read operations. - We define the symbols here but let them do the same as O_SYNC since - this is a superset. */ -#if defined __USE_POSIX199309 || defined __USE_UNIX98 -# define O_DSYNC O_SYNC /* Synchronize data. */ -# define O_RSYNC O_SYNC /* Synchronize read operations. */ -#endif - -#ifdef __USE_LARGEFILE64 -# define O_LARGEFILE 0100000 -#endif - -/* Values for the second argument to `fcntl'. */ -#define F_DUPFD 0 /* Duplicate file descriptor. */ -#define F_GETFD 1 /* Get file descriptor flags. */ -#define F_SETFD 2 /* Set file descriptor flags. */ -#define F_GETFL 3 /* Get file status flags. */ -#define F_SETFL 4 /* Set file status flags. */ -#ifndef __USE_FILE_OFFSET64 -# define F_GETLK 5 /* Get record locking info. */ -# define F_SETLK 6 /* Set record locking info (non-blocking). */ -# define F_SETLKW 7 /* Set record locking info (blocking). */ -#else -# define F_GETLK F_GETLK64 /* Get record locking info. */ -# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/ -# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */ -#endif -#define F_GETLK64 12 /* Get record locking info. */ -#define F_SETLK64 13 /* Set record locking info (non-blocking). */ -#define F_SETLKW64 14 /* Set record locking info (blocking). */ - -#if defined __USE_BSD || defined __USE_UNIX98 -# define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */ -# define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */ -#endif - -#ifdef __USE_GNU -# define F_SETSIG 10 /* Set number of signal to be sent. */ -# define F_GETSIG 11 /* Get number of signal to be sent. */ -#endif - -#ifdef __USE_GNU -# 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. */ -#endif - -/* 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(). */ -#define F_RDLCK 0 /* Read lock. */ -#define F_WRLCK 1 /* Write lock. */ -#define F_UNLCK 2 /* Remove lock. */ - -/* For old implementation of bsd flock(). */ -#define F_EXLCK 4 /* or 3 */ -#define F_SHLCK 8 /* or 4 */ - -#ifdef __USE_BSD -/* Operations for bsd flock(), also used by the kernel implementation. */ -# define LOCK_SH 1 /* shared lock */ -# define LOCK_EX 2 /* exclusive lock */ -# define LOCK_NB 4 /* or'd with one of the above to prevent - blocking */ -# define LOCK_UN 8 /* remove lock */ -#endif - -#ifdef __USE_GNU -# define LOCK_MAND 32 /* This is a mandatory flock: */ -# define LOCK_READ 64 /* ... which allows concurrent read operations. */ -# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */ -# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */ -#endif - -#ifdef __USE_GNU -/* Types of directory notifications that may be requested with F_NOTIFY. */ -# define DN_ACCESS 0x00000001 /* File accessed. */ -# define DN_MODIFY 0x00000002 /* File modified. */ -# define DN_CREATE 0x00000004 /* File created. */ -# define DN_DELETE 0x00000008 /* File removed. */ -# define DN_RENAME 0x00000010 /* File renamed. */ -# define DN_ATTRIB 0x00000020 /* File changed attibutes. */ -# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */ -#endif - -struct flock - { - short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ - short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ -#ifndef __USE_FILE_OFFSET64 - __off_t l_start; /* Offset where the lock begins. */ - __off_t l_len; /* Size of the locked area; zero means until EOF. */ -#else - __off64_t l_start; /* Offset where the lock begins. */ - __off64_t l_len; /* Size of the locked area; zero means until EOF. */ -#endif - __pid_t l_pid; /* Process holding the lock. */ - }; - -#ifdef __USE_LARGEFILE64 -struct flock64 - { - short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ - short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ - __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. */ - }; -#endif - -/* Define some more compatibility macros to be backward compatible with - BSD systems which did not managed to hide these kernel macros. */ -#ifdef __USE_BSD -# define FAPPEND O_APPEND -# define FFSYNC O_FSYNC -# define FASYNC O_ASYNC -# define FNONBLOCK O_NONBLOCK -# define FNDELAY O_NDELAY -#endif /* Use BSD. */ - -/* Advise to `posix_fadvise'. */ -#ifdef __USE_XOPEN2K -# define POSIX_FADV_NORMAL 0 /* No further special treatment. */ -# define POSIX_FADV_RANDOM 1 /* Expect random page references. */ -# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */ -# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */ -# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ -#endif - -__BEGIN_DECLS - -/* Provide kernel hint to read ahead. */ -extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count) - __THROW; - -__END_DECLS diff --git a/sysdeps/unix/sysv/linux/cris/bits/mman.h b/sysdeps/unix/sysv/linux/cris/bits/mman.h deleted file mode 100644 index b66c0bdb68..0000000000 --- a/sysdeps/unix/sysv/linux/cris/bits/mman.h +++ /dev/null @@ -1,97 +0,0 @@ -/* Definitions for POSIX memory map interface. Linux/CRIS version. - Copyright (C) 1997, 2000, 2001, 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 _SYS_MMAN_H -# error "Never use directly; include instead." -#endif - -/* The following definitions basically come from the kernel headers. - But the kernel header is not namespace clean. */ - - -/* Protections are chosen from these bits, OR'd together. The - implementation does not necessarily support PROT_EXEC or PROT_WRITE - without PROT_READ. The only guarantees are that no writing will be - allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ - -#define PROT_READ 0x1 /* Page can be read. */ -#define PROT_WRITE 0x2 /* Page can be written. */ -#define PROT_EXEC 0x4 /* Page can be executed. */ -#define PROT_NONE 0x0 /* Page can not be accessed. */ -#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of - growsdown vma (mprotect only). */ -#define PROT_GROWSUP 0x02000000 /* Extend change to start of - growsup vma (mprotect only). */ - -/* Sharing types (must choose one and only one of these). */ -#define MAP_SHARED 0x01 /* Share changes. */ -#define MAP_PRIVATE 0x02 /* Changes are private. */ -#ifdef __USE_MISC -# define MAP_TYPE 0x0f /* Mask for type of mapping. */ -#endif - -/* Other flags. */ -#define MAP_FIXED 0x10 /* Interpret addr exactly. */ -#ifdef __USE_MISC -# define MAP_FILE 0 -# define MAP_ANONYMOUS 0x20 /* Don't use a file. */ -# define MAP_ANON MAP_ANONYMOUS -#endif - -/* These are Linux-specific. */ -#ifdef __USE_MISC -# define MAP_GROWSDOWN 0x0100 /* Stack-like segment. */ -# define MAP_DENYWRITE 0x0800 /* ETXTBSY */ -# define MAP_EXECUTABLE 0x1000 /* Mark it as an executable. */ -# define MAP_LOCKED 0x2000 /* Lock the mapping. */ -# define MAP_NORESERVE 0x4000 /* Don't check for reservations. */ -#endif - -/* Flags to `msync'. */ -#define MS_ASYNC 1 /* Sync memory asynchronously. */ -#define MS_SYNC 4 /* Synchronous memory sync. */ -#define MS_INVALIDATE 2 /* Invalidate the caches. */ - -/* Flags for `mlockall'. */ -#define MCL_CURRENT 1 /* Lock all currently mapped pages. */ -#define MCL_FUTURE 2 /* Lock all additions to address - space. */ - -/* Flags for `mremap'. */ -#ifdef __USE_GNU -# define MREMAP_MAYMOVE 1 -#endif - -/* Advice to `madvise'. */ -#ifdef __USE_BSD -# define MADV_NORMAL 0 /* No further special treatment. */ -# define MADV_RANDOM 1 /* Expect random page references. */ -# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define MADV_WILLNEED 3 /* Will need these pages. */ -# define MADV_DONTNEED 4 /* Don't need these pages. */ -#endif - -/* The POSIX people had to invent similar names for the same things. */ -#ifdef __USE_XOPEN2K -# define POSIX_MADV_NORMAL 0 /* No further special treatment. */ -# define POSIX_MADV_RANDOM 1 /* Expect random page references. */ -# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */ -# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */ -#endif diff --git a/sysdeps/unix/sysv/linux/cris/brk.c b/sysdeps/unix/sysv/linux/cris/brk.c deleted file mode 100644 index ce49445122..0000000000 --- a/sysdeps/unix/sysv/linux/cris/brk.c +++ /dev/null @@ -1,44 +0,0 @@ -/* brk system call for Linux/CRIS. - Copyright (C) 1995, 1996, 2001 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. */ - -#include -#include -#include - -/* This must be initialized data because commons can't have aliases. */ -void *__curbrk = 0; - -int -__brk (void *addr) -{ - unsigned char *newbrk; - - newbrk = (unsigned char *) INLINE_SYSCALL (brk, 1, addr); - - __curbrk = newbrk; - - if (newbrk < (unsigned char *) addr) - { - __set_errno (ENOMEM); - return -1; - } - - return 0; -} -weak_alias (__brk, brk) diff --git a/sysdeps/unix/sysv/linux/cris/chown.c b/sysdeps/unix/sysv/linux/cris/chown.c deleted file mode 100644 index 1961622564..0000000000 --- a/sysdeps/unix/sysv/linux/cris/chown.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/cris/clone.S b/sysdeps/unix/sysv/linux/cris/clone.S deleted file mode 100644 index b2016438a3..0000000000 --- a/sysdeps/unix/sysv/linux/cris/clone.S +++ /dev/null @@ -1,88 +0,0 @@ -/* Copyright (C) 2001 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. */ - -#include -#define _ERRNO_H 1 -#include - -/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg); */ - - .syntax no_register_prefix - - .text -ENTRY (__clone) - /* Sanity check arguments: No NULL function pointers. Allow a NULL - stack pointer though; it makes the kernel allocate stack. */ - test.d r10 - beq 1f - nop - - /* We need to muck with a few registers. */ - movem r1,[sp=sp-8] - - /* Save the function pointer and argument. We can't save them - onto the new stack since it can be NULL. */ - move.d r10,r0 - move.d r13,r1 - - /* Move the other arguments into place for the system call. */ - move.d r11,r10 - move.d r12,r11 - - /* Do the system call. */ - movu.w SYS_ify (clone),r9 - break 13 - test.d r10 - beq .Lthread_start - nop - - /* Jump to error handler if we get (unsigned) -4096 .. 0xffffffff. */ - cmps.w -4096,r10 - bhs 0f - movem [sp+],r1 - - /* In parent, successful return. (Avoid using "ret" - it's a macro.) */ - Ret - nop - -.Lthread_start: - /* Terminate frame pointers here. */ - moveq 0,r8 - - /* I've told you once. */ - move.d r1,r10 - jsr r0 - - SETUP_PIC - PLTCALL (_exit) - - /* Die horribly. */ - test.d [6809] - - /* Stop the unstoppable. */ -9: - ba 9b - nop - -/* Local error handler. */ -1: - movs.w -EINVAL,r10 - /* Drop through into the ordinary error handler. */ -PSEUDO_END (__clone) - -weak_alias (__clone, clone) diff --git a/sysdeps/unix/sysv/linux/cris/fchown.c b/sysdeps/unix/sysv/linux/cris/fchown.c deleted file mode 100644 index 3a69ecc9e7..0000000000 --- a/sysdeps/unix/sysv/linux/cris/fchown.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/cris/fcntl.c b/sysdeps/unix/sysv/linux/cris/fcntl.c deleted file mode 100644 index ea951bc4f9..0000000000 --- a/sysdeps/unix/sysv/linux/cris/fcntl.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/cris/fxstat.c b/sysdeps/unix/sysv/linux/cris/fxstat.c deleted file mode 100644 index 4f219f0b9d..0000000000 --- a/sysdeps/unix/sysv/linux/cris/fxstat.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/cris/getegid.c b/sysdeps/unix/sysv/linux/cris/getegid.c deleted file mode 100644 index 37b4b4a530..0000000000 --- a/sysdeps/unix/sysv/linux/cris/getegid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/cris/geteuid.c b/sysdeps/unix/sysv/linux/cris/geteuid.c deleted file mode 100644 index ebcb555b5e..0000000000 --- a/sysdeps/unix/sysv/linux/cris/geteuid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/cris/getgid.c b/sysdeps/unix/sysv/linux/cris/getgid.c deleted file mode 100644 index 0a4d6061f0..0000000000 --- a/sysdeps/unix/sysv/linux/cris/getgid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/cris/getgroups.c b/sysdeps/unix/sysv/linux/cris/getgroups.c deleted file mode 100644 index 102ea24e14..0000000000 --- a/sysdeps/unix/sysv/linux/cris/getgroups.c +++ /dev/null @@ -1,2 +0,0 @@ -/* We also have to rewrite the kernel gid_t to the user land type. */ -#include diff --git a/sysdeps/unix/sysv/linux/cris/getresgid.c b/sysdeps/unix/sysv/linux/cris/getresgid.c deleted file mode 100644 index b703a414cc..0000000000 --- a/sysdeps/unix/sysv/linux/cris/getresgid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/cris/getresuid.c b/sysdeps/unix/sysv/linux/cris/getresuid.c deleted file mode 100644 index 0b14cefe34..0000000000 --- a/sysdeps/unix/sysv/linux/cris/getresuid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/cris/getrlimit.c b/sysdeps/unix/sysv/linux/cris/getrlimit.c deleted file mode 100644 index fc06dbd641..0000000000 --- a/sysdeps/unix/sysv/linux/cris/getrlimit.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/cris/getrlimit64.c b/sysdeps/unix/sysv/linux/cris/getrlimit64.c deleted file mode 100644 index fef018f471..0000000000 --- a/sysdeps/unix/sysv/linux/cris/getrlimit64.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/cris/getuid.c b/sysdeps/unix/sysv/linux/cris/getuid.c deleted file mode 100644 index d682c79a49..0000000000 --- a/sysdeps/unix/sysv/linux/cris/getuid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/cris/lchown.c b/sysdeps/unix/sysv/linux/cris/lchown.c deleted file mode 100644 index c89de99ba2..0000000000 --- a/sysdeps/unix/sysv/linux/cris/lchown.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/cris/lockf64.c b/sysdeps/unix/sysv/linux/cris/lockf64.c deleted file mode 100644 index a88f5a784a..0000000000 --- a/sysdeps/unix/sysv/linux/cris/lockf64.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/cris/lxstat.c b/sysdeps/unix/sysv/linux/cris/lxstat.c deleted file mode 100644 index 2371cd9719..0000000000 --- a/sysdeps/unix/sysv/linux/cris/lxstat.c +++ /dev/null @@ -1,2 +0,0 @@ -#include - diff --git a/sysdeps/unix/sysv/linux/cris/mmap.S b/sysdeps/unix/sysv/linux/cris/mmap.S deleted file mode 100644 index 3c74d590fa..0000000000 --- a/sysdeps/unix/sysv/linux/cris/mmap.S +++ /dev/null @@ -1,68 +0,0 @@ -/* Copyright (C) 1995, 96, 97, 98, 99, 2000, 2001 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. */ - -#include - -#include "kernel-features.h" - -#include - -/* Rather than dragging in yet another kernel file, , we - define it here. Provide for easy override. */ -#ifndef PAGE_SHIFT -#define PAGE_SHIFT 13 -#endif - - .syntax no_register_prefix - -/* This is __ptr_t - __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset) */ - - ENTRY (__mmap) - - /* Only accept a offset (and address) being a multiple of PAGE_SIZE, - since we only pass the page part in the system call. */ - move.d [sp+4],r9 - btstq (PAGE_SHIFT - 1),r9 - bne 1f - btstq (PAGE_SHIFT - 1),r10 - - bne 1f - lsrq PAGE_SHIFT,r9 - - move [sp],mof - move srp,[sp] - move r9,srp - - movu.b SYS_ify (mmap2),r9 - break 13 - - cmps.w -4096,r10 - bhs 0f - move [sp],srp - - Ret - nop - -/* Local error handler. */ -1: - movs.w -EINVAL,r10 - /* Drop through into the ordinary error handler. */ -PSEUDO_END (__mmap) - -weak_alias (__mmap, mmap) diff --git a/sysdeps/unix/sysv/linux/cris/mmap64.S b/sysdeps/unix/sysv/linux/cris/mmap64.S deleted file mode 100644 index d71114454b..0000000000 --- a/sysdeps/unix/sysv/linux/cris/mmap64.S +++ /dev/null @@ -1,91 +0,0 @@ -/* Copyright (C) 2001 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. */ - -#include - -#include "kernel-features.h" - -#include - -/* Rather than dragging in yet another kernel file, , we - define it here. Provide for easy override. */ -#ifndef PAGE_SHIFT -#define PAGE_SHIFT 13 -#endif - -/* This is: __ptr_t - __mmap64 (__ptr_t addr, size_t len, int prot, int flags, int fd, - off64_t offset); */ - -/* This was done in C, but the resulting code didn't look anywhere near - nice, and mmap64 is important enough to have fast code. Rather than - fixing (the generic bits in) gcc, we make sure not to depend on it by - writing code that GCC cannot reasonably generate. */ - - .syntax no_register_prefix - -ENTRY (__mmap64) - - move [sp],mof - move.d [sp+4],r9 - - /* Only accept an offset being a multiple of PAGE_SIZE, ditto address. */ - btstq (PAGE_SHIFT - 1),r9 - bne 1f - lsrq PAGE_SHIFT,r9 - - btstq (PAGE_SHIFT - 1),r10 - bne 1f - move.d r9,[sp] - - /* We have to store the adjusted part somewhere we can "or" from. - No registers available, so let's re-use the incoming low-part - parameter location. */ - move.d [sp+8],r9 - - swapwbr r9 - /* Check if the highest bits (now the lowest bits) are zero. They - must be, since we're actually calling a system function - specifying the size in *pages* in a single dword. Thus you can - mmap64 PAGE_SIZE * 4 Gbyte. */ - btstq (PAGE_SHIFT - 1),r9 - bne 1f - swapwbr r9 - - lslq (32 - PAGE_SHIFT),r9 - or.d [sp],r9 - move srp,[sp] - move r9,srp - - movu.b SYS_ify (mmap2),r9 - break 13 - - cmps.w -4096,r10 - bhs 0f - move [sp],srp - - Ret - nop - -/* Local error handler. */ -1: - movs.w -EINVAL,r10 - /* Drop through into the ordinary error handler. */ -PSEUDO_END (__mmap64) - -weak_alias (__mmap64, mmap64) diff --git a/sysdeps/unix/sysv/linux/cris/msgctl.c b/sysdeps/unix/sysv/linux/cris/msgctl.c deleted file mode 100644 index 9f9b8431a3..0000000000 --- a/sysdeps/unix/sysv/linux/cris/msgctl.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/cris/profil-counter.h b/sysdeps/unix/sysv/linux/cris/profil-counter.h deleted file mode 100644 index 37adc1fee7..0000000000 --- a/sysdeps/unix/sysv/linux/cris/profil-counter.h +++ /dev/null @@ -1,26 +0,0 @@ -/* Low-level statistical profiling support function. Linux/CRIS version. - Copyright (C) 2001 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. */ - -#include - -static void -profil_counter (int signo, struct sigcontext *scp) -{ - profil_count ((void *) scp->regs.irp); -} diff --git a/sysdeps/unix/sysv/linux/cris/register-dump.h b/sysdeps/unix/sysv/linux/cris/register-dump.h deleted file mode 100644 index 309728bf96..0000000000 --- a/sysdeps/unix/sysv/linux/cris/register-dump.h +++ /dev/null @@ -1,117 +0,0 @@ -/* Dump registers. - Copyright (C) 1998, 2001 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. */ - -#include -#include -#include - -/* We will print the register dump in this format: - - R0: XXXXXXXX R1: XXXXXXXX R2: XXXXXXXX R3: XXXXXXXX - R4: XXXXXXXX R5: XXXXXXXX R6: XXXXXXXX R7: XXXXXXXX - R8: XXXXXXXX R9: XXXXXXXX R10: XXXXXXXX R11: XXXXXXXX - R12: XXXXXXXX R13: XXXXXXXX SP: XXXXXXXX PC: XXXXXXXX -DCCR: XXXXXXXX SRP: XXXXXXXX */ - -static void -hexvalue (unsigned long int value, char *buf, size_t len) -{ - char *cp = _itoa_word (value, buf + len, 16, 0); - while (cp > buf) - *--cp = '0'; -} - -static void register_dump (int fd, struct sigcontext *ctx) -{ - char regs[18][8]; - struct iovec iov[36], *next_iov = iov; - struct pt_regs *rx = &ctx->regs; - -#define ADD_STRING(str) \ - next_iov->iov_base = (char *) (str); \ - next_iov->iov_len = strlen (str); \ - ++next_iov -#define ADD_MEM(str, len) \ - next_iov->iov_base = (str); \ - next_iov->iov_len = (len); \ - ++next_iov - - /* Generate strings of register contents. */ - hexvalue (rx->r0, regs[0], 8); - hexvalue (rx->r1, regs[1], 8); - hexvalue (rx->r2, regs[2], 8); - hexvalue (rx->r3, regs[3], 8); - hexvalue (rx->r4, regs[4], 8); - hexvalue (rx->r5, regs[5], 8); - hexvalue (rx->r6, regs[6], 8); - hexvalue (rx->r7, regs[7], 8); - hexvalue (rx->r8, regs[8], 8); - hexvalue (rx->r9, regs[9], 8); - hexvalue (rx->r10, regs[10], 8); - hexvalue (rx->r11, regs[11], 8); - hexvalue (rx->r12, regs[12], 8); - hexvalue (rx->r13, regs[13], 8); - hexvalue (ctx->usp, regs[14], 8); - hexvalue (rx->irp, regs[17], 8); - hexvalue (rx->dccr, regs[15], 8); - hexvalue (rx->srp, regs[16], 8); - - /* Generate the output. */ - ADD_STRING ("Register dump:\n\n R0: "); - ADD_MEM (regs[0], 8); - ADD_STRING (" R1: "); - ADD_MEM (regs[1], 8); - ADD_STRING (" R2: "); - ADD_MEM (regs[2], 8); - ADD_STRING (" R3: "); - ADD_MEM (regs[3], 8); - ADD_STRING ("\n R4: "); - ADD_MEM (regs[4], 8); - ADD_STRING (" R5: "); - ADD_MEM (regs[5], 8); - ADD_STRING (" R6: "); - ADD_MEM (regs[6], 8); - ADD_STRING (" R7: "); - ADD_MEM (regs[7], 8); - ADD_STRING ("\n R8: "); - ADD_MEM (regs[8], 8); - ADD_STRING (" R9: "); - ADD_MEM (regs[9], 8); - ADD_STRING (" R10: "); - ADD_MEM (regs[10], 8); - ADD_STRING (" R11: "); - ADD_MEM (regs[11], 8); - ADD_STRING ("\n R12: "); - ADD_MEM (regs[12], 8); - ADD_STRING (" R13: "); - ADD_MEM (regs[13], 8); - ADD_STRING (" SP: "); - ADD_MEM (regs[14], 8); - ADD_STRING (" PC: "); - ADD_MEM (regs[17], 8); - ADD_STRING ("\nDCCR: "); - ADD_MEM (regs[15], 8); - ADD_STRING (" SRP: "); - ADD_MEM (regs[16], 4); - - /* Write the stuff out. */ - writev (fd, iov, next_iov - iov); -} - -#define REGISTER_DUMP register_dump (fd, ctx) diff --git a/sysdeps/unix/sysv/linux/cris/semctl.c b/sysdeps/unix/sysv/linux/cris/semctl.c deleted file mode 100644 index e9b1a483c9..0000000000 --- a/sysdeps/unix/sysv/linux/cris/semctl.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/cris/setegid.c b/sysdeps/unix/sysv/linux/cris/setegid.c deleted file mode 100644 index 2e3a54c893..0000000000 --- a/sysdeps/unix/sysv/linux/cris/setegid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/cris/seteuid.c b/sysdeps/unix/sysv/linux/cris/seteuid.c deleted file mode 100644 index 18e41d08c1..0000000000 --- a/sysdeps/unix/sysv/linux/cris/seteuid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/cris/setfsgid.c b/sysdeps/unix/sysv/linux/cris/setfsgid.c deleted file mode 100644 index 0886712569..0000000000 --- a/sysdeps/unix/sysv/linux/cris/setfsgid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/cris/setfsuid.c b/sysdeps/unix/sysv/linux/cris/setfsuid.c deleted file mode 100644 index a9f22eb8ab..0000000000 --- a/sysdeps/unix/sysv/linux/cris/setfsuid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/cris/setgid.c b/sysdeps/unix/sysv/linux/cris/setgid.c deleted file mode 100644 index 377021d9ec..0000000000 --- a/sysdeps/unix/sysv/linux/cris/setgid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/cris/setgroups.c b/sysdeps/unix/sysv/linux/cris/setgroups.c deleted file mode 100644 index 0e7086278f..0000000000 --- a/sysdeps/unix/sysv/linux/cris/setgroups.c +++ /dev/null @@ -1,2 +0,0 @@ -/* We also have to rewrite the kernel gid_t to the user land type. */ -#include diff --git a/sysdeps/unix/sysv/linux/cris/setregid.c b/sysdeps/unix/sysv/linux/cris/setregid.c deleted file mode 100644 index 99c57ad20f..0000000000 --- a/sysdeps/unix/sysv/linux/cris/setregid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/cris/setresgid.c b/sysdeps/unix/sysv/linux/cris/setresgid.c deleted file mode 100644 index daca1a4833..0000000000 --- a/sysdeps/unix/sysv/linux/cris/setresgid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/cris/setresuid.c b/sysdeps/unix/sysv/linux/cris/setresuid.c deleted file mode 100644 index 3aeabe9ad7..0000000000 --- a/sysdeps/unix/sysv/linux/cris/setresuid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/cris/setreuid.c b/sysdeps/unix/sysv/linux/cris/setreuid.c deleted file mode 100644 index 8ad61226e9..0000000000 --- a/sysdeps/unix/sysv/linux/cris/setreuid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/cris/setrlimit.c b/sysdeps/unix/sysv/linux/cris/setrlimit.c deleted file mode 100644 index bfaef74c38..0000000000 --- a/sysdeps/unix/sysv/linux/cris/setrlimit.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/cris/setuid.c b/sysdeps/unix/sysv/linux/cris/setuid.c deleted file mode 100644 index de394379be..0000000000 --- a/sysdeps/unix/sysv/linux/cris/setuid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/cris/shmctl.c b/sysdeps/unix/sysv/linux/cris/shmctl.c deleted file mode 100644 index 7eac6380dd..0000000000 --- a/sysdeps/unix/sysv/linux/cris/shmctl.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/cris/socket.S b/sysdeps/unix/sysv/linux/cris/socket.S deleted file mode 100644 index 38b4ac5fb4..0000000000 --- a/sysdeps/unix/sysv/linux/cris/socket.S +++ /dev/null @@ -1,96 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997, 1999, 2001 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. */ - -#include -#include - -#define P(a, b) P2(a, b) -#define P2(a, b) a##b - -/* The socket-oriented system calls are handled unusally in Linux. - They are all gated through the single `socketcall' system call number. - `socketcall' takes two arguments: the first is the subcode, specifying - which socket function is being called; and the second is a pointer to - the arguments to the specific function. - - The .S files for the other calls just #define socket and #include this. - They also #define a 'number-of-arguments' word in NARGS, which - defaults to 3. */ - -#ifndef NARGS -#ifdef socket -#error NARGS not defined -#endif -#define NARGS 3 -#endif - - .syntax no_register_prefix - -#ifndef __socket -#define __socket P(__,socket) -#endif - -ENTRY(__socket) - subq NARGS*4,sp - -#if NARGS >= 2 - move.d sp,r9 - move.d r10,[r9+] -#else - move.d r10,[sp] -#endif -#if NARGS >= 2 - move.d r11,[r9+] -#endif -#if NARGS >= 3 - move.d r12,[r9+] -#endif -#if NARGS >= 4 - move.d r13,[r9+] -#endif -#if NARGS >= 5 - move.d [sp+NARGS*4],r13 - move.d r13,[r9+] -#endif -#if NARGS >= 6 - move.d [sp+NARGS*4+4],r13 - move.d r13,[r9+] -#endif -#if NARGS >= 7 - move.d [sp+NARGS*4+8],r13 - move.d r13,[r9+] -#endif -#if NARGS >= 8 - move.d [sp+NARGS*4+12],r13 - move.d r13,[r9+] -#endif -#if NARGS >= 9 -#error Too many arguments! -#endif - moveq P(SOCKOP_,socket),r10 - move.d sp,r11 - movu.w SYS_ify(socketcall),r9 - break 13 - cmps.w -4096,r10 - bhs 0f - addq NARGS*4,sp - Ret - nop -PSEUDO_END (__socket) - -weak_alias (__socket, socket) diff --git a/sysdeps/unix/sysv/linux/cris/sys/ucontext.h b/sysdeps/unix/sysv/linux/cris/sys/ucontext.h deleted file mode 100644 index 2d3aee076e..0000000000 --- a/sysdeps/unix/sysv/linux/cris/sys/ucontext.h +++ /dev/null @@ -1,56 +0,0 @@ -/* Copyright (C) 1998, 1999, 2000, 2001 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 _SYS_UCONTEXT_H -#define _SYS_UCONTEXT_H 1 - -#include -#include - -#include - - -/* Type for general register. */ -typedef long int greg_t; - -/* Number of general registers. */ -#define NGREG 20 - -/* Container for all general registers. */ -typedef greg_t gregset_t[NGREG]; - -/* A placeholder type for floating-point register. */ -typedef long int fpreg_t; - -/* A placeholder; CRIS does not have any fp regs. */ -typedef unsigned long fpregset_t; - -/* A machine context is exactly a sigcontext. */ -typedef struct sigcontext mcontext_t; - -/* Userlevel context. */ -typedef struct ucontext - { - unsigned long int uc_flags; - struct ucontext *uc_link; - stack_t uc_stack; - mcontext_t uc_mcontext; - __sigset_t uc_sigmask; - } ucontext_t; - -#endif /* sys/ucontext.h */ diff --git a/sysdeps/unix/sysv/linux/cris/syscall.S b/sysdeps/unix/sysv/linux/cris/syscall.S deleted file mode 100644 index 03626b0946..0000000000 --- a/sysdeps/unix/sysv/linux/cris/syscall.S +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (C) 2001 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. */ - -#include - - .syntax no_register_prefix - -/* Make syscall (callno, ...) into a system call. */ - -ENTRY (syscall) - move.d r10,r9 - move.d r11,r10 - move.d r12,r11 - move.d r13,r12 - move.d [sp],r13 - move srp,[sp] - move [sp+4],mof - move [sp+8],srp - break 13 - cmps.w -4096,r10 - bhs 0f - move [sp],srp - Ret - nop -PSEUDO_END (syscall) diff --git a/sysdeps/unix/sysv/linux/cris/sysdep.S b/sysdeps/unix/sysv/linux/cris/sysdep.S deleted file mode 100644 index e53e7bbfb9..0000000000 --- a/sysdeps/unix/sysv/linux/cris/sysdep.S +++ /dev/null @@ -1,66 +0,0 @@ -/* Copyright (C) 2001 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. */ - -#include - -/* The syscall stubs jump here when they detect an error, bot for PIC and - non-PIC. */ - - .syntax no_register_prefix - -ENTRY (__syscall_error) - neg.d r10,r10 - -#ifdef _LIBC_REENTRANT - push r10 - push srp - - /* Note that __syscall_error is only visible within this library, - and no-one passes it on as a pointer, so can assume that R0 (GOT - pointer) is correctly set up. */ - PLTCALL (__errno_location) - - pop srp - pop r11 - move.d r11,[r10] - -#else /* not _LIBC_REENTRANT */ -# ifdef __PIC__ - move.d [r0+C_SYMBOL_NAME(errno:GOT)],r9 - move.d r10,[r9] -# else - move.d r10,[C_SYMBOL_NAME(errno)] -# endif -#endif /* _LIBC_REENTRANT */ - -#ifdef __PIC__ -/* PIC callers are supposed to have R0 on stack, ready for us to restore. - Callers are only allowed from within this DSO, so the GOT in r0 is the - one we want to use. - - (Don't use "ret" - it's a macro). */ - - moveq -1,r10 - Ret - pop r0 -#else - Ret - moveq -1,r10 -#endif - -END (__syscall_error) diff --git a/sysdeps/unix/sysv/linux/cris/sysdep.h b/sysdeps/unix/sysv/linux/cris/sysdep.h deleted file mode 100644 index 5013dd5d30..0000000000 --- a/sysdeps/unix/sysv/linux/cris/sysdep.h +++ /dev/null @@ -1,226 +0,0 @@ -/* Assembler macros for CRIS. - Copyright (C) 1999, 2001, 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. */ - -#include -#include -#include -#include "config.h" - -#undef SYS_ify -#define SYS_ify(syscall_name) (__NR_##syscall_name) - - -#ifdef __ASSEMBLER__ - -/* For Linux we can use the system call table in the header file - /usr/include/asm/unistd.h - of the kernel. But these symbols do not follow the SYS_* syntax - so we have to redefine the `SYS_ify' macro here. */ -#undef SYS_ify -#define SYS_ify(syscall_name) __NR_##syscall_name - -/* ELF-like local names start with `.L'. */ -#undef L -#define L(name) .L##name - -/* Linux uses a negative return value to indicate syscall errors, - unlike most Unices, which use the condition codes' carry flag. - - Since version 2.1 the return value of a system call might be - negative even if the call succeeded. E.g., the `lseek' system call - might return a large offset. Therefore we must not anymore test - for < 0, but test for a real error by making sure the value in %eax - is a real error number. Linus said he will make sure the no syscall - returns a value in -1 .. -4095 as a valid result so we can safely - test with -4095. */ - -/* Syscall wrappers consist of - #include - PSEUDO (...) - ret - PSEUDO_END (...) - - which expand to the following. */ - -/* Linux takes system call arguments in registers: - syscall number R9 - arg 1 R10 - arg 2 R11 - arg 3 R12 - arg 4 R13 - arg 5 MOF - arg 6 SRP - - The compiler calls us by the C convention: - syscall number in the DO_CALL macro - arg 1 R10 - arg 2 R11 - arg 3 R12 - arg 4 R13 - arg 5 [SP] - arg 6 [SP + 4] - */ - -/* Note that we use "bhs", since we want to match - (unsigned) -4096 .. 0xffffffff. Using "ble" would match - -4096 .. -2**31. */ -#define PSEUDO(name, syscall_name, args) \ - ENTRY (name) @ \ - DOARGS_##args @ \ - movu.w SYS_ify (syscall_name),$r9 @ \ - break 13 @ \ - cmps.w -4096,$r10 @ \ - bhs 0f @ \ - nop @ \ - UNDOARGS_return_##args - -/* Ouch! We have to remember not to use "ret" in assembly-code. - ("Luckily", mnemonics are case-insensitive.) - Note that we assume usage is exactly: - PSEUDO (...) - ret - PSEUDO_END (...) - so we can put all payload into PSEUDO (except for error handling). */ - -#define ret - -#define PSEUDO_END(name) \ -0: @ \ - SETUP_PIC @ \ - PLTJUMP (syscall_error) @ \ - END (name) - -#define PSEUDO_NOERRNO(name, syscall_name, args) \ - ENTRY (name) @ \ - DOARGS_##args @ \ - movu.w SYS_ify (syscall_name),$r9 @ \ - break 13 @ \ - UNDOARGS_return_##args - -#define ret_NOERRNO - -#define PSEUDO_END_NOERRNO(name) \ - END (name) - -#define DOARGS_0 -#define DOARGS_1 -#define DOARGS_2 -#define DOARGS_3 -#define DOARGS_4 -#define DOARGS_5 \ - move [$sp],$mof - -/* To avoid allocating stack-space, we re-use the arg 5 (MOF) entry by - storing SRP into it. If called with too-few arguments, we will crash, - but that will happen in the general case too. */ -#define DOARGS_6 \ - DOARGS_5 @ \ - move $srp,[$sp] @ \ - move [$sp+4],$srp - -#define UNDOARGS_return_0 \ - Ret @ \ - nop - -#define UNDOARGS_return_1 UNDOARGS_return_0 -#define UNDOARGS_return_2 UNDOARGS_return_0 -#define UNDOARGS_return_3 UNDOARGS_return_0 -#define UNDOARGS_return_4 UNDOARGS_return_0 -#define UNDOARGS_return_5 UNDOARGS_return_0 - -/* We assume the following code will be "ret" and "PSEUDO_END". */ -#define UNDOARGS_return_return_6 \ - jump [$sp] - -#else /* not __ASSEMBLER__ */ - -#undef INLINE_SYSCALL -#define INLINE_SYSCALL(name, nr, args...) \ - ({ \ - unsigned long __sys_res; \ - register unsigned long __res asm ("r10"); \ - LOAD_ARGS_c_##nr (args) \ - register unsigned long __callno asm ("r9") \ - = SYS_ify (name); \ - asm volatile (LOAD_ARGS_asm_##nr (args) \ - "break 13" \ - : "=r" (__res) \ - : ASM_ARGS_##nr (args) \ - : ASM_CLOBBER_##nr); \ - __sys_res = __res; \ - \ - if (__sys_res >= (unsigned long) -4096) \ - { \ - __set_errno (- __sys_res); \ - __sys_res = (unsigned long) -1; \ - } \ - (long int) __sys_res; \ - }) - -#define LOAD_ARGS_c_0() -#define LOAD_ARGS_asm_0() -#define ASM_CLOBBER_0 "memory" -#define ASM_ARGS_0() "r" (__callno) - -#define LOAD_ARGS_c_1(r10) \ - LOAD_ARGS_c_0() \ - register unsigned long __r10 __asm__ ("r10") = (unsigned long) (r10); -#define LOAD_ARGS_asm_1(r10) LOAD_ARGS_asm_0 () -#define ASM_CLOBBER_1 ASM_CLOBBER_0 -#define ASM_ARGS_1(r10) ASM_ARGS_0 (), "0" (__r10) - -#define LOAD_ARGS_c_2(r10, r11) \ - LOAD_ARGS_c_1(r10) \ - register unsigned long __r11 __asm__ ("r11") = (unsigned long) (r11); -#define LOAD_ARGS_asm_2(r10, r11) LOAD_ARGS_asm_1 (r10) -#define ASM_CLOBBER_2 ASM_CLOBBER_1 -#define ASM_ARGS_2(r10, r11) ASM_ARGS_1 (r10), "r" (__r11) - -#define LOAD_ARGS_c_3(r10, r11, r12) \ - LOAD_ARGS_c_2(r10, r11) \ - register unsigned long __r12 __asm__ ("r12") = (unsigned long) (r12); -#define LOAD_ARGS_asm_3(r10, r11, r12) LOAD_ARGS_asm_2 (r10, r11) -#define ASM_CLOBBER_3 ASM_CLOBBER_2 -#define ASM_ARGS_3(r10, r11, r12) ASM_ARGS_2 (r10, r11), "r" (__r12) - -#define LOAD_ARGS_c_4(r10, r11, r12, r13) \ - LOAD_ARGS_c_3(r10, r11, r12) \ - register unsigned long __r13 __asm__ ("r13") = (unsigned long) (r13); -#define LOAD_ARGS_asm_4(r10, r11, r12, r13) LOAD_ARGS_asm_3 (r10, r11, r12) -#define ASM_CLOBBER_4 ASM_CLOBBER_3 -#define ASM_ARGS_4(r10, r11, r12, r13) ASM_ARGS_3 (r10, r11, r12), "r" (__r13) - -#define LOAD_ARGS_c_5(r10, r11, r12, r13, mof) \ - LOAD_ARGS_c_4(r10, r11, r12, r13) -#define LOAD_ARGS_asm_5(r10, r11, r12, r13, mof) \ - LOAD_ARGS_asm_4 (r10, r11, r12, r13) "move %6,$mof\n\t" -#define ASM_CLOBBER_5 ASM_CLOBBER_4 -#define ASM_ARGS_5(r10, r11, r12, r13, mof) \ - ASM_ARGS_4 (r10, r11, r12, r13), "g" (mof) - -#define LOAD_ARGS_c_6(r10, r11, r12, r13, mof, srp) \ - LOAD_ARGS_c_5(r10, r11, r12, r13, mof) -#define LOAD_ARGS_asm_6(r10, r11, r12, r13, mof, srp) \ - LOAD_ARGS_asm_5(r10, r11, r12, r13, mof) \ - "move %7,$srp\n\t" -#define ASM_CLOBBER_6 ASM_CLOBBER_5, "srp" -#define ASM_ARGS_6(r10, r11, r12, r13, mof, srp) \ - ASM_ARGS_5 (r10, r11, r12, r13, mof), "g" (srp) - -#endif /* not __ASSEMBLER__ */ diff --git a/sysdeps/unix/sysv/linux/cris/vfork.S b/sysdeps/unix/sysv/linux/cris/vfork.S deleted file mode 100644 index 74a8556765..0000000000 --- a/sysdeps/unix/sysv/linux/cris/vfork.S +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 1999, 2001, 2002 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. */ - -#include - -PSEUDO (__vfork, vfork, 0) - Ret - nop -PSEUDO_END (__vfork) -libc_hidden_def (__vfork) - -weak_alias (__vfork, vfork) diff --git a/sysdeps/unix/sysv/linux/cris/xstat.c b/sysdeps/unix/sysv/linux/cris/xstat.c deleted file mode 100644 index e9869f5508..0000000000 --- a/sysdeps/unix/sysv/linux/cris/xstat.c +++ /dev/null @@ -1 +0,0 @@ -#include From 27c1f49d4b983cf2274161872d36d30a543392ef Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 24 Feb 2012 12:22:22 +0100 Subject: [PATCH 4236/4487] m68k: set errno in sin, cos, tan --- ChangeLog.m68k | 15 ++++++++ sysdeps/m68k/m680x0/fpu/bits/mathinline.h | 5 +-- sysdeps/m68k/m680x0/fpu/s_cos.c | 2 +- sysdeps/m68k/m680x0/fpu/s_cosf.c | 4 +-- sysdeps/m68k/m680x0/fpu/s_cosl.c | 2 +- sysdeps/m68k/m680x0/fpu/s_sin.c | 43 +++++++++++++++++++++-- sysdeps/m68k/m680x0/fpu/s_sinf.c | 7 ++-- sysdeps/m68k/m680x0/fpu/s_sinl.c | 7 ++-- sysdeps/m68k/m680x0/fpu/s_tan.c | 2 +- sysdeps/m68k/m680x0/fpu/s_tanf.c | 4 +-- sysdeps/m68k/m680x0/fpu/s_tanl.c | 2 +- 11 files changed, 75 insertions(+), 18 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 7eace9206d..9724c30685 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,18 @@ +2012-02-24 Andreas Schwab + + * sysdeps/m68k/m680x0/fpu/s_sin.c: Set errno to EDOM if argument + is infinite. + * sysdeps/m68k/m680x0/fpu/s_cos.c: Include . + * sysdeps/m68k/m680x0/fpu/s_tan.c: Likewise. + * sysdeps/m68k/m680x0/fpu/s_cosf.c: Include . + * sysdeps/m68k/m680x0/fpu/s_cosl.c: Include . + * sysdeps/m68k/m680x0/fpu/s_sinf.c: Include . + (FUNC): Don't define if already defined. + (float_type): Define. + * sysdeps/m68k/m680x0/fpu/s_sinl.c: Likewise. + * sysdeps/m68k/m680x0/fpu/bits/mathinline.h [__OPTIMIZE__]: Don't + define sin, cos, tan as inlines. + 2012-02-08 Andreas Schwab * sysdeps/m68k/crti.S: New file. diff --git a/sysdeps/m68k/m680x0/fpu/bits/mathinline.h b/sysdeps/m68k/m680x0/fpu/bits/mathinline.h index 00ae076038..d79f6bdcde 100644 --- a/sysdeps/m68k/m680x0/fpu/bits/mathinline.h +++ b/sysdeps/m68k/m680x0/fpu/bits/mathinline.h @@ -1,5 +1,5 @@ /* Definitions of inline math functions implemented by the m68881/2. - Copyright (C) 1991,92,93,94,96,97,98,99,2000,2002, 2003, 2004, 2008, 2010 + Copyright (C) 1991,92,93,94,96,97,98,99,2000,2002, 2003, 2004, 2008, 2010, 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -175,9 +175,6 @@ __inline_mathop(__trunc, intrz) #if !defined __NO_MATH_INLINES && defined __OPTIMIZE__ __inline_mathop(atan, atan) -__inline_mathop(cos, cos) -__inline_mathop(sin, sin) -__inline_mathop(tan, tan) __inline_mathop(tanh, tanh) # if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 diff --git a/sysdeps/m68k/m680x0/fpu/s_cos.c b/sysdeps/m68k/m680x0/fpu/s_cos.c index 9c96076316..2f1adf77f5 100644 --- a/sysdeps/m68k/m680x0/fpu/s_cos.c +++ b/sysdeps/m68k/m680x0/fpu/s_cos.c @@ -1,2 +1,2 @@ #define FUNC cos -#include +#include diff --git a/sysdeps/m68k/m680x0/fpu/s_cosf.c b/sysdeps/m68k/m680x0/fpu/s_cosf.c index db965b8cc1..b6d6accb4a 100644 --- a/sysdeps/m68k/m680x0/fpu/s_cosf.c +++ b/sysdeps/m68k/m680x0/fpu/s_cosf.c @@ -1,2 +1,2 @@ -#define FUNC cosf -#include +#define FUNC cosf +#include diff --git a/sysdeps/m68k/m680x0/fpu/s_cosl.c b/sysdeps/m68k/m680x0/fpu/s_cosl.c index 4198feef18..eb61521fdd 100644 --- a/sysdeps/m68k/m680x0/fpu/s_cosl.c +++ b/sysdeps/m68k/m680x0/fpu/s_cosl.c @@ -1,2 +1,2 @@ #define FUNC cosl -#include +#include diff --git a/sysdeps/m68k/m680x0/fpu/s_sin.c b/sysdeps/m68k/m680x0/fpu/s_sin.c index 0d4abdbfe4..e088b584b7 100644 --- a/sysdeps/m68k/m680x0/fpu/s_sin.c +++ b/sysdeps/m68k/m680x0/fpu/s_sin.c @@ -1,2 +1,41 @@ -#define FUNC sin -#include +/* Copyright (C) 2012 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. */ + +#include +#include +#include "mathimpl.h" + +#ifndef FUNC +# define FUNC sin +#endif +#ifndef float_type +# define float_type double +#endif + +#define CONCATX(a,b) __CONCAT(a,b) + +float_type +CONCATX(__,FUNC) (float_type x) +{ + if (__m81_test (x) & __M81_COND_INF) + __set_errno (EDOM); + return __m81_u(CONCATX(__, FUNC)) (x); +} + +#define weak_aliasx(a, b) weak_alias(a, b) +weak_aliasx (CONCATX(__, FUNC), FUNC) diff --git a/sysdeps/m68k/m680x0/fpu/s_sinf.c b/sysdeps/m68k/m680x0/fpu/s_sinf.c index 9b23d4823f..304f4f76f6 100644 --- a/sysdeps/m68k/m680x0/fpu/s_sinf.c +++ b/sysdeps/m68k/m680x0/fpu/s_sinf.c @@ -1,2 +1,5 @@ -#define FUNC sinf -#include +#ifndef FUNC +# define FUNC sinf +#endif +#define float_type float +#include diff --git a/sysdeps/m68k/m680x0/fpu/s_sinl.c b/sysdeps/m68k/m680x0/fpu/s_sinl.c index 9ac532cb47..31dac0bee7 100644 --- a/sysdeps/m68k/m680x0/fpu/s_sinl.c +++ b/sysdeps/m68k/m680x0/fpu/s_sinl.c @@ -1,2 +1,5 @@ -#define FUNC sinl -#include +#ifndef FUNC +# define FUNC sinl +#endif +#define float_type long double +#include diff --git a/sysdeps/m68k/m680x0/fpu/s_tan.c b/sysdeps/m68k/m680x0/fpu/s_tan.c index ca7fb0e6dc..dfbbbb2270 100644 --- a/sysdeps/m68k/m680x0/fpu/s_tan.c +++ b/sysdeps/m68k/m680x0/fpu/s_tan.c @@ -1,2 +1,2 @@ #define FUNC tan -#include +#include diff --git a/sysdeps/m68k/m680x0/fpu/s_tanf.c b/sysdeps/m68k/m680x0/fpu/s_tanf.c index 95fe9c71a5..9ae66ddbf3 100644 --- a/sysdeps/m68k/m680x0/fpu/s_tanf.c +++ b/sysdeps/m68k/m680x0/fpu/s_tanf.c @@ -1,2 +1,2 @@ -#define FUNC tanf -#include +#define FUNC tanf +#include diff --git a/sysdeps/m68k/m680x0/fpu/s_tanl.c b/sysdeps/m68k/m680x0/fpu/s_tanl.c index 64fcb54406..27daf8f29b 100644 --- a/sysdeps/m68k/m680x0/fpu/s_tanl.c +++ b/sysdeps/m68k/m680x0/fpu/s_tanl.c @@ -1,2 +1,2 @@ #define FUNC tanl -#include +#include From 258ca456fd46e19279a08a948fca1f0a8b84553d Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 24 Feb 2012 15:00:28 +0100 Subject: [PATCH 4237/4487] m68k: set errno in exp --- ChangeLog.m68k | 8 ++++ sysdeps/m68k/m680x0/fpu/bits/mathinline.h | 1 - sysdeps/m68k/m680x0/fpu/s_expm1.c | 46 ++++++++++++++++++++++- sysdeps/m68k/m680x0/fpu/s_expm1f.c | 6 ++- sysdeps/m68k/m680x0/fpu/s_expm1l.c | 7 +++- 5 files changed, 61 insertions(+), 7 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 9724c30685..b53feed41a 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,5 +1,13 @@ 2012-02-24 Andreas Schwab + * sysdeps/m68k/m680x0/fpu/s_expm1.c: Set errno to ERANGE if + argument causes overflow. + * sysdeps/m68k/m680x0/fpu/s_expm1f.c: Include . + (float_type, o_threshold): Define. + * sysdeps/m68k/m680x0/fpu/s_expm1l.c: Likewise. + * sysdeps/m68k/m680x0/fpu/bits/mathinline.h [__OPTIMIZE__]: Don't + define expm1 as inline. + * sysdeps/m68k/m680x0/fpu/s_sin.c: Set errno to EDOM if argument is infinite. * sysdeps/m68k/m680x0/fpu/s_cos.c: Include . diff --git a/sysdeps/m68k/m680x0/fpu/bits/mathinline.h b/sysdeps/m68k/m680x0/fpu/bits/mathinline.h index d79f6bdcde..31d9efe350 100644 --- a/sysdeps/m68k/m680x0/fpu/bits/mathinline.h +++ b/sysdeps/m68k/m680x0/fpu/bits/mathinline.h @@ -179,7 +179,6 @@ __inline_mathop(tanh, tanh) # if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 __inline_mathop(rint, int) -__inline_mathop(expm1, etoxm1) __inline_mathop(log1p, lognp1) # endif diff --git a/sysdeps/m68k/m680x0/fpu/s_expm1.c b/sysdeps/m68k/m680x0/fpu/s_expm1.c index 1ef99e21c9..3db6f2d164 100644 --- a/sysdeps/m68k/m680x0/fpu/s_expm1.c +++ b/sysdeps/m68k/m680x0/fpu/s_expm1.c @@ -1,2 +1,44 @@ -#define FUNC expm1 -#include +/* Copyright (C) 2012 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. */ + +#include +#include +#include "mathimpl.h" + +#ifndef FUNC +# define FUNC expm1 +#endif +#ifndef float_type +# define float_type double +#endif +#ifndef o_threshold +# define o_threshold 7.09782712893383973096e+02 +#endif + +#define CONCATX(a,b) __CONCAT(a,b) + +float_type +CONCATX(__,FUNC) (float_type x) +{ + if ((__m81_test (x) & __M81_COND_INF) == 0 && isgreater (x, o_threshold)) + __set_errno (ERANGE); + return __m81_u(CONCATX(__, FUNC)) (x); +} + +#define weak_aliasx(a, b) weak_alias(a, b) +weak_aliasx (CONCATX(__, FUNC), FUNC) diff --git a/sysdeps/m68k/m680x0/fpu/s_expm1f.c b/sysdeps/m68k/m680x0/fpu/s_expm1f.c index 84935b1b4a..2cd8ffcfeb 100644 --- a/sysdeps/m68k/m680x0/fpu/s_expm1f.c +++ b/sysdeps/m68k/m680x0/fpu/s_expm1f.c @@ -1,2 +1,4 @@ -#define FUNC expm1f -#include +#define FUNC expm1f +#define float_type float +#define o_threshold 8.8722831726e+01F +#include diff --git a/sysdeps/m68k/m680x0/fpu/s_expm1l.c b/sysdeps/m68k/m680x0/fpu/s_expm1l.c index feee07a1d8..a2c80860ba 100644 --- a/sysdeps/m68k/m680x0/fpu/s_expm1l.c +++ b/sysdeps/m68k/m680x0/fpu/s_expm1l.c @@ -1,3 +1,6 @@ -#define FUNC expm1l -#include +#define FUNC expm1l +#define float_type long double +/* 400c0000b17217f7d1cf79ab */ +#define o_threshold 1.13565234062941439487914863093465101e+04L +#include libm_hidden_def (__expm1l) From ccc074aa35479e5b348bb85f72f6ac3b59ff8bb8 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 24 Feb 2012 15:14:42 +0100 Subject: [PATCH 4238/4487] m68k: update libm test ULPs --- ChangeLog.m68k | 2 + sysdeps/m68k/m680x0/fpu/libm-test-ulps | 163 ++++++++++++++++++++----- 2 files changed, 134 insertions(+), 31 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index b53feed41a..e40c284141 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,5 +1,7 @@ 2012-02-24 Andreas Schwab + * sysdeps/m68k/m680x0/fpu/libm-test-ulps: Update ULPs. + * sysdeps/m68k/m680x0/fpu/s_expm1.c: Set errno to ERANGE if argument causes overflow. * sysdeps/m68k/m680x0/fpu/s_expm1f.c: Include . diff --git a/sysdeps/m68k/m680x0/fpu/libm-test-ulps b/sysdeps/m68k/m680x0/fpu/libm-test-ulps index 854c10cb1a..5f965d2f2c 100644 --- a/sysdeps/m68k/m680x0/fpu/libm-test-ulps +++ b/sysdeps/m68k/m680x0/fpu/libm-test-ulps @@ -79,14 +79,16 @@ ildouble: 5 ldouble: 5 Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": double: 13 -float: 1 +float: 6 idouble: 13 -ifloat: 1 +ifloat: 6 ildouble: 6 ldouble: 6 Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": double: 1 float: 1 @@ -107,6 +109,8 @@ ldouble: 1 # catanh Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": +float: 1 +ifloat: 1 ildouble: 1 ldouble: 1 @@ -272,9 +276,11 @@ ifloat: 1 Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i": -float: 1 -ifloat: 1 +float: 3 +ifloat: 3 ildouble: 9 ldouble: 9 Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i": @@ -294,9 +300,9 @@ ildouble: 1 ldouble: 1 Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i": double: 1 -float: 2 +float: 3 idouble: 1 -ifloat: 2 +ifloat: 3 ildouble: 15 ldouble: 15 Test "Imaginary part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i": @@ -366,6 +372,9 @@ ifloat: 1 Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": double: 1 idouble: 1 +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": ildouble: 1 ldouble: 1 Test "Real part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i": @@ -376,6 +385,9 @@ ildouble: 2 ldouble: 2 # ctanh +Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": +ildouble: 1 +ldouble: 1 Test "Imaginary part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": ildouble: 1 ldouble: 1 @@ -397,9 +409,14 @@ ifloat: 1 Test "erfc (1.25) == 0.0770998717435417698634765188027188596": ildouble: 1 ldouble: 1 +Test "erfc (2.0) == 0.00467773498104726583793074363274707139": +float: 1 +ifloat: 1 Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 # expm1 Test "expm1 (1) == M_El - 1.0": @@ -447,8 +464,8 @@ ifloat: 1 Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1": float: 1 ifloat: 1 -ildouble: 1 -ldouble: 1 +ildouble: 2 +ldouble: 2 Test "j0 (0.75) == 0.864242275166648623555731103820923211": float: 1 ifloat: 1 @@ -461,8 +478,11 @@ idouble: 1 Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1": float: 1 ifloat: 1 -ildouble: 1 -ldouble: 1 +ildouble: 2 +ldouble: 2 +Test "j0 (8.0) == 0.171650807137553906090869407851972001": +float: 1 +ifloat: 1 # j1 Test "j1 (-1.0) == -0.440050585744933515959682203718914913": @@ -492,8 +512,8 @@ ldouble: 1 Test "jn (0, -4.0) == -3.9714980986384737228659076845169804197562E-1": float: 1 ifloat: 1 -ildouble: 1 -ldouble: 1 +ildouble: 2 +ldouble: 2 Test "jn (0, 0.75) == 0.864242275166648623555731103820923211": float: 1 ifloat: 1 @@ -506,8 +526,11 @@ idouble: 1 Test "jn (0, 4.0) == -3.9714980986384737228659076845169804197562E-1": float: 1 ifloat: 1 -ildouble: 1 -ldouble: 1 +ildouble: 2 +ldouble: 2 +Test "jn (0, 8.0) == 0.171650807137553906090869407851972001": +float: 1 +ifloat: 1 Test "jn (1, -1.0) == -0.440050585744933515959682203718914913": float: 1 ifloat: 1 @@ -539,7 +562,9 @@ Test "jn (10, 0.125) == 0.250543369809369890173993791865771547e-18": float: 1 ifloat: 1 Test "jn (10, 0.75) == 0.149621713117596814698712483621682835e-10": +double: 1 float: 2 +idouble: 1 ifloat: 2 ildouble: 2 ldouble: 2 @@ -560,6 +585,11 @@ float: 2 ifloat: 2 ildouble: 1 ldouble: 1 +Test "jn (2, 2.4048255576957729) == 0.43175480701968038399746111312430703": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 Test "jn (3, -1.0) == -0.0195633539826684059189053216217515083": float: 1 ifloat: 1 @@ -578,8 +608,45 @@ ifloat: 1 ildouble: 1 ldouble: 1 Test "jn (3, 2.0) == 0.128943249474402051098793332969239835": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "jn (3, 2.4048255576957729) == 0.19899990535769083404042146764530813": +float: 2 +ifloat: 2 +ildouble: 1 +ldouble: 1 +Test "jn (4, 2.4048255576957729) == 0.647466661641779720084932282551219891E-1": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "jn (5, 2.4048255576957729) == 0.163892432048058525099230549946147698E-1": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 3 +ldouble: 3 +Test "jn (6, 2.4048255576957729) == 0.34048184720278336646673682895929161E-2": +float: 4 +ifloat: 4 ildouble: 1 ldouble: 1 +Test "jn (7, 2.4048255576957729) == 0.60068836573295394221291569249883076E-3": +float: 5 +ifloat: 5 +Test "jn (8, 2.4048255576957729) == 0.92165786705344923232879022467054148E-4": +float: 4 +ifloat: 4 +ildouble: 2 +ldouble: 2 +Test "jn (9, 2.4048255576957729) == 0.12517270977961513005428966643852564E-4": +float: 3 +ifloat: 3 +ildouble: 2 +ldouble: 2 # lgamma Test "lgamma (-0.5) == log(2*sqrt(pi))": @@ -622,6 +689,8 @@ ldouble: 2 Test "log10 (e) == log10(e)": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 # log1p Test "log1p (-0.25) == -0.287682072451780927439219005993827432": @@ -637,6 +706,14 @@ ldouble: 1 Test "pow (0.75, 1.25) == 0.697953644326574699205914060237425566": ildouble: 1 ldouble: 1 +Test "pow (0x1p64, 0.125) == 256": +ildouble: 1 +ldouble: 1 +Test "pow (256, 8) == 0x1p64": +float: 1 +ifloat: 1 +ildouble: 7 +ldouble: 7 # sincos Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": @@ -706,16 +783,22 @@ ildouble: 1 ldouble: 1 Test "y0 (0.75) == -0.137172769385772397522814379396581855": double: 1 +float: 1 idouble: 1 +ifloat: 1 ildouble: 2 ldouble: 2 Test "y0 (1.0) == 0.0882569642156769579829267660235151628": ildouble: 1 ldouble: 1 Test "y0 (1.5) == 0.382448923797758843955068554978089862": +float: 1 +ifloat: 1 ildouble: 1 ldouble: 1 Test "y0 (10.0) == 0.0556711672835993914244598774101900481": +float: 1 +ifloat: 1 ildouble: 1 ldouble: 1 Test "y0 (2.0) == 0.510375672649745119596606592727157873": @@ -743,6 +826,8 @@ ifloat: 2 ildouble: 1 ldouble: 1 Test "y1 (8.0) == -0.158060461731247494255555266187483550": +float: 1 +ifloat: 1 ildouble: 1 ldouble: 1 @@ -756,16 +841,22 @@ ildouble: 1 ldouble: 1 Test "yn (0, 0.75) == -0.137172769385772397522814379396581855": double: 1 +float: 1 idouble: 1 +ifloat: 1 ildouble: 2 ldouble: 2 Test "yn (0, 1.0) == 0.0882569642156769579829267660235151628": ildouble: 1 ldouble: 1 Test "yn (0, 1.5) == 0.382448923797758843955068554978089862": +float: 1 +ifloat: 1 ildouble: 1 ldouble: 1 Test "yn (0, 10.0) == 0.0556711672835993914244598774101900481": +float: 1 +ifloat: 1 ildouble: 1 ldouble: 1 Test "yn (0, 2.0) == 0.510375672649745119596606592727157873": @@ -796,6 +887,8 @@ ifloat: 2 ildouble: 1 ldouble: 1 Test "yn (1, 8.0) == -0.158060461731247494255555266187483550": +float: 1 +ifloat: 1 ildouble: 1 ldouble: 1 Test "yn (10, 0.125) == -127057845771019398.252538486899753195": @@ -888,17 +981,17 @@ ldouble: 2 Function: Real part of "casinh": double: 6 -float: 19 +float: 1 idouble: 6 -ifloat: 19 +ifloat: 1 ildouble: 5 ldouble: 5 Function: Imaginary part of "casinh": double: 13 -float: 1 +float: 6 idouble: 13 -ifloat: 1 +ifloat: 6 ildouble: 6 ldouble: 6 @@ -913,6 +1006,8 @@ idouble: 1 ifloat: 1 Function: Real part of "catanh": +float: 1 +ifloat: 1 ildouble: 1 ldouble: 1 @@ -988,17 +1083,17 @@ ldouble: 1 Function: Real part of "cpow": double: 1 -float: 2 +float: 3 idouble: 1 -ifloat: 2 +ifloat: 3 ildouble: 15 ldouble: 15 Function: Imaginary part of "cpow": double: 2 -float: 6 +float: 5 idouble: 2 -ifloat: 6 +ifloat: 5 ildouble: 2 ldouble: 2 @@ -1025,12 +1120,16 @@ ifloat: 1 Function: Real part of "ctan": double: 1 idouble: 1 +ildouble: 2 +ldouble: 2 + +Function: Imaginary part of "ctan": ildouble: 1 ldouble: 1 -Function: Imaginary part of "ctan": -ildouble: 2 -ldouble: 2 +Function: Real part of "ctanh": +ildouble: 1 +ldouble: 1 Function: Imaginary part of "ctanh": double: 1 @@ -1063,8 +1162,8 @@ double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 1 -ldouble: 1 +ildouble: 2 +ldouble: 2 Function: "j1": float: 2 @@ -1077,8 +1176,8 @@ double: 1 float: 5 idouble: 1 ifloat: 5 -ildouble: 2 -ldouble: 2 +ildouble: 3 +ldouble: 3 Function: "lgamma": double: 1 @@ -1109,8 +1208,10 @@ ildouble: 1 ldouble: 1 Function: "pow": -ildouble: 1 -ldouble: 1 +float: 1 +ifloat: 1 +ildouble: 7 +ldouble: 7 Function: "sincos": double: 1 From a9e6c76aae154b7b4a7ba7de5cf3c9b701f27e14 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 25 Feb 2012 18:18:00 +0100 Subject: [PATCH 4239/4487] m68k: avoid invalid exception for ccosh(NaN+iNaN) --- ChangeLog.m68k | 5 +++++ sysdeps/m68k/m680x0/fpu/s_ccosh.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index e40c284141..02d1355c0d 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2012-02-25 Andreas Schwab + + * sysdeps/m68k/m680x0/fpu/s_ccosh.c: Avoid raising invalid + exception for NaN+iNaN. + 2012-02-24 Andreas Schwab * sysdeps/m68k/m680x0/fpu/libm-test-ulps: Update ULPs. diff --git a/sysdeps/m68k/m680x0/fpu/s_ccosh.c b/sysdeps/m68k/m680x0/fpu/s_ccosh.c index d272e98f2a..7f1c8ab468 100644 --- a/sysdeps/m68k/m680x0/fpu/s_ccosh.c +++ b/sysdeps/m68k/m680x0/fpu/s_ccosh.c @@ -1,5 +1,5 @@ /* Complex cosine hyperbole function. m68k fpu version - Copyright (C) 1997, 1999, 2010 Free Software Foundation, Inc. + Copyright (C) 1997, 1999, 2010, 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab . @@ -67,7 +67,7 @@ s(__ccosh) (__complex__ float_type x) if (rx_cond & __M81_COND_INF) __real__ retval = s(fabs) (__real__ x); else - __real__ retval = 0.0/0.0; + __real__ retval = s(__nan) (""); __imag__ retval = __imag__ x - __imag__ x; } } From d8e510fa7f3452e1f4f9bb93dda06a7bf56d2eae Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 26 Feb 2012 15:52:19 +0100 Subject: [PATCH 4240/4487] m68k: remove __kernel_{sin,cos,tan} implementations --- ChangeLog.m68k | 12 +++++++++ sysdeps/m68k/m680x0/fpu/k_cos.c | 42 ----------------------------- sysdeps/m68k/m680x0/fpu/k_cosf.c | 3 --- sysdeps/m68k/m680x0/fpu/k_cosl.c | 4 +-- sysdeps/m68k/m680x0/fpu/k_sin.c | 45 -------------------------------- sysdeps/m68k/m680x0/fpu/k_sinf.c | 3 --- sysdeps/m68k/m680x0/fpu/k_sinl.c | 4 +-- sysdeps/m68k/m680x0/fpu/k_tan.c | 44 ------------------------------- sysdeps/m68k/m680x0/fpu/k_tanf.c | 4 +-- sysdeps/m68k/m680x0/fpu/k_tanl.c | 4 +-- 10 files changed, 16 insertions(+), 149 deletions(-) delete mode 100644 sysdeps/m68k/m680x0/fpu/k_cos.c delete mode 100644 sysdeps/m68k/m680x0/fpu/k_cosf.c delete mode 100644 sysdeps/m68k/m680x0/fpu/k_sin.c delete mode 100644 sysdeps/m68k/m680x0/fpu/k_sinf.c delete mode 100644 sysdeps/m68k/m680x0/fpu/k_tan.c diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 02d1355c0d..7104bd992b 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,15 @@ +2012-02-26 Andreas Schwab + + * sysdeps/m68k/m680x0/fpu/k_sinl.c: Replace by empty file. + * sysdeps/m68k/m680x0/fpu/k_cosl.c: Likewise. + * sysdeps/m68k/m680x0/fpu/k_tanf.c: Likewise. + * sysdeps/m68k/m680x0/fpu/k_tanl.c: Likewise. + * sysdeps/m68k/m680x0/fpu/k_sin.c: Remove. + * sysdeps/m68k/m680x0/fpu/k_sinf.c: Remove. + * sysdeps/m68k/m680x0/fpu/k_cos.c: Remove. + * sysdeps/m68k/m680x0/fpu/k_cosf.c: Remove. + * sysdeps/m68k/m680x0/fpu/k_tan.c: Remove. + 2012-02-25 Andreas Schwab * sysdeps/m68k/m680x0/fpu/s_ccosh.c: Avoid raising invalid diff --git a/sysdeps/m68k/m680x0/fpu/k_cos.c b/sysdeps/m68k/m680x0/fpu/k_cos.c deleted file mode 100644 index dd6c215c23..0000000000 --- a/sysdeps/m68k/m680x0/fpu/k_cos.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (C) 1996, 1997 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. */ - -#include -#include "math_private.h" - -#ifndef FUNC -#define FUNC cos -#endif -#ifndef float_type -#define float_type double -#endif - -#define __CONCATX(a,b) __CONCAT(a,b) - -float_type -__CONCATX(__kernel_,FUNC) (x, y) - float_type x; - float_type y; -{ - float_type sin_x, cos_x, sin_y, cos_y; - __asm__ __volatile__ ("fsincosx %2,%0:%1" : "=f" (cos_x), "=f" (sin_x) - : "f" (x)); - __asm__ __volatile__ ("fsincosx %2,%0:%1" : "=f" (cos_y), "=f" (sin_y) - : "f" (y)); - return cos_x * cos_y - sin_x * sin_y; -} diff --git a/sysdeps/m68k/m680x0/fpu/k_cosf.c b/sysdeps/m68k/m680x0/fpu/k_cosf.c deleted file mode 100644 index 2a366d094b..0000000000 --- a/sysdeps/m68k/m680x0/fpu/k_cosf.c +++ /dev/null @@ -1,3 +0,0 @@ -#define FUNC cosf -#define float_type float -#include diff --git a/sysdeps/m68k/m680x0/fpu/k_cosl.c b/sysdeps/m68k/m680x0/fpu/k_cosl.c index 983b66544c..1cc8931700 100644 --- a/sysdeps/m68k/m680x0/fpu/k_cosl.c +++ b/sysdeps/m68k/m680x0/fpu/k_cosl.c @@ -1,3 +1 @@ -#define FUNC cosl -#define float_type long double -#include +/* Not needed. */ diff --git a/sysdeps/m68k/m680x0/fpu/k_sin.c b/sysdeps/m68k/m680x0/fpu/k_sin.c deleted file mode 100644 index 652ca0e131..0000000000 --- a/sysdeps/m68k/m680x0/fpu/k_sin.c +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (C) 1996, 1997 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. */ - -#include -#include "math_private.h" - -#ifndef FUNC -#define FUNC sin -#endif -#ifndef float_type -#define float_type double -#endif - -#define __CONCATX(a,b) __CONCAT(a,b) - -float_type -__CONCATX(__kernel_,FUNC) (x, y, iy) - float_type x; - float_type y; - int iy; -{ - float_type sin_x, cos_x, sin_y, cos_y; - if (iy == 0) - return __m81_u(__CONCATX(__,FUNC)) (x); - __asm__ __volatile__ ("fsincosx %2,%0:%1" : "=f" (cos_x), "=f" (sin_x) - : "f" (x)); - __asm__ __volatile__ ("fsincosx %2,%0:%1" : "=f" (cos_y), "=f" (sin_y) - : "f" (y)); - return sin_x * cos_y + cos_x * sin_y; -} diff --git a/sysdeps/m68k/m680x0/fpu/k_sinf.c b/sysdeps/m68k/m680x0/fpu/k_sinf.c deleted file mode 100644 index 7050347c4b..0000000000 --- a/sysdeps/m68k/m680x0/fpu/k_sinf.c +++ /dev/null @@ -1,3 +0,0 @@ -#define FUNC sinf -#define float_type float -#include diff --git a/sysdeps/m68k/m680x0/fpu/k_sinl.c b/sysdeps/m68k/m680x0/fpu/k_sinl.c index 5a647cafd7..1cc8931700 100644 --- a/sysdeps/m68k/m680x0/fpu/k_sinl.c +++ b/sysdeps/m68k/m680x0/fpu/k_sinl.c @@ -1,3 +1 @@ -#define FUNC sinl -#define float_type long double -#include +/* Not needed. */ diff --git a/sysdeps/m68k/m680x0/fpu/k_tan.c b/sysdeps/m68k/m680x0/fpu/k_tan.c deleted file mode 100644 index 28f6a80cf5..0000000000 --- a/sysdeps/m68k/m680x0/fpu/k_tan.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (C) 1996, 1997 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. */ - -#include -#include "math_private.h" - -#ifndef FUNC -#define FUNC tan -#endif -#ifndef float_type -#define float_type double -#endif - -#define __CONCATX(a,b) __CONCAT(a,b) - -float_type -__CONCATX(__kernel_,FUNC) (x, y, iy) - float_type x; - float_type y; - int iy; -{ - float_type tan_x, tan_y; - tan_x = __m81_u(__CONCATX(__,FUNC)) (x); - tan_y = __m81_u(__CONCATX(__,FUNC)) (y); - if (iy > 0) - return (tan_x + tan_y) / (1 - tan_x * tan_y); - else - return (tan_x * tan_y - 1) / (tan_x + tan_y); -} diff --git a/sysdeps/m68k/m680x0/fpu/k_tanf.c b/sysdeps/m68k/m680x0/fpu/k_tanf.c index 777af1bf13..1cc8931700 100644 --- a/sysdeps/m68k/m680x0/fpu/k_tanf.c +++ b/sysdeps/m68k/m680x0/fpu/k_tanf.c @@ -1,3 +1 @@ -#define FUNC tanf -#define float_type float -#include +/* Not needed. */ diff --git a/sysdeps/m68k/m680x0/fpu/k_tanl.c b/sysdeps/m68k/m680x0/fpu/k_tanl.c index f2570e681f..1cc8931700 100644 --- a/sysdeps/m68k/m680x0/fpu/k_tanl.c +++ b/sysdeps/m68k/m680x0/fpu/k_tanl.c @@ -1,3 +1 @@ -#define FUNC tanl -#define float_type long double -#include +/* Not needed. */ From fba1e82f6c9883d3f0315bdc2ff964f45e408143 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 26 Feb 2012 17:06:00 +0100 Subject: [PATCH 4241/4487] m68k: remove unused fpu switch implementation --- ChangeLog.m68k | 3 + sysdeps/m68k/m680x0/fpu/Makefile | 11 --- sysdeps/m68k/m680x0/fpu/switch/68881-sw.h | 64 -------------- sysdeps/m68k/m680x0/fpu/switch/Makefile | 51 ----------- .../m68k/m680x0/fpu/switch/bits/mathinline.h | 1 - sysdeps/m68k/m680x0/fpu/switch/switch.c | 87 ------------------- 6 files changed, 3 insertions(+), 214 deletions(-) delete mode 100644 sysdeps/m68k/m680x0/fpu/Makefile delete mode 100644 sysdeps/m68k/m680x0/fpu/switch/68881-sw.h delete mode 100644 sysdeps/m68k/m680x0/fpu/switch/Makefile delete mode 100644 sysdeps/m68k/m680x0/fpu/switch/bits/mathinline.h delete mode 100644 sysdeps/m68k/m680x0/fpu/switch/switch.c diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 7104bd992b..3f5d3310c8 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,5 +1,8 @@ 2012-02-26 Andreas Schwab + * sysdeps/m68k/m680x0/fpu/Makefile: Remove. + * sysdeps/m68k/m680x0/fpu/switch: Remove directory. + * sysdeps/m68k/m680x0/fpu/k_sinl.c: Replace by empty file. * sysdeps/m68k/m680x0/fpu/k_cosl.c: Likewise. * sysdeps/m68k/m680x0/fpu/k_tanf.c: Likewise. diff --git a/sysdeps/m68k/m680x0/fpu/Makefile b/sysdeps/m68k/m680x0/fpu/Makefile deleted file mode 100644 index 42db6381d3..0000000000 --- a/sysdeps/m68k/m680x0/fpu/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -ifeq ($(subdir),math) -ifndef math-twiddled - -# Avoid twiddling in generic/Makefile. -math-twiddled := t - -endif - -bsdmath_dirs := $(bsdmath_dirs) mc68881 - -endif diff --git a/sysdeps/m68k/m680x0/fpu/switch/68881-sw.h b/sysdeps/m68k/m680x0/fpu/switch/68881-sw.h deleted file mode 100644 index c5a0f71fa6..0000000000 --- a/sysdeps/m68k/m680x0/fpu/switch/68881-sw.h +++ /dev/null @@ -1,64 +0,0 @@ -/* Copyright (C) 1991, 1992, 1997, 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 - 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 _68881_SWITCH_H - -#define _68881_SWITCH_H 1 -#include - -/* This is the format of the data at the code label for a function which - wants to switch depending on whether or not a 68881 is present. - - Initially, `insn' is a `jsr' instruction, and `target' is __68881_switch. - The first time such a function is called, __68881_switch determines whether - or not a 68881 is present, and modifies the function accordingly. - Then `insn' is a `jmp' instruction, and `target' is the value of `fpu' - if there is 68881, or the value of `soft' if not. */ - -struct switch_caller - { - unsigned short int insn; /* The `jsr' or `jmp' instruction. */ - void *target; /* The target of the instruction. */ - void *soft; /* The address of the soft function. */ - void *fpu; /* The address of the 68881 function. */ - }; - -/* These are opcodes (values for `insn', above) for `jmp' and `jsr' - instructions, respectively, to 32-bit absolute addresses. */ -#define JMP 0x4ef9 -#define JSR 0x4eb9 - - -/* Function to determine whether or not a 68881 is available, - and modify its caller (which must be a `struct switch_caller', above, - in data space) to use the appropriate version. */ -extern void __68881_switch (int __dummy) __THROW; - - -/* Define FUNCTION as a `struct switch_caller' which will call - `__FUNCTION_68881' if a 68881 is present, and `__FUNCTION_soft' if not. -#define switching_function(FUNCTION) \ - struct switch_caller FUNCTION = \ - { \ - JSR, (__ptr_t) __68881_switch, \ - __CONCAT(__CONCAT(__,FUNCTION),_soft), \ - __CONCAT(__CONCAT(__,FUNCTION),_68881) \ - } - - -#endif /* 68881-switch.h */ diff --git a/sysdeps/m68k/m680x0/fpu/switch/Makefile b/sysdeps/m68k/m680x0/fpu/switch/Makefile deleted file mode 100644 index c04107163c..0000000000 --- a/sysdeps/m68k/m680x0/fpu/switch/Makefile +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright (C) 1991, 1992, 1997 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. - -ifeq ($(subdir),math) - -sysdep_routines := $(sysdep_routines) switch - -# Find all the sources that have 68881 versions. -+68881-sources := \ - $(notdir $(wildcard $(addprefix $(filter %/fpu,$(sysdirs)),$(sources)))) - -# Sysdep directories other than fpu and fpu/switch (this one). -+non68881-dirs := $(filter-out %/fpu %/fpu/switch,$(+sysdep_dirs)) - -# Get a non-68881 version of the target. -+non68881-version = $(firstword $(wildcard $(addsuffix /$@,$(+non68881-dirs)))) - -# Directory containing 68881 sources. -+68881-dir := $(filter %/fpu,$(+sysdep_dirs)) - -# For all the files that have 68881 versions and don't exist already in -# the source directory (math), automatically make ones that switch between -# 68881 and soft versions. -$(addprefix $(objpfx), \ - $(filter-out $(wildcard $(+68881-sources)),$(+68881-sources))): - (echo '#include <68881-sw.h>' ;\ - echo '#define $* __$*_68881' ;\ - echo '#include <$(+68881-dir)/$@>' ;\ - echo '#undef $*' ;\ - echo '#define $* __$*_soft' ;\ - echo '#include <$(non68881-version)>' ;\ - echo '#undef $*' ;\ - echo 'switching_function($*);') > $@-tmp - mv $@-tmp $@ - -endif diff --git a/sysdeps/m68k/m680x0/fpu/switch/bits/mathinline.h b/sysdeps/m68k/m680x0/fpu/switch/bits/mathinline.h deleted file mode 100644 index c0f6966981..0000000000 --- a/sysdeps/m68k/m680x0/fpu/switch/bits/mathinline.h +++ /dev/null @@ -1 +0,0 @@ -/* We don't want any inlines when we might not have a 68881. */ diff --git a/sysdeps/m68k/m680x0/fpu/switch/switch.c b/sysdeps/m68k/m680x0/fpu/switch/switch.c deleted file mode 100644 index e0558176dc..0000000000 --- a/sysdeps/m68k/m680x0/fpu/switch/switch.c +++ /dev/null @@ -1,87 +0,0 @@ -/* Copyright (C) 1991, 1992, 1997 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. */ - -#include -#include <68881-sw.h> - - -/* The signal that is sent when a 68881 instruction - is executed and there is no 68881. */ -#ifndef TRAPSIG -#define TRAPSIG SIGILL -#endif - -/* Zero if no 68881, one if we have a 68881, or -1 if we don't know yet. */ -static int have_fpu = -1; - - -/* Signal handler for the trap that happens if we don't have a 68881. */ -static void -trap (sig) - int sig; -{ - have_fpu = 0; -} - -/* This function is called by functions that want to switch. - The calling function must be a `struct switch_caller' in data space. - It determines whether a 68881 is present, and modifies its caller - to be a static jump to either the 68881 version or the soft version. - It then returns into the function it has chosen to do the work. */ -void -__68881_switch (dummy) - int dummy; -{ - void **return_address_location = &((void **) &dummy)[-1]; - struct switch_caller *const caller - = (struct switch_caller *) (((short int *) *return_address_location) - 1); - - if (have_fpu < 0) - { - /* Figure out whether or not we have a 68881. */ - __sighandler_t handler = signal (TRAPSIG, trap); - if (handler == SIG_ERR) - /* We can't figure it out, so assume we don't have a 68881. - This assumption will never cause us any problems other than - lost performance, while the reverse assumption could cause - the program to crash. */ - have_fpu = 0; - else - { - /* We set `have_fpu' to nonzero, and then execute a 68881 - no-op instruction. If we have a 68881, this will do nothing. - If we don't have one, this will trap and the signal handler - will clear `have_fpu'. */ - have_fpu = 1; - asm ("fnop"); - - /* Restore the old signal handler. */ - (void) signal (TRAPSIG, handler); - } - } - - /* Modify the caller to be a jump to the appropriate address. */ - caller->insn = JMP; - caller->target = have_fpu ? caller->fpu : caller->soft; - - /* Make the address we will return to be the target we have chosen. - Our return will match the `jsr' done by the caller we have - just modified, and it will be just as if that had instead - been a `jmp' to the new target. */ - *return_address_location = caller->target; -} From 7ba6eb7c8ac8f884bec5633e843fca25f01590e4 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sun, 26 Feb 2012 19:39:00 +0000 Subject: [PATCH 4242/4487] ARM: name pthread_attr_t union. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 9eef7e7d62..7d23c114e6 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2012-02-26 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h: Name + pthread_attr_t union. + 2012-02-17 Aurelien Jarno * sysdeps/arm/libm-test-ulps: Adjust ULPs for jn tests. diff --git a/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h index e1b115c8ca..c75a506e18 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h +++ b/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2002-2012 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 @@ -38,7 +38,7 @@ typedef unsigned long int pthread_t; -typedef union +typedef union __pthread_attr { char __size[__SIZEOF_PTHREAD_ATTR_T]; long int __align; From 397c66b46502b1bc91e19ac7bbdcf3f3f515b1a7 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sun, 26 Feb 2012 19:39:23 +0000 Subject: [PATCH 4243/4487] MIPS: Name pthread_attr_t union, use it in sigevent, don't name siginfo_t struct. --- ChangeLog.mips | 8 ++++++++ sysdeps/unix/sysv/linux/mips/bits/siginfo.h | 10 ++++++---- sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h | 4 ++-- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index bcea57fb66..9442105b04 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,11 @@ +2012-02-26 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/siginfo.h: Don't name + siginfo_t struct. Add forward declaration of pthread_attr_t and + use it in sigevent. + * sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h: Name + pthread_attr_t union. + 2012-02-21 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/epoll.h: New file. diff --git a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h index 484668f449..3d776e2d43 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h +++ b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h @@ -1,6 +1,5 @@ /* siginfo_t, sigevent and constants. Linux/MIPS version. - Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2011 - Free Software Foundation, Inc. + Copyright (C) 1997-2012 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 @@ -50,7 +49,7 @@ typedef union sigval # endif -typedef struct siginfo +typedef struct { int si_signo; /* Signal number. */ int si_code; /* Signal code. */ @@ -274,6 +273,9 @@ enum # define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3) # endif +/* Forward declaration. */ +typedef union __pthread_attr pthread_attr_t; + typedef struct sigevent { sigval_t sigev_value; @@ -291,7 +293,7 @@ typedef struct sigevent struct { void (*_function) (sigval_t); /* Function to start. */ - void *_attribute; /* Really pthread_attr_t. */ + pthread_attr_t *_attribute; /* Thread attributes. */ } _sigev_thread; } _sigev_un; } sigevent_t; diff --git a/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h index 166a6c6aee..87a25daabf 100644 --- a/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h +++ b/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h @@ -1,5 +1,5 @@ /* Machine-specific pthread type layouts. MIPS version. - Copyright (C) 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 2005-2012 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 @@ -50,7 +50,7 @@ typedef unsigned long int pthread_t; -typedef union +typedef union __pthread_attr { char __size[__SIZEOF_PTHREAD_ATTR_T]; long int __align; From 2abba740a95273470ffc104979a193c8a9600990 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 26 Feb 2012 20:10:50 +0100 Subject: [PATCH 4244/4487] m68k: name pthread_attr_t union --- ChangeLog.m68k | 3 +++ sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 3f5d3310c8..172594c7e0 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,5 +1,8 @@ 2012-02-26 Andreas Schwab + * sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h: Name + pthread_attr_t union. + * sysdeps/m68k/m680x0/fpu/Makefile: Remove. * sysdeps/m68k/m680x0/fpu/switch: Remove directory. diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h index 832609d543..7edd28ef4c 100644 --- a/sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h +++ b/sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010 Free Software Foundation, Inc. +/* Copyright (C) 2010, 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Maxim Kuvyrkov , 2010. @@ -38,7 +38,7 @@ typedef unsigned long int pthread_t; -typedef union +typedef union __pthread_attr { char __size[__SIZEOF_PTHREAD_ATTR_T]; long int __align; From d735f8d4f0290b443ca09d26d9d2272752cac266 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 27 Feb 2012 14:57:16 +0100 Subject: [PATCH 4245/4487] m68k: fix name of pthread_attr_t union --- ChangeLog.m68k | 5 +++++ sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 172594c7e0..c84aad6115 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2012-02-27 Andreas Schwab + + * sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h + (pthread_attr_t): Fix name of union. + 2012-02-26 Andreas Schwab * sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h: Name diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h index 7edd28ef4c..fe6e2b576b 100644 --- a/sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h +++ b/sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h @@ -38,7 +38,7 @@ typedef unsigned long int pthread_t; -typedef union __pthread_attr +typedef union pthread_attr_t { char __size[__SIZEOF_PTHREAD_ATTR_T]; long int __align; From e7c0dc24ea997ace937eaa3df7fb20b01eb95d14 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 27 Feb 2012 15:14:04 +0000 Subject: [PATCH 4246/4487] ARM: fix pthread_attr_t definitions. --- ChangeLog.arm | 6 ++++++ sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 7d23c114e6..982699cb24 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,9 @@ +2012-02-27 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h + (pthread_attr_t): Change union tag to pthread_attr_t. Only define + typedef if not already defined. + 2012-02-26 Joseph Myers * sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h: Name diff --git a/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h index c75a506e18..bb186aec06 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h +++ b/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h @@ -38,11 +38,15 @@ typedef unsigned long int pthread_t; -typedef union __pthread_attr +union pthread_attr_t { char __size[__SIZEOF_PTHREAD_ATTR_T]; long int __align; -} pthread_attr_t; +}; +#ifndef __have_pthread_attr_t +typedef union pthread_attr_t pthread_attr_t; +# define __have_pthread_attr_t 1 +#endif typedef struct __pthread_internal_slist From 7bb9ccad9c0dceea327d7ac41a3cf4ea6d284423 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 27 Feb 2012 15:14:41 +0000 Subject: [PATCH 4247/4487] MIPS: fix pthread_attr_t definitions. --- ChangeLog.mips | 9 +++++++++ sysdeps/unix/sysv/linux/mips/bits/siginfo.h | 5 ++++- sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h | 8 ++++++-- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 9442105b04..3198ace743 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,12 @@ +2012-02-27 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/siginfo.h (pthread_attr_t): + Change union tag to pthread_attr_t. Only define typedef if not + already defined. + * sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h + (pthread_attr_t): Change union tag to pthread_attr_t. Only define + typedef if not already defined. + 2012-02-26 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/siginfo.h: Don't name diff --git a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h index 3d776e2d43..19975fb0a0 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h +++ b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h @@ -274,7 +274,10 @@ enum # endif /* Forward declaration. */ -typedef union __pthread_attr pthread_attr_t; +# ifndef __have_pthread_attr_t +typedef union pthread_attr_t pthread_attr_t; +# define __have_pthread_attr_t 1 +# endif typedef struct sigevent { diff --git a/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h index 87a25daabf..a479f2dec0 100644 --- a/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h +++ b/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h @@ -50,11 +50,15 @@ typedef unsigned long int pthread_t; -typedef union __pthread_attr +union pthread_attr_t { char __size[__SIZEOF_PTHREAD_ATTR_T]; long int __align; -} pthread_attr_t; +}; +#ifndef __have_pthread_attr_t +typedef union pthread_attr_t pthread_attr_t; +# define __have_pthread_attr_t 1 +#endif #if _MIPS_SIM == _ABI64 From bf8becc54bb3a666872148110d8e2d33388d4c40 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 27 Feb 2012 15:54:30 +0000 Subject: [PATCH 4248/4487] MIPS: do not declare recvmmsg and sendmmsg for !__USE_GNU. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/bits/socket.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog.mips b/ChangeLog.mips index 3198ace743..730e42683d 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2012-02-27 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/socket.h [!__USE_GNU]: Do not + declare recvmmsg and sendmmsg. + 2012-02-27 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/siginfo.h (pthread_attr_t): diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h index cfd7dd778c..eac3bcd9ed 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/socket.h +++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h @@ -417,6 +417,7 @@ struct linger __BEGIN_DECLS +#ifdef __USE_GNU /* Receive up to VLEN messages as described by VMESSAGES from socket FD. Returns the number of bytes read or -1 for errors. @@ -432,6 +433,7 @@ This function is a cancellation point and therefore not marked with __THROW. */ extern int sendmmsg (int __fd, struct mmsghdr *__vmessages, unsigned int __vlen, int __flags); +#endif __END_DECLS From 175763ab6860299accaf5270470e7f35fb8d7c96 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 27 Feb 2012 21:15:54 +0100 Subject: [PATCH 4249/4487] m68k: only define pthread_attr_t if not already defined --- ChangeLog.m68k | 3 ++- sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index c84aad6115..1d3e77b324 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,7 +1,8 @@ 2012-02-27 Andreas Schwab * sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h - (pthread_attr_t): Fix name of union. + (pthread_attr_t): Fix name of union. Only define if not already + defined. 2012-02-26 Andreas Schwab diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h index fe6e2b576b..588c928f71 100644 --- a/sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h +++ b/sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h @@ -38,11 +38,15 @@ typedef unsigned long int pthread_t; -typedef union pthread_attr_t +union pthread_attr_t { char __size[__SIZEOF_PTHREAD_ATTR_T]; long int __align; -} pthread_attr_t; +}; +#ifndef __have_pthread_attr_t +typedef union pthread_attr_t pthread_attr_t; +# define __have_pthread_attr_t 1 +#endif typedef struct __pthread_internal_slist From 79c5cebc4a566a94533ab957af21ccbff3c83240 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 2 Mar 2012 22:26:47 +0100 Subject: [PATCH 4250/4487] m68k: update libm test ULPs --- ChangeLog.m68k | 4 + sysdeps/m68k/m680x0/fpu/libm-test-ulps | 514 +++++++++++++++++++++++++ 2 files changed, 518 insertions(+) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 1d3e77b324..1ab074f9f5 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,7 @@ +2012-03-02 Andreas Schwab + + * sysdeps/m68k/m680x0/fpu/libm-test-ulps: Update ULPs. + 2012-02-27 Andreas Schwab * sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h diff --git a/sysdeps/m68k/m680x0/fpu/libm-test-ulps b/sysdeps/m68k/m680x0/fpu/libm-test-ulps index 5f965d2f2c..f884644f72 100644 --- a/sysdeps/m68k/m680x0/fpu/libm-test-ulps +++ b/sysdeps/m68k/m680x0/fpu/libm-test-ulps @@ -269,6 +269,125 @@ ifloat: 1 ildouble: 1 ldouble: 1 +# cos_downward +Test "cos_downward (1) == 0.5403023058681397174009366074429766037323": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "cos_downward (10) == -0.8390715290764524522588639478240648345199": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "cos_downward (3) == -0.9899924966004454572715727947312613023937": +double: 1 +idouble: 1 +Test "cos_downward (4) == -0.6536436208636119146391681830977503814241": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_downward (5) == 0.2836621854632262644666391715135573083344": +float: 1 +ifloat: 1 +Test "cos_downward (7) == 0.7539022543433046381411975217191820122183": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_downward (8) == -0.1455000338086135258688413818311946826093": +ildouble: 1 +ldouble: 1 +Test "cos_downward (9) == -0.9111302618846769883682947111811653112463": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# cos_towardzero +Test "cos_towardzero (1) == 0.5403023058681397174009366074429766037323": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "cos_towardzero (10) == -0.8390715290764524522588639478240648345199": +ildouble: 1 +ldouble: 1 +Test "cos_towardzero (2) == -0.4161468365471423869975682295007621897660": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_towardzero (3) == -0.9899924966004454572715727947312613023937": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_towardzero (4) == -0.6536436208636119146391681830977503814241": +double: 1 +idouble: 1 +Test "cos_towardzero (5) == 0.2836621854632262644666391715135573083344": +float: 1 +ifloat: 1 +Test "cos_towardzero (7) == 0.7539022543433046381411975217191820122183": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_towardzero (8) == -0.1455000338086135258688413818311946826093": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# cos_upward +Test "cos_upward (1) == 0.5403023058681397174009366074429766037323": +float: 1 +ifloat: 1 +Test "cos_upward (10) == -0.8390715290764524522588639478240648345199": +ildouble: 1 +ldouble: 1 +Test "cos_upward (2) == -0.4161468365471423869975682295007621897660": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_upward (3) == -0.9899924966004454572715727947312613023937": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_upward (4) == -0.6536436208636119146391681830977503814241": +double: 1 +idouble: 1 +Test "cos_upward (5) == 0.2836621854632262644666391715135573083344": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "cos_upward (6) == 0.9601702866503660205456522979229244054519": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_upward (7) == 0.7539022543433046381411975217191820122183": +double: 1 +idouble: 1 +Test "cos_upward (8) == -0.1455000338086135258688413818311946826093": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + # cpow Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": float: 1 @@ -406,6 +525,17 @@ ldouble: 1 Test "erfc (0.75) == 0.288844366346484868401062165408589223": float: 1 ifloat: 1 +Test "erfc (0x1.f7303cp+1) == 2.705500297238986897105236321218861842255e-8": +ildouble: 1 +ldouble: 1 +Test "erfc (0x1.ffa002p+2) == 1.233585992097580296336099501489175967033e-29": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "erfc (0x1.ffffc8p+2) == 1.122671365033056305522366683719541099329e-29": +ildouble: 1 +ldouble: 1 Test "erfc (1.25) == 0.0770998717435417698634765188027188596": ildouble: 1 ldouble: 1 @@ -418,6 +548,51 @@ ifloat: 1 ildouble: 1 ldouble: 1 +# exp_downward +Test "exp_downward (1) == e": +ildouble: 1 +ldouble: 1 +Test "exp_downward (2) == e^2": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "exp_downward (3) == e^3": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# exp_towardzero +Test "exp_towardzero (1) == e": +ildouble: 1 +ldouble: 1 +Test "exp_towardzero (2) == e^2": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "exp_towardzero (3) == e^3": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# exp_upward +Test "exp_upward (1) == e": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + # expm1 Test "expm1 (1) == M_El - 1.0": ildouble: 1 @@ -715,6 +890,123 @@ ifloat: 1 ildouble: 7 ldouble: 7 +# sin_downward +Test "sin_downward (1) == 0.8414709848078965066525023216302989996226": +ildouble: 1 +ldouble: 1 +Test "sin_downward (10) == -0.5440211108893698134047476618513772816836": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "sin_downward (2) == 0.9092974268256816953960198659117448427023": +double: 1 +idouble: 1 +Test "sin_downward (3) == 0.1411200080598672221007448028081102798469": +ildouble: 1 +ldouble: 1 +Test "sin_downward (4) == -0.7568024953079282513726390945118290941359": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "sin_downward (5) == -0.9589242746631384688931544061559939733525": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "sin_downward (6) == -0.2794154981989258728115554466118947596280": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "sin_downward (7) == 0.6569865987187890903969990915936351779369": +ildouble: 1 +ldouble: 1 +Test "sin_downward (8) == 0.9893582466233817778081235982452886721164": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "sin_downward (9) == 0.4121184852417565697562725663524351793439": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# sin_towardzero +Test "sin_towardzero (1) == 0.8414709848078965066525023216302989996226": +ildouble: 1 +ldouble: 1 +Test "sin_towardzero (10) == -0.5440211108893698134047476618513772816836": +float: 1 +ifloat: 1 +Test "sin_towardzero (2) == 0.9092974268256816953960198659117448427023": +double: 1 +idouble: 1 +Test "sin_towardzero (3) == 0.1411200080598672221007448028081102798469": +ildouble: 1 +ldouble: 1 +Test "sin_towardzero (4) == -0.7568024953079282513726390945118290941359": +float: 1 +ifloat: 1 +Test "sin_towardzero (5) == -0.9589242746631384688931544061559939733525": +float: 1 +ifloat: 1 +Test "sin_towardzero (7) == 0.6569865987187890903969990915936351779369": +ildouble: 1 +ldouble: 1 +Test "sin_towardzero (8) == 0.9893582466233817778081235982452886721164": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "sin_towardzero (9) == 0.4121184852417565697562725663524351793439": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# sin_upward +Test "sin_upward (1) == 0.8414709848078965066525023216302989996226": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "sin_upward (10) == -0.5440211108893698134047476618513772816836": +float: 1 +ifloat: 1 +Test "sin_upward (2) == 0.9092974268256816953960198659117448427023": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "sin_upward (3) == 0.1411200080598672221007448028081102798469": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "sin_upward (4) == -0.7568024953079282513726390945118290941359": +float: 1 +ifloat: 1 +Test "sin_upward (5) == -0.9589242746631384688931544061559939733525": +float: 1 +ifloat: 1 +Test "sin_upward (7) == 0.6569865987187890903969990915936351779369": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "sin_upward (8) == 0.9893582466233817778081235982452886721164": +float: 1 +ifloat: 1 + # sincos Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": double: 1 @@ -751,6 +1043,134 @@ Test "tan (pi/4) == 1": double: 1 idouble: 1 +# tan_downward +Test "tan_downward (1) == 1.5574077246549022305069748074583601730873": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "tan_downward (10) == 0.6483608274590866712591249330098086768169": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "tan_downward (2) == -2.1850398632615189916433061023136825434320": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "tan_downward (3) == -0.1425465430742778052956354105339134932261": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "tan_downward (4) == 1.1578212823495775831373424182673239231198": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "tan_downward (5) == -3.3805150062465856369827058794473439087096": +ildouble: 1 +ldouble: 1 +Test "tan_downward (6) == -0.2910061913847491570536995888681755428312": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "tan_downward (7) == 0.8714479827243187364564508896003135663222": +double: 1 +idouble: 1 +Test "tan_downward (8) == -6.7997114552203786999252627596086333648814": +float: 1 +ifloat: 1 +Test "tan_downward (9) == -0.4523156594418098405903708757987855343087": +float: 1 +ifloat: 1 + +# tan_towardzero +Test "tan_towardzero (1) == 1.5574077246549022305069748074583601730873": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "tan_towardzero (10) == 0.6483608274590866712591249330098086768169": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "tan_towardzero (2) == -2.1850398632615189916433061023136825434320": +ildouble: 1 +ldouble: 1 +Test "tan_towardzero (3) == -0.1425465430742778052956354105339134932261": +float: 1 +ifloat: 1 +Test "tan_towardzero (4) == 1.1578212823495775831373424182673239231198": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "tan_towardzero (5) == -3.3805150062465856369827058794473439087096": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "tan_towardzero (6) == -0.2910061913847491570536995888681755428312": +ildouble: 1 +ldouble: 1 +Test "tan_towardzero (7) == 0.8714479827243187364564508896003135663222": +double: 1 +idouble: 1 +Test "tan_towardzero (8) == -6.7997114552203786999252627596086333648814": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "tan_towardzero (9) == -0.4523156594418098405903708757987855343087": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +# tan_upward +Test "tan_upward (1) == 1.5574077246549022305069748074583601730873": +ildouble: 1 +ldouble: 1 +Test "tan_upward (10) == 0.6483608274590866712591249330098086768169": +double: 1 +idouble: 1 +Test "tan_upward (2) == -2.1850398632615189916433061023136825434320": +ildouble: 1 +ldouble: 1 +Test "tan_upward (3) == -0.1425465430742778052956354105339134932261": +float: 1 +ifloat: 1 +Test "tan_upward (4) == 1.1578212823495775831373424182673239231198": +double: 1 +idouble: 1 +Test "tan_upward (5) == -3.3805150062465856369827058794473439087096": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "tan_upward (6) == -0.2910061913847491570536995888681755428312": +ildouble: 1 +ldouble: 1 +Test "tan_upward (7) == 0.8714479827243187364564508896003135663222": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "tan_upward (8) == -6.7997114552203786999252627596086333648814": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "tan_upward (9) == -0.4523156594418098405903708757987855343087": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + # tgamma Test "tgamma (-0.5) == -2 sqrt (pi)": double: 1 @@ -1081,6 +1501,30 @@ ifloat: 1 ildouble: 1 ldouble: 1 +Function: "cos_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "cos_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "cos_upward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + Function: Real part of "cpow": double: 1 float: 3 @@ -1145,6 +1589,28 @@ ifloat: 1 ildouble: 1 ldouble: 1 +Function: "exp_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "exp_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "exp_upward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + Function: "expm1": ildouble: 1 ldouble: 1 @@ -1213,6 +1679,30 @@ ifloat: 1 ildouble: 7 ldouble: 7 +Function: "sin_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "sin_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "sin_upward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + Function: "sincos": double: 1 float: 1 @@ -1231,6 +1721,30 @@ idouble: 1 ildouble: 1 ldouble: 1 +Function: "tan_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "tan_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "tan_upward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + Function: "tgamma": double: 1 float: 1 From 541427964427b96ad8433a23e171dd23d4b93451 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sun, 4 Mar 2012 11:30:01 -0800 Subject: [PATCH 4251/4487] alpha: Update for pthread_attr_t typedef changes. --- ChangeLog.alpha | 9 +++++++++ sysdeps/unix/sysv/linux/alpha/bits/siginfo.h | 12 +++++++++--- .../unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h | 11 +++++++---- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 32e851528c..0b731b7e99 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,12 @@ +2012-03-04 Richard Henderson + + * sysdeps/unix/sysv/linux/alpha/bits/siginfo.h: Don't name the + siginfo_t struct. Add forward declaration of pthread_attr_t; + use it in sigevent. + * sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h + (pthread_attr_t): Add union tag to pthread_attr_t; only define + typedef if not already defined. + 2012-02-21 Richard Henderson * sysdeps/unix/sysv/linux/alpha/bits/epoll.h: New file. diff --git a/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h b/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h index a2aacc04b1..8d0c716538 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h @@ -1,5 +1,5 @@ /* siginfo_t, sigevent and constants. Linux/Alpha version. - Copyright (C) 1997-2002, 2003 Free Software Foundation, Inc. + Copyright (C) 1997-2012 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 @@ -42,7 +42,7 @@ typedef union sigval # define __SI_MAX_SIZE 128 # define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 4) -typedef struct siginfo +typedef struct { int si_signo; /* Signal number. */ int si_errno; /* If non-zero, an errno value associated with @@ -260,6 +260,12 @@ enum # define __SIGEV_MAX_SIZE 64 # define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4) +/* Forward declaration. */ +#ifndef __have_pthread_attr_t +typedef union pthread_attr_t pthread_attr_t; +# define __have_pthread_attr_t 1 +#endif + typedef struct sigevent { sigval_t sigev_value; @@ -277,7 +283,7 @@ typedef struct sigevent struct { void (*_function) (sigval_t); /* Function to start. */ - void *_attribute; /* Really pthread_attr_t. */ + pthread_attr_t *_attribute; /* Thread attributes. */ } _sigev_thread; } _sigev_un; } sigevent_t; diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h index 41c0be1978..bea9955fd0 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h @@ -1,5 +1,5 @@ /* Machine-specific pthread type layouts. Alpha version. - Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. + Copyright (C) 2003-2012 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 @@ -36,12 +36,15 @@ typedef unsigned long int pthread_t; -typedef union +union pthread_attr_t { char __size[__SIZEOF_PTHREAD_ATTR_T]; long int __align; -} pthread_attr_t; - +}; +#ifndef __have_pthread_attr_t +typedef union pthread_attr_t pthread_attr_t; +# define __have_pthread_attr_t 1 +#endif typedef struct __pthread_internal_list { From dff6d471565929a22addcc0342901954069df3a7 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sun, 4 Mar 2012 12:02:55 -0800 Subject: [PATCH 4252/4487] alpha: Update recvmmsg and sendmmsg declarations. --- ChangeLog.alpha | 6 ++++++ sysdeps/unix/sysv/linux/alpha/bits/socket.h | 17 ++++++++++++----- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 0b731b7e99..cc1b18e895 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,9 @@ +2012-03-04 Richard Henderson + + * sysdeps/unix/sysv/linux/alpha/bits/socket.h (recvmmsg): Only + declare if __USE_GNU. + (sendmmsg): Add declaration. + 2012-03-04 Richard Henderson * sysdeps/unix/sysv/linux/alpha/bits/siginfo.h: Don't name the diff --git a/sysdeps/unix/sysv/linux/alpha/bits/socket.h b/sysdeps/unix/sysv/linux/alpha/bits/socket.h index a39629cc53..238538e3c4 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/socket.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/socket.h @@ -1,6 +1,5 @@ /* System-specific socket constants and types. Linux version. - Copyright (C) 1991, 1992, 1994-2001, 2004, 2006, 2007, 2008, 2009, 2010 - Free Software Foundation, Inc. + Copyright (C) 1991-2012 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 @@ -417,14 +416,22 @@ struct linger __BEGIN_DECLS -/* Receive a message as described by MESSAGE from socket FD. +#ifdef __USE_GNU +/* Receive up to VLEN messages as described by VMESSAGES from socket FD. Returns the number of bytes read or -1 for errors. - This function is a cancellation point and therefore not marked with __THROW. */ extern int recvmmsg (int __fd, struct mmsghdr *__vmessages, unsigned int __vlen, int __flags, - __const struct timespec *__tmo); + const struct timespec *__tmo); + +/* Send a VLEN messages as described by VMESSAGES to socket FD. + Return the number of datagrams successfully written or -1 for errors. + This function is a cancellation point and therefore not marked with + __THROW. */ +extern int sendmmsg (int __fd, struct mmsghdr *__vmessages, + unsigned int __vlen, int __flags); +#endif __END_DECLS From ee78ea885acb1292c7fe314327ff77485b658cf2 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sun, 4 Mar 2012 12:03:59 -0800 Subject: [PATCH 4253/4487] alpha: Avoid -Winline warning in ioperm.c. Specifically: warning: inlining failed in call to 'inline_sethae.part.1': call is unlikely and code size would grow [-Winline] --- ChangeLog.alpha | 5 +++++ sysdeps/unix/sysv/linux/alpha/ioperm.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index cc1b18e895..c4ebcd9060 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,8 @@ +2012-03-04 Richard Henderson + + * sysdeps/unix/sysv/linux/alpha/ioperm.c (inline_sethae): Mark + as always_inline. + 2012-03-04 Richard Henderson * sysdeps/unix/sysv/linux/alpha/bits/socket.h (recvmmsg): Only diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c index 32e96ec2f2..b4e420b1d4 100644 --- a/sysdeps/unix/sysv/linux/alpha/ioperm.c +++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c @@ -220,7 +220,7 @@ port_to_cpu_addr (unsigned long int port, ioswizzle_t ioswiz, int size) return io.base + (port << 7) + ((size - 1) << 5); } -static inline void +static inline __attribute__((always_inline)) void inline_sethae (unsigned long int addr, ioswizzle_t ioswiz) { if (ioswiz == IOSWIZZLE_SPARSE) From a64b8a466bc44971ecc8ad6a32425f09831d2583 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Mon, 5 Mar 2012 10:37:28 -0500 Subject: [PATCH 4254/4487] HPPA: Update socket.h, pthreadtypes.h and pthread.h Synchronize from core libc headers. --- ChangeLog.hppa | 7 +++ sysdeps/unix/sysv/linux/hppa/bits/socket.h | 61 +++++++++++++++---- .../sysv/linux/hppa/nptl/bits/pthreadtypes.h | 8 ++- sysdeps/unix/sysv/linux/hppa/nptl/pthread.h | 11 ++-- 4 files changed, 67 insertions(+), 20 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index e7a80e50d0..842d1bf5eb 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,10 @@ +2012-03-03 Carlos O'Donell + + * sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h: Name + pthread_attr_t union. + * sysdeps/unix/sysv/linux/hppa/nptl/pthread.h: Sync from libc copy. + * sysdeps/unix/sysv/linux/hppa/bits/socket.h: Likewise. + 2012-01-08 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/sys/epoll.h (EPOLLONESHOT) diff --git a/sysdeps/unix/sysv/linux/hppa/bits/socket.h b/sysdeps/unix/sysv/linux/hppa/bits/socket.h index 05814a0021..7870f751ef 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/socket.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/socket.h @@ -1,6 +1,5 @@ /* System-specific socket constants and types. Linux version. - Copyright (C) 1991, 1992, 1994-2001, 2004, 2006, 2007, 2008, 2009, - 2010 Free Software Foundation, Inc. + Copyright (C) 1991-2012 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 @@ -14,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #ifndef __BITS_SOCKET_H #define __BITS_SOCKET_H @@ -65,7 +63,6 @@ enum __socket_type SOCK_CLOEXEC = 010000000, /* Atomically set close-on-exec flag for the new descriptor(s). */ #define SOCK_CLOEXEC SOCK_CLOEXEC -#undef SOCK_NONBLOCK SOCK_NONBLOCK = 0x40000000 /* Atomically mark descriptor(s) as non-blocking. */ #define SOCK_NONBLOCK SOCK_NONBLOCK @@ -110,7 +107,10 @@ enum __socket_type #define PF_ISDN 34 /* mISDN sockets. */ #define PF_PHONET 35 /* Phonet sockets. */ #define PF_IEEE802154 36 /* IEEE 802.15.4 sockets. */ -#define PF_MAX 37 /* For now.. */ +#define PF_CAIF 37 /* CAIF sockets. */ +#define PF_ALG 38 /* Algorithm sockets. */ +#define PF_NFC 39 /* NFC sockets. */ +#define PF_MAX 40 /* For now.. */ /* Address families. */ #define AF_UNSPEC PF_UNSPEC @@ -151,6 +151,9 @@ enum __socket_type #define AF_ISDN PF_ISDN #define AF_PHONET PF_PHONET #define AF_IEEE802154 PF_IEEE802154 +#define AF_CAIF PF_CAIF +#define AF_ALG PF_ALG +#define AF_NFC PF_NFC #define AF_MAX PF_MAX /* Socket level values. Others are defined in the appropriate headers. @@ -233,12 +236,12 @@ enum #define MSG_NOSIGNAL MSG_NOSIGNAL MSG_MORE = 0x8000, /* Sender will send more. */ #define MSG_MORE MSG_MORE - MSG_WAITFORONE = 0x10000, /* Wait for at least one packet to return.*/ -#define MSG_WAITFORONE MSG_WAITFORONE + MSG_WAITFORONE = 0x10000, /* Wait for at least one packet to return.*/ +#define MSG_WAITFORONE MSG_WAITFORONE MSG_CMSG_CLOEXEC = 0x40000000 /* Set close_on_exit for file - descriptor received through - SCM_RIGHTS. */ + descriptor received through + SCM_RIGHTS. */ #define MSG_CMSG_CLOEXEC MSG_CMSG_CLOEXEC }; @@ -262,6 +265,15 @@ struct msghdr int msg_flags; /* Flags on received message. */ }; +#ifdef __USE_GNU +/* For `recvmmsg'. */ +struct mmsghdr + { + struct msghdr msg_hdr; /* Actual message header. */ + unsigned int msg_len; /* Number of received bytes for the entry. */ + }; +#endif + /* Structure used for storage of ancillary data object information. */ struct cmsghdr { @@ -304,7 +316,7 @@ __NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg)) { if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr)) /* The kernel header does this so there may be a reason. */ - return 0; + return (struct cmsghdr *) 0; __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)); @@ -313,7 +325,7 @@ __NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg)) || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len) > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen))) /* No more entries. */ - return 0; + return (struct cmsghdr *) 0; return __cmsg; } #endif /* Use `extern inline'. */ @@ -406,4 +418,27 @@ struct linger int l_linger; /* Time to linger. */ }; + +__BEGIN_DECLS + +#ifdef __USE_GNU +/* Receive up to VLEN messages as described by VMESSAGES from socket FD. + Returns the number of bytes read or -1 for errors. + + This function is a cancellation point and therefore not marked with + __THROW. */ +extern int recvmmsg (int __fd, struct mmsghdr *__vmessages, + unsigned int __vlen, int __flags, + const struct timespec *__tmo); + +/* Send a VLEN messages as described by VMESSAGES to socket FD. + Return the number of datagrams successfully written or -1 for errors. +This function is a cancellation point and therefore not marked with + __THROW. */ +extern int sendmmsg (int __fd, struct mmsghdr *__vmessages, + unsigned int __vlen, int __flags); +#endif + +__END_DECLS + #endif /* bits/socket.h */ diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h index 952e53c933..afd37d32cf 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h +++ b/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h @@ -45,11 +45,15 @@ exposed on purpose. */ typedef unsigned long int pthread_t; -typedef union +union pthread_attr_t { char __size[__SIZEOF_PTHREAD_ATTR_T]; long int __align; -} pthread_attr_t; +}; +#ifndef __have_pthread_attr_t +typedef union pthread_attr_t pthread_attr_t; +# define __have_pthread_attr_t 1 +#endif typedef struct __pthread_internal_slist diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pthread.h b/sysdeps/unix/sysv/linux/hppa/nptl/pthread.h index 8bb30c9493..6a0d953545 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/pthread.h +++ b/sysdeps/unix/sysv/linux/hppa/nptl/pthread.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #ifndef _PTHREAD_H #define _PTHREAD_H 1 @@ -22,6 +21,7 @@ #include #include #include +#define __need_timespec #include #include @@ -72,7 +72,7 @@ enum #endif -#ifdef __USE_UNIX98 +#if defined __USE_POSIX199506 || defined __USE_UNIX98 /* Mutex protocols. */ enum { @@ -266,7 +266,8 @@ extern int pthread_detach (pthread_t __th) __THROW; extern pthread_t pthread_self (void) __THROW __attribute__ ((__const__)); /* Compare two thread identifiers. */ -extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) __THROW; +extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) + __THROW __attribute__ ((__const__)); /* Thread attribute handling. */ From 052178e6132542bc2d3a29ee94c8e1fb198c84da Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 5 Mar 2012 16:50:44 +0100 Subject: [PATCH 4255/4487] m68k: update libm test ULPs --- ChangeLog.m68k | 4 + sysdeps/m68k/m680x0/fpu/libm-test-ulps | 195 +++++++++++++++++++++++++ 2 files changed, 199 insertions(+) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 1ab074f9f5..0f1354d7a4 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,7 @@ +2012-03-05 Andreas Schwab + + * sysdeps/m68k/m680x0/fpu/libm-test-ulps: Update. + 2012-03-02 Andreas Schwab * sysdeps/m68k/m680x0/fpu/libm-test-ulps: Update ULPs. diff --git a/sysdeps/m68k/m680x0/fpu/libm-test-ulps b/sysdeps/m68k/m680x0/fpu/libm-test-ulps index f884644f72..8fa326d1ba 100644 --- a/sysdeps/m68k/m680x0/fpu/libm-test-ulps +++ b/sysdeps/m68k/m680x0/fpu/libm-test-ulps @@ -388,6 +388,52 @@ float: 1 idouble: 1 ifloat: 1 +# cosh_downward +Test "cosh_downward (22) == 1792456423.065795780980053377632656584997": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "cosh_downward (23) == 4872401723.124451300068625740569997090344": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cosh_downward (24) == 13244561064.92173614708845674912733665919": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# cosh_towardzero +Test "cosh_towardzero (22) == 1792456423.065795780980053377632656584997": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "cosh_towardzero (23) == 4872401723.124451300068625740569997090344": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cosh_towardzero (24) == 13244561064.92173614708845674912733665919": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# cosh_upward +Test "cosh_upward (22) == 1792456423.065795780980053377632656584997": +ildouble: 1 +ldouble: 1 +Test "cosh_upward (24) == 13244561064.92173614708845674912733665919": +double: 1 +idouble: 1 + # cpow Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": float: 1 @@ -890,6 +936,42 @@ ifloat: 1 ildouble: 7 ldouble: 7 +# pow_downward +Test "pow_downward (1.0625, 1.125) == 1.070582293028761362162622578677070098674": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "pow_downward (1.5, 1.03125) == 1.519127098714743184071644334163037684948": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# pow_towardzero +Test "pow_towardzero (1.0625, 1.125) == 1.070582293028761362162622578677070098674": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "pow_towardzero (1.5, 1.03125) == 1.519127098714743184071644334163037684948": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# pow_upward +Test "pow_upward (1.0625, 1.125) == 1.070582293028761362162622578677070098674": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "pow_upward (1.5, 1.03125) == 1.519127098714743184071644334163037684948": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + # sin_downward Test "sin_downward (1) == 0.8414709848078965066525023216302989996226": ildouble: 1 @@ -1035,6 +1117,53 @@ Test "sinh (0.75) == 0.822316731935829980703661634446913849": ildouble: 1 ldouble: 1 +# sinh_downward +Test "sinh_downward (22) == 1792456423.065795780701106568345764104225": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "sinh_downward (23) == 4872401723.124451299966006944252978187305": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "sinh_downward (24) == 13244561064.92173614705070540368454568168": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# sinh_towardzero +Test "sinh_towardzero (22) == 1792456423.065795780701106568345764104225": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "sinh_towardzero (23) == 4872401723.124451299966006944252978187305": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "sinh_towardzero (24) == 13244561064.92173614705070540368454568168": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# sinh_upward +Test "sinh_upward (24) == 13244561064.92173614705070540368454568168": +double: 1 +idouble: 1 + # tan Test "tan (0.75) == 0.931596459944072461165202756573936428": ildouble: 1 @@ -1525,6 +1654,28 @@ ifloat: 1 ildouble: 1 ldouble: 1 +Function: "cosh_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "cosh_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "cosh_upward": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + Function: Real part of "cpow": double: 1 float: 3 @@ -1679,6 +1830,30 @@ ifloat: 1 ildouble: 7 ldouble: 7 +Function: "pow_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "pow_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "pow_upward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + Function: "sin_downward": double: 1 float: 1 @@ -1715,6 +1890,26 @@ Function: "sinh": ildouble: 1 ldouble: 1 +Function: "sinh_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "sinh_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "sinh_upward": +double: 1 +idouble: 1 + Function: "tan": double: 1 idouble: 1 From 402a76b62dded0ee93cfec0471aaeccb989196d2 Mon Sep 17 00:00:00 2001 From: Michael Hope Date: Mon, 5 Mar 2012 17:58:13 -0500 Subject: [PATCH 4256/4487] ARM: Implement *context routines. * sysdeps/unix/sysv/linux/arm/eabi/getcontext.S: New file. * sysdeps/unix/sysv/linux/arm/eabi/makecontext.c: New file. * sysdeps/unix/sysv/linux/arm/eabi/setcontext.S: New file. * sysdeps/unix/sysv/linux/arm/eabi/swapcontext.S: New file. * sysdeps/unix/sysv/linux/arm/ucontext_i.sym: New file. * sysdeps/unix/sysv/linux/arm/Makefile (gen-as-const-headers): Add ucontext_i.sym. --- ChangeLog.arm | 10 ++ sysdeps/unix/sysv/linux/arm/Makefile | 4 + sysdeps/unix/sysv/linux/arm/eabi/getcontext.S | 113 ++++++++++++++++++ .../unix/sysv/linux/arm/eabi/makecontext.c | 73 +++++++++++ sysdeps/unix/sysv/linux/arm/eabi/setcontext.S | 101 ++++++++++++++++ .../unix/sysv/linux/arm/eabi/swapcontext.S | 63 ++++++++++ sysdeps/unix/sysv/linux/arm/ucontext_i.sym | 30 +++++ 7 files changed, 394 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/getcontext.S create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/makecontext.c create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/setcontext.S create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/swapcontext.S create mode 100644 sysdeps/unix/sysv/linux/arm/ucontext_i.sym diff --git a/ChangeLog.arm b/ChangeLog.arm index 982699cb24..18af911ab3 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,13 @@ +2012-03-05 Michael Hope + + * sysdeps/unix/sysv/linux/arm/eabi/getcontext.S: New file. + * sysdeps/unix/sysv/linux/arm/eabi/makecontext.c: New file. + * sysdeps/unix/sysv/linux/arm/eabi/setcontext.S: New file. + * sysdeps/unix/sysv/linux/arm/eabi/swapcontext.S: New file. + * sysdeps/unix/sysv/linux/arm/ucontext_i.sym: New file. + * sysdeps/unix/sysv/linux/arm/Makefile (gen-as-const-headers): Add + ucontext_i.sym. + 2012-02-27 Joseph Myers * sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile index d91b968594..a9817368a1 100644 --- a/sysdeps/unix/sysv/linux/arm/Makefile +++ b/sysdeps/unix/sysv/linux/arm/Makefile @@ -20,3 +20,7 @@ endif ifeq ($(subdir),resource) sysdep_routines += oldgetrlimit64 endif + +ifeq ($(subdir),stdlib) +gen-as-const-headers += ucontext_i.sym +endif diff --git a/sysdeps/unix/sysv/linux/arm/eabi/getcontext.S b/sysdeps/unix/sysv/linux/arm/eabi/getcontext.S new file mode 100644 index 0000000000..435eb12c8f --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/getcontext.S @@ -0,0 +1,113 @@ +/* Copyright (C) 2012 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, see + . */ + +#include +#include + +#include "ucontext_i.h" + + .syntax unified + .text + +/* int getcontext (ucontext_t *ucp) */ + +ENTRY(__getcontext) + /* No need to save r0-r3, d0-d7, or d16-d31. */ + add r1, r0, #MCONTEXT_ARM_R4 + stmia r1, {r4-r11} + + /* Save R13 separately as Thumb can't STM it. */ + str r13, [r0, #MCONTEXT_ARM_SP] + str r14, [r0, #MCONTEXT_ARM_LR] + /* Return to LR */ + str r14, [r0, #MCONTEXT_ARM_PC] + /* Return zero */ + mov r2, #0 + str r2, [r0, #MCONTEXT_ARM_R0] + + /* Save ucontext_t * across the next call. */ + mov r4, r0 + + /* __sigprocmask(SIG_BLOCK, NULL, &(ucontext->uc_sigmask)) */ + mov r0, #SIG_BLOCK + mov r1, #0 + add r2, r4, #UCONTEXT_SIGMASK + bl PLTJMP(__sigprocmask) + + /* Store FP regs. Much of the FP code is copied from arm/eabi/setjmp.S. */ + +#ifdef PIC + ldr r2, 1f + ldr r1, Lrtld_global_ro +0: add r2, pc, r2 + ldr r2, [r2, r1] + ldr r2, [r2, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET] +#else + ldr r2, Lhwcap + ldr r2, [r2, #0] +#endif + + add r0, r4, #UCONTEXT_REGSPACE + + tst r2, #HWCAP_ARM_VFP + beq Lno_vfp + + /* Store the VFP registers. + Don't use VFP instructions directly because this code + is used in non-VFP multilibs. */ + /* Following instruction is vstmia r0!, {d8-d15}. */ + stc p11, cr8, [r0], #64 + /* Store the floating-point status register. */ + /* Following instruction is vmrs r1, fpscr. */ + mrc p10, 7, r1, cr1, cr0, 0 + str r1, [r0], #4 +Lno_vfp: + + tst r2, #HWCAP_ARM_IWMMXT + beq Lno_iwmmxt + + /* Save the call-preserved iWMMXt registers. */ + /* Following instructions are wstrd wr10, [r0], #8 (etc.) */ + stcl p1, cr10, [r0], #8 + stcl p1, cr11, [r0], #8 + stcl p1, cr12, [r0], #8 + stcl p1, cr13, [r0], #8 + stcl p1, cr14, [r0], #8 + stcl p1, cr15, [r0], #8 +Lno_iwmmxt: + + /* Restore the clobbered R4 and LR. */ + ldr r14, [r4, #MCONTEXT_ARM_LR] + ldr r4, [r4, #MCONTEXT_ARM_R4] + + mov r0, #0 + + DO_RET(r14) + +END(__getcontext) + +#ifdef PIC +1: .long _GLOBAL_OFFSET_TABLE_ - 0b - 8 +Lrtld_global_ro: + .long C_SYMBOL_NAME(_rtld_global_ro)(GOT) +#else +Lhwcap: + .long C_SYMBOL_NAME(_dl_hwcap) +#endif + + +weak_alias(__getcontext, getcontext) diff --git a/sysdeps/unix/sysv/linux/arm/eabi/makecontext.c b/sysdeps/unix/sysv/linux/arm/eabi/makecontext.c new file mode 100644 index 0000000000..d6ae6f0d76 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/makecontext.c @@ -0,0 +1,73 @@ +/* Copyright (C) 2012 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, see + . */ + +#include +#include + +/* Number of arguments that go in registers. */ +#define NREG_ARGS 4 + +/* Take a context previously prepared via getcontext() and set to + call func() with the given int only args. */ +void +__makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...) +{ + extern void __startcontext (void); + unsigned long *funcstack; + va_list vl; + unsigned long *regptr; + unsigned int reg; + int misaligned; + + /* Start at the top of stack. */ + funcstack = (unsigned long *) (ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size); + + /* Ensure the stack stays eight byte aligned. */ + misaligned = ((unsigned long) funcstack & 4) != 0; + + if ((argc > NREG_ARGS) && (argc & 1) != 0) + misaligned = !misaligned; + + if (misaligned) + funcstack -= 1; + + va_start (vl, argc); + + /* Reserve space for the on-stack arguments. */ + if (argc > NREG_ARGS) + funcstack -= (argc - NREG_ARGS); + + ucp->uc_mcontext.arm_sp = (unsigned long) funcstack; + ucp->uc_mcontext.arm_pc = (unsigned long) func; + + /* Exit to startcontext() with the next context in R4 */ + ucp->uc_mcontext.arm_r4 = (unsigned long) ucp->uc_link; + ucp->uc_mcontext.arm_lr = (unsigned long) __startcontext; + + /* The first four arguments go into registers. */ + regptr = &(ucp->uc_mcontext.arm_r0); + + for (reg = 0; (reg < argc) && (reg < NREG_ARGS); reg++) + *regptr++ = va_arg (vl, unsigned long); + + /* And the remainder on the stack. */ + for (; reg < argc; reg++) + *funcstack++ = va_arg (vl, unsigned long); + + va_end (vl); +} +weak_alias (__makecontext, makecontext) diff --git a/sysdeps/unix/sysv/linux/arm/eabi/setcontext.S b/sysdeps/unix/sysv/linux/arm/eabi/setcontext.S new file mode 100644 index 0000000000..78003f52dc --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/setcontext.S @@ -0,0 +1,101 @@ +/* Copyright (C) 2012 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, see + . */ + +#include +#include + +#include "ucontext_i.h" + + .syntax unified + .text + +/* int setcontext (const ucontext_t *ucp) */ + +ENTRY(__setcontext) + mov r4, r0 + add r0, r0, #UCONTEXT_REGSPACE + + /* Restore the VFP registers. Copied from arm/eabi/__longjmp.S. */ +#ifdef PIC + ldr r2, 1f + ldr r1, Lrtld_global_ro +0: add r2, pc, r2 + ldr r2, [r2, r1] + ldr r2, [r2, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET] +#else + ldr r2, Lhwcap + ldr r2, [r2, #0] +#endif + + tst r2, #HWCAP_ARM_VFP + beq Lno_vfp_sc + + /* Following instruction is vldmia r0!, {d8-d15}. */ + ldc p11, cr8, [r0], #64 + /* Restore the floating-point status register. */ + ldr r1, [r0], #4 + /* Following instruction is fmxr fpscr, r1. */ + mcr p10, 7, r1, cr1, cr0, 0 +Lno_vfp_sc: + tst r2, #HWCAP_ARM_IWMMXT + beq Lno_iwmmxt_sc + + /* Restore the call-preserved iWMMXt registers. */ + /* Following instructions are wldrd wr10, [r0], #8 (etc.) */ + ldcl p1, cr10, [r0], #8 + ldcl p1, cr11, [r0], #8 + ldcl p1, cr12, [r0], #8 + ldcl p1, cr13, [r0], #8 + ldcl p1, cr14, [r0], #8 + ldcl p1, cr15, [r0], #8 +Lno_iwmmxt_sc: + + /* Now bring back the signal status. */ + mov r0, #SIG_SETMASK + add r1, r4, #UCONTEXT_SIGMASK + mov r2, #0 + bl PLTJMP(__sigprocmask) + + /* Loading r0-r3 makes makecontext easier. */ + add r14, r4, #MCONTEXT_ARM_R0 + ldmia r14, {r0-r12} + ldr r13, [r14, #(MCONTEXT_ARM_SP - MCONTEXT_ARM_R0)] + add r14, r14, #(MCONTEXT_ARM_LR - MCONTEXT_ARM_R0) + ldmia r14, {r14, pc} + +END(setcontext) +weak_alias(__setcontext, setcontext) + + /* Called when a makecontext() context returns. Start the + context in R4 or fall through to exit(). */ +ENTRY(__startcontext) + movs r0, r4 + bne PLTJMP(__setcontext) + + @ New context was 0 - exit + b PLTJMP(_exit) +END(__startcontext) + +#ifdef PIC +1: .long _GLOBAL_OFFSET_TABLE_ - 0b - 8 +Lrtld_global_ro: + .long C_SYMBOL_NAME(_rtld_global_ro)(GOT) +#else +Lhwcap: + .long C_SYMBOL_NAME(_dl_hwcap) +#endif + diff --git a/sysdeps/unix/sysv/linux/arm/eabi/swapcontext.S b/sysdeps/unix/sysv/linux/arm/eabi/swapcontext.S new file mode 100644 index 0000000000..09492d0000 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/eabi/swapcontext.S @@ -0,0 +1,63 @@ +/* Copyright (C) 2012 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, see + . */ + +#include + +#include "ucontext_i.h" + + .syntax unified + .text + +/* int swapcontext (ucontext_t *oucp, const ucontext_t *ucp) */ + +ENTRY(swapcontext) + + /* Have getcontext() do most of the work then fix up + LR afterwards. Save R3 to keep the stack aligned. */ + push {r0,r1,r3,r14} + cfi_adjust_cfa_offset (16) + cfi_rel_offset (r0,0) + cfi_rel_offset (r1,4) + cfi_rel_offset (r3,8) + cfi_rel_offset (r14,12) + + bl __getcontext + mov r4, r0 + + pop {r0,r1,r3,r14} + cfi_adjust_cfa_offset (-16) + cfi_restore (r0) + cfi_restore (r1) + cfi_restore (r3) + cfi_restore (r14) + + /* Exit if getcontext() failed. */ + cmp r4, #0 + itt ne + movne r0, r4 + RETINSTR(ne, r14) + + /* Fix up LR and the PC. */ + str r13,[r0, #MCONTEXT_ARM_SP] + str r14,[r0, #MCONTEXT_ARM_LR] + str r14,[r0, #MCONTEXT_ARM_PC] + + /* And swap using swapcontext(). */ + mov r0, r1 + b __setcontext + +END(swapcontext) diff --git a/sysdeps/unix/sysv/linux/arm/ucontext_i.sym b/sysdeps/unix/sysv/linux/arm/ucontext_i.sym new file mode 100644 index 0000000000..306292f1f8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/ucontext_i.sym @@ -0,0 +1,30 @@ +#include +#include +#include +#include + +SIG_BLOCK +SIG_SETMASK + +-- Offsets of the fields in the ucontext_t structure. +#define ucontext(member) offsetof (ucontext_t, member) +#define mcontext(member) ucontext (uc_mcontext.member) + +UCONTEXT_FLAGS ucontext (uc_flags) +UCONTEXT_LINK ucontext (uc_link) +UCONTEXT_STACK ucontext (uc_stack) +UCONTEXT_MCONTEXT ucontext (uc_mcontext) +UCONTEXT_SIGMASK ucontext (uc_sigmask) + +UCONTEXT_REGSPACE ucontext (uc_regspace) + +MCONTEXT_TRAP_NO mcontext (trap_no) +MCONTEXT_ERROR_CODE mcontext (error_code) +MCONTEXT_OLDMASK mcontext (oldmask) +MCONTEXT_ARM_R0 mcontext (arm_r0) +MCONTEXT_ARM_R4 mcontext (arm_r4) +MCONTEXT_ARM_SP mcontext (arm_sp) +MCONTEXT_ARM_LR mcontext (arm_lr) +MCONTEXT_ARM_PC mcontext (arm_pc) +MCONTEXT_ARM_CPSR mcontext (arm_cpsr) +MCONTEXT_FAULT_ADDRESS mcontext (fault_address) From 23b8c9ac74460f519deda7a28aa9d59c51fbcc98 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 9 Mar 2012 22:43:01 +0000 Subject: [PATCH 4257/4487] MIPS: replace bits/socket.h with bits/socket_type.h. --- ChangeLog.mips | 5 + sysdeps/unix/sysv/linux/mips/bits/socket.h | 440 ------------------ .../unix/sysv/linux/mips/bits/socket_type.h | 55 +++ 3 files changed, 60 insertions(+), 440 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/mips/bits/socket.h create mode 100644 sysdeps/unix/sysv/linux/mips/bits/socket_type.h diff --git a/ChangeLog.mips b/ChangeLog.mips index 730e42683d..61e14464c7 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2012-03-09 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/socket_type.h: New file. + * sysdeps/unix/sysv/linux/mips/bits/socket.h: Remove. + 2012-02-27 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/socket.h [!__USE_GNU]: Do not diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h deleted file mode 100644 index eac3bcd9ed..0000000000 --- a/sysdeps/unix/sysv/linux/mips/bits/socket.h +++ /dev/null @@ -1,440 +0,0 @@ -/* System-specific socket constants and types. Linux/MIPS version. - Copyright (C) 1991, 92, 1994-1999, 2000, 2001, 2004, 2005, 2006, 2007, 2008, - 2009, 2010, 2011, 2012 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_SOCKET_H -#define __BITS_SOCKET_H - -#if !defined _SYS_SOCKET_H && !defined _NETINET_IN_H -# error "Never include directly; use instead." -#endif - -#define __need_size_t -#include - -#include - -/* Type for length arguments in socket calls. */ -#ifndef __socklen_t_defined -typedef __socklen_t socklen_t; -# define __socklen_t_defined -#endif - -/* Types of sockets. */ -enum __socket_type -{ - SOCK_DGRAM = 1, /* Connectionless, unreliable datagrams - of fixed maximum length. */ -#define SOCK_DGRAM SOCK_DGRAM - SOCK_STREAM = 2, /* Sequenced, reliable, connection-based - byte streams. */ -#define SOCK_STREAM SOCK_STREAM - SOCK_RAW = 3, /* Raw protocol interface. */ -#define SOCK_RAW SOCK_RAW - SOCK_RDM = 4, /* Reliably-delivered messages. */ -#define SOCK_RDM SOCK_RDM - SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, - datagrams of fixed maximum length. */ -#define SOCK_SEQPACKET SOCK_SEQPACKET - SOCK_DCCP = 6, -#define SOCK_DCCP SOCK_DCCP /* Datagram Congestion Control Protocol. */ - SOCK_PACKET = 10, /* Linux specific way of getting packets - at the dev level. For writing rarp and - other similar things on the user level. */ -#define SOCK_PACKET SOCK_PACKET - - /* Flags to be ORed into the type parameter of socket and socketpair and - used for the flags parameter of paccept. */ - - SOCK_CLOEXEC = 02000000, /* Atomically set close-on-exec flag for the - new descriptor(s). */ -#define SOCK_CLOEXEC SOCK_CLOEXEC - SOCK_NONBLOCK = 0200 /* Atomically mark descriptor(s) as - non-blocking. */ -#define SOCK_NONBLOCK SOCK_NONBLOCK -}; - -/* Protocol families. */ -#define PF_UNSPEC 0 /* Unspecified. */ -#define PF_LOCAL 1 /* Local to host (pipes and file-domain). */ -#define PF_UNIX PF_LOCAL /* POSIX name for PF_LOCAL. */ -#define PF_FILE PF_LOCAL /* Another non-standard name for PF_LOCAL. */ -#define PF_INET 2 /* IP protocol family. */ -#define PF_AX25 3 /* Amateur Radio AX.25. */ -#define PF_IPX 4 /* Novell Internet Protocol. */ -#define PF_APPLETALK 5 /* Appletalk DDP. */ -#define PF_NETROM 6 /* Amateur radio NetROM. */ -#define PF_BRIDGE 7 /* Multiprotocol bridge. */ -#define PF_ATMPVC 8 /* ATM PVCs. */ -#define PF_X25 9 /* Reserved for X.25 project. */ -#define PF_INET6 10 /* IP version 6. */ -#define PF_ROSE 11 /* Amateur Radio X.25 PLP. */ -#define PF_DECnet 12 /* Reserved for DECnet project. */ -#define PF_NETBEUI 13 /* Reserved for 802.2LLC project. */ -#define PF_SECURITY 14 /* Security callback pseudo AF. */ -#define PF_KEY 15 /* PF_KEY key management API. */ -#define PF_NETLINK 16 -#define PF_ROUTE PF_NETLINK /* Alias to emulate 4.4BSD. */ -#define PF_PACKET 17 /* Packet family. */ -#define PF_ASH 18 /* Ash. */ -#define PF_ECONET 19 /* Acorn Econet. */ -#define PF_ATMSVC 20 /* ATM SVCs. */ -#define PF_RDS 21 /* RDS sockets. */ -#define PF_SNA 22 /* Linux SNA Project */ -#define PF_IRDA 23 /* IRDA sockets. */ -#define PF_PPPOX 24 /* PPPoX sockets. */ -#define PF_WANPIPE 25 /* Wanpipe API sockets. */ -#define PF_LLC 26 /* Linux LLC. */ -#define PF_CAN 29 /* Controller Area Network. */ -#define PF_TIPC 30 /* TIPC sockets. */ -#define PF_BLUETOOTH 31 /* Bluetooth sockets. */ -#define PF_IUCV 32 /* IUCV sockets. */ -#define PF_RXRPC 33 /* RxRPC sockets. */ -#define PF_ISDN 34 /* mISDN sockets. */ -#define PF_PHONET 35 /* Phonet sockets. */ -#define PF_IEEE802154 36 /* IEEE 802.15.4 sockets. */ -#define PF_CAIF 37 /* CAIF sockets. */ -#define PF_ALG 38 /* Algorithm sockets. */ -#define PF_NFC 39 /* NFC sockets. */ -#define PF_MAX 40 /* For now.. */ - -/* Address families. */ -#define AF_UNSPEC PF_UNSPEC -#define AF_LOCAL PF_LOCAL -#define AF_UNIX PF_UNIX -#define AF_FILE PF_FILE -#define AF_INET PF_INET -#define AF_AX25 PF_AX25 -#define AF_IPX PF_IPX -#define AF_APPLETALK PF_APPLETALK -#define AF_NETROM PF_NETROM -#define AF_BRIDGE PF_BRIDGE -#define AF_ATMPVC PF_ATMPVC -#define AF_X25 PF_X25 -#define AF_INET6 PF_INET6 -#define AF_ROSE PF_ROSE -#define AF_DECnet PF_DECnet -#define AF_NETBEUI PF_NETBEUI -#define AF_SECURITY PF_SECURITY -#define AF_KEY PF_KEY -#define AF_NETLINK PF_NETLINK -#define AF_ROUTE PF_ROUTE -#define AF_PACKET PF_PACKET -#define AF_ASH PF_ASH -#define AF_ECONET PF_ECONET -#define AF_ATMSVC PF_ATMSVC -#define AF_RDS PF_RDS -#define AF_SNA PF_SNA -#define AF_IRDA PF_IRDA -#define AF_PPPOX PF_PPPOX -#define AF_WANPIPE PF_WANPIPE -#define AF_LLC PF_LLC -#define AF_CAN PF_CAN -#define AF_TIPC PF_TIPC -#define AF_BLUETOOTH PF_BLUETOOTH -#define AF_IUCV PF_IUCV -#define AF_RXRPC PF_RXRPC -#define AF_ISDN PF_ISDN -#define AF_PHONET PF_PHONET -#define AF_IEEE802154 PF_IEEE802154 -#define AF_CAIF PF_CAIF -#define AF_ALG PF_ALG -#define AF_NFC PF_NFC -#define AF_MAX PF_MAX - -/* Socket level values. Others are defined in the appropriate headers. - - XXX These definitions also should go into the appropriate headers as - far as they are available. */ -#define SOL_RAW 255 -#define SOL_DECNET 261 -#define SOL_X25 262 -#define SOL_PACKET 263 -#define SOL_ATM 264 /* ATM layer (cell level). */ -#define SOL_AAL 265 /* ATM Adaption Layer (packet level). */ -#define SOL_IRDA 266 - -/* Maximum queue length specifiable by listen. */ -#define SOMAXCONN 128 - -/* Get the definition of the macro to define the common sockaddr members. */ -#include - -/* Structure describing a generic socket address. */ -struct sockaddr - { - __SOCKADDR_COMMON (sa_); /* Common data: address family and length. */ - char sa_data[14]; /* Address data. */ - }; - - -/* Structure large enough to hold any socket address (with the historical - exception of AF_UNIX). We reserve 128 bytes. */ -#define __ss_aligntype unsigned long int -#define _SS_SIZE 128 -#define _SS_PADSIZE (_SS_SIZE - (2 * sizeof (__ss_aligntype))) - -struct sockaddr_storage - { - __SOCKADDR_COMMON (ss_); /* Address family, etc. */ - __ss_aligntype __ss_align; /* Force desired alignment. */ - char __ss_padding[_SS_PADSIZE]; - }; - - -/* Bits in the FLAGS argument to `send', `recv', et al. */ -enum - { - MSG_OOB = 0x01, /* Process out-of-band data. */ -#define MSG_OOB MSG_OOB - MSG_PEEK = 0x02, /* Peek at incoming messages. */ -#define MSG_PEEK MSG_PEEK - MSG_DONTROUTE = 0x04, /* Don't use local routing. */ -#define MSG_DONTROUTE MSG_DONTROUTE -#ifdef __USE_GNU - /* DECnet uses a different name. */ - MSG_TRYHARD = MSG_DONTROUTE, -# define MSG_TRYHARD MSG_DONTROUTE -#endif - MSG_CTRUNC = 0x08, /* Control data lost before delivery. */ -#define MSG_CTRUNC MSG_CTRUNC - MSG_PROXY = 0x10, /* Supply or ask second address. */ -#define MSG_PROXY MSG_PROXY - MSG_TRUNC = 0x20, -#define MSG_TRUNC MSG_TRUNC - MSG_DONTWAIT = 0x40, /* Nonblocking IO. */ -#define MSG_DONTWAIT MSG_DONTWAIT - MSG_EOR = 0x80, /* End of record. */ -#define MSG_EOR MSG_EOR - MSG_WAITALL = 0x100, /* Wait for a full request. */ -#define MSG_WAITALL MSG_WAITALL - MSG_FIN = 0x200, -#define MSG_FIN MSG_FIN - MSG_SYN = 0x400, -#define MSG_SYN MSG_SYN - MSG_CONFIRM = 0x800, /* Confirm path validity. */ -#define MSG_CONFIRM MSG_CONFIRM - MSG_RST = 0x1000, -#define MSG_RST MSG_RST - MSG_ERRQUEUE = 0x2000, /* Fetch message from error queue. */ -#define MSG_ERRQUEUE MSG_ERRQUEUE - MSG_NOSIGNAL = 0x4000, /* Do not generate SIGPIPE. */ -#define MSG_NOSIGNAL MSG_NOSIGNAL - MSG_MORE = 0x8000, /* Sender will send more. */ -#define MSG_MORE MSG_MORE - MSG_WAITFORONE = 0x10000, /* Wait for at least one packet to return.*/ -#define MSG_WAITFORONE MSG_WAITFORONE - - MSG_CMSG_CLOEXEC = 0x40000000 /* Set close_on_exit for file - descriptor received through - SCM_RIGHTS. */ -#define MSG_CMSG_CLOEXEC MSG_CMSG_CLOEXEC - }; - - -/* Structure describing messages sent by - `sendmsg' and received by `recvmsg'. */ -struct msghdr - { - void *msg_name; /* Address to send to/receive from. */ - socklen_t msg_namelen; /* Length of address data. */ - - struct iovec *msg_iov; /* Vector of data to send/receive into. */ - size_t msg_iovlen; /* Number of elements in the vector. */ - - void *msg_control; /* Ancillary data (eg BSD filedesc passing). */ - size_t msg_controllen; /* Ancillary data buffer length. */ - - int msg_flags; /* Flags on received message. */ - }; - -#ifdef __USE_GNU -/* For `recvmmsg'. */ -struct mmsghdr - { - struct msghdr msg_hdr; /* Actual message header. */ - unsigned int msg_len; /* Number of received bytes for the entry. */ - }; -#endif - -/* Structure used for storage of ancillary data object information. */ -struct cmsghdr - { - size_t cmsg_len; /* Length of data in cmsg_data plus length - of cmsghdr structure. */ - int cmsg_level; /* Originating protocol. */ - int cmsg_type; /* Protocol specific type. */ -#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L - __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */ -#endif - }; - -/* Ancillary data object manipulation macros. */ -#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L -# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data) -#else -# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1)) -#endif -#define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg) -#define CMSG_FIRSTHDR(mhdr) \ - ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \ - ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) 0) -#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \ - & (size_t) ~(sizeof (size_t) - 1)) -#define CMSG_SPACE(len) (CMSG_ALIGN (len) \ - + CMSG_ALIGN (sizeof (struct cmsghdr))) -#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len)) - -extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr, - struct cmsghdr *__cmsg) __THROW; -#ifdef __USE_EXTERN_INLINES -# ifndef _EXTERN_INLINE -# define _EXTERN_INLINE __extern_inline -# endif -_EXTERN_INLINE struct cmsghdr * -__NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg)) -{ - if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr)) - /* The kernel header does this so there may be a reason. */ - return (struct cmsghdr *) 0; - - __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg - + CMSG_ALIGN (__cmsg->cmsg_len)); - if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control - + __mhdr->msg_controllen) - || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len) - > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen))) - /* No more entries. */ - return (struct cmsghdr *) 0; - return __cmsg; -} -#endif /* Use `extern inline'. */ - -/* Socket level message types. This must match the definitions in - . */ -enum - { - SCM_RIGHTS = 0x01 /* Transfer file descriptors. */ -#define SCM_RIGHTS SCM_RIGHTS -#ifdef __USE_GNU - , SCM_CREDENTIALS = 0x02 /* Credentials passing. */ -# define SCM_CREDENTIALS SCM_CREDENTIALS -#endif - }; - -#ifdef __USE_GNU -/* User visible structure for SCM_CREDENTIALS message */ -struct ucred -{ - pid_t pid; /* PID of sending process. */ - uid_t uid; /* UID of sending process. */ - gid_t gid; /* GID of sending process. */ -}; -#endif - -/* Ugly workaround for unclean kernel headers. */ -#if !defined __USE_MISC && !defined __USE_GNU -# ifndef FIOGETOWN -# define __SYS_SOCKET_H_undef_FIOGETOWN -# endif -# ifndef FIOSETOWN -# define __SYS_SOCKET_H_undef_FIOSETOWN -# endif -# ifndef SIOCATMARK -# define __SYS_SOCKET_H_undef_SIOCATMARK -# endif -# ifndef SIOCGPGRP -# define __SYS_SOCKET_H_undef_SIOCGPGRP -# endif -# ifndef SIOCGSTAMP -# define __SYS_SOCKET_H_undef_SIOCGSTAMP -# endif -# ifndef SIOCGSTAMPNS -# define __SYS_SOCKET_H_undef_SIOCGSTAMPNS -# endif -# ifndef SIOCSPGRP -# define __SYS_SOCKET_H_undef_SIOCSPGRP -# endif -#endif - -/* Get socket manipulation related informations from kernel headers. */ -#include - -#if !defined __USE_MISC && !defined __USE_GNU -# ifdef __SYS_SOCKET_H_undef_FIOGETOWN -# undef __SYS_SOCKET_H_undef_FIOGETOWN -# undef FIOGETOWN -# endif -# ifdef __SYS_SOCKET_H_undef_FIOSETOWN -# undef __SYS_SOCKET_H_undef_FIOSETOWN -# undef FIOSETOWN -# endif -# ifdef __SYS_SOCKET_H_undef_SIOCATMARK -# undef __SYS_SOCKET_H_undef_SIOCATMARK -# undef SIOCATMARK -# endif -# ifdef __SYS_SOCKET_H_undef_SIOCGPGRP -# undef __SYS_SOCKET_H_undef_SIOCGPGRP -# undef SIOCGPGRP -# endif -# ifdef __SYS_SOCKET_H_undef_SIOCGSTAMP -# undef __SYS_SOCKET_H_undef_SIOCGSTAMP -# undef SIOCGSTAMP -# endif -# ifdef __SYS_SOCKET_H_undef_SIOCGSTAMPNS -# undef __SYS_SOCKET_H_undef_SIOCGSTAMPNS -# undef SIOCGSTAMPNS -# endif -# ifdef __SYS_SOCKET_H_undef_SIOCSPGRP -# undef __SYS_SOCKET_H_undef_SIOCSPGRP -# undef SIOCSPGRP -# endif -#endif - -/* Structure used to manipulate the SO_LINGER option. */ -struct linger - { - int l_onoff; /* Nonzero to linger on close. */ - int l_linger; /* Time to linger. */ - }; - - -__BEGIN_DECLS - -#ifdef __USE_GNU -/* Receive up to VLEN messages as described by VMESSAGES from socket FD. - Returns the number of bytes read or -1 for errors. - - This function is a cancellation point and therefore not marked with - __THROW. */ -extern int recvmmsg (int __fd, struct mmsghdr *__vmessages, - unsigned int __vlen, int __flags, - const struct timespec *__tmo); - -/* Send a VLEN messages as described by VMESSAGES to socket FD. - Return the number of datagrams successfully written or -1 for errors. -This function is a cancellation point and therefore not marked with - __THROW. */ -extern int sendmmsg (int __fd, struct mmsghdr *__vmessages, - unsigned int __vlen, int __flags); -#endif - -__END_DECLS - -#endif /* bits/socket.h */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket_type.h b/sysdeps/unix/sysv/linux/mips/bits/socket_type.h new file mode 100644 index 0000000000..0ece9f03da --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/bits/socket_type.h @@ -0,0 +1,55 @@ +/* Define enum __socket_type for Linux/MIPS. + Copyright (C) 1991-2012 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, see + . */ + +#ifndef _SYS_SOCKET_H +# error "Never include directly; use instead." +#endif + +/* Types of sockets. */ +enum __socket_type +{ + SOCK_DGRAM = 1, /* Connectionless, unreliable datagrams + of fixed maximum length. */ +#define SOCK_DGRAM SOCK_DGRAM + SOCK_STREAM = 2, /* Sequenced, reliable, connection-based + byte streams. */ +#define SOCK_STREAM SOCK_STREAM + SOCK_RAW = 3, /* Raw protocol interface. */ +#define SOCK_RAW SOCK_RAW + SOCK_RDM = 4, /* Reliably-delivered messages. */ +#define SOCK_RDM SOCK_RDM + SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, + datagrams of fixed maximum length. */ +#define SOCK_SEQPACKET SOCK_SEQPACKET + SOCK_DCCP = 6, +#define SOCK_DCCP SOCK_DCCP /* Datagram Congestion Control Protocol. */ + SOCK_PACKET = 10, /* Linux specific way of getting packets + at the dev level. For writing rarp and + other similar things on the user level. */ +#define SOCK_PACKET SOCK_PACKET + + /* Flags to be ORed into the type parameter of socket and socketpair and + used for the flags parameter of paccept. */ + + SOCK_CLOEXEC = 02000000, /* Atomically set close-on-exec flag for the + new descriptor(s). */ +#define SOCK_CLOEXEC SOCK_CLOEXEC + SOCK_NONBLOCK = 00000200 /* Atomically mark descriptor(s) as + non-blocking. */ +#define SOCK_NONBLOCK SOCK_NONBLOCK +}; From ab84e3ff9c5c66fd74c8f2b4d0be74b08a968f06 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 9 Mar 2012 23:56:38 +0000 Subject: [PATCH 4258/4487] Replace FSF snail mail address by URL. --- ChangeLog.alpha | 5 +++++ ChangeLog.am33 | 5 +++++ ChangeLog.arm | 5 +++++ ChangeLog.hppa | 5 +++++ ChangeLog.linux-generic | 5 +++++ ChangeLog.m68k | 5 +++++ ChangeLog.mips | 5 +++++ ChangeLog.powerpc | 5 +++++ ChangeLog.tile | 5 +++++ sysdeps/alpha/Makefile | 5 ++--- sysdeps/alpha/__longjmp.S | 5 ++--- sysdeps/alpha/_mcount.S | 5 ++--- sysdeps/alpha/add_n.s | 4 +--- sysdeps/alpha/addmul_1.s | 4 +--- sysdeps/alpha/alphaev5/add_n.s | 4 +--- sysdeps/alpha/alphaev5/lshift.s | 4 +--- sysdeps/alpha/alphaev5/rshift.s | 4 +--- sysdeps/alpha/alphaev5/sub_n.s | 4 +--- sysdeps/alpha/alphaev6/addmul_1.s | 4 +--- sysdeps/alpha/alphaev6/fpu/e_sqrt.S | 5 ++--- sysdeps/alpha/alphaev6/fpu/e_sqrtf.S | 5 ++--- sysdeps/alpha/alphaev6/memcpy.S | 5 ++--- sysdeps/alpha/alphaev6/memset.S | 5 ++--- sysdeps/alpha/alphaev6/stxcpy.S | 5 ++--- sysdeps/alpha/alphaev6/stxncpy.S | 5 ++--- sysdeps/alpha/alphaev67/ffs.S | 5 ++--- sysdeps/alpha/alphaev67/ffsll.S | 5 ++--- sysdeps/alpha/alphaev67/rawmemchr.S | 5 ++--- sysdeps/alpha/alphaev67/stpcpy.S | 5 ++--- sysdeps/alpha/alphaev67/stpncpy.S | 5 ++--- sysdeps/alpha/alphaev67/strcat.S | 5 ++--- sysdeps/alpha/alphaev67/strchr.S | 5 ++--- sysdeps/alpha/alphaev67/strlen.S | 5 ++--- sysdeps/alpha/alphaev67/strncat.S | 5 ++--- sysdeps/alpha/alphaev67/strrchr.S | 5 ++--- sysdeps/alpha/bb_init_func.S | 5 ++--- sysdeps/alpha/bits/atomic.h | 5 ++--- sysdeps/alpha/bits/link.h | 5 ++--- sysdeps/alpha/bits/mathdef.h | 5 ++--- sysdeps/alpha/bits/setjmp.h | 5 ++--- sysdeps/alpha/bzero.S | 5 ++--- sysdeps/alpha/div.S | 5 ++--- sysdeps/alpha/div_libc.h | 5 ++--- sysdeps/alpha/divl.S | 5 ++--- sysdeps/alpha/divq.S | 5 ++--- sysdeps/alpha/divqu.S | 5 ++--- sysdeps/alpha/dl-machine.h | 5 ++--- sysdeps/alpha/dl-procinfo.c | 5 ++--- sysdeps/alpha/dl-procinfo.h | 5 ++--- sysdeps/alpha/dl-sysdep.h | 5 ++--- sysdeps/alpha/dl-tls.h | 5 ++--- sysdeps/alpha/dl-trampoline.S | 5 ++--- sysdeps/alpha/elf/crti.S | 5 ++--- sysdeps/alpha/elf/crtn.S | 5 ++--- sysdeps/alpha/elf/start.S | 5 ++--- sysdeps/alpha/ffs.S | 5 ++--- sysdeps/alpha/fpu/bits/fenv.h | 5 ++--- sysdeps/alpha/fpu/bits/mathinline.h | 5 ++--- sysdeps/alpha/fpu/cabsf.c | 5 ++--- sysdeps/alpha/fpu/cargf.c | 5 ++--- sysdeps/alpha/fpu/cfloat-compat.h | 5 ++--- sysdeps/alpha/fpu/cimagf.c | 5 ++--- sysdeps/alpha/fpu/conjf.c | 5 ++--- sysdeps/alpha/fpu/crealf.c | 5 ++--- sysdeps/alpha/fpu/e_sqrt.c | 5 ++--- sysdeps/alpha/fpu/fclrexcpt.c | 5 ++--- sysdeps/alpha/fpu/fedisblxcpt.c | 5 ++--- sysdeps/alpha/fpu/feenablxcpt.c | 5 ++--- sysdeps/alpha/fpu/fegetenv.c | 5 ++--- sysdeps/alpha/fpu/fegetexcept.c | 5 ++--- sysdeps/alpha/fpu/fegetround.c | 5 ++--- sysdeps/alpha/fpu/feholdexcpt.c | 5 ++--- sysdeps/alpha/fpu/fenv_libc.h | 5 ++--- sysdeps/alpha/fpu/fesetenv.c | 5 ++--- sysdeps/alpha/fpu/fesetround.c | 5 ++--- sysdeps/alpha/fpu/feupdateenv.c | 5 ++--- sysdeps/alpha/fpu/fgetexcptflg.c | 5 ++--- sysdeps/alpha/fpu/fpu_control.h | 5 ++--- sysdeps/alpha/fpu/fsetexcptflg.c | 5 ++--- sysdeps/alpha/fpu/ftestexcept.c | 5 ++--- sysdeps/alpha/fpu/s_cacosf.c | 5 ++--- sysdeps/alpha/fpu/s_cacoshf.c | 5 ++--- sysdeps/alpha/fpu/s_casinf.c | 5 ++--- sysdeps/alpha/fpu/s_casinhf.c | 5 ++--- sysdeps/alpha/fpu/s_catanf.c | 5 ++--- sysdeps/alpha/fpu/s_catanhf.c | 5 ++--- sysdeps/alpha/fpu/s_ccosf.c | 5 ++--- sysdeps/alpha/fpu/s_ccoshf.c | 5 ++--- sysdeps/alpha/fpu/s_ceil.c | 5 ++--- sysdeps/alpha/fpu/s_ceilf.c | 5 ++--- sysdeps/alpha/fpu/s_cexpf.c | 5 ++--- sysdeps/alpha/fpu/s_clog10f.c | 5 ++--- sysdeps/alpha/fpu/s_clogf.c | 5 ++--- sysdeps/alpha/fpu/s_copysign.c | 5 ++--- sysdeps/alpha/fpu/s_copysignf.c | 5 ++--- sysdeps/alpha/fpu/s_cpowf.c | 5 ++--- sysdeps/alpha/fpu/s_cprojf.c | 5 ++--- sysdeps/alpha/fpu/s_csinf.c | 5 ++--- sysdeps/alpha/fpu/s_csinhf.c | 5 ++--- sysdeps/alpha/fpu/s_csqrtf.c | 5 ++--- sysdeps/alpha/fpu/s_ctanf.c | 5 ++--- sysdeps/alpha/fpu/s_ctanhf.c | 5 ++--- sysdeps/alpha/fpu/s_fabs.c | 5 ++--- sysdeps/alpha/fpu/s_fabsf.c | 5 ++--- sysdeps/alpha/fpu/s_floor.c | 5 ++--- sysdeps/alpha/fpu/s_floorf.c | 5 ++--- sysdeps/alpha/fpu/s_fmax.S | 5 ++--- sysdeps/alpha/fpu/s_fmin.S | 5 ++--- sysdeps/alpha/fpu/s_isnan.c | 5 ++--- sysdeps/alpha/fpu/s_lrint.c | 5 ++--- sysdeps/alpha/fpu/s_lrintf.c | 5 ++--- sysdeps/alpha/fpu/s_lround.c | 5 ++--- sysdeps/alpha/fpu/s_lroundf.c | 5 ++--- sysdeps/alpha/fpu/s_nearbyint.c | 5 ++--- sysdeps/alpha/fpu/s_nearbyintf.c | 5 ++--- sysdeps/alpha/fpu/s_rint.c | 5 ++--- sysdeps/alpha/fpu/s_rintf.c | 5 ++--- sysdeps/alpha/fpu/s_round.c | 5 ++--- sysdeps/alpha/fpu/s_roundf.c | 5 ++--- sysdeps/alpha/fpu/s_trunc.c | 5 ++--- sysdeps/alpha/fpu/s_truncf.c | 5 ++--- sysdeps/alpha/gccframe.h | 5 ++--- sysdeps/alpha/hp-timing.h | 5 ++--- sysdeps/alpha/htonl.S | 5 ++--- sysdeps/alpha/htons.S | 5 ++--- sysdeps/alpha/jmpbuf-offsets.h | 5 ++--- sysdeps/alpha/jmpbuf-unwind.h | 5 ++--- sysdeps/alpha/ldiv.S | 5 ++--- sysdeps/alpha/ldsodefs.h | 5 ++--- sysdeps/alpha/libc-tls.c | 5 ++--- sysdeps/alpha/lshift.s | 4 +--- sysdeps/alpha/machine-gmon.h | 5 ++--- sysdeps/alpha/memchr.c | 5 ++--- sysdeps/alpha/memset.S | 5 ++--- sysdeps/alpha/memusage.h | 5 ++--- sysdeps/alpha/mul_1.s | 4 +--- sysdeps/alpha/nptl/Makefile | 5 ++--- sysdeps/alpha/nptl/pthread_spin_lock.S | 5 ++--- sysdeps/alpha/nptl/pthread_spin_trylock.S | 5 ++--- sysdeps/alpha/nptl/pthreaddef.h | 5 ++--- sysdeps/alpha/nptl/tls.h | 5 ++--- sysdeps/alpha/nscd-types.h | 5 ++--- sysdeps/alpha/rawmemchr.S | 5 ++--- sysdeps/alpha/reml.S | 5 ++--- sysdeps/alpha/remq.S | 5 ++--- sysdeps/alpha/remqu.S | 5 ++--- sysdeps/alpha/rshift.s | 4 +--- sysdeps/alpha/setjmp.S | 5 ++--- sysdeps/alpha/soft-fp/e_sqrtl.c | 5 ++--- sysdeps/alpha/soft-fp/ots_add.c | 5 ++--- sysdeps/alpha/soft-fp/ots_cmp.c | 5 ++--- sysdeps/alpha/soft-fp/ots_cmpe.c | 5 ++--- sysdeps/alpha/soft-fp/ots_cvtqux.c | 5 ++--- sysdeps/alpha/soft-fp/ots_cvtqx.c | 5 ++--- sysdeps/alpha/soft-fp/ots_cvttx.c | 5 ++--- sysdeps/alpha/soft-fp/ots_cvtxq.c | 5 ++--- sysdeps/alpha/soft-fp/ots_cvtxt.c | 5 ++--- sysdeps/alpha/soft-fp/ots_div.c | 5 ++--- sysdeps/alpha/soft-fp/ots_mul.c | 5 ++--- sysdeps/alpha/soft-fp/ots_nintxq.c | 5 ++--- sysdeps/alpha/soft-fp/ots_sub.c | 5 ++--- sysdeps/alpha/soft-fp/sfp-machine.h | 5 ++--- sysdeps/alpha/stackinfo.h | 5 ++--- sysdeps/alpha/stpcpy.S | 5 ++--- sysdeps/alpha/stpncpy.S | 5 ++--- sysdeps/alpha/strcat.S | 5 ++--- sysdeps/alpha/strchr.S | 5 ++--- sysdeps/alpha/strcmp.S | 5 ++--- sysdeps/alpha/strcpy.S | 5 ++--- sysdeps/alpha/strlen.S | 5 ++--- sysdeps/alpha/strncat.S | 5 ++--- sysdeps/alpha/strncmp.S | 5 ++--- sysdeps/alpha/strncpy.S | 5 ++--- sysdeps/alpha/strrchr.S | 5 ++--- sysdeps/alpha/stxcpy.S | 5 ++--- sysdeps/alpha/stxncpy.S | 5 ++--- sysdeps/alpha/sub_n.s | 4 +--- sysdeps/alpha/submul_1.s | 4 +--- sysdeps/alpha/tst-audit.h | 5 ++--- sysdeps/alpha/udiv_qrnnd.S | 4 +--- sysdeps/am33/__longjmp.S | 5 ++--- sysdeps/am33/atomicity.h | 5 ++--- sysdeps/am33/bits/setjmp.h | 5 ++--- sysdeps/am33/dl-machine.h | 5 ++--- sysdeps/am33/elf/start.S | 5 ++--- sysdeps/am33/fpu/bits/fenv.h | 5 ++--- sysdeps/am33/fpu/fclrexcpt.c | 5 ++--- sysdeps/am33/fpu/fedisblxcpt.c | 5 ++--- sysdeps/am33/fpu/feenablxcpt.c | 5 ++--- sysdeps/am33/fpu/fegetenv.c | 5 ++--- sysdeps/am33/fpu/fegetexcept.c | 5 ++--- sysdeps/am33/fpu/fegetround.c | 5 ++--- sysdeps/am33/fpu/feholdexcpt.c | 5 ++--- sysdeps/am33/fpu/fenv_libc.h | 5 ++--- sysdeps/am33/fpu/fesetenv.c | 5 ++--- sysdeps/am33/fpu/fesetround.c | 5 ++--- sysdeps/am33/fpu/feupdateenv.c | 5 ++--- sysdeps/am33/fpu/fgetexcptflg.c | 5 ++--- sysdeps/am33/fpu/fpu_control.h | 5 ++--- sysdeps/am33/fpu/fraiseexcpt.c | 5 ++--- sysdeps/am33/fpu/fsetexcptflg.c | 5 ++--- sysdeps/am33/fpu/ftestexcept.c | 5 ++--- sysdeps/am33/jmpbuf-offsets.h | 5 ++--- sysdeps/am33/jmpbuf-unwind.h | 5 ++--- sysdeps/am33/linuxthreads/pspinlock.c | 5 ++--- sysdeps/am33/linuxthreads/pt-machine.h | 5 ++--- sysdeps/am33/memusage.h | 5 ++--- sysdeps/am33/setjmp.S | 5 ++--- sysdeps/am33/stackinfo.h | 5 ++--- sysdeps/am33/sys/ucontext.h | 5 ++--- sysdeps/am33/sysdep.h | 5 ++--- sysdeps/arm/bits/link.h | 5 ++--- sysdeps/arm/bits/mathdef.h | 5 ++--- sysdeps/arm/bits/string.h | 5 ++--- sysdeps/arm/bsd-_setjmp.S | 5 ++--- sysdeps/arm/bsd-setjmp.S | 5 ++--- sysdeps/arm/crti.S | 5 ++--- sysdeps/arm/crtn.S | 5 ++--- sysdeps/arm/dl-irel.h | 5 ++--- sysdeps/arm/dl-lookupcfg.h | 5 ++--- sysdeps/arm/dl-machine.h | 5 ++--- sysdeps/arm/dl-sysdep.h | 5 ++--- sysdeps/arm/dl-tls.h | 5 ++--- sysdeps/arm/dl-tlsdesc.S | 5 ++--- sysdeps/arm/dl-tlsdesc.h | 5 ++--- sysdeps/arm/dl-trampoline.S | 5 ++--- sysdeps/arm/eabi/__longjmp.S | 5 ++--- sysdeps/arm/eabi/aeabi_assert.c | 5 ++--- sysdeps/arm/eabi/aeabi_atexit.c | 5 ++--- sysdeps/arm/eabi/aeabi_errno_addr.c | 5 ++--- sysdeps/arm/eabi/aeabi_lcsts.c | 5 ++--- sysdeps/arm/eabi/aeabi_localeconv.c | 5 ++--- sysdeps/arm/eabi/aeabi_math.c | 5 ++--- sysdeps/arm/eabi/aeabi_mb_cur_max.c | 5 ++--- sysdeps/arm/eabi/aeabi_memclr.c | 5 ++--- sysdeps/arm/eabi/aeabi_memcpy.c | 5 ++--- sysdeps/arm/eabi/aeabi_memmove.c | 5 ++--- sysdeps/arm/eabi/aeabi_memset.c | 5 ++--- sysdeps/arm/eabi/aeabi_sighandlers.S | 5 ++--- sysdeps/arm/eabi/aeabi_unwind_cpp_pr1.c | 5 ++--- sysdeps/arm/eabi/arm-mcount.S | 5 ++--- sysdeps/arm/eabi/armv6t2/memchr.S | 5 ++--- sysdeps/arm/eabi/backtrace.c | 5 ++--- sysdeps/arm/eabi/bits/fenv.h | 5 ++--- sysdeps/arm/eabi/bits/huge_val.h | 5 ++--- sysdeps/arm/eabi/bits/setjmp.h | 5 ++--- sysdeps/arm/eabi/fclrexcpt.c | 5 ++--- sysdeps/arm/eabi/fedisblxcpt.c | 5 ++--- sysdeps/arm/eabi/feenablxcpt.c | 5 ++--- sysdeps/arm/eabi/fegetenv.c | 5 ++--- sysdeps/arm/eabi/fegetexcept.c | 5 ++--- sysdeps/arm/eabi/fegetround.c | 5 ++--- sysdeps/arm/eabi/feholdexcpt.c | 5 ++--- sysdeps/arm/eabi/fesetenv.c | 5 ++--- sysdeps/arm/eabi/fesetround.c | 5 ++--- sysdeps/arm/eabi/feupdateenv.c | 5 ++--- sysdeps/arm/eabi/fgetexcptflg.c | 5 ++--- sysdeps/arm/eabi/find_exidx.c | 5 ++--- sysdeps/arm/eabi/fpu_control.h | 5 ++--- sysdeps/arm/eabi/fraiseexcpt.c | 5 ++--- sysdeps/arm/eabi/fsetexcptflg.c | 5 ++--- sysdeps/arm/eabi/ftestexcept.c | 5 ++--- sysdeps/arm/eabi/jmpbuf-offsets.h | 5 ++--- sysdeps/arm/eabi/machine-gmon.h | 5 ++--- sysdeps/arm/eabi/setfpucw.c | 5 ++--- sysdeps/arm/eabi/setjmp.S | 5 ++--- sysdeps/arm/elf/start.S | 5 ++--- sysdeps/arm/frame.h | 5 ++--- sysdeps/arm/gccframe.h | 5 ++--- sysdeps/arm/gmp-mparam.h | 4 +--- sysdeps/arm/jmpbuf-unwind.h | 5 ++--- sysdeps/arm/ldsodefs.h | 5 ++--- sysdeps/arm/libc-tls.c | 5 ++--- sysdeps/arm/memcpy.S | 5 ++--- sysdeps/arm/memmove.S | 5 ++--- sysdeps/arm/memset.S | 5 ++--- sysdeps/arm/memusage.h | 5 ++--- sysdeps/arm/nptl/Makefile | 5 ++--- sysdeps/arm/nptl/pthread_spin_lock.c | 5 ++--- sysdeps/arm/nptl/pthread_spin_trylock.c | 5 ++--- sysdeps/arm/nptl/pthreaddef.h | 5 ++--- sysdeps/arm/nptl/tls.h | 5 ++--- sysdeps/arm/stackinfo.h | 5 ++--- sysdeps/arm/strlen.S | 5 ++--- sysdeps/arm/sys/ucontext.h | 5 ++--- sysdeps/arm/sysdep.h | 5 ++--- sysdeps/arm/tlsdesc.c | 5 ++--- sysdeps/arm/tst-audit.h | 5 ++--- sysdeps/arm/unwind-dw2-fde-glibc.c | 5 ++--- sysdeps/hppa/Makefile | 5 ++--- sysdeps/hppa/__longjmp.S | 5 ++--- sysdeps/hppa/add_n.s | 5 ++--- sysdeps/hppa/bits/link.h | 5 ++--- sysdeps/hppa/bits/setjmp.h | 5 ++--- sysdeps/hppa/bsd-_setjmp.S | 5 ++--- sysdeps/hppa/bsd-setjmp.S | 5 ++--- sysdeps/hppa/dl-fptr.h | 5 ++--- sysdeps/hppa/dl-lookupcfg.h | 5 ++--- sysdeps/hppa/dl-machine.h | 5 ++--- sysdeps/hppa/dl-symaddr.c | 5 ++--- sysdeps/hppa/dl-tls.h | 5 ++--- sysdeps/hppa/dl-trampoline.S | 5 ++--- sysdeps/hppa/elf/initfini.c | 5 ++--- sysdeps/hppa/elf/start.S | 5 ++--- sysdeps/hppa/fpu/bits/fenv.h | 5 ++--- sysdeps/hppa/fpu/bits/mathdef.h | 5 ++--- sysdeps/hppa/fpu/fclrexcpt.c | 5 ++--- sysdeps/hppa/fpu/fedisblxcpt.c | 5 ++--- sysdeps/hppa/fpu/feenablxcpt.c | 5 ++--- sysdeps/hppa/fpu/fegetenv.c | 5 ++--- sysdeps/hppa/fpu/fegetexcept.c | 5 ++--- sysdeps/hppa/fpu/fegetround.c | 5 ++--- sysdeps/hppa/fpu/feholdexcpt.c | 5 ++--- sysdeps/hppa/fpu/fesetenv.c | 5 ++--- sysdeps/hppa/fpu/fesetround.c | 5 ++--- sysdeps/hppa/fpu/feupdateenv.c | 5 ++--- sysdeps/hppa/fpu/fgetexcptflg.c | 5 ++--- sysdeps/hppa/fpu/fraiseexcpt.c | 5 ++--- sysdeps/hppa/fpu/fsetexcptflg.c | 5 ++--- sysdeps/hppa/fpu/ftestexcept.c | 5 ++--- sysdeps/hppa/frame.h | 5 ++--- sysdeps/hppa/gccframe.h | 5 ++--- sysdeps/hppa/hppa1.1/addmul_1.s | 5 ++--- sysdeps/hppa/hppa1.1/mul_1.s | 5 ++--- sysdeps/hppa/hppa1.1/s_signbit.c | 5 ++--- sysdeps/hppa/hppa1.1/submul_1.s | 5 ++--- sysdeps/hppa/hppa1.1/udiv_qrnnd.s | 5 ++--- sysdeps/hppa/jmpbuf-offsets.h | 5 ++--- sysdeps/hppa/jmpbuf-unwind.h | 5 ++--- sysdeps/hppa/ldsodefs.h | 5 ++--- sysdeps/hppa/libc-tls.c | 5 ++--- sysdeps/hppa/libgcc-compat.c | 5 ++--- sysdeps/hppa/lshift.s | 5 ++--- sysdeps/hppa/machine-gmon.h | 5 ++--- sysdeps/hppa/memusage.h | 5 ++--- sysdeps/hppa/nptl/Makefile | 5 ++--- sysdeps/hppa/nptl/jmpbuf-unwind.h | 5 ++--- sysdeps/hppa/nptl/pthread_spin_init.c | 5 ++--- sysdeps/hppa/nptl/pthread_spin_lock.c | 5 ++--- sysdeps/hppa/nptl/pthread_spin_trylock.c | 5 ++--- sysdeps/hppa/nptl/pthread_spin_unlock.c | 5 ++--- sysdeps/hppa/nptl/pthreaddef.h | 5 ++--- sysdeps/hppa/nptl/tls.h | 5 ++--- sysdeps/hppa/rshift.s | 5 ++--- sysdeps/hppa/setjmp.S | 5 ++--- sysdeps/hppa/stackinfo.h | 5 ++--- sysdeps/hppa/sub_n.s | 5 ++--- sysdeps/hppa/sysdep.h | 5 ++--- sysdeps/hppa/tst-audit.h | 5 ++--- sysdeps/hppa/udiv_qrnnd.s | 5 ++--- sysdeps/m68k/Makefile | 5 ++--- sysdeps/m68k/__longjmp.c | 5 ++--- sysdeps/m68k/asm-syntax.h | 5 ++--- sysdeps/m68k/bits/byteswap.h | 5 ++--- sysdeps/m68k/bits/link.h | 5 ++--- sysdeps/m68k/bits/setjmp.h | 5 ++--- sysdeps/m68k/bsd-_setjmp.c | 5 ++--- sysdeps/m68k/bsd-setjmp.c | 5 ++--- sysdeps/m68k/coldfire/bits/atomic.h | 5 ++--- sysdeps/m68k/coldfire/fpu/e_sqrt.c | 5 ++--- sysdeps/m68k/coldfire/fpu/e_sqrtf.c | 5 ++--- sysdeps/m68k/coldfire/fpu/fraiseexcpt.c | 5 ++--- sysdeps/m68k/coldfire/fpu/s_fabs.c | 5 ++--- sysdeps/m68k/coldfire/fpu/s_fabsf.c | 5 ++--- sysdeps/m68k/coldfire/fpu/s_lrint.c | 5 ++--- sysdeps/m68k/coldfire/fpu/s_lrintf.c | 5 ++--- sysdeps/m68k/coldfire/fpu/s_rint.c | 5 ++--- sysdeps/m68k/coldfire/fpu/s_rintf.c | 5 ++--- sysdeps/m68k/coldfire/sysdep.h | 5 ++--- sysdeps/m68k/crti.S | 5 ++--- sysdeps/m68k/crtn.S | 5 ++--- sysdeps/m68k/dl-machine.h | 5 ++--- sysdeps/m68k/dl-tls.h | 5 ++--- sysdeps/m68k/dl-trampoline.S | 5 ++--- sysdeps/m68k/elf/start.S | 5 ++--- sysdeps/m68k/ffs.c | 5 ++--- sysdeps/m68k/fpu/bits/fenv.h | 5 ++--- sysdeps/m68k/fpu/fclrexcpt.c | 5 ++--- sysdeps/m68k/fpu/fedisblxcpt.c | 5 ++--- sysdeps/m68k/fpu/feenablxcpt.c | 5 ++--- sysdeps/m68k/fpu/fegetenv.c | 5 ++--- sysdeps/m68k/fpu/fegetexcept.c | 5 ++--- sysdeps/m68k/fpu/fegetround.c | 5 ++--- sysdeps/m68k/fpu/feholdexcpt.c | 5 ++--- sysdeps/m68k/fpu/fesetenv.c | 5 ++--- sysdeps/m68k/fpu/fesetround.c | 5 ++--- sysdeps/m68k/fpu/feupdateenv.c | 5 ++--- sysdeps/m68k/fpu/fgetexcptflg.c | 5 ++--- sysdeps/m68k/fpu/fsetexcptflg.c | 5 ++--- sysdeps/m68k/fpu/ftestexcept.c | 5 ++--- sysdeps/m68k/fpu_control.h | 5 ++--- sysdeps/m68k/gccframe.h | 5 ++--- sysdeps/m68k/jmpbuf-unwind.h | 5 ++--- sysdeps/m68k/ldsodefs.h | 5 ++--- sysdeps/m68k/libc-tls.c | 5 ++--- sysdeps/m68k/m680x0/add_n.S | 4 +--- sysdeps/m68k/m680x0/bits/huge_vall.h | 5 ++--- sysdeps/m68k/m680x0/bits/mathdef.h | 5 ++--- sysdeps/m68k/m680x0/fpu/bits/mathinline.h | 5 ++--- sysdeps/m68k/m680x0/fpu/e_acos.c | 5 ++--- sysdeps/m68k/m680x0/fpu/e_atan2.c | 5 ++--- sysdeps/m68k/m680x0/fpu/e_fmod.c | 5 ++--- sysdeps/m68k/m680x0/fpu/e_pow.c | 5 ++--- sysdeps/m68k/m680x0/fpu/e_scalb.c | 5 ++--- sysdeps/m68k/m680x0/fpu/fraiseexcpt.c | 5 ++--- sysdeps/m68k/m680x0/fpu/mathimpl.h | 5 ++--- sysdeps/m68k/m680x0/fpu/s_atan.c | 5 ++--- sysdeps/m68k/m680x0/fpu/s_ccosh.c | 5 ++--- sysdeps/m68k/m680x0/fpu/s_cexp.c | 5 ++--- sysdeps/m68k/m680x0/fpu/s_csin.c | 5 ++--- sysdeps/m68k/m680x0/fpu/s_csinh.c | 5 ++--- sysdeps/m68k/m680x0/fpu/s_expm1.c | 5 ++--- sysdeps/m68k/m680x0/fpu/s_fpclassifyl.c | 5 ++--- sysdeps/m68k/m680x0/fpu/s_frexp.c | 5 ++--- sysdeps/m68k/m680x0/fpu/s_frexpl.c | 5 ++--- sysdeps/m68k/m680x0/fpu/s_ilogb.c | 5 ++--- sysdeps/m68k/m680x0/fpu/s_isinf.c | 5 ++--- sysdeps/m68k/m680x0/fpu/s_llrint.c | 5 ++--- sysdeps/m68k/m680x0/fpu/s_llrintf.c | 5 ++--- sysdeps/m68k/m680x0/fpu/s_llrintl.c | 5 ++--- sysdeps/m68k/m680x0/fpu/s_lrint.c | 5 ++--- sysdeps/m68k/m680x0/fpu/s_modf.c | 5 ++--- sysdeps/m68k/m680x0/fpu/s_remquo.c | 5 ++--- sysdeps/m68k/m680x0/fpu/s_scalbn.c | 5 ++--- sysdeps/m68k/m680x0/fpu/s_sin.c | 5 ++--- sysdeps/m68k/m680x0/fpu/s_sincos.c | 5 ++--- sysdeps/m68k/m680x0/lshift.S | 4 +--- sysdeps/m68k/m680x0/m68020/addmul_1.S | 4 +--- sysdeps/m68k/m680x0/m68020/bits/atomic.h | 5 ++--- sysdeps/m68k/m680x0/m68020/bits/string.h | 5 ++--- sysdeps/m68k/m680x0/m68020/mul_1.S | 4 +--- sysdeps/m68k/m680x0/m68020/submul_1.S | 4 +--- sysdeps/m68k/m680x0/rshift.S | 4 +--- sysdeps/m68k/m680x0/sub_n.S | 4 +--- sysdeps/m68k/m680x0/sysdep.h | 5 ++--- sysdeps/m68k/memchr.S | 5 ++--- sysdeps/m68k/memcopy.h | 5 ++--- sysdeps/m68k/memusage.h | 5 ++--- sysdeps/m68k/nptl/Makefile | 5 ++--- sysdeps/m68k/nptl/pthread_spin_lock.c | 5 ++--- sysdeps/m68k/nptl/pthread_spin_trylock.c | 5 ++--- sysdeps/m68k/nptl/pthreaddef.h | 5 ++--- sysdeps/m68k/nptl/tls.h | 5 ++--- sysdeps/m68k/rawmemchr.S | 5 ++--- sysdeps/m68k/setjmp.c | 5 ++--- sysdeps/m68k/stackinfo.h | 5 ++--- sysdeps/m68k/strchr.S | 5 ++--- sysdeps/m68k/strchrnul.S | 5 ++--- sysdeps/m68k/sys/ucontext.h | 5 ++--- sysdeps/m68k/sysdep.h | 5 ++--- sysdeps/m68k/tls-macros.h | 5 ++--- sysdeps/m68k/tst-audit.h | 5 ++--- sysdeps/m68k/wcpcpy.c | 5 ++--- sysdeps/m68k/wcpcpy_chk.c | 5 ++--- sysdeps/mips/__longjmp.c | 5 ++--- sysdeps/mips/add_n.S | 5 ++--- sysdeps/mips/addmul_1.S | 5 ++--- sysdeps/mips/bits/atomic.h | 5 ++--- sysdeps/mips/bits/dlfcn.h | 5 ++--- sysdeps/mips/bits/fenv.h | 5 ++--- sysdeps/mips/bits/ipctypes.h | 5 ++--- sysdeps/mips/bits/link.h | 5 ++--- sysdeps/mips/bits/mathdef.h | 5 ++--- sysdeps/mips/bits/nan.h | 5 ++--- sysdeps/mips/bits/setjmp.h | 5 ++--- sysdeps/mips/bits/wordsize.h | 5 ++--- sysdeps/mips/bsd-_setjmp.S | 5 ++--- sysdeps/mips/bsd-setjmp.S | 5 ++--- sysdeps/mips/dl-dtprocnum.h | 5 ++--- sysdeps/mips/dl-lookup.c | 5 ++--- sysdeps/mips/dl-machine.h | 5 ++--- sysdeps/mips/dl-procinfo.c | 5 ++--- sysdeps/mips/dl-procinfo.h | 5 ++--- sysdeps/mips/dl-tls.h | 5 ++--- sysdeps/mips/dl-trampoline.c | 5 ++--- sysdeps/mips/elf/start.S | 5 ++--- sysdeps/mips/fpregdef.h | 5 ++--- sysdeps/mips/fpu/e_sqrt.c | 5 ++--- sysdeps/mips/fpu/e_sqrtf.c | 5 ++--- sysdeps/mips/fpu/fclrexcpt.c | 5 ++--- sysdeps/mips/fpu/fedisblxcpt.c | 5 ++--- sysdeps/mips/fpu/feenablxcpt.c | 5 ++--- sysdeps/mips/fpu/fegetenv.c | 5 ++--- sysdeps/mips/fpu/fegetexcept.c | 5 ++--- sysdeps/mips/fpu/fegetround.c | 5 ++--- sysdeps/mips/fpu/feholdexcpt.c | 5 ++--- sysdeps/mips/fpu/fenv_libc.h | 5 ++--- sysdeps/mips/fpu/fesetenv.c | 5 ++--- sysdeps/mips/fpu/fesetround.c | 5 ++--- sysdeps/mips/fpu/feupdateenv.c | 5 ++--- sysdeps/mips/fpu/fgetexcptflg.c | 5 ++--- sysdeps/mips/fpu/fraiseexcpt.c | 5 ++--- sysdeps/mips/fpu/fsetexcptflg.c | 5 ++--- sysdeps/mips/fpu/ftestexcept.c | 5 ++--- sysdeps/mips/fpu_control.h | 5 ++--- sysdeps/mips/gccframe.h | 5 ++--- sysdeps/mips/ieee754.h | 5 ++--- sysdeps/mips/init-first.c | 5 ++--- sysdeps/mips/jmpbuf-unwind.h | 5 ++--- sysdeps/mips/ldsodefs.h | 5 ++--- sysdeps/mips/libc-tls.c | 5 ++--- sysdeps/mips/lshift.S | 5 ++--- sysdeps/mips/machine-gmon.h | 5 ++--- sysdeps/mips/memcpy.S | 5 ++--- sysdeps/mips/memset.S | 5 ++--- sysdeps/mips/memusage.h | 5 ++--- sysdeps/mips/mips32/crti.S | 5 ++--- sysdeps/mips/mips32/crtn.S | 5 ++--- sysdeps/mips/mips64/__longjmp.c | 5 ++--- sysdeps/mips/mips64/add_n.S | 5 ++--- sysdeps/mips/mips64/addmul_1.S | 4 +--- sysdeps/mips/mips64/bsd-_setjmp.S | 5 ++--- sysdeps/mips/mips64/bsd-setjmp.S | 5 ++--- sysdeps/mips/mips64/lshift.S | 5 ++--- sysdeps/mips/mips64/memcpy.S | 5 ++--- sysdeps/mips/mips64/memset.S | 5 ++--- sysdeps/mips/mips64/mul_1.S | 5 ++--- sysdeps/mips/mips64/n32/crti.S | 5 ++--- sysdeps/mips/mips64/n32/crtn.S | 5 ++--- sysdeps/mips/mips64/n64/crti.S | 5 ++--- sysdeps/mips/mips64/n64/crtn.S | 5 ++--- sysdeps/mips/mips64/rshift.S | 5 ++--- sysdeps/mips/mips64/setjmp.S | 5 ++--- sysdeps/mips/mips64/setjmp_aux.c | 5 ++--- sysdeps/mips/mips64/soft-fp/e_sqrtl.c | 5 ++--- sysdeps/mips/mips64/sub_n.S | 5 ++--- sysdeps/mips/mips64/submul_1.S | 5 ++--- sysdeps/mips/mul_1.S | 5 ++--- sysdeps/mips/nptl/Makefile | 5 ++--- sysdeps/mips/nptl/pthread_spin_lock.S | 5 ++--- sysdeps/mips/nptl/pthread_spin_trylock.S | 5 ++--- sysdeps/mips/nptl/pthreaddef.h | 5 ++--- sysdeps/mips/nptl/tls.h | 5 ++--- sysdeps/mips/regdef.h | 5 ++--- sysdeps/mips/rshift.S | 5 ++--- sysdeps/mips/setjmp.S | 5 ++--- sysdeps/mips/setjmp_aux.c | 5 ++--- sysdeps/mips/sgidefs.h | 5 ++--- sysdeps/mips/stackinfo.h | 5 ++--- sysdeps/mips/sub_n.S | 5 ++--- sysdeps/mips/submul_1.S | 5 ++--- sysdeps/mips/sys/asm.h | 5 ++--- sysdeps/mips/sys/fpregdef.h | 5 ++--- sysdeps/mips/sys/regdef.h | 5 ++--- sysdeps/mips/sys/tas.h | 5 ++--- sysdeps/mips/sys/ucontext.h | 5 ++--- sysdeps/mips/tst-audit.h | 5 ++--- sysdeps/powerpc/dl-procinfo.c | 5 ++--- sysdeps/powerpc/dl-procinfo.h | 5 ++--- sysdeps/powerpc/nofpu/fclrexcpt.c | 5 ++--- sysdeps/powerpc/nofpu/fedisblxcpt.c | 5 ++--- sysdeps/powerpc/nofpu/feenablxcpt.c | 5 ++--- sysdeps/powerpc/nofpu/fegetenv.c | 5 ++--- sysdeps/powerpc/nofpu/fegetexcept.c | 5 ++--- sysdeps/powerpc/nofpu/fegetround.c | 5 ++--- sysdeps/powerpc/nofpu/feholdexcpt.c | 5 ++--- sysdeps/powerpc/nofpu/fenv_const.c | 5 ++--- sysdeps/powerpc/nofpu/fenv_libc.h | 5 ++--- sysdeps/powerpc/nofpu/fesetenv.c | 5 ++--- sysdeps/powerpc/nofpu/fesetround.c | 5 ++--- sysdeps/powerpc/nofpu/feupdateenv.c | 5 ++--- sysdeps/powerpc/nofpu/fgetexcptflg.c | 5 ++--- sysdeps/powerpc/nofpu/fraiseexcpt.c | 5 ++--- sysdeps/powerpc/nofpu/fsetexcptflg.c | 5 ++--- sysdeps/powerpc/nofpu/ftestexcept.c | 5 ++--- sysdeps/powerpc/nofpu/sim-full.c | 5 ++--- sysdeps/powerpc/nofpu/soft-supp.h | 5 ++--- sysdeps/powerpc/powerpc32/405/memcmp.S | 5 ++--- sysdeps/powerpc/powerpc32/405/memcpy.S | 5 ++--- sysdeps/powerpc/powerpc32/405/memset.S | 5 ++--- sysdeps/powerpc/powerpc32/405/strcmp.S | 5 ++--- sysdeps/powerpc/powerpc32/405/strcpy.S | 5 ++--- sysdeps/powerpc/powerpc32/405/strlen.S | 5 ++--- sysdeps/powerpc/powerpc32/405/strncmp.S | 5 ++--- sysdeps/tile/__longjmp.S | 5 ++--- sysdeps/tile/__tls_get_addr.S | 5 ++--- sysdeps/tile/_mcount.S | 5 ++--- sysdeps/tile/bits/atomic.h | 5 ++--- sysdeps/tile/bits/byteswap.h | 5 ++--- sysdeps/tile/bits/fenv.h | 5 ++--- sysdeps/tile/bits/link.h | 5 ++--- sysdeps/tile/bits/mathdef.h | 5 ++--- sysdeps/tile/bits/mathinline.h | 5 ++--- sysdeps/tile/bits/setjmp.h | 5 ++--- sysdeps/tile/bzero.S | 5 ++--- sysdeps/tile/dl-lookupcfg.h | 5 ++--- sysdeps/tile/dl-machine.h | 5 ++--- sysdeps/tile/dl-runtime.c | 5 ++--- sysdeps/tile/dl-start.S | 5 ++--- sysdeps/tile/dl-tls.c | 5 ++--- sysdeps/tile/dl-tls.h | 5 ++--- sysdeps/tile/dl-trampoline.S | 5 ++--- sysdeps/tile/elf/start.S | 5 ++--- sysdeps/tile/fegetenv.c | 5 ++--- sysdeps/tile/fegetround.c | 5 ++--- sysdeps/tile/feholdexcpt.c | 5 ++--- sysdeps/tile/fesetenv.c | 5 ++--- sysdeps/tile/fesetround.c | 5 ++--- sysdeps/tile/feupdateenv.c | 5 ++--- sysdeps/tile/ffs.c | 5 ++--- sysdeps/tile/gccframe.h | 5 ++--- sysdeps/tile/jmpbuf-offsets.h | 5 ++--- sysdeps/tile/jmpbuf-unwind.h | 5 ++--- sysdeps/tile/ldsodefs.h | 5 ++--- sysdeps/tile/machine-gmon.h | 5 ++--- sysdeps/tile/nptl/Makefile | 5 ++--- sysdeps/tile/nptl/pthread_spin_lock.c | 5 ++--- sysdeps/tile/nptl/pthread_spin_trylock.c | 5 ++--- sysdeps/tile/nptl/pthreaddef.h | 5 ++--- sysdeps/tile/nptl/tls.h | 5 ++--- sysdeps/tile/setjmp.S | 5 ++--- sysdeps/tile/stackinfo.h | 5 ++--- sysdeps/tile/sysdep.h | 5 ++--- sysdeps/tile/tilegx/bits/atomic.h | 5 ++--- sysdeps/tile/tilegx/memchr.c | 5 ++--- sysdeps/tile/tilegx/memcpy.c | 5 ++--- sysdeps/tile/tilegx/memset.c | 5 ++--- sysdeps/tile/tilegx/memusage.h | 5 ++--- sysdeps/tile/tilegx/rawmemchr.c | 5 ++--- sysdeps/tile/tilegx/strchr.c | 5 ++--- sysdeps/tile/tilegx/strchrnul.c | 5 ++--- sysdeps/tile/tilegx/string-endian.h | 5 ++--- sysdeps/tile/tilegx/strlen.c | 5 ++--- sysdeps/tile/tilegx/strrchr.c | 5 ++--- sysdeps/tile/tilepro/bits/atomic.h | 5 ++--- sysdeps/tile/tilepro/memchr.c | 5 ++--- sysdeps/tile/tilepro/memcpy.S | 5 ++--- sysdeps/tile/tilepro/memset.c | 5 ++--- sysdeps/tile/tilepro/memusage.h | 5 ++--- sysdeps/tile/tilepro/rawmemchr.c | 5 ++--- sysdeps/tile/tilepro/strchr.c | 5 ++--- sysdeps/tile/tilepro/strchrnul.c | 5 ++--- sysdeps/tile/tilepro/strlen.c | 5 ++--- sysdeps/tile/tilepro/strrchr.c | 5 ++--- sysdeps/tile/tls-macros.h | 5 ++--- sysdeps/tile/tst-audit.h | 5 ++--- sysdeps/unix/alpha/pipe.S | 5 ++--- sysdeps/unix/alpha/sysdep.S | 5 ++--- sysdeps/unix/alpha/sysdep.h | 5 ++--- sysdeps/unix/am33/sysdep.S | 5 ++--- sysdeps/unix/am33/sysdep.h | 5 ++--- sysdeps/unix/arm/brk.S | 5 ++--- sysdeps/unix/arm/fork.S | 5 ++--- sysdeps/unix/arm/start.c | 5 ++--- sysdeps/unix/arm/sysdep.S | 5 ++--- sysdeps/unix/arm/sysdep.h | 5 ++--- sysdeps/unix/mips/brk.S | 5 ++--- sysdeps/unix/mips/fork.S | 5 ++--- sysdeps/unix/mips/mips32/sysdep.h | 5 ++--- sysdeps/unix/mips/mips64/n32/sysdep.h | 5 ++--- sysdeps/unix/mips/mips64/n64/sysdep.h | 5 ++--- sysdeps/unix/mips/pipe.S | 5 ++--- sysdeps/unix/mips/sigreturn.S | 5 ++--- sysdeps/unix/mips/sysdep.S | 5 ++--- sysdeps/unix/mips/sysdep.h | 5 ++--- sysdeps/unix/mips/wait.S | 5 ++--- sysdeps/unix/sysv/linux/alpha/____longjmp_chk.S | 5 ++--- sysdeps/unix/sysv/linux/alpha/adjtime.c | 5 ++--- sysdeps/unix/sysv/linux/alpha/bits/dirent.h | 5 ++--- sysdeps/unix/sysv/linux/alpha/bits/errno.h | 5 ++--- sysdeps/unix/sysv/linux/alpha/bits/fcntl.h | 5 ++--- sysdeps/unix/sysv/linux/alpha/bits/ioctls.h | 5 ++--- sysdeps/unix/sysv/linux/alpha/bits/ipc.h | 5 ++--- sysdeps/unix/sysv/linux/alpha/bits/mman.h | 5 ++--- sysdeps/unix/sysv/linux/alpha/bits/msq.h | 5 ++--- sysdeps/unix/sysv/linux/alpha/bits/netdb.h | 5 ++--- sysdeps/unix/sysv/linux/alpha/bits/resource.h | 5 ++--- sysdeps/unix/sysv/linux/alpha/bits/sem.h | 5 ++--- sysdeps/unix/sysv/linux/alpha/bits/shm.h | 5 ++--- sysdeps/unix/sysv/linux/alpha/bits/sigaction.h | 5 ++--- sysdeps/unix/sysv/linux/alpha/bits/siginfo.h | 5 ++--- sysdeps/unix/sysv/linux/alpha/bits/signum.h | 5 ++--- sysdeps/unix/sysv/linux/alpha/bits/sigstack.h | 5 ++--- sysdeps/unix/sysv/linux/alpha/bits/socket.h | 5 ++--- sysdeps/unix/sysv/linux/alpha/bits/stat.h | 5 ++--- sysdeps/unix/sysv/linux/alpha/bits/statfs.h | 5 ++--- sysdeps/unix/sysv/linux/alpha/bits/termios.h | 5 ++--- sysdeps/unix/sysv/linux/alpha/bits/typesizes.h | 5 ++--- sysdeps/unix/sysv/linux/alpha/bits/wordsize.h | 5 ++--- sysdeps/unix/sysv/linux/alpha/brk.S | 5 ++--- sysdeps/unix/sysv/linux/alpha/clone.S | 5 ++--- sysdeps/unix/sysv/linux/alpha/dl-auxv.h | 5 ++--- sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c | 5 ++--- sysdeps/unix/sysv/linux/alpha/fxstat.c | 5 ++--- sysdeps/unix/sysv/linux/alpha/fxstatat.c | 5 ++--- sysdeps/unix/sysv/linux/alpha/getcontext.S | 5 ++--- sysdeps/unix/sysv/linux/alpha/gethostname.c | 5 ++--- sysdeps/unix/sysv/linux/alpha/getitimer.S | 5 ++--- sysdeps/unix/sysv/linux/alpha/getrusage.S | 5 ++--- sysdeps/unix/sysv/linux/alpha/getsysstats.c | 5 ++--- sysdeps/unix/sysv/linux/alpha/gettimeofday.S | 5 ++--- sysdeps/unix/sysv/linux/alpha/glob.c | 5 ++--- sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S | 5 ++--- sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S | 5 ++--- sysdeps/unix/sysv/linux/alpha/ioperm.c | 5 ++--- sysdeps/unix/sysv/linux/alpha/kernel-features.h | 5 ++--- sysdeps/unix/sysv/linux/alpha/kernel_termios.h | 5 ++--- sysdeps/unix/sysv/linux/alpha/lxstat.c | 5 ++--- sysdeps/unix/sysv/linux/alpha/makecontext.S | 5 ++--- sysdeps/unix/sysv/linux/alpha/msgctl.c | 5 ++--- sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h | 5 ++--- sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h | 5 ++--- sysdeps/unix/sysv/linux/alpha/nptl/bits/semaphore.h | 5 ++--- sysdeps/unix/sysv/linux/alpha/nptl/createthread.c | 5 ++--- sysdeps/unix/sysv/linux/alpha/nptl/fork.c | 5 ++--- sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h | 5 ++--- sysdeps/unix/sysv/linux/alpha/nptl/pt-vfork.S | 5 ++--- sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c | 5 ++--- sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h | 5 ++--- sysdeps/unix/sysv/linux/alpha/nptl/vfork.S | 5 ++--- sysdeps/unix/sysv/linux/alpha/oldglob.c | 5 ++--- sysdeps/unix/sysv/linux/alpha/register-dump.h | 5 ++--- sysdeps/unix/sysv/linux/alpha/rt_sigaction.S | 5 ++--- sysdeps/unix/sysv/linux/alpha/select.S | 5 ++--- sysdeps/unix/sysv/linux/alpha/semctl.c | 5 ++--- sysdeps/unix/sysv/linux/alpha/setcontext.S | 5 ++--- sysdeps/unix/sysv/linux/alpha/setfpucw.c | 5 ++--- sysdeps/unix/sysv/linux/alpha/setitimer.S | 5 ++--- sysdeps/unix/sysv/linux/alpha/settimeofday.S | 5 ++--- sysdeps/unix/sysv/linux/alpha/shmctl.c | 5 ++--- sysdeps/unix/sysv/linux/alpha/sigaction.c | 5 ++--- sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h | 5 ++--- sysdeps/unix/sysv/linux/alpha/sigprocmask.c | 5 ++--- sysdeps/unix/sysv/linux/alpha/sigsuspend.S | 5 ++--- sysdeps/unix/sysv/linux/alpha/sizes.h | 5 ++--- sysdeps/unix/sysv/linux/alpha/swapcontext.S | 5 ++--- sysdeps/unix/sysv/linux/alpha/sys/acct.h | 5 ++--- sysdeps/unix/sysv/linux/alpha/sys/io.h | 5 ++--- sysdeps/unix/sysv/linux/alpha/sys/procfs.h | 5 ++--- sysdeps/unix/sysv/linux/alpha/sys/ucontext.h | 5 ++--- sysdeps/unix/sysv/linux/alpha/sys/user.h | 5 ++--- sysdeps/unix/sysv/linux/alpha/syscall.S | 5 ++--- sysdeps/unix/sysv/linux/alpha/sysconf.c | 5 ++--- sysdeps/unix/sysv/linux/alpha/sysdep.h | 5 ++--- sysdeps/unix/sysv/linux/alpha/utimes.S | 5 ++--- sysdeps/unix/sysv/linux/alpha/wait4.S | 5 ++--- sysdeps/unix/sysv/linux/alpha/xstat.c | 5 ++--- sysdeps/unix/sysv/linux/alpha/xstatconv.c | 5 ++--- sysdeps/unix/sysv/linux/alpha/xstatconv.h | 5 ++--- sysdeps/unix/sysv/linux/am33/bits/fcntl.h | 5 ++--- sysdeps/unix/sysv/linux/am33/bits/mman.h | 5 ++--- sysdeps/unix/sysv/linux/am33/brk.c | 5 ++--- sysdeps/unix/sysv/linux/am33/clone.S | 5 ++--- sysdeps/unix/sysv/linux/am33/linuxthreads/sysdep-cancel.h | 5 ++--- sysdeps/unix/sysv/linux/am33/profil-counter.h | 5 ++--- sysdeps/unix/sysv/linux/am33/socket.S | 5 ++--- sysdeps/unix/sysv/linux/am33/syscall.S | 5 ++--- sysdeps/unix/sysv/linux/am33/sysdep.S | 5 ++--- sysdeps/unix/sysv/linux/am33/sysdep.h | 5 ++--- sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S | 5 ++--- sysdeps/unix/sysv/linux/arm/bits/fcntl.h | 5 ++--- sysdeps/unix/sysv/linux/arm/bits/mman.h | 5 ++--- sysdeps/unix/sysv/linux/arm/bits/shm.h | 5 ++--- sysdeps/unix/sysv/linux/arm/brk.c | 5 ++--- sysdeps/unix/sysv/linux/arm/clone.S | 5 ++--- sysdeps/unix/sysv/linux/arm/dl-procinfo.c | 5 ++--- sysdeps/unix/sysv/linux/arm/dl-procinfo.h | 5 ++--- sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S | 5 ++--- sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c | 5 ++--- sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S | 5 ++--- sysdeps/unix/sysv/linux/arm/eabi/mmap64.S | 5 ++--- sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h | 5 ++--- sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c | 5 ++--- sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c | 5 ++--- sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h | 5 ++--- sysdeps/unix/sysv/linux/arm/eabi/pread.c | 5 ++--- sysdeps/unix/sysv/linux/arm/eabi/pread64.c | 5 ++--- sysdeps/unix/sysv/linux/arm/eabi/pwrite.c | 5 ++--- sysdeps/unix/sysv/linux/arm/eabi/pwrite64.c | 5 ++--- sysdeps/unix/sysv/linux/arm/eabi/readahead.c | 5 ++--- sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S | 5 ++--- sysdeps/unix/sysv/linux/arm/eabi/syscall.S | 5 ++--- sysdeps/unix/sysv/linux/arm/eabi/sysdep.h | 5 ++--- sysdeps/unix/sysv/linux/arm/eabi/truncate64.c | 5 ++--- sysdeps/unix/sysv/linux/arm/eabi/umount.c | 5 ++--- sysdeps/unix/sysv/linux/arm/ioperm.c | 5 ++--- sysdeps/unix/sysv/linux/arm/kernel-features.h | 5 ++--- sysdeps/unix/sysv/linux/arm/ldsodefs.h | 5 ++--- sysdeps/unix/sysv/linux/arm/mmap.S | 5 ++--- sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h | 5 ++--- sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h | 5 ++--- sysdeps/unix/sysv/linux/arm/nptl/bits/semaphore.h | 5 ++--- sysdeps/unix/sysv/linux/arm/nptl/createthread.c | 5 ++--- sysdeps/unix/sysv/linux/arm/nptl/fork.c | 5 ++--- sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c | 5 ++--- sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h | 5 ++--- sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S | 5 ++--- sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c | 5 ++--- sysdeps/unix/sysv/linux/arm/nptl/vfork.S | 5 ++--- sysdeps/unix/sysv/linux/arm/posix_fadvise.c | 5 ++--- sysdeps/unix/sysv/linux/arm/posix_fadvise64.c | 5 ++--- sysdeps/unix/sysv/linux/arm/register-dump.h | 5 ++--- sysdeps/unix/sysv/linux/arm/sigaction.c | 5 ++--- sysdeps/unix/sysv/linux/arm/sigcontextinfo.h | 5 ++--- sysdeps/unix/sysv/linux/arm/socket.S | 5 ++--- sysdeps/unix/sysv/linux/arm/sys/elf.h | 5 ++--- sysdeps/unix/sysv/linux/arm/sys/io.h | 5 ++--- sysdeps/unix/sysv/linux/arm/sys/procfs.h | 5 ++--- sysdeps/unix/sysv/linux/arm/sys/ucontext.h | 5 ++--- sysdeps/unix/sysv/linux/arm/sys/user.h | 5 ++--- sysdeps/unix/sysv/linux/arm/sysdep.S | 5 ++--- sysdeps/unix/sysv/linux/arm/sysdep.h | 5 ++--- sysdeps/unix/sysv/linux/arm/vfork.S | 5 ++--- sysdeps/unix/sysv/linux/generic/____longjmp_chk.c | 5 ++--- sysdeps/unix/sysv/linux/generic/access.c | 5 ++--- sysdeps/unix/sysv/linux/generic/bits/fcntl.h | 5 ++--- sysdeps/unix/sysv/linux/generic/bits/msq.h | 5 ++--- sysdeps/unix/sysv/linux/generic/bits/sem.h | 5 ++--- sysdeps/unix/sysv/linux/generic/bits/shm.h | 5 ++--- sysdeps/unix/sysv/linux/generic/bits/stat.h | 5 ++--- sysdeps/unix/sysv/linux/generic/bits/statfs.h | 5 ++--- sysdeps/unix/sysv/linux/generic/bits/typesizes.h | 5 ++--- sysdeps/unix/sysv/linux/generic/brk.c | 5 ++--- sysdeps/unix/sysv/linux/generic/chmod.c | 5 ++--- sysdeps/unix/sysv/linux/generic/chown.c | 5 ++--- sysdeps/unix/sysv/linux/generic/creat.c | 5 ++--- sysdeps/unix/sysv/linux/generic/dl-origin.c | 5 ++--- sysdeps/unix/sysv/linux/generic/dup2.c | 5 ++--- sysdeps/unix/sysv/linux/generic/epoll_create.c | 5 ++--- sysdeps/unix/sysv/linux/generic/epoll_wait.c | 5 ++--- sysdeps/unix/sysv/linux/generic/futimesat.c | 5 ++--- sysdeps/unix/sysv/linux/generic/getdents64.c | 5 ++--- sysdeps/unix/sysv/linux/generic/inotify_init.c | 5 ++--- sysdeps/unix/sysv/linux/generic/kernel_stat.h | 5 ++--- sysdeps/unix/sysv/linux/generic/lchown.c | 5 ++--- sysdeps/unix/sysv/linux/generic/link.c | 5 ++--- sysdeps/unix/sysv/linux/generic/lxstat.c | 5 ++--- sysdeps/unix/sysv/linux/generic/mkdir.c | 5 ++--- sysdeps/unix/sysv/linux/generic/not-cancel.h | 5 ++--- sysdeps/unix/sysv/linux/generic/open.c | 5 ++--- sysdeps/unix/sysv/linux/generic/open64.c | 5 ++--- sysdeps/unix/sysv/linux/generic/pause.c | 5 ++--- sysdeps/unix/sysv/linux/generic/pipe.c | 5 ++--- sysdeps/unix/sysv/linux/generic/poll.c | 5 ++--- sysdeps/unix/sysv/linux/generic/readlink.c | 5 ++--- sysdeps/unix/sysv/linux/generic/readlink_chk.c | 5 ++--- sysdeps/unix/sysv/linux/generic/recv.c | 5 ++--- sysdeps/unix/sysv/linux/generic/rename.c | 5 ++--- sysdeps/unix/sysv/linux/generic/rmdir.c | 5 ++--- sysdeps/unix/sysv/linux/generic/select.c | 5 ++--- sysdeps/unix/sysv/linux/generic/send.c | 5 ++--- sysdeps/unix/sysv/linux/generic/symlink.c | 5 ++--- sysdeps/unix/sysv/linux/generic/sysctl.c | 5 ++--- sysdeps/unix/sysv/linux/generic/sysdep.h | 5 ++--- sysdeps/unix/sysv/linux/generic/umount.c | 5 ++--- sysdeps/unix/sysv/linux/generic/unlink.c | 5 ++--- sysdeps/unix/sysv/linux/generic/ustat.c | 5 ++--- sysdeps/unix/sysv/linux/generic/utimes.c | 5 ++--- sysdeps/unix/sysv/linux/generic/wordsize-32/fcntl.c | 5 ++--- sysdeps/unix/sysv/linux/generic/wordsize-32/fstatfs.c | 5 ++--- sysdeps/unix/sysv/linux/generic/wordsize-32/ftruncate.c | 5 ++--- sysdeps/unix/sysv/linux/generic/wordsize-32/ftruncate64.c | 5 ++--- sysdeps/unix/sysv/linux/generic/wordsize-32/fxstat.c | 5 ++--- sysdeps/unix/sysv/linux/generic/wordsize-32/fxstatat.c | 5 ++--- sysdeps/unix/sysv/linux/generic/wordsize-32/getdents.c | 5 ++--- sysdeps/unix/sysv/linux/generic/wordsize-32/llseek.c | 5 ++--- sysdeps/unix/sysv/linux/generic/wordsize-32/lseek.c | 5 ++--- sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat.c | 5 ++--- sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat64.c | 5 ++--- sysdeps/unix/sysv/linux/generic/wordsize-32/mmap.c | 5 ++--- sysdeps/unix/sysv/linux/generic/wordsize-32/overflow.h | 5 ++--- sysdeps/unix/sysv/linux/generic/wordsize-32/posix_fadvise.c | 5 ++--- sysdeps/unix/sysv/linux/generic/wordsize-32/pread.c | 5 ++--- sysdeps/unix/sysv/linux/generic/wordsize-32/pread64.c | 5 ++--- sysdeps/unix/sysv/linux/generic/wordsize-32/preadv.c | 5 ++--- sysdeps/unix/sysv/linux/generic/wordsize-32/preadv64.c | 5 ++--- sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite.c | 5 ++--- sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite64.c | 5 ++--- sysdeps/unix/sysv/linux/generic/wordsize-32/pwritev.c | 5 ++--- sysdeps/unix/sysv/linux/generic/wordsize-32/pwritev64.c | 5 ++--- sysdeps/unix/sysv/linux/generic/wordsize-32/sendfile.c | 5 ++--- sysdeps/unix/sysv/linux/generic/wordsize-32/statfs.c | 5 ++--- sysdeps/unix/sysv/linux/generic/wordsize-32/truncate.c | 5 ++--- sysdeps/unix/sysv/linux/generic/wordsize-32/truncate64.c | 5 ++--- sysdeps/unix/sysv/linux/generic/wordsize-32/xstat.c | 5 ++--- sysdeps/unix/sysv/linux/generic/wordsize-32/xstat64.c | 5 ++--- sysdeps/unix/sysv/linux/generic/xmknod.c | 5 ++--- sysdeps/unix/sysv/linux/generic/xstat.c | 5 ++--- sysdeps/unix/sysv/linux/hppa/bits/atomic.h | 5 ++--- sysdeps/unix/sysv/linux/hppa/bits/errno.h | 5 ++--- sysdeps/unix/sysv/linux/hppa/bits/fcntl.h | 5 ++--- sysdeps/unix/sysv/linux/hppa/bits/ioctls.h | 5 ++--- sysdeps/unix/sysv/linux/hppa/bits/ipc.h | 5 ++--- sysdeps/unix/sysv/linux/hppa/bits/mman.h | 5 ++--- sysdeps/unix/sysv/linux/hppa/bits/msq.h | 5 ++--- sysdeps/unix/sysv/linux/hppa/bits/sem.h | 5 ++--- sysdeps/unix/sysv/linux/hppa/bits/shm.h | 5 ++--- sysdeps/unix/sysv/linux/hppa/bits/sigaction.h | 5 ++--- sysdeps/unix/sysv/linux/hppa/bits/signum.h | 5 ++--- sysdeps/unix/sysv/linux/hppa/brk.c | 5 ++--- sysdeps/unix/sysv/linux/hppa/clone.S | 5 ++--- sysdeps/unix/sysv/linux/hppa/getcontext.S | 5 ++--- sysdeps/unix/sysv/linux/hppa/kernel-features.h | 5 ++--- sysdeps/unix/sysv/linux/hppa/makecontext.c | 5 ++--- sysdeps/unix/sysv/linux/hppa/mmap.c | 5 ++--- sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h | 5 ++--- sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h | 5 ++--- sysdeps/unix/sysv/linux/hppa/nptl/createthread.c | 5 ++--- sysdeps/unix/sysv/linux/hppa/nptl/fork.c | 5 ++--- sysdeps/unix/sysv/linux/hppa/nptl/libc-lowlevellock.c | 5 ++--- sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c | 5 ++--- sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h | 5 ++--- sysdeps/unix/sysv/linux/hppa/nptl/pt-initfini.c | 5 ++--- sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S | 5 ++--- sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_broadcast.c | 5 ++--- sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_destroy.c | 5 ++--- sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_init.c | 5 ++--- sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_signal.c | 5 ++--- sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_timedwait.c | 5 ++--- sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_wait.c | 5 ++--- sysdeps/unix/sysv/linux/hppa/nptl/pthread_once.c | 5 ++--- sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h | 5 ++--- sysdeps/unix/sysv/linux/hppa/profil-counter.h | 5 ++--- sysdeps/unix/sysv/linux/hppa/setcontext.S | 5 ++--- sysdeps/unix/sysv/linux/hppa/swapcontext.c | 5 ++--- sysdeps/unix/sysv/linux/hppa/sys/epoll.h | 5 ++--- sysdeps/unix/sysv/linux/hppa/sys/eventfd.h | 5 ++--- sysdeps/unix/sysv/linux/hppa/sys/inotify.h | 5 ++--- sysdeps/unix/sysv/linux/hppa/sys/procfs.h | 5 ++--- sysdeps/unix/sysv/linux/hppa/sys/signalfd.h | 5 ++--- sysdeps/unix/sysv/linux/hppa/sys/timerfd.h | 5 ++--- sysdeps/unix/sysv/linux/hppa/sys/ucontext.h | 5 ++--- sysdeps/unix/sysv/linux/hppa/syscall.S | 5 ++--- sysdeps/unix/sysv/linux/hppa/sysdep.c | 5 ++--- sysdeps/unix/sysv/linux/hppa/sysdep.h | 5 ++--- sysdeps/unix/sysv/linux/hppa/umount.c | 5 ++--- sysdeps/unix/sysv/linux/m68k/____longjmp_chk.c | 5 ++--- sysdeps/unix/sysv/linux/m68k/bits/fcntl.h | 5 ++--- sysdeps/unix/sysv/linux/m68k/bits/m68k-vdso.h | 5 ++--- sysdeps/unix/sysv/linux/m68k/bits/mman.h | 5 ++--- sysdeps/unix/sysv/linux/m68k/bits/poll.h | 5 ++--- sysdeps/unix/sysv/linux/m68k/bits/stat.h | 5 ++--- sysdeps/unix/sysv/linux/m68k/brk.c | 5 ++--- sysdeps/unix/sysv/linux/m68k/chown.c | 5 ++--- sysdeps/unix/sysv/linux/m68k/clone.S | 5 ++--- sysdeps/unix/sysv/linux/m68k/coldfire/nptl/bits/atomic.h | 5 ++--- sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h | 5 ++--- sysdeps/unix/sysv/linux/m68k/getpagesize.c | 5 ++--- sysdeps/unix/sysv/linux/m68k/getsysstats.c | 5 ++--- sysdeps/unix/sysv/linux/m68k/init-first.c | 5 ++--- sysdeps/unix/sysv/linux/m68k/kernel-features.h | 5 ++--- sysdeps/unix/sysv/linux/m68k/m680x0/sysdep.h | 5 ++--- sysdeps/unix/sysv/linux/m68k/m68k-helpers.S | 5 ++--- sysdeps/unix/sysv/linux/m68k/m68k-vdso.c | 5 ++--- sysdeps/unix/sysv/linux/m68k/mmap.S | 5 ++--- sysdeps/unix/sysv/linux/m68k/mremap.S | 5 ++--- sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h | 5 ++--- sysdeps/unix/sysv/linux/m68k/nptl/bits/semaphore.h | 5 ++--- sysdeps/unix/sysv/linux/m68k/nptl/createthread.c | 5 ++--- sysdeps/unix/sysv/linux/m68k/nptl/fork.c | 5 ++--- sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h | 5 ++--- sysdeps/unix/sysv/linux/m68k/nptl/pt-vfork.S | 5 ++--- sysdeps/unix/sysv/linux/m68k/nptl/pthread_once.c | 5 ++--- sysdeps/unix/sysv/linux/m68k/nptl/sysdep-cancel.h | 5 ++--- sysdeps/unix/sysv/linux/m68k/nptl/vfork.S | 5 ++--- sysdeps/unix/sysv/linux/m68k/register-dump.h | 5 ++--- sysdeps/unix/sysv/linux/m68k/semtimedop.S | 5 ++--- sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h | 5 ++--- sysdeps/unix/sysv/linux/m68k/socket.S | 5 ++--- sysdeps/unix/sysv/linux/m68k/sys/procfs.h | 5 ++--- sysdeps/unix/sysv/linux/m68k/sys/reg.h | 5 ++--- sysdeps/unix/sysv/linux/m68k/sys/ucontext.h | 5 ++--- sysdeps/unix/sysv/linux/m68k/sys/user.h | 5 ++--- sysdeps/unix/sysv/linux/m68k/syscall.S | 5 ++--- sysdeps/unix/sysv/linux/m68k/sysdep.S | 5 ++--- sysdeps/unix/sysv/linux/m68k/sysdep.h | 5 ++--- sysdeps/unix/sysv/linux/m68k/vfork.S | 5 ++--- sysdeps/unix/sysv/linux/mips/____longjmp_chk.c | 5 ++--- sysdeps/unix/sysv/linux/mips/_test_and_set.c | 5 ++--- sysdeps/unix/sysv/linux/mips/bits/errno.h | 5 ++--- sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 5 ++--- sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h | 5 ++--- sysdeps/unix/sysv/linux/mips/bits/ipc.h | 5 ++--- sysdeps/unix/sysv/linux/mips/bits/mman.h | 5 ++--- sysdeps/unix/sysv/linux/mips/bits/msq.h | 5 ++--- sysdeps/unix/sysv/linux/mips/bits/poll.h | 5 ++--- sysdeps/unix/sysv/linux/mips/bits/resource.h | 5 ++--- sysdeps/unix/sysv/linux/mips/bits/sem.h | 5 ++--- sysdeps/unix/sysv/linux/mips/bits/shm.h | 5 ++--- sysdeps/unix/sysv/linux/mips/bits/sigaction.h | 5 ++--- sysdeps/unix/sysv/linux/mips/bits/sigcontext.h | 5 ++--- sysdeps/unix/sysv/linux/mips/bits/siginfo.h | 5 ++--- sysdeps/unix/sysv/linux/mips/bits/signum.h | 5 ++--- sysdeps/unix/sysv/linux/mips/bits/sigstack.h | 5 ++--- sysdeps/unix/sysv/linux/mips/bits/stat.h | 5 ++--- sysdeps/unix/sysv/linux/mips/bits/statfs.h | 5 ++--- sysdeps/unix/sysv/linux/mips/bits/termios.h | 5 ++--- sysdeps/unix/sysv/linux/mips/brk.c | 5 ++--- sysdeps/unix/sysv/linux/mips/clone.S | 5 ++--- sysdeps/unix/sysv/linux/mips/dl-cache.h | 5 ++--- sysdeps/unix/sysv/linux/mips/dl-static.c | 5 ++--- sysdeps/unix/sysv/linux/mips/ftruncate64.c | 5 ++--- sysdeps/unix/sysv/linux/mips/getcontext.S | 5 ++--- sysdeps/unix/sysv/linux/mips/getsysstats.c | 5 ++--- sysdeps/unix/sysv/linux/mips/kernel-features.h | 5 ++--- sysdeps/unix/sysv/linux/mips/kernel_termios.h | 5 ++--- sysdeps/unix/sysv/linux/mips/ldsodefs.h | 5 ++--- sysdeps/unix/sysv/linux/mips/makecontext.S | 5 ++--- sysdeps/unix/sysv/linux/mips/mips32/accept4.c | 5 ++--- sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c | 5 ++--- sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise64.c | 5 ++--- sysdeps/unix/sysv/linux/mips/mips32/recvmmsg.c | 5 ++--- sysdeps/unix/sysv/linux/mips/mips32/sendmmsg.c | 5 ++--- sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c | 5 ++--- sysdeps/unix/sysv/linux/mips/mips32/sysdep.h | 5 ++--- sysdeps/unix/sysv/linux/mips/mips64/fxstatat64.c | 5 ++--- sysdeps/unix/sysv/linux/mips/mips64/ldconfig.h | 5 ++--- sysdeps/unix/sysv/linux/mips/mips64/msgctl.c | 5 ++--- sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c | 5 ++--- sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c | 5 ++--- sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise.c | 5 ++--- sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise64.c | 5 ++--- sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate.c | 5 ++--- sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate64.c | 5 ++--- sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h | 5 ++--- sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S | 5 ++--- sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h | 5 ++--- sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h | 5 ++--- sysdeps/unix/sysv/linux/mips/mips64/semctl.c | 5 ++--- sysdeps/unix/sysv/linux/mips/mips64/shmctl.c | 5 ++--- sysdeps/unix/sysv/linux/mips/mips64/syscall.S | 5 ++--- sysdeps/unix/sysv/linux/mips/nptl/bits/local_lim.h | 5 ++--- sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h | 5 ++--- sysdeps/unix/sysv/linux/mips/nptl/bits/semaphore.h | 5 ++--- sysdeps/unix/sysv/linux/mips/nptl/createthread.c | 5 ++--- sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h | 5 ++--- sysdeps/unix/sysv/linux/mips/nptl/pt-vfork.S | 5 ++--- sysdeps/unix/sysv/linux/mips/nptl/pthread_once.c | 5 ++--- sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h | 5 ++--- sysdeps/unix/sysv/linux/mips/nptl/vfork.S | 5 ++--- sysdeps/unix/sysv/linux/mips/pread.c | 5 ++--- sysdeps/unix/sysv/linux/mips/pread64.c | 5 ++--- sysdeps/unix/sysv/linux/mips/pwrite.c | 5 ++--- sysdeps/unix/sysv/linux/mips/pwrite64.c | 5 ++--- sysdeps/unix/sysv/linux/mips/readelflib.c | 5 ++--- sysdeps/unix/sysv/linux/mips/register-dump.h | 5 ++--- sysdeps/unix/sysv/linux/mips/setcontext.S | 5 ++--- sysdeps/unix/sysv/linux/mips/sigaction.c | 5 ++--- sysdeps/unix/sysv/linux/mips/sigcontextinfo.h | 5 ++--- sysdeps/unix/sysv/linux/mips/swapcontext.S | 5 ++--- sysdeps/unix/sysv/linux/mips/sys/cachectl.h | 5 ++--- sysdeps/unix/sysv/linux/mips/sys/procfs.h | 5 ++--- sysdeps/unix/sysv/linux/mips/sys/sysmips.h | 5 ++--- sysdeps/unix/sysv/linux/mips/sys/ucontext.h | 5 ++--- sysdeps/unix/sysv/linux/mips/sys/user.h | 5 ++--- sysdeps/unix/sysv/linux/mips/truncate64.c | 5 ++--- sysdeps/unix/sysv/linux/mips/ustat.c | 5 ++--- sysdeps/unix/sysv/linux/mips/vfork.S | 5 ++--- sysdeps/unix/sysv/linux/mips/xstatconv.c | 5 ++--- sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S | 5 ++--- sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S | 5 ++--- .../unix/sysv/linux/powerpc/powerpc32/nofpu/swapcontext.S | 5 ++--- sysdeps/unix/sysv/linux/tile/bits/environments.h | 5 ++--- sysdeps/unix/sysv/linux/tile/bits/local_lim.h | 5 ++--- sysdeps/unix/sysv/linux/tile/bits/mman.h | 5 ++--- sysdeps/unix/sysv/linux/tile/bits/sigaction.h | 5 ++--- sysdeps/unix/sysv/linux/tile/bits/siginfo.h | 5 ++--- sysdeps/unix/sysv/linux/tile/cacheflush.c | 5 ++--- sysdeps/unix/sysv/linux/tile/getcontext.S | 5 ++--- sysdeps/unix/sysv/linux/tile/kernel-features.h | 5 ++--- sysdeps/unix/sysv/linux/tile/makecontext.c | 5 ++--- sysdeps/unix/sysv/linux/tile/nptl/bits/pthreadtypes.h | 5 ++--- sysdeps/unix/sysv/linux/tile/nptl/bits/semaphore.h | 5 ++--- sysdeps/unix/sysv/linux/tile/nptl/clone.S | 5 ++--- sysdeps/unix/sysv/linux/tile/nptl/createthread.c | 5 ++--- sysdeps/unix/sysv/linux/tile/nptl/fork.c | 5 ++--- sysdeps/unix/sysv/linux/tile/nptl/lowlevellock.h | 5 ++--- sysdeps/unix/sysv/linux/tile/nptl/pthread_once.c | 5 ++--- sysdeps/unix/sysv/linux/tile/nptl/sysdep-cancel.h | 5 ++--- sysdeps/unix/sysv/linux/tile/nptl/vfork.S | 5 ++--- sysdeps/unix/sysv/linux/tile/profil-counter.h | 5 ++--- sysdeps/unix/sysv/linux/tile/set_dataplane.c | 5 ++--- sysdeps/unix/sysv/linux/tile/setcontext.S | 5 ++--- sysdeps/unix/sysv/linux/tile/sigcontextinfo.h | 5 ++--- sysdeps/unix/sysv/linux/tile/swapcontext.S | 5 ++--- sysdeps/unix/sysv/linux/tile/sys/cachectl.h | 5 ++--- sysdeps/unix/sysv/linux/tile/sys/dataplane.h | 5 ++--- sysdeps/unix/sysv/linux/tile/sys/procfs.h | 5 ++--- sysdeps/unix/sysv/linux/tile/sys/ptrace.h | 5 ++--- sysdeps/unix/sysv/linux/tile/sys/ucontext.h | 5 ++--- sysdeps/unix/sysv/linux/tile/syscall.S | 5 ++--- sysdeps/unix/sysv/linux/tile/sysdep.c | 5 ++--- sysdeps/unix/sysv/linux/tile/sysdep.h | 5 ++--- sysdeps/unix/sysv/linux/tile/tilegx/ioctl.S | 5 ++--- sysdeps/unix/sysv/linux/tile/tilegx/ldconfig.h | 5 ++--- sysdeps/unix/sysv/linux/tile/tilegx/register-dump.h | 5 ++--- sysdeps/unix/sysv/linux/tile/tilepro/ldconfig.h | 5 ++--- sysdeps/unix/sysv/linux/tile/tilepro/register-dump.h | 5 ++--- sysdeps/unix/sysv/linux/tile/ucontext_i.h | 5 ++--- 1089 files changed, 2183 insertions(+), 3240 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index c4ebcd9060..f34c3c4a97 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,8 @@ +2012-03-09 Paul Eggert + + [BZ #13673] + Replace FSF snail mail address with URLs, as per GNU coding standards. + 2012-03-04 Richard Henderson * sysdeps/unix/sysv/linux/alpha/ioperm.c (inline_sethae): Mark diff --git a/ChangeLog.am33 b/ChangeLog.am33 index ccffef38fc..d14f7226d9 100644 --- a/ChangeLog.am33 +++ b/ChangeLog.am33 @@ -1,3 +1,8 @@ +2012-03-09 Paul Eggert + + [BZ #13673] + Replace FSF snail mail address with URLs, as per GNU coding standards. + 2011-10-05 Andreas Schwab * sysdeps/am33/dl-machine.h (elf_machine_rela) diff --git a/ChangeLog.arm b/ChangeLog.arm index 18af911ab3..ba2cb23470 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2012-03-09 Paul Eggert + + [BZ #13673] + Replace FSF snail mail address with URLs, as per GNU coding standards. + 2012-03-05 Michael Hope * sysdeps/unix/sysv/linux/arm/eabi/getcontext.S: New file. diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 842d1bf5eb..722f647947 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,8 @@ +2012-03-09 Paul Eggert + + [BZ #13673] + Replace FSF snail mail address with URLs, as per GNU coding standards. + 2012-03-03 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h: Name diff --git a/ChangeLog.linux-generic b/ChangeLog.linux-generic index a2f6a56935..73b03847d9 100644 --- a/ChangeLog.linux-generic +++ b/ChangeLog.linux-generic @@ -1,3 +1,8 @@ +2012-03-09 Paul Eggert + + [BZ #13673] + Replace FSF snail mail address with URLs, as per GNU coding standards. + 2012-01-30 Chris Metcalf * sysdeps/unix/sysv/linux/generic/not-cancel.h: New file. diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 0f1354d7a4..e78d1a7368 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2012-03-09 Paul Eggert + + [BZ #13673] + Replace FSF snail mail address with URLs, as per GNU coding standards. + 2012-03-05 Andreas Schwab * sysdeps/m68k/m680x0/fpu/libm-test-ulps: Update. diff --git a/ChangeLog.mips b/ChangeLog.mips index 61e14464c7..8eef3c8fec 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2012-03-09 Paul Eggert + + [BZ #13673] + Replace FSF snail mail address with URLs, as per GNU coding standards. + 2012-03-09 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/socket_type.h: New file. diff --git a/ChangeLog.powerpc b/ChangeLog.powerpc index f258b4633f..802044f51a 100644 --- a/ChangeLog.powerpc +++ b/ChangeLog.powerpc @@ -1,3 +1,8 @@ +2012-03-09 Paul Eggert + + [BZ #13673] + Replace FSF snail mail address with URLs, as per GNU coding standards. + 2012-02-20 Joseph Myers * sysdeps/powerpc/nofpu/libm-test-ulps: Resort with diff --git a/ChangeLog.tile b/ChangeLog.tile index 095b4fe8b3..624196834d 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,3 +1,8 @@ +2012-03-09 Paul Eggert + + [BZ #13673] + Replace FSF snail mail address with URLs, as per GNU coding standards. + 2012-01-31 Chris Metcalf * sysdeps/tile/bits/fenv.h: Use const instead of __const. diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile index 725ae43584..b08f69d997 100644 --- a/sysdeps/alpha/Makefile +++ b/sysdeps/alpha/Makefile @@ -13,9 +13,8 @@ # 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. +# License along with the GNU C Library. If not, see +# . ifeq ($(subdir),db2) CPPFLAGS += -DHAVE_SPINLOCKS=1 -DHAVE_ASSEM_ALPHA=1 diff --git a/sysdeps/alpha/__longjmp.S b/sysdeps/alpha/__longjmp.S index bed26658de..12f424da3d 100644 --- a/sysdeps/alpha/__longjmp.S +++ b/sysdeps/alpha/__longjmp.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define __ASSEMBLY__ diff --git a/sysdeps/alpha/_mcount.S b/sysdeps/alpha/_mcount.S index c4c921b4f7..9d7c15be73 100644 --- a/sysdeps/alpha/_mcount.S +++ b/sysdeps/alpha/_mcount.S @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Assembly stub to invoke _mcount(). Compiler generated code calls this stub after executing a function's prologue and without saving any diff --git a/sysdeps/alpha/add_n.s b/sysdeps/alpha/add_n.s index e0dc2fd0c4..745ac28373 100644 --- a/sysdeps/alpha/add_n.s +++ b/sysdeps/alpha/add_n.s @@ -16,9 +16,7 @@ # License for more details. # You should have received a copy of the GNU Lesser General Public License - # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - # MA 02111-1307, USA. + # along with the GNU MP Library. If not, see . # INPUT PARAMETERS diff --git a/sysdeps/alpha/addmul_1.s b/sysdeps/alpha/addmul_1.s index da26c692ae..4ef3ff5bd0 100644 --- a/sysdeps/alpha/addmul_1.s +++ b/sysdeps/alpha/addmul_1.s @@ -16,9 +16,7 @@ # License for more details. # You should have received a copy of the GNU Lesser General Public License - # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - # MA 02111-1307, USA. + # along with the GNU MP Library. If not, see . # INPUT PARAMETERS diff --git a/sysdeps/alpha/alphaev5/add_n.s b/sysdeps/alpha/alphaev5/add_n.s index 1ff8e9543f..b8b3a6c985 100644 --- a/sysdeps/alpha/alphaev5/add_n.s +++ b/sysdeps/alpha/alphaev5/add_n.s @@ -16,9 +16,7 @@ # License for more details. # You should have received a copy of the GNU Lesser General Public License - # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - # MA 02111-1307, USA. + # along with the GNU MP Library. If not, see . # INPUT PARAMETERS diff --git a/sysdeps/alpha/alphaev5/lshift.s b/sysdeps/alpha/alphaev5/lshift.s index e41ce9a91e..0d5b504894 100644 --- a/sysdeps/alpha/alphaev5/lshift.s +++ b/sysdeps/alpha/alphaev5/lshift.s @@ -15,9 +15,7 @@ # License for more details. # You should have received a copy of the GNU Lesser General Public License - # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - # MA 02111-1307, USA. + # along with the GNU MP Library. If not, see . # INPUT PARAMETERS diff --git a/sysdeps/alpha/alphaev5/rshift.s b/sysdeps/alpha/alphaev5/rshift.s index 9948e50002..c62d26eac5 100644 --- a/sysdeps/alpha/alphaev5/rshift.s +++ b/sysdeps/alpha/alphaev5/rshift.s @@ -15,9 +15,7 @@ # License for more details. # You should have received a copy of the GNU Lesser General Public License - # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - # MA 02111-1307, USA. + # along with the GNU MP Library. If not, see . # INPUT PARAMETERS diff --git a/sysdeps/alpha/alphaev5/sub_n.s b/sysdeps/alpha/alphaev5/sub_n.s index 3c706cf237..7741830406 100644 --- a/sysdeps/alpha/alphaev5/sub_n.s +++ b/sysdeps/alpha/alphaev5/sub_n.s @@ -16,9 +16,7 @@ # License for more details. # You should have received a copy of the GNU Lesser General Public License - # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - # MA 02111-1307, USA. + # along with the GNU MP Library. If not, see . # INPUT PARAMETERS diff --git a/sysdeps/alpha/alphaev6/addmul_1.s b/sysdeps/alpha/alphaev6/addmul_1.s index a061fb9edb..c663f0a1d2 100644 --- a/sysdeps/alpha/alphaev6/addmul_1.s +++ b/sysdeps/alpha/alphaev6/addmul_1.s @@ -16,9 +16,7 @@ # License for more details. # # You should have received a copy of the GNU Lesser General Public License - # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - # MA 02111-1307, USA. + # along with the GNU MP Library. If not, see . # INPUT PARAMETERS # res_ptr $16 diff --git a/sysdeps/alpha/alphaev6/fpu/e_sqrt.S b/sysdeps/alpha/alphaev6/fpu/e_sqrt.S index 64a08826f6..eae1fb4e4c 100644 --- a/sysdeps/alpha/alphaev6/fpu/e_sqrt.S +++ b/sysdeps/alpha/alphaev6/fpu/e_sqrt.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/alpha/alphaev6/fpu/e_sqrtf.S b/sysdeps/alpha/alphaev6/fpu/e_sqrtf.S index 3500e832c1..c8217e5454 100644 --- a/sysdeps/alpha/alphaev6/fpu/e_sqrtf.S +++ b/sysdeps/alpha/alphaev6/fpu/e_sqrtf.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/alpha/alphaev6/memcpy.S b/sysdeps/alpha/alphaev6/memcpy.S index 7cff521da2..99fbda2141 100644 --- a/sysdeps/alpha/alphaev6/memcpy.S +++ b/sysdeps/alpha/alphaev6/memcpy.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* * Much of the information about 21264 scheduling/coding comes from: diff --git a/sysdeps/alpha/alphaev6/memset.S b/sysdeps/alpha/alphaev6/memset.S index 3b3c4ba061..78b43b2e8d 100644 --- a/sysdeps/alpha/alphaev6/memset.S +++ b/sysdeps/alpha/alphaev6/memset.S @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/alpha/alphaev6/stxcpy.S b/sysdeps/alpha/alphaev6/stxcpy.S index 3c3e7d72bf..37ad737ba8 100644 --- a/sysdeps/alpha/alphaev6/stxcpy.S +++ b/sysdeps/alpha/alphaev6/stxcpy.S @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Copy a null-terminated string from SRC to DST. diff --git a/sysdeps/alpha/alphaev6/stxncpy.S b/sysdeps/alpha/alphaev6/stxncpy.S index f39c23a886..31f85706f9 100644 --- a/sysdeps/alpha/alphaev6/stxncpy.S +++ b/sysdeps/alpha/alphaev6/stxncpy.S @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Copy no more than COUNT bytes of the null-terminated string from SRC to DST. diff --git a/sysdeps/alpha/alphaev67/ffs.S b/sysdeps/alpha/alphaev67/ffs.S index fb1cdd932c..36215485b8 100644 --- a/sysdeps/alpha/alphaev67/ffs.S +++ b/sysdeps/alpha/alphaev67/ffs.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Finds the first bit set in an integer. */ diff --git a/sysdeps/alpha/alphaev67/ffsll.S b/sysdeps/alpha/alphaev67/ffsll.S index 72ef094189..77ef7d5dc5 100644 --- a/sysdeps/alpha/alphaev67/ffsll.S +++ b/sysdeps/alpha/alphaev67/ffsll.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Finds the first bit set in a long. */ diff --git a/sysdeps/alpha/alphaev67/rawmemchr.S b/sysdeps/alpha/alphaev67/rawmemchr.S index 8c7e9423b0..d3b1bf5d65 100644 --- a/sysdeps/alpha/alphaev67/rawmemchr.S +++ b/sysdeps/alpha/alphaev67/rawmemchr.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Return pointer to first occurrence of CH in STR. */ diff --git a/sysdeps/alpha/alphaev67/stpcpy.S b/sysdeps/alpha/alphaev67/stpcpy.S index b5da4e05d3..dc2dd81a20 100644 --- a/sysdeps/alpha/alphaev67/stpcpy.S +++ b/sysdeps/alpha/alphaev67/stpcpy.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Copy SRC to DEST returning the address of the terminating 0 in DEST. */ diff --git a/sysdeps/alpha/alphaev67/stpncpy.S b/sysdeps/alpha/alphaev67/stpncpy.S index 4d61d71317..2402ae5b09 100644 --- a/sysdeps/alpha/alphaev67/stpncpy.S +++ b/sysdeps/alpha/alphaev67/stpncpy.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Copy no more then N bytes from SRC to DEST, returning the address of the terminating '\0' in DEST. */ diff --git a/sysdeps/alpha/alphaev67/strcat.S b/sysdeps/alpha/alphaev67/strcat.S index ae7c48808a..48ef9d72a9 100644 --- a/sysdeps/alpha/alphaev67/strcat.S +++ b/sysdeps/alpha/alphaev67/strcat.S @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Append a null-terminated string from SRC to DST. */ diff --git a/sysdeps/alpha/alphaev67/strchr.S b/sysdeps/alpha/alphaev67/strchr.S index 101c7d489a..f9eaf7b96f 100644 --- a/sysdeps/alpha/alphaev67/strchr.S +++ b/sysdeps/alpha/alphaev67/strchr.S @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Return the address of a given character within a null-terminated string, or null if it is not found. */ diff --git a/sysdeps/alpha/alphaev67/strlen.S b/sysdeps/alpha/alphaev67/strlen.S index b83eacceaf..5705f2d09e 100644 --- a/sysdeps/alpha/alphaev67/strlen.S +++ b/sysdeps/alpha/alphaev67/strlen.S @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Finds length of a 0-terminated string. */ diff --git a/sysdeps/alpha/alphaev67/strncat.S b/sysdeps/alpha/alphaev67/strncat.S index ae3257ca42..e354128674 100644 --- a/sysdeps/alpha/alphaev67/strncat.S +++ b/sysdeps/alpha/alphaev67/strncat.S @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Append no more than COUNT characters from the null-terminated string SRC to the null-terminated string DST. Always null-terminate the new DST. */ diff --git a/sysdeps/alpha/alphaev67/strrchr.S b/sysdeps/alpha/alphaev67/strrchr.S index c46a3df4f8..3aa6b23dc3 100644 --- a/sysdeps/alpha/alphaev67/strrchr.S +++ b/sysdeps/alpha/alphaev67/strrchr.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Return the address of the last occurrence of a given character within a null-terminated string, or null if it is not found. */ diff --git a/sysdeps/alpha/bb_init_func.S b/sysdeps/alpha/bb_init_func.S index f711c8cb74..5a647b3bde 100644 --- a/sysdeps/alpha/bb_init_func.S +++ b/sysdeps/alpha/bb_init_func.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* __bb_init_func is invoked at the beginning of each function, before any registers have been saved. It is therefore safe to use any diff --git a/sysdeps/alpha/bits/atomic.h b/sysdeps/alpha/bits/atomic.h index 602fde3ff9..bf6edbd5f6 100644 --- a/sysdeps/alpha/bits/atomic.h +++ b/sysdeps/alpha/bits/atomic.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/alpha/bits/link.h b/sysdeps/alpha/bits/link.h index 429faff432..e86bccab8a 100644 --- a/sysdeps/alpha/bits/link.h +++ b/sysdeps/alpha/bits/link.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _LINK_H # error "Never include directly; use instead." diff --git a/sysdeps/alpha/bits/mathdef.h b/sysdeps/alpha/bits/mathdef.h index cbfaf68e22..7648a9ec40 100644 --- a/sysdeps/alpha/bits/mathdef.h +++ b/sysdeps/alpha/bits/mathdef.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #if !defined _MATH_H && !defined _COMPLEX_H # error "Never use directly; include instead" diff --git a/sysdeps/alpha/bits/setjmp.h b/sysdeps/alpha/bits/setjmp.h index eb0b478fb8..7d40293182 100644 --- a/sysdeps/alpha/bits/setjmp.h +++ b/sysdeps/alpha/bits/setjmp.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _BITS_SETJMP_H #define _BITS_SETJMP_H 1 diff --git a/sysdeps/alpha/bzero.S b/sysdeps/alpha/bzero.S index 87e575babb..091024b1ee 100644 --- a/sysdeps/alpha/bzero.S +++ b/sysdeps/alpha/bzero.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Fill a block of memory with zeros. Optimized for the Alpha architecture: diff --git a/sysdeps/alpha/div.S b/sysdeps/alpha/div.S index d1a724d375..38aeb1472d 100644 --- a/sysdeps/alpha/div.S +++ b/sysdeps/alpha/div.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include "div_libc.h" diff --git a/sysdeps/alpha/div_libc.h b/sysdeps/alpha/div_libc.h index b731b02e25..904d3ae566 100644 --- a/sysdeps/alpha/div_libc.h +++ b/sysdeps/alpha/div_libc.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Common bits for implementing software divide. */ diff --git a/sysdeps/alpha/divl.S b/sysdeps/alpha/divl.S index 9bac0450d0..4627eff6aa 100644 --- a/sysdeps/alpha/divl.S +++ b/sysdeps/alpha/divl.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include "div_libc.h" diff --git a/sysdeps/alpha/divq.S b/sysdeps/alpha/divq.S index d2ed2c5af6..4126293940 100644 --- a/sysdeps/alpha/divq.S +++ b/sysdeps/alpha/divq.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include "div_libc.h" diff --git a/sysdeps/alpha/divqu.S b/sysdeps/alpha/divqu.S index ef3cdb1b2b..a99dd1972d 100644 --- a/sysdeps/alpha/divqu.S +++ b/sysdeps/alpha/divqu.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include "div_libc.h" diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 5ab71b1d1d..35fbf3d192 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* This was written in the absence of an ABI -- don't expect it to remain unchanged. */ diff --git a/sysdeps/alpha/dl-procinfo.c b/sysdeps/alpha/dl-procinfo.c index d280cb2f80..a0a5534029 100644 --- a/sysdeps/alpha/dl-procinfo.c +++ b/sysdeps/alpha/dl-procinfo.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* This information must be kept in sync with the _DL_PLATFORM_COUNT definitions in procinfo.h. diff --git a/sysdeps/alpha/dl-procinfo.h b/sysdeps/alpha/dl-procinfo.h index 1372f0a2f2..3db0efb200 100644 --- a/sysdeps/alpha/dl-procinfo.h +++ b/sysdeps/alpha/dl-procinfo.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _DL_PROCINFO_H #define _DL_PROCINFO_H 1 diff --git a/sysdeps/alpha/dl-sysdep.h b/sysdeps/alpha/dl-sysdep.h index cd678f4e43..91c754b12c 100644 --- a/sysdeps/alpha/dl-sysdep.h +++ b/sysdeps/alpha/dl-sysdep.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include_next diff --git a/sysdeps/alpha/dl-tls.h b/sysdeps/alpha/dl-tls.h index d40d0a4ac5..6bb3b81b36 100644 --- a/sysdeps/alpha/dl-tls.h +++ b/sysdeps/alpha/dl-tls.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Type used for the representation of TLS information in the GOT. */ diff --git a/sysdeps/alpha/dl-trampoline.S b/sysdeps/alpha/dl-trampoline.S index c52efbb3bc..97c122448f 100644 --- a/sysdeps/alpha/dl-trampoline.S +++ b/sysdeps/alpha/dl-trampoline.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/alpha/elf/crti.S b/sysdeps/alpha/elf/crti.S index b5989bfb49..bfb69d475a 100644 --- a/sysdeps/alpha/elf/crti.S +++ b/sysdeps/alpha/elf/crti.S @@ -30,9 +30,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* crti.S puts a function prologue at the beginning of the .init and .fini sections and defines global symbols for those addresses, so diff --git a/sysdeps/alpha/elf/crtn.S b/sysdeps/alpha/elf/crtn.S index 50e772fb62..72b3c8aaab 100644 --- a/sysdeps/alpha/elf/crtn.S +++ b/sysdeps/alpha/elf/crtn.S @@ -30,9 +30,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* crtn.S puts function epilogues in the .init and .fini sections corresponding to the prologues in crti.S. */ diff --git a/sysdeps/alpha/elf/start.S b/sysdeps/alpha/elf/start.S index ebe14b4c8e..4875536add 100644 --- a/sysdeps/alpha/elf/start.S +++ b/sysdeps/alpha/elf/start.S @@ -32,9 +32,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/alpha/ffs.S b/sysdeps/alpha/ffs.S index 5f2074ee7c..525bf66f2c 100644 --- a/sysdeps/alpha/ffs.S +++ b/sysdeps/alpha/ffs.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Finds the first bit set in an integer. Optimized for the Alpha architecture. */ diff --git a/sysdeps/alpha/fpu/bits/fenv.h b/sysdeps/alpha/fpu/bits/fenv.h index a9e89b498e..bab54a790b 100644 --- a/sysdeps/alpha/fpu/bits/fenv.h +++ b/sysdeps/alpha/fpu/bits/fenv.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _FENV_H # error "Never use directly; include instead." diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h index 5378a181c6..1d15c28191 100644 --- a/sysdeps/alpha/fpu/bits/mathinline.h +++ b/sysdeps/alpha/fpu/bits/mathinline.h @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _MATH_H # error "Never use directly; include instead." diff --git a/sysdeps/alpha/fpu/cabsf.c b/sysdeps/alpha/fpu/cabsf.c index de8e6b5548..7994ddf8b6 100644 --- a/sysdeps/alpha/fpu/cabsf.c +++ b/sysdeps/alpha/fpu/cabsf.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define __cabsf __cabsf_not_defined #define cabsf cabsf_not_defined diff --git a/sysdeps/alpha/fpu/cargf.c b/sysdeps/alpha/fpu/cargf.c index 1d96e5897d..ec0a23270d 100644 --- a/sysdeps/alpha/fpu/cargf.c +++ b/sysdeps/alpha/fpu/cargf.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define __cargf __cargf_not_defined #define cargf cargf_not_defined diff --git a/sysdeps/alpha/fpu/cfloat-compat.h b/sysdeps/alpha/fpu/cfloat-compat.h index d325a7650e..f75bb9bb82 100644 --- a/sysdeps/alpha/fpu/cfloat-compat.h +++ b/sysdeps/alpha/fpu/cfloat-compat.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* The behaviour of complex float changed between GCC 3.3 and 3.4. diff --git a/sysdeps/alpha/fpu/cimagf.c b/sysdeps/alpha/fpu/cimagf.c index a9b351f188..2db68e4ac2 100644 --- a/sysdeps/alpha/fpu/cimagf.c +++ b/sysdeps/alpha/fpu/cimagf.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define __cimagf __cimagf_not_defined #define cimagf cimagf_not_defined diff --git a/sysdeps/alpha/fpu/conjf.c b/sysdeps/alpha/fpu/conjf.c index 6ff92b9948..e182344495 100644 --- a/sysdeps/alpha/fpu/conjf.c +++ b/sysdeps/alpha/fpu/conjf.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define __conjf __conjf_not_defined #define conjf conjf_not_defined diff --git a/sysdeps/alpha/fpu/crealf.c b/sysdeps/alpha/fpu/crealf.c index 52ab271738..555f3eafd1 100644 --- a/sysdeps/alpha/fpu/crealf.c +++ b/sysdeps/alpha/fpu/crealf.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define __crealf __crealf_not_defined #define crealf crealf_not_defined diff --git a/sysdeps/alpha/fpu/e_sqrt.c b/sysdeps/alpha/fpu/e_sqrt.c index c5ab25f16f..22b24b53f3 100644 --- a/sysdeps/alpha/fpu/e_sqrt.c +++ b/sysdeps/alpha/fpu/e_sqrt.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/alpha/fpu/fclrexcpt.c b/sysdeps/alpha/fpu/fclrexcpt.c index b7176e0979..2d2bd94db7 100644 --- a/sysdeps/alpha/fpu/fclrexcpt.c +++ b/sysdeps/alpha/fpu/fclrexcpt.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/alpha/fpu/fedisblxcpt.c b/sysdeps/alpha/fpu/fedisblxcpt.c index 98c33ca842..6311b56c8e 100644 --- a/sysdeps/alpha/fpu/fedisblxcpt.c +++ b/sysdeps/alpha/fpu/fedisblxcpt.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/alpha/fpu/feenablxcpt.c b/sysdeps/alpha/fpu/feenablxcpt.c index 80d657e4bd..0b0e17f818 100644 --- a/sysdeps/alpha/fpu/feenablxcpt.c +++ b/sysdeps/alpha/fpu/feenablxcpt.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/alpha/fpu/fegetenv.c b/sysdeps/alpha/fpu/fegetenv.c index ceaf9ed50d..e182a971d7 100644 --- a/sysdeps/alpha/fpu/fegetenv.c +++ b/sysdeps/alpha/fpu/fegetenv.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/alpha/fpu/fegetexcept.c b/sysdeps/alpha/fpu/fegetexcept.c index ccc79e405d..049c68215e 100644 --- a/sysdeps/alpha/fpu/fegetexcept.c +++ b/sysdeps/alpha/fpu/fegetexcept.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/alpha/fpu/fegetround.c b/sysdeps/alpha/fpu/fegetround.c index 995aee80da..869d8306b3 100644 --- a/sysdeps/alpha/fpu/fegetround.c +++ b/sysdeps/alpha/fpu/fegetround.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/alpha/fpu/feholdexcpt.c b/sysdeps/alpha/fpu/feholdexcpt.c index 79aa970ac0..9242d9c310 100644 --- a/sysdeps/alpha/fpu/feholdexcpt.c +++ b/sysdeps/alpha/fpu/feholdexcpt.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/alpha/fpu/fenv_libc.h b/sysdeps/alpha/fpu/fenv_libc.h index edcc654960..8e72ddc438 100644 --- a/sysdeps/alpha/fpu/fenv_libc.h +++ b/sysdeps/alpha/fpu/fenv_libc.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _FENV_LIBC_H #define _FENV_LIBC_H 1 diff --git a/sysdeps/alpha/fpu/fesetenv.c b/sysdeps/alpha/fpu/fesetenv.c index c76e882891..51d7ac794a 100644 --- a/sysdeps/alpha/fpu/fesetenv.c +++ b/sysdeps/alpha/fpu/fesetenv.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/alpha/fpu/fesetround.c b/sysdeps/alpha/fpu/fesetround.c index 54b2bcf673..86378d4ca9 100644 --- a/sysdeps/alpha/fpu/fesetround.c +++ b/sysdeps/alpha/fpu/fesetround.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/alpha/fpu/feupdateenv.c b/sysdeps/alpha/fpu/feupdateenv.c index 7fc38163c0..94cb517527 100644 --- a/sysdeps/alpha/fpu/feupdateenv.c +++ b/sysdeps/alpha/fpu/feupdateenv.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/alpha/fpu/fgetexcptflg.c b/sysdeps/alpha/fpu/fgetexcptflg.c index c28e913359..cac81401c9 100644 --- a/sysdeps/alpha/fpu/fgetexcptflg.c +++ b/sysdeps/alpha/fpu/fgetexcptflg.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/alpha/fpu/fpu_control.h b/sysdeps/alpha/fpu/fpu_control.h index 28acdf1704..4027300e28 100644 --- a/sysdeps/alpha/fpu/fpu_control.h +++ b/sysdeps/alpha/fpu/fpu_control.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _ALPHA_FPU_CONTROL_H #define _ALPHA_FPU_CONTROL_H diff --git a/sysdeps/alpha/fpu/fsetexcptflg.c b/sysdeps/alpha/fpu/fsetexcptflg.c index d198731861..c01e95891c 100644 --- a/sysdeps/alpha/fpu/fsetexcptflg.c +++ b/sysdeps/alpha/fpu/fsetexcptflg.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/alpha/fpu/ftestexcept.c b/sysdeps/alpha/fpu/ftestexcept.c index 34d8113b3d..d1aec0193f 100644 --- a/sysdeps/alpha/fpu/ftestexcept.c +++ b/sysdeps/alpha/fpu/ftestexcept.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/alpha/fpu/s_cacosf.c b/sysdeps/alpha/fpu/s_cacosf.c index 46dca5aeb8..dd5066c942 100644 --- a/sysdeps/alpha/fpu/s_cacosf.c +++ b/sysdeps/alpha/fpu/s_cacosf.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define __cacosf __cacosf_not_defined #define cacosf cacosf_not_defined diff --git a/sysdeps/alpha/fpu/s_cacoshf.c b/sysdeps/alpha/fpu/s_cacoshf.c index 6b61d1ddaa..93a2af722a 100644 --- a/sysdeps/alpha/fpu/s_cacoshf.c +++ b/sysdeps/alpha/fpu/s_cacoshf.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define __cacoshf __cacoshf_not_defined #define cacoshf cacoshf_not_defined diff --git a/sysdeps/alpha/fpu/s_casinf.c b/sysdeps/alpha/fpu/s_casinf.c index fd41042ec9..cb4cd14646 100644 --- a/sysdeps/alpha/fpu/s_casinf.c +++ b/sysdeps/alpha/fpu/s_casinf.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define __casinf __casinf_not_defined #define casinf casinf_not_defined diff --git a/sysdeps/alpha/fpu/s_casinhf.c b/sysdeps/alpha/fpu/s_casinhf.c index 0b72a24d5a..9359eefeb8 100644 --- a/sysdeps/alpha/fpu/s_casinhf.c +++ b/sysdeps/alpha/fpu/s_casinhf.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define __casinhf __casinhf_not_defined #define casinhf casinhf_not_defined diff --git a/sysdeps/alpha/fpu/s_catanf.c b/sysdeps/alpha/fpu/s_catanf.c index 8f40616617..b59ae61af7 100644 --- a/sysdeps/alpha/fpu/s_catanf.c +++ b/sysdeps/alpha/fpu/s_catanf.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define __catanf __catanf_not_defined #define catanf catanf_not_defined diff --git a/sysdeps/alpha/fpu/s_catanhf.c b/sysdeps/alpha/fpu/s_catanhf.c index ac11945727..29e0dabe16 100644 --- a/sysdeps/alpha/fpu/s_catanhf.c +++ b/sysdeps/alpha/fpu/s_catanhf.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define __catanhf __catanhf_not_defined #define catanhf catanhf_not_defined diff --git a/sysdeps/alpha/fpu/s_ccosf.c b/sysdeps/alpha/fpu/s_ccosf.c index 04036f4613..f32ba176f3 100644 --- a/sysdeps/alpha/fpu/s_ccosf.c +++ b/sysdeps/alpha/fpu/s_ccosf.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define __ccosf __ccosf_not_defined #define ccosf ccosf_not_defined diff --git a/sysdeps/alpha/fpu/s_ccoshf.c b/sysdeps/alpha/fpu/s_ccoshf.c index e9fb34ce47..ad6a9592c3 100644 --- a/sysdeps/alpha/fpu/s_ccoshf.c +++ b/sysdeps/alpha/fpu/s_ccoshf.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define __ccoshf __ccoshf_not_defined #define ccoshf ccoshf_not_defined diff --git a/sysdeps/alpha/fpu/s_ceil.c b/sysdeps/alpha/fpu/s_ceil.c index fe20902450..bbc35827f5 100644 --- a/sysdeps/alpha/fpu/s_ceil.c +++ b/sysdeps/alpha/fpu/s_ceil.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/alpha/fpu/s_ceilf.c b/sysdeps/alpha/fpu/s_ceilf.c index c722e7294e..0f19985cd2 100644 --- a/sysdeps/alpha/fpu/s_ceilf.c +++ b/sysdeps/alpha/fpu/s_ceilf.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/alpha/fpu/s_cexpf.c b/sysdeps/alpha/fpu/s_cexpf.c index 4a28dcd9bf..1b3b7fc4e0 100644 --- a/sysdeps/alpha/fpu/s_cexpf.c +++ b/sysdeps/alpha/fpu/s_cexpf.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define __cexpf __cexpf_not_defined #define cexpf cexpf_not_defined diff --git a/sysdeps/alpha/fpu/s_clog10f.c b/sysdeps/alpha/fpu/s_clog10f.c index e7dc7bb23f..cbdd85a0b5 100644 --- a/sysdeps/alpha/fpu/s_clog10f.c +++ b/sysdeps/alpha/fpu/s_clog10f.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define __clog10f __clog10f_not_defined #define clog10f clog10f_not_defined diff --git a/sysdeps/alpha/fpu/s_clogf.c b/sysdeps/alpha/fpu/s_clogf.c index 364dcec883..aec89f232a 100644 --- a/sysdeps/alpha/fpu/s_clogf.c +++ b/sysdeps/alpha/fpu/s_clogf.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define __clogf __clogf_not_defined #define clogf clogf_not_defined diff --git a/sysdeps/alpha/fpu/s_copysign.c b/sysdeps/alpha/fpu/s_copysign.c index 52c632ec4c..51a5c645a1 100644 --- a/sysdeps/alpha/fpu/s_copysign.c +++ b/sysdeps/alpha/fpu/s_copysign.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/alpha/fpu/s_copysignf.c b/sysdeps/alpha/fpu/s_copysignf.c index f4b846bcbe..2ccd52e0b8 100644 --- a/sysdeps/alpha/fpu/s_copysignf.c +++ b/sysdeps/alpha/fpu/s_copysignf.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/alpha/fpu/s_cpowf.c b/sysdeps/alpha/fpu/s_cpowf.c index cc61b1895e..75de9f7ad4 100644 --- a/sysdeps/alpha/fpu/s_cpowf.c +++ b/sysdeps/alpha/fpu/s_cpowf.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define __cpowf __cpowf_not_defined #define cpowf cpowf_not_defined diff --git a/sysdeps/alpha/fpu/s_cprojf.c b/sysdeps/alpha/fpu/s_cprojf.c index 5cfb526679..c1e7bb7419 100644 --- a/sysdeps/alpha/fpu/s_cprojf.c +++ b/sysdeps/alpha/fpu/s_cprojf.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define __cprojf __cprojf_not_defined #define cprojf cprojf_not_defined diff --git a/sysdeps/alpha/fpu/s_csinf.c b/sysdeps/alpha/fpu/s_csinf.c index 8eb9a1019d..c1941c0bfd 100644 --- a/sysdeps/alpha/fpu/s_csinf.c +++ b/sysdeps/alpha/fpu/s_csinf.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define __csinf __csinf_not_defined #define csinf csinf_not_defined diff --git a/sysdeps/alpha/fpu/s_csinhf.c b/sysdeps/alpha/fpu/s_csinhf.c index 0e2c186740..2abb227626 100644 --- a/sysdeps/alpha/fpu/s_csinhf.c +++ b/sysdeps/alpha/fpu/s_csinhf.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define __csinhf __csinhf_not_defined #define csinhf csinhf_not_defined diff --git a/sysdeps/alpha/fpu/s_csqrtf.c b/sysdeps/alpha/fpu/s_csqrtf.c index ebf23a828e..97ff19601c 100644 --- a/sysdeps/alpha/fpu/s_csqrtf.c +++ b/sysdeps/alpha/fpu/s_csqrtf.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define __csqrtf __csinhf_not_defined #define csqrtf csqrtf_not_defined diff --git a/sysdeps/alpha/fpu/s_ctanf.c b/sysdeps/alpha/fpu/s_ctanf.c index e26db963e4..a0e1268c7c 100644 --- a/sysdeps/alpha/fpu/s_ctanf.c +++ b/sysdeps/alpha/fpu/s_ctanf.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define __ctanf __ctanf_not_defined #define ctanf ctanf_not_defined diff --git a/sysdeps/alpha/fpu/s_ctanhf.c b/sysdeps/alpha/fpu/s_ctanhf.c index 5d047bd460..b53fc1e3bd 100644 --- a/sysdeps/alpha/fpu/s_ctanhf.c +++ b/sysdeps/alpha/fpu/s_ctanhf.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define __ctanhf __ctanhf_not_defined #define ctanhf ctanhf_not_defined diff --git a/sysdeps/alpha/fpu/s_fabs.c b/sysdeps/alpha/fpu/s_fabs.c index 9bc42f68d0..0105162719 100644 --- a/sysdeps/alpha/fpu/s_fabs.c +++ b/sysdeps/alpha/fpu/s_fabs.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/alpha/fpu/s_fabsf.c b/sysdeps/alpha/fpu/s_fabsf.c index 35e16bf65d..05f776e906 100644 --- a/sysdeps/alpha/fpu/s_fabsf.c +++ b/sysdeps/alpha/fpu/s_fabsf.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/alpha/fpu/s_floor.c b/sysdeps/alpha/fpu/s_floor.c index 6b16401e43..d64b1a1b0d 100644 --- a/sysdeps/alpha/fpu/s_floor.c +++ b/sysdeps/alpha/fpu/s_floor.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/alpha/fpu/s_floorf.c b/sysdeps/alpha/fpu/s_floorf.c index 5da08ae107..36419aaf34 100644 --- a/sysdeps/alpha/fpu/s_floorf.c +++ b/sysdeps/alpha/fpu/s_floorf.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/alpha/fpu/s_fmax.S b/sysdeps/alpha/fpu/s_fmax.S index d638eec805..3c45c33353 100644 --- a/sysdeps/alpha/fpu/s_fmax.S +++ b/sysdeps/alpha/fpu/s_fmax.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/alpha/fpu/s_fmin.S b/sysdeps/alpha/fpu/s_fmin.S index d70fab625a..3f9bebba03 100644 --- a/sysdeps/alpha/fpu/s_fmin.S +++ b/sysdeps/alpha/fpu/s_fmin.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/alpha/fpu/s_isnan.c b/sysdeps/alpha/fpu/s_isnan.c index a9230329c5..b18c7bb5f1 100644 --- a/sysdeps/alpha/fpu/s_isnan.c +++ b/sysdeps/alpha/fpu/s_isnan.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Ugly kludge to avoid declarations. */ #define __isnanf not___isnanf diff --git a/sysdeps/alpha/fpu/s_lrint.c b/sysdeps/alpha/fpu/s_lrint.c index 1696408705..7744e96b1c 100644 --- a/sysdeps/alpha/fpu/s_lrint.c +++ b/sysdeps/alpha/fpu/s_lrint.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define __llrint not___llrint #define llrint not_llrint diff --git a/sysdeps/alpha/fpu/s_lrintf.c b/sysdeps/alpha/fpu/s_lrintf.c index 20a6a6cf82..ee90c1fddd 100644 --- a/sysdeps/alpha/fpu/s_lrintf.c +++ b/sysdeps/alpha/fpu/s_lrintf.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define __llrintf not___llrintf #define llrintf not_llrintf diff --git a/sysdeps/alpha/fpu/s_lround.c b/sysdeps/alpha/fpu/s_lround.c index 0e0e98806c..b930dcfa3d 100644 --- a/sysdeps/alpha/fpu/s_lround.c +++ b/sysdeps/alpha/fpu/s_lround.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define __llround not___llround #define llround not_llround diff --git a/sysdeps/alpha/fpu/s_lroundf.c b/sysdeps/alpha/fpu/s_lroundf.c index 16ff348b21..ce2220f4af 100644 --- a/sysdeps/alpha/fpu/s_lroundf.c +++ b/sysdeps/alpha/fpu/s_lroundf.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define __llroundf not___llroundf #define llroundf not_llroundf diff --git a/sysdeps/alpha/fpu/s_nearbyint.c b/sysdeps/alpha/fpu/s_nearbyint.c index b18db8ba79..1f89260569 100644 --- a/sysdeps/alpha/fpu/s_nearbyint.c +++ b/sysdeps/alpha/fpu/s_nearbyint.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/alpha/fpu/s_nearbyintf.c b/sysdeps/alpha/fpu/s_nearbyintf.c index ee637982df..efea95902b 100644 --- a/sysdeps/alpha/fpu/s_nearbyintf.c +++ b/sysdeps/alpha/fpu/s_nearbyintf.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/alpha/fpu/s_rint.c b/sysdeps/alpha/fpu/s_rint.c index 9624631292..b58ef81edf 100644 --- a/sysdeps/alpha/fpu/s_rint.c +++ b/sysdeps/alpha/fpu/s_rint.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/alpha/fpu/s_rintf.c b/sysdeps/alpha/fpu/s_rintf.c index 39fb72fb64..b17bf8c364 100644 --- a/sysdeps/alpha/fpu/s_rintf.c +++ b/sysdeps/alpha/fpu/s_rintf.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/alpha/fpu/s_round.c b/sysdeps/alpha/fpu/s_round.c index 71763cf4ab..1dbc3cd287 100644 --- a/sysdeps/alpha/fpu/s_round.c +++ b/sysdeps/alpha/fpu/s_round.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/alpha/fpu/s_roundf.c b/sysdeps/alpha/fpu/s_roundf.c index 89584f062b..c3c706e80a 100644 --- a/sysdeps/alpha/fpu/s_roundf.c +++ b/sysdeps/alpha/fpu/s_roundf.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/alpha/fpu/s_trunc.c b/sysdeps/alpha/fpu/s_trunc.c index 11a279a53f..876330c0fe 100644 --- a/sysdeps/alpha/fpu/s_trunc.c +++ b/sysdeps/alpha/fpu/s_trunc.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/alpha/fpu/s_truncf.c b/sysdeps/alpha/fpu/s_truncf.c index 094997b433..fbef886346 100644 --- a/sysdeps/alpha/fpu/s_truncf.c +++ b/sysdeps/alpha/fpu/s_truncf.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/alpha/gccframe.h b/sysdeps/alpha/gccframe.h index b67022548f..3f7f815beb 100644 --- a/sysdeps/alpha/gccframe.h +++ b/sysdeps/alpha/gccframe.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define FIRST_PSEUDO_REGISTER 64 diff --git a/sysdeps/alpha/hp-timing.h b/sysdeps/alpha/hp-timing.h index ccae06b487..aea743debb 100644 --- a/sysdeps/alpha/hp-timing.h +++ b/sysdeps/alpha/hp-timing.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _HP_TIMING_H #define _HP_TIMING_H 1 diff --git a/sysdeps/alpha/htonl.S b/sysdeps/alpha/htonl.S index ef2a575995..871604d6f0 100644 --- a/sysdeps/alpha/htonl.S +++ b/sysdeps/alpha/htonl.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/alpha/htons.S b/sysdeps/alpha/htons.S index 7c6270226d..58dd798726 100644 --- a/sysdeps/alpha/htons.S +++ b/sysdeps/alpha/htons.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/alpha/jmpbuf-offsets.h b/sysdeps/alpha/jmpbuf-offsets.h index c2503d442a..d66f183948 100644 --- a/sysdeps/alpha/jmpbuf-offsets.h +++ b/sysdeps/alpha/jmpbuf-offsets.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define JB_S0 0 #define JB_S1 1 diff --git a/sysdeps/alpha/jmpbuf-unwind.h b/sysdeps/alpha/jmpbuf-unwind.h index ca5f693d5d..3cfda166b7 100644 --- a/sysdeps/alpha/jmpbuf-unwind.h +++ b/sysdeps/alpha/jmpbuf-unwind.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/alpha/ldiv.S b/sysdeps/alpha/ldiv.S index 0a971a7ed0..d77e59b239 100644 --- a/sysdeps/alpha/ldiv.S +++ b/sysdeps/alpha/ldiv.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include "div_libc.h" diff --git a/sysdeps/alpha/ldsodefs.h b/sysdeps/alpha/ldsodefs.h index a059cb15b8..478bf237db 100644 --- a/sysdeps/alpha/ldsodefs.h +++ b/sysdeps/alpha/ldsodefs.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef __LDSODEFS_H diff --git a/sysdeps/alpha/libc-tls.c b/sysdeps/alpha/libc-tls.c index 7e02769171..3dea424ac9 100644 --- a/sysdeps/alpha/libc-tls.c +++ b/sysdeps/alpha/libc-tls.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/alpha/lshift.s b/sysdeps/alpha/lshift.s index 42fb430dd4..4ce473c920 100644 --- a/sysdeps/alpha/lshift.s +++ b/sysdeps/alpha/lshift.s @@ -15,9 +15,7 @@ # License for more details. # You should have received a copy of the GNU Lesser General Public License - # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - # MA 02111-1307, USA. + # along with the GNU MP Library. If not, see . # INPUT PARAMETERS diff --git a/sysdeps/alpha/machine-gmon.h b/sysdeps/alpha/machine-gmon.h index 5f5522c0b4..2ea9ceca6f 100644 --- a/sysdeps/alpha/machine-gmon.h +++ b/sysdeps/alpha/machine-gmon.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define _MCOUNT_DECL(from, self) \ void __mcount (u_long from, u_long self) diff --git a/sysdeps/alpha/memchr.c b/sysdeps/alpha/memchr.c index 7e16f8a17c..b19d8200c6 100644 --- a/sysdeps/alpha/memchr.c +++ b/sysdeps/alpha/memchr.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/alpha/memset.S b/sysdeps/alpha/memset.S index e34af2b314..4ac70929c2 100644 --- a/sysdeps/alpha/memset.S +++ b/sysdeps/alpha/memset.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Fill a block of memory with a character. Optimized for the Alpha architecture: diff --git a/sysdeps/alpha/memusage.h b/sysdeps/alpha/memusage.h index 3d84160338..b9f6c18b72 100644 --- a/sysdeps/alpha/memusage.h +++ b/sysdeps/alpha/memusage.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define GETSP() ({ register uintptr_t stack_ptr asm ("$30"); stack_ptr; }) diff --git a/sysdeps/alpha/mul_1.s b/sysdeps/alpha/mul_1.s index 165c281ac6..fa571a6c47 100644 --- a/sysdeps/alpha/mul_1.s +++ b/sysdeps/alpha/mul_1.s @@ -16,9 +16,7 @@ # License for more details. # You should have received a copy of the GNU Lesser General Public License - # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - # MA 02111-1307, USA. + # along with the GNU MP Library. If not, see . # INPUT PARAMETERS diff --git a/sysdeps/alpha/nptl/Makefile b/sysdeps/alpha/nptl/Makefile index 88c106bbbf..e31b03c2dc 100644 --- a/sysdeps/alpha/nptl/Makefile +++ b/sysdeps/alpha/nptl/Makefile @@ -12,9 +12,8 @@ # 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. +# License along with the GNU C Library. If not, see +# . ifeq ($(subdir),csu) gen-as-const-headers += tcb-offsets.sym diff --git a/sysdeps/alpha/nptl/pthread_spin_lock.S b/sysdeps/alpha/nptl/pthread_spin_lock.S index ce6cd41a42..856d6506be 100644 --- a/sysdeps/alpha/nptl/pthread_spin_lock.S +++ b/sysdeps/alpha/nptl/pthread_spin_lock.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ .text diff --git a/sysdeps/alpha/nptl/pthread_spin_trylock.S b/sysdeps/alpha/nptl/pthread_spin_trylock.S index 0948da698b..f7d4665fb0 100644 --- a/sysdeps/alpha/nptl/pthread_spin_trylock.S +++ b/sysdeps/alpha/nptl/pthread_spin_trylock.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define _ERRNO_H 1 diff --git a/sysdeps/alpha/nptl/pthreaddef.h b/sysdeps/alpha/nptl/pthreaddef.h index 26c4daf7b3..80dd1561d0 100644 --- a/sysdeps/alpha/nptl/pthreaddef.h +++ b/sysdeps/alpha/nptl/pthreaddef.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Default stack size. */ #define ARCH_STACK_DEFAULT_SIZE (4 * 1024 * 1024) diff --git a/sysdeps/alpha/nptl/tls.h b/sysdeps/alpha/nptl/tls.h index 887a4576a4..18c29c80fa 100644 --- a/sysdeps/alpha/nptl/tls.h +++ b/sysdeps/alpha/nptl/tls.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _TLS_H #define _TLS_H 1 diff --git a/sysdeps/alpha/nscd-types.h b/sysdeps/alpha/nscd-types.h index 957edaf297..8de33c6940 100644 --- a/sysdeps/alpha/nscd-types.h +++ b/sysdeps/alpha/nscd-types.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/alpha/rawmemchr.S b/sysdeps/alpha/rawmemchr.S index d3a69fa63c..c0a5c748c5 100644 --- a/sysdeps/alpha/rawmemchr.S +++ b/sysdeps/alpha/rawmemchr.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Return pointer to first occurrence of CH in STR. */ diff --git a/sysdeps/alpha/reml.S b/sysdeps/alpha/reml.S index ae291b0505..e590760963 100644 --- a/sysdeps/alpha/reml.S +++ b/sysdeps/alpha/reml.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include "div_libc.h" diff --git a/sysdeps/alpha/remq.S b/sysdeps/alpha/remq.S index 64e958bb95..24fca5e40b 100644 --- a/sysdeps/alpha/remq.S +++ b/sysdeps/alpha/remq.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include "div_libc.h" diff --git a/sysdeps/alpha/remqu.S b/sysdeps/alpha/remqu.S index 398a345a18..2e45c0022e 100644 --- a/sysdeps/alpha/remqu.S +++ b/sysdeps/alpha/remqu.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include "div_libc.h" diff --git a/sysdeps/alpha/rshift.s b/sysdeps/alpha/rshift.s index 7c230f1933..558eeccda4 100644 --- a/sysdeps/alpha/rshift.s +++ b/sysdeps/alpha/rshift.s @@ -15,9 +15,7 @@ # License for more details. # You should have received a copy of the GNU Lesser General Public License - # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - # MA 02111-1307, USA. + # along with the GNU MP Library. If not, see . # INPUT PARAMETERS diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S index bc5da0f5bc..5d0f849ea6 100644 --- a/sysdeps/alpha/setjmp.S +++ b/sysdeps/alpha/setjmp.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define __ASSEMBLY__ diff --git a/sysdeps/alpha/soft-fp/e_sqrtl.c b/sysdeps/alpha/soft-fp/e_sqrtl.c index 717d170127..aa62c596a5 100644 --- a/sysdeps/alpha/soft-fp/e_sqrtl.c +++ b/sysdeps/alpha/soft-fp/e_sqrtl.c @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/alpha/soft-fp/ots_add.c b/sysdeps/alpha/soft-fp/ots_add.c index acf66f316b..c592749dfe 100644 --- a/sysdeps/alpha/soft-fp/ots_add.c +++ b/sysdeps/alpha/soft-fp/ots_add.c @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include "local-soft-fp.h" diff --git a/sysdeps/alpha/soft-fp/ots_cmp.c b/sysdeps/alpha/soft-fp/ots_cmp.c index c356b4848e..0d9ede5e24 100644 --- a/sysdeps/alpha/soft-fp/ots_cmp.c +++ b/sysdeps/alpha/soft-fp/ots_cmp.c @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include "local-soft-fp.h" diff --git a/sysdeps/alpha/soft-fp/ots_cmpe.c b/sysdeps/alpha/soft-fp/ots_cmpe.c index 001eb75a9b..ecf6d05532 100644 --- a/sysdeps/alpha/soft-fp/ots_cmpe.c +++ b/sysdeps/alpha/soft-fp/ots_cmpe.c @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include "local-soft-fp.h" diff --git a/sysdeps/alpha/soft-fp/ots_cvtqux.c b/sysdeps/alpha/soft-fp/ots_cvtqux.c index 82c50806c4..208a7aaf89 100644 --- a/sysdeps/alpha/soft-fp/ots_cvtqux.c +++ b/sysdeps/alpha/soft-fp/ots_cvtqux.c @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include "local-soft-fp.h" diff --git a/sysdeps/alpha/soft-fp/ots_cvtqx.c b/sysdeps/alpha/soft-fp/ots_cvtqx.c index dc80291506..a260806c0d 100644 --- a/sysdeps/alpha/soft-fp/ots_cvtqx.c +++ b/sysdeps/alpha/soft-fp/ots_cvtqx.c @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include "local-soft-fp.h" diff --git a/sysdeps/alpha/soft-fp/ots_cvttx.c b/sysdeps/alpha/soft-fp/ots_cvttx.c index 2d0bc9bca9..139285d280 100644 --- a/sysdeps/alpha/soft-fp/ots_cvttx.c +++ b/sysdeps/alpha/soft-fp/ots_cvttx.c @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include "local-soft-fp.h" #include "double.h" diff --git a/sysdeps/alpha/soft-fp/ots_cvtxq.c b/sysdeps/alpha/soft-fp/ots_cvtxq.c index 2c9df529d5..d7d1fd366d 100644 --- a/sysdeps/alpha/soft-fp/ots_cvtxq.c +++ b/sysdeps/alpha/soft-fp/ots_cvtxq.c @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include "local-soft-fp.h" diff --git a/sysdeps/alpha/soft-fp/ots_cvtxt.c b/sysdeps/alpha/soft-fp/ots_cvtxt.c index 6221a2365c..fc5ff3d448 100644 --- a/sysdeps/alpha/soft-fp/ots_cvtxt.c +++ b/sysdeps/alpha/soft-fp/ots_cvtxt.c @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include "local-soft-fp.h" #include "double.h" diff --git a/sysdeps/alpha/soft-fp/ots_div.c b/sysdeps/alpha/soft-fp/ots_div.c index eb07489284..2f6de3495f 100644 --- a/sysdeps/alpha/soft-fp/ots_div.c +++ b/sysdeps/alpha/soft-fp/ots_div.c @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include "local-soft-fp.h" diff --git a/sysdeps/alpha/soft-fp/ots_mul.c b/sysdeps/alpha/soft-fp/ots_mul.c index f88ee33fbc..3bf56e28d8 100644 --- a/sysdeps/alpha/soft-fp/ots_mul.c +++ b/sysdeps/alpha/soft-fp/ots_mul.c @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include "local-soft-fp.h" diff --git a/sysdeps/alpha/soft-fp/ots_nintxq.c b/sysdeps/alpha/soft-fp/ots_nintxq.c index a718372af7..d584dfdfd0 100644 --- a/sysdeps/alpha/soft-fp/ots_nintxq.c +++ b/sysdeps/alpha/soft-fp/ots_nintxq.c @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include "local-soft-fp.h" diff --git a/sysdeps/alpha/soft-fp/ots_sub.c b/sysdeps/alpha/soft-fp/ots_sub.c index 5147266a04..2b944ad5b0 100644 --- a/sysdeps/alpha/soft-fp/ots_sub.c +++ b/sysdeps/alpha/soft-fp/ots_sub.c @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include "local-soft-fp.h" diff --git a/sysdeps/alpha/soft-fp/sfp-machine.h b/sysdeps/alpha/soft-fp/sfp-machine.h index 2bad4e9dc6..ef6e957140 100644 --- a/sysdeps/alpha/soft-fp/sfp-machine.h +++ b/sysdeps/alpha/soft-fp/sfp-machine.h @@ -17,9 +17,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/alpha/stackinfo.h b/sysdeps/alpha/stackinfo.h index d9dbc357a4..3158e194fd 100644 --- a/sysdeps/alpha/stackinfo.h +++ b/sysdeps/alpha/stackinfo.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* This file contains a bit of information about the stack allocation of the processor. */ diff --git a/sysdeps/alpha/stpcpy.S b/sysdeps/alpha/stpcpy.S index b73e85f217..ee55a21ba8 100644 --- a/sysdeps/alpha/stpcpy.S +++ b/sysdeps/alpha/stpcpy.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Copy a null-terminated string from SRC to DST. Return a pointer to the null-terminator in the source. */ diff --git a/sysdeps/alpha/stpncpy.S b/sysdeps/alpha/stpncpy.S index e877cf176a..458db307de 100644 --- a/sysdeps/alpha/stpncpy.S +++ b/sysdeps/alpha/stpncpy.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Copy no more than COUNT bytes of the null-terminated string from SRC to DST. If SRC does not cover all of COUNT, the balance is diff --git a/sysdeps/alpha/strcat.S b/sysdeps/alpha/strcat.S index d8ef8f1546..659e62bc3b 100644 --- a/sysdeps/alpha/strcat.S +++ b/sysdeps/alpha/strcat.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Append a null-terminated string from SRC to DST. */ diff --git a/sysdeps/alpha/strchr.S b/sysdeps/alpha/strchr.S index e0b17415ac..34944af943 100644 --- a/sysdeps/alpha/strchr.S +++ b/sysdeps/alpha/strchr.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Return the address of a given character within a null-terminated string, or null if it is not found. diff --git a/sysdeps/alpha/strcmp.S b/sysdeps/alpha/strcmp.S index 9196be2ce3..2b9a949fa0 100644 --- a/sysdeps/alpha/strcmp.S +++ b/sysdeps/alpha/strcmp.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Bytewise compare two null-terminated strings. */ diff --git a/sysdeps/alpha/strcpy.S b/sysdeps/alpha/strcpy.S index 02bfe52400..5008fda7bd 100644 --- a/sysdeps/alpha/strcpy.S +++ b/sysdeps/alpha/strcpy.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Copy a null-terminated string from SRC to DST. Return a pointer to the null-terminator in the source. */ diff --git a/sysdeps/alpha/strlen.S b/sysdeps/alpha/strlen.S index 2560b973c7..98308efcd7 100644 --- a/sysdeps/alpha/strlen.S +++ b/sysdeps/alpha/strlen.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Finds length of a 0-terminated string. Optimized for the Alpha architecture: diff --git a/sysdeps/alpha/strncat.S b/sysdeps/alpha/strncat.S index ddf686f578..832a3ed506 100644 --- a/sysdeps/alpha/strncat.S +++ b/sysdeps/alpha/strncat.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Append no more than COUNT characters from the null-terminated string SRC to the null-terminated string DST. Always null-terminate the new DST. */ diff --git a/sysdeps/alpha/strncmp.S b/sysdeps/alpha/strncmp.S index ff199eb743..c9981e1b66 100644 --- a/sysdeps/alpha/strncmp.S +++ b/sysdeps/alpha/strncmp.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Bytewise compare two null-terminated strings of length no longer than N. */ diff --git a/sysdeps/alpha/strncpy.S b/sysdeps/alpha/strncpy.S index 5d3e72e280..c370e0850b 100644 --- a/sysdeps/alpha/strncpy.S +++ b/sysdeps/alpha/strncpy.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Copy no more than COUNT bytes of the null-terminated string from SRC to DST. If SRC does not cover all of COUNT, the balance is diff --git a/sysdeps/alpha/strrchr.S b/sysdeps/alpha/strrchr.S index 248181f702..1323008a1f 100644 --- a/sysdeps/alpha/strrchr.S +++ b/sysdeps/alpha/strrchr.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Return the address of the last occurrence of a given character within a null-terminated string, or null if it is not found. diff --git a/sysdeps/alpha/stxcpy.S b/sysdeps/alpha/stxcpy.S index 5ba2d43e54..46f19a9858 100644 --- a/sysdeps/alpha/stxcpy.S +++ b/sysdeps/alpha/stxcpy.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Copy a null-terminated string from SRC to DST. diff --git a/sysdeps/alpha/stxncpy.S b/sysdeps/alpha/stxncpy.S index 73bcd36e47..5b81ac907b 100644 --- a/sysdeps/alpha/stxncpy.S +++ b/sysdeps/alpha/stxncpy.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Copy no more than COUNT bytes of the null-terminated string from SRC to DST. diff --git a/sysdeps/alpha/sub_n.s b/sysdeps/alpha/sub_n.s index e0a6d5c6bd..935f67330d 100644 --- a/sysdeps/alpha/sub_n.s +++ b/sysdeps/alpha/sub_n.s @@ -16,9 +16,7 @@ # License for more details. # You should have received a copy of the GNU Lesser General Public License - # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - # MA 02111-1307, USA. + # along with the GNU MP Library. If not, see . # INPUT PARAMETERS diff --git a/sysdeps/alpha/submul_1.s b/sysdeps/alpha/submul_1.s index 5343f67d81..440adb2856 100644 --- a/sysdeps/alpha/submul_1.s +++ b/sysdeps/alpha/submul_1.s @@ -16,9 +16,7 @@ # License for more details. # You should have received a copy of the GNU Lesser General Public License - # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - # MA 02111-1307, USA. + # along with the GNU MP Library. If not, see . # INPUT PARAMETERS diff --git a/sysdeps/alpha/tst-audit.h b/sysdeps/alpha/tst-audit.h index 3bc50fa3be..7e3022a1b4 100644 --- a/sysdeps/alpha/tst-audit.h +++ b/sysdeps/alpha/tst-audit.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define pltenter la_alpha_gnu_pltenter #define pltexit la_alpha_gnu_pltexit diff --git a/sysdeps/alpha/udiv_qrnnd.S b/sysdeps/alpha/udiv_qrnnd.S index d4ca795aae..c49c91845e 100644 --- a/sysdeps/alpha/udiv_qrnnd.S +++ b/sysdeps/alpha/udiv_qrnnd.S @@ -15,9 +15,7 @@ # License for more details. # You should have received a copy of the GNU Lesser General Public License - # along with the GNU MP Library; see the file COPYING.LIB. If not, write to - # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - # MA 02111-1307, USA. + # along with the GNU MP Library. If not, see . #include diff --git a/sysdeps/am33/__longjmp.S b/sysdeps/am33/__longjmp.S index 9bdcc489e8..1d6c29e99f 100644 --- a/sysdeps/am33/__longjmp.S +++ b/sysdeps/am33/__longjmp.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #define _ASM diff --git a/sysdeps/am33/atomicity.h b/sysdeps/am33/atomicity.h index d7765338ac..b0ba43db4b 100644 --- a/sysdeps/am33/atomicity.h +++ b/sysdeps/am33/atomicity.h @@ -15,9 +15,8 @@ Library General Public License for more details. You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + License along with the GNU C Library. If not, see + . */ #ifndef _ATOMICITY_H #define _ATOMICITY_H 1 diff --git a/sysdeps/am33/bits/setjmp.h b/sysdeps/am33/bits/setjmp.h index 3e578a41a4..6dd87cb655 100644 --- a/sysdeps/am33/bits/setjmp.h +++ b/sysdeps/am33/bits/setjmp.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Define the machine-dependent type `jmp_buf'. AM33 version. */ diff --git a/sysdeps/am33/dl-machine.h b/sysdeps/am33/dl-machine.h index ffd866ac1f..52278c0a4e 100644 --- a/sysdeps/am33/dl-machine.h +++ b/sysdeps/am33/dl-machine.h @@ -14,9 +14,8 @@ Library General Public License for more details. You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + License along with the GNU C Library. If not, see + . */ #ifndef dl_machine_h #define dl_machine_h diff --git a/sysdeps/am33/elf/start.S b/sysdeps/am33/elf/start.S index 1b654595c4..518e75e478 100644 --- a/sysdeps/am33/elf/start.S +++ b/sysdeps/am33/elf/start.S @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* This is the canonical entry point, usually the first thing in the text segment. The SVR4/i386 ABI (pages 3-31, 3-32) says that when the entry diff --git a/sysdeps/am33/fpu/bits/fenv.h b/sysdeps/am33/fpu/bits/fenv.h index 04fe293b13..d3a89982bf 100644 --- a/sysdeps/am33/fpu/bits/fenv.h +++ b/sysdeps/am33/fpu/bits/fenv.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _FENV_H # error "Never use directly; include instead." diff --git a/sysdeps/am33/fpu/fclrexcpt.c b/sysdeps/am33/fpu/fclrexcpt.c index 0c98b4ea99..2b15f45a63 100644 --- a/sysdeps/am33/fpu/fclrexcpt.c +++ b/sysdeps/am33/fpu/fclrexcpt.c @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/am33/fpu/fedisblxcpt.c b/sysdeps/am33/fpu/fedisblxcpt.c index b4a5977737..170f8200ed 100644 --- a/sysdeps/am33/fpu/fedisblxcpt.c +++ b/sysdeps/am33/fpu/fedisblxcpt.c @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/am33/fpu/feenablxcpt.c b/sysdeps/am33/fpu/feenablxcpt.c index 0ecaa18877..fe6d880c21 100644 --- a/sysdeps/am33/fpu/feenablxcpt.c +++ b/sysdeps/am33/fpu/feenablxcpt.c @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/am33/fpu/fegetenv.c b/sysdeps/am33/fpu/fegetenv.c index f0828011bf..6da6eeb913 100644 --- a/sysdeps/am33/fpu/fegetenv.c +++ b/sysdeps/am33/fpu/fegetenv.c @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/am33/fpu/fegetexcept.c b/sysdeps/am33/fpu/fegetexcept.c index 500a0f8228..13e5306af9 100644 --- a/sysdeps/am33/fpu/fegetexcept.c +++ b/sysdeps/am33/fpu/fegetexcept.c @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/am33/fpu/fegetround.c b/sysdeps/am33/fpu/fegetround.c index 2b914075be..d649f18bf7 100644 --- a/sysdeps/am33/fpu/fegetround.c +++ b/sysdeps/am33/fpu/fegetround.c @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/am33/fpu/feholdexcpt.c b/sysdeps/am33/fpu/feholdexcpt.c index e90fb67daf..1c002d8d94 100644 --- a/sysdeps/am33/fpu/feholdexcpt.c +++ b/sysdeps/am33/fpu/feholdexcpt.c @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/am33/fpu/fenv_libc.h b/sysdeps/am33/fpu/fenv_libc.h index 508145470f..40d57259bd 100644 --- a/sysdeps/am33/fpu/fenv_libc.h +++ b/sysdeps/am33/fpu/fenv_libc.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _FENV_LIBC_H #define _FENV_LIBC_H 1 diff --git a/sysdeps/am33/fpu/fesetenv.c b/sysdeps/am33/fpu/fesetenv.c index 4c551a5c1d..110c49c9f8 100644 --- a/sysdeps/am33/fpu/fesetenv.c +++ b/sysdeps/am33/fpu/fesetenv.c @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/am33/fpu/fesetround.c b/sysdeps/am33/fpu/fesetround.c index b1e2b240c2..e77dc7684f 100644 --- a/sysdeps/am33/fpu/fesetround.c +++ b/sysdeps/am33/fpu/fesetround.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/am33/fpu/feupdateenv.c b/sysdeps/am33/fpu/feupdateenv.c index e4a0e39d2f..70951a3675 100644 --- a/sysdeps/am33/fpu/feupdateenv.c +++ b/sysdeps/am33/fpu/feupdateenv.c @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/am33/fpu/fgetexcptflg.c b/sysdeps/am33/fpu/fgetexcptflg.c index 0e8512c9cb..d5828e6011 100644 --- a/sysdeps/am33/fpu/fgetexcptflg.c +++ b/sysdeps/am33/fpu/fgetexcptflg.c @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/am33/fpu/fpu_control.h b/sysdeps/am33/fpu/fpu_control.h index c0612ba53c..de28228e71 100644 --- a/sysdeps/am33/fpu/fpu_control.h +++ b/sysdeps/am33/fpu/fpu_control.h @@ -16,9 +16,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _FPU_CONTROL_H #define _FPU_CONTROL_H diff --git a/sysdeps/am33/fpu/fraiseexcpt.c b/sysdeps/am33/fpu/fraiseexcpt.c index 3405ce5096..628ad56e9b 100644 --- a/sysdeps/am33/fpu/fraiseexcpt.c +++ b/sysdeps/am33/fpu/fraiseexcpt.c @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/am33/fpu/fsetexcptflg.c b/sysdeps/am33/fpu/fsetexcptflg.c index be315a44b0..a5bde40200 100644 --- a/sysdeps/am33/fpu/fsetexcptflg.c +++ b/sysdeps/am33/fpu/fsetexcptflg.c @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/am33/fpu/ftestexcept.c b/sysdeps/am33/fpu/ftestexcept.c index 0e0db4ca37..ef3e761fcc 100644 --- a/sysdeps/am33/fpu/ftestexcept.c +++ b/sysdeps/am33/fpu/ftestexcept.c @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/am33/jmpbuf-offsets.h b/sysdeps/am33/jmpbuf-offsets.h index 1a8520af4d..9884f2e3c0 100644 --- a/sysdeps/am33/jmpbuf-offsets.h +++ b/sysdeps/am33/jmpbuf-offsets.h @@ -13,8 +13,7 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define __JMP_BUF_SP 20 diff --git a/sysdeps/am33/jmpbuf-unwind.h b/sysdeps/am33/jmpbuf-unwind.h index 1566a0b193..d5c01e2797 100644 --- a/sysdeps/am33/jmpbuf-unwind.h +++ b/sysdeps/am33/jmpbuf-unwind.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/am33/linuxthreads/pspinlock.c b/sysdeps/am33/linuxthreads/pspinlock.c index 5eaf816681..a1674974ab 100644 --- a/sysdeps/am33/linuxthreads/pspinlock.c +++ b/sysdeps/am33/linuxthreads/pspinlock.c @@ -13,9 +13,8 @@ Library General Public License for more details. You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/am33/linuxthreads/pt-machine.h b/sysdeps/am33/linuxthreads/pt-machine.h index ba80bfb5ef..86d0f8b1e1 100644 --- a/sysdeps/am33/linuxthreads/pt-machine.h +++ b/sysdeps/am33/linuxthreads/pt-machine.h @@ -17,9 +17,8 @@ Library General Public License for more details. You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + License along with the GNU C Library. If not, see + . */ #ifndef _PT_MACHINE_H #define _PT_MACHINE_H 1 diff --git a/sysdeps/am33/memusage.h b/sysdeps/am33/memusage.h index 9913e781e4..19d7a732ca 100644 --- a/sysdeps/am33/memusage.h +++ b/sysdeps/am33/memusage.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define GETSP() ({ uintptr_t stack_ptr; \ asm ("mov sp,%0" : "=a" (stack_ptr)); \ diff --git a/sysdeps/am33/setjmp.S b/sysdeps/am33/setjmp.S index 26ec2ed496..54b239d65c 100644 --- a/sysdeps/am33/setjmp.S +++ b/sysdeps/am33/setjmp.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #define _ASM diff --git a/sysdeps/am33/stackinfo.h b/sysdeps/am33/stackinfo.h index a64027a6ad..c7a7977773 100644 --- a/sysdeps/am33/stackinfo.h +++ b/sysdeps/am33/stackinfo.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* This file contains a bit of information about the stack allocation of the processor. */ diff --git a/sysdeps/am33/sys/ucontext.h b/sysdeps/am33/sys/ucontext.h index 7995aae42f..1615b6368c 100644 --- a/sysdeps/am33/sys/ucontext.h +++ b/sysdeps/am33/sys/ucontext.h @@ -12,9 +12,8 @@ Library General Public License for more details. You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + License along with the GNU C Library. If not, see + . */ /* AM33/2.0 context switching support. */ diff --git a/sysdeps/am33/sysdep.h b/sysdeps/am33/sysdep.h index efd0527144..2ddb656957 100644 --- a/sysdeps/am33/sysdep.h +++ b/sysdeps/am33/sysdep.h @@ -14,9 +14,8 @@ Library General Public License for more details. You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/arm/bits/link.h b/sysdeps/arm/bits/link.h index 44e4edae95..37b94c509f 100644 --- a/sysdeps/arm/bits/link.h +++ b/sysdeps/arm/bits/link.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _LINK_H # error "Never include directly; use instead." diff --git a/sysdeps/arm/bits/mathdef.h b/sysdeps/arm/bits/mathdef.h index 97f5d4d227..37e9226745 100644 --- a/sysdeps/arm/bits/mathdef.h +++ b/sysdeps/arm/bits/mathdef.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #if !defined _MATH_H && !defined _COMPLEX_H # error "Never use directly; include instead" diff --git a/sysdeps/arm/bits/string.h b/sysdeps/arm/bits/string.h index 206f956dfd..21b5f44299 100644 --- a/sysdeps/arm/bits/string.h +++ b/sysdeps/arm/bits/string.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _STRING_H # error "Never use directly; include instead." diff --git a/sysdeps/arm/bsd-_setjmp.S b/sysdeps/arm/bsd-_setjmp.S index c3a4383277..d27ef94425 100644 --- a/sysdeps/arm/bsd-_setjmp.S +++ b/sysdeps/arm/bsd-_setjmp.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* This just does a tail-call to `__sigsetjmp (ARG, 1)'. We cannot do it in C because it must be a tail-call, so frame-unwinding diff --git a/sysdeps/arm/bsd-setjmp.S b/sysdeps/arm/bsd-setjmp.S index 36c571c5ef..bc2097e79a 100644 --- a/sysdeps/arm/bsd-setjmp.S +++ b/sysdeps/arm/bsd-setjmp.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* This just does a tail-call to `__sigsetjmp (ARG, 1)'. We cannot do it in C because it must be a tail-call, so frame-unwinding diff --git a/sysdeps/arm/crti.S b/sysdeps/arm/crti.S index facb1e6c61..a203d6a22c 100644 --- a/sysdeps/arm/crti.S +++ b/sysdeps/arm/crti.S @@ -30,9 +30,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* crti.S puts a function prologue at the beginning of the .init and .fini sections and defines global symbols for those addresses, so diff --git a/sysdeps/arm/crtn.S b/sysdeps/arm/crtn.S index 18be5cc6d3..28e3153108 100644 --- a/sysdeps/arm/crtn.S +++ b/sysdeps/arm/crtn.S @@ -30,9 +30,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/arm/dl-irel.h b/sysdeps/arm/dl-irel.h index ab33ef8393..5141031cef 100644 --- a/sysdeps/arm/dl-irel.h +++ b/sysdeps/arm/dl-irel.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _DL_IREL_H #define _DL_IREL_H diff --git a/sysdeps/arm/dl-lookupcfg.h b/sysdeps/arm/dl-lookupcfg.h index 29b2587b42..bf3acd07c1 100644 --- a/sysdeps/arm/dl-lookupcfg.h +++ b/sysdeps/arm/dl-lookupcfg.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define DL_UNMAP_IS_SPECIAL diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 5ceeaa979d..58cf418c09 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef dl_machine_h #define dl_machine_h diff --git a/sysdeps/arm/dl-sysdep.h b/sysdeps/arm/dl-sysdep.h index cd678f4e43..91c754b12c 100644 --- a/sysdeps/arm/dl-sysdep.h +++ b/sysdeps/arm/dl-sysdep.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include_next diff --git a/sysdeps/arm/dl-tls.h b/sysdeps/arm/dl-tls.h index 694d11d89d..ada45f78c8 100644 --- a/sysdeps/arm/dl-tls.h +++ b/sysdeps/arm/dl-tls.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Type used for the representation of TLS information in the GOT. */ diff --git a/sysdeps/arm/dl-tlsdesc.S b/sysdeps/arm/dl-tlsdesc.S index c192fc978e..f21555281f 100644 --- a/sysdeps/arm/dl-tlsdesc.S +++ b/sysdeps/arm/dl-tlsdesc.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/arm/dl-tlsdesc.h b/sysdeps/arm/dl-tlsdesc.h index 3817d7e5da..2b1131c55a 100644 --- a/sysdeps/arm/dl-tlsdesc.h +++ b/sysdeps/arm/dl-tlsdesc.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _ARM_DL_TLSDESC_H # define _ARM_DL_TLSDESC_H 1 diff --git a/sysdeps/arm/dl-trampoline.S b/sysdeps/arm/dl-trampoline.S index de8d891821..370bda3467 100644 --- a/sysdeps/arm/dl-trampoline.S +++ b/sysdeps/arm/dl-trampoline.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/arm/eabi/__longjmp.S b/sysdeps/arm/eabi/__longjmp.S index f97489e971..cc802c15bd 100644 --- a/sysdeps/arm/eabi/__longjmp.S +++ b/sysdeps/arm/eabi/__longjmp.S @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #define _SETJMP_H diff --git a/sysdeps/arm/eabi/aeabi_assert.c b/sysdeps/arm/eabi/aeabi_assert.c index 14801c2643..c8fb188913 100644 --- a/sysdeps/arm/eabi/aeabi_assert.c +++ b/sysdeps/arm/eabi/aeabi_assert.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/arm/eabi/aeabi_atexit.c b/sysdeps/arm/eabi/aeabi_atexit.c index 697f54ce9e..5427fae961 100644 --- a/sysdeps/arm/eabi/aeabi_atexit.c +++ b/sysdeps/arm/eabi/aeabi_atexit.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/arm/eabi/aeabi_errno_addr.c b/sysdeps/arm/eabi/aeabi_errno_addr.c index 09bdc1efe5..b9ee3a5fdd 100644 --- a/sysdeps/arm/eabi/aeabi_errno_addr.c +++ b/sysdeps/arm/eabi/aeabi_errno_addr.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/arm/eabi/aeabi_lcsts.c b/sysdeps/arm/eabi/aeabi_lcsts.c index 0c620d4fef..c53800d6c6 100644 --- a/sysdeps/arm/eabi/aeabi_lcsts.c +++ b/sysdeps/arm/eabi/aeabi_lcsts.c @@ -30,9 +30,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* The ARM EABI requires that we provide ISO compile-time constants as link-time constants. Some portable applications may reference these. */ diff --git a/sysdeps/arm/eabi/aeabi_localeconv.c b/sysdeps/arm/eabi/aeabi_localeconv.c index 323148e0f2..233dc62049 100644 --- a/sysdeps/arm/eabi/aeabi_localeconv.c +++ b/sysdeps/arm/eabi/aeabi_localeconv.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/arm/eabi/aeabi_math.c b/sysdeps/arm/eabi/aeabi_math.c index e7f1dbf5f7..d7bcd56714 100644 --- a/sysdeps/arm/eabi/aeabi_math.c +++ b/sysdeps/arm/eabi/aeabi_math.c @@ -29,9 +29,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/arm/eabi/aeabi_mb_cur_max.c b/sysdeps/arm/eabi/aeabi_mb_cur_max.c index 866da795d9..3c03a9ae3a 100644 --- a/sysdeps/arm/eabi/aeabi_mb_cur_max.c +++ b/sysdeps/arm/eabi/aeabi_mb_cur_max.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/arm/eabi/aeabi_memclr.c b/sysdeps/arm/eabi/aeabi_memclr.c index 986de85edd..e2974520e5 100644 --- a/sysdeps/arm/eabi/aeabi_memclr.c +++ b/sysdeps/arm/eabi/aeabi_memclr.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/arm/eabi/aeabi_memcpy.c b/sysdeps/arm/eabi/aeabi_memcpy.c index 7d7c47ba3c..403a7ef525 100644 --- a/sysdeps/arm/eabi/aeabi_memcpy.c +++ b/sysdeps/arm/eabi/aeabi_memcpy.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/arm/eabi/aeabi_memmove.c b/sysdeps/arm/eabi/aeabi_memmove.c index b2a4e35318..e824946a79 100644 --- a/sysdeps/arm/eabi/aeabi_memmove.c +++ b/sysdeps/arm/eabi/aeabi_memmove.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/arm/eabi/aeabi_memset.c b/sysdeps/arm/eabi/aeabi_memset.c index ed38bdea5f..b7775f9196 100644 --- a/sysdeps/arm/eabi/aeabi_memset.c +++ b/sysdeps/arm/eabi/aeabi_memset.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/arm/eabi/aeabi_sighandlers.S b/sysdeps/arm/eabi/aeabi_sighandlers.S index ff8162e394..082039e9cd 100644 --- a/sysdeps/arm/eabi/aeabi_sighandlers.S +++ b/sysdeps/arm/eabi/aeabi_sighandlers.S @@ -30,9 +30,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* The ARM EABI defines these as "functions". */ diff --git a/sysdeps/arm/eabi/aeabi_unwind_cpp_pr1.c b/sysdeps/arm/eabi/aeabi_unwind_cpp_pr1.c index 91df013ad4..5dbbd9b0a1 100644 --- a/sysdeps/arm/eabi/aeabi_unwind_cpp_pr1.c +++ b/sysdeps/arm/eabi/aeabi_unwind_cpp_pr1.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Because some objects in ld.so and libc.so are built with -fexceptions, we end up with references to this personality diff --git a/sysdeps/arm/eabi/arm-mcount.S b/sysdeps/arm/eabi/arm-mcount.S index 06e5f182d8..5ee66bea02 100644 --- a/sysdeps/arm/eabi/arm-mcount.S +++ b/sysdeps/arm/eabi/arm-mcount.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Don't call mcount when calling mcount... */ #undef PROF diff --git a/sysdeps/arm/eabi/armv6t2/memchr.S b/sysdeps/arm/eabi/armv6t2/memchr.S index a7f5367cd3..69ea320e89 100644 --- a/sysdeps/arm/eabi/armv6t2/memchr.S +++ b/sysdeps/arm/eabi/armv6t2/memchr.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/arm/eabi/backtrace.c b/sysdeps/arm/eabi/backtrace.c index 752a435f08..3d839e628c 100644 --- a/sysdeps/arm/eabi/backtrace.c +++ b/sysdeps/arm/eabi/backtrace.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/arm/eabi/bits/fenv.h b/sysdeps/arm/eabi/bits/fenv.h index 3bef3980cb..006ccf5288 100644 --- a/sysdeps/arm/eabi/bits/fenv.h +++ b/sysdeps/arm/eabi/bits/fenv.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _FENV_H # error "Never use directly; include instead." diff --git a/sysdeps/arm/eabi/bits/huge_val.h b/sysdeps/arm/eabi/bits/huge_val.h index 11ca11f18e..6008b1008b 100644 --- a/sysdeps/arm/eabi/bits/huge_val.h +++ b/sysdeps/arm/eabi/bits/huge_val.h @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _MATH_H # error "Never use directly; include instead." diff --git a/sysdeps/arm/eabi/bits/setjmp.h b/sysdeps/arm/eabi/bits/setjmp.h index 16c560d613..bdc41ce86e 100644 --- a/sysdeps/arm/eabi/bits/setjmp.h +++ b/sysdeps/arm/eabi/bits/setjmp.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Define the machine-dependent type `jmp_buf'. ARM EABI version. */ diff --git a/sysdeps/arm/eabi/fclrexcpt.c b/sysdeps/arm/eabi/fclrexcpt.c index fa326ecd5d..ddedc3573c 100644 --- a/sysdeps/arm/eabi/fclrexcpt.c +++ b/sysdeps/arm/eabi/fclrexcpt.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/arm/eabi/fedisblxcpt.c b/sysdeps/arm/eabi/fedisblxcpt.c index 31a4dcd7a4..c9c62a48ef 100644 --- a/sysdeps/arm/eabi/fedisblxcpt.c +++ b/sysdeps/arm/eabi/fedisblxcpt.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/arm/eabi/feenablxcpt.c b/sysdeps/arm/eabi/feenablxcpt.c index 9c4215870a..3b2b934f57 100644 --- a/sysdeps/arm/eabi/feenablxcpt.c +++ b/sysdeps/arm/eabi/feenablxcpt.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/arm/eabi/fegetenv.c b/sysdeps/arm/eabi/fegetenv.c index d2afd77bce..c638635df4 100644 --- a/sysdeps/arm/eabi/fegetenv.c +++ b/sysdeps/arm/eabi/fegetenv.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/arm/eabi/fegetexcept.c b/sysdeps/arm/eabi/fegetexcept.c index b0e623db54..929d6c5cfa 100644 --- a/sysdeps/arm/eabi/fegetexcept.c +++ b/sysdeps/arm/eabi/fegetexcept.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/arm/eabi/fegetround.c b/sysdeps/arm/eabi/fegetround.c index e8246368e2..df1049706b 100644 --- a/sysdeps/arm/eabi/fegetround.c +++ b/sysdeps/arm/eabi/fegetround.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/arm/eabi/feholdexcpt.c b/sysdeps/arm/eabi/feholdexcpt.c index 04bb2fa922..4aed48bb39 100644 --- a/sysdeps/arm/eabi/feholdexcpt.c +++ b/sysdeps/arm/eabi/feholdexcpt.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/arm/eabi/fesetenv.c b/sysdeps/arm/eabi/fesetenv.c index 10bfa38c2c..61370325e2 100644 --- a/sysdeps/arm/eabi/fesetenv.c +++ b/sysdeps/arm/eabi/fesetenv.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/arm/eabi/fesetround.c b/sysdeps/arm/eabi/fesetround.c index efa14b45ba..997bd98f5a 100644 --- a/sysdeps/arm/eabi/fesetround.c +++ b/sysdeps/arm/eabi/fesetround.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/arm/eabi/feupdateenv.c b/sysdeps/arm/eabi/feupdateenv.c index 8c96858153..98f265432c 100644 --- a/sysdeps/arm/eabi/feupdateenv.c +++ b/sysdeps/arm/eabi/feupdateenv.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/arm/eabi/fgetexcptflg.c b/sysdeps/arm/eabi/fgetexcptflg.c index 2259fa37ae..41661a2e29 100644 --- a/sysdeps/arm/eabi/fgetexcptflg.c +++ b/sysdeps/arm/eabi/fgetexcptflg.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/arm/eabi/find_exidx.c b/sysdeps/arm/eabi/find_exidx.c index 59b33de5a4..12ade46d87 100644 --- a/sysdeps/arm/eabi/find_exidx.c +++ b/sysdeps/arm/eabi/find_exidx.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/arm/eabi/fpu_control.h b/sysdeps/arm/eabi/fpu_control.h index 8b0fa14194..635bc7d4ee 100644 --- a/sysdeps/arm/eabi/fpu_control.h +++ b/sysdeps/arm/eabi/fpu_control.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _FPU_CONTROL_H #define _FPU_CONTROL_H diff --git a/sysdeps/arm/eabi/fraiseexcpt.c b/sysdeps/arm/eabi/fraiseexcpt.c index 3a41b22540..0a4368839f 100644 --- a/sysdeps/arm/eabi/fraiseexcpt.c +++ b/sysdeps/arm/eabi/fraiseexcpt.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/arm/eabi/fsetexcptflg.c b/sysdeps/arm/eabi/fsetexcptflg.c index a844854f6e..bee51a96a2 100644 --- a/sysdeps/arm/eabi/fsetexcptflg.c +++ b/sysdeps/arm/eabi/fsetexcptflg.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/arm/eabi/ftestexcept.c b/sysdeps/arm/eabi/ftestexcept.c index 144eef9c5e..06817d2fe0 100644 --- a/sysdeps/arm/eabi/ftestexcept.c +++ b/sysdeps/arm/eabi/ftestexcept.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/arm/eabi/jmpbuf-offsets.h b/sysdeps/arm/eabi/jmpbuf-offsets.h index 1ca33ff970..642a9657d5 100644 --- a/sysdeps/arm/eabi/jmpbuf-offsets.h +++ b/sysdeps/arm/eabi/jmpbuf-offsets.h @@ -13,8 +13,7 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define __JMP_BUF_SP 8 diff --git a/sysdeps/arm/eabi/machine-gmon.h b/sysdeps/arm/eabi/machine-gmon.h index aca23c9252..671d6b176b 100644 --- a/sysdeps/arm/eabi/machine-gmon.h +++ b/sysdeps/arm/eabi/machine-gmon.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/arm/eabi/setfpucw.c b/sysdeps/arm/eabi/setfpucw.c index cd680df6f9..d0cea32b9d 100644 --- a/sysdeps/arm/eabi/setfpucw.c +++ b/sysdeps/arm/eabi/setfpucw.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/arm/eabi/setjmp.S b/sysdeps/arm/eabi/setjmp.S index 0bc1a15471..5e3f39cc75 100644 --- a/sysdeps/arm/eabi/setjmp.S +++ b/sysdeps/arm/eabi/setjmp.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #define _SETJMP_H diff --git a/sysdeps/arm/elf/start.S b/sysdeps/arm/elf/start.S index 551b4677c3..a857d8b97e 100644 --- a/sysdeps/arm/elf/start.S +++ b/sysdeps/arm/elf/start.S @@ -31,9 +31,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* This is the canonical entry point, usually the first thing in the text segment. diff --git a/sysdeps/arm/frame.h b/sysdeps/arm/frame.h index deb46c0135..a98729b688 100644 --- a/sysdeps/arm/frame.h +++ b/sysdeps/arm/frame.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* This is the APCS stack backtrace structure. */ struct layout diff --git a/sysdeps/arm/gccframe.h b/sysdeps/arm/gccframe.h index ef8df2630e..166d8fb59b 100644 --- a/sysdeps/arm/gccframe.h +++ b/sysdeps/arm/gccframe.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define FIRST_PSEUDO_REGISTER 27 diff --git a/sysdeps/arm/gmp-mparam.h b/sysdeps/arm/gmp-mparam.h index 57ad7e21fe..b391b68f06 100644 --- a/sysdeps/arm/gmp-mparam.h +++ b/sysdeps/arm/gmp-mparam.h @@ -15,9 +15,7 @@ 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 MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -MA 02111-1307, USA. */ +along with the GNU MP Library. If not, see . */ #define BITS_PER_MP_LIMB 32 #define BYTES_PER_MP_LIMB 4 diff --git a/sysdeps/arm/jmpbuf-unwind.h b/sysdeps/arm/jmpbuf-unwind.h index 7990eeb12d..d3a58d03a2 100644 --- a/sysdeps/arm/jmpbuf-unwind.h +++ b/sysdeps/arm/jmpbuf-unwind.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/arm/ldsodefs.h b/sysdeps/arm/ldsodefs.h index d700e220c3..aa323d3ecd 100644 --- a/sysdeps/arm/ldsodefs.h +++ b/sysdeps/arm/ldsodefs.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _ARM_LDSODEFS_H #define _ARM_LDSODEFS_H 1 diff --git a/sysdeps/arm/libc-tls.c b/sysdeps/arm/libc-tls.c index a6271bb3b4..747de1c995 100644 --- a/sysdeps/arm/libc-tls.c +++ b/sysdeps/arm/libc-tls.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/arm/memcpy.S b/sysdeps/arm/memcpy.S index 673bf43c48..08f7f76ecf 100644 --- a/sysdeps/arm/memcpy.S +++ b/sysdeps/arm/memcpy.S @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/arm/memmove.S b/sysdeps/arm/memmove.S index 026d8e2bd1..4ec6567064 100644 --- a/sysdeps/arm/memmove.S +++ b/sysdeps/arm/memmove.S @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/arm/memset.S b/sysdeps/arm/memset.S index a276570012..a29031c266 100644 --- a/sysdeps/arm/memset.S +++ b/sysdeps/arm/memset.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/arm/memusage.h b/sysdeps/arm/memusage.h index c558a06b5d..08a25425b9 100644 --- a/sysdeps/arm/memusage.h +++ b/sysdeps/arm/memusage.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define GETSP() ({ register uintptr_t stack_ptr asm ("sp"); stack_ptr; }) diff --git a/sysdeps/arm/nptl/Makefile b/sysdeps/arm/nptl/Makefile index 0300693783..e2497397cb 100644 --- a/sysdeps/arm/nptl/Makefile +++ b/sysdeps/arm/nptl/Makefile @@ -12,9 +12,8 @@ # 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. +# License along with the GNU C Library. If not, see +# . ifeq ($(subdir),csu) gen-as-const-headers += tcb-offsets.sym diff --git a/sysdeps/arm/nptl/pthread_spin_lock.c b/sysdeps/arm/nptl/pthread_spin_lock.c index 1217b899ab..3a23bd31a5 100644 --- a/sysdeps/arm/nptl/pthread_spin_lock.c +++ b/sysdeps/arm/nptl/pthread_spin_lock.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include "pthreadP.h" diff --git a/sysdeps/arm/nptl/pthread_spin_trylock.c b/sysdeps/arm/nptl/pthread_spin_trylock.c index fb998d2438..7d3118071e 100644 --- a/sysdeps/arm/nptl/pthread_spin_trylock.c +++ b/sysdeps/arm/nptl/pthread_spin_trylock.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/arm/nptl/pthreaddef.h b/sysdeps/arm/nptl/pthreaddef.h index b1a06cd1e6..5385b24167 100644 --- a/sysdeps/arm/nptl/pthreaddef.h +++ b/sysdeps/arm/nptl/pthreaddef.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Default stack size. */ #define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024) diff --git a/sysdeps/arm/nptl/tls.h b/sysdeps/arm/nptl/tls.h index 16c970643b..52f695e58b 100644 --- a/sysdeps/arm/nptl/tls.h +++ b/sysdeps/arm/nptl/tls.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _TLS_H #define _TLS_H 1 diff --git a/sysdeps/arm/stackinfo.h b/sysdeps/arm/stackinfo.h index 3f94ddf3d9..ea706bb2cb 100644 --- a/sysdeps/arm/stackinfo.h +++ b/sysdeps/arm/stackinfo.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* This file contains a bit of information about the stack allocation of the processor. */ diff --git a/sysdeps/arm/strlen.S b/sysdeps/arm/strlen.S index 86e16652e4..0f18647ef4 100644 --- a/sysdeps/arm/strlen.S +++ b/sysdeps/arm/strlen.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/arm/sys/ucontext.h b/sysdeps/arm/sys/ucontext.h index 9c800bfa9f..e1d7c074dd 100644 --- a/sysdeps/arm/sys/ucontext.h +++ b/sysdeps/arm/sys/ucontext.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* System V/ARM ABI compliant context switching support. */ diff --git a/sysdeps/arm/sysdep.h b/sysdeps/arm/sysdep.h index 4fa10d90e9..6d15f798c2 100644 --- a/sysdeps/arm/sysdep.h +++ b/sysdeps/arm/sysdep.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/arm/tlsdesc.c b/sysdeps/arm/tlsdesc.c index 811d66b831..c5e69a8755 100644 --- a/sysdeps/arm/tlsdesc.c +++ b/sysdeps/arm/tlsdesc.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/arm/tst-audit.h b/sysdeps/arm/tst-audit.h index bec743cffa..0a755a2ebd 100644 --- a/sysdeps/arm/tst-audit.h +++ b/sysdeps/arm/tst-audit.h @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define pltenter la_arm_gnu_pltenter #define pltexit la_arm_gnu_pltexit diff --git a/sysdeps/arm/unwind-dw2-fde-glibc.c b/sysdeps/arm/unwind-dw2-fde-glibc.c index 6c0d7350dc..a94189b7e8 100644 --- a/sysdeps/arm/unwind-dw2-fde-glibc.c +++ b/sysdeps/arm/unwind-dw2-fde-glibc.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* ARM uses setjmp-longjmp exceptions. However, previous versions of GNU libc exported some DWARF-2 exception handling support routines. diff --git a/sysdeps/hppa/Makefile b/sysdeps/hppa/Makefile index 3cdd6c8740..561330dd7e 100644 --- a/sysdeps/hppa/Makefile +++ b/sysdeps/hppa/Makefile @@ -13,9 +13,8 @@ # 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. +# License along with the GNU C Library. If not, see +# . # We used to need this since the build process uses ld -r. Now we use # ld -r --unique=.text* which does more or less the same thing, but better. diff --git a/sysdeps/hppa/__longjmp.S b/sysdeps/hppa/__longjmp.S index dee4d9f7b5..4ef219e414 100644 --- a/sysdeps/hppa/__longjmp.S +++ b/sysdeps/hppa/__longjmp.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #define _SETJMP_H diff --git a/sysdeps/hppa/add_n.s b/sysdeps/hppa/add_n.s index a396b3471c..df5ceb8bcb 100644 --- a/sysdeps/hppa/add_n.s +++ b/sysdeps/hppa/add_n.s @@ -16,9 +16,8 @@ ;! License for more details. ;! You should have received a copy of the GNU Lesser General Public License -;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to -;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -;! MA 02111-1307, USA. +;! along with the GNU MP Library. If not, see +;! . ;! INPUT PARAMETERS diff --git a/sysdeps/hppa/bits/link.h b/sysdeps/hppa/bits/link.h index 2c1c81de49..38d2c54250 100644 --- a/sysdeps/hppa/bits/link.h +++ b/sysdeps/hppa/bits/link.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _LINK_H # error "Never include directly; use instead." diff --git a/sysdeps/hppa/bits/setjmp.h b/sysdeps/hppa/bits/setjmp.h index d5ae7e7b5b..19a0cfe621 100644 --- a/sysdeps/hppa/bits/setjmp.h +++ b/sysdeps/hppa/bits/setjmp.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Define the machine-dependent type `jmp_buf'. HPPA version. */ #ifndef _BITS_SETJMP_H diff --git a/sysdeps/hppa/bsd-_setjmp.S b/sysdeps/hppa/bsd-_setjmp.S index e5ec94c122..15888f57b2 100644 --- a/sysdeps/hppa/bsd-_setjmp.S +++ b/sysdeps/hppa/bsd-_setjmp.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/hppa/bsd-setjmp.S b/sysdeps/hppa/bsd-setjmp.S index 04ddba4652..54e776fac9 100644 --- a/sysdeps/hppa/bsd-setjmp.S +++ b/sysdeps/hppa/bsd-setjmp.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* This just does a tail-call to `__sigsetjmp (ARG, 1)'. We cannot do it in C because it must be a tail-call, so frame-unwinding diff --git a/sysdeps/hppa/dl-fptr.h b/sysdeps/hppa/dl-fptr.h index 798ee8c969..9f998651a5 100644 --- a/sysdeps/hppa/dl-fptr.h +++ b/sysdeps/hppa/dl-fptr.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef dl_hppa_fptr_h #define dl_hppa_fptr_h 1 diff --git a/sysdeps/hppa/dl-lookupcfg.h b/sysdeps/hppa/dl-lookupcfg.h index 89a2d2274e..a81f41035f 100644 --- a/sysdeps/hppa/dl-lookupcfg.h +++ b/sysdeps/hppa/dl-lookupcfg.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define ELF_FUNCTION_PTR_IS_SPECIAL #define DL_UNMAP_IS_SPECIAL diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h index 72dba8f204..b63e36ee68 100644 --- a/sysdeps/hppa/dl-machine.h +++ b/sysdeps/hppa/dl-machine.h @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef dl_machine_h #define dl_machine_h 1 diff --git a/sysdeps/hppa/dl-symaddr.c b/sysdeps/hppa/dl-symaddr.c index e5ce6a9c03..039a754454 100644 --- a/sysdeps/hppa/dl-symaddr.c +++ b/sysdeps/hppa/dl-symaddr.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/hppa/dl-tls.h b/sysdeps/hppa/dl-tls.h index 91c3d44735..ef8f4e3171 100644 --- a/sysdeps/hppa/dl-tls.h +++ b/sysdeps/hppa/dl-tls.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Type used for the representation of TLS information in the GOT. */ diff --git a/sysdeps/hppa/dl-trampoline.S b/sysdeps/hppa/dl-trampoline.S index c7c18ed18d..21be0a04af 100644 --- a/sysdeps/hppa/dl-trampoline.S +++ b/sysdeps/hppa/dl-trampoline.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/hppa/elf/initfini.c b/sysdeps/hppa/elf/initfini.c index 35f5dd52fe..90964f5041 100644 --- a/sysdeps/hppa/elf/initfini.c +++ b/sysdeps/hppa/elf/initfini.c @@ -30,9 +30,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* This file is compiled into assembly code which is then munged by a sed script into two files: crti.s and crtn.s. diff --git a/sysdeps/hppa/elf/start.S b/sysdeps/hppa/elf/start.S index c682e9cf79..97196bd52d 100644 --- a/sysdeps/hppa/elf/start.S +++ b/sysdeps/hppa/elf/start.S @@ -30,9 +30,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ .import main, code .import $global$, data diff --git a/sysdeps/hppa/fpu/bits/fenv.h b/sysdeps/hppa/fpu/bits/fenv.h index 6d83b141f8..6af5ddeef3 100644 --- a/sysdeps/hppa/fpu/bits/fenv.h +++ b/sysdeps/hppa/fpu/bits/fenv.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _FENV_H # error "Never use directly; include instead." diff --git a/sysdeps/hppa/fpu/bits/mathdef.h b/sysdeps/hppa/fpu/bits/mathdef.h index 8734ba14a0..811b3684a4 100644 --- a/sysdeps/hppa/fpu/bits/mathdef.h +++ b/sysdeps/hppa/fpu/bits/mathdef.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #if !defined _MATH_H && !defined _COMPLEX_H # error "Never use directly; include instead" diff --git a/sysdeps/hppa/fpu/fclrexcpt.c b/sysdeps/hppa/fpu/fclrexcpt.c index d74a449ebb..5d1e593105 100644 --- a/sysdeps/hppa/fpu/fclrexcpt.c +++ b/sysdeps/hppa/fpu/fclrexcpt.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/hppa/fpu/fedisblxcpt.c b/sysdeps/hppa/fpu/fedisblxcpt.c index 8d2e664034..c69d8bacba 100644 --- a/sysdeps/hppa/fpu/fedisblxcpt.c +++ b/sysdeps/hppa/fpu/fedisblxcpt.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/hppa/fpu/feenablxcpt.c b/sysdeps/hppa/fpu/feenablxcpt.c index 4b17a60378..20577f41b3 100644 --- a/sysdeps/hppa/fpu/feenablxcpt.c +++ b/sysdeps/hppa/fpu/feenablxcpt.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/hppa/fpu/fegetenv.c b/sysdeps/hppa/fpu/fegetenv.c index aab3431b2c..b5ab4e1c41 100644 --- a/sysdeps/hppa/fpu/fegetenv.c +++ b/sysdeps/hppa/fpu/fegetenv.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/hppa/fpu/fegetexcept.c b/sysdeps/hppa/fpu/fegetexcept.c index d249dc6b9f..0faa3b213f 100644 --- a/sysdeps/hppa/fpu/fegetexcept.c +++ b/sysdeps/hppa/fpu/fegetexcept.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/hppa/fpu/fegetround.c b/sysdeps/hppa/fpu/fegetround.c index 1e606c9ecd..70d2e476fe 100644 --- a/sysdeps/hppa/fpu/fegetround.c +++ b/sysdeps/hppa/fpu/fegetround.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/hppa/fpu/feholdexcpt.c b/sysdeps/hppa/fpu/feholdexcpt.c index ac6eb58055..6e3cabd88a 100644 --- a/sysdeps/hppa/fpu/feholdexcpt.c +++ b/sysdeps/hppa/fpu/feholdexcpt.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/hppa/fpu/fesetenv.c b/sysdeps/hppa/fpu/fesetenv.c index 1a5ca65921..e768bb2c37 100644 --- a/sysdeps/hppa/fpu/fesetenv.c +++ b/sysdeps/hppa/fpu/fesetenv.c @@ -16,9 +16,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/hppa/fpu/fesetround.c b/sysdeps/hppa/fpu/fesetround.c index 9f30c2495f..d7acab2668 100644 --- a/sysdeps/hppa/fpu/fesetround.c +++ b/sysdeps/hppa/fpu/fesetround.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/hppa/fpu/feupdateenv.c b/sysdeps/hppa/fpu/feupdateenv.c index 6e1d5d4b6d..cd01f07d96 100644 --- a/sysdeps/hppa/fpu/feupdateenv.c +++ b/sysdeps/hppa/fpu/feupdateenv.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/hppa/fpu/fgetexcptflg.c b/sysdeps/hppa/fpu/fgetexcptflg.c index d5bcfe31d6..360df383e2 100644 --- a/sysdeps/hppa/fpu/fgetexcptflg.c +++ b/sysdeps/hppa/fpu/fgetexcptflg.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/hppa/fpu/fraiseexcpt.c b/sysdeps/hppa/fpu/fraiseexcpt.c index b064dc1527..4b0161a6e9 100644 --- a/sysdeps/hppa/fpu/fraiseexcpt.c +++ b/sysdeps/hppa/fpu/fraiseexcpt.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/hppa/fpu/fsetexcptflg.c b/sysdeps/hppa/fpu/fsetexcptflg.c index 4ec3a92dcc..6a1d189fad 100644 --- a/sysdeps/hppa/fpu/fsetexcptflg.c +++ b/sysdeps/hppa/fpu/fsetexcptflg.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/hppa/fpu/ftestexcept.c b/sysdeps/hppa/fpu/ftestexcept.c index c031ffe6e8..90f984e735 100644 --- a/sysdeps/hppa/fpu/ftestexcept.c +++ b/sysdeps/hppa/fpu/ftestexcept.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/hppa/frame.h b/sysdeps/hppa/frame.h index 0a234f1aa7..a37652ad62 100644 --- a/sysdeps/hppa/frame.h +++ b/sysdeps/hppa/frame.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* PA stacks grow upwards. */ #define INNER_THAN > diff --git a/sysdeps/hppa/gccframe.h b/sysdeps/hppa/gccframe.h index 65e44dfd73..bdf5dd36bc 100644 --- a/sysdeps/hppa/gccframe.h +++ b/sysdeps/hppa/gccframe.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Note: For hppa64 this is 61 */ #define DWARF_FRAME_REGISTERS 89 diff --git a/sysdeps/hppa/hppa1.1/addmul_1.s b/sysdeps/hppa/hppa1.1/addmul_1.s index a1fb083a83..ce1137bb99 100644 --- a/sysdeps/hppa/hppa1.1/addmul_1.s +++ b/sysdeps/hppa/hppa1.1/addmul_1.s @@ -16,9 +16,8 @@ ;! License for more details. ;! You should have received a copy of the GNU Lesser General Public License -;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to -;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -;! MA 02111-1307, USA. +;! along with the GNU MP Library. If not, see +;! . ;! INPUT PARAMETERS diff --git a/sysdeps/hppa/hppa1.1/mul_1.s b/sysdeps/hppa/hppa1.1/mul_1.s index 00c770f272..53abc09550 100644 --- a/sysdeps/hppa/hppa1.1/mul_1.s +++ b/sysdeps/hppa/hppa1.1/mul_1.s @@ -16,9 +16,8 @@ ;! License for more details. ;! You should have received a copy of the GNU Lesser General Public License -;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to -;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -;! MA 02111-1307, USA. +;! along with the GNU MP Library. If not, see +;! . ;! INPUT PARAMETERS diff --git a/sysdeps/hppa/hppa1.1/s_signbit.c b/sysdeps/hppa/hppa1.1/s_signbit.c index d9d4f8b13f..b762ab6f94 100644 --- a/sysdeps/hppa/hppa1.1/s_signbit.c +++ b/sysdeps/hppa/hppa1.1/s_signbit.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/hppa/hppa1.1/submul_1.s b/sysdeps/hppa/hppa1.1/submul_1.s index 997bd6d521..910745243c 100644 --- a/sysdeps/hppa/hppa1.1/submul_1.s +++ b/sysdeps/hppa/hppa1.1/submul_1.s @@ -16,9 +16,8 @@ ;! License for more details. ;! You should have received a copy of the GNU Lesser General Public License -;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to -;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -;! MA 02111-1307, USA. +;! along with the GNU MP Library. If not, see +;! . ;! INPUT PARAMETERS diff --git a/sysdeps/hppa/hppa1.1/udiv_qrnnd.s b/sysdeps/hppa/hppa1.1/udiv_qrnnd.s index 7b83619c7d..bcb3a86dd0 100644 --- a/sysdeps/hppa/hppa1.1/udiv_qrnnd.s +++ b/sysdeps/hppa/hppa1.1/udiv_qrnnd.s @@ -16,9 +16,8 @@ ;! License for more details. ;! You should have received a copy of the GNU Lesser General Public License -;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to -;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -;! MA 02111-1307, USA. +;! along with the GNU MP Library. If not, see +;! . ;! INPUT PARAMETERS diff --git a/sysdeps/hppa/jmpbuf-offsets.h b/sysdeps/hppa/jmpbuf-offsets.h index d95ed8a419..b2a1b95312 100644 --- a/sysdeps/hppa/jmpbuf-offsets.h +++ b/sysdeps/hppa/jmpbuf-offsets.h @@ -13,8 +13,7 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define JB_SP (76/4) diff --git a/sysdeps/hppa/jmpbuf-unwind.h b/sysdeps/hppa/jmpbuf-unwind.h index 6ea1876e19..ef448b3d3c 100644 --- a/sysdeps/hppa/jmpbuf-unwind.h +++ b/sysdeps/hppa/jmpbuf-unwind.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/hppa/ldsodefs.h b/sysdeps/hppa/ldsodefs.h index 5bd7887265..8e14126688 100644 --- a/sysdeps/hppa/ldsodefs.h +++ b/sysdeps/hppa/ldsodefs.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _HPPA_LDSODEFS_H #define _HPPA_LDSODEFS_H 1 diff --git a/sysdeps/hppa/libc-tls.c b/sysdeps/hppa/libc-tls.c index 232f80f822..b96842625b 100644 --- a/sysdeps/hppa/libc-tls.c +++ b/sysdeps/hppa/libc-tls.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/hppa/libgcc-compat.c b/sysdeps/hppa/libgcc-compat.c index 2957eba89f..a08ea7db93 100644 --- a/sysdeps/hppa/libgcc-compat.c +++ b/sysdeps/hppa/libgcc-compat.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/hppa/lshift.s b/sysdeps/hppa/lshift.s index 151b283e57..ce18a981f3 100644 --- a/sysdeps/hppa/lshift.s +++ b/sysdeps/hppa/lshift.s @@ -15,9 +15,8 @@ ;! License for more details. ;! You should have received a copy of the GNU Lesser General Public License -;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to -;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -;! MA 02111-1307, USA. +;! along with the GNU MP Library. If not, see +;! . ;! INPUT PARAMETERS diff --git a/sysdeps/hppa/machine-gmon.h b/sysdeps/hppa/machine-gmon.h index 3eeef67377..02838502b8 100644 --- a/sysdeps/hppa/machine-gmon.h +++ b/sysdeps/hppa/machine-gmon.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* We can call _mcount directly since gcc supplies the correct * arguments */ diff --git a/sysdeps/hppa/memusage.h b/sysdeps/hppa/memusage.h index d3dd10e10b..45834ff48e 100644 --- a/sysdeps/hppa/memusage.h +++ b/sysdeps/hppa/memusage.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define GETSP() ({ register uintptr_t stack_ptr asm ("%r30"); stack_ptr; }) #define STACK_GROWS_UPWARD 1 diff --git a/sysdeps/hppa/nptl/Makefile b/sysdeps/hppa/nptl/Makefile index 78d8973935..86be06ade8 100644 --- a/sysdeps/hppa/nptl/Makefile +++ b/sysdeps/hppa/nptl/Makefile @@ -12,9 +12,8 @@ # 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. +# License along with the GNU C Library. If not, see +# . ifeq ($(subdir),csu) gen-as-const-headers += tcb-offsets.sym diff --git a/sysdeps/hppa/nptl/jmpbuf-unwind.h b/sysdeps/hppa/nptl/jmpbuf-unwind.h index 7f92627f91..02cb728342 100644 --- a/sysdeps/hppa/nptl/jmpbuf-unwind.h +++ b/sysdeps/hppa/nptl/jmpbuf-unwind.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/hppa/nptl/pthread_spin_init.c b/sysdeps/hppa/nptl/pthread_spin_init.c index 95b9eb8aab..3a3aa9a736 100644 --- a/sysdeps/hppa/nptl/pthread_spin_init.c +++ b/sysdeps/hppa/nptl/pthread_spin_init.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include "pthreadP.h" diff --git a/sysdeps/hppa/nptl/pthread_spin_lock.c b/sysdeps/hppa/nptl/pthread_spin_lock.c index 966f5c9187..bcf22408da 100644 --- a/sysdeps/hppa/nptl/pthread_spin_lock.c +++ b/sysdeps/hppa/nptl/pthread_spin_lock.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include "pthreadP.h" diff --git a/sysdeps/hppa/nptl/pthread_spin_trylock.c b/sysdeps/hppa/nptl/pthread_spin_trylock.c index 609a62f621..a802861012 100644 --- a/sysdeps/hppa/nptl/pthread_spin_trylock.c +++ b/sysdeps/hppa/nptl/pthread_spin_trylock.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/hppa/nptl/pthread_spin_unlock.c b/sysdeps/hppa/nptl/pthread_spin_unlock.c index 4b1b2beb62..005726bff6 100644 --- a/sysdeps/hppa/nptl/pthread_spin_unlock.c +++ b/sysdeps/hppa/nptl/pthread_spin_unlock.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include "pthreadP.h" diff --git a/sysdeps/hppa/nptl/pthreaddef.h b/sysdeps/hppa/nptl/pthreaddef.h index 6445f7bb0a..484b16d1cf 100644 --- a/sysdeps/hppa/nptl/pthreaddef.h +++ b/sysdeps/hppa/nptl/pthreaddef.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Default stack size. */ #define ARCH_STACK_DEFAULT_SIZE (8 * 1024 * 1024) diff --git a/sysdeps/hppa/nptl/tls.h b/sysdeps/hppa/nptl/tls.h index 8af75044c6..5eb55a5360 100644 --- a/sysdeps/hppa/nptl/tls.h +++ b/sysdeps/hppa/nptl/tls.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _TLS_H #define _TLS_H 1 diff --git a/sysdeps/hppa/rshift.s b/sysdeps/hppa/rshift.s index dff189dc48..9384ed2a9d 100644 --- a/sysdeps/hppa/rshift.s +++ b/sysdeps/hppa/rshift.s @@ -15,9 +15,8 @@ ;! License for more details. ;! You should have received a copy of the GNU Lesser General Public License -;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to -;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -;! MA 02111-1307, USA. +;! along with the GNU MP Library. If not, see +;! . ;! INPUT PARAMETERS diff --git a/sysdeps/hppa/setjmp.S b/sysdeps/hppa/setjmp.S index 0da34db6f1..146e4d1943 100644 --- a/sysdeps/hppa/setjmp.S +++ b/sysdeps/hppa/setjmp.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #define _ASM diff --git a/sysdeps/hppa/stackinfo.h b/sysdeps/hppa/stackinfo.h index 44929c46aa..04dcd2c8c1 100644 --- a/sysdeps/hppa/stackinfo.h +++ b/sysdeps/hppa/stackinfo.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* This file contains a bit of information about the stack allocation of the processor. */ diff --git a/sysdeps/hppa/sub_n.s b/sysdeps/hppa/sub_n.s index 7764961a2d..f4f22f8659 100644 --- a/sysdeps/hppa/sub_n.s +++ b/sysdeps/hppa/sub_n.s @@ -16,9 +16,8 @@ ;! License for more details. ;! You should have received a copy of the GNU Lesser General Public License -;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to -;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -;! MA 02111-1307, USA. +;! along with the GNU MP Library. If not, see +;! . ;! INPUT PARAMETERS diff --git a/sysdeps/hppa/sysdep.h b/sysdeps/hppa/sysdep.h index 5d02f37da7..746e611623 100644 --- a/sysdeps/hppa/sysdep.h +++ b/sysdeps/hppa/sysdep.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/hppa/tst-audit.h b/sysdeps/hppa/tst-audit.h index 93b4592258..c2b741b6f6 100644 --- a/sysdeps/hppa/tst-audit.h +++ b/sysdeps/hppa/tst-audit.h @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define pltenter la_hppa_gnu_pltenter #define pltexit la_hppa_gnu_pltexit diff --git a/sysdeps/hppa/udiv_qrnnd.s b/sysdeps/hppa/udiv_qrnnd.s index 8e9c07a205..2345ee5c9c 100644 --- a/sysdeps/hppa/udiv_qrnnd.s +++ b/sysdeps/hppa/udiv_qrnnd.s @@ -16,9 +16,8 @@ ;! License for more details. ;! You should have received a copy of the GNU Lesser General Public License -;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to -;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -;! MA 02111-1307, USA. +;! along with the GNU MP Library. If not, see +;! . ;! INPUT PARAMETERS diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile index ca0d500295..e2dd372847 100644 --- a/sysdeps/m68k/Makefile +++ b/sysdeps/m68k/Makefile @@ -12,9 +12,8 @@ # 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. +# License along with the GNU C Library. If not, see +# . # The mpn functions need this. All existing 68k ports use MIT syntax. If # a new port wants to use Motorola or Sony syntax, it can redefine this diff --git a/sysdeps/m68k/__longjmp.c b/sysdeps/m68k/__longjmp.c index 5ba2478c0c..290c974bed 100644 --- a/sysdeps/m68k/__longjmp.c +++ b/sysdeps/m68k/__longjmp.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/m68k/asm-syntax.h b/sysdeps/m68k/asm-syntax.h index 04b8e594b2..53f5259b0e 100644 --- a/sysdeps/m68k/asm-syntax.h +++ b/sysdeps/m68k/asm-syntax.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* ELF uses byte-counts for .align, most others use log2 of count of bytes. */ #define ALIGNARG(log2) 1<. */ #if !defined _BYTESWAP_H && !defined _NETINET_IN_H && !defined _ENDIAN_H # error "Never use directly; include instead." diff --git a/sysdeps/m68k/bits/link.h b/sysdeps/m68k/bits/link.h index ce4b5e0670..ed7da2c4c0 100644 --- a/sysdeps/m68k/bits/link.h +++ b/sysdeps/m68k/bits/link.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _LINK_H # error "Never include directly; use instead." diff --git a/sysdeps/m68k/bits/setjmp.h b/sysdeps/m68k/bits/setjmp.h index b2d8b2e60e..bc494c0588 100644 --- a/sysdeps/m68k/bits/setjmp.h +++ b/sysdeps/m68k/bits/setjmp.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Define the machine-dependent type `jmp_buf'. m68k version. */ #ifndef _BITS_SETJMP_H diff --git a/sysdeps/m68k/bsd-_setjmp.c b/sysdeps/m68k/bsd-_setjmp.c index a6b404aebe..0e39dd263c 100644 --- a/sysdeps/m68k/bsd-_setjmp.c +++ b/sysdeps/m68k/bsd-_setjmp.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define BSD__SETJMP #include diff --git a/sysdeps/m68k/bsd-setjmp.c b/sysdeps/m68k/bsd-setjmp.c index 59b5acfeeb..ce19a052f5 100644 --- a/sysdeps/m68k/bsd-setjmp.c +++ b/sysdeps/m68k/bsd-setjmp.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define BSD_SETJMP #include diff --git a/sysdeps/m68k/coldfire/bits/atomic.h b/sysdeps/m68k/coldfire/bits/atomic.h index 8b5403e009..39ede4a9ab 100644 --- a/sysdeps/m68k/coldfire/bits/atomic.h +++ b/sysdeps/m68k/coldfire/bits/atomic.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _BITS_ATOMIC_H #define _BITS_ATOMIC_H 1 diff --git a/sysdeps/m68k/coldfire/fpu/e_sqrt.c b/sysdeps/m68k/coldfire/fpu/e_sqrt.c index b6c67e89a0..46934a9698 100644 --- a/sysdeps/m68k/coldfire/fpu/e_sqrt.c +++ b/sysdeps/m68k/coldfire/fpu/e_sqrt.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ double __ieee754_sqrt (double x) diff --git a/sysdeps/m68k/coldfire/fpu/e_sqrtf.c b/sysdeps/m68k/coldfire/fpu/e_sqrtf.c index e0481b805d..6801b85b0a 100644 --- a/sysdeps/m68k/coldfire/fpu/e_sqrtf.c +++ b/sysdeps/m68k/coldfire/fpu/e_sqrtf.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ float __ieee754_sqrtf (float x) diff --git a/sysdeps/m68k/coldfire/fpu/fraiseexcpt.c b/sysdeps/m68k/coldfire/fpu/fraiseexcpt.c index c62ddaa016..8197545d88 100644 --- a/sysdeps/m68k/coldfire/fpu/fraiseexcpt.c +++ b/sysdeps/m68k/coldfire/fpu/fraiseexcpt.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/m68k/coldfire/fpu/s_fabs.c b/sysdeps/m68k/coldfire/fpu/s_fabs.c index 45403cb172..e2f1837777 100644 --- a/sysdeps/m68k/coldfire/fpu/s_fabs.c +++ b/sysdeps/m68k/coldfire/fpu/s_fabs.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ double __fabs (double x) diff --git a/sysdeps/m68k/coldfire/fpu/s_fabsf.c b/sysdeps/m68k/coldfire/fpu/s_fabsf.c index 7622cc9658..4a5928afd2 100644 --- a/sysdeps/m68k/coldfire/fpu/s_fabsf.c +++ b/sysdeps/m68k/coldfire/fpu/s_fabsf.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ float __fabsf (float x) diff --git a/sysdeps/m68k/coldfire/fpu/s_lrint.c b/sysdeps/m68k/coldfire/fpu/s_lrint.c index 81fae959be..b0d61e34fe 100644 --- a/sysdeps/m68k/coldfire/fpu/s_lrint.c +++ b/sysdeps/m68k/coldfire/fpu/s_lrint.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ long int __lrint (double x) diff --git a/sysdeps/m68k/coldfire/fpu/s_lrintf.c b/sysdeps/m68k/coldfire/fpu/s_lrintf.c index 87ae5e0b97..37c0e96527 100644 --- a/sysdeps/m68k/coldfire/fpu/s_lrintf.c +++ b/sysdeps/m68k/coldfire/fpu/s_lrintf.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ long int __lrintf (float x) diff --git a/sysdeps/m68k/coldfire/fpu/s_rint.c b/sysdeps/m68k/coldfire/fpu/s_rint.c index 7be8bb6e2a..5435798c18 100644 --- a/sysdeps/m68k/coldfire/fpu/s_rint.c +++ b/sysdeps/m68k/coldfire/fpu/s_rint.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ double __rint (double x) diff --git a/sysdeps/m68k/coldfire/fpu/s_rintf.c b/sysdeps/m68k/coldfire/fpu/s_rintf.c index 2337d74404..4eae67857c 100644 --- a/sysdeps/m68k/coldfire/fpu/s_rintf.c +++ b/sysdeps/m68k/coldfire/fpu/s_rintf.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ float __rintf (float x) diff --git a/sysdeps/m68k/coldfire/sysdep.h b/sysdeps/m68k/coldfire/sysdep.h index 25feee9784..fc94adea37 100644 --- a/sysdeps/m68k/coldfire/sysdep.h +++ b/sysdeps/m68k/coldfire/sysdep.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/m68k/crti.S b/sysdeps/m68k/crti.S index 138bb02b52..c58e6e5171 100644 --- a/sysdeps/m68k/crti.S +++ b/sysdeps/m68k/crti.S @@ -30,9 +30,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* crti.S puts a function prologue at the beginning of the .init and .fini sections and defines global symbols for those addresses, so diff --git a/sysdeps/m68k/crtn.S b/sysdeps/m68k/crtn.S index 7e76d775d6..73a213abd2 100644 --- a/sysdeps/m68k/crtn.S +++ b/sysdeps/m68k/crtn.S @@ -30,9 +30,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* crtn.S puts function epilogues in the .init and .fini sections corresponding to the prologues in crti.S. */ diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index 51272125d9..4a1968c4ff 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef dl_machine_h #define dl_machine_h diff --git a/sysdeps/m68k/dl-tls.h b/sysdeps/m68k/dl-tls.h index cebdc2d2be..716003587a 100644 --- a/sysdeps/m68k/dl-tls.h +++ b/sysdeps/m68k/dl-tls.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Type used for the representation of TLS information in the GOT. */ diff --git a/sysdeps/m68k/dl-trampoline.S b/sysdeps/m68k/dl-trampoline.S index bdf3974e8c..fad1864588 100644 --- a/sysdeps/m68k/dl-trampoline.S +++ b/sysdeps/m68k/dl-trampoline.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/m68k/elf/start.S b/sysdeps/m68k/elf/start.S index 8c89b37eca..7c3e99aa7c 100644 --- a/sysdeps/m68k/elf/start.S +++ b/sysdeps/m68k/elf/start.S @@ -30,9 +30,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* This is the canonical entry point, usually the first thing in the text segment. The SVR4/m68k ABI says that when the entry point runs, diff --git a/sysdeps/m68k/ffs.c b/sysdeps/m68k/ffs.c index 2032e8662c..3f45a03eaf 100644 --- a/sysdeps/m68k/ffs.c +++ b/sysdeps/m68k/ffs.c @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define ffsl __something_else #include diff --git a/sysdeps/m68k/fpu/bits/fenv.h b/sysdeps/m68k/fpu/bits/fenv.h index 885728434e..c98365acdc 100644 --- a/sysdeps/m68k/fpu/bits/fenv.h +++ b/sysdeps/m68k/fpu/bits/fenv.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _FENV_H # error "Never use directly; include instead." diff --git a/sysdeps/m68k/fpu/fclrexcpt.c b/sysdeps/m68k/fpu/fclrexcpt.c index bcd7a3fe52..ceda99cb98 100644 --- a/sysdeps/m68k/fpu/fclrexcpt.c +++ b/sysdeps/m68k/fpu/fclrexcpt.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/m68k/fpu/fedisblxcpt.c b/sysdeps/m68k/fpu/fedisblxcpt.c index 416e0ba464..a9a2df6688 100644 --- a/sysdeps/m68k/fpu/fedisblxcpt.c +++ b/sysdeps/m68k/fpu/fedisblxcpt.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/m68k/fpu/feenablxcpt.c b/sysdeps/m68k/fpu/feenablxcpt.c index f963acf01d..e18c79e74b 100644 --- a/sysdeps/m68k/fpu/feenablxcpt.c +++ b/sysdeps/m68k/fpu/feenablxcpt.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/m68k/fpu/fegetenv.c b/sysdeps/m68k/fpu/fegetenv.c index 30f3fa5a5e..84838a2cff 100644 --- a/sysdeps/m68k/fpu/fegetenv.c +++ b/sysdeps/m68k/fpu/fegetenv.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/m68k/fpu/fegetexcept.c b/sysdeps/m68k/fpu/fegetexcept.c index b34b2c1e20..d735884e2a 100644 --- a/sysdeps/m68k/fpu/fegetexcept.c +++ b/sysdeps/m68k/fpu/fegetexcept.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/m68k/fpu/fegetround.c b/sysdeps/m68k/fpu/fegetround.c index 74fc56f745..7d09e0fd37 100644 --- a/sysdeps/m68k/fpu/fegetround.c +++ b/sysdeps/m68k/fpu/fegetround.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/m68k/fpu/feholdexcpt.c b/sysdeps/m68k/fpu/feholdexcpt.c index 8f0d15f617..c58de5b972 100644 --- a/sysdeps/m68k/fpu/feholdexcpt.c +++ b/sysdeps/m68k/fpu/feholdexcpt.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/m68k/fpu/fesetenv.c b/sysdeps/m68k/fpu/fesetenv.c index 931b2e4bd3..1186010adc 100644 --- a/sysdeps/m68k/fpu/fesetenv.c +++ b/sysdeps/m68k/fpu/fesetenv.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/m68k/fpu/fesetround.c b/sysdeps/m68k/fpu/fesetround.c index f9c1da8593..bfc463d07a 100644 --- a/sysdeps/m68k/fpu/fesetround.c +++ b/sysdeps/m68k/fpu/fesetround.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/m68k/fpu/feupdateenv.c b/sysdeps/m68k/fpu/feupdateenv.c index 9c0fb2119d..dbfa3501f3 100644 --- a/sysdeps/m68k/fpu/feupdateenv.c +++ b/sysdeps/m68k/fpu/feupdateenv.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/m68k/fpu/fgetexcptflg.c b/sysdeps/m68k/fpu/fgetexcptflg.c index 764b900c0b..c6f277e490 100644 --- a/sysdeps/m68k/fpu/fgetexcptflg.c +++ b/sysdeps/m68k/fpu/fgetexcptflg.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/m68k/fpu/fsetexcptflg.c b/sysdeps/m68k/fpu/fsetexcptflg.c index 51b086a8f2..dca265f0b8 100644 --- a/sysdeps/m68k/fpu/fsetexcptflg.c +++ b/sysdeps/m68k/fpu/fsetexcptflg.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/m68k/fpu/ftestexcept.c b/sysdeps/m68k/fpu/ftestexcept.c index ce180919bc..535d0eabc7 100644 --- a/sysdeps/m68k/fpu/ftestexcept.c +++ b/sysdeps/m68k/fpu/ftestexcept.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/m68k/fpu_control.h b/sysdeps/m68k/fpu_control.h index cef5625fa7..98eb80ec49 100644 --- a/sysdeps/m68k/fpu_control.h +++ b/sysdeps/m68k/fpu_control.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _FPU_CONTROL_H #define _FPU_CONTROL_H diff --git a/sysdeps/m68k/gccframe.h b/sysdeps/m68k/gccframe.h index 452f53f626..539f0bce66 100644 --- a/sysdeps/m68k/gccframe.h +++ b/sysdeps/m68k/gccframe.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define FIRST_PSEUDO_REGISTER 24 diff --git a/sysdeps/m68k/jmpbuf-unwind.h b/sysdeps/m68k/jmpbuf-unwind.h index 28b9537960..534aa90a25 100644 --- a/sysdeps/m68k/jmpbuf-unwind.h +++ b/sysdeps/m68k/jmpbuf-unwind.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/m68k/ldsodefs.h b/sysdeps/m68k/ldsodefs.h index 2eda4a8579..bc8d540990 100644 --- a/sysdeps/m68k/ldsodefs.h +++ b/sysdeps/m68k/ldsodefs.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef __LDSODEFS_H diff --git a/sysdeps/m68k/libc-tls.c b/sysdeps/m68k/libc-tls.c index b16eac21ef..6abb64d07c 100644 --- a/sysdeps/m68k/libc-tls.c +++ b/sysdeps/m68k/libc-tls.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/m68k/m680x0/add_n.S b/sysdeps/m68k/m680x0/add_n.S index 3011de6afc..22f97ecea0 100644 --- a/sysdeps/m68k/m680x0/add_n.S +++ b/sysdeps/m68k/m680x0/add_n.S @@ -16,9 +16,7 @@ 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 MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -MA 02111-1307, USA. */ +along with the GNU MP Library. If not, see . */ /* INPUT PARAMETERS diff --git a/sysdeps/m68k/m680x0/bits/huge_vall.h b/sysdeps/m68k/m680x0/bits/huge_vall.h index 8b9630c6df..fc7371b5db 100644 --- a/sysdeps/m68k/m680x0/bits/huge_vall.h +++ b/sysdeps/m68k/m680x0/bits/huge_vall.h @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _MATH_H # error "Never use directly; include instead." diff --git a/sysdeps/m68k/m680x0/bits/mathdef.h b/sysdeps/m68k/m680x0/bits/mathdef.h index 65cf8d49f6..a6edcc060e 100644 --- a/sysdeps/m68k/m680x0/bits/mathdef.h +++ b/sysdeps/m68k/m680x0/bits/mathdef.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #if !defined _MATH_H && !defined _COMPLEX_H # error "Never use directly; include instead" diff --git a/sysdeps/m68k/m680x0/fpu/bits/mathinline.h b/sysdeps/m68k/m680x0/fpu/bits/mathinline.h index 31d9efe350..8d4e30a4ad 100644 --- a/sysdeps/m68k/m680x0/fpu/bits/mathinline.h +++ b/sysdeps/m68k/m680x0/fpu/bits/mathinline.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _MATH_H # error "Never use directly; include instead." diff --git a/sysdeps/m68k/m680x0/fpu/e_acos.c b/sysdeps/m68k/m680x0/fpu/e_acos.c index 5afa8bd9c3..c662fe2013 100644 --- a/sysdeps/m68k/m680x0/fpu/e_acos.c +++ b/sysdeps/m68k/m680x0/fpu/e_acos.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include "math_private.h" diff --git a/sysdeps/m68k/m680x0/fpu/e_atan2.c b/sysdeps/m68k/m680x0/fpu/e_atan2.c index ac5982eab5..f84fab321d 100644 --- a/sysdeps/m68k/m680x0/fpu/e_atan2.c +++ b/sysdeps/m68k/m680x0/fpu/e_atan2.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include "math_private.h" diff --git a/sysdeps/m68k/m680x0/fpu/e_fmod.c b/sysdeps/m68k/m680x0/fpu/e_fmod.c index 293d7214d3..dacd1a26b9 100644 --- a/sysdeps/m68k/m680x0/fpu/e_fmod.c +++ b/sysdeps/m68k/m680x0/fpu/e_fmod.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include "math_private.h" diff --git a/sysdeps/m68k/m680x0/fpu/e_pow.c b/sysdeps/m68k/m680x0/fpu/e_pow.c index 1bded0b7b4..cab2012f8e 100644 --- a/sysdeps/m68k/m680x0/fpu/e_pow.c +++ b/sysdeps/m68k/m680x0/fpu/e_pow.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include "math_private.h" diff --git a/sysdeps/m68k/m680x0/fpu/e_scalb.c b/sysdeps/m68k/m680x0/fpu/e_scalb.c index c03fd671aa..694b66e763 100644 --- a/sysdeps/m68k/m680x0/fpu/e_scalb.c +++ b/sysdeps/m68k/m680x0/fpu/e_scalb.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include "math_private.h" diff --git a/sysdeps/m68k/m680x0/fpu/fraiseexcpt.c b/sysdeps/m68k/m680x0/fpu/fraiseexcpt.c index 69f746c9b2..4fe384ebe3 100644 --- a/sysdeps/m68k/m680x0/fpu/fraiseexcpt.c +++ b/sysdeps/m68k/m680x0/fpu/fraiseexcpt.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/m68k/m680x0/fpu/mathimpl.h b/sysdeps/m68k/m680x0/fpu/mathimpl.h index bbcaf84859..5acc203aa5 100644 --- a/sysdeps/m68k/m680x0/fpu/mathimpl.h +++ b/sysdeps/m68k/m680x0/fpu/mathimpl.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* This file contains the definitions of the inline math functions that are only used internally inside libm, not visible to the user. */ diff --git a/sysdeps/m68k/m680x0/fpu/s_atan.c b/sysdeps/m68k/m680x0/fpu/s_atan.c index 8cca490d2a..a7d8a296b4 100644 --- a/sysdeps/m68k/m680x0/fpu/s_atan.c +++ b/sysdeps/m68k/m680x0/fpu/s_atan.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/m68k/m680x0/fpu/s_ccosh.c b/sysdeps/m68k/m680x0/fpu/s_ccosh.c index 7f1c8ab468..b8360853fd 100644 --- a/sysdeps/m68k/m680x0/fpu/s_ccosh.c +++ b/sysdeps/m68k/m680x0/fpu/s_ccosh.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/m68k/m680x0/fpu/s_cexp.c b/sysdeps/m68k/m680x0/fpu/s_cexp.c index 4babf12685..62cddbdad9 100644 --- a/sysdeps/m68k/m680x0/fpu/s_cexp.c +++ b/sysdeps/m68k/m680x0/fpu/s_cexp.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/m68k/m680x0/fpu/s_csin.c b/sysdeps/m68k/m680x0/fpu/s_csin.c index 7c590e4af6..dc468d40e0 100644 --- a/sysdeps/m68k/m680x0/fpu/s_csin.c +++ b/sysdeps/m68k/m680x0/fpu/s_csin.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/m68k/m680x0/fpu/s_csinh.c b/sysdeps/m68k/m680x0/fpu/s_csinh.c index dafb82af1a..29156586e6 100644 --- a/sysdeps/m68k/m680x0/fpu/s_csinh.c +++ b/sysdeps/m68k/m680x0/fpu/s_csinh.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/m68k/m680x0/fpu/s_expm1.c b/sysdeps/m68k/m680x0/fpu/s_expm1.c index 3db6f2d164..6dac1cc1a7 100644 --- a/sysdeps/m68k/m680x0/fpu/s_expm1.c +++ b/sysdeps/m68k/m680x0/fpu/s_expm1.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/m68k/m680x0/fpu/s_fpclassifyl.c b/sysdeps/m68k/m680x0/fpu/s_fpclassifyl.c index a8cb099927..23bd0b73a1 100644 --- a/sysdeps/m68k/m680x0/fpu/s_fpclassifyl.c +++ b/sysdeps/m68k/m680x0/fpu/s_fpclassifyl.c @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/m68k/m680x0/fpu/s_frexp.c b/sysdeps/m68k/m680x0/fpu/s_frexp.c index b06141283c..b4493190fc 100644 --- a/sysdeps/m68k/m680x0/fpu/s_frexp.c +++ b/sysdeps/m68k/m680x0/fpu/s_frexp.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/m68k/m680x0/fpu/s_frexpl.c b/sysdeps/m68k/m680x0/fpu/s_frexpl.c index f9a5315265..48e7d287bc 100644 --- a/sysdeps/m68k/m680x0/fpu/s_frexpl.c +++ b/sysdeps/m68k/m680x0/fpu/s_frexpl.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/m68k/m680x0/fpu/s_ilogb.c b/sysdeps/m68k/m680x0/fpu/s_ilogb.c index ee1e3975f0..ab4438aea2 100644 --- a/sysdeps/m68k/m680x0/fpu/s_ilogb.c +++ b/sysdeps/m68k/m680x0/fpu/s_ilogb.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include "mathimpl.h" diff --git a/sysdeps/m68k/m680x0/fpu/s_isinf.c b/sysdeps/m68k/m680x0/fpu/s_isinf.c index 5fb43ea2a0..ff4d3b2b16 100644 --- a/sysdeps/m68k/m680x0/fpu/s_isinf.c +++ b/sysdeps/m68k/m680x0/fpu/s_isinf.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/m68k/m680x0/fpu/s_llrint.c b/sysdeps/m68k/m680x0/fpu/s_llrint.c index 8f2442982a..3166b9fadb 100644 --- a/sysdeps/m68k/m680x0/fpu/s_llrint.c +++ b/sysdeps/m68k/m680x0/fpu/s_llrint.c @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include "math_private.h" diff --git a/sysdeps/m68k/m680x0/fpu/s_llrintf.c b/sysdeps/m68k/m680x0/fpu/s_llrintf.c index bd573b2579..7460f17c80 100644 --- a/sysdeps/m68k/m680x0/fpu/s_llrintf.c +++ b/sysdeps/m68k/m680x0/fpu/s_llrintf.c @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include "math_private.h" diff --git a/sysdeps/m68k/m680x0/fpu/s_llrintl.c b/sysdeps/m68k/m680x0/fpu/s_llrintl.c index d749f3515f..8b7762600d 100644 --- a/sysdeps/m68k/m680x0/fpu/s_llrintl.c +++ b/sysdeps/m68k/m680x0/fpu/s_llrintl.c @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include "math_private.h" diff --git a/sysdeps/m68k/m680x0/fpu/s_lrint.c b/sysdeps/m68k/m680x0/fpu/s_lrint.c index 0a23f29eeb..da2ea53bba 100644 --- a/sysdeps/m68k/m680x0/fpu/s_lrint.c +++ b/sysdeps/m68k/m680x0/fpu/s_lrint.c @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/m68k/m680x0/fpu/s_modf.c b/sysdeps/m68k/m680x0/fpu/s_modf.c index 2f5a83dea7..95bc0ef212 100644 --- a/sysdeps/m68k/m680x0/fpu/s_modf.c +++ b/sysdeps/m68k/m680x0/fpu/s_modf.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include "mathimpl.h" diff --git a/sysdeps/m68k/m680x0/fpu/s_remquo.c b/sysdeps/m68k/m680x0/fpu/s_remquo.c index 5b65f85fbc..1395f7e013 100644 --- a/sysdeps/m68k/m680x0/fpu/s_remquo.c +++ b/sysdeps/m68k/m680x0/fpu/s_remquo.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/m68k/m680x0/fpu/s_scalbn.c b/sysdeps/m68k/m680x0/fpu/s_scalbn.c index d76d94d946..796aeb2b19 100644 --- a/sysdeps/m68k/m680x0/fpu/s_scalbn.c +++ b/sysdeps/m68k/m680x0/fpu/s_scalbn.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define scalbln __no_scalbln_decl #define scalblnf __no_scalblnf_decl diff --git a/sysdeps/m68k/m680x0/fpu/s_sin.c b/sysdeps/m68k/m680x0/fpu/s_sin.c index e088b584b7..4f9b659462 100644 --- a/sysdeps/m68k/m680x0/fpu/s_sin.c +++ b/sysdeps/m68k/m680x0/fpu/s_sin.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/m68k/m680x0/fpu/s_sincos.c b/sysdeps/m68k/m680x0/fpu/s_sincos.c index 5df4a5a1c0..5e10db231e 100644 --- a/sysdeps/m68k/m680x0/fpu/s_sincos.c +++ b/sysdeps/m68k/m680x0/fpu/s_sincos.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/m68k/m680x0/lshift.S b/sysdeps/m68k/m680x0/lshift.S index 047241ff5a..d0d4da7d41 100644 --- a/sysdeps/m68k/m680x0/lshift.S +++ b/sysdeps/m68k/m680x0/lshift.S @@ -15,9 +15,7 @@ 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 MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -MA 02111-1307, USA. */ +along with the GNU MP Library. If not, see . */ /* INPUT PARAMETERS diff --git a/sysdeps/m68k/m680x0/m68020/addmul_1.S b/sysdeps/m68k/m680x0/m68020/addmul_1.S index 478bff3dce..7b6d03db63 100644 --- a/sysdeps/m68k/m680x0/m68020/addmul_1.S +++ b/sysdeps/m68k/m680x0/m68020/addmul_1.S @@ -16,9 +16,7 @@ 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 MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -MA 02111-1307, USA. */ +along with the GNU MP Library. If not, see . */ /* INPUT PARAMETERS diff --git a/sysdeps/m68k/m680x0/m68020/bits/atomic.h b/sysdeps/m68k/m680x0/m68020/bits/atomic.h index 6b6db71465..7ae5fb96dc 100644 --- a/sysdeps/m68k/m680x0/m68020/bits/atomic.h +++ b/sysdeps/m68k/m680x0/m68020/bits/atomic.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/m68k/m680x0/m68020/bits/string.h b/sysdeps/m68k/m680x0/m68020/bits/string.h index 84be224b73..cb68c78b2e 100644 --- a/sysdeps/m68k/m680x0/m68020/bits/string.h +++ b/sysdeps/m68k/m680x0/m68020/bits/string.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _STRING_H # error "Never use directly; include instead." diff --git a/sysdeps/m68k/m680x0/m68020/mul_1.S b/sysdeps/m68k/m680x0/m68020/mul_1.S index 6f68500210..e14ae51d3f 100644 --- a/sysdeps/m68k/m680x0/m68020/mul_1.S +++ b/sysdeps/m68k/m680x0/m68020/mul_1.S @@ -16,9 +16,7 @@ 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 MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -MA 02111-1307, USA. */ +along with the GNU MP Library. If not, see . */ /* INPUT PARAMETERS diff --git a/sysdeps/m68k/m680x0/m68020/submul_1.S b/sysdeps/m68k/m680x0/m68020/submul_1.S index bc1fd3aa63..c42845daa7 100644 --- a/sysdeps/m68k/m680x0/m68020/submul_1.S +++ b/sysdeps/m68k/m680x0/m68020/submul_1.S @@ -16,9 +16,7 @@ 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 MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -MA 02111-1307, USA. */ +along with the GNU MP Library. If not, see . */ /* INPUT PARAMETERS diff --git a/sysdeps/m68k/m680x0/rshift.S b/sysdeps/m68k/m680x0/rshift.S index c6c720ae89..f5f2f3d69a 100644 --- a/sysdeps/m68k/m680x0/rshift.S +++ b/sysdeps/m68k/m680x0/rshift.S @@ -15,9 +15,7 @@ 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 MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -MA 02111-1307, USA. */ +along with the GNU MP Library. If not, see . */ /* INPUT PARAMETERS diff --git a/sysdeps/m68k/m680x0/sub_n.S b/sysdeps/m68k/m680x0/sub_n.S index ab42743fee..69554a3e84 100644 --- a/sysdeps/m68k/m680x0/sub_n.S +++ b/sysdeps/m68k/m680x0/sub_n.S @@ -16,9 +16,7 @@ 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 MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -MA 02111-1307, USA. */ +along with the GNU MP Library. If not, see . */ /* INPUT PARAMETERS diff --git a/sysdeps/m68k/m680x0/sysdep.h b/sysdeps/m68k/m680x0/sysdep.h index ca90e8c03e..b382264b64 100644 --- a/sysdeps/m68k/m680x0/sysdep.h +++ b/sysdeps/m68k/m680x0/sysdep.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/m68k/memchr.S b/sysdeps/m68k/memchr.S index e5c767759b..9e7aff816d 100644 --- a/sysdeps/m68k/memchr.S +++ b/sysdeps/m68k/memchr.S @@ -16,9 +16,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include "asm-syntax.h" diff --git a/sysdeps/m68k/memcopy.h b/sysdeps/m68k/memcopy.h index 0951eeaf7a..7d2604709d 100644 --- a/sysdeps/m68k/memcopy.h +++ b/sysdeps/m68k/memcopy.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/m68k/memusage.h b/sysdeps/m68k/memusage.h index bb22c0acc0..0d00b6e2f1 100644 --- a/sysdeps/m68k/memusage.h +++ b/sysdeps/m68k/memusage.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define GETSP() ({ register uintptr_t stack_ptr asm ("%sp"); stack_ptr; }) diff --git a/sysdeps/m68k/nptl/Makefile b/sysdeps/m68k/nptl/Makefile index f36fc8fa3f..1a476794c2 100644 --- a/sysdeps/m68k/nptl/Makefile +++ b/sysdeps/m68k/nptl/Makefile @@ -13,9 +13,8 @@ # 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. +# License along with the GNU C Library. If not, see +# . ifeq ($(subdir),csu) gen-as-const-headers += tcb-offsets.sym diff --git a/sysdeps/m68k/nptl/pthread_spin_lock.c b/sysdeps/m68k/nptl/pthread_spin_lock.c index 1cc16c8b93..90a8262b24 100644 --- a/sysdeps/m68k/nptl/pthread_spin_lock.c +++ b/sysdeps/m68k/nptl/pthread_spin_lock.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include "pthreadP.h" diff --git a/sysdeps/m68k/nptl/pthread_spin_trylock.c b/sysdeps/m68k/nptl/pthread_spin_trylock.c index 831bffb603..f4b0c0d0a3 100644 --- a/sysdeps/m68k/nptl/pthread_spin_trylock.c +++ b/sysdeps/m68k/nptl/pthread_spin_trylock.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/m68k/nptl/pthreaddef.h b/sysdeps/m68k/nptl/pthreaddef.h index 0a549070f2..dfbc7573a7 100644 --- a/sysdeps/m68k/nptl/pthreaddef.h +++ b/sysdeps/m68k/nptl/pthreaddef.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Default stack size. */ #define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024) diff --git a/sysdeps/m68k/nptl/tls.h b/sysdeps/m68k/nptl/tls.h index 3c5b165d8f..8b0909237b 100644 --- a/sysdeps/m68k/nptl/tls.h +++ b/sysdeps/m68k/nptl/tls.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _TLS_H #define _TLS_H 1 diff --git a/sysdeps/m68k/rawmemchr.S b/sysdeps/m68k/rawmemchr.S index dd446cf798..ebf1c4b298 100644 --- a/sysdeps/m68k/rawmemchr.S +++ b/sysdeps/m68k/rawmemchr.S @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include "asm-syntax.h" diff --git a/sysdeps/m68k/setjmp.c b/sysdeps/m68k/setjmp.c index 2ebe97ee60..33f21b9bed 100644 --- a/sysdeps/m68k/setjmp.c +++ b/sysdeps/m68k/setjmp.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/m68k/stackinfo.h b/sysdeps/m68k/stackinfo.h index bcfdb12857..657b8a1f35 100644 --- a/sysdeps/m68k/stackinfo.h +++ b/sysdeps/m68k/stackinfo.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* This file contains a bit of information about the stack allocation of the processor. */ diff --git a/sysdeps/m68k/strchr.S b/sysdeps/m68k/strchr.S index 6c6a08fe2a..98e9f24545 100644 --- a/sysdeps/m68k/strchr.S +++ b/sysdeps/m68k/strchr.S @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include "asm-syntax.h" diff --git a/sysdeps/m68k/strchrnul.S b/sysdeps/m68k/strchrnul.S index e31cb0c4d3..085583c3be 100644 --- a/sysdeps/m68k/strchrnul.S +++ b/sysdeps/m68k/strchrnul.S @@ -16,9 +16,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include "asm-syntax.h" diff --git a/sysdeps/m68k/sys/ucontext.h b/sysdeps/m68k/sys/ucontext.h index 857ed6b42a..03f26f6fe9 100644 --- a/sysdeps/m68k/sys/ucontext.h +++ b/sysdeps/m68k/sys/ucontext.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* System V/m68k ABI compliant context switching support. */ diff --git a/sysdeps/m68k/sysdep.h b/sysdeps/m68k/sysdep.h index f36b584ee7..980cae5b84 100644 --- a/sysdeps/m68k/sysdep.h +++ b/sysdeps/m68k/sysdep.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/m68k/tls-macros.h b/sysdeps/m68k/tls-macros.h index d03d7b958d..3ad4af725e 100644 --- a/sysdeps/m68k/tls-macros.h +++ b/sysdeps/m68k/tls-macros.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define TLS_GD(x) \ ({ \ diff --git a/sysdeps/m68k/tst-audit.h b/sysdeps/m68k/tst-audit.h index 5254ab3b12..dc0a09dd8c 100644 --- a/sysdeps/m68k/tst-audit.h +++ b/sysdeps/m68k/tst-audit.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define pltenter la_m68k_gnu_pltenter #define pltexit la_m68k_gnu_pltexit diff --git a/sysdeps/m68k/wcpcpy.c b/sysdeps/m68k/wcpcpy.c index c838af1fd5..c0e841da2f 100644 --- a/sysdeps/m68k/wcpcpy.c +++ b/sysdeps/m68k/wcpcpy.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* The generic version of this file assumes that __alignof__(wchar_t) == sizeof (wchar_t). We therefore use this port-specific implementation diff --git a/sysdeps/m68k/wcpcpy_chk.c b/sysdeps/m68k/wcpcpy_chk.c index 525c1d5baa..b0ddf80bf4 100644 --- a/sysdeps/m68k/wcpcpy_chk.c +++ b/sysdeps/m68k/wcpcpy_chk.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* The generic version of this file assumes that __alignof__(wchar_t) == sizeof (wchar_t). We therefore use this port-specific implementation diff --git a/sysdeps/mips/__longjmp.c b/sysdeps/mips/__longjmp.c index 2a917719fd..3a098242c3 100644 --- a/sysdeps/mips/__longjmp.c +++ b/sysdeps/mips/__longjmp.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/mips/add_n.S b/sysdeps/mips/add_n.S index c82871f701..99266f11d1 100644 --- a/sysdeps/mips/add_n.S +++ b/sysdeps/mips/add_n.S @@ -16,9 +16,8 @@ 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 MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -MA 02111-1307, USA. */ +along with the GNU MP Library. If not, see +. */ #include diff --git a/sysdeps/mips/addmul_1.S b/sysdeps/mips/addmul_1.S index 3e1fc09d10..575f080d59 100644 --- a/sysdeps/mips/addmul_1.S +++ b/sysdeps/mips/addmul_1.S @@ -16,9 +16,8 @@ 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 MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -MA 02111-1307, USA. */ +along with the GNU MP Library. If not, see +. */ #include diff --git a/sysdeps/mips/bits/atomic.h b/sysdeps/mips/bits/atomic.h index 2bd723d6d4..4d51d7fa2f 100644 --- a/sysdeps/mips/bits/atomic.h +++ b/sysdeps/mips/bits/atomic.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _MIPS_BITS_ATOMIC_H #define _MIPS_BITS_ATOMIC_H 1 diff --git a/sysdeps/mips/bits/dlfcn.h b/sysdeps/mips/bits/dlfcn.h index a5b5bf53ff..a1956b2a12 100644 --- a/sysdeps/mips/bits/dlfcn.h +++ b/sysdeps/mips/bits/dlfcn.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _DLFCN_H # error "Never use directly; include instead." diff --git a/sysdeps/mips/bits/fenv.h b/sysdeps/mips/bits/fenv.h index 8efb890c59..bc87b15ec2 100644 --- a/sysdeps/mips/bits/fenv.h +++ b/sysdeps/mips/bits/fenv.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _FENV_H # error "Never use directly; include instead." diff --git a/sysdeps/mips/bits/ipctypes.h b/sysdeps/mips/bits/ipctypes.h index 0956e7d58c..3f118e4f13 100644 --- a/sysdeps/mips/bits/ipctypes.h +++ b/sysdeps/mips/bits/ipctypes.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* * Never include directly. diff --git a/sysdeps/mips/bits/link.h b/sysdeps/mips/bits/link.h index 85e69cdfdb..1e1110a599 100644 --- a/sysdeps/mips/bits/link.h +++ b/sysdeps/mips/bits/link.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _LINK_H # error "Never include directly; use instead." diff --git a/sysdeps/mips/bits/mathdef.h b/sysdeps/mips/bits/mathdef.h index 8ecce797d6..fe99994249 100644 --- a/sysdeps/mips/bits/mathdef.h +++ b/sysdeps/mips/bits/mathdef.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #if !defined _MATH_H && !defined _COMPLEX_H # error "Never use directly; include instead" diff --git a/sysdeps/mips/bits/nan.h b/sysdeps/mips/bits/nan.h index baaaa551fb..3e749bc774 100644 --- a/sysdeps/mips/bits/nan.h +++ b/sysdeps/mips/bits/nan.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _MATH_H # error "Never use directly; include instead." diff --git a/sysdeps/mips/bits/setjmp.h b/sysdeps/mips/bits/setjmp.h index d3ced9827a..df6fd7b2d7 100644 --- a/sysdeps/mips/bits/setjmp.h +++ b/sysdeps/mips/bits/setjmp.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _MIPS_BITS_SETJMP_H #define _MIPS_BITS_SETJMP_H 1 diff --git a/sysdeps/mips/bits/wordsize.h b/sysdeps/mips/bits/wordsize.h index 06967e51a1..c738d28e92 100644 --- a/sysdeps/mips/bits/wordsize.h +++ b/sysdeps/mips/bits/wordsize.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define __WORDSIZE _MIPS_SZPTR #if _MIPS_SIM == _ABI64 diff --git a/sysdeps/mips/bsd-_setjmp.S b/sysdeps/mips/bsd-_setjmp.S index 5e3ad50305..91724b9f0f 100644 --- a/sysdeps/mips/bsd-_setjmp.S +++ b/sysdeps/mips/bsd-_setjmp.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* This just does a tail-call to `__sigsetjmp (ARG, 0)'. We cannot do it in C because it must be a tail-call, so frame-unwinding diff --git a/sysdeps/mips/bsd-setjmp.S b/sysdeps/mips/bsd-setjmp.S index 0aea011328..39f570088f 100644 --- a/sysdeps/mips/bsd-setjmp.S +++ b/sysdeps/mips/bsd-setjmp.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* This just does a tail-call to `__sigsetjmp (ARG, 1)'. We cannot do it in C because it must be a tail-call, so frame-unwinding diff --git a/sysdeps/mips/dl-dtprocnum.h b/sysdeps/mips/dl-dtprocnum.h index dfd03ba317..4947178580 100644 --- a/sysdeps/mips/dl-dtprocnum.h +++ b/sysdeps/mips/dl-dtprocnum.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Number of extra dynamic section entries for this architecture. By default there are none. */ diff --git a/sysdeps/mips/dl-lookup.c b/sysdeps/mips/dl-lookup.c index fed3b6c666..c39a2b06de 100644 --- a/sysdeps/mips/dl-lookup.c +++ b/sysdeps/mips/dl-lookup.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 6f2ed7ab20..bc0378566c 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* FIXME: Profiling of shared libraries is not implemented yet. */ #ifndef dl_machine_h diff --git a/sysdeps/mips/dl-procinfo.c b/sysdeps/mips/dl-procinfo.c index 3e8a4fb591..64c585c8e9 100644 --- a/sysdeps/mips/dl-procinfo.c +++ b/sysdeps/mips/dl-procinfo.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* This information must be kept in sync with the _DL_PLATFORM_COUNT definitions in procinfo.h. diff --git a/sysdeps/mips/dl-procinfo.h b/sysdeps/mips/dl-procinfo.h index 3493d81dee..d42aea7141 100644 --- a/sysdeps/mips/dl-procinfo.h +++ b/sysdeps/mips/dl-procinfo.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _DL_PROCINFO_H #define _DL_PROCINFO_H 1 diff --git a/sysdeps/mips/dl-tls.h b/sysdeps/mips/dl-tls.h index 75facb0e3a..749826dadb 100644 --- a/sysdeps/mips/dl-tls.h +++ b/sysdeps/mips/dl-tls.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Type used for the representation of TLS information in the GOT. */ diff --git a/sysdeps/mips/dl-trampoline.c b/sysdeps/mips/dl-trampoline.c index c4367f7a3d..3454eb306f 100644 --- a/sysdeps/mips/dl-trampoline.c +++ b/sysdeps/mips/dl-trampoline.c @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* FIXME: Profiling of shared libraries is not implemented yet. */ diff --git a/sysdeps/mips/elf/start.S b/sysdeps/mips/elf/start.S index d9cc3b7ee2..fa0cfe14e0 100644 --- a/sysdeps/mips/elf/start.S +++ b/sysdeps/mips/elf/start.S @@ -31,9 +31,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define __ASSEMBLY__ 1 #include diff --git a/sysdeps/mips/fpregdef.h b/sysdeps/mips/fpregdef.h index 6f76d1183d..eb5514409f 100644 --- a/sysdeps/mips/fpregdef.h +++ b/sysdeps/mips/fpregdef.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _FPREGDEF_H #define _FPREGDEF_H diff --git a/sysdeps/mips/fpu/e_sqrt.c b/sysdeps/mips/fpu/e_sqrt.c index d1a8afc3c5..f597509486 100644 --- a/sysdeps/mips/fpu/e_sqrt.c +++ b/sysdeps/mips/fpu/e_sqrt.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/mips/fpu/e_sqrtf.c b/sysdeps/mips/fpu/e_sqrtf.c index da58b46f80..7aaf0d1e36 100644 --- a/sysdeps/mips/fpu/e_sqrtf.c +++ b/sysdeps/mips/fpu/e_sqrtf.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/mips/fpu/fclrexcpt.c b/sysdeps/mips/fpu/fclrexcpt.c index f773312b34..f97d892605 100644 --- a/sysdeps/mips/fpu/fclrexcpt.c +++ b/sysdeps/mips/fpu/fclrexcpt.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/mips/fpu/fedisblxcpt.c b/sysdeps/mips/fpu/fedisblxcpt.c index 62e1a7130a..98a01705d7 100644 --- a/sysdeps/mips/fpu/fedisblxcpt.c +++ b/sysdeps/mips/fpu/fedisblxcpt.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/mips/fpu/feenablxcpt.c b/sysdeps/mips/fpu/feenablxcpt.c index 4c285811db..8d81d6a432 100644 --- a/sysdeps/mips/fpu/feenablxcpt.c +++ b/sysdeps/mips/fpu/feenablxcpt.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/mips/fpu/fegetenv.c b/sysdeps/mips/fpu/fegetenv.c index da5d597746..33838fba68 100644 --- a/sysdeps/mips/fpu/fegetenv.c +++ b/sysdeps/mips/fpu/fegetenv.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/mips/fpu/fegetexcept.c b/sysdeps/mips/fpu/fegetexcept.c index 14b1241294..076cb5056e 100644 --- a/sysdeps/mips/fpu/fegetexcept.c +++ b/sysdeps/mips/fpu/fegetexcept.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/mips/fpu/fegetround.c b/sysdeps/mips/fpu/fegetround.c index efb1ba0dcc..5033887fa1 100644 --- a/sysdeps/mips/fpu/fegetround.c +++ b/sysdeps/mips/fpu/fegetround.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/mips/fpu/feholdexcpt.c b/sysdeps/mips/fpu/feholdexcpt.c index 02ddc1b034..695c62b4ba 100644 --- a/sysdeps/mips/fpu/feholdexcpt.c +++ b/sysdeps/mips/fpu/feholdexcpt.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/mips/fpu/fenv_libc.h b/sysdeps/mips/fpu/fenv_libc.h index d971d2c711..f4e8b4a72c 100644 --- a/sysdeps/mips/fpu/fenv_libc.h +++ b/sysdeps/mips/fpu/fenv_libc.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _FENV_LIBC_H #define _FENV_LIBC_H 1 diff --git a/sysdeps/mips/fpu/fesetenv.c b/sysdeps/mips/fpu/fesetenv.c index b71a877ae3..66c7f2d0fa 100644 --- a/sysdeps/mips/fpu/fesetenv.c +++ b/sysdeps/mips/fpu/fesetenv.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/mips/fpu/fesetround.c b/sysdeps/mips/fpu/fesetround.c index c28bd603c0..4ca3aee04f 100644 --- a/sysdeps/mips/fpu/fesetround.c +++ b/sysdeps/mips/fpu/fesetround.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/mips/fpu/feupdateenv.c b/sysdeps/mips/fpu/feupdateenv.c index 5051562621..c028f04f2c 100644 --- a/sysdeps/mips/fpu/feupdateenv.c +++ b/sysdeps/mips/fpu/feupdateenv.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/mips/fpu/fgetexcptflg.c b/sysdeps/mips/fpu/fgetexcptflg.c index 27875b376e..a9a8b80ae6 100644 --- a/sysdeps/mips/fpu/fgetexcptflg.c +++ b/sysdeps/mips/fpu/fgetexcptflg.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/mips/fpu/fraiseexcpt.c b/sysdeps/mips/fpu/fraiseexcpt.c index 3e2ebe0fe7..61de1e250b 100644 --- a/sysdeps/mips/fpu/fraiseexcpt.c +++ b/sysdeps/mips/fpu/fraiseexcpt.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/mips/fpu/fsetexcptflg.c b/sysdeps/mips/fpu/fsetexcptflg.c index b1293753cb..2118db0e5f 100644 --- a/sysdeps/mips/fpu/fsetexcptflg.c +++ b/sysdeps/mips/fpu/fsetexcptflg.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/mips/fpu/ftestexcept.c b/sysdeps/mips/fpu/ftestexcept.c index 385554c862..ff1e07865e 100644 --- a/sysdeps/mips/fpu/ftestexcept.c +++ b/sysdeps/mips/fpu/ftestexcept.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/mips/fpu_control.h b/sysdeps/mips/fpu_control.h index eb71928a5a..e9c859a4e3 100644 --- a/sysdeps/mips/fpu_control.h +++ b/sysdeps/mips/fpu_control.h @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _FPU_CONTROL_H #define _FPU_CONTROL_H diff --git a/sysdeps/mips/gccframe.h b/sysdeps/mips/gccframe.h index ec9311caca..ad5d01f870 100644 --- a/sysdeps/mips/gccframe.h +++ b/sysdeps/mips/gccframe.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define FIRST_PSEUDO_REGISTER 76 diff --git a/sysdeps/mips/ieee754.h b/sysdeps/mips/ieee754.h index 912e088f7f..87dbf658eb 100644 --- a/sysdeps/mips/ieee754.h +++ b/sysdeps/mips/ieee754.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _IEEE754_H diff --git a/sysdeps/mips/init-first.c b/sysdeps/mips/init-first.c index 1390f99705..6a5e7caf09 100644 --- a/sysdeps/mips/init-first.c +++ b/sysdeps/mips/init-first.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/mips/jmpbuf-unwind.h b/sysdeps/mips/jmpbuf-unwind.h index bfa1a64537..31c9c8de7d 100644 --- a/sysdeps/mips/jmpbuf-unwind.h +++ b/sysdeps/mips/jmpbuf-unwind.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/mips/ldsodefs.h b/sysdeps/mips/ldsodefs.h index 5f85eef6e4..ab4e9ef1ec 100644 --- a/sysdeps/mips/ldsodefs.h +++ b/sysdeps/mips/ldsodefs.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _MIPS_LDSODEFS_H #define _MIPS_LDSODEFS_H 1 diff --git a/sysdeps/mips/libc-tls.c b/sysdeps/mips/libc-tls.c index 2c7805625b..b470acc4a9 100644 --- a/sysdeps/mips/libc-tls.c +++ b/sysdeps/mips/libc-tls.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/mips/lshift.S b/sysdeps/mips/lshift.S index 0217bfc586..9457c8d431 100644 --- a/sysdeps/mips/lshift.S +++ b/sysdeps/mips/lshift.S @@ -15,9 +15,8 @@ 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 MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -MA 02111-1307, USA. */ +along with the GNU MP Library. If not, see +. */ #include diff --git a/sysdeps/mips/machine-gmon.h b/sysdeps/mips/machine-gmon.h index 7a089fa595..6e95f2de20 100644 --- a/sysdeps/mips/machine-gmon.h +++ b/sysdeps/mips/machine-gmon.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/mips/memcpy.S b/sysdeps/mips/memcpy.S index 2049d05829..ec1b98a721 100644 --- a/sysdeps/mips/memcpy.S +++ b/sysdeps/mips/memcpy.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/mips/memset.S b/sysdeps/mips/memset.S index 694ee8f1dc..1df79815c0 100644 --- a/sysdeps/mips/memset.S +++ b/sysdeps/mips/memset.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/mips/memusage.h b/sysdeps/mips/memusage.h index dc1cc9ca14..d29d74f837 100644 --- a/sysdeps/mips/memusage.h +++ b/sysdeps/mips/memusage.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define GETSP() ({ register uintptr_t stack_ptr asm ("$29"); stack_ptr; }) diff --git a/sysdeps/mips/mips32/crti.S b/sysdeps/mips/mips32/crti.S index 1c7e95d4dd..dffd6b8e7d 100644 --- a/sysdeps/mips/mips32/crti.S +++ b/sysdeps/mips/mips32/crti.S @@ -30,9 +30,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* crti.S puts a function prologue at the beginning of the .init and .fini sections and defines global symbols for those addresses, so diff --git a/sysdeps/mips/mips32/crtn.S b/sysdeps/mips/mips32/crtn.S index 9fb564d46a..04e49b5f3b 100644 --- a/sysdeps/mips/mips32/crtn.S +++ b/sysdeps/mips/mips32/crtn.S @@ -30,9 +30,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* crtn.S puts function epilogues in the .init and .fini sections corresponding to the prologues in crti.S. */ diff --git a/sysdeps/mips/mips64/__longjmp.c b/sysdeps/mips/mips64/__longjmp.c index 99aac01a99..a6f31cb5ad 100644 --- a/sysdeps/mips/mips64/__longjmp.c +++ b/sysdeps/mips/mips64/__longjmp.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/mips/mips64/add_n.S b/sysdeps/mips/mips64/add_n.S index 072f4f0b73..715c2d2dbd 100644 --- a/sysdeps/mips/mips64/add_n.S +++ b/sysdeps/mips/mips64/add_n.S @@ -16,9 +16,8 @@ * License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with the GNU MP Library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. + * along with the GNU MP Library. If not, see + * . */ #include diff --git a/sysdeps/mips/mips64/addmul_1.S b/sysdeps/mips/mips64/addmul_1.S index f5ecd83702..f62b4a1cc4 100644 --- a/sysdeps/mips/mips64/addmul_1.S +++ b/sysdeps/mips/mips64/addmul_1.S @@ -16,9 +16,7 @@ * License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with the GNU MP Library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. + * along with the GNU MP Library. If not, see . */ #include diff --git a/sysdeps/mips/mips64/bsd-_setjmp.S b/sysdeps/mips/mips64/bsd-_setjmp.S index 7620cf391f..4debc4f895 100644 --- a/sysdeps/mips/mips64/bsd-_setjmp.S +++ b/sysdeps/mips/mips64/bsd-_setjmp.S @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* This just does a tail-call to `__sigsetjmp (ARG, 0)'. We cannot do it in C because it must be a tail-call, so frame-unwinding diff --git a/sysdeps/mips/mips64/bsd-setjmp.S b/sysdeps/mips/mips64/bsd-setjmp.S index 2a1fd9ce71..972dfcaba5 100644 --- a/sysdeps/mips/mips64/bsd-setjmp.S +++ b/sysdeps/mips/mips64/bsd-setjmp.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* This just does a tail-call to `__sigsetjmp (ARG, 1)'. We cannot do it in C because it must be a tail-call, so frame-unwinding diff --git a/sysdeps/mips/mips64/lshift.S b/sysdeps/mips/mips64/lshift.S index 20f9e3da19..52783f8cd0 100644 --- a/sysdeps/mips/mips64/lshift.S +++ b/sysdeps/mips/mips64/lshift.S @@ -15,9 +15,8 @@ * License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with the GNU MP Library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. + * along with the GNU MP Library. If not, see + * . */ #include diff --git a/sysdeps/mips/mips64/memcpy.S b/sysdeps/mips/mips64/memcpy.S index eab9463f86..ae819f6d4f 100644 --- a/sysdeps/mips/mips64/memcpy.S +++ b/sysdeps/mips/mips64/memcpy.S @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/mips/mips64/memset.S b/sysdeps/mips/mips64/memset.S index b50aaba816..9800ed3b91 100644 --- a/sysdeps/mips/mips64/memset.S +++ b/sysdeps/mips/mips64/memset.S @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/mips/mips64/mul_1.S b/sysdeps/mips/mips64/mul_1.S index c711783001..8539a87b7d 100644 --- a/sysdeps/mips/mips64/mul_1.S +++ b/sysdeps/mips/mips64/mul_1.S @@ -17,9 +17,8 @@ * License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with the GNU MP Library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. + * along with the GNU MP Library. If not, see + * . */ #include diff --git a/sysdeps/mips/mips64/n32/crti.S b/sysdeps/mips/mips64/n32/crti.S index 92b00c20e4..6eb53f15e9 100644 --- a/sysdeps/mips/mips64/n32/crti.S +++ b/sysdeps/mips/mips64/n32/crti.S @@ -30,9 +30,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* crti.S puts a function prologue at the beginning of the .init and .fini sections and defines global symbols for those addresses, so diff --git a/sysdeps/mips/mips64/n32/crtn.S b/sysdeps/mips/mips64/n32/crtn.S index 376582a696..cde92b26d1 100644 --- a/sysdeps/mips/mips64/n32/crtn.S +++ b/sysdeps/mips/mips64/n32/crtn.S @@ -30,9 +30,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* crtn.S puts function epilogues in the .init and .fini sections corresponding to the prologues in crti.S. */ diff --git a/sysdeps/mips/mips64/n64/crti.S b/sysdeps/mips/mips64/n64/crti.S index 42b26dc2b5..d263594b73 100644 --- a/sysdeps/mips/mips64/n64/crti.S +++ b/sysdeps/mips/mips64/n64/crti.S @@ -30,9 +30,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* crti.S puts a function prologue at the beginning of the .init and .fini sections and defines global symbols for those addresses, so diff --git a/sysdeps/mips/mips64/n64/crtn.S b/sysdeps/mips/mips64/n64/crtn.S index 3f901c8c99..411e9f8796 100644 --- a/sysdeps/mips/mips64/n64/crtn.S +++ b/sysdeps/mips/mips64/n64/crtn.S @@ -30,9 +30,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* crtn.S puts function epilogues in the .init and .fini sections corresponding to the prologues in crti.S. */ diff --git a/sysdeps/mips/mips64/rshift.S b/sysdeps/mips/mips64/rshift.S index e6a8a06d3d..3cb040859d 100644 --- a/sysdeps/mips/mips64/rshift.S +++ b/sysdeps/mips/mips64/rshift.S @@ -15,9 +15,8 @@ * License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with the GNU MP Library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. + * along with the GNU MP Library. If not, see + * . */ #include diff --git a/sysdeps/mips/mips64/setjmp.S b/sysdeps/mips/mips64/setjmp.S index bdfd9cd51c..25c0b72add 100644 --- a/sysdeps/mips/mips64/setjmp.S +++ b/sysdeps/mips/mips64/setjmp.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/mips/mips64/setjmp_aux.c b/sysdeps/mips/mips64/setjmp_aux.c index 49d0915be1..d1e256be75 100644 --- a/sysdeps/mips/mips64/setjmp_aux.c +++ b/sysdeps/mips/mips64/setjmp_aux.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/mips/mips64/soft-fp/e_sqrtl.c b/sysdeps/mips/mips64/soft-fp/e_sqrtl.c index c2e1faf24a..c662c97e09 100644 --- a/sysdeps/mips/mips64/soft-fp/e_sqrtl.c +++ b/sysdeps/mips/mips64/soft-fp/e_sqrtl.c @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/mips/mips64/sub_n.S b/sysdeps/mips/mips64/sub_n.S index aa8b0dcf9a..a2c0c15652 100644 --- a/sysdeps/mips/mips64/sub_n.S +++ b/sysdeps/mips/mips64/sub_n.S @@ -16,9 +16,8 @@ * License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with the GNU MP Library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. + * along with the GNU MP Library. If not, see + * . */ #include diff --git a/sysdeps/mips/mips64/submul_1.S b/sysdeps/mips/mips64/submul_1.S index 4971b992a1..85587593cc 100644 --- a/sysdeps/mips/mips64/submul_1.S +++ b/sysdeps/mips/mips64/submul_1.S @@ -17,9 +17,8 @@ * License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with the GNU MP Library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. + * along with the GNU MP Library. If not, see + * . */ #include diff --git a/sysdeps/mips/mul_1.S b/sysdeps/mips/mul_1.S index 72f538670c..125000ca14 100644 --- a/sysdeps/mips/mul_1.S +++ b/sysdeps/mips/mul_1.S @@ -16,9 +16,8 @@ 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 MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -MA 02111-1307, USA. */ +along with the GNU MP Library. If not, see +. */ #include diff --git a/sysdeps/mips/nptl/Makefile b/sysdeps/mips/nptl/Makefile index d0c59a5091..ef42ebe647 100644 --- a/sysdeps/mips/nptl/Makefile +++ b/sysdeps/mips/nptl/Makefile @@ -12,9 +12,8 @@ # 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. +# License along with the GNU C Library. If not, see +# . ifeq ($(subdir),csu) gen-as-const-headers += tcb-offsets.sym diff --git a/sysdeps/mips/nptl/pthread_spin_lock.S b/sysdeps/mips/nptl/pthread_spin_lock.S index d5f2a72340..a8504f1636 100644 --- a/sysdeps/mips/nptl/pthread_spin_lock.S +++ b/sysdeps/mips/nptl/pthread_spin_lock.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/mips/nptl/pthread_spin_trylock.S b/sysdeps/mips/nptl/pthread_spin_trylock.S index 9c6e740f0f..95b55c3d4e 100644 --- a/sysdeps/mips/nptl/pthread_spin_trylock.S +++ b/sysdeps/mips/nptl/pthread_spin_trylock.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/mips/nptl/pthreaddef.h b/sysdeps/mips/nptl/pthreaddef.h index e72b4bc58d..0a28ab42d0 100644 --- a/sysdeps/mips/nptl/pthreaddef.h +++ b/sysdeps/mips/nptl/pthreaddef.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Default stack size. */ #define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024) diff --git a/sysdeps/mips/nptl/tls.h b/sysdeps/mips/nptl/tls.h index 0f215d4473..8a97437bad 100644 --- a/sysdeps/mips/nptl/tls.h +++ b/sysdeps/mips/nptl/tls.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _TLS_H #define _TLS_H 1 diff --git a/sysdeps/mips/regdef.h b/sysdeps/mips/regdef.h index bc7f13b4b5..9fa0eaf1df 100644 --- a/sysdeps/mips/regdef.h +++ b/sysdeps/mips/regdef.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _REGDEF_H #define _REGDEF_H diff --git a/sysdeps/mips/rshift.S b/sysdeps/mips/rshift.S index cb688fe2ac..79b8bd73fc 100644 --- a/sysdeps/mips/rshift.S +++ b/sysdeps/mips/rshift.S @@ -15,9 +15,8 @@ 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 MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -MA 02111-1307, USA. */ +along with the GNU MP Library. If not, see +. */ #include diff --git a/sysdeps/mips/setjmp.S b/sysdeps/mips/setjmp.S index 01ef313995..a5c37c748d 100644 --- a/sysdeps/mips/setjmp.S +++ b/sysdeps/mips/setjmp.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/mips/setjmp_aux.c b/sysdeps/mips/setjmp_aux.c index 269d0fd25a..69ae177e7d 100644 --- a/sysdeps/mips/setjmp_aux.c +++ b/sysdeps/mips/setjmp_aux.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/mips/sgidefs.h b/sysdeps/mips/sgidefs.h index 74509fdbd0..ffa4c12e5d 100644 --- a/sysdeps/mips/sgidefs.h +++ b/sysdeps/mips/sgidefs.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SGIDEFS_H #define _SGIDEFS_H 1 diff --git a/sysdeps/mips/stackinfo.h b/sysdeps/mips/stackinfo.h index 7a5e3e01d2..1395328b51 100644 --- a/sysdeps/mips/stackinfo.h +++ b/sysdeps/mips/stackinfo.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* This file contains a bit of information about the stack allocation of the processor. */ diff --git a/sysdeps/mips/sub_n.S b/sysdeps/mips/sub_n.S index 53fa019343..8f418d1a0d 100644 --- a/sysdeps/mips/sub_n.S +++ b/sysdeps/mips/sub_n.S @@ -16,9 +16,8 @@ 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 MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -MA 02111-1307, USA. */ +along with the GNU MP Library. If not, see +. */ #include diff --git a/sysdeps/mips/submul_1.S b/sysdeps/mips/submul_1.S index 4c8a612650..88ae17622d 100644 --- a/sysdeps/mips/submul_1.S +++ b/sysdeps/mips/submul_1.S @@ -16,9 +16,8 @@ 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 MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -MA 02111-1307, USA. */ +along with the GNU MP Library. If not, see +. */ #include diff --git a/sysdeps/mips/sys/asm.h b/sysdeps/mips/sys/asm.h index a3e7a0077b..347d738f70 100644 --- a/sysdeps/mips/sys/asm.h +++ b/sysdeps/mips/sys/asm.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_ASM_H #define _SYS_ASM_H diff --git a/sysdeps/mips/sys/fpregdef.h b/sysdeps/mips/sys/fpregdef.h index d6c72bbcaa..bd30ffe664 100644 --- a/sysdeps/mips/sys/fpregdef.h +++ b/sysdeps/mips/sys/fpregdef.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_FPREGDEF_H #define _SYS_FPREGDEF_H diff --git a/sysdeps/mips/sys/regdef.h b/sysdeps/mips/sys/regdef.h index 8fb898a2d0..30e35c8453 100644 --- a/sysdeps/mips/sys/regdef.h +++ b/sysdeps/mips/sys/regdef.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_REGDEF_H #define _SYS_REGDEF_H diff --git a/sysdeps/mips/sys/tas.h b/sysdeps/mips/sys/tas.h index c5c80550ed..4585ac7f23 100644 --- a/sysdeps/mips/sys/tas.h +++ b/sysdeps/mips/sys/tas.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_TAS_H #define _SYS_TAS_H 1 diff --git a/sysdeps/mips/sys/ucontext.h b/sysdeps/mips/sys/ucontext.h index fe378e94cd..503554ab64 100644 --- a/sysdeps/mips/sys/ucontext.h +++ b/sysdeps/mips/sys/ucontext.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* System V/mips ABI compliant context switching support. */ diff --git a/sysdeps/mips/tst-audit.h b/sysdeps/mips/tst-audit.h index cafa3ebe16..b1163ad4da 100644 --- a/sysdeps/mips/tst-audit.h +++ b/sysdeps/mips/tst-audit.h @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/powerpc/dl-procinfo.c b/sysdeps/powerpc/dl-procinfo.c index 60fb465956..b1979ab1f2 100644 --- a/sysdeps/powerpc/dl-procinfo.c +++ b/sysdeps/powerpc/dl-procinfo.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* This information must be kept in sync with the _DL_HWCAP_COUNT and _DL_PLATFORM_COUNT definitions in procinfo.h. diff --git a/sysdeps/powerpc/dl-procinfo.h b/sysdeps/powerpc/dl-procinfo.h index e4a7edbf50..785bd1ba0f 100644 --- a/sysdeps/powerpc/dl-procinfo.h +++ b/sysdeps/powerpc/dl-procinfo.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _DL_PROCINFO_H #define _DL_PROCINFO_H 1 diff --git a/sysdeps/powerpc/nofpu/fclrexcpt.c b/sysdeps/powerpc/nofpu/fclrexcpt.c index 16e96baeaf..768fd8ff84 100644 --- a/sysdeps/powerpc/nofpu/fclrexcpt.c +++ b/sysdeps/powerpc/nofpu/fclrexcpt.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include "soft-fp.h" #include "soft-supp.h" diff --git a/sysdeps/powerpc/nofpu/fedisblxcpt.c b/sysdeps/powerpc/nofpu/fedisblxcpt.c index 3d8dd4462f..48e87cceed 100644 --- a/sysdeps/powerpc/nofpu/fedisblxcpt.c +++ b/sysdeps/powerpc/nofpu/fedisblxcpt.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include "soft-fp.h" #include "soft-supp.h" diff --git a/sysdeps/powerpc/nofpu/feenablxcpt.c b/sysdeps/powerpc/nofpu/feenablxcpt.c index 060e450590..d4a3e79ef6 100644 --- a/sysdeps/powerpc/nofpu/feenablxcpt.c +++ b/sysdeps/powerpc/nofpu/feenablxcpt.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/powerpc/nofpu/fegetenv.c b/sysdeps/powerpc/nofpu/fegetenv.c index 64c0e8c48f..dd88fb3490 100644 --- a/sysdeps/powerpc/nofpu/fegetenv.c +++ b/sysdeps/powerpc/nofpu/fegetenv.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include "soft-fp.h" #include "soft-supp.h" diff --git a/sysdeps/powerpc/nofpu/fegetexcept.c b/sysdeps/powerpc/nofpu/fegetexcept.c index 0a47a09ac0..a700a8ffdd 100644 --- a/sysdeps/powerpc/nofpu/fegetexcept.c +++ b/sysdeps/powerpc/nofpu/fegetexcept.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include "soft-fp.h" #include "soft-supp.h" diff --git a/sysdeps/powerpc/nofpu/fegetround.c b/sysdeps/powerpc/nofpu/fegetround.c index 0d01e4411f..8b65c3f942 100644 --- a/sysdeps/powerpc/nofpu/fegetround.c +++ b/sysdeps/powerpc/nofpu/fegetround.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include "soft-fp.h" #include "soft-supp.h" diff --git a/sysdeps/powerpc/nofpu/feholdexcpt.c b/sysdeps/powerpc/nofpu/feholdexcpt.c index 4074ac0414..6bfe825343 100644 --- a/sysdeps/powerpc/nofpu/feholdexcpt.c +++ b/sysdeps/powerpc/nofpu/feholdexcpt.c @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include "soft-fp.h" #include "soft-supp.h" diff --git a/sysdeps/powerpc/nofpu/fenv_const.c b/sysdeps/powerpc/nofpu/fenv_const.c index 7dc2e817c8..f26cfc5fe0 100644 --- a/sysdeps/powerpc/nofpu/fenv_const.c +++ b/sysdeps/powerpc/nofpu/fenv_const.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* We want to specify the bit pattern of the __fe_*_env constants, so pretend they're really `long long' instead of `double'. */ diff --git a/sysdeps/powerpc/nofpu/fenv_libc.h b/sysdeps/powerpc/nofpu/fenv_libc.h index db6996cd4e..3808fec0ac 100644 --- a/sysdeps/powerpc/nofpu/fenv_libc.h +++ b/sysdeps/powerpc/nofpu/fenv_libc.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _FENV_LIBC_H #define _FENV_LIBC_H 1 diff --git a/sysdeps/powerpc/nofpu/fesetenv.c b/sysdeps/powerpc/nofpu/fesetenv.c index 90e084cbc3..dc49017c0d 100644 --- a/sysdeps/powerpc/nofpu/fesetenv.c +++ b/sysdeps/powerpc/nofpu/fesetenv.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include "soft-fp.h" #include "soft-supp.h" diff --git a/sysdeps/powerpc/nofpu/fesetround.c b/sysdeps/powerpc/nofpu/fesetround.c index a5f8367278..e319cae0bd 100644 --- a/sysdeps/powerpc/nofpu/fesetround.c +++ b/sysdeps/powerpc/nofpu/fesetround.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include "soft-fp.h" #include "soft-supp.h" diff --git a/sysdeps/powerpc/nofpu/feupdateenv.c b/sysdeps/powerpc/nofpu/feupdateenv.c index f15e1681cc..f5153d3669 100644 --- a/sysdeps/powerpc/nofpu/feupdateenv.c +++ b/sysdeps/powerpc/nofpu/feupdateenv.c @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include "soft-fp.h" #include "soft-supp.h" diff --git a/sysdeps/powerpc/nofpu/fgetexcptflg.c b/sysdeps/powerpc/nofpu/fgetexcptflg.c index 713bd92881..36b9b76986 100644 --- a/sysdeps/powerpc/nofpu/fgetexcptflg.c +++ b/sysdeps/powerpc/nofpu/fgetexcptflg.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include "soft-fp.h" #include "soft-supp.h" diff --git a/sysdeps/powerpc/nofpu/fraiseexcpt.c b/sysdeps/powerpc/nofpu/fraiseexcpt.c index 5d3a87fe8e..dcfbcc48b2 100644 --- a/sysdeps/powerpc/nofpu/fraiseexcpt.c +++ b/sysdeps/powerpc/nofpu/fraiseexcpt.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include "soft-fp.h" #include "soft-supp.h" diff --git a/sysdeps/powerpc/nofpu/fsetexcptflg.c b/sysdeps/powerpc/nofpu/fsetexcptflg.c index 2faeb1f103..f98da1a617 100644 --- a/sysdeps/powerpc/nofpu/fsetexcptflg.c +++ b/sysdeps/powerpc/nofpu/fsetexcptflg.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include "soft-fp.h" #include "soft-supp.h" diff --git a/sysdeps/powerpc/nofpu/ftestexcept.c b/sysdeps/powerpc/nofpu/ftestexcept.c index ebd3b1505c..11dd4b2252 100644 --- a/sysdeps/powerpc/nofpu/ftestexcept.c +++ b/sysdeps/powerpc/nofpu/ftestexcept.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include "soft-fp.h" #include "soft-supp.h" diff --git a/sysdeps/powerpc/nofpu/sim-full.c b/sysdeps/powerpc/nofpu/sim-full.c index d5ee007ca9..32c71af696 100644 --- a/sysdeps/powerpc/nofpu/sim-full.c +++ b/sysdeps/powerpc/nofpu/sim-full.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include "soft-fp.h" diff --git a/sysdeps/powerpc/nofpu/soft-supp.h b/sysdeps/powerpc/nofpu/soft-supp.h index 3922426bd0..2ae39a1b34 100644 --- a/sysdeps/powerpc/nofpu/soft-supp.h +++ b/sysdeps/powerpc/nofpu/soft-supp.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/powerpc/powerpc32/405/memcmp.S b/sysdeps/powerpc/powerpc32/405/memcmp.S index 2598d3c1cb..b9628b1941 100644 --- a/sysdeps/powerpc/powerpc32/405/memcmp.S +++ b/sysdeps/powerpc/powerpc32/405/memcmp.S @@ -13,9 +13,8 @@ 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., 51 Franklin Street, Fifth Floor, Boston MA - 02110-1301 USA. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/powerpc/powerpc32/405/memcpy.S b/sysdeps/powerpc/powerpc32/405/memcpy.S index 8b72ba7433..61025cf818 100644 --- a/sysdeps/powerpc/powerpc32/405/memcpy.S +++ b/sysdeps/powerpc/powerpc32/405/memcpy.S @@ -13,9 +13,8 @@ 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., 51 Franklin Street, Fifth Floor, Boston MA - 02110-1301 USA. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/powerpc/powerpc32/405/memset.S b/sysdeps/powerpc/powerpc32/405/memset.S index 0f57968384..e132ce3652 100644 --- a/sysdeps/powerpc/powerpc32/405/memset.S +++ b/sysdeps/powerpc/powerpc32/405/memset.S @@ -13,9 +13,8 @@ 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., 51 Franklin Street, Fifth Floor, Boston MA - 02110-1301 USA. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/powerpc/powerpc32/405/strcmp.S b/sysdeps/powerpc/powerpc32/405/strcmp.S index 4098977e27..9cd0e24f24 100644 --- a/sysdeps/powerpc/powerpc32/405/strcmp.S +++ b/sysdeps/powerpc/powerpc32/405/strcmp.S @@ -13,9 +13,8 @@ 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., 51 Franklin Street, Fifth Floor, Boston MA - 02110-1301 USA. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/powerpc/powerpc32/405/strcpy.S b/sysdeps/powerpc/powerpc32/405/strcpy.S index 62f7e3eb9b..8e6c396e5d 100644 --- a/sysdeps/powerpc/powerpc32/405/strcpy.S +++ b/sysdeps/powerpc/powerpc32/405/strcpy.S @@ -13,9 +13,8 @@ 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., 51 Franklin Street, Fifth Floor, Boston MA - 02110-1301 USA. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/powerpc/powerpc32/405/strlen.S b/sysdeps/powerpc/powerpc32/405/strlen.S index d50b9d7f56..210a3afd92 100644 --- a/sysdeps/powerpc/powerpc32/405/strlen.S +++ b/sysdeps/powerpc/powerpc32/405/strlen.S @@ -13,9 +13,8 @@ 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., 51 Franklin Street, Fifth Floor, Boston MA - 02110-1301 USA. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/powerpc/powerpc32/405/strncmp.S b/sysdeps/powerpc/powerpc32/405/strncmp.S index d4c8156bf0..af374c9068 100644 --- a/sysdeps/powerpc/powerpc32/405/strncmp.S +++ b/sysdeps/powerpc/powerpc32/405/strncmp.S @@ -13,9 +13,8 @@ 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., 51 Franklin Street, Fifth Floor, Boston MA - 02110-1301 USA. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/tile/__longjmp.S b/sysdeps/tile/__longjmp.S index f31c662499..2e41a1d627 100644 --- a/sysdeps/tile/__longjmp.S +++ b/sysdeps/tile/__longjmp.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/tile/__tls_get_addr.S b/sysdeps/tile/__tls_get_addr.S index ca491c51b7..8cf49f0b2b 100644 --- a/sysdeps/tile/__tls_get_addr.S +++ b/sysdeps/tile/__tls_get_addr.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/tile/_mcount.S b/sysdeps/tile/_mcount.S index 63708a1ddd..4754639c91 100644 --- a/sysdeps/tile/_mcount.S +++ b/sysdeps/tile/_mcount.S @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Assembly stub to invoke __mcount_internal(). Compiler-generated code calls mcount after executing a function's prologue, placing diff --git a/sysdeps/tile/bits/atomic.h b/sysdeps/tile/bits/atomic.h index a0fdb6fbc0..cb96004fc8 100644 --- a/sysdeps/tile/bits/atomic.h +++ b/sysdeps/tile/bits/atomic.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* The sub-architecture headers provide definitions for these macros that work for "int" and "long" size values only: diff --git a/sysdeps/tile/bits/byteswap.h b/sysdeps/tile/bits/byteswap.h index 6858a3018d..8e610c6fc8 100644 --- a/sysdeps/tile/bits/byteswap.h +++ b/sysdeps/tile/bits/byteswap.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #if !defined _BYTESWAP_H && !defined _NETINET_IN_H && !defined _ENDIAN_H # error "Never use directly; include instead." diff --git a/sysdeps/tile/bits/fenv.h b/sysdeps/tile/bits/fenv.h index 0e12c04034..a6e0233f1a 100644 --- a/sysdeps/tile/bits/fenv.h +++ b/sysdeps/tile/bits/fenv.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _FENV_H # error "Never use directly; include instead." diff --git a/sysdeps/tile/bits/link.h b/sysdeps/tile/bits/link.h index f4b7462172..3cc8c1e837 100644 --- a/sysdeps/tile/bits/link.h +++ b/sysdeps/tile/bits/link.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _LINK_H # error "Never include directly; use instead." diff --git a/sysdeps/tile/bits/mathdef.h b/sysdeps/tile/bits/mathdef.h index 7c7ef5dd97..bf0da5e438 100644 --- a/sysdeps/tile/bits/mathdef.h +++ b/sysdeps/tile/bits/mathdef.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #if !defined _MATH_H && !defined _COMPLEX_H # error "Never use directly; include instead" diff --git a/sysdeps/tile/bits/mathinline.h b/sysdeps/tile/bits/mathinline.h index 09bdd79186..4c021f7757 100644 --- a/sysdeps/tile/bits/mathinline.h +++ b/sysdeps/tile/bits/mathinline.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _MATH_H # error "Never use directly; include instead." diff --git a/sysdeps/tile/bits/setjmp.h b/sysdeps/tile/bits/setjmp.h index 49612591ed..513c73474c 100644 --- a/sysdeps/tile/bits/setjmp.h +++ b/sysdeps/tile/bits/setjmp.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Define the machine-dependent type `jmp_buf'. TILE version. */ #ifndef _BITS_SETJMP_H diff --git a/sysdeps/tile/bzero.S b/sysdeps/tile/bzero.S index 5b5b9da235..407233e8cc 100644 --- a/sysdeps/tile/bzero.S +++ b/sysdeps/tile/bzero.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/tile/dl-lookupcfg.h b/sysdeps/tile/dl-lookupcfg.h index e1a5b26da9..a198c8b163 100644 --- a/sysdeps/tile/dl-lookupcfg.h +++ b/sysdeps/tile/dl-lookupcfg.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define DL_UNMAP_IS_SPECIAL diff --git a/sysdeps/tile/dl-machine.h b/sysdeps/tile/dl-machine.h index 8b3c534a94..178b33efca 100644 --- a/sysdeps/tile/dl-machine.h +++ b/sysdeps/tile/dl-machine.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef dl_machine_h #define dl_machine_h diff --git a/sysdeps/tile/dl-runtime.c b/sysdeps/tile/dl-runtime.c index e8a8361e27..0aa211db17 100644 --- a/sysdeps/tile/dl-runtime.c +++ b/sysdeps/tile/dl-runtime.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Like x86_64, we pass the index of the relocation and not its offset. In _dl_profile_fixup and _dl_call_pltexit we also use the index. diff --git a/sysdeps/tile/dl-start.S b/sysdeps/tile/dl-start.S index 2991374285..94025a544b 100644 --- a/sysdeps/tile/dl-start.S +++ b/sysdeps/tile/dl-start.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/tile/dl-tls.c b/sysdeps/tile/dl-tls.c index 096539b4a7..c3267614ce 100644 --- a/sysdeps/tile/dl-tls.c +++ b/sysdeps/tile/dl-tls.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifdef SHARED /* We provide a fast-path version of __tls_get_addr to allow for diff --git a/sysdeps/tile/dl-tls.h b/sysdeps/tile/dl-tls.h index baa0c12686..a6195aac6d 100644 --- a/sysdeps/tile/dl-tls.h +++ b/sysdeps/tile/dl-tls.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Type used for the representation of TLS information in the GOT. */ diff --git a/sysdeps/tile/dl-trampoline.S b/sysdeps/tile/dl-trampoline.S index 486b958ed5..3478824957 100644 --- a/sysdeps/tile/dl-trampoline.S +++ b/sysdeps/tile/dl-trampoline.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/tile/elf/start.S b/sysdeps/tile/elf/start.S index 71a2c8bc1f..999bb535ca 100644 --- a/sysdeps/tile/elf/start.S +++ b/sysdeps/tile/elf/start.S @@ -30,9 +30,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* This is the canonical entry point, usually the first thing in the text segment. The ELF standard tells us that the stack is set up like this on diff --git a/sysdeps/tile/fegetenv.c b/sysdeps/tile/fegetenv.c index f6e2bb173a..55e30981f0 100644 --- a/sysdeps/tile/fegetenv.c +++ b/sysdeps/tile/fegetenv.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/tile/fegetround.c b/sysdeps/tile/fegetround.c index f1217bf819..fe5b7c7980 100644 --- a/sysdeps/tile/fegetround.c +++ b/sysdeps/tile/fegetround.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/tile/feholdexcpt.c b/sysdeps/tile/feholdexcpt.c index 384b696abd..125cd2de72 100644 --- a/sysdeps/tile/feholdexcpt.c +++ b/sysdeps/tile/feholdexcpt.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/tile/fesetenv.c b/sysdeps/tile/fesetenv.c index ceb45e4d4d..88b3e9d218 100644 --- a/sysdeps/tile/fesetenv.c +++ b/sysdeps/tile/fesetenv.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/tile/fesetround.c b/sysdeps/tile/fesetround.c index b29ecea915..5ff30e4ded 100644 --- a/sysdeps/tile/fesetround.c +++ b/sysdeps/tile/fesetround.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/tile/feupdateenv.c b/sysdeps/tile/feupdateenv.c index 5b021933e2..8a8a0e7f72 100644 --- a/sysdeps/tile/feupdateenv.c +++ b/sysdeps/tile/feupdateenv.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/tile/ffs.c b/sysdeps/tile/ffs.c index 498559ca84..f97b7a4ae9 100644 --- a/sysdeps/tile/ffs.c +++ b/sysdeps/tile/ffs.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #define ffsl __something_else diff --git a/sysdeps/tile/gccframe.h b/sysdeps/tile/gccframe.h index 041d3d87a5..68e620017b 100644 --- a/sysdeps/tile/gccframe.h +++ b/sysdeps/tile/gccframe.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define FIRST_PSEUDO_REGISTER 64 diff --git a/sysdeps/tile/jmpbuf-offsets.h b/sysdeps/tile/jmpbuf-offsets.h index ce4f1b2daa..26c3e67db2 100644 --- a/sysdeps/tile/jmpbuf-offsets.h +++ b/sysdeps/tile/jmpbuf-offsets.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* We don't use most of these symbols; they are here for documentation. */ #define JB_R30 0 diff --git a/sysdeps/tile/jmpbuf-unwind.h b/sysdeps/tile/jmpbuf-unwind.h index 624a014868..7e8d608b05 100644 --- a/sysdeps/tile/jmpbuf-unwind.h +++ b/sysdeps/tile/jmpbuf-unwind.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/tile/ldsodefs.h b/sysdeps/tile/ldsodefs.h index e90de56c0c..bbe04090a7 100644 --- a/sysdeps/tile/ldsodefs.h +++ b/sysdeps/tile/ldsodefs.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _TILE_LDSODEFS_H #define _TILE_LDSODEFS_H 1 diff --git a/sysdeps/tile/machine-gmon.h b/sysdeps/tile/machine-gmon.h index 473707b037..9abaffbc01 100644 --- a/sysdeps/tile/machine-gmon.h +++ b/sysdeps/tile/machine-gmon.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define _MCOUNT_DECL(from, self) \ void __mcount_internal (u_long from, u_long self) diff --git a/sysdeps/tile/nptl/Makefile b/sysdeps/tile/nptl/Makefile index 24990a2b7e..66749284c7 100644 --- a/sysdeps/tile/nptl/Makefile +++ b/sysdeps/tile/nptl/Makefile @@ -12,9 +12,8 @@ # 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. +# License along with the GNU C Library. If not, see +# . ifeq ($(subdir),csu) gen-as-const-headers += tcb-offsets.sym diff --git a/sysdeps/tile/nptl/pthread_spin_lock.c b/sysdeps/tile/nptl/pthread_spin_lock.c index ee055623a5..18716f44c9 100644 --- a/sysdeps/tile/nptl/pthread_spin_lock.c +++ b/sysdeps/tile/nptl/pthread_spin_lock.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include "pthreadP.h" #include diff --git a/sysdeps/tile/nptl/pthread_spin_trylock.c b/sysdeps/tile/nptl/pthread_spin_trylock.c index f111cc7c24..fb67f36deb 100644 --- a/sysdeps/tile/nptl/pthread_spin_trylock.c +++ b/sysdeps/tile/nptl/pthread_spin_trylock.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include "pthreadP.h" #include diff --git a/sysdeps/tile/nptl/pthreaddef.h b/sysdeps/tile/nptl/pthreaddef.h index 4ba1adb0fa..2b54687994 100644 --- a/sysdeps/tile/nptl/pthreaddef.h +++ b/sysdeps/tile/nptl/pthreaddef.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/tile/nptl/tls.h b/sysdeps/tile/nptl/tls.h index 106451aa7a..303a95e000 100644 --- a/sysdeps/tile/nptl/tls.h +++ b/sysdeps/tile/nptl/tls.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _TLS_H #define _TLS_H 1 diff --git a/sysdeps/tile/setjmp.S b/sysdeps/tile/setjmp.S index 253990997e..8624ce9da8 100644 --- a/sysdeps/tile/setjmp.S +++ b/sysdeps/tile/setjmp.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/tile/stackinfo.h b/sysdeps/tile/stackinfo.h index e3233ac10f..f2524ee445 100644 --- a/sysdeps/tile/stackinfo.h +++ b/sysdeps/tile/stackinfo.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* This file contains a bit of information about the stack allocation of the processor. */ diff --git a/sysdeps/tile/sysdep.h b/sysdeps/tile/sysdep.h index fe481a24d4..58432eb032 100644 --- a/sysdeps/tile/sysdep.h +++ b/sysdeps/tile/sysdep.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/tile/tilegx/bits/atomic.h b/sysdeps/tile/tilegx/bits/atomic.h index 1cb4e2b71b..270955ac00 100644 --- a/sysdeps/tile/tilegx/bits/atomic.h +++ b/sysdeps/tile/tilegx/bits/atomic.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _BITS_ATOMIC_H #define _BITS_ATOMIC_H 1 diff --git a/sysdeps/tile/tilegx/memchr.c b/sysdeps/tile/tilegx/memchr.c index 52a20b6daa..aea25ff303 100644 --- a/sysdeps/tile/tilegx/memchr.c +++ b/sysdeps/tile/tilegx/memchr.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/tile/tilegx/memcpy.c b/sysdeps/tile/tilegx/memcpy.c index 35495be569..9cfb283c82 100644 --- a/sysdeps/tile/tilegx/memcpy.c +++ b/sysdeps/tile/tilegx/memcpy.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/tile/tilegx/memset.c b/sysdeps/tile/tilegx/memset.c index ddde05fea3..8083abf5cb 100644 --- a/sysdeps/tile/tilegx/memset.c +++ b/sysdeps/tile/tilegx/memset.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/tile/tilegx/memusage.h b/sysdeps/tile/tilegx/memusage.h index 7afb50a929..0ac8ad8644 100644 --- a/sysdeps/tile/tilegx/memusage.h +++ b/sysdeps/tile/tilegx/memusage.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/tile/tilegx/rawmemchr.c b/sysdeps/tile/tilegx/rawmemchr.c index cd0f2fd878..ed9162d1c1 100644 --- a/sysdeps/tile/tilegx/rawmemchr.c +++ b/sysdeps/tile/tilegx/rawmemchr.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/tile/tilegx/strchr.c b/sysdeps/tile/tilegx/strchr.c index 2dc75060d6..8ef4fdc04d 100644 --- a/sysdeps/tile/tilegx/strchr.c +++ b/sysdeps/tile/tilegx/strchr.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/tile/tilegx/strchrnul.c b/sysdeps/tile/tilegx/strchrnul.c index bb165b5b51..11814431b5 100644 --- a/sysdeps/tile/tilegx/strchrnul.c +++ b/sysdeps/tile/tilegx/strchrnul.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/tile/tilegx/string-endian.h b/sysdeps/tile/tilegx/string-endian.h index 29ca793af1..280efd3776 100644 --- a/sysdeps/tile/tilegx/string-endian.h +++ b/sysdeps/tile/tilegx/string-endian.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Provide a mask based on the pointer alignment that sets up non-zero bytes before the beginning of the string. diff --git a/sysdeps/tile/tilegx/strlen.c b/sysdeps/tile/tilegx/strlen.c index a729e991de..dda9dff1c9 100644 --- a/sysdeps/tile/tilegx/strlen.c +++ b/sysdeps/tile/tilegx/strlen.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/tile/tilegx/strrchr.c b/sysdeps/tile/tilegx/strrchr.c index 9724d02c1b..223c59dd4c 100644 --- a/sysdeps/tile/tilegx/strrchr.c +++ b/sysdeps/tile/tilegx/strrchr.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/tile/tilepro/bits/atomic.h b/sysdeps/tile/tilepro/bits/atomic.h index 9d996cbcfd..3b9509f530 100644 --- a/sysdeps/tile/tilepro/bits/atomic.h +++ b/sysdeps/tile/tilepro/bits/atomic.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _BITS_ATOMIC_H #define _BITS_ATOMIC_H 1 diff --git a/sysdeps/tile/tilepro/memchr.c b/sysdeps/tile/tilepro/memchr.c index 125fd0d39b..abf4bbadf6 100644 --- a/sysdeps/tile/tilepro/memchr.c +++ b/sysdeps/tile/tilepro/memchr.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/tile/tilepro/memcpy.S b/sysdeps/tile/tilepro/memcpy.S index 4bddeede4b..0a64f005fb 100644 --- a/sysdeps/tile/tilepro/memcpy.S +++ b/sysdeps/tile/tilepro/memcpy.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/tile/tilepro/memset.c b/sysdeps/tile/tilepro/memset.c index bfdc3d4193..6fb9ab81ed 100644 --- a/sysdeps/tile/tilepro/memset.c +++ b/sysdeps/tile/tilepro/memset.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/tile/tilepro/memusage.h b/sysdeps/tile/tilepro/memusage.h index 700c08b700..ac07c3871e 100644 --- a/sysdeps/tile/tilepro/memusage.h +++ b/sysdeps/tile/tilepro/memusage.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/tile/tilepro/rawmemchr.c b/sysdeps/tile/tilepro/rawmemchr.c index c1a58ec1fd..d52bc96618 100644 --- a/sysdeps/tile/tilepro/rawmemchr.c +++ b/sysdeps/tile/tilepro/rawmemchr.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/tile/tilepro/strchr.c b/sysdeps/tile/tilepro/strchr.c index e116ea9c55..8615000e50 100644 --- a/sysdeps/tile/tilepro/strchr.c +++ b/sysdeps/tile/tilepro/strchr.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/tile/tilepro/strchrnul.c b/sysdeps/tile/tilepro/strchrnul.c index 6e7bba9c0a..4f65612a98 100644 --- a/sysdeps/tile/tilepro/strchrnul.c +++ b/sysdeps/tile/tilepro/strchrnul.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/tile/tilepro/strlen.c b/sysdeps/tile/tilepro/strlen.c index 26120681ba..8e53b51aea 100644 --- a/sysdeps/tile/tilepro/strlen.c +++ b/sysdeps/tile/tilepro/strlen.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/tile/tilepro/strrchr.c b/sysdeps/tile/tilepro/strrchr.c index b91b02b349..a41f9dad92 100644 --- a/sysdeps/tile/tilepro/strrchr.c +++ b/sysdeps/tile/tilepro/strrchr.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/tile/tls-macros.h b/sysdeps/tile/tls-macros.h index 807ccdb0b7..9a7e2799d2 100644 --- a/sysdeps/tile/tls-macros.h +++ b/sysdeps/tile/tls-macros.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifdef __tilegx__ #define TLS_GD_REL "hw0_last_tls_gd" diff --git a/sysdeps/tile/tst-audit.h b/sysdeps/tile/tst-audit.h index fd4f3d6157..06006a61c7 100644 --- a/sysdeps/tile/tst-audit.h +++ b/sysdeps/tile/tst-audit.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define pltenter la_tile_gnu_pltenter #define pltexit la_tile_gnu_pltexit diff --git a/sysdeps/unix/alpha/pipe.S b/sysdeps/unix/alpha/pipe.S index 2da4d78abd..b3b53a7687 100644 --- a/sysdeps/unix/alpha/pipe.S +++ b/sysdeps/unix/alpha/pipe.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* __pipe is a special syscall since it returns two values. */ diff --git a/sysdeps/unix/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S index 8003fdca8b..2e5e776268 100644 --- a/sysdeps/unix/alpha/sysdep.S +++ b/sysdeps/unix/alpha/sysdep.S @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h index c3f5920ad0..4cc88942c8 100644 --- a/sysdeps/unix/alpha/sysdep.h +++ b/sysdeps/unix/alpha/sysdep.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/am33/sysdep.S b/sysdeps/unix/am33/sysdep.S index d6df22ed6e..26740c2404 100644 --- a/sysdeps/unix/am33/sysdep.S +++ b/sysdeps/unix/am33/sysdep.S @@ -15,9 +15,8 @@ Library General Public License for more details. You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + License along with the GNU C Library. If not, see + . */ #include #define _ERRNO_H diff --git a/sysdeps/unix/am33/sysdep.h b/sysdeps/unix/am33/sysdep.h index 11578e7600..dff1baebf4 100644 --- a/sysdeps/unix/am33/sysdep.h +++ b/sysdeps/unix/am33/sysdep.h @@ -14,9 +14,8 @@ Library General Public License for more details. You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + License along with the GNU C Library. If not, see + . */ #include #include "../../am33/sysdep.h" diff --git a/sysdeps/unix/arm/brk.S b/sysdeps/unix/arm/brk.S index 914e8a8bbe..56acda1cce 100644 --- a/sysdeps/unix/arm/brk.S +++ b/sysdeps/unix/arm/brk.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/arm/fork.S b/sysdeps/unix/arm/fork.S index bd00c92cfe..cd156876a4 100644 --- a/sysdeps/unix/arm/fork.S +++ b/sysdeps/unix/arm/fork.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/arm/start.c b/sysdeps/unix/arm/start.c index 3bfb6d2d7e..e9a032b9da 100644 --- a/sysdeps/unix/arm/start.c +++ b/sysdeps/unix/arm/start.c @@ -30,9 +30,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/arm/sysdep.S b/sysdeps/unix/arm/sysdep.S index 41386fe516..e0d60732ee 100644 --- a/sysdeps/unix/arm/sysdep.S +++ b/sysdeps/unix/arm/sysdep.S @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #define _ERRNO_H diff --git a/sysdeps/unix/arm/sysdep.h b/sysdeps/unix/arm/sysdep.h index 2cc0a9dae5..1f7b5cf3d7 100644 --- a/sysdeps/unix/arm/sysdep.h +++ b/sysdeps/unix/arm/sysdep.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/mips/brk.S b/sysdeps/unix/mips/brk.S index a35b8b9113..f8cc1779a1 100644 --- a/sysdeps/unix/mips/brk.S +++ b/sysdeps/unix/mips/brk.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/mips/fork.S b/sysdeps/unix/mips/fork.S index a7848acb6b..3e1e76b733 100644 --- a/sysdeps/unix/mips/fork.S +++ b/sysdeps/unix/mips/fork.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/mips/mips32/sysdep.h b/sysdeps/unix/mips/mips32/sysdep.h index 0b5d1186bb..4c0b2a94f1 100644 --- a/sysdeps/unix/mips/mips32/sysdep.h +++ b/sysdeps/unix/mips/mips32/sysdep.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/mips/mips64/n32/sysdep.h b/sysdeps/unix/mips/mips64/n32/sysdep.h index df1391d70f..3da31cba48 100644 --- a/sysdeps/unix/mips/mips64/n32/sysdep.h +++ b/sysdeps/unix/mips/mips64/n32/sysdep.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/mips/mips64/n64/sysdep.h b/sysdeps/unix/mips/mips64/n64/sysdep.h index da5f6a047c..54e55116a9 100644 --- a/sysdeps/unix/mips/mips64/n64/sysdep.h +++ b/sysdeps/unix/mips/mips64/n64/sysdep.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/mips/pipe.S b/sysdeps/unix/mips/pipe.S index ee7b76d635..d30b8e48a9 100644 --- a/sysdeps/unix/mips/pipe.S +++ b/sysdeps/unix/mips/pipe.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/mips/sigreturn.S b/sysdeps/unix/mips/sigreturn.S index 2cb3adb6de..34b6662659 100644 --- a/sysdeps/unix/mips/sigreturn.S +++ b/sysdeps/unix/mips/sigreturn.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/mips/sysdep.S b/sysdeps/unix/mips/sysdep.S index 8c172db190..f42d0f94f9 100644 --- a/sysdeps/unix/mips/sysdep.S +++ b/sysdeps/unix/mips/sysdep.S @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #define _ERRNO_H diff --git a/sysdeps/unix/mips/sysdep.h b/sysdeps/unix/mips/sysdep.h index 714830147d..d6e615c078 100644 --- a/sysdeps/unix/mips/sysdep.h +++ b/sysdeps/unix/mips/sysdep.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/mips/wait.S b/sysdeps/unix/mips/wait.S index de0f6ebfae..cabd2409c1 100644 --- a/sysdeps/unix/mips/wait.S +++ b/sysdeps/unix/mips/wait.S @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/alpha/____longjmp_chk.S b/sysdeps/unix/sysv/linux/alpha/____longjmp_chk.S index 53eb0f2c51..c5fe5c19fb 100644 --- a/sysdeps/unix/sysv/linux/alpha/____longjmp_chk.S +++ b/sysdeps/unix/sysv/linux/alpha/____longjmp_chk.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/alpha/adjtime.c b/sysdeps/unix/sysv/linux/alpha/adjtime.c index 1700524d34..ce1d220c37 100644 --- a/sysdeps/unix/sysv/linux/alpha/adjtime.c +++ b/sysdeps/unix/sysv/linux/alpha/adjtime.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/alpha/bits/dirent.h b/sysdeps/unix/sysv/linux/alpha/bits/dirent.h index 6ed74783ad..f146466e68 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/dirent.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/dirent.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _BITS_DIRENT_H #define _BITS_DIRENT_H 1 diff --git a/sysdeps/unix/sysv/linux/alpha/bits/errno.h b/sysdeps/unix/sysv/linux/alpha/bits/errno.h index 5c72a56cd2..d85dd8db24 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/errno.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/errno.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifdef _ERRNO_H diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h index d1cebfa684..d6b7b4dfe2 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _FCNTL_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h b/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h index c525046e5c..1f3482fb4f 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_IOCTL_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/alpha/bits/ipc.h b/sysdeps/unix/sysv/linux/alpha/bits/ipc.h index 77f3c938d4..7df2acea35 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/ipc.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/ipc.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_IPC_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/alpha/bits/mman.h b/sysdeps/unix/sysv/linux/alpha/bits/mman.h index 3c205f8b8e..5724e5f294 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/mman.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/mman.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_MMAN_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/alpha/bits/msq.h b/sysdeps/unix/sysv/linux/alpha/bits/msq.h index ab251eaf76..7e260d22fe 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/msq.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/msq.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_MSG_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/alpha/bits/netdb.h b/sysdeps/unix/sysv/linux/alpha/bits/netdb.h index e3664fd292..fc34c86696 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/netdb.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/netdb.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _NETDB_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/alpha/bits/resource.h b/sysdeps/unix/sysv/linux/alpha/bits/resource.h index 92d0199dcd..da7b5a41a8 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/resource.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/resource.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_RESOURCE_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sem.h b/sysdeps/unix/sysv/linux/alpha/bits/sem.h index f63360b2bc..6cff0fd741 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/sem.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/sem.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_SEM_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/alpha/bits/shm.h b/sysdeps/unix/sysv/linux/alpha/bits/shm.h index cb214e6412..a52a266a77 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/shm.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/shm.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_SHM_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h index cdf47588a3..2d900185bb 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SIGNAL_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h b/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h index 8d0c716538..4a465a5bd5 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #if !defined _SIGNAL_H && !defined __need_siginfo_t \ && !defined __need_sigevent_t diff --git a/sysdeps/unix/sysv/linux/alpha/bits/signum.h b/sysdeps/unix/sysv/linux/alpha/bits/signum.h index 477c13175d..8ae74fcf83 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/signum.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/signum.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifdef _SIGNAL_H diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sigstack.h b/sysdeps/unix/sysv/linux/alpha/bits/sigstack.h index 7faaf98d54..5cea395955 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/sigstack.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/sigstack.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SIGNAL_H # error "Never include this file directly. Use instead" diff --git a/sysdeps/unix/sysv/linux/alpha/bits/socket.h b/sysdeps/unix/sysv/linux/alpha/bits/socket.h index 238538e3c4..8ae4edf295 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/socket.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/socket.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef __BITS_SOCKET_H #define __BITS_SOCKET_H diff --git a/sysdeps/unix/sysv/linux/alpha/bits/stat.h b/sysdeps/unix/sysv/linux/alpha/bits/stat.h index e70e83636d..a958916469 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/stat.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/stat.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/alpha/bits/statfs.h b/sysdeps/unix/sysv/linux/alpha/bits/statfs.h index 157591d2ea..0b820281e6 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/statfs.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/statfs.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_STATFS_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/alpha/bits/termios.h b/sysdeps/unix/sysv/linux/alpha/bits/termios.h index 966ccf94da..534a8bf2ff 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/termios.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/termios.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _TERMIOS_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h b/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h index 201585af1f..958bbf1425 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _BITS_TYPES_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/alpha/bits/wordsize.h b/sysdeps/unix/sysv/linux/alpha/bits/wordsize.h index 22fc64109c..bc4551195b 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/wordsize.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/wordsize.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define __WORDSIZE 64 diff --git a/sysdeps/unix/sysv/linux/alpha/brk.S b/sysdeps/unix/sysv/linux/alpha/brk.S index e01abebe0e..826d7374f9 100644 --- a/sysdeps/unix/sysv/linux/alpha/brk.S +++ b/sysdeps/unix/sysv/linux/alpha/brk.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* __brk is a special syscall under Linux since it never returns an error. Instead, the error condition is indicated by returning the old diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S index 5e0b21ea15..1c6c8d6b7e 100644 --- a/sysdeps/unix/sysv/linux/alpha/clone.S +++ b/sysdeps/unix/sysv/linux/alpha/clone.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* clone() is even more special than fork() as it mucks with stacks and invokes a function in the right context after its all over. */ diff --git a/sysdeps/unix/sysv/linux/alpha/dl-auxv.h b/sysdeps/unix/sysv/linux/alpha/dl-auxv.h index 075797db08..ce80eb04b2 100644 --- a/sysdeps/unix/sysv/linux/alpha/dl-auxv.h +++ b/sysdeps/unix/sysv/linux/alpha/dl-auxv.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Scan the Aux Vector for the cache shape entries. */ diff --git a/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c b/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c index 5e63be5cc7..a01b2cf11a 100644 --- a/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c +++ b/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/alpha/fxstat.c b/sysdeps/unix/sysv/linux/alpha/fxstat.c index 198986708e..e53b2da13d 100644 --- a/sysdeps/unix/sysv/linux/alpha/fxstat.c +++ b/sysdeps/unix/sysv/linux/alpha/fxstat.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define __fxstat64 __fxstat64_disable diff --git a/sysdeps/unix/sysv/linux/alpha/fxstatat.c b/sysdeps/unix/sysv/linux/alpha/fxstatat.c index a6fd06b1d6..417f9d3eab 100644 --- a/sysdeps/unix/sysv/linux/alpha/fxstatat.c +++ b/sysdeps/unix/sysv/linux/alpha/fxstatat.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define __fxstatat64 __fxstatat64_disable diff --git a/sysdeps/unix/sysv/linux/alpha/getcontext.S b/sysdeps/unix/sysv/linux/alpha/getcontext.S index f010f337e6..6224b62633 100644 --- a/sysdeps/unix/sysv/linux/alpha/getcontext.S +++ b/sysdeps/unix/sysv/linux/alpha/getcontext.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/alpha/gethostname.c b/sysdeps/unix/sysv/linux/alpha/gethostname.c index 4e15ee43ed..cec26d9815 100644 --- a/sysdeps/unix/sysv/linux/alpha/gethostname.c +++ b/sysdeps/unix/sysv/linux/alpha/gethostname.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/alpha/getitimer.S b/sysdeps/unix/sysv/linux/alpha/getitimer.S index c29b3bdbce..6b18937815 100644 --- a/sysdeps/unix/sysv/linux/alpha/getitimer.S +++ b/sysdeps/unix/sysv/linux/alpha/getitimer.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #define _ERRNO_H 1 diff --git a/sysdeps/unix/sysv/linux/alpha/getrusage.S b/sysdeps/unix/sysv/linux/alpha/getrusage.S index 2516ab022c..0129e30a09 100644 --- a/sysdeps/unix/sysv/linux/alpha/getrusage.S +++ b/sysdeps/unix/sysv/linux/alpha/getrusage.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #define _ERRNO_H 1 diff --git a/sysdeps/unix/sysv/linux/alpha/getsysstats.c b/sysdeps/unix/sysv/linux/alpha/getsysstats.c index f667437b21..5c36d9348f 100644 --- a/sysdeps/unix/sysv/linux/alpha/getsysstats.c +++ b/sysdeps/unix/sysv/linux/alpha/getsysstats.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* We need to define a special parser for /proc/cpuinfo. */ diff --git a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S index 2910830c08..53c43c5545 100644 --- a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S +++ b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #define _ERRNO_H 1 diff --git a/sysdeps/unix/sysv/linux/alpha/glob.c b/sysdeps/unix/sysv/linux/alpha/glob.c index 84573899d6..42bafdba56 100644 --- a/sysdeps/unix/sysv/linux/alpha/glob.c +++ b/sysdeps/unix/sysv/linux/alpha/glob.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define glob64 __no_glob64_decl #define globfree64 __no_globfree64_decl diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S index 4779f175e5..ec24297b0b 100644 --- a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S +++ b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include "kernel_sysinfo.h" diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S index a9c0891aae..1d425249da 100644 --- a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S +++ b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include "kernel_sysinfo.h" diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c index b4e420b1d4..4055c5d564 100644 --- a/sysdeps/unix/sysv/linux/alpha/ioperm.c +++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* I/O access is restricted to ISA port space (ports 0..65535). Modern devices hopefully are sane enough not to put any performance diff --git a/sysdeps/unix/sysv/linux/alpha/kernel-features.h b/sysdeps/unix/sysv/linux/alpha/kernel-features.h index ce4d1607de..1f30c6598b 100644 --- a/sysdeps/unix/sysv/linux/alpha/kernel-features.h +++ b/sysdeps/unix/sysv/linux/alpha/kernel-features.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _KERNEL_FEATURES_H #define _KERNEL_FEATURES_H 1 diff --git a/sysdeps/unix/sysv/linux/alpha/kernel_termios.h b/sysdeps/unix/sysv/linux/alpha/kernel_termios.h index c38f1fac1a..5b3bb89c48 100644 --- a/sysdeps/unix/sysv/linux/alpha/kernel_termios.h +++ b/sysdeps/unix/sysv/linux/alpha/kernel_termios.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _KERNEL_TERMIOS_H #define _KERNEL_TERMIOS_H 1 diff --git a/sysdeps/unix/sysv/linux/alpha/lxstat.c b/sysdeps/unix/sysv/linux/alpha/lxstat.c index 8fa58688ad..b0f1e81478 100644 --- a/sysdeps/unix/sysv/linux/alpha/lxstat.c +++ b/sysdeps/unix/sysv/linux/alpha/lxstat.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define __lxstat64 __lxstat64_disable diff --git a/sysdeps/unix/sysv/linux/alpha/makecontext.S b/sysdeps/unix/sysv/linux/alpha/makecontext.S index 223117e26d..f849259ff5 100644 --- a/sysdeps/unix/sysv/linux/alpha/makecontext.S +++ b/sysdeps/unix/sysv/linux/alpha/makecontext.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/alpha/msgctl.c b/sysdeps/unix/sysv/linux/alpha/msgctl.c index a59911fe40..d606aa0bf0 100644 --- a/sysdeps/unix/sysv/linux/alpha/msgctl.c +++ b/sysdeps/unix/sysv/linux/alpha/msgctl.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h index a7c9740a0a..5198d8d2e8 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h @@ -13,9 +13,8 @@ Library General Public License for more details. You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + License along with the GNU C Library. If not, see + . */ /* The kernel header pollutes the namespace with the NR_OPEN symbol and defines LINK_MAX although filesystems have different maxima. A diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h index bea9955fd0..98479495a8 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _BITS_PTHREADTYPES_H #define _BITS_PTHREADTYPES_H 1 diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/semaphore.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/semaphore.h index be4469c69d..8bb323b498 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/bits/semaphore.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/semaphore.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SEMAPHORE_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/createthread.c b/sysdeps/unix/sysv/linux/alpha/nptl/createthread.c index 6a51e73da6..f1ba82fa1f 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/createthread.c +++ b/sysdeps/unix/sysv/linux/alpha/nptl/createthread.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Value passed to 'clone' for initialization of the thread register. */ #define TLS_VALUE (pd + 1) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/fork.c b/sysdeps/unix/sysv/linux/alpha/nptl/fork.c index 8cc99a2145..a521d705c2 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/fork.c +++ b/sysdeps/unix/sysv/linux/alpha/nptl/fork.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h index 7903745c22..ac364dae18 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h @@ -12,9 +12,8 @@ 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 Libr \ary; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + License along with the GNU C Library. If not, see + . */ #ifndef _LOWLEVELLOCK_H #define _LOWLEVELLOCK_H 1 diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/pt-vfork.S b/sysdeps/unix/sysv/linux/alpha/nptl/pt-vfork.S index ec5d175bec..3719d1b46d 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/pt-vfork.S +++ b/sysdeps/unix/sysv/linux/alpha/nptl/pt-vfork.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c b/sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c index 0e7e9790dd..4b25200c54 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c +++ b/sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include "pthreadP.h" #include diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h index 1db847c9eb..04c7af472c 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/vfork.S b/sysdeps/unix/sysv/linux/alpha/nptl/vfork.S index f4ed9311b0..9695c6d289 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/vfork.S +++ b/sysdeps/unix/sysv/linux/alpha/nptl/vfork.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/alpha/oldglob.c b/sysdeps/unix/sysv/linux/alpha/oldglob.c index 6d9b79f2c3..1b9bbe0d94 100644 --- a/sysdeps/unix/sysv/linux/alpha/oldglob.c +++ b/sysdeps/unix/sysv/linux/alpha/oldglob.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* This file contains only wrappers around the real glob functions. It became necessary since the glob_t structure changed. */ diff --git a/sysdeps/unix/sysv/linux/alpha/register-dump.h b/sysdeps/unix/sysv/linux/alpha/register-dump.h index 77f962952a..36490f58d1 100644 --- a/sysdeps/unix/sysv/linux/alpha/register-dump.h +++ b/sysdeps/unix/sysv/linux/alpha/register-dump.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S index e27949feff..96069c72ba 100644 --- a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S +++ b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/alpha/select.S b/sysdeps/unix/sysv/linux/alpha/select.S index 94f209bff1..9a141398df 100644 --- a/sysdeps/unix/sysv/linux/alpha/select.S +++ b/sysdeps/unix/sysv/linux/alpha/select.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #define _ERRNO_H 1 diff --git a/sysdeps/unix/sysv/linux/alpha/semctl.c b/sysdeps/unix/sysv/linux/alpha/semctl.c index 9957f983bf..d783c5b419 100644 --- a/sysdeps/unix/sysv/linux/alpha/semctl.c +++ b/sysdeps/unix/sysv/linux/alpha/semctl.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/alpha/setcontext.S b/sysdeps/unix/sysv/linux/alpha/setcontext.S index 27abfd0c12..16a0b871e5 100644 --- a/sysdeps/unix/sysv/linux/alpha/setcontext.S +++ b/sysdeps/unix/sysv/linux/alpha/setcontext.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/alpha/setfpucw.c b/sysdeps/unix/sysv/linux/alpha/setfpucw.c index a7e3a55812..becc11f94c 100644 --- a/sysdeps/unix/sysv/linux/alpha/setfpucw.c +++ b/sysdeps/unix/sysv/linux/alpha/setfpucw.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/alpha/setitimer.S b/sysdeps/unix/sysv/linux/alpha/setitimer.S index 59f97f75d9..f8b2f9888b 100644 --- a/sysdeps/unix/sysv/linux/alpha/setitimer.S +++ b/sysdeps/unix/sysv/linux/alpha/setitimer.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #define _ERRNO_H 1 diff --git a/sysdeps/unix/sysv/linux/alpha/settimeofday.S b/sysdeps/unix/sysv/linux/alpha/settimeofday.S index e80d05478a..b56c215fcd 100644 --- a/sysdeps/unix/sysv/linux/alpha/settimeofday.S +++ b/sysdeps/unix/sysv/linux/alpha/settimeofday.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #define _ERRNO_H 1 diff --git a/sysdeps/unix/sysv/linux/alpha/shmctl.c b/sysdeps/unix/sysv/linux/alpha/shmctl.c index e63211fa00..b911bd1357 100644 --- a/sysdeps/unix/sysv/linux/alpha/shmctl.c +++ b/sysdeps/unix/sysv/linux/alpha/shmctl.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/alpha/sigaction.c b/sysdeps/unix/sysv/linux/alpha/sigaction.c index 26b081d9a3..2dcb133442 100644 --- a/sysdeps/unix/sysv/linux/alpha/sigaction.c +++ b/sysdeps/unix/sysv/linux/alpha/sigaction.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h b/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h index 16c5dcbc5b..6f85582a61 100644 --- a/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h +++ b/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define SIGCONTEXT int _code, struct sigcontext * #define SIGCONTEXT_EXTRA_ARGS _code, diff --git a/sysdeps/unix/sysv/linux/alpha/sigprocmask.c b/sysdeps/unix/sysv/linux/alpha/sigprocmask.c index 1916111a22..b7a9e5bf9a 100644 --- a/sysdeps/unix/sysv/linux/alpha/sigprocmask.c +++ b/sysdeps/unix/sysv/linux/alpha/sigprocmask.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S index 6863c07ec1..fff6fb6beb 100644 --- a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S +++ b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* sigsuspend is a special syscall since it needs to dereference the sigset. This will have to change when we have more than 64 signals. */ diff --git a/sysdeps/unix/sysv/linux/alpha/sizes.h b/sysdeps/unix/sysv/linux/alpha/sizes.h index 0c7f4d5d2a..e44054c6e5 100644 --- a/sysdeps/unix/sysv/linux/alpha/sizes.h +++ b/sysdeps/unix/sysv/linux/alpha/sizes.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SIZES_H #define _SIZES_H 1 diff --git a/sysdeps/unix/sysv/linux/alpha/swapcontext.S b/sysdeps/unix/sysv/linux/alpha/swapcontext.S index 1221f67f78..99ed0f8d43 100644 --- a/sysdeps/unix/sysv/linux/alpha/swapcontext.S +++ b/sysdeps/unix/sysv/linux/alpha/swapcontext.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/alpha/sys/acct.h b/sysdeps/unix/sysv/linux/alpha/sys/acct.h index 1e00006ef7..c22f7bab4c 100644 --- a/sysdeps/unix/sysv/linux/alpha/sys/acct.h +++ b/sysdeps/unix/sysv/linux/alpha/sys/acct.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_ACCT_H diff --git a/sysdeps/unix/sysv/linux/alpha/sys/io.h b/sysdeps/unix/sysv/linux/alpha/sys/io.h index 4334c63925..a612a417a3 100644 --- a/sysdeps/unix/sysv/linux/alpha/sys/io.h +++ b/sysdeps/unix/sysv/linux/alpha/sys/io.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_IO_H diff --git a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h index cf4fa9f8e9..1b3769da6a 100644 --- a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_PROCFS_H #define _SYS_PROCFS_H 1 diff --git a/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h b/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h index 438293c62b..1f66987583 100644 --- a/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_UCONTEXT_H #define _SYS_UCONTEXT_H 1 diff --git a/sysdeps/unix/sysv/linux/alpha/sys/user.h b/sysdeps/unix/sysv/linux/alpha/sys/user.h index 193085d5c5..1eb2ede76e 100644 --- a/sysdeps/unix/sysv/linux/alpha/sys/user.h +++ b/sysdeps/unix/sysv/linux/alpha/sys/user.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_USER_H #define _SYS_USER_H 1 diff --git a/sysdeps/unix/sysv/linux/alpha/syscall.S b/sysdeps/unix/sysv/linux/alpha/syscall.S index 02d5d65194..830b10acb6 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscall.S +++ b/sysdeps/unix/sysv/linux/alpha/syscall.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/alpha/sysconf.c b/sysdeps/unix/sysv/linux/alpha/sysconf.c index 5623328c90..afb7aa6d7f 100644 --- a/sysdeps/unix/sysv/linux/alpha/sysconf.c +++ b/sysdeps/unix/sysv/linux/alpha/sysconf.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h index f0661d1622..7616ba980d 100644 --- a/sysdeps/unix/sysv/linux/alpha/sysdep.h +++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _LINUX_ALPHA_SYSDEP_H #define _LINUX_ALPHA_SYSDEP_H 1 diff --git a/sysdeps/unix/sysv/linux/alpha/utimes.S b/sysdeps/unix/sysv/linux/alpha/utimes.S index 2ab2b19c0d..18eb136742 100644 --- a/sysdeps/unix/sysv/linux/alpha/utimes.S +++ b/sysdeps/unix/sysv/linux/alpha/utimes.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #define _ERRNO_H 1 diff --git a/sysdeps/unix/sysv/linux/alpha/wait4.S b/sysdeps/unix/sysv/linux/alpha/wait4.S index 5e1e5d4603..7a71fd01ef 100644 --- a/sysdeps/unix/sysv/linux/alpha/wait4.S +++ b/sysdeps/unix/sysv/linux/alpha/wait4.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #define _ERRNO_H 1 diff --git a/sysdeps/unix/sysv/linux/alpha/xstat.c b/sysdeps/unix/sysv/linux/alpha/xstat.c index 530d399187..a25431cfc3 100644 --- a/sysdeps/unix/sysv/linux/alpha/xstat.c +++ b/sysdeps/unix/sysv/linux/alpha/xstat.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define __xstat64 __xstat64_disable diff --git a/sysdeps/unix/sysv/linux/alpha/xstatconv.c b/sysdeps/unix/sysv/linux/alpha/xstatconv.c index 86bb374745..d1dc64fedd 100644 --- a/sysdeps/unix/sysv/linux/alpha/xstatconv.c +++ b/sysdeps/unix/sysv/linux/alpha/xstatconv.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/alpha/xstatconv.h b/sysdeps/unix/sysv/linux/alpha/xstatconv.h index 21e1de8de6..ea4cbb0274 100644 --- a/sysdeps/unix/sysv/linux/alpha/xstatconv.h +++ b/sysdeps/unix/sysv/linux/alpha/xstatconv.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/am33/bits/fcntl.h b/sysdeps/unix/sysv/linux/am33/bits/fcntl.h index 9a95318192..33b8bcd37e 100644 --- a/sysdeps/unix/sysv/linux/am33/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/am33/bits/fcntl.h @@ -13,9 +13,8 @@ Library General Public License for more details. You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + License along with the GNU C Library. If not, see + . */ #ifndef _FCNTL_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/am33/bits/mman.h b/sysdeps/unix/sysv/linux/am33/bits/mman.h index 99fceda887..763b060e66 100644 --- a/sysdeps/unix/sysv/linux/am33/bits/mman.h +++ b/sysdeps/unix/sysv/linux/am33/bits/mman.h @@ -13,9 +13,8 @@ Library General Public License for more details. You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_MMAN_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/am33/brk.c b/sysdeps/unix/sysv/linux/am33/brk.c index f56736359e..a06495cf29 100644 --- a/sysdeps/unix/sysv/linux/am33/brk.c +++ b/sysdeps/unix/sysv/linux/am33/brk.c @@ -15,9 +15,8 @@ Library General Public License for more details. You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/am33/clone.S b/sysdeps/unix/sysv/linux/am33/clone.S index 26ba740d24..e014c4ace9 100644 --- a/sysdeps/unix/sysv/linux/am33/clone.S +++ b/sysdeps/unix/sysv/linux/am33/clone.S @@ -14,9 +14,8 @@ Library General Public License for more details. You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + License along with the GNU C Library. If not, see + . */ /* clone() is even more special than fork() as it mucks with stacks and invokes a function in the right context after its all over. */ diff --git a/sysdeps/unix/sysv/linux/am33/linuxthreads/sysdep-cancel.h b/sysdeps/unix/sysv/linux/am33/linuxthreads/sysdep-cancel.h index 56d3bb62f8..5f3dab5c40 100644 --- a/sysdeps/unix/sysv/linux/am33/linuxthreads/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/am33/linuxthreads/sysdep-cancel.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/am33/profil-counter.h b/sysdeps/unix/sysv/linux/am33/profil-counter.h index 31422bb7e4..f4b7eaae76 100644 --- a/sysdeps/unix/sysv/linux/am33/profil-counter.h +++ b/sysdeps/unix/sysv/linux/am33/profil-counter.h @@ -13,9 +13,8 @@ Library General Public License for more details. You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/am33/socket.S b/sysdeps/unix/sysv/linux/am33/socket.S index 2c09239f32..b4d3caab8a 100644 --- a/sysdeps/unix/sysv/linux/am33/socket.S +++ b/sysdeps/unix/sysv/linux/am33/socket.S @@ -14,9 +14,8 @@ Library General Public License for more details. You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/am33/syscall.S b/sysdeps/unix/sysv/linux/am33/syscall.S index 180e5822c6..63fa6ddcd4 100644 --- a/sysdeps/unix/sysv/linux/am33/syscall.S +++ b/sysdeps/unix/sysv/linux/am33/syscall.S @@ -14,9 +14,8 @@ Library General Public License for more details. You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/am33/sysdep.S b/sysdeps/unix/sysv/linux/am33/sysdep.S index b41bfce403..877fd1e082 100644 --- a/sysdeps/unix/sysv/linux/am33/sysdep.S +++ b/sysdeps/unix/sysv/linux/am33/sysdep.S @@ -15,9 +15,8 @@ Library General Public License for more details. You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/am33/sysdep.h b/sysdeps/unix/sysv/linux/am33/sysdep.h index b0ff4ec867..68f93f8003 100644 --- a/sysdeps/unix/sysv/linux/am33/sysdep.h +++ b/sysdeps/unix/sysv/linux/am33/sysdep.h @@ -14,9 +14,8 @@ Library General Public License for more details. You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + License along with the GNU C Library. If not, see + . */ #ifndef _LINUX_AM33_SYSDEP_H #define _LINUX_AM33_SYSDEP_H 1 diff --git a/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S b/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S index 8eeff6b26a..d42e4051d0 100644 --- a/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S +++ b/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S @@ -29,9 +29,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h index cf8e32a4fa..ef49d5fa2b 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _FCNTL_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/arm/bits/mman.h b/sysdeps/unix/sysv/linux/arm/bits/mman.h index 058c7a0fba..0b24db1034 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/mman.h +++ b/sysdeps/unix/sysv/linux/arm/bits/mman.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_MMAN_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/arm/bits/shm.h b/sysdeps/unix/sysv/linux/arm/bits/shm.h index b723cc9299..03785249bb 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/shm.h +++ b/sysdeps/unix/sysv/linux/arm/bits/shm.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_SHM_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/arm/brk.c b/sysdeps/unix/sysv/linux/arm/brk.c index 842688a76c..805ce9d9a7 100644 --- a/sysdeps/unix/sysv/linux/arm/brk.c +++ b/sysdeps/unix/sysv/linux/arm/brk.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/arm/clone.S b/sysdeps/unix/sysv/linux/arm/clone.S index f3d6741f9f..8da41171fe 100644 --- a/sysdeps/unix/sysv/linux/arm/clone.S +++ b/sysdeps/unix/sysv/linux/arm/clone.S @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* clone() is even more special than fork() as it mucks with stacks and invokes a function in the right context after its all over. */ diff --git a/sysdeps/unix/sysv/linux/arm/dl-procinfo.c b/sysdeps/unix/sysv/linux/arm/dl-procinfo.c index 03e1511dc7..64a444482a 100644 --- a/sysdeps/unix/sysv/linux/arm/dl-procinfo.c +++ b/sysdeps/unix/sysv/linux/arm/dl-procinfo.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* This information must be kept in sync with the _DL_HWCAP_COUNT and _DL_PLATFORM_COUNT definitions in procinfo.h. diff --git a/sysdeps/unix/sysv/linux/arm/dl-procinfo.h b/sysdeps/unix/sysv/linux/arm/dl-procinfo.h index d3fc385570..7fe6674d49 100644 --- a/sysdeps/unix/sysv/linux/arm/dl-procinfo.h +++ b/sysdeps/unix/sysv/linux/arm/dl-procinfo.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _DL_PROCINFO_H #define _DL_PROCINFO_H 1 diff --git a/sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S b/sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S index 9d8e464583..8ec41521ca 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S +++ b/sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c b/sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c index 38a4fbcd6e..ad5eb186c2 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c +++ b/sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S b/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S index 3d3792a9be..0ec81734f8 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S +++ b/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/arm/eabi/mmap64.S b/sysdeps/unix/sysv/linux/arm/eabi/mmap64.S index 59352f71d4..be4dd52de4 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/mmap64.S +++ b/sysdeps/unix/sysv/linux/arm/eabi/mmap64.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h index 3fadebde72..c26bec3dca 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c index 011746d0e8..29e2c2b00b 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c +++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c @@ -13,9 +13,8 @@ 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; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c index cdab10e305..285b99b5ed 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c +++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c @@ -13,9 +13,8 @@ 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; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h index eeb9cf8b62..9b6bed8e3c 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h +++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h @@ -22,9 +22,8 @@ General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to - the Free Software Foundation, 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ + along with this program. If not, see + . */ /* Language-independent unwinder header public defines. This contains both ABI defined objects, and GNU support routines. */ diff --git a/sysdeps/unix/sysv/linux/arm/eabi/pread.c b/sysdeps/unix/sysv/linux/arm/eabi/pread.c index b6d2aeaa5d..4efe349e93 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/pread.c +++ b/sysdeps/unix/sysv/linux/arm/eabi/pread.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/arm/eabi/pread64.c b/sysdeps/unix/sysv/linux/arm/eabi/pread64.c index 3b4608e5cf..59bd9cfe0b 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/pread64.c +++ b/sysdeps/unix/sysv/linux/arm/eabi/pread64.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/arm/eabi/pwrite.c b/sysdeps/unix/sysv/linux/arm/eabi/pwrite.c index 0200b9cc5c..43788e5420 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/pwrite.c +++ b/sysdeps/unix/sysv/linux/arm/eabi/pwrite.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/arm/eabi/pwrite64.c b/sysdeps/unix/sysv/linux/arm/eabi/pwrite64.c index cf33165cdd..c7bfdaf9f3 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/pwrite64.c +++ b/sysdeps/unix/sysv/linux/arm/eabi/pwrite64.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/arm/eabi/readahead.c b/sysdeps/unix/sysv/linux/arm/eabi/readahead.c index 946745cb4d..2d15b09c4a 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/readahead.c +++ b/sysdeps/unix/sysv/linux/arm/eabi/readahead.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S b/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S index 09ff9c7d91..b8ae839f5d 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S +++ b/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/arm/eabi/syscall.S b/sysdeps/unix/sysv/linux/arm/eabi/syscall.S index f6d775e0aa..3faf919d85 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/syscall.S +++ b/sysdeps/unix/sysv/linux/arm/eabi/syscall.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h b/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h index a80621e142..408142c1af 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h @@ -16,9 +16,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _LINUX_ARM_EABI_SYSDEP_H #define _LINUX_ARM_EABI_SYSDEP_H 1 diff --git a/sysdeps/unix/sysv/linux/arm/eabi/truncate64.c b/sysdeps/unix/sysv/linux/arm/eabi/truncate64.c index 6a9c348d87..409bf19333 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/truncate64.c +++ b/sysdeps/unix/sysv/linux/arm/eabi/truncate64.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/arm/eabi/umount.c b/sysdeps/unix/sysv/linux/arm/eabi/umount.c index e7c5690890..d9d671f88d 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/umount.c +++ b/sysdeps/unix/sysv/linux/arm/eabi/umount.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Since we don't have an oldumount system call, do what the kernel does down here. */ diff --git a/sysdeps/unix/sysv/linux/arm/ioperm.c b/sysdeps/unix/sysv/linux/arm/ioperm.c index 8ac9b09c25..edb29461a3 100644 --- a/sysdeps/unix/sysv/linux/arm/ioperm.c +++ b/sysdeps/unix/sysv/linux/arm/ioperm.c @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* I/O port access on the ARM is something of a fiction. What we do is to map an appropriate area of /dev/mem into user space so that a program diff --git a/sysdeps/unix/sysv/linux/arm/kernel-features.h b/sysdeps/unix/sysv/linux/arm/kernel-features.h index 3996ae9c13..0d235e4534 100644 --- a/sysdeps/unix/sysv/linux/arm/kernel-features.h +++ b/sysdeps/unix/sysv/linux/arm/kernel-features.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* The utimes syscall was added before 2.6.1. */ #if __LINUX_KERNEL_VERSION >= 132609 diff --git a/sysdeps/unix/sysv/linux/arm/ldsodefs.h b/sysdeps/unix/sysv/linux/arm/ldsodefs.h index 3747c3b5ae..839dc18929 100644 --- a/sysdeps/unix/sysv/linux/arm/ldsodefs.h +++ b/sysdeps/unix/sysv/linux/arm/ldsodefs.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _ARM_LINUX_LDSODEFS_H #define _ARM_LINUX_LDSODEFS_H 1 diff --git a/sysdeps/unix/sysv/linux/arm/mmap.S b/sysdeps/unix/sysv/linux/arm/mmap.S index abac9e0669..62bf8ee1f8 100644 --- a/sysdeps/unix/sysv/linux/arm/mmap.S +++ b/sysdeps/unix/sysv/linux/arm/mmap.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h b/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h index 979db9fe8d..4e810a28d6 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h +++ b/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h index bb186aec06..5e4402088c 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h +++ b/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _BITS_PTHREADTYPES_H #define _BITS_PTHREADTYPES_H 1 diff --git a/sysdeps/unix/sysv/linux/arm/nptl/bits/semaphore.h b/sysdeps/unix/sysv/linux/arm/nptl/bits/semaphore.h index dadfac2af2..3ed1424d79 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/bits/semaphore.h +++ b/sysdeps/unix/sysv/linux/arm/nptl/bits/semaphore.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SEMAPHORE_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/arm/nptl/createthread.c b/sysdeps/unix/sysv/linux/arm/nptl/createthread.c index 01bd8ce180..e057a98eaf 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/createthread.c +++ b/sysdeps/unix/sysv/linux/arm/nptl/createthread.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Value passed to 'clone' for initialization of the thread register. */ #define TLS_VALUE (pd + 1) diff --git a/sysdeps/unix/sysv/linux/arm/nptl/fork.c b/sysdeps/unix/sysv/linux/arm/nptl/fork.c index 310676f7aa..6218250d39 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/fork.c +++ b/sysdeps/unix/sysv/linux/arm/nptl/fork.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c index 8ba606550c..f3f0474dd7 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c +++ b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h index e745e6655f..b9fa69ce37 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _LOWLEVELLOCK_H #define _LOWLEVELLOCK_H 1 diff --git a/sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S b/sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S index 964a389a65..b079df6e96 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S +++ b/sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c b/sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c index d81ecd4e5a..5c6d26d3e2 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c +++ b/sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include "pthreadP.h" #include diff --git a/sysdeps/unix/sysv/linux/arm/nptl/vfork.S b/sysdeps/unix/sysv/linux/arm/nptl/vfork.S index 009d03ad95..235380198b 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/vfork.S +++ b/sysdeps/unix/sysv/linux/arm/nptl/vfork.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/arm/posix_fadvise.c b/sysdeps/unix/sysv/linux/arm/posix_fadvise.c index bb5dd0e8f1..7412600ddc 100644 --- a/sysdeps/unix/sysv/linux/arm/posix_fadvise.c +++ b/sysdeps/unix/sysv/linux/arm/posix_fadvise.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/arm/posix_fadvise64.c b/sysdeps/unix/sysv/linux/arm/posix_fadvise64.c index 86752f884f..174c3bb290 100644 --- a/sysdeps/unix/sysv/linux/arm/posix_fadvise64.c +++ b/sysdeps/unix/sysv/linux/arm/posix_fadvise64.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/arm/register-dump.h b/sysdeps/unix/sysv/linux/arm/register-dump.h index 73ec5fecfe..32c15eea67 100644 --- a/sysdeps/unix/sysv/linux/arm/register-dump.h +++ b/sysdeps/unix/sysv/linux/arm/register-dump.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/arm/sigaction.c b/sysdeps/unix/sysv/linux/arm/sigaction.c index 707c0fa299..4f6e8bff9d 100644 --- a/sysdeps/unix/sysv/linux/arm/sigaction.c +++ b/sysdeps/unix/sysv/linux/arm/sigaction.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h b/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h index 72136fdfa0..12a7e73b56 100644 --- a/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h +++ b/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include "kernel-features.h" diff --git a/sysdeps/unix/sysv/linux/arm/socket.S b/sysdeps/unix/sysv/linux/arm/socket.S index 22d0c1ab02..5d238d3ed5 100644 --- a/sysdeps/unix/sysv/linux/arm/socket.S +++ b/sysdeps/unix/sysv/linux/arm/socket.S @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/arm/sys/elf.h b/sysdeps/unix/sysv/linux/arm/sys/elf.h index faa7310682..158d3183f7 100644 --- a/sysdeps/unix/sysv/linux/arm/sys/elf.h +++ b/sysdeps/unix/sysv/linux/arm/sys/elf.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_ELF_H #define _SYS_ELF_H 1 diff --git a/sysdeps/unix/sysv/linux/arm/sys/io.h b/sysdeps/unix/sysv/linux/arm/sys/io.h index 0712a47293..a6243dd6c9 100644 --- a/sysdeps/unix/sysv/linux/arm/sys/io.h +++ b/sysdeps/unix/sysv/linux/arm/sys/io.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_IO_H diff --git a/sysdeps/unix/sysv/linux/arm/sys/procfs.h b/sysdeps/unix/sysv/linux/arm/sys/procfs.h index 3b3736324f..4a10017ced 100644 --- a/sysdeps/unix/sysv/linux/arm/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/arm/sys/procfs.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_PROCFS_H #define _SYS_PROCFS_H 1 diff --git a/sysdeps/unix/sysv/linux/arm/sys/ucontext.h b/sysdeps/unix/sysv/linux/arm/sys/ucontext.h index 58f438cf43..546e42a533 100644 --- a/sysdeps/unix/sysv/linux/arm/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/arm/sys/ucontext.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* System V/ARM ABI compliant context switching support. */ diff --git a/sysdeps/unix/sysv/linux/arm/sys/user.h b/sysdeps/unix/sysv/linux/arm/sys/user.h index 3fae43f83f..84f517be43 100644 --- a/sysdeps/unix/sysv/linux/arm/sys/user.h +++ b/sysdeps/unix/sysv/linux/arm/sys/user.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_USER_H #define _SYS_USER_H 1 diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.S b/sysdeps/unix/sysv/linux/arm/sysdep.S index 72541dd5ca..41bedfae8d 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.S +++ b/sysdeps/unix/sysv/linux/arm/sysdep.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index e647d42ea4..4d08ea9e4e 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _LINUX_ARM_SYSDEP_H #define _LINUX_ARM_SYSDEP_H 1 diff --git a/sysdeps/unix/sysv/linux/arm/vfork.S b/sysdeps/unix/sysv/linux/arm/vfork.S index e63690eecb..cbd42e8613 100644 --- a/sysdeps/unix/sysv/linux/arm/vfork.S +++ b/sysdeps/unix/sysv/linux/arm/vfork.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #define _ERRNO_H 1 diff --git a/sysdeps/unix/sysv/linux/generic/____longjmp_chk.c b/sysdeps/unix/sysv/linux/generic/____longjmp_chk.c index 62b7905aed..619785d7e8 100644 --- a/sysdeps/unix/sysv/linux/generic/____longjmp_chk.c +++ b/sysdeps/unix/sysv/linux/generic/____longjmp_chk.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/access.c b/sysdeps/unix/sysv/linux/generic/access.c index 96b1cd0955..177f0ed211 100644 --- a/sysdeps/unix/sysv/linux/generic/access.c +++ b/sysdeps/unix/sysv/linux/generic/access.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/bits/fcntl.h b/sysdeps/unix/sysv/linux/generic/bits/fcntl.h index cbea2a435c..a8f20bd0b1 100644 --- a/sysdeps/unix/sysv/linux/generic/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/generic/bits/fcntl.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _FCNTL_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/generic/bits/msq.h b/sysdeps/unix/sysv/linux/generic/bits/msq.h index 351af358f7..bf12ba9b53 100644 --- a/sysdeps/unix/sysv/linux/generic/bits/msq.h +++ b/sysdeps/unix/sysv/linux/generic/bits/msq.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_MSG_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/generic/bits/sem.h b/sysdeps/unix/sysv/linux/generic/bits/sem.h index bfb87dbef4..003961717f 100644 --- a/sysdeps/unix/sysv/linux/generic/bits/sem.h +++ b/sysdeps/unix/sysv/linux/generic/bits/sem.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_SEM_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/generic/bits/shm.h b/sysdeps/unix/sysv/linux/generic/bits/shm.h index 8aec5fc2db..a22dd14ff7 100644 --- a/sysdeps/unix/sysv/linux/generic/bits/shm.h +++ b/sysdeps/unix/sysv/linux/generic/bits/shm.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_SHM_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/generic/bits/stat.h b/sysdeps/unix/sysv/linux/generic/bits/stat.h index d3cec6ff3e..f9aa66ebc7 100644 --- a/sysdeps/unix/sysv/linux/generic/bits/stat.h +++ b/sysdeps/unix/sysv/linux/generic/bits/stat.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/generic/bits/statfs.h b/sysdeps/unix/sysv/linux/generic/bits/statfs.h index bde1958a9e..bbc5da786e 100644 --- a/sysdeps/unix/sysv/linux/generic/bits/statfs.h +++ b/sysdeps/unix/sysv/linux/generic/bits/statfs.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_STATFS_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/generic/bits/typesizes.h b/sysdeps/unix/sysv/linux/generic/bits/typesizes.h index 9ff568d933..cd166fcae8 100644 --- a/sysdeps/unix/sysv/linux/generic/bits/typesizes.h +++ b/sysdeps/unix/sysv/linux/generic/bits/typesizes.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _BITS_TYPES_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/generic/brk.c b/sysdeps/unix/sysv/linux/generic/brk.c index eb2bc6b9d5..006c3da079 100644 --- a/sysdeps/unix/sysv/linux/generic/brk.c +++ b/sysdeps/unix/sysv/linux/generic/brk.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/chmod.c b/sysdeps/unix/sysv/linux/generic/chmod.c index 96e5641c89..e3a791d96d 100644 --- a/sysdeps/unix/sysv/linux/generic/chmod.c +++ b/sysdeps/unix/sysv/linux/generic/chmod.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/chown.c b/sysdeps/unix/sysv/linux/generic/chown.c index 6ec0263f6d..f3e78362c4 100644 --- a/sysdeps/unix/sysv/linux/generic/chown.c +++ b/sysdeps/unix/sysv/linux/generic/chown.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/creat.c b/sysdeps/unix/sysv/linux/generic/creat.c index 8ef5c03763..db79e3b2f7 100644 --- a/sysdeps/unix/sysv/linux/generic/creat.c +++ b/sysdeps/unix/sysv/linux/generic/creat.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/dl-origin.c b/sysdeps/unix/sysv/linux/generic/dl-origin.c index 46bbbb1180..4502f15d01 100644 --- a/sysdeps/unix/sysv/linux/generic/dl-origin.c +++ b/sysdeps/unix/sysv/linux/generic/dl-origin.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/dup2.c b/sysdeps/unix/sysv/linux/generic/dup2.c index 4562f19adf..6dbcb94e6d 100644 --- a/sysdeps/unix/sysv/linux/generic/dup2.c +++ b/sysdeps/unix/sysv/linux/generic/dup2.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/epoll_create.c b/sysdeps/unix/sysv/linux/generic/epoll_create.c index ab6b158a76..2e0aff4382 100644 --- a/sysdeps/unix/sysv/linux/generic/epoll_create.c +++ b/sysdeps/unix/sysv/linux/generic/epoll_create.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/epoll_wait.c b/sysdeps/unix/sysv/linux/generic/epoll_wait.c index 0fa06e8e39..112777a863 100644 --- a/sysdeps/unix/sysv/linux/generic/epoll_wait.c +++ b/sysdeps/unix/sysv/linux/generic/epoll_wait.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/futimesat.c b/sysdeps/unix/sysv/linux/generic/futimesat.c index 20153661c0..46ce0cc8ba 100644 --- a/sysdeps/unix/sysv/linux/generic/futimesat.c +++ b/sysdeps/unix/sysv/linux/generic/futimesat.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/getdents64.c b/sysdeps/unix/sysv/linux/generic/getdents64.c index 9a01f4bf6b..abbb729fa9 100644 --- a/sysdeps/unix/sysv/linux/generic/getdents64.c +++ b/sysdeps/unix/sysv/linux/generic/getdents64.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/inotify_init.c b/sysdeps/unix/sysv/linux/generic/inotify_init.c index 84c0b357e4..0b529b9946 100644 --- a/sysdeps/unix/sysv/linux/generic/inotify_init.c +++ b/sysdeps/unix/sysv/linux/generic/inotify_init.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/kernel_stat.h b/sysdeps/unix/sysv/linux/generic/kernel_stat.h index 7343d83f64..6ae827fdfe 100644 --- a/sysdeps/unix/sysv/linux/generic/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/generic/kernel_stat.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/generic/lchown.c b/sysdeps/unix/sysv/linux/generic/lchown.c index a35ef951c9..f0907208b6 100644 --- a/sysdeps/unix/sysv/linux/generic/lchown.c +++ b/sysdeps/unix/sysv/linux/generic/lchown.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/link.c b/sysdeps/unix/sysv/linux/generic/link.c index bab52d1da0..49fffb4f12 100644 --- a/sysdeps/unix/sysv/linux/generic/link.c +++ b/sysdeps/unix/sysv/linux/generic/link.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/lxstat.c b/sysdeps/unix/sysv/linux/generic/lxstat.c index c99ead1620..1336a910c0 100644 --- a/sysdeps/unix/sysv/linux/generic/lxstat.c +++ b/sysdeps/unix/sysv/linux/generic/lxstat.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Ignore prototype to avoid error if we alias __lxstat and __lxstat64. */ #define __lxstat64 __lxstat64_disable diff --git a/sysdeps/unix/sysv/linux/generic/mkdir.c b/sysdeps/unix/sysv/linux/generic/mkdir.c index bf345bc538..5ad64c1104 100644 --- a/sysdeps/unix/sysv/linux/generic/mkdir.c +++ b/sysdeps/unix/sysv/linux/generic/mkdir.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/not-cancel.h b/sysdeps/unix/sysv/linux/generic/not-cancel.h index a95e2e9773..ae46e168fe 100644 --- a/sysdeps/unix/sysv/linux/generic/not-cancel.h +++ b/sysdeps/unix/sysv/linux/generic/not-cancel.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/open.c b/sysdeps/unix/sysv/linux/generic/open.c index c985835cae..2f895033bf 100644 --- a/sysdeps/unix/sysv/linux/generic/open.c +++ b/sysdeps/unix/sysv/linux/generic/open.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/open64.c b/sysdeps/unix/sysv/linux/generic/open64.c index 199699a1c9..4597a79831 100644 --- a/sysdeps/unix/sysv/linux/generic/open64.c +++ b/sysdeps/unix/sysv/linux/generic/open64.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/pause.c b/sysdeps/unix/sysv/linux/generic/pause.c index f1333cb5ac..805b5d4bce 100644 --- a/sysdeps/unix/sysv/linux/generic/pause.c +++ b/sysdeps/unix/sysv/linux/generic/pause.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/pipe.c b/sysdeps/unix/sysv/linux/generic/pipe.c index d6d5ef1ab7..ca5c533355 100644 --- a/sysdeps/unix/sysv/linux/generic/pipe.c +++ b/sysdeps/unix/sysv/linux/generic/pipe.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/poll.c b/sysdeps/unix/sysv/linux/generic/poll.c index 1fac1e7744..d1dcd8a866 100644 --- a/sysdeps/unix/sysv/linux/generic/poll.c +++ b/sysdeps/unix/sysv/linux/generic/poll.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/readlink.c b/sysdeps/unix/sysv/linux/generic/readlink.c index ee46c19611..09cbf2b9a1 100644 --- a/sysdeps/unix/sysv/linux/generic/readlink.c +++ b/sysdeps/unix/sysv/linux/generic/readlink.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/readlink_chk.c b/sysdeps/unix/sysv/linux/generic/readlink_chk.c index db8aa20556..e1724aafeb 100644 --- a/sysdeps/unix/sysv/linux/generic/readlink_chk.c +++ b/sysdeps/unix/sysv/linux/generic/readlink_chk.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/recv.c b/sysdeps/unix/sysv/linux/generic/recv.c index d76a9e60b0..ebff889979 100644 --- a/sysdeps/unix/sysv/linux/generic/recv.c +++ b/sysdeps/unix/sysv/linux/generic/recv.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/rename.c b/sysdeps/unix/sysv/linux/generic/rename.c index 7e501a40fb..50056e4ebe 100644 --- a/sysdeps/unix/sysv/linux/generic/rename.c +++ b/sysdeps/unix/sysv/linux/generic/rename.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/rmdir.c b/sysdeps/unix/sysv/linux/generic/rmdir.c index 2478fc6d80..97e0681628 100644 --- a/sysdeps/unix/sysv/linux/generic/rmdir.c +++ b/sysdeps/unix/sysv/linux/generic/rmdir.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/select.c b/sysdeps/unix/sysv/linux/generic/select.c index d206040d1f..143ebc9a07 100644 --- a/sysdeps/unix/sysv/linux/generic/select.c +++ b/sysdeps/unix/sysv/linux/generic/select.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/send.c b/sysdeps/unix/sysv/linux/generic/send.c index 1ff25c51b9..28af554ed2 100644 --- a/sysdeps/unix/sysv/linux/generic/send.c +++ b/sysdeps/unix/sysv/linux/generic/send.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/symlink.c b/sysdeps/unix/sysv/linux/generic/symlink.c index ed2b2ab529..3d947c5e72 100644 --- a/sysdeps/unix/sysv/linux/generic/symlink.c +++ b/sysdeps/unix/sysv/linux/generic/symlink.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/sysctl.c b/sysdeps/unix/sysv/linux/generic/sysctl.c index 7cab3a4c25..0bdb78660b 100644 --- a/sysdeps/unix/sysv/linux/generic/sysctl.c +++ b/sysdeps/unix/sysv/linux/generic/sysctl.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/generic/sysdep.h b/sysdeps/unix/sysv/linux/generic/sysdep.h index 45151c07e1..842a196386 100644 --- a/sysdeps/unix/sysv/linux/generic/sysdep.h +++ b/sysdeps/unix/sysv/linux/generic/sysdep.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/umount.c b/sysdeps/unix/sysv/linux/generic/umount.c index 9b92ffe7bd..c799b22ba6 100644 --- a/sysdeps/unix/sysv/linux/generic/umount.c +++ b/sysdeps/unix/sysv/linux/generic/umount.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Since the generic Linux syscall ABI doesn't have an oldumount system call, do what the kernel does down here. */ diff --git a/sysdeps/unix/sysv/linux/generic/unlink.c b/sysdeps/unix/sysv/linux/generic/unlink.c index b115212d52..3969867f29 100644 --- a/sysdeps/unix/sysv/linux/generic/unlink.c +++ b/sysdeps/unix/sysv/linux/generic/unlink.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/ustat.c b/sysdeps/unix/sysv/linux/generic/ustat.c index 73e789216f..7611e82f0f 100644 --- a/sysdeps/unix/sysv/linux/generic/ustat.c +++ b/sysdeps/unix/sysv/linux/generic/ustat.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/utimes.c b/sysdeps/unix/sysv/linux/generic/utimes.c index c366e6a759..9ecef48c71 100644 --- a/sysdeps/unix/sysv/linux/generic/utimes.c +++ b/sysdeps/unix/sysv/linux/generic/utimes.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/fcntl.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/fcntl.c index 6619ff7527..b66190bc08 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/fcntl.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/fcntl.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/fstatfs.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/fstatfs.c index aa866edde1..21d92d6cb3 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/fstatfs.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/fstatfs.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/ftruncate.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/ftruncate.c index d962e4528f..a5b5808ebe 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/ftruncate.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/ftruncate.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/ftruncate64.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/ftruncate64.c index b0e52b9d58..4ccfa78b4d 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/ftruncate64.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/ftruncate64.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstat.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstat.c index 7df3240f4c..70551bedca 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstat.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstat.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstatat.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstatat.c index 2ab639a73b..790d85c981 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstatat.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstatat.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/getdents.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/getdents.c index 2f22b89a6c..d7d0f04f43 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/getdents.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/getdents.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/llseek.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/llseek.c index 835595761e..699e602536 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/llseek.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/llseek.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/lseek.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/lseek.c index ed5d18b1dd..a9a75e88a0 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/lseek.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/lseek.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat.c index 0fa91ecb0d..db1d885a4d 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat64.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat64.c index 3d65692d17..5a43dc6f42 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat64.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat64.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/mmap.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/mmap.c index 1c2d8ddf7a..588ad6bd81 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/mmap.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/mmap.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/overflow.h b/sysdeps/unix/sysv/linux/generic/wordsize-32/overflow.h index 2bfa7d9cda..59432249e4 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/overflow.h +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/overflow.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/posix_fadvise.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/posix_fadvise.c index 735b676747..f8f486cb71 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/posix_fadvise.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/posix_fadvise.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/pread.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/pread.c index 86362107c3..5145755e80 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/pread.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/pread.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/pread64.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/pread64.c index 1e58c3188e..fd3aa1f280 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/pread64.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/pread64.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/preadv.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/preadv.c index e1825cebb8..a110c1584d 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/preadv.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/preadv.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/preadv64.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/preadv64.c index ed6eeed527..b08a470c5d 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/preadv64.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/preadv64.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite.c index 84d5d2f6af..0f226ff79a 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite64.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite64.c index f1629fa059..1afc13d245 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite64.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite64.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/pwritev.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/pwritev.c index 68cdf942f4..cc6bf5dd02 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/pwritev.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/pwritev.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/pwritev64.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/pwritev64.c index 0e25d0ceb6..752cbcab83 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/pwritev64.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/pwritev64.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/sendfile.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/sendfile.c index 120fe2f09a..eb4a13ea4c 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/sendfile.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/sendfile.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/statfs.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/statfs.c index a5156b8829..a451a2c5c3 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/statfs.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/statfs.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/truncate.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/truncate.c index 0692d05ca7..c07f830937 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/truncate.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/truncate.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/truncate64.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/truncate64.c index b7bb0d962a..27ddb1bd02 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/truncate64.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/truncate64.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/xstat.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/xstat.c index 721afbe954..7431a37b60 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/xstat.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/xstat.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/xstat64.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/xstat64.c index 5358b291b2..b4ad5b6c7c 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/xstat64.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/xstat64.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/xmknod.c b/sysdeps/unix/sysv/linux/generic/xmknod.c index 6f3f535d9e..924092dfff 100644 --- a/sysdeps/unix/sysv/linux/generic/xmknod.c +++ b/sysdeps/unix/sysv/linux/generic/xmknod.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/generic/xstat.c b/sysdeps/unix/sysv/linux/generic/xstat.c index 4fd963a1d5..14cea4aa18 100644 --- a/sysdeps/unix/sysv/linux/generic/xstat.c +++ b/sysdeps/unix/sysv/linux/generic/xstat.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Ignore prototype to avoid error if we alias __xstat and __xstat64. */ #define __xstat64 __xstat64_disable diff --git a/sysdeps/unix/sysv/linux/hppa/bits/atomic.h b/sysdeps/unix/sysv/linux/hppa/bits/atomic.h index 120b19bd5e..89823d279f 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/atomic.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/atomic.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include /* Required for type definitions e.g. uint8_t. */ #include /* Required for ABORT_INSTRUCTIUON. */ diff --git a/sysdeps/unix/sysv/linux/hppa/bits/errno.h b/sysdeps/unix/sysv/linux/hppa/bits/errno.h index 742448dd4e..2487739e35 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/errno.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/errno.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifdef _ERRNO_H diff --git a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h index 8f42111cf4..c0e949eea3 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _FCNTL_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/hppa/bits/ioctls.h b/sysdeps/unix/sysv/linux/hppa/bits/ioctls.h index 6f4e05fcc8..7e9ed169fb 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/ioctls.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/ioctls.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_IOCTL_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/hppa/bits/ipc.h b/sysdeps/unix/sysv/linux/hppa/bits/ipc.h index d80cf06993..350fd2b8f3 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/ipc.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/ipc.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_IPC_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/hppa/bits/mman.h b/sysdeps/unix/sysv/linux/hppa/bits/mman.h index 780862a38d..e269a44e51 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/mman.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/mman.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_MMAN_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/hppa/bits/msq.h b/sysdeps/unix/sysv/linux/hppa/bits/msq.h index 1268dc858c..d258ab5af7 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/msq.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/msq.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_MSG_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/hppa/bits/sem.h b/sysdeps/unix/sysv/linux/hppa/bits/sem.h index 2880765108..f5b48b9752 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/sem.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/sem.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_SEM_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/hppa/bits/shm.h b/sysdeps/unix/sysv/linux/hppa/bits/shm.h index 13efced9f8..2e43b20f78 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/shm.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/shm.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_SHM_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/hppa/bits/sigaction.h b/sysdeps/unix/sysv/linux/hppa/bits/sigaction.h index 33f2b237b7..2486392dc3 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/sigaction.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/sigaction.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SIGNAL_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/hppa/bits/signum.h b/sysdeps/unix/sysv/linux/hppa/bits/signum.h index bf46006c8d..0b1f8d83fa 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/signum.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/signum.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifdef _SIGNAL_H diff --git a/sysdeps/unix/sysv/linux/hppa/brk.c b/sysdeps/unix/sysv/linux/hppa/brk.c index a4b4df2831..1d6ed40a82 100644 --- a/sysdeps/unix/sysv/linux/hppa/brk.c +++ b/sysdeps/unix/sysv/linux/hppa/brk.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/hppa/clone.S b/sysdeps/unix/sysv/linux/hppa/clone.S index 6cb74b071e..3924ceb456 100644 --- a/sysdeps/unix/sysv/linux/hppa/clone.S +++ b/sysdeps/unix/sysv/linux/hppa/clone.S @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* clone() is even more special than fork() as it mucks with stacks and invokes a function in the right context after its all over. */ diff --git a/sysdeps/unix/sysv/linux/hppa/getcontext.S b/sysdeps/unix/sysv/linux/hppa/getcontext.S index af810b3dfa..c649aeae16 100644 --- a/sysdeps/unix/sysv/linux/hppa/getcontext.S +++ b/sysdeps/unix/sysv/linux/hppa/getcontext.S @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/hppa/kernel-features.h b/sysdeps/unix/sysv/linux/hppa/kernel-features.h index e29f6e0c2f..8dcdfbfabf 100644 --- a/sysdeps/unix/sysv/linux/hppa/kernel-features.h +++ b/sysdeps/unix/sysv/linux/hppa/kernel-features.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* There are an infinite number of PA-RISC kernel versions numbered diff --git a/sysdeps/unix/sysv/linux/hppa/makecontext.c b/sysdeps/unix/sysv/linux/hppa/makecontext.c index d3e3fb8c78..11039d69b3 100644 --- a/sysdeps/unix/sysv/linux/hppa/makecontext.c +++ b/sysdeps/unix/sysv/linux/hppa/makecontext.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/hppa/mmap.c b/sysdeps/unix/sysv/linux/hppa/mmap.c index 6f4bfdce2a..420d6567a6 100644 --- a/sysdeps/unix/sysv/linux/hppa/mmap.c +++ b/sysdeps/unix/sysv/linux/hppa/mmap.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h index afd37d32cf..caa9f37999 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h +++ b/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _BITS_PTHREADTYPES_H #define _BITS_PTHREADTYPES_H 1 diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h b/sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h index 270f3332c0..3406819dd7 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h +++ b/sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SEMAPHORE_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/createthread.c b/sysdeps/unix/sysv/linux/hppa/nptl/createthread.c index 01bd8ce180..e057a98eaf 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/createthread.c +++ b/sysdeps/unix/sysv/linux/hppa/nptl/createthread.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Value passed to 'clone' for initialization of the thread register. */ #define TLS_VALUE (pd + 1) diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/fork.c b/sysdeps/unix/sysv/linux/hppa/nptl/fork.c index 4dc38e162f..84613671b8 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/fork.c +++ b/sysdeps/unix/sysv/linux/hppa/nptl/fork.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/libc-lowlevellock.c b/sysdeps/unix/sysv/linux/hppa/nptl/libc-lowlevellock.c index 7b1a7c72d0..24d1fcdbb0 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/libc-lowlevellock.c +++ b/sysdeps/unix/sysv/linux/hppa/nptl/libc-lowlevellock.c @@ -14,8 +14,7 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include "lowlevellock.c" diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c index 9c49640bd4..aa69db8c63 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c +++ b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h index b6f6923296..6d4b13517b 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _LOWLEVELLOCK_H #define _LOWLEVELLOCK_H 1 diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pt-initfini.c b/sysdeps/unix/sysv/linux/hppa/nptl/pt-initfini.c index 845e1feb59..daf7a0ac36 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/pt-initfini.c +++ b/sysdeps/unix/sysv/linux/hppa/nptl/pt-initfini.c @@ -22,9 +22,8 @@ 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; see the file COPYING.LIB. If not, - write to the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + License along with the GNU C Library. If not, see + . */ /* This file is compiled into assembly code which is then munged by a sed script into two files: crti.s and crtn.s. diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S b/sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S index 15efa98d60..83c789c774 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S +++ b/sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #define _ERRNO_H 1 diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_broadcast.c b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_broadcast.c index e43ce349e2..1aa78cbccb 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_broadcast.c +++ b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_broadcast.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef INCLUDED_SELF # define INCLUDED_SELF diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_destroy.c b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_destroy.c index 3b606d9c6d..bfaa2f6048 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_destroy.c +++ b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_destroy.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef INCLUDED_SELF # define INCLUDED_SELF diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_init.c b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_init.c index a55c285b10..735a0e6f27 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_init.c +++ b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_init.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef INCLUDED_SELF # define INCLUDED_SELF diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_signal.c b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_signal.c index 34a9747ab9..a7243fb7bb 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_signal.c +++ b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_signal.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef INCLUDED_SELF # define INCLUDED_SELF diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_timedwait.c b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_timedwait.c index 5e05621619..6bc7d7459f 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_timedwait.c +++ b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_timedwait.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef INCLUDED_SELF # define INCLUDED_SELF diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_wait.c b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_wait.c index 80115ed775..acf7895528 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_wait.c +++ b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_wait.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef INCLUDED_SELF # define INCLUDED_SELF diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pthread_once.c b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_once.c index b89e40c2e3..974819ead6 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/pthread_once.c +++ b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_once.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include "pthreadP.h" #include diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h index d704345fe8..d3ca0b8a61 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/hppa/profil-counter.h b/sysdeps/unix/sysv/linux/hppa/profil-counter.h index b108be8a36..a70454a37c 100644 --- a/sysdeps/unix/sysv/linux/hppa/profil-counter.h +++ b/sysdeps/unix/sysv/linux/hppa/profil-counter.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ static void profil_counter (int signr, siginfo_t *si, struct ucontext *uctx) diff --git a/sysdeps/unix/sysv/linux/hppa/setcontext.S b/sysdeps/unix/sysv/linux/hppa/setcontext.S index 3353d4e6e5..617837e7b4 100644 --- a/sysdeps/unix/sysv/linux/hppa/setcontext.S +++ b/sysdeps/unix/sysv/linux/hppa/setcontext.S @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/hppa/swapcontext.c b/sysdeps/unix/sysv/linux/hppa/swapcontext.c index 8b33173be6..98cb39cf65 100644 --- a/sysdeps/unix/sysv/linux/hppa/swapcontext.c +++ b/sysdeps/unix/sysv/linux/hppa/swapcontext.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/hppa/sys/epoll.h b/sysdeps/unix/sysv/linux/hppa/sys/epoll.h index 53037d6320..0adf09029e 100644 --- a/sysdeps/unix/sysv/linux/hppa/sys/epoll.h +++ b/sysdeps/unix/sysv/linux/hppa/sys/epoll.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_EPOLL_H #define _SYS_EPOLL_H 1 diff --git a/sysdeps/unix/sysv/linux/hppa/sys/eventfd.h b/sysdeps/unix/sysv/linux/hppa/sys/eventfd.h index 751f276759..d9a3fab383 100644 --- a/sysdeps/unix/sysv/linux/hppa/sys/eventfd.h +++ b/sysdeps/unix/sysv/linux/hppa/sys/eventfd.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_EVENTFD_H #define _SYS_EVENTFD_H 1 diff --git a/sysdeps/unix/sysv/linux/hppa/sys/inotify.h b/sysdeps/unix/sysv/linux/hppa/sys/inotify.h index 080497d7be..2580837d11 100644 --- a/sysdeps/unix/sysv/linux/hppa/sys/inotify.h +++ b/sysdeps/unix/sysv/linux/hppa/sys/inotify.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_INOTIFY_H #define _SYS_INOTIFY_H 1 diff --git a/sysdeps/unix/sysv/linux/hppa/sys/procfs.h b/sysdeps/unix/sysv/linux/hppa/sys/procfs.h index 0c076337ee..97e419523a 100644 --- a/sysdeps/unix/sysv/linux/hppa/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/hppa/sys/procfs.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_PROCFS_H #define _SYS_PROCFS_H 1 diff --git a/sysdeps/unix/sysv/linux/hppa/sys/signalfd.h b/sysdeps/unix/sysv/linux/hppa/sys/signalfd.h index da8264e7c9..502b2c1332 100644 --- a/sysdeps/unix/sysv/linux/hppa/sys/signalfd.h +++ b/sysdeps/unix/sysv/linux/hppa/sys/signalfd.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_SIGNALFD_H #define _SYS_SIGNALFD_H 1 diff --git a/sysdeps/unix/sysv/linux/hppa/sys/timerfd.h b/sysdeps/unix/sysv/linux/hppa/sys/timerfd.h index ca696c215a..b7794a0c97 100644 --- a/sysdeps/unix/sysv/linux/hppa/sys/timerfd.h +++ b/sysdeps/unix/sysv/linux/hppa/sys/timerfd.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_TIMERFD_H #define _SYS_TIMERFD_H 1 diff --git a/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h b/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h index 1431143849..d61355b8c0 100644 --- a/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Don't rely on this, the interface is currently messed up and may need to be broken to be fixed. */ diff --git a/sysdeps/unix/sysv/linux/hppa/syscall.S b/sysdeps/unix/sysv/linux/hppa/syscall.S index b333487c99..4467feb150 100644 --- a/sysdeps/unix/sysv/linux/hppa/syscall.S +++ b/sysdeps/unix/sysv/linux/hppa/syscall.S @@ -12,8 +12,7 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* HPPA implements syscall() in 'C'; see sysdep.c. */ diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.c b/sysdeps/unix/sysv/linux/hppa/sysdep.c index 4a0bd21839..a1bfd5ef60 100644 --- a/sysdeps/unix/sysv/linux/hppa/sysdep.c +++ b/sysdeps/unix/sysv/linux/hppa/sysdep.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.h b/sysdeps/unix/sysv/linux/hppa/sysdep.h index e22e5718b4..83dd599c68 100644 --- a/sysdeps/unix/sysv/linux/hppa/sysdep.h +++ b/sysdeps/unix/sysv/linux/hppa/sysdep.h @@ -16,9 +16,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/hppa/umount.c b/sysdeps/unix/sysv/linux/hppa/umount.c index e7c5690890..d9d671f88d 100644 --- a/sysdeps/unix/sysv/linux/hppa/umount.c +++ b/sysdeps/unix/sysv/linux/hppa/umount.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Since we don't have an oldumount system call, do what the kernel does down here. */ diff --git a/sysdeps/unix/sysv/linux/m68k/____longjmp_chk.c b/sysdeps/unix/sysv/linux/m68k/____longjmp_chk.c index 8eaf59195b..d0d0e410d1 100644 --- a/sysdeps/unix/sysv/linux/m68k/____longjmp_chk.c +++ b/sysdeps/unix/sysv/linux/m68k/____longjmp_chk.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h index 54363b6a24..946cfa2ca7 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _FCNTL_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/m68k/bits/m68k-vdso.h b/sysdeps/unix/sysv/linux/m68k/bits/m68k-vdso.h index c361060172..00659a485f 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/m68k-vdso.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/m68k-vdso.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _M68K_VDSO_H diff --git a/sysdeps/unix/sysv/linux/m68k/bits/mman.h b/sysdeps/unix/sysv/linux/m68k/bits/mman.h index 4620213527..864f9ea6fe 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/mman.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/mman.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_MMAN_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/m68k/bits/poll.h b/sysdeps/unix/sysv/linux/m68k/bits/poll.h index 84219ba492..7b68bf9a41 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/poll.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/poll.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_POLL_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/m68k/bits/stat.h b/sysdeps/unix/sysv/linux/m68k/bits/stat.h index 0c1d149d85..ce0809f960 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/stat.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/stat.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/m68k/brk.c b/sysdeps/unix/sysv/linux/m68k/brk.c index 6b2c92852d..595e40c0b4 100644 --- a/sysdeps/unix/sysv/linux/m68k/brk.c +++ b/sysdeps/unix/sysv/linux/m68k/brk.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/m68k/chown.c b/sysdeps/unix/sysv/linux/m68k/chown.c index e7193dc23b..18d838ec8e 100644 --- a/sysdeps/unix/sysv/linux/m68k/chown.c +++ b/sysdeps/unix/sysv/linux/m68k/chown.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/m68k/clone.S b/sysdeps/unix/sysv/linux/m68k/clone.S index fa1b6b3877..ccc7755faa 100644 --- a/sysdeps/unix/sysv/linux/m68k/clone.S +++ b/sysdeps/unix/sysv/linux/m68k/clone.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* clone() is even more special than fork() as it mucks with stacks and invokes a function in the right context after its all over. */ diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/bits/atomic.h b/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/bits/atomic.h index 1198bb9c45..b088a7247c 100644 --- a/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/bits/atomic.h +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/bits/atomic.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _BITS_ATOMIC_H #define _BITS_ATOMIC_H 1 diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h b/sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h index bbbb1567e0..d3ed1a48a4 100644 --- a/sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _LINUX_M68K_COLDFIRE_SYSDEP_H #define _LINUX_M68K_COLDFIRE_SYSDEP_H 1 diff --git a/sysdeps/unix/sysv/linux/m68k/getpagesize.c b/sysdeps/unix/sysv/linux/m68k/getpagesize.c index f7ffdc5185..9e6000a196 100644 --- a/sysdeps/unix/sysv/linux/m68k/getpagesize.c +++ b/sysdeps/unix/sysv/linux/m68k/getpagesize.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/m68k/getsysstats.c b/sysdeps/unix/sysv/linux/m68k/getsysstats.c index 51137204e3..e3e87f6f93 100644 --- a/sysdeps/unix/sysv/linux/m68k/getsysstats.c +++ b/sysdeps/unix/sysv/linux/m68k/getsysstats.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* We need to define a special parser for /proc/cpuinfo. */ diff --git a/sysdeps/unix/sysv/linux/m68k/init-first.c b/sysdeps/unix/sysv/linux/m68k/init-first.c index f8168d1292..ec311ec427 100644 --- a/sysdeps/unix/sysv/linux/m68k/init-first.c +++ b/sysdeps/unix/sysv/linux/m68k/init-first.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Note: linking in vDSO to a static binary requires changes to the main GLIBC proper. Not yet implemented. */ diff --git a/sysdeps/unix/sysv/linux/m68k/kernel-features.h b/sysdeps/unix/sysv/linux/m68k/kernel-features.h index 2920943b18..0c2e120f21 100644 --- a/sysdeps/unix/sysv/linux/m68k/kernel-features.h +++ b/sysdeps/unix/sysv/linux/m68k/kernel-features.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* These features were surely available with 2.4.12. */ #if __LINUX_KERNEL_VERSION >= 132108 diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/sysdep.h b/sysdeps/unix/sysv/linux/m68k/m680x0/sysdep.h index 371befb275..50e3251aef 100644 --- a/sysdeps/unix/sysv/linux/m68k/m680x0/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/sysdep.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _LINUX_M68K_M680X0_SYSDEP_H #define _LINUX_M68K_M680X0_SYSDEP_H 1 diff --git a/sysdeps/unix/sysv/linux/m68k/m68k-helpers.S b/sysdeps/unix/sysv/linux/m68k/m68k-helpers.S index 4a475b1970..3b8ec6e09a 100644 --- a/sysdeps/unix/sysv/linux/m68k/m68k-helpers.S +++ b/sysdeps/unix/sysv/linux/m68k/m68k-helpers.S @@ -30,9 +30,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/m68k/m68k-vdso.c b/sysdeps/unix/sysv/linux/m68k/m68k-vdso.c index 73b25709b3..6c977337b1 100644 --- a/sysdeps/unix/sysv/linux/m68k/m68k-vdso.c +++ b/sysdeps/unix/sysv/linux/m68k/m68k-vdso.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifdef SHARED diff --git a/sysdeps/unix/sysv/linux/m68k/mmap.S b/sysdeps/unix/sysv/linux/m68k/mmap.S index 086212a42b..b0d9714228 100644 --- a/sysdeps/unix/sysv/linux/m68k/mmap.S +++ b/sysdeps/unix/sysv/linux/m68k/mmap.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/m68k/mremap.S b/sysdeps/unix/sysv/linux/m68k/mremap.S index 6e6f3b66c6..48e9929bd2 100644 --- a/sysdeps/unix/sysv/linux/m68k/mremap.S +++ b/sysdeps/unix/sysv/linux/m68k/mremap.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h index 588c928f71..7bcec6a011 100644 --- a/sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h +++ b/sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _BITS_PTHREADTYPES_H #define _BITS_PTHREADTYPES_H 1 diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/bits/semaphore.h b/sysdeps/unix/sysv/linux/m68k/nptl/bits/semaphore.h index 1648e92c27..1582a919c6 100644 --- a/sysdeps/unix/sysv/linux/m68k/nptl/bits/semaphore.h +++ b/sysdeps/unix/sysv/linux/m68k/nptl/bits/semaphore.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SEMAPHORE_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/createthread.c b/sysdeps/unix/sysv/linux/m68k/nptl/createthread.c index be1144435c..a7efb3c825 100644 --- a/sysdeps/unix/sysv/linux/m68k/nptl/createthread.c +++ b/sysdeps/unix/sysv/linux/m68k/nptl/createthread.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Value passed to 'clone' for initialization of the thread register. */ #define TLS_VALUE ((void *) (pd) \ diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/fork.c b/sysdeps/unix/sysv/linux/m68k/nptl/fork.c index dc1584e2dd..ffba605940 100644 --- a/sysdeps/unix/sysv/linux/m68k/nptl/fork.c +++ b/sysdeps/unix/sysv/linux/m68k/nptl/fork.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h index 5ca78ec72c..fed152ae34 100644 --- a/sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Borrowed from ARM's version. */ diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/pt-vfork.S b/sysdeps/unix/sysv/linux/m68k/nptl/pt-vfork.S index 639d5ed2c1..25d2460aa3 100644 --- a/sysdeps/unix/sysv/linux/m68k/nptl/pt-vfork.S +++ b/sysdeps/unix/sysv/linux/m68k/nptl/pt-vfork.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/pthread_once.c b/sysdeps/unix/sysv/linux/m68k/nptl/pthread_once.c index 415045f511..0ac9e03976 100644 --- a/sysdeps/unix/sysv/linux/m68k/nptl/pthread_once.c +++ b/sysdeps/unix/sysv/linux/m68k/nptl/pthread_once.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include "pthreadP.h" #include diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/m68k/nptl/sysdep-cancel.h index f52b0fe2d7..249e0e29f7 100644 --- a/sysdeps/unix/sysv/linux/m68k/nptl/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/m68k/nptl/sysdep-cancel.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/vfork.S b/sysdeps/unix/sysv/linux/m68k/nptl/vfork.S index 95e37642f3..d8c307d2fb 100644 --- a/sysdeps/unix/sysv/linux/m68k/nptl/vfork.S +++ b/sysdeps/unix/sysv/linux/m68k/nptl/vfork.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/m68k/register-dump.h b/sysdeps/unix/sysv/linux/m68k/register-dump.h index 78709d9cc6..91a654bd5f 100644 --- a/sysdeps/unix/sysv/linux/m68k/register-dump.h +++ b/sysdeps/unix/sysv/linux/m68k/register-dump.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/m68k/semtimedop.S b/sysdeps/unix/sysv/linux/m68k/semtimedop.S index 9da88b90a2..b2b79248a9 100644 --- a/sysdeps/unix/sysv/linux/m68k/semtimedop.S +++ b/sysdeps/unix/sysv/linux/m68k/semtimedop.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h b/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h index b7e08cfc95..261ccc5de1 100644 --- a/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h +++ b/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #define SIGCONTEXT int _code, struct sigcontext * #define SIGCONTEXT_EXTRA_ARGS _code, diff --git a/sysdeps/unix/sysv/linux/m68k/socket.S b/sysdeps/unix/sysv/linux/m68k/socket.S index 38aaa17196..53aafec820 100644 --- a/sysdeps/unix/sysv/linux/m68k/socket.S +++ b/sysdeps/unix/sysv/linux/m68k/socket.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/m68k/sys/procfs.h b/sysdeps/unix/sysv/linux/m68k/sys/procfs.h index 27abf8ef52..615fdfbdc8 100644 --- a/sysdeps/unix/sysv/linux/m68k/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/m68k/sys/procfs.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_PROCFS_H #define _SYS_PROCFS_H 1 diff --git a/sysdeps/unix/sysv/linux/m68k/sys/reg.h b/sysdeps/unix/sysv/linux/m68k/sys/reg.h index 230fd2d05e..4145d5012a 100644 --- a/sysdeps/unix/sysv/linux/m68k/sys/reg.h +++ b/sysdeps/unix/sysv/linux/m68k/sys/reg.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_REG_H #define _SYS_REG_H 1 diff --git a/sysdeps/unix/sysv/linux/m68k/sys/ucontext.h b/sysdeps/unix/sysv/linux/m68k/sys/ucontext.h index 776466b75d..c301e1afd0 100644 --- a/sysdeps/unix/sysv/linux/m68k/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/m68k/sys/ucontext.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* System V/m68k ABI compliant context switching support. */ diff --git a/sysdeps/unix/sysv/linux/m68k/sys/user.h b/sysdeps/unix/sysv/linux/m68k/sys/user.h index 2663ac6df2..851de60d74 100644 --- a/sysdeps/unix/sysv/linux/m68k/sys/user.h +++ b/sysdeps/unix/sysv/linux/m68k/sys/user.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_USER_H #define _SYS_USER_H 1 diff --git a/sysdeps/unix/sysv/linux/m68k/syscall.S b/sysdeps/unix/sysv/linux/m68k/syscall.S index d1f5c83ca4..4a9d5030fc 100644 --- a/sysdeps/unix/sysv/linux/m68k/syscall.S +++ b/sysdeps/unix/sysv/linux/m68k/syscall.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.S b/sysdeps/unix/sysv/linux/m68k/sysdep.S index 2277aab6b4..85b57f4c29 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.S +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h index 5523fa64f0..b288712541 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/m68k/vfork.S b/sysdeps/unix/sysv/linux/m68k/vfork.S index 9747302995..24e0c9037c 100644 --- a/sysdeps/unix/sysv/linux/m68k/vfork.S +++ b/sysdeps/unix/sysv/linux/m68k/vfork.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #define _ERRNO_H 1 diff --git a/sysdeps/unix/sysv/linux/mips/____longjmp_chk.c b/sysdeps/unix/sysv/linux/mips/____longjmp_chk.c index 9db339c2b8..d8da27024b 100644 --- a/sysdeps/unix/sysv/linux/mips/____longjmp_chk.c +++ b/sysdeps/unix/sysv/linux/mips/____longjmp_chk.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/mips/_test_and_set.c b/sysdeps/unix/sysv/linux/mips/_test_and_set.c index 9fd48f753e..57425d412b 100644 --- a/sysdeps/unix/sysv/linux/mips/_test_and_set.c +++ b/sysdeps/unix/sysv/linux/mips/_test_and_set.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Define the real-function versions of all inline functions defined in sys/tas.h */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/errno.h b/sysdeps/unix/sysv/linux/mips/bits/errno.h index 1cf339f0b6..86398f1126 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/errno.h +++ b/sysdeps/unix/sysv/linux/mips/bits/errno.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifdef _ERRNO_H diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index 1da157617f..9645b36639 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _FCNTL_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h b/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h index a8dcf242d3..90496087d1 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h +++ b/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_IOCTL_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/mips/bits/ipc.h b/sysdeps/unix/sysv/linux/mips/bits/ipc.h index 1f629ce665..a3d9ddc5b8 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/ipc.h +++ b/sysdeps/unix/sysv/linux/mips/bits/ipc.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_IPC_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/mips/bits/mman.h b/sysdeps/unix/sysv/linux/mips/bits/mman.h index 097cb8f15f..d23a766b37 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/mman.h +++ b/sysdeps/unix/sysv/linux/mips/bits/mman.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_MMAN_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/mips/bits/msq.h b/sysdeps/unix/sysv/linux/mips/bits/msq.h index 5d72fc14ea..d531e040ec 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/msq.h +++ b/sysdeps/unix/sysv/linux/mips/bits/msq.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_MSG_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/mips/bits/poll.h b/sysdeps/unix/sysv/linux/mips/bits/poll.h index 823123948e..881f1be746 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/poll.h +++ b/sysdeps/unix/sysv/linux/mips/bits/poll.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_POLL_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/mips/bits/resource.h b/sysdeps/unix/sysv/linux/mips/bits/resource.h index 519d7364eb..23e3ae56a0 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/resource.h +++ b/sysdeps/unix/sysv/linux/mips/bits/resource.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_RESOURCE_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/mips/bits/sem.h b/sysdeps/unix/sysv/linux/mips/bits/sem.h index 6282de9cc8..0c3525bd76 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/sem.h +++ b/sysdeps/unix/sysv/linux/mips/bits/sem.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_SEM_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/mips/bits/shm.h b/sysdeps/unix/sysv/linux/mips/bits/shm.h index 07f9743474..7119652159 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/shm.h +++ b/sysdeps/unix/sysv/linux/mips/bits/shm.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_SHM_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h index ecddaf6555..92c9ec29ce 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h +++ b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SIGNAL_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h b/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h index 99faeed397..f41928d107 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h +++ b/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _BITS_SIGCONTEXT_H #define _BITS_SIGCONTEXT_H 1 diff --git a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h index 19975fb0a0..3337396398 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h +++ b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #if !defined _SIGNAL_H && !defined __need_siginfo_t \ && !defined __need_sigevent_t diff --git a/sysdeps/unix/sysv/linux/mips/bits/signum.h b/sysdeps/unix/sysv/linux/mips/bits/signum.h index a9b6848346..c11dda01c0 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/signum.h +++ b/sysdeps/unix/sysv/linux/mips/bits/signum.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifdef _SIGNAL_H diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigstack.h b/sysdeps/unix/sysv/linux/mips/bits/sigstack.h index d2c8552209..4cba91cfcc 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/sigstack.h +++ b/sysdeps/unix/sysv/linux/mips/bits/sigstack.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SIGNAL_H # error "Never include this file directly. Use instead" diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h index e8b016c944..7c30b4d6b9 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/stat.h +++ b/sysdeps/unix/sysv/linux/mips/bits/stat.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/mips/bits/statfs.h b/sysdeps/unix/sysv/linux/mips/bits/statfs.h index 22a9ddead8..c2f8051328 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/statfs.h +++ b/sysdeps/unix/sysv/linux/mips/bits/statfs.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_STATFS_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/mips/bits/termios.h b/sysdeps/unix/sysv/linux/mips/bits/termios.h index 7a90f99ac6..58e0cbec91 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/termios.h +++ b/sysdeps/unix/sysv/linux/mips/bits/termios.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _TERMIOS_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/mips/brk.c b/sysdeps/unix/sysv/linux/mips/brk.c index 00056bee7a..9f63698e90 100644 --- a/sysdeps/unix/sysv/linux/mips/brk.c +++ b/sysdeps/unix/sysv/linux/mips/brk.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/mips/clone.S b/sysdeps/unix/sysv/linux/mips/clone.S index f521df1771..ce49cb57d1 100644 --- a/sysdeps/unix/sysv/linux/mips/clone.S +++ b/sysdeps/unix/sysv/linux/mips/clone.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* clone() is even more special than fork() as it mucks with stacks and invokes a function in the right context after its all over. */ diff --git a/sysdeps/unix/sysv/linux/mips/dl-cache.h b/sysdeps/unix/sysv/linux/mips/dl-cache.h index 9f0e4d28ef..1991c9c93c 100644 --- a/sysdeps/unix/sysv/linux/mips/dl-cache.h +++ b/sysdeps/unix/sysv/linux/mips/dl-cache.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/mips/dl-static.c b/sysdeps/unix/sysv/linux/mips/dl-static.c index 3a99e7ed85..a23f22a355 100644 --- a/sysdeps/unix/sysv/linux/mips/dl-static.c +++ b/sysdeps/unix/sysv/linux/mips/dl-static.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/mips/ftruncate64.c b/sysdeps/unix/sysv/linux/mips/ftruncate64.c index a46e22f828..982650c87f 100644 --- a/sysdeps/unix/sysv/linux/mips/ftruncate64.c +++ b/sysdeps/unix/sysv/linux/mips/ftruncate64.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/mips/getcontext.S b/sysdeps/unix/sysv/linux/mips/getcontext.S index 1e77467cb2..c4ad081b0f 100644 --- a/sysdeps/unix/sysv/linux/mips/getcontext.S +++ b/sysdeps/unix/sysv/linux/mips/getcontext.S @@ -14,9 +14,8 @@ 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, 51 Franklin Street - Fifth Floor, Boston, MA - 02110-1301, USA. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/mips/getsysstats.c b/sysdeps/unix/sysv/linux/mips/getsysstats.c index 805303326c..9092a882d3 100644 --- a/sysdeps/unix/sysv/linux/mips/getsysstats.c +++ b/sysdeps/unix/sysv/linux/mips/getsysstats.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* We need to define a special parser for /proc/cpuinfo. */ diff --git a/sysdeps/unix/sysv/linux/mips/kernel-features.h b/sysdeps/unix/sysv/linux/mips/kernel-features.h index 092c35d9f5..226b449ee1 100644 --- a/sysdeps/unix/sysv/linux/mips/kernel-features.h +++ b/sysdeps/unix/sysv/linux/mips/kernel-features.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/mips/kernel_termios.h b/sysdeps/unix/sysv/linux/mips/kernel_termios.h index 9b622f4d1f..ee59a81562 100644 --- a/sysdeps/unix/sysv/linux/mips/kernel_termios.h +++ b/sysdeps/unix/sysv/linux/mips/kernel_termios.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _KERNEL_TERMIOS_H #define _KERNEL_TERMIOS_H 1 diff --git a/sysdeps/unix/sysv/linux/mips/ldsodefs.h b/sysdeps/unix/sysv/linux/mips/ldsodefs.h index 2cb7db687a..b097a2d131 100644 --- a/sysdeps/unix/sysv/linux/mips/ldsodefs.h +++ b/sysdeps/unix/sysv/linux/mips/ldsodefs.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _LDSODEFS_H diff --git a/sysdeps/unix/sysv/linux/mips/makecontext.S b/sysdeps/unix/sysv/linux/mips/makecontext.S index cceee3f16c..6427339a66 100644 --- a/sysdeps/unix/sysv/linux/mips/makecontext.S +++ b/sysdeps/unix/sysv/linux/mips/makecontext.S @@ -14,9 +14,8 @@ 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, 51 Franklin Street - Fifth Floor, Boston, MA - 02110-1301, USA. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/mips/mips32/accept4.c b/sysdeps/unix/sysv/linux/mips/mips32/accept4.c index 98a41f96d8..d79f1b0bf0 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/accept4.c +++ b/sysdeps/unix/sysv/linux/mips/mips32/accept4.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Avoid accept4.c trying to use a definition based on the socketcall syscall and internal_accept4.S. */ diff --git a/sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c b/sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c index 04c952d2f3..d39e8f44fe 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c +++ b/sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise64.c b/sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise64.c index 715d37e45a..e547e69379 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise64.c +++ b/sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise64.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/mips/mips32/recvmmsg.c b/sysdeps/unix/sysv/linux/mips/mips32/recvmmsg.c index ceb88eee81..371932ecd4 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/recvmmsg.c +++ b/sysdeps/unix/sysv/linux/mips/mips32/recvmmsg.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Avoid recvmmsg.c trying to use a definition based on the socketcall syscall and internal_recvmmsg.S. */ diff --git a/sysdeps/unix/sysv/linux/mips/mips32/sendmmsg.c b/sysdeps/unix/sysv/linux/mips/mips32/sendmmsg.c index c4f9a9f18a..0dc6dd0122 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/sendmmsg.c +++ b/sysdeps/unix/sysv/linux/mips/mips32/sendmmsg.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Avoid sendmmsg.c trying to use a definition based on the socketcall syscall and internal_sendmmsg.S. */ diff --git a/sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c b/sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c index 21da50e3e6..2dc110ba7e 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c +++ b/sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h index 57de0a4342..e51f3295ea 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _LINUX_MIPS_MIPS32_SYSDEP_H #define _LINUX_MIPS_MIPS32_SYSDEP_H 1 diff --git a/sysdeps/unix/sysv/linux/mips/mips64/fxstatat64.c b/sysdeps/unix/sysv/linux/mips/mips64/fxstatat64.c index 21a630963f..1078cc35ac 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/fxstatat64.c +++ b/sysdeps/unix/sysv/linux/mips/mips64/fxstatat64.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/mips/mips64/ldconfig.h b/sysdeps/unix/sysv/linux/mips/mips64/ldconfig.h index d490fb95e2..7e690952b1 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/ldconfig.h +++ b/sysdeps/unix/sysv/linux/mips/mips64/ldconfig.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/mips/mips64/msgctl.c b/sysdeps/unix/sysv/linux/mips/mips64/msgctl.c index 646c348428..91c6f1ab28 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/msgctl.c +++ b/sysdeps/unix/sysv/linux/mips/mips64/msgctl.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c b/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c index 0aecba10e8..1e81bcdd7a 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c b/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c index 670cb0e32c..36be2e6261 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise.c b/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise.c index 7bb197ae48..3c0122c983 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise.c +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise64.c b/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise64.c index 40bafdbac7..f6d75377f8 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise64.c +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise64.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate.c b/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate.c index 5516885b9a..84ab68003d 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate.c +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate64.c b/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate64.c index 10e9a4ac4b..34bb9f5e2b 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate64.c +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate64.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h index 6222785505..98088d32fd 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _LINUX_MIPS_SYSDEP_H #define _LINUX_MIPS_SYSDEP_H 1 diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S b/sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S index e4b4f00a8c..3ff0d0e57b 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h index 6b18f2731a..0baa94f1d7 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _LINUX_MIPS_SYSDEP_H #define _LINUX_MIPS_SYSDEP_H 1 diff --git a/sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h index cb2cc0779a..b089f57472 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/mips/mips64/semctl.c b/sysdeps/unix/sysv/linux/mips/mips64/semctl.c index 4d38b386de..3c1c910642 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/semctl.c +++ b/sysdeps/unix/sysv/linux/mips/mips64/semctl.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/mips/mips64/shmctl.c b/sysdeps/unix/sysv/linux/mips/mips64/shmctl.c index 7e5150be84..da07427c3a 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/shmctl.c +++ b/sysdeps/unix/sysv/linux/mips/mips64/shmctl.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/mips/mips64/syscall.S b/sysdeps/unix/sysv/linux/mips/mips64/syscall.S index 3c6aaac810..d6f0be2e1b 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/syscall.S +++ b/sysdeps/unix/sysv/linux/mips/mips64/syscall.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/mips/nptl/bits/local_lim.h b/sysdeps/unix/sysv/linux/mips/nptl/bits/local_lim.h index c6fae63a5f..3a15de2c30 100644 --- a/sysdeps/unix/sysv/linux/mips/nptl/bits/local_lim.h +++ b/sysdeps/unix/sysv/linux/mips/nptl/bits/local_lim.h @@ -14,9 +14,8 @@ 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; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + License along with the GNU C Library. If not, see + . */ /* The kernel header pollutes the namespace with the NR_OPEN symbol and defines LINK_MAX although filesystems have different maxima. A diff --git a/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h index a479f2dec0..2fda0d30cd 100644 --- a/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h +++ b/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _BITS_PTHREADTYPES_H #define _BITS_PTHREADTYPES_H 1 diff --git a/sysdeps/unix/sysv/linux/mips/nptl/bits/semaphore.h b/sysdeps/unix/sysv/linux/mips/nptl/bits/semaphore.h index af43a60484..d8516547cc 100644 --- a/sysdeps/unix/sysv/linux/mips/nptl/bits/semaphore.h +++ b/sysdeps/unix/sysv/linux/mips/nptl/bits/semaphore.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SEMAPHORE_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/mips/nptl/createthread.c b/sysdeps/unix/sysv/linux/mips/nptl/createthread.c index 5b2234f470..f4a41f2cd6 100644 --- a/sysdeps/unix/sysv/linux/mips/nptl/createthread.c +++ b/sysdeps/unix/sysv/linux/mips/nptl/createthread.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Value passed to 'clone' for initialization of the thread register. */ #define TLS_VALUE ((void *) (pd) \ diff --git a/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h index ab284dfe8b..88b601eadd 100644 --- a/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _LOWLEVELLOCK_H #define _LOWLEVELLOCK_H 1 diff --git a/sysdeps/unix/sysv/linux/mips/nptl/pt-vfork.S b/sysdeps/unix/sysv/linux/mips/nptl/pt-vfork.S index 652dfb1e58..d31dda22af 100644 --- a/sysdeps/unix/sysv/linux/mips/nptl/pt-vfork.S +++ b/sysdeps/unix/sysv/linux/mips/nptl/pt-vfork.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/mips/nptl/pthread_once.c b/sysdeps/unix/sysv/linux/mips/nptl/pthread_once.c index ddfd32bdb0..0b62076eff 100644 --- a/sysdeps/unix/sysv/linux/mips/nptl/pthread_once.c +++ b/sysdeps/unix/sysv/linux/mips/nptl/pthread_once.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include "pthreadP.h" #include diff --git a/sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h index 85ceff5659..4eff4b7319 100644 --- a/sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/mips/nptl/vfork.S b/sysdeps/unix/sysv/linux/mips/nptl/vfork.S index b93a924ccf..cafe316f1a 100644 --- a/sysdeps/unix/sysv/linux/mips/nptl/vfork.S +++ b/sysdeps/unix/sysv/linux/mips/nptl/vfork.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/mips/pread.c b/sysdeps/unix/sysv/linux/mips/pread.c index eff7d473d0..ff83498caf 100644 --- a/sysdeps/unix/sysv/linux/mips/pread.c +++ b/sysdeps/unix/sysv/linux/mips/pread.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/mips/pread64.c b/sysdeps/unix/sysv/linux/mips/pread64.c index d8763acabb..05c7c14ead 100644 --- a/sysdeps/unix/sysv/linux/mips/pread64.c +++ b/sysdeps/unix/sysv/linux/mips/pread64.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #ifndef NO_SGIDEFS_H diff --git a/sysdeps/unix/sysv/linux/mips/pwrite.c b/sysdeps/unix/sysv/linux/mips/pwrite.c index 4378ebc859..07331f0654 100644 --- a/sysdeps/unix/sysv/linux/mips/pwrite.c +++ b/sysdeps/unix/sysv/linux/mips/pwrite.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/mips/pwrite64.c b/sysdeps/unix/sysv/linux/mips/pwrite64.c index e5853e432e..39bbda8f0e 100644 --- a/sysdeps/unix/sysv/linux/mips/pwrite64.c +++ b/sysdeps/unix/sysv/linux/mips/pwrite64.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #ifndef NO_SGIDEFS_H diff --git a/sysdeps/unix/sysv/linux/mips/readelflib.c b/sysdeps/unix/sysv/linux/mips/readelflib.c index 547362f31f..56eecd24cf 100644 --- a/sysdeps/unix/sysv/linux/mips/readelflib.c +++ b/sysdeps/unix/sysv/linux/mips/readelflib.c @@ -17,9 +17,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ int process_elf32_file (const char *file_name, const char *lib, int *flag, diff --git a/sysdeps/unix/sysv/linux/mips/register-dump.h b/sysdeps/unix/sysv/linux/mips/register-dump.h index 8d2ec754df..ef986bd0ac 100644 --- a/sysdeps/unix/sysv/linux/mips/register-dump.h +++ b/sysdeps/unix/sysv/linux/mips/register-dump.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/mips/setcontext.S b/sysdeps/unix/sysv/linux/mips/setcontext.S index 186f3a7911..d3cde0e504 100644 --- a/sysdeps/unix/sysv/linux/mips/setcontext.S +++ b/sysdeps/unix/sysv/linux/mips/setcontext.S @@ -14,9 +14,8 @@ 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, 51 Franklin Street - Fifth Floor, Boston, MA - 02110-1301, USA. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/mips/sigaction.c b/sysdeps/unix/sysv/linux/mips/sigaction.c index c05dfd1f6e..c3a467003a 100644 --- a/sysdeps/unix/sysv/linux/mips/sigaction.c +++ b/sysdeps/unix/sysv/linux/mips/sigaction.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h index f453c8d9b5..9edde21683 100644 --- a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h +++ b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/mips/swapcontext.S b/sysdeps/unix/sysv/linux/mips/swapcontext.S index b0b8417c46..c7ac19b9f9 100644 --- a/sysdeps/unix/sysv/linux/mips/swapcontext.S +++ b/sysdeps/unix/sysv/linux/mips/swapcontext.S @@ -14,9 +14,8 @@ 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, 51 Franklin Street - Fifth Floor, Boston, MA - 02110-1301, USA. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/mips/sys/cachectl.h b/sysdeps/unix/sysv/linux/mips/sys/cachectl.h index 650c609286..40743e5e3f 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/cachectl.h +++ b/sysdeps/unix/sysv/linux/mips/sys/cachectl.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_CACHECTL_H #define _SYS_CACHECTL_H 1 diff --git a/sysdeps/unix/sysv/linux/mips/sys/procfs.h b/sysdeps/unix/sysv/linux/mips/sys/procfs.h index 2bf07be3e9..9b8030df3c 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/mips/sys/procfs.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_PROCFS_H #define _SYS_PROCFS_H 1 diff --git a/sysdeps/unix/sysv/linux/mips/sys/sysmips.h b/sysdeps/unix/sysv/linux/mips/sys/sysmips.h index 5534a1f11d..b096dc173a 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/sysmips.h +++ b/sysdeps/unix/sysv/linux/mips/sys/sysmips.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_SYSMIPS_H #define _SYS_SYSMIPS_H 1 diff --git a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h index 251f0c8106..f42df8decf 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Don't rely on this, the interface is currently messed up and may need to be broken to be fixed. */ diff --git a/sysdeps/unix/sysv/linux/mips/sys/user.h b/sysdeps/unix/sysv/linux/mips/sys/user.h index d5b3b0508b..950cad7fa8 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/user.h +++ b/sysdeps/unix/sysv/linux/mips/sys/user.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_USER_H #define _SYS_USER_H 1 diff --git a/sysdeps/unix/sysv/linux/mips/truncate64.c b/sysdeps/unix/sysv/linux/mips/truncate64.c index 01cc148be9..7c11b63f59 100644 --- a/sysdeps/unix/sysv/linux/mips/truncate64.c +++ b/sysdeps/unix/sysv/linux/mips/truncate64.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/mips/ustat.c b/sysdeps/unix/sysv/linux/mips/ustat.c index a309f7104c..aa84b53624 100644 --- a/sysdeps/unix/sysv/linux/mips/ustat.c +++ b/sysdeps/unix/sysv/linux/mips/ustat.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/mips/vfork.S b/sysdeps/unix/sysv/linux/mips/vfork.S index 38b6195282..6d2c65ad0b 100644 --- a/sysdeps/unix/sysv/linux/mips/vfork.S +++ b/sysdeps/unix/sysv/linux/mips/vfork.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* vfork() is just a special case of clone(). */ diff --git a/sysdeps/unix/sysv/linux/mips/xstatconv.c b/sysdeps/unix/sysv/linux/mips/xstatconv.c index 068c087b0a..df4af51fb3 100644 --- a/sysdeps/unix/sysv/linux/mips/xstatconv.c +++ b/sysdeps/unix/sysv/linux/mips/xstatconv.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S index 77af6dc518..f0216fefab 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S index 95ee34c577..216d7ffb0e 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/swapcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/swapcontext.S index d4934a5b3f..6c45c526dc 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/swapcontext.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/swapcontext.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/tile/bits/environments.h b/sysdeps/unix/sysv/linux/tile/bits/environments.h index f1835179f3..d984d52bd0 100644 --- a/sysdeps/unix/sysv/linux/tile/bits/environments.h +++ b/sysdeps/unix/sysv/linux/tile/bits/environments.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _UNISTD_H # error "Never include this file directly. Use instead" diff --git a/sysdeps/unix/sysv/linux/tile/bits/local_lim.h b/sysdeps/unix/sysv/linux/tile/bits/local_lim.h index 6eb45c998d..35c1275f0c 100644 --- a/sysdeps/unix/sysv/linux/tile/bits/local_lim.h +++ b/sysdeps/unix/sysv/linux/tile/bits/local_lim.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* The kernel header pollutes the namespace with the NR_OPEN symbol and defines LINK_MAX although filesystems have different maxima. A diff --git a/sysdeps/unix/sysv/linux/tile/bits/mman.h b/sysdeps/unix/sysv/linux/tile/bits/mman.h index 35863af458..87c938d367 100644 --- a/sysdeps/unix/sysv/linux/tile/bits/mman.h +++ b/sysdeps/unix/sysv/linux/tile/bits/mman.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_MMAN_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/tile/bits/sigaction.h b/sysdeps/unix/sysv/linux/tile/bits/sigaction.h index 1696d7481a..45e118d18d 100644 --- a/sysdeps/unix/sysv/linux/tile/bits/sigaction.h +++ b/sysdeps/unix/sysv/linux/tile/bits/sigaction.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SIGNAL_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/tile/bits/siginfo.h b/sysdeps/unix/sysv/linux/tile/bits/siginfo.h index a6d1c21917..aeecd1960f 100644 --- a/sysdeps/unix/sysv/linux/tile/bits/siginfo.h +++ b/sysdeps/unix/sysv/linux/tile/bits/siginfo.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #if !defined _SIGNAL_H && !defined __need_siginfo_t \ && !defined __need_sigevent_t diff --git a/sysdeps/unix/sysv/linux/tile/cacheflush.c b/sysdeps/unix/sysv/linux/tile/cacheflush.c index d23a6c5c53..df1567c8b6 100644 --- a/sysdeps/unix/sysv/linux/tile/cacheflush.c +++ b/sysdeps/unix/sysv/linux/tile/cacheflush.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/tile/getcontext.S b/sysdeps/unix/sysv/linux/tile/getcontext.S index 34bc7d8ca2..572780b88c 100644 --- a/sysdeps/unix/sysv/linux/tile/getcontext.S +++ b/sysdeps/unix/sysv/linux/tile/getcontext.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/tile/kernel-features.h b/sysdeps/unix/sysv/linux/tile/kernel-features.h index d234922983..8c38a68c41 100644 --- a/sysdeps/unix/sysv/linux/tile/kernel-features.h +++ b/sysdeps/unix/sysv/linux/tile/kernel-features.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* TILE glibc support starts with 2.6.36, guaranteeing many kernel features. */ diff --git a/sysdeps/unix/sysv/linux/tile/makecontext.c b/sysdeps/unix/sysv/linux/tile/makecontext.c index 060cf74bc2..e3f66bccb0 100644 --- a/sysdeps/unix/sysv/linux/tile/makecontext.c +++ b/sysdeps/unix/sysv/linux/tile/makecontext.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/tile/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/tile/nptl/bits/pthreadtypes.h index a71a4b77ec..d840ce5837 100644 --- a/sysdeps/unix/sysv/linux/tile/nptl/bits/pthreadtypes.h +++ b/sysdeps/unix/sysv/linux/tile/nptl/bits/pthreadtypes.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _BITS_PTHREADTYPES_H #define _BITS_PTHREADTYPES_H 1 diff --git a/sysdeps/unix/sysv/linux/tile/nptl/bits/semaphore.h b/sysdeps/unix/sysv/linux/tile/nptl/bits/semaphore.h index b1eca926ad..8ed81da69e 100644 --- a/sysdeps/unix/sysv/linux/tile/nptl/bits/semaphore.h +++ b/sysdeps/unix/sysv/linux/tile/nptl/bits/semaphore.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SEMAPHORE_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/tile/nptl/clone.S b/sysdeps/unix/sysv/linux/tile/nptl/clone.S index 73a5e84617..eaa2fd65a5 100644 --- a/sysdeps/unix/sysv/linux/tile/nptl/clone.S +++ b/sysdeps/unix/sysv/linux/tile/nptl/clone.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* clone() is even more special than fork() as it mucks with stacks and invokes a function in the right context after it's all over. */ diff --git a/sysdeps/unix/sysv/linux/tile/nptl/createthread.c b/sysdeps/unix/sysv/linux/tile/nptl/createthread.c index 816316b1d8..3794e52dae 100644 --- a/sysdeps/unix/sysv/linux/tile/nptl/createthread.c +++ b/sysdeps/unix/sysv/linux/tile/nptl/createthread.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Value passed to 'clone' for initialization of the thread register. */ #define TLS_VALUE ((void *) (pd) \ diff --git a/sysdeps/unix/sysv/linux/tile/nptl/fork.c b/sysdeps/unix/sysv/linux/tile/nptl/fork.c index 4267fa48e4..a778238f86 100644 --- a/sysdeps/unix/sysv/linux/tile/nptl/fork.c +++ b/sysdeps/unix/sysv/linux/tile/nptl/fork.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/tile/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/tile/nptl/lowlevellock.h index 55bddd5ba8..8690c7be4a 100644 --- a/sysdeps/unix/sysv/linux/tile/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/tile/nptl/lowlevellock.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _LOWLEVELLOCK_H #define _LOWLEVELLOCK_H 1 diff --git a/sysdeps/unix/sysv/linux/tile/nptl/pthread_once.c b/sysdeps/unix/sysv/linux/tile/nptl/pthread_once.c index 1272be0dab..7585e674d5 100644 --- a/sysdeps/unix/sysv/linux/tile/nptl/pthread_once.c +++ b/sysdeps/unix/sysv/linux/tile/nptl/pthread_once.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/tile/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/tile/nptl/sysdep-cancel.h index e00ea50a7b..8db7a40a54 100644 --- a/sysdeps/unix/sysv/linux/tile/nptl/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/tile/nptl/sysdep-cancel.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/tile/nptl/vfork.S b/sysdeps/unix/sysv/linux/tile/nptl/vfork.S index ed581ae864..ddf9a7ae6e 100644 --- a/sysdeps/unix/sysv/linux/tile/nptl/vfork.S +++ b/sysdeps/unix/sysv/linux/tile/nptl/vfork.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #define __ASSEMBLY__ /* for kernel headers */ diff --git a/sysdeps/unix/sysv/linux/tile/profil-counter.h b/sysdeps/unix/sysv/linux/tile/profil-counter.h index 38cecedcc5..602c3f06a0 100644 --- a/sysdeps/unix/sysv/linux/tile/profil-counter.h +++ b/sysdeps/unix/sysv/linux/tile/profil-counter.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/tile/set_dataplane.c b/sysdeps/unix/sysv/linux/tile/set_dataplane.c index 5e82a23357..1354ee62dd 100644 --- a/sysdeps/unix/sysv/linux/tile/set_dataplane.c +++ b/sysdeps/unix/sysv/linux/tile/set_dataplane.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/tile/setcontext.S b/sysdeps/unix/sysv/linux/tile/setcontext.S index 6c22bbdac9..319031b31d 100644 --- a/sysdeps/unix/sysv/linux/tile/setcontext.S +++ b/sysdeps/unix/sysv/linux/tile/setcontext.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/tile/sigcontextinfo.h b/sysdeps/unix/sysv/linux/tile/sigcontextinfo.h index fe700eaff4..f1dba47ca9 100644 --- a/sysdeps/unix/sysv/linux/tile/sigcontextinfo.h +++ b/sysdeps/unix/sysv/linux/tile/sigcontextinfo.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/tile/swapcontext.S b/sysdeps/unix/sysv/linux/tile/swapcontext.S index 95d3afa827..6d3ad7fd1d 100644 --- a/sysdeps/unix/sysv/linux/tile/swapcontext.S +++ b/sysdeps/unix/sysv/linux/tile/swapcontext.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/tile/sys/cachectl.h b/sysdeps/unix/sysv/linux/tile/sys/cachectl.h index 308aefbbe5..dcab61e979 100644 --- a/sysdeps/unix/sysv/linux/tile/sys/cachectl.h +++ b/sysdeps/unix/sysv/linux/tile/sys/cachectl.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_CACHECTL_H #define _SYS_CACHECTL_H 1 diff --git a/sysdeps/unix/sysv/linux/tile/sys/dataplane.h b/sysdeps/unix/sysv/linux/tile/sys/dataplane.h index d491affdb1..cae17b0933 100644 --- a/sysdeps/unix/sysv/linux/tile/sys/dataplane.h +++ b/sysdeps/unix/sysv/linux/tile/sys/dataplane.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_DATAPLANE_H #define _SYS_DATAPLANE_H 1 diff --git a/sysdeps/unix/sysv/linux/tile/sys/procfs.h b/sysdeps/unix/sysv/linux/tile/sys/procfs.h index 585a223dbb..295ae50aa6 100644 --- a/sysdeps/unix/sysv/linux/tile/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/tile/sys/procfs.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_PROCFS_H #define _SYS_PROCFS_H 1 diff --git a/sysdeps/unix/sysv/linux/tile/sys/ptrace.h b/sysdeps/unix/sysv/linux/tile/sys/ptrace.h index 554171a377..702f19e41f 100644 --- a/sysdeps/unix/sysv/linux/tile/sys/ptrace.h +++ b/sysdeps/unix/sysv/linux/tile/sys/ptrace.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_PTRACE_H #define _SYS_PTRACE_H 1 diff --git a/sysdeps/unix/sysv/linux/tile/sys/ucontext.h b/sysdeps/unix/sysv/linux/tile/sys/ucontext.h index 530802359b..ca8ca229d2 100644 --- a/sysdeps/unix/sysv/linux/tile/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/tile/sys/ucontext.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #ifndef _SYS_UCONTEXT_H #define _SYS_UCONTEXT_H 1 diff --git a/sysdeps/unix/sysv/linux/tile/syscall.S b/sysdeps/unix/sysv/linux/tile/syscall.S index d802959185..a3fb32f71d 100644 --- a/sysdeps/unix/sysv/linux/tile/syscall.S +++ b/sysdeps/unix/sysv/linux/tile/syscall.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/tile/sysdep.c b/sysdeps/unix/sysv/linux/tile/sysdep.c index f578e91888..7573e8a352 100644 --- a/sysdeps/unix/sysv/linux/tile/sysdep.c +++ b/sysdeps/unix/sysv/linux/tile/sysdep.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/tile/sysdep.h b/sysdeps/unix/sysv/linux/tile/sysdep.h index cf6763de2c..b2c018f83a 100644 --- a/sysdeps/unix/sysv/linux/tile/sysdep.h +++ b/sysdeps/unix/sysv/linux/tile/sysdep.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/ioctl.S b/sysdeps/unix/sysv/linux/tile/tilegx/ioctl.S index 9ccedd4c81..e966c4d891 100644 --- a/sysdeps/unix/sysv/linux/tile/tilegx/ioctl.S +++ b/sysdeps/unix/sysv/linux/tile/tilegx/ioctl.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* TILE-Gx specifies that "unsigned int" is sign extended in the high diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/ldconfig.h b/sysdeps/unix/sysv/linux/tile/tilegx/ldconfig.h index 4610347a53..a7995b7751 100644 --- a/sysdeps/unix/sysv/linux/tile/tilegx/ldconfig.h +++ b/sysdeps/unix/sysv/linux/tile/tilegx/ldconfig.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/register-dump.h b/sysdeps/unix/sysv/linux/tile/tilegx/register-dump.h index 092c32b8fb..9021763566 100644 --- a/sysdeps/unix/sysv/linux/tile/tilegx/register-dump.h +++ b/sysdeps/unix/sysv/linux/tile/tilegx/register-dump.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/ldconfig.h b/sysdeps/unix/sysv/linux/tile/tilepro/ldconfig.h index 5a10db2575..eebd715bdb 100644 --- a/sysdeps/unix/sysv/linux/tile/tilepro/ldconfig.h +++ b/sysdeps/unix/sysv/linux/tile/tilepro/ldconfig.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/register-dump.h b/sysdeps/unix/sysv/linux/tile/tilepro/register-dump.h index f559d15032..3338695bcb 100644 --- a/sysdeps/unix/sysv/linux/tile/tilepro/register-dump.h +++ b/sysdeps/unix/sysv/linux/tile/tilepro/register-dump.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/tile/ucontext_i.h b/sysdeps/unix/sysv/linux/tile/ucontext_i.h index f255572ead..bdcfa258dc 100644 --- a/sysdeps/unix/sysv/linux/tile/ucontext_i.h +++ b/sysdeps/unix/sysv/linux/tile/ucontext_i.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library. If not, see + . */ /* Definitions of offsets within the ucontext_t structure. Note that for convenience we use __SIZEOF_POINTER__ for "long" and From e038d690b4740cd0d2d53cf1a015eef34637593c Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 9 Mar 2012 11:30:44 -0800 Subject: [PATCH 4259/4487] Use <> for math.h and math_private.h everywhere. Entire tree edited via find | grep | sed. --- ChangeLog.hppa | 4 ++++ ChangeLog.m68k | 9 +++++++++ sysdeps/hppa/hppa1.1/s_signbit.c | 2 +- sysdeps/m68k/m680x0/fpu/e_acos.c | 2 +- sysdeps/m68k/m680x0/fpu/e_atan2.c | 2 +- sysdeps/m68k/m680x0/fpu/e_fmod.c | 2 +- sysdeps/m68k/m680x0/fpu/e_pow.c | 2 +- sysdeps/m68k/m680x0/fpu/e_scalb.c | 2 +- sysdeps/m68k/m680x0/fpu/s_fpclassifyl.c | 2 +- sysdeps/m68k/m680x0/fpu/s_llrint.c | 2 +- sysdeps/m68k/m680x0/fpu/s_llrintf.c | 2 +- sysdeps/m68k/m680x0/fpu/s_llrintl.c | 2 +- sysdeps/m68k/m680x0/fpu/s_nextafterl.c | 4 ++-- 13 files changed, 25 insertions(+), 12 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 722f647947..5271475442 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,7 @@ +2012-03-09 Richard Henderson + + * sysdeps/hppa/hppa1.1/s_signbit.c: Use <> to include math_private.h. + 2012-03-09 Paul Eggert [BZ #13673] diff --git a/ChangeLog.m68k b/ChangeLog.m68k index e78d1a7368..187dd68863 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,12 @@ +2012-03-09 Richard Henderson + + * m68k/m680x0/fpu/e_acos.c: Use <> to include math_private.h. + * m68k/m680x0/fpu/e_atan2.c, m68k/m680x0/fpu/e_fmod.c: Likewise. + * m68k/m680x0/fpu/e_pow.c, m68k/m680x0/fpu/e_scalb.c: Likewise. + * m68k/m680x0/fpu/s_fpclassifyl.c, m68k/m680x0/fpu/s_llrint.c: Likewise. + * m68k/m680x0/fpu/s_llrintf.c, m68k/m680x0/fpu/s_llrintl.c: Likewise. + * m68k/m680x0/fpu/s_nextafterl.c: Likewise. + 2012-03-09 Paul Eggert [BZ #13673] diff --git a/sysdeps/hppa/hppa1.1/s_signbit.c b/sysdeps/hppa/hppa1.1/s_signbit.c index b762ab6f94..3e298a29df 100644 --- a/sysdeps/hppa/hppa1.1/s_signbit.c +++ b/sysdeps/hppa/hppa1.1/s_signbit.c @@ -19,7 +19,7 @@ #include -#include "math_private.h" +#include int __signbit (double x) diff --git a/sysdeps/m68k/m680x0/fpu/e_acos.c b/sysdeps/m68k/m680x0/fpu/e_acos.c index c662fe2013..f8a0a352a1 100644 --- a/sysdeps/m68k/m680x0/fpu/e_acos.c +++ b/sysdeps/m68k/m680x0/fpu/e_acos.c @@ -16,7 +16,7 @@ . */ #include -#include "math_private.h" +#include #include "mathimpl.h" #ifndef FUNC diff --git a/sysdeps/m68k/m680x0/fpu/e_atan2.c b/sysdeps/m68k/m680x0/fpu/e_atan2.c index f84fab321d..b0742d3da6 100644 --- a/sysdeps/m68k/m680x0/fpu/e_atan2.c +++ b/sysdeps/m68k/m680x0/fpu/e_atan2.c @@ -16,7 +16,7 @@ . */ #include -#include "math_private.h" +#include #include "mathimpl.h" #ifndef SUFF diff --git a/sysdeps/m68k/m680x0/fpu/e_fmod.c b/sysdeps/m68k/m680x0/fpu/e_fmod.c index dacd1a26b9..671e3b83a4 100644 --- a/sysdeps/m68k/m680x0/fpu/e_fmod.c +++ b/sysdeps/m68k/m680x0/fpu/e_fmod.c @@ -16,7 +16,7 @@ . */ #include -#include "math_private.h" +#include #include "mathimpl.h" #ifndef FUNC diff --git a/sysdeps/m68k/m680x0/fpu/e_pow.c b/sysdeps/m68k/m680x0/fpu/e_pow.c index cab2012f8e..41e28d0559 100644 --- a/sysdeps/m68k/m680x0/fpu/e_pow.c +++ b/sysdeps/m68k/m680x0/fpu/e_pow.c @@ -16,7 +16,7 @@ . */ #include -#include "math_private.h" +#include #include "mathimpl.h" #ifndef SUFF diff --git a/sysdeps/m68k/m680x0/fpu/e_scalb.c b/sysdeps/m68k/m680x0/fpu/e_scalb.c index 694b66e763..db49fdf097 100644 --- a/sysdeps/m68k/m680x0/fpu/e_scalb.c +++ b/sysdeps/m68k/m680x0/fpu/e_scalb.c @@ -17,7 +17,7 @@ . */ #include -#include "math_private.h" +#include #include "mathimpl.h" #ifndef SUFF diff --git a/sysdeps/m68k/m680x0/fpu/s_fpclassifyl.c b/sysdeps/m68k/m680x0/fpu/s_fpclassifyl.c index 23bd0b73a1..ace6436601 100644 --- a/sysdeps/m68k/m680x0/fpu/s_fpclassifyl.c +++ b/sysdeps/m68k/m680x0/fpu/s_fpclassifyl.c @@ -20,7 +20,7 @@ #include -#include "math_private.h" +#include int diff --git a/sysdeps/m68k/m680x0/fpu/s_llrint.c b/sysdeps/m68k/m680x0/fpu/s_llrint.c index 3166b9fadb..0952ccd1da 100644 --- a/sysdeps/m68k/m680x0/fpu/s_llrint.c +++ b/sysdeps/m68k/m680x0/fpu/s_llrint.c @@ -19,7 +19,7 @@ . */ #include -#include "math_private.h" +#include #include "mathimpl.h" long long int diff --git a/sysdeps/m68k/m680x0/fpu/s_llrintf.c b/sysdeps/m68k/m680x0/fpu/s_llrintf.c index 7460f17c80..dd5b95c730 100644 --- a/sysdeps/m68k/m680x0/fpu/s_llrintf.c +++ b/sysdeps/m68k/m680x0/fpu/s_llrintf.c @@ -19,7 +19,7 @@ . */ #include -#include "math_private.h" +#include #include "mathimpl.h" long long int diff --git a/sysdeps/m68k/m680x0/fpu/s_llrintl.c b/sysdeps/m68k/m680x0/fpu/s_llrintl.c index 8b7762600d..fbe66ee3dc 100644 --- a/sysdeps/m68k/m680x0/fpu/s_llrintl.c +++ b/sysdeps/m68k/m680x0/fpu/s_llrintl.c @@ -19,7 +19,7 @@ . */ #include -#include "math_private.h" +#include #include "mathimpl.h" long long int diff --git a/sysdeps/m68k/m680x0/fpu/s_nextafterl.c b/sysdeps/m68k/m680x0/fpu/s_nextafterl.c index dcccdf1762..9a03b78631 100644 --- a/sysdeps/m68k/m680x0/fpu/s_nextafterl.c +++ b/sysdeps/m68k/m680x0/fpu/s_nextafterl.c @@ -26,8 +26,8 @@ static char rcsid[] = "$NetBSD: $"; * Special cases: */ -#include "math.h" -#include "math_private.h" +#include +#include long double __nextafterl(long double x, long double y) { From ed7e7d46e94c352bf91b08750410cc15755ee6bb Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 9 Mar 2012 16:28:42 -0800 Subject: [PATCH 4260/4487] Use include_next to chain math_private.h headers. --- ChangeLog.m68k | 3 +++ ChangeLog.tile | 5 +++++ sysdeps/m68k/m680x0/fpu/math_private.h | 2 +- sysdeps/tile/math_private.h | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 187dd68863..70559a50a5 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,5 +1,8 @@ 2012-03-09 Richard Henderson + * sysdeps/m68k/m680x0/fpu/math_private.h: Use include_next to + chain math_private.h. + * m68k/m680x0/fpu/e_acos.c: Use <> to include math_private.h. * m68k/m680x0/fpu/e_atan2.c, m68k/m680x0/fpu/e_fmod.c: Likewise. * m68k/m680x0/fpu/e_pow.c, m68k/m680x0/fpu/e_scalb.c: Likewise. diff --git a/ChangeLog.tile b/ChangeLog.tile index 624196834d..b48d61401c 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,3 +1,8 @@ +2012-03-09 Richard Henderson + + * sysdeps/tile/math_private.h: Use include_next to + chain math_private.h. + 2012-03-09 Paul Eggert [BZ #13673] diff --git a/sysdeps/m68k/m680x0/fpu/math_private.h b/sysdeps/m68k/m680x0/fpu/math_private.h index 3793cff203..217de2ecc2 100644 --- a/sysdeps/m68k/m680x0/fpu/math_private.h +++ b/sysdeps/m68k/m680x0/fpu/math_private.h @@ -15,5 +15,5 @@ do \ } \ while (0) -#include +#include_next #endif diff --git a/sysdeps/tile/math_private.h b/sysdeps/tile/math_private.h index ea4c8eadf7..2dab42b9bf 100644 --- a/sysdeps/tile/math_private.h +++ b/sysdeps/tile/math_private.h @@ -1,6 +1,6 @@ #ifndef _MATH_PRIVATE_H -#include +#include_next /* We have no exception support, so feraiseexcept() must be a no-op. And since we don't define FE_INVALID, FE_DIVBYZERO, etc., we From e54793e8fe74bbdb18b6f770b83002cbb5db366b Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 10 Mar 2012 13:09:02 +0000 Subject: [PATCH 4261/4487] Replace FSF snail mail address with URL in sysdeps/mips/mips64/gmp-mparam.h. --- ChangeLog.mips | 6 ++++++ sysdeps/mips/mips64/gmp-mparam.h | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 8eef3c8fec..ecd4fb2bb1 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,9 @@ +2012-03-10 Paul Eggert + + [BZ #13673] + * sysdeps/mips/mips64/gmp-mparam.h: Replace FSF snail mail address + with URL. + 2012-03-09 Paul Eggert [BZ #13673] diff --git a/sysdeps/mips/mips64/gmp-mparam.h b/sysdeps/mips/mips64/gmp-mparam.h index 7666137a21..be2dcb89a1 100644 --- a/sysdeps/mips/mips64/gmp-mparam.h +++ b/sysdeps/mips/mips64/gmp-mparam.h @@ -15,8 +15,7 @@ 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 MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +along with the GNU MP Library. If not, see . */ #if defined __GMP_H__ && ! defined _LONG_LONG_LIMB #error "Included too late for _LONG_LONG_LIMB to take effect" From 2be0ac4d53dedea0a4d50b8a2d297923b71a8a3f Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sun, 11 Mar 2012 11:15:09 -0700 Subject: [PATCH 4262/4487] alpha: replace bits/socket.h with bits/socket_type.h. --- ChangeLog.alpha | 5 + sysdeps/unix/sysv/linux/alpha/bits/socket.h | 437 ------------------ .../unix/sysv/linux/alpha/bits/socket_type.h | 55 +++ 3 files changed, 60 insertions(+), 437 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/alpha/bits/socket.h create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/socket_type.h diff --git a/ChangeLog.alpha b/ChangeLog.alpha index f34c3c4a97..3036d8a6a1 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,8 @@ +2012-03-11 Richard Henderson + + * sysdeps/unix/sysv/linux/alpha/bits/socket.h: Remove file. + * sysdeps/unix/sysv/linux/alpha/bits/socket_type.h: New file. + 2012-03-09 Paul Eggert [BZ #13673] diff --git a/sysdeps/unix/sysv/linux/alpha/bits/socket.h b/sysdeps/unix/sysv/linux/alpha/bits/socket.h deleted file mode 100644 index 8ae4edf295..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/bits/socket.h +++ /dev/null @@ -1,437 +0,0 @@ -/* System-specific socket constants and types. Linux version. - Copyright (C) 1991-2012 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, see - . */ - -#ifndef __BITS_SOCKET_H -#define __BITS_SOCKET_H - -#ifndef _SYS_SOCKET_H -# error "Never include directly; use instead." -#endif - -#define __need_size_t -#include - -#include - -/* Type for length arguments in socket calls. */ -#ifndef __socklen_t_defined -typedef __socklen_t socklen_t; -# define __socklen_t_defined -#endif - -/* Types of sockets. */ -enum __socket_type -{ - SOCK_STREAM = 1, /* Sequenced, reliable, connection-based - byte streams. */ -#define SOCK_STREAM SOCK_STREAM - SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams - of fixed maximum length. */ -#define SOCK_DGRAM SOCK_DGRAM - SOCK_RAW = 3, /* Raw protocol interface. */ -#define SOCK_RAW SOCK_RAW - SOCK_RDM = 4, /* Reliably-delivered messages. */ -#define SOCK_RDM SOCK_RDM - SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, - datagrams of fixed maximum length. */ -#define SOCK_SEQPACKET SOCK_SEQPACKET - SOCK_DCCP = 6, /* Datagram Congestion Control Protocol. */ -#define SOCK_DCCP SOCK_DCCP - SOCK_PACKET = 10, /* Linux specific way of getting packets - at the dev level. For writing rarp and - other similar things on the user level. */ -#define SOCK_PACKET SOCK_PACKET - - /* Flags to be ORed into the type parameter of socket and socketpair and - used for the flags parameter of paccept. */ - - SOCK_CLOEXEC = 010000000, /* Atomically set close-on-exec flag for the - new descriptor(s). */ -#define SOCK_CLOEXEC SOCK_CLOEXEC - SOCK_NONBLOCK = 0x40000000 /* Atomically mark descriptor(s) as - non-blocking. */ -#define SOCK_NONBLOCK SOCK_NONBLOCK -}; - -/* Protocol families. */ -#define PF_UNSPEC 0 /* Unspecified. */ -#define PF_LOCAL 1 /* Local to host (pipes and file-domain). */ -#define PF_UNIX PF_LOCAL /* POSIX name for PF_LOCAL. */ -#define PF_FILE PF_LOCAL /* Another non-standard name for PF_LOCAL. */ -#define PF_INET 2 /* IP protocol family. */ -#define PF_AX25 3 /* Amateur Radio AX.25. */ -#define PF_IPX 4 /* Novell Internet Protocol. */ -#define PF_APPLETALK 5 /* Appletalk DDP. */ -#define PF_NETROM 6 /* Amateur radio NetROM. */ -#define PF_BRIDGE 7 /* Multiprotocol bridge. */ -#define PF_ATMPVC 8 /* ATM PVCs. */ -#define PF_X25 9 /* Reserved for X.25 project. */ -#define PF_INET6 10 /* IP version 6. */ -#define PF_ROSE 11 /* Amateur Radio X.25 PLP. */ -#define PF_DECnet 12 /* Reserved for DECnet project. */ -#define PF_NETBEUI 13 /* Reserved for 802.2LLC project. */ -#define PF_SECURITY 14 /* Security callback pseudo AF. */ -#define PF_KEY 15 /* PF_KEY key management API. */ -#define PF_NETLINK 16 -#define PF_ROUTE PF_NETLINK /* Alias to emulate 4.4BSD. */ -#define PF_PACKET 17 /* Packet family. */ -#define PF_ASH 18 /* Ash. */ -#define PF_ECONET 19 /* Acorn Econet. */ -#define PF_ATMSVC 20 /* ATM SVCs. */ -#define PF_RDS 21 /* RDS sockets. */ -#define PF_SNA 22 /* Linux SNA Project */ -#define PF_IRDA 23 /* IRDA sockets. */ -#define PF_PPPOX 24 /* PPPoX sockets. */ -#define PF_WANPIPE 25 /* Wanpipe API sockets. */ -#define PF_LLC 26 /* Linux LLC. */ -#define PF_CAN 29 /* Controller Area Network. */ -#define PF_TIPC 30 /* TIPC sockets. */ -#define PF_BLUETOOTH 31 /* Bluetooth sockets. */ -#define PF_IUCV 32 /* IUCV sockets. */ -#define PF_RXRPC 33 /* RxRPC sockets. */ -#define PF_ISDN 34 /* mISDN sockets. */ -#define PF_PHONET 35 /* Phonet sockets. */ -#define PF_IEEE802154 36 /* IEEE 802.15.4 sockets. */ -#define PF_MAX 37 /* For now.. */ - -/* Address families. */ -#define AF_UNSPEC PF_UNSPEC -#define AF_LOCAL PF_LOCAL -#define AF_UNIX PF_UNIX -#define AF_FILE PF_FILE -#define AF_INET PF_INET -#define AF_AX25 PF_AX25 -#define AF_IPX PF_IPX -#define AF_APPLETALK PF_APPLETALK -#define AF_NETROM PF_NETROM -#define AF_BRIDGE PF_BRIDGE -#define AF_ATMPVC PF_ATMPVC -#define AF_X25 PF_X25 -#define AF_INET6 PF_INET6 -#define AF_ROSE PF_ROSE -#define AF_DECnet PF_DECnet -#define AF_NETBEUI PF_NETBEUI -#define AF_SECURITY PF_SECURITY -#define AF_KEY PF_KEY -#define AF_NETLINK PF_NETLINK -#define AF_ROUTE PF_ROUTE -#define AF_PACKET PF_PACKET -#define AF_ASH PF_ASH -#define AF_ECONET PF_ECONET -#define AF_ATMSVC PF_ATMSVC -#define AF_RDS PF_RDS -#define AF_SNA PF_SNA -#define AF_IRDA PF_IRDA -#define AF_PPPOX PF_PPPOX -#define AF_WANPIPE PF_WANPIPE -#define AF_LLC PF_LLC -#define AF_CAN PF_CAN -#define AF_TIPC PF_TIPC -#define AF_BLUETOOTH PF_BLUETOOTH -#define AF_IUCV PF_IUCV -#define AF_RXRPC PF_RXRPC -#define AF_ISDN PF_ISDN -#define AF_PHONET PF_PHONET -#define AF_IEEE802154 PF_IEEE802154 -#define AF_MAX PF_MAX - -/* Socket level values. Others are defined in the appropriate headers. - - XXX These definitions also should go into the appropriate headers as - far as they are available. */ -#define SOL_RAW 255 -#define SOL_DECNET 261 -#define SOL_X25 262 -#define SOL_PACKET 263 -#define SOL_ATM 264 /* ATM layer (cell level). */ -#define SOL_AAL 265 /* ATM Adaption Layer (packet level). */ -#define SOL_IRDA 266 - -/* Maximum queue length specifiable by listen. */ -#define SOMAXCONN 128 - -/* Get the definition of the macro to define the common sockaddr members. */ -#include - -/* Structure describing a generic socket address. */ -struct sockaddr - { - __SOCKADDR_COMMON (sa_); /* Common data: address family and length. */ - char sa_data[14]; /* Address data. */ - }; - - -/* Structure large enough to hold any socket address (with the historical - exception of AF_UNIX). We reserve 128 bytes. */ -#define __ss_aligntype unsigned long int -#define _SS_SIZE 128 -#define _SS_PADSIZE (_SS_SIZE - (2 * sizeof (__ss_aligntype))) - -struct sockaddr_storage - { - __SOCKADDR_COMMON (ss_); /* Address family, etc. */ - __ss_aligntype __ss_align; /* Force desired alignment. */ - char __ss_padding[_SS_PADSIZE]; - }; - - -/* Bits in the FLAGS argument to `send', `recv', et al. */ -enum - { - MSG_OOB = 0x01, /* Process out-of-band data. */ -#define MSG_OOB MSG_OOB - MSG_PEEK = 0x02, /* Peek at incoming messages. */ -#define MSG_PEEK MSG_PEEK - MSG_DONTROUTE = 0x04, /* Don't use local routing. */ -#define MSG_DONTROUTE MSG_DONTROUTE -#ifdef __USE_GNU - /* DECnet uses a different name. */ - MSG_TRYHARD = MSG_DONTROUTE, -# define MSG_TRYHARD MSG_DONTROUTE -#endif - MSG_CTRUNC = 0x08, /* Control data lost before delivery. */ -#define MSG_CTRUNC MSG_CTRUNC - MSG_PROXY = 0x10, /* Supply or ask second address. */ -#define MSG_PROXY MSG_PROXY - MSG_TRUNC = 0x20, -#define MSG_TRUNC MSG_TRUNC - MSG_DONTWAIT = 0x40, /* Nonblocking IO. */ -#define MSG_DONTWAIT MSG_DONTWAIT - MSG_EOR = 0x80, /* End of record. */ -#define MSG_EOR MSG_EOR - MSG_WAITALL = 0x100, /* Wait for a full request. */ -#define MSG_WAITALL MSG_WAITALL - MSG_FIN = 0x200, -#define MSG_FIN MSG_FIN - MSG_SYN = 0x400, -#define MSG_SYN MSG_SYN - MSG_CONFIRM = 0x800, /* Confirm path validity. */ -#define MSG_CONFIRM MSG_CONFIRM - MSG_RST = 0x1000, -#define MSG_RST MSG_RST - MSG_ERRQUEUE = 0x2000, /* Fetch message from error queue. */ -#define MSG_ERRQUEUE MSG_ERRQUEUE - MSG_NOSIGNAL = 0x4000, /* Do not generate SIGPIPE. */ -#define MSG_NOSIGNAL MSG_NOSIGNAL - MSG_MORE = 0x8000, /* Sender will send more. */ -#define MSG_MORE MSG_MORE - MSG_WAITFORONE = 0x10000, /* Wait for at least one packet to return.*/ -#define MSG_WAITFORONE MSG_WAITFORONE - - MSG_CMSG_CLOEXEC = 0x40000000 /* Set close_on_exit for file - descriptor received through - SCM_RIGHTS. */ -#define MSG_CMSG_CLOEXEC MSG_CMSG_CLOEXEC - }; - - -/* Structure describing messages sent by - `sendmsg' and received by `recvmsg'. */ -struct msghdr - { - void *msg_name; /* Address to send to/receive from. */ - socklen_t msg_namelen; /* Length of address data. */ - - struct iovec *msg_iov; /* Vector of data to send/receive into. */ - size_t msg_iovlen; /* Number of elements in the vector. */ - - void *msg_control; /* Ancillary data (eg BSD filedesc passing). */ - size_t msg_controllen; /* Ancillary data buffer length. - !! The type should be socklen_t but the - definition of the kernel is incompatible - with this. */ - - int msg_flags; /* Flags on received message. */ - }; - -#ifdef __USE_GNU -/* For `recvmmsg'. */ -struct mmsghdr - { - struct msghdr msg_hdr; /* Actual message header. */ - unsigned int msg_len; /* Number of received bytes for the entry. */ - }; -#endif - -/* Structure used for storage of ancillary data object information. */ -struct cmsghdr - { - size_t cmsg_len; /* Length of data in cmsg_data plus length - of cmsghdr structure. - !! The type should be socklen_t but the - definition of the kernel is incompatible - with this. */ - int cmsg_level; /* Originating protocol. */ - int cmsg_type; /* Protocol specific type. */ -#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L - __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */ -#endif - }; - -/* Ancillary data object manipulation macros. */ -#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L -# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data) -#else -# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1)) -#endif -#define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg) -#define CMSG_FIRSTHDR(mhdr) \ - ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \ - ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) 0) -#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \ - & (size_t) ~(sizeof (size_t) - 1)) -#define CMSG_SPACE(len) (CMSG_ALIGN (len) \ - + CMSG_ALIGN (sizeof (struct cmsghdr))) -#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len)) - -extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr, - struct cmsghdr *__cmsg) __THROW; -#ifdef __USE_EXTERN_INLINES -# ifndef _EXTERN_INLINE -# define _EXTERN_INLINE __extern_inline -# endif -_EXTERN_INLINE struct cmsghdr * -__NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg)) -{ - if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr)) - /* The kernel header does this so there may be a reason. */ - return 0; - - __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg - + CMSG_ALIGN (__cmsg->cmsg_len)); - if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control - + __mhdr->msg_controllen) - || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len) - > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen))) - /* No more entries. */ - return 0; - return __cmsg; -} -#endif /* Use `extern inline'. */ - -/* Socket level message types. This must match the definitions in - . */ -enum - { - SCM_RIGHTS = 0x01 /* Transfer file descriptors. */ -#define SCM_RIGHTS SCM_RIGHTS -#ifdef __USE_GNU - , SCM_CREDENTIALS = 0x02 /* Credentials passing. */ -# define SCM_CREDENTIALS SCM_CREDENTIALS -#endif - }; - -#ifdef __USE_GNU -/* User visible structure for SCM_CREDENTIALS message */ -struct ucred -{ - pid_t pid; /* PID of sending process. */ - uid_t uid; /* UID of sending process. */ - gid_t gid; /* GID of sending process. */ -}; -#endif - -/* Ugly workaround for unclean kernel headers. */ -#if !defined __USE_MISC && !defined __USE_GNU -# ifndef FIOGETOWN -# define __SYS_SOCKET_H_undef_FIOGETOWN -# endif -# ifndef FIOSETOWN -# define __SYS_SOCKET_H_undef_FIOSETOWN -# endif -# ifndef SIOCATMARK -# define __SYS_SOCKET_H_undef_SIOCATMARK -# endif -# ifndef SIOCGPGRP -# define __SYS_SOCKET_H_undef_SIOCGPGRP -# endif -# ifndef SIOCGSTAMP -# define __SYS_SOCKET_H_undef_SIOCGSTAMP -# endif -# ifndef SIOCGSTAMPNS -# define __SYS_SOCKET_H_undef_SIOCGSTAMPNS -# endif -# ifndef SIOCSPGRP -# define __SYS_SOCKET_H_undef_SIOCSPGRP -# endif -#endif - -/* Get socket manipulation related informations from kernel headers. */ -#include - -#if !defined __USE_MISC && !defined __USE_GNU -# ifdef __SYS_SOCKET_H_undef_FIOGETOWN -# undef __SYS_SOCKET_H_undef_FIOGETOWN -# undef FIOGETOWN -# endif -# ifdef __SYS_SOCKET_H_undef_FIOSETOWN -# undef __SYS_SOCKET_H_undef_FIOSETOWN -# undef FIOSETOWN -# endif -# ifdef __SYS_SOCKET_H_undef_SIOCATMARK -# undef __SYS_SOCKET_H_undef_SIOCATMARK -# undef SIOCATMARK -# endif -# ifdef __SYS_SOCKET_H_undef_SIOCGPGRP -# undef __SYS_SOCKET_H_undef_SIOCGPGRP -# undef SIOCGPGRP -# endif -# ifdef __SYS_SOCKET_H_undef_SIOCGSTAMP -# undef __SYS_SOCKET_H_undef_SIOCGSTAMP -# undef SIOCGSTAMP -# endif -# ifdef __SYS_SOCKET_H_undef_SIOCGSTAMPNS -# undef __SYS_SOCKET_H_undef_SIOCGSTAMPNS -# undef SIOCGSTAMPNS -# endif -# ifdef __SYS_SOCKET_H_undef_SIOCSPGRP -# undef __SYS_SOCKET_H_undef_SIOCSPGRP -# undef SIOCSPGRP -# endif -#endif - -/* Structure used to manipulate the SO_LINGER option. */ -struct linger - { - int l_onoff; /* Nonzero to linger on close. */ - int l_linger; /* Time to linger. */ - }; - - -__BEGIN_DECLS - -#ifdef __USE_GNU -/* Receive up to VLEN messages as described by VMESSAGES from socket FD. - Returns the number of bytes read or -1 for errors. - This function is a cancellation point and therefore not marked with - __THROW. */ -extern int recvmmsg (int __fd, struct mmsghdr *__vmessages, - unsigned int __vlen, int __flags, - const struct timespec *__tmo); - -/* Send a VLEN messages as described by VMESSAGES to socket FD. - Return the number of datagrams successfully written or -1 for errors. - This function is a cancellation point and therefore not marked with - __THROW. */ -extern int sendmmsg (int __fd, struct mmsghdr *__vmessages, - unsigned int __vlen, int __flags); -#endif - -__END_DECLS - -#endif /* bits/socket.h */ diff --git a/sysdeps/unix/sysv/linux/alpha/bits/socket_type.h b/sysdeps/unix/sysv/linux/alpha/bits/socket_type.h new file mode 100644 index 0000000000..d3f45436b6 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/bits/socket_type.h @@ -0,0 +1,55 @@ +/* Define enum __socket_type for Linux/Alpha. + Copyright (C) 1991-2012 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, see + . */ + +#ifndef _SYS_SOCKET_H +# error "Never include directly; use instead." +#endif + +/* Types of sockets. */ +enum __socket_type +{ + SOCK_STREAM = 1, /* Sequenced, reliable, connection-based + byte streams. */ +#define SOCK_STREAM SOCK_STREAM + SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams + of fixed maximum length. */ +#define SOCK_DGRAM SOCK_DGRAM + SOCK_RAW = 3, /* Raw protocol interface. */ +#define SOCK_RAW SOCK_RAW + SOCK_RDM = 4, /* Reliably-delivered messages. */ +#define SOCK_RDM SOCK_RDM + SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, + datagrams of fixed maximum length. */ +#define SOCK_SEQPACKET SOCK_SEQPACKET + SOCK_DCCP = 6, /* Datagram Congestion Control Protocol. */ +#define SOCK_DCCP SOCK_DCCP + SOCK_PACKET = 10, /* Linux specific way of getting packets + at the dev level. For writing rarp and + other similar things on the user level. */ +#define SOCK_PACKET SOCK_PACKET + + /* Flags to be ORed into the type parameter of socket and socketpair and + used for the flags parameter of paccept. */ + + SOCK_CLOEXEC = 010000000, /* Atomically set close-on-exec flag for the + new descriptor(s). */ +#define SOCK_CLOEXEC SOCK_CLOEXEC + SOCK_NONBLOCK = 0x40000000 /* Atomically mark descriptor(s) as + non-blocking. */ +#define SOCK_NONBLOCK SOCK_NONBLOCK +}; From dbf5dff17451244b0dd2a2e604c0feb908fadaf1 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 13 Mar 2012 14:30:53 +0100 Subject: [PATCH 4263/4487] m68k: update kernel-features.h --- ChangeLog.m68k | 7 +++++++ sysdeps/unix/sysv/linux/m68k/kernel-features.h | 12 ++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 70559a50a5..892ca37c60 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,10 @@ +2012-03-13 Andreas Schwab + + * sysdeps/unix/sysv/linux/m68k/kernel-features.h + (__ASSUME_NEW_GETRLIMIT_SYSCALL, __ASSUME_VFORK_SYSCALL): Define + for 2.4.12 or later. + (__ASSUME_PSELECT, __ASSUME_PPOLL): Only undefine before 3.0. + 2012-03-09 Richard Henderson * sysdeps/m68k/m680x0/fpu/math_private.h: Use include_next to diff --git a/sysdeps/unix/sysv/linux/m68k/kernel-features.h b/sysdeps/unix/sysv/linux/m68k/kernel-features.h index 0c2e120f21..3fffa0801b 100644 --- a/sysdeps/unix/sysv/linux/m68k/kernel-features.h +++ b/sysdeps/unix/sysv/linux/m68k/kernel-features.h @@ -1,6 +1,6 @@ /* Set flags signalling availability of kernel features based on given kernel version number. - Copyright (C) 2008, 2009 Free Software Foundation, Inc. + Copyright (C) 2008, 2009, 2012 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 @@ -24,6 +24,8 @@ # define __ASSUME_STAT64_SYSCALL 1 # define __ASSUME_FCNTL64 1 # define __ASSUME_VFORK_SYSCALL 1 +# define __ASSUME_NEW_GETRLIMIT_SYSCALL 1 +# define __ASSUME_VFORK_SYSCALL 1 #endif /* Many syscalls were added in 2.6.10 for m68k. */ @@ -35,6 +37,8 @@ #include_next -/* These syscalls are not implemented yet for m68k. */ -#undef __ASSUME_PSELECT -#undef __ASSUME_PPOLL +/* These syscalls were added only in 3.0 for m68k. */ +#if __LINUX_KERNEL_VERSION < 0x030000 +# undef __ASSUME_PSELECT +# undef __ASSUME_PPOLL +#endif From b6db56fb2d6c0dcf46fb3e3ba7f9487198a5d3b6 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Thu, 15 Mar 2012 13:33:35 +0100 Subject: [PATCH 4264/4487] m68k: update libm test ULPs --- ChangeLog.m68k | 4 + sysdeps/m68k/m680x0/fpu/libm-test-ulps | 322 +++++++++++++++++++++++++ 2 files changed, 326 insertions(+) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 892ca37c60..d5797cc22c 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,7 @@ +2012-03-15 Andreas Schwab + + * sysdeps/m68k/m680x0/fpu/libm-test-ulps: Update. + 2012-03-13 Andreas Schwab * sysdeps/unix/sysv/linux/m68k/kernel-features.h diff --git a/sysdeps/m68k/m680x0/fpu/libm-test-ulps b/sysdeps/m68k/m680x0/fpu/libm-test-ulps index 8fa326d1ba..1e8972c9de 100644 --- a/sysdeps/m68k/m680x0/fpu/libm-test-ulps +++ b/sysdeps/m68k/m680x0/fpu/libm-test-ulps @@ -24,6 +24,76 @@ ildouble: 1 ldouble: 1 # cacos +Test "Imaginary part of: cacos (+0 + 0.5 i) == pi/2 - 0.4812118250596034474977589134243684231352 i": +double: 2 +idouble: 2 +Test "Imaginary part of: cacos (+0 + 1.0 i) == pi/2 - 0.8813735870195430252326093249797923090282 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: cacos (+0 + 1.5 i) == pi/2 - 1.194763217287109304111930828519090523536 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Imaginary part of: cacos (+0 - 0.5 i) == pi/2 + 0.4812118250596034474977589134243684231352 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (+0 - 1.0 i) == pi/2 + 0.8813735870195430252326093249797923090282 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: cacos (+0 - 1.5 i) == pi/2 + 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cacos (-0 + 0.5 i) == pi/2 - 0.4812118250596034474977589134243684231352 i": +double: 2 +idouble: 2 +Test "Imaginary part of: cacos (-0 + 1.0 i) == pi/2 - 0.8813735870195430252326093249797923090282 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: cacos (-0 + 1.5 i) == pi/2 - 1.194763217287109304111930828519090523536 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Imaginary part of: cacos (-0 - 0.5 i) == pi/2 + 0.4812118250596034474977589134243684231352 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-0 - 1.0 i) == pi/2 + 0.8813735870195430252326093249797923090282 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-0 - 1.5 i) == pi/2 + 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cacos (-1.5 + +0 i) == pi - 0.9624236501192068949955178268487368462704 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-1.5 - 0 i) == pi + 0.9624236501192068949955178268487368462704 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (0.5 + +0 i) == 1.047197551196597746154214461093167628066 - 0 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (0.5 - 0 i) == 1.047197551196597746154214461093167628066 + +0 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: cacos (0.75 + 1.25 i) == 1.11752014915610270578240049553777969 - 1.13239363160530819522266333696834467 i": float: 2 ifloat: 2 @@ -34,8 +104,76 @@ float: 1 ifloat: 1 ildouble: 2 ldouble: 2 +Test "Imaginary part of: cacos (1.5 + +0 i) == +0 - 0.9624236501192068949955178268487368462704 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: cacos (1.5 - 0 i) == +0 + 0.9624236501192068949955178268487368462704 i": +ildouble: 1 +ldouble: 1 # cacosh +Test "Real part of: cacosh (+0 + 0.5 i) == 0.4812118250596034474977589134243684231352 + pi/2 i": +float: 1 +ifloat: 1 +Test "Real part of: cacosh (+0 + 1.0 i) == 0.8813735870195430252326093249797923090282 + pi/2 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: cacosh (+0 + 1.5 i) == 1.194763217287109304111930828519090523536 + pi/2 i": +double: 1 +idouble: 1 +Test "Real part of: cacosh (+0 - 0.5 i) == 0.4812118250596034474977589134243684231352 - pi/2 i": +float: 1 +ifloat: 1 +Test "Real part of: cacosh (+0 - 1.0 i) == 0.8813735870195430252326093249797923090282 - pi/2 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: cacosh (+0 - 1.5 i) == 1.194763217287109304111930828519090523536 - pi/2 i": +double: 1 +idouble: 1 +Test "Real part of: cacosh (-0 + 0.5 i) == 0.4812118250596034474977589134243684231352 + pi/2 i": +float: 1 +ifloat: 1 +Test "Real part of: cacosh (-0 + 1.0 i) == 0.8813735870195430252326093249797923090282 + pi/2 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: cacosh (-0 + 1.5 i) == 1.194763217287109304111930828519090523536 + pi/2 i": +double: 1 +idouble: 1 +Test "Real part of: cacosh (-0 - 0.5 i) == 0.4812118250596034474977589134243684231352 - pi/2 i": +float: 1 +ifloat: 1 +Test "Real part of: cacosh (-0 - 1.0 i) == 0.8813735870195430252326093249797923090282 - pi/2 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: cacosh (-0 - 1.5 i) == 1.194763217287109304111930828519090523536 - pi/2 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cacosh (-0.5 + +0 i) == +0 + 2.094395102393195492308428922186335256131 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacosh (-0.5 - 0 i) == +0 - 2.094395102393195492308428922186335256131 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: cacosh (-1.5 + +0 i) == 0.9624236501192068949955178268487368462704 + pi i": +float: 1 +ifloat: 1 +Test "Real part of: cacosh (-1.5 - 0 i) == 0.9624236501192068949955178268487368462704 - pi i": +float: 1 +ifloat: 1 Test "Real part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": double: 1 float: 7 @@ -54,8 +192,74 @@ ldouble: 1 Test "Imaginary part of: cacosh (0.75 + 1.25 i) == 1.13239363160530819522266333696834467 + 1.11752014915610270578240049553777969 i": float: 1 ifloat: 1 +Test "Real part of: cacosh (1.5 + +0 i) == 0.9624236501192068949955178268487368462704 + +0 i": +float: 1 +ifloat: 1 +Test "Real part of: cacosh (1.5 - 0 i) == 0.9624236501192068949955178268487368462704 - 0 i": +float: 1 +ifloat: 1 # casin +Test "Imaginary part of: casin (+0 + 0.5 i) == +0 + 0.4812118250596034474977589134243684231352 i": +double: 2 +idouble: 2 +Test "Imaginary part of: casin (+0 + 1.0 i) == +0 + 0.8813735870195430252326093249797923090282 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: casin (+0 + 1.5 i) == +0 + 1.194763217287109304111930828519090523536 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Imaginary part of: casin (+0 - 0.5 i) == +0 - 0.4812118250596034474977589134243684231352 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: casin (+0 - 1.0 i) == +0 - 0.8813735870195430252326093249797923090282 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: casin (+0 - 1.5 i) == +0 - 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +Test "Imaginary part of: casin (-0 + 0.5 i) == -0 + 0.4812118250596034474977589134243684231352 i": +double: 2 +idouble: 2 +Test "Imaginary part of: casin (-0 + 1.0 i) == -0 + 0.8813735870195430252326093249797923090282 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: casin (-0 + 1.5 i) == -0 + 1.194763217287109304111930828519090523536 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Imaginary part of: casin (-0 - 0.5 i) == -0 - 0.4812118250596034474977589134243684231352 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: casin (-0 - 1.0 i) == -0 - 0.8813735870195430252326093249797923090282 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: casin (-0 - 1.5 i) == -0 - 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +Test "Imaginary part of: casin (-1.5 + +0 i) == -pi/2 + 0.9624236501192068949955178268487368462704 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: casin (-1.5 - 0 i) == -pi/2 - 0.9624236501192068949955178268487368462704 i": +ildouble: 1 +ldouble: 1 Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": double: 1 float: 5 @@ -68,8 +272,62 @@ float: 1 ifloat: 1 ildouble: 2 ldouble: 2 +Test "Imaginary part of: casin (1.5 + +0 i) == pi/2 + 0.9624236501192068949955178268487368462704 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: casin (1.5 - 0 i) == pi/2 - 0.9624236501192068949955178268487368462704 i": +ildouble: 1 +ldouble: 1 # casinh +Test "Real part of: casinh (+0 + 1.5 i) == 0.9624236501192068949955178268487368462704 + pi/2 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (+0 - 1.5 i) == 0.9624236501192068949955178268487368462704 - pi/2 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-0 + 1.5 i) == -0.9624236501192068949955178268487368462704 + pi/2 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casinh (-0 - 1.5 i) == -0.9624236501192068949955178268487368462704 - pi/2 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casinh (-0.5 + +0 i) == -0.4812118250596034474977589134243684231352 + +0 i": +double: 2 +idouble: 2 +Test "Real part of: casinh (-0.5 - 0 i) == -0.4812118250596034474977589134243684231352 - 0 i": +double: 2 +idouble: 2 +Test "Real part of: casinh (-1.0 + +0 i) == -0.8813735870195430252326093249797923090282 + +0 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "Real part of: casinh (-1.0 - 0 i) == -0.8813735870195430252326093249797923090282 - 0 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "Real part of: casinh (-1.5 + +0 i) == -1.194763217287109304111930828519090523536 + +0 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Real part of: casinh (-1.5 - 0 i) == -1.194763217287109304111930828519090523536 - 0 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": double: 6 float: 19 @@ -84,6 +342,12 @@ idouble: 13 ifloat: 6 ildouble: 6 ldouble: 6 +Test "Real part of: casinh (0.5 + +0 i) == 0.4812118250596034474977589134243684231352 + +0 i": +float: 1 +ifloat: 1 +Test "Real part of: casinh (0.5 - 0 i) == 0.4812118250596034474977589134243684231352 - 0 i": +float: 1 +ifloat: 1 Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": float: 1 ifloat: 1 @@ -96,6 +360,22 @@ idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 +Test "Real part of: casinh (1.0 + +0 i) == 0.8813735870195430252326093249797923090282 + +0 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casinh (1.0 - 0 i) == 0.8813735870195430252326093249797923090282 - 0 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casinh (1.5 + +0 i) == 1.194763217287109304111930828519090523536 + +0 i": +double: 1 +idouble: 1 +Test "Real part of: casinh (1.5 - 0 i) == 1.194763217287109304111930828519090523536 - 0 i": +double: 1 +idouble: 1 # catan Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": @@ -533,6 +813,32 @@ Test "Imaginary part of: csinh (0.75 + 1.25 i) == 0.2592948545511627791533498306 float: 1 ifloat: 1 +# csqrt +Test "Real part of: csqrt (0x1.fffffffffffffp+1023 + 0x1.fffffffffffffp+1023 i) == 1.473094556905565378990473658199034571917e+154 + 6.101757441282702188537080005372547713595e+153 i": +double: 1 +idouble: 1 +Test "Imaginary part of: csqrt (0x1.fffffffffffffp+1023 + 0x1.fffffffffffffp+1023 i) == 1.473094556905565378990473658199034571917e+154 + 6.101757441282702188537080005372547713595e+153 i": +double: 1 +idouble: 1 +Test "Imaginary part of: csqrt (0x1.fffffffffffffp+1023 + 0x1p+1023 i) == 1.379778091031440685006200821918878702861e+154 + 3.257214233483129514781233066898042490248e+153 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csqrt (0x1.fp+16383 + 0x1.fp+16383 i) == 1.179514222452201722651836720466795901016e+2466 + 4.885707879516577666702435054303191575148e+2465 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csqrt (0x1p-1073 + 0x1p-1073 i) == 3.453664695497464982856905711457966660085e-162 + 1.430554756764195530630723976279903095110e-162 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csqrt (0x1p-1074 + 0x1p-1074 i) == 2.442109726130830256743814843868934877597e-162 + 1.011554969366634726113090867589031782487e-162 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csqrt (0x1p-147 + 0x1p-147 i) == 8.225610928685557596194006925540350401606e-23 + 3.407159605465907500737319471202779419102e-23 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csqrt (0x1p-149 + 0x1p-149 i) == 4.112805464342778798097003462770175200803e-23 + 1.703579802732953750368659735601389709551e-23 i": +ildouble: 1 +ldouble: 1 + # ctan Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": double: 1 @@ -1487,13 +1793,17 @@ ildouble: 1 ldouble: 1 Function: Real part of "cacos": +double: 1 float: 2 +idouble: 1 ifloat: 2 ildouble: 1 ldouble: 1 Function: Imaginary part of "cacos": +double: 2 float: 1 +idouble: 2 ifloat: 1 ildouble: 2 ldouble: 2 @@ -1523,7 +1833,9 @@ ildouble: 3 ldouble: 3 Function: Imaginary part of "casin": +double: 2 float: 1 +idouble: 2 ifloat: 1 ildouble: 2 ldouble: 2 @@ -1712,6 +2024,16 @@ Function: Imaginary part of "csinh": float: 1 ifloat: 1 +Function: Real part of "csqrt": +double: 1 +idouble: 1 + +Function: Imaginary part of "csqrt": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + Function: Real part of "ctan": double: 1 idouble: 1 From bdd7898a58bd76ac3b411a4931ff3f9e77eabe6a Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sun, 18 Mar 2012 17:27:13 -0700 Subject: [PATCH 4265/4487] alpha: Tell math_private.h that we have __isnan et al. --- ChangeLog.alpha | 4 ++++ sysdeps/alpha/fpu/math_private.h | 21 +++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 sysdeps/alpha/fpu/math_private.h diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 3036d8a6a1..03c835e809 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,7 @@ +2012-03-19 Richard Henderson + + * sysdeps/alpha/fpu/math_private.h: New file. + 2012-03-11 Richard Henderson * sysdeps/unix/sysv/linux/alpha/bits/socket.h: Remove file. diff --git a/sysdeps/alpha/fpu/math_private.h b/sysdeps/alpha/fpu/math_private.h new file mode 100644 index 0000000000..eb2177d78d --- /dev/null +++ b/sysdeps/alpha/fpu/math_private.h @@ -0,0 +1,21 @@ +#ifndef ALPHA_MATH_PRIVATE_H +#define ALPHA_MATH_PRIVATE_H 1 + +/* In bits/mathinline.h we define __isnan et al. + In sysdeps/alpha/fpu/s_isnan.c we move the identifier out of the way + via macro hackery. In both cases, tell math/math_private.h that + we have a local copy of the function. */ + +#ifndef __isnan +# define __isnan __isnan +#endif +#ifndef __isnanf +# define __isnanf __isnanf +#endif +#ifndef __isnanl +# define __isnanl __isnanl +#endif + +#include_next + +#endif /* ALPHA_MATH_PRIVATE_H */ From 1c195f88f0e059cabdd2d1b3502a326860d71160 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 20 Mar 2012 00:25:54 +0100 Subject: [PATCH 4266/4487] m68k: update libm test ULPs --- ChangeLog.m68k | 4 +++ sysdeps/m68k/m680x0/fpu/libm-test-ulps | 48 +++++++++++++++++++++++--- 2 files changed, 48 insertions(+), 4 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index d5797cc22c..1285bdb95d 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,7 @@ +2012-03-20 Andreas Schwab + + * sysdeps/m68k/m680x0/fpu/libm-test-ulps: Update. + 2012-03-15 Andreas Schwab * sysdeps/m68k/m680x0/fpu/libm-test-ulps: Update. diff --git a/sysdeps/m68k/m680x0/fpu/libm-test-ulps b/sysdeps/m68k/m680x0/fpu/libm-test-ulps index 1e8972c9de..8d6478cfe6 100644 --- a/sysdeps/m68k/m680x0/fpu/libm-test-ulps +++ b/sysdeps/m68k/m680x0/fpu/libm-test-ulps @@ -463,6 +463,12 @@ ldouble: 1 Test "Imaginary part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i": ildouble: 1 ldouble: 1 +Test "Real part of: clog (0x1.fp+16383 + 0x1p+16383 i) == 11356.60974243783798653123798337822335902 + 0.4764674194737066993385333770295162295856 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: clog (0x1.fp+16383 + 0x1p+16383 i) == 11356.60974243783798653123798337822335902 + 0.4764674194737066993385333770295162295856 i": +ildouble: 1 +ldouble: 1 # clog10 Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i": @@ -513,6 +519,9 @@ double: 1 idouble: 1 ildouble: 2 ldouble: 2 +Test "Imaginary part of: clog10 (0x1p-16440 + 0x1p-16441 i) == -4948.884673709346821106688037612752099609 + 0.2013595981366865710389502301937289472543 i": +ildouble: 1 +ldouble: 1 Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i": float: 1 ifloat: 1 @@ -988,6 +997,9 @@ float: 1 ifloat: 1 # j0 +Test "j0 (-0x1.001000001p+593) == -3.927269966354206207832593635798954916263e-90": +ildouble: 2 +ldouble: 2 Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1": float: 1 ifloat: 1 @@ -996,6 +1008,9 @@ ldouble: 2 Test "j0 (0.75) == 0.864242275166648623555731103820923211": float: 1 ifloat: 1 +Test "j0 (0x1.d7ce3ap+107) == 2.775523647291230802651040996274861694514e-17": +float: 2 +ifloat: 2 Test "j0 (1.5) == 0.511827671735918128749051744283411720": float: 1 ifloat: 1 @@ -1015,6 +1030,11 @@ ifloat: 1 Test "j1 (-1.0) == -0.440050585744933515959682203718914913": float: 1 ifloat: 1 +Test "j1 (0x1.3ffp+74) == 1.818984347516051243459364437186082741567e-12": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 Test "j1 (1.0) == 0.440050585744933515959682203718914913": float: 1 ifloat: 1 @@ -1112,6 +1132,11 @@ float: 2 ifloat: 2 ildouble: 1 ldouble: 1 +Test "jn (2, 0x1.ffff62p+99) == -4.43860668048170034334926693188979974489e-16": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 Test "jn (2, 2.4048255576957729) == 0.43175480701968038399746111312430703": float: 1 ifloat: 1 @@ -1643,6 +1668,11 @@ idouble: 1 ifloat: 1 ildouble: 2 ldouble: 2 +Test "y0 (0x1.3ffp+74) == 1.818984347516051243459467456433028748678e-12": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 Test "y0 (1.0) == 0.0882569642156769579829267660235151628": ildouble: 1 ldouble: 1 @@ -1669,6 +1699,16 @@ ldouble: 1 Test "y1 (0.125) == -5.19993611253477499595928744876579921": ildouble: 1 ldouble: 1 +Test "y1 (0x1.001000001p+593) == 3.927269966354206207832593635798954916263e-90": +ildouble: 2 +ldouble: 2 +Test "y1 (0x1.27e204p+99) == -8.881610148467797208469612080785210013461e-16": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 1 +ldouble: 1 Test "y1 (1.0) == -0.781212821300288716547150000047964821": double: 1 idouble: 1 @@ -2098,9 +2138,9 @@ ifloat: 1 Function: "j0": double: 1 -float: 1 +float: 2 idouble: 1 -ifloat: 1 +ifloat: 2 ildouble: 2 ldouble: 2 @@ -2283,8 +2323,8 @@ double: 1 float: 2 idouble: 1 ifloat: 2 -ildouble: 1 -ldouble: 1 +ildouble: 2 +ldouble: 2 Function: "yn": double: 1 From bf98494a8a5b63886ed2aad226b23d7773357857 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 20 Mar 2012 23:13:50 +0000 Subject: [PATCH 4267/4487] ARM: Update _itoa.h include. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/register-dump.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index ba2cb23470..f1376cdabb 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2012-03-20 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/register-dump.h: Include <_itoa.h> + instead of . + 2012-03-09 Paul Eggert [BZ #13673] diff --git a/sysdeps/unix/sysv/linux/arm/register-dump.h b/sysdeps/unix/sysv/linux/arm/register-dump.h index 32c15eea67..3d72b84228 100644 --- a/sysdeps/unix/sysv/linux/arm/register-dump.h +++ b/sysdeps/unix/sysv/linux/arm/register-dump.h @@ -1,5 +1,5 @@ /* Dump registers. - Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc. + Copyright (C) 1998-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Philip Blundell , 1998. @@ -18,7 +18,7 @@ . */ #include -#include +#include <_itoa.h> #include /* We will print the register dump in this format: From 1422b9df2961c6f228daea577d62d19ac40127dd Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 20 Mar 2012 23:14:19 +0000 Subject: [PATCH 4268/4487] MIPS: Update _itoa.h include. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/register-dump.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index ecd4fb2bb1..44667cdeab 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2012-03-20 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/register-dump.h: Include <_itoa.h> + instead of . + 2012-03-10 Paul Eggert [BZ #13673] diff --git a/sysdeps/unix/sysv/linux/mips/register-dump.h b/sysdeps/unix/sysv/linux/mips/register-dump.h index ef986bd0ac..186228119f 100644 --- a/sysdeps/unix/sysv/linux/mips/register-dump.h +++ b/sysdeps/unix/sysv/linux/mips/register-dump.h @@ -1,5 +1,5 @@ /* Dump registers. - Copyright (C) 2000, 2001, 2002, 2006 Free Software Foundation, Inc. + Copyright (C) 2000-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger , 2000. @@ -18,7 +18,7 @@ . */ #include -#include +#include <_itoa.h> /* We will print the register dump in this format: From 57988d0ba7fdbdd1b9b424b428d7d6001c0e219f Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 21 Mar 2012 00:38:10 +0100 Subject: [PATCH 4269/4487] m68k: update _itoa.h include --- ChangeLog.m68k | 5 +++++ sysdeps/unix/sysv/linux/m68k/register-dump.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 1285bdb95d..04c4f93a13 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2012-03-21 Andreas Schwab + + * sysdeps/unix/sysv/linux/m68k/register-dump.h: Include <_itoa.h> + instead of . + 2012-03-20 Andreas Schwab * sysdeps/m68k/m680x0/fpu/libm-test-ulps: Update. diff --git a/sysdeps/unix/sysv/linux/m68k/register-dump.h b/sysdeps/unix/sysv/linux/m68k/register-dump.h index 91a654bd5f..877089ecb0 100644 --- a/sysdeps/unix/sysv/linux/m68k/register-dump.h +++ b/sysdeps/unix/sysv/linux/m68k/register-dump.h @@ -1,5 +1,5 @@ /* Dump registers. - Copyright (C) 1998, 2002, 2004 Free Software Foundation, Inc. + Copyright (C) 1998, 2002, 2004, 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab . @@ -19,7 +19,7 @@ #include #include -#include +#include <_itoa.h> /* We will print the register dump in this format: From 925f8e84e6fd139478e6683e6ab84898571e4a98 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 21 Mar 2012 08:18:55 -0700 Subject: [PATCH 4270/4487] alpha: Update _itoa.h include. --- ChangeLog.alpha | 5 +++++ sysdeps/alpha/hp-timing.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 03c835e809..500e2273c8 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,8 @@ +2012-03-21 Richard Henderson + + * sysdeps/alpha/hp-timing.h: Include <_itoa.h> instead + of . + 2012-03-19 Richard Henderson * sysdeps/alpha/fpu/math_private.h: New file. diff --git a/sysdeps/alpha/hp-timing.h b/sysdeps/alpha/hp-timing.h index aea743debb..399d71635a 100644 --- a/sysdeps/alpha/hp-timing.h +++ b/sysdeps/alpha/hp-timing.h @@ -22,7 +22,7 @@ #include #include -#include +#include <_itoa.h> /* The macros defined here use the timestamp counter in IA-64. They provide a very accurate way to measure the time with very little From 0e8a8f6d58000e8bc450ec484fe16a51c0b982c7 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Thu, 22 Mar 2012 00:05:14 -0400 Subject: [PATCH 4271/4487] [PARISC] small atomic.h optimization We do not negate the light-weight syscall return and instead just check for the negative errno value allowing the compiler to optimize as required. --- ChangeLog.hppa | 7 +++++++ sysdeps/unix/sysv/linux/hppa/bits/atomic.h | 3 +-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 5271475442..700c78fe05 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,10 @@ +2012-03-22 Carlos O'Donell + + [BZ #6730] + + * sysdeps/unix/sysv/linux/hppa/bits/atomic.h: Don't negate %r21 and + check for -EFAULT and -ENOSYS instead. + 2012-03-09 Richard Henderson * sysdeps/hppa/hppa1.1/s_signbit.c: Use <> to include math_private.h. diff --git a/sysdeps/unix/sysv/linux/hppa/bits/atomic.h b/sysdeps/unix/sysv/linux/hppa/bits/atomic.h index 89823d279f..d94daf10a9 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/atomic.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/atomic.h @@ -79,14 +79,13 @@ typedef uintmax_t uatomic_max_t; "cmpb,=,n %%r25, %%r21, 0b \n\t" \ "nop \n\t" \ "stw %%r28, %0 \n\t" \ - "sub %%r0, %%r21, %%r21 \n\t" \ "stw %%r21, %1 \n\t" \ : "=m" (lws_ret), "=m" (lws_errno) \ : "r" (mem), "r" (oldval), "r" (newval) \ : _LWS_CLOBBER \ ); \ \ - if(lws_errno == EFAULT || lws_errno == ENOSYS) \ + if(lws_errno == -EFAULT || lws_errno == -ENOSYS) \ ABORT_INSTRUCTION; \ \ lws_ret; \ From 2b6c81984bdaac9b01afe7f8f2289a8d9c8d7d47 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Thu, 22 Mar 2012 00:12:30 -0400 Subject: [PATCH 4272/4487] Update copyright year to 2012. --- sysdeps/unix/sysv/linux/hppa/bits/atomic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/hppa/bits/atomic.h b/sysdeps/unix/sysv/linux/hppa/bits/atomic.h index d94daf10a9..457c2e967a 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/atomic.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/atomic.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 Free Software Foundation, Inc. +/* Copyright (C) 2003-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Carlos O'Donell , 2005. From 8b37c8a65094f273f886c9402cb70455155522bf Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Thu, 22 Mar 2012 10:55:02 +0100 Subject: [PATCH 4273/4487] m68k: update libm test ULPs --- ChangeLog.m68k | 4 ++++ sysdeps/m68k/m680x0/fpu/libm-test-ulps | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 04c4f93a13..50a5e455da 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,7 @@ +2012-03-22 Andreas Schwab + + * sysdeps/m68k/m680x0/fpu/libm-test-ulps: Update. + 2012-03-21 Andreas Schwab * sysdeps/unix/sysv/linux/m68k/register-dump.h: Include <_itoa.h> diff --git a/sysdeps/m68k/m680x0/fpu/libm-test-ulps b/sysdeps/m68k/m680x0/fpu/libm-test-ulps index 8d6478cfe6..f3ae7bb7b3 100644 --- a/sysdeps/m68k/m680x0/fpu/libm-test-ulps +++ b/sysdeps/m68k/m680x0/fpu/libm-test-ulps @@ -439,6 +439,9 @@ ildouble: 1 ldouble: 1 # cexp +Test "Real part of: cexp (-10000 + 0x1p16383 i) == 1.045876464564882298442774542991176546722e-4343 + 4.421154026488516836023811173959413420548e-4344 i": +ildouble: 1 +ldouble: 1 Test "Real part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": float: 1 ifloat: 1 @@ -453,6 +456,9 @@ float: 1 ifloat: 1 ildouble: 1 ldouble: 1 +Test "Imaginary part of: cexp (50 + 0x1p127 i) == 4.053997150228616856622417636046265337193e21 + 3.232070315463388524466674772633810238819e21 i": +ildouble: 1 +ldouble: 1 # clog Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i": @@ -1941,6 +1947,8 @@ ldouble: 1 Function: Real part of "cexp": float: 2 ifloat: 2 +ildouble: 1 +ldouble: 1 Function: Imaginary part of "cexp": float: 1 From 3278063a823cbbc1931e5c388869a9a45dd50933 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 23 Mar 2012 13:42:08 +0100 Subject: [PATCH 4274/4487] m68k: prevent gcc from CSEing mathinline asms --- ChangeLog.m68k | 8 ++++++++ sysdeps/m68k/m680x0/fpu/bits/mathinline.h | 20 +++++++++++--------- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 50a5e455da..160fb169af 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,11 @@ +2012-03-23 Andreas Schwab + + * sysdeps/m68k/m680x0/fpu/bits/mathinline.h (__inline_mathop1): + Mark asm as volatile. + (__scalbn): Likewise. + (__lrint): Likewise. + (__sincos): Likewise. + 2012-03-22 Andreas Schwab * sysdeps/m68k/m680x0/fpu/libm-test-ulps: Update. diff --git a/sysdeps/m68k/m680x0/fpu/bits/mathinline.h b/sysdeps/m68k/m680x0/fpu/bits/mathinline.h index 8d4e30a4ad..ffcc39edfd 100644 --- a/sysdeps/m68k/m680x0/fpu/bits/mathinline.h +++ b/sysdeps/m68k/m680x0/fpu/bits/mathinline.h @@ -146,7 +146,8 @@ __NTH (__signbitl (long double __x)) __m81_defun (float_type, func, (float_type __mathop_x)) \ { \ float_type __result; \ - __asm("f" __STRING(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x));\ + __asm __volatile__ ("f" __STRING(op) "%.x %1, %0" \ + : "=f" (__result) : "f" (__mathop_x)); \ return __result; \ } @@ -243,8 +244,8 @@ __m81_defun (int, __CONCAT(__isinf,s), (float_type __value)) \ /* There is no branch-condition for infinity, \ so we must extract and examine the condition codes manually. */ \ unsigned long int __fpsr; \ - __asm("ftst%.x %1\n" \ - "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \ + __asm ("ftst%.x %1\n" \ + "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \ return (__fpsr & (2 << 24)) ? (__fpsr & (8 << 24) ? -1 : 1) : 0; \ } \ \ @@ -262,7 +263,8 @@ __m81_defun (float_type, __CONCAT(__scalbn,s), \ (float_type __x, int __n)) \ { \ float_type __result; \ - __asm ("fscale%.l %1, %0" : "=f" (__result) : "dmi" (__n), "0" (__x)); \ + __asm __volatile__ ("fscale%.l %1, %0" : "=f" (__result) \ + : "dmi" (__n), "0" (__x)); \ return __result; \ } @@ -279,8 +281,8 @@ __inline_functions(long double,l) __m81_defun (int, __CONCAT(__isnan,s), (float_type __value)) \ { \ char __result; \ - __asm("ftst%.x %1\n" \ - "fsun %0" : "=dm" (__result) : "f" (__value)); \ + __asm ("ftst%.x %1\n" \ + "fsun %0" : "=dm" (__result) : "f" (__value)); \ return __result; \ } @@ -319,7 +321,7 @@ __m81_defun (float_type, __CONCAT(__nearbyint,s), (float_type __x)) \ __m81_defun (long int, __CONCAT(__lrint,s), (float_type __x)) \ { \ long int __result; \ - __asm ("fmove%.l %1, %0" : "=dm" (__result) : "f" (__x)); \ + __asm __volatile__ ("fmove%.l %1, %0" : "=dm" (__result) : "f" (__x)); \ return __result; \ } @@ -337,8 +339,8 @@ __m81_inline void \ __NTH (__m81_u(__CONCAT(__sincos,s))(float_type __x, float_type *__sinx, \ float_type *__cosx)) \ { \ - __asm ("fsincos%.x %2,%1:%0" \ - : "=f" (*__sinx), "=f" (*__cosx) : "f" (__x)); \ + __asm __volatile__ ("fsincos%.x %2,%1:%0" \ + : "=f" (*__sinx), "=f" (*__cosx) : "f" (__x)); \ } __inline_functions (double,) From 2f6ba7629b1a18d560f1ccda89a61ccf1569ab7f Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 23 Mar 2012 16:33:37 +0100 Subject: [PATCH 4275/4487] m68k: avoid undue overflow in cexp --- ChangeLog.m68k | 2 ++ sysdeps/m68k/m680x0/fpu/s_cexp.c | 41 ++++++++++++++++++++++++-------- 2 files changed, 33 insertions(+), 10 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 160fb169af..a7f42027d8 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,5 +1,7 @@ 2012-03-23 Andreas Schwab + * sysdeps/m68k/m680x0/fpu/s_cexp.c: Avoid undue overflow. + * sysdeps/m68k/m680x0/fpu/bits/mathinline.h (__inline_mathop1): Mark asm as volatile. (__scalbn): Likewise. diff --git a/sysdeps/m68k/m680x0/fpu/s_cexp.c b/sysdeps/m68k/m680x0/fpu/s_cexp.c index 62cddbdad9..c2a9f1d22e 100644 --- a/sysdeps/m68k/m680x0/fpu/s_cexp.c +++ b/sysdeps/m68k/m680x0/fpu/s_cexp.c @@ -17,6 +17,7 @@ License along with the GNU C Library. If not, see . */ +#include #include #include #include "mathimpl.h" @@ -43,26 +44,46 @@ s(__cexp) (__complex__ float_type x) if ((ix_cond & (__M81_COND_NAN|__M81_COND_INF)) == 0) { /* Imaginary part is finite. */ - float_type exp_val = m81(__ieee754_exp) (__real__ x); + unsigned long rx_cond = __m81_test (__real__ x); - __real__ retval = __imag__ retval = exp_val; - if (m81(__finite) (exp_val)) + if ((rx_cond & (__M81_COND_NAN|__M81_COND_INF)) == 0) { - float_type sin_ix, cos_ix; - __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_ix), "=f" (cos_ix) - : "f" (__imag__ x)); - __real__ retval *= cos_ix; + const int t = (int) ((LDBL_MAX_EXP - 1) * M_LN2l); + long double sin_ix, cos_ix, exp_val; + + __m81_u (__sincosl) (__imag__ x, &sin_ix, &cos_ix); + + if (__real__ x > t) + { + long double exp_t = __m81_u(__ieee754_expl) (t); + __real__ x -= t; + sin_ix *= exp_t; + cos_ix *= exp_t; + if (__real__ x > t) + { + __real__ x -= t; + sin_ix *= exp_t; + cos_ix *= exp_t; + } + } + + exp_val = __m81_u(__ieee754_expl) (__real__ x); + __real__ retval = exp_val * cos_ix; if (ix_cond & __M81_COND_ZERO) __imag__ retval = __imag__ x; else - __imag__ retval *= sin_ix; + __imag__ retval = exp_val * sin_ix; } else { /* Compute the sign of the result. */ - float_type remainder, pi_2; + long double remainder, pi_2; int quadrant; + if ((rx_cond & (__M81_COND_NAN|__M81_COND_NEG)) == __M81_COND_NEG) + __real__ retval = __imag__ retval = 0.0; + else + __real__ retval = __imag__ retval = __real__ x; __asm ("fmovecr %#0,%0\n\tfscale%.w %#-1,%0" : "=f" (pi_2)); __asm ("fmod%.x %2,%0\n\tfmove%.l %/fpsr,%1" : "=f" (remainder), "=dm" (quadrant) @@ -83,7 +104,7 @@ s(__cexp) (__complex__ float_type x) __imag__ retval = -__imag__ retval; break; } - if (ix_cond & __M81_COND_ZERO && !m81(__isnan) (exp_val)) + if (ix_cond & __M81_COND_ZERO && (rx_cond & __M81_COND_NAN) == 0) __imag__ retval = __imag__ x; } } From 0be6f6f707b29cb2b9ac1e446fe8c72c092b0a5e Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 23 Mar 2012 16:34:03 +0100 Subject: [PATCH 4276/4487] m68k: update libm test ULPs --- ChangeLog.m68k | 2 ++ sysdeps/m68k/m680x0/fpu/libm-test-ulps | 19 +++++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index a7f42027d8..ea4155f183 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,5 +1,7 @@ 2012-03-23 Andreas Schwab + * sysdeps/m68k/m680x0/fpu/libm-test-ulps: Update. + * sysdeps/m68k/m680x0/fpu/s_cexp.c: Avoid undue overflow. * sysdeps/m68k/m680x0/fpu/bits/mathinline.h (__inline_mathop1): diff --git a/sysdeps/m68k/m680x0/fpu/libm-test-ulps b/sysdeps/m68k/m680x0/fpu/libm-test-ulps index f3ae7bb7b3..b153ba9bed 100644 --- a/sysdeps/m68k/m680x0/fpu/libm-test-ulps +++ b/sysdeps/m68k/m680x0/fpu/libm-test-ulps @@ -448,6 +448,9 @@ ifloat: 1 Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": float: 1 ifloat: 1 +Test "Real part of: cexp (-95 + 0.75 i) == 4.039714446238306526889476684000081624047e-42 + 3.763383677300535390271646960780570275931e-42 i": +ildouble: 1 +ldouble: 1 Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": float: 2 ifloat: 2 @@ -456,9 +459,21 @@ float: 1 ifloat: 1 ildouble: 1 ldouble: 1 +Test "Imaginary part of: cexp (11356.5625 + 0.75 i) == 9.052188470850960144814815984311663764287e4931 + 8.432986734191301036267148978260970230200e4931 i": +ildouble: 1 +ldouble: 1 Test "Imaginary part of: cexp (50 + 0x1p127 i) == 4.053997150228616856622417636046265337193e21 + 3.232070315463388524466674772633810238819e21 i": ildouble: 1 ldouble: 1 +Test "Real part of: cexp (709.8125 + 0.75 i) == 1.355121963080879535248452862759108365762e308 + 1.262426823598609432507811340856186873507e308 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cexp (88.75 + 0.75 i) == 2.558360358486542817001900410314204322891e38 + 2.383359453227311447654736314679677655100e38 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cexp (88.75 + 0.75 i) == 2.558360358486542817001900410314204322891e38 + 2.383359453227311447654736314679677655100e38 i": +ildouble: 1 +ldouble: 1 # clog Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i": @@ -1134,8 +1149,8 @@ ifloat: 5 ildouble: 2 ldouble: 2 Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6": -float: 2 -ifloat: 2 +float: 3 +ifloat: 3 ildouble: 1 ldouble: 1 Test "jn (2, 0x1.ffff62p+99) == -4.43860668048170034334926693188979974489e-16": From 9ec5b2613fb7a8286ac481aaccbb077478f99f49 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 27 Mar 2012 21:04:59 +0000 Subject: [PATCH 4277/4487] Merge sysdeps/arm/elf/ into sysdeps/arm/. --- ChangeLog.arm | 11 +++ sysdeps/arm/configure | 136 +++++++++++++++++++++++++++++++--- sysdeps/arm/configure.in | 31 ++++++++ sysdeps/arm/elf/configure | 122 ------------------------------ sysdeps/arm/elf/configure.in | 33 --------- sysdeps/arm/{elf => }/start.S | 0 sysdeps/unix/arm/start.c | 85 --------------------- 7 files changed, 169 insertions(+), 249 deletions(-) delete mode 100644 sysdeps/arm/elf/configure delete mode 100644 sysdeps/arm/elf/configure.in rename sysdeps/arm/{elf => }/start.S (100%) delete mode 100644 sysdeps/unix/arm/start.c diff --git a/ChangeLog.arm b/ChangeLog.arm index f1376cdabb..4d8a78ba47 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,14 @@ +2012-03-27 Joseph Myers + + * sysdeps/arm/elf/start.S: Moved to ... + * sysdeps/arm/start.S: ...here. + * sysdeps/arm/elf/configure.in: Merge into ... + * sysdeps/arm/configure.in: ...here. + * sysdeps/arm/configure: Regenerated. + * sysdeps/arm/elf/configure.in: Remove file. + * sysdeps/arm/elf/configure: Likewise. + * sysdeps/unix/arm/start.c: Likewise. + 2012-03-20 Joseph Myers * sysdeps/unix/sysv/linux/arm/register-dump.h: Include <_itoa.h> diff --git a/sysdeps/arm/configure b/sysdeps/arm/configure index 066a8b69c5..651d46a344 100644 --- a/sysdeps/arm/configure +++ b/sysdeps/arm/configure @@ -1,9 +1,129 @@ + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + # This file is generated from configure.in by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/arm. -{ $as_echo "$as_me:$LINENO: checking whether the CFI directive .cfi_sections is supported" >&5 +# Check for support of thread-local storage handling in assembler and +# linker. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ARM TLS support" >&5 +$as_echo_n "checking for ARM TLS support... " >&6; } +if ${libc_cv_arm_tls+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.s <<\EOF + .section ".tdata", "awT", %progbits + .globl foo +foo: .long 1 + .section ".tbss", "awT", %nobits + .globl bar +bar: .skip 4 + .text +.word foo(tpoff) +.word foo(tlsgd) +EOF +if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + libc_cv_arm_tls=yes +else + libc_cv_arm_tls=no +fi +rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_arm_tls" >&5 +$as_echo "$libc_cv_arm_tls" >&6; } +if test $libc_cv_arm_tls = no; then + as_fn_error $? "the assembler must support TLS" "$LINENO" 5 +fi + +#AC_DEFINE(PI_STATIC_AND_HIDDEN) + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the CFI directive .cfi_sections is supported" >&5 $as_echo_n "checking whether the CFI directive .cfi_sections is supported... " >&6; } -if test "${libc_cv_asm_cfi_directive_sections+set}" = set; then +if ${libc_cv_asm_cfi_directive_sections+:} false; then : $as_echo_n "(cached) " >&6 else cat > conftest.s <&5 + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then libc_cv_asm_cfi_directive_sections=yes else libc_cv_asm_cfi_directive_sections=no fi rm -f conftest* fi -{ $as_echo "$as_me:$LINENO: result: $libc_cv_asm_cfi_directive_sections" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_asm_cfi_directive_sections" >&5 $as_echo "$libc_cv_asm_cfi_directive_sections" >&6; } if test $libc_cv_asm_cfi_directive_sections != yes; then - { { $as_echo "$as_me:$LINENO: error: need .cfi_sections in this configuration" >&5 -$as_echo "$as_me: error: need .cfi_sections in this configuration" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "need .cfi_sections in this configuration" "$LINENO" 5 fi diff --git a/sysdeps/arm/configure.in b/sysdeps/arm/configure.in index 9f4ff3b738..706add2d64 100644 --- a/sysdeps/arm/configure.in +++ b/sysdeps/arm/configure.in @@ -1,6 +1,37 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. # Local configure fragment for sysdeps/arm. +# Check for support of thread-local storage handling in assembler and +# linker. +AC_CACHE_CHECK(for ARM TLS support, libc_cv_arm_tls, [dnl +cat > conftest.s <<\EOF + .section ".tdata", "awT", %progbits + .globl foo +foo: .long 1 + .section ".tbss", "awT", %nobits + .globl bar +bar: .skip 4 + .text +.word foo(tpoff) +.word foo(tlsgd) +EOF +dnl +if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then + libc_cv_arm_tls=yes +else + libc_cv_arm_tls=no +fi +rm -f conftest*]) +if test $libc_cv_arm_tls = no; then + AC_MSG_ERROR([the assembler must support TLS]) +fi + +dnl It is always possible to access static and hidden symbols in an +dnl position independent way. +dnl NOTE: This feature was added by the GCC TLS patches. We should test for +dnl it. Until we do, don't define it. +#AC_DEFINE(PI_STATIC_AND_HIDDEN) + AC_CACHE_CHECK([whether the CFI directive .cfi_sections is supported], [libc_cv_asm_cfi_directive_sections], [cat > conftest.s </dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -# This file is generated from configure.in by Autoconf. DO NOT EDIT! - # Local configure fragment for sysdeps/arm/elf. - -# Check for support of thread-local storage handling in assembler and -# linker. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ARM TLS support" >&5 -$as_echo_n "checking for ARM TLS support... " >&6; } -if ${libc_cv_arm_tls+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.s <<\EOF - .section ".tdata", "awT", %progbits - .globl foo -foo: .long 1 - .section ".tbss", "awT", %nobits - .globl bar -bar: .skip 4 - .text -.word foo(tpoff) -.word foo(tlsgd) -EOF -if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - libc_cv_arm_tls=yes -else - libc_cv_arm_tls=no -fi -rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_arm_tls" >&5 -$as_echo "$libc_cv_arm_tls" >&6; } -if test $libc_cv_arm_tls = no; then - as_fn_error $? "the assembler must support TLS" "$LINENO" 5 -fi - -#AC_DEFINE(PI_STATIC_AND_HIDDEN) diff --git a/sysdeps/arm/elf/configure.in b/sysdeps/arm/elf/configure.in deleted file mode 100644 index 123a32186f..0000000000 --- a/sysdeps/arm/elf/configure.in +++ /dev/null @@ -1,33 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/arm/elf. - -# Check for support of thread-local storage handling in assembler and -# linker. -AC_CACHE_CHECK(for ARM TLS support, libc_cv_arm_tls, [dnl -cat > conftest.s <<\EOF - .section ".tdata", "awT", %progbits - .globl foo -foo: .long 1 - .section ".tbss", "awT", %nobits - .globl bar -bar: .skip 4 - .text -.word foo(tpoff) -.word foo(tlsgd) -EOF -dnl -if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then - libc_cv_arm_tls=yes -else - libc_cv_arm_tls=no -fi -rm -f conftest*]) -if test $libc_cv_arm_tls = no; then - AC_MSG_ERROR([the assembler must support TLS]) -fi - -dnl It is always possible to access static and hidden symbols in an -dnl position independent way. -dnl NOTE: This feature was added by the GCC TLS patches. We should test for -dnl it. Until we do, don't define it. -#AC_DEFINE(PI_STATIC_AND_HIDDEN) diff --git a/sysdeps/arm/elf/start.S b/sysdeps/arm/start.S similarity index 100% rename from sysdeps/arm/elf/start.S rename to sysdeps/arm/start.S diff --git a/sysdeps/unix/arm/start.c b/sysdeps/unix/arm/start.c deleted file mode 100644 index e9a032b9da..0000000000 --- a/sysdeps/unix/arm/start.c +++ /dev/null @@ -1,85 +0,0 @@ -/* Special startup code for ARM a.out binaries. - Copyright (C) 1998, 2004, 2012 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. - - In addition to the permissions in the GNU Lesser General Public - License, the Free Software Foundation gives you unlimited - permission to link the compiled version of this file with other - programs, and to distribute those programs without any restriction - coming from the use of this file. (The GNU Lesser General Public - License restrictions do apply in other respects; for example, they - cover modification of the file, and distribution when not linked - into another program.) - - Note that people who make modified versions of this file are not - obligated to grant this special exception for their modified - versions; it is their choice whether to do so. The GNU Lesser - General Public License gives permission to release a modified - version without this exception; this exception also makes it - possible to release a modified version which carries forward this - exception. - - 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, see - . */ - -#include -#include -#include -#include - -/* The first piece of initialized data. */ -int __data_start = 0; -weak_alias (__data_start, data_start) - -extern void __libc_init (int argc, char **argv, char **envp); -extern int main (int argc, char **argv, char **envp); - -/* N.B.: It is important that this be the first function. - This file is the first thing in the text section. */ - -/* If this was in C it might create its own stack frame and - screw up the arguments. */ -asm (".text; .globl _start; _start: B start1"); - -/* Fool gcc into thinking that more args are passed. This makes it look - on the stack (correctly) for the real arguments. It causes somewhat - strange register usage in start1(), but we aren't too bothered about - that at the moment. */ -#define DUMMIES a1, a2, a3, a4 - -#ifdef DUMMIES -#define ARG_DUMMIES DUMMIES, -#define DECL_DUMMIES int DUMMIES; -#else -#define ARG_DUMMIES -#define DECL_DUMMIES -#endif - -/* ARGSUSED */ -static void -start1 (ARG_DUMMIES argc, argv, envp) - DECL_DUMMIES - int argc; - char **argv; - char **envp; -{ - /* Store a pointer to the environment. */ - __environ = envp; - - /* Do C library initializations. */ - __libc_init (argc, argv, __environ); - - /* Call the user program. */ - exit (main (argc, argv, __environ)); -} From 04e3cfbc1559048ea33321948b34c53004b48d99 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 27 Mar 2012 21:10:20 +0000 Subject: [PATCH 4278/4487] Merge sysdeps/mips/elf/ into sysdeps/mips/. --- ChangeLog.mips | 8 ++++++++ sysdeps/mips/{elf => }/configure | 2 +- sysdeps/mips/{elf => }/configure.in | 2 +- sysdeps/mips/{elf => }/start.S | 0 4 files changed, 10 insertions(+), 2 deletions(-) rename sysdeps/mips/{elf => }/configure (98%) rename sysdeps/mips/{elf => }/configure.in (94%) rename sysdeps/mips/{elf => }/start.S (100%) diff --git a/ChangeLog.mips b/ChangeLog.mips index 44667cdeab..e8385470ca 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,11 @@ +2012-03-27 Joseph Myers + + * sysdeps/mips/elf/start.S: Moved to ... + * sysdeps/mips/start.S: ...here. + * sysdeps/mips/elf/configure.in: Moved to ... + * sysdeps/mips/configure.in: ...here. Update comment. + * sysdeps/mips/configure: New generated file. + 2012-03-20 Joseph Myers * sysdeps/unix/sysv/linux/mips/register-dump.h: Include <_itoa.h> diff --git a/sysdeps/mips/elf/configure b/sysdeps/mips/configure similarity index 98% rename from sysdeps/mips/elf/configure rename to sysdeps/mips/configure index 3cf02e0f12..e80f0a01af 100644 --- a/sysdeps/mips/elf/configure +++ b/sysdeps/mips/configure @@ -81,7 +81,7 @@ $as_echo X/"$0" | } # This file is generated from configure.in by Autoconf. DO NOT EDIT! - # Local configure fragment for sysdeps/mips/elf. + # Local configure fragment for sysdeps/mips. # Check for support of thread-local storage handling in assembler and # linker. diff --git a/sysdeps/mips/elf/configure.in b/sysdeps/mips/configure.in similarity index 94% rename from sysdeps/mips/elf/configure.in rename to sysdeps/mips/configure.in index 5cb5a742ec..ed92d29380 100644 --- a/sysdeps/mips/elf/configure.in +++ b/sysdeps/mips/configure.in @@ -1,5 +1,5 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/mips/elf. +# Local configure fragment for sysdeps/mips. # Check for support of thread-local storage handling in assembler and # linker. diff --git a/sysdeps/mips/elf/start.S b/sysdeps/mips/start.S similarity index 100% rename from sysdeps/mips/elf/start.S rename to sysdeps/mips/start.S From c0c5945b52394859e3f9fa26e3f446073f30e048 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 27 Mar 2012 14:29:13 -0700 Subject: [PATCH 4279/4487] Merge sysdeps/alpha/elf/ into sysdeps/alpha/. --- ChangeLog.alpha | 12 ++++++++++++ sysdeps/alpha/{elf => }/configure | 2 +- sysdeps/alpha/{elf => }/configure.in | 2 +- sysdeps/alpha/{elf => }/crti.S | 0 sysdeps/alpha/{elf => }/crtn.S | 0 sysdeps/alpha/{elf => }/start.S | 0 6 files changed, 14 insertions(+), 2 deletions(-) rename sysdeps/alpha/{elf => }/configure (98%) rename sysdeps/alpha/{elf => }/configure.in (97%) rename sysdeps/alpha/{elf => }/crti.S (100%) rename sysdeps/alpha/{elf => }/crtn.S (100%) rename sysdeps/alpha/{elf => }/start.S (100%) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 500e2273c8..c25d3f1f61 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,15 @@ +2012-03-27 Richard Henderson + + * sysdeps/alpha/elf/configure.in: Move to ... + * sysdeps/alpha/configure.in: ... here. Update comment. + * sysdeps/alpha/configure: Regenerate. + * sysdeps/alpha/elf/crti.S: Move to ... + * sysdeps/alpha/crti.S: ... here. + * sysdeps/alpha/elf/crtn.S: Move to ... + * sysdeps/alpha/crtn.S: ... here. + * sysdeps/alpha/elf/start.S: Move to ... + * sysdeps/alpha/start.S: ... here. + 2012-03-21 Richard Henderson * sysdeps/alpha/hp-timing.h: Include <_itoa.h> instead diff --git a/sysdeps/alpha/elf/configure b/sysdeps/alpha/configure similarity index 98% rename from sysdeps/alpha/elf/configure rename to sysdeps/alpha/configure index 5da9875910..1d0daf5a81 100644 --- a/sysdeps/alpha/elf/configure +++ b/sysdeps/alpha/configure @@ -81,7 +81,7 @@ $as_echo X/"$0" | } # This file is generated from configure.in by Autoconf. DO NOT EDIT! - # Local configure fragment for sysdeps/alpha/elf. + # Local configure fragment for sysdeps/alpha. # Check for support of thread-local storage handling in assembler and linker. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Alpha TLS support" >&5 diff --git a/sysdeps/alpha/elf/configure.in b/sysdeps/alpha/configure.in similarity index 97% rename from sysdeps/alpha/elf/configure.in rename to sysdeps/alpha/configure.in index 75fff5374c..bf8e926657 100644 --- a/sysdeps/alpha/elf/configure.in +++ b/sysdeps/alpha/configure.in @@ -1,5 +1,5 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/alpha/elf. +# Local configure fragment for sysdeps/alpha. # Check for support of thread-local storage handling in assembler and linker. AC_CACHE_CHECK(for Alpha TLS support, libc_cv_alpha_tls, [dnl diff --git a/sysdeps/alpha/elf/crti.S b/sysdeps/alpha/crti.S similarity index 100% rename from sysdeps/alpha/elf/crti.S rename to sysdeps/alpha/crti.S diff --git a/sysdeps/alpha/elf/crtn.S b/sysdeps/alpha/crtn.S similarity index 100% rename from sysdeps/alpha/elf/crtn.S rename to sysdeps/alpha/crtn.S diff --git a/sysdeps/alpha/elf/start.S b/sysdeps/alpha/start.S similarity index 100% rename from sysdeps/alpha/elf/start.S rename to sysdeps/alpha/start.S From e9d9997a8f4272f87c3570a46b78900f84121151 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 27 Mar 2012 23:47:41 +0200 Subject: [PATCH 4280/4487] m68k: drop elf directory --- ChangeLog.m68k | 5 +++++ sysdeps/m68k/{elf => }/start.S | 0 2 files changed, 5 insertions(+) rename sysdeps/m68k/{elf => }/start.S (100%) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index ea4155f183..8108e001c6 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2012-03-27 Andreas Schwab + + * sysdeps/m68k/elf/start.S: Move to ... + * sysdeps/m68k/start.S: ... here. + 2012-03-23 Andreas Schwab * sysdeps/m68k/m680x0/fpu/libm-test-ulps: Update. diff --git a/sysdeps/m68k/elf/start.S b/sysdeps/m68k/start.S similarity index 100% rename from sysdeps/m68k/elf/start.S rename to sysdeps/m68k/start.S From 268413928e58b44217a931e621ffcd8aa2fbed5a Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 28 Mar 2012 12:36:51 +0000 Subject: [PATCH 4281/4487] ARM: Define MAP_STACK and MAP_HUGETLB. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/bits/mman.h | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 4d8a78ba47..491cc920e9 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2012-03-28 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/bits/mman.h (MAP_STACK): Define. + (MAP_HUGETLB): Likewise. + 2012-03-27 Joseph Myers * sysdeps/arm/elf/start.S: Moved to ... diff --git a/sysdeps/unix/sysv/linux/arm/bits/mman.h b/sysdeps/unix/sysv/linux/arm/bits/mman.h index 0b24db1034..46c7249f75 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/mman.h +++ b/sysdeps/unix/sysv/linux/arm/bits/mman.h @@ -1,6 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/ARM version. - Copyright (C) 1997, 2000, 2003, 2005, 2006, 2009, 2011 - Free Software Foundation, Inc. + Copyright (C) 1997-2012 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 @@ -63,6 +62,8 @@ # define MAP_NORESERVE 0x04000 /* Don't check for reservations. */ # define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */ # define MAP_NONBLOCK 0x10000 /* Do not block on IO. */ +# define MAP_STACK 0x20000 /* Allocation is for a stack. */ +# define MAP_HUGETLB 0x40000 /* Create huge page mapping. */ #endif /* Flags to `msync'. */ From aa06d8e46a94b2bc1e59257d34b32382d3a16a0c Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 28 Mar 2012 12:37:21 +0000 Subject: [PATCH 4282/4487] MIPS: Define MAP_STACK and MAP_HUGETLB. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/bits/mman.h | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index e8385470ca..01f51c0c40 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2012-03-28 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/mman.h (MAP_STACK): Define. + (MAP_HUGETLB): Likewise. + 2012-03-27 Joseph Myers * sysdeps/mips/elf/start.S: Moved to ... diff --git a/sysdeps/unix/sysv/linux/mips/bits/mman.h b/sysdeps/unix/sysv/linux/mips/bits/mman.h index d23a766b37..e9c919b8cd 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/mman.h +++ b/sysdeps/unix/sysv/linux/mips/bits/mman.h @@ -1,6 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/MIPS version. - Copyright (C) 1997, 2000, 2003, 2004, 2005, 2006, 2009, 2011 - Free Software Foundation, Inc. + Copyright (C) 1997-2012 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 @@ -65,6 +64,8 @@ # define MAP_LOCKED 0x8000 /* pages are locked */ # define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */ # define MAP_NONBLOCK 0x20000 /* do not block on IO */ +# define MAP_STACK 0x40000 /* Allocation is for a stack. */ +# define MAP_HUGETLB 0x80000 /* Create huge page mapping. */ #endif /* Flags to `msync'. */ From 29dc68465c916dbaf1ee066a6460b67bd47dcb02 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 28 Mar 2012 18:39:51 +0200 Subject: [PATCH 4283/4487] m68k: define MAP_STACK and MAP_HUGETLB --- ChangeLog.m68k | 5 +++++ sysdeps/unix/sysv/linux/m68k/bits/mman.h | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 8108e001c6..d631b40e4d 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2012-03-28 Andreas Schwab + + * sysdeps/unix/sysv/linux/m68k/bits/mman.h (MAP_STACK) + (MAP_HUGETLB): Define. + 2012-03-27 Andreas Schwab * sysdeps/m68k/elf/start.S: Move to ... diff --git a/sysdeps/unix/sysv/linux/m68k/bits/mman.h b/sysdeps/unix/sysv/linux/m68k/bits/mman.h index 864f9ea6fe..f361932229 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/mman.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/mman.h @@ -1,6 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/m68k version. - Copyright (C) 1997, 2000, 2003, 2005, 2008, 2009, 2011 - Free Software Foundation, Inc. + Copyright (C) 1997-2012 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 @@ -63,6 +62,8 @@ # define MAP_NORESERVE 0x04000 /* Don't check for reservations. */ # define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */ # define MAP_NONBLOCK 0x10000 /* Do not block on IO. */ +# define MAP_STACK 0x20000 /* Allocation is for a stack. */ +# define MAP_HUGETLB 0x40000 /* Create huge page mapping. */ #endif /* Flags to `msync'. */ From cde9262435dfba6140c6e90ba9ee412044f5dbf6 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 14 Apr 2012 21:10:30 -0400 Subject: [PATCH 4284/4487] tile: update _itoa.h include path Common code moved _itoa.h necessitating a change in the #include path. Signed-off-by: Chris Metcalf Signed-off-by: Mike Frysinger --- ChangeLog.tile | 6 ++++++ sysdeps/unix/sysv/linux/tile/tilegx/register-dump.h | 2 +- sysdeps/unix/sysv/linux/tile/tilepro/register-dump.h | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog.tile b/ChangeLog.tile index b48d61401c..77e03b58fe 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,3 +1,9 @@ +2012-04-15 Mike Frysinger + + * sysdeps/unix/sysv/linux/tile/tilegx/register-dump.h: Include + <_itoa.h> instead of . + * sysdeps/unix/sysv/linux/tile/tilepro/register-dump.h: Likewise. + 2012-03-09 Richard Henderson * sysdeps/tile/math_private.h: Use include_next to diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/register-dump.h b/sysdeps/unix/sysv/linux/tile/tilegx/register-dump.h index 9021763566..d5d06f719b 100644 --- a/sysdeps/unix/sysv/linux/tile/tilegx/register-dump.h +++ b/sysdeps/unix/sysv/linux/tile/tilegx/register-dump.h @@ -17,7 +17,7 @@ . */ #include -#include +#include <_itoa.h> /* We will print the register dump in this format: diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/register-dump.h b/sysdeps/unix/sysv/linux/tile/tilepro/register-dump.h index 3338695bcb..9907bbf241 100644 --- a/sysdeps/unix/sysv/linux/tile/tilepro/register-dump.h +++ b/sysdeps/unix/sysv/linux/tile/tilepro/register-dump.h @@ -18,7 +18,7 @@ . */ #include -#include +#include <_itoa.h> /* We will print the register dump in this format: From c053fa34cdde3ca0faa026a31a586f16d3257a8f Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Tue, 17 Apr 2012 05:29:00 +0200 Subject: [PATCH 4285/4487] hppa: Remove elf/ and create crti.S/crtn.S This patch removes the elf/ directory, moving any special configury down a directory e.g. TLS checks. This patch also implements the required crti.S and crtn.S files, verifying that they match the current implementation. --- ChangeLog.hppa | 14 ++++ sysdeps/hppa/configure | 58 +++++++++++++- sysdeps/hppa/configure.in | 45 +++++++++++ sysdeps/hppa/crti.S | 80 +++++++++++++++++++ sysdeps/hppa/crtn.S | 88 +++++++++++++++++++++ sysdeps/hppa/elf/configure | 140 --------------------------------- sysdeps/hppa/elf/configure.in | 47 ----------- sysdeps/hppa/elf/initfini.c | 138 -------------------------------- sysdeps/hppa/{elf => }/entry.h | 0 sysdeps/hppa/{elf => }/start.S | 0 10 files changed, 284 insertions(+), 326 deletions(-) create mode 100644 sysdeps/hppa/crti.S create mode 100644 sysdeps/hppa/crtn.S delete mode 100755 sysdeps/hppa/elf/configure delete mode 100644 sysdeps/hppa/elf/configure.in delete mode 100644 sysdeps/hppa/elf/initfini.c rename sysdeps/hppa/{elf => }/entry.h (100%) rename sysdeps/hppa/{elf => }/start.S (100%) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 700c78fe05..4ad719fd8d 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,17 @@ +2012-04-17 Carlos O'Donell + + * sysdeps/hppa/elf/configure: Removed file. + * sysdeps/hppa/elf/configure.in: Move to... + * sysdeps/hppa/configure.in: ... here. + * sysdeps/hppa/configure: Regenerate. + * sysdeps/hppa/elf/initfini.c: Removed file. + * sysdeps/hppa/crti.S: New file. + * sysdeps/hppa/crtn.S: New file. + * sysdeps/hppa/elf/entry.h: Moved to ... + * sysdeps/hppa/entry.h: ... here. + * sysdeps/hppa/elf/start.S: Move to ... + * sysdeps/hppa/start.S: ... here. + 2012-03-22 Carlos O'Donell [BZ #6730] diff --git a/sysdeps/hppa/configure b/sysdeps/hppa/configure index aafc420097..c47fb6d0a3 100644 --- a/sysdeps/hppa/configure +++ b/sysdeps/hppa/configure @@ -84,7 +84,7 @@ $as_echo X/"$0" | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler line separator" >&5 $as_echo_n "checking for assembler line separator... " >&6; } -if test "${libc_cv_asm_line_sep+set}" = set; then : +if ${libc_cv_asm_line_sep+:} false; then : $as_echo_n "(cached) " >&6 else cat > conftest.s <>confdefs.h <<_ACEOF #define ASM_LINE_SEP $libc_cv_asm_line_sep _ACEOF + +# Check for support of thread-local storage handling in assembler and +# linker. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hppa TLS support" >&5 +$as_echo_n "checking for hppa TLS support... " >&6; } +if ${libc_cv_hppa_tls+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.s <<\EOF +; Setup tls data +.section ".tdata","awT",@progbits +foo: .data 32 + .text +; Test general dyanmic relocations +test0: + addil LT'foo-$tls_gdidx$, %r19 + ldo RT'foo-$tls_gdidx$(%r1), %r26 + b __tls_get_addr + nop +; Test local dynamic relocations +test1: + addil LT'foo-$tls_ldidx$, %r19 + b __tls_get_addr + ldo RT'foo-$tls_ldidx$(%r1), %r26 + ldo RR'foo-$tls_dtpoff$(%r1), %r25 + ; More variables can be loaded... +; Test initial exec reloctiosn +test2: + mfctl %cr27, %r26 + addil LT'foo-$tls_ieoff$, %r19 + ldw RT'foo-$tls_ieoff$(%r1), %r25 + add %r26, %r25, %r24 +; Test local exec relocations +test3: + mfctl %cr27, %r26 + addil LR'foo-$tls_leoff$, %r26 + ldo RR'foo-$tls_leoff$(%r1), %r25 +; Done all the TLS tests. +EOF +if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + libc_cv_hppa_tls=yes +else + libc_cv_hppa_tls=no +fi +rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_hppa_tls" >&5 +$as_echo "$libc_cv_hppa_tls" >&6; } +if test $libc_cv_hppa_tls = no; then + as_fn_error $? "the assembler must support TLS" "$LINENO" 5 +fi diff --git a/sysdeps/hppa/configure.in b/sysdeps/hppa/configure.in index 1ec417b947..57cb941bef 100644 --- a/sysdeps/hppa/configure.in +++ b/sysdeps/hppa/configure.in @@ -19,3 +19,48 @@ else fi rm -f conftest*]) AC_DEFINE_UNQUOTED(ASM_LINE_SEP, $libc_cv_asm_line_sep) + +# Check for support of thread-local storage handling in assembler and +# linker. +AC_CACHE_CHECK(for hppa TLS support, libc_cv_hppa_tls, [dnl +cat > conftest.s <<\EOF +; Setup tls data +.section ".tdata","awT",@progbits +foo: .data 32 + .text +; Test general dyanmic relocations +test0: + addil LT'foo-$tls_gdidx$, %r19 + ldo RT'foo-$tls_gdidx$(%r1), %r26 + b __tls_get_addr + nop +; Test local dynamic relocations +test1: + addil LT'foo-$tls_ldidx$, %r19 + b __tls_get_addr + ldo RT'foo-$tls_ldidx$(%r1), %r26 + ldo RR'foo-$tls_dtpoff$(%r1), %r25 + ; More variables can be loaded... +; Test initial exec reloctiosn +test2: + mfctl %cr27, %r26 + addil LT'foo-$tls_ieoff$, %r19 + ldw RT'foo-$tls_ieoff$(%r1), %r25 + add %r26, %r25, %r24 +; Test local exec relocations +test3: + mfctl %cr27, %r26 + addil LR'foo-$tls_leoff$, %r26 + ldo RR'foo-$tls_leoff$(%r1), %r25 +; Done all the TLS tests. +EOF +dnl +if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then + libc_cv_hppa_tls=yes +else + libc_cv_hppa_tls=no +fi +rm -f conftest*]) +if test $libc_cv_hppa_tls = no; then + AC_MSG_ERROR([the assembler must support TLS]) +fi diff --git a/sysdeps/hppa/crti.S b/sysdeps/hppa/crti.S new file mode 100644 index 0000000000..4bb81bcacd --- /dev/null +++ b/sysdeps/hppa/crti.S @@ -0,0 +1,80 @@ +/* Special .init and .fini section support for HPPA + Copyright (C) 2000-2012 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. + + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + + 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, see + . */ + +/* crti.S puts a function prologue at the beginning of the .init and + .fini sections and defines global symbols for those addresses, so + they can be called as functions. The symbols _init and _fini are + magic and cause the linker to emit DT_INIT and DT_FINI. */ + +#include +#include + +#ifndef PREINIT_FUNCTION +# define PREINIT_FUNCTION __gmon_start__ +#endif + +#ifndef PREINIT_FUNCTION_WEAK +# define PREINIT_FUNCTION_WEAK 1 +#endif + +/* _init prologue. */ + .section .init, "ax", %progbits + .align 4 + .globl _init + .type _init,@function +_init: + stw %rp,-20(%sp) + stwm %r4,64(%sp) + stw %r19,-32(%sp) +#if PREINIT_FUNCTION_WEAK + bl PREINIT_FUNCTION,%rp + copy %r19,%r4 /* delay slot */ +#else + bl PREINIT_FUNCTION,%rp + copy %r19,%r4 /* delay slot */ +#endif + copy %r4,%r19 + +/* _fini prologue. */ + .section .fini,"ax",%progbits + .align 4 + .globl _fini + .type _fini,@function +_fini: + stw %rp,-20(%sp) + stwm %r4,64(%sp) + stw %r19,-32(%sp) + copy %r19,%r4 + diff --git a/sysdeps/hppa/crtn.S b/sysdeps/hppa/crtn.S new file mode 100644 index 0000000000..679d739aa7 --- /dev/null +++ b/sysdeps/hppa/crtn.S @@ -0,0 +1,88 @@ +/* Special .init and .fini section support for HPPA + Copyright (C) 2000-2012 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. + + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + + 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, see + . */ + +#include + +/* crtn.S puts function epilogues in the .init and .fini sections + corresponding to the prologues in crti.S. */ + +/* Note that we cannot have a weak undefined __gmon_start__, because + that would require this to be PIC, and the linker is currently not + able to generate a proper procedure descriptor for _init. Sad but + true. Anyway, HPPA is one of those horrible architectures where + making the comparison and indirect call is quite expensive (see the + comment in sysdeps/generic/initfini.c). */ + .text + .align 4 + .weak __gmon_start__ + .type __gmon_start__,@function +__gmon_start__: + .proc + .callinfo + .entry + bv,n %r0(%r2) + .exit + .procend + +/* Here is the tail end of _init. We put __gmon_start before this so + that the assembler creates the .PARISC.unwind section for us, ie. + with the right attributes. */ + .section .init, "ax", @progbits + ldw -84(%sp),%rp + copy %r4,%r19 + bv %r0(%rp) +_end_init: + ldwm -64(%sp),%r4 + +/* Our very own unwind info, because the assembler can't handle + functions split into two or more pieces. */ + .section .PARISC.unwind + .extern _init + .word _init, _end_init + .byte 0x08, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08 + +/* Here is the tail end of _fini. */ + .section .fini, "ax", @progbits + ldw -84(%sp),%rp + copy %r4,%r19 + bv %r0(%rp) +_end_fini: + ldwm -64(%sp),%r4 + + .section .PARISC.unwind + .extern _fini + .word _fini, _end_fini + .byte 0x08, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08 + diff --git a/sysdeps/hppa/elf/configure b/sysdeps/hppa/elf/configure deleted file mode 100755 index 4df64a852b..0000000000 --- a/sysdeps/hppa/elf/configure +++ /dev/null @@ -1,140 +0,0 @@ - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -# This file is generated from configure.in by Autoconf. DO NOT EDIT! - # Local configure fragment for sysdeps/hppa/elf. - -# Check for support of thread-local storage handling in assembler and -# linker. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hppa TLS support" >&5 -$as_echo_n "checking for hppa TLS support... " >&6; } -if test "${libc_cv_hppa_tls+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.s <<\EOF -; Setup tls data -.section ".tdata","awT",@progbits -foo: .data 32 - .text -; Test general dyanmic relocations -test0: - addil LT'foo-$tls_gdidx$, %r19 - ldo RT'foo-$tls_gdidx$(%r1), %r26 - b __tls_get_addr - nop -; Test local dynamic relocations -test1: - addil LT'foo-$tls_ldidx$, %r19 - b __tls_get_addr - ldo RT'foo-$tls_ldidx$(%r1), %r26 - ldo RR'foo-$tls_dtpoff$(%r1), %r25 - ; More variables can be loaded... -; Test initial exec reloctiosn -test2: - mfctl %cr27, %r26 - addil LT'foo-$tls_ieoff$, %r19 - ldw RT'foo-$tls_ieoff$(%r1), %r25 - add %r26, %r25, %r24 -; Test local exec relocations -test3: - mfctl %cr27, %r26 - addil LR'foo-$tls_leoff$, %r26 - ldo RR'foo-$tls_leoff$(%r1), %r25 -; Done all the TLS tests. -EOF -if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - libc_cv_hppa_tls=yes -else - libc_cv_hppa_tls=no -fi -rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_hppa_tls" >&5 -$as_echo "$libc_cv_hppa_tls" >&6; } -if test $libc_cv_hppa_tls = no; then - as_fn_error $? "the assembler must support TLS" "$LINENO" 5 -fi diff --git a/sysdeps/hppa/elf/configure.in b/sysdeps/hppa/elf/configure.in deleted file mode 100644 index e31c880c1e..0000000000 --- a/sysdeps/hppa/elf/configure.in +++ /dev/null @@ -1,47 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/hppa/elf. - -# Check for support of thread-local storage handling in assembler and -# linker. -AC_CACHE_CHECK(for hppa TLS support, libc_cv_hppa_tls, [dnl -cat > conftest.s <<\EOF -; Setup tls data -.section ".tdata","awT",@progbits -foo: .data 32 - .text -; Test general dyanmic relocations -test0: - addil LT'foo-$tls_gdidx$, %r19 - ldo RT'foo-$tls_gdidx$(%r1), %r26 - b __tls_get_addr - nop -; Test local dynamic relocations -test1: - addil LT'foo-$tls_ldidx$, %r19 - b __tls_get_addr - ldo RT'foo-$tls_ldidx$(%r1), %r26 - ldo RR'foo-$tls_dtpoff$(%r1), %r25 - ; More variables can be loaded... -; Test initial exec reloctiosn -test2: - mfctl %cr27, %r26 - addil LT'foo-$tls_ieoff$, %r19 - ldw RT'foo-$tls_ieoff$(%r1), %r25 - add %r26, %r25, %r24 -; Test local exec relocations -test3: - mfctl %cr27, %r26 - addil LR'foo-$tls_leoff$, %r26 - ldo RR'foo-$tls_leoff$(%r1), %r25 -; Done all the TLS tests. -EOF -dnl -if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then - libc_cv_hppa_tls=yes -else - libc_cv_hppa_tls=no -fi -rm -f conftest*]) -if test $libc_cv_hppa_tls = no; then - AC_MSG_ERROR([the assembler must support TLS]) -fi diff --git a/sysdeps/hppa/elf/initfini.c b/sysdeps/hppa/elf/initfini.c deleted file mode 100644 index 90964f5041..0000000000 --- a/sysdeps/hppa/elf/initfini.c +++ /dev/null @@ -1,138 +0,0 @@ -/* Special .init and .fini section support for HPPA - Copyright (C) 2000, 2002 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. - - In addition to the permissions in the GNU Lesser General Public - License, the Free Software Foundation gives you unlimited - permission to link the compiled version of this file with other - programs, and to distribute those programs without any restriction - coming from the use of this file. (The GNU Lesser General Public - License restrictions do apply in other respects; for example, they - cover modification of the file, and distribution when not linked - into another program.) - - Note that people who make modified versions of this file are not - obligated to grant this special exception for their modified - versions; it is their choice whether to do so. The GNU Lesser - General Public License gives permission to release a modified - version without this exception; this exception also makes it - possible to release a modified version which carries forward this - exception. - - 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, see - . */ - -/* This file is compiled into assembly code which is then munged by a sed - script into two files: crti.s and crtn.s. - - * crti.s puts a function prologue at the beginning of the - .init and .fini sections and defines global symbols for - those addresses, so they can be called as functions. - - * crtn.s puts the corresponding function epilogues - in the .init and .fini sections. */ - -/* If we use the standard C version, the linkage table pointer won't - be properly preserved due to the splitting up of function prologues - and epilogues. Therefore we write these in assembly to make sure - they do the right thing. - - Note that we cannot have a weak undefined __gmon_start__, because - that would require this to be PIC, and the linker is currently not - able to generate a proper procedure descriptor for _init. Sad but - true. Anyway, HPPA is one of those horrible architectures where - making the comparison and indirect call is quite expensive (see the - comment in sysdeps/generic/initfini.c). */ - -__asm__ ("\ -\n\ -#include \"defs.h\"\n\ -\n\ -/*@HEADER_ENDS*/\n\ -\n\ -/*@_init_PROLOG_BEGINS*/\n\ - .section .init\n\ - .align 4\n\ - .globl _init\n\ - .type _init,@function\n\ -_init:\n\ - stw %rp,-20(%sp)\n\ - stwm %r4,64(%sp)\n\ - stw %r19,-32(%sp)\n\ - bl __gmon_start__,%rp\n\ - copy %r19,%r4 /* delay slot */\n\ - copy %r4,%r19\n\ -/*@_init_PROLOG_ENDS*/\n\ -\n\ -/*@_init_EPILOG_BEGINS*/\n\ - .text\n\ - .align 4\n\ - .weak __gmon_start__\n\ - .type __gmon_start__,@function\n\ -__gmon_start__:\n\ - .proc\n\ - .callinfo\n\ - .entry\n\ - bv,n %r0(%r2)\n\ - .exit\n\ - .procend\n\ -\n\ -/* Here is the tail end of _init. We put __gmon_start before this so\n\ - that the assembler creates the .PARISC.unwind section for us, ie.\n\ - with the right attributes. */\n\ - .section .init\n\ - ldw -84(%sp),%rp\n\ - copy %r4,%r19\n\ - bv %r0(%rp)\n\ -_end_init:\n\ - ldwm -64(%sp),%r4\n\ -\n\ -/* Our very own unwind info, because the assembler can't handle\n\ - functions split into two or more pieces. */\n\ - .section .PARISC.unwind\n\ - .extern _init\n\ - .word _init, _end_init\n\ - .byte 0x08, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08\n\ -\n\ -/*@_init_EPILOG_ENDS*/\n\ -\n\ -/*@_fini_PROLOG_BEGINS*/\n\ - .section .fini\n\ - .align 4\n\ - .globl _fini\n\ - .type _fini,@function\n\ -_fini:\n\ - stw %rp,-20(%sp)\n\ - stwm %r4,64(%sp)\n\ - stw %r19,-32(%sp)\n\ - copy %r19,%r4\n\ -/*@_fini_PROLOG_ENDS*/\n\ -\n\ -/*@_fini_EPILOG_BEGINS*/\n\ - .section .fini\n\ - ldw -84(%sp),%rp\n\ - copy %r4,%r19\n\ - bv %r0(%rp)\n\ -_end_fini:\n\ - ldwm -64(%sp),%r4\n\ -\n\ - .section .PARISC.unwind\n\ - .extern _fini\n\ - .word _fini, _end_fini\n\ - .byte 0x08, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08\n\ -\n\ -/*@_fini_EPILOG_ENDS*/\n\ -\n\ -/*@TRAILER_BEGINS*/\ -"); diff --git a/sysdeps/hppa/elf/entry.h b/sysdeps/hppa/entry.h similarity index 100% rename from sysdeps/hppa/elf/entry.h rename to sysdeps/hppa/entry.h diff --git a/sysdeps/hppa/elf/start.S b/sysdeps/hppa/start.S similarity index 100% rename from sysdeps/hppa/elf/start.S rename to sysdeps/hppa/start.S From dde6fc785a059a534613c17e8bdd35f53da097e1 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Tue, 17 Apr 2012 05:46:34 +0200 Subject: [PATCH 4286/4487] hppa: Remove relocation in OPD handling code. A current bug in the hppa binutils code causes relative relocations to be mixed with OPD relocations. The OPD handling code in ld.so requires a relocation to setup one of the data structures. At startup ld.so tries to use the structure to handle an OPD relocation *before* the structure is completely setup by the relative relocation and this causes a crash. This code is a workaround and a bandaid, the real fix is in the static linker, but until then we must avoid relocations in dl-fptr.c. We copy dl-fptr.c from generic code, modify it, and adjust the headers to fixup the structure at runtime instead of having the relocation do this for us automatically. --- ChangeLog.hppa | 7 + sysdeps/hppa/dl-fptr.c | 337 ++++++++++++++++++++++++++++++++++++++ sysdeps/hppa/dl-fptr.h | 5 +- sysdeps/hppa/dl-machine.h | 6 +- 4 files changed, 351 insertions(+), 4 deletions(-) create mode 100644 sysdeps/hppa/dl-fptr.c diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 4ad719fd8d..caae3ec8c5 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,10 @@ +2012-04-17 Carlos O'Donell + + * sysdeps/hppa/dl-fptr.h: Add prototype for _dl_fptr_init. + * sysdeps/hppa/dl-fptr.c: New file. + * sysdeps/hppa/dl-machine.h (ELF_MACHINE_BEFORE_RTLD_RELOC): + Call _dl_fptr_init. + 2012-04-17 Carlos O'Donell * sysdeps/hppa/elf/configure: Removed file. diff --git a/sysdeps/hppa/dl-fptr.c b/sysdeps/hppa/dl-fptr.c new file mode 100644 index 0000000000..82b25b5422 --- /dev/null +++ b/sysdeps/hppa/dl-fptr.c @@ -0,0 +1,337 @@ +/* Manage function descriptors. Generic version. + Copyright (C) 1999-2012 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. */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef ELF_MACHINE_BOOT_FPTR_TABLE_LEN +/* ELF_MACHINE_BOOT_FPTR_TABLE_LEN should be greater than the number of + dynamic symbols in ld.so. */ +# define ELF_MACHINE_BOOT_FPTR_TABLE_LEN 256 +#endif + +#ifndef ELF_MACHINE_LOAD_ADDRESS +# error "ELF_MACHINE_LOAD_ADDRESS is not defined." +#endif + +#ifndef COMPARE_AND_SWAP +# define COMPARE_AND_SWAP(ptr, old, new) \ + (catomic_compare_and_exchange_bool_acq (ptr, new, old) == 0) +#endif + +ElfW(Addr) _dl_boot_fptr_table [ELF_MACHINE_BOOT_FPTR_TABLE_LEN]; + +static struct local + { + struct fdesc_table *root; + struct fdesc *free_list; + unsigned int npages; /* # of pages to allocate */ + /* the next to members MUST be consecutive! */ + struct fdesc_table boot_table; + struct fdesc boot_fdescs[1024]; + } +local = + { +#ifdef SHARED + /* Address of .boot_table is not known until runtime. */ + .root = 0, +#else + .root = &local.boot_table, +#endif + .npages = 2, + .boot_table = + { + .len = sizeof (local.boot_fdescs) / sizeof (local.boot_fdescs[0]), + .first_unused = 0 + } + }; + +/* Create a new fdesc table and return a pointer to the first fdesc + entry. The fdesc lock must have been acquired already. */ + +static struct fdesc_table * +new_fdesc_table (struct local *l, size_t *size) +{ + size_t old_npages = l->npages; + size_t new_npages = old_npages + old_npages; + struct fdesc_table *new_table; + + /* If someone has just created a new table, we return NULL to tell + the caller to use the new table. */ + if (! COMPARE_AND_SWAP (&l->npages, old_npages, new_npages)) + return (struct fdesc_table *) NULL; + + *size = old_npages * GLRO(dl_pagesize); + new_table = __mmap (NULL, *size, + PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, -1, 0); + if (new_table == MAP_FAILED) + _dl_signal_error (errno, NULL, NULL, + N_("cannot map pages for fdesc table")); + + new_table->len + = (*size - sizeof (*new_table)) / sizeof (struct fdesc); + new_table->first_unused = 1; + return new_table; +} + +/* Must call _dl_fptr_init before using any other function. */ +void +_dl_fptr_init (void) +{ + struct local *l; + + ELF_MACHINE_LOAD_ADDRESS (l, local); + l->root = &l->boot_table; +} + +static ElfW(Addr) +make_fdesc (ElfW(Addr) ip, ElfW(Addr) gp) +{ + struct fdesc *fdesc = NULL; + struct fdesc_table *root; + unsigned int old; + struct local *l; + + ELF_MACHINE_LOAD_ADDRESS (l, local); + + retry: + root = l->root; + while (1) + { + old = root->first_unused; + if (old >= root->len) + break; + else if (COMPARE_AND_SWAP (&root->first_unused, old, old + 1)) + { + fdesc = &root->fdesc[old]; + goto install; + } + } + + if (l->free_list) + { + /* Get it from free-list. */ + do + { + fdesc = l->free_list; + if (fdesc == NULL) + goto retry; + } + while (! COMPARE_AND_SWAP ((ElfW(Addr) *) &l->free_list, + (ElfW(Addr)) fdesc, fdesc->ip)); + } + else + { + /* Create a new fdesc table. */ + size_t size; + struct fdesc_table *new_table = new_fdesc_table (l, &size); + + if (new_table == NULL) + goto retry; + + new_table->next = root; + if (! COMPARE_AND_SWAP ((ElfW(Addr) *) &l->root, + (ElfW(Addr)) root, + (ElfW(Addr)) new_table)) + { + /* Someone has just installed a new table. Return NULL to + tell the caller to use the new table. */ + __munmap (new_table, size); + goto retry; + } + + /* Note that the first entry was reserved while allocating the + memory for the new page. */ + fdesc = &new_table->fdesc[0]; + } + + install: + fdesc->ip = ip; + fdesc->gp = gp; + + return (ElfW(Addr)) fdesc; +} + + +static inline ElfW(Addr) * __attribute__ ((always_inline)) +make_fptr_table (struct link_map *map) +{ + const ElfW(Sym) *symtab + = (const void *) D_PTR (map, l_info[DT_SYMTAB]); + const char *strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]); + ElfW(Addr) *fptr_table; + size_t size; + size_t len; + + /* XXX Apparently the only way to find out the size of the dynamic + symbol section is to assume that the string table follows right + afterwards... */ + len = ((strtab - (char *) symtab) + / map->l_info[DT_SYMENT]->d_un.d_val); + size = ((len * sizeof (fptr_table[0]) + GLRO(dl_pagesize) - 1) + & -GLRO(dl_pagesize)); + /* XXX We don't support here in the moment systems without MAP_ANON. + There probably are none for IA-64. In case this is proven wrong + we will have to open /dev/null here and use the file descriptor + instead of the hard-coded -1. */ + fptr_table = __mmap (NULL, size, + PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, + -1, 0); + if (fptr_table == MAP_FAILED) + _dl_signal_error (errno, NULL, NULL, + N_("cannot map pages for fptr table")); + + if (COMPARE_AND_SWAP ((ElfW(Addr) *) &map->l_mach.fptr_table, + (ElfW(Addr)) NULL, (ElfW(Addr)) fptr_table)) + map->l_mach.fptr_table_len = len; + else + __munmap (fptr_table, len * sizeof (fptr_table[0])); + + return map->l_mach.fptr_table; +} + + +ElfW(Addr) +_dl_make_fptr (struct link_map *map, const ElfW(Sym) *sym, + ElfW(Addr) ip) +{ + ElfW(Addr) *ftab = map->l_mach.fptr_table; + const ElfW(Sym) *symtab; + Elf_Symndx symidx; + struct local *l; + + if (__builtin_expect (ftab == NULL, 0)) + ftab = make_fptr_table (map); + + symtab = (const void *) D_PTR (map, l_info[DT_SYMTAB]); + symidx = sym - symtab; + + if (symidx >= map->l_mach.fptr_table_len) + _dl_signal_error (0, NULL, NULL, + N_("internal error: symidx out of range of fptr table")); + + while (ftab[symidx] == 0) + { + /* GOT has already been relocated in elf_get_dynamic_info - + don't try to relocate it again. */ + ElfW(Addr) fdesc + = make_fdesc (ip, map->l_info[DT_PLTGOT]->d_un.d_ptr); + + if (__builtin_expect (COMPARE_AND_SWAP (&ftab[symidx], (ElfW(Addr)) NULL, + fdesc), 1)) + { + /* Noone has updated the entry and the new function + descriptor has been installed. */ +#if 0 + const char *strtab + = (const void *) D_PTR (map, l_info[DT_STRTAB]); + + ELF_MACHINE_LOAD_ADDRESS (l, local); + if (l->root != &l->boot_table + || l->boot_table.first_unused > 20) + _dl_debug_printf ("created fdesc symbol `%s' at %lx\n", + strtab + sym->st_name, ftab[symidx]); +#endif + break; + } + else + { + /* We created a duplicated function descriptor. We put it on + free-list. */ + struct fdesc *f = (struct fdesc *) fdesc; + + ELF_MACHINE_LOAD_ADDRESS (l, local); + + do + f->ip = (ElfW(Addr)) l->free_list; + while (! COMPARE_AND_SWAP ((ElfW(Addr) *) &l->free_list, + f->ip, fdesc)); + } + } + + return ftab[symidx]; +} + + +void +_dl_unmap (struct link_map *map) +{ + ElfW(Addr) *ftab = map->l_mach.fptr_table; + struct fdesc *head = NULL, *tail = NULL; + size_t i; + + __munmap ((void *) map->l_map_start, + map->l_map_end - map->l_map_start); + + if (ftab == NULL) + return; + + /* String together the fdesc structures that are being freed. */ + for (i = 0; i < map->l_mach.fptr_table_len; ++i) + { + if (ftab[i]) + { + *(struct fdesc **) ftab[i] = head; + head = (struct fdesc *) ftab[i]; + if (tail == NULL) + tail = head; + } + } + + /* Prepend the new list to the free_list: */ + if (tail) + do + tail->ip = (ElfW(Addr)) local.free_list; + while (! COMPARE_AND_SWAP ((ElfW(Addr) *) &local.free_list, + tail->ip, (ElfW(Addr)) head)); + + __munmap (ftab, (map->l_mach.fptr_table_len + * sizeof (map->l_mach.fptr_table[0]))); + + map->l_mach.fptr_table = NULL; +} + + +ElfW(Addr) +_dl_lookup_address (const void *address) +{ + ElfW(Addr) addr = (ElfW(Addr)) address; + struct fdesc_table *t; + unsigned long int i; + + for (t = local.root; t != NULL; t = t->next) + { + i = (struct fdesc *) addr - &t->fdesc[0]; + if (i < t->first_unused && addr == (ElfW(Addr)) &t->fdesc[i]) + { + addr = t->fdesc[i].ip; + break; + } + } + + return addr; +} diff --git a/sysdeps/hppa/dl-fptr.h b/sysdeps/hppa/dl-fptr.h index 9f998651a5..ae504de08d 100644 --- a/sysdeps/hppa/dl-fptr.h +++ b/sysdeps/hppa/dl-fptr.h @@ -1,5 +1,5 @@ /* Function descriptors. HPPA version. - Copyright (C) 2003, 2009 Free Software Foundation, Inc. + Copyright (C) 2003-2012 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 @@ -21,6 +21,9 @@ #include +/* Initialize function pointer code. Call before relocation processing. */ +extern void _dl_fptr_init (void); + /* There are currently 33 dynamic symbols in ld.so. ELF_MACHINE_BOOT_FPTR_TABLE_LEN needs to be at least that big. */ #define ELF_MACHINE_BOOT_FPTR_TABLE_LEN 64 diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h index b63e36ee68..1bee330f8b 100644 --- a/sysdeps/hppa/dl-machine.h +++ b/sysdeps/hppa/dl-machine.h @@ -1,6 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. PA-RISC version. - Copyright (C) 1995-1997,1999-2003,2011 - Free Software Foundation, Inc. + Copyright (C) 1995-2012 Free Software Foundation, Inc. Contributed by David Huggins-Daines This file is part of the GNU C Library. @@ -63,7 +62,8 @@ __hppa_init_bootstrap_fdesc_table (struct link_map *map) } #define ELF_MACHINE_BEFORE_RTLD_RELOC(dynamic_info) \ - __hppa_init_bootstrap_fdesc_table (&bootstrap_map); + __hppa_init_bootstrap_fdesc_table (&bootstrap_map); \ + _dl_fptr_init(); /* Return nonzero iff ELF header is compatible with the running host. */ static inline int From cfdc17edd4cda0cde897ead7d3eb7a57e65653a0 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Tue, 17 Apr 2012 06:01:19 +0200 Subject: [PATCH 4287/4487] hppa: Build fixes for STT_GNU_IFUNC. Stub out enough files to allow the hppa port to build without STT_GNU_IFUNC. --- ChangeLog.hppa | 4 ++++ sysdeps/hppa/dl-irel.h | 47 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 sysdeps/hppa/dl-irel.h diff --git a/ChangeLog.hppa b/ChangeLog.hppa index caae3ec8c5..0c7446e924 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,7 @@ +2012-04-17 Carlos O'Donell + + * sysdeps/hppa/dl-irel.h: New file. + 2012-04-17 Carlos O'Donell * sysdeps/hppa/dl-fptr.h: Add prototype for _dl_fptr_init. diff --git a/sysdeps/hppa/dl-irel.h b/sysdeps/hppa/dl-irel.h new file mode 100644 index 0000000000..90928470bf --- /dev/null +++ b/sysdeps/hppa/dl-irel.h @@ -0,0 +1,47 @@ +/* Machine-dependent ELF indirect relocation inline functions. + HP-PARISC version. + Copyright (C) 2012 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 _DL_IREL_H +#define _DL_IREL_H + +#include +#include +#include + +#define ELF_MACHINE_IREL 1 + +/* Implement enough to get the build going again. */ +#warning "NEED STT_GNU_IFUNC IMPLEMENTATION" + +static inline struct fdesc +__attribute ((always_inline)) +elf_ifunc_invoke (uintptr_t addr) +{ + return ((struct fdesc) {0, 0}); +} + +static inline void +__attribute ((always_inline)) +elf_irel (const Elf32_Rel *reloc) +{ + return; +} + +#endif /* dl-irel.h */ From c325f0f22675e987c60a2e1c6419ffad3ed6c6ec Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 17 Apr 2012 07:59:37 +0200 Subject: [PATCH 4288/4487] Avoid warnings about redefinition * sysdeps/unix/sysv/linux/arm/ldsodefs.h: Undefine MORE_ELF_HEADER_DATA to avoid warnings about redefinition. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/ldsodefs.h | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 491cc920e9..f16e6916df 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2012-04-16 Andreas Jaeger + + * sysdeps/unix/sysv/linux/arm/ldsodefs.h: Undefine + MORE_ELF_HEADER_DATA to avoid warnings about redefinition. + 2012-03-28 Joseph Myers * sysdeps/unix/sysv/linux/arm/bits/mman.h (MAP_STACK): Define. diff --git a/sysdeps/unix/sysv/linux/arm/ldsodefs.h b/sysdeps/unix/sysv/linux/arm/ldsodefs.h index 839dc18929..6966f8a15b 100644 --- a/sysdeps/unix/sysv/linux/arm/ldsodefs.h +++ b/sysdeps/unix/sysv/linux/arm/ldsodefs.h @@ -1,5 +1,5 @@ /* Run-time dynamic linker data structures for loaded ELF shared objects. - Copyright (C) 2010 Free Software Foundation, Inc. + Copyright (C) 2010, 2012 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,6 +23,7 @@ #undef VALID_ELF_HEADER #undef VALID_ELF_OSABI +#undef MORE_ELF_HEADER_DATA #ifdef __ARM_EABI__ #define EXTRA_OSABI ELFOSABI_ARM_AEABI From 860d60c13853eb97aae779beb65d4630b578c84d Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 17 Apr 2012 23:59:10 +0200 Subject: [PATCH 4289/4487] m68k: rename s_ilogb* to e_ilogb* --- ChangeLog.m68k | 9 +++++++++ sysdeps/m68k/m680x0/fpu/{s_ilogb.c => e_ilogb.c} | 7 ++----- sysdeps/m68k/m680x0/fpu/{s_ilogbf.c => e_ilogbf.c} | 2 +- sysdeps/m68k/m680x0/fpu/{s_ilogbl.c => e_ilogbl.c} | 2 +- 4 files changed, 13 insertions(+), 7 deletions(-) rename sysdeps/m68k/m680x0/fpu/{s_ilogb.c => e_ilogb.c} (88%) rename sysdeps/m68k/m680x0/fpu/{s_ilogbf.c => e_ilogbf.c} (65%) rename sysdeps/m68k/m680x0/fpu/{s_ilogbl.c => e_ilogbl.c} (68%) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index d631b40e4d..9d9b1812ee 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,12 @@ +2012-04-17 Andreas Schwab + + * sysdeps/m68k/m680x0/fpu/e_ilogb.c: Renamed from s_ilogb.c. + Define __ieee754_ilogb instead of __ilogb. + * sysdeps/m68k/m680x0/fpu/e_ilogbf.c: Renamed from s_ilogbf.c and + adjusted. + * sysdeps/m68k/m680x0/fpu/e_ilogbl.c: Renamed from s_ilogbl.c and + adjusted. + 2012-03-28 Andreas Schwab * sysdeps/unix/sysv/linux/m68k/bits/mman.h (MAP_STACK) diff --git a/sysdeps/m68k/m680x0/fpu/s_ilogb.c b/sysdeps/m68k/m680x0/fpu/e_ilogb.c similarity index 88% rename from sysdeps/m68k/m680x0/fpu/s_ilogb.c rename to sysdeps/m68k/m680x0/fpu/e_ilogb.c index ab4438aea2..41c597a012 100644 --- a/sysdeps/m68k/m680x0/fpu/s_ilogb.c +++ b/sysdeps/m68k/m680x0/fpu/e_ilogb.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1996-2012 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 @@ -30,7 +30,7 @@ #define m81(func) __m81_u(s(func)) int -s(__ilogb) (float_type x) +s(__ieee754_ilogb) (float_type x) { float_type result; unsigned long x_cond; @@ -45,6 +45,3 @@ s(__ilogb) (float_type x) __asm ("fgetexp%.x %1, %0" : "=f" (result) : "f" (x)); return (int) result; } - -#define weak_aliasx(a,b) weak_alias(a,b) -weak_aliasx (s(__ilogb), s(ilogb)) diff --git a/sysdeps/m68k/m680x0/fpu/s_ilogbf.c b/sysdeps/m68k/m680x0/fpu/e_ilogbf.c similarity index 65% rename from sysdeps/m68k/m680x0/fpu/s_ilogbf.c rename to sysdeps/m68k/m680x0/fpu/e_ilogbf.c index 4031c42ff7..34a8cd28e6 100644 --- a/sysdeps/m68k/m680x0/fpu/s_ilogbf.c +++ b/sysdeps/m68k/m680x0/fpu/e_ilogbf.c @@ -1,3 +1,3 @@ #define SUFF f #define float_type float -#include +#include diff --git a/sysdeps/m68k/m680x0/fpu/s_ilogbl.c b/sysdeps/m68k/m680x0/fpu/e_ilogbl.c similarity index 68% rename from sysdeps/m68k/m680x0/fpu/s_ilogbl.c rename to sysdeps/m68k/m680x0/fpu/e_ilogbl.c index 9c55a115e0..b0e13af6b1 100644 --- a/sysdeps/m68k/m680x0/fpu/s_ilogbl.c +++ b/sysdeps/m68k/m680x0/fpu/e_ilogbl.c @@ -1,3 +1,3 @@ #define SUFF l #define float_type long double -#include +#include From 9002644d9f39c18fc4d7787ee06959a09afd4df5 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 18 Apr 2012 11:06:17 +0200 Subject: [PATCH 4290/4487] m68k: update libm test ULPs --- ChangeLog.m68k | 4 ++ sysdeps/m68k/m680x0/fpu/libm-test-ulps | 67 +++++++++++++++++++++++++- 2 files changed, 69 insertions(+), 2 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 9d9b1812ee..dda687edd5 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,7 @@ +2012-04-18 Andreas Schwab + + * sysdeps/m68k/m680x0/fpu/libm-test-ulps: Update. + 2012-04-17 Andreas Schwab * sysdeps/m68k/m680x0/fpu/e_ilogb.c: Renamed from s_ilogb.c. diff --git a/sysdeps/m68k/m680x0/fpu/libm-test-ulps b/sysdeps/m68k/m680x0/fpu/libm-test-ulps index b153ba9bed..9344b512bd 100644 --- a/sysdeps/m68k/m680x0/fpu/libm-test-ulps +++ b/sysdeps/m68k/m680x0/fpu/libm-test-ulps @@ -876,12 +876,39 @@ idouble: 1 ildouble: 2 ldouble: 2 Test "Imaginary part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": +float: 1 +ifloat: 1 ildouble: 1 ldouble: 1 Test "Real part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i": ildouble: 1 ldouble: 1 Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "Real part of: ctan (0x1p1023 + 1 i) == -0.2254627924997545057926782581695274244229 + 0.8786063118883068695462540226219865087189 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: ctan (0x1p127 + 1 i) == 0.2446359391192790896381501310437708987204 + 0.9101334047676183761532873794426475906201 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: ctan (0x1p127 + 1 i) == 0.2446359391192790896381501310437708987204 + 0.9101334047676183761532873794426475906201 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ctan (0x1p16383 + 1 i) == 0.1608598776370396607204448234354670036772 + 0.8133818522051542536316746743877629761488 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: ctan (0x3.243f6cp-1 + 0 i) == -2.287733242885645987394874673945769518150e7 + 0.0 i": +float: 1 +ifloat: 1 +Test "Real part of: ctan (1 + 45 i) == 1.490158918874345552942703234806348520895e-39 + 1.000000000000000000000000000000000000001 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: ctan (1 + 47 i) == 2.729321264492904590777293425576722354636e-41 + 1.0 i": ildouble: 2 ldouble: 2 @@ -890,11 +917,21 @@ Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 ildouble: 1 ldouble: 1 Test "Imaginary part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": +float: 1 +ifloat: 1 ildouble: 1 ldouble: 1 +Test "Imaginary part of: ctanh (0 + 0x3.243f6cp-1 i) == 0.0 - 2.287733242885645987394874673945769518150e7 i": +float: 1 +ifloat: 1 Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i": +float: 1 +ifloat: 1 Test "Imaginary part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i": double: 1 float: 1 @@ -902,6 +939,26 @@ idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 +Test "Imaginary part of: ctanh (1 + 0x1p1023 i) == 0.8786063118883068695462540226219865087189 - 0.2254627924997545057926782581695274244229 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: ctanh (1 + 0x1p127 i) == 0.9101334047676183761532873794426475906201 + 0.2446359391192790896381501310437708987204 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ctanh (1 + 0x1p127 i) == 0.9101334047676183761532873794426475906201 + 0.2446359391192790896381501310437708987204 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: ctanh (1 + 0x1p16383 i) == 0.8133818522051542536316746743877629761488 + 0.1608598776370396607204448234354670036772 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ctanh (45 + 1 i) == 1.000000000000000000000000000000000000001 + 1.490158918874345552942703234806348520895e-39 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ctanh (47 + 1 i) == 1.0 + 2.729321264492904590777293425576722354636e-41 i": +ildouble: 2 +ldouble: 2 # erfc Test "erfc (0.75) == 0.288844366346484868401062165408589223": @@ -2099,15 +2156,21 @@ ldouble: 1 Function: Real part of "ctan": double: 1 +float: 1 idouble: 1 +ifloat: 1 ildouble: 2 ldouble: 2 Function: Imaginary part of "ctan": +float: 1 +ifloat: 1 ildouble: 1 ldouble: 1 Function: Real part of "ctanh": +float: 1 +ifloat: 1 ildouble: 1 ldouble: 1 @@ -2116,8 +2179,8 @@ double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 1 -ldouble: 1 +ildouble: 2 +ldouble: 2 Function: "erfc": float: 1 From 25593dcaf4cbdb744eff54fc426b29ae0b96817d Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sat, 21 Apr 2012 08:38:55 -0700 Subject: [PATCH 4291/4487] Merge sysdeps/unix/sysv/linux/arm/eabi into sysdeps/unix/sysv/linux/arm. --- ChangeLog.arm | 161 ++++++++++++++ ChangeLog.mips | 6 + sysdeps/unix/sysv/linux/arm/Makefile | 41 ++++ .../linux/arm/{eabi => }/____longjmp_chk.S | 0 .../unix/sysv/linux/arm/{eabi => }/configure | 2 +- .../sysv/linux/arm/{eabi => }/configure.in | 2 +- sysdeps/unix/sysv/linux/arm/eabi/Makefile | 42 ---- .../unix/sysv/linux/arm/eabi/syscalls.list | 32 --- sysdeps/unix/sysv/linux/arm/eabi/sysdep.h | 199 ----------------- .../sysv/linux/arm/{eabi => }/ftruncate64.c | 0 .../sysv/linux/arm/{eabi => }/getcontext.S | 0 .../linux/arm/{eabi => }/internal_accept4.S | 0 .../linux/arm/{eabi => }/internal_recvmmsg.S | 0 .../linux/arm/{eabi => }/internal_sendmmsg.S | 0 .../linux/arm/{eabi => }/libc-do-syscall.S | 0 .../sysv/linux/arm/{eabi => }/makecontext.c | 0 .../unix/sysv/linux/arm/{eabi => }/mmap64.S | 0 .../unix/sysv/linux/arm/{eabi => }/msgctl.c | 0 .../sysv/linux/arm/{eabi => }/nptl/Makefile | 0 .../sysv/linux/arm/{eabi => }/nptl/configure | 0 .../linux/arm/{eabi => }/nptl/configure.in | 0 .../nptl/nptl-aeabi_unwind_cpp_pr1.c | 0 .../{eabi => }/nptl/rt-aeabi_unwind_cpp_pr1.c | 0 .../linux/arm/{eabi => }/nptl/sysdep-cancel.h | 0 .../arm/{eabi => }/nptl/unwind-forcedunwind.c | 0 .../linux/arm/{eabi => }/nptl/unwind-resume.c | 0 .../sysv/linux/arm/{eabi => }/nptl/unwind.h | 0 .../sysv/linux/arm/{eabi => }/oldgetrlimit.c | 0 .../sysv/linux/arm/{eabi => }/oldsetrlimit.c | 0 .../unix/sysv/linux/arm/{eabi => }/pread.c | 0 .../unix/sysv/linux/arm/{eabi => }/pread64.c | 0 .../unix/sysv/linux/arm/{eabi => }/pwrite.c | 0 .../unix/sysv/linux/arm/{eabi => }/pwrite64.c | 0 .../sysv/linux/arm/{eabi => }/readahead.c | 0 .../unix/sysv/linux/arm/{eabi => }/semctl.c | 0 .../sysv/linux/arm/{eabi => }/setcontext.S | 0 .../unix/sysv/linux/arm/{eabi => }/shmctl.c | 0 .../sysv/linux/arm/{eabi => }/sigrestorer.S | 0 sysdeps/unix/sysv/linux/arm/socket.S | 126 ----------- .../sysv/linux/arm/{eabi => }/swapcontext.S | 0 .../unix/sysv/linux/arm/{eabi => }/syscall.S | 0 sysdeps/unix/sysv/linux/arm/syscalls.list | 35 ++- sysdeps/unix/sysv/linux/arm/sysdep.h | 208 ++++++++++++------ .../sysv/linux/arm/{eabi => }/truncate64.c | 0 .../unix/sysv/linux/arm/{eabi => }/umount.c | 0 .../unix/sysv/linux/mips/mips32/readahead.c | 2 +- 46 files changed, 388 insertions(+), 468 deletions(-) rename sysdeps/unix/sysv/linux/arm/{eabi => }/____longjmp_chk.S (100%) rename sysdeps/unix/sysv/linux/arm/{eabi => }/configure (71%) rename sysdeps/unix/sysv/linux/arm/{eabi => }/configure.in (71%) delete mode 100644 sysdeps/unix/sysv/linux/arm/eabi/Makefile delete mode 100644 sysdeps/unix/sysv/linux/arm/eabi/syscalls.list delete mode 100644 sysdeps/unix/sysv/linux/arm/eabi/sysdep.h rename sysdeps/unix/sysv/linux/arm/{eabi => }/ftruncate64.c (100%) rename sysdeps/unix/sysv/linux/arm/{eabi => }/getcontext.S (100%) rename sysdeps/unix/sysv/linux/arm/{eabi => }/internal_accept4.S (100%) rename sysdeps/unix/sysv/linux/arm/{eabi => }/internal_recvmmsg.S (100%) rename sysdeps/unix/sysv/linux/arm/{eabi => }/internal_sendmmsg.S (100%) rename sysdeps/unix/sysv/linux/arm/{eabi => }/libc-do-syscall.S (100%) rename sysdeps/unix/sysv/linux/arm/{eabi => }/makecontext.c (100%) rename sysdeps/unix/sysv/linux/arm/{eabi => }/mmap64.S (100%) rename sysdeps/unix/sysv/linux/arm/{eabi => }/msgctl.c (100%) rename sysdeps/unix/sysv/linux/arm/{eabi => }/nptl/Makefile (100%) rename sysdeps/unix/sysv/linux/arm/{eabi => }/nptl/configure (100%) rename sysdeps/unix/sysv/linux/arm/{eabi => }/nptl/configure.in (100%) rename sysdeps/unix/sysv/linux/arm/{eabi => }/nptl/nptl-aeabi_unwind_cpp_pr1.c (100%) rename sysdeps/unix/sysv/linux/arm/{eabi => }/nptl/rt-aeabi_unwind_cpp_pr1.c (100%) rename sysdeps/unix/sysv/linux/arm/{eabi => }/nptl/sysdep-cancel.h (100%) rename sysdeps/unix/sysv/linux/arm/{eabi => }/nptl/unwind-forcedunwind.c (100%) rename sysdeps/unix/sysv/linux/arm/{eabi => }/nptl/unwind-resume.c (100%) rename sysdeps/unix/sysv/linux/arm/{eabi => }/nptl/unwind.h (100%) rename sysdeps/unix/sysv/linux/arm/{eabi => }/oldgetrlimit.c (100%) rename sysdeps/unix/sysv/linux/arm/{eabi => }/oldsetrlimit.c (100%) rename sysdeps/unix/sysv/linux/arm/{eabi => }/pread.c (100%) rename sysdeps/unix/sysv/linux/arm/{eabi => }/pread64.c (100%) rename sysdeps/unix/sysv/linux/arm/{eabi => }/pwrite.c (100%) rename sysdeps/unix/sysv/linux/arm/{eabi => }/pwrite64.c (100%) rename sysdeps/unix/sysv/linux/arm/{eabi => }/readahead.c (100%) rename sysdeps/unix/sysv/linux/arm/{eabi => }/semctl.c (100%) rename sysdeps/unix/sysv/linux/arm/{eabi => }/setcontext.S (100%) rename sysdeps/unix/sysv/linux/arm/{eabi => }/shmctl.c (100%) rename sysdeps/unix/sysv/linux/arm/{eabi => }/sigrestorer.S (100%) delete mode 100644 sysdeps/unix/sysv/linux/arm/socket.S rename sysdeps/unix/sysv/linux/arm/{eabi => }/swapcontext.S (100%) rename sysdeps/unix/sysv/linux/arm/{eabi => }/syscall.S (100%) rename sysdeps/unix/sysv/linux/arm/{eabi => }/truncate64.c (100%) rename sysdeps/unix/sysv/linux/arm/{eabi => }/umount.c (100%) diff --git a/ChangeLog.arm b/ChangeLog.arm index f16e6916df..43a595dc71 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,164 @@ +2012-04-21 Joseph Myers + + [BZ #13556] + * sysdeps/unix/sysv/linux/arm/socket.S: Remove. + * sysdeps/unix/sysv/linux/arm/syscalls.list (syscall): Remove. + (oldgetrlimit): Likewise. + (oldsetrlimit): Likewise. + (syscall): Likewise. + (msgget): Add syscall from eabi/syscalls.list. + (msgrcv): Likewise. + (msgsnd): Likewise. + (shmat): Likewise. + (shmdt): Likewise. + (shmget): Likewise. + (semop): Likewise. + (semtimedop): Likewise. + (semget): Likewise. + (accept): Likewise. + (bind): Likewise. + (connect): Likewise. + (getpeername): Likewise. + (getsockname): Likewise. + (getsockopt): Likewise. + (listen): Likewise. + (recv): Likewise. + (recvfrom): Likewise. + (recvmsg): Likewise. + (send): Likewise. + (sendmsg): Likewise. + (sendto): Likewise. + (setsockopt): Likewise. + (shutdown): Likewise. + (socket): Likewise. + (socketpair): Likewise. + * sysdeps/unix/sysv/linux/arm/eabi/syscalls.list: Remove. + * sysdeps/unix/sysv/linux/arm/Makefile [subdir = csu] + (CFLAGS-libc-start.c): Add setting from eabi/Makefile. + [subdir = rt] (librt-sysdep_routines): Likewise. + [subdir = rt] (librt-shared-only-routines): Likewise. + [subdir = nptl] (libpthread-sysdep_routines): Likewise. + [subdir = nptl] (libpthread-shared-only-routines): Likewise. + [subdir = resolv] (libanl-sysdep_routines): Likewise. + [subdir = resolv] (libanl-shared-only-routines): Likewise. + [subdir = csu] (sysdep_routines): Likewise. + [subdir = nscd] (nscd-modules): Likewise. + [subdir = nss] (libnss_db-sysdep_routines): Likewise. + [subdir = nss] (libnss_db-shared-only-routines): Likewise. + [subdir = posix] (LDFLAGS-tst-rfc3484): Likewise. + [subdir = posix] (LDFLAGS-tst-rfc3484-2): Likewise. + [subdir = posix] (LDFLAGS-tst-rfc3484-3): Likewise. + * sysdeps/unix/sysv/linux/arm/eabi/Makefile: Remove. + * sysdeps/unix/sysv/linux/arm/sysdep.h (__NR_SYSCALL_BASE): Add + test from eabi/sysdep.h. + (__NR_stime): Add #undef from eabi/sysdep.h. + (__NR_alarm): Likewise. + (DO_CALL): Use definition from eabi/sysdep.h. + (DOARGS_0): Likewise. + (DOARGS_1): Likewise. + (DOARGS_2): Likewise. + (DOARGS_3): Likewise. + (DOARGS_4): Likewise. + (DOARGS_5): Likewise. + (DOARGS_6): Likewise. + (DOARGS_7): Likewise. + (UNDOARGS_0): Likewise. + (UNDOARGS_1): Likewise. + (UNDOARGS_2): Likewise. + (UNDOARGS_3): Likewise. + (UNDOARGS_4): Likewise. + (UNDOARGS_5): Likewise. + (UNDOARGS_6): Likewise. + (UNDOARGS_7): Likewise. + (INTERNAL_SYSCALL_RAW): Likewise. + [__thumb__] (LOAD_ARGS_7): Do not define. + [__thumb__] (ASM_ARGS_7): Likewise. + (INTERNAL_SYSCALL_NCS): Use definition from eabi/sysdep.h. + (INTERNAL_SYSCALL_NCS_0): Remove. + (INTERNAL_SYSCALL_NCS_1): Likewise. + (INTERNAL_SYSCALL_NCS_2): Likewise. + (INTERNAL_SYSCALL_NCS_3): Likewise. + (INTERNAL_SYSCALL_NCS_4): Likewise. + (INTERNAL_SYSCALL_NCS_5): Likewise. + * sysdeps/unix/sysv/linux/arm/eabi/sysdep.h: Remove. + * sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S: Move to ... + * sysdeps/unix/sysv/linux/arm/____longjmp_chk.S: ... here. + * sysdeps/unix/sysv/linux/arm/eabi/configure.in: Move to ... + * sysdeps/unix/sysv/linux/arm/configure.in: ... here. Update + comment. + * sysdeps/unix/sysv/linux/arm/eabi/configure: Move to ... + * sysdeps/unix/sysv/linux/arm/configure: ... here. Regenerate. + * sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c: Move to ... + * sysdeps/unix/sysv/linux/arm/ftruncate64.c: ... here. + * sysdeps/unix/sysv/linux/arm/eabi/getcontext.S: Move to ... + * sysdeps/unix/sysv/linux/arm/getcontext.S: ... here. + * sysdeps/unix/sysv/linux/arm/eabi/internal_accept4.S: Move to ... + * sysdeps/unix/sysv/linux/arm/internal_accept4.S: ... here. + * sysdeps/unix/sysv/linux/arm/eabi/internal_recvmmsg.S: Move to ... + * sysdeps/unix/sysv/linux/arm/internal_recvmmsg.S: ... here. + * sysdeps/unix/sysv/linux/arm/eabi/internal_sendmmsg.S: Move to ... + * sysdeps/unix/sysv/linux/arm/internal_sendmmsg.S: ... here. + * sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S: Move to ... + * sysdeps/unix/sysv/linux/arm/libc-do-syscall.S: ... here. + * sysdeps/unix/sysv/linux/arm/eabi/makecontext.c: Move to ... + * sysdeps/unix/sysv/linux/arm/makecontext.c: ... here. + * sysdeps/unix/sysv/linux/arm/eabi/mmap64.S: Move to ... + * sysdeps/unix/sysv/linux/arm/mmap64.S: ... here. + * sysdeps/unix/sysv/linux/arm/eabi/msgctl.c: Move to ... + * sysdeps/unix/sysv/linux/arm/msgctl.c: ... here. + * sysdeps/unix/sysv/linux/arm/eabi/oldgetrlimit.c: Move to ... + * sysdeps/unix/sysv/linux/arm/oldgetrlimit.c: ... here. + * sysdeps/unix/sysv/linux/arm/eabi/oldsetrlimit.c: Move to ... + * sysdeps/unix/sysv/linux/arm/oldsetrlimit.c: ... here. + * sysdeps/unix/sysv/linux/arm/eabi/pread.c: Move to ... + * sysdeps/unix/sysv/linux/arm/pread.c: ... here. + * sysdeps/unix/sysv/linux/arm/eabi/pread64.c: Move to ... + * sysdeps/unix/sysv/linux/arm/pread64.c: ... here. + * sysdeps/unix/sysv/linux/arm/eabi/pwrite.c: Move to ... + * sysdeps/unix/sysv/linux/arm/pwrite.c: ... here. + * sysdeps/unix/sysv/linux/arm/eabi/pwrite64.c: Move to ... + * sysdeps/unix/sysv/linux/arm/pwrite64.c: ... here. + * sysdeps/unix/sysv/linux/arm/eabi/readahead.c: Move to ... + * sysdeps/unix/sysv/linux/arm/readahead.c: ... here. + * sysdeps/unix/sysv/linux/arm/eabi/semctl.c: Move to ... + * sysdeps/unix/sysv/linux/arm/semctl.c: ... here. + * sysdeps/unix/sysv/linux/arm/eabi/setcontext.S: Move to ... + * sysdeps/unix/sysv/linux/arm/setcontext.S: ... here. + * sysdeps/unix/sysv/linux/arm/eabi/shmctl.c: Move to ... + * sysdeps/unix/sysv/linux/arm/shmctl.c: ... here. + * sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S: Move to ... + * sysdeps/unix/sysv/linux/arm/sigrestorer.S: ... here. + * sysdeps/unix/sysv/linux/arm/eabi/swapcontext.S: Move to ... + * sysdeps/unix/sysv/linux/arm/swapcontext.S: ... here. + * sysdeps/unix/sysv/linux/arm/eabi/syscall.S: Move to ... + * sysdeps/unix/sysv/linux/arm/syscall.S: ... here. + * sysdeps/unix/sysv/linux/arm/eabi/truncate64.c: Move to ... + * sysdeps/unix/sysv/linux/arm/truncate64.c: ... here. + * sysdeps/unix/sysv/linux/arm/eabi/umount.c: Move to ... + * sysdeps/unix/sysv/linux/arm/umount.c: ... here. + * sysdeps/unix/sysv/linux/arm/eabi/nptl/Makefile: Move to ... + * sysdeps/unix/sysv/linux/arm/nptl/Makefile: ... here. + * sysdeps/unix/sysv/linux/arm/eabi/nptl/configure.in: Move to ... + * sysdeps/unix/sysv/linux/arm/nptl/configure.in: ... here. + * sysdeps/unix/sysv/linux/arm/eabi/nptl/configure: Move to ... + * sysdeps/unix/sysv/linux/arm/nptl/configure: ... here. + * sysdeps/unix/sysv/linux/arm/eabi/nptl/nptl-aeabi_unwind_cpp_pr1.c: + Move to ... + * sysdeps/unix/sysv/linux/arm/nptl/nptl-aeabi_unwind_cpp_pr1.c: + ... here. + * sysdeps/unix/sysv/linux/arm/eabi/nptl/rt-aeabi_unwind_cpp_pr1.c: + Move to ... + * sysdeps/unix/sysv/linux/arm/nptl/rt-aeabi_unwind_cpp_pr1.c: ... here. + * sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h: Move to ... + * sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h: ... here. + * sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c: + Move to ... + * sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c: ... here. + * sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c: Move to ... + * sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c: ... here. + * sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h: Move to ... + * sysdeps/unix/sysv/linux/arm/nptl/unwind.h: ... here. + 2012-04-16 Andreas Jaeger * sysdeps/unix/sysv/linux/arm/ldsodefs.h: Undefine diff --git a/ChangeLog.mips b/ChangeLog.mips index 01f51c0c40..6e0523de80 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,9 @@ +2012-04-21 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/mips32/readahead.c: Include + sysdeps/unix/sysv/linux/arm/readahead.c not + sysdeps/unix/sysv/linux/arm/eabi/readahead.c. + 2012-03-28 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/mman.h (MAP_STACK): Define. diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile index a9817368a1..fb1e3a5b99 100644 --- a/sysdeps/unix/sysv/linux/arm/Makefile +++ b/sysdeps/unix/sysv/linux/arm/Makefile @@ -1,4 +1,9 @@ ifeq ($(subdir),csu) +# In order for unwinding to fail when it falls out of main, we need a +# cantunwind marker. There's one in start.S. To make sure we reach it, add +# unwind tables for __libc_start_main. +CFLAGS-libc-start.c += -fexceptions + sysdep_routines += aeabi_read_tp libc-aeabi_read_tp static-only-routines += aeabi_read_tp shared-only-routines += libc-aeabi_read_tp @@ -24,3 +29,39 @@ endif ifeq ($(subdir),stdlib) gen-as-const-headers += ucontext_i.sym endif + +# Add a syscall function to each library that needs one. + +ifeq ($(subdir),rt) +librt-sysdep_routines += libc-do-syscall +librt-shared-only-routines += libc-do-syscall +endif + +ifeq ($(subdir),nptl) +libpthread-sysdep_routines += libc-do-syscall +libpthread-shared-only-routines += libc-do-syscall +endif + +ifeq ($(subdir),resolv) +libanl-sysdep_routines += libc-do-syscall +libanl-shared-only-routines += libc-do-syscall +endif + +ifeq ($(subdir),csu) +sysdep_routines += libc-do-syscall +endif + +ifeq ($(subdir),nscd) +nscd-modules += libc-do-syscall +endif + +ifeq ($(subdir),nss) +libnss_db-sysdep_routines += libc-do-syscall +libnss_db-shared-only-routines += libc-do-syscall +endif + +ifeq ($(subdir),posix) +LDFLAGS-tst-rfc3484 += $(common-objpfx)csu/libc-do-syscall.o +LDFLAGS-tst-rfc3484-2 += $(common-objpfx)csu/libc-do-syscall.o +LDFLAGS-tst-rfc3484-3 += $(common-objpfx)csu/libc-do-syscall.o +endif diff --git a/sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S b/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S similarity index 100% rename from sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S rename to sysdeps/unix/sysv/linux/arm/____longjmp_chk.S diff --git a/sysdeps/unix/sysv/linux/arm/eabi/configure b/sysdeps/unix/sysv/linux/arm/configure similarity index 71% rename from sysdeps/unix/sysv/linux/arm/eabi/configure rename to sysdeps/unix/sysv/linux/arm/configure index c7e20cfdc5..5b5f4c993a 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/configure +++ b/sysdeps/unix/sysv/linux/arm/configure @@ -1,5 +1,5 @@ # This file is generated from configure.in by Autoconf. DO NOT EDIT! - # Local configure fragment for sysdeps/unix/sysv/linux/arm/eabi. + # Local configure fragment for sysdeps/unix/sysv/linux/arm. arch_minimum_kernel=2.6.16 libc_cv_gcc_unwind_find_fde=no diff --git a/sysdeps/unix/sysv/linux/arm/eabi/configure.in b/sysdeps/unix/sysv/linux/arm/configure.in similarity index 71% rename from sysdeps/unix/sysv/linux/arm/eabi/configure.in rename to sysdeps/unix/sysv/linux/arm/configure.in index cc0e9b5bd3..b57c4e37b8 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/configure.in +++ b/sysdeps/unix/sysv/linux/arm/configure.in @@ -1,5 +1,5 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/unix/sysv/linux/arm/eabi. +# Local configure fragment for sysdeps/unix/sysv/linux/arm. arch_minimum_kernel=2.6.16 libc_cv_gcc_unwind_find_fde=no diff --git a/sysdeps/unix/sysv/linux/arm/eabi/Makefile b/sysdeps/unix/sysv/linux/arm/eabi/Makefile deleted file mode 100644 index b7baae9e91..0000000000 --- a/sysdeps/unix/sysv/linux/arm/eabi/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -ifeq ($(subdir),csu) -# In order for unwinding to fail when it falls out of main, we need a -# cantunwind marker. There's one in start.S. To make sure we reach it, add -# unwind tables for __libc_start_main. -CFLAGS-libc-start.c += -fexceptions -endif - -# Add a syscall function to each library that needs one. - -ifeq ($(subdir),rt) -librt-sysdep_routines += libc-do-syscall -librt-shared-only-routines += libc-do-syscall -endif - -ifeq ($(subdir),nptl) -libpthread-sysdep_routines += libc-do-syscall -libpthread-shared-only-routines += libc-do-syscall -endif - -ifeq ($(subdir),resolv) -libanl-sysdep_routines += libc-do-syscall -libanl-shared-only-routines += libc-do-syscall -endif - -ifeq ($(subdir),csu) -sysdep_routines += libc-do-syscall -endif - -ifeq ($(subdir),nscd) -nscd-modules += libc-do-syscall -endif - -ifeq ($(subdir),nss) -libnss_db-sysdep_routines += libc-do-syscall -libnss_db-shared-only-routines += libc-do-syscall -endif - -ifeq ($(subdir),posix) -LDFLAGS-tst-rfc3484 += $(common-objpfx)csu/libc-do-syscall.o -LDFLAGS-tst-rfc3484-2 += $(common-objpfx)csu/libc-do-syscall.o -LDFLAGS-tst-rfc3484-3 += $(common-objpfx)csu/libc-do-syscall.o -endif diff --git a/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list b/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list deleted file mode 100644 index e896902471..0000000000 --- a/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list +++ /dev/null @@ -1,32 +0,0 @@ -# File name Caller Syscall name # args Strong name Weak names - -# Semaphore and shm system calls. msgctl, shmctl, and semctl have C -# wrappers (to set __IPC_64). -msgget - msgget i:ii __msgget msgget -msgrcv - msgrcv Ci:ibnii __msgrcv msgrcv -msgsnd - msgsnd Ci:ibni __msgsnd msgsnd -shmat - shmat i:ipi __shmat shmat -shmdt - shmdt i:s __shmdt shmdt -shmget - shmget i:iii __shmget shmget -semop - semop i:ipi __semop semop -semtimedop - semtimedop i:ipip semtimedop -semget - semget i:iii __semget semget - -# proper socket implementations: -accept - accept Ci:iBN __libc_accept __accept accept -bind - bind i:ipi __bind bind -connect - connect Ci:ipi __libc_connect __connect_internal __connect connect -getpeername - getpeername i:ipp __getpeername getpeername -getsockname - getsockname i:ipp __getsockname getsockname -getsockopt - getsockopt i:iiiBN __getsockopt getsockopt -listen - listen i:ii __listen listen -recv - recv Ci:ibni __libc_recv __recv recv -recvfrom - recvfrom Ci:ibniBN __libc_recvfrom __recvfrom recvfrom -recvmsg - recvmsg Ci:ipi __libc_recvmsg __recvmsg recvmsg -send - send Ci:ibni __libc_send __send send -sendmsg - sendmsg Ci:ipi __libc_sendmsg __sendmsg sendmsg -sendto - sendto Ci:ibnibn __libc_sendto __sendto sendto -setsockopt - setsockopt i:iiibn __setsockopt setsockopt -shutdown - shutdown i:ii __shutdown shutdown -socket - socket i:iii __socket socket -socketpair - socketpair i:iiif __socketpair socketpair diff --git a/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h b/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h deleted file mode 100644 index 408142c1af..0000000000 --- a/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h +++ /dev/null @@ -1,199 +0,0 @@ -/* Copyright (C) 2005, 2006, 2007, 2009 - Free Software Foundation, Inc. - - This file is part of the GNU C Library. - - Contributed by Daniel Jacobowitz , Oct 2005. - - 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, see - . */ - -#ifndef _LINUX_ARM_EABI_SYSDEP_H -#define _LINUX_ARM_EABI_SYSDEP_H 1 - -#include - -#include - -#if __NR_SYSCALL_BASE != 0 -# error Kernel headers are too old -#endif - -/* Don't use stime, even if the kernel headers define it. We have - settimeofday, and some EABI kernels have removed stime. Similarly - use setitimer to implement alarm. */ -#undef __NR_stime -#undef __NR_alarm - -/* The ARM EABI user interface passes the syscall number in r7, instead - of in the swi. This is more efficient, because the kernel does not need - to fetch the swi from memory to find out the number; which can be painful - with separate I-cache and D-cache. Make sure to use 0 for the SWI - argument; otherwise the (optional) compatibility code for APCS binaries - may be invoked. */ - -#if defined(__thumb__) -/* We can not expose the use of r7 to the compiler. GCC (as - of 4.5) uses r7 as the hard frame pointer for Thumb - although - for Thumb-2 it isn't obviously a better choice than r11. - And GCC does not support asms that conflict with the frame - pointer. - - This would be easier if syscall numbers never exceeded 255, - but they do. For the moment the LOAD_ARGS_7 is sacrificed. - We can't use push/pop inside the asm because that breaks - unwinding (i.e. thread cancellation) for this frame. We can't - locally save and restore r7, because we do not know if this - function uses r7 or if it is our caller's r7; if it is our caller's, - then unwinding will fail higher up the stack. So we move the - syscall out of line and provide its own unwind information. */ -#undef LOAD_ARGS_7 -#undef INTERNAL_SYSCALL_RAW -#define INTERNAL_SYSCALL_RAW(name, err, nr, args...) \ - ({ \ - register int _a1 asm ("a1"); \ - int _nametmp = name; \ - LOAD_ARGS_##nr (args) \ - register int _name asm ("ip") = _nametmp; \ - asm volatile ("bl __libc_do_syscall" \ - : "=r" (_a1) \ - : "r" (_name) ASM_ARGS_##nr \ - : "memory", "lr"); \ - _a1; }) -#else /* ARM */ -#undef INTERNAL_SYSCALL_RAW -#define INTERNAL_SYSCALL_RAW(name, err, nr, args...) \ - ({ \ - register int _a1 asm ("r0"), _nr asm ("r7"); \ - LOAD_ARGS_##nr (args) \ - _nr = name; \ - asm volatile ("swi 0x0 @ syscall " #name \ - : "=r" (_a1) \ - : "r" (_nr) ASM_ARGS_##nr \ - : "memory"); \ - _a1; }) -#endif - -/* For EABI, non-constant syscalls are actually pretty easy... */ -#undef INTERNAL_SYSCALL_NCS -#define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \ - INTERNAL_SYSCALL_RAW (number, err, nr, args) - -/* We must save and restore r7 (call-saved) for the syscall number. - We never make function calls from inside here (only potentially - signal handlers), so we do not bother with doubleword alignment. - - Just like the APCS syscall convention, the EABI syscall convention uses - r0 through r6 for up to seven syscall arguments. None are ever passed to - the kernel on the stack, although incoming arguments are on the stack for - syscalls with five or more arguments. - - The assembler will convert the literal pool load to a move for most - syscalls. */ - -#undef DO_CALL -#define DO_CALL(syscall_name, args) \ - DOARGS_##args; \ - ldr r7, =SYS_ify (syscall_name); \ - swi 0x0; \ - UNDOARGS_##args - -#undef DOARGS_0 -#define DOARGS_0 \ - .fnstart; \ - str r7, [sp, #-4]!; \ - cfi_adjust_cfa_offset (4); \ - cfi_rel_offset (r7, 0); \ - .save { r7 } -#undef DOARGS_1 -#define DOARGS_1 DOARGS_0 -#undef DOARGS_2 -#define DOARGS_2 DOARGS_0 -#undef DOARGS_3 -#define DOARGS_3 DOARGS_0 -#undef DOARGS_4 -#define DOARGS_4 DOARGS_0 -#undef DOARGS_5 -#define DOARGS_5 \ - .fnstart; \ - stmfd sp!, {r4, r7}; \ - cfi_adjust_cfa_offset (8); \ - cfi_rel_offset (r4, 0); \ - cfi_rel_offset (r7, 4); \ - .save { r4, r7 }; \ - ldr r4, [sp, #8] -#undef DOARGS_6 -#define DOARGS_6 \ - .fnstart; \ - mov ip, sp; \ - stmfd sp!, {r4, r5, r7}; \ - cfi_adjust_cfa_offset (12); \ - cfi_rel_offset (r4, 0); \ - cfi_rel_offset (r5, 4); \ - cfi_rel_offset (r7, 8); \ - .save { r4, r5, r7 }; \ - ldmia ip, {r4, r5} -#undef DOARGS_7 -#define DOARGS_7 \ - .fnstart; \ - mov ip, sp; \ - stmfd sp!, {r4, r5, r6, r7}; \ - cfi_adjust_cfa_offset (16); \ - cfi_rel_offset (r4, 0); \ - cfi_rel_offset (r5, 4); \ - cfi_rel_offset (r6, 8); \ - cfi_rel_offset (r7, 12); \ - .save { r4, r5, r6, r7 }; \ - ldmia ip, {r4, r5, r6} - -#undef UNDOARGS_0 -#define UNDOARGS_0 \ - ldr r7, [sp], #4; \ - cfi_adjust_cfa_offset (-4); \ - cfi_restore (r7); \ - .fnend -#undef UNDOARGS_1 -#define UNDOARGS_1 UNDOARGS_0 -#undef UNDOARGS_2 -#define UNDOARGS_2 UNDOARGS_0 -#undef UNDOARGS_3 -#define UNDOARGS_3 UNDOARGS_0 -#undef UNDOARGS_4 -#define UNDOARGS_4 UNDOARGS_0 -#undef UNDOARGS_5 -#define UNDOARGS_5 \ - ldmfd sp!, {r4, r7}; \ - cfi_adjust_cfa_offset (-8); \ - cfi_restore (r4); \ - cfi_restore (r7); \ - .fnend -#undef UNDOARGS_6 -#define UNDOARGS_6 \ - ldmfd sp!, {r4, r5, r7}; \ - cfi_adjust_cfa_offset (-12); \ - cfi_restore (r4); \ - cfi_restore (r5); \ - cfi_restore (r7); \ - .fnend -#undef UNDOARGS_7 -#define UNDOARGS_7 \ - ldmfd sp!, {r4, r5, r6, r7}; \ - cfi_adjust_cfa_offset (-16); \ - cfi_restore (r4); \ - cfi_restore (r5); \ - cfi_restore (r6); \ - cfi_restore (r7); \ - .fnend - -#endif /* _LINUX_ARM_EABI_SYSDEP_H */ diff --git a/sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c b/sysdeps/unix/sysv/linux/arm/ftruncate64.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c rename to sysdeps/unix/sysv/linux/arm/ftruncate64.c diff --git a/sysdeps/unix/sysv/linux/arm/eabi/getcontext.S b/sysdeps/unix/sysv/linux/arm/getcontext.S similarity index 100% rename from sysdeps/unix/sysv/linux/arm/eabi/getcontext.S rename to sysdeps/unix/sysv/linux/arm/getcontext.S diff --git a/sysdeps/unix/sysv/linux/arm/eabi/internal_accept4.S b/sysdeps/unix/sysv/linux/arm/internal_accept4.S similarity index 100% rename from sysdeps/unix/sysv/linux/arm/eabi/internal_accept4.S rename to sysdeps/unix/sysv/linux/arm/internal_accept4.S diff --git a/sysdeps/unix/sysv/linux/arm/eabi/internal_recvmmsg.S b/sysdeps/unix/sysv/linux/arm/internal_recvmmsg.S similarity index 100% rename from sysdeps/unix/sysv/linux/arm/eabi/internal_recvmmsg.S rename to sysdeps/unix/sysv/linux/arm/internal_recvmmsg.S diff --git a/sysdeps/unix/sysv/linux/arm/eabi/internal_sendmmsg.S b/sysdeps/unix/sysv/linux/arm/internal_sendmmsg.S similarity index 100% rename from sysdeps/unix/sysv/linux/arm/eabi/internal_sendmmsg.S rename to sysdeps/unix/sysv/linux/arm/internal_sendmmsg.S diff --git a/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S b/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S similarity index 100% rename from sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S rename to sysdeps/unix/sysv/linux/arm/libc-do-syscall.S diff --git a/sysdeps/unix/sysv/linux/arm/eabi/makecontext.c b/sysdeps/unix/sysv/linux/arm/makecontext.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/eabi/makecontext.c rename to sysdeps/unix/sysv/linux/arm/makecontext.c diff --git a/sysdeps/unix/sysv/linux/arm/eabi/mmap64.S b/sysdeps/unix/sysv/linux/arm/mmap64.S similarity index 100% rename from sysdeps/unix/sysv/linux/arm/eabi/mmap64.S rename to sysdeps/unix/sysv/linux/arm/mmap64.S diff --git a/sysdeps/unix/sysv/linux/arm/eabi/msgctl.c b/sysdeps/unix/sysv/linux/arm/msgctl.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/eabi/msgctl.c rename to sysdeps/unix/sysv/linux/arm/msgctl.c diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/Makefile b/sysdeps/unix/sysv/linux/arm/nptl/Makefile similarity index 100% rename from sysdeps/unix/sysv/linux/arm/eabi/nptl/Makefile rename to sysdeps/unix/sysv/linux/arm/nptl/Makefile diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/configure b/sysdeps/unix/sysv/linux/arm/nptl/configure similarity index 100% rename from sysdeps/unix/sysv/linux/arm/eabi/nptl/configure rename to sysdeps/unix/sysv/linux/arm/nptl/configure diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/configure.in b/sysdeps/unix/sysv/linux/arm/nptl/configure.in similarity index 100% rename from sysdeps/unix/sysv/linux/arm/eabi/nptl/configure.in rename to sysdeps/unix/sysv/linux/arm/nptl/configure.in diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/nptl-aeabi_unwind_cpp_pr1.c b/sysdeps/unix/sysv/linux/arm/nptl/nptl-aeabi_unwind_cpp_pr1.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/eabi/nptl/nptl-aeabi_unwind_cpp_pr1.c rename to sysdeps/unix/sysv/linux/arm/nptl/nptl-aeabi_unwind_cpp_pr1.c diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/rt-aeabi_unwind_cpp_pr1.c b/sysdeps/unix/sysv/linux/arm/nptl/rt-aeabi_unwind_cpp_pr1.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/eabi/nptl/rt-aeabi_unwind_cpp_pr1.c rename to sysdeps/unix/sysv/linux/arm/nptl/rt-aeabi_unwind_cpp_pr1.c diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h similarity index 100% rename from sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h rename to sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c rename to sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c rename to sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h b/sysdeps/unix/sysv/linux/arm/nptl/unwind.h similarity index 100% rename from sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h rename to sysdeps/unix/sysv/linux/arm/nptl/unwind.h diff --git a/sysdeps/unix/sysv/linux/arm/eabi/oldgetrlimit.c b/sysdeps/unix/sysv/linux/arm/oldgetrlimit.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/eabi/oldgetrlimit.c rename to sysdeps/unix/sysv/linux/arm/oldgetrlimit.c diff --git a/sysdeps/unix/sysv/linux/arm/eabi/oldsetrlimit.c b/sysdeps/unix/sysv/linux/arm/oldsetrlimit.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/eabi/oldsetrlimit.c rename to sysdeps/unix/sysv/linux/arm/oldsetrlimit.c diff --git a/sysdeps/unix/sysv/linux/arm/eabi/pread.c b/sysdeps/unix/sysv/linux/arm/pread.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/eabi/pread.c rename to sysdeps/unix/sysv/linux/arm/pread.c diff --git a/sysdeps/unix/sysv/linux/arm/eabi/pread64.c b/sysdeps/unix/sysv/linux/arm/pread64.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/eabi/pread64.c rename to sysdeps/unix/sysv/linux/arm/pread64.c diff --git a/sysdeps/unix/sysv/linux/arm/eabi/pwrite.c b/sysdeps/unix/sysv/linux/arm/pwrite.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/eabi/pwrite.c rename to sysdeps/unix/sysv/linux/arm/pwrite.c diff --git a/sysdeps/unix/sysv/linux/arm/eabi/pwrite64.c b/sysdeps/unix/sysv/linux/arm/pwrite64.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/eabi/pwrite64.c rename to sysdeps/unix/sysv/linux/arm/pwrite64.c diff --git a/sysdeps/unix/sysv/linux/arm/eabi/readahead.c b/sysdeps/unix/sysv/linux/arm/readahead.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/eabi/readahead.c rename to sysdeps/unix/sysv/linux/arm/readahead.c diff --git a/sysdeps/unix/sysv/linux/arm/eabi/semctl.c b/sysdeps/unix/sysv/linux/arm/semctl.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/eabi/semctl.c rename to sysdeps/unix/sysv/linux/arm/semctl.c diff --git a/sysdeps/unix/sysv/linux/arm/eabi/setcontext.S b/sysdeps/unix/sysv/linux/arm/setcontext.S similarity index 100% rename from sysdeps/unix/sysv/linux/arm/eabi/setcontext.S rename to sysdeps/unix/sysv/linux/arm/setcontext.S diff --git a/sysdeps/unix/sysv/linux/arm/eabi/shmctl.c b/sysdeps/unix/sysv/linux/arm/shmctl.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/eabi/shmctl.c rename to sysdeps/unix/sysv/linux/arm/shmctl.c diff --git a/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S b/sysdeps/unix/sysv/linux/arm/sigrestorer.S similarity index 100% rename from sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S rename to sysdeps/unix/sysv/linux/arm/sigrestorer.S diff --git a/sysdeps/unix/sysv/linux/arm/socket.S b/sysdeps/unix/sysv/linux/arm/socket.S deleted file mode 100644 index 5d238d3ed5..0000000000 --- a/sysdeps/unix/sysv/linux/arm/socket.S +++ /dev/null @@ -1,126 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997, 1998, 2003, 2004, 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 - 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, see - . */ - -#include -#include - -#define P(a, b) P2(a, b) -#define P2(a, b) a##b - - .text -/* The socket-oriented system calls are handled unusally in Linux. - They are all gated through the single `socketcall' system call number. - `socketcall' takes two arguments: the first is the subcode, specifying - which socket function is being called; and the second is a pointer to - the arguments to the specific function. - - The .S files for the other calls just #define socket and #include this. */ - -#ifndef __socket -# ifndef NO_WEAK_ALIAS -# define __socket P(__,socket) -# else -# define __socket socket -# endif -#endif - -#define PUSHARGS_1 str a1, [sp, $-4]! -#define PUSHARGS_2 stmfd sp!, {a1, a2} -#define PUSHARGS_3 stmfd sp!, {a1, a2, a3} -#define PUSHARGS_4 stmfd sp!, {a1, a2, a3, a4} -#define PUSHARGS_5 stmfd sp!, {a1, a2, a3, a4} /* Caller has already pushed arg 5 */ -#define PUSHARGS_6 stmfd sp!, {a1, a2, a3, a4} - -#define POPARGS_1 add sp, sp, #4 -#define POPARGS_2 add sp, sp, #8 -#define POPARGS_3 add sp, sp, #12 -#define POPARGS_4 add sp, sp, #16 -#define POPARGS_5 add sp, sp, #16 -#define POPARGS_6 add sp, sp, #16 - -#ifndef NARGS -#define NARGS 3 /* If we were called with no wrapper, this is really socket() */ -#endif - -#if defined NEED_CANCELLATION && defined CENABLE - PSEUDO_PROLOGUE -#endif - -.globl __socket -ENTRY (__socket) - /* This code previously moved sp into ip and stored the args using - stmdb ip!, {a1-a4}. It did not modify sp, so the stack never had - to be restored after the syscall completed. It saved an - instruction and meant no stack cleanup work was required. - - This will not work in the case of a socket call being interrupted - by a signal. If the signal handler uses any stack the arguments - to socket will be trashed. The results of a restart of any - socket call are then unpredictable. */ - - /* Push args onto the stack. */ - P(PUSHARGS_,NARGS) - -#if defined NEED_CANCELLATION && defined CENABLE - SINGLE_THREAD_P - bne 1f -#endif - - /* Do the system call trap. */ - mov a1, $P(SOCKOP_,socket) - mov a2, sp - swi SYS_ify(socketcall) - - /* Pop args off the stack */ - P(POPARGS_,NARGS) - - /* r0 is < 0 if there was an error. */ - cmn r0, $124 - RETINSTR(cc, r14) - b PLTJMP(SYSCALL_ERROR) - -#if defined NEED_CANCELLATION && defined CENABLE -1: - str lr, [sp, #-4]! - CENABLE - mov ip, r0 - - mov r0, #P(SOCKOP_,socket) - add r1, sp, #4 - swi SYS_ify(socketcall) - - str r0, [sp, #-4]! - mov r0, ip - CDISABLE - ldr r0, [sp], #4 - ldr lr, [sp], #4 - - P(POPARGS_,NARGS) - - /* r0 is < 0 if there was an error. */ - cmn r0, $124 - RETINSTR(cc, r14) - b PLTJMP(SYSCALL_ERROR) -#endif - -PSEUDO_END (__socket) - -#ifndef NO_WEAK_ALIAS -weak_alias (__socket, socket) -#endif diff --git a/sysdeps/unix/sysv/linux/arm/eabi/swapcontext.S b/sysdeps/unix/sysv/linux/arm/swapcontext.S similarity index 100% rename from sysdeps/unix/sysv/linux/arm/eabi/swapcontext.S rename to sysdeps/unix/sysv/linux/arm/swapcontext.S diff --git a/sysdeps/unix/sysv/linux/arm/eabi/syscall.S b/sysdeps/unix/sysv/linux/arm/syscall.S similarity index 100% rename from sysdeps/unix/sysv/linux/arm/eabi/syscall.S rename to sysdeps/unix/sysv/linux/arm/syscall.S diff --git a/sysdeps/unix/sysv/linux/arm/syscalls.list b/sysdeps/unix/sysv/linux/arm/syscalls.list index 820602b791..b8852d9406 100644 --- a/sysdeps/unix/sysv/linux/arm/syscalls.list +++ b/sysdeps/unix/sysv/linux/arm/syscalls.list @@ -1,9 +1,36 @@ # File name Caller Syscall name # args Strong name Weak names -syscall - syscall 7 syscall -oldgetrlimit EXTRA getrlimit i:ip __old_getrlimit getrlimit@GLIBC_2.0 -oldsetrlimit EXTRA setrlimit i:ip __old_setrlimit setrlimit@GLIBC_2.0 - prlimit64 EXTRA prlimit64 i:iipp prlimit64 fanotify_mark EXTRA fanotify_mark i:iiiiis fanotify_mark + +# Semaphore and shm system calls. msgctl, shmctl, and semctl have C +# wrappers (to set __IPC_64). +msgget - msgget i:ii __msgget msgget +msgrcv - msgrcv Ci:ibnii __msgrcv msgrcv +msgsnd - msgsnd Ci:ibni __msgsnd msgsnd +shmat - shmat i:ipi __shmat shmat +shmdt - shmdt i:s __shmdt shmdt +shmget - shmget i:iii __shmget shmget +semop - semop i:ipi __semop semop +semtimedop - semtimedop i:ipip semtimedop +semget - semget i:iii __semget semget + +# proper socket implementations: +accept - accept Ci:iBN __libc_accept __accept accept +bind - bind i:ipi __bind bind +connect - connect Ci:ipi __libc_connect __connect_internal __connect connect +getpeername - getpeername i:ipp __getpeername getpeername +getsockname - getsockname i:ipp __getsockname getsockname +getsockopt - getsockopt i:iiiBN __getsockopt getsockopt +listen - listen i:ii __listen listen +recv - recv Ci:ibni __libc_recv __recv recv +recvfrom - recvfrom Ci:ibniBN __libc_recvfrom __recvfrom recvfrom +recvmsg - recvmsg Ci:ipi __libc_recvmsg __recvmsg recvmsg +send - send Ci:ibni __libc_send __send send +sendmsg - sendmsg Ci:ipi __libc_sendmsg __sendmsg sendmsg +sendto - sendto Ci:ibnibn __libc_sendto __sendto sendto +setsockopt - setsockopt i:iiibn __setsockopt setsockopt +shutdown - shutdown i:ii __shutdown shutdown +socket - socket i:iii __socket socket +socketpair - socketpair i:iiif __socketpair socketpair diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index 4d08ea9e4e..be67c211d7 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -1,5 +1,4 @@ -/* Copyright (C) 1992, 93, 1995-2000, 2002, 2003, 2005, 2006, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1992-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, , August 1995. ARM changes by Philip Blundell, , May 1997. @@ -29,6 +28,16 @@ #include +#if __NR_SYSCALL_BASE != 0 +# error Kernel headers are too old +#endif + +/* Don't use stime, even if the kernel headers define it. We have + settimeofday, and some EABI kernels have removed stime. Similarly + use setitimer to implement alarm. */ +#undef __NR_stime +#undef __NR_alarm + /* In order to get __set_errno() definition in INLINE_SYSCALL. */ #ifndef __ASSEMBLER__ #include @@ -163,8 +172,14 @@ __local_syscall_error: \ # define SYSCALL_ERROR __syscall_error #endif +/* The ARM EABI user interface passes the syscall number in r7, instead + of in the swi. This is more efficient, because the kernel does not need + to fetch the swi from memory to find out the number; which can be painful + with separate I-cache and D-cache. Make sure to use 0 for the SWI + argument; otherwise the (optional) compatibility code for APCS binaries + may be invoked. */ + /* Linux takes system call args in registers: - syscall number in the SWI instruction arg 1 r0 arg 2 r1 arg 3 r2 @@ -190,58 +205,111 @@ __local_syscall_error: \ */ +/* We must save and restore r7 (call-saved) for the syscall number. + We never make function calls from inside here (only potentially + signal handlers), so we do not bother with doubleword alignment. + + Just like the APCS syscall convention, the EABI syscall convention uses + r0 through r6 for up to seven syscall arguments. None are ever passed to + the kernel on the stack, although incoming arguments are on the stack for + syscalls with five or more arguments. + + The assembler will convert the literal pool load to a move for most + syscalls. */ + #undef DO_CALL #define DO_CALL(syscall_name, args) \ DOARGS_##args; \ - swi SYS_ify (syscall_name); \ + ldr r7, =SYS_ify (syscall_name); \ + swi 0x0; \ UNDOARGS_##args -#define DOARGS_0 /* nothing */ -#define DOARGS_1 /* nothing */ -#define DOARGS_2 /* nothing */ -#define DOARGS_3 /* nothing */ -#define DOARGS_4 /* nothing */ -#define DOARGS_5 \ - str r4, [sp, $-4]!; \ +#undef DOARGS_0 +#define DOARGS_0 \ + .fnstart; \ + str r7, [sp, #-4]!; \ cfi_adjust_cfa_offset (4); \ + cfi_rel_offset (r7, 0); \ + .save { r7 } +#undef DOARGS_1 +#define DOARGS_1 DOARGS_0 +#undef DOARGS_2 +#define DOARGS_2 DOARGS_0 +#undef DOARGS_3 +#define DOARGS_3 DOARGS_0 +#undef DOARGS_4 +#define DOARGS_4 DOARGS_0 +#undef DOARGS_5 +#define DOARGS_5 \ + .fnstart; \ + stmfd sp!, {r4, r7}; \ + cfi_adjust_cfa_offset (8); \ cfi_rel_offset (r4, 0); \ - ldr r4, [sp, $4] + cfi_rel_offset (r7, 4); \ + .save { r4, r7 }; \ + ldr r4, [sp, #8] +#undef DOARGS_6 #define DOARGS_6 \ + .fnstart; \ mov ip, sp; \ - stmfd sp!, {r4, r5}; \ - cfi_adjust_cfa_offset (8); \ + stmfd sp!, {r4, r5, r7}; \ + cfi_adjust_cfa_offset (12); \ cfi_rel_offset (r4, 0); \ cfi_rel_offset (r5, 4); \ + cfi_rel_offset (r7, 8); \ + .save { r4, r5, r7 }; \ ldmia ip, {r4, r5} +#undef DOARGS_7 #define DOARGS_7 \ + .fnstart; \ mov ip, sp; \ - stmfd sp!, {r4, r5, r6}; \ - cfi_adjust_cfa_offset (12); \ + stmfd sp!, {r4, r5, r6, r7}; \ + cfi_adjust_cfa_offset (16); \ cfi_rel_offset (r4, 0); \ cfi_rel_offset (r5, 4); \ cfi_rel_offset (r6, 8); \ + cfi_rel_offset (r7, 12); \ + .save { r4, r5, r6, r7 }; \ ldmia ip, {r4, r5, r6} -#define UNDOARGS_0 /* nothing */ -#define UNDOARGS_1 /* nothing */ -#define UNDOARGS_2 /* nothing */ -#define UNDOARGS_3 /* nothing */ -#define UNDOARGS_4 /* nothing */ -#define UNDOARGS_5 \ - ldr r4, [sp], $4; \ +#undef UNDOARGS_0 +#define UNDOARGS_0 \ + ldr r7, [sp], #4; \ cfi_adjust_cfa_offset (-4); \ - cfi_restore (r4) -#define UNDOARGS_6 \ - ldmfd sp!, {r4, r5}; \ + cfi_restore (r7); \ + .fnend +#undef UNDOARGS_1 +#define UNDOARGS_1 UNDOARGS_0 +#undef UNDOARGS_2 +#define UNDOARGS_2 UNDOARGS_0 +#undef UNDOARGS_3 +#define UNDOARGS_3 UNDOARGS_0 +#undef UNDOARGS_4 +#define UNDOARGS_4 UNDOARGS_0 +#undef UNDOARGS_5 +#define UNDOARGS_5 \ + ldmfd sp!, {r4, r7}; \ cfi_adjust_cfa_offset (-8); \ cfi_restore (r4); \ - cfi_restore (r5) -#define UNDOARGS_7 \ - ldmfd sp!, {r4, r5, r6}; \ + cfi_restore (r7); \ + .fnend +#undef UNDOARGS_6 +#define UNDOARGS_6 \ + ldmfd sp!, {r4, r5, r7}; \ cfi_adjust_cfa_offset (-12); \ cfi_restore (r4); \ cfi_restore (r5); \ - cfi_restore (r6) + cfi_restore (r7); \ + .fnend +#undef UNDOARGS_7 +#define UNDOARGS_7 \ + ldmfd sp!, {r4, r5, r6, r7}; \ + cfi_adjust_cfa_offset (-16); \ + cfi_restore (r4); \ + cfi_restore (r5); \ + cfi_restore (r6); \ + cfi_restore (r7); \ + .fnend #else /* not __ASSEMBLER__ */ @@ -260,19 +328,46 @@ __local_syscall_error: \ #undef INTERNAL_SYSCALL_DECL #define INTERNAL_SYSCALL_DECL(err) do { } while (0) -#undef INTERNAL_SYSCALL_RAW -#define INTERNAL_SYSCALL_RAW(name, err, nr, args...) \ - ({ unsigned int _sys_result; \ - { \ - register int _a1 asm ("a1"); \ +#if defined(__thumb__) +/* We can not expose the use of r7 to the compiler. GCC (as + of 4.5) uses r7 as the hard frame pointer for Thumb - although + for Thumb-2 it isn't obviously a better choice than r11. + And GCC does not support asms that conflict with the frame + pointer. + + This would be easier if syscall numbers never exceeded 255, + but they do. For the moment the LOAD_ARGS_7 is sacrificed. + We can't use push/pop inside the asm because that breaks + unwinding (i.e. thread cancellation) for this frame. We can't + locally save and restore r7, because we do not know if this + function uses r7 or if it is our caller's r7; if it is our caller's, + then unwinding will fail higher up the stack. So we move the + syscall out of line and provide its own unwind information. */ +# undef INTERNAL_SYSCALL_RAW +# define INTERNAL_SYSCALL_RAW(name, err, nr, args...) \ + ({ \ + register int _a1 asm ("a1"); \ + int _nametmp = name; \ + LOAD_ARGS_##nr (args) \ + register int _name asm ("ip") = _nametmp; \ + asm volatile ("bl __libc_do_syscall" \ + : "=r" (_a1) \ + : "r" (_name) ASM_ARGS_##nr \ + : "memory", "lr"); \ + _a1; }) +#else /* ARM */ +# undef INTERNAL_SYSCALL_RAW +# define INTERNAL_SYSCALL_RAW(name, err, nr, args...) \ + ({ \ + register int _a1 asm ("r0"), _nr asm ("r7"); \ LOAD_ARGS_##nr (args) \ - asm volatile ("swi %1 @ syscall " #name \ + _nr = name; \ + asm volatile ("swi 0x0 @ syscall " #name \ : "=r" (_a1) \ - : "i" (name) ASM_ARGS_##nr \ + : "r" (_nr) ASM_ARGS_##nr \ : "memory"); \ - _sys_result = _a1; \ - } \ - (int) _sys_result; }) + _a1; }) +#endif #undef INTERNAL_SYSCALL #define INTERNAL_SYSCALL(name, err, nr, args...) \ @@ -321,29 +416,18 @@ __local_syscall_error: \ LOAD_ARGS_5 (a1, a2, a3, a4, a5) \ register int _v2 asm ("v2") = _v2tmp; #define ASM_ARGS_6 ASM_ARGS_5, "r" (_v2) -#define LOAD_ARGS_7(a1, a2, a3, a4, a5, a6, a7) \ - int _v3tmp = (int) (a7); \ - LOAD_ARGS_6 (a1, a2, a3, a4, a5, a6) \ +#ifndef __thumb__ +# define LOAD_ARGS_7(a1, a2, a3, a4, a5, a6, a7) \ + int _v3tmp = (int) (a7); \ + LOAD_ARGS_6 (a1, a2, a3, a4, a5, a6) \ register int _v3 asm ("v3") = _v3tmp; -#define ASM_ARGS_7 ASM_ARGS_6, "r" (_v3) - -/* We can't implement non-constant syscalls directly since the syscall - number is normally encoded in the instruction. So use SYS_syscall. */ -#define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \ - INTERNAL_SYSCALL_NCS_##nr (number, err, args) - -#define INTERNAL_SYSCALL_NCS_0(number, err, args...) \ - INTERNAL_SYSCALL (syscall, err, 1, number, args) -#define INTERNAL_SYSCALL_NCS_1(number, err, args...) \ - INTERNAL_SYSCALL (syscall, err, 2, number, args) -#define INTERNAL_SYSCALL_NCS_2(number, err, args...) \ - INTERNAL_SYSCALL (syscall, err, 3, number, args) -#define INTERNAL_SYSCALL_NCS_3(number, err, args...) \ - INTERNAL_SYSCALL (syscall, err, 4, number, args) -#define INTERNAL_SYSCALL_NCS_4(number, err, args...) \ - INTERNAL_SYSCALL (syscall, err, 5, number, args) -#define INTERNAL_SYSCALL_NCS_5(number, err, args...) \ - INTERNAL_SYSCALL (syscall, err, 6, number, args) +# define ASM_ARGS_7 ASM_ARGS_6, "r" (_v3) +#endif + +/* For EABI, non-constant syscalls are actually pretty easy... */ +#undef INTERNAL_SYSCALL_NCS +#define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \ + INTERNAL_SYSCALL_RAW (number, err, nr, args) #endif /* __ASSEMBLER__ */ diff --git a/sysdeps/unix/sysv/linux/arm/eabi/truncate64.c b/sysdeps/unix/sysv/linux/arm/truncate64.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/eabi/truncate64.c rename to sysdeps/unix/sysv/linux/arm/truncate64.c diff --git a/sysdeps/unix/sysv/linux/arm/eabi/umount.c b/sysdeps/unix/sysv/linux/arm/umount.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/eabi/umount.c rename to sysdeps/unix/sysv/linux/arm/umount.c diff --git a/sysdeps/unix/sysv/linux/mips/mips32/readahead.c b/sysdeps/unix/sysv/linux/mips/mips32/readahead.c index b5b967ce96..80170c3e8a 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/readahead.c +++ b/sysdeps/unix/sysv/linux/mips/mips32/readahead.c @@ -1 +1 @@ -#include +#include From 1f60a18d81fe045ed611079ef1e9090ac89e6133 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sat, 21 Apr 2012 09:30:03 -0700 Subject: [PATCH 4292/4487] Merge sysdeps/arm/eabi into sysdeps/arm. --- ChangeLog.arm | 109 ++++++++++++++++++ sysdeps/arm/Makefile | 27 ++++- sysdeps/arm/{eabi => }/Versions | 0 sysdeps/arm/{eabi => }/__longjmp.S | 0 sysdeps/arm/{eabi => }/abi-note.S | 0 sysdeps/arm/{eabi => }/aeabi_assert.c | 0 sysdeps/arm/{eabi => }/aeabi_atexit.c | 0 sysdeps/arm/{eabi => }/aeabi_errno_addr.c | 0 sysdeps/arm/{eabi => }/aeabi_lcsts.c | 0 sysdeps/arm/{eabi => }/aeabi_localeconv.c | 0 sysdeps/arm/{eabi => }/aeabi_math.c | 0 sysdeps/arm/{eabi => }/aeabi_mb_cur_max.c | 0 sysdeps/arm/{eabi => }/aeabi_memclr.c | 0 sysdeps/arm/{eabi => }/aeabi_memcpy.c | 0 sysdeps/arm/{eabi => }/aeabi_memmove.c | 0 sysdeps/arm/{eabi => }/aeabi_memset.c | 0 sysdeps/arm/{eabi => }/aeabi_sighandlers.S | 0 sysdeps/arm/{eabi => }/aeabi_unwind_cpp_pr1.c | 0 sysdeps/arm/{eabi => }/arm-mcount.S | 0 sysdeps/arm/{eabi => }/armv6t2/memchr.S | 0 sysdeps/arm/{eabi => }/armv7/Implies | 2 +- sysdeps/arm/{eabi => }/backtrace.c | 0 sysdeps/arm/{eabi => }/bits/fenv.h | 0 sysdeps/arm/{eabi => }/bits/huge_val.h | 0 sysdeps/arm/{eabi => }/bits/setjmp.h | 0 sysdeps/arm/eabi/Makefile | 30 ----- sysdeps/arm/{eabi => }/fclrexcpt.c | 0 sysdeps/arm/{eabi => }/fedisblxcpt.c | 0 sysdeps/arm/{eabi => }/feenablxcpt.c | 0 sysdeps/arm/{eabi => }/fegetenv.c | 0 sysdeps/arm/{eabi => }/fegetexcept.c | 0 sysdeps/arm/{eabi => }/fegetround.c | 0 sysdeps/arm/{eabi => }/feholdexcpt.c | 0 sysdeps/arm/{eabi => }/fesetenv.c | 0 sysdeps/arm/{eabi => }/fesetround.c | 0 sysdeps/arm/{eabi => }/feupdateenv.c | 0 sysdeps/arm/{eabi => }/fgetexcptflg.c | 0 sysdeps/arm/{eabi => }/find_exidx.c | 0 sysdeps/arm/{eabi => }/fpu_control.h | 0 sysdeps/arm/{eabi => }/fraiseexcpt.c | 0 sysdeps/arm/{eabi => }/fsetexcptflg.c | 0 sysdeps/arm/{eabi => }/ftestexcept.c | 0 sysdeps/arm/{eabi => }/jmpbuf-offsets.h | 0 sysdeps/arm/{eabi => }/machine-gmon.h | 0 sysdeps/arm/preconfigure | 4 +- .../arm/{eabi => }/rtld-global-offsets.sym | 0 sysdeps/arm/{eabi => }/setfpucw.c | 0 sysdeps/arm/{eabi => }/setjmp.S | 0 sysdeps/unix/sysv/linux/arm/getcontext.S | 2 +- sysdeps/unix/sysv/linux/arm/setcontext.S | 2 +- 50 files changed, 138 insertions(+), 38 deletions(-) rename sysdeps/arm/{eabi => }/Versions (100%) rename sysdeps/arm/{eabi => }/__longjmp.S (100%) rename sysdeps/arm/{eabi => }/abi-note.S (100%) rename sysdeps/arm/{eabi => }/aeabi_assert.c (100%) rename sysdeps/arm/{eabi => }/aeabi_atexit.c (100%) rename sysdeps/arm/{eabi => }/aeabi_errno_addr.c (100%) rename sysdeps/arm/{eabi => }/aeabi_lcsts.c (100%) rename sysdeps/arm/{eabi => }/aeabi_localeconv.c (100%) rename sysdeps/arm/{eabi => }/aeabi_math.c (100%) rename sysdeps/arm/{eabi => }/aeabi_mb_cur_max.c (100%) rename sysdeps/arm/{eabi => }/aeabi_memclr.c (100%) rename sysdeps/arm/{eabi => }/aeabi_memcpy.c (100%) rename sysdeps/arm/{eabi => }/aeabi_memmove.c (100%) rename sysdeps/arm/{eabi => }/aeabi_memset.c (100%) rename sysdeps/arm/{eabi => }/aeabi_sighandlers.S (100%) rename sysdeps/arm/{eabi => }/aeabi_unwind_cpp_pr1.c (100%) rename sysdeps/arm/{eabi => }/arm-mcount.S (100%) rename sysdeps/arm/{eabi => }/armv6t2/memchr.S (100%) rename sysdeps/arm/{eabi => }/armv7/Implies (67%) rename sysdeps/arm/{eabi => }/backtrace.c (100%) rename sysdeps/arm/{eabi => }/bits/fenv.h (100%) rename sysdeps/arm/{eabi => }/bits/huge_val.h (100%) rename sysdeps/arm/{eabi => }/bits/setjmp.h (100%) delete mode 100644 sysdeps/arm/eabi/Makefile rename sysdeps/arm/{eabi => }/fclrexcpt.c (100%) rename sysdeps/arm/{eabi => }/fedisblxcpt.c (100%) rename sysdeps/arm/{eabi => }/feenablxcpt.c (100%) rename sysdeps/arm/{eabi => }/fegetenv.c (100%) rename sysdeps/arm/{eabi => }/fegetexcept.c (100%) rename sysdeps/arm/{eabi => }/fegetround.c (100%) rename sysdeps/arm/{eabi => }/feholdexcpt.c (100%) rename sysdeps/arm/{eabi => }/fesetenv.c (100%) rename sysdeps/arm/{eabi => }/fesetround.c (100%) rename sysdeps/arm/{eabi => }/feupdateenv.c (100%) rename sysdeps/arm/{eabi => }/fgetexcptflg.c (100%) rename sysdeps/arm/{eabi => }/find_exidx.c (100%) rename sysdeps/arm/{eabi => }/fpu_control.h (100%) rename sysdeps/arm/{eabi => }/fraiseexcpt.c (100%) rename sysdeps/arm/{eabi => }/fsetexcptflg.c (100%) rename sysdeps/arm/{eabi => }/ftestexcept.c (100%) rename sysdeps/arm/{eabi => }/jmpbuf-offsets.h (100%) rename sysdeps/arm/{eabi => }/machine-gmon.h (100%) rename sysdeps/arm/{eabi => }/rtld-global-offsets.sym (100%) rename sysdeps/arm/{eabi => }/setfpucw.c (100%) rename sysdeps/arm/{eabi => }/setjmp.S (100%) diff --git a/ChangeLog.arm b/ChangeLog.arm index 43a595dc71..d6489271b1 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,5 +1,114 @@ 2012-04-21 Joseph Myers + [BZ #13556] + * sysdeps/arm/preconfigure: Don't include /eabi in $machine. + * sysdeps/arm/Makefile [subdir = elf] (sysdep_routines): Add + setting from eabi/Makefile. + [subdir = elf] (sysdep-rtld-routines): Likewise. + [subdir = elf] (shared-only-routines): Likewise. + [subdir = csu] (gen-as-const-headers): Likewise. + [subdir = csu] (aeabi_constants): Likewise. + [subdir = csu] (aeabi_routines): Likewise. + [subdir = csu] (sysdep_routines): Likewise. + [subdir = csu] (static-only-routines): Likewise. + [subdir = gmon] (sysdep_routines): Likewise. + [subdir = debug] (CFLAGS-backtrace.c): Likewise. + [subdir = math] ($(objpfx)libm.so): Add dependency from + eabi/Makefile. + * sysdeps/arm/eabi/Makefile: Remove. + * sysdeps/arm/eabi/Versions: Move to ... + * sysdeps/arm/Versions: ... here. + * sysdeps/arm/eabi/__longjmp.S: Move to ... + * sysdeps/arm/__longjmp.S: ... here. + * sysdeps/arm/eabi/abi-note.S: Move to ... + * sysdeps/arm/abi-note.S: ... here. + * sysdeps/arm/eabi/aeabi_assert.c: Move to ... + * sysdeps/arm/aeabi_assert.c: ... here. + * sysdeps/arm/eabi/aeabi_atexit.c: Move to ... + * sysdeps/arm/aeabi_atexit.c: ... here. + * sysdeps/arm/eabi/aeabi_errno_addr.c: Move to ... + * sysdeps/arm/aeabi_errno_addr.c: ... here. + * sysdeps/arm/eabi/aeabi_lcsts.c: Move to ... + * sysdeps/arm/aeabi_lcsts.c: ... here. + * sysdeps/arm/eabi/aeabi_localeconv.c: Move to ... + * sysdeps/arm/aeabi_localeconv.c: ... here. + * sysdeps/arm/eabi/aeabi_math.c: Move to ... + * sysdeps/arm/aeabi_math.c: ... here. + * sysdeps/arm/eabi/aeabi_mb_cur_max.c: Move to ... + * sysdeps/arm/aeabi_mb_cur_max.c: ... here. + * sysdeps/arm/eabi/aeabi_memclr.c: Move to ... + * sysdeps/arm/aeabi_memclr.c: ... here. + * sysdeps/arm/eabi/aeabi_memcpy.c: Move to ... + * sysdeps/arm/aeabi_memcpy.c: ... here. + * sysdeps/arm/eabi/aeabi_memmove.c: Move to ... + * sysdeps/arm/aeabi_memmove.c: ... here. + * sysdeps/arm/eabi/aeabi_memset.c: Move to ... + * sysdeps/arm/aeabi_memset.c: ... here. + * sysdeps/arm/eabi/aeabi_sighandlers.S: Move to ... + * sysdeps/arm/aeabi_sighandlers.S: ... here. + * sysdeps/arm/eabi/aeabi_unwind_cpp_pr1.c: Move to ... + * sysdeps/arm/aeabi_unwind_cpp_pr1.c: ... here. + * sysdeps/arm/eabi/arm-mcount.S: Move to ... + * sysdeps/arm/arm-mcount.S: ... here. + * sysdeps/arm/eabi/backtrace.c: Move to ... + * sysdeps/arm/backtrace.c: ... here. + * sysdeps/arm/eabi/fclrexcpt.c: Move to ... + * sysdeps/arm/fclrexcpt.c: ... here. + * sysdeps/arm/eabi/fedisblxcpt.c: Move to ... + * sysdeps/arm/fedisblxcpt.c: ... here. + * sysdeps/arm/eabi/feenablxcpt.c: Move to ... + * sysdeps/arm/feenablxcpt.c: ... here. + * sysdeps/arm/eabi/fegetenv.c: Move to ... + * sysdeps/arm/fegetenv.c: ... here. + * sysdeps/arm/eabi/fegetexcept.c: Move to ... + * sysdeps/arm/fegetexcept.c: ... here. + * sysdeps/arm/eabi/fegetround.c: Move to ... + * sysdeps/arm/fegetround.c: ... here. + * sysdeps/arm/eabi/feholdexcpt.c: Move to ... + * sysdeps/arm/feholdexcpt.c: ... here. + * sysdeps/arm/eabi/fesetenv.c: Move to ... + * sysdeps/arm/fesetenv.c: ... here. + * sysdeps/arm/eabi/fesetround.c: Move to ... + * sysdeps/arm/fesetround.c: ... here. + * sysdeps/arm/eabi/feupdateenv.c: Move to ... + * sysdeps/arm/feupdateenv.c: ... here. + * sysdeps/arm/eabi/fgetexcptflg.c: Move to ... + * sysdeps/arm/fgetexcptflg.c: ... here. + * sysdeps/arm/eabi/find_exidx.c: Move to ... + * sysdeps/arm/find_exidx.c: ... here. + * sysdeps/arm/eabi/fpu_control.h: Move to ... + * sysdeps/arm/fpu_control.h: ... here. + * sysdeps/arm/eabi/fraiseexcpt.c: Move to ... + * sysdeps/arm/fraiseexcpt.c: ... here. + * sysdeps/arm/eabi/fsetexcptflg.c: Move to ... + * sysdeps/arm/fsetexcptflg.c: ... here. + * sysdeps/arm/eabi/ftestexcept.c: Move to ... + * sysdeps/arm/ftestexcept.c: ... here. + * sysdeps/arm/eabi/jmpbuf-offsets.h: Move to ... + * sysdeps/arm/jmpbuf-offsets.h: ... here. + * sysdeps/arm/eabi/machine-gmon.h: Move to ... + * sysdeps/arm/machine-gmon.h: ... here. + * sysdeps/arm/eabi/rtld-global-offsets.sym: Move to ... + * sysdeps/arm/rtld-global-offsets.sym: ... here. + * sysdeps/arm/eabi/setfpucw.c: Move to ... + * sysdeps/arm/setfpucw.c: ... here. + * sysdeps/arm/eabi/setjmp.S: Move to ... + * sysdeps/arm/setjmp.S: ... here. + * sysdeps/arm/eabi/armv6t2/memchr.S: Move to ... + * sysdeps/arm/armv6t2/memchr.S: ... here. + * sysdeps/arm/eabi/armv7/Implies: Move to ... + * sysdeps/arm/armv7/Implies: ... here. Remove /eabi from implied + directory. + * sysdeps/arm/eabi/bits/fenv.h: Move to ... + * sysdeps/arm/bits/fenv.h: ... here. + * sysdeps/arm/eabi/bits/huge_val.h: Move to ... + * sysdeps/arm/bits/huge_val.h: ... here. + * sysdeps/arm/eabi/bits/setjmp.h: Move to ... + * sysdeps/arm/bits/setjmp.h: ... here. + * sysdeps/unix/sysv/linux/arm/getcontext.S: Update directory name + in comment. + * sysdeps/unix/sysv/linux/arm/setcontext.S: Likewise. + [BZ #13556] * sysdeps/unix/sysv/linux/arm/socket.S: Remove. * sysdeps/unix/sysv/linux/arm/syscalls.list (syscall): Remove. diff --git a/sysdeps/arm/Makefile b/sysdeps/arm/Makefile index 1a88430a2c..5fd5136328 100644 --- a/sysdeps/arm/Makefile +++ b/sysdeps/arm/Makefile @@ -1,14 +1,35 @@ ifeq ($(subdir),elf) sysdep-dl-routines += tlsdesc dl-tlsdesc -sysdep_routines += tlsdesc dl-tlsdesc -sysdep-rtld-routines += tlsdesc dl-tlsdesc +sysdep_routines += aeabi_unwind_cpp_pr1 find_exidx tlsdesc dl-tlsdesc +sysdep-rtld-routines += aeabi_unwind_cpp_pr1 tlsdesc dl-tlsdesc +shared-only-routines += aeabi_unwind_cpp_pr1 endif ifeq ($(subdir),csu) -gen-as-const-headers += tlsdesc.sym +# get offset to rtld_global._dl_hwcap +gen-as-const-headers += rtld-global-offsets.sym tlsdesc.sym +aeabi_constants = aeabi_lcsts aeabi_sighandlers aeabi_math +aeabi_routines = aeabi_assert aeabi_localeconv aeabi_errno_addr \ + aeabi_mb_cur_max aeabi_atexit aeabi_memclr aeabi_memcpy \ + aeabi_memmove aeabi_memset + +sysdep_routines += $(aeabi_constants) $(aeabi_routines) +static-only-routines += $(aeabi_constants) endif # to pull in __aeabi_read_tp, needed for tls ifeq ($(subdir),malloc) $(objpfx)libmemusage.so: $(common-objpfx)libc_nonshared.a endif + +ifeq ($(subdir),gmon) +sysdep_routines += arm-mcount +endif + +ifeq ($(subdir),debug) +CFLAGS-backtrace.c += -funwind-tables +endif + +ifeq ($(subdir),math) +$(objpfx)libm.so: $(elfobjdir)/ld.so +endif diff --git a/sysdeps/arm/eabi/Versions b/sysdeps/arm/Versions similarity index 100% rename from sysdeps/arm/eabi/Versions rename to sysdeps/arm/Versions diff --git a/sysdeps/arm/eabi/__longjmp.S b/sysdeps/arm/__longjmp.S similarity index 100% rename from sysdeps/arm/eabi/__longjmp.S rename to sysdeps/arm/__longjmp.S diff --git a/sysdeps/arm/eabi/abi-note.S b/sysdeps/arm/abi-note.S similarity index 100% rename from sysdeps/arm/eabi/abi-note.S rename to sysdeps/arm/abi-note.S diff --git a/sysdeps/arm/eabi/aeabi_assert.c b/sysdeps/arm/aeabi_assert.c similarity index 100% rename from sysdeps/arm/eabi/aeabi_assert.c rename to sysdeps/arm/aeabi_assert.c diff --git a/sysdeps/arm/eabi/aeabi_atexit.c b/sysdeps/arm/aeabi_atexit.c similarity index 100% rename from sysdeps/arm/eabi/aeabi_atexit.c rename to sysdeps/arm/aeabi_atexit.c diff --git a/sysdeps/arm/eabi/aeabi_errno_addr.c b/sysdeps/arm/aeabi_errno_addr.c similarity index 100% rename from sysdeps/arm/eabi/aeabi_errno_addr.c rename to sysdeps/arm/aeabi_errno_addr.c diff --git a/sysdeps/arm/eabi/aeabi_lcsts.c b/sysdeps/arm/aeabi_lcsts.c similarity index 100% rename from sysdeps/arm/eabi/aeabi_lcsts.c rename to sysdeps/arm/aeabi_lcsts.c diff --git a/sysdeps/arm/eabi/aeabi_localeconv.c b/sysdeps/arm/aeabi_localeconv.c similarity index 100% rename from sysdeps/arm/eabi/aeabi_localeconv.c rename to sysdeps/arm/aeabi_localeconv.c diff --git a/sysdeps/arm/eabi/aeabi_math.c b/sysdeps/arm/aeabi_math.c similarity index 100% rename from sysdeps/arm/eabi/aeabi_math.c rename to sysdeps/arm/aeabi_math.c diff --git a/sysdeps/arm/eabi/aeabi_mb_cur_max.c b/sysdeps/arm/aeabi_mb_cur_max.c similarity index 100% rename from sysdeps/arm/eabi/aeabi_mb_cur_max.c rename to sysdeps/arm/aeabi_mb_cur_max.c diff --git a/sysdeps/arm/eabi/aeabi_memclr.c b/sysdeps/arm/aeabi_memclr.c similarity index 100% rename from sysdeps/arm/eabi/aeabi_memclr.c rename to sysdeps/arm/aeabi_memclr.c diff --git a/sysdeps/arm/eabi/aeabi_memcpy.c b/sysdeps/arm/aeabi_memcpy.c similarity index 100% rename from sysdeps/arm/eabi/aeabi_memcpy.c rename to sysdeps/arm/aeabi_memcpy.c diff --git a/sysdeps/arm/eabi/aeabi_memmove.c b/sysdeps/arm/aeabi_memmove.c similarity index 100% rename from sysdeps/arm/eabi/aeabi_memmove.c rename to sysdeps/arm/aeabi_memmove.c diff --git a/sysdeps/arm/eabi/aeabi_memset.c b/sysdeps/arm/aeabi_memset.c similarity index 100% rename from sysdeps/arm/eabi/aeabi_memset.c rename to sysdeps/arm/aeabi_memset.c diff --git a/sysdeps/arm/eabi/aeabi_sighandlers.S b/sysdeps/arm/aeabi_sighandlers.S similarity index 100% rename from sysdeps/arm/eabi/aeabi_sighandlers.S rename to sysdeps/arm/aeabi_sighandlers.S diff --git a/sysdeps/arm/eabi/aeabi_unwind_cpp_pr1.c b/sysdeps/arm/aeabi_unwind_cpp_pr1.c similarity index 100% rename from sysdeps/arm/eabi/aeabi_unwind_cpp_pr1.c rename to sysdeps/arm/aeabi_unwind_cpp_pr1.c diff --git a/sysdeps/arm/eabi/arm-mcount.S b/sysdeps/arm/arm-mcount.S similarity index 100% rename from sysdeps/arm/eabi/arm-mcount.S rename to sysdeps/arm/arm-mcount.S diff --git a/sysdeps/arm/eabi/armv6t2/memchr.S b/sysdeps/arm/armv6t2/memchr.S similarity index 100% rename from sysdeps/arm/eabi/armv6t2/memchr.S rename to sysdeps/arm/armv6t2/memchr.S diff --git a/sysdeps/arm/eabi/armv7/Implies b/sysdeps/arm/armv7/Implies similarity index 67% rename from sysdeps/arm/eabi/armv7/Implies rename to sysdeps/arm/armv7/Implies index 8a784407f7..c6cd0eb877 100644 --- a/sysdeps/arm/eabi/armv7/Implies +++ b/sysdeps/arm/armv7/Implies @@ -1,2 +1,2 @@ # We can do everything that 6T2 can -arm/eabi/armv6t2 +arm/armv6t2 diff --git a/sysdeps/arm/eabi/backtrace.c b/sysdeps/arm/backtrace.c similarity index 100% rename from sysdeps/arm/eabi/backtrace.c rename to sysdeps/arm/backtrace.c diff --git a/sysdeps/arm/eabi/bits/fenv.h b/sysdeps/arm/bits/fenv.h similarity index 100% rename from sysdeps/arm/eabi/bits/fenv.h rename to sysdeps/arm/bits/fenv.h diff --git a/sysdeps/arm/eabi/bits/huge_val.h b/sysdeps/arm/bits/huge_val.h similarity index 100% rename from sysdeps/arm/eabi/bits/huge_val.h rename to sysdeps/arm/bits/huge_val.h diff --git a/sysdeps/arm/eabi/bits/setjmp.h b/sysdeps/arm/bits/setjmp.h similarity index 100% rename from sysdeps/arm/eabi/bits/setjmp.h rename to sysdeps/arm/bits/setjmp.h diff --git a/sysdeps/arm/eabi/Makefile b/sysdeps/arm/eabi/Makefile deleted file mode 100644 index 025465ad2a..0000000000 --- a/sysdeps/arm/eabi/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -ifeq ($(subdir),csu) -aeabi_constants = aeabi_lcsts aeabi_sighandlers aeabi_math -aeabi_routines = aeabi_assert aeabi_localeconv aeabi_errno_addr \ - aeabi_mb_cur_max aeabi_atexit aeabi_memclr aeabi_memcpy \ - aeabi_memmove aeabi_memset - -sysdep_routines += $(aeabi_constants) $(aeabi_routines) -static-only-routines += $(aeabi_constants) - -# get offset to rtld_global._dl_hwcap -gen-as-const-headers += rtld-global-offsets.sym -endif - -ifeq ($(subdir),gmon) -sysdep_routines += arm-mcount -endif - -ifeq ($(subdir),debug) -CFLAGS-backtrace.c += -funwind-tables -endif - -ifeq ($(subdir),elf) -sysdep_routines += aeabi_unwind_cpp_pr1 find_exidx -shared-only-routines += aeabi_unwind_cpp_pr1 -sysdep-rtld-routines += aeabi_unwind_cpp_pr1 -endif - -ifeq ($(subdir),math) -$(objpfx)libm.so: $(elfobjdir)/ld.so -endif diff --git a/sysdeps/arm/eabi/fclrexcpt.c b/sysdeps/arm/fclrexcpt.c similarity index 100% rename from sysdeps/arm/eabi/fclrexcpt.c rename to sysdeps/arm/fclrexcpt.c diff --git a/sysdeps/arm/eabi/fedisblxcpt.c b/sysdeps/arm/fedisblxcpt.c similarity index 100% rename from sysdeps/arm/eabi/fedisblxcpt.c rename to sysdeps/arm/fedisblxcpt.c diff --git a/sysdeps/arm/eabi/feenablxcpt.c b/sysdeps/arm/feenablxcpt.c similarity index 100% rename from sysdeps/arm/eabi/feenablxcpt.c rename to sysdeps/arm/feenablxcpt.c diff --git a/sysdeps/arm/eabi/fegetenv.c b/sysdeps/arm/fegetenv.c similarity index 100% rename from sysdeps/arm/eabi/fegetenv.c rename to sysdeps/arm/fegetenv.c diff --git a/sysdeps/arm/eabi/fegetexcept.c b/sysdeps/arm/fegetexcept.c similarity index 100% rename from sysdeps/arm/eabi/fegetexcept.c rename to sysdeps/arm/fegetexcept.c diff --git a/sysdeps/arm/eabi/fegetround.c b/sysdeps/arm/fegetround.c similarity index 100% rename from sysdeps/arm/eabi/fegetround.c rename to sysdeps/arm/fegetround.c diff --git a/sysdeps/arm/eabi/feholdexcpt.c b/sysdeps/arm/feholdexcpt.c similarity index 100% rename from sysdeps/arm/eabi/feholdexcpt.c rename to sysdeps/arm/feholdexcpt.c diff --git a/sysdeps/arm/eabi/fesetenv.c b/sysdeps/arm/fesetenv.c similarity index 100% rename from sysdeps/arm/eabi/fesetenv.c rename to sysdeps/arm/fesetenv.c diff --git a/sysdeps/arm/eabi/fesetround.c b/sysdeps/arm/fesetround.c similarity index 100% rename from sysdeps/arm/eabi/fesetround.c rename to sysdeps/arm/fesetround.c diff --git a/sysdeps/arm/eabi/feupdateenv.c b/sysdeps/arm/feupdateenv.c similarity index 100% rename from sysdeps/arm/eabi/feupdateenv.c rename to sysdeps/arm/feupdateenv.c diff --git a/sysdeps/arm/eabi/fgetexcptflg.c b/sysdeps/arm/fgetexcptflg.c similarity index 100% rename from sysdeps/arm/eabi/fgetexcptflg.c rename to sysdeps/arm/fgetexcptflg.c diff --git a/sysdeps/arm/eabi/find_exidx.c b/sysdeps/arm/find_exidx.c similarity index 100% rename from sysdeps/arm/eabi/find_exidx.c rename to sysdeps/arm/find_exidx.c diff --git a/sysdeps/arm/eabi/fpu_control.h b/sysdeps/arm/fpu_control.h similarity index 100% rename from sysdeps/arm/eabi/fpu_control.h rename to sysdeps/arm/fpu_control.h diff --git a/sysdeps/arm/eabi/fraiseexcpt.c b/sysdeps/arm/fraiseexcpt.c similarity index 100% rename from sysdeps/arm/eabi/fraiseexcpt.c rename to sysdeps/arm/fraiseexcpt.c diff --git a/sysdeps/arm/eabi/fsetexcptflg.c b/sysdeps/arm/fsetexcptflg.c similarity index 100% rename from sysdeps/arm/eabi/fsetexcptflg.c rename to sysdeps/arm/fsetexcptflg.c diff --git a/sysdeps/arm/eabi/ftestexcept.c b/sysdeps/arm/ftestexcept.c similarity index 100% rename from sysdeps/arm/eabi/ftestexcept.c rename to sysdeps/arm/ftestexcept.c diff --git a/sysdeps/arm/eabi/jmpbuf-offsets.h b/sysdeps/arm/jmpbuf-offsets.h similarity index 100% rename from sysdeps/arm/eabi/jmpbuf-offsets.h rename to sysdeps/arm/jmpbuf-offsets.h diff --git a/sysdeps/arm/eabi/machine-gmon.h b/sysdeps/arm/machine-gmon.h similarity index 100% rename from sysdeps/arm/eabi/machine-gmon.h rename to sysdeps/arm/machine-gmon.h diff --git a/sysdeps/arm/preconfigure b/sysdeps/arm/preconfigure index a4967004f4..d98c167a95 100644 --- a/sysdeps/arm/preconfigure +++ b/sysdeps/arm/preconfigure @@ -7,7 +7,7 @@ arm*) # Unfortunately it doesn't define any flags for implementations # that you might pass to -mcpu or -mtune # Note if you add patterns here you must ensure that - # an appropriate directory exists in sysdeps/arm/eabi + # an appropriate directory exists in sysdeps/arm archcppflag=`echo "" | $CC $CFLAGS $CPPFLAGS -E -dM - | grep __ARM_ARCH | @@ -35,7 +35,7 @@ arm*) ;; esac - machine=arm/eabi/$machine + machine=arm/$machine if [ "${CFLAGS+set}" != "set" ]; then CFLAGS="-g -O2" fi diff --git a/sysdeps/arm/eabi/rtld-global-offsets.sym b/sysdeps/arm/rtld-global-offsets.sym similarity index 100% rename from sysdeps/arm/eabi/rtld-global-offsets.sym rename to sysdeps/arm/rtld-global-offsets.sym diff --git a/sysdeps/arm/eabi/setfpucw.c b/sysdeps/arm/setfpucw.c similarity index 100% rename from sysdeps/arm/eabi/setfpucw.c rename to sysdeps/arm/setfpucw.c diff --git a/sysdeps/arm/eabi/setjmp.S b/sysdeps/arm/setjmp.S similarity index 100% rename from sysdeps/arm/eabi/setjmp.S rename to sysdeps/arm/setjmp.S diff --git a/sysdeps/unix/sysv/linux/arm/getcontext.S b/sysdeps/unix/sysv/linux/arm/getcontext.S index 435eb12c8f..116d6e8f35 100644 --- a/sysdeps/unix/sysv/linux/arm/getcontext.S +++ b/sysdeps/unix/sysv/linux/arm/getcontext.S @@ -48,7 +48,7 @@ ENTRY(__getcontext) add r2, r4, #UCONTEXT_SIGMASK bl PLTJMP(__sigprocmask) - /* Store FP regs. Much of the FP code is copied from arm/eabi/setjmp.S. */ + /* Store FP regs. Much of the FP code is copied from arm/setjmp.S. */ #ifdef PIC ldr r2, 1f diff --git a/sysdeps/unix/sysv/linux/arm/setcontext.S b/sysdeps/unix/sysv/linux/arm/setcontext.S index 78003f52dc..b472947731 100644 --- a/sysdeps/unix/sysv/linux/arm/setcontext.S +++ b/sysdeps/unix/sysv/linux/arm/setcontext.S @@ -29,7 +29,7 @@ ENTRY(__setcontext) mov r4, r0 add r0, r0, #UCONTEXT_REGSPACE - /* Restore the VFP registers. Copied from arm/eabi/__longjmp.S. */ + /* Restore the VFP registers. Copied from arm/__longjmp.S. */ #ifdef PIC ldr r2, 1f ldr r1, Lrtld_global_ro From 8466459037515723689f06c2cf7a79f1083f5d21 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sat, 21 Apr 2012 10:03:39 -0700 Subject: [PATCH 4293/4487] Remove ARM EABI/old-ABI conditionals. --- ChangeLog.arm | 10 ++++++++++ sysdeps/arm/shlib-versions | 1 - sysdeps/arm/start.S | 5 +---- sysdeps/arm/sysdep.h | 8 +++----- sysdeps/unix/sysv/linux/arm/clone.S | 21 +-------------------- sysdeps/unix/sysv/linux/arm/ldsodefs.h | 4 ---- sysdeps/unix/sysv/linux/arm/sigaction.c | 22 ++++++++-------------- sysdeps/unix/sysv/linux/arm/vfork.S | 6 +----- 8 files changed, 24 insertions(+), 53 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index d6489271b1..908d0bd27c 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,5 +1,15 @@ 2012-04-21 Joseph Myers + [BZ #13556] + * sysdeps/arm/shlib-versions (arm.*-.*-linux.*): Remove old-ABI + entry. + * sysdeps/arm/start.S: Remove __ARM_EABI__ conditionals. + * sysdeps/arm/sysdep.h: Likewise. + * sysdeps/unix/sysv/linux/arm/clone.S: Likewise. + * sysdeps/unix/sysv/linux/arm/ldsodefs.h: Likewise. + * sysdeps/unix/sysv/linux/arm/sigaction.c: Likewise. + * sysdeps/unix/sysv/linux/arm/vfork.S: Likewise. + [BZ #13556] * sysdeps/arm/preconfigure: Don't include /eabi in $machine. * sysdeps/arm/Makefile [subdir = elf] (sysdep_routines): Add diff --git a/sysdeps/arm/shlib-versions b/sysdeps/arm/shlib-versions index 491dd0adc7..626d58bdaa 100644 --- a/sysdeps/arm/shlib-versions +++ b/sysdeps/arm/shlib-versions @@ -1,4 +1,3 @@ arm.*-.*-linux-gnueabi.* DEFAULT GLIBC_2.4 arm.*-.*-linux-gnueabi.* ld=ld-linux.so.3 -arm.*-.*-linux.* ld=ld-linux.so.2 diff --git a/sysdeps/arm/start.S b/sysdeps/arm/start.S index a857d8b97e..7f3de8c209 100644 --- a/sysdeps/arm/start.S +++ b/sysdeps/arm/start.S @@ -1,6 +1,5 @@ /* Startup code for ARM & ELF - Copyright (C) 1995, 1996, 1997, 1998, 2001, 2002, 2005, 2008 - Free Software Foundation, Inc. + Copyright (C) 1995-2012 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 @@ -58,14 +57,12 @@ NULL */ -#if defined(__ARM_EABI__) /* Tag_ABI_align8_preserved: This code preserves 8-byte alignment in any callee. */ .eabi_attribute 25, 1 /* Tag_ABI_align8_needed: This code may require 8-byte alignment from the caller. */ .eabi_attribute 24, 1 -#endif #if defined(__thumb2__) .thumb diff --git a/sysdeps/arm/sysdep.h b/sysdeps/arm/sysdep.h index 6d15f798c2..7800456f64 100644 --- a/sysdeps/arm/sysdep.h +++ b/sysdeps/arm/sysdep.h @@ -77,8 +77,8 @@ /* If compiled for profiling, call `mcount' at the start of each function. */ #ifdef PROF -/* Call __gnu_mcount_nc if GCC >= 4.4 and abi = EABI. */ -#if __GNUC_PREREQ(4,4) && defined(__ARM_EABI__) +/* Call __gnu_mcount_nc if GCC >= 4.4. */ +#if __GNUC_PREREQ(4,4) #define CALL_MCOUNT \ str lr,[sp, #-4]!; \ cfi_adjust_cfa_offset (4); \ @@ -104,19 +104,17 @@ on this system, the asm identifier `syscall_error' intrudes on the C name space. Make sure we use an innocuous name. */ #define syscall_error __syscall_error -#if __GNUC_PREREQ(4,4) && defined(__ARM_EABI__) +#if __GNUC_PREREQ(4,4) #define mcount __gnu_mcount_nc #else #define mcount _mcount #endif -#if defined(__ARM_EABI__) /* Tag_ABI_align8_preserved: This code preserves 8-byte alignment in any callee. */ .eabi_attribute 25, 1 /* Tag_ABI_align8_needed: This code may require 8-byte alignment from the caller. */ .eabi_attribute 24, 1 -#endif #endif /* __ASSEMBLER__ */ diff --git a/sysdeps/unix/sysv/linux/arm/clone.S b/sysdeps/unix/sysv/linux/arm/clone.S index 8da41171fe..ec042fff9e 100644 --- a/sysdeps/unix/sysv/linux/arm/clone.S +++ b/sysdeps/unix/sysv/linux/arm/clone.S @@ -1,5 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998, 1999, 2002, 2005, 2008, 2009, 2010 - Free Software Foundation, Inc. +/* Copyright (C) 1996-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Pat Beirne @@ -49,33 +48,19 @@ ENTRY(__clone) mov ip, r2 #endif @ new sp is already in r1 -#ifdef __ARM_EABI__ stmfd sp!, {r4, r7} cfi_adjust_cfa_offset (8) cfi_rel_offset (r4, 0) cfi_rel_offset (r7, 4) -#else - str r4, [sp, #-8]! - cfi_adjust_cfa_offset (8) - cfi_rel_offset (r4, 0) -#endif ldr r2, [sp, #8] ldr r3, [sp, #12] ldr r4, [sp, #16] -#ifdef __ARM_EABI__ ldr r7, =SYS_ify(clone) swi 0x0 -#else - swi SYS_ify(clone) -#endif cfi_endproc cmp r0, #0 beq 1f -#ifdef __ARM_EABI__ ldmfd sp!, {r4, r7} -#else - ldr r4, [sp], #8 -#endif blt PLTJMP(C_SYMBOL_NAME(__syscall_error)) RETINSTR(, lr) @@ -94,12 +79,8 @@ PSEUDO_END (__clone) mov r1, r0 tst ip, #CLONE_VM movne r0, #-1 -#ifdef __ARM_EABI__ ldr r7, =SYS_ify(getpid) swieq 0x0 -#else - swieq SYS_ify(getpid) -#endif str r0, [r1, #PID_OFFSET] str r0, [r1, #TID_OFFSET] 3: diff --git a/sysdeps/unix/sysv/linux/arm/ldsodefs.h b/sysdeps/unix/sysv/linux/arm/ldsodefs.h index 6966f8a15b..8980bb1996 100644 --- a/sysdeps/unix/sysv/linux/arm/ldsodefs.h +++ b/sysdeps/unix/sysv/linux/arm/ldsodefs.h @@ -25,11 +25,7 @@ #undef VALID_ELF_OSABI #undef MORE_ELF_HEADER_DATA -#ifdef __ARM_EABI__ #define EXTRA_OSABI ELFOSABI_ARM_AEABI -#else -#define EXTRA_OSABI ELFOSABI_ARM -#endif #define VALID_ELF_HEADER(hdr,exp,size) \ (memcmp (hdr, exp, size) == 0 \ diff --git a/sysdeps/unix/sysv/linux/arm/sigaction.c b/sysdeps/unix/sysv/linux/arm/sigaction.c index 4f6e8bff9d..e7b51c6275 100644 --- a/sysdeps/unix/sysv/linux/arm/sigaction.c +++ b/sysdeps/unix/sysv/linux/arm/sigaction.c @@ -1,5 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2005, 2006 - Free Software Foundation, Inc. +/* Copyright (C) 1997-2012 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 @@ -35,26 +34,21 @@ int __libc_missing_rt_sigs; #define SA_RESTORER 0x04000000 -#ifdef __ARM_EABI__ extern void __default_sa_restorer_v1(void); extern void __default_sa_restorer_v2(void); extern void __default_rt_sa_restorer_v1(void); extern void __default_rt_sa_restorer_v2(void); -# ifdef __ASSUME_SIGFRAME_V2 -# define __default_sa_restorer __default_sa_restorer_v2 -# define __default_rt_sa_restorer __default_rt_sa_restorer_v2 -# else -# include -# define __default_sa_restorer (GLRO(dl_osversion) >= 0x020612 \ +#ifdef __ASSUME_SIGFRAME_V2 +# define __default_sa_restorer __default_sa_restorer_v2 +# define __default_rt_sa_restorer __default_rt_sa_restorer_v2 +#else +# include +# define __default_sa_restorer (GLRO(dl_osversion) >= 0x020612 \ ? __default_sa_restorer_v2 \ : __default_sa_restorer_v1) -# define __default_rt_sa_restorer (GLRO(dl_osversion) >= 0x020612 \ +# define __default_rt_sa_restorer (GLRO(dl_osversion) >= 0x020612 \ ? __default_rt_sa_restorer_v2 \ : __default_rt_sa_restorer_v1) -# endif -#else -extern void __default_sa_restorer(void); -extern void __default_rt_sa_restorer(void); #endif /* When RT signals are in use we need to use a different return stub. */ diff --git a/sysdeps/unix/sysv/linux/arm/vfork.S b/sysdeps/unix/sysv/linux/arm/vfork.S index cbd42e8613..99c366d2b2 100644 --- a/sysdeps/unix/sysv/linux/arm/vfork.S +++ b/sysdeps/unix/sysv/linux/arm/vfork.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2002, 2003, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1999-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Philip Blundell . @@ -32,7 +32,6 @@ ENTRY (__vfork) #ifdef SAVE_PID SAVE_PID #endif -#ifdef __ARM_EABI__ /* The DO_CALL macro saves r7 on the stack, to enable generation of ARM unwind info. Since the stack is initially shared between parent and child of vfork, that saved value could be corrupted. @@ -51,9 +50,6 @@ ENTRY (__vfork) cfi_adjust_cfa_offset (-4) mov r7, ip cfi_restore (r7); -#else - swi SYS_ify(vfork) -#endif #ifdef RESTORE_PID RESTORE_PID #endif From d5efd131d4e7143173f8faef331b7ec2c4af6340 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 16 Apr 2012 22:02:27 -0400 Subject: [PATCH 4294/4487] ia64: move from main tree This is a simple copy of the last version of ia64 in the main tree. It does not work as-is, but serves as a basis for follow up changes to restore it to working order. Signed-off-by: Mike Frysinger --- ChangeLog.ia64 | 480 ++ sysdeps/ia64/Implies | 5 + sysdeps/ia64/Makefile | 24 + sysdeps/ia64/Versions | 21 + sysdeps/ia64/_mcount.S | 92 + sysdeps/ia64/abort-instr.h | 3 + sysdeps/ia64/backtrace.c | 133 + sysdeps/ia64/bcopy.S | 10 + sysdeps/ia64/bits/atomic.h | 119 + sysdeps/ia64/bits/byteswap.h | 121 + sysdeps/ia64/bits/fenv.h | 87 + sysdeps/ia64/bits/huge_vall.h | 42 + sysdeps/ia64/bits/link.h | 63 + sysdeps/ia64/bits/linkmap.h | 5 + sysdeps/ia64/bits/mathdef.h | 37 + sysdeps/ia64/bits/xtitypes.h | 34 + sysdeps/ia64/bzero.S | 315 + sysdeps/ia64/configure | 54 + sysdeps/ia64/configure.in | 35 + sysdeps/ia64/dl-dtprocnum.h | 22 + sysdeps/ia64/dl-fptr.h | 36 + sysdeps/ia64/dl-lookupcfg.h | 72 + sysdeps/ia64/dl-machine.h | 507 ++ sysdeps/ia64/dl-sysdep.h | 24 + sysdeps/ia64/dl-tls.h | 33 + sysdeps/ia64/dl-trampoline.S | 539 ++ sysdeps/ia64/elf/configure | 126 + sysdeps/ia64/elf/configure.in | 34 + sysdeps/ia64/elf/entry.h | 10 + sysdeps/ia64/elf/initfini.c | 152 + sysdeps/ia64/elf/start.S | 120 + sysdeps/ia64/fpu/Makefile | 34 + sysdeps/ia64/fpu/README | 50 + sysdeps/ia64/fpu/Versions | 10 + sysdeps/ia64/fpu/bits/math-finite.h | 25 + sysdeps/ia64/fpu/bits/mathinline.h | 54 + sysdeps/ia64/fpu/branred.c | 1 + sysdeps/ia64/fpu/doasin.c | 1 + sysdeps/ia64/fpu/dosincos.c | 1 + sysdeps/ia64/fpu/e_acos.S | 878 ++ sysdeps/ia64/fpu/e_acosf.S | 694 ++ sysdeps/ia64/fpu/e_acosh.S | 1202 +++ sysdeps/ia64/fpu/e_acoshf.S | 1030 +++ sysdeps/ia64/fpu/e_acoshl.S | 1716 ++++ sysdeps/ia64/fpu/e_acosl.S | 2552 ++++++ sysdeps/ia64/fpu/e_asin.S | 854 ++ sysdeps/ia64/fpu/e_asinf.S | 675 ++ sysdeps/ia64/fpu/e_asinl.S | 2528 ++++++ sysdeps/ia64/fpu/e_atan2.S | 1049 +++ sysdeps/ia64/fpu/e_atan2f.S | 900 ++ sysdeps/ia64/fpu/e_atan2l.c | 1 + sysdeps/ia64/fpu/e_atanh.S | 1071 +++ sysdeps/ia64/fpu/e_atanhf.S | 845 ++ sysdeps/ia64/fpu/e_atanhl.S | 1156 +++ sysdeps/ia64/fpu/e_cosh.S | 866 ++ sysdeps/ia64/fpu/e_coshf.S | 711 ++ sysdeps/ia64/fpu/e_coshl.S | 1095 +++ sysdeps/ia64/fpu/e_exp.S | 793 ++ sysdeps/ia64/fpu/e_exp10.S | 605 ++ sysdeps/ia64/fpu/e_exp10f.S | 557 ++ sysdeps/ia64/fpu/e_exp10l.S | 811 ++ sysdeps/ia64/fpu/e_exp2.S | 564 ++ sysdeps/ia64/fpu/e_exp2f.S | 539 ++ sysdeps/ia64/fpu/e_exp2l.S | 807 ++ sysdeps/ia64/fpu/e_expf.S | 716 ++ sysdeps/ia64/fpu/e_expl.c | 1 + sysdeps/ia64/fpu/e_fmod.S | 559 ++ sysdeps/ia64/fpu/e_fmodf.S | 571 ++ sysdeps/ia64/fpu/e_fmodl.S | 672 ++ sysdeps/ia64/fpu/e_gamma_r.c | 1 + sysdeps/ia64/fpu/e_gammaf_r.c | 1 + sysdeps/ia64/fpu/e_gammal_r.c | 1 + sysdeps/ia64/fpu/e_hypot.S | 440 + sysdeps/ia64/fpu/e_hypotf.S | 395 + sysdeps/ia64/fpu/e_hypotl.S | 478 + sysdeps/ia64/fpu/e_lgamma_r.c | 71 + sysdeps/ia64/fpu/e_lgammaf_r.c | 71 + sysdeps/ia64/fpu/e_lgammal_r.c | 70 + sysdeps/ia64/fpu/e_log.S | 1729 ++++ sysdeps/ia64/fpu/e_log10.c | 1 + sysdeps/ia64/fpu/e_log10f.c | 1 + sysdeps/ia64/fpu/e_log10l.c | 1 + sysdeps/ia64/fpu/e_log2.S | 711 ++ sysdeps/ia64/fpu/e_log2f.S | 551 ++ sysdeps/ia64/fpu/e_log2l.S | 817 ++ sysdeps/ia64/fpu/e_logf.S | 1159 +++ sysdeps/ia64/fpu/e_logl.S | 1200 +++ sysdeps/ia64/fpu/e_pow.S | 2297 +++++ sysdeps/ia64/fpu/e_powf.S | 2066 +++++ sysdeps/ia64/fpu/e_powl.S | 2810 ++++++ sysdeps/ia64/fpu/e_rem_pio2.c | 1 + sysdeps/ia64/fpu/e_rem_pio2f.c | 1 + sysdeps/ia64/fpu/e_remainder.S | 590 ++ sysdeps/ia64/fpu/e_remainderf.S | 609 ++ sysdeps/ia64/fpu/e_remainderl.S | 617 ++ sysdeps/ia64/fpu/e_scalb.S | 599 ++ sysdeps/ia64/fpu/e_scalbf.S | 599 ++ sysdeps/ia64/fpu/e_scalbl.S | 599 ++ sysdeps/ia64/fpu/e_sinh.S | 905 ++ sysdeps/ia64/fpu/e_sinhf.S | 748 ++ sysdeps/ia64/fpu/e_sinhl.S | 1117 +++ sysdeps/ia64/fpu/e_sqrt.S | 342 + sysdeps/ia64/fpu/e_sqrtf.S | 260 + sysdeps/ia64/fpu/e_sqrtl.S | 275 + sysdeps/ia64/fpu/fclrexcpt.c | 39 + sysdeps/ia64/fpu/fedisblxcpt.c | 37 + sysdeps/ia64/fpu/feenablxcpt.c | 37 + sysdeps/ia64/fpu/fegetenv.c | 30 + sysdeps/ia64/fpu/fegetexcept.c | 31 + sysdeps/ia64/fpu/fegetround.c | 31 + sysdeps/ia64/fpu/feholdexcpt.c | 42 + sysdeps/ia64/fpu/fesetenv.c | 42 + sysdeps/ia64/fpu/fesetround.c | 42 + sysdeps/ia64/fpu/feupdateenv.c | 41 + sysdeps/ia64/fpu/fgetexcptflg.c | 35 + sysdeps/ia64/fpu/fraiseexcpt.c | 80 + sysdeps/ia64/fpu/fsetexcptflg.c | 41 + sysdeps/ia64/fpu/ftestexcept.c | 33 + sysdeps/ia64/fpu/gen_import_file_list | 90 + sysdeps/ia64/fpu/halfulp.c | 1 + sysdeps/ia64/fpu/import_check | 81 + sysdeps/ia64/fpu/import_diffs | 7 + sysdeps/ia64/fpu/import_file.awk | 151 + sysdeps/ia64/fpu/import_intel_libm | 106 + sysdeps/ia64/fpu/k_rem_pio2.c | 1 + sysdeps/ia64/fpu/k_rem_pio2f.c | 1 + sysdeps/ia64/fpu/k_rem_pio2l.c | 1 + sysdeps/ia64/fpu/libc_libm_error.c | 14 + sysdeps/ia64/fpu/libm-symbols.h | 64 + sysdeps/ia64/fpu/libm-test-ulps | 1146 +++ sysdeps/ia64/fpu/libm_cpu_defs.h | 156 + sysdeps/ia64/fpu/libm_error.c | 4295 +++++++++ sysdeps/ia64/fpu/libm_error_codes.h | 211 + sysdeps/ia64/fpu/libm_frexp.S | 209 + sysdeps/ia64/fpu/libm_frexp4.S | 199 + sysdeps/ia64/fpu/libm_frexp4f.S | 199 + sysdeps/ia64/fpu/libm_frexp4l.S | 198 + sysdeps/ia64/fpu/libm_frexpf.S | 209 + sysdeps/ia64/fpu/libm_frexpl.S | 209 + sysdeps/ia64/fpu/libm_lgamma.S | 3623 ++++++++ sysdeps/ia64/fpu/libm_lgammaf.S | 2199 +++++ sysdeps/ia64/fpu/libm_lgammal.S | 7678 +++++++++++++++++ sysdeps/ia64/fpu/libm_reduce.S | 1578 ++++ sysdeps/ia64/fpu/libm_scalblnf.S | 450 + sysdeps/ia64/fpu/libm_sincos.S | 783 ++ sysdeps/ia64/fpu/libm_sincos_large.S | 2757 ++++++ sysdeps/ia64/fpu/libm_sincosf.S | 745 ++ sysdeps/ia64/fpu/libm_sincosl.S | 2528 ++++++ sysdeps/ia64/fpu/libm_support.h | 1051 +++ sysdeps/ia64/fpu/libm_tan.S | 3332 +++++++ sysdeps/ia64/fpu/math_ldbl.h | 100 + sysdeps/ia64/fpu/mpa.c | 1 + sysdeps/ia64/fpu/mpatan.c | 1 + sysdeps/ia64/fpu/mpatan2.c | 1 + sysdeps/ia64/fpu/mpexp.c | 1 + sysdeps/ia64/fpu/mplog.c | 1 + sysdeps/ia64/fpu/mpsqrt.c | 1 + sysdeps/ia64/fpu/mptan.c | 1 + sysdeps/ia64/fpu/printf_fphex.c | 81 + sysdeps/ia64/fpu/s_asinh.S | 1138 +++ sysdeps/ia64/fpu/s_asinhf.S | 937 ++ sysdeps/ia64/fpu/s_asinhl.S | 1347 +++ sysdeps/ia64/fpu/s_atan.S | 753 ++ sysdeps/ia64/fpu/s_atanf.S | 556 ++ sysdeps/ia64/fpu/s_atanl.S | 2007 +++++ sysdeps/ia64/fpu/s_cbrt.S | 767 ++ sysdeps/ia64/fpu/s_cbrtf.S | 765 ++ sysdeps/ia64/fpu/s_cbrtl.S | 986 +++ sysdeps/ia64/fpu/s_ceil.S | 224 + sysdeps/ia64/fpu/s_ceilf.S | 224 + sysdeps/ia64/fpu/s_ceill.S | 224 + sysdeps/ia64/fpu/s_copysign.S | 38 + sysdeps/ia64/fpu/s_copysignf.S | 1 + sysdeps/ia64/fpu/s_copysignl.S | 1 + sysdeps/ia64/fpu/s_cos.S | 768 ++ sysdeps/ia64/fpu/s_cosf.S | 717 ++ sysdeps/ia64/fpu/s_cosl.S | 2365 +++++ sysdeps/ia64/fpu/s_erf.S | 926 ++ sysdeps/ia64/fpu/s_erfc.S | 1199 +++ sysdeps/ia64/fpu/s_erfcf.S | 983 +++ sysdeps/ia64/fpu/s_erfcl.S | 2066 +++++ sysdeps/ia64/fpu/s_erff.S | 558 ++ sysdeps/ia64/fpu/s_erfl.S | 1240 +++ sysdeps/ia64/fpu/s_expm1.S | 886 ++ sysdeps/ia64/fpu/s_expm1f.S | 671 ++ sysdeps/ia64/fpu/s_expm1l.S | 1431 +++ sysdeps/ia64/fpu/s_fabs.S | 82 + sysdeps/ia64/fpu/s_fabsf.S | 82 + sysdeps/ia64/fpu/s_fabsl.S | 82 + sysdeps/ia64/fpu/s_fdim.S | 228 + sysdeps/ia64/fpu/s_fdimf.S | 228 + sysdeps/ia64/fpu/s_fdiml.S | 228 + sysdeps/ia64/fpu/s_finite.S | 45 + sysdeps/ia64/fpu/s_finitef.S | 1 + sysdeps/ia64/fpu/s_finitel.S | 1 + sysdeps/ia64/fpu/s_floor.S | 216 + sysdeps/ia64/fpu/s_floorf.S | 215 + sysdeps/ia64/fpu/s_floorl.S | 215 + sysdeps/ia64/fpu/s_fma.S | 71 + sysdeps/ia64/fpu/s_fmaf.S | 71 + sysdeps/ia64/fpu/s_fmal.S | 71 + sysdeps/ia64/fpu/s_fmax.S | 114 + sysdeps/ia64/fpu/s_fmaxf.S | 114 + sysdeps/ia64/fpu/s_fmaxl.S | 114 + sysdeps/ia64/fpu/s_fpclassify.S | 62 + sysdeps/ia64/fpu/s_fpclassifyf.S | 1 + sysdeps/ia64/fpu/s_fpclassifyl.S | 1 + sysdeps/ia64/fpu/s_frexp.c | 67 + sysdeps/ia64/fpu/s_frexpf.c | 67 + sysdeps/ia64/fpu/s_frexpl.c | 67 + sysdeps/ia64/fpu/s_ilogb.S | 268 + sysdeps/ia64/fpu/s_ilogbf.S | 268 + sysdeps/ia64/fpu/s_ilogbl.S | 268 + sysdeps/ia64/fpu/s_isinf.S | 58 + sysdeps/ia64/fpu/s_isinff.S | 1 + sysdeps/ia64/fpu/s_isinfl.S | 1 + sysdeps/ia64/fpu/s_isnan.S | 51 + sysdeps/ia64/fpu/s_isnanf.S | 1 + sysdeps/ia64/fpu/s_isnanl.S | 1 + sysdeps/ia64/fpu/s_ldexp.c | 61 + sysdeps/ia64/fpu/s_ldexpf.c | 61 + sysdeps/ia64/fpu/s_ldexpl.c | 61 + sysdeps/ia64/fpu/s_libm_ldexp.S | 452 + sysdeps/ia64/fpu/s_libm_ldexpf.S | 452 + sysdeps/ia64/fpu/s_libm_ldexpl.S | 452 + sysdeps/ia64/fpu/s_libm_scalbn.S | 452 + sysdeps/ia64/fpu/s_libm_scalbnf.S | 452 + sysdeps/ia64/fpu/s_libm_scalbnl.S | 452 + sysdeps/ia64/fpu/s_log1p.S | 1103 +++ sysdeps/ia64/fpu/s_log1pf.S | 789 ++ sysdeps/ia64/fpu/s_log1pl.S | 1200 +++ sysdeps/ia64/fpu/s_logb.S | 281 + sysdeps/ia64/fpu/s_logbf.S | 281 + sysdeps/ia64/fpu/s_logbl.S | 281 + sysdeps/ia64/fpu/s_matherrf.c | 33 + sysdeps/ia64/fpu/s_matherrl.c | 33 + sysdeps/ia64/fpu/s_modf.S | 278 + sysdeps/ia64/fpu/s_modff.S | 278 + sysdeps/ia64/fpu/s_modfl.S | 273 + sysdeps/ia64/fpu/s_nearbyint.S | 217 + sysdeps/ia64/fpu/s_nearbyintf.S | 217 + sysdeps/ia64/fpu/s_nearbyintl.S | 217 + sysdeps/ia64/fpu/s_nextafter.S | 498 ++ sysdeps/ia64/fpu/s_nextafterf.S | 504 ++ sysdeps/ia64/fpu/s_nextafterl.S | 503 ++ sysdeps/ia64/fpu/s_nexttoward.S | 490 ++ sysdeps/ia64/fpu/s_nexttowardf.S | 496 ++ sysdeps/ia64/fpu/s_nexttowardl.S | 494 ++ sysdeps/ia64/fpu/s_rint.S | 229 + sysdeps/ia64/fpu/s_rintf.S | 229 + sysdeps/ia64/fpu/s_rintl.S | 229 + sysdeps/ia64/fpu/s_round.S | 233 + sysdeps/ia64/fpu/s_roundf.S | 233 + sysdeps/ia64/fpu/s_roundl.S | 233 + sysdeps/ia64/fpu/s_scalblnf.c | 61 + sysdeps/ia64/fpu/s_scalbn.c | 61 + sysdeps/ia64/fpu/s_scalbnf.c | 61 + sysdeps/ia64/fpu/s_scalbnl.c | 61 + sysdeps/ia64/fpu/s_signbit.S | 37 + sysdeps/ia64/fpu/s_signbitf.S | 1 + sysdeps/ia64/fpu/s_signbitl.S | 1 + sysdeps/ia64/fpu/s_significand.S | 153 + sysdeps/ia64/fpu/s_significandf.S | 152 + sysdeps/ia64/fpu/s_significandl.S | 153 + sysdeps/ia64/fpu/s_sin.c | 1 + sysdeps/ia64/fpu/s_sincos.c | 1 + sysdeps/ia64/fpu/s_sincosf.c | 1 + sysdeps/ia64/fpu/s_sincosl.c | 1 + sysdeps/ia64/fpu/s_sinf.c | 1 + sysdeps/ia64/fpu/s_sinl.c | 1 + sysdeps/ia64/fpu/s_tan.S | 878 ++ sysdeps/ia64/fpu/s_tanf.S | 692 ++ sysdeps/ia64/fpu/s_tanh.S | 986 +++ sysdeps/ia64/fpu/s_tanhf.S | 581 ++ sysdeps/ia64/fpu/s_tanhl.S | 1348 +++ sysdeps/ia64/fpu/s_tanl.S | 3248 +++++++ sysdeps/ia64/fpu/s_trunc.S | 166 + sysdeps/ia64/fpu/s_truncf.S | 166 + sysdeps/ia64/fpu/s_truncl.S | 166 + sysdeps/ia64/fpu/sincos32.c | 1 + sysdeps/ia64/fpu/slowexp.c | 1 + sysdeps/ia64/fpu/slowpow.c | 1 + sysdeps/ia64/fpu/t_exp.c | 1 + sysdeps/ia64/fpu/w_acos.c | 1 + sysdeps/ia64/fpu/w_acosf.c | 1 + sysdeps/ia64/fpu/w_acosh.c | 1 + sysdeps/ia64/fpu/w_acoshf.c | 1 + sysdeps/ia64/fpu/w_acoshl.c | 1 + sysdeps/ia64/fpu/w_acosl.c | 1 + sysdeps/ia64/fpu/w_asin.c | 1 + sysdeps/ia64/fpu/w_asinf.c | 1 + sysdeps/ia64/fpu/w_asinl.c | 1 + sysdeps/ia64/fpu/w_atan2.c | 1 + sysdeps/ia64/fpu/w_atan2f.c | 1 + sysdeps/ia64/fpu/w_atan2l.c | 1 + sysdeps/ia64/fpu/w_atanh.c | 1 + sysdeps/ia64/fpu/w_atanhf.c | 1 + sysdeps/ia64/fpu/w_atanhl.c | 1 + sysdeps/ia64/fpu/w_cosh.c | 1 + sysdeps/ia64/fpu/w_coshf.c | 1 + sysdeps/ia64/fpu/w_coshl.c | 1 + sysdeps/ia64/fpu/w_exp.c | 1 + sysdeps/ia64/fpu/w_exp10.c | 1 + sysdeps/ia64/fpu/w_exp10f.c | 1 + sysdeps/ia64/fpu/w_exp10l.c | 1 + sysdeps/ia64/fpu/w_exp2.c | 1 + sysdeps/ia64/fpu/w_exp2f.c | 1 + sysdeps/ia64/fpu/w_exp2l.c | 1 + sysdeps/ia64/fpu/w_expf.c | 1 + sysdeps/ia64/fpu/w_expl.c | 1 + sysdeps/ia64/fpu/w_fmod.c | 1 + sysdeps/ia64/fpu/w_fmodf.c | 1 + sysdeps/ia64/fpu/w_fmodl.c | 1 + sysdeps/ia64/fpu/w_hypot.c | 1 + sysdeps/ia64/fpu/w_hypotf.c | 1 + sysdeps/ia64/fpu/w_hypotl.c | 1 + sysdeps/ia64/fpu/w_lgamma.c | 80 + sysdeps/ia64/fpu/w_lgamma_r.c | 1 + sysdeps/ia64/fpu/w_lgammaf.c | 80 + sysdeps/ia64/fpu/w_lgammaf_r.c | 1 + sysdeps/ia64/fpu/w_lgammal.c | 79 + sysdeps/ia64/fpu/w_lgammal_r.c | 1 + sysdeps/ia64/fpu/w_log.c | 1 + sysdeps/ia64/fpu/w_log10.c | 1 + sysdeps/ia64/fpu/w_log10f.c | 1 + sysdeps/ia64/fpu/w_log10l.c | 1 + sysdeps/ia64/fpu/w_log2.c | 1 + sysdeps/ia64/fpu/w_log2f.c | 1 + sysdeps/ia64/fpu/w_log2l.c | 1 + sysdeps/ia64/fpu/w_logf.c | 1 + sysdeps/ia64/fpu/w_logl.c | 1 + sysdeps/ia64/fpu/w_pow.c | 1 + sysdeps/ia64/fpu/w_powf.c | 1 + sysdeps/ia64/fpu/w_powl.c | 1 + sysdeps/ia64/fpu/w_remainder.c | 1 + sysdeps/ia64/fpu/w_remainderf.c | 1 + sysdeps/ia64/fpu/w_remainderl.c | 1 + sysdeps/ia64/fpu/w_scalb.c | 1 + sysdeps/ia64/fpu/w_scalbf.c | 1 + sysdeps/ia64/fpu/w_scalbl.c | 1 + sysdeps/ia64/fpu/w_sinh.c | 1 + sysdeps/ia64/fpu/w_sinhf.c | 1 + sysdeps/ia64/fpu/w_sinhl.c | 1 + sysdeps/ia64/fpu/w_sqrt.c | 1 + sysdeps/ia64/fpu/w_sqrtf.c | 1 + sysdeps/ia64/fpu/w_sqrtl.c | 1 + sysdeps/ia64/fpu/w_tgamma.S | 1836 ++++ sysdeps/ia64/fpu/w_tgammaf.S | 1331 +++ sysdeps/ia64/fpu/w_tgammal.S | 4487 ++++++++++ sysdeps/ia64/gccframe.h | 32 + sysdeps/ia64/hp-timing.c | 24 + sysdeps/ia64/hp-timing.h | 148 + sysdeps/ia64/htonl.S | 31 + sysdeps/ia64/htons.S | 31 + sysdeps/ia64/ia64libgcc.S | 350 + sysdeps/ia64/ieee754.h | 205 + sysdeps/ia64/jmpbuf-unwind.h | 44 + sysdeps/ia64/ldbl2mpn.c | 1 + sysdeps/ia64/libc-tls.c | 32 + sysdeps/ia64/machine-gmon.h | 26 + sysdeps/ia64/memccpy.S | 250 + sysdeps/ia64/memchr.S | 161 + sysdeps/ia64/memcmp.S | 165 + sysdeps/ia64/memcpy.S | 436 + sysdeps/ia64/memmove.S | 251 + sysdeps/ia64/memset.S | 400 + sysdeps/ia64/memusage.h | 30 + sysdeps/ia64/nptl/Makefile | 25 + sysdeps/ia64/nptl/pthread_spin_lock.c | 36 + sysdeps/ia64/nptl/pthread_spin_trylock.c | 28 + sysdeps/ia64/nptl/pthread_spin_unlock.c | 28 + sysdeps/ia64/nptl/pthreaddef.h | 43 + sysdeps/ia64/nptl/tcb-offsets.sym | 7 + sysdeps/ia64/nptl/tls.h | 186 + sysdeps/ia64/sched_cpucount.c | 21 + sysdeps/ia64/softpipe.h | 29 + sysdeps/ia64/stackinfo.h | 35 + sysdeps/ia64/strcat.c | 27 + sysdeps/ia64/strchr.S | 112 + sysdeps/ia64/strcmp.S | 54 + sysdeps/ia64/strcpy.S | 145 + sysdeps/ia64/strlen.S | 98 + sysdeps/ia64/strncmp.S | 62 + sysdeps/ia64/strncpy.S | 232 + sysdeps/ia64/sysdep.h | 63 + sysdeps/unix/sysv/linux/ia64/Implies | 1 + sysdeps/unix/sysv/linux/ia64/Makefile | 27 + sysdeps/unix/sysv/linux/ia64/Versions | 25 + .../unix/sysv/linux/ia64/____longjmp_chk.S | 42 + sysdeps/unix/sysv/linux/ia64/__longjmp.S | 171 + .../unix/sysv/linux/ia64/__start_context.S | 52 + sysdeps/unix/sysv/linux/ia64/bits/endian.h | 7 + sysdeps/unix/sysv/linux/ia64/bits/fcntl.h | 320 + sysdeps/unix/sysv/linux/ia64/bits/ipc.h | 54 + sysdeps/unix/sysv/linux/ia64/bits/mman.h | 110 + sysdeps/unix/sysv/linux/ia64/bits/msq.h | 69 + sysdeps/unix/sysv/linux/ia64/bits/sem.h | 87 + sysdeps/unix/sysv/linux/ia64/bits/setjmp.h | 35 + sysdeps/unix/sysv/linux/ia64/bits/shm.h | 95 + sysdeps/unix/sysv/linux/ia64/bits/sigaction.h | 75 + .../unix/sysv/linux/ia64/bits/sigcontext.h | 81 + sysdeps/unix/sysv/linux/ia64/bits/siginfo.h | 343 + sysdeps/unix/sysv/linux/ia64/bits/sigstack.h | 63 + sysdeps/unix/sysv/linux/ia64/bits/stat.h | 150 + sysdeps/unix/sysv/linux/ia64/brk.S | 52 + sysdeps/unix/sysv/linux/ia64/bsd-_setjmp.S | 1 + sysdeps/unix/sysv/linux/ia64/bsd-setjmp.S | 1 + .../sysv/linux/ia64/clock_getcpuclockid.c | 32 + sysdeps/unix/sysv/linux/ia64/clone.S | 1 + sysdeps/unix/sysv/linux/ia64/clone2.S | 106 + sysdeps/unix/sysv/linux/ia64/dl-brk.S | 1 + sysdeps/unix/sysv/linux/ia64/dl-cache.h | 25 + sysdeps/unix/sysv/linux/ia64/dl-static.c | 69 + sysdeps/unix/sysv/linux/ia64/fork.S | 41 + sysdeps/unix/sysv/linux/ia64/get_clockfreq.c | 89 + sysdeps/unix/sysv/linux/ia64/getclktck.c | 2 + sysdeps/unix/sysv/linux/ia64/getcontext.S | 158 + sysdeps/unix/sysv/linux/ia64/getpagesize.c | 39 + sysdeps/unix/sysv/linux/ia64/has_cpuclock.c | 52 + sysdeps/unix/sysv/linux/ia64/ioperm.c | 217 + sysdeps/unix/sysv/linux/ia64/kernel_stat.h | 21 + sysdeps/unix/sysv/linux/ia64/ldconfig.h | 25 + sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed | 1 + sysdeps/unix/sysv/linux/ia64/ldsodefs.h | 33 + sysdeps/unix/sysv/linux/ia64/makecontext.c | 93 + sysdeps/unix/sysv/linux/ia64/nptl/Makefile | 3 + sysdeps/unix/sysv/linux/ia64/nptl/Versions | 13 + .../sysv/linux/ia64/nptl/__ia64_longjmp.S | 159 + .../sysv/linux/ia64/nptl/__sigstack_longjmp.c | 168 + .../sysv/linux/ia64/nptl/bits/local_lim.h | 100 + .../sysv/linux/ia64/nptl/bits/pthreadtypes.h | 169 + .../sysv/linux/ia64/nptl/bits/semaphore.h | 36 + sysdeps/unix/sysv/linux/ia64/nptl/clone2.S | 9 + .../unix/sysv/linux/ia64/nptl/createthread.c | 26 + sysdeps/unix/sysv/linux/ia64/nptl/dl-sysdep.h | 77 + sysdeps/unix/sysv/linux/ia64/nptl/fork.c | 31 + .../unix/sysv/linux/ia64/nptl/lowlevellock.h | 295 + .../unix/sysv/linux/ia64/nptl/pt-initfini.c | 50 + sysdeps/unix/sysv/linux/ia64/nptl/pt-vfork.S | 60 + .../unix/sysv/linux/ia64/nptl/pthread_once.c | 94 + .../unix/sysv/linux/ia64/nptl/sysdep-cancel.h | 205 + .../unix/sysv/linux/ia64/nptl/timer_create.c | 1 + .../unix/sysv/linux/ia64/nptl/timer_delete.c | 1 + .../sysv/linux/ia64/nptl/timer_getoverr.c | 1 + .../unix/sysv/linux/ia64/nptl/timer_gettime.c | 1 + .../unix/sysv/linux/ia64/nptl/timer_settime.c | 1 + .../linux/ia64/nptl/unwind-forcedunwind.c | 39 + .../sysv/linux/ia64/nptl/unwind_longjmp.c | 44 + sysdeps/unix/sysv/linux/ia64/nptl/vfork.S | 69 + sysdeps/unix/sysv/linux/ia64/pipe.S | 38 + sysdeps/unix/sysv/linux/ia64/profil-counter.h | 32 + sysdeps/unix/sysv/linux/ia64/readelflib.c | 60 + sysdeps/unix/sysv/linux/ia64/register-dump.h | 182 + sysdeps/unix/sysv/linux/ia64/rt-sysdep.S | 1 + sysdeps/unix/sysv/linux/ia64/setcontext.S | 153 + sysdeps/unix/sysv/linux/ia64/setjmp.S | 199 + sysdeps/unix/sysv/linux/ia64/sigaction.c | 59 + .../sysv/linux/ia64/sigcontext-offsets.sym | 16 + sysdeps/unix/sysv/linux/ia64/sigcontextinfo.h | 26 + sysdeps/unix/sysv/linux/ia64/sigpending.c | 39 + sysdeps/unix/sysv/linux/ia64/sigprocmask.c | 45 + sysdeps/unix/sysv/linux/ia64/swapcontext.c | 40 + sysdeps/unix/sysv/linux/ia64/sys/io.h | 68 + sysdeps/unix/sysv/linux/ia64/sys/procfs.h | 130 + sysdeps/unix/sysv/linux/ia64/sys/ptrace.h | 192 + sysdeps/unix/sysv/linux/ia64/sys/rse.h | 78 + sysdeps/unix/sysv/linux/ia64/sys/ucontext.h | 66 + sysdeps/unix/sysv/linux/ia64/sys/user.h | 54 + sysdeps/unix/sysv/linux/ia64/syscall.S | 30 + sysdeps/unix/sysv/linux/ia64/syscalls.list | 50 + sysdeps/unix/sysv/linux/ia64/sysconf.c | 31 + sysdeps/unix/sysv/linux/ia64/sysdep.S | 59 + sysdeps/unix/sysv/linux/ia64/sysdep.h | 384 + sysdeps/unix/sysv/linux/ia64/system.c | 35 + sysdeps/unix/sysv/linux/ia64/ucontext_i.h | 47 + sysdeps/unix/sysv/linux/ia64/umount.c | 31 + sysdeps/unix/sysv/linux/ia64/unwind-dw2-fde.c | 1 + sysdeps/unix/sysv/linux/ia64/vfork.S | 44 + sysdeps/unix/sysv/linux/ia64/wordexp.c | 60 + 479 files changed, 155139 insertions(+) create mode 100644 ChangeLog.ia64 create mode 100644 sysdeps/ia64/Implies create mode 100644 sysdeps/ia64/Makefile create mode 100644 sysdeps/ia64/Versions create mode 100644 sysdeps/ia64/_mcount.S create mode 100644 sysdeps/ia64/abort-instr.h create mode 100644 sysdeps/ia64/backtrace.c create mode 100644 sysdeps/ia64/bcopy.S create mode 100644 sysdeps/ia64/bits/atomic.h create mode 100644 sysdeps/ia64/bits/byteswap.h create mode 100644 sysdeps/ia64/bits/fenv.h create mode 100644 sysdeps/ia64/bits/huge_vall.h create mode 100644 sysdeps/ia64/bits/link.h create mode 100644 sysdeps/ia64/bits/linkmap.h create mode 100644 sysdeps/ia64/bits/mathdef.h create mode 100644 sysdeps/ia64/bits/xtitypes.h create mode 100644 sysdeps/ia64/bzero.S create mode 100644 sysdeps/ia64/configure create mode 100644 sysdeps/ia64/configure.in create mode 100644 sysdeps/ia64/dl-dtprocnum.h create mode 100644 sysdeps/ia64/dl-fptr.h create mode 100644 sysdeps/ia64/dl-lookupcfg.h create mode 100644 sysdeps/ia64/dl-machine.h create mode 100644 sysdeps/ia64/dl-sysdep.h create mode 100644 sysdeps/ia64/dl-tls.h create mode 100644 sysdeps/ia64/dl-trampoline.S create mode 100644 sysdeps/ia64/elf/configure create mode 100644 sysdeps/ia64/elf/configure.in create mode 100644 sysdeps/ia64/elf/entry.h create mode 100644 sysdeps/ia64/elf/initfini.c create mode 100644 sysdeps/ia64/elf/start.S create mode 100644 sysdeps/ia64/fpu/Makefile create mode 100644 sysdeps/ia64/fpu/README create mode 100644 sysdeps/ia64/fpu/Versions create mode 100644 sysdeps/ia64/fpu/bits/math-finite.h create mode 100644 sysdeps/ia64/fpu/bits/mathinline.h create mode 100644 sysdeps/ia64/fpu/branred.c create mode 100644 sysdeps/ia64/fpu/doasin.c create mode 100644 sysdeps/ia64/fpu/dosincos.c create mode 100644 sysdeps/ia64/fpu/e_acos.S create mode 100644 sysdeps/ia64/fpu/e_acosf.S create mode 100644 sysdeps/ia64/fpu/e_acosh.S create mode 100644 sysdeps/ia64/fpu/e_acoshf.S create mode 100644 sysdeps/ia64/fpu/e_acoshl.S create mode 100644 sysdeps/ia64/fpu/e_acosl.S create mode 100644 sysdeps/ia64/fpu/e_asin.S create mode 100644 sysdeps/ia64/fpu/e_asinf.S create mode 100644 sysdeps/ia64/fpu/e_asinl.S create mode 100644 sysdeps/ia64/fpu/e_atan2.S create mode 100644 sysdeps/ia64/fpu/e_atan2f.S create mode 100644 sysdeps/ia64/fpu/e_atan2l.c create mode 100644 sysdeps/ia64/fpu/e_atanh.S create mode 100644 sysdeps/ia64/fpu/e_atanhf.S create mode 100644 sysdeps/ia64/fpu/e_atanhl.S create mode 100644 sysdeps/ia64/fpu/e_cosh.S create mode 100644 sysdeps/ia64/fpu/e_coshf.S create mode 100644 sysdeps/ia64/fpu/e_coshl.S create mode 100644 sysdeps/ia64/fpu/e_exp.S create mode 100644 sysdeps/ia64/fpu/e_exp10.S create mode 100644 sysdeps/ia64/fpu/e_exp10f.S create mode 100644 sysdeps/ia64/fpu/e_exp10l.S create mode 100644 sysdeps/ia64/fpu/e_exp2.S create mode 100644 sysdeps/ia64/fpu/e_exp2f.S create mode 100644 sysdeps/ia64/fpu/e_exp2l.S create mode 100644 sysdeps/ia64/fpu/e_expf.S create mode 100644 sysdeps/ia64/fpu/e_expl.c create mode 100644 sysdeps/ia64/fpu/e_fmod.S create mode 100644 sysdeps/ia64/fpu/e_fmodf.S create mode 100644 sysdeps/ia64/fpu/e_fmodl.S create mode 100644 sysdeps/ia64/fpu/e_gamma_r.c create mode 100644 sysdeps/ia64/fpu/e_gammaf_r.c create mode 100644 sysdeps/ia64/fpu/e_gammal_r.c create mode 100644 sysdeps/ia64/fpu/e_hypot.S create mode 100644 sysdeps/ia64/fpu/e_hypotf.S create mode 100644 sysdeps/ia64/fpu/e_hypotl.S create mode 100644 sysdeps/ia64/fpu/e_lgamma_r.c create mode 100644 sysdeps/ia64/fpu/e_lgammaf_r.c create mode 100644 sysdeps/ia64/fpu/e_lgammal_r.c create mode 100644 sysdeps/ia64/fpu/e_log.S create mode 100644 sysdeps/ia64/fpu/e_log10.c create mode 100644 sysdeps/ia64/fpu/e_log10f.c create mode 100644 sysdeps/ia64/fpu/e_log10l.c create mode 100644 sysdeps/ia64/fpu/e_log2.S create mode 100644 sysdeps/ia64/fpu/e_log2f.S create mode 100644 sysdeps/ia64/fpu/e_log2l.S create mode 100644 sysdeps/ia64/fpu/e_logf.S create mode 100644 sysdeps/ia64/fpu/e_logl.S create mode 100644 sysdeps/ia64/fpu/e_pow.S create mode 100644 sysdeps/ia64/fpu/e_powf.S create mode 100644 sysdeps/ia64/fpu/e_powl.S create mode 100644 sysdeps/ia64/fpu/e_rem_pio2.c create mode 100644 sysdeps/ia64/fpu/e_rem_pio2f.c create mode 100644 sysdeps/ia64/fpu/e_remainder.S create mode 100644 sysdeps/ia64/fpu/e_remainderf.S create mode 100644 sysdeps/ia64/fpu/e_remainderl.S create mode 100644 sysdeps/ia64/fpu/e_scalb.S create mode 100644 sysdeps/ia64/fpu/e_scalbf.S create mode 100644 sysdeps/ia64/fpu/e_scalbl.S create mode 100644 sysdeps/ia64/fpu/e_sinh.S create mode 100644 sysdeps/ia64/fpu/e_sinhf.S create mode 100644 sysdeps/ia64/fpu/e_sinhl.S create mode 100644 sysdeps/ia64/fpu/e_sqrt.S create mode 100644 sysdeps/ia64/fpu/e_sqrtf.S create mode 100644 sysdeps/ia64/fpu/e_sqrtl.S create mode 100644 sysdeps/ia64/fpu/fclrexcpt.c create mode 100644 sysdeps/ia64/fpu/fedisblxcpt.c create mode 100644 sysdeps/ia64/fpu/feenablxcpt.c create mode 100644 sysdeps/ia64/fpu/fegetenv.c create mode 100644 sysdeps/ia64/fpu/fegetexcept.c create mode 100644 sysdeps/ia64/fpu/fegetround.c create mode 100644 sysdeps/ia64/fpu/feholdexcpt.c create mode 100644 sysdeps/ia64/fpu/fesetenv.c create mode 100644 sysdeps/ia64/fpu/fesetround.c create mode 100644 sysdeps/ia64/fpu/feupdateenv.c create mode 100644 sysdeps/ia64/fpu/fgetexcptflg.c create mode 100644 sysdeps/ia64/fpu/fraiseexcpt.c create mode 100644 sysdeps/ia64/fpu/fsetexcptflg.c create mode 100644 sysdeps/ia64/fpu/ftestexcept.c create mode 100644 sysdeps/ia64/fpu/gen_import_file_list create mode 100644 sysdeps/ia64/fpu/halfulp.c create mode 100644 sysdeps/ia64/fpu/import_check create mode 100644 sysdeps/ia64/fpu/import_diffs create mode 100644 sysdeps/ia64/fpu/import_file.awk create mode 100644 sysdeps/ia64/fpu/import_intel_libm create mode 100644 sysdeps/ia64/fpu/k_rem_pio2.c create mode 100644 sysdeps/ia64/fpu/k_rem_pio2f.c create mode 100644 sysdeps/ia64/fpu/k_rem_pio2l.c create mode 100644 sysdeps/ia64/fpu/libc_libm_error.c create mode 100644 sysdeps/ia64/fpu/libm-symbols.h create mode 100644 sysdeps/ia64/fpu/libm-test-ulps create mode 100644 sysdeps/ia64/fpu/libm_cpu_defs.h create mode 100644 sysdeps/ia64/fpu/libm_error.c create mode 100644 sysdeps/ia64/fpu/libm_error_codes.h create mode 100644 sysdeps/ia64/fpu/libm_frexp.S create mode 100644 sysdeps/ia64/fpu/libm_frexp4.S create mode 100644 sysdeps/ia64/fpu/libm_frexp4f.S create mode 100644 sysdeps/ia64/fpu/libm_frexp4l.S create mode 100644 sysdeps/ia64/fpu/libm_frexpf.S create mode 100644 sysdeps/ia64/fpu/libm_frexpl.S create mode 100644 sysdeps/ia64/fpu/libm_lgamma.S create mode 100644 sysdeps/ia64/fpu/libm_lgammaf.S create mode 100644 sysdeps/ia64/fpu/libm_lgammal.S create mode 100644 sysdeps/ia64/fpu/libm_reduce.S create mode 100644 sysdeps/ia64/fpu/libm_scalblnf.S create mode 100644 sysdeps/ia64/fpu/libm_sincos.S create mode 100644 sysdeps/ia64/fpu/libm_sincos_large.S create mode 100644 sysdeps/ia64/fpu/libm_sincosf.S create mode 100644 sysdeps/ia64/fpu/libm_sincosl.S create mode 100644 sysdeps/ia64/fpu/libm_support.h create mode 100644 sysdeps/ia64/fpu/libm_tan.S create mode 100644 sysdeps/ia64/fpu/math_ldbl.h create mode 100644 sysdeps/ia64/fpu/mpa.c create mode 100644 sysdeps/ia64/fpu/mpatan.c create mode 100644 sysdeps/ia64/fpu/mpatan2.c create mode 100644 sysdeps/ia64/fpu/mpexp.c create mode 100644 sysdeps/ia64/fpu/mplog.c create mode 100644 sysdeps/ia64/fpu/mpsqrt.c create mode 100644 sysdeps/ia64/fpu/mptan.c create mode 100644 sysdeps/ia64/fpu/printf_fphex.c create mode 100644 sysdeps/ia64/fpu/s_asinh.S create mode 100644 sysdeps/ia64/fpu/s_asinhf.S create mode 100644 sysdeps/ia64/fpu/s_asinhl.S create mode 100644 sysdeps/ia64/fpu/s_atan.S create mode 100644 sysdeps/ia64/fpu/s_atanf.S create mode 100644 sysdeps/ia64/fpu/s_atanl.S create mode 100644 sysdeps/ia64/fpu/s_cbrt.S create mode 100644 sysdeps/ia64/fpu/s_cbrtf.S create mode 100644 sysdeps/ia64/fpu/s_cbrtl.S create mode 100644 sysdeps/ia64/fpu/s_ceil.S create mode 100644 sysdeps/ia64/fpu/s_ceilf.S create mode 100644 sysdeps/ia64/fpu/s_ceill.S create mode 100644 sysdeps/ia64/fpu/s_copysign.S create mode 100644 sysdeps/ia64/fpu/s_copysignf.S create mode 100644 sysdeps/ia64/fpu/s_copysignl.S create mode 100644 sysdeps/ia64/fpu/s_cos.S create mode 100644 sysdeps/ia64/fpu/s_cosf.S create mode 100644 sysdeps/ia64/fpu/s_cosl.S create mode 100644 sysdeps/ia64/fpu/s_erf.S create mode 100644 sysdeps/ia64/fpu/s_erfc.S create mode 100644 sysdeps/ia64/fpu/s_erfcf.S create mode 100644 sysdeps/ia64/fpu/s_erfcl.S create mode 100644 sysdeps/ia64/fpu/s_erff.S create mode 100644 sysdeps/ia64/fpu/s_erfl.S create mode 100644 sysdeps/ia64/fpu/s_expm1.S create mode 100644 sysdeps/ia64/fpu/s_expm1f.S create mode 100644 sysdeps/ia64/fpu/s_expm1l.S create mode 100644 sysdeps/ia64/fpu/s_fabs.S create mode 100644 sysdeps/ia64/fpu/s_fabsf.S create mode 100644 sysdeps/ia64/fpu/s_fabsl.S create mode 100644 sysdeps/ia64/fpu/s_fdim.S create mode 100644 sysdeps/ia64/fpu/s_fdimf.S create mode 100644 sysdeps/ia64/fpu/s_fdiml.S create mode 100644 sysdeps/ia64/fpu/s_finite.S create mode 100644 sysdeps/ia64/fpu/s_finitef.S create mode 100644 sysdeps/ia64/fpu/s_finitel.S create mode 100644 sysdeps/ia64/fpu/s_floor.S create mode 100644 sysdeps/ia64/fpu/s_floorf.S create mode 100644 sysdeps/ia64/fpu/s_floorl.S create mode 100644 sysdeps/ia64/fpu/s_fma.S create mode 100644 sysdeps/ia64/fpu/s_fmaf.S create mode 100644 sysdeps/ia64/fpu/s_fmal.S create mode 100644 sysdeps/ia64/fpu/s_fmax.S create mode 100644 sysdeps/ia64/fpu/s_fmaxf.S create mode 100644 sysdeps/ia64/fpu/s_fmaxl.S create mode 100644 sysdeps/ia64/fpu/s_fpclassify.S create mode 100644 sysdeps/ia64/fpu/s_fpclassifyf.S create mode 100644 sysdeps/ia64/fpu/s_fpclassifyl.S create mode 100644 sysdeps/ia64/fpu/s_frexp.c create mode 100644 sysdeps/ia64/fpu/s_frexpf.c create mode 100644 sysdeps/ia64/fpu/s_frexpl.c create mode 100644 sysdeps/ia64/fpu/s_ilogb.S create mode 100644 sysdeps/ia64/fpu/s_ilogbf.S create mode 100644 sysdeps/ia64/fpu/s_ilogbl.S create mode 100644 sysdeps/ia64/fpu/s_isinf.S create mode 100644 sysdeps/ia64/fpu/s_isinff.S create mode 100644 sysdeps/ia64/fpu/s_isinfl.S create mode 100644 sysdeps/ia64/fpu/s_isnan.S create mode 100644 sysdeps/ia64/fpu/s_isnanf.S create mode 100644 sysdeps/ia64/fpu/s_isnanl.S create mode 100644 sysdeps/ia64/fpu/s_ldexp.c create mode 100644 sysdeps/ia64/fpu/s_ldexpf.c create mode 100644 sysdeps/ia64/fpu/s_ldexpl.c create mode 100644 sysdeps/ia64/fpu/s_libm_ldexp.S create mode 100644 sysdeps/ia64/fpu/s_libm_ldexpf.S create mode 100644 sysdeps/ia64/fpu/s_libm_ldexpl.S create mode 100644 sysdeps/ia64/fpu/s_libm_scalbn.S create mode 100644 sysdeps/ia64/fpu/s_libm_scalbnf.S create mode 100644 sysdeps/ia64/fpu/s_libm_scalbnl.S create mode 100644 sysdeps/ia64/fpu/s_log1p.S create mode 100644 sysdeps/ia64/fpu/s_log1pf.S create mode 100644 sysdeps/ia64/fpu/s_log1pl.S create mode 100644 sysdeps/ia64/fpu/s_logb.S create mode 100644 sysdeps/ia64/fpu/s_logbf.S create mode 100644 sysdeps/ia64/fpu/s_logbl.S create mode 100644 sysdeps/ia64/fpu/s_matherrf.c create mode 100644 sysdeps/ia64/fpu/s_matherrl.c create mode 100644 sysdeps/ia64/fpu/s_modf.S create mode 100644 sysdeps/ia64/fpu/s_modff.S create mode 100644 sysdeps/ia64/fpu/s_modfl.S create mode 100644 sysdeps/ia64/fpu/s_nearbyint.S create mode 100644 sysdeps/ia64/fpu/s_nearbyintf.S create mode 100644 sysdeps/ia64/fpu/s_nearbyintl.S create mode 100644 sysdeps/ia64/fpu/s_nextafter.S create mode 100644 sysdeps/ia64/fpu/s_nextafterf.S create mode 100644 sysdeps/ia64/fpu/s_nextafterl.S create mode 100644 sysdeps/ia64/fpu/s_nexttoward.S create mode 100644 sysdeps/ia64/fpu/s_nexttowardf.S create mode 100644 sysdeps/ia64/fpu/s_nexttowardl.S create mode 100644 sysdeps/ia64/fpu/s_rint.S create mode 100644 sysdeps/ia64/fpu/s_rintf.S create mode 100644 sysdeps/ia64/fpu/s_rintl.S create mode 100644 sysdeps/ia64/fpu/s_round.S create mode 100644 sysdeps/ia64/fpu/s_roundf.S create mode 100644 sysdeps/ia64/fpu/s_roundl.S create mode 100644 sysdeps/ia64/fpu/s_scalblnf.c create mode 100644 sysdeps/ia64/fpu/s_scalbn.c create mode 100644 sysdeps/ia64/fpu/s_scalbnf.c create mode 100644 sysdeps/ia64/fpu/s_scalbnl.c create mode 100644 sysdeps/ia64/fpu/s_signbit.S create mode 100644 sysdeps/ia64/fpu/s_signbitf.S create mode 100644 sysdeps/ia64/fpu/s_signbitl.S create mode 100644 sysdeps/ia64/fpu/s_significand.S create mode 100644 sysdeps/ia64/fpu/s_significandf.S create mode 100644 sysdeps/ia64/fpu/s_significandl.S create mode 100644 sysdeps/ia64/fpu/s_sin.c create mode 100644 sysdeps/ia64/fpu/s_sincos.c create mode 100644 sysdeps/ia64/fpu/s_sincosf.c create mode 100644 sysdeps/ia64/fpu/s_sincosl.c create mode 100644 sysdeps/ia64/fpu/s_sinf.c create mode 100644 sysdeps/ia64/fpu/s_sinl.c create mode 100644 sysdeps/ia64/fpu/s_tan.S create mode 100644 sysdeps/ia64/fpu/s_tanf.S create mode 100644 sysdeps/ia64/fpu/s_tanh.S create mode 100644 sysdeps/ia64/fpu/s_tanhf.S create mode 100644 sysdeps/ia64/fpu/s_tanhl.S create mode 100644 sysdeps/ia64/fpu/s_tanl.S create mode 100644 sysdeps/ia64/fpu/s_trunc.S create mode 100644 sysdeps/ia64/fpu/s_truncf.S create mode 100644 sysdeps/ia64/fpu/s_truncl.S create mode 100644 sysdeps/ia64/fpu/sincos32.c create mode 100644 sysdeps/ia64/fpu/slowexp.c create mode 100644 sysdeps/ia64/fpu/slowpow.c create mode 100644 sysdeps/ia64/fpu/t_exp.c create mode 100644 sysdeps/ia64/fpu/w_acos.c create mode 100644 sysdeps/ia64/fpu/w_acosf.c create mode 100644 sysdeps/ia64/fpu/w_acosh.c create mode 100644 sysdeps/ia64/fpu/w_acoshf.c create mode 100644 sysdeps/ia64/fpu/w_acoshl.c create mode 100644 sysdeps/ia64/fpu/w_acosl.c create mode 100644 sysdeps/ia64/fpu/w_asin.c create mode 100644 sysdeps/ia64/fpu/w_asinf.c create mode 100644 sysdeps/ia64/fpu/w_asinl.c create mode 100644 sysdeps/ia64/fpu/w_atan2.c create mode 100644 sysdeps/ia64/fpu/w_atan2f.c create mode 100644 sysdeps/ia64/fpu/w_atan2l.c create mode 100644 sysdeps/ia64/fpu/w_atanh.c create mode 100644 sysdeps/ia64/fpu/w_atanhf.c create mode 100644 sysdeps/ia64/fpu/w_atanhl.c create mode 100644 sysdeps/ia64/fpu/w_cosh.c create mode 100644 sysdeps/ia64/fpu/w_coshf.c create mode 100644 sysdeps/ia64/fpu/w_coshl.c create mode 100644 sysdeps/ia64/fpu/w_exp.c create mode 100644 sysdeps/ia64/fpu/w_exp10.c create mode 100644 sysdeps/ia64/fpu/w_exp10f.c create mode 100644 sysdeps/ia64/fpu/w_exp10l.c create mode 100644 sysdeps/ia64/fpu/w_exp2.c create mode 100644 sysdeps/ia64/fpu/w_exp2f.c create mode 100644 sysdeps/ia64/fpu/w_exp2l.c create mode 100644 sysdeps/ia64/fpu/w_expf.c create mode 100644 sysdeps/ia64/fpu/w_expl.c create mode 100644 sysdeps/ia64/fpu/w_fmod.c create mode 100644 sysdeps/ia64/fpu/w_fmodf.c create mode 100644 sysdeps/ia64/fpu/w_fmodl.c create mode 100644 sysdeps/ia64/fpu/w_hypot.c create mode 100644 sysdeps/ia64/fpu/w_hypotf.c create mode 100644 sysdeps/ia64/fpu/w_hypotl.c create mode 100644 sysdeps/ia64/fpu/w_lgamma.c create mode 100644 sysdeps/ia64/fpu/w_lgamma_r.c create mode 100644 sysdeps/ia64/fpu/w_lgammaf.c create mode 100644 sysdeps/ia64/fpu/w_lgammaf_r.c create mode 100644 sysdeps/ia64/fpu/w_lgammal.c create mode 100644 sysdeps/ia64/fpu/w_lgammal_r.c create mode 100644 sysdeps/ia64/fpu/w_log.c create mode 100644 sysdeps/ia64/fpu/w_log10.c create mode 100644 sysdeps/ia64/fpu/w_log10f.c create mode 100644 sysdeps/ia64/fpu/w_log10l.c create mode 100644 sysdeps/ia64/fpu/w_log2.c create mode 100644 sysdeps/ia64/fpu/w_log2f.c create mode 100644 sysdeps/ia64/fpu/w_log2l.c create mode 100644 sysdeps/ia64/fpu/w_logf.c create mode 100644 sysdeps/ia64/fpu/w_logl.c create mode 100644 sysdeps/ia64/fpu/w_pow.c create mode 100644 sysdeps/ia64/fpu/w_powf.c create mode 100644 sysdeps/ia64/fpu/w_powl.c create mode 100644 sysdeps/ia64/fpu/w_remainder.c create mode 100644 sysdeps/ia64/fpu/w_remainderf.c create mode 100644 sysdeps/ia64/fpu/w_remainderl.c create mode 100644 sysdeps/ia64/fpu/w_scalb.c create mode 100644 sysdeps/ia64/fpu/w_scalbf.c create mode 100644 sysdeps/ia64/fpu/w_scalbl.c create mode 100644 sysdeps/ia64/fpu/w_sinh.c create mode 100644 sysdeps/ia64/fpu/w_sinhf.c create mode 100644 sysdeps/ia64/fpu/w_sinhl.c create mode 100644 sysdeps/ia64/fpu/w_sqrt.c create mode 100644 sysdeps/ia64/fpu/w_sqrtf.c create mode 100644 sysdeps/ia64/fpu/w_sqrtl.c create mode 100644 sysdeps/ia64/fpu/w_tgamma.S create mode 100644 sysdeps/ia64/fpu/w_tgammaf.S create mode 100644 sysdeps/ia64/fpu/w_tgammal.S create mode 100644 sysdeps/ia64/gccframe.h create mode 100644 sysdeps/ia64/hp-timing.c create mode 100644 sysdeps/ia64/hp-timing.h create mode 100644 sysdeps/ia64/htonl.S create mode 100644 sysdeps/ia64/htons.S create mode 100644 sysdeps/ia64/ia64libgcc.S create mode 100644 sysdeps/ia64/ieee754.h create mode 100644 sysdeps/ia64/jmpbuf-unwind.h create mode 100644 sysdeps/ia64/ldbl2mpn.c create mode 100644 sysdeps/ia64/libc-tls.c create mode 100644 sysdeps/ia64/machine-gmon.h create mode 100644 sysdeps/ia64/memccpy.S create mode 100644 sysdeps/ia64/memchr.S create mode 100644 sysdeps/ia64/memcmp.S create mode 100644 sysdeps/ia64/memcpy.S create mode 100644 sysdeps/ia64/memmove.S create mode 100644 sysdeps/ia64/memset.S create mode 100644 sysdeps/ia64/memusage.h create mode 100644 sysdeps/ia64/nptl/Makefile create mode 100644 sysdeps/ia64/nptl/pthread_spin_lock.c create mode 100644 sysdeps/ia64/nptl/pthread_spin_trylock.c create mode 100644 sysdeps/ia64/nptl/pthread_spin_unlock.c create mode 100644 sysdeps/ia64/nptl/pthreaddef.h create mode 100644 sysdeps/ia64/nptl/tcb-offsets.sym create mode 100644 sysdeps/ia64/nptl/tls.h create mode 100644 sysdeps/ia64/sched_cpucount.c create mode 100644 sysdeps/ia64/softpipe.h create mode 100644 sysdeps/ia64/stackinfo.h create mode 100644 sysdeps/ia64/strcat.c create mode 100644 sysdeps/ia64/strchr.S create mode 100644 sysdeps/ia64/strcmp.S create mode 100644 sysdeps/ia64/strcpy.S create mode 100644 sysdeps/ia64/strlen.S create mode 100644 sysdeps/ia64/strncmp.S create mode 100644 sysdeps/ia64/strncpy.S create mode 100644 sysdeps/ia64/sysdep.h create mode 100644 sysdeps/unix/sysv/linux/ia64/Implies create mode 100644 sysdeps/unix/sysv/linux/ia64/Makefile create mode 100644 sysdeps/unix/sysv/linux/ia64/Versions create mode 100644 sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S create mode 100644 sysdeps/unix/sysv/linux/ia64/__longjmp.S create mode 100644 sysdeps/unix/sysv/linux/ia64/__start_context.S create mode 100644 sysdeps/unix/sysv/linux/ia64/bits/endian.h create mode 100644 sysdeps/unix/sysv/linux/ia64/bits/fcntl.h create mode 100644 sysdeps/unix/sysv/linux/ia64/bits/ipc.h create mode 100644 sysdeps/unix/sysv/linux/ia64/bits/mman.h create mode 100644 sysdeps/unix/sysv/linux/ia64/bits/msq.h create mode 100644 sysdeps/unix/sysv/linux/ia64/bits/sem.h create mode 100644 sysdeps/unix/sysv/linux/ia64/bits/setjmp.h create mode 100644 sysdeps/unix/sysv/linux/ia64/bits/shm.h create mode 100644 sysdeps/unix/sysv/linux/ia64/bits/sigaction.h create mode 100644 sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h create mode 100644 sysdeps/unix/sysv/linux/ia64/bits/siginfo.h create mode 100644 sysdeps/unix/sysv/linux/ia64/bits/sigstack.h create mode 100644 sysdeps/unix/sysv/linux/ia64/bits/stat.h create mode 100644 sysdeps/unix/sysv/linux/ia64/brk.S create mode 100644 sysdeps/unix/sysv/linux/ia64/bsd-_setjmp.S create mode 100644 sysdeps/unix/sysv/linux/ia64/bsd-setjmp.S create mode 100644 sysdeps/unix/sysv/linux/ia64/clock_getcpuclockid.c create mode 100644 sysdeps/unix/sysv/linux/ia64/clone.S create mode 100644 sysdeps/unix/sysv/linux/ia64/clone2.S create mode 100644 sysdeps/unix/sysv/linux/ia64/dl-brk.S create mode 100644 sysdeps/unix/sysv/linux/ia64/dl-cache.h create mode 100644 sysdeps/unix/sysv/linux/ia64/dl-static.c create mode 100644 sysdeps/unix/sysv/linux/ia64/fork.S create mode 100644 sysdeps/unix/sysv/linux/ia64/get_clockfreq.c create mode 100644 sysdeps/unix/sysv/linux/ia64/getclktck.c create mode 100644 sysdeps/unix/sysv/linux/ia64/getcontext.S create mode 100644 sysdeps/unix/sysv/linux/ia64/getpagesize.c create mode 100644 sysdeps/unix/sysv/linux/ia64/has_cpuclock.c create mode 100644 sysdeps/unix/sysv/linux/ia64/ioperm.c create mode 100644 sysdeps/unix/sysv/linux/ia64/kernel_stat.h create mode 100644 sysdeps/unix/sysv/linux/ia64/ldconfig.h create mode 100644 sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed create mode 100644 sysdeps/unix/sysv/linux/ia64/ldsodefs.h create mode 100644 sysdeps/unix/sysv/linux/ia64/makecontext.c create mode 100644 sysdeps/unix/sysv/linux/ia64/nptl/Makefile create mode 100644 sysdeps/unix/sysv/linux/ia64/nptl/Versions create mode 100644 sysdeps/unix/sysv/linux/ia64/nptl/__ia64_longjmp.S create mode 100644 sysdeps/unix/sysv/linux/ia64/nptl/__sigstack_longjmp.c create mode 100644 sysdeps/unix/sysv/linux/ia64/nptl/bits/local_lim.h create mode 100644 sysdeps/unix/sysv/linux/ia64/nptl/bits/pthreadtypes.h create mode 100644 sysdeps/unix/sysv/linux/ia64/nptl/bits/semaphore.h create mode 100644 sysdeps/unix/sysv/linux/ia64/nptl/clone2.S create mode 100644 sysdeps/unix/sysv/linux/ia64/nptl/createthread.c create mode 100644 sysdeps/unix/sysv/linux/ia64/nptl/dl-sysdep.h create mode 100644 sysdeps/unix/sysv/linux/ia64/nptl/fork.c create mode 100644 sysdeps/unix/sysv/linux/ia64/nptl/lowlevellock.h create mode 100644 sysdeps/unix/sysv/linux/ia64/nptl/pt-initfini.c create mode 100644 sysdeps/unix/sysv/linux/ia64/nptl/pt-vfork.S create mode 100644 sysdeps/unix/sysv/linux/ia64/nptl/pthread_once.c create mode 100644 sysdeps/unix/sysv/linux/ia64/nptl/sysdep-cancel.h create mode 100644 sysdeps/unix/sysv/linux/ia64/nptl/timer_create.c create mode 100644 sysdeps/unix/sysv/linux/ia64/nptl/timer_delete.c create mode 100644 sysdeps/unix/sysv/linux/ia64/nptl/timer_getoverr.c create mode 100644 sysdeps/unix/sysv/linux/ia64/nptl/timer_gettime.c create mode 100644 sysdeps/unix/sysv/linux/ia64/nptl/timer_settime.c create mode 100644 sysdeps/unix/sysv/linux/ia64/nptl/unwind-forcedunwind.c create mode 100644 sysdeps/unix/sysv/linux/ia64/nptl/unwind_longjmp.c create mode 100644 sysdeps/unix/sysv/linux/ia64/nptl/vfork.S create mode 100644 sysdeps/unix/sysv/linux/ia64/pipe.S create mode 100644 sysdeps/unix/sysv/linux/ia64/profil-counter.h create mode 100644 sysdeps/unix/sysv/linux/ia64/readelflib.c create mode 100644 sysdeps/unix/sysv/linux/ia64/register-dump.h create mode 100644 sysdeps/unix/sysv/linux/ia64/rt-sysdep.S create mode 100644 sysdeps/unix/sysv/linux/ia64/setcontext.S create mode 100644 sysdeps/unix/sysv/linux/ia64/setjmp.S create mode 100644 sysdeps/unix/sysv/linux/ia64/sigaction.c create mode 100644 sysdeps/unix/sysv/linux/ia64/sigcontext-offsets.sym create mode 100644 sysdeps/unix/sysv/linux/ia64/sigcontextinfo.h create mode 100644 sysdeps/unix/sysv/linux/ia64/sigpending.c create mode 100644 sysdeps/unix/sysv/linux/ia64/sigprocmask.c create mode 100644 sysdeps/unix/sysv/linux/ia64/swapcontext.c create mode 100644 sysdeps/unix/sysv/linux/ia64/sys/io.h create mode 100644 sysdeps/unix/sysv/linux/ia64/sys/procfs.h create mode 100644 sysdeps/unix/sysv/linux/ia64/sys/ptrace.h create mode 100644 sysdeps/unix/sysv/linux/ia64/sys/rse.h create mode 100644 sysdeps/unix/sysv/linux/ia64/sys/ucontext.h create mode 100644 sysdeps/unix/sysv/linux/ia64/sys/user.h create mode 100644 sysdeps/unix/sysv/linux/ia64/syscall.S create mode 100644 sysdeps/unix/sysv/linux/ia64/syscalls.list create mode 100644 sysdeps/unix/sysv/linux/ia64/sysconf.c create mode 100644 sysdeps/unix/sysv/linux/ia64/sysdep.S create mode 100644 sysdeps/unix/sysv/linux/ia64/sysdep.h create mode 100644 sysdeps/unix/sysv/linux/ia64/system.c create mode 100644 sysdeps/unix/sysv/linux/ia64/ucontext_i.h create mode 100644 sysdeps/unix/sysv/linux/ia64/umount.c create mode 100644 sysdeps/unix/sysv/linux/ia64/unwind-dw2-fde.c create mode 100644 sysdeps/unix/sysv/linux/ia64/vfork.S create mode 100644 sysdeps/unix/sysv/linux/ia64/wordexp.c diff --git a/ChangeLog.ia64 b/ChangeLog.ia64 new file mode 100644 index 0000000000..198dd0be0b --- /dev/null +++ b/ChangeLog.ia64 @@ -0,0 +1,480 @@ +2012-04-22 Mike Frysinger + + * sysdeps/ia64/Implies: Copied from the main tree. + * sysdeps/ia64/Makefile: Likewise. + * sysdeps/ia64/Versions: Likewise. + * sysdeps/ia64/_mcount.S: Likewise. + * sysdeps/ia64/abort-instr.h: Likewise. + * sysdeps/ia64/backtrace.c: Likewise. + * sysdeps/ia64/bcopy.S: Likewise. + * sysdeps/ia64/bits/atomic.h: Likewise. + * sysdeps/ia64/bits/byteswap.h: Likewise. + * sysdeps/ia64/bits/fenv.h: Likewise. + * sysdeps/ia64/bits/huge_vall.h: Likewise. + * sysdeps/ia64/bits/link.h: Likewise. + * sysdeps/ia64/bits/linkmap.h: Likewise. + * sysdeps/ia64/bits/mathdef.h: Likewise. + * sysdeps/ia64/bits/xtitypes.h: Likewise. + * sysdeps/ia64/bzero.S: Likewise. + * sysdeps/ia64/configure: Likewise. + * sysdeps/ia64/configure.in: Likewise. + * sysdeps/ia64/dl-dtprocnum.h: Likewise. + * sysdeps/ia64/dl-fptr.h: Likewise. + * sysdeps/ia64/dl-lookupcfg.h: Likewise. + * sysdeps/ia64/dl-machine.h: Likewise. + * sysdeps/ia64/dl-sysdep.h: Likewise. + * sysdeps/ia64/dl-tls.h: Likewise. + * sysdeps/ia64/dl-trampoline.S: Likewise. + * sysdeps/ia64/elf/configure: Likewise. + * sysdeps/ia64/elf/configure.in: Likewise. + * sysdeps/ia64/elf/entry.h: Likewise. + * sysdeps/ia64/elf/initfini.c: Likewise. + * sysdeps/ia64/elf/start.S: Likewise. + * sysdeps/ia64/fpu/Makefile: Likewise. + * sysdeps/ia64/fpu/README: Likewise. + * sysdeps/ia64/fpu/Versions: Likewise. + * sysdeps/ia64/fpu/bits/math-finite.h: Likewise. + * sysdeps/ia64/fpu/bits/mathinline.h: Likewise. + * sysdeps/ia64/fpu/branred.c: Likewise. + * sysdeps/ia64/fpu/doasin.c: Likewise. + * sysdeps/ia64/fpu/dosincos.c: Likewise. + * sysdeps/ia64/fpu/e_acos.S: Likewise. + * sysdeps/ia64/fpu/e_acosf.S: Likewise. + * sysdeps/ia64/fpu/e_acosh.S: Likewise. + * sysdeps/ia64/fpu/e_acoshf.S: Likewise. + * sysdeps/ia64/fpu/e_acoshl.S: Likewise. + * sysdeps/ia64/fpu/e_acosl.S: Likewise. + * sysdeps/ia64/fpu/e_asin.S: Likewise. + * sysdeps/ia64/fpu/e_asinf.S: Likewise. + * sysdeps/ia64/fpu/e_asinl.S: Likewise. + * sysdeps/ia64/fpu/e_atan2.S: Likewise. + * sysdeps/ia64/fpu/e_atan2f.S: Likewise. + * sysdeps/ia64/fpu/e_atan2l.c: Likewise. + * sysdeps/ia64/fpu/e_atanh.S: Likewise. + * sysdeps/ia64/fpu/e_atanhf.S: Likewise. + * sysdeps/ia64/fpu/e_atanhl.S: Likewise. + * sysdeps/ia64/fpu/e_cosh.S: Likewise. + * sysdeps/ia64/fpu/e_coshf.S: Likewise. + * sysdeps/ia64/fpu/e_coshl.S: Likewise. + * sysdeps/ia64/fpu/e_exp.S: Likewise. + * sysdeps/ia64/fpu/e_exp10.S: Likewise. + * sysdeps/ia64/fpu/e_exp10f.S: Likewise. + * sysdeps/ia64/fpu/e_exp10l.S: Likewise. + * sysdeps/ia64/fpu/e_exp2.S: Likewise. + * sysdeps/ia64/fpu/e_exp2f.S: Likewise. + * sysdeps/ia64/fpu/e_exp2l.S: Likewise. + * sysdeps/ia64/fpu/e_expf.S: Likewise. + * sysdeps/ia64/fpu/e_expl.c: Likewise. + * sysdeps/ia64/fpu/e_fmod.S: Likewise. + * sysdeps/ia64/fpu/e_fmodf.S: Likewise. + * sysdeps/ia64/fpu/e_fmodl.S: Likewise. + * sysdeps/ia64/fpu/e_gamma_r.c: Likewise. + * sysdeps/ia64/fpu/e_gammaf_r.c: Likewise. + * sysdeps/ia64/fpu/e_gammal_r.c: Likewise. + * sysdeps/ia64/fpu/e_hypot.S: Likewise. + * sysdeps/ia64/fpu/e_hypotf.S: Likewise. + * sysdeps/ia64/fpu/e_hypotl.S: Likewise. + * sysdeps/ia64/fpu/e_lgamma_r.c: Likewise. + * sysdeps/ia64/fpu/e_lgammaf_r.c: Likewise. + * sysdeps/ia64/fpu/e_lgammal_r.c: Likewise. + * sysdeps/ia64/fpu/e_log.S: Likewise. + * sysdeps/ia64/fpu/e_log10.c: Likewise. + * sysdeps/ia64/fpu/e_log10f.c: Likewise. + * sysdeps/ia64/fpu/e_log10l.c: Likewise. + * sysdeps/ia64/fpu/e_log2.S: Likewise. + * sysdeps/ia64/fpu/e_log2f.S: Likewise. + * sysdeps/ia64/fpu/e_log2l.S: Likewise. + * sysdeps/ia64/fpu/e_logf.S: Likewise. + * sysdeps/ia64/fpu/e_logl.S: Likewise. + * sysdeps/ia64/fpu/e_pow.S: Likewise. + * sysdeps/ia64/fpu/e_powf.S: Likewise. + * sysdeps/ia64/fpu/e_powl.S: Likewise. + * sysdeps/ia64/fpu/e_rem_pio2.c: Likewise. + * sysdeps/ia64/fpu/e_rem_pio2f.c: Likewise. + * sysdeps/ia64/fpu/e_remainder.S: Likewise. + * sysdeps/ia64/fpu/e_remainderf.S: Likewise. + * sysdeps/ia64/fpu/e_remainderl.S: Likewise. + * sysdeps/ia64/fpu/e_scalb.S: Likewise. + * sysdeps/ia64/fpu/e_scalbf.S: Likewise. + * sysdeps/ia64/fpu/e_scalbl.S: Likewise. + * sysdeps/ia64/fpu/e_sinh.S: Likewise. + * sysdeps/ia64/fpu/e_sinhf.S: Likewise. + * sysdeps/ia64/fpu/e_sinhl.S: Likewise. + * sysdeps/ia64/fpu/e_sqrt.S: Likewise. + * sysdeps/ia64/fpu/e_sqrtf.S: Likewise. + * sysdeps/ia64/fpu/e_sqrtl.S: Likewise. + * sysdeps/ia64/fpu/fclrexcpt.c: Likewise. + * sysdeps/ia64/fpu/fedisblxcpt.c: Likewise. + * sysdeps/ia64/fpu/feenablxcpt.c: Likewise. + * sysdeps/ia64/fpu/fegetenv.c: Likewise. + * sysdeps/ia64/fpu/fegetexcept.c: Likewise. + * sysdeps/ia64/fpu/fegetround.c: Likewise. + * sysdeps/ia64/fpu/feholdexcpt.c: Likewise. + * sysdeps/ia64/fpu/fesetenv.c: Likewise. + * sysdeps/ia64/fpu/fesetround.c: Likewise. + * sysdeps/ia64/fpu/feupdateenv.c: Likewise. + * sysdeps/ia64/fpu/fgetexcptflg.c: Likewise. + * sysdeps/ia64/fpu/fraiseexcpt.c: Likewise. + * sysdeps/ia64/fpu/fsetexcptflg.c: Likewise. + * sysdeps/ia64/fpu/ftestexcept.c: Likewise. + * sysdeps/ia64/fpu/gen_import_file_list: Likewise. + * sysdeps/ia64/fpu/halfulp.c: Likewise. + * sysdeps/ia64/fpu/import_check: Likewise. + * sysdeps/ia64/fpu/import_diffs: Likewise. + * sysdeps/ia64/fpu/import_file.awk: Likewise. + * sysdeps/ia64/fpu/import_intel_libm: Likewise. + * sysdeps/ia64/fpu/k_rem_pio2.c: Likewise. + * sysdeps/ia64/fpu/k_rem_pio2f.c: Likewise. + * sysdeps/ia64/fpu/k_rem_pio2l.c: Likewise. + * sysdeps/ia64/fpu/libc_libm_error.c: Likewise. + * sysdeps/ia64/fpu/libm-symbols.h: Likewise. + * sysdeps/ia64/fpu/libm-test-ulps: Likewise. + * sysdeps/ia64/fpu/libm_cpu_defs.h: Likewise. + * sysdeps/ia64/fpu/libm_error.c: Likewise. + * sysdeps/ia64/fpu/libm_error_codes.h: Likewise. + * sysdeps/ia64/fpu/libm_frexp.S: Likewise. + * sysdeps/ia64/fpu/libm_frexp4.S: Likewise. + * sysdeps/ia64/fpu/libm_frexp4f.S: Likewise. + * sysdeps/ia64/fpu/libm_frexp4l.S: Likewise. + * sysdeps/ia64/fpu/libm_frexpf.S: Likewise. + * sysdeps/ia64/fpu/libm_frexpl.S: Likewise. + * sysdeps/ia64/fpu/libm_lgamma.S: Likewise. + * sysdeps/ia64/fpu/libm_lgammaf.S: Likewise. + * sysdeps/ia64/fpu/libm_lgammal.S: Likewise. + * sysdeps/ia64/fpu/libm_reduce.S: Likewise. + * sysdeps/ia64/fpu/libm_scalblnf.S: Likewise. + * sysdeps/ia64/fpu/libm_sincos.S: Likewise. + * sysdeps/ia64/fpu/libm_sincos_large.S: Likewise. + * sysdeps/ia64/fpu/libm_sincosf.S: Likewise. + * sysdeps/ia64/fpu/libm_sincosl.S: Likewise. + * sysdeps/ia64/fpu/libm_support.h: Likewise. + * sysdeps/ia64/fpu/libm_tan.S: Likewise. + * sysdeps/ia64/fpu/math_ldbl.h: Likewise. + * sysdeps/ia64/fpu/mpa.c: Likewise. + * sysdeps/ia64/fpu/mpatan.c: Likewise. + * sysdeps/ia64/fpu/mpatan2.c: Likewise. + * sysdeps/ia64/fpu/mpexp.c: Likewise. + * sysdeps/ia64/fpu/mplog.c: Likewise. + * sysdeps/ia64/fpu/mpsqrt.c: Likewise. + * sysdeps/ia64/fpu/mptan.c: Likewise. + * sysdeps/ia64/fpu/printf_fphex.c: Likewise. + * sysdeps/ia64/fpu/s_asinh.S: Likewise. + * sysdeps/ia64/fpu/s_asinhf.S: Likewise. + * sysdeps/ia64/fpu/s_asinhl.S: Likewise. + * sysdeps/ia64/fpu/s_atan.S: Likewise. + * sysdeps/ia64/fpu/s_atanf.S: Likewise. + * sysdeps/ia64/fpu/s_atanl.S: Likewise. + * sysdeps/ia64/fpu/s_cbrt.S: Likewise. + * sysdeps/ia64/fpu/s_cbrtf.S: Likewise. + * sysdeps/ia64/fpu/s_cbrtl.S: Likewise. + * sysdeps/ia64/fpu/s_ceil.S: Likewise. + * sysdeps/ia64/fpu/s_ceilf.S: Likewise. + * sysdeps/ia64/fpu/s_ceill.S: Likewise. + * sysdeps/ia64/fpu/s_copysign.S: Likewise. + * sysdeps/ia64/fpu/s_copysignf.S: Likewise. + * sysdeps/ia64/fpu/s_copysignl.S: Likewise. + * sysdeps/ia64/fpu/s_cos.S: Likewise. + * sysdeps/ia64/fpu/s_cosf.S: Likewise. + * sysdeps/ia64/fpu/s_cosl.S: Likewise. + * sysdeps/ia64/fpu/s_erf.S: Likewise. + * sysdeps/ia64/fpu/s_erfc.S: Likewise. + * sysdeps/ia64/fpu/s_erfcf.S: Likewise. + * sysdeps/ia64/fpu/s_erfcl.S: Likewise. + * sysdeps/ia64/fpu/s_erff.S: Likewise. + * sysdeps/ia64/fpu/s_erfl.S: Likewise. + * sysdeps/ia64/fpu/s_expm1.S: Likewise. + * sysdeps/ia64/fpu/s_expm1f.S: Likewise. + * sysdeps/ia64/fpu/s_expm1l.S: Likewise. + * sysdeps/ia64/fpu/s_fabs.S: Likewise. + * sysdeps/ia64/fpu/s_fabsf.S: Likewise. + * sysdeps/ia64/fpu/s_fabsl.S: Likewise. + * sysdeps/ia64/fpu/s_fdim.S: Likewise. + * sysdeps/ia64/fpu/s_fdimf.S: Likewise. + * sysdeps/ia64/fpu/s_fdiml.S: Likewise. + * sysdeps/ia64/fpu/s_finite.S: Likewise. + * sysdeps/ia64/fpu/s_finitef.S: Likewise. + * sysdeps/ia64/fpu/s_finitel.S: Likewise. + * sysdeps/ia64/fpu/s_floor.S: Likewise. + * sysdeps/ia64/fpu/s_floorf.S: Likewise. + * sysdeps/ia64/fpu/s_floorl.S: Likewise. + * sysdeps/ia64/fpu/s_fma.S: Likewise. + * sysdeps/ia64/fpu/s_fmaf.S: Likewise. + * sysdeps/ia64/fpu/s_fmal.S: Likewise. + * sysdeps/ia64/fpu/s_fmax.S: Likewise. + * sysdeps/ia64/fpu/s_fmaxf.S: Likewise. + * sysdeps/ia64/fpu/s_fmaxl.S: Likewise. + * sysdeps/ia64/fpu/s_fpclassify.S: Likewise. + * sysdeps/ia64/fpu/s_fpclassifyf.S: Likewise. + * sysdeps/ia64/fpu/s_fpclassifyl.S: Likewise. + * sysdeps/ia64/fpu/s_frexp.c: Likewise. + * sysdeps/ia64/fpu/s_frexpf.c: Likewise. + * sysdeps/ia64/fpu/s_frexpl.c: Likewise. + * sysdeps/ia64/fpu/s_ilogb.S: Likewise. + * sysdeps/ia64/fpu/s_ilogbf.S: Likewise. + * sysdeps/ia64/fpu/s_ilogbl.S: Likewise. + * sysdeps/ia64/fpu/s_isinf.S: Likewise. + * sysdeps/ia64/fpu/s_isinff.S: Likewise. + * sysdeps/ia64/fpu/s_isinfl.S: Likewise. + * sysdeps/ia64/fpu/s_isnan.S: Likewise. + * sysdeps/ia64/fpu/s_isnanf.S: Likewise. + * sysdeps/ia64/fpu/s_isnanl.S: Likewise. + * sysdeps/ia64/fpu/s_ldexp.c: Likewise. + * sysdeps/ia64/fpu/s_ldexpf.c: Likewise. + * sysdeps/ia64/fpu/s_ldexpl.c: Likewise. + * sysdeps/ia64/fpu/s_libm_ldexp.S: Likewise. + * sysdeps/ia64/fpu/s_libm_ldexpf.S: Likewise. + * sysdeps/ia64/fpu/s_libm_ldexpl.S: Likewise. + * sysdeps/ia64/fpu/s_libm_scalbn.S: Likewise. + * sysdeps/ia64/fpu/s_libm_scalbnf.S: Likewise. + * sysdeps/ia64/fpu/s_libm_scalbnl.S: Likewise. + * sysdeps/ia64/fpu/s_log1p.S: Likewise. + * sysdeps/ia64/fpu/s_log1pf.S: Likewise. + * sysdeps/ia64/fpu/s_log1pl.S: Likewise. + * sysdeps/ia64/fpu/s_logb.S: Likewise. + * sysdeps/ia64/fpu/s_logbf.S: Likewise. + * sysdeps/ia64/fpu/s_logbl.S: Likewise. + * sysdeps/ia64/fpu/s_matherrf.c: Likewise. + * sysdeps/ia64/fpu/s_matherrl.c: Likewise. + * sysdeps/ia64/fpu/s_modf.S: Likewise. + * sysdeps/ia64/fpu/s_modff.S: Likewise. + * sysdeps/ia64/fpu/s_modfl.S: Likewise. + * sysdeps/ia64/fpu/s_nearbyint.S: Likewise. + * sysdeps/ia64/fpu/s_nearbyintf.S: Likewise. + * sysdeps/ia64/fpu/s_nearbyintl.S: Likewise. + * sysdeps/ia64/fpu/s_nextafter.S: Likewise. + * sysdeps/ia64/fpu/s_nextafterf.S: Likewise. + * sysdeps/ia64/fpu/s_nextafterl.S: Likewise. + * sysdeps/ia64/fpu/s_nexttoward.S: Likewise. + * sysdeps/ia64/fpu/s_nexttowardf.S: Likewise. + * sysdeps/ia64/fpu/s_nexttowardl.S: Likewise. + * sysdeps/ia64/fpu/s_rint.S: Likewise. + * sysdeps/ia64/fpu/s_rintf.S: Likewise. + * sysdeps/ia64/fpu/s_rintl.S: Likewise. + * sysdeps/ia64/fpu/s_round.S: Likewise. + * sysdeps/ia64/fpu/s_roundf.S: Likewise. + * sysdeps/ia64/fpu/s_roundl.S: Likewise. + * sysdeps/ia64/fpu/s_scalblnf.c: Likewise. + * sysdeps/ia64/fpu/s_scalbn.c: Likewise. + * sysdeps/ia64/fpu/s_scalbnf.c: Likewise. + * sysdeps/ia64/fpu/s_scalbnl.c: Likewise. + * sysdeps/ia64/fpu/s_signbit.S: Likewise. + * sysdeps/ia64/fpu/s_signbitf.S: Likewise. + * sysdeps/ia64/fpu/s_signbitl.S: Likewise. + * sysdeps/ia64/fpu/s_significand.S: Likewise. + * sysdeps/ia64/fpu/s_significandf.S: Likewise. + * sysdeps/ia64/fpu/s_significandl.S: Likewise. + * sysdeps/ia64/fpu/s_sin.c: Likewise. + * sysdeps/ia64/fpu/s_sincos.c: Likewise. + * sysdeps/ia64/fpu/s_sincosf.c: Likewise. + * sysdeps/ia64/fpu/s_sincosl.c: Likewise. + * sysdeps/ia64/fpu/s_sinf.c: Likewise. + * sysdeps/ia64/fpu/s_sinl.c: Likewise. + * sysdeps/ia64/fpu/s_tan.S: Likewise. + * sysdeps/ia64/fpu/s_tanf.S: Likewise. + * sysdeps/ia64/fpu/s_tanh.S: Likewise. + * sysdeps/ia64/fpu/s_tanhf.S: Likewise. + * sysdeps/ia64/fpu/s_tanhl.S: Likewise. + * sysdeps/ia64/fpu/s_tanl.S: Likewise. + * sysdeps/ia64/fpu/s_trunc.S: Likewise. + * sysdeps/ia64/fpu/s_truncf.S: Likewise. + * sysdeps/ia64/fpu/s_truncl.S: Likewise. + * sysdeps/ia64/fpu/sincos32.c: Likewise. + * sysdeps/ia64/fpu/slowexp.c: Likewise. + * sysdeps/ia64/fpu/slowpow.c: Likewise. + * sysdeps/ia64/fpu/t_exp.c: Likewise. + * sysdeps/ia64/fpu/w_acos.c: Likewise. + * sysdeps/ia64/fpu/w_acosf.c: Likewise. + * sysdeps/ia64/fpu/w_acosh.c: Likewise. + * sysdeps/ia64/fpu/w_acoshf.c: Likewise. + * sysdeps/ia64/fpu/w_acoshl.c: Likewise. + * sysdeps/ia64/fpu/w_acosl.c: Likewise. + * sysdeps/ia64/fpu/w_asin.c: Likewise. + * sysdeps/ia64/fpu/w_asinf.c: Likewise. + * sysdeps/ia64/fpu/w_asinl.c: Likewise. + * sysdeps/ia64/fpu/w_atan2.c: Likewise. + * sysdeps/ia64/fpu/w_atan2f.c: Likewise. + * sysdeps/ia64/fpu/w_atan2l.c: Likewise. + * sysdeps/ia64/fpu/w_atanh.c: Likewise. + * sysdeps/ia64/fpu/w_atanhf.c: Likewise. + * sysdeps/ia64/fpu/w_atanhl.c: Likewise. + * sysdeps/ia64/fpu/w_cosh.c: Likewise. + * sysdeps/ia64/fpu/w_coshf.c: Likewise. + * sysdeps/ia64/fpu/w_coshl.c: Likewise. + * sysdeps/ia64/fpu/w_exp.c: Likewise. + * sysdeps/ia64/fpu/w_exp10.c: Likewise. + * sysdeps/ia64/fpu/w_exp10f.c: Likewise. + * sysdeps/ia64/fpu/w_exp10l.c: Likewise. + * sysdeps/ia64/fpu/w_exp2.c: Likewise. + * sysdeps/ia64/fpu/w_exp2f.c: Likewise. + * sysdeps/ia64/fpu/w_exp2l.c: Likewise. + * sysdeps/ia64/fpu/w_expf.c: Likewise. + * sysdeps/ia64/fpu/w_expl.c: Likewise. + * sysdeps/ia64/fpu/w_fmod.c: Likewise. + * sysdeps/ia64/fpu/w_fmodf.c: Likewise. + * sysdeps/ia64/fpu/w_fmodl.c: Likewise. + * sysdeps/ia64/fpu/w_hypot.c: Likewise. + * sysdeps/ia64/fpu/w_hypotf.c: Likewise. + * sysdeps/ia64/fpu/w_hypotl.c: Likewise. + * sysdeps/ia64/fpu/w_lgamma.c: Likewise. + * sysdeps/ia64/fpu/w_lgamma_r.c: Likewise. + * sysdeps/ia64/fpu/w_lgammaf.c: Likewise. + * sysdeps/ia64/fpu/w_lgammaf_r.c: Likewise. + * sysdeps/ia64/fpu/w_lgammal.c: Likewise. + * sysdeps/ia64/fpu/w_lgammal_r.c: Likewise. + * sysdeps/ia64/fpu/w_log.c: Likewise. + * sysdeps/ia64/fpu/w_log10.c: Likewise. + * sysdeps/ia64/fpu/w_log10f.c: Likewise. + * sysdeps/ia64/fpu/w_log10l.c: Likewise. + * sysdeps/ia64/fpu/w_log2.c: Likewise. + * sysdeps/ia64/fpu/w_log2f.c: Likewise. + * sysdeps/ia64/fpu/w_log2l.c: Likewise. + * sysdeps/ia64/fpu/w_logf.c: Likewise. + * sysdeps/ia64/fpu/w_logl.c: Likewise. + * sysdeps/ia64/fpu/w_pow.c: Likewise. + * sysdeps/ia64/fpu/w_powf.c: Likewise. + * sysdeps/ia64/fpu/w_powl.c: Likewise. + * sysdeps/ia64/fpu/w_remainder.c: Likewise. + * sysdeps/ia64/fpu/w_remainderf.c: Likewise. + * sysdeps/ia64/fpu/w_remainderl.c: Likewise. + * sysdeps/ia64/fpu/w_scalb.c: Likewise. + * sysdeps/ia64/fpu/w_scalbf.c: Likewise. + * sysdeps/ia64/fpu/w_scalbl.c: Likewise. + * sysdeps/ia64/fpu/w_sinh.c: Likewise. + * sysdeps/ia64/fpu/w_sinhf.c: Likewise. + * sysdeps/ia64/fpu/w_sinhl.c: Likewise. + * sysdeps/ia64/fpu/w_sqrt.c: Likewise. + * sysdeps/ia64/fpu/w_sqrtf.c: Likewise. + * sysdeps/ia64/fpu/w_sqrtl.c: Likewise. + * sysdeps/ia64/fpu/w_tgamma.S: Likewise. + * sysdeps/ia64/fpu/w_tgammaf.S: Likewise. + * sysdeps/ia64/fpu/w_tgammal.S: Likewise. + * sysdeps/ia64/gccframe.h: Likewise. + * sysdeps/ia64/hp-timing.c: Likewise. + * sysdeps/ia64/hp-timing.h: Likewise. + * sysdeps/ia64/htonl.S: Likewise. + * sysdeps/ia64/htons.S: Likewise. + * sysdeps/ia64/ia64libgcc.S: Likewise. + * sysdeps/ia64/ieee754.h: Likewise. + * sysdeps/ia64/jmpbuf-unwind.h: Likewise. + * sysdeps/ia64/ldbl2mpn.c: Likewise. + * sysdeps/ia64/libc-tls.c: Likewise. + * sysdeps/ia64/machine-gmon.h: Likewise. + * sysdeps/ia64/memccpy.S: Likewise. + * sysdeps/ia64/memchr.S: Likewise. + * sysdeps/ia64/memcmp.S: Likewise. + * sysdeps/ia64/memcpy.S: Likewise. + * sysdeps/ia64/memmove.S: Likewise. + * sysdeps/ia64/memset.S: Likewise. + * sysdeps/ia64/memusage.h: Likewise. + * sysdeps/ia64/nptl/Makefile: Likewise. + * sysdeps/ia64/nptl/pthread_spin_lock.c: Likewise. + * sysdeps/ia64/nptl/pthread_spin_trylock.c: Likewise. + * sysdeps/ia64/nptl/pthread_spin_unlock.c: Likewise. + * sysdeps/ia64/nptl/pthreaddef.h: Likewise. + * sysdeps/ia64/nptl/tcb-offsets.sym: Likewise. + * sysdeps/ia64/nptl/tls.h: Likewise. + * sysdeps/ia64/sched_cpucount.c: Likewise. + * sysdeps/ia64/softpipe.h: Likewise. + * sysdeps/ia64/stackinfo.h: Likewise. + * sysdeps/ia64/strcat.c: Likewise. + * sysdeps/ia64/strchr.S: Likewise. + * sysdeps/ia64/strcmp.S: Likewise. + * sysdeps/ia64/strcpy.S: Likewise. + * sysdeps/ia64/strlen.S: Likewise. + * sysdeps/ia64/strncmp.S: Likewise. + * sysdeps/ia64/strncpy.S: Likewise. + * sysdeps/ia64/sysdep.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/Implies: Likewise. + * sysdeps/unix/sysv/linux/ia64/Makefile: Likewise. + * sysdeps/unix/sysv/linux/ia64/Versions: Likewise. + * sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S: Likewise. + * sysdeps/unix/sysv/linux/ia64/__longjmp.S: Likewise. + * sysdeps/unix/sysv/linux/ia64/__start_context.S: Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/endian.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/fcntl.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/ipc.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/mman.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/msq.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/sem.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/setjmp.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/shm.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/sigaction.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/siginfo.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/sigstack.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/stat.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/brk.S: Likewise. + * sysdeps/unix/sysv/linux/ia64/bsd-_setjmp.S: Likewise. + * sysdeps/unix/sysv/linux/ia64/bsd-setjmp.S: Likewise. + * sysdeps/unix/sysv/linux/ia64/clock_getcpuclockid.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/clone.S: Likewise. + * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise. + * sysdeps/unix/sysv/linux/ia64/dl-brk.S: Likewise. + * sysdeps/unix/sysv/linux/ia64/dl-cache.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/dl-static.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/fork.S: Likewise. + * sysdeps/unix/sysv/linux/ia64/get_clockfreq.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/getclktck.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/getcontext.S: Likewise. + * sysdeps/unix/sysv/linux/ia64/getpagesize.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/has_cpuclock.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/ioperm.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/kernel_stat.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/ldconfig.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed: Likewise. + * sysdeps/unix/sysv/linux/ia64/ldsodefs.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/makecontext.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/Makefile: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/Versions: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/__ia64_longjmp.S: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/__sigstack_longjmp.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/bits/local_lim.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/bits/pthreadtypes.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/bits/semaphore.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/clone2.S: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/createthread.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/dl-sysdep.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/fork.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/lowlevellock.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/pt-initfini.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/pt-vfork.S: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/pthread_once.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/sysdep-cancel.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/timer_create.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/timer_delete.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/timer_getoverr.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/timer_gettime.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/timer_settime.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/unwind-forcedunwind.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/unwind_longjmp.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/vfork.S: Likewise. + * sysdeps/unix/sysv/linux/ia64/pipe.S: Likewise. + * sysdeps/unix/sysv/linux/ia64/profil-counter.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/readelflib.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/register-dump.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/rt-sysdep.S: Likewise. + * sysdeps/unix/sysv/linux/ia64/setcontext.S: Likewise. + * sysdeps/unix/sysv/linux/ia64/setjmp.S: Likewise. + * sysdeps/unix/sysv/linux/ia64/sigaction.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/sigcontext-offsets.sym: Likewise. + * sysdeps/unix/sysv/linux/ia64/sigcontextinfo.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/sigpending.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/sigprocmask.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/swapcontext.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/sys/io.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/sys/procfs.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/sys/ptrace.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/sys/rse.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/sys/ucontext.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/sys/user.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/syscall.S: Likewise. + * sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewise. + * sysdeps/unix/sysv/linux/ia64/sysconf.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/sysdep.S: Likewise. + * sysdeps/unix/sysv/linux/ia64/sysdep.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/system.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/ucontext_i.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/umount.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/unwind-dw2-fde.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/vfork.S: Likewise. + * sysdeps/unix/sysv/linux/ia64/wordexp.c: Likewise. diff --git a/sysdeps/ia64/Implies b/sysdeps/ia64/Implies new file mode 100644 index 0000000000..8524257020 --- /dev/null +++ b/sysdeps/ia64/Implies @@ -0,0 +1,5 @@ +wordsize-64 +# ia64 uses IEEE 754 floating point. +ieee754/ldbl-96 +ieee754/dbl-64 +ieee754/flt-32 diff --git a/sysdeps/ia64/Makefile b/sysdeps/ia64/Makefile new file mode 100644 index 0000000000..2ea937ac9e --- /dev/null +++ b/sysdeps/ia64/Makefile @@ -0,0 +1,24 @@ +# The ia64 `long double' is a distinct type we support. +long-double-fcts = yes + +ifeq ($(subdir),gmon) +sysdep_routines += _mcount +endif + +ifeq ($(subdir), csu) +CPPFLAGS-start.S = -D__ASSEMBLY__ +sysdep_routines += hp-timing +elide-routines.os += hp-timing + +ifeq (yes,$(build-shared)) +# Compatibility +sysdep_routines += ia64libgcc +shared-only-routines += ia64libgcc +endif +endif + +ifeq ($(subdir),elf) +sysdep-dl-routines += dl-symaddr dl-fptr +sysdep_routines += $(sysdep-dl-routines) +sysdep-rtld-routines += $(sysdep-dl-routines) +endif diff --git a/sysdeps/ia64/Versions b/sysdeps/ia64/Versions new file mode 100644 index 0000000000..56b417d614 --- /dev/null +++ b/sysdeps/ia64/Versions @@ -0,0 +1,21 @@ +ld { + GLIBC_PRIVATE { + # ia64 specific functions in the dynamic linker, but used by libc.so. + _dl_symbol_address; _dl_unmap; _dl_lookup_address; + _dl_function_address; + } +} +libc { + GLIBC_2.2 { + # Functions from libgcc. + __divtf3; __divdf3; __divsf3; __divdi3; __moddi3; __udivdi3; __umoddi3; + __multi3; + } +} +libm { + GLIBC_2.1 { + # A generic bug got this omitted from other configurations' version + # sets, but we always had it. + exp2l; + } +} diff --git a/sysdeps/ia64/_mcount.S b/sysdeps/ia64/_mcount.S new file mode 100644 index 0000000000..8720a9c104 --- /dev/null +++ b/sysdeps/ia64/_mcount.S @@ -0,0 +1,92 @@ +/* Machine-specific calling sequence for `mcount' profiling function. ia64 + Copyright (C) 2000 Free Software Foundation, Inc. + Contributed by David Mosberger + 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. */ + +/* Assembly stub to invoke _mcount(). Compiler generated code calls + this stub before executing a function's prologue and without saving + any registers. It is therefore necessary to preserve the input + registers as they may contain function arguments. To work + correctly with frame-less functions, it is also necessary to + preserve the return pointer (b0 aka rp). + + State upon entering _mcount: + + r8 address of return value structure (used only when called + function returns a large structure) + r15 static link (used only for nested functions) + in0 ar.pfs to restore before returning to the function that + called _mcount + in1 gp value to restore before returning to the function that + called _mcount + in2 return address in the function that invoked the caller + of _mcount (frompc) + in3 address of the global-offset table entry that holds the + profile count dword allocated by the compiler; to get + the address of this dword, use "ld8 in2=[in2]; this + dword can be used in any way by _mcount (including + not at all, as is the case with the current implementation) + b0 address to return to after _mcount is done +*/ + +#include + +#undef ret + +LEAF(_mcount) + .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(4) + alloc loc1 = ar.pfs, 4, 4, 3, 0 + mov loc0 = rp + .body + mov loc2 = r8 // gcc uses r8 to pass pointer to return structure + ;; + mov loc3 = r15 // gcc uses r15 to pass the static link to nested functions + mov out0 = in2 + mov out1 = rp + br.call.sptk.few rp = __mcount + ;; +.here: +{ + .mii + mov gp = in1 + mov r2 = ip + mov ar.pfs = loc1 +} + ;; + adds r2 = _mcount_ret_helper - .here, r2 + mov b7 = loc0 + mov rp = in2 + ;; + mov r3 = in0 + mov r8 = loc2 + mov r15 = loc3 + mov b6 = r2 + br.ret.sptk.few b6 +END(_mcount) + +LOCAL_LEAF(_mcount_ret_helper) + .prologue + .altrp b7 + .save ar.pfs, r3 + .body + alloc r2 = ar.pfs, 0, 0, 8, 0 + mov ar.pfs = r3 + br b7 +END(_mcount_ret_helper) + +weak_alias (_mcount, mcount) diff --git a/sysdeps/ia64/abort-instr.h b/sysdeps/ia64/abort-instr.h new file mode 100644 index 0000000000..8f26f0fc2a --- /dev/null +++ b/sysdeps/ia64/abort-instr.h @@ -0,0 +1,3 @@ +/* An instruction which should crash any program is `break 0' which triggers + SIGILL. */ +#define ABORT_INSTRUCTION asm ("break 0") diff --git a/sysdeps/ia64/backtrace.c b/sysdeps/ia64/backtrace.c new file mode 100644 index 0000000000..d4ff291022 --- /dev/null +++ b/sysdeps/ia64/backtrace.c @@ -0,0 +1,133 @@ +/* Return backtrace of current program state. + Copyright (C) 2003-2005, 2007, 2009, 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek , 2003. + + 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. */ + +#include +#include +#include +#include +#include + +struct trace_arg +{ + void **array; + _Unwind_Word cfa; + int cnt; + int size; +}; + +#ifdef SHARED +static _Unwind_Reason_Code (*unwind_backtrace) (_Unwind_Trace_Fn, void *); +static _Unwind_Ptr (*unwind_getip) (struct _Unwind_Context *); +static _Unwind_Word (*unwind_getcfa) (struct _Unwind_Context *); +static void *libgcc_handle; + + +/* Dummy version in case libgcc_s does not contain the real code. */ +static _Unwind_Word +dummy_getcfa (struct _Unwind_Context *ctx __attribute__ ((unused))) +{ + return 0; +} + + +static void +init (void) +{ + libgcc_handle = __libc_dlopen ("libgcc_s.so.1"); + + if (libgcc_handle == NULL) + return; + + unwind_backtrace = __libc_dlsym (libgcc_handle, "_Unwind_Backtrace"); + unwind_getip = __libc_dlsym (libgcc_handle, "_Unwind_GetIP"); + if (unwind_getip == NULL) + unwind_backtrace = NULL; + unwind_getcfa = (__libc_dlsym (libgcc_handle, "_Unwind_GetCFA") + ?: dummy_getcfa); +} +#else +# define unwind_backtrace _Unwind_Backtrace +# define unwind_getip _Unwind_GetIP +# define unwind_getcfa _Unwind_GetCFA +#endif + +static _Unwind_Reason_Code +backtrace_helper (struct _Unwind_Context *ctx, void *a) +{ + struct trace_arg *arg = a; + + /* We are first called with address in the __backtrace function. + Skip it. */ + if (arg->cnt != -1) + { + arg->array[arg->cnt] = (void *) unwind_getip (ctx); + + /* Check whether we make any progress. */ + _Unwind_Word cfa = unwind_getcfa (ctx); + + if (arg->cnt > 0 && arg->array[arg->cnt - 1] == arg->array[arg->cnt] + && cfa == arg->cfa) + return _URC_END_OF_STACK; + arg->cfa = cfa; + } + if (++arg->cnt == arg->size) + return _URC_END_OF_STACK; + return _URC_NO_REASON; +} + +int +__backtrace (array, size) + void **array; + int size; +{ + struct trace_arg arg = { .array = array, .cfa = 0, .size = size, .cnt = -1 }; +#ifdef SHARED + __libc_once_define (static, once); + + __libc_once (once, init); + if (unwind_backtrace == NULL) + return 0; +#endif + + if (size >= 1) + unwind_backtrace (backtrace_helper, &arg); + + /* _Unwind_Backtrace on IA-64 seems to put NULL address above + _start. Fix it up here. */ + if (arg.cnt > 1 && arg.array[arg.cnt - 1] == NULL) + --arg.cnt; + return arg.cnt != -1 ? arg.cnt : 0; +} +weak_alias (__backtrace, backtrace) +libc_hidden_def (__backtrace) + + +#ifdef SHARED +/* Free all resources if necessary. */ +libc_freeres_fn (free_mem) +{ + unwind_backtrace = NULL; + if (libgcc_handle != NULL) + { + __libc_dlclose (libgcc_handle); + libgcc_handle = NULL; + } +} +#endif diff --git a/sysdeps/ia64/bcopy.S b/sysdeps/ia64/bcopy.S new file mode 100644 index 0000000000..bdabf5acdc --- /dev/null +++ b/sysdeps/ia64/bcopy.S @@ -0,0 +1,10 @@ +#include + +ENTRY(bcopy) + .regstk 3, 0, 0, 0 + mov r8 = in0 + mov in0 = in1 + ;; + mov in1 = r8 + br.cond.sptk.many HIDDEN_BUILTIN_JUMPTARGET(memmove) +END(bcopy) diff --git a/sysdeps/ia64/bits/atomic.h b/sysdeps/ia64/bits/atomic.h new file mode 100644 index 0000000000..1020c2f229 --- /dev/null +++ b/sysdeps/ia64/bits/atomic.h @@ -0,0 +1,119 @@ +/* Copyright (C) 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. */ + +#include +#include + +typedef int8_t atomic8_t; +typedef uint8_t uatomic8_t; +typedef int_fast8_t atomic_fast8_t; +typedef uint_fast8_t uatomic_fast8_t; + +typedef int16_t atomic16_t; +typedef uint16_t uatomic16_t; +typedef int_fast16_t atomic_fast16_t; +typedef uint_fast16_t uatomic_fast16_t; + +typedef int32_t atomic32_t; +typedef uint32_t uatomic32_t; +typedef int_fast32_t atomic_fast32_t; +typedef uint_fast32_t uatomic_fast32_t; + +typedef int64_t atomic64_t; +typedef uint64_t uatomic64_t; +typedef int_fast64_t atomic_fast64_t; +typedef uint_fast64_t uatomic_fast64_t; + +typedef intptr_t atomicptr_t; +typedef uintptr_t uatomicptr_t; +typedef intmax_t atomic_max_t; +typedef uintmax_t uatomic_max_t; + + +#define __arch_compare_and_exchange_bool_8_acq(mem, newval, oldval) \ + (abort (), 0) + +#define __arch_compare_and_exchange_bool_16_acq(mem, newval, oldval) \ + (abort (), 0) + +#define __arch_compare_and_exchange_bool_32_acq(mem, newval, oldval) \ + (!__sync_bool_compare_and_swap ((mem), (int) (long) (oldval), \ + (int) (long) (newval))) + +#define __arch_compare_and_exchange_bool_64_acq(mem, newval, oldval) \ + (!__sync_bool_compare_and_swap ((mem), (long) (oldval), \ + (long) (newval))) + +#define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval) \ + (abort (), (__typeof (*mem)) 0) + +#define __arch_compare_and_exchange_val_16_acq(mem, newval, oldval) \ + (abort (), (__typeof (*mem)) 0) + +#define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \ + __sync_val_compare_and_swap ((mem), (int) (long) (oldval), \ + (int) (long) (newval)) + +#define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \ + __sync_val_compare_and_swap ((mem), (long) (oldval), (long) (newval)) + +/* Atomically store newval and return the old value. */ +#define atomic_exchange_acq(mem, value) \ + __sync_lock_test_and_set (mem, value) + +#define atomic_exchange_rel(mem, value) \ + (__sync_synchronize (), __sync_lock_test_and_set (mem, value)) + +#define atomic_exchange_and_add(mem, value) \ + ({ __typeof (*mem) __result; \ + __result = __sync_fetch_and_add ((mem), (int) (value)); \ + __result; }) + +#define atomic_decrement_if_positive(mem) \ + ({ __typeof (*mem) __oldval, __val; \ + __typeof (mem) __memp = (mem); \ + \ + __val = (*__memp); \ + do \ + { \ + __oldval = __val; \ + if (__builtin_expect (__val <= 0, 0)) \ + break; \ + __val = atomic_compare_and_exchange_val_acq (__memp, __oldval - 1, \ + __oldval); \ + } \ + while (__builtin_expect (__val != __oldval, 0)); \ + __oldval; }) + +#define atomic_bit_test_set(mem, bit) \ + ({ __typeof (*mem) __oldval, __val; \ + __typeof (mem) __memp = (mem); \ + __typeof (*mem) __mask = ((__typeof (*mem)) 1 << (bit)); \ + \ + __val = (*__memp); \ + do \ + { \ + __oldval = __val; \ + __val = atomic_compare_and_exchange_val_acq (__memp, \ + __oldval | __mask, \ + __oldval); \ + } \ + while (__builtin_expect (__val != __oldval, 0)); \ + __oldval & __mask; }) + +#define atomic_full_barrier() __sync_synchronize () diff --git a/sysdeps/ia64/bits/byteswap.h b/sysdeps/ia64/bits/byteswap.h new file mode 100644 index 0000000000..29d0e37d12 --- /dev/null +++ b/sysdeps/ia64/bits/byteswap.h @@ -0,0 +1,121 @@ +/* Macros to swap the order of bytes in integer values. + Copyright (C) 1997,1998,2000,2002,2003,2008,2011 + 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. */ + +#if !defined _BYTESWAP_H && !defined _NETINET_IN_H && !defined _ENDIAN_H +# error "Never use directly; include instead." +#endif + +#ifndef _BITS_BYTESWAP_H +#define _BITS_BYTESWAP_H 1 + +/* Swap bytes in 16 bit value. */ +#define __bswap_constant_16(x) \ + ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)) + +#if defined __GNUC__ && __GNUC__ >= 2 +# define __bswap_16(x) \ + (__extension__ \ + ({ register unsigned short int __v, __x = (x); \ + if (__builtin_constant_p (x)) \ + __v = __bswap_constant_16 (__x); \ + else \ + __asm__ __volatile__ ("shl %0 = %1, 48 ;;" \ + "mux1 %0 = %0, @rev ;;" \ + : "=r" (__v) \ + : "r" ((unsigned short int) (__x))); \ + __v; })) +#else +/* This is better than nothing. */ +static __inline unsigned short int +__bswap_16 (unsigned short int __bsx) +{ + return __bswap_constant_16 (__bsx); +} +#endif + + +/* Swap bytes in 32 bit value. */ +#define __bswap_constant_32(x) \ + ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \ + (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24)) + +#if defined __GNUC__ && __GNUC__ >= 2 +# define __bswap_32(x) \ + (__extension__ \ + ({ register unsigned int __v, __x = (x); \ + if (__builtin_constant_p (x)) \ + __v = __bswap_constant_32 (__x); \ + else \ + __asm__ __volatile__ ("shl %0 = %1, 32 ;;" \ + "mux1 %0 = %0, @rev ;;" \ + : "=r" (__v) \ + : "r" ((unsigned int) (__x))); \ + __v; })) +#else +static __inline unsigned int +__bswap_32 (unsigned int __bsx) +{ + return __bswap_constant_32 (__bsx); +} +#endif + + +/* Swap bytes in 64 bit value. */ +#if defined __GNUC__ && __GNUC__ >= 2 +# define __bswap_constant_64(x) \ + (__extension__ ((((x) & 0xff00000000000000ul) >> 56) \ + | (((x) & 0x00ff000000000000ul) >> 40) \ + | (((x) & 0x0000ff0000000000ul) >> 24) \ + | (((x) & 0x000000ff00000000ul) >> 8) \ + | (((x) & 0x00000000ff000000ul) << 8) \ + | (((x) & 0x0000000000ff0000ul) << 24) \ + | (((x) & 0x000000000000ff00ul) << 40) \ + | (((x) & 0x00000000000000fful) << 56))) + +# define __bswap_64(x) \ + (__extension__ \ + ({ register unsigned long int __v, __x = (x); \ + if (__builtin_constant_p (x)) \ + __v = __bswap_constant_64 (__x); \ + else \ + __asm__ __volatile__ ("mux1 %0 = %1, @rev ;;" \ + : "=r" (__v) \ + : "r" ((unsigned long int) (__x))); \ + __v; })) + +#else +# define __bswap_constant_64(x) \ + ((((x) & 0xff00000000000000ul) >> 56) \ + | (((x) & 0x00ff000000000000ul) >> 40) \ + | (((x) & 0x0000ff0000000000ul) >> 24) \ + | (((x) & 0x000000ff00000000ul) >> 8) \ + | (((x) & 0x00000000ff000000ul) << 8) \ + | (((x) & 0x0000000000ff0000ul) << 24) \ + | (((x) & 0x000000000000ff00ul) << 40) \ + | (((x) & 0x00000000000000fful) << 56)) + +static __inline unsigned long int +__bswap_64 (unsigned long int __bsx) +{ + return __bswap_constant_64 (__bsx); +} +#endif + +#endif /* _BITS_BYTESWAP_H */ diff --git a/sysdeps/ia64/bits/fenv.h b/sysdeps/ia64/bits/fenv.h new file mode 100644 index 0000000000..32515f0796 --- /dev/null +++ b/sysdeps/ia64/bits/fenv.h @@ -0,0 +1,87 @@ +/* Copyright (C) 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 + 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 _FENV_H +# error "Never use directly; include instead." +#endif + + +/* Define bits representing the exception. We use the bit positions of + the appropriate bits in the FPSR... (Tahoe EAS 2.4 5-4)*/ + +enum + { + FE_INEXACT = 1UL << 5, +#define FE_INEXACT FE_INEXACT + + FE_UNDERFLOW = 1UL << 4, +#define FE_UNDERFLOW FE_UNDERFLOW + + FE_OVERFLOW = 1UL << 3, +#define FE_OVERFLOW FE_OVERFLOW + + FE_DIVBYZERO = 1UL << 2, +#define FE_DIVBYZERO FE_DIVBYZERO + + FE_UNNORMAL = 1UL << 1, +#define FE_UNNORMAL FE_UNNORMAL + + FE_INVALID = 1UL << 0, +#define FE_INVALID FE_INVALID + + FE_ALL_EXCEPT = + (FE_INEXACT | FE_UNDERFLOW | FE_OVERFLOW | FE_DIVBYZERO | FE_UNNORMAL | FE_INVALID) +#define FE_ALL_EXCEPT FE_ALL_EXCEPT + }; + + +enum + { + FE_TOWARDZERO = 3, +#define FE_TOWARDZERO FE_TOWARDZERO + + FE_UPWARD = 2, +#define FE_UPWARD FE_UPWARD + + FE_DOWNWARD = 1, +#define FE_DOWNWARD FE_DOWNWARD + + FE_TONEAREST = 0, +#define FE_TONEAREST FE_TONEAREST + }; + + +/* Type representing exception flags. */ +typedef unsigned long int fexcept_t; + +/* Type representing floating-point environment. */ +typedef unsigned long int fenv_t; + +/* If the default argument is used we use this value. */ +#define FE_DFL_ENV ((__const fenv_t *) 0xc009804c0270033fUL) + +#ifdef __USE_GNU +/* Floating-point environment where only FE_UNNORMAL is masked since this + exception is not generally supported by glibc. */ +# define FE_NOMASK_ENV ((__const fenv_t *) 0xc009804c02700302UL) + +/* Floating-point environment with (processor-dependent) non-IEEE + floating point. In this case, turning on flush-to-zero mode for + s0, s2, and s3. */ +# define FE_NONIEEE_ENV ((__const fenv_t *) 0xc009a04d0270037fUL) +#endif diff --git a/sysdeps/ia64/bits/huge_vall.h b/sysdeps/ia64/bits/huge_vall.h new file mode 100644 index 0000000000..a1f583b34c --- /dev/null +++ b/sysdeps/ia64/bits/huge_vall.h @@ -0,0 +1,42 @@ +/* `HUGE_VALL' constant for ia64 (where it is infinity). + Used by and functions for overflow. + Copyright (C) 2000, 2004 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 _MATH_H +# error "Never use directly; include instead." +#endif + +#if __GNUC_PREREQ(3,3) +# define HUGE_VALL (__builtin_huge_vall()) +#elif __GNUC_PREREQ(2,96) +# define HUGE_VALL (__extension__ 0x1.0p32767L) +#else + +# define __HUGE_VALL_bytes { 0,0,0,0,0,0,0, 0x80, 0xff, 0x7f, 0,0,0,0,0,0} + +# define __huge_vall_t union { unsigned char __c[16]; long double __ld; } +# ifdef __GNUC__ +# define HUGE_VALL (__extension__ \ + ((__huge_vall_t) { __c: __HUGE_VALL_bytes }).__ld) +# else /* Not GCC. */ +static __huge_vall_t __huge_vall = { __HUGE_VALL_bytes }; +# define HUGE_VALL (__huge_vall.__ld) +# endif /* GCC. */ + +#endif /* GCC 2.95 */ diff --git a/sysdeps/ia64/bits/link.h b/sysdeps/ia64/bits/link.h new file mode 100644 index 0000000000..f522ab340b --- /dev/null +++ b/sysdeps/ia64/bits/link.h @@ -0,0 +1,63 @@ +/* Copyright (C) 2005, 2009 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 _LINK_H +# error "Never include directly; use instead." +#endif + +/* Registers for entry into PLT on ia64. */ +typedef struct La_ia64_regs +{ + uint64_t lr_r8; + uint64_t lr_r9; + uint64_t lr_r10; + uint64_t lr_r11; + uint64_t lr_gr [8]; + long double lr_fr [8]; + uint64_t lr_unat; + uint64_t lr_sp; +} La_ia64_regs; + +/* Return values for calls from PLT on ia64. */ +typedef struct La_ia64_retval +{ + uint64_t lrv_r8; + uint64_t lrv_r9; + uint64_t lrv_r10; + uint64_t lrv_r11; + long double lr_fr [8]; +} La_ia64_retval; + + +__BEGIN_DECLS + +extern Elf64_Addr la_ia64_gnu_pltenter (Elf64_Sym *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + La_ia64_regs *__regs, + unsigned int *__flags, + const char *__symname, + long int *__framesizep); +extern unsigned int la_ia64_gnu_pltexit (Elf64_Sym *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + const La_ia64_regs *__inregs, + La_ia64_retval *__outregs, + const char *__symname); + +__END_DECLS diff --git a/sysdeps/ia64/bits/linkmap.h b/sysdeps/ia64/bits/linkmap.h new file mode 100644 index 0000000000..7f8b0550d9 --- /dev/null +++ b/sysdeps/ia64/bits/linkmap.h @@ -0,0 +1,5 @@ +struct link_map_machine + { + size_t fptr_table_len; + Elf64_Addr *fptr_table; + }; diff --git a/sysdeps/ia64/bits/mathdef.h b/sysdeps/ia64/bits/mathdef.h new file mode 100644 index 0000000000..3dc2860223 --- /dev/null +++ b/sysdeps/ia64/bits/mathdef.h @@ -0,0 +1,37 @@ +/* Copyright (C) 2000, 2001, 2004 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. */ + +#if !defined _MATH_H && !defined _COMPLEX_H +# error "Never use directly; include instead" +#endif + +#if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF +# define _MATH_H_MATHDEF 1 + +/* The IA-64 architecture computes values with the precision of the + used type. */ +typedef float float_t; /* `float' expressions are evaluated as + `float'. */ +typedef double double_t; /* `double' expressions are evaluated as + `double'. */ + +/* The values returned by `ilogb' for 0 and NaN respectively. */ +# define FP_ILOGB0 (-2147483647 - 1) +# define FP_ILOGBNAN 2147483647 + +#endif /* ISO C99 */ diff --git a/sysdeps/ia64/bits/xtitypes.h b/sysdeps/ia64/bits/xtitypes.h new file mode 100644 index 0000000000..54c85ba901 --- /dev/null +++ b/sysdeps/ia64/bits/xtitypes.h @@ -0,0 +1,34 @@ +/* bits/xtitypes.h -- Define some types used by . IA64 + Copyright (C) 2002 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 _STROPTS_H +# error "Never include directly; use instead." +#endif + +#ifndef _BITS_XTITYPES_H +#define _BITS_XTITYPES_H 1 + +#include + +/* This type is used by some structs in . */ +typedef __S32_TYPE __t_scalar_t; +typedef __U32_TYPE __t_uscalar_t; + + +#endif /* bits/xtitypes.h */ diff --git a/sysdeps/ia64/bzero.S b/sysdeps/ia64/bzero.S new file mode 100644 index 0000000000..bcca41d5e9 --- /dev/null +++ b/sysdeps/ia64/bzero.S @@ -0,0 +1,315 @@ +/* Optimized version of the standard bzero() function. + This file is part of the GNU C Library. + Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. + Contributed by Dan Pop for Itanium . + Rewritten for McKinley by Sverre Jarp, HP Labs/CERN + + 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. */ + +/* Return: dest + + Inputs: + in0: dest + in1: count + + The algorithm is fairly straightforward: set byte by byte until we + we get to a 16B-aligned address, then loop on 128 B chunks using an + early store as prefetching, then loop on 32B chucks, then clear remaining + words, finally clear remaining bytes. + Since a stf.spill f0 can store 16B in one go, we use this instruction + to get peak speed. */ + +#include +#undef ret + +#define dest in0 +#define cnt in1 + +#define tmp r31 +#define save_lc r30 +#define ptr0 r29 +#define ptr1 r28 +#define ptr2 r27 +#define ptr3 r26 +#define ptr9 r24 +#define loopcnt r23 +#define linecnt r22 +#define bytecnt r21 + +// This routine uses only scratch predicate registers (p6 - p15) +#define p_scr p6 // default register for same-cycle branches +#define p_unalgn p9 +#define p_y p11 +#define p_n p12 +#define p_yy p13 +#define p_nn p14 + +#define movi0 mov + +#define MIN1 15 +#define MIN1P1HALF 8 +#define LINE_SIZE 128 +#define LSIZE_SH 7 // shift amount +#define PREF_AHEAD 8 + +#define USE_FLP +#if defined(USE_INT) +#define store st8 +#define myval r0 +#elif defined(USE_FLP) +#define store stf8 +#define myval f0 +#endif + +.align 64 +ENTRY(bzero) +{ .mmi + .prologue + alloc tmp = ar.pfs, 2, 0, 0, 0 + lfetch.nt1 [dest] + .save ar.lc, save_lc + movi0 save_lc = ar.lc +} { .mmi + .body + mov ret0 = dest // return value + nop.m 0 + cmp.eq p_scr, p0 = cnt, r0 +;; } +{ .mmi + and ptr2 = -(MIN1+1), dest // aligned address + and tmp = MIN1, dest // prepare to check for alignment + tbit.nz p_y, p_n = dest, 0 // Do we have an odd address? (M_B_U) +} { .mib + mov ptr1 = dest + nop.i 0 +(p_scr) br.ret.dpnt.many rp // return immediately if count = 0 +;; } +{ .mib + cmp.ne p_unalgn, p0 = tmp, r0 +} { .mib // NB: # of bytes to move is 1 + sub bytecnt = (MIN1+1), tmp // higher than loopcnt + cmp.gt p_scr, p0 = 16, cnt // is it a minimalistic task? +(p_scr) br.cond.dptk.many .move_bytes_unaligned // go move just a few (M_B_U) +;; } +{ .mmi +(p_unalgn) add ptr1 = (MIN1+1), ptr2 // after alignment +(p_unalgn) add ptr2 = MIN1P1HALF, ptr2 // after alignment +(p_unalgn) tbit.nz.unc p_y, p_n = bytecnt, 3 // should we do a st8 ? +;; } +{ .mib +(p_y) add cnt = -8, cnt +(p_unalgn) tbit.nz.unc p_yy, p_nn = bytecnt, 2 // should we do a st4 ? +} { .mib +(p_y) st8 [ptr2] = r0,-4 +(p_n) add ptr2 = 4, ptr2 +;; } +{ .mib +(p_yy) add cnt = -4, cnt +(p_unalgn) tbit.nz.unc p_y, p_n = bytecnt, 1 // should we do a st2 ? +} { .mib +(p_yy) st4 [ptr2] = r0,-2 +(p_nn) add ptr2 = 2, ptr2 +;; } +{ .mmi + mov tmp = LINE_SIZE+1 // for compare +(p_y) add cnt = -2, cnt +(p_unalgn) tbit.nz.unc p_yy, p_nn = bytecnt, 0 // should we do a st1 ? +} { .mmi + nop.m 0 +(p_y) st2 [ptr2] = r0,-1 +(p_n) add ptr2 = 1, ptr2 +;; } + +{ .mmi +(p_yy) st1 [ptr2] = r0 + cmp.gt p_scr, p0 = tmp, cnt // is it a minimalistic task? +} { .mbb +(p_yy) add cnt = -1, cnt +(p_scr) br.cond.dpnt.many .fraction_of_line // go move just a few +;; } +{ .mib + nop.m 0 + shr.u linecnt = cnt, LSIZE_SH + nop.b 0 +;; } + + .align 32 +.l1b: // ------------------// L1B: store ahead into cache lines; fill later +{ .mmi + and tmp = -(LINE_SIZE), cnt // compute end of range + mov ptr9 = ptr1 // used for prefetching + and cnt = (LINE_SIZE-1), cnt // remainder +} { .mmi + mov loopcnt = PREF_AHEAD-1 // default prefetch loop + cmp.gt p_scr, p0 = PREF_AHEAD, linecnt // check against actual value +;; } +{ .mmi +(p_scr) add loopcnt = -1, linecnt + add ptr2 = 16, ptr1 // start of stores (beyond prefetch stores) + add ptr1 = tmp, ptr1 // first address beyond total range +;; } +{ .mmi + add tmp = -1, linecnt // next loop count + movi0 ar.lc = loopcnt +;; } +.pref_l1b: +{ .mib + stf.spill [ptr9] = f0, 128 // Do stores one cache line apart + nop.i 0 + br.cloop.dptk.few .pref_l1b +;; } +{ .mmi + add ptr0 = 16, ptr2 // Two stores in parallel + movi0 ar.lc = tmp +;; } +.l1bx: + { .mmi + stf.spill [ptr2] = f0, 32 + stf.spill [ptr0] = f0, 32 + ;; } + { .mmi + stf.spill [ptr2] = f0, 32 + stf.spill [ptr0] = f0, 32 + ;; } + { .mmi + stf.spill [ptr2] = f0, 32 + stf.spill [ptr0] = f0, 64 + cmp.lt p_scr, p0 = ptr9, ptr1 // do we need more prefetching? + ;; } +{ .mmb + stf.spill [ptr2] = f0, 32 +(p_scr) stf.spill [ptr9] = f0, 128 + br.cloop.dptk.few .l1bx +;; } +{ .mib + cmp.gt p_scr, p0 = 8, cnt // just a few bytes left ? +(p_scr) br.cond.dpnt.many .move_bytes_from_alignment +;; } + +.fraction_of_line: +{ .mib + add ptr2 = 16, ptr1 + shr.u loopcnt = cnt, 5 // loopcnt = cnt / 32 +;; } +{ .mib + cmp.eq p_scr, p0 = loopcnt, r0 + add loopcnt = -1, loopcnt +(p_scr) br.cond.dpnt.many .store_words +;; } +{ .mib + and cnt = 0x1f, cnt // compute the remaining cnt + movi0 ar.lc = loopcnt +;; } + .align 32 +.l2: // -----------------------------// L2A: store 32B in 2 cycles +{ .mmb + store [ptr1] = myval, 8 + store [ptr2] = myval, 8 +;; } { .mmb + store [ptr1] = myval, 24 + store [ptr2] = myval, 24 + br.cloop.dptk.many .l2 +;; } +.store_words: +{ .mib + cmp.gt p_scr, p0 = 8, cnt // just a few bytes left ? +(p_scr) br.cond.dpnt.many .move_bytes_from_alignment // Branch +;; } + +{ .mmi + store [ptr1] = myval, 8 // store + cmp.le p_y, p_n = 16, cnt // + add cnt = -8, cnt // subtract +;; } +{ .mmi +(p_y) store [ptr1] = myval, 8 // store +(p_y) cmp.le.unc p_yy, p_nn = 16, cnt +(p_y) add cnt = -8, cnt // subtract +;; } +{ .mmi // store +(p_yy) store [ptr1] = myval, 8 +(p_yy) add cnt = -8, cnt // subtract +;; } + +.move_bytes_from_alignment: +{ .mib + cmp.eq p_scr, p0 = cnt, r0 + tbit.nz.unc p_y, p0 = cnt, 2 // should we terminate with a st4 ? +(p_scr) br.cond.dpnt.few .restore_and_exit +;; } +{ .mib +(p_y) st4 [ptr1] = r0,4 + tbit.nz.unc p_yy, p0 = cnt, 1 // should we terminate with a st2 ? +;; } +{ .mib +(p_yy) st2 [ptr1] = r0,2 + tbit.nz.unc p_y, p0 = cnt, 0 // should we terminate with a st1 ? +;; } + +{ .mib +(p_y) st1 [ptr1] = r0 +;; } +.restore_and_exit: +{ .mib + nop.m 0 + movi0 ar.lc = save_lc + br.ret.sptk.many rp +;; } + +.move_bytes_unaligned: +{ .mmi + .pred.rel "mutex",p_y, p_n + .pred.rel "mutex",p_yy, p_nn +(p_n) cmp.le p_yy, p_nn = 4, cnt +(p_y) cmp.le p_yy, p_nn = 5, cnt +(p_n) add ptr2 = 2, ptr1 +} { .mmi +(p_y) add ptr2 = 3, ptr1 +(p_y) st1 [ptr1] = r0, 1 // fill 1 (odd-aligned) byte +(p_y) add cnt = -1, cnt // [15, 14 (or less) left] +;; } +{ .mmi +(p_yy) cmp.le.unc p_y, p0 = 8, cnt + add ptr3 = ptr1, cnt // prepare last store + movi0 ar.lc = save_lc +} { .mmi +(p_yy) st2 [ptr1] = r0, 4 // fill 2 (aligned) bytes +(p_yy) st2 [ptr2] = r0, 4 // fill 2 (aligned) bytes +(p_yy) add cnt = -4, cnt // [11, 10 (o less) left] +;; } +{ .mmi +(p_y) cmp.le.unc p_yy, p0 = 8, cnt + add ptr3 = -1, ptr3 // last store + tbit.nz p_scr, p0 = cnt, 1 // will there be a st2 at the end ? +} { .mmi +(p_y) st2 [ptr1] = r0, 4 // fill 2 (aligned) bytes +(p_y) st2 [ptr2] = r0, 4 // fill 2 (aligned) bytes +(p_y) add cnt = -4, cnt // [7, 6 (or less) left] +;; } +{ .mmi +(p_yy) st2 [ptr1] = r0, 4 // fill 2 (aligned) bytes +(p_yy) st2 [ptr2] = r0, 4 // fill 2 (aligned) bytes + // [3, 2 (or less) left] + tbit.nz p_y, p0 = cnt, 0 // will there be a st1 at the end ? +} { .mmi +(p_yy) add cnt = -4, cnt +;; } +{ .mmb +(p_scr) st2 [ptr1] = r0 // fill 2 (aligned) bytes +(p_y) st1 [ptr3] = r0 // fill last byte (using ptr3) + br.ret.sptk.many rp +;; } +END(bzero) diff --git a/sysdeps/ia64/configure b/sysdeps/ia64/configure new file mode 100644 index 0000000000..67a4b7e620 --- /dev/null +++ b/sysdeps/ia64/configure @@ -0,0 +1,54 @@ +# This file is generated from configure.in by Autoconf. DO NOT EDIT! + # Local configure fragment for sysdeps/ia64. + +{ $as_echo "$as_me:$LINENO: checking if -g produces usable source locations for assembler-with-cpp" >&5 +$as_echo_n "checking if -g produces usable source locations for assembler-with-cpp... " >&6; } +if test "${libc_cv_cpp_asm_debuginfo+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat > conftest.S <&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && { + ac_pattern='conftest\.S' + { ac_try='readelf --debug-dump=line conftest.o | + grep $ac_pattern 1>&5' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } + }; then + libc_cv_cpp_asm_debuginfo=yes +else + libc_cv_cpp_asm_debuginfo=no +fi +rm -f conftest* +fi +{ $as_echo "$as_me:$LINENO: result: $libc_cv_cpp_asm_debuginfo" >&5 +$as_echo "$libc_cv_cpp_asm_debuginfo" >&6; } +if test $libc_cv_cpp_asm_debuginfo = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_CPP_ASM_DEBUGINFO 1 +_ACEOF + +fi diff --git a/sysdeps/ia64/configure.in b/sysdeps/ia64/configure.in new file mode 100644 index 0000000000..887b4cb2ed --- /dev/null +++ b/sysdeps/ia64/configure.in @@ -0,0 +1,35 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/ia64. + +AC_CACHE_CHECK(if -g produces usable source locations for assembler-with-cpp, + libc_cv_cpp_asm_debuginfo, [dnl +cat > conftest.S <&AS_MESSAGE_LOG_FD]) && { + ac_pattern='conftest\.S' + AC_TRY_COMMAND([readelf --debug-dump=line conftest.o | + grep $ac_pattern 1>&AS_MESSAGE_LOG_FD]) + }; then + libc_cv_cpp_asm_debuginfo=yes +else + libc_cv_cpp_asm_debuginfo=no +fi +rm -f conftest*])AC_SUBST(libc_cv_cpp_asm_debuginfo) +if test $libc_cv_cpp_asm_debuginfo = yes; then + AC_DEFINE(HAVE_CPP_ASM_DEBUGINFO) +fi diff --git a/sysdeps/ia64/dl-dtprocnum.h b/sysdeps/ia64/dl-dtprocnum.h new file mode 100644 index 0000000000..fc31589623 --- /dev/null +++ b/sysdeps/ia64/dl-dtprocnum.h @@ -0,0 +1,22 @@ +/* Configuration of lookup functions. IA-64 version. + Copyright (C) 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 + 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. */ + +/* Number of extra dynamic section entries for this architecture. By + default there are none. */ +#define DT_THISPROCNUM DT_IA_64_NUM diff --git a/sysdeps/ia64/dl-fptr.h b/sysdeps/ia64/dl-fptr.h new file mode 100644 index 0000000000..43907b9bf7 --- /dev/null +++ b/sysdeps/ia64/dl-fptr.h @@ -0,0 +1,36 @@ +/* Function descriptors. IA64 version. + Copyright (C) 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 dl_ia64_fptr_h +#define dl_ia64_fptr_h 1 + +#include +#include + +#define COMPARE_AND_SWAP(ptr, old, new) \ + __sync_bool_compare_and_swap (ptr, old, new) + +/* There are currently 123 dynamic symbols in ld.so. + ELF_MACHINE_BOOT_FPTR_TABLE_LEN needs to be at least that big. */ +#define ELF_MACHINE_BOOT_FPTR_TABLE_LEN 200 + +#define ELF_MACHINE_LOAD_ADDRESS(var, symbol) \ + asm ("movl %0 = @gprel (" #symbol ");; add %0 = %0, gp" : "=&r" (var)); + +#endif /* !dl_ia64_fptr_h */ diff --git a/sysdeps/ia64/dl-lookupcfg.h b/sysdeps/ia64/dl-lookupcfg.h new file mode 100644 index 0000000000..b50030ebd2 --- /dev/null +++ b/sysdeps/ia64/dl-lookupcfg.h @@ -0,0 +1,72 @@ +/* Configuration of lookup functions. + Copyright (C) 2000, 2001, 2003, 2004 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. */ + +#define ELF_FUNCTION_PTR_IS_SPECIAL +#define DL_UNMAP_IS_SPECIAL + +#include + +/* We do not support copy relocations for IA-64. */ +#define DL_NO_COPY_RELOCS + +/* Forward declaration. */ +struct link_map; + +extern void *_dl_symbol_address (struct link_map *map, const Elf64_Sym *ref); + +#define DL_SYMBOL_ADDRESS(map, ref) _dl_symbol_address(map, ref) + +extern Elf64_Addr _dl_lookup_address (const void *address); + +#define DL_LOOKUP_ADDRESS(addr) _dl_lookup_address (addr) + +extern void _dl_unmap (struct link_map *map); + +#define DL_UNMAP(map) _dl_unmap (map) + +#define DL_AUTO_FUNCTION_ADDRESS(map, addr) \ +({ \ + unsigned long int fptr[2]; \ + fptr[0] = (unsigned long int) (addr); \ + fptr[1] = (map)->l_info[DT_PLTGOT]->d_un.d_ptr; \ + (Elf64_Addr) fptr; \ +}) + +#define DL_STATIC_FUNCTION_ADDRESS(map, addr) \ +({ \ + static unsigned long int fptr[2]; \ + fptr[0] = (unsigned long int) (addr); \ + fptr[1] = (map)->l_info[DT_PLTGOT]->d_un.d_ptr; \ + (Elf64_Addr) fptr; \ +}) + +#define DL_DT_INIT_ADDRESS(map, addr) DL_AUTO_FUNCTION_ADDRESS (map, addr) +#define DL_DT_FINI_ADDRESS(map, addr) DL_AUTO_FUNCTION_ADDRESS (map, addr) +/* The type of the return value of fixup/profile_fixup. */ +#define DL_FIXUP_VALUE_TYPE struct fdesc +/* Construct a value of type DL_FIXUP_VALUE_TYPE from a code address + and a link map. */ +#define DL_FIXUP_MAKE_VALUE(map, addr) \ + ((struct fdesc) { (addr), (map)->l_info[DT_PLTGOT]->d_un.d_ptr }) +/* Extract the code address from a value of type DL_FIXUP_MAKE_VALUE. + */ +#define DL_FIXUP_VALUE_CODE_ADDR(value) (value).ip + +#define DL_FIXUP_VALUE_ADDR(value) ((uintptr_t) &(value)) +#define DL_FIXUP_ADDR_VALUE(addr) (*(struct fdesc *) (addr)) diff --git a/sysdeps/ia64/dl-machine.h b/sysdeps/ia64/dl-machine.h new file mode 100644 index 0000000000..6053b3b786 --- /dev/null +++ b/sysdeps/ia64/dl-machine.h @@ -0,0 +1,507 @@ +/* Machine-dependent ELF dynamic relocation inline functions. IA-64 version. + Copyright (C) 1995-1997, 2000-2006, 2011 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 dl_machine_h +#define dl_machine_h 1 + +#define ELF_MACHINE_NAME "ia64" + +#include +#include +#include +#include +#include +#include + +/* Translate a processor specific dynamic tag to the index + in l_info array. */ +#define DT_IA_64(x) (DT_IA_64_##x - DT_LOPROC + DT_NUM) + +static inline void __attribute__ ((always_inline)) +__ia64_init_bootstrap_fdesc_table (struct link_map *map) +{ + Elf64_Addr *boot_table; + + /* careful: this will be called before got has been relocated... */ + asm (";; addl %0 = @gprel (_dl_boot_fptr_table), gp" : "=r"(boot_table)); + + map->l_mach.fptr_table_len = ELF_MACHINE_BOOT_FPTR_TABLE_LEN; + map->l_mach.fptr_table = boot_table; +} + +#define ELF_MACHINE_BEFORE_RTLD_RELOC(dynamic_info) \ + __ia64_init_bootstrap_fdesc_table (&bootstrap_map); + +/* Return nonzero iff ELF header is compatible with the running host. */ +static inline int __attribute__ ((unused)) +elf_machine_matches_host (const Elf64_Ehdr *ehdr) +{ + return ehdr->e_machine == EM_IA_64; +} + + +/* Return the link-time address of _DYNAMIC. */ +static inline Elf64_Addr __attribute__ ((unused, const)) +elf_machine_dynamic (void) +{ + Elf64_Addr *p; + + __asm__ ( + ".section .sdata\n" + " .type __dynamic_ltv#, @object\n" + " .size __dynamic_ltv#, 8\n" + "__dynamic_ltv:\n" + " data8 @ltv(_DYNAMIC#)\n" + ".previous\n" + " addl %0 = @gprel(__dynamic_ltv#), gp ;;" + : "=r" (p)); + + return *p; +} + + +/* Return the run-time load address of the shared object. */ +static inline Elf64_Addr __attribute__ ((unused)) +elf_machine_load_address (void) +{ + Elf64_Addr ip; + int *p; + + __asm__ ( + "1: mov %0 = ip\n" + ".section .sdata\n" + "2: data4 @ltv(1b)\n" + " .align 8\n" + ".previous\n" + " addl %1 = @gprel(2b), gp ;;" + : "=r" (ip), "=r" (p)); + + return ip - (Elf64_Addr) *p; +} + +/* Set up the loaded object described by L so its unrelocated PLT + entries will jump to the on-demand fixup code in dl-runtime.c. */ + +static inline int __attribute__ ((unused, always_inline)) +elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) +{ + extern void _dl_runtime_resolve (void); + extern void _dl_runtime_profile (void); + + if (lazy) + { + register Elf64_Addr gp __asm__ ("gp"); + Elf64_Addr *reserve, doit; + + /* + * Careful with the typecast here or it will try to add l-l_addr + * pointer elements + */ + reserve = ((Elf64_Addr *) + (l->l_info[DT_IA_64 (PLT_RESERVE)]->d_un.d_ptr + l->l_addr)); + /* Identify this shared object. */ + reserve[0] = (Elf64_Addr) l; + + /* This function will be called to perform the relocation. */ + if (!profile) + doit = (Elf64_Addr) ((struct fdesc *) &_dl_runtime_resolve)->ip; + else + { + if (GLRO(dl_profile) != NULL + && _dl_name_match_p (GLRO(dl_profile), l)) + { + /* This is the object we are looking for. Say that we really + want profiling and the timers are started. */ + GL(dl_profile_map) = l; + } + doit = (Elf64_Addr) ((struct fdesc *) &_dl_runtime_profile)->ip; + } + + reserve[1] = doit; + reserve[2] = gp; + } + + return lazy; +} + +/* Names of the architecture-specific auditing callback functions. */ +#define ARCH_LA_PLTENTER ia64_gnu_pltenter +#define ARCH_LA_PLTEXIT ia64_gnu_pltexit + +/* Undo the adds out0 = 16, sp below to get at the value we want in + __libc_stack_end. */ +#define DL_STACK_END(cookie) \ + ((void *) (((long) (cookie)) - 16)) + +/* Initial entry point code for the dynamic linker. + The C function `_dl_start' is the real entry point; + its return value is the user program's entry point. */ + +#define RTLD_START asm ( \ +".text\n" \ +" .global _start#\n" \ +" .proc _start#\n" \ +"_start:\n" \ +"0: { .mii\n" \ +" .prologue\n" \ +" .save rp, r0\n" \ +" .body\n" \ +" .prologue\n" \ +" .save ar.pfs, r32\n" \ +" alloc loc0 = ar.pfs, 0, 3, 4, 0\n" \ +" .body\n" \ +" mov r2 = ip\n" \ +" addl r3 = @gprel(0b), r0\n" \ +" ;;\n" \ +" }\n" \ +" { .mlx\n" \ +" /* Calculate the GP, and save a copy in loc1. */\n" \ +" sub gp = r2, r3\n" \ +" movl r8 = 0x9804c0270033f\n" \ +" ;;\n" \ +" }\n" \ +" { .mii\n" \ +" mov ar.fpsr = r8\n" \ +" sub loc1 = r2, r3\n" \ +" /* _dl_start wants a pointer to the pointer to the arg block and\n" \ +" the arg block starts with an integer, thus the magic 16. */\n" \ +" adds out0 = 16, sp\n" \ +" }\n" \ +" { .bbb\n" \ +" br.call.sptk.many b0 = _dl_start#\n" \ +" ;;\n" \ +" }\n" \ +" .endp _start#\n" \ +" /* FALLTHRU */\n" \ +" .global _dl_start_user#\n" \ +" .proc _dl_start_user#\n" \ +"_dl_start_user:\n" \ +" .prologue\n" \ +" .save rp, r0\n" \ +" .body\n" \ +" .prologue\n" \ +" .save ar.pfs, r32\n" \ +" .body\n" \ +" { .mii\n" \ +" addl r3 = @gprel(_dl_skip_args), gp\n" \ +" adds r11 = 24, sp /* Load the address of argv. */\n" \ +" /* Save the pointer to the user entry point fptr in loc2. */\n" \ +" mov loc2 = ret0\n" \ +" ;;\n" \ +" }\n" \ +" { .mii\n" \ +" ld4 r3 = [r3]\n" \ +" adds r10 = 16, sp /* Load the address of argc. */\n" \ +" mov out2 = r11\n" \ +" ;;\n" \ +" /* See if we were run as a command with the executable file\n" \ +" name as an extra leading argument. If so, adjust the argv\n" \ +" pointer to skip _dl_skip_args words.\n" \ +" Note that _dl_skip_args is an integer, not a long - Jes\n" \ +"\n" \ +" The stack pointer has to be 16 byte aligned. We cannot simply\n" \ +" addjust the stack pointer. We have to move the whole argv and\n" \ +" envp and adjust _dl_argv by _dl_skip_args. H.J. */\n" \ +" }\n" \ +" { .mib\n" \ +" ld8 out1 = [r10] /* is argc actually stored as a long\n" \ +" or as an int? */\n" \ +" addl r2 = @ltoff(_dl_argv), gp\n" \ +" ;;\n" \ +" }\n" \ +" { .mmi\n" \ +" ld8 r2 = [r2] /* Get the address of _dl_argv. */\n" \ +" sub out1 = out1, r3 /* Get the new argc. */\n" \ +" shladd r3 = r3, 3, r0\n" \ +" ;;\n" \ +" }\n" \ +" {\n" \ +" .mib\n" \ +" ld8 r17 = [r2] /* Get _dl_argv. */\n" \ +" add r15 = r11, r3 /* The address of the argv we move */\n" \ +" ;;\n" \ +" }\n" \ +" /* ??? Could probably merge these two loops into 3 bundles.\n" \ +" using predication to control which set of copies we're on. */\n" \ +"1: /* Copy argv. */\n" \ +" { .mfi\n" \ +" ld8 r16 = [r15], 8 /* Load the value in the old argv. */\n" \ +" ;;\n" \ +" }\n" \ +" { .mib\n" \ +" st8 [r11] = r16, 8 /* Store it in the new argv. */\n" \ +" cmp.ne p6, p7 = 0, r16\n" \ +"(p6) br.cond.dptk.few 1b\n" \ +" ;;\n" \ +" }\n" \ +" { .mmi\n" \ +" mov out3 = r11\n" \ +" sub r17 = r17, r3 /* Substract _dl_skip_args. */\n" \ +" addl out0 = @gprel(_rtld_local), gp\n" \ +" }\n" \ +"1: /* Copy env. */\n" \ +" { .mfi\n" \ +" ld8 r16 = [r15], 8 /* Load the value in the old env. */\n" \ +" ;;\n" \ +" }\n" \ +" { .mib\n" \ +" st8 [r11] = r16, 8 /* Store it in the new env. */\n" \ +" cmp.ne p6, p7 = 0, r16\n" \ +"(p6) br.cond.dptk.few 1b\n" \ +" ;;\n" \ +" }\n" \ +" { .mmb\n" \ +" st8 [r10] = out1 /* Record the new argc. */\n" \ +" ld8 out0 = [out0] /* get the linkmap */\n" \ +" }\n" \ +" { .mmb\n" \ +" st8 [r2] = r17 /* Load the new _dl_argv. */\n" \ +" br.call.sptk.many b0 = _dl_init_internal#\n" \ +" ;;\n" \ +" }\n" \ +" /* Pass our finalizer function to the user,\n" \ +" and jump to the user's entry point. */\n" \ +" { .mmi\n" \ +" ld8 r3 = [loc2], 8\n" \ +" mov b0 = r0\n" \ +" }\n" \ +" { .mmi\n" \ +" addl ret0 = @ltoff(@fptr(_dl_fini#)), gp\n" \ +" ;;\n" \ +" mov b6 = r3\n" \ +" }\n" \ +" { .mmi\n" \ +" ld8 ret0 = [ret0]\n" \ +" ld8 gp = [loc2]\n" \ +" mov ar.pfs = loc0\n" \ +" ;;\n" \ +" }\n" \ +" { .mfb\n" \ +" br.sptk.many b6\n" \ +" ;;\n" \ +" }\n" \ +" .endp _dl_start_user#\n" \ +".previous\n"); + + +#ifndef RTLD_START_SPECIAL_INIT +#define RTLD_START_SPECIAL_INIT /* nothing */ +#endif + +/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry or TLS + variable, so undefined references should not be allowed to define the + value. + ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one + of the main executable's symbols, as for a COPY reloc, which we don't + use. */ +/* ??? Ignore *MSB for now. */ +#define elf_machine_type_class(type) \ + (((type) == R_IA64_IPLTLSB || (type) == R_IA64_DTPMOD64LSB \ + || (type) == R_IA64_DTPREL64LSB || (type) == R_IA64_TPREL64LSB) \ + * ELF_RTYPE_CLASS_PLT) + +/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */ +#define ELF_MACHINE_JMP_SLOT R_IA64_IPLTLSB + +/* According to the IA-64 specific documentation, Rela is always used. */ +#define ELF_MACHINE_NO_REL 1 + +/* Return the address of the entry point. */ +#define ELF_MACHINE_START_ADDRESS(map, start) \ + DL_STATIC_FUNCTION_ADDRESS (map, start) + +/* Fixup a PLT entry to bounce directly to the function at VALUE. */ +static inline struct fdesc __attribute__ ((always_inline)) +elf_machine_fixup_plt (struct link_map *l, lookup_t t, + const Elf64_Rela *reloc, + Elf64_Addr *reloc_addr, struct fdesc value) +{ + /* l is the link_map for the caller, t is the link_map for the object + * being called */ + /* got has already been relocated in elf_get_dynamic_info() */ + reloc_addr[1] = value.gp; + /* we need a "release" here to ensure that the gp is visible before + the code entry point is updated: */ + ((volatile Elf64_Addr *) reloc_addr)[0] = value.ip; + return value; +} + +/* Return the final value of a plt relocation. */ +static inline struct fdesc +elf_machine_plt_value (struct link_map *map, const Elf64_Rela *reloc, + struct fdesc value) +{ + /* No need to handle rel vs rela since IA64 is rela only */ + return (struct fdesc) { value.ip + reloc->r_addend, value.gp }; +} + +#endif /* !dl_machine_h */ + +#ifdef RESOLVE_MAP + +#define R_IA64_TYPE(R) ((R) & -8) +#define R_IA64_FORMAT(R) ((R) & 7) + +#define R_IA64_FORMAT_32MSB 4 +#define R_IA64_FORMAT_32LSB 5 +#define R_IA64_FORMAT_64MSB 6 +#define R_IA64_FORMAT_64LSB 7 + + +/* Perform the relocation specified by RELOC and SYM (which is fully + resolved). MAP is the object containing the reloc. */ +auto inline void +__attribute ((always_inline)) +elf_machine_rela (struct link_map *map, + const Elf64_Rela *reloc, + const Elf64_Sym *sym, + const struct r_found_version *version, + void *const reloc_addr_arg, + int skip_ifunc) +{ + Elf64_Addr *const reloc_addr = reloc_addr_arg; + const unsigned long int r_type = ELF64_R_TYPE (reloc->r_info); + Elf64_Addr value; + +#if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC && !defined SHARED + /* This is defined in rtld.c, but nowhere in the static libc.a; make the + reference weak so static programs can still link. This declaration + cannot be done when compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP) + because rtld.c contains the common defn for _dl_rtld_map, which is + incompatible with a weak decl in the same file. */ + weak_extern (_dl_rtld_map); +#endif + + /* We cannot use a switch here because we cannot locate the switch + jump table until we've self-relocated. */ + +#if !defined RTLD_BOOTSTRAP || !defined HAVE_Z_COMBRELOC + if (__builtin_expect (R_IA64_TYPE (r_type) == R_IA64_TYPE (R_IA64_REL64LSB), + 0)) + { + assert (ELF64_R_TYPE (reloc->r_info) == R_IA64_REL64LSB); + value = *reloc_addr; +# if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC + /* Already done in dynamic linker. */ + if (map != &GL(dl_rtld_map)) +# endif + value += map->l_addr; + } + else +#endif + if (__builtin_expect (r_type == R_IA64_NONE, 0)) + return; + else + { + struct link_map *sym_map; + + /* RESOLVE_MAP() will return NULL if it fail to locate the symbol. */ + if ((sym_map = RESOLVE_MAP (&sym, version, r_type))) + { + value = sym_map->l_addr + sym->st_value + reloc->r_addend; + + if (R_IA64_TYPE (r_type) == R_IA64_TYPE (R_IA64_DIR64LSB)) + ;/* No adjustment. */ + else if (r_type == R_IA64_IPLTLSB) + { + elf_machine_fixup_plt (NULL, NULL, reloc, reloc_addr, + DL_FIXUP_MAKE_VALUE (sym_map, value)); + return; + } + else if (R_IA64_TYPE (r_type) == R_IA64_TYPE (R_IA64_FPTR64LSB)) + value = _dl_make_fptr (sym_map, sym, value); + else if (R_IA64_TYPE (r_type) == R_IA64_TYPE (R_IA64_PCREL64LSB)) + value -= (Elf64_Addr) reloc_addr & -16; + else if (R_IA64_TYPE (r_type) == R_IA64_TYPE (R_IA64_DTPMOD64LSB)) +#ifdef RTLD_BOOTSTRAP + /* During startup the dynamic linker is always index 1. */ + value = 1; +#else + /* Get the information from the link map returned by the + resolv function. */ + value = sym_map->l_tls_modid; + else if (R_IA64_TYPE (r_type) == R_IA64_TYPE (R_IA64_DTPREL64LSB)) + value -= sym_map->l_addr; +#endif + else if (R_IA64_TYPE (r_type) == R_IA64_TYPE (R_IA64_TPREL64LSB)) + { +#ifndef RTLD_BOOTSTRAP + CHECK_STATIC_TLS (map, sym_map); +#endif + value += sym_map->l_tls_offset - sym_map->l_addr; + } + else + _dl_reloc_bad_type (map, r_type, 0); + } + else + value = 0; + } + + /* ??? Ignore MSB and Instruction format for now. */ + if (R_IA64_FORMAT (r_type) == R_IA64_FORMAT_64LSB) + *reloc_addr = value; + else if (R_IA64_FORMAT (r_type) == R_IA64_FORMAT_32LSB) + *(int *) reloc_addr = value; + else if (r_type == R_IA64_IPLTLSB) + { + reloc_addr[0] = 0; + reloc_addr[1] = 0; + } + else + _dl_reloc_bad_type (map, r_type, 0); +} + +/* Let do-rel.h know that on IA-64 if l_addr is 0, all RELATIVE relocs + can be skipped. */ +#define ELF_MACHINE_REL_RELATIVE 1 + +auto inline void +__attribute ((always_inline)) +elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc, + void *const reloc_addr_arg) +{ + Elf64_Addr *const reloc_addr = reloc_addr_arg; + /* ??? Ignore MSB and Instruction format for now. */ + assert (ELF64_R_TYPE (reloc->r_info) == R_IA64_REL64LSB); + + *reloc_addr += l_addr; +} + +/* Perform a RELATIVE reloc on the .got entry that transfers to the .plt. */ +auto inline void +__attribute ((always_inline)) +elf_machine_lazy_rel (struct link_map *map, + Elf64_Addr l_addr, const Elf64_Rela *reloc, + int skip_ifunc) +{ + Elf64_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset); + const unsigned long int r_type = ELF64_R_TYPE (reloc->r_info); + + if (r_type == R_IA64_IPLTLSB) + { + reloc_addr[0] += l_addr; + reloc_addr[1] += l_addr; + } + else if (r_type == R_IA64_NONE) + return; + else + _dl_reloc_bad_type (map, r_type, 1); +} + +#endif /* RESOLVE_MAP */ diff --git a/sysdeps/ia64/dl-sysdep.h b/sysdeps/ia64/dl-sysdep.h new file mode 100644 index 0000000000..e4040efc4c --- /dev/null +++ b/sysdeps/ia64/dl-sysdep.h @@ -0,0 +1,24 @@ +/* System-specific settings for dynamic linker code. IA-64 version. + Copyright (C) 2002, 2003, 2004, 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 + 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. */ + +#include_next + +/* _dl_argv cannot be attribute_relro, because _dl_start_user + might write into it after _dl_start returns. */ +#define DL_ARGV_NOT_RELRO 1 diff --git a/sysdeps/ia64/dl-tls.h b/sysdeps/ia64/dl-tls.h new file mode 100644 index 0000000000..5e9a165d7a --- /dev/null +++ b/sysdeps/ia64/dl-tls.h @@ -0,0 +1,33 @@ +/* Thread-local storage handling in the ELF dynamic linker. IA-64 version. + Copyright (C) 2002, 2003, 2011 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. */ + + +/* On IA-64 the __tls_get_addr function take the module ID and the + offset as parameters. */ +#define GET_ADDR_ARGS size_t m, size_t offset +#define GET_ADDR_MODULE m +#define GET_ADDR_OFFSET offset + +/* We have no tls_index type. */ +#define DONT_USE_TLS_INDEX 1 + +extern void *__tls_get_addr (size_t m, size_t offset); + +/* Value used for dtv entries for which the allocation is delayed. */ +#define TLS_DTV_UNALLOCATED ((void *) -1l) diff --git a/sysdeps/ia64/dl-trampoline.S b/sysdeps/ia64/dl-trampoline.S new file mode 100644 index 0000000000..1b31dc7c9c --- /dev/null +++ b/sysdeps/ia64/dl-trampoline.S @@ -0,0 +1,539 @@ +/* PLT trampolines. ia64 version. + Copyright (C) 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 + 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. */ + +#include +#undef ret + +/* + This code is used in dl-runtime.c to call the `_dl_fixup' function + and then redirect to the address it returns. `_dl_fixup()' takes two + arguments, however _dl_profile_fixup() takes five. + + The ABI specifies that we will never see more than 8 input + registers to a function call, thus it is safe to simply allocate + those, and simpler than playing stack games. */ + +/* Used to save and restore 8 incoming fp registers */ +#define RESOLVE_FRAME_SIZE (16*8) + +ENTRY(_dl_runtime_resolve) + { .mmi + .prologue + .save ar.pfs, r40 + alloc loc0 = ar.pfs, 8, 6, 2, 0 + /* Use the 16 byte scratch area. r2 will start at f8 and + r3 will start at f9. */ + adds r2 = -(RESOLVE_FRAME_SIZE - 16), r12 + adds r3 = -(RESOLVE_FRAME_SIZE - 32), r12 + } + { .mii + .fframe RESOLVE_FRAME_SIZE + adds r12 = -RESOLVE_FRAME_SIZE, r12 + .save rp, loc1 + mov loc1 = b0 + .body + mov loc2 = r8 /* preserve struct value register */ + ;; + } + { .mii + mov loc3 = r9 /* preserve language specific register */ + mov loc4 = r10 /* preserve language specific register */ + mov loc5 = r11 /* preserve language specific register */ + } + { .mmi + stf.spill [r2] = f8, 32 + stf.spill [r3] = f9, 32 + mov out0 = r16 + ;; + } + { .mmi + stf.spill [r2] = f10, 32 + stf.spill [r3] = f11, 32 + shl out1 = r15, 4 + ;; + } + { .mmi + stf.spill [r2] = f12, 32 + stf.spill [r3] = f13, 32 + /* Relocation record is 24 byte. */ + shladd out1 = r15, 3, out1 + ;; + } + { .mmb + stf.spill [r2] = f14 + stf.spill [r3] = f15 + br.call.sptk.many b0 = _dl_fixup + } + { .mii + /* Skip the 16byte scratch area. */ + adds r2 = 16, r12 + adds r3 = 32, r12 + mov b6 = ret0 + ;; + } + { .mmi + ldf.fill f8 = [r2], 32 + ldf.fill f9 = [r3], 32 + mov b0 = loc1 + ;; + } + { .mmi + ldf.fill f10 = [r2], 32 + ldf.fill f11 = [r3], 32 + mov gp = ret1 + ;; + } + { .mmi + ldf.fill f12 = [r2], 32 + ldf.fill f13 = [r3], 32 + mov ar.pfs = loc0 + ;; + } + { .mmi + ldf.fill f14 = [r2], 32 + ldf.fill f15 = [r3], 32 + .restore sp /* pop the unwind frame state */ + adds r12 = RESOLVE_FRAME_SIZE, r12 + ;; + } + { .mii + mov r9 = loc3 /* restore language specific register */ + mov r10 = loc4 /* restore language specific register */ + mov r11 = loc5 /* restore language specific register */ + } + { .mii + mov r8 = loc2 /* restore struct value register */ + ;; + } + /* An alloc is needed for the break system call to work. + We don't care about the old value of the pfs register. */ + { .mmb + .prologue + .body + alloc r2 = ar.pfs, 0, 0, 8, 0 + br.sptk.many b6 + ;; + } +END(_dl_runtime_resolve) + + +/* The fourth argument to _dl_profile_fixup and the third one to + _dl_call_pltexit are a pointer to La_ia64_regs: + + 8byte r8 + 8byte r9 + 8byte r10 + 8byte r11 + 8byte in0 + 8byte in1 + 8byte in2 + 8byte in3 + 8byte in4 + 8byte in5 + 8byte in6 + 8byte in7 + 16byte f8 + 16byte f9 + 16byte f10 + 16byte f11 + 16byte f12 + 16byte f13 + 16byte f14 + 16byte f15 + 8byte ar.unat + 8byte sp + + The fifth argument to _dl_profile_fixup is a pointer to long int. + The fourth argument to _dl_call_pltexit is a pointer to + La_ia64_retval: + + 8byte r8 + 8byte r9 + 8byte r10 + 8byte r11 + 16byte f8 + 16byte f9 + 16byte f10 + 16byte f11 + 16byte f12 + 16byte f13 + 16byte f14 + 16byte f15 + + Since stack has to be 16 byte aligned, the stack allocation is in + 16byte increment. Before calling _dl_profile_fixup, the stack will + look like + + psp new frame_size + +16 La_ia64_regs + sp scratch + + */ + +#define PLTENTER_FRAME_SIZE (4*8 + 8*8 + 8*16 + 2*8 + 16) +#define PLTEXIT_FRAME_SIZE (PLTENTER_FRAME_SIZE + 4*8 + 8*16) + +#ifndef PROF +ENTRY(_dl_runtime_profile) + { .mii + .prologue + .save ar.pfs, r40 + alloc loc0 = ar.pfs, 8, 12, 8, 0 + .vframe loc10 + mov loc10 = r12 + .save rp, loc1 + mov loc1 = b0 + } + { .mii + .save ar.unat, r17 + mov r17 = ar.unat + .save ar.lc, loc6 + mov loc6 = ar.lc + mov loc11 = gp + } + { .mii + .body + /* There is a 16 byte scratch area. r2 will start at r8 and + r3 will start at r9 for La_ia64_regs. */ + adds r2 = -(PLTENTER_FRAME_SIZE - 16), r12 + adds r3 = -(PLTENTER_FRAME_SIZE - 24), r12 + adds r12 = -PLTENTER_FRAME_SIZE, r12 + ;; + } + { .mmi + st8 [r2] = r8, 16; + st8 [r3] = r9, 16; + mov out2 = b0 /* needed by _dl_fixup_profile */ + ;; + } + { .mmi + st8 [r2] = r10, 16; + st8 [r3] = r11, 16; + adds out3 = 16, r12 /* pointer to La_ia64_regs */ + ;; + } + { .mmi + .mem.offset 0, 0 + st8.spill [r2] = in0, 16 + .mem.offset 8, 0 + st8.spill [r3] = in1, 16 + mov out4 = loc10 /* pointer to new frame size */ + ;; + } + { .mmi + .mem.offset 0, 0 + st8.spill [r2] = in2, 16 + .mem.offset 8, 0 + st8.spill [r3] = in3, 16 + mov loc2 = r8 /* preserve struct value register */ + ;; + } + { .mmi + .mem.offset 0, 0 + st8.spill [r2] = in4, 16 + .mem.offset 8, 0 + st8.spill [r3] = in5, 16 + mov loc3 = r9 /* preserve language specific register */ + ;; + } + { .mmi + .mem.offset 0, 0 + st8 [r2] = in6, 16 + .mem.offset 8, 0 + st8 [r3] = in7, 24 /* adjust for f9 */ + mov loc4 = r10 /* preserve language specific register */ + ;; + } + { .mii + mov r18 = ar.unat /* save it in La_ia64_regs */ + mov loc7 = out3 /* save it for _dl_call_pltexit */ + mov loc5 = r11 /* preserve language specific register */ + } + { .mmi + stf.spill [r2] = f8, 32 + stf.spill [r3] = f9, 32 + mov out0 = r16 /* needed by _dl_fixup_profile */ + ;; + } + { .mii + mov ar.unat = r17 /* restore it for function call */ + mov loc8 = r16 /* save it for _dl_call_pltexit */ + nop.i 0x0 + } + { .mmi + stf.spill [r2] = f10, 32 + stf.spill [r3] = f11, 32 + shl out1 = r15, 4 + ;; + } + { .mmi + stf.spill [r2] = f12, 32 + stf.spill [r3] = f13, 32 + /* Relocation record is 24 byte. */ + shladd out1 = r15, 3, out1 + ;; + } + { .mmi + stf.spill [r2] = f14, 32 + stf.spill [r3] = f15, 24 + mov loc9 = out1 /* save it for _dl_call_pltexit */ + ;; + } + { .mmb + st8 [r2] = r18 /* store ar.unat */ + st8 [r3] = loc10 /* store sp */ + br.call.sptk.many b0 = _dl_profile_fixup + } + { .mii + /* Skip the 16byte scratch area, 4 language specific GRs and + 8 incoming GRs to restore incoming fp registers. */ + adds r2 = (4*8 + 8*8 + 16), r12 + adds r3 = (4*8 + 8*8 + 32), r12 + mov b6 = ret0 + ;; + } + { .mmi + ldf.fill f8 = [r2], 32 + ldf.fill f9 = [r3], 32 + mov gp = ret1 + ;; + } + { .mmi + ldf.fill f10 = [r2], 32 + ldf.fill f11 = [r3], 32 + mov r8 = loc2 /* restore struct value register */ + ;; + } + { .mmi + ldf.fill f12 = [r2], 32 + ldf.fill f13 = [r3], 32 + mov r9 = loc3 /* restore language specific register */ + ;; + } + { .mmi + ldf.fill f14 = [r2], 32 + ldf.fill f15 = [r3], 32 + mov r10 = loc4 /* restore language specific register */ + ;; + } + { .mii + ld8 r15 = [loc10] /* load the new frame size */ + mov r11 = loc5 /* restore language specific register */ + ;; + cmp.eq p6, p7 = -1, r15 + ;; + } + { .mii +(p7) cmp.eq p8, p9 = 0, r15 +(p6) mov b0 = loc1 +(p6) mov ar.lc = loc6 + } + { .mib + nop.m 0x0 +(p6) mov ar.pfs = loc0 +(p6) br.cond.dptk.many .Lresolved + ;; + } + + /* At this point, the stack looks like + + +psp free + +16 La_ia64_regs + sp scratch + + We need to keep the current stack and call the resolved + function by copying the r15 byte from sp + PLTENTER_FRAME_SIZE + + 16 (scratch area) to sp + 16 (scratch area). Since stack + has to be 16byte aligned, we around r15 up to 16byte. */ + + { .mbb +(p9) adds r15 = 15, r15 +(p8) br.cond.dptk.many .Lno_new_frame + nop.b 0x0 + ;; + } + { .mmi + and r15 = -16, r15 + ;; + /* We don't copy the 16byte scatch area. Prepare r16/r17 as + destination. */ + sub r16 = r12, r15 + sub r17 = r12, r15 + ;; + } + { .mii + adds r16 = 16, r16 + adds r17 = 24, r17 + sub r12 = r12, r15 /* Adjust stack */ + ;; + } + { .mii + nop.m 0x0 + shr r15 = r15, 4 + ;; + adds r15 = -1, r15 + ;; + } + { .mii + /* Skip the 16byte scatch area. Prepare r2/r3 as source. */ + adds r2 = 16, loc10 + adds r3 = 24, loc10 + mov ar.lc = r15 + ;; + } +.Lcopy: + { .mmi + ld8 r18 = [r2], 16 + ld8 r19 = [r3], 16 + nop.i 0x0 + ;; + } + { .mmb + st8 [r16] = r18, 16 + st8 [r17] = r19, 16 + br.cloop.sptk.few .Lcopy + } +.Lno_new_frame: + { .mii + mov out0 = in0 + mov out1 = in1 + mov out2 = in2 + } + { .mii + mov out3 = in3 + mov out4 = in4 + mov out5 = in5 + } + { .mib + mov out6 = in6 + mov out7 = in7 + /* Call the resolved function */ + br.call.sptk.many b0 = b6 + } + { .mii + /* Prepare stack for _dl_call_pltexit. Loc10 has the original + stack pointer. */ + adds r12 = -PLTEXIT_FRAME_SIZE, loc10 + adds r2 = -(PLTEXIT_FRAME_SIZE - 16), loc10 + adds r3 = -(PLTEXIT_FRAME_SIZE - 24), loc10 + ;; + } + { .mmi + /* Load all possible return values into buffer. */ + st8 [r2] = r8, 16 + st8 [r3] = r9, 16 + mov out0 = loc8 + ;; + } + { .mmi + st8 [r2] = r10, 16 + st8 [r3] = r11, 24 + mov out1 = loc9 + ;; + } + { .mmi + stf.spill [r2] = f8, 32 + stf.spill [r3] = f9, 32 + mov out2 = loc7 /* Pointer to La_ia64_regs */ + ;; + } + { .mmi + stf.spill [r2] = f10, 32 + stf.spill [r3] = f11, 32 + adds out3 = 16, r12 /* Pointer to La_ia64_retval */ + ;; + } + { .mmi + stf.spill [r2] = f12, 32 + stf.spill [r3] = f13, 32 + /* We need to restore gp for _dl_call_pltexit. */ + mov gp = loc11 + ;; + } + { .mmb + stf.spill [r2] = f14 + stf.spill [r3] = f15 + br.call.sptk.many b0 = _dl_call_pltexit + } + { .mmi + /* Load all the non-floating and floating return values. Skip + the 16byte scratch area. */ + adds r2 = 16, r12 + adds r3 = 24, r12 + nop.i 0x0 + ;; + } + { .mmi + ld8 r8 = [r2], 16 + ld8 r9 = [r3], 16 + nop.i 0x0 + ;; + } + { .mmi + ld8 r10 = [r2], 16 + ld8 r11 = [r3], 24 + nop.i 0x0 + ;; + } + { .mmi + ldf.fill f8 = [r2], 32 + ldf.fill f9 = [r3], 32 + mov ar.lc = loc6 + ;; + } + { .mmi + ldf.fill f10 = [r2], 32 + ldf.fill f11 = [r3], 32 + mov ar.pfs = loc0 + ;; + } + { .mmi + ldf.fill f12 = [r2], 32 + ldf.fill f13 = [r3], 32 + mov b0 = loc1 + ;; + } + { .mmi + ldf.fill f14 = [r2] + ldf.fill f15 = [r3] + /* We know that the previous stack pointer, loc10, isn't 0. + We use it to reload p7. */ + cmp.ne p7, p0 = 0, loc10 + ;; + } +.Lresolved: + { .mmb + .restore sp + mov r12 = loc10 +(p7) br.ret.sptk.many b0 + ;; + } + /* An alloc is needed for the break system call to work. We + don't care about the old value of the pfs register. After + this alloc, we can't use any rotating registers. Otherwise + assembler won't be happy. This has to be at the end. */ + { .mmb + .prologue + .body + alloc r2 = ar.pfs, 0, 0, 8, 0 + br.sptk.many b6 + ;; + } +END(_dl_runtime_profile) +#endif diff --git a/sysdeps/ia64/elf/configure b/sysdeps/ia64/elf/configure new file mode 100644 index 0000000000..aa30dd0870 --- /dev/null +++ b/sysdeps/ia64/elf/configure @@ -0,0 +1,126 @@ + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + +# This file is generated from configure.in by Autoconf. DO NOT EDIT! + # Local configure fragment for sysdeps/ia64/elf. + +# Check for support of thread-local storage handling in assembler and +# linker. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ia64 TLS support" >&5 +$as_echo_n "checking for ia64 TLS support... " >&6; } +if ${libc_cv_ia64_tls+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.s <<\EOF + .section ".tdata","awT",@progbits +foo: data8 25 + .text + addl r16 = @ltoff(@dtpmod(foo#)), gp + addl r17 = @ltoff(@dtprel(foo#)), gp + addl r18 = @ltoff(@tprel(foo#)), gp + addl r19 = @dtprel(foo#), gp + adds r21 = @dtprel(foo#), r13 + movl r23 = @dtprel(foo#) + addl r20 = @tprel(foo#), gp + adds r22 = @tprel(foo#), r13 + movl r24 = @tprel(foo#) +EOF +if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + libc_cv_ia64_tls=yes +else + libc_cv_ia64_tls=no +fi +rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ia64_tls" >&5 +$as_echo "$libc_cv_ia64_tls" >&6; } +if test $libc_cv_ia64_tls = no; then + as_fn_error $? "the assembler must support TLS" "$LINENO" 5 +fi + +$as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h + diff --git a/sysdeps/ia64/elf/configure.in b/sysdeps/ia64/elf/configure.in new file mode 100644 index 0000000000..396b9c49cf --- /dev/null +++ b/sysdeps/ia64/elf/configure.in @@ -0,0 +1,34 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/ia64/elf. + +# Check for support of thread-local storage handling in assembler and +# linker. +AC_CACHE_CHECK(for ia64 TLS support, libc_cv_ia64_tls, [dnl +cat > conftest.s <<\EOF + .section ".tdata","awT",@progbits +foo: data8 25 + .text + addl r16 = @ltoff(@dtpmod(foo#)), gp + addl r17 = @ltoff(@dtprel(foo#)), gp + addl r18 = @ltoff(@tprel(foo#)), gp + addl r19 = @dtprel(foo#), gp + adds r21 = @dtprel(foo#), r13 + movl r23 = @dtprel(foo#) + addl r20 = @tprel(foo#), gp + adds r22 = @tprel(foo#), r13 + movl r24 = @tprel(foo#) +EOF +dnl +if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then + libc_cv_ia64_tls=yes +else + libc_cv_ia64_tls=no +fi +rm -f conftest*]) +if test $libc_cv_ia64_tls = no; then + AC_MSG_ERROR([the assembler must support TLS]) +fi + +dnl It is always possible to access static and hidden symbols in an +dnl position independent way. +AC_DEFINE(PI_STATIC_AND_HIDDEN) diff --git a/sysdeps/ia64/elf/entry.h b/sysdeps/ia64/elf/entry.h new file mode 100644 index 0000000000..b93e1b6a57 --- /dev/null +++ b/sysdeps/ia64/elf/entry.h @@ -0,0 +1,10 @@ +#ifndef __ASSEMBLY__ +extern void _start (void); +#endif + +/* The function's entry point is stored in the first word of the + function descriptor (plabel) of _start(). */ +#define ENTRY_POINT (((long int *) _start)[0]) + +/* We have to provide a special declaration. */ +#define ENTRY_POINT_DECL(class) class void _start (void); diff --git a/sysdeps/ia64/elf/initfini.c b/sysdeps/ia64/elf/initfini.c new file mode 100644 index 0000000000..d0a65ece80 --- /dev/null +++ b/sysdeps/ia64/elf/initfini.c @@ -0,0 +1,152 @@ +/* Special .init and .fini section support for ia64. + Copyright (C) 2000, 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 + 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. + + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + + 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. */ + +/* This file is compiled into assembly code which is then munged by a sed + script into two files: crti.s and crtn.s. + + * crti.s puts a function prologue at the beginning of the + .init and .fini sections and defines global symbols for + those addresses, so they can be called as functions. + + * crtn.s puts the corresponding function epilogues + in the .init and .fini sections. */ + +__asm__ ("\n\n" +"#include \"defs.h\"\n" +"\n" +"/*@HEADER_ENDS*/\n" +"\n" +"/*@_init_PROLOG_BEGINS*/\n"); + + +/* If we have working .init_array support, we want to keep the .init + section empty (apart from the mandatory prologue/epilogue. This + ensures that the default unwind conventions (return-pointer in b0, + frame state in ar.pfs, etc.) will do the Right Thing. To ensure + an empty .init section, we register gmon_initializer() via the + .init_array. + + --davidm 02/10/29 */ + +static void +__attribute__ ((used)) +gmon_initializer (void) +{ + extern void weak_function __gmon_start__ (void); + + if (__gmon_start__) + (*__gmon_start__)(); +} + +__asm__ (".section .init_array, \"aw\"\n" + "\tdata8 @fptr(gmon_initializer)\n"); + + +__asm__ (".section .init\n" +" .global _init#\n" +" .proc _init#\n" +"_init:\n" +" .prologue\n" +" .save ar.pfs, r34\n" +" alloc r34 = ar.pfs, 0, 3, 0, 0\n" +" .vframe r32\n" +" mov r32 = r12\n" +" .save rp, r33\n" +" mov r33 = b0\n" +" .body\n" +" adds r12 = -16, r12\n" +" ;;\n" /* see gmon_initializer() above */ +" .endp _init#\n" +"\n" +"/*@_init_PROLOG_ENDS*/\n" +"\n" +"/*@_init_EPILOG_BEGINS*/\n" +" .section .init\n" +" .proc _init#\n" +"_init:\n" +" .prologue\n" +" .save ar.pfs, r34\n" +" .vframe r32\n" +" .save rp, r33\n" +" .body\n" +" .regstk 0,2,0,0\n" +" mov r12 = r32\n" +" mov ar.pfs = r34\n" +" mov b0 = r33\n" +" br.ret.sptk.many b0\n" +" .endp _init#\n" +"/*@_init_EPILOG_ENDS*/\n" +"\n" +"/*@_fini_PROLOG_BEGINS*/\n" +" .section .fini\n" +" .global _fini#\n" +" .proc _fini#\n" +"_fini:\n" +" .prologue\n" +" .save ar.pfs, r34\n" +" alloc r34 = ar.pfs, 0, 3, 0, 0\n" +" .vframe r32\n" +" mov r32 = r12\n" +" .save rp, r33\n" +" mov r33 = b0\n" +" .body\n" +" adds r12 = -16, r12\n" +" ;;\n" +" .endp _fini#\n" +"\n" +"/*@_fini_PROLOG_ENDS*/\n" +" br.call.sptk.many b0 = i_am_not_a_leaf# ;;\n" +" ;;\n" +"\n" +"/*@_fini_EPILOG_BEGINS*/\n" +" .section .fini\n" +" .proc _fini#\n" +"_fini:\n" +" .prologue\n" +" .save ar.pfs, r34\n" +" .vframe r32\n" +" .save rp, r33\n" +" .body\n" +" mov r12 = r32\n" +" mov ar.pfs = r34\n" +" mov b0 = r33\n" +" br.ret.sptk.many b0\n" +" .endp _fini#\n" +"\n" +"/*@_fini_EPILOG_ENDS*/\n" +"\n" +"/*@TRAILER_BEGINS*/\n" +); diff --git a/sysdeps/ia64/elf/start.S b/sysdeps/ia64/elf/start.S new file mode 100644 index 0000000000..1c41a6517d --- /dev/null +++ b/sysdeps/ia64/elf/start.S @@ -0,0 +1,120 @@ +/* Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Written by Jes Sorensen, , April 1999. + + 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. + + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + + 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. */ + +#include + +#include +#include + +/* + * Arguments for __libc_start_main: + * out0: main + * out1: argc + * out2: argv + * out3: init + * out4: fini + * out5: rtld_fini + * out6: stack_end + */ + + .align 32 + .global _start + + .proc _start + .type _start,@function +_start: + .prologue + .save rp, r0 + .body + .prologue + { .mlx + alloc r2 = ar.pfs,0,0,7,0 + movl r3 = FPSR_DEFAULT + } + { .mlx + adds out2 = 16, sp /* get address of argc value */ + movl gp = @gprel(0f) + ;; + } +0: { .mmi + ld8 out1 = [out2], 8 /* load argc and move out2 to become argv */ + mov.m r10 = ar.bsp /* fetch rbs base address */ + mov r9 = ip + ;; + } + { .mii + mov ar.fpsr = r3 + sub gp = r9, gp /* back-compute gp value */ + adds out6 = 16, sp /* highest non-environment stack address */ + ;; + } + { + addl r11 = @ltoff(__libc_ia64_register_backing_store_base), gp + addl out0 = @ltoff(@fptr(main)), gp + addl out3 = @ltoff(@fptr(__libc_csu_init)), gp + ;; + } + { .mmi + ld8 r3 = [r11] /* pointer to __libc_ia64_register_backing_store_base */ + ld8 out0 = [out0] /* pointer to `main' function descriptor */ + addl out4 = @ltoff(@fptr(__libc_csu_fini)), gp + ;; + } + { .mmi + ld8 out3 = [out3] /* pointer to `init' function descriptor */ + ld8 out4 = [out4] /* pointer to `fini' function descriptor */ + nop 0 + } + .body + { .mib + st8 [r3] = r10 + mov out5 = ret0 /* dynamic linker destructor */ + br.call.sptk.few rp = __libc_start_main + } + { .mib + break 0 /* break miserably if we ever return */ + } + .endp _start + +/* Define a symbol for the first piece of initialized data. */ + .data + .globl __data_start +__data_start: + .long 0 + .weak data_start + data_start = __data_start + + .common __libc_ia64_register_backing_store_base, 8, 8 diff --git a/sysdeps/ia64/fpu/Makefile b/sysdeps/ia64/fpu/Makefile new file mode 100644 index 0000000000..384fc836af --- /dev/null +++ b/sysdeps/ia64/fpu/Makefile @@ -0,0 +1,34 @@ +ifeq ($(subdir),math) +# +# Some files which need to go both into libc and libm have external +# dependencies which need to be resolved differently for libc +# vs. libm. For example, inside libc, __libm_error_support needs to +# resolve to HIDDEN_JUMPTARGET(__libm_error_support) whereas within +# libm it always resolves to __libm_error_support. Such files need to +# be compiled twice. Fortunately, math/Makefile already has logic to +# support this: if a file starts with "s_", make will automatically +# generate a matching file whose name starts with "m_" which simply +# includes the corresponding "s_" file. +# +duplicated-routines = s_libm_ldexp s_libm_ldexpf s_libm_ldexpl \ + s_libm_scalbn s_libm_scalbnf s_libm_scalbnl + +libm-sysdep_routines += s_erfc s_erfcf s_erfcl \ + s_matherrf s_matherrl libm_reduce \ + libm_error \ + libm_frexp libm_frexpf libm_frexpl \ + libm_sincos libm_sincosf libm_sincosl \ + libm_sincos_large \ + libm_lgamma libm_lgammaf libm_lgammal \ + libm_scalblnf \ + $(duplicated-routines:s_%=m_%) + +sysdep_routines += libc_libm_error libm_frexp libm_frexpf libm_frexpl \ + $(duplicated-routines) + +sysdep-CPPFLAGS += -include libm-symbols.h \ + -D__POSIX__ -Dopensource \ + -D_LIB_VERSIONIMF=_LIB_VERSION \ + -DSIZE_INT_32 -DSIZE_LONG_INT_64 -DSIZE_LONG_LONG_INT_64 \ + -DSIZE_LONG_64 -DIA64 +endif diff --git a/sysdeps/ia64/fpu/README b/sysdeps/ia64/fpu/README new file mode 100644 index 0000000000..6f4af0678a --- /dev/null +++ b/sysdeps/ia64/fpu/README @@ -0,0 +1,50 @@ + ---------------------------------------------------------- + Notes on how to update libm based on Intel's libm releases + ---------------------------------------------------------- + +This source code in this directory is currently based on Intel libm +v2.1 as available from: + + http://www.intel.com/software/products/opensource/libraries/num.htm + +To ease importing, fix some bugs, and simplify integration into libc, +it is also necessary to apply the patch at: + + ftp://ftp.hpl.hp.com/pub/linux-ia64/intel-libm-041228.diff.gz + +The expectation is that Intel will integrate most if not all of these +changes into future releases of libm, so this patching step can +hopefully be omitted in the future. + +Once the patched libm sources are extracted in a directory $LIBM, they +can be imported into the libc source tree at $LIBC with the following +step: + + $ cd $LIBC/src/sysdep/ia64/fpu + $ ./import_intel_libm $LIBM + +This should produce a number of "Importing..." messages, without +showing any errors. + +At this point, you should be able to build glibc in the usual fashion. +We assume you do this in directory $OBJ. Once the build has +completed, run "make check" to verify that all (math) checks succeed. +If these checks succeed, you should also run the following commands to +verify that the new libm doesn't pollute the name-space and has proper +size-info for the data objects: + + $ cd $LIBC/src/sysdep/ia64/fpu + $ import_check $OBJ/math/ + +There should be no (unexpected) errors reported by this script. + +As an optional step, you may also want to confirm that the new libm +exports the exact same global symbols as the old one. + +If you want to see the changes introduced by the "import_intel_libm" +script, you can run the commands: + + $ cd $LIBC/src/sysdep/ia64/fpu + $ import_diffs + +That's it. diff --git a/sysdeps/ia64/fpu/Versions b/sysdeps/ia64/fpu/Versions new file mode 100644 index 0000000000..1faea6458d --- /dev/null +++ b/sysdeps/ia64/fpu/Versions @@ -0,0 +1,10 @@ +libc { + GLIBC_PRIVATE { + __libm_frexp_4; __libm_frexp_4f; __libm_frexp_4l; __libm_error_support; + } +} +libm { + GLIBC_2.2.3 { + matherrf; matherrl; + } +} diff --git a/sysdeps/ia64/fpu/bits/math-finite.h b/sysdeps/ia64/fpu/bits/math-finite.h new file mode 100644 index 0000000000..8901b2dc4d --- /dev/null +++ b/sysdeps/ia64/fpu/bits/math-finite.h @@ -0,0 +1,25 @@ +/* Entry points to finite-math-only compiler runs. + Copyright (C) 2011 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 _MATH_H +# error "Never use directly; include instead." +#endif + +/* Nothing can be done for IA-64 since the math functions differ in their + structure. */ diff --git a/sysdeps/ia64/fpu/bits/mathinline.h b/sysdeps/ia64/fpu/bits/mathinline.h new file mode 100644 index 0000000000..cd90b06d3a --- /dev/null +++ b/sysdeps/ia64/fpu/bits/mathinline.h @@ -0,0 +1,54 @@ +/* Inline math functions for ia64. + Copyright (C) 2004, 2007 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 _MATH_H +# error "Never use directly; include instead." +#endif + +#ifndef __extern_inline +# define __MATH_INLINE __inline +#else +# define __MATH_INLINE __extern_inline +#endif + +#if defined __USE_ISOC99 && defined __GNUC__ && __GNUC__ >= 2 +/* The gcc, version 2.7 or below, has problems with all this inlining + code. So disable it for this version of the compiler. */ +# if __GNUC_PREREQ (2, 8) +/* Test for negative number. Used in the signbit() macro. */ +__MATH_INLINE int +__NTH (__signbitf (float __x)) +{ + __extension__ union { float __f; int __i; } __u = { __f: __x }; + return __u.__i < 0; +} +__MATH_INLINE int +__NTH (__signbit (double __x)) +{ + __extension__ union { double __d; int __i[2]; } __u = { __d: __x }; + return __u.__i[1] < 0; +} +__MATH_INLINE int +__NTH (__signbitl (long double __x)) +{ + __extension__ union { long double __l; int __i[3]; } __u = { __l: __x }; + return (__u.__i[2] & 0x8000) != 0; +} +# endif +#endif diff --git a/sysdeps/ia64/fpu/branred.c b/sysdeps/ia64/fpu/branred.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/branred.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/doasin.c b/sysdeps/ia64/fpu/doasin.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/doasin.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/dosincos.c b/sysdeps/ia64/fpu/dosincos.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/dosincos.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/e_acos.S b/sysdeps/ia64/fpu/e_acos.S new file mode 100644 index 0000000000..c2b31ab85e --- /dev/null +++ b/sysdeps/ia64/fpu/e_acos.S @@ -0,0 +1,878 @@ +.file "acos.s" + + +// Copyright (c) 2000 - 2003 Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. + +// History +//============================================================== +// 02/02/00 Initial version +// 08/17/00 New and much faster algorithm. +// 08/30/00 Avoided bank conflicts on loads, shortened |x|=1 and x=0 paths, +// fixed mfb split issue stalls. +// 05/20/02 Cleaned up namespace and sf0 syntax +// 08/02/02 New and much faster algorithm II +// 02/06/03 Reordered header: .section, .global, .proc, .align + +// Description +//========================================= +// The acos function computes the principal value of the arc cosine of x. +// acos(0) returns Pi/2, acos(1) returns 0, acos(-1) returns Pi. +// A doman error occurs for arguments not in the range [-1,+1]. +// +// The acos function returns the arc cosine in the range [0, Pi] radians. +// +// There are 8 paths: +// 1. x = +/-0.0 +// Return acos(x) = Pi/2 + x +// +// 2. 0.0 < |x| < 0.625 +// Return acos(x) = Pi/2 - x - x^3 *PolA(x^2) +// where PolA(x^2) = A3 + A5*x^2 + A7*x^4 +...+ A35*x^32 +// +// 3. 0.625 <=|x| < 1.0 +// Return acos(x) = Pi/2 - asin(x) = +// = Pi/2 - sign(x) * ( Pi/2 - sqrt(R) * PolB(R)) +// Where R = 1 - |x|, +// PolB(R) = B0 + B1*R + B2*R^2 +...+B12*R^12 +// +// sqrt(R) is approximated using the following sequence: +// y0 = (1 + eps)/sqrt(R) - initial approximation by frsqrta, +// |eps| < 2^(-8) +// Then 3 iterations are used to refine the result: +// H0 = 0.5*y0 +// S0 = R*y0 +// +// d0 = 0.5 - H0*S0 +// H1 = H0 + d0*H0 +// S1 = S0 + d0*S0 +// +// d1 = 0.5 - H1*S1 +// H2 = H1 + d0*H1 +// S2 = S1 + d0*S1 +// +// d2 = 0.5 - H2*S2 +// S3 = S3 + d2*S3 +// +// S3 approximates sqrt(R) with enough accuracy for this algorithm +// +// So, the result should be reconstracted as follows: +// acos(x) = Pi/2 - sign(x) * (Pi/2 - S3*PolB(R)) +// +// But for optimization purposes the reconstruction step is slightly +// changed: +// acos(x) = Cpi + sign(x)*PolB(R)*S2 - sign(x)*d2*S2*PolB(R) +// where Cpi = 0 if x > 0 and Cpi = Pi if x < 0 +// +// 4. |x| = 1.0 +// Return acos(1.0) = 0.0, acos(-1.0) = Pi +// +// 5. 1.0 < |x| <= +INF +// A doman error occurs for arguments not in the range [-1,+1] +// +// 6. x = [S,Q]NaN +// Return acos(x) = QNaN +// +// 7. x is denormal +// Return acos(x) = Pi/2 - x, +// +// 8. x is unnormal +// Normalize input in f8 and return to the very beginning of the function +// +// Registers used +//============================================================== +// Floating Point registers used: +// f8, input, output +// f6, f7, f9 -> f15, f32 -> f64 + +// General registers used: +// r3, r21 -> r31, r32 -> r38 + +// Predicate registers used: +// p0, p6 -> p14 + +// +// Assembly macros +//========================================= +// integer registers used +// scratch +rTblAddr = r3 + +rPiBy2Ptr = r21 +rTmpPtr3 = r22 +rDenoBound = r23 +rOne = r24 +rAbsXBits = r25 +rHalf = r26 +r0625 = r27 +rSign = r28 +rXBits = r29 +rTmpPtr2 = r30 +rTmpPtr1 = r31 + +// stacked +GR_SAVE_PFS = r32 +GR_SAVE_B0 = r33 +GR_SAVE_GP = r34 +GR_Parameter_X = r35 +GR_Parameter_Y = r36 +GR_Parameter_RESULT = r37 +GR_Parameter_TAG = r38 + +// floating point registers used +FR_X = f10 +FR_Y = f1 +FR_RESULT = f8 + + +// scratch +fXSqr = f6 +fXCube = f7 +fXQuadr = f9 +f1pX = f10 +f1mX = f11 +f1pXRcp = f12 +f1mXRcp = f13 +fH = f14 +fS = f15 +// stacked +fA3 = f32 +fB1 = f32 +fA5 = f33 +fB2 = f33 +fA7 = f34 +fPiBy2 = f34 +fA9 = f35 +fA11 = f36 +fB10 = f35 +fB11 = f36 +fA13 = f37 +fA15 = f38 +fB4 = f37 +fB5 = f38 +fA17 = f39 +fA19 = f40 +fB6 = f39 +fB7 = f40 +fA21 = f41 +fA23 = f42 +fB3 = f41 +fB8 = f42 +fA25 = f43 +fA27 = f44 +fB9 = f43 +fB12 = f44 +fA29 = f45 +fA31 = f46 +fA33 = f47 +fA35 = f48 +fBaseP = f49 +fB0 = f50 +fSignedS = f51 +fD = f52 +fHalf = f53 +fR = f54 +fCloseTo1Pol = f55 +fSignX = f56 +fDenoBound = f57 +fNormX = f58 +fX8 = f59 +fRSqr = f60 +fRQuadr = f61 +fR8 = f62 +fX16 = f63 +fCpi = f64 + +// Data tables +//============================================================== +RODATA +.align 16 +LOCAL_OBJECT_START(acos_base_range_table) +// Ai: Polynomial coefficients for the acos(x), |x| < .625000 +// Bi: Polynomial coefficients for the acos(x), |x| > .625000 +data8 0xBFDAAB56C01AE468 //A29 +data8 0x3FE1C470B76A5B2B //A31 +data8 0xBFDC5FF82A0C4205 //A33 +data8 0x3FC71FD88BFE93F0 //A35 +data8 0xB504F333F9DE6487, 0x00003FFF //B0 +data8 0xAAAAAAAAAAAAFC18, 0x00003FFC //A3 +data8 0x3F9F1C71BC4A7823 //A9 +data8 0x3F96E8BBAAB216B2 //A11 +data8 0x3F91C4CA1F9F8A98 //A13 +data8 0x3F8C9DDCEDEBE7A6 //A15 +data8 0x3F877784442B1516 //A17 +data8 0x3F859C0491802BA2 //A19 +data8 0x9999999998C88B8F, 0x00003FFB //A5 +data8 0x3F6BD7A9A660BF5E //A21 +data8 0x3F9FC1659340419D //A23 +data8 0xB6DB6DB798149BDF, 0x00003FFA //A7 +data8 0xBFB3EF18964D3ED3 //A25 +data8 0x3FCD285315542CF2 //A27 +data8 0xF15BEEEFF7D2966A, 0x00003FFB //B1 +data8 0x3EF0DDA376D10FB3 //B10 +data8 0xBEB83CAFE05EBAC9 //B11 +data8 0x3F65FFB67B513644 //B4 +data8 0x3F5032FBB86A4501 //B5 +data8 0x3F392162276C7CBA //B6 +data8 0x3F2435949FD98BDF //B7 +data8 0xD93923D7FA08341C, 0x00003FF9 //B2 +data8 0x3F802995B6D90BDB //B3 +data8 0x3F10DF86B341A63F //B8 +data8 0xC90FDAA22168C235, 0x00003FFF // Pi/2 +data8 0x3EFA3EBD6B0ECB9D //B9 +data8 0x3EDE18BA080E9098 //B12 +LOCAL_OBJECT_END(acos_base_range_table) + +.section .text +GLOBAL_LIBM_ENTRY(acos) +acos_unnormal_back: +{ .mfi + getf.d rXBits = f8 // grab bits of input value + // set p12 = 1 if x is a NaN, denormal, or zero + fclass.m p12, p0 = f8, 0xcf + adds rSign = 1, r0 +} +{ .mfi + addl rTblAddr = @ltoff(acos_base_range_table),gp + // 1 - x = 1 - |x| for positive x + fms.s1 f1mX = f1, f1, f8 + addl rHalf = 0xFFFE, r0 // exponent of 1/2 +} +;; +{ .mfi + addl r0625 = 0x3FE4, r0 // high 16 bits of 0.625 + // set p8 = 1 if x < 0 + fcmp.lt.s1 p8, p9 = f8, f0 + shl rSign = rSign, 63 // sign bit +} +{ .mfi + // point to the beginning of the table + ld8 rTblAddr = [rTblAddr] + // 1 + x = 1 - |x| for negative x + fma.s1 f1pX = f1, f1, f8 + adds rOne = 0x3FF, r0 +} +;; +{ .mfi + andcm rAbsXBits = rXBits, rSign // bits of |x| + fmerge.s fSignX = f8, f1 // signum(x) + shl r0625 = r0625, 48 // bits of DP representation of 0.625 +} +{ .mfb + setf.exp fHalf = rHalf // load A2 to FP reg + fma.s1 fXSqr = f8, f8, f0 // x^2 + // branch on special path if x is a NaN, denormal, or zero +(p12) br.cond.spnt acos_special +} +;; +{ .mfi + adds rPiBy2Ptr = 272, rTblAddr + nop.f 0 + shl rOne = rOne, 52 // bits of 1.0 +} +{ .mfi + adds rTmpPtr1 = 16, rTblAddr + nop.f 0 + // set p6 = 1 if |x| < 0.625 + cmp.lt p6, p7 = rAbsXBits, r0625 +} +;; +{ .mfi + ldfpd fA29, fA31 = [rTblAddr] // A29, fA31 + // 1 - x = 1 - |x| for positive x +(p9) fms.s1 fR = f1, f1, f8 + // point to coefficient of "near 1" polynomial +(p7) adds rTmpPtr2 = 176, rTblAddr +} +{ .mfi + ldfpd fA33, fA35 = [rTmpPtr1], 16 // A33, fA35 + // 1 + x = 1 - |x| for negative x +(p8) fma.s1 fR = f1, f1, f8 +(p6) adds rTmpPtr2 = 48, rTblAddr +} +;; +{ .mfi + ldfe fB0 = [rTmpPtr1], 16 // B0 + nop.f 0 + nop.i 0 +} +{ .mib + adds rTmpPtr3 = 16, rTmpPtr2 + // set p10 = 1 if |x| = 1.0 + cmp.eq p10, p0 = rAbsXBits, rOne + // branch on special path for |x| = 1.0 +(p10) br.cond.spnt acos_abs_1 +} +;; +{ .mfi + ldfe fA3 = [rTmpPtr2], 48 // A3 or B1 + nop.f 0 + adds rTmpPtr1 = 64, rTmpPtr3 +} +{ .mib + ldfpd fA9, fA11 = [rTmpPtr3], 16 // A9, A11 or B10, B11 + // set p11 = 1 if |x| > 1.0 + cmp.gt p11, p0 = rAbsXBits, rOne + // branch on special path for |x| > 1.0 +(p11) br.cond.spnt acos_abs_gt_1 +} +;; +{ .mfi + ldfpd fA17, fA19 = [rTmpPtr2], 16 // A17, A19 or B6, B7 + // initial approximation of 1 / sqrt(1 - x) + frsqrta.s1 f1mXRcp, p0 = f1mX + nop.i 0 +} +{ .mfi + ldfpd fA13, fA15 = [rTmpPtr3] // A13, A15 or B4, B5 + fma.s1 fXCube = fXSqr, f8, f0 // x^3 + nop.i 0 +} +;; +{ .mfi + ldfe fA5 = [rTmpPtr2], 48 // A5 or B2 + // initial approximation of 1 / sqrt(1 + x) + frsqrta.s1 f1pXRcp, p0 = f1pX + nop.i 0 +} +{ .mfi + ldfpd fA21, fA23 = [rTmpPtr1], 16 // A21, A23 or B3, B8 + fma.s1 fXQuadr = fXSqr, fXSqr, f0 // x^4 + nop.i 0 +} +;; +{ .mfi + ldfe fA7 = [rTmpPtr1] // A7 or Pi/2 + fma.s1 fRSqr = fR, fR, f0 // R^2 + nop.i 0 +} +{ .mfb + ldfpd fA25, fA27 = [rTmpPtr2] // A25, A27 or B9, B12 + nop.f 0 +(p6) br.cond.spnt acos_base_range; +} +;; + +{ .mfi + nop.m 0 +(p9) fma.s1 fH = fHalf, f1mXRcp, f0 // H0 for x > 0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p9) fma.s1 fS = f1mX, f1mXRcp, f0 // S0 for x > 0 + nop.i 0 +} +;; +{ .mfi + nop.m 0 +(p8) fma.s1 fH = fHalf, f1pXRcp, f0 // H0 for x < 0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p8) fma.s1 fS = f1pX, f1pXRcp, f0 // S0 for x > 0 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fRQuadr = fRSqr, fRSqr, f0 // R^4 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fB11 = fB11, fR, fB10 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fB1 = fB1, fR, fB0 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fB5 = fB5, fR, fB4 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fB7 = fB7, fR, fB6 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fB3 = fB3, fR, fB2 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fnma.s1 fD = fH, fS, fHalf // d0 = 1/2 - H0*S0 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fR8 = fRQuadr, fRQuadr, f0 // R^4 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fB9 = fB9, fR, fB8 + nop.i 0 +} +;; +{.mfi + nop.m 0 + fma.s1 fB12 = fB12, fRSqr, fB11 + nop.i 0 +} +{.mfi + nop.m 0 + fma.s1 fB7 = fB7, fRSqr, fB5 + nop.i 0 +} +;; +{.mfi + nop.m 0 + fma.s1 fB3 = fB3, fRSqr, fB1 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fH = fH, fD, fH // H1 = H0 + H0*d0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fS = fS, fD, fS // S1 = S0 + S0*d0 + nop.i 0 +} +;; +{.mfi + nop.m 0 +(p9) fma.s1 fCpi = f1, f0, f0 // Cpi = 0 if x > 0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p8) fma.s1 fCpi = fPiBy2, f1, fPiBy2 // Cpi = Pi if x < 0 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fB12 = fB12, fRSqr, fB9 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fB7 = fB7, fRQuadr, fB3 + nop.i 0 +} +;; +{.mfi + nop.m 0 + fnma.s1 fD = fH, fS, fHalf // d1 = 1/2 - H1*S1 + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 fSignedS = fSignX, fS, f0 // -signum(x)*S1 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fCloseTo1Pol = fB12, fR8, fB7 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fH = fH, fD, fH // H2 = H1 + H1*d1 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fS = fS, fD, fS // S2 = S1 + S1*d1 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // -signum(x)* S2 = -signum(x)*(S1 + S1*d1) + fma.s1 fSignedS = fSignedS, fD, fSignedS + nop.i 0 +} +;; +{.mfi + nop.m 0 + fnma.s1 fD = fH, fS, fHalf // d2 = 1/2 - H2*S2 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // Cpi + signum(x)*PolB*S2 + fnma.s1 fCpi = fSignedS, fCloseTo1Pol, fCpi + nop.i 0 +} +{ .mfi + nop.m 0 + // signum(x)*PolB * S2 + fnma.s1 fCloseTo1Pol = fSignedS, fCloseTo1Pol, f0 + nop.i 0 +} +;; +{ .mfb + nop.m 0 + // final result for 0.625 <= |x| < 1 + fma.d.s0 f8 = fCloseTo1Pol, fD, fCpi + // exit here for 0.625 <= |x| < 1 + br.ret.sptk b0 +} +;; + + +// here if |x| < 0.625 +.align 32 +acos_base_range: +{ .mfi + ldfe fCpi = [rPiBy2Ptr] // Pi/2 + fma.s1 fA33 = fA33, fXSqr, fA31 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA15 = fA15, fXSqr, fA13 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA29 = fA29, fXSqr, fA27 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA25 = fA25, fXSqr, fA23 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA21 = fA21, fXSqr, fA19 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA9 = fA9, fXSqr, fA7 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA5 = fA5, fXSqr, fA3 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA35 = fA35, fXQuadr, fA33 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA17 = fA17, fXQuadr, fA15 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fX8 = fXQuadr, fXQuadr, f0 // x^8 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA25 = fA25, fXQuadr, fA21 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA9 = fA9, fXQuadr, fA5 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fms.s1 fCpi = fCpi, f1, f8 // Pi/2 - x + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA35 = fA35, fXQuadr, fA29 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA17 = fA17, fXSqr, fA11 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fX16 = fX8, fX8, f0 // x^16 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA35 = fA35, fX8, fA25 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA17 = fA17, fX8, fA9 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fBaseP = fA35, fX16, fA17 + nop.i 0 +} +;; +{ .mfb + nop.m 0 + // final result for |x| < 0.625 + fnma.d.s0 f8 = fBaseP, fXCube, fCpi + // exit here for |x| < 0.625 path + br.ret.sptk b0 +} +;; + +// here if |x| = 1 +// acos(1) = 0 +// acos(-1) = Pi +.align 32 +acos_abs_1: +{ .mfi + ldfe fPiBy2 = [rPiBy2Ptr] // Pi/2 + nop.f 0 + nop.i 0 +} +;; +.pred.rel "mutex", p8, p9 +{ .mfi + nop.m 0 + // result for x = 1.0 +(p9) fma.d.s0 f8 = f1, f0, f0 // 0.0 + nop.i 0 +} +{.mfb + nop.m 0 + // result for x = -1.0 +(p8) fma.d.s0 f8 = fPiBy2, f1, fPiBy2 // Pi + // exit here for |x| = 1.0 + br.ret.sptk b0 +} +;; + +// here if x is a NaN, denormal, or zero +.align 32 +acos_special: +{ .mfi + // point to Pi/2 + adds rPiBy2Ptr = 272, rTblAddr + // set p12 = 1 if x is a NaN + fclass.m p12, p0 = f8, 0xc3 + nop.i 0 +} +{ .mlx + nop.m 0 + // smallest positive DP normalized number + movl rDenoBound = 0x0010000000000000 +} +;; +{ .mfi + ldfe fPiBy2 = [rPiBy2Ptr] // Pi/2 + // set p13 = 1 if x = 0.0 + fclass.m p13, p0 = f8, 0x07 + nop.i 0 +} +{ .mfi + nop.m 0 + fnorm.s1 fNormX = f8 + nop.i 0 +} +;; +{ .mfb + // load smallest normal to FP reg + setf.d fDenoBound = rDenoBound + // answer if x is a NaN +(p12) fma.d.s0 f8 = f8,f1,f0 + // exit here if x is a NaN +(p12) br.ret.spnt b0 +} +;; +{ .mfi + nop.m 0 + // absolute value of normalized x + fmerge.s fNormX = f1, fNormX + nop.i 0 +} +;; +{ .mfb + nop.m 0 + // final result for x = 0 +(p13) fma.d.s0 f8 = fPiBy2, f1, f8 + // exit here if x = 0.0 +(p13) br.ret.spnt b0 +} +;; +// if we still here then x is denormal or unnormal +{ .mfi + nop.m 0 + // set p14 = 1 if normalized x is greater than or + // equal to the smallest denormalized value + // So, if p14 is set to 1 it means that we deal with + // unnormal rather than with "true" denormal + fcmp.ge.s1 p14, p0 = fNormX, fDenoBound + nop.i 0 +} +;; +{ .mfi + nop.m 0 +(p14) fcmp.eq.s0 p6, p0 = f8, f0 // Set D flag if x unnormal + nop.i 0 +} +{ .mfb + nop.m 0 + // normalize unnormal input +(p14) fnorm.s1 f8 = f8 + // return to the main path +(p14) br.cond.sptk acos_unnormal_back +} +;; +// if we still here it means that input is "true" denormal +{ .mfb + nop.m 0 + // final result if x is denormal + fms.d.s0 f8 = fPiBy2, f1, f8 // Pi/2 - x + // exit here if x is denormal + br.ret.sptk b0 +} +;; + +// here if |x| > 1.0 +// error handler should be called +.align 32 +acos_abs_gt_1: +{ .mfi + alloc r32 = ar.pfs, 0, 3, 4, 0 // get some registers + fmerge.s FR_X = f8,f8 + nop.i 0 +} +{ .mfb + mov GR_Parameter_TAG = 58 // error code + frcpa.s0 FR_RESULT, p0 = f0,f0 + // call error handler routine + br.cond.sptk __libm_error_region +} +;; +GLOBAL_LIBM_END(acos) + + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfd [GR_Parameter_Y] = FR_Y,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; +.body +{ .mib + stfd [GR_Parameter_X] = FR_X // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfd [GR_Parameter_Y] = FR_RESULT // STORE Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; +{ .mmi + ldfd f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/e_acosf.S b/sysdeps/ia64/fpu/e_acosf.S new file mode 100644 index 0000000000..68b0b2ee8d --- /dev/null +++ b/sysdeps/ia64/fpu/e_acosf.S @@ -0,0 +1,694 @@ +.file "acosf.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. + +// History +//============================================================== +// 02/02/00 Initial version +// 06/28/00 Improved speed +// 06/31/00 Changed register allocation because of some duplicate macros +// moved nan exit bundle up to gain a cycle. +// 08/15/00 Bundle added after call to __libm_error_support to properly +// set [the previously overwritten] GR_Parameter_RESULT. +// 08/17/00 Changed predicate register macro-usage to direct predicate +// names due to an assembler bug. +// 10/17/00 Improved speed of x=0 and x=1 paths, set D flag if x denormal. +// 03/13/01 Corrected sign of imm1 value in dep instruction. +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/06/03 Reordered header: .section, .global, .proc, .align +// 04/17/03 Moved mutex after label + + +// Description +//========================================= +// The acosf function computes the principle value of the arc sine of x. +// A doman error occurs for arguments not in the range [-1,+1]. + +// The acosf function returns the arc cosine in the range [0, +pi] radians. +// acos(1) returns +0 +// acos(x) returns a Nan and raises the invalid exception for |x| >1 + +// |x| <= sqrt(2)/2. get Ax and Bx + +// poly_p1 = x p1 +// poly_p3 = x2 p4 + p3 +// poly_p1 = x2 (poly_p1) + x = x2(x p1) + x +// poly_p2 = x2( poly_p3) + p2 = x2(x2 p4 + p3) + p2 + +// poly_Ax = x5(x2( poly_p3) + p2) + x2(x p1) + x +// = x5(x2(x2 p4 + p3) + p2) + x2(x p1) + x + +// poly_p7 = x2 p8 + p7 +// poly_p5 = x2 p6 + p5 + +// poly_p7 = x4 p9 + (x2 p8 + p7) +// poly_Bx = x4 (x4 p9 + (x2 p8 + p7)) + x2 p6 + p5 + +// sinf1 = x11(x4 (x4 p9 + (x2 p8 + p7)) + x2 p6 + p5) + x5(x2(x2 p4 + p3) + p2) + x2(x p1) + x +// = x19 p9 + x17 p8 + x15 p7 x13 p6 + x11 p5 + x9 p4 + x7 p3 + x5 p2 + x3 p1 + x +// answer1 = pi/2 - sinf1 + + + +// |x| > sqrt(2)/2 + +// Get z = sqrt(1-x2) + +// Get polynomial in t = 1-x2 + +// t2 = t t +// t4 = t2 t2 + +// poly_p4 = t p5 + p4 +// poly_p1 = t p1 + 1 + +// poly_p6 = t p7 + p6 +// poly_p2 = t p3 + p2 + +// poly_p8 = t p9 + p8 + +// poly_p4 = t2 poly_p6 + poly_p4 +// = t2 (t p7 + p6) + (t p5 + p4) + +// poly_p2 = t2 poly_p2 + poly_p1 +// = t2 (t p3 + p2) + (t p1 + 1) + +// poly_p4 = t4 poly_p8 + poly_p4 +// = t4 (t p9 + p8) + (t2 (t p7 + p6) + (t p5 + p4)) + +// P(t) = poly_p2 + t4 poly_p8 +// = t2 (t p3 + p2) + (t p1 + 1) + t4 (t4 (t p9 + p8) + (t2 (t p7 + p6) + (t p5 + p4))) +// = t3 p3 + t2 p2 + t p1 + 1 + t9 p9 + t8 p8 + t7 p7 + t6 p6 + t5 p5 + t4 p4 + + +// answer2 = sign(x) z P(t) if x>0 +// = sign(x) z P(t) + pi if x<0 + + +// +// Assembly macros +//========================================= + +// predicate registers +//acosf_pred_LEsqrt2by2 = p7 +//acosf_pred_GTsqrt2by2 = p8 + +// integer registers +ACOSF_Addr1 = r33 +ACOSF_Addr2 = r34 +ACOSF_GR_1by2 = r35 + +ACOSF_GR_3by2 = r36 +ACOSF_GR_5by2 = r37 + +GR_SAVE_B0 = r38 +GR_SAVE_PFS = r39 +GR_SAVE_GP = r40 + +GR_Parameter_X = r41 +GR_Parameter_Y = r42 +GR_Parameter_RESULT = r43 +GR_Parameter_TAG = r44 + +// floating point registers + +acosf_y = f32 +acosf_abs_x = f33 +acosf_x2 = f34 +acosf_sgn_x = f35 + +acosf_1by2 = f36 +acosf_3by2 = f37 +acosf_5by2 = f38 +acosf_coeff_P3 = f39 +acosf_coeff_P8 = f40 + +acosf_coeff_P1 = f41 +acosf_coeff_P4 = f42 +acosf_coeff_P5 = f43 +acosf_coeff_P2 = f44 +acosf_coeff_P7 = f45 + +acosf_coeff_P6 = f46 +acosf_coeff_P9 = f47 +acosf_x2 = f48 +acosf_x3 = f49 +acosf_x4 = f50 + +acosf_x8 = f51 +acosf_x5 = f52 +acosf_const_piby2 = f53 +acosf_const_sqrt2by2 = f54 +acosf_x11 = f55 + +acosf_poly_p1 = f56 +acosf_poly_p3 = f57 +acosf_sinf1 = f58 +acosf_poly_p2 = f59 +acosf_poly_Ax = f60 + +acosf_poly_p7 = f61 +acosf_poly_p5 = f62 +acosf_sgnx_t4 = f63 +acosf_poly_Bx = f64 +acosf_t = f65 + +acosf_yby2 = f66 +acosf_B = f67 +acosf_B2 = f68 +acosf_Az = f69 +acosf_dz = f70 + +acosf_Sz = f71 +acosf_d2z = f72 +acosf_Fz = f73 +acosf_z = f74 +acosf_sgnx_z = f75 + +acosf_t2 = f76 +acosf_2poly_p4 = f77 +acosf_2poly_p6 = f78 +acosf_2poly_p1 = f79 +acosf_2poly_p2 = f80 + +acosf_2poly_p8 = f81 +acosf_t4 = f82 +acosf_Pt = f83 +acosf_sgnx_2poly_p2 = f84 +acosf_sgn_x_piby2 = f85 + +acosf_poly_p7a = f86 +acosf_2poly_p4a = f87 +acosf_2poly_p4b = f88 +acosf_2poly_p2a = f89 +acosf_poly_p1a = f90 + + + + + +// Data tables +//============================================================== + +RODATA + +.align 16 + +LOCAL_OBJECT_START(acosf_coeff_1_table) +data8 0x3FC5555607DCF816 // P1 +data8 0x3F9CF81AD9BAB2C6 // P4 +data8 0x3FC59E0975074DF3 // P7 +data8 0xBFA6F4CC2780AA1D // P6 +data8 0x3FC2DD45292E93CB // P9 +data8 0x3fe6a09e667f3bcd // sqrt(2)/2 +LOCAL_OBJECT_END(acosf_coeff_1_table) + +LOCAL_OBJECT_START(acosf_coeff_2_table) +data8 0x3FA6F108E31EFBA6 // P3 +data8 0xBFCA31BF175D82A0 // P8 +data8 0x3FA30C0337F6418B // P5 +data8 0x3FB332C9266CB1F9 // P2 +data8 0x3ff921fb54442d18 // pi_by_2 +LOCAL_OBJECT_END(acosf_coeff_2_table) + + +.section .text +GLOBAL_LIBM_ENTRY(acosf) + +// Load the addresses of the two tables. +// Then, load the coefficients and other constants. + +{ .mfi + alloc r32 = ar.pfs,1,8,4,0 + fnma.s1 acosf_t = f8,f8,f1 + dep.z ACOSF_GR_1by2 = 0x3f,24,8 // 0x3f000000 +} +{ .mfi + addl ACOSF_Addr1 = @ltoff(acosf_coeff_1_table),gp + fma.s1 acosf_x2 = f8,f8,f0 + addl ACOSF_Addr2 = @ltoff(acosf_coeff_2_table),gp ;; +} + + +{ .mfi + ld8 ACOSF_Addr1 = [ACOSF_Addr1] + fmerge.s acosf_abs_x = f1,f8 + dep ACOSF_GR_3by2 = -1,r0,22,8 // 0x3fc00000 +} +{ .mlx + nop.m 999 + movl ACOSF_GR_5by2 = 0x40200000;; +} + + + +{ .mfi + setf.s acosf_1by2 = ACOSF_GR_1by2 + fmerge.s acosf_sgn_x = f8,f1 + nop.i 999 +} +{ .mfi + ld8 ACOSF_Addr2 = [ACOSF_Addr2] + nop.f 0 + nop.i 999;; +} + + +{ .mfi + setf.s acosf_5by2 = ACOSF_GR_5by2 + fcmp.lt.s1 p11,p12 = f8,f0 + nop.i 999;; +} + +{ .mmf + ldfpd acosf_coeff_P1,acosf_coeff_P4 = [ACOSF_Addr1],16 + setf.s acosf_3by2 = ACOSF_GR_3by2 + fclass.m.unc p8,p0 = f8, 0xc3 ;; //@qnan | @snan +} + + +{ .mfi + ldfpd acosf_coeff_P7,acosf_coeff_P6 = [ACOSF_Addr1],16 + fma.s1 acosf_t2 = acosf_t,acosf_t,f0 + nop.i 999 +} +{ .mfi + ldfpd acosf_coeff_P3,acosf_coeff_P8 = [ACOSF_Addr2],16 + fma.s1 acosf_x4 = acosf_x2,acosf_x2,f0 + nop.i 999;; +} + + +{ .mfi + ldfpd acosf_coeff_P9,acosf_const_sqrt2by2 = [ACOSF_Addr1] + fclass.m.unc p10,p0 = f8, 0x07 //@zero + nop.i 999 +} +{ .mfi + ldfpd acosf_coeff_P5,acosf_coeff_P2 = [ACOSF_Addr2],16 + fma.s1 acosf_x3 = f8,acosf_x2,f0 + nop.i 999;; +} + + +{ .mfi + ldfd acosf_const_piby2 = [ACOSF_Addr2] + frsqrta.s1 acosf_B,p0 = acosf_t + nop.i 999 +} +{ .mfb + nop.m 999 +(p8) fma.s.s0 f8 = f8,f1,f0 +(p8) br.ret.spnt b0 ;; // Exit if x=nan +} + + +{ .mfb + nop.m 999 + fcmp.eq.s1 p6,p0 = acosf_abs_x,f1 +(p10) br.cond.spnt ACOSF_ZERO ;; // Branch if x=0 +} + +{ .mfi + nop.m 999 + fcmp.gt.s1 p9,p0 = acosf_abs_x,f1 + nop.i 999;; +} + +{ .mfi + nop.m 999 + fma.s1 acosf_x8 = acosf_x4,acosf_x4,f0 + nop.i 999 +} +{ .mfb + nop.m 999 + fma.s1 acosf_t4 = acosf_t2,acosf_t2,f0 +(p6) br.cond.spnt ACOSF_ABS_ONE ;; // Branch if |x|=1 +} + +{ .mfi + nop.m 999 + fma.s1 acosf_x5 = acosf_x2,acosf_x3,f0 + nop.i 999 +} +{ .mfb +(p9) mov GR_Parameter_TAG = 59 + fma.s1 acosf_yby2 = acosf_t,acosf_1by2,f0 +(p9) br.cond.spnt __libm_error_region ;; // Branch if |x|>1 +} + + +{ .mfi + nop.m 999 + fma.s1 acosf_Az = acosf_t,acosf_B,f0 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 acosf_B2 = acosf_B,acosf_B,f0 + nop.i 999;; +} + +{ .mfi + nop.m 999 + fma.s1 acosf_poly_p1 = f8,acosf_coeff_P1,f0 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 acosf_2poly_p1 = acosf_coeff_P1,acosf_t,f1 + nop.i 999;; +} + +{ .mfi + nop.m 999 + fma.s1 acosf_poly_p3 = acosf_coeff_P4,acosf_x2,acosf_coeff_P3 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 acosf_2poly_p6 = acosf_coeff_P7,acosf_t,acosf_coeff_P6 + nop.i 999;; +} + +{ .mfi + nop.m 999 + fma.s1 acosf_poly_p7 = acosf_x2,acosf_coeff_P8,acosf_coeff_P7 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 acosf_2poly_p2 = acosf_coeff_P3,acosf_t,acosf_coeff_P2 + nop.i 999;; +} + + +{ .mfi + nop.m 999 + fma.s1 acosf_poly_p5 = acosf_x2,acosf_coeff_P6,acosf_coeff_P5 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 acosf_2poly_p4 = acosf_coeff_P5,acosf_t,acosf_coeff_P4 + nop.i 999;; +} + + +{ .mfi + nop.m 999 + fma.s1 acosf_x11 = acosf_x8,acosf_x3,f0 + nop.i 999 +} +{ .mfi + nop.m 999 + fnma.s1 acosf_dz = acosf_B2,acosf_yby2,acosf_1by2 + nop.i 999;; +} + + +{ .mfi + nop.m 999 + fma.s1 acosf_poly_p1a = acosf_x2,acosf_poly_p1,f8 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 acosf_2poly_p8 = acosf_coeff_P9,acosf_t,acosf_coeff_P8 + nop.i 999;; +} + + +// Get the absolute value of x and determine the region in which x lies + +{ .mfi + nop.m 999 + fcmp.le.s1 p7,p8 = acosf_abs_x,acosf_const_sqrt2by2 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 acosf_poly_p2 = acosf_x2,acosf_poly_p3,acosf_coeff_P2 + nop.i 999;; +} + + +{ .mfi + nop.m 999 + fma.s1 acosf_poly_p7a = acosf_x4,acosf_coeff_P9,acosf_poly_p7 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 acosf_2poly_p2a = acosf_2poly_p2,acosf_t2,acosf_2poly_p1 + nop.i 999;; +} + + +{ .mfi + nop.m 999 +(p8) fma.s1 acosf_sgnx_t4 = acosf_sgn_x,acosf_t4,f0 + nop.i 999 +} +{ .mfi + nop.m 999 +(p8) fma.s1 acosf_2poly_p4a = acosf_2poly_p6,acosf_t2,acosf_2poly_p4 + nop.i 999;; +} + + +{ .mfi + nop.m 999 +(p8) fma.s1 acosf_Sz = acosf_5by2,acosf_dz,acosf_3by2 + nop.i 999 +} +{ .mfi + nop.m 999 +(p8) fma.s1 acosf_d2z = acosf_dz,acosf_dz,f0 + nop.i 999;; +} + + +{ .mfi + nop.m 999 +(p8) fnma.d.s1 acosf_sgn_x_piby2 = acosf_sgn_x,acosf_const_piby2,acosf_const_piby2 + nop.i 999 +} +{ .mfi + nop.m 999 +(p7) fma.s1 acosf_poly_Ax = acosf_x5,acosf_poly_p2,acosf_poly_p1a + nop.i 999;; +} + +{ .mfi + nop.m 999 +(p7) fma.s1 acosf_poly_Bx = acosf_x4,acosf_poly_p7a,acosf_poly_p5 + nop.i 999 +} +{ .mfi + nop.m 999 +(p8) fma.s1 acosf_sgnx_2poly_p2 = acosf_sgn_x,acosf_2poly_p2a,f0 + nop.i 999;; +} + +{ .mfi + nop.m 999 + fcmp.eq.s0 p6,p0 = f8,f0 // Only purpose is to set D if x denormal + nop.i 999 +} +{ .mfi + nop.m 999 +(p8) fma.s1 acosf_2poly_p4b = acosf_2poly_p8,acosf_t4,acosf_2poly_p4a + nop.i 999;; +} + + +{ .mfi + nop.m 999 +(p8) fma.s1 acosf_Fz = acosf_d2z,acosf_Sz,acosf_dz + nop.i 999;; +} + + +{ .mfi + nop.m 999 +(p8) fma.d.s1 acosf_Pt = acosf_2poly_p4b,acosf_sgnx_t4,acosf_sgnx_2poly_p2 + nop.i 999;; +} + +{ .mfi + nop.m 999 +(p8) fma.d.s1 acosf_z = acosf_Az,acosf_Fz,acosf_Az + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p7) fma.d.s1 acosf_sinf1 = acosf_x11,acosf_poly_Bx,acosf_poly_Ax + nop.i 999;; +} + +.pred.rel "mutex",p8,p7 //acosf_pred_GTsqrt2by2,acosf_pred_LEsqrt2by2 +{ .mfi + nop.m 999 +(p8) fma.s.s0 f8 = acosf_z,acosf_Pt,acosf_sgn_x_piby2 + nop.i 999 +} + +{ .mfb + nop.m 999 +(p7) fms.s.s0 f8 = acosf_const_piby2,f1,acosf_sinf1 + br.ret.sptk b0 ;; +} + +ACOSF_ZERO: +// Here if x=0 +{ .mfb + nop.m 999 + fma.s.s0 f8 = acosf_const_piby2,f1,f0 // acosf(0)=pi/2 + br.ret.sptk b0 ;; +} + + +ACOSF_ABS_ONE: +.pred.rel "mutex",p11,p12 +// Here if |x|=1 +{ .mfi + nop.m 999 +(p11) fma.s.s0 f8 = acosf_const_piby2,f1,acosf_const_piby2 // acosf(-1)=pi + nop.i 999 +} +{ .mfb + nop.m 999 +(p12) fma.s.s0 f8 = f1,f0,f0 // acosf(1)=0 + br.ret.sptk b0 ;; +} + +GLOBAL_LIBM_END(acosf) + + +// Stack operations when calling error support. +// (1) (2) +// sp -> + psp -> + +// | | +// | | <- GR_Y +// | | +// | <-GR_Y Y2->| +// | | +// | | <- GR_X +// | | +// sp-64 -> + sp -> + +// save ar.pfs save b0 +// save gp + + +// Stack operations when calling error support. +// (3) (call) (4) +// psp -> + sp -> + +// | | +// R3 ->| <- GR_RESULT | -> f8 +// | | +// Y2 ->| <- GR_Y | +// | | +// X1 ->| | +// | | +// sp -> + + +// restore gp +// restore ar.pfs + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 999 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfs [GR_Parameter_Y] = f1,16 // Store Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; + +.body +{ .mfi + nop.m 0 + frcpa.s0 f9,p0 = f0,f0 + nop.i 0 +};; + +{ .mib + stfs [GR_Parameter_X] = f8 // Store Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y + nop.b 0 // Parameter 3 address +} +{ .mib + stfs [GR_Parameter_Y] = f9 // Store Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + nop.m 0 + nop.m 0 + add GR_Parameter_RESULT = 48,sp +};; + +{ .mmi + ldfs f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) + +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/e_acosh.S b/sysdeps/ia64/fpu/e_acosh.S new file mode 100644 index 0000000000..fb25fa0053 --- /dev/null +++ b/sysdeps/ia64/fpu/e_acosh.S @@ -0,0 +1,1202 @@ +.file "acosh.s" + + +// Copyright (c) 2000 - 2005, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// ============================================================== +// History +// ============================================================== +// 03/23/01 Initial version +// 04/19/01 Improved speed of the paths #1,2,3,4,5 +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/06/03 Reordered header: .section, .global, .proc, .align +// 05/14/03 Improved performance, set denormal flag for unorms >= 1.0 +// 03/31/05 Reformatted delimiters between data tables +// +// API +// ============================================================== +// double acosh(double) +// +// Overview of operation +// ============================================================== +// +// There are 7 paths: +// 1. x = 1.0 +// Return acosh(x) = 0.0 +// 2. 1.0 < x < 1.000499725341796875(0x3FF0020C00000000) +// Return acosh(x) = sqrt(x-1) * Pol4(x), where Pol4(x) = +// (((x*C4 + C3)*(x-1) + C2)*(x-1) + C1)*(x-1) + C0 + +// 3. 1.000499725341796875(0x3FF0020C00000000) <= x < 2^63 +// Return acosh(x) = log(x + sqrt(x^2 -1.0)) +// To compute x + sqrt(x^2 -1.0) modified Newton Raphson method is used +// (3 iterations) +// Algorithm description for log function see below. +// +// 4. 2^63 <= x < +INF +// Return acosh(x) = log(2*x) +// Algorithm description for log function see below. +// +// 5. x = +INF +// Return acosh(x) = +INF +// +// 6. x = [S,Q]NaN +// Return acosh(x) = QNaN +// +// 7. x < 1.0 +// It's domain error. Error handler with tag = 136 is called +// +//============================================================== +// Algorithm Description for log(x) function +// Below we are using the fact that inequality x - 1.0 > 2^(-6) is always +// true for this acosh implementation +// +// Consider x = 2^N 1.f1 f2 f3 f4...f63 +// Log(x) = log(frcpa(x) x/frcpa(x)) +// = log(1/frcpa(x)) + log(frcpa(x) x) +// = -log(frcpa(x)) + log(frcpa(x) x) +// +// frcpa(x) = 2^-N frcpa((1.f1 f2 ... f63) +// +// -log(frcpa(x)) = -log(C) +// = -log(2^-N) - log(frcpa(1.f1 f2 ... f63)) +// +// -log(frcpa(x)) = -log(C) +// = +Nlog2 - log(frcpa(1.f1 f2 ... f63)) +// +// -log(frcpa(x)) = -log(C) +// = +Nlog2 + log(frcpa(1.f1 f2 ... f63)) +// +// Log(x) = log(1/frcpa(x)) + log(frcpa(x) x) +// +// Log(x) = +Nlog2 + log(1./frcpa(1.f1 f2 ... f63)) + log(frcpa(x) x) +// Log(x) = +Nlog2 - log(/frcpa(1.f1 f2 ... f63)) + log(frcpa(x) x) +// Log(x) = +Nlog2 + T + log(frcpa(x) x) +// +// Log(x) = +Nlog2 + T + log(C x) +// +// Cx = 1 + r +// +// Log(x) = +Nlog2 + T + log(1+r) +// Log(x) = +Nlog2 + T + Series( r - r^2/2 + r^3/3 - r^4/4 ....) +// +// 1.f1 f2 ... f8 has 256 entries. +// They are 1 + k/2^8, k = 0 ... 255 +// These 256 values are the table entries. +// +// Implementation +//============================================================== +// C = frcpa(x) +// r = C * x - 1 +// +// Form rseries = r + P1*r^2 + P2*r^3 + P3*r^4 + P4*r^5 + P5*r^6 +// +// x = f * 2*n where f is 1.f_1f_2f_3....f_63 +// Nfloat = float(n) where n is the true unbiased exponent +// pre-index = f_1f_2....f_8 +// index = pre_index * 16 +// get the dxt table entry at index + offset = T +// +// result = (T + Nfloat * log(2)) + rseries +// +// The T table is calculated as follows +// Form x_k = 1 + k/2^8 where k goes from 0... 255 +// y_k = frcpa(x_k) +// log(1/y_k) in quad and round to double-extended +// + +// Registers used +//============================================================== +// Floating Point registers used: +// f8, input +// f9 -> f15, f32 -> f65 + +// General registers used: +// r14 -> r27, r32 -> r39 + +// Predicate registers used: +// p6 -> p15 + +// p6 to filter out case when x = [Q,S]NaN +// p7,p8 to filter out case when x < 1.0 +// p10 to select path #1 +// p11 to filter out case when x = +INF +// p12 used in the frcpa +// p13 to select path #4 +// p14,p15 to select path #2 + +// Assembly macros +//============================================================== +log_GR_exp_17_ones = r14 +log_GR_signexp_f8 = r15 +log_table_address2 = r16 +log_GR_exp_16_ones = r17 +log_GR_exp_f8 = r18 +log_GR_true_exp_f8 = r19 +log_GR_significand_f8 = r20 +log_GR_index = r21 +log_GR_comp2 = r22 +acosh_GR_f8 = r23 +log_GR_comp = r24 +acosh_GR_f8_sig = r25 +log_table_address3 = r26 +NR_table_address = r27 + +GR_SAVE_B0 = r33 +GR_SAVE_GP = r34 +GR_SAVE_PFS = r35 + +GR_Parameter_X = r36 +GR_Parameter_Y = r37 +GR_Parameter_RESULT = r38 +acosh_GR_tag = r39 + +//============================================================== +log_y = f9 +NR1 = f10 +NR2 = f11 +log_y_rs = f12 +log_y_rs_iter = f13 +log_y_rs_iter1 = f14 +log_NORM_f8 = f15 +acosh_comp = f32 +log_w = f34 +log_P5 = f35 +log_P4 = f36 +log_P3 = f37 +log_P2 = f38 +log_P1 = f39 +log_C0 = f40 +log_C1 = f41 +log_C2 = f42 +log2 = f43 +acosh_w_rs = f44 +log_C = f45 +log_arg = f46 +acosh_w_iter1 = f47 +acosh_w_iter2 = f48 +log_int_Nfloat = f49 +log_r = f50 +log_rsq = f51 +log_rp_p4 = f52 +log_rp_p32 = f53 +log_rcube = f54 +log_rp_p10 = f55 +log_rp_p2 = f56 +log_Nfloat = f57 +log_T = f58 +log_r2P_r = f59 +log_T_plus_Nlog2 = f60 +acosh_w_sqrt = f61 +acosh_w_1 = f62 +log_C3 = f63 +log_C4 = f64 +log_arg_early = f65 + + +// Data tables +//============================================================== + +RODATA +.align 16 + +LOCAL_OBJECT_START(log_table_1) +data8 0x3FF0020C49BA5E35 // 1.0005 +data8 0xBFC5555DA7212371 // P5 +data8 0x3FC999A19EEF5826 // P4 +data8 0xBFCFFFFFFFFEF009 // P3 +data8 0x3FD555555554ECB2 // P2 +data8 0xBFE0000000000000 // P1 = -0.5 +// +data8 0xb17217f7d1cf79ac, 0x00003ffe // log2 +LOCAL_OBJECT_END(log_table_1) + +LOCAL_OBJECT_START(log_table_2) +data8 0x3FE0000000000000 // 0.5 +data8 0x4008000000000000 // 3.0 +// +data8 0xAFE8F9203939CCF8, 0x00003FF6 // C4 3FF6AFE8F9203939CCF8 +data8 0xAD46EB6AE752D809, 0x0000BFF8 // C3 BFF8AD46EB6AE752D809 +data8 0xD93923D7F53F3627, 0x00003FF9 // C2 3FF9D93923D7F53F3627 +data8 0xF15BEEEFF7D32D36, 0x0000BFFB // C1 BFFBF15BEEEFF7D32D36 +data8 0xB504F333F9DE6484, 0x00003FFF // C0 3FFFB504F333F9DE6484 +LOCAL_OBJECT_END(log_table_2) + + +LOCAL_OBJECT_START(log_table_3) +data8 0x80200aaeac44ef38 , 0x00003ff6 // log(1/frcpa(1+ 0/2^-8)) +// +data8 0xc09090a2c35aa070 , 0x00003ff7 // log(1/frcpa(1+ 1/2^-8)) +data8 0xa0c94fcb41977c75 , 0x00003ff8 // log(1/frcpa(1+ 2/2^-8)) +data8 0xe18b9c263af83301 , 0x00003ff8 // log(1/frcpa(1+ 3/2^-8)) +data8 0x8d35c8d6399c30ea , 0x00003ff9 // log(1/frcpa(1+ 4/2^-8)) +data8 0xadd4d2ecd601cbb8 , 0x00003ff9 // log(1/frcpa(1+ 5/2^-8)) +// +data8 0xce95403a192f9f01 , 0x00003ff9 // log(1/frcpa(1+ 6/2^-8)) +data8 0xeb59392cbcc01096 , 0x00003ff9 // log(1/frcpa(1+ 7/2^-8)) +data8 0x862c7d0cefd54c5d , 0x00003ffa // log(1/frcpa(1+ 8/2^-8)) +data8 0x94aa63c65e70d499 , 0x00003ffa // log(1/frcpa(1+ 9/2^-8)) +data8 0xa54a696d4b62b382 , 0x00003ffa // log(1/frcpa(1+ 10/2^-8)) +// +data8 0xb3e4a796a5dac208 , 0x00003ffa // log(1/frcpa(1+ 11/2^-8)) +data8 0xc28c45b1878340a9 , 0x00003ffa // log(1/frcpa(1+ 12/2^-8)) +data8 0xd35c55f39d7a6235 , 0x00003ffa // log(1/frcpa(1+ 13/2^-8)) +data8 0xe220f037b954f1f5 , 0x00003ffa // log(1/frcpa(1+ 14/2^-8)) +data8 0xf0f3389b036834f3 , 0x00003ffa // log(1/frcpa(1+ 15/2^-8)) +// +data8 0xffd3488d5c980465 , 0x00003ffa // log(1/frcpa(1+ 16/2^-8)) +data8 0x87609ce2ed300490 , 0x00003ffb // log(1/frcpa(1+ 17/2^-8)) +data8 0x8ede9321e8c85927 , 0x00003ffb // log(1/frcpa(1+ 18/2^-8)) +data8 0x96639427f2f8e2f4 , 0x00003ffb // log(1/frcpa(1+ 19/2^-8)) +data8 0x9defad3e8f73217b , 0x00003ffb // log(1/frcpa(1+ 20/2^-8)) +// +data8 0xa582ebd50097029c , 0x00003ffb // log(1/frcpa(1+ 21/2^-8)) +data8 0xac06dbe75ab80fee , 0x00003ffb // log(1/frcpa(1+ 22/2^-8)) +data8 0xb3a78449b2d3ccca , 0x00003ffb // log(1/frcpa(1+ 23/2^-8)) +data8 0xbb4f79635ab46bb2 , 0x00003ffb // log(1/frcpa(1+ 24/2^-8)) +data8 0xc2fec93a83523f3f , 0x00003ffb // log(1/frcpa(1+ 25/2^-8)) +// +data8 0xc99af2eaca4c4571 , 0x00003ffb // log(1/frcpa(1+ 26/2^-8)) +data8 0xd1581106472fa653 , 0x00003ffb // log(1/frcpa(1+ 27/2^-8)) +data8 0xd8002560d4355f2e , 0x00003ffb // log(1/frcpa(1+ 28/2^-8)) +data8 0xdfcb43b4fe508632 , 0x00003ffb // log(1/frcpa(1+ 29/2^-8)) +data8 0xe67f6dff709d4119 , 0x00003ffb // log(1/frcpa(1+ 30/2^-8)) +// +data8 0xed393b1c22351280 , 0x00003ffb // log(1/frcpa(1+ 31/2^-8)) +data8 0xf5192bff087bcc35 , 0x00003ffb // log(1/frcpa(1+ 32/2^-8)) +data8 0xfbdf4ff6dfef2fa3 , 0x00003ffb // log(1/frcpa(1+ 33/2^-8)) +data8 0x81559a97f92f9cc7 , 0x00003ffc // log(1/frcpa(1+ 34/2^-8)) +data8 0x84be72bce90266e8 , 0x00003ffc // log(1/frcpa(1+ 35/2^-8)) +// +data8 0x88bc74113f23def2 , 0x00003ffc // log(1/frcpa(1+ 36/2^-8)) +data8 0x8c2ba3edf6799d11 , 0x00003ffc // log(1/frcpa(1+ 37/2^-8)) +data8 0x8f9dc92f92ea08b1 , 0x00003ffc // log(1/frcpa(1+ 38/2^-8)) +data8 0x9312e8f36efab5a7 , 0x00003ffc // log(1/frcpa(1+ 39/2^-8)) +data8 0x968b08643409ceb6 , 0x00003ffc // log(1/frcpa(1+ 40/2^-8)) +// +data8 0x9a062cba08a1708c , 0x00003ffc // log(1/frcpa(1+ 41/2^-8)) +data8 0x9d845b3abf95485c , 0x00003ffc // log(1/frcpa(1+ 42/2^-8)) +data8 0xa06fd841bc001bb4 , 0x00003ffc // log(1/frcpa(1+ 43/2^-8)) +data8 0xa3f3a74652fbe0db , 0x00003ffc // log(1/frcpa(1+ 44/2^-8)) +data8 0xa77a8fb2336f20f5 , 0x00003ffc // log(1/frcpa(1+ 45/2^-8)) +// +data8 0xab0497015d28b0a0 , 0x00003ffc // log(1/frcpa(1+ 46/2^-8)) +data8 0xae91c2be6ba6a615 , 0x00003ffc // log(1/frcpa(1+ 47/2^-8)) +data8 0xb189d1b99aebb20b , 0x00003ffc // log(1/frcpa(1+ 48/2^-8)) +data8 0xb51cced5de9c1b2c , 0x00003ffc // log(1/frcpa(1+ 49/2^-8)) +data8 0xb819bee9e720d42f , 0x00003ffc // log(1/frcpa(1+ 50/2^-8)) +// +data8 0xbbb2a0947b093a5d , 0x00003ffc // log(1/frcpa(1+ 51/2^-8)) +data8 0xbf4ec1505811684a , 0x00003ffc // log(1/frcpa(1+ 52/2^-8)) +data8 0xc2535bacfa8975ff , 0x00003ffc // log(1/frcpa(1+ 53/2^-8)) +data8 0xc55a3eafad187eb8 , 0x00003ffc // log(1/frcpa(1+ 54/2^-8)) +data8 0xc8ff2484b2c0da74 , 0x00003ffc // log(1/frcpa(1+ 55/2^-8)) +// +data8 0xcc0b1a008d53ab76 , 0x00003ffc // log(1/frcpa(1+ 56/2^-8)) +data8 0xcfb6203844b3209b , 0x00003ffc // log(1/frcpa(1+ 57/2^-8)) +data8 0xd2c73949a47a19f5 , 0x00003ffc // log(1/frcpa(1+ 58/2^-8)) +data8 0xd5daae18b49d6695 , 0x00003ffc // log(1/frcpa(1+ 59/2^-8)) +data8 0xd8f08248cf7e8019 , 0x00003ffc // log(1/frcpa(1+ 60/2^-8)) +// +data8 0xdca7749f1b3e540e , 0x00003ffc // log(1/frcpa(1+ 61/2^-8)) +data8 0xdfc28e033aaaf7c7 , 0x00003ffc // log(1/frcpa(1+ 62/2^-8)) +data8 0xe2e012a5f91d2f55 , 0x00003ffc // log(1/frcpa(1+ 63/2^-8)) +data8 0xe600064ed9e292a8 , 0x00003ffc // log(1/frcpa(1+ 64/2^-8)) +data8 0xe9226cce42b39f60 , 0x00003ffc // log(1/frcpa(1+ 65/2^-8)) +// +data8 0xec4749fd97a28360 , 0x00003ffc // log(1/frcpa(1+ 66/2^-8)) +data8 0xef6ea1bf57780495 , 0x00003ffc // log(1/frcpa(1+ 67/2^-8)) +data8 0xf29877ff38809091 , 0x00003ffc // log(1/frcpa(1+ 68/2^-8)) +data8 0xf5c4d0b245cb89be , 0x00003ffc // log(1/frcpa(1+ 69/2^-8)) +data8 0xf8f3afd6fcdef3aa , 0x00003ffc // log(1/frcpa(1+ 70/2^-8)) +// +data8 0xfc2519756be1abc7 , 0x00003ffc // log(1/frcpa(1+ 71/2^-8)) +data8 0xff59119f503e6832 , 0x00003ffc // log(1/frcpa(1+ 72/2^-8)) +data8 0x8147ce381ae0e146 , 0x00003ffd // log(1/frcpa(1+ 73/2^-8)) +data8 0x82e45f06cb1ad0f2 , 0x00003ffd // log(1/frcpa(1+ 74/2^-8)) +data8 0x842f5c7c573cbaa2 , 0x00003ffd // log(1/frcpa(1+ 75/2^-8)) +// +data8 0x85ce471968c8893a , 0x00003ffd // log(1/frcpa(1+ 76/2^-8)) +data8 0x876e8305bc04066d , 0x00003ffd // log(1/frcpa(1+ 77/2^-8)) +data8 0x891012678031fbb3 , 0x00003ffd // log(1/frcpa(1+ 78/2^-8)) +data8 0x8a5f1493d766a05f , 0x00003ffd // log(1/frcpa(1+ 79/2^-8)) +data8 0x8c030c778c56fa00 , 0x00003ffd // log(1/frcpa(1+ 80/2^-8)) +// +data8 0x8da85df17e31d9ae , 0x00003ffd // log(1/frcpa(1+ 81/2^-8)) +data8 0x8efa663e7921687e , 0x00003ffd // log(1/frcpa(1+ 82/2^-8)) +data8 0x90a22b6875c6a1f8 , 0x00003ffd // log(1/frcpa(1+ 83/2^-8)) +data8 0x91f62cc8f5d24837 , 0x00003ffd // log(1/frcpa(1+ 84/2^-8)) +data8 0x93a06cfc3857d980 , 0x00003ffd // log(1/frcpa(1+ 85/2^-8)) +// +data8 0x94f66d5e6fd01ced , 0x00003ffd // log(1/frcpa(1+ 86/2^-8)) +data8 0x96a330156e6772f2 , 0x00003ffd // log(1/frcpa(1+ 87/2^-8)) +data8 0x97fb3582754ea25b , 0x00003ffd // log(1/frcpa(1+ 88/2^-8)) +data8 0x99aa8259aad1bbf2 , 0x00003ffd // log(1/frcpa(1+ 89/2^-8)) +data8 0x9b0492f6227ae4a8 , 0x00003ffd // log(1/frcpa(1+ 90/2^-8)) +// +data8 0x9c5f8e199bf3a7a5 , 0x00003ffd // log(1/frcpa(1+ 91/2^-8)) +data8 0x9e1293b9998c1daa , 0x00003ffd // log(1/frcpa(1+ 92/2^-8)) +data8 0x9f6fa31e0b41f308 , 0x00003ffd // log(1/frcpa(1+ 93/2^-8)) +data8 0xa0cda11eaf46390e , 0x00003ffd // log(1/frcpa(1+ 94/2^-8)) +data8 0xa22c8f029cfa45aa , 0x00003ffd // log(1/frcpa(1+ 95/2^-8)) +// +data8 0xa3e48badb7856b34 , 0x00003ffd // log(1/frcpa(1+ 96/2^-8)) +data8 0xa5459a0aa95849f9 , 0x00003ffd // log(1/frcpa(1+ 97/2^-8)) +data8 0xa6a79c84480cfebd , 0x00003ffd // log(1/frcpa(1+ 98/2^-8)) +data8 0xa80a946d0fcb3eb2 , 0x00003ffd // log(1/frcpa(1+ 99/2^-8)) +data8 0xa96e831a3ea7b314 , 0x00003ffd // log(1/frcpa(1+100/2^-8)) +// +data8 0xaad369e3dc544e3b , 0x00003ffd // log(1/frcpa(1+101/2^-8)) +data8 0xac92e9588952c815 , 0x00003ffd // log(1/frcpa(1+102/2^-8)) +data8 0xadfa035aa1ed8fdc , 0x00003ffd // log(1/frcpa(1+103/2^-8)) +data8 0xaf6219eae1ad6e34 , 0x00003ffd // log(1/frcpa(1+104/2^-8)) +data8 0xb0cb2e6d8160f753 , 0x00003ffd // log(1/frcpa(1+105/2^-8)) +// +data8 0xb2354249ad950f72 , 0x00003ffd // log(1/frcpa(1+106/2^-8)) +data8 0xb3a056e98ef4a3b4 , 0x00003ffd // log(1/frcpa(1+107/2^-8)) +data8 0xb50c6dba52c6292a , 0x00003ffd // log(1/frcpa(1+108/2^-8)) +data8 0xb679882c33876165 , 0x00003ffd // log(1/frcpa(1+109/2^-8)) +data8 0xb78c07429785cedc , 0x00003ffd // log(1/frcpa(1+110/2^-8)) +// +data8 0xb8faeb8dc4a77d24 , 0x00003ffd // log(1/frcpa(1+111/2^-8)) +data8 0xba6ad77eb36ae0d6 , 0x00003ffd // log(1/frcpa(1+112/2^-8)) +data8 0xbbdbcc915e9bee50 , 0x00003ffd // log(1/frcpa(1+113/2^-8)) +data8 0xbd4dcc44f8cf12ef , 0x00003ffd // log(1/frcpa(1+114/2^-8)) +data8 0xbec0d81bf5b531fa , 0x00003ffd // log(1/frcpa(1+115/2^-8)) +// +data8 0xc034f19c139186f4 , 0x00003ffd // log(1/frcpa(1+116/2^-8)) +data8 0xc14cb69f7c5e55ab , 0x00003ffd // log(1/frcpa(1+117/2^-8)) +data8 0xc2c2abbb6e5fd56f , 0x00003ffd // log(1/frcpa(1+118/2^-8)) +data8 0xc439b2c193e6771e , 0x00003ffd // log(1/frcpa(1+119/2^-8)) +data8 0xc553acb9d5c67733 , 0x00003ffd // log(1/frcpa(1+120/2^-8)) +// +data8 0xc6cc96e441272441 , 0x00003ffd // log(1/frcpa(1+121/2^-8)) +data8 0xc8469753eca88c30 , 0x00003ffd // log(1/frcpa(1+122/2^-8)) +data8 0xc962cf3ce072b05c , 0x00003ffd // log(1/frcpa(1+123/2^-8)) +data8 0xcadeba8771f694aa , 0x00003ffd // log(1/frcpa(1+124/2^-8)) +data8 0xcc5bc08d1f72da94 , 0x00003ffd // log(1/frcpa(1+125/2^-8)) +// +data8 0xcd7a3f99ea035c29 , 0x00003ffd // log(1/frcpa(1+126/2^-8)) +data8 0xcef93860c8a53c35 , 0x00003ffd // log(1/frcpa(1+127/2^-8)) +data8 0xd0192f68a7ed23df , 0x00003ffd // log(1/frcpa(1+128/2^-8)) +data8 0xd19a201127d3c645 , 0x00003ffd // log(1/frcpa(1+129/2^-8)) +data8 0xd2bb92f4061c172c , 0x00003ffd // log(1/frcpa(1+130/2^-8)) +// +data8 0xd43e80b2ee8cc8fc , 0x00003ffd // log(1/frcpa(1+131/2^-8)) +data8 0xd56173601fc4ade4 , 0x00003ffd // log(1/frcpa(1+132/2^-8)) +data8 0xd6e6637efb54086f , 0x00003ffd // log(1/frcpa(1+133/2^-8)) +data8 0xd80ad9f58f3c8193 , 0x00003ffd // log(1/frcpa(1+134/2^-8)) +data8 0xd991d1d31aca41f8 , 0x00003ffd // log(1/frcpa(1+135/2^-8)) +// +data8 0xdab7d02231484a93 , 0x00003ffd // log(1/frcpa(1+136/2^-8)) +data8 0xdc40d532cde49a54 , 0x00003ffd // log(1/frcpa(1+137/2^-8)) +data8 0xdd685f79ed8b265e , 0x00003ffd // log(1/frcpa(1+138/2^-8)) +data8 0xde9094bbc0e17b1d , 0x00003ffd // log(1/frcpa(1+139/2^-8)) +data8 0xe01c91b78440c425 , 0x00003ffd // log(1/frcpa(1+140/2^-8)) +// +data8 0xe14658f26997e729 , 0x00003ffd // log(1/frcpa(1+141/2^-8)) +data8 0xe270cdc2391e0d23 , 0x00003ffd // log(1/frcpa(1+142/2^-8)) +data8 0xe3ffce3a2aa64922 , 0x00003ffd // log(1/frcpa(1+143/2^-8)) +data8 0xe52bdb274ed82887 , 0x00003ffd // log(1/frcpa(1+144/2^-8)) +data8 0xe6589852e75d7df6 , 0x00003ffd // log(1/frcpa(1+145/2^-8)) +// +data8 0xe786068c79937a7d , 0x00003ffd // log(1/frcpa(1+146/2^-8)) +data8 0xe91903adad100911 , 0x00003ffd // log(1/frcpa(1+147/2^-8)) +data8 0xea481236f7d35bb0 , 0x00003ffd // log(1/frcpa(1+148/2^-8)) +data8 0xeb77d48c692e6b14 , 0x00003ffd // log(1/frcpa(1+149/2^-8)) +data8 0xeca84b83d7297b87 , 0x00003ffd // log(1/frcpa(1+150/2^-8)) +// +data8 0xedd977f4962aa158 , 0x00003ffd // log(1/frcpa(1+151/2^-8)) +data8 0xef7179a22f257754 , 0x00003ffd // log(1/frcpa(1+152/2^-8)) +data8 0xf0a450d139366ca7 , 0x00003ffd // log(1/frcpa(1+153/2^-8)) +data8 0xf1d7e0524ff9ffdb , 0x00003ffd // log(1/frcpa(1+154/2^-8)) +data8 0xf30c29036a8b6cae , 0x00003ffd // log(1/frcpa(1+155/2^-8)) +// +data8 0xf4412bc411ea8d92 , 0x00003ffd // log(1/frcpa(1+156/2^-8)) +data8 0xf576e97564c8619d , 0x00003ffd // log(1/frcpa(1+157/2^-8)) +data8 0xf6ad62fa1b5f172f , 0x00003ffd // log(1/frcpa(1+158/2^-8)) +data8 0xf7e499368b55c542 , 0x00003ffd // log(1/frcpa(1+159/2^-8)) +data8 0xf91c8d10abaffe22 , 0x00003ffd // log(1/frcpa(1+160/2^-8)) +// +data8 0xfa553f7018c966f3 , 0x00003ffd // log(1/frcpa(1+161/2^-8)) +data8 0xfb8eb13e185d802c , 0x00003ffd // log(1/frcpa(1+162/2^-8)) +data8 0xfcc8e3659d9bcbed , 0x00003ffd // log(1/frcpa(1+163/2^-8)) +data8 0xfe03d6d34d487fd2 , 0x00003ffd // log(1/frcpa(1+164/2^-8)) +data8 0xff3f8c7581e9f0ae , 0x00003ffd // log(1/frcpa(1+165/2^-8)) +// +data8 0x803e029e280173ae , 0x00003ffe // log(1/frcpa(1+166/2^-8)) +data8 0x80dca10cc52d0757 , 0x00003ffe // log(1/frcpa(1+167/2^-8)) +data8 0x817ba200632755a1 , 0x00003ffe // log(1/frcpa(1+168/2^-8)) +data8 0x821b05f3b01d6774 , 0x00003ffe // log(1/frcpa(1+169/2^-8)) +data8 0x82bacd623ff19d06 , 0x00003ffe // log(1/frcpa(1+170/2^-8)) +// +data8 0x835af8c88e7a8f47 , 0x00003ffe // log(1/frcpa(1+171/2^-8)) +data8 0x83c5f8299e2b4091 , 0x00003ffe // log(1/frcpa(1+172/2^-8)) +data8 0x8466cb43f3d87300 , 0x00003ffe // log(1/frcpa(1+173/2^-8)) +data8 0x850803a67c80ca4b , 0x00003ffe // log(1/frcpa(1+174/2^-8)) +data8 0x85a9a1d11a23b461 , 0x00003ffe // log(1/frcpa(1+175/2^-8)) +// +data8 0x864ba644a18e6e05 , 0x00003ffe // log(1/frcpa(1+176/2^-8)) +data8 0x86ee1182dcc432f7 , 0x00003ffe // log(1/frcpa(1+177/2^-8)) +data8 0x875a925d7e48c316 , 0x00003ffe // log(1/frcpa(1+178/2^-8)) +data8 0x87fdaa109d23aef7 , 0x00003ffe // log(1/frcpa(1+179/2^-8)) +data8 0x88a129ed4becfaf2 , 0x00003ffe // log(1/frcpa(1+180/2^-8)) +// +data8 0x89451278ecd7f9cf , 0x00003ffe // log(1/frcpa(1+181/2^-8)) +data8 0x89b29295f8432617 , 0x00003ffe // log(1/frcpa(1+182/2^-8)) +data8 0x8a572ac5a5496882 , 0x00003ffe // log(1/frcpa(1+183/2^-8)) +data8 0x8afc2d0ce3b2dadf , 0x00003ffe // log(1/frcpa(1+184/2^-8)) +data8 0x8b6a69c608cfd3af , 0x00003ffe // log(1/frcpa(1+185/2^-8)) +// +data8 0x8c101e106e899a83 , 0x00003ffe // log(1/frcpa(1+186/2^-8)) +data8 0x8cb63de258f9d626 , 0x00003ffe // log(1/frcpa(1+187/2^-8)) +data8 0x8d2539c5bd19e2b1 , 0x00003ffe // log(1/frcpa(1+188/2^-8)) +data8 0x8dcc0e064b29e6f1 , 0x00003ffe // log(1/frcpa(1+189/2^-8)) +data8 0x8e734f45d88357ae , 0x00003ffe // log(1/frcpa(1+190/2^-8)) +// +data8 0x8ee30cef034a20db , 0x00003ffe // log(1/frcpa(1+191/2^-8)) +data8 0x8f8b0515686d1d06 , 0x00003ffe // log(1/frcpa(1+192/2^-8)) +data8 0x90336bba039bf32f , 0x00003ffe // log(1/frcpa(1+193/2^-8)) +data8 0x90a3edd23d1c9d58 , 0x00003ffe // log(1/frcpa(1+194/2^-8)) +data8 0x914d0de2f5d61b32 , 0x00003ffe // log(1/frcpa(1+195/2^-8)) +// +data8 0x91be0c20d28173b5 , 0x00003ffe // log(1/frcpa(1+196/2^-8)) +data8 0x9267e737c06cd34a , 0x00003ffe // log(1/frcpa(1+197/2^-8)) +data8 0x92d962ae6abb1237 , 0x00003ffe // log(1/frcpa(1+198/2^-8)) +data8 0x9383fa6afbe2074c , 0x00003ffe // log(1/frcpa(1+199/2^-8)) +data8 0x942f0421651c1c4e , 0x00003ffe // log(1/frcpa(1+200/2^-8)) +// +data8 0x94a14a3845bb985e , 0x00003ffe // log(1/frcpa(1+201/2^-8)) +data8 0x954d133857f861e7 , 0x00003ffe // log(1/frcpa(1+202/2^-8)) +data8 0x95bfd96468e604c4 , 0x00003ffe // log(1/frcpa(1+203/2^-8)) +data8 0x9632d31cafafa858 , 0x00003ffe // log(1/frcpa(1+204/2^-8)) +data8 0x96dfaabd86fa1647 , 0x00003ffe // log(1/frcpa(1+205/2^-8)) +// +data8 0x9753261fcbb2a594 , 0x00003ffe // log(1/frcpa(1+206/2^-8)) +data8 0x9800c11b426b996d , 0x00003ffe // log(1/frcpa(1+207/2^-8)) +data8 0x9874bf4d45ae663c , 0x00003ffe // log(1/frcpa(1+208/2^-8)) +data8 0x99231f5ee9a74f79 , 0x00003ffe // log(1/frcpa(1+209/2^-8)) +data8 0x9997a18a56bcad28 , 0x00003ffe // log(1/frcpa(1+210/2^-8)) +// +data8 0x9a46c873a3267e79 , 0x00003ffe // log(1/frcpa(1+211/2^-8)) +data8 0x9abbcfc621eb6cb6 , 0x00003ffe // log(1/frcpa(1+212/2^-8)) +data8 0x9b310cb0d354c990 , 0x00003ffe // log(1/frcpa(1+213/2^-8)) +data8 0x9be14cf9e1b3515c , 0x00003ffe // log(1/frcpa(1+214/2^-8)) +data8 0x9c5710b8cbb73a43 , 0x00003ffe // log(1/frcpa(1+215/2^-8)) +// +data8 0x9ccd0abd301f399c , 0x00003ffe // log(1/frcpa(1+216/2^-8)) +data8 0x9d7e67f3bdce8888 , 0x00003ffe // log(1/frcpa(1+217/2^-8)) +data8 0x9df4ea81a99daa01 , 0x00003ffe // log(1/frcpa(1+218/2^-8)) +data8 0x9e6ba405a54514ba , 0x00003ffe // log(1/frcpa(1+219/2^-8)) +data8 0x9f1e21c8c7bb62b3 , 0x00003ffe // log(1/frcpa(1+220/2^-8)) +// +data8 0x9f956593f6b6355c , 0x00003ffe // log(1/frcpa(1+221/2^-8)) +data8 0xa00ce1092e5498c3 , 0x00003ffe // log(1/frcpa(1+222/2^-8)) +data8 0xa0c08309c4b912c1 , 0x00003ffe // log(1/frcpa(1+223/2^-8)) +data8 0xa1388a8c6faa2afa , 0x00003ffe // log(1/frcpa(1+224/2^-8)) +data8 0xa1b0ca7095b5f985 , 0x00003ffe // log(1/frcpa(1+225/2^-8)) +// +data8 0xa22942eb47534a00 , 0x00003ffe // log(1/frcpa(1+226/2^-8)) +data8 0xa2de62326449d0a3 , 0x00003ffe // log(1/frcpa(1+227/2^-8)) +data8 0xa357690f88bfe345 , 0x00003ffe // log(1/frcpa(1+228/2^-8)) +data8 0xa3d0a93f45169a4b , 0x00003ffe // log(1/frcpa(1+229/2^-8)) +data8 0xa44a22f7ffe65f30 , 0x00003ffe // log(1/frcpa(1+230/2^-8)) +// +data8 0xa500c5e5b4c1aa36 , 0x00003ffe // log(1/frcpa(1+231/2^-8)) +data8 0xa57ad064eb2ebbc2 , 0x00003ffe // log(1/frcpa(1+232/2^-8)) +data8 0xa5f5152dedf4384e , 0x00003ffe // log(1/frcpa(1+233/2^-8)) +data8 0xa66f9478856233ec , 0x00003ffe // log(1/frcpa(1+234/2^-8)) +data8 0xa6ea4e7cca02c32e , 0x00003ffe // log(1/frcpa(1+235/2^-8)) +// +data8 0xa765437325341ccf , 0x00003ffe // log(1/frcpa(1+236/2^-8)) +data8 0xa81e21e6c75b4020 , 0x00003ffe // log(1/frcpa(1+237/2^-8)) +data8 0xa899ab333fe2b9ca , 0x00003ffe // log(1/frcpa(1+238/2^-8)) +data8 0xa9157039c51ebe71 , 0x00003ffe // log(1/frcpa(1+239/2^-8)) +data8 0xa991713433c2b999 , 0x00003ffe // log(1/frcpa(1+240/2^-8)) +// +data8 0xaa0dae5cbcc048b3 , 0x00003ffe // log(1/frcpa(1+241/2^-8)) +data8 0xaa8a27ede5eb13ad , 0x00003ffe // log(1/frcpa(1+242/2^-8)) +data8 0xab06de228a9e3499 , 0x00003ffe // log(1/frcpa(1+243/2^-8)) +data8 0xab83d135dc633301 , 0x00003ffe // log(1/frcpa(1+244/2^-8)) +data8 0xac3fb076adc7fe7a , 0x00003ffe // log(1/frcpa(1+245/2^-8)) +// +data8 0xacbd3cbbe47988f1 , 0x00003ffe // log(1/frcpa(1+246/2^-8)) +data8 0xad3b06b1a5dc57c3 , 0x00003ffe // log(1/frcpa(1+247/2^-8)) +data8 0xadb90e94af887717 , 0x00003ffe // log(1/frcpa(1+248/2^-8)) +data8 0xae3754a218f7c816 , 0x00003ffe // log(1/frcpa(1+249/2^-8)) +data8 0xaeb5d9175437afa2 , 0x00003ffe // log(1/frcpa(1+250/2^-8)) +// +data8 0xaf349c322e9c7cee , 0x00003ffe // log(1/frcpa(1+251/2^-8)) +data8 0xafb39e30d1768d1c , 0x00003ffe // log(1/frcpa(1+252/2^-8)) +data8 0xb032df51c2c93116 , 0x00003ffe // log(1/frcpa(1+253/2^-8)) +data8 0xb0b25fd3e6035ad9 , 0x00003ffe // log(1/frcpa(1+254/2^-8)) +data8 0xb1321ff67cba178c , 0x00003ffe // log(1/frcpa(1+255/2^-8)) +LOCAL_OBJECT_END(log_table_3) + + +.section .text +GLOBAL_LIBM_ENTRY(acosh) + +{ .mfi + getf.exp acosh_GR_f8 = f8 + fclass.m p6,p0 = f8, 0xc3 // Test for x = NaN + mov log_GR_comp2 = 0x1003e +} +{ .mfi + addl NR_table_address = @ltoff(log_table_1), gp + fms.s1 log_y = f8, f8, f1 // y = x^2-1 + nop.i 0 +} +;; + +{ .mfi + getf.sig acosh_GR_f8_sig = f8 + fclass.m p11,p0 = f8, 0x21 // Test for x=+inf + mov log_GR_exp_17_ones = 0x1ffff +} +{ .mfi + ld8 NR_table_address = [NR_table_address] + fms.s1 log_w = f8,f1,f1 // w = x - 1 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcmp.lt.s1 p7,p8 = f8, f1 // Test for x<1.0 + addl log_GR_comp = 0x10020C,r0 // Upper 21 bits of signif of 1.0005 +} +{ .mfb + mov log_GR_exp_16_ones = 0xffff //BIAS +(p6) fma.d.s0 f8 = f8,f1,f0 // quietize nan result if x=nan +(p6) br.ret.spnt b0 // Exit for x=nan +} +;; + +{ .mfb + //get second table address + adds log_table_address2 = 0x40, NR_table_address + fcmp.eq.s1 p10,p0 = f8, f1 // Test for x=+1.0 +(p11) br.ret.spnt b0 // Exit for x=+inf +} +;; + +{ .mfi + ldfpd NR1,NR2 = [log_table_address2],16 + frsqrta.s1 log_y_rs,p0 = log_y // z=1/sqrt(y) + nop.i 0 +} +{ .mfb + nop.m 0 + fma.s1 log_arg = f8,f1,f8 +(p7) br.cond.spnt ACOSH_LESS_ONE // Branch if path 7, x < 1.0 +} +;; + +{ .mfi + ldfe log_C4 = [log_table_address2],16 +(p8) fcmp.eq.s0 p6,p0 = f8, f0 // Dummy op sets denorm flag if unorm>=1.0 + nop.i 0 +} +{ .mfb +(p8) cmp.le.unc p13,p0 = log_GR_comp2,acosh_GR_f8 + nop.f 0 +(p13) br.cond.spnt LOG_COMMON1 // Branch if path 4, x >= 2^63 +} +;; + +{ .mfi + ldfe log_C3 = [log_table_address2],16 +(p10) fmerge.s f8 = f0, f0 // Return 0 if x=1.0 + shr.u acosh_GR_f8_sig = acosh_GR_f8_sig,43 +} +{ .mib + cmp.eq p14,p0 = log_GR_exp_16_ones,acosh_GR_f8 + nop.i 0 +(p10) br.ret.spnt b0 // Exit for x=1.0 +} +;; + +{ .mfi + ldfe log_C2 = [log_table_address2],16 + frsqrta.s1 acosh_w_rs,p0 = log_w // t=1/sqrt(w) + nop.i 0 +} +{ .mfb +(p14) cmp.lt.unc p15,p0 = acosh_GR_f8_sig,log_GR_comp + nop.f 0 +(p15) br.cond.spnt ACOSH_NEAR_ONE // Branch if path 2, 1.0 < x < 1.0005 +} +;; + +// Here is main path, 1.0005 <= x < 2^63 +/////////////// The first iteration ////////////////////////////////// +{ .mfi + ldfpd acosh_comp,log_P5 = [NR_table_address],16 + fma.s1 log_y_rs_iter = log_y_rs,log_y,f0 // y*z + nop.i 0 +} +;; + +{ .mfi + ldfpd log_P4,log_P3 = [NR_table_address],16 + fnma.s1 log_y_rs_iter = log_y_rs_iter,log_y_rs,NR2 // 3-(y*z)*z + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 log_y_rs_iter1 = log_y_rs,NR1,f0 // 0.5*z + nop.i 0 +} +;; + +{ .mfi + ldfpd log_P2,log_P1 = [NR_table_address],16 + //(0.5*z)*(3-(y*z)*z) + fma.s1 log_y_rs_iter = log_y_rs_iter1,log_y_rs_iter,f0 + nop.i 0 +} +;; + +/////////////////////////// The second iteration ///////////////////////////// +{ .mfi + nop.m 0 + fma.s1 log_y_rs = log_y_rs_iter,log_y,f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fnma.s1 log_y_rs = log_y_rs,log_y_rs_iter,NR2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 log_y_rs_iter1 = log_y_rs_iter,NR1,f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + //(0.5*z)*(3-(y*z)*z) + fma.s1 log_y_rs_iter = log_y_rs_iter1,log_y_rs,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + //(0.5*z)*(3-(y*z)*z) + fma.s1 log_arg_early = log_y_rs_iter1,log_y_rs,f0 + nop.i 0 +} +;; + +//////////////////////////////////////// The third iteration ///////////////// +{ .mfi + nop.m 0 + fma.s1 log_y_rs = log_y_rs_iter,log_y,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 log_y_rs_iter1 = log_y_rs_iter,NR1,f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_arg_early = log_arg_early,log_y,f8 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fnma.s1 log_y_rs = log_y_rs,log_y_rs_iter,NR2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 log_y_rs_iter1 = log_y_rs_iter1,log_y,f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + frcpa.s1 log_C,p0 = f1,log_arg_early + nop.i 0 +} +;; + +{ .mfi + getf.exp log_GR_signexp_f8 = log_arg_early + nop.f 0 + nop.i 0 +} +;; + +{ .mfi + getf.sig log_GR_significand_f8 = log_arg_early + fma.s1 log_arg = log_y_rs_iter1,log_y_rs,f8 // (0.5*z)*(3-(y*z)*z) + adds log_table_address3 = 0x70, NR_table_address +} +;; + +///////////////////////////////// The end NR iterations ///////////////////// +{ .mfi + ldfe log2 = [NR_table_address],16 + nop.f 0 + nop.i 0 +} +;; + +{ .mmi + //significant bit destruction + and log_GR_exp_f8 = log_GR_signexp_f8, log_GR_exp_17_ones +;; + //BIAS subtraction + sub log_GR_true_exp_f8 = log_GR_exp_f8, log_GR_exp_16_ones + nop.i 0 +} +;; + +{ .mfi + setf.sig log_int_Nfloat = log_GR_true_exp_f8 + fms.s1 log_r = log_C,log_arg,f1 // C = frcpa(x); r = C * x - 1 + extr.u log_GR_index = log_GR_significand_f8,55,8 //Extract 8 bits +} +;; + +{ .mmi + //pre-index*16 + index + shladd log_table_address3 = log_GR_index,4,log_table_address3 +;; + ldfe log_T = [log_table_address3] + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_rsq = log_r, log_r, f0 //r^2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 log_rp_p4 = log_P5, log_r, log_P4 //P5*r + P4 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_rp_p32 = log_P3, log_r, log_P2 //P3*r + P2 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + //convert N to the floating-point format log_Nfloat + fcvt.xf log_Nfloat = log_int_Nfloat + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_rcube = log_rsq, log_r, f0 //r^3 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 log_rp_p10 = log_rsq, log_P1, log_r //P1*r^2 + r + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + //(P5*r + P4)*r^2 + P3*r + P2 + fma.s1 log_rp_p2 = log_rp_p4, log_rsq, log_rp_p32 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_T_plus_Nlog2 = log_Nfloat,log2,log_T //N*log2 + T + nop.i 0 +} +{ .mfi + nop.m 0 + //((P5*r + P4)*r^2 + P3*r + P2)*r^3 + P1*r^2 + r + fma.s1 log_r2P_r = log_rp_p2, log_rcube, log_rp_p10 + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + // N*log2 + T + ((P5*r + P4)*r^2 + P3*r + P2)*w^3 + P1*r^2 + r + fadd.d.s0 f8 = log_T_plus_Nlog2, log_r2P_r + br.ret.sptk b0 // Exit main path, path 3: 1.0005 <= x < 2^63 +} +;; + +// Here if path 2, 1.0 < x < 1.0005 +ACOSH_NEAR_ONE: +// The first NR iteration +{ .mfi + ldfe log_C1 = [log_table_address2],16 + fma.s1 acosh_w_iter1 = acosh_w_rs,log_w,f0 //t*w + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 acosh_w_1 = f8,log_C4,log_C3 //x*C4 + C3 + nop.i 0 +} +;; + +{ .mfi + ldfe log_C0 = [log_table_address2],16 + fma.s1 acosh_w_iter2 = acosh_w_rs,NR1,f0 //t*0.5 + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 acosh_w_iter1 = acosh_w_iter1,acosh_w_rs,NR2 //3-t*t*w + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + //(3-t*t*w)*t*0.5 + fma.s1 acosh_w_iter2 = acosh_w_iter2,acosh_w_iter1,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 acosh_w_1 = acosh_w_1,log_w,log_C2 //(x*C4 + C3)*(x-1) + C2 + nop.i 0 +} +;; + +// The second NR iteration +{ .mfi + nop.m 0 + fma.s1 acosh_w_rs = acosh_w_iter2,log_w,f0 //t*w + nop.i 0 +} +{ .mfi + nop.m 0 + //((x*C4 + C3)*(x-1) + C2)*(x-1) + C1 + fma.s1 acosh_w_1 = acosh_w_1,log_w,log_C1 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fnma.s1 acosh_w_iter1 = acosh_w_iter2,acosh_w_rs,NR2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 acosh_w_iter2 = acosh_w_iter2,NR1,f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 acosh_w_iter2 = acosh_w_iter2,acosh_w_iter1,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + //(((x*C4 + C3)*(x-1) + C2)*(x-1) + C1)*(x-1) + C0 + fma.s1 acosh_w_1 = acosh_w_1,log_w,log_C0 + nop.i 0 +} +;; + +//The third NR iteration +{ .mfi + nop.m 0 + fma.s1 acosh_w_rs = acosh_w_iter2,log_w,f0 //t*w + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fnma.s1 acosh_w_iter1 = acosh_w_iter2,acosh_w_rs,NR2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 acosh_w_iter2 = acosh_w_iter2,NR1,f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 acosh_w_iter2 = acosh_w_iter2,acosh_w_iter1,f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 acosh_w_sqrt = acosh_w_iter2,log_w,f0 + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + fma.d.s0 f8 = acosh_w_1,acosh_w_sqrt,f0 + br.ret.sptk b0 // Exit path 2, 1.0 < x < 1.0005 +} +;; + +// Here if path 4, x >= 2^63 +LOG_COMMON1: +{ .mfi + ldfpd acosh_comp,log_P5 = [NR_table_address],16 + frcpa.s1 log_C,p0 = f1,log_arg + nop.i 0 +} +;; + +{ .mmi + getf.exp log_GR_signexp_f8 = log_arg + ldfpd log_P4,log_P3 = [NR_table_address],16 + nop.i 0 +} +;; + +{ .mmi + getf.sig log_GR_significand_f8 = log_arg + ldfpd log_P2,log_P1 = [NR_table_address],16 + nop.i 0 +} +;; + +{ .mfi + adds log_table_address3 = 0x70, NR_table_address + nop.f 0 + //significant bit destruction + and log_GR_exp_f8 = log_GR_signexp_f8, log_GR_exp_17_ones +} +;; + +{ .mmf + ldfe log2 = [NR_table_address],16 + //BIAS subtraction + sub log_GR_true_exp_f8 = log_GR_exp_f8, log_GR_exp_16_ones + fms.s1 log_r = log_C,log_arg,f1 // C = frcpa(x); r = C * x - 1 +} +;; + +{ .mfi + setf.sig log_int_Nfloat = log_GR_true_exp_f8 + nop.f 0 + extr.u log_GR_index = log_GR_significand_f8,55,8 //Extract 8 bits +} +;; + +{ .mmi + //pre-index*16 + index + shladd log_table_address3 = log_GR_index,4,log_table_address3 +;; + ldfe log_T = [log_table_address3] + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_rsq = log_r, log_r, f0 //r^2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 log_rp_p4 = log_P5, log_r, log_P4 //P5*r + P4 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_rp_p32 = log_P3, log_r, log_P2 //P3*r + P2 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_rcube = log_rsq, log_r, f0 //r^3 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 log_rp_p10 = log_rsq, log_P1, log_r //P1*r^2 + r + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + //convert N to the floating-point format log_Nfloat + fcvt.xf log_Nfloat = log_int_Nfloat + nop.i 0 +} +{ .mfi + nop.m 0 + //(P5*r + P4)*r^2 + P3*r + P2 + fma.s1 log_rp_p2 = log_rp_p4, log_rsq, log_rp_p32 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_T_plus_Nlog2 = log_Nfloat,log2,log_T //N*log2 + T + nop.i 0 +} +{ .mfi + nop.m 0 + //((P5*r + P4)*r^2 + P3*r + P2)*w^3 + P1*r^2 + r + fma.s1 log_r2P_r = log_rp_p2, log_rcube, log_rp_p10 + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + // N*log2 + T + ((P5*r + P4)*r^2 + P3*r + P2)*w^3 + P1*r^2 + r + fadd.d.s0 f8 = log_T_plus_Nlog2, log_r2P_r + br.ret.sptk b0 // Exit path 4, x >= 2^63 +} +;; + +// Here if path 7, x < 1.0 +ACOSH_LESS_ONE: +{ .mfi + alloc r32 = ar.pfs,1,3,4,0 + fmerge.s f10 = f8,f8 + nop.i 0 +} +;; + +{ .mfb + mov acosh_GR_tag = 136 + frcpa.s0 f8,p0 = f0,f0 + br.cond.sptk __libm_error_region +} +;; + +GLOBAL_LIBM_END(acosh) + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue + +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; + +{ .mmi + stfd [GR_Parameter_Y] = f1,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; + +.body +{ .mib + stfd [GR_Parameter_X] = f10 // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfd [GR_Parameter_Y] = f8 // STORE Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; + +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; + +{ .mmi + ldfd f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; + +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) + + +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/e_acoshf.S b/sysdeps/ia64/fpu/e_acoshf.S new file mode 100644 index 0000000000..58ef5f2adb --- /dev/null +++ b/sysdeps/ia64/fpu/e_acoshf.S @@ -0,0 +1,1030 @@ +.file "acoshf.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// ============================================================== +// History +// ============================================================== +// 03/28/01 Initial version +// 04/19/01 Improved speed of the paths #1,2,3,4,5 +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/06/03 Reordered header: .section, .global, .proc, .align +// 05/14/03 Improved performance, set denormal flag for unorms >= 1.0 +// +// API +// ============================================================== +// float acoshf(float) +// +// Overview of operation +// ============================================================== +// +// There are 7 paths: +// 1. x = 1.0 +// Return acoshf(x) = 0.0 +// 2. 1.0 < x < 1.000499725341796875(0x3FF0020C00000000) +// Return acoshf(x) = sqrt(x-1) * Pol4(x), +// where Pol4(x) = (x*C2 + C1)*(x-1) + C0 +// +// 3. 1.000499725341796875(0x3FF0020C00000000) <= x < 2^51 +// Return acoshf(x) = log(x + sqrt(x^2 -1.0)) +// To compute x + sqrt(x^2 -1.0) modified Newton Raphson method is used +// (2 iterations) +// Algorithm description for log function see below. +// +// 4. 2^51 <= x < +INF +// Return acoshf(x) = log(2*x) +// Algorithm description for log function see below. +// +// 5. x = +INF +// Return acoshf(x) = +INF +// +// 6. x = [S,Q]NaN +// Return acoshf(x) = QNaN +// +// 7. x < 1.0 +// It's domain error. Error handler with tag = 137 is called +// +//============================================================== +// Algorithm Description for log(x) function +// Below we are using the fact that inequality x - 1.0 > 2^(-6) is always +// true for this acosh implementation +// +// Consider x = 2^N 1.f1 f2 f3 f4...f63 +// Log(x) = log(frcpa(x) x/frcpa(x)) +// = log(1/frcpa(x)) + log(frcpa(x) x) +// = -log(frcpa(x)) + log(frcpa(x) x) +// +// frcpa(x) = 2^-N frcpa((1.f1 f2 ... f63) +// +// -log(frcpa(x)) = -log(C) +// = -log(2^-N) - log(frcpa(1.f1 f2 ... f63)) +// +// -log(frcpa(x)) = -log(C) +// = +Nlog2 - log(frcpa(1.f1 f2 ... f63)) +// +// -log(frcpa(x)) = -log(C) +// = +Nlog2 + log(frcpa(1.f1 f2 ... f63)) +// +// Log(x) = log(1/frcpa(x)) + log(frcpa(x) x) +// +// Log(x) = +Nlog2 + log(1./frcpa(1.f1 f2 ... f63)) + log(frcpa(x) x) +// Log(x) = +Nlog2 - log(/frcpa(1.f1 f2 ... f63)) + log(frcpa(x) x) +// Log(x) = +Nlog2 + T + log(frcpa(x) x) +// +// Log(x) = +Nlog2 + T + log(C x) +// +// Cx = 1 + r +// +// Log(x) = +Nlog2 + T + log(1+r) +// Log(x) = +Nlog2 + T + Series( r - r^2/2 + r^3/3 - r^4/4 ....) +// +// 1.f1 f2 ... f8 has 256 entries. +// They are 1 + k/2^8, k = 0 ... 255 +// These 256 values are the table entries. +// +// Implementation +//============================================================== +// C = frcpa(x) +// r = C * x - 1 +// +// Form rseries = r + P1*r^2 + P2*r^3 + P3*r^4 +// +// x = f * 2*n where f is 1.f_1f_2f_3....f_63 +// Nfloat = float(n) where n is the true unbiased exponent +// pre-index = f_1f_2....f_8 +// index = pre_index * 8 +// get the dxt table entry at index + offset = T +// +// result = (T + Nfloat * log(2)) + rseries +// +// The T table is calculated as follows +// Form x_k = 1 + k/2^8 where k goes from 0... 255 +// y_k = frcpa(x_k) +// log(1/y_k) in quad and round to double +// + +// Registers used +//============================================================== +// Floating Point registers used: +// f8, input +// f9 -> f15, f32 -> f62 +// +// General registers used: +// r14 -> r27, r32 -> r39 +// +// Predicate registers used: +// p6 -> p15 +// +// p6 to filter out case when x = [Q,S]NaN +// p7,p8 to filter out case when x < 1.0 +// +// p10 to select path #1 +// p11 to filter out case when x = +INF +// p12 used in the frcpa +// p13 to select path #4 +// p14,p15 to select path #2 + +// Assembly macros +//============================================================== +log_GR_exp_17_ones = r14 +log_GR_signexp_f8 = r15 +log_table_address2 = r16 +log_GR_exp_16_ones = r17 +log_GR_exp_f8 = r18 +log_GR_true_exp_f8 = r19 +log_GR_significand_f8 = r20 +log_GR_index = r21 +log_GR_comp2 = r22 +acosh_GR_f8 = r23 +log_GR_comp = r24 +acosh_GR_f8_sig = r25 +log_table_address3 = r26 +NR_table_address = r27 + +GR_SAVE_B0 = r33 +GR_SAVE_GP = r34 +GR_SAVE_PFS = r35 + +GR_Parameter_X = r36 +GR_Parameter_Y = r37 +GR_Parameter_RESULT = r38 +acosh_GR_tag = r39 + +//============================================================== +log_y = f9 +NR1 = f10 +NR2 = f11 +log_y_rs = f12 +log_y_rs_iter = f13 +log_y_rs_iter1 = f14 +log_NORM_f8 = f15 +log_w = f32 +acosh_comp = f34 +acosh_comp2 = f33 +log_P3 = f35 +log_P2 = f36 +log_P1 = f37 +log2 = f38 +log_C0 = f39 +log_C1 = f40 +log_C2 = f41 +acosh_w_rs = f42 +log_C = f43 +log_arg = f44 +acosh_w_iter1 = f45 +acosh_w_iter2 = f46 +log_int_Nfloat = f47 +log_r = f48 +log_rsq = f49 +log_rp_p4 = f50 +log_rp_p32 = f51 +log_rcube = f52 +log_rp_p10 = f53 +log_rp_p2 = f54 +log_Nfloat = f55 +log_T = f56 +log_r2P_r = f57 +log_T_plus_Nlog2 = f58 +acosh_w_sqrt = f59 +acosh_w_1 = f60 +log_arg_early = f61 +log_y_rs_iter2 = f62 + + +// Data tables +//============================================================== + +RODATA +.align 16 + +LOCAL_OBJECT_START(log_table_1) +data8 0xbfd0001008f39d59 // p3 +data8 0x3fd5556073e0c45a // p2 +data8 0xbfdffffffffaea15 // p1 +data8 0x3FE62E42FEFA39EF // log2 +LOCAL_OBJECT_END(log_table_1) + +LOCAL_OBJECT_START(log_table_2) + +data8 0x3FE0000000000000 // 0.5 +data8 0x4008000000000000 // 3.0 +data8 0xD92CBAD213719F11, 0x00003FF9 // C2 3FF9D92CBAD213719F11 +data8 0x93D38EBF2EC9B073, 0x0000BFFC // C1 BFFC93D38EBF2EC9B073 +data8 0xB504F333F9DA0E32, 0x00003FFF // C0 3FFFB504F333F9DA0E32 +LOCAL_OBJECT_END(log_table_2) + +LOCAL_OBJECT_START(log_table_3) +data8 0x3F60040155D5889E //log(1/frcpa(1+ 0/256) +data8 0x3F78121214586B54 //log(1/frcpa(1+ 1/256) +data8 0x3F841929F96832F0 //log(1/frcpa(1+ 2/256) +data8 0x3F8C317384C75F06 //log(1/frcpa(1+ 3/256) +data8 0x3F91A6B91AC73386 //log(1/frcpa(1+ 4/256) +data8 0x3F95BA9A5D9AC039 //log(1/frcpa(1+ 5/256) +data8 0x3F99D2A8074325F4 //log(1/frcpa(1+ 6/256) +data8 0x3F9D6B2725979802 //log(1/frcpa(1+ 7/256) +data8 0x3FA0C58FA19DFAAA //log(1/frcpa(1+ 8/256) +data8 0x3FA2954C78CBCE1B //log(1/frcpa(1+ 9/256) +data8 0x3FA4A94D2DA96C56 //log(1/frcpa(1+ 10/256) +data8 0x3FA67C94F2D4BB58 //log(1/frcpa(1+ 11/256) +data8 0x3FA85188B630F068 //log(1/frcpa(1+ 12/256) +data8 0x3FAA6B8ABE73AF4C //log(1/frcpa(1+ 13/256) +data8 0x3FAC441E06F72A9E //log(1/frcpa(1+ 14/256) +data8 0x3FAE1E6713606D07 //log(1/frcpa(1+ 15/256) +data8 0x3FAFFA6911AB9301 //log(1/frcpa(1+ 16/256) +data8 0x3FB0EC139C5DA601 //log(1/frcpa(1+ 17/256) +data8 0x3FB1DBD2643D190B //log(1/frcpa(1+ 18/256) +data8 0x3FB2CC7284FE5F1C //log(1/frcpa(1+ 19/256) +data8 0x3FB3BDF5A7D1EE64 //log(1/frcpa(1+ 20/256) +data8 0x3FB4B05D7AA012E0 //log(1/frcpa(1+ 21/256) +data8 0x3FB580DB7CEB5702 //log(1/frcpa(1+ 22/256) +data8 0x3FB674F089365A7A //log(1/frcpa(1+ 23/256) +data8 0x3FB769EF2C6B568D //log(1/frcpa(1+ 24/256) +data8 0x3FB85FD927506A48 //log(1/frcpa(1+ 25/256) +data8 0x3FB9335E5D594989 //log(1/frcpa(1+ 26/256) +data8 0x3FBA2B0220C8E5F5 //log(1/frcpa(1+ 27/256) +data8 0x3FBB0004AC1A86AC //log(1/frcpa(1+ 28/256) +data8 0x3FBBF968769FCA11 //log(1/frcpa(1+ 29/256) +data8 0x3FBCCFEDBFEE13A8 //log(1/frcpa(1+ 30/256) +data8 0x3FBDA727638446A2 //log(1/frcpa(1+ 31/256) +data8 0x3FBEA3257FE10F7A //log(1/frcpa(1+ 32/256) +data8 0x3FBF7BE9FEDBFDE6 //log(1/frcpa(1+ 33/256) +data8 0x3FC02AB352FF25F4 //log(1/frcpa(1+ 34/256) +data8 0x3FC097CE579D204D //log(1/frcpa(1+ 35/256) +data8 0x3FC1178E8227E47C //log(1/frcpa(1+ 36/256) +data8 0x3FC185747DBECF34 //log(1/frcpa(1+ 37/256) +data8 0x3FC1F3B925F25D41 //log(1/frcpa(1+ 38/256) +data8 0x3FC2625D1E6DDF57 //log(1/frcpa(1+ 39/256) +data8 0x3FC2D1610C86813A //log(1/frcpa(1+ 40/256) +data8 0x3FC340C59741142E //log(1/frcpa(1+ 41/256) +data8 0x3FC3B08B6757F2A9 //log(1/frcpa(1+ 42/256) +data8 0x3FC40DFB08378003 //log(1/frcpa(1+ 43/256) +data8 0x3FC47E74E8CA5F7C //log(1/frcpa(1+ 44/256) +data8 0x3FC4EF51F6466DE4 //log(1/frcpa(1+ 45/256) +data8 0x3FC56092E02BA516 //log(1/frcpa(1+ 46/256) +data8 0x3FC5D23857CD74D5 //log(1/frcpa(1+ 47/256) +data8 0x3FC6313A37335D76 //log(1/frcpa(1+ 48/256) +data8 0x3FC6A399DABBD383 //log(1/frcpa(1+ 49/256) +data8 0x3FC70337DD3CE41B //log(1/frcpa(1+ 50/256) +data8 0x3FC77654128F6127 //log(1/frcpa(1+ 51/256) +data8 0x3FC7E9D82A0B022D //log(1/frcpa(1+ 52/256) +data8 0x3FC84A6B759F512F //log(1/frcpa(1+ 53/256) +data8 0x3FC8AB47D5F5A310 //log(1/frcpa(1+ 54/256) +data8 0x3FC91FE49096581B //log(1/frcpa(1+ 55/256) +data8 0x3FC981634011AA75 //log(1/frcpa(1+ 56/256) +data8 0x3FC9F6C407089664 //log(1/frcpa(1+ 57/256) +data8 0x3FCA58E729348F43 //log(1/frcpa(1+ 58/256) +data8 0x3FCABB55C31693AD //log(1/frcpa(1+ 59/256) +data8 0x3FCB1E104919EFD0 //log(1/frcpa(1+ 60/256) +data8 0x3FCB94EE93E367CB //log(1/frcpa(1+ 61/256) +data8 0x3FCBF851C067555F //log(1/frcpa(1+ 62/256) +data8 0x3FCC5C0254BF23A6 //log(1/frcpa(1+ 63/256) +data8 0x3FCCC000C9DB3C52 //log(1/frcpa(1+ 64/256) +data8 0x3FCD244D99C85674 //log(1/frcpa(1+ 65/256) +data8 0x3FCD88E93FB2F450 //log(1/frcpa(1+ 66/256) +data8 0x3FCDEDD437EAEF01 //log(1/frcpa(1+ 67/256) +data8 0x3FCE530EFFE71012 //log(1/frcpa(1+ 68/256) +data8 0x3FCEB89A1648B971 //log(1/frcpa(1+ 69/256) +data8 0x3FCF1E75FADF9BDE //log(1/frcpa(1+ 70/256) +data8 0x3FCF84A32EAD7C35 //log(1/frcpa(1+ 71/256) +data8 0x3FCFEB2233EA07CD //log(1/frcpa(1+ 72/256) +data8 0x3FD028F9C7035C1C //log(1/frcpa(1+ 73/256) +data8 0x3FD05C8BE0D9635A //log(1/frcpa(1+ 74/256) +data8 0x3FD085EB8F8AE797 //log(1/frcpa(1+ 75/256) +data8 0x3FD0B9C8E32D1911 //log(1/frcpa(1+ 76/256) +data8 0x3FD0EDD060B78081 //log(1/frcpa(1+ 77/256) +data8 0x3FD122024CF0063F //log(1/frcpa(1+ 78/256) +data8 0x3FD14BE2927AECD4 //log(1/frcpa(1+ 79/256) +data8 0x3FD180618EF18ADF //log(1/frcpa(1+ 80/256) +data8 0x3FD1B50BBE2FC63B //log(1/frcpa(1+ 81/256) +data8 0x3FD1DF4CC7CF242D //log(1/frcpa(1+ 82/256) +data8 0x3FD214456D0EB8D4 //log(1/frcpa(1+ 83/256) +data8 0x3FD23EC5991EBA49 //log(1/frcpa(1+ 84/256) +data8 0x3FD2740D9F870AFB //log(1/frcpa(1+ 85/256) +data8 0x3FD29ECDABCDFA04 //log(1/frcpa(1+ 86/256) +data8 0x3FD2D46602ADCCEE //log(1/frcpa(1+ 87/256) +data8 0x3FD2FF66B04EA9D4 //log(1/frcpa(1+ 88/256) +data8 0x3FD335504B355A37 //log(1/frcpa(1+ 89/256) +data8 0x3FD360925EC44F5D //log(1/frcpa(1+ 90/256) +data8 0x3FD38BF1C3337E75 //log(1/frcpa(1+ 91/256) +data8 0x3FD3C25277333184 //log(1/frcpa(1+ 92/256) +data8 0x3FD3EDF463C1683E //log(1/frcpa(1+ 93/256) +data8 0x3FD419B423D5E8C7 //log(1/frcpa(1+ 94/256) +data8 0x3FD44591E0539F49 //log(1/frcpa(1+ 95/256) +data8 0x3FD47C9175B6F0AD //log(1/frcpa(1+ 96/256) +data8 0x3FD4A8B341552B09 //log(1/frcpa(1+ 97/256) +data8 0x3FD4D4F3908901A0 //log(1/frcpa(1+ 98/256) +data8 0x3FD501528DA1F968 //log(1/frcpa(1+ 99/256) +data8 0x3FD52DD06347D4F6 //log(1/frcpa(1+ 100/256) +data8 0x3FD55A6D3C7B8A8A //log(1/frcpa(1+ 101/256) +data8 0x3FD5925D2B112A59 //log(1/frcpa(1+ 102/256) +data8 0x3FD5BF406B543DB2 //log(1/frcpa(1+ 103/256) +data8 0x3FD5EC433D5C35AE //log(1/frcpa(1+ 104/256) +data8 0x3FD61965CDB02C1F //log(1/frcpa(1+ 105/256) +data8 0x3FD646A84935B2A2 //log(1/frcpa(1+ 106/256) +data8 0x3FD6740ADD31DE94 //log(1/frcpa(1+ 107/256) +data8 0x3FD6A18DB74A58C5 //log(1/frcpa(1+ 108/256) +data8 0x3FD6CF31058670EC //log(1/frcpa(1+ 109/256) +data8 0x3FD6F180E852F0BA //log(1/frcpa(1+ 110/256) +data8 0x3FD71F5D71B894F0 //log(1/frcpa(1+ 111/256) +data8 0x3FD74D5AEFD66D5C //log(1/frcpa(1+ 112/256) +data8 0x3FD77B79922BD37E //log(1/frcpa(1+ 113/256) +data8 0x3FD7A9B9889F19E2 //log(1/frcpa(1+ 114/256) +data8 0x3FD7D81B037EB6A6 //log(1/frcpa(1+ 115/256) +data8 0x3FD8069E33827231 //log(1/frcpa(1+ 116/256) +data8 0x3FD82996D3EF8BCB //log(1/frcpa(1+ 117/256) +data8 0x3FD85855776DCBFB //log(1/frcpa(1+ 118/256) +data8 0x3FD8873658327CCF //log(1/frcpa(1+ 119/256) +data8 0x3FD8AA75973AB8CF //log(1/frcpa(1+ 120/256) +data8 0x3FD8D992DC8824E5 //log(1/frcpa(1+ 121/256) +data8 0x3FD908D2EA7D9512 //log(1/frcpa(1+ 122/256) +data8 0x3FD92C59E79C0E56 //log(1/frcpa(1+ 123/256) +data8 0x3FD95BD750EE3ED3 //log(1/frcpa(1+ 124/256) +data8 0x3FD98B7811A3EE5B //log(1/frcpa(1+ 125/256) +data8 0x3FD9AF47F33D406C //log(1/frcpa(1+ 126/256) +data8 0x3FD9DF270C1914A8 //log(1/frcpa(1+ 127/256) +data8 0x3FDA0325ED14FDA4 //log(1/frcpa(1+ 128/256) +data8 0x3FDA33440224FA79 //log(1/frcpa(1+ 129/256) +data8 0x3FDA57725E80C383 //log(1/frcpa(1+ 130/256) +data8 0x3FDA87D0165DD199 //log(1/frcpa(1+ 131/256) +data8 0x3FDAAC2E6C03F896 //log(1/frcpa(1+ 132/256) +data8 0x3FDADCCC6FDF6A81 //log(1/frcpa(1+ 133/256) +data8 0x3FDB015B3EB1E790 //log(1/frcpa(1+ 134/256) +data8 0x3FDB323A3A635948 //log(1/frcpa(1+ 135/256) +data8 0x3FDB56FA04462909 //log(1/frcpa(1+ 136/256) +data8 0x3FDB881AA659BC93 //log(1/frcpa(1+ 137/256) +data8 0x3FDBAD0BEF3DB165 //log(1/frcpa(1+ 138/256) +data8 0x3FDBD21297781C2F //log(1/frcpa(1+ 139/256) +data8 0x3FDC039236F08819 //log(1/frcpa(1+ 140/256) +data8 0x3FDC28CB1E4D32FD //log(1/frcpa(1+ 141/256) +data8 0x3FDC4E19B84723C2 //log(1/frcpa(1+ 142/256) +data8 0x3FDC7FF9C74554C9 //log(1/frcpa(1+ 143/256) +data8 0x3FDCA57B64E9DB05 //log(1/frcpa(1+ 144/256) +data8 0x3FDCCB130A5CEBB0 //log(1/frcpa(1+ 145/256) +data8 0x3FDCF0C0D18F326F //log(1/frcpa(1+ 146/256) +data8 0x3FDD232075B5A201 //log(1/frcpa(1+ 147/256) +data8 0x3FDD490246DEFA6B //log(1/frcpa(1+ 148/256) +data8 0x3FDD6EFA918D25CD //log(1/frcpa(1+ 149/256) +data8 0x3FDD9509707AE52F //log(1/frcpa(1+ 150/256) +data8 0x3FDDBB2EFE92C554 //log(1/frcpa(1+ 151/256) +data8 0x3FDDEE2F3445E4AF //log(1/frcpa(1+ 152/256) +data8 0x3FDE148A1A2726CE //log(1/frcpa(1+ 153/256) +data8 0x3FDE3AFC0A49FF40 //log(1/frcpa(1+ 154/256) +data8 0x3FDE6185206D516E //log(1/frcpa(1+ 155/256) +data8 0x3FDE882578823D52 //log(1/frcpa(1+ 156/256) +data8 0x3FDEAEDD2EAC990C //log(1/frcpa(1+ 157/256) +data8 0x3FDED5AC5F436BE3 //log(1/frcpa(1+ 158/256) +data8 0x3FDEFC9326D16AB9 //log(1/frcpa(1+ 159/256) +data8 0x3FDF2391A2157600 //log(1/frcpa(1+ 160/256) +data8 0x3FDF4AA7EE03192D //log(1/frcpa(1+ 161/256) +data8 0x3FDF71D627C30BB0 //log(1/frcpa(1+ 162/256) +data8 0x3FDF991C6CB3B379 //log(1/frcpa(1+ 163/256) +data8 0x3FDFC07ADA69A910 //log(1/frcpa(1+ 164/256) +data8 0x3FDFE7F18EB03D3E //log(1/frcpa(1+ 165/256) +data8 0x3FE007C053C5002E //log(1/frcpa(1+ 166/256) +data8 0x3FE01B942198A5A1 //log(1/frcpa(1+ 167/256) +data8 0x3FE02F74400C64EB //log(1/frcpa(1+ 168/256) +data8 0x3FE04360BE7603AD //log(1/frcpa(1+ 169/256) +data8 0x3FE05759AC47FE34 //log(1/frcpa(1+ 170/256) +data8 0x3FE06B5F1911CF52 //log(1/frcpa(1+ 171/256) +data8 0x3FE078BF0533C568 //log(1/frcpa(1+ 172/256) +data8 0x3FE08CD9687E7B0E //log(1/frcpa(1+ 173/256) +data8 0x3FE0A10074CF9019 //log(1/frcpa(1+ 174/256) +data8 0x3FE0B5343A234477 //log(1/frcpa(1+ 175/256) +data8 0x3FE0C974C89431CE //log(1/frcpa(1+ 176/256) +data8 0x3FE0DDC2305B9886 //log(1/frcpa(1+ 177/256) +data8 0x3FE0EB524BAFC918 //log(1/frcpa(1+ 178/256) +data8 0x3FE0FFB54213A476 //log(1/frcpa(1+ 179/256) +data8 0x3FE114253DA97D9F //log(1/frcpa(1+ 180/256) +data8 0x3FE128A24F1D9AFF //log(1/frcpa(1+ 181/256) +data8 0x3FE1365252BF0865 //log(1/frcpa(1+ 182/256) +data8 0x3FE14AE558B4A92D //log(1/frcpa(1+ 183/256) +data8 0x3FE15F85A19C765B //log(1/frcpa(1+ 184/256) +data8 0x3FE16D4D38C119FA //log(1/frcpa(1+ 185/256) +data8 0x3FE18203C20DD133 //log(1/frcpa(1+ 186/256) +data8 0x3FE196C7BC4B1F3B //log(1/frcpa(1+ 187/256) +data8 0x3FE1A4A738B7A33C //log(1/frcpa(1+ 188/256) +data8 0x3FE1B981C0C9653D //log(1/frcpa(1+ 189/256) +data8 0x3FE1CE69E8BB106B //log(1/frcpa(1+ 190/256) +data8 0x3FE1DC619DE06944 //log(1/frcpa(1+ 191/256) +data8 0x3FE1F160A2AD0DA4 //log(1/frcpa(1+ 192/256) +data8 0x3FE2066D7740737E //log(1/frcpa(1+ 193/256) +data8 0x3FE2147DBA47A394 //log(1/frcpa(1+ 194/256) +data8 0x3FE229A1BC5EBAC3 //log(1/frcpa(1+ 195/256) +data8 0x3FE237C1841A502E //log(1/frcpa(1+ 196/256) +data8 0x3FE24CFCE6F80D9A //log(1/frcpa(1+ 197/256) +data8 0x3FE25B2C55CD5762 //log(1/frcpa(1+ 198/256) +data8 0x3FE2707F4D5F7C41 //log(1/frcpa(1+ 199/256) +data8 0x3FE285E0842CA384 //log(1/frcpa(1+ 200/256) +data8 0x3FE294294708B773 //log(1/frcpa(1+ 201/256) +data8 0x3FE2A9A2670AFF0C //log(1/frcpa(1+ 202/256) +data8 0x3FE2B7FB2C8D1CC1 //log(1/frcpa(1+ 203/256) +data8 0x3FE2C65A6395F5F5 //log(1/frcpa(1+ 204/256) +data8 0x3FE2DBF557B0DF43 //log(1/frcpa(1+ 205/256) +data8 0x3FE2EA64C3F97655 //log(1/frcpa(1+ 206/256) +data8 0x3FE3001823684D73 //log(1/frcpa(1+ 207/256) +data8 0x3FE30E97E9A8B5CD //log(1/frcpa(1+ 208/256) +data8 0x3FE32463EBDD34EA //log(1/frcpa(1+ 209/256) +data8 0x3FE332F4314AD796 //log(1/frcpa(1+ 210/256) +data8 0x3FE348D90E7464D0 //log(1/frcpa(1+ 211/256) +data8 0x3FE35779F8C43D6E //log(1/frcpa(1+ 212/256) +data8 0x3FE36621961A6A99 //log(1/frcpa(1+ 213/256) +data8 0x3FE37C299F3C366A //log(1/frcpa(1+ 214/256) +data8 0x3FE38AE2171976E7 //log(1/frcpa(1+ 215/256) +data8 0x3FE399A157A603E7 //log(1/frcpa(1+ 216/256) +data8 0x3FE3AFCCFE77B9D1 //log(1/frcpa(1+ 217/256) +data8 0x3FE3BE9D503533B5 //log(1/frcpa(1+ 218/256) +data8 0x3FE3CD7480B4A8A3 //log(1/frcpa(1+ 219/256) +data8 0x3FE3E3C43918F76C //log(1/frcpa(1+ 220/256) +data8 0x3FE3F2ACB27ED6C7 //log(1/frcpa(1+ 221/256) +data8 0x3FE4019C2125CA93 //log(1/frcpa(1+ 222/256) +data8 0x3FE4181061389722 //log(1/frcpa(1+ 223/256) +data8 0x3FE42711518DF545 //log(1/frcpa(1+ 224/256) +data8 0x3FE436194E12B6BF //log(1/frcpa(1+ 225/256) +data8 0x3FE445285D68EA69 //log(1/frcpa(1+ 226/256) +data8 0x3FE45BCC464C893A //log(1/frcpa(1+ 227/256) +data8 0x3FE46AED21F117FC //log(1/frcpa(1+ 228/256) +data8 0x3FE47A1527E8A2D3 //log(1/frcpa(1+ 229/256) +data8 0x3FE489445EFFFCCC //log(1/frcpa(1+ 230/256) +data8 0x3FE4A018BCB69835 //log(1/frcpa(1+ 231/256) +data8 0x3FE4AF5A0C9D65D7 //log(1/frcpa(1+ 232/256) +data8 0x3FE4BEA2A5BDBE87 //log(1/frcpa(1+ 233/256) +data8 0x3FE4CDF28F10AC46 //log(1/frcpa(1+ 234/256) +data8 0x3FE4DD49CF994058 //log(1/frcpa(1+ 235/256) +data8 0x3FE4ECA86E64A684 //log(1/frcpa(1+ 236/256) +data8 0x3FE503C43CD8EB68 //log(1/frcpa(1+ 237/256) +data8 0x3FE513356667FC57 //log(1/frcpa(1+ 238/256) +data8 0x3FE522AE0738A3D8 //log(1/frcpa(1+ 239/256) +data8 0x3FE5322E26867857 //log(1/frcpa(1+ 240/256) +data8 0x3FE541B5CB979809 //log(1/frcpa(1+ 241/256) +data8 0x3FE55144FDBCBD62 //log(1/frcpa(1+ 242/256) +data8 0x3FE560DBC45153C7 //log(1/frcpa(1+ 243/256) +data8 0x3FE5707A26BB8C66 //log(1/frcpa(1+ 244/256) +data8 0x3FE587F60ED5B900 //log(1/frcpa(1+ 245/256) +data8 0x3FE597A7977C8F31 //log(1/frcpa(1+ 246/256) +data8 0x3FE5A760D634BB8B //log(1/frcpa(1+ 247/256) +data8 0x3FE5B721D295F10F //log(1/frcpa(1+ 248/256) +data8 0x3FE5C6EA94431EF9 //log(1/frcpa(1+ 249/256) +data8 0x3FE5D6BB22EA86F6 //log(1/frcpa(1+ 250/256) +data8 0x3FE5E6938645D390 //log(1/frcpa(1+ 251/256) +data8 0x3FE5F673C61A2ED2 //log(1/frcpa(1+ 252/256) +data8 0x3FE6065BEA385926 //log(1/frcpa(1+ 253/256) +data8 0x3FE6164BFA7CC06B //log(1/frcpa(1+ 254/256) +data8 0x3FE62643FECF9743 //log(1/frcpa(1+ 255/256) +LOCAL_OBJECT_END(log_table_3) + + +.section .text +GLOBAL_LIBM_ENTRY(acoshf) + +{ .mfi + getf.exp acosh_GR_f8 = f8 + fclass.m p6,p0 = f8, 0xc3 // Test for x = NaN + mov log_GR_comp2 = 0x10032 +} +{ .mfi + addl NR_table_address = @ltoff(log_table_1), gp + fms.s1 log_y = f8, f8, f1 // y = x^2-1 + nop.i 0 +} +;; + +{ .mfi + getf.sig acosh_GR_f8_sig = f8 + fclass.m p11,p0 = f8, 0x21 // Test for x=+inf + mov log_GR_exp_17_ones = 0x1ffff +} +{ .mfi + ld8 NR_table_address = [NR_table_address] + fms.s1 log_w = f8,f1,f1 // w = x - 1 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcmp.lt.s1 p7,p8 = f8, f1 // Test for x<1.0 + addl log_GR_comp = 0x10020C,r0 // Upper 21 bits of signif of 1.0005 +} +{ .mfb + mov log_GR_exp_16_ones = 0xffff //BIAS +(p6) fma.s.s0 f8 = f8,f1,f0 // quietize nan result if x=nan +(p6) br.ret.spnt b0 // Exit for x=nan +} +;; + +{ .mfb + //get second table address + adds log_table_address2 = 0x20, NR_table_address + fcmp.eq.s1 p10,p0 = f8, f1 // Test for x=+1.0 +(p11) br.ret.spnt b0 // Exit for x=+inf +} +;; + +{ .mfi + ldfpd NR1,NR2 = [log_table_address2],16 + frsqrta.s1 log_y_rs,p0 = log_y // z=1/sqrt(y) + nop.i 0 +} +{ .mfb + nop.m 0 + fma.s1 log_arg = f8,f1,f8 +(p7) br.cond.spnt ACOSH_LESS_ONE // Branch if path 7, x < 1.0 +} +;; + +{ .mfi + ldfe log_C2 = [log_table_address2],16 +(p8) fcmp.eq.s0 p6,p0 = f8, f0 // Dummy op sets denorm flag if unorm>=1.0 + nop.i 0 +} +{ .mfb +(p8) cmp.le.unc p13,p0 = log_GR_comp2,acosh_GR_f8 + nop.f 0 +(p13) br.cond.spnt LOG_COMMON1 // Branch if path 4, x >= 2^51 +} +;; + +{ .mfi + ldfe log_C1 = [log_table_address2],16 +(p10) fmerge.s f8 = f0, f0 // Return 0 if x=1.0 + shr.u acosh_GR_f8_sig = acosh_GR_f8_sig,43 +} +{ .mib + cmp.eq p14,p0 = log_GR_exp_16_ones,acosh_GR_f8 + nop.i 0 +(p10) br.ret.spnt b0 // Exit for x=1.0 +} +;; + +{ .mfi + ldfe log_C0 = [log_table_address2],16 + frsqrta.s1 acosh_w_rs,p0 = log_w // t=1/sqrt(w) + nop.i 0 +} +{ .mfb +(p14) cmp.lt.unc p15,p0 = acosh_GR_f8_sig,log_GR_comp + nop.f 0 +(p15) br.cond.spnt ACOSH_NEAR_ONE // Branch if path 2, 1.0 < x < 1.0005 +} +;; + +// Here is main path, 1.0005 <= x < 2^51 +/////////////// The first iteration ////////////////////////////////// +{ .mfi + ldfpd log_P3,log_P2 = [NR_table_address],16 + fma.s1 log_y_rs_iter = log_y_rs,log_y,f0 // y*z + nop.i 0 +} +;; + +{ .mfi + ldfpd log_P1,log2 = [NR_table_address],16 + fnma.s1 log_y_rs_iter2 = log_y_rs_iter,log_y_rs,NR2 // 3-(y*z)*z + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 log_y_rs_iter1 = log_y_rs,NR1,f0 // 0.5*z + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + // (0.5*z)*(3-(y*z)*z) + fma.s1 log_y_rs_iter = log_y_rs_iter1,log_y_rs_iter2,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + // (0.5*z)*(3-(y*z)*z) + fma.s1 log_arg_early = log_y_rs_iter1,log_y_rs_iter2,f0 + nop.i 0 +} +;; + +/////////////////////////// The second iteration ///////////////////////////// +{ .mfi + nop.m 0 + fma.s1 log_y_rs = log_y_rs_iter,log_y,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 log_y_rs_iter1 = log_y_rs_iter,NR1,f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_arg_early = log_arg_early,log_y,f8 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fnma.s1 log_y_rs = log_y_rs,log_y_rs_iter,NR2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 log_y_rs_iter1 = log_y_rs_iter1,log_y,f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + frcpa.s1 log_C,p0 = f1,log_arg_early + nop.i 0 +} +;; + +{ .mfi + getf.exp log_GR_signexp_f8 = log_arg_early + nop.f 0 + nop.i 0 +} +;; + +{ .mfi + getf.sig log_GR_significand_f8 = log_arg_early + fma.s1 log_arg = log_y_rs_iter1,log_y_rs,f8 // (0.5*z)*(3-(y*z)*z) + adds log_table_address3 = 0x40, NR_table_address +} +;; + +///////////////////////////////// The end NR iterations ///////////////////// + +{ .mmi + //significant bit destruction + and log_GR_exp_f8 = log_GR_signexp_f8, log_GR_exp_17_ones +;; + //BIAS subtraction + sub log_GR_true_exp_f8 = log_GR_exp_f8, log_GR_exp_16_ones + nop.i 0 +} +;; + +{ .mfi + setf.sig log_int_Nfloat = log_GR_true_exp_f8 + fms.s1 log_r = log_C,log_arg,f1 // C = frcpa(x); r = C * x - 1 + extr.u log_GR_index = log_GR_significand_f8,55,8 //Extract 8 bits +} +;; + +{ .mmi + //pre-index*8 + index + shladd log_table_address3 = log_GR_index,3,log_table_address3 +;; + ldfd log_T = [log_table_address3] + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_rsq = log_r, log_r, f0 //r^2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 log_rp_p32 = log_P3, log_r, log_P2 //P3*r + P2 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_rp_p10 = log_P1, log_r, f1 //P1*r + 1.0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + //convert N to the floating-point format log_Nfloat + fcvt.xf log_Nfloat = log_int_Nfloat + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + //(P3*r + P2)*r^2 + P1*r + 1.0 + fma.s1 log_rp_p2 = log_rp_p32, log_rsq, log_rp_p10 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_T_plus_Nlog2 = log_Nfloat,log2,log_T //N*log2 + T + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + fma.s.s0 f8 = log_rp_p2,log_r,log_T_plus_Nlog2 + br.ret.sptk b0 // Exit main path, path 3: 1.0005 <= x < 2^51 +} +;; + +// Here if path 2, 1.0 < x < 1.0005 +ACOSH_NEAR_ONE: +// The first NR iteration +{ .mfi + nop.m 0 + fma.s1 acosh_w_iter1 = acosh_w_rs,log_w,f0 //t*w + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 acosh_w_1 = f8,log_C2,log_C1 //x*C2 + C1 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 acosh_w_iter2 = acosh_w_rs,NR1,f0 //t*0.5 + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 acosh_w_iter1 = acosh_w_iter1,acosh_w_rs,NR2 //3-t*t*w + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + //(3-t*t*w)*t*0.5 + fma.s1 acosh_w_iter2 = acosh_w_iter2,acosh_w_iter1,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 acosh_w_1 = acosh_w_1,log_w,log_C0 //(x*C2 + C1)*(x-1) + C0 + nop.i 0 +} +;; + +// The second NR iteration +{ .mfi + nop.m 0 + fma.s1 acosh_w_rs = acosh_w_iter2,log_w,f0 //t*w + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fnma.s1 acosh_w_iter1 = acosh_w_iter2,acosh_w_rs,NR2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 acosh_w_iter2 = acosh_w_iter2,NR1,f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 acosh_w_iter2 = acosh_w_iter2,acosh_w_iter1,f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 acosh_w_sqrt = acosh_w_iter2,log_w,f0 + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + fma.s.s0 f8 = acosh_w_1,acosh_w_sqrt,f0 + br.ret.sptk b0 // Exit path 2, 1.0 < x < 1.0005 +} +;; + +// Here if path 4, x >= 2^51 +LOG_COMMON1: +{ .mfi + ldfpd log_P3,log_P2 = [NR_table_address],16 + frcpa.s1 log_C,p0 = f1,log_arg + nop.i 0 +} +;; + +{ .mmi + getf.exp log_GR_signexp_f8 = log_arg + ldfpd log_P1,log2 = [NR_table_address],16 + nop.i 0 +} +;; + +{ .mmi + getf.sig log_GR_significand_f8 = log_arg + nop.m 0 + nop.i 0 +} +;; + +{ .mfi + adds log_table_address3 = 0x40, NR_table_address + nop.f 0 + //significant bit destruction + and log_GR_exp_f8 = log_GR_signexp_f8, log_GR_exp_17_ones +} +;; + +{ .mmf + nop.m 0 + //BIAS subtraction + sub log_GR_true_exp_f8 = log_GR_exp_f8, log_GR_exp_16_ones + fms.s1 log_r = log_C,log_arg,f1 // C = frcpa(x); r = C * x - 1 +} +;; + +{ .mfi + setf.sig log_int_Nfloat = log_GR_true_exp_f8 + nop.f 0 + extr.u log_GR_index = log_GR_significand_f8,55,8 //Extract 8 bits +} +;; + +{ .mmi + //pre-index*8 + index + shladd log_table_address3 = log_GR_index,3,log_table_address3 +;; + ldfd log_T = [log_table_address3] + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_rsq = log_r, log_r, f0 //r^2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 log_rp_p32 = log_P3, log_r, log_P2 //P3*r + P2 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_rp_p10 = log_P1, log_r, f1 //P1*r + 1.0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + //convert N to the floating-point format log_Nfloat + fcvt.xf log_Nfloat = log_int_Nfloat + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 log_rp_p2 = log_rp_p32, log_rsq, log_rp_p10 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_T_plus_Nlog2 = log_Nfloat,log2,log_T //N*log2 + T + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + fma.s.s0 f8 = log_rp_p2,log_r,log_T_plus_Nlog2 + br.ret.sptk b0 // Exit path 4, x >= 2^51 +} +;; + +// Here if path 7, x < 1.0 +ACOSH_LESS_ONE: +{ .mfi + alloc r32 = ar.pfs,1,3,4,0 + fmerge.s f10 = f8,f8 + nop.i 0 +} +;; + +{ .mfb + mov acosh_GR_tag = 137 + frcpa.s0 f8,p0 = f0,f0 + br.cond.sptk __libm_error_region +} +;; + +GLOBAL_LIBM_END(acoshf) + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue + +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; + +{ .mmi + stfs [GR_Parameter_Y] = f1,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; + +.body +{ .mib + stfs [GR_Parameter_X] = f10 // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfs [GR_Parameter_Y] = f8 // STORE Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; + +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; + +{ .mmi + ldfs f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; + +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) + + +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/e_acoshl.S b/sysdeps/ia64/fpu/e_acoshl.S new file mode 100644 index 0000000000..42e1f394ef --- /dev/null +++ b/sysdeps/ia64/fpu/e_acoshl.S @@ -0,0 +1,1716 @@ +.file "acoshl.s" + + +// Copyright (c) 2000 - 2005, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +//********************************************************************* +// +// History: +// 10/01/01 Initial version +// 10/10/01 Performance inproved +// 12/11/01 Changed huges_logp to not be global +// 01/02/02 Corrected .restore syntax +// 05/20/02 Cleaned up namespace and sf0 syntax +// 08/14/02 Changed mli templates to mlx +// 02/06/03 Reorganized data tables +// 03/31/05 Reformatted delimiters between data tables +// +//********************************************************************* +// +// API +//============================================================== +// long double acoshl(long double); +// +// Overview of operation +//============================================================== +// +// There are 6 paths: +// 1. x = 1 +// Return acoshl(x) = 0; +// +// 2. x < 1 +// Return acoshl(x) = Nan (Domain error, error handler call with tag 135); +// +// 3. x = [S,Q]Nan or +INF +// Return acoshl(x) = x + x; +// +// 4. 'Near 1': 1 < x < 1+1/8 +// Return acoshl(x) = sqrtl(2*y)*(1-P(y)/Q(y)), +// where y = 1, P(y)/Q(y) - rational approximation +// +// 5. 'Huges': x > 0.5*2^64 +// Return acoshl(x) = (logl(2*x-1)); +// +// 6. 'Main path': 1+1/8 < x < 0.5*2^64 +// b_hi + b_lo = x + sqrt(x^2 - 1); +// acoshl(x) = logl_special(b_hi, b_lo); +// +// Algorithm description +//============================================================== +// +// I. Near 1 path algorithm +// ************************************************************** +// The formula is acoshl(x) = sqrtl(2*y)*(1-P(y)/Q(y)), +// where y = 1, P(y)/Q(y) - rational approximation +// +// 1) y = x - 1, y2 = 2 * y +// +// 2) Compute in parallel sqrtl(2*y) and P(y)/Q(y) +// a) sqrtl computation method described below (main path algorithm, item 2)) +// As result we obtain (gg+gl) - multiprecision result +// as pair of double extended values +// b) P(y) and Q(y) calculated without any extra precision manipulations +// c) P/Q division: +// y = frcpa(Q) initial approximation of 1/Q +// z = P*y initial approximation of P/Q +// +// e = 1 - b*y +// e2 = e + e^2 +// e1 = e^2 +// y1 = y + y*e2 = y + y*(e+e^2) +// +// e3 = e + e1^2 +// y2 = y + y1*e3 = y + y*(e+e^2+..+e^6) +// +// r = P - Q*z +// e = 1 - Q*y2 +// xx = z + r*y2 high part of a/b +// +// y3 = y2 + y2*e4 +// r1 = P - Q*xx +// xl = r1*y3 low part of a/b +// +// 3) res = sqrt(2*y) - sqrt(2*y)*(P(y)/Q(y)) = +// = (gg+gl) - (gg + gl)*(xx+xl); +// +// a) hh = gg*xx; hl = gg*xl; lh = gl*xx; ll = gl*xl; +// b) res = ((((gl + ll) + lh) + hl) + hh) + gg; +// (exactly in this order) +// +// II. Main path algorithm +// ( thanks to Peter Markstein for the idea of sqrt(x^2+1) computation! ) +// ********************************************************************** +// +// There are 3 parts of x+sqrt(x^2-1) computation: +// +// 1) m2 = (m2_hi+m2_lo) = x^2-1 obtaining +// ------------------------------------ +// m2_hi = x2_hi - 1, where x2_hi = x * x; +// m2_lo = x2_lo + p1_lo, where +// x2_lo = FMS(x*x-x2_hi), +// p1_lo = (1 + m2_hi) - x2_hi; +// +// 2) g = (g_hi+g_lo) = sqrt(m2) = sqrt(m2_hi+m2_lo) +// ---------------------------------------------- +// r = invsqrt(m2_hi) (8-bit reciprocal square root approximation); +// g = m2_hi * r (first 8 bit-approximation of sqrt); +// +// h = 0.5 * r; +// e = 0.5 - g * h; +// g = g * e + g (second 16 bit-approximation of sqrt); +// +// h = h * e + h; +// e = 0.5 - g * h; +// g = g * e + g (third 32 bit-approximation of sqrt); +// +// h = h * e + h; +// e = 0.5 - g * h; +// g_hi = g * e + g (fourth 64 bit-approximation of sqrt); +// +// Remainder computation: +// h = h * e + h; +// d = (m2_hi - g_hi * g_hi) + m2_lo; +// g_lo = d * h; +// +// 3) b = (b_hi + b_lo) = x + g, where g = (g_hi + g_lo) = sqrt(x^2-1) +// ------------------------------------------------------------------- +// b_hi = (g_hi + x) + gl; +// b_lo = (x - b_hi) + g_hi + gl; +// +// Now we pass b presented as sum b_hi + b_lo to special version +// of logl function which accept a pair of arguments as +// mutiprecision value. +// +// Special log algorithm overview +// ================================ +// Here we use a table lookup method. The basic idea is that in +// order to compute logl(Arg) for an argument Arg in [1,2), +// we construct a value G such that G*Arg is close to 1 and that +// logl(1/G) is obtainable easily from a table of values calculated +// beforehand. Thus +// +// logl(Arg) = logl(1/G) + logl((G*Arg - 1)) +// +// Because |G*Arg - 1| is small, the second term on the right hand +// side can be approximated by a short polynomial. We elaborate +// this method in four steps. +// +// Step 0: Initialization +// +// We need to calculate logl( X+1 ). Obtain N, S_hi such that +// +// X = 2^N * ( S_hi + S_lo ) exactly +// +// where S_hi in [1,2) and S_lo is a correction to S_hi in the sense +// that |S_lo| <= ulp(S_hi). +// +// For the special version of logl: S_lo = b_lo +// !-----------------------------------------------! +// +// Step 1: Argument Reduction +// +// Based on S_hi, obtain G_1, G_2, G_3 from a table and calculate +// +// G := G_1 * G_2 * G_3 +// r := (G * S_hi - 1) + G * S_lo +// +// These G_j's have the property that the product is exactly +// representable and that |r| < 2^(-12) as a result. +// +// Step 2: Approximation +// +// logl(1 + r) is approximated by a short polynomial poly(r). +// +// Step 3: Reconstruction +// +// Finally, logl( X ) = logl( X+1 ) is given by +// +// logl( X ) = logl( 2^N * (S_hi + S_lo) ) +// ~=~ N*logl(2) + logl(1/G) + logl(1 + r) +// ~=~ N*logl(2) + logl(1/G) + poly(r). +// +// For detailed description see logl or log1pl function, regular path. +// +// Registers used +//============================================================== +// Floating Point registers used: +// f8, input +// f32 -> f95 (64 registers) + +// General registers used: +// r32 -> r67 (36 registers) + +// Predicate registers used: +// p7 -> p11 +// p7 for 'NaNs, Inf' path +// p8 for 'near 1' path +// p9 for 'huges' path +// p10 for x = 1 +// p11 for x < 1 +// +//********************************************************************* +// IEEE Special Conditions: +// +// acoshl(+inf) = +inf +// acoshl(-inf) = QNaN +// acoshl(1) = 0 +// acoshl(x<1) = QNaN +// acoshl(SNaN) = QNaN +// acoshl(QNaN) = QNaN +// + +// Data tables +//============================================================== + +RODATA +.align 64 + +// Near 1 path rational aproximation coefficients +LOCAL_OBJECT_START(Poly_P) +data8 0xB0978143F695D40F, 0x3FF1 // .84205539791447100108478906277453574946e-4 +data8 0xB9800D841A8CAD29, 0x3FF6 // .28305085180397409672905983082168721069e-2 +data8 0xC889F455758C1725, 0x3FF9 // .24479844297887530847660233111267222945e-1 +data8 0x9BE1DFF006F45F12, 0x3FFB // .76114415657565879842941751209926938306e-1 +data8 0x9E34AF4D372861E0, 0x3FFB // .77248925727776366270605984806795850504e-1 +data8 0xF3DC502AEE14C4AE, 0x3FA6 // .3077953476682583606615438814166025592e-26 +LOCAL_OBJECT_END(Poly_P) + +// +LOCAL_OBJECT_START(Poly_Q) +data8 0xF76E3FD3C7680357, 0x3FF1 // .11798413344703621030038719253730708525e-3 +data8 0xD107D2E7273263AE, 0x3FF7 // .63791065024872525660782716786703188820e-2 +data8 0xB609BE5CDE206AEF, 0x3FFB // .88885771950814004376363335821980079985e-1 +data8 0xF7DEACAC28067C8A, 0x3FFD // .48412074662702495416825113623936037072302 +data8 0x8F9BE5890CEC7E38, 0x3FFF // 1.1219450873557867470217771071068369729526 +data8 0xED4F06F3D2BC92D1, 0x3FFE // .92698710873331639524734537734804056798748 +LOCAL_OBJECT_END(Poly_Q) + +// Q coeffs +LOCAL_OBJECT_START(Constants_Q) +data4 0x00000000,0xB1721800,0x00003FFE,0x00000000 +data4 0x4361C4C6,0x82E30865,0x0000BFE2,0x00000000 +data4 0x328833CB,0xCCCCCAF2,0x00003FFC,0x00000000 +data4 0xA9D4BAFB,0x80000077,0x0000BFFD,0x00000000 +data4 0xAAABE3D2,0xAAAAAAAA,0x00003FFD,0x00000000 +data4 0xFFFFDAB7,0xFFFFFFFF,0x0000BFFD,0x00000000 +LOCAL_OBJECT_END(Constants_Q) + +// Z1 - 16 bit fixed +LOCAL_OBJECT_START(Constants_Z_1) +data4 0x00008000 +data4 0x00007879 +data4 0x000071C8 +data4 0x00006BCB +data4 0x00006667 +data4 0x00006187 +data4 0x00005D18 +data4 0x0000590C +data4 0x00005556 +data4 0x000051EC +data4 0x00004EC5 +data4 0x00004BDB +data4 0x00004925 +data4 0x0000469F +data4 0x00004445 +data4 0x00004211 +LOCAL_OBJECT_END(Constants_Z_1) + +// G1 and H1 - IEEE single and h1 - IEEE double +LOCAL_OBJECT_START(Constants_G_H_h1) +data4 0x3F800000,0x00000000 +data8 0x0000000000000000 +data4 0x3F70F0F0,0x3D785196 +data8 0x3DA163A6617D741C +data4 0x3F638E38,0x3DF13843 +data8 0x3E2C55E6CBD3D5BB +data4 0x3F579430,0x3E2FF9A0 +data8 0xBE3EB0BFD86EA5E7 +data4 0x3F4CCCC8,0x3E647FD6 +data8 0x3E2E6A8C86B12760 +data4 0x3F430C30,0x3E8B3AE7 +data8 0x3E47574C5C0739BA +data4 0x3F3A2E88,0x3EA30C68 +data8 0x3E20E30F13E8AF2F +data4 0x3F321640,0x3EB9CEC8 +data8 0xBE42885BF2C630BD +data4 0x3F2AAAA8,0x3ECF9927 +data8 0x3E497F3497E577C6 +data4 0x3F23D708,0x3EE47FC5 +data8 0x3E3E6A6EA6B0A5AB +data4 0x3F1D89D8,0x3EF8947D +data8 0xBDF43E3CD328D9BE +data4 0x3F17B420,0x3F05F3A1 +data8 0x3E4094C30ADB090A +data4 0x3F124920,0x3F0F4303 +data8 0xBE28FBB2FC1FE510 +data4 0x3F0D3DC8,0x3F183EBF +data8 0x3E3A789510FDE3FA +data4 0x3F088888,0x3F20EC80 +data8 0x3E508CE57CC8C98F +data4 0x3F042108,0x3F29516A +data8 0xBE534874A223106C +LOCAL_OBJECT_END(Constants_G_H_h1) + +// Z2 - 16 bit fixed +LOCAL_OBJECT_START(Constants_Z_2) +data4 0x00008000 +data4 0x00007F81 +data4 0x00007F02 +data4 0x00007E85 +data4 0x00007E08 +data4 0x00007D8D +data4 0x00007D12 +data4 0x00007C98 +data4 0x00007C20 +data4 0x00007BA8 +data4 0x00007B31 +data4 0x00007ABB +data4 0x00007A45 +data4 0x000079D1 +data4 0x0000795D +data4 0x000078EB +LOCAL_OBJECT_END(Constants_Z_2) + +// G2 and H2 - IEEE single and h2 - IEEE double +LOCAL_OBJECT_START(Constants_G_H_h2) +data4 0x3F800000,0x00000000 +data8 0x0000000000000000 +data4 0x3F7F00F8,0x3B7F875D +data8 0x3DB5A11622C42273 +data4 0x3F7E03F8,0x3BFF015B +data8 0x3DE620CF21F86ED3 +data4 0x3F7D08E0,0x3C3EE393 +data8 0xBDAFA07E484F34ED +data4 0x3F7C0FC0,0x3C7E0586 +data8 0xBDFE07F03860BCF6 +data4 0x3F7B1880,0x3C9E75D2 +data8 0x3DEA370FA78093D6 +data4 0x3F7A2328,0x3CBDC97A +data8 0x3DFF579172A753D0 +data4 0x3F792FB0,0x3CDCFE47 +data8 0x3DFEBE6CA7EF896B +data4 0x3F783E08,0x3CFC15D0 +data8 0x3E0CF156409ECB43 +data4 0x3F774E38,0x3D0D874D +data8 0xBE0B6F97FFEF71DF +data4 0x3F766038,0x3D1CF49B +data8 0xBE0804835D59EEE8 +data4 0x3F757400,0x3D2C531D +data8 0x3E1F91E9A9192A74 +data4 0x3F748988,0x3D3BA322 +data8 0xBE139A06BF72A8CD +data4 0x3F73A0D0,0x3D4AE46F +data8 0x3E1D9202F8FBA6CF +data4 0x3F72B9D0,0x3D5A1756 +data8 0xBE1DCCC4BA796223 +data4 0x3F71D488,0x3D693B9D +data8 0xBE049391B6B7C239 +LOCAL_OBJECT_END(Constants_G_H_h2) + +// G3 and H3 - IEEE single and h3 - IEEE double +LOCAL_OBJECT_START(Constants_G_H_h3) +data4 0x3F7FFC00,0x38800100 +data8 0x3D355595562224CD +data4 0x3F7FF400,0x39400480 +data8 0x3D8200A206136FF6 +data4 0x3F7FEC00,0x39A00640 +data8 0x3DA4D68DE8DE9AF0 +data4 0x3F7FE400,0x39E00C41 +data8 0xBD8B4291B10238DC +data4 0x3F7FDC00,0x3A100A21 +data8 0xBD89CCB83B1952CA +data4 0x3F7FD400,0x3A300F22 +data8 0xBDB107071DC46826 +data4 0x3F7FCC08,0x3A4FF51C +data8 0x3DB6FCB9F43307DB +data4 0x3F7FC408,0x3A6FFC1D +data8 0xBD9B7C4762DC7872 +data4 0x3F7FBC10,0x3A87F20B +data8 0xBDC3725E3F89154A +data4 0x3F7FB410,0x3A97F68B +data8 0xBD93519D62B9D392 +data4 0x3F7FAC18,0x3AA7EB86 +data8 0x3DC184410F21BD9D +data4 0x3F7FA420,0x3AB7E101 +data8 0xBDA64B952245E0A6 +data4 0x3F7F9C20,0x3AC7E701 +data8 0x3DB4B0ECAABB34B8 +data4 0x3F7F9428,0x3AD7DD7B +data8 0x3D9923376DC40A7E +data4 0x3F7F8C30,0x3AE7D474 +data8 0x3DC6E17B4F2083D3 +data4 0x3F7F8438,0x3AF7CBED +data8 0x3DAE314B811D4394 +data4 0x3F7F7C40,0x3B03E1F3 +data8 0xBDD46F21B08F2DB1 +data4 0x3F7F7448,0x3B0BDE2F +data8 0xBDDC30A46D34522B +data4 0x3F7F6C50,0x3B13DAAA +data8 0x3DCB0070B1F473DB +data4 0x3F7F6458,0x3B1BD766 +data8 0xBDD65DDC6AD282FD +data4 0x3F7F5C68,0x3B23CC5C +data8 0xBDCDAB83F153761A +data4 0x3F7F5470,0x3B2BC997 +data8 0xBDDADA40341D0F8F +data4 0x3F7F4C78,0x3B33C711 +data8 0x3DCD1BD7EBC394E8 +data4 0x3F7F4488,0x3B3BBCC6 +data8 0xBDC3532B52E3E695 +data4 0x3F7F3C90,0x3B43BAC0 +data8 0xBDA3961EE846B3DE +data4 0x3F7F34A0,0x3B4BB0F4 +data8 0xBDDADF06785778D4 +data4 0x3F7F2CA8,0x3B53AF6D +data8 0x3DCC3ED1E55CE212 +data4 0x3F7F24B8,0x3B5BA620 +data8 0xBDBA31039E382C15 +data4 0x3F7F1CC8,0x3B639D12 +data8 0x3D635A0B5C5AF197 +data4 0x3F7F14D8,0x3B6B9444 +data8 0xBDDCCB1971D34EFC +data4 0x3F7F0CE0,0x3B7393BC +data8 0x3DC7450252CD7ADA +data4 0x3F7F04F0,0x3B7B8B6D +data8 0xBDB68F177D7F2A42 +LOCAL_OBJECT_END(Constants_G_H_h3) + +// Assembly macros +//============================================================== + +// Floating Point Registers + +FR_Arg = f8 +FR_Res = f8 + + +FR_PP0 = f32 +FR_PP1 = f33 +FR_PP2 = f34 +FR_PP3 = f35 +FR_PP4 = f36 +FR_PP5 = f37 +FR_QQ0 = f38 +FR_QQ1 = f39 +FR_QQ2 = f40 +FR_QQ3 = f41 +FR_QQ4 = f42 +FR_QQ5 = f43 + +FR_Q1 = f44 +FR_Q2 = f45 +FR_Q3 = f46 +FR_Q4 = f47 + +FR_Half = f48 +FR_Two = f49 + +FR_log2_hi = f50 +FR_log2_lo = f51 + + +FR_X2 = f52 +FR_M2 = f53 +FR_M2L = f54 +FR_Rcp = f55 +FR_GG = f56 +FR_HH = f57 +FR_EE = f58 +FR_DD = f59 +FR_GL = f60 +FR_Tmp = f61 + + +FR_XM1 = f62 +FR_2XM1 = f63 +FR_XM12 = f64 + + + + // Special logl registers +FR_XLog_Hi = f65 +FR_XLog_Lo = f66 + +FR_Y_hi = f67 +FR_Y_lo = f68 + +FR_S_hi = f69 +FR_S_lo = f70 + +FR_poly_lo = f71 +FR_poly_hi = f72 + +FR_G = f73 +FR_H = f74 +FR_h = f75 + +FR_G2 = f76 +FR_H2 = f77 +FR_h2 = f78 + +FR_r = f79 +FR_rsq = f80 +FR_rcub = f81 + +FR_float_N = f82 + +FR_G3 = f83 +FR_H3 = f84 +FR_h3 = f85 + +FR_2_to_minus_N = f86 + + + // Near 1 registers +FR_PP = f65 +FR_QQ = f66 + + +FR_PV6 = f69 +FR_PV4 = f70 +FR_PV3 = f71 +FR_PV2 = f72 + +FR_QV6 = f73 +FR_QV4 = f74 +FR_QV3 = f75 +FR_QV2 = f76 + +FR_Y0 = f77 +FR_Q0 = f78 +FR_E0 = f79 +FR_E2 = f80 +FR_E1 = f81 +FR_Y1 = f82 +FR_E3 = f83 +FR_Y2 = f84 +FR_R0 = f85 +FR_E4 = f86 +FR_Y3 = f87 +FR_R1 = f88 +FR_X_Hi = f89 +FR_X_lo = f90 + +FR_HH = f91 +FR_LL = f92 +FR_HL = f93 +FR_LH = f94 + + + + // Error handler registers +FR_Arg_X = f95 +FR_Arg_Y = f0 + + +// General Purpose Registers + + // General prolog registers +GR_PFS = r32 +GR_OneP125 = r33 +GR_TwoP63 = r34 +GR_Arg = r35 +GR_Half = r36 + + // Near 1 path registers +GR_Poly_P = r37 +GR_Poly_Q = r38 + + // Special logl registers +GR_Index1 = r39 +GR_Index2 = r40 +GR_signif = r41 +GR_X_0 = r42 +GR_X_1 = r43 +GR_X_2 = r44 +GR_minus_N = r45 +GR_Z_1 = r46 +GR_Z_2 = r47 +GR_N = r48 +GR_Bias = r49 +GR_M = r50 +GR_Index3 = r51 +GR_exp_2tom80 = r52 +GR_exp_mask = r53 +GR_exp_2tom7 = r54 +GR_ad_ln10 = r55 +GR_ad_tbl_1 = r56 +GR_ad_tbl_2 = r57 +GR_ad_tbl_3 = r58 +GR_ad_q = r59 +GR_ad_z_1 = r60 +GR_ad_z_2 = r61 +GR_ad_z_3 = r62 + +// +// Added for unwind support +// +GR_SAVE_PFS = r32 +GR_SAVE_B0 = r33 +GR_SAVE_GP = r34 + +GR_Parameter_X = r64 +GR_Parameter_Y = r65 +GR_Parameter_RESULT = r66 +GR_Parameter_TAG = r67 + + + +.section .text +GLOBAL_LIBM_ENTRY(acoshl) + +{ .mfi + alloc GR_PFS = ar.pfs,0,32,4,0 // Local frame allocation + fcmp.lt.s1 p11, p0 = FR_Arg, f1 // if arg is less than 1 + mov GR_Half = 0xfffe // 0.5's exp +} +{ .mfi + addl GR_Poly_Q = @ltoff(Poly_Q), gp // Address of Q-coeff table + fma.s1 FR_X2 = FR_Arg, FR_Arg, f0 // Obtain x^2 + addl GR_Poly_P = @ltoff(Poly_P), gp // Address of P-coeff table +};; + +{ .mfi + getf.d GR_Arg = FR_Arg // get arument as double (int64) + fma.s0 FR_Two = f1, f1, f1 // construct 2.0 + addl GR_ad_z_1 = @ltoff(Constants_Z_1#),gp // logl tables +} +{ .mlx + nop.m 0 + movl GR_TwoP63 = 0x43E8000000000000 // 0.5*2^63 (huge arguments) +};; + +{ .mfi + ld8 GR_Poly_P = [GR_Poly_P] // get actual P-coeff table address + fcmp.eq.s1 p10, p0 = FR_Arg, f1 // if arg == 1 (return 0) + nop.i 0 +} +{ .mlx + ld8 GR_Poly_Q = [GR_Poly_Q] // get actual Q-coeff table address + movl GR_OneP125 = 0x3FF2000000000000 // 1.125 (near 1 path bound) +};; + +{ .mfi + ld8 GR_ad_z_1 = [GR_ad_z_1] // Get pointer to Constants_Z_1 + fclass.m p7,p0 = FR_Arg, 0xe3 // if arg NaN inf + cmp.le p9, p0 = GR_TwoP63, GR_Arg // if arg > 0.5*2^63 ('huges') +} +{ .mfb + cmp.ge p8, p0 = GR_OneP125, GR_Arg // if arg<1.125 -near 1 path + fms.s1 FR_XM1 = FR_Arg, f1, f1 // X0 = X-1 (for near 1 path) +(p11) br.cond.spnt acoshl_lt_pone // error branch (less than 1) +};; + +{ .mmi + setf.exp FR_Half = GR_Half // construct 0.5 +(p9) setf.s FR_XLog_Lo = r0 // Low of logl arg=0 (Huges path) + mov GR_exp_mask = 0x1FFFF // Create exponent mask +};; + +{ .mmf +(p8) ldfe FR_PP5 = [GR_Poly_P],16 // Load P5 +(p8) ldfe FR_QQ5 = [GR_Poly_Q],16 // Load Q5 + fms.s1 FR_M2 = FR_X2, f1, f1 // m2 = x^2 - 1 +};; + +{ .mfi +(p8) ldfe FR_QQ4 = [GR_Poly_Q],16 // Load Q4 + fms.s1 FR_M2L = FR_Arg, FR_Arg, FR_X2 // low part of + // m2 = fma(X*X - m2) + add GR_ad_tbl_1 = 0x040, GR_ad_z_1 // Point to Constants_G_H_h1 +} +{ .mfb +(p8) ldfe FR_PP4 = [GR_Poly_P],16 // Load P4 +(p7) fma.s0 FR_Res = FR_Arg,f1,FR_Arg // r = a + a (Nan, Inf) +(p7) br.ret.spnt b0 // return (Nan, Inf) +};; + +{ .mfi +(p8) ldfe FR_PP3 = [GR_Poly_P],16 // Load P3 + nop.f 0 + add GR_ad_q = -0x60, GR_ad_z_1 // Point to Constants_P +} +{ .mfb +(p8) ldfe FR_QQ3 = [GR_Poly_Q],16 // Load Q3 +(p9) fms.s1 FR_XLog_Hi = FR_Two, FR_Arg, f1 // Hi of log arg = 2*X-1 +(p9) br.cond.spnt huges_logl // special version of log +} +;; + +{ .mfi +(p8) ldfe FR_PP2 = [GR_Poly_P],16 // Load P2 +(p8) fma.s1 FR_2XM1 = FR_Two, FR_XM1, f0 // 2X0 = 2 * X0 + add GR_ad_z_2 = 0x140, GR_ad_z_1 // Point to Constants_Z_2 +} +{ .mfb +(p8) ldfe FR_QQ2 = [GR_Poly_Q],16 // Load Q2 +(p10) fma.s0 FR_Res = f0,f1,f0 // r = 0 (arg = 1) +(p10) br.ret.spnt b0 // return (arg = 1) +};; + +{ .mmi +(p8) ldfe FR_PP1 = [GR_Poly_P],16 // Load P1 +(p8) ldfe FR_QQ1 = [GR_Poly_Q],16 // Load Q1 + add GR_ad_tbl_2 = 0x180, GR_ad_z_1 // Point to Constants_G_H_h2 +} +;; + +{ .mfi +(p8) ldfe FR_PP0 = [GR_Poly_P] // Load P0 + fma.s1 FR_Tmp = f1, f1, FR_M2 // Tmp = 1 + m2 + add GR_ad_tbl_3 = 0x280, GR_ad_z_1 // Point to Constants_G_H_h3 +} +{ .mfb +(p8) ldfe FR_QQ0 = [GR_Poly_Q] + nop.f 0 +(p8) br.cond.spnt near_1 // near 1 path +};; +{ .mfi + ldfe FR_log2_hi = [GR_ad_q],16 // Load log2_hi + nop.f 0 + mov GR_Bias = 0x0FFFF // Create exponent bias +};; +{ .mfi + nop.m 0 + frsqrta.s1 FR_Rcp, p0 = FR_M2 // Rcp = 1/m2 reciprocal appr. + nop.i 0 +};; + +{ .mfi + ldfe FR_log2_lo = [GR_ad_q],16 // Load log2_lo + fms.s1 FR_Tmp = FR_X2, f1, FR_Tmp // Tmp = x^2 - Tmp + nop.i 0 +};; + +{ .mfi + ldfe FR_Q4 = [GR_ad_q],16 // Load Q4 + fma.s1 FR_GG = FR_Rcp, FR_M2, f0 // g = Rcp * m2 + // 8 bit Newton Raphson iteration + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_HH = FR_Half, FR_Rcp, f0 // h = 0.5 * Rcp + nop.i 0 +};; +{ .mfi + ldfe FR_Q3 = [GR_ad_q],16 // Load Q3 + fnma.s1 FR_EE = FR_GG, FR_HH, FR_Half // e = 0.5 - g * h + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_M2L = FR_Tmp, f1, FR_M2L // low part of m2 = Tmp+m2l + nop.i 0 +};; + +{ .mfi + ldfe FR_Q2 = [GR_ad_q],16 // Load Q2 + fma.s1 FR_GG = FR_GG, FR_EE, FR_GG // g = g * e + g + // 16 bit Newton Raphson iteration + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_HH = FR_HH, FR_EE, FR_HH // h = h * e + h + nop.i 0 +};; + +{ .mfi + ldfe FR_Q1 = [GR_ad_q] // Load Q1 + fnma.s1 FR_EE = FR_GG, FR_HH, FR_Half // e = 0.5 - g * h + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_GG = FR_GG, FR_EE, FR_GG // g = g * e + g + // 32 bit Newton Raphson iteration + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_HH = FR_HH, FR_EE, FR_HH // h = h * e + h + nop.i 0 +};; + +{ .mfi + nop.m 0 + fnma.s1 FR_EE = FR_GG, FR_HH, FR_Half // e = 0.5 - g * h + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_GG = FR_GG, FR_EE, FR_GG // g = g * e + g + // 64 bit Newton Raphson iteration + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_HH = FR_HH, FR_EE, FR_HH // h = h * e + h + nop.i 0 +};; + +{ .mfi + nop.m 0 + fnma.s1 FR_DD = FR_GG, FR_GG, FR_M2 // Remainder d = g * g - p2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_XLog_Hi = FR_Arg, f1, FR_GG // bh = z + gh + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_DD = FR_DD, f1, FR_M2L // add p2l: d = d + p2l + nop.i 0 +};; + +{ .mfi + getf.sig GR_signif = FR_XLog_Hi // Get significand of x+1 + nop.f 0 + mov GR_exp_2tom7 = 0x0fff8 // Exponent of 2^-7 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_GL = FR_DD, FR_HH, f0 // gl = d * h + extr.u GR_Index1 = GR_signif, 59, 4 // Get high 4 bits of signif +} +{ .mfi + nop.m 0 + fma.s1 FR_XLog_Hi = FR_DD, FR_HH, FR_XLog_Hi // bh = bh + gl + nop.i 0 +};; + + + +{ .mmi + shladd GR_ad_z_1 = GR_Index1, 2, GR_ad_z_1 // Point to Z_1 + shladd GR_ad_tbl_1 = GR_Index1, 4, GR_ad_tbl_1 // Point to G_1 + extr.u GR_X_0 = GR_signif, 49, 15 // Get high 15 bits of signif. +};; + +{ .mmi + ld4 GR_Z_1 = [GR_ad_z_1] // Load Z_1 + nop.m 0 + nop.i 0 +};; + +{ .mmi + ldfps FR_G, FR_H = [GR_ad_tbl_1],8 // Load G_1, H_1 + nop.m 0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_XLog_Lo = FR_Arg, f1, FR_XLog_Hi // bl = x - bh + pmpyshr2.u GR_X_1 = GR_X_0,GR_Z_1,15 // Get bits 30-15 of X_0 * Z_1 +};; + +// WE CANNOT USE GR_X_1 IN NEXT 3 CYCLES BECAUSE OF POSSIBLE 10 CLOCKS STALL! +// "DEAD" ZONE! + +{ .mfi + nop.m 0 + nop.f 0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fmerge.se FR_S_hi = f1,FR_XLog_Hi // Form |x+1| + nop.i 0 +};; + + +{ .mmi + getf.exp GR_N = FR_XLog_Hi // Get N = exponent of x+1 + ldfd FR_h = [GR_ad_tbl_1] // Load h_1 + nop.i 0 +};; + +{ .mfi + nop.m 0 + nop.f 0 + extr.u GR_Index2 = GR_X_1, 6, 4 // Extract bits 6-9 of X_1 +};; + +{ .mfi + shladd GR_ad_tbl_2 = GR_Index2, 4, GR_ad_tbl_2 // Point to G_2 + fma.s1 FR_XLog_Lo = FR_XLog_Lo, f1, FR_GG // bl = bl + gg + mov GR_exp_2tom80 = 0x0ffaf // Exponent of 2^-80 +} +{ .mfi + shladd GR_ad_z_2 = GR_Index2, 2, GR_ad_z_2 // Point to Z_2 + nop.f 0 + sub GR_N = GR_N, GR_Bias // sub bias from exp +};; + +{ .mmi + ldfps FR_G2, FR_H2 = [GR_ad_tbl_2],8 // Load G_2, H_2 + ld4 GR_Z_2 = [GR_ad_z_2] // Load Z_2 + sub GR_minus_N = GR_Bias, GR_N // Form exponent of 2^(-N) +};; + +{ .mmi + ldfd FR_h2 = [GR_ad_tbl_2] // Load h_2 + nop.m 0 + nop.i 0 +};; + +{ .mmi + setf.sig FR_float_N = GR_N // Put integer N into rightmost sign + setf.exp FR_2_to_minus_N = GR_minus_N // Form 2^(-N) + pmpyshr2.u GR_X_2 = GR_X_1,GR_Z_2,15 // Get bits 30-15 of X_1 * Z_2 +};; + +// WE CANNOT USE GR_X_2 IN NEXT 3 CYCLES ("DEAD" ZONE!) +// BECAUSE OF POSSIBLE 10 CLOCKS STALL! +// (Just nops added - nothing to do here) + +{ .mfi + nop.m 0 + fma.s1 FR_XLog_Lo = FR_XLog_Lo, f1, FR_GL // bl = bl + gl + nop.i 0 +};; +{ .mfi + nop.m 0 + nop.f 0 + nop.i 0 +};; +{ .mfi + nop.m 0 + nop.f 0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + nop.f 0 + extr.u GR_Index3 = GR_X_2, 1, 5 // Extract bits 1-5 of X_2 +};; + +{ .mfi + shladd GR_ad_tbl_3 = GR_Index3, 4, GR_ad_tbl_3 // Point to G_3 + nop.f 0 + nop.i 0 +};; + +{ .mfi + ldfps FR_G3, FR_H3 = [GR_ad_tbl_3],8 // Load G_3, H_3 + nop.f 0 + nop.i 0 +};; + +{ .mfi + ldfd FR_h3 = [GR_ad_tbl_3] // Load h_3 + fcvt.xf FR_float_N = FR_float_N + nop.i 0 +};; + +{ .mfi + nop.m 0 + fmpy.s1 FR_G = FR_G, FR_G2 // G = G_1 * G_2 + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 FR_H = FR_H, FR_H2 // H = H_1 + H_2 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fadd.s1 FR_h = FR_h, FR_h2 // h = h_1 + h_2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_S_lo = FR_XLog_Lo, FR_2_to_minus_N, f0 //S_lo=S_lo*2^(-N) + nop.i 0 +};; + +{ .mfi + nop.m 0 + fmpy.s1 FR_G = FR_G, FR_G3 // G = (G_1 * G_2) * G_3 + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 FR_H = FR_H, FR_H3 // H = (H_1 + H_2) + H_3 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fadd.s1 FR_h = FR_h, FR_h3 // h = (h_1 + h_2) + h_3 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_r = FR_G, FR_S_hi, f1 // r = G * S_hi - 1 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_Y_hi = FR_float_N, FR_log2_hi, FR_H // Y_hi=N*log2_hi+H + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_h = FR_float_N, FR_log2_lo, FR_h // h=N*log2_lo+h + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r = FR_G, FR_S_lo, FR_r // r=G*S_lo+(G*S_hi-1) + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_poly_lo = FR_r, FR_Q4, FR_Q3 // poly_lo = r * Q4 + Q3 + nop.i 0 +} +{ .mfi + nop.m 0 + fmpy.s1 FR_rsq = FR_r, FR_r // rsq = r * r + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_poly_lo = FR_poly_lo, FR_r, FR_Q2 // poly_lo=poly_lo*r+Q2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_rcub = FR_rsq, FR_r, f0 // rcub = r^3 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_poly_hi = FR_Q1, FR_rsq, FR_r // poly_hi = Q1*rsq + r + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_poly_lo = FR_poly_lo, FR_rcub, FR_h//poly_lo=poly_lo*r^3+h + nop.i 0 +};; + +{ .mfi + nop.m 0 + fadd.s0 FR_Y_lo = FR_poly_hi, FR_poly_lo + // Y_lo=poly_hi+poly_lo + nop.i 0 +};; + +{ .mfb + nop.m 0 + fadd.s0 FR_Res = FR_Y_lo,FR_Y_hi // Result=Y_lo+Y_hi + br.ret.sptk b0 // Common exit for 2^-7 < x < inf +};; + + +huges_logl: +{ .mmi + getf.sig GR_signif = FR_XLog_Hi // Get significand of x+1 + mov GR_exp_2tom7 = 0x0fff8 // Exponent of 2^-7 + nop.i 0 +};; + +{ .mfi + add GR_ad_tbl_1 = 0x040, GR_ad_z_1 // Point to Constants_G_H_h1 + nop.f 0 + add GR_ad_q = -0x60, GR_ad_z_1 // Point to Constants_P +} +{ .mfi + add GR_ad_z_2 = 0x140, GR_ad_z_1 // Point to Constants_Z_2 + nop.f 0 + add GR_ad_tbl_2 = 0x180, GR_ad_z_1 // Point to Constants_G_H_h2 +};; + +{ .mfi + add GR_ad_tbl_3 = 0x280, GR_ad_z_1 // Point to Constants_G_H_h3 + nop.f 0 + extr.u GR_Index1 = GR_signif, 59, 4 // Get high 4 bits of signif +};; + +{ .mfi + shladd GR_ad_z_1 = GR_Index1, 2, GR_ad_z_1 // Point to Z_1 + nop.f 0 + extr.u GR_X_0 = GR_signif, 49, 15 // Get high 15 bits of signif. +};; + +{ .mfi + ld4 GR_Z_1 = [GR_ad_z_1] // Load Z_1 + nop.f 0 + mov GR_exp_mask = 0x1FFFF // Create exponent mask +} +{ .mfi + shladd GR_ad_tbl_1 = GR_Index1, 4, GR_ad_tbl_1 // Point to G_1 + nop.f 0 + mov GR_Bias = 0x0FFFF // Create exponent bias +};; + +{ .mfi + ldfps FR_G, FR_H = [GR_ad_tbl_1],8 // Load G_1, H_1 + fmerge.se FR_S_hi = f1,FR_XLog_Hi // Form |x| + nop.i 0 +};; + +{ .mmi + getf.exp GR_N = FR_XLog_Hi // Get N = exponent of x+1 + ldfd FR_h = [GR_ad_tbl_1] // Load h_1 + nop.i 0 +};; + +{ .mfi + ldfe FR_log2_hi = [GR_ad_q],16 // Load log2_hi + nop.f 0 + pmpyshr2.u GR_X_1 = GR_X_0,GR_Z_1,15 // Get bits 30-15 of X_0 * Z_1 +};; + +{ .mmi + ldfe FR_log2_lo = [GR_ad_q],16 // Load log2_lo + sub GR_N = GR_N, GR_Bias + mov GR_exp_2tom80 = 0x0ffaf // Exponent of 2^-80 +};; + +{ .mfi + ldfe FR_Q4 = [GR_ad_q],16 // Load Q4 + nop.f 0 + sub GR_minus_N = GR_Bias, GR_N // Form exponent of 2^(-N) +};; + +{ .mmf + ldfe FR_Q3 = [GR_ad_q],16 // Load Q3 + setf.sig FR_float_N = GR_N // Put integer N into rightmost sign + nop.f 0 +};; + +{ .mmi + ldfe FR_Q2 = [GR_ad_q],16 // Load Q2 + nop.m 0 + extr.u GR_Index2 = GR_X_1, 6, 4 // Extract bits 6-9 of X_1 +};; + +{ .mmi + ldfe FR_Q1 = [GR_ad_q] // Load Q1 + shladd GR_ad_z_2 = GR_Index2, 2, GR_ad_z_2 // Point to Z_2 + nop.i 0 +};; + +{ .mmi + ld4 GR_Z_2 = [GR_ad_z_2] // Load Z_2 + shladd GR_ad_tbl_2 = GR_Index2, 4, GR_ad_tbl_2 // Point to G_2 + nop.i 0 +};; + +{ .mmi + ldfps FR_G2, FR_H2 = [GR_ad_tbl_2],8 // Load G_2, H_2 + nop.m 0 + nop.i 0 +};; + +{ .mmf + ldfd FR_h2 = [GR_ad_tbl_2] // Load h_2 + setf.exp FR_2_to_minus_N = GR_minus_N // Form 2^(-N) + nop.f 0 +};; + +{ .mfi + nop.m 0 + nop.f 0 + pmpyshr2.u GR_X_2 = GR_X_1,GR_Z_2,15 // Get bits 30-15 of X_1*Z_2 +};; + +// WE CANNOT USE GR_X_2 IN NEXT 3 CYCLES ("DEAD" ZONE!) +// BECAUSE OF POSSIBLE 10 CLOCKS STALL! +// (Just nops added - nothing to do here) + +{ .mfi + nop.m 0 + nop.f 0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + nop.f 0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + nop.f 0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + nop.f 0 + extr.u GR_Index3 = GR_X_2, 1, 5 // Extract bits 1-5 of X_2 +};; + +{ .mfi + shladd GR_ad_tbl_3 = GR_Index3, 4, GR_ad_tbl_3 // Point to G_3 + fcvt.xf FR_float_N = FR_float_N + nop.i 0 +};; + +{ .mfi + ldfps FR_G3, FR_H3 = [GR_ad_tbl_3],8 // Load G_3, H_3 + nop.f 0 + nop.i 0 +};; + +{ .mfi + ldfd FR_h3 = [GR_ad_tbl_3] // Load h_3 + fmpy.s1 FR_G = FR_G, FR_G2 // G = G_1 * G_2 + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 FR_H = FR_H, FR_H2 // H = H_1 + H_2 + nop.i 0 +};; + +{ .mmf + nop.m 0 + nop.m 0 + fadd.s1 FR_h = FR_h, FR_h2 // h = h_1 + h_2 +};; + +{ .mfi + nop.m 0 + fmpy.s1 FR_G = FR_G, FR_G3 // G = (G_1 * G_2)*G_3 + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 FR_H = FR_H, FR_H3 // H = (H_1 + H_2)+H_3 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fadd.s1 FR_h = FR_h, FR_h3 // h = (h_1 + h_2) + h_3 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_r = FR_G, FR_S_hi, f1 // r = G * S_hi - 1 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_Y_hi = FR_float_N, FR_log2_hi, FR_H // Y_hi=N*log2_hi+H + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_h = FR_float_N, FR_log2_lo, FR_h // h = N*log2_lo+h + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_poly_lo = FR_r, FR_Q4, FR_Q3 // poly_lo = r * Q4 + Q3 + nop.i 0 +} +{ .mfi + nop.m 0 + fmpy.s1 FR_rsq = FR_r, FR_r // rsq = r * r + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_poly_lo = FR_poly_lo, FR_r, FR_Q2 // poly_lo=poly_lo*r+Q2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_rcub = FR_rsq, FR_r, f0 // rcub = r^3 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_poly_hi = FR_Q1, FR_rsq, FR_r // poly_hi = Q1*rsq + r + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_poly_lo = FR_poly_lo, FR_rcub, FR_h//poly_lo=poly_lo*r^3+h + nop.i 0 +};; +{ .mfi + nop.m 0 + fadd.s0 FR_Y_lo = FR_poly_hi, FR_poly_lo // Y_lo=poly_hi+poly_lo + nop.i 0 +};; +{ .mfb + nop.m 0 + fadd.s0 FR_Res = FR_Y_lo,FR_Y_hi // Result=Y_lo+Y_hi + br.ret.sptk b0 // Common exit +};; + + +// NEAR ONE INTERVAL +near_1: +{ .mfi + nop.m 0 + frsqrta.s1 FR_Rcp, p0 = FR_2XM1 // Rcp = 1/x reciprocal appr. &SQRT& + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_PV6 = FR_PP5, FR_XM1, FR_PP4 // pv6 = P5*xm1+P4 $POLY$ + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_QV6 = FR_QQ5, FR_XM1, FR_QQ4 // qv6 = Q5*xm1+Q4 $POLY$ + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_PV4 = FR_PP3, FR_XM1, FR_PP2 // pv4 = P3*xm1+P2 $POLY$ + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_QV4 = FR_QQ3, FR_XM1, FR_QQ2 // qv4 = Q3*xm1+Q2 $POLY$ + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_XM12 = FR_XM1, FR_XM1, f0 // xm1^2 = xm1 * xm1 $POLY$ + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_PV2 = FR_PP1, FR_XM1, FR_PP0 // pv2 = P1*xm1+P0 $POLY$ + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_QV2 = FR_QQ1, FR_XM1, FR_QQ0 // qv2 = Q1*xm1+Q0 $POLY$ + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_GG = FR_Rcp, FR_2XM1, f0 // g = Rcp * x &SQRT& + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_HH = FR_Half, FR_Rcp, f0 // h = 0.5 * Rcp &SQRT& + nop.i 0 +};; + + +{ .mfi + nop.m 0 + fma.s1 FR_PV3 = FR_XM12, FR_PV6, FR_PV4//pv3=pv6*xm1^2+pv4 $POLY$ + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_QV3 = FR_XM12, FR_QV6, FR_QV4//qv3=qv6*xm1^2+qv4 $POLY$ + nop.i 0 +};; + + +{ .mfi + nop.m 0 + fnma.s1 FR_EE = FR_GG, FR_HH, FR_Half // e = 0.5 - g * h &SQRT& + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_PP = FR_XM12, FR_PV3, FR_PV2 //pp=pv3*xm1^2+pv2 $POLY$ + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_QQ = FR_XM12, FR_QV3, FR_QV2 //qq=qv3*xm1^2+qv2 $POLY$ + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_GG = FR_GG, FR_EE, FR_GG // g = g * e + g &SQRT& + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_HH = FR_HH, FR_EE, FR_HH // h = h * e + h &SQRT& + nop.i 0 +};; + +{ .mfi + nop.m 0 + frcpa.s1 FR_Y0,p0 = f1,FR_QQ // y = frcpa(b) #DIV# + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 FR_EE = FR_GG, FR_HH, FR_Half // e = 0.5 - g*h &SQRT& + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_Q0 = FR_PP,FR_Y0,f0 // q = a*y #DIV# + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 FR_E0 = FR_Y0,FR_QQ,f1 // e = 1 - b*y #DIV# + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_GG = FR_GG, FR_EE, FR_GG // g = g * e + g &SQRT& + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_HH = FR_HH, FR_EE, FR_HH // h = h * e + h &SQRT& + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_E2 = FR_E0,FR_E0,FR_E0 // e2 = e+e^2 #DIV# + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_E1 = FR_E0,FR_E0,f0 // e1 = e^2 #DIV# + nop.i 0 +};; + +{ .mfi + nop.m 0 + fnma.s1 FR_EE = FR_GG, FR_HH, FR_Half // e = 0.5 - g * h &SQRT& + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 FR_DD = FR_GG, FR_GG, FR_2XM1 // d = x - g * g &SQRT& + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_Y1 = FR_Y0,FR_E2,FR_Y0 // y1 = y+y*e2 #DIV# + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_E3 = FR_E1,FR_E1,FR_E0 // e3 = e+e1^2 #DIV# + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_GG = FR_DD, FR_HH, FR_GG // g = d * h + g &SQRT& + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_HH = FR_HH, FR_EE, FR_HH // h = h * e + h &SQRT& + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_Y2 = FR_Y1,FR_E3,FR_Y0 // y2 = y+y1*e3 #DIV# + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 FR_R0 = FR_QQ,FR_Q0,FR_PP // r = a-b*q #DIV# + nop.i 0 +};; + +{ .mfi + nop.m 0 + fnma.s1 FR_DD = FR_GG, FR_GG, FR_2XM1 // d = x - g * g &SQRT& + nop.i 0 +};; + +{ .mfi + nop.m 0 + fnma.s1 FR_E4 = FR_QQ,FR_Y2,f1 // e4 = 1-b*y2 #DIV# + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_X_Hi = FR_R0,FR_Y2,FR_Q0 // x = q+r*y2 #DIV# + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_GL = FR_DD, FR_HH, f0 // gl = d * h &SQRT& + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_Y3 = FR_Y2,FR_E4,FR_Y2 // y3 = y2+y2*e4 #DIV# + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 FR_R1 = FR_QQ,FR_X_Hi,FR_PP // r1 = a-b*x #DIV# + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_HH = FR_GG, FR_X_Hi, f0 // hh = gg * x_hi + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_LH = FR_GL, FR_X_Hi, f0 // lh = gl * x_hi + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_X_lo = FR_R1,FR_Y3,f0 // x_lo = r1*y3 #DIV# + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_LL = FR_GL, FR_X_lo, f0 // ll = gl*x_lo + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_HL = FR_GG, FR_X_lo, f0 // hl = gg * x_lo + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_Res = FR_GL, f1, FR_LL // res = gl + ll + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_Res = FR_Res, f1, FR_LH // res = res + lh + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_Res = FR_Res, f1, FR_HL // res = res + hl + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_Res = FR_Res, f1, FR_HH // res = res + hh + nop.i 0 +};; + +{ .mfb + nop.m 0 + fma.s0 FR_Res = FR_Res, f1, FR_GG // result = res + gg + br.ret.sptk b0 // Exit for near 1 path +};; +// NEAR ONE INTERVAL END + + + + +acoshl_lt_pone: +{ .mfi + nop.m 0 + fmerge.s FR_Arg_X = FR_Arg, FR_Arg + nop.i 0 +};; +{ .mfb + mov GR_Parameter_TAG = 135 + frcpa.s0 FR_Res,p0 = f0,f0 // get QNaN,and raise invalid + br.cond.sptk __libm_error_region // exit if x < 1.0 +};; + +GLOBAL_LIBM_END(acoshl) + + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y = -32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS = ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp = -64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP = gp // Save gp +};; + +{ .mmi + stfe [GR_Parameter_Y] = FR_Arg_Y,16 // Parameter 2 to stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0,GR_SAVE_B0 + mov GR_SAVE_B0 = b0 // Save b0 +};; + +.body +{ .mib + stfe [GR_Parameter_X] = FR_Arg_X // Parameter 1 to stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfe [GR_Parameter_Y] = FR_Res // Parameter 3 to stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0 = __libm_error_support# // Error handling function +};; + +{ .mmi + nop.m 0 + nop.m 0 + add GR_Parameter_RESULT = 48,sp +};; + +{ .mmi + ldfe f8 = [GR_Parameter_RESULT] // Get return res +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; + +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region#) + +.type __libm_error_support#,@function +.global __libm_error_support# + + + + diff --git a/sysdeps/ia64/fpu/e_acosl.S b/sysdeps/ia64/fpu/e_acosl.S new file mode 100644 index 0000000000..4fd345bedd --- /dev/null +++ b/sysdeps/ia64/fpu/e_acosl.S @@ -0,0 +1,2552 @@ +.file "acosl.s" + + +// Copyright (c) 2001 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2001 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 08/28/01 New version +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/06/03 Reordered header: .section, .global, .proc, .align +// +// API +//============================================================== +// long double acosl(long double) +// +// Overview of operation +//============================================================== +// Background +// +// Implementation +// +// For |s| in [2^{-4}, sqrt(2)/2]: +// Let t= 2^k*1.b1 b2..b6 1, where s= 2^k*1.b1 b2.. b52 +// acos(s)= pi/2-asin(t)-asin(r), where r= s*sqrt(1-t^2)-t*sqrt(1-s^2), i.e. +// r= (s-t)*sqrt(1-t^2)-t*sqrt(1-t^2)*(sqrt((1-s^2)/(1-t^2))-1) +// asin(r)-r evaluated as 9-degree polynomial (c3*r^3+c5*r^5+c7*r^7+c9*r^9) +// The 64-bit significands of sqrt(1-t^2), 1/(1-t^2) are read from the table, +// along with the high and low parts of asin(t) (stored as two double precision +// values) +// +// |s| in (sqrt(2)/2, sqrt(255/256)): +// Let t= 2^k*1.b1 b2..b6 1, where (1-s^2)*frsqrta(1-s^2)= 2^k*1.b1 b2..b6.. +// acos(|s|)= asin(t)-asin(r) +// acos(-|s|)=pi-asin(t)+asin(r), r= s*t-sqrt(1-s^2)*sqrt(1-t^2) +// To minimize accumulated errors, r is computed as +// r= (t*s)_s-t^2*y*z+z*y*(t^2-1+s^2)_s+z*y*(1-s^2)_s*x+z'*y*(1-s^2)*PS29+ +// +(t*s-(t*s)_s)+z*y*((t^2-1-(t^2-1+s^2)_s)+s^2)+z*y*(1-s^2-(1-s^2)_s)+ +// +ez*z'*y*(1-s^2)*(1-x), +// where y= frsqrta(1-s^2), z= (sqrt(1-t^2))_s (rounded to 24 significant bits) +// z'= sqrt(1-t^2), x= ((1-s^2)*y^2-1)/2 +// +// |s|<2^{-4}: evaluate asin(s) as 17-degree polynomial, return pi/2-asin(s) +// (or simply return pi/2-s, if|s|<2^{-64}) +// +// |s| in [sqrt(255/256), 1): acos(|s|)= asin(sqrt(1-s^2)) +// acos(-|s|)= pi-asin(sqrt(1-s^2)) +// use 17-degree polynomial for asin(sqrt(1-s^2)), +// 9-degree polynomial to evaluate sqrt(1-s^2) +// High order term is (pi)_high-(y*(1-s^2))_high, for s<0, +// or y*(1-s^2)_s, for s>0 +// + + + +// Registers used +//============================================================== +// f6-f15, f32-f36 +// r2-r3, r23-r23 +// p6, p7, p8, p12 +// + + + GR_SAVE_B0= r33 + GR_SAVE_PFS= r34 + GR_SAVE_GP= r35 // This reg. can safely be used + GR_SAVE_SP= r36 + + GR_Parameter_X= r37 + GR_Parameter_Y= r38 + GR_Parameter_RESULT= r39 + GR_Parameter_TAG= r40 + + FR_X= f10 + FR_Y= f1 + FR_RESULT= f8 + + + +RODATA + +.align 16 + +LOCAL_OBJECT_START(T_table) + +// stores 64-bit significand of 1/(1-t^2), 64-bit significand of sqrt(1-t^2), +// asin(t)_high (double precision), asin(t)_low (double precision) + +data8 0x80828692b71c4391, 0xff7ddcec2d87e879 +data8 0x3fb022bc0ae531a0, 0x3c9f599c7bb42af6 +data8 0x80869f0163d0b082, 0xff79cad2247914d3 +data8 0x3fb062dd26afc320, 0x3ca4eff21bd49c5c +data8 0x808ac7d5a8690705, 0xff75a89ed6b626b9 +data8 0x3fb0a2ff4a1821e0, 0x3cb7e33b58f164cc +data8 0x808f0112ad8ad2e0, 0xff7176517c2cc0cb +data8 0x3fb0e32279319d80, 0x3caee31546582c43 +data8 0x80934abba8a1da0a, 0xff6d33e949b1ed31 +data8 0x3fb12346b8101da0, 0x3cb8bfe463d087cd +data8 0x8097a4d3dbe63d8f, 0xff68e16571015c63 +data8 0x3fb1636c0ac824e0, 0x3c8870a7c5a3556f +data8 0x809c0f5e9662b3dd, 0xff647ec520bca0f0 +data8 0x3fb1a392756ed280, 0x3c964f1a927461ae +data8 0x80a08a5f33fadc66, 0xff600c07846a6830 +data8 0x3fb1e3b9fc19e580, 0x3c69eb3576d56332 +data8 0x80a515d91d71acd4, 0xff5b892bc475affa +data8 0x3fb223e2a2dfbe80, 0x3c6a4e19fd972fb6 +data8 0x80a9b1cfc86ff7cd, 0xff56f631062cf93d +data8 0x3fb2640c6dd76260, 0x3c62041160e0849e +data8 0x80ae5e46b78b0d68, 0xff5253166bc17794 +data8 0x3fb2a43761187c80, 0x3cac61651af678c0 +data8 0x80b31b417a4b756b, 0xff4d9fdb14463dc8 +data8 0x3fb2e46380bb6160, 0x3cb06ef23eeba7a1 +data8 0x80b7e8c3ad33c369, 0xff48dc7e1baf6738 +data8 0x3fb32490d0d910c0, 0x3caa05f480b300d5 +data8 0x80bcc6d0f9c784d6, 0xff4408fe9ad13e37 +data8 0x3fb364bf558b3820, 0x3cb01e7e403aaab9 +data8 0x80c1b56d1692492d, 0xff3f255ba75f5f4e +data8 0x3fb3a4ef12ec3540, 0x3cb4fe8fcdf5f5f1 +data8 0x80c6b49bc72ec446, 0xff3a319453ebd961 +data8 0x3fb3e5200d171880, 0x3caf2dc089b2b7e2 +data8 0x80cbc460dc4e0ae8, 0xff352da7afe64ac6 +data8 0x3fb425524827a720, 0x3cb75a855e7c6053 +data8 0x80d0e4c033bee9c4, 0xff301994c79afb32 +data8 0x3fb46585c83a5e00, 0x3cb3264981c019ab +data8 0x80d615bdb87556db, 0xff2af55aa431f291 +data8 0x3fb4a5ba916c73c0, 0x3c994251d94427b5 +data8 0x80db575d6291fd8a, 0xff25c0f84bae0cb9 +data8 0x3fb4e5f0a7dbdb20, 0x3cbee2fcc4c786cb +data8 0x80e0a9a33769e535, 0xff207c6cc0ec09fd +data8 0x3fb526280fa74620, 0x3c940656e5549b91 +data8 0x80e60c93498e32cd, 0xff1b27b703a19c98 +data8 0x3fb56660ccee2740, 0x3ca7082374d7b2cd +data8 0x80eb8031b8d4052d, 0xff15c2d6105c72f8 +data8 0x3fb5a69ae3d0b520, 0x3c7c4d46e09ac68a +data8 0x80f10482b25c6c8a, 0xff104dc8e0813ed4 +data8 0x3fb5e6d6586fec20, 0x3c9aa84ffd9b4958 +data8 0x80f6998a709c7cfb, 0xff0ac88e6a4ab926 +data8 0x3fb627132eed9140, 0x3cbced2cbbbe7d16 +data8 0x80fc3f4d3b657c44, 0xff053325a0c8a2ec +data8 0x3fb667516b6c34c0, 0x3c6489c5fc68595a +data8 0x8101f5cf67ed2af8, 0xfeff8d8d73dec2bb +data8 0x3fb6a791120f33a0, 0x3cbe12acf159dfad +data8 0x8107bd1558d6291f, 0xfef9d7c4d043df29 +data8 0x3fb6e7d226fabba0, 0x3ca386d099cd0dc7 +data8 0x810d95237e38766a, 0xfef411ca9f80b5f7 +data8 0x3fb72814ae53cc20, 0x3cb9f35731e71dd6 +data8 0x81137dfe55aa0e29, 0xfeee3b9dc7eef009 +data8 0x3fb76858ac403a00, 0x3c74df3dd959141a +data8 0x811977aa6a479f0f, 0xfee8553d2cb8122c +data8 0x3fb7a89e24e6b0e0, 0x3ca6034406ee42bc +data8 0x811f822c54bd5ef8, 0xfee25ea7add46a91 +data8 0x3fb7e8e51c6eb6a0, 0x3cb82f8f78e68ed7 +data8 0x81259d88bb4ffac1, 0xfedc57dc2809fb1d +data8 0x3fb8292d9700ad60, 0x3cbebb73c0e653f9 +data8 0x812bc9c451e5a257, 0xfed640d974eb6068 +data8 0x3fb8697798c5d620, 0x3ca2feee76a9701b +data8 0x813206e3da0f3124, 0xfed0199e6ad6b585 +data8 0x3fb8a9c325e852e0, 0x3cb9e88f2f4d0efe +data8 0x813854ec231172f9, 0xfec9e229dcf4747d +data8 0x3fb8ea1042932a00, 0x3ca5ff40d81f66fd +data8 0x813eb3e209ee858f, 0xfec39a7a9b36538b +data8 0x3fb92a5ef2f247c0, 0x3cb5e3bece4d6b07 +data8 0x814523ca796f56ce, 0xfebd428f72561efe +data8 0x3fb96aaf3b3281a0, 0x3cb7b9e499436d7c +data8 0x814ba4aa6a2d3ff9, 0xfeb6da672bd48fe4 +data8 0x3fb9ab011f819860, 0x3cb9168143cc1a7f +data8 0x81523686e29bbdd7, 0xfeb062008df81f50 +data8 0x3fb9eb54a40e3ac0, 0x3cb6e544197eb1e1 +data8 0x8158d964f7124614, 0xfea9d95a5bcbd65a +data8 0x3fba2ba9cd080800, 0x3ca9a717be8f7446 +data8 0x815f8d49c9d639e4, 0xfea34073551e1ac8 +data8 0x3fba6c009e9f9260, 0x3c741e989a60938a +data8 0x8166523a8b24f626, 0xfe9c974a367f785c +data8 0x3fbaac591d0661a0, 0x3cb2c1290107e57d +data8 0x816d283c793e0114, 0xfe95ddddb94166cb +data8 0x3fbaecb34c6ef600, 0x3c9c7d5fbaec405d +data8 0x81740f54e06d55bd, 0xfe8f142c93750c50 +data8 0x3fbb2d0f310cca00, 0x3cbc09479a9cbcfb +data8 0x817b07891b15cd5e, 0xfe883a3577e9fceb +data8 0x3fbb6d6ccf1455e0, 0x3cb9450bff4ee307 +data8 0x818210de91bba6c8, 0xfe814ff7162cf62f +data8 0x3fbbadcc2abb1180, 0x3c9227fda12a8d24 +data8 0x81892b5abb0f2bf9, 0xfe7a55701a8697b1 +data8 0x3fbbee2d48377700, 0x3cb6fad72acfe356 +data8 0x819057031bf7760e, 0xfe734a9f2dfa1810 +data8 0x3fbc2e902bc10600, 0x3cb4465b588d16ad +data8 0x819793dd479d4fbe, 0xfe6c2f82f643f68b +data8 0x3fbc6ef4d9904580, 0x3c8b9ac54823960d +data8 0x819ee1eedf76367a, 0xfe65041a15d8a92c +data8 0x3fbcaf5b55dec6a0, 0x3ca2b8d28a954db2 +data8 0x81a6413d934f7a66, 0xfe5dc8632be3477f +data8 0x3fbcefc3a4e727a0, 0x3c9380da83713ab4 +data8 0x81adb1cf21597d4b, 0xfe567c5cd44431d5 +data8 0x3fbd302dcae51600, 0x3ca995b83421756a +data8 0x81b533a9563310b8, 0xfe4f2005a78fb50f +data8 0x3fbd7099cc155180, 0x3caefa2f7a817d5f +data8 0x81bcc6d20cf4f373, 0xfe47b35c3b0caaeb +data8 0x3fbdb107acb5ae80, 0x3cb455fc372dd026 +data8 0x81c46b4f2f3d6e68, 0xfe40365f20b316d6 +data8 0x3fbdf177710518c0, 0x3cbee3dcc5b01434 +data8 0x81cc2126b53c1144, 0xfe38a90ce72abf36 +data8 0x3fbe31e91d439620, 0x3cb3e131c950aebd +data8 0x81d3e85ea5bd8ee2, 0xfe310b6419c9c33a +data8 0x3fbe725cb5b24900, 0x3c01d3fac6029027 +data8 0x81dbc0fd1637b9c1, 0xfe295d6340932d15 +data8 0x3fbeb2d23e937300, 0x3c6304cc44aeedd1 +data8 0x81e3ab082ad5a0a4, 0xfe219f08e03580b3 +data8 0x3fbef349bc2a77e0, 0x3cac1d2d6abe9c72 +data8 0x81eba6861683cb97, 0xfe19d0537a0946e2 +data8 0x3fbf33c332bbe020, 0x3ca0909dba4e96ca +data8 0x81f3b37d1afc9979, 0xfe11f1418c0f94e2 +data8 0x3fbf743ea68d5b60, 0x3c937fc12a2a779a +data8 0x81fbd1f388d4be45, 0xfe0a01d190f09063 +data8 0x3fbfb4bc1be5c340, 0x3cbf51a504b55813 +data8 0x820401efbf87e248, 0xfe020201fff9efea +data8 0x3fbff53b970d1e80, 0x3ca625444b260078 +data8 0x82106ad2ffdca049, 0xfdf5e3940a49135e +data8 0x3fc02aff52065460, 0x3c9125d113e22a57 +data8 0x8221343d6ea1d3e2, 0xfde581a45429b0a0 +data8 0x3fc06b84f8e03220, 0x3caccf362295894b +data8 0x82324434adbf99c2, 0xfdd4de1a001fb775 +data8 0x3fc0ac0ed1fe7240, 0x3cc22f676096b0af +data8 0x82439aee8d0c7747, 0xfdc3f8e8269d1f03 +data8 0x3fc0ec9cee9e4820, 0x3cca147e2886a628 +data8 0x825538a1d0fcb2f0, 0xfdb2d201a9b1ba66 +data8 0x3fc12d2f6006f0a0, 0x3cc72b36633bc2d4 +data8 0x82671d86345c5cee, 0xfda1695934d723e7 +data8 0x3fc16dc63789de60, 0x3cb11f9c47c7b83f +data8 0x827949d46a121770, 0xfd8fbee13cbbb823 +data8 0x3fc1ae618682e620, 0x3cce1b59020cef8e +data8 0x828bbdc61eeab9ba, 0xfd7dd28bff0c9f34 +data8 0x3fc1ef015e586c40, 0x3cafec043e0225ee +data8 0x829e7995fb6de9e1, 0xfd6ba44b823ee1ca +data8 0x3fc22fa5d07b90c0, 0x3cba905409caf8e3 +data8 0x82b17d7fa5bbc982, 0xfd5934119557883a +data8 0x3fc2704eee685da0, 0x3cb5ef21838a823e +data8 0x82c4c9bfc373d276, 0xfd4681cfcfb2c161 +data8 0x3fc2b0fcc9a5f3e0, 0x3ccc7952c5e0e312 +data8 0x82d85e93fba50136, 0xfd338d7790ca0f41 +data8 0x3fc2f1af73c6ba00, 0x3cbecf5f977d1ca9 +data8 0x82ec3c3af8c76b32, 0xfd2056f9fff97727 +data8 0x3fc33266fe6889a0, 0x3c9d329c022ebdb5 +data8 0x830062f46abf6022, 0xfd0cde480c43b327 +data8 0x3fc373237b34de60, 0x3cc95806d4928adb +data8 0x8314d30108ea35f0, 0xfcf923526c1562b2 +data8 0x3fc3b3e4fbe10520, 0x3cbc299fe7223d54 +data8 0x83298ca29434df97, 0xfce526099d0737ed +data8 0x3fc3f4ab922e4a60, 0x3cb59d8bb8fdbccc +data8 0x833e901bd93c7009, 0xfcd0e65de39f1f7c +data8 0x3fc435774fea2a60, 0x3c9ec18b43340914 +data8 0x8353ddb0b278aad8, 0xfcbc643f4b106055 +data8 0x3fc4764846ee80a0, 0x3cb90402efd87ed6 +data8 0x836975a60a70c52e, 0xfca79f9da4fab13a +data8 0x3fc4b71e8921b860, 0xbc58f23449ed6365 +data8 0x837f5841ddfa7a46, 0xfc92986889284148 +data8 0x3fc4f7fa2876fca0, 0xbc6294812bf43acd +data8 0x839585cb3e839773, 0xfc7d4e8f554ab12f +data8 0x3fc538db36ee6960, 0x3cb910b773d4c578 +data8 0x83abfe8a5466246f, 0xfc67c2012cb6fa68 +data8 0x3fc579c1c6953cc0, 0x3cc5ede909fc47fc +data8 0x83c2c2c861474d91, 0xfc51f2acf82041d5 +data8 0x3fc5baade9860880, 0x3cac63cdfc3588e5 +data8 0x83d9d2cfc2813637, 0xfc3be08165519325 +data8 0x3fc5fb9fb1e8e3a0, 0x3cbf7c8466578c29 +data8 0x83f12eebf397daac, 0xfc258b6ce6e6822f +data8 0x3fc63c9731f39d40, 0x3cb6d2a7ffca3e9e +data8 0x8408d76990b9296e, 0xfc0ef35db402af94 +data8 0x3fc67d947be9eec0, 0x3cb1980da09e6566 +data8 0x8420cc9659487cd7, 0xfbf81841c8082dc4 +data8 0x3fc6be97a21daf00, 0x3cc2ac8330e59aa5 +data8 0x84390ec132759ecb, 0xfbe0fa06e24cc390 +data8 0x3fc6ffa0b6ef05e0, 0x3ccc1a030fee56c4 +data8 0x84519e3a29df811a, 0xfbc9989a85ce0954 +data8 0x3fc740afcccca000, 0x3cc19692a5301ca6 +data8 0x846a7b527842d61b, 0xfbb1f3e9f8e45dc4 +data8 0x3fc781c4f633e2c0, 0x3cc0e98f3868a508 +data8 0x8483a65c8434b5f0, 0xfb9a0be244f4af45 +data8 0x3fc7c2e045b12140, 0x3cb2a8d309754420 +data8 0x849d1fabe4e97dd7, 0xfb81e070362116d1 +data8 0x3fc80401cddfd120, 0x3ca7a44544aa4ce6 +data8 0x84b6e795650817ea, 0xfb6971805af8411e +data8 0x3fc84529a16ac020, 0x3c9e3b709c7d6f94 +data8 0x84d0fe6f0589da92, 0xfb50beff0423a2f5 +data8 0x3fc88657d30c49e0, 0x3cc60d65a7f0a278 +data8 0x84eb649000a73014, 0xfb37c8d84414755c +data8 0x3fc8c78c758e8e80, 0x3cc94b2ee984c2b7 +data8 0x85061a50ccd13781, 0xfb1e8ef7eeaf764b +data8 0x3fc908c79bcba900, 0x3cc8540ae794a2fe +data8 0x8521200b1fb8916e, 0xfb05114998f76a83 +data8 0x3fc94a0958ade6c0, 0x3ca127f49839fa9c +data8 0x853c7619f1618bf6, 0xfaeb4fb898b65d19 +data8 0x3fc98b51bf2ffee0, 0x3c8c9ba7a803909a +data8 0x85581cd97f45e274, 0xfad14a3004259931 +data8 0x3fc9cca0e25d4ac0, 0x3cba458e91d3bf54 +data8 0x857414a74f8446b4, 0xfab7009ab1945a54 +data8 0x3fca0df6d551fe80, 0x3cc78ea1d329d2b2 +data8 0x85905de2341dea46, 0xfa9c72e3370d2fbc +data8 0x3fca4f53ab3b6200, 0x3ccf60dca86d57ef +data8 0x85acf8ea4e423ff8, 0xfa81a0f3e9fa0ee9 +data8 0x3fca90b777580aa0, 0x3ca4c4e2ec8a867e +data8 0x85c9e62111a92e7d, 0xfa668ab6dec711b1 +data8 0x3fcad2224cf814e0, 0x3c303de5980d071c +data8 0x85e725e947fbee97, 0xfa4b3015e883dbfe +data8 0x3fcb13943f7d5f80, 0x3cc29d4eefa5cb1e +data8 0x8604b8a7144cd054, 0xfa2f90fa9883a543 +data8 0x3fcb550d625bc6a0, 0x3c9e01a746152daf +data8 0x86229ebff69e2415, 0xfa13ad4e3dfbe1c1 +data8 0x3fcb968dc9195ea0, 0x3ccc091bd73ae518 +data8 0x8640d89acf78858c, 0xf9f784f9e5a1877b +data8 0x3fcbd815874eb160, 0x3cb5f4b89875e187 +data8 0x865f669fe390c7f5, 0xf9db17e65944eacf +data8 0x3fcc19a4b0a6f9c0, 0x3cc5c0bc2b0bbf14 +data8 0x867e4938df7dc45f, 0xf9be65fc1f6c2e6e +data8 0x3fcc5b3b58e061e0, 0x3cc1ca70df8f57e7 +data8 0x869d80d0db7e4c0c, 0xf9a16f237aec427a +data8 0x3fcc9cd993cc4040, 0x3cbae93acc85eccf +data8 0x86bd0dd45f4f8265, 0xf98433446a806e70 +data8 0x3fccde7f754f5660, 0x3cb22f70e64568d0 +data8 0x86dcf0b16613e37a, 0xf966b246a8606170 +data8 0x3fcd202d11620fa0, 0x3c962030e5d4c849 +data8 0x86fd29d7624b3d5d, 0xf948ec11a9d4c45b +data8 0x3fcd61e27c10c0a0, 0x3cc7083c91d59217 +data8 0x871db9b741dbe44a, 0xf92ae08c9eca4941 +data8 0x3fcda39fc97be7c0, 0x3cc9258579e57211 +data8 0x873ea0c3722d6af2, 0xf90c8f9e71633363 +data8 0x3fcde5650dd86d60, 0x3ca4755a9ea582a9 +data8 0x875fdf6fe45529e8, 0xf8edf92dc5875319 +data8 0x3fce27325d6fe520, 0x3cbc1e2b6c1954f9 +data8 0x878176321154e2bc, 0xf8cf1d20f87270b8 +data8 0x3fce6907cca0d060, 0x3cb6ca4804750830 +data8 0x87a36580fe6bccf5, 0xf8affb5e20412199 +data8 0x3fceaae56fdee040, 0x3cad6b310d6fd46c +data8 0x87c5add5417a5cb9, 0xf89093cb0b7c0233 +data8 0x3fceeccb5bb33900, 0x3cc16e99cedadb20 +data8 0x87e84fa9057914ca, 0xf870e64d40a15036 +data8 0x3fcf2eb9a4bcb600, 0x3cc75ee47c8b09e9 +data8 0x880b4b780f02b709, 0xf850f2c9fdacdf78 +data8 0x3fcf70b05fb02e20, 0x3cad6350d379f41a +data8 0x882ea1bfc0f228ac, 0xf830b926379e6465 +data8 0x3fcfb2afa158b8a0, 0x3cce0ccd9f829985 +data8 0x885252ff21146108, 0xf810394699fe0e8e +data8 0x3fcff4b77e97f3e0, 0x3c9b30faa7a4c703 +data8 0x88765fb6dceebbb3, 0xf7ef730f865f6df0 +data8 0x3fd01b6406332540, 0x3cdc5772c9e0b9bd +data8 0x88ad1f69be2cc730, 0xf7bdc59bc9cfbd97 +data8 0x3fd04cf8ad203480, 0x3caeef44fe21a74a +data8 0x88f763f70ae2245e, 0xf77a91c868a9c54e +data8 0x3fd08f23ce0162a0, 0x3cd6290ab3fe5889 +data8 0x89431fc7bc0c2910, 0xf73642973c91298e +data8 0x3fd0d1610f0c1ec0, 0x3cc67401a01f08cf +data8 0x8990573407c7738e, 0xf6f0d71d1d7a2dd6 +data8 0x3fd113b0c65d88c0, 0x3cc7aa4020fe546f +data8 0x89df0eb108594653, 0xf6aa4e6a05cfdef2 +data8 0x3fd156134ada6fe0, 0x3cc87369da09600c +data8 0x8a2f4ad16e0ed78a, 0xf662a78900c35249 +data8 0x3fd19888f43427a0, 0x3cc62b220f38e49c +data8 0x8a811046373e0819, 0xf619e180181d97cc +data8 0x3fd1db121aed7720, 0x3ca3ede7490b52f4 +data8 0x8ad463df6ea0fa2c, 0xf5cffb504190f9a2 +data8 0x3fd21daf185fa360, 0x3caafad98c1d6c1b +data8 0x8b294a8cf0488daf, 0xf584f3f54b8604e6 +data8 0x3fd2606046bf95a0, 0x3cdb2d704eeb08fa +data8 0x8b7fc95f35647757, 0xf538ca65c960b582 +data8 0x3fd2a32601231ec0, 0x3cc661619fa2f126 +data8 0x8bd7e588272276f8, 0xf4eb7d92ff39fccb +data8 0x3fd2e600a3865760, 0x3c8a2a36a99aca4a +data8 0x8c31a45bf8e9255e, 0xf49d0c68cd09b689 +data8 0x3fd328f08ad12000, 0x3cb9efaf1d7ab552 +data8 0x8c8d0b520a35eb18, 0xf44d75cd993cfad2 +data8 0x3fd36bf614dcc040, 0x3ccacbb590bef70d +data8 0x8cea2005d068f23d, 0xf3fcb8a23ab4942b +data8 0x3fd3af11a079a6c0, 0x3cd9775872cf037d +data8 0x8d48e837c8cd5027, 0xf3aad3c1e2273908 +data8 0x3fd3f2438d754b40, 0x3ca03304f667109a +data8 0x8da969ce732f3ac7, 0xf357c60202e2fd7e +data8 0x3fd4358c3ca032e0, 0x3caecf2504ff1a9d +data8 0x8e0baad75555e361, 0xf3038e323ae9463a +data8 0x3fd478ec0fd419c0, 0x3cc64bdc3d703971 +data8 0x8e6fb18807ba877e, 0xf2ae2b1c3a6057f7 +data8 0x3fd4bc6369fa40e0, 0x3cbb7122ec245cf2 +data8 0x8ed5843f4bda74d5, 0xf2579b83aa556f0c +data8 0x3fd4fff2af11e2c0, 0x3c9cfa2dc792d394 +data8 0x8f3d29862c861fef, 0xf1ffde2612ca1909 +data8 0x3fd5439a4436d000, 0x3cc38d46d310526b +data8 0x8fa6a81128940b2d, 0xf1a6f1bac0075669 +data8 0x3fd5875a8fa83520, 0x3cd8bf59b8153f8a +data8 0x901206c1686317a6, 0xf14cd4f2a730d480 +data8 0x3fd5cb33f8cf8ac0, 0x3c9502b5c4d0e431 +data8 0x907f4ca5fe9cf739, 0xf0f186784a125726 +data8 0x3fd60f26e847b120, 0x3cc8a1a5e0acaa33 +data8 0x90ee80fd34aeda5e, 0xf09504ef9a212f18 +data8 0x3fd65333c7e43aa0, 0x3cae5b029cb1f26e +data8 0x915fab35e37421c6, 0xf0374ef5daab5c45 +data8 0x3fd6975b02b8e360, 0x3cd5aa1c280c45e6 +data8 0x91d2d2f0d894d73c, 0xefd86321822dbb51 +data8 0x3fd6db9d05213b20, 0x3cbecf2c093ccd8b +data8 0x9248000249200009, 0xef7840021aca5a72 +data8 0x3fd71ffa3cc87fc0, 0x3cb8d273f08d00d9 +data8 0x92bf3a7351f081d2, 0xef16e42021d7cbd5 +data8 0x3fd7647318b1ad20, 0x3cbce099d79cdc46 +data8 0x93388a8386725713, 0xeeb44dfce6820283 +data8 0x3fd7a908093fc1e0, 0x3ccb033ec17a30d9 +data8 0x93b3f8aa8e653812, 0xee507c126774fa45 +data8 0x3fd7edb9803e3c20, 0x3cc10aedb48671eb +data8 0x94318d99d341ade4, 0xedeb6cd32f891afb +data8 0x3fd83287f0e9cf80, 0x3c994c0c1505cd2a +data8 0x94b1523e3dedc630, 0xed851eaa3168f43c +data8 0x3fd87773cff956e0, 0x3cda3b7bce6a6b16 +data8 0x95334fc20577563f, 0xed1d8ffaa2279669 +data8 0x3fd8bc7d93a70440, 0x3cd4922edc792ce2 +data8 0x95b78f8e8f92f274, 0xecb4bf1fd2be72da +data8 0x3fd901a5b3b9cf40, 0x3cd3fea1b00f9d0d +data8 0x963e1b4e63a87c3f, 0xec4aaa6d08694cc1 +data8 0x3fd946eca98f2700, 0x3cdba4032d968ff1 +data8 0x96c6fcef314074fc, 0xebdf502d53d65fea +data8 0x3fd98c52f024e800, 0x3cbe7be1ab8c95c9 +data8 0x97523ea3eab028b2, 0xeb72aea36720793e +data8 0x3fd9d1d904239860, 0x3cd72d08a6a22b70 +data8 0x97dfeae6f4ee4a9a, 0xeb04c4096a884e94 +data8 0x3fda177f63e8ef00, 0x3cd818c3c1ebfac7 +data8 0x98700c7c6d85d119, 0xea958e90cfe1efd7 +data8 0x3fda5d468f92a540, 0x3cdf45fbfaa080fe +data8 0x9902ae7487a9caa1, 0xea250c6224aab21a +data8 0x3fdaa32f090998e0, 0x3cd715a9353cede4 +data8 0x9997dc2e017a9550, 0xe9b33b9ce2bb7638 +data8 0x3fdae939540d3f00, 0x3cc545c014943439 +data8 0x9a2fa158b29b649b, 0xe9401a573f8aa706 +data8 0x3fdb2f65f63f6c60, 0x3cd4a63c2f2ca8e2 +data8 0x9aca09f835466186, 0xe8cba69df9f0bf35 +data8 0x3fdb75b5773075e0, 0x3cda310ce1b217ec +data8 0x9b672266ab1e0136, 0xe855de74266193d4 +data8 0x3fdbbc28606babc0, 0x3cdc84b75cca6c44 +data8 0x9c06f7579f0b7bd5, 0xe7debfd2f98c060b +data8 0x3fdc02bf3d843420, 0x3cd225d967ffb922 +data8 0x9ca995db058cabdc, 0xe76648a991511c6e +data8 0x3fdc497a9c224780, 0x3cde08101c5b825b +data8 0x9d4f0b605ce71e88, 0xe6ec76dcbc02d9a7 +data8 0x3fdc905b0c10d420, 0x3cb1abbaa3edf120 +data8 0x9df765b9eecad5e6, 0xe6714846bdda7318 +data8 0x3fdcd7611f4b8a00, 0x3cbf6217ae80aadf +data8 0x9ea2b320350540fe, 0xe5f4bab71494cd6b +data8 0x3fdd1e8d6a0d56c0, 0x3cb726e048cc235c +data8 0x9f51023562fc5676, 0xe576cbf239235ecb +data8 0x3fdd65e082df5260, 0x3cd9e66872bd5250 +data8 0xa002620915c2a2f6, 0xe4f779b15f5ec5a7 +data8 0x3fddad5b02a82420, 0x3c89743b0b57534b +data8 0xa0b6e21c2caf9992, 0xe476c1a233a7873e +data8 0x3fddf4fd84bbe160, 0x3cbf7adea9ee3338 +data8 0xa16e9264cc83a6b2, 0xe3f4a16696608191 +data8 0x3fde3cc8a6ec6ee0, 0x3cce46f5a51f49c6 +data8 0xa22983528f3d8d49, 0xe3711694552da8a8 +data8 0x3fde84bd099a6600, 0x3cdc78f6490a2d31 +data8 0xa2e7c5d2e2e69460, 0xe2ec1eb4e1e0a5fb +data8 0x3fdeccdb4fc685c0, 0x3cdd3aedb56a4825 +data8 0xa3a96b5599bd2532, 0xe265b74506fbe1c9 +data8 0x3fdf15241f23b3e0, 0x3cd440f3c6d65f65 +data8 0xa46e85d1ae49d7de, 0xe1ddddb499b3606f +data8 0x3fdf5d98202994a0, 0x3cd6c44bd3fb745a +data8 0xa53727ca3e11b99e, 0xe1548f662951b00d +data8 0x3fdfa637fe27bf60, 0x3ca8ad1cd33054dd +data8 0xa6036453bdc20186, 0xe0c9c9aeabe5e481 +data8 0x3fdfef0467599580, 0x3cc0f1ac0685d78a +data8 0xa6d34f1969dda338, 0xe03d89d5281e4f81 +data8 0x3fe01bff067d6220, 0x3cc0731e8a9ef057 +data8 0xa7a6fc62f7246ff3, 0xdfafcd125c323f54 +data8 0x3fe04092d1ae3b40, 0x3ccabda24b59906d +data8 0xa87e811a861df9b9, 0xdf20909061bb9760 +data8 0x3fe0653df0fd9fc0, 0x3ce94c8dcc722278 +data8 0xa959f2d2dd687200, 0xde8fd16a4e5f88bd +data8 0x3fe08a00c1cae320, 0x3ce6b888bb60a274 +data8 0xaa3967cdeea58bda, 0xddfd8cabd1240d22 +data8 0x3fe0aedba3221c00, 0x3ced5941cd486e46 +data8 0xab904fd587263c84, 0xdd1f4472e1cf64ed +data8 0x3fe0e651e85229c0, 0x3cdb6701042299b1 +data8 0xad686d44dd5a74bb, 0xdbf173e1f6b46e92 +data8 0x3fe1309cbf4cdb20, 0x3cbf1be7bb3f0ec5 +data8 0xaf524e15640ebee4, 0xdabd54896f1029f6 +data8 0x3fe17b4ee1641300, 0x3ce81dd055b792f1 +data8 0xb14eca24ef7db3fa, 0xd982cb9ae2f47e41 +data8 0x3fe1c66b9ffd6660, 0x3cd98ea31eb5ddc7 +data8 0xb35ec807669920ce, 0xd841bd1b8291d0b6 +data8 0x3fe211f66db3a5a0, 0x3ca480c35a27b4a2 +data8 0xb5833e4755e04dd1, 0xd6fa0bd3150b6930 +data8 0x3fe25df2e05b6c40, 0x3ca4bc324287a351 +data8 0xb7bd34c8000b7bd3, 0xd5ab9939a7d23aa1 +data8 0x3fe2aa64b32f7780, 0x3cba67314933077c +data8 0xba0dc64d126cc135, 0xd4564563ce924481 +data8 0x3fe2f74fc9289ac0, 0x3cec1a1dc0efc5ec +data8 0xbc76222cbbfa74a6, 0xd2f9eeed501125a8 +data8 0x3fe344b82f859ac0, 0x3ceeef218de413ac +data8 0xbef78e31985291a9, 0xd19672e2182f78be +data8 0x3fe392a22087b7e0, 0x3cd2619ba201204c +data8 0xc19368b2b0629572, 0xd02baca5427e436a +data8 0x3fe3e11206694520, 0x3cb5d0b3143fe689 +data8 0xc44b2ae8c6733e51, 0xceb975d60b6eae5d +data8 0x3fe4300c7e945020, 0x3cbd367143da6582 +data8 0xc7206b894212dfef, 0xcd3fa6326ff0ac9a +data8 0x3fe47f965d201d60, 0x3ce797c7a4ec1d63 +data8 0xca14e1b0622de526, 0xcbbe13773c3c5338 +data8 0x3fe4cfb4b09d1a20, 0x3cedfadb5347143c +data8 0xcd2a6825eae65f82, 0xca34913d425a5ae9 +data8 0x3fe5206cc637e000, 0x3ce2798b38e54193 +data8 0xd06301095e1351ee, 0xc8a2f0d3679c08c0 +data8 0x3fe571c42e3d0be0, 0x3ccd7cb9c6c2ca68 +data8 0xd3c0d9f50057adda, 0xc70901152d59d16b +data8 0x3fe5c3c0c108f940, 0x3ceb6c13563180ab +data8 0xd74650a98cc14789, 0xc5668e3d4cbf8828 +data8 0x3fe61668a46ffa80, 0x3caa9092e9e3c0e5 +data8 0xdaf5f8579dcc8f8f, 0xc3bb61b3eed42d02 +data8 0x3fe669c251ad69e0, 0x3cccf896ef3b4fee +data8 0xded29f9f9a6171b4, 0xc20741d7f8e8e8af +data8 0x3fe6bdd49bea05c0, 0x3cdc6b29937c575d +data8 0xe2df5765854ccdb0, 0xc049f1c2d1b8014b +data8 0x3fe712a6b76c6e80, 0x3ce1ddc6f2922321 +data8 0xe71f7a9b94fcb4c3, 0xbe833105ec291e91 +data8 0x3fe76840418978a0, 0x3ccda46e85432c3d +data8 0xeb96b72d3374b91e, 0xbcb2bb61493b28b3 +data8 0x3fe7bea9496d5a40, 0x3ce37b42ec6e17d3 +data8 0xf049183c3f53c39b, 0xbad848720223d3a8 +data8 0x3fe815ea59dab0a0, 0x3cb03ad41bfc415b +data8 0xf53b11ec7f415f15, 0xb8f38b57c53c9c48 +data8 0x3fe86e0c84010760, 0x3cc03bfcfb17fe1f +data8 0xfa718f05adbf2c33, 0xb70432500286b185 +data8 0x3fe8c7196b9225c0, 0x3ced99fcc6866ba9 +data8 0xfff200c3f5489608, 0xb509e6454dca33cc +data8 0x3fe9211b54441080, 0x3cb789cb53515688 +// The following table entries are not used +//data8 0x82e138a0fac48700, 0xb3044a513a8e6132 +//data8 0x3fe97c1d30f5b7c0, 0x3ce1eb765612d1d0 +//data8 0x85f4cc7fc670d021, 0xb0f2fb2ea6cbbc88 +//data8 0x3fe9d82ab4b5fde0, 0x3ced3fe6f27e8039 +//data8 0x89377c1387d5b908, 0xaed58e9a09014d5c +//data8 0x3fea355065f87fa0, 0x3cbef481d25f5b58 +//data8 0x8cad7a2c98dec333, 0xacab929ce114d451 +//data8 0x3fea939bb451e2a0, 0x3c8e92b4fbf4560f +//data8 0x905b7dfc99583025, 0xaa748cc0dbbbc0ec +//data8 0x3feaf31b11270220, 0x3cdced8c61bd7bd5 +//data8 0x9446d8191f80dd42, 0xa82ff92687235baf +//data8 0x3feb53de0bcffc20, 0x3cbe1722fb47509e +//data8 0x98758ba086e4000a, 0xa5dd497a9c184f58 +//data8 0x3febb5f571cb0560, 0x3ce0c7774329a613 +//data8 0x9cee6c7bf18e4e24, 0xa37be3c3cd1de51b +//data8 0x3fec197373bc7be0, 0x3ce08ebdb55c3177 +//data8 0xa1b944000a1b9440, 0xa10b2101b4f27e03 +//data8 0x3fec7e6bd023da60, 0x3ce5fc5fd4995959 +//data8 0xa6defd8ba04d3e38, 0x9e8a4b93cad088ec +//data8 0x3fece4f404e29b20, 0x3cea3413401132b5 +//data8 0xac69dd408a10c62d, 0x9bf89d5d17ddae8c +//data8 0x3fed4d2388f63600, 0x3cd5a7fb0d1d4276 +//data8 0xb265c39cbd80f97a, 0x99553d969fec7beb +//data8 0x3fedb714101e0a00, 0x3cdbda21f01193f2 +//data8 0xb8e081a16ae4ae73, 0x969f3e3ed2a0516c +//data8 0x3fee22e1da97bb00, 0x3ce7231177f85f71 +//data8 0xbfea427678945732, 0x93d5990f9ee787af +//data8 0x3fee90ac13b18220, 0x3ce3c8a5453363a5 +//data8 0xc79611399b8c90c5, 0x90f72bde80febc31 +//data8 0x3fef009542b712e0, 0x3ce218fd79e8cb56 +//data8 0xcffa8425040624d7, 0x8e02b4418574ebed +//data8 0x3fef72c3d2c57520, 0x3cd32a717f82203f +//data8 0xd93299cddcf9cf23, 0x8af6ca48e9c44024 +//data8 0x3fefe762b77744c0, 0x3ce53478a6bbcf94 +//data8 0xe35eda760af69ad9, 0x87d1da0d7f45678b +//data8 0x3ff02f511b223c00, 0x3ced6e11782c28fc +//data8 0xeea6d733421da0a6, 0x84921bbe64ae029a +//data8 0x3ff06c5c6f8ce9c0, 0x3ce71fc71c1ffc02 +//data8 0xfb3b2c73fc6195cc, 0x813589ba3a5651b6 +//data8 0x3ff0aaf2613700a0, 0x3cf2a72d2fd94ef3 +//data8 0x84ac1fcec4203245, 0xfb73a828893df19e +//data8 0x3ff0eb367c3fd600, 0x3cf8054c158610de +//data8 0x8ca50621110c60e6, 0xf438a14c158d867c +//data8 0x3ff12d51caa6b580, 0x3ce6bce9748739b6 +//data8 0x95b8c2062d6f8161, 0xecb3ccdd37b369da +//data8 0x3ff1717418520340, 0x3ca5c2732533177c +//data8 0xa0262917caab4ad1, 0xe4dde4ddc81fd119 +//data8 0x3ff1b7d59dd40ba0, 0x3cc4c7c98e870ff5 +//data8 0xac402c688b72f3f4, 0xdcae469be46d4c8d +//data8 0x3ff200b93cc5a540, 0x3c8dd6dc1bfe865a +//data8 0xba76968b9eabd9ab, 0xd41a8f3df1115f7f +//data8 0x3ff24c6f8f6affa0, 0x3cf1acb6d2a7eff7 +//data8 0xcb63c87c23a71dc5, 0xcb161074c17f54ec +//data8 0x3ff29b5b338b7c80, 0x3ce9b5845f6ec746 +//data8 0xdfe323b8653af367, 0xc19107d99ab27e42 +//data8 0x3ff2edf6fac7f5a0, 0x3cf77f961925fa02 +//data8 0xf93746caaba3e1f1, 0xb777744a9df03bff +//data8 0x3ff344df237486c0, 0x3cf6ddf5f6ddda43 +//data8 0x8ca77052f6c340f0, 0xacaf476f13806648 +//data8 0x3ff3a0dfa4bb4ae0, 0x3cfee01bbd761bff +//data8 0xa1a48604a81d5c62, 0xa11575d30c0aae50 +//data8 0x3ff4030b73c55360, 0x3cf1cf0e0324d37c +//data8 0xbe45074b05579024, 0x9478e362a07dd287 +//data8 0x3ff46ce4c738c4e0, 0x3ce3179555367d12 +//data8 0xe7a08b5693d214ec, 0x8690e3575b8a7c3b +//data8 0x3ff4e0a887c40a80, 0x3cfbd5d46bfefe69 +//data8 0x94503d69396d91c7, 0xedd2ce885ff04028 +//data8 0x3ff561ebd9c18cc0, 0x3cf331bd176b233b +//data8 0xced1d96c5bb209e6, 0xc965278083808702 +//data8 0x3ff5f71d7ff42c80, 0x3ce3301cc0b5a48c +//data8 0xabac2cee0fc24e20, 0x9c4eb1136094cbbd +//data8 0x3ff6ae4c63222720, 0x3cf5ff46874ee51e +//data8 0x8040201008040201, 0xb4d7ac4d9acb1bf4 +//data8 0x3ff7b7d33b928c40, 0x3cfacdee584023bb +LOCAL_OBJECT_END(T_table) + + + +.align 16 + +LOCAL_OBJECT_START(poly_coeffs) + // C_3 +data8 0xaaaaaaaaaaaaaaab, 0x0000000000003ffc + // C_5 +data8 0x999999999999999a, 0x0000000000003ffb + // C_7, C_9 +data8 0x3fa6db6db6db6db7, 0x3f9f1c71c71c71c8 + // pi/2 (low, high) +data8 0x3C91A62633145C07, 0x3FF921FB54442D18 + // C_11, C_13 +data8 0x3f96e8ba2e8ba2e9, 0x3f91c4ec4ec4ec4e + // C_15, C_17 +data8 0x3f8c99999999999a, 0x3f87a87878787223 + // pi (low, high) +data8 0x3CA1A62633145C07, 0x400921FB54442D18 +LOCAL_OBJECT_END(poly_coeffs) + + +R_DBL_S = r21 +R_EXP0 = r22 +R_EXP = r15 +R_SGNMASK = r23 +R_TMP = r24 +R_TMP2 = r25 +R_INDEX = r26 +R_TMP3 = r27 +R_TMP03 = r27 +R_TMP4 = r28 +R_TMP5 = r23 +R_TMP6 = r22 +R_TMP7 = r21 +R_T = r29 +R_BIAS = r20 + +F_T = f6 +F_1S2 = f7 +F_1S2_S = f9 +F_INV_1T2 = f10 +F_SQRT_1T2 = f11 +F_S2T2 = f12 +F_X = f13 +F_D = f14 +F_2M64 = f15 + +F_CS2 = f32 +F_CS3 = f33 +F_CS4 = f34 +F_CS5 = f35 +F_CS6 = f36 +F_CS7 = f37 +F_CS8 = f38 +F_CS9 = f39 +F_S23 = f40 +F_S45 = f41 +F_S67 = f42 +F_S89 = f43 +F_S25 = f44 +F_S69 = f45 +F_S29 = f46 +F_X2 = f47 +F_X4 = f48 +F_TSQRT = f49 +F_DTX = f50 +F_R = f51 +F_R2 = f52 +F_R3 = f53 +F_R4 = f54 + +F_C3 = f55 +F_C5 = f56 +F_C7 = f57 +F_C9 = f58 +F_P79 = f59 +F_P35 = f60 +F_P39 = f61 + +F_ATHI = f62 +F_ATLO = f63 + +F_T1 = f64 +F_Y = f65 +F_Y2 = f66 +F_ANDMASK = f67 +F_ORMASK = f68 +F_S = f69 +F_05 = f70 +F_SQRT_1S2 = f71 +F_DS = f72 +F_Z = f73 +F_1T2 = f74 +F_DZ = f75 +F_ZE = f76 +F_YZ = f77 +F_Y1S2 = f78 +F_Y1S2X = f79 +F_1X = f80 +F_ST = f81 +F_1T2_ST = f82 +F_TSS = f83 +F_Y1S2X2 = f84 +F_DZ_TERM = f85 +F_DTS = f86 +F_DS2X = f87 +F_T2 = f88 +F_ZY1S2S = f89 +F_Y1S2_1X = f90 +F_TS = f91 +F_PI2_LO = f92 +F_PI2_HI = f93 +F_S19 = f94 +F_INV1T2_2 = f95 +F_CORR = f96 +F_DZ0 = f97 + +F_C11 = f98 +F_C13 = f99 +F_C15 = f100 +F_C17 = f101 +F_P1113 = f102 +F_P1517 = f103 +F_P1117 = f104 +F_P317 = f105 +F_R8 = f106 +F_HI = f107 +F_1S2_HI = f108 +F_DS2 = f109 +F_Y2_2 = f110 +//F_S2 = f111 +//F_S_DS2 = f112 +F_S_1S2S = f113 +F_XL = f114 +F_2M128 = f115 +F_1AS = f116 +F_AS = f117 + + + +.section .text +GLOBAL_LIBM_ENTRY(acosl) + +{.mfi + // get exponent, mantissa (rounded to double precision) of s + getf.d R_DBL_S = f8 + // 1-s^2 + fnma.s1 F_1S2 = f8, f8, f1 + // r2 = pointer to T_table + addl r2 = @ltoff(T_table), gp +} + +{.mfi + // sign mask + mov R_SGNMASK = 0x20000 + nop.f 0 + // bias-63-1 + mov R_TMP03 = 0xffff-64;; +} + + +{.mfi + // get exponent of s + getf.exp R_EXP = f8 + nop.f 0 + // R_TMP4 = 2^45 + shl R_TMP4 = R_SGNMASK, 45-17 +} + +{.mlx + // load bias-4 + mov R_TMP = 0xffff-4 + // load RU(sqrt(2)/2) to integer register (in double format, shifted left by 1) + movl R_TMP2 = 0x7fcd413cccfe779a;; +} + + +{.mfi + // load 2^{-64} in FP register + setf.exp F_2M64 = R_TMP03 + nop.f 0 + // index = (0x7-exponent)|b1 b2.. b6 + extr.u R_INDEX = R_DBL_S, 46, 9 +} + +{.mfi + // get t = sign|exponent|b1 b2.. b6 1 x.. x + or R_T = R_DBL_S, R_TMP4 + nop.f 0 + // R_TMP4 = 2^45-1 + sub R_TMP4 = R_TMP4, r0, 1;; +} + + +{.mfi + // get t = sign|exponent|b1 b2.. b6 1 0.. 0 + andcm R_T = R_T, R_TMP4 + nop.f 0 + // eliminate sign from R_DBL_S (shift left by 1) + shl R_TMP3 = R_DBL_S, 1 +} + +{.mfi + // R_BIAS = 3*2^6 + mov R_BIAS = 0xc0 + nop.f 0 + // eliminate sign from R_EXP + andcm R_EXP0 = R_EXP, R_SGNMASK;; +} + + + +{.mfi + // load start address for T_table + ld8 r2 = [r2] + nop.f 0 + // p8 = 1 if |s|> = sqrt(2)/2 + cmp.geu p8, p0 = R_TMP3, R_TMP2 +} + +{.mlx + // p7 = 1 if |s|<2^{-4} (exponent of s = sqrt(2)/2, take alternate path + (p8) br.cond.sptk LARGE_S +} + +{.mlx + // index = (4-exponent)|b1 b2.. b6 + sub R_INDEX = R_INDEX, R_BIAS + // sqrt coefficient cs9 = 55*13/128 + movl R_TMP = 0x40b2c000;; +} + + +{.mfi + // sqrt coefficient cs8 = -33*13/128 + setf.s F_CS8 = R_TMP2 + nop.f 0 + // shift R_INDEX by 5 + shl R_INDEX = R_INDEX, 5 +} + +{.mfi + // sqrt coefficient cs3 = 0.5 (set exponent = bias-1) + mov R_TMP4 = 0xffff - 1 + nop.f 0 + // sqrt coefficient cs6 = -21/16 + mov R_TMP6 = 0xbfa8;; +} + + +{.mlx + // table index + add r2 = r2, R_INDEX + // sqrt coefficient cs7 = 33/16 + movl R_TMP2 = 0x40040000;; +} + + +{.mmi + // load cs9 = 55*13/128 + setf.s F_CS9 = R_TMP + // sqrt coefficient cs5 = 7/8 + mov R_TMP3 = 0x3f60 + // sqrt coefficient cs6 = 21/16 + shl R_TMP6 = R_TMP6, 16;; +} + + +{.mmi + // load significand of 1/(1-t^2) + ldf8 F_INV_1T2 = [r2], 8 + // sqrt coefficient cs7 = 33/16 + setf.s F_CS7 = R_TMP2 + // sqrt coefficient cs4 = -5/8 + mov R_TMP5 = 0xbf20;; +} + + +{.mmi + // load significand of sqrt(1-t^2) + ldf8 F_SQRT_1T2 = [r2], 8 + // sqrt coefficient cs6 = 21/16 + setf.s F_CS6 = R_TMP6 + // sqrt coefficient cs5 = 7/8 + shl R_TMP3 = R_TMP3, 16;; +} + + +{.mmi + // sqrt coefficient cs3 = 0.5 (set exponent = bias-1) + setf.exp F_CS3 = R_TMP4 + // r3 = pointer to polynomial coefficients + addl r3 = @ltoff(poly_coeffs), gp + // sqrt coefficient cs4 = -5/8 + shl R_TMP5 = R_TMP5, 16;; +} + + +{.mfi + // sqrt coefficient cs5 = 7/8 + setf.s F_CS5 = R_TMP3 + // d = s-t + fms.s1 F_D = f8, f1, F_T + // set p6 = 1 if s<0, p11 = 1 if s> = 0 + cmp.ge p6, p11 = R_EXP, R_DBL_S +} + +{.mfi + // r3 = load start address to polynomial coefficients + ld8 r3 = [r3] + // s+t + fma.s1 F_S2T2 = f8, f1, F_T + nop.i 0;; +} + + +{.mfi + // sqrt coefficient cs4 = -5/8 + setf.s F_CS4 = R_TMP5 + // s^2-t^2 + fma.s1 F_S2T2 = F_S2T2, F_D, f0 + nop.i 0;; +} + + +{.mfi + // load C3 + ldfe F_C3 = [r3], 16 + // 0.5/(1-t^2) = 2^{-64}*(2^63/(1-t^2)) + fma.s1 F_INV_1T2 = F_INV_1T2, F_2M64, f0 + nop.i 0;; +} + +{.mfi + // load C_5 + ldfe F_C5 = [r3], 16 + // set correct exponent for sqrt(1-t^2) + fma.s1 F_SQRT_1T2 = F_SQRT_1T2, F_2M64, f0 + nop.i 0;; +} + + +{.mfi + // load C_7, C_9 + ldfpd F_C7, F_C9 = [r3], 16 + // x = -(s^2-t^2)/(1-t^2)/2 + fnma.s1 F_X = F_INV_1T2, F_S2T2, f0 + nop.i 0;; +} + + +{.mmf + // load asin(t)_high, asin(t)_low + ldfpd F_ATHI, F_ATLO = [r2] + // load pi/2 + ldfpd F_PI2_LO, F_PI2_HI = [r3] + // t*sqrt(1-t^2) + fma.s1 F_TSQRT = F_T, F_SQRT_1T2, f0;; +} + + +{.mfi + nop.m 0 + // cs9*x+cs8 + fma.s1 F_S89 = F_CS9, F_X, F_CS8 + nop.i 0 +} + +{.mfi + nop.m 0 + // cs7*x+cs6 + fma.s1 F_S67 = F_CS7, F_X, F_CS6 + nop.i 0;; +} + +{.mfi + nop.m 0 + // cs5*x+cs4 + fma.s1 F_S45 = F_CS5, F_X, F_CS4 + nop.i 0 +} + +{.mfi + nop.m 0 + // x*x + fma.s1 F_X2 = F_X, F_X, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // (s-t)-t*x + fnma.s1 F_DTX = F_T, F_X, F_D + nop.i 0 +} + +{.mfi + nop.m 0 + // cs3*x+cs2 (cs2 = -0.5 = -cs3) + fms.s1 F_S23 = F_CS3, F_X, F_CS3 + nop.i 0;; +} + +{.mfi + nop.m 0 + // if sign is negative, negate table values: asin(t)_low + (p6) fnma.s1 F_ATLO = F_ATLO, f1, f0 + nop.i 0 +} + +{.mfi + nop.m 0 + // if sign is negative, negate table values: asin(t)_high + (p6) fnma.s1 F_ATHI = F_ATHI, f1, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // cs9*x^3+cs8*x^2+cs7*x+cs6 + fma.s1 F_S69 = F_S89, F_X2, F_S67 + nop.i 0 +} + +{.mfi + nop.m 0 + // x^4 + fma.s1 F_X4 = F_X2, F_X2, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // t*sqrt(1-t^2)*x^2 + fma.s1 F_TSQRT = F_TSQRT, F_X2, f0 + nop.i 0 +} + +{.mfi + nop.m 0 + // cs5*x^3+cs4*x^2+cs3*x+cs2 + fma.s1 F_S25 = F_S45, F_X2, F_S23 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // ((s-t)-t*x)*sqrt(1-t^2) + fma.s1 F_DTX = F_DTX, F_SQRT_1T2, f0 + nop.i 0;; +} + +{.mfi + nop.m 0 + // (pi/2)_high - asin(t)_high + fnma.s1 F_ATHI = F_ATHI, f1, F_PI2_HI + nop.i 0 +} + +{.mfi + nop.m 0 + // asin(t)_low - (pi/2)_low + fnma.s1 F_ATLO = F_PI2_LO, f1, F_ATLO + nop.i 0;; +} + + +{.mfi + nop.m 0 + // PS29 = cs9*x^7+..+cs5*x^3+cs4*x^2+cs3*x+cs2 + fma.s1 F_S29 = F_S69, F_X4, F_S25 + nop.i 0;; +} + + + +{.mfi + nop.m 0 + // R = ((s-t)-t*x)*sqrt(1-t^2)-t*sqrt(1-t^2)*x^2*PS29 + fnma.s1 F_R = F_S29, F_TSQRT, F_DTX + nop.i 0;; +} + + +{.mfi + nop.m 0 + // R^2 + fma.s1 F_R2 = F_R, F_R, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // c7+c9*R^2 + fma.s1 F_P79 = F_C9, F_R2, F_C7 + nop.i 0 +} + +{.mfi + nop.m 0 + // c3+c5*R^2 + fma.s1 F_P35 = F_C5, F_R2, F_C3 + nop.i 0;; +} + +{.mfi + nop.m 0 + // R^3 + fma.s1 F_R4 = F_R2, F_R2, f0 + nop.i 0;; +} + +{.mfi + nop.m 0 + // R^3 + fma.s1 F_R3 = F_R2, F_R, f0 + nop.i 0;; +} + + + +{.mfi + nop.m 0 + // c3+c5*R^2+c7*R^4+c9*R^6 + fma.s1 F_P39 = F_P79, F_R4, F_P35 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // asin(t)_low+R^3*(c3+c5*R^2+c7*R^4+c9*R^6) + fma.s1 F_P39 = F_P39, F_R3, F_ATLO + nop.i 0;; +} + + +{.mfi + nop.m 0 + // R+asin(t)_low+R^3*(c3+c5*R^2+c7*R^4+c9*R^6) + fma.s1 F_P39 = F_P39, f1, F_R + nop.i 0;; +} + + +{.mfb + nop.m 0 + // result = (pi/2)-asin(t)_high+R+asin(t)_low+R^3*(c3+c5*R^2+c7*R^4+c9*R^6) + fnma.s0 f8 = F_P39, f1, F_ATHI + // return + br.ret.sptk b0;; +} + + + + +LARGE_S: + +{.mfi + // bias-1 + mov R_TMP3 = 0xffff - 1 + // y ~ 1/sqrt(1-s^2) + frsqrta.s1 F_Y, p7 = F_1S2 + // c9 = 55*13*17/128 + mov R_TMP4 = 0x10af7b +} + +{.mlx + // c8 = -33*13*15/128 + mov R_TMP5 = 0x184923 + movl R_TMP2 = 0xff00000000000000;; +} + +{.mfi + // set p6 = 1 if s<0, p11 = 1 if s>0 + cmp.ge p6, p11 = R_EXP, R_DBL_S + // 1-s^2 + fnma.s1 F_1S2 = f8, f8, f1 + // set p9 = 1 + cmp.eq p9, p0 = r0, r0;; +} + + +{.mfi + // load 0.5 + setf.exp F_05 = R_TMP3 + // (1-s^2) rounded to single precision + fnma.s.s1 F_1S2_S = f8, f8, f1 + // c9 = 55*13*17/128 + shl R_TMP4 = R_TMP4, 10 +} + +{.mlx + // AND mask for getting t ~ sqrt(1-s^2) + setf.sig F_ANDMASK = R_TMP2 + // OR mask + movl R_TMP2 = 0x0100000000000000;; +} + +.pred.rel "mutex", p6, p11 +{.mfi + nop.m 0 + // 1-|s| + (p6) fma.s1 F_1AS = f8, f1, f1 + nop.i 0 +} + +{.mfi + nop.m 0 + // 1-|s| + (p11) fnma.s1 F_1AS = f8, f1, f1 + nop.i 0;; +} + + +{.mfi + // c9 = 55*13*17/128 + setf.s F_CS9 = R_TMP4 + // |s| + (p6) fnma.s1 F_AS = f8, f1, f0 + // c8 = -33*13*15/128 + shl R_TMP5 = R_TMP5, 11 +} + +{.mfi + // c7 = 33*13/16 + mov R_TMP4 = 0x41d68 + // |s| + (p11) fma.s1 F_AS = f8, f1, f0 + nop.i 0;; +} + + +{.mfi + setf.sig F_ORMASK = R_TMP2 + // y^2 + fma.s1 F_Y2 = F_Y, F_Y, f0 + // c7 = 33*13/16 + shl R_TMP4 = R_TMP4, 12 +} + +{.mfi + // c6 = -33*7/16 + mov R_TMP6 = 0xc1670 + // y' ~ sqrt(1-s^2) + fma.s1 F_T1 = F_Y, F_1S2, f0 + // c5 = 63/8 + mov R_TMP7 = 0x40fc;; +} + + +{.mlx + // load c8 = -33*13*15/128 + setf.s F_CS8 = R_TMP5 + // c4 = -35/8 + movl R_TMP5 = 0xc08c0000;; +} + +{.mfi + // r3 = pointer to polynomial coefficients + addl r3 = @ltoff(poly_coeffs), gp + // 1-s-(1-s^2)_s + fnma.s1 F_DS = F_1S2_S, f1, F_1AS + // p9 = 0 if p7 = 1 (p9 = 1 for special cases only) + (p7) cmp.ne p9, p0 = r0, r0 +} + +{.mlx + // load c7 = 33*13/16 + setf.s F_CS7 = R_TMP4 + // c3 = 5/2 + movl R_TMP4 = 0x40200000;; +} + + +{.mlx + // load c4 = -35/8 + setf.s F_CS4 = R_TMP5 + // c2 = -3/2 + movl R_TMP5 = 0xbfc00000;; +} + + +{.mfi + // load c3 = 5/2 + setf.s F_CS3 = R_TMP4 + // x = (1-s^2)_s*y^2-1 + fms.s1 F_X = F_1S2_S, F_Y2, f1 + // c6 = -33*7/16 + shl R_TMP6 = R_TMP6, 12 +} + +{.mfi + nop.m 0 + // y^2/2 + fma.s1 F_Y2_2 = F_Y2, F_05, f0 + nop.i 0;; +} + + +{.mfi + // load c6 = -33*7/16 + setf.s F_CS6 = R_TMP6 + // eliminate lower bits from y' + fand F_T = F_T1, F_ANDMASK + // c5 = 63/8 + shl R_TMP7 = R_TMP7, 16 +} + + +{.mfb + // r3 = load start address to polynomial coefficients + ld8 r3 = [r3] + // 1-(1-s^2)_s-s^2 + fma.s1 F_DS = F_AS, F_1AS, F_DS + // p9 = 1 if s is a special input (NaN, or |s|> = 1) + (p9) br.cond.spnt acosl_SPECIAL_CASES;; +} + +{.mmf + // get exponent, significand of y' (in single prec.) + getf.s R_TMP = F_T1 + // load c3 = -3/2 + setf.s F_CS2 = R_TMP5 + // y*(1-s^2) + fma.s1 F_Y1S2 = F_Y, F_1S2, f0;; +} + + + +{.mfi + nop.m 0 + // if s<0, set s = -s + (p6) fnma.s1 f8 = f8, f1, f0 + nop.i 0;; +} + + +{.mfi + // load c5 = 63/8 + setf.s F_CS5 = R_TMP7 + // x = (1-s^2)_s*y^2-1+(1-(1-s^2)_s-s^2)*y^2 + fma.s1 F_X = F_DS, F_Y2, F_X + // for t = 2^k*1.b1 b2.., get 7-k|b1.. b6 + extr.u R_INDEX = R_TMP, 17, 9;; +} + + +{.mmi + // index = (4-exponent)|b1 b2.. b6 + sub R_INDEX = R_INDEX, R_BIAS + nop.m 0 + // get exponent of y + shr.u R_TMP2 = R_TMP, 23;; +} + +{.mmi + // load C3 + ldfe F_C3 = [r3], 16 + // set p8 = 1 if y'<2^{-4} + cmp.gt p8, p0 = 0x7b, R_TMP2 + // shift R_INDEX by 5 + shl R_INDEX = R_INDEX, 5;; +} + + +{.mfb + // get table index for sqrt(1-t^2) + add r2 = r2, R_INDEX + // get t = 2^k*1.b1 b2.. b7 1 + for F_T = F_T, F_ORMASK + (p8) br.cond.spnt VERY_LARGE_INPUT;; +} + + + +{.mmf + // load C5 + ldfe F_C5 = [r3], 16 + // load 1/(1-t^2) + ldfp8 F_INV_1T2, F_SQRT_1T2 = [r2], 16 + // x = ((1-s^2)*y^2-1)/2 + fma.s1 F_X = F_X, F_05, f0;; +} + + + +{.mmf + nop.m 0 + // C7, C9 + ldfpd F_C7, F_C9 = [r3], 16 + // set correct exponent for t + fmerge.se F_T = F_T1, F_T;; +} + + + +{.mfi + // get address for loading pi + add r3 = 48, r3 + // c9*x+c8 + fma.s1 F_S89 = F_X, F_CS9, F_CS8 + nop.i 0 +} + +{.mfi + nop.m 0 + // x^2 + fma.s1 F_X2 = F_X, F_X, f0 + nop.i 0;; +} + + +{.mfi + // pi (low, high) + ldfpd F_PI2_LO, F_PI2_HI = [r3] + // y*(1-s^2)*x + fma.s1 F_Y1S2X = F_Y1S2, F_X, f0 + nop.i 0 +} + +{.mfi + nop.m 0 + // c7*x+c6 + fma.s1 F_S67 = F_X, F_CS7, F_CS6 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // 1-x + fnma.s1 F_1X = F_X, f1, f1 + nop.i 0 +} + +{.mfi + nop.m 0 + // c3*x+c2 + fma.s1 F_S23 = F_X, F_CS3, F_CS2 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // 1-t^2 + fnma.s1 F_1T2 = F_T, F_T, f1 + nop.i 0 +} + +{.mfi + // load asin(t)_high, asin(t)_low + ldfpd F_ATHI, F_ATLO = [r2] + // c5*x+c4 + fma.s1 F_S45 = F_X, F_CS5, F_CS4 + nop.i 0;; +} + + + +{.mfi + nop.m 0 + // t*s + fma.s1 F_TS = F_T, f8, f0 + nop.i 0 +} + +{.mfi + nop.m 0 + // 0.5/(1-t^2) + fma.s1 F_INV_1T2 = F_INV_1T2, F_2M64, f0 + nop.i 0;; +} + +{.mfi + nop.m 0 + // z~sqrt(1-t^2), rounded to 24 significant bits + fma.s.s1 F_Z = F_SQRT_1T2, F_2M64, f0 + nop.i 0 +} + +{.mfi + nop.m 0 + // sqrt(1-t^2) + fma.s1 F_SQRT_1T2 = F_SQRT_1T2, F_2M64, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // y*(1-s^2)*x^2 + fma.s1 F_Y1S2X2 = F_Y1S2, F_X2, f0 + nop.i 0 +} + +{.mfi + nop.m 0 + // x^4 + fma.s1 F_X4 = F_X2, F_X2, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // s*t rounded to 24 significant bits + fma.s.s1 F_TSS = F_T, f8, f0 + nop.i 0 +} + +{.mfi + nop.m 0 + // c9*x^3+..+c6 + fma.s1 F_S69 = F_X2, F_S89, F_S67 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // ST = (t^2-1+s^2) rounded to 24 significant bits + fms.s.s1 F_ST = f8, f8, F_1T2 + nop.i 0 +} + +{.mfi + nop.m 0 + // c5*x^3+..+c2 + fma.s1 F_S25 = F_X2, F_S45, F_S23 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // 0.25/(1-t^2) + fma.s1 F_INV1T2_2 = F_05, F_INV_1T2, f0 + nop.i 0 +} + +{.mfi + nop.m 0 + // t*s-sqrt(1-t^2)*(1-s^2)*y + fnma.s1 F_TS = F_Y1S2, F_SQRT_1T2, F_TS + nop.i 0;; +} + + +{.mfi + nop.m 0 + // z*0.5/(1-t^2) + fma.s1 F_ZE = F_INV_1T2, F_SQRT_1T2, f0 + nop.i 0 +} + +{.mfi + nop.m 0 + // z^2+t^2-1 + fms.s1 F_DZ0 = F_Z, F_Z, F_1T2 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // (1-s^2-(1-s^2)_s)*x + fma.s1 F_DS2X = F_X, F_DS, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // t*s-(t*s)_s + fms.s1 F_DTS = F_T, f8, F_TSS + nop.i 0 +} + +{.mfi + nop.m 0 + // c9*x^7+..+c2 + fma.s1 F_S29 = F_X4, F_S69, F_S25 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // y*z + fma.s1 F_YZ = F_Z, F_Y, f0 + nop.i 0 +} + +{.mfi + nop.m 0 + // t^2 + fma.s1 F_T2 = F_T, F_T, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // 1-t^2+ST + fma.s1 F_1T2_ST = F_ST, f1, F_1T2 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // y*(1-s^2)(1-x) + fma.s1 F_Y1S2_1X = F_Y1S2, F_1X, f0 + nop.i 0 +} + +{.mfi + nop.m 0 + // dz ~ sqrt(1-t^2)-z + fma.s1 F_DZ = F_DZ0, F_ZE, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // -1+correction for sqrt(1-t^2)-z + fnma.s1 F_CORR = F_INV1T2_2, F_DZ0, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // (PS29*x^2+x)*y*(1-s^2) + fma.s1 F_S19 = F_Y1S2X2, F_S29, F_Y1S2X + nop.i 0;; +} + +{.mfi + nop.m 0 + // z*y*(1-s^2)_s + fma.s1 F_ZY1S2S = F_YZ, F_1S2_S, f0 + nop.i 0 +} + +{.mfi + nop.m 0 + // s^2-(1-t^2+ST) + fms.s1 F_1T2_ST = f8, f8, F_1T2_ST + nop.i 0;; +} + + +{.mfi + nop.m 0 + // (t*s-(t*s)_s)+z*y*(1-s^2-(1-s^2)_s)*x + fma.s1 F_DTS = F_YZ, F_DS2X, F_DTS + nop.i 0 +} + +{.mfi + nop.m 0 + // dz*y*(1-s^2)*(1-x) + fma.s1 F_DZ_TERM = F_DZ, F_Y1S2_1X, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // R = t*s-sqrt(1-t^2)*(1-s^2)*y+sqrt(1-t^2)*(1-s^2)*y*PS19 + // (used for polynomial evaluation) + fma.s1 F_R = F_S19, F_SQRT_1T2, F_TS + nop.i 0;; +} + + +{.mfi + nop.m 0 + // (PS29*x^2)*y*(1-s^2) + fma.s1 F_S29 = F_Y1S2X2, F_S29, f0 + nop.i 0 +} + +{.mfi + nop.m 0 + // apply correction to dz*y*(1-s^2)*(1-x) + fma.s1 F_DZ_TERM = F_DZ_TERM, F_CORR, F_DZ_TERM + nop.i 0;; +} + + +{.mfi + nop.m 0 + // R^2 + fma.s1 F_R2 = F_R, F_R, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // (t*s-(t*s)_s)+z*y*(1-s^2-(1-s^2)_s)*x+dz*y*(1-s^2)*(1-x) + fma.s1 F_DZ_TERM = F_DZ_TERM, f1, F_DTS + nop.i 0;; +} + + +{.mfi + nop.m 0 + // c7+c9*R^2 + fma.s1 F_P79 = F_C9, F_R2, F_C7 + nop.i 0 +} + +{.mfi + nop.m 0 + // c3+c5*R^2 + fma.s1 F_P35 = F_C5, F_R2, F_C3 + nop.i 0;; +} + +{.mfi + nop.m 0 + // asin(t)_low-(pi)_low (if s<0) + (p6) fms.s1 F_ATLO = F_ATLO, f1, F_PI2_LO + nop.i 0 +} + +{.mfi + nop.m 0 + // R^4 + fma.s1 F_R4 = F_R2, F_R2, f0 + nop.i 0;; +} + +{.mfi + nop.m 0 + // R^3 + fma.s1 F_R3 = F_R2, F_R, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // (t*s)_s-t^2*y*z + fnma.s1 F_TSS = F_T2, F_YZ, F_TSS + nop.i 0 +} + +{.mfi + nop.m 0 + // d(ts)+z*y*d(1-s^2)*x+dz*y*(1-s^2)*(1-x)+z*y*(s^2-1+t^2-ST) + fma.s1 F_DZ_TERM = F_YZ, F_1T2_ST, F_DZ_TERM + nop.i 0;; +} + + +{.mfi + nop.m 0 + // (pi)_hi-asin(t)_hi (if s<0) + (p6) fms.s1 F_ATHI = F_PI2_HI, f1, F_ATHI + nop.i 0 +} + +{.mfi + nop.m 0 + // c3+c5*R^2+c7*R^4+c9*R^6 + fma.s1 F_P39 = F_P79, F_R4, F_P35 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // d(ts)+z*y*d(1-s^2)*x+dz*y*(1-s^2)*(1-x)+z*y*(s^2-1+t^2-ST)+ + // + sqrt(1-t^2)*y*(1-s^2)*x^2*PS29 + fma.s1 F_DZ_TERM = F_SQRT_1T2, F_S29, F_DZ_TERM + nop.i 0;; +} + + +{.mfi + nop.m 0 + // (t*s)_s-t^2*y*z+z*y*ST + fma.s1 F_TSS = F_YZ, F_ST, F_TSS + nop.i 0 +} + +{.mfi + nop.m 0 + // -asin(t)_low+R^3*(c3+c5*R^2+c7*R^4+c9*R^6) + fms.s1 F_P39 = F_P39, F_R3, F_ATLO + nop.i 0;; +} + + +{.mfi + nop.m 0 + // d(ts)+z*y*d(1-s^2)*x+dz*y*(1-s^2)*(1-x)+z*y*(s^2-1+t^2-ST) + + // + sqrt(1-t^2)*y*(1-s^2)*x^2*PS29 + + // - asin(t)_low+R^3*(c3+c5*R^2+c7*R^4+c9*R^6) + fma.s1 F_DZ_TERM = F_P39, f1, F_DZ_TERM + nop.i 0;; +} + + +{.mfi + nop.m 0 + // d(ts)+z*y*d(1-s^2)*x+dz*y*(1-s^2)*(1-x)+z*y*(s^2-1+t^2-ST) + + // + sqrt(1-t^2)*y*(1-s^2)*x^2*PS29 + z*y*(1-s^2)_s*x + + // - asin(t)_low+R^3*(c3+c5*R^2+c7*R^4+c9*R^6) + fma.s1 F_DZ_TERM = F_ZY1S2S, F_X, F_DZ_TERM + nop.i 0;; +} + + +{.mfi + nop.m 0 + // d(ts)+z*y*d(1-s^2)*x+dz*y*(1-s^2)*(1-x)+z*y*(s^2-1+t^2-ST) + + // + sqrt(1-t^2)*y*(1-s^2)*x^2*PS29 + z*y*(1-s^2)_s*x + + // - asin(t)_low+R^3*(c3+c5*R^2+c7*R^4+c9*R^6) + + // + (t*s)_s-t^2*y*z+z*y*ST + fma.s1 F_DZ_TERM = F_TSS, f1, F_DZ_TERM + nop.i 0;; +} + + +.pred.rel "mutex", p6, p11 +{.mfi + nop.m 0 + // result: add high part of table value + // s>0 in this case + (p11) fnma.s0 f8 = F_DZ_TERM, f1, F_ATHI + nop.i 0 +} + +{.mfb + nop.m 0 + // result: add high part of pi-table value + // if s<0 + (p6) fma.s0 f8 = F_DZ_TERM, f1, F_ATHI + br.ret.sptk b0;; +} + + + + + + +SMALL_S: + + // use 15-term polynomial approximation + +{.mmi + // r3 = pointer to polynomial coefficients + addl r3 = @ltoff(poly_coeffs), gp;; + // load start address for coefficients + ld8 r3 = [r3] + mov R_TMP = 0x3fbf;; +} + + +{.mmi + add r2 = 64, r3 + ldfe F_C3 = [r3], 16 + // p7 = 1 if |s|<2^{-64} (exponent of s0, set F_PI2_LO=0 + (p11) fma.s1 F_PI2_HI = f0, f0, f0;; +} + +{.mfi + nop.m 0 + (p11) fma.s1 F_PI2_LO = f0, f0, f0 + nop.i 0;; +} + +{.mfi + // adjust address for C_11 + add r3 = 16, r3 + // c9*x+c8 + fma.s1 F_S89 = F_X, F_CS9, F_CS8 + nop.i 0 +} + +{.mfi + nop.m 0 + // x^2 + fma.s1 F_X2 = F_X, F_X, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // y*(1-s^2)*x + fma.s1 F_Y1S2X = F_Y1S2, F_X, f0 + nop.i 0 +} + +{.mfi + // C11, C13 + ldfpd F_C11, F_C13 = [r3], 16 + // c7*x+c6 + fma.s1 F_S67 = F_X, F_CS7, F_CS6 + nop.i 0;; +} + + +{.mfi + // C15, C17 + ldfpd F_C15, F_C17 = [r3], 16 + // c3*x+c2 + fma.s1 F_S23 = F_X, F_CS3, F_CS2 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // c5*x+c4 + fma.s1 F_S45 = F_X, F_CS5, F_CS4 + nop.i 0;; +} + + + + +{.mfi + nop.m 0 + // y*(1-s^2)*x^2 + fma.s1 F_Y1S2X2 = F_Y1S2, F_X2, f0 + nop.i 0 +} + +{.mfi + nop.m 0 + // x^4 + fma.s1 F_X4 = F_X2, F_X2, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // c9*x^3+..+c6 + fma.s1 F_S69 = F_X2, F_S89, F_S67 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // c5*x^3+..+c2 + fma.s1 F_S25 = F_X2, F_S45, F_S23 + nop.i 0;; +} + + + +{.mfi + nop.m 0 + // (pi)_high-y*(1-s^2)_s + fnma.s1 F_HI = F_Y, F_1S2_S, F_PI2_HI + nop.i 0;; +} + + +{.mfi + nop.m 0 + // c9*x^7+..+c2 + fma.s1 F_S29 = F_X4, F_S69, F_S25 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // -(y*(1-s^2)_s)_high + fms.s1 F_1S2_HI = F_HI, f1, F_PI2_HI + nop.i 0;; +} + + +{.mfi + nop.m 0 + // (PS29*x^2+x)*y*(1-s^2) + fma.s1 F_S19 = F_Y1S2X2, F_S29, F_Y1S2X + nop.i 0;; +} + + +{.mfi + nop.m 0 + // y*(1-s^2)_s-(y*(1-s^2))_high + fma.s1 F_DS2 = F_Y, F_1S2_S, F_1S2_HI + nop.i 0;; +} + + + +{.mfi + nop.m 0 + // R ~ sqrt(1-s^2) + // (used for polynomial evaluation) + fnma.s1 F_R = F_S19, f1, F_Y1S2 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // y*(1-s^2)-(y*(1-s^2))_high + fma.s1 F_DS2 = F_Y, F_DS, F_DS2 + nop.i 0 +} + +{.mfi + nop.m 0 + // (pi)_low+(PS29*x^2)*y*(1-s^2) + fma.s1 F_S29 = F_Y1S2X2, F_S29, F_PI2_LO + nop.i 0;; +} + + +{.mfi + nop.m 0 + // R^2 + fma.s1 F_R2 = F_R, F_R, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // if s<0 + // (pi)_low+(PS29*x^2)*y*(1-s^2)-(y*(1-s^2)-(y*(1-s^2))_high) + fms.s1 F_S29 = F_S29, f1, F_DS2 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // c7+c9*R^2 + fma.s1 F_P79 = F_C9, F_R2, F_C7 + nop.i 0 +} + +{.mfi + nop.m 0 + // c3+c5*R^2 + fma.s1 F_P35 = F_C5, F_R2, F_C3 + nop.i 0;; +} + + + +{.mfi + nop.m 0 + // R^4 + fma.s1 F_R4 = F_R2, F_R2, f0 + nop.i 0 +} + +{.mfi + nop.m 0 + // R^3 + fma.s1 F_R3 = F_R2, F_R, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // c11+c13*R^2 + fma.s1 F_P1113 = F_C13, F_R2, F_C11 + nop.i 0 +} + +{.mfi + nop.m 0 + // c15+c17*R^2 + fma.s1 F_P1517 = F_C17, F_R2, F_C15 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // (pi)_low+(PS29*x^2)*y*(1-s^2)-(y*(1-s^2)-(y*(1-s^2))_high)+y*(1-s^2)*x + fma.s1 F_S29 = F_Y1S2, F_X, F_S29 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // c11+c13*R^2+c15*R^4+c17*R^6 + fma.s1 F_P1117 = F_P1517, F_R4, F_P1113 + nop.i 0 +} + +{.mfi + nop.m 0 + // c3+c5*R^2+c7*R^4+c9*R^6 + fma.s1 F_P39 = F_P79, F_R4, F_P35 + nop.i 0;; +} + + + +{.mfi + nop.m 0 + // R^8 + fma.s1 F_R8 = F_R4, F_R4, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // c3+c5*R^2+c7*R^4+c9*R^6+..+c17*R^14 + fma.s1 F_P317 = F_P1117, F_R8, F_P39 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // (pi)_low-(PS29*x^2)*y*(1-s^2)-(y*(1-s^2)- + // -(y*(1-s^2))_high)+y*(1-s^2)*x - P3, 17 + fnma.s1 F_S29 = F_P317, F_R3, F_S29 + nop.i 0;; +} + +.pred.rel "mutex", p6, p11 +{.mfi + nop.m 0 + // Result (if s<0): + // (pi)_low-(PS29*x^2)*y*(1-s^2)-(y*(1-s^2)- + // -(y*(1-s^2))_high)+y*(1-s^2)*x - P3, 17 + // +(pi)_high-(y*(1-s^2))_high + (p6) fma.s0 f8 = F_S29, f1, F_HI + nop.i 0 +} + +{.mfb + nop.m 0 + // Result (if s>0): + // (PS29*x^2)*y*(1-s^2)- + // -y*(1-s^2)*x + P3, 17 + // +(y*(1-s^2)) + (p11) fms.s0 f8 = F_Y, F_1S2_S, F_S29 + br.ret.sptk b0;; +} + + + + + + +acosl_SPECIAL_CASES: + +{.mfi + alloc r32 = ar.pfs, 1, 4, 4, 0 + // check if the input is a NaN, or unsupported format + // (i.e. not infinity or normal/denormal) + fclass.nm p7, p8 = f8, 0x3f + // pointer to pi/2 + add r3 = 96, r3;; +} + + +{.mfi + // load pi/2 + ldfpd F_PI2_HI, F_PI2_LO = [r3] + // get |s| + fmerge.s F_S = f0, f8 + nop.i 0 +} + +{.mfb + nop.m 0 + // if NaN, quietize it, and return + (p7) fma.s0 f8 = f8, f1, f0 + (p7) br.ret.spnt b0;; +} + + +{.mfi + nop.m 0 + // |s| = 1 ? + fcmp.eq.s0 p9, p10 = F_S, f1 + nop.i 0 +} + +{.mfi + nop.m 0 + // load FR_X + fma.s1 FR_X = f8, f1, f0 + // load error tag + mov GR_Parameter_TAG = 57;; +} + + +{.mfi + nop.m 0 + // if s = 1, result is 0 + (p9) fma.s0 f8 = f0, f0, f0 + // set p6=0 for |s|>1 + (p10) cmp.ne p6, p0 = r0, r0;; +} + + +{.mfb + nop.m 0 + // if s = -1, result is pi + (p6) fma.s0 f8 = F_PI2_HI, f1, F_PI2_LO + // return if |s| = 1 + (p9) br.ret.sptk b0;; +} + + +{.mfi + nop.m 0 + // get Infinity + frcpa.s1 FR_RESULT, p0 = f1, f0 + nop.i 0;; +} + + +{.mfb + nop.m 0 + // return QNaN indefinite (0*Infinity) + fma.s0 FR_RESULT = f0, FR_RESULT, f0 + nop.b 0;; +} + + +GLOBAL_LIBM_END(acosl) + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +// (1) +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; + + +// (2) +{ .mmi + stfe [GR_Parameter_Y] = f1,16 // Store Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; + +.body +// (3) +{ .mib + stfe [GR_Parameter_X] = FR_X // Store Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y + nop.b 0 // Parameter 3 address +} +{ .mib + stfe [GR_Parameter_Y] = FR_RESULT // Store Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + nop.m 0 + nop.m 0 + add GR_Parameter_RESULT = 48,sp +};; + +// (4) +{ .mmi + ldfe f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; + +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) + +.type __libm_error_support#,@function +.global __libm_error_support# + + + + + + diff --git a/sysdeps/ia64/fpu/e_asin.S b/sysdeps/ia64/fpu/e_asin.S new file mode 100644 index 0000000000..f995c597f4 --- /dev/null +++ b/sysdeps/ia64/fpu/e_asin.S @@ -0,0 +1,854 @@ +.file "asin.s" + + +// Copyright (c) 2000 - 2003 Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. + +// History +//============================================================== +// 02/02/00 Initial version +// 08/17/00 New and much faster algorithm. +// 08/31/00 Avoided bank conflicts on loads, shortened |x|=1 path, +// fixed mfb split issue stalls. +// 12/19/00 Fixed small arg cases to force inexact, or inexact and underflow. +// 08/02/02 New and much faster algorithm II +// 02/06/03 Reordered header: .section, .global, .proc, .align + +// Description +//========================================= +// The asin function computes the principal value of the arc sine of x. +// asin(0) returns 0, asin(1) returns pi/2, asin(-1) returns -pi/2. +// A doman error occurs for arguments not in the range [-1,+1]. +// +// The asin function returns the arc sine in the range [-pi/2, +pi/2] radians. +// +// There are 8 paths: +// 1. x = +/-0.0 +// Return asin(x) = +/-0.0 +// +// 2. 0.0 < |x| < 0.625 +// Return asin(x) = x + x^3 *PolA(x^2) +// where PolA(x^2) = A3 + A5*x^2 + A7*x^4 +...+ A35*x^32 +// +// 3. 0.625 <=|x| < 1.0 +// Return asin(x) = sign(x) * ( Pi/2 - sqrt(R) * PolB(R)) +// Where R = 1 - |x|, +// PolB(R) = B0 + B1*R + B2*R^2 +...+B12*R^12 +// +// sqrt(R) is approximated using the following sequence: +// y0 = (1 + eps)/sqrt(R) - initial approximation by frsqrta, +// |eps| < 2^(-8) +// Then 3 iterations are used to refine the result: +// H0 = 0.5*y0 +// S0 = R*y0 +// +// d0 = 0.5 - H0*S0 +// H1 = H0 + d0*H0 +// S1 = S0 + d0*S0 +// +// d1 = 0.5 - H1*S1 +// H2 = H1 + d0*H1 +// S2 = S1 + d0*S1 +// +// d2 = 0.5 - H2*S2 +// S3 = S3 + d2*S3 +// +// S3 approximates sqrt(R) with enough accuracy for this algorithm +// +// So, the result should be reconstracted as follows: +// asin(x) = sign(x) * (Pi/2 - S3*PolB(R)) +// +// But for optimization perposes the reconstruction step is slightly +// changed: +// asin(x) = sign(x)*(Pi/2 - PolB(R)*S2) + sign(x)*d2*S2*PolB(R) +// +// 4. |x| = 1.0 +// Return asin(x) = sign(x)*Pi/2 +// +// 5. 1.0 < |x| <= +INF +// A doman error occurs for arguments not in the range [-1,+1] +// +// 6. x = [S,Q]NaN +// Return asin(x) = QNaN +// +// 7. x is denormal +// Return asin(x) = x + x^3, +// +// 8. x is unnormal +// Normalize input in f8 and return to the very beginning of the function +// +// Registers used +//============================================================== +// Floating Point registers used: +// f8, input, output +// f6, f7, f9 -> f15, f32 -> f63 + +// General registers used: +// r3, r21 -> r31, r32 -> r38 + +// Predicate registers used: +// p0, p6 -> p14 + +// +// Assembly macros +//========================================= +// integer registers used +// scratch +rTblAddr = r3 + +rPiBy2Ptr = r21 +rTmpPtr3 = r22 +rDenoBound = r23 +rOne = r24 +rAbsXBits = r25 +rHalf = r26 +r0625 = r27 +rSign = r28 +rXBits = r29 +rTmpPtr2 = r30 +rTmpPtr1 = r31 + +// stacked +GR_SAVE_PFS = r32 +GR_SAVE_B0 = r33 +GR_SAVE_GP = r34 +GR_Parameter_X = r35 +GR_Parameter_Y = r36 +GR_Parameter_RESULT = r37 +GR_Parameter_TAG = r38 + +// floating point registers used +FR_X = f10 +FR_Y = f1 +FR_RESULT = f8 + + +// scratch +fXSqr = f6 +fXCube = f7 +fXQuadr = f9 +f1pX = f10 +f1mX = f11 +f1pXRcp = f12 +f1mXRcp = f13 +fH = f14 +fS = f15 +// stacked +fA3 = f32 +fB1 = f32 +fA5 = f33 +fB2 = f33 +fA7 = f34 +fPiBy2 = f34 +fA9 = f35 +fA11 = f36 +fB10 = f35 +fB11 = f36 +fA13 = f37 +fA15 = f38 +fB4 = f37 +fB5 = f38 +fA17 = f39 +fA19 = f40 +fB6 = f39 +fB7 = f40 +fA21 = f41 +fA23 = f42 +fB3 = f41 +fB8 = f42 +fA25 = f43 +fA27 = f44 +fB9 = f43 +fB12 = f44 +fA29 = f45 +fA31 = f46 +fA33 = f47 +fA35 = f48 +fBaseP = f49 +fB0 = f50 +fSignedS = f51 +fD = f52 +fHalf = f53 +fR = f54 +fCloseTo1Pol = f55 +fSignX = f56 +fDenoBound = f57 +fNormX = f58 +fX8 = f59 +fRSqr = f60 +fRQuadr = f61 +fR8 = f62 +fX16 = f63 +// Data tables +//============================================================== +RODATA +.align 16 +LOCAL_OBJECT_START(asin_base_range_table) +// Ai: Polynomial coefficients for the asin(x), |x| < .625000 +// Bi: Polynomial coefficients for the asin(x), |x| > .625000 +data8 0xBFDAAB56C01AE468 //A29 +data8 0x3FE1C470B76A5B2B //A31 +data8 0xBFDC5FF82A0C4205 //A33 +data8 0x3FC71FD88BFE93F0 //A35 +data8 0xB504F333F9DE6487, 0x00003FFF //B0 +data8 0xAAAAAAAAAAAAFC18, 0x00003FFC //A3 +data8 0x3F9F1C71BC4A7823 //A9 +data8 0x3F96E8BBAAB216B2 //A11 +data8 0x3F91C4CA1F9F8A98 //A13 +data8 0x3F8C9DDCEDEBE7A6 //A15 +data8 0x3F877784442B1516 //A17 +data8 0x3F859C0491802BA2 //A19 +data8 0x9999999998C88B8F, 0x00003FFB //A5 +data8 0x3F6BD7A9A660BF5E //A21 +data8 0x3F9FC1659340419D //A23 +data8 0xB6DB6DB798149BDF, 0x00003FFA //A7 +data8 0xBFB3EF18964D3ED3 //A25 +data8 0x3FCD285315542CF2 //A27 +data8 0xF15BEEEFF7D2966A, 0x00003FFB //B1 +data8 0x3EF0DDA376D10FB3 //B10 +data8 0xBEB83CAFE05EBAC9 //B11 +data8 0x3F65FFB67B513644 //B4 +data8 0x3F5032FBB86A4501 //B5 +data8 0x3F392162276C7CBA //B6 +data8 0x3F2435949FD98BDF //B7 +data8 0xD93923D7FA08341C, 0x00003FF9 //B2 +data8 0x3F802995B6D90BDB //B3 +data8 0x3F10DF86B341A63F //B8 +data8 0xC90FDAA22168C235, 0x00003FFF // Pi/2 +data8 0x3EFA3EBD6B0ECB9D //B9 +data8 0x3EDE18BA080E9098 //B12 +LOCAL_OBJECT_END(asin_base_range_table) + + +.section .text +GLOBAL_LIBM_ENTRY(asin) +asin_unnormal_back: +{ .mfi + getf.d rXBits = f8 // grab bits of input value + // set p12 = 1 if x is a NaN, denormal, or zero + fclass.m p12, p0 = f8, 0xcf + adds rSign = 1, r0 +} +{ .mfi + addl rTblAddr = @ltoff(asin_base_range_table),gp + // 1 - x = 1 - |x| for positive x + fms.s1 f1mX = f1, f1, f8 + addl rHalf = 0xFFFE, r0 // exponent of 1/2 +} +;; +{ .mfi + addl r0625 = 0x3FE4, r0 // high 16 bits of 0.625 + // set p8 = 1 if x < 0 + fcmp.lt.s1 p8, p9 = f8, f0 + shl rSign = rSign, 63 // sign bit +} +{ .mfi + // point to the beginning of the table + ld8 rTblAddr = [rTblAddr] + // 1 + x = 1 - |x| for negative x + fma.s1 f1pX = f1, f1, f8 + adds rOne = 0x3FF, r0 +} +;; +{ .mfi + andcm rAbsXBits = rXBits, rSign // bits of |x| + fmerge.s fSignX = f8, f1 // signum(x) + shl r0625 = r0625, 48 // bits of DP representation of 0.625 +} +{ .mfb + setf.exp fHalf = rHalf // load A2 to FP reg + fma.s1 fXSqr = f8, f8, f0 // x^2 + // branch on special path if x is a NaN, denormal, or zero +(p12) br.cond.spnt asin_special +} +;; +{ .mfi + adds rPiBy2Ptr = 272, rTblAddr + nop.f 0 + shl rOne = rOne, 52 // bits of 1.0 +} +{ .mfi + adds rTmpPtr1 = 16, rTblAddr + nop.f 0 + // set p6 = 1 if |x| < 0.625 + cmp.lt p6, p7 = rAbsXBits, r0625 +} +;; +{ .mfi + ldfpd fA29, fA31 = [rTblAddr] // A29, fA31 + // 1 - x = 1 - |x| for positive x +(p9) fms.s1 fR = f1, f1, f8 + // point to coefficient of "near 1" polynomial +(p7) adds rTmpPtr2 = 176, rTblAddr +} +{ .mfi + ldfpd fA33, fA35 = [rTmpPtr1], 16 // A33, fA35 + // 1 + x = 1 - |x| for negative x +(p8) fma.s1 fR = f1, f1, f8 +(p6) adds rTmpPtr2 = 48, rTblAddr +} +;; +{ .mfi + ldfe fB0 = [rTmpPtr1], 16 // B0 + nop.f 0 + nop.i 0 +} +{ .mib + adds rTmpPtr3 = 16, rTmpPtr2 + // set p10 = 1 if |x| = 1.0 + cmp.eq p10, p0 = rAbsXBits, rOne + // branch on special path for |x| = 1.0 +(p10) br.cond.spnt asin_abs_1 +} +;; +{ .mfi + ldfe fA3 = [rTmpPtr2], 48 // A3 or B1 + nop.f 0 + adds rTmpPtr1 = 64, rTmpPtr3 +} +{ .mib + ldfpd fA9, fA11 = [rTmpPtr3], 16 // A9, A11 or B10, B11 + // set p11 = 1 if |x| > 1.0 + cmp.gt p11, p0 = rAbsXBits, rOne + // branch on special path for |x| > 1.0 +(p11) br.cond.spnt asin_abs_gt_1 +} +;; +{ .mfi + ldfpd fA17, fA19 = [rTmpPtr2], 16 // A17, A19 or B6, B7 + // initial approximation of 1 / sqrt(1 - x) + frsqrta.s1 f1mXRcp, p0 = f1mX + nop.i 0 +} +{ .mfi + ldfpd fA13, fA15 = [rTmpPtr3] // A13, A15 or B4, B5 + fma.s1 fXCube = fXSqr, f8, f0 // x^3 + nop.i 0 +} +;; +{ .mfi + ldfe fA5 = [rTmpPtr2], 48 // A5 or B2 + // initial approximation of 1 / sqrt(1 + x) + frsqrta.s1 f1pXRcp, p0 = f1pX + nop.i 0 +} +{ .mfi + ldfpd fA21, fA23 = [rTmpPtr1], 16 // A21, A23 or B3, B8 + fma.s1 fXQuadr = fXSqr, fXSqr, f0 // x^4 + nop.i 0 +} +;; +{ .mfi + ldfe fA7 = [rTmpPtr1] // A7 or Pi/2 + fma.s1 fRSqr = fR, fR, f0 // R^2 + nop.i 0 +} +{ .mfb + ldfpd fA25, fA27 = [rTmpPtr2] // A25, A27 or B9, B12 + nop.f 0 +(p6) br.cond.spnt asin_base_range; +} +;; + +{ .mfi + nop.m 0 +(p9) fma.s1 fH = fHalf, f1mXRcp, f0 // H0 for x > 0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p9) fma.s1 fS = f1mX, f1mXRcp, f0 // S0 for x > 0 + nop.i 0 +} +;; +{ .mfi + nop.m 0 +(p8) fma.s1 fH = fHalf, f1pXRcp, f0 // H0 for x < 0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p8) fma.s1 fS = f1pX, f1pXRcp, f0 // S0 for x > 0 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fRQuadr = fRSqr, fRSqr, f0 // R^4 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fB11 = fB11, fR, fB10 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fB1 = fB1, fR, fB0 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fB5 = fB5, fR, fB4 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fB7 = fB7, fR, fB6 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fB3 = fB3, fR, fB2 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fnma.s1 fD = fH, fS, fHalf // d0 = 1/2 - H0*S0 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fR8 = fRQuadr, fRQuadr, f0 // R^4 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fB9 = fB9, fR, fB8 + nop.i 0 +} +;; +{.mfi + nop.m 0 + fma.s1 fB12 = fB12, fRSqr, fB11 + nop.i 0 +} +{.mfi + nop.m 0 + fma.s1 fB7 = fB7, fRSqr, fB5 + nop.i 0 +} +;; +{.mfi + nop.m 0 + fma.s1 fB3 = fB3, fRSqr, fB1 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fH = fH, fD, fH // H1 = H0 + H0*d0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fS = fS, fD, fS // S1 = S0 + S0*d0 + nop.i 0 +} +;; +{.mfi + nop.m 0 + fma.s1 fPiBy2 = fPiBy2, fSignX, f0 // signum(x)*Pi/2 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fB12 = fB12, fRSqr, fB9 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fB7 = fB7, fRQuadr, fB3 + nop.i 0 +} +;; +{.mfi + nop.m 0 + fnma.s1 fD = fH, fS, fHalf // d1 = 1/2 - H1*S1 + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 fSignedS = fSignX, fS, f0 // -signum(x)*S1 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fCloseTo1Pol = fB12, fR8, fB7 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fH = fH, fD, fH // H2 = H1 + H1*d1 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fS = fS, fD, fS // S2 = S1 + S1*d1 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // -signum(x)* S2 = -signum(x)*(S1 + S1*d1) + fma.s1 fSignedS = fSignedS, fD, fSignedS + nop.i 0 +} +;; +{.mfi + nop.m 0 + fnma.s1 fD = fH, fS, fHalf // d2 = 1/2 - H2*S2 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // signum(x)*(Pi/2 - PolB*S2) + fma.s1 fPiBy2 = fSignedS, fCloseTo1Pol, fPiBy2 + nop.i 0 +} +{ .mfi + nop.m 0 + // -signum(x)*PolB * S2 + fma.s1 fCloseTo1Pol = fSignedS, fCloseTo1Pol, f0 + nop.i 0 +} +;; +{ .mfb + nop.m 0 + // final result for 0.625 <= |x| < 1 + fma.d.s0 f8 = fCloseTo1Pol, fD, fPiBy2 + // exit here for 0.625 <= |x| < 1 + br.ret.sptk b0 +} +;; + + +// here if |x| < 0.625 +.align 32 +asin_base_range: +{ .mfi + nop.m 0 + fma.s1 fA33 = fA33, fXSqr, fA31 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA15 = fA15, fXSqr, fA13 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA29 = fA29, fXSqr, fA27 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA25 = fA25, fXSqr, fA23 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA21 = fA21, fXSqr, fA19 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA9 = fA9, fXSqr, fA7 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA5 = fA5, fXSqr, fA3 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA35 = fA35, fXQuadr, fA33 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA17 = fA17, fXQuadr, fA15 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fX8 = fXQuadr, fXQuadr, f0 // x^8 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA25 = fA25, fXQuadr, fA21 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA9 = fA9, fXQuadr, fA5 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA35 = fA35, fXQuadr, fA29 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA17 = fA17, fXSqr, fA11 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fX16 = fX8, fX8, f0 // x^16 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA35 = fA35, fX8, fA25 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA17 = fA17, fX8, fA9 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fBaseP = fA35, fX16, fA17 + nop.i 0 +} +;; +{ .mfb + nop.m 0 + // final result for |x| < 0.625 + fma.d.s0 f8 = fBaseP, fXCube, f8 + // exit here for |x| < 0.625 path + br.ret.sptk b0 +} +;; + +// here if |x| = 1 +// asin(x) = sign(x) * Pi/2 +.align 32 +asin_abs_1: +{ .mfi + ldfe fPiBy2 = [rPiBy2Ptr] // Pi/2 + nop.f 0 + nop.i 0 +} +;; +{.mfb + nop.m 0 + // result for |x| = 1.0 + fma.d.s0 f8 = fPiBy2, fSignX, f0 + // exit here for |x| = 1.0 + br.ret.sptk b0 +} +;; + +// here if x is a NaN, denormal, or zero +.align 32 +asin_special: +{ .mfi + nop.m 0 + // set p12 = 1 if x is a NaN + fclass.m p12, p0 = f8, 0xc3 + nop.i 0 +} +{ .mlx + nop.m 0 + // smallest positive DP normalized number + movl rDenoBound = 0x0010000000000000 +} +;; +{ .mfi + nop.m 0 + // set p13 = 1 if x = 0.0 + fclass.m p13, p0 = f8, 0x07 + nop.i 0 +} +{ .mfi + nop.m 0 + fnorm.s1 fNormX = f8 + nop.i 0 +} +;; +{ .mfb + // load smallest normal to FP reg + setf.d fDenoBound = rDenoBound + // answer if x is a NaN +(p12) fma.d.s0 f8 = f8,f1,f0 + // exit here if x is a NaN +(p12) br.ret.spnt b0 +} +;; +{ .mfb + nop.m 0 + nop.f 0 + // exit here if x = 0.0 +(p13) br.ret.spnt b0 +} +;; +// if we still here then x is denormal or unnormal +{ .mfi + nop.m 0 + // absolute value of normalized x + fmerge.s fNormX = f1, fNormX + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // set p14 = 1 if normalized x is greater than or + // equal to the smallest denormalized value + // So, if p14 is set to 1 it means that we deal with + // unnormal rather than with "true" denormal + fcmp.ge.s1 p14, p0 = fNormX, fDenoBound + nop.i 0 +} +;; +{ .mfi + nop.m 0 +(p14) fcmp.eq.s0 p6, p0 = f8, f0 // Set D flag if x unnormal + nop.i 0 +} +{ .mfb + nop.m 0 + // normalize unnormal input +(p14) fnorm.s1 f8 = f8 + // return to the main path +(p14) br.cond.sptk asin_unnormal_back +} +;; +// if we still here it means that input is "true" denormal +{ .mfb + nop.m 0 + // final result if x is denormal + fma.d.s0 f8 = f8, fXSqr, f8 + // exit here if x is denormal + br.ret.sptk b0 +} +;; + +// here if |x| > 1.0 +// error handler should be called +.align 32 +asin_abs_gt_1: +{ .mfi + alloc r32 = ar.pfs, 0, 3, 4, 0 // get some registers + fmerge.s FR_X = f8,f8 + nop.i 0 +} +{ .mfb + mov GR_Parameter_TAG = 61 // error code + frcpa.s0 FR_RESULT, p0 = f0,f0 + // call error handler routine + br.cond.sptk __libm_error_region +} +;; +GLOBAL_LIBM_END(asin) + + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfd [GR_Parameter_Y] = FR_Y,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; +.body +{ .mib + stfd [GR_Parameter_X] = FR_X // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfd [GR_Parameter_Y] = FR_RESULT // STORE Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; +{ .mmi + ldfd f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/e_asinf.S b/sysdeps/ia64/fpu/e_asinf.S new file mode 100644 index 0000000000..af24165d8e --- /dev/null +++ b/sysdeps/ia64/fpu/e_asinf.S @@ -0,0 +1,675 @@ +.file "asinf.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. + +// History +//============================================================== +// 02/02/00 Initial version +// 06/28/00 Improved speed +// 06/31/00 Changed register allocation because of some duplicate macros +// moved nan exit bundle up to gain a cycle. +// 08/08/00 Improved speed by avoiding SIR flush. +// 08/15/00 Bundle added after call to __libm_error_support to properly +// set [the previously overwritten] GR_Parameter_RESULT. +// 08/17/00 Changed predicate register macro-usage to direct predicate +// names due to an assembler bug. +// 10/17/00 Improved speed of x=0 and x=1 paths, set D flag if x denormal. +// 03/13/01 Corrected sign of imm1 value in dep instruction. +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/06/03 Reordered header: .section, .global, .proc, .align + + +// Description +//========================================= +// The asinf function computes the arc sine of x in the range [-pi,+pi]. +// A doman error occurs for arguments not in the range [-1,+1]. +// asinf(+-0) returns +-0 +// asinf(x) returns a Nan and raises the invalid exception for |x| >1 + +// The acosf function returns the arc cosine in the range [0, +pi] radians. +// A doman error occurs for arguments not in the range [-1,+1]. +// acosf(1) returns +0 +// acosf(x) returns a Nan and raises the invalid exception for |x| >1 + + +// |x| <= sqrt(2)/2. get Ax and Bx + +// poly_p1 = x p1 +// poly_p3 = x2 p4 + p3 +// poly_p1 = x2 (poly_p1) + x = x2(x p1) + x +// poly_p2 = x2( poly_p3) + p2 = x2(x2 p4 + p3) + p2 + +// poly_Ax = x5(x2( poly_p3) + p2) + x2(x p1) + x +// = x5(x2(x2 p4 + p3) + p2) + x2(x p1) + x + +// poly_p7 = x2 p8 + p7 +// poly_p5 = x2 p6 + p5 + +// poly_p7 = x4 p9 + (poly_p7) +// poly_p7 = x4 p9 + (x2 p8 + p7) +// poly_Bx = x4 (x4 p9 + (x2 p8 + p7)) + x2 p6 + p5 + +// answer1 = x11(x4 (x4 p9 + (x2 p8 + p7)) + x2 p6 + p5) + x5(x2(x2 p4 + p3) + p2) + x2(x p1) + x +// = x19 p9 + x17 p8 + x15 p7 x13 p6 + x11 p5 + x9 p4 + x7 p3 + x5 p2 + x3 p1 + x + + + +// |x| > sqrt(2)/2 + +// Get z = sqrt(1-x2) + +// Get polynomial in t = 1-x2 + +// t2 = t t +// t4 = t2 t2 + +// poly_p4 = t p5 + p4 +// poly_p1 = t p1 + 1 + +// poly_p6 = t p7 + p6 +// poly_p2 = t p3 + p2 + +// poly_p8 = t p9 + p8 + +// poly_p4 = t2 poly_p6 + poly_p4 +// = t2 (t p7 + p6) + (t p5 + p4) + +// poly_p2 = t2 poly_p2 + poly_p1 +// = t2 (t p3 + p2) + (t p1 + 1) + +// poly_p4 = t4 poly_p8 + poly_p4 +// = t4 (t p9 + p8) + (t2 (t p7 + p6) + (t p5 + p4)) + +// P(t) = poly_p2 + t4 poly_p8 +// = t2 (t p3 + p2) + (t p1 + 1) + t4 (t4 (t p9 + p8) + (t2 (t p7 + p6) + (t p5 + p4))) +// = t3 p3 + t2 p2 + t p1 + 1 + t9 p9 + t8 p8 + t7 p7 + t6 p6 + t5 p5 + t4 p4 + + +// answer2 = - sign(x) z P(t) + (sign(x) pi/2) +// + + +// Assembly macros +//========================================= + +// predicate registers +//asinf_pred_LEsqrt2by2 = p7 +//asinf_pred_GTsqrt2by2 = p8 + +// integer registers +ASINF_Addr1 = r33 +ASINF_Addr2 = r34 +ASINF_GR_1by2 = r35 + +ASINF_GR_3by2 = r36 +ASINF_GR_5by2 = r37 + +GR_SAVE_B0 = r38 +GR_SAVE_PFS = r39 +GR_SAVE_GP = r40 + +GR_Parameter_X = r41 +GR_Parameter_Y = r42 +GR_Parameter_RESULT = r43 +GR_Parameter_TAG = r44 + +// floating point registers + +asinf_y = f32 +asinf_abs_x = f33 +asinf_x2 = f34 +asinf_sgn_x = f35 + +asinf_1by2 = f36 +asinf_3by2 = f37 +asinf_5by2 = f38 +asinf_coeff_P3 = f39 +asinf_coeff_P8 = f40 + +asinf_coeff_P1 = f41 +asinf_coeff_P4 = f42 +asinf_coeff_P5 = f43 +asinf_coeff_P2 = f44 +asinf_coeff_P7 = f45 + +asinf_coeff_P6 = f46 +asinf_coeff_P9 = f47 +asinf_x2 = f48 +asinf_x3 = f49 +asinf_x4 = f50 + +asinf_x8 = f51 +asinf_x5 = f52 +asinf_const_piby2 = f53 +asinf_const_sqrt2by2 = f54 +asinf_x11 = f55 + +asinf_poly_p1 = f56 +asinf_poly_p3 = f57 +asinf_sinf1 = f58 +asinf_poly_p2 = f59 +asinf_poly_Ax = f60 + +asinf_poly_p7 = f61 +asinf_poly_p5 = f62 +asinf_sgnx_t4 = f63 +asinf_poly_Bx = f64 +asinf_t = f65 + +asinf_yby2 = f66 +asinf_B = f67 +asinf_B2 = f68 +asinf_Az = f69 +asinf_dz = f70 + +asinf_Sz = f71 +asinf_d2z = f72 +asinf_Fz = f73 +asinf_z = f74 +asinf_sgnx_z = f75 + +asinf_t2 = f76 +asinf_2poly_p4 = f77 +asinf_2poly_p6 = f78 +asinf_2poly_p1 = f79 +asinf_2poly_p2 = f80 + +asinf_2poly_p8 = f81 +asinf_t4 = f82 +asinf_Pt = f83 +asinf_sgnx_2poly_p2 = f84 +asinf_sgn_x_piby2 = f85 + +asinf_poly_p7a = f86 +asinf_2poly_p4a = f87 +asinf_2poly_p4b = f88 +asinf_2poly_p2a = f89 +asinf_poly_p1a = f90 + + + + + +// Data tables +//============================================================== + +RODATA + +.align 16 + +LOCAL_OBJECT_START(asinf_coeff_1_table) +data8 0x3FC5555607DCF816 // P1 +data8 0x3F9CF81AD9BAB2C6 // P4 +data8 0x3FC59E0975074DF3 // P7 +data8 0xBFA6F4CC2780AA1D // P6 +data8 0x3FC2DD45292E93CB // P9 +data8 0x3fe6a09e667f3bcd // sqrt(2)/2 +LOCAL_OBJECT_END(asinf_coeff_1_table) + +LOCAL_OBJECT_START(asinf_coeff_2_table) +data8 0x3FA6F108E31EFBA6 // P3 +data8 0xBFCA31BF175D82A0 // P8 +data8 0x3FA30C0337F6418B // P5 +data8 0x3FB332C9266CB1F9 // P2 +data8 0x3ff921fb54442d18 // pi_by_2 +LOCAL_OBJECT_END(asinf_coeff_2_table) + + +.section .text +GLOBAL_LIBM_ENTRY(asinf) + +// Load the addresses of the two tables. +// Then, load the coefficients and other constants. + +{ .mfi + alloc r32 = ar.pfs,1,8,4,0 + fnma.s1 asinf_t = f8,f8,f1 + dep.z ASINF_GR_1by2 = 0x3f,24,8 // 0x3f000000 +} +{ .mfi + addl ASINF_Addr1 = @ltoff(asinf_coeff_1_table),gp + fma.s1 asinf_x2 = f8,f8,f0 + addl ASINF_Addr2 = @ltoff(asinf_coeff_2_table),gp ;; +} + + +{ .mfi + ld8 ASINF_Addr1 = [ASINF_Addr1] + fmerge.s asinf_abs_x = f1,f8 + dep ASINF_GR_3by2 = -1,r0,22,8 // 0x3fc00000 +} +{ .mlx + nop.m 999 + movl ASINF_GR_5by2 = 0x40200000;; +} + + + +{ .mfi + setf.s asinf_1by2 = ASINF_GR_1by2 + fmerge.s asinf_sgn_x = f8,f1 + nop.i 999 +} +{ .mfi + ld8 ASINF_Addr2 = [ASINF_Addr2] + nop.f 0 + nop.i 999;; +} + + +{ .mfi + setf.s asinf_5by2 = ASINF_GR_5by2 + fcmp.lt.s1 p11,p12 = f8,f0 + nop.i 999;; +} + +{ .mmf + ldfpd asinf_coeff_P1,asinf_coeff_P4 = [ASINF_Addr1],16 + setf.s asinf_3by2 = ASINF_GR_3by2 + fclass.m.unc p8,p0 = f8, 0xc3 ;; //@qnan | @snan +} + + +{ .mfi + ldfpd asinf_coeff_P7,asinf_coeff_P6 = [ASINF_Addr1],16 + fma.s1 asinf_t2 = asinf_t,asinf_t,f0 + nop.i 999 +} +{ .mfi + ldfpd asinf_coeff_P3,asinf_coeff_P8 = [ASINF_Addr2],16 + fma.s1 asinf_x4 = asinf_x2,asinf_x2,f0 + nop.i 999;; +} + + +{ .mfi + ldfpd asinf_coeff_P9,asinf_const_sqrt2by2 = [ASINF_Addr1] + fclass.m.unc p10,p0 = f8, 0x07 //@zero + nop.i 999 +} +{ .mfi + ldfpd asinf_coeff_P5,asinf_coeff_P2 = [ASINF_Addr2],16 + fma.s1 asinf_x3 = f8,asinf_x2,f0 + nop.i 999;; +} + + +{ .mfi + ldfd asinf_const_piby2 = [ASINF_Addr2] + frsqrta.s1 asinf_B,p0 = asinf_t + nop.i 999 +} +{ .mfb + nop.m 999 +(p8) fma.s.s0 f8 = f8,f1,f0 +(p8) br.ret.spnt b0 ;; // Exit if x=nan +} + + +{ .mfb + nop.m 999 + fcmp.eq.s1 p6,p0 = asinf_abs_x,f1 +(p10) br.ret.spnt b0 ;; // Exit if x=0 +} + +{ .mfi + nop.m 999 + fcmp.gt.s1 p9,p0 = asinf_abs_x,f1 + nop.i 999;; +} + +{ .mfi + nop.m 999 + fma.s1 asinf_x8 = asinf_x4,asinf_x4,f0 + nop.i 999 +} +{ .mfb + nop.m 999 + fma.s1 asinf_t4 = asinf_t2,asinf_t2,f0 +(p6) br.cond.spnt ASINF_ABS_ONE ;; // Branch if |x|=1 +} + +{ .mfi + nop.m 999 + fma.s1 asinf_x5 = asinf_x2,asinf_x3,f0 + nop.i 999 +} +{ .mfb +(p9) mov GR_Parameter_TAG = 62 + fma.s1 asinf_yby2 = asinf_t,asinf_1by2,f0 +(p9) br.cond.spnt __libm_error_region ;; // Branch if |x|>1 +} + + +{ .mfi + nop.m 999 + fma.s1 asinf_Az = asinf_t,asinf_B,f0 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 asinf_B2 = asinf_B,asinf_B,f0 + nop.i 999;; +} + +{ .mfi + nop.m 999 + fma.s1 asinf_poly_p1 = f8,asinf_coeff_P1,f0 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 asinf_2poly_p1 = asinf_coeff_P1,asinf_t,f1 + nop.i 999;; +} + +{ .mfi + nop.m 999 + fma.s1 asinf_poly_p3 = asinf_coeff_P4,asinf_x2,asinf_coeff_P3 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 asinf_2poly_p6 = asinf_coeff_P7,asinf_t,asinf_coeff_P6 + nop.i 999;; +} + +{ .mfi + nop.m 999 + fma.s1 asinf_poly_p7 = asinf_x2,asinf_coeff_P8,asinf_coeff_P7 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 asinf_2poly_p2 = asinf_coeff_P3,asinf_t,asinf_coeff_P2 + nop.i 999;; +} + + +{ .mfi + nop.m 999 + fma.s1 asinf_poly_p5 = asinf_x2,asinf_coeff_P6,asinf_coeff_P5 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 asinf_2poly_p4 = asinf_coeff_P5,asinf_t,asinf_coeff_P4 + nop.i 999;; +} + + +{ .mfi + nop.m 999 + fma.d.s1 asinf_x11 = asinf_x8,asinf_x3,f0 + nop.i 999 +} +{ .mfi + nop.m 999 + fnma.s1 asinf_dz = asinf_B2,asinf_yby2,asinf_1by2 + nop.i 999;; +} + + +{ .mfi + nop.m 999 + fma.s1 asinf_poly_p1a = asinf_x2,asinf_poly_p1,f8 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 asinf_2poly_p8 = asinf_coeff_P9,asinf_t,asinf_coeff_P8 + nop.i 999;; +} + + +// Get the absolute value of x and determine the region in which x lies + +{ .mfi + nop.m 999 + fcmp.le.s1 p7,p8 = asinf_abs_x,asinf_const_sqrt2by2 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 asinf_poly_p2 = asinf_x2,asinf_poly_p3,asinf_coeff_P2 + nop.i 999;; +} + + +{ .mfi + nop.m 999 + fma.s1 asinf_poly_p7a = asinf_x4,asinf_coeff_P9,asinf_poly_p7 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 asinf_2poly_p2a = asinf_2poly_p2,asinf_t2,asinf_2poly_p1 + nop.i 999;; +} + + +{ .mfi + nop.m 999 +(p8) fma.s1 asinf_sgnx_t4 = asinf_sgn_x,asinf_t4,f0 + nop.i 999 +} +{ .mfi + nop.m 999 +(p8) fma.s1 asinf_2poly_p4a = asinf_2poly_p6,asinf_t2,asinf_2poly_p4 + nop.i 999;; +} + + +{ .mfi + nop.m 999 +(p8) fma.s1 asinf_Sz = asinf_5by2,asinf_dz,asinf_3by2 + nop.i 999 +} +{ .mfi + nop.m 999 +(p8) fma.s1 asinf_d2z = asinf_dz,asinf_dz,f0 + nop.i 999;; +} + + +{ .mfi + nop.m 999 +(p8) fma.s1 asinf_sgn_x_piby2 = asinf_sgn_x,asinf_const_piby2,f0 + nop.i 999 +} +{ .mfi + nop.m 999 +(p7) fma.d.s1 asinf_poly_Ax = asinf_x5,asinf_poly_p2,asinf_poly_p1a + nop.i 999;; +} + +{ .mfi + nop.m 999 +(p7) fma.d.s1 asinf_poly_Bx = asinf_x4,asinf_poly_p7a,asinf_poly_p5 + nop.i 999 +} +{ .mfi + nop.m 999 +(p8) fma.s1 asinf_sgnx_2poly_p2 = asinf_sgn_x,asinf_2poly_p2a,f0 + nop.i 999;; +} + +{ .mfi + nop.m 999 + fcmp.eq.s0 p6,p0 = f8,f0 // Only purpose is to set D if x denormal + nop.i 999 +} +{ .mfi + nop.m 999 +(p8) fma.s1 asinf_2poly_p4b = asinf_2poly_p8,asinf_t4,asinf_2poly_p4a + nop.i 999;; +} + + +{ .mfi + nop.m 999 +(p8) fma.s1 asinf_Fz = asinf_d2z,asinf_Sz,asinf_dz + nop.i 999;; +} + + +{ .mfi + nop.m 999 +(p8) fma.d.s1 asinf_Pt = asinf_2poly_p4b,asinf_sgnx_t4,asinf_sgnx_2poly_p2 + nop.i 999;; +} + +{ .mfi + nop.m 999 +(p8) fma.d.s1 asinf_z = asinf_Az,asinf_Fz,asinf_Az + nop.i 999;; +} + +.pred.rel "mutex",p8,p7 //asinf_pred_GTsqrt2by2,asinf_pred_LEsqrt2by2 +{ .mfi + nop.m 999 +(p8) fnma.s.s0 f8 = asinf_z,asinf_Pt,asinf_sgn_x_piby2 + nop.i 999 +} + +{ .mfb + nop.m 999 +(p7) fma.s.s0 f8 = asinf_x11,asinf_poly_Bx,asinf_poly_Ax + br.ret.sptk b0 ;; +} + +ASINF_ABS_ONE: +// Here for short exit if |x|=1 +{ .mfb + nop.m 999 + fma.s.s0 f8 = asinf_sgn_x,asinf_const_piby2,f0 + br.ret.sptk b0 +} +;; + +GLOBAL_LIBM_END(asinf) + +// Stack operations when calling error support. +// (1) (2) +// sp -> + psp -> + +// | | +// | | <- GR_Y +// | | +// | <-GR_Y Y2->| +// | | +// | | <- GR_X +// | | +// sp-64 -> + sp -> + +// save ar.pfs save b0 +// save gp + + +// Stack operations when calling error support. +// (3) (call) (4) +// psp -> + sp -> + +// | | +// R3 ->| <- GR_RESULT | -> f8 +// | | +// Y2 ->| <- GR_Y | +// | | +// X1 ->| | +// | | +// sp -> + + +// restore gp +// restore ar.pfs + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 999 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfs [GR_Parameter_Y] = f1,16 // Store Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; + +.body +{ .mfi + nop.m 0 + frcpa.s0 f9,p0 = f0,f0 + nop.i 0 +};; + +{ .mib + stfs [GR_Parameter_X] = f8 // Store Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y + nop.b 0 // Parameter 3 address +} +{ .mib + stfs [GR_Parameter_Y] = f9 // Store Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + nop.m 0 + nop.m 0 + add GR_Parameter_RESULT = 48,sp +};; + +{ .mmi + ldfs f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) + +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/e_asinl.S b/sysdeps/ia64/fpu/e_asinl.S new file mode 100644 index 0000000000..ad65a731fc --- /dev/null +++ b/sysdeps/ia64/fpu/e_asinl.S @@ -0,0 +1,2528 @@ +.file "asinl.s" + + +// Copyright (c) 2001 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2001 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 08/28/01 New version +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/06/03 Reordered header: .section, .global, .proc, .align +// +// API +//============================================================== +// long double asinl(long double) +// +// Overview of operation +//============================================================== +// Background +// +// Implementation +// +// For |s| in [2^{-4}, sqrt(2)/2]: +// Let t= 2^k*1.b1 b2..b6 1, where s= 2^k*1.b1 b2.. b52 +// asin(s)= asin(t)+asin(r), where r= s*sqrt(1-t^2)-t*sqrt(1-s^2), i.e. +// r= (s-t)*sqrt(1-t^2)-t*sqrt(1-t^2)*(sqrt((1-s^2)/(1-t^2))-1) +// asin(r)-r evaluated as 9-degree polynomial (c3*r^3+c5*r^5+c7*r^7+c9*r^9) +// The 64-bit significands of sqrt(1-t^2), 1/(1-t^2) are read from the table, +// along with the high and low parts of asin(t) (stored as two double precision +// values) +// +// |s| in (sqrt(2)/2, sqrt(255/256)): +// Let t= 2^k*1.b1 b2..b6 1, where (1-s^2)*frsqrta(1-s^2)= 2^k*1.b1 b2..b6.. +// asin(|s|)= pi/2-asin(t)+asin(r), r= s*t-sqrt(1-s^2)*sqrt(1-t^2) +// To minimize accumulated errors, r is computed as +// r= (t*s)_s-t^2*y*z+z*y*(t^2-1+s^2)_s+z*y*(1-s^2)_s*x+z'*y*(1-s^2)*PS29+ +// +(t*s-(t*s)_s)+z*y*((t^2-1-(t^2-1+s^2)_s)+s^2)+z*y*(1-s^2-(1-s^2)_s)+ +// +ez*z'*y*(1-s^2)*(1-x), +// where y= frsqrta(1-s^2), z= (sqrt(1-t^2))_s (rounded to 24 significant bits) +// z'= sqrt(1-t^2), x= ((1-s^2)*y^2-1)/2 +// +// |s|<2^{-4}: evaluate as 17-degree polynomial +// (or simply return s, if|s|<2^{-64}) +// +// |s| in [sqrt(255/256), 1): asin(|s|)= pi/2-asin(sqrt(1-s^2)) +// use 17-degree polynomial for asin(sqrt(1-s^2)), +// 9-degree polynomial to evaluate sqrt(1-s^2) +// High order term is (pi/2)_high-(y*(1-s^2))_high +// + + + +// Registers used +//============================================================== +// f6-f15, f32-f36 +// r2-r3, r23-r23 +// p6, p7, p8, p12 +// + + + GR_SAVE_B0= r33 + GR_SAVE_PFS= r34 + GR_SAVE_GP= r35 // This reg. can safely be used + GR_SAVE_SP= r36 + + GR_Parameter_X= r37 + GR_Parameter_Y= r38 + GR_Parameter_RESULT= r39 + GR_Parameter_TAG= r40 + + FR_X= f10 + FR_Y= f1 + FR_RESULT= f8 + + + +RODATA + +.align 16 + + + +LOCAL_OBJECT_START(T_table) + +// stores 64-bit significand of 1/(1-t^2), 64-bit significand of sqrt(1-t^2), +// asin(t)_high (double precision), asin(t)_low (double precision) + +data8 0x80828692b71c4391, 0xff7ddcec2d87e879 +data8 0x3fb022bc0ae531a0, 0x3c9f599c7bb42af6 +data8 0x80869f0163d0b082, 0xff79cad2247914d3 +data8 0x3fb062dd26afc320, 0x3ca4eff21bd49c5c +data8 0x808ac7d5a8690705, 0xff75a89ed6b626b9 +data8 0x3fb0a2ff4a1821e0, 0x3cb7e33b58f164cc +data8 0x808f0112ad8ad2e0, 0xff7176517c2cc0cb +data8 0x3fb0e32279319d80, 0x3caee31546582c43 +data8 0x80934abba8a1da0a, 0xff6d33e949b1ed31 +data8 0x3fb12346b8101da0, 0x3cb8bfe463d087cd +data8 0x8097a4d3dbe63d8f, 0xff68e16571015c63 +data8 0x3fb1636c0ac824e0, 0x3c8870a7c5a3556f +data8 0x809c0f5e9662b3dd, 0xff647ec520bca0f0 +data8 0x3fb1a392756ed280, 0x3c964f1a927461ae +data8 0x80a08a5f33fadc66, 0xff600c07846a6830 +data8 0x3fb1e3b9fc19e580, 0x3c69eb3576d56332 +data8 0x80a515d91d71acd4, 0xff5b892bc475affa +data8 0x3fb223e2a2dfbe80, 0x3c6a4e19fd972fb6 +data8 0x80a9b1cfc86ff7cd, 0xff56f631062cf93d +data8 0x3fb2640c6dd76260, 0x3c62041160e0849e +data8 0x80ae5e46b78b0d68, 0xff5253166bc17794 +data8 0x3fb2a43761187c80, 0x3cac61651af678c0 +data8 0x80b31b417a4b756b, 0xff4d9fdb14463dc8 +data8 0x3fb2e46380bb6160, 0x3cb06ef23eeba7a1 +data8 0x80b7e8c3ad33c369, 0xff48dc7e1baf6738 +data8 0x3fb32490d0d910c0, 0x3caa05f480b300d5 +data8 0x80bcc6d0f9c784d6, 0xff4408fe9ad13e37 +data8 0x3fb364bf558b3820, 0x3cb01e7e403aaab9 +data8 0x80c1b56d1692492d, 0xff3f255ba75f5f4e +data8 0x3fb3a4ef12ec3540, 0x3cb4fe8fcdf5f5f1 +data8 0x80c6b49bc72ec446, 0xff3a319453ebd961 +data8 0x3fb3e5200d171880, 0x3caf2dc089b2b7e2 +data8 0x80cbc460dc4e0ae8, 0xff352da7afe64ac6 +data8 0x3fb425524827a720, 0x3cb75a855e7c6053 +data8 0x80d0e4c033bee9c4, 0xff301994c79afb32 +data8 0x3fb46585c83a5e00, 0x3cb3264981c019ab +data8 0x80d615bdb87556db, 0xff2af55aa431f291 +data8 0x3fb4a5ba916c73c0, 0x3c994251d94427b5 +data8 0x80db575d6291fd8a, 0xff25c0f84bae0cb9 +data8 0x3fb4e5f0a7dbdb20, 0x3cbee2fcc4c786cb +data8 0x80e0a9a33769e535, 0xff207c6cc0ec09fd +data8 0x3fb526280fa74620, 0x3c940656e5549b91 +data8 0x80e60c93498e32cd, 0xff1b27b703a19c98 +data8 0x3fb56660ccee2740, 0x3ca7082374d7b2cd +data8 0x80eb8031b8d4052d, 0xff15c2d6105c72f8 +data8 0x3fb5a69ae3d0b520, 0x3c7c4d46e09ac68a +data8 0x80f10482b25c6c8a, 0xff104dc8e0813ed4 +data8 0x3fb5e6d6586fec20, 0x3c9aa84ffd9b4958 +data8 0x80f6998a709c7cfb, 0xff0ac88e6a4ab926 +data8 0x3fb627132eed9140, 0x3cbced2cbbbe7d16 +data8 0x80fc3f4d3b657c44, 0xff053325a0c8a2ec +data8 0x3fb667516b6c34c0, 0x3c6489c5fc68595a +data8 0x8101f5cf67ed2af8, 0xfeff8d8d73dec2bb +data8 0x3fb6a791120f33a0, 0x3cbe12acf159dfad +data8 0x8107bd1558d6291f, 0xfef9d7c4d043df29 +data8 0x3fb6e7d226fabba0, 0x3ca386d099cd0dc7 +data8 0x810d95237e38766a, 0xfef411ca9f80b5f7 +data8 0x3fb72814ae53cc20, 0x3cb9f35731e71dd6 +data8 0x81137dfe55aa0e29, 0xfeee3b9dc7eef009 +data8 0x3fb76858ac403a00, 0x3c74df3dd959141a +data8 0x811977aa6a479f0f, 0xfee8553d2cb8122c +data8 0x3fb7a89e24e6b0e0, 0x3ca6034406ee42bc +data8 0x811f822c54bd5ef8, 0xfee25ea7add46a91 +data8 0x3fb7e8e51c6eb6a0, 0x3cb82f8f78e68ed7 +data8 0x81259d88bb4ffac1, 0xfedc57dc2809fb1d +data8 0x3fb8292d9700ad60, 0x3cbebb73c0e653f9 +data8 0x812bc9c451e5a257, 0xfed640d974eb6068 +data8 0x3fb8697798c5d620, 0x3ca2feee76a9701b +data8 0x813206e3da0f3124, 0xfed0199e6ad6b585 +data8 0x3fb8a9c325e852e0, 0x3cb9e88f2f4d0efe +data8 0x813854ec231172f9, 0xfec9e229dcf4747d +data8 0x3fb8ea1042932a00, 0x3ca5ff40d81f66fd +data8 0x813eb3e209ee858f, 0xfec39a7a9b36538b +data8 0x3fb92a5ef2f247c0, 0x3cb5e3bece4d6b07 +data8 0x814523ca796f56ce, 0xfebd428f72561efe +data8 0x3fb96aaf3b3281a0, 0x3cb7b9e499436d7c +data8 0x814ba4aa6a2d3ff9, 0xfeb6da672bd48fe4 +data8 0x3fb9ab011f819860, 0x3cb9168143cc1a7f +data8 0x81523686e29bbdd7, 0xfeb062008df81f50 +data8 0x3fb9eb54a40e3ac0, 0x3cb6e544197eb1e1 +data8 0x8158d964f7124614, 0xfea9d95a5bcbd65a +data8 0x3fba2ba9cd080800, 0x3ca9a717be8f7446 +data8 0x815f8d49c9d639e4, 0xfea34073551e1ac8 +data8 0x3fba6c009e9f9260, 0x3c741e989a60938a +data8 0x8166523a8b24f626, 0xfe9c974a367f785c +data8 0x3fbaac591d0661a0, 0x3cb2c1290107e57d +data8 0x816d283c793e0114, 0xfe95ddddb94166cb +data8 0x3fbaecb34c6ef600, 0x3c9c7d5fbaec405d +data8 0x81740f54e06d55bd, 0xfe8f142c93750c50 +data8 0x3fbb2d0f310cca00, 0x3cbc09479a9cbcfb +data8 0x817b07891b15cd5e, 0xfe883a3577e9fceb +data8 0x3fbb6d6ccf1455e0, 0x3cb9450bff4ee307 +data8 0x818210de91bba6c8, 0xfe814ff7162cf62f +data8 0x3fbbadcc2abb1180, 0x3c9227fda12a8d24 +data8 0x81892b5abb0f2bf9, 0xfe7a55701a8697b1 +data8 0x3fbbee2d48377700, 0x3cb6fad72acfe356 +data8 0x819057031bf7760e, 0xfe734a9f2dfa1810 +data8 0x3fbc2e902bc10600, 0x3cb4465b588d16ad +data8 0x819793dd479d4fbe, 0xfe6c2f82f643f68b +data8 0x3fbc6ef4d9904580, 0x3c8b9ac54823960d +data8 0x819ee1eedf76367a, 0xfe65041a15d8a92c +data8 0x3fbcaf5b55dec6a0, 0x3ca2b8d28a954db2 +data8 0x81a6413d934f7a66, 0xfe5dc8632be3477f +data8 0x3fbcefc3a4e727a0, 0x3c9380da83713ab4 +data8 0x81adb1cf21597d4b, 0xfe567c5cd44431d5 +data8 0x3fbd302dcae51600, 0x3ca995b83421756a +data8 0x81b533a9563310b8, 0xfe4f2005a78fb50f +data8 0x3fbd7099cc155180, 0x3caefa2f7a817d5f +data8 0x81bcc6d20cf4f373, 0xfe47b35c3b0caaeb +data8 0x3fbdb107acb5ae80, 0x3cb455fc372dd026 +data8 0x81c46b4f2f3d6e68, 0xfe40365f20b316d6 +data8 0x3fbdf177710518c0, 0x3cbee3dcc5b01434 +data8 0x81cc2126b53c1144, 0xfe38a90ce72abf36 +data8 0x3fbe31e91d439620, 0x3cb3e131c950aebd +data8 0x81d3e85ea5bd8ee2, 0xfe310b6419c9c33a +data8 0x3fbe725cb5b24900, 0x3c01d3fac6029027 +data8 0x81dbc0fd1637b9c1, 0xfe295d6340932d15 +data8 0x3fbeb2d23e937300, 0x3c6304cc44aeedd1 +data8 0x81e3ab082ad5a0a4, 0xfe219f08e03580b3 +data8 0x3fbef349bc2a77e0, 0x3cac1d2d6abe9c72 +data8 0x81eba6861683cb97, 0xfe19d0537a0946e2 +data8 0x3fbf33c332bbe020, 0x3ca0909dba4e96ca +data8 0x81f3b37d1afc9979, 0xfe11f1418c0f94e2 +data8 0x3fbf743ea68d5b60, 0x3c937fc12a2a779a +data8 0x81fbd1f388d4be45, 0xfe0a01d190f09063 +data8 0x3fbfb4bc1be5c340, 0x3cbf51a504b55813 +data8 0x820401efbf87e248, 0xfe020201fff9efea +data8 0x3fbff53b970d1e80, 0x3ca625444b260078 +data8 0x82106ad2ffdca049, 0xfdf5e3940a49135e +data8 0x3fc02aff52065460, 0x3c9125d113e22a57 +data8 0x8221343d6ea1d3e2, 0xfde581a45429b0a0 +data8 0x3fc06b84f8e03220, 0x3caccf362295894b +data8 0x82324434adbf99c2, 0xfdd4de1a001fb775 +data8 0x3fc0ac0ed1fe7240, 0x3cc22f676096b0af +data8 0x82439aee8d0c7747, 0xfdc3f8e8269d1f03 +data8 0x3fc0ec9cee9e4820, 0x3cca147e2886a628 +data8 0x825538a1d0fcb2f0, 0xfdb2d201a9b1ba66 +data8 0x3fc12d2f6006f0a0, 0x3cc72b36633bc2d4 +data8 0x82671d86345c5cee, 0xfda1695934d723e7 +data8 0x3fc16dc63789de60, 0x3cb11f9c47c7b83f +data8 0x827949d46a121770, 0xfd8fbee13cbbb823 +data8 0x3fc1ae618682e620, 0x3cce1b59020cef8e +data8 0x828bbdc61eeab9ba, 0xfd7dd28bff0c9f34 +data8 0x3fc1ef015e586c40, 0x3cafec043e0225ee +data8 0x829e7995fb6de9e1, 0xfd6ba44b823ee1ca +data8 0x3fc22fa5d07b90c0, 0x3cba905409caf8e3 +data8 0x82b17d7fa5bbc982, 0xfd5934119557883a +data8 0x3fc2704eee685da0, 0x3cb5ef21838a823e +data8 0x82c4c9bfc373d276, 0xfd4681cfcfb2c161 +data8 0x3fc2b0fcc9a5f3e0, 0x3ccc7952c5e0e312 +data8 0x82d85e93fba50136, 0xfd338d7790ca0f41 +data8 0x3fc2f1af73c6ba00, 0x3cbecf5f977d1ca9 +data8 0x82ec3c3af8c76b32, 0xfd2056f9fff97727 +data8 0x3fc33266fe6889a0, 0x3c9d329c022ebdb5 +data8 0x830062f46abf6022, 0xfd0cde480c43b327 +data8 0x3fc373237b34de60, 0x3cc95806d4928adb +data8 0x8314d30108ea35f0, 0xfcf923526c1562b2 +data8 0x3fc3b3e4fbe10520, 0x3cbc299fe7223d54 +data8 0x83298ca29434df97, 0xfce526099d0737ed +data8 0x3fc3f4ab922e4a60, 0x3cb59d8bb8fdbccc +data8 0x833e901bd93c7009, 0xfcd0e65de39f1f7c +data8 0x3fc435774fea2a60, 0x3c9ec18b43340914 +data8 0x8353ddb0b278aad8, 0xfcbc643f4b106055 +data8 0x3fc4764846ee80a0, 0x3cb90402efd87ed6 +data8 0x836975a60a70c52e, 0xfca79f9da4fab13a +data8 0x3fc4b71e8921b860, 0xbc58f23449ed6365 +data8 0x837f5841ddfa7a46, 0xfc92986889284148 +data8 0x3fc4f7fa2876fca0, 0xbc6294812bf43acd +data8 0x839585cb3e839773, 0xfc7d4e8f554ab12f +data8 0x3fc538db36ee6960, 0x3cb910b773d4c578 +data8 0x83abfe8a5466246f, 0xfc67c2012cb6fa68 +data8 0x3fc579c1c6953cc0, 0x3cc5ede909fc47fc +data8 0x83c2c2c861474d91, 0xfc51f2acf82041d5 +data8 0x3fc5baade9860880, 0x3cac63cdfc3588e5 +data8 0x83d9d2cfc2813637, 0xfc3be08165519325 +data8 0x3fc5fb9fb1e8e3a0, 0x3cbf7c8466578c29 +data8 0x83f12eebf397daac, 0xfc258b6ce6e6822f +data8 0x3fc63c9731f39d40, 0x3cb6d2a7ffca3e9e +data8 0x8408d76990b9296e, 0xfc0ef35db402af94 +data8 0x3fc67d947be9eec0, 0x3cb1980da09e6566 +data8 0x8420cc9659487cd7, 0xfbf81841c8082dc4 +data8 0x3fc6be97a21daf00, 0x3cc2ac8330e59aa5 +data8 0x84390ec132759ecb, 0xfbe0fa06e24cc390 +data8 0x3fc6ffa0b6ef05e0, 0x3ccc1a030fee56c4 +data8 0x84519e3a29df811a, 0xfbc9989a85ce0954 +data8 0x3fc740afcccca000, 0x3cc19692a5301ca6 +data8 0x846a7b527842d61b, 0xfbb1f3e9f8e45dc4 +data8 0x3fc781c4f633e2c0, 0x3cc0e98f3868a508 +data8 0x8483a65c8434b5f0, 0xfb9a0be244f4af45 +data8 0x3fc7c2e045b12140, 0x3cb2a8d309754420 +data8 0x849d1fabe4e97dd7, 0xfb81e070362116d1 +data8 0x3fc80401cddfd120, 0x3ca7a44544aa4ce6 +data8 0x84b6e795650817ea, 0xfb6971805af8411e +data8 0x3fc84529a16ac020, 0x3c9e3b709c7d6f94 +data8 0x84d0fe6f0589da92, 0xfb50beff0423a2f5 +data8 0x3fc88657d30c49e0, 0x3cc60d65a7f0a278 +data8 0x84eb649000a73014, 0xfb37c8d84414755c +data8 0x3fc8c78c758e8e80, 0x3cc94b2ee984c2b7 +data8 0x85061a50ccd13781, 0xfb1e8ef7eeaf764b +data8 0x3fc908c79bcba900, 0x3cc8540ae794a2fe +data8 0x8521200b1fb8916e, 0xfb05114998f76a83 +data8 0x3fc94a0958ade6c0, 0x3ca127f49839fa9c +data8 0x853c7619f1618bf6, 0xfaeb4fb898b65d19 +data8 0x3fc98b51bf2ffee0, 0x3c8c9ba7a803909a +data8 0x85581cd97f45e274, 0xfad14a3004259931 +data8 0x3fc9cca0e25d4ac0, 0x3cba458e91d3bf54 +data8 0x857414a74f8446b4, 0xfab7009ab1945a54 +data8 0x3fca0df6d551fe80, 0x3cc78ea1d329d2b2 +data8 0x85905de2341dea46, 0xfa9c72e3370d2fbc +data8 0x3fca4f53ab3b6200, 0x3ccf60dca86d57ef +data8 0x85acf8ea4e423ff8, 0xfa81a0f3e9fa0ee9 +data8 0x3fca90b777580aa0, 0x3ca4c4e2ec8a867e +data8 0x85c9e62111a92e7d, 0xfa668ab6dec711b1 +data8 0x3fcad2224cf814e0, 0x3c303de5980d071c +data8 0x85e725e947fbee97, 0xfa4b3015e883dbfe +data8 0x3fcb13943f7d5f80, 0x3cc29d4eefa5cb1e +data8 0x8604b8a7144cd054, 0xfa2f90fa9883a543 +data8 0x3fcb550d625bc6a0, 0x3c9e01a746152daf +data8 0x86229ebff69e2415, 0xfa13ad4e3dfbe1c1 +data8 0x3fcb968dc9195ea0, 0x3ccc091bd73ae518 +data8 0x8640d89acf78858c, 0xf9f784f9e5a1877b +data8 0x3fcbd815874eb160, 0x3cb5f4b89875e187 +data8 0x865f669fe390c7f5, 0xf9db17e65944eacf +data8 0x3fcc19a4b0a6f9c0, 0x3cc5c0bc2b0bbf14 +data8 0x867e4938df7dc45f, 0xf9be65fc1f6c2e6e +data8 0x3fcc5b3b58e061e0, 0x3cc1ca70df8f57e7 +data8 0x869d80d0db7e4c0c, 0xf9a16f237aec427a +data8 0x3fcc9cd993cc4040, 0x3cbae93acc85eccf +data8 0x86bd0dd45f4f8265, 0xf98433446a806e70 +data8 0x3fccde7f754f5660, 0x3cb22f70e64568d0 +data8 0x86dcf0b16613e37a, 0xf966b246a8606170 +data8 0x3fcd202d11620fa0, 0x3c962030e5d4c849 +data8 0x86fd29d7624b3d5d, 0xf948ec11a9d4c45b +data8 0x3fcd61e27c10c0a0, 0x3cc7083c91d59217 +data8 0x871db9b741dbe44a, 0xf92ae08c9eca4941 +data8 0x3fcda39fc97be7c0, 0x3cc9258579e57211 +data8 0x873ea0c3722d6af2, 0xf90c8f9e71633363 +data8 0x3fcde5650dd86d60, 0x3ca4755a9ea582a9 +data8 0x875fdf6fe45529e8, 0xf8edf92dc5875319 +data8 0x3fce27325d6fe520, 0x3cbc1e2b6c1954f9 +data8 0x878176321154e2bc, 0xf8cf1d20f87270b8 +data8 0x3fce6907cca0d060, 0x3cb6ca4804750830 +data8 0x87a36580fe6bccf5, 0xf8affb5e20412199 +data8 0x3fceaae56fdee040, 0x3cad6b310d6fd46c +data8 0x87c5add5417a5cb9, 0xf89093cb0b7c0233 +data8 0x3fceeccb5bb33900, 0x3cc16e99cedadb20 +data8 0x87e84fa9057914ca, 0xf870e64d40a15036 +data8 0x3fcf2eb9a4bcb600, 0x3cc75ee47c8b09e9 +data8 0x880b4b780f02b709, 0xf850f2c9fdacdf78 +data8 0x3fcf70b05fb02e20, 0x3cad6350d379f41a +data8 0x882ea1bfc0f228ac, 0xf830b926379e6465 +data8 0x3fcfb2afa158b8a0, 0x3cce0ccd9f829985 +data8 0x885252ff21146108, 0xf810394699fe0e8e +data8 0x3fcff4b77e97f3e0, 0x3c9b30faa7a4c703 +data8 0x88765fb6dceebbb3, 0xf7ef730f865f6df0 +data8 0x3fd01b6406332540, 0x3cdc5772c9e0b9bd +data8 0x88ad1f69be2cc730, 0xf7bdc59bc9cfbd97 +data8 0x3fd04cf8ad203480, 0x3caeef44fe21a74a +data8 0x88f763f70ae2245e, 0xf77a91c868a9c54e +data8 0x3fd08f23ce0162a0, 0x3cd6290ab3fe5889 +data8 0x89431fc7bc0c2910, 0xf73642973c91298e +data8 0x3fd0d1610f0c1ec0, 0x3cc67401a01f08cf +data8 0x8990573407c7738e, 0xf6f0d71d1d7a2dd6 +data8 0x3fd113b0c65d88c0, 0x3cc7aa4020fe546f +data8 0x89df0eb108594653, 0xf6aa4e6a05cfdef2 +data8 0x3fd156134ada6fe0, 0x3cc87369da09600c +data8 0x8a2f4ad16e0ed78a, 0xf662a78900c35249 +data8 0x3fd19888f43427a0, 0x3cc62b220f38e49c +data8 0x8a811046373e0819, 0xf619e180181d97cc +data8 0x3fd1db121aed7720, 0x3ca3ede7490b52f4 +data8 0x8ad463df6ea0fa2c, 0xf5cffb504190f9a2 +data8 0x3fd21daf185fa360, 0x3caafad98c1d6c1b +data8 0x8b294a8cf0488daf, 0xf584f3f54b8604e6 +data8 0x3fd2606046bf95a0, 0x3cdb2d704eeb08fa +data8 0x8b7fc95f35647757, 0xf538ca65c960b582 +data8 0x3fd2a32601231ec0, 0x3cc661619fa2f126 +data8 0x8bd7e588272276f8, 0xf4eb7d92ff39fccb +data8 0x3fd2e600a3865760, 0x3c8a2a36a99aca4a +data8 0x8c31a45bf8e9255e, 0xf49d0c68cd09b689 +data8 0x3fd328f08ad12000, 0x3cb9efaf1d7ab552 +data8 0x8c8d0b520a35eb18, 0xf44d75cd993cfad2 +data8 0x3fd36bf614dcc040, 0x3ccacbb590bef70d +data8 0x8cea2005d068f23d, 0xf3fcb8a23ab4942b +data8 0x3fd3af11a079a6c0, 0x3cd9775872cf037d +data8 0x8d48e837c8cd5027, 0xf3aad3c1e2273908 +data8 0x3fd3f2438d754b40, 0x3ca03304f667109a +data8 0x8da969ce732f3ac7, 0xf357c60202e2fd7e +data8 0x3fd4358c3ca032e0, 0x3caecf2504ff1a9d +data8 0x8e0baad75555e361, 0xf3038e323ae9463a +data8 0x3fd478ec0fd419c0, 0x3cc64bdc3d703971 +data8 0x8e6fb18807ba877e, 0xf2ae2b1c3a6057f7 +data8 0x3fd4bc6369fa40e0, 0x3cbb7122ec245cf2 +data8 0x8ed5843f4bda74d5, 0xf2579b83aa556f0c +data8 0x3fd4fff2af11e2c0, 0x3c9cfa2dc792d394 +data8 0x8f3d29862c861fef, 0xf1ffde2612ca1909 +data8 0x3fd5439a4436d000, 0x3cc38d46d310526b +data8 0x8fa6a81128940b2d, 0xf1a6f1bac0075669 +data8 0x3fd5875a8fa83520, 0x3cd8bf59b8153f8a +data8 0x901206c1686317a6, 0xf14cd4f2a730d480 +data8 0x3fd5cb33f8cf8ac0, 0x3c9502b5c4d0e431 +data8 0x907f4ca5fe9cf739, 0xf0f186784a125726 +data8 0x3fd60f26e847b120, 0x3cc8a1a5e0acaa33 +data8 0x90ee80fd34aeda5e, 0xf09504ef9a212f18 +data8 0x3fd65333c7e43aa0, 0x3cae5b029cb1f26e +data8 0x915fab35e37421c6, 0xf0374ef5daab5c45 +data8 0x3fd6975b02b8e360, 0x3cd5aa1c280c45e6 +data8 0x91d2d2f0d894d73c, 0xefd86321822dbb51 +data8 0x3fd6db9d05213b20, 0x3cbecf2c093ccd8b +data8 0x9248000249200009, 0xef7840021aca5a72 +data8 0x3fd71ffa3cc87fc0, 0x3cb8d273f08d00d9 +data8 0x92bf3a7351f081d2, 0xef16e42021d7cbd5 +data8 0x3fd7647318b1ad20, 0x3cbce099d79cdc46 +data8 0x93388a8386725713, 0xeeb44dfce6820283 +data8 0x3fd7a908093fc1e0, 0x3ccb033ec17a30d9 +data8 0x93b3f8aa8e653812, 0xee507c126774fa45 +data8 0x3fd7edb9803e3c20, 0x3cc10aedb48671eb +data8 0x94318d99d341ade4, 0xedeb6cd32f891afb +data8 0x3fd83287f0e9cf80, 0x3c994c0c1505cd2a +data8 0x94b1523e3dedc630, 0xed851eaa3168f43c +data8 0x3fd87773cff956e0, 0x3cda3b7bce6a6b16 +data8 0x95334fc20577563f, 0xed1d8ffaa2279669 +data8 0x3fd8bc7d93a70440, 0x3cd4922edc792ce2 +data8 0x95b78f8e8f92f274, 0xecb4bf1fd2be72da +data8 0x3fd901a5b3b9cf40, 0x3cd3fea1b00f9d0d +data8 0x963e1b4e63a87c3f, 0xec4aaa6d08694cc1 +data8 0x3fd946eca98f2700, 0x3cdba4032d968ff1 +data8 0x96c6fcef314074fc, 0xebdf502d53d65fea +data8 0x3fd98c52f024e800, 0x3cbe7be1ab8c95c9 +data8 0x97523ea3eab028b2, 0xeb72aea36720793e +data8 0x3fd9d1d904239860, 0x3cd72d08a6a22b70 +data8 0x97dfeae6f4ee4a9a, 0xeb04c4096a884e94 +data8 0x3fda177f63e8ef00, 0x3cd818c3c1ebfac7 +data8 0x98700c7c6d85d119, 0xea958e90cfe1efd7 +data8 0x3fda5d468f92a540, 0x3cdf45fbfaa080fe +data8 0x9902ae7487a9caa1, 0xea250c6224aab21a +data8 0x3fdaa32f090998e0, 0x3cd715a9353cede4 +data8 0x9997dc2e017a9550, 0xe9b33b9ce2bb7638 +data8 0x3fdae939540d3f00, 0x3cc545c014943439 +data8 0x9a2fa158b29b649b, 0xe9401a573f8aa706 +data8 0x3fdb2f65f63f6c60, 0x3cd4a63c2f2ca8e2 +data8 0x9aca09f835466186, 0xe8cba69df9f0bf35 +data8 0x3fdb75b5773075e0, 0x3cda310ce1b217ec +data8 0x9b672266ab1e0136, 0xe855de74266193d4 +data8 0x3fdbbc28606babc0, 0x3cdc84b75cca6c44 +data8 0x9c06f7579f0b7bd5, 0xe7debfd2f98c060b +data8 0x3fdc02bf3d843420, 0x3cd225d967ffb922 +data8 0x9ca995db058cabdc, 0xe76648a991511c6e +data8 0x3fdc497a9c224780, 0x3cde08101c5b825b +data8 0x9d4f0b605ce71e88, 0xe6ec76dcbc02d9a7 +data8 0x3fdc905b0c10d420, 0x3cb1abbaa3edf120 +data8 0x9df765b9eecad5e6, 0xe6714846bdda7318 +data8 0x3fdcd7611f4b8a00, 0x3cbf6217ae80aadf +data8 0x9ea2b320350540fe, 0xe5f4bab71494cd6b +data8 0x3fdd1e8d6a0d56c0, 0x3cb726e048cc235c +data8 0x9f51023562fc5676, 0xe576cbf239235ecb +data8 0x3fdd65e082df5260, 0x3cd9e66872bd5250 +data8 0xa002620915c2a2f6, 0xe4f779b15f5ec5a7 +data8 0x3fddad5b02a82420, 0x3c89743b0b57534b +data8 0xa0b6e21c2caf9992, 0xe476c1a233a7873e +data8 0x3fddf4fd84bbe160, 0x3cbf7adea9ee3338 +data8 0xa16e9264cc83a6b2, 0xe3f4a16696608191 +data8 0x3fde3cc8a6ec6ee0, 0x3cce46f5a51f49c6 +data8 0xa22983528f3d8d49, 0xe3711694552da8a8 +data8 0x3fde84bd099a6600, 0x3cdc78f6490a2d31 +data8 0xa2e7c5d2e2e69460, 0xe2ec1eb4e1e0a5fb +data8 0x3fdeccdb4fc685c0, 0x3cdd3aedb56a4825 +data8 0xa3a96b5599bd2532, 0xe265b74506fbe1c9 +data8 0x3fdf15241f23b3e0, 0x3cd440f3c6d65f65 +data8 0xa46e85d1ae49d7de, 0xe1ddddb499b3606f +data8 0x3fdf5d98202994a0, 0x3cd6c44bd3fb745a +data8 0xa53727ca3e11b99e, 0xe1548f662951b00d +data8 0x3fdfa637fe27bf60, 0x3ca8ad1cd33054dd +data8 0xa6036453bdc20186, 0xe0c9c9aeabe5e481 +data8 0x3fdfef0467599580, 0x3cc0f1ac0685d78a +data8 0xa6d34f1969dda338, 0xe03d89d5281e4f81 +data8 0x3fe01bff067d6220, 0x3cc0731e8a9ef057 +data8 0xa7a6fc62f7246ff3, 0xdfafcd125c323f54 +data8 0x3fe04092d1ae3b40, 0x3ccabda24b59906d +data8 0xa87e811a861df9b9, 0xdf20909061bb9760 +data8 0x3fe0653df0fd9fc0, 0x3ce94c8dcc722278 +data8 0xa959f2d2dd687200, 0xde8fd16a4e5f88bd +data8 0x3fe08a00c1cae320, 0x3ce6b888bb60a274 +data8 0xaa3967cdeea58bda, 0xddfd8cabd1240d22 +data8 0x3fe0aedba3221c00, 0x3ced5941cd486e46 +data8 0xab904fd587263c84, 0xdd1f4472e1cf64ed +data8 0x3fe0e651e85229c0, 0x3cdb6701042299b1 +data8 0xad686d44dd5a74bb, 0xdbf173e1f6b46e92 +data8 0x3fe1309cbf4cdb20, 0x3cbf1be7bb3f0ec5 +data8 0xaf524e15640ebee4, 0xdabd54896f1029f6 +data8 0x3fe17b4ee1641300, 0x3ce81dd055b792f1 +data8 0xb14eca24ef7db3fa, 0xd982cb9ae2f47e41 +data8 0x3fe1c66b9ffd6660, 0x3cd98ea31eb5ddc7 +data8 0xb35ec807669920ce, 0xd841bd1b8291d0b6 +data8 0x3fe211f66db3a5a0, 0x3ca480c35a27b4a2 +data8 0xb5833e4755e04dd1, 0xd6fa0bd3150b6930 +data8 0x3fe25df2e05b6c40, 0x3ca4bc324287a351 +data8 0xb7bd34c8000b7bd3, 0xd5ab9939a7d23aa1 +data8 0x3fe2aa64b32f7780, 0x3cba67314933077c +data8 0xba0dc64d126cc135, 0xd4564563ce924481 +data8 0x3fe2f74fc9289ac0, 0x3cec1a1dc0efc5ec +data8 0xbc76222cbbfa74a6, 0xd2f9eeed501125a8 +data8 0x3fe344b82f859ac0, 0x3ceeef218de413ac +data8 0xbef78e31985291a9, 0xd19672e2182f78be +data8 0x3fe392a22087b7e0, 0x3cd2619ba201204c +data8 0xc19368b2b0629572, 0xd02baca5427e436a +data8 0x3fe3e11206694520, 0x3cb5d0b3143fe689 +data8 0xc44b2ae8c6733e51, 0xceb975d60b6eae5d +data8 0x3fe4300c7e945020, 0x3cbd367143da6582 +data8 0xc7206b894212dfef, 0xcd3fa6326ff0ac9a +data8 0x3fe47f965d201d60, 0x3ce797c7a4ec1d63 +data8 0xca14e1b0622de526, 0xcbbe13773c3c5338 +data8 0x3fe4cfb4b09d1a20, 0x3cedfadb5347143c +data8 0xcd2a6825eae65f82, 0xca34913d425a5ae9 +data8 0x3fe5206cc637e000, 0x3ce2798b38e54193 +data8 0xd06301095e1351ee, 0xc8a2f0d3679c08c0 +data8 0x3fe571c42e3d0be0, 0x3ccd7cb9c6c2ca68 +data8 0xd3c0d9f50057adda, 0xc70901152d59d16b +data8 0x3fe5c3c0c108f940, 0x3ceb6c13563180ab +data8 0xd74650a98cc14789, 0xc5668e3d4cbf8828 +data8 0x3fe61668a46ffa80, 0x3caa9092e9e3c0e5 +data8 0xdaf5f8579dcc8f8f, 0xc3bb61b3eed42d02 +data8 0x3fe669c251ad69e0, 0x3cccf896ef3b4fee +data8 0xded29f9f9a6171b4, 0xc20741d7f8e8e8af +data8 0x3fe6bdd49bea05c0, 0x3cdc6b29937c575d +data8 0xe2df5765854ccdb0, 0xc049f1c2d1b8014b +data8 0x3fe712a6b76c6e80, 0x3ce1ddc6f2922321 +data8 0xe71f7a9b94fcb4c3, 0xbe833105ec291e91 +data8 0x3fe76840418978a0, 0x3ccda46e85432c3d +data8 0xeb96b72d3374b91e, 0xbcb2bb61493b28b3 +data8 0x3fe7bea9496d5a40, 0x3ce37b42ec6e17d3 +data8 0xf049183c3f53c39b, 0xbad848720223d3a8 +data8 0x3fe815ea59dab0a0, 0x3cb03ad41bfc415b +data8 0xf53b11ec7f415f15, 0xb8f38b57c53c9c48 +data8 0x3fe86e0c84010760, 0x3cc03bfcfb17fe1f +data8 0xfa718f05adbf2c33, 0xb70432500286b185 +data8 0x3fe8c7196b9225c0, 0x3ced99fcc6866ba9 +data8 0xfff200c3f5489608, 0xb509e6454dca33cc +data8 0x3fe9211b54441080, 0x3cb789cb53515688 +// The following table entries are not used +//data8 0x82e138a0fac48700, 0xb3044a513a8e6132 +//data8 0x3fe97c1d30f5b7c0, 0x3ce1eb765612d1d0 +//data8 0x85f4cc7fc670d021, 0xb0f2fb2ea6cbbc88 +//data8 0x3fe9d82ab4b5fde0, 0x3ced3fe6f27e8039 +//data8 0x89377c1387d5b908, 0xaed58e9a09014d5c +//data8 0x3fea355065f87fa0, 0x3cbef481d25f5b58 +//data8 0x8cad7a2c98dec333, 0xacab929ce114d451 +//data8 0x3fea939bb451e2a0, 0x3c8e92b4fbf4560f +//data8 0x905b7dfc99583025, 0xaa748cc0dbbbc0ec +//data8 0x3feaf31b11270220, 0x3cdced8c61bd7bd5 +//data8 0x9446d8191f80dd42, 0xa82ff92687235baf +//data8 0x3feb53de0bcffc20, 0x3cbe1722fb47509e +//data8 0x98758ba086e4000a, 0xa5dd497a9c184f58 +//data8 0x3febb5f571cb0560, 0x3ce0c7774329a613 +//data8 0x9cee6c7bf18e4e24, 0xa37be3c3cd1de51b +//data8 0x3fec197373bc7be0, 0x3ce08ebdb55c3177 +//data8 0xa1b944000a1b9440, 0xa10b2101b4f27e03 +//data8 0x3fec7e6bd023da60, 0x3ce5fc5fd4995959 +//data8 0xa6defd8ba04d3e38, 0x9e8a4b93cad088ec +//data8 0x3fece4f404e29b20, 0x3cea3413401132b5 +//data8 0xac69dd408a10c62d, 0x9bf89d5d17ddae8c +//data8 0x3fed4d2388f63600, 0x3cd5a7fb0d1d4276 +//data8 0xb265c39cbd80f97a, 0x99553d969fec7beb +//data8 0x3fedb714101e0a00, 0x3cdbda21f01193f2 +//data8 0xb8e081a16ae4ae73, 0x969f3e3ed2a0516c +//data8 0x3fee22e1da97bb00, 0x3ce7231177f85f71 +//data8 0xbfea427678945732, 0x93d5990f9ee787af +//data8 0x3fee90ac13b18220, 0x3ce3c8a5453363a5 +//data8 0xc79611399b8c90c5, 0x90f72bde80febc31 +//data8 0x3fef009542b712e0, 0x3ce218fd79e8cb56 +//data8 0xcffa8425040624d7, 0x8e02b4418574ebed +//data8 0x3fef72c3d2c57520, 0x3cd32a717f82203f +//data8 0xd93299cddcf9cf23, 0x8af6ca48e9c44024 +//data8 0x3fefe762b77744c0, 0x3ce53478a6bbcf94 +//data8 0xe35eda760af69ad9, 0x87d1da0d7f45678b +//data8 0x3ff02f511b223c00, 0x3ced6e11782c28fc +//data8 0xeea6d733421da0a6, 0x84921bbe64ae029a +//data8 0x3ff06c5c6f8ce9c0, 0x3ce71fc71c1ffc02 +//data8 0xfb3b2c73fc6195cc, 0x813589ba3a5651b6 +//data8 0x3ff0aaf2613700a0, 0x3cf2a72d2fd94ef3 +//data8 0x84ac1fcec4203245, 0xfb73a828893df19e +//data8 0x3ff0eb367c3fd600, 0x3cf8054c158610de +//data8 0x8ca50621110c60e6, 0xf438a14c158d867c +//data8 0x3ff12d51caa6b580, 0x3ce6bce9748739b6 +//data8 0x95b8c2062d6f8161, 0xecb3ccdd37b369da +//data8 0x3ff1717418520340, 0x3ca5c2732533177c +//data8 0xa0262917caab4ad1, 0xe4dde4ddc81fd119 +//data8 0x3ff1b7d59dd40ba0, 0x3cc4c7c98e870ff5 +//data8 0xac402c688b72f3f4, 0xdcae469be46d4c8d +//data8 0x3ff200b93cc5a540, 0x3c8dd6dc1bfe865a +//data8 0xba76968b9eabd9ab, 0xd41a8f3df1115f7f +//data8 0x3ff24c6f8f6affa0, 0x3cf1acb6d2a7eff7 +//data8 0xcb63c87c23a71dc5, 0xcb161074c17f54ec +//data8 0x3ff29b5b338b7c80, 0x3ce9b5845f6ec746 +//data8 0xdfe323b8653af367, 0xc19107d99ab27e42 +//data8 0x3ff2edf6fac7f5a0, 0x3cf77f961925fa02 +//data8 0xf93746caaba3e1f1, 0xb777744a9df03bff +//data8 0x3ff344df237486c0, 0x3cf6ddf5f6ddda43 +//data8 0x8ca77052f6c340f0, 0xacaf476f13806648 +//data8 0x3ff3a0dfa4bb4ae0, 0x3cfee01bbd761bff +//data8 0xa1a48604a81d5c62, 0xa11575d30c0aae50 +//data8 0x3ff4030b73c55360, 0x3cf1cf0e0324d37c +//data8 0xbe45074b05579024, 0x9478e362a07dd287 +//data8 0x3ff46ce4c738c4e0, 0x3ce3179555367d12 +//data8 0xe7a08b5693d214ec, 0x8690e3575b8a7c3b +//data8 0x3ff4e0a887c40a80, 0x3cfbd5d46bfefe69 +//data8 0x94503d69396d91c7, 0xedd2ce885ff04028 +//data8 0x3ff561ebd9c18cc0, 0x3cf331bd176b233b +//data8 0xced1d96c5bb209e6, 0xc965278083808702 +//data8 0x3ff5f71d7ff42c80, 0x3ce3301cc0b5a48c +//data8 0xabac2cee0fc24e20, 0x9c4eb1136094cbbd +//data8 0x3ff6ae4c63222720, 0x3cf5ff46874ee51e +//data8 0x8040201008040201, 0xb4d7ac4d9acb1bf4 +//data8 0x3ff7b7d33b928c40, 0x3cfacdee584023bb +LOCAL_OBJECT_END(T_table) + + + +.align 16 + +LOCAL_OBJECT_START(poly_coeffs) + // C_3 +data8 0xaaaaaaaaaaaaaaab, 0x0000000000003ffc + // C_5 +data8 0x999999999999999a, 0x0000000000003ffb + // C_7, C_9 +data8 0x3fa6db6db6db6db7, 0x3f9f1c71c71c71c8 + // pi/2 (low, high) +data8 0x3C91A62633145C07, 0x3FF921FB54442D18 + // C_11, C_13 +data8 0x3f96e8ba2e8ba2e9, 0x3f91c4ec4ec4ec4e + // C_15, C_17 +data8 0x3f8c99999999999a, 0x3f87a87878787223 +LOCAL_OBJECT_END(poly_coeffs) + + +R_DBL_S = r21 +R_EXP0 = r22 +R_EXP = r15 +R_SGNMASK = r23 +R_TMP = r24 +R_TMP2 = r25 +R_INDEX = r26 +R_TMP3 = r27 +R_TMP03 = r27 +R_TMP4 = r28 +R_TMP5 = r23 +R_TMP6 = r22 +R_TMP7 = r21 +R_T = r29 +R_BIAS = r20 + +F_T = f6 +F_1S2 = f7 +F_1S2_S = f9 +F_INV_1T2 = f10 +F_SQRT_1T2 = f11 +F_S2T2 = f12 +F_X = f13 +F_D = f14 +F_2M64 = f15 + +F_CS2 = f32 +F_CS3 = f33 +F_CS4 = f34 +F_CS5 = f35 +F_CS6 = f36 +F_CS7 = f37 +F_CS8 = f38 +F_CS9 = f39 +F_S23 = f40 +F_S45 = f41 +F_S67 = f42 +F_S89 = f43 +F_S25 = f44 +F_S69 = f45 +F_S29 = f46 +F_X2 = f47 +F_X4 = f48 +F_TSQRT = f49 +F_DTX = f50 +F_R = f51 +F_R2 = f52 +F_R3 = f53 +F_R4 = f54 + +F_C3 = f55 +F_C5 = f56 +F_C7 = f57 +F_C9 = f58 +F_P79 = f59 +F_P35 = f60 +F_P39 = f61 + +F_ATHI = f62 +F_ATLO = f63 + +F_T1 = f64 +F_Y = f65 +F_Y2 = f66 +F_ANDMASK = f67 +F_ORMASK = f68 +F_S = f69 +F_05 = f70 +F_SQRT_1S2 = f71 +F_DS = f72 +F_Z = f73 +F_1T2 = f74 +F_DZ = f75 +F_ZE = f76 +F_YZ = f77 +F_Y1S2 = f78 +F_Y1S2X = f79 +F_1X = f80 +F_ST = f81 +F_1T2_ST = f82 +F_TSS = f83 +F_Y1S2X2 = f84 +F_DZ_TERM = f85 +F_DTS = f86 +F_DS2X = f87 +F_T2 = f88 +F_ZY1S2S = f89 +F_Y1S2_1X = f90 +F_TS = f91 +F_PI2_LO = f92 +F_PI2_HI = f93 +F_S19 = f94 +F_INV1T2_2 = f95 +F_CORR = f96 +F_DZ0 = f97 + +F_C11 = f98 +F_C13 = f99 +F_C15 = f100 +F_C17 = f101 +F_P1113 = f102 +F_P1517 = f103 +F_P1117 = f104 +F_P317 = f105 +F_R8 = f106 +F_HI = f107 +F_1S2_HI = f108 +F_DS2 = f109 +F_Y2_2 = f110 +F_S2 = f111 +F_S_DS2 = f112 +F_S_1S2S = f113 +F_XL = f114 +F_2M128 = f115 + + +.section .text +GLOBAL_LIBM_ENTRY(asinl) + +{.mfi + // get exponent, mantissa (rounded to double precision) of s + getf.d R_DBL_S = f8 + // 1-s^2 + fnma.s1 F_1S2 = f8, f8, f1 + // r2 = pointer to T_table + addl r2 = @ltoff(T_table), gp +} + +{.mfi + // sign mask + mov R_SGNMASK = 0x20000 + nop.f 0 + // bias-63-1 + mov R_TMP03 = 0xffff-64;; +} + + +{.mfi + // get exponent of s + getf.exp R_EXP = f8 + nop.f 0 + // R_TMP4 = 2^45 + shl R_TMP4 = R_SGNMASK, 45-17 +} + +{.mlx + // load bias-4 + mov R_TMP = 0xffff-4 + // load RU(sqrt(2)/2) to integer register (in double format, shifted left by 1) + movl R_TMP2 = 0x7fcd413cccfe779a;; +} + + +{.mfi + // load 2^{-64} in FP register + setf.exp F_2M64 = R_TMP03 + nop.f 0 + // index = (0x7-exponent)|b1 b2.. b6 + extr.u R_INDEX = R_DBL_S, 46, 9 +} + +{.mfi + // get t = sign|exponent|b1 b2.. b6 1 x.. x + or R_T = R_DBL_S, R_TMP4 + nop.f 0 + // R_TMP4 = 2^45-1 + sub R_TMP4 = R_TMP4, r0, 1;; +} + + +{.mfi + // get t = sign|exponent|b1 b2.. b6 1 0.. 0 + andcm R_T = R_T, R_TMP4 + nop.f 0 + // eliminate sign from R_DBL_S (shift left by 1) + shl R_TMP3 = R_DBL_S, 1 +} + +{.mfi + // R_BIAS = 3*2^6 + mov R_BIAS = 0xc0 + nop.f 0 + // eliminate sign from R_EXP + andcm R_EXP0 = R_EXP, R_SGNMASK;; +} + + + +{.mfi + // load start address for T_table + ld8 r2 = [r2] + nop.f 0 + // p8 = 1 if |s|> = sqrt(2)/2 + cmp.geu p8, p0 = R_TMP3, R_TMP2 +} + +{.mlx + // p7 = 1 if |s|<2^{-4} (exponent of s = sqrt(2)/2, take alternate path + (p8) br.cond.sptk LARGE_S +} + +{.mlx + // index = (4-exponent)|b1 b2.. b6 + sub R_INDEX = R_INDEX, R_BIAS + // sqrt coefficient cs9 = 55*13/128 + movl R_TMP = 0x40b2c000;; +} + + +{.mfi + // sqrt coefficient cs8 = -33*13/128 + setf.s F_CS8 = R_TMP2 + nop.f 0 + // shift R_INDEX by 5 + shl R_INDEX = R_INDEX, 5 +} + +{.mfi + // sqrt coefficient cs3 = 0.5 (set exponent = bias-1) + mov R_TMP4 = 0xffff - 1 + nop.f 0 + // sqrt coefficient cs6 = -21/16 + mov R_TMP6 = 0xbfa8;; +} + + +{.mlx + // table index + add r2 = r2, R_INDEX + // sqrt coefficient cs7 = 33/16 + movl R_TMP2 = 0x40040000;; +} + + +{.mmi + // load cs9 = 55*13/128 + setf.s F_CS9 = R_TMP + // sqrt coefficient cs5 = 7/8 + mov R_TMP3 = 0x3f60 + // sqrt coefficient cs6 = 21/16 + shl R_TMP6 = R_TMP6, 16;; +} + + +{.mmi + // load significand of 1/(1-t^2) + ldf8 F_INV_1T2 = [r2], 8 + // sqrt coefficient cs7 = 33/16 + setf.s F_CS7 = R_TMP2 + // sqrt coefficient cs4 = -5/8 + mov R_TMP5 = 0xbf20;; +} + + +{.mmi + // load significand of sqrt(1-t^2) + ldf8 F_SQRT_1T2 = [r2], 8 + // sqrt coefficient cs6 = 21/16 + setf.s F_CS6 = R_TMP6 + // sqrt coefficient cs5 = 7/8 + shl R_TMP3 = R_TMP3, 16;; +} + + +{.mmi + // sqrt coefficient cs3 = 0.5 (set exponent = bias-1) + setf.exp F_CS3 = R_TMP4 + // r3 = pointer to polynomial coefficients + addl r3 = @ltoff(poly_coeffs), gp + // sqrt coefficient cs4 = -5/8 + shl R_TMP5 = R_TMP5, 16;; +} + + +{.mfi + // sqrt coefficient cs5 = 7/8 + setf.s F_CS5 = R_TMP3 + // d = s-t + fms.s1 F_D = f8, f1, F_T + // set p6 = 1 if s<0, p11 = 1 if s> = 0 + cmp.ge p6, p11 = R_EXP, R_DBL_S +} + +{.mfi + // r3 = load start address to polynomial coefficients + ld8 r3 = [r3] + // s+t + fma.s1 F_S2T2 = f8, f1, F_T + nop.i 0;; +} + + +{.mfi + // sqrt coefficient cs4 = -5/8 + setf.s F_CS4 = R_TMP5 + // s^2-t^2 + fma.s1 F_S2T2 = F_S2T2, F_D, f0 + nop.i 0;; +} + + +{.mfi + // load C3 + ldfe F_C3 = [r3], 16 + // 0.5/(1-t^2) = 2^{-64}*(2^63/(1-t^2)) + fma.s1 F_INV_1T2 = F_INV_1T2, F_2M64, f0 + nop.i 0;; +} + +{.mfi + // load C_5 + ldfe F_C5 = [r3], 16 + // set correct exponent for sqrt(1-t^2) + fma.s1 F_SQRT_1T2 = F_SQRT_1T2, F_2M64, f0 + nop.i 0;; +} + + +{.mfi + // load C_7, C_9 + ldfpd F_C7, F_C9 = [r3] + // x = -(s^2-t^2)/(1-t^2)/2 + fnma.s1 F_X = F_INV_1T2, F_S2T2, f0 + nop.i 0;; +} + + +{.mfi + // load asin(t)_high, asin(t)_low + ldfpd F_ATHI, F_ATLO = [r2] + // t*sqrt(1-t^2) + fma.s1 F_TSQRT = F_T, F_SQRT_1T2, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // cs9*x+cs8 + fma.s1 F_S89 = F_CS9, F_X, F_CS8 + nop.i 0 +} + +{.mfi + nop.m 0 + // cs7*x+cs6 + fma.s1 F_S67 = F_CS7, F_X, F_CS6 + nop.i 0;; +} + +{.mfi + nop.m 0 + // cs5*x+cs4 + fma.s1 F_S45 = F_CS5, F_X, F_CS4 + nop.i 0 +} + +{.mfi + nop.m 0 + // x*x + fma.s1 F_X2 = F_X, F_X, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // (s-t)-t*x + fnma.s1 F_DTX = F_T, F_X, F_D + nop.i 0 +} + +{.mfi + nop.m 0 + // cs3*x+cs2 (cs2 = -0.5 = -cs3) + fms.s1 F_S23 = F_CS3, F_X, F_CS3 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // cs9*x^3+cs8*x^2+cs7*x+cs6 + fma.s1 F_S69 = F_S89, F_X2, F_S67 + nop.i 0 +} + +{.mfi + nop.m 0 + // x^4 + fma.s1 F_X4 = F_X2, F_X2, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // t*sqrt(1-t^2)*x^2 + fma.s1 F_TSQRT = F_TSQRT, F_X2, f0 + nop.i 0 +} + +{.mfi + nop.m 0 + // cs5*x^3+cs4*x^2+cs3*x+cs2 + fma.s1 F_S25 = F_S45, F_X2, F_S23 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // ((s-t)-t*x)*sqrt(1-t^2) + fma.s1 F_DTX = F_DTX, F_SQRT_1T2, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // if sign is negative, negate table values: asin(t)_low + (p6) fnma.s1 F_ATLO = F_ATLO, f1, f0 + nop.i 0 +} + +{.mfi + nop.m 0 + // PS29 = cs9*x^7+..+cs5*x^3+cs4*x^2+cs3*x+cs2 + fma.s1 F_S29 = F_S69, F_X4, F_S25 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // if sign is negative, negate table values: asin(t)_high + (p6) fnma.s1 F_ATHI = F_ATHI, f1, f0 + nop.i 0 +} + +{.mfi + nop.m 0 + // R = ((s-t)-t*x)*sqrt(1-t^2)-t*sqrt(1-t^2)*x^2*PS29 + fnma.s1 F_R = F_S29, F_TSQRT, F_DTX + nop.i 0;; +} + + +{.mfi + nop.m 0 + // R^2 + fma.s1 F_R2 = F_R, F_R, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // c7+c9*R^2 + fma.s1 F_P79 = F_C9, F_R2, F_C7 + nop.i 0 +} + +{.mfi + nop.m 0 + // c3+c5*R^2 + fma.s1 F_P35 = F_C5, F_R2, F_C3 + nop.i 0;; +} + +{.mfi + nop.m 0 + // R^3 + fma.s1 F_R4 = F_R2, F_R2, f0 + nop.i 0;; +} + +{.mfi + nop.m 0 + // R^3 + fma.s1 F_R3 = F_R2, F_R, f0 + nop.i 0;; +} + + + +{.mfi + nop.m 0 + // c3+c5*R^2+c7*R^4+c9*R^6 + fma.s1 F_P39 = F_P79, F_R4, F_P35 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // asin(t)_low+R^3*(c3+c5*R^2+c7*R^4+c9*R^6) + fma.s1 F_P39 = F_P39, F_R3, F_ATLO + nop.i 0;; +} + + +{.mfi + nop.m 0 + // R+asin(t)_low+R^3*(c3+c5*R^2+c7*R^4+c9*R^6) + fma.s1 F_P39 = F_P39, f1, F_R + nop.i 0;; +} + + +{.mfb + nop.m 0 + // result = asin(t)_high+R+asin(t)_low+R^3*(c3+c5*R^2+c7*R^4+c9*R^6) + fma.s0 f8 = F_ATHI, f1, F_P39 + // return + br.ret.sptk b0;; +} + + + + +LARGE_S: + +{.mfi + // bias-1 + mov R_TMP3 = 0xffff - 1 + // y ~ 1/sqrt(1-s^2) + frsqrta.s1 F_Y, p7 = F_1S2 + // c9 = 55*13*17/128 + mov R_TMP4 = 0x10af7b +} + +{.mlx + // c8 = -33*13*15/128 + mov R_TMP5 = 0x184923 + movl R_TMP2 = 0xff00000000000000;; +} + +{.mfi + // set p6 = 1 if s<0, p11 = 1 if s>0 + cmp.ge p6, p11 = R_EXP, R_DBL_S + // 1-s^2 + fnma.s1 F_1S2 = f8, f8, f1 + // set p9 = 1 + cmp.eq p9, p0 = r0, r0;; +} + + +{.mfi + // load 0.5 + setf.exp F_05 = R_TMP3 + // (1-s^2) rounded to single precision + fnma.s.s1 F_1S2_S = f8, f8, f1 + // c9 = 55*13*17/128 + shl R_TMP4 = R_TMP4, 10 +} + +{.mlx + // AND mask for getting t ~ sqrt(1-s^2) + setf.sig F_ANDMASK = R_TMP2 + // OR mask + movl R_TMP2 = 0x0100000000000000;; +} + + +{.mfi + nop.m 0 + // (s^2)_s + fma.s.s1 F_S2 = f8, f8, f0 + nop.i 0;; +} + + +{.mmi + // c9 = 55*13*17/128 + setf.s F_CS9 = R_TMP4 + // c7 = 33*13/16 + mov R_TMP4 = 0x41d68 + // c8 = -33*13*15/128 + shl R_TMP5 = R_TMP5, 11;; +} + + +{.mfi + setf.sig F_ORMASK = R_TMP2 + // y^2 + fma.s1 F_Y2 = F_Y, F_Y, f0 + // c7 = 33*13/16 + shl R_TMP4 = R_TMP4, 12 +} + +{.mfi + // c6 = -33*7/16 + mov R_TMP6 = 0xc1670 + // y' ~ sqrt(1-s^2) + fma.s1 F_T1 = F_Y, F_1S2, f0 + // c5 = 63/8 + mov R_TMP7 = 0x40fc;; +} + + +{.mlx + // load c8 = -33*13*15/128 + setf.s F_CS8 = R_TMP5 + // c4 = -35/8 + movl R_TMP5 = 0xc08c0000;; +} + +{.mfi + // r3 = pointer to polynomial coefficients + addl r3 = @ltoff(poly_coeffs), gp + // 1-(1-s^2)_s + fnma.s1 F_DS = F_1S2_S, f1, f1 + // p9 = 0 if p7 = 1 (p9 = 1 for special cases only) + (p7) cmp.ne p9, p0 = r0, r0 +} + +{.mlx + // load c7 = 33*13/16 + setf.s F_CS7 = R_TMP4 + // c3 = 5/2 + movl R_TMP4 = 0x40200000;; +} + + +{.mfi + nop.m 0 + // 1-(s^2)_s + fnma.s1 F_S_1S2S = F_S2, f1, f1 + nop.i 0 +} + +{.mlx + // load c4 = -35/8 + setf.s F_CS4 = R_TMP5 + // c2 = -3/2 + movl R_TMP5 = 0xbfc00000;; +} + + +{.mfi + // load c3 = 5/2 + setf.s F_CS3 = R_TMP4 + // x = (1-s^2)_s*y^2-1 + fms.s1 F_X = F_1S2_S, F_Y2, f1 + // c6 = -33*7/16 + shl R_TMP6 = R_TMP6, 12 +} + +{.mfi + nop.m 0 + // y^2/2 + fma.s1 F_Y2_2 = F_Y2, F_05, f0 + nop.i 0;; +} + + +{.mfi + // load c6 = -33*7/16 + setf.s F_CS6 = R_TMP6 + // eliminate lower bits from y' + fand F_T = F_T1, F_ANDMASK + // c5 = 63/8 + shl R_TMP7 = R_TMP7, 16 +} + +{.mfb + // r3 = load start address to polynomial coefficients + ld8 r3 = [r3] + // 1-(1-s^2)_s-s^2 + fnma.s1 F_DS = f8, f8, F_DS + // p9 = 1 if s is a special input (NaN, or |s|> = 1) + (p9) br.cond.spnt ASINL_SPECIAL_CASES;; +} + +{.mmf + // get exponent, significand of y' (in single prec.) + getf.s R_TMP = F_T1 + // load c3 = -3/2 + setf.s F_CS2 = R_TMP5 + // y*(1-s^2) + fma.s1 F_Y1S2 = F_Y, F_1S2, f0;; +} + + +{.mfi + nop.m 0 + // x' = (y^2/2)*(1-(s^2)_s)-0.5 + fms.s1 F_XL = F_Y2_2, F_S_1S2S, F_05 + nop.i 0 +} + +{.mfi + nop.m 0 + // s^2-(s^2)_s + fms.s1 F_S_DS2 = f8, f8, F_S2 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // if s<0, set s = -s + (p6) fnma.s1 f8 = f8, f1, f0 + nop.i 0;; +} + +{.mfi + // load c5 = 63/8 + setf.s F_CS5 = R_TMP7 + // x = (1-s^2)_s*y^2-1+(1-(1-s^2)_s-s^2)*y^2 + fma.s1 F_X = F_DS, F_Y2, F_X + // for t = 2^k*1.b1 b2.., get 7-k|b1.. b6 + extr.u R_INDEX = R_TMP, 17, 9;; +} + + +{.mmi + // index = (4-exponent)|b1 b2.. b6 + sub R_INDEX = R_INDEX, R_BIAS + nop.m 0 + // get exponent of y + shr.u R_TMP2 = R_TMP, 23;; +} + +{.mmi + // load C3 + ldfe F_C3 = [r3], 16 + // set p8 = 1 if y'<2^{-4} + cmp.gt p8, p0 = 0x7b, R_TMP2 + // shift R_INDEX by 5 + shl R_INDEX = R_INDEX, 5;; +} + + +{.mfb + // get table index for sqrt(1-t^2) + add r2 = r2, R_INDEX + // get t = 2^k*1.b1 b2.. b7 1 + for F_T = F_T, F_ORMASK + (p8) br.cond.spnt VERY_LARGE_INPUT;; +} + + + +{.mmf + // load C5 + ldfe F_C5 = [r3], 16 + // load 1/(1-t^2) + ldfp8 F_INV_1T2, F_SQRT_1T2 = [r2], 16 + // x = ((1-s^2)*y^2-1)/2 + fma.s1 F_X = F_X, F_05, f0;; +} + + + +{.mmf + nop.m 0 + // C7, C9 + ldfpd F_C7, F_C9 = [r3], 16 + // set correct exponent for t + fmerge.se F_T = F_T1, F_T;; +} + + + +{.mfi + // pi/2 (low, high) + ldfpd F_PI2_LO, F_PI2_HI = [r3] + // c9*x+c8 + fma.s1 F_S89 = F_X, F_CS9, F_CS8 + nop.i 0 +} + +{.mfi + nop.m 0 + // x^2 + fma.s1 F_X2 = F_X, F_X, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // y*(1-s^2)*x + fma.s1 F_Y1S2X = F_Y1S2, F_X, f0 + nop.i 0 +} + +{.mfi + nop.m 0 + // c7*x+c6 + fma.s1 F_S67 = F_X, F_CS7, F_CS6 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // 1-x + fnma.s1 F_1X = F_X, f1, f1 + nop.i 0 +} + +{.mfi + nop.m 0 + // c3*x+c2 + fma.s1 F_S23 = F_X, F_CS3, F_CS2 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // 1-t^2 + fnma.s1 F_1T2 = F_T, F_T, f1 + nop.i 0 +} + +{.mfi + // load asin(t)_high, asin(t)_low + ldfpd F_ATHI, F_ATLO = [r2] + // c5*x+c4 + fma.s1 F_S45 = F_X, F_CS5, F_CS4 + nop.i 0;; +} + + + +{.mfi + nop.m 0 + // t*s + fma.s1 F_TS = F_T, f8, f0 + nop.i 0 +} + +{.mfi + nop.m 0 + // 0.5/(1-t^2) + fma.s1 F_INV_1T2 = F_INV_1T2, F_2M64, f0 + nop.i 0;; +} + +{.mfi + nop.m 0 + // z~sqrt(1-t^2), rounded to 24 significant bits + fma.s.s1 F_Z = F_SQRT_1T2, F_2M64, f0 + nop.i 0 +} + +{.mfi + nop.m 0 + // sqrt(1-t^2) + fma.s1 F_SQRT_1T2 = F_SQRT_1T2, F_2M64, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // y*(1-s^2)*x^2 + fma.s1 F_Y1S2X2 = F_Y1S2, F_X2, f0 + nop.i 0 +} + +{.mfi + nop.m 0 + // x^4 + fma.s1 F_X4 = F_X2, F_X2, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // s*t rounded to 24 significant bits + fma.s.s1 F_TSS = F_T, f8, f0 + nop.i 0 +} + +{.mfi + nop.m 0 + // c9*x^3+..+c6 + fma.s1 F_S69 = F_X2, F_S89, F_S67 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // ST = (t^2-1+s^2) rounded to 24 significant bits + fms.s.s1 F_ST = f8, f8, F_1T2 + nop.i 0 +} + +{.mfi + nop.m 0 + // c5*x^3+..+c2 + fma.s1 F_S25 = F_X2, F_S45, F_S23 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // 0.25/(1-t^2) + fma.s1 F_INV1T2_2 = F_05, F_INV_1T2, f0 + nop.i 0 +} + +{.mfi + nop.m 0 + // t*s-sqrt(1-t^2)*(1-s^2)*y + fnma.s1 F_TS = F_Y1S2, F_SQRT_1T2, F_TS + nop.i 0;; +} + + +{.mfi + nop.m 0 + // z*0.5/(1-t^2) + fma.s1 F_ZE = F_INV_1T2, F_SQRT_1T2, f0 + nop.i 0 +} + +{.mfi + nop.m 0 + // z^2+t^2-1 + fms.s1 F_DZ0 = F_Z, F_Z, F_1T2 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // (1-s^2-(1-s^2)_s)*x + fma.s1 F_DS2X = F_X, F_DS, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // t*s-(t*s)_s + fms.s1 F_DTS = F_T, f8, F_TSS + nop.i 0 +} + +{.mfi + nop.m 0 + // c9*x^7+..+c2 + fma.s1 F_S29 = F_X4, F_S69, F_S25 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // y*z + fma.s1 F_YZ = F_Z, F_Y, f0 + nop.i 0 +} + +{.mfi + nop.m 0 + // t^2 + fma.s1 F_T2 = F_T, F_T, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // 1-t^2+ST + fma.s1 F_1T2_ST = F_ST, f1, F_1T2 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // y*(1-s^2)(1-x) + fma.s1 F_Y1S2_1X = F_Y1S2, F_1X, f0 + nop.i 0 +} + +{.mfi + nop.m 0 + // dz ~ sqrt(1-t^2)-z + fma.s1 F_DZ = F_DZ0, F_ZE, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // -1+correction for sqrt(1-t^2)-z + fnma.s1 F_CORR = F_INV1T2_2, F_DZ0, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // (PS29*x^2+x)*y*(1-s^2) + fma.s1 F_S19 = F_Y1S2X2, F_S29, F_Y1S2X + nop.i 0;; +} + + +{.mfi + nop.m 0 + // z*y*(1-s^2)_s + fma.s1 F_ZY1S2S = F_YZ, F_1S2_S, f0 + nop.i 0 +} + +{.mfi + nop.m 0 + // s^2-(1-t^2+ST) + fms.s1 F_1T2_ST = f8, f8, F_1T2_ST + nop.i 0;; +} + + +{.mfi + nop.m 0 + // (t*s-(t*s)_s)+z*y*(1-s^2-(1-s^2)_s)*x + fma.s1 F_DTS = F_YZ, F_DS2X, F_DTS + nop.i 0 +} + +{.mfi + nop.m 0 + // dz*y*(1-s^2)*(1-x) + fma.s1 F_DZ_TERM = F_DZ, F_Y1S2_1X, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // R = t*s-sqrt(1-t^2)*(1-s^2)*y+sqrt(1-t^2)*(1-s^2)*y*PS19 + // (used for polynomial evaluation) + fma.s1 F_R = F_S19, F_SQRT_1T2, F_TS + nop.i 0;; +} + + +{.mfi + nop.m 0 + // (PS29*x^2)*y*(1-s^2) + fma.s1 F_S29 = F_Y1S2X2, F_S29, f0 + nop.i 0 +} + +{.mfi + nop.m 0 + // apply correction to dz*y*(1-s^2)*(1-x) + fma.s1 F_DZ_TERM = F_DZ_TERM, F_CORR, F_DZ_TERM + nop.i 0;; +} + + +{.mfi + nop.m 0 + // R^2 + fma.s1 F_R2 = F_R, F_R, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // (t*s-(t*s)_s)+z*y*(1-s^2-(1-s^2)_s)*x+dz*y*(1-s^2)*(1-x) + fma.s1 F_DZ_TERM = F_DZ_TERM, f1, F_DTS + nop.i 0;; +} + + +{.mfi + nop.m 0 + // c7+c9*R^2 + fma.s1 F_P79 = F_C9, F_R2, F_C7 + nop.i 0 +} + +{.mfi + nop.m 0 + // c3+c5*R^2 + fma.s1 F_P35 = F_C5, F_R2, F_C3 + nop.i 0;; +} + +{.mfi + nop.m 0 + // asin(t)_low-(pi/2)_low + fms.s1 F_ATLO = F_ATLO, f1, F_PI2_LO + nop.i 0 +} + +{.mfi + nop.m 0 + // R^4 + fma.s1 F_R4 = F_R2, F_R2, f0 + nop.i 0;; +} + +{.mfi + nop.m 0 + // R^3 + fma.s1 F_R3 = F_R2, F_R, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // (t*s)_s-t^2*y*z + fnma.s1 F_TSS = F_T2, F_YZ, F_TSS + nop.i 0 +} + +{.mfi + nop.m 0 + // d(ts)+z*y*d(1-s^2)*x+dz*y*(1-s^2)*(1-x)+z*y*(s^2-1+t^2-ST) + fma.s1 F_DZ_TERM = F_YZ, F_1T2_ST, F_DZ_TERM + nop.i 0;; +} + + +{.mfi + nop.m 0 + // (pi/2)_hi-asin(t)_hi + fms.s1 F_ATHI = F_PI2_HI, f1, F_ATHI + nop.i 0 +} + +{.mfi + nop.m 0 + // c3+c5*R^2+c7*R^4+c9*R^6 + fma.s1 F_P39 = F_P79, F_R4, F_P35 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // d(ts)+z*y*d(1-s^2)*x+dz*y*(1-s^2)*(1-x)+z*y*(s^2-1+t^2-ST)+ + // + sqrt(1-t^2)*y*(1-s^2)*x^2*PS29 + fma.s1 F_DZ_TERM = F_SQRT_1T2, F_S29, F_DZ_TERM + nop.i 0;; +} + + +{.mfi + nop.m 0 + // (t*s)_s-t^2*y*z+z*y*ST + fma.s1 F_TSS = F_YZ, F_ST, F_TSS + nop.i 0 +} + +{.mfi + nop.m 0 + // -asin(t)_low+R^3*(c3+c5*R^2+c7*R^4+c9*R^6) + fms.s1 F_P39 = F_P39, F_R3, F_ATLO + nop.i 0;; +} + + +{.mfi + nop.m 0 + // if s<0, change sign of F_ATHI + (p6) fnma.s1 F_ATHI = F_ATHI, f1, f0 + nop.i 0 +} + +{.mfi + nop.m 0 + // d(ts)+z*y*d(1-s^2)*x+dz*y*(1-s^2)*(1-x)+z*y*(s^2-1+t^2-ST) + + // + sqrt(1-t^2)*y*(1-s^2)*x^2*PS29 + + // - asin(t)_low+R^3*(c3+c5*R^2+c7*R^4+c9*R^6) + fma.s1 F_DZ_TERM = F_P39, f1, F_DZ_TERM + nop.i 0;; +} + + +{.mfi + nop.m 0 + // d(ts)+z*y*d(1-s^2)*x+dz*y*(1-s^2)*(1-x)+z*y*(s^2-1+t^2-ST) + + // + sqrt(1-t^2)*y*(1-s^2)*x^2*PS29 + z*y*(1-s^2)_s*x + + // - asin(t)_low+R^3*(c3+c5*R^2+c7*R^4+c9*R^6) + fma.s1 F_DZ_TERM = F_ZY1S2S, F_X, F_DZ_TERM + nop.i 0;; +} + + +{.mfi + nop.m 0 + // d(ts)+z*y*d(1-s^2)*x+dz*y*(1-s^2)*(1-x)+z*y*(s^2-1+t^2-ST) + + // + sqrt(1-t^2)*y*(1-s^2)*x^2*PS29 + z*y*(1-s^2)_s*x + + // - asin(t)_low+R^3*(c3+c5*R^2+c7*R^4+c9*R^6) + + // + (t*s)_s-t^2*y*z+z*y*ST + fma.s1 F_DZ_TERM = F_TSS, f1, F_DZ_TERM + nop.i 0;; +} + + +.pred.rel "mutex", p6, p11 +{.mfi + nop.m 0 + // result: add high part of pi/2-table value + // s>0 in this case + (p11) fma.s0 f8 = F_DZ_TERM, f1, F_ATHI + nop.i 0 +} + +{.mfb + nop.m 0 + // result: add high part of pi/2-table value + // if s<0 + (p6) fnma.s0 f8 = F_DZ_TERM, f1, F_ATHI + br.ret.sptk b0;; +} + + + + + + +SMALL_S: + + // use 15-term polynomial approximation + +{.mmi + // r3 = pointer to polynomial coefficients + addl r3 = @ltoff(poly_coeffs), gp;; + // load start address for coefficients + ld8 r3 = [r3] + mov R_TMP = 0x3fbf;; +} + + +{.mmi + add r2 = 64, r3 + ldfe F_C3 = [r3], 16 + // p7 = 1 if |s|<2^{-64} (exponent of s atan2(V/U) where U >= V. If Y > X, we must swap. +// +// p6 swap True |Y| > |X| +// p7 swap False |Y| <= |X| +// p8 X+ (If swap=True p8=p9=0) +// p9 X- +// +// all the other predicates p10 thru p15 are false for the main path +// +// Simple trigonometric identities show +// Region 1 (-45 to +45 degrees): +// X>0, |Y|<=X, V=Y, U=X atan2(Y,X) = sgnY * (0 + atan(V/U)) +// +// Region 2 (-90 to -45 degrees, and +45 to +90 degrees): +// X>0, |Y|>X, V=X, U=Y atan2(Y,X) = sgnY * (pi/2 - atan(V/U)) +// +// Region 3 (-135 to -90 degrees, and +90 to +135 degrees): +// X<0, |Y|>X, V=X, U=Y atan2(Y,X) = sgnY * (pi/2 + atan(V/U)) +// +// Region 4 (-180 to -135 degrees, and +135 to +180 degrees): +// X<0, |Y|<=X, V=Y, U=X atan2(Y,X) = sgnY * (pi - atan(V/U)) +// +// So the result is always of the form atan2(Y,X) = P + sgnXY * atan(V/U) +// +// We compute atan(V/U) from the identity +// atan(z) + atan([(V/U)-z] / [1+(V/U)z]) +// where z is a limited precision approximation (16 bits) to V/U +// +// z is calculated with the assistance of the frcpa instruction. +// +// atan(z) is calculated by a polynomial z + z^3 * p(w), w=z^2 +// where p(w) = P0+P1*w+...+P22*w^22 +// +// Let d = [(V/U)-z] / [1+(V/U)z]) = (V-U*z)/(U+V*z) +// +// Approximate atan(d) by d + P0*d^3 +// Let F = 1/(U+V*z) * (1-a), where |a|< 2^-8.8. +// Compute q(a) = 1 + a + ... + a^5. +// Then F*q(a) approximates the reciprocal to more than 50 bits. + +// Special values +//============================================================== +// Y x Result +// +number +inf +0 +// -number +inf -0 +// +number -inf +pi +// -number -inf -pi +// +// +inf +number +pi/2 +// -inf +number -pi/2 +// +inf -number +pi/2 +// -inf -number -pi/2 +// +// +inf +inf +pi/4 +// -inf +inf -pi/4 +// +inf -inf +3pi/4 +// -inf -inf -3pi/4 +// +// +1 +1 +pi/4 +// -1 +1 -pi/4 +// +1 -1 +3pi/4 +// -1 -1 -3pi/4 +// +// +number +0 +pi/2 +// -number +0 -pi/2 +// +number -0 +pi/2 +// -number -0 -pi/2 +// +// +0 +number +0 +// -0 +number -0 +// +0 -number +pi +// -0 -number -pi +// +// +0 +0 +0 +// -0 +0 -0 +// +0 -0 +pi +// -0 -0 -pi +// +// Nan anything quiet Y +// Not NaN NaN quiet X + +// atan2(+-0/+-0) sets double error tag to 37 + +// Registers used +//============================================================== + +// predicate registers used: +// p6 -> p15 + +// floating-point registers used: +// f8, f9 input +// f32 -> f119 + +// general registers used +// r32 -> r41 + +// Assembly macros +//============================================================== + +EXP_AD_P1 = r33 +EXP_AD_P2 = r34 +rsig_near_one = r35 + + +GR_SAVE_B0 = r35 +GR_SAVE_GP = r36 +GR_SAVE_PFS = r37 + +GR_Parameter_X = r38 +GR_Parameter_Y = r39 +GR_Parameter_RESULT = r40 +atan2_GR_tag = r41 + +atan2_Y = f8 +atan2_X = f9 + +atan2_u1_X = f32 +atan2_u1_Y = f33 +atan2_z2_X = f34 +atan2_z2_Y = f35 + +atan2_two = f36 +atan2_B1sq_Y = f37 +atan2_z1_X = f38 +atan2_z1_Y = f39 +atan2_B1X = f40 + +atan2_B1Y = f41 +atan2_wp_X = f42 +atan2_B1sq_X = f43 +atan2_z = f44 +atan2_w = f45 + +atan2_P0 = f46 +atan2_P1 = f47 +atan2_P2 = f48 +atan2_P3 = f49 +atan2_P4 = f50 + +atan2_P5 = f51 +atan2_P6 = f52 +atan2_P7 = f53 +atan2_P8 = f54 +atan2_P9 = f55 + +atan2_P10 = f56 +atan2_P11 = f57 +atan2_P12 = f58 +atan2_P13 = f59 +atan2_P14 = f60 + +atan2_P15 = f61 +atan2_P16 = f62 +atan2_P17 = f63 +atan2_P18 = f64 +atan2_P19 = f65 + +atan2_P20 = f66 +atan2_P21 = f67 +atan2_P22 = f68 +atan2_tmp = f68 +atan2_pi_by_2 = f69 +atan2_sgn_pi_by_2 = f69 +atan2_V13 = f70 + +atan2_W11 = f71 +atan2_E = f72 +atan2_wp_Y = f73 +atan2_V11 = f74 +atan2_V12 = f75 + +atan2_V7 = f76 +atan2_V8 = f77 +atan2_W7 = f78 +atan2_W8 = f79 +atan2_W3 = f80 + +atan2_W4 = f81 +atan2_V3 = f82 +atan2_V4 = f83 +atan2_F = f84 +atan2_gV = f85 + +atan2_V10 = f86 +atan2_zcub = f87 +atan2_V6 = f88 +atan2_V9 = f89 +atan2_W10 = f90 + +atan2_W6 = f91 +atan2_W2 = f92 +atan2_V2 = f93 +atan2_alpha = f94 +atan2_alpha_1 = f95 + +atan2_gVF = f96 +atan2_V5 = f97 +atan2_W12 = f98 +atan2_W5 = f99 +atan2_alpha_sq = f100 + +atan2_Cp = f101 +atan2_V1 = f102 +atan2_ysq = f103 +atan2_W1 = f104 +atan2_alpha_cub = f105 + +atan2_C = f106 +atan2_xsq = f107 +atan2_d = f108 +atan2_A_hi = f109 +atan2_dsq = f110 + +atan2_pd = f111 +atan2_A_lo = f112 +atan2_A = f113 +atan2_Pp = f114 +atan2_sgnY = f115 + +atan2_sig_near_one = f116 +atan2_near_one = f116 +atan2_pi = f117 +atan2_sgn_pi = f117 +atan2_3pi_by_4 = f118 +atan2_pi_by_4 = f119 + + +///////////////////////////////////////////////////////////// + + +RODATA + +.align 16 + +LOCAL_OBJECT_START(atan2_tb1) +data8 0xA21922DC45605EA1 , 0x00003FFA // P11 +data8 0xB199DD6D2675C40F , 0x0000BFFA // P10 +data8 0xC2F01E5DDD100DBE , 0x00003FFA // P9 +data8 0xD78F28FC2A592781 , 0x0000BFFA // P8 +data8 0xF0F03ADB3FC930D3 , 0x00003FFA // P7 +data8 0x88887EBB209E3543 , 0x0000BFFB // P6 +data8 0x9D89D7D55C3287A5 , 0x00003FFB // P5 +data8 0xBA2E8B9793955C77 , 0x0000BFFB // P4 +data8 0xE38E38E320A8A098 , 0x00003FFB // P3 +data8 0x9249249247E37913 , 0x0000BFFC // P2 +data8 0xCCCCCCCCCCC906CD , 0x00003FFC // P1 +data8 0xAAAAAAAAAAAAA8A9 , 0x0000BFFD // P0 +data8 0xC90FDAA22168C235 , 0x00004000 // pi +LOCAL_OBJECT_END(atan2_tb1) + +LOCAL_OBJECT_START(atan2_tb2) +data8 0xCE585A259BD8374C , 0x00003FF0 // P21 +data8 0x9F90FB984D8E39D0 , 0x0000BFF3 // P20 +data8 0x9D3436AABE218776 , 0x00003FF5 // P19 +data8 0xDEC343E068A6D2A8 , 0x0000BFF6 // P18 +data8 0xF396268151CFB11C , 0x00003FF7 // P17 +data8 0xD818B4BB43D84BF2 , 0x0000BFF8 // P16 +data8 0xA2270D30A90AA220 , 0x00003FF9 // P15 +data8 0xD5F4F2182E7A8725 , 0x0000BFF9 // P14 +data8 0x80D601879218B53A , 0x00003FFA // P13 +data8 0x9297B23CCFFB291F , 0x0000BFFA // P12 +data8 0xFE7E52D2A89995B3 , 0x0000BFEC // P22 +data8 0xC90FDAA22168C235 , 0x00003FFF // pi/2 +data8 0xC90FDAA22168C235 , 0x00003FFE // pi/4 +data8 0x96cbe3f9990e91a8 , 0x00004000 // 3pi/4 +LOCAL_OBJECT_END(atan2_tb2) + + + + +.section .text +GLOBAL_IEEE754_ENTRY(atan2) + +{ .mfi + alloc r32 = ar.pfs,1,5,4,0 + frcpa.s1 atan2_u1_X,p6 = f1,atan2_X + nop.i 999 +} +{ .mfi + addl EXP_AD_P1 = @ltoff(atan2_tb1), gp + fma.s1 atan2_two = f1,f1,f1 + nop.i 999 +;; +} + +{ .mfi + ld8 EXP_AD_P1 = [EXP_AD_P1] + frcpa.s1 atan2_u1_Y,p7 = f1,atan2_Y + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2_xsq = atan2_X,atan2_X,f0 + nop.i 999 +;; +} + +{ .mfi + nop.m 999 + fclass.m p10,p0 = atan2_Y, 0xc3 // Test for y=nan + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2_ysq = atan2_Y,atan2_Y,f0 + nop.i 999 +} +;; + +{ .mfi + add EXP_AD_P2 = 0xd0,EXP_AD_P1 + fclass.m p12,p0 = atan2_X, 0xc3 // Test for x nan + nop.i 999 +} +;; + + +// p10 Y NAN, quiet and return +{ .mfi + ldfe atan2_P11 = [EXP_AD_P1],16 + fmerge.s atan2_sgnY = atan2_Y,f1 + nop.i 999 +} +{ .mfb + ldfe atan2_P21 = [EXP_AD_P2],16 +(p10) fma.d.s0 f8 = atan2_X,atan2_Y,f0 // If y=nan, result quietized y +(p10) br.ret.spnt b0 // Exit if y=nan +;; +} + + +{ .mfi + ldfe atan2_P10 = [EXP_AD_P1],16 + fma.s1 atan2_z1_X = atan2_u1_X, atan2_Y, f0 + nop.i 999 +} +{ .mfi + ldfe atan2_P20 = [EXP_AD_P2],16 + fnma.s1 atan2_B1X = atan2_u1_X, atan2_X, atan2_two + nop.i 999 +;; +} + +{ .mfi + ldfe atan2_P9 = [EXP_AD_P1],16 + fma.s1 atan2_z1_Y = atan2_u1_Y, atan2_X, f0 + nop.i 999 +} +{ .mfi + ldfe atan2_P19 = [EXP_AD_P2],16 + fnma.s1 atan2_B1Y = atan2_u1_Y, atan2_Y, atan2_two + nop.i 999 +} +;; + +{ .mfi + ldfe atan2_P8 = [EXP_AD_P1],16 + fma.s1 atan2_z2_X = atan2_u1_X, atan2_ysq, f0 + nop.i 999 +} +{ .mfi + ldfe atan2_P18 = [EXP_AD_P2],16 + fma.s1 atan2_z2_Y = atan2_u1_Y, atan2_xsq, f0 + nop.i 999 +} +;; + +// p10 ==> x inf y ? +// p11 ==> x !inf y ? +{ .mfi + ldfe atan2_P7 = [EXP_AD_P1],16 + fclass.m p10,p11 = atan2_X, 0x23 // test for x inf + nop.i 999 +} +{ .mfb + ldfe atan2_P17 = [EXP_AD_P2],16 +(p12) fma.d.s0 f8 = atan2_X,atan2_Y,f0 // If x nan, result quiet x +(p12) br.ret.spnt b0 // Exit for x nan +;; +} + +// p6 true if swap, means |y| > |x| or ysq > xsq +// p7 true if no swap, means |x| >= |y| or xsq >= ysq +{ .mmf + ldfe atan2_P6 = [EXP_AD_P1],16 + ldfe atan2_P16 = [EXP_AD_P2],16 + fcmp.ge.s1 p7,p6 = atan2_xsq, atan2_ysq +;; +} + +{ .mfi + ldfe atan2_P5 = [EXP_AD_P1],16 + fma.s1 atan2_wp_X = atan2_z1_X, atan2_z1_X, f0 + nop.i 999 +} +{ .mfi + ldfe atan2_P15 = [EXP_AD_P2],16 + fma.s1 atan2_B1sq_X = atan2_B1X, atan2_B1X, f0 + nop.i 999 +;; +} + +{ .mfi + ldfe atan2_P4 = [EXP_AD_P1],16 +(p6) fma.s1 atan2_wp_Y = atan2_z1_Y, atan2_z1_Y, f0 + nop.i 999 +} +{ .mfi + ldfe atan2_P14 = [EXP_AD_P2],16 +(p6) fma.s1 atan2_B1sq_Y = atan2_B1Y, atan2_B1Y, f0 + nop.i 999 +;; +} + +{ .mfi + ldfe atan2_P3 = [EXP_AD_P1],16 +(p6) fma.s1 atan2_E = atan2_z2_Y, atan2_B1Y, atan2_Y + nop.i 999 +} +{ .mfi + ldfe atan2_P13 = [EXP_AD_P2],16 +(p7) fma.s1 atan2_E = atan2_z2_X, atan2_B1X, atan2_X + nop.i 999 +;; +} + + +{ .mfi + ldfe atan2_P2 = [EXP_AD_P1],16 +(p6) fma.s1 atan2_z = atan2_z1_Y, atan2_B1Y, f0 + nop.i 999 +} +{ .mfi + ldfe atan2_P12 = [EXP_AD_P2],16 +(p7) fma.s1 atan2_z = atan2_z1_X, atan2_B1X, f0 + nop.i 999 +;; +} + + +{ .mfi + ldfe atan2_P1 = [EXP_AD_P1],16 + fcmp.eq.s0 p14,p15=atan2_X,atan2_Y // Dummy for denorm and invalid + nop.i 999 +} +{ .mlx + ldfe atan2_P22 = [EXP_AD_P2],16 + movl rsig_near_one = 0x8000000000000001 // signif near 1.0 +;; +} + + +// p12 ==> x inf y inf +// p13 ==> x inf y !inf +{ .mmf + ldfe atan2_P0 = [EXP_AD_P1],16 + ldfe atan2_pi_by_2 = [EXP_AD_P2],16 +(p10) fclass.m.unc p12,p13 = atan2_Y, 0x23 // x inf, test if y inf +;; +} + +{ .mfi + ldfe atan2_pi = [EXP_AD_P1],16 +(p6) fma.s1 atan2_w = atan2_wp_Y, atan2_B1sq_Y,f0 + nop.i 999 +} +{ .mfi + ldfe atan2_pi_by_4 = [EXP_AD_P2],16 +(p7) fma.s1 atan2_w = atan2_wp_X, atan2_B1sq_X,f0 + nop.i 999 +;; +} + +{ .mfi + ldfe atan2_3pi_by_4 = [EXP_AD_P2],16 +(p11) fclass.m.unc p9,p0 = atan2_Y, 0x23 // x not inf, test if y inf + nop.i 999 +;; +} + +{ .mfi + setf.sig atan2_sig_near_one = rsig_near_one +(p12) fcmp.gt.unc.s1 p10,p11 = atan2_X,f0 // x inf, y inf, test if x +inf + nop.i 999 +} +{ .mfi + nop.m 999 +(p6) fnma.s1 atan2_gV = atan2_Y, atan2_z, atan2_X + nop.i 999 +;; +} + +{ .mfi + nop.m 999 + frcpa.s1 atan2_F,p0 = f1, atan2_E + nop.i 999 +} +{ .mfi + nop.m 999 +(p7) fnma.s1 atan2_gV = atan2_X, atan2_z, atan2_Y + nop.i 999 +;; +} + +// p13 ==> x inf y !inf +{ .mfi + nop.m 999 +(p13) fcmp.gt.unc.s1 p14,p15 = atan2_X,f0 // x inf, y !inf, test if x +inf + nop.i 999 +} +{ .mfb + nop.m 999 +(p9) fma.d.s0 f8 = atan2_sgnY, atan2_pi_by_2, f0 // +-pi/2 if x !inf, y inf +(p9) br.ret.spnt b0 // exit if x not inf, y inf, result is +-pi/2 +;; +} + +{ .mfi + nop.m 999 + fma.s1 atan2_V13 = atan2_w, atan2_P11, atan2_P10 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2_W11 = atan2_w, atan2_P21, atan2_P20 + nop.i 999 +;; +} + +{ .mfi + nop.m 999 + fma.s1 atan2_V11 = atan2_w, atan2_P9, atan2_P8 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2_V12 = atan2_w, atan2_w, f0 + nop.i 999 +;; +} + +{ .mfi + nop.m 999 + fma.s1 atan2_V8 = atan2_w, atan2_P7 , atan2_P6 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2_W8 = atan2_w, atan2_P19, atan2_P18 + nop.i 999 +;; +} + +{ .mfi + nop.m 999 + fnma.s1 atan2_alpha = atan2_E, atan2_F, f1 + nop.i 999 +} +{ .mfi + nop.m 999 + fnma.s1 atan2_alpha_1 = atan2_E, atan2_F, atan2_two + nop.i 999 +;; +} + + +{ .mfi + nop.m 999 + fma.s1 atan2_V7 = atan2_w, atan2_P5 , atan2_P4 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2_W7 = atan2_w, atan2_P17, atan2_P16 + nop.i 999 +;; +} + +{ .mfi + nop.m 999 + fma.s1 atan2_V4 = atan2_w, atan2_P3 , atan2_P2 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2_W4 = atan2_w, atan2_P15, atan2_P14 + nop.i 999 +;; +} + +{ .mfi + nop.m 999 + fma.s1 atan2_V3 = atan2_w, atan2_P1 , atan2_P0 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2_W3 = atan2_w, atan2_P13, atan2_P12 + nop.i 999 +;; +} + +{ .mfi + nop.m 999 + fma.s1 atan2_V10 = atan2_V12, atan2_V13, atan2_V11 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2_gVF = atan2_gV, atan2_F, f0 + nop.i 999 +;; +} + +{ .mfi + nop.m 999 + fma.s1 atan2_alpha_sq = atan2_alpha, atan2_alpha, f0 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2_Cp = atan2_alpha, atan2_alpha_1, f1 + nop.i 999 +;; +} + +{ .mfi + nop.m 999 + fma.s1 atan2_V9 = atan2_V12, atan2_V12, f0 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2_W10 = atan2_V12, atan2_P22 , atan2_W11 + nop.i 999 +;; +} + +{ .mfi + nop.m 999 + fma.s1 atan2_V6 = atan2_V12, atan2_V8 , atan2_V7 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2_W6 = atan2_V12, atan2_W8 , atan2_W7 + nop.i 999 +;; +} + +{ .mfi + nop.m 999 + fma.s1 atan2_V2 = atan2_V12, atan2_V4 , atan2_V3 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2_W2 = atan2_V12, atan2_W4 , atan2_W3 + nop.i 999 +;; +} + +// p8 ==> y 0 x? +// p9 ==> y !0 x? +{ .mfi + nop.m 999 + fclass.m p8,p9 = atan2_Y, 0x07 // Test for y=0 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2_zcub = atan2_z, atan2_w, f0 + nop.i 999 +;; +} + +{ .mfi + nop.m 999 + fma.s1 atan2_alpha_cub = atan2_alpha, atan2_alpha_sq, f0 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2_C = atan2_gVF, atan2_Cp, f0 + nop.i 999 +;; +} + +// p12 ==> y0 x0 +// p13 ==> y0 x!0 +{ .mfi + nop.m 999 +(p8) fclass.m.unc p12,p13 = atan2_X, 0x07 // y=0, test if x is 0 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2_W12 = atan2_V9, atan2_V9, f0 + nop.i 999 +;; +} + +{ .mfi + nop.m 999 + fma.s1 atan2_V5 = atan2_V9, atan2_V10, atan2_V6 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2_W5 = atan2_V9, atan2_W10, atan2_W6 + nop.i 999 +;; +} + + +// p9 ==> y!0 x0 +{ .mfi + nop.m 999 +(p9) fclass.m.unc p9,p0 = atan2_X, 0x07 // y not 0, test if x is 0 + nop.i 999 +} +// p10 ==> X +INF, Y +-INF +{ .mfb + nop.m 999 +(p10) fma.d.s0 f8 = atan2_sgnY, atan2_pi_by_4, f0 // x=+inf, y=inf +(p10) br.ret.spnt b0 // Exit for x=+inf, y=inf, result is +-pi/4 +;; +} + +.pred.rel "mutex",p11,p14 +{ .mfi + nop.m 999 +(p14) fmerge.s f8 = atan2_sgnY, f0 // x=+inf, y !inf, result +-0 + nop.i 999 +} +// p11 ==> X -INF, Y +-INF +{ .mfb + nop.m 999 +(p11) fma.d.s0 f8 = atan2_sgnY, atan2_3pi_by_4, f0 // x=-inf, y=inf +(p11) br.ret.spnt b0 // Exit for x=-inf, y=inf, result is +-3pi/4 +;; +} + +{ .mfi + nop.m 999 +(p13) fcmp.gt.unc.s1 p10,p11 = atan2_X,f0 // x not 0, y=0, test if x>0 + nop.i 999 +} +{ .mfb + nop.m 999 + fma.s1 atan2_d = atan2_alpha_cub, atan2_C, atan2_C +(p14) br.ret.spnt b0 // Exit if x=+inf, y !inf, result +-0 +;; +} + +{ .mfi + nop.m 999 + fma.s1 atan2_W12 = atan2_V9, atan2_W12, f0 + nop.i 999 +} +{ .mfb + nop.m 999 +(p9) fma.d.s0 f8 = atan2_sgnY, atan2_pi_by_2, f0 // x=0, y not 0 +(p9) br.ret.spnt b0 // Exit if x=0 and y not 0, result is +-pi/2 +;; +} + +{ .mfi + nop.m 999 + fma.s1 atan2_V1 = atan2_V9, atan2_V5, atan2_V2 + nop.i 999 +} +{ .mfb + nop.m 999 + fma.s1 atan2_W1 = atan2_V9, atan2_W5, atan2_W2 +(p12) br.spnt ATAN2_ERROR // Branch if x=0 and y=0 +;; +} + +{ .mfi + nop.m 999 +(p10) fmerge.s f8 = atan2_sgnY, f0 // +-0 if x>0, y=0 + nop.i 999 +} +{ .mfb + nop.m 999 +(p11) fma.d.s0 f8 = atan2_sgnY, atan2_pi, f0 // +-pi if x<0, y=0 +(p13) br.ret.spnt b0 // Exit if x!0 and y=0 +;; +} + + +{ .mfi + nop.m 999 + fma.s1 atan2_pd = atan2_P0, atan2_d, f0 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2_dsq = atan2_d, atan2_d, f0 + nop.i 999 +;; +} + + +{ .mfi + nop.m 999 + fmerge.se atan2_near_one = f1, atan2_sig_near_one // Const ~1.0 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2_Pp = atan2_W12, atan2_W1, atan2_V1 + nop.i 999 +;; +} + +// p8 true if no swap and X positive +// p9 true if no swap and X negative +// both are false is swap is true +{ .mfi + nop.m 999 +(p7) fcmp.ge.unc.s1 p8,p9 = atan2_X,f0 + nop.i 999 +} +{ .mfb + nop.m 999 +(p15) fma.d.s0 f8 = atan2_sgnY, atan2_pi, f0 +(p15) br.ret.spnt b0 // Exit if x=-inf, y !inf, result +-pi +;; +} + +{ .mfi + nop.m 999 + fma.s1 atan2_sgn_pi_by_2 = atan2_pi_by_2, atan2_sgnY, f0 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2_A_lo = atan2_pd, atan2_dsq, atan2_d + nop.i 999 +;; +} + + +{ .mfi + nop.m 999 + fma.s1 atan2_sgn_pi = atan2_pi, atan2_sgnY, f0 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2_A_hi = atan2_zcub, atan2_Pp, atan2_z + nop.i 999 +;; +} + + +// For |Y| <= |X| and X > 0, force inexact in case A_lo is zero +{ .mfi + nop.m 999 +(p8) fmpy.s0 atan2_tmp = atan2_P22, atan2_P22 + nop.i 999 +;; +} + +{ .mfi + nop.m 999 + fma.s1 atan2_A = atan2_A_hi, f1, atan2_A_lo + nop.i 999 +} +// For |Y| <= |X| and X > 0, result is A_hi + A_lo +{ .mfi + nop.m 999 +(p8) fma.d.s0 f8 = atan2_A_hi, f1, atan2_A_lo + nop.i 999 +;; +} + +.pred.rel "mutex",p6,p9 +// We perturb A by multiplying by 1.0+1ulp as we produce the result +// in order to get symmetrically rounded results in directed rounding modes. +// If we don't do this, there are a few cases where the trailing 11 bits of +// the significand of the result, before converting to double, are zero. These +// cases do not round symmetrically in round to +infinity or round to -infinity. +// The perturbation also insures that the inexact flag is set. +// For |Y| > |X|, result is +- pi/2 - (A_hi + A_lo) +{ .mfi + nop.m 999 +(p6) fnma.d.s0 f8 = atan2_A, atan2_near_one, atan2_sgn_pi_by_2 + nop.i 999 +} +// For |Y| <= |X|, and X < 0, result is +- pi + (A_hi + A_lo) +{ .mfb + nop.m 999 +(p9) fma.d.s0 f8 = atan2_A, atan2_near_one, atan2_sgn_pi + br.ret.sptk b0 +;; +} + +ATAN2_ERROR: +// Here if x=0 and y=0 +{ .mfi + nop.m 999 + fclass.m p10,p11 = atan2_X,0x05 // Test if x=+0 + nop.i 999 +} +;; + +{ .mfi + mov atan2_GR_tag = 37 +(p10) fmerge.s f10 = atan2_sgnY, f0 // x=+0, y=0 + nop.i 999 +} +{ .mfi + nop.m 999 +(p11) fma.d.s0 f10 = atan2_sgnY, atan2_pi, f0 // x=-0, y=0 + nop.i 999 +;; +} +GLOBAL_IEEE754_END(atan2) + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +// (1) +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 999 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; + + +// (2) +{ .mmi + stfd [GR_Parameter_Y] = f8,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; + +.body +// (3) +{ .mib + stfd [GR_Parameter_X] = f9 // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfd [GR_Parameter_Y] = f10 // STORE Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; + +// (4) +{ .mmi + ldfd f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) + +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/e_atan2f.S b/sysdeps/ia64/fpu/e_atan2f.S new file mode 100644 index 0000000000..67618f0437 --- /dev/null +++ b/sysdeps/ia64/fpu/e_atan2f.S @@ -0,0 +1,900 @@ +.file "atan2f.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. + +// History +//============================================================== +// 06/01/00 Initial version +// 08/15/00 Bundle added after call to __libm_error_support to properly +// set [the previously overwritten] GR_Parameter_RESULT. +// 08/17/00 Changed predicate register macro-usage to direct predicate +// names due to an assembler bug. +// 01/05/01 Fixed flag settings for denormal input. +// 01/19/01 Added documentation +// 01/30/01 Improved speed +// 02/06/02 Corrected .section statement +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/06/03 Reordered header: .section, .global, .proc, .align + +// Description +//========================================= +// The atan2 function computes the principle value of the arc tangent of y/x using +// the signs of both arguments to determine the quadrant of the return value. +// A domain error may occur if both arguments are zero. + +// The atan2 function returns the arc tangent of y/x in the range [-pi,+pi] radians. + +//.. +//..Let (v,u) = (y,x) if |y| <= |x|, and (v,u) = (x,y) otherwise. Note that +//..v and u can be negative. We state the relationship between atan2(y,x) and +//..atan(v/u). +//.. +//..Let swap = false if v = y, and swap = true if v = x. +//..Define C according to the matrix +//.. +//.. TABLE FOR C +//.. x +ve x -ve +//.. no swap (swap = false) sgn(y)*0 sgn(y)*pi +//.. swap (swap = true ) sgn(y)*pi/2 sgn(y)*pi/2 +//.. +//.. atan2(y,x) = C + atan(v/u) if no swap +//.. atan2(y,x) = C - atan(v/u) if swap +//.. +//..These relationship is more efficient to compute as we accommodate signs in v and u +//..saving the need to obtain the absolute value before computation can proceed. +//.. +//..Suppose (v,u) = (y,x), we calculate atan(v/u) as follows: +//..A = y * frcpa(x) (so A = (y/x)(1 - beta)) +//..atan(y/x) = atan(A) + atan( ((y/x)-A))/(1 + (y/x)A) ), the second term is +//..a correction. +//..atan(A) is approximated by a polynomial +//..A + p1 A^3 + p2 A^5 + ... + p10 A^21, +//..atan(G) is approximated as follows: +//..Let G = (y - Ax)/(x + Ay), atan(G) can be approximated by G + g * p1 +//..where g is a limited precision approximation to G via g = (y - Ax)*frcpa(x + Ay). +//.. +//..Suppose (v,u) = (x,y), we calculate atan(v/u) as follows: +//..Z = x * frcpa(y) (so Z = (x/y)(1 - beta)) +//..atan(x/y) = atan(Z) + atan( ((x/y)-Z))/(1 + (x/y)Z) ), the second term is +//..a correction. +//..atan(Z) is approximated by a polynomial +//..Z + p1 Z^3 + p2 Z^5 + ... + p10 Z^21, +//..atan(T) is approximated as follows: +//..Let T = (x - Ay)/(y + Ax), atan(T) can be approximated by T + t * p1 +//..where t is a limited precision approximation to T via t = (x - Ay)*frcpa(y + Ax). +//.. +//.. +//..A = y * frcpa(x) +//..atan(A) ~=~ A + p1 A^3 + ... + P10 A^21 +//.. +//..This polynomial is computed as follows: +//..Asq = A*A; Acub = A*Asq, A4 = Asq*Asq +//..A5 = Asq*Acub, A6 = Asq*A4; A11 = A5 * A6 +//.. +//..poly_A1 = p9 + Asq*p10, poly_A2 = p7 + Asq*p8, poly_A3 = p5 + Asq*p6 +//..poly_A1 = poly_A2 + A4 * poly_A1 +//..poly_A1 = poly_A3 + A4 * poly_A1 +//.. +//..poly_A4 = p1 * A +//,,poly_A5 = p3 + Asq * p4, poly_A4 = A + Asq*poly_A4 +//..poly_A5 = p2 + Asq * poly_A5 +//..poly_A4 = poly_A4 + A5 * poly_A5 +//.. +//..atan_A = poly_A4 + A11 * poly_A1 +//.. +//..atan(G) is approximated as follows: +//..G_numer = y - A*x, G_denom = x + A*y +//..H1 = frcpa(G_denom) +//..H_beta = 1 - H1 * G_denom +//..H2 = H1 + H1 * H_beta +//..H_beta2 = H_beta*H_beta +//..H3 = H2 + H2*H_beta2 +//..g = H1 * G_numer; gsq = g*g; atan_G = g*p1, atan_G = atan_G*gsq +//..atan_G = G_numer*H3 + atan_G +//.. +//.. +//..A = y * frcpa(x) +//..atan(A) ~=~ A + p1 A^3 + ... + P10 A^21 +//.. +//..This polynomial is computed as follows: +//..Asq = A*A; Acub = A*Asq, A4 = Asq*Asq +//..A5 = Asq*Acub, A6 = Asq*A4; A11 = A5 * A6 +//.. +//..poly_A1 = p9 + Asq*p10, poly_A2 = p7 + Asq*p8, poly_A3 = p5 + Asq*p6 +//..poly_A1 = poly_A2 + A4 * poly_A1 +//..poly_A1 = poly_A3 + A4 * poly_A1 +//.. +//..poly_A4 = p1 * A +//,,poly_A5 = p3 + Asq * p4, poly_A4 = A + Asq*poly_A4 +//..poly_A5 = p2 + Asq * poly_A5 +//..poly_A4 = poly_A4 + A5 * poly_A5 +//.. +//..atan_A = poly_A4 + A11 * poly_A1 +//.. +//.. +//..==================================================================== +//.. COEFFICIENTS USED IN THE COMPUTATION +//..==================================================================== + +//coef_pj, j = 1,2,...,10; atan(A) ~=~ A + p1 A^3 + p2 A^5 + ... + p10 A^21 +// +// coef_p1 = -.3333332707155439167401311806315789E+00 +// coef_p1 in dbl = BFD5 5555 1219 1621 +// +// coef_p2 = .1999967670926658391827857030875748E+00 +// coef_p2 in dbl = 3FC9 997E 7AFB FF4E +// +// coef_p3 = -.1427989384500152360161563301087296E+00 +// coef_p3 in dbl = BFC2 473C 5145 EE38 +// +// coef_p4 = .1105852823460720770079031213661163E+00 +// coef_p4 in dbl = 3FBC 4F51 2B18 65F5 +// +// coef_p5 = -.8811839915595312348625710228448363E-01 +// coef_p5 in dbl = BFB6 8EED 6A8C FA32 +// +// coef_p6 = .6742329836955067042153645159059714E-01 +// coef_p6 in dbl = 3FB1 42A7 3D7C 54E3 +// +// coef_p7 = -.4468571068774672908561591262231909E-01 +// coef_p7 in dbl = BFA6 E10B A401 393F +// +// coef_p8 = .2252333246746511135532726960586493E-01 +// coef_p8 in dbl = 3F97 105B 4160 F86B +// +// coef_p9 = -.7303884867007574742501716845542314E-02 +// coef_p9 in dbl = BF7D EAAD AA33 6451 +// +// coef_p10 = .1109686868355312093949039454619058E-02 +// coef_p10 in dbl = 3F52 2E5D 33BC 9BAA +// + +// Special values +//============================================================== +// Y x Result +// +number +inf +0 +// -number +inf -0 +// +number -inf +pi +// -number -inf -pi +// +// +inf +number +pi/2 +// -inf +number -pi/2 +// +inf -number +pi/2 +// -inf -number -pi/2 +// +// +inf +inf +pi/4 +// -inf +inf -pi/4 +// +inf -inf +3pi/4 +// -inf -inf -3pi/4 +// +// +1 +1 +pi/4 +// -1 +1 -pi/4 +// +1 -1 +3pi/4 +// -1 -1 -3pi/4 +// +// +number +0 +pi/2 // does not raise DBZ +// -number +0 -pi/2 // does not raise DBZ +// +number -0 +pi/2 // does not raise DBZ +// -number -0 -pi/2 // does not raise DBZ +// +// +0 +number +0 +// -0 +number -0 +// +0 -number +pi +// -0 -number -pi +// +// +0 +0 +0 // does not raise invalid +// -0 +0 -0 // does not raise invalid +// +0 -0 +pi // does not raise invalid +// -0 -0 -pi // does not raise invalid +// +// Nan anything quiet Y +// anything NaN quiet X + +// atan2(+-0/+-0) sets double error tag to 37 +// atan2f(+-0/+-0) sets single error tag to 38 +// These are domain errors. + + +// +// Assembly macros +//========================================= + + +// integer registers +atan2f_GR_Addr_1 = r33 +atan2f_GR_Addr_2 = r34 +GR_SAVE_B0 = r35 + +GR_SAVE_PFS = r36 +GR_SAVE_GP = r37 + +GR_Parameter_X = r38 +GR_Parameter_Y = r39 +GR_Parameter_RESULT = r40 +GR_Parameter_TAG = r41 + +// floating point registers +atan2f_coef_p1 = f32 +atan2f_coef_p10 = f33 +atan2f_coef_p7 = f34 +atan2f_coef_p6 = f35 + +atan2f_coef_p3 = f36 +atan2f_coef_p2 = f37 +atan2f_coef_p9 = f38 +atan2f_coef_p8 = f39 +atan2f_coef_p5 = f40 + +atan2f_coef_p4 = f41 +atan2f_const_piby2 = f42 +atan2f_const_pi = f43 +atan2f_const_piby4 = f44 +atan2f_const_3piby4 = f45 + +atan2f_xsq = f46 +atan2f_ysq = f47 +atan2f_xy = f48 +atan2f_const_1 = f49 +atan2f_sgn_Y = f50 + +atan2f_Z0 = f51 +atan2f_A0 = f52 +atan2f_Z = f53 +atan2f_A = f54 +atan2f_C = f55 + +atan2f_U = f56 +atan2f_Usq = f57 +atan2f_U4 = f58 +atan2f_U6 = f59 +atan2f_U8 = f60 + +atan2f_poly_u109 = f61 +atan2f_poly_u87 = f62 +atan2f_poly_u65 = f63 +atan2f_poly_u43 = f64 +atan2f_poly_u21 = f65 + +atan2f_poly_u10to7 = f66 +atan2f_poly_u6to3 = f67 +atan2f_poly_u10to3 = f68 +atan2f_poly_u10to0 = f69 +atan2f_poly_u210 = f70 + +atan2f_T_numer = f71 +atan2f_T_denom = f72 +atan2f_G_numer = f73 +atan2f_G_denom = f74 +atan2f_p1rnum = f75 + +atan2f_R_denom = f76 +atan2f_R_numer = f77 +atan2f_pR = f78 +atan2f_pRC = f79 +atan2f_pQRC = f80 + +atan2f_Q1 = f81 +atan2f_Q_beta = f82 +atan2f_Q2 = f83 +atan2f_Q_beta2 = f84 +atan2f_Q3 = f85 + +atan2f_r = f86 +atan2f_rsq = f87 +atan2f_poly_atan_U = f88 + + +// predicate registers +//atan2f_Pred_Swap = p6 // |y| > |x| +//atan2f_Pred_noSwap = p7 // |y| <= |x| +//atan2f_Pred_Xpos = p8 // x >= 0 +//atan2f_Pred_Xneg = p9 // x < 0 + + +RODATA + +.align 16 + +LOCAL_OBJECT_START(atan2f_coef_table1) +data8 0xBFD5555512191621 // p1 +data8 0x3F522E5D33BC9BAA // p10 +data8 0xBFA6E10BA401393F // p7 +data8 0x3FB142A73D7C54E3 // p6 +data8 0xBFC2473C5145EE38 // p3 +data8 0x3FC9997E7AFBFF4E // p2 +LOCAL_OBJECT_END(atan2f_coef_table1) + +LOCAL_OBJECT_START(atan2f_coef_table2) +data8 0xBF7DEAADAA336451 // p9 +data8 0x3F97105B4160F86B // p8 +data8 0xBFB68EED6A8CFA32 // p5 +data8 0x3FBC4F512B1865F5 // p4 +data8 0x3ff921fb54442d18 // pi/2 +data8 0x400921fb54442d18 // pi +data8 0x3fe921fb54442d18 // pi/4 +data8 0x4002d97c7f3321d2 // 3pi/4 +LOCAL_OBJECT_END(atan2f_coef_table2) + + + +.section .text +GLOBAL_IEEE754_ENTRY(atan2f) + +{ .mfi + alloc r32 = ar.pfs,1,5,4,0 + frcpa.s1 atan2f_Z0,p0 = f1,f8 // Approx to 1/y + nop.i 999 +} +{ .mfi + addl atan2f_GR_Addr_1 = @ltoff(atan2f_coef_table1),gp + fma.s1 atan2f_xsq = f9,f9,f0 + nop.i 999 ;; +} + + +{ .mfi + ld8 atan2f_GR_Addr_1 = [atan2f_GR_Addr_1] + frcpa.s1 atan2f_A0,p0 = f1,f9 // Approx to 1/x + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2f_ysq = f8,f8,f0 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 + fcmp.ge.s1 p8,p9 = f9,f0 // Set p8 if x>=0, p9 if x<0 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2f_xy = f9,f8,f0 + nop.i 999 ;; +} + + +{ .mfi + add atan2f_GR_Addr_2 = 0x30, atan2f_GR_Addr_1 + fmerge.s atan2f_sgn_Y = f8,f1 + nop.i 999 ;; +} + +{ .mmf + ldfpd atan2f_coef_p1,atan2f_coef_p10 = [atan2f_GR_Addr_1],16 + ldfpd atan2f_coef_p9,atan2f_coef_p8 = [atan2f_GR_Addr_2],16 + fclass.m p10,p0 = f9,0xe7 // Test x @inf|@snan|@qnan|@zero +} +;; + +{ .mfi + ldfpd atan2f_coef_p7,atan2f_coef_p6 = [atan2f_GR_Addr_1],16 + fma.s1 atan2f_T_denom = atan2f_Z0,atan2f_xsq,f8 + nop.i 999 +} +{ .mfi + ldfpd atan2f_coef_p5,atan2f_coef_p4 = [atan2f_GR_Addr_2],16 + fma.s1 atan2f_Z = atan2f_Z0,f9,f0 + nop.i 999 ;; +} + + +{ .mfi + ldfpd atan2f_coef_p3,atan2f_coef_p2 = [atan2f_GR_Addr_1],16 + fma.s1 atan2f_G_denom = atan2f_A0,atan2f_ysq,f9 + nop.i 999 +} +{ .mfi + ldfpd atan2f_const_piby2,atan2f_const_pi = [atan2f_GR_Addr_2],16 + fma.s1 atan2f_A = atan2f_A0,f8,f0 + nop.i 999 ;; +} + +{ .mfi + ldfpd atan2f_const_piby4,atan2f_const_3piby4 = [atan2f_GR_Addr_2] + fclass.m p11,p0 = f8,0xe7 // Test y @inf|@snan|@qnan|@zero + nop.i 999 +} +{ .mfb + nop.m 999 + fnma.s1 atan2f_T_numer = atan2f_Z0,atan2f_xy,f9 +(p10) br.cond.spnt ATAN2F_XY_INF_NAN_ZERO ;; // Branch on x nan,inf,zero +} + + +// p6 if |y|>|x|, p7 if |x|>=|y| , use xsq and ysq for test +{ .mfi + nop.m 999 + fcmp.gt.s1 p6,p7 = atan2f_ysq,atan2f_xsq + nop.i 999 +} +{ .mfb + nop.m 999 + fnma.s1 atan2f_G_numer = atan2f_A0,atan2f_xy,f8 +(p11) br.cond.spnt ATAN2F_XY_INF_NAN_ZERO ;; // Branch on y nan,inf,zero +} + + +{ .mfi + nop.m 999 +(p8) fma.s1 atan2f_const_1 = atan2f_sgn_Y,f0,f0 + nop.i 999 +} +{ .mfi + nop.m 999 +(p9) fma.s1 atan2f_const_1 = atan2f_sgn_Y,f1,f0 + nop.i 999 ;; +} + + +{ .mfi + nop.m 999 +(p6) fnma.s1 atan2f_U = atan2f_Z,f1,f0 + nop.i 999 +} +{ .mfi + nop.m 999 +(p6) fma.s1 atan2f_Usq = atan2f_Z,atan2f_Z,f0 + nop.i 999 ;; +} + + +{ .mfi + nop.m 999 +(p7) fma.s1 atan2f_U = atan2f_A,f1,f0 + nop.i 999 +} +{ .mfi + nop.m 999 +(p7) fma.s1 atan2f_Usq = atan2f_A,atan2f_A,f0 + nop.i 999 ;; +} + + +{ .mfi + nop.m 999 +(p6) frcpa.s1 atan2f_Q1,p0 = f1,atan2f_T_denom + nop.i 999 +} +{ .mfi + nop.m 999 +(p6) fma.s1 atan2f_R_denom = atan2f_T_denom,f1,f0 + nop.i 999 ;; +} + + +{ .mfi + nop.m 999 +(p7) frcpa.s1 atan2f_Q1,p0 = f1,atan2f_G_denom + nop.i 999 +} +{ .mfi + nop.m 999 +(p7) fma.s1 atan2f_R_denom = atan2f_G_denom,f1,f0 + nop.i 999 ;; +} + + +{ .mfi + nop.m 999 +(p6) fnma.s1 atan2f_R_numer = atan2f_T_numer,f1,f0 + nop.i 999 +} +{ .mfi + nop.m 999 +(p7) fma.s1 atan2f_R_numer = atan2f_G_numer,f1,f0 + nop.i 999 ;; +} + + +{ .mfi + nop.m 999 +(p6) fnma.s1 atan2f_p1rnum = atan2f_T_numer,atan2f_coef_p1,f0 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p7) fma.s1 atan2f_p1rnum = atan2f_G_numer,atan2f_coef_p1,f0 + nop.i 999 ;; +} + + +{ .mfi + nop.m 999 + fma.s1 atan2f_U4 = atan2f_Usq,atan2f_Usq,f0 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2f_poly_u109 = atan2f_Usq,atan2f_coef_p10,atan2f_coef_p9 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 + fma.s1 atan2f_poly_u87 = atan2f_Usq,atan2f_coef_p8,atan2f_coef_p7 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2f_poly_u65 = atan2f_Usq,atan2f_coef_p6,atan2f_coef_p5 + nop.i 999 ;; +} + + +{ .mfi + nop.m 999 + fma.s1 atan2f_poly_u43 = atan2f_Usq,atan2f_coef_p4,atan2f_coef_p3 + nop.i 999 +} +{ .mfi + nop.m 999 + fnma.s1 atan2f_Q_beta = atan2f_Q1,atan2f_R_denom,f1 + nop.i 999 ;; +} + + +{ .mfi + nop.m 999 + fma.s1 atan2f_poly_u21 = atan2f_Usq,atan2f_coef_p2,atan2f_coef_p1 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2f_r = atan2f_Q1,atan2f_R_numer,f0 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p6) fma.s1 atan2f_C = atan2f_sgn_Y,atan2f_const_piby2,f0 + nop.i 999 +} +{ .mfi + nop.m 999 +(p7) fma.s1 atan2f_C = atan2f_const_1,atan2f_const_pi,f0 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 + fma.s1 atan2f_U6 = atan2f_U4,atan2f_Usq,f0 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2f_U8 = atan2f_U4,atan2f_U4,f0 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 + fma.s1 atan2f_poly_u10to7 = atan2f_U4,atan2f_poly_u109,atan2f_poly_u87 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2f_pR = atan2f_p1rnum,atan2f_Q1,f0 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 + fma.s1 atan2f_poly_u6to3 = atan2f_U4,atan2f_poly_u65,atan2f_poly_u43 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2f_Q2 = atan2f_Q1,atan2f_Q_beta,atan2f_Q1 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 + fma.s1 atan2f_Q_beta2 = atan2f_Q_beta,atan2f_Q_beta,f0 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2f_rsq = atan2f_r,atan2f_r,f0 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 + fma.s1 atan2f_poly_u210 = atan2f_Usq,atan2f_poly_u21,f1 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 + fcmp.eq.s0 p8,p0 = f8,f9 // Dummy op to set flag on denormal inputs + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2f_poly_u10to3 = atan2f_U8,atan2f_poly_u10to7,atan2f_poly_u6to3 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 + fma.s1 atan2f_Q3 = atan2f_Q2,atan2f_Q_beta2,atan2f_Q2 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2f_pRC = atan2f_rsq,atan2f_pR,atan2f_C + nop.i 999 ;; +} + +{ .mfi + nop.m 999 + fma.s1 atan2f_poly_u10to0 = atan2f_U6,atan2f_poly_u10to3,atan2f_poly_u210 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 + fma.s1 atan2f_pQRC = atan2f_R_numer,atan2f_Q3,atan2f_pRC + nop.i 999 ;; +} + +{ .mfb + nop.m 999 + fma.s.s0 f8 = atan2f_U,atan2f_poly_u10to0,atan2f_pQRC + br.ret.sptk b0 ;; +} + + + +ATAN2F_XY_INF_NAN_ZERO: + +{ .mfi + nop.m 999 + fclass.m p10,p0 = f8,0xc3 // Is y nan + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fclass.m p12,p0 = f9,0xc3 // Is x nan + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fclass.m p6,p0 = f9,0x21 // Is x +inf + nop.i 999 +} +{ .mfb + nop.m 999 +(p10) fma.s.s0 f8 = f9,f8,f0 // Result quietized y if y is nan +(p10) br.ret.spnt b0 // Exit if y is nan +} +;; + + +{ .mfi + nop.m 999 +(p6) fclass.m.unc p7,p8 = f8,0x23 // x +inf, is y inf + nop.i 999 +} +{ .mfb + nop.m 999 +(p12) fnorm.s.s0 f8 = f9 // Result quietized x if x is nan, y not nan +(p12) br.ret.spnt b0 // Exit if x is nan, y not nan +} +;; + +// Here if x or y inf, or x or y zero +{ .mfi + nop.m 999 + fcmp.eq.s0 p15,p0 = f8,f9 // Dummy op to set flag on denormal inputs + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fclass.m p11,p12 = f9,0x22 // Is x -inf + nop.i 999 +} +{ .mfb + nop.m 999 +(p7) fma.s.s0 f8 = atan2f_sgn_Y, atan2f_const_piby4,f0 // Result +-pi/4 +(p7) br.ret.spnt b0 // Exit if x +inf and y inf +} +;; + +{ .mfb + nop.m 999 +(p8) fmerge.s f8 = f8,f0 // If x +inf and y not inf, result +-0 +(p8) br.ret.spnt b0 // Exit if x +inf and y not inf +} +;; + +{ .mfi + nop.m 999 +(p12) fclass.m.unc p13,p0 = f8,0x23 // x not -inf, is y inf + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p11) fclass.m.unc p14,p15 = f8,0x23 // x -inf, is y inf + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fclass.m p6,p7 = f9,0x7 // Is x zero + nop.i 999 +} +{ .mfb + nop.m 999 +(p13) fma.s.s0 f8 = atan2f_sgn_Y, atan2f_const_piby2,f0 // Result +-pi/2 +(p13) br.ret.spnt b0 // Exit if x not -inf and y inf +} +;; + +{ .mfi + nop.m 999 +(p14) fma.s.s0 f8 = atan2f_sgn_Y, atan2f_const_3piby4,f0 // Result +-3pi/4 + nop.i 999 +} +{ .mfb + nop.m 999 +(p15) fma.s.s0 f8 = atan2f_sgn_Y, atan2f_const_pi,f0 // Result +-pi +(p11) br.ret.spnt b0 // Exit if x -inf +} +;; + +// Here if x or y zero +{ .mfi + nop.m 999 +(p7) fclass.m.unc p8,p9 = f9,0x19 // x not zero, y zero, is x > zero + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p6) fclass.m.unc p10,p11 = f8,0x7 // x zero, is y zero + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p8) fmerge.s f8 = f8, f0 // x > zero and y zero, result is +-zero + nop.i 999 +} +{ .mfb + nop.m 999 +(p9) fma.s.s0 f8 = atan2f_sgn_Y, atan2f_const_pi,f0 // x < 0, y 0, result +-pi +(p10) br.cond.spnt __libm_error_region // Branch if x zero and y zero +} +;; + +{ .mfb + nop.m 999 +(p11) fma.s.s0 f8 = atan2f_sgn_Y, atan2f_const_piby2,f0 // x zero, y not zero + br.ret.sptk b0 // Final special case exit +} +;; + + +GLOBAL_IEEE754_END(atan2f) + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue + mov GR_Parameter_TAG = 38 + fclass.m p10,p11 = f9,0x5 // @zero | @pos +;; +(p10) fmerge.s f10 = f8, f0 +(p11) fma.s.s0 f10 = atan2f_sgn_Y, atan2f_const_pi,f0 +;; + +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 999 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} + +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +} +;; + +{ .mmi + stfs [GR_Parameter_Y] = f9,16 // Store Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +} +;; + + +.body +{ .mib + stfs [GR_Parameter_X] = f8 // Store Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y + nop.b 0 // Parameter 3 address +} +{ .mib + stfs [GR_Parameter_Y] = f10 // Store Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +} +;; +{ .mmi + nop.m 0 + nop.m 0 + add GR_Parameter_RESULT = 48,sp +};; + +{ .mmi + ldfs f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +} +;; + +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +} +;; + +LOCAL_LIBM_END(__libm_error_region) + +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/e_atan2l.c b/sysdeps/ia64/fpu/e_atan2l.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/e_atan2l.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/e_atanh.S b/sysdeps/ia64/fpu/e_atanh.S new file mode 100644 index 0000000000..4ae5ee6926 --- /dev/null +++ b/sysdeps/ia64/fpu/e_atanh.S @@ -0,0 +1,1071 @@ +.file "atanh.s" + + +// Copyright (c) 2000 - 2005, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// ============================================================== +// History +// ============================================================== +// 05/03/01 Initial version +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/06/03 Reordered header: .section, .global, .proc, .align +// 05/26/03 Improved performance, fixed to handle unorms +// 03/31/05 Reformatted delimiters between data tables +// +// API +// ============================================================== +// double atanh(double) +// +// Overview of operation +// ============================================================== +// +// There are 7 paths: +// 1. x = +/-0.0 +// Return atanh(x) = +/-0.0 +// +// 2. 0.0 < |x| < 1/4 +// Return atanh(x) = Po2l(x), +// where Po2l(x) = (((((((((C9*x^2 + C8)*x^2 + C7)*x^2 + C6)*x^2 + +// C5)*x^2 + C4)*x^2 + C3)*x^2 + C2)*x^2 + C1)* x^2 + C0)*x^3 + x +// 3. 1/4 <= |x| < 1 +// Return atanh(x) = sign(x) * log((1 + |x|)/(1 - |x|)) +// To compute (1 + |x|)/(1 - |x|) modified Newton Raphson method is used +// (3 iterations) +// Algorithm description for log function see below. +// +// 4. |x| = 1 +// Return atanh(x) = sign(x) * +INF +// +// 5. 1 < |x| <= +INF +// Return atanh(x) = QNaN +// +// 6. x = [S,Q]NaN +// Return atanh(x) = QNaN +// +// 7. x = denormal +// Return atanh(x) = x +// +//============================================================== +// Algorithm Description for log(x) function +// Below we are using the fact that inequality x - 1.0 > 2^(-6) is always true +// for this atanh implementation +// +// Consider x = 2^N 1.f1 f2 f3 f4...f63 +// Log(x) = log(x * frcpa(x) / frcpa(x)) +// = log(x * frcpa(x)) + log(1/frcpa(x)) +// = log(x * frcpa(x)) - log(frcpa(x)) +// +// frcpa(x) = 2^-N * frcpa(1.f1 f2 ... f63) +// +// -log(frcpa(x)) = -log(C) +// = -log(2^-N) - log(frcpa(1.f1 f2 ... f63)) +// +// -log(frcpa(x)) = -log(C) +// = N*log2 - log(frcpa(1.f1 f2 ... f63)) +// +// +// Log(x) = log(1/frcpa(x)) + log(frcpa(x) x) +// +// Log(x) = N*log2 + log(1./frcpa(1.f1 f2 ... f63)) + log(x * frcpa(x)) +// Log(x) = N*log2 + T + log(frcpa(x) x) +// +// Log(x) = N*log2 + T + log(C * x) +// +// C * x = 1 + r +// +// Log(x) = N*log2 + T + log(1 + r) +// Log(x) = N*log2 + T + Series(r - r^2/2 + r^3/3 - r^4/4 + ...) +// +// 1.f1 f2 ... f8 has 256 entries. +// They are 1 + k/2^8, k = 0 ... 255 +// These 256 values are the table entries. +// +// Implementation +//============================================================== +// C = frcpa(x) +// r = C * x - 1 +// +// Form rseries = r + P1*r^2 + P2*r^3 + P3*r^4 + P4*r^5 + P5*r^6 +// +// x = f * 2*N where f is 1.f_1f_2f_3...f_63 +// Nfloat = float(n) where n is the true unbiased exponent +// pre-index = f_1f_2....f_8 +// index = pre_index * 16 +// get the dxt table entry at index + offset = T +// +// result = (T + Nfloat * log(2)) + rseries +// +// The T table is calculated as follows +// Form x_k = 1 + k/2^8 where k goes from 0... 255 +// y_k = frcpa(x_k) +// log(1/y_k) in quad and round to double-extended +// +// +// Registers used +//============================================================== +// Floating Point registers used: +// f8, input +// f32 -> f77 + +// General registers used: +// r14 -> r27, r33 -> r39 + +// Predicate registers used: +// p6 -> p14 + +// p10, p11 to indicate is argument positive or negative +// p12 to filter out case when x = [Q,S]NaN or +/-0 +// p13 to filter out case when x = denormal +// p6, p7 to filter out case when |x| >= 1 +// p8 to filter out case when |x| < 1/4 + +// Assembly macros +//============================================================== +Data2Ptr = r14 +Data3Ptr = r15 +RcpTablePtr = r16 +rExpbMask = r17 +rBias = r18 +rNearZeroBound = r19 +rArgSExpb = r20 +rArgExpb = r21 +rSExpb = r22 +rExpb = r23 +rSig = r24 +rN = r25 +rInd = r26 +DataPtr = r27 + +GR_SAVE_B0 = r33 +GR_SAVE_GP = r34 +GR_SAVE_PFS = r35 + +GR_Parameter_X = r36 +GR_Parameter_Y = r37 +GR_Parameter_RESULT = r38 +atanh_GR_tag = r39 + +//============================================================== +fAbsX = f32 +fOneMx = f33 +fOnePx = f34 +fY = f35 +fR = f36 +fR2 = f37 +fR3 = f38 +fRcp = f39 +fY4Rcp = f40 +fRcp0 = f41 +fRcp0n = f42 +fRcp1 = f43 +fRcp2 = f44 +fRcp3 = f45 +fN4Cvt = f46 +fN = f47 +fY2 = f48 +fLog2 = f49 +fLogT = f50 +fLogT_N = f51 +fX2 = f52 +fX3 = f53 +fX4 = f54 +fX8 = f55 +fP0 = f56 +fP5 = f57 +fP4 = f58 +fP3 = f59 +fP2 = f60 +fP1 = f61 +fNormX = f62 +fC9 = f63 +fC8 = f64 +fC7 = f65 +fC6 = f66 +fC5 = f67 +fC4 = f68 +fC3 = f69 +fC2 = f70 +fC1 = f71 +fC0 = f72 +fP98 = f73 +fP76 = f74 +fP54 = f75 +fP32 = f76 +fP10 = f77 + +// Data tables +//============================================================== +RODATA +.align 16 + +LOCAL_OBJECT_START(atanh_data) +data8 0xBFC5555DA7212371 // P5 +data8 0x3FC999A19EEF5826 // P4 +data8 0xBFCFFFFFFFFEF009 // P3 +data8 0x3FD555555554ECB2 // P2 +data8 0xBFE0000000000000 // P1 = -0.5 +data8 0x0000000000000000 // pad +data8 0xb17217f7d1cf79ac , 0x00003ffd // 0.5*log(2) +data8 0x0000000000000000 , 0x00000000 // pad to eliminate bank conflicts +LOCAL_OBJECT_END(atanh_data) + +LOCAL_OBJECT_START(atanh_data_2) +data8 0x8649FB89D3AD51FB , 0x00003FFB // C9 +data8 0xCC10AABEF160077A , 0x00003FFA // C8 +data8 0xF1EDB99AC0819CE2 , 0x00003FFA // C7 +data8 0x8881E53A809AD24D , 0x00003FFB // C6 +data8 0x9D8A116EF212F271 , 0x00003FFB // C5 +data8 0xBA2E8A6D1D756453 , 0x00003FFB // C4 +data8 0xE38E38E7A0945692 , 0x00003FFB // C3 +data8 0x924924924536891A , 0x00003FFC // C2 +data8 0xCCCCCCCCCCD08D51 , 0x00003FFC // C1 +data8 0xAAAAAAAAAAAAAA0C , 0x00003FFD // C0 +LOCAL_OBJECT_END(atanh_data_2) + + +LOCAL_OBJECT_START(atanh_data_3) +data8 0x80200aaeac44ef38 , 0x00003ff5 // log(1/frcpa(1+0/2^-8))/2 +// +data8 0xc09090a2c35aa070 , 0x00003ff6 // log(1/frcpa(1+1/2^-8))/2 +data8 0xa0c94fcb41977c75 , 0x00003ff7 // log(1/frcpa(1+2/2^-8))/2 +data8 0xe18b9c263af83301 , 0x00003ff7 // log(1/frcpa(1+3/2^-8))/2 +data8 0x8d35c8d6399c30ea , 0x00003ff8 // log(1/frcpa(1+4/2^-8))/2 +data8 0xadd4d2ecd601cbb8 , 0x00003ff8 // log(1/frcpa(1+5/2^-8))/2 +// +data8 0xce95403a192f9f01 , 0x00003ff8 // log(1/frcpa(1+6/2^-8))/2 +data8 0xeb59392cbcc01096 , 0x00003ff8 // log(1/frcpa(1+7/2^-8))/2 +data8 0x862c7d0cefd54c5d , 0x00003ff9 // log(1/frcpa(1+8/2^-8))/2 +data8 0x94aa63c65e70d499 , 0x00003ff9 // log(1/frcpa(1+9/2^-8))/2 +data8 0xa54a696d4b62b382 , 0x00003ff9 // log(1/frcpa(1+10/2^-8))/2 +// +data8 0xb3e4a796a5dac208 , 0x00003ff9 // log(1/frcpa(1+11/2^-8))/2 +data8 0xc28c45b1878340a9 , 0x00003ff9 // log(1/frcpa(1+12/2^-8))/2 +data8 0xd35c55f39d7a6235 , 0x00003ff9 // log(1/frcpa(1+13/2^-8))/2 +data8 0xe220f037b954f1f5 , 0x00003ff9 // log(1/frcpa(1+14/2^-8))/2 +data8 0xf0f3389b036834f3 , 0x00003ff9 // log(1/frcpa(1+15/2^-8))/2 +// +data8 0xffd3488d5c980465 , 0x00003ff9 // log(1/frcpa(1+16/2^-8))/2 +data8 0x87609ce2ed300490 , 0x00003ffa // log(1/frcpa(1+17/2^-8))/2 +data8 0x8ede9321e8c85927 , 0x00003ffa // log(1/frcpa(1+18/2^-8))/2 +data8 0x96639427f2f8e2f4 , 0x00003ffa // log(1/frcpa(1+19/2^-8))/2 +data8 0x9defad3e8f73217b , 0x00003ffa // log(1/frcpa(1+20/2^-8))/2 +// +data8 0xa582ebd50097029c , 0x00003ffa // log(1/frcpa(1+21/2^-8))/2 +data8 0xac06dbe75ab80fee , 0x00003ffa // log(1/frcpa(1+22/2^-8))/2 +data8 0xb3a78449b2d3ccca , 0x00003ffa // log(1/frcpa(1+23/2^-8))/2 +data8 0xbb4f79635ab46bb2 , 0x00003ffa // log(1/frcpa(1+24/2^-8))/2 +data8 0xc2fec93a83523f3f , 0x00003ffa // log(1/frcpa(1+25/2^-8))/2 +// +data8 0xc99af2eaca4c4571 , 0x00003ffa // log(1/frcpa(1+26/2^-8))/2 +data8 0xd1581106472fa653 , 0x00003ffa // log(1/frcpa(1+27/2^-8))/2 +data8 0xd8002560d4355f2e , 0x00003ffa // log(1/frcpa(1+28/2^-8))/2 +data8 0xdfcb43b4fe508632 , 0x00003ffa // log(1/frcpa(1+29/2^-8))/2 +data8 0xe67f6dff709d4119 , 0x00003ffa // log(1/frcpa(1+30/2^-8))/2 +// +data8 0xed393b1c22351280 , 0x00003ffa // log(1/frcpa(1+31/2^-8))/2 +data8 0xf5192bff087bcc35 , 0x00003ffa // log(1/frcpa(1+32/2^-8))/2 +data8 0xfbdf4ff6dfef2fa3 , 0x00003ffa // log(1/frcpa(1+33/2^-8))/2 +data8 0x81559a97f92f9cc7 , 0x00003ffb // log(1/frcpa(1+34/2^-8))/2 +data8 0x84be72bce90266e8 , 0x00003ffb // log(1/frcpa(1+35/2^-8))/2 +// +data8 0x88bc74113f23def2 , 0x00003ffb // log(1/frcpa(1+36/2^-8))/2 +data8 0x8c2ba3edf6799d11 , 0x00003ffb // log(1/frcpa(1+37/2^-8))/2 +data8 0x8f9dc92f92ea08b1 , 0x00003ffb // log(1/frcpa(1+38/2^-8))/2 +data8 0x9312e8f36efab5a7 , 0x00003ffb // log(1/frcpa(1+39/2^-8))/2 +data8 0x968b08643409ceb6 , 0x00003ffb // log(1/frcpa(1+40/2^-8))/2 +// +data8 0x9a062cba08a1708c , 0x00003ffb // log(1/frcpa(1+41/2^-8))/2 +data8 0x9d845b3abf95485c , 0x00003ffb // log(1/frcpa(1+42/2^-8))/2 +data8 0xa06fd841bc001bb4 , 0x00003ffb // log(1/frcpa(1+43/2^-8))/2 +data8 0xa3f3a74652fbe0db , 0x00003ffb // log(1/frcpa(1+44/2^-8))/2 +data8 0xa77a8fb2336f20f5 , 0x00003ffb // log(1/frcpa(1+45/2^-8))/2 +// +data8 0xab0497015d28b0a0 , 0x00003ffb // log(1/frcpa(1+46/2^-8))/2 +data8 0xae91c2be6ba6a615 , 0x00003ffb // log(1/frcpa(1+47/2^-8))/2 +data8 0xb189d1b99aebb20b , 0x00003ffb // log(1/frcpa(1+48/2^-8))/2 +data8 0xb51cced5de9c1b2c , 0x00003ffb // log(1/frcpa(1+49/2^-8))/2 +data8 0xb819bee9e720d42f , 0x00003ffb // log(1/frcpa(1+50/2^-8))/2 +// +data8 0xbbb2a0947b093a5d , 0x00003ffb // log(1/frcpa(1+51/2^-8))/2 +data8 0xbf4ec1505811684a , 0x00003ffb // log(1/frcpa(1+52/2^-8))/2 +data8 0xc2535bacfa8975ff , 0x00003ffb // log(1/frcpa(1+53/2^-8))/2 +data8 0xc55a3eafad187eb8 , 0x00003ffb // log(1/frcpa(1+54/2^-8))/2 +data8 0xc8ff2484b2c0da74 , 0x00003ffb // log(1/frcpa(1+55/2^-8))/2 +// +data8 0xcc0b1a008d53ab76 , 0x00003ffb // log(1/frcpa(1+56/2^-8))/2 +data8 0xcfb6203844b3209b , 0x00003ffb // log(1/frcpa(1+57/2^-8))/2 +data8 0xd2c73949a47a19f5 , 0x00003ffb // log(1/frcpa(1+58/2^-8))/2 +data8 0xd5daae18b49d6695 , 0x00003ffb // log(1/frcpa(1+59/2^-8))/2 +data8 0xd8f08248cf7e8019 , 0x00003ffb // log(1/frcpa(1+60/2^-8))/2 +// +data8 0xdca7749f1b3e540e , 0x00003ffb // log(1/frcpa(1+61/2^-8))/2 +data8 0xdfc28e033aaaf7c7 , 0x00003ffb // log(1/frcpa(1+62/2^-8))/2 +data8 0xe2e012a5f91d2f55 , 0x00003ffb // log(1/frcpa(1+63/2^-8))/2 +data8 0xe600064ed9e292a8 , 0x00003ffb // log(1/frcpa(1+64/2^-8))/2 +data8 0xe9226cce42b39f60 , 0x00003ffb // log(1/frcpa(1+65/2^-8))/2 +// +data8 0xec4749fd97a28360 , 0x00003ffb // log(1/frcpa(1+66/2^-8))/2 +data8 0xef6ea1bf57780495 , 0x00003ffb // log(1/frcpa(1+67/2^-8))/2 +data8 0xf29877ff38809091 , 0x00003ffb // log(1/frcpa(1+68/2^-8))/2 +data8 0xf5c4d0b245cb89be , 0x00003ffb // log(1/frcpa(1+69/2^-8))/2 +data8 0xf8f3afd6fcdef3aa , 0x00003ffb // log(1/frcpa(1+70/2^-8))/2 +// +data8 0xfc2519756be1abc7 , 0x00003ffb // log(1/frcpa(1+71/2^-8))/2 +data8 0xff59119f503e6832 , 0x00003ffb // log(1/frcpa(1+72/2^-8))/2 +data8 0x8147ce381ae0e146 , 0x00003ffc // log(1/frcpa(1+73/2^-8))/2 +data8 0x82e45f06cb1ad0f2 , 0x00003ffc // log(1/frcpa(1+74/2^-8))/2 +data8 0x842f5c7c573cbaa2 , 0x00003ffc // log(1/frcpa(1+75/2^-8))/2 +// +data8 0x85ce471968c8893a , 0x00003ffc // log(1/frcpa(1+76/2^-8))/2 +data8 0x876e8305bc04066d , 0x00003ffc // log(1/frcpa(1+77/2^-8))/2 +data8 0x891012678031fbb3 , 0x00003ffc // log(1/frcpa(1+78/2^-8))/2 +data8 0x8a5f1493d766a05f , 0x00003ffc // log(1/frcpa(1+79/2^-8))/2 +data8 0x8c030c778c56fa00 , 0x00003ffc // log(1/frcpa(1+80/2^-8))/2 +// +data8 0x8da85df17e31d9ae , 0x00003ffc // log(1/frcpa(1+81/2^-8))/2 +data8 0x8efa663e7921687e , 0x00003ffc // log(1/frcpa(1+82/2^-8))/2 +data8 0x90a22b6875c6a1f8 , 0x00003ffc // log(1/frcpa(1+83/2^-8))/2 +data8 0x91f62cc8f5d24837 , 0x00003ffc // log(1/frcpa(1+84/2^-8))/2 +data8 0x93a06cfc3857d980 , 0x00003ffc // log(1/frcpa(1+85/2^-8))/2 +// +data8 0x94f66d5e6fd01ced , 0x00003ffc // log(1/frcpa(1+86/2^-8))/2 +data8 0x96a330156e6772f2 , 0x00003ffc // log(1/frcpa(1+87/2^-8))/2 +data8 0x97fb3582754ea25b , 0x00003ffc // log(1/frcpa(1+88/2^-8))/2 +data8 0x99aa8259aad1bbf2 , 0x00003ffc // log(1/frcpa(1+89/2^-8))/2 +data8 0x9b0492f6227ae4a8 , 0x00003ffc // log(1/frcpa(1+90/2^-8))/2 +// +data8 0x9c5f8e199bf3a7a5 , 0x00003ffc // log(1/frcpa(1+91/2^-8))/2 +data8 0x9e1293b9998c1daa , 0x00003ffc // log(1/frcpa(1+92/2^-8))/2 +data8 0x9f6fa31e0b41f308 , 0x00003ffc // log(1/frcpa(1+93/2^-8))/2 +data8 0xa0cda11eaf46390e , 0x00003ffc // log(1/frcpa(1+94/2^-8))/2 +data8 0xa22c8f029cfa45aa , 0x00003ffc // log(1/frcpa(1+95/2^-8))/2 +// +data8 0xa3e48badb7856b34 , 0x00003ffc // log(1/frcpa(1+96/2^-8))/2 +data8 0xa5459a0aa95849f9 , 0x00003ffc // log(1/frcpa(1+97/2^-8))/2 +data8 0xa6a79c84480cfebd , 0x00003ffc // log(1/frcpa(1+98/2^-8))/2 +data8 0xa80a946d0fcb3eb2 , 0x00003ffc // log(1/frcpa(1+99/2^-8))/2 +data8 0xa96e831a3ea7b314 , 0x00003ffc // log(1/frcpa(1+100/2^-8))/2 +// +data8 0xaad369e3dc544e3b , 0x00003ffc // log(1/frcpa(1+101/2^-8))/2 +data8 0xac92e9588952c815 , 0x00003ffc // log(1/frcpa(1+102/2^-8))/2 +data8 0xadfa035aa1ed8fdc , 0x00003ffc // log(1/frcpa(1+103/2^-8))/2 +data8 0xaf6219eae1ad6e34 , 0x00003ffc // log(1/frcpa(1+104/2^-8))/2 +data8 0xb0cb2e6d8160f753 , 0x00003ffc // log(1/frcpa(1+105/2^-8))/2 +// +data8 0xb2354249ad950f72 , 0x00003ffc // log(1/frcpa(1+106/2^-8))/2 +data8 0xb3a056e98ef4a3b4 , 0x00003ffc // log(1/frcpa(1+107/2^-8))/2 +data8 0xb50c6dba52c6292a , 0x00003ffc // log(1/frcpa(1+108/2^-8))/2 +data8 0xb679882c33876165 , 0x00003ffc // log(1/frcpa(1+109/2^-8))/2 +data8 0xb78c07429785cedc , 0x00003ffc // log(1/frcpa(1+110/2^-8))/2 +// +data8 0xb8faeb8dc4a77d24 , 0x00003ffc // log(1/frcpa(1+111/2^-8))/2 +data8 0xba6ad77eb36ae0d6 , 0x00003ffc // log(1/frcpa(1+112/2^-8))/2 +data8 0xbbdbcc915e9bee50 , 0x00003ffc // log(1/frcpa(1+113/2^-8))/2 +data8 0xbd4dcc44f8cf12ef , 0x00003ffc // log(1/frcpa(1+114/2^-8))/2 +data8 0xbec0d81bf5b531fa , 0x00003ffc // log(1/frcpa(1+115/2^-8))/2 +// +data8 0xc034f19c139186f4 , 0x00003ffc // log(1/frcpa(1+116/2^-8))/2 +data8 0xc14cb69f7c5e55ab , 0x00003ffc // log(1/frcpa(1+117/2^-8))/2 +data8 0xc2c2abbb6e5fd56f , 0x00003ffc // log(1/frcpa(1+118/2^-8))/2 +data8 0xc439b2c193e6771e , 0x00003ffc // log(1/frcpa(1+119/2^-8))/2 +data8 0xc553acb9d5c67733 , 0x00003ffc // log(1/frcpa(1+120/2^-8))/2 +// +data8 0xc6cc96e441272441 , 0x00003ffc // log(1/frcpa(1+121/2^-8))/2 +data8 0xc8469753eca88c30 , 0x00003ffc // log(1/frcpa(1+122/2^-8))/2 +data8 0xc962cf3ce072b05c , 0x00003ffc // log(1/frcpa(1+123/2^-8))/2 +data8 0xcadeba8771f694aa , 0x00003ffc // log(1/frcpa(1+124/2^-8))/2 +data8 0xcc5bc08d1f72da94 , 0x00003ffc // log(1/frcpa(1+125/2^-8))/2 +// +data8 0xcd7a3f99ea035c29 , 0x00003ffc // log(1/frcpa(1+126/2^-8))/2 +data8 0xcef93860c8a53c35 , 0x00003ffc // log(1/frcpa(1+127/2^-8))/2 +data8 0xd0192f68a7ed23df , 0x00003ffc // log(1/frcpa(1+128/2^-8))/2 +data8 0xd19a201127d3c645 , 0x00003ffc // log(1/frcpa(1+129/2^-8))/2 +data8 0xd2bb92f4061c172c , 0x00003ffc // log(1/frcpa(1+130/2^-8))/2 +// +data8 0xd43e80b2ee8cc8fc , 0x00003ffc // log(1/frcpa(1+131/2^-8))/2 +data8 0xd56173601fc4ade4 , 0x00003ffc // log(1/frcpa(1+132/2^-8))/2 +data8 0xd6e6637efb54086f , 0x00003ffc // log(1/frcpa(1+133/2^-8))/2 +data8 0xd80ad9f58f3c8193 , 0x00003ffc // log(1/frcpa(1+134/2^-8))/2 +data8 0xd991d1d31aca41f8 , 0x00003ffc // log(1/frcpa(1+135/2^-8))/2 +// +data8 0xdab7d02231484a93 , 0x00003ffc // log(1/frcpa(1+136/2^-8))/2 +data8 0xdc40d532cde49a54 , 0x00003ffc // log(1/frcpa(1+137/2^-8))/2 +data8 0xdd685f79ed8b265e , 0x00003ffc // log(1/frcpa(1+138/2^-8))/2 +data8 0xde9094bbc0e17b1d , 0x00003ffc // log(1/frcpa(1+139/2^-8))/2 +data8 0xe01c91b78440c425 , 0x00003ffc // log(1/frcpa(1+140/2^-8))/2 +// +data8 0xe14658f26997e729 , 0x00003ffc // log(1/frcpa(1+141/2^-8))/2 +data8 0xe270cdc2391e0d23 , 0x00003ffc // log(1/frcpa(1+142/2^-8))/2 +data8 0xe3ffce3a2aa64922 , 0x00003ffc // log(1/frcpa(1+143/2^-8))/2 +data8 0xe52bdb274ed82887 , 0x00003ffc // log(1/frcpa(1+144/2^-8))/2 +data8 0xe6589852e75d7df6 , 0x00003ffc // log(1/frcpa(1+145/2^-8))/2 +// +data8 0xe786068c79937a7d , 0x00003ffc // log(1/frcpa(1+146/2^-8))/2 +data8 0xe91903adad100911 , 0x00003ffc // log(1/frcpa(1+147/2^-8))/2 +data8 0xea481236f7d35bb0 , 0x00003ffc // log(1/frcpa(1+148/2^-8))/2 +data8 0xeb77d48c692e6b14 , 0x00003ffc // log(1/frcpa(1+149/2^-8))/2 +data8 0xeca84b83d7297b87 , 0x00003ffc // log(1/frcpa(1+150/2^-8))/2 +// +data8 0xedd977f4962aa158 , 0x00003ffc // log(1/frcpa(1+151/2^-8))/2 +data8 0xef7179a22f257754 , 0x00003ffc // log(1/frcpa(1+152/2^-8))/2 +data8 0xf0a450d139366ca7 , 0x00003ffc // log(1/frcpa(1+153/2^-8))/2 +data8 0xf1d7e0524ff9ffdb , 0x00003ffc // log(1/frcpa(1+154/2^-8))/2 +data8 0xf30c29036a8b6cae , 0x00003ffc // log(1/frcpa(1+155/2^-8))/2 +// +data8 0xf4412bc411ea8d92 , 0x00003ffc // log(1/frcpa(1+156/2^-8))/2 +data8 0xf576e97564c8619d , 0x00003ffc // log(1/frcpa(1+157/2^-8))/2 +data8 0xf6ad62fa1b5f172f , 0x00003ffc // log(1/frcpa(1+158/2^-8))/2 +data8 0xf7e499368b55c542 , 0x00003ffc // log(1/frcpa(1+159/2^-8))/2 +data8 0xf91c8d10abaffe22 , 0x00003ffc // log(1/frcpa(1+160/2^-8))/2 +// +data8 0xfa553f7018c966f3 , 0x00003ffc // log(1/frcpa(1+161/2^-8))/2 +data8 0xfb8eb13e185d802c , 0x00003ffc // log(1/frcpa(1+162/2^-8))/2 +data8 0xfcc8e3659d9bcbed , 0x00003ffc // log(1/frcpa(1+163/2^-8))/2 +data8 0xfe03d6d34d487fd2 , 0x00003ffc // log(1/frcpa(1+164/2^-8))/2 +data8 0xff3f8c7581e9f0ae , 0x00003ffc // log(1/frcpa(1+165/2^-8))/2 +// +data8 0x803e029e280173ae , 0x00003ffd // log(1/frcpa(1+166/2^-8))/2 +data8 0x80dca10cc52d0757 , 0x00003ffd // log(1/frcpa(1+167/2^-8))/2 +data8 0x817ba200632755a1 , 0x00003ffd // log(1/frcpa(1+168/2^-8))/2 +data8 0x821b05f3b01d6774 , 0x00003ffd // log(1/frcpa(1+169/2^-8))/2 +data8 0x82bacd623ff19d06 , 0x00003ffd // log(1/frcpa(1+170/2^-8))/2 +// +data8 0x835af8c88e7a8f47 , 0x00003ffd // log(1/frcpa(1+171/2^-8))/2 +data8 0x83c5f8299e2b4091 , 0x00003ffd // log(1/frcpa(1+172/2^-8))/2 +data8 0x8466cb43f3d87300 , 0x00003ffd // log(1/frcpa(1+173/2^-8))/2 +data8 0x850803a67c80ca4b , 0x00003ffd // log(1/frcpa(1+174/2^-8))/2 +data8 0x85a9a1d11a23b461 , 0x00003ffd // log(1/frcpa(1+175/2^-8))/2 +// +data8 0x864ba644a18e6e05 , 0x00003ffd // log(1/frcpa(1+176/2^-8))/2 +data8 0x86ee1182dcc432f7 , 0x00003ffd // log(1/frcpa(1+177/2^-8))/2 +data8 0x875a925d7e48c316 , 0x00003ffd // log(1/frcpa(1+178/2^-8))/2 +data8 0x87fdaa109d23aef7 , 0x00003ffd // log(1/frcpa(1+179/2^-8))/2 +data8 0x88a129ed4becfaf2 , 0x00003ffd // log(1/frcpa(1+180/2^-8))/2 +// +data8 0x89451278ecd7f9cf , 0x00003ffd // log(1/frcpa(1+181/2^-8))/2 +data8 0x89b29295f8432617 , 0x00003ffd // log(1/frcpa(1+182/2^-8))/2 +data8 0x8a572ac5a5496882 , 0x00003ffd // log(1/frcpa(1+183/2^-8))/2 +data8 0x8afc2d0ce3b2dadf , 0x00003ffd // log(1/frcpa(1+184/2^-8))/2 +data8 0x8b6a69c608cfd3af , 0x00003ffd // log(1/frcpa(1+185/2^-8))/2 +// +data8 0x8c101e106e899a83 , 0x00003ffd // log(1/frcpa(1+186/2^-8))/2 +data8 0x8cb63de258f9d626 , 0x00003ffd // log(1/frcpa(1+187/2^-8))/2 +data8 0x8d2539c5bd19e2b1 , 0x00003ffd // log(1/frcpa(1+188/2^-8))/2 +data8 0x8dcc0e064b29e6f1 , 0x00003ffd // log(1/frcpa(1+189/2^-8))/2 +data8 0x8e734f45d88357ae , 0x00003ffd // log(1/frcpa(1+190/2^-8))/2 +// +data8 0x8ee30cef034a20db , 0x00003ffd // log(1/frcpa(1+191/2^-8))/2 +data8 0x8f8b0515686d1d06 , 0x00003ffd // log(1/frcpa(1+192/2^-8))/2 +data8 0x90336bba039bf32f , 0x00003ffd // log(1/frcpa(1+193/2^-8))/2 +data8 0x90a3edd23d1c9d58 , 0x00003ffd // log(1/frcpa(1+194/2^-8))/2 +data8 0x914d0de2f5d61b32 , 0x00003ffd // log(1/frcpa(1+195/2^-8))/2 +// +data8 0x91be0c20d28173b5 , 0x00003ffd // log(1/frcpa(1+196/2^-8))/2 +data8 0x9267e737c06cd34a , 0x00003ffd // log(1/frcpa(1+197/2^-8))/2 +data8 0x92d962ae6abb1237 , 0x00003ffd // log(1/frcpa(1+198/2^-8))/2 +data8 0x9383fa6afbe2074c , 0x00003ffd // log(1/frcpa(1+199/2^-8))/2 +data8 0x942f0421651c1c4e , 0x00003ffd // log(1/frcpa(1+200/2^-8))/2 +// +data8 0x94a14a3845bb985e , 0x00003ffd // log(1/frcpa(1+201/2^-8))/2 +data8 0x954d133857f861e7 , 0x00003ffd // log(1/frcpa(1+202/2^-8))/2 +data8 0x95bfd96468e604c4 , 0x00003ffd // log(1/frcpa(1+203/2^-8))/2 +data8 0x9632d31cafafa858 , 0x00003ffd // log(1/frcpa(1+204/2^-8))/2 +data8 0x96dfaabd86fa1647 , 0x00003ffd // log(1/frcpa(1+205/2^-8))/2 +// +data8 0x9753261fcbb2a594 , 0x00003ffd // log(1/frcpa(1+206/2^-8))/2 +data8 0x9800c11b426b996d , 0x00003ffd // log(1/frcpa(1+207/2^-8))/2 +data8 0x9874bf4d45ae663c , 0x00003ffd // log(1/frcpa(1+208/2^-8))/2 +data8 0x99231f5ee9a74f79 , 0x00003ffd // log(1/frcpa(1+209/2^-8))/2 +data8 0x9997a18a56bcad28 , 0x00003ffd // log(1/frcpa(1+210/2^-8))/2 +// +data8 0x9a46c873a3267e79 , 0x00003ffd // log(1/frcpa(1+211/2^-8))/2 +data8 0x9abbcfc621eb6cb6 , 0x00003ffd // log(1/frcpa(1+212/2^-8))/2 +data8 0x9b310cb0d354c990 , 0x00003ffd // log(1/frcpa(1+213/2^-8))/2 +data8 0x9be14cf9e1b3515c , 0x00003ffd // log(1/frcpa(1+214/2^-8))/2 +data8 0x9c5710b8cbb73a43 , 0x00003ffd // log(1/frcpa(1+215/2^-8))/2 +// +data8 0x9ccd0abd301f399c , 0x00003ffd // log(1/frcpa(1+216/2^-8))/2 +data8 0x9d7e67f3bdce8888 , 0x00003ffd // log(1/frcpa(1+217/2^-8))/2 +data8 0x9df4ea81a99daa01 , 0x00003ffd // log(1/frcpa(1+218/2^-8))/2 +data8 0x9e6ba405a54514ba , 0x00003ffd // log(1/frcpa(1+219/2^-8))/2 +data8 0x9f1e21c8c7bb62b3 , 0x00003ffd // log(1/frcpa(1+220/2^-8))/2 +// +data8 0x9f956593f6b6355c , 0x00003ffd // log(1/frcpa(1+221/2^-8))/2 +data8 0xa00ce1092e5498c3 , 0x00003ffd // log(1/frcpa(1+222/2^-8))/2 +data8 0xa0c08309c4b912c1 , 0x00003ffd // log(1/frcpa(1+223/2^-8))/2 +data8 0xa1388a8c6faa2afa , 0x00003ffd // log(1/frcpa(1+224/2^-8))/2 +data8 0xa1b0ca7095b5f985 , 0x00003ffd // log(1/frcpa(1+225/2^-8))/2 +// +data8 0xa22942eb47534a00 , 0x00003ffd // log(1/frcpa(1+226/2^-8))/2 +data8 0xa2de62326449d0a3 , 0x00003ffd // log(1/frcpa(1+227/2^-8))/2 +data8 0xa357690f88bfe345 , 0x00003ffd // log(1/frcpa(1+228/2^-8))/2 +data8 0xa3d0a93f45169a4b , 0x00003ffd // log(1/frcpa(1+229/2^-8))/2 +data8 0xa44a22f7ffe65f30 , 0x00003ffd // log(1/frcpa(1+230/2^-8))/2 +// +data8 0xa500c5e5b4c1aa36 , 0x00003ffd // log(1/frcpa(1+231/2^-8))/2 +data8 0xa57ad064eb2ebbc2 , 0x00003ffd // log(1/frcpa(1+232/2^-8))/2 +data8 0xa5f5152dedf4384e , 0x00003ffd // log(1/frcpa(1+233/2^-8))/2 +data8 0xa66f9478856233ec , 0x00003ffd // log(1/frcpa(1+234/2^-8))/2 +data8 0xa6ea4e7cca02c32e , 0x00003ffd // log(1/frcpa(1+235/2^-8))/2 +// +data8 0xa765437325341ccf , 0x00003ffd // log(1/frcpa(1+236/2^-8))/2 +data8 0xa81e21e6c75b4020 , 0x00003ffd // log(1/frcpa(1+237/2^-8))/2 +data8 0xa899ab333fe2b9ca , 0x00003ffd // log(1/frcpa(1+238/2^-8))/2 +data8 0xa9157039c51ebe71 , 0x00003ffd // log(1/frcpa(1+239/2^-8))/2 +data8 0xa991713433c2b999 , 0x00003ffd // log(1/frcpa(1+240/2^-8))/2 +// +data8 0xaa0dae5cbcc048b3 , 0x00003ffd // log(1/frcpa(1+241/2^-8))/2 +data8 0xaa8a27ede5eb13ad , 0x00003ffd // log(1/frcpa(1+242/2^-8))/2 +data8 0xab06de228a9e3499 , 0x00003ffd // log(1/frcpa(1+243/2^-8))/2 +data8 0xab83d135dc633301 , 0x00003ffd // log(1/frcpa(1+244/2^-8))/2 +data8 0xac3fb076adc7fe7a , 0x00003ffd // log(1/frcpa(1+245/2^-8))/2 +// +data8 0xacbd3cbbe47988f1 , 0x00003ffd // log(1/frcpa(1+246/2^-8))/2 +data8 0xad3b06b1a5dc57c3 , 0x00003ffd // log(1/frcpa(1+247/2^-8))/2 +data8 0xadb90e94af887717 , 0x00003ffd // log(1/frcpa(1+248/2^-8))/2 +data8 0xae3754a218f7c816 , 0x00003ffd // log(1/frcpa(1+249/2^-8))/2 +data8 0xaeb5d9175437afa2 , 0x00003ffd // log(1/frcpa(1+250/2^-8))/2 +// +data8 0xaf349c322e9c7cee , 0x00003ffd // log(1/frcpa(1+251/2^-8))/2 +data8 0xafb39e30d1768d1c , 0x00003ffd // log(1/frcpa(1+252/2^-8))/2 +data8 0xb032df51c2c93116 , 0x00003ffd // log(1/frcpa(1+253/2^-8))/2 +data8 0xb0b25fd3e6035ad9 , 0x00003ffd // log(1/frcpa(1+254/2^-8))/2 +data8 0xb1321ff67cba178c , 0x00003ffd // log(1/frcpa(1+255/2^-8))/2 +LOCAL_OBJECT_END(atanh_data_3) + + + +.section .text +GLOBAL_LIBM_ENTRY(atanh) + +{ .mfi + getf.exp rArgSExpb = f8 // Must recompute if x unorm + fclass.m p13,p0 = f8, 0x0b // is arg denormal ? + mov rExpbMask = 0x1ffff +} +{ .mfi + addl DataPtr = @ltoff(atanh_data), gp + fnma.s1 fOneMx = f8, f1, f1 // fOneMx = 1 - x + mov rBias = 0xffff +} +;; + +{ .mfi + mov rNearZeroBound = 0xfffd // biased exp of 1/4 + fclass.m p12,p0 = f8, 0xc7 // is arg NaN or +/-0 ? + nop.i 0 +} +{ .mfi + ld8 DataPtr = [DataPtr] + fma.s1 fOnePx = f8, f1, f1 // fOnePx = 1 + x + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcmp.lt.s1 p10,p11 = f8,f0 // is x < 0 ? + nop.i 0 +} +{ .mfb + nop.m 0 + fnorm.s1 fNormX = f8 // Normalize x +(p13) br.cond.spnt ATANH_UNORM // Branch if x=unorm +} +;; + +ATANH_COMMON: +// Return here if x=unorm and not denorm +{ .mfi + adds Data2Ptr = 0x50, DataPtr + fma.s1 fX2 = f8, f8, f0 // x^2 + nop.i 0 +} +{ .mfb + adds Data3Ptr = 0xC0, DataPtr +(p12) fma.d.s0 f8 = f8,f1,f8 // NaN or +/-0 +(p12) br.ret.spnt b0 // Exit for x Nan or zero +} +;; + +{ .mfi + ldfe fC9 = [Data2Ptr], 16 +(p11) frcpa.s1 fRcp0, p0 = f1, fOneMx + nop.i 0 +} +;; + +{ .mfi + ldfe fC8 = [Data2Ptr], 16 +(p10) frcpa.s1 fRcp0n, p0 = f1, fOnePx + and rArgExpb = rArgSExpb, rExpbMask // biased exponent +} +{ .mfi + nop.m 0 +(p10) fma.s1 fOneMx = fOnePx, f1, f0 // fOnePx = 1 - |x| + nop.i 0 +} +;; + +{ .mfi + ldfe fC7 = [Data2Ptr], 16 +(p10) fnma.s1 fOnePx = fNormX, f1, f1 // fOnePx = 1 + |x| + cmp.ge p6,p0 = rArgExpb, rBias // is Expb(Arg) >= Expb(1) ? +} +{ .mfb + nop.m 0 + nop.f 0 +(p6) br.cond.spnt atanh_ge_one // Branch if |x| >=1.0 +} +;; + +{ .mfi + ldfe fC6 = [Data2Ptr], 16 + nop.f 0 + nop.i 0 +} +;; + +{ .mfi + ldfe fC5 = [Data2Ptr], 16 + fma.s1 fX4 = fX2, fX2, f0 // x^4 + cmp.gt p8,p0 = rNearZeroBound, rArgExpb +} +{ .mfb + ldfe fC2 = [Data3Ptr], 16 + fma.s1 fX3 = fX2, fNormX, f0 // x^3 +(p8) br.cond.spnt atanh_near_zero // Exit if 0 < |x| < 0.25 +} +;; + +// Main path: 0.25 <= |x| < 1.0 +// NR method: iteration #1 +.pred.rel "mutex",p11,p10 +{ .mfi + ldfpd fP5, fP4 = [DataPtr], 16 +(p11) fnma.s1 fRcp1 = fRcp0, fOneMx, f1 // t = 1 - r0*x + nop.i 0 +} +{ .mfi + nop.m 0 +(p10) fnma.s1 fRcp1 = fRcp0n, fOneMx, f1 // t = 1 - r0*x + nop.i 0 +} +;; + +{ .mfi + ldfpd fP3, fP2 = [DataPtr], 16 + // r1 = r0 + r0*t = r0 + r0*(1 - r0*x) +(p11) fma.s1 fRcp1 = fRcp0, fRcp1, fRcp0 + nop.i 0 +} +{ .mfi + nop.m 0 + // r1 = r0 + r0*t = r0 + r0*(1 - r0*x) +(p10) fma.s1 fRcp1 = fRcp0n, fRcp1, fRcp0n + nop.i 0 +} +;; + +// NR method: iteration #2 +{ .mfi + ldfd fP1 = [DataPtr], 16 + fnma.s1 fRcp2 = fRcp1, fOneMx, f1 // t = 1 - r1*x + nop.i 0 +} +;; + +{ .mfi + ldfe fLog2 = [DataPtr], 16 + // r2 = r1 + r1*t = r1 + r1*(1 - r1*x) + fma.s1 fRcp2 = fRcp1, fRcp2, fRcp1 + nop.i 0 +} +;; + +// NR method: iteration #3 +{ .mfi + adds RcpTablePtr = 0xB0, DataPtr + fnma.s1 fRcp3 = fRcp2, fOneMx, f1 // t = 1 - r2*x + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fY4Rcp = fRcp2, fOnePx, f0 // fY4Rcp = r2*(1 + x) + nop.i 0 +} +;; + +// polynomial approximation & final reconstruction +{ .mfi + nop.m 0 + frcpa.s1 fRcp, p0 = f1, fY4Rcp + nop.i 0 +} +{ .mfi + nop.m 0 + // y = r2 * (1 + x) + r2 * (1 + x) * t = (1 + x) * (r2 + r2*(1 - r2*x)) + fma.s1 fY = fY4Rcp, fRcp3, fY4Rcp + nop.i 0 +} +;; + +{ .mmi + getf.exp rSExpb = fY4Rcp // biased exponent and sign +;; + getf.sig rSig = fY4Rcp // significand + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fms.s1 fR = fY, fRcp, f1 // fR = fY * fRcp - 1 + nop.i 0 +} +;; + +{ .mmi + and rExpb = rSExpb, rExpbMask +;; + sub rN = rExpb, rBias // exponent + extr.u rInd = rSig,55,8 // Extract 8 bits +} +;; + +{ .mmi + setf.sig fN4Cvt = rN + shladd RcpTablePtr = rInd, 4, RcpTablePtr + nop.i 0 +} +;; + +{ .mfi + ldfe fLogT = [RcpTablePtr] + fma.s1 fR2 = fR, fR, f0 // r^2 + nop.i 0 +} +{ + nop.m 0 + fma.s1 fP54 = fP5, fR, fP4 // P5*r + P4 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fP32 = fP3, fR, fP2 // P3*r + P2 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fR3 = fR2, fR, f0 // r^3 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fP10 = fP1, fR2, fR // P1*r^2 + r + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcvt.xf fN = fN4Cvt + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fP54 = fP54, fR2, fP32 // (P5*r + P4)*r^2 + P3*r + P2 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fLogT_N = fN, fLog2, fLogT // N*Log2 + LogT + nop.i 0 +} +{ .mfi + nop.m 0 + // ((P5*r + P4)*r^2 + P3*r + P2)*r^3 + P1*r^2 + r + fma.s1 fP54 = fP54, fR3, fP10 + nop.i 0 +} +;; + +.pred.rel "mutex",p11,p10 +{ .mfi + nop.m 0 + // 0.5*(((P5*r + P4)*r^2 + P3*r + P2)*r^3 + P1*r^2 + r) + 0.5*(N*Log2 + T) +(p11) fnma.d.s0 f8 = fP54, fP1, fLogT_N + nop.i 0 +} +{ .mfb + nop.m 0 + // -0.5*(((P5*r + P4)*r^2 + P3*r + P2)*r^3 + P1*r^2 + r) - 0.5*(N*Log2 + T) +(p10) fms.d.s0 f8 = fP54, fP1, fLogT_N + br.ret.sptk b0 // Exit for 0.25 <= |x| < 1.0 +} +;; + +// Here if 0 < |x| < 0.25 +atanh_near_zero: +{ .mfi + ldfe fC4 = [Data2Ptr], 16 + fma.s1 fP98 = fC9, fX2, fC8 // C9*x^2 + C8 + nop.i 0 +} +{ .mfi + ldfe fC1 = [Data3Ptr], 16 + fma.s1 fP76 = fC7, fX2, fC6 // C7*x^2 + C6 + nop.i 0 +} +;; + +{ .mfi + ldfe fC3 = [Data2Ptr], 16 + fma.s1 fX8 = fX4, fX4, f0 // x^8 + nop.i 0 +} +{ .mfi + ldfe fC0 = [Data3Ptr], 16 + nop.f 0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fP98 = fP98, fX4, fP76 // C9*x^6 + C8*x^4 + C7*x^2 + C6 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fP54 = fC5, fX2, fC4 // C5*x^2 + C4 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fP32 = fC3, fX2, fC2 // C3*x^2 + C2 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fP10 = fC1, fX2, fC0 // C1*x^2 + C0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fP54 = fP54, fX4, fP32 // C5*x^6 + C4*x^4 + C3*x^2 + C2 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + // C9*x^14 + C8*x^12 + C7*x^10 + C6*x^8 + C5*x^6 + C4*x^4 + C3*x^2 + C2 + fma.s1 fP98 = fP98, fX8, fP54 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + // C9*x^18 + C8*x^16 + C7*x^14 + C6*x^12 + C5*x^10 + C4*x^8 + C3*x^6 + + // C2*x^4 + C1*x^2 + C0 + fma.s1 fP98 = fP98, fX4, fP10 + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + // C9*x^21 + C8*x^19 + C7*x^17 + C6*x^15 + C5*x^13 + C4*x^11 + C3*x^9 + + // C2*x^7 + C1*x^5 + C0*x^3 + x + fma.d.s0 f8 = fP98, fX3, fNormX + br.ret.sptk b0 // Exit for 0 < |x| < 0.25 +} +;; + +ATANH_UNORM: +// Here if x=unorm +{ .mfi + getf.exp rArgSExpb = fNormX // Recompute if x unorm + fclass.m p0,p13 = fNormX, 0x0b // Test x denorm + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + fcmp.eq.s0 p7,p0 = f8, f0 // Dummy to set denormal flag +(p13) br.cond.sptk ATANH_COMMON // Continue if x unorm and not denorm +} +;; + +.pred.rel "mutex",p10,p11 +{ .mfi + nop.m 0 +(p10) fnma.d.s0 f8 = f8,f8,f8 // Result x-x^2 if x=-denorm + nop.i 0 +} +{ .mfb + nop.m 0 +(p11) fma.d.s0 f8 = f8,f8,f8 // Result x+x^2 if x=+denorm + br.ret.spnt b0 // Exit if denorm +} +;; + +// Here if |x| >= 1.0 +atanh_ge_one: +{ .mfi + alloc r32 = ar.pfs,1,3,4,0 + fmerge.s fAbsX = f0, f8 // Form |x| + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fmerge.s f10 = f8, f8 // Save input for error call + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcmp.eq.s1 p6,p7 = fAbsX, f1 // Test for |x| = 1.0 + nop.i 0 +} +;; + +// Set error tag and result, and raise invalid flag if |x| > 1.0 +{ .mfi +(p7) mov atanh_GR_tag = 131 +(p7) frcpa.s0 f8, p0 = f0, f0 // Get QNaN, and raise invalid + nop.i 0 +} +;; + +// Set error tag and result, and raise Z flag if |x| = 1.0 +{ .mfi + nop.m 0 +(p6) frcpa.s0 fRcp, p0 = f1, f0 // Get inf, and raise Z flag + nop.i 0 +} +;; + +{ .mfb +(p6) mov atanh_GR_tag = 132 +(p6) fmerge.s f8 = f8, fRcp // result is +-inf + br.cond.sptk __libm_error_region // Exit if |x| >= 1.0 +} +;; + +GLOBAL_LIBM_END(atanh) + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue + +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; + +{ .mmi + stfd [GR_Parameter_Y] = f1,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; + +.body +{ .mib + stfd [GR_Parameter_X] = f10 // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfd [GR_Parameter_Y] = f8 // STORE Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; + +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; + +{ .mmi + ldfd f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; + +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) + + +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/e_atanhf.S b/sysdeps/ia64/fpu/e_atanhf.S new file mode 100644 index 0000000000..1ec1408e35 --- /dev/null +++ b/sysdeps/ia64/fpu/e_atanhf.S @@ -0,0 +1,845 @@ +.file "atanhf.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 05/22/01 Initial version +// 05/20/02 Cleaned up namespace and sf0 syntax +// 08/06/02 Improved Itanium 2 performance +// 02/06/03 Reordered header: .section, .global, .proc, .align +// 05/26/03 Improved performance, fixed to handle unorms +// +// API +//============================================================== +// float atanhf(float) +// +// Overview of operation +//============================================================== +// Background +// +// +// There are 7 paths: +// 1. x = +/-0.0 +// Return atanhf(x) = +/-0.0 +// +// 2. 0.0 < |x| <= MAX_DENORMAL_ABS +// Return atanhf(x) = x + sign(x)*x^2 +// +// 3. MAX_DENORMAL_ABS < |x| < 2^(-20) +// Return atanhf(x) = Pol3(x), where Pol3(x) = x + x^3 +// +// 4. 2^(-20) <= |x| < 1 +// Return atanhf(x) = 0.5 * (log(1 + x) - log(1 - x)) +// Algorithm description for log function see below. +// +// 5. |x| = 1 +// Return atanhf(x) = sign(x) * +INF +// +// 6. 1 < |x| <= +INF +// Return atanhf(x) = QNaN +// +// 7. x = [S,Q]NaN +// Return atanhf(x) = QNaN +// +//============================================================== +// Algorithm Description for log(x) function +// +// Consider x = 2^N * 1.f1 f2 f3 f4...f63 +// log(x) = log(x * frcpa(x) / frcpa(x)) +// = log(x * frcpa(x)) + log(1/frcpa(x)) +// = log(x * frcpa(x)) - log(frcpa(x)) +// +// frcpa(x) = 2^(-N) * frcpa(1.f1 f2 ... f63) +// +// -log(frcpa(x)) = -log(C) +// = -log(2^(-N)) - log(frcpa(1.f1 f2 ... f63)) +// +// -log(frcpa(x)) = -log(C) +// = N*log2 - log(frcpa(1.f1 f2 ... f63)) +// +// +// log(x) = log(1/frcpa(x)) + log(frcpa(x) x) +// +// log(x) = N*log2 + log(1./frcpa(1.f1 f2 ... f63)) + log(x * frcpa(x)) +// log(x) = N*log2 + T + log(frcpa(x) x) +// +// Log(x) = N*log2 + T + log(C * x) +// +// C * x = 1 + r +// +// log(x) = N*log2 + T + log(1 + r) +// log(x) = N*log2 + T + Series(r) +// +// 1.f1 f2 ... f8 has 256 entries. +// They are 1 + k/2^8, k = 0 ... 255 +// These 256 values are the table entries. +// +// Implementation +//============================================================== +// C = frcpa(x) +// r = C * x - 1 +// +// Form rseries = r + P1*r^2 + P2*r^3 + P3*r^4 +// +// x = f * 2*N where f is 1.f_1f_2f_3...f_63 +// Nfloat = float(n) where n is the true unbiased exponent +// pre-index = f_1f_2....f_8 +// index = pre_index * 16 +// get the dxt table entry at index + offset = T +// +// result = (T + Nfloat * log(2)) + rseries +// +// The T table is calculated as follows +// Form x_k = 1 + k/2^8 where k goes from 0... 255 +// y_k = frcpa(x_k) +// log(1/y_k) in quad and round to double-extended + +// Registers used +//============================================================== +// Floating Point registers used: +// f8, input +// f32 -> f59 + +// General registers used: +// r14 -> r29, r32 -> r39 + +// Predicate registers used: +// p6 -> p9 + +// p6 to filter out case when |x| >= 1 +// p7 to filter out case when x = [Q,S]NaN or +/-0 +// p8 to filter out case when |x| < 2^(-20) +// p9 to filter out case when x = denormal + + +// Assembly macros +//============================================================== +DataPtr = r14 +RcpTablePtrM = r15 +RcpTablePtrP = r16 +rExpbMask = r17 +rBias = r18 +rNearZeroBound = r19 +rArgSExpb = r20 +rArgExpb = r21 +rExpbm = r22 +rExpbp = r23 +rSigm = r24 +rSigp = r25 +rNm = r26 +rNp = r27 +rIndm = r28 +rIndp = r29 + +GR_SAVE_B0 = r33 +GR_SAVE_GP = r34 +GR_SAVE_PFS = r35 + +GR_Parameter_X = r36 +GR_Parameter_Y = r37 +GR_Parameter_RESULT = r38 +atanh_GR_tag = r39 + +//============================================================== +fOneMx = f33 +fOnePx = f34 +fRm2 = f35 +fRm3 = f36 +fRp2 = f37 +fRp3 = f38 +fRcpM = f39 +fRcpP = f40 +fRp = f41 +fRm = f42 +fN4CvtM = f43 +fN4CvtP = f44 +fNm = f45 +fNp = f46 +fLogTm = f47 +fLogTp = f48 +fLog2 = f49 +fArgAbs = f50 +fNormX = f50 +fP32m = f51 +fP32p = f52 +fP10m = f53 +fP10p = f54 +fX2 = f55 +fP3 = f56 +fP2 = f57 +fP1 = f58 +fHalf = f59 + + + +// Data tables +//============================================================== + +RODATA + +.align 16 + +LOCAL_OBJECT_START(atanhf_data) +data8 0xbfc0001008f39d59 // P3*0.5 +data8 0x3fc5556073e0c45a // P2*0.5 +data8 0xbfcffffffffaea15 // P1*0.5 +data8 0x3fe0000000000000 // 0.5 +data8 0x3fd62e42fefa39ef // 0.5*ln(2) +data8 0x0000000000000000 // pad +LOCAL_OBJECT_END(atanhf_data) + +LOCAL_OBJECT_START(atanhf_data2) +data8 0x3f50040155d5889e //log(1/frcpa(1+0/256))/2 +data8 0x3f68121214586b54 //log(1/frcpa(1+1/256))/2 +data8 0x3f741929f96832f0 //log(1/frcpa(1+2/256))/2 +data8 0x3f7c317384c75f06 //log(1/frcpa(1+3/256))/2 +data8 0x3f81a6b91ac73386 //log(1/frcpa(1+4/256))/2 +data8 0x3f85ba9a5d9ac039 //log(1/frcpa(1+5/256))/2 +data8 0x3f89d2a8074325f4 //log(1/frcpa(1+6/256))/2 +data8 0x3f8d6b2725979802 //log(1/frcpa(1+7/256))/2 +data8 0x3f90c58fa19dfaaa //log(1/frcpa(1+8/256))/2 +data8 0x3f92954c78cbce1b //log(1/frcpa(1+9/256))/2 +data8 0x3f94a94d2da96c56 //log(1/frcpa(1+10/256))/2 +data8 0x3f967c94f2d4bb58 //log(1/frcpa(1+11/256))/2 +data8 0x3f985188b630f068 //log(1/frcpa(1+12/256))/2 +data8 0x3f9a6b8abe73af4c //log(1/frcpa(1+13/256))/2 +data8 0x3f9c441e06f72a9e //log(1/frcpa(1+14/256))/2 +data8 0x3f9e1e6713606d07 //log(1/frcpa(1+15/256))/2 +data8 0x3f9ffa6911ab9301 //log(1/frcpa(1+16/256))/2 +data8 0x3fa0ec139c5da601 //log(1/frcpa(1+17/256))/2 +data8 0x3fa1dbd2643d190b //log(1/frcpa(1+18/256))/2 +data8 0x3fa2cc7284fe5f1c //log(1/frcpa(1+19/256))/2 +data8 0x3fa3bdf5a7d1ee64 //log(1/frcpa(1+20/256))/2 +data8 0x3fa4b05d7aa012e0 //log(1/frcpa(1+21/256))/2 +data8 0x3fa580db7ceb5702 //log(1/frcpa(1+22/256))/2 +data8 0x3fa674f089365a7a //log(1/frcpa(1+23/256))/2 +data8 0x3fa769ef2c6b568d //log(1/frcpa(1+24/256))/2 +data8 0x3fa85fd927506a48 //log(1/frcpa(1+25/256))/2 +data8 0x3fa9335e5d594989 //log(1/frcpa(1+26/256))/2 +data8 0x3faa2b0220c8e5f5 //log(1/frcpa(1+27/256))/2 +data8 0x3fab0004ac1a86ac //log(1/frcpa(1+28/256))/2 +data8 0x3fabf968769fca11 //log(1/frcpa(1+29/256))/2 +data8 0x3faccfedbfee13a8 //log(1/frcpa(1+30/256))/2 +data8 0x3fada727638446a2 //log(1/frcpa(1+31/256))/2 +data8 0x3faea3257fe10f7a //log(1/frcpa(1+32/256))/2 +data8 0x3faf7be9fedbfde6 //log(1/frcpa(1+33/256))/2 +data8 0x3fb02ab352ff25f4 //log(1/frcpa(1+34/256))/2 +data8 0x3fb097ce579d204d //log(1/frcpa(1+35/256))/2 +data8 0x3fb1178e8227e47c //log(1/frcpa(1+36/256))/2 +data8 0x3fb185747dbecf34 //log(1/frcpa(1+37/256))/2 +data8 0x3fb1f3b925f25d41 //log(1/frcpa(1+38/256))/2 +data8 0x3fb2625d1e6ddf57 //log(1/frcpa(1+39/256))/2 +data8 0x3fb2d1610c86813a //log(1/frcpa(1+40/256))/2 +data8 0x3fb340c59741142e //log(1/frcpa(1+41/256))/2 +data8 0x3fb3b08b6757f2a9 //log(1/frcpa(1+42/256))/2 +data8 0x3fb40dfb08378003 //log(1/frcpa(1+43/256))/2 +data8 0x3fb47e74e8ca5f7c //log(1/frcpa(1+44/256))/2 +data8 0x3fb4ef51f6466de4 //log(1/frcpa(1+45/256))/2 +data8 0x3fb56092e02ba516 //log(1/frcpa(1+46/256))/2 +data8 0x3fb5d23857cd74d5 //log(1/frcpa(1+47/256))/2 +data8 0x3fb6313a37335d76 //log(1/frcpa(1+48/256))/2 +data8 0x3fb6a399dabbd383 //log(1/frcpa(1+49/256))/2 +data8 0x3fb70337dd3ce41b //log(1/frcpa(1+50/256))/2 +data8 0x3fb77654128f6127 //log(1/frcpa(1+51/256))/2 +data8 0x3fb7e9d82a0b022d //log(1/frcpa(1+52/256))/2 +data8 0x3fb84a6b759f512f //log(1/frcpa(1+53/256))/2 +data8 0x3fb8ab47d5f5a310 //log(1/frcpa(1+54/256))/2 +data8 0x3fb91fe49096581b //log(1/frcpa(1+55/256))/2 +data8 0x3fb981634011aa75 //log(1/frcpa(1+56/256))/2 +data8 0x3fb9f6c407089664 //log(1/frcpa(1+57/256))/2 +data8 0x3fba58e729348f43 //log(1/frcpa(1+58/256))/2 +data8 0x3fbabb55c31693ad //log(1/frcpa(1+59/256))/2 +data8 0x3fbb1e104919efd0 //log(1/frcpa(1+60/256))/2 +data8 0x3fbb94ee93e367cb //log(1/frcpa(1+61/256))/2 +data8 0x3fbbf851c067555f //log(1/frcpa(1+62/256))/2 +data8 0x3fbc5c0254bf23a6 //log(1/frcpa(1+63/256))/2 +data8 0x3fbcc000c9db3c52 //log(1/frcpa(1+64/256))/2 +data8 0x3fbd244d99c85674 //log(1/frcpa(1+65/256))/2 +data8 0x3fbd88e93fb2f450 //log(1/frcpa(1+66/256))/2 +data8 0x3fbdedd437eaef01 //log(1/frcpa(1+67/256))/2 +data8 0x3fbe530effe71012 //log(1/frcpa(1+68/256))/2 +data8 0x3fbeb89a1648b971 //log(1/frcpa(1+69/256))/2 +data8 0x3fbf1e75fadf9bde //log(1/frcpa(1+70/256))/2 +data8 0x3fbf84a32ead7c35 //log(1/frcpa(1+71/256))/2 +data8 0x3fbfeb2233ea07cd //log(1/frcpa(1+72/256))/2 +data8 0x3fc028f9c7035c1c //log(1/frcpa(1+73/256))/2 +data8 0x3fc05c8be0d9635a //log(1/frcpa(1+74/256))/2 +data8 0x3fc085eb8f8ae797 //log(1/frcpa(1+75/256))/2 +data8 0x3fc0b9c8e32d1911 //log(1/frcpa(1+76/256))/2 +data8 0x3fc0edd060b78081 //log(1/frcpa(1+77/256))/2 +data8 0x3fc122024cf0063f //log(1/frcpa(1+78/256))/2 +data8 0x3fc14be2927aecd4 //log(1/frcpa(1+79/256))/2 +data8 0x3fc180618ef18adf //log(1/frcpa(1+80/256))/2 +data8 0x3fc1b50bbe2fc63b //log(1/frcpa(1+81/256))/2 +data8 0x3fc1df4cc7cf242d //log(1/frcpa(1+82/256))/2 +data8 0x3fc214456d0eb8d4 //log(1/frcpa(1+83/256))/2 +data8 0x3fc23ec5991eba49 //log(1/frcpa(1+84/256))/2 +data8 0x3fc2740d9f870afb //log(1/frcpa(1+85/256))/2 +data8 0x3fc29ecdabcdfa04 //log(1/frcpa(1+86/256))/2 +data8 0x3fc2d46602adccee //log(1/frcpa(1+87/256))/2 +data8 0x3fc2ff66b04ea9d4 //log(1/frcpa(1+88/256))/2 +data8 0x3fc335504b355a37 //log(1/frcpa(1+89/256))/2 +data8 0x3fc360925ec44f5d //log(1/frcpa(1+90/256))/2 +data8 0x3fc38bf1c3337e75 //log(1/frcpa(1+91/256))/2 +data8 0x3fc3c25277333184 //log(1/frcpa(1+92/256))/2 +data8 0x3fc3edf463c1683e //log(1/frcpa(1+93/256))/2 +data8 0x3fc419b423d5e8c7 //log(1/frcpa(1+94/256))/2 +data8 0x3fc44591e0539f49 //log(1/frcpa(1+95/256))/2 +data8 0x3fc47c9175b6f0ad //log(1/frcpa(1+96/256))/2 +data8 0x3fc4a8b341552b09 //log(1/frcpa(1+97/256))/2 +data8 0x3fc4d4f3908901a0 //log(1/frcpa(1+98/256))/2 +data8 0x3fc501528da1f968 //log(1/frcpa(1+99/256))/2 +data8 0x3fc52dd06347d4f6 //log(1/frcpa(1+100/256))/2 +data8 0x3fc55a6d3c7b8a8a //log(1/frcpa(1+101/256))/2 +data8 0x3fc5925d2b112a59 //log(1/frcpa(1+102/256))/2 +data8 0x3fc5bf406b543db2 //log(1/frcpa(1+103/256))/2 +data8 0x3fc5ec433d5c35ae //log(1/frcpa(1+104/256))/2 +data8 0x3fc61965cdb02c1f //log(1/frcpa(1+105/256))/2 +data8 0x3fc646a84935b2a2 //log(1/frcpa(1+106/256))/2 +data8 0x3fc6740add31de94 //log(1/frcpa(1+107/256))/2 +data8 0x3fc6a18db74a58c5 //log(1/frcpa(1+108/256))/2 +data8 0x3fc6cf31058670ec //log(1/frcpa(1+109/256))/2 +data8 0x3fc6f180e852f0ba //log(1/frcpa(1+110/256))/2 +data8 0x3fc71f5d71b894f0 //log(1/frcpa(1+111/256))/2 +data8 0x3fc74d5aefd66d5c //log(1/frcpa(1+112/256))/2 +data8 0x3fc77b79922bd37e //log(1/frcpa(1+113/256))/2 +data8 0x3fc7a9b9889f19e2 //log(1/frcpa(1+114/256))/2 +data8 0x3fc7d81b037eb6a6 //log(1/frcpa(1+115/256))/2 +data8 0x3fc8069e33827231 //log(1/frcpa(1+116/256))/2 +data8 0x3fc82996d3ef8bcb //log(1/frcpa(1+117/256))/2 +data8 0x3fc85855776dcbfb //log(1/frcpa(1+118/256))/2 +data8 0x3fc8873658327ccf //log(1/frcpa(1+119/256))/2 +data8 0x3fc8aa75973ab8cf //log(1/frcpa(1+120/256))/2 +data8 0x3fc8d992dc8824e5 //log(1/frcpa(1+121/256))/2 +data8 0x3fc908d2ea7d9512 //log(1/frcpa(1+122/256))/2 +data8 0x3fc92c59e79c0e56 //log(1/frcpa(1+123/256))/2 +data8 0x3fc95bd750ee3ed3 //log(1/frcpa(1+124/256))/2 +data8 0x3fc98b7811a3ee5b //log(1/frcpa(1+125/256))/2 +data8 0x3fc9af47f33d406c //log(1/frcpa(1+126/256))/2 +data8 0x3fc9df270c1914a8 //log(1/frcpa(1+127/256))/2 +data8 0x3fca0325ed14fda4 //log(1/frcpa(1+128/256))/2 +data8 0x3fca33440224fa79 //log(1/frcpa(1+129/256))/2 +data8 0x3fca57725e80c383 //log(1/frcpa(1+130/256))/2 +data8 0x3fca87d0165dd199 //log(1/frcpa(1+131/256))/2 +data8 0x3fcaac2e6c03f896 //log(1/frcpa(1+132/256))/2 +data8 0x3fcadccc6fdf6a81 //log(1/frcpa(1+133/256))/2 +data8 0x3fcb015b3eb1e790 //log(1/frcpa(1+134/256))/2 +data8 0x3fcb323a3a635948 //log(1/frcpa(1+135/256))/2 +data8 0x3fcb56fa04462909 //log(1/frcpa(1+136/256))/2 +data8 0x3fcb881aa659bc93 //log(1/frcpa(1+137/256))/2 +data8 0x3fcbad0bef3db165 //log(1/frcpa(1+138/256))/2 +data8 0x3fcbd21297781c2f //log(1/frcpa(1+139/256))/2 +data8 0x3fcc039236f08819 //log(1/frcpa(1+140/256))/2 +data8 0x3fcc28cb1e4d32fd //log(1/frcpa(1+141/256))/2 +data8 0x3fcc4e19b84723c2 //log(1/frcpa(1+142/256))/2 +data8 0x3fcc7ff9c74554c9 //log(1/frcpa(1+143/256))/2 +data8 0x3fcca57b64e9db05 //log(1/frcpa(1+144/256))/2 +data8 0x3fcccb130a5cebb0 //log(1/frcpa(1+145/256))/2 +data8 0x3fccf0c0d18f326f //log(1/frcpa(1+146/256))/2 +data8 0x3fcd232075b5a201 //log(1/frcpa(1+147/256))/2 +data8 0x3fcd490246defa6b //log(1/frcpa(1+148/256))/2 +data8 0x3fcd6efa918d25cd //log(1/frcpa(1+149/256))/2 +data8 0x3fcd9509707ae52f //log(1/frcpa(1+150/256))/2 +data8 0x3fcdbb2efe92c554 //log(1/frcpa(1+151/256))/2 +data8 0x3fcdee2f3445e4af //log(1/frcpa(1+152/256))/2 +data8 0x3fce148a1a2726ce //log(1/frcpa(1+153/256))/2 +data8 0x3fce3afc0a49ff40 //log(1/frcpa(1+154/256))/2 +data8 0x3fce6185206d516e //log(1/frcpa(1+155/256))/2 +data8 0x3fce882578823d52 //log(1/frcpa(1+156/256))/2 +data8 0x3fceaedd2eac990c //log(1/frcpa(1+157/256))/2 +data8 0x3fced5ac5f436be3 //log(1/frcpa(1+158/256))/2 +data8 0x3fcefc9326d16ab9 //log(1/frcpa(1+159/256))/2 +data8 0x3fcf2391a2157600 //log(1/frcpa(1+160/256))/2 +data8 0x3fcf4aa7ee03192d //log(1/frcpa(1+161/256))/2 +data8 0x3fcf71d627c30bb0 //log(1/frcpa(1+162/256))/2 +data8 0x3fcf991c6cb3b379 //log(1/frcpa(1+163/256))/2 +data8 0x3fcfc07ada69a910 //log(1/frcpa(1+164/256))/2 +data8 0x3fcfe7f18eb03d3e //log(1/frcpa(1+165/256))/2 +data8 0x3fd007c053c5002e //log(1/frcpa(1+166/256))/2 +data8 0x3fd01b942198a5a1 //log(1/frcpa(1+167/256))/2 +data8 0x3fd02f74400c64eb //log(1/frcpa(1+168/256))/2 +data8 0x3fd04360be7603ad //log(1/frcpa(1+169/256))/2 +data8 0x3fd05759ac47fe34 //log(1/frcpa(1+170/256))/2 +data8 0x3fd06b5f1911cf52 //log(1/frcpa(1+171/256))/2 +data8 0x3fd078bf0533c568 //log(1/frcpa(1+172/256))/2 +data8 0x3fd08cd9687e7b0e //log(1/frcpa(1+173/256))/2 +data8 0x3fd0a10074cf9019 //log(1/frcpa(1+174/256))/2 +data8 0x3fd0b5343a234477 //log(1/frcpa(1+175/256))/2 +data8 0x3fd0c974c89431ce //log(1/frcpa(1+176/256))/2 +data8 0x3fd0ddc2305b9886 //log(1/frcpa(1+177/256))/2 +data8 0x3fd0eb524bafc918 //log(1/frcpa(1+178/256))/2 +data8 0x3fd0ffb54213a476 //log(1/frcpa(1+179/256))/2 +data8 0x3fd114253da97d9f //log(1/frcpa(1+180/256))/2 +data8 0x3fd128a24f1d9aff //log(1/frcpa(1+181/256))/2 +data8 0x3fd1365252bf0865 //log(1/frcpa(1+182/256))/2 +data8 0x3fd14ae558b4a92d //log(1/frcpa(1+183/256))/2 +data8 0x3fd15f85a19c765b //log(1/frcpa(1+184/256))/2 +data8 0x3fd16d4d38c119fa //log(1/frcpa(1+185/256))/2 +data8 0x3fd18203c20dd133 //log(1/frcpa(1+186/256))/2 +data8 0x3fd196c7bc4b1f3b //log(1/frcpa(1+187/256))/2 +data8 0x3fd1a4a738b7a33c //log(1/frcpa(1+188/256))/2 +data8 0x3fd1b981c0c9653d //log(1/frcpa(1+189/256))/2 +data8 0x3fd1ce69e8bb106b //log(1/frcpa(1+190/256))/2 +data8 0x3fd1dc619de06944 //log(1/frcpa(1+191/256))/2 +data8 0x3fd1f160a2ad0da4 //log(1/frcpa(1+192/256))/2 +data8 0x3fd2066d7740737e //log(1/frcpa(1+193/256))/2 +data8 0x3fd2147dba47a394 //log(1/frcpa(1+194/256))/2 +data8 0x3fd229a1bc5ebac3 //log(1/frcpa(1+195/256))/2 +data8 0x3fd237c1841a502e //log(1/frcpa(1+196/256))/2 +data8 0x3fd24cfce6f80d9a //log(1/frcpa(1+197/256))/2 +data8 0x3fd25b2c55cd5762 //log(1/frcpa(1+198/256))/2 +data8 0x3fd2707f4d5f7c41 //log(1/frcpa(1+199/256))/2 +data8 0x3fd285e0842ca384 //log(1/frcpa(1+200/256))/2 +data8 0x3fd294294708b773 //log(1/frcpa(1+201/256))/2 +data8 0x3fd2a9a2670aff0c //log(1/frcpa(1+202/256))/2 +data8 0x3fd2b7fb2c8d1cc1 //log(1/frcpa(1+203/256))/2 +data8 0x3fd2c65a6395f5f5 //log(1/frcpa(1+204/256))/2 +data8 0x3fd2dbf557b0df43 //log(1/frcpa(1+205/256))/2 +data8 0x3fd2ea64c3f97655 //log(1/frcpa(1+206/256))/2 +data8 0x3fd3001823684d73 //log(1/frcpa(1+207/256))/2 +data8 0x3fd30e97e9a8b5cd //log(1/frcpa(1+208/256))/2 +data8 0x3fd32463ebdd34ea //log(1/frcpa(1+209/256))/2 +data8 0x3fd332f4314ad796 //log(1/frcpa(1+210/256))/2 +data8 0x3fd348d90e7464d0 //log(1/frcpa(1+211/256))/2 +data8 0x3fd35779f8c43d6e //log(1/frcpa(1+212/256))/2 +data8 0x3fd36621961a6a99 //log(1/frcpa(1+213/256))/2 +data8 0x3fd37c299f3c366a //log(1/frcpa(1+214/256))/2 +data8 0x3fd38ae2171976e7 //log(1/frcpa(1+215/256))/2 +data8 0x3fd399a157a603e7 //log(1/frcpa(1+216/256))/2 +data8 0x3fd3afccfe77b9d1 //log(1/frcpa(1+217/256))/2 +data8 0x3fd3be9d503533b5 //log(1/frcpa(1+218/256))/2 +data8 0x3fd3cd7480b4a8a3 //log(1/frcpa(1+219/256))/2 +data8 0x3fd3e3c43918f76c //log(1/frcpa(1+220/256))/2 +data8 0x3fd3f2acb27ed6c7 //log(1/frcpa(1+221/256))/2 +data8 0x3fd4019c2125ca93 //log(1/frcpa(1+222/256))/2 +data8 0x3fd4181061389722 //log(1/frcpa(1+223/256))/2 +data8 0x3fd42711518df545 //log(1/frcpa(1+224/256))/2 +data8 0x3fd436194e12b6bf //log(1/frcpa(1+225/256))/2 +data8 0x3fd445285d68ea69 //log(1/frcpa(1+226/256))/2 +data8 0x3fd45bcc464c893a //log(1/frcpa(1+227/256))/2 +data8 0x3fd46aed21f117fc //log(1/frcpa(1+228/256))/2 +data8 0x3fd47a1527e8a2d3 //log(1/frcpa(1+229/256))/2 +data8 0x3fd489445efffccc //log(1/frcpa(1+230/256))/2 +data8 0x3fd4a018bcb69835 //log(1/frcpa(1+231/256))/2 +data8 0x3fd4af5a0c9d65d7 //log(1/frcpa(1+232/256))/2 +data8 0x3fd4bea2a5bdbe87 //log(1/frcpa(1+233/256))/2 +data8 0x3fd4cdf28f10ac46 //log(1/frcpa(1+234/256))/2 +data8 0x3fd4dd49cf994058 //log(1/frcpa(1+235/256))/2 +data8 0x3fd4eca86e64a684 //log(1/frcpa(1+236/256))/2 +data8 0x3fd503c43cd8eb68 //log(1/frcpa(1+237/256))/2 +data8 0x3fd513356667fc57 //log(1/frcpa(1+238/256))/2 +data8 0x3fd522ae0738a3d8 //log(1/frcpa(1+239/256))/2 +data8 0x3fd5322e26867857 //log(1/frcpa(1+240/256))/2 +data8 0x3fd541b5cb979809 //log(1/frcpa(1+241/256))/2 +data8 0x3fd55144fdbcbd62 //log(1/frcpa(1+242/256))/2 +data8 0x3fd560dbc45153c7 //log(1/frcpa(1+243/256))/2 +data8 0x3fd5707a26bb8c66 //log(1/frcpa(1+244/256))/2 +data8 0x3fd587f60ed5b900 //log(1/frcpa(1+245/256))/2 +data8 0x3fd597a7977c8f31 //log(1/frcpa(1+246/256))/2 +data8 0x3fd5a760d634bb8b //log(1/frcpa(1+247/256))/2 +data8 0x3fd5b721d295f10f //log(1/frcpa(1+248/256))/2 +data8 0x3fd5c6ea94431ef9 //log(1/frcpa(1+249/256))/2 +data8 0x3fd5d6bb22ea86f6 //log(1/frcpa(1+250/256))/2 +data8 0x3fd5e6938645d390 //log(1/frcpa(1+251/256))/2 +data8 0x3fd5f673c61a2ed2 //log(1/frcpa(1+252/256))/2 +data8 0x3fd6065bea385926 //log(1/frcpa(1+253/256))/2 +data8 0x3fd6164bfa7cc06b //log(1/frcpa(1+254/256))/2 +data8 0x3fd62643fecf9743 //log(1/frcpa(1+255/256))/2 +LOCAL_OBJECT_END(atanhf_data2) + + +.section .text +GLOBAL_LIBM_ENTRY(atanhf) + +{ .mfi + getf.exp rArgSExpb = f8 + fclass.m p9,p0 = f8, 0x0b // is arg denormal ? + mov rExpbMask = 0x1ffff +} +{ .mfi + addl DataPtr = @ltoff(atanhf_data), gp + fnma.s1 fOneMx = f8, f1, f1 // 1 - x + mov rBias = 0xffff +} +;; + +{ .mfi + nop.m 0 + fclass.m p7,p0 = f8, 0xc7 // is arg NaN or +/-0 ? + mov rNearZeroBound = 0xffeb // 2^(-20) +} +{ .mfi + ld8 DataPtr = [DataPtr] + fma.s1 fOnePx = f8, f1, f1 // 1 + x + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + fnorm.s1 fNormX = f8 // Normalize x +(p9) br.cond.spnt ATANH_UNORM // Branch if x=unorm +} +;; + +ATANH_COMMON: +// Return here if x=unorm and not denorm +{ .mfi + ldfpd fP3, fP2 = [DataPtr], 16 + fma.s1 fX2 = f8, f8, f0 // x^2 + nop.i 0 +} +{ .mfb + nop.m 0 +(p7) fma.s.s0 f8 = f8,f1,f8 // NaN or +/-0 +(p7) br.ret.spnt b0 +} +;; + +{ .mfi + ldfpd fP1, fHalf = [DataPtr], 16 + frcpa.s1 fRcpM, p9 = f1, fOneMx // rcpm = frcpa(1 - x) + nop.i 0 +} +;; + +{ .mfi + getf.exp rExpbm = fOneMx + frcpa.s1 fRcpP, p0 = f1, fOnePx // rcpp = frcpa(1 + x) + // biased exponent + and rArgExpb = rArgSExpb, rExpbMask +} +;; + +{ .mmi + getf.exp rExpbp = fOnePx + // is |x| < 2^(-20) ? + cmp.gt p8,p0 = rNearZeroBound, rArgExpb + cmp.ge p6,p0 = rArgExpb, rBias // is |x| >= 1 ? +} +;; + +{ .mmb + getf.sig rSigm = fOneMx + nop.m 0 +(p6) br.cond.spnt atanhf_ge_one +} +;; + +{ .mfb + getf.sig rSigp = fOnePx +(p8) fma.s.s0 f8 = fX2, f8, f8 // x + x^3 +(p8) br.ret.spnt b0 // Exit for MAX_DENORM_ABS < |x| < 2^-20 +} +;; + +{ .mfi + ldfd fLog2 = [DataPtr], 16 + fms.s1 fRm = fRcpM, fOneMx, f1 // rm = rcpm * (1 - x) - 1 + nop.i 0 +} +;; + +{ .mmf + // (1 - x) is always positive here and we need not mask sign bit + sub rNm = rExpbm, rBias + // (1 + x) is always positive here and we need not mask sign bit + sub rNp = rExpbp, rBias + fms.s1 fRp = fRcpP, fOnePx, f1 // rp = rcpp * (1 + x) - 1 +} +;; + +{ .mmi + setf.sig fN4CvtM = rNm + setf.sig fN4CvtP = rNp + extr.u rIndm = rSigm,55,8 // Extract 8 bits +} +;; + +{ .mmi + shladd RcpTablePtrM = rIndm, 3, DataPtr + nop.m 0 + extr.u rIndp = rSigp,55,8 // Extract 8 bits +} +;; + +{ .mmi + ldfd fLogTm = [RcpTablePtrM] + shladd RcpTablePtrP = rIndp, 3, DataPtr + nop.i 0 +} +;; + +{ .mfi + ldfd fLogTp = [RcpTablePtrP] + fma.s1 fRm2 = fRm, fRm, f0 // rm^2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fP32m = fP3, fRm, fP2 // P3*rm + P2 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fRp2 = fRp, fRp, f0 // rp^2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fP10m = fP1, fRm, fHalf // P1*rm + 1 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fP32p = fP3, fRp, fP2 // P3*rp + P2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fP10p = fP1, fRp, fHalf // P1*rp + 1 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcvt.xf fNm = fN4CvtM + nop.i 0 +} +{ .mfi + nop.m 0 + fcvt.xf fNp = fN4CvtP + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + // (P3*rm + P2)*rm^2 + (P1*rm + 1) + fma.s1 fP32m = fP32m, fRm2, fP10m + nop.i 0 +} +{ .mfi + nop.m 0 + // (P3*rp + P2)*rp^2 + (P1*rp + 1) + fma.s1 fP32p = fP32p, fRp2, fP10p + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + // Nm*ln(2)/2 + Tm/2 + fma.s1 fLogTm = fNm, fLog2, fLogTm + nop.i 0 +} +{ .mfi + nop.m 0 + // Np*ln(2)/2 + Tp/2 + fma.s1 fLogTp = fNp, fLog2, fLogTp + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + // ((P3*rm + P2)*rm^2 + (P3*rm + 1))*0.5*rm + (Nm*ln(2)/2 + Tm/2) + fma.d.s1 fP32m = fP32m, fRm, fLogTm + nop.i 0 +} +{ .mfi + nop.m 0 + // ((P3*rp + P2)*rp^2 + (P3*rp + 1))*0.5*rp + (Np*ln(2)/2 + Tp/2) + fma.d.s1 fP32p = fP32p, fRp, fLogTp + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + // atanhf(x) = 0.5 * (log(1 + x) - log(1 - x)) + fnma.s.s0 f8 = fP32m, f1, fP32p + br.ret.sptk b0 // Exit for 2^(-20) <= |x| < 1.0 +} +;; + + +ATANH_UNORM: +// Here if x=unorm +{ .mfi + getf.exp rArgSExpb = fNormX // Recompute if x unorm + fclass.m p0,p9 = fNormX, 0x0b // Test x denorm + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + fcmp.lt.s0 p10,p11 = f8, f0 // Set denormal flag +(p9) br.cond.sptk ATANH_COMMON // Continue if x unorm and not denorm +} +;; + +.pred.rel "mutex",p6,p7 +{ .mfi + nop.m 0 +(p6) fnma.s.s0 f8 = f8,f8,f8 // Result x-x^2 if x=-denorm + nop.i 0 +} +{ .mfb + nop.m 0 +(p7) fma.s.s0 f8 = f8,f8,f8 // Result x+x^2 if x=+denorm + br.ret.spnt b0 // Exit if denorm +} +;; + +// Here if |x| >= 1.0 +atanhf_ge_one: +{ .mfi + alloc r32 = ar.pfs,1,3,4,0 + fmerge.s fArgAbs = f0, f8 // Form |x| + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fmerge.s f10 = f8, f8 // Save input for error call + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcmp.eq.s1 p6,p7 = fArgAbs, f1 // Test for |x| = 1.0 + nop.i 0 +} +;; + +// Set error tag and result, and raise invalid flag if |x| > 1.0 +{ .mfi +(p7) mov atanh_GR_tag = 133 +(p7) frcpa.s0 f8, p0 = f0, f0 // Get QNaN, and raise invalid + nop.i 0 +} +;; + +// Set error tag and result, and raise Z flag if |x| = 1.0 +{ .mfi + nop.m 0 +(p6) frcpa.s0 fRm, p0 = f1, f0 // Get inf, and raise Z flag + nop.i 0 +} +;; + +{ .mfb +(p6) mov atanh_GR_tag = 134 +(p6) fmerge.s f8 = f8, fRm // result is +-inf + br.cond.sptk __libm_error_region // Exit if |x| >= 1.0 +} +;; + +GLOBAL_LIBM_END(atanhf) + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue + +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; + +{ .mmi + stfs [GR_Parameter_Y] = f1,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; + +.body +{ .mib + stfs [GR_Parameter_X] = f10 // STORE Parameter 1 on stack + // Parameter 3 address + add GR_Parameter_RESULT = 0,GR_Parameter_Y + nop.b 0 +} +{ .mib + stfs [GR_Parameter_Y] = f8 // STORE Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; + +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; + +{ .mmi + ldfs f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; + +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) + + +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/e_atanhl.S b/sysdeps/ia64/fpu/e_atanhl.S new file mode 100644 index 0000000000..cee1ba17b1 --- /dev/null +++ b/sysdeps/ia64/fpu/e_atanhl.S @@ -0,0 +1,1156 @@ +.file "atanhl.s" + + +// Copyright (c) 2001 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2001 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,INCLUDING,BUT NOT +// LIMITED TO,THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT,INDIRECT,INCIDENTAL,SPECIAL, +// EXEMPLARY,OR CONSEQUENTIAL DAMAGES (INCLUDING,BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,DATA,OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY,WHETHER IN CONTRACT,STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE,EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code,and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +//********************************************************************* +// +// History: +// 09/10/01 Initial version +// 12/11/01 Corrected .restore syntax +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align; +// used data8 for long double table values +// +//********************************************************************* +// +//********************************************************************* +// +// Function: atanhl(x) computes the principle value of the inverse +// hyperbolic tangent of x. +// +//********************************************************************* +// +// Resources Used: +// +// Floating-Point Registers: f8 (Input and Return Value) +// f33-f73 +// +// General Purpose Registers: +// r32-r52 +// r49-r52 (Used to pass arguments to error handling routine) +// +// Predicate Registers: p6-p15 +// +//********************************************************************* +// +// IEEE Special Conditions: +// +// atanhl(inf) = QNaN +// atanhl(-inf) = QNaN +// atanhl(+/-0) = +/-0 +// atanhl(1) = +inf +// atanhl(-1) = -inf +// atanhl(|x|>1) = QNaN +// atanhl(SNaN) = QNaN +// atanhl(QNaN) = QNaN +// +//********************************************************************* +// +// Overview +// +// The method consists of two cases. +// +// If |x| < 1/32 use case atanhl_near_zero; +// else use case atanhl_regular; +// +// Case atanhl_near_zero: +// +// atanhl(x) can be approximated by the Taylor series expansion +// up to order 17. +// +// Case atanhl_regular: +// +// Here we use formula atanhl(x) = sign(x)*log1pl(2*|x|/(1-|x|))/2 and +// calculation is subdivided into two stages. The first stage is +// calculating of X = 2*|x|/(1-|x|). The second one is calculating of +// sign(x)*log1pl(X)/2. To obtain required accuracy we use precise division +// algorythm output of which is a pair of two extended precision values those +// approximate result of division with accuracy higher than working +// precision. This pair is passed to modified log1pl function. +// +// +// 1. calculating of X = 2*|x|/(1-|x|) +// ( based on Peter Markstein's "IA-64 and Elementary Functions" book ) +// ******************************************************************** +// +// a = 2*|x| +// b = 1 - |x| +// b_lo = |x| - (1 - b) +// +// y = frcpa(b) initial approximation of 1/b +// q = a*y initial approximation of a/b +// +// e = 1 - b*y +// e2 = e + e^2 +// e1 = e^2 +// y1 = y + y*e2 = y + y*(e+e^2) +// +// e3 = e + e1^2 +// y2 = y + y1*e3 = y + y*(e+e^2+..+e^6) +// +// r = a - b*q +// e = 1 - b*y2 +// X = q + r*y2 high part of a/b +// +// y3 = y2 + y2*e4 +// r1 = a - b*X +// r1 = r1 - b_lo*X +// X_lo = r1*y3 low part of a/b +// +// 2. special log1p algorithm overview +// *********************************** +// +// Here we use a table lookup method. The basic idea is that in +// order to compute logl(Arg) = log1pl (Arg-1) for an argument Arg in [1,2), +// we construct a value G such that G*Arg is close to 1 and that +// logl(1/G) is obtainable easily from a table of values calculated +// beforehand. Thus +// +// logl(Arg) = logl(1/G) + logl(G*Arg) +// = logl(1/G) + logl(1 + (G*Arg - 1)) +// +// Because |G*Arg - 1| is small, the second term on the right hand +// side can be approximated by a short polynomial. We elaborate +// this method in several steps. +// +// Step 0: Initialization +// ------ +// We need to calculate logl(X + X_lo + 1). Obtain N, S_hi such that +// +// X + X_lo + 1 = 2^N * ( S_hi + S_lo ) exactly +// +// where S_hi in [1,2) and S_lo is a correction to S_hi in the sense +// that |S_lo| <= ulp(S_hi). +// +// For the special version of log1p we add X_lo to S_lo (S_lo = S_lo + X_lo) +// !-----------------------------------------------------------------------! +// +// Step 1: Argument Reduction +// ------ +// Based on S_hi, obtain G_1, G_2, G_3 from a table and calculate +// +// G := G_1 * G_2 * G_3 +// r := (G * S_hi - 1) + G * S_lo +// +// These G_j's have the property that the product is exactly +// representable and that |r| < 2^(-12) as a result. +// +// Step 2: Approximation +// ------ +// logl(1 + r) is approximated by a short polynomial poly(r). +// +// Step 3: Reconstruction +// ------ +// Finally, log1pl(X + X_lo) = logl(X + X_lo + 1) is given by +// +// logl(X + X_lo + 1) = logl(2^N * (S_hi + S_lo)) +// ~=~ N*logl(2) + logl(1/G) + logl(1 + r) +// ~=~ N*logl(2) + logl(1/G) + poly(r). +// +// For detailed description see log1p1 function, regular path. +// +//********************************************************************* + +RODATA +.align 64 + +// ************* DO NOT CHANGE THE ORDER OF THESE TABLES ************* + +LOCAL_OBJECT_START(Constants_TaylorSeries) +data8 0xF0F0F0F0F0F0F0F1,0x00003FFA // C17 +data8 0x8888888888888889,0x00003FFB // C15 +data8 0x9D89D89D89D89D8A,0x00003FFB // C13 +data8 0xBA2E8BA2E8BA2E8C,0x00003FFB // C11 +data8 0xE38E38E38E38E38E,0x00003FFB // C9 +data8 0x9249249249249249,0x00003FFC // C7 +data8 0xCCCCCCCCCCCCCCCD,0x00003FFC // C5 +data8 0xAAAAAAAAAAAAAAAA,0x00003FFD // C3 +data4 0x3f000000 // 1/2 +data4 0x00000000 // pad +data4 0x00000000 +data4 0x00000000 +LOCAL_OBJECT_END(Constants_TaylorSeries) + +LOCAL_OBJECT_START(Constants_Q) +data4 0x00000000,0xB1721800,0x00003FFE,0x00000000 // log2_hi +data4 0x4361C4C6,0x82E30865,0x0000BFE2,0x00000000 // log2_lo +data4 0x328833CB,0xCCCCCAF2,0x00003FFC,0x00000000 // Q4 +data4 0xA9D4BAFB,0x80000077,0x0000BFFD,0x00000000 // Q3 +data4 0xAAABE3D2,0xAAAAAAAA,0x00003FFD,0x00000000 // Q2 +data4 0xFFFFDAB7,0xFFFFFFFF,0x0000BFFD,0x00000000 // Q1 +LOCAL_OBJECT_END(Constants_Q) + + +// Z1 - 16 bit fixed +LOCAL_OBJECT_START(Constants_Z_1) +data4 0x00008000 +data4 0x00007879 +data4 0x000071C8 +data4 0x00006BCB +data4 0x00006667 +data4 0x00006187 +data4 0x00005D18 +data4 0x0000590C +data4 0x00005556 +data4 0x000051EC +data4 0x00004EC5 +data4 0x00004BDB +data4 0x00004925 +data4 0x0000469F +data4 0x00004445 +data4 0x00004211 +LOCAL_OBJECT_END(Constants_Z_1) + +// G1 and H1 - IEEE single and h1 - IEEE double +LOCAL_OBJECT_START(Constants_G_H_h1) +data4 0x3F800000,0x00000000 +data8 0x0000000000000000 +data4 0x3F70F0F0,0x3D785196 +data8 0x3DA163A6617D741C +data4 0x3F638E38,0x3DF13843 +data8 0x3E2C55E6CBD3D5BB +data4 0x3F579430,0x3E2FF9A0 +data8 0xBE3EB0BFD86EA5E7 +data4 0x3F4CCCC8,0x3E647FD6 +data8 0x3E2E6A8C86B12760 +data4 0x3F430C30,0x3E8B3AE7 +data8 0x3E47574C5C0739BA +data4 0x3F3A2E88,0x3EA30C68 +data8 0x3E20E30F13E8AF2F +data4 0x3F321640,0x3EB9CEC8 +data8 0xBE42885BF2C630BD +data4 0x3F2AAAA8,0x3ECF9927 +data8 0x3E497F3497E577C6 +data4 0x3F23D708,0x3EE47FC5 +data8 0x3E3E6A6EA6B0A5AB +data4 0x3F1D89D8,0x3EF8947D +data8 0xBDF43E3CD328D9BE +data4 0x3F17B420,0x3F05F3A1 +data8 0x3E4094C30ADB090A +data4 0x3F124920,0x3F0F4303 +data8 0xBE28FBB2FC1FE510 +data4 0x3F0D3DC8,0x3F183EBF +data8 0x3E3A789510FDE3FA +data4 0x3F088888,0x3F20EC80 +data8 0x3E508CE57CC8C98F +data4 0x3F042108,0x3F29516A +data8 0xBE534874A223106C +LOCAL_OBJECT_END(Constants_G_H_h1) + +// Z2 - 16 bit fixed +LOCAL_OBJECT_START(Constants_Z_2) +data4 0x00008000 +data4 0x00007F81 +data4 0x00007F02 +data4 0x00007E85 +data4 0x00007E08 +data4 0x00007D8D +data4 0x00007D12 +data4 0x00007C98 +data4 0x00007C20 +data4 0x00007BA8 +data4 0x00007B31 +data4 0x00007ABB +data4 0x00007A45 +data4 0x000079D1 +data4 0x0000795D +data4 0x000078EB +LOCAL_OBJECT_END(Constants_Z_2) + +// G2 and H2 - IEEE single and h2 - IEEE double +LOCAL_OBJECT_START(Constants_G_H_h2) +data4 0x3F800000,0x00000000 +data8 0x0000000000000000 +data4 0x3F7F00F8,0x3B7F875D +data8 0x3DB5A11622C42273 +data4 0x3F7E03F8,0x3BFF015B +data8 0x3DE620CF21F86ED3 +data4 0x3F7D08E0,0x3C3EE393 +data8 0xBDAFA07E484F34ED +data4 0x3F7C0FC0,0x3C7E0586 +data8 0xBDFE07F03860BCF6 +data4 0x3F7B1880,0x3C9E75D2 +data8 0x3DEA370FA78093D6 +data4 0x3F7A2328,0x3CBDC97A +data8 0x3DFF579172A753D0 +data4 0x3F792FB0,0x3CDCFE47 +data8 0x3DFEBE6CA7EF896B +data4 0x3F783E08,0x3CFC15D0 +data8 0x3E0CF156409ECB43 +data4 0x3F774E38,0x3D0D874D +data8 0xBE0B6F97FFEF71DF +data4 0x3F766038,0x3D1CF49B +data8 0xBE0804835D59EEE8 +data4 0x3F757400,0x3D2C531D +data8 0x3E1F91E9A9192A74 +data4 0x3F748988,0x3D3BA322 +data8 0xBE139A06BF72A8CD +data4 0x3F73A0D0,0x3D4AE46F +data8 0x3E1D9202F8FBA6CF +data4 0x3F72B9D0,0x3D5A1756 +data8 0xBE1DCCC4BA796223 +data4 0x3F71D488,0x3D693B9D +data8 0xBE049391B6B7C239 +LOCAL_OBJECT_END(Constants_G_H_h2) + +// G3 and H3 - IEEE single and h3 - IEEE double +LOCAL_OBJECT_START(Constants_G_H_h3) +data4 0x3F7FFC00,0x38800100 +data8 0x3D355595562224CD +data4 0x3F7FF400,0x39400480 +data8 0x3D8200A206136FF6 +data4 0x3F7FEC00,0x39A00640 +data8 0x3DA4D68DE8DE9AF0 +data4 0x3F7FE400,0x39E00C41 +data8 0xBD8B4291B10238DC +data4 0x3F7FDC00,0x3A100A21 +data8 0xBD89CCB83B1952CA +data4 0x3F7FD400,0x3A300F22 +data8 0xBDB107071DC46826 +data4 0x3F7FCC08,0x3A4FF51C +data8 0x3DB6FCB9F43307DB +data4 0x3F7FC408,0x3A6FFC1D +data8 0xBD9B7C4762DC7872 +data4 0x3F7FBC10,0x3A87F20B +data8 0xBDC3725E3F89154A +data4 0x3F7FB410,0x3A97F68B +data8 0xBD93519D62B9D392 +data4 0x3F7FAC18,0x3AA7EB86 +data8 0x3DC184410F21BD9D +data4 0x3F7FA420,0x3AB7E101 +data8 0xBDA64B952245E0A6 +data4 0x3F7F9C20,0x3AC7E701 +data8 0x3DB4B0ECAABB34B8 +data4 0x3F7F9428,0x3AD7DD7B +data8 0x3D9923376DC40A7E +data4 0x3F7F8C30,0x3AE7D474 +data8 0x3DC6E17B4F2083D3 +data4 0x3F7F8438,0x3AF7CBED +data8 0x3DAE314B811D4394 +data4 0x3F7F7C40,0x3B03E1F3 +data8 0xBDD46F21B08F2DB1 +data4 0x3F7F7448,0x3B0BDE2F +data8 0xBDDC30A46D34522B +data4 0x3F7F6C50,0x3B13DAAA +data8 0x3DCB0070B1F473DB +data4 0x3F7F6458,0x3B1BD766 +data8 0xBDD65DDC6AD282FD +data4 0x3F7F5C68,0x3B23CC5C +data8 0xBDCDAB83F153761A +data4 0x3F7F5470,0x3B2BC997 +data8 0xBDDADA40341D0F8F +data4 0x3F7F4C78,0x3B33C711 +data8 0x3DCD1BD7EBC394E8 +data4 0x3F7F4488,0x3B3BBCC6 +data8 0xBDC3532B52E3E695 +data4 0x3F7F3C90,0x3B43BAC0 +data8 0xBDA3961EE846B3DE +data4 0x3F7F34A0,0x3B4BB0F4 +data8 0xBDDADF06785778D4 +data4 0x3F7F2CA8,0x3B53AF6D +data8 0x3DCC3ED1E55CE212 +data4 0x3F7F24B8,0x3B5BA620 +data8 0xBDBA31039E382C15 +data4 0x3F7F1CC8,0x3B639D12 +data8 0x3D635A0B5C5AF197 +data4 0x3F7F14D8,0x3B6B9444 +data8 0xBDDCCB1971D34EFC +data4 0x3F7F0CE0,0x3B7393BC +data8 0x3DC7450252CD7ADA +data4 0x3F7F04F0,0x3B7B8B6D +data8 0xBDB68F177D7F2A42 +LOCAL_OBJECT_END(Constants_G_H_h3) + + + +// Floating Point Registers + +FR_C17 = f50 +FR_C15 = f51 +FR_C13 = f52 +FR_C11 = f53 +FR_C9 = f54 +FR_C7 = f55 +FR_C5 = f56 +FR_C3 = f57 +FR_x2 = f58 +FR_x3 = f59 +FR_x4 = f60 +FR_x8 = f61 + +FR_Rcp = f61 + +FR_A = f33 +FR_R1 = f33 + +FR_E1 = f34 +FR_E3 = f34 +FR_Y2 = f34 +FR_Y3 = f34 + +FR_E2 = f35 +FR_Y1 = f35 + +FR_B = f36 +FR_Y0 = f37 +FR_E0 = f38 +FR_E4 = f39 +FR_Q0 = f40 +FR_R0 = f41 +FR_B_lo = f42 + +FR_abs_x = f43 +FR_Bp = f44 +FR_Bn = f45 +FR_Yp = f46 +FR_Yn = f47 + +FR_X = f48 +FR_BB = f48 +FR_X_lo = f49 + +FR_G = f50 +FR_Y_hi = f51 +FR_H = f51 +FR_h = f52 +FR_G2 = f53 +FR_H2 = f54 +FR_h2 = f55 +FR_G3 = f56 +FR_H3 = f57 +FR_h3 = f58 + +FR_Q4 = f59 +FR_poly_lo = f59 +FR_Y_lo = f59 + +FR_Q3 = f60 +FR_Q2 = f61 + +FR_Q1 = f62 +FR_poly_hi = f62 + +FR_float_N = f63 + +FR_AA = f64 +FR_S_lo = f64 + +FR_S_hi = f65 +FR_r = f65 + +FR_log2_hi = f66 +FR_log2_lo = f67 +FR_Z = f68 +FR_2_to_minus_N = f69 +FR_rcub = f70 +FR_rsq = f71 +FR_05r = f72 +FR_Half = f73 + +FR_Arg_X = f50 +FR_Arg_Y = f0 +FR_RESULT = f8 + + + +// General Purpose Registers + +GR_ad_05 = r33 +GR_Index1 = r34 +GR_ArgExp = r34 +GR_Index2 = r35 +GR_ExpMask = r35 +GR_NearZeroBound = r36 +GR_signif = r36 +GR_X_0 = r37 +GR_X_1 = r37 +GR_X_2 = r38 +GR_Index3 = r38 +GR_minus_N = r39 +GR_Z_1 = r40 +GR_Z_2 = r40 +GR_N = r41 +GR_Bias = r42 +GR_M = r43 +GR_ad_taylor = r44 +GR_ad_taylor_2 = r45 +GR_ad2_tbl_3 = r45 +GR_ad_tbl_1 = r46 +GR_ad_tbl_2 = r47 +GR_ad_tbl_3 = r48 +GR_ad_q = r49 +GR_ad_z_1 = r50 +GR_ad_z_2 = r51 +GR_ad_z_3 = r52 + +// +// Added for unwind support +// +GR_SAVE_PFS = r46 +GR_SAVE_B0 = r47 +GR_SAVE_GP = r48 +GR_Parameter_X = r49 +GR_Parameter_Y = r50 +GR_Parameter_RESULT = r51 +GR_Parameter_TAG = r52 + + + +.section .text +GLOBAL_LIBM_ENTRY(atanhl) + +{ .mfi + alloc r32 = ar.pfs,0,17,4,0 + fnma.s1 FR_Bp = f8,f1,f1 // b = 1 - |arg| (for x>0) + mov GR_ExpMask = 0x1ffff +} +{ .mfi + addl GR_ad_taylor = @ltoff(Constants_TaylorSeries),gp + fma.s1 FR_Bn = f8,f1,f1 // b = 1 - |arg| (for x<0) + mov GR_NearZeroBound = 0xfffa // biased exp of 1/32 +};; +{ .mfi + getf.exp GR_ArgExp = f8 + fcmp.lt.s1 p6,p7 = f8,f0 // is negative? + nop.i 0 +} +{ .mfi + ld8 GR_ad_taylor = [GR_ad_taylor] + fmerge.s FR_abs_x = f1,f8 + nop.i 0 +};; +{ .mfi + nop.m 0 + fclass.m p8,p0 = f8,0x1C7 // is arg NaT,Q/SNaN or +/-0 ? + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_x2 = f8,f8,f0 + nop.i 0 +};; +{ .mfi + add GR_ad_z_1 = 0x0F0,GR_ad_taylor + fclass.m p9,p0 = f8,0x0a // is arg -denormal ? + add GR_ad_taylor_2 = 0x010,GR_ad_taylor +} +{ .mfi + add GR_ad_05 = 0x080,GR_ad_taylor + nop.f 0 + nop.i 0 +};; +{ .mfi + ldfe FR_C17 = [GR_ad_taylor],32 + fclass.m p10,p0 = f8,0x09 // is arg +denormal ? + add GR_ad_tbl_1 = 0x040,GR_ad_z_1 // point to Constants_G_H_h1 +} +{ .mfb + add GR_ad_z_2 = 0x140,GR_ad_z_1 // point to Constants_Z_2 + (p8) fma.s0 f8 = f8,f1,f0 // NaN or +/-0 + (p8) br.ret.spnt b0 // exit for Nan or +/-0 +};; +{ .mfi + ldfe FR_C15 = [GR_ad_taylor_2],32 + fclass.m p15,p0 = f8,0x23 // is +/-INF ? + add GR_ad_tbl_2 = 0x180,GR_ad_z_1 // point to Constants_G_H_h2 +} +{ .mfb + ldfe FR_C13 = [GR_ad_taylor],32 + (p9) fnma.s0 f8 = f8,f8,f8 // -denormal + (p9) br.ret.spnt b0 // exit for -denormal +};; +{ .mfi + ldfe FR_C11 = [GR_ad_taylor_2],32 + fcmp.eq.s0 p13,p0 = FR_abs_x,f1 // is |arg| = 1? + nop.i 0 +} +{ .mfb + ldfe FR_C9 = [GR_ad_taylor],32 +(p10) fma.s0 f8 = f8,f8,f8 // +denormal +(p10) br.ret.spnt b0 // exit for +denormal +};; +{ .mfi + ldfe FR_C7 = [GR_ad_taylor_2],32 + (p6) frcpa.s1 FR_Yn,p11 = f1,FR_Bn // y = frcpa(b) + and GR_ArgExp = GR_ArgExp,GR_ExpMask // biased exponent +} +{ .mfb + ldfe FR_C5 = [GR_ad_taylor],32 + fnma.s1 FR_B = FR_abs_x,f1,f1 // b = 1 - |arg| +(p15) br.cond.spnt atanhl_gt_one // |arg| > 1 +};; +{ .mfb + cmp.gt p14,p0 = GR_NearZeroBound,GR_ArgExp + (p7) frcpa.s1 FR_Yp,p12 = f1,FR_Bp // y = frcpa(b) +(p13) br.cond.spnt atanhl_eq_one // |arg| = 1/32 +} +{ .mfb + ldfe FR_C3 = [GR_ad_taylor_2],32 + fma.s1 FR_A = FR_abs_x,f1,FR_abs_x // a = 2 * |arg| +(p14) br.cond.spnt atanhl_near_zero // |arg| < 1/32 +};; +{ .mfi + nop.m 0 + fcmp.gt.s0 p8,p0 = FR_abs_x,f1 // is |arg| > 1 ? + nop.i 0 +};; +.pred.rel "mutex",p6,p7 +{ .mfi + nop.m 0 + (p6) fnma.s1 FR_B_lo = FR_Bn,f1,f1 // argt = 1 - (1 - |arg|) + nop.i 0 +} +{ .mfi + ldfs FR_Half = [GR_ad_05] + (p7) fnma.s1 FR_B_lo = FR_Bp,f1,f1 + nop.i 0 +};; +{ .mfi + nop.m 0 + (p6) fnma.s1 FR_E0 = FR_Yn,FR_Bn,f1 // e = 1-b*y + nop.i 0 +} +{ .mfb + nop.m 0 + (p6) fma.s1 FR_Y0 = FR_Yn,f1,f0 + (p8) br.cond.spnt atanhl_gt_one // |arg| > 1 +};; +{ .mfi + nop.m 0 + (p7) fnma.s1 FR_E0 = FR_Yp,FR_Bp,f1 + nop.i 0 +} +{ .mfi + nop.m 0 + (p6) fma.s1 FR_Q0 = FR_A,FR_Yn,f0 // q = a*y + nop.i 0 +};; +{ .mfi + nop.m 0 + (p7) fma.s1 FR_Q0 = FR_A,FR_Yp,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + (p7) fma.s1 FR_Y0 = FR_Yp,f1,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fclass.nm p10,p0 = f8,0x1FF // test for unsupported + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_E2 = FR_E0,FR_E0,FR_E0 // e2 = e+e^2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_E1 = FR_E0,FR_E0,f0 // e1 = e^2 + nop.i 0 +};; +{ .mfb + nop.m 0 +// Return generated NaN or other value for unsupported values. +(p10) fma.s0 f8 = f8, f0, f0 +(p10) br.ret.spnt b0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_Y1 = FR_Y0,FR_E2,FR_Y0 // y1 = y+y*e2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_E3 = FR_E1,FR_E1,FR_E0 // e3 = e+e1^2 + nop.i 0 +};; +{ .mfi + nop.m 0 + fnma.s1 FR_B_lo = FR_abs_x,f1,FR_B_lo // b_lo = argt-|arg| + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_Y2 = FR_Y1,FR_E3,FR_Y0 // y2 = y+y1*e3 + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 FR_R0 = FR_B,FR_Q0,FR_A // r = a-b*q + nop.i 0 +};; +{ .mfi + nop.m 0 + fnma.s1 FR_E4 = FR_B,FR_Y2,f1 // e4 = 1-b*y2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_X = FR_R0,FR_Y2,FR_Q0 // x = q+r*y2 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_Z = FR_X,f1,f1 // x+1 + nop.i 0 +};; +{ .mfi + nop.m 0 + (p6) fnma.s1 FR_Half = FR_Half,f1,f0 // sign(arg)/2 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_Y3 = FR_Y2,FR_E4,FR_Y2 // y3 = y2+y2*e4 + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 FR_R1 = FR_B,FR_X,FR_A // r1 = a-b*x + nop.i 0 +};; +{ .mfi + getf.sig GR_signif = FR_Z // get significand of x+1 + nop.f 0 + nop.i 0 +};; + + +{ .mfi + add GR_ad_q = -0x060,GR_ad_z_1 + nop.f 0 + extr.u GR_Index1 = GR_signif,59,4 // get high 4 bits of signif +} +{ .mfi + add GR_ad_tbl_3 = 0x280,GR_ad_z_1 // point to Constants_G_H_h3 + nop.f 0 + nop.i 0 +};; +{ .mfi + shladd GR_ad_z_1 = GR_Index1,2,GR_ad_z_1 // point to Z_1 + nop.f 0 + extr.u GR_X_0 = GR_signif,49,15 // get high 15 bits of significand +};; +{ .mfi + ld4 GR_Z_1 = [GR_ad_z_1] // load Z_1 + fmax.s1 FR_AA = FR_X,f1 // for S_lo,form AA = max(X,1.0) + nop.i 0 +} +{ .mfi + shladd GR_ad_tbl_1 = GR_Index1,4,GR_ad_tbl_1 // point to G_1 + nop.f 0 + mov GR_Bias = 0x0FFFF // exponent bias +};; +{ .mfi + ldfps FR_G,FR_H = [GR_ad_tbl_1],8 // load G_1,H_1 + fmerge.se FR_S_hi = f1,FR_Z // form |x+1| + nop.i 0 +};; +{ .mfi + getf.exp GR_N = FR_Z // get N = exponent of x+1 + nop.f 0 + nop.i 0 +} +{ .mfi + ldfd FR_h = [GR_ad_tbl_1] // load h_1 + fnma.s1 FR_R1 = FR_B_lo,FR_X,FR_R1 // r1 = r1-b_lo*x + nop.i 0 +};; +{ .mfi + ldfe FR_log2_hi = [GR_ad_q],16 // load log2_hi + nop.f 0 + pmpyshr2.u GR_X_1 = GR_X_0,GR_Z_1,15 // get bits 30-15 of X_0 * Z_1 +};; +// +// For performance,don't use result of pmpyshr2.u for 4 cycles. +// +{ .mfi + ldfe FR_log2_lo = [GR_ad_q],16 // load log2_lo + nop.f 0 + sub GR_N = GR_N,GR_Bias +};; +{ .mfi + ldfe FR_Q4 = [GR_ad_q],16 // load Q4 + fms.s1 FR_S_lo = FR_AA,f1,FR_Z // form S_lo = AA - Z + sub GR_minus_N = GR_Bias,GR_N // form exponent of 2^(-N) +};; +{ .mmf + ldfe FR_Q3 = [GR_ad_q],16 // load Q3 + // put integer N into rightmost significand + setf.sig FR_float_N = GR_N + fmin.s1 FR_BB = FR_X,f1 // for S_lo,form BB = min(X,1.0) +};; +{ .mfi + ldfe FR_Q2 = [GR_ad_q],16 // load Q2 + nop.f 0 + extr.u GR_Index2 = GR_X_1,6,4 // extract bits 6-9 of X_1 +};; +{ .mmi + ldfe FR_Q1 = [GR_ad_q] // load Q1 + shladd GR_ad_z_2 = GR_Index2,2,GR_ad_z_2 // point to Z_2 + nop.i 0 +};; +{ .mmi + ld4 GR_Z_2 = [GR_ad_z_2] // load Z_2 + shladd GR_ad_tbl_2 = GR_Index2,4,GR_ad_tbl_2 // point to G_2 + nop.i 0 +};; +{ .mfi + ldfps FR_G2,FR_H2 = [GR_ad_tbl_2],8 // load G_2,H_2 + nop.f 0 + nop.i 0 +};; +{ .mfi + ldfd FR_h2 = [GR_ad_tbl_2] // load h_2 + fma.s1 FR_S_lo = FR_S_lo,f1,FR_BB // S_lo = S_lo + BB + nop.i 0 +} +{ .mfi + setf.exp FR_2_to_minus_N = GR_minus_N // form 2^(-N) + fma.s1 FR_X_lo = FR_R1,FR_Y3,f0 // x_lo = r1*y3 + nop.i 0 +};; +{ .mfi + nop.m 0 + nop.f 0 + pmpyshr2.u GR_X_2 = GR_X_1,GR_Z_2,15 // get bits 30-15 of X_1 * Z_2 +};; +// +// For performance,don't use result of pmpyshr2.u for 4 cycles +// +{ .mfi + add GR_ad2_tbl_3 = 8,GR_ad_tbl_3 + nop.f 0 + nop.i 0 +} +{ .mfi + nop.m 0 + nop.f 0 + nop.i 0 +};; +{ .mfi + nop.m 0 + nop.f 0 + nop.i 0 +};; +{ .mfi + nop.m 0 + nop.f 0 + nop.i 0 +};; + +// +// Now GR_X_2 can be used +// +{ .mfi + nop.m 0 + nop.f 0 + extr.u GR_Index3 = GR_X_2,1,5 // extract bits 1-5 of X_2 +} +{ .mfi + nop.m 0 + fma.s1 FR_S_lo = FR_S_lo,f1,FR_X_lo // S_lo = S_lo + Arg_lo + nop.i 0 +};; + +{ .mfi + shladd GR_ad_tbl_3 = GR_Index3,4,GR_ad_tbl_3 // point to G_3 + fcvt.xf FR_float_N = FR_float_N + nop.i 0 +} +{ .mfi + shladd GR_ad2_tbl_3 = GR_Index3,4,GR_ad2_tbl_3 // point to h_3 + fma.s1 FR_Q1 = FR_Q1,FR_Half,f0 // sign(arg)*Q1/2 + nop.i 0 +};; +{ .mmi + ldfps FR_G3,FR_H3 = [GR_ad_tbl_3],8 // load G_3,H_3 + ldfd FR_h3 = [GR_ad2_tbl_3] // load h_3 + nop.i 0 +};; +{ .mfi + nop.m 0 + fmpy.s1 FR_G = FR_G,FR_G2 // G = G_1 * G_2 + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 FR_H = FR_H,FR_H2 // H = H_1 + H_2 + nop.i 0 +};; +{ .mfi + nop.m 0 + fadd.s1 FR_h = FR_h,FR_h2 // h = h_1 + h_2 + nop.i 0 +};; +{ .mfi + nop.m 0 + // S_lo = S_lo * 2^(-N) + fma.s1 FR_S_lo = FR_S_lo,FR_2_to_minus_N,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fmpy.s1 FR_G = FR_G,FR_G3 // G = (G_1 * G_2) * G_3 + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 FR_H = FR_H,FR_H3 // H = (H_1 + H_2) + H_3 + nop.i 0 +};; +{ .mfi + nop.m 0 + fadd.s1 FR_h = FR_h,FR_h3 // h = (h_1 + h_2) + h_3 + nop.i 0 +};; +{ .mfi + nop.m 0 + fms.s1 FR_r = FR_G,FR_S_hi,f1 // r = G * S_hi - 1 + nop.i 0 +} +{ .mfi + nop.m 0 + // Y_hi = N * log2_hi + H + fma.s1 FR_Y_hi = FR_float_N,FR_log2_hi,FR_H + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_h = FR_float_N,FR_log2_lo,FR_h // h = N * log2_lo + h + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_r = FR_G,FR_S_lo,FR_r // r = G * S_lo + (G * S_hi - 1) + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_poly_lo = FR_r,FR_Q4,FR_Q3 // poly_lo = r * Q4 + Q3 + nop.i 0 +} +{ .mfi + nop.m 0 + fmpy.s1 FR_rsq = FR_r,FR_r // rsq = r * r + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_05r = FR_r,FR_Half,f0 // sign(arg)*r/2 + nop.i 0 +};; +{ .mfi + nop.m 0 + // poly_lo = poly_lo * r + Q2 + fma.s1 FR_poly_lo = FR_poly_lo,FR_r,FR_Q2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_rcub = FR_rsq,FR_r,f0 // rcub = r^3 + nop.i 0 +};; +{ .mfi + nop.m 0 + // poly_hi = sing(arg)*(Q1*r^2 + r)/2 + fma.s1 FR_poly_hi = FR_Q1,FR_rsq,FR_05r + nop.i 0 +};; +{ .mfi + nop.m 0 + // poly_lo = poly_lo*r^3 + h + fma.s1 FR_poly_lo = FR_poly_lo,FR_rcub,FR_h + nop.i 0 +};; +{ .mfi + nop.m 0 + // Y_lo = poly_hi + poly_lo/2 + fma.s0 FR_Y_lo = FR_poly_lo,FR_Half,FR_poly_hi + nop.i 0 +};; +{ .mfb + nop.m 0 + // Result = arctanh(x) = Y_hi/2 + Y_lo + fma.s0 f8 = FR_Y_hi,FR_Half,FR_Y_lo + br.ret.sptk b0 +};; + +// Taylor's series +atanhl_near_zero: +{ .mfi + nop.m 0 + fma.s1 FR_x3 = FR_x2,f8,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_x4 = FR_x2,FR_x2,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_C17 = FR_C17,FR_x2,FR_C15 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_C13 = FR_C13,FR_x2,FR_C11 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_C9 = FR_C9,FR_x2,FR_C7 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_C5 = FR_C5,FR_x2,FR_C3 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_x8 = FR_x4,FR_x4,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_C17 = FR_C17,FR_x4,FR_C13 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_C9 = FR_C9,FR_x4,FR_C5 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_C17 = FR_C17,FR_x8,FR_C9 + nop.i 0 +};; +{ .mfb + nop.m 0 + fma.s0 f8 = FR_C17,FR_x3,f8 + br.ret.sptk b0 +};; + +atanhl_eq_one: +{ .mfi + nop.m 0 + frcpa.s0 FR_Rcp,p0 = f1,f0 // get inf,and raise Z flag + nop.i 0 +} +{ .mfi + nop.m 0 + fmerge.s FR_Arg_X = f8, f8 + nop.i 0 +};; +{ .mfb + mov GR_Parameter_TAG = 130 + fmerge.s FR_RESULT = f8,FR_Rcp // result is +-inf + br.cond.sptk __libm_error_region // exit if |x| = 1.0 +};; + +atanhl_gt_one: +{ .mfi + nop.m 0 + fmerge.s FR_Arg_X = f8, f8 + nop.i 0 +};; +{ .mfb + mov GR_Parameter_TAG = 129 + frcpa.s0 FR_RESULT,p0 = f0,f0 // get QNaN,and raise invalid + br.cond.sptk __libm_error_region // exit if |x| > 1.0 +};; + +GLOBAL_LIBM_END(atanhl) + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfe [GR_Parameter_Y] = FR_Arg_Y,16 // Save Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0,GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; +.body +{ .mib + stfe [GR_Parameter_X] = FR_Arg_X // Store Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y + nop.b 0 // Parameter 3 address +} +{ .mib + stfe [GR_Parameter_Y] = FR_RESULT // Store Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + nop.m 0 + nop.m 0 + add GR_Parameter_RESULT = 48,sp +};; +{ .mmi + ldfe f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region#) + +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/e_cosh.S b/sysdeps/ia64/fpu/e_cosh.S new file mode 100644 index 0000000000..885456b389 --- /dev/null +++ b/sysdeps/ia64/fpu/e_cosh.S @@ -0,0 +1,866 @@ +.file "cosh.s" + + +// Copyright (c) 2000 - 2005, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 04/04/00 Unwind support added +// 08/15/00 Bundle added after call to __libm_error_support to properly +// set [the previously overwritten] GR_Parameter_RESULT. +// 05/07/01 Reworked to improve speed of all paths +// 05/20/02 Cleaned up namespace and sf0 syntax +// 11/15/02 Improved speed with new algorithm +// 03/31/05 Reformatted delimiters between data tables + +// API +//============================================================== +// double cosh(double) + +// Overview of operation +//============================================================== +// Case 1: 0 < |x| < 0.25 +// Evaluate cosh(x) by a 12th order polynomial +// Care is take for the order of multiplication; and A2 is not exactly 1/4!, +// A3 is not exactly 1/6!, etc. +// cosh(x) = 1 + (A1*x^2 + A2*x^4 + A3*x^6 + A4*x^8 + A5*x^10 + A6*x^12) +// +// Case 2: 0.25 < |x| < 710.47586 +// Algorithm is based on the identity cosh(x) = ( exp(x) + exp(-x) ) / 2. +// The algorithm for exp is described as below. There are a number of +// economies from evaluating both exp(x) and exp(-x). Although we +// are evaluating both quantities, only where the quantities diverge do we +// duplicate the computations. The basic algorithm for exp(x) is described +// below. +// +// Take the input x. w is "how many log2/128 in x?" +// w = x * 128/log2 +// n = int(w) +// x = n log2/128 + r + delta + +// n = 128M + index_1 + 2^4 index_2 +// x = M log2 + (log2/128) index_1 + (log2/8) index_2 + r + delta + +// exp(x) = 2^M 2^(index_1/128) 2^(index_2/8) exp(r) exp(delta) +// Construct 2^M +// Get 2^(index_1/128) from table_1; +// Get 2^(index_2/8) from table_2; +// Calculate exp(r) by 5th order polynomial +// r = x - n (log2/128)_high +// delta = - n (log2/128)_low +// Calculate exp(delta) as 1 + delta + + +// Special values +//============================================================== +// cosh(+0) = 1.0 +// cosh(-0) = 1.0 + +// cosh(+qnan) = +qnan +// cosh(-qnan) = -qnan +// cosh(+snan) = +qnan +// cosh(-snan) = -qnan + +// cosh(-inf) = +inf +// cosh(+inf) = +inf + +// Overflow and Underflow +//======================= +// cosh(x) = largest double normal when +// x = 710.47586 = 0x408633ce8fb9f87d +// +// There is no underflow. + +// Registers used +//============================================================== +// Floating Point registers used: +// f8, input, output +// f6 -> f15, f32 -> f61 + +// General registers used: +// r14 -> r40 + +// Predicate registers used: +// p6 -> p15 + +// Assembly macros +//============================================================== + +rRshf = r14 +rN_neg = r14 +rAD_TB1 = r15 +rAD_TB2 = r16 +rAD_P = r17 +rN = r18 +rIndex_1 = r19 +rIndex_2_16 = r20 +rM = r21 +rBiased_M = r21 +rSig_inv_ln2 = r22 +rIndex_1_neg = r22 +rExp_bias = r23 +rExp_bias_minus_1 = r23 +rExp_mask = r24 +rTmp = r24 +rGt_ln = r24 +rIndex_2_16_neg = r24 +rM_neg = r25 +rBiased_M_neg = r25 +rRshf_2to56 = r26 +rAD_T1_neg = r26 +rExp_2tom56 = r28 +rAD_T2_neg = r28 +rAD_T1 = r29 +rAD_T2 = r30 +rSignexp_x = r31 +rExp_x = r31 + +GR_SAVE_B0 = r33 +GR_SAVE_PFS = r34 +GR_SAVE_GP = r35 +GR_SAVE_SP = r36 + +GR_Parameter_X = r37 +GR_Parameter_Y = r38 +GR_Parameter_RESULT = r39 +GR_Parameter_TAG = r40 + + +FR_X = f10 +FR_Y = f1 +FR_RESULT = f8 + +fRSHF_2TO56 = f6 +fINV_LN2_2TO63 = f7 +fW_2TO56_RSH = f9 +f2TOM56 = f11 +fP5 = f12 +fP4 = f13 +fP3 = f14 +fP2 = f15 + +fLn2_by_128_hi = f33 +fLn2_by_128_lo = f34 + +fRSHF = f35 +fNfloat = f36 +fNormX = f37 +fR = f38 +fF = f39 + +fRsq = f40 +f2M = f41 +fS1 = f42 +fT1 = f42 +fS2 = f43 +fT2 = f43 +fS = f43 +fWre_urm_f8 = f44 +fAbsX = f44 + +fMIN_DBL_OFLOW_ARG = f45 +fMAX_DBL_NORM_ARG = f46 +fXsq = f47 +fX4 = f48 +fGt_pln = f49 +fTmp = f49 + +fP54 = f50 +fP5432 = f50 +fP32 = f51 +fP = f52 +fP54_neg = f53 +fP5432_neg = f53 +fP32_neg = f54 +fP_neg = f55 +fF_neg = f56 + +f2M_neg = f57 +fS1_neg = f58 +fT1_neg = f58 +fS2_neg = f59 +fT2_neg = f59 +fS_neg = f59 +fExp = f60 +fExp_neg = f61 + +fA6 = f50 +fA65 = f50 +fA6543 = f50 +fA654321 = f50 +fA5 = f51 +fA4 = f52 +fA43 = f52 +fA3 = f53 +fA2 = f54 +fA21 = f54 +fA1 = f55 + +// Data tables +//============================================================== + +RODATA +.align 16 + +// ************* DO NOT CHANGE ORDER OF THESE TABLES ******************** + +// double-extended 1/ln(2) +// 3fff b8aa 3b29 5c17 f0bb be87fed0691d3e88 +// 3fff b8aa 3b29 5c17 f0bc +// For speed the significand will be loaded directly with a movl and setf.sig +// and the exponent will be bias+63 instead of bias+0. Thus subsequent +// computations need to scale appropriately. +// The constant 128/ln(2) is needed for the computation of w. This is also +// obtained by scaling the computations. +// +// Two shifting constants are loaded directly with movl and setf.d. +// 1. fRSHF_2TO56 = 1.1000..00 * 2^(63-7) +// This constant is added to x*1/ln2 to shift the integer part of +// x*128/ln2 into the rightmost bits of the significand. +// The result of this fma is fW_2TO56_RSH. +// 2. fRSHF = 1.1000..00 * 2^(63) +// This constant is subtracted from fW_2TO56_RSH * 2^(-56) to give +// the integer part of w, n, as a floating-point number. +// The result of this fms is fNfloat. + + +LOCAL_OBJECT_START(exp_table_1) +data8 0x408633ce8fb9f87e // smallest dbl overflow arg +data8 0x408633ce8fb9f87d // largest dbl arg to give normal dbl result +data8 0xb17217f7d1cf79ab , 0x00003ff7 // ln2/128 hi +data8 0xc9e3b39803f2f6af , 0x00003fb7 // ln2/128 lo +// +// Table 1 is 2^(index_1/128) where +// index_1 goes from 0 to 15 +// +data8 0x8000000000000000 , 0x00003FFF +data8 0x80B1ED4FD999AB6C , 0x00003FFF +data8 0x8164D1F3BC030773 , 0x00003FFF +data8 0x8218AF4373FC25EC , 0x00003FFF +data8 0x82CD8698AC2BA1D7 , 0x00003FFF +data8 0x8383594EEFB6EE37 , 0x00003FFF +data8 0x843A28C3ACDE4046 , 0x00003FFF +data8 0x84F1F656379C1A29 , 0x00003FFF +data8 0x85AAC367CC487B15 , 0x00003FFF +data8 0x8664915B923FBA04 , 0x00003FFF +data8 0x871F61969E8D1010 , 0x00003FFF +data8 0x87DB357FF698D792 , 0x00003FFF +data8 0x88980E8092DA8527 , 0x00003FFF +data8 0x8955EE03618E5FDD , 0x00003FFF +data8 0x8A14D575496EFD9A , 0x00003FFF +data8 0x8AD4C6452C728924 , 0x00003FFF +LOCAL_OBJECT_END(exp_table_1) + +// Table 2 is 2^(index_1/8) where +// index_2 goes from 0 to 7 +LOCAL_OBJECT_START(exp_table_2) +data8 0x8000000000000000 , 0x00003FFF +data8 0x8B95C1E3EA8BD6E7 , 0x00003FFF +data8 0x9837F0518DB8A96F , 0x00003FFF +data8 0xA5FED6A9B15138EA , 0x00003FFF +data8 0xB504F333F9DE6484 , 0x00003FFF +data8 0xC5672A115506DADD , 0x00003FFF +data8 0xD744FCCAD69D6AF4 , 0x00003FFF +data8 0xEAC0C6E7DD24392F , 0x00003FFF +LOCAL_OBJECT_END(exp_table_2) + +LOCAL_OBJECT_START(exp_p_table) +data8 0x3f8111116da21757 //P5 +data8 0x3fa55555d787761c //P4 +data8 0x3fc5555555555414 //P3 +data8 0x3fdffffffffffd6a //P2 +LOCAL_OBJECT_END(exp_p_table) + +LOCAL_OBJECT_START(cosh_p_table) +data8 0x8FA02AC65BCBD5BC, 0x00003FE2 // A6 +data8 0xD00D00D1021D7370, 0x00003FEF // A4 +data8 0xAAAAAAAAAAAAAB80, 0x00003FFA // A2 +data8 0x93F27740C0C2F1CC, 0x00003FE9 // A5 +data8 0xB60B60B60B4FE884, 0x00003FF5 // A3 +data8 0x8000000000000000, 0x00003FFE // A1 +LOCAL_OBJECT_END(cosh_p_table) + + +.section .text +GLOBAL_IEEE754_ENTRY(cosh) + +{ .mlx + getf.exp rSignexp_x = f8 // Must recompute if x unorm + movl rSig_inv_ln2 = 0xb8aa3b295c17f0bc // significand of 1/ln2 +} +{ .mlx + addl rAD_TB1 = @ltoff(exp_table_1), gp + movl rRshf_2to56 = 0x4768000000000000 // 1.10000 2^(63+56) +} +;; + +{ .mfi + ld8 rAD_TB1 = [rAD_TB1] + fclass.m p6,p0 = f8,0x0b // Test for x=unorm + mov rExp_mask = 0x1ffff +} +{ .mfi + mov rExp_bias = 0xffff + fnorm.s1 fNormX = f8 + mov rExp_2tom56 = 0xffff-56 +} +;; + +// Form two constants we need +// 1/ln2 * 2^63 to compute w = x * 1/ln2 * 128 +// 1.1000..000 * 2^(63+63-7) to right shift int(w) into the significand + +{ .mfi + setf.sig fINV_LN2_2TO63 = rSig_inv_ln2 // form 1/ln2 * 2^63 + fclass.m p8,p0 = f8,0x07 // Test for x=0 + nop.i 999 +} +{ .mlx + setf.d fRSHF_2TO56 = rRshf_2to56 // Form const 1.100 * 2^(63+56) + movl rRshf = 0x43e8000000000000 // 1.10000 2^63 for right shift +} +;; + +{ .mfi + ldfpd fMIN_DBL_OFLOW_ARG, fMAX_DBL_NORM_ARG = [rAD_TB1],16 + fclass.m p10,p0 = f8,0x1e3 // Test for x=inf, nan, NaT + nop.i 0 +} +{ .mfb + setf.exp f2TOM56 = rExp_2tom56 // form 2^-56 for scaling Nfloat + nop.f 0 +(p6) br.cond.spnt COSH_UNORM // Branch if x=unorm +} +;; + +COSH_COMMON: +{ .mfi + ldfe fLn2_by_128_hi = [rAD_TB1],16 + nop.f 0 + nop.i 0 +} +{ .mfb + setf.d fRSHF = rRshf // Form right shift const 1.100 * 2^63 +(p8) fma.d.s0 f8 = f1,f1,f0 // quick exit for x=0 +(p8) br.ret.spnt b0 +} +;; + +{ .mfi + ldfe fLn2_by_128_lo = [rAD_TB1],16 + nop.f 0 + nop.i 0 +} +{ .mfb + and rExp_x = rExp_mask, rSignexp_x // Biased exponent of x +(p10) fma.d.s0 f8 = f8,f8,f0 // Result if x=inf, nan, NaT +(p10) br.ret.spnt b0 // quick exit for x=inf, nan, NaT +} +;; + +// After that last load rAD_TB1 points to the beginning of table 1 +{ .mfi + nop.m 0 + fcmp.eq.s0 p6,p0 = f8, f0 // Dummy to set D + sub rExp_x = rExp_x, rExp_bias // True exponent of x +} +;; + +{ .mfi + nop.m 0 + fmerge.s fAbsX = f0, fNormX // Form |x| + nop.i 0 +} +{ .mfb + cmp.gt p7, p0 = -2, rExp_x // Test |x| < 2^(-2) + fma.s1 fXsq = fNormX, fNormX, f0 // x*x for small path +(p7) br.cond.spnt COSH_SMALL // Branch if 0 < |x| < 2^-2 +} +;; + +// W = X * Inv_log2_by_128 +// By adding 1.10...0*2^63 we shift and get round_int(W) in significand. +// We actually add 1.10...0*2^56 to X * Inv_log2 to do the same thing. + +{ .mfi + add rAD_P = 0x180, rAD_TB1 + fma.s1 fW_2TO56_RSH = fNormX, fINV_LN2_2TO63, fRSHF_2TO56 + add rAD_TB2 = 0x100, rAD_TB1 +} +;; + +// Divide arguments into the following categories: +// Certain Safe - 0.25 <= |x| <= MAX_DBL_NORM_ARG +// Possible Overflow p14 - MAX_DBL_NORM_ARG < |x| < MIN_DBL_OFLOW_ARG +// Certain Overflow p15 - MIN_DBL_OFLOW_ARG <= |x| < +inf +// +// If the input is really a double arg, then there will never be +// "Possible Overflow" arguments. +// + +{ .mfi + ldfpd fP5, fP4 = [rAD_P] ,16 + fcmp.ge.s1 p15,p14 = fAbsX,fMIN_DBL_OFLOW_ARG + nop.i 0 +} +;; + +// Nfloat = round_int(W) +// The signficand of fW_2TO56_RSH contains the rounded integer part of W, +// as a twos complement number in the lower bits (that is, it may be negative). +// That twos complement number (called N) is put into rN. + +// Since fW_2TO56_RSH is scaled by 2^56, it must be multiplied by 2^-56 +// before the shift constant 1.10000 * 2^63 is subtracted to yield fNfloat. +// Thus, fNfloat contains the floating point version of N + +{ .mfi + ldfpd fP3, fP2 = [rAD_P] +(p14) fcmp.gt.unc.s1 p14,p0 = fAbsX,fMAX_DBL_NORM_ARG + nop.i 0 +} +{ .mfb + nop.m 0 + fms.s1 fNfloat = fW_2TO56_RSH, f2TOM56, fRSHF +(p15) br.cond.spnt COSH_CERTAIN_OVERFLOW +} +;; + +{ .mfi + getf.sig rN = fW_2TO56_RSH + nop.f 0 + mov rExp_bias_minus_1 = 0xfffe +} +;; + +// rIndex_1 has index_1 +// rIndex_2_16 has index_2 * 16 +// rBiased_M has M + +// rM has true M +// r = x - Nfloat * ln2_by_128_hi +// f = 1 - Nfloat * ln2_by_128_lo +{ .mfi + and rIndex_1 = 0x0f, rN + fnma.s1 fR = fNfloat, fLn2_by_128_hi, fNormX + shr rM = rN, 0x7 +} +{ .mfi + and rIndex_2_16 = 0x70, rN + fnma.s1 fF = fNfloat, fLn2_by_128_lo, f1 + sub rN_neg = r0, rN +} +;; + +{ .mmi + and rIndex_1_neg = 0x0f, rN_neg + add rBiased_M = rExp_bias_minus_1, rM + shr rM_neg = rN_neg, 0x7 +} +{ .mmi + and rIndex_2_16_neg = 0x70, rN_neg + add rAD_T2 = rAD_TB2, rIndex_2_16 + shladd rAD_T1 = rIndex_1, 4, rAD_TB1 +} +;; + +// rAD_T1 has address of T1 +// rAD_T2 has address if T2 + +{ .mmi + setf.exp f2M = rBiased_M + ldfe fT2 = [rAD_T2] + nop.i 0 +} +{ .mmi + add rBiased_M_neg = rExp_bias_minus_1, rM_neg + add rAD_T2_neg = rAD_TB2, rIndex_2_16_neg + shladd rAD_T1_neg = rIndex_1_neg, 4, rAD_TB1 +} +;; + +// Create Scale = 2^M +// Load T1 and T2 +{ .mmi + ldfe fT1 = [rAD_T1] + nop.m 0 + nop.i 0 +} +{ .mmf + setf.exp f2M_neg = rBiased_M_neg + ldfe fT2_neg = [rAD_T2_neg] + fma.s1 fF_neg = fNfloat, fLn2_by_128_lo, f1 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fRsq = fR, fR, f0 + nop.i 0 +} +{ .mfi + ldfe fT1_neg = [rAD_T1_neg] + fma.s1 fP54 = fR, fP5, fP4 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fP32 = fR, fP3, fP2 + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 fP54_neg = fR, fP5, fP4 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fnma.s1 fP32_neg = fR, fP3, fP2 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fP5432 = fRsq, fP54, fP32 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fS2 = fF,fT2,f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fS1 = f2M,fT1,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fP5432_neg = fRsq, fP54_neg, fP32_neg + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fS1_neg = f2M_neg,fT1_neg,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fS2_neg = fF_neg,fT2_neg,f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fP = fRsq, fP5432, fR + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fS = fS1,fS2,f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fms.s1 fP_neg = fRsq, fP5432_neg, fR + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fS_neg = fS1_neg,fS2_neg,f0 + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + fmpy.s0 fTmp = fLn2_by_128_lo, fLn2_by_128_lo // Force inexact +(p14) br.cond.spnt COSH_POSSIBLE_OVERFLOW +} +;; + +{ .mfi + nop.m 0 + fma.s1 fExp = fS, fP, fS + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fExp_neg = fS_neg, fP_neg, fS_neg + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + fma.d.s0 f8 = fExp, f1, fExp_neg + br.ret.sptk b0 // Normal path exit +} +;; + +// Here if 0 < |x| < 0.25 +COSH_SMALL: +{ .mmf + add rAD_T1 = 0x1a0, rAD_TB1 + add rAD_T2 = 0x1d0, rAD_TB1 +} +;; + +{ .mmf + ldfe fA6 = [rAD_T1],16 + ldfe fA5 = [rAD_T2],16 + nop.f 0 +} +;; + +{ .mmi + ldfe fA4 = [rAD_T1],16 + ldfe fA3 = [rAD_T2],16 + nop.i 0 +} +;; + +{ .mmi + ldfe fA2 = [rAD_T1],16 + ldfe fA1 = [rAD_T2],16 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fX4 = fXsq, fXsq, f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fA65 = fXsq, fA6, fA5 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA43 = fXsq, fA4, fA3 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fA21 = fXsq, fA2, fA1 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fA6543 = fX4, fA65, fA43 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fA654321 = fX4, fA6543, fA21 + nop.i 0 +} +;; + +// Dummy multiply to generate inexact +{ .mfi + nop.m 0 + fmpy.s0 fTmp = fA6, fA6 + nop.i 0 +} +{ .mfb + nop.m 0 + fma.d.s0 f8 = fA654321, fXsq, f1 + br.ret.sptk b0 // Exit if 0 < |x| < 0.25 +} +;; + + +COSH_POSSIBLE_OVERFLOW: + +// Here if fMAX_DBL_NORM_ARG < |x| < fMIN_DBL_OFLOW_ARG +// This cannot happen if input is a double, only if input higher precision. +// Overflow is a possibility, not a certainty. + +// Recompute result using status field 2 with user's rounding mode, +// and wre set. If result is larger than largest double, then we have +// overflow + +{ .mfi + mov rGt_ln = 0x103ff // Exponent for largest dbl + 1 ulp + fsetc.s2 0x7F,0x42 // Get user's round mode, set wre + nop.i 0 +} +;; + +{ .mfi + setf.exp fGt_pln = rGt_ln // Create largest double + 1 ulp + fma.d.s2 fWre_urm_f8 = fS, fP, fS // Result with wre set + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fsetc.s2 0x7F,0x40 // Turn off wre in sf2 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcmp.ge.s1 p6, p0 = fWre_urm_f8, fGt_pln // Test for overflow + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + nop.f 0 +(p6) br.cond.spnt COSH_CERTAIN_OVERFLOW // Branch if overflow +} +;; + +{ .mfb + nop.m 0 + fma.d.s0 f8 = fS, fP, fS + br.ret.sptk b0 // Exit if really no overflow +} +;; + +COSH_CERTAIN_OVERFLOW: +{ .mmi + sub rTmp = rExp_mask, r0, 1 +;; + setf.exp fTmp = rTmp + nop.i 0 +} +;; + +{ .mfi + alloc r32=ar.pfs,1,4,4,0 + fmerge.s FR_X = f8,f8 + nop.i 0 +} +{ .mfb + mov GR_Parameter_TAG = 64 + fma.d.s0 FR_RESULT = fTmp, fTmp, f0 // Set I,O and +INF result + br.cond.sptk __libm_error_region +} +;; + +// Here if x unorm +COSH_UNORM: +{ .mfb + getf.exp rSignexp_x = fNormX // Must recompute if x unorm + fcmp.eq.s0 p6, p0 = f8, f0 // Set D flag + br.cond.sptk COSH_COMMON +} +;; + +GLOBAL_IEEE754_END(cosh) + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfd [GR_Parameter_Y] = FR_Y,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; +.body +{ .mib + stfd [GR_Parameter_X] = FR_X // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfd [GR_Parameter_Y] = FR_RESULT // STORE Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; +{ .mmi + ldfd f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/e_coshf.S b/sysdeps/ia64/fpu/e_coshf.S new file mode 100644 index 0000000000..97cb4e1771 --- /dev/null +++ b/sysdeps/ia64/fpu/e_coshf.S @@ -0,0 +1,711 @@ +.file "coshf.s" + + +// Copyright (c) 2000 - 2005, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. + +// History +//********************************************************************* +// 02/02/00 Initial version +// 02/16/00 The error tag for coshf overflow changed to 65 (from 64). +// 04/04/00 Unwind support added +// 08/15/00 Bundle added after call to __libm_error_support to properly +// set [the previously overwritten] GR_Parameter_RESULT. +// 05/07/01 Reworked to improve speed of all paths +// 05/20/02 Cleaned up namespace and sf0 syntax +// 11/15/02 Improved algorithm based on expf +// 03/31/05 Reformatted delimiters between data tables +// +// API +//********************************************************************* +// float coshf(float) +// +// Overview of operation +//********************************************************************* +// Case 1: 0 < |x| < 0.25 +// Evaluate cosh(x) by a 8th order polynomial +// Care is take for the order of multiplication; and A2 is not exactly 1/4!, +// A3 is not exactly 1/6!, etc. +// cosh(x) = 1 + (A1*x^2 + A2*x^4 + A3*x^6 + A4*x^8) +// +// Case 2: 0.25 < |x| < 89.41598 +// Algorithm is based on the identity cosh(x) = ( exp(x) + exp(-x) ) / 2. +// The algorithm for exp is described as below. There are a number of +// economies from evaluating both exp(x) and exp(-x). Although we +// are evaluating both quantities, only where the quantities diverge do we +// duplicate the computations. The basic algorithm for exp(x) is described +// below. +// +// Take the input x. w is "how many log2/128 in x?" +// w = x * 64/log2 +// NJ = int(w) +// x = NJ*log2/64 + R + +// NJ = 64*n + j +// x = n*log2 + (log2/64)*j + R +// +// So, exp(x) = 2^n * 2^(j/64)* exp(R) +// +// T = 2^n * 2^(j/64) +// Construct 2^n +// Get 2^(j/64) table +// actually all the entries of 2^(j/64) table are stored in DP and +// with exponent bits set to 0 -> multiplication on 2^n can be +// performed by doing logical "or" operation with bits presenting 2^n + +// exp(R) = 1 + (exp(R) - 1) +// P = exp(R) - 1 approximated by Taylor series of 3rd degree +// P = A3*R^3 + A2*R^2 + R, A3 = 1/6, A2 = 1/2 +// + +// The final result is reconstructed as follows +// exp(x) = T + T*P + +// Special values +//********************************************************************* +// coshf(+0) = 1.0 +// coshf(-0) = 1.0 + +// coshf(+qnan) = +qnan +// coshf(-qnan) = -qnan +// coshf(+snan) = +qnan +// coshf(-snan) = -qnan + +// coshf(-inf) = +inf +// coshf(+inf) = +inf + +// Overflow and Underflow +//********************************************************************* +// coshf(x) = largest single normal when +// x = 89.41598 = 0x42b2d4fc +// +// There is no underflow. + +// Registers used +//********************************************************************* +// Floating Point registers used: +// f8 input, output +// f6,f7, f9 -> f15, f32 -> f45 + +// General registers used: +// r2, r3, r16 -> r38 + +// Predicate registers used: +// p6 -> p15 + +// Assembly macros +//********************************************************************* +// integer registers used +// scratch +rNJ = r2 +rNJ_neg = r3 + +rJ_neg = r16 +rN_neg = r17 +rSignexp_x = r18 +rExp_x = r18 +rExp_mask = r19 +rExp_bias = r20 +rAd1 = r21 +rAd2 = r22 +rJ = r23 +rN = r24 +rTblAddr = r25 +rA3 = r26 +rExpHalf = r27 +rLn2Div64 = r28 +rGt_ln = r29 +r17ones_m1 = r29 +rRightShifter = r30 +rJ_mask = r30 +r64DivLn2 = r31 +rN_mask = r31 +// stacked +GR_SAVE_PFS = r32 +GR_SAVE_B0 = r33 +GR_SAVE_GP = r34 +GR_Parameter_X = r35 +GR_Parameter_Y = r36 +GR_Parameter_RESULT = r37 +GR_Parameter_TAG = r38 + +// floating point registers used +FR_X = f10 +FR_Y = f1 +FR_RESULT = f8 +// scratch +fRightShifter = f6 +f64DivLn2 = f7 +fNormX = f9 +fNint = f10 +fN = f11 +fR = f12 +fLn2Div64 = f13 +fA2 = f14 +fA3 = f15 +// stacked +fP = f32 +fT = f33 +fMIN_SGL_OFLOW_ARG = f34 +fMAX_SGL_NORM_ARG = f35 +fRSqr = f36 +fA1 = f37 +fA21 = f37 +fA4 = f38 +fA43 = f38 +fA4321 = f38 +fX4 = f39 +fTmp = f39 +fGt_pln = f39 +fWre_urm_f8 = f40 +fXsq = f40 +fP_neg = f41 +fT_neg = f42 +fExp = f43 +fExp_neg = f44 +fAbsX = f45 + + +RODATA +.align 16 + +LOCAL_OBJECT_START(_coshf_table) +data4 0x42b2d4fd // Smallest single arg to overflow single result +data4 0x42b2d4fc // Largest single arg to give normal single result +data4 0x00000000 // pad +data4 0x00000000 // pad +// +// 2^(j/64) table, j goes from 0 to 63 +data8 0x0000000000000000 // 2^(0/64) +data8 0x00002C9A3E778061 // 2^(1/64) +data8 0x000059B0D3158574 // 2^(2/64) +data8 0x0000874518759BC8 // 2^(3/64) +data8 0x0000B5586CF9890F // 2^(4/64) +data8 0x0000E3EC32D3D1A2 // 2^(5/64) +data8 0x00011301D0125B51 // 2^(6/64) +data8 0x0001429AAEA92DE0 // 2^(7/64) +data8 0x000172B83C7D517B // 2^(8/64) +data8 0x0001A35BEB6FCB75 // 2^(9/64) +data8 0x0001D4873168B9AA // 2^(10/64) +data8 0x0002063B88628CD6 // 2^(11/64) +data8 0x0002387A6E756238 // 2^(12/64) +data8 0x00026B4565E27CDD // 2^(13/64) +data8 0x00029E9DF51FDEE1 // 2^(14/64) +data8 0x0002D285A6E4030B // 2^(15/64) +data8 0x000306FE0A31B715 // 2^(16/64) +data8 0x00033C08B26416FF // 2^(17/64) +data8 0x000371A7373AA9CB // 2^(18/64) +data8 0x0003A7DB34E59FF7 // 2^(19/64) +data8 0x0003DEA64C123422 // 2^(20/64) +data8 0x0004160A21F72E2A // 2^(21/64) +data8 0x00044E086061892D // 2^(22/64) +data8 0x000486A2B5C13CD0 // 2^(23/64) +data8 0x0004BFDAD5362A27 // 2^(24/64) +data8 0x0004F9B2769D2CA7 // 2^(25/64) +data8 0x0005342B569D4F82 // 2^(26/64) +data8 0x00056F4736B527DA // 2^(27/64) +data8 0x0005AB07DD485429 // 2^(28/64) +data8 0x0005E76F15AD2148 // 2^(29/64) +data8 0x0006247EB03A5585 // 2^(30/64) +data8 0x0006623882552225 // 2^(31/64) +data8 0x0006A09E667F3BCD // 2^(32/64) +data8 0x0006DFB23C651A2F // 2^(33/64) +data8 0x00071F75E8EC5F74 // 2^(34/64) +data8 0x00075FEB564267C9 // 2^(35/64) +data8 0x0007A11473EB0187 // 2^(36/64) +data8 0x0007E2F336CF4E62 // 2^(37/64) +data8 0x00082589994CCE13 // 2^(38/64) +data8 0x000868D99B4492ED // 2^(39/64) +data8 0x0008ACE5422AA0DB // 2^(40/64) +data8 0x0008F1AE99157736 // 2^(41/64) +data8 0x00093737B0CDC5E5 // 2^(42/64) +data8 0x00097D829FDE4E50 // 2^(43/64) +data8 0x0009C49182A3F090 // 2^(44/64) +data8 0x000A0C667B5DE565 // 2^(45/64) +data8 0x000A5503B23E255D // 2^(46/64) +data8 0x000A9E6B5579FDBF // 2^(47/64) +data8 0x000AE89F995AD3AD // 2^(48/64) +data8 0x000B33A2B84F15FB // 2^(49/64) +data8 0x000B7F76F2FB5E47 // 2^(50/64) +data8 0x000BCC1E904BC1D2 // 2^(51/64) +data8 0x000C199BDD85529C // 2^(52/64) +data8 0x000C67F12E57D14B // 2^(53/64) +data8 0x000CB720DCEF9069 // 2^(54/64) +data8 0x000D072D4A07897C // 2^(55/64) +data8 0x000D5818DCFBA487 // 2^(56/64) +data8 0x000DA9E603DB3285 // 2^(57/64) +data8 0x000DFC97337B9B5F // 2^(58/64) +data8 0x000E502EE78B3FF6 // 2^(59/64) +data8 0x000EA4AFA2A490DA // 2^(60/64) +data8 0x000EFA1BEE615A27 // 2^(61/64) +data8 0x000F50765B6E4540 // 2^(62/64) +data8 0x000FA7C1819E90D8 // 2^(63/64) +LOCAL_OBJECT_END(_coshf_table) + +LOCAL_OBJECT_START(cosh_p_table) +data8 0x3efa3001dcf5905b // A4 +data8 0x3f56c1437543543e // A3 +data8 0x3fa5555572601504 // A2 +data8 0x3fdfffffffe2f097 // A1 +LOCAL_OBJECT_END(cosh_p_table) + + +.section .text +GLOBAL_IEEE754_ENTRY(coshf) + +{ .mlx + getf.exp rSignexp_x = f8 // Must recompute if x unorm + movl r64DivLn2 = 0x40571547652B82FE // 64/ln(2) +} +{ .mlx + addl rTblAddr = @ltoff(_coshf_table),gp + movl rRightShifter = 0x43E8000000000000 // DP Right Shifter +} +;; + +{ .mfi + // point to the beginning of the table + ld8 rTblAddr = [rTblAddr] + fclass.m p6, p0 = f8, 0x0b // Test for x=unorm + addl rA3 = 0x3E2AA, r0 // high bits of 1.0/6.0 rounded to SP +} +{ .mfi + nop.m 0 + fnorm.s1 fNormX = f8 // normalized x + addl rExpHalf = 0xFFFE, r0 // exponent of 1/2 +} +;; + +{ .mfi + setf.d f64DivLn2 = r64DivLn2 // load 64/ln(2) to FP reg + fclass.m p15, p0 = f8, 0x1e3 // test for NaT,NaN,Inf + nop.i 0 +} +{ .mlx + // load Right Shifter to FP reg + setf.d fRightShifter = rRightShifter + movl rLn2Div64 = 0x3F862E42FEFA39EF // DP ln(2)/64 in GR +} +;; + +{ .mfi + mov rExp_mask = 0x1ffff + fcmp.eq.s1 p13, p0 = f0, f8 // test for x = 0.0 + shl rA3 = rA3, 12 // 0x3E2AA000, approx to 1.0/6.0 in SP +} +{ .mfb + nop.m 0 + nop.f 0 +(p6) br.cond.spnt COSH_UNORM // Branch if x=unorm +} +;; + +COSH_COMMON: +{ .mfi + setf.exp fA2 = rExpHalf // load A2 to FP reg + nop.f 0 + mov rExp_bias = 0xffff +} +{ .mfb + setf.d fLn2Div64 = rLn2Div64 // load ln(2)/64 to FP reg +(p15) fma.s.s0 f8 = f8, f8, f0 // result if x = NaT,NaN,Inf +(p15) br.ret.spnt b0 // exit here if x = NaT,NaN,Inf +} +;; + +{ .mfi + // min overflow and max normal threshold + ldfps fMIN_SGL_OFLOW_ARG, fMAX_SGL_NORM_ARG = [rTblAddr], 8 + nop.f 0 + and rExp_x = rExp_mask, rSignexp_x // Biased exponent of x +} +{ .mfb + setf.s fA3 = rA3 // load A3 to FP reg +(p13) fma.s.s0 f8 = f1, f1, f0 // result if x = 0.0 +(p13) br.ret.spnt b0 // exit here if x =0.0 +} +;; + +{ .mfi + sub rExp_x = rExp_x, rExp_bias // True exponent of x + fmerge.s fAbsX = f0, fNormX // Form |x| + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + // x*(64/ln(2)) + Right Shifter + fma.s1 fNint = fNormX, f64DivLn2, fRightShifter + add rTblAddr = 8, rTblAddr +} +{ .mfb + cmp.gt p7, p0 = -2, rExp_x // Test |x| < 2^(-2) + fma.s1 fXsq = fNormX, fNormX, f0 // x*x for small path +(p7) br.cond.spnt COSH_SMALL // Branch if 0 < |x| < 2^-2 +} +;; + +{ .mfi + nop.m 0 + // check for overflow + fcmp.ge.s1 p12, p13 = fAbsX, fMIN_SGL_OFLOW_ARG + mov rJ_mask = 0x3f // 6-bit mask for J +} +;; + +{ .mfb + nop.m 0 + fms.s1 fN = fNint, f1, fRightShifter // n in FP register + // branch out if overflow +(p12) br.cond.spnt COSH_CERTAIN_OVERFLOW +} +;; + +{ .mfi + getf.sig rNJ = fNint // bits of n, j + // check for possible overflow + fcmp.gt.s1 p13, p0 = fAbsX, fMAX_SGL_NORM_ARG + nop.i 0 +} +;; + +{ .mfi + addl rN = 0xFFBF - 63, rNJ // biased and shifted n-1,j + fnma.s1 fR = fLn2Div64, fN, fNormX // R = x - N*ln(2)/64 + and rJ = rJ_mask, rNJ // bits of j +} +{ .mfi + sub rNJ_neg = r0, rNJ // bits of n, j for -x + nop.f 0 + andcm rN_mask = -1, rJ_mask // 0xff...fc0 to mask N +} +;; + +{ .mfi + shladd rJ = rJ, 3, rTblAddr // address in the 2^(j/64) table + nop.f 0 + and rN = rN_mask, rN // biased, shifted n-1 +} +{ .mfi + addl rN_neg = 0xFFBF - 63, rNJ_neg // -x biased, shifted n-1,j + nop.f 0 + and rJ_neg = rJ_mask, rNJ_neg // bits of j for -x +} +;; + +{ .mfi + ld8 rJ = [rJ] // Table value + nop.f 0 + shl rN = rN, 46 // 2^(n-1) bits in DP format +} +{ .mfi + shladd rJ_neg = rJ_neg, 3, rTblAddr // addr in 2^(j/64) table -x + nop.f 0 + and rN_neg = rN_mask, rN_neg // biased, shifted n-1 for -x +} +;; + +{ .mfi + ld8 rJ_neg = [rJ_neg] // Table value for -x + nop.f 0 + shl rN_neg = rN_neg, 46 // 2^(n-1) bits in DP format for -x +} +;; + +{ .mfi + or rN = rN, rJ // bits of 2^n * 2^(j/64) in DP format + nop.f 0 + nop.i 0 +} +;; + +{ .mmf + setf.d fT = rN // 2^(n-1) * 2^(j/64) + or rN_neg = rN_neg, rJ_neg // -x bits of 2^n * 2^(j/64) in DP + fma.s1 fRSqr = fR, fR, f0 // R^2 +} +;; + +{ .mfi + setf.d fT_neg = rN_neg // 2^(n-1) * 2^(j/64) for -x + fma.s1 fP = fA3, fR, fA2 // A3*R + A2 + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 fP_neg = fA3, fR, fA2 // A3*R + A2 for -x + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fP = fP, fRSqr, fR // P = (A3*R + A2)*R^2 + R + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 fP_neg = fP_neg, fRSqr, fR // P = (A3*R + A2)*R^2 + R, -x + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fmpy.s0 fTmp = fLn2Div64, fLn2Div64 // Force inexact + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fExp = fP, fT, fT // exp(x)/2 + nop.i 0 +} +{ .mfb + nop.m 0 + fma.s1 fExp_neg = fP_neg, fT_neg, fT_neg // exp(-x)/2 + // branch out if possible overflow result +(p13) br.cond.spnt COSH_POSSIBLE_OVERFLOW +} +;; + +{ .mfb + nop.m 0 + // final result in the absence of overflow + fma.s.s0 f8 = fExp, f1, fExp_neg // result = (exp(x)+exp(-x))/2 + // exit here in the absence of overflow + br.ret.sptk b0 // Exit main path, 0.25 <= |x| < 89.41598 +} +;; + +// Here if 0 < |x| < 0.25. Evaluate 8th order polynomial. +COSH_SMALL: +{ .mmi + add rAd1 = 0x200, rTblAddr + add rAd2 = 0x210, rTblAddr + nop.i 0 +} +;; + +{ .mmi + ldfpd fA4, fA3 = [rAd1] + ldfpd fA2, fA1 = [rAd2] + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fX4 = fXsq, fXsq, f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fA43 = fXsq, fA4, fA3 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA21 = fXsq, fA2, fA1 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fA4321 = fX4, fA43, fA21 + nop.i 0 +} +;; + +// Dummy multiply to generate inexact +{ .mfi + nop.m 0 + fmpy.s0 fTmp = fA4, fA4 + nop.i 0 +} +{ .mfb + nop.m 0 + fma.s.s0 f8 = fA4321, fXsq, f1 + br.ret.sptk b0 // Exit if 0 < |x| < 0.25 +} +;; + +COSH_POSSIBLE_OVERFLOW: + +// Here if fMAX_SGL_NORM_ARG < x < fMIN_SGL_OFLOW_ARG +// This cannot happen if input is a single, only if input higher precision. +// Overflow is a possibility, not a certainty. + +// Recompute result using status field 2 with user's rounding mode, +// and wre set. If result is larger than largest single, then we have +// overflow + +{ .mfi + mov rGt_ln = 0x1007f // Exponent for largest single + 1 ulp + fsetc.s2 0x7F,0x42 // Get user's round mode, set wre + nop.i 0 +} +;; + +{ .mfi + setf.exp fGt_pln = rGt_ln // Create largest single + 1 ulp + fma.s.s2 fWre_urm_f8 = fP, fT, fT // Result with wre set + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fsetc.s2 0x7F,0x40 // Turn off wre in sf2 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcmp.ge.s1 p6, p0 = fWre_urm_f8, fGt_pln // Test for overflow + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + nop.f 0 +(p6) br.cond.spnt COSH_CERTAIN_OVERFLOW // Branch if overflow +} +;; + +{ .mfb + nop.m 0 + fma.s.s0 f8 = fP, fT, fT + br.ret.sptk b0 // Exit if really no overflow +} +;; + +// here if overflow +COSH_CERTAIN_OVERFLOW: +{ .mmi + addl r17ones_m1 = 0x1FFFE, r0 +;; + setf.exp fTmp = r17ones_m1 + nop.i 0 +} +;; + +{ .mfi + alloc r32 = ar.pfs, 0, 3, 4, 0 // get some registers + fmerge.s FR_X = f8,f8 + nop.i 0 +} +{ .mfb + mov GR_Parameter_TAG = 65 + fma.s.s0 FR_RESULT = fTmp, fTmp, f0 // Set I,O and +INF result + br.cond.sptk __libm_error_region +} +;; + +// Here if x unorm +COSH_UNORM: +{ .mfb + getf.exp rSignexp_x = fNormX // Must recompute if x unorm + fcmp.eq.s0 p6, p0 = f8, f0 // Set D flag + br.cond.sptk COSH_COMMON // Return to main path +} +;; + +GLOBAL_IEEE754_END(coshf) + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfs [GR_Parameter_Y] = FR_Y,16 // Store Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; +.body +{ .mfi + stfs [GR_Parameter_X] = FR_X // Store Parameter 1 on stack + nop.f 0 + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address +} +{ .mib + stfs [GR_Parameter_Y] = FR_RESULT // Store Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; + +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; + +{ .mmi + ldfs f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) + + +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/e_coshl.S b/sysdeps/ia64/fpu/e_coshl.S new file mode 100644 index 0000000000..b5872d0b24 --- /dev/null +++ b/sysdeps/ia64/fpu/e_coshl.S @@ -0,0 +1,1095 @@ +.file "coshl.s" + + +// Copyright (c) 2000 - 2002, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 04/04/00 Unwind support added +// 08/15/00 Bundle added after call to __libm_error_support to properly +// set [the previously overwritten] GR_Parameter_RESULT. +// 01/23/01 Set inexact flag for large args. +// 05/07/01 Reworked to improve speed of all paths +// 05/20/02 Cleaned up namespace and sf0 syntax +// 12/06/02 Improved performance +// +// API +//============================================================== +// long double = coshl(long double) +// input floating point f8 +// output floating point f8 +// +// Registers used +//============================================================== +// general registers: +// r14 -> r40 +// predicate registers used: +// p6 -> p11 +// floating-point registers used: +// f9 -> f15; f32 -> f90; +// f8 has input, then output +// +// Overview of operation +//============================================================== +// There are seven paths +// 1. 0 < |x| < 0.25 COSH_BY_POLY +// 2. 0.25 <=|x| < 32 COSH_BY_TBL +// 3. 32 <= |x| < 11357.21655 COSH_BY_EXP (merged path with COSH_BY_TBL) +// 4. |x| >= 11357.21655 COSH_HUGE +// 5. x=0 Done with early exit +// 6. x=inf,nan Done with early exit +// 7. x=denormal COSH_DENORM +// +// For double extended we get overflow for x >= 400c b174 ddc0 31ae c0ea +// >= 11357.21655 +// +// +// 1. COSH_BY_POLY 0 < |x| < 0.25 +// =============== +// Evaluate cosh(x) by a 12th order polynomial +// Care is take for the order of multiplication; and P2 is not exactly 1/4!, +// P3 is not exactly 1/6!, etc. +// cosh(x) = 1 + (P1*x^2 + P2*x^4 + P3*x^6 + P4*x^8 + P5*x^10 + P6*x^12) +// +// 2. COSH_BY_TBL 0.25 <= |x| < 32.0 +// ============= +// cosh(x) = cosh(B+R) +// = cosh(B)cosh(R) + sinh(B)sinh(R) +// +// ax = |x| = M*log2/64 + R +// B = M*log2/64 +// M = 64*N + j +// We will calculate M and get N as (M-j)/64 +// The division is a shift. +// exp(B) = exp(N*log2 + j*log2/64) +// = 2^N * 2^(j*log2/64) +// cosh(B) = 1/2(e^B + e^-B) +// = 1/2(2^N * 2^(j*log2/64) + 2^-N * 2^(-j*log2/64)) +// cosh(B) = (2^(N-1) * 2^(j*log2/64) + 2^(-N-1) * 2^(-j*log2/64)) +// sinh(B) = (2^(N-1) * 2^(j*log2/64) - 2^(-N-1) * 2^(-j*log2/64)) +// 2^(j*log2/64) is stored as Tjhi + Tjlo , j= -32,....,32 +// Tjhi is double-extended (80-bit) and Tjlo is single(32-bit) +// +// R = ax - M*log2/64 +// R = ax - M*log2_by_64_hi - M*log2_by_64_lo +// exp(R) = 1 + R +R^2(1/2! + R(1/3! + R(1/4! + ... + R(1/n!)...) +// = 1 + p_odd + p_even +// where the p_even uses the A coefficients and the p_even uses +// the B coefficients +// +// So sinh(R) = 1 + p_odd + p_even -(1 -p_odd -p_even)/2 = p_odd +// cosh(R) = 1 + p_even +// cosh(B) = C_hi + C_lo +// sinh(B) = S_hi +// cosh(x) = cosh(B)cosh(R) + sinh(B)sinh(R) +// +// 3. COSH_BY_EXP 32.0 <= |x| < 11357.21655 ( 400c b174 ddc0 31ae c0ea ) +// ============== +// Can approximate result by exp(x)/2 in this region. +// Y_hi = Tjhi +// Y_lo = Tjhi * (p_odd + p_even) + Tjlo +// cosh(x) = Y_hi + Y_lo +// +// 4. COSH_HUGE |x| >= 11357.21655 ( 400c b174 ddc0 31ae c0ea ) +// ============ +// Set error tag and call error support +// +// +// Assembly macros +//============================================================== +r_ad5 = r14 +r_rshf_2to57 = r15 +r_exp_denorm = r15 +r_ad_mJ_lo = r15 +r_ad_J_lo = r16 +r_2Nm1 = r17 +r_2mNm1 = r18 +r_exp_x = r18 +r_ad_J_hi = r19 +r_ad2o = r19 +r_ad_mJ_hi = r20 +r_mj = r21 +r_ad2e = r22 +r_ad3 = r23 +r_ad1 = r24 +r_Mmj = r24 +r_rshf = r25 +r_M = r25 +r_N = r25 +r_jshf = r26 +r_exp_2tom57 = r26 +r_j = r26 +r_exp_mask = r27 +r_signexp_x = r28 +r_signexp_0_5 = r28 +r_exp_0_25 = r29 +r_sig_inv_ln2 = r30 +r_exp_32 = r30 +r_exp_huge = r30 +r_ad4 = r31 + +GR_SAVE_PFS = r34 +GR_SAVE_B0 = r35 +GR_SAVE_GP = r36 + +GR_Parameter_X = r37 +GR_Parameter_Y = r38 +GR_Parameter_RESULT = r39 +GR_Parameter_TAG = r40 + + +f_ABS_X = f9 +f_X2 = f10 +f_X4 = f11 +f_tmp = f14 +f_RSHF = f15 + +f_Inv_log2by64 = f32 +f_log2by64_lo = f33 +f_log2by64_hi = f34 +f_A1 = f35 + +f_A2 = f36 +f_A3 = f37 +f_Rcub = f38 +f_M_temp = f39 +f_R_temp = f40 + +f_Rsq = f41 +f_R = f42 +f_M = f43 +f_B1 = f44 +f_B2 = f45 + +f_B3 = f46 +f_peven_temp1 = f47 +f_peven_temp2 = f48 +f_peven = f49 +f_podd_temp1 = f50 + +f_podd_temp2 = f51 +f_podd = f52 +f_poly65 = f53 +f_poly6543 = f53 +f_poly6to1 = f53 +f_poly43 = f54 +f_poly21 = f55 + +f_X3 = f56 +f_INV_LN2_2TO63 = f57 +f_RSHF_2TO57 = f58 +f_2TOM57 = f59 +f_smlst_oflow_input = f60 + +f_pre_result = f61 +f_huge = f62 +f_spos = f63 +f_sneg = f64 +f_Tjhi = f65 + +f_Tjlo = f66 +f_Tmjhi = f67 +f_Tmjlo = f68 +f_S_hi = f69 +f_SC_hi_temp = f70 + +f_C_lo_temp1 = f71 +f_C_lo_temp2 = f72 +f_C_lo_temp3 = f73 +f_C_lo_temp4 = f73 +f_C_lo = f74 +f_C_hi = f75 + +f_Y_hi = f77 +f_Y_lo_temp = f78 +f_Y_lo = f79 +f_NORM_X = f80 + +f_P1 = f81 +f_P2 = f82 +f_P3 = f83 +f_P4 = f84 +f_P5 = f85 + +f_P6 = f86 +f_Tjhi_spos = f87 +f_Tjlo_spos = f88 +f_huge = f89 +f_signed_hi_lo = f90 + + +// Data tables +//============================================================== + +// DO NOT CHANGE ORDER OF THESE TABLES +RODATA + +.align 16 +LOCAL_OBJECT_START(cosh_arg_reduction) +// data8 0xB8AA3B295C17F0BC, 0x00004005 // 64/log2 -- signif loaded with setf + data8 0xB17217F7D1000000, 0x00003FF8 // log2/64 high part + data8 0xCF79ABC9E3B39804, 0x00003FD0 // log2/64 low part + data8 0xb174ddc031aec0ea, 0x0000400c // Smallest x to overflow (11357.21655) +LOCAL_OBJECT_END(cosh_arg_reduction) + +LOCAL_OBJECT_START(cosh_p_table) + data8 0x8FA02AC65BCBD5BC, 0x00003FE2 // P6 + data8 0xD00D00D1021D7370, 0x00003FEF // P4 + data8 0xAAAAAAAAAAAAAB80, 0x00003FFA // P2 + data8 0x93F27740C0C2F1CC, 0x00003FE9 // P5 + data8 0xB60B60B60B4FE884, 0x00003FF5 // P3 + data8 0x8000000000000000, 0x00003FFE // P1 +LOCAL_OBJECT_END(cosh_p_table) + +LOCAL_OBJECT_START(cosh_ab_table) + data8 0xAAAAAAAAAAAAAAAC, 0x00003FFC // A1 + data8 0x88888888884ECDD5, 0x00003FF8 // A2 + data8 0xD00D0C6DCC26A86B, 0x00003FF2 // A3 + data8 0x8000000000000002, 0x00003FFE // B1 + data8 0xAAAAAAAAAA402C77, 0x00003FFA // B2 + data8 0xB60B6CC96BDB144D, 0x00003FF5 // B3 +LOCAL_OBJECT_END(cosh_ab_table) + +LOCAL_OBJECT_START(cosh_j_hi_table) + data8 0xB504F333F9DE6484, 0x00003FFE + data8 0xB6FD91E328D17791, 0x00003FFE + data8 0xB8FBAF4762FB9EE9, 0x00003FFE + data8 0xBAFF5AB2133E45FB, 0x00003FFE + data8 0xBD08A39F580C36BF, 0x00003FFE + data8 0xBF1799B67A731083, 0x00003FFE + data8 0xC12C4CCA66709456, 0x00003FFE + data8 0xC346CCDA24976407, 0x00003FFE + data8 0xC5672A115506DADD, 0x00003FFE + data8 0xC78D74C8ABB9B15D, 0x00003FFE + data8 0xC9B9BD866E2F27A3, 0x00003FFE + data8 0xCBEC14FEF2727C5D, 0x00003FFE + data8 0xCE248C151F8480E4, 0x00003FFE + data8 0xD06333DAEF2B2595, 0x00003FFE + data8 0xD2A81D91F12AE45A, 0x00003FFE + data8 0xD4F35AABCFEDFA1F, 0x00003FFE + data8 0xD744FCCAD69D6AF4, 0x00003FFE + data8 0xD99D15C278AFD7B6, 0x00003FFE + data8 0xDBFBB797DAF23755, 0x00003FFE + data8 0xDE60F4825E0E9124, 0x00003FFE + data8 0xE0CCDEEC2A94E111, 0x00003FFE + data8 0xE33F8972BE8A5A51, 0x00003FFE + data8 0xE5B906E77C8348A8, 0x00003FFE + data8 0xE8396A503C4BDC68, 0x00003FFE + data8 0xEAC0C6E7DD24392F, 0x00003FFE + data8 0xED4F301ED9942B84, 0x00003FFE + data8 0xEFE4B99BDCDAF5CB, 0x00003FFE + data8 0xF281773C59FFB13A, 0x00003FFE + data8 0xF5257D152486CC2C, 0x00003FFE + data8 0xF7D0DF730AD13BB9, 0x00003FFE + data8 0xFA83B2DB722A033A, 0x00003FFE + data8 0xFD3E0C0CF486C175, 0x00003FFE + data8 0x8000000000000000, 0x00003FFF // Center of table + data8 0x8164D1F3BC030773, 0x00003FFF + data8 0x82CD8698AC2BA1D7, 0x00003FFF + data8 0x843A28C3ACDE4046, 0x00003FFF + data8 0x85AAC367CC487B15, 0x00003FFF + data8 0x871F61969E8D1010, 0x00003FFF + data8 0x88980E8092DA8527, 0x00003FFF + data8 0x8A14D575496EFD9A, 0x00003FFF + data8 0x8B95C1E3EA8BD6E7, 0x00003FFF + data8 0x8D1ADF5B7E5BA9E6, 0x00003FFF + data8 0x8EA4398B45CD53C0, 0x00003FFF + data8 0x9031DC431466B1DC, 0x00003FFF + data8 0x91C3D373AB11C336, 0x00003FFF + data8 0x935A2B2F13E6E92C, 0x00003FFF + data8 0x94F4EFA8FEF70961, 0x00003FFF + data8 0x96942D3720185A00, 0x00003FFF + data8 0x9837F0518DB8A96F, 0x00003FFF + data8 0x99E0459320B7FA65, 0x00003FFF + data8 0x9B8D39B9D54E5539, 0x00003FFF + data8 0x9D3ED9A72CFFB751, 0x00003FFF + data8 0x9EF5326091A111AE, 0x00003FFF + data8 0xA0B0510FB9714FC2, 0x00003FFF + data8 0xA27043030C496819, 0x00003FFF + data8 0xA43515AE09E6809E, 0x00003FFF + data8 0xA5FED6A9B15138EA, 0x00003FFF + data8 0xA7CD93B4E965356A, 0x00003FFF + data8 0xA9A15AB4EA7C0EF8, 0x00003FFF + data8 0xAB7A39B5A93ED337, 0x00003FFF + data8 0xAD583EEA42A14AC6, 0x00003FFF + data8 0xAF3B78AD690A4375, 0x00003FFF + data8 0xB123F581D2AC2590, 0x00003FFF + data8 0xB311C412A9112489, 0x00003FFF + data8 0xB504F333F9DE6484, 0x00003FFF +LOCAL_OBJECT_END(cosh_j_hi_table) + +LOCAL_OBJECT_START(cosh_j_lo_table) + data4 0x1EB2FB13 + data4 0x1CE2CBE2 + data4 0x1DDC3CBC + data4 0x1EE9AA34 + data4 0x9EAEFDC1 + data4 0x9DBF517B + data4 0x1EF88AFB + data4 0x1E03B216 + data4 0x1E78AB43 + data4 0x9E7B1747 + data4 0x9EFE3C0E + data4 0x9D36F837 + data4 0x9DEE53E4 + data4 0x9E24AE8E + data4 0x1D912473 + data4 0x1EB243BE + data4 0x1E669A2F + data4 0x9BBC610A + data4 0x1E761035 + data4 0x9E0BE175 + data4 0x1CCB12A1 + data4 0x1D1BFE90 + data4 0x1DF2F47A + data4 0x1EF22F22 + data4 0x9E3F4A29 + data4 0x1EC01A5B + data4 0x1E8CAC3A + data4 0x9DBB3FAB + data4 0x1EF73A19 + data4 0x9BB795B5 + data4 0x1EF84B76 + data4 0x9EF5818B + data4 0x00000000 // Center of table + data4 0x1F77CACA + data4 0x1EF8A91D + data4 0x1E57C976 + data4 0x9EE8DA92 + data4 0x1EE85C9F + data4 0x1F3BF1AF + data4 0x1D80CA1E + data4 0x9D0373AF + data4 0x9F167097 + data4 0x1EB70051 + data4 0x1F6EB029 + data4 0x1DFD6D8E + data4 0x9EB319B0 + data4 0x1EBA2BEB + data4 0x1F11D537 + data4 0x1F0D5A46 + data4 0x9E5E7BCA + data4 0x9F3AAFD1 + data4 0x9E86DACC + data4 0x9F3EDDC2 + data4 0x1E496E3D + data4 0x9F490BF6 + data4 0x1DD1DB48 + data4 0x1E65EBFB + data4 0x9F427496 + data4 0x1F283C4A + data4 0x1F4B0047 + data4 0x1F130152 + data4 0x9E8367C0 + data4 0x9F705F90 + data4 0x1EFB3C53 + data4 0x1F32FB13 +LOCAL_OBJECT_END(cosh_j_lo_table) + + +.section .text +GLOBAL_IEEE754_ENTRY(coshl) + +{ .mlx + getf.exp r_signexp_x = f8 // Get signexp of x, must redo if unorm + movl r_sig_inv_ln2 = 0xb8aa3b295c17f0bc // significand of 1/ln2 +} +{ .mlx + addl r_ad1 = @ltoff(cosh_arg_reduction), gp + movl r_rshf_2to57 = 0x4778000000000000 // 1.10000 2^(63+57) +} +;; + +{ .mfi + ld8 r_ad1 = [r_ad1] + fmerge.s f_ABS_X = f0,f8 + mov r_exp_0_25 = 0x0fffd // Form exponent for 0.25 +} +{ .mfi + nop.m 0 + fnorm.s1 f_NORM_X = f8 + mov r_exp_2tom57 = 0xffff-57 +} +;; + +{ .mfi + setf.d f_RSHF_2TO57 = r_rshf_2to57 // Form const 1.100 * 2^120 + fclass.m p10,p0 = f8, 0x0b // Test for denorm + mov r_exp_mask = 0x1ffff +} +{ .mlx + setf.sig f_INV_LN2_2TO63 = r_sig_inv_ln2 // Form 1/ln2 * 2^63 + movl r_rshf = 0x43e8000000000000 // 1.1000 2^63 for right shift +} +;; + +{ .mfi + nop.m 0 + fclass.m p7,p0 = f8, 0x07 // Test if x=0 + nop.i 0 +} +{ .mfi + setf.exp f_2TOM57 = r_exp_2tom57 // Form 2^-57 for scaling + nop.f 0 + add r_ad3 = 0x90, r_ad1 // Point to ab_table +} +;; + +{ .mfi + setf.d f_RSHF = r_rshf // Form right shift const 1.100 * 2^63 + fclass.m p6,p0 = f8, 0xe3 // Test if x nan, inf + add r_ad4 = 0x2f0, r_ad1 // Point to j_hi_table midpoint +} +{ .mib + add r_ad2e = 0x20, r_ad1 // Point to p_table + nop.i 0 +(p10) br.cond.spnt COSH_DENORM // Branch if x denorm +} +;; + +// Common path -- return here from COSH_DENORM if x is unnorm +COSH_COMMON: +{ .mfi + ldfe f_smlst_oflow_input = [r_ad2e],16 +(p7) fma.s0 f8 = f1, f1, f0 // Result = 1.0 if x=0 + add r_ad5 = 0x580, r_ad1 // Point to j_lo_table midpoint +} +{ .mib + ldfe f_log2by64_hi = [r_ad1],16 + and r_exp_x = r_exp_mask, r_signexp_x +(p7) br.ret.spnt b0 // Exit if x=0 +} +;; + +// Get the A coefficients for COSH_BY_TBL +{ .mfi + ldfe f_A1 = [r_ad3],16 + fcmp.lt.s1 p8,p9 = f8,f0 // Test for x<0 + cmp.lt p7,p0 = r_exp_x, r_exp_0_25 // Test x < 0.25 +} +{ .mfb + add r_ad2o = 0x30, r_ad2e // Point to p_table odd coeffs +(p6) fma.s0 f8 = f8,f8,f0 // Result for x nan, inf +(p6) br.ret.spnt b0 // Exit for x nan, inf +} +;; + +// Calculate X2 = ax*ax for COSH_BY_POLY +{ .mfi + ldfe f_log2by64_lo = [r_ad1],16 + nop.f 0 + nop.i 0 +} +{ .mfb + ldfe f_A2 = [r_ad3],16 + fma.s1 f_X2 = f_NORM_X, f_NORM_X, f0 +(p7) br.cond.spnt COSH_BY_POLY +} +;; + +// Here if |x| >= 0.25 +COSH_BY_TBL: +// ****************************************************** +// STEP 1 (TBL and EXP) - Argument reduction +// ****************************************************** +// Get the following constants. +// Inv_log2by64 +// log2by64_hi +// log2by64_lo + + +// We want 2^(N-1) and 2^(-N-1). So bias N-1 and -N-1 and +// put them in an exponent. +// f_spos = 2^(N-1) and f_sneg = 2^(-N-1) +// 0xffff + (N-1) = 0xffff +N -1 +// 0xffff - (N +1) = 0xffff -N -1 + + +// Calculate M and keep it as integer and floating point. +// M = round-to-integer(x*Inv_log2by64) +// f_M = M = truncate(ax/(log2/64)) +// Put the integer representation of M in r_M +// and the floating point representation of M in f_M + +// Get the remaining A,B coefficients +{ .mmi + ldfe f_A3 = [r_ad3],16 + nop.m 0 + nop.i 0 +} +;; + +// Use constant (1.100*2^(63-6)) to get rounded M into rightmost significand +// |x| * 64 * 1/ln2 * 2^(63-6) + 1.1000 * 2^(63+(63-6)) +{ .mfi + nop.m 0 + fma.s1 f_M_temp = f_ABS_X, f_INV_LN2_2TO63, f_RSHF_2TO57 + mov r_signexp_0_5 = 0x0fffe // signexp of +0.5 +} +;; + +// Test for |x| >= overflow limit +{ .mfi + ldfe f_B1 = [r_ad3],16 + fcmp.ge.s1 p6,p0 = f_ABS_X, f_smlst_oflow_input + nop.i 0 +} +;; + +{ .mfi + ldfe f_B2 = [r_ad3],16 + nop.f 0 + mov r_exp_32 = 0x10004 +} +;; + +// Subtract RSHF constant to get rounded M as a floating point value +// M_temp * 2^(63-6) - 2^63 +{ .mfb + ldfe f_B3 = [r_ad3],16 + fms.s1 f_M = f_M_temp, f_2TOM57, f_RSHF +(p6) br.cond.spnt COSH_HUGE // Branch if result will overflow +} +;; + +{ .mfi + getf.sig r_M = f_M_temp + nop.f 0 + cmp.ge p7,p6 = r_exp_x, r_exp_32 // Test if x >= 32 +} +;; + +// Calculate j. j is the signed extension of the six lsb of M. It +// has a range of -32 thru 31. + +// Calculate R +// ax - M*log2by64_hi +// R = (ax - M*log2by64_hi) - M*log2by64_lo + +{ .mfi + nop.m 0 + fnma.s1 f_R_temp = f_M, f_log2by64_hi, f_ABS_X + and r_j = 0x3f, r_M +} +;; + +{ .mii + nop.m 0 + shl r_jshf = r_j, 0x2 // Shift j so can sign extend it +;; + sxt1 r_jshf = r_jshf +} +;; + +{ .mii + nop.m 0 + shr r_j = r_jshf, 0x2 // Now j has range -32 to 31 + nop.i 0 +} +;; + +{ .mmi + shladd r_ad_J_hi = r_j, 4, r_ad4 // pointer to Tjhi + sub r_Mmj = r_M, r_j // M-j + sub r_mj = r0, r_j // Form -j +} +;; + +// The TBL and EXP branches are merged and predicated +// If TBL, p6 true, 0.25 <= |x| < 32 +// If EXP, p7 true, 32 <= |x| < overflow_limit +// +// N = (M-j)/64 +{ .mfi + ldfe f_Tjhi = [r_ad_J_hi] + fnma.s1 f_R = f_M, f_log2by64_lo, f_R_temp + shr r_N = r_Mmj, 0x6 // N = (M-j)/64 +} +{ .mfi + shladd r_ad_mJ_hi = r_mj, 4, r_ad4 // pointer to Tmjhi + nop.f 0 + shladd r_ad_mJ_lo = r_mj, 2, r_ad5 // pointer to Tmjlo +} +;; + +{ .mfi + sub r_2mNm1 = r_signexp_0_5, r_N // signexp 2^(-N-1) + nop.f 0 + shladd r_ad_J_lo = r_j, 2, r_ad5 // pointer to Tjlo +} +{ .mfi + ldfe f_Tmjhi = [r_ad_mJ_hi] + nop.f 0 + add r_2Nm1 = r_signexp_0_5, r_N // signexp 2^(N-1) +} +;; + +{ .mmf + ldfs f_Tmjlo = [r_ad_mJ_lo] + setf.exp f_sneg = r_2mNm1 // Form 2^(-N-1) + nop.f 0 +} +;; + +{ .mmf + ldfs f_Tjlo = [r_ad_J_lo] + setf.exp f_spos = r_2Nm1 // Form 2^(N-1) + nop.f 0 +} +;; + +// ****************************************************** +// STEP 2 (TBL and EXP) +// ****************************************************** +// Calculate Rsquared and Rcubed in preparation for p_even and p_odd + +{ .mmf + nop.m 0 + nop.m 0 + fma.s1 f_Rsq = f_R, f_R, f0 +} +;; + + +// Calculate p_even +// B_2 + Rsq *B_3 +// B_1 + Rsq * (B_2 + Rsq *B_3) +// p_even = Rsq * (B_1 + Rsq * (B_2 + Rsq *B_3)) +{ .mfi + nop.m 0 + fma.s1 f_peven_temp1 = f_Rsq, f_B3, f_B2 + nop.i 0 +} +// Calculate p_odd +// A_2 + Rsq *A_3 +// A_1 + Rsq * (A_2 + Rsq *A_3) +// podd = R + Rcub * (A_1 + Rsq * (A_2 + Rsq *A_3)) +{ .mfi + nop.m 0 + fma.s1 f_podd_temp1 = f_Rsq, f_A3, f_A2 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 f_Rcub = f_Rsq, f_R, f0 + nop.i 0 +} +;; + +// +// If TBL, +// Calculate S_hi and S_lo, and C_hi +// SC_hi_temp = sneg * Tmjhi +// S_hi = spos * Tjhi - SC_hi_temp +// S_hi = spos * Tjhi - (sneg * Tmjhi) +// C_hi = spos * Tjhi + SC_hi_temp +// C_hi = spos * Tjhi + (sneg * Tmjhi) + +{ .mfi + nop.m 0 +(p6) fma.s1 f_SC_hi_temp = f_sneg, f_Tmjhi, f0 + nop.i 0 +} +;; + +// If TBL, +// C_lo_temp3 = sneg * Tmjlo +// C_lo_temp4 = spos * Tjlo + C_lo_temp3 +// C_lo_temp4 = spos * Tjlo + (sneg * Tmjlo) +{ .mfi + nop.m 0 +(p6) fma.s1 f_C_lo_temp3 = f_sneg, f_Tmjlo, f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 f_peven_temp2 = f_Rsq, f_peven_temp1, f_B1 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 f_podd_temp2 = f_Rsq, f_podd_temp1, f_A1 + nop.i 0 +} +;; + +// If EXP, +// Compute 2^(N-1) * Tjhi and 2^(N-1) * Tjlo +{ .mfi + nop.m 0 +(p7) fma.s1 f_Tjhi_spos = f_Tjhi, f_spos, f0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p7) fma.s1 f_Tjlo_spos = f_Tjlo, f_spos, f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p6) fma.s1 f_C_hi = f_spos, f_Tjhi, f_SC_hi_temp + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p6) fms.s1 f_S_hi = f_spos, f_Tjhi, f_SC_hi_temp + nop.i 0 +} +{ .mfi + nop.m 0 +(p6) fma.s1 f_C_lo_temp4 = f_spos, f_Tjlo, f_C_lo_temp3 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 f_peven = f_Rsq, f_peven_temp2, f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 f_podd = f_podd_temp2, f_Rcub, f_R + nop.i 0 +} +;; + +// If TBL, +// C_lo_temp1 = spos * Tjhi - C_hi +// C_lo_temp2 = sneg * Tmjlo + C_lo_temp1 +// C_lo_temp2 = sneg * Tmjlo + (spos * Tjhi - C_hi) + +{ .mfi + nop.m 0 +(p6) fms.s1 f_C_lo_temp1 = f_spos, f_Tjhi, f_C_hi + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p6) fma.s1 f_C_lo_temp2 = f_sneg, f_Tmjhi, f_C_lo_temp1 + nop.i 0 +} +;; + +// If EXP, +// Y_hi = 2^(N-1) * Tjhi +// Y_lo = 2^(N-1) * Tjhi * (p_odd + p_even) + 2^(N-1) * Tjlo +{ .mfi + nop.m 0 +(p7) fma.s1 f_Y_lo_temp = f_peven, f1, f_podd + nop.i 0 +} +;; + +// If TBL, +// C_lo = C_lo_temp4 + C_lo_temp2 +{ .mfi + nop.m 0 +(p6) fma.s1 f_C_lo = f_C_lo_temp4, f1, f_C_lo_temp2 + nop.i 0 +} +;; + +// If TBL, +// Y_hi = C_hi +// Y_lo = S_hi*p_odd + (C_hi*p_even + C_lo) +{ .mfi + nop.m 0 +(p6) fma.s1 f_Y_lo_temp = f_C_hi, f_peven, f_C_lo + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p7) fma.s1 f_Y_lo = f_Tjhi_spos, f_Y_lo_temp, f_Tjlo_spos + nop.i 0 +} +;; + +// Dummy multiply to generate inexact +{ .mfi + nop.m 0 + fmpy.s0 f_tmp = f_B2, f_B2 + nop.i 0 +} +{ .mfi + nop.m 0 +(p6) fma.s1 f_Y_lo = f_S_hi, f_podd, f_Y_lo_temp + nop.i 0 +} +;; + +// f8 = answer = Y_hi + Y_lo +{ .mfi + nop.m 0 +(p7) fma.s0 f8 = f_Y_lo, f1, f_Tjhi_spos + nop.i 0 +} +;; + +// f8 = answer = Y_hi + Y_lo +{ .mfb + nop.m 0 +(p6) fma.s0 f8 = f_Y_lo, f1, f_C_hi + br.ret.sptk b0 // Exit for COSH_BY_TBL and COSH_BY_EXP +} +;; + + +// Here if 0 < |x| < 0.25 +COSH_BY_POLY: +{ .mmf + ldfe f_P6 = [r_ad2e],16 + ldfe f_P5 = [r_ad2o],16 + nop.f 0 +} +;; + +{ .mmi + ldfe f_P4 = [r_ad2e],16 + ldfe f_P3 = [r_ad2o],16 + nop.i 0 +} +;; + +{ .mmi + ldfe f_P2 = [r_ad2e],16 + ldfe f_P1 = [r_ad2o],16 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 f_X3 = f_NORM_X, f_X2, f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 f_X4 = f_X2, f_X2, f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 f_poly65 = f_X2, f_P6, f_P5 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 f_poly43 = f_X2, f_P4, f_P3 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 f_poly21 = f_X2, f_P2, f_P1 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 f_poly6543 = f_X4, f_poly65, f_poly43 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 f_poly6to1 = f_X4, f_poly6543, f_poly21 + nop.i 0 +} +;; + +// Dummy multiply to generate inexact +{ .mfi + nop.m 0 + fmpy.s0 f_tmp = f_P6, f_P6 + nop.i 0 +} +{ .mfb + nop.m 0 + fma.s0 f8 = f_poly6to1, f_X2, f1 + br.ret.sptk b0 // Exit COSH_BY_POLY +} +;; + + +// Here if x denorm or unorm +COSH_DENORM: +// Determine if x really a denorm and not a unorm +{ .mmf + getf.exp r_signexp_x = f_NORM_X + mov r_exp_denorm = 0x0c001 // Real denorms have exp < this + fmerge.s f_ABS_X = f0, f_NORM_X +} +;; + +{ .mfi + nop.m 0 + fcmp.eq.s0 p10,p0 = f8, f0 // Set denorm flag + nop.i 0 +} +;; + +// Set p8 if really a denorm +{ .mmi + and r_exp_x = r_exp_mask, r_signexp_x +;; + cmp.lt p8,p9 = r_exp_x, r_exp_denorm + nop.i 0 +} +;; + +// Identify denormal operands. +{ .mfb + nop.m 0 +(p8) fma.s0 f8 = f8,f8,f1 // If x denorm, result=1+x^2 +(p9) br.cond.sptk COSH_COMMON // Return to main path if x unorm +} +;; + +{ .mfb + nop.m 0 + nop.f 0 + br.ret.sptk b0 // Exit if x denorm +} +;; + + +// Here if |x| >= overflow limit +COSH_HUGE: +// for COSH_HUGE, put 24000 in exponent; take sign from input +{ .mmi + mov r_exp_huge = 0x15dbf +;; + setf.exp f_huge = r_exp_huge + nop.i 0 +} +;; + +{ .mfi + alloc r32 = ar.pfs,0,5,4,0 + fma.s1 f_signed_hi_lo = f_huge, f1, f1 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s0 f_pre_result = f_signed_hi_lo, f_huge, f0 + mov GR_Parameter_TAG = 63 +} +;; + +GLOBAL_IEEE754_END(coshl) + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue + +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; + +{ .mmi + stfe [GR_Parameter_Y] = f0,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; + +.body +{ .mib + stfe [GR_Parameter_X] = f8 // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfe [GR_Parameter_Y] = f_pre_result // STORE Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; + +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; + +{ .mmi + ldfe f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; + +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) + + +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/e_exp.S b/sysdeps/ia64/fpu/e_exp.S new file mode 100644 index 0000000000..fcc247fb1a --- /dev/null +++ b/sysdeps/ia64/fpu/e_exp.S @@ -0,0 +1,793 @@ +.file "exp.s" + + +// Copyright (c) 2000 - 2005, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 2/02/00 Initial version +// 3/07/00 exp(inf) = inf but now does NOT call error support +// exp(-inf) = 0 but now does NOT call error support +// 4/04/00 Unwind support added +// 8/15/00 Bundle added after call to __libm_error_support to properly +// set [the previously overwritten] GR_Parameter_RESULT. +// 11/30/00 Reworked to shorten main path, widen main path to include all +// args in normal range, and add quick exit for 0, nan, inf. +// 12/05/00 Loaded constants earlier with setf to save 2 cycles. +// 02/05/02 Corrected uninitialize predicate in POSSIBLE_UNDERFLOW path +// 05/20/02 Cleaned up namespace and sf0 syntax +// 09/07/02 Force inexact flag +// 11/15/02 Split underflow path into zero/nonzero; eliminated fma in main path +// 05/30/03 Set inexact flag on unmasked overflow/underflow +// 03/31/05 Reformatted delimiters between data tables + +// API +//============================================================== +// double exp(double) + +// Overview of operation +//============================================================== +// Take the input x. w is "how many log2/128 in x?" +// w = x * 128/log2 +// n = int(w) +// x = n log2/128 + r + delta + +// n = 128M + index_1 + 2^4 index_2 +// x = M log2 + (log2/128) index_1 + (log2/8) index_2 + r + delta + +// exp(x) = 2^M 2^(index_1/128) 2^(index_2/8) exp(r) exp(delta) +// Construct 2^M +// Get 2^(index_1/128) from table_1; +// Get 2^(index_2/8) from table_2; +// Calculate exp(r) by 5th order polynomial +// r = x - n (log2/128)_high +// delta = - n (log2/128)_low +// Calculate exp(delta) as 1 + delta + + +// Special values +//============================================================== +// exp(+0) = 1.0 +// exp(-0) = 1.0 + +// exp(+qnan) = +qnan +// exp(-qnan) = -qnan +// exp(+snan) = +qnan +// exp(-snan) = -qnan + +// exp(-inf) = +0 +// exp(+inf) = +inf + +// Overflow and Underflow +//======================= +// exp(x) = largest double normal when +// x = 709.7827 = 0x40862e42fefa39ef + +// exp(x) = smallest double normal when +// x = -708.396 = 0xc086232bdd7abcd2 + +// exp(x) = largest round-to-nearest single zero when +// x = -745.1332 = 0xc0874910d52d3052 + + +// Registers used +//============================================================== +// Floating Point registers used: +// f8, input, output +// f6 -> f15, f32 -> f49 + +// General registers used: +// r14 -> r40 + +// Predicate registers used: +// p6 -> p15 + +// Assembly macros +//============================================================== + +rRshf = r14 +rAD_TB1 = r15 +rAD_T1 = r15 +rAD_TB2 = r16 +rAD_T2 = r16 +rAD_P = r17 +rN = r18 +rIndex_1 = r19 +rIndex_2_16 = r20 +rM = r21 +rBiased_M = r21 +rIndex_1_16 = r21 +rSig_inv_ln2 = r22 +rExp_bias = r23 +rExp_mask = r24 +rTmp = r25 +rRshf_2to56 = r26 +rGt_ln = r27 +rExp_2tom56 = r28 + + +GR_SAVE_B0 = r33 +GR_SAVE_PFS = r34 +GR_SAVE_GP = r35 +GR_SAVE_SP = r36 + +GR_Parameter_X = r37 +GR_Parameter_Y = r38 +GR_Parameter_RESULT = r39 +GR_Parameter_TAG = r40 + + +FR_X = f10 +FR_Y = f1 +FR_RESULT = f8 + +fRSHF_2TO56 = f6 +fINV_LN2_2TO63 = f7 +fW_2TO56_RSH = f9 +f2TOM56 = f11 +fP5 = f12 +fP54 = f12 +fP5432 = f12 +fP4 = f13 +fP3 = f14 +fP32 = f14 +fP2 = f15 +fP = f15 + +fLn2_by_128_hi = f33 +fLn2_by_128_lo = f34 + +fRSHF = f35 +fNfloat = f36 +fNormX = f37 +fR = f38 +fF = f39 + +fRsq = f40 +f2M = f41 +fS1 = f42 +fT1 = f42 +fS2 = f43 +fT2 = f43 +fS = f43 +fWre_urm_f8 = f44 +fFtz_urm_f8 = f44 + +fMIN_DBL_OFLOW_ARG = f45 +fMAX_DBL_ZERO_ARG = f46 +fMAX_DBL_NORM_ARG = f47 +fMIN_DBL_NORM_ARG = f48 +fGt_pln = f49 +fTmp = f49 + + +// Data tables +//============================================================== + +RODATA +.align 16 + +// ************* DO NOT CHANGE ORDER OF THESE TABLES ******************** + +// double-extended 1/ln(2) +// 3fff b8aa 3b29 5c17 f0bb be87fed0691d3e88 +// 3fff b8aa 3b29 5c17 f0bc +// For speed the significand will be loaded directly with a movl and setf.sig +// and the exponent will be bias+63 instead of bias+0. Thus subsequent +// computations need to scale appropriately. +// The constant 128/ln(2) is needed for the computation of w. This is also +// obtained by scaling the computations. +// +// Two shifting constants are loaded directly with movl and setf.d. +// 1. fRSHF_2TO56 = 1.1000..00 * 2^(63-7) +// This constant is added to x*1/ln2 to shift the integer part of +// x*128/ln2 into the rightmost bits of the significand. +// The result of this fma is fW_2TO56_RSH. +// 2. fRSHF = 1.1000..00 * 2^(63) +// This constant is subtracted from fW_2TO56_RSH * 2^(-56) to give +// the integer part of w, n, as a floating-point number. +// The result of this fms is fNfloat. + + +LOCAL_OBJECT_START(exp_table_1) +data8 0x40862e42fefa39f0 // smallest dbl overflow arg, +709.7827 +data8 0xc0874910d52d3052 // largest arg for rnd-to-nearest 0 result, -745.133 +data8 0x40862e42fefa39ef // largest dbl arg to give normal dbl result, +709.7827 +data8 0xc086232bdd7abcd2 // smallest dbl arg to give normal dbl result, -708.396 +data8 0xb17217f7d1cf79ab , 0x00003ff7 // ln2/128 hi +data8 0xc9e3b39803f2f6af , 0x00003fb7 // ln2/128 lo +// +// Table 1 is 2^(index_1/128) where +// index_1 goes from 0 to 15 +// +data8 0x8000000000000000 , 0x00003FFF +data8 0x80B1ED4FD999AB6C , 0x00003FFF +data8 0x8164D1F3BC030773 , 0x00003FFF +data8 0x8218AF4373FC25EC , 0x00003FFF +data8 0x82CD8698AC2BA1D7 , 0x00003FFF +data8 0x8383594EEFB6EE37 , 0x00003FFF +data8 0x843A28C3ACDE4046 , 0x00003FFF +data8 0x84F1F656379C1A29 , 0x00003FFF +data8 0x85AAC367CC487B15 , 0x00003FFF +data8 0x8664915B923FBA04 , 0x00003FFF +data8 0x871F61969E8D1010 , 0x00003FFF +data8 0x87DB357FF698D792 , 0x00003FFF +data8 0x88980E8092DA8527 , 0x00003FFF +data8 0x8955EE03618E5FDD , 0x00003FFF +data8 0x8A14D575496EFD9A , 0x00003FFF +data8 0x8AD4C6452C728924 , 0x00003FFF +LOCAL_OBJECT_END(exp_table_1) + +// Table 2 is 2^(index_1/8) where +// index_2 goes from 0 to 7 +LOCAL_OBJECT_START(exp_table_2) +data8 0x8000000000000000 , 0x00003FFF +data8 0x8B95C1E3EA8BD6E7 , 0x00003FFF +data8 0x9837F0518DB8A96F , 0x00003FFF +data8 0xA5FED6A9B15138EA , 0x00003FFF +data8 0xB504F333F9DE6484 , 0x00003FFF +data8 0xC5672A115506DADD , 0x00003FFF +data8 0xD744FCCAD69D6AF4 , 0x00003FFF +data8 0xEAC0C6E7DD24392F , 0x00003FFF +LOCAL_OBJECT_END(exp_table_2) + + +LOCAL_OBJECT_START(exp_p_table) +data8 0x3f8111116da21757 //P5 +data8 0x3fa55555d787761c //P4 +data8 0x3fc5555555555414 //P3 +data8 0x3fdffffffffffd6a //P2 +LOCAL_OBJECT_END(exp_p_table) + + +.section .text +GLOBAL_IEEE754_ENTRY(exp) + +{ .mlx + nop.m 0 + movl rSig_inv_ln2 = 0xb8aa3b295c17f0bc // significand of 1/ln2 +} +{ .mlx + addl rAD_TB1 = @ltoff(exp_table_1), gp + movl rRshf_2to56 = 0x4768000000000000 // 1.10000 2^(63+56) +} +;; + +{ .mfi + ld8 rAD_TB1 = [rAD_TB1] + fclass.m p8,p0 = f8,0x07 // Test for x=0 + mov rExp_mask = 0x1ffff +} +{ .mfi + mov rExp_bias = 0xffff + fnorm.s1 fNormX = f8 + mov rExp_2tom56 = 0xffff-56 +} +;; + +// Form two constants we need +// 1/ln2 * 2^63 to compute w = x * 1/ln2 * 128 +// 1.1000..000 * 2^(63+63-7) to right shift int(w) into the significand + +{ .mfi + setf.sig fINV_LN2_2TO63 = rSig_inv_ln2 // form 1/ln2 * 2^63 + fclass.m p9,p0 = f8,0x22 // Test for x=-inf + nop.i 0 +} +{ .mlx + setf.d fRSHF_2TO56 = rRshf_2to56 // Form const 1.100 * 2^(63+56) + movl rRshf = 0x43e8000000000000 // 1.10000 2^63 for right shift +} +;; + +{ .mfi + ldfpd fMIN_DBL_OFLOW_ARG, fMAX_DBL_ZERO_ARG = [rAD_TB1],16 + fclass.m p10,p0 = f8,0x1e1 // Test for x=+inf, nan, NaT + nop.i 0 +} +{ .mfb + setf.exp f2TOM56 = rExp_2tom56 // form 2^-56 for scaling Nfloat +(p9) fma.d.s0 f8 = f0,f0,f0 // quick exit for x=-inf +(p9) br.ret.spnt b0 +} +;; + +{ .mfi + ldfpd fMAX_DBL_NORM_ARG, fMIN_DBL_NORM_ARG = [rAD_TB1],16 + nop.f 0 + nop.i 0 +} +{ .mfb + setf.d fRSHF = rRshf // Form right shift const 1.100 * 2^63 +(p8) fma.d.s0 f8 = f1,f1,f0 // quick exit for x=0 +(p8) br.ret.spnt b0 +} +;; + +{ .mfb + ldfe fLn2_by_128_hi = [rAD_TB1],16 +(p10) fma.d.s0 f8 = f8,f8,f0 // Result if x=+inf, nan, NaT +(p10) br.ret.spnt b0 // quick exit for x=+inf, nan, NaT +} +;; + +{ .mfi + ldfe fLn2_by_128_lo = [rAD_TB1],16 + fcmp.eq.s0 p6,p0 = f8, f0 // Dummy to set D + nop.i 0 +} +;; + +// After that last load, rAD_TB1 points to the beginning of table 1 + +// W = X * Inv_log2_by_128 +// By adding 1.10...0*2^63 we shift and get round_int(W) in significand. +// We actually add 1.10...0*2^56 to X * Inv_log2 to do the same thing. + +{ .mfi + nop.m 0 + fma.s1 fW_2TO56_RSH = fNormX, fINV_LN2_2TO63, fRSHF_2TO56 + nop.i 0 +} +;; + +// Divide arguments into the following categories: +// Certain Underflow p11 - -inf < x <= MAX_DBL_ZERO_ARG +// Possible Underflow p13 - MAX_DBL_ZERO_ARG < x < MIN_DBL_NORM_ARG +// Certain Safe - MIN_DBL_NORM_ARG <= x <= MAX_DBL_NORM_ARG +// Possible Overflow p14 - MAX_DBL_NORM_ARG < x < MIN_DBL_OFLOW_ARG +// Certain Overflow p15 - MIN_DBL_OFLOW_ARG <= x < +inf +// +// If the input is really a double arg, then there will never be +// "Possible Overflow" arguments. +// + +{ .mfi + add rAD_TB2 = 0x100, rAD_TB1 + fcmp.ge.s1 p15,p0 = fNormX,fMIN_DBL_OFLOW_ARG + nop.i 0 +} +;; + +{ .mfi + add rAD_P = 0x80, rAD_TB2 + fcmp.le.s1 p11,p0 = fNormX,fMAX_DBL_ZERO_ARG + nop.i 0 +} +;; + +{ .mfb + ldfpd fP5, fP4 = [rAD_P] ,16 + fcmp.gt.s1 p14,p0 = fNormX,fMAX_DBL_NORM_ARG +(p15) br.cond.spnt EXP_CERTAIN_OVERFLOW +} +;; + +// Nfloat = round_int(W) +// The signficand of fW_2TO56_RSH contains the rounded integer part of W, +// as a twos complement number in the lower bits (that is, it may be negative). +// That twos complement number (called N) is put into rN. + +// Since fW_2TO56_RSH is scaled by 2^56, it must be multiplied by 2^-56 +// before the shift constant 1.10000 * 2^63 is subtracted to yield fNfloat. +// Thus, fNfloat contains the floating point version of N + +{ .mfb + ldfpd fP3, fP2 = [rAD_P] + fms.s1 fNfloat = fW_2TO56_RSH, f2TOM56, fRSHF +(p11) br.cond.spnt EXP_CERTAIN_UNDERFLOW +} +;; + +{ .mfi + getf.sig rN = fW_2TO56_RSH + nop.f 0 + nop.i 0 +} +;; + +// rIndex_1 has index_1 +// rIndex_2_16 has index_2 * 16 +// rBiased_M has M +// rIndex_1_16 has index_1 * 16 + +// rM has true M +// r = x - Nfloat * ln2_by_128_hi +// f = 1 - Nfloat * ln2_by_128_lo +{ .mfi + and rIndex_1 = 0x0f, rN + fnma.s1 fR = fNfloat, fLn2_by_128_hi, fNormX + shr rM = rN, 0x7 +} +{ .mfi + and rIndex_2_16 = 0x70, rN + fnma.s1 fF = fNfloat, fLn2_by_128_lo, f1 + nop.i 0 +} +;; + +// rAD_T1 has address of T1 +// rAD_T2 has address if T2 + +{ .mmi + add rBiased_M = rExp_bias, rM + add rAD_T2 = rAD_TB2, rIndex_2_16 + shladd rAD_T1 = rIndex_1, 4, rAD_TB1 +} +;; + +// Create Scale = 2^M +{ .mmi + setf.exp f2M = rBiased_M + ldfe fT2 = [rAD_T2] + nop.i 0 +} +;; + +// Load T1 and T2 +{ .mfi + ldfe fT1 = [rAD_T1] + fmpy.s0 fTmp = fLn2_by_128_lo, fLn2_by_128_lo // Force inexact + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fRsq = fR, fR, f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fP54 = fR, fP5, fP4 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcmp.lt.s1 p13,p0 = fNormX,fMIN_DBL_NORM_ARG + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fP32 = fR, fP3, fP2 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fP5432 = fRsq, fP54, fP32 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fS1 = f2M,fT1,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fS2 = fF,fT2,f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fP = fRsq, fP5432, fR + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fS = fS1,fS2,f0 + nop.i 0 +} +;; + +{ .mbb + nop.m 0 +(p13) br.cond.spnt EXP_POSSIBLE_UNDERFLOW +(p14) br.cond.spnt EXP_POSSIBLE_OVERFLOW +} +;; + +{ .mfb + nop.m 0 + fma.d.s0 f8 = fS, fP, fS + br.ret.sptk b0 // Normal path exit +} +;; + + +EXP_POSSIBLE_OVERFLOW: + +// Here if fMAX_DBL_NORM_ARG < x < fMIN_DBL_OFLOW_ARG +// This cannot happen if input is a double, only if input higher precision. +// Overflow is a possibility, not a certainty. + +// Recompute result using status field 2 with user's rounding mode, +// and wre set. If result is larger than largest double, then we have +// overflow + +{ .mfi + mov rGt_ln = 0x103ff // Exponent for largest dbl + 1 ulp + fsetc.s2 0x7F,0x42 // Get user's round mode, set wre + nop.i 0 +} +;; + +{ .mfi + setf.exp fGt_pln = rGt_ln // Create largest double + 1 ulp + fma.d.s2 fWre_urm_f8 = fS, fP, fS // Result with wre set + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fsetc.s2 0x7F,0x40 // Turn off wre in sf2 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcmp.ge.s1 p6, p0 = fWre_urm_f8, fGt_pln // Test for overflow + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + nop.f 0 +(p6) br.cond.spnt EXP_CERTAIN_OVERFLOW // Branch if overflow +} +;; + +{ .mfb + nop.m 0 + fma.d.s0 f8 = fS, fP, fS + br.ret.sptk b0 // Exit if really no overflow +} +;; + +EXP_CERTAIN_OVERFLOW: +{ .mmi + sub rTmp = rExp_mask, r0, 1 +;; + setf.exp fTmp = rTmp + nop.i 0 +} +;; + +{ .mfi + alloc r32=ar.pfs,1,4,4,0 + fmerge.s FR_X = f8,f8 + nop.i 0 +} +{ .mfb + mov GR_Parameter_TAG = 14 + fma.d.s0 FR_RESULT = fTmp, fTmp, fTmp // Set I,O and +INF result + br.cond.sptk __libm_error_region +} +;; + +EXP_POSSIBLE_UNDERFLOW: + +// Here if fMAX_DBL_ZERO_ARG < x < fMIN_DBL_NORM_ARG +// Underflow is a possibility, not a certainty + +// We define an underflow when the answer with +// ftz set +// is zero (tiny numbers become zero) + +// Notice (from below) that if we have an unlimited exponent range, +// then there is an extra machine number E between the largest denormal and +// the smallest normal. + +// So if with unbounded exponent we round to E or below, then we are +// tiny and underflow has occurred. + +// But notice that you can be in a situation where we are tiny, namely +// rounded to E, but when the exponent is bounded we round to smallest +// normal. So the answer can be the smallest normal with underflow. + +// E +// -----+--------------------+--------------------+----- +// | | | +// 1.1...10 2^-3fff 1.1...11 2^-3fff 1.0...00 2^-3ffe +// 0.1...11 2^-3ffe (biased, 1) +// largest dn smallest normal + +{ .mfi + nop.m 0 + fsetc.s2 0x7F,0x41 // Get user's round mode, set ftz + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.d.s2 fFtz_urm_f8 = fS, fP, fS // Result with ftz set + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fsetc.s2 0x7F,0x40 // Turn off ftz in sf2 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcmp.eq.s1 p6, p7 = fFtz_urm_f8, f0 // Test for underflow + nop.i 0 +} +{ .mfi + nop.m 0 + fma.d.s0 f8 = fS, fP, fS // Compute result, set I, maybe U + nop.i 0 +} +;; + +{ .mbb + nop.m 0 +(p6) br.cond.spnt EXP_UNDERFLOW_COMMON // Branch if really underflow +(p7) br.ret.sptk b0 // Exit if really no underflow +} +;; + +EXP_CERTAIN_UNDERFLOW: +// Here if x < fMAX_DBL_ZERO_ARG +// Result will be zero (or smallest denorm if round to +inf) with I, U set +{ .mmi + mov rTmp = 1 +;; + setf.exp fTmp = rTmp // Form small normal + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fmerge.se fTmp = fTmp, fLn2_by_128_lo // Small with signif lsb 1 + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + fma.d.s0 f8 = fTmp, fTmp, f0 // Set I,U, tiny (+0.0) result + br.cond.sptk EXP_UNDERFLOW_COMMON +} +;; + +EXP_UNDERFLOW_COMMON: +// Determine if underflow result is zero or nonzero +{ .mfi + alloc r32=ar.pfs,1,4,4,0 + fcmp.eq.s1 p6, p0 = f8, f0 + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + fmerge.s FR_X = fNormX,fNormX +(p6) br.cond.spnt EXP_UNDERFLOW_ZERO +} +;; + +EXP_UNDERFLOW_NONZERO: +// Here if x < fMIN_DBL_NORM_ARG and result nonzero; +// I, U are set +{ .mfb + mov GR_Parameter_TAG = 15 + nop.f 0 // FR_RESULT already set + br.cond.sptk __libm_error_region +} +;; + +EXP_UNDERFLOW_ZERO: +// Here if x < fMIN_DBL_NORM_ARG and result zero; +// I, U are set +{ .mfb + mov GR_Parameter_TAG = 15 + nop.f 0 // FR_RESULT already set + br.cond.sptk __libm_error_region +} +;; + +GLOBAL_IEEE754_END(exp) + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfd [GR_Parameter_Y] = FR_Y,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; +.body +{ .mib + stfd [GR_Parameter_X] = FR_X // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfd [GR_Parameter_Y] = FR_RESULT // STORE Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; +{ .mmi + ldfd f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/e_exp10.S b/sysdeps/ia64/fpu/e_exp10.S new file mode 100644 index 0000000000..eafa59dd7c --- /dev/null +++ b/sysdeps/ia64/fpu/e_exp10.S @@ -0,0 +1,605 @@ +.file "exp10.s" + + +// Copyright (c) 2000 - 2005, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 08/25/00 Initial version +// 05/20/02 Cleaned up namespace and sf0 syntax +// 09/06/02 Improved performance; no inexact flags on exact cases +// 01/29/03 Added missing } to bundle templates +// 12/16/04 Call error handling on underflow. +// 03/31/05 Reformatted delimiters between data tables +// +// API +//============================================================== +// double exp10(double) +// +// Overview of operation +//============================================================== +// Background +// +// Implementation +// +// Let x= (K + fh + fl + r)/log2(10), where +// K is an integer, fh= 0.b1 b2 b3 b4 b5, +// fl= 2^{-5}* 0.b6 b7 b8 b8 b10 (fh, fl >= 0), +// and |r|<2^{-11} +// Th is a table that stores 2^fh (32 entries) rounded to +// double extended precision (only mantissa is stored) +// Tl is a table that stores 2^fl (32 entries) rounded to +// double extended precision (only mantissa is stored) +// +// 10^x is approximated as +// 2^K * Th [ f ] * Tl [ f ] * (1+c1*e+c1*r+c2*r^2+c3*r^3+c4*r^4), +// where e= (x*log2(10)_hi-RN(x*log2(10)_hi))+log2(10)_lo*x + +// Note there are only 22 non-zero values that produce an exact result: +// 1.0, 2.0, ... 22.0. +// We test for these cases and use s1 to avoid setting the inexact flag. + +// Special values +//============================================================== +// exp10(0)= 1 +// exp10(+inf)= inf +// exp10(-inf)= 0 +// + +// Registers used +//============================================================== +// r2-r3, r14-r40 +// f6-f15, f32-f52 +// p6-p12 +// + + +GR_TBL_START = r2 +GR_LOG_TBL = r3 + +GR_OF_LIMIT = r14 +GR_UF_LIMIT = r15 +GR_EXP_CORR = r16 +GR_F_low = r17 +GR_F_high = r18 +GR_K = r19 +GR_Flow_ADDR = r20 + +GR_BIAS = r21 +GR_Fh = r22 +GR_Fh_ADDR = r23 +GR_EXPMAX = r24 +GR_BIAS53 = r25 + +GR_ROUNDVAL = r26 +GR_SNORM_LIMIT = r26 +GR_MASK = r27 +GR_KF0 = r28 +GR_MASK_low = r29 +GR_COEFF_START = r30 +GR_exact_limit = r31 + +GR_SAVE_B0 = r33 +GR_SAVE_PFS = r34 +GR_SAVE_GP = r35 +GR_SAVE_SP = r36 + +GR_Parameter_X = r37 +GR_Parameter_Y = r38 +GR_Parameter_RESULT = r39 +GR_Parameter_TAG = r40 + + +FR_X = f10 +FR_Y = f1 +FR_RESULT = f8 + + +FR_COEFF1 = f6 +FR_COEFF2 = f7 +FR_R = f9 +FR_LOG2_10 = f10 + +FR_2P53 = f11 +FR_KF0 = f12 +FR_COEFF3 = f13 +FR_COEFF4 = f14 +FR_UF_LIMIT = f15 + +FR_OF_LIMIT = f32 +FR_DX_L210 = f33 +FR_ROUNDVAL = f34 +FR_KF = f35 + +FR_2_TO_K = f36 +FR_T_low = f37 +FR_T_high = f38 +FR_P34 = f39 +FR_R2 = f40 + +FR_P12 = f41 +FR_T_low_K = f42 +FR_P14 = f43 +FR_T = f44 +FR_P = f45 + +FR_L2_10_low = f46 +FR_L2_10_high = f47 +FR_E0 = f48 +FR_E = f49 +FR_exact_limit = f50 + +FR_int_x = f51 +FR_SNORM_LIMIT = f52 + + +// Data tables +//============================================================== + +RODATA + +.align 16 + +LOCAL_OBJECT_START(poly_coeffs) + +data8 0xd49a784bcd1b8afe, 0x00003fcb // log2(10)*2^(10-63) +data8 0x9257edfe9b5fb698, 0x3fbf // log2(10)_low (bits 64...127) +data8 0x3fac6b08d704a0c0, 0x3f83b2ab6fba4e77 // C_3 and C_4 +data8 0xb17217f7d1cf79ab, 0x00003ffe // C_1 +data8 0xf5fdeffc162c7541, 0x00003ffc // C_2 +LOCAL_OBJECT_END(poly_coeffs) + + +LOCAL_OBJECT_START(T_table) + +// 2^{0.00000 b6 b7 b8 b9 b10} +data8 0x8000000000000000, 0x8016302f17467628 +data8 0x802c6436d0e04f50, 0x80429c17d77c18ed +data8 0x8058d7d2d5e5f6b0, 0x806f17687707a7af +data8 0x80855ad965e88b83, 0x809ba2264dada76a +data8 0x80b1ed4fd999ab6c, 0x80c83c56b50cf77f +data8 0x80de8f3b8b85a0af, 0x80f4e5ff089f763e +data8 0x810b40a1d81406d4, 0x81219f24a5baa59d +data8 0x813801881d886f7b, 0x814e67cceb90502c +data8 0x8164d1f3bc030773, 0x817b3ffd3b2f2e47 +data8 0x8191b1ea15813bfd, 0x81a827baf7838b78 +data8 0x81bea1708dde6055, 0x81d51f0b8557ec1c +data8 0x81eba08c8ad4536f, 0x820225f44b55b33b +data8 0x8218af4373fc25eb, 0x822f3c7ab205c89a +data8 0x8245cd9ab2cec048, 0x825c62a423d13f0c +data8 0x8272fb97b2a5894c, 0x828998760d01faf3 +data8 0x82a0393fe0bb0ca8, 0x82b6ddf5dbc35906 +// +// 2^{0.b1 b2 b3 b4 b5} +data8 0x8000000000000000, 0x82cd8698ac2ba1d7 +data8 0x85aac367cc487b14, 0x88980e8092da8527 +data8 0x8b95c1e3ea8bd6e6, 0x8ea4398b45cd53c0 +data8 0x91c3d373ab11c336, 0x94f4efa8fef70961 +data8 0x9837f0518db8a96f, 0x9b8d39b9d54e5538 +data8 0x9ef5326091a111ad, 0xa27043030c496818 +data8 0xa5fed6a9b15138ea, 0xa9a15ab4ea7c0ef8 +data8 0xad583eea42a14ac6, 0xb123f581d2ac258f +data8 0xb504f333f9de6484, 0xb8fbaf4762fb9ee9 +data8 0xbd08a39f580c36be, 0xc12c4cca66709456 +data8 0xc5672a115506dadd, 0xc9b9bd866e2f27a2 +data8 0xce248c151f8480e3, 0xd2a81d91f12ae45a +data8 0xd744fccad69d6af4, 0xdbfbb797daf23755 +data8 0xe0ccdeec2a94e111, 0xe5b906e77c8348a8 +data8 0xeac0c6e7dd24392e, 0xefe4b99bdcdaf5cb +data8 0xf5257d152486cc2c, 0xfa83b2db722a033a +LOCAL_OBJECT_END(T_table) + + + +.section .text +GLOBAL_IEEE754_ENTRY(exp10) + + +{.mfi + alloc r32= ar.pfs, 1, 4, 4, 0 + // will continue only for non-zero normal/denormal numbers + fclass.nm.unc p12, p7= f8, 0x1b + mov GR_BIAS53= 0xffff+63-10 +} +{.mlx + // GR_TBL_START= pointer to log2(10), C_1...C_4 followed by T_table + addl GR_TBL_START= @ltoff(poly_coeffs), gp + movl GR_ROUNDVAL= 0x3fc00000 // 1.5 (SP) +} +;; + +{.mfi + ld8 GR_COEFF_START= [ GR_TBL_START ] // Load pointer to coeff table + fcmp.lt.s1 p6, p8= f8, f0 // X<0 ? + nop.i 0 +} +;; + +{.mlx + setf.exp FR_2P53= GR_BIAS53 // 2^{63-10} + movl GR_UF_LIMIT= 0xc07439b746e36b52 // (-2^10-51) / log2(10) +} +{.mlx + setf.s FR_ROUNDVAL= GR_ROUNDVAL + movl GR_OF_LIMIT= 0x40734413509f79fe // Overflow threshold +} +;; + +{.mlx + ldfe FR_LOG2_10= [ GR_COEFF_START ], 16 // load log2(10)*2^(10-63) + movl GR_SNORM_LIMIT= 0xc0733a7146f72a41 // Smallest normal threshold +} +{.mib + nop.m 0 + nop.i 0 + (p12) br.cond.spnt SPECIAL_exp10 // Branch if nan, inf, zero +} +;; + +{.mmf + ldfe FR_L2_10_low= [ GR_COEFF_START ], 16 // load log2(10)_low + setf.d FR_OF_LIMIT= GR_OF_LIMIT // Set overflow limit + fma.s0 f8= f8, f1, f0 // normalize x +} +;; + +{.mfi + ldfpd FR_COEFF3, FR_COEFF4= [ GR_COEFF_START ], 16 // load C_3, C_4 + (p8) fcvt.fx.s1 FR_int_x = f8 // Convert x to integer + nop.i 0 +} +{.mfi + setf.d FR_UF_LIMIT= GR_UF_LIMIT // Set underflow limit + fma.s1 FR_KF0= f8, FR_LOG2_10, FR_ROUNDVAL // y= (x*log2(10)*2^10 + + // 1.5*2^63) * 2^(-63) + mov GR_EXP_CORR= 0xffff-126 +} +;; + +{.mfi + setf.d FR_SNORM_LIMIT= GR_SNORM_LIMIT // Set smallest normal limit + fma.s1 FR_L2_10_high= FR_LOG2_10, FR_2P53, f0 // FR_LOG2_10= log2(10)_hi + nop.i 0 +} +;; + +{.mfi + ldfe FR_COEFF1= [ GR_COEFF_START ], 16 // load C_1 + fms.s1 FR_KF= FR_KF0, f1, FR_ROUNDVAL // (K+f)*2^(10-63) + mov GR_MASK= 1023 +} +;; + +{.mfi + ldfe FR_COEFF2= [ GR_COEFF_START ], 16 // load C_2 + fma.s1 FR_LOG2_10= f8, FR_L2_10_high, f0 // y0= x*log2(10)_hi + mov GR_MASK_low= 31 +} +;; + +{.mlx + getf.sig GR_KF0= FR_KF0 // (K+f)*2^10= round_to_int(y) + (p8) movl GR_exact_limit= 0x41b00000 // Largest x for exact result, + // +22.0 +} +;; + +{.mfi + add GR_LOG_TBL= 256, GR_COEFF_START // Pointer to high T_table + fcmp.gt.s1 p12, p7= f8, FR_OF_LIMIT // x>overflow threshold ? + nop.i 0 +} +;; + +{.mfi + (p8) setf.s FR_exact_limit = GR_exact_limit // Largest x for exact result + (p8) fcvt.xf FR_int_x = FR_int_x // Integral part of x + shr GR_K= GR_KF0, 10 // K +} +{.mfi + and GR_F_high= GR_MASK, GR_KF0 // f_high*32 + fnma.s1 FR_R= FR_KF, FR_2P53, FR_LOG2_10 // r= x*log2(10)-2^{63-10}* + // [ (K+f)*2^{10-63} ] + and GR_F_low= GR_KF0, GR_MASK_low // f_low +} +;; + +{.mmi + shladd GR_Flow_ADDR= GR_F_low, 3, GR_COEFF_START // address of 2^{f_low} + add GR_BIAS= GR_K, GR_EXP_CORR // K= bias-2*63 + shr GR_Fh= GR_F_high, 5 // f_high +} +;; + +{.mfi + setf.exp FR_2_TO_K= GR_BIAS // 2^{K-126} + (p7) fcmp.lt.s1 p12, p7= f8, FR_UF_LIMIT // x= 0), +// and |r|<2^{-11} +// Th is a table that stores 2^fh (32 entries) rounded to +// double extended precision (only mantissa is stored) +// Tl is a table that stores 2^fl (32 entries) rounded to +// double extended precision (only mantissa is stored) +// +// 10^x is approximated as +// 2^K * Th [ f ] * Tl [ f ] * (1+c1*r+c2*r^2) + +// Note there are only 10 non-zero values that produce an exact result: +// 1.0, 2.0, ... 10.0. +// We test for these cases and use s1 to avoid setting the inexact flag. + +// Special values +//============================================================== +// exp10(0)= 1 +// exp10(+inf)= inf +// exp10(-inf)= 0 +// + +// Registers used +//============================================================== +// r2-r3, r14-r40 +// f6-f15, f32-f52 +// p6-p12 +// + + +GR_TBL_START = r2 +GR_LOG_TBL = r3 + +GR_OF_LIMIT = r14 +GR_UF_LIMIT = r15 +GR_EXP_CORR = r16 +GR_F_low = r17 +GR_F_high = r18 +GR_K = r19 +GR_Flow_ADDR = r20 + +GR_BIAS = r21 +GR_Fh = r22 +GR_Fh_ADDR = r23 +GR_EXPMAX = r24 + +GR_ROUNDVAL = r26 +GR_SNORM_LIMIT = r26 +GR_MASK = r27 +GR_KF0 = r28 +GR_MASK_low = r29 +GR_COEFF_START = r30 +GR_exact_limit = r31 + +GR_SAVE_B0 = r33 +GR_SAVE_PFS = r34 +GR_SAVE_GP = r35 +GR_SAVE_SP = r36 + +GR_Parameter_X = r37 +GR_Parameter_Y = r38 +GR_Parameter_RESULT = r39 +GR_Parameter_TAG = r40 + + +FR_X = f10 +FR_Y = f1 +FR_RESULT = f8 + + +FR_COEFF1 = f6 +FR_COEFF2 = f7 +FR_R = f9 +FR_LOG2_10 = f10 + +FR_2P53 = f11 +FR_KF0 = f12 +FR_COEFF3 = f13 +FR_COEFF4 = f14 +FR_UF_LIMIT = f15 + +FR_OF_LIMIT = f32 +FR_DX_L210 = f33 +FR_ROUNDVAL = f34 +FR_KF = f35 + +FR_2_TO_K = f36 +FR_T_low = f37 +FR_T_high = f38 + +FR_P12 = f41 +FR_T_low_K = f42 +FR_T = f44 +FR_P = f45 + +FR_E = f49 +FR_exact_limit = f50 + +FR_int_x = f51 +FR_SNORM_LIMIT = f52 + + +// Data tables +//============================================================== + +RODATA + +.align 16 + +LOCAL_OBJECT_START(poly_coeffs) + +data8 0xd49a784bcd1b8afe, 0x00003fcb // log2(10)*2^(10-63) +data8 0xb17217f7d1cf79ab, 0x00004033 // C_1 * 2^53 +data8 0xf5fdeffc162c7541, 0x00004066 // C_2 * 2^106 +LOCAL_OBJECT_END(poly_coeffs) + + +LOCAL_OBJECT_START(T_table) + +// 2^{0.00000 b6 b7 b8 b9 b10} +data8 0x8000000000000000, 0x8016302f17467628 +data8 0x802c6436d0e04f50, 0x80429c17d77c18ed +data8 0x8058d7d2d5e5f6b0, 0x806f17687707a7af +data8 0x80855ad965e88b83, 0x809ba2264dada76a +data8 0x80b1ed4fd999ab6c, 0x80c83c56b50cf77f +data8 0x80de8f3b8b85a0af, 0x80f4e5ff089f763e +data8 0x810b40a1d81406d4, 0x81219f24a5baa59d +data8 0x813801881d886f7b, 0x814e67cceb90502c +data8 0x8164d1f3bc030773, 0x817b3ffd3b2f2e47 +data8 0x8191b1ea15813bfd, 0x81a827baf7838b78 +data8 0x81bea1708dde6055, 0x81d51f0b8557ec1c +data8 0x81eba08c8ad4536f, 0x820225f44b55b33b +data8 0x8218af4373fc25eb, 0x822f3c7ab205c89a +data8 0x8245cd9ab2cec048, 0x825c62a423d13f0c +data8 0x8272fb97b2a5894c, 0x828998760d01faf3 +data8 0x82a0393fe0bb0ca8, 0x82b6ddf5dbc35906 +// +// 2^{0.b1 b2 b3 b4 b5} +data8 0x8000000000000000, 0x82cd8698ac2ba1d7 +data8 0x85aac367cc487b14, 0x88980e8092da8527 +data8 0x8b95c1e3ea8bd6e6, 0x8ea4398b45cd53c0 +data8 0x91c3d373ab11c336, 0x94f4efa8fef70961 +data8 0x9837f0518db8a96f, 0x9b8d39b9d54e5538 +data8 0x9ef5326091a111ad, 0xa27043030c496818 +data8 0xa5fed6a9b15138ea, 0xa9a15ab4ea7c0ef8 +data8 0xad583eea42a14ac6, 0xb123f581d2ac258f +data8 0xb504f333f9de6484, 0xb8fbaf4762fb9ee9 +data8 0xbd08a39f580c36be, 0xc12c4cca66709456 +data8 0xc5672a115506dadd, 0xc9b9bd866e2f27a2 +data8 0xce248c151f8480e3, 0xd2a81d91f12ae45a +data8 0xd744fccad69d6af4, 0xdbfbb797daf23755 +data8 0xe0ccdeec2a94e111, 0xe5b906e77c8348a8 +data8 0xeac0c6e7dd24392e, 0xefe4b99bdcdaf5cb +data8 0xf5257d152486cc2c, 0xfa83b2db722a033a +LOCAL_OBJECT_END(T_table) + + + +.section .text +GLOBAL_IEEE754_ENTRY(exp10f) + + +{.mfi + alloc r32= ar.pfs, 1, 4, 4, 0 + // will continue only for non-zero normal/denormal numbers + fclass.nm.unc p12, p7= f8, 0x1b + nop.i 0 +} +{.mlx + // GR_TBL_START= pointer to log2(10), C_1...C_4 followed by T_table + addl GR_TBL_START= @ltoff(poly_coeffs), gp + movl GR_ROUNDVAL= 0x3fc00000 // 1.5 (SP) +} +;; + +{.mfi + ld8 GR_COEFF_START= [ GR_TBL_START ] // Load pointer to coeff table + fcmp.lt.s1 p6, p8= f8, f0 // X<0 ? + nop.i 0 +} +;; + +{.mlx + nop.m 0 + movl GR_UF_LIMIT= 0xc2349e35 // (-2^7-22) / log2(10) +} +{.mlx + setf.s FR_ROUNDVAL= GR_ROUNDVAL + movl GR_OF_LIMIT= 0x421a209a // Overflow threshold +} +;; + +{.mlx + ldfe FR_LOG2_10= [ GR_COEFF_START ], 16 // load log2(10)*2^(10-63) + movl GR_SNORM_LIMIT= 0xc217b818 // Smallest normal threshold +} +{.mib + nop.m 0 + nop.i 0 + (p12) br.cond.spnt SPECIAL_exp10 // Branch if nan, inf, zero +} +;; + +{.mfi + setf.s FR_OF_LIMIT= GR_OF_LIMIT // Set overflow limit + fma.s0 f8= f8, f1, f0 // normalize x + nop.i 0 +} +;; + +{.mfi + setf.s FR_SNORM_LIMIT= GR_SNORM_LIMIT // Set smallest normal limit + (p8) fcvt.fx.s1 FR_int_x = f8 // Convert x to integer + nop.i 0 +} +{.mfi + setf.s FR_UF_LIMIT= GR_UF_LIMIT // Set underflow limit + fma.s1 FR_KF0= f8, FR_LOG2_10, FR_ROUNDVAL // y= (x*log2(10)*2^10 + + // 1.5*2^63) * 2^(-63) + mov GR_EXP_CORR= 0xffff-126 +} +;; + +{.mfi + ldfe FR_COEFF1= [ GR_COEFF_START ], 16 // load C_1 + fms.s1 FR_KF= FR_KF0, f1, FR_ROUNDVAL // (K+f)*2^(10-63) + mov GR_MASK= 1023 +} +;; + +{.mfi + ldfe FR_COEFF2= [ GR_COEFF_START ], 16 // load C_2 + nop.f 0 + mov GR_MASK_low= 31 +} +;; + +{.mlx + getf.sig GR_KF0= FR_KF0 // (K+f)*2^10= round_to_int(y) + (p8) movl GR_exact_limit= 0x41200000 // Largest x for exact result, + // +10.0 +} +;; + +{.mfi + add GR_LOG_TBL= 256, GR_COEFF_START // Pointer to high T_table + fcmp.gt.s1 p12, p7= f8, FR_OF_LIMIT // x>overflow threshold ? + nop.i 0 +} +;; + +{.mfi + (p8) setf.s FR_exact_limit = GR_exact_limit // Largest x for exact result + (p8) fcvt.xf FR_int_x = FR_int_x // Integral part of x + shr GR_K= GR_KF0, 10 // K +} +{.mfi + and GR_F_high= GR_MASK, GR_KF0 // f_high*32 + fms.s1 FR_R= f8, FR_LOG2_10, FR_KF // r*2^(-53)= [ x*log2(10)- + // (K+f) ] *2^{10-63} + and GR_F_low= GR_KF0, GR_MASK_low // f_low +} +;; + +{.mmi + shladd GR_Flow_ADDR= GR_F_low, 3, GR_COEFF_START // address of 2^{f_low} + add GR_BIAS= GR_K, GR_EXP_CORR // K= bias-2*63 + shr GR_Fh= GR_F_high, 5 // f_high +} +;; + +{.mfi + setf.exp FR_2_TO_K= GR_BIAS // 2^{K-126} + (p7) fcmp.lt.s1 p12, p7= f8, FR_UF_LIMIT // x= 0), +// and |r|<2^{-9} +// T is a table that stores 2^f (256 entries) rounded to +// double extended precision (only mantissa is stored) +// D stores (2^f/T [ f ] - 1), rounded to single precision +// +// 10^x is approximated as +// 2^K * T [ f ] * ((1+c1*r+c2*r^2+...+c6*r^6)*(1+c1*e)+D [ f ] ), +// where e= log2(10)_lo*x+(log2(10)_hi*x-RN(log2(10)_hi*x)) +// + + + +// Special values +//============================================================== +// exp10(0)= 1 +// exp10(+inf)= inf +// exp10(-inf)= 0 +// + + +// Registers used +//============================================================== +// f6-f15, f32-f63 +// r14-r30, r32-r40 +// p6-p8, p11-p14 +// + + + FR_X = f10 + FR_Y = f1 + FR_RESULT = f8 + + FR_COEFF1 = f6 + FR_COEFF2 = f7 + FR_KF0 = f9 + FR_LOG10 = f10 + FR_CONST1 = f11 + FR_XL10 = f12 + FR_COEFF3 = f13 + FR_COEFF4 = f14 + FR_UF_TEST = f15 + FR_OF_TEST = f32 + FR_L10_LOW = f33 + FR_COEFF5 = f34 + FR_COEFF6 = f35 + FR_L10 = f36 + FR_C_L10 = f37 + FR_XL10_H = f38 + FR_XL10_L = f39 + FR_KF = f40 + FR_E = f41 + FR_T = f42 + FR_D = f43 + FR_EXP_M_63 = f44 + FR_R = f45 + FR_E1 = f46 + FR_COEFF2 = f47 + FR_P34 = f48 + FR_P56 = f49 + FR_R2 = f50 + FR_RE = f51 + FR_D1 = f52 + FR_P36 = f53 + FR_R3E = f54 + FR_P1 = f55 + FR_P = f56 + FR_T1 = f57 + FR_XINT = f58 + FR_XINTF = f59 + FR_4 = f60 + FR_28 = f61 + FR_32 = f62 + FR_SNORM_LIMIT = f63 + + + GR_ADDR0 = r14 + GR_D_ADDR = r15 + GR_ADDR = r16 + GR_B63 = r17 + GR_KBITS = r18 + GR_F = r19 + GR_K = r20 + GR_D = r21 + GR_BM63 = r22 + GR_T = r23 + GR_CONST1 = r24 + GR_EMIN = r25 + GR_CONST2 = r26 + GR_BM8 = r27 + GR_SREG = r28 + GR_4_BIAS = r29 + GR_32_BIAS = r30 + + GR_SAVE_B0 = r33 + GR_SAVE_PFS = r34 + GR_SAVE_GP = r35 + GR_SAVE_SP = r36 + + GR_Parameter_X = r37 + GR_Parameter_Y = r38 + GR_Parameter_RESULT= r39 + GR_Parameter_TAG = r40 + + +// Data tables +//============================================================== + +RODATA + +.align 16 + +LOCAL_OBJECT_START(poly_coeffs) + + data8 0xd49a784bcd1b8afe, 0x00004008 // log2(10)*2^8 + data8 0x9a209a84fbcff798, 0x0000400b // overflow threshold + data8 0xb17217f7d1cf79ab, 0x00003ffe // C_1 + data8 0xf5fdeffc162c7541, 0x00003ffc // C_2 + data8 0x3fac6b08d704a0c0 // C_3 + data8 0x3f83b2ab6fba4e77 // C_4 + data8 0x3f55d87fe78a6731 // C_5 + data8 0x3f2430912f86c787 // C_6 + data8 0x9257edfe9b5fb698, 0x00003fbf // log2(10)_low (bits 64...127) + data8 0x9a1bc98027a81918, 0x0000c00b // Smallest normal threshold +LOCAL_OBJECT_END(poly_coeffs) + + +LOCAL_OBJECT_START(T_table) + + // 2^{0.b1 b2 b3 b4 b5 b6 b7 b8} + data8 0x8000000000000000, 0x8058d7d2d5e5f6b1 + data8 0x80b1ed4fd999ab6c, 0x810b40a1d81406d4 + data8 0x8164d1f3bc030773, 0x81bea1708dde6056 + data8 0x8218af4373fc25ec, 0x8272fb97b2a5894c + data8 0x82cd8698ac2ba1d7, 0x83285071e0fc4547 + data8 0x8383594eefb6ee37, 0x83dea15b9541b132 + data8 0x843a28c3acde4046, 0x8495efb3303efd30 + data8 0x84f1f656379c1a29, 0x854e3cd8f9c8c95d + data8 0x85aac367cc487b15, 0x86078a2f23642a9f + data8 0x8664915b923fba04, 0x86c1d919caef5c88 + data8 0x871f61969e8d1010, 0x877d2afefd4e256c + data8 0x87db357ff698d792, 0x88398146b919f1d4 + data8 0x88980e8092da8527, 0x88f6dd5af155ac6b + data8 0x8955ee03618e5fdd, 0x89b540a7902557a4 + data8 0x8a14d575496efd9a, 0x8a74ac9a79896e47 + data8 0x8ad4c6452c728924, 0x8b3522a38e1e1032 + data8 0x8b95c1e3ea8bd6e7, 0x8bf6a434adde0085 + data8 0x8c57c9c4646f4dde, 0x8cb932c1bae97a95 + data8 0x8d1adf5b7e5ba9e6, 0x8d7ccfc09c50e2f8 + data8 0x8ddf042022e69cd6, 0x8e417ca940e35a01 + data8 0x8ea4398b45cd53c0, 0x8f073af5a2013520 + data8 0x8f6a8117e6c8e5c4, 0x8fce0c21c6726481 + data8 0x9031dc431466b1dc, 0x9095f1abc540ca6b + data8 0x90fa4c8beee4b12b, 0x915eed13c89689d3 + data8 0x91c3d373ab11c336, 0x9228ffdc10a051ad + data8 0x928e727d9531f9ac, 0x92f42b88f673aa7c + data8 0x935a2b2f13e6e92c, 0x93c071a0eef94bc1 + data8 0x9426ff0fab1c04b6, 0x948dd3ac8ddb7ed3 + data8 0x94f4efa8fef70961, 0x955c5336887894d5 + data8 0x95c3fe86d6cc7fef, 0x962bf1cbb8d97560 + data8 0x96942d3720185a00, 0x96fcb0fb20ac4ba3 + data8 0x97657d49f17ab08e, 0x97ce9255ec4357ab + data8 0x9837f0518db8a96f, 0x98a1976f7597e996 + data8 0x990b87e266c189aa, 0x9975c1dd47518c77 + data8 0x99e0459320b7fa65, 0x9a4b13371fd166ca + data8 0x9ab62afc94ff864a, 0x9b218d16f441d63d + data8 0x9b8d39b9d54e5539, 0x9bf93118f3aa4cc1 + data8 0x9c6573682ec32c2d, 0x9cd200db8a0774cb + data8 0x9d3ed9a72cffb751, 0x9dabfdff6367a2aa + data8 0x9e196e189d472420, 0x9e872a276f0b98ff + data8 0x9ef5326091a111ae, 0x9f6386f8e28ba651 + data8 0x9fd228256400dd06, 0xa041161b3d0121be + data8 0xa0b0510fb9714fc2, 0xa11fd9384a344cf7 + data8 0xa18faeca8544b6e4, 0xa1ffd1fc25cea188 + data8 0xa27043030c496819, 0xa2e102153e918f9e + data8 0xa3520f68e802bb93, 0xa3c36b345991b47c + data8 0xa43515ae09e6809e, 0xa4a70f0c95768ec5 + data8 0xa5195786be9ef339, 0xa58bef536dbeb6ee + data8 0xa5fed6a9b15138ea, 0xa6720dc0be08a20c + data8 0xa6e594cfeee86b1e, 0xa7596c0ec55ff55b + data8 0xa7cd93b4e965356a, 0xa8420bfa298f70d1 + data8 0xa8b6d5167b320e09, 0xa92bef41fa77771b + data8 0xa9a15ab4ea7c0ef8, 0xaa1717a7b5693979 + data8 0xaa8d2652ec907629, 0xab0386ef48868de1 + data8 0xab7a39b5a93ed337, 0xabf13edf162675e9 + data8 0xac6896a4be3fe929, 0xace0413ff83e5d04 + data8 0xad583eea42a14ac6, 0xadd08fdd43d01491 + data8 0xae493452ca35b80e, 0xaec22c84cc5c9465 + data8 0xaf3b78ad690a4375, 0xafb51906e75b8661 + data8 0xb02f0dcbb6e04584, 0xb0a957366fb7a3c9 + data8 0xb123f581d2ac2590, 0xb19ee8e8c94feb09 + data8 0xb21a31a66618fe3b, 0xb295cff5e47db4a4 + data8 0xb311c412a9112489, 0xb38e0e38419fae18 + data8 0xb40aaea2654b9841, 0xb487a58cf4a9c180 + data8 0xb504f333f9de6484, 0xb58297d3a8b9f0d2 + data8 0xb60093a85ed5f76c, 0xb67ee6eea3b22b8f + data8 0xb6fd91e328d17791, 0xb77c94c2c9d725e9 + data8 0xb7fbefca8ca41e7c, 0xb87ba337a1743834 + data8 0xb8fbaf4762fb9ee9, 0xb97c143756844dbf + data8 0xb9fcd2452c0b9deb, 0xba7de9aebe5fea09 + data8 0xbaff5ab2133e45fb, 0xbb81258d5b704b6f + data8 0xbc034a7ef2e9fb0d, 0xbc85c9c560e7b269 + data8 0xbd08a39f580c36bf, 0xbd8bd84bb67ed483 + data8 0xbe0f6809860993e2, 0xbe935317fc378238 + data8 0xbf1799b67a731083, 0xbf9c3c248e2486f8 + data8 0xc0213aa1f0d08db0, 0xc0a6956e8836ca8d + data8 0xc12c4cca66709456, 0xc1b260f5ca0fbb33 + data8 0xc238d2311e3d6673, 0xc2bfa0bcfad907c9 + data8 0xc346ccda24976407, 0xc3ce56c98d21b15d + data8 0xc4563ecc5334cb33, 0xc4de8523c2c07baa + data8 0xc5672a115506dadd, 0xc5f02dd6b0bbc3d9 + data8 0xc67990b5aa245f79, 0xc70352f04336c51e + data8 0xc78d74c8abb9b15d, 0xc817f681416452b2 + data8 0xc8a2d85c8ffe2c45, 0xc92e1a9d517f0ecc + data8 0xc9b9bd866e2f27a3, 0xca45c15afcc72624 + data8 0xcad2265e4290774e, 0xcb5eecd3b38597c9 + data8 0xcbec14fef2727c5d, 0xcc799f23d11510e5 + data8 0xcd078b86503dcdd2, 0xcd95da6a9ff06445 + data8 0xce248c151f8480e4, 0xceb3a0ca5dc6a55d + data8 0xcf4318cf191918c1, 0xcfd2f4683f94eeb5 + data8 0xd06333daef2b2595, 0xd0f3d76c75c5db8d + data8 0xd184df6251699ac6, 0xd2164c023056bcab + data8 0xd2a81d91f12ae45a, 0xd33a5457a3029054 + data8 0xd3ccf099859ac379, 0xd45ff29e0972c561 + data8 0xd4f35aabcfedfa1f, 0xd5872909ab75d18a + data8 0xd61b5dfe9f9bce07, 0xd6aff9d1e13ba2fe + data8 0xd744fccad69d6af4, 0xd7da67311797f56a + data8 0xd870394c6db32c84, 0xd9067364d44a929c + data8 0xd99d15c278afd7b6, 0xda3420adba4d8704 + data8 0xdacb946f2ac9cc72, 0xdb63714f8e295255 + data8 0xdbfbb797daf23755, 0xdc9467913a4f1c92 + data8 0xdd2d818508324c20, 0xddc705bcd378f7f0 + data8 0xde60f4825e0e9124, 0xdefb4e1f9d1037f2 + data8 0xdf9612deb8f04420, 0xe031430a0d99e627 + data8 0xe0ccdeec2a94e111, 0xe168e6cfd3295d23 + data8 0xe2055afffe83d369, 0xe2a23bc7d7d91226 + data8 0xe33f8972be8a5a51, 0xe3dd444c46499619 + data8 0xe47b6ca0373da88d, 0xe51a02ba8e26d681 + data8 0xe5b906e77c8348a8, 0xe658797368b3a717 + data8 0xe6f85aaaee1fce22, 0xe798aadadd5b9cbf + data8 0xe8396a503c4bdc68, 0xe8da9958464b42ab + data8 0xe97c38406c4f8c57, 0xea1e4756550eb27b + data8 0xeac0c6e7dd24392f, 0xeb63b74317369840 + data8 0xec0718b64c1cbddc, 0xecaaeb8ffb03ab41 + data8 0xed4f301ed9942b84, 0xedf3e6b1d418a491 + data8 0xee990f980da3025b, 0xef3eab20e032bc6b + data8 0xefe4b99bdcdaf5cb, 0xf08b3b58cbe8b76a + data8 0xf13230a7ad094509, 0xf1d999d8b7708cc1 + data8 0xf281773c59ffb13a, 0xf329c9233b6bae9c + data8 0xf3d28fde3a641a5b, 0xf47bcbbe6db9fddf + data8 0xf5257d152486cc2c, 0xf5cfa433e6537290 + data8 0xf67a416c733f846e, 0xf7255510c4288239 + data8 0xf7d0df730ad13bb9, 0xf87ce0e5b2094d9c + data8 0xf92959bb5dd4ba74, 0xf9d64a46eb939f35 + data8 0xfa83b2db722a033a, 0xfb3193cc4227c3f4 + data8 0xfbdfed6ce5f09c49, 0xfc8ec01121e447bb + data8 0xfd3e0c0cf486c175, 0xfdedd1b496a89f35 + data8 0xfe9e115c7b8f884c, 0xff4ecb59511ec8a5 +LOCAL_OBJECT_END(T_table) + + +LOCAL_OBJECT_START(D_table) + data4 0x00000000, 0x9f55c08f, 0x1e93ffa3, 0x1dcd43a8 + data4 0x1f751f79, 0x9f3cdd88, 0x9f43d155, 0x1eda222c + data4 0x1ef35513, 0x9f597895, 0x9e698881, 0x1ec71073 + data4 0x1e50e371, 0x9dc01e19, 0x1de74133, 0x1e2f028c + data4 0x9edefb47, 0x1ebbac48, 0x9e8b0330, 0x9e9e9314 + data4 0x1edc1d11, 0x1f098529, 0x9f52827c, 0x1f50050d + data4 0x1f301e8e, 0x1f5b64d1, 0x9f45e3ee, 0x9ef64d6d + data4 0x1d6ec5e8, 0x9e61ad9a, 0x1d44ccbb, 0x9e4a8bbb + data4 0x9cf11576, 0x9dcce7e7, 0x9d02ac90, 0x1f26ccf0 + data4 0x9f0877c6, 0x9ddd62ae, 0x9f4b7fc3, 0x1ea8ef6b + data4 0x1ea4378d, 0x1ef6fc38, 0x1db99fd9, 0x1f22bf6f + data4 0x1f53e172, 0x1e85504a, 0x9f37cc75, 0x1f0c5e17 + data4 0x1dde8aac, 0x9cb42bb2, 0x1e153cd7, 0x1eb62bba + data4 0x9e9b941b, 0x9ea80e3c, 0x1f508823, 0x1ec3fd36 + data4 0x1e9ffaa1, 0x1e21e2eb, 0x9d948b1d, 0x9e8ac93a + data4 0x1ef7ee6f, 0x9e80dda3, 0x1f0814be, 0x1dc5ddfe + data4 0x1eedb9d1, 0x9f2aaa26, 0x9ea5b0fc, 0x1edf702e + data4 0x9e391201, 0x1f1316bb, 0x1ea27fb7, 0x9e05ed18 + data4 0x9f199ed2, 0x1ee7fd7c, 0x1f003db6, 0x9eac3793 + data4 0x9e5b8c10, 0x9f3af17c, 0x1bc9a8be, 0x1ee3c004 + data4 0x9f19b1b2, 0x9f242ce9, 0x9ce67dd1, 0x9e4f6275 + data4 0x1e20742c, 0x1eb9328a, 0x9f477153, 0x1d969718 + data4 0x9f1e6c43, 0x1f2f67f4, 0x9f39c7e4, 0x9e3c4feb + data4 0x1da3956b, 0x9e7c685d, 0x1f280911, 0x9f0d8afb + data4 0x1e314b40, 0x9eb4f250, 0x9f1a34ad, 0x1ef5d5e7 + data4 0x9f145496, 0x1e604827, 0x9f1e5195, 0x1e9c1fc0 + data4 0x1efde521, 0x1e69b385, 0x1f316830, 0x9f244eae + data4 0x1f1787ec, 0x9e939971, 0x1f0bb393, 0x9f0511d6 + data4 0x1ed919de, 0x1d8b7b28, 0x1e5ca4a9, 0x1e7c357b + data4 0x9e3ff8e8, 0x1eef53b5, 0x9ed22ed7, 0x1f16659b + data4 0x9f2db102, 0x9e2c6a78, 0x1f328d7d, 0x9f2fec3c + data4 0x1eb395bd, 0x9f242b84, 0x9e2683e6, 0x1ed71e68 + data4 0x1efd1df5, 0x9e9eeafd, 0x9ed2249c, 0x1eef129a + data4 0x1d1ea44c, 0x9e81f7ff, 0x1eaf77c9, 0x9ee7a285 + data4 0x1e1864ed, 0x9ee7edbb, 0x9e15a27d, 0x9ae61655 + data4 0x1f1ff1a2, 0x1da29755, 0x9e5f46fb, 0x1e901236 + data4 0x9eecfb9b, 0x9f204d2f, 0x1ec64685, 0x9eb809bd + data4 0x9e0026c5, 0x1d9f1da1, 0x1f142b49, 0x9f20f22e + data4 0x1f24b067, 0x1f185a4c, 0x9f09765c, 0x9ece902f + data4 0x1e2ca5db, 0x1e6de464, 0x9f071f67, 0x1f1518c3 + data4 0x1ea13ded, 0x1f0b8414, 0x1edb6ad4, 0x9e548740 + data4 0x9ea10efb, 0x1ee48a60, 0x1e7954c5, 0x9edad013 + data4 0x9f21517d, 0x9e9b6e0c, 0x9ee7f9a6, 0x9ebd4298 + data4 0x9d65b24e, 0x1eed751f, 0x9f1573ea, 0x9d430377 + data4 0x9e13fc0c, 0x1e47008a, 0x1e3d5c1d, 0x1ef41a91 + data4 0x9e4a4ef7, 0x9e952f18, 0x1d620566, 0x1d9b8d33 + data4 0x1db06247, 0x1e94b31e, 0x1f0730ad, 0x9d79ffb4 + data4 0x1ed64d51, 0x9e91fd11, 0x9e28d35a, 0x9dea0ed9 + data4 0x1e891def, 0x9ee28ac0, 0x1e1db99b, 0x9ee1ce38 + data4 0x9bdd9bca, 0x1eb72cb9, 0x9e8c53c6, 0x1e0df6ca + data4 0x1e8f2ccd, 0x9e9b0886, 0x1eeb3bc7, 0x1ec7e772 + data4 0x9e210776, 0x9daf246c, 0x1ea1f151, 0x1ece4dc6 + data4 0x1ce741c8, 0x1ed3c88f, 0x9ec9a4fd, 0x9e0c8d30 + data4 0x1d2fbb26, 0x9ef212a7, 0x1ee44f1c, 0x9e445550 + data4 0x1e075f77, 0x9d9291a3, 0x1f09c2ee, 0x9e012c88 + data4 0x1f057d62, 0x9e7bb0dc, 0x9d8758ee, 0x1ee8d6c1 + data4 0x9e509a57, 0x9e4ca7b7, 0x1e2cb341, 0x9ec35106 + data4 0x1ecf3baf, 0x1e11781c, 0x1ea0cc78, 0x1eb75ca6 + data4 0x1e961e1a, 0x1eb88853, 0x1e7abf50, 0x1ee38704 + data4 0x9dc5ab0f, 0x1afe197b, 0x9ec07523, 0x9d9b7f78 + data4 0x1f011618, 0x1ed43b0b, 0x9f035945, 0x9e3fd014 + data4 0x9bbda5cd, 0x9e83f8ab, 0x1e58a928, 0x1e392d61 + data4 0x1efdbb52, 0x1ee310a8, 0x9ec7ecc1, 0x1e8c9ed6 + data4 0x9ef82dee, 0x9e70545b, 0x9ea53fc4, 0x1e40f419 +LOCAL_OBJECT_END(D_table) + + + +.section .text +GLOBAL_IEEE754_ENTRY(exp10l) + +{.mfi + alloc GR_SREG = ar.pfs, 1, 4, 4, 0 + // will continue only for normal/denormal numbers + fclass.nm.unc p12, p7 = f8, 0x1b + // GR_ADDR0 = pointer to log2(10), C_1...C_6 followed by T_table + addl GR_ADDR0 = @ltoff(poly_coeffs), gp ;; +} + +{.mfi + // load start address for C_1...C_6 followed by T_table + ld8 GR_ADDR0 = [ GR_ADDR0 ] + // X<0 ? + fcmp.lt.s1 p6, p8 = f8, f0 + // GR_BM8 = bias-8 + mov GR_BM8 = 0xffff-8 +} +{.mlx + nop.m 0 + // GR_EMIN = (-2^14-62)*2^{8} + movl GR_EMIN = 0xca807c00 ;; +} + +{.mmb + // FR_CONST1 = 2^{-8} + setf.exp FR_CONST1 = GR_BM8 + // load log2(10)*2^8 + ldfe FR_LOG10 = [ GR_ADDR0 ], 16 + (p12) br.cond.spnt SPECIAL_EXP10 ;; +} + +{.mmf + setf.s FR_UF_TEST = GR_EMIN + // load overflow threshold + ldfe FR_OF_TEST = [ GR_ADDR0 ], 16 + // normalize x + fma.s0 f8 = f8, f1, f0 ;; +} + +{.mmi + // load C_1 + ldfe FR_COEFF1 = [ GR_ADDR0 ], 16 ;; + // load C_2 + ldfe FR_COEFF2 = [ GR_ADDR0 ], 16 + nop.i 0 ;; +} + +{.mmf + // GR_D_ADDR = pointer to D table + add GR_D_ADDR = 2048-64+96+32, GR_ADDR0 + // load C_3, C_4 + ldfpd FR_COEFF3, FR_COEFF4 = [ GR_ADDR0 ], 16 + // y = x*log2(10)*2^8 + fma.s1 FR_XL10 = f8, FR_LOG10, f0 ;; +} + +{.mfi + // load C_5, C_6 + ldfpd FR_COEFF5, FR_COEFF6 = [ GR_ADDR0 ], 16 + // get int(x) + fcvt.fx.trunc.s1 FR_XINT = f8 + nop.i 0 +} +{.mfi + nop.m 0 + // FR_LOG10 = log2(10) + fma.s1 FR_L10 = FR_LOG10, FR_CONST1, f0 + nop.i 0 ;; +} + +{.mfi + // load log2(10)_low + ldfe FR_L10_LOW = [ GR_ADDR0 ], 16 + // y0 = x*log2(10) = x*log2(10)_hi + fma.s1 FR_LOG10 = f8, FR_L10, f0 + mov GR_EMIN = 0xffff-63 +} +{.mfi + mov GR_32_BIAS = 0xffff + 5 + // (K+f)*2^8 = round_to_int(y) + fcvt.fx.s1 FR_KF0 = FR_XL10 + mov GR_4_BIAS = 0xffff + 2;; +} + +{.mfi + // load smallest normal limit + ldfe FR_SNORM_LIMIT = [ GR_ADDR0 ], 16 + // x>overflow threshold ? + fcmp.gt.s1 p12, p7 = f8, FR_OF_TEST + nop.i 0 ;; +} + +{.mfi + setf.exp FR_32 = GR_32_BIAS + // x= smallest normal limit + fcmp.ge.s1 p11, p0 = f8, FR_SNORM_LIMIT + nop.i 0 ;; +} + +{.mfi + nop.m 0 + // P36 = P34+r2*P56 + fma.s1 FR_COEFF4 = FR_COEFF5, FR_COEFF3, FR_COEFF4 + nop.i 0 +} +{.mfi + nop.m 0 + // GR_D_ADDR = r'*r2 + fma.s1 FR_COEFF3 = FR_COEFF3, FR_KF0, f0 + nop.i 0 ;; +} + +{.mfi + nop.m 0 + // is input below 28.0 ? + (p13) fcmp.lt.s1 p13, p14 = f8, FR_28 + nop.i 0 +} +{.mfi + nop.m 0 + // P' = P12*r'+D' + fma.s1 FR_COEFF2 = FR_COEFF2, FR_KF0, FR_OF_TEST + nop.i 0 ;; +} + +{.mfi + nop.m 0 + // P = P'+r3*P36 + fma.s1 FR_COEFF3 = FR_COEFF3, FR_COEFF4, FR_COEFF2 + nop.i 0 +} +{.mfi + nop.m 0 + // T = 2^{K-63}*T + fma.s1 FR_UF_TEST = FR_UF_TEST, FR_XL10, f0 + nop.i 0 ;; +} + +.pred.rel "mutex",p13,p14 +{.mfi + nop.m 0 + (p13) fma.s1 f8 = FR_COEFF3, FR_UF_TEST, FR_UF_TEST + nop.i 0 +} +{.mfb + nop.m 0 + // result = T+T*P + (p14) fma.s0 f8 = FR_COEFF3, FR_UF_TEST, FR_UF_TEST + // return + (p11) br.ret.sptk b0 ;; // return, if result normal +} + +// Here if result in denormal range (and not zero) +{.mib + nop.m 0 + mov GR_Parameter_TAG= 264 + br.cond.sptk __libm_error_region // Branch to error handling +} +;; + +SPECIAL_EXP10: + +{.mfi + nop.m 0 + // x = -Infinity ? + fclass.m p6, p0 = f8, 0x22 + nop.i 0 ;; +} + +{.mfi + nop.m 0 + // x = +Infinity ? + fclass.m p7, p0 = f8, 0x21 + nop.i 0 ;; +} + +{.mfi + nop.m 0 + // x = +/-Zero ? + fclass.m p8, p0 = f8, 0x7 + nop.i 0 +} +{.mfb + nop.m 0 + // exp10(-Infinity) = 0 + (p6) mov f8 = f0 + (p6) br.ret.spnt b0 ;; +} + +{.mfb + nop.m 0 + // exp10(+Infinity) = +Infinity + nop.f 0 + (p7) br.ret.spnt b0 ;; +} + +{.mfb + nop.m 0 + // exp10(+/-0) = 1 + (p8) mov f8 = f1 + (p8) br.ret.spnt b0 ;; +} + +{.mfb + nop.m 0 + // Remaining cases: NaNs + fma.s0 f8 = f8, f1, f0 + br.ret.sptk b0 ;; +} + + +OUT_RANGE_EXP10: + +// underflow: p6 = 1 +// overflow: p8 = 1 + +.pred.rel "mutex",p6,p8 +{.mmi + (p8) mov GR_CONST1 = 0x1fffe + (p6) mov GR_CONST1 = 1 + nop.i 0 +} +;; + +{.mii + setf.exp FR_KF0 = GR_CONST1 + (p8) mov GR_Parameter_TAG = 165 + (p6) mov GR_Parameter_TAG = 264 +} +;; + +{.mfb + nop.m 999 + fma.s0 f8 = FR_KF0, FR_KF0, f0 // Create overflow/underflow + br.cond.sptk __libm_error_region // Branch to error handling +} +;; + +GLOBAL_IEEE754_END(exp10l) +weak_alias (exp10l, pow10l) + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{.mfi + add GR_Parameter_Y = -32, sp // Parameter 2 value + nop.f 0 +.save ar.pfs, GR_SAVE_PFS + mov GR_SAVE_PFS = ar.pfs // Save ar.pfs +} + +{.mfi +.fframe 64 + add sp = -64, sp // Create new stack + nop.f 0 + mov GR_SAVE_GP = gp ;; // Save gp +} + +{.mmi + stfe [ GR_Parameter_Y ] = FR_Y, 16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16, sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0 = b0 ;; // Save b0 +} + +.body +{.mib + stfe [ GR_Parameter_X ] = FR_X // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0, GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{.mib + stfe [ GR_Parameter_Y ] = FR_RESULT // STORE Parameter 3 on stack + add GR_Parameter_Y = -16, GR_Parameter_Y + br.call.sptk b0 = __libm_error_support# ;; // Call error handling function +} + +{.mmi + add GR_Parameter_RESULT = 48, sp + nop.m 0 + nop.i 0 ;; +} + +{.mmi + ldfe f8 = [ GR_Parameter_RESULT ] // Get return result off stack +.restore sp + add sp = 64, sp // Restore stack pointer + mov b0 = GR_SAVE_B0 ;; // Restore return address +} + +{.mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 ;; // Return +} + + +LOCAL_LIBM_END(__libm_error_region) +.type __libm_error_support#, @function +.global __libm_error_support# + diff --git a/sysdeps/ia64/fpu/e_exp2.S b/sysdeps/ia64/fpu/e_exp2.S new file mode 100644 index 0000000000..54f652e384 --- /dev/null +++ b/sysdeps/ia64/fpu/e_exp2.S @@ -0,0 +1,564 @@ +.file "exp2.s" + + +// Copyright (c) 2000 - 2005, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 08/25/00 Initial version +// 05/20/02 Cleaned up namespace and sf0 syntax +// 09/05/02 Improved performance +// 01/17/03 Fixed to call error support when x=1024.0 +// 03/31/05 Reformatted delimiters between data tables +// +// API +//============================================================== +// double exp2(double) +// +// Overview of operation +//============================================================== +// Background +// +// Implementation +// +// Let x= (K + fh + fl + r), where +// K is an integer, fh= 0.b1 b2 b3 b4 b5, +// fl= 2^{-5}* 0.b6 b7 b8 b8 b10 (fh, fl >= 0), +// and |r|<2^{-11} +// Th is a table that stores 2^fh (32 entries) rounded to +// double extended precision (only mantissa is stored) +// Tl is a table that stores 2^fl (32 entries) rounded to +// double extended precision (only mantissa is stored) +// +// 2^x is approximated as +// 2^K * Th [ f ] * Tl [ f ] * (1+c1*r+c2*r^2+c3*r^3+c4*r^4) + +// Note: We use the following trick to speed up conversion from FP to integer: +// +// Let x = K + r, where K is an integer, and |r| <= 0.5 +// Let N be the number of significand bits for the FP format used +// ( N=64 for double-extended, N=53 for double) +// +// Then let y = 1.5 * 2^(N-1) + x for RN mode +// K = y - 1.5 * 2^(N-1) +// r = x - K +// +// If we want to obtain the integer part and the first m fractional bits of x, +// we can use the same trick, but with a constant of 1.5 * 2^(N-1-m): +// +// Let x = K + f + r +// f = 0.b_1 b_2 ... b_m +// |r| <= 2^(-m-1) +// +// Then let y = 1.5 * 2^(N-1-m) + x for RN mode +// (K+f) = y - 1.5 * 2^(N-1-m) +// r = x - K + + +// Special values +//============================================================== +// exp2(0)= 1 +// exp2(+inf)= inf +// exp2(-inf)= 0 +// + +// Registers used +//============================================================== +// r2-r3, r14-r40 +// f6-f15, f32-f45 +// p6-p8, p12 +// + + +GR_TBL_START = r2 +GR_LOG_TBL = r3 + +GR_OF_LIMIT = r14 +GR_UF_LIMIT = r15 +GR_EXP_CORR = r16 +GR_F_low = r17 +GR_F_high = r18 +GR_K = r19 +GR_Flow_ADDR = r20 + +GR_BIAS = r21 +GR_Fh = r22 +GR_Fh_ADDR = r23 +GR_EXPMAX = r24 +GR_EMIN = r25 + +GR_ROUNDVAL = r26 +GR_MASK = r27 +GR_KF0 = r28 +GR_MASK_low = r29 +GR_COEFF_START = r30 + +GR_SAVE_B0 = r33 +GR_SAVE_PFS = r34 +GR_SAVE_GP = r35 +GR_SAVE_SP = r36 + +GR_Parameter_X = r37 +GR_Parameter_Y = r38 +GR_Parameter_RESULT = r39 +GR_Parameter_TAG = r40 + + +FR_X = f10 +FR_Y = f1 +FR_RESULT = f8 + + +FR_COEFF1 = f6 +FR_COEFF2 = f7 +FR_R = f9 + +FR_KF0 = f12 +FR_COEFF3 = f13 +FR_COEFF4 = f14 +FR_UF_LIMIT = f15 + +FR_OF_LIMIT = f32 +FR_EXPMIN = f33 +FR_ROUNDVAL = f34 +FR_KF = f35 + +FR_2_TO_K = f36 +FR_T_low = f37 +FR_T_high = f38 +FR_P34 = f39 +FR_R2 = f40 + +FR_P12 = f41 +FR_T_low_K = f42 +FR_P14 = f43 +FR_T = f44 +FR_P = f45 + + +// Data tables +//============================================================== + +RODATA + +.align 16 + +LOCAL_OBJECT_START(poly_coeffs) + +data8 0x3fac6b08d704a0c0, 0x3f83b2ab6fba4e77 // C_3 and C_4 +data8 0xb17217f7d1cf79ab, 0x00003ffe // C_1 +data8 0xf5fdeffc162c7541, 0x00003ffc // C_2 +LOCAL_OBJECT_END(poly_coeffs) + + +LOCAL_OBJECT_START(T_table) + +// 2^{0.00000 b6 b7 b8 b9 b10} +data8 0x8000000000000000, 0x8016302f17467628 +data8 0x802c6436d0e04f50, 0x80429c17d77c18ed +data8 0x8058d7d2d5e5f6b0, 0x806f17687707a7af +data8 0x80855ad965e88b83, 0x809ba2264dada76a +data8 0x80b1ed4fd999ab6c, 0x80c83c56b50cf77f +data8 0x80de8f3b8b85a0af, 0x80f4e5ff089f763e +data8 0x810b40a1d81406d4, 0x81219f24a5baa59d +data8 0x813801881d886f7b, 0x814e67cceb90502c +data8 0x8164d1f3bc030773, 0x817b3ffd3b2f2e47 +data8 0x8191b1ea15813bfd, 0x81a827baf7838b78 +data8 0x81bea1708dde6055, 0x81d51f0b8557ec1c +data8 0x81eba08c8ad4536f, 0x820225f44b55b33b +data8 0x8218af4373fc25eb, 0x822f3c7ab205c89a +data8 0x8245cd9ab2cec048, 0x825c62a423d13f0c +data8 0x8272fb97b2a5894c, 0x828998760d01faf3 +data8 0x82a0393fe0bb0ca8, 0x82b6ddf5dbc35906 +// +// 2^{0.b1 b2 b3 b4 b5} +data8 0x8000000000000000, 0x82cd8698ac2ba1d7 +data8 0x85aac367cc487b14, 0x88980e8092da8527 +data8 0x8b95c1e3ea8bd6e6, 0x8ea4398b45cd53c0 +data8 0x91c3d373ab11c336, 0x94f4efa8fef70961 +data8 0x9837f0518db8a96f, 0x9b8d39b9d54e5538 +data8 0x9ef5326091a111ad, 0xa27043030c496818 +data8 0xa5fed6a9b15138ea, 0xa9a15ab4ea7c0ef8 +data8 0xad583eea42a14ac6, 0xb123f581d2ac258f +data8 0xb504f333f9de6484, 0xb8fbaf4762fb9ee9 +data8 0xbd08a39f580c36be, 0xc12c4cca66709456 +data8 0xc5672a115506dadd, 0xc9b9bd866e2f27a2 +data8 0xce248c151f8480e3, 0xd2a81d91f12ae45a +data8 0xd744fccad69d6af4, 0xdbfbb797daf23755 +data8 0xe0ccdeec2a94e111, 0xe5b906e77c8348a8 +data8 0xeac0c6e7dd24392e, 0xefe4b99bdcdaf5cb +data8 0xf5257d152486cc2c, 0xfa83b2db722a033a +LOCAL_OBJECT_END(T_table) + + + +.section .text +GLOBAL_LIBM_ENTRY(exp2) + + +{.mfi + alloc r32= ar.pfs, 1, 4, 4, 0 + // will continue only for non-zero normal/denormal numbers + fclass.nm p12, p0= f8, 0x1b + // GR_TBL_START= pointer to C_1...C_4 followed by T_table + addl GR_TBL_START= @ltoff(poly_coeffs), gp +} +{.mlx + mov GR_OF_LIMIT= 0xffff + 10 // Exponent of overflow limit + movl GR_ROUNDVAL= 0x5a400000 // 1.5*2^(63-10) (SP) +} +;; + +// Form special constant 1.5*2^(63-10) to give integer part and first 10 +// fractional bits of x +{.mfi + setf.s FR_ROUNDVAL= GR_ROUNDVAL // Form special constant + fcmp.lt.s1 p6, p8= f8, f0 // X<0 ? + nop.i 0 +} +{.mfb + ld8 GR_COEFF_START= [ GR_TBL_START ] // Load pointer to coeff table + nop.f 0 + (p12) br.cond.spnt SPECIAL_exp2 // Branch if nan, inf, zero +} +;; + +{.mlx + setf.exp FR_OF_LIMIT= GR_OF_LIMIT // Set overflow limit + movl GR_UF_LIMIT= 0xc4866000 // (-2^10-51) = -1075 +} +;; + +{.mfi + ldfpd FR_COEFF3, FR_COEFF4= [ GR_COEFF_START ], 16 // load C_3, C_4 + fma.s0 f8= f8, f1, f0 // normalize x + nop.i 0 +} +;; + +{.mmi + setf.s FR_UF_LIMIT= GR_UF_LIMIT // Set underflow limit + ldfe FR_COEFF1= [ GR_COEFF_START ], 16 // load C_1 + mov GR_EXP_CORR= 0xffff-126 +} +;; + +{.mfi + ldfe FR_COEFF2= [ GR_COEFF_START ], 16 // load C_2 + fma.s1 FR_KF0= f8, f1, FR_ROUNDVAL // y= x + 1.5*2^(63-10) + nop.i 0 +} +;; + +{.mfi + mov GR_MASK= 1023 + fms.s1 FR_KF= FR_KF0, f1, FR_ROUNDVAL // (K+f) + mov GR_MASK_low= 31 +} +;; + +{.mfi + getf.sig GR_KF0= FR_KF0 // (K+f)*2^10= round_to_int(y) + fcmp.ge.s1 p12, p7= f8, FR_OF_LIMIT // x >= overflow threshold ? + add GR_LOG_TBL= 256, GR_COEFF_START // Pointer to high T_table +} +;; + +{.mmi + and GR_F_low= GR_KF0, GR_MASK_low // f_low + and GR_F_high= GR_MASK, GR_KF0 // f_high*32 + shr GR_K= GR_KF0, 10 // K +} +;; + +{.mmi + shladd GR_Flow_ADDR= GR_F_low, 3, GR_COEFF_START // address of 2^{f_low} + add GR_BIAS= GR_K, GR_EXP_CORR // K= bias-2*63 + shr GR_Fh= GR_F_high, 5 // f_high +} +;; + +{.mfi + setf.exp FR_2_TO_K= GR_BIAS // 2^{K-126} + fnma.s1 FR_R= FR_KF, f1, f8 // r= x - (K+f) + shladd GR_Fh_ADDR= GR_Fh, 3, GR_LOG_TBL // address of 2^{f_high} +} +{.mlx + ldf8 FR_T_low= [ GR_Flow_ADDR ] // load T_low= 2^{f_low} + movl GR_EMIN= 0xc47f8000 // EMIN= -1022 +} +;; + +{.mfi + ldf8 FR_T_high= [ GR_Fh_ADDR ] // load T_high= 2^{f_high} + (p7) fcmp.lt.s1 p12, p7= f8, FR_UF_LIMIT // x= 0), +// and |r|<2^{-11} +// Th is a table that stores 2^fh (32 entries) rounded to +// double extended precision (only mantissa is stored) +// Tl is a table that stores 2^fl (32 entries) rounded to +// double extended precision (only mantissa is stored) +// +// 2^x is approximated as +// 2^K * Th [ f ] * Tl [ f ] * (1+c1*r+c2*r^2) + +// Note: We use the following trick to speed up conversion from FP to integer: +// +// Let x = K + r, where K is an integer, and |r| <= 0.5 +// Let N be the number of significand bits for the FP format used +// ( N=64 for double-extended, N=53 for double) +// +// Then let y = 1.5 * 2^(N-1) + x for RN mode +// K = y - 1.5 * 2^(N-1) +// r = x - K +// +// If we want to obtain the integer part and the first m fractional bits of x, +// we can use the same trick, but with a constant of 1.5 * 2^(N-1-m): +// +// Let x = K + f + r +// f = 0.b_1 b_2 ... b_m +// |r| <= 2^(-m-1) +// +// Then let y = 1.5 * 2^(N-1-m) + x for RN mode +// (K+f) = y - 1.5 * 2^(N-1-m) +// r = x - K + + +// Special values +//============================================================== +// exp2(0)= 1 +// exp2(+inf)= inf +// exp2(-inf)= 0 +// + +// Registers used +//============================================================== +// r2-r3, r14-r40 +// f6-f15, f32-f45 +// p6-p8, p12 +// + + +GR_TBL_START = r2 +GR_LOG_TBL = r3 + +GR_OF_LIMIT = r14 +GR_UF_LIMIT = r15 +GR_EXP_CORR = r16 +GR_F_low = r17 +GR_F_high = r18 +GR_K = r19 +GR_Flow_ADDR = r20 + +GR_BIAS = r21 +GR_Fh = r22 +GR_Fh_ADDR = r23 +GR_EXPMAX = r24 +GR_EMIN = r25 + +GR_ROUNDVAL = r26 +GR_MASK = r27 +GR_KF0 = r28 +GR_MASK_low = r29 +GR_COEFF_START = r30 + +GR_SAVE_B0 = r33 +GR_SAVE_PFS = r34 +GR_SAVE_GP = r35 +GR_SAVE_SP = r36 + +GR_Parameter_X = r37 +GR_Parameter_Y = r38 +GR_Parameter_RESULT = r39 +GR_Parameter_TAG = r40 + + +FR_X = f10 +FR_Y = f1 +FR_RESULT = f8 + + +FR_COEFF1 = f6 +FR_COEFF2 = f7 +FR_R = f9 + +FR_KF0 = f12 +FR_UF_LIMIT = f15 + +FR_OF_LIMIT = f32 +FR_EXPMIN = f33 +FR_ROUNDVAL = f34 +FR_KF = f35 + +FR_2_TO_K = f36 +FR_T_low = f37 +FR_T_high = f38 + +FR_P12 = f41 +FR_T_low_K = f42 +FR_T = f44 +FR_P = f45 + + +// Data tables +//============================================================== + +RODATA + +.align 16 + +LOCAL_OBJECT_START(poly_coeffs) + +data8 0xb17217f7d1cf79ab, 0x00003ffe // C_1 +data8 0xf5fdeffc162c7541, 0x00003ffc // C_2 +LOCAL_OBJECT_END(poly_coeffs) + + +LOCAL_OBJECT_START(T_table) + +// 2^{0.00000 b6 b7 b8 b9 b10} +data8 0x8000000000000000, 0x8016302f17467628 +data8 0x802c6436d0e04f50, 0x80429c17d77c18ed +data8 0x8058d7d2d5e5f6b0, 0x806f17687707a7af +data8 0x80855ad965e88b83, 0x809ba2264dada76a +data8 0x80b1ed4fd999ab6c, 0x80c83c56b50cf77f +data8 0x80de8f3b8b85a0af, 0x80f4e5ff089f763e +data8 0x810b40a1d81406d4, 0x81219f24a5baa59d +data8 0x813801881d886f7b, 0x814e67cceb90502c +data8 0x8164d1f3bc030773, 0x817b3ffd3b2f2e47 +data8 0x8191b1ea15813bfd, 0x81a827baf7838b78 +data8 0x81bea1708dde6055, 0x81d51f0b8557ec1c +data8 0x81eba08c8ad4536f, 0x820225f44b55b33b +data8 0x8218af4373fc25eb, 0x822f3c7ab205c89a +data8 0x8245cd9ab2cec048, 0x825c62a423d13f0c +data8 0x8272fb97b2a5894c, 0x828998760d01faf3 +data8 0x82a0393fe0bb0ca8, 0x82b6ddf5dbc35906 +// +// 2^{0.b1 b2 b3 b4 b5} +data8 0x8000000000000000, 0x82cd8698ac2ba1d7 +data8 0x85aac367cc487b14, 0x88980e8092da8527 +data8 0x8b95c1e3ea8bd6e6, 0x8ea4398b45cd53c0 +data8 0x91c3d373ab11c336, 0x94f4efa8fef70961 +data8 0x9837f0518db8a96f, 0x9b8d39b9d54e5538 +data8 0x9ef5326091a111ad, 0xa27043030c496818 +data8 0xa5fed6a9b15138ea, 0xa9a15ab4ea7c0ef8 +data8 0xad583eea42a14ac6, 0xb123f581d2ac258f +data8 0xb504f333f9de6484, 0xb8fbaf4762fb9ee9 +data8 0xbd08a39f580c36be, 0xc12c4cca66709456 +data8 0xc5672a115506dadd, 0xc9b9bd866e2f27a2 +data8 0xce248c151f8480e3, 0xd2a81d91f12ae45a +data8 0xd744fccad69d6af4, 0xdbfbb797daf23755 +data8 0xe0ccdeec2a94e111, 0xe5b906e77c8348a8 +data8 0xeac0c6e7dd24392e, 0xefe4b99bdcdaf5cb +data8 0xf5257d152486cc2c, 0xfa83b2db722a033a +LOCAL_OBJECT_END(T_table) + + + +.section .text +GLOBAL_LIBM_ENTRY(exp2f) + + +{.mfi + alloc r32= ar.pfs, 1, 4, 4, 0 + // will continue only for non-zero normal/denormal numbers + fclass.nm p12, p0= f8, 0x1b + // GR_TBL_START= pointer to C_1...C_2 followed by T_table + addl GR_TBL_START= @ltoff(poly_coeffs), gp +} +{.mlx + mov GR_OF_LIMIT= 0xffff + 7 // Exponent of overflow limit + movl GR_ROUNDVAL= 0x5a400000 // 1.5*2^(63-10) (SP) +} +;; + +// Form special constant 1.5*2^(63-10) to give integer part and first 10 +// fractional bits of x +{.mfi + setf.s FR_ROUNDVAL= GR_ROUNDVAL // Form special constant + fcmp.lt.s1 p6, p8= f8, f0 // X<0 ? + nop.i 0 +} +{.mfb + ld8 GR_COEFF_START= [ GR_TBL_START ] // Load pointer to coeff table + nop.f 0 + (p12) br.cond.spnt SPECIAL_exp2 // Branch if nan, inf, zero +} +;; + +{.mlx + setf.exp FR_OF_LIMIT= GR_OF_LIMIT // Set overflow limit + movl GR_UF_LIMIT= 0xc3160000 // (-2^7-22) = -150 +} +;; + +{.mfi + ldfe FR_COEFF1= [ GR_COEFF_START ], 16 // load C_1 + fma.s0 f8= f8, f1, f0 // normalize x + nop.i 0 +} +;; + +{.mmi + ldfe FR_COEFF2= [ GR_COEFF_START ], 16 // load C_2 + setf.s FR_UF_LIMIT= GR_UF_LIMIT // Set underflow limit + mov GR_EXP_CORR= 0xffff-126 +} +;; + +{.mfi + nop.m 0 + fma.s1 FR_KF0= f8, f1, FR_ROUNDVAL // y= x + 1.5*2^(63-10) + nop.i 0 +} +;; + +{.mfi + mov GR_MASK= 1023 + fms.s1 FR_KF= FR_KF0, f1, FR_ROUNDVAL // (K+f) + mov GR_MASK_low= 31 +} +;; + +{.mfi + getf.sig GR_KF0= FR_KF0 // (K+f)*2^10= round_to_int(y) + fcmp.ge.s1 p12, p7= f8, FR_OF_LIMIT // x >= overflow threshold ? + add GR_LOG_TBL= 256, GR_COEFF_START // Pointer to high T_table +} +;; + +{.mmi + and GR_F_low= GR_KF0, GR_MASK_low // f_low + and GR_F_high= GR_MASK, GR_KF0 // f_high*32 + shr GR_K= GR_KF0, 10 // K +} +;; + +{.mmi + shladd GR_Flow_ADDR= GR_F_low, 3, GR_COEFF_START // address of 2^{f_low} + add GR_BIAS= GR_K, GR_EXP_CORR // K= bias-2*63 + shr GR_Fh= GR_F_high, 5 // f_high +} +;; + +{.mfi + setf.exp FR_2_TO_K= GR_BIAS // 2^{K-126} + fnma.s1 FR_R= FR_KF, f1, f8 // r= x - (K+f) + shladd GR_Fh_ADDR= GR_Fh, 3, GR_LOG_TBL // address of 2^{f_high} +} +{.mlx + ldf8 FR_T_low= [ GR_Flow_ADDR ] // load T_low= 2^{f_low} + movl GR_EMIN= 0xc2fc0000 // EMIN= -126 +} +;; + +{.mfi + ldf8 FR_T_high= [ GR_Fh_ADDR ] // load T_high= 2^{f_high} + (p7) fcmp.lt.s1 p12, p7= f8, FR_UF_LIMIT // x= 0), +// and |r|<2^{-8} +// T is a table that stores 2^f (256 entries) rounded to +// double extended precision (only mantissa is stored) +// D stores (2^f/T [ f ] - 1), rounded to single precision +// +// 2^x is approximated as +// 2^K * T [ f ] * (1+D [ f ] +c1*r+c2*r^2+...+c6*r^6) +// + + + +// Special values +//============================================================== +// exp2(0)= 1 +// exp2(+inf)= inf +// exp2(-inf)= 0 +// + + +// Registers used +//============================================================== +// f6-f15, f32-f46 +// r2-r3, r8-r11, r14-r40 +// p6, p7, p8, p12 + + FR_X = f10 + FR_Y = f1 + FR_RESULT = f8 + + FR_KF0 = f6 + FR_EXP63 = f7 + FR_T = f9 + FR_COEFF3 = f10 + FR_COEFF4 = f11 + FR_COEFF5 = f12 + FR_COEFF6 = f13 + FR_COEFF1 = f14 + FR_COEFF2 = f15 + FR_2P14 = f32 + FR_UF_TEST = f33 + FR_D = f34 + FR_R = f35 + FR_2EXP = f36 + FR_EMIN = f37 + FR_P34 = f38 + FR_P56 = f39 + FR_R2 = f40 + FR_P12 = f41 + FR_TS = f42 + FR_P36 = f43 + FR_P02 = f44 + FR_R3 = f45 + FR_P06 = f46 + + + GR_ADDR0 = r2 + GR_ADDR = r2 + GR_D_ADDR0 = r3 + GR_D_ADDR = r3 + GR_LEADBITS = r8 + GR_256 = r9 + GR_EM63 = r10 + GR_255 = r11 + GR_EXPON = r14 + GR_BM63 = r15 + GR_UF_TEST = r16 + GR_INDEX = r17 + GR_K = r18 + GR_KF = r19 + GR_2P14 = r19 + GR_EMIN = r20 + GR_IT = r21 + GR_ID = r22 + GR_63 = r23 + GR_CONST1 = r24 + GR_EBIAS = r25 + GR_CONST2 = r26 + GR_CONST3 = r27 + GR_SIGNIF = r28 + GR_ARGEXP = r29 + GR_SGN = r30 + GR_EMIN1 = r31 + GR_SREG = r32 + + GR_SAVE_B0 = r33 + GR_SAVE_PFS = r34 + GR_SAVE_GP = r35 + GR_SAVE_SP = r36 + + GR_Parameter_X = r37 + GR_Parameter_Y = r38 + GR_Parameter_RESULT= r39 + GR_Parameter_TAG = r40 + + +// Data tables +//============================================================== + +RODATA + +.align 16 + +LOCAL_OBJECT_START(poly_coeffs) + + data8 0x3fac6b08d704a0c0 // C_3 + data8 0x3f83b2ab6fba4e77 // C_4 + data8 0x3f55d87fe78a6731 // C_5 + data8 0x3f2430912f86c787 // C_6 + data8 0xb17217f7d1cf79ab, 0x00003ffe // C_1 + data8 0xf5fdeffc162c7541, 0x00003ffc // C_2 +LOCAL_OBJECT_END(poly_coeffs) + + +LOCAL_OBJECT_START(T_table) + + data8 0x8000000000000000, 0x8058d7d2d5e5f6b1 + data8 0x80b1ed4fd999ab6c, 0x810b40a1d81406d4 + data8 0x8164d1f3bc030773, 0x81bea1708dde6056 + data8 0x8218af4373fc25ec, 0x8272fb97b2a5894c + data8 0x82cd8698ac2ba1d7, 0x83285071e0fc4547 + data8 0x8383594eefb6ee37, 0x83dea15b9541b132 + data8 0x843a28c3acde4046, 0x8495efb3303efd30 + data8 0x84f1f656379c1a29, 0x854e3cd8f9c8c95d + data8 0x85aac367cc487b15, 0x86078a2f23642a9f + data8 0x8664915b923fba04, 0x86c1d919caef5c88 + data8 0x871f61969e8d1010, 0x877d2afefd4e256c + data8 0x87db357ff698d792, 0x88398146b919f1d4 + data8 0x88980e8092da8527, 0x88f6dd5af155ac6b + data8 0x8955ee03618e5fdd, 0x89b540a7902557a4 + data8 0x8a14d575496efd9a, 0x8a74ac9a79896e47 + data8 0x8ad4c6452c728924, 0x8b3522a38e1e1032 + data8 0x8b95c1e3ea8bd6e7, 0x8bf6a434adde0085 + data8 0x8c57c9c4646f4dde, 0x8cb932c1bae97a95 + data8 0x8d1adf5b7e5ba9e6, 0x8d7ccfc09c50e2f8 + data8 0x8ddf042022e69cd6, 0x8e417ca940e35a01 + data8 0x8ea4398b45cd53c0, 0x8f073af5a2013520 + data8 0x8f6a8117e6c8e5c4, 0x8fce0c21c6726481 + data8 0x9031dc431466b1dc, 0x9095f1abc540ca6b + data8 0x90fa4c8beee4b12b, 0x915eed13c89689d3 + data8 0x91c3d373ab11c336, 0x9228ffdc10a051ad + data8 0x928e727d9531f9ac, 0x92f42b88f673aa7c + data8 0x935a2b2f13e6e92c, 0x93c071a0eef94bc1 + data8 0x9426ff0fab1c04b6, 0x948dd3ac8ddb7ed3 + data8 0x94f4efa8fef70961, 0x955c5336887894d5 + data8 0x95c3fe86d6cc7fef, 0x962bf1cbb8d97560 + data8 0x96942d3720185a00, 0x96fcb0fb20ac4ba3 + data8 0x97657d49f17ab08e, 0x97ce9255ec4357ab + data8 0x9837f0518db8a96f, 0x98a1976f7597e996 + data8 0x990b87e266c189aa, 0x9975c1dd47518c77 + data8 0x99e0459320b7fa65, 0x9a4b13371fd166ca + data8 0x9ab62afc94ff864a, 0x9b218d16f441d63d + data8 0x9b8d39b9d54e5539, 0x9bf93118f3aa4cc1 + data8 0x9c6573682ec32c2d, 0x9cd200db8a0774cb + data8 0x9d3ed9a72cffb751, 0x9dabfdff6367a2aa + data8 0x9e196e189d472420, 0x9e872a276f0b98ff + data8 0x9ef5326091a111ae, 0x9f6386f8e28ba651 + data8 0x9fd228256400dd06, 0xa041161b3d0121be + data8 0xa0b0510fb9714fc2, 0xa11fd9384a344cf7 + data8 0xa18faeca8544b6e4, 0xa1ffd1fc25cea188 + data8 0xa27043030c496819, 0xa2e102153e918f9e + data8 0xa3520f68e802bb93, 0xa3c36b345991b47c + data8 0xa43515ae09e6809e, 0xa4a70f0c95768ec5 + data8 0xa5195786be9ef339, 0xa58bef536dbeb6ee + data8 0xa5fed6a9b15138ea, 0xa6720dc0be08a20c + data8 0xa6e594cfeee86b1e, 0xa7596c0ec55ff55b + data8 0xa7cd93b4e965356a, 0xa8420bfa298f70d1 + data8 0xa8b6d5167b320e09, 0xa92bef41fa77771b + data8 0xa9a15ab4ea7c0ef8, 0xaa1717a7b5693979 + data8 0xaa8d2652ec907629, 0xab0386ef48868de1 + data8 0xab7a39b5a93ed337, 0xabf13edf162675e9 + data8 0xac6896a4be3fe929, 0xace0413ff83e5d04 + data8 0xad583eea42a14ac6, 0xadd08fdd43d01491 + data8 0xae493452ca35b80e, 0xaec22c84cc5c9465 + data8 0xaf3b78ad690a4375, 0xafb51906e75b8661 + data8 0xb02f0dcbb6e04584, 0xb0a957366fb7a3c9 + data8 0xb123f581d2ac2590, 0xb19ee8e8c94feb09 + data8 0xb21a31a66618fe3b, 0xb295cff5e47db4a4 + data8 0xb311c412a9112489, 0xb38e0e38419fae18 + data8 0xb40aaea2654b9841, 0xb487a58cf4a9c180 + data8 0xb504f333f9de6484, 0xb58297d3a8b9f0d2 + data8 0xb60093a85ed5f76c, 0xb67ee6eea3b22b8f + data8 0xb6fd91e328d17791, 0xb77c94c2c9d725e9 + data8 0xb7fbefca8ca41e7c, 0xb87ba337a1743834 + data8 0xb8fbaf4762fb9ee9, 0xb97c143756844dbf + data8 0xb9fcd2452c0b9deb, 0xba7de9aebe5fea09 + data8 0xbaff5ab2133e45fb, 0xbb81258d5b704b6f + data8 0xbc034a7ef2e9fb0d, 0xbc85c9c560e7b269 + data8 0xbd08a39f580c36bf, 0xbd8bd84bb67ed483 + data8 0xbe0f6809860993e2, 0xbe935317fc378238 + data8 0xbf1799b67a731083, 0xbf9c3c248e2486f8 + data8 0xc0213aa1f0d08db0, 0xc0a6956e8836ca8d + data8 0xc12c4cca66709456, 0xc1b260f5ca0fbb33 + data8 0xc238d2311e3d6673, 0xc2bfa0bcfad907c9 + data8 0xc346ccda24976407, 0xc3ce56c98d21b15d + data8 0xc4563ecc5334cb33, 0xc4de8523c2c07baa + data8 0xc5672a115506dadd, 0xc5f02dd6b0bbc3d9 + data8 0xc67990b5aa245f79, 0xc70352f04336c51e + data8 0xc78d74c8abb9b15d, 0xc817f681416452b2 + data8 0xc8a2d85c8ffe2c45, 0xc92e1a9d517f0ecc + data8 0xc9b9bd866e2f27a3, 0xca45c15afcc72624 + data8 0xcad2265e4290774e, 0xcb5eecd3b38597c9 + data8 0xcbec14fef2727c5d, 0xcc799f23d11510e5 + data8 0xcd078b86503dcdd2, 0xcd95da6a9ff06445 + data8 0xce248c151f8480e4, 0xceb3a0ca5dc6a55d + data8 0xcf4318cf191918c1, 0xcfd2f4683f94eeb5 + data8 0xd06333daef2b2595, 0xd0f3d76c75c5db8d + data8 0xd184df6251699ac6, 0xd2164c023056bcab + data8 0xd2a81d91f12ae45a, 0xd33a5457a3029054 + data8 0xd3ccf099859ac379, 0xd45ff29e0972c561 + data8 0xd4f35aabcfedfa1f, 0xd5872909ab75d18a + data8 0xd61b5dfe9f9bce07, 0xd6aff9d1e13ba2fe + data8 0xd744fccad69d6af4, 0xd7da67311797f56a + data8 0xd870394c6db32c84, 0xd9067364d44a929c + data8 0xd99d15c278afd7b6, 0xda3420adba4d8704 + data8 0xdacb946f2ac9cc72, 0xdb63714f8e295255 + data8 0xdbfbb797daf23755, 0xdc9467913a4f1c92 + data8 0xdd2d818508324c20, 0xddc705bcd378f7f0 + data8 0xde60f4825e0e9124, 0xdefb4e1f9d1037f2 + data8 0xdf9612deb8f04420, 0xe031430a0d99e627 + data8 0xe0ccdeec2a94e111, 0xe168e6cfd3295d23 + data8 0xe2055afffe83d369, 0xe2a23bc7d7d91226 + data8 0xe33f8972be8a5a51, 0xe3dd444c46499619 + data8 0xe47b6ca0373da88d, 0xe51a02ba8e26d681 + data8 0xe5b906e77c8348a8, 0xe658797368b3a717 + data8 0xe6f85aaaee1fce22, 0xe798aadadd5b9cbf + data8 0xe8396a503c4bdc68, 0xe8da9958464b42ab + data8 0xe97c38406c4f8c57, 0xea1e4756550eb27b + data8 0xeac0c6e7dd24392f, 0xeb63b74317369840 + data8 0xec0718b64c1cbddc, 0xecaaeb8ffb03ab41 + data8 0xed4f301ed9942b84, 0xedf3e6b1d418a491 + data8 0xee990f980da3025b, 0xef3eab20e032bc6b + data8 0xefe4b99bdcdaf5cb, 0xf08b3b58cbe8b76a + data8 0xf13230a7ad094509, 0xf1d999d8b7708cc1 + data8 0xf281773c59ffb13a, 0xf329c9233b6bae9c + data8 0xf3d28fde3a641a5b, 0xf47bcbbe6db9fddf + data8 0xf5257d152486cc2c, 0xf5cfa433e6537290 + data8 0xf67a416c733f846e, 0xf7255510c4288239 + data8 0xf7d0df730ad13bb9, 0xf87ce0e5b2094d9c + data8 0xf92959bb5dd4ba74, 0xf9d64a46eb939f35 + data8 0xfa83b2db722a033a, 0xfb3193cc4227c3f4 + data8 0xfbdfed6ce5f09c49, 0xfc8ec01121e447bb + data8 0xfd3e0c0cf486c175, 0xfdedd1b496a89f35 + data8 0xfe9e115c7b8f884c, 0xff4ecb59511ec8a5 +LOCAL_OBJECT_END(T_table) + + +LOCAL_OBJECT_START(D_table) + + data4 0x00000000, 0x9f55c08f, 0x1e93ffa3, 0x1dcd43a8 + data4 0x1f751f79, 0x9f3cdd88, 0x9f43d155, 0x1eda222c + data4 0x1ef35513, 0x9f597895, 0x9e698881, 0x1ec71073 + data4 0x1e50e371, 0x9dc01e19, 0x1de74133, 0x1e2f028c + data4 0x9edefb47, 0x1ebbac48, 0x9e8b0330, 0x9e9e9314 + data4 0x1edc1d11, 0x1f098529, 0x9f52827c, 0x1f50050d + data4 0x1f301e8e, 0x1f5b64d1, 0x9f45e3ee, 0x9ef64d6d + data4 0x1d6ec5e8, 0x9e61ad9a, 0x1d44ccbb, 0x9e4a8bbb + data4 0x9cf11576, 0x9dcce7e7, 0x9d02ac90, 0x1f26ccf0 + data4 0x9f0877c6, 0x9ddd62ae, 0x9f4b7fc3, 0x1ea8ef6b + data4 0x1ea4378d, 0x1ef6fc38, 0x1db99fd9, 0x1f22bf6f + data4 0x1f53e172, 0x1e85504a, 0x9f37cc75, 0x1f0c5e17 + data4 0x1dde8aac, 0x9cb42bb2, 0x1e153cd7, 0x1eb62bba + data4 0x9e9b941b, 0x9ea80e3c, 0x1f508823, 0x1ec3fd36 + data4 0x1e9ffaa1, 0x1e21e2eb, 0x9d948b1d, 0x9e8ac93a + data4 0x1ef7ee6f, 0x9e80dda3, 0x1f0814be, 0x1dc5ddfe + data4 0x1eedb9d1, 0x9f2aaa26, 0x9ea5b0fc, 0x1edf702e + data4 0x9e391201, 0x1f1316bb, 0x1ea27fb7, 0x9e05ed18 + data4 0x9f199ed2, 0x1ee7fd7c, 0x1f003db6, 0x9eac3793 + data4 0x9e5b8c10, 0x9f3af17c, 0x1bc9a8be, 0x1ee3c004 + data4 0x9f19b1b2, 0x9f242ce9, 0x9ce67dd1, 0x9e4f6275 + data4 0x1e20742c, 0x1eb9328a, 0x9f477153, 0x1d969718 + data4 0x9f1e6c43, 0x1f2f67f4, 0x9f39c7e4, 0x9e3c4feb + data4 0x1da3956b, 0x9e7c685d, 0x1f280911, 0x9f0d8afb + data4 0x1e314b40, 0x9eb4f250, 0x9f1a34ad, 0x1ef5d5e7 + data4 0x9f145496, 0x1e604827, 0x9f1e5195, 0x1e9c1fc0 + data4 0x1efde521, 0x1e69b385, 0x1f316830, 0x9f244eae + data4 0x1f1787ec, 0x9e939971, 0x1f0bb393, 0x9f0511d6 + data4 0x1ed919de, 0x1d8b7b28, 0x1e5ca4a9, 0x1e7c357b + data4 0x9e3ff8e8, 0x1eef53b5, 0x9ed22ed7, 0x1f16659b + data4 0x9f2db102, 0x9e2c6a78, 0x1f328d7d, 0x9f2fec3c + data4 0x1eb395bd, 0x9f242b84, 0x9e2683e6, 0x1ed71e68 + data4 0x1efd1df5, 0x9e9eeafd, 0x9ed2249c, 0x1eef129a + data4 0x1d1ea44c, 0x9e81f7ff, 0x1eaf77c9, 0x9ee7a285 + data4 0x1e1864ed, 0x9ee7edbb, 0x9e15a27d, 0x9ae61655 + data4 0x1f1ff1a2, 0x1da29755, 0x9e5f46fb, 0x1e901236 + data4 0x9eecfb9b, 0x9f204d2f, 0x1ec64685, 0x9eb809bd + data4 0x9e0026c5, 0x1d9f1da1, 0x1f142b49, 0x9f20f22e + data4 0x1f24b067, 0x1f185a4c, 0x9f09765c, 0x9ece902f + data4 0x1e2ca5db, 0x1e6de464, 0x9f071f67, 0x1f1518c3 + data4 0x1ea13ded, 0x1f0b8414, 0x1edb6ad4, 0x9e548740 + data4 0x9ea10efb, 0x1ee48a60, 0x1e7954c5, 0x9edad013 + data4 0x9f21517d, 0x9e9b6e0c, 0x9ee7f9a6, 0x9ebd4298 + data4 0x9d65b24e, 0x1eed751f, 0x9f1573ea, 0x9d430377 + data4 0x9e13fc0c, 0x1e47008a, 0x1e3d5c1d, 0x1ef41a91 + data4 0x9e4a4ef7, 0x9e952f18, 0x1d620566, 0x1d9b8d33 + data4 0x1db06247, 0x1e94b31e, 0x1f0730ad, 0x9d79ffb4 + data4 0x1ed64d51, 0x9e91fd11, 0x9e28d35a, 0x9dea0ed9 + data4 0x1e891def, 0x9ee28ac0, 0x1e1db99b, 0x9ee1ce38 + data4 0x9bdd9bca, 0x1eb72cb9, 0x9e8c53c6, 0x1e0df6ca + data4 0x1e8f2ccd, 0x9e9b0886, 0x1eeb3bc7, 0x1ec7e772 + data4 0x9e210776, 0x9daf246c, 0x1ea1f151, 0x1ece4dc6 + data4 0x1ce741c8, 0x1ed3c88f, 0x9ec9a4fd, 0x9e0c8d30 + data4 0x1d2fbb26, 0x9ef212a7, 0x1ee44f1c, 0x9e445550 + data4 0x1e075f77, 0x9d9291a3, 0x1f09c2ee, 0x9e012c88 + data4 0x1f057d62, 0x9e7bb0dc, 0x9d8758ee, 0x1ee8d6c1 + data4 0x9e509a57, 0x9e4ca7b7, 0x1e2cb341, 0x9ec35106 + data4 0x1ecf3baf, 0x1e11781c, 0x1ea0cc78, 0x1eb75ca6 + data4 0x1e961e1a, 0x1eb88853, 0x1e7abf50, 0x1ee38704 + data4 0x9dc5ab0f, 0x1afe197b, 0x9ec07523, 0x9d9b7f78 + data4 0x1f011618, 0x1ed43b0b, 0x9f035945, 0x9e3fd014 + data4 0x9bbda5cd, 0x9e83f8ab, 0x1e58a928, 0x1e392d61 + data4 0x1efdbb52, 0x1ee310a8, 0x9ec7ecc1, 0x1e8c9ed6 + data4 0x9ef82dee, 0x9e70545b, 0x9ea53fc4, 0x1e40f419 +LOCAL_OBJECT_END(D_table) + + + +.section .text +GLOBAL_LIBM_ENTRY(exp2l) + +{.mii + // get exponent + getf.exp GR_EBIAS = f8 + // GR_D_ADDR0 = pointer to D_table + addl GR_D_ADDR0 = @ltoff(D_table), gp + // GR_ADDR0 = pointer to C_1...C_6 followed by T_table + addl GR_ADDR0 = @ltoff(poly_coeffs), gp ;; +} + +{.mfi + // get significand + getf.sig GR_SIGNIF = f8 + // will continue only for normal/denormal numbers + fclass.nm.unc p12, p7 = f8, 0x1b + mov GR_63 = 63 ;; +} + +{.mfi + nop.m 0 + nop.f 0 + // GR_CONST2 = bias+63-8 + mov GR_CONST2 = 0xffff+55 +} +{.mfi + // GR_CONST1 = bias+15 + mov GR_CONST1 = 0xffff+15 + nop.f 0 + mov GR_CONST3 = 0x1ffff ;; +} + +{.mfi + // load start address for C_1...C_6 followed by T_table + ld8 GR_ADDR = [ GR_ADDR0 ] + nop.f 0 + // get sign of argument + andcm GR_SGN = GR_EBIAS, GR_CONST3 +} +{.mfi + // GR_D_ADDR = pointer to D_table + ld8 GR_D_ADDR = [ GR_D_ADDR0 ] + nop.f 0 + // get argument exponent + and GR_ARGEXP = GR_CONST3, GR_EBIAS ;; +} + +{.mfi + alloc GR_SREG = ar.pfs, 1, 4, 4, 0 + nop.f 0 + // p6 = 1 if sign = 1 + cmp.ne p6, p8 = GR_SGN, r0 +} +{.mfi + // p7 = 1 if exponent> = 15 (argument out of range) + cmp.ge p7, p0 = GR_ARGEXP, GR_CONST1 + nop.f 0 + sub GR_EXPON = GR_CONST2, GR_ARGEXP ;; +} + +{.mib + // load C_3, C_4 + ldfpd FR_COEFF3, FR_COEFF4 = [ GR_ADDR ], 16 + // get first exponent+8 bits + shr.u GR_LEADBITS = GR_SIGNIF, GR_EXPON + (p12) br.cond.spnt SPECIAL_exp2l +} +{.mib + mov GR_256 = 256 + // exponent- = 63 + sub GR_EM63 = GR_EBIAS, GR_63 + (p7) br.cond.spnt OUT_RANGE_exp2l ;; +} + +{.mlx + // load C_5, C_6 + ldfpd FR_COEFF5, FR_COEFF6 = [ GR_ADDR ], 16 + // GR_2P14 = 2^14 + movl GR_2P14 = 0x46800000 ;; +} + +{.mfi + // load C_1 + ldfe FR_COEFF1 = [ GR_ADDR ], 16 + fma.s0 f8 = f8, f1, f0 + // GR_BM63 = bias-63 + mov GR_BM63 = 0xffff-63 ;; +} + +{.mlx + setf.s FR_2P14 = GR_2P14 + // GR_UF_TEST = -2^14-62 + movl GR_UF_TEST = 0xc6807c00 +} +{.mfi + // load C_2 + ldfe FR_COEFF2 = [ GR_ADDR ], 16 + nop.f 0 + mov GR_255 = 255 ;; +} + +{.mib + // get 8-bit index + and GR_INDEX = GR_255, GR_LEADBITS + // get K = integer part + shr.u GR_K = GR_LEADBITS, 8 + nop.b 0 ;; +} + +{.mmi + // if sign = 1 && f>0, set p7 = 1 + (p6) cmp.gt.unc p7, p0 = GR_INDEX, r0 + setf.s FR_UF_TEST = GR_UF_TEST + shl GR_KF = GR_LEADBITS, GR_EXPON ;; +} + +{.mfi + // if sign = 1 && f>0, set f = 1-f + (p7) sub GR_INDEX = GR_256, GR_INDEX + nop.f 0 + // if sign = 1 && f>0, set K = K+1 + (p7) add GR_K = GR_K, r0, 1 ;; +} + +{.mfi + // FR_EXP63 = 2^{expon-63} + setf.exp FR_EXP63 = GR_EM63 + nop.f 0 + nop.i 0 ;; +} + +.pred.rel "mutex", p6, p8 +{.mfi + // if sign = 0, set scale factor exponent S = K+bias-63 + (p8) add GR_K = GR_K, GR_BM63 + nop.f 0 + // if sign = 1, set scale factor exponent S = -K+bias-63 + (p6) sub GR_K = GR_BM63, GR_K ;; +} + +{.mmi + // FR_KF0 = 2^{63-expon}*(K+f) + setf.sig FR_KF0 = GR_KF + nop.m 0 + // GR_EMIN = EMIN = 2-2^14 + mov GR_EMIN = 0x18cfff ;; +} + +{.mfi + // get T_table index + shladd GR_IT = GR_INDEX, 3, GR_ADDR + // p7 = 1 if x> = 2^10 + fcmp.ge.s1 p7, p12 = f8, FR_2P14 + // get D_table index + shladd GR_ID = GR_INDEX, 2, GR_D_ADDR ;; +} + +{.mfi + // load T_table value + ldf8 FR_T = [ GR_IT ] + // p7 = 1 if x<-2^10-50 + (p12) fcmp.lt.s1 p7, p0 = f8, FR_UF_TEST + // GR_EMIN1 = EMIN = 2-2^14 + shl GR_EMIN1 = GR_EMIN, 11 ;; +} + +{.mmb + // f50 = scale factor = 2^{K-63} + setf.exp FR_2EXP = GR_K + // load D_table value + ldfs FR_D = [ GR_ID ] + (p7) br.cond.spnt OUT_RANGE_exp2l ;; +} + +{.mfi + nop.m 0 + // get r = x-(K+f) + fnma.s1 FR_R = FR_KF0, FR_EXP63, f8 + nop.i 0 ;; +} + +{.mfi + // FR_EMIN = EMIN + setf.s FR_EMIN = GR_EMIN1 + // P34 = C_4*r+C_3 + fma.s1 FR_P34 = FR_COEFF4, FR_R, FR_COEFF3 + nop.i 0 +} +{.mfi + nop.m 0 + // P56 = C_6*r+C_5 + fma.s1 FR_P56 = FR_COEFF6, FR_R, FR_COEFF5 + nop.i 0 ;; +} + +{.mfi + nop.m 0 + // r*r + fma.s1 FR_R2 = FR_R, FR_R, f0 + nop.i 0 +} +{.mfi + nop.m 0 + // P12 = C_2*r+C_1 + fma.s1 FR_P12 = FR_COEFF2, FR_R, FR_COEFF1 + nop.i 0 ;; +} + +{.mfi + nop.m 0 + // T* = scaling factor + fma.s1 FR_TS = FR_T, FR_2EXP, f0 + nop.i 0 +} +{.mfi + nop.m 0 + // P36 = P34+r2*P56 + fma.s1 FR_P36 = FR_P56, FR_R2, FR_P34 + nop.i 0 ;; +} + +{.mfi + nop.m 0 + // P02 = D+r*P12 + fma.s1 FR_P02 = FR_P12, FR_R, FR_D + nop.i 0 +} +{.mfi + nop.m 0 + // GR_ID = r*r2 + fma.s1 FR_R3 = FR_R2, FR_R, f0 + nop.i 0 ;; +} + +{.mfi + nop.m 0 + // P06 = P02+r3*P36 + fma.s1 FR_P06 = FR_P36, FR_R3, FR_P02 + nop.i 0 ;; +} + +{.mfi + nop.m 0 + // underflow (x multiplication on 2^n can be +// performed by doing logical "or" operation with bits presenting 2^n + +// exp(R) = 1 + (exp(R) - 1) +// P = exp(R) - 1 approximated by Taylor series of 3rd degree +// P = A3*R^3 + A2*R^2 + R, A3 = 1/6, A2 = 1/2 +// + +// The final result is reconstructed as follows +// exp(x) = T + T*P + +// Special values +//********************************************************************* +// expf(+0) = 1.0 +// expf(-0) = 1.0 + +// expf(+qnan) = +qnan +// expf(-qnan) = -qnan +// expf(+snan) = +qnan +// expf(-snan) = -qnan + +// expf(-inf) = +0 +// expf(+inf) = +inf + +// Overflow and Underflow +//********************************************************************* +// expf(x) = largest single normal when +// x = 88.72283 = 0x42b17217 + +// expf(x) = smallest single normal when +// x = -87.33654 = 0xc2aeac4f + +// expf(x) = largest round-to-nearest single zero when +// x = -103.97208 = 0xc2cff1b5 + + +// Registers used +//********************************************************************* +// Floating Point registers used: +// f8, input +// f6,f7, f9 -> f15, f32 -> f40 + +// General registers used: +// r3, r23 -> r38 + +// Predicate registers used: +// p10 -> p15 + +// Assembly macros +//********************************************************************* +// integer registers used +// scratch +rNJ = r3 + +rTmp = r23 +rJ = r23 +rN = r24 +rTblAddr = r25 +rA3 = r26 +rExpHalf = r27 +rLn2Div64 = r28 +r17ones_m1 = r29 +rGt_ln = r29 +rRightShifter = r30 +r64DivLn2 = r31 +// stacked +GR_SAVE_PFS = r32 +GR_SAVE_B0 = r33 +GR_SAVE_GP = r34 +GR_Parameter_X = r35 +GR_Parameter_Y = r36 +GR_Parameter_RESULT = r37 +GR_Parameter_TAG = r38 + +// floating point registers used +FR_X = f10 +FR_Y = f1 +FR_RESULT = f8 +// scratch +fRightShifter = f6 +f64DivLn2 = f7 +fNormX = f9 +fNint = f10 +fN = f11 +fR = f12 +fLn2Div64 = f13 +fA2 = f14 +fA3 = f15 +// stacked +fP = f32 +fT = f33 +fMIN_SGL_OFLOW_ARG = f34 +fMAX_SGL_ZERO_ARG = f35 +fMAX_SGL_NORM_ARG = f36 +fMIN_SGL_NORM_ARG = f37 +fRSqr = f38 +fTmp = f39 +fGt_pln = f39 +fWre_urm_f8 = f40 +fFtz_urm_f8 = f40 + + +RODATA +.align 16 + +LOCAL_OBJECT_START(_expf_table) +data4 0x42b17218 // Smallest sgl arg to overflow sgl result, +88.7228 +data4 0xc2cff1b5 // Largest sgl for rnd-to-nearest 0 result, -103.9720 +data4 0x42b17217 // Largest sgl arg to give normal sgl result, +88.7228 +data4 0xc2aeac4f // Smallest sgl arg to give normal sgl result, -87.3365 +// +// 2^(j/64) table, j goes from 0 to 63 +data8 0x0000000000000000 // 2^(0/64) +data8 0x00002C9A3E778061 // 2^(1/64) +data8 0x000059B0D3158574 // 2^(2/64) +data8 0x0000874518759BC8 // 2^(3/64) +data8 0x0000B5586CF9890F // 2^(4/64) +data8 0x0000E3EC32D3D1A2 // 2^(5/64) +data8 0x00011301D0125B51 // 2^(6/64) +data8 0x0001429AAEA92DE0 // 2^(7/64) +data8 0x000172B83C7D517B // 2^(8/64) +data8 0x0001A35BEB6FCB75 // 2^(9/64) +data8 0x0001D4873168B9AA // 2^(10/64) +data8 0x0002063B88628CD6 // 2^(11/64) +data8 0x0002387A6E756238 // 2^(12/64) +data8 0x00026B4565E27CDD // 2^(13/64) +data8 0x00029E9DF51FDEE1 // 2^(14/64) +data8 0x0002D285A6E4030B // 2^(15/64) +data8 0x000306FE0A31B715 // 2^(16/64) +data8 0x00033C08B26416FF // 2^(17/64) +data8 0x000371A7373AA9CB // 2^(18/64) +data8 0x0003A7DB34E59FF7 // 2^(19/64) +data8 0x0003DEA64C123422 // 2^(20/64) +data8 0x0004160A21F72E2A // 2^(21/64) +data8 0x00044E086061892D // 2^(22/64) +data8 0x000486A2B5C13CD0 // 2^(23/64) +data8 0x0004BFDAD5362A27 // 2^(24/64) +data8 0x0004F9B2769D2CA7 // 2^(25/64) +data8 0x0005342B569D4F82 // 2^(26/64) +data8 0x00056F4736B527DA // 2^(27/64) +data8 0x0005AB07DD485429 // 2^(28/64) +data8 0x0005E76F15AD2148 // 2^(29/64) +data8 0x0006247EB03A5585 // 2^(30/64) +data8 0x0006623882552225 // 2^(31/64) +data8 0x0006A09E667F3BCD // 2^(32/64) +data8 0x0006DFB23C651A2F // 2^(33/64) +data8 0x00071F75E8EC5F74 // 2^(34/64) +data8 0x00075FEB564267C9 // 2^(35/64) +data8 0x0007A11473EB0187 // 2^(36/64) +data8 0x0007E2F336CF4E62 // 2^(37/64) +data8 0x00082589994CCE13 // 2^(38/64) +data8 0x000868D99B4492ED // 2^(39/64) +data8 0x0008ACE5422AA0DB // 2^(40/64) +data8 0x0008F1AE99157736 // 2^(41/64) +data8 0x00093737B0CDC5E5 // 2^(42/64) +data8 0x00097D829FDE4E50 // 2^(43/64) +data8 0x0009C49182A3F090 // 2^(44/64) +data8 0x000A0C667B5DE565 // 2^(45/64) +data8 0x000A5503B23E255D // 2^(46/64) +data8 0x000A9E6B5579FDBF // 2^(47/64) +data8 0x000AE89F995AD3AD // 2^(48/64) +data8 0x000B33A2B84F15FB // 2^(49/64) +data8 0x000B7F76F2FB5E47 // 2^(50/64) +data8 0x000BCC1E904BC1D2 // 2^(51/64) +data8 0x000C199BDD85529C // 2^(52/64) +data8 0x000C67F12E57D14B // 2^(53/64) +data8 0x000CB720DCEF9069 // 2^(54/64) +data8 0x000D072D4A07897C // 2^(55/64) +data8 0x000D5818DCFBA487 // 2^(56/64) +data8 0x000DA9E603DB3285 // 2^(57/64) +data8 0x000DFC97337B9B5F // 2^(58/64) +data8 0x000E502EE78B3FF6 // 2^(59/64) +data8 0x000EA4AFA2A490DA // 2^(60/64) +data8 0x000EFA1BEE615A27 // 2^(61/64) +data8 0x000F50765B6E4540 // 2^(62/64) +data8 0x000FA7C1819E90D8 // 2^(63/64) +LOCAL_OBJECT_END(_expf_table) + + +.section .text +GLOBAL_IEEE754_ENTRY(expf) + +{ .mlx + addl rTblAddr = @ltoff(_expf_table),gp + movl r64DivLn2 = 0x40571547652B82FE // 64/ln(2) +} +{ .mlx + addl rA3 = 0x3E2AA, r0 // high bits of 1.0/6.0 rounded to SP + movl rRightShifter = 0x43E8000000000000 // DP Right Shifter +} +;; + +{ .mfi + // point to the beginning of the table + ld8 rTblAddr = [rTblAddr] + fclass.m p14, p0 = f8, 0x22 // test for -INF + shl rA3 = rA3, 12 // 0x3E2AA000, approx to 1.0/6.0 in SP +} +{ .mfi + nop.m 0 + fnorm.s1 fNormX = f8 // normalized x + addl rExpHalf = 0xFFFE, r0 // exponent of 1/2 +} +;; + +{ .mfi + setf.d f64DivLn2 = r64DivLn2 // load 64/ln(2) to FP reg + fclass.m p15, p0 = f8, 0x1e1 // test for NaT,NaN,+Inf + nop.i 0 +} +{ .mlx + // load Right Shifter to FP reg + setf.d fRightShifter = rRightShifter + movl rLn2Div64 = 0x3F862E42FEFA39EF // DP ln(2)/64 in GR +} +;; + +{ .mfi + nop.m 0 + fcmp.eq.s1 p13, p0 = f0, f8 // test for x = 0.0 + nop.i 0 +} +{ .mfb + setf.s fA3 = rA3 // load A3 to FP reg +(p14) fma.s.s0 f8 = f0, f1, f0 // result if x = -inf +(p14) br.ret.spnt b0 // exit here if x = -inf +} +;; + +{ .mfi + setf.exp fA2 = rExpHalf // load A2 to FP reg + fcmp.eq.s0 p6, p0 = f8, f0 // Dummy to flag denorm + nop.i 0 +} +{ .mfb + setf.d fLn2Div64 = rLn2Div64 // load ln(2)/64 to FP reg +(p15) fma.s.s0 f8 = f8, f1, f0 // result if x = NaT,NaN,+Inf +(p15) br.ret.spnt b0 // exit here if x = NaT,NaN,+Inf +} +;; + +{ .mfb + // overflow and underflow_zero threshold + ldfps fMIN_SGL_OFLOW_ARG, fMAX_SGL_ZERO_ARG = [rTblAddr], 8 +(p13) fma.s.s0 f8 = f1, f1, f0 // result if x = 0.0 +(p13) br.ret.spnt b0 // exit here if x =0.0 +} +;; + + // max normal and underflow_denorm threshold +{ .mfi + ldfps fMAX_SGL_NORM_ARG, fMIN_SGL_NORM_ARG = [rTblAddr], 8 + nop.f 0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + // x*(64/ln(2)) + Right Shifter + fma.s1 fNint = fNormX, f64DivLn2, fRightShifter + nop.i 0 +} +;; + +// Divide arguments into the following categories: +// Certain Underflow p11 - -inf < x <= MAX_SGL_ZERO_ARG +// Possible Underflow p13 - MAX_SGL_ZERO_ARG < x < MIN_SGL_NORM_ARG +// Certain Safe - MIN_SGL_NORM_ARG <= x <= MAX_SGL_NORM_ARG +// Possible Overflow p14 - MAX_SGL_NORM_ARG < x < MIN_SGL_OFLOW_ARG +// Certain Overflow p15 - MIN_SGL_OFLOW_ARG <= x < +inf +// +// If the input is really a single arg, then there will never be +// "Possible Overflow" arguments. +// + +{ .mfi + nop.m 0 + // check for overflow + fcmp.ge.s1 p15, p0 = fNormX, fMIN_SGL_OFLOW_ARG + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + // check for underflow and tiny (+0) result + fcmp.le.s1 p11, p0 = fNormX, fMAX_SGL_ZERO_ARG + nop.i 0 +} +{ .mfb + nop.m 0 + fms.s1 fN = fNint, f1, fRightShifter // n in FP register + // branch out if overflow +(p15) br.cond.spnt EXP_CERTAIN_OVERFLOW +} +;; + +{ .mfb + getf.sig rNJ = fNint // bits of n, j + // check for underflow and deno result + fcmp.lt.s1 p13, p0 = fNormX, fMIN_SGL_NORM_ARG + // branch out if underflow and tiny (+0) result +(p11) br.cond.spnt EXP_CERTAIN_UNDERFLOW +} +;; + +{ .mfi + nop.m 0 + // check for possible overflow + fcmp.gt.s1 p14, p0 = fNormX, fMAX_SGL_NORM_ARG + extr.u rJ = rNJ, 0, 6 // bits of j +} +{ .mfi + addl rN = 0xFFFF - 63, rNJ // biased and shifted n + fnma.s1 fR = fLn2Div64, fN, fNormX // R = x - N*ln(2)/64 + nop.i 0 +} +;; + +{ .mfi + shladd rJ = rJ, 3, rTblAddr // address in the 2^(j/64) table + nop.f 0 + shr rN = rN, 6 // biased n +} +;; + +{ .mfi + ld8 rJ = [rJ] + nop.f 0 + shl rN = rN, 52 // 2^n bits in DP format +} +;; + +{ .mfi + or rN = rN, rJ // bits of 2^n * 2^(j/64) in DP format + nop.f 0 + nop.i 0 +} +;; + +{ .mfi + setf.d fT = rN // 2^n * 2^(j/64) + fma.s1 fP = fA3, fR, fA2 // A3*R + A2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fRSqr = fR, fR, f0 // R^2 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fP = fP, fRSqr, fR // P = (A3*R + A2)*R^2 + R + nop.i 0 +} +;; + +{ .mbb + nop.m 0 + // branch out if possible underflow +(p13) br.cond.spnt EXP_POSSIBLE_UNDERFLOW + // branch out if possible overflow result +(p14) br.cond.spnt EXP_POSSIBLE_OVERFLOW +} +;; + +{ .mfb + nop.m 0 + // final result in the absence of over- and underflow + fma.s.s0 f8 = fP, fT, fT + // exit here in the absence of over- and underflow + br.ret.sptk b0 +} +;; + +EXP_POSSIBLE_OVERFLOW: + +// Here if fMAX_SGL_NORM_ARG < x < fMIN_SGL_OFLOW_ARG +// This cannot happen if input is a single, only if input higher precision. +// Overflow is a possibility, not a certainty. + +// Recompute result using status field 2 with user's rounding mode, +// and wre set. If result is larger than largest single, then we have +// overflow + +{ .mfi + mov rGt_ln = 0x1007f // Exponent for largest single + 1 ulp + fsetc.s2 0x7F,0x42 // Get user's round mode, set wre + nop.i 0 +} +;; + +{ .mfi + setf.exp fGt_pln = rGt_ln // Create largest single + 1 ulp + fma.s.s2 fWre_urm_f8 = fP, fT, fT // Result with wre set + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fsetc.s2 0x7F,0x40 // Turn off wre in sf2 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcmp.ge.s1 p6, p0 = fWre_urm_f8, fGt_pln // Test for overflow + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + nop.f 0 +(p6) br.cond.spnt EXP_CERTAIN_OVERFLOW // Branch if overflow +} +;; + +{ .mfb + nop.m 0 + fma.s.s0 f8 = fP, fT, fT + br.ret.sptk b0 // Exit if really no overflow +} +;; + +// here if overflow +EXP_CERTAIN_OVERFLOW: +{ .mmi + addl r17ones_m1 = 0x1FFFE, r0 +;; + setf.exp fTmp = r17ones_m1 + nop.i 0 +} +;; + +{ .mfi + alloc r32=ar.pfs,0,3,4,0 + fmerge.s FR_X = f8,f8 + nop.i 0 +} +{ .mfb + mov GR_Parameter_TAG = 16 + fma.s.s0 FR_RESULT = fTmp, fTmp, fTmp // Set I,O and +INF result + br.cond.sptk __libm_error_region +} +;; + +EXP_POSSIBLE_UNDERFLOW: + +// Here if fMAX_SGL_ZERO_ARG < x < fMIN_SGL_NORM_ARG +// Underflow is a possibility, not a certainty + +// We define an underflow when the answer with +// ftz set +// is zero (tiny numbers become zero) + +// Notice (from below) that if we have an unlimited exponent range, +// then there is an extra machine number E between the largest denormal and +// the smallest normal. + +// So if with unbounded exponent we round to E or below, then we are +// tiny and underflow has occurred. + +// But notice that you can be in a situation where we are tiny, namely +// rounded to E, but when the exponent is bounded we round to smallest +// normal. So the answer can be the smallest normal with underflow. + +// E +// -----+--------------------+--------------------+----- +// | | | +// 1.1...10 2^-3fff 1.1...11 2^-3fff 1.0...00 2^-3ffe +// 0.1...11 2^-3ffe (biased, 1) +// largest dn smallest normal + +{ .mfi + nop.m 0 + fsetc.s2 0x7F,0x41 // Get user's round mode, set ftz + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s.s2 fFtz_urm_f8 = fP, fT, fT // Result with ftz set + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fsetc.s2 0x7F,0x40 // Turn off ftz in sf2 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcmp.eq.s1 p6, p7 = fFtz_urm_f8, f0 // Test for underflow + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s.s0 f8 = fP, fT, fT // Compute result, set I, maybe U + nop.i 0 +} +;; + +{ .mbb + nop.m 0 +(p6) br.cond.spnt EXP_UNDERFLOW_COMMON // Branch if really underflow +(p7) br.ret.sptk b0 // Exit if really no underflow +} +;; + +EXP_CERTAIN_UNDERFLOW: +// Here if x < fMAX_SGL_ZERO_ARG +// Result will be zero (or smallest denorm if round to +inf) with I, U set +{ .mmi + mov rTmp = 1 +;; + setf.exp fTmp = rTmp // Form small normal + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fmerge.se fTmp = fTmp, f64DivLn2 // Small with non-trial signif + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + fma.s.s0 f8 = fTmp, fTmp, f0 // Set I,U, tiny (+0.0) result + br.cond.sptk EXP_UNDERFLOW_COMMON +} +;; + +EXP_UNDERFLOW_COMMON: +// Determine if underflow result is zero or nonzero +{ .mfi + alloc r32=ar.pfs,0,3,4,0 + fcmp.eq.s1 p6, p0 = f8, f0 + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + fmerge.s FR_X = fNormX,fNormX +(p6) br.cond.spnt EXP_UNDERFLOW_ZERO +} +;; + +EXP_UNDERFLOW_NONZERO: +// Here if x < fMIN_SGL_NORM_ARG and result nonzero; +// I, U are set +{ .mfb + mov GR_Parameter_TAG = 17 + nop.f 0 // FR_RESULT already set + br.cond.sptk __libm_error_region +} +;; + +EXP_UNDERFLOW_ZERO: +// Here if x < fMIN_SGL_NORM_ARG and result zero; +// I, U are set +{ .mfb + mov GR_Parameter_TAG = 17 + nop.f 0 // FR_RESULT already set + br.cond.sptk __libm_error_region +} +;; + +GLOBAL_IEEE754_END(expf) + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfs [GR_Parameter_Y] = FR_Y,16 // Store Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; +.body +{ .mfi + stfs [GR_Parameter_X] = FR_X // Store Parameter 1 on stack + nop.f 0 + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address +} +{ .mib + stfs [GR_Parameter_Y] = FR_RESULT // Store Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; + +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; + +{ .mmi + ldfs f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) + + +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/e_expl.c b/sysdeps/ia64/fpu/e_expl.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/e_expl.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/e_fmod.S b/sysdeps/ia64/fpu/e_fmod.S new file mode 100644 index 0000000000..dbd0a29698 --- /dev/null +++ b/sysdeps/ia64/fpu/e_fmod.S @@ -0,0 +1,559 @@ +.file "fmod.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//==================================================================== +// 02/02/00 Initial version +// 03/02/00 New Algorithm +// 04/04/00 Unwind support added +// 08/15/00 Bundle added after call to __libm_error_support to properly +// set [the previously overwritten] GR_Parameter_RESULT. +// 11/28/00 Set FR_Y to f9 +// 03/11/02 Fixed flags for fmod(qnan,zero) +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// 04/28/03 Fix: fmod(sNaN,0) no longer sets errno +// +// API +//==================================================================== +// double fmod(double,double); +// +// Overview of operation +//==================================================================== +// fmod(a,b)=a-i*b, +// where i is an integer such that, if b!=0, +// |i|<|a/b| and |a/b-i|<1 +// +// Algorithm +//==================================================================== +// a). if |a|<|b|, return a +// b). get quotient and reciprocal overestimates accurate to +// 33 bits (q2,y2) +// c). if the exponent difference (exponent(a)-exponent(b)) +// is less than 32, truncate quotient to integer and +// finish in one iteration +// d). if exponent(a)-exponent(b)>=32 (q2>=2^32) +// round quotient estimate to single precision (k=RN(q2)), +// calculate partial remainder (a'=a-k*b), +// get quotient estimate (a'*y2), and repeat from c). +// +// Special cases +//==================================================================== +// b=+/-0: return NaN, call libm_error_support +// a=+/-Inf, a=NaN or b=NaN: return NaN +// +// Registers used +//==================================================================== +// Predicate registers: p6-p11 +// General registers: r2,r29,r32 (ar.pfs), r33-r39 +// Floating point registers: f6-f15 + +GR_SAVE_B0 = r33 +GR_SAVE_PFS = r34 +GR_SAVE_GP = r35 +GR_SAVE_SP = r36 + +GR_Parameter_X = r37 +GR_Parameter_Y = r38 +GR_Parameter_RESULT = r39 +GR_Parameter_TAG = r40 + +FR_X = f10 +FR_Y = f9 +FR_RESULT = f8 + + +.section .text +GLOBAL_IEEE754_ENTRY(fmod) + +// inputs in f8, f9 +// result in f8 + +{ .mfi + alloc r32=ar.pfs,1,4,4,0 + // f6=|a| + fmerge.s f6=f0,f8 + mov r2 = 0x0ffdd +} + {.mfi + nop.m 0 + // f7=|b| + fmerge.s f7=f0,f9 + nop.i 0;; +} + +{ .mfi + setf.exp f11 = r2 + // (1) y0 + frcpa.s1 f10,p6=f6,f7 + nop.i 0 +} + +// Y +-NAN, +-inf, +-0? p7 +{ .mfi + nop.m 999 + fclass.m.unc p7,p0 = f9, 0xe7 + nop.i 999;; +} + +// qnan snan inf norm unorm 0 -+ +// 1 1 1 0 0 0 11 +// e 3 +// X +-NAN, +-inf, ? p9 + +{ .mfi + nop.m 999 + fclass.m.unc p9,p0 = f8, 0xe3 + nop.i 999 +} + +// |x| < |y|? Return x p8 +{ .mfi + nop.m 999 + fcmp.lt.unc.s1 p8,p0 = f6,f7 + nop.i 999 ;; +} + +{ .mfi + nop.m 0 + // normalize y (if |x|<|y|) + (p8) fma.s0 f9=f9,f1,f0 + nop.i 0;; +} + + { .mfi + mov r2=0x1001f + // (2) q0=a*y0 + (p6) fma.s1 f13=f6,f10,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + // (3) e0 = 1 - b * y0 + (p6) fnma.s1 f12=f7,f10,f1 + nop.i 0;; +} + + {.mfi + nop.m 0 + // normalize x (if |x|<|y|) + (p8) fma.d.s0 f8=f8,f1,f0 + nop.i 0 +} +{.bbb + (p9) br.cond.spnt FMOD_X_NAN_INF + (p7) br.cond.spnt FMOD_Y_NAN_INF_ZERO + // if |x|<|y|, return + (p8) br.ret.spnt b0;; +} + + {.mfi + nop.m 0 + // normalize x + fma.s0 f6=f6,f1,f0 + nop.i 0 +} +{.mfi + nop.m 0 + // normalize y + fma.s0 f7=f7,f1,f0 + nop.i 0;; +} + + {.mfi + // f15=2^32 + setf.exp f15=r2 + // (4) q1=q0+e0*q0 + (p6) fma.s1 f13=f12,f13,f13 + nop.i 0 +} +{ .mfi + nop.m 0 + // (5) e1 = e0 * e0 + 2^-34 + (p6) fma.s1 f14=f12,f12,f11 + nop.i 0;; +} +{.mlx + nop.m 0 + movl r2=0x33a00000;; +} +{ .mfi + nop.m 0 + // (6) y1 = y0 + e0 * y0 + (p6) fma.s1 f10=f12,f10,f10 + nop.i 0;; +} +{.mfi + // set f12=1.25*2^{-24} + setf.s f12=r2 + // (7) q2=q1+e1*q1 + (p6) fma.s1 f13=f13,f14,f13 + nop.i 0;; +} +{.mfi + nop.m 0 + fmerge.s f9=f8,f9 + nop.i 0 +} +{ .mfi + nop.m 0 + // (8) y2 = y1 + e1 * y1 + (p6) fma.s1 f10=f14,f10,f10 + // set p6=0, p10=0 + cmp.ne.and p6,p10=r0,r0;; +} + +.align 32 +loop53: + {.mfi + nop.m 0 + // compare q2, 2^32 + fcmp.lt.unc.s1 p8,p7=f13,f15 + nop.i 0 +} + {.mfi + nop.m 0 + // will truncate quotient to integer, if exponent<32 (in advance) + fcvt.fx.trunc.s1 f11=f13 + nop.i 0;; +} + {.mfi + nop.m 0 + // if exponent>32, round quotient to single precision (perform in advance) + fma.s.s1 f13=f13,f1,f0 + nop.i 0;; +} + {.mfi + nop.m 0 + // set f12=sgn(a) + (p8) fmerge.s f12=f8,f1 + nop.i 0 +} + {.mfi + nop.m 0 + // normalize truncated quotient + (p8) fcvt.xf f13=f11 + nop.i 0;; +} + { .mfi + nop.m 0 + // calculate remainder (assuming f13=RZ(Q)) + (p7) fnma.s1 f14=f13,f7,f6 + nop.i 0 +} + {.mfi + nop.m 0 + // also if exponent>32, round quotient to single precision + // and subtract 1 ulp: q=q-q*(1.25*2^{-24}) + (p7) fnma.s.s1 f11=f13,f12,f13 + nop.i 0;; +} + + {.mfi + nop.m 0 + // (p8) calculate remainder (82-bit format) + (p8) fnma.s1 f11=f13,f7,f6 + nop.i 0 +} + {.mfi + nop.m 0 + // (p7) calculate remainder (assuming f11=RZ(Q)) + (p7) fnma.s1 f6=f11,f7,f6 + nop.i 0;; +} + + + {.mfi + nop.m 0 + // Final iteration (p8): is f6 the correct remainder (quotient was not overestimated) ? + (p8) fcmp.lt.unc.s1 p6,p10=f11,f0 + nop.i 0;; +} + {.mfi + nop.m 0 + // get new quotient estimation: a'*y2 + (p7) fma.s1 f13=f14,f10,f0 + nop.i 0 +} + {.mfb + nop.m 0 + // was f14=RZ(Q) ? (then new remainder f14>=0) + (p7) fcmp.lt.unc.s1 p7,p9=f14,f0 + nop.b 0;; +} + + +.pred.rel "mutex",p6,p10 + {.mfb + nop.m 0 + // add b to estimated remainder (to cover the case when the quotient was overestimated) + // also set correct sign by using f9=|b|*sgn(a), f12=sgn(a) + (p6) fma.d.s0 f8=f11,f12,f9 + nop.b 0 +} + {.mfb + nop.m 0 + // calculate remainder (single precision) + // set correct sign of result before returning + (p10) fma.d.s0 f8=f11,f12,f0 + (p8) br.ret.sptk b0;; +} + {.mfi + nop.m 0 + // if f13!=RZ(Q), get alternative quotient estimation: a''*y2 + (p7) fma.s1 f13=f6,f10,f0 + nop.i 0 +} + {.mfb + nop.m 0 + // if f14 was RZ(Q), set remainder to f14 + (p9) mov f6=f14 + br.cond.sptk loop53;; +} + + + +FMOD_X_NAN_INF: + +// Y zero ? +{.mfi + nop.m 0 + fclass.m p10,p0=f8,0xc3 // Test x=nan + nop.i 0 +} +{.mfi + nop.m 0 + fma.s1 f10=f9,f1,f0 + nop.i 0;; +} + +{.mfi + nop.m 0 + fma.s0 f8=f8,f1,f0 + nop.i 0 +} +{.mfi + nop.m 0 +(p10) fclass.m p10,p0=f9,0x07 // Test x=nan, and y=zero + nop.i 0;; +} + +{.mfb + nop.m 0 + fcmp.eq.unc.s1 p11,p0=f10,f0 +(p10) br.ret.spnt b0;; // Exit with result=x if x=nan and y=zero +} +{.mib + nop.m 0 + nop.i 0 + // if Y zero + (p11) br.cond.spnt FMOD_Y_ZERO;; +} + +// X infinity? Return QNAN indefinite +{ .mfi + nop.m 999 + fclass.m.unc p8,p9 = f8, 0x23 + nop.i 999;; +} +// Y NaN ? +{.mfi + nop.m 999 +(p8) fclass.m p9,p8=f9,0xc3 + nop.i 0;; +} +{.mfi + nop.m 999 +(p8) frcpa.s0 f8,p0 = f8,f8 + nop.i 0 +} +{ .mfi + nop.m 999 + // also set Denormal flag if necessary +(p8) fma.s0 f9=f9,f1,f0 + nop.i 999 ;; +} + +{ .mfb + nop.m 999 +(p8) fma.d.s0 f8=f8,f1,f0 + nop.b 999 ;; +} + +{ .mfb + nop.m 999 +(p9) frcpa.s0 f8,p7=f8,f9 + br.ret.sptk b0 ;; +} + + +FMOD_Y_NAN_INF_ZERO: + +// Y INF +{ .mfi + nop.m 999 + fclass.m.unc p7,p0 = f9, 0x23 + nop.i 999 ;; +} + +{ .mfb + nop.m 999 +(p7) fma.d.s0 f8=f8,f1,f0 +(p7) br.ret.spnt b0 ;; +} + +// Y NAN? +{ .mfi + nop.m 999 + fclass.m.unc p9,p0 = f9, 0xc3 + nop.i 999 ;; +} + +{ .mfb + nop.m 999 +(p9) fma.d.s0 f8=f9,f1,f0 +(p9) br.ret.spnt b0 ;; +} + +FMOD_Y_ZERO: +// Y zero? Must be zero at this point +// because it is the only choice left. +// Return QNAN indefinite + +{.mfi + nop.m 0 + // set Invalid + frcpa.s0 f12,p0=f0,f0 + nop.i 0 +} +// X NAN? +{ .mfi + nop.m 999 + fclass.m.unc p9,p10 = f8, 0xc3 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p10) fclass.nm p9,p10 = f8, 0xff + nop.i 999 ;; +} + +{.mfi + nop.m 999 + (p9) frcpa.s0 f11,p7=f8,f0 + nop.i 0;; +} + +{ .mfi + nop.m 999 +(p10) frcpa.s0 f11,p7 = f9,f9 + mov GR_Parameter_TAG = 121 ;; +} + +{ .mfi + nop.m 999 + fmerge.s f10 = f8, f8 + nop.i 999 +} + +{ .mfb + nop.m 999 + fma.d.s0 f8=f11,f1,f0 + br.sptk __libm_error_region;; +} + +GLOBAL_IEEE754_END(fmod) + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfd [GR_Parameter_Y] = FR_Y,16 // Save Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; +.body +{ .mib + stfd [GR_Parameter_X] = FR_X // Store Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y + nop.b 0 // Parameter 3 address +} +{ .mib + stfd [GR_Parameter_Y] = FR_RESULT // Store Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + nop.m 0 + nop.m 0 + add GR_Parameter_RESULT = 48,sp +};; +{ .mmi + ldfd f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) + + +.type __libm_error_support#,@function +.global __libm_error_support# + + + + diff --git a/sysdeps/ia64/fpu/e_fmodf.S b/sysdeps/ia64/fpu/e_fmodf.S new file mode 100644 index 0000000000..36e5807291 --- /dev/null +++ b/sysdeps/ia64/fpu/e_fmodf.S @@ -0,0 +1,571 @@ +.file "fmodf.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//==================================================================== +// 02/02/00 Initial version +// 03/02/00 New Algorithm +// 04/04/00 Unwind support added +// 08/15/00 Bundle added after call to __libm_error_support to properly +// set [the previously overwritten] GR_Parameter_RESULT. +// 11/28/00 Set FR_Y to f9 +// 03/11/02 Fixed flags for fmodf(qnan,zero) +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// 04/28/03 Fix: fmod(sNaN,0) no longer sets errno +// +// API +//==================================================================== +// float fmodf(float,float); +// +// Overview of operation +//==================================================================== +// fmod(a,b)=a-i*b, +// where i is an integer such that, if b!=0, +// |i|<|a/b| and |a/b-i|<1 + +// Algorithm +//==================================================================== +// a). if |a|<|b|, return a +// b). get quotient and reciprocal overestimates accurate to +// 33 bits (q2,y2) +// c). if the exponent difference (exponent(a)-exponent(b)) +// is less than 32, truncate quotient to integer and +// finish in one iteration +// d). if exponent(a)-exponent(b)>=32 (q2>=2^32) +// round quotient estimate to single precision (k=RN(q2)), +// calculate partial remainder (a'=a-k*b), +// get quotient estimate (a'*y2), and repeat from c). + +// Special cases +//==================================================================== +// b=+/-0: return NaN, call libm_error_support +// a=+/-Inf, a=NaN or b=NaN: return NaN + +// Registers used +//==================================================================== +// Predicate registers: p6-p11 +// General registers: r2,r29,r32 (ar.pfs), r33-r39 +// Floating point registers: f6-f15 + +GR_SAVE_B0 = r33 +GR_SAVE_PFS = r34 +GR_SAVE_GP = r35 +GR_SAVE_SP = r36 + +GR_Parameter_X = r37 +GR_Parameter_Y = r38 +GR_Parameter_RESULT = r39 +GR_Parameter_TAG = r40 + +FR_X = f10 +FR_Y = f9 +FR_RESULT = f8 + + +.section .text +GLOBAL_IEEE754_ENTRY(fmodf) + +// inputs in f8, f9 +// result in f8 + +{ .mfi + alloc r32=ar.pfs,1,4,4,0 + // f6=|a| + fmerge.s f6=f0,f8 + mov r2 = 0x0ffdd +} + {.mfi + nop.m 0 + // f7=|b| + fmerge.s f7=f0,f9 + nop.i 0;; +} + +{ .mfi + setf.exp f11 = r2 + // (1) y0 + frcpa.s1 f10,p6=f6,f7 + nop.i 0 +} + +// eliminate special cases +// Y +-NAN, +-inf, +-0? p7 +{ .mfi + nop.m 999 + fclass.m.unc p7,p0 = f9, 0xe7 + nop.i 999;; +} + +// qnan snan inf norm unorm 0 -+ +// 1 1 1 0 0 0 11 +// e 3 +// X +-NAN, +-inf, ? p9 + +{ .mfi + nop.m 999 + fclass.m.unc p9,p0 = f8, 0xe3 + nop.i 999 +} + +// |x| < |y|? Return x p8 +{ .mfi + nop.m 999 + fcmp.lt.unc.s1 p8,p0 = f6,f7 + nop.i 999 ;; +} + +{ .mfi + nop.m 0 + // normalize y (if |x|<|y|) + (p8) fma.s0 f9=f9,f1,f0 + nop.i 0;; +} + + { .mfi + mov r2=0x1001f + // (2) q0=a*y0 + (p6) fma.s1 f13=f6,f10,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + // (3) e0 = 1 - b * y0 + (p6) fnma.s1 f12=f7,f10,f1 + nop.i 0;; +} + + {.mfi + nop.m 0 + // normalize x (if |x|<|y|) + (p8) fma.s.s0 f8=f8,f1,f0 + nop.i 0 +} +{.bbb + (p9) br.cond.spnt FMOD_X_NAN_INF + (p7) br.cond.spnt FMOD_Y_NAN_INF_ZERO + // if |x|<|y|, return + (p8) br.ret.spnt b0;; +} + + {.mfi + nop.m 0 + // normalize x + fma.s0 f6=f6,f1,f0 + nop.i 0 +} +{.mfi + nop.m 0 + // normalize y + fma.s0 f7=f7,f1,f0 + nop.i 0;; +} + + + {.mfi + // f15=2^32 + setf.exp f15=r2 + // (4) q1=q0+e0*q0 + (p6) fma.s1 f13=f12,f13,f13 + nop.i 0 +} +{ .mfi + nop.m 0 + // (5) e1 = e0 * e0 + 2^-34 + (p6) fma.s1 f14=f12,f12,f11 + nop.i 0;; +} +{.mlx + nop.m 0 + movl r2=0x33a00000;; +} +{ .mfi + nop.m 0 + // (6) y1 = y0 + e0 * y0 + (p6) fma.s1 f10=f12,f10,f10 + nop.i 0;; +} +{.mfi + // set f12=1.25*2^{-24} + setf.s f12=r2 + // (7) q2=q1+e1*q1 + (p6) fma.s1 f13=f13,f14,f13 + nop.i 0;; +} +{.mfi + nop.m 0 + fmerge.s f9=f8,f9 + nop.i 0 +} +{ .mfi + nop.m 0 + // (8) y2 = y1 + e1 * y1 + (p6) fma.s1 f10=f14,f10,f10 + // set p6=0, p10=0 + cmp.ne.and p6,p10=r0,r0;; +} + +.align 32 +loop24: + {.mfi + nop.m 0 + // compare q2, 2^32 + fcmp.lt.unc.s1 p8,p7=f13,f15 + nop.i 0 +} + {.mfi + nop.m 0 + // will truncate quotient to integer, if exponent<32 (in advance) + fcvt.fx.trunc.s1 f11=f13 + nop.i 0;; +} + {.mfi + nop.m 0 + // if exponent>32, round quotient to single precision (perform in advance) + fma.s.s1 f13=f13,f1,f0 + nop.i 0;; +} + {.mfi + nop.m 0 + // set f12=sgn(a) + (p8) fmerge.s f12=f8,f1 + nop.i 0 +} + {.mfi + nop.m 0 + // normalize truncated quotient + (p8) fcvt.xf f13=f11 + nop.i 0;; +} + { .mfi + nop.m 0 + // calculate remainder (assuming f13=RZ(Q)) + (p7) fnma.s1 f14=f13,f7,f6 + nop.i 0 +} + {.mfi + nop.m 0 + // also if exponent>32, round quotient to single precision + // and subtract 1 ulp: q=q-q*(1.25*2^{-24}) + (p7) fnma.s.s1 f11=f13,f12,f13 + nop.i 0;; +} + + {.mfi + nop.m 0 + // (p8) calculate remainder (82-bit format) + (p8) fnma.s1 f11=f13,f7,f6 + nop.i 0 +} + {.mfi + nop.m 0 + // (p7) calculate remainder (assuming f11=RZ(Q)) + (p7) fnma.s1 f6=f11,f7,f6 + nop.i 0;; +} + + + {.mfi + nop.m 0 + // Final iteration (p8): is f6 the correct remainder (quotient was not overestimated) ? + (p8) fcmp.lt.unc.s1 p6,p10=f11,f0 + nop.i 0;; +} + {.mfi + nop.m 0 + // get new quotient estimation: a'*y2 + (p7) fma.s1 f13=f14,f10,f0 + nop.i 0 +} + {.mfb + nop.m 0 + // was f14=RZ(Q) ? (then new remainder f14>=0) + (p7) fcmp.lt.unc.s1 p7,p9=f14,f0 + nop.b 0;; +} + + +.pred.rel "mutex",p6,p10 + {.mfb + nop.m 0 + // add b to estimated remainder (to cover the case when the quotient was overestimated) + // also set correct sign by using f9=|b|*sgn(a), f12=sgn(a) + (p6) fma.s.s0 f8=f11,f12,f9 + nop.b 0 +} + {.mfb + nop.m 0 + // calculate remainder (single precision) + // set correct sign of result before returning + (p10) fma.s.s0 f8=f11,f12,f0 + (p8) br.ret.sptk b0;; +} + {.mfi + nop.m 0 + // if f13!=RZ(Q), get alternative quotient estimation: a''*y2 + (p7) fma.s1 f13=f6,f10,f0 + nop.i 0 +} + {.mfb + nop.m 0 + // if f14 was RZ(Q), set remainder to f14 + (p9) mov f6=f14 + br.cond.sptk loop24;; +} + + { .mmb + nop.m 0 + nop.m 0 + br.ret.sptk b0;; + } + +FMOD_X_NAN_INF: + + +// Y zero ? +{.mfi + nop.m 0 + fclass.m p10,p0=f8,0xc3 // Test x=nan + nop.i 0 +} +{.mfi + nop.m 0 + fma.s1 f10=f9,f1,f0 + nop.i 0;; +} + +{.mfi + nop.m 0 + fma.s0 f8=f8,f1,f0 + nop.i 0 +} +{.mfi + nop.m 0 +(p10) fclass.m p10,p0=f9,0x07 // Test x=nan, and y=zero + nop.i 0;; +} +{.mfb + nop.m 0 + fcmp.eq.unc.s1 p11,p0=f10,f0 +(p10) br.ret.spnt b0;; // Exit with result=x if x=nan and y=zero +} +{.mib + nop.m 0 + nop.i 0 + // if Y zero + (p11) br.cond.spnt FMOD_Y_ZERO;; +} + +// X infinity? Return QNAN indefinite +{ .mfi + nop.m 999 + fclass.m.unc p8,p9 = f8, 0x23 + nop.i 999;; +} +// Y NaN ? +{.mfi + nop.m 999 +(p8) fclass.m p9,p8=f9,0xc3 + nop.i 0;; +} +{.mfi + nop.m 999 +(p8) frcpa.s0 f8,p0 = f8,f8 + nop.i 0 +} +{ .mfi + nop.m 999 + // also set Denormal flag if necessary +(p8) fma.s0 f9=f9,f1,f0 + nop.i 999 ;; +} + +{ .mfb + nop.m 999 +(p8) fma.s.s0 f8=f8,f1,f0 + nop.b 999 ;; +} + +{ .mfb + nop.m 999 +(p9) frcpa.s0 f8,p7=f8,f9 + br.ret.sptk b0 ;; +} + + +FMOD_Y_NAN_INF_ZERO: + +// Y INF +{ .mfi + nop.m 999 + fclass.m.unc p7,p0 = f9, 0x23 + nop.i 999 ;; +} + +{ .mfb + nop.m 999 +(p7) fma.s.s0 f8=f8,f1,f0 +(p7) br.ret.spnt b0 ;; +} + +// Y NAN? +{ .mfi + nop.m 999 + fclass.m.unc p9,p0 = f9, 0xc3 + nop.i 999 ;; +} + +{ .mfb + nop.m 999 +(p9) fma.s.s0 f8=f9,f1,f0 +(p9) br.ret.spnt b0 ;; +} + +FMOD_Y_ZERO: +// Y zero? Must be zero at this point +// because it is the only choice left. +// Return QNAN indefinite + +{.mfi + nop.m 0 + // set Invalid + frcpa.s0 f12,p0=f0,f0 + nop.i 999 +} +// X NAN? +{ .mfi + nop.m 999 + fclass.m.unc p9,p10 = f8, 0xc3 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p10) fclass.nm p9,p10 = f8, 0xff + nop.i 999 ;; +} + +{.mfi + nop.m 999 + (p9) frcpa.s0 f11,p7=f8,f0 + nop.i 0;; +} + +{ .mfi + nop.m 999 +(p10) frcpa.s0 f11,p7 = f0,f0 +nop.i 999;; +} + +{ .mfi + nop.m 999 + fmerge.s f10 = f8, f8 + nop.i 999 +} + +{ .mfi + nop.m 999 + fma.s.s0 f8=f11,f1,f0 + nop.i 999;; +} + +EXP_ERROR_RETURN: + + +{ .mib + nop.m 0 + mov GR_Parameter_TAG=122 + br.sptk __libm_error_region;; +} + +GLOBAL_IEEE754_END(fmodf) + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfs [GR_Parameter_Y] = FR_Y,16 // Save Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; +.body +{ .mib + stfs [GR_Parameter_X] = FR_X // Store Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y + nop.b 0 // Parameter 3 address +} +{ .mib + stfs [GR_Parameter_Y] = FR_RESULT // Store Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support#;; // Call error handling function +} +{ .mmi + nop.m 0 + nop.m 0 + add GR_Parameter_RESULT = 48,sp +};; +{ .mmi + ldfs f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) + +.type __libm_error_support#,@function +.global __libm_error_support# + + diff --git a/sysdeps/ia64/fpu/e_fmodl.S b/sysdeps/ia64/fpu/e_fmodl.S new file mode 100644 index 0000000000..3e87eb090f --- /dev/null +++ b/sysdeps/ia64/fpu/e_fmodl.S @@ -0,0 +1,672 @@ +.file "fmodl.s" + + +// Copyright (c) 2000 - 2004, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//==================================================================== +// 02/02/00 Initial version +// 03/02/00 New Algorithm +// 04/04/00 Unwind support added +// 08/15/00 Bundle added after call to __libm_error_support to properly +// set [ the previously overwritten ] GR_Parameter_RESULT. +// 11/28/00 Set FR_Y to f9 +// 03/11/02 Fixed flags for fmodl(qnan, zero) +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header:.section,.global,.proc,.align +// 04/28/03 Fix: fmod(sNaN, 0) no longer sets errno +// 11/23/04 Reformatted routine and improved speed +// +// API +//==================================================================== +// long double fmodl(long double, long double); +// +// Overview of operation +//==================================================================== +// fmod(a, b)= a-i*b, +// where i is an integer such that, if b!= 0, +// |i|<|a/b| and |a/b-i|<1 +// +// Algorithm +//==================================================================== +// a). if |a|<|b|, return a +// b). get quotient and reciprocal overestimates accurate to +// 33 bits (q2, y2) +// c). if the exponent difference (exponent(a)-exponent(b)) +// is less than 32, truncate quotient to integer and +// finish in one iteration +// d). if exponent(a)-exponent(b)>= 32 (q2>= 2^32) +// round quotient estimate to single precision (k= RN(q2)), +// calculate partial remainder (a'= a-k*b), +// get quotient estimate (a'*y2), and repeat from c). +// +// Registers used +//==================================================================== + +GR_SMALLBIASEXP = r2 +GR_2P32 = r3 +GR_SMALLBIASEXP = r20 +GR_ROUNDCONST = r21 +GR_SIG_B = r22 +GR_ARPFS = r23 +GR_TMP1 = r24 +GR_TMP2 = r25 +GR_TMP3 = r26 + +GR_SAVE_B0 = r33 +GR_SAVE_PFS = r34 +GR_SAVE_GP = r35 +GR_SAVE_SP = r36 + +GR_Parameter_X = r37 +GR_Parameter_Y = r38 +GR_Parameter_RESULT = r39 +GR_Parameter_TAG = r40 + +FR_X = f10 +FR_Y = f9 +FR_RESULT = f8 + +FR_ABS_A = f6 +FR_ABS_B = f7 +FR_Y_INV = f10 +FR_SMALLBIAS = f11 +FR_E0 = f12 +FR_Q = f13 +FR_E1 = f14 +FR_2P32 = f15 +FR_TMPX = f32 +FR_TMPY = f33 +FR_ROUNDCONST = f34 +FR_QINT = f35 +FR_QRND24 = f36 +FR_NORM_B = f37 +FR_TMP = f38 +FR_TMP2 = f39 +FR_DFLAG = f40 +FR_Y_INV0 = f41 +FR_Y_INV1 = f42 +FR_Q0 = f43 +FR_Q1 = f44 +FR_QINT_Z = f45 +FR_QREM = f46 +FR_B_SGN_A = f47 + +.section .text +GLOBAL_IEEE754_ENTRY(fmodl) + +// inputs in f8, f9 +// result in f8 + +{ .mfi + getf.sig GR_SIG_B = f9 + // FR_ABS_A = |a| + fmerge.s FR_ABS_A = f0, f8 + mov GR_SMALLBIASEXP = 0x0ffdd +} +{ .mfi + nop.m 0 + // FR_ABS_B = |b| + fmerge.s FR_ABS_B = f0, f9 + nop.i 0 +} +;; + +{ .mfi + setf.exp FR_SMALLBIAS = GR_SMALLBIASEXP + // (1) y0 + frcpa.s1 FR_Y_INV0, p6 = FR_ABS_A, FR_ABS_B + nop.i 0 +} +;; + +{ .mlx + nop.m 0 + movl GR_ROUNDCONST = 0x33a00000 +} +;; + +// eliminate special cases +{ .mmi + nop.m 0 + nop.m 0 + // y pseudo-zero ? + cmp.eq p7, p10 = GR_SIG_B, r0 +} +;; + +// set p7 if b +/-NAN, +/-inf, +/-0 +{ .mfi + nop.m 0 + (p10) fclass.m p7, p10 = f9, 0xe7 + nop.i 0 +} +;; + +{ .mfi + mov GR_2P32 = 0x1001f + // (2) q0 = a*y0 + (p6) fma.s1 FR_Q0 = FR_ABS_A, FR_Y_INV0, f0 + nop.i 0 +} +{ .mfi + nop.m 0 + // (3) e0 = 1 - b * y0 + (p6) fnma.s1 FR_E0 = FR_ABS_B, FR_Y_INV0, f1 + nop.i 0 +} +;; + +// set p9 if a +/-NAN, +/-inf +{ .mfi + nop.m 0 + fclass.m.unc p9, p11 = f8, 0xe3 + nop.i 0 +} + // |a| < |b|? Return a, p8=1 +{ .mfi + nop.m 0 + (p10) fcmp.lt.unc.s1 p8, p0 = FR_ABS_A, FR_ABS_B + nop.i 0 +} +;; + +// set p7 if b +/-NAN, +/-inf, +/-0 +{ .mfi + nop.m 0 + // pseudo-NaN ? + (p10) fclass.nm p7, p0 = f9, 0xff + nop.i 0 +} +;; + +// set p9 if a is +/-NaN, +/-Inf +{ .mfi + nop.m 0 + (p11) fclass.nm p9, p0 = f8, 0xff + nop.i 0 +} +{ .mfi + nop.m 0 + // b denormal ? set D flag (if |a|<|b|) + (p8) fnma.s0 FR_DFLAG = f9, f1, f9 + nop.i 0 +} +;; + +{ .mfi + // FR_2P32 = 2^32 + setf.exp FR_2P32 = GR_2P32 + // (4) q1 = q0+e0*q0 + (p6) fma.s1 FR_Q1 = FR_E0, FR_Q0, FR_Q0 + nop.i 0 +} +{ .mfi + nop.m 0 + // (5) e1 = e0 * e0 + 2^-34 + (p6) fma.s1 FR_E1 = FR_E0, FR_E0, FR_SMALLBIAS + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + // normalize a (if |a|<|b|) + (p8) fma.s0 f8 = f8, f1, f0 + nop.i 0 +} +{ .bbb + (p9) br.cond.spnt FMOD_A_NAN_INF + (p7) br.cond.spnt FMOD_B_NAN_INF_ZERO + // if |a|<|b|, return + (p8) br.ret.spnt b0 +} +;; + + +{ .mfi + nop.m 0 + // (6) y1 = y0 + e0 * y0 + (p6) fma.s1 FR_Y_INV1 = FR_E0, FR_Y_INV0, FR_Y_INV0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + // a denormal ? set D flag + // b denormal ? set D flag + fcmp.eq.s0 p12,p0 = FR_ABS_A, FR_ABS_B + nop.i 0 +} +{ .mfi + // set FR_ROUNDCONST = 1.25*2^{-24} + setf.s FR_ROUNDCONST = GR_ROUNDCONST + // (7) q2 = q1+e1*q1 + (p6) fma.s1 FR_Q = FR_Q1, FR_E1, FR_Q1 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fmerge.s FR_B_SGN_A = f8, f9 + nop.i 0 +} +{ .mfi + nop.m 0 + // (8) y2 = y1 + e1 * y1 + (p6) fma.s1 FR_Y_INV = FR_E1, FR_Y_INV1, FR_Y_INV1 + // set p6 = 0, p10 = 0 + cmp.ne.and p6, p10 = r0, r0 +} +;; + +// will compute integer quotient bits (24 bits per iteration) +.align 32 +loop64: +{ .mfi + nop.m 0 + // compare q2, 2^32 + fcmp.lt.unc.s1 p8, p7 = FR_Q, FR_2P32 + nop.i 0 +} +{ .mfi + nop.m 0 + // will truncate quotient to integer, if exponent<32 (in advance) + fcvt.fx.trunc.s1 FR_QINT = FR_Q + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + // if exponent>32 round quotient to single precision (perform in advance) + fma.s.s1 FR_QRND24 = FR_Q, f1, f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + // set FR_ROUNDCONST = sgn(a) + (p8) fmerge.s FR_ROUNDCONST = f8, f1 + nop.i 0 +} +{ .mfi + nop.m 0 + // normalize truncated quotient + (p8) fcvt.xf FR_QRND24 = FR_QINT + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + // calculate remainder (assuming FR_QRND24 = RZ(Q)) + (p7) fnma.s1 FR_E1 = FR_QRND24, FR_ABS_B, FR_ABS_A + nop.i 0 +} +{ .mfi + nop.m 0 + // also if exponent>32, round quotient to single precision + // and subtract 1 ulp: q = q-q*(1.25*2^{-24}) + (p7) fnma.s.s1 FR_QINT_Z = FR_QRND24, FR_ROUNDCONST, FR_QRND24 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + // (p8) calculate remainder (82-bit format) + (p8) fnma.s1 FR_QREM = FR_QRND24, FR_ABS_B, FR_ABS_A + nop.i 0 +} +{ .mfi + nop.m 0 + // (p7) calculate remainder (assuming FR_QINT_Z = RZ(Q)) + (p7) fnma.s1 FR_ABS_A = FR_QINT_Z, FR_ABS_B, FR_ABS_A + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + // Final iteration (p8): is FR_ABS_A the correct remainder + // (quotient was not overestimated) ? + (p8) fcmp.lt.unc.s1 p6, p10 = FR_QREM, f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + // get new quotient estimation: a'*y2 + (p7) fma.s1 FR_Q = FR_E1, FR_Y_INV, f0 + nop.i 0 +} +{ .mfb + nop.m 0 + // was FR_Q = RZ(Q) ? (then new remainder FR_E1> = 0) + (p7) fcmp.lt.unc.s1 p7, p9 = FR_E1, f0 + nop.b 0 +} +;; + +.pred.rel "mutex", p6, p10 +{ .mfb + nop.m 0 + // add b to estimated remainder (to cover the case when the quotient was + // overestimated) + // also set correct sign by using + // FR_B_SGN_A = |b|*sgn(a), FR_ROUNDCONST = sgn(a) + (p6) fma.s0 f8 = FR_QREM, FR_ROUNDCONST, FR_B_SGN_A + nop.b 0 +} +{ .mfb + nop.m 0 + // set correct sign of result before returning: FR_ROUNDCONST = sgn(a) + (p10) fma.s0 f8 = FR_QREM, FR_ROUNDCONST, f0 + (p8) br.ret.sptk b0 +} +;; + +{ .mfi + nop.m 0 + // if f13! = RZ(Q), get alternative quotient estimation: a''*y2 + (p7) fma.s1 FR_Q = FR_ABS_A, FR_Y_INV, f0 + nop.i 0 +} +{ .mfb + nop.m 0 + // if FR_E1 was RZ(Q), set remainder to FR_E1 + (p9) fma.s1 FR_ABS_A = FR_E1, f1, f0 + br.cond.sptk loop64 +} +;; + +FMOD_A_NAN_INF: + +// b zero ? +{ .mfi + nop.m 0 + fclass.m p10, p0 = f8, 0xc3 // Test a = nan + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_NORM_B = f9, f1, f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s0 f8 = f8, f1, f0 + nop.i 0 +} +{ .mfi + nop.m 0 + (p10) fclass.m p10, p0 = f9, 0x07 // Test x = nan, and y = zero + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + fcmp.eq.unc.s1 p11, p0 = FR_NORM_B, f0 + (p10) br.ret.spnt b0 // Exit with result = a if a = nan and b = zero +} +;; + +{ .mib + nop.m 0 + nop.i 0 + // if Y zero + (p11) br.cond.spnt FMOD_B_ZERO +} +;; + +// a= infinity? Return QNAN indefinite +{ .mfi + // set p7 t0 0 + cmp.ne p7, p0 = r0, r0 + fclass.m.unc p8, p9 = f8, 0x23 + nop.i 0 +} +;; + +// b NaN ? +{ .mfi + nop.m 0 + (p8) fclass.m p9, p8 = f9, 0xc3 + nop.i 0 +} +;; + +// b not pseudo-zero ? (GR_SIG_B holds significand) +{ .mii + nop.m 0 + (p8) cmp.ne p7, p0 = GR_SIG_B, r0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + (p8) frcpa.s0 f8, p0 = f8, f8 + nop.i 0 +} +{ .mfi + nop.m 0 + // also set Denormal flag if necessary + (p7) fnma.s0 f9 = f9, f1, f9 + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + (p8) fma.s0 f8 = f8, f1, f0 + nop.b 0 +} +;; + +{ .mfb + nop.m 0 + (p9) frcpa.s0 f8, p7 = f8, f9 + br.ret.sptk b0 +} +;; + +FMOD_B_NAN_INF_ZERO: +// b INF +{ .mfi + nop.m 0 + fclass.m.unc p7, p0 = f9, 0x23 + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + (p7) fma.s0 f8 = f8, f1, f0 + (p7) br.ret.spnt b0 +} +;; + +// b NAN? +{ .mfi + nop.m 0 + fclass.m.unc p9, p10 = f9, 0xc3 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + (p10) fclass.nm p9, p0 = f9, 0xff + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + (p9) fma.s0 f8 = f9, f1, f0 + (p9) br.ret.spnt b0 +} +;; + +FMOD_B_ZERO: +// Y zero? Must be zero at this point +// because it is the only choice left. +// Return QNAN indefinite + +{ .mfi + nop.m 0 + // set Invalid + frcpa.s0 FR_TMP, p0 = f0, f0 + nop.i 0 +} +;; + +// a NAN? +{ .mfi + nop.m 0 + fclass.m.unc p9, p10 = f8, 0xc3 + nop.i 0 +} +;; + +{ .mfi + alloc GR_ARPFS = ar.pfs, 1, 4, 4, 0 + (p10) fclass.nm p9, p10 = f8, 0xff + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + (p9) frcpa.s0 FR_TMP2, p7 = f8, f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + (p10) frcpa.s0 FR_TMP2, p7 = f9, f9 + mov GR_Parameter_TAG = 120 +} +;; + +{ .mfi + nop.m 0 + fmerge.s FR_X = f8, f8 + nop.i 0 +} +{ .mfb + nop.m 0 + fma.s0 f8 = FR_TMP2, f1, f0 + br.sptk __libm_error_region +} +;; + +GLOBAL_IEEE754_END(fmodl) + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y = -32, sp // Parameter 2 value + nop.f 0 +.save ar.pfs, GR_SAVE_PFS + mov GR_SAVE_PFS = ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp = -64, sp // Create new stack + nop.f 0 + mov GR_SAVE_GP = gp // Save gp +} +;; + +{ .mmi + stfe [ GR_Parameter_Y ] = FR_Y, 16 // Save Parameter 2 on stack + add GR_Parameter_X = 16, sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0 = b0 // Save b0 +} +;; + +.body +{ .mib + stfe [ GR_Parameter_X ] = FR_X // Store Parameter 1 on stack + add GR_Parameter_RESULT = 0, GR_Parameter_Y + nop.b 0 // Parameter 3 address +} +{ .mib + stfe [ GR_Parameter_Y ] = FR_RESULT // Store Parameter 3 on stack + add GR_Parameter_Y = -16, GR_Parameter_Y + br.call.sptk b0 = __libm_error_support# // Call error handling function +} +;; + +{ .mmi + nop.m 0 + nop.m 0 + add GR_Parameter_RESULT = 48, sp +} +;; + +{ .mmi + ldfe f8 = [ GR_Parameter_RESULT ] // Get return result off stack +.restore sp + add sp = 64, sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +} +;; + +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +} +;; + +LOCAL_LIBM_END(__libm_error_region) + +.type __libm_error_support#, @function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/e_gamma_r.c b/sysdeps/ia64/fpu/e_gamma_r.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/e_gamma_r.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/e_gammaf_r.c b/sysdeps/ia64/fpu/e_gammaf_r.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/e_gammaf_r.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/e_gammal_r.c b/sysdeps/ia64/fpu/e_gammal_r.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/e_gammal_r.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/e_hypot.S b/sysdeps/ia64/fpu/e_hypot.S new file mode 100644 index 0000000000..36cfd1e667 --- /dev/null +++ b/sysdeps/ia64/fpu/e_hypot.S @@ -0,0 +1,440 @@ +.file "hypot.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +//********************************************************************* +// +// History: +// 02/02/00 hand-optimized +// 04/04/00 Unwind support added +// 06/20/00 new version +// 08/15/00 Bundle added after call to __libm_error_support to properly +// set [the previously overwritten] GR_Parameter_RESULT. +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// 04/17/03 Added missing mutex directive +// +//********************************************************************* +// ___________ +// Function: hypot(x,y) = |(x^2 + y^2) = for double precision values +// x and y +// Also provides cabs functionality. +// +//********************************************************************* +// +// Resources Used: +// +// Floating-Point Registers: f8 (Input and Return Value) +// f9 (Input) +// f6 -f15, f32-f34 +// +// General Purpose Registers: +// r2,r3,r29 (Scratch) +// r32-r36 (Locals) +// r37-r40 (Used to pass arguments to error handling routine) +// +// Predicate Registers: p6 - p10 +// +//********************************************************************* +// +// IEEE Special Conditions: +// +// All faults and exceptions should be raised correctly. +// Overflow can occur. +// hypot(Infinity and anything) = +Infinity +// hypot(QNaN and anything) = QNaN +// hypot(SNaN and anything ) = QNaN +// +//********************************************************************* +// +// Implementation: +// x2 = x * x in double-extended +// y2 = y * y in double-extended +// temp = x2 + y2 in double-extended +// sqrt(temp) rounded to double +// +//********************************************************************* + +GR_SAVE_PFS = r33 +GR_SAVE_B0 = r34 +GR_SAVE_GP = r35 +GR_Parameter_X = r36 +GR_Parameter_Y = r37 +GR_Parameter_RESULT = r38 +GR_Parameter_TAG = r39 + +FR_X = f32 +FR_Y = f33 +FR_RESULT = f8 + +.section .text + +LOCAL_LIBM_ENTRY(cabs) +LOCAL_LIBM_END(cabs) + +GLOBAL_IEEE754_ENTRY(hypot) + +{.mfi + alloc r32= ar.pfs,0,4,4,0 + // Compute x*x + fma.s1 f10=f8,f8,f0 + // r2=bias-1 + mov r2=0xfffe +} +{.mfi + // 63/8 + mov r3=0x40fc //0000 + // y*y + fma.s1 f11=f9,f9,f0 + // r29=429/16 + mov r29=0x41d68;; //000 +} + +{ .mfi + nop.m 0 +// Check if x is an Inf - if so return Inf even +// if y is a NaN (C9X) + fclass.m.unc p7, p6 = f8, 0x023 + shl r3=r3,16 +} +{.mfi + nop.m 0 + // if possible overflow, copy f8 to f32 + // set Denormal, if necessary + // (p8) + fma.d.s0 f32=f8,f1,f0 + nop.i 0;; +} +{ .mfi + nop.m 0 +// Check if y is an Inf - if so return Inf even +// if x is a NaN (C9X) + fclass.m.unc p8, p9 = f9, 0x023 + shl r29=r29,12 +} +{ .mfb + // f7=0.5 + setf.exp f7=r2 +// For x=inf, multiply y by 1 to raise invalid on y an SNaN +// (p7) fma.s0 f9=f9,f1,f0 + // copy f9 to f33; set Denormal, if necessary + fma.d.s0 f33=f9,f1,f0 + nop.b 0;; +} +{.mfb + // f13=63/8 + setf.s f13=r3 + // is y Zero ? + (p6) fclass.m p6,p0=f9,0x7 + nop.b 0 +} +{.mlx + nop.m 0 + movl r2=0x408c0000;; +} + +{.mfi + // f34=429/16 + setf.s f34=r29 + // is x Zero ? + (p9) fclass.m p9,p0=f8,0x7 + // 231/16 + mov r3=0x4167;; //0000 +} +{.mfi + nop.m 0 + // a=x2+y2 + fma.s1 f12=f10,f1,f11 + nop.i 0;; +} +{.mfi + nop.m 0 + // y not NaN ? + (p9) fclass.m p8,p0=f9,0x3f + shl r3=r3,16 +} +{.mfi + nop.m 0 + // f6=2 + fma.s1 f6=f1,f1,f1 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // x not NaN ? + (p6) fclass.m p7,p0=f8,0x3f + nop.i 0;; +} +{.mfi + // f9=35/8 + setf.s f9=r2 + nop.f 0 + // 2*emax-2 + mov r2=0x107fb;; +} + +.pred.rel "mutex",p7,p8 +{.mfb + nop.m 0 + // if f8=Infinity or f9=Zero, return |f8| + (p7) fmerge.s f8=f0,f32 + (p7) br.ret.spnt b0 +} +{.mfb + nop.m 0 + // if f9=Infinity or f8=Zero, return |f9| + (p8) fmerge.s f8=f0,f33 + (p8) br.ret.spnt b0;; +} + + +{.mfi + // f10 =231/16 + setf.s f10=r3 + // z0=frsqrta(a) + frsqrta.s1 f8,p6=f12 + nop.i 0;; +} + +{ .mfi + nop.m 0 +// Identify Natvals, Infs, NaNs, and Zeros +// and return result + fclass.m.unc p7, p0 = f12, 0x1E7 + nop.i 0;; +} +{.mfb + // get exponent of x^2+y^2 + getf.exp r3=f12 + // if special case, set f8 + (p7) mov f8=f12 + (p7) br.ret.spnt b0;; +} + + +{.mfi + nop.m 0 + // S0=a*z0 + (p6) fma.s1 f14=f12,f8,f0 + nop.i 0 +} +{.mfi + nop.m 0 + // H0=0.5*z0 + (p6) fma.s1 f15=f8,f7,f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // f6=5/2 + fma.s1 f6=f7,f1,f6 + nop.i 0 +} +{.mfi + nop.m 0 + // f11=3/2 + fma.s1 f11=f7,f1,f1 + nop.i 0;; +} + +{.mfi + nop.m 0 + // d=0.5-S0*H0 + (p6) fnma.s1 f7=f14,f15,f7 + nop.i 0;; +} + +{.mfi + nop.m 0 + // P67=231/16+429/16*d + (p6) fma.s1 f10=f34,f7,f10 + nop.i 0 +} +{.mfi + nop.m 0 + // P45=63/8*d+35/8 + (p6) fma.s1 f9=f13,f7,f9 + nop.i 0;; +} +{.mfi + nop.m 0 + // P23=5/2*d+3/2 + (p6) fma.s1 f11=f6,f7,f11 + nop.i 0 +} +{.mfi + nop.m 0 + // d2=d*d + (p6) fma.s1 f13=f7,f7,f0 + nop.i 0;; +} + +{.mfi + nop.m 0 + // P47=d2*P67+P45 + (p6) fma.s1 f10=f10,f13,f9 + nop.i 0 +} +{.mfi + nop.m 0 + // P13=d*P23+1 + (p6) fma.s1 f11=f11,f7,f1 + nop.i 0;; +} +{.mfi + nop.m 0 + // d3=d2*d + (p6) fma.s1 f13=f13,f7,f0 + nop.i 0;; +} + +{.mfi + nop.m 0 + // T0=d*S0 + (p6) fma.s1 f15=f7,f14,f0 + nop.i 0 +} +{.mfi + // Is x^2 + y^2 well less than the overflow + // threshold? + (p6) cmp.lt.unc p7, p8 = r3,r2 + // P=P13+d3*P47 + (p6) fma.s1 f10=f13,f10,f11 + nop.i 0;; +} + +{.mfb + nop.m 0 + // S=P*T0+S0 + fma.d.s0 f8=f10,f15,f14 + // No overflow in this case + (p7) br.ret.sptk b0;; +} + +{ .mfi + nop.m 0 +(p8) fsetc.s2 0x7F,0x42 + // Possible overflow path, must detect by + // Setting widest range exponent with prevailing + // rounding mode. + nop.i 0 ;; +} + + +{ .mfi + // bias+0x400 (bias+EMAX+1) + (p8) mov r2=0x103ff + // S=P*T0+S0 + (p8) fma.d.s2 f12=f10,f15,f14 + nop.i 0 ;; +} +{ .mfi +(p8) setf.exp f11 = r2 +(p8) fsetc.s2 0x7F,0x40 +// Restore Original Mode in S2 + nop.i 0 ;; +} +{ .mfi + nop.m 0 +(p8) fcmp.lt.unc.s1 p9, p10 = f12, f11 + nop.i 0 ;; +} +{ .mib + nop.m 0 + mov GR_Parameter_TAG = 46 + // No overflow +(p9) br.ret.sptk b0;; +} +GLOBAL_IEEE754_END(hypot) + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfd [GR_Parameter_Y] = FR_Y,16 // Save Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; +.body +{ .mib + stfd [GR_Parameter_X] = FR_X // Store Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y + nop.b 0 // Parameter 3 address +} +{ .mib + stfd [GR_Parameter_Y] = FR_RESULT // Store Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + nop.m 0 + nop.m 0 + add GR_Parameter_RESULT = 48,sp +};; +{ .mmi + ldfd f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; +LOCAL_LIBM_END(__libm_error_region#) +.type __libm_error_support#,@function +.global __libm_error_support# + + diff --git a/sysdeps/ia64/fpu/e_hypotf.S b/sysdeps/ia64/fpu/e_hypotf.S new file mode 100644 index 0000000000..d6fcbd1a01 --- /dev/null +++ b/sysdeps/ia64/fpu/e_hypotf.S @@ -0,0 +1,395 @@ +.file "hypotf.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +//********************************************************************* +// +// History: +// 02/02/00 hand-optimized +// 04/04/00 Unwind support added +// 06/26/00 new version +// 08/15/00 Bundle added after call to __libm_error_support to properly +// set [the previously overwritten] GR_Parameter_RESULT. +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// 04/17/03 Added missing mutex directive +// +//********************************************************************* +// ___________ +// Function: hypotf(x,y) = |(x^2 + y^2) = for single precision values +// x and y +// Also provides cabsf functionality. +// +//********************************************************************* +// +// Resources Used: +// +// Floating-Point Registers: f8 (Input and Return Value) +// f9 (Input) +// f6 -f15 +// +// General Purpose Registers: +// r2-r3 (Scratch) +// r32-r36 (Locals) +// r37-r40 (Used to pass arguments to error handling routine) +// +// Predicate Registers: p6 - p10 +// +//********************************************************************* +// +// IEEE Special Conditions: +// +// All faults and exceptions should be raised correctly. +// Overflow can occur. +// hypotf(Infinity and anything) = +Infinity +// hypotf(QNaN and anything) = QNaN +// hypotf(SNaN and anything ) = QNaN +// +//********************************************************************* +// +// Implementation: +// x2 = x * x in double-extended +// y2 = y * y in double-extended +// temp = x2 + y2 in double-extended +// sqrt(temp) rounded to single precision +// +//********************************************************************* + +GR_SAVE_PFS = r33 +GR_SAVE_B0 = r34 +GR_SAVE_GP = r35 +GR_Parameter_X = r36 +GR_Parameter_Y = r37 +GR_Parameter_RESULT = r38 +GR_Parameter_TAG = r39 + +FR_X = f14 +FR_Y = f15 +FR_RESULT = f8 + +.section .text + +LOCAL_LIBM_ENTRY(cabsf) +LOCAL_LIBM_END(cabsf) + +GLOBAL_IEEE754_ENTRY(hypotf) +{.mfi + alloc r32= ar.pfs,0,4,4,0 + // Compute x*x + fma.s1 f10=f8,f8,f0 + // r2=bias-1 + mov r2=0xfffe +} +{.mfi + nop.m 0 + // y*y + fma.s1 f11=f9,f9,f0 + nop.i 0;; +} + +{ .mfi + nop.m 0 +// Check if x is an Inf - if so return Inf even +// if y is a NaN (C9X) + fclass.m.unc p7, p6 = f8, 0x023 + nop.i 0 +} +{.mfi + nop.m 0 + // if possible overflow, copy f8 to f14 + // set Denormal, if necessary + // (p8) + fma.s.s0 f14=f8,f1,f0 + nop.i 0;; +} + +{ .mfi + nop.m 0 +// Check if y is an Inf - if so return Inf even +// if x is a NaN (C9X) + fclass.m.unc p8, p9 = f9, 0x023 + nop.i 0 +} +{ .mfi + nop.m 0 +// For x=inf, multiply y by 1 to raise invalid on y an SNaN +// (p7) fma.s0 f9=f9,f1,f0 + // copy f9 to f15; set Denormal, if necessary + fma.s.s0 f15=f9,f1,f0 + nop.i 0;; +} +{.mfi + nop.m 0 + // is y Zero ? + (p6) fclass.m p6,p0=f9,0x7 + nop.i 0;; +} +{.mfi + nop.m 0 + // is x Zero ? + (p9) fclass.m p9,p0=f8,0x7 + nop.i 0;; +} + +{.mfi + // f7=0.5 + setf.exp f7=r2 + // a=x2+y2 + fma.s1 f12=f10,f1,f11 + nop.i 0;; +} + +{.mfi + nop.m 0 + // x not NaN ? + (p6) fclass.m p7,p0=f8,0x3f + nop.i 0 +} +{.mfi + // 2*emax-2 + mov r2=0x100fb + // f6=2 + fma.s1 f6=f1,f1,f1 + nop.i 0;; +} + +{.mfi + nop.m 0 + // y not NaN ? + (p9) fclass.m p8,p0=f9,0x3f + nop.i 0;; +} + +.pred.rel "mutex",p7,p8 +{.mfb + nop.m 0 + // if f8=Infinity or f9=Zero, return |f8| + (p7) fmerge.s f8=f0,f14 + (p7) br.ret.spnt b0 +} +{.mfb + nop.m 0 + // if f9=Infinity or f8=Zero, return |f9| + (p8) fmerge.s f8=f0,f15 + (p8) br.ret.spnt b0;; +} + +{ .mfi + nop.m 0 +// Identify Natvals, Infs, NaNs, and Zeros +// and return result + fclass.m.unc p7, p0 = f12, 0x1E7 + nop.i 0 +} +{.mfi + nop.m 0 + // z0=frsqrta(a) + frsqrta.s1 f8,p6=f12 + nop.i 0;; +} + +{.mfb + // get exponent of x^2+y^2 + getf.exp r3=f12 + // if special case, set f8 + (p7) mov f8=f12 + (p7) br.ret.spnt b0;; +} + + +{.mfi + nop.m 0 + // S0=a*z0 + (p6) fma.s1 f12=f12,f8,f0 + nop.i 0 +} +{.mfi + nop.m 0 + // H0=0.5*z0 + (p6) fma.s1 f10=f8,f7,f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // f6=5/2 + fma.s1 f6=f7,f1,f6 + nop.i 0 +} +{.mfi + nop.m 0 + // f11=3/2 + fma.s1 f11=f7,f1,f1 + nop.i 0;; +} + +{.mfi + nop.m 0 + // d=0.5-S0*H0 + (p6) fnma.s1 f7=f12,f10,f7 + nop.i 0;; +} + +{.mfi + nop.m 0 + // P01=d+1 + (p6) fma.s1 f10=f1,f7,f1 + nop.i 0 +} +{.mfi + nop.m 0 + // P23=5/2*d+3/2 + (p6) fma.s1 f11=f6,f7,f11 + nop.i 0;; +} +{.mfi + nop.m 0 + // d2=d*d + (p6) fma.s1 f7=f7,f7,f0 + nop.i 0;; +} + + +{.mfi + // Is x^2 + y^2 well less than the overflow + // threshold? + (p6) cmp.lt.unc p7, p8 = r3,r2 + // P=P01+d2*P23 + (p6) fma.s1 f10=f7,f11,f10 + nop.i 0;; +} + +{.mfb + nop.m 0 + // S=P*S0 + fma.s.s0 f8=f10,f12,f0 + // No overflow in this case + (p7) br.ret.sptk b0;; +} + +{ .mfi + nop.m 0 +(p8) fsetc.s2 0x7F,0x42 + // Possible overflow path, must detect by + // Setting widest range exponent with prevailing + // rounding mode. + nop.i 0 ;; +} + + +{ .mfi + // bias+0x400 (bias+EMAX+1) + (p8) mov r2=0x1007f + // S=P*S0 + (p8) fma.s.s2 f12=f10,f12,f0 + nop.i 0 ;; +} +{ .mfi +(p8) setf.exp f11 = r2 +(p8) fsetc.s2 0x7F,0x40 +// Restore Original Mode in S2 + nop.i 0 ;; +} +{ .mfi + nop.m 0 +(p8) fcmp.lt.unc.s1 p9, p10 = f12, f11 + nop.i 0 ;; +} +{ .mib + nop.m 0 + mov GR_Parameter_TAG = 47 + // No overflow +(p9) br.ret.sptk b0;; +} +GLOBAL_IEEE754_END(hypotf) + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mii + add GR_Parameter_Y=-32,sp // Parameter 2 value + mov GR_Parameter_TAG = 47 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfs [GR_Parameter_Y] = FR_Y,16 // Store Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; +.body +{ .mib + stfs [GR_Parameter_X] = FR_X // Store Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y + nop.b 0 // Parameter 3 address +} +{ .mib + stfs [GR_Parameter_Y] = FR_RESULT // Store Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + nop.m 0 + nop.m 0 + add GR_Parameter_RESULT = 48,sp +};; +{ .mmi + ldfs f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) + + +.type __libm_error_support#,@function +.global __libm_error_support# + diff --git a/sysdeps/ia64/fpu/e_hypotl.S b/sysdeps/ia64/fpu/e_hypotl.S new file mode 100644 index 0000000000..988b86e761 --- /dev/null +++ b/sysdeps/ia64/fpu/e_hypotl.S @@ -0,0 +1,478 @@ +.file "hypotl.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +//********************************************************************* +// +// History: +// 02/02/00 hand-optimized +// 04/04/00 Unwind support added +// 06/20/00 new version +// 08/15/00 Bundle added after call to __libm_error_support to properly +// set [the previously overwritten] GR_Parameter_RESULT. +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// +//********************************************************************* +// ___________ +// Function: hypotl(x,y) = |(x^2 + y^2) = for double extended values +// x and y +// Also provides cabsl functionality. +// +//********************************************************************* +// +// Resources Used: +// +// Floating-Point Registers: f8 (Input and Return Value) +// f9 (Input) +// f6 -f15, f32-f34 +// +// General Purpose Registers: +// r2-r3 (Scratch) +// r32-r36 (Locals) +// r37-r40 (Used to pass arguments to error handling routine) +// +// Predicate Registers: p6 - p10 +// +//********************************************************************* +// +// IEEE Special Conditions: +// +// All faults and exceptions should be raised correctly. +// Overflow can occur. +// hypotl(Infinity and anything) = +Infinity +// hypotl(QNaN and anything) = QNaN +// hypotl(SNaN and anything ) = QNaN +// +//********************************************************************* +// +// Implementation: +// x2 = x * x in double-extended +// y2 = y * y in double-extended +// temp = x2 + y2 in double-extended +// sqrt(temp) rounded to double extended +// +//********************************************************************* + +GR_SAVE_PFS = r33 +GR_SAVE_B0 = r34 +GR_SAVE_GP = r35 +GR_Parameter_X = r36 +GR_Parameter_Y = r37 +GR_Parameter_RESULT = r38 +GR_Parameter_TAG = r39 + +FR_X = f32 +FR_Y = f33 +FR_RESULT = f8 + +.section .text + +LOCAL_LIBM_ENTRY(cabsl) +LOCAL_LIBM_END(cabsl) + +GLOBAL_IEEE754_ENTRY(hypotl) +{.mfi + alloc r32= ar.pfs,0,4,4,0 + // Compute x*x + fma.s1 f10=f8,f8,f0 + // r2=bias-1 + mov r2=0xfffe +} +{.mfi + nop.m 0 + // y*y + fma.s1 f11=f9,f9,f0 + nop.i 0;; +} + +{ .mfi + nop.m 0 +// Check if x is an Inf - if so return Inf even +// if y is a NaN (C9X) + fclass.m.unc p7, p6 = f8, 0x023 + nop.i 0 +} +{.mfi + nop.m 0 + // if possible overflow, copy f8 to f32 + // set Denormal, if necessary + // (p8) + fma.s0 f32=f8,f1,f0 + nop.i 0;; +} +{ .mfi + nop.m 0 +// Check if y is an Inf - if so return Inf even +// if x is a NaN (C9X) + fclass.m.unc p8, p9 = f9, 0x023 + nop.i 0 +} +{ .mfi + nop.m 999 +// For x=inf, multiply y by 1 to raise invalid on y an SNaN +// (p7) fma.s0 f9=f9,f1,f0 + // copy f9 to f33; set Denormal, if necessary + fma.s0 f33=f9,f1,f0 + nop.i 0;; +} +{.mfi + nop.m 0 + // is y Zero ? + (p6) fclass.m p6,p0=f9,0x7 + nop.i 0;; +} + +{.mfi + // f7=0.5 + setf.exp f7=r2 + // a=x2+y2 + fma.s1 f12=f10,f1,f11 + nop.i 0 +} +{.mfi + mov r2=0x408c //0000 + // dx=x*x-x2 + fms.s1 f13=f8,f8,f10 + nop.i 0;; +} +{.mfi + nop.m 0 + // is x Zero ? + (p9) fclass.m p9,p0=f8,0x7 + shl r2=r2,16 +} +{.mfi + nop.m 0 + // dy=y*y-y2 + fms.s1 f14=f9,f9,f11 + nop.i 0;; +} + +{.mfi + nop.m 0 + // x not NaN ? + (p6) fclass.m p7,p0=f8,0x3f + nop.i 0 +} +{.mfi + nop.m 0 + // f6=2 + fma.s1 f6=f1,f1,f1 + nop.i 0;; +} + +{.mfi + nop.m 0 + // f34=min(x2,y2) + famin.s1 f34=f10,f11 + nop.i 0 +} +{.mfb + nop.m 0 + // f10=max(x2,y2) + famax.s1 f10=f11,f10 + nop.b 0;; // +} + +{.mfi + nop.m 0 + // y not NaN ? + (p9) fclass.m p8,p0=f9,0x3f + nop.i 0;; +} +{.mfb + // f9=35/8 + setf.s f9=r2 + // if f8=Infinity or f9=Zero, return |f8| + (p7) fmerge.s f8=f0,f32 + (p7) br.ret.spnt b0;; +} + + +{.mfi + nop.m 0 + // z0=frsqrta(a) + frsqrta.s1 f8,p6=f12 + nop.i 0;; +} +{ .mfi + nop.m 0 +// Identify Natvals, Infs, NaNs, and Zeros +// and return result + fclass.m.unc p7, p0 = f12, 0x1E7 + nop.i 0 +} +{.mfi + // get exponent of x^2+y^2 + getf.exp r3=f12 + // dxy=dx+dy + fma.s1 f13=f13,f1,f14 + nop.i 0;; +} + +{.mfb + // 2*emax-2 + mov r2=0x17ffb + // if f9=Infinity or f8=Zero, return |f9| + (p8) fmerge.s f8=f0,f33 + (p8) br.ret.spnt b0 +} +{.mfi + nop.m 0 + // dd=a-max(x2,y2) + fnma.s1 f10=f10,f1,f12 + nop.i 0;; +} + +{.mfi + nop.m 0 + // S0=a*z0 + (p6) fma.s1 f14=f12,f8,f0 + nop.i 0 +} +{.mfi + nop.m 0 + // H0=0.5*z0 + (p6) fma.s1 f15=f8,f7,f0 + nop.i 0;; +} + +{.mfb + nop.m 0 + // if special case, set f8 + (p7) mov f8=f12 + (p7) br.ret.spnt b0 +} +{.mfi + nop.m 0 + // da=min(x2,y2)-dd + fnma.s1 f10=f10,f1,f34 + nop.i 0;; +} +{.mfi + nop.m 0 + // f6=5/2 + fma.s1 f6=f7,f1,f6 + nop.i 0 +} +{.mfi + nop.m 0 + // f11=3/2 + fma.s1 f11=f7,f1,f1 + nop.i 0;; +} + +{.mfi + nop.m 0 + // d=0.5-S0*H0 + (p6) fnma.s1 f7=f14,f15,f7 + nop.i 0;; +} + +{.mfi + nop.m 0 + // P1=3/2*d+1 + (p6) fma.s1 f11=f11,f7,f1 + nop.i 0 +} +{.mfi + nop.m 0 + // P2=35/8*d+5/2 + (p6) fma.s1 f9=f9,f7,f6 + nop.i 0;; +} +{.mfi + nop.m 0 + // d2=d*d + (p6) fma.s1 f34=f7,f7,f0 + nop.i 0;; +} + +{.mfi + nop.m 0 + // T0=d*S0 + (p6) fma.s1 f6=f7,f14,f0 + nop.i 0 +} +{.mfi + nop.m 0 + // G0=d*H0 + (p6) fma.s1 f7=f7,f15,f0 + nop.i 0;; +} +{.mfi + nop.m 0 + // P=d2*P2+P1 + (p6) fma.s1 f11=f34,f9,f11 + nop.i 0;; +} + +{.mfi + nop.m 0 + // S1=p*T0+S0 + (p6) fma.s1 f14=f11,f6,f14 + nop.i 0 +} +{.mfi + nop.m 0 + // H1=p*G0+H0 + (p6) fma.s1 f15=f11,f7,f15 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // e1=a-S1*S1 + (p6) fnma.s1 f7=f14,f14,f12 + nop.i 0 +} +{.mfi + // Is x^2 + y^2 well less than the overflow + // threshold? + (p6) cmp.lt.unc p7, p8 = r3,r2 + // c=dxy+da + (p6) fma.s1 f13=f13,f1,f10 + nop.i 0;; +} + +{.mfi + nop.m 0 + // e=e1+c + (p6) fma.s1 f13=f7,f1,f13 + nop.i 0;; +} + +{.mfb + nop.m 0 + // S=e*H1+S1 + fma.s0 f8=f13,f15,f14 + // No overflow in this case + (p7) br.ret.sptk b0;; +} + +{ .mfi + nop.m 0 +(p8) fsetc.s2 0x7F,0x42 + // Possible overflow path, must detect by + // Setting widest range exponent with prevailing + // rounding mode. + nop.i 0 ;; +} + + +{ .mfi + // bias+0x4000 (bias+EMAX+1) + (p8) mov r2=0x13fff + // S=e*H1+S1 + (p8) fma.s2 f12=f13,f15,f14 + nop.i 0 ;; +} +{ .mfi +(p8) setf.exp f11 = r2 +(p8) fsetc.s2 0x7F,0x40 +// Restore Original Mode in S2 + nop.i 0 ;; +} +{ .mfi + nop.m 0 +(p8) fcmp.lt.unc.s1 p9, p10 = f12, f11 + nop.i 0 ;; +} +{ .mib + nop.m 0 + mov GR_Parameter_TAG = 45; + // No overflow +(p9) br.ret.sptk b0;; +} +GLOBAL_IEEE754_END(hypotl) + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfe [GR_Parameter_Y] = FR_Y,16 // Save Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; +.body +{ .mib + stfe [GR_Parameter_X] = FR_X // Store Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y + nop.b 0 // Parameter 3 address +} +{ .mib + stfe [GR_Parameter_Y] = FR_RESULT // Store Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + nop.m 0 + nop.m 0 + add GR_Parameter_RESULT = 48,sp +};; +{ .mmi + ldfe f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; +LOCAL_LIBM_END(__libm_error_region#) +.type __libm_error_support#,@function +.global __libm_error_support# + + + diff --git a/sysdeps/ia64/fpu/e_lgamma_r.c b/sysdeps/ia64/fpu/e_lgamma_r.c new file mode 100644 index 0000000000..cb9efbfe02 --- /dev/null +++ b/sysdeps/ia64/fpu/e_lgamma_r.c @@ -0,0 +1,71 @@ +/* file: lgamma_r.c */ + + +// Copyright (c) 2002 Intel Corporation +// All rights reserved. +// +// Contributed 2002 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// + +// History +//============================================================== +// 02/04/02: Initial version +// 02/22/02: Removed lgammaf_r, gammaf_r +/* +// FUNCTIONS: double lgamma_r(double x, int* signgam) +// double gamma_r(double x, int* signgam) +// Natural logarithm of GAMMA function +*/ + +#include "libm_support.h" + + +extern double __libm_lgamma(double /*x*/, int* /*signgam*/, int /*signgamsz*/); + + +double __ieee754_lgamma_r(double x, int* signgam) +{ + return __libm_lgamma(x, signgam, sizeof(*signgam)); +} +weak_alias (__ieee754_lgamma_r, lgamma_r) + +#ifndef _LIBC +double __ieee754_gamma_r(double x, int* signgam) +{ + return __libm_lgamma(x, signgam, sizeof(*signgam)); +} +weak_alias (__ieee754_gamma_r, gamma_r) +#endif diff --git a/sysdeps/ia64/fpu/e_lgammaf_r.c b/sysdeps/ia64/fpu/e_lgammaf_r.c new file mode 100644 index 0000000000..44911aeabd --- /dev/null +++ b/sysdeps/ia64/fpu/e_lgammaf_r.c @@ -0,0 +1,71 @@ +/* file: lgammaf_r.c */ + + +// Copyright (c) 2002 Intel Corporation +// All rights reserved. +// +// Contributed 2002 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// + +// History +//============================================================== +// 02/04/02: Initial version +// 02/22/02: Removed lgamma_r, gamma_r +/* +// FUNCTIONS: float lgammaf_r(float x, int* signgam) +// float gammaf_r(float x, int* signgam) +// Natural logarithm of GAMMA function +*/ + +#include "libm_support.h" + + +extern float __libm_lgammaf(float /*x*/, int* /*signgam*/, int /*signgamsz*/); + + +float __ieee754_lgammaf_r(float x, int* signgam) +{ + return __libm_lgammaf(x, signgam, sizeof(*signgam)); +} +weak_alias (__ieee754_lgammaf_r, lgammaf_r) + +#ifndef _LIBC +float __ieee754_gammaf_r(float x, int* signgam) +{ + return __libm_lgammaf(x, signgam, sizeof(*signgam)); +} +weak_alias (__ieee754_gammaf_r, gammaf_r) +#endif diff --git a/sysdeps/ia64/fpu/e_lgammal_r.c b/sysdeps/ia64/fpu/e_lgammal_r.c new file mode 100644 index 0000000000..4451201b77 --- /dev/null +++ b/sysdeps/ia64/fpu/e_lgammal_r.c @@ -0,0 +1,70 @@ +/* file: lgammal_r.c */ + + +// Copyright (c) 2002 Intel Corporation +// All rights reserved. +// +// Contributed 2002 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// + +// History +//============================================================== +// 08/15/02: Initial version +/* +// FUNCTIONS: long double lgammal_r(long double x, int* signgam) +// long double gammal_r(long double x, int* signgam) +// Natural logarithm of GAMMA function +*/ + +#include "libm_support.h" + + +extern double __libm_lgammal(long double /*x*/, int* /*signgam*/, int /*signgamsz*/); + + +long double __ieee754_lgammal_r(long double x, int* signgam) +{ + return __libm_lgammal(x, signgam, sizeof(*signgam)); +} +weak_alias (__ieee754_lgammal_r, lgammal_r) + +#ifndef _LIBC +long double __ieee754_gammal_r(long double x, int* signgam) +{ + return __libm_lgammal(x, signgam, sizeof(*signgam)); +} +weak_alias (__ieee754_gammal_r, gammal_r) +#endif diff --git a/sysdeps/ia64/fpu/e_log.S b/sysdeps/ia64/fpu/e_log.S new file mode 100644 index 0000000000..c644c6f8f7 --- /dev/null +++ b/sysdeps/ia64/fpu/e_log.S @@ -0,0 +1,1729 @@ +.file "log.s" + + +// Copyright (c) 2000 - 2005, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 04/04/00 Unwind support added +// 06/16/00 Updated table to be rounded correctly +// 08/15/00 Bundle added after call to __libm_error_support to properly +// set [the previously overwritten] GR_Parameter_RESULT. +// 08/17/00 Improved speed of main path by 5 cycles +// Shortened path for x=1.0 +// 01/09/01 Improved speed, fixed flags for neg denormals +// 05/20/02 Cleaned up namespace and sf0 syntax +// 05/23/02 Modified algorithm. Now only one polynomial is used +// for |x-1| >= 1/256 and for |x-1| < 1/256 +// 12/11/02 Improved performance for Itanium 2 +// 03/31/05 Reformatted delimiters between data tables +// +// API +//============================================================== +// double log(double) +// double log10(double) +// +// +// Overview of operation +//============================================================== +// Background +// ---------- +// +// This algorithm is based on fact that +// log(a b) = log(a) + log(b). +// In our case we have x = 2^N f, where 1 <= f < 2. +// So +// log(x) = log(2^N f) = log(2^N) + log(f) = n*log(2) + log(f) +// +// To calculate log(f) we do following +// log(f) = log(f * frcpa(f) / frcpa(f)) = +// = log(f * frcpa(f)) + log(1/frcpa(f)) +// +// According to definition of IA-64's frcpa instruction it's a +// floating point that approximates 1/f using a lookup on the +// top of 8 bits of the input number's significand with relative +// error < 2^(-8.886). So we have following +// +// |(1/f - frcpa(f)) / (1/f))| = |1 - f*frcpa(f)| < 1/256 +// +// and +// +// log(f) = log(f * frcpa(f)) + log(1/frcpa(f)) = +// = log(1 + r) + T +// +// The first value can be computed by polynomial P(r) approximating +// log(1 + r) on |r| < 1/256 and the second is precomputed tabular +// value defined by top 8 bit of f. +// +// Finally we have that log(x) ~ (N*log(2) + T) + P(r) +// +// Note that if input argument is close to 1.0 (in our case it means +// that |1 - x| < 1/256) we can use just polynomial approximation +// because x = 2^0 * f = f = 1 + r and +// log(x) = log(1 + r) ~ P(r) +// +// +// To compute log10(x) we use the simple identity +// +// log10(x) = log(x)/log(10) +// +// so we have that +// +// log10(x) = (N*log(2) + T + log(1+r)) / log(10) = +// = N*(log(2)/log(10)) + (T/log(10)) + log(1 + r)/log(10) +// +// +// Implementation +// -------------- +// It can be seen that formulas for log and log10 differ from one another +// only by coefficients and tabular values. Namely as log as log10 are +// calculated as (N*L1 + T) + L2*Series(r) where in case of log +// L1 = log(2) +// T = log(1/frcpa(x)) +// L2 = 1.0 +// and in case of log10 +// L1 = log(2)/log(10) +// T = log(1/frcpa(x))/log(10) +// L2 = 1.0/log(10) +// +// So common code with two different entry points those set pointers +// to the base address of coresponding data sets containing values +// of L2,T and prepare integer representation of L1 needed for following +// setf instruction. +// +// Note that both log and log10 use common approximation polynomial +// it means we need only one set of coefficients of approximation. +// +// +// 1. |x-1| >= 1/256 +// InvX = frcpa(x) +// r = InvX*x - 1 +// P(r) = r*((r*A3 - A2) + r^4*((A4 + r*A5) + r^2*(A6 + r*A7)), +// all coefficients are calcutated in quad and rounded to double +// precision. A7,A6,A5,A4 are stored in memory whereas A3 and A2 +// created with setf. +// +// N = float(n) where n is true unbiased exponent of x +// +// T is tabular value of log(1/frcpa(x)) calculated in quad precision +// and represented by two floating-point numbers 64-bit Thi and 32-bit Tlo. +// To load Thi,Tlo we get bits from 55 to 62 of register format significand +// as index and calculate two addresses +// ad_Thi = Thi_table_base_addr + 8 * index +// ad_Tlo = Tlo_table_base_addr + 4 * index +// +// L2 (1.0 or 1.0/log(10) depending on function) is calculated in quad +// precision and rounded to double extended; it's loaded from memory. +// +// L1 (log(2) or log10(2) depending on function) is calculated in quad +// precision and represented by two floating-point 64-bit numbers L1hi,L1lo +// stored in memory. +// +// And final result = ((L1hi*N + Thi) + (N*L1lo + Tlo)) + L2*P(r) +// +// +// 2. |x-1| < 1/256 +// r = x - 1 +// P(r) = r*((r*A3 - A2) + r^4*((A4 + r*A5) + r^2*(A6 + r*A7)), +// A7,A6,A5A4,A3,A2 are the same as in case |x-1| >= 1/256 +// +// And final results +// log(x) = P(r) +// log10(x) = L2*P(r) +// +// 3. How we define is input argument such that |x-1| < 1/256 or not. +// +// To do it we analyze biased exponent and integer representation of +// input argument +// +// a) First we test is biased exponent equal to 0xFFFE or 0xFFFF (i.e. +// we test is 0.5 <= x < 2). This comparison can be performed using +// unsigned version of cmp instruction in such a way +// biased_exponent_of_x - 0xFFFE < 2 +// +// +// b) Second (in case when result of a) is true) we need to compare x +// with 1-1/256 and 1+1/256 or in double precision memory representation +// with 0x3FEFE00000000000 and 0x3FF0100000000000 correspondingly. +// This comparison can be made like in a), using unsigned +// version of cmp i.e. ix - 0x3FEFE00000000000 < 0x0000300000000000. +// 0x0000300000000000 is difference between 0x3FF0100000000000 and +// 0x3FEFE00000000000 +// +// Note: NaT, any NaNs, +/-INF, +/-0, negatives and unnormalized numbers are +// filtered and processed on special branches. +// + +// +// Special values +//============================================================== +// +// log(+0) = -inf +// log(-0) = -inf +// +// log(+qnan) = +qnan +// log(-qnan) = -qnan +// log(+snan) = +qnan +// log(-snan) = -qnan +// +// log(-n) = QNAN Indefinite +// log(-inf) = QNAN Indefinite +// +// log(+inf) = +inf +// +// +// Registers used +//============================================================== +// Floating Point registers used: +// f8, input +// f7 -> f15, f32 -> f42 +// +// General registers used: +// r8 -> r11 +// r14 -> r23 +// +// Predicate registers used: +// p6 -> p15 + +// Assembly macros +//============================================================== +GR_TAG = r8 +GR_ad_1 = r8 +GR_ad_2 = r9 +GR_Exp = r10 +GR_N = r11 + +GR_x = r14 +GR_dx = r15 +GR_NearOne = r15 +GR_xorg = r16 +GR_mask = r16 +GR_05 = r17 +GR_A3 = r18 +GR_Sig = r19 +GR_Ind = r19 +GR_Nm1 = r20 +GR_bias = r21 +GR_ad_3 = r22 +GR_rexp = r23 + + +GR_SAVE_B0 = r33 +GR_SAVE_PFS = r34 +GR_SAVE_GP = r35 +GR_SAVE_SP = r36 + +GR_Parameter_X = r37 +GR_Parameter_Y = r38 +GR_Parameter_RESULT = r39 +GR_Parameter_TAG = r40 + + + +FR_NormX = f7 +FR_RcpX = f9 +FR_tmp = f9 +FR_r = f10 +FR_r2 = f11 +FR_r4 = f12 +FR_N = f13 +FR_Ln2hi = f14 +FR_Ln2lo = f15 + +FR_A7 = f32 +FR_A6 = f33 +FR_A5 = f34 +FR_A4 = f35 +FR_A3 = f36 +FR_A2 = f37 + +FR_Thi = f38 +FR_NxLn2hipThi = f38 +FR_NxLn2pT = f38 +FR_Tlo = f39 +FR_NxLn2lopTlo = f39 + +FR_InvLn10 = f40 +FR_A32 = f41 +FR_A321 = f42 + + +FR_Y = f1 +FR_X = f10 +FR_RESULT = f8 + + +// Data +//============================================================== +RODATA +.align 16 + +LOCAL_OBJECT_START(log_data) +// coefficients of polynomial approximation +data8 0x3FC2494104381A8E // A7 +data8 0xBFC5556D556BBB69 // A6 +// +// two parts of ln(2) +data8 0x3FE62E42FEF00000,0x3DD473DE6AF278ED +// +data8 0x8000000000000000,0x3FFF // 1.0 +// +data8 0x3FC999999988B5E9 // A5 +data8 0xBFCFFFFFFFF6FFF5 // A4 +// +// hi parts of ln(1/frcpa(1+i/256)), i=0...255 +data8 0x3F60040155D5889D // 0 +data8 0x3F78121214586B54 // 1 +data8 0x3F841929F96832EF // 2 +data8 0x3F8C317384C75F06 // 3 +data8 0x3F91A6B91AC73386 // 4 +data8 0x3F95BA9A5D9AC039 // 5 +data8 0x3F99D2A8074325F3 // 6 +data8 0x3F9D6B2725979802 // 7 +data8 0x3FA0C58FA19DFAA9 // 8 +data8 0x3FA2954C78CBCE1A // 9 +data8 0x3FA4A94D2DA96C56 // 10 +data8 0x3FA67C94F2D4BB58 // 11 +data8 0x3FA85188B630F068 // 12 +data8 0x3FAA6B8ABE73AF4C // 13 +data8 0x3FAC441E06F72A9E // 14 +data8 0x3FAE1E6713606D06 // 15 +data8 0x3FAFFA6911AB9300 // 16 +data8 0x3FB0EC139C5DA600 // 17 +data8 0x3FB1DBD2643D190B // 18 +data8 0x3FB2CC7284FE5F1C // 19 +data8 0x3FB3BDF5A7D1EE64 // 20 +data8 0x3FB4B05D7AA012E0 // 21 +data8 0x3FB580DB7CEB5701 // 22 +data8 0x3FB674F089365A79 // 23 +data8 0x3FB769EF2C6B568D // 24 +data8 0x3FB85FD927506A47 // 25 +data8 0x3FB9335E5D594988 // 26 +data8 0x3FBA2B0220C8E5F4 // 27 +data8 0x3FBB0004AC1A86AB // 28 +data8 0x3FBBF968769FCA10 // 29 +data8 0x3FBCCFEDBFEE13A8 // 30 +data8 0x3FBDA727638446A2 // 31 +data8 0x3FBEA3257FE10F79 // 32 +data8 0x3FBF7BE9FEDBFDE5 // 33 +data8 0x3FC02AB352FF25F3 // 34 +data8 0x3FC097CE579D204C // 35 +data8 0x3FC1178E8227E47B // 36 +data8 0x3FC185747DBECF33 // 37 +data8 0x3FC1F3B925F25D41 // 38 +data8 0x3FC2625D1E6DDF56 // 39 +data8 0x3FC2D1610C868139 // 40 +data8 0x3FC340C59741142E // 41 +data8 0x3FC3B08B6757F2A9 // 42 +data8 0x3FC40DFB08378003 // 43 +data8 0x3FC47E74E8CA5F7C // 44 +data8 0x3FC4EF51F6466DE4 // 45 +data8 0x3FC56092E02BA516 // 46 +data8 0x3FC5D23857CD74D4 // 47 +data8 0x3FC6313A37335D76 // 48 +data8 0x3FC6A399DABBD383 // 49 +data8 0x3FC70337DD3CE41A // 50 +data8 0x3FC77654128F6127 // 51 +data8 0x3FC7E9D82A0B022D // 52 +data8 0x3FC84A6B759F512E // 53 +data8 0x3FC8AB47D5F5A30F // 54 +data8 0x3FC91FE49096581B // 55 +data8 0x3FC981634011AA75 // 56 +data8 0x3FC9F6C407089664 // 57 +data8 0x3FCA58E729348F43 // 58 +data8 0x3FCABB55C31693AC // 59 +data8 0x3FCB1E104919EFD0 // 60 +data8 0x3FCB94EE93E367CA // 61 +data8 0x3FCBF851C067555E // 62 +data8 0x3FCC5C0254BF23A5 // 63 +data8 0x3FCCC000C9DB3C52 // 64 +data8 0x3FCD244D99C85673 // 65 +data8 0x3FCD88E93FB2F450 // 66 +data8 0x3FCDEDD437EAEF00 // 67 +data8 0x3FCE530EFFE71012 // 68 +data8 0x3FCEB89A1648B971 // 69 +data8 0x3FCF1E75FADF9BDE // 70 +data8 0x3FCF84A32EAD7C35 // 71 +data8 0x3FCFEB2233EA07CD // 72 +data8 0x3FD028F9C7035C1C // 73 +data8 0x3FD05C8BE0D9635A // 74 +data8 0x3FD085EB8F8AE797 // 75 +data8 0x3FD0B9C8E32D1911 // 76 +data8 0x3FD0EDD060B78080 // 77 +data8 0x3FD122024CF0063F // 78 +data8 0x3FD14BE2927AECD4 // 79 +data8 0x3FD180618EF18ADF // 80 +data8 0x3FD1B50BBE2FC63B // 81 +data8 0x3FD1DF4CC7CF242D // 82 +data8 0x3FD214456D0EB8D4 // 83 +data8 0x3FD23EC5991EBA49 // 84 +data8 0x3FD2740D9F870AFB // 85 +data8 0x3FD29ECDABCDFA03 // 86 +data8 0x3FD2D46602ADCCEE // 87 +data8 0x3FD2FF66B04EA9D4 // 88 +data8 0x3FD335504B355A37 // 89 +data8 0x3FD360925EC44F5C // 90 +data8 0x3FD38BF1C3337E74 // 91 +data8 0x3FD3C25277333183 // 92 +data8 0x3FD3EDF463C1683E // 93 +data8 0x3FD419B423D5E8C7 // 94 +data8 0x3FD44591E0539F48 // 95 +data8 0x3FD47C9175B6F0AD // 96 +data8 0x3FD4A8B341552B09 // 97 +data8 0x3FD4D4F39089019F // 98 +data8 0x3FD501528DA1F967 // 99 +data8 0x3FD52DD06347D4F6 // 100 +data8 0x3FD55A6D3C7B8A89 // 101 +data8 0x3FD5925D2B112A59 // 102 +data8 0x3FD5BF406B543DB1 // 103 +data8 0x3FD5EC433D5C35AD // 104 +data8 0x3FD61965CDB02C1E // 105 +data8 0x3FD646A84935B2A1 // 106 +data8 0x3FD6740ADD31DE94 // 107 +data8 0x3FD6A18DB74A58C5 // 108 +data8 0x3FD6CF31058670EC // 109 +data8 0x3FD6F180E852F0B9 // 110 +data8 0x3FD71F5D71B894EF // 111 +data8 0x3FD74D5AEFD66D5C // 112 +data8 0x3FD77B79922BD37D // 113 +data8 0x3FD7A9B9889F19E2 // 114 +data8 0x3FD7D81B037EB6A6 // 115 +data8 0x3FD8069E33827230 // 116 +data8 0x3FD82996D3EF8BCA // 117 +data8 0x3FD85855776DCBFA // 118 +data8 0x3FD8873658327CCE // 119 +data8 0x3FD8AA75973AB8CE // 120 +data8 0x3FD8D992DC8824E4 // 121 +data8 0x3FD908D2EA7D9511 // 122 +data8 0x3FD92C59E79C0E56 // 123 +data8 0x3FD95BD750EE3ED2 // 124 +data8 0x3FD98B7811A3EE5B // 125 +data8 0x3FD9AF47F33D406B // 126 +data8 0x3FD9DF270C1914A7 // 127 +data8 0x3FDA0325ED14FDA4 // 128 +data8 0x3FDA33440224FA78 // 129 +data8 0x3FDA57725E80C382 // 130 +data8 0x3FDA87D0165DD199 // 131 +data8 0x3FDAAC2E6C03F895 // 132 +data8 0x3FDADCCC6FDF6A81 // 133 +data8 0x3FDB015B3EB1E790 // 134 +data8 0x3FDB323A3A635948 // 135 +data8 0x3FDB56FA04462909 // 136 +data8 0x3FDB881AA659BC93 // 137 +data8 0x3FDBAD0BEF3DB164 // 138 +data8 0x3FDBD21297781C2F // 139 +data8 0x3FDC039236F08818 // 140 +data8 0x3FDC28CB1E4D32FC // 141 +data8 0x3FDC4E19B84723C1 // 142 +data8 0x3FDC7FF9C74554C9 // 143 +data8 0x3FDCA57B64E9DB05 // 144 +data8 0x3FDCCB130A5CEBAF // 145 +data8 0x3FDCF0C0D18F326F // 146 +data8 0x3FDD232075B5A201 // 147 +data8 0x3FDD490246DEFA6B // 148 +data8 0x3FDD6EFA918D25CD // 149 +data8 0x3FDD9509707AE52F // 150 +data8 0x3FDDBB2EFE92C554 // 151 +data8 0x3FDDEE2F3445E4AE // 152 +data8 0x3FDE148A1A2726CD // 153 +data8 0x3FDE3AFC0A49FF3F // 154 +data8 0x3FDE6185206D516D // 155 +data8 0x3FDE882578823D51 // 156 +data8 0x3FDEAEDD2EAC990C // 157 +data8 0x3FDED5AC5F436BE2 // 158 +data8 0x3FDEFC9326D16AB8 // 159 +data8 0x3FDF2391A21575FF // 160 +data8 0x3FDF4AA7EE03192C // 161 +data8 0x3FDF71D627C30BB0 // 162 +data8 0x3FDF991C6CB3B379 // 163 +data8 0x3FDFC07ADA69A90F // 164 +data8 0x3FDFE7F18EB03D3E // 165 +data8 0x3FE007C053C5002E // 166 +data8 0x3FE01B942198A5A0 // 167 +data8 0x3FE02F74400C64EA // 168 +data8 0x3FE04360BE7603AC // 169 +data8 0x3FE05759AC47FE33 // 170 +data8 0x3FE06B5F1911CF51 // 171 +data8 0x3FE078BF0533C568 // 172 +data8 0x3FE08CD9687E7B0E // 173 +data8 0x3FE0A10074CF9019 // 174 +data8 0x3FE0B5343A234476 // 175 +data8 0x3FE0C974C89431CD // 176 +data8 0x3FE0DDC2305B9886 // 177 +data8 0x3FE0EB524BAFC918 // 178 +data8 0x3FE0FFB54213A475 // 179 +data8 0x3FE114253DA97D9F // 180 +data8 0x3FE128A24F1D9AFF // 181 +data8 0x3FE1365252BF0864 // 182 +data8 0x3FE14AE558B4A92D // 183 +data8 0x3FE15F85A19C765B // 184 +data8 0x3FE16D4D38C119FA // 185 +data8 0x3FE18203C20DD133 // 186 +data8 0x3FE196C7BC4B1F3A // 187 +data8 0x3FE1A4A738B7A33C // 188 +data8 0x3FE1B981C0C9653C // 189 +data8 0x3FE1CE69E8BB106A // 190 +data8 0x3FE1DC619DE06944 // 191 +data8 0x3FE1F160A2AD0DA3 // 192 +data8 0x3FE2066D7740737E // 193 +data8 0x3FE2147DBA47A393 // 194 +data8 0x3FE229A1BC5EBAC3 // 195 +data8 0x3FE237C1841A502E // 196 +data8 0x3FE24CFCE6F80D9A // 197 +data8 0x3FE25B2C55CD5762 // 198 +data8 0x3FE2707F4D5F7C40 // 199 +data8 0x3FE285E0842CA383 // 200 +data8 0x3FE294294708B773 // 201 +data8 0x3FE2A9A2670AFF0C // 202 +data8 0x3FE2B7FB2C8D1CC0 // 203 +data8 0x3FE2C65A6395F5F5 // 204 +data8 0x3FE2DBF557B0DF42 // 205 +data8 0x3FE2EA64C3F97654 // 206 +data8 0x3FE3001823684D73 // 207 +data8 0x3FE30E97E9A8B5CC // 208 +data8 0x3FE32463EBDD34E9 // 209 +data8 0x3FE332F4314AD795 // 210 +data8 0x3FE348D90E7464CF // 211 +data8 0x3FE35779F8C43D6D // 212 +data8 0x3FE36621961A6A99 // 213 +data8 0x3FE37C299F3C366A // 214 +data8 0x3FE38AE2171976E7 // 215 +data8 0x3FE399A157A603E7 // 216 +data8 0x3FE3AFCCFE77B9D1 // 217 +data8 0x3FE3BE9D503533B5 // 218 +data8 0x3FE3CD7480B4A8A2 // 219 +data8 0x3FE3E3C43918F76C // 220 +data8 0x3FE3F2ACB27ED6C6 // 221 +data8 0x3FE4019C2125CA93 // 222 +data8 0x3FE4181061389722 // 223 +data8 0x3FE42711518DF545 // 224 +data8 0x3FE436194E12B6BF // 225 +data8 0x3FE445285D68EA69 // 226 +data8 0x3FE45BCC464C893A // 227 +data8 0x3FE46AED21F117FC // 228 +data8 0x3FE47A1527E8A2D3 // 229 +data8 0x3FE489445EFFFCCB // 230 +data8 0x3FE4A018BCB69835 // 231 +data8 0x3FE4AF5A0C9D65D7 // 232 +data8 0x3FE4BEA2A5BDBE87 // 233 +data8 0x3FE4CDF28F10AC46 // 234 +data8 0x3FE4DD49CF994058 // 235 +data8 0x3FE4ECA86E64A683 // 236 +data8 0x3FE503C43CD8EB68 // 237 +data8 0x3FE513356667FC57 // 238 +data8 0x3FE522AE0738A3D7 // 239 +data8 0x3FE5322E26867857 // 240 +data8 0x3FE541B5CB979809 // 241 +data8 0x3FE55144FDBCBD62 // 242 +data8 0x3FE560DBC45153C6 // 243 +data8 0x3FE5707A26BB8C66 // 244 +data8 0x3FE587F60ED5B8FF // 245 +data8 0x3FE597A7977C8F31 // 246 +data8 0x3FE5A760D634BB8A // 247 +data8 0x3FE5B721D295F10E // 248 +data8 0x3FE5C6EA94431EF9 // 249 +data8 0x3FE5D6BB22EA86F5 // 250 +data8 0x3FE5E6938645D38F // 251 +data8 0x3FE5F673C61A2ED1 // 252 +data8 0x3FE6065BEA385926 // 253 +data8 0x3FE6164BFA7CC06B // 254 +data8 0x3FE62643FECF9742 // 255 +// +// lo parts of ln(1/frcpa(1+i/256)), i=0...255 +data4 0x20E70672 // 0 +data4 0x1F60A5D0 // 1 +data4 0x218EABA0 // 2 +data4 0x21403104 // 3 +data4 0x20E9B54E // 4 +data4 0x21EE1382 // 5 +data4 0x226014E3 // 6 +data4 0x2095E5C9 // 7 +data4 0x228BA9D4 // 8 +data4 0x22932B86 // 9 +data4 0x22608A57 // 10 +data4 0x220209F3 // 11 +data4 0x212882CC // 12 +data4 0x220D46E2 // 13 +data4 0x21FA4C28 // 14 +data4 0x229E5BD9 // 15 +data4 0x228C9838 // 16 +data4 0x2311F954 // 17 +data4 0x221365DF // 18 +data4 0x22BD0CB3 // 19 +data4 0x223D4BB7 // 20 +data4 0x22A71BBE // 21 +data4 0x237DB2FA // 22 +data4 0x23194C9D // 23 +data4 0x22EC639E // 24 +data4 0x2367E669 // 25 +data4 0x232E1D5F // 26 +data4 0x234A639B // 27 +data4 0x2365C0E0 // 28 +data4 0x234646C1 // 29 +data4 0x220CBF9C // 30 +data4 0x22A00FD4 // 31 +data4 0x2306A3F2 // 32 +data4 0x23745A9B // 33 +data4 0x2398D756 // 34 +data4 0x23DD0B6A // 35 +data4 0x23DE338B // 36 +data4 0x23A222DF // 37 +data4 0x223164F8 // 38 +data4 0x23B4E87B // 39 +data4 0x23D6CCB8 // 40 +data4 0x220C2099 // 41 +data4 0x21B86B67 // 42 +data4 0x236D14F1 // 43 +data4 0x225A923F // 44 +data4 0x22748723 // 45 +data4 0x22200D13 // 46 +data4 0x23C296EA // 47 +data4 0x2302AC38 // 48 +data4 0x234B1996 // 49 +data4 0x2385E298 // 50 +data4 0x23175BE5 // 51 +data4 0x2193F482 // 52 +data4 0x23BFEA90 // 53 +data4 0x23D70A0C // 54 +data4 0x231CF30A // 55 +data4 0x235D9E90 // 56 +data4 0x221AD0CB // 57 +data4 0x22FAA08B // 58 +data4 0x23D29A87 // 59 +data4 0x20C4B2FE // 60 +data4 0x2381B8B7 // 61 +data4 0x23F8D9FC // 62 +data4 0x23EAAE7B // 63 +data4 0x2329E8AA // 64 +data4 0x23EC0322 // 65 +data4 0x2357FDCB // 66 +data4 0x2392A9AD // 67 +data4 0x22113B02 // 68 +data4 0x22DEE901 // 69 +data4 0x236A6D14 // 70 +data4 0x2371D33E // 71 +data4 0x2146F005 // 72 +data4 0x23230B06 // 73 +data4 0x22F1C77D // 74 +data4 0x23A89FA3 // 75 +data4 0x231D1241 // 76 +data4 0x244DA96C // 77 +data4 0x23ECBB7D // 78 +data4 0x223E42B4 // 79 +data4 0x23801BC9 // 80 +data4 0x23573263 // 81 +data4 0x227C1158 // 82 +data4 0x237BD749 // 83 +data4 0x21DDBAE9 // 84 +data4 0x23401735 // 85 +data4 0x241D9DEE // 86 +data4 0x23BC88CB // 87 +data4 0x2396D5F1 // 88 +data4 0x23FC89CF // 89 +data4 0x2414F9A2 // 90 +data4 0x2474A0F5 // 91 +data4 0x24354B60 // 92 +data4 0x23C1EB40 // 93 +data4 0x2306DD92 // 94 +data4 0x24353B6B // 95 +data4 0x23CD1701 // 96 +data4 0x237C7A1C // 97 +data4 0x245793AA // 98 +data4 0x24563695 // 99 +data4 0x23C51467 // 100 +data4 0x24476B68 // 101 +data4 0x212585A9 // 102 +data4 0x247B8293 // 103 +data4 0x2446848A // 104 +data4 0x246A53F8 // 105 +data4 0x246E496D // 106 +data4 0x23ED1D36 // 107 +data4 0x2314C258 // 108 +data4 0x233244A7 // 109 +data4 0x245B7AF0 // 110 +data4 0x24247130 // 111 +data4 0x22D67B38 // 112 +data4 0x2449F620 // 113 +data4 0x23BBC8B8 // 114 +data4 0x237D3BA0 // 115 +data4 0x245E8F13 // 116 +data4 0x2435573F // 117 +data4 0x242DE666 // 118 +data4 0x2463BC10 // 119 +data4 0x2466587D // 120 +data4 0x2408144B // 121 +data4 0x2405F0E5 // 122 +data4 0x22381CFF // 123 +data4 0x24154F9B // 124 +data4 0x23A4E96E // 125 +data4 0x24052967 // 126 +data4 0x2406963F // 127 +data4 0x23F7D3CB // 128 +data4 0x2448AFF4 // 129 +data4 0x24657A21 // 130 +data4 0x22FBC230 // 131 +data4 0x243C8DEA // 132 +data4 0x225DC4B7 // 133 +data4 0x23496EBF // 134 +data4 0x237C2B2B // 135 +data4 0x23A4A5B1 // 136 +data4 0x2394E9D1 // 137 +data4 0x244BC950 // 138 +data4 0x23C7448F // 139 +data4 0x2404A1AD // 140 +data4 0x246511D5 // 141 +data4 0x24246526 // 142 +data4 0x23111F57 // 143 +data4 0x22868951 // 144 +data4 0x243EB77F // 145 +data4 0x239F3DFF // 146 +data4 0x23089666 // 147 +data4 0x23EBFA6A // 148 +data4 0x23C51312 // 149 +data4 0x23E1DD5E // 150 +data4 0x232C0944 // 151 +data4 0x246A741F // 152 +data4 0x2414DF8D // 153 +data4 0x247B5546 // 154 +data4 0x2415C980 // 155 +data4 0x24324ABD // 156 +data4 0x234EB5E5 // 157 +data4 0x2465E43E // 158 +data4 0x242840D1 // 159 +data4 0x24444057 // 160 +data4 0x245E56F0 // 161 +data4 0x21AE30F8 // 162 +data4 0x23FB3283 // 163 +data4 0x247A4D07 // 164 +data4 0x22AE314D // 165 +data4 0x246B7727 // 166 +data4 0x24EAD526 // 167 +data4 0x24B41DC9 // 168 +data4 0x24EE8062 // 169 +data4 0x24A0C7C4 // 170 +data4 0x24E8DA67 // 171 +data4 0x231120F7 // 172 +data4 0x24401FFB // 173 +data4 0x2412DD09 // 174 +data4 0x248C131A // 175 +data4 0x24C0A7CE // 176 +data4 0x243DD4C8 // 177 +data4 0x24457FEB // 178 +data4 0x24DEEFBB // 179 +data4 0x243C70AE // 180 +data4 0x23E7A6FA // 181 +data4 0x24C2D311 // 182 +data4 0x23026255 // 183 +data4 0x2437C9B9 // 184 +data4 0x246BA847 // 185 +data4 0x2420B448 // 186 +data4 0x24C4CF5A // 187 +data4 0x242C4981 // 188 +data4 0x24DE1525 // 189 +data4 0x24F5CC33 // 190 +data4 0x235A85DA // 191 +data4 0x24A0B64F // 192 +data4 0x244BA0A4 // 193 +data4 0x24AAF30A // 194 +data4 0x244C86F9 // 195 +data4 0x246D5B82 // 196 +data4 0x24529347 // 197 +data4 0x240DD008 // 198 +data4 0x24E98790 // 199 +data4 0x2489B0CE // 200 +data4 0x22BC29AC // 201 +data4 0x23F37C7A // 202 +data4 0x24987FE8 // 203 +data4 0x22AFE20B // 204 +data4 0x24C8D7C2 // 205 +data4 0x24B28B7D // 206 +data4 0x23B6B271 // 207 +data4 0x24C77CB6 // 208 +data4 0x24EF1DCA // 209 +data4 0x24A4F0AC // 210 +data4 0x24CF113E // 211 +data4 0x2496BBAB // 212 +data4 0x23C7CC8A // 213 +data4 0x23AE3961 // 214 +data4 0x2410A895 // 215 +data4 0x23CE3114 // 216 +data4 0x2308247D // 217 +data4 0x240045E9 // 218 +data4 0x24974F60 // 219 +data4 0x242CB39F // 220 +data4 0x24AB8D69 // 221 +data4 0x23436788 // 222 +data4 0x24305E9E // 223 +data4 0x243E71A9 // 224 +data4 0x23C2A6B3 // 225 +data4 0x23FFE6CF // 226 +data4 0x2322D801 // 227 +data4 0x24515F21 // 228 +data4 0x2412A0D6 // 229 +data4 0x24E60D44 // 230 +data4 0x240D9251 // 231 +data4 0x247076E2 // 232 +data4 0x229B101B // 233 +data4 0x247B12DE // 234 +data4 0x244B9127 // 235 +data4 0x2499EC42 // 236 +data4 0x21FC3963 // 237 +data4 0x23E53266 // 238 +data4 0x24CE102D // 239 +data4 0x23CC45D2 // 240 +data4 0x2333171D // 241 +data4 0x246B3533 // 242 +data4 0x24931129 // 243 +data4 0x24405FFA // 244 +data4 0x24CF464D // 245 +data4 0x237095CD // 246 +data4 0x24F86CBD // 247 +data4 0x24E2D84B // 248 +data4 0x21ACBB44 // 249 +data4 0x24F43A8C // 250 +data4 0x249DB931 // 251 +data4 0x24A385EF // 252 +data4 0x238B1279 // 253 +data4 0x2436213E // 254 +data4 0x24F18A3B // 255 +LOCAL_OBJECT_END(log_data) + + +LOCAL_OBJECT_START(log10_data) +// coefficients of polynoimal approximation +data8 0x3FC2494104381A8E // A7 +data8 0xBFC5556D556BBB69 // A6 +// +// two parts of ln(2)/ln(10) +data8 0x3FD3441350900000, 0x3DCEF3FDE623E256 +// +data8 0xDE5BD8A937287195,0x3FFD // 1/ln(10) +// +data8 0x3FC999999988B5E9 // A5 +data8 0xBFCFFFFFFFF6FFF5 // A4 +// +// Hi parts of ln(1/frcpa(1+i/256))/ln(10), i=0...255 +data8 0x3F4BD27045BFD024 // 0 +data8 0x3F64E84E793A474A // 1 +data8 0x3F7175085AB85FF0 // 2 +data8 0x3F787CFF9D9147A5 // 3 +data8 0x3F7EA9D372B89FC8 // 4 +data8 0x3F82DF9D95DA961C // 5 +data8 0x3F866DF172D6372B // 6 +data8 0x3F898D79EF5EEDEF // 7 +data8 0x3F8D22ADF3F9579C // 8 +data8 0x3F9024231D30C398 // 9 +data8 0x3F91F23A98897D49 // 10 +data8 0x3F93881A7B818F9E // 11 +data8 0x3F951F6E1E759E35 // 12 +data8 0x3F96F2BCE7ADC5B4 // 13 +data8 0x3F988D362CDF359E // 14 +data8 0x3F9A292BAF010981 // 15 +data8 0x3F9BC6A03117EB97 // 16 +data8 0x3F9D65967DE3AB08 // 17 +data8 0x3F9F061167FC31E7 // 18 +data8 0x3FA05409E4F7819B // 19 +data8 0x3FA125D0432EA20D // 20 +data8 0x3FA1F85D440D299B // 21 +data8 0x3FA2AD755749617C // 22 +data8 0x3FA381772A00E603 // 23 +data8 0x3FA45643E165A70A // 24 +data8 0x3FA52BDD034475B8 // 25 +data8 0x3FA5E3966B7E9295 // 26 +data8 0x3FA6BAAF47C5B244 // 27 +data8 0x3FA773B3E8C4F3C7 // 28 +data8 0x3FA84C51EBEE8D15 // 29 +data8 0x3FA906A6786FC1CA // 30 +data8 0x3FA9C197ABF00DD6 // 31 +data8 0x3FAA9C78712191F7 // 32 +data8 0x3FAB58C09C8D637C // 33 +data8 0x3FAC15A8BCDD7B7E // 34 +data8 0x3FACD331E2C2967B // 35 +data8 0x3FADB11ED766ABF4 // 36 +data8 0x3FAE70089346A9E6 // 37 +data8 0x3FAF2F96C6754AED // 38 +data8 0x3FAFEFCA8D451FD5 // 39 +data8 0x3FB0585283764177 // 40 +data8 0x3FB0B913AAC7D3A6 // 41 +data8 0x3FB11A294F2569F5 // 42 +data8 0x3FB16B51A2696890 // 43 +data8 0x3FB1CD03ADACC8BD // 44 +data8 0x3FB22F0BDD7745F5 // 45 +data8 0x3FB2916ACA38D1E7 // 46 +data8 0x3FB2F4210DF7663C // 47 +data8 0x3FB346A6C3C49065 // 48 +data8 0x3FB3A9FEBC605409 // 49 +data8 0x3FB3FD0C10A3AA54 // 50 +data8 0x3FB46107D3540A81 // 51 +data8 0x3FB4C55DD16967FE // 52 +data8 0x3FB51940330C000A // 53 +data8 0x3FB56D620EE7115E // 54 +data8 0x3FB5D2ABCF26178D // 55 +data8 0x3FB6275AA5DEBF81 // 56 +data8 0x3FB68D4EAF26D7EE // 57 +data8 0x3FB6E28C5C54A28D // 58 +data8 0x3FB7380B9665B7C7 // 59 +data8 0x3FB78DCCC278E85B // 60 +data8 0x3FB7F50C2CF25579 // 61 +data8 0x3FB84B5FD5EAEFD7 // 62 +data8 0x3FB8A1F6BAB2B226 // 63 +data8 0x3FB8F8D144557BDF // 64 +data8 0x3FB94FEFDCD61D92 // 65 +data8 0x3FB9A752EF316149 // 66 +data8 0x3FB9FEFAE7611EDF // 67 +data8 0x3FBA56E8325F5C86 // 68 +data8 0x3FBAAF1B3E297BB3 // 69 +data8 0x3FBB079479C372AC // 70 +data8 0x3FBB6054553B12F7 // 71 +data8 0x3FBBB95B41AB5CE5 // 72 +data8 0x3FBC12A9B13FE079 // 73 +data8 0x3FBC6C4017382BEA // 74 +data8 0x3FBCB41FBA42686C // 75 +data8 0x3FBD0E38CE73393E // 76 +data8 0x3FBD689B2193F132 // 77 +data8 0x3FBDC3472B1D285F // 78 +data8 0x3FBE0C06300D528B // 79 +data8 0x3FBE6738190E394B // 80 +data8 0x3FBEC2B50D208D9A // 81 +data8 0x3FBF0C1C2B936827 // 82 +data8 0x3FBF68216C9CC726 // 83 +data8 0x3FBFB1F6381856F3 // 84 +data8 0x3FC00742AF4CE5F8 // 85 +data8 0x3FC02C64906512D2 // 86 +data8 0x3FC05AF1E63E03B4 // 87 +data8 0x3FC0804BEA723AA8 // 88 +data8 0x3FC0AF1FD6711526 // 89 +data8 0x3FC0D4B2A88059FF // 90 +data8 0x3FC0FA5EF136A06C // 91 +data8 0x3FC1299A4FB3E305 // 92 +data8 0x3FC14F806253C3EC // 93 +data8 0x3FC175805D1587C1 // 94 +data8 0x3FC19B9A637CA294 // 95 +data8 0x3FC1CB5FC26EDE16 // 96 +data8 0x3FC1F1B4E65F2590 // 97 +data8 0x3FC218248B5DC3E5 // 98 +data8 0x3FC23EAED62ADC76 // 99 +data8 0x3FC26553EBD337BC // 100 +data8 0x3FC28C13F1B118FF // 101 +data8 0x3FC2BCAA14381385 // 102 +data8 0x3FC2E3A740B7800E // 103 +data8 0x3FC30ABFD8F333B6 // 104 +data8 0x3FC331F403985096 // 105 +data8 0x3FC35943E7A6068F // 106 +data8 0x3FC380AFAC6E7C07 // 107 +data8 0x3FC3A8377997B9E5 // 108 +data8 0x3FC3CFDB771C9ADB // 109 +data8 0x3FC3EDA90D39A5DE // 110 +data8 0x3FC4157EC09505CC // 111 +data8 0x3FC43D7113FB04C0 // 112 +data8 0x3FC4658030AD1CCE // 113 +data8 0x3FC48DAC404638F5 // 114 +data8 0x3FC4B5F56CBBB869 // 115 +data8 0x3FC4DE5BE05E7582 // 116 +data8 0x3FC4FCBC0776FD85 // 117 +data8 0x3FC525561E9256EE // 118 +data8 0x3FC54E0DF3198865 // 119 +data8 0x3FC56CAB7112BDE2 // 120 +data8 0x3FC59597BA735B15 // 121 +data8 0x3FC5BEA23A506FD9 // 122 +data8 0x3FC5DD7E08DE382E // 123 +data8 0x3FC606BDD3F92355 // 124 +data8 0x3FC6301C518A501E // 125 +data8 0x3FC64F3770618915 // 126 +data8 0x3FC678CC14C1E2D7 // 127 +data8 0x3FC6981005ED2947 // 128 +data8 0x3FC6C1DB5F9BB335 // 129 +data8 0x3FC6E1488ECD2880 // 130 +data8 0x3FC70B4B2E7E41B8 // 131 +data8 0x3FC72AE209146BF8 // 132 +data8 0x3FC7551C81BD8DCF // 133 +data8 0x3FC774DD76CC43BD // 134 +data8 0x3FC79F505DB00E88 // 135 +data8 0x3FC7BF3BDE099F30 // 136 +data8 0x3FC7E9E7CAC437F8 // 137 +data8 0x3FC809FE4902D00D // 138 +data8 0x3FC82A2757995CBD // 139 +data8 0x3FC85525C625E098 // 140 +data8 0x3FC8757A79831887 // 141 +data8 0x3FC895E2058D8E02 // 142 +data8 0x3FC8C13437695531 // 143 +data8 0x3FC8E1C812EF32BE // 144 +data8 0x3FC9026F112197E8 // 145 +data8 0x3FC923294888880A // 146 +data8 0x3FC94EEA4B8334F2 // 147 +data8 0x3FC96FD1B639FC09 // 148 +data8 0x3FC990CCA66229AB // 149 +data8 0x3FC9B1DB33334842 // 150 +data8 0x3FC9D2FD740E6606 // 151 +data8 0x3FC9FF49EEDCB553 // 152 +data8 0x3FCA209A84FBCFF7 // 153 +data8 0x3FCA41FF1E43F02B // 154 +data8 0x3FCA6377D2CE9377 // 155 +data8 0x3FCA8504BAE0D9F5 // 156 +data8 0x3FCAA6A5EEEBEFE2 // 157 +data8 0x3FCAC85B878D7878 // 158 +data8 0x3FCAEA259D8FFA0B // 159 +data8 0x3FCB0C0449EB4B6A // 160 +data8 0x3FCB2DF7A5C50299 // 161 +data8 0x3FCB4FFFCA70E4D1 // 162 +data8 0x3FCB721CD17157E2 // 163 +data8 0x3FCB944ED477D4EC // 164 +data8 0x3FCBB695ED655C7C // 165 +data8 0x3FCBD8F2364AEC0F // 166 +data8 0x3FCBFB63C969F4FF // 167 +data8 0x3FCC1DEAC134D4E9 // 168 +data8 0x3FCC4087384F4F80 // 169 +data8 0x3FCC6339498F09E1 // 170 +data8 0x3FCC86010FFC076B // 171 +data8 0x3FCC9D3D065C5B41 // 172 +data8 0x3FCCC029375BA079 // 173 +data8 0x3FCCE32B66978BA4 // 174 +data8 0x3FCD0643AFD51404 // 175 +data8 0x3FCD29722F0DEA45 // 176 +data8 0x3FCD4CB70070FE43 // 177 +data8 0x3FCD6446AB3F8C95 // 178 +data8 0x3FCD87B0EF71DB44 // 179 +data8 0x3FCDAB31D1FE99A6 // 180 +data8 0x3FCDCEC96FDC888E // 181 +data8 0x3FCDE69088763579 // 182 +data8 0x3FCE0A4E4A25C1FF // 183 +data8 0x3FCE2E2315755E32 // 184 +data8 0x3FCE461322D1648A // 185 +data8 0x3FCE6A0E95C7787B // 186 +data8 0x3FCE8E216243DD60 // 187 +data8 0x3FCEA63AF26E007C // 188 +data8 0x3FCECA74ED15E0B7 // 189 +data8 0x3FCEEEC692CCD259 // 190 +data8 0x3FCF070A36B8D9C0 // 191 +data8 0x3FCF2B8393E34A2D // 192 +data8 0x3FCF5014EF538A5A // 193 +data8 0x3FCF68833AF1B17F // 194 +data8 0x3FCF8D3CD9F3F04E // 195 +data8 0x3FCFA5C61ADD93E9 // 196 +data8 0x3FCFCAA8567EBA79 // 197 +data8 0x3FCFE34CC8743DD8 // 198 +data8 0x3FD0042BFD74F519 // 199 +data8 0x3FD016BDF6A18017 // 200 +data8 0x3FD023262F907322 // 201 +data8 0x3FD035CCED8D32A1 // 202 +data8 0x3FD042430E869FFB // 203 +data8 0x3FD04EBEC842B2DF // 204 +data8 0x3FD06182E84FD4AB // 205 +data8 0x3FD06E0CB609D383 // 206 +data8 0x3FD080E60BEC8F12 // 207 +data8 0x3FD08D7E0D894735 // 208 +data8 0x3FD0A06CC96A2055 // 209 +data8 0x3FD0AD131F3B3C55 // 210 +data8 0x3FD0C01771E775FB // 211 +data8 0x3FD0CCCC3CAD6F4B // 212 +data8 0x3FD0D986D91A34A8 // 213 +data8 0x3FD0ECA9B8861A2D // 214 +data8 0x3FD0F972F87FF3D5 // 215 +data8 0x3FD106421CF0E5F7 // 216 +data8 0x3FD11983EBE28A9C // 217 +data8 0x3FD12661E35B7859 // 218 +data8 0x3FD13345D2779D3B // 219 +data8 0x3FD146A6F597283A // 220 +data8 0x3FD15399E81EA83D // 221 +data8 0x3FD16092E5D3A9A6 // 222 +data8 0x3FD17413C3B7AB5D // 223 +data8 0x3FD1811BF629D6FA // 224 +data8 0x3FD18E2A47B46685 // 225 +data8 0x3FD19B3EBE1A4418 // 226 +data8 0x3FD1AEE9017CB450 // 227 +data8 0x3FD1BC0CED7134E1 // 228 +data8 0x3FD1C93712ABC7FF // 229 +data8 0x3FD1D66777147D3E // 230 +data8 0x3FD1EA3BD1286E1C // 231 +data8 0x3FD1F77BED932C4C // 232 +data8 0x3FD204C25E1B031F // 233 +data8 0x3FD2120F28CE69B1 // 234 +data8 0x3FD21F6253C48D00 // 235 +data8 0x3FD22CBBE51D60A9 // 236 +data8 0x3FD240CE4C975444 // 237 +data8 0x3FD24E37F8ECDAE7 // 238 +data8 0x3FD25BA8215AF7FC // 239 +data8 0x3FD2691ECC29F042 // 240 +data8 0x3FD2769BFFAB2DFF // 241 +data8 0x3FD2841FC23952C9 // 242 +data8 0x3FD291AA1A384978 // 243 +data8 0x3FD29F3B0E15584A // 244 +data8 0x3FD2B3A0EE479DF7 // 245 +data8 0x3FD2C142842C09E5 // 246 +data8 0x3FD2CEEACCB7BD6C // 247 +data8 0x3FD2DC99CE82FF20 // 248 +data8 0x3FD2EA4F902FD7D9 // 249 +data8 0x3FD2F80C186A25FC // 250 +data8 0x3FD305CF6DE7B0F6 // 251 +data8 0x3FD3139997683CE7 // 252 +data8 0x3FD3216A9BB59E7C // 253 +data8 0x3FD32F4281A3CEFE // 254 +data8 0x3FD33D2150110091 // 255 +// +// Lo parts of ln(1/frcpa(1+i/256))/ln(10), i=0...255 +data4 0x1FB0EB5A // 0 +data4 0x206E5EE3 // 1 +data4 0x208F3609 // 2 +data4 0x2070EB03 // 3 +data4 0x1F314BAE // 4 +data4 0x217A889D // 5 +data4 0x21E63650 // 6 +data4 0x21C2F4A3 // 7 +data4 0x2192A10C // 8 +data4 0x1F84B73E // 9 +data4 0x2243FBCA // 10 +data4 0x21BD9C51 // 11 +data4 0x213C542B // 12 +data4 0x21047386 // 13 +data4 0x21217D8F // 14 +data4 0x226791B7 // 15 +data4 0x204CCE66 // 16 +data4 0x2234CE9F // 17 +data4 0x220675E2 // 18 +data4 0x22B8E5BA // 19 +data4 0x22C12D14 // 20 +data4 0x211D41F0 // 21 +data4 0x228507F3 // 22 +data4 0x22F7274B // 23 +data4 0x22A7FDD1 // 24 +data4 0x2244A06E // 25 +data4 0x215DCE69 // 26 +data4 0x22F5C961 // 27 +data4 0x22EBEF29 // 28 +data4 0x222A2CB6 // 29 +data4 0x22B9FE00 // 30 +data4 0x22E79EB7 // 31 +data4 0x222F9607 // 32 +data4 0x2189D87F // 33 +data4 0x2236DB45 // 34 +data4 0x22ED77FB // 35 +data4 0x21CB70F0 // 36 +data4 0x21B8ACE8 // 37 +data4 0x22EC58C1 // 38 +data4 0x22CFCC1C // 39 +data4 0x2343E77A // 40 +data4 0x237FBC7F // 41 +data4 0x230D472E // 42 +data4 0x234686FB // 43 +data4 0x23770425 // 44 +data4 0x223977EC // 45 +data4 0x2345800A // 46 +data4 0x237BC351 // 47 +data4 0x23191502 // 48 +data4 0x232BAC12 // 49 +data4 0x22692421 // 50 +data4 0x234D409D // 51 +data4 0x22EC3214 // 52 +data4 0x2376C916 // 53 +data4 0x22B00DD1 // 54 +data4 0x2309D910 // 55 +data4 0x22F925FD // 56 +data4 0x22A63A7B // 57 +data4 0x2106264A // 58 +data4 0x234227F9 // 59 +data4 0x1ECB1978 // 60 +data4 0x23460A62 // 61 +data4 0x232ED4B1 // 62 +data4 0x226DDC38 // 63 +data4 0x1F101A73 // 64 +data4 0x21B1F82B // 65 +data4 0x22752F19 // 66 +data4 0x2320BC15 // 67 +data4 0x236EEC5E // 68 +data4 0x23404D3E // 69 +data4 0x2304C517 // 70 +data4 0x22F7441A // 71 +data4 0x230D3D7A // 72 +data4 0x2264A9DF // 73 +data4 0x22410CC8 // 74 +data4 0x2342CCCB // 75 +data4 0x23560BD4 // 76 +data4 0x237BBFFE // 77 +data4 0x2373A206 // 78 +data4 0x22C871B9 // 79 +data4 0x2354B70C // 80 +data4 0x232EDB33 // 81 +data4 0x235DB680 // 82 +data4 0x230EF422 // 83 +data4 0x235316CA // 84 +data4 0x22EEEE8B // 85 +data4 0x2375C88C // 86 +data4 0x235ABD21 // 87 +data4 0x23A0D232 // 88 +data4 0x23F5FFB5 // 89 +data4 0x23D3CEC8 // 90 +data4 0x22A92204 // 91 +data4 0x238C64DF // 92 +data4 0x23B82896 // 93 +data4 0x22D633B8 // 94 +data4 0x23861E93 // 95 +data4 0x23CB594B // 96 +data4 0x2330387E // 97 +data4 0x21CD4702 // 98 +data4 0x2284C505 // 99 +data4 0x23D6995C // 100 +data4 0x23F6C807 // 101 +data4 0x239CEF5C // 102 +data4 0x239442B0 // 103 +data4 0x22B35EE5 // 104 +data4 0x2391E9A4 // 105 +data4 0x23A390F5 // 106 +data4 0x2349AC9C // 107 +data4 0x23FA5535 // 108 +data4 0x21E3A46A // 109 +data4 0x23B44ABA // 110 +data4 0x23CEA8E0 // 111 +data4 0x23F647DC // 112 +data4 0x2390D1A8 // 113 +data4 0x23D0CFA2 // 114 +data4 0x236E0872 // 115 +data4 0x23B88B91 // 116 +data4 0x2283C359 // 117 +data4 0x232F647F // 118 +data4 0x23122CD7 // 119 +data4 0x232CF564 // 120 +data4 0x232630FD // 121 +data4 0x23BEE1C8 // 122 +data4 0x23B2BD30 // 123 +data4 0x2301F1C0 // 124 +data4 0x23CE4D67 // 125 +data4 0x23A353C9 // 126 +data4 0x238086E8 // 127 +data4 0x22D0D29E // 128 +data4 0x23A3B3C8 // 129 +data4 0x23F69F4B // 130 +data4 0x23EA3C21 // 131 +data4 0x23951C88 // 132 +data4 0x2372AFFC // 133 +data4 0x23A6D1A8 // 134 +data4 0x22BBBAF4 // 135 +data4 0x227FA3DD // 136 +data4 0x23804D9B // 137 +data4 0x232D771F // 138 +data4 0x239CB57B // 139 +data4 0x2303CF34 // 140 +data4 0x22218C2A // 141 +data4 0x23991BEE // 142 +data4 0x23EB3596 // 143 +data4 0x230487FA // 144 +data4 0x2135DF4C // 145 +data4 0x2380FD2D // 146 +data4 0x23EB75E9 // 147 +data4 0x211C62C8 // 148 +data4 0x23F518F1 // 149 +data4 0x23FEF882 // 150 +data4 0x239097C7 // 151 +data4 0x223E2BDA // 152 +data4 0x23988F89 // 153 +data4 0x22E4A4AD // 154 +data4 0x23F03D9C // 155 +data4 0x23F5018F // 156 +data4 0x23E1E250 // 157 +data4 0x23FD3D90 // 158 +data4 0x22DEE2FF // 159 +data4 0x238342AB // 160 +data4 0x22E6736F // 161 +data4 0x233AFC28 // 162 +data4 0x2395F661 // 163 +data4 0x23D8B991 // 164 +data4 0x23CD58D5 // 165 +data4 0x21941FD6 // 166 +data4 0x23352915 // 167 +data4 0x235D09EE // 168 +data4 0x22DC7EF9 // 169 +data4 0x238BC9F3 // 170 +data4 0x2397DF8F // 171 +data4 0x2380A7BB // 172 +data4 0x23EFF48C // 173 +data4 0x21E67408 // 174 +data4 0x236420F7 // 175 +data4 0x22C8DFB5 // 176 +data4 0x239B5D35 // 177 +data4 0x23BDC09D // 178 +data4 0x239E822C // 179 +data4 0x23984F0A // 180 +data4 0x23EF2119 // 181 +data4 0x23F738B8 // 182 +data4 0x23B66187 // 183 +data4 0x23B06AD7 // 184 +data4 0x2369140F // 185 +data4 0x218DACE6 // 186 +data4 0x21DF23F1 // 187 +data4 0x235D8B34 // 188 +data4 0x23460333 // 189 +data4 0x23F11D62 // 190 +data4 0x23C37147 // 191 +data4 0x22B2AE2A // 192 +data4 0x23949211 // 193 +data4 0x23B69799 // 194 +data4 0x23DBEC75 // 195 +data4 0x229A6FB3 // 196 +data4 0x23FC6C60 // 197 +data4 0x22D01FFC // 198 +data4 0x235985F0 // 199 +data4 0x23F7ECA5 // 200 +data4 0x23F924D3 // 201 +data4 0x2381B92F // 202 +data4 0x243A0FBE // 203 +data4 0x24712D72 // 204 +data4 0x24594E2F // 205 +data4 0x220CD12A // 206 +data4 0x23D87FB0 // 207 +data4 0x2338288A // 208 +data4 0x242BB2CC // 209 +data4 0x220F6265 // 210 +data4 0x23BB7FE3 // 211 +data4 0x2301C0A2 // 212 +data4 0x246709AB // 213 +data4 0x23A619E2 // 214 +data4 0x24030E3B // 215 +data4 0x233C36CC // 216 +data4 0x241AAB77 // 217 +data4 0x243D41A3 // 218 +data4 0x23834A60 // 219 +data4 0x236AC7BF // 220 +data4 0x23B6D597 // 221 +data4 0x210E9474 // 222 +data4 0x242156E6 // 223 +data4 0x243A1D68 // 224 +data4 0x2472187C // 225 +data4 0x23834E86 // 226 +data4 0x23CA0807 // 227 +data4 0x24745887 // 228 +data4 0x23E2B0E1 // 229 +data4 0x2421EB67 // 230 +data4 0x23DCC64E // 231 +data4 0x22DF71D1 // 232 +data4 0x238D5ECA // 233 +data4 0x23CDE86F // 234 +data4 0x24131F45 // 235 +data4 0x240FE4E2 // 236 +data4 0x2317731A // 237 +data4 0x24015C76 // 238 +data4 0x2301A4E8 // 239 +data4 0x23E52A6D // 240 +data4 0x247D8A0D // 241 +data4 0x23DFEEBA // 242 +data4 0x22139FEC // 243 +data4 0x2454A112 // 244 +data4 0x23C21E28 // 245 +data4 0x2460D813 // 246 +data4 0x24258924 // 247 +data4 0x2425680F // 248 +data4 0x24194D1E // 249 +data4 0x24242C2F // 250 +data4 0x243DDE5E // 251 +data4 0x23DEB388 // 252 +data4 0x23E0E6EB // 253 +data4 0x24393E74 // 254 +data4 0x241B1863 // 255 +LOCAL_OBJECT_END(log10_data) + + + +// Code +//============================================================== + +// log has p13 true, p14 false +// log10 has p14 true, p13 false + +.section .text +GLOBAL_IEEE754_ENTRY(log10) +{ .mfi + getf.exp GR_Exp = f8 // if x is unorm then must recompute + frcpa.s1 FR_RcpX,p0 = f1,f8 + mov GR_05 = 0xFFFE // biased exponent of A2=0.5 +} +{ .mlx + addl GR_ad_1 = @ltoff(log10_data),gp + movl GR_A3 = 0x3fd5555555555557 // double precision memory + // representation of A3 +};; + +{ .mfi + getf.sig GR_Sig = f8 // get significand to calculate index + fclass.m p8,p0 = f8,9 // is x positive unorm? + mov GR_xorg = 0x3fefe // double precision memory msb of 255/256 +} +{ .mib + ld8 GR_ad_1 = [GR_ad_1] + cmp.eq p14,p13 = r0,r0 // set p14 to 1 for log10 + br.cond.sptk log_log10_common +};; +GLOBAL_IEEE754_END(log10) + + +GLOBAL_IEEE754_ENTRY(log) +{ .mfi + getf.exp GR_Exp = f8 // if x is unorm then must recompute + frcpa.s1 FR_RcpX,p0 = f1,f8 + mov GR_05 = 0xfffe +} +{ .mlx + addl GR_ad_1 = @ltoff(log_data),gp + movl GR_A3 = 0x3fd5555555555557 // double precision memory + // representation of A3 +};; + +{ .mfi + getf.sig GR_Sig = f8 // get significand to calculate index + fclass.m p8,p0 = f8,9 // is x positive unorm? + mov GR_xorg = 0x3fefe // double precision memory msb of 255/256 +} +{ .mfi + ld8 GR_ad_1 = [GR_ad_1] + nop.f 0 + cmp.eq p13,p14 = r0,r0 // set p13 to 1 for log +};; + +log_log10_common: +{ .mfi + getf.d GR_x = f8 // double precision memory representation of x + fclass.m p9,p0 = f8,0x1E1 // is x NaN, NaT or +Inf? + dep.z GR_dx = 3, 44, 2 // Create 0x0000300000000000 + // Difference between double precision + // memory representations of 257/256 and + // 255/256 +} +{ .mfi + setf.exp FR_A2 = GR_05 // create A2 + fnorm.s1 FR_NormX = f8 + mov GR_bias = 0xffff +};; + +{ .mfi + setf.d FR_A3 = GR_A3 // create A3 + fcmp.eq.s1 p12,p0 = f1,f8 // is x equal to 1.0? + dep.z GR_xorg = GR_xorg, 44, 19 // 0x3fefe00000000000 + // double precision memory + // representation of 255/256 +} +{ .mib + add GR_ad_2 = 0x30,GR_ad_1 // address of A5,A4 + add GR_ad_3 = 0x840,GR_ad_1 // address of ln(1/frcpa) lo parts +(p8) br.cond.spnt log_positive_unorms +};; + +log_core: +{ .mfi + ldfpd FR_A7,FR_A6 = [GR_ad_1],16 + fclass.m p10,p0 = f8,0x3A // is x < 0? + sub GR_Nm1 = GR_Exp,GR_05 // unbiased_exponent_of_x - 1 +} +{ .mfi + ldfpd FR_A5,FR_A4 = [GR_ad_2],16 +(p9) fma.d.s0 f8 = f8,f1,f0 // set V-flag + sub GR_N = GR_Exp,GR_bias // unbiased_exponent_of_x +};; + +{ .mfi + setf.sig FR_N = GR_N // copy unbiased exponent of x to significand + fms.s1 FR_r = FR_RcpX,f8,f1 // range reduction for |x-1|>=1/256 + extr.u GR_Ind = GR_Sig,55,8 // get bits from 55 to 62 as index +} +{ .mib + sub GR_x = GR_x, GR_xorg // get diff between x and 255/256 + cmp.gtu p6, p7 = 2, GR_Nm1 // p6 true if 0.5 <= x < 2 +(p9) br.ret.spnt b0 // exit for NaN, NaT and +Inf +};; + +{ .mfi + ldfpd FR_Ln2hi,FR_Ln2lo = [GR_ad_1],16 + fclass.m p11,p0 = f8,0x07 // is x = 0? + shladd GR_ad_3 = GR_Ind,2,GR_ad_3 // address of Tlo +} +{ .mib + shladd GR_ad_2 = GR_Ind,3,GR_ad_2 // address of Thi +(p6) cmp.leu p6, p7 = GR_x, GR_dx // 255/256 <= x <= 257/256 +(p10) br.cond.spnt log_negatives // jump if x is negative +};; + +// p6 is true if |x-1| < 1/256 +// p7 is true if |x-1| >= 1/256 +{ .mfi + ldfd FR_Thi = [GR_ad_2] +(p6) fms.s1 FR_r = f8,f1,f1 // range reduction for |x-1|<1/256 + nop.i 0 +};; + +{ .mmi +(p7) ldfs FR_Tlo = [GR_ad_3] + nop.m 0 + nop.i 0 +} +{ .mfb + nop.m 0 +(p12) fma.d.s0 f8 = f0,f0,f0 +(p12) br.ret.spnt b0 // exit for +1.0 +};; + +.pred.rel "mutex",p6,p7 +{ .mfi +(p6) mov GR_NearOne = 1 + fms.s1 FR_A32 = FR_A3,FR_r,FR_A2 // A3*r-A2 +(p7) mov GR_NearOne = 0 +} +{ .mfb + ldfe FR_InvLn10 = [GR_ad_1],16 + fma.s1 FR_r2 = FR_r,FR_r,f0 // r^2 +(p11) br.cond.spnt log_zeroes // jump if x is zero +};; + +{ .mfi + nop.m 0 + fma.s1 FR_A6 = FR_A7,FR_r,FR_A6 // A7*r+A6 + nop.i 0 +} +{ .mfi +(p7) cmp.eq.unc p9,p0 = r0,r0 // set p9 if |x-1| > 1/256 + fma.s1 FR_A4 = FR_A5,FR_r,FR_A4 // A5*r+A4 +(p14) cmp.eq.unc p8,p0 = 1,GR_NearOne // set p8 to 1 if it's log10 + // and argument near 1.0 +};; + +{ .mfi +(p6) getf.exp GR_rexp = FR_r // Get signexp of x-1 +(p7) fcvt.xf FR_N = FR_N +(p8) cmp.eq p9,p6 = r0,r0 // Also set p9 and clear p6 if log10 + // and arg near 1 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r4 = FR_r2,FR_r2,f0 // r^4 + nop.i 0 +} +{ .mfi + nop.m 0 +(p8) fma.s1 FR_NxLn2pT = f0,f0,f0 // Clear NxLn2pT if log10 near 1 + nop.i 0 +};; + +{ .mfi + nop.m 0 + // (A3*r+A2)*r^2+r + fma.s1 FR_A321 = FR_A32,FR_r2,FR_r + mov GR_mask = 0x1ffff +} +{ .mfi + nop.m 0 + // (A7*r+A6)*r^2+(A5*r+A4) + fma.s1 FR_A4 = FR_A6,FR_r2,FR_A4 + nop.i 0 +};; + +{ .mfi +(p6) and GR_rexp = GR_rexp, GR_mask + // N*Ln2hi+Thi +(p7) fma.s1 FR_NxLn2hipThi = FR_N,FR_Ln2hi,FR_Thi + nop.i 0 +} +{ .mfi + nop.m 0 + // N*Ln2lo+Tlo +(p7) fma.s1 FR_NxLn2lopTlo = FR_N,FR_Ln2lo,FR_Tlo + nop.i 0 +};; + +{ .mfi +(p6) sub GR_rexp = GR_rexp, GR_bias // unbiased exponent of x-1 +(p9) fma.s1 f8 = FR_A4,FR_r4,FR_A321 // P(r) if |x-1| >= 1/256 or + // log10 and |x-1| < 1/256 + nop.i 0 +} +{ .mfi + nop.m 0 + // (N*Ln2hi+Thi) + (N*Ln2lo+Tlo) +(p7) fma.s1 FR_NxLn2pT = FR_NxLn2hipThi,f1,FR_NxLn2lopTlo + nop.i 0 +};; + +{ .mfi +(p6) cmp.gt.unc p10, p6 = -40, GR_rexp // Test |x-1| < 2^-40 + nop.f 0 + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p10) fma.d.s0 f8 = FR_A32,FR_r2,FR_r // log(x) if |x-1| < 2^-40 + nop.i 0 +};; + +.pred.rel "mutex",p6,p9 +{ .mfi + nop.m 0 +(p6) fma.d.s0 f8 = FR_A4,FR_r4,FR_A321 // log(x) if 2^-40 <= |x-1| < 1/256 + nop.i 0 +} +{ .mfb + nop.m 0 +(p9) fma.d.s0 f8 = f8,FR_InvLn10,FR_NxLn2pT // result if |x-1| >= 1/256 + // or log10 and |x-1| < 1/256 + br.ret.sptk b0 +};; + +.align 32 +log_positive_unorms: +{ .mmf + getf.exp GR_Exp = FR_NormX // recompute biased exponent + getf.d GR_x = FR_NormX // recompute double precision x + fcmp.eq.s1 p12,p0 = f1,FR_NormX // is x equal to 1.0? +};; + +{ .mfb + getf.sig GR_Sig = FR_NormX // recompute significand + fcmp.eq.s0 p15, p0 = f8, f0 // set denormal flag + br.cond.sptk log_core +};; + +.align 32 +log_zeroes: +{ .mfi + nop.m 0 + fmerge.s FR_X = f8,f8 // keep input argument for subsequent + // call of __libm_error_support# + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 FR_tmp = f0,f0,f1 // -1.0 + nop.i 0 +};; + +.pred.rel "mutex",p13,p14 +{ .mfi +(p13) mov GR_TAG = 2 // set libm error in case of log + frcpa.s0 f8,p0 = FR_tmp,f0 // log(+/-0) should be equal to -INF. + // We can get it using frcpa because it + // sets result to the IEEE-754 mandated + // quotient of FR_tmp/f0. + // As far as FR_tmp is -1 it'll be -INF + nop.i 0 +} +{ .mib +(p14) mov GR_TAG = 8 // set libm error in case of log10 + nop.i 0 + br.cond.sptk log_libm_err +};; + +.align 32 +log_negatives: +{ .mfi + nop.m 0 + fmerge.s FR_X = f8,f8 + nop.i 0 +};; + +.pred.rel "mutex",p13,p14 +{ .mfi +(p13) mov GR_TAG = 3 // set libm error in case of log + frcpa.s0 f8,p0 = f0,f0 // log(negatives) should be equal to NaN. + // We can get it using frcpa because it + // sets result to the IEEE-754 mandated + // quotient of f0/f0 i.e. NaN. +(p14) mov GR_TAG = 9 // set libm error in case of log10 +};; + +.align 32 +log_libm_err: +{ .mmi + alloc r32 = ar.pfs,1,4,4,0 + mov GR_Parameter_TAG = GR_TAG + nop.i 0 +};; +GLOBAL_IEEE754_END(log) + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y = -32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS = ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp = -64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP = gp // Save gp +};; + +{ .mmi + stfd [GR_Parameter_Y] = FR_Y,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0 = b0 // Save b0 +};; + +.body +{ .mib + stfd [GR_Parameter_X] = FR_X // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfd [GR_Parameter_Y] = FR_RESULT // STORE Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; + +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; + +{ .mmi + ldfd f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; + +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; +LOCAL_LIBM_END(__libm_error_region) + +.type __libm_error_support#,@function +.global __libm_error_support# + diff --git a/sysdeps/ia64/fpu/e_log10.c b/sysdeps/ia64/fpu/e_log10.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/e_log10.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/e_log10f.c b/sysdeps/ia64/fpu/e_log10f.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/e_log10f.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/e_log10l.c b/sysdeps/ia64/fpu/e_log10l.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/e_log10l.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/e_log2.S b/sysdeps/ia64/fpu/e_log2.S new file mode 100644 index 0000000000..660a9526b6 --- /dev/null +++ b/sysdeps/ia64/fpu/e_log2.S @@ -0,0 +1,711 @@ +.file "log2.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//================================================================= +// 09/11/00 Initial version +// 03/19/01 Added one polynomial coefficient, to improve accuracy +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// 04/18/03 Reformatted T[255] +// +// API +//================================================================= +// double log2(double) +// +// Overview of operation +//================================================================= +// Background +// +// Implementation +// +// Let x = 2^l * m, where m=1.b1 b2 ... b8 b9 ... b52 +// y=frcpa(m), r=m*y-1, f=b1 b2 .. b8 (table index) +// j=0 if f<128; j=1 if f>=128 +// T is a table that stores log2(1/y) (in entries 1..255) rounded to +// double extended precision; f is used as an index; T[255]=0 +// +// If f=0 and b9=0, r is set to 2^{-8}* 0.b9 b10 ... b52 = m-1 (fractional part of m), +// and 0 is used instead of T[0] +// (polynomial evaluation only, for m=1+r, 0<=r<2^{-9}) +// If f=255, r is set to (m-2)/2 (T[255]=0, and only polynomial evaluation is used +// for m=2(1-r'), 0<=r'<2^{-9}) +// +// log2(x) is approximated as +// (l-j) + T[f] + (c1*r+c2*r^2+...+c7*r^7), if f>0 +// + + +// Special values +//================================================================= +// log2(0)=-inf, raises Divide by Zero +// log2(+inf)=inf +// log2(x)=NaN, raises Invalid if x<0 +// + + +// Registers used +//============================================================== +// f6-f15, f32-f33 +// r2-r3, r23-r30 +// p6,p7,p8,p12 +// + + +GR_SAVE_B0 = r33 +GR_SAVE_PFS = r34 +GR_SAVE_GP = r35 // This reg. can safely be used +GR_SAVE_SP = r36 + +GR_Parameter_X = r37 +GR_Parameter_Y = r38 +GR_Parameter_RESULT = r39 +GR_Parameter_TAG = r40 + +FR_X = f10 +FR_Y = f1 +FR_RESULT = f8 + + + + +// Data tables +//============================================================== + +RODATA + +.align 16 + +LOCAL_OBJECT_START(poly_coeffs) + +data8 0xbfd0000000000000, 0x3fc999999999999a //C_4, C_5 +data8 0xbfc5555555555555, 0x3fc2492492492492 //C_6, C_7 +data8 0xb8aa3b295c17f0bc, 0x00003fff // C_1 +data8 0xaaaaaaaaaaaaaaab, 0x00003ffd // C_3=1/3 +LOCAL_OBJECT_END(poly_coeffs) + + +LOCAL_OBJECT_START(T_table) + +data8 0xb8d8752172fed131, 0x00003ff6 +data8 0x8ae7f475764180a3, 0x00003ff8 +data8 0xe7f73862e72ee35d, 0x00003ff8 +data8 0xa2b25310c941a2f2, 0x00003ff9 +data8 0xcbb91d671abb2e85, 0x00003ff9 +data8 0xfac91e34daa50483, 0x00003ff9 +data8 0x9504a5042eb495c5, 0x00003ffa +data8 0xa9c4a0bbb580ee02, 0x00003ffa +data8 0xc19264dc8a5e3bf9, 0x00003ffa +data8 0xd67aa6703ebf4a77, 0x00003ffa +data8 0xee76cac6d6e08ce7, 0x00003ffa +data8 0x81c3f7de5434ed04, 0x00003ffb +data8 0x8c563033a3ce01e4, 0x00003ffb +data8 0x9876e9f09a98661c, 0x00003ffb +data8 0xa31e0ac9b2326ce2, 0x00003ffb +data8 0xadcf09e1fd10e4a5, 0x00003ffb +data8 0xb889f992cf03cdb6, 0x00003ffb +data8 0xc34eec68d901a714, 0x00003ffb +data8 0xce1df524e9909ed9, 0x00003ffb +data8 0xd8f726bcb0b80ad0, 0x00003ffb +data8 0xe3da945b878e27d1, 0x00003ffb +data8 0xeec851633b76a320, 0x00003ffb +data8 0xf82ea4bb6101421a, 0x00003ffb +data8 0x8197ddd7736b2864, 0x00003ffc +data8 0x871dad4f994253f0, 0x00003ffc +data8 0x8ca8cae3e892d549, 0x00003ffc +data8 0x916d6e1559a4b697, 0x00003ffc +data8 0x97028118efabeb7d, 0x00003ffc +data8 0x9bcfbce1592ad5d5, 0x00003ffc +data8 0xa16ee95d0da54a91, 0x00003ffc +data8 0xa644dcf3403fa5d0, 0x00003ffc +data8 0xab1ee14ffd659064, 0x00003ffc +data8 0xb0cd12faebcc6757, 0x00003ffc +data8 0xb5affdf9b3b221e0, 0x00003ffc +data8 0xba970fb307c6ade1, 0x00003ffc +data8 0xbf824f3a9f3e7561, 0x00003ffc +data8 0xc544c055fde99333, 0x00003ffc +data8 0xca39266532bdf26c, 0x00003ffc +data8 0xcf31d124b8fa2f56, 0x00003ffc +data8 0xd42ec7f59017b6ab, 0x00003ffc +data8 0xd930124bea9a2c67, 0x00003ffc +data8 0xde35b7af70e4dab3, 0x00003ffc +data8 0xe33fbfbb8533ef03, 0x00003ffc +data8 0xe77625911a7dcef3, 0x00003ffc +data8 0xec884bd689cc12e3, 0x00003ffc +data8 0xf19eeabf9e99a40a, 0x00003ffc +data8 0xf6ba0a35e3d88051, 0x00003ffc +data8 0xfbd9b237f7b4192b, 0x00003ffc +data8 0x80111d4a1ee0c79e, 0x00003ffd +data8 0x82a523a5f875bbfc, 0x00003ffd +data8 0x84ccecdc92cd0815, 0x00003ffd +data8 0x87653369d92c057a, 0x00003ffd +data8 0x89ffd1742da3aa21, 0x00003ffd +data8 0x8c2d2227d053d9b6, 0x00003ffd +data8 0x8e5c189793f7f798, 0x00003ffd +data8 0x90fd0a20e72f3c96, 0x00003ffd +data8 0x932fa937301e59ae, 0x00003ffd +data8 0x95d5061a5f0f5f7f, 0x00003ffd +data8 0x980b5a2ef10e7023, 0x00003ffd +data8 0x9a4361c5514d3c27, 0x00003ffd +data8 0x9c7d1f7d541313fd, 0x00003ffd +data8 0x9f2b16040b500d04, 0x00003ffd +data8 0xa168a0fa9db22c98, 0x00003ffd +data8 0xa3a7eaa1f9116293, 0x00003ffd +data8 0xa5e8f5b4072a3d44, 0x00003ffd +data8 0xa82bc4f11a5e88aa, 0x00003ffd +data8 0xaa705b2001db8317, 0x00003ffd +data8 0xacb6bb0e1e0f8005, 0x00003ffd +data8 0xaefee78f75707221, 0x00003ffd +data8 0xb148e37ec994dd99, 0x00003ffd +data8 0xb394b1bdaca0bc17, 0x00003ffd +data8 0xb5e255349707e496, 0x00003ffd +data8 0xb831d0d2fda791cc, 0x00003ffd +data8 0xba83278f6838ab20, 0x00003ffd +data8 0xbcd65c67881c7d47, 0x00003ffd +data8 0xbeb3e0f21d72dc92, 0x00003ffd +data8 0xc10a7a03457d35dc, 0x00003ffd +data8 0xc362f9b6f51eddd3, 0x00003ffd +data8 0xc5bd6326ebfce656, 0x00003ffd +data8 0xc7a0b3d0637c8f97, 0x00003ffd +data8 0xc9fe96af0df8e4b5, 0x00003ffd +data8 0xcc5e6c214b4a2cd7, 0x00003ffd +data8 0xce46199f374d29cf, 0x00003ffd +data8 0xd0a978a14c0d9ebe, 0x00003ffd +data8 0xd293fecafec7f9b5, 0x00003ffd +data8 0xd4faf1f6f5cf32e6, 0x00003ffd +data8 0xd6e8595abaad34d1, 0x00003ffd +data8 0xd952eb7a8ffc1593, 0x00003ffd +data8 0xdb433ccd805f171e, 0x00003ffd +data8 0xddb178dc43e6bd84, 0x00003ffd +data8 0xdfa4bcfb333342a4, 0x00003ffd +data8 0xe19953741ccea015, 0x00003ffd +data8 0xe40cee16a2ff21c5, 0x00003ffd +data8 0xe6048470cdbde8ea, 0x00003ffd +data8 0xe7fd7308d6895b14, 0x00003ffd +data8 0xe9f7bbb6a1ff9f87, 0x00003ffd +data8 0xec7280138809433d, 0x00003ffd +data8 0xee6fda4365cd051f, 0x00003ffd +data8 0xf06e94a122ff1f12, 0x00003ffd +data8 0xf26eb1151441fce5, 0x00003ffd +data8 0xf470318b88a77e2f, 0x00003ffd +data8 0xf67317f4d4c8aa58, 0x00003ffd +data8 0xf8f8b250a9c4cde6, 0x00003ffd +data8 0xfafec54831f1a484, 0x00003ffd +data8 0xfd06449bf3eaea1e, 0x00003ffd +data8 0xff0f324ddb19ab67, 0x00003ffd +data8 0x808cc8320a9acf15, 0x00003ffe +data8 0x8192b0748f2cef06, 0x00003ffe +data8 0x829952f5e6a24ee5, 0x00003ffe +data8 0x83a0b0bfafe1424e, 0x00003ffe +data8 0x8466b29f9c41caea, 0x00003ffe +data8 0x856f5aae0881d857, 0x00003ffe +data8 0x8678c0eae8ee8190, 0x00003ffe +data8 0x8782e6685676b9d7, 0x00003ffe +data8 0x888dcc3abc4554ec, 0x00003ffe +data8 0x89997378de7b98b8, 0x00003ffe +data8 0x8aa5dd3be1044279, 0x00003ffe +data8 0x8b6facdfd0360ab8, 0x00003ffe +data8 0x8c7d6db7169e0cdb, 0x00003ffe +data8 0x8d8bf424d6e130b2, 0x00003ffe +data8 0x8e575b506f409fa6, 0x00003ffe +data8 0x8f673e418776492c, 0x00003ffe +data8 0x9077e9ed700ef9ba, 0x00003ffe +data8 0x9144ef1baec80b20, 0x00003ffe +data8 0x9256fcdb537f035f, 0x00003ffe +data8 0x9369d68d75e7e1d6, 0x00003ffe +data8 0x943880613b8f9f1e, 0x00003ffe +data8 0x954cc1d9e0d94206, 0x00003ffe +data8 0xd3c70a37bdf7a294, 0x0000bffd +data8 0xd19bb053fb0284ec, 0x0000bffd +data8 0xcffa1a3b7dafb8bf, 0x0000bffd +data8 0xcdcbe1e2776479ee, 0x0000bffd +data8 0xcc282218b8bfdda2, 0x0000bffd +data8 0xc9f703a9afcb38ac, 0x0000bffd +data8 0xc851146ab89593c6, 0x0000bffd +data8 0xc61d08265927a860, 0x0000bffd +data8 0xc474e39705912d26, 0x0000bffd +data8 0xc23de19ec30c6e3e, 0x0000bffd +data8 0xc09381cc45db45b4, 0x0000bffd +data8 0xbee82b4e025ff90c, 0x0000bffd +data8 0xbcace101149788ec, 0x0000bffd +data8 0xbaff46962ea47964, 0x0000bffd +data8 0xb950b1be5e0c14a2, 0x0000bffd +data8 0xb7110e6ce866f2bc, 0x0000bffd +data8 0xb5602ccc2a81db52, 0x0000bffd +data8 0xb3ae4ce740fc8ef1, 0x0000bffd +data8 0xb1fb6d92c8240ccc, 0x0000bffd +data8 0xafb609c09b244abc, 0x0000bffd +data8 0xae00d1cfdeb43cfd, 0x0000bffd +data8 0xac4a967a8c8c9bd0, 0x0000bffd +data8 0xaa93568c249e6c52, 0x0000bffd +data8 0xa8db10cdff375343, 0x0000bffd +data8 0xa68e6fc5a42376e3, 0x0000bffd +data8 0xa4d3c25e68dc57f2, 0x0000bffd +data8 0xa3180b0c192a3816, 0x0000bffd +data8 0xa15b488e7aa329a0, 0x0000bffd +data8 0x9f9d79a30f0e1d5f, 0x0000bffd +data8 0x9dde9d050ee7d4ac, 0x0000bffd +data8 0x9c1eb16d63d7356c, 0x0000bffd +data8 0x9a5db592a310c36a, 0x0000bffd +data8 0x989ba82907a9016f, 0x0000bffd +data8 0x96d887e26cd57b79, 0x0000bffd +data8 0x9514536e481c3a4f, 0x0000bffd +data8 0x934f0979a3715fc9, 0x0000bffd +data8 0x9188a8af1742a9d5, 0x0000bffd +data8 0x8fc12fb6c470995f, 0x0000bffd +data8 0x8df89d364e34f8f1, 0x0000bffd +data8 0x8c2eefd0d3f67dd6, 0x0000bffd +data8 0x8a642626eb093d54, 0x0000bffd +data8 0x88983ed6985bae58, 0x0000bffd +data8 0x86cb387b4a0feec6, 0x0000bffd +data8 0x84fd11add101024b, 0x0000bffd +data8 0x83c856dd81804b78, 0x0000bffd +data8 0x81f84c2c62afd6f1, 0x0000bffd +data8 0x80271d3e4be5ea5a, 0x0000bffd +data8 0xfca991447e7b485d, 0x0000bffc +data8 0xf90299c904793a3c, 0x0000bffc +data8 0xf559511d2dc1ed69, 0x0000bffc +data8 0xf2e72afee9bd2aee, 0x0000bffc +data8 0xef39ff1d8a40770e, 0x0000bffc +data8 0xeb8a7a2311c935dc, 0x0000bffc +data8 0xe7d8990dc620012f, 0x0000bffc +data8 0xe560b1e3b86e44b6, 0x0000bffc +data8 0xe1aadb38caee80c4, 0x0000bffc +data8 0xddf2a051f81b76a4, 0x0000bffc +data8 0xdb7678bafcaf4b5f, 0x0000bffc +data8 0xd7ba3a8f0df19bfc, 0x0000bffc +data8 0xd3fb8fdbdd5cebdb, 0x0000bffc +data8 0xd17b191905c35652, 0x0000bffc +data8 0xcdb85d29cefd7121, 0x0000bffc +data8 0xc9f32c3c88221ef6, 0x0000bffc +data8 0xc76e5741a95b5dae, 0x0000bffc +data8 0xc3a506d80d38c718, 0x0000bffc +data8 0xbfd938ccef8b68c1, 0x0000bffc +data8 0xbd4ff63e82eef78c, 0x0000bffc +data8 0xb97ffa2b563865bd, 0x0000bffc +data8 0xb6f3eb3011eddcea, 0x0000bffc +data8 0xb31fb7d64898b3e6, 0x0000bffc +data8 0xb090d63a409e7880, 0x0000bffc +data8 0xacb8623c7ffa4f39, 0x0000bffc +data8 0xa8dd5c83d2e45246, 0x0000bffc +data8 0xa649e998a8d91f2e, 0x0000bffc +data8 0xa26a93fed6faa94f, 0x0000bffc +data8 0x9fd43df079d0db1f, 0x0000bffc +data8 0x9d3cbe69aecac4c2, 0x0000bffc +data8 0x99574f13c570d0fb, 0x0000bffc +data8 0x96bce349bf7ee6c7, 0x0000bffc +data8 0x92d30c9b86cee18e, 0x0000bffc +data8 0x9035adef17c5bd5c, 0x0000bffc +data8 0x8c4765e8e8b5f251, 0x0000bffc +data8 0x89a70da448316ffa, 0x0000bffc +data8 0x85b44a24474af78a, 0x0000bffc +data8 0x8310f17aab5adf70, 0x0000bffc +data8 0x806c6388d0965f29, 0x0000bffc +data8 0xf8e69092bf0c5ead, 0x0000bffb +data8 0xf397608bfd2d90e6, 0x0000bffb +data8 0xee45be24d0eedbc4, 0x0000bffb +data8 0xe646af233db881e9, 0x0000bffb +data8 0xe0eee4e1ce3d06fb, 0x0000bffb +data8 0xdb94a049e6e87a4f, 0x0000bffb +data8 0xd3888ef9a4249f5a, 0x0000bffb +data8 0xce280e6fbac39194, 0x0000bffb +data8 0xc8c50b72319ad574, 0x0000bffb +data8 0xc0abcd39f41e329b, 0x0000bffb +data8 0xbb4279cfa7f9667b, 0x0000bffb +data8 0xb5d69bac77ec398a, 0x0000bffb +data8 0xb068306bf20d6233, 0x0000bffb +data8 0xa83dc1b019ddb6a8, 0x0000bffb +data8 0xa2c8eb1886c2d024, 0x0000bffb +data8 0x9d517ee93f8e16c0, 0x0000bffb +data8 0x97d77aae659b92fb, 0x0000bffb +data8 0x8f9b91da5736d415, 0x0000bffb +data8 0x8a1b06b09b7fd1d1, 0x0000bffb +data8 0x8497daca0a2e077a, 0x0000bffb +data8 0xfe241745a453f10c, 0x0000bffa +data8 0xf3132d6708d723c5, 0x0000bffa +data8 0xe7fcf2e21a0e7d77, 0x0000bffa +data8 0xd75198b04afb8da9, 0x0000bffa +data8 0xcc2dfe1a4a8ca305, 0x0000bffa +data8 0xc10500d63aa65882, 0x0000bffa +data8 0xb5d69bac77ec398a, 0x0000bffa +data8 0xaaa2c95dc66abcde, 0x0000bffa +data8 0x9f6984a342d13101, 0x0000bffa +data8 0x942ac82e5387ac51, 0x0000bffa +data8 0x88e68ea899a0976c, 0x0000bffa +data8 0xefebc4409ccf872e, 0x0000bff9 +data8 0xd947b0c6642ef69e, 0x0000bff9 +data8 0xc2987d51e043d407, 0x0000bff9 +data8 0xabde1eeee6bfd257, 0x0000bff9 +data8 0x95188a9917cf2e01, 0x0000bff9 +data8 0xfc8f6a777c1b7f1e, 0x0000bff8 +data8 0xced727635c59725c, 0x0000bff8 +data8 0xa108358a4c904615, 0x0000bff8 +data8 0xe644fcbeb3ac9c90, 0x0000bff7 +data8 0x8a4bd667bf08e7de, 0x0000bff7 +data8 0x0000000000000000 // T[255] Low +data8 0x0000000000000000 // T[255] High +LOCAL_OBJECT_END(T_table) + + + +.section .text +GLOBAL_LIBM_ENTRY(log2) + +{ .mfi + alloc r32=ar.pfs,1,4,4,0 + // y=frcpa(x) + frcpa.s1 f6,p0=f1,f8 + // will form significand of 1.5 (to test whether the index is 128 or above) + mov r24=0xc +} +{.mfi + nop.m 0 + // normalize x + fma.s1 f7=f8,f1,f0 + // r2 = pointer to C_1...C_6 followed by T_table + addl r2 = @ltoff(poly_coeffs), gp;; +} +{.mfi + // get significand + getf.sig r25=f8 + // f8 denormal ? + fclass.m p8,p10=f8,0x9 + // will form significand of 1.5 (to test whether the index is 128 or above) + shl r24=r24,60 +} +{.mfi + mov r26=0x804 + nop.f 0 + // r23=bias-1 + mov r23=0xfffe;; +} + +{.mmf + getf.exp r29=f8 + // load start address for C_1...C_6 followed by T_table + ld8 r2=[r2] + // will continue only for positive normal/denormal numbers + fclass.nm.unc p12,p7 = f8, 0x19 ;; +} + +.pred.rel "mutex",p8,p10 +{.mfi + // denormal input, repeat get significand (after normalization) + (p8) getf.sig r25=f7 + // x=1 ? + fcmp.eq.s0 p6,p0=f8,f1 + // get T_index + (p10) shr.u r28=r25,63-8 +} +{.mfi + // f32=0.5 + setf.exp f32=r23 + nop.f 0 + // r27=bias + mov r27=0xffff;; +} + +{.mmi + // denormal input, repeat get exponent (after normalization) + (p8) getf.exp r29=f7 + mov r23=0xff + // r26=0x80400...0 (threshold for using polynomial approximation) + shl r26=r26,64-12;; +} + +{.mfb + add r3=48,r2 + // r=1-x*y + fms.s1 f6=f6,f8,f1 + (p12) br.cond.spnt SPECIAL_LOG2 +} +{.mfi + // load C_4, C_5 + ldfpd f10,f11=[r2],16 + nop.f 0 + cmp.geu p12,p0=r25,r24;; +} + +{.mmi + // load C_6, C_7 + ldfpd f12,f13=[r2],16 + // r27=bias-1 (if index >=128, will add exponent+1) + (p12) mov r27=0xfffe + (p8) shr.u r28=r25,63-8;; +} + + +{.mfi + // load C_1 + ldfe f14=[r2],32 + fmerge.se f7=f1,f7 + // if first 9 bits after leading 1 are all zero, then p8=1 + cmp.ltu p8,p12=r25,r26 +} +{.mfi + // load C_3 + ldfe f15=[r3] + nop.f 0 + // get T_index + and r28=r28,r23;; +} +{.mfi + // r29=exponent-bias + sub r29=r29,r27 + // x=1, return 0 + (p6) fma.d.s0 f8=f0,f0,f0 + // get T address + shladd r2=r28,4,r2 +} +{.mfb + // first 8 bits after leading 1 are all ones ? + cmp.eq p10,p0=r23,r28 + // if first 8 bits after leading bit are 0, use polynomial approx. only + (p8) fms.s1 f6=f7,f1,f1 + // x=1, return + (p6) br.ret.spnt b0;; +} +{.mfi + // r26=1 + mov r26=1 + // if first 8 bits after leading 1 are all ones, use polynomial approx. only + (p10) fms.s1 f6=f7,f32,f1 + nop.i 0;; +} + +.pred.rel "mutex",p8,p12 +{.mmf + // load T (unless first 9 bits after leading 1 are 0) + (p12) ldfe f33=[r2] + // f8=expon - bias + setf.sig f8=r29 + // set T=0 (if first 9 bits after leading 1 are 0) + (p8) fma.s1 f33=f0,f0,f0;; +} + +{.mfi + nop.m 0 + // P12=1-0.5*r + fnma.s1 f32=f32,f6,f1 + // r26=2^{63} + shl r26=r26,63 +} +{.mfi + nop.m 0 + // r2=r*r + fma.s1 f7=f6,f6,f0 + nop.i 0;; +} +{.mfi + // significand(x)=1 ? + cmp.eq p0,p6=r26,r25 + // P67=C_6+C_7*r + fma.s1 f13=f13,f6,f12 + nop.i 0 +} +{.mfi + nop.m 0 + // P45=C_4+C_5*r + fma.s1 f10=f11,f6,f10 + nop.i 0;; +} + +{.mfi + nop.m 0 + // C_1*r + (p6) fma.s1 f14=f14,f6,f0 + nop.i 0;; +} +{.mfi + nop.m 0 + // normalize additive term (l=exponent of x) + fcvt.xf f8=f8 + nop.i 0 +} +{.mfi + nop.m 0 + // P13=1-0.5*r+C_3*r^2 + (p6) fma.s1 f15=f15,f7,f32 + nop.i 0;; +} + +{.mfi + nop.m 0 + // P47=P45+r2*P67 + (p6) fma.s1 f13=f13,f7,f10 + // if significand(x)=1, return exponent (l) + nop.i 0 +} +{.mfi + nop.m 0 + // r3=r^3 + (p6) fma.s1 f7=f7,f6,f0 + nop.i 0;; +} + +{.mfi + nop.m 0 + // add T+l + (p6) fma.s1 f8=f8,f1,f33 + nop.i 0 +} +{.mfi + nop.m 0 + // P17=P13+r3*P47 + (p6) fma.s1 f13=f13,f7,f15 + nop.i 0;; +} + +{.mfb + nop.m 0 + // result=T+l+(C_1*r)*P16 + (p6) fma.d.s0 f8=f13,f14,f8 + // return + br.ret.sptk b0;; +} + + +SPECIAL_LOG2: +{.mfi + nop.m 0 + // x=+Infinity ? + fclass.m p7,p0=f8,0x21 + nop.i 0;; +} +{.mfi + nop.m 0 + // x=+/-Zero ? + fclass.m p8,p0=f8,0x7 + nop.i 0;; +} +{.mfi + nop.m 0 + // x=-Infinity, -normal, -denormal ? + fclass.m p6,p0=f8,0x3a + nop.i 0;; +} +{.mfb + nop.m 0 + // log2(+Infinity)=+Infinity + nop.f 0 + (p7) br.ret.spnt b0;; +} +{.mfi + (p8) mov GR_Parameter_TAG = 170 + // log2(+/-0)=-infinity, raises Divide by Zero + // set f8=-0 + (p8) fmerge.ns f8=f0,f8 + nop.i 0;; +} +{.mfb + nop.m 0 + (p8) frcpa.s0 f8,p0=f1,f8 + (p8) br.cond.sptk __libm_error_region;; +} +{.mfb + (p6) mov GR_Parameter_TAG = 171 + // x<0: return NaN, raise Invalid + (p6) frcpa.s0 f8,p0=f0,f0 + (p6) br.cond.sptk __libm_error_region;; +} + + +{.mfb + nop.m 0 + // Remaining cases: NaNs + fma.d.s0 f8=f8,f1,f0 + br.ret.sptk b0;; +} + +GLOBAL_LIBM_END(log2) + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfd [GR_Parameter_Y] = FR_Y,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; +.body +{ .mib + stfd [GR_Parameter_X] = FR_X // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfd [GR_Parameter_Y] = FR_RESULT // STORE Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + nop.m 0 + nop.m 0 + add GR_Parameter_RESULT = 48,sp +};; +{ .mmi + ldfd f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) +.type __libm_error_support#,@function +.global __libm_error_support# + + diff --git a/sysdeps/ia64/fpu/e_log2f.S b/sysdeps/ia64/fpu/e_log2f.S new file mode 100644 index 0000000000..17d710a951 --- /dev/null +++ b/sysdeps/ia64/fpu/e_log2f.S @@ -0,0 +1,551 @@ +.file "log2f.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 09/11/00 Initial version +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// +// API +//============================================================== +// float log2f(float) +// +// Overview of operation +//============================================================== +// Background +// +// Implementation +// +// Let x = 2^l * m, where m=1.b1 b2 ... b8 b9 ... b52 +// y=frcpa(m), r=m*y-1, f=b1 b2 .. b8 (table index) +// j=0 if f<128; j=1 if f>=128 +// T is a table that stores log2(1/y) (in entries 1..255) rounded to +// double extended precision; f is used as an index; T[255]=0 +// +// If f=0 and b9=0, r is set to 2^{-8}* 0.b9 b10 ... b52 = m-1 (fractional part of m), +// and 0 is used instead of T[0] +// (polynomial evaluation only, for m=1+r, 0<=r<2^{-9}) +// If f=255, r is set to (m-2)/2 (T[255]=0, and only polynomial evaluation is used +// for m=2(1-r'), 0<=r'<2^{-9}) +// +// log2f(x) is approximated as +// (l-j) + T[f] + (c1*r+c2*r^2+...+c6*r^6), if f>0 +// + + +// Special values +//============================================================== +// log2f(0)=-inf, raises Divide by Zero +// log2f(+inf)=inf +// log2f(x)=NaN, raises Invalid if x<0 +// + + +// Registers used +//============================================================== +// f6-f14 +// r2-r3, r23-r30 +// p6,p7,p8,p12 +// + + +GR_SAVE_B0 = r33 +GR_SAVE_PFS = r34 +GR_SAVE_GP = r35 // This reg. can safely be used +GR_SAVE_SP = r36 + +GR_Parameter_X = r37 +GR_Parameter_Y = r38 +GR_Parameter_RESULT = r39 +GR_Parameter_TAG = r40 + +FR_X = f10 +FR_Y = f1 +FR_RESULT = f8 + + + + +// Data tables +//============================================================== + +RODATA + +.align 16 + +LOCAL_OBJECT_START(poly_coeffs) + +data8 0x3fdec709dc3a03fd, 0xbfd71547652b82fe //C_3 and C_4 +data8 0xb8aa3b295c17f0bc, 0x00003fff // C_1 +data8 0xb8aa3b295c17f0bc, 0x0000bffe // C_2 +LOCAL_OBJECT_END(poly_coeffs) + + +LOCAL_OBJECT_START(T_table) + +data8 0x3f671b0ea42e5fda, 0x3f815cfe8eaec830 +data8 0x3f8cfee70c5ce5dc, 0x3f94564a62192834 +data8 0x3f997723ace35766, 0x3f9f5923c69b54a1 +data8 0x3fa2a094a085d693, 0x3fa538941776b01e +data8 0x3fa8324c9b914bc7, 0x3faacf54ce07d7e9 +data8 0x3fadced958dadc12, 0x3fb0387efbca869e +data8 0x3fb18ac6067479c0, 0x3fb30edd3e13530d +data8 0x3fb463c15936464e, 0x3fb5b9e13c3fa21d +data8 0x3fb7113f3259e07a, 0x3fb869dd8d1b2035 +data8 0x3fb9c3bea49d3214, 0x3fbb1ee4d7961701 +data8 0x3fbc7b528b70f1c5, 0x3fbdd90a2c676ed4 +data8 0x3fbf05d4976c2028, 0x3fc032fbbaee6d65 +data8 0x3fc0e3b5a9f3284a, 0x3fc195195c7d125b +data8 0x3fc22dadc2ab3497, 0x3fc2e050231df57d +data8 0x3fc379f79c2b255b, 0x3fc42ddd2ba1b4a9 +data8 0x3fc4c89b9e6807f5, 0x3fc563dc29ffacb2 +data8 0x3fc619a25f5d798d, 0x3fc6b5ffbf367644 +data8 0x3fc752e1f660f8d6, 0x3fc7f049e753e7cf +data8 0x3fc8a8980abfbd32, 0x3fc94724cca657be +data8 0x3fc9e63a24971f46, 0x3fca85d8feb202f7 +data8 0x3fcb2602497d5346, 0x3fcbc6b6f5ee1c9b +data8 0x3fcc67f7f770a67e, 0x3fcceec4b2234fba +data8 0x3fcd91097ad13982, 0x3fce33dd57f3d335 +data8 0x3fced74146bc7b10, 0x3fcf7b3646fef683 +data8 0x3fd00223a943dc19, 0x3fd054a474bf0eb7 +data8 0x3fd0999d9b9259a1, 0x3fd0eca66d3b2581 +data8 0x3fd13ffa2e85b475, 0x3fd185a444fa0a7b +data8 0x3fd1cb8312f27eff, 0x3fd21fa1441ce5e8 +data8 0x3fd265f526e603cb, 0x3fd2baa0c34be1ec +data8 0x3fd3016b45de21ce, 0x3fd3486c38aa29a8 +data8 0x3fd38fa3efaa8262, 0x3fd3e562c0816a02 +data8 0x3fd42d141f53b646, 0x3fd474fd543f222c +data8 0x3fd4bd1eb680e548, 0x3fd505789e234bd1 +data8 0x3fd54e0b64003b70, 0x3fd596d761c3c1f0 +data8 0x3fd5dfdcf1eeae0e, 0x3fd6291c6fd9329c +data8 0x3fd6729637b59418, 0x3fd6bc4aa692e0fd +data8 0x3fd7063a1a5fb4f2, 0x3fd75064f1ed0715 +data8 0x3fd79acb8cf10390, 0x3fd7d67c1e43ae5c +data8 0x3fd8214f4068afa7, 0x3fd86c5f36dea3dc +data8 0x3fd8b7ac64dd7f9d, 0x3fd8f4167a0c6f92 +data8 0x3fd93fd2d5e1bf1d, 0x3fd98bcd84296946 +data8 0x3fd9c8c333e6e9a5, 0x3fda152f142981b4 +data8 0x3fda527fd95fd8ff, 0x3fda9f5e3edeb9e6 +data8 0x3fdadd0b2b5755a7, 0x3fdb2a5d6f51ff83 +data8 0x3fdb686799b00be3, 0x3fdbb62f1b887cd8 +data8 0x3fdbf4979f666668, 0x3fdc332a6e8399d4 +data8 0x3fdc819dc2d45fe4, 0x3fdcc0908e19b7bd +data8 0x3fdcffae611ad12b, 0x3fdd3ef776d43ff4 +data8 0x3fdd8e5002710128, 0x3fddcdfb486cb9a1 +data8 0x3fde0dd294245fe4, 0x3fde4dd622a28840 +data8 0x3fde8e06317114f0, 0x3fdece62fe9a9915 +data8 0x3fdf1f164a15389a, 0x3fdf5fd8a9063e35 +data8 0x3fdfa0c8937e7d5d, 0x3fdfe1e649bb6335 +data8 0x3fe011990641535a, 0x3fe032560e91e59e +data8 0x3fe0532a5ebcd44a, 0x3fe0741617f5fc28 +data8 0x3fe08cd653f38839, 0x3fe0adeb55c1103b +data8 0x3fe0cf181d5d1dd0, 0x3fe0f05ccd0aced7 +data8 0x3fe111b9875788ab, 0x3fe1332e6f1bcf73 +data8 0x3fe154bba77c2088, 0x3fe16df59bfa06c1 +data8 0x3fe18fadb6e2d3c2, 0x3fe1b17e849adc26 +data8 0x3fe1caeb6a0de814, 0x3fe1ece7c830eec9 +data8 0x3fe20efd3dae01df, 0x3fe2289de375d901 +data8 0x3fe24adf9b6a6fe0, 0x3fe26d3ad1aebcfc +data8 0x3fe287100c2771f4, 0x3fe2a9983b3c1b28 +data8 0xbfda78e146f7bef4, 0xbfda33760a7f6051 +data8 0xbfd9ff43476fb5f7, 0xbfd9b97c3c4eec8f +data8 0xbfd98504431717fc, 0xbfd93ee07535f967 +data8 0xbfd90a228d5712b2, 0xbfd8c3a104cb24f5 +data8 0xbfd88e9c72e0b226, 0xbfd847bc33d8618e +data8 0xbfd812703988bb69, 0xbfd7dd0569c04bff +data8 0xbfd7959c202292f1, 0xbfd75fe8d2c5d48f +data8 0xbfd72a1637cbc183, 0xbfd6e221cd9d0cde +data8 0xbfd6ac059985503b, 0xbfd675c99ce81f92 +data8 0xbfd63f6db2590482, 0xbfd5f6c138136489 +data8 0xbfd5c01a39fbd688, 0xbfd58952cf519193 +data8 0xbfd5526ad18493ce, 0xbfd51b6219bfe6ea +data8 0xbfd4d1cdf8b4846f, 0xbfd49a784bcd1b8b +data8 0xbfd4630161832547, 0xbfd42b6911cf5465 +data8 0xbfd3f3af3461e1c4, 0xbfd3bbd3a0a1dcfb +data8 0xbfd383d62dac7ae7, 0xbfd34bb6b2546218 +data8 0xbfd313750520f520, 0xbfd2db10fc4d9aaf +data8 0xbfd2a28a6dc90387, 0xbfd269e12f346e2c +data8 0xbfd2311515e2e855, 0xbfd1f825f6d88e13 +data8 0xbfd1bf13a6c9c69f, 0xbfd185ddfa1a7ed0 +data8 0xbfd14c84c4dd6128, 0xbfd11307dad30b76 +data8 0xbfd0d9670f6941fe, 0xbfd09fa235ba2020 +data8 0xbfd0790adbb03009, 0xbfd03f09858c55fb +data8 0xbfd004e3a7c97cbd, 0xbfcf9532288fcf69 +data8 0xbfcf205339208f27, 0xbfceab2a23a5b83e +data8 0xbfce5ce55fdd37a5, 0xbfcde73fe3b1480f +data8 0xbfcd714f44623927, 0xbfccfb1321b8c400 +data8 0xbfccac163c770dc9, 0xbfcc355b67195dd0 +data8 0xbfcbbe540a3f036f, 0xbfcb6ecf175f95e9 +data8 0xbfcaf74751e1be33, 0xbfca7f71fb7bab9d +data8 0xbfca2f632320b86b, 0xbfc9b70ba539dfae +data8 0xbfc93e6587910444, 0xbfc8edcae8352b6c +data8 0xbfc874a0db01a719, 0xbfc7fb27199df16d +data8 0xbfc7a9fec7d05ddf, 0xbfc72fff456ac70d +data8 0xbfc6de7d66023dbc, 0xbfc663f6fac91316 +data8 0xbfc6121ac74813cf, 0xbfc5970c478fff4a +data8 0xbfc51bab907a5c8a, 0xbfc4c93d33151b24 +data8 0xbfc44d527fdadf55, 0xbfc3fa87be0f3a1b +data8 0xbfc3a797cd35d959, 0xbfc32ae9e278ae1a +data8 0xbfc2d79c6937efdd, 0xbfc25a619370d9dc +data8 0xbfc206b5bde2f8b8, 0xbfc188ecbd1d16be +data8 0xbfc134e1b489062e, 0xbfc0b6894488e95f +data8 0xbfc0621e2f556b5c, 0xbfc00d8c711a12cc +data8 0xbfbf1cd21257e18c, 0xbfbe72ec117fa5b2 +data8 0xbfbdc8b7c49a1ddb, 0xbfbcc8d5e467b710 +data8 0xbfbc1ddc9c39c7a1, 0xbfbb7294093cdd0f +data8 0xbfba7111df348494, 0xbfb9c501cdf75872 +data8 0xbfb918a16e46335b, 0xbfb81579a73e83c6 +data8 0xbfb7684f39f4ff2d, 0xbfb6bad3758efd87 +data8 0xbfb60d060d7e41ac, 0xbfb507b836033bb7 +data8 0xbfb4591d6310d85a, 0xbfb3aa2fdd27f1c3 +data8 0xbfb2faef55ccb372, 0xbfb1f3723b4ae6db +data8 0xbfb14360d6136ffa, 0xbfb092fb594145c1 +data8 0xbfafc482e8b48a7e, 0xbfae6265ace11ae4 +data8 0xbfacff9e5c4341d0, 0xbfaaea3316095f72 +data8 0xbfa985bfc3495194, 0xbfa820a01ac754cb +data8 0xbfa6bad3758efd87, 0xbfa554592bb8cd58 +data8 0xbfa3ed3094685a26, 0xbfa2855905ca70f6 +data8 0xbfa11cd1d5133413, 0xbf9dfd78881399f1 +data8 0xbf9b28f618cc85df, 0xbf98530faa3c087b +data8 0xbf957bc3dddcd7fa, 0xbf92a3115322f9e6 +data8 0xbf8f91ed4eef8370, 0xbf89dae4ec6b8b2e +data8 0xbf842106b1499209, 0xbf7cc89f97d67594 +data8 0xbf71497accf7e11d, 0x0000000000000000 +LOCAL_OBJECT_END(T_table) + + +.section .text +GLOBAL_LIBM_ENTRY(log2f) + +{ .mfi + alloc r32=ar.pfs,1,4,4,0 + // y=frcpa(x) + frcpa.s1 f6,p0=f1,f8 + // will form significand of 1.5 (to test whether the index is 128 or above) + mov r24=0xc +} +{.mfi + nop.m 0 + // normalize x + fma.s1 f7=f8,f1,f0 + // r2 = pointer to C_1...C_6 followed by T_table + addl r2 = @ltoff(poly_coeffs), gp;; +} +{.mfi + // get significand + getf.sig r25=f8 + // f8 denormal ? + fclass.m p8,p10=f8,0x9 + // will form significand of 1.5 (to test whether the index is 128 or above) + shl r24=r24,60 +} +{.mfi + mov r26=0x804 + nop.f 0 + // r23=bias-1 + mov r23=0xfffe;; +} + +{.mmf + getf.exp r29=f8 + // load start address for C_1...C_6 followed by T_table + ld8 r2=[r2] + // will continue only for positive normal/denormal numbers + fclass.nm.unc p12,p7 = f8, 0x19 ;; +} + +.pred.rel "mutex",p8,p10 +{.mfi + // denormal input, repeat get significand (after normalization) + (p8) getf.sig r25=f7 + // x=1 ? + fcmp.eq.s0 p6,p0=f8,f1 + // get T_index + (p10) shr.u r28=r25,63-8 +} +{.mfi + // f12=0.5 + setf.exp f12=r23 + nop.f 0 + // r27=bias + mov r27=0xffff;; +} + +{.mfb + // denormal input, repeat get exponent (after normalization) + (p8) getf.exp r29=f7 + nop.f 0 + (p12) br.cond.spnt SPECIAL_log2f +} +{.mfi + cmp.geu p12,p0=r25,r24 + nop.f 0 + mov r23=0xff;; +} + +{.mfi + add r3=32,r2 + // r=1-x*y + fms.s1 f6=f6,f8,f1 + // r26=0x80400...0 (threshold for using polynomial approximation) + shl r26=r26,64-12 +} +{.mfi + // load C_3, C_4 + ldfpd f10,f11=[r2],16 + nop.f 0 + // r27=bias-1 (if index >=128, will add exponent+1) + (p12) mov r27=0xfffe;; +} + +{.mfi + // load C_1 + ldfe f14=[r2],32 + // x=1, return 0 + (p6) fma.s.s0 f8=f0,f0,f0 + (p8) shr.u r28=r25,63-8 +} +{.mib + // load C_2 + ldfe f13=[r3] + // r29=exponent-bias + sub r29=r29,r27 + // x=1, return + (p6) br.ret.spnt b0;; +} + + +{.mfi + // get T_index + and r28=r28,r23 + fmerge.se f7=f1,f7 + // if first 9 bits after leading 1 are all zero, then p8=1 + cmp.ltu p8,p12=r25,r26;; +} +{.mfi + // f8=expon - bias + setf.sig f8=r29 + nop.f 0 + // get T address + shladd r2=r28,3,r2 +} +{.mfi + // first 8 bits after leading 1 are all ones ? + cmp.eq p10,p0=r23,r28 + // if first 8 bits after leading bit are 0, use polynomial approx. only + (p8) fms.s1 f6=f7,f1,f1 + nop.i 0;; +} +{.mfi + //r26=1 + mov r26=1 + // if first 8 bits after leading 1 are all ones, use polynomial approx. only + (p10) fms.s1 f6=f7,f12,f1 + nop.i 0;; +} + +.pred.rel "mutex",p8,p12 +{.mmf + // load T (unless first 9 bits after leading 1 are 0) + (p12) ldfd f12=[r2] + nop.m 0 + // set T=0 (if first 9 bits after leading 1 are 0) + (p8) fma.s1 f12=f0,f0,f0;; +} + +{.mfi + nop.m 0 + // P34=C_3+C_4*r + fma.s1 f10=f11,f6,f10 + // r26=2^{63} + shl r26=r26,63 +} +{.mfi + nop.m 0 + // r2=r*r + fma.s1 f11=f6,f6,f0 + nop.i 0;; +} +{.mfi + // significand of x is 1 ? + cmp.eq p0,p6=r25,r26 + // P12=C_1+C_2*r + fma.s1 f14=f13,f6,f14 + nop.i 0;; +} +{.mfi + nop.m 0 + // normalize additive term (l=exponent of x) + fcvt.xf f8=f8 + // if significand(x)=1, return exponent (l) + nop.i 0;; +} +{.mfi + nop.m 0 + // add T+l + (p6) fma.s1 f8=f8,f1,f12 + nop.i 0 +} +{.mfi + nop.m 0 + // P14=P12+r2*P34 + (p6) fma.s1 f13=f10,f11,f14 + nop.i 0;; +} + +{.mfb + nop.m 0 + // result=T+l+r*P14 + (p6) fma.s.s0 f8=f13,f6,f8 + // return + br.ret.sptk b0;; +} + + +SPECIAL_log2f: +{.mfi + nop.m 0 + // x=+Infinity ? + fclass.m p7,p0=f8,0x21 + nop.i 0;; +} +{.mfi + nop.m 0 + // x=+/-Zero ? + fclass.m p8,p0=f8,0x7 + nop.i 0;; +} +{.mfi + nop.m 0 + // x=-Infinity, -normal, -denormal ? + fclass.m p6,p0=f8,0x3a + nop.i 0;; +} +{.mfb + nop.m 0 + // log2f(+Infinity)=+Infinity + nop.f 0 + (p7) br.ret.spnt b0;; +} +{.mfi + (p8) mov GR_Parameter_TAG = 172 + // log2f(+/-0)=-infinity, raises Divide by Zero + // set f8=-0 + (p8) fmerge.ns f8=f0,f8 + nop.i 0;; +} +{.mfb + nop.m 0 + (p8) frcpa.s0 f8,p0=f1,f8 + (p8) br.cond.sptk __libm_error_region;; +} +{.mfb + (p6) mov GR_Parameter_TAG = 173 + // x<0: return NaN, raise Invalid + (p6) frcpa.s0 f8,p0=f0,f0 + (p6) br.cond.sptk __libm_error_region;; +} + + +{.mfb + nop.m 0 + // Remaining cases: NaNs + fma.s.s0 f8=f8,f1,f0 + br.ret.sptk b0;; +} + +GLOBAL_LIBM_END(log2f) + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfs [GR_Parameter_Y] = FR_Y,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; +.body +{ .mib + stfs [GR_Parameter_X] = FR_X // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfs [GR_Parameter_Y] = FR_RESULT // STORE Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + nop.m 0 + nop.m 0 + add GR_Parameter_RESULT = 48,sp +};; +{ .mmi + ldfs f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) +.type __libm_error_support#,@function +.global __libm_error_support# + + + + diff --git a/sysdeps/ia64/fpu/e_log2l.S b/sysdeps/ia64/fpu/e_log2l.S new file mode 100644 index 0000000000..b3fe63f182 --- /dev/null +++ b/sysdeps/ia64/fpu/e_log2l.S @@ -0,0 +1,817 @@ +.file "log2l.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 09/25/00 Initial version +// 11/22/00 Fixed accuracy bug (for mantissas near 1, 2) +// 12/07/00 Fixed C_1l constant, eliminated rounding errors in +// reduced argument (x*frcpa(x)-1) +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// +// API +//============================================================== +// long double log2l(long double) +// +// Overview of operation +//============================================================== +// Background +// +// Implementation +// +// Let x = 2^l * m, where m=1.b1 b2 ... b8 b9 ... b52 +// y=frcpa(m), r=m*y-1, f=b1 b2 .. b8 +// T_hi is a table that stores the 24 most significant bits of log2(1/y) +// (in entries 1..255) in single precision format +// T_low is a table that stores (log2(1/y)-T_high), rounded to double +// precision +// +// f is used as an index; T_high[255]=T_low[255]=0 +// +// If f=0 and b9=0, r is set to 2^{-8}* 0.b9 b10 ... b52 = m-1 (fractional part of m), +// and 0 is used instead of T_high[0], T_low[0] +// (polynomial evaluation only, for m=1+r, 0<=r<2^{-9}) +// If f=255, r is set to (m-2)/2 (T[255]=0, and only polynomial evaluation is used +// for m=2(1-r'), 0<=r'<2^{-9}) +// +// If 2^{-9}<=m<2-2^{-8} or (input not near 1), let C1r=(2^{16}+C1*r)-2^{16} +// and let E=((RN(m*y)-1)-r)+(m*y-RN(m*y)) +// Else let C1r=C1*r (rounded to 64 significant bits) and let E=0 +// +// Let D=C1*r-C1r +// +// +// log2l(x) is approximated as +// (l+T_high[f]+C1r) + (D+r*(c1+c2*r+c3*r^2...+c8*r^7)+(T_low[f]+C_1*E)) +// + + +// Special values +//============================================================== +// log2l(0)=-inf, raises Divide by Zero +// log2l(+inf)=inf +// log2l(x)=NaN, raises Invalid if x<0 +// + + +// Registers used +//============================================================== +// f6-f15, f32-f36 +// r2-r3, r23-r23 +// p6,p7,p8,p12 +// + + +GR_SAVE_B0 = r33 +GR_SAVE_PFS = r34 +GR_SAVE_GP = r35 // This reg. can safely be used +GR_SAVE_SP = r36 + +GR_Parameter_X = r37 +GR_Parameter_Y = r38 +GR_Parameter_RESULT = r39 +GR_Parameter_TAG = r40 + +FR_X = f10 +FR_Y = f1 +FR_RESULT = f8 + + + + +// Data tables +//============================================================== + +RODATA + +.align 16 + +LOCAL_OBJECT_START(poly_coeffs) + +data8 0xb8aa3b295c17f0bc, 0x00003fff // C_1 +data8 0x3fca61762a7aded9, 0xbfc71547652b82fe // C_7, C_8 +data8 0x3fd2776c50ef9bfe, 0xbfcec709dc3a03fd // C_5, C_6 +data8 0x3fdec709dc3a03fd, 0xbfd71547652b82fe // C_3, C_4 +//data8 0xd871319ff0342580, 0x0000bfbd // C_1l (low part of C1) +data8 0x82f0025f2dc582ee, 0x0000bfbe // C_1l (low part of C1) +data8 0xb8aa3b295c17f0bc, 0x0000bffe // C_2 +LOCAL_OBJECT_END(poly_coeffs) + + + + +LOCAL_OBJECT_START(T_table) + +data4 0x3b38d875, 0x3c0ae7f4, 0x3c67f738, 0x3ca2b253 +data4 0x3ccbb91d, 0x3cfac91e, 0x3d1504a5, 0x3d29c4a0 +data4 0x3d419264, 0x3d567aa6, 0x3d6e76ca, 0x3d81c3f7 +data4 0x3d8c5630, 0x3d9876e9, 0x3da31e0a, 0x3dadcf09 +data4 0x3db889f9, 0x3dc34eec, 0x3dce1df5, 0x3dd8f726 +data4 0x3de3da94, 0x3deec851, 0x3df82ea4, 0x3e0197dd +data4 0x3e071dad, 0x3e0ca8ca, 0x3e116d6e, 0x3e170281 +data4 0x3e1bcfbc, 0x3e216ee9, 0x3e2644dc, 0x3e2b1ee1 +data4 0x3e30cd12, 0x3e35affd, 0x3e3a970f, 0x3e3f824f +data4 0x3e4544c0, 0x3e4a3926, 0x3e4f31d1, 0x3e542ec7 +data4 0x3e593012, 0x3e5e35b7, 0x3e633fbf, 0x3e677625 +data4 0x3e6c884b, 0x3e719eea, 0x3e76ba0a, 0x3e7bd9b2 +data4 0x3e80111d, 0x3e82a523, 0x3e84ccec, 0x3e876533 +data4 0x3e89ffd1, 0x3e8c2d22, 0x3e8e5c18, 0x3e90fd0a +data4 0x3e932fa9, 0x3e95d506, 0x3e980b5a, 0x3e9a4361 +data4 0x3e9c7d1f, 0x3e9f2b16, 0x3ea168a0, 0x3ea3a7ea +data4 0x3ea5e8f5, 0x3ea82bc4, 0x3eaa705b, 0x3eacb6bb +data4 0x3eaefee7, 0x3eb148e3, 0x3eb394b1, 0x3eb5e255 +data4 0x3eb831d0, 0x3eba8327, 0x3ebcd65c, 0x3ebeb3e0 +data4 0x3ec10a7a, 0x3ec362f9, 0x3ec5bd63, 0x3ec7a0b3 +data4 0x3ec9fe96, 0x3ecc5e6c, 0x3ece4619, 0x3ed0a978 +data4 0x3ed293fe, 0x3ed4faf1, 0x3ed6e859, 0x3ed952eb +data4 0x3edb433c, 0x3eddb178, 0x3edfa4bc, 0x3ee19953 +data4 0x3ee40cee, 0x3ee60484, 0x3ee7fd73, 0x3ee9f7bb +data4 0x3eec7280, 0x3eee6fda, 0x3ef06e94, 0x3ef26eb1 +data4 0x3ef47031, 0x3ef67317, 0x3ef8f8b2, 0x3efafec5 +data4 0x3efd0644, 0x3eff0f32, 0x3f008cc8, 0x3f0192b0 +data4 0x3f029952, 0x3f03a0b0, 0x3f0466b2, 0x3f056f5a +data4 0x3f0678c0, 0x3f0782e6, 0x3f088dcc, 0x3f099973 +data4 0x3f0aa5dd, 0x3f0b6fac, 0x3f0c7d6d, 0x3f0d8bf4 +data4 0x3f0e575b, 0x3f0f673e, 0x3f1077e9, 0x3f1144ef +data4 0x3f1256fc, 0x3f1369d6, 0x3f143880, 0x3f154cc1 +data4 0x3f161c7a, 0x3f173227, 0x3f1802f2, 0x3f191a0f +data4 0x3f19ebee, 0x3f1b047e, 0x3f1bd775, 0x3f1cf17b +data4 0x3f1dc58e, 0x3f1ee10f, 0x3f1fb63f, 0x3f208bea +data4 0x3f21a98f, 0x3f22805c, 0x3f2357a7, 0x3f247778 +data4 0x3f254fe9, 0x3f2628d9, 0x3f270249, 0x3f2824fb +data4 0x3f28ff97, 0x3f29dab4, 0x3f2ab654, 0x3f2b9277 +data4 0x3f2cb8c8, 0x3f2d961e, 0x3f2e73fa, 0x3f2f525b +data4 0x3f303143, 0x3f3110b1, 0x3f31f0a7, 0x3f32d125 +data4 0x3f33b22b, 0x3f3493bc, 0x3f3575d6, 0x3f36587b +data4 0x3f373bab, 0x3f381f68, 0x3f3903b1, 0x3f39e888 +data4 0x3f3acdec, 0x3f3bb3e0, 0x3f3c9a63, 0x3f3d8177 +data4 0x3f3e1bd4, 0x3f3f03d9, 0x3f3fec71, 0x3f40d59b +data4 0x3f41bf59, 0x3f42a9ab, 0x3f434635, 0x3f443180 +data4 0x3f451d61, 0x3f4609d9, 0x3f46a7d3, 0x3f479549 +data4 0x3f488357, 0x3f492261, 0x3f4a1171, 0x3f4b011c +data4 0x3f4ba139, 0x3f4c91e8, 0x3f4d8334, 0x3f4e246a +data4 0x3f4f16be, 0x3f5009b1, 0x3f50ac02, 0x3f51a001 +data4 0x3f524305, 0x3f533812, 0x3f53dbca, 0x3f54d1e7 +data4 0x3f55c8a8, 0x3f566d85, 0x3f57655b, 0x3f580af0 +data4 0x3f58b0d0, 0x3f59aa2c, 0x3f5a50c7, 0x3f5b4b3c +data4 0x3f5bf294, 0x3f5cee26, 0x3f5d963c, 0x3f5e92ed +data4 0x3f5f3bc3, 0x3f5fe4e7, 0x3f60e32d, 0x3f618d13 +data4 0x3f623748, 0x3f63372a, 0x3f63e223, 0x3f648d6b +data4 0x3f658eee, 0x3f663afe, 0x3f66e75e, 0x3f67ea86 +data4 0x3f6897b0, 0x3f69452c, 0x3f69f2f9, 0x3f6af847 +data4 0x3f6ba6e2, 0x3f6c55d0, 0x3f6d0510, 0x3f6e0c8d +data4 0x3f6ebc9f, 0x3f6f6d04, 0x3f701dbe, 0x3f70cecd +data4 0x3f718030, 0x3f728ae6, 0x3f733d20, 0x3f73efaf +data4 0x3f74a296, 0x3f7555d3, 0x3f760967, 0x3f76bd53 +data4 0x3f777197, 0x3f7880a1, 0x3f7935c2, 0x3f79eb3c +data4 0x3f7aa10f, 0x3f7b573b, 0x3f7c0dc2, 0x3f7cc4a3 +data4 0x3f7d7bdf, 0x3f7e3376, 0x3f7eeb68, 0x00000000 +LOCAL_OBJECT_END(T_table) + + + +LOCAL_OBJECT_START(T_low) + + +data8 0x3dc0b97f689876ef, 0x3dfd5d906028ac01 +data8 0x3df8b9cbb8d7240b, 0x3de0c941a2f220cd +data8 0x3e09c6aecba15936, 0x3dfa6d528241827c +data8 0x3dd0bad25714903c, 0x3e2776b01dc036a2 +data8 0x3e2b914bc77f158b, 0x3e1c0fafd29dc74a +data8 0x3e28dadc119cd3de, 0x3e3bca869da085be +data8 0x3e19d1e700f2200a, 0x3e3e13530cc37504 +data8 0x3e3936464d9c41ee, 0x3e3c3fa21c9499d0 +data8 0x3e3259e079b6c6e8, 0x3e2a364069c4f7f3 +data8 0x3e1274c84f6c6364, 0x3e3796170159f454 +data8 0x3e26e1e389f4364e, 0x3e28cedda8c7f658 +data8 0x3e376c2028433268, 0x3e4aee6d650c82e1 +data8 0x3e33e65094fbeeb4, 0x3e4c7d125aa92c5d +data8 0x3e1559a4b69691d8, 0x3e18efabeb7d7221 +data8 0x3e4c2b255abaa8de, 0x3e37436952a4538b +data8 0x3e4e6807f4ba00b8, 0x3e33ff5964190e42 +data8 0x3e4f5d798cead43c, 0x3e4f3676443bf453 +data8 0x3e4660f8d5bc1bf5, 0x3e2d4f9f3ab04f36 +data8 0x3e357f7a64ccd537, 0x3e394caf7c9b05af +data8 0x3e225c7d17ab29b0, 0x3e4eb202f6d55a12 +data8 0x3e32faa68b19bcd2, 0x3e45ee1c9b566a8b +data8 0x3e4770a67de054ff, 0x3e42234fb9de6d6b +data8 0x3e4ad139825c6e19, 0x3e47f3d334814a93 +data8 0x3e2af1ec402867b6, 0x3e2bfbda0c956e3d +data8 0x3e4287b831e77ff2, 0x3e54bf0eb77f7b89 +data8 0x3e5b9259a1029607, 0x3e4a764b015e699d +data8 0x3e4d0b68ea883ab5, 0x3e33e829ecdadf46 +data8 0x3e52f27efef3031b, 0x3e3073979e4af89e +data8 0x3e3b980f2cd6c253, 0x3e2a5f0f5f7f66a9 +data8 0x3e37788738117b02, 0x3e58aa29a784d52f +data8 0x3e4f5504c4ff2466, 0x3e002d40340fa647 +data8 0x3e5f53b64592f4c3, 0x3e543f222c526802 +data8 0x3e5680e547a872fa, 0x3e5e234bd1154450 +data8 0x3e3000edc18b6d21, 0x3e1c3c1f000942a8 +data8 0x3e51eeae0e442d6e, 0x3e4fb265376623f2 +data8 0x3e57b5941782d830, 0x3e3a4b83f24ae52c +data8 0x3e5a5fb4f23978de, 0x3e51ed071563fb02 +data8 0x3e49e2071f51a7a8, 0x3e5e43ae5b924234 +data8 0x3dfa2be9aedf374a, 0x3e56dea3dbba67d5 +data8 0x3e3375fe732b3c3e, 0x3e5a0c6f91f2e77e +data8 0x3e55e1bf1c969e41, 0x3e30a5a5166b8eee +data8 0x3e53e6e9a539d46c, 0x3e542981b3d7b0e6 +data8 0x3e595fd8ff36ad64, 0x3e5edeb9e65cbbb4 +data8 0x3e46aeab4d3434c1, 0x3e4ea3ff0564b010 +data8 0x3e59b00be2e3c25a, 0x3e5b887cd7b0821f +data8 0x3e5f666668547b4d, 0x3e4d0733a805273f +data8 0x3e26a2ff21c4aec5, 0x3e4c336f7a3a78f3 +data8 0x3e11ad12b628e2d0, 0x3e56d43ff3f0ea64 +data8 0x3e238809433cccd2, 0x3e40d9734147d40f +data8 0x3e54245fe3e24e06, 0x3e251441fce4d48c +data8 0x3e517114efc5d1f9, 0x3e5e9a99154b0d82 +data8 0x3e442a71337970f8, 0x3e420c7c69211fdf +data8 0x3e537e7d5d43c6a7, 0x3e4376c66ad9ad8b +data8 0x3e49054d678a4f1c, 0x3e5d23cb3bc19f18 +data8 0x3e6ebcd449dcab2b, 0x3e67f5fc2849c88a +data8 0x3e63f388395d3e84, 0x3e65c1103b0ad7e9 +data8 0x3e6d5d1dd031f353, 0x3e5a159dae75c4d0 +data8 0x3e4d5e22aa75f71d, 0x3e5e379ee62e1e35 +data8 0x3e4df082213cb2dc, 0x3e6bfa06c156f521 +data8 0x3e66e2d3c19b517b, 0x3e426b7098590071 +data8 0x3e541bd027e9854e, 0x3e5061dd924b0ac0 +data8 0x3e6dae01df373a03, 0x3e3baec80b207b0b +data8 0x3e6b6a6fe06bebac, 0x3e61aebcfc3ab5d1 +data8 0x3e584ee3e7c79d83, 0x3e6b3c1b2840cb40 +data8 0x3e6c842085d6befd, 0x3e6ac04fd7b141e0 +data8 0x3e6c48250474141d, 0x3e2d889b86125f69 +data8 0x3e6e74740225dad0, 0x3e45940d31d50a7c +data8 0x3e695476a6c39ddc, 0x3e6d9a6d857a060a +data8 0x3e4a3e9bb4b69337, 0x3e484f3ce4707ed6 +data8 0x3e39dd125d25fc27, 0x3e563fb400de8732 +data8 0x3e5fdd6d0ee28b48, 0x3e669d15b869bb07 +data8 0x3e40687cfad7964d, 0x3e69317990d43957 +data8 0x3e633d57e24ae1bd, 0x3e618bf03710eabb +data8 0x3e4b4df6fccd1160, 0x3e3fb26ddaa1ec45 +data8 0x3e3810a5e1817fd4, 0x3e6857373642fa5c +data8 0x3e673db6193add31, 0x3e63200c8acbc9c3 +data8 0x3e3d2dee448ebb62, 0x3e6a19723a80db6a +data8 0x3e5e7cdab8fd3e6a, 0x3e671855cd660672 +data8 0x3e473c3c78a85ecd, 0x3e5f5e23056a7cf2 +data8 0x3e52538519527367, 0x3e4b573bcf2580e9 +data8 0x3e6d6f856fe90c60, 0x3e2d932a8487642e +data8 0x3e5236fc78b6174c, 0x3e50cb91d406db50 +data8 0x3e650e8bd562aa57, 0x3e424ee3d9a82f2e +data8 0x3e59363960e1e3d9, 0x3e379604c1150a3e +data8 0x3e6d914f6c2ac258, 0x3e62967a451a7b48 +data8 0x3e684b5f01139cb2, 0x3e448bbfbf6d292c +data8 0x3e6227e7fb487e73, 0x3e6d39d50290f458 +data8 0x3e58368342b4b668, 0x3e65dc0c25bd1763 +data8 0x3e61b7dc362e22b5, 0x3e671691f094bb80 +data8 0x3e5011642d5123f2, 0x3e4c4eb7f11e41be +data8 0x3e5dcee36ca242cf, 0x3e6791cefff688f1 +data8 0x3e60e23c8dda4ecd, 0x3e48e6a22fe78cfe +data8 0x3e6d703f244adc86, 0x3e6a281a85a5049d +data8 0x3e570f20e6403d9e, 0x3e2211518a12956f +data8 0x3e6737d1e54d71df, 0x3e66b1881476f5e9 +data8 0x3e6e1bbeef085376, 0x3e47cad4944a32be +data8 0x3e527f2c738e7ee9, 0x3e699883a4b9fb29 +data8 0x3e5c17d1108740d9, 0x3e5d4a9c79a43389 +data8 0x3e49fdc24462ba3b, 0x3e24dbb3a60cceb2 +data8 0x3e5c5bf618780748, 0x3e5c38005b0c778c +data8 0x3e6be168dd6dd3fe, 0x3e633ab9370693b0 +data8 0x3dd290556b0ae339, 0x3e607c317927096a +data8 0x3e59651353b3d90e, 0x3e4d8751e5e0ae0d +data8 0x3e46c81023272a85, 0x3e6b23c988f391b2 +data8 0x3e608741d215209c, 0x3e60b8ba506d758f +data8 0x3e62ddbe74803297, 0x3e5dbb8b5087587d +data8 0x3e642aa529048131, 0x3e3dcbda6835dcf4 +data8 0x3e6db503ce854d2a, 0x3e6dd00b49bc6849 +data8 0x3e4db2f11243bc84, 0x3e3b9848efc2ea97 +data8 0x3e58f18e17c82609, 0x3e6ed8645e16c312 +data8 0x3e4065bdb60a5dd4, 0x3e490453c6e6c30a +data8 0x3e62373994aa31ba, 0x3e56305f0e6b2a95 +data8 0x3e68c1601a6614ee, 0x3e614e204f19d93f +data8 0x3e6e5037ca773299, 0x3e693f98892561a6 +data8 0x3e639de4f4bf700d, 0x3e416c071e93fd97 +data8 0x3e65466991b415ef, 0x3e6896a324afac9d +data8 0x3e44f64802e2f11c, 0x3e64d7d747e2191a +data8 0x3e6174b7581de84c, 0x3e44c7b946e1d43c +data8 0x3e6a3bcbe30512ec, 0x3e5d3ed411c95ce4 +data8 0x3e3e5b5735cfaf8e, 0x3e6e538ab34efb51 +data8 0x3e514e204f19d93f, 0x3e5a88e6550c89a4 +data8 0x3e66b97a5d9dfd8b, 0x3e5f46b1e14ebaf3 +data8 0x3e357665f6893f5d, 0x3e6bbf633078d1d5 +data8 0x3e5e7337a212c417, 0x3e3570fde15fc8cc +data8 0x3e21119402da92b4, 0x3e6566e830d1ff3b +data8 0x3e558883e480e220, 0x3e589ca3a68da411 +data8 0x3e44eb66df73d648, 0x3e1a0a629b1b7e68 +data8 0x3e54cc207b8c1116, 0x0000000000000000 +LOCAL_OBJECT_END(T_low) + + +.section .text +GLOBAL_IEEE754_ENTRY(log2l) + +{ .mfi + alloc r32=ar.pfs,1,4,4,0 + // normalize x + // y=frcpa(x) + frcpa.s1 f41,p0=f1,f8 + // r26=bias-1 + mov r26=0xfffe +} +{.mfi + // r23=bias+16 + mov r23=0xffff+16 + fma.s1 f7=f8,f1,f0 + // r2 = pointer to C_1...C_6 followed by T_table + addl r2 = @ltoff(poly_coeffs), gp;; +} +{.mfi + // get significand + getf.sig r25=f8 + // f8 denormal ? + fclass.m p8,p10=f8,0x9 + // r24=bias-8 + mov r24=0xffff-8;; +} +{.mfi + setf.exp f36=r26 + nop.f 0 + // r27=bias + mov r27=0xffff;; +} + +{.mmf + getf.exp r29=f8 + // load start address for C_1...C_7 followed by T_table + ld8 r2=[r2] + // will continue only for positive normal/unnormal numbers + fclass.m.unc p0,p12 = f8, 0x19;; +} + + +.pred.rel "mutex",p8,p10 +{.mfi + // denormal input, repeat get significand (after normalization) + (p8) getf.sig r25=f7 + // x=1 ? + fcmp.eq.s0 p6,p0=f8,f1 + // get T_index + (p10) shr.u r28=r25,63-8 +} +{.mfi + // f32=2^16 + setf.exp f32=r23 + nop.f 0 + mov r26=0x804;; +} + +{.mfi + // denormal input, repeat get exponent (after normalization) + (p8) getf.exp r29=f7 + // f33=0 + mov f33=f0 + // r26=0x80400...0 (threshold for using polynomial approximation) + shl r26=r26,64-12;; +} + +{.mfb + add r3=16,r2 + // r=x*y-1 + fms.s1 f6=f41,f8,f1 + (p12) br.cond.spnt SPECIAL_log2l +} +{.mfi + // load C_1 + ldfe f14=[r2],48 + // RN(x*y) + fma.s1 f43=f41,f8,f0 + mov r23=0xff;; +} + +{.mmi + // load C_7, C_8 + ldfpd f10,f11=[r3],16 + // load C_3,C_4 + ldfpd f15,f42=[r2],16 + (p8) shr.u r28=r25,63-8;; +} + + +{.mfi + // load C_5, C_6 + ldfpd f12,f13=[r3] + // pseudo-zero ? + fcmp.eq.s0 p7,p0=f7,f0 + // if first 9 bits after leading 1 are all zero, then p8=1 + cmp.ltu p8,p12=r25,r26 +} +{.mfi + // load C1l + ldfe f34=[r2],16 + fmerge.se f7=f1,f7 + // get T_index + and r28=r28,r23;; +} +{.mfi + // r29=exponent-bias + sub r29=r29,r27 + // if first 8 bits after leading bit are 0, use polynomial approx. only + (p8) fms.s1 f6=f7,f1,f1 + // start address of T_low + add r3=1024+16,r2 +} +{.mfi + // load C_2 + ldfe f35=[r2],16 + // x=1, return 0 + (p6) fma.s0 f8=f0,f0,f0 + // first 8 bits after leading 1 are all ones ? + cmp.eq p10,p0=r23,r28;; +} + +{.mfb + // if first 8 bits after leading 1 are all ones, use polynomial approx. only + // add 1 to the exponent additive term, and estimate log2(1-r) + (p10) add r29=1,r29 + nop.f 0 + (p7) br.cond.spnt LOG2_PSEUDO_ZERO +} +{.mfi + // get T_low adress + shladd r3=r28,3,r3 + // if first 8 bits after leading 1 are all ones, use polynomial approx. only + (p10) fms.s1 f6=f7,f36,f1 + // p10 --> p8=1, p12=0 + (p10) cmp.eq p8,p12=r0,r0;; +} + +{.mfi + // get T_high address + shladd r2=r28,2,r2 + // L(x*y)=x*y-RN(x*y) + fms.s1 f41=f41,f8,f43 + nop.i 0 +} +{.mfi + // p13=p12 + (p12) cmp.eq.unc p13,p0=r0,r0 + // RtH=RN(x*y)-1 (will eliminate rounding errors in r) + fms.s1 f43=f43,f1,f1 + nop.i 0;; +} + +.pred.rel "mutex",p8,p12 +{.mfb + // load T_high (unless first 9 bits after leading 1 are 0) + (p12) ldfs f7=[r2] + // set T_high=0 (if first 9 bits after leading 1 are 0) + (p8) fma.s1 f7=f0,f0,f0 + // x=1, return + (p6) br.ret.spnt b0 +} +.pred.rel "mutex",p8,p12 +{.mfi + // p12: load T_low + (p12) ldfd f36=[r3] + // p8: set T_low=0 + (p8) fma.s1 f36=f0,f0,f0 + (p8) cmp.eq p8,p12=r29,r0;; //nop.i 0;; +} + +.pred.rel "mutex",p8,p12 +{.mfi + // f8=expon - bias + setf.sig f8=r29 + // general case: 2^{16}+C1*r + (p12) fma.s1 f33=f6,f14,f32 + nop.i 0 +} +{.mfi + // r26=1 + mov r26=1 + // p8 (mantissa is close to 1, or close to 2): 2^{-8}+C1*r + (p8) fma.s1 f32=f6,f14,f33 + nop.i 0;; +} + +{.mfi + nop.m 0 + // P78=C_7+C_8*r + fma.s1 f10=f11,f6,f10 + // r26=2^{63} + shl r26=r26,63 +} +{.mfi + nop.m 0 + // P34=C_3+r*C_4 + fma.s1 f15=f42,f6,f15 + nop.i 0;; +} +{.mfi + nop.m 0 + // r2=r*r + fma.s1 f11=f6,f6,f0 + nop.i 0 +} +{.mfi + nop.m 0 + // P56=C_5+C_6*r + fma.s1 f13=f13,f6,f12 + nop.i 0;; +} + +{.mfi + nop.m 0 + // Rth-r + (p13) fms.s1 f43=f43,f1,f6 + nop.i 0 +} +{.mfi + // significand(x)=1 ? + cmp.eq p0,p6=r25,r26 + // P12=C1l+C_2*r + fma.s1 f34=f35,f6,f34 + nop.i 0;; +} + +.pred.rel "mutex",p8,p12 +{.mfi + nop.m 0 + // p12: C1r=(2^{16}+C1*r)-2^{16} + (p12) fms.s1 f32=f33,f1,f32 + nop.i 0 +} +{.mfi + nop.m 0 + // p8: C1r=C1*r (double extended) + (p8) fms.s1 f32=f32,f1,f33 + nop.i 0;; +} + +{.mfi + nop.m 0 + // L(x*y)*C_1+T_low + (p13) fma.s1 f36=f41,f14,f36 + nop.i 0 +} +{.mfi + nop.m 0 + // P58=P56+r2*P78 + fma.s1 f13=f11,f10,f13 + nop.i 0;; +} +{.mfi + nop.m 0 + // P14=P12+r2*P34 + fma.s1 f15=f15,f11,f34 + nop.i 0 +} +{.mfi + nop.m 0 + // r4=r2*r2 + fma.s1 f11=f11,f11,f0 + nop.i 0;; +} + +{.mfi + nop.m 0 + // normalize additive term (l=exponent of x) + fcvt.xf f8=f8 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // D=C1*r-C1r + (p6) fms.s1 f12=f14,f6,f32 + nop.i 0;; +} + +{.mfi + nop.m 0 + // T_low'=(Rth-r)*C1+(L(x*y)*C1+T_low) + (p13) fma.s1 f36=f43,f14,f36 + nop.i 0;; +} +{.mfi + nop.m 0 + // P18=P14+r4*P58 + (p6) fma.s1 f13=f11,f13,f15 + nop.i 0;; +} + +{.mfi + nop.m 0 + // add T_high+l + (p6) fma.s1 f8=f8,f1,f7 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // D+T_low + (p6) fma.s1 f12=f12,f1,f36 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // (T_high+l)+C1r + (p6) fma.s1 f8=f8,f1,f32 + nop.i 0 +} +{.mfi + nop.m 0 + // (D+T_low)+r*P18 + (p6) fma.s1 f13=f13,f6,f12 + nop.i 0;; +} + +//{.mfb +//nop.m 0 +//mov f8=f36 +//fma.s0 f8=f13,f6,f0 +//br.ret.sptk b0;; +//} + + +{.mfb + nop.m 0 + // result=((T_high+l)+C1r)+((D+T_low)+r*P18) + (p6) fma.s0 f8=f13,f1,f8 + // return + br.ret.sptk b0;; +} + + +SPECIAL_log2l: +{.mfi + nop.m 0 + mov FR_X=f8 + nop.i 0 +} +{.mfi + nop.m 0 + // x=+Infinity ? + fclass.m p7,p0=f8,0x21 + nop.i 0;; +} +{.mfi + nop.m 0 + // x=+/-Zero ? + fclass.m p8,p0=f7,0x7 + nop.i 0;; +} +{.mfi + nop.m 0 + // x=-Infinity, -normal, -denormal ? + fclass.m p6,p0=f8,0x3a + nop.i 0;; +} +{.mfb + nop.m 0 + // log2l(+Infinity)=+Infinity + nop.f 0 + (p7) br.ret.spnt b0;; +} +{.mfi + (p8) mov GR_Parameter_TAG = 168 + // log2l(+/-0)=-infinity, raises Divide by Zero + // set f8=-0 + (p8) fmerge.ns f8=f0,f8 + nop.i 0;; +} +{.mfb + nop.m 0 + (p8) frcpa.s0 f8,p0=f1,f8 + (p8) br.cond.sptk __libm_error_region;; +} +{.mfb + (p6) mov GR_Parameter_TAG = 169 + // x<0: return NaN, raise Invalid + (p6) frcpa.s0 f8,p0=f0,f0 + (p6) br.cond.sptk __libm_error_region;; +} + + +{.mfb + nop.m 0 + // Remaining cases: NaNs + fma.s0 f8=f8,f1,f0 + br.ret.sptk b0;; +} + +LOG2_PSEUDO_ZERO: + +{.mfi + nop.m 0 + mov FR_X=f8 + nop.i 0 +} +{.mfi + mov GR_Parameter_TAG = 168 + // log2l(+/-0)=-infinity, raises Divide by Zero + // set f8=-0 + fmerge.ns f8=f0,f8 + nop.i 0;; +} +{.mfb + nop.m 0 + frcpa.s0 f8,p0=f1,f8 + br.cond.sptk __libm_error_region;; +} + + +GLOBAL_IEEE754_END(log2l) + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfe [GR_Parameter_Y] = FR_Y,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; +.body +{ .mib + stfe [GR_Parameter_X] = FR_X // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfe [GR_Parameter_Y] = FR_RESULT // STORE Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + nop.m 0 + nop.m 0 + add GR_Parameter_RESULT = 48,sp +};; +{ .mmi + ldfe f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) +.type __libm_error_support#,@function +.global __libm_error_support# + + diff --git a/sysdeps/ia64/fpu/e_logf.S b/sysdeps/ia64/fpu/e_logf.S new file mode 100644 index 0000000000..3d11a296cc --- /dev/null +++ b/sysdeps/ia64/fpu/e_logf.S @@ -0,0 +1,1159 @@ +.file "logf.s" + + +// Copyright (c) 2000 - 2005, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 03/01/00 Initial version +// 08/15/00 Bundle added after call to __libm_error_support to properly +// set [the previously overwritten] GR_Parameter_RESULT. +// 01/10/01 Improved speed, fixed flags for neg denormals +// 05/20/02 Cleaned up namespace and sf0 syntax +// 05/23/02 Modified algorithm. Now only one polynomial is used +// for |x-1| >= 1/256 and for |x-1| < 1/256 +// 02/10/03 Reordered header: .section, .global, .proc, .align +// 03/31/05 Reformatted delimiters between data tables +// +// API +//============================================================== +// float logf(float) +// float log10f(float) +// +// +// Overview of operation +//============================================================== +// Background +// ---------- +// +// This algorithm is based on fact that +// log(a b) = log(a) + log(b). +// +// In our case we have x = 2^N f, where 1 <= f < 2. +// So +// log(x) = log(2^N f) = log(2^N) + log(f) = n*log(2) + log(f) +// +// To calculate log(f) we do following +// log(f) = log(f * frcpa(f) / frcpa(f)) = +// = log(f * frcpa(f)) + log(1/frcpa(f)) +// +// According to definition of IA-64's frcpa instruction it's a +// floating point that approximates 1/f using a lookup on the +// top of 8 bits of the input number's significand with relative +// error < 2^(-8.886). So we have following +// +// |(1/f - frcpa(f)) / (1/f))| = |1 - f*frcpa(f)| < 1/256 +// +// and +// +// log(f) = log(f * frcpa(f)) + log(1/frcpa(f)) = +// = log(1 + r) + T +// +// The first value can be computed by polynomial P(r) approximating +// log(1 + r) on |r| < 1/256 and the second is precomputed tabular +// value defined by top 8 bit of f. +// +// Finally we have that log(x) ~ (N*log(2) + T) + P(r) +// +// Note that if input argument is close to 1.0 (in our case it means +// that |1 - x| < 1/256) we can use just polynomial approximation +// because x = 2^0 * f = f = 1 + r and +// log(x) = log(1 + r) ~ P(r) +// +// +// To compute log10(x) we just use identity: +// +// log10(x) = log(x)/log(10) +// +// so we have that +// +// log10(x) = (N*log(2) + T + log(1+r)) / log(10) = +// = N*(log(2)/log(10)) + (T/log(10)) + log(1 + r)/log(10) +// +// +// Implementation +// -------------- +// It can be seen that formulas for log and log10 differ from one another +// only by coefficients and tabular values. Namely as log as log10 are +// calculated as (N*L1 + T) + L2*Series(r) where in case of log +// L1 = log(2) +// T = log(1/frcpa(x)) +// L2 = 1.0 +// and in case of log10 +// L1 = log(2)/log(10) +// T = log(1/frcpa(x))/log(10) +// L2 = 1.0/log(10) +// +// So common code with two different entry points those set pointers +// to the base address of coresponding data sets containing values +// of L2,T and prepare integer representation of L1 needed for following +// setf instruction can be used. +// +// Note that both log and log10 use common approximation polynomial +// it means we need only one set of coefficients of approximation. +// +// 1. Computation of log(x) for |x-1| >= 1/256 +// InvX = frcpa(x) +// r = InvX*x - 1 +// P(r) = r*((1 - A2*r) + r^2*(A3 - A4*r)) = r*P2(r), +// A4,A3,A2 are created with setf inctruction. +// We use Taylor series and so A4 = 1/4, A3 = 1/3, +// A2 = 1/2 rounded to double. +// +// N = float(n) where n is true unbiased exponent of x +// +// T is tabular value of log(1/frcpa(x)) calculated in quad precision +// and rounded to double. To T we get bits from 55 to 62 of register +// format significand of x and calculate address +// ad_T = table_base_addr + 8 * index +// +// L2 (1.0 or 1.0/log(10) depending on function) is calculated in quad +// precision and rounded to double; it's loaded from memory +// +// L1 (log(2) or log10(2) depending on function) is calculated in quad +// precision and rounded to double; it's created with setf. +// +// And final result = P2(r)*(r*L2) + (T + N*L1) +// +// +// 2. Computation of log(x) for |x-1| < 1/256 +// r = x - 1 +// P(r) = r*((1 - A2*r) + r^2*(A3 - A4*r)) = r*P2(r), +// A4,A3,A2 are the same as in case |x-1| >= 1/256 +// +// And final result = P2(r)*(r*L2) +// +// 3. How we define is input argument such that |x-1| < 1/256 or not. +// +// To do it we analyze biased exponent and significand of input argment. +// +// a) First we test is biased exponent equal to 0xFFFE or 0xFFFF (i.e. +// we test is 0.5 <= x < 2). This comparison can be performed using +// unsigned version of cmp instruction in such a way +// biased_exponent_of_x - 0xFFFE < 2 +// +// +// b) Second (in case when result of a) is true) we need to compare x +// with 1-1/256 and 1+1/256 or in register format representation with +// 0xFFFEFF00000000000000 and 0xFFFF8080000000000000 correspondingly. +// As far as biased exponent of x here can be equal only to 0xFFFE or +// 0xFFFF we need to test only last bit of it. Also signifigand always +// has implicit bit set to 1 that can be exluded from comparison. +// Thus it's quite enough to generate 64-bit integer bits of that are +// ix[63] = biased_exponent_of_x[0] and ix[62-0] = significand_of_x[62-0] +// and compare it with 0x7F00000000000000 and 0x80800000000000000 (those +// obtained like ix from register representatinos of 255/256 and +// 257/256). This comparison can be made like in a), using unsigned +// version of cmp i.e. ix - 0x7F00000000000000 < 0x0180000000000000. +// 0x0180000000000000 is difference between 0x80800000000000000 and +// 0x7F00000000000000. +// +// Note: NaT, any NaNs, +/-INF, +/-0, negatives and unnormalized numbers are +// filtered and processed on special branches. +// +// +// Special values +//============================================================== +// +// logf(+0) = -inf +// logf(-0) = -inf +// +// logf(+qnan) = +qnan +// logf(-qnan) = -qnan +// logf(+snan) = +qnan +// logf(-snan) = -qnan +// +// logf(-n) = QNAN Indefinite +// logf(-inf) = QNAN Indefinite +// +// logf(+inf) = +inf +// +// Registers used +//============================================================== +// Floating Point registers used: +// f8, input +// f12 -> f14, f33 -> f39 +// +// General registers used: +// r8 -> r11 +// r14 -> r19 +// +// Predicate registers used: +// p6 -> p12 + + +// Assembly macros +//============================================================== + +GR_TAG = r8 +GR_ad_T = r8 +GR_N = r9 +GR_Exp = r10 +GR_Sig = r11 + +GR_025 = r14 +GR_05 = r15 +GR_A3 = r16 +GR_Ind = r17 +GR_dx = r15 +GR_Ln2 = r19 +GR_de = r20 +GR_x = r21 +GR_xorg = r22 + +GR_SAVE_B0 = r33 +GR_SAVE_PFS = r34 +GR_SAVE_GP = r35 +GR_SAVE_SP = r36 + +GR_Parameter_X = r37 +GR_Parameter_Y = r38 +GR_Parameter_RESULT = r39 +GR_Parameter_TAG = r40 + + +FR_A2 = f12 +FR_A3 = f13 +FR_A4 = f14 + +FR_RcpX = f33 +FR_r = f34 +FR_r2 = f35 +FR_tmp = f35 +FR_Ln2 = f36 +FR_T = f37 +FR_N = f38 +FR_NxLn2pT = f38 +FR_NormX = f39 +FR_InvLn10 = f40 + + +FR_Y = f1 +FR_X = f10 +FR_RESULT = f8 + + +// Data tables +//============================================================== +RODATA +.align 16 +LOCAL_OBJECT_START(logf_data) +data8 0x3FF0000000000000 // 1.0 +// +// ln(1/frcpa(1+i/256)), i=0...255 +data8 0x3F60040155D5889E // 0 +data8 0x3F78121214586B54 // 1 +data8 0x3F841929F96832F0 // 2 +data8 0x3F8C317384C75F06 // 3 +data8 0x3F91A6B91AC73386 // 4 +data8 0x3F95BA9A5D9AC039 // 5 +data8 0x3F99D2A8074325F4 // 6 +data8 0x3F9D6B2725979802 // 7 +data8 0x3FA0C58FA19DFAAA // 8 +data8 0x3FA2954C78CBCE1B // 9 +data8 0x3FA4A94D2DA96C56 // 10 +data8 0x3FA67C94F2D4BB58 // 11 +data8 0x3FA85188B630F068 // 12 +data8 0x3FAA6B8ABE73AF4C // 13 +data8 0x3FAC441E06F72A9E // 14 +data8 0x3FAE1E6713606D07 // 15 +data8 0x3FAFFA6911AB9301 // 16 +data8 0x3FB0EC139C5DA601 // 17 +data8 0x3FB1DBD2643D190B // 18 +data8 0x3FB2CC7284FE5F1C // 19 +data8 0x3FB3BDF5A7D1EE64 // 20 +data8 0x3FB4B05D7AA012E0 // 21 +data8 0x3FB580DB7CEB5702 // 22 +data8 0x3FB674F089365A7A // 23 +data8 0x3FB769EF2C6B568D // 24 +data8 0x3FB85FD927506A48 // 25 +data8 0x3FB9335E5D594989 // 26 +data8 0x3FBA2B0220C8E5F5 // 27 +data8 0x3FBB0004AC1A86AC // 28 +data8 0x3FBBF968769FCA11 // 29 +data8 0x3FBCCFEDBFEE13A8 // 30 +data8 0x3FBDA727638446A2 // 31 +data8 0x3FBEA3257FE10F7A // 32 +data8 0x3FBF7BE9FEDBFDE6 // 33 +data8 0x3FC02AB352FF25F4 // 34 +data8 0x3FC097CE579D204D // 35 +data8 0x3FC1178E8227E47C // 36 +data8 0x3FC185747DBECF34 // 37 +data8 0x3FC1F3B925F25D41 // 38 +data8 0x3FC2625D1E6DDF57 // 39 +data8 0x3FC2D1610C86813A // 40 +data8 0x3FC340C59741142E // 41 +data8 0x3FC3B08B6757F2A9 // 42 +data8 0x3FC40DFB08378003 // 43 +data8 0x3FC47E74E8CA5F7C // 44 +data8 0x3FC4EF51F6466DE4 // 45 +data8 0x3FC56092E02BA516 // 46 +data8 0x3FC5D23857CD74D5 // 47 +data8 0x3FC6313A37335D76 // 48 +data8 0x3FC6A399DABBD383 // 49 +data8 0x3FC70337DD3CE41B // 50 +data8 0x3FC77654128F6127 // 51 +data8 0x3FC7E9D82A0B022D // 52 +data8 0x3FC84A6B759F512F // 53 +data8 0x3FC8AB47D5F5A310 // 54 +data8 0x3FC91FE49096581B // 55 +data8 0x3FC981634011AA75 // 56 +data8 0x3FC9F6C407089664 // 57 +data8 0x3FCA58E729348F43 // 58 +data8 0x3FCABB55C31693AD // 59 +data8 0x3FCB1E104919EFD0 // 60 +data8 0x3FCB94EE93E367CB // 61 +data8 0x3FCBF851C067555F // 62 +data8 0x3FCC5C0254BF23A6 // 63 +data8 0x3FCCC000C9DB3C52 // 64 +data8 0x3FCD244D99C85674 // 65 +data8 0x3FCD88E93FB2F450 // 66 +data8 0x3FCDEDD437EAEF01 // 67 +data8 0x3FCE530EFFE71012 // 68 +data8 0x3FCEB89A1648B971 // 69 +data8 0x3FCF1E75FADF9BDE // 70 +data8 0x3FCF84A32EAD7C35 // 71 +data8 0x3FCFEB2233EA07CD // 72 +data8 0x3FD028F9C7035C1C // 73 +data8 0x3FD05C8BE0D9635A // 74 +data8 0x3FD085EB8F8AE797 // 75 +data8 0x3FD0B9C8E32D1911 // 76 +data8 0x3FD0EDD060B78081 // 77 +data8 0x3FD122024CF0063F // 78 +data8 0x3FD14BE2927AECD4 // 79 +data8 0x3FD180618EF18ADF // 80 +data8 0x3FD1B50BBE2FC63B // 81 +data8 0x3FD1DF4CC7CF242D // 82 +data8 0x3FD214456D0EB8D4 // 83 +data8 0x3FD23EC5991EBA49 // 84 +data8 0x3FD2740D9F870AFB // 85 +data8 0x3FD29ECDABCDFA04 // 86 +data8 0x3FD2D46602ADCCEE // 87 +data8 0x3FD2FF66B04EA9D4 // 88 +data8 0x3FD335504B355A37 // 89 +data8 0x3FD360925EC44F5D // 90 +data8 0x3FD38BF1C3337E75 // 91 +data8 0x3FD3C25277333184 // 92 +data8 0x3FD3EDF463C1683E // 93 +data8 0x3FD419B423D5E8C7 // 94 +data8 0x3FD44591E0539F49 // 95 +data8 0x3FD47C9175B6F0AD // 96 +data8 0x3FD4A8B341552B09 // 97 +data8 0x3FD4D4F3908901A0 // 98 +data8 0x3FD501528DA1F968 // 99 +data8 0x3FD52DD06347D4F6 // 100 +data8 0x3FD55A6D3C7B8A8A // 101 +data8 0x3FD5925D2B112A59 // 102 +data8 0x3FD5BF406B543DB2 // 103 +data8 0x3FD5EC433D5C35AE // 104 +data8 0x3FD61965CDB02C1F // 105 +data8 0x3FD646A84935B2A2 // 106 +data8 0x3FD6740ADD31DE94 // 107 +data8 0x3FD6A18DB74A58C5 // 108 +data8 0x3FD6CF31058670EC // 109 +data8 0x3FD6F180E852F0BA // 110 +data8 0x3FD71F5D71B894F0 // 111 +data8 0x3FD74D5AEFD66D5C // 112 +data8 0x3FD77B79922BD37E // 113 +data8 0x3FD7A9B9889F19E2 // 114 +data8 0x3FD7D81B037EB6A6 // 115 +data8 0x3FD8069E33827231 // 116 +data8 0x3FD82996D3EF8BCB // 117 +data8 0x3FD85855776DCBFB // 118 +data8 0x3FD8873658327CCF // 119 +data8 0x3FD8AA75973AB8CF // 120 +data8 0x3FD8D992DC8824E5 // 121 +data8 0x3FD908D2EA7D9512 // 122 +data8 0x3FD92C59E79C0E56 // 123 +data8 0x3FD95BD750EE3ED3 // 124 +data8 0x3FD98B7811A3EE5B // 125 +data8 0x3FD9AF47F33D406C // 126 +data8 0x3FD9DF270C1914A8 // 127 +data8 0x3FDA0325ED14FDA4 // 128 +data8 0x3FDA33440224FA79 // 129 +data8 0x3FDA57725E80C383 // 130 +data8 0x3FDA87D0165DD199 // 131 +data8 0x3FDAAC2E6C03F896 // 132 +data8 0x3FDADCCC6FDF6A81 // 133 +data8 0x3FDB015B3EB1E790 // 134 +data8 0x3FDB323A3A635948 // 135 +data8 0x3FDB56FA04462909 // 136 +data8 0x3FDB881AA659BC93 // 137 +data8 0x3FDBAD0BEF3DB165 // 138 +data8 0x3FDBD21297781C2F // 139 +data8 0x3FDC039236F08819 // 140 +data8 0x3FDC28CB1E4D32FD // 141 +data8 0x3FDC4E19B84723C2 // 142 +data8 0x3FDC7FF9C74554C9 // 143 +data8 0x3FDCA57B64E9DB05 // 144 +data8 0x3FDCCB130A5CEBB0 // 145 +data8 0x3FDCF0C0D18F326F // 146 +data8 0x3FDD232075B5A201 // 147 +data8 0x3FDD490246DEFA6B // 148 +data8 0x3FDD6EFA918D25CD // 149 +data8 0x3FDD9509707AE52F // 150 +data8 0x3FDDBB2EFE92C554 // 151 +data8 0x3FDDEE2F3445E4AF // 152 +data8 0x3FDE148A1A2726CE // 153 +data8 0x3FDE3AFC0A49FF40 // 154 +data8 0x3FDE6185206D516E // 155 +data8 0x3FDE882578823D52 // 156 +data8 0x3FDEAEDD2EAC990C // 157 +data8 0x3FDED5AC5F436BE3 // 158 +data8 0x3FDEFC9326D16AB9 // 159 +data8 0x3FDF2391A2157600 // 160 +data8 0x3FDF4AA7EE03192D // 161 +data8 0x3FDF71D627C30BB0 // 162 +data8 0x3FDF991C6CB3B379 // 163 +data8 0x3FDFC07ADA69A910 // 164 +data8 0x3FDFE7F18EB03D3E // 165 +data8 0x3FE007C053C5002E // 166 +data8 0x3FE01B942198A5A1 // 167 +data8 0x3FE02F74400C64EB // 168 +data8 0x3FE04360BE7603AD // 169 +data8 0x3FE05759AC47FE34 // 170 +data8 0x3FE06B5F1911CF52 // 171 +data8 0x3FE078BF0533C568 // 172 +data8 0x3FE08CD9687E7B0E // 173 +data8 0x3FE0A10074CF9019 // 174 +data8 0x3FE0B5343A234477 // 175 +data8 0x3FE0C974C89431CE // 176 +data8 0x3FE0DDC2305B9886 // 177 +data8 0x3FE0EB524BAFC918 // 178 +data8 0x3FE0FFB54213A476 // 179 +data8 0x3FE114253DA97D9F // 180 +data8 0x3FE128A24F1D9AFF // 181 +data8 0x3FE1365252BF0865 // 182 +data8 0x3FE14AE558B4A92D // 183 +data8 0x3FE15F85A19C765B // 184 +data8 0x3FE16D4D38C119FA // 185 +data8 0x3FE18203C20DD133 // 186 +data8 0x3FE196C7BC4B1F3B // 187 +data8 0x3FE1A4A738B7A33C // 188 +data8 0x3FE1B981C0C9653D // 189 +data8 0x3FE1CE69E8BB106B // 190 +data8 0x3FE1DC619DE06944 // 191 +data8 0x3FE1F160A2AD0DA4 // 192 +data8 0x3FE2066D7740737E // 193 +data8 0x3FE2147DBA47A394 // 194 +data8 0x3FE229A1BC5EBAC3 // 195 +data8 0x3FE237C1841A502E // 196 +data8 0x3FE24CFCE6F80D9A // 197 +data8 0x3FE25B2C55CD5762 // 198 +data8 0x3FE2707F4D5F7C41 // 199 +data8 0x3FE285E0842CA384 // 200 +data8 0x3FE294294708B773 // 201 +data8 0x3FE2A9A2670AFF0C // 202 +data8 0x3FE2B7FB2C8D1CC1 // 203 +data8 0x3FE2C65A6395F5F5 // 204 +data8 0x3FE2DBF557B0DF43 // 205 +data8 0x3FE2EA64C3F97655 // 206 +data8 0x3FE3001823684D73 // 207 +data8 0x3FE30E97E9A8B5CD // 208 +data8 0x3FE32463EBDD34EA // 209 +data8 0x3FE332F4314AD796 // 210 +data8 0x3FE348D90E7464D0 // 211 +data8 0x3FE35779F8C43D6E // 212 +data8 0x3FE36621961A6A99 // 213 +data8 0x3FE37C299F3C366A // 214 +data8 0x3FE38AE2171976E7 // 215 +data8 0x3FE399A157A603E7 // 216 +data8 0x3FE3AFCCFE77B9D1 // 217 +data8 0x3FE3BE9D503533B5 // 218 +data8 0x3FE3CD7480B4A8A3 // 219 +data8 0x3FE3E3C43918F76C // 220 +data8 0x3FE3F2ACB27ED6C7 // 221 +data8 0x3FE4019C2125CA93 // 222 +data8 0x3FE4181061389722 // 223 +data8 0x3FE42711518DF545 // 224 +data8 0x3FE436194E12B6BF // 225 +data8 0x3FE445285D68EA69 // 226 +data8 0x3FE45BCC464C893A // 227 +data8 0x3FE46AED21F117FC // 228 +data8 0x3FE47A1527E8A2D3 // 229 +data8 0x3FE489445EFFFCCC // 230 +data8 0x3FE4A018BCB69835 // 231 +data8 0x3FE4AF5A0C9D65D7 // 232 +data8 0x3FE4BEA2A5BDBE87 // 233 +data8 0x3FE4CDF28F10AC46 // 234 +data8 0x3FE4DD49CF994058 // 235 +data8 0x3FE4ECA86E64A684 // 236 +data8 0x3FE503C43CD8EB68 // 237 +data8 0x3FE513356667FC57 // 238 +data8 0x3FE522AE0738A3D8 // 239 +data8 0x3FE5322E26867857 // 240 +data8 0x3FE541B5CB979809 // 241 +data8 0x3FE55144FDBCBD62 // 242 +data8 0x3FE560DBC45153C7 // 243 +data8 0x3FE5707A26BB8C66 // 244 +data8 0x3FE587F60ED5B900 // 245 +data8 0x3FE597A7977C8F31 // 246 +data8 0x3FE5A760D634BB8B // 247 +data8 0x3FE5B721D295F10F // 248 +data8 0x3FE5C6EA94431EF9 // 249 +data8 0x3FE5D6BB22EA86F6 // 250 +data8 0x3FE5E6938645D390 // 251 +data8 0x3FE5F673C61A2ED2 // 252 +data8 0x3FE6065BEA385926 // 253 +data8 0x3FE6164BFA7CC06B // 254 +data8 0x3FE62643FECF9743 // 255 +LOCAL_OBJECT_END(logf_data) + +LOCAL_OBJECT_START(log10f_data) +data8 0x3FDBCB7B1526E50E // 1/ln(10) +// +// ln(1/frcpa(1+i/256))/ln(10), i=0...255 +data8 0x3F4BD27045BFD025 // 0 +data8 0x3F64E84E793A474A // 1 +data8 0x3F7175085AB85FF0 // 2 +data8 0x3F787CFF9D9147A5 // 3 +data8 0x3F7EA9D372B89FC8 // 4 +data8 0x3F82DF9D95DA961C // 5 +data8 0x3F866DF172D6372C // 6 +data8 0x3F898D79EF5EEDF0 // 7 +data8 0x3F8D22ADF3F9579D // 8 +data8 0x3F9024231D30C398 // 9 +data8 0x3F91F23A98897D4A // 10 +data8 0x3F93881A7B818F9E // 11 +data8 0x3F951F6E1E759E35 // 12 +data8 0x3F96F2BCE7ADC5B4 // 13 +data8 0x3F988D362CDF359E // 14 +data8 0x3F9A292BAF010982 // 15 +data8 0x3F9BC6A03117EB97 // 16 +data8 0x3F9D65967DE3AB09 // 17 +data8 0x3F9F061167FC31E8 // 18 +data8 0x3FA05409E4F7819C // 19 +data8 0x3FA125D0432EA20E // 20 +data8 0x3FA1F85D440D299B // 21 +data8 0x3FA2AD755749617D // 22 +data8 0x3FA381772A00E604 // 23 +data8 0x3FA45643E165A70B // 24 +data8 0x3FA52BDD034475B8 // 25 +data8 0x3FA5E3966B7E9295 // 26 +data8 0x3FA6BAAF47C5B245 // 27 +data8 0x3FA773B3E8C4F3C8 // 28 +data8 0x3FA84C51EBEE8D15 // 29 +data8 0x3FA906A6786FC1CB // 30 +data8 0x3FA9C197ABF00DD7 // 31 +data8 0x3FAA9C78712191F7 // 32 +data8 0x3FAB58C09C8D637C // 33 +data8 0x3FAC15A8BCDD7B7E // 34 +data8 0x3FACD331E2C2967C // 35 +data8 0x3FADB11ED766ABF4 // 36 +data8 0x3FAE70089346A9E6 // 37 +data8 0x3FAF2F96C6754AEE // 38 +data8 0x3FAFEFCA8D451FD6 // 39 +data8 0x3FB0585283764178 // 40 +data8 0x3FB0B913AAC7D3A7 // 41 +data8 0x3FB11A294F2569F6 // 42 +data8 0x3FB16B51A2696891 // 43 +data8 0x3FB1CD03ADACC8BE // 44 +data8 0x3FB22F0BDD7745F5 // 45 +data8 0x3FB2916ACA38D1E8 // 46 +data8 0x3FB2F4210DF7663D // 47 +data8 0x3FB346A6C3C49066 // 48 +data8 0x3FB3A9FEBC60540A // 49 +data8 0x3FB3FD0C10A3AA54 // 50 +data8 0x3FB46107D3540A82 // 51 +data8 0x3FB4C55DD16967FE // 52 +data8 0x3FB51940330C000B // 53 +data8 0x3FB56D620EE7115E // 54 +data8 0x3FB5D2ABCF26178E // 55 +data8 0x3FB6275AA5DEBF81 // 56 +data8 0x3FB68D4EAF26D7EE // 57 +data8 0x3FB6E28C5C54A28D // 58 +data8 0x3FB7380B9665B7C8 // 59 +data8 0x3FB78DCCC278E85B // 60 +data8 0x3FB7F50C2CF2557A // 61 +data8 0x3FB84B5FD5EAEFD8 // 62 +data8 0x3FB8A1F6BAB2B226 // 63 +data8 0x3FB8F8D144557BDF // 64 +data8 0x3FB94FEFDCD61D92 // 65 +data8 0x3FB9A752EF316149 // 66 +data8 0x3FB9FEFAE7611EE0 // 67 +data8 0x3FBA56E8325F5C87 // 68 +data8 0x3FBAAF1B3E297BB4 // 69 +data8 0x3FBB079479C372AD // 70 +data8 0x3FBB6054553B12F7 // 71 +data8 0x3FBBB95B41AB5CE6 // 72 +data8 0x3FBC12A9B13FE079 // 73 +data8 0x3FBC6C4017382BEA // 74 +data8 0x3FBCB41FBA42686D // 75 +data8 0x3FBD0E38CE73393F // 76 +data8 0x3FBD689B2193F133 // 77 +data8 0x3FBDC3472B1D2860 // 78 +data8 0x3FBE0C06300D528B // 79 +data8 0x3FBE6738190E394C // 80 +data8 0x3FBEC2B50D208D9B // 81 +data8 0x3FBF0C1C2B936828 // 82 +data8 0x3FBF68216C9CC727 // 83 +data8 0x3FBFB1F6381856F4 // 84 +data8 0x3FC00742AF4CE5F8 // 85 +data8 0x3FC02C64906512D2 // 86 +data8 0x3FC05AF1E63E03B4 // 87 +data8 0x3FC0804BEA723AA9 // 88 +data8 0x3FC0AF1FD6711527 // 89 +data8 0x3FC0D4B2A8805A00 // 90 +data8 0x3FC0FA5EF136A06C // 91 +data8 0x3FC1299A4FB3E306 // 92 +data8 0x3FC14F806253C3ED // 93 +data8 0x3FC175805D1587C1 // 94 +data8 0x3FC19B9A637CA295 // 95 +data8 0x3FC1CB5FC26EDE17 // 96 +data8 0x3FC1F1B4E65F2590 // 97 +data8 0x3FC218248B5DC3E5 // 98 +data8 0x3FC23EAED62ADC76 // 99 +data8 0x3FC26553EBD337BD // 100 +data8 0x3FC28C13F1B11900 // 101 +data8 0x3FC2BCAA14381386 // 102 +data8 0x3FC2E3A740B7800F // 103 +data8 0x3FC30ABFD8F333B6 // 104 +data8 0x3FC331F403985097 // 105 +data8 0x3FC35943E7A60690 // 106 +data8 0x3FC380AFAC6E7C07 // 107 +data8 0x3FC3A8377997B9E6 // 108 +data8 0x3FC3CFDB771C9ADB // 109 +data8 0x3FC3EDA90D39A5DF // 110 +data8 0x3FC4157EC09505CD // 111 +data8 0x3FC43D7113FB04C1 // 112 +data8 0x3FC4658030AD1CCF // 113 +data8 0x3FC48DAC404638F6 // 114 +data8 0x3FC4B5F56CBBB869 // 115 +data8 0x3FC4DE5BE05E7583 // 116 +data8 0x3FC4FCBC0776FD85 // 117 +data8 0x3FC525561E9256EE // 118 +data8 0x3FC54E0DF3198865 // 119 +data8 0x3FC56CAB7112BDE2 // 120 +data8 0x3FC59597BA735B15 // 121 +data8 0x3FC5BEA23A506FDA // 122 +data8 0x3FC5DD7E08DE382F // 123 +data8 0x3FC606BDD3F92355 // 124 +data8 0x3FC6301C518A501F // 125 +data8 0x3FC64F3770618916 // 126 +data8 0x3FC678CC14C1E2D8 // 127 +data8 0x3FC6981005ED2947 // 128 +data8 0x3FC6C1DB5F9BB336 // 129 +data8 0x3FC6E1488ECD2881 // 130 +data8 0x3FC70B4B2E7E41B9 // 131 +data8 0x3FC72AE209146BF9 // 132 +data8 0x3FC7551C81BD8DCF // 133 +data8 0x3FC774DD76CC43BE // 134 +data8 0x3FC79F505DB00E88 // 135 +data8 0x3FC7BF3BDE099F30 // 136 +data8 0x3FC7E9E7CAC437F9 // 137 +data8 0x3FC809FE4902D00D // 138 +data8 0x3FC82A2757995CBE // 139 +data8 0x3FC85525C625E098 // 140 +data8 0x3FC8757A79831887 // 141 +data8 0x3FC895E2058D8E03 // 142 +data8 0x3FC8C13437695532 // 143 +data8 0x3FC8E1C812EF32BE // 144 +data8 0x3FC9026F112197E8 // 145 +data8 0x3FC923294888880B // 146 +data8 0x3FC94EEA4B8334F3 // 147 +data8 0x3FC96FD1B639FC09 // 148 +data8 0x3FC990CCA66229AC // 149 +data8 0x3FC9B1DB33334843 // 150 +data8 0x3FC9D2FD740E6607 // 151 +data8 0x3FC9FF49EEDCB553 // 152 +data8 0x3FCA209A84FBCFF8 // 153 +data8 0x3FCA41FF1E43F02B // 154 +data8 0x3FCA6377D2CE9378 // 155 +data8 0x3FCA8504BAE0D9F6 // 156 +data8 0x3FCAA6A5EEEBEFE3 // 157 +data8 0x3FCAC85B878D7879 // 158 +data8 0x3FCAEA259D8FFA0B // 159 +data8 0x3FCB0C0449EB4B6B // 160 +data8 0x3FCB2DF7A5C50299 // 161 +data8 0x3FCB4FFFCA70E4D1 // 162 +data8 0x3FCB721CD17157E3 // 163 +data8 0x3FCB944ED477D4ED // 164 +data8 0x3FCBB695ED655C7D // 165 +data8 0x3FCBD8F2364AEC0F // 166 +data8 0x3FCBFB63C969F4FF // 167 +data8 0x3FCC1DEAC134D4E9 // 168 +data8 0x3FCC4087384F4F80 // 169 +data8 0x3FCC6339498F09E2 // 170 +data8 0x3FCC86010FFC076C // 171 +data8 0x3FCC9D3D065C5B42 // 172 +data8 0x3FCCC029375BA07A // 173 +data8 0x3FCCE32B66978BA4 // 174 +data8 0x3FCD0643AFD51404 // 175 +data8 0x3FCD29722F0DEA45 // 176 +data8 0x3FCD4CB70070FE44 // 177 +data8 0x3FCD6446AB3F8C96 // 178 +data8 0x3FCD87B0EF71DB45 // 179 +data8 0x3FCDAB31D1FE99A7 // 180 +data8 0x3FCDCEC96FDC888F // 181 +data8 0x3FCDE6908876357A // 182 +data8 0x3FCE0A4E4A25C200 // 183 +data8 0x3FCE2E2315755E33 // 184 +data8 0x3FCE461322D1648A // 185 +data8 0x3FCE6A0E95C7787B // 186 +data8 0x3FCE8E216243DD60 // 187 +data8 0x3FCEA63AF26E007C // 188 +data8 0x3FCECA74ED15E0B7 // 189 +data8 0x3FCEEEC692CCD25A // 190 +data8 0x3FCF070A36B8D9C1 // 191 +data8 0x3FCF2B8393E34A2D // 192 +data8 0x3FCF5014EF538A5B // 193 +data8 0x3FCF68833AF1B180 // 194 +data8 0x3FCF8D3CD9F3F04F // 195 +data8 0x3FCFA5C61ADD93E9 // 196 +data8 0x3FCFCAA8567EBA7A // 197 +data8 0x3FCFE34CC8743DD8 // 198 +data8 0x3FD0042BFD74F519 // 199 +data8 0x3FD016BDF6A18017 // 200 +data8 0x3FD023262F907322 // 201 +data8 0x3FD035CCED8D32A1 // 202 +data8 0x3FD042430E869FFC // 203 +data8 0x3FD04EBEC842B2E0 // 204 +data8 0x3FD06182E84FD4AC // 205 +data8 0x3FD06E0CB609D383 // 206 +data8 0x3FD080E60BEC8F12 // 207 +data8 0x3FD08D7E0D894735 // 208 +data8 0x3FD0A06CC96A2056 // 209 +data8 0x3FD0AD131F3B3C55 // 210 +data8 0x3FD0C01771E775FB // 211 +data8 0x3FD0CCCC3CAD6F4B // 212 +data8 0x3FD0D986D91A34A9 // 213 +data8 0x3FD0ECA9B8861A2D // 214 +data8 0x3FD0F972F87FF3D6 // 215 +data8 0x3FD106421CF0E5F7 // 216 +data8 0x3FD11983EBE28A9D // 217 +data8 0x3FD12661E35B785A // 218 +data8 0x3FD13345D2779D3B // 219 +data8 0x3FD146A6F597283A // 220 +data8 0x3FD15399E81EA83D // 221 +data8 0x3FD16092E5D3A9A6 // 222 +data8 0x3FD17413C3B7AB5E // 223 +data8 0x3FD1811BF629D6FB // 224 +data8 0x3FD18E2A47B46686 // 225 +data8 0x3FD19B3EBE1A4418 // 226 +data8 0x3FD1AEE9017CB450 // 227 +data8 0x3FD1BC0CED7134E2 // 228 +data8 0x3FD1C93712ABC7FF // 229 +data8 0x3FD1D66777147D3F // 230 +data8 0x3FD1EA3BD1286E1C // 231 +data8 0x3FD1F77BED932C4C // 232 +data8 0x3FD204C25E1B031F // 233 +data8 0x3FD2120F28CE69B1 // 234 +data8 0x3FD21F6253C48D01 // 235 +data8 0x3FD22CBBE51D60AA // 236 +data8 0x3FD240CE4C975444 // 237 +data8 0x3FD24E37F8ECDAE8 // 238 +data8 0x3FD25BA8215AF7FC // 239 +data8 0x3FD2691ECC29F042 // 240 +data8 0x3FD2769BFFAB2E00 // 241 +data8 0x3FD2841FC23952C9 // 242 +data8 0x3FD291AA1A384978 // 243 +data8 0x3FD29F3B0E15584B // 244 +data8 0x3FD2B3A0EE479DF7 // 245 +data8 0x3FD2C142842C09E6 // 246 +data8 0x3FD2CEEACCB7BD6D // 247 +data8 0x3FD2DC99CE82FF21 // 248 +data8 0x3FD2EA4F902FD7DA // 249 +data8 0x3FD2F80C186A25FD // 250 +data8 0x3FD305CF6DE7B0F7 // 251 +data8 0x3FD3139997683CE7 // 252 +data8 0x3FD3216A9BB59E7C // 253 +data8 0x3FD32F4281A3CEFF // 254 +data8 0x3FD33D2150110092 // 255 +LOCAL_OBJECT_END(log10f_data) + + +// Code +//============================================================== +.section .text + +// logf has p13 true, p14 false +// log10f has p14 true, p13 false + +GLOBAL_IEEE754_ENTRY(log10f) +{ .mfi + getf.exp GR_Exp = f8 // if x is unorm then must recompute + frcpa.s1 FR_RcpX,p0 = f1,f8 + mov GR_05 = 0xFFFE // biased exponent of A2=0.5 +} +{ .mlx + addl GR_ad_T = @ltoff(log10f_data),gp + movl GR_A3 = 0x3FD5555555555555 // double precision memory + // representation of A3 +};; +{ .mfi + getf.sig GR_Sig = f8 // if x is unorm then must recompute + fclass.m p8,p0 = f8,9 // is x positive unorm? + sub GR_025 = GR_05,r0,1 // biased exponent of A4=0.25 +} +{ .mlx + ld8 GR_ad_T = [GR_ad_T] + movl GR_Ln2 = 0x3FD34413509F79FF // double precision memory + // representation of + // log(2)/ln(10) +};; +{ .mfi + setf.d FR_A3 = GR_A3 // create A3 + fcmp.eq.s1 p14,p13 = f0,f0 // set p14 to 1 for log10f + dep.z GR_xorg = GR_05,55,8 // 0x7F00000000000000 integer number + // bits of that are + // GR_xorg[63] = last bit of biased + // exponent of 255/256 + // GR_xorg[62-0] = bits from 62 to 0 + // of significand of 255/256 +} +{ .mib + setf.exp FR_A2 = GR_05 // create A2 + sub GR_de = GR_Exp,GR_05 // biased_exponent_of_x - 0xFFFE + // needed to comparion with 0.5 and 2.0 + br.cond.sptk logf_log10f_common +};; +GLOBAL_IEEE754_END(log10f) + +GLOBAL_IEEE754_ENTRY(logf) +{ .mfi + getf.exp GR_Exp = f8 // if x is unorm then must recompute + frcpa.s1 FR_RcpX,p0 = f1,f8 + mov GR_05 = 0xFFFE // biased exponent of A2=-0.5 +} +{ .mlx + addl GR_ad_T = @ltoff(logf_data),gp + movl GR_A3 = 0x3FD5555555555555 // double precision memory + // representation of A3 +};; +{ .mfi + getf.sig GR_Sig = f8 // if x is unorm then must recompute + fclass.m p8,p0 = f8,9 // is x positive unorm? + dep.z GR_xorg = GR_05,55,8 // 0x7F00000000000000 integer number + // bits of that are + // GR_xorg[63] = last bit of biased + // exponent of 255/256 + // GR_xorg[62-0] = bits from 62 to 0 + // of significand of 255/256 +} +{ .mfi + ld8 GR_ad_T = [GR_ad_T] + nop.f 0 + sub GR_025 = GR_05,r0,1 // biased exponent of A4=0.25 +};; +{ .mfi + setf.d FR_A3 = GR_A3 // create A3 + fcmp.eq.s1 p13,p14 = f0,f0 // p13 - true for logf + sub GR_de = GR_Exp,GR_05 // biased_exponent_of_x - 0xFFFE + // needed to comparion with 0.5 and 2.0 +} +{ .mlx + setf.exp FR_A2 = GR_05 // create A2 + movl GR_Ln2 = 0x3FE62E42FEFA39EF // double precision memory + // representation of log(2) +};; +logf_log10f_common: +{ .mfi + setf.exp FR_A4 = GR_025 // create A4=0.25 + fclass.m p9,p0 = f8,0x3A // is x < 0 (including negateve unnormals)? + dep GR_x = GR_Exp,GR_Sig,63,1 // produce integer that bits are + // GR_x[63] = GR_Exp[0] + // GR_x[62-0] = GR_Sig[62-0] +} +{ .mib + sub GR_N = GR_Exp,GR_05,1 // unbiased exponent of x + cmp.gtu p6,p7 = 2,GR_de // is 0.5 <= x < 2.0? +(p8) br.cond.spnt logf_positive_unorm +};; +logf_core: +{ .mfi + setf.sig FR_N = GR_N // copy unbiased exponent of x to the + // significand field of FR_N + fclass.m p10,p0 = f8,0x1E1 // is x NaN, NaT or +Inf? + dep.z GR_dx = GR_05,54,3 // 0x0180000000000000 - difference + // between our integer representations + // of 257/256 and 255/256 +} +{ .mfi + nop.m 0 + nop.f 0 + sub GR_x = GR_x,GR_xorg // difference between representations + // of x and 255/256 +};; +{ .mfi + ldfd FR_InvLn10 = [GR_ad_T],8 + fcmp.eq.s1 p11,p0 = f8,f1 // is x equal to 1.0? + extr.u GR_Ind = GR_Sig,55,8 // get bits from 55 to 62 as index +} +{ .mib + setf.d FR_Ln2 = GR_Ln2 // create log(2) or log10(2) +(p6) cmp.gtu p6,p7 = GR_dx,GR_x // set p6 if 255/256 <= x < 257/256 +(p9) br.cond.spnt logf_negatives // jump if input argument is negative number +};; +// p6 is true if |x-1| < 1/256 +// p7 is true if |x-1| >= 1/256 +.pred.rel "mutex",p6,p7 +{ .mfi + shladd GR_ad_T = GR_Ind,3,GR_ad_T // calculate address of T +(p7) fms.s1 FR_r = FR_RcpX,f8,f1 // range reduction for |x-1|>=1/256 + extr.u GR_Exp = GR_Exp,0,17 // exponent without sign +} +{ .mfb + nop.m 0 +(p6) fms.s1 FR_r = f8,f1,f1 // range reduction for |x-1|<1/256 +(p10) br.cond.spnt logf_nan_nat_pinf // exit for NaN, NaT or +Inf +};; +{ .mfb + ldfd FR_T = [GR_ad_T] // load T +(p11) fma.s.s0 f8 = f0,f0,f0 +(p11) br.ret.spnt b0 // exit for x = 1.0 +};; +{ .mib + nop.m 0 + cmp.eq p12,p0 = r0,GR_Exp // is x +/-0? (here it's quite enough + // only to compare exponent with 0 + // because all unnormals already + // have been filtered) +(p12) br.cond.spnt logf_zeroes // Branch if input argument is +/-0 +};; +{ .mfi + nop.m 0 + fnma.s1 FR_A2 = FR_A2,FR_r,f1 // A2*r+1 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r2 = FR_r,FR_r,f0 // r^2 + nop.i 0 +};; +{ .mfi + nop.m 0 + fcvt.xf FR_N = FR_N // convert integer N in significand of FR_N + // to floating-point representation + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 FR_A3 = FR_A4,FR_r,FR_A3 // A4*r+A3 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_r = FR_r,FR_InvLn10,f0 // For log10f we have r/log(10) + nop.i 0 +} +{ .mfi + nop.m 0 + nop.f 0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A2 = FR_A3,FR_r2,FR_A2 // (A4*r+A3)*r^2+(A2*r+1) + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_NxLn2pT = FR_N,FR_Ln2,FR_T // N*Ln2+T + nop.i 0 +};; +.pred.rel "mutex",p6,p7 +{ .mfi + nop.m 0 +(p7) fma.s.s0 f8 = FR_A2,FR_r,FR_NxLn2pT // result for |x-1|>=1/256 + nop.i 0 +} +{ .mfb + nop.m 0 +(p6) fma.s.s0 f8 = FR_A2,FR_r,f0 // result for |x-1|<1/256 + br.ret.sptk b0 +};; + +.align 32 +logf_positive_unorm: +{ .mfi + nop.m 0 +(p8) fma.s0 f8 = f8,f1,f0 // Normalize & set D-flag + nop.i 0 +};; +{ .mfi + getf.exp GR_Exp = f8 // recompute biased exponent + nop.f 0 + cmp.ne p6,p7 = r0,r0 // p6 <- 0, p7 <- 1 because + // in case of unorm we are out + // interval [255/256; 257/256] +};; +{ .mfi + getf.sig GR_Sig = f8 // recompute significand + nop.f 0 + nop.i 0 +};; +{ .mib + sub GR_N = GR_Exp,GR_05,1 // unbiased exponent N + nop.i 0 + br.cond.sptk logf_core // return into main path +};; + +.align 32 +logf_nan_nat_pinf: +{ .mfi + nop.m 0 + fma.s.s0 f8 = f8,f1,f0 // set V-flag + nop.i 0 +} +{ .mfb + nop.m 0 + nop.f 0 + br.ret.sptk b0 // exit for NaN, NaT or +Inf +};; + +.align 32 +logf_zeroes: +{ .mfi + nop.m 0 + fmerge.s FR_X = f8,f8 // keep input argument for subsequent + // call of __libm_error_support# + nop.i 0 +} +{ .mfi +(p13) mov GR_TAG = 4 // set libm error in case of logf + fms.s1 FR_tmp = f0,f0,f1 // -1.0 + nop.i 0 +};; +{ .mfi + nop.m 0 + frcpa.s0 f8,p0 = FR_tmp,f0 // log(+/-0) should be equal to -INF. + // We can get it using frcpa because it + // sets result to the IEEE-754 mandated + // quotient of FR_tmp/f0. + // As far as FR_tmp is -1 it'll be -INF + nop.i 0 +} +{ .mib +(p14) mov GR_TAG = 10 // set libm error in case of log10f + nop.i 0 + br.cond.sptk logf_libm_err +};; + +.align 32 +logf_negatives: +{ .mfi +(p13) mov GR_TAG = 5 // set libm error in case of logf + fmerge.s FR_X = f8,f8 // keep input argument for subsequent + // call of __libm_error_support# + nop.i 0 +};; +{ .mfi +(p14) mov GR_TAG = 11 // set libm error in case of log10f + frcpa.s0 f8,p0 = f0,f0 // log(negatives) should be equal to NaN. + // We can get it using frcpa because it + // sets result to the IEEE-754 mandated + // quotient of f0/f0 i.e. NaN. + nop.i 0 +};; + +.align 32 +logf_libm_err: +{ .mmi + alloc r32 = ar.pfs,1,4,4,0 + mov GR_Parameter_TAG = GR_TAG + nop.i 0 +};; +GLOBAL_IEEE754_END(logf) + + +// Stack operations when calling error support. +// (1) (2) (3) (call) (4) +// sp -> + psp -> + psp -> + sp -> + +// | | | | +// | | <- GR_Y R3 ->| <- GR_RESULT | -> f8 +// | | | | +// | <-GR_Y Y2->| Y2 ->| <- GR_Y | +// | | | | +// | | <- GR_X X1 ->| | +// | | | | +// sp-64 -> + sp -> + sp -> + + +// save ar.pfs save b0 restore gp +// save gp restore ar.pfs + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfs [GR_Parameter_Y] = FR_Y,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; +.body +{ .mib + stfs [GR_Parameter_X] = FR_X // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfs [GR_Parameter_Y] = FR_RESULT // STORE Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + nop.m 0 + nop.m 0 + add GR_Parameter_RESULT = 48,sp +};; +{ .mmi + ldfs f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) + +.type __libm_error_support#,@function +.global __libm_error_support# + diff --git a/sysdeps/ia64/fpu/e_logl.S b/sysdeps/ia64/fpu/e_logl.S new file mode 100644 index 0000000000..3ebb20a632 --- /dev/null +++ b/sysdeps/ia64/fpu/e_logl.S @@ -0,0 +1,1200 @@ +.file "logl.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +//********************************************************************* +// +// History: +// 05/21/01 Extracted logl and log10l from log1pl.s file, and optimized +// all paths. +// 06/20/01 Fixed error tag for x=-inf. +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align; +// used data8 for long double table values +// +//********************************************************************* +// +//********************************************************************* +// +// Function: Combined logl(x) and log10l(x) where +// logl(x) = ln(x), for double-extended precision x values +// log10l(x) = log (x), for double-extended precision x values +// 10 +// +//********************************************************************* +// +// Resources Used: +// +// Floating-Point Registers: f8 (Input and Return Value) +// f34-f76 +// +// General Purpose Registers: +// r32-r56 +// r53-r56 (Used to pass arguments to error handling routine) +// +// Predicate Registers: p6-p14 +// +//********************************************************************* +// +// IEEE Special Conditions: +// +// Denormal fault raised on denormal inputs +// Overflow exceptions cannot occur +// Underflow exceptions raised when appropriate for log1p +// (Error Handling Routine called for underflow) +// Inexact raised when appropriate by algorithm +// +// logl(inf) = inf +// logl(-inf) = QNaN +// logl(+/-0) = -inf +// logl(SNaN) = QNaN +// logl(QNaN) = QNaN +// logl(EM_special Values) = QNaN +// log10l(inf) = inf +// log10l(-inf) = QNaN +// log10l(+/-0) = -inf +// log10l(SNaN) = QNaN +// log10l(QNaN) = QNaN +// log10l(EM_special Values) = QNaN +// +//********************************************************************* +// +// Overview +// +// The method consists of two cases. +// +// If |X-1| < 2^(-7) use case log_near1; +// else use case log_regular; +// +// Case log_near1: +// +// logl( 1 + X ) can be approximated by a simple polynomial +// in W = X-1. This polynomial resembles the truncated Taylor +// series W - W^/2 + W^3/3 - ... +// +// Case log_regular: +// +// Here we use a table lookup method. The basic idea is that in +// order to compute logl(Arg) for an argument Arg in [1,2), we +// construct a value G such that G*Arg is close to 1 and that +// logl(1/G) is obtainable easily from a table of values calculated +// beforehand. Thus +// +// logl(Arg) = logl(1/G) + logl(G*Arg) +// = logl(1/G) + logl(1 + (G*Arg - 1)) +// +// Because |G*Arg - 1| is small, the second term on the right hand +// side can be approximated by a short polynomial. We elaborate +// this method in four steps. +// +// Step 0: Initialization +// +// We need to calculate logl( X ). Obtain N, S_hi such that +// +// X = 2^N * S_hi exactly +// +// where S_hi in [1,2) +// +// Step 1: Argument Reduction +// +// Based on S_hi, obtain G_1, G_2, G_3 from a table and calculate +// +// G := G_1 * G_2 * G_3 +// r := (G * S_hi - 1) +// +// These G_j's have the property that the product is exactly +// representable and that |r| < 2^(-12) as a result. +// +// Step 2: Approximation +// +// +// logl(1 + r) is approximated by a short polynomial poly(r). +// +// Step 3: Reconstruction +// +// +// Finally, logl( X ) is given by +// +// logl( X ) = logl( 2^N * S_hi ) +// ~=~ N*logl(2) + logl(1/G) + logl(1 + r) +// ~=~ N*logl(2) + logl(1/G) + poly(r). +// +// **** Algorithm **** +// +// Case log_near1: +// +// Here we compute a simple polynomial. To exploit parallelism, we split +// the polynomial into two portions. +// +// W := X - 1 +// Wsq := W * W +// W4 := Wsq*Wsq +// W6 := W4*Wsq +// Y_hi := W + Wsq*(P_1 + W*(P_2 + W*(P_3 + W*P_4)) +// Y_lo := W6*(P_5 + W*(P_6 + W*(P_7 + W*P_8))) +// +// Case log_regular: +// +// We present the algorithm in four steps. +// +// Step 0. Initialization +// ---------------------- +// +// Z := X +// N := unbaised exponent of Z +// S_hi := 2^(-N) * Z +// +// Step 1. Argument Reduction +// -------------------------- +// +// Let +// +// Z = 2^N * S_hi = 2^N * 1.d_1 d_2 d_3 ... d_63 +// +// We obtain G_1, G_2, G_3 by the following steps. +// +// +// Define X_0 := 1.d_1 d_2 ... d_14. This is extracted +// from S_hi. +// +// Define A_1 := 1.d_1 d_2 d_3 d_4. This is X_0 truncated +// to lsb = 2^(-4). +// +// Define index_1 := [ d_1 d_2 d_3 d_4 ]. +// +// Fetch Z_1 := (1/A_1) rounded UP in fixed point with +// fixed point lsb = 2^(-15). +// Z_1 looks like z_0.z_1 z_2 ... z_15 +// Note that the fetching is done using index_1. +// A_1 is actually not needed in the implementation +// and is used here only to explain how is the value +// Z_1 defined. +// +// Fetch G_1 := (1/A_1) truncated to 21 sig. bits. +// floating pt. Again, fetching is done using index_1. A_1 +// explains how G_1 is defined. +// +// Calculate X_1 := X_0 * Z_1 truncated to lsb = 2^(-14) +// = 1.0 0 0 0 d_5 ... d_14 +// This is accomplised by integer multiplication. +// It is proved that X_1 indeed always begin +// with 1.0000 in fixed point. +// +// +// Define A_2 := 1.0 0 0 0 d_5 d_6 d_7 d_8. This is X_1 +// truncated to lsb = 2^(-8). Similar to A_1, +// A_2 is not needed in actual implementation. It +// helps explain how some of the values are defined. +// +// Define index_2 := [ d_5 d_6 d_7 d_8 ]. +// +// Fetch Z_2 := (1/A_2) rounded UP in fixed point with +// fixed point lsb = 2^(-15). Fetch done using index_2. +// Z_2 looks like z_0.z_1 z_2 ... z_15 +// +// Fetch G_2 := (1/A_2) truncated to 21 sig. bits. +// floating pt. +// +// Calculate X_2 := X_1 * Z_2 truncated to lsb = 2^(-14) +// = 1.0 0 0 0 0 0 0 0 d_9 d_10 ... d_14 +// This is accomplised by integer multiplication. +// It is proved that X_2 indeed always begin +// with 1.00000000 in fixed point. +// +// +// Define A_3 := 1.0 0 0 0 0 0 0 0 d_9 d_10 d_11 d_12 d_13 1. +// This is 2^(-14) + X_2 truncated to lsb = 2^(-13). +// +// Define index_3 := [ d_9 d_10 d_11 d_12 d_13 ]. +// +// Fetch G_3 := (1/A_3) truncated to 21 sig. bits. +// floating pt. Fetch is done using index_3. +// +// Compute G := G_1 * G_2 * G_3. +// +// This is done exactly since each of G_j only has 21 sig. bits. +// +// Compute +// +// r := (G*S_hi - 1) +// +// +// Step 2. Approximation +// --------------------- +// +// This step computes an approximation to logl( 1 + r ) where r is the +// reduced argument just obtained. It is proved that |r| <= 1.9*2^(-13); +// thus logl(1+r) can be approximated by a short polynomial: +// +// logl(1+r) ~=~ poly = r + Q1 r^2 + ... + Q4 r^5 +// +// +// Step 3. Reconstruction +// ---------------------- +// +// This step computes the desired result of logl(X): +// +// logl(X) = logl( 2^N * S_hi ) +// = N*logl(2) + logl( S_hi ) +// = N*logl(2) + logl(1/G) + +// logl(1 + G*S_hi - 1 ) +// +// logl(2), logl(1/G_j) are stored as pairs of (single,double) numbers: +// log2_hi, log2_lo, log1byGj_hi, log1byGj_lo. The high parts are +// single-precision numbers and the low parts are double precision +// numbers. These have the property that +// +// N*log2_hi + SUM ( log1byGj_hi ) +// +// is computable exactly in double-extended precision (64 sig. bits). +// Finally +// +// Y_hi := N*log2_hi + SUM ( log1byGj_hi ) +// Y_lo := poly_hi + [ poly_lo + +// ( SUM ( log1byGj_lo ) + N*log2_lo ) ] +// + +RODATA +.align 64 + +// ************* DO NOT CHANGE THE ORDER OF THESE TABLES ************* + +// P_8, P_7, P_6, P_5, P_4, P_3, P_2, and P_1 + +LOCAL_OBJECT_START(Constants_P) +data8 0xE3936754EFD62B15,0x00003FFB +data8 0x8003B271A5E56381,0x0000BFFC +data8 0x9249248C73282DB0,0x00003FFC +data8 0xAAAAAA9F47305052,0x0000BFFC +data8 0xCCCCCCCCCCD17FC9,0x00003FFC +data8 0x8000000000067ED5,0x0000BFFD +data8 0xAAAAAAAAAAAAAAAA,0x00003FFD +data8 0xFFFFFFFFFFFFFFFE,0x0000BFFD +LOCAL_OBJECT_END(Constants_P) + +// log2_hi, log2_lo, Q_4, Q_3, Q_2, and Q_1 + +LOCAL_OBJECT_START(Constants_Q) +data8 0xB172180000000000,0x00003FFE +data8 0x82E308654361C4C6,0x0000BFE2 +data8 0xCCCCCAF2328833CB,0x00003FFC +data8 0x80000077A9D4BAFB,0x0000BFFD +data8 0xAAAAAAAAAAABE3D2,0x00003FFD +data8 0xFFFFFFFFFFFFDAB7,0x0000BFFD +LOCAL_OBJECT_END(Constants_Q) + +// 1/ln10_hi, 1/ln10_lo + +LOCAL_OBJECT_START(Constants_1_by_LN10) +data8 0xDE5BD8A937287195,0x00003FFD +data8 0xD56EAABEACCF70C8,0x00003FBB +LOCAL_OBJECT_END(Constants_1_by_LN10) + + +// Z1 - 16 bit fixed + +LOCAL_OBJECT_START(Constants_Z_1) +data4 0x00008000 +data4 0x00007879 +data4 0x000071C8 +data4 0x00006BCB +data4 0x00006667 +data4 0x00006187 +data4 0x00005D18 +data4 0x0000590C +data4 0x00005556 +data4 0x000051EC +data4 0x00004EC5 +data4 0x00004BDB +data4 0x00004925 +data4 0x0000469F +data4 0x00004445 +data4 0x00004211 +LOCAL_OBJECT_END(Constants_Z_1) + +// G1 and H1 - IEEE single and h1 - IEEE double + +LOCAL_OBJECT_START(Constants_G_H_h1) +data4 0x3F800000,0x00000000 +data8 0x0000000000000000 +data4 0x3F70F0F0,0x3D785196 +data8 0x3DA163A6617D741C +data4 0x3F638E38,0x3DF13843 +data8 0x3E2C55E6CBD3D5BB +data4 0x3F579430,0x3E2FF9A0 +data8 0xBE3EB0BFD86EA5E7 +data4 0x3F4CCCC8,0x3E647FD6 +data8 0x3E2E6A8C86B12760 +data4 0x3F430C30,0x3E8B3AE7 +data8 0x3E47574C5C0739BA +data4 0x3F3A2E88,0x3EA30C68 +data8 0x3E20E30F13E8AF2F +data4 0x3F321640,0x3EB9CEC8 +data8 0xBE42885BF2C630BD +data4 0x3F2AAAA8,0x3ECF9927 +data8 0x3E497F3497E577C6 +data4 0x3F23D708,0x3EE47FC5 +data8 0x3E3E6A6EA6B0A5AB +data4 0x3F1D89D8,0x3EF8947D +data8 0xBDF43E3CD328D9BE +data4 0x3F17B420,0x3F05F3A1 +data8 0x3E4094C30ADB090A +data4 0x3F124920,0x3F0F4303 +data8 0xBE28FBB2FC1FE510 +data4 0x3F0D3DC8,0x3F183EBF +data8 0x3E3A789510FDE3FA +data4 0x3F088888,0x3F20EC80 +data8 0x3E508CE57CC8C98F +data4 0x3F042108,0x3F29516A +data8 0xBE534874A223106C +LOCAL_OBJECT_END(Constants_G_H_h1) + +// Z2 - 16 bit fixed + +LOCAL_OBJECT_START(Constants_Z_2) +data4 0x00008000 +data4 0x00007F81 +data4 0x00007F02 +data4 0x00007E85 +data4 0x00007E08 +data4 0x00007D8D +data4 0x00007D12 +data4 0x00007C98 +data4 0x00007C20 +data4 0x00007BA8 +data4 0x00007B31 +data4 0x00007ABB +data4 0x00007A45 +data4 0x000079D1 +data4 0x0000795D +data4 0x000078EB +LOCAL_OBJECT_END(Constants_Z_2) + +// G2 and H2 - IEEE single and h2 - IEEE double + +LOCAL_OBJECT_START(Constants_G_H_h2) +data4 0x3F800000,0x00000000 +data8 0x0000000000000000 +data4 0x3F7F00F8,0x3B7F875D +data8 0x3DB5A11622C42273 +data4 0x3F7E03F8,0x3BFF015B +data8 0x3DE620CF21F86ED3 +data4 0x3F7D08E0,0x3C3EE393 +data8 0xBDAFA07E484F34ED +data4 0x3F7C0FC0,0x3C7E0586 +data8 0xBDFE07F03860BCF6 +data4 0x3F7B1880,0x3C9E75D2 +data8 0x3DEA370FA78093D6 +data4 0x3F7A2328,0x3CBDC97A +data8 0x3DFF579172A753D0 +data4 0x3F792FB0,0x3CDCFE47 +data8 0x3DFEBE6CA7EF896B +data4 0x3F783E08,0x3CFC15D0 +data8 0x3E0CF156409ECB43 +data4 0x3F774E38,0x3D0D874D +data8 0xBE0B6F97FFEF71DF +data4 0x3F766038,0x3D1CF49B +data8 0xBE0804835D59EEE8 +data4 0x3F757400,0x3D2C531D +data8 0x3E1F91E9A9192A74 +data4 0x3F748988,0x3D3BA322 +data8 0xBE139A06BF72A8CD +data4 0x3F73A0D0,0x3D4AE46F +data8 0x3E1D9202F8FBA6CF +data4 0x3F72B9D0,0x3D5A1756 +data8 0xBE1DCCC4BA796223 +data4 0x3F71D488,0x3D693B9D +data8 0xBE049391B6B7C239 +LOCAL_OBJECT_END(Constants_G_H_h2) + +// G3 and H3 - IEEE single and h3 - IEEE double + +LOCAL_OBJECT_START(Constants_G_H_h3) +data4 0x3F7FFC00,0x38800100 +data8 0x3D355595562224CD +data4 0x3F7FF400,0x39400480 +data8 0x3D8200A206136FF6 +data4 0x3F7FEC00,0x39A00640 +data8 0x3DA4D68DE8DE9AF0 +data4 0x3F7FE400,0x39E00C41 +data8 0xBD8B4291B10238DC +data4 0x3F7FDC00,0x3A100A21 +data8 0xBD89CCB83B1952CA +data4 0x3F7FD400,0x3A300F22 +data8 0xBDB107071DC46826 +data4 0x3F7FCC08,0x3A4FF51C +data8 0x3DB6FCB9F43307DB +data4 0x3F7FC408,0x3A6FFC1D +data8 0xBD9B7C4762DC7872 +data4 0x3F7FBC10,0x3A87F20B +data8 0xBDC3725E3F89154A +data4 0x3F7FB410,0x3A97F68B +data8 0xBD93519D62B9D392 +data4 0x3F7FAC18,0x3AA7EB86 +data8 0x3DC184410F21BD9D +data4 0x3F7FA420,0x3AB7E101 +data8 0xBDA64B952245E0A6 +data4 0x3F7F9C20,0x3AC7E701 +data8 0x3DB4B0ECAABB34B8 +data4 0x3F7F9428,0x3AD7DD7B +data8 0x3D9923376DC40A7E +data4 0x3F7F8C30,0x3AE7D474 +data8 0x3DC6E17B4F2083D3 +data4 0x3F7F8438,0x3AF7CBED +data8 0x3DAE314B811D4394 +data4 0x3F7F7C40,0x3B03E1F3 +data8 0xBDD46F21B08F2DB1 +data4 0x3F7F7448,0x3B0BDE2F +data8 0xBDDC30A46D34522B +data4 0x3F7F6C50,0x3B13DAAA +data8 0x3DCB0070B1F473DB +data4 0x3F7F6458,0x3B1BD766 +data8 0xBDD65DDC6AD282FD +data4 0x3F7F5C68,0x3B23CC5C +data8 0xBDCDAB83F153761A +data4 0x3F7F5470,0x3B2BC997 +data8 0xBDDADA40341D0F8F +data4 0x3F7F4C78,0x3B33C711 +data8 0x3DCD1BD7EBC394E8 +data4 0x3F7F4488,0x3B3BBCC6 +data8 0xBDC3532B52E3E695 +data4 0x3F7F3C90,0x3B43BAC0 +data8 0xBDA3961EE846B3DE +data4 0x3F7F34A0,0x3B4BB0F4 +data8 0xBDDADF06785778D4 +data4 0x3F7F2CA8,0x3B53AF6D +data8 0x3DCC3ED1E55CE212 +data4 0x3F7F24B8,0x3B5BA620 +data8 0xBDBA31039E382C15 +data4 0x3F7F1CC8,0x3B639D12 +data8 0x3D635A0B5C5AF197 +data4 0x3F7F14D8,0x3B6B9444 +data8 0xBDDCCB1971D34EFC +data4 0x3F7F0CE0,0x3B7393BC +data8 0x3DC7450252CD7ADA +data4 0x3F7F04F0,0x3B7B8B6D +data8 0xBDB68F177D7F2A42 +LOCAL_OBJECT_END(Constants_G_H_h3) + + +// Floating Point Registers + +FR_Input_X = f8 + +FR_Y_hi = f34 +FR_Y_lo = f35 + +FR_Scale = f36 +FR_X_Prime = f37 +FR_S_hi = f38 +FR_W = f39 +FR_G = f40 + +FR_H = f41 +FR_wsq = f42 +FR_w4 = f43 +FR_h = f44 +FR_w6 = f45 + +FR_G2 = f46 +FR_H2 = f47 +FR_poly_lo = f48 +FR_P8 = f49 +FR_poly_hi = f50 + +FR_P7 = f51 +FR_h2 = f52 +FR_rsq = f53 +FR_P6 = f54 +FR_r = f55 + +FR_log2_hi = f56 +FR_log2_lo = f57 +FR_p87 = f58 +FR_p876 = f58 +FR_p8765 = f58 +FR_float_N = f59 +FR_Q4 = f60 + +FR_p43 = f61 +FR_p432 = f61 +FR_p4321 = f61 +FR_P4 = f62 +FR_G3 = f63 +FR_H3 = f64 +FR_h3 = f65 + +FR_Q3 = f66 +FR_P3 = f67 +FR_Q2 = f68 +FR_P2 = f69 +FR_1LN10_hi = f70 + +FR_Q1 = f71 +FR_P1 = f72 +FR_1LN10_lo = f73 +FR_P5 = f74 +FR_rcub = f75 + +FR_Output_X_tmp = f76 + +FR_X = f8 +FR_Y = f0 +FR_RESULT = f76 + + +// General Purpose Registers + +GR_ad_p = r33 +GR_Index1 = r34 +GR_Index2 = r35 +GR_signif = r36 +GR_X_0 = r37 +GR_X_1 = r38 +GR_X_2 = r39 +GR_Z_1 = r40 +GR_Z_2 = r41 +GR_N = r42 +GR_Bias = r43 +GR_M = r44 +GR_Index3 = r45 +GR_ad_p2 = r46 +GR_exp_mask = r47 +GR_exp_2tom7 = r48 +GR_ad_ln10 = r49 +GR_ad_tbl_1 = r50 +GR_ad_tbl_2 = r51 +GR_ad_tbl_3 = r52 +GR_ad_q = r53 +GR_ad_z_1 = r54 +GR_ad_z_2 = r55 +GR_ad_z_3 = r56 + +// +// Added for unwind support +// + +GR_SAVE_PFS = r50 +GR_SAVE_B0 = r51 +GR_SAVE_GP = r52 +GR_Parameter_X = r53 +GR_Parameter_Y = r54 +GR_Parameter_RESULT = r55 +GR_Parameter_TAG = r56 + +.section .text + +GLOBAL_IEEE754_ENTRY(logl) +{ .mfi + alloc r32 = ar.pfs,0,21,4,0 + fclass.m p6, p0 = FR_Input_X, 0x1E3 // Test for natval, nan, inf + cmp.eq p7, p14 = r0, r0 // Set p7 if logl +} +{ .mfb + addl GR_ad_z_1 = @ltoff(Constants_Z_1#),gp + fnorm.s1 FR_X_Prime = FR_Input_X // Normalize x + br.cond.sptk LOGL_BEGIN +} +;; + +GLOBAL_IEEE754_END(logl) + + +GLOBAL_IEEE754_ENTRY(log10l) +{ .mfi + alloc r32 = ar.pfs,0,21,4,0 + fclass.m p6, p0 = FR_Input_X, 0x1E3 // Test for natval, nan, inf + cmp.ne p7, p14 = r0, r0 // Set p14 if log10l +} +{ .mfb + addl GR_ad_z_1 = @ltoff(Constants_Z_1#),gp + fnorm.s1 FR_X_Prime = FR_Input_X // Normalize x + nop.b 999 +} +;; + + +// Common code for logl and log10 +LOGL_BEGIN: +{ .mfi + ld8 GR_ad_z_1 = [GR_ad_z_1] // Get pointer to Constants_Z_1 + fclass.m p10, p0 = FR_Input_X, 0x0b // Test for denormal + mov GR_exp_2tom7 = 0x0fff8 // Exponent of 2^-7 +} +;; + +{ .mfb + getf.sig GR_signif = FR_Input_X // Get significand of x + fcmp.eq.s1 p9, p0 = FR_Input_X, f1 // Test for x=1.0 +(p6) br.cond.spnt LOGL_64_special // Branch for nan, inf, natval +} +;; + +{ .mfi + add GR_ad_tbl_1 = 0x040, GR_ad_z_1 // Point to Constants_G_H_h1 + fcmp.lt.s1 p13, p0 = FR_Input_X, f0 // Test for x<0 + add GR_ad_p = -0x100, GR_ad_z_1 // Point to Constants_P +} +{ .mib + add GR_ad_z_2 = 0x140, GR_ad_z_1 // Point to Constants_Z_2 + add GR_ad_tbl_2 = 0x180, GR_ad_z_1 // Point to Constants_G_H_h2 +(p10) br.cond.spnt LOGL_64_denormal // Branch for denormal +} +;; + +LOGL_64_COMMON: +{ .mfi + add GR_ad_q = 0x080, GR_ad_p // Point to Constants_Q + fcmp.eq.s1 p8, p0 = FR_Input_X, f0 // Test for x=0 + extr.u GR_Index1 = GR_signif, 59, 4 // Get high 4 bits of signif +} +{ .mfb + add GR_ad_tbl_3 = 0x280, GR_ad_z_1 // Point to Constants_G_H_h3 +(p9) fma.s0 f8 = FR_Input_X, f0, f0 // If x=1, return +0.0 +(p9) br.ret.spnt b0 // Exit if x=1 +} +;; + +{ .mfi + shladd GR_ad_z_1 = GR_Index1, 2, GR_ad_z_1 // Point to Z_1 + fclass.nm p10, p0 = FR_Input_X, 0x1FF // Test for unsupported + extr.u GR_X_0 = GR_signif, 49, 15 // Get high 15 bits of significand +} +{ .mfi + ldfe FR_P8 = [GR_ad_p],16 // Load P_8 for near1 path + fsub.s1 FR_W = FR_X_Prime, f1 // W = x - 1 + add GR_ad_ln10 = 0x060, GR_ad_q // Point to Constants_1_by_LN10 +} +;; + +{ .mfi + ld4 GR_Z_1 = [GR_ad_z_1] // Load Z_1 + nop.f 999 + mov GR_exp_mask = 0x1FFFF // Create exponent mask +} +{ .mib + shladd GR_ad_tbl_1 = GR_Index1, 4, GR_ad_tbl_1 // Point to G_1 + mov GR_Bias = 0x0FFFF // Create exponent bias +(p13) br.cond.spnt LOGL_64_negative // Branch if x<0 +} +;; + +{ .mfb + ldfps FR_G, FR_H = [GR_ad_tbl_1],8 // Load G_1, H_1 + fmerge.se FR_S_hi = f1,FR_X_Prime // Form |x| +(p8) br.cond.spnt LOGL_64_zero // Branch if x=0 +} +;; + +{ .mmb + getf.exp GR_N = FR_X_Prime // Get N = exponent of x + ldfd FR_h = [GR_ad_tbl_1] // Load h_1 +(p10) br.cond.spnt LOGL_64_unsupported // Branch for unsupported type +} +;; + +{ .mfi + ldfe FR_log2_hi = [GR_ad_q],16 // Load log2_hi + fcmp.eq.s0 p8, p0 = FR_Input_X, f0 // Dummy op to flag denormals + pmpyshr2.u GR_X_1 = GR_X_0,GR_Z_1,15 // Get bits 30-15 of X_0 * Z_1 +} +;; + +// +// For performance, don't use result of pmpyshr2.u for 4 cycles. +// +{ .mmi + ldfe FR_log2_lo = [GR_ad_q],16 // Load log2_lo +(p14) ldfe FR_1LN10_hi = [GR_ad_ln10],16 // If log10l, load 1/ln10_hi + sub GR_N = GR_N, GR_Bias +} +;; + +{ .mmi + ldfe FR_Q4 = [GR_ad_q],16 // Load Q4 +(p14) ldfe FR_1LN10_lo = [GR_ad_ln10] // If log10l, load 1/ln10_lo + nop.i 999 +} +;; + +{ .mmi + ldfe FR_Q3 = [GR_ad_q],16 // Load Q3 + setf.sig FR_float_N = GR_N // Put integer N into rightmost significand + nop.i 999 +} +;; + +{ .mmi + getf.exp GR_M = FR_W // Get signexp of w = x - 1 + ldfe FR_Q2 = [GR_ad_q],16 // Load Q2 + extr.u GR_Index2 = GR_X_1, 6, 4 // Extract bits 6-9 of X_1 +} +;; + +{ .mmi + ldfe FR_Q1 = [GR_ad_q] // Load Q1 + shladd GR_ad_z_2 = GR_Index2, 2, GR_ad_z_2 // Point to Z_2 + add GR_ad_p2 = 0x30,GR_ad_p // Point to P_4 +} +;; + +{ .mmi + ld4 GR_Z_2 = [GR_ad_z_2] // Load Z_2 + shladd GR_ad_tbl_2 = GR_Index2, 4, GR_ad_tbl_2 // Point to G_2 + and GR_M = GR_exp_mask, GR_M // Get exponent of w = x - 1 +} +;; + +{ .mmi + ldfps FR_G2, FR_H2 = [GR_ad_tbl_2],8 // Load G_2, H_2 + cmp.lt p8, p9 = GR_M, GR_exp_2tom7 // Test |x-1| < 2^-7 + nop.i 999 +} +;; + +// Paths are merged. +// p8 is for the near1 path: |x-1| < 2^-7 +// p9 is for regular path: |x-1| >= 2^-7 + +{ .mmi + ldfd FR_h2 = [GR_ad_tbl_2] // Load h_2 + nop.m 999 + nop.i 999 +} +;; + +{ .mmi +(p8) ldfe FR_P7 = [GR_ad_p],16 // Load P_7 for near1 path +(p8) ldfe FR_P4 = [GR_ad_p2],16 // Load P_4 for near1 path +(p9) pmpyshr2.u GR_X_2 = GR_X_1,GR_Z_2,15 // Get bits 30-15 of X_1 * Z_2 +} +;; + +// +// For performance, don't use result of pmpyshr2.u for 4 cycles. +// +{ .mmi +(p8) ldfe FR_P6 = [GR_ad_p],16 // Load P_6 for near1 path +(p8) ldfe FR_P3 = [GR_ad_p2],16 // Load P_3 for near1 path + nop.i 999 +} +;; + +{ .mmf +(p8) ldfe FR_P5 = [GR_ad_p],16 // Load P_5 for near1 path +(p8) ldfe FR_P2 = [GR_ad_p2],16 // Load P_2 for near1 path +(p8) fmpy.s1 FR_wsq = FR_W, FR_W // wsq = w * w for near1 path +} +;; + +{ .mmi +(p8) ldfe FR_P1 = [GR_ad_p2],16 ;; // Load P_1 for near1 path + nop.m 999 +(p9) extr.u GR_Index3 = GR_X_2, 1, 5 // Extract bits 1-5 of X_2 +} +;; + +{ .mfi +(p9) shladd GR_ad_tbl_3 = GR_Index3, 4, GR_ad_tbl_3 // Point to G_3 +(p9) fcvt.xf FR_float_N = FR_float_N + nop.i 999 +} +;; + +{ .mfi +(p9) ldfps FR_G3, FR_H3 = [GR_ad_tbl_3],8 // Load G_3, H_3 + nop.f 999 + nop.i 999 +} +;; + +{ .mfi +(p9) ldfd FR_h3 = [GR_ad_tbl_3] // Load h_3 +(p9) fmpy.s1 FR_G = FR_G, FR_G2 // G = G_1 * G_2 + nop.i 999 +} +{ .mfi + nop.m 999 +(p9) fadd.s1 FR_H = FR_H, FR_H2 // H = H_1 + H_2 + nop.i 999 +} +;; + +{ .mmf + nop.m 999 + nop.m 999 +(p9) fadd.s1 FR_h = FR_h, FR_h2 // h = h_1 + h_2 +} +;; + +{ .mfi + nop.m 999 +(p8) fmpy.s1 FR_w4 = FR_wsq, FR_wsq // w4 = w^4 for near1 path + nop.i 999 +} +{ .mfi + nop.m 999 +(p8) fma.s1 FR_p87 = FR_W, FR_P8, FR_P7 // p87 = w * P8 + P7 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p8) fma.s1 FR_p43 = FR_W, FR_P4, FR_P3 // p43 = w * P4 + P3 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fmpy.s1 FR_G = FR_G, FR_G3 // G = (G_1 * G_2) * G_3 + nop.i 999 +} +{ .mfi + nop.m 999 +(p9) fadd.s1 FR_H = FR_H, FR_H3 // H = (H_1 + H_2) + H_3 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fadd.s1 FR_h = FR_h, FR_h3 // h = (h_1 + h_2) + h_3 + nop.i 999 +} +{ .mfi + nop.m 999 +(p8) fmpy.s1 FR_w6 = FR_w4, FR_wsq // w6 = w^6 for near1 path + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p8) fma.s1 FR_p432 = FR_W, FR_p43, FR_P2 // p432 = w * p43 + P2 + nop.i 999 +} +{ .mfi + nop.m 999 +(p8) fma.s1 FR_p876 = FR_W, FR_p87, FR_P6 // p876 = w * p87 + P6 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fms.s1 FR_r = FR_G, FR_S_hi, f1 // r = G * S_hi - 1 + nop.i 999 +} +{ .mfi + nop.m 999 +(p9) fma.s1 FR_Y_hi = FR_float_N, FR_log2_hi, FR_H // Y_hi = N * log2_hi + H + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fma.s1 FR_h = FR_float_N, FR_log2_lo, FR_h // h = N * log2_lo + h + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p8) fma.s1 FR_p4321 = FR_W, FR_p432, FR_P1 // p4321 = w * p432 + P1 + nop.i 999 +} +{ .mfi + nop.m 999 +(p8) fma.s1 FR_p8765 = FR_W, FR_p876, FR_P5 // p8765 = w * p876 + P5 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fma.s1 FR_poly_lo = FR_r, FR_Q4, FR_Q3 // poly_lo = r * Q4 + Q3 + nop.i 999 +} +{ .mfi + nop.m 999 +(p9) fmpy.s1 FR_rsq = FR_r, FR_r // rsq = r * r + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p8) fma.s1 FR_Y_lo = FR_wsq, FR_p4321, f0 // Y_lo = wsq * p4321 + nop.i 999 +} +{ .mfi + nop.m 999 +(p8) fma.s1 FR_Y_hi = FR_W, f1, f0 // Y_hi = w for near1 path + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fma.s1 FR_poly_lo = FR_poly_lo, FR_r, FR_Q2 // poly_lo = poly_lo * r + Q2 + nop.i 999 +} +{ .mfi + nop.m 999 +(p9) fma.s1 FR_rcub = FR_rsq, FR_r, f0 // rcub = r^3 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p8) fma.s1 FR_Y_lo = FR_w6, FR_p8765,FR_Y_lo // Y_lo = w6 * p8765 + w2 * p4321 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fma.s1 FR_poly_hi = FR_Q1, FR_rsq, FR_r // poly_hi = Q1 * rsq + r + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fma.s1 FR_poly_lo = FR_poly_lo, FR_rcub, FR_h // poly_lo = poly_lo*r^3 + h + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fadd.s1 FR_Y_lo = FR_poly_hi, FR_poly_lo // Y_lo = poly_hi + poly_lo + nop.i 999 +} +;; + +// Remainder of code is common for near1 and regular paths +{ .mfi + nop.m 999 +(p7) fadd.s0 f8 = FR_Y_lo,FR_Y_hi // If logl, result=Y_lo+Y_hi + nop.i 999 +} +{ .mfi + nop.m 999 +(p14) fmpy.s1 FR_Output_X_tmp = FR_Y_lo,FR_1LN10_hi + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p14) fma.s1 FR_Output_X_tmp = FR_Y_hi,FR_1LN10_lo,FR_Output_X_tmp + nop.i 999 +} +;; + +{ .mfb + nop.m 999 +(p14) fma.s0 f8 = FR_Y_hi,FR_1LN10_hi,FR_Output_X_tmp + br.ret.sptk b0 // Common exit for 0 < x < inf +} +;; + + +// Here if x=+-0 +LOGL_64_zero: +// +// If x=+-0 raise divide by zero and return -inf +// +{ .mfi +(p7) mov GR_Parameter_TAG = 0 + fsub.s1 FR_Output_X_tmp = f0, f1 + nop.i 999 +} +;; + +{ .mfb +(p14) mov GR_Parameter_TAG = 6 + frcpa.s0 FR_Output_X_tmp, p8 = FR_Output_X_tmp, f0 + br.cond.sptk __libm_error_region +} +;; + +LOGL_64_special: +{ .mfi + nop.m 999 + fclass.m.unc p8, p0 = FR_Input_X, 0x1E1 // Test for natval, nan, +inf + nop.i 999 +} +;; + +// +// For SNaN raise invalid and return QNaN. +// For QNaN raise invalid and return QNaN. +// For +Inf return +Inf. +// +{ .mfb + nop.m 999 +(p8) fmpy.s0 f8 = FR_Input_X, f1 +(p8) br.ret.sptk b0 // Return for natval, nan, +inf +} +;; + +// +// For -Inf raise invalid and return QNaN. +// +{ .mmi +(p7) mov GR_Parameter_TAG = 1 + nop.m 999 + nop.i 999 +} +;; + +{ .mfb +(p14) mov GR_Parameter_TAG = 7 + fmpy.s0 FR_Output_X_tmp = FR_Input_X, f0 + br.cond.sptk __libm_error_region +} +;; + +// Here if x denormal or unnormal +LOGL_64_denormal: +{ .mmi + getf.sig GR_signif = FR_X_Prime // Get significand of normalized input + nop.m 999 + nop.i 999 +} +;; + +{ .mmb + getf.exp GR_N = FR_X_Prime // Get exponent of normalized input + nop.m 999 + br.cond.sptk LOGL_64_COMMON // Branch back to common code +} +;; + +LOGL_64_unsupported: +// +// Return generated NaN or other value. +// +{ .mfb + nop.m 999 + fmpy.s0 f8 = FR_Input_X, f0 + br.ret.sptk b0 +} +;; + +// Here if -inf < x < 0 +LOGL_64_negative: +// +// Deal with x < 0 in a special way - raise +// invalid and produce QNaN indefinite. +// +{ .mfi +(p7) mov GR_Parameter_TAG = 1 + frcpa.s0 FR_Output_X_tmp, p8 = f0, f0 + nop.i 999 +} +;; + +{ .mib +(p14) mov GR_Parameter_TAG = 7 + nop.i 999 + br.cond.sptk __libm_error_region +} +;; + + +GLOBAL_IEEE754_END(log10l) + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfe [GR_Parameter_Y] = FR_Y,16 // Save Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; +.body +{ .mib + stfe [GR_Parameter_X] = FR_X // Store Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y + nop.b 0 // Parameter 3 address +} +{ .mib + stfe [GR_Parameter_Y] = FR_RESULT // Store Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + nop.m 999 + nop.m 999 + add GR_Parameter_RESULT = 48,sp +};; +{ .mmi + ldfe f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region#) + +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/e_pow.S b/sysdeps/ia64/fpu/e_pow.S new file mode 100644 index 0000000000..89449c79ec --- /dev/null +++ b/sysdeps/ia64/fpu/e_pow.S @@ -0,0 +1,2297 @@ +.file "pow.s" + + +// Copyright (c) 2000 - 2005, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 02/03/00 Added p12 to definite over/under path. With odd power we did not +// maintain the sign of x in this path. +// 04/04/00 Unwind support added +// 04/19/00 pow(+-1,inf) now returns NaN +// pow(+-val, +-inf) returns 0 or inf, but now does not call error +// support +// Added s1 to fcvt.fx because invalid flag was incorrectly set. +// 08/15/00 Bundle added after call to __libm_error_support to properly +// set [the previously overwritten] GR_Parameter_RESULT. +// 09/07/00 Improved performance by eliminating bank conflicts and other stalls, +// and tweaking the critical path +// 09/08/00 Per c99, pow(+-1,inf) now returns 1, and pow(+1,nan) returns 1 +// 09/28/00 Updated NaN**0 path +// 01/20/01 Fixed denormal flag settings. +// 02/13/01 Improved speed. +// 03/19/01 Reordered exp polynomial to improve speed and eliminate monotonicity +// problem in round up, down, and to zero modes. Also corrected +// overflow result when x negative, y odd in round up, down, zero. +// 06/14/01 Added brace missing from bundle +// 12/10/01 Corrected case where x negative, 2^52 <= |y| < 2^53, y odd integer. +// 12/20/01 Fixed monotonity problem in round to nearest. +// 02/08/02 Fixed overflow/underflow cases that were not calling error support. +// 05/20/02 Cleaned up namespace and sf0 syntax +// 08/29/02 Improved Itanium 2 performance +// 09/21/02 Added branch for |y*log(x)|<2^-11 to fix monotonicity problems. +// 02/10/03 Reordered header: .section, .global, .proc, .align +// 03/31/05 Reformatted delimiters between data tables +// +// API +//============================================================== +// double pow(double x, double y) +// +// Overview of operation +//============================================================== +// +// Three steps... +// 1. Log(x) +// 2. y Log(x) +// 3. exp(y log(x)) +// +// This means we work with the absolute value of x and merge in the sign later. +// Log(x) = G + delta + r -rsq/2 + p +// G,delta depend on the exponent of x and table entries. The table entries are +// indexed by the exponent of x, called K. +// +// The G and delta come out of the reduction; r is the reduced x. +// +// B = frcpa(x) +// xB-1 is small means that B is the approximate inverse of x. +// +// Log(x) = Log( (1/B)(Bx) ) +// = Log(1/B) + Log(Bx) +// = Log(1/B) + Log( 1 + (Bx-1)) +// +// x = 2^K 1.x_1x_2.....x_52 +// B= frcpa(x) = 2^-k Cm +// Log(1/B) = Log(1/(2^-K Cm)) +// Log(1/B) = Log((2^K/ Cm)) +// Log(1/B) = K Log(2) + Log(1/Cm) +// +// Log(x) = K Log(2) + Log(1/Cm) + Log( 1 + (Bx-1)) +// +// If you take the significand of x, set the exponent to true 0, then Cm is +// the frcpa. We tabulate the Log(1/Cm) values. There are 256 of them. +// The frcpa table is indexed by 8 bits, the x_1 thru x_8. +// m = x_1x_2...x_8 is an 8-bit index. +// +// Log(1/Cm) = log(1/frcpa(1+m/256)) where m goes from 0 to 255. +// +// We tabluate as two doubles, T and t, where T +t is the value itself. +// +// Log(x) = (K Log(2)_hi + T) + (Log(2)_hi + t) + Log( 1 + (Bx-1)) +// Log(x) = G + delta + Log( 1 + (Bx-1)) +// +// The Log( 1 + (Bx-1)) can be calculated as a series in r = Bx-1. +// +// Log( 1 + (Bx-1)) = r - rsq/2 + p +// +// Then, +// +// yLog(x) = yG + y delta + y(r-rsq/2) + yp +// yLog(x) = Z1 + e3 + Z2 + Z3 + (e2 + e3) +// +// +// exp(yLog(x)) = exp(Z1 + Z2 + Z3) exp(e1 + e2 + e3) +// +// +// exp(Z3) is another series. +// exp(e1 + e2 + e3) is approximated as f3 = 1 + (e1 + e2 + e3) +// +// Z1 (128/log2) = number of log2/128 in Z1 is N1 +// Z2 (128/log2) = number of log2/128 in Z2 is N2 +// +// s1 = Z1 - N1 log2/128 +// s2 = Z2 - N2 log2/128 +// +// s = s1 + s2 +// N = N1 + N2 +// +// exp(Z1 + Z2) = exp(Z) +// exp(Z) = exp(s) exp(N log2/128) +// +// exp(r) = exp(Z - N log2/128) +// +// r = s + d = (Z - N (log2/128)_hi) -N (log2/128)_lo +// = Z - N (log2/128) +// +// Z = s+d +N (log2/128) +// +// exp(Z) = exp(s) (1+d) exp(N log2/128) +// +// N = M 128 + n +// +// N log2/128 = M log2 + n log2/128 +// +// n is 8 binary digits = n_7n_6...n_1 +// +// n log2/128 = n_7n_6n_5 16 log2/128 + n_4n_3n_2n_1 log2/128 +// n log2/128 = n_7n_6n_5 log2/8 + n_4n_3n_2n_1 log2/128 +// n log2/128 = I2 log2/8 + I1 log2/128 +// +// N log2/128 = M log2 + I2 log2/8 + I1 log2/128 +// +// exp(Z) = exp(s) (1+d) exp(log(2^M) + log(2^I2/8) + log(2^I1/128)) +// exp(Z) = exp(s) (1+d1) (1+d2)(2^M) 2^I2/8 2^I1/128 +// exp(Z) = exp(s) f1 f2 (2^M) 2^I2/8 2^I1/128 +// +// I1, I2 are table indices. Use a series for exp(s). +// Then get exp(Z) +// +// exp(yLog(x)) = exp(Z1 + Z2 + Z3) exp(e1 + e2 + e3) +// exp(yLog(x)) = exp(Z) exp(Z3) f3 +// exp(yLog(x)) = exp(Z)f3 exp(Z3) +// exp(yLog(x)) = A exp(Z3) +// +// We actually calculate exp(Z3) -1. +// Then, +// exp(yLog(x)) = A + A( exp(Z3) -1) +// + +// Table Generation +//============================================================== + +// The log values +// ============== +// The operation (K*log2_hi) must be exact. K is the true exponent of x. +// If we allow gradual underflow (denormals), K can be represented in 12 bits +// (as a two's complement number). We assume 13 bits as an engineering +// precaution. +// +// +------------+----------------+-+ +// | 13 bits | 50 bits | | +// +------------+----------------+-+ +// 0 1 66 +// 2 34 +// +// So we want the lsb(log2_hi) to be 2^-50 +// We get log2 as a quad-extended (15-bit exponent, 128-bit significand) +// +// 0 fffe b17217f7d1cf79ab c9e3b39803f2f6af (4...) +// +// Consider numbering the bits left to right, starting at 0 thru 127. +// Bit 0 is the 2^-1 bit; bit 49 is the 2^-50 bit. +// +// ...79ab +// 0111 1001 1010 1011 +// 44 +// 89 +// +// So if we shift off the rightmost 14 bits, then (shift back only +// the top half) we get +// +// 0 fffe b17217f7d1cf4000 e6af278ece600fcb dabc000000000000 +// +// Put the right 64-bit signficand in an FR register, convert to double; +// it is exact. Put the next 128 bits into a quad register and round to double. +// The true exponent of the low part is -51. +// +// hi is 0 fffe b17217f7d1cf4000 +// lo is 0 ffcc e6af278ece601000 +// +// Convert to double memory format and get +// +// hi is 0x3fe62e42fefa39e8 +// lo is 0x3cccd5e4f1d9cc02 +// +// log2_hi + log2_lo is an accurate value for log2. +// +// +// The T and t values +// ================== +// A similar method is used to generate the T and t values. +// +// K * log2_hi + T must be exact. +// +// Smallest T,t +// ---------- +// The smallest T,t is +// T t +// 0x3f60040155d58800, 0x3c93bce0ce3ddd81 log(1/frcpa(1+0/256))= +1.95503e-003 +// +// The exponent is 0x3f6 (biased) or -9 (true). +// For the smallest T value, what we want is to clip the significand such that +// when it is shifted right by 9, its lsb is in the bit for 2^-51. The 9 is the +// specific for the first entry. In general, it is 0xffff - (biased 15-bit +// exponent). + +// Independently, what we have calculated is the table value as a quad +// precision number. +// Table entry 1 is +// 0 fff6 80200aaeac44ef38 338f77605fdf8000 +// +// We store this quad precision number in a data structure that is +// sign: 1 +// exponent: 15 +// signficand_hi: 64 (includes explicit bit) +// signficand_lo: 49 +// Because the explicit bit is included, the significand is 113 bits. +// +// Consider significand_hi for table entry 1. +// +// +// +-+--- ... -------+--------------------+ +// | | +// +-+--- ... -------+--------------------+ +// 0 1 4444444455555555556666 +// 2345678901234567890123 +// +// Labeled as above, bit 0 is 2^0, bit 1 is 2^-1, etc. +// Bit 42 is 2^-42. If we shift to the right by 9, the bit in +// bit 42 goes in 51. +// +// So what we want to do is shift bits 43 thru 63 into significand_lo. +// This is shifting bit 42 into bit 63, taking care to retain shifted-off bits. +// Then shifting (just with signficaand_hi) back into bit 42. +// +// The shift_value is 63-42 = 21. In general, this is +// 63 - (51 -(0xffff - 0xfff6)) +// For this example, it is +// 63 - (51 - 9) = 63 - 42 = 21 +// +// This means we are shifting 21 bits into significand_lo. We must maintain more +// that a 128-bit signficand not to lose bits. So before the shift we put the +// 128-bit significand into a 256-bit signficand and then shift. +// The 256-bit significand has four parts: hh, hl, lh, and ll. +// +// Start off with +// hh hl lh ll +// <64> <49><15_0> <64_0> <64_0> +// +// After shift by 21 (then return for significand_hi), +// <43><21_0> <21><43> <6><58_0> <64_0> +// +// Take the hh part and convert to a double. There is no rounding here. +// The conversion is exact. The true exponent of the high part is the same as +// the true exponent of the input quad. +// +// We have some 64 plus significand bits for the low part. In this example, we +// have 70 bits. We want to round this to a double. Put them in a quad and then +// do a quad fnorm. +// For this example the true exponent of the low part is +// true_exponent_of_high - 43 = true_exponent_of_high - (64-21) +// In general, this is +// true_exponent_of_high - (64 - shift_value) +// +// +// Largest T,t +// ---------- +// The largest T,t is +// 0x3fe62643fecf9742, 0x3c9e3147684bd37d log(1/frcpa(1+255/256))=+6.92171e-001 +// +// Table entry 256 is +// 0 fffe b1321ff67cba178c 51da12f4df5a0000 +// +// The shift value is +// 63 - (51 -(0xffff - 0xfffe)) = 13 +// +// The true exponent of the low part is +// true_exponent_of_high - (64 - shift_value) +// -1 - (64-13) = -52 +// Biased as a double, this is 0x3cb +// +// +// +// So then lsb(T) must be >= 2^-51 +// msb(Klog2_hi) <= 2^12 +// +// +--------+---------+ +// | 51 bits | <== largest T +// +--------+---------+ +// | 9 bits | 42 bits | <== smallest T +// +------------+----------------+-+ +// | 13 bits | 50 bits | | +// +------------+----------------+-+ + + +// Special Cases +//============================================================== + +// double float +// overflow error 24 30 + +// underflow error 25 31 + +// X zero Y zero +// +0 +0 +1 error 26 32 +// -0 +0 +1 error 26 32 +// +0 -0 +1 error 26 32 +// -0 -0 +1 error 26 32 + +// X zero Y negative +// +0 -odd integer +inf error 27 33 divide-by-zero +// -0 -odd integer -inf error 27 33 divide-by-zero +// +0 !-odd integer +inf error 27 33 divide-by-zero +// -0 !-odd integer +inf error 27 33 divide-by-zero +// +0 -inf +inf error 27 33 divide-by-zero +// -0 -inf +inf error 27 33 divide-by-zero + +// X zero Y positve +// +0 +odd integer +0 +// -0 +odd integer -0 +// +0 !+odd integer +0 +// -0 !+odd integer +0 +// +0 +inf +0 +// -0 +inf +0 +// +0 Y NaN quiet Y invalid if Y SNaN +// -0 Y NaN quiet Y invalid if Y SNaN + +// X one +// -1 Y inf +1 +// -1 Y NaN quiet Y invalid if Y SNaN +// +1 Y NaN +1 invalid if Y SNaN +// +1 Y any else +1 + +// X - Y not integer QNAN error 28 34 invalid + +// X NaN Y 0 +1 error 29 35 +// X NaN Y NaN quiet X invalid if X or Y SNaN +// X NaN Y any else quiet X invalid if X SNaN +// X !+1 Y NaN quiet Y invalid if Y SNaN + + +// X +inf Y >0 +inf +// X -inf Y >0, !odd integer +inf +// X -inf Y >0, odd integer -inf + +// X +inf Y <0 +0 +// X -inf Y <0, !odd integer +0 +// X -inf Y <0, odd integer -0 + +// X +inf Y =0 +1 +// X -inf Y =0 +1 + +// |X|<1 Y +inf +0 +// |X|<1 Y -inf +inf +// |X|>1 Y +inf +inf +// |X|>1 Y -inf +0 + +// X any Y =0 +1 + +// Assembly macros +//============================================================== + +// integer registers used + +pow_GR_signexp_X = r14 +pow_GR_17ones = r15 +pow_AD_P = r16 +pow_GR_exp_2tom8 = r17 +pow_GR_sig_X = r18 +pow_GR_10033 = r19 +pow_GR_16ones = r20 + +pow_AD_Tt = r21 +pow_GR_exp_X = r22 +pow_AD_Q = r23 +pow_GR_true_exp_X = r24 +pow_GR_y_zero = r25 + +pow_GR_exp_Y = r26 +pow_AD_tbl1 = r27 +pow_AD_tbl2 = r28 +pow_GR_offset = r29 +pow_GR_exp_Xm1 = r30 +pow_GR_xneg_yodd = r31 + +pow_GR_signexp_Xm1 = r35 +pow_GR_int_W1 = r36 +pow_GR_int_W2 = r37 +pow_GR_int_N = r38 +pow_GR_index1 = r39 +pow_GR_index2 = r40 + +pow_AD_T1 = r41 +pow_AD_T2 = r42 +pow_int_GR_M = r43 +pow_GR_sig_int_Y = r44 +pow_GR_sign_Y_Gpr = r45 + +pow_GR_17ones_m1 = r46 +pow_GR_one = r47 +pow_GR_sign_Y = r48 +pow_GR_signexp_Y_Gpr = r49 +pow_GR_exp_Y_Gpr = r50 + +pow_GR_true_exp_Y_Gpr = r51 +pow_GR_signexp_Y = r52 +pow_GR_x_one = r53 +pow_GR_exp_2toM63 = r54 +pow_GR_big_pos = r55 + +pow_GR_big_neg = r56 + +GR_SAVE_B0 = r50 +GR_SAVE_GP = r51 +GR_SAVE_PFS = r52 + +GR_Parameter_X = r53 +GR_Parameter_Y = r54 +GR_Parameter_RESULT = r55 +pow_GR_tag = r56 + + +// floating point registers used + +POW_B = f32 +POW_NORM_X = f33 +POW_Xm1 = f34 +POW_r1 = f34 +POW_P4 = f35 + +POW_P5 = f36 +POW_NORM_Y = f37 +POW_Q2 = f38 +POW_Q3 = f39 +POW_P2 = f40 + +POW_P3 = f41 +POW_P0 = f42 +POW_log2_lo = f43 +POW_r = f44 +POW_Q0_half = f45 + +POW_Q1 = f46 +POW_tmp = f47 +POW_log2_hi = f48 +POW_Q4 = f49 +POW_P1 = f50 + +POW_log2_by_128_hi = f51 +POW_inv_log2_by_128 = f52 +POW_rsq = f53 +POW_Yrcub = f54 +POW_log2_by_128_lo = f55 + +POW_v6 = f56 +POW_xsq = f57 +POW_v4 = f58 +POW_v2 = f59 +POW_T = f60 + +POW_Tt = f61 +POW_RSHF = f62 +POW_v21ps = f63 +POW_s4 = f64 +POW_twoV = f65 + +POW_U = f66 +POW_G = f67 +POW_delta = f68 +POW_v3 = f69 +POW_V = f70 + +POW_p = f71 +POW_Z1 = f72 +POW_e3 = f73 +POW_e2 = f74 +POW_Z2 = f75 + +POW_e1 = f76 +POW_W1 = f77 +POW_UmZ2 = f78 +POW_W2 = f79 +POW_Z3 = f80 + +POW_int_W1 = f81 +POW_e12 = f82 +POW_int_W2 = f83 +POW_UmZ2pV = f84 +POW_Z3sq = f85 + +POW_e123 = f86 +POW_N1float = f87 +POW_N2float = f88 +POW_f3 = f89 +POW_q = f90 + +POW_s1 = f91 +POW_Nfloat = f92 +POW_s2 = f93 +POW_f2 = f94 +POW_f1 = f95 + +POW_T1 = f96 +POW_T2 = f97 +POW_2M = f98 +POW_s = f99 +POW_f12 = f100 + +POW_ssq = f101 +POW_T1T2 = f102 +POW_1ps = f103 +POW_A = f104 +POW_es = f105 + +POW_Xp1 = f106 +POW_int_K = f107 +POW_K = f108 +POW_f123 = f109 +POW_Gpr = f110 + +POW_Y_Gpr = f111 +POW_int_Y = f112 +POW_abs_q = f114 +POW_2toM63 = f115 + +POW_float_int_Y = f116 +POW_ftz_urm_f8 = f117 +POW_wre_urm_f8 = f118 +POW_big_neg = f119 +POW_big_pos = f120 + +POW_GY_Z2 = f121 +POW_pYrcub_e3 = f122 +POW_d = f123 +POW_d2 = f124 +POW_poly_d_hi = f121 +POW_poly_d_lo = f122 +POW_poly_d = f121 + +// Data tables +//============================================================== + +RODATA + +.align 16 + +LOCAL_OBJECT_START(pow_table_P) +data8 0x8000F7B249FF332D, 0x0000BFFC // P_5 +data8 0xAAAAAAA9E7902C7F, 0x0000BFFC // P_3 +data8 0x80000000000018E5, 0x0000BFFD // P_1 +data8 0xb8aa3b295c17f0bc, 0x00004006 // inv_ln2_by_128 +// +// +data8 0x3FA5555555554A9E // Q_2 +data8 0x3F8111124F4DD9F9 // Q_3 +data8 0x3FE0000000000000 // Q_0 +data8 0x3FC5555555554733 // Q_1 +data8 0x3F56C16D9360FFA0 // Q_4 +data8 0x43e8000000000000 // Right shift constant for exp +data8 0xc9e3b39803f2f6af, 0x00003fb7 // ln2_by_128_lo +data8 0x0000000000000000 // pad to eliminate bank conflicts with pow_table_Q +data8 0x0000000000000000 // pad to eliminate bank conflicts with pow_table_Q +LOCAL_OBJECT_END(pow_table_P) + +LOCAL_OBJECT_START(pow_table_Q) +data8 0x9249FE7F0DC423CF, 0x00003FFC // P_4 +data8 0xCCCCCCCC4ED2BA7F, 0x00003FFC // P_2 +data8 0xAAAAAAAAAAAAB505, 0x00003FFD // P_0 +data8 0x3fe62e42fefa39e8, 0x3cccd5e4f1d9cc02 // log2 hi lo = +6.93147e-001 +data8 0xb17217f7d1cf79ab, 0x00003ff7 // ln2_by_128_hi +LOCAL_OBJECT_END(pow_table_Q) + + +LOCAL_OBJECT_START(pow_Tt) +data8 0x3f60040155d58800, 0x3c93bce0ce3ddd81 // log(1/frcpa(1+0/256))= +1.95503e-003 +data8 0x3f78121214586a00, 0x3cb540e0a5cfc9bc // log(1/frcpa(1+1/256))= +5.87661e-003 +data8 0x3f841929f9683200, 0x3cbdf1d57404da1f // log(1/frcpa(1+2/256))= +9.81362e-003 +data8 0x3f8c317384c75f00, 0x3c69806208c04c22 // log(1/frcpa(1+3/256))= +1.37662e-002 +data8 0x3f91a6b91ac73380, 0x3c7874daa716eb32 // log(1/frcpa(1+4/256))= +1.72376e-002 +data8 0x3f95ba9a5d9ac000, 0x3cacbb84e08d78ac // log(1/frcpa(1+5/256))= +2.12196e-002 +data8 0x3f99d2a807432580, 0x3cbcf80538b441e1 // log(1/frcpa(1+6/256))= +2.52177e-002 +data8 0x3f9d6b2725979800, 0x3c6095e5c8f8f359 // log(1/frcpa(1+7/256))= +2.87291e-002 +data8 0x3fa0c58fa19dfa80, 0x3cb4c5d4e9d0dda2 // log(1/frcpa(1+8/256))= +3.27573e-002 +data8 0x3fa2954c78cbce00, 0x3caa932b860ab8d6 // log(1/frcpa(1+9/256))= +3.62953e-002 +data8 0x3fa4a94d2da96c40, 0x3ca670452b76bbd5 // log(1/frcpa(1+10/256))= +4.03542e-002 +data8 0x3fa67c94f2d4bb40, 0x3ca84104f9941798 // log(1/frcpa(1+11/256))= +4.39192e-002 +data8 0x3fa85188b630f040, 0x3cb40a882cbf0153 // log(1/frcpa(1+12/256))= +4.74971e-002 +data8 0x3faa6b8abe73af40, 0x3c988d46e25c9059 // log(1/frcpa(1+13/256))= +5.16017e-002 +data8 0x3fac441e06f72a80, 0x3cae3e930a1a2a96 // log(1/frcpa(1+14/256))= +5.52072e-002 +data8 0x3fae1e6713606d00, 0x3c8a796f6283b580 // log(1/frcpa(1+15/256))= +5.88257e-002 +data8 0x3faffa6911ab9300, 0x3c5193070351e88a // log(1/frcpa(1+16/256))= +6.24574e-002 +data8 0x3fb0ec139c5da600, 0x3c623f2a75eb992d // log(1/frcpa(1+17/256))= +6.61022e-002 +data8 0x3fb1dbd2643d1900, 0x3ca649b2ef8927f0 // log(1/frcpa(1+18/256))= +6.97605e-002 +data8 0x3fb2cc7284fe5f00, 0x3cbc5e86599513e2 // log(1/frcpa(1+19/256))= +7.34321e-002 +data8 0x3fb3bdf5a7d1ee60, 0x3c90bd4bb69dada3 // log(1/frcpa(1+20/256))= +7.71173e-002 +data8 0x3fb4b05d7aa012e0, 0x3c54e377c9b8a54f // log(1/frcpa(1+21/256))= +8.08161e-002 +data8 0x3fb580db7ceb5700, 0x3c7fdb2f98354cde // log(1/frcpa(1+22/256))= +8.39975e-002 +data8 0x3fb674f089365a60, 0x3cb9994c9d3301c1 // log(1/frcpa(1+23/256))= +8.77219e-002 +data8 0x3fb769ef2c6b5680, 0x3caaec639db52a79 // log(1/frcpa(1+24/256))= +9.14602e-002 +data8 0x3fb85fd927506a40, 0x3c9f9f99a3cf8e25 // log(1/frcpa(1+25/256))= +9.52125e-002 +data8 0x3fb9335e5d594980, 0x3ca15c3abd47d99a // log(1/frcpa(1+26/256))= +9.84401e-002 +data8 0x3fba2b0220c8e5e0, 0x3cb4ca639adf6fc3 // log(1/frcpa(1+27/256))= +1.02219e-001 +data8 0x3fbb0004ac1a86a0, 0x3ca7cb81bf959a59 // log(1/frcpa(1+28/256))= +1.05469e-001 +data8 0x3fbbf968769fca00, 0x3cb0c646c121418e // log(1/frcpa(1+29/256))= +1.09274e-001 +data8 0x3fbccfedbfee13a0, 0x3ca0465fce24ab4b // log(1/frcpa(1+30/256))= +1.12548e-001 +data8 0x3fbda727638446a0, 0x3c82803f4e2e6603 // log(1/frcpa(1+31/256))= +1.15832e-001 +data8 0x3fbea3257fe10f60, 0x3cb986a3f2313d1a // log(1/frcpa(1+32/256))= +1.19677e-001 +data8 0x3fbf7be9fedbfde0, 0x3c97d16a6a621cf4 // log(1/frcpa(1+33/256))= +1.22985e-001 +data8 0x3fc02ab352ff25f0, 0x3c9cc6baad365600 // log(1/frcpa(1+34/256))= +1.26303e-001 +data8 0x3fc097ce579d2040, 0x3cb9ba16d329440b // log(1/frcpa(1+35/256))= +1.29633e-001 +data8 0x3fc1178e8227e470, 0x3cb7bc671683f8e6 // log(1/frcpa(1+36/256))= +1.33531e-001 +data8 0x3fc185747dbecf30, 0x3c9d1116f66d2345 // log(1/frcpa(1+37/256))= +1.36885e-001 +data8 0x3fc1f3b925f25d40, 0x3c8162c9ef939ac6 // log(1/frcpa(1+38/256))= +1.40250e-001 +data8 0x3fc2625d1e6ddf50, 0x3caad3a1ec384fc3 // log(1/frcpa(1+39/256))= +1.43627e-001 +data8 0x3fc2d1610c868130, 0x3cb3ad997036941b // log(1/frcpa(1+40/256))= +1.47015e-001 +data8 0x3fc340c597411420, 0x3cbc2308262c7998 // log(1/frcpa(1+41/256))= +1.50414e-001 +data8 0x3fc3b08b6757f2a0, 0x3cb2170d6cdf0526 // log(1/frcpa(1+42/256))= +1.53825e-001 +data8 0x3fc40dfb08378000, 0x3c9bb453c4f7b685 // log(1/frcpa(1+43/256))= +1.56677e-001 +data8 0x3fc47e74e8ca5f70, 0x3cb836a48fdfce9d // log(1/frcpa(1+44/256))= +1.60109e-001 +data8 0x3fc4ef51f6466de0, 0x3ca07a43919aa64b // log(1/frcpa(1+45/256))= +1.63553e-001 +data8 0x3fc56092e02ba510, 0x3ca85006899d97b0 // log(1/frcpa(1+46/256))= +1.67010e-001 +data8 0x3fc5d23857cd74d0, 0x3ca30a5ba6e7abbe // log(1/frcpa(1+47/256))= +1.70478e-001 +data8 0x3fc6313a37335d70, 0x3ca905586f0ac97e // log(1/frcpa(1+48/256))= +1.73377e-001 +data8 0x3fc6a399dabbd380, 0x3c9b2c6657a96684 // log(1/frcpa(1+49/256))= +1.76868e-001 +data8 0x3fc70337dd3ce410, 0x3cb50bc52f55cdd8 // log(1/frcpa(1+50/256))= +1.79786e-001 +data8 0x3fc77654128f6120, 0x3cad2eb7c9a39efe // log(1/frcpa(1+51/256))= +1.83299e-001 +data8 0x3fc7e9d82a0b0220, 0x3cba127e90393c01 // log(1/frcpa(1+52/256))= +1.86824e-001 +data8 0x3fc84a6b759f5120, 0x3cbd7fd52079f706 // log(1/frcpa(1+53/256))= +1.89771e-001 +data8 0x3fc8ab47d5f5a300, 0x3cbfae141751a3de // log(1/frcpa(1+54/256))= +1.92727e-001 +data8 0x3fc91fe490965810, 0x3cb69cf30a1c319e // log(1/frcpa(1+55/256))= +1.96286e-001 +data8 0x3fc981634011aa70, 0x3ca5bb3d208bc42a // log(1/frcpa(1+56/256))= +1.99261e-001 +data8 0x3fc9f6c407089660, 0x3ca04d68658179a0 // log(1/frcpa(1+57/256))= +2.02843e-001 +data8 0x3fca58e729348f40, 0x3c99f5411546c286 // log(1/frcpa(1+58/256))= +2.05838e-001 +data8 0x3fcabb55c31693a0, 0x3cb9a5350eb327d5 // log(1/frcpa(1+59/256))= +2.08842e-001 +data8 0x3fcb1e104919efd0, 0x3c18965fcce7c406 // log(1/frcpa(1+60/256))= +2.11855e-001 +data8 0x3fcb94ee93e367c0, 0x3cb503716da45184 // log(1/frcpa(1+61/256))= +2.15483e-001 +data8 0x3fcbf851c0675550, 0x3cbdf1b3f7ab5378 // log(1/frcpa(1+62/256))= +2.18516e-001 +data8 0x3fcc5c0254bf23a0, 0x3ca7aab9ed0b1d7b // log(1/frcpa(1+63/256))= +2.21558e-001 +data8 0x3fccc000c9db3c50, 0x3c92a7a2a850072a // log(1/frcpa(1+64/256))= +2.24609e-001 +data8 0x3fcd244d99c85670, 0x3c9f6019120edf4c // log(1/frcpa(1+65/256))= +2.27670e-001 +data8 0x3fcd88e93fb2f450, 0x3c6affb96815e081 // log(1/frcpa(1+66/256))= +2.30741e-001 +data8 0x3fcdedd437eaef00, 0x3c72553595897976 // log(1/frcpa(1+67/256))= +2.33820e-001 +data8 0x3fce530effe71010, 0x3c90913b020fa182 // log(1/frcpa(1+68/256))= +2.36910e-001 +data8 0x3fceb89a1648b970, 0x3c837ba4045bfd25 // log(1/frcpa(1+69/256))= +2.40009e-001 +data8 0x3fcf1e75fadf9bd0, 0x3cbcea6d13e0498d // log(1/frcpa(1+70/256))= +2.43117e-001 +data8 0x3fcf84a32ead7c30, 0x3ca5e3a67b3c6d77 // log(1/frcpa(1+71/256))= +2.46235e-001 +data8 0x3fcfeb2233ea07c0, 0x3cba0c6f0049c5a6 // log(1/frcpa(1+72/256))= +2.49363e-001 +data8 0x3fd028f9c7035c18, 0x3cb0a30b06677ff6 // log(1/frcpa(1+73/256))= +2.52501e-001 +data8 0x3fd05c8be0d96358, 0x3ca0f1c77ccb5865 // log(1/frcpa(1+74/256))= +2.55649e-001 +data8 0x3fd085eb8f8ae790, 0x3cbd513f45fe7a97 // log(1/frcpa(1+75/256))= +2.58174e-001 +data8 0x3fd0b9c8e32d1910, 0x3c927449047ca006 // log(1/frcpa(1+76/256))= +2.61339e-001 +data8 0x3fd0edd060b78080, 0x3c89b52d8435f53e // log(1/frcpa(1+77/256))= +2.64515e-001 +data8 0x3fd122024cf00638, 0x3cbdd976fabda4bd // log(1/frcpa(1+78/256))= +2.67701e-001 +data8 0x3fd14be2927aecd0, 0x3cb02f90ad0bc471 // log(1/frcpa(1+79/256))= +2.70257e-001 +data8 0x3fd180618ef18ad8, 0x3cbd003792c71a98 // log(1/frcpa(1+80/256))= +2.73461e-001 +data8 0x3fd1b50bbe2fc638, 0x3ca9ae64c6403ead // log(1/frcpa(1+81/256))= +2.76675e-001 +data8 0x3fd1df4cc7cf2428, 0x3cb43f0455f7e395 // log(1/frcpa(1+82/256))= +2.79254e-001 +data8 0x3fd214456d0eb8d0, 0x3cb0fbd748d75d30 // log(1/frcpa(1+83/256))= +2.82487e-001 +data8 0x3fd23ec5991eba48, 0x3c906edd746b77e2 // log(1/frcpa(1+84/256))= +2.85081e-001 +data8 0x3fd2740d9f870af8, 0x3ca9802e6a00a670 // log(1/frcpa(1+85/256))= +2.88333e-001 +data8 0x3fd29ecdabcdfa00, 0x3cacecef70890cfa // log(1/frcpa(1+86/256))= +2.90943e-001 +data8 0x3fd2d46602adcce8, 0x3cb97911955f3521 // log(1/frcpa(1+87/256))= +2.94214e-001 +data8 0x3fd2ff66b04ea9d0, 0x3cb12dabe191d1c9 // log(1/frcpa(1+88/256))= +2.96838e-001 +data8 0x3fd335504b355a30, 0x3cbdf9139df924ec // log(1/frcpa(1+89/256))= +3.00129e-001 +data8 0x3fd360925ec44f58, 0x3cb253e68977a1e3 // log(1/frcpa(1+90/256))= +3.02769e-001 +data8 0x3fd38bf1c3337e70, 0x3cb3d283d2a2da21 // log(1/frcpa(1+91/256))= +3.05417e-001 +data8 0x3fd3c25277333180, 0x3cadaa5b035eae27 // log(1/frcpa(1+92/256))= +3.08735e-001 +data8 0x3fd3edf463c16838, 0x3cb983d680d3c108 // log(1/frcpa(1+93/256))= +3.11399e-001 +data8 0x3fd419b423d5e8c0, 0x3cbc86dd921c139d // log(1/frcpa(1+94/256))= +3.14069e-001 +data8 0x3fd44591e0539f48, 0x3c86a76d6dc2782e // log(1/frcpa(1+95/256))= +3.16746e-001 +data8 0x3fd47c9175b6f0a8, 0x3cb59a2e013c6b5f // log(1/frcpa(1+96/256))= +3.20103e-001 +data8 0x3fd4a8b341552b08, 0x3c93f1e86e468694 // log(1/frcpa(1+97/256))= +3.22797e-001 +data8 0x3fd4d4f390890198, 0x3cbf5e4ea7c5105a // log(1/frcpa(1+98/256))= +3.25498e-001 +data8 0x3fd501528da1f960, 0x3cbf58da53e9ad10 // log(1/frcpa(1+99/256))= +3.28206e-001 +data8 0x3fd52dd06347d4f0, 0x3cb98a28cebf6eef // log(1/frcpa(1+100/256))= +3.30921e-001 +data8 0x3fd55a6d3c7b8a88, 0x3c9c76b67c2d1fd4 // log(1/frcpa(1+101/256))= +3.33644e-001 +data8 0x3fd5925d2b112a58, 0x3c9029616a4331b8 // log(1/frcpa(1+102/256))= +3.37058e-001 +data8 0x3fd5bf406b543db0, 0x3c9fb8292ecfc820 // log(1/frcpa(1+103/256))= +3.39798e-001 +data8 0x3fd5ec433d5c35a8, 0x3cb71a1229d17eec // log(1/frcpa(1+104/256))= +3.42545e-001 +data8 0x3fd61965cdb02c18, 0x3cbba94fe1dbb8d2 // log(1/frcpa(1+105/256))= +3.45300e-001 +data8 0x3fd646a84935b2a0, 0x3c9ee496d2c9ae57 // log(1/frcpa(1+106/256))= +3.48063e-001 +data8 0x3fd6740add31de90, 0x3cb1da3a6c7a9dfd // log(1/frcpa(1+107/256))= +3.50833e-001 +data8 0x3fd6a18db74a58c0, 0x3cb494c257add8dc // log(1/frcpa(1+108/256))= +3.53610e-001 +data8 0x3fd6cf31058670e8, 0x3cb0b244a70a8da9 // log(1/frcpa(1+109/256))= +3.56396e-001 +data8 0x3fd6f180e852f0b8, 0x3c9db7aefa866720 // log(1/frcpa(1+110/256))= +3.58490e-001 +data8 0x3fd71f5d71b894e8, 0x3cbe91c4bf324957 // log(1/frcpa(1+111/256))= +3.61289e-001 +data8 0x3fd74d5aefd66d58, 0x3cb06b3d9bfac023 // log(1/frcpa(1+112/256))= +3.64096e-001 +data8 0x3fd77b79922bd378, 0x3cb727d8804491f4 // log(1/frcpa(1+113/256))= +3.66911e-001 +data8 0x3fd7a9b9889f19e0, 0x3ca2ef22df5bc543 // log(1/frcpa(1+114/256))= +3.69734e-001 +data8 0x3fd7d81b037eb6a0, 0x3cb8fd3ba07a7ece // log(1/frcpa(1+115/256))= +3.72565e-001 +data8 0x3fd8069e33827230, 0x3c8bd1e25866e61a // log(1/frcpa(1+116/256))= +3.75404e-001 +data8 0x3fd82996d3ef8bc8, 0x3ca5aab9f5928928 // log(1/frcpa(1+117/256))= +3.77538e-001 +data8 0x3fd85855776dcbf8, 0x3ca56f33337789d6 // log(1/frcpa(1+118/256))= +3.80391e-001 +data8 0x3fd8873658327cc8, 0x3cbb8ef0401db49d // log(1/frcpa(1+119/256))= +3.83253e-001 +data8 0x3fd8aa75973ab8c8, 0x3cbb9961f509a680 // log(1/frcpa(1+120/256))= +3.85404e-001 +data8 0x3fd8d992dc8824e0, 0x3cb220512a53732d // log(1/frcpa(1+121/256))= +3.88280e-001 +data8 0x3fd908d2ea7d9510, 0x3c985f0e513bfb5c // log(1/frcpa(1+122/256))= +3.91164e-001 +data8 0x3fd92c59e79c0e50, 0x3cb82e073fd30d63 // log(1/frcpa(1+123/256))= +3.93332e-001 +data8 0x3fd95bd750ee3ed0, 0x3ca4aa7cdb6dd8a8 // log(1/frcpa(1+124/256))= +3.96231e-001 +data8 0x3fd98b7811a3ee58, 0x3caa93a5b660893e // log(1/frcpa(1+125/256))= +3.99138e-001 +data8 0x3fd9af47f33d4068, 0x3cac294b3b3190ba // log(1/frcpa(1+126/256))= +4.01323e-001 +data8 0x3fd9df270c1914a0, 0x3cbe1a58fd0cd67e // log(1/frcpa(1+127/256))= +4.04245e-001 +data8 0x3fda0325ed14fda0, 0x3cb1efa7950fb57e // log(1/frcpa(1+128/256))= +4.06442e-001 +data8 0x3fda33440224fa78, 0x3c8915fe75e7d477 // log(1/frcpa(1+129/256))= +4.09379e-001 +data8 0x3fda57725e80c380, 0x3ca72bd1062b1b7f // log(1/frcpa(1+130/256))= +4.11587e-001 +data8 0x3fda87d0165dd198, 0x3c91f7845f58dbad // log(1/frcpa(1+131/256))= +4.14539e-001 +data8 0x3fdaac2e6c03f890, 0x3cb6f237a911c509 // log(1/frcpa(1+132/256))= +4.16759e-001 +data8 0x3fdadccc6fdf6a80, 0x3c90ddc4b7687169 // log(1/frcpa(1+133/256))= +4.19726e-001 +data8 0x3fdb015b3eb1e790, 0x3c692dd7d90e1e8e // log(1/frcpa(1+134/256))= +4.21958e-001 +data8 0x3fdb323a3a635948, 0x3c6f85655cbe14de // log(1/frcpa(1+135/256))= +4.24941e-001 +data8 0x3fdb56fa04462908, 0x3c95252d841994de // log(1/frcpa(1+136/256))= +4.27184e-001 +data8 0x3fdb881aa659bc90, 0x3caa53a745a3642f // log(1/frcpa(1+137/256))= +4.30182e-001 +data8 0x3fdbad0bef3db160, 0x3cb32f2540dcc16a // log(1/frcpa(1+138/256))= +4.32437e-001 +data8 0x3fdbd21297781c28, 0x3cbd8e891e106f1d // log(1/frcpa(1+139/256))= +4.34697e-001 +data8 0x3fdc039236f08818, 0x3c809435af522ba7 // log(1/frcpa(1+140/256))= +4.37718e-001 +data8 0x3fdc28cb1e4d32f8, 0x3cb3944752fbd81e // log(1/frcpa(1+141/256))= +4.39990e-001 +data8 0x3fdc4e19b84723c0, 0x3c9a465260cd3fe5 // log(1/frcpa(1+142/256))= +4.42267e-001 +data8 0x3fdc7ff9c74554c8, 0x3c92447d5b6ca369 // log(1/frcpa(1+143/256))= +4.45311e-001 +data8 0x3fdca57b64e9db00, 0x3cb44344a8a00c82 // log(1/frcpa(1+144/256))= +4.47600e-001 +data8 0x3fdccb130a5ceba8, 0x3cbefaddfb97b73f // log(1/frcpa(1+145/256))= +4.49895e-001 +data8 0x3fdcf0c0d18f3268, 0x3cbd3e7bfee57898 // log(1/frcpa(1+146/256))= +4.52194e-001 +data8 0x3fdd232075b5a200, 0x3c9222599987447c // log(1/frcpa(1+147/256))= +4.55269e-001 +data8 0x3fdd490246defa68, 0x3cabafe9a767a80d // log(1/frcpa(1+148/256))= +4.57581e-001 +data8 0x3fdd6efa918d25c8, 0x3cb58a2624e1c6fd // log(1/frcpa(1+149/256))= +4.59899e-001 +data8 0x3fdd9509707ae528, 0x3cbdc3babce578e7 // log(1/frcpa(1+150/256))= +4.62221e-001 +data8 0x3fddbb2efe92c550, 0x3cb0ac0943c434a4 // log(1/frcpa(1+151/256))= +4.64550e-001 +data8 0x3fddee2f3445e4a8, 0x3cbba9d07ce820e8 // log(1/frcpa(1+152/256))= +4.67663e-001 +data8 0x3fde148a1a2726c8, 0x3cb6537e3375b205 // log(1/frcpa(1+153/256))= +4.70004e-001 +data8 0x3fde3afc0a49ff38, 0x3cbfed5518dbc20e // log(1/frcpa(1+154/256))= +4.72350e-001 +data8 0x3fde6185206d5168, 0x3cb6572601f73d5c // log(1/frcpa(1+155/256))= +4.74702e-001 +data8 0x3fde882578823d50, 0x3c9b24abd4584d1a // log(1/frcpa(1+156/256))= +4.77060e-001 +data8 0x3fdeaedd2eac9908, 0x3cb0ceb5e4d2c8f7 // log(1/frcpa(1+157/256))= +4.79423e-001 +data8 0x3fded5ac5f436be0, 0x3ca72f21f1f5238e // log(1/frcpa(1+158/256))= +4.81792e-001 +data8 0x3fdefc9326d16ab8, 0x3c85081a1639a45c // log(1/frcpa(1+159/256))= +4.84166e-001 +data8 0x3fdf2391a21575f8, 0x3cbf11015bdd297a // log(1/frcpa(1+160/256))= +4.86546e-001 +data8 0x3fdf4aa7ee031928, 0x3cb3795bc052a2d1 // log(1/frcpa(1+161/256))= +4.88932e-001 +data8 0x3fdf71d627c30bb0, 0x3c35c61f0f5a88f3 // log(1/frcpa(1+162/256))= +4.91323e-001 +data8 0x3fdf991c6cb3b378, 0x3c97d99419be6028 // log(1/frcpa(1+163/256))= +4.93720e-001 +data8 0x3fdfc07ada69a908, 0x3cbfe9341ded70b1 // log(1/frcpa(1+164/256))= +4.96123e-001 +data8 0x3fdfe7f18eb03d38, 0x3cb85718a640c33f // log(1/frcpa(1+165/256))= +4.98532e-001 +data8 0x3fe007c053c5002c, 0x3cb3addc9c065f09 // log(1/frcpa(1+166/256))= +5.00946e-001 +data8 0x3fe01b942198a5a0, 0x3c9d5aa4c77da6ac // log(1/frcpa(1+167/256))= +5.03367e-001 +data8 0x3fe02f74400c64e8, 0x3cb5a0ee4450ef52 // log(1/frcpa(1+168/256))= +5.05793e-001 +data8 0x3fe04360be7603ac, 0x3c9dd00c35630fe0 // log(1/frcpa(1+169/256))= +5.08225e-001 +data8 0x3fe05759ac47fe30, 0x3cbd063e1f0bd82c // log(1/frcpa(1+170/256))= +5.10663e-001 +data8 0x3fe06b5f1911cf50, 0x3cae8da674af5289 // log(1/frcpa(1+171/256))= +5.13107e-001 +data8 0x3fe078bf0533c568, 0x3c62241edf5fd1f7 // log(1/frcpa(1+172/256))= +5.14740e-001 +data8 0x3fe08cd9687e7b0c, 0x3cb3007febcca227 // log(1/frcpa(1+173/256))= +5.17194e-001 +data8 0x3fe0a10074cf9018, 0x3ca496e84603816b // log(1/frcpa(1+174/256))= +5.19654e-001 +data8 0x3fe0b5343a234474, 0x3cb46098d14fc90a // log(1/frcpa(1+175/256))= +5.22120e-001 +data8 0x3fe0c974c89431cc, 0x3cac0a7cdcbb86c6 // log(1/frcpa(1+176/256))= +5.24592e-001 +data8 0x3fe0ddc2305b9884, 0x3cb2f753210410ff // log(1/frcpa(1+177/256))= +5.27070e-001 +data8 0x3fe0eb524bafc918, 0x3c88affd6682229e // log(1/frcpa(1+178/256))= +5.28726e-001 +data8 0x3fe0ffb54213a474, 0x3cadeefbab9af993 // log(1/frcpa(1+179/256))= +5.31214e-001 +data8 0x3fe114253da97d9c, 0x3cbaf1c2b8bc160a // log(1/frcpa(1+180/256))= +5.33709e-001 +data8 0x3fe128a24f1d9afc, 0x3cb9cf4df375e650 // log(1/frcpa(1+181/256))= +5.36210e-001 +data8 0x3fe1365252bf0864, 0x3c985a621d4be111 // log(1/frcpa(1+182/256))= +5.37881e-001 +data8 0x3fe14ae558b4a92c, 0x3ca104c4aa8977d1 // log(1/frcpa(1+183/256))= +5.40393e-001 +data8 0x3fe15f85a19c7658, 0x3cbadf26e540f375 // log(1/frcpa(1+184/256))= +5.42910e-001 +data8 0x3fe16d4d38c119f8, 0x3cb3aea11caec416 // log(1/frcpa(1+185/256))= +5.44592e-001 +data8 0x3fe18203c20dd130, 0x3cba82d1211d1d6d // log(1/frcpa(1+186/256))= +5.47121e-001 +data8 0x3fe196c7bc4b1f38, 0x3cb6267acc4f4f4a // log(1/frcpa(1+187/256))= +5.49656e-001 +data8 0x3fe1a4a738b7a33c, 0x3c858930213c987d // log(1/frcpa(1+188/256))= +5.51349e-001 +data8 0x3fe1b981c0c9653c, 0x3c9bc2a4a30f697b // log(1/frcpa(1+189/256))= +5.53895e-001 +data8 0x3fe1ce69e8bb1068, 0x3cb7ae6199cf2a00 // log(1/frcpa(1+190/256))= +5.56447e-001 +data8 0x3fe1dc619de06944, 0x3c6b50bb38388177 // log(1/frcpa(1+191/256))= +5.58152e-001 +data8 0x3fe1f160a2ad0da0, 0x3cbd05b2778a5e1d // log(1/frcpa(1+192/256))= +5.60715e-001 +data8 0x3fe2066d7740737c, 0x3cb32e828f9c6bd6 // log(1/frcpa(1+193/256))= +5.63285e-001 +data8 0x3fe2147dba47a390, 0x3cbd579851b8b672 // log(1/frcpa(1+194/256))= +5.65001e-001 +data8 0x3fe229a1bc5ebac0, 0x3cbb321be5237ce8 // log(1/frcpa(1+195/256))= +5.67582e-001 +data8 0x3fe237c1841a502c, 0x3cb3b56e0915ea64 // log(1/frcpa(1+196/256))= +5.69306e-001 +data8 0x3fe24cfce6f80d98, 0x3cb34a4d1a422919 // log(1/frcpa(1+197/256))= +5.71898e-001 +data8 0x3fe25b2c55cd5760, 0x3cb237401ea5015e // log(1/frcpa(1+198/256))= +5.73630e-001 +data8 0x3fe2707f4d5f7c40, 0x3c9d30f20acc8341 // log(1/frcpa(1+199/256))= +5.76233e-001 +data8 0x3fe285e0842ca380, 0x3cbc4d866d5f21c0 // log(1/frcpa(1+200/256))= +5.78842e-001 +data8 0x3fe294294708b770, 0x3cb85e14d5dc54fa // log(1/frcpa(1+201/256))= +5.80586e-001 +data8 0x3fe2a9a2670aff0c, 0x3c7e6f8f468bbf91 // log(1/frcpa(1+202/256))= +5.83207e-001 +data8 0x3fe2b7fb2c8d1cc0, 0x3c930ffcf63c8b65 // log(1/frcpa(1+203/256))= +5.84959e-001 +data8 0x3fe2c65a6395f5f4, 0x3ca0afe20b53d2d2 // log(1/frcpa(1+204/256))= +5.86713e-001 +data8 0x3fe2dbf557b0df40, 0x3cb646be1188fbc9 // log(1/frcpa(1+205/256))= +5.89350e-001 +data8 0x3fe2ea64c3f97654, 0x3c96516fa8df33b2 // log(1/frcpa(1+206/256))= +5.91113e-001 +data8 0x3fe3001823684d70, 0x3cb96d64e16d1360 // log(1/frcpa(1+207/256))= +5.93762e-001 +data8 0x3fe30e97e9a8b5cc, 0x3c98ef96bc97cca0 // log(1/frcpa(1+208/256))= +5.95531e-001 +data8 0x3fe32463ebdd34e8, 0x3caef1dc9a56c1bf // log(1/frcpa(1+209/256))= +5.98192e-001 +data8 0x3fe332f4314ad794, 0x3caa4f0ac5d5fa11 // log(1/frcpa(1+210/256))= +5.99970e-001 +data8 0x3fe348d90e7464cc, 0x3cbe7889f0516acd // log(1/frcpa(1+211/256))= +6.02643e-001 +data8 0x3fe35779f8c43d6c, 0x3ca96bbab7245411 // log(1/frcpa(1+212/256))= +6.04428e-001 +data8 0x3fe36621961a6a98, 0x3ca31f32262db9fb // log(1/frcpa(1+213/256))= +6.06217e-001 +data8 0x3fe37c299f3c3668, 0x3cb15c72c107ee29 // log(1/frcpa(1+214/256))= +6.08907e-001 +data8 0x3fe38ae2171976e4, 0x3cba42a2554b2dd4 // log(1/frcpa(1+215/256))= +6.10704e-001 +data8 0x3fe399a157a603e4, 0x3cb99c62286d8919 // log(1/frcpa(1+216/256))= +6.12504e-001 +data8 0x3fe3afccfe77b9d0, 0x3ca11048f96a43bd // log(1/frcpa(1+217/256))= +6.15210e-001 +data8 0x3fe3be9d503533b4, 0x3ca4022f47588c3e // log(1/frcpa(1+218/256))= +6.17018e-001 +data8 0x3fe3cd7480b4a8a0, 0x3cb4ba7afc2dc56a // log(1/frcpa(1+219/256))= +6.18830e-001 +data8 0x3fe3e3c43918f76c, 0x3c859673d064b8ba // log(1/frcpa(1+220/256))= +6.21554e-001 +data8 0x3fe3f2acb27ed6c4, 0x3cb55c6b452a16a8 // log(1/frcpa(1+221/256))= +6.23373e-001 +data8 0x3fe4019c2125ca90, 0x3cb8c367879c5a31 // log(1/frcpa(1+222/256))= +6.25197e-001 +data8 0x3fe4181061389720, 0x3cb2c17a79c5cc6c // log(1/frcpa(1+223/256))= +6.27937e-001 +data8 0x3fe42711518df544, 0x3ca5f38d47012fc5 // log(1/frcpa(1+224/256))= +6.29769e-001 +data8 0x3fe436194e12b6bc, 0x3cb9854d65a9b426 // log(1/frcpa(1+225/256))= +6.31604e-001 +data8 0x3fe445285d68ea68, 0x3ca3ff9b3a81cd81 // log(1/frcpa(1+226/256))= +6.33442e-001 +data8 0x3fe45bcc464c8938, 0x3cb0a2d8011a6c05 // log(1/frcpa(1+227/256))= +6.36206e-001 +data8 0x3fe46aed21f117fc, 0x3c8a2be41f8e9f3d // log(1/frcpa(1+228/256))= +6.38053e-001 +data8 0x3fe47a1527e8a2d0, 0x3cba4a83594fab09 // log(1/frcpa(1+229/256))= +6.39903e-001 +data8 0x3fe489445efffcc8, 0x3cbf306a23dcbcde // log(1/frcpa(1+230/256))= +6.41756e-001 +data8 0x3fe4a018bcb69834, 0x3ca46c9285029fd1 // log(1/frcpa(1+231/256))= +6.44543e-001 +data8 0x3fe4af5a0c9d65d4, 0x3cbbc1db897580e3 // log(1/frcpa(1+232/256))= +6.46405e-001 +data8 0x3fe4bea2a5bdbe84, 0x3cb84d880d7ef775 // log(1/frcpa(1+233/256))= +6.48271e-001 +data8 0x3fe4cdf28f10ac44, 0x3cb3ec4b7893ce1f // log(1/frcpa(1+234/256))= +6.50140e-001 +data8 0x3fe4dd49cf994058, 0x3c897224d59d3408 // log(1/frcpa(1+235/256))= +6.52013e-001 +data8 0x3fe4eca86e64a680, 0x3cbccf620f24f0cd // log(1/frcpa(1+236/256))= +6.53889e-001 +data8 0x3fe503c43cd8eb68, 0x3c3f872c65971084 // log(1/frcpa(1+237/256))= +6.56710e-001 +data8 0x3fe513356667fc54, 0x3cb9ca64cc3d52c8 // log(1/frcpa(1+238/256))= +6.58595e-001 +data8 0x3fe522ae0738a3d4, 0x3cbe708164c75968 // log(1/frcpa(1+239/256))= +6.60483e-001 +data8 0x3fe5322e26867854, 0x3cb9988ba4aea615 // log(1/frcpa(1+240/256))= +6.62376e-001 +data8 0x3fe541b5cb979808, 0x3ca1662e3a6b95f5 // log(1/frcpa(1+241/256))= +6.64271e-001 +data8 0x3fe55144fdbcbd60, 0x3cb3acd4ca45c1e0 // log(1/frcpa(1+242/256))= +6.66171e-001 +data8 0x3fe560dbc45153c4, 0x3cb4988947959fed // log(1/frcpa(1+243/256))= +6.68074e-001 +data8 0x3fe5707a26bb8c64, 0x3cb3017fe6607ba9 // log(1/frcpa(1+244/256))= +6.69980e-001 +data8 0x3fe587f60ed5b8fc, 0x3cbe7a3266366ed4 // log(1/frcpa(1+245/256))= +6.72847e-001 +data8 0x3fe597a7977c8f30, 0x3ca1e12b9959a90e // log(1/frcpa(1+246/256))= +6.74763e-001 +data8 0x3fe5a760d634bb88, 0x3cb7c365e53d9602 // log(1/frcpa(1+247/256))= +6.76682e-001 +data8 0x3fe5b721d295f10c, 0x3cb716c2551ccbf0 // log(1/frcpa(1+248/256))= +6.78605e-001 +data8 0x3fe5c6ea94431ef8, 0x3ca02b2ed0e28261 // log(1/frcpa(1+249/256))= +6.80532e-001 +data8 0x3fe5d6bb22ea86f4, 0x3caf43a8bbb2f974 // log(1/frcpa(1+250/256))= +6.82462e-001 +data8 0x3fe5e6938645d38c, 0x3cbcedc98821b333 // log(1/frcpa(1+251/256))= +6.84397e-001 +data8 0x3fe5f673c61a2ed0, 0x3caa385eef5f2789 // log(1/frcpa(1+252/256))= +6.86335e-001 +data8 0x3fe6065bea385924, 0x3cb11624f165c5b4 // log(1/frcpa(1+253/256))= +6.88276e-001 +data8 0x3fe6164bfa7cc068, 0x3cbad884f87073fa // log(1/frcpa(1+254/256))= +6.90222e-001 +data8 0x3fe62643fecf9740, 0x3cb78c51da12f4df // log(1/frcpa(1+255/256))= +6.92171e-001 +LOCAL_OBJECT_END(pow_Tt) + + +// Table 1 is 2^(index_1/128) where +// index_1 goes from 0 to 15 +LOCAL_OBJECT_START(pow_tbl1) +data8 0x8000000000000000 , 0x00003FFF +data8 0x80B1ED4FD999AB6C , 0x00003FFF +data8 0x8164D1F3BC030773 , 0x00003FFF +data8 0x8218AF4373FC25EC , 0x00003FFF +data8 0x82CD8698AC2BA1D7 , 0x00003FFF +data8 0x8383594EEFB6EE37 , 0x00003FFF +data8 0x843A28C3ACDE4046 , 0x00003FFF +data8 0x84F1F656379C1A29 , 0x00003FFF +data8 0x85AAC367CC487B15 , 0x00003FFF +data8 0x8664915B923FBA04 , 0x00003FFF +data8 0x871F61969E8D1010 , 0x00003FFF +data8 0x87DB357FF698D792 , 0x00003FFF +data8 0x88980E8092DA8527 , 0x00003FFF +data8 0x8955EE03618E5FDD , 0x00003FFF +data8 0x8A14D575496EFD9A , 0x00003FFF +data8 0x8AD4C6452C728924 , 0x00003FFF +LOCAL_OBJECT_END(pow_tbl1) + + +// Table 2 is 2^(index_1/8) where +// index_2 goes from 0 to 7 +LOCAL_OBJECT_START(pow_tbl2) +data8 0x8000000000000000 , 0x00003FFF +data8 0x8B95C1E3EA8BD6E7 , 0x00003FFF +data8 0x9837F0518DB8A96F , 0x00003FFF +data8 0xA5FED6A9B15138EA , 0x00003FFF +data8 0xB504F333F9DE6484 , 0x00003FFF +data8 0xC5672A115506DADD , 0x00003FFF +data8 0xD744FCCAD69D6AF4 , 0x00003FFF +data8 0xEAC0C6E7DD24392F , 0x00003FFF +LOCAL_OBJECT_END(pow_tbl2) + +.section .text +GLOBAL_LIBM_ENTRY(pow) + +// Get exponent of x. Will be used to calculate K. +{ .mfi + getf.exp pow_GR_signexp_X = f8 + fms.s1 POW_Xm1 = f8,f1,f1 // Will be used for r1 if x>0 + mov pow_GR_17ones = 0x1FFFF +} +{ .mfi + addl pow_AD_P = @ltoff(pow_table_P), gp + fma.s1 POW_Xp1 = f8,f1,f1 // Will be used for r1 if x<0 + nop.i 999 +;; +} + +// Get significand of x. Will be used to get index to fetch T, Tt. +{ .mfi + getf.sig pow_GR_sig_X = f8 + frcpa.s1 POW_B, p6 = f1,f8 + nop.i 999 +} +{ .mfi + ld8 pow_AD_P = [pow_AD_P] + fma.s1 POW_NORM_X = f8,f1,f0 + mov pow_GR_exp_2tom8 = 0xFFF7 +} +;; + +// p13 = TRUE ==> X is unorm +// DOUBLE 0x10033 exponent limit at which y is an integer +{ .mfi + nop.m 999 + fclass.m p13,p0 = f8, 0x0b // Test for x unorm + addl pow_GR_10033 = 0x10033, r0 +} +{ .mfi + mov pow_GR_16ones = 0xFFFF + fma.s1 POW_NORM_Y = f9,f1,f0 + nop.i 999 +} +;; + +// p14 = TRUE ==> X is ZERO +{ .mfi + adds pow_AD_Tt = pow_Tt - pow_table_P, pow_AD_P + fclass.m p14,p0 = f8, 0x07 + and pow_GR_exp_X = pow_GR_signexp_X, pow_GR_17ones +} +{ .mfi + adds pow_AD_Q = pow_table_Q - pow_table_P, pow_AD_P + nop.f 999 + nop.i 999 +} +;; + +{ .mfi + ldfe POW_P5 = [pow_AD_P], 16 + fcmp.lt.s1 p8,p9 = f8, f0 // Test for x<0 + nop.i 999 +} +{ .mib + ldfe POW_P4 = [pow_AD_Q], 16 + sub pow_GR_true_exp_X = pow_GR_exp_X, pow_GR_16ones +(p13) br.cond.spnt POW_X_DENORM +} +;; + +// Continue normal and denormal paths here +POW_COMMON: +// p11 = TRUE ==> Y is a NAN +{ .mfi + ldfe POW_P3 = [pow_AD_P], 16 + fclass.m p11,p0 = f9, 0xc3 + nop.i 999 +} +{ .mfi + ldfe POW_P2 = [pow_AD_Q], 16 + nop.f 999 + mov pow_GR_y_zero = 0 +} +;; + +// Note POW_Xm1 and POW_r1 are used interchangably +{ .mfi + alloc r32=ar.pfs,2,19,4,0 + fms.s1 POW_r = POW_B, POW_NORM_X,f1 + nop.i 999 +} +{ .mfi + setf.sig POW_int_K = pow_GR_true_exp_X +(p8) fnma.s1 POW_Xm1 = POW_Xp1,f1,f0 + nop.i 999 +} +;; + +// p12 = TRUE if Y is ZERO +// Compute xsq to decide later if |x|=1 +{ .mfi + ldfe POW_P1 = [pow_AD_P], 16 + fclass.m p12,p0 = f9, 0x07 + shl pow_GR_offset = pow_GR_sig_X, 1 +} +{ .mfb + ldfe POW_P0 = [pow_AD_Q], 16 + fma.s1 POW_xsq = POW_NORM_X, POW_NORM_X, f0 +(p11) br.cond.spnt POW_Y_NAN // Branch if y=nan +} +;; + +// Get exponent of |x|-1 to use in comparison to 2^-8 +{ .mfi + getf.exp pow_GR_signexp_Xm1 = POW_Xm1 + fcvt.fx.s1 POW_int_Y = POW_NORM_Y + shr.u pow_GR_offset = pow_GR_offset,56 +} +;; + +// p11 = TRUE ==> X is a NAN +{ .mfi + ldfpd POW_log2_hi, POW_log2_lo = [pow_AD_Q], 16 + fclass.m p11,p0 = f8, 0xc3 + shladd pow_AD_Tt = pow_GR_offset, 4, pow_AD_Tt +} +{ .mfi + ldfe POW_inv_log2_by_128 = [pow_AD_P], 16 + fma.s1 POW_delta = f0,f0,f0 // delta=0 in case |x| near 1 +(p12) mov pow_GR_y_zero = 1 +} +;; + +{ .mfi + ldfpd POW_Q2, POW_Q3 = [pow_AD_P], 16 + fma.s1 POW_G = f0,f0,f0 // G=0 in case |x| near 1 + and pow_GR_exp_Xm1 = pow_GR_signexp_Xm1, pow_GR_17ones +} +;; + +// Determine if we will use the |x| near 1 path (p6) or normal path (p7) +{ .mfi + getf.exp pow_GR_signexp_Y = POW_NORM_Y + nop.f 999 + cmp.lt p6,p7 = pow_GR_exp_Xm1, pow_GR_exp_2tom8 +} +{ .mfb + ldfpd POW_T, POW_Tt = [pow_AD_Tt], 16 + fma.s1 POW_rsq = POW_r, POW_r,f0 +(p11) br.cond.spnt POW_X_NAN // Branch if x=nan and y not nan +} +;; + +// If on the x near 1 path, assign r1 to r and r1*r1 to rsq +{ .mfi + ldfpd POW_Q0_half, POW_Q1 = [pow_AD_P], 16 +(p6) fma.s1 POW_r = POW_r1, f1, f0 + nop.i 999 +} +{ .mfb + nop.m 999 +(p6) fma.s1 POW_rsq = POW_r1, POW_r1, f0 +(p14) br.cond.spnt POW_X_0 // Branch if x zero and y not nan +} +;; + +{ .mfi + ldfpd POW_Q4, POW_RSHF = [pow_AD_P], 16 +(p7) fma.s1 POW_v6 = POW_r, POW_P5, POW_P4 + nop.i 999 +} +{ .mfi + mov pow_GR_exp_2toM63 = 0xffc0 // Exponent of 2^-63 +(p6) fma.s1 POW_v6 = POW_r1, POW_P5, POW_P4 + nop.i 999 +} +;; + +{ .mfi + setf.exp POW_2toM63 = pow_GR_exp_2toM63 // Form 2^-63 for test of q +(p7) fma.s1 POW_v4 = POW_P3, POW_r, POW_P2 + nop.i 999 +} +{ .mfi + nop.m 999 +(p6) fma.s1 POW_v4 = POW_P3, POW_r1, POW_P2 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fcvt.xf POW_K = POW_int_K + nop.i 999 +} +;; + +{ .mfi + getf.sig pow_GR_sig_int_Y = POW_int_Y + fnma.s1 POW_twoV = POW_NORM_Y, POW_rsq,f0 + and pow_GR_exp_Y = pow_GR_signexp_Y, pow_GR_17ones +} +{ .mfb + andcm pow_GR_sign_Y = pow_GR_signexp_Y, pow_GR_17ones + fma.s1 POW_U = POW_NORM_Y,POW_r,f0 +(p12) br.cond.spnt POW_Y_0 // Branch if y=zero, x not zero or nan +} +;; + +// p11 = TRUE ==> X is NEGATIVE but not inf +{ .mfi + ldfe POW_log2_by_128_lo = [pow_AD_P], 16 + fclass.m p11,p0 = f8, 0x1a + nop.i 999 +} +{ .mfi + ldfe POW_log2_by_128_hi = [pow_AD_Q], 16 + fma.s1 POW_v2 = POW_P1, POW_r, POW_P0 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fcvt.xf POW_float_int_Y = POW_int_Y + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 POW_v3 = POW_v6, POW_rsq, POW_v4 + adds pow_AD_tbl1 = pow_tbl1 - pow_Tt, pow_AD_Q +} +;; + +{ .mfi + nop.m 999 +(p7) fma.s1 POW_delta = POW_K, POW_log2_lo, POW_Tt + nop.i 999 +} +{ .mfi + nop.m 999 +(p7) fma.s1 POW_G = POW_K, POW_log2_hi, POW_T + adds pow_AD_tbl2 = pow_tbl2 - pow_tbl1, pow_AD_tbl1 +} +;; + +{ .mfi + nop.m 999 + fms.s1 POW_e2 = POW_NORM_Y, POW_r, POW_U + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 POW_Z2 = POW_twoV, POW_Q0_half, POW_U + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 POW_Yrcub = POW_rsq, POW_U, f0 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 POW_p = POW_rsq, POW_v3, POW_v2 + nop.i 999 +} +;; + +// p11 = TRUE ==> X is NEGATIVE but not inf +// p12 = TRUE ==> X is NEGATIVE AND Y already even int +// p13 = TRUE ==> X is NEGATIVE AND Y possible int +{ .mfi + nop.m 999 + fma.s1 POW_Z1 = POW_NORM_Y, POW_G, f0 +(p11) cmp.gt.unc p12,p13 = pow_GR_exp_Y, pow_GR_10033 +} +{ .mfi + nop.m 999 + fma.s1 POW_Gpr = POW_G, f1, POW_r + nop.i 999 +} +;; + +// By adding RSHF (1.1000...*2^63) we put integer part in rightmost significand +{ .mfi + nop.m 999 + fma.s1 POW_W2 = POW_Z2, POW_inv_log2_by_128, POW_RSHF + nop.i 999 +} +{ .mfi + nop.m 999 + fms.s1 POW_UmZ2 = POW_U, f1, POW_Z2 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 POW_e3 = POW_NORM_Y, POW_delta, f0 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 POW_Z3 = POW_p, POW_Yrcub, f0 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 POW_GY_Z2 = POW_G, POW_NORM_Y, POW_Z2 + nop.i 999 +} +;; + +// By adding RSHF (1.1000...*2^63) we put integer part in rightmost significand +{ .mfi + nop.m 999 + fms.s1 POW_e1 = POW_NORM_Y, POW_G, POW_Z1 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 POW_W1 = POW_Z1, POW_inv_log2_by_128, POW_RSHF + nop.i 999 +} +;; + +// p13 = TRUE ==> X is NEGATIVE AND Y possible int +// p10 = TRUE ==> X is NEG and Y is an int +// p12 = TRUE ==> X is NEG and Y is not an int +{ .mfi + nop.m 999 +(p13) fcmp.eq.unc.s1 p10,p12 = POW_float_int_Y, POW_NORM_Y + mov pow_GR_xneg_yodd = 0 +} +{ .mfi + nop.m 999 + fma.s1 POW_Y_Gpr = POW_NORM_Y, POW_Gpr, f0 + nop.i 999 +} +;; + +// By subtracting RSHF we get rounded integer POW_N2float +{ .mfi + nop.m 999 + fms.s1 POW_N2float = POW_W2, f1, POW_RSHF + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 POW_UmZ2pV = POW_twoV,POW_Q0_half,POW_UmZ2 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 POW_Z3sq = POW_Z3, POW_Z3, f0 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 POW_v4 = POW_Z3, POW_Q3, POW_Q2 + nop.i 999 +} +;; + +// Extract rounded integer from rightmost significand of POW_W2 +// By subtracting RSHF we get rounded integer POW_N1float +{ .mfi + getf.sig pow_GR_int_W2 = POW_W2 + fms.s1 POW_N1float = POW_W1, f1, POW_RSHF + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 POW_v2 = POW_Z3, POW_Q1, POW_Q0_half + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fnma.s1 POW_s2 = POW_N2float, POW_log2_by_128_hi, POW_Z2 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 POW_e2 = POW_e2,f1,POW_UmZ2pV + nop.i 999 +} +;; + +// Extract rounded integer from rightmost significand of POW_W1 +// Test if x inf +{ .mfi + getf.sig pow_GR_int_W1 = POW_W1 + fclass.m p15,p0 = POW_NORM_X, 0x23 + nop.i 999 +} +{ .mfb + nop.m 999 + fnma.s1 POW_f2 = POW_N2float, POW_log2_by_128_lo, f1 +(p12) br.cond.spnt POW_X_NEG_Y_NONINT // Branch if x neg, y not integer +} +;; + +// p11 = TRUE ==> X is +1.0 +// p12 = TRUE ==> X is NEGATIVE AND Y is an odd integer +{ .mfi + getf.exp pow_GR_signexp_Y_Gpr = POW_Y_Gpr + fcmp.eq.s1 p11,p0 = POW_NORM_X, f1 +(p10) tbit.nz.unc p12,p0 = pow_GR_sig_int_Y,0 +} +{ .mfi + nop.m 999 + fma.s1 POW_v3 = POW_Z3sq, POW_Q4, POW_v4 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fnma.s1 POW_f1 = POW_N1float, POW_log2_by_128_lo, f1 + nop.i 999 +} +{ .mfb + nop.m 999 + fnma.s1 POW_s1 = POW_N1float, POW_log2_by_128_hi, POW_Z1 +(p15) br.cond.spnt POW_X_INF +} +;; + +// Test x and y and flag denormal +{ .mfi + nop.m 999 + fcmp.eq.s0 p15,p0 = f8,f9 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 POW_pYrcub_e3 = POW_p, POW_Yrcub, POW_e3 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fcmp.eq.s1 p7,p0 = POW_NORM_Y, f1 // Test for y=1.0 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 POW_e12 = POW_e1,f1,POW_e2 + nop.i 999 +} +;; + +{ .mfi + add pow_GR_int_N = pow_GR_int_W1, pow_GR_int_W2 +(p11) fma.d.s0 f8 = f1,f1,f0 // If x=1, result is +1 + nop.i 999 +} +{ .mib +(p12) mov pow_GR_xneg_yodd = 1 + nop.i 999 +(p11) br.ret.spnt b0 // Early exit if x=1.0, result is +1 +} +;; + +{ .mfi + and pow_GR_index1 = 0x0f, pow_GR_int_N + fma.s1 POW_q = POW_Z3sq, POW_v3, POW_v2 + shr pow_int_GR_M = pow_GR_int_N, 7 // M = N/128 +} +{ .mib + and pow_GR_index2 = 0x70, pow_GR_int_N + cmp.eq p6, p0 = pow_GR_xneg_yodd, r0 +(p7) br.ret.spnt b0 // Early exit if y=1.0, result is x +} +;; + +{ .mfi + shladd pow_AD_T1 = pow_GR_index1, 4, pow_AD_tbl1 + fma.s1 POW_s = POW_s1, f1, POW_s2 + add pow_int_GR_M = pow_GR_16ones, pow_int_GR_M +} +{ .mfi + add pow_AD_T2 = pow_AD_tbl2, pow_GR_index2 + fma.s1 POW_f12 = POW_f1, POW_f2,f0 + and pow_GR_exp_Y_Gpr = pow_GR_signexp_Y_Gpr, pow_GR_17ones +} +;; + +{ .mmi + ldfe POW_T1 = [pow_AD_T1] + ldfe POW_T2 = [pow_AD_T2] + sub pow_GR_true_exp_Y_Gpr = pow_GR_exp_Y_Gpr, pow_GR_16ones +} +;; + +{ .mfi + setf.exp POW_2M = pow_int_GR_M + fma.s1 POW_e123 = POW_e12, f1, POW_e3 + nop.i 999 +} +{ .mfb +(p6) cmp.gt p6, p0 = -11, pow_GR_true_exp_Y_Gpr + fma.s1 POW_d = POW_GY_Z2, f1, POW_pYrcub_e3 +(p6) br.cond.spnt POW_NEAR_ONE // branch if |y*log(x)| < 2^(-11) +} +;; + +{ .mfi + nop.m 999 + fma.s1 POW_q = POW_Z3sq, POW_q, POW_Z3 + nop.i 999 +} +;; + +// p8 TRUE ==> |Y(G + r)| >= 10 + +// double +// -2^10 -2^9 2^9 2^10 +// -----+-----+----+ ... +-----+-----+----- +// p8 | p9 | p8 +// | | p10 | | + +// Form signexp of constants to indicate overflow +{ .mfi + mov pow_GR_big_pos = 0x103ff + fma.s1 POW_ssq = POW_s, POW_s, f0 + cmp.le p8,p9 = 10, pow_GR_true_exp_Y_Gpr +} +{ .mfi + mov pow_GR_big_neg = 0x303ff + fma.s1 POW_v4 = POW_s, POW_Q3, POW_Q2 + andcm pow_GR_sign_Y_Gpr = pow_GR_signexp_Y_Gpr, pow_GR_17ones +} +;; + +// Form big positive and negative constants to test for possible overflow +{ .mfi + setf.exp POW_big_pos = pow_GR_big_pos + fma.s1 POW_v2 = POW_s, POW_Q1, POW_Q0_half +(p9) cmp.le.unc p0,p10 = 9, pow_GR_true_exp_Y_Gpr +} +{ .mfb + setf.exp POW_big_neg = pow_GR_big_neg + fma.s1 POW_1ps = f1,f1,POW_s +(p8) br.cond.spnt POW_OVER_UNDER_X_NOT_INF +} +;; + +// f123 = f12*(e123+1) = f12*e123+f12 +{ .mfi + nop.m 999 + fma.s1 POW_f123 = POW_e123,POW_f12,POW_f12 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 POW_T1T2 = POW_T1, POW_T2, f0 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 POW_v3 = POW_ssq, POW_Q4, POW_v4 + cmp.ne p12,p13 = pow_GR_xneg_yodd, r0 +} +;; + +{ .mfi + nop.m 999 + fma.s1 POW_v21ps = POW_ssq, POW_v2, POW_1ps + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 POW_s4 = POW_ssq, POW_ssq, f0 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p12) fnma.s1 POW_A = POW_2M, POW_f123, f0 + nop.i 999 +} +{ .mfi + nop.m 999 +(p13) fma.s1 POW_A = POW_2M, POW_f123, f0 + cmp.eq p14,p11 = r0,r0 // Initialize p14 on, p11 off +} +;; + +{ .mfi + nop.m 999 + fmerge.s POW_abs_q = f0, POW_q // Form |q| so can test its size + nop.i 999 +} +;; + +{ .mfi +(p10) cmp.eq p0,p14 = r0,r0 // Turn off p14 if no overflow + fma.s1 POW_es = POW_s4, POW_v3, POW_v21ps + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 POW_A = POW_A, POW_T1T2, f0 + nop.i 999 +} +;; + +{ .mfi +// Test for |q| < 2^-63. If so then reverse last two steps of the result +// to avoid monotonicity problems for results near 1.0 in round up/down/zero. +// p11 will be set if need to reverse the order, p14 if not. + nop.m 999 +(p10) fcmp.lt.s0 p11,p14 = POW_abs_q, POW_2toM63 // Test |q| <2^-63 + nop.i 999 +} +;; + +.pred.rel "mutex",p11,p14 +{ .mfi + nop.m 999 +(p14) fma.s1 POW_A = POW_A, POW_es, f0 + nop.i 999 +} +{ .mfi + nop.m 999 +(p11) fma.s1 POW_A = POW_A, POW_q, POW_A + nop.i 999 +} +;; + +// Dummy op to set inexact if |q| < 2^-63 +{ .mfi + nop.m 999 +(p11) fma.d.s0 POW_tmp = POW_A, POW_q, POW_A + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p14) fma.d.s0 f8 = POW_A, POW_q, POW_A + nop.i 999 +} +{ .mfb + nop.m 999 +(p11) fma.d.s0 f8 = POW_A, POW_es, f0 +(p10) br.ret.sptk b0 // Exit main branch if no over/underflow +} +;; + +// POSSIBLE_OVER_UNDER +// p6 = TRUE ==> Y_Gpr negative +// Result is already computed. We just need to know if over/underflow occurred. + +{ .mfb + cmp.eq p0,p6 = pow_GR_sign_Y_Gpr, r0 + nop.f 999 +(p6) br.cond.spnt POW_POSSIBLE_UNDER +} +;; + +// POSSIBLE_OVER +// We got an answer. +// overflow is a possibility, not a certainty + + +// We define an overflow when the answer with +// WRE set +// user-defined rounding mode + +// double +// Largest double is 7FE (biased double) +// 7FE - 3FF + FFFF = 103FE +// Create + largest_double_plus_ulp +// Create - largest_double_plus_ulp +// Calculate answer with WRE set. + +// single +// Largest single is FE (biased double) +// FE - 7F + FFFF = 1007E +// Create + largest_single_plus_ulp +// Create - largest_single_plus_ulp +// Calculate answer with WRE set. + +// Cases when answer is ldn+1 are as follows: +// ldn ldn+1 +// --+----------|----------+------------ +// | +// +inf +inf -inf +// RN RN +// RZ + +// Put in s2 (td set, wre set) +{ .mfi + nop.m 999 + fsetc.s2 0x7F,0x42 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.d.s2 POW_wre_urm_f8 = POW_A, POW_q, POW_A + nop.i 999 +} +;; + +// Return s2 to default +{ .mfi + nop.m 999 + fsetc.s2 0x7F,0x40 + nop.i 999 +} +;; + +// p7 = TRUE ==> yes, we have an overflow +{ .mfi + nop.m 999 + fcmp.ge.s1 p7, p8 = POW_wre_urm_f8, POW_big_pos + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p8) fcmp.le.s1 p7, p0 = POW_wre_urm_f8, POW_big_neg + nop.i 999 +} +;; + +{ .mbb +(p7) mov pow_GR_tag = 24 +(p7) br.cond.spnt __libm_error_region // Branch if overflow + br.ret.sptk b0 // Exit if did not overflow +} +;; + +// Here if |y*log(x)| < 2^(-11) +// pow(x,y) ~ exp(d) ~ 1 + d + 0.5*d^2 + Q1*d^3 + Q2*d^4, where d = y*log(x) +.align 32 +POW_NEAR_ONE: + +{ .mfi + nop.m 999 + fma.s1 POW_d2 = POW_d, POW_d, f0 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 POW_poly_d_hi = POW_d, POW_Q0_half, f1 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 POW_poly_d_lo = POW_d, POW_Q2, POW_Q1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 POW_poly_d = POW_d2, POW_poly_d_lo, POW_poly_d_hi + nop.i 999 +} +;; + +{ .mfb + nop.m 999 + fma.d.s0 f8 = POW_d, POW_poly_d, f1 + br.ret.sptk b0 // exit function for arguments |y*log(x)| < 2^(-11) +} +;; + +POW_POSSIBLE_UNDER: +// We got an answer. input was < -2^9 but > -2^10 (double) +// We got an answer. input was < -2^6 but > -2^7 (float) +// underflow is a possibility, not a certainty + +// We define an underflow when the answer with +// ftz set +// is zero (tiny numbers become zero) +// Notice (from below) that if we have an unlimited exponent range, +// then there is an extra machine number E between the largest denormal and +// the smallest normal. +// So if with unbounded exponent we round to E or below, then we are +// tiny and underflow has occurred. +// But notice that you can be in a situation where we are tiny, namely +// rounded to E, but when the exponent is bounded we round to smallest +// normal. So the answer can be the smallest normal with underflow. +// E +// -----+--------------------+--------------------+----- +// | | | +// 1.1...10 2^-3fff 1.1...11 2^-3fff 1.0...00 2^-3ffe +// 0.1...11 2^-3ffe (biased, 1) +// largest dn smallest normal + +// Put in s2 (td set, ftz set) +{ .mfi + nop.m 999 + fsetc.s2 0x7F,0x41 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.d.s2 POW_ftz_urm_f8 = POW_A, POW_q, POW_A + nop.i 999 +} +;; + +// Return s2 to default +{ .mfi + nop.m 999 + fsetc.s2 0x7F,0x40 + nop.i 999 +} +;; + +// p7 = TRUE ==> yes, we have an underflow +{ .mfi + nop.m 999 + fcmp.eq.s1 p7, p0 = POW_ftz_urm_f8, f0 + nop.i 999 +} +;; + +{ .mbb +(p7) mov pow_GR_tag = 25 +(p7) br.cond.spnt __libm_error_region // Branch if underflow + br.ret.sptk b0 // Exit if did not underflow +} +;; + +POW_X_DENORM: +// Here if x unorm. Use the NORM_X for getf instructions, and then back +// to normal path +{ .mfi + getf.exp pow_GR_signexp_X = POW_NORM_X + nop.f 999 + nop.i 999 +} +;; + +{ .mmi + getf.sig pow_GR_sig_X = POW_NORM_X +;; + and pow_GR_exp_X = pow_GR_signexp_X, pow_GR_17ones + nop.i 999 +} +;; + +{ .mib + sub pow_GR_true_exp_X = pow_GR_exp_X, pow_GR_16ones + nop.i 999 + br.cond.sptk POW_COMMON +} +;; + +POW_X_0: +// Here if x=0 and y not nan +// +// We have the following cases: +// p6 x=0 and y>0 and is an integer (may be even or odd) +// p7 x=0 and y>0 and is NOT an integer, return +0 +// p8 x=0 and y>0 and so big as to always be an even integer, return +0 +// p9 x=0 and y>0 and may not be integer +// p10 x=0 and y>0 and is an odd integer, return x +// p11 x=0 and y>0 and is an even integer, return +0 +// p12 used in dummy fcmp to set denormal flag if y=unorm +// p13 x=0 and y>0 +// p14 x=0 and y=0, branch to code for calling error handling +// p15 x=0 and y<0, branch to code for calling error handling +// +{ .mfi + getf.sig pow_GR_sig_int_Y = POW_int_Y // Get signif of int_Y + fcmp.lt.s1 p15,p13 = f9, f0 // Test for y<0 + and pow_GR_exp_Y = pow_GR_signexp_Y, pow_GR_17ones +} +{ .mfb + cmp.ne p14,p0 = pow_GR_y_zero,r0 // Test for y=0 + fcvt.xf POW_float_int_Y = POW_int_Y +(p14) br.cond.spnt POW_X_0_Y_0 // Branch if x=0 and y=0 +} +;; + +// If x=0 and y>0, test y and flag denormal +{ .mfb +(p13) cmp.gt.unc p8,p9 = pow_GR_exp_Y, pow_GR_10033 // Test y +big = even int +(p13) fcmp.eq.s0 p12,p0 = f9,f0 // If x=0, y>0 dummy op to flag denormal +(p15) br.cond.spnt POW_X_0_Y_NEG // Branch if x=0 and y<0 +} +;; + +// Here if x=0 and y>0 +{ .mfi + nop.m 999 +(p9) fcmp.eq.unc.s1 p6,p7 = POW_float_int_Y, POW_NORM_Y // Test y=int + nop.i 999 +} +{ .mfi + nop.m 999 +(p8) fma.d.s0 f8 = f0,f0,f0 // If x=0, y>0 and large even int, return +0 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p7) fma.d.s0 f8 = f0,f0,f0 // Result +0 if x=0 and y>0 and not integer +(p6) tbit.nz.unc p10,p11 = pow_GR_sig_int_Y,0 // If y>0 int, test y even/odd +} +;; + +// Note if x=0, y>0 and odd integer, just return x +{ .mfb + nop.m 999 +(p11) fma.d.s0 f8 = f0,f0,f0 // Result +0 if x=0 and y even integer + br.ret.sptk b0 // Exit if x=0 and y>0 +} +;; + +POW_X_0_Y_0: +// When X is +-0 and Y is +-0, IEEE returns 1.0 +// We call error support with this value + +{ .mfb + mov pow_GR_tag = 26 + fma.d.s0 f8 = f1,f1,f0 + br.cond.sptk __libm_error_region +} +;; + +POW_X_0_Y_NEG: +// When X is +-0 and Y is negative, IEEE returns +// X Y answer +// +0 -odd int +inf +// -0 -odd int -inf + +// +0 !-odd int +inf +// -0 !-odd int +inf + +// p6 == Y is a floating point number outside the integer. +// Hence it is an integer and is even. +// return +inf + +// p7 == Y is a floating point number within the integer range. +// p9 == (int_Y = NORM_Y), Y is an integer, which may be odd or even. +// p11 odd +// return (sign_of_x)inf +// p12 even +// return +inf +// p10 == Y is not an integer +// return +inf +// + +{ .mfi + nop.m 999 + nop.f 999 + cmp.gt p6,p7 = pow_GR_exp_Y, pow_GR_10033 +} +;; + +{ .mfi + mov pow_GR_tag = 27 +(p7) fcmp.eq.unc.s1 p9,p10 = POW_float_int_Y, POW_NORM_Y + nop.i 999 +} +;; + +{ .mfb + nop.m 999 +(p6) frcpa.s0 f8,p13 = f1, f0 +(p6) br.cond.sptk __libm_error_region // x=0, y<0, y large neg int +} +;; + +{ .mfb + nop.m 999 +(p10) frcpa.s0 f8,p13 = f1, f0 +(p10) br.cond.sptk __libm_error_region // x=0, y<0, y not int +} +;; + +// x=0, y<0, y an int +{ .mib + nop.m 999 +(p9) tbit.nz.unc p11,p12 = pow_GR_sig_int_Y,0 + nop.b 999 +} +;; + +{ .mfi + nop.m 999 +(p12) frcpa.s0 f8,p13 = f1,f0 + nop.i 999 +} +;; + +{ .mfb + nop.m 999 +(p11) frcpa.s0 f8,p13 = f1,f8 + br.cond.sptk __libm_error_region +} +;; + + +POW_Y_0: +// Here for y zero, x anything but zero and nan +// Set flag if x denormal +// Result is +1.0 +{ .mfi + nop.m 999 + fcmp.eq.s0 p6,p0 = f8,f0 // Sets flag if x denormal + nop.i 999 +} +{ .mfb + nop.m 999 + fma.d.s0 f8 = f1,f1,f0 + br.ret.sptk b0 +} +;; + + +POW_X_INF: +// Here when X is +-inf + +// X +inf Y +inf +inf +// X -inf Y +inf +inf + +// X +inf Y >0 +inf +// X -inf Y >0, !odd integer +inf <== (-inf)^0.5 = +inf !! +// X -inf Y >0, odd integer -inf + +// X +inf Y -inf +0 +// X -inf Y -inf +0 + +// X +inf Y <0 +0 +// X -inf Y <0, !odd integer +0 +// X -inf Y <0, odd integer -0 + +// X + inf Y=+0 +1 +// X + inf Y=-0 +1 +// X - inf Y=+0 +1 +// X - inf Y=-0 +1 + +// p13 == Y negative +// p14 == Y positive + +// p6 == Y is a floating point number outside the integer. +// Hence it is an integer and is even. +// p13 == (Y negative) +// return +inf +// p14 == (Y positive) +// return +0 + +// p7 == Y is a floating point number within the integer range. +// p9 == (int_Y = NORM_Y), Y is an integer, which may be odd or even. +// p11 odd +// p13 == (Y negative) +// return (sign_of_x)inf +// p14 == (Y positive) +// return (sign_of_x)0 +// pxx even +// p13 == (Y negative) +// return +inf +// p14 == (Y positive) +// return +0 + +// pxx == Y is not an integer +// p13 == (Y negative) +// return +inf +// p14 == (Y positive) +// return +0 +// + +// If x=inf, test y and flag denormal +{ .mfi + nop.m 999 + fcmp.eq.s0 p10,p11 = f9,f0 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fcmp.lt.s0 p13,p14 = POW_NORM_Y,f0 + cmp.gt p6,p7 = pow_GR_exp_Y, pow_GR_10033 +} +{ .mfi + nop.m 999 + fclass.m p12,p0 = f9, 0x23 //@inf + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fclass.m p15,p0 = f9, 0x07 //@zero + nop.i 999 +} +;; + +{ .mfb + nop.m 999 +(p15) fmerge.s f8 = f1,f1 // Return +1.0 if x=inf, y=0 +(p15) br.ret.spnt b0 // Exit if x=inf, y=0 +} +;; + +{ .mfi + nop.m 999 +(p14) frcpa.s1 f8,p10 = f1,f0 // If x=inf, y>0, assume result +inf + nop.i 999 +} +{ .mfb + nop.m 999 +(p13) fma.d.s0 f8 = f0,f0,f0 // If x=inf, y<0, assume result +0.0 +(p12) br.ret.spnt b0 // Exit if x=inf, y=inf +} +;; + +// Here if x=inf, and 0 < |y| < inf. Need to correct results if y odd integer. +{ .mfi + nop.m 999 +(p7) fcmp.eq.unc.s1 p9,p0 = POW_float_int_Y, POW_NORM_Y // Is y integer? + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + nop.f 999 +(p9) tbit.nz.unc p11,p0 = pow_GR_sig_int_Y,0 // Test for y odd integer +} +;; + +{ .mfb + nop.m 999 +(p11) fmerge.s f8 = POW_NORM_X,f8 // If y odd integer use sign of x + br.ret.sptk b0 // Exit for x=inf, 0 < |y| < inf +} +;; + + +POW_X_NEG_Y_NONINT: +// When X is negative and Y is a non-integer, IEEE +// returns a qnan indefinite. +// We call error support with this value + +{ .mfb + mov pow_GR_tag = 28 + frcpa.s0 f8,p6 = f0,f0 + br.cond.sptk __libm_error_region +} +;; + +POW_X_NAN: +// Here if x=nan, y not nan +{ .mfi + nop.m 999 + fclass.m p9,p13 = f9, 0x07 // Test y=zero + nop.i 999 +} +;; + +{ .mfb + nop.m 999 +(p13) fma.d.s0 f8 = f8,f1,f0 +(p13) br.ret.sptk b0 // Exit if x nan, y anything but zero or nan +} +;; + +POW_X_NAN_Y_0: +// When X is a NAN and Y is zero, IEEE returns 1. +// We call error support with this value. +{ .mfi + nop.m 999 + fcmp.eq.s0 p6,p0 = f8,f0 // Dummy op to set invalid on snan + nop.i 999 +} +{ .mfb + mov pow_GR_tag = 29 + fma.d.s0 f8 = f0,f0,f1 + br.cond.sptk __libm_error_region +} +;; + + +POW_OVER_UNDER_X_NOT_INF: + +// p8 is TRUE for overflow +// p9 is TRUE for underflow + +// if y is infinity, we should not over/underflow + +{ .mfi + nop.m 999 + fcmp.eq.s1 p14, p13 = POW_xsq,f1 // Test |x|=1 + cmp.eq p8,p9 = pow_GR_sign_Y_Gpr, r0 +} +;; + +{ .mfi + nop.m 999 +(p14) fclass.m.unc p15, p0 = f9, 0x23 // If |x|=1, test y=inf + nop.i 999 +} +{ .mfi + nop.m 999 +(p13) fclass.m.unc p11,p0 = f9, 0x23 // If |x| not 1, test y=inf + nop.i 999 +} +;; + +// p15 = TRUE if |x|=1, y=inf, return +1 +{ .mfb + nop.m 999 +(p15) fma.d.s0 f8 = f1,f1,f0 // If |x|=1, y=inf, result +1 +(p15) br.ret.spnt b0 // Exit if |x|=1, y=inf +} +;; + +.pred.rel "mutex",p8,p9 +{ .mfb +(p8) setf.exp f8 = pow_GR_17ones // If exp(+big), result inf +(p9) fmerge.s f8 = f0,f0 // If exp(-big), result 0 +(p11) br.ret.sptk b0 // Exit if |x| not 1, y=inf +} +;; + +{ .mfb + nop.m 999 + nop.f 999 + br.cond.sptk POW_OVER_UNDER_ERROR // Branch if y not inf +} +;; + + +POW_Y_NAN: +// Here if y=nan, x anything +// If x = +1 then result is +1, else result is quiet Y +{ .mfi + nop.m 999 + fcmp.eq.s1 p10,p9 = POW_NORM_X, f1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p10) fcmp.eq.s0 p6,p0 = f9,f1 // Set invalid, even if x=+1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p10) fma.d.s0 f8 = f1,f1,f0 + nop.i 999 +} +{ .mfb + nop.m 999 +(p9) fma.d.s0 f8 = f9,f8,f0 + br.ret.sptk b0 // Exit y=nan +} +;; + + +POW_OVER_UNDER_ERROR: +// Here if we have overflow or underflow. +// Enter with p12 true if x negative and y odd int to force -0 or -inf + +{ .mfi + sub pow_GR_17ones_m1 = pow_GR_17ones, r0, 1 + nop.f 999 + mov pow_GR_one = 0x1 +} +;; + +// overflow, force inf with O flag +{ .mmb +(p8) mov pow_GR_tag = 24 +(p8) setf.exp POW_tmp = pow_GR_17ones_m1 + nop.b 999 +} +;; + +// underflow, force zero with I, U flags +{ .mmi +(p9) mov pow_GR_tag = 25 +(p9) setf.exp POW_tmp = pow_GR_one + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.d.s0 f8 = POW_tmp, POW_tmp, f0 + nop.i 999 +} +;; + +// p12 x is negative and y is an odd integer, change sign of result +{ .mfi + nop.m 999 +(p12) fnma.d.s0 f8 = POW_tmp, POW_tmp, f0 + nop.i 999 +} +;; + +GLOBAL_LIBM_END(pow) + + +LOCAL_LIBM_ENTRY(__libm_error_region) + +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; + +{ .mmi + stfd [GR_Parameter_Y] = POW_NORM_Y,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; + +.body +{ .mib + stfd [GR_Parameter_X] = POW_NORM_X // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfd [GR_Parameter_Y] = f8 // STORE Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; + +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; + +{ .mmi + ldfd f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; + +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) + +.type __libm_error_support#,@function +.global __libm_error_support# + diff --git a/sysdeps/ia64/fpu/e_powf.S b/sysdeps/ia64/fpu/e_powf.S new file mode 100644 index 0000000000..1406a94b65 --- /dev/null +++ b/sysdeps/ia64/fpu/e_powf.S @@ -0,0 +1,2066 @@ +.file "powf.s" + + +// Copyright (c) 2000 - 2005, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 02/03/00 Added p12 to definite over/under path. With odd power we did not +// maintain the sign of x in this path. +// 04/04/00 Unwind support added +// 04/19/00 pow(+-1,inf) now returns NaN +// pow(+-val, +-inf) returns 0 or inf, but now does not call error +// support +// Added s1 to fcvt.fx because invalid flag was incorrectly set. +// 08/15/00 Bundle added after call to __libm_error_support to properly +// set [the previously overwritten] GR_Parameter_RESULT. +// 09/07/00 Improved performance by eliminating bank conflicts and other stalls, +// and tweaking the critical path +// 09/08/00 Per c99, pow(+-1,inf) now returns 1, and pow(+1,nan) returns 1 +// 09/28/00 Updated NaN**0 path +// 01/20/01 Fixed denormal flag settings. +// 02/13/01 Improved speed. +// 03/19/01 Reordered exp polynomial to improve speed and eliminate monotonicity +// problem in round up, down, and to zero modes. Also corrected +// overflow result when x negative, y odd in round up, down, zero. +// 06/14/01 Added brace missing from bundle +// 12/10/01 Corrected case where x negative, 2^23 <= |y| < 2^24, y odd integer. +// 02/08/02 Fixed overflow/underflow cases that were not calling error support. +// 05/20/02 Cleaned up namespace and sf0 syntax +// 08/29/02 Improved Itanium 2 performance +// 02/10/03 Reordered header: .section, .global, .proc, .align +// 10/09/03 Modified algorithm to improve performance, reduce table size, and +// fix boundary case powf(2.0,-150.0) +// 03/31/05 Reformatted delimiters between data tables +// +// API +//============================================================== +// float powf(float x, float y) +// +// Overview of operation +//============================================================== +// +// Three steps... +// 1. Log(x) +// 2. y Log(x) +// 3. exp(y log(x)) +// +// This means we work with the absolute value of x and merge in the sign later. +// Log(x) = G + delta + r -rsq/2 + p +// G,delta depend on the exponent of x and table entries. The table entries are +// indexed by the exponent of x, called K. +// +// The G and delta come out of the reduction; r is the reduced x. +// +// B = frcpa(x) +// xB-1 is small means that B is the approximate inverse of x. +// +// Log(x) = Log( (1/B)(Bx) ) +// = Log(1/B) + Log(Bx) +// = Log(1/B) + Log( 1 + (Bx-1)) +// +// x = 2^K 1.x_1x_2.....x_52 +// B= frcpa(x) = 2^-k Cm +// Log(1/B) = Log(1/(2^-K Cm)) +// Log(1/B) = Log((2^K/ Cm)) +// Log(1/B) = K Log(2) + Log(1/Cm) +// +// Log(x) = K Log(2) + Log(1/Cm) + Log( 1 + (Bx-1)) +// +// If you take the significand of x, set the exponent to true 0, then Cm is +// the frcpa. We tabulate the Log(1/Cm) values. There are 256 of them. +// The frcpa table is indexed by 8 bits, the x_1 thru x_8. +// m = x_1x_2...x_8 is an 8-bit index. +// +// Log(1/Cm) = log(1/frcpa(1+m/256)) where m goes from 0 to 255. +// +// We tabluate as one double, T for single precision power +// +// Log(x) = (K Log(2)_hi + T) + (K Log(2)_lo) + Log( 1 + (Bx-1)) +// Log(x) = G + delta + Log( 1 + (Bx-1)) +// +// The Log( 1 + (Bx-1)) can be calculated as a series in r = Bx-1. +// +// Log( 1 + (Bx-1)) = r - rsq/2 + p +// where p = r^3(P0 + P1*r + P2*r^2) +// +// Then, +// +// yLog(x) = yG + y delta + y(r-rsq/2) + yp +// yLog(x) = Z1 + e3 + Z2 + Z3 +// +// +// exp(yLog(x)) = exp(Z1 + Z2) exp(Z3) exp(e3) +// +// +// exp(Z3) is another series. +// exp(e3) is approximated as f3 = 1 + e3 +// +// exp(Z1 + Z2) = exp(Z) +// Z (128/log2) = number of log2/128 in Z is N +// +// s = Z - N log2/128 +// +// exp(Z) = exp(s) exp(N log2/128) +// +// exp(r) = exp(Z - N log2/128) +// +// r = s + d = (Z - N (log2/128)_hi) -N (log2/128)_lo +// = Z - N (log2/128) +// +// Z = s+d +N (log2/128) +// +// exp(Z) = exp(s) (1+d) exp(N log2/128) +// +// N = M 128 + n +// +// N log2/128 = M log2 + n log2/128 +// +// n is 8 binary digits = n_7n_6...n_1 +// +// n log2/128 = n_7n_6n_5 16 log2/128 + n_4n_3n_2n_1 log2/128 +// n log2/128 = n_7n_6n_5 log2/8 + n_4n_3n_2n_1 log2/128 +// n log2/128 = I2 log2/8 + I1 log2/128 +// +// N log2/128 = M log2 + I2 log2/8 + I1 log2/128 +// +// exp(Z) = exp(s) (1+d) exp(log(2^M) + log(2^I2/8) + log(2^I1/128)) +// exp(Z) = exp(s) f12 (2^M) 2^I2/8 2^I1/128 +// +// I1, I2 are table indices. Use a series for exp(s). +// Then get exp(Z) +// +// exp(yLog(x)) = exp(Z) exp(Z3) f3 +// exp(yLog(x)) = exp(Z)f3 exp(Z3) +// exp(yLog(x)) = A exp(Z3) +// +// We actually calculate exp(Z3) -1. +// Then, +// exp(yLog(x)) = A + A( exp(Z3) -1) +// + +// Table Generation +//============================================================== + +// The log values +// ============== +// The operation (K*log2_hi) must be exact. K is the true exponent of x. +// If we allow gradual underflow (denormals), K can be represented in 12 bits +// (as a two's complement number). We assume 13 bits as an engineering +// precaution. +// +// +------------+----------------+-+ +// | 13 bits | 50 bits | | +// +------------+----------------+-+ +// 0 1 66 +// 2 34 +// +// So we want the lsb(log2_hi) to be 2^-50 +// We get log2 as a quad-extended (15-bit exponent, 128-bit significand) +// +// 0 fffe b17217f7d1cf79ab c9e3b39803f2f6af (4...) +// +// Consider numbering the bits left to right, starting at 0 thru 127. +// Bit 0 is the 2^-1 bit; bit 49 is the 2^-50 bit. +// +// ...79ab +// 0111 1001 1010 1011 +// 44 +// 89 +// +// So if we shift off the rightmost 14 bits, then (shift back only +// the top half) we get +// +// 0 fffe b17217f7d1cf4000 e6af278ece600fcb dabc000000000000 +// +// Put the right 64-bit signficand in an FR register, convert to double; +// it is exact. Put the next 128 bits into a quad register and round to double. +// The true exponent of the low part is -51. +// +// hi is 0 fffe b17217f7d1cf4000 +// lo is 0 ffcc e6af278ece601000 +// +// Convert to double memory format and get +// +// hi is 0x3fe62e42fefa39e8 +// lo is 0x3cccd5e4f1d9cc02 +// +// log2_hi + log2_lo is an accurate value for log2. +// +// +// The T and t values +// ================== +// A similar method is used to generate the T and t values. +// +// K * log2_hi + T must be exact. +// +// Smallest T,t +// ---------- +// The smallest T,t is +// T t +// 0x3f60040155d58800, 0x3c93bce0ce3ddd81 log(1/frcpa(1+0/256))= +1.95503e-003 +// +// The exponent is 0x3f6 (biased) or -9 (true). +// For the smallest T value, what we want is to clip the significand such that +// when it is shifted right by 9, its lsb is in the bit for 2^-51. The 9 is the +// specific for the first entry. In general, it is 0xffff - (biased 15-bit +// exponent). + +// Independently, what we have calculated is the table value as a quad +// precision number. +// Table entry 1 is +// 0 fff6 80200aaeac44ef38 338f77605fdf8000 +// +// We store this quad precision number in a data structure that is +// sign: 1 +// exponent: 15 +// signficand_hi: 64 (includes explicit bit) +// signficand_lo: 49 +// Because the explicit bit is included, the significand is 113 bits. +// +// Consider significand_hi for table entry 1. +// +// +// +-+--- ... -------+--------------------+ +// | | +// +-+--- ... -------+--------------------+ +// 0 1 4444444455555555556666 +// 2345678901234567890123 +// +// Labeled as above, bit 0 is 2^0, bit 1 is 2^-1, etc. +// Bit 42 is 2^-42. If we shift to the right by 9, the bit in +// bit 42 goes in 51. +// +// So what we want to do is shift bits 43 thru 63 into significand_lo. +// This is shifting bit 42 into bit 63, taking care to retain shifted-off bits. +// Then shifting (just with signficaand_hi) back into bit 42. +// +// The shift_value is 63-42 = 21. In general, this is +// 63 - (51 -(0xffff - 0xfff6)) +// For this example, it is +// 63 - (51 - 9) = 63 - 42 = 21 +// +// This means we are shifting 21 bits into significand_lo. We must maintain more +// that a 128-bit signficand not to lose bits. So before the shift we put the +// 128-bit significand into a 256-bit signficand and then shift. +// The 256-bit significand has four parts: hh, hl, lh, and ll. +// +// Start off with +// hh hl lh ll +// <64> <49><15_0> <64_0> <64_0> +// +// After shift by 21 (then return for significand_hi), +// <43><21_0> <21><43> <6><58_0> <64_0> +// +// Take the hh part and convert to a double. There is no rounding here. +// The conversion is exact. The true exponent of the high part is the same as +// the true exponent of the input quad. +// +// We have some 64 plus significand bits for the low part. In this example, we +// have 70 bits. We want to round this to a double. Put them in a quad and then +// do a quad fnorm. +// For this example the true exponent of the low part is +// true_exponent_of_high - 43 = true_exponent_of_high - (64-21) +// In general, this is +// true_exponent_of_high - (64 - shift_value) +// +// +// Largest T,t +// ---------- +// The largest T,t is +// 0x3fe62643fecf9742, 0x3c9e3147684bd37d log(1/frcpa(1+255/256))=+6.92171e-001 +// +// Table entry 256 is +// 0 fffe b1321ff67cba178c 51da12f4df5a0000 +// +// The shift value is +// 63 - (51 -(0xffff - 0xfffe)) = 13 +// +// The true exponent of the low part is +// true_exponent_of_high - (64 - shift_value) +// -1 - (64-13) = -52 +// Biased as a double, this is 0x3cb +// +// +// +// So then lsb(T) must be >= 2^-51 +// msb(Klog2_hi) <= 2^12 +// +// +--------+---------+ +// | 51 bits | <== largest T +// +--------+---------+ +// | 9 bits | 42 bits | <== smallest T +// +------------+----------------+-+ +// | 13 bits | 50 bits | | +// +------------+----------------+-+ +// +// Note: For powf only the table of T is needed + + +// Special Cases +//============================================================== + +// double float +// overflow error 24 30 + +// underflow error 25 31 + +// X zero Y zero +// +0 +0 +1 error 26 32 +// -0 +0 +1 error 26 32 +// +0 -0 +1 error 26 32 +// -0 -0 +1 error 26 32 + +// X zero Y negative +// +0 -odd integer +inf error 27 33 divide-by-zero +// -0 -odd integer -inf error 27 33 divide-by-zero +// +0 !-odd integer +inf error 27 33 divide-by-zero +// -0 !-odd integer +inf error 27 33 divide-by-zero +// +0 -inf +inf error 27 33 divide-by-zero +// -0 -inf +inf error 27 33 divide-by-zero + +// X zero Y positve +// +0 +odd integer +0 +// -0 +odd integer -0 +// +0 !+odd integer +0 +// -0 !+odd integer +0 +// +0 +inf +0 +// -0 +inf +0 +// +0 Y NaN quiet Y invalid if Y SNaN +// -0 Y NaN quiet Y invalid if Y SNaN + +// X one +// -1 Y inf +1 +// -1 Y NaN quiet Y invalid if Y SNaN +// +1 Y NaN +1 invalid if Y SNaN +// +1 Y any else +1 + +// X - Y not integer QNAN error 28 34 invalid + +// X NaN Y 0 +1 error 29 35 +// X NaN Y NaN quiet X invalid if X or Y SNaN +// X NaN Y any else quiet X invalid if X SNaN +// X !+1 Y NaN quiet Y invalid if Y SNaN + + +// X +inf Y >0 +inf +// X -inf Y >0, !odd integer +inf +// X -inf Y >0, odd integer -inf + +// X +inf Y <0 +0 +// X -inf Y <0, !odd integer +0 +// X -inf Y <0, odd integer -0 + +// X +inf Y =0 +1 +// X -inf Y =0 +1 + +// |X|<1 Y +inf +0 +// |X|<1 Y -inf +inf +// |X|>1 Y +inf +inf +// |X|>1 Y -inf +0 + +// X any Y =0 +1 + +// Assembly macros +//============================================================== + +// integer registers used + +pow_GR_exp_half = r10 +pow_GR_signexp_Xm1 = r11 +pow_GR_tmp = r11 + +pow_GR_signexp_X = r14 +pow_GR_17ones = r15 +pow_GR_Fpsr = r15 +pow_AD_P = r16 +pow_GR_rcs0_mask = r16 +pow_GR_exp_2tom8 = r17 +pow_GR_rcs0 = r17 +pow_GR_sig_X = r18 +pow_GR_10033 = r19 +pow_GR_16ones = r20 + +pow_AD_Tt = r21 +pow_GR_exp_X = r22 +pow_AD_Q = r23 +pow_GR_true_exp_X = r24 +pow_GR_y_zero = r25 + +pow_GR_exp_Y = r26 +pow_AD_tbl1 = r27 +pow_AD_tbl2 = r28 +pow_GR_offset = r29 +pow_GR_exp_Xm1 = r30 +pow_GR_xneg_yodd = r31 + +pow_GR_int_N = r38 +pow_GR_index1 = r39 +pow_GR_index2 = r40 + +pow_AD_T1 = r41 +pow_AD_T2 = r42 +pow_int_GR_M = r43 +pow_GR_sig_int_Y = r44 +pow_GR_sign_Y_Gpr = r45 + +pow_GR_17ones_m1 = r46 +pow_GR_one = r47 +pow_GR_sign_Y = r48 +pow_GR_signexp_Y_Gpr = r49 +pow_GR_exp_Y_Gpr = r50 + +pow_GR_true_exp_Y_Gpr = r51 +pow_GR_signexp_Y = r52 +pow_GR_x_one = r53 +pow_GR_big_pos = r55 + +pow_GR_big_neg = r56 + +GR_SAVE_B0 = r50 +GR_SAVE_GP = r51 +GR_SAVE_PFS = r52 + +GR_Parameter_X = r53 +GR_Parameter_Y = r54 +GR_Parameter_RESULT = r55 +pow_GR_tag = r56 + + +// floating point registers used + +POW_B = f32 +POW_NORM_X = f33 +POW_Xm1 = f34 +POW_r1 = f34 + +POW_NORM_Y = f37 +POW_Q2 = f38 +POW_eps = f39 +POW_P2 = f40 + +POW_P0 = f42 +POW_log2_lo = f43 +POW_r = f44 +POW_Q0_half = f45 + +POW_tmp = f47 +POW_log2_hi = f48 +POW_Q1 = f49 +POW_P1 = f50 + +POW_log2_by_128_hi = f51 +POW_inv_log2_by_128 = f52 +POW_rsq = f53 +POW_Yrcub = f54 +POW_log2_by_128_lo = f55 + +POW_xsq = f57 +POW_v2 = f59 +POW_T = f60 + +POW_RSHF = f62 +POW_v210 = f63 +POW_twoV = f65 + +POW_U = f66 +POW_G = f67 +POW_delta = f68 +POW_V = f70 + +POW_p = f71 +POW_Z = f72 +POW_e3 = f73 +POW_Z2 = f75 + +POW_W1 = f77 +POW_Z3 = f80 + +POW_Z3sq = f85 + +POW_Nfloat = f87 +POW_f3 = f89 +POW_q = f90 + +POW_T1 = f96 +POW_T2 = f97 +POW_2M = f98 +POW_s = f99 +POW_f12 = f100 + +POW_ssq = f101 +POW_T1T2 = f102 +POW_1ps = f103 +POW_A = f104 +POW_es = f105 + +POW_Xp1 = f106 +POW_int_K = f107 +POW_K = f108 +POW_f123 = f109 +POW_Gpr = f110 + +POW_Y_Gpr = f111 +POW_int_Y = f112 +POW_2Mqp1 = f113 + +POW_float_int_Y = f116 +POW_ftz_urm_f8 = f117 +POW_wre_urm_f8 = f118 +POW_big_neg = f119 +POW_big_pos = f120 + +// Data tables +//============================================================== + +RODATA + +.align 16 + +LOCAL_OBJECT_START(pow_table_P) +data8 0x80000000000018E5, 0x0000BFFD // P_1 +data8 0xb8aa3b295c17f0bc, 0x00004006 // inv_ln2_by_128 +// +// +data8 0x3FA5555555554A9E // Q_2 +data8 0x0000000000000000 // Pad +data8 0x3FC5555555554733 // Q_1 +data8 0x43e8000000000000 // Right shift constant for exp +data8 0xc9e3b39803f2f6af, 0x00003fb7 // ln2_by_128_lo +LOCAL_OBJECT_END(pow_table_P) + +LOCAL_OBJECT_START(pow_table_Q) +data8 0xCCCCCCCC4ED2BA7F, 0x00003FFC // P_2 +data8 0xAAAAAAAAAAAAB505, 0x00003FFD // P_0 +data8 0x3fe62e42fefa39e8, 0x3cccd5e4f1d9cc02 // log2 hi lo = +6.93147e-001 +data8 0xb17217f7d1cf79ab, 0x00003ff7 // ln2_by_128_hi +LOCAL_OBJECT_END(pow_table_Q) + + +LOCAL_OBJECT_START(pow_Tt) +data8 0x3f60040155d58800 // log(1/frcpa(1+0/256))= +1.95503e-003 +data8 0x3f78121214586a00 // log(1/frcpa(1+1/256))= +5.87661e-003 +data8 0x3f841929f9683200 // log(1/frcpa(1+2/256))= +9.81362e-003 +data8 0x3f8c317384c75f00 // log(1/frcpa(1+3/256))= +1.37662e-002 +data8 0x3f91a6b91ac73380 // log(1/frcpa(1+4/256))= +1.72376e-002 +data8 0x3f95ba9a5d9ac000 // log(1/frcpa(1+5/256))= +2.12196e-002 +data8 0x3f99d2a807432580 // log(1/frcpa(1+6/256))= +2.52177e-002 +data8 0x3f9d6b2725979800 // log(1/frcpa(1+7/256))= +2.87291e-002 +data8 0x3fa0c58fa19dfa80 // log(1/frcpa(1+8/256))= +3.27573e-002 +data8 0x3fa2954c78cbce00 // log(1/frcpa(1+9/256))= +3.62953e-002 +data8 0x3fa4a94d2da96c40 // log(1/frcpa(1+10/256))= +4.03542e-002 +data8 0x3fa67c94f2d4bb40 // log(1/frcpa(1+11/256))= +4.39192e-002 +data8 0x3fa85188b630f040 // log(1/frcpa(1+12/256))= +4.74971e-002 +data8 0x3faa6b8abe73af40 // log(1/frcpa(1+13/256))= +5.16017e-002 +data8 0x3fac441e06f72a80 // log(1/frcpa(1+14/256))= +5.52072e-002 +data8 0x3fae1e6713606d00 // log(1/frcpa(1+15/256))= +5.88257e-002 +data8 0x3faffa6911ab9300 // log(1/frcpa(1+16/256))= +6.24574e-002 +data8 0x3fb0ec139c5da600 // log(1/frcpa(1+17/256))= +6.61022e-002 +data8 0x3fb1dbd2643d1900 // log(1/frcpa(1+18/256))= +6.97605e-002 +data8 0x3fb2cc7284fe5f00 // log(1/frcpa(1+19/256))= +7.34321e-002 +data8 0x3fb3bdf5a7d1ee60 // log(1/frcpa(1+20/256))= +7.71173e-002 +data8 0x3fb4b05d7aa012e0 // log(1/frcpa(1+21/256))= +8.08161e-002 +data8 0x3fb580db7ceb5700 // log(1/frcpa(1+22/256))= +8.39975e-002 +data8 0x3fb674f089365a60 // log(1/frcpa(1+23/256))= +8.77219e-002 +data8 0x3fb769ef2c6b5680 // log(1/frcpa(1+24/256))= +9.14602e-002 +data8 0x3fb85fd927506a40 // log(1/frcpa(1+25/256))= +9.52125e-002 +data8 0x3fb9335e5d594980 // log(1/frcpa(1+26/256))= +9.84401e-002 +data8 0x3fba2b0220c8e5e0 // log(1/frcpa(1+27/256))= +1.02219e-001 +data8 0x3fbb0004ac1a86a0 // log(1/frcpa(1+28/256))= +1.05469e-001 +data8 0x3fbbf968769fca00 // log(1/frcpa(1+29/256))= +1.09274e-001 +data8 0x3fbccfedbfee13a0 // log(1/frcpa(1+30/256))= +1.12548e-001 +data8 0x3fbda727638446a0 // log(1/frcpa(1+31/256))= +1.15832e-001 +data8 0x3fbea3257fe10f60 // log(1/frcpa(1+32/256))= +1.19677e-001 +data8 0x3fbf7be9fedbfde0 // log(1/frcpa(1+33/256))= +1.22985e-001 +data8 0x3fc02ab352ff25f0 // log(1/frcpa(1+34/256))= +1.26303e-001 +data8 0x3fc097ce579d2040 // log(1/frcpa(1+35/256))= +1.29633e-001 +data8 0x3fc1178e8227e470 // log(1/frcpa(1+36/256))= +1.33531e-001 +data8 0x3fc185747dbecf30 // log(1/frcpa(1+37/256))= +1.36885e-001 +data8 0x3fc1f3b925f25d40 // log(1/frcpa(1+38/256))= +1.40250e-001 +data8 0x3fc2625d1e6ddf50 // log(1/frcpa(1+39/256))= +1.43627e-001 +data8 0x3fc2d1610c868130 // log(1/frcpa(1+40/256))= +1.47015e-001 +data8 0x3fc340c597411420 // log(1/frcpa(1+41/256))= +1.50414e-001 +data8 0x3fc3b08b6757f2a0 // log(1/frcpa(1+42/256))= +1.53825e-001 +data8 0x3fc40dfb08378000 // log(1/frcpa(1+43/256))= +1.56677e-001 +data8 0x3fc47e74e8ca5f70 // log(1/frcpa(1+44/256))= +1.60109e-001 +data8 0x3fc4ef51f6466de0 // log(1/frcpa(1+45/256))= +1.63553e-001 +data8 0x3fc56092e02ba510 // log(1/frcpa(1+46/256))= +1.67010e-001 +data8 0x3fc5d23857cd74d0 // log(1/frcpa(1+47/256))= +1.70478e-001 +data8 0x3fc6313a37335d70 // log(1/frcpa(1+48/256))= +1.73377e-001 +data8 0x3fc6a399dabbd380 // log(1/frcpa(1+49/256))= +1.76868e-001 +data8 0x3fc70337dd3ce410 // log(1/frcpa(1+50/256))= +1.79786e-001 +data8 0x3fc77654128f6120 // log(1/frcpa(1+51/256))= +1.83299e-001 +data8 0x3fc7e9d82a0b0220 // log(1/frcpa(1+52/256))= +1.86824e-001 +data8 0x3fc84a6b759f5120 // log(1/frcpa(1+53/256))= +1.89771e-001 +data8 0x3fc8ab47d5f5a300 // log(1/frcpa(1+54/256))= +1.92727e-001 +data8 0x3fc91fe490965810 // log(1/frcpa(1+55/256))= +1.96286e-001 +data8 0x3fc981634011aa70 // log(1/frcpa(1+56/256))= +1.99261e-001 +data8 0x3fc9f6c407089660 // log(1/frcpa(1+57/256))= +2.02843e-001 +data8 0x3fca58e729348f40 // log(1/frcpa(1+58/256))= +2.05838e-001 +data8 0x3fcabb55c31693a0 // log(1/frcpa(1+59/256))= +2.08842e-001 +data8 0x3fcb1e104919efd0 // log(1/frcpa(1+60/256))= +2.11855e-001 +data8 0x3fcb94ee93e367c0 // log(1/frcpa(1+61/256))= +2.15483e-001 +data8 0x3fcbf851c0675550 // log(1/frcpa(1+62/256))= +2.18516e-001 +data8 0x3fcc5c0254bf23a0 // log(1/frcpa(1+63/256))= +2.21558e-001 +data8 0x3fccc000c9db3c50 // log(1/frcpa(1+64/256))= +2.24609e-001 +data8 0x3fcd244d99c85670 // log(1/frcpa(1+65/256))= +2.27670e-001 +data8 0x3fcd88e93fb2f450 // log(1/frcpa(1+66/256))= +2.30741e-001 +data8 0x3fcdedd437eaef00 // log(1/frcpa(1+67/256))= +2.33820e-001 +data8 0x3fce530effe71010 // log(1/frcpa(1+68/256))= +2.36910e-001 +data8 0x3fceb89a1648b970 // log(1/frcpa(1+69/256))= +2.40009e-001 +data8 0x3fcf1e75fadf9bd0 // log(1/frcpa(1+70/256))= +2.43117e-001 +data8 0x3fcf84a32ead7c30 // log(1/frcpa(1+71/256))= +2.46235e-001 +data8 0x3fcfeb2233ea07c0 // log(1/frcpa(1+72/256))= +2.49363e-001 +data8 0x3fd028f9c7035c18 // log(1/frcpa(1+73/256))= +2.52501e-001 +data8 0x3fd05c8be0d96358 // log(1/frcpa(1+74/256))= +2.55649e-001 +data8 0x3fd085eb8f8ae790 // log(1/frcpa(1+75/256))= +2.58174e-001 +data8 0x3fd0b9c8e32d1910 // log(1/frcpa(1+76/256))= +2.61339e-001 +data8 0x3fd0edd060b78080 // log(1/frcpa(1+77/256))= +2.64515e-001 +data8 0x3fd122024cf00638 // log(1/frcpa(1+78/256))= +2.67701e-001 +data8 0x3fd14be2927aecd0 // log(1/frcpa(1+79/256))= +2.70257e-001 +data8 0x3fd180618ef18ad8 // log(1/frcpa(1+80/256))= +2.73461e-001 +data8 0x3fd1b50bbe2fc638 // log(1/frcpa(1+81/256))= +2.76675e-001 +data8 0x3fd1df4cc7cf2428 // log(1/frcpa(1+82/256))= +2.79254e-001 +data8 0x3fd214456d0eb8d0 // log(1/frcpa(1+83/256))= +2.82487e-001 +data8 0x3fd23ec5991eba48 // log(1/frcpa(1+84/256))= +2.85081e-001 +data8 0x3fd2740d9f870af8 // log(1/frcpa(1+85/256))= +2.88333e-001 +data8 0x3fd29ecdabcdfa00 // log(1/frcpa(1+86/256))= +2.90943e-001 +data8 0x3fd2d46602adcce8 // log(1/frcpa(1+87/256))= +2.94214e-001 +data8 0x3fd2ff66b04ea9d0 // log(1/frcpa(1+88/256))= +2.96838e-001 +data8 0x3fd335504b355a30 // log(1/frcpa(1+89/256))= +3.00129e-001 +data8 0x3fd360925ec44f58 // log(1/frcpa(1+90/256))= +3.02769e-001 +data8 0x3fd38bf1c3337e70 // log(1/frcpa(1+91/256))= +3.05417e-001 +data8 0x3fd3c25277333180 // log(1/frcpa(1+92/256))= +3.08735e-001 +data8 0x3fd3edf463c16838 // log(1/frcpa(1+93/256))= +3.11399e-001 +data8 0x3fd419b423d5e8c0 // log(1/frcpa(1+94/256))= +3.14069e-001 +data8 0x3fd44591e0539f48 // log(1/frcpa(1+95/256))= +3.16746e-001 +data8 0x3fd47c9175b6f0a8 // log(1/frcpa(1+96/256))= +3.20103e-001 +data8 0x3fd4a8b341552b08 // log(1/frcpa(1+97/256))= +3.22797e-001 +data8 0x3fd4d4f390890198 // log(1/frcpa(1+98/256))= +3.25498e-001 +data8 0x3fd501528da1f960 // log(1/frcpa(1+99/256))= +3.28206e-001 +data8 0x3fd52dd06347d4f0 // log(1/frcpa(1+100/256))= +3.30921e-001 +data8 0x3fd55a6d3c7b8a88 // log(1/frcpa(1+101/256))= +3.33644e-001 +data8 0x3fd5925d2b112a58 // log(1/frcpa(1+102/256))= +3.37058e-001 +data8 0x3fd5bf406b543db0 // log(1/frcpa(1+103/256))= +3.39798e-001 +data8 0x3fd5ec433d5c35a8 // log(1/frcpa(1+104/256))= +3.42545e-001 +data8 0x3fd61965cdb02c18 // log(1/frcpa(1+105/256))= +3.45300e-001 +data8 0x3fd646a84935b2a0 // log(1/frcpa(1+106/256))= +3.48063e-001 +data8 0x3fd6740add31de90 // log(1/frcpa(1+107/256))= +3.50833e-001 +data8 0x3fd6a18db74a58c0 // log(1/frcpa(1+108/256))= +3.53610e-001 +data8 0x3fd6cf31058670e8 // log(1/frcpa(1+109/256))= +3.56396e-001 +data8 0x3fd6f180e852f0b8 // log(1/frcpa(1+110/256))= +3.58490e-001 +data8 0x3fd71f5d71b894e8 // log(1/frcpa(1+111/256))= +3.61289e-001 +data8 0x3fd74d5aefd66d58 // log(1/frcpa(1+112/256))= +3.64096e-001 +data8 0x3fd77b79922bd378 // log(1/frcpa(1+113/256))= +3.66911e-001 +data8 0x3fd7a9b9889f19e0 // log(1/frcpa(1+114/256))= +3.69734e-001 +data8 0x3fd7d81b037eb6a0 // log(1/frcpa(1+115/256))= +3.72565e-001 +data8 0x3fd8069e33827230 // log(1/frcpa(1+116/256))= +3.75404e-001 +data8 0x3fd82996d3ef8bc8 // log(1/frcpa(1+117/256))= +3.77538e-001 +data8 0x3fd85855776dcbf8 // log(1/frcpa(1+118/256))= +3.80391e-001 +data8 0x3fd8873658327cc8 // log(1/frcpa(1+119/256))= +3.83253e-001 +data8 0x3fd8aa75973ab8c8 // log(1/frcpa(1+120/256))= +3.85404e-001 +data8 0x3fd8d992dc8824e0 // log(1/frcpa(1+121/256))= +3.88280e-001 +data8 0x3fd908d2ea7d9510 // log(1/frcpa(1+122/256))= +3.91164e-001 +data8 0x3fd92c59e79c0e50 // log(1/frcpa(1+123/256))= +3.93332e-001 +data8 0x3fd95bd750ee3ed0 // log(1/frcpa(1+124/256))= +3.96231e-001 +data8 0x3fd98b7811a3ee58 // log(1/frcpa(1+125/256))= +3.99138e-001 +data8 0x3fd9af47f33d4068 // log(1/frcpa(1+126/256))= +4.01323e-001 +data8 0x3fd9df270c1914a0 // log(1/frcpa(1+127/256))= +4.04245e-001 +data8 0x3fda0325ed14fda0 // log(1/frcpa(1+128/256))= +4.06442e-001 +data8 0x3fda33440224fa78 // log(1/frcpa(1+129/256))= +4.09379e-001 +data8 0x3fda57725e80c380 // log(1/frcpa(1+130/256))= +4.11587e-001 +data8 0x3fda87d0165dd198 // log(1/frcpa(1+131/256))= +4.14539e-001 +data8 0x3fdaac2e6c03f890 // log(1/frcpa(1+132/256))= +4.16759e-001 +data8 0x3fdadccc6fdf6a80 // log(1/frcpa(1+133/256))= +4.19726e-001 +data8 0x3fdb015b3eb1e790 // log(1/frcpa(1+134/256))= +4.21958e-001 +data8 0x3fdb323a3a635948 // log(1/frcpa(1+135/256))= +4.24941e-001 +data8 0x3fdb56fa04462908 // log(1/frcpa(1+136/256))= +4.27184e-001 +data8 0x3fdb881aa659bc90 // log(1/frcpa(1+137/256))= +4.30182e-001 +data8 0x3fdbad0bef3db160 // log(1/frcpa(1+138/256))= +4.32437e-001 +data8 0x3fdbd21297781c28 // log(1/frcpa(1+139/256))= +4.34697e-001 +data8 0x3fdc039236f08818 // log(1/frcpa(1+140/256))= +4.37718e-001 +data8 0x3fdc28cb1e4d32f8 // log(1/frcpa(1+141/256))= +4.39990e-001 +data8 0x3fdc4e19b84723c0 // log(1/frcpa(1+142/256))= +4.42267e-001 +data8 0x3fdc7ff9c74554c8 // log(1/frcpa(1+143/256))= +4.45311e-001 +data8 0x3fdca57b64e9db00 // log(1/frcpa(1+144/256))= +4.47600e-001 +data8 0x3fdccb130a5ceba8 // log(1/frcpa(1+145/256))= +4.49895e-001 +data8 0x3fdcf0c0d18f3268 // log(1/frcpa(1+146/256))= +4.52194e-001 +data8 0x3fdd232075b5a200 // log(1/frcpa(1+147/256))= +4.55269e-001 +data8 0x3fdd490246defa68 // log(1/frcpa(1+148/256))= +4.57581e-001 +data8 0x3fdd6efa918d25c8 // log(1/frcpa(1+149/256))= +4.59899e-001 +data8 0x3fdd9509707ae528 // log(1/frcpa(1+150/256))= +4.62221e-001 +data8 0x3fddbb2efe92c550 // log(1/frcpa(1+151/256))= +4.64550e-001 +data8 0x3fddee2f3445e4a8 // log(1/frcpa(1+152/256))= +4.67663e-001 +data8 0x3fde148a1a2726c8 // log(1/frcpa(1+153/256))= +4.70004e-001 +data8 0x3fde3afc0a49ff38 // log(1/frcpa(1+154/256))= +4.72350e-001 +data8 0x3fde6185206d5168 // log(1/frcpa(1+155/256))= +4.74702e-001 +data8 0x3fde882578823d50 // log(1/frcpa(1+156/256))= +4.77060e-001 +data8 0x3fdeaedd2eac9908 // log(1/frcpa(1+157/256))= +4.79423e-001 +data8 0x3fded5ac5f436be0 // log(1/frcpa(1+158/256))= +4.81792e-001 +data8 0x3fdefc9326d16ab8 // log(1/frcpa(1+159/256))= +4.84166e-001 +data8 0x3fdf2391a21575f8 // log(1/frcpa(1+160/256))= +4.86546e-001 +data8 0x3fdf4aa7ee031928 // log(1/frcpa(1+161/256))= +4.88932e-001 +data8 0x3fdf71d627c30bb0 // log(1/frcpa(1+162/256))= +4.91323e-001 +data8 0x3fdf991c6cb3b378 // log(1/frcpa(1+163/256))= +4.93720e-001 +data8 0x3fdfc07ada69a908 // log(1/frcpa(1+164/256))= +4.96123e-001 +data8 0x3fdfe7f18eb03d38 // log(1/frcpa(1+165/256))= +4.98532e-001 +data8 0x3fe007c053c5002c // log(1/frcpa(1+166/256))= +5.00946e-001 +data8 0x3fe01b942198a5a0 // log(1/frcpa(1+167/256))= +5.03367e-001 +data8 0x3fe02f74400c64e8 // log(1/frcpa(1+168/256))= +5.05793e-001 +data8 0x3fe04360be7603ac // log(1/frcpa(1+169/256))= +5.08225e-001 +data8 0x3fe05759ac47fe30 // log(1/frcpa(1+170/256))= +5.10663e-001 +data8 0x3fe06b5f1911cf50 // log(1/frcpa(1+171/256))= +5.13107e-001 +data8 0x3fe078bf0533c568 // log(1/frcpa(1+172/256))= +5.14740e-001 +data8 0x3fe08cd9687e7b0c // log(1/frcpa(1+173/256))= +5.17194e-001 +data8 0x3fe0a10074cf9018 // log(1/frcpa(1+174/256))= +5.19654e-001 +data8 0x3fe0b5343a234474 // log(1/frcpa(1+175/256))= +5.22120e-001 +data8 0x3fe0c974c89431cc // log(1/frcpa(1+176/256))= +5.24592e-001 +data8 0x3fe0ddc2305b9884 // log(1/frcpa(1+177/256))= +5.27070e-001 +data8 0x3fe0eb524bafc918 // log(1/frcpa(1+178/256))= +5.28726e-001 +data8 0x3fe0ffb54213a474 // log(1/frcpa(1+179/256))= +5.31214e-001 +data8 0x3fe114253da97d9c // log(1/frcpa(1+180/256))= +5.33709e-001 +data8 0x3fe128a24f1d9afc // log(1/frcpa(1+181/256))= +5.36210e-001 +data8 0x3fe1365252bf0864 // log(1/frcpa(1+182/256))= +5.37881e-001 +data8 0x3fe14ae558b4a92c // log(1/frcpa(1+183/256))= +5.40393e-001 +data8 0x3fe15f85a19c7658 // log(1/frcpa(1+184/256))= +5.42910e-001 +data8 0x3fe16d4d38c119f8 // log(1/frcpa(1+185/256))= +5.44592e-001 +data8 0x3fe18203c20dd130 // log(1/frcpa(1+186/256))= +5.47121e-001 +data8 0x3fe196c7bc4b1f38 // log(1/frcpa(1+187/256))= +5.49656e-001 +data8 0x3fe1a4a738b7a33c // log(1/frcpa(1+188/256))= +5.51349e-001 +data8 0x3fe1b981c0c9653c // log(1/frcpa(1+189/256))= +5.53895e-001 +data8 0x3fe1ce69e8bb1068 // log(1/frcpa(1+190/256))= +5.56447e-001 +data8 0x3fe1dc619de06944 // log(1/frcpa(1+191/256))= +5.58152e-001 +data8 0x3fe1f160a2ad0da0 // log(1/frcpa(1+192/256))= +5.60715e-001 +data8 0x3fe2066d7740737c // log(1/frcpa(1+193/256))= +5.63285e-001 +data8 0x3fe2147dba47a390 // log(1/frcpa(1+194/256))= +5.65001e-001 +data8 0x3fe229a1bc5ebac0 // log(1/frcpa(1+195/256))= +5.67582e-001 +data8 0x3fe237c1841a502c // log(1/frcpa(1+196/256))= +5.69306e-001 +data8 0x3fe24cfce6f80d98 // log(1/frcpa(1+197/256))= +5.71898e-001 +data8 0x3fe25b2c55cd5760 // log(1/frcpa(1+198/256))= +5.73630e-001 +data8 0x3fe2707f4d5f7c40 // log(1/frcpa(1+199/256))= +5.76233e-001 +data8 0x3fe285e0842ca380 // log(1/frcpa(1+200/256))= +5.78842e-001 +data8 0x3fe294294708b770 // log(1/frcpa(1+201/256))= +5.80586e-001 +data8 0x3fe2a9a2670aff0c // log(1/frcpa(1+202/256))= +5.83207e-001 +data8 0x3fe2b7fb2c8d1cc0 // log(1/frcpa(1+203/256))= +5.84959e-001 +data8 0x3fe2c65a6395f5f4 // log(1/frcpa(1+204/256))= +5.86713e-001 +data8 0x3fe2dbf557b0df40 // log(1/frcpa(1+205/256))= +5.89350e-001 +data8 0x3fe2ea64c3f97654 // log(1/frcpa(1+206/256))= +5.91113e-001 +data8 0x3fe3001823684d70 // log(1/frcpa(1+207/256))= +5.93762e-001 +data8 0x3fe30e97e9a8b5cc // log(1/frcpa(1+208/256))= +5.95531e-001 +data8 0x3fe32463ebdd34e8 // log(1/frcpa(1+209/256))= +5.98192e-001 +data8 0x3fe332f4314ad794 // log(1/frcpa(1+210/256))= +5.99970e-001 +data8 0x3fe348d90e7464cc // log(1/frcpa(1+211/256))= +6.02643e-001 +data8 0x3fe35779f8c43d6c // log(1/frcpa(1+212/256))= +6.04428e-001 +data8 0x3fe36621961a6a98 // log(1/frcpa(1+213/256))= +6.06217e-001 +data8 0x3fe37c299f3c3668 // log(1/frcpa(1+214/256))= +6.08907e-001 +data8 0x3fe38ae2171976e4 // log(1/frcpa(1+215/256))= +6.10704e-001 +data8 0x3fe399a157a603e4 // log(1/frcpa(1+216/256))= +6.12504e-001 +data8 0x3fe3afccfe77b9d0 // log(1/frcpa(1+217/256))= +6.15210e-001 +data8 0x3fe3be9d503533b4 // log(1/frcpa(1+218/256))= +6.17018e-001 +data8 0x3fe3cd7480b4a8a0 // log(1/frcpa(1+219/256))= +6.18830e-001 +data8 0x3fe3e3c43918f76c // log(1/frcpa(1+220/256))= +6.21554e-001 +data8 0x3fe3f2acb27ed6c4 // log(1/frcpa(1+221/256))= +6.23373e-001 +data8 0x3fe4019c2125ca90 // log(1/frcpa(1+222/256))= +6.25197e-001 +data8 0x3fe4181061389720 // log(1/frcpa(1+223/256))= +6.27937e-001 +data8 0x3fe42711518df544 // log(1/frcpa(1+224/256))= +6.29769e-001 +data8 0x3fe436194e12b6bc // log(1/frcpa(1+225/256))= +6.31604e-001 +data8 0x3fe445285d68ea68 // log(1/frcpa(1+226/256))= +6.33442e-001 +data8 0x3fe45bcc464c8938 // log(1/frcpa(1+227/256))= +6.36206e-001 +data8 0x3fe46aed21f117fc // log(1/frcpa(1+228/256))= +6.38053e-001 +data8 0x3fe47a1527e8a2d0 // log(1/frcpa(1+229/256))= +6.39903e-001 +data8 0x3fe489445efffcc8 // log(1/frcpa(1+230/256))= +6.41756e-001 +data8 0x3fe4a018bcb69834 // log(1/frcpa(1+231/256))= +6.44543e-001 +data8 0x3fe4af5a0c9d65d4 // log(1/frcpa(1+232/256))= +6.46405e-001 +data8 0x3fe4bea2a5bdbe84 // log(1/frcpa(1+233/256))= +6.48271e-001 +data8 0x3fe4cdf28f10ac44 // log(1/frcpa(1+234/256))= +6.50140e-001 +data8 0x3fe4dd49cf994058 // log(1/frcpa(1+235/256))= +6.52013e-001 +data8 0x3fe4eca86e64a680 // log(1/frcpa(1+236/256))= +6.53889e-001 +data8 0x3fe503c43cd8eb68 // log(1/frcpa(1+237/256))= +6.56710e-001 +data8 0x3fe513356667fc54 // log(1/frcpa(1+238/256))= +6.58595e-001 +data8 0x3fe522ae0738a3d4 // log(1/frcpa(1+239/256))= +6.60483e-001 +data8 0x3fe5322e26867854 // log(1/frcpa(1+240/256))= +6.62376e-001 +data8 0x3fe541b5cb979808 // log(1/frcpa(1+241/256))= +6.64271e-001 +data8 0x3fe55144fdbcbd60 // log(1/frcpa(1+242/256))= +6.66171e-001 +data8 0x3fe560dbc45153c4 // log(1/frcpa(1+243/256))= +6.68074e-001 +data8 0x3fe5707a26bb8c64 // log(1/frcpa(1+244/256))= +6.69980e-001 +data8 0x3fe587f60ed5b8fc // log(1/frcpa(1+245/256))= +6.72847e-001 +data8 0x3fe597a7977c8f30 // log(1/frcpa(1+246/256))= +6.74763e-001 +data8 0x3fe5a760d634bb88 // log(1/frcpa(1+247/256))= +6.76682e-001 +data8 0x3fe5b721d295f10c // log(1/frcpa(1+248/256))= +6.78605e-001 +data8 0x3fe5c6ea94431ef8 // log(1/frcpa(1+249/256))= +6.80532e-001 +data8 0x3fe5d6bb22ea86f4 // log(1/frcpa(1+250/256))= +6.82462e-001 +data8 0x3fe5e6938645d38c // log(1/frcpa(1+251/256))= +6.84397e-001 +data8 0x3fe5f673c61a2ed0 // log(1/frcpa(1+252/256))= +6.86335e-001 +data8 0x3fe6065bea385924 // log(1/frcpa(1+253/256))= +6.88276e-001 +data8 0x3fe6164bfa7cc068 // log(1/frcpa(1+254/256))= +6.90222e-001 +data8 0x3fe62643fecf9740 // log(1/frcpa(1+255/256))= +6.92171e-001 +LOCAL_OBJECT_END(pow_Tt) + + +// Table 1 is 2^(index_1/128) where +// index_1 goes from 0 to 15 +LOCAL_OBJECT_START(pow_tbl1) +data8 0x8000000000000000 , 0x00003FFF +data8 0x80B1ED4FD999AB6C , 0x00003FFF +data8 0x8164D1F3BC030773 , 0x00003FFF +data8 0x8218AF4373FC25EC , 0x00003FFF +data8 0x82CD8698AC2BA1D7 , 0x00003FFF +data8 0x8383594EEFB6EE37 , 0x00003FFF +data8 0x843A28C3ACDE4046 , 0x00003FFF +data8 0x84F1F656379C1A29 , 0x00003FFF +data8 0x85AAC367CC487B15 , 0x00003FFF +data8 0x8664915B923FBA04 , 0x00003FFF +data8 0x871F61969E8D1010 , 0x00003FFF +data8 0x87DB357FF698D792 , 0x00003FFF +data8 0x88980E8092DA8527 , 0x00003FFF +data8 0x8955EE03618E5FDD , 0x00003FFF +data8 0x8A14D575496EFD9A , 0x00003FFF +data8 0x8AD4C6452C728924 , 0x00003FFF +LOCAL_OBJECT_END(pow_tbl1) + + +// Table 2 is 2^(index_1/8) where +// index_2 goes from 0 to 7 +LOCAL_OBJECT_START(pow_tbl2) +data8 0x8000000000000000 , 0x00003FFF +data8 0x8B95C1E3EA8BD6E7 , 0x00003FFF +data8 0x9837F0518DB8A96F , 0x00003FFF +data8 0xA5FED6A9B15138EA , 0x00003FFF +data8 0xB504F333F9DE6484 , 0x00003FFF +data8 0xC5672A115506DADD , 0x00003FFF +data8 0xD744FCCAD69D6AF4 , 0x00003FFF +data8 0xEAC0C6E7DD24392F , 0x00003FFF +LOCAL_OBJECT_END(pow_tbl2) + +.section .text +GLOBAL_LIBM_ENTRY(powf) + +// Get exponent of x. Will be used to calculate K. +{ .mfi + getf.exp pow_GR_signexp_X = f8 + fms.s1 POW_Xm1 = f8,f1,f1 // Will be used for r1 if x>0 + mov pow_GR_17ones = 0x1FFFF +} +{ .mfi + addl pow_AD_P = @ltoff(pow_table_P), gp + fma.s1 POW_Xp1 = f8,f1,f1 // Will be used for r1 if x<0 + nop.i 999 +} +;; + +// Get significand of x. Will be used to get index to fetch T, Tt. +{ .mfi + getf.sig pow_GR_sig_X = f8 + frcpa.s1 POW_B, p6 = f1,f8 + mov pow_GR_exp_half = 0xFFFE // Exponent for 0.5 +} +{ .mfi + ld8 pow_AD_P = [pow_AD_P] + fma.s1 POW_NORM_X = f8,f1,f0 + mov pow_GR_exp_2tom8 = 0xFFF7 +} +;; + +// DOUBLE 0x10033 exponent limit at which y is an integer +{ .mfi + nop.m 999 + fcmp.lt.s1 p8,p9 = f8, f0 // Test for x<0 + addl pow_GR_10033 = 0x10033, r0 +} +{ .mfi + mov pow_GR_16ones = 0xFFFF + fma.s1 POW_NORM_Y = f9,f1,f0 + nop.i 999 +} +;; + +// p13 = TRUE ==> X is unorm +{ .mfi + setf.exp POW_Q0_half = pow_GR_exp_half // Form 0.5 + fclass.m p13,p0 = f8, 0x0b // Test for x unorm + adds pow_AD_Tt = pow_Tt - pow_table_P, pow_AD_P +} +{ .mfi + adds pow_AD_Q = pow_table_Q - pow_table_P, pow_AD_P + nop.f 999 + nop.i 999 +} +;; + +// p14 = TRUE ==> X is ZERO +{ .mfi + ldfe POW_P2 = [pow_AD_Q], 16 + fclass.m p14,p0 = f8, 0x07 + nop.i 999 +} +// Note POW_Xm1 and POW_r1 are used interchangably +{ .mfb + nop.m 999 +(p8) fnma.s1 POW_Xm1 = POW_Xp1,f1,f0 +(p13) br.cond.spnt POW_X_DENORM +} +;; + +// Continue normal and denormal paths here +POW_COMMON: +// p11 = TRUE ==> Y is a NAN +{ .mfi + and pow_GR_exp_X = pow_GR_signexp_X, pow_GR_17ones + fclass.m p11,p0 = f9, 0xc3 + nop.i 999 +} +{ .mfi + nop.m 999 + fms.s1 POW_r = POW_B, POW_NORM_X,f1 + mov pow_GR_y_zero = 0 +} +;; + +// Get exponent of |x|-1 to use in comparison to 2^-8 +{ .mmi + getf.exp pow_GR_signexp_Xm1 = POW_Xm1 + sub pow_GR_true_exp_X = pow_GR_exp_X, pow_GR_16ones + extr.u pow_GR_offset = pow_GR_sig_X, 55, 8 +} +;; + +{ .mfi + alloc r32=ar.pfs,2,19,4,0 + fcvt.fx.s1 POW_int_Y = POW_NORM_Y + shladd pow_AD_Tt = pow_GR_offset, 3, pow_AD_Tt +} +{ .mfi + setf.sig POW_int_K = pow_GR_true_exp_X + nop.f 999 + nop.i 999 +} +;; + +// p12 = TRUE if Y is ZERO +// Compute xsq to decide later if |x|=1 +{ .mfi + ldfe POW_P1 = [pow_AD_P], 16 + fclass.m p12,p0 = f9, 0x07 + nop.i 999 +} +{ .mfb + ldfe POW_P0 = [pow_AD_Q], 16 + fma.s1 POW_xsq = POW_NORM_X, POW_NORM_X, f0 +(p11) br.cond.spnt POW_Y_NAN // Branch if y=nan +} +;; + +{ .mmf + getf.exp pow_GR_signexp_Y = POW_NORM_Y + ldfd POW_T = [pow_AD_Tt] + fma.s1 POW_rsq = POW_r, POW_r,f0 +} +;; + +// p11 = TRUE ==> X is a NAN +{ .mfi + ldfpd POW_log2_hi, POW_log2_lo = [pow_AD_Q], 16 + fclass.m p11,p0 = POW_NORM_X, 0xc3 + nop.i 999 +} +{ .mfi + ldfe POW_inv_log2_by_128 = [pow_AD_P], 16 + fma.s1 POW_delta = f0,f0,f0 // delta=0 in case |x| near 1 +(p12) mov pow_GR_y_zero = 1 +} +;; + +{ .mfi + ldfd POW_Q2 = [pow_AD_P], 16 + fnma.s1 POW_twoV = POW_r, POW_Q0_half,f1 + and pow_GR_exp_Xm1 = pow_GR_signexp_Xm1, pow_GR_17ones +} +{ .mfi + nop.m 999 + fma.s1 POW_U = POW_NORM_Y,POW_r,f0 + nop.i 999 +} +;; + +// Determine if we will use the |x| near 1 path (p6) or normal path (p7) +{ .mfi + nop.m 999 + fcvt.xf POW_K = POW_int_K + cmp.lt p6,p7 = pow_GR_exp_Xm1, pow_GR_exp_2tom8 +} +{ .mfb + nop.m 999 + fma.s1 POW_G = f0,f0,f0 // G=0 in case |x| near 1 +(p11) br.cond.spnt POW_X_NAN // Branch if x=nan and y not nan +} +;; + +// If on the x near 1 path, assign r1 to r +{ .mfi + ldfpd POW_Q1, POW_RSHF = [pow_AD_P], 16 +(p6) fma.s1 POW_r = POW_r1, f1, f0 + nop.i 999 +} +{ .mfb + nop.m 999 +(p6) fma.s1 POW_rsq = POW_r1, POW_r1, f0 +(p14) br.cond.spnt POW_X_0 // Branch if x zero and y not nan +} +;; + +{ .mfi + getf.sig pow_GR_sig_int_Y = POW_int_Y +(p6) fnma.s1 POW_twoV = POW_r1, POW_Q0_half,f1 + and pow_GR_exp_Y = pow_GR_signexp_Y, pow_GR_17ones +} +{ .mfb + andcm pow_GR_sign_Y = pow_GR_signexp_Y, pow_GR_17ones +(p6) fma.s1 POW_U = POW_NORM_Y,POW_r1,f0 +(p12) br.cond.spnt POW_Y_0 // Branch if y=zero, x not zero or nan +} +;; + +{ .mfi + ldfe POW_log2_by_128_lo = [pow_AD_P], 16 +(p7) fma.s1 POW_Z2 = POW_twoV, POW_U, f0 + nop.i 999 +} +{ .mfi + ldfe POW_log2_by_128_hi = [pow_AD_Q], 16 + nop.f 999 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fcvt.xf POW_float_int_Y = POW_int_Y + nop.i 999 +} +{ .mfi + nop.m 999 +(p7) fma.s1 POW_G = POW_K, POW_log2_hi, POW_T + adds pow_AD_tbl1 = pow_tbl1 - pow_Tt, pow_AD_Q +} +;; + +// p11 = TRUE ==> X is NEGATIVE but not inf +{ .mfi + nop.m 999 + fclass.m p11,p0 = POW_NORM_X, 0x1a + nop.i 999 +} +{ .mfi + nop.m 999 +(p7) fma.s1 POW_delta = POW_K, POW_log2_lo, f0 + adds pow_AD_tbl2 = pow_tbl2 - pow_tbl1, pow_AD_tbl1 +} +;; + +{ .mfi + nop.m 999 +(p6) fma.s1 POW_Z = POW_twoV, POW_U, f0 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 POW_v2 = POW_P1, POW_r, POW_P0 + nop.i 999 +} +;; + +// p11 = TRUE ==> X is NEGATIVE but not inf +// p12 = TRUE ==> X is NEGATIVE AND Y already even int +// p13 = TRUE ==> X is NEGATIVE AND Y possible int +{ .mfi + nop.m 999 +(p7) fma.s1 POW_Z = POW_NORM_Y, POW_G, POW_Z2 +(p11) cmp.gt.unc p12,p13 = pow_GR_exp_Y, pow_GR_10033 +} +{ .mfi + nop.m 999 + fma.s1 POW_Gpr = POW_G, f1, POW_r + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 POW_Yrcub = POW_rsq, POW_U, f0 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 POW_p = POW_rsq, POW_P2, POW_v2 + nop.i 999 +} +;; + +// Test if x inf +{ .mfi + nop.m 999 + fclass.m p15,p0 = POW_NORM_X, 0x23 + nop.i 999 +} +// By adding RSHF (1.1000...*2^63) we put integer part in rightmost significand +{ .mfi + nop.m 999 + fma.s1 POW_W1 = POW_Z, POW_inv_log2_by_128, POW_RSHF + nop.i 999 +} +;; + +// p13 = TRUE ==> X is NEGATIVE AND Y possible int +// p10 = TRUE ==> X is NEG and Y is an int +// p12 = TRUE ==> X is NEG and Y is not an int +{ .mfi + nop.m 999 +(p13) fcmp.eq.unc.s1 p10,p12 = POW_float_int_Y, POW_NORM_Y + mov pow_GR_xneg_yodd = 0 +} +{ .mfi + nop.m 999 + fma.s1 POW_Y_Gpr = POW_NORM_Y, POW_Gpr, f0 + nop.i 999 +} +;; + +// p11 = TRUE ==> X is +1.0 +{ .mfi + nop.m 999 + fcmp.eq.s1 p11,p0 = POW_NORM_X, f1 + nop.i 999 +} +;; + +// Extract rounded integer from rightmost significand of POW_W1 +// By subtracting RSHF we get rounded integer POW_Nfloat +{ .mfi + getf.sig pow_GR_int_N = POW_W1 + fms.s1 POW_Nfloat = POW_W1, f1, POW_RSHF + nop.i 999 +} +{ .mfb + nop.m 999 + fma.s1 POW_Z3 = POW_p, POW_Yrcub, f0 +(p12) br.cond.spnt POW_X_NEG_Y_NONINT // Branch if x neg, y not integer +} +;; + +// p7 = TRUE ==> Y is +1.0 +// p12 = TRUE ==> X is NEGATIVE AND Y is an odd integer +{ .mfi + getf.exp pow_GR_signexp_Y_Gpr = POW_Y_Gpr + fcmp.eq.s1 p7,p0 = POW_NORM_Y, f1 // Test for y=1.0 +(p10) tbit.nz.unc p12,p0 = pow_GR_sig_int_Y,0 +} +{ .mfb + nop.m 999 +(p11) fma.s.s0 f8 = f1,f1,f0 // If x=1, result is +1 +(p15) br.cond.spnt POW_X_INF +} +;; + +// Test x and y and flag denormal +{ .mfi + nop.m 999 + fcmp.eq.s0 p15,p0 = f8,f9 + nop.i 999 +} +{ .mfb + nop.m 999 + fma.s1 POW_e3 = POW_NORM_Y, POW_delta, f0 +(p11) br.ret.spnt b0 // Early exit if x=1.0, result is +1 +} +;; + +{ .mfi +(p12) mov pow_GR_xneg_yodd = 1 + fnma.s1 POW_f12 = POW_Nfloat, POW_log2_by_128_lo, f1 + nop.i 999 +} +{ .mfb + nop.m 999 + fnma.s1 POW_s = POW_Nfloat, POW_log2_by_128_hi, POW_Z +(p7) br.ret.spnt b0 // Early exit if y=1.0, result is x +} +;; + +{ .mmi + and pow_GR_index1 = 0x0f, pow_GR_int_N + and pow_GR_index2 = 0x70, pow_GR_int_N + shr pow_int_GR_M = pow_GR_int_N, 7 // M = N/128 +} +;; + +{ .mfi + shladd pow_AD_T1 = pow_GR_index1, 4, pow_AD_tbl1 + fma.s1 POW_q = POW_Z3, POW_Q1, POW_Q0_half + add pow_int_GR_M = pow_GR_16ones, pow_int_GR_M +} +{ .mfi + add pow_AD_T2 = pow_AD_tbl2, pow_GR_index2 + fma.s1 POW_Z3sq = POW_Z3, POW_Z3, f0 + nop.i 999 +} +;; + +{ .mmi + ldfe POW_T1 = [pow_AD_T1] + ldfe POW_T2 = [pow_AD_T2] + nop.i 999 +} +;; + +// f123 = f12*(e3+1) = f12*e3+f12 +{ .mfi + setf.exp POW_2M = pow_int_GR_M + fma.s1 POW_f123 = POW_e3,POW_f12,POW_f12 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 POW_ssq = POW_s, POW_s, f0 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 POW_v2 = POW_s, POW_Q2, POW_Q1 + and pow_GR_exp_Y_Gpr = pow_GR_signexp_Y_Gpr, pow_GR_17ones +} +;; + +{ .mfi + cmp.ne p12,p13 = pow_GR_xneg_yodd, r0 + fma.s1 POW_q = POW_Z3sq, POW_q, POW_Z3 + sub pow_GR_true_exp_Y_Gpr = pow_GR_exp_Y_Gpr, pow_GR_16ones +} +;; + +// p8 TRUE ==> |Y(G + r)| >= 7 + +// single +// -2^7 -2^6 2^6 2^7 +// -----+-----+----+ ... +-----+-----+----- +// p8 | p9 | p8 +// | | p10 | | + +// Form signexp of constants to indicate overflow +{ .mfi + mov pow_GR_big_pos = 0x1007f + nop.f 999 + cmp.le p8,p9 = 7, pow_GR_true_exp_Y_Gpr +} +{ .mfi + mov pow_GR_big_neg = 0x3007f + nop.f 999 + andcm pow_GR_sign_Y_Gpr = pow_GR_signexp_Y_Gpr, pow_GR_17ones +} +;; + +// Form big positive and negative constants to test for possible overflow +// Scale both terms of the polynomial by POW_f123 +{ .mfi + setf.exp POW_big_pos = pow_GR_big_pos + fma.s1 POW_ssq = POW_ssq, POW_f123, f0 +(p9) cmp.le.unc p0,p10 = 6, pow_GR_true_exp_Y_Gpr +} +{ .mfb + setf.exp POW_big_neg = pow_GR_big_neg + fma.s1 POW_1ps = POW_s, POW_f123, POW_f123 +(p8) br.cond.spnt POW_OVER_UNDER_X_NOT_INF +} +;; + +{ .mfi + nop.m 999 +(p12) fnma.s1 POW_T1T2 = POW_T1, POW_T2, f0 + nop.i 999 +} +{ .mfi + nop.m 999 +(p13) fma.s1 POW_T1T2 = POW_T1, POW_T2, f0 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 POW_v210 = POW_s, POW_v2, POW_Q0_half + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 POW_2Mqp1 = POW_2M, POW_q, POW_2M + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 POW_es = POW_ssq, POW_v210, POW_1ps + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 POW_A = POW_T1T2, POW_2Mqp1, f0 + nop.i 999 +} +;; + +// Dummy op to set inexact +{ .mfi + nop.m 999 + fma.s0 POW_tmp = POW_2M, POW_q, POW_2M + nop.i 999 +} +;; + +{ .mfb + nop.m 999 + fma.s.s0 f8 = POW_A, POW_es, f0 +(p10) br.ret.sptk b0 // Exit main branch if no over/underflow +} +;; + +// POSSIBLE_OVER_UNDER +// p6 = TRUE ==> Y_Gpr negative +// Result is already computed. We just need to know if over/underflow occurred. + +{ .mfb + cmp.eq p0,p6 = pow_GR_sign_Y_Gpr, r0 + nop.f 999 +(p6) br.cond.spnt POW_POSSIBLE_UNDER +} +;; + +// POSSIBLE_OVER +// We got an answer. +// overflow is a possibility, not a certainty + + +// We define an overflow when the answer with +// WRE set +// user-defined rounding mode + +// double +// Largest double is 7FE (biased double) +// 7FE - 3FF + FFFF = 103FE +// Create + largest_double_plus_ulp +// Create - largest_double_plus_ulp +// Calculate answer with WRE set. + +// single +// Largest single is FE (biased double) +// FE - 7F + FFFF = 1007E +// Create + largest_single_plus_ulp +// Create - largest_single_plus_ulp +// Calculate answer with WRE set. + +// Cases when answer is ldn+1 are as follows: +// ldn ldn+1 +// --+----------|----------+------------ +// | +// +inf +inf -inf +// RN RN +// RZ + +// Put in s2 (td set, wre set) +{ .mfi + nop.m 999 + fsetc.s2 0x7F,0x42 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s.s2 POW_wre_urm_f8 = POW_A, POW_es, f0 + nop.i 999 +} +;; + +// Return s2 to default +{ .mfi + nop.m 999 + fsetc.s2 0x7F,0x40 + nop.i 999 +} +;; + +// p7 = TRUE ==> yes, we have an overflow +{ .mfi + nop.m 999 + fcmp.ge.s1 p7, p8 = POW_wre_urm_f8, POW_big_pos + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p8) fcmp.le.s1 p7, p0 = POW_wre_urm_f8, POW_big_neg + nop.i 999 +} +;; + +{ .mbb +(p7) mov pow_GR_tag = 30 +(p7) br.cond.spnt __libm_error_region // Branch if overflow + br.ret.sptk b0 // Exit if did not overflow +} +;; + + +POW_POSSIBLE_UNDER: +// We got an answer. input was < -2^9 but > -2^10 (double) +// We got an answer. input was < -2^6 but > -2^7 (float) +// underflow is a possibility, not a certainty + +// We define an underflow when the answer with +// ftz set +// is zero (tiny numbers become zero) +// Notice (from below) that if we have an unlimited exponent range, +// then there is an extra machine number E between the largest denormal and +// the smallest normal. +// So if with unbounded exponent we round to E or below, then we are +// tiny and underflow has occurred. +// But notice that you can be in a situation where we are tiny, namely +// rounded to E, but when the exponent is bounded we round to smallest +// normal. So the answer can be the smallest normal with underflow. +// E +// -----+--------------------+--------------------+----- +// | | | +// 1.1...10 2^-3fff 1.1...11 2^-3fff 1.0...00 2^-3ffe +// 0.1...11 2^-3ffe (biased, 1) +// largest dn smallest normal + +// Form small constant (2^-170) to correct underflow result near region of +// smallest denormal in round-nearest. + +// Put in s2 (td set, ftz set) +.pred.rel "mutex",p12,p13 +{ .mfi + mov pow_GR_Fpsr = ar40 // Read the fpsr--need to check rc.s0 + fsetc.s2 0x7F,0x41 + mov pow_GR_rcs0_mask = 0x0c00 // Set mask for rc.s0 +} +{ .mfi +(p12) mov pow_GR_tmp = 0x2ffff - 170 + nop.f 999 +(p13) mov pow_GR_tmp = 0x0ffff - 170 +} +;; + +{ .mfi + setf.exp POW_eps = pow_GR_tmp // Form 2^-170 + fma.s.s2 POW_ftz_urm_f8 = POW_A, POW_es, f0 + nop.i 999 +} +;; + +// Return s2 to default +{ .mfi + nop.m 999 + fsetc.s2 0x7F,0x40 + nop.i 999 +} +;; + +// p7 = TRUE ==> yes, we have an underflow +{ .mfi + nop.m 999 + fcmp.eq.s1 p7, p0 = POW_ftz_urm_f8, f0 + nop.i 999 +} +;; + +{ .mmi +(p7) and pow_GR_rcs0 = pow_GR_rcs0_mask, pow_GR_Fpsr // Isolate rc.s0 +;; +(p7) cmp.eq.unc p6,p0 = pow_GR_rcs0, r0 // Test for round to nearest + nop.i 999 +} +;; + +// Tweak result slightly if underflow to get correct rounding near smallest +// denormal if round-nearest +{ .mfi + nop.m 999 +(p6) fms.s.s0 f8 = POW_A, POW_es, POW_eps + nop.i 999 +} +{ .mbb +(p7) mov pow_GR_tag = 31 +(p7) br.cond.spnt __libm_error_region // Branch if underflow + br.ret.sptk b0 // Exit if did not underflow +} +;; + +POW_X_DENORM: +// Here if x unorm. Use the NORM_X for getf instructions, and then back +// to normal path +{ .mfi + getf.exp pow_GR_signexp_X = POW_NORM_X + nop.f 999 + nop.i 999 +} +;; + +{ .mib + getf.sig pow_GR_sig_X = POW_NORM_X + nop.i 999 + br.cond.sptk POW_COMMON +} +;; + +POW_X_0: +// Here if x=0 and y not nan +// +// We have the following cases: +// p6 x=0 and y>0 and is an integer (may be even or odd) +// p7 x=0 and y>0 and is NOT an integer, return +0 +// p8 x=0 and y>0 and so big as to always be an even integer, return +0 +// p9 x=0 and y>0 and may not be integer +// p10 x=0 and y>0 and is an odd integer, return x +// p11 x=0 and y>0 and is an even integer, return +0 +// p12 used in dummy fcmp to set denormal flag if y=unorm +// p13 x=0 and y>0 +// p14 x=0 and y=0, branch to code for calling error handling +// p15 x=0 and y<0, branch to code for calling error handling +// +{ .mfi + getf.sig pow_GR_sig_int_Y = POW_int_Y // Get signif of int_Y + fcmp.lt.s1 p15,p13 = f9, f0 // Test for y<0 + and pow_GR_exp_Y = pow_GR_signexp_Y, pow_GR_17ones +} +{ .mfb + cmp.ne p14,p0 = pow_GR_y_zero,r0 // Test for y=0 + fcvt.xf POW_float_int_Y = POW_int_Y +(p14) br.cond.spnt POW_X_0_Y_0 // Branch if x=0 and y=0 +} +;; + +// If x=0 and y>0, test y and flag denormal +{ .mfb +(p13) cmp.gt.unc p8,p9 = pow_GR_exp_Y, pow_GR_10033 // Test y +big = even int +(p13) fcmp.eq.s0 p12,p0 = f9,f0 // If x=0, y>0 dummy op to flag denormal +(p15) br.cond.spnt POW_X_0_Y_NEG // Branch if x=0 and y<0 +} +;; + +// Here if x=0 and y>0 +{ .mfi + nop.m 999 +(p9) fcmp.eq.unc.s1 p6,p7 = POW_float_int_Y, POW_NORM_Y // Test y=int + nop.i 999 +} +{ .mfi + nop.m 999 +(p8) fma.s.s0 f8 = f0,f0,f0 // If x=0, y>0 and large even int, return +0 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p7) fma.s.s0 f8 = f0,f0,f0 // Result +0 if x=0 and y>0 and not integer +(p6) tbit.nz.unc p10,p11 = pow_GR_sig_int_Y,0 // If y>0 int, test y even/odd +} +;; + +// Note if x=0, y>0 and odd integer, just return x +{ .mfb + nop.m 999 +(p11) fma.s.s0 f8 = f0,f0,f0 // Result +0 if x=0 and y even integer + br.ret.sptk b0 // Exit if x=0 and y>0 +} +;; + +POW_X_0_Y_0: +// When X is +-0 and Y is +-0, IEEE returns 1.0 +// We call error support with this value + +{ .mfb + mov pow_GR_tag = 32 + fma.s.s0 f8 = f1,f1,f0 + br.cond.sptk __libm_error_region +} +;; + +POW_X_0_Y_NEG: +// When X is +-0 and Y is negative, IEEE returns +// X Y answer +// +0 -odd int +inf +// -0 -odd int -inf + +// +0 !-odd int +inf +// -0 !-odd int +inf + +// p6 == Y is a floating point number outside the integer. +// Hence it is an integer and is even. +// return +inf + +// p7 == Y is a floating point number within the integer range. +// p9 == (int_Y = NORM_Y), Y is an integer, which may be odd or even. +// p11 odd +// return (sign_of_x)inf +// p12 even +// return +inf +// p10 == Y is not an integer +// return +inf +// + +{ .mfi + nop.m 999 + nop.f 999 + cmp.gt p6,p7 = pow_GR_exp_Y, pow_GR_10033 +} +;; + +{ .mfi + mov pow_GR_tag = 33 +(p7) fcmp.eq.unc.s1 p9,p10 = POW_float_int_Y, POW_NORM_Y + nop.i 999 +} +;; + +{ .mfb + nop.m 999 +(p6) frcpa.s0 f8,p13 = f1, f0 +(p6) br.cond.sptk __libm_error_region // x=0, y<0, y large neg int +} +;; + +{ .mfb + nop.m 999 +(p10) frcpa.s0 f8,p13 = f1, f0 +(p10) br.cond.sptk __libm_error_region // x=0, y<0, y not int +} +;; + +// x=0, y<0, y an int +{ .mib + nop.m 999 +(p9) tbit.nz.unc p11,p12 = pow_GR_sig_int_Y,0 + nop.b 999 +} +;; + +{ .mfi + nop.m 999 +(p12) frcpa.s0 f8,p13 = f1,f0 + nop.i 999 +} +;; + +{ .mfb + nop.m 999 +(p11) frcpa.s0 f8,p13 = f1,f8 + br.cond.sptk __libm_error_region +} +;; + + +POW_Y_0: +// Here for y zero, x anything but zero and nan +// Set flag if x denormal +// Result is +1.0 +{ .mfi + nop.m 999 + fcmp.eq.s0 p6,p0 = f8,f0 // Sets flag if x denormal + nop.i 999 +} +{ .mfb + nop.m 999 + fma.s.s0 f8 = f1,f1,f0 + br.ret.sptk b0 +} +;; + + +POW_X_INF: +// Here when X is +-inf + +// X +inf Y +inf +inf +// X -inf Y +inf +inf + +// X +inf Y >0 +inf +// X -inf Y >0, !odd integer +inf <== (-inf)^0.5 = +inf !! +// X -inf Y >0, odd integer -inf + +// X +inf Y -inf +0 +// X -inf Y -inf +0 + +// X +inf Y <0 +0 +// X -inf Y <0, !odd integer +0 +// X -inf Y <0, odd integer -0 + +// X + inf Y=+0 +1 +// X + inf Y=-0 +1 +// X - inf Y=+0 +1 +// X - inf Y=-0 +1 + +// p13 == Y negative +// p14 == Y positive + +// p6 == Y is a floating point number outside the integer. +// Hence it is an integer and is even. +// p13 == (Y negative) +// return +inf +// p14 == (Y positive) +// return +0 + +// p7 == Y is a floating point number within the integer range. +// p9 == (int_Y = NORM_Y), Y is an integer, which may be odd or even. +// p11 odd +// p13 == (Y negative) +// return (sign_of_x)inf +// p14 == (Y positive) +// return (sign_of_x)0 +// pxx even +// p13 == (Y negative) +// return +inf +// p14 == (Y positive) +// return +0 + +// pxx == Y is not an integer +// p13 == (Y negative) +// return +inf +// p14 == (Y positive) +// return +0 +// + +// If x=inf, test y and flag denormal +{ .mfi + nop.m 999 + fcmp.eq.s0 p10,p11 = f9,f0 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fcmp.lt.s0 p13,p14 = POW_NORM_Y,f0 + cmp.gt p6,p7 = pow_GR_exp_Y, pow_GR_10033 +} +{ .mfi + nop.m 999 + fclass.m p12,p0 = f9, 0x23 //@inf + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fclass.m p15,p0 = f9, 0x07 //@zero + nop.i 999 +} +;; + +{ .mfb + nop.m 999 +(p15) fmerge.s f8 = f1,f1 // Return +1.0 if x=inf, y=0 +(p15) br.ret.spnt b0 // Exit if x=inf, y=0 +} +;; + +{ .mfi + nop.m 999 +(p14) frcpa.s1 f8,p10 = f1,f0 // If x=inf, y>0, assume result +inf + nop.i 999 +} +{ .mfb + nop.m 999 +(p13) fma.s.s0 f8 = f0,f0,f0 // If x=inf, y<0, assume result +0.0 +(p12) br.ret.spnt b0 // Exit if x=inf, y=inf +} +;; + +// Here if x=inf, and 0 < |y| < inf. Need to correct results if y odd integer. +{ .mfi + nop.m 999 +(p7) fcmp.eq.unc.s1 p9,p0 = POW_float_int_Y, POW_NORM_Y // Is y integer? + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + nop.f 999 +(p9) tbit.nz.unc p11,p0 = pow_GR_sig_int_Y,0 // Test for y odd integer +} +;; + +{ .mfb + nop.m 999 +(p11) fmerge.s f8 = POW_NORM_X,f8 // If y odd integer use sign of x + br.ret.sptk b0 // Exit for x=inf, 0 < |y| < inf +} +;; + + +POW_X_NEG_Y_NONINT: +// When X is negative and Y is a non-integer, IEEE +// returns a qnan indefinite. +// We call error support with this value + +{ .mfb + mov pow_GR_tag = 34 + frcpa.s0 f8,p6 = f0,f0 + br.cond.sptk __libm_error_region +} +;; + +POW_X_NAN: +// Here if x=nan, y not nan +{ .mfi + nop.m 999 + fclass.m p9,p13 = f9, 0x07 // Test y=zero + nop.i 999 +} +;; + +{ .mfb + nop.m 999 +(p13) fma.s.s0 f8 = f8,f1,f0 +(p13) br.ret.sptk b0 // Exit if x nan, y anything but zero or nan +} +;; + +POW_X_NAN_Y_0: +// When X is a NAN and Y is zero, IEEE returns 1. +// We call error support with this value. +{ .mfi + nop.m 999 + fcmp.eq.s0 p6,p0 = f8,f0 // Dummy op to set invalid on snan + nop.i 999 +} +{ .mfb + mov pow_GR_tag = 35 + fma.s.s0 f8 = f0,f0,f1 + br.cond.sptk __libm_error_region +} +;; + + +POW_OVER_UNDER_X_NOT_INF: + +// p8 is TRUE for overflow +// p9 is TRUE for underflow + +// if y is infinity, we should not over/underflow + +{ .mfi + nop.m 999 + fcmp.eq.s1 p14, p13 = POW_xsq,f1 // Test |x|=1 + cmp.eq p8,p9 = pow_GR_sign_Y_Gpr, r0 +} +;; + +{ .mfi + nop.m 999 +(p14) fclass.m.unc p15, p0 = f9, 0x23 // If |x|=1, test y=inf + nop.i 999 +} +{ .mfi + nop.m 999 +(p13) fclass.m.unc p11,p0 = f9, 0x23 // If |x| not 1, test y=inf + nop.i 999 +} +;; + +// p15 = TRUE if |x|=1, y=inf, return +1 +{ .mfb + nop.m 999 +(p15) fma.s.s0 f8 = f1,f1,f0 // If |x|=1, y=inf, result +1 +(p15) br.ret.spnt b0 // Exit if |x|=1, y=inf +} +;; + +.pred.rel "mutex",p8,p9 +{ .mfb +(p8) setf.exp f8 = pow_GR_17ones // If exp(+big), result inf +(p9) fmerge.s f8 = f0,f0 // If exp(-big), result 0 +(p11) br.ret.sptk b0 // Exit if |x| not 1, y=inf +} +;; + +{ .mfb + nop.m 999 + nop.f 999 + br.cond.sptk POW_OVER_UNDER_ERROR // Branch if y not inf +} +;; + + +POW_Y_NAN: +// Here if y=nan, x anything +// If x = +1 then result is +1, else result is quiet Y +{ .mfi + nop.m 999 + fcmp.eq.s1 p10,p9 = POW_NORM_X, f1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p10) fcmp.eq.s0 p6,p0 = f9,f1 // Set invalid, even if x=+1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p10) fma.s.s0 f8 = f1,f1,f0 + nop.i 999 +} +{ .mfb + nop.m 999 +(p9) fma.s.s0 f8 = f9,f8,f0 + br.ret.sptk b0 // Exit y=nan +} +;; + + +POW_OVER_UNDER_ERROR: +// Here if we have overflow or underflow. +// Enter with p12 true if x negative and y odd int to force -0 or -inf + +{ .mfi + sub pow_GR_17ones_m1 = pow_GR_17ones, r0, 1 + nop.f 999 + mov pow_GR_one = 0x1 +} +;; + +// overflow, force inf with O flag +{ .mmb +(p8) mov pow_GR_tag = 30 +(p8) setf.exp POW_tmp = pow_GR_17ones_m1 + nop.b 999 +} +;; + +// underflow, force zero with I, U flags +{ .mmi +(p9) mov pow_GR_tag = 31 +(p9) setf.exp POW_tmp = pow_GR_one + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s.s0 f8 = POW_tmp, POW_tmp, f0 + nop.i 999 +} +;; + +// p12 x is negative and y is an odd integer, change sign of result +{ .mfi + nop.m 999 +(p12) fnma.s.s0 f8 = POW_tmp, POW_tmp, f0 + nop.i 999 +} +;; + +GLOBAL_LIBM_END(powf) + + +LOCAL_LIBM_ENTRY(__libm_error_region) + +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; + +{ .mmi + stfs [GR_Parameter_Y] = POW_NORM_Y,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; + +.body +{ .mib + stfs [GR_Parameter_X] = POW_NORM_X // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfs [GR_Parameter_Y] = f8 // STORE Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; + +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; + +{ .mmi + ldfs f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; + +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) + +.type __libm_error_support#,@function +.global __libm_error_support# + diff --git a/sysdeps/ia64/fpu/e_powl.S b/sysdeps/ia64/fpu/e_powl.S new file mode 100644 index 0000000000..3f93f6090e --- /dev/null +++ b/sysdeps/ia64/fpu/e_powl.S @@ -0,0 +1,2810 @@ +.file "powl.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +//********************************************************************* +// +// Function: powl(x,y), where +// y +// powl(x,y) = x , for double extended precision x and y values +// +//********************************************************************* +// +// History: +// 02/02/00 (Hand Optimized) +// 04/04/00 Unwind support added +// 08/15/00 Bundle added after call to __libm_error_support to properly +// set [the previously overwritten] GR_Parameter_RESULT. +// 01/22/01 Corrected results for powl(1,inf), powl(1,nan), and +// powl(snan,0) to be 1 per C99, not nan. Fixed many flag settings. +// 02/06/01 Call __libm_error support if over/underflow when y=2. +// 04/17/01 Support added for y close to 1 and x a non-special value. +// Shared software under/overflow detection for all paths +// 02/07/02 Corrected sf3 setting to disable traps +// 05/13/02 Improved performance of all paths +// 02/10/03 Reordered header: .section, .global, .proc, .align; +// used data8 for long double table values +// 04/17/03 Added missing mutex directive +// 10/13/03 Corrected .endp names to match .proc names +// +//********************************************************************* +// +// Resources Used: +// +// Floating-Point Registers: +// f8 (Input x and Return Value) +// f9 (Input y) +// f10-f15,f32-f79 +// +// General Purpose Registers: +// Locals r14-24,r32-r65 +// Parameters to __libm_error_support r62,r63,r64,r65 +// +// Predicate Registers: p6-p15 +// +//********************************************************************* +// +// Special Cases and IEEE special conditions: +// +// Denormal fault raised on denormal inputs +// Overflow exceptions raised when appropriate for pow +// Underflow exceptions raised when appropriate for pow +// (Error Handling Routine called for overflow and Underflow) +// Inexact raised when appropriate by algorithm +// +// 1. (anything) ** NatVal or (NatVal) ** anything is NatVal +// 2. X or Y unsupported or sNaN is qNaN/Invalid +// 3. (anything) ** 0 is 1 +// 4. (anything) ** 1 is itself +// 5. (anything except 1) ** qNAN is qNAN +// 6. qNAN ** (anything except 0) is qNAN +// 7. +-(|x| > 1) ** +INF is +INF +// 8. +-(|x| > 1) ** -INF is +0 +// 9. +-(|x| < 1) ** +INF is +0 +// 10. +-(|x| < 1) ** -INF is +INF +// 11. +-1 ** +-INF is +1 +// 12. +0 ** (+anything except 0, NAN) is +0 +// 13. -0 ** (+anything except 0, NAN, odd integer) is +0 +// 14. +0 ** (-anything except 0, NAN) is +INF/div_0 +// 15. -0 ** (-anything except 0, NAN, odd integer) is +INF/div_0 +// 16. -0 ** (odd integer) = -( +0 ** (odd integer) ) +// 17. +INF ** (+anything except 0,NAN) is +INF +// 18. +INF ** (-anything except 0,NAN) is +0 +// 19. -INF ** (anything except NAN) = -0 ** (-anything) +// 20. (-anything) ** (integer) is (-1)**(integer)*(+anything**integer) +// 21. (-anything except 0 and inf) ** (non-integer) is qNAN/Invalid +// 22. X or Y denorm/unorm and denorm/unorm operand trap is enabled, +// generate denorm/unorm fault except if invalid or div_0 raised. +// +//********************************************************************* +// +// Algorithm +// ========= +// +// Special Cases +// +// If Y = 2, return X*X. +// If Y = 0.5, return sqrt(X). +// +// Compute log(X) to extra precision. +// +// ker_log_80( X, logX_hi, logX_lo, Safe ); +// +// ...logX_hi + logX_lo approximates log(X) to roughly 80 +// ...significant bits of accuracy. +// +// Compute Y*log(X) to extra precision. +// +// P_hi := Y * logX_hi +// P_lo := Y * logX_hi - P_hi ...using FMA +// P_lo := Y * logX_lo + P_lo ...using FMA +// +// Compute exp(P_hi + P_lo) +// +// Flag := 2; +// Expo_Range := 2; (assuming double-extended power function) +// ker_exp_64( P_hi, P_lo, Flag, Expo_Range, +// Z_hi, Z_lo, scale, Safe ) +// +// scale := sgn * scale +// +// If (Safe) then ...result will not over/underflow +// return scale*Z_hi + (scale*Z_lo) +// quickly +// Else +// take necessary precaution in computing +// scale*Z_hi + (scale*Z_lo) +// to set possible exceptions correctly. +// End If +// +// Case_Y_Special +// +// ...Follow the order of the case checks +// +// If Y is +-0, return +1 without raising any exception. +// If Y is +1, return X without raising any exception. +// If Y is qNaN, return Y without exception. +// If X is qNaN, return X without exception. +// +// At this point, X is real and Y is +-inf. +// Thus |X| can only be 1, strictly bigger than 1, or +// strictly less than 1. +// +// If |X| < 1, then +// return ( Y == +inf? +0 : +inf ) +// elseif |X| > 1, then +// return ( Y == +inf? +0 : +inf ) +// else +// goto Case_Invalid +// +// Case_X_Special +// +// ...Follow the order of the case checks +// ...Note that Y is real, finite, non-zero, and not +1. +// +// If X is qNaN, return X without exception. +// +// If X is +-0, +// return ( Y > 0 ? +0 : +inf ) +// +// If X is +inf +// return ( Y > 0 ? +inf : +0 ) +// +// If X is -inf +// return -0 ** -Y +// return ( Y > 0 ? +inf : +0 ) +// +// Case_Invalid +// +// Return 0 * inf to generate a quiet NaN together +// with an invalid exception. +// +// Implementation +// ============== +// +// We describe the quick branch since this part is important +// in reaching the normal case efficiently. +// +// STAGE 1 +// ------- +// This stage contains two threads. +// +// Stage1.Thread1 +// +// fclass.m X_excep, X_ok = X, (NatVal or s/qNaN) or +// +-0, +-infinity +// +// fclass.nm X_unsupp, X_supp = X, (NatVal or s/qNaN) or +// +-(0, unnorm, norm, infinity) +// +// X_norm := fnorm( X ) with traps disabled +// +// If (X_excep) goto Filtering (Step 2) +// If (X_unsupp) goto Filtering (Step 2) +// +// Stage1.Thread2 +// .............. +// +// fclass.m Y_excep, Y_ok = Y, (NatVal or s/qNaN) or +// +-0, +-infinity +// +// fclass.nm Y_unsupp, Y_supp = Y, (NatVal or s/qNaN) or +// +-(0, unnorm, norm, infinity) +// +// Y_norm := fnorm( Y ) with traps disabled +// +// If (Y_excep) goto Filtering (Step 2) +// If (Y_unsupp) goto Filtering (Step 2) +// +// +// STAGE 2 +// ------- +// This stage contains two threads. +// +// Stage2.Thread1 +// .............. +// +// Set X_lt_0 if X < 0 (using fcmp) +// sgn := +1.0 +// If (X_lt_0) goto Filtering (Step 2) +// +// Stage2.Thread2 +// .............. +// +// Set Y_is_1 if Y = +1 (using fcmp) +// If (Y_is_1) goto Filtering (Step 2) +// +// STAGE 3 +// ------- +// This stage contains two threads. +// +// +// Stage3.Thread1 +// .............. +// +// X := fnorm(X) in prevailing traps +// +// +// Stage3.Thread2 +// .............. +// +// Y := fnorm(Y) in prevailing traps +// +// STAGE 4 +// ------- +// +// Go to Case_Normal. +// + + +// ************* DO NOT CHANGE ORDER OF THESE TABLES ******************** + +// double-extended 1/ln(2) +// 3fff b8aa 3b29 5c17 f0bb be87fed0691d3e88 +// 3fff b8aa 3b29 5c17 f0bc +// For speed the significand will be loaded directly with a movl and setf.sig +// and the exponent will be bias+63 instead of bias+0. Thus subsequent +// computations need to scale appropriately. +// The constant 2^12/ln(2) is needed for the computation of N. This is also +// obtained by scaling the computations. +// +// Two shifting constants are loaded directly with movl and setf.d. +// 1. RSHF_2TO51 = 1.1000..00 * 2^(63-12) +// This constant is added to x*1/ln2 to shift the integer part of +// x*2^12/ln2 into the rightmost bits of the significand. +// The result of this fma is N_signif. +// 2. RSHF = 1.1000..00 * 2^(63) +// This constant is subtracted from N_signif * 2^(-51) to give +// the integer part of N, N_fix, as a floating-point number. +// The result of this fms is float_N. +RODATA + +.align 16 +// L_hi, L_lo +LOCAL_OBJECT_START(Constants_exp_64_Arg) +data8 0xB17217F400000000,0x00003FF2 // L_hi = hi part log(2)/2^12 +data8 0xF473DE6AF278ECE6,0x00003FD4 // L_lo = lo part log(2)/2^12 +LOCAL_OBJECT_END(Constants_exp_64_Arg) + +LOCAL_OBJECT_START(Constants_exp_64_A) +// Reversed +data8 0xAAAAAAABB1B736A0,0x00003FFA +data8 0xAAAAAAAB90CD6327,0x00003FFC +data8 0xFFFFFFFFFFFFFFFF,0x00003FFD +LOCAL_OBJECT_END(Constants_exp_64_A) + +LOCAL_OBJECT_START(Constants_exp_64_P) +// Reversed +data8 0xD00D6C8143914A8A,0x00003FF2 +data8 0xB60BC4AC30304B30,0x00003FF5 +data8 0x888888887474C518,0x00003FF8 +data8 0xAAAAAAAA8DAE729D,0x00003FFA +data8 0xAAAAAAAAAAAAAF61,0x00003FFC +data8 0x80000000000004C7,0x00003FFE +LOCAL_OBJECT_END(Constants_exp_64_P) + +LOCAL_OBJECT_START(Constants_exp_64_T1) +data4 0x3F800000,0x3F8164D2,0x3F82CD87,0x3F843A29 +data4 0x3F85AAC3,0x3F871F62,0x3F88980F,0x3F8A14D5 +data4 0x3F8B95C2,0x3F8D1ADF,0x3F8EA43A,0x3F9031DC +data4 0x3F91C3D3,0x3F935A2B,0x3F94F4F0,0x3F96942D +data4 0x3F9837F0,0x3F99E046,0x3F9B8D3A,0x3F9D3EDA +data4 0x3F9EF532,0x3FA0B051,0x3FA27043,0x3FA43516 +data4 0x3FA5FED7,0x3FA7CD94,0x3FA9A15B,0x3FAB7A3A +data4 0x3FAD583F,0x3FAF3B79,0x3FB123F6,0x3FB311C4 +data4 0x3FB504F3,0x3FB6FD92,0x3FB8FBAF,0x3FBAFF5B +data4 0x3FBD08A4,0x3FBF179A,0x3FC12C4D,0x3FC346CD +data4 0x3FC5672A,0x3FC78D75,0x3FC9B9BE,0x3FCBEC15 +data4 0x3FCE248C,0x3FD06334,0x3FD2A81E,0x3FD4F35B +data4 0x3FD744FD,0x3FD99D16,0x3FDBFBB8,0x3FDE60F5 +data4 0x3FE0CCDF,0x3FE33F89,0x3FE5B907,0x3FE8396A +data4 0x3FEAC0C7,0x3FED4F30,0x3FEFE4BA,0x3FF28177 +data4 0x3FF5257D,0x3FF7D0DF,0x3FFA83B3,0x3FFD3E0C +LOCAL_OBJECT_END(Constants_exp_64_T1) + +LOCAL_OBJECT_START(Constants_exp_64_T2) +data4 0x3F800000,0x3F80058C,0x3F800B18,0x3F8010A4 +data4 0x3F801630,0x3F801BBD,0x3F80214A,0x3F8026D7 +data4 0x3F802C64,0x3F8031F2,0x3F803780,0x3F803D0E +data4 0x3F80429C,0x3F80482B,0x3F804DB9,0x3F805349 +data4 0x3F8058D8,0x3F805E67,0x3F8063F7,0x3F806987 +data4 0x3F806F17,0x3F8074A8,0x3F807A39,0x3F807FCA +data4 0x3F80855B,0x3F808AEC,0x3F80907E,0x3F809610 +data4 0x3F809BA2,0x3F80A135,0x3F80A6C7,0x3F80AC5A +data4 0x3F80B1ED,0x3F80B781,0x3F80BD14,0x3F80C2A8 +data4 0x3F80C83C,0x3F80CDD1,0x3F80D365,0x3F80D8FA +data4 0x3F80DE8F,0x3F80E425,0x3F80E9BA,0x3F80EF50 +data4 0x3F80F4E6,0x3F80FA7C,0x3F810013,0x3F8105AA +data4 0x3F810B41,0x3F8110D8,0x3F81166F,0x3F811C07 +data4 0x3F81219F,0x3F812737,0x3F812CD0,0x3F813269 +data4 0x3F813802,0x3F813D9B,0x3F814334,0x3F8148CE +data4 0x3F814E68,0x3F815402,0x3F81599C,0x3F815F37 +LOCAL_OBJECT_END(Constants_exp_64_T2) + +LOCAL_OBJECT_START(Constants_exp_64_W1) +data8 0x0000000000000000, 0xBE384454171EC4B4 +data8 0xBE6947414AA72766, 0xBE5D32B6D42518F8 +data8 0x3E68D96D3A319149, 0xBE68F4DA62415F36 +data8 0xBE6DDA2FC9C86A3B, 0x3E6B2E50F49228FE +data8 0xBE49C0C21188B886, 0x3E64BFC21A4C2F1F +data8 0xBE6A2FBB2CB98B54, 0x3E5DC5DE9A55D329 +data8 0x3E69649039A7AACE, 0x3E54728B5C66DBA5 +data8 0xBE62B0DBBA1C7D7D, 0x3E576E0409F1AF5F +data8 0x3E6125001A0DD6A1, 0xBE66A419795FBDEF +data8 0xBE5CDE8CE1BD41FC, 0xBE621376EA54964F +data8 0x3E6370BE476E76EE, 0x3E390D1A3427EB92 +data8 0x3E1336DE2BF82BF8, 0xBE5FF1CBD0F7BD9E +data8 0xBE60A3550CEB09DD, 0xBE5CA37E0980F30D +data8 0xBE5C541B4C082D25, 0xBE5BBECA3B467D29 +data8 0xBE400D8AB9D946C5, 0xBE5E2A0807ED374A +data8 0xBE66CB28365C8B0A, 0x3E3AAD5BD3403BCA +data8 0x3E526055C7EA21E0, 0xBE442C75E72880D6 +data8 0x3E58B2BB85222A43, 0xBE5AAB79522C42BF +data8 0xBE605CB4469DC2BC, 0xBE589FA7A48C40DC +data8 0xBE51C2141AA42614, 0xBE48D087C37293F4 +data8 0x3E367A1CA2D673E0, 0xBE51BEBB114F7A38 +data8 0xBE6348E5661A4B48, 0xBDF526431D3B9962 +data8 0x3E3A3B5E35A78A53, 0xBE46C46C1CECD788 +data8 0xBE60B7EC7857D689, 0xBE594D3DD14F1AD7 +data8 0xBE4F9C304C9A8F60, 0xBE52187302DFF9D2 +data8 0xBE5E4C8855E6D68F, 0xBE62140F667F3DC4 +data8 0xBE36961B3BF88747, 0x3E602861C96EC6AA +data8 0xBE3B5151D57FD718, 0x3E561CD0FC4A627B +data8 0xBE3A5217CA913FEA, 0x3E40A3CC9A5D193A +data8 0xBE5AB71310A9C312, 0x3E4FDADBC5F57719 +data8 0x3E361428DBDF59D5, 0x3E5DB5DB61B4180D +data8 0xBE42AD5F7408D856, 0x3E2A314831B2B707 +LOCAL_OBJECT_END(Constants_exp_64_W1) + +LOCAL_OBJECT_START(Constants_exp_64_W2) +data8 0x0000000000000000, 0xBE641F2537A3D7A2 +data8 0xBE68DD57AD028C40, 0xBE5C77D8F212B1B6 +data8 0x3E57878F1BA5B070, 0xBE55A36A2ECAE6FE +data8 0xBE620608569DFA3B, 0xBE53B50EA6D300A3 +data8 0x3E5B5EF2223F8F2C, 0xBE56A0D9D6DE0DF4 +data8 0xBE64EEF3EAE28F51, 0xBE5E5AE2367EA80B +data8 0x3E47CB1A5FCBC02D, 0xBE656BA09BDAFEB7 +data8 0x3E6E70C6805AFEE7, 0xBE6E0509A3415EBA +data8 0xBE56856B49BFF529, 0x3E66DD3300508651 +data8 0x3E51165FC114BC13, 0x3E53333DC453290F +data8 0x3E6A072B05539FDA, 0xBE47CD877C0A7696 +data8 0xBE668BF4EB05C6D9, 0xBE67C3E36AE86C93 +data8 0xBE533904D0B3E84B, 0x3E63E8D9556B53CE +data8 0x3E212C8963A98DC8, 0xBE33138F032A7A22 +data8 0x3E530FA9BC584008, 0xBE6ADF82CCB93C97 +data8 0x3E5F91138370EA39, 0x3E5443A4FB6A05D8 +data8 0x3E63DACD181FEE7A, 0xBE62B29DF0F67DEC +data8 0x3E65C4833DDE6307, 0x3E5BF030D40A24C1 +data8 0x3E658B8F14E437BE, 0xBE631C29ED98B6C7 +data8 0x3E6335D204CF7C71, 0x3E529EEDE954A79D +data8 0x3E5D9257F64A2FB8, 0xBE6BED1B854ED06C +data8 0x3E5096F6D71405CB, 0xBE3D4893ACB9FDF5 +data8 0xBDFEB15801B68349, 0x3E628D35C6A463B9 +data8 0xBE559725ADE45917, 0xBE68C29C042FC476 +data8 0xBE67593B01E511FA, 0xBE4A4313398801ED +data8 0x3E699571DA7C3300, 0x3E5349BE08062A9E +data8 0x3E5229C4755BB28E, 0x3E67E42677A1F80D +data8 0xBE52B33F6B69C352, 0xBE6B3550084DA57F +data8 0xBE6DB03FD1D09A20, 0xBE60CBC42161B2C1 +data8 0x3E56ED9C78A2B771, 0xBE508E319D0FA795 +data8 0xBE59482AFD1A54E9, 0xBE2A17CEB07FD23E +data8 0x3E68BF5C17365712, 0x3E3956F9B3785569 +LOCAL_OBJECT_END(Constants_exp_64_W2) + +LOCAL_OBJECT_START(Constants_log_80_P) +// P_8, P_7, ..., P_1 +data8 0xCCCE8B883B1042BC, 0x0000BFFB // P_8 +data8 0xE38997B7CADC2149, 0x00003FFB // P_7 +data8 0xFFFFFFFEB1ACB090, 0x0000BFFB // P_6 +data8 0x9249249806481C81, 0x00003FFC // P_5 +data8 0x0000000000000000, 0x00000000 // Pad for bank conflicts +data8 0xAAAAAAAAAAAAB0EF, 0x0000BFFC // P_4 +data8 0xCCCCCCCCCCC91416, 0x00003FFC // P_3 +data8 0x8000000000000000, 0x0000BFFD // P_2 +data8 0xAAAAAAAAAAAAAAAB, 0x00003FFD // P_1 +LOCAL_OBJECT_END(Constants_log_80_P) + +LOCAL_OBJECT_START(Constants_log_80_Q) +// log2_hi, log2_lo, Q_6, Q_5, Q_4, Q_3, Q_2, Q_1 +data8 0xB172180000000000,0x00003FFE +data8 0x82E308654361C4C6,0x0000BFE2 +data8 0x92492453A51BE0AF,0x00003FFC +data8 0xAAAAAB73A0CFD29F,0x0000BFFC +data8 0xCCCCCCCCCCCE3872,0x00003FFC +data8 0xFFFFFFFFFFFFB4FB,0x0000BFFC +data8 0xAAAAAAAAAAAAAAAB,0x00003FFD +data8 0x8000000000000000,0x0000BFFE +LOCAL_OBJECT_END(Constants_log_80_Q) + +LOCAL_OBJECT_START(Constants_log_80_Z_G_H_h1) +// Z1 - 16 bit fixed, G1 and H1 IEEE single, h1 IEEE double +data4 0x00008000,0x3F800000,0x00000000,0x00000000 +data4 0x00000000,0x00000000,0x00000000,0x00000000 +data4 0x00007879,0x3F70F0F0,0x3D785196,0x00000000 +data4 0xEBA0E0D1,0x8B1D330B,0x00003FDA,0x00000000 +data4 0x000071C8,0x3F638E38,0x3DF13843,0x00000000 +data4 0x9EADD553,0xE2AF365E,0x00003FE2,0x00000000 +data4 0x00006BCB,0x3F579430,0x3E2FF9A0,0x00000000 +data4 0x752F34A2,0xF585FEC3,0x0000BFE3,0x00000000 +data4 0x00006667,0x3F4CCCC8,0x3E647FD6,0x00000000 +data4 0x893B03F3,0xF3546435,0x00003FE2,0x00000000 +data4 0x00006187,0x3F430C30,0x3E8B3AE7,0x00000000 +data4 0x39CDD2AC,0xBABA62E0,0x00003FE4,0x00000000 +data4 0x00005D18,0x3F3A2E88,0x3EA30C68,0x00000000 +data4 0x457978A1,0x8718789F,0x00003FE2,0x00000000 +data4 0x0000590C,0x3F321640,0x3EB9CEC8,0x00000000 +data4 0x3185E56A,0x9442DF96,0x0000BFE4,0x00000000 +data4 0x00005556,0x3F2AAAA8,0x3ECF9927,0x00000000 +data4 0x2BBE2CBD,0xCBF9A4BF,0x00003FE4,0x00000000 +data4 0x000051EC,0x3F23D708,0x3EE47FC5,0x00000000 +data4 0x852D5935,0xF3537535,0x00003FE3,0x00000000 +data4 0x00004EC5,0x3F1D89D8,0x3EF8947D,0x00000000 +data4 0x46CDF32F,0xA1F1E699,0x0000BFDF,0x00000000 +data4 0x00004BDB,0x3F17B420,0x3F05F3A1,0x00000000 +data4 0xD8484CE3,0x84A61856,0x00003FE4,0x00000000 +data4 0x00004925,0x3F124920,0x3F0F4303,0x00000000 +data4 0xFF28821B,0xC7DD97E0,0x0000BFE2,0x00000000 +data4 0x0000469F,0x3F0D3DC8,0x3F183EBF,0x00000000 +data4 0xEF1FD32F,0xD3C4A887,0x00003FE3,0x00000000 +data4 0x00004445,0x3F088888,0x3F20EC80,0x00000000 +data4 0x464C76DA,0x84672BE6,0x00003FE5,0x00000000 +data4 0x00004211,0x3F042108,0x3F29516A,0x00000000 +data4 0x18835FB9,0x9A43A511,0x0000BFE5,0x00000000 +LOCAL_OBJECT_END(Constants_log_80_Z_G_H_h1) + +LOCAL_OBJECT_START(Constants_log_80_Z_G_H_h2) +// Z2 - 16 bit fixed, G2 and H2 IEEE single, h2 IEEE double +data4 0x00008000,0x3F800000,0x00000000,0x00000000 +data4 0x00000000,0x00000000,0x00000000,0x00000000 +data4 0x00007F81,0x3F7F00F8,0x3B7F875D,0x00000000 +data4 0x211398BF,0xAD08B116,0x00003FDB,0x00000000 +data4 0x00007F02,0x3F7E03F8,0x3BFF015B,0x00000000 +data4 0xC376958E,0xB106790F,0x00003FDE,0x00000000 +data4 0x00007E85,0x3F7D08E0,0x3C3EE393,0x00000000 +data4 0x79A7679A,0xFD03F242,0x0000BFDA,0x00000000 +data4 0x00007E08,0x3F7C0FC0,0x3C7E0586,0x00000000 +data4 0x05E7AE08,0xF03F81C3,0x0000BFDF,0x00000000 +data4 0x00007D8D,0x3F7B1880,0x3C9E75D2,0x00000000 +data4 0x049EB22F,0xD1B87D3C,0x00003FDE,0x00000000 +data4 0x00007D12,0x3F7A2328,0x3CBDC97A,0x00000000 +data4 0x3A9E81E0,0xFABC8B95,0x00003FDF,0x00000000 +data4 0x00007C98,0x3F792FB0,0x3CDCFE47,0x00000000 +data4 0x7C4B5443,0xF5F3653F,0x00003FDF,0x00000000 +data4 0x00007C20,0x3F783E08,0x3CFC15D0,0x00000000 +data4 0xF65A1773,0xE78AB204,0x00003FE0,0x00000000 +data4 0x00007BA8,0x3F774E38,0x3D0D874D,0x00000000 +data4 0x7B8EF695,0xDB7CBFFF,0x0000BFE0,0x00000000 +data4 0x00007B31,0x3F766038,0x3D1CF49B,0x00000000 +data4 0xCF773FB3,0xC0241AEA,0x0000BFE0,0x00000000 +data4 0x00007ABB,0x3F757400,0x3D2C531D,0x00000000 +data4 0xC9539FDF,0xFC8F4D48,0x00003FE1,0x00000000 +data4 0x00007A45,0x3F748988,0x3D3BA322,0x00000000 +data4 0x954665C2,0x9CD035FB,0x0000BFE1,0x00000000 +data4 0x000079D1,0x3F73A0D0,0x3D4AE46F,0x00000000 +data4 0xDD367A30,0xEC9017C7,0x00003FE1,0x00000000 +data4 0x0000795D,0x3F72B9D0,0x3D5A1756,0x00000000 +data4 0xCB11189C,0xEE6625D3,0x0000BFE1,0x00000000 +data4 0x000078EB,0x3F71D488,0x3D693B9D,0x00000000 +data4 0xBE11C424,0xA49C8DB5,0x0000BFE0,0x00000000 +LOCAL_OBJECT_END(Constants_log_80_Z_G_H_h2) + +LOCAL_OBJECT_START(Constants_log_80_h3_G_H) +// h3 IEEE double extended, H3 and G3 IEEE single +data4 0x112666B0,0xAAACAAB1,0x00003FD3,0x3F7FFC00 +data4 0x9B7FAD21,0x90051030,0x00003FD8,0x3F7FF400 +data4 0xF4D783C4,0xA6B46F46,0x00003FDA,0x3F7FEC00 +data4 0x11C6DDCA,0xDA148D88,0x0000BFD8,0x3F7FE400 +data4 0xCA964D95,0xCE65C1D8,0x0000BFD8,0x3F7FDC00 +data4 0x23412D13,0x883838EE,0x0000BFDB,0x3F7FD400 +data4 0x983ED687,0xB7E5CFA1,0x00003FDB,0x3F7FCC08 +data4 0xE3C3930B,0xDBE23B16,0x0000BFD9,0x3F7FC408 +data4 0x48AA4DFC,0x9B92F1FC,0x0000BFDC,0x3F7FBC10 +data4 0xCE9C8F7E,0x9A8CEB15,0x0000BFD9,0x3F7FB410 +data4 0x0DECE74A,0x8C220879,0x00003FDC,0x3F7FAC18 +data4 0x2F053150,0xB25CA912,0x0000BFDA,0x3F7FA420 +data4 0xD9A5BE20,0xA5876555,0x00003FDB,0x3F7F9C20 +data4 0x2053F087,0xC919BB6E,0x00003FD9,0x3F7F9428 +data4 0x041E9A77,0xB70BDA79,0x00003FDC,0x3F7F8C30 +data4 0xEA1C9C30,0xF18A5C08,0x00003FDA,0x3F7F8438 +data4 0x796D89E5,0xA3790D84,0x0000BFDD,0x3F7F7C40 +data4 0xA2915A3A,0xE1852369,0x0000BFDD,0x3F7F7448 +data4 0xA39ED868,0xD803858F,0x00003FDC,0x3F7F6C50 +data4 0x9417EBB7,0xB2EEE356,0x0000BFDD,0x3F7F6458 +data4 0x9BB0D07F,0xED5C1F8A,0x0000BFDC,0x3F7F5C68 +data4 0xE87C740A,0xD6D201A0,0x0000BFDD,0x3F7F5470 +data4 0x1CA74025,0xE8DEBF5E,0x00003FDC,0x3F7F4C78 +data4 0x1F34A7EB,0x9A995A97,0x0000BFDC,0x3F7F4488 +data4 0x359EED97,0x9CB0F742,0x0000BFDA,0x3F7F3C90 +data4 0xBBC6A1C8,0xD6F833C2,0x0000BFDD,0x3F7F34A0 +data4 0xE71090EC,0xE1F68F2A,0x00003FDC,0x3F7F2CA8 +data4 0xC160A74F,0xD1881CF1,0x0000BFDB,0x3F7F24B8 +data4 0xD78CB5A4,0x9AD05AE2,0x00003FD6,0x3F7F1CC8 +data4 0x9A77DC4B,0xE658CB8E,0x0000BFDD,0x3F7F14D8 +data4 0x6BD6D312,0xBA281296,0x00003FDC,0x3F7F0CE0 +data4 0xF95210D0,0xB478BBEB,0x0000BFDB,0x3F7F04F0 +data4 0x38800100,0x39400480,0x39A00640,0x39E00C41 // H's start here +data4 0x3A100A21,0x3A300F22,0x3A4FF51C,0x3A6FFC1D +data4 0x3A87F20B,0x3A97F68B,0x3AA7EB86,0x3AB7E101 +data4 0x3AC7E701,0x3AD7DD7B,0x3AE7D474,0x3AF7CBED +data4 0x3B03E1F3,0x3B0BDE2F,0x3B13DAAA,0x3B1BD766 +data4 0x3B23CC5C,0x3B2BC997,0x3B33C711,0x3B3BBCC6 +data4 0x3B43BAC0,0x3B4BB0F4,0x3B53AF6D,0x3B5BA620 +data4 0x3B639D12,0x3B6B9444,0x3B7393BC,0x3B7B8B6D +LOCAL_OBJECT_END(Constants_log_80_h3_G_H) + +GR_sig_inv_ln2 = r14 +GR_rshf_2to51 = r15 +GR_exp_2tom51 = r16 +GR_rshf = r17 +GR_exp_half = r18 +GR_sign_mask = r19 +GR_exp_square_oflow = r20 +GR_exp_square_uflow = r21 +GR_exp_ynear1_oflow = r22 +GR_exp_ynear1_uflow = r23 +GR_signif_Z = r24 + +GR_signexp_x = r32 + +GR_exp_x = r33 + +GR_Table_Ptr = r34 + +GR_Table_Ptr1 = r35 + +GR_Index1 = r36 + +GR_Index2 = r37 +GR_Expo_X = r37 + +GR_M = r38 + +GR_X_0 = r39 +GR_Mask = r39 + +GR_X_1 = r40 +GR_W1_ptr = r40 + +GR_W2_ptr = r41 +GR_X_2 = r41 + +GR_Z_1 = r42 +GR_M2 = r42 + +GR_M1 = r43 +GR_Z_2 = r43 + +GR_N = r44 +GR_k = r44 + +GR_Big_Pos_Exp = r45 + +GR_exp_pos_max = r46 + +GR_exp_bias_p_k = r47 + +GR_Index3 = r48 +GR_temp = r48 + +GR_vsm_expo = r49 + +GR_T1_ptr = r50 +GR_P_ptr1 = r50 +GR_T2_ptr = r51 +GR_P_ptr2 = r51 +GR_N_fix = r52 +GR_exp_y = r53 +GR_signif_y = r54 +GR_signexp_y = r55 +GR_fraction_y = r55 +GR_low_order_bit = r56 +GR_exp_mask = r57 +GR_exp_bias = r58 +GR_y_sign = r59 +GR_table_base = r60 +GR_ptr_exp_Arg = r61 +GR_Delta_Exp = r62 +GR_Special_Exp = r63 +GR_exp_neg_max = r64 +GR_Big_Neg_Exp = r65 + +//** Registers for unwind support + +GR_SAVE_PFS = r59 +GR_SAVE_B0 = r60 +GR_SAVE_GP = r61 +GR_Parameter_X = r62 +GR_Parameter_Y = r63 +GR_Parameter_RESULT = r64 +GR_Parameter_TAG = r65 + +//** + +FR_Input_X = f8 +FR_Result = f8 +FR_Input_Y = f9 + +FR_Neg = f10 +FR_P_hi = f10 +FR_X = f10 + +FR_Half = f11 +FR_h_3 = f11 +FR_poly_hi = f11 + +FR_Sgn = f12 + +FR_half_W = f13 + +FR_X_cor = f14 +FR_P_lo = f14 + +FR_W = f15 + +FR_X_lo = f32 + +FR_S = f33 +FR_W3 = f33 + +FR_Y_hi = f34 +FR_logx_hi = f34 + +FR_Z = f35 +FR_logx_lo = f35 +FR_GS_hi = f35 +FR_Y_lo = f35 + +FR_r_cor = f36 +FR_Scale = f36 + +FR_G_1 = f37 +FR_G = f37 +FR_Wsq = f37 +FR_temp = f37 + +FR_H_1 = f38 +FR_H = f38 +FR_W4 = f38 + +FR_h = f39 +FR_h_1 = f39 +FR_N = f39 +FR_P_7 = f39 + +FR_G_2 = f40 +FR_P_8 = f40 +FR_L_hi = f40 + +FR_H_2 = f41 +FR_L_lo = f41 +FR_A_1 = f41 + +FR_h_2 = f42 + +FR_W1 = f43 + +FR_G_3 = f44 +FR_P_8 = f44 +FR_T1 = f44 + +FR_log2_hi = f45 +FR_W2 = f45 + +FR_GS_lo = f46 +FR_T2 = f46 + +FR_W_1_p1 = f47 +FR_H_3 = f47 + +FR_float_N = f48 + +FR_A_2 = f49 + +FR_Q_4 = f50 +FR_r4 = f50 + +FR_Q_3 = f51 +FR_A_3 = f51 + +FR_Q_2 = f52 +FR_P_2 = f52 + +FR_Q_1 = f53 +FR_P_1 = f53 +FR_T = f53 + +FR_Wp1 = f54 +FR_Q_5 = f54 +FR_P_3 = f54 + +FR_Q_6 = f55 + +FR_log2_lo = f56 +FR_Two = f56 + +FR_Big = f57 + +FR_neg_2_mK = f58 + +FR_r = f59 + +FR_poly_lo = f60 + +FR_poly = f61 + +FR_P_5 = f62 +FR_Result_small = f62 + +FR_rsq = f63 + +FR_Delta = f64 + +FR_save_Input_X = f65 +FR_norm_X = f66 +FR_norm_Y = f67 +FR_Y_lo_2 = f68 + +FR_P_6 = f69 +FR_Result_big = f69 + +FR_RSHF_2TO51 = f70 +FR_INV_LN2_2TO63 = f71 +FR_2TOM51 = f72 +FR_RSHF = f73 +FR_TMP1 = f74 +FR_TMP2 = f75 +FR_TMP3 = f76 +FR_Tscale = f77 +FR_P_4 = f78 +FR_NBig = f79 + + +.section .text +GLOBAL_LIBM_ENTRY(powl) +// +// Get significand of x. It is the critical path. +// +{ .mfi + getf.sig GR_signif_Z = FR_Input_X // Get significand of x + fclass.m p11, p12 = FR_Input_X, 0x0b // Test x unorm + nop.i 999 +} +{ .mfi + nop.m 999 + fnorm.s1 FR_norm_X = FR_Input_X // Normalize x + mov GR_exp_half = 0xffff - 1 // Exponent for 0.5 +} +;; + +{ .mfi + alloc r32 = ar.pfs,0,30,4,0 + fclass.m p7, p0 = FR_Input_Y, 0x1E7 // Test y natval, nan, inf, zero + mov GR_exp_pos_max = 0x13fff // Max exponent for pos oflow test +} +{ .mfi + addl GR_table_base = @ltoff(Constants_exp_64_Arg#), gp // Ptr to tables + fnorm.s1 FR_norm_Y = FR_Input_Y // Normalize y + mov GR_exp_neg_max = 0x33fff // Max exponent for neg oflow test +} +;; + +{ .mfi + getf.exp GR_signexp_y = FR_Input_Y // Get sign and exp of y +(p12) fclass.m p11, p0 = FR_Input_Y, 0x0b // Test y unorm + mov GR_sign_mask = 0x20000 // Sign mask +} +{ .mfi + ld8 GR_table_base = [GR_table_base] // Get base address for tables + fadd.s1 FR_Two = f1, f1 // Form 2.0 for square test + mov GR_exp_mask = 0x1FFFF // Exponent mask +} +;; + +{ .mfi + getf.sig GR_signif_y = FR_Input_Y // Get significand of y + fclass.m p6, p0 = FR_Input_X, 0x1E7 // Test x natval, nan, inf, zero + nop.i 999 +} +;; + +{ .mfi + getf.exp GR_signexp_x = FR_Input_X // Get signexp of x + fmerge.s FR_save_Input_X = FR_Input_X, FR_Input_X + extr.u GR_Index1 = GR_signif_Z, 59, 4 // Extract upper 4 signif bits of x +} +{ .mfb + setf.exp FR_Half = GR_exp_half // Load half + nop.f 999 +(p11) br.cond.spnt POWL_DENORM // Branch if x or y denorm/unorm +} +;; + +// Return here from POWL_DENORM +POWL_COMMON: +{ .mfi + setf.exp FR_Big = GR_exp_pos_max // Form big pos value for oflow test + fclass.nm p11, p0 = FR_Input_Y, 0x1FF // Test Y unsupported + shl GR_Index1 = GR_Index1,5 // Adjust index1 pointer x 32 +} +{ .mfi + add GR_Table_Ptr = 0x7c0, GR_table_base // Constants_log_80_Z_G_H_h1 + fma.s1 FR_Sgn = f1,f1,f0 // Assume result positive + mov GR_exp_bias = 0xFFFF // Form exponent bias +} +;; + +// +// Identify NatVals, NaNs, Infs, and Zeros. +// +// +// Remove sign bit from exponent of y. +// Check for x = 1 +// Branch on Infs, Nans, Zeros, and Natvals +// Check to see that exponent < 0 +// +{ .mfi + setf.exp FR_NBig = GR_exp_neg_max // Form big neg value for oflow test + fclass.nm p8, p0 = FR_Input_X, 0x1FF // Test X unsupported + and GR_exp_y = GR_exp_mask,GR_signexp_y // Get biased exponent of y +} +{ .mfb + add GR_Index1 = GR_Index1,GR_Table_Ptr + nop.f 999 +(p6) br.cond.spnt POWL_64_SPECIAL // Branch if x natval, nan, inf, zero +} +;; + +// load Z_1 from Index1 + +// There is logic starting here to determine if y is an integer when x < 0. +// If 0 < |y| < 1 then clearly y is not an integer. +// If |y| > 1, then the significand of y is shifted left by the size of +// the exponent of y. This preserves the lsb of the integer part + the +// fractional bits. The lsb of the integer can be tested to determine if +// the integer is even or odd. The fractional bits can be tested. If zero, +// then y is an integer. +// +{ .mfi + ld2 GR_Z_1 =[GR_Index1],4 // Load Z_1 + fmerge.s FR_Z = f0, FR_norm_X // Z = |x| + extr.u GR_X_0 = GR_signif_Z, 49, 15 // Extract X_0 from significand +} +{ .mfb + cmp.lt p9, p0 = GR_exp_y,GR_exp_bias // Test 0 < |y| < 1 + nop.f 999 +(p7) br.cond.spnt POWL_64_SPECIAL // Branch if y natval, nan, inf, zero +} +;; + +{ .mfb + ldfs FR_G_1 = [GR_Index1],4 // Load G_1 + fcmp.eq.s1 p10, p0 = FR_Input_Y, f1 // Test Y = +1.0 +(p8) br.cond.spnt POWL_64_UNSUPPORT // Branch if x unsupported +} +;; + +// +// X_0 = High order 15 bit of Z +// +{ .mfb + ldfs FR_H_1 = [GR_Index1],8 // Load H_1 +(p9) fcmp.lt.unc.s1 p9, p0 = FR_Input_X, f0 // Test x<0, 0 <|y|<1 +(p11) br.cond.spnt POWL_64_UNSUPPORT // Branch if y unsupported +} +;; + +{ .mfi + ldfe FR_h_1 = [GR_Index1] // Load h_1 + fcmp.eq.s1 p7, p0 = FR_Input_Y, FR_Two // Test y = 2.0 + pmpyshr2.u GR_X_1 = GR_X_0,GR_Z_1,15 // X_1 = X_0 * Z_1 (bits 15-30) + // Wait 4 cycles to use result +} +{ .mfi + add GR_Table_Ptr = 0x9c0, GR_table_base // Constants_log_80_Z_G_H_h2 + nop.f 999 + sub GR_exp_y = GR_exp_y,GR_exp_bias // Get true exponent of y +} +;; + +// +// Branch for (x < 0) and Y not an integer. +// +{ .mfb + nop.m 999 + fcmp.lt.s1 p6, p0 = FR_Input_X, f0 // Test x < 0 +(p9) br.cond.spnt POWL_64_XNEG // Branch if x < 0, 0 < |y| < 1 +} +;; + +{ .mfi + nop.m 999 + fcmp.eq.s1 p12, p0 = FR_Input_X, f1 // Test x=+1.0 + nop.i 999 +} +{ .mfb + nop.m 999 + fsub.s1 FR_W = FR_Z, f1 // W = Z - 1 +(p7) br.cond.spnt POWL_64_SQUARE // Branch if y=2 +} +;; + +{ .mfi + nop.m 999 +(p10) fmpy.s0 FR_Result = FR_Input_X, f1 // If y=+1.0, result=x +(p6) shl GR_fraction_y= GR_signif_y,GR_exp_y // Get lsb of int + fraction + // Wait 4 cycles to use result +} +;; + +{ .mfi + nop.m 999 +(p12) fma.s0 FR_Result = FR_Input_Y, f0, f1 // If x=1.0, result=1, chk denorm + extr.u GR_Index2 = GR_X_1, 6, 4 // Extract index2 +} +;; + +// +// N = exponent of Z +// +{ .mib + getf.exp GR_N = FR_Z // Get exponent of Z (also x) + shl GR_Index2=GR_Index2,5 // Index2 x 32 bytes +(p10) br.ret.spnt b0 // Exit if y=+1.0 +} +;; + +{ .mib + add GR_Index2 = GR_Index2, GR_Table_Ptr // Pointer to table 2 + nop.i 999 +(p12) br.ret.spnt b0 // Exit if x=+1.0 +} +;; + +{ .mmi + ld2 GR_Z_2 =[GR_Index2],4 // Load Z_2 +;; + ldfs FR_G_2 = [GR_Index2],4 // Load G_2 + nop.i 999 +} +;; + +{ .mii + ldfs FR_H_2 = [GR_Index2],8 // Load H_2 +(p6) tbit.nz.unc p9, p0 = GR_fraction_y, 63 // Test x<0 and y odd integer + add GR_Table_Ptr = 0xbcc, GR_table_base // Constants_log_80_h3_G_H, G_3 +} +;; + +// +// For x < 0 and y odd integer,, set sign = -1. +// +{ .mfi + getf.exp GR_M = FR_W // Get signexp of W + nop.f 999 + pmpyshr2.u GR_X_2 = GR_X_1,GR_Z_2,15 // X_2 = X_1 * Z_2 (bits 15-30) +} +{ .mfi + ldfe FR_h_2 = [GR_Index2] // Load h_2 +(p9) fnma.s1 FR_Sgn = f1, f1, f0 // If x<0, y odd int, result negative + sub GR_N = GR_N, GR_exp_bias // Get true exponent of x = N +} +;; + +{ .mfi + add GR_Table_Ptr1 = 0xdc0, GR_table_base // Ptr to H_3 + fcmp.eq.s0 p11, p0 = FR_Input_Y, FR_Half // Test y=0.5, also set denorm +(p6) shl GR_fraction_y= GR_fraction_y, 1 // Shift left 1 to get fraction +} +;; + +{ .mmb + setf.sig FR_float_N = GR_N +(p6) cmp.ne.unc p8, p0 = GR_fraction_y, r0 // Test x<0 and y not integer +(p8) br.cond.spnt POWL_64_XNEG // Branch if x<0 and y not int +} +;; + +// +// Raise possible denormal operand exception for both X and Y. +// Set pointers in case |x| near 1 +// Branch to embedded sqrt(x) if y=0.5 +// +{ .mfi + add GR_P_ptr1 = 0x6b0, GR_table_base // Constants_log_80_P, P8, NEAR path + fcmp.eq.s0 p12, p0 = FR_Input_X, FR_Input_Y // Dummy to set denormal + add GR_P_ptr2 = 0x700, GR_table_base // Constants_log_80_P, P4, NEAR path +} +{ .mfb + cmp.eq p15, p14 = r0, r0 // Assume result safe (no over/under) + fsub.s1 FR_Delta = FR_Input_Y,f1 // Delta = y - 1.0 +(p11) br.cond.spnt POWL_64_SQRT // Branch if y=0.5 +} +;; + +// +// Computes ln( x ) to extra precision +// Input FR 1: FR_X +// Output FR 2: FR_Y_hi +// Output FR 3: FR_Y_lo +// Output PR 1: PR_Safe +// +{ .mfi + and GR_M = GR_exp_mask, GR_M // Mask to get exponent of W + nop.f 999 + extr.u GR_Index3 = GR_X_2, 1, 5 // Get index3 +} +;; + +{ .mmi + shladd GR_Table_Ptr1 = GR_Index3,2,GR_Table_Ptr1 // Ptr to H_3 + shladd GR_Index3 = GR_Index3,4,GR_Table_Ptr // Ptr to G_3 + sub GR_M = GR_M, GR_exp_bias // Get true exponent of W +} +;; + +{ .mib + ldfs FR_G_3 = [GR_Index3],-12 // Load G_3 + cmp.gt p7, p14 = -8, GR_M // Test if |x-1| < 2^-8 +(p7) br.cond.spnt LOGL80_NEAR // Branch if |x-1| < 2^-8 +} +;; + +// Here if |x-1| >= 2^-8 +{ .mmf + ldfs FR_H_3 = [GR_Table_Ptr1] // Load H_3 + nop.m 999 + nop.f 999 +} +;; + +{ .mfi + ldfe FR_h_3 = [GR_Index3] // Load h_3 + fmerge.se FR_S = f1,FR_Z // S = merge of 1.0 and signif(Z) + nop.i 999 +} +{ .mfi + add GR_Table_Ptr = 0x740, GR_table_base // Constants_log_80_Q + fmpy.s1 FR_G = FR_G_1, FR_G_2 // G = G_1 * G_2 + nop.i 999 +} +;; + +// +// Begin Loading Q's - load log2_hi part +// +{ .mfi + ldfe FR_log2_hi = [GR_Table_Ptr],16 // Load log2_hi + fadd.s1 FR_H = FR_H_1, FR_H_2 // H = H_1 + H_2 + nop.i 999 +};; + +// +// h = h_1 + h_2 +// +{ .mfi + ldfe FR_log2_lo = [GR_Table_Ptr],16 // Load log2_lo + fadd.s1 FR_h = FR_h_1, FR_h_2 // h = h_1 + h_2 + nop.i 999 +} +;; + +{ .mfi + ldfe FR_Q_6 = [GR_Table_Ptr],16 // Load Q_6 + fcvt.xf FR_float_N = FR_float_N + nop.i 999 +} +;; + +{ .mfi + ldfe FR_Q_5 = [GR_Table_Ptr],16 // Load Q_5 + nop.f 999 + nop.i 999 +} +;; + +// +// G = G_1 * G_2 * G_3 +// +{ .mfi + ldfe FR_Q_4 = [GR_Table_Ptr],16 // Load Q_4 + fmpy.s1 FR_G = FR_G, FR_G_3 + nop.i 999 +} +;; + +// +// H = H_1 + H_2 + H_3 +// +{ .mfi + ldfe FR_Q_3 = [GR_Table_Ptr],16 // Load Q_3 + fadd.s1 FR_H = FR_H, FR_H_3 + nop.i 999 +} +;; + +// +// Y_lo = poly + Y_lo +// +// h = h_1 + h_2 + h_3 +// +{ .mfi + ldfe FR_Q_2 = [GR_Table_Ptr],16 // Load Q_2 + fadd.s1 FR_h = FR_h, FR_h_3 + nop.i 999 +} +;; + +// +// GS_hi = G*S +// r = G*S -1 +// +{ .mfi + ldfe FR_Q_1 = [GR_Table_Ptr],16 // Load Q_1 + fmpy.s1 FR_GS_hi = FR_G, FR_S + nop.i 999 +} +{ .mfi + nop.m 999 + fms.s1 FR_r = FR_G, FR_S, f1 + nop.i 999 +} +;; + +// +// poly_lo = Q_5 + r * Q_6 +// +{ .mfi + getf.exp GR_Delta_Exp = FR_Delta // Get signexp of y-1 for exp calc + fma.s1 FR_poly_lo = FR_r, FR_Q_6, FR_Q_5 + nop.i 999 +} +// +// r_cor = GS_hi -1 +// +{ .mfi + nop.m 999 + fsub.s1 FR_r_cor = FR_GS_hi, f1 + nop.i 999 +} +;; + +// +// GS_lo = G*S - GS_hi +// +{ .mfi + nop.m 999 + fms.s1 FR_GS_lo = FR_G, FR_S, FR_GS_hi + nop.i 999 +} +;; + +// +// rsq = r * r +// +{ .mfi + nop.m 999 + fmpy.s1 FR_rsq = FR_r, FR_r + nop.i 999 +} +// +// G = float_N*log2_hi + H +// +{ .mfi + nop.m 999 + fma.s1 FR_G = FR_float_N, FR_log2_hi, FR_H + nop.i 999 +} +;; + +// +// Y_lo = float_N*log2_lo + h +// +{ .mfi + nop.m 999 + fma.s1 FR_Y_lo = FR_float_N, FR_log2_lo, FR_h + nop.i 999 +} +;; + +// +// poly_lo = Q_4 + r * poly_lo +// r_cor = r_cor - r +// +{ .mfi + nop.m 999 + fma.s1 FR_poly_lo = FR_r, FR_poly_lo, FR_Q_4 + nop.i 999 +} +{ .mfi + nop.m 999 + fsub.s1 FR_r_cor = FR_r_cor, FR_r + nop.i 999 +} +;; + +// +// poly_hi = r * Q_2 + Q_1 +// Y_hi = G + r +// +{ .mfi + nop.m 999 + fma.s1 FR_poly = FR_r, FR_Q_2, FR_Q_1 + nop.i 999 +} +{ .mfi + nop.m 999 + fadd.s1 FR_Y_hi = FR_G, FR_r + nop.i 999 +} +;; + +// +// poly_lo = Q_3 + r * poly_lo +// r_cor = r_cor + GS_lo +// +{ .mfi + nop.m 999 + fma.s1 FR_poly_lo = FR_r, FR_poly_lo, FR_Q_3 + nop.i 999 +} +{ .mfi + nop.m 999 + fadd.s1 FR_r_cor = FR_r_cor, FR_GS_lo + nop.i 999 +} +;; + +// +// Y_lo = G - Y_hi +// +{ .mfi + nop.m 999 + fsub.s1 FR_Y_lo_2 = FR_G, FR_Y_hi + nop.i 999 +} +;; + +// +// r_cor = r_cor + Y_lo +// poly = poly_hi + rsq * poly_lo +// +{ .mfi + add GR_Table_Ptr = 0x0, GR_table_base // Constants_exp_64_Arg + fadd.s1 FR_r_cor = FR_r_cor, FR_Y_lo + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 FR_poly = FR_rsq, FR_poly_lo, FR_poly + nop.i 999 +} +;; + +// +// Load L_hi +// Load L_lo +// all long before they are needed. +// They are used in LOGL_RETURN PATH +// +// Y_lo = Y_lo + r +// poly = rsq * poly + r_cor +// +{ .mfi + ldfe FR_L_hi = [GR_Table_Ptr],16 // Load L_hi + fadd.s1 FR_Y_lo = FR_Y_lo_2, FR_r + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 FR_poly = FR_rsq, FR_poly, FR_r_cor + nop.i 999 +} +;; + +{ .mfb + ldfe FR_L_lo = [GR_Table_Ptr],16 // Load L_lo + fadd.s1 FR_Y_lo = FR_Y_lo, FR_poly + br.cond.sptk LOGL_RETURN // Branch to common code +} +;; + + +LOGL80_NEAR: +// Here if |x-1| < 2^-8 +// +// Branch LOGL80_NEAR +// + +{ .mmf + ldfe FR_P_8 = [GR_P_ptr1],16 // Load P_8 + ldfe FR_P_4 = [GR_P_ptr2],16 // Load P_4 + fmpy.s1 FR_Wsq = FR_W, FR_W +} +;; + +{ .mmi + ldfe FR_P_7 = [GR_P_ptr1],16 // Load P_7 + ldfe FR_P_3 = [GR_P_ptr2],16 // Load P_3 + nop.i 999 +} +;; + +{ .mmi + ldfe FR_P_6 = [GR_P_ptr1],16 // Load P_6 + ldfe FR_P_2 = [GR_P_ptr2],16 // Load P_2 + nop.i 999 +} +;; + +{ .mmi + ldfe FR_P_5 = [GR_P_ptr1],16 // Load P_5 + ldfe FR_P_1 = [GR_P_ptr2],16 // Load P_1 + nop.i 999 +} +;; + +{ .mfi + getf.exp GR_Delta_Exp = FR_Delta // Get signexp of y-1 for exp calc + fmpy.s1 FR_W4 = FR_Wsq, FR_Wsq + nop.i 999 +} +{ .mfi + add GR_Table_Ptr = 0x0, GR_table_base // Constants_exp_64_Arg + fmpy.s1 FR_W3 = FR_Wsq, FR_W + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fmpy.s1 FR_half_W = FR_Half, FR_W + nop.i 999 +} +;; + +{ .mfi + ldfe FR_L_hi = [GR_Table_Ptr],16 + fma.s1 FR_poly_lo = FR_W, FR_P_8,FR_P_7 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 FR_poly = FR_W, FR_P_4, FR_P_3 + nop.i 999 +} +;; + +{ .mfi + ldfe FR_L_lo = [GR_Table_Ptr],16 + fnma.s1 FR_Y_hi = FR_W, FR_half_W, FR_W + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 FR_poly_lo = FR_W, FR_poly_lo, FR_P_6 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 FR_poly = FR_W, FR_poly, FR_P_2 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fsub.s1 FR_Y_lo = FR_W, FR_Y_hi + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 FR_poly_lo = FR_W, FR_poly_lo, FR_P_5 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 FR_poly = FR_W, FR_poly, FR_P_1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fnma.s1 FR_Y_lo = FR_W, FR_half_W, FR_Y_lo + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 FR_poly = FR_poly_lo, FR_W4, FR_poly + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 FR_Y_lo = FR_poly, FR_W3, FR_Y_lo + nop.i 999 +} +;; + + +LOGL_RETURN: +// Common code for completion of both logx paths + +// +// L_hi, L_lo already loaded. +// +// +// kernel_log_80 computed ln(X) +// and return logX_hi and logX_lo as results. +// PR_pow_Safe set as well. +// +// +// Compute Y * (logX_hi + logX_lo) +// P_hi -> X +// P_lo -> X_cor +// (Manipulate names so that inputs are in +// the place kernel_exp expects them) +// +// This function computes exp( x + x_cor) +// Input FR 1: FR_X +// Input FR 2: FR_X_cor +// Output FR 3: FR_Y_hi +// Output FR 4: FR_Y_lo +// Output FR 5: FR_Scale +// Output PR 1: PR_Safe +// +// P15 is True +// +// Load constants used in computing N using right-shift technique +{ .mlx + mov GR_exp_2tom51 = 0xffff-51 + movl GR_sig_inv_ln2 = 0xb8aa3b295c17f0bc // significand of 1/ln2 +} +{ .mlx + add GR_Special_Exp = -50,GR_exp_bias + movl GR_rshf_2to51 = 0x4718000000000000 // 1.10000 2^(63+51) +} +;; + +// +// Point to Table of W1s +// Point to Table of W2s +// +{ .mmi + add GR_W1_ptr = 0x2b0, GR_table_base // Constants_exp_64_W1 + add GR_W2_ptr = 0x4b0, GR_table_base // Constants_exp_64_W2 + cmp.le p6,p0= GR_Delta_Exp,GR_Special_Exp +};; + +// Form two constants we need +// 1/ln2 * 2^63 to compute w = x * 1/ln2 * 128 +// 1.1000..000 * 2^(63+63-12) to right shift int(N) into the significand + +{ .mfi + setf.sig FR_INV_LN2_2TO63 = GR_sig_inv_ln2 // form 1/ln2 * 2^63 + nop.f 999 + and GR_Delta_Exp=GR_Delta_Exp,GR_exp_mask // Get exponent of y-1 +} +{ .mlx + setf.d FR_RSHF_2TO51 = GR_rshf_2to51 // Form const 1.1000 * 2^(63+51) + movl GR_rshf = 0x43e8000000000000 // 1.10000 2^63 for right shift +} +;; + +{ .mfi + nop.m 999 + fmpy.s1 FR_X_lo = FR_Input_Y, FR_logx_lo // logx_lo is Y_lo + cmp.eq p15, p0= r0, r0 // Set p15, assume safe +};; + +{ .mmi + setf.exp FR_2TOM51 = GR_exp_2tom51 // Form 2^-51 for scaling float_N + setf.d FR_RSHF = GR_rshf // Form right shift const 1.1000 * 2^63 + add GR_Table_Ptr1 = 0x50, GR_table_base // Constants_exp_64_P for + // EXPL_SMALL path +} +;; + +{ .mmi + ldfe FR_P_6 = [GR_Table_Ptr1],16 // Load P_6 for EXPL_SMALL path +;; + ldfe FR_P_5 = [GR_Table_Ptr1],16 // Load P_5 for EXPL_SMALL path + nop.i 999 +} +;; + +{ .mfi + ldfe FR_P_4 = [GR_Table_Ptr1],16 // Load P_4 for EXPL_SMALL path + fma.s1 FR_P_hi = FR_Input_Y, FR_logx_hi,FR_X_lo // logx_hi ix Y_hi + nop.i 999 +} +;; + +{ .mmi + ldfe FR_P_3 = [GR_Table_Ptr1],16 // Load P_3 for EXPL_SMALL path +;; + ldfe FR_P_2 = [GR_Table_Ptr1],16 // Load P_2 for EXPL_SMALL path + nop.i 999 +} +;; + +// N = X * Inv_log2_by_2^12 +// By adding 1.10...0*2^63 we shift and get round_int(N_signif) in significand. +// We actually add 1.10...0*2^51 to X * Inv_log2 to do the same thing. +{ .mfi + ldfe FR_P_1 = [GR_Table_Ptr1] // Load P_1 for EXPL_SMALL path + fma.s1 FR_N = FR_X, FR_INV_LN2_2TO63, FR_RSHF_2TO51 + nop.i 999 +} +{ .mfb + nop.m 999 + fms.s1 FR_P_lo= FR_Input_Y, FR_logx_hi, FR_P_hi // P_hi is X +(p6) br.cond.spnt POWL_Y_ALMOST_1 // Branch if |y-1| < 2^-50 +} +;; + +{ .mmi + getf.exp GR_Expo_X = FR_X + add GR_T1_ptr = 0x0b0, GR_table_base // Constants_exp_64_T1 + add GR_T2_ptr = 0x1b0, GR_table_base // Constants_exp_64_T2 +} +;; + +// float_N = round_int(N) +// The signficand of N contains the rounded integer part of X * 2^12/ln2, +// as a twos complement number in the lower bits (that is, it may be negative). +// That twos complement number (called N) is put into GR_N_fix. + +// Since N is scaled by 2^51, it must be multiplied by 2^-51 +// before the shift constant 1.10000 * 2^63 is subtracted to yield float_N. +// Thus, float_N contains the floating point version of N + + +{ .mfi + add GR_Table_Ptr = 0x20, GR_table_base // Constants_exp_64_A + fms.s1 FR_float_N = FR_N, FR_2TOM51, FR_RSHF // Form float_N + nop.i 999 +} +// Create low part of Y(ln(x)_hi + ln(x)_lo) as P_lo +{ .mfi + mov GR_Big_Pos_Exp = 0x3ffe // 16382, largest safe exponent + fadd.s1 FR_P_lo = FR_P_lo, FR_X_lo + mov GR_Big_Neg_Exp = -0x3ffd // -16381 smallest safe exponent +};; + +{ .mfi + nop.m 999 + fmpy.s1 FR_rsq = FR_X, FR_X // rsq = X*X for EXPL_SMALL path + mov GR_vsm_expo = -70 // Exponent for very small path +} +{ .mfi + nop.m 999 + fma.s1 FR_poly_lo = FR_P_6, FR_X, FR_P_5 // poly_lo for EXPL_SMALL path + add GR_temp = 0x1,r0 // For tiny signif if small path +} +;; + +// +// If expo_X < -6 goto exp_small +// +{ .mmi + getf.sig GR_N_fix = FR_N + ldfe FR_A_3 = [GR_Table_Ptr],16 // Load A_3 + and GR_Expo_X = GR_Expo_X, GR_exp_mask // Get exponent of X +} +;; + +{ .mfi + ldfe FR_A_2 = [GR_Table_Ptr],16 // Load A_2 + nop.f 999 + sub GR_Expo_X = GR_Expo_X, GR_exp_bias // Get true exponent of X +} +;; + +// +// If -6 > Expo_X, set P9 and branch +// +{ .mfb + cmp.gt p9, p0 = -6, GR_Expo_X + fnma.s1 FR_r = FR_L_hi, FR_float_N, FR_X // r = X - L_hi * float_N +(p9) br.cond.spnt EXPL_SMALL // Branch if |X| < 2^-6 +} +;; + +// +// If 14 <= Expo_X, set P10 +// +{ .mib + cmp.le p10, p0 = 14, GR_Expo_X + nop.i 999 +(p10) br.cond.spnt EXPL_HUGE // Branch if |X| >= 2^14 +} +;; + +// +// Load single T1 +// Load single T2 +// W_1_p1 = W_1 + 1 +// +{ .mmi + nop.m 999 + nop.m 999 + extr.u GR_M1 = GR_N_fix, 6, 6 // Extract index M_1 +} +;; + +// +// k = extr.u(N_fix,0,6) +// +{ .mmi + shladd GR_W1_ptr = GR_M1,3,GR_W1_ptr // Point to W1 + shladd GR_T1_ptr = GR_M1,2,GR_T1_ptr // Point to T1 + extr.u GR_M2 = GR_N_fix, 0, 6 // Extract index M_2 +} +;; + +// N_fix is only correct up to 50 bits because of our right shift technique. +// Actually in the normal path we will have restricted K to about 14 bits. +// Somewhat arbitrarily we extract 32 bits. +{ .mmi + ldfd FR_W1 = [GR_W1_ptr] + shladd GR_W2_ptr = GR_M2,3,GR_W2_ptr // Point to W2 + extr GR_k = GR_N_fix, 12, 32 // Extract k +} +;; + +{ .mfi + ldfs FR_T1 = [GR_T1_ptr] + fnma.s1 FR_r = FR_L_lo, FR_float_N, FR_r + shladd GR_T2_ptr = GR_M2,2,GR_T2_ptr // Point to T2 +} +{ .mfi + add GR_exp_bias_p_k = GR_exp_bias, GR_k + nop.f 999 + cmp.gt p14,p15 = GR_k,GR_Big_Pos_Exp +} +;; + +// +// if k < big_neg_exp, set p14 and Safe=False +// +{ .mmi + ldfs FR_T2 = [GR_T2_ptr] +(p15) cmp.lt p14,p15 = GR_k,GR_Big_Neg_Exp + nop.i 999 +} +;; + +{ .mmi + setf.exp FR_Scale = GR_exp_bias_p_k + ldfd FR_W2 = [GR_W2_ptr] + nop.i 999 +} +;; + +{ .mfi + ldfe FR_A_1 = [GR_Table_Ptr],16 + fadd.s1 FR_r = FR_r, FR_X_cor + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fadd.s1 FR_W_1_p1 = FR_W1, f1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 FR_poly = FR_r, FR_A_3, FR_A_2 + nop.i 999 +} +{ .mfi + nop.m 999 + fmpy.s1 FR_rsq = FR_r, FR_r + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fmpy.s1 FR_T = FR_T1, FR_T2 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 FR_W = FR_W2, FR_W_1_p1, FR_W1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 FR_TMP1 = FR_Scale, FR_Sgn, f0 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 FR_poly = FR_r, FR_poly, FR_A_1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 FR_TMP2 = FR_T, f1, f0 // TMP2 = Y_hi = T + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fadd.s1 FR_Wp1 = FR_W, f1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 FR_poly = FR_rsq, FR_poly,FR_r + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 FR_Tscale = FR_T, FR_TMP1, f0 // Scale * Sgn * T + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 FR_Y_lo = FR_Wp1, FR_poly, FR_W + nop.i 999 +} +;; + +{ .mfb + nop.m 999 + fmpy.s1 FR_TMP3 = FR_Y_lo, FR_Tscale + br.cond.sptk POWL_64_SHARED +} +;; + + +EXPL_SMALL: +// Here if |ylogx| < 2^-6 +// +// Begin creating lsb to perturb final result +// +{ .mfi + setf.sig FR_temp = GR_temp + fma.s1 FR_poly_lo = FR_poly_lo, FR_X, FR_P_4 + cmp.lt p12, p0 = GR_Expo_X, GR_vsm_expo // Test |ylogx| < 2^-70 +} +{ .mfi + nop.m 999 + fma.s1 FR_poly_hi = FR_P_2, FR_X, FR_P_1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fmpy.s1 FR_TMP2 = f1, f1 + nop.i 999 +} +{ .mfi + nop.m 999 + fmpy.s1 FR_TMP1 = FR_Sgn, f1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fmpy.s1 FR_r4 = FR_rsq, FR_rsq +(p12) cmp.eq p15, p0 = r0, r0 // Set safe if |ylogx| < 2^-70 +} +{ .mfb + nop.m 999 +(p12) fmpy.s1 FR_TMP3 = FR_Sgn, FR_X +(p12) br.cond.spnt POWL_64_SHARED // Branch if |ylogx| < 2^-70 +} +;; + +{ .mfi + nop.m 999 + fma.s1 FR_poly_lo = FR_poly_lo, FR_X, FR_P_3 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 FR_poly_hi = FR_poly_hi, FR_rsq, FR_X + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 FR_Y_lo = FR_poly_lo, FR_r4, FR_poly_hi + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fmpy.s1 FR_TMP3 = FR_Y_lo, FR_TMP1 // Add sign info + nop.i 999 +} +;; + +// +// Toggle on last bit of Y_lo +// Set lsb of Y_lo to 1 +// +{ .mfi + nop.m 999 + for FR_temp = FR_Y_lo,FR_temp + nop.i 999 +} +;; + +{ .mfb + nop.m 999 + fmerge.se FR_TMP3 = FR_TMP3,FR_temp + br.cond.sptk POWL_64_SHARED +} +;; + + +EXPL_HUGE: +// Here if |ylogx| >= 2^14 +{ .mfi + mov GR_temp = 0x0A1DC // If X < 0, exponent -24100 + fcmp.gt.s1 p12, p13 = FR_X, f0 // Test X > 0 + cmp.eq p14, p15 = r0, r0 // Set Safe to false +} +;; + +{ .mmi +(p12) mov GR_Mask = 0x15DC0 // If X > 0, exponent +24000 +(p13) mov GR_Mask = 0x0A240 // If X < 0, exponent -24000 + nop.i 999 +} +;; + +{ .mmf + setf.exp FR_TMP2 = GR_Mask // Form Y_hi = TMP2 +(p13) setf.exp FR_Y_lo = GR_temp // If X < 0, Y_lo = 2^-24100 +(p12) mov FR_Y_lo = f1 // IF X > 0, Y_lo = 1.0 +} +;; + +{ .mfi + nop.m 999 + fmpy.s1 FR_TMP1 = FR_TMP2, FR_Sgn // TMP1 = Y_hi * Sgn + nop.i 999 +} +;; + +{ .mfb + nop.m 999 + fmpy.s1 FR_TMP3 = FR_Y_lo,FR_TMP1 // TMP3 = Y_lo * (Y_hi * Sgn) + br.cond.sptk POWL_64_SHARED +} +;; + +POWL_Y_ALMOST_1: +// Here if delta = |y-1| < 2^-50 +// +// x**(1 + delta) = x * e (ln(x)*delta) = x ( 1 + ln(x) * delta) +// +// Computation will be safe for 2^-16381 <= x < 2^16383 + +{ .mfi + mov GR_exp_ynear1_oflow = 0xffff + 16383 + fma.s1 FR_TMP1 = FR_Input_X,FR_Delta,f0 + and GR_exp_x = GR_exp_mask, GR_signexp_x +} +;; + +{ .mfi + cmp.lt p15, p14 = GR_exp_x, GR_exp_ynear1_oflow + fma.s1 FR_TMP2 = FR_logx_hi,f1,FR_X_lo + mov GR_exp_ynear1_uflow = 0xffff - 16381 +} +;; + +{ .mfb +(p15) cmp.ge p15, p14 = GR_exp_x, GR_exp_ynear1_uflow + fma.s1 FR_TMP3 = FR_Input_X,f1,f0 + br.cond.sptk POWL_64_SHARED +};; + +POWL_64_SQUARE: +// +// Here if x not zero and y=2. +// +// Setup for multipath code +// +{ .mfi + mov GR_exp_square_oflow = 0xffff + 8192 // Exponent where x*x overflows + fmerge.se FR_TMP1 = FR_Input_X, FR_Input_X + and GR_exp_x = GR_exp_mask, GR_signexp_x // Get exponent of x +} +;; + +{ .mfi + cmp.lt p15, p14 = GR_exp_x, GR_exp_square_oflow // Decide safe/unsafe + fmerge.se FR_TMP2 = FR_Input_X, FR_Input_X + mov GR_exp_square_uflow = 0xffff - 8191 // Exponent where x*x underflows +} +;; + +{ .mfi +(p15) cmp.ge p15, p14 = GR_exp_x, GR_exp_square_uflow // Decide safe/unsafe + fma.s1 FR_TMP3 = f0,f0,f0 + nop.i 999 +} +;; + +// +// This is the shared path that will set overflow and underflow. +// +POWL_64_SHARED: + +// +// Return if no danger of over or underflow. +// +{ .mfb + nop.m 999 + fma.s0 FR_Result = FR_TMP1, FR_TMP2, FR_TMP3 +(p15) br.ret.sptk b0 // Main path return if certain no over/underflow +} +;; + +// +// S0 user supplied status +// S2 user supplied status + WRE + TD (Overflows) +// S2 user supplied status + FZ + TD (Underflows) +// +// +// If (Safe) is true, then +// Compute result using user supplied status field. +// No overflow or underflow here, but perhaps inexact. +// Return +// Else +// Determine if overflow or underflow was raised. +// Fetch +/- overflow threshold for IEEE double extended + +{ .mfi + nop.m 999 + fsetc.s2 0x7F,0x41 // For underflow test, set S2=User+TD+FTZ + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s2 FR_Result_small = FR_TMP1, FR_TMP2, FR_TMP3 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fsetc.s2 0x7F,0x42 // For overflow test, set S2=User+TD+WRE + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s2 FR_Result_big = FR_TMP1, FR_TMP2,FR_TMP3 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fsetc.s2 0x7F,0x40 // Reset S2=User + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fclass.m p11, p0 = FR_Result_small, 0x00F // Test small result unorm/zero + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fcmp.ge.s1 p8, p0 = FR_Result_big , FR_Big // Test >= + oflow threshold + nop.i 999 +} +;; + +{ .mfb +(p11) mov GR_Parameter_TAG = 19 // Set tag for underflow + fcmp.le.s1 p9, p0 = FR_Result_big, FR_NBig // Test <= - oflow threshold +(p11) br.cond.spnt __libm_error_region // Branch if pow underflowed +} +;; + +{ .mfb +(p8) mov GR_Parameter_TAG = 18 // Set tag for overflow + nop.f 999 +(p8) br.cond.spnt __libm_error_region // Branch if pow +overflow +} +;; + +{ .mbb +(p9) mov GR_Parameter_TAG = 18 // Set tag for overflow +(p9) br.cond.spnt __libm_error_region // Branch if pow -overflow + br.ret.sptk b0 // Branch if result really ok +} +;; + + +POWL_64_SPECIAL: +// Here if x or y is NatVal, nan, inf, or zero +{ .mfi + nop.m 999 + fcmp.eq.s1 p15, p0 = FR_Input_X, f1 // Test x=+1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fclass.m p8, p0 = FR_Input_X, 0x143 // Test x natval, snan + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p15) fcmp.eq.unc.s0 p6,p0 = FR_Input_Y, f0 // If x=1, flag invalid if y=SNaN + nop.i 999 +} +{ .mfb + nop.m 999 +(p15) fmpy.s0 FR_Result = f1,f1 // If x=1, result=1 +(p15) br.ret.spnt b0 // Exit if x=1 +} +;; + +{ .mfi + nop.m 999 + fclass.m p6, p0 = FR_Input_Y, 0x007 // Test y zero + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fclass.m p9, p0 = FR_Input_Y, 0x143 // Test y natval, snan + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fclass.m p10, p0 = FR_Input_X, 0x083 // Test x qnan + nop.i 999 +} +{ .mfi + nop.m 999 +(p8) fmpy.s0 FR_Result = FR_Input_Y, FR_Input_X // If x=snan, result=qnan +(p6) cmp.ne p8,p0 = r0,r0 // Don't exit if x=snan, y=0 ==> result=+1 +} +;; + +{ .mfi + nop.m 999 +(p6) fclass.m.unc p15, p0 = FR_Input_X,0x007 // Test x=0, y=0 + nop.i 999 +} +{ .mfb + nop.m 999 +(p9) fmpy.s0 FR_Result = FR_Input_Y, FR_Input_X // If y=snan, result=qnan +(p8) br.ret.spnt b0 // Exit if x=snan, y not 0, + // result=qnan +} +;; + +{ .mfi + nop.m 999 + fcmp.eq.s1 p7, p0 = FR_Input_Y, f1 // Test y +1.0 + nop.i 999 +} +{ .mfb + nop.m 999 +(p10) fmpy.s0 FR_Result = FR_Input_X, f0 // If x=qnan, result=qnan +(p9) br.ret.spnt b0 // Exit if y=snan, result=qnan +} +;; + +{ .mfi + nop.m 999 +(p6) fclass.m.unc p8, p0 = FR_Input_X,0x0C3 // Test x=nan, y=0 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p6) fcmp.eq.s0 p9,p0 = FR_Input_X, f0 // If y=0, flag if x denormal + nop.i 999 +} +{ .mfi + nop.m 999 +(p6) fadd.s0 FR_Result = f1, f0 // If y=0, result=1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fclass.m p11, p0 = FR_Input_Y, 0x083 // Test y qnan + nop.i 999 +} +{ .mfb +(p15) mov GR_Parameter_TAG = 20 // Error tag for x=0, y=0 +(p7) fmpy.s0 FR_Result = FR_Input_X,f1 // If y=1, result=x +(p15) br.cond.spnt __libm_error_region // Branch if x=0, y=0, result=1 +} +;; + +{ .mfb +(p8) mov GR_Parameter_TAG = 23 // Error tag for x=nan, y=0 + fclass.m p14, p0 = FR_Input_Y, 0x023 // Test y inf +(p8) br.cond.spnt __libm_error_region // Branch if x=snan, y=0, + // result=1 +} +;; + +{ .mfb + nop.m 999 + fclass.m p13, p0 = FR_Input_X, 0x023 // Test x inf +(p6) br.ret.spnt b0 // Exit y=0, x not nan or 0, + // result=1 +} +;; + +{ .mfb + nop.m 999 +(p14) fcmp.eq.unc.s1 p0,p14 = FR_Input_X,f0 // Test x not 0, y=inf +(p7) br.ret.spnt b0 // Exit y=1, x not snan, + // result=x +} +;; + +{ .mfb + nop.m 999 +(p10) fmpy.s0 FR_Result = FR_Input_Y,FR_Input_X // If x=qnan, y not snan, + // result=qnan +(p10) br.ret.spnt b0 // Exit x=qnan, y not snan, + // result=qnan +} +;; + +{ .mfb + nop.m 999 +(p11) fmpy.s0 FR_Result = FR_Input_Y,FR_Input_X // If y=qnan, x not nan or 1, + // result=qnan +(p11) br.ret.spnt b0 // Exit y=qnan, x not nan or 1, + // result=qnan +} +;; + +{ .mbb + nop.m 999 +(p14) br.cond.spnt POWL_64_Y_IS_INF // Branch if y=inf, x not 1 or nan +(p13) br.cond.spnt POWL_64_X_IS_INF // Branch if x=inf, y not 1 or nan +} +;; + + +POWL_64_X_IS_ZERO: +// Here if x=0, y not nan or 1 or inf or 0 + +// There is logic starting here to determine if y is an integer when x = 0. +// If 0 < |y| < 1 then clearly y is not an integer. +// If |y| > 1, then the significand of y is shifted left by the size of +// the exponent of y. This preserves the lsb of the integer part + the +// fractional bits. The lsb of the integer can be tested to determine if +// the integer is even or odd. The fractional bits can be tested. If zero, +// then y is an integer. +// +{ .mfi + and GR_exp_y = GR_exp_mask,GR_signexp_y // Get biased exponent of y + nop.f 999 + and GR_y_sign = GR_sign_mask,GR_signexp_y // Get sign of y +} +;; + +// +// Maybe y is < 1 already, so +// can never be an integer. +// +{ .mfi + cmp.lt p9, p8 = GR_exp_y,GR_exp_bias // Test 0 < |y| < 1 + nop.f 999 + sub GR_exp_y = GR_exp_y,GR_exp_bias // Get true exponent of y +} +;; + +// +// Shift significand of y looking for nonzero bits +// For y > 1, shift signif_y exp_y bits to the left +// For y < 1, turn on 4 low order bits of significand of y +// so that the fraction will always be non-zero +// +{ .mmi +(p9) or GR_exp_y= 0xF,GR_signif_y // Force nonzero fraction if y<1 +;; + nop.m 999 +(p8) shl GR_exp_y= GR_signif_y,GR_exp_y // Get lsb of int + fraction + // Wait 4 cycles to use result +} +;; + +{ .mmi + nop.m 999 +;; + nop.m 999 + nop.i 999 +} +;; + +{ .mmi + nop.m 999 +;; + nop.m 999 + shl GR_fraction_y= GR_exp_y,1 // Shift left 1 to get fraction +} +;; + +// +// Integer part of y shifted off. +// Get y's low even or odd bit - y might not be an int. +// +{ .mii + cmp.eq p13,p0 = GR_fraction_y, r0 // Test for y integer + cmp.eq p8,p0 = GR_y_sign, r0 // Test for y > 0 +;; +(p13) tbit.nz.unc p13,p0 = GR_exp_y, 63 // Test if y an odd integer +} +;; + +{ .mfi +(p13) cmp.eq.unc p13,p14 = GR_y_sign, r0 // Test y pos odd integer +(p8) fcmp.eq.s0 p12,p0 = FR_Input_Y, f0 // If x=0 and y>0 flag if y denormal + nop.i 999 +} +;; + +// +// Return +/-0 when x=+/-0 and y is positive odd integer +// +{ .mfb + nop.m 999 +(p13) mov FR_Result = FR_Input_X // If x=0, y pos odd int, result=x +(p13) br.ret.spnt b0 // Exit x=0, y pos odd int, result=x +} +;; + +// +// Return +/-inf when x=+/-0 and y is negative odd int +// +{ .mfb +(p14) mov GR_Parameter_TAG = 21 +(p14) frcpa.s0 FR_Result, p0 = f1, FR_Input_X // Result +-inf, set Z flag +(p14) br.cond.spnt __libm_error_region +} +;; + +// +// Return +0 when x=+/-0 and y positive and not an odd integer +// +{ .mfb + nop.m 999 +(p8) mov FR_Result = f0 // If x=0, y>0 and not odd integer, result=+0 +(p8) br.ret.sptk b0 // Exit x=0, y>0 and not odd integer, result=+0 +} +;; + +// +// Return +inf when x=+/-0 and y is negative and not odd int +// +{ .mfb + mov GR_Parameter_TAG = 21 + frcpa.s0 FR_Result, p10 = f1,f0 // Result +inf, raise Z flag + br.cond.sptk __libm_error_region +} +;; + + +POWL_64_X_IS_INF: +// +// Here if x=inf, y not 1 or nan +// +{ .mfi + and GR_exp_y = GR_exp_mask,GR_signexp_y // Get biased exponent y + fclass.m p13, p0 = FR_Input_X,0x022 // Test x=-inf + nop.i 999 +} +;; + +{ .mfi + and GR_y_sign = GR_sign_mask,GR_signexp_y // Get sign of y + fcmp.eq.s0 p9,p0 = FR_Input_Y, f0 // Dummy to set flag if y denorm + nop.i 999 +} +;; + +// +// Maybe y is < 1 already, so +// isn't an int. +// +{ .mfi +(p13) cmp.lt.unc p9, p8 = GR_exp_y,GR_exp_bias // Test 0 < |y| < 1 if x=-inf + fclass.m p11, p0 = FR_Input_X,0x021 // Test x=+inf + sub GR_exp_y = GR_exp_y,GR_exp_bias // Get true exponent y +} +;; + +// +// Shift significand of y looking for nonzero bits +// For y > 1, shift signif_y exp_y bits to the left +// For y < 1, turn on 4 low order bits of significand of y +// so that the fraction will always be non-zero +// +{ .mmi +(p9) or GR_exp_y= 0xF,GR_signif_y // Force nonzero fraction if y<1 +;; +(p11) cmp.eq.unc p14,p12 = GR_y_sign, r0 // Test x=+inf, y>0 +(p8) shl GR_exp_y= GR_signif_y,GR_exp_y // Get lsb of int + fraction + // Wait 4 cycles to use result +} +;; + +// +// Return +inf for x=+inf, y > 0 +// Return +0 for x=+inf, y < 0 +// +{ .mfi + nop.m 999 +(p12) mov FR_Result = f0 // If x=+inf, y<0, result=+0 + nop.i 999 +} +{ .mfb + nop.m 999 +(p14) fma.s0 FR_Result = FR_Input_X,f1,f0 // If x=+inf, y>0, result=+inf +(p11) br.ret.sptk b0 // Exit x=+inf +} +;; + +// +// Here only if x=-inf. Wait until can use result of shl... +// +{ .mmi + nop.m 999 +;; + nop.m 999 + nop.i 999 +} +;; + +{ .mfi + cmp.eq p8,p9 = GR_y_sign, r0 // Test y pos + nop.f 999 + shl GR_fraction_y = GR_exp_y,1 // Shift left 1 to get fraction +} +;; + +{ .mmi + cmp.eq p13,p0 = GR_fraction_y, r0 // Test y integer +;; + nop.m 999 +(p13) tbit.nz.unc p13,p0 = GR_exp_y, 63 // Test y odd integer +} +;; + +// +// Is y even or odd? +// +{ .mii +(p13) cmp.eq.unc p14,p10 = GR_y_sign, r0 // Test x=-inf, y pos odd int +(p13) cmp.ne.and p8,p9 = r0,r0 // If y odd int, turn off p8,p9 + nop.i 999 +} +;; + +// +// Return -0 for x = -inf and y < 0 and odd int. +// Return -Inf for x = -inf and y > 0 and odd int. +// +{ .mfi + nop.m 999 +(p10) fmerge.ns FR_Result = f0, f0 // If x=-inf, y neg odd int, result=-0 + nop.i 999 +} +{ .mfi + nop.m 999 +(p14) fmpy.s0 FR_Result = FR_Input_X,f1 // If x=-inf, y pos odd int, result=-inf + nop.i 999 +} +;; + +// +// Return Inf for x = -inf and y > 0 not an odd int. +// Return +0 for x = -inf and y < 0 not an odd int. +// +.pred.rel "mutex",p8,p9 +{ .mfi + nop.m 999 +(p8) fmerge.ns FR_Result = FR_Input_X, FR_Input_X // If x=-inf, y>0 not odd int + // result=+inf + nop.i 999 +} +{ .mfb + nop.m 999 +(p9) fmpy.s0 FR_Result = f0,f0 // If x=-inf, y<0 not odd int + // result=+0 + br.ret.sptk b0 // Exit for x=-inf +} +;; + + +POWL_64_Y_IS_INF: +// Here if y=inf, x not 1 or nan +// +// For y = +Inf and |x| < 1 returns 0 +// For y = +Inf and |x| > 1 returns Inf +// For y = -Inf and |x| < 1 returns Inf +// For y = -Inf and |x| > 1 returns 0 +// For y = Inf and |x| = 1 returns 1 +// +{ .mfi + nop.m 999 + fclass.m p8, p0 = FR_Input_Y, 0x021 // Test y=+inf + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fclass.m p9, p0 = FR_Input_Y, 0x022 // Test y=-inf + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fabs FR_X = FR_Input_X // Form |x| + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fcmp.eq.s0 p10,p0 = FR_Input_X, f0 // flag if x denormal + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p8) fcmp.lt.unc.s1 p6, p0 = FR_X, f1 // Test y=+inf, |x|<1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p8) fcmp.gt.unc.s1 p7, p0 = FR_X, f1 // Test y=+inf, |x|>1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fcmp.lt.unc.s1 p12, p0 = FR_X, f1 // Test y=-inf, |x|<1 + nop.i 999 +} +{ .mfi + nop.m 999 +(p6) fmpy.s0 FR_Result = f0,f0 // If y=+inf, |x|<1, result=+0 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fcmp.gt.unc.s1 p13, p0 = FR_X, f1 // Test y=-inf, |x|>1 + nop.i 999 +} +{ .mfi + nop.m 999 +(p7) fmpy.s0 FR_Result = FR_Input_Y, f1 // If y=+inf, |x|>1, result=+inf + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fcmp.eq.s1 p14, p0 = FR_X, f1 // Test y=inf, |x|=1 + nop.i 999 +} +{ .mfi + nop.m 999 +(p12) fnma.s0 FR_Result = FR_Input_Y, f1, f0 // If y=-inf, |x|<1, result=+inf + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p13) mov FR_Result = f0 // If y=-inf, |x|>1, result=+0 + nop.i 999 +} +;; + +{ .mfb + nop.m 999 +(p14) fmpy.s0 FR_Result = f1,f1 // If y=inf, |x|=1, result=+1 + br.ret.sptk b0 // Common return for y=inf +} +;; + + +// Here if x or y denorm/unorm +POWL_DENORM: +{ .mmi + getf.sig GR_signif_Z = FR_norm_X // Get significand of x +;; + getf.exp GR_signexp_y = FR_norm_Y // Get sign and exp of y + nop.i 999 +} +;; + +{ .mfi + getf.sig GR_signif_y = FR_norm_Y // Get significand of y + nop.f 999 + nop.i 999 +} +;; + +{ .mib + getf.exp GR_signexp_x = FR_norm_X // Get sign and exp of x + extr.u GR_Index1 = GR_signif_Z, 59, 4 // Extract upper 4 signif bits of x + br.cond.sptk POWL_COMMON // Branch back to main path +} +;; + + +POWL_64_UNSUPPORT: +// +// Raise exceptions for specific +// values - pseudo NaN and +// infinities. +// Return NaN and raise invalid +// +{ .mfb + nop.m 999 + fmpy.s0 FR_Result = FR_Input_X,f0 + br.ret.sptk b0 +} +;; + +POWL_64_XNEG: +// +// Raise invalid for x < 0 and +// y not an integer +// +{ .mfi + nop.m 999 + frcpa.s0 FR_Result, p8 = f0, f0 + mov GR_Parameter_TAG = 22 +} +{ .mib + nop.m 999 + nop.i 999 + br.cond.sptk __libm_error_region +} +;; + +POWL_64_SQRT: +{ .mfi + nop.m 999 + frsqrta.s0 FR_Result,p10 = FR_save_Input_X + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p10) fma.s1 f62=FR_Half,FR_save_Input_X,f0 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p10) fma.s1 f63=FR_Result,FR_Result,f0 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p10) fnma.s1 f32=f63,f62,FR_Half + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p10) fma.s1 f33=f32,FR_Result,FR_Result + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p10) fma.s1 f34=f33,f62,f0 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p10) fnma.s1 f35=f34,f33,FR_Half + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p10) fma.s1 f63=f35,f33,f33 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p10) fma.s1 f32=FR_save_Input_X,f63,f0 + nop.i 999 +} +{ .mfi + nop.m 999 +(p10) fma.s1 FR_Result=f63,f62,f0 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p10) fma.s1 f33=f11,f63,f0 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p10) fnma.s1 f34=f32,f32,FR_save_Input_X + nop.i 999 +} +{ .mfi + nop.m 999 +(p10) fnma.s1 f35=FR_Result,f63,FR_Half + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p10) fma.s1 f62=f33,f34,f32 + nop.i 999 +} +{ .mfi + nop.m 999 +(p10) fma.s1 f63=f33,f35,f33 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p10) fnma.s1 f32=f62,f62,FR_save_Input_X + nop.i 999 ;; +} +{ .mfb + nop.m 999 +(p10) fma.s0 FR_Result=f32,f63,f62 + br.ret.sptk b0 // Exit for x > 0, y = 0.5 +} +;; + +GLOBAL_LIBM_END(powl) + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfe [GR_Parameter_Y] = FR_Input_Y,16 // Save Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; +.body +{ .mib + stfe [GR_Parameter_X] = FR_save_Input_X // Store Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y + nop.b 0 // Parameter 3 address +} +{ .mib + stfe [GR_Parameter_Y] = FR_Result // Store Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; +{ .mmi + ldfe f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region#) +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/e_rem_pio2.c b/sysdeps/ia64/fpu/e_rem_pio2.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/e_rem_pio2.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/e_rem_pio2f.c b/sysdeps/ia64/fpu/e_rem_pio2f.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/e_rem_pio2f.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/e_remainder.S b/sysdeps/ia64/fpu/e_remainder.S new file mode 100644 index 0000000000..f655567f52 --- /dev/null +++ b/sysdeps/ia64/fpu/e_remainder.S @@ -0,0 +1,590 @@ +.file "remainder.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//==================================================================== +// 02/02/00 Initial version +// 03/02/00 New Algorithm +// 04/04/00 Unwind support added +// 07/21/00 Fixed quotient=2^{24*m+23}*1.q1...q23 1 bug +// 08/15/00 Bundle added after call to __libm_error_support to properly +// set [the previously overwritten] GR_Parameter_RESULT. +// 11/29/00 Set FR_Y to f9 +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// +// API +//==================================================================== +// double remainder(double,double); +// +// Overview of operation +//==================================================================== +// remainder(a,b)=a-i*b, +// where i is an integer such that, if b!=0 and a is finite, +// |a/b-i|<=1/2. If |a/b-i|=1/2, i is even. +// +// Algorithm +//==================================================================== +// a). eliminate special cases +// b). if |a/b|<0.25 (first quotient estimate), return a +// c). use single precision divide algorithm to get quotient q +// rounded to 24 bits of precision +// d). calculate partial remainders (using both q and q-ulp); +// select one and RZ(a/b) based on the sign of |a|-|b|*q +// e). if the exponent difference (exponent(a)-exponent(b)) +// is less than 24 (quotient estimate<2^{24}-2), use RZ(a/b) +// and sticky bits to round to integer; exit loop and +// calculate final remainder +// f). if exponent(a)-exponent(b)>=24, select new value of a as +// the partial remainder calculated using RZ(a/b); +// repeat from c). +// +// Special cases +//==================================================================== +// a=+/- Inf, or b=+/-0: return NaN, call libm_error_support +// a=NaN or b=NaN: return NaN + +// Registers used +//==================================================================== +// Predicate registers: p6-p14 +// General registers: r2,r3,r28,r29,r32 (ar.pfs), r33-r39 +// Floating point registers: f6-f15,f32 + +GR_SAVE_B0 = r33 +GR_SAVE_PFS = r34 +GR_SAVE_GP = r35 +GR_SAVE_SP = r36 + +GR_Parameter_X = r37 +GR_Parameter_Y = r38 +GR_Parameter_RESULT = r39 +GR_Parameter_TAG = r40 + +FR_X = f10 +FR_Y = f9 +FR_RESULT = f8 + + +.section .text +GLOBAL_IEEE754_ENTRY(remainder) + +// inputs in f8, f9 +// result in f8 + +{ .mfi + alloc r32=ar.pfs,1,4,4,0 + // f13=|a| + fmerge.s f13=f0,f8 + nop.i 0 +} + {.mfi + nop.m 0 + // f14=|b| + fmerge.s f14=f0,f9 + nop.i 0;; +} + {.mlx + mov r28=0x2ffdd + // r2=2^{23} + movl r3=0x4b000000;; +} + +// Y +-NAN, +-inf, +-0? p11 +{ .mfi + setf.exp f32=r28 + fclass.m.unc p11,p0 = f9, 0xe7 + nop.i 999 +} +// qnan snan inf norm unorm 0 -+ +// 1 1 1 0 0 0 11 +// e 3 +// X +-NAN, +-inf, ? p9 +{ .mfi + nop.m 999 + fclass.m.unc p9,p0 = f8, 0xe3 + nop.i 999;; +} + +{.mfi + nop.m 0 + mov f12=f0 + nop.i 0 +} +{ .mfi + // set p7=1 + cmp.eq.unc p7,p0=r0,r0 + // Step (1) + // y0 = 1 / b in f10 + frcpa.s1 f10,p6=f13,f14 + nop.i 0;; +} + +{.bbb + (p9) br.cond.spnt FREM_X_NAN_INF + (p11) br.cond.spnt FREM_Y_NAN_INF_ZERO + nop.b 0 +} {.mfi + nop.m 0 + // set D flag if a (f8) is denormal + fnma.s0 f6=f8,f1,f8 + nop.i 0;; +} + + +remloop24: + { .mfi + nop.m 0 + // Step (2) + // q0 = a * y0 in f12 + (p6) fma.s1 f12=f13,f10,f0 + nop.i 0 +} { .mfi + nop.m 0 + // Step (3) + // e0 = 1 - b * y0 in f7 + (p6) fnma.s1 f7=f14,f10,f1 + nop.i 0;; +} {.mlx + nop.m 0 + // r2=1.25*2^{-24} + movl r2=0x33a00000;; +} + +{.mfi + nop.m 0 + // q1=q0*(1+e0) + (p6) fma.s1 f15=f12,f7,f12 + nop.i 0 +} +{ .mfi + nop.m 0 + // Step (4) + // e1 = e0 * e0 + E in f7 + (p6) fma.s1 f7=f7,f7,f32 + nop.i 0;; +} + {.mii + (p7) getf.exp r29=f12 + (p7) mov r28=0xfffd + nop.i 0;; +} + { .mfi + // f12=2^{23} + setf.s f12=r3 + // Step (5) + // q2 = q1 + e1 * q1 in f11 + (p6) fma.s.s1 f11=f7,f15,f15 + nop.i 0 +} { .mfi + nop.m 0 + // Step (6) + // q2 = q1 + e1 * q1 in f6 + (p6) fma.s1 f6=f7,f15,f15 + nop.i 0;; +} + + {.mmi + // f15=1.25*2^{-24} + setf.s f15=r2 + // q<1/4 ? (i.e. expon< -2) + (p7) cmp.gt p7,p0=r28,r29 + nop.i 0;; +} + +{.mfb + // r29= -32+bias + mov r29=0xffdf + // if |a/b|<1/4, set D flag before returning + (p7) fma.d.s0 f9=f9,f0,f8 + nop.b 0;; +} + {.mfb + nop.m 0 + // can be combined with bundle above if sign of 0 or + // FTZ enabled are not important + (p7) fmerge.s f8=f8,f9 + // return if |a|<4*|b| (estimated quotient < 1/4) + (p7) br.ret.spnt b0;; +} + {.mfi + // f7=2^{-32} + setf.exp f7=r29 + // set f8 to current a value | sign + fmerge.s f8=f8,f13 + nop.i 0;; +} + + + {.mfi + getf.exp r28=f6 + // last step ? (q<2^{23}) + fcmp.lt.unc.s1 p0,p12=f6,f12 + nop.i 0;; +} + {.mfi + nop.m 0 + // r=a-b*q + fnma.s1 f6=f14,f11,f13 + nop.i 0 +} {.mfi + // r2=23+bias + mov r2=0xffff+23 + // q'=q-q*(1.25*2^{-24}) (q'=q-ulp) + fnma.s.s1 f15=f11,f15,f11 + nop.i 0;; +} + {.mmi + nop.m 0 + cmp.eq p11,p14=r2,r28 + nop.i 0;; +} + +.pred.rel "mutex",p11,p14 + {.mfi + nop.m 0 + // if exp_q=2^23, then r=a-b*2^{23} + (p11) fnma.s1 f13=f12,f14,f13 + nop.i 0 +} +{.mfi + nop.m 0 + // r2=a-b*q' + (p14) fnma.s1 f13=f14,f15,f13 + nop.i 0;; +} + {.mfi + nop.m 0 + // r>0 iff q=RZ(a/b) and inexact + fcmp.gt.unc.s1 p8,p0=f6,f0 + nop.i 0 +} {.mfi + nop.m 0 + // r<0 iff q'=RZ(a/b) and inexact + (p14) fcmp.lt.unc.s1 p9,p10=f6,f0 + nop.i 0;; +} + +.pred.rel "mutex",p8,p9 + {.mfi + nop.m 0 + // (p8) Q=q+(last iteration ? sticky bits:0) + // i.e. Q=q+q*x (x=2^{-32} or 0) + (p8) fma.s1 f11=f11,f7,f11 + nop.i 0 +} {.mfi + nop.m 0 + // (p9) Q=q'+(last iteration ? sticky bits:0) + // i.e. Q=q'+q'*x (x=2^{-32} or 0) + (p9) fma.s1 f11=f15,f7,f15 + nop.i 0;; +} + + {.mfb + nop.m 0 + // (p9) set r=r2 (new a, if not last iteration) + // (p10) new a =r + (p10) mov f13=f6 + (p12) br.cond.sptk remloop24;; +} + +// last iteration + {.mfi + nop.m 0 + // set f9=|b|*sgn(a) + fmerge.s f9=f8,f9 + nop.i 0 +} + {.mfi + nop.m 0 + // round to integer + fcvt.fx.s1 f11=f11 + nop.i 0;; +} + {.mfi + nop.m 0 + // save sign of a + fmerge.s f7=f8,f8 + nop.i 0 +} {.mfi + nop.m 0 + // normalize + fcvt.xf f11=f11 + nop.i 0;; +} + {.mfi + nop.m 0 + // This can be removed if sign of 0 is not important + // get remainder using sf1 + fnma.d.s1 f12=f9,f11,f8 + nop.i 0 +} + {.mfi + nop.m 0 + // get remainder + fnma.d.s0 f8=f9,f11,f8 + nop.i 0;; +} + {.mfi + nop.m 0 + // f12=0? + // This can be removed if sign of 0 is not important + fcmp.eq.unc.s1 p8,p0=f12,f0 + nop.i 0;; +} + {.mfb + nop.m 0 + // if f8=0, set sign correctly + // This can be removed if sign of 0 is not important + (p8) fmerge.s f8=f7,f8 + // return + br.ret.sptk b0;; +} + + +FREM_X_NAN_INF: + +// Y zero ? +{.mfi + nop.m 0 + fma.s1 f10=f9,f1,f0 + nop.i 0;; +} +{.mfi + nop.m 0 + fcmp.eq.unc.s1 p11,p0=f10,f0 + nop.i 0;; +} +{.mib + nop.m 0 + nop.i 0 + // if Y zero + (p11) br.cond.spnt FREM_Y_ZERO;; +} + +// X infinity? Return QNAN indefinite +{ .mfi + nop.m 999 + fclass.m.unc p8,p0 = f8, 0x23 + nop.i 999 +} +// X infinity? Return QNAN indefinite +{ .mfi + nop.m 999 + fclass.m.unc p11,p0 = f8, 0x23 + nop.i 999;; +} +// Y NaN ? +{.mfi + nop.m 999 +(p8) fclass.m.unc p0,p8=f9,0xc3 + nop.i 0;; +} +{.mfi + nop.m 999 + // also set Denormal flag if necessary +(p8) fma.s0 f9=f9,f1,f0 + nop.i 0 +} +{ .mfi + nop.m 999 +(p8) frcpa.s0 f8,p7 = f8,f8 + nop.i 999 ;; +} + +{.mfi + nop.m 999 +(p11) mov f10=f8 + nop.i 0 +} +{ .mfi + nop.m 999 +(p8) fma.d.s0 f8=f8,f1,f0 + nop.i 0 ;; +} + +{ .mfb + nop.m 999 + frcpa.s0 f8,p7=f8,f9 + (p11) br.cond.spnt EXP_ERROR_RETURN;; +} +{ .mib + nop.m 0 + nop.i 0 + br.ret.spnt b0 ;; +} + + +FREM_Y_NAN_INF_ZERO: + +// Y INF +{ .mfi + nop.m 999 + fclass.m.unc p7,p0 = f9, 0x23 + nop.i 999 ;; +} + +{ .mfb + nop.m 999 +(p7) fma.d.s0 f8=f8,f1,f0 +(p7) br.ret.spnt b0 ;; +} + +// Y NAN? +{ .mfi + nop.m 999 + fclass.m.unc p9,p0 = f9, 0xc3 + nop.i 999 ;; +} + +{ .mfb + nop.m 999 +(p9) fma.d.s0 f8=f9,f1,f0 +(p9) br.ret.spnt b0 ;; +} + +FREM_Y_ZERO: +// Y zero? Must be zero at this point +// because it is the only choice left. +// Return QNAN indefinite + +// X NAN? +{ .mfi + nop.m 999 + fclass.m.unc p9,p10 = f8, 0xc3 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p10) fclass.nm p9,p10 = f8, 0xff + nop.i 999 ;; +} + +{.mfi + nop.m 999 + (p9) frcpa.s0 f11,p7=f8,f0 + nop.i 0;; +} + +{ .mfi + nop.m 999 +(p10) frcpa.s0 f11,p7 = f0,f0 + nop.i 999;; +} + +{ .mfi + nop.m 999 + fmerge.s f10 = f8, f8 + nop.i 999 +} + +{ .mfi + nop.m 999 + fma.d.s0 f8=f11,f1,f0 + nop.i 999 +} + + +EXP_ERROR_RETURN: + +{ .mib + mov GR_Parameter_TAG = 124 + nop.i 999 + br.sptk __libm_error_region;; +} + +GLOBAL_IEEE754_END(remainder) + + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfd [GR_Parameter_Y] = FR_Y,16 // Save Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; +.body +{ .mib + stfd [GR_Parameter_X] = FR_X // Store Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y + nop.b 0 // Parameter 3 address +} +{ .mib + stfd [GR_Parameter_Y] = FR_RESULT // Store Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + nop.m 0 + nop.m 0 + add GR_Parameter_RESULT = 48,sp +};; +{ .mmi + ldfd f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) + + + +.type __libm_error_support#,@function +.global __libm_error_support# + + diff --git a/sysdeps/ia64/fpu/e_remainderf.S b/sysdeps/ia64/fpu/e_remainderf.S new file mode 100644 index 0000000000..0e9bedd652 --- /dev/null +++ b/sysdeps/ia64/fpu/e_remainderf.S @@ -0,0 +1,609 @@ +.file "remainderf.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//==================================================================== +// 02/02/00 Initial version +// 03/02/00 New algorithm +// 04/04/00 Unwind support added +// 07/21/00 Fixed quotient=2^{24*m+23} bug +// 08/15/00 Bundle added after call to __libm_error_support to properly +// set [the previously overwritten] GR_Parameter_RESULT. +// 11/29/00 Set FR_Y to f9 +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// +// API +//==================================================================== +// float remainderf(float,float); +// +// Overview of operation +//==================================================================== +// remainder(a,b)=a-i*b, +// where i is an integer such that, if b!=0 and a is finite, +// |a/b-i|<=1/2. If |a/b-i|=1/2, i is even. +// +// Algorithm +//==================================================================== +// a). eliminate special cases +// b). if |a/b|<0.25 (first quotient estimate), return a +// c). use single precision divide algorithm to get quotient q +// rounded to 24 bits of precision +// d). calculate partial remainders (using both q and q-ulp); +// select one and RZ(a/b) based on the sign of |a|-|b|*q +// e). if the exponent difference (exponent(a)-exponent(b)) +// is less than 24 (quotient estimate<2^{24}-2), use RZ(a/b) +// and sticky bits to round to integer; exit loop and +// calculate final remainder +// f). if exponent(a)-exponent(b)>=24, select new value of a as +// the partial remainder calculated using RZ(a/b); +// repeat from c). +// +// Special cases +//==================================================================== +// a=+/- Inf, or b=+/-0: return NaN, call libm_error_support +// a=NaN or b=NaN: return NaN +// +// Registers used +//==================================================================== +// Predicate registers: p6-p12 +// General registers: r2,r3,r28,r29,r32 (ar.pfs), r33-r39 +// Floating point registers: f6-f15 +// + +GR_SAVE_B0 = r33 +GR_SAVE_PFS = r34 +GR_SAVE_GP = r35 +GR_SAVE_SP = r36 + +GR_Parameter_X = r37 +GR_Parameter_Y = r38 +GR_Parameter_RESULT = r39 +GR_Parameter_TAG = r40 + +FR_X = f10 +FR_Y = f9 +FR_RESULT = f8 + + +.section .text +GLOBAL_IEEE754_ENTRY(remainderf) + +// inputs in f8, f9 +// result in f8 + +{ .mfi + alloc r32=ar.pfs,1,4,4,0 + // f13=|a| + fmerge.s f13=f0,f8 + nop.i 0 +} + {.mfi + nop.m 0 + // f14=|b| + fmerge.s f14=f0,f9 + nop.i 0;; +} + {.mlx + nop.m 0 + // r2=2^{24}-2 + movl r3=0x4b7ffffe;; +} + +// Y +-NAN, +-inf, +-0? p11 +{ .mfi + nop.m 999 + fclass.m.unc p11,p0 = f9, 0xe7 + nop.i 999 +} +// qnan snan inf norm unorm 0 -+ +// 1 1 1 0 0 0 11 +// e 3 +// X +-NAN, +-inf, ? p9 +{ .mfi + nop.m 999 + fclass.m.unc p9,p0 = f8, 0xe3 + nop.i 999;; +} + +{.mfi + nop.m 0 + mov f15=f0 + nop.i 0 +} +{ .mfi + // set p7=1 + cmp.eq.unc p7,p0=r0,r0 + // Step (1) + // y0 = 1 / b in f10 + frcpa.s1 f10,p6=f13,f14 + nop.i 0;; +} +{.bbb + (p9) br.cond.spnt FREM_X_NAN_INF + (p11) br.cond.spnt FREM_Y_NAN_INF_ZERO + nop.b 0 +} {.mfi + nop.m 0 + // set D flag if a (f8) is denormal + fnma.s0 f6=f8,f1,f8 + nop.i 0;; +} + +.align 32 +remloop24: + { .mfi + // f12=2^{24}-2 + setf.s f12=r3 + // Step (2) + // q0 = a * y0 in f15 + (p6) fma.s1 f15=f13,f10,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + // Step (3) + // e0 = 1 - b * y0 in f7 + (p6) fnma.s1 f7=f14,f10,f1 + nop.i 0;; +} +{.mlx + nop.m 0 + // r2=1.25*2^{-24} + movl r2=0x33a00000;; +} + { .mfi + nop.m 0 + // Step (4) + // q1 = q0 + e0 * q0 in f6 + (p6) fma.s1 f6=f7,f15,f15 + nop.i 0 +} +{ .mfi + nop.m 0 + // Step (5) + // e1 = e0 * e0 in f7 + (p6) fma.s1 f7=f7,f7,f0 + nop.i 0;; +} + {.mii + (p7) getf.exp r29=f15 + (p7) mov r28=0xfffd + nop.i 0;; +} + + { .mfi + // f15=1.25*2^{-24} + setf.s f15=r2 + // Step (6) + // q2 = q1 + e1 * q1 in f6 + (p6) fma.s1 f6=f7,f6,f6 + nop.i 0 +} +{ .mfi + mov r2=0x3e7 + // Step (7) + // e2 = e1 * e1 in f7 + (p6) fma.s1 f7=f7,f7,f0 + nop.i 0;; +} + + {.mmi + // q<1/4 ? (i.e. expon< -2) + (p7) cmp.gt.unc p7,p0=r28,r29 + nop.m 0 + // r2=0x3e7000000 + shl r2=r2,24;; +} + +{.mfb + // r2=0x3e7000001 + add r2=1,r2 + // if |a/b|<1/4, set D flag before returning + (p7) fma.s.s0 f9=f9,f0,f8 + nop.b 0;; +} + {.mfb + nop.m 0 + // can be combined with bundle above if sign of 0 or + // FTZ enabled are not important + (p7) fmerge.s f8=f8,f9 + // return if |a|<4*|b| (estimated quotient < 1/4) + (p7) br.ret.spnt b0;; +} + {.mfi + nop.m 0 + // set f8 to current a value | sign + fmerge.s f8=f8,f13 + // r2=2^{-24}+2^{-48} (double prec.) + shl r2=r2,28;; +} + + +{ .mfi + // r29= -32+bias + mov r29=0xffdf + // Step (8) + // q3 = q2 + e2 * q2 in f6 + (p6) fma.d.s1 f6=f7,f6,f6 + nop.i 0;; +} +{ .mfi + nop.m 0 + // Step (9) + // q = q3 in f11 + (p6) fma.s.s1 f11=f6,f1,f0 + nop.i 0;; +} + {.mfi + // f7=2^{-24} + setf.d f7=r2 + // last step ? (q3<2^{24}-2 --> q<2^{24}) + fcmp.lt.unc.s1 p0,p12=f6,f12 + nop.i 0 +} {.mfi + // f12=2^{-32} + setf.exp f12=r29 + nop.f 0 + nop.i 0;; +} + {.mfi + nop.m 0 + // r=a-b*q + fnma.s1 f6=f14,f11,f13 + nop.i 0 +} +{.mfi + nop.m 0 + // q'=q-q*(1.25*2^{-24}) (q'=q-ulp) + fnma.s.s1 f15=f11,f15,f11 + nop.i 0;; +} + + {.mfi + nop.m 0 + // r2=a-b*q' + fnma.s1 f13=f14,f15,f13 + nop.i 0;; +} + {.mfi + nop.m 0 + // r>0 iff q=RZ(a/b) and inexact + fcmp.gt.unc.s1 p8,p0=f6,f0 + nop.i 0 +} +{.mfi + nop.m 0 + // r<0 iff q'=RZ(a/b) and inexact + fcmp.lt.unc.s1 p9,p10=f6,f0 + nop.i 0;; +} +.pred.rel "mutex",p8,p9 + {.mfi + nop.m 0 + // (p8) Q=q+(last iteration ? sticky bits:0) + // i.e. Q=q+q*x (x=2^{-32} or 0) + (p8) fma.s1 f11=f11,f12,f11 + nop.i 0 +} +{.mfi + nop.m 0 + // (p9) Q=q'+(last iteration ? sticky bits:0) + // i.e. Q=q'+q'*x (x=2^{-24} or 0: if expon. difference=23, want to round back to q) + (p9) fma.s1 f11=f15,f7,f15 + nop.i 0;; +} + + {.mfb + nop.m 0 + // (p9) set r=r2 (new a, if not last iteration) + // (p10) new a =r + (p10) mov f13=f6 + (p12) br.cond.sptk remloop24;; +} + +// last iteration + {.mfi + nop.m 0 + // set f9=|b|*sgn(a) + fmerge.s f9=f8,f9 + nop.i 0 +} + {.mfi + nop.m 0 + // round to integer + fcvt.fx.s1 f11=f11 + nop.i 0;; +} + {.mfi + nop.m 0 + // save sign of a + fmerge.s f7=f8,f8 + nop.i 0 +} +{.mfi + nop.m 0 + // normalize + fcvt.xf f11=f11 + nop.i 0;; +} + {.mfi + nop.m 0 + // This can be removed if sign of 0 is not important + // get remainder using sf1 + fnma.s.s1 f12=f9,f11,f8 + nop.i 0 +} + {.mfi + nop.m 0 + // get remainder + fnma.s.s0 f8=f9,f11,f8 + nop.i 0;; +} + + + + {.mfi + nop.m 0 + // f12=0? + // This can be removed if sign of 0 is not important + fcmp.eq.unc.s1 p8,p0=f12,f0 + nop.i 0;; +} + {.mfb + nop.m 0 + // if f8=0, set sign correctly + // This can be removed if sign of 0 is not important + (p8) fmerge.s f8=f7,f8 + // return + br.ret.sptk b0;; +} + + +FREM_X_NAN_INF: + +// Y zero ? +{.mfi + nop.m 0 + fma.s1 f10=f9,f1,f0 + nop.i 0;; +} +{.mfi + nop.m 0 + fcmp.eq.unc.s1 p11,p0=f10,f0 + nop.i 0;; +} +{.mib + nop.m 0 + nop.i 0 + // if Y zero + (p11) br.cond.spnt FREM_Y_ZERO;; +} + +// X infinity? Return QNAN indefinite +{ .mfi + nop.m 999 + fclass.m.unc p8,p0 = f8, 0x23 + nop.i 999 +} +// X infinity? Return QNAN indefinite +{ .mfi + nop.m 999 + fclass.m.unc p11,p0 = f8, 0x23 + nop.i 999;; +} +// Y NaN ? +{.mfi + nop.m 999 +(p8) fclass.m.unc p0,p8=f9,0xc3 + nop.i 0;; +} +{.mfi + nop.m 999 + // also set Denormal flag if necessary +(p8) fma.s0 f9=f9,f1,f0 + nop.i 0 +} +{ .mfi + nop.m 999 +(p8) frcpa.s0 f8,p7 = f8,f8 + nop.i 999 ;; +} + +{.mfi + nop.m 999 +(p11) mov f10=f8 + nop.i 0 +} +{ .mfi + nop.m 999 +(p8) fma.s.s0 f8=f8,f1,f0 + nop.i 0 ;; +} + +{ .mfb + nop.m 999 + frcpa.s0 f8,p7=f8,f9 + (p11) br.cond.spnt EXP_ERROR_RETURN;; +} +{ .mib + nop.m 0 + nop.i 0 + br.ret.spnt b0 ;; +} + + +FREM_Y_NAN_INF_ZERO: + +// Y INF +{ .mfi + nop.m 999 + fclass.m.unc p7,p0 = f9, 0x23 + nop.i 999 ;; +} + +{ .mfb + nop.m 999 +(p7) fma.s.s0 f8=f8,f1,f0 +(p7) br.ret.spnt b0 ;; +} + +// Y NAN? +{ .mfi + nop.m 999 + fclass.m.unc p9,p0 = f9, 0xc3 + nop.i 999 ;; +} + +{ .mfb + nop.m 999 +(p9) fma.s.s0 f8=f9,f1,f0 +(p9) br.ret.spnt b0 ;; +} + +FREM_Y_ZERO: +// Y zero? Must be zero at this point +// because it is the only choice left. +// Return QNAN indefinite + +// X NAN? +{ .mfi + nop.m 999 + fclass.m.unc p9,p10 = f8, 0xc3 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p10) fclass.nm p9,p10 = f8, 0xff + nop.i 999 ;; +} + +{.mfi + nop.m 999 + (p9) frcpa.s0 f11,p7=f8,f0 + nop.i 0;; +} + +{ .mfi + nop.m 999 +(p10) frcpa.s0 f11,p7 = f0,f0 +nop.i 999;; +} + +{ .mfi + nop.m 999 + fmerge.s f10 = f8, f8 + nop.i 999 +} + +{ .mfi + nop.m 999 + fma.s.s0 f8=f11,f1,f0 + nop.i 999 +} + + +EXP_ERROR_RETURN: + +{ .mib + mov GR_Parameter_TAG = 125 + nop.i 999 + br.sptk __libm_error_region;; +} + +GLOBAL_IEEE754_END(remainderf) + + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfs [GR_Parameter_Y] = FR_Y,16 // Save Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; +.body +{ .mib + stfs [GR_Parameter_X] = FR_X // Store Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y + nop.b 0 // Parameter 3 address +} +{ .mib + stfs [GR_Parameter_Y] = FR_RESULT // Store Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support#;; // Call error handling function +} +{ .mmi + nop.m 0 + nop.m 0 + add GR_Parameter_RESULT = 48,sp +};; +{ .mmi + ldfs f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) + + +.type __libm_error_support#,@function +.global __libm_error_support# + + + diff --git a/sysdeps/ia64/fpu/e_remainderl.S b/sysdeps/ia64/fpu/e_remainderl.S new file mode 100644 index 0000000000..8c1630e3ab --- /dev/null +++ b/sysdeps/ia64/fpu/e_remainderl.S @@ -0,0 +1,617 @@ +.file "remainderl.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//==================================================================== +// 02/02/00 Initial version +// 03/02/00 New algorithm +// 04/04/00 Unwind support added +// 07/21/00 Fixed quotient=2^{24*m+23}*1.q1...q23 1 bug +// 08/15/00 Bundle added after call to __libm_error_support to properly +// set [the previously overwritten] GR_Parameter_RESULT. +// 11/29/00 Set FR_Y to f9 +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// +// API +//==================================================================== +// long double remainderl(long double,long double); +// +// Overview of operation +//==================================================================== +// remainder(a,b)=a-i*b, +// where i is an integer such that, if b!=0 and a is finite, +// |a/b-i|<=1/2. If |a/b-i|=1/2, i is even. +// +// Algorithm +//==================================================================== +// a). eliminate special cases +// b). if |a/b|<0.25 (first quotient estimate), return a +// c). use single precision divide algorithm to get quotient q +// rounded to 24 bits of precision +// d). calculate partial remainders (using both q and q-ulp); +// select one and RZ(a/b) based on the sign of |a|-|b|*q +// e). if the exponent difference (exponent(a)-exponent(b)) +// is less than 24 (quotient estimate<2^{24}-2), use RZ(a/b) +// and sticky bits to round to integer; exit loop and +// calculate final remainder +// f). if exponent(a)-exponent(b)>=24, select new value of a as +// the partial remainder calculated using RZ(a/b); +// repeat from c). +// +// Special cases +//==================================================================== +// a=+/- Inf, or b=+/-0: return NaN, call libm_error_support +// a=NaN or b=NaN: return NaN +// +// Registers used +//==================================================================== +// Predicate registers: p6-p14 +// General registers: r2,r3,r28,r29,r32 (ar.pfs), r33-r39 +// Floating point registers: f6-f15,f32 +// + +GR_SAVE_B0 = r33 +GR_SAVE_PFS = r34 +GR_SAVE_GP = r35 +GR_SAVE_SP = r36 + +GR_Parameter_X = r37 +GR_Parameter_Y = r38 +GR_Parameter_RESULT = r39 +GR_Parameter_TAG = r40 + +FR_X = f10 +FR_Y = f9 +FR_RESULT = f8 + + +.section .text +GLOBAL_IEEE754_ENTRY(remainderl) + +// inputs in f8, f9 +// result in f8 + +{ .mfi + alloc r32=ar.pfs,1,4,4,0 + // f13=|a| + fmerge.s f13=f0,f8 + nop.i 0 +} + {.mfi + getf.sig r29=f9 + // f14=|b| + fmerge.s f14=f0,f9 + nop.i 0;; +} + {.mlx + mov r28=0x2ffdd + // r2=2^{23} + movl r3=0x4b000000;; +} + + +{.mmi +setf.exp f32=r28 +nop.m 0 +// y pseudo-zero ? +cmp.eq p11,p10=r29,r0;; +} + +// Y +-NAN, +-inf, +-0? p11 +{ .mfi + nop.m 999 +(p10) fclass.m p11,p10 = f9, 0xe7 + nop.i 999 +} +// qnan snan inf norm unorm 0 -+ +// 1 1 1 0 0 0 11 +// e 3 +// X +-NAN, +-inf, ? p9 +{ .mfi + nop.m 999 + fclass.m.unc p9,p8 = f8, 0xe3 + nop.i 999;; +} + +{.mfi + nop.m 0 + mov f12=f0 + nop.i 0 +} +{ .mfi + // set p7=1 + cmp.eq.unc p7,p0=r0,r0 + // Step (1) + // y0 = 1 / b in f10 + frcpa.s1 f10,p6=f13,f14 + nop.i 0;; +} +// Y +-NAN, +-inf, +-0? p11 +{ .mfi + nop.m 999 + // pseudo-NaN ? +(p10) fclass.nm p11,p0 = f9, 0xff + nop.i 999 +} + +// qnan snan inf norm unorm 0 -+ +// 1 1 1 0 0 0 11 +// e 3 +// X +-NAN, +-inf, ? p9 + +{ .mfi + nop.m 999 +(p8) fclass.nm p9,p0 = f8, 0xff + nop.i 999;; +} + +{.bbb + (p9) br.cond.spnt FREM_X_NAN_INF + (p11) br.cond.spnt FREM_Y_NAN_INF_ZERO + nop.b 0 +} {.mfi + nop.m 0 + // set D flag if a (f8) is denormal + fnma.s0 f6=f8,f1,f8 + nop.i 0;; +} + +remloop24: + { .mfi + nop.m 0 + // Step (2) + // q0 = a * y0 in f15 + (p6) fma.s1 f12=f13,f10,f0 + nop.i 0 +} { .mfi + nop.m 0 + // Step (3) + // e0 = 1 - b * y0 in f7 + (p6) fnma.s1 f7=f14,f10,f1 + nop.i 0;; +} {.mlx + nop.m 0 + // r2=1.25*2^{-24} + movl r2=0x33a00000;; +} + +{.mfi + nop.m 0 + // q1=q0*(1+e0) + (p6) fma.s1 f15=f12,f7,f12 + nop.i 0 +} +{ .mfi + nop.m 0 + // Step (4) + // e1 = e0 * e0 + E in f7 + (p6) fma.s1 f7=f7,f7,f32 + nop.i 0;; +} + {.mii + (p7) getf.exp r29=f12 + (p7) mov r28=0xfffd + nop.i 0;; +} + + { .mfi + // f12=2^{23} + setf.s f12=r3 + // Step (5) + // q2 = q1 + e1 * q1 in f11 + (p6) fma.s.s1 f11=f7,f15,f15 + nop.i 0 +} { .mfi + nop.m 0 + // Step (6) + // q2 = q1 + e1 * q1 in f6 + (p6) fma.s1 f6=f7,f15,f15 + nop.i 0;; +} + + {.mmi + // f15=1.25*2^{-24} + setf.s f15=r2 + // q<1/4 ? (i.e. expon< -2) + (p7) cmp.gt p7,p0=r28,r29 + nop.i 0;; +} + +{.mfb + // r29= -32+bias + mov r29=0xffdf + // if |a/b|<1/4, set D flag before returning + (p7) fma.s0 f9=f9,f0,f8 + nop.b 0;; +} + {.mfb + nop.m 0 + // can be combined with bundle above if sign of 0 or + // FTZ enabled are not important + (p7) fmerge.s f8=f8,f9 + // return if |a|<4*|b| (estimated quotient < 1/4) + (p7) br.ret.spnt b0;; +} + {.mfi + // f7=2^{-32} + setf.exp f7=r29 + // set f8 to current a value | sign + fmerge.s f8=f8,f13 + nop.i 0;; +} + {.mfi + getf.exp r28=f6 + // last step ? (q<2^{23}) + fcmp.lt.unc.s1 p0,p12=f6,f12 + nop.i 0;; +} + {.mfi + nop.m 0 + // r=a-b*q + fnma.s1 f6=f14,f11,f13 + nop.i 0 +} {.mfi + // r2=23+bias + mov r2=0xffff+23 + // q'=q-q*(1.25*2^{-24}) (q'=q-ulp) + fnma.s.s1 f15=f11,f15,f11 + nop.i 0;; +} + {.mmi + nop.m 0 + cmp.eq p11,p14=r2,r28 + nop.i 0;; +} + +.pred.rel "mutex",p11,p14 + {.mfi + nop.m 0 + // if exp_q=2^23, then r=a-b*2^{23} + (p11) fnma.s1 f13=f12,f14,f13 + nop.i 0 +} +{.mfi + nop.m 0 + // r2=a-b*q' + (p14) fnma.s1 f13=f14,f15,f13 + nop.i 0;; +} + {.mfi + nop.m 0 + // r>0 iff q=RZ(a/b) and inexact + fcmp.gt.unc.s1 p8,p0=f6,f0 + nop.i 0 +} {.mfi + nop.m 0 + // r<0 iff q'=RZ(a/b) and inexact + (p14) fcmp.lt.unc.s1 p9,p10=f6,f0 + nop.i 0;; +} + +.pred.rel "mutex",p8,p9 + {.mfi + nop.m 0 + // (p8) Q=q+(last iteration ? sticky bits:0) + // i.e. Q=q+q*x (x=2^{-32} or 0) + (p8) fma.s1 f11=f11,f7,f11 + nop.i 0 +} {.mfi + nop.m 0 + // (p9) Q=q'+(last iteration ? sticky bits:0) + // i.e. Q=q'+q'*x (x=2^{-32} or 0) + (p9) fma.s1 f11=f15,f7,f15 + nop.i 0;; +} + + {.mfb + nop.m 0 + // (p9) set r=r2 (new a, if not last iteration) + // (p10) new a =r + (p10) mov f13=f6 + (p12) br.cond.sptk remloop24;; +} + +// last iteration + {.mfi + nop.m 0 + // set f9=|b|*sgn(a) + fmerge.s f9=f8,f9 + nop.i 0 +} + {.mfi + nop.m 0 + // round to integer + fcvt.fx.s1 f11=f11 + nop.i 0;; +} + {.mfi + nop.m 0 + // save sign of a + fmerge.s f7=f8,f8 + nop.i 0 +} {.mfi + nop.m 0 + // normalize + fcvt.xf f11=f11 + nop.i 0;; +} + {.mfi + nop.m 0 + // This can be removed if sign of 0 is not important + // get remainder using sf1 + fnma.s1 f12=f9,f11,f8 + nop.i 0 +} + {.mfi + nop.m 0 + // get remainder + fnma.s0 f8=f9,f11,f8 + nop.i 0;; +} + {.mfi + nop.m 0 + // f12=0? + // This can be removed if sign of 0 is not important + fcmp.eq.unc.s1 p8,p0=f12,f0 + nop.i 0;; +} + {.mfb + nop.m 0 + // if f8=0, set sign correctly + // This can be removed if sign of 0 is not important + (p8) fmerge.s f8=f7,f8 + // return + br.ret.sptk b0;; +} + + + +FREM_X_NAN_INF: + +// Y zero ? +{.mfi + nop.m 0 + fma.s1 f10=f9,f1,f0 + nop.i 0;; +} +{.mfi + nop.m 0 + fcmp.eq.unc.s1 p11,p0=f10,f0 + nop.i 0;; +} +{.mib + nop.m 0 + nop.i 0 + // if Y zero + (p11) br.cond.spnt FREM_Y_ZERO;; +} + +// X infinity? Return QNAN indefinite +{ .mfi + nop.m 999 + fclass.m.unc p8,p0 = f8, 0x23 + nop.i 999 +} +// X infinity? Return QNAN indefinite +{ .mfi + nop.m 999 + fclass.m.unc p11,p0 = f8, 0x23 + nop.i 999;; +} +// Y NaN ? +{.mfi + nop.m 999 +(p8) fclass.m.unc p0,p8=f9,0xc3 + nop.i 0;; +} +{.mfi + nop.m 999 + // also set Denormal flag if necessary +(p8) fnma.s0 f9=f9,f1,f9 + nop.i 0 +} +{ .mfi + nop.m 999 +(p8) frcpa.s0 f8,p7 = f8,f8 + nop.i 999 ;; +} + +{.mfi + nop.m 999 +(p11) mov f10=f8 + nop.i 0 +} +{ .mfi + nop.m 999 +(p8) fma.s0 f8=f8,f1,f0 + nop.i 0 ;; +} + +{ .mfb + nop.m 999 + frcpa.s0 f8,p7=f8,f9 + (p11) br.cond.spnt EXP_ERROR_RETURN;; +} +{ .mib + nop.m 0 + nop.i 0 + br.ret.spnt b0 ;; +} + + +FREM_Y_NAN_INF_ZERO: +// Y INF +{ .mfi + nop.m 999 + fclass.m.unc p7,p0 = f9, 0x23 + nop.i 999 ;; +} + +{ .mfb + nop.m 999 +(p7) fma.s0 f8=f8,f1,f0 +(p7) br.ret.spnt b0 ;; +} + +// Y NAN? +{ .mfi + nop.m 999 + fclass.m.unc p9,p10 = f9, 0xc3 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p10) fclass.nm p9,p0 = f9, 0xff + nop.i 999 ;; +} + +{ .mfb + nop.m 999 +(p9) fma.s0 f8=f9,f1,f0 +(p9) br.ret.spnt b0 ;; +} + +FREM_Y_ZERO: +// Y zero? Must be zero at this point +// because it is the only choice left. +// Return QNAN indefinite + +// X NAN? +{ .mfi + nop.m 999 + fclass.m.unc p9,p10 = f8, 0xc3 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p10) fclass.nm p9,p10 = f8, 0xff + nop.i 999 ;; +} + +{.mfi + nop.m 999 + (p9) frcpa.s0 f11,p7=f8,f0 + nop.i 0;; +} +{ .mfi + nop.m 999 +(p10) frcpa.s0 f11,p7 = f0,f0 + nop.i 999;; +} + +{ .mfi + nop.m 999 + fmerge.s f10 = f8, f8 + nop.i 999 +} + +{ .mfi + nop.m 999 + fma.s0 f8=f11,f1,f0 + nop.i 999;; +} + +EXP_ERROR_RETURN: + +{ .mib + mov GR_Parameter_TAG = 123 + nop.i 999 + br.sptk __libm_error_region;; +} + +GLOBAL_IEEE754_END(remainderl) + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfe [GR_Parameter_Y] = FR_Y,16 // Save Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; +.body +{ .mib + stfe [GR_Parameter_X] = FR_X // Store Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y + nop.b 0 // Parameter 3 address +} +{ .mib + stfe [GR_Parameter_Y] = FR_RESULT // Store Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + nop.m 0 + nop.m 0 + add GR_Parameter_RESULT = 48,sp +};; +{ .mmi + ldfe f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) + + +.type __libm_error_support#,@function +.global __libm_error_support# + + + + diff --git a/sysdeps/ia64/fpu/e_scalb.S b/sysdeps/ia64/fpu/e_scalb.S new file mode 100644 index 0000000000..3d48aab189 --- /dev/null +++ b/sysdeps/ia64/fpu/e_scalb.S @@ -0,0 +1,599 @@ +.file "scalb.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 01/26/01 Scalb completely reworked and now standalone version +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// 08/06/03 Improved performance +// +// API +//============================================================== +// double = scalb (double x, double n) +// input floating point f8 and floating point f9 +// output floating point f8 +// +// int_type = 0 if int is 32 bits +// int_type = 1 if int is 64 bits +// +// Returns x* 2**n using an fma and detects overflow +// and underflow. +// +// +// Strategy: +// Compute biased exponent of result exp_Result = N + exp_X +// Break into ranges: +// exp_Result > 0x103fe -> Certain overflow +// exp_Result = 0x103fe -> Possible overflow +// 0x0fc01 <= exp_Result < 0x103fe -> No over/underflow (main path) +// 0x0fc01 - 52 <= exp_Result < 0x0fc01 -> Possible underflow +// exp_Result < 0x0fc01 - 52 -> Certain underflow + +FR_Big = f6 +FR_NBig = f7 +FR_Floating_X = f8 +FR_Result = f8 +FR_Floating_N = f9 +FR_Result2 = f9 +FR_Result3 = f10 +FR_Norm_X = f11 +FR_Two_N = f12 +FR_N_float_int = f13 +FR_Norm_N = f14 + +GR_neg_ov_limit= r14 +GR_big_exp = r14 +GR_N_Biased = r15 +GR_Big = r16 +GR_exp_Result = r18 +GR_pos_ov_limit= r19 +GR_exp_sure_ou = r19 +GR_Bias = r20 +GR_N_as_int = r21 +GR_signexp_X = r22 +GR_exp_X = r23 +GR_exp_mask = r24 +GR_max_exp = r25 +GR_min_exp = r26 +GR_min_den_exp = r27 +GR_Scratch = r28 +GR_signexp_N = r29 +GR_exp_N = r30 + +GR_SAVE_B0 = r32 +GR_SAVE_GP = r33 +GR_SAVE_PFS = r34 +GR_Parameter_X = r35 +GR_Parameter_Y = r36 +GR_Parameter_RESULT = r37 +GR_Tag = r38 + +.section .text +GLOBAL_IEEE754_ENTRY(scalb) + +// +// Is x NAN, INF, ZERO, +-? +// Build the exponent Bias +// +{ .mfi + getf.exp GR_signexp_N = FR_Floating_N // Get signexp of n + fclass.m p6,p0 = FR_Floating_X, 0xe7 // @snan | @qnan | @inf | @zero + mov GR_Bias = 0x0ffff +} +{ .mfi + mov GR_Big = 35000 // If N this big then certain overflow + fcvt.fx.trunc.s1 FR_N_float_int = FR_Floating_N // Get N in significand + nop.i 0 +} +;; + +{ .mfi + getf.exp GR_signexp_X = FR_Floating_X // Get signexp of x + fclass.m p7,p0 = FR_Floating_N, 0x0b // Test for n=unorm + nop.i 0 +} +// +// Normalize n +// +{ .mfi + mov GR_exp_mask = 0x1ffff // Exponent mask + fnorm.s1 FR_Norm_N = FR_Floating_N + nop.i 0 +} +;; + +// +// Is n NAN, INF, ZERO, +-? +// +{ .mfi + mov GR_big_exp = 0x1003e // Exponent at which n is integer + fclass.m p9,p0 = FR_Floating_N, 0xe7 // @snan | @qnan | @inf | @zero + mov GR_max_exp = 0x103fe // Exponent of maximum double +} +// +// Normalize x +// +{ .mfb + nop.m 0 + fnorm.s1 FR_Norm_X = FR_Floating_X +(p7) br.cond.spnt SCALB_N_UNORM // Branch if n=unorm +} +;; + +SCALB_COMMON1: +// Main path continues. Also return here from u=unorm path. +// Handle special cases if x = Nan, Inf, Zero +{ .mfb + nop.m 0 + fcmp.lt.s1 p7,p0 = FR_Floating_N, f0 // Test N negative +(p6) br.cond.spnt SCALB_NAN_INF_ZERO +} +;; + +// Handle special cases if n = Nan, Inf, Zero +{ .mfi + getf.sig GR_N_as_int = FR_N_float_int // Get n from significand + fclass.m p8,p0 = FR_Floating_X, 0x0b // Test for x=unorm + mov GR_exp_sure_ou = 0x1000e // Exp_N where x*2^N sure over/under +} +{ .mfb + mov GR_min_exp = 0x0fc01 // Exponent of minimum double + fcvt.xf FR_N_float_int = FR_N_float_int // Convert N to FP integer +(p9) br.cond.spnt SCALB_NAN_INF_ZERO +} +;; + +{ .mmi + and GR_exp_N = GR_exp_mask, GR_signexp_N // Get exponent of N +(p7) sub GR_Big = r0, GR_Big // Limit for N + nop.i 0 +} +;; + +{ .mib + cmp.lt p9,p0 = GR_exp_N, GR_big_exp // N possible non-integer? + cmp.ge p6,p0 = GR_exp_N, GR_exp_sure_ou // N certain over/under? +(p8) br.cond.spnt SCALB_X_UNORM // Branch if x=unorm +} +;; + +SCALB_COMMON2: +// Main path continues. Also return here from x=unorm path. +// Create biased exponent for 2**N +{ .mmi +(p6) mov GR_N_as_int = GR_Big // Limit N +;; + add GR_N_Biased = GR_Bias,GR_N_as_int + nop.i 0 +} +;; + +{ .mfi + setf.exp FR_Two_N = GR_N_Biased // Form 2**N +(p9) fcmp.neq.unc.s1 p9,p0 = FR_Norm_N, FR_N_float_int // Test if N an integer + and GR_exp_X = GR_exp_mask, GR_signexp_X // Get exponent of X +} +;; + +// +// Compute biased result exponent +// Branch if N is not an integer +// +{ .mib + add GR_exp_Result = GR_exp_X, GR_N_as_int + mov GR_min_den_exp = 0x0fc01 - 52 // Exponent of min denorm dble +(p9) br.cond.spnt SCALB_N_NOT_INT +} +;; + +// +// Raise Denormal operand flag with compare +// Do final operation +// +{ .mfi + cmp.lt p7,p6 = GR_exp_Result, GR_max_exp // Test no overflow + fcmp.ge.s0 p0,p11 = FR_Floating_X,FR_Floating_N // Dummy to set denorm + cmp.lt p9,p0 = GR_exp_Result, GR_min_den_exp // Test sure underflow +} +{ .mfb + nop.m 0 + fma.d.s0 FR_Result = FR_Two_N,FR_Norm_X,f0 +(p9) br.cond.spnt SCALB_UNDERFLOW // Branch if certain underflow +} +;; + +{ .mib +(p6) cmp.gt.unc p6,p8 = GR_exp_Result, GR_max_exp // Test sure overflow +(p7) cmp.ge.unc p7,p9 = GR_exp_Result, GR_min_exp // Test no over/underflow +(p7) br.ret.sptk b0 // Return from main path +} +;; + +{ .bbb +(p6) br.cond.spnt SCALB_OVERFLOW // Branch if certain overflow +(p8) br.cond.spnt SCALB_POSSIBLE_OVERFLOW // Branch if possible overflow +(p9) br.cond.spnt SCALB_POSSIBLE_UNDERFLOW // Branch if possible underflow +} +;; + +// Here if possible underflow. +// Resulting exponent: 0x0fc01-52 <= exp_Result < 0x0fc01 +SCALB_POSSIBLE_UNDERFLOW: +// +// Here if possible overflow. +// Resulting exponent: 0x103fe = exp_Result +SCALB_POSSIBLE_OVERFLOW: + +// Set up necessary status fields +// +// S0 user supplied status +// S2 user supplied status + WRE + TD (Overflows) +// S3 user supplied status + FZ + TD (Underflows) +// +{ .mfi + mov GR_pos_ov_limit = 0x103ff // Exponent for positive overflow + fsetc.s3 0x7F,0x41 + nop.i 0 +} +{ .mfi + mov GR_neg_ov_limit = 0x303ff // Exponent for negative overflow + fsetc.s2 0x7F,0x42 + nop.i 0 +} +;; + +// +// Do final operation with s2 and s3 +// +{ .mfi + setf.exp FR_NBig = GR_neg_ov_limit + fma.d.s3 FR_Result3 = FR_Two_N,FR_Norm_X,f0 + nop.i 0 +} +{ .mfi + setf.exp FR_Big = GR_pos_ov_limit + fma.d.s2 FR_Result2 = FR_Two_N,FR_Norm_X,f0 + nop.i 0 +} +;; + +// Check for overflow or underflow. +// Restore s3 +// Restore s2 +// +{ .mfi + nop.m 0 + fsetc.s3 0x7F,0x40 + nop.i 0 +} +{ .mfi + nop.m 0 + fsetc.s2 0x7F,0x40 + nop.i 0 +} +;; + +// +// Is the result zero? +// +{ .mfi + nop.m 0 + fclass.m p6, p0 = FR_Result3, 0x007 + nop.i 0 +} +{ .mfi + nop.m 0 + fcmp.ge.s1 p7, p8 = FR_Result2 , FR_Big + nop.i 0 +} +;; + +// +// Detect masked underflow - Tiny + Inexact Only +// +{ .mfi + nop.m 0 +(p6) fcmp.neq.unc.s1 p6, p0 = FR_Result , FR_Result2 + nop.i 0 +} +;; + +// +// Is result bigger the allowed range? +// Branch out for underflow +// +{ .mfb + nop.m 0 +(p8) fcmp.le.unc.s1 p9, p10 = FR_Result2 , FR_NBig +(p6) br.cond.spnt SCALB_UNDERFLOW +} +;; + +// +// Branch out for overflow +// +{ .bbb +(p7) br.cond.spnt SCALB_OVERFLOW +(p9) br.cond.spnt SCALB_OVERFLOW + br.ret.sptk b0 // Return from main path. +} +;; + +// Here if result overflows +SCALB_OVERFLOW: +{ .mib + alloc r32=ar.pfs,3,0,4,0 + addl GR_Tag = 53, r0 // Set error tag for overflow + br.cond.sptk __libm_error_region // Call error support for overflow +} +;; + +// Here if result underflows +SCALB_UNDERFLOW: +{ .mib + alloc r32=ar.pfs,3,0,4,0 + addl GR_Tag = 54, r0 // Set error tag for underflow + br.cond.sptk __libm_error_region // Call error support for underflow +} +;; + +SCALB_NAN_INF_ZERO: + +// +// Before entry, N has been converted to a fp integer in significand of +// FR_N_float_int +// +// Convert N_float_int to floating point value +// +{ .mfi + getf.sig GR_N_as_int = FR_N_float_int + fclass.m p6,p0 = FR_Floating_N, 0xc3 //@snan | @qnan + nop.i 0 +} +{ .mfi + addl GR_Scratch = 1,r0 + fcvt.xf FR_N_float_int = FR_N_float_int + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fclass.m p7,p0 = FR_Floating_X, 0xc3 //@snan | @qnan + shl GR_Scratch = GR_Scratch,63 +} +;; + +{ .mfi + nop.m 0 + fclass.m p8,p0 = FR_Floating_N, 0x21 // @inf + nop.i 0 +} +{ .mfi + nop.m 0 + fclass.m p9,p0 = FR_Floating_N, 0x22 // @-inf + nop.i 0 +} +;; + +// +// Either X or N is a Nan, return result and possible raise invalid. +// +{ .mfb + nop.m 0 +(p6) fma.d.s0 FR_Result = FR_Floating_N,FR_Floating_X,f0 +(p6) br.ret.spnt b0 +} +;; + +{ .mfb + nop.m 0 +(p7) fma.d.s0 FR_Result = FR_Floating_N,FR_Floating_X,f0 +(p7) br.ret.spnt b0 +} +;; + +// +// If N + Inf do something special +// For N = -Inf, create Int +// +{ .mfb + nop.m 0 +(p8) fma.d.s0 FR_Result = FR_Floating_X, FR_Floating_N,f0 +(p8) br.ret.spnt b0 +} +{ .mfi + nop.m 0 +(p9) fnma.d.s0 FR_Floating_N = FR_Floating_N, f1, f0 + nop.i 0 +} +;; + +// +// If N==-Inf,return x/(-N) +// +{ .mfb + cmp.ne p7,p0 = GR_N_as_int,GR_Scratch +(p9) frcpa.s0 FR_Result,p0 = FR_Floating_X,FR_Floating_N +(p9) br.ret.spnt b0 +} +;; + +// +// Is N an integer. +// +{ .mfi + nop.m 0 +(p7) fcmp.neq.unc.s1 p7,p0 = FR_Norm_N, FR_N_float_int + nop.i 0 +} +;; + +// +// If N not an int, return NaN and raise invalid. +// +{ .mfb + nop.m 0 +(p7) frcpa.s0 FR_Result,p0 = f0,f0 +(p7) br.ret.spnt b0 +} +;; + +// +// Always return x in other path. +// +{ .mfb + nop.m 0 + fma.d.s0 FR_Result = FR_Floating_X,f1,f0 + br.ret.sptk b0 +} +;; + +// Here if n not int +// Return NaN and raise invalid. +SCALB_N_NOT_INT: +{ .mfb + nop.m 0 + frcpa.s0 FR_Result,p0 = f0,f0 + br.ret.sptk b0 +} +;; + +// Here if n=unorm +SCALB_N_UNORM: +{ .mfb + getf.exp GR_signexp_N = FR_Norm_N // Get signexp of normalized n + fcvt.fx.trunc.s1 FR_N_float_int = FR_Norm_N // Get N in significand + br.cond.sptk SCALB_COMMON1 // Return to main path +} +;; + +// Here if x=unorm +SCALB_X_UNORM: +{ .mib + getf.exp GR_signexp_X = FR_Norm_X // Get signexp of normalized x + nop.i 0 + br.cond.sptk SCALB_COMMON2 // Return to main path +} +;; + +GLOBAL_IEEE754_END(scalb) +LOCAL_LIBM_ENTRY(__libm_error_region) + +// +// Get stack address of N +// +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs +} +// +// Adjust sp +// +{ .mfi +.fframe 64 + add sp=-64,sp + nop.f 0 + mov GR_SAVE_GP=gp +};; + +// +// Store N on stack in correct position +// Locate the address of x on stack +// +{ .mmi + stfd [GR_Parameter_Y] = FR_Norm_N,16 + add GR_Parameter_X = 16,sp +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 +};; + +// +// Store x on the stack. +// Get address for result on stack. +// +.body +{ .mib + stfd [GR_Parameter_X] = FR_Norm_X + add GR_Parameter_RESULT = 0,GR_Parameter_Y + nop.b 0 +} +{ .mib + stfd [GR_Parameter_Y] = FR_Result + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# +};; + +// +// Get location of result on stack +// +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; + +// +// Get the new result +// +{ .mmi + ldfd FR_Result = [GR_Parameter_RESULT] +.restore sp + add sp = 64,sp + mov b0 = GR_SAVE_B0 +};; + +// +// Restore gp, ar.pfs and return +// +{ .mib + mov gp = GR_SAVE_GP + mov ar.pfs = GR_SAVE_PFS + br.ret.sptk b0 +};; + +LOCAL_LIBM_END(__libm_error_region) + +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/e_scalbf.S b/sysdeps/ia64/fpu/e_scalbf.S new file mode 100644 index 0000000000..e965667d7a --- /dev/null +++ b/sysdeps/ia64/fpu/e_scalbf.S @@ -0,0 +1,599 @@ +.file "scalbf.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 01/26/01 Scalb completely reworked and now standalone version +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// 08/06/03 Improved performance +// +// API +//============================================================== +// float = scalbf (float x, float n) +// input floating point f8 and floating point f9 +// output floating point f8 +// +// int_type = 0 if int is 32 bits +// int_type = 1 if int is 64 bits +// +// Returns x* 2**n using an fma and detects overflow +// and underflow. +// +// +// Strategy: +// Compute biased exponent of result exp_Result = N + exp_X +// Break into ranges: +// exp_Result > 0x1007e -> Certain overflow +// exp_Result = 0x1007e -> Possible overflow +// 0x0ff81 <= exp_Result < 0x1007e -> No over/underflow (main path) +// 0x0ff81 - 23 <= exp_Result < 0x0ff81 -> Possible underflow +// exp_Result < 0x0ff81 - 23 -> Certain underflow + +FR_Big = f6 +FR_NBig = f7 +FR_Floating_X = f8 +FR_Result = f8 +FR_Floating_N = f9 +FR_Result2 = f9 +FR_Result3 = f10 +FR_Norm_X = f11 +FR_Two_N = f12 +FR_N_float_int = f13 +FR_Norm_N = f14 + +GR_neg_ov_limit= r14 +GR_big_exp = r14 +GR_N_Biased = r15 +GR_Big = r16 +GR_exp_Result = r18 +GR_pos_ov_limit= r19 +GR_exp_sure_ou = r19 +GR_Bias = r20 +GR_N_as_int = r21 +GR_signexp_X = r22 +GR_exp_X = r23 +GR_exp_mask = r24 +GR_max_exp = r25 +GR_min_exp = r26 +GR_min_den_exp = r27 +GR_Scratch = r28 +GR_signexp_N = r29 +GR_exp_N = r30 + +GR_SAVE_B0 = r32 +GR_SAVE_GP = r33 +GR_SAVE_PFS = r34 +GR_Parameter_X = r35 +GR_Parameter_Y = r36 +GR_Parameter_RESULT = r37 +GR_Tag = r38 + +.section .text +GLOBAL_IEEE754_ENTRY(scalbf) + +// +// Is x NAN, INF, ZERO, +-? +// Build the exponent Bias +// +{ .mfi + getf.exp GR_signexp_N = FR_Floating_N // Get signexp of n + fclass.m p6,p0 = FR_Floating_X, 0xe7 // @snan | @qnan | @inf | @zero + mov GR_Bias = 0x0ffff +} +{ .mfi + mov GR_Big = 35000 // If N this big then certain overflow + fcvt.fx.trunc.s1 FR_N_float_int = FR_Floating_N // Get N in significand + nop.i 0 +} +;; + +{ .mfi + getf.exp GR_signexp_X = FR_Floating_X // Get signexp of x + fclass.m p7,p0 = FR_Floating_N, 0x0b // Test for n=unorm + nop.i 0 +} +// +// Normalize n +// +{ .mfi + mov GR_exp_mask = 0x1ffff // Exponent mask + fnorm.s1 FR_Norm_N = FR_Floating_N + nop.i 0 +} +;; + +// +// Is n NAN, INF, ZERO, +-? +// +{ .mfi + mov GR_big_exp = 0x1003e // Exponent at which n is integer + fclass.m p9,p0 = FR_Floating_N, 0xe7 // @snan | @qnan | @inf | @zero + mov GR_max_exp = 0x1007e // Exponent of maximum float +} +// +// Normalize x +// +{ .mfb + nop.m 0 + fnorm.s1 FR_Norm_X = FR_Floating_X +(p7) br.cond.spnt SCALBF_N_UNORM // Branch if n=unorm +} +;; + +SCALBF_COMMON1: +// Main path continues. Also return here from u=unorm path. +// Handle special cases if x = Nan, Inf, Zero +{ .mfb + nop.m 0 + fcmp.lt.s1 p7,p0 = FR_Floating_N, f0 // Test N negative +(p6) br.cond.spnt SCALBF_NAN_INF_ZERO +} +;; + +// Handle special cases if n = Nan, Inf, Zero +{ .mfi + getf.sig GR_N_as_int = FR_N_float_int // Get n from significand + fclass.m p8,p0 = FR_Floating_X, 0x0b // Test for x=unorm + mov GR_exp_sure_ou = 0x1000e // Exp_N where x*2^N sure over/under +} +{ .mfb + mov GR_min_exp = 0x0ff81 // Exponent of minimum float + fcvt.xf FR_N_float_int = FR_N_float_int // Convert N to FP integer +(p9) br.cond.spnt SCALBF_NAN_INF_ZERO +} +;; + +{ .mmi + and GR_exp_N = GR_exp_mask, GR_signexp_N // Get exponent of N +(p7) sub GR_Big = r0, GR_Big // Limit for N + nop.i 0 +} +;; + +{ .mib + cmp.lt p9,p0 = GR_exp_N, GR_big_exp // N possible non-integer? + cmp.ge p6,p0 = GR_exp_N, GR_exp_sure_ou // N certain over/under? +(p8) br.cond.spnt SCALBF_X_UNORM // Branch if x=unorm +} +;; + +SCALBF_COMMON2: +// Main path continues. Also return here from x=unorm path. +// Create biased exponent for 2**N +{ .mmi +(p6) mov GR_N_as_int = GR_Big // Limit N +;; + add GR_N_Biased = GR_Bias,GR_N_as_int + nop.i 0 +} +;; + +{ .mfi + setf.exp FR_Two_N = GR_N_Biased // Form 2**N +(p9) fcmp.neq.unc.s1 p9,p0 = FR_Norm_N, FR_N_float_int // Test if N an integer + and GR_exp_X = GR_exp_mask, GR_signexp_X // Get exponent of X +} +;; + +// +// Compute biased result exponent +// Branch if N is not an integer +// +{ .mib + add GR_exp_Result = GR_exp_X, GR_N_as_int + mov GR_min_den_exp = 0x0ff81 - 23 // Exponent of min denorm float +(p9) br.cond.spnt SCALBF_N_NOT_INT +} +;; + +// +// Raise Denormal operand flag with compare +// Do final operation +// +{ .mfi + cmp.lt p7,p6 = GR_exp_Result, GR_max_exp // Test no overflow + fcmp.ge.s0 p0,p11 = FR_Floating_X,FR_Floating_N // Dummy to set denorm + cmp.lt p9,p0 = GR_exp_Result, GR_min_den_exp // Test sure underflow +} +{ .mfb + nop.m 0 + fma.s.s0 FR_Result = FR_Two_N,FR_Norm_X,f0 +(p9) br.cond.spnt SCALBF_UNDERFLOW // Branch if certain underflow +} +;; + +{ .mib +(p6) cmp.gt.unc p6,p8 = GR_exp_Result, GR_max_exp // Test sure overflow +(p7) cmp.ge.unc p7,p9 = GR_exp_Result, GR_min_exp // Test no over/underflow +(p7) br.ret.sptk b0 // Return from main path +} +;; + +{ .bbb +(p6) br.cond.spnt SCALBF_OVERFLOW // Branch if certain overflow +(p8) br.cond.spnt SCALBF_POSSIBLE_OVERFLOW // Branch if possible overflow +(p9) br.cond.spnt SCALBF_POSSIBLE_UNDERFLOW // Branch if possible underflow +} +;; + +// Here if possible underflow. +// Resulting exponent: 0x0ff81-23 <= exp_Result < 0x0ff81 +SCALBF_POSSIBLE_UNDERFLOW: +// +// Here if possible overflow. +// Resulting exponent: 0x1007e = exp_Result +SCALBF_POSSIBLE_OVERFLOW: + +// Set up necessary status fields +// +// S0 user supplied status +// S2 user supplied status + WRE + TD (Overflows) +// S3 user supplied status + FZ + TD (Underflows) +// +{ .mfi + mov GR_pos_ov_limit = 0x1007f // Exponent for positive overflow + fsetc.s3 0x7F,0x41 + nop.i 0 +} +{ .mfi + mov GR_neg_ov_limit = 0x3007f // Exponent for negative overflow + fsetc.s2 0x7F,0x42 + nop.i 0 +} +;; + +// +// Do final operation with s2 and s3 +// +{ .mfi + setf.exp FR_NBig = GR_neg_ov_limit + fma.s.s3 FR_Result3 = FR_Two_N,FR_Norm_X,f0 + nop.i 0 +} +{ .mfi + setf.exp FR_Big = GR_pos_ov_limit + fma.s.s2 FR_Result2 = FR_Two_N,FR_Norm_X,f0 + nop.i 0 +} +;; + +// Check for overflow or underflow. +// Restore s3 +// Restore s2 +// +{ .mfi + nop.m 0 + fsetc.s3 0x7F,0x40 + nop.i 0 +} +{ .mfi + nop.m 0 + fsetc.s2 0x7F,0x40 + nop.i 0 +} +;; + +// +// Is the result zero? +// +{ .mfi + nop.m 0 + fclass.m p6, p0 = FR_Result3, 0x007 + nop.i 0 +} +{ .mfi + nop.m 0 + fcmp.ge.s1 p7, p8 = FR_Result2 , FR_Big + nop.i 0 +} +;; + +// +// Detect masked underflow - Tiny + Inexact Only +// +{ .mfi + nop.m 0 +(p6) fcmp.neq.unc.s1 p6, p0 = FR_Result , FR_Result2 + nop.i 0 +} +;; + +// +// Is result bigger the allowed range? +// Branch out for underflow +// +{ .mfb + nop.m 0 +(p8) fcmp.le.unc.s1 p9, p10 = FR_Result2 , FR_NBig +(p6) br.cond.spnt SCALBF_UNDERFLOW +} +;; + +// +// Branch out for overflow +// +{ .bbb +(p7) br.cond.spnt SCALBF_OVERFLOW +(p9) br.cond.spnt SCALBF_OVERFLOW + br.ret.sptk b0 // Return from main path. +} +;; + +// Here if result overflows +SCALBF_OVERFLOW: +{ .mib + alloc r32=ar.pfs,3,0,4,0 + addl GR_Tag = 55, r0 // Set error tag for overflow + br.cond.sptk __libm_error_region // Call error support for overflow +} +;; + +// Here if result underflows +SCALBF_UNDERFLOW: +{ .mib + alloc r32=ar.pfs,3,0,4,0 + addl GR_Tag = 56, r0 // Set error tag for underflow + br.cond.sptk __libm_error_region // Call error support for underflow +} +;; + +SCALBF_NAN_INF_ZERO: + +// +// Before entry, N has been converted to a fp integer in significand of +// FR_N_float_int +// +// Convert N_float_int to floating point value +// +{ .mfi + getf.sig GR_N_as_int = FR_N_float_int + fclass.m p6,p0 = FR_Floating_N, 0xc3 //@snan | @qnan + nop.i 0 +} +{ .mfi + addl GR_Scratch = 1,r0 + fcvt.xf FR_N_float_int = FR_N_float_int + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fclass.m p7,p0 = FR_Floating_X, 0xc3 //@snan | @qnan + shl GR_Scratch = GR_Scratch,63 +} +;; + +{ .mfi + nop.m 0 + fclass.m p8,p0 = FR_Floating_N, 0x21 // @inf + nop.i 0 +} +{ .mfi + nop.m 0 + fclass.m p9,p0 = FR_Floating_N, 0x22 // @-inf + nop.i 0 +} +;; + +// +// Either X or N is a Nan, return result and possible raise invalid. +// +{ .mfb + nop.m 0 +(p6) fma.s.s0 FR_Result = FR_Floating_N,FR_Floating_X,f0 +(p6) br.ret.spnt b0 +} +;; + +{ .mfb + nop.m 0 +(p7) fma.s.s0 FR_Result = FR_Floating_N,FR_Floating_X,f0 +(p7) br.ret.spnt b0 +} +;; + +// +// If N + Inf do something special +// For N = -Inf, create Int +// +{ .mfb + nop.m 0 +(p8) fma.s.s0 FR_Result = FR_Floating_X, FR_Floating_N,f0 +(p8) br.ret.spnt b0 +} +{ .mfi + nop.m 0 +(p9) fnma.s.s0 FR_Floating_N = FR_Floating_N, f1, f0 + nop.i 0 +} +;; + +// +// If N==-Inf,return x/(-N) +// +{ .mfb + cmp.ne p7,p0 = GR_N_as_int,GR_Scratch +(p9) frcpa.s0 FR_Result,p0 = FR_Floating_X,FR_Floating_N +(p9) br.ret.spnt b0 +} +;; + +// +// Is N an integer. +// +{ .mfi + nop.m 0 +(p7) fcmp.neq.unc.s1 p7,p0 = FR_Norm_N, FR_N_float_int + nop.i 0 +} +;; + +// +// If N not an int, return NaN and raise invalid. +// +{ .mfb + nop.m 0 +(p7) frcpa.s0 FR_Result,p0 = f0,f0 +(p7) br.ret.spnt b0 +} +;; + +// +// Always return x in other path. +// +{ .mfb + nop.m 0 + fma.s.s0 FR_Result = FR_Floating_X,f1,f0 + br.ret.sptk b0 +} +;; + +// Here if n not int +// Return NaN and raise invalid. +SCALBF_N_NOT_INT: +{ .mfb + nop.m 0 + frcpa.s0 FR_Result,p0 = f0,f0 + br.ret.sptk b0 +} +;; + +// Here if n=unorm +SCALBF_N_UNORM: +{ .mfb + getf.exp GR_signexp_N = FR_Norm_N // Get signexp of normalized n + fcvt.fx.trunc.s1 FR_N_float_int = FR_Norm_N // Get N in significand + br.cond.sptk SCALBF_COMMON1 // Return to main path +} +;; + +// Here if x=unorm +SCALBF_X_UNORM: +{ .mib + getf.exp GR_signexp_X = FR_Norm_X // Get signexp of normalized x + nop.i 0 + br.cond.sptk SCALBF_COMMON2 // Return to main path +} +;; + +GLOBAL_IEEE754_END(scalbf) +LOCAL_LIBM_ENTRY(__libm_error_region) + +// +// Get stack address of N +// +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs +} +// +// Adjust sp +// +{ .mfi +.fframe 64 + add sp=-64,sp + nop.f 0 + mov GR_SAVE_GP=gp +};; + +// +// Store N on stack in correct position +// Locate the address of x on stack +// +{ .mmi + stfs [GR_Parameter_Y] = FR_Norm_N,16 + add GR_Parameter_X = 16,sp +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 +};; + +// +// Store x on the stack. +// Get address for result on stack. +// +.body +{ .mib + stfs [GR_Parameter_X] = FR_Norm_X + add GR_Parameter_RESULT = 0,GR_Parameter_Y + nop.b 0 +} +{ .mib + stfs [GR_Parameter_Y] = FR_Result + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# +};; + +// +// Get location of result on stack +// +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; + +// +// Get the new result +// +{ .mmi + ldfs FR_Result = [GR_Parameter_RESULT] +.restore sp + add sp = 64,sp + mov b0 = GR_SAVE_B0 +};; + +// +// Restore gp, ar.pfs and return +// +{ .mib + mov gp = GR_SAVE_GP + mov ar.pfs = GR_SAVE_PFS + br.ret.sptk b0 +};; + +LOCAL_LIBM_END(__libm_error_region) + +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/e_scalbl.S b/sysdeps/ia64/fpu/e_scalbl.S new file mode 100644 index 0000000000..9b6467ff20 --- /dev/null +++ b/sysdeps/ia64/fpu/e_scalbl.S @@ -0,0 +1,599 @@ +.file "scalbl.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 01/26/01 Scalb completely reworked and now standalone version +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// 08/06/03 Improved performance +// +// API +//============================================================== +// long double = scalbl (long double x, long double n) +// input floating point f8 and floating point f9 +// output floating point f8 +// +// int_type = 0 if int is 32 bits +// int_type = 1 if int is 64 bits +// +// Returns x* 2**n using an fma and detects overflow +// and underflow. +// +// +// Strategy: +// Compute biased exponent of result exp_Result = N + exp_X +// Break into ranges: +// exp_Result > 0x13ffe -> Certain overflow +// exp_Result = 0x13ffe -> Possible overflow +// 0x0c001 <= exp_Result < 0x13ffe -> No over/underflow (main path) +// 0x0c001 - 63 <= exp_Result < 0x0c001 -> Possible underflow +// exp_Result < 0x0c001 - 63 -> Certain underflow + +FR_Big = f6 +FR_NBig = f7 +FR_Floating_X = f8 +FR_Result = f8 +FR_Floating_N = f9 +FR_Result2 = f9 +FR_Result3 = f10 +FR_Norm_X = f11 +FR_Two_N = f12 +FR_N_float_int = f13 +FR_Norm_N = f14 + +GR_neg_ov_limit= r14 +GR_big_exp = r14 +GR_N_Biased = r15 +GR_Big = r16 +GR_exp_Result = r18 +GR_pos_ov_limit= r19 +GR_exp_sure_ou = r19 +GR_Bias = r20 +GR_N_as_int = r21 +GR_signexp_X = r22 +GR_exp_X = r23 +GR_exp_mask = r24 +GR_max_exp = r25 +GR_min_exp = r26 +GR_min_den_exp = r27 +GR_Scratch = r28 +GR_signexp_N = r29 +GR_exp_N = r30 + +GR_SAVE_B0 = r32 +GR_SAVE_GP = r33 +GR_SAVE_PFS = r34 +GR_Parameter_X = r35 +GR_Parameter_Y = r36 +GR_Parameter_RESULT = r37 +GR_Tag = r38 + +.section .text +GLOBAL_IEEE754_ENTRY(scalbl) + +// +// Is x NAN, INF, ZERO, +-? +// Build the exponent Bias +// +{ .mfi + getf.exp GR_signexp_N = FR_Floating_N // Get signexp of n + fclass.m p6,p0 = FR_Floating_X, 0xe7 // @snan | @qnan | @inf | @zero + mov GR_Bias = 0x0ffff +} +{ .mfi + mov GR_Big = 35000 // If N this big then certain overflow + fcvt.fx.trunc.s1 FR_N_float_int = FR_Floating_N // Get N in significand + nop.i 0 +} +;; + +{ .mfi + getf.exp GR_signexp_X = FR_Floating_X // Get signexp of x + fclass.m p7,p0 = FR_Floating_N, 0x0b // Test for n=unorm + nop.i 0 +} +// +// Normalize n +// +{ .mfi + mov GR_exp_mask = 0x1ffff // Exponent mask + fnorm.s1 FR_Norm_N = FR_Floating_N + nop.i 0 +} +;; + +// +// Is n NAN, INF, ZERO, +-? +// +{ .mfi + mov GR_big_exp = 0x1003e // Exponent at which n is integer + fclass.m p9,p0 = FR_Floating_N, 0xe7 // @snan | @qnan | @inf | @zero + mov GR_max_exp = 0x13ffe // Exponent of maximum long double +} +// +// Normalize x +// +{ .mfb + nop.m 0 + fnorm.s1 FR_Norm_X = FR_Floating_X +(p7) br.cond.spnt SCALBL_N_UNORM // Branch if n=unorm +} +;; + +SCALBL_COMMON1: +// Main path continues. Also return here from u=unorm path. +// Handle special cases if x = Nan, Inf, Zero +{ .mfb + nop.m 0 + fcmp.lt.s1 p7,p0 = FR_Floating_N, f0 // Test N negative +(p6) br.cond.spnt SCALBL_NAN_INF_ZERO +} +;; + +// Handle special cases if n = Nan, Inf, Zero +{ .mfi + getf.sig GR_N_as_int = FR_N_float_int // Get n from significand + fclass.m p8,p0 = FR_Floating_X, 0x0b // Test for x=unorm + mov GR_exp_sure_ou = 0x1000e // Exp_N where x*2^N sure over/under +} +{ .mfb + mov GR_min_exp = 0x0c001 // Exponent of minimum long double + fcvt.xf FR_N_float_int = FR_N_float_int // Convert N to FP integer +(p9) br.cond.spnt SCALBL_NAN_INF_ZERO +} +;; + +{ .mmi + and GR_exp_N = GR_exp_mask, GR_signexp_N // Get exponent of N +(p7) sub GR_Big = r0, GR_Big // Limit for N + nop.i 0 +} +;; + +{ .mib + cmp.lt p9,p0 = GR_exp_N, GR_big_exp // N possible non-integer? + cmp.ge p6,p0 = GR_exp_N, GR_exp_sure_ou // N certain over/under? +(p8) br.cond.spnt SCALBL_X_UNORM // Branch if x=unorm +} +;; + +SCALBL_COMMON2: +// Main path continues. Also return here from x=unorm path. +// Create biased exponent for 2**N +{ .mmi +(p6) mov GR_N_as_int = GR_Big // Limit N +;; + add GR_N_Biased = GR_Bias,GR_N_as_int + nop.i 0 +} +;; + +{ .mfi + setf.exp FR_Two_N = GR_N_Biased // Form 2**N +(p9) fcmp.neq.unc.s1 p9,p0 = FR_Norm_N, FR_N_float_int // Test if N an integer + and GR_exp_X = GR_exp_mask, GR_signexp_X // Get exponent of X +} +;; + +// +// Compute biased result exponent +// Branch if N is not an integer +// +{ .mib + add GR_exp_Result = GR_exp_X, GR_N_as_int + mov GR_min_den_exp = 0x0c001 - 63 // Exp of min denorm long dble +(p9) br.cond.spnt SCALBL_N_NOT_INT +} +;; + +// +// Raise Denormal operand flag with compare +// Do final operation +// +{ .mfi + cmp.lt p7,p6 = GR_exp_Result, GR_max_exp // Test no overflow + fcmp.ge.s0 p0,p11 = FR_Floating_X,FR_Floating_N // Dummy to set denorm + cmp.lt p9,p0 = GR_exp_Result, GR_min_den_exp // Test sure underflow +} +{ .mfb + nop.m 0 + fma.s0 FR_Result = FR_Two_N,FR_Norm_X,f0 +(p9) br.cond.spnt SCALBL_UNDERFLOW // Branch if certain underflow +} +;; + +{ .mib +(p6) cmp.gt.unc p6,p8 = GR_exp_Result, GR_max_exp // Test sure overflow +(p7) cmp.ge.unc p7,p9 = GR_exp_Result, GR_min_exp // Test no over/underflow +(p7) br.ret.sptk b0 // Return from main path +} +;; + +{ .bbb +(p6) br.cond.spnt SCALBL_OVERFLOW // Branch if certain overflow +(p8) br.cond.spnt SCALBL_POSSIBLE_OVERFLOW // Branch if possible overflow +(p9) br.cond.spnt SCALBL_POSSIBLE_UNDERFLOW // Branch if possible underflow +} +;; + +// Here if possible underflow. +// Resulting exponent: 0x0c001-63 <= exp_Result < 0x0c001 +SCALBL_POSSIBLE_UNDERFLOW: +// +// Here if possible overflow. +// Resulting exponent: 0x13ffe = exp_Result +SCALBL_POSSIBLE_OVERFLOW: + +// Set up necessary status fields +// +// S0 user supplied status +// S2 user supplied status + WRE + TD (Overflows) +// S3 user supplied status + FZ + TD (Underflows) +// +{ .mfi + mov GR_pos_ov_limit = 0x13fff // Exponent for positive overflow + fsetc.s3 0x7F,0x41 + nop.i 0 +} +{ .mfi + mov GR_neg_ov_limit = 0x33fff // Exponent for negative overflow + fsetc.s2 0x7F,0x42 + nop.i 0 +} +;; + +// +// Do final operation with s2 and s3 +// +{ .mfi + setf.exp FR_NBig = GR_neg_ov_limit + fma.s3 FR_Result3 = FR_Two_N,FR_Norm_X,f0 + nop.i 0 +} +{ .mfi + setf.exp FR_Big = GR_pos_ov_limit + fma.s2 FR_Result2 = FR_Two_N,FR_Norm_X,f0 + nop.i 0 +} +;; + +// Check for overflow or underflow. +// Restore s3 +// Restore s2 +// +{ .mfi + nop.m 0 + fsetc.s3 0x7F,0x40 + nop.i 0 +} +{ .mfi + nop.m 0 + fsetc.s2 0x7F,0x40 + nop.i 0 +} +;; + +// +// Is the result zero? +// +{ .mfi + nop.m 0 + fclass.m p6, p0 = FR_Result3, 0x007 + nop.i 0 +} +{ .mfi + nop.m 0 + fcmp.ge.s1 p7, p8 = FR_Result2 , FR_Big + nop.i 0 +} +;; + +// +// Detect masked underflow - Tiny + Inexact Only +// +{ .mfi + nop.m 0 +(p6) fcmp.neq.unc.s1 p6, p0 = FR_Result , FR_Result2 + nop.i 0 +} +;; + +// +// Is result bigger the allowed range? +// Branch out for underflow +// +{ .mfb + nop.m 0 +(p8) fcmp.le.unc.s1 p9, p10 = FR_Result2 , FR_NBig +(p6) br.cond.spnt SCALBL_UNDERFLOW +} +;; + +// +// Branch out for overflow +// +{ .bbb +(p7) br.cond.spnt SCALBL_OVERFLOW +(p9) br.cond.spnt SCALBL_OVERFLOW + br.ret.sptk b0 // Return from main path. +} +;; + +// Here if result overflows +SCALBL_OVERFLOW: +{ .mib + alloc r32=ar.pfs,3,0,4,0 + addl GR_Tag = 51, r0 // Set error tag for overflow + br.cond.sptk __libm_error_region // Call error support for overflow +} +;; + +// Here if result underflows +SCALBL_UNDERFLOW: +{ .mib + alloc r32=ar.pfs,3,0,4,0 + addl GR_Tag = 52, r0 // Set error tag for underflow + br.cond.sptk __libm_error_region // Call error support for underflow +} +;; + +SCALBL_NAN_INF_ZERO: + +// +// Before entry, N has been converted to a fp integer in significand of +// FR_N_float_int +// +// Convert N_float_int to floating point value +// +{ .mfi + getf.sig GR_N_as_int = FR_N_float_int + fclass.m p6,p0 = FR_Floating_N, 0xc3 //@snan | @qnan + nop.i 0 +} +{ .mfi + addl GR_Scratch = 1,r0 + fcvt.xf FR_N_float_int = FR_N_float_int + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fclass.m p7,p0 = FR_Floating_X, 0xc3 //@snan | @qnan + shl GR_Scratch = GR_Scratch,63 +} +;; + +{ .mfi + nop.m 0 + fclass.m p8,p0 = FR_Floating_N, 0x21 // @inf + nop.i 0 +} +{ .mfi + nop.m 0 + fclass.m p9,p0 = FR_Floating_N, 0x22 // @-inf + nop.i 0 +} +;; + +// +// Either X or N is a Nan, return result and possible raise invalid. +// +{ .mfb + nop.m 0 +(p6) fma.s0 FR_Result = FR_Floating_N,FR_Floating_X,f0 +(p6) br.ret.spnt b0 +} +;; + +{ .mfb + nop.m 0 +(p7) fma.s0 FR_Result = FR_Floating_N,FR_Floating_X,f0 +(p7) br.ret.spnt b0 +} +;; + +// +// If N + Inf do something special +// For N = -Inf, create Int +// +{ .mfb + nop.m 0 +(p8) fma.s0 FR_Result = FR_Floating_X, FR_Floating_N,f0 +(p8) br.ret.spnt b0 +} +{ .mfi + nop.m 0 +(p9) fnma.s0 FR_Floating_N = FR_Floating_N, f1, f0 + nop.i 0 +} +;; + +// +// If N==-Inf,return x/(-N) +// +{ .mfb + cmp.ne p7,p0 = GR_N_as_int,GR_Scratch +(p9) frcpa.s0 FR_Result,p0 = FR_Floating_X,FR_Floating_N +(p9) br.ret.spnt b0 +} +;; + +// +// Is N an integer. +// +{ .mfi + nop.m 0 +(p7) fcmp.neq.unc.s1 p7,p0 = FR_Norm_N, FR_N_float_int + nop.i 0 +} +;; + +// +// If N not an int, return NaN and raise invalid. +// +{ .mfb + nop.m 0 +(p7) frcpa.s0 FR_Result,p0 = f0,f0 +(p7) br.ret.spnt b0 +} +;; + +// +// Always return x in other path. +// +{ .mfb + nop.m 0 + fma.s0 FR_Result = FR_Floating_X,f1,f0 + br.ret.sptk b0 +} +;; + +// Here if n not int +// Return NaN and raise invalid. +SCALBL_N_NOT_INT: +{ .mfb + nop.m 0 + frcpa.s0 FR_Result,p0 = f0,f0 + br.ret.sptk b0 +} +;; + +// Here if n=unorm +SCALBL_N_UNORM: +{ .mfb + getf.exp GR_signexp_N = FR_Norm_N // Get signexp of normalized n + fcvt.fx.trunc.s1 FR_N_float_int = FR_Norm_N // Get N in significand + br.cond.sptk SCALBL_COMMON1 // Return to main path +} +;; + +// Here if x=unorm +SCALBL_X_UNORM: +{ .mib + getf.exp GR_signexp_X = FR_Norm_X // Get signexp of normalized x + nop.i 0 + br.cond.sptk SCALBL_COMMON2 // Return to main path +} +;; + +GLOBAL_IEEE754_END(scalbl) +LOCAL_LIBM_ENTRY(__libm_error_region) + +// +// Get stack address of N +// +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs +} +// +// Adjust sp +// +{ .mfi +.fframe 64 + add sp=-64,sp + nop.f 0 + mov GR_SAVE_GP=gp +};; + +// +// Store N on stack in correct position +// Locate the address of x on stack +// +{ .mmi + stfe [GR_Parameter_Y] = FR_Norm_N,16 + add GR_Parameter_X = 16,sp +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 +};; + +// +// Store x on the stack. +// Get address for result on stack. +// +.body +{ .mib + stfe [GR_Parameter_X] = FR_Norm_X + add GR_Parameter_RESULT = 0,GR_Parameter_Y + nop.b 0 +} +{ .mib + stfe [GR_Parameter_Y] = FR_Result + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# +};; + +// +// Get location of result on stack +// +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; + +// +// Get the new result +// +{ .mmi + ldfe FR_Result = [GR_Parameter_RESULT] +.restore sp + add sp = 64,sp + mov b0 = GR_SAVE_B0 +};; + +// +// Restore gp, ar.pfs and return +// +{ .mib + mov gp = GR_SAVE_GP + mov ar.pfs = GR_SAVE_PFS + br.ret.sptk b0 +};; + +LOCAL_LIBM_END(__libm_error_region) + +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/e_sinh.S b/sysdeps/ia64/fpu/e_sinh.S new file mode 100644 index 0000000000..f60907b72b --- /dev/null +++ b/sysdeps/ia64/fpu/e_sinh.S @@ -0,0 +1,905 @@ +.file "sinh.s" + + +// Copyright (c) 2000 - 2005, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 04/04/00 Unwind support added +// 08/15/00 Bundle added after call to __libm_error_support to properly +// set [the previously overwritten] GR_Parameter_RESULT. +// 10/12/00 Update to set denormal operand and underflow flags +// 01/22/01 Fixed to set inexact flag for small args. +// 05/02/01 Reworked to improve speed of all paths +// 05/20/02 Cleaned up namespace and sf0 syntax +// 11/20/02 Improved speed with new algorithm +// 03/31/05 Reformatted delimiters between data tables + +// API +//============================================================== +// double sinh(double) + +// Overview of operation +//============================================================== +// Case 1: 0 < |x| < 2^-60 +// Result = x, computed by x+sgn(x)*x^2) to handle flags and rounding +// +// Case 2: 2^-60 < |x| < 0.25 +// Evaluate sinh(x) by a 13th order polynomial +// Care is take for the order of multiplication; and A1 is not exactly 1/3!, +// A2 is not exactly 1/5!, etc. +// sinh(x) = x + (A1*x^3 + A2*x^5 + A3*x^7 + A4*x^9 + A5*x^11 + A6*x^13) +// +// Case 3: 0.25 < |x| < 710.47586 +// Algorithm is based on the identity sinh(x) = ( exp(x) - exp(-x) ) / 2. +// The algorithm for exp is described as below. There are a number of +// economies from evaluating both exp(x) and exp(-x). Although we +// are evaluating both quantities, only where the quantities diverge do we +// duplicate the computations. The basic algorithm for exp(x) is described +// below. +// +// Take the input x. w is "how many log2/128 in x?" +// w = x * 128/log2 +// n = int(w) +// x = n log2/128 + r + delta + +// n = 128M + index_1 + 2^4 index_2 +// x = M log2 + (log2/128) index_1 + (log2/8) index_2 + r + delta + +// exp(x) = 2^M 2^(index_1/128) 2^(index_2/8) exp(r) exp(delta) +// Construct 2^M +// Get 2^(index_1/128) from table_1; +// Get 2^(index_2/8) from table_2; +// Calculate exp(r) by 5th order polynomial +// r = x - n (log2/128)_high +// delta = - n (log2/128)_low +// Calculate exp(delta) as 1 + delta + + +// Special values +//============================================================== +// sinh(+0) = +0 +// sinh(-0) = -0 + +// sinh(+qnan) = +qnan +// sinh(-qnan) = -qnan +// sinh(+snan) = +qnan +// sinh(-snan) = -qnan + +// sinh(-inf) = -inf +// sinh(+inf) = +inf + +// Overflow and Underflow +//======================= +// sinh(x) = largest double normal when +// |x| = 710.47586 = 0x408633ce8fb9f87d +// +// Underflow is handled as described in case 1 above + +// Registers used +//============================================================== +// Floating Point registers used: +// f8, input, output +// f6 -> f15, f32 -> f61 + +// General registers used: +// r14 -> r40 + +// Predicate registers used: +// p6 -> p15 + +// Assembly macros +//============================================================== + +rRshf = r14 +rN_neg = r14 +rAD_TB1 = r15 +rAD_TB2 = r16 +rAD_P = r17 +rN = r18 +rIndex_1 = r19 +rIndex_2_16 = r20 +rM = r21 +rBiased_M = r21 +rSig_inv_ln2 = r22 +rIndex_1_neg = r22 +rExp_bias = r23 +rExp_bias_minus_1 = r23 +rExp_mask = r24 +rTmp = r24 +rGt_ln = r24 +rIndex_2_16_neg = r24 +rM_neg = r25 +rBiased_M_neg = r25 +rRshf_2to56 = r26 +rAD_T1_neg = r26 +rExp_2tom56 = r28 +rAD_T2_neg = r28 +rAD_T1 = r29 +rAD_T2 = r30 +rSignexp_x = r31 +rExp_x = r31 + +GR_SAVE_B0 = r33 +GR_SAVE_PFS = r34 +GR_SAVE_GP = r35 + +GR_Parameter_X = r37 +GR_Parameter_Y = r38 +GR_Parameter_RESULT = r39 +GR_Parameter_TAG = r40 + + +FR_X = f10 +FR_Y = f1 +FR_RESULT = f8 + +fRSHF_2TO56 = f6 +fINV_LN2_2TO63 = f7 +fW_2TO56_RSH = f9 +f2TOM56 = f11 +fP5 = f12 +fP4 = f13 +fP3 = f14 +fP2 = f15 + +fLn2_by_128_hi = f33 +fLn2_by_128_lo = f34 + +fRSHF = f35 +fNfloat = f36 +fNormX = f37 +fR = f38 +fF = f39 + +fRsq = f40 +f2M = f41 +fS1 = f42 +fT1 = f42 +fS2 = f43 +fT2 = f43 +fS = f43 +fWre_urm_f8 = f44 +fAbsX = f44 + +fMIN_DBL_OFLOW_ARG = f45 +fMAX_DBL_NORM_ARG = f46 +fXsq = f47 +fX4 = f48 +fGt_pln = f49 +fTmp = f49 + +fP54 = f50 +fP5432 = f50 +fP32 = f51 +fP = f52 +fP54_neg = f53 +fP5432_neg = f53 +fP32_neg = f54 +fP_neg = f55 +fF_neg = f56 + +f2M_neg = f57 +fS1_neg = f58 +fT1_neg = f58 +fS2_neg = f59 +fT2_neg = f59 +fS_neg = f59 +fExp = f60 +fExp_neg = f61 + +fA6 = f50 +fA65 = f50 +fA6543 = f50 +fA654321 = f50 +fA5 = f51 +fA4 = f52 +fA43 = f52 +fA3 = f53 +fA2 = f54 +fA21 = f54 +fA1 = f55 +fX3 = f56 + +// Data tables +//============================================================== + +RODATA +.align 16 + +// ************* DO NOT CHANGE ORDER OF THESE TABLES ******************** + +// double-extended 1/ln(2) +// 3fff b8aa 3b29 5c17 f0bb be87fed0691d3e88 +// 3fff b8aa 3b29 5c17 f0bc +// For speed the significand will be loaded directly with a movl and setf.sig +// and the exponent will be bias+63 instead of bias+0. Thus subsequent +// computations need to scale appropriately. +// The constant 128/ln(2) is needed for the computation of w. This is also +// obtained by scaling the computations. +// +// Two shifting constants are loaded directly with movl and setf.d. +// 1. fRSHF_2TO56 = 1.1000..00 * 2^(63-7) +// This constant is added to x*1/ln2 to shift the integer part of +// x*128/ln2 into the rightmost bits of the significand. +// The result of this fma is fW_2TO56_RSH. +// 2. fRSHF = 1.1000..00 * 2^(63) +// This constant is subtracted from fW_2TO56_RSH * 2^(-56) to give +// the integer part of w, n, as a floating-point number. +// The result of this fms is fNfloat. + + +LOCAL_OBJECT_START(exp_table_1) +data8 0x408633ce8fb9f87e // smallest dbl overflow arg +data8 0x408633ce8fb9f87d // largest dbl arg to give normal dbl result +data8 0xb17217f7d1cf79ab , 0x00003ff7 // ln2/128 hi +data8 0xc9e3b39803f2f6af , 0x00003fb7 // ln2/128 lo +// +// Table 1 is 2^(index_1/128) where +// index_1 goes from 0 to 15 +// +data8 0x8000000000000000 , 0x00003FFF +data8 0x80B1ED4FD999AB6C , 0x00003FFF +data8 0x8164D1F3BC030773 , 0x00003FFF +data8 0x8218AF4373FC25EC , 0x00003FFF +data8 0x82CD8698AC2BA1D7 , 0x00003FFF +data8 0x8383594EEFB6EE37 , 0x00003FFF +data8 0x843A28C3ACDE4046 , 0x00003FFF +data8 0x84F1F656379C1A29 , 0x00003FFF +data8 0x85AAC367CC487B15 , 0x00003FFF +data8 0x8664915B923FBA04 , 0x00003FFF +data8 0x871F61969E8D1010 , 0x00003FFF +data8 0x87DB357FF698D792 , 0x00003FFF +data8 0x88980E8092DA8527 , 0x00003FFF +data8 0x8955EE03618E5FDD , 0x00003FFF +data8 0x8A14D575496EFD9A , 0x00003FFF +data8 0x8AD4C6452C728924 , 0x00003FFF +LOCAL_OBJECT_END(exp_table_1) + +// Table 2 is 2^(index_1/8) where +// index_2 goes from 0 to 7 +LOCAL_OBJECT_START(exp_table_2) +data8 0x8000000000000000 , 0x00003FFF +data8 0x8B95C1E3EA8BD6E7 , 0x00003FFF +data8 0x9837F0518DB8A96F , 0x00003FFF +data8 0xA5FED6A9B15138EA , 0x00003FFF +data8 0xB504F333F9DE6484 , 0x00003FFF +data8 0xC5672A115506DADD , 0x00003FFF +data8 0xD744FCCAD69D6AF4 , 0x00003FFF +data8 0xEAC0C6E7DD24392F , 0x00003FFF +LOCAL_OBJECT_END(exp_table_2) + + +LOCAL_OBJECT_START(exp_p_table) +data8 0x3f8111116da21757 //P5 +data8 0x3fa55555d787761c //P4 +data8 0x3fc5555555555414 //P3 +data8 0x3fdffffffffffd6a //P2 +LOCAL_OBJECT_END(exp_p_table) + +LOCAL_OBJECT_START(sinh_p_table) +data8 0xB08AF9AE78C1239F, 0x00003FDE // A6 +data8 0xB8EF1D28926D8891, 0x00003FEC // A4 +data8 0x8888888888888412, 0x00003FF8 // A2 +data8 0xD732377688025BE9, 0x00003FE5 // A5 +data8 0xD00D00D00D4D39F2, 0x00003FF2 // A3 +data8 0xAAAAAAAAAAAAAAAB, 0x00003FFC // A1 +LOCAL_OBJECT_END(sinh_p_table) + + +.section .text +GLOBAL_IEEE754_ENTRY(sinh) + +{ .mlx + getf.exp rSignexp_x = f8 // Must recompute if x unorm + movl rSig_inv_ln2 = 0xb8aa3b295c17f0bc // significand of 1/ln2 +} +{ .mlx + addl rAD_TB1 = @ltoff(exp_table_1), gp + movl rRshf_2to56 = 0x4768000000000000 // 1.10000 2^(63+56) +} +;; + +{ .mfi + ld8 rAD_TB1 = [rAD_TB1] + fclass.m p6,p0 = f8,0x0b // Test for x=unorm + mov rExp_mask = 0x1ffff +} +{ .mfi + mov rExp_bias = 0xffff + fnorm.s1 fNormX = f8 + mov rExp_2tom56 = 0xffff-56 +} +;; + +// Form two constants we need +// 1/ln2 * 2^63 to compute w = x * 1/ln2 * 128 +// 1.1000..000 * 2^(63+63-7) to right shift int(w) into the significand + +{ .mfi + setf.sig fINV_LN2_2TO63 = rSig_inv_ln2 // form 1/ln2 * 2^63 + fclass.m p8,p0 = f8,0x07 // Test for x=0 + nop.i 999 +} +{ .mlx + setf.d fRSHF_2TO56 = rRshf_2to56 // Form const 1.100 * 2^(63+56) + movl rRshf = 0x43e8000000000000 // 1.10000 2^63 for right shift +} +;; + +{ .mfi + ldfpd fMIN_DBL_OFLOW_ARG, fMAX_DBL_NORM_ARG = [rAD_TB1],16 + fclass.m p10,p0 = f8,0x1e3 // Test for x=inf, nan, NaT + nop.i 0 +} +{ .mfb + setf.exp f2TOM56 = rExp_2tom56 // form 2^-56 for scaling Nfloat + nop.f 0 +(p6) br.cond.spnt SINH_UNORM // Branch if x=unorm +} +;; + +SINH_COMMON: +{ .mfi + ldfe fLn2_by_128_hi = [rAD_TB1],16 + nop.f 0 + nop.i 0 +} +{ .mfb + setf.d fRSHF = rRshf // Form right shift const 1.100 * 2^63 + nop.f 0 +(p8) br.ret.spnt b0 // Exit for x=0, result=x +} +;; + +{ .mfi + ldfe fLn2_by_128_lo = [rAD_TB1],16 + nop.f 0 + nop.i 0 +} +{ .mfb + and rExp_x = rExp_mask, rSignexp_x // Biased exponent of x +(p10) fma.d.s0 f8 = f8,f1,f0 // Result if x=inf, nan, NaT +(p10) br.ret.spnt b0 // quick exit for x=inf, nan, NaT +} +;; + +// After that last load rAD_TB1 points to the beginning of table 1 +{ .mfi + nop.m 0 + fcmp.eq.s0 p6,p0 = f8, f0 // Dummy to set D + sub rExp_x = rExp_x, rExp_bias // True exponent of x +} +;; + +{ .mfi + nop.m 0 + fmerge.s fAbsX = f0, fNormX // Form |x| + nop.i 0 +} +{ .mfb + cmp.gt p7, p0 = -2, rExp_x // Test |x| < 2^(-2) + fma.s1 fXsq = fNormX, fNormX, f0 // x*x for small path +(p7) br.cond.spnt SINH_SMALL // Branch if 0 < |x| < 2^-2 +} +;; + +// W = X * Inv_log2_by_128 +// By adding 1.10...0*2^63 we shift and get round_int(W) in significand. +// We actually add 1.10...0*2^56 to X * Inv_log2 to do the same thing. + +{ .mfi + add rAD_P = 0x180, rAD_TB1 + fma.s1 fW_2TO56_RSH = fNormX, fINV_LN2_2TO63, fRSHF_2TO56 + add rAD_TB2 = 0x100, rAD_TB1 +} +;; + +// Divide arguments into the following categories: +// Certain Safe - 0.25 <= |x| <= MAX_DBL_NORM_ARG +// Possible Overflow p14 - MAX_DBL_NORM_ARG < |x| < MIN_DBL_OFLOW_ARG +// Certain Overflow p15 - MIN_DBL_OFLOW_ARG <= |x| < +inf +// +// If the input is really a double arg, then there will never be +// "Possible Overflow" arguments. +// + +{ .mfi + ldfpd fP5, fP4 = [rAD_P] ,16 + fcmp.ge.s1 p15,p14 = fAbsX,fMIN_DBL_OFLOW_ARG + nop.i 0 +} +;; + +// Nfloat = round_int(W) +// The signficand of fW_2TO56_RSH contains the rounded integer part of W, +// as a twos complement number in the lower bits (that is, it may be negative). +// That twos complement number (called N) is put into rN. + +// Since fW_2TO56_RSH is scaled by 2^56, it must be multiplied by 2^-56 +// before the shift constant 1.10000 * 2^63 is subtracted to yield fNfloat. +// Thus, fNfloat contains the floating point version of N + +{ .mfi + ldfpd fP3, fP2 = [rAD_P] +(p14) fcmp.gt.unc.s1 p14,p0 = fAbsX,fMAX_DBL_NORM_ARG + nop.i 0 +} +{ .mfb + nop.m 0 + fms.s1 fNfloat = fW_2TO56_RSH, f2TOM56, fRSHF +(p15) br.cond.spnt SINH_CERTAIN_OVERFLOW +} +;; + +{ .mfi + getf.sig rN = fW_2TO56_RSH + nop.f 0 + mov rExp_bias_minus_1 = 0xfffe +} +;; + +// rIndex_1 has index_1 +// rIndex_2_16 has index_2 * 16 +// rBiased_M has M + +// rM has true M +// r = x - Nfloat * ln2_by_128_hi +// f = 1 - Nfloat * ln2_by_128_lo +{ .mfi + and rIndex_1 = 0x0f, rN + fnma.s1 fR = fNfloat, fLn2_by_128_hi, fNormX + shr rM = rN, 0x7 +} +{ .mfi + and rIndex_2_16 = 0x70, rN + fnma.s1 fF = fNfloat, fLn2_by_128_lo, f1 + sub rN_neg = r0, rN +} +;; + +{ .mmi + and rIndex_1_neg = 0x0f, rN_neg + add rBiased_M = rExp_bias_minus_1, rM + shr rM_neg = rN_neg, 0x7 +} +{ .mmi + and rIndex_2_16_neg = 0x70, rN_neg + add rAD_T2 = rAD_TB2, rIndex_2_16 + shladd rAD_T1 = rIndex_1, 4, rAD_TB1 +} +;; + +// rAD_T1 has address of T1 +// rAD_T2 has address if T2 + +{ .mmi + setf.exp f2M = rBiased_M + ldfe fT2 = [rAD_T2] + nop.i 0 +} +{ .mmi + add rBiased_M_neg = rExp_bias_minus_1, rM_neg + add rAD_T2_neg = rAD_TB2, rIndex_2_16_neg + shladd rAD_T1_neg = rIndex_1_neg, 4, rAD_TB1 +} +;; + +// Create Scale = 2^M +// Load T1 and T2 +{ .mmi + ldfe fT1 = [rAD_T1] + nop.m 0 + nop.i 0 +} +{ .mmf + setf.exp f2M_neg = rBiased_M_neg + ldfe fT2_neg = [rAD_T2_neg] + fma.s1 fF_neg = fNfloat, fLn2_by_128_lo, f1 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fRsq = fR, fR, f0 + nop.i 0 +} +{ .mfi + ldfe fT1_neg = [rAD_T1_neg] + fma.s1 fP54 = fR, fP5, fP4 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fP32 = fR, fP3, fP2 + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 fP54_neg = fR, fP5, fP4 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fnma.s1 fP32_neg = fR, fP3, fP2 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fP5432 = fRsq, fP54, fP32 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fS2 = fF,fT2,f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fS1 = f2M,fT1,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fP5432_neg = fRsq, fP54_neg, fP32_neg + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fS1_neg = f2M_neg,fT1_neg,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fS2_neg = fF_neg,fT2_neg,f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fP = fRsq, fP5432, fR + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fS = fS1,fS2,f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fms.s1 fP_neg = fRsq, fP5432_neg, fR + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fS_neg = fS1_neg,fS2_neg,f0 + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + fmpy.s0 fTmp = fLn2_by_128_lo, fLn2_by_128_lo // Force inexact +(p14) br.cond.spnt SINH_POSSIBLE_OVERFLOW +} +;; + +{ .mfi + nop.m 0 + fma.s1 fExp = fS, fP, fS + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fExp_neg = fS_neg, fP_neg, fS_neg + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + fms.d.s0 f8 = fExp, f1, fExp_neg + br.ret.sptk b0 // Normal path exit +} +;; + +// Here if 0 < |x| < 0.25 +SINH_SMALL: +{ .mfi + add rAD_T1 = 0x1a0, rAD_TB1 + fcmp.lt.s1 p7, p8 = fNormX, f0 // Test sign of x + cmp.gt p6, p0 = -60, rExp_x // Test |x| < 2^(-60) +} +{ .mfi + add rAD_T2 = 0x1d0, rAD_TB1 + nop.f 0 + nop.i 0 +} +;; + +{ .mmb + ldfe fA6 = [rAD_T1],16 + ldfe fA5 = [rAD_T2],16 +(p6) br.cond.spnt SINH_VERY_SMALL // Branch if |x| < 2^(-60) +} +;; + +{ .mmi + ldfe fA4 = [rAD_T1],16 + ldfe fA3 = [rAD_T2],16 + nop.i 0 +} +;; + +{ .mmi + ldfe fA2 = [rAD_T1] + ldfe fA1 = [rAD_T2] + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fX3 = fNormX, fXsq, f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fX4 = fXsq, fXsq, f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fA65 = fXsq, fA6, fA5 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA43 = fXsq, fA4, fA3 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fA21 = fXsq, fA2, fA1 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fA6543 = fX4, fA65, fA43 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fA654321 = fX4, fA6543, fA21 + nop.i 0 +} +;; + +// Dummy multiply to generate inexact +{ .mfi + nop.m 0 + fmpy.s0 fTmp = fA6, fA6 + nop.i 0 +} +{ .mfb + nop.m 0 + fma.d.s0 f8 = fA654321, fX3, fNormX + br.ret.sptk b0 // Exit if 2^-60 < |x| < 0.25 +} +;; + +SINH_VERY_SMALL: +// Here if 0 < |x| < 2^-60 +// Compute result by x + sgn(x)*x^2 to get properly rounded result +.pred.rel "mutex",p7,p8 +{ .mfi + nop.m 0 +(p7) fnma.d.s0 f8 = fNormX, fNormX, fNormX // If x<0 result ~ x-x^2 + nop.i 0 +} +{ .mfb + nop.m 0 +(p8) fma.d.s0 f8 = fNormX, fNormX, fNormX // If x>0 result ~ x+x^2 + br.ret.sptk b0 // Exit if |x| < 2^-60 +} +;; + + +SINH_POSSIBLE_OVERFLOW: + +// Here if fMAX_DBL_NORM_ARG < |x| < fMIN_DBL_OFLOW_ARG +// This cannot happen if input is a double, only if input higher precision. +// Overflow is a possibility, not a certainty. + +// Recompute result using status field 2 with user's rounding mode, +// and wre set. If result is larger than largest double, then we have +// overflow + +{ .mfi + mov rGt_ln = 0x103ff // Exponent for largest dbl + 1 ulp + fsetc.s2 0x7F,0x42 // Get user's round mode, set wre + nop.i 0 +} +;; + +{ .mfi + setf.exp fGt_pln = rGt_ln // Create largest double + 1 ulp + fma.d.s2 fWre_urm_f8 = fS, fP, fS // Result with wre set + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fsetc.s2 0x7F,0x40 // Turn off wre in sf2 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcmp.ge.s1 p6, p0 = fWre_urm_f8, fGt_pln // Test for overflow + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + nop.f 0 +(p6) br.cond.spnt SINH_CERTAIN_OVERFLOW // Branch if overflow +} +;; + +{ .mfb + nop.m 0 + fma.d.s0 f8 = fS, fP, fS + br.ret.sptk b0 // Exit if really no overflow +} +;; + +SINH_CERTAIN_OVERFLOW: +{ .mfi + sub rTmp = rExp_mask, r0, 1 + fcmp.lt.s1 p6, p7 = fNormX, f0 // Test for x < 0 + nop.i 0 +} +;; + +{ .mmf + alloc r32=ar.pfs,1,4,4,0 + setf.exp fTmp = rTmp + fmerge.s FR_X = f8,f8 +} +;; + +{ .mfi + mov GR_Parameter_TAG = 127 +(p6) fnma.d.s0 FR_RESULT = fTmp, fTmp, f0 // Set I,O and -INF result + nop.i 0 +} +{ .mfb + nop.m 0 +(p7) fma.d.s0 FR_RESULT = fTmp, fTmp, f0 // Set I,O and +INF result + br.cond.sptk __libm_error_region +} +;; + +// Here if x unorm +SINH_UNORM: +{ .mfb + getf.exp rSignexp_x = fNormX // Must recompute if x unorm + fcmp.eq.s0 p6, p0 = f8, f0 // Set D flag + br.cond.sptk SINH_COMMON +} +;; + +GLOBAL_IEEE754_END(sinh) + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfd [GR_Parameter_Y] = FR_Y,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; +.body +{ .mib + stfd [GR_Parameter_X] = FR_X // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfd [GR_Parameter_Y] = FR_RESULT // STORE Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; +{ .mmi + ldfd f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/e_sinhf.S b/sysdeps/ia64/fpu/e_sinhf.S new file mode 100644 index 0000000000..6d808cb478 --- /dev/null +++ b/sysdeps/ia64/fpu/e_sinhf.S @@ -0,0 +1,748 @@ +.file "sinhf.s" + + +// Copyright (c) 2000 - 2005, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. + +// History +//********************************************************************* +// 02/02/00 Initial version +// 04/04/00 Unwind support added +// 08/15/00 Bundle added after call to __libm_error_support to properly +// set [the previously overwritten] GR_Parameter_RESULT. +// 10/12/00 Update to set denormal operand and underflow flags +// 01/22/01 Fixed to set inexact flag for small args. +// 05/02/01 Reworked to improve speed of all paths +// 05/20/02 Cleaned up namespace and sf0 syntax +// 11/20/02 Improved algorithm based on expf +// 03/31/05 Reformatted delimiters between data tables +// +// API +//********************************************************************* +// float sinhf(float) +// +// Overview of operation +//********************************************************************* +// Case 1: 0 < |x| < 2^-60 +// Result = x, computed by x+sgn(x)*x^2) to handle flags and rounding +// +// Case 2: 2^-60 < |x| < 0.25 +// Evaluate sinh(x) by a 9th order polynomial +// Care is take for the order of multiplication; and A2 is not exactly 1/5!, +// A3 is not exactly 1/7!, etc. +// sinh(x) = x + (A1*x^3 + A2*x^5 + A3*x^7 + A4*x^9) +// +// Case 3: 0.25 < |x| < 89.41598 +// Algorithm is based on the identity sinh(x) = ( exp(x) - exp(-x) ) / 2. +// The algorithm for exp is described as below. There are a number of +// economies from evaluating both exp(x) and exp(-x). Although we +// are evaluating both quantities, only where the quantities diverge do we +// duplicate the computations. The basic algorithm for exp(x) is described +// below. +// +// Take the input x. w is "how many log2/128 in x?" +// w = x * 64/log2 +// NJ = int(w) +// x = NJ*log2/64 + R + +// NJ = 64*n + j +// x = n*log2 + (log2/64)*j + R +// +// So, exp(x) = 2^n * 2^(j/64)* exp(R) +// +// T = 2^n * 2^(j/64) +// Construct 2^n +// Get 2^(j/64) table +// actually all the entries of 2^(j/64) table are stored in DP and +// with exponent bits set to 0 -> multiplication on 2^n can be +// performed by doing logical "or" operation with bits presenting 2^n + +// exp(R) = 1 + (exp(R) - 1) +// P = exp(R) - 1 approximated by Taylor series of 3rd degree +// P = A3*R^3 + A2*R^2 + R, A3 = 1/6, A2 = 1/2 +// + +// The final result is reconstructed as follows +// exp(x) = T + T*P + +// Special values +//********************************************************************* +// sinhf(+0) = +0 +// sinhf(-0) = -0 + +// sinhf(+qnan) = +qnan +// sinhf(-qnan) = -qnan +// sinhf(+snan) = +qnan +// sinhf(-snan) = -qnan + +// sinhf(-inf) = -inf +// sinhf(+inf) = +inf + +// Overflow and Underflow +//********************************************************************* +// sinhf(x) = largest single normal when +// x = 89.41598 = 0x42b2d4fc +// +// Underflow is handled as described in case 1 above + +// Registers used +//********************************************************************* +// Floating Point registers used: +// f8 input, output +// f6,f7, f9 -> f15, f32 -> f45 + +// General registers used: +// r2, r3, r16 -> r38 + +// Predicate registers used: +// p6 -> p15 + +// Assembly macros +//********************************************************************* +// integer registers used +// scratch +rNJ = r2 +rNJ_neg = r3 + +rJ_neg = r16 +rN_neg = r17 +rSignexp_x = r18 +rExp_x = r18 +rExp_mask = r19 +rExp_bias = r20 +rAd1 = r21 +rAd2 = r22 +rJ = r23 +rN = r24 +rTblAddr = r25 +rA3 = r26 +rExpHalf = r27 +rLn2Div64 = r28 +rGt_ln = r29 +r17ones_m1 = r29 +rRightShifter = r30 +rJ_mask = r30 +r64DivLn2 = r31 +rN_mask = r31 +// stacked +GR_SAVE_PFS = r32 +GR_SAVE_B0 = r33 +GR_SAVE_GP = r34 +GR_Parameter_X = r35 +GR_Parameter_Y = r36 +GR_Parameter_RESULT = r37 +GR_Parameter_TAG = r38 + +// floating point registers used +FR_X = f10 +FR_Y = f1 +FR_RESULT = f8 +// scratch +fRightShifter = f6 +f64DivLn2 = f7 +fNormX = f9 +fNint = f10 +fN = f11 +fR = f12 +fLn2Div64 = f13 +fA2 = f14 +fA3 = f15 +// stacked +fP = f32 +fT = f33 +fMIN_SGL_OFLOW_ARG = f34 +fMAX_SGL_NORM_ARG = f35 +fRSqr = f36 +fA1 = f37 +fA21 = f37 +fA4 = f38 +fA43 = f38 +fA4321 = f38 +fX4 = f39 +fTmp = f39 +fGt_pln = f39 +fWre_urm_f8 = f40 +fXsq = f40 +fP_neg = f41 +fX3 = f41 +fT_neg = f42 +fExp = f43 +fExp_neg = f44 +fAbsX = f45 + + +RODATA +.align 16 + +LOCAL_OBJECT_START(_sinhf_table) +data4 0x42b2d4fd // Smallest single arg to overflow single result +data4 0x42b2d4fc // Largest single arg to give normal single result +data4 0x00000000 // pad +data4 0x00000000 // pad +// +// 2^(j/64) table, j goes from 0 to 63 +data8 0x0000000000000000 // 2^(0/64) +data8 0x00002C9A3E778061 // 2^(1/64) +data8 0x000059B0D3158574 // 2^(2/64) +data8 0x0000874518759BC8 // 2^(3/64) +data8 0x0000B5586CF9890F // 2^(4/64) +data8 0x0000E3EC32D3D1A2 // 2^(5/64) +data8 0x00011301D0125B51 // 2^(6/64) +data8 0x0001429AAEA92DE0 // 2^(7/64) +data8 0x000172B83C7D517B // 2^(8/64) +data8 0x0001A35BEB6FCB75 // 2^(9/64) +data8 0x0001D4873168B9AA // 2^(10/64) +data8 0x0002063B88628CD6 // 2^(11/64) +data8 0x0002387A6E756238 // 2^(12/64) +data8 0x00026B4565E27CDD // 2^(13/64) +data8 0x00029E9DF51FDEE1 // 2^(14/64) +data8 0x0002D285A6E4030B // 2^(15/64) +data8 0x000306FE0A31B715 // 2^(16/64) +data8 0x00033C08B26416FF // 2^(17/64) +data8 0x000371A7373AA9CB // 2^(18/64) +data8 0x0003A7DB34E59FF7 // 2^(19/64) +data8 0x0003DEA64C123422 // 2^(20/64) +data8 0x0004160A21F72E2A // 2^(21/64) +data8 0x00044E086061892D // 2^(22/64) +data8 0x000486A2B5C13CD0 // 2^(23/64) +data8 0x0004BFDAD5362A27 // 2^(24/64) +data8 0x0004F9B2769D2CA7 // 2^(25/64) +data8 0x0005342B569D4F82 // 2^(26/64) +data8 0x00056F4736B527DA // 2^(27/64) +data8 0x0005AB07DD485429 // 2^(28/64) +data8 0x0005E76F15AD2148 // 2^(29/64) +data8 0x0006247EB03A5585 // 2^(30/64) +data8 0x0006623882552225 // 2^(31/64) +data8 0x0006A09E667F3BCD // 2^(32/64) +data8 0x0006DFB23C651A2F // 2^(33/64) +data8 0x00071F75E8EC5F74 // 2^(34/64) +data8 0x00075FEB564267C9 // 2^(35/64) +data8 0x0007A11473EB0187 // 2^(36/64) +data8 0x0007E2F336CF4E62 // 2^(37/64) +data8 0x00082589994CCE13 // 2^(38/64) +data8 0x000868D99B4492ED // 2^(39/64) +data8 0x0008ACE5422AA0DB // 2^(40/64) +data8 0x0008F1AE99157736 // 2^(41/64) +data8 0x00093737B0CDC5E5 // 2^(42/64) +data8 0x00097D829FDE4E50 // 2^(43/64) +data8 0x0009C49182A3F090 // 2^(44/64) +data8 0x000A0C667B5DE565 // 2^(45/64) +data8 0x000A5503B23E255D // 2^(46/64) +data8 0x000A9E6B5579FDBF // 2^(47/64) +data8 0x000AE89F995AD3AD // 2^(48/64) +data8 0x000B33A2B84F15FB // 2^(49/64) +data8 0x000B7F76F2FB5E47 // 2^(50/64) +data8 0x000BCC1E904BC1D2 // 2^(51/64) +data8 0x000C199BDD85529C // 2^(52/64) +data8 0x000C67F12E57D14B // 2^(53/64) +data8 0x000CB720DCEF9069 // 2^(54/64) +data8 0x000D072D4A07897C // 2^(55/64) +data8 0x000D5818DCFBA487 // 2^(56/64) +data8 0x000DA9E603DB3285 // 2^(57/64) +data8 0x000DFC97337B9B5F // 2^(58/64) +data8 0x000E502EE78B3FF6 // 2^(59/64) +data8 0x000EA4AFA2A490DA // 2^(60/64) +data8 0x000EFA1BEE615A27 // 2^(61/64) +data8 0x000F50765B6E4540 // 2^(62/64) +data8 0x000FA7C1819E90D8 // 2^(63/64) +LOCAL_OBJECT_END(_sinhf_table) + +LOCAL_OBJECT_START(sinh_p_table) +data8 0x3ec749d84bc96d7d // A4 +data8 0x3f2a0168d09557cf // A3 +data8 0x3f811111326ed15a // A2 +data8 0x3fc55555552ed1e2 // A1 +LOCAL_OBJECT_END(sinh_p_table) + + +.section .text +GLOBAL_IEEE754_ENTRY(sinhf) + +{ .mlx + getf.exp rSignexp_x = f8 // Must recompute if x unorm + movl r64DivLn2 = 0x40571547652B82FE // 64/ln(2) +} +{ .mlx + addl rTblAddr = @ltoff(_sinhf_table),gp + movl rRightShifter = 0x43E8000000000000 // DP Right Shifter +} +;; + +{ .mfi + // point to the beginning of the table + ld8 rTblAddr = [rTblAddr] + fclass.m p6, p0 = f8, 0x0b // Test for x=unorm + addl rA3 = 0x3E2AA, r0 // high bits of 1.0/6.0 rounded to SP +} +{ .mfi + nop.m 0 + fnorm.s1 fNormX = f8 // normalized x + addl rExpHalf = 0xFFFE, r0 // exponent of 1/2 +} +;; + +{ .mfi + setf.d f64DivLn2 = r64DivLn2 // load 64/ln(2) to FP reg + fclass.m p15, p0 = f8, 0x1e3 // test for NaT,NaN,Inf + nop.i 0 +} +{ .mlx + // load Right Shifter to FP reg + setf.d fRightShifter = rRightShifter + movl rLn2Div64 = 0x3F862E42FEFA39EF // DP ln(2)/64 in GR +} +;; + +{ .mfi + mov rExp_mask = 0x1ffff + fcmp.eq.s1 p13, p0 = f0, f8 // test for x = 0.0 + shl rA3 = rA3, 12 // 0x3E2AA000, approx to 1.0/6.0 in SP +} +{ .mfb + nop.m 0 + nop.f 0 +(p6) br.cond.spnt SINH_UNORM // Branch if x=unorm +} +;; + +SINH_COMMON: +{ .mfi + setf.exp fA2 = rExpHalf // load A2 to FP reg + nop.f 0 + mov rExp_bias = 0xffff +} +{ .mfb + setf.d fLn2Div64 = rLn2Div64 // load ln(2)/64 to FP reg +(p15) fma.s.s0 f8 = f8, f1, f0 // result if x = NaT,NaN,Inf +(p15) br.ret.spnt b0 // exit here if x = NaT,NaN,Inf +} +;; + +{ .mfi + // min overflow and max normal threshold + ldfps fMIN_SGL_OFLOW_ARG, fMAX_SGL_NORM_ARG = [rTblAddr], 8 + nop.f 0 + and rExp_x = rExp_mask, rSignexp_x // Biased exponent of x +} +{ .mfb + setf.s fA3 = rA3 // load A3 to FP reg + nop.f 0 +(p13) br.ret.spnt b0 // exit here if x=0.0, return x +} +;; + +{ .mfi + sub rExp_x = rExp_x, rExp_bias // True exponent of x + fmerge.s fAbsX = f0, fNormX // Form |x| + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + // x*(64/ln(2)) + Right Shifter + fma.s1 fNint = fNormX, f64DivLn2, fRightShifter + add rTblAddr = 8, rTblAddr +} +{ .mfb + cmp.gt p7, p0 = -2, rExp_x // Test |x| < 2^(-2) + fma.s1 fXsq = fNormX, fNormX, f0 // x*x for small path +(p7) br.cond.spnt SINH_SMALL // Branch if 0 < |x| < 2^-2 +} +;; + +{ .mfi + nop.m 0 + // check for overflow + fcmp.ge.s1 p12, p13 = fAbsX, fMIN_SGL_OFLOW_ARG + mov rJ_mask = 0x3f // 6-bit mask for J +} +;; + +{ .mfb + nop.m 0 + fms.s1 fN = fNint, f1, fRightShifter // n in FP register + // branch out if overflow +(p12) br.cond.spnt SINH_CERTAIN_OVERFLOW +} +;; + +{ .mfi + getf.sig rNJ = fNint // bits of n, j + // check for possible overflow + fcmp.gt.s1 p13, p0 = fAbsX, fMAX_SGL_NORM_ARG + nop.i 0 +} +;; + +{ .mfi + addl rN = 0xFFBF - 63, rNJ // biased and shifted n-1,j + fnma.s1 fR = fLn2Div64, fN, fNormX // R = x - N*ln(2)/64 + and rJ = rJ_mask, rNJ // bits of j +} +{ .mfi + sub rNJ_neg = r0, rNJ // bits of n, j for -x + nop.f 0 + andcm rN_mask = -1, rJ_mask // 0xff...fc0 to mask N +} +;; + +{ .mfi + shladd rJ = rJ, 3, rTblAddr // address in the 2^(j/64) table + nop.f 0 + and rN = rN_mask, rN // biased, shifted n-1 +} +{ .mfi + addl rN_neg = 0xFFBF - 63, rNJ_neg // -x biased, shifted n-1,j + nop.f 0 + and rJ_neg = rJ_mask, rNJ_neg // bits of j for -x +} +;; + +{ .mfi + ld8 rJ = [rJ] // Table value + nop.f 0 + shl rN = rN, 46 // 2^(n-1) bits in DP format +} +{ .mfi + shladd rJ_neg = rJ_neg, 3, rTblAddr // addr in 2^(j/64) table -x + nop.f 0 + and rN_neg = rN_mask, rN_neg // biased, shifted n-1 for -x +} +;; + +{ .mfi + ld8 rJ_neg = [rJ_neg] // Table value for -x + nop.f 0 + shl rN_neg = rN_neg, 46 // 2^(n-1) bits in DP format for -x +} +;; + +{ .mfi + or rN = rN, rJ // bits of 2^n * 2^(j/64) in DP format + nop.f 0 + nop.i 0 +} +;; + +{ .mmf + setf.d fT = rN // 2^(n-1) * 2^(j/64) + or rN_neg = rN_neg, rJ_neg // -x bits of 2^n * 2^(j/64) in DP + fma.s1 fRSqr = fR, fR, f0 // R^2 +} +;; + +{ .mfi + setf.d fT_neg = rN_neg // 2^(n-1) * 2^(j/64) for -x + fma.s1 fP = fA3, fR, fA2 // A3*R + A2 + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 fP_neg = fA3, fR, fA2 // A3*R + A2 for -x + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fP = fP, fRSqr, fR // P = (A3*R + A2)*R^2 + R + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 fP_neg = fP_neg, fRSqr, fR // P = (A3*R + A2)*R^2 + R, -x + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fmpy.s0 fTmp = fLn2Div64, fLn2Div64 // Force inexact + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fExp = fP, fT, fT // exp(x)/2 + nop.i 0 +} +{ .mfb + nop.m 0 + fma.s1 fExp_neg = fP_neg, fT_neg, fT_neg // exp(-x)/2 + // branch out if possible overflow result +(p13) br.cond.spnt SINH_POSSIBLE_OVERFLOW +} +;; + +{ .mfb + nop.m 0 + // final result in the absence of overflow + fms.s.s0 f8 = fExp, f1, fExp_neg // result = (exp(x)-exp(-x))/2 + // exit here in the absence of overflow + br.ret.sptk b0 // Exit main path, 0.25 <= |x| < 89.41598 +} +;; + +// Here if 0 < |x| < 0.25. Evaluate 9th order polynomial. +SINH_SMALL: +{ .mfi + add rAd1 = 0x200, rTblAddr + fcmp.lt.s1 p7, p8 = fNormX, f0 // Test sign of x + cmp.gt p6, p0 = -60, rExp_x // Test |x| < 2^(-60) +} +{ .mfi + add rAd2 = 0x210, rTblAddr + nop.f 0 + nop.i 0 +} +;; + +{ .mmb + ldfpd fA4, fA3 = [rAd1] + ldfpd fA2, fA1 = [rAd2] +(p6) br.cond.spnt SINH_VERY_SMALL // Branch if |x| < 2^(-60) +} +;; + +{ .mfi + nop.m 0 + fma.s1 fX3 = fXsq, fNormX, f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fX4 = fXsq, fXsq, f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fA43 = fXsq, fA4, fA3 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA21 = fXsq, fA2, fA1 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fA4321 = fX4, fA43, fA21 + nop.i 0 +} +;; + +// Dummy multiply to generate inexact +{ .mfi + nop.m 0 + fmpy.s0 fTmp = fA4, fA4 + nop.i 0 +} +{ .mfb + nop.m 0 + fma.s.s0 f8 = fA4321, fX3, fNormX + br.ret.sptk b0 // Exit if 2^-60 < |x| < 0.25 +} +;; + +SINH_VERY_SMALL: +// Here if 0 < |x| < 2^-60 +// Compute result by x + sgn(x)*x^2 to get properly rounded result +.pred.rel "mutex",p7,p8 +{ .mfi + nop.m 0 +(p7) fnma.s.s0 f8 = fNormX, fNormX, fNormX // If x<0 result ~ x-x^2 + nop.i 0 +} +{ .mfb + nop.m 0 +(p8) fma.s.s0 f8 = fNormX, fNormX, fNormX // If x>0 result ~ x+x^2 + br.ret.sptk b0 // Exit if |x| < 2^-60 +} +;; + +SINH_POSSIBLE_OVERFLOW: + +// Here if fMAX_SGL_NORM_ARG < x < fMIN_SGL_OFLOW_ARG +// This cannot happen if input is a single, only if input higher precision. +// Overflow is a possibility, not a certainty. + +// Recompute result using status field 2 with user's rounding mode, +// and wre set. If result is larger than largest single, then we have +// overflow + +{ .mfi + mov rGt_ln = 0x1007f // Exponent for largest single + 1 ulp + fsetc.s2 0x7F,0x42 // Get user's round mode, set wre + nop.i 0 +} +;; + +{ .mfi + setf.exp fGt_pln = rGt_ln // Create largest single + 1 ulp + fma.s.s2 fWre_urm_f8 = fP, fT, fT // Result with wre set + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fsetc.s2 0x7F,0x40 // Turn off wre in sf2 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcmp.ge.s1 p6, p0 = fWre_urm_f8, fGt_pln // Test for overflow + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + nop.f 0 +(p6) br.cond.spnt SINH_CERTAIN_OVERFLOW // Branch if overflow +} +;; + +{ .mfb + nop.m 0 + fma.s.s0 f8 = fP, fT, fT + br.ret.sptk b0 // Exit if really no overflow +} +;; + +// here if overflow +SINH_CERTAIN_OVERFLOW: +{ .mfi + addl r17ones_m1 = 0x1FFFE, r0 + fcmp.lt.s1 p6, p7 = fNormX, f0 // Test for x < 0 + nop.i 0 +} +;; + +{ .mmf + alloc r32 = ar.pfs, 0, 3, 4, 0 // get some registers + setf.exp fTmp = r17ones_m1 + fmerge.s FR_X = f8,f8 +} +;; + +{ .mfi + mov GR_Parameter_TAG = 128 +(p6) fnma.s.s0 FR_RESULT = fTmp, fTmp, f0 // Set I,O and -INF result + nop.i 0 +} +{ .mfb + nop.m 0 +(p7) fma.s.s0 FR_RESULT = fTmp, fTmp, f0 // Set I,O and +INF result + br.cond.sptk __libm_error_region +} +;; + +// Here if x unorm +SINH_UNORM: +{ .mfb + getf.exp rSignexp_x = fNormX // Must recompute if x unorm + fcmp.eq.s0 p6, p0 = f8, f0 // Set D flag + br.cond.sptk SINH_COMMON // Return to main path +} +;; + +GLOBAL_IEEE754_END(sinhf) + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfs [GR_Parameter_Y] = FR_Y,16 // Store Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; +.body +{ .mfi + stfs [GR_Parameter_X] = FR_X // Store Parameter 1 on stack + nop.f 0 + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address +} +{ .mib + stfs [GR_Parameter_Y] = FR_RESULT // Store Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; + +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; + +{ .mmi + ldfs f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) + + +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/e_sinhl.S b/sysdeps/ia64/fpu/e_sinhl.S new file mode 100644 index 0000000000..5b4a4addc2 --- /dev/null +++ b/sysdeps/ia64/fpu/e_sinhl.S @@ -0,0 +1,1117 @@ +.file "sinhl.s" + + +// Copyright (c) 2000 - 2002, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 04/04/00 Unwind support added +// 08/15/00 Bundle added after call to __libm_error_support to properly +// set [the previously overwritten] GR_Parameter_RESULT. +// 10/12/00 Update to set denormal operand and underflow flags +// 01/22/01 Fixed to set inexact flag for small args. Fixed incorrect +// call to __libm_error_support for 710.476 < x < 11357.2166. +// 05/02/01 Reworked to improve speed of all paths +// 05/20/02 Cleaned up namespace and sf0 syntax +// 12/04/02 Improved performance +// +// API +//============================================================== +// long double = sinhl(long double) +// input floating point f8 +// output floating point f8 +// +// Registers used +//============================================================== +// general registers: +// r14 -> r40 +// predicate registers used: +// p6 -> p11 +// floating-point registers used: +// f9 -> f15; f32 -> f90; +// f8 has input, then output +// +// Overview of operation +//============================================================== +// There are seven paths +// 1. 0 < |x| < 0.25 SINH_BY_POLY +// 2. 0.25 <=|x| < 32 SINH_BY_TBL +// 3. 32 <= |x| < 11357.21655 SINH_BY_EXP (merged path with SINH_BY_TBL) +// 4. |x| >= 11357.21655 SINH_HUGE +// 5. x=0 Done with early exit +// 6. x=inf,nan Done with early exit +// 7. x=denormal SINH_DENORM +// +// For double extended we get overflow for x >= 400c b174 ddc0 31ae c0ea +// >= 11357.21655 +// +// +// 1. SINH_BY_POLY 0 < |x| < 0.25 +// =============== +// Evaluate sinh(x) by a 13th order polynomial +// Care is take for the order of multiplication; and P_1 is not exactly 1/3!, +// P_2 is not exactly 1/5!, etc. +// sinh(x) = sign * (series(e^x) - series(e^-x))/2 +// = sign * (ax + ax^3/3! + ax^5/5! + ax^7/7! + ax^9/9! + ax^11/11! +// + ax^13/13!) +// = sign * (ax + ax * ( ax^2 * (1/3! + ax^4 * (1/7! + ax^4*1/11!)) ) +// + ax * ( ax^4 * (1/5! + ax^4 * (1/9! + ax^4*1/13!)) )) +// = sign * (ax + ax*p_odd + (ax*p_even)) +// = sign * (ax + Y_lo) +// sinh(x) = sign * (Y_hi + Y_lo) +// Note that ax = |x| +// +// 2. SINH_BY_TBL 0.25 <= |x| < 32.0 +// ============= +// sinh(x) = sinh(B+R) +// = sinh(B)cosh(R) + cosh(B)sinh(R) +// +// ax = |x| = M*log2/64 + R +// B = M*log2/64 +// M = 64*N + j +// We will calculate M and get N as (M-j)/64 +// The division is a shift. +// exp(B) = exp(N*log2 + j*log2/64) +// = 2^N * 2^(j*log2/64) +// sinh(B) = 1/2(e^B -e^-B) +// = 1/2(2^N * 2^(j*log2/64) - 2^-N * 2^(-j*log2/64)) +// sinh(B) = (2^(N-1) * 2^(j*log2/64) - 2^(-N-1) * 2^(-j*log2/64)) +// cosh(B) = (2^(N-1) * 2^(j*log2/64) + 2^(-N-1) * 2^(-j*log2/64)) +// 2^(j*log2/64) is stored as Tjhi + Tjlo , j= -32,....,32 +// Tjhi is double-extended (80-bit) and Tjlo is single(32-bit) +// +// R = ax - M*log2/64 +// R = ax - M*log2_by_64_hi - M*log2_by_64_lo +// exp(R) = 1 + R +R^2(1/2! + R(1/3! + R(1/4! + ... + R(1/n!)...) +// = 1 + p_odd + p_even +// where the p_even uses the A coefficients and the p_even uses +// the B coefficients +// +// So sinh(R) = 1 + p_odd + p_even -(1 -p_odd -p_even)/2 = p_odd +// cosh(R) = 1 + p_even +// sinh(B) = S_hi + S_lo +// cosh(B) = C_hi +// sinh(x) = sinh(B)cosh(R) + cosh(B)sinh(R) +// +// 3. SINH_BY_EXP 32.0 <= |x| < 11357.21655 ( 400c b174 ddc0 31ae c0ea ) +// ============== +// Can approximate result by exp(x)/2 in this region. +// Y_hi = Tjhi +// Y_lo = Tjhi * (p_odd + p_even) + Tjlo +// sinh(x) = Y_hi + Y_lo +// +// 4. SINH_HUGE |x| >= 11357.21655 ( 400c b174 ddc0 31ae c0ea ) +// ============ +// Set error tag and call error support +// +// +// Assembly macros +//============================================================== +r_ad5 = r14 +r_rshf_2to57 = r15 +r_exp_denorm = r15 +r_ad_mJ_lo = r15 +r_ad_J_lo = r16 +r_2Nm1 = r17 +r_2mNm1 = r18 +r_exp_x = r18 +r_ad_J_hi = r19 +r_ad2o = r19 +r_ad_mJ_hi = r20 +r_mj = r21 +r_ad2e = r22 +r_ad3 = r23 +r_ad1 = r24 +r_Mmj = r24 +r_rshf = r25 +r_M = r25 +r_N = r25 +r_jshf = r26 +r_exp_2tom57 = r26 +r_j = r26 +r_exp_mask = r27 +r_signexp_x = r28 +r_signexp_sgnx_0_5 = r28 +r_exp_0_25 = r29 +r_sig_inv_ln2 = r30 +r_exp_32 = r30 +r_exp_huge = r30 +r_ad4 = r31 + +GR_SAVE_PFS = r34 +GR_SAVE_B0 = r35 +GR_SAVE_GP = r36 + +GR_Parameter_X = r37 +GR_Parameter_Y = r38 +GR_Parameter_RESULT = r39 +GR_Parameter_TAG = r40 + + +f_ABS_X = f9 +f_X2 = f10 +f_X4 = f11 +f_tmp = f14 +f_RSHF = f15 + +f_Inv_log2by64 = f32 +f_log2by64_lo = f33 +f_log2by64_hi = f34 +f_A1 = f35 + +f_A2 = f36 +f_A3 = f37 +f_Rcub = f38 +f_M_temp = f39 +f_R_temp = f40 + +f_Rsq = f41 +f_R = f42 +f_M = f43 +f_B1 = f44 +f_B2 = f45 + +f_B3 = f46 +f_peven_temp1 = f47 +f_peven_temp2 = f48 +f_peven = f49 +f_podd_temp1 = f50 + +f_podd_temp2 = f51 +f_podd = f52 +f_poly65 = f53 +f_poly6543 = f53 +f_poly6to1 = f53 +f_poly43 = f54 +f_poly21 = f55 + +f_X3 = f56 +f_INV_LN2_2TO63 = f57 +f_RSHF_2TO57 = f58 +f_2TOM57 = f59 +f_smlst_oflow_input = f60 + +f_pre_result = f61 +f_huge = f62 +f_spos = f63 +f_sneg = f64 +f_Tjhi = f65 + +f_Tjlo = f66 +f_Tmjhi = f67 +f_Tmjlo = f68 +f_S_hi = f69 +f_SC_hi_temp = f70 + +f_S_lo_temp1 = f71 +f_S_lo_temp2 = f72 +f_S_lo_temp3 = f73 +f_S_lo_temp4 = f73 +f_S_lo = f74 +f_C_hi = f75 + +f_Y_hi = f77 +f_Y_lo_temp = f78 +f_Y_lo = f79 +f_NORM_X = f80 + +f_P1 = f81 +f_P2 = f82 +f_P3 = f83 +f_P4 = f84 +f_P5 = f85 + +f_P6 = f86 +f_Tjhi_spos = f87 +f_Tjlo_spos = f88 +f_huge = f89 +f_signed_hi_lo = f90 + + +// Data tables +//============================================================== + +// DO NOT CHANGE ORDER OF THESE TABLES +RODATA + +.align 16 +LOCAL_OBJECT_START(sinh_arg_reduction) +// data8 0xB8AA3B295C17F0BC, 0x00004005 // 64/log2 -- signif loaded with setf + data8 0xB17217F7D1000000, 0x00003FF8 // log2/64 high part + data8 0xCF79ABC9E3B39804, 0x00003FD0 // log2/64 low part + data8 0xb174ddc031aec0ea, 0x0000400c // Smallest x to overflow (11357.21655) +LOCAL_OBJECT_END(sinh_arg_reduction) + +LOCAL_OBJECT_START(sinh_p_table) + data8 0xB08AF9AE78C1239F, 0x00003FDE // P6 + data8 0xB8EF1D28926D8891, 0x00003FEC // P4 + data8 0x8888888888888412, 0x00003FF8 // P2 + data8 0xD732377688025BE9, 0x00003FE5 // P5 + data8 0xD00D00D00D4D39F2, 0x00003FF2 // P3 + data8 0xAAAAAAAAAAAAAAAB, 0x00003FFC // P1 +LOCAL_OBJECT_END(sinh_p_table) + +LOCAL_OBJECT_START(sinh_ab_table) + data8 0xAAAAAAAAAAAAAAAC, 0x00003FFC // A1 + data8 0x88888888884ECDD5, 0x00003FF8 // A2 + data8 0xD00D0C6DCC26A86B, 0x00003FF2 // A3 + data8 0x8000000000000002, 0x00003FFE // B1 + data8 0xAAAAAAAAAA402C77, 0x00003FFA // B2 + data8 0xB60B6CC96BDB144D, 0x00003FF5 // B3 +LOCAL_OBJECT_END(sinh_ab_table) + +LOCAL_OBJECT_START(sinh_j_hi_table) + data8 0xB504F333F9DE6484, 0x00003FFE + data8 0xB6FD91E328D17791, 0x00003FFE + data8 0xB8FBAF4762FB9EE9, 0x00003FFE + data8 0xBAFF5AB2133E45FB, 0x00003FFE + data8 0xBD08A39F580C36BF, 0x00003FFE + data8 0xBF1799B67A731083, 0x00003FFE + data8 0xC12C4CCA66709456, 0x00003FFE + data8 0xC346CCDA24976407, 0x00003FFE + data8 0xC5672A115506DADD, 0x00003FFE + data8 0xC78D74C8ABB9B15D, 0x00003FFE + data8 0xC9B9BD866E2F27A3, 0x00003FFE + data8 0xCBEC14FEF2727C5D, 0x00003FFE + data8 0xCE248C151F8480E4, 0x00003FFE + data8 0xD06333DAEF2B2595, 0x00003FFE + data8 0xD2A81D91F12AE45A, 0x00003FFE + data8 0xD4F35AABCFEDFA1F, 0x00003FFE + data8 0xD744FCCAD69D6AF4, 0x00003FFE + data8 0xD99D15C278AFD7B6, 0x00003FFE + data8 0xDBFBB797DAF23755, 0x00003FFE + data8 0xDE60F4825E0E9124, 0x00003FFE + data8 0xE0CCDEEC2A94E111, 0x00003FFE + data8 0xE33F8972BE8A5A51, 0x00003FFE + data8 0xE5B906E77C8348A8, 0x00003FFE + data8 0xE8396A503C4BDC68, 0x00003FFE + data8 0xEAC0C6E7DD24392F, 0x00003FFE + data8 0xED4F301ED9942B84, 0x00003FFE + data8 0xEFE4B99BDCDAF5CB, 0x00003FFE + data8 0xF281773C59FFB13A, 0x00003FFE + data8 0xF5257D152486CC2C, 0x00003FFE + data8 0xF7D0DF730AD13BB9, 0x00003FFE + data8 0xFA83B2DB722A033A, 0x00003FFE + data8 0xFD3E0C0CF486C175, 0x00003FFE + data8 0x8000000000000000, 0x00003FFF // Center of table + data8 0x8164D1F3BC030773, 0x00003FFF + data8 0x82CD8698AC2BA1D7, 0x00003FFF + data8 0x843A28C3ACDE4046, 0x00003FFF + data8 0x85AAC367CC487B15, 0x00003FFF + data8 0x871F61969E8D1010, 0x00003FFF + data8 0x88980E8092DA8527, 0x00003FFF + data8 0x8A14D575496EFD9A, 0x00003FFF + data8 0x8B95C1E3EA8BD6E7, 0x00003FFF + data8 0x8D1ADF5B7E5BA9E6, 0x00003FFF + data8 0x8EA4398B45CD53C0, 0x00003FFF + data8 0x9031DC431466B1DC, 0x00003FFF + data8 0x91C3D373AB11C336, 0x00003FFF + data8 0x935A2B2F13E6E92C, 0x00003FFF + data8 0x94F4EFA8FEF70961, 0x00003FFF + data8 0x96942D3720185A00, 0x00003FFF + data8 0x9837F0518DB8A96F, 0x00003FFF + data8 0x99E0459320B7FA65, 0x00003FFF + data8 0x9B8D39B9D54E5539, 0x00003FFF + data8 0x9D3ED9A72CFFB751, 0x00003FFF + data8 0x9EF5326091A111AE, 0x00003FFF + data8 0xA0B0510FB9714FC2, 0x00003FFF + data8 0xA27043030C496819, 0x00003FFF + data8 0xA43515AE09E6809E, 0x00003FFF + data8 0xA5FED6A9B15138EA, 0x00003FFF + data8 0xA7CD93B4E965356A, 0x00003FFF + data8 0xA9A15AB4EA7C0EF8, 0x00003FFF + data8 0xAB7A39B5A93ED337, 0x00003FFF + data8 0xAD583EEA42A14AC6, 0x00003FFF + data8 0xAF3B78AD690A4375, 0x00003FFF + data8 0xB123F581D2AC2590, 0x00003FFF + data8 0xB311C412A9112489, 0x00003FFF + data8 0xB504F333F9DE6484, 0x00003FFF +LOCAL_OBJECT_END(sinh_j_hi_table) + +LOCAL_OBJECT_START(sinh_j_lo_table) + data4 0x1EB2FB13 + data4 0x1CE2CBE2 + data4 0x1DDC3CBC + data4 0x1EE9AA34 + data4 0x9EAEFDC1 + data4 0x9DBF517B + data4 0x1EF88AFB + data4 0x1E03B216 + data4 0x1E78AB43 + data4 0x9E7B1747 + data4 0x9EFE3C0E + data4 0x9D36F837 + data4 0x9DEE53E4 + data4 0x9E24AE8E + data4 0x1D912473 + data4 0x1EB243BE + data4 0x1E669A2F + data4 0x9BBC610A + data4 0x1E761035 + data4 0x9E0BE175 + data4 0x1CCB12A1 + data4 0x1D1BFE90 + data4 0x1DF2F47A + data4 0x1EF22F22 + data4 0x9E3F4A29 + data4 0x1EC01A5B + data4 0x1E8CAC3A + data4 0x9DBB3FAB + data4 0x1EF73A19 + data4 0x9BB795B5 + data4 0x1EF84B76 + data4 0x9EF5818B + data4 0x00000000 // Center of table + data4 0x1F77CACA + data4 0x1EF8A91D + data4 0x1E57C976 + data4 0x9EE8DA92 + data4 0x1EE85C9F + data4 0x1F3BF1AF + data4 0x1D80CA1E + data4 0x9D0373AF + data4 0x9F167097 + data4 0x1EB70051 + data4 0x1F6EB029 + data4 0x1DFD6D8E + data4 0x9EB319B0 + data4 0x1EBA2BEB + data4 0x1F11D537 + data4 0x1F0D5A46 + data4 0x9E5E7BCA + data4 0x9F3AAFD1 + data4 0x9E86DACC + data4 0x9F3EDDC2 + data4 0x1E496E3D + data4 0x9F490BF6 + data4 0x1DD1DB48 + data4 0x1E65EBFB + data4 0x9F427496 + data4 0x1F283C4A + data4 0x1F4B0047 + data4 0x1F130152 + data4 0x9E8367C0 + data4 0x9F705F90 + data4 0x1EFB3C53 + data4 0x1F32FB13 +LOCAL_OBJECT_END(sinh_j_lo_table) + + +.section .text +GLOBAL_IEEE754_ENTRY(sinhl) + +{ .mlx + getf.exp r_signexp_x = f8 // Get signexp of x, must redo if unorm + movl r_sig_inv_ln2 = 0xb8aa3b295c17f0bc // significand of 1/ln2 +} +{ .mlx + addl r_ad1 = @ltoff(sinh_arg_reduction), gp + movl r_rshf_2to57 = 0x4778000000000000 // 1.10000 2^(63+57) +} +;; + +{ .mfi + ld8 r_ad1 = [r_ad1] + fmerge.s f_ABS_X = f0,f8 + mov r_exp_0_25 = 0x0fffd // Form exponent for 0.25 +} +{ .mfi + nop.m 0 + fnorm.s1 f_NORM_X = f8 + mov r_exp_2tom57 = 0xffff-57 +} +;; + +{ .mfi + setf.d f_RSHF_2TO57 = r_rshf_2to57 // Form const 1.100 * 2^120 + fclass.m p10,p0 = f8, 0x0b // Test for denorm + mov r_exp_mask = 0x1ffff +} +{ .mlx + setf.sig f_INV_LN2_2TO63 = r_sig_inv_ln2 // Form 1/ln2 * 2^63 + movl r_rshf = 0x43e8000000000000 // 1.1000 2^63 for right shift +} +;; + +{ .mfi + nop.m 0 + fclass.m p7,p0 = f8, 0x07 // Test if x=0 + nop.i 0 +} +{ .mfi + setf.exp f_2TOM57 = r_exp_2tom57 // Form 2^-57 for scaling + nop.f 0 + add r_ad3 = 0x90, r_ad1 // Point to ab_table +} +;; + +{ .mfi + setf.d f_RSHF = r_rshf // Form right shift const 1.100 * 2^63 + fclass.m p6,p0 = f8, 0xe3 // Test if x nan, inf + add r_ad4 = 0x2f0, r_ad1 // Point to j_hi_table midpoint +} +{ .mib + add r_ad2e = 0x20, r_ad1 // Point to p_table + nop.i 0 +(p10) br.cond.spnt SINH_DENORM // Branch if x denorm +} +;; + +// Common path -- return here from SINH_DENORM if x is unnorm +SINH_COMMON: +{ .mfi + ldfe f_smlst_oflow_input = [r_ad2e],16 + nop.f 0 + add r_ad5 = 0x580, r_ad1 // Point to j_lo_table midpoint +} +{ .mib + ldfe f_log2by64_hi = [r_ad1],16 + and r_exp_x = r_exp_mask, r_signexp_x +(p7) br.ret.spnt b0 // Exit if x=0 +} +;; + +// Get the A coefficients for SINH_BY_TBL +{ .mfi + ldfe f_A1 = [r_ad3],16 + fcmp.lt.s1 p8,p9 = f8,f0 // Test for x<0 + cmp.lt p7,p0 = r_exp_x, r_exp_0_25 // Test x < 0.25 +} +{ .mfb + add r_ad2o = 0x30, r_ad2e // Point to p_table odd coeffs +(p6) fma.s0 f8 = f8,f1,f0 // Result for x nan, inf +(p6) br.ret.spnt b0 // Exit for x nan, inf +} +;; + +// Calculate X2 = ax*ax for SINH_BY_POLY +{ .mfi + ldfe f_log2by64_lo = [r_ad1],16 + nop.f 0 + nop.i 0 +} +{ .mfb + ldfe f_A2 = [r_ad3],16 + fma.s1 f_X2 = f_NORM_X, f_NORM_X, f0 +(p7) br.cond.spnt SINH_BY_POLY +} +;; + +// Here if |x| >= 0.25 +SINH_BY_TBL: +// ****************************************************** +// STEP 1 (TBL and EXP) - Argument reduction +// ****************************************************** +// Get the following constants. +// Inv_log2by64 +// log2by64_hi +// log2by64_lo + + +// We want 2^(N-1) and 2^(-N-1). So bias N-1 and -N-1 and +// put them in an exponent. +// f_spos = 2^(N-1) and f_sneg = 2^(-N-1) +// 0xffff + (N-1) = 0xffff +N -1 +// 0xffff - (N +1) = 0xffff -N -1 + + +// Calculate M and keep it as integer and floating point. +// M = round-to-integer(x*Inv_log2by64) +// f_M = M = truncate(ax/(log2/64)) +// Put the integer representation of M in r_M +// and the floating point representation of M in f_M + +// Get the remaining A,B coefficients +{ .mmi + ldfe f_A3 = [r_ad3],16 + nop.m 0 + nop.i 0 +} +;; + +.pred.rel "mutex",p8,p9 +// Use constant (1.100*2^(63-6)) to get rounded M into rightmost significand +// |x| * 64 * 1/ln2 * 2^(63-6) + 1.1000 * 2^(63+(63-6)) +{ .mfi +(p8) mov r_signexp_sgnx_0_5 = 0x2fffe // signexp of -0.5 + fma.s1 f_M_temp = f_ABS_X, f_INV_LN2_2TO63, f_RSHF_2TO57 +(p9) mov r_signexp_sgnx_0_5 = 0x0fffe // signexp of +0.5 +} +;; + +// Test for |x| >= overflow limit +{ .mfi + ldfe f_B1 = [r_ad3],16 + fcmp.ge.s1 p6,p0 = f_ABS_X, f_smlst_oflow_input + nop.i 0 +} +;; + +{ .mfi + ldfe f_B2 = [r_ad3],16 + nop.f 0 + mov r_exp_32 = 0x10004 +} +;; + +// Subtract RSHF constant to get rounded M as a floating point value +// M_temp * 2^(63-6) - 2^63 +{ .mfb + ldfe f_B3 = [r_ad3],16 + fms.s1 f_M = f_M_temp, f_2TOM57, f_RSHF +(p6) br.cond.spnt SINH_HUGE // Branch if result will overflow +} +;; + +{ .mfi + getf.sig r_M = f_M_temp + nop.f 0 + cmp.ge p7,p6 = r_exp_x, r_exp_32 // Test if x >= 32 +} +;; + +// Calculate j. j is the signed extension of the six lsb of M. It +// has a range of -32 thru 31. + +// Calculate R +// ax - M*log2by64_hi +// R = (ax - M*log2by64_hi) - M*log2by64_lo + +{ .mfi + nop.m 0 + fnma.s1 f_R_temp = f_M, f_log2by64_hi, f_ABS_X + and r_j = 0x3f, r_M +} +;; + +{ .mii + nop.m 0 + shl r_jshf = r_j, 0x2 // Shift j so can sign extend it +;; + sxt1 r_jshf = r_jshf +} +;; + +{ .mii + nop.m 0 + shr r_j = r_jshf, 0x2 // Now j has range -32 to 31 + nop.i 0 +} +;; + +{ .mmi + shladd r_ad_J_hi = r_j, 4, r_ad4 // pointer to Tjhi + sub r_Mmj = r_M, r_j // M-j + sub r_mj = r0, r_j // Form -j +} +;; + +// The TBL and EXP branches are merged and predicated +// If TBL, p6 true, 0.25 <= |x| < 32 +// If EXP, p7 true, 32 <= |x| < overflow_limit +// +// N = (M-j)/64 +{ .mfi + ldfe f_Tjhi = [r_ad_J_hi] + fnma.s1 f_R = f_M, f_log2by64_lo, f_R_temp + shr r_N = r_Mmj, 0x6 // N = (M-j)/64 +} +{ .mfi + shladd r_ad_mJ_hi = r_mj, 4, r_ad4 // pointer to Tmjhi + nop.f 0 + shladd r_ad_mJ_lo = r_mj, 2, r_ad5 // pointer to Tmjlo +} +;; + +{ .mfi + sub r_2mNm1 = r_signexp_sgnx_0_5, r_N // signexp sgnx*2^(-N-1) + nop.f 0 + shladd r_ad_J_lo = r_j, 2, r_ad5 // pointer to Tjlo +} +{ .mfi + ldfe f_Tmjhi = [r_ad_mJ_hi] + nop.f 0 + add r_2Nm1 = r_signexp_sgnx_0_5, r_N // signexp sgnx*2^(N-1) +} +;; + +{ .mmf + ldfs f_Tmjlo = [r_ad_mJ_lo] + setf.exp f_sneg = r_2mNm1 // Form sgnx * 2^(-N-1) + nop.f 0 +} +;; + +{ .mmf + ldfs f_Tjlo = [r_ad_J_lo] + setf.exp f_spos = r_2Nm1 // Form sgnx * 2^(N-1) + nop.f 0 +} +;; + +// ****************************************************** +// STEP 2 (TBL and EXP) +// ****************************************************** +// Calculate Rsquared and Rcubed in preparation for p_even and p_odd + +{ .mmf + nop.m 0 + nop.m 0 + fma.s1 f_Rsq = f_R, f_R, f0 +} +;; + + +// Calculate p_even +// B_2 + Rsq *B_3 +// B_1 + Rsq * (B_2 + Rsq *B_3) +// p_even = Rsq * (B_1 + Rsq * (B_2 + Rsq *B_3)) +{ .mfi + nop.m 0 + fma.s1 f_peven_temp1 = f_Rsq, f_B3, f_B2 + nop.i 0 +} +// Calculate p_odd +// A_2 + Rsq *A_3 +// A_1 + Rsq * (A_2 + Rsq *A_3) +// podd = R + Rcub * (A_1 + Rsq * (A_2 + Rsq *A_3)) +{ .mfi + nop.m 0 + fma.s1 f_podd_temp1 = f_Rsq, f_A3, f_A2 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 f_Rcub = f_Rsq, f_R, f0 + nop.i 0 +} +;; + +// +// If TBL, +// Calculate S_hi and S_lo, and C_hi +// SC_hi_temp = sneg * Tmjhi +// S_hi = spos * Tjhi - SC_hi_temp +// S_hi = spos * Tjhi - (sneg * Tmjhi) +// C_hi = spos * Tjhi + SC_hi_temp +// C_hi = spos * Tjhi + (sneg * Tmjhi) + +{ .mfi + nop.m 0 +(p6) fma.s1 f_SC_hi_temp = f_sneg, f_Tmjhi, f0 + nop.i 0 +} +;; + +// If TBL, +// S_lo_temp3 = sneg * Tmjlo +// S_lo_temp4 = spos * Tjlo - S_lo_temp3 +// S_lo_temp4 = spos * Tjlo -(sneg * Tmjlo) +{ .mfi + nop.m 0 +(p6) fma.s1 f_S_lo_temp3 = f_sneg, f_Tmjlo, f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 f_peven_temp2 = f_Rsq, f_peven_temp1, f_B1 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 f_podd_temp2 = f_Rsq, f_podd_temp1, f_A1 + nop.i 0 +} +;; + +// If EXP, +// Compute sgnx * 2^(N-1) * Tjhi and sgnx * 2^(N-1) * Tjlo +{ .mfi + nop.m 0 +(p7) fma.s1 f_Tjhi_spos = f_Tjhi, f_spos, f0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p7) fma.s1 f_Tjlo_spos = f_Tjlo, f_spos, f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p6) fms.s1 f_S_hi = f_spos, f_Tjhi, f_SC_hi_temp + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p6) fma.s1 f_C_hi = f_spos, f_Tjhi, f_SC_hi_temp + nop.i 0 +} +{ .mfi + nop.m 0 +(p6) fms.s1 f_S_lo_temp4 = f_spos, f_Tjlo, f_S_lo_temp3 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 f_peven = f_Rsq, f_peven_temp2, f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 f_podd = f_podd_temp2, f_Rcub, f_R + nop.i 0 +} +;; + +// If TBL, +// S_lo_temp1 = spos * Tjhi - S_hi +// S_lo_temp2 = -sneg * Tmjlo + S_lo_temp1 +// S_lo_temp2 = -sneg * Tmjlo + (spos * Tjhi - S_hi) + +{ .mfi + nop.m 0 +(p6) fms.s1 f_S_lo_temp1 = f_spos, f_Tjhi, f_S_hi + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p6) fnma.s1 f_S_lo_temp2 = f_sneg, f_Tmjhi, f_S_lo_temp1 + nop.i 0 +} +;; + +// If EXP, +// Y_hi = sgnx * 2^(N-1) * Tjhi +// Y_lo = sgnx * 2^(N-1) * Tjhi * (p_odd + p_even) + sgnx * 2^(N-1) * Tjlo +{ .mfi + nop.m 0 +(p7) fma.s1 f_Y_lo_temp = f_peven, f1, f_podd + nop.i 0 +} +;; + +// If TBL, +// S_lo = S_lo_temp4 + S_lo_temp2 +{ .mfi + nop.m 0 +(p6) fma.s1 f_S_lo = f_S_lo_temp4, f1, f_S_lo_temp2 + nop.i 0 +} +;; + +// If TBL, +// Y_hi = S_hi +// Y_lo = C_hi*p_odd + (S_hi*p_even + S_lo) +{ .mfi + nop.m 0 +(p6) fma.s1 f_Y_lo_temp = f_S_hi, f_peven, f_S_lo + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p7) fma.s1 f_Y_lo = f_Tjhi_spos, f_Y_lo_temp, f_Tjlo_spos + nop.i 0 +} +;; + +// Dummy multiply to generate inexact +{ .mfi + nop.m 0 + fmpy.s0 f_tmp = f_B2, f_B2 + nop.i 0 +} +{ .mfi + nop.m 0 +(p6) fma.s1 f_Y_lo = f_C_hi, f_podd, f_Y_lo_temp + nop.i 0 +} +;; + +// f8 = answer = Y_hi + Y_lo +{ .mfi + nop.m 0 +(p7) fma.s0 f8 = f_Y_lo, f1, f_Tjhi_spos + nop.i 0 +} +;; + +// f8 = answer = Y_hi + Y_lo +{ .mfb + nop.m 0 +(p6) fma.s0 f8 = f_Y_lo, f1, f_S_hi + br.ret.sptk b0 // Exit for SINH_BY_TBL and SINH_BY_EXP +} +;; + + +// Here if 0 < |x| < 0.25 +SINH_BY_POLY: +{ .mmf + ldfe f_P6 = [r_ad2e],16 + ldfe f_P5 = [r_ad2o],16 + nop.f 0 +} +;; + +{ .mmi + ldfe f_P4 = [r_ad2e],16 + ldfe f_P3 = [r_ad2o],16 + nop.i 0 +} +;; + +{ .mmi + ldfe f_P2 = [r_ad2e],16 + ldfe f_P1 = [r_ad2o],16 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 f_X3 = f_NORM_X, f_X2, f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 f_X4 = f_X2, f_X2, f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 f_poly65 = f_X2, f_P6, f_P5 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 f_poly43 = f_X2, f_P4, f_P3 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 f_poly21 = f_X2, f_P2, f_P1 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 f_poly6543 = f_X4, f_poly65, f_poly43 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 f_poly6to1 = f_X4, f_poly6543, f_poly21 + nop.i 0 +} +;; + +// Dummy multiply to generate inexact +{ .mfi + nop.m 0 + fmpy.s0 f_tmp = f_P6, f_P6 + nop.i 0 +} +{ .mfb + nop.m 0 + fma.s0 f8 = f_poly6to1, f_X3, f_NORM_X + br.ret.sptk b0 // Exit SINH_BY_POLY +} +;; + + +// Here if x denorm or unorm +SINH_DENORM: +// Determine if x really a denorm and not a unorm +{ .mmf + getf.exp r_signexp_x = f_NORM_X + mov r_exp_denorm = 0x0c001 // Real denorms have exp < this + fmerge.s f_ABS_X = f0, f_NORM_X +} +;; + +{ .mfi + nop.m 0 + fcmp.eq.s0 p10,p0 = f8, f0 // Set denorm flag + nop.i 0 +} +;; + +// Set p8 if really a denorm +{ .mmi + and r_exp_x = r_exp_mask, r_signexp_x +;; + cmp.lt p8,p9 = r_exp_x, r_exp_denorm + nop.i 0 +} +;; + +// Identify denormal operands. +{ .mfb + nop.m 0 +(p8) fcmp.ge.unc.s1 p6,p7 = f8, f0 // Test sign of denorm +(p9) br.cond.sptk SINH_COMMON // Return to main path if x unorm +} +;; + +{ .mfi + nop.m 0 +(p6) fma.s0 f8 = f8,f8,f8 // If x +denorm, result=x+x^2 + nop.i 0 +} +{ .mfb + nop.m 0 +(p7) fnma.s0 f8 = f8,f8,f8 // If x -denorm, result=x-x^2 + br.ret.sptk b0 // Exit if x denorm +} +;; + + +// Here if |x| >= overflow limit +SINH_HUGE: +// for SINH_HUGE, put 24000 in exponent; take sign from input +{ .mmi + mov r_exp_huge = 0x15dbf +;; + setf.exp f_huge = r_exp_huge + nop.i 0 +} +;; + +.pred.rel "mutex",p8,p9 +{ .mfi + alloc r32 = ar.pfs,0,5,4,0 +(p8) fnma.s1 f_signed_hi_lo = f_huge, f1, f1 + nop.i 0 +} +{ .mfi + nop.m 0 +(p9) fma.s1 f_signed_hi_lo = f_huge, f1, f1 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s0 f_pre_result = f_signed_hi_lo, f_huge, f0 + mov GR_Parameter_TAG = 126 +} +;; + +GLOBAL_IEEE754_END(sinhl) + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue + +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; + +{ .mmi + stfe [GR_Parameter_Y] = f0,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; + +.body +{ .mib + stfe [GR_Parameter_X] = f8 // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfe [GR_Parameter_Y] = f_pre_result // STORE Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; + +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; + +{ .mmi + ldfe f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; + +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) + + +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/e_sqrt.S b/sysdeps/ia64/fpu/e_sqrt.S new file mode 100644 index 0000000000..53e60ef23f --- /dev/null +++ b/sysdeps/ia64/fpu/e_sqrt.S @@ -0,0 +1,342 @@ +.file "sqrt.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +//******************************************************************** +// History +//******************************************************************** +// 02/02/00 Initial version +// 04/04/00 Unwind support added +// 08/15/00 Bundle added after call to __libm_error_support to properly +// set [the previously overwritten] GR_Parameter_RESULT. +// 02/10/03 Reordered header: .section, .global, .proc, .align +// +//******************************************************************** +// +// Function: Combined sqrt(x), where +// _ +// sqrt(x) = |x, for double precision x values +// +//******************************************************************** +// +// Accuracy: Correctly Rounded +// +//******************************************************************** +// +// Resources Used: +// +// Floating-Point Registers: f8 (Input and Return Value) +// f7 -f14 +// +// General Purpose Registers: +// r32-r36 (Locals) +// r37-r40 (Used to pass arguments to error handling routine) +// +// Predicate Registers: p6, p7, p8 +// +//********************************************************************* +// +// IEEE Special Conditions: +// +// All faults and exceptions should be raised correctly. +// sqrt(QNaN) = QNaN +// sqrt(SNaN) = QNaN +// sqrt(+/-0) = +/-0 +// sqrt(negative) = QNaN and error handling is called +// +//********************************************************************* +// +// Implementation: +// +// Modified Newton-Raphson Algorithm +// +//********************************************************************* + +GR_SAVE_PFS = r33 +GR_SAVE_B0 = r34 +GR_SAVE_GP = r35 + +GR_Parameter_X = r37 +GR_Parameter_Y = r38 +GR_Parameter_RESULT = r39 + + +.section .text +GLOBAL_IEEE754_ENTRY(sqrt) +{ .mfi + alloc r32= ar.pfs,0,5,4,0 + frsqrta.s0 f7,p6=f8 + nop.i 0 +} { .mlx + // BEGIN DOUBLE PRECISION MINIMUM LATENCY SQUARE ROOT ALGORITHM + nop.m 0 + // exponent of +1/2 in r2 + movl r2 = 0x0fffe;; +} { .mmi + // +1/2 in f9 + setf.exp f9 = r2 + nop.m 0 + nop.i 0 +} { .mlx + nop.m 0 + // 3/2 in r3 + movl r3=0x3fc00000;; +} { .mfi + setf.s f10=r3 + // Step (1) + // y0 = 1/sqrt(a) in f7 + fclass.m.unc p7,p8 = f8,0x3A + nop.i 0;; +} { .mlx + nop.m 0 + // 5/2 in r2 + movl r2 = 0x40200000 +} { .mlx + nop.m 0 + // 63/8 in r3 + movl r3 = 0x40fc0000;; +} { .mfi + setf.s f11=r2 + // Step (2) + // h = +1/2 * y0 in f6 + (p6) fma.s1 f6=f9,f7,f0 + nop.i 0 +} { .mfi + setf.s f12=r3 + // Step (3) + // g = a * y0 in f7 + (p6) fma.s1 f7=f8,f7,f0 + nop.i 0 +} { .mfi + nop.m 0 + mov f15 = f8 + nop.i 0;; +} { .mlx + nop.m 0 + // 231/16 in r2 + movl r2 = 0x41670000;; +} { .mfi + setf.s f13=r2 + // Step (4) + // e = 1/2 - g * h in f9 + (p6) fnma.s1 f9=f7,f6,f9 + nop.i 0 +} { .mlx + nop.m 0 + // 35/8 in r3 + movl r3 = 0x408c0000;; +} { .mfi + setf.s f14=r3 + // Step (5) + // S = 3/2 + 5/2 * e in f10 + (p6) fma.s1 f10=f11,f9,f10 + nop.i 0 +} { .mfi + nop.m 0 + // Step (6) + // e2 = e * e in f11 + (p6) fma.s1 f11=f9,f9,f0 + nop.i 0;; +} { .mfi + nop.m 0 + // Step (7) + // t = 63/8 + 231/16 * e in f12 + (p6) fma.s1 f12=f13,f9,f12 + nop.i 0;; +} { .mfi + nop.m 0 + // Step (8) + // S1 = e + e2 * S in f10 + (p6) fma.s1 f10=f11,f10,f9 + nop.i 0 +} { .mfi + nop.m 0 + // Step (9) + // e4 = e2 * e2 in f11 + (p6) fma.s1 f11=f11,f11,f0 + nop.i 0;; +} { .mfi + nop.m 0 + // Step (10) + // t1 = 35/8 + e * t in f9 + (p6) fma.s1 f9=f9,f12,f14 + nop.i 0;; +} { .mfi + nop.m 0 + // Step (11) + // G = g + S1 * g in f12 + (p6) fma.s1 f12=f10,f7,f7 + nop.i 0 +} { .mfi + nop.m 0 + // Step (12) + // E = g * e4 in f7 + (p6) fma.s1 f7=f7,f11,f0 + nop.i 0;; +} { .mfi + nop.m 0 + // Step (13) + // u = S1 + e4 * t1 in f10 + (p6) fma.s1 f10=f11,f9,f10 + nop.i 0;; +} { .mfi + nop.m 0 + // Step (14) + // g1 = G + t1 * E in f7 + (p6) fma.d.s1 f7=f9,f7,f12 + nop.i 0;; +} { .mfi + nop.m 0 + // Step (15) + // h1 = h + u * h in f6 + (p6) fma.s1 f6=f10,f6,f6 + nop.i 0;; +} { .mfi + nop.m 0 + // Step (16) + // d = a - g1 * g1 in f9 + (p6) fnma.s1 f9=f7,f7,f8 + nop.i 0;; +} { .mfb + nop.m 0 + // Step (17) + // g2 = g1 + d * h1 in f7 + (p6) fma.d.s0 f8=f9,f6,f7 + (p6) br.ret.sptk b0 ;; +} + +{ .mfb + nop.m 0 + mov f8 = f7 + (p8) br.ret.sptk b0 ;; +} +{ .mfb + (p7) mov r40 = 49 + nop.f 0 + (p7) br.cond.sptk __libm_error_region ;; +} +// END DOUBLE PRECISION MINIMUM LATENCY SQUARE ROOT ALGORITHM +GLOBAL_IEEE754_END(sqrt) + +// Stack operations when calling error support. +// (1) (2) (3) (call) (4) +// sp -> + psp -> + psp -> + sp -> + +// | | | | +// | | <- GR_Y R3 ->| <- GR_RESULT | -> f8 +// | | | | +// | <-GR_Y Y2->| Y2 ->| <- GR_Y | +// | | | | +// | | <- GR_X X1 ->| | +// | | | | +// sp-64 -> + sp -> + sp -> + + +// save ar.pfs save b0 restore gp +// save gp restore ar.pfs + + +LOCAL_LIBM_ENTRY(__libm_error_region) + +// +// This branch includes all those special values that are not negative, +// with the result equal to frcpa(x) +// + +.prologue +// We are distinguishing between over(under)flow and letting +// __libm_error_support set ERANGE or do anything else needed. + +// (1) +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; + + +// (2) +{ .mmi + stfd [GR_Parameter_Y] = f0,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; + +.body +// (3) +{ .mib + stfd [GR_Parameter_X] = f15 // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfd [GR_Parameter_Y] = f8 // STORE Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + nop.m 0 + nop.m 0 + add GR_Parameter_RESULT = 48,sp +};; + +// (4) +{ .mmi + ldfd f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) + + + + +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/e_sqrtf.S b/sysdeps/ia64/fpu/e_sqrtf.S new file mode 100644 index 0000000000..daa20454d7 --- /dev/null +++ b/sysdeps/ia64/fpu/e_sqrtf.S @@ -0,0 +1,260 @@ +.file "sqrtf.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +//********************************************************************* +// History: +// +// 02/02/00 Initial version +// 04/04/00 Unwind support added +// 08/15/00 Bundle added after call to __libm_error_support to properly +// set [the previously overwritten] GR_Parameter_RESULT. +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// +//********************************************************************* +// +// Function: Combined sqrtf(x), where +// _ +// sqrtf(x) = |x, for single precision x values +// +//******************************************************************** +// +// Accuracy: Correctly Rounded +// +//******************************************************************** +// +// Resources Used: +// +// Floating-Point Registers: f8 (Input and Return Value) +// f7 -f14 +// +// General Purpose Registers: +// r32-r36 (Locals) +// r37-r40 (Used to pass arguments to error handling routine) +// +// Predicate Registers: p6, p7, p8 +// +//******************************************************************** +// +// IEEE Special Conditions: +// +// All faults and exceptions should be raised correctly. +// sqrtf(QNaN) = QNaN +// sqrtf(SNaN) = QNaN +// sqrtf(+/-0) = +/-0 +// sqrtf(negative) = QNaN and error handling is called +// +//******************************************************************** +// +// Implementation: +// +// Modified Newton-Raphson Algorithm +// +//******************************************************************** + + +GR_SAVE_B0 = r34 +GR_SAVE_PFS = r33 +GR_SAVE_GP = r35 + +GR_Parameter_X = r37 +GR_Parameter_Y = r38 +GR_Parameter_RESULT = r39 +GR_Parameter_TAG = r40 + +FR_X = f13 +FR_Y = f0 +FR_RESULT = f8 + + +.section .text +GLOBAL_IEEE754_ENTRY(sqrtf) +{ .mlx + // BEGIN SINGLE PRECISION MINIMUM LATENCY SQUARE ROOT ALGORITHM + alloc r32= ar.pfs,0,5,4,0 + // exponent of +1/2 in r2 + movl r2 = 0x0fffe +} { .mfi + // +1/2 in f12 + nop.m 0 + frsqrta.s0 f7,p6=f8 + nop.i 0;; +} { .mfi + setf.exp f12 = r2 + // Step (1) + // y0 = 1/sqrt(a) in f7 + fclass.m.unc p7,p8 = f8,0x3A + nop.i 0 +} { .mfi + nop.m 0 + // Make a copy of x just in case + mov f13 = f8 + nop.i 0;; +} { .mfi + nop.m 0 + // Step (2) + // H0 = 1/2 * y0 in f9 + (p6) fma.s1 f9=f12,f7,f0 + nop.i 0 +} { .mfi + nop.m 0 + // Step (3) + // S0 = a * y0 in f7 + (p6) fma.s1 f7=f8,f7,f0 + nop.i 0;; +} { .mfi + nop.m 0 + // Step (4) + // d = 1/2 - S0 * H0 in f10 + (p6) fnma.s1 f10=f7,f9,f12 + nop.i 0 +} { .mfi + nop.m 0 + // Step (0'') + // 3/2 = 1 + 1/2 in f12 + (p6) fma.s1 f12=f12,f1,f1 + nop.i 0;; +} { .mfi + nop.m 0 + // Step (5) + // e = 1 + 3/2 * d in f12 + (p6) fma.s1 f12=f12,f10,f1 + nop.i 0 +} { .mfi + nop.m 0 + // Step (6) + // T0 = d * S0 in f11 + (p6) fma.s1 f11=f10,f7,f0 + nop.i 0;; +} { .mfi + nop.m 0 + // Step (7) + // G0 = d * H0 in f10 + (p6) fma.s1 f10=f10,f9,f0 + nop.i 0;; +} { .mfi + nop.m 0 + // Step (8) + // S1 = S0 + e * T0 in f7 + (p6) fma.s.s1 f7=f12,f11,f7 + nop.i 0;; +} { .mfi + nop.m 0 + // Step (9) + // H1 = H0 + e * G0 in f12 + (p6) fma.s1 f12=f12,f10,f9 + nop.i 0;; +} { .mfi + nop.m 0 + // Step (10) + // d1 = a - S1 * S1 in f9 + (p6) fnma.s1 f9=f7,f7,f8 + nop.i 0;; +} { .mfb + nop.m 0 + // Step (11) + // S = S1 + d1 * H1 in f7 + (p6) fma.s.s0 f8=f9,f12,f7 + (p6) br.ret.sptk b0 ;; +// END SINGLE PRECISION MINIMUM LATENCY SQUARE ROOT ALGORITHM +} { .mfb + nop.m 0 + mov f8 = f7 + (p8) br.ret.sptk b0 ;; +} +// +// This branch includes all those special values that are not negative, +// with the result equal to frcpa(x) +// +GLOBAL_IEEE754_END(sqrtf) + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mii + add GR_Parameter_Y=-32,sp // Parameter 2 value + mov GR_Parameter_TAG = 50 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfs [GR_Parameter_Y] = FR_Y,16 // Store Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; +.body +{ .mib + stfs [GR_Parameter_X] = FR_X // Store Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y + nop.b 0 // Parameter 3 address +} +{ .mib + stfs [GR_Parameter_Y] = FR_RESULT // Store Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + nop.m 0 + nop.m 0 + add GR_Parameter_RESULT = 48,sp +};; +{ .mmi + ldfs f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) + + +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/e_sqrtl.S b/sysdeps/ia64/fpu/e_sqrtl.S new file mode 100644 index 0000000000..6a5735d45a --- /dev/null +++ b/sysdeps/ia64/fpu/e_sqrtl.S @@ -0,0 +1,275 @@ +.file "sqrtl.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +//******************************************************************** +// +// History: +// 02/02/00 (hand-optimized) +// 04/04/00 Unwind support added +// 08/15/00 Bundle added after call to __libm_error_support to properly +// set [the previously overwritten] GR_Parameter_RESULT. +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// +//******************************************************************** +// +// Function: Combined sqrtl(x), where +// _ +// sqrtl(x) = |x, for double-extended precision x values +// +//******************************************************************** +// +// Resources Used: +// +// Floating-Point Registers: f8 (Input and Return Value) +// f7 -f14 +// +// General Purpose Registers: +// r32-r36 (Locals) +// r37-r40 (Used to pass arguments to error handling routine) +// +// Predicate Registers: p6, p7, p8 +// +//******************************************************************** +// +// IEEE Special Conditions: +// +// All faults and exceptions should be raised correctly. +// sqrtl(QNaN) = QNaN +// sqrtl(SNaN) = QNaN +// sqrtl(+/-0) = +/-0 +// sqrtl(negative) = QNaN and error handling is called +// +//******************************************************************** +// +// Implementation: +// +// Modified Newton-Raphson Algorithm +// +//******************************************************************** + +GR_SAVE_PFS = r33 +GR_SAVE_B0 = r34 +GR_SAVE_GP = r35 +GR_Parameter_X = r37 +GR_Parameter_Y = r38 +GR_Parameter_RESULT = r39 +GR_Parameter_TAG = r40 + +FR_X = f15 +FR_Y = f0 +FR_RESULT = f8 + +.section .text +GLOBAL_IEEE754_ENTRY(sqrtl) +{ .mlx +alloc r32= ar.pfs,0,5,4,0 + // exponent of +1/2 in r2 + movl r2 = 0x0fffe;; +} { .mfi + // +1/2 in f10 + setf.exp f12 = r2 + // Step (1) + // y0 = 1/sqrt(a) in f7 + frsqrta.s0 f7,p6=f8 + nop.i 0;; +} { .mfi + nop.m 0 + // Step (2) + // H0 = +1/2 * y0 in f9 + (p6) fma.s1 f9=f12,f7,f0 + nop.i 0 +} { .mfi + nop.m 0 + // Step (3) + // S0 = a * y0 in f7 + (p6) fma.s1 f7=f8,f7,f0 + nop.i 0;; +} { .mfi + nop.m 0 + // Make copy input x + mov f13=f8 + nop.i 0 +} { .mfi + nop.m 0 + fclass.m.unc p7,p8 = f8,0x3A + nop.i 0;; +} { .mfi + nop.m 0 + // Step (4) + // d0 = 1/2 - S0 * H0 in f10 + (p6) fnma.s1 f10=f7,f9,f12 + nop.i 0;; +} +{ .mfi + nop.m 0 + mov f15=f8 + nop.i 0;; +} { .mfi + nop.m 0 + // Step (5) + // H1 = H0 + d0 * H0 in f9 + (p6) fma.s1 f9=f10,f9,f9 + nop.i 0 +} { .mfi + nop.m 0 + // Step (6) + // S1 = S0 + d0 * S0 in f7 + (p6) fma.s1 f7=f10,f7,f7 + nop.i 0;; +} { .mfi + nop.m 0 + // Step (7) + // d1 = 1/2 - S1 * H1 in f10 + (p6) fnma.s1 f10=f7,f9,f12 + nop.i 0;; +} { .mfi + nop.m 0 + // Step (8) + // H2 = H1 + d1 * H1 in f9 + (p6) fma.s1 f9=f10,f9,f9 + nop.i 0 +} { .mfi + nop.m 0 + // Step (9) + // S2 = S1 + d1 * S1 in f7 + (p6) fma.s1 f7=f10,f7,f7 + nop.i 0;; +} { .mfi + nop.m 0 + // Step (10) + // d2 = 1/2 - S2 * H2 in f10 + (p6) fnma.s1 f10=f7,f9,f12 + nop.i 0 +} { .mfi + nop.m 0 + // Step (11) + // e2 = a - S2 * S2 in f12 + (p6) fnma.s1 f12=f7,f7,f8 + nop.i 0;; +} { .mfi + nop.m 0 + // Step (12) + // S3 = S2 + d2 * S2 in f7 + (p6) fma.s1 f7=f12,f9,f7 + nop.i 0 +} { .mfi + nop.m 0 + // Step (13) + // H3 = H2 + d2 * H2 in f9 + (p6) fma.s1 f9=f10,f9,f9 + nop.i 0;; +} { .mfi + nop.m 0 + // Step (14) + // e3 = a - S3 * S3 in f12 + (p6) fnma.s1 f12=f7,f7,f8 + nop.i 0;; +} { .mfb + nop.m 0 + // Step (15) + // S = S3 + e3 * H3 in f7 + (p6) fma.s0 f8=f12,f9,f7 + (p6) br.ret.sptk b0 ;; +} +{ .mfb + mov GR_Parameter_TAG = 48 + mov f8 = f7 + (p8) br.ret.sptk b0 ;; +} +// +// This branch includes all those special values that are not negative, +// with the result equal to frcpa(x) +// + + +// END DOUBLE EXTENDED PRECISION MINIMUM LATENCY SQUARE ROOT ALGORITHM +GLOBAL_IEEE754_END(sqrtl) + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfe [GR_Parameter_Y] = FR_Y,16 // Save Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; +.body +{ .mib + stfe [GR_Parameter_X] = FR_X // Store Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y + nop.b 0 // Parameter 3 address +} +{ .mib + stfe [GR_Parameter_Y] = FR_RESULT // Store Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + nop.m 0 + nop.m 0 + add GR_Parameter_RESULT = 48,sp +};; +{ .mmi + ldfe f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region#) +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/fclrexcpt.c b/sysdeps/ia64/fpu/fclrexcpt.c new file mode 100644 index 0000000000..aa815fc789 --- /dev/null +++ b/sysdeps/ia64/fpu/fclrexcpt.c @@ -0,0 +1,39 @@ +/* Clear given exceptions in current floating-point environment. + Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Christian Boissat , 1999 and + Jes Sorensen , 2000 + + 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. */ + +#include + +int +feclearexcept (int excepts) +{ + fenv_t fpsr; + + /* Get the current state. */ + __asm__ __volatile__ ("mov.m %0=ar.fpsr" : "=r" (fpsr)); + + /* Clear the relevant bits. */ + fpsr &= ~(((fenv_t) ((excepts & FE_ALL_EXCEPT) << 13))); + /* Put the new state in effect. */ + __asm__ __volatile__ ("mov.m ar.fpsr=%0" :: "r" (fpsr) : "memory"); + + /* success */ + return 0; +} diff --git a/sysdeps/ia64/fpu/fedisblxcpt.c b/sysdeps/ia64/fpu/fedisblxcpt.c new file mode 100644 index 0000000000..9e809a67df --- /dev/null +++ b/sysdeps/ia64/fpu/fedisblxcpt.c @@ -0,0 +1,37 @@ +/* Disable floating-point exceptions. + Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jes Sorensen , 2000. + + 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. */ + +#include + +int +fedisableexcept (int excepts) +{ + fenv_t old_fpsr; + fenv_t new_fpsr; + + /* Get the current fpsr. */ + __asm__ __volatile__ ("mov.m %0=ar.fpsr" : "=r" (old_fpsr)); + + new_fpsr = old_fpsr | ((fenv_t) excepts & FE_ALL_EXCEPT); + + __asm__ __volatile__ ("mov.m ar.fpsr=%0" :: "r" (new_fpsr) : "memory"); + + return (old_fpsr ^ FE_ALL_EXCEPT) & FE_ALL_EXCEPT; +} diff --git a/sysdeps/ia64/fpu/feenablxcpt.c b/sysdeps/ia64/fpu/feenablxcpt.c new file mode 100644 index 0000000000..4775395c72 --- /dev/null +++ b/sysdeps/ia64/fpu/feenablxcpt.c @@ -0,0 +1,37 @@ +/* Enable floating-point exceptions. + Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jes Sorensen , 2000. + + 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. */ + +#include + +int +feenableexcept (int excepts) +{ + fenv_t old_fpsr; + fenv_t new_fpsr; + + /* Get the current fpsr. */ + __asm__ __volatile__ ("mov.m %0=ar.fpsr" : "=r" (old_fpsr)); + + new_fpsr = old_fpsr & ~((fenv_t) excepts & FE_ALL_EXCEPT); + + __asm__ __volatile__ ("mov.m ar.fpsr=%0" :: "r" (new_fpsr) : "memory"); + + return (old_fpsr ^ FE_ALL_EXCEPT) & FE_ALL_EXCEPT; +} diff --git a/sysdeps/ia64/fpu/fegetenv.c b/sysdeps/ia64/fpu/fegetenv.c new file mode 100644 index 0000000000..e240f75e43 --- /dev/null +++ b/sysdeps/ia64/fpu/fegetenv.c @@ -0,0 +1,30 @@ +/* Store current floating-point environment. + Copyright (C) 1997, 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Christian Boissat , 1999. + + 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. */ + +#include + +int +fegetenv (fenv_t *envp) +{ + __asm__ __volatile__ ("mov.m %0=ar.fpsr" : "=r" (*envp)); + + return 0; +} +libm_hidden_def (fegetenv) diff --git a/sysdeps/ia64/fpu/fegetexcept.c b/sysdeps/ia64/fpu/fegetexcept.c new file mode 100644 index 0000000000..243dc535f8 --- /dev/null +++ b/sysdeps/ia64/fpu/fegetexcept.c @@ -0,0 +1,31 @@ +/* Get enabled floating-point exceptions. + Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jes Sorensen , 2000. + + 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. */ + +#include + +int +fegetexcept (void) +{ + fenv_t fpsr; + + __asm__ __volatile__ ("mov.m %0=ar.fpsr" : "=r" (fpsr)); + + return (fpsr ^ FE_ALL_EXCEPT) & FE_ALL_EXCEPT; +} diff --git a/sysdeps/ia64/fpu/fegetround.c b/sysdeps/ia64/fpu/fegetround.c new file mode 100644 index 0000000000..dca98e7b7a --- /dev/null +++ b/sysdeps/ia64/fpu/fegetround.c @@ -0,0 +1,31 @@ +/* Return current rounding direction. + Copyright (C) 1999, 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Christian Boissat , 1999. + + 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. */ + +#include + +int +fegetround (void) +{ + fenv_t fpsr; + + __asm__ __volatile__ ("mov.m %0=ar.fpsr" : "=r" (fpsr)); + + return (fpsr >> 10) & 3; +} diff --git a/sysdeps/ia64/fpu/feholdexcpt.c b/sysdeps/ia64/fpu/feholdexcpt.c new file mode 100644 index 0000000000..e50fbfada5 --- /dev/null +++ b/sysdeps/ia64/fpu/feholdexcpt.c @@ -0,0 +1,42 @@ +/* Store current floating-point environment and clear exceptions. + Copyright (C) 1997, 1999, 2000, 2005, 2007 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Christian Boissat , 1999 + + 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. */ + +#include + +int +feholdexcept (fenv_t *envp) +{ + fenv_t fpsr; + /* Save the current state. */ + __asm__ __volatile__ ("mov.m %0=ar.fpsr" : "=r" (fpsr)); + *envp = fpsr; + + /* Set the trap disable bits. */ + fpsr |= FE_ALL_EXCEPT; + + /* And clear the exception bits. */ + fpsr &= ~(fenv_t) (FE_ALL_EXCEPT << 13); + + __asm__ __volatile__ ("mov.m ar.fpsr=%0" :: "r" (fpsr)); + + /* Success. */ + return 0; +} +libm_hidden_def (feholdexcept) diff --git a/sysdeps/ia64/fpu/fesetenv.c b/sysdeps/ia64/fpu/fesetenv.c new file mode 100644 index 0000000000..4c5c2edbbf --- /dev/null +++ b/sysdeps/ia64/fpu/fesetenv.c @@ -0,0 +1,42 @@ +/* Install given floating-point environment. + Copyright (C) 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jes Sorensen , 2000 + + 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. */ + +#include + +int +fesetenv (const fenv_t *envp) +{ + fenv_t env; + + /* + This stinks! + Magic encoding of default values: bit 62+63 set (which will never + happen for a user-space address) means it's not indirect. + */ + if (((fenv_t) envp >> 62) == 0x03) + env = (fenv_t) envp & 0x3fffffffffffffff; + else + env = *envp; + + __asm__ __volatile__ ("mov.m ar.fpsr=%0;;" :: "r" (env)); + + return 0; +} +libm_hidden_def (fesetenv) diff --git a/sysdeps/ia64/fpu/fesetround.c b/sysdeps/ia64/fpu/fesetround.c new file mode 100644 index 0000000000..13801c848b --- /dev/null +++ b/sysdeps/ia64/fpu/fesetround.c @@ -0,0 +1,42 @@ +/* Set current rounding direction. + Copyright (C) 1999, 2000, 2005, 2007 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Christian Boissat , 1999. + + 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. */ + +#include + +int +fesetround (int round) +{ + fenv_t fpsr; + + if (round & ~3) + return 1; + + /* Get the current state. */ + __asm__ __volatile__ ("mov.m %0=ar.fpsr" : "=r" (fpsr)); + + /* Set the relevant bits. */ + fpsr = (fpsr & ~(3UL << 10)) | ((fenv_t) round << 10); + + /* Put the new state in effect. */ + __asm__ __volatile__ ("mov.m ar.fpsr=%0" :: "r" (fpsr) : "memory"); + + return 0; +} +libm_hidden_def (fesetround) diff --git a/sysdeps/ia64/fpu/feupdateenv.c b/sysdeps/ia64/fpu/feupdateenv.c new file mode 100644 index 0000000000..f961fdca38 --- /dev/null +++ b/sysdeps/ia64/fpu/feupdateenv.c @@ -0,0 +1,41 @@ +/* Install given floating-point environment and raise exceptions. + Copyright (C) 1997, 2000, 2007, 2010 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Christian Boissat , 1999. + + 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. */ + +#include + +int +feupdateenv (const fenv_t *envp) +{ + fenv_t fpsr; + + + /* Get the current exception state. */ + __asm__ __volatile__ ("mov.m %0=ar.fpsr" : "=r" (fpsr)); + + /* Install new environment. */ + fesetenv (envp); + + /* Raise the saved exceptions. */ + feraiseexcept ((int) (fpsr >> 13) & FE_ALL_EXCEPT); + + /* Success. */ + return 0; +} +libm_hidden_def (feupdateenv) diff --git a/sysdeps/ia64/fpu/fgetexcptflg.c b/sysdeps/ia64/fpu/fgetexcptflg.c new file mode 100644 index 0000000000..13c84ed258 --- /dev/null +++ b/sysdeps/ia64/fpu/fgetexcptflg.c @@ -0,0 +1,35 @@ +/* Store current representation for exceptions. + Copyright (C) 1997, 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Christian Boissat , 1999. + + 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. */ + +#include + +int +fegetexceptflag (fexcept_t *flagp, int excepts) +{ + fenv_t fpsr; + + /* Get the current exceptions. */ + __asm__ __volatile__ ("mov.m %0=ar.fpsr" : "=r" (fpsr)); + + *flagp = (fexcept_t) ((fpsr >> 13) & excepts & FE_ALL_EXCEPT); + + /* Success. */ + return 0; +} diff --git a/sysdeps/ia64/fpu/fraiseexcpt.c b/sysdeps/ia64/fpu/fraiseexcpt.c new file mode 100644 index 0000000000..12b29ee5a6 --- /dev/null +++ b/sysdeps/ia64/fpu/fraiseexcpt.c @@ -0,0 +1,80 @@ +/* Raise given exceptions. + Copyright (C) 1997, 1998, 2000, 2001, 2002, 2007 + Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jes Sorensen , 2000. + + 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. */ + +#include +#include +#include +#include +#include + +int +feraiseexcept (int excepts) +{ + double tmp; + double dummy; + + /* Raise exceptions represented by EXPECTS. But we must raise only + one signal at a time. It is important the if the overflow/underflow + exception and the inexact exception are given at the same time, + the overflow/underflow exception precedes the inexact exception. */ + + /* We do these bits in assembly to be certain GCC doesn't optimize + away something important. */ + + /* First: invalid exception. */ + if (FE_INVALID & excepts) + { + /* One example of a invalid operation is 0 * Infinity. */ + tmp = 0; + __asm__ __volatile__ ("frcpa.s0 %0,p1=f0,f0" : "=f" (tmp) : : "p1" ); + } + + /* Next: division by zero. */ + if (FE_DIVBYZERO & excepts) + __asm__ __volatile__ ("frcpa.s0 %0,p1=f1,f0" : "=f" (tmp) : : "p1" ); + + /* Next: overflow. */ + if (FE_OVERFLOW & excepts) + { + dummy = DBL_MAX; + + __asm__ __volatile__ ("fadd.d.s0 %0=%1,%1" : "=f" (dummy) : "0" (dummy)); + } + + /* Next: underflow. */ + if (FE_UNDERFLOW & excepts) + { + dummy = DBL_MIN; + + __asm__ __volatile__ ("fnma.d.s0 %0=%1,%1,f0" : "=f" (tmp) : "f" (dummy)); + } + + /* Last: inexact. */ + if (FE_INEXACT & excepts) + { + dummy = DBL_MAX; + __asm__ __volatile__ ("fsub.d.s0 %0=%1,f1" : "=f" (dummy) : "0" (dummy)); + } + + /* Success. */ + return 0; +} +libm_hidden_def (feraiseexcept) diff --git a/sysdeps/ia64/fpu/fsetexcptflg.c b/sysdeps/ia64/fpu/fsetexcptflg.c new file mode 100644 index 0000000000..b3994827fa --- /dev/null +++ b/sysdeps/ia64/fpu/fsetexcptflg.c @@ -0,0 +1,41 @@ +/* Set floating-point environment exception handling. + Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Christian Boissat , 1999. + + 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. */ + +#include + +int +fesetexceptflag (const fexcept_t *flagp, int excepts) +{ + fenv_t fpsr; + + /* Get the current exception state. */ + __asm__ __volatile__ ("mov.m %0=ar.fpsr" : "=r" (fpsr)); + + fpsr &= ~(((fenv_t) excepts & FE_ALL_EXCEPT) << 13); + + /* Set all the bits that were called for. */ + fpsr |= ((*flagp & excepts & FE_ALL_EXCEPT) << 13); + + /* And store it back. */ + __asm__ __volatile__ ("mov.m ar.fpsr=%0" :: "r" (fpsr) : "memory"); + + /* Success. */ + return 0; +} diff --git a/sysdeps/ia64/fpu/ftestexcept.c b/sysdeps/ia64/fpu/ftestexcept.c new file mode 100644 index 0000000000..0d8190b46e --- /dev/null +++ b/sysdeps/ia64/fpu/ftestexcept.c @@ -0,0 +1,33 @@ +/* Test exception in current environment. + Copyright (C) 1997, 1999, 2000, 2010 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Christian Boissat , 1999. + + 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. */ + +#include + +int +fetestexcept (int excepts) +{ + fenv_t fpsr; + + /* Get current exceptions. */ + __asm__ __volatile__ ("mov.m %0=ar.fpsr" : "=r" (fpsr)); + + return (fpsr >> 13) & excepts & FE_ALL_EXCEPT; +} +libm_hidden_def (fetestexcept) diff --git a/sysdeps/ia64/fpu/gen_import_file_list b/sysdeps/ia64/fpu/gen_import_file_list new file mode 100644 index 0000000000..b8bd6a54f3 --- /dev/null +++ b/sysdeps/ia64/fpu/gen_import_file_list @@ -0,0 +1,90 @@ +#!/bin/sh + +libm_dir=$1 + +import() { + # $1 = name + # $2 = source file-name + # $3 = destination file-name + echo "$1 $libm_dir/$2 $3" +} + +import_c() { + # $1 = name + # $2 = source file-name + # $3 = destination file-name + echo "$1 $libm_dir/$2 $3" +} + +dummy_files=" +libm_cpu_defs.h +libm_error_codes.h +libm_support.h +libm_error.c +" + +for f in $dummy_files +do + import_c DUMMY $f $f +done + +import_c scalblnf scalblnf.c s_scalblnf.c + +for f in acos acosh asin atanh cosh exp2 exp10 fmod log2 pow remainder \ + scalb sinh sqrt; do + for t in "" f l; do + import $f$t $f$t.s e_$f$t.S + done +done + +for f in atan2 exp; do + for t in "" f; do + import $f$t $f$t.s e_$f$t.S + done +done +import "atan" atan.s s_atan.S +import "atanf" atanf.s s_atanf.S +import "atan(2)?l" atanl.s s_atanl.S +import "exp(m1)?l" expl_m1.s s_expm1l.S + +for t in "" f l; do + import "log(10)?$t" log$t.s e_log$t.S + import tgamma$t tgamma$t.s w_tgamma$t.S + import "(hypot|cabs)$t" hypot$t.s e_hypot$t.S +done + +for f in asinh cbrt ceil erf erfc fabs floor \ + ilogb log1p logb modf nearbyint nextafter nexttoward \ + rint round significand fdim fma fmax tanh trunc; do + for t in "" f l; do + import $f$t $f$t.s s_$f$t.S + done +done + +for t in "" f l; do + import "(tan|cot)$t" tancot$t.s s_tan$t.S +done + +for t in "" f l; do + import "(sin|cos)$t" sincos$t.s s_cos$t.S + import_c frexp$t frexp$t.c s_frexp$t.c + import_c ldexp$t ldexp$t.c s_ldexp$t.c + import_c scalbn$t scalbn$t.c s_scalbn$t.c +done + +import expm1 exp_m1.s s_expm1.S +import expm1f expf_m1.s s_expm1f.S + +for f in frexp frexpf frexpl reduce; do + import __libm_$f libm_$f.s libm_$f.S +done + +for t in "" f l; do + import __libm_ldexp$t libm_ldexp$t.s s_libm_ldexp$t.S + import "(__libm_)?(sincos|cis)$t" libm_sincos$t.s libm_sincos$t.S + import __libm_lgamma$t libm_lgamma$t.s libm_lgamma$t.S + import __libm_scalbn$t libm_scalbn$t.s s_libm_scalbn$t.S +done +import __libm_scalblnf libm_scalblnf.s libm_scalblnf.S +import "__libm_(sin|cos|sincos)_large" libm_sincos_large.s \ + libm_sincos_large.S diff --git a/sysdeps/ia64/fpu/halfulp.c b/sysdeps/ia64/fpu/halfulp.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/halfulp.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/import_check b/sysdeps/ia64/fpu/import_check new file mode 100644 index 0000000000..21176f578d --- /dev/null +++ b/sysdeps/ia64/fpu/import_check @@ -0,0 +1,81 @@ +#!/bin/sh + +objdir="$1" + +num_errors=0 + +check_syms() { + global_count=0 + entry_count=0 + while read value type name; do + if [ $value = "U" ]; then + name=$type + # undefined symbols must start with double-underscore + if [ $(expr $name : '\(..\)') != "__" ]; then + echo -e "$(basename $file):\tError: undefined reference $name doesn't start with \"__\"." + num_errors=$(($num_errors + 1)) + fi + continue + fi + + case "$type" in + W) + entry_count=$(($entry_count + 1)) + ;; + *) + entry_count=$(($entry_count + 1)) + if [ "$(expr $name : '\(..\)')" != "__" ]; then + global_count=$(($global_count + 1)) + fi + ;; + esac + done + if [ $entry_count -gt 1 -a $global_count -gt 0 ]; then + echo -e "$(basename $file):\tError: detected $global_count strong " \ + "global and $entry_count entry-points." + num_errors=$(($num_errors + 1)) + fi +} + +check_file() { + file=$1 + size=$(readelf -S $file | \ + (sz=0; while read line; do + if echo $line | fgrep -q " .rodata"; then + read sz rest + break + fi + done; + printf "%d" 0x$sz)) + + summands=$(readelf -s $file | fgrep " OBJECT " | tr -s ' ' | + cut -f4 -d' ' | sed 's,$,+,')0 + sum=$(($summands)) + if [ $sum != $size ]; then + echo -e "$(basename $file):\tError: sum of objects=$sum bytes, .rodata size=$size bytes" + num_errors=$(($num_errors + 1)) + fi + + tmp=$(tempfile -p syms) + nm -g $file > $tmp + check_syms < $tmp +} + +do_checks() { + echo "Note: 1 error expected in w_tgammal.o due to 64-byte alignment-padding." + while read func_pattern src_file dst_file; do + if [ "$(expr $dst_file : '.*\(S\)$')" = "S" ]; then + objfile=$(expr $dst_file : '\(.*\)[.]S$') + check_file $objdir/$objfile.o + fi + done +} + +do_checks < import_file_list + +if [ $num_errors -gt 0 ]; then + echo "FAILURE: Detected $num_errors error(s)." + exit 1 +fi +echo SUCCESS +exit 0 diff --git a/sysdeps/ia64/fpu/import_diffs b/sysdeps/ia64/fpu/import_diffs new file mode 100644 index 0000000000..147280d5fd --- /dev/null +++ b/sysdeps/ia64/fpu/import_diffs @@ -0,0 +1,7 @@ +#!/bin/sh +do_diffs() { + while read func_pattern src_file dst_file; do + diff -up $src_file $dst_file + done +} +do_diffs < import_file_list diff --git a/sysdeps/ia64/fpu/import_file.awk b/sysdeps/ia64/fpu/import_file.awk new file mode 100644 index 0000000000..97fe77e181 --- /dev/null +++ b/sysdeps/ia64/fpu/import_file.awk @@ -0,0 +1,151 @@ +BEGIN { + getline; + while (!match($0, "^/[/*] static char cvs_id")) { + print; + getline; + } + getline; + while (!match($0, "^// WARRANTY DISCLAIMER")) { + print; + if (!getline) { + break; + } + } + if (getline) + { + printf \ +"// Redistribution and use in source and binary forms, with or without\n" \ +"// modification, are permitted provided that the following conditions are\n" \ +"// met:\n" \ +"//\n" \ +"// * Redistributions of source code must retain the above copyright\n" \ +"// notice, this list of conditions and the following disclaimer.\n" \ +"//\n" \ +"// * Redistributions in binary form must reproduce the above copyright\n" \ +"// notice, this list of conditions and the following disclaimer in the\n" \ +"// documentation and/or other materials provided with the distribution.\n" \ +"//\n" \ +"// * The name of Intel Corporation may not be used to endorse or promote\n" \ +"// products derived from this software without specific prior written\n" \ +"// permission.\n\n"; + if (LICENSE_ONLY == "y") { + do { + print; + } while (getline); + } + } +} + +/^[.]data/ { + print "RODATA"; + next; +} +/^([a-zA-Z_0-9]*_(tb[l0-9]|Tt|[tT]able|data|low|coeffs|constants|CONSTANTS|reduction|Stirling)(_?([1-9cdimpqstPQT]+|tail))?|(Constants|Poly|coeff)_.+|(double_sin_?cos|double_cis)[fl]?_.+):/ { + table_name=substr($1,1,length($1)-1); + printf "LOCAL_OBJECT_START(%s)\n", table_name; + getline; + while (!match($0, "^[ \t]*data")) { + print; + getline; + } + while (match($0, "(//|^[ \t]*data)")) { + print; + getline; + } + printf "LOCAL_OBJECT_END(%s)\n\n", table_name; + next; +} +/^[.]proc[ \t]+__libm_(error_region|callout)/ { + printf "LOCAL_LIBM_ENTRY(%s)\n", $2; + getline; + next; +} +/^[.]endp[ \t]+__libm_(error_region|callout)/ { + printf "LOCAL_LIBM_END(%s)\n", $2; + next; +} +/^[.]global/ { + split($2, part, "#"); + name=part[1]; + if (match(name, "^"FUNC"$")) { + next; + } +} +/^[.]proc/ { + split($2, part, "#"); + name=part[1]; + if (match(name, "^"FUNC"$")) { + local_funcs=("^(" \ + "cis|cisf|cisl" \ + "|cabs|cabsf|cabsl" \ + "|cot|cotf|cotl" \ + ")$"); + ieee754_funcs=("^(" \ + "atan2|atan2f|atan2l|atanl" \ + "|cos|cosf|cosl" \ + "|cosh|coshf|coshl" \ + "|exp|expf|expl" \ + "|exp10|exp10f|exp10l" \ + "|expm1|expm1f|expm1l" \ + "|fmod|fmodf|fmodl" \ + "|hypot|hypotf|hypotl" \ + "|fabs|fabsf|fabsl" \ + "|floor|floorf|floorl" \ + "|log1p|log1pf|log1pl" \ + "|log|log10|log10f|log10l|log2l|logf|logl" \ + "|remainder|remainderf|remainderl|" \ + "|rint|rintf|rintl|" \ + "|scalb|scalbf|scalbl" \ + "|sin|sinf|sinl" \ + "|sincos|sincosf|sincosl" \ + "|sinh|sinhf|sinhl" \ + "|sqrt|sqrtf|sqrtl" \ + "|tan|tanf|tanl" \ + ")$"); + if (match(name, ieee754_funcs)) { + type="GLOBAL_IEEE754"; + } else if (match (name, local_funcs)) { + type="LOCAL_LIBM"; + } else { + type="GLOBAL_LIBM"; + } + printf "%s_ENTRY(%s)\n", type, name; + getline; + while (!match($0, "^"name"#?:")) { + getline; + } + getline; + while (!match($0, "^.endp")) { + print + getline; + } + printf "%s_END(%s)\n", type, name; + if (match(name, "^exp10[fl]?$")) { + t=substr(name,6) + printf "weak_alias (exp10%s, pow10%s)\n", t, t + } + next; + } +} +/^[a-zA-Z_]+:/ { + split($1, part, ":"); + name=part[1]; + if (match(name, "^"FUNC"$")) { + printf "GLOBAL_LIBM_ENTRY(%s)\n", name; + getline; + while (!match($0, "^"name"#?:")) { + getline; + } + getline; + while (!match($0, "^.endp")) { + print + getline; + } + getline; + printf "GLOBAL_LIBM_END(%s)\n", name; + next; + } +} + +{ print } + diff --git a/sysdeps/ia64/fpu/import_intel_libm b/sysdeps/ia64/fpu/import_intel_libm new file mode 100644 index 0000000000..1aaa646a93 --- /dev/null +++ b/sysdeps/ia64/fpu/import_intel_libm @@ -0,0 +1,106 @@ +#!/bin/sh + +# Notes: + +# We don't import copysign finite, fpclassify, isinf, isnan, and signbit +# since our own versions are nicer and just as correct and fast (except +# perhaps that they don't handle non-finite arguments well?). +# +# Also, leave out cabs for now since it doesn't seem overridable in +# glibc. + +libm_dir=$1 + +import_s() { + # $1 = name + # $2 = source file-name + # $3 = destination file-name + echo "Importing $1 from $2 -> $3" + rm -f $3 + awk -f import_file.awk FUNC=$1 $2 > $3 +} + +import_c() { + # $1 = name + # $2 = source file-name + # $3 = destination file-name + echo "Importing $1 from $2 -> $3" + rm -f $3 + awk -f import_file.awk LICENSE_ONLY=y $2 > $3 +} + +do_imports() { + while read func_pattern src_file dst_file; do + case $src_file in + *.[ch]) + import_c "$func_pattern" "$src_file" "$dst_file" + ;; + *) + import_s "$func_pattern" "$src_file" "$dst_file" + ;; + esac + done +} + +./gen_import_file_list $libm_dir > import_file_list + +do_imports < import_file_list + +emptyfiles=" +e_gamma_r.c +e_gammaf_r.c +e_gammal_r.c +s_sincos.c +s_sincosf.c +s_sincosl.c +t_exp.c +w_acosh.c +w_acoshf.c +w_acoshl.c +w_atanh.c +w_atanhf.c +w_atanhl.c +w_exp10.c +w_exp10f.c +w_exp10l.c +w_exp2.c +w_exp2f.c +w_exp2l.c +w_expl.c +w_lgamma_r.c +w_lgammaf_r.c +w_lgammal_r.c +w_log2.c +w_log2f.c +w_log2l.c +w_sinh.c +w_sinhf.c +w_sinhl.c +" +for f in $emptyfiles +do + rm -f $f + echo "/* Not needed. */" > $f +done + +removedfiles=" +libm_atan2_reg.S +s_ldexp.S +s_ldexpf.S +s_ldexpl.S +s_scalbn.S +s_scalbnf.S +s_scalbnl.S +" + +rm -f $removedfiles + +for f in lgammaf_r.c lgammal_r.c lgamma_r.c +do + import_c $f $libm_dir/$f e_$f +done + +for f in lgamma.c lgammaf.c lgammal.c +do + import_c $f $libm_dir/$f w_$f +done diff --git a/sysdeps/ia64/fpu/k_rem_pio2.c b/sysdeps/ia64/fpu/k_rem_pio2.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/k_rem_pio2.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/k_rem_pio2f.c b/sysdeps/ia64/fpu/k_rem_pio2f.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/k_rem_pio2f.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/k_rem_pio2l.c b/sysdeps/ia64/fpu/k_rem_pio2l.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/k_rem_pio2l.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/libc_libm_error.c b/sysdeps/ia64/fpu/libc_libm_error.c new file mode 100644 index 0000000000..5a34878d71 --- /dev/null +++ b/sysdeps/ia64/fpu/libc_libm_error.c @@ -0,0 +1,14 @@ +/* Error handling in libm-style for libc. */ + +#include + +#include "libm_support.h" + + +void +__libm_error_support (void *arg1, void *arg2, void *retval, + error_types input_tag) +{ + __set_errno (ERANGE); +} +libc_hidden_def (__libm_error_support) diff --git a/sysdeps/ia64/fpu/libm-symbols.h b/sysdeps/ia64/fpu/libm-symbols.h new file mode 100644 index 0000000000..5b5e4b7d7b --- /dev/null +++ b/sysdeps/ia64/fpu/libm-symbols.h @@ -0,0 +1,64 @@ +#include +#undef ret /* get rid of the stupid "ret" macro; it breaks br.ret */ + +/* Support for compatible assembler handling. */ + +#ifdef __ELF__ +# define ASM_SIZE_DIRECTIVE(name) .size name,.-name +# define ASM_TYPE_DIRECTIVE(name,T) .type name,T +#else +# define ASM_SIZE_DIRECTIVE(name) +# define ASM_TYPE_DIRECTIVE(name,T) +#endif + +#define LOCAL_LIBM_ENTRY(name) \ + .proc name; \ + name: + +#define LOCAL_LIBM_END(name) \ + .endp name; \ + ASM_SIZE_DIRECTIVE(name) + + +#define RODATA .rodata +#define LOCAL_OBJECT_START(name) \ + name:; \ + ASM_TYPE_DIRECTIVE(name, @object) +#define LOCAL_OBJECT_END(name) \ + ASM_SIZE_DIRECTIVE(name) + +#define GLOBAL_LIBM_ENTRY(name) \ + LOCAL_LIBM_ENTRY(name); \ + .global name +#define GLOBAL_LIBM_END(name) LOCAL_LIBM_END(name) + +#define INTERNAL_LIBM_ENTRY(name) \ + GLOBAL_LIBM_ENTRY(__libm_##name); \ + .global __libm_##name +#define INTERNAL_LIBM_END(name) GLOBAL_LIBM_END(__libm_##name) + +#define WEAK_LIBM_ENTRY(name) \ + .align 32; \ + LOCAL_LIBM_ENTRY(__##name); \ + .global __##name; \ + __##name: +#define WEAK_LIBM_END(name) \ + weak_alias (__##name, name); \ + .hidden __##name; \ + LOCAL_LIBM_END(__##name); \ + ASM_SIZE_DIRECTIVE(__##name); \ + ASM_TYPE_DIRECTIVE(__##name, @function) + +#define GLOBAL_IEEE754_ENTRY(name) \ + WEAK_LIBM_ENTRY(name); \ + .global __ieee754_##name; \ + .hidden __ieee754_##name; \ + __ieee754_##name: +#define GLOBAL_IEEE754_END(name) \ + WEAK_LIBM_END(name); \ + ASM_SIZE_DIRECTIVE(__ieee754_##name); \ + ASM_TYPE_DIRECTIVE(__ieee754_##name, @function) + +#if defined ASSEMBLER && !defined NOT_IN_libc +# define __libm_error_support HIDDEN_JUMPTARGET(__libm_error_support) +#endif diff --git a/sysdeps/ia64/fpu/libm-test-ulps b/sysdeps/ia64/fpu/libm-test-ulps new file mode 100644 index 0000000000..c5a2a08549 --- /dev/null +++ b/sysdeps/ia64/fpu/libm-test-ulps @@ -0,0 +1,1146 @@ +# Begin of automatic generation + +# cacos +Test "Imaginary part of: cacos (0.75 + 1.25 i) == 1.11752014915610270578240049553777969 - 1.13239363160530819522266333696834467 i": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +# cacosh +Test "Real part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": +double: 1 +float: 7 +idouble: 1 +ifloat: 7 +ildouble: 7 +ldouble: 7 +Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +# casin +Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +# casinh +Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": +double: 5 +float: 1 +idouble: 5 +ifloat: 1 +ildouble: 5 +ldouble: 5 +Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": +double: 3 +float: 6 +idouble: 3 +ifloat: 6 +ildouble: 5 +ldouble: 5 +Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# catan +Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# catanh +Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": +double: 4 +idouble: 4 +ildouble: 1 +ldouble: 1 +Test "Real part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i": +double: 1 +idouble: 1 + +# ccos +Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": +ildouble: 1 +ldouble: 1 + +# ccosh +Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": +float: 1 +ifloat: 1 + +# cexp +Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": +float: 1 +ifloat: 1 +Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": +ildouble: 1 +ldouble: 1 + +# clog +Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# clog10 +Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf + inf i) == inf + 3/4 pi*log10(e) i": +double: 1 +idouble: 1 +Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# cos +Test "cos (0.80190127184058835) == 0.69534156199418473": +double: 1 +idouble: 1 +Test "cos (M_PI_6l * 2.0) == 0.5": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "cos (M_PI_6l * 4.0) == -0.5": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos (pi/2) == 0": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# cpow +Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i": +double: 1 +float: 4 +idouble: 1 +ifloat: 4 +ildouble: 6 +ldouble: 6 +Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i": +double: 2 +float: 3 +idouble: 2 +ifloat: 3 +ildouble: 3 +ldouble: 3 +Test "Real part of: cpow (2 + 0 i, 10 + 0 i) == 1024.0 + 0.0 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": +double: 1 +float: 5 +idouble: 1 +ifloat: 5 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": +float: 2 +ifloat: 2 +ildouble: 4 +ldouble: 4 +Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i": +double: 2 +float: 3 +idouble: 2 +ifloat: 3 +ildouble: 1 +ldouble: 1 + +# csin +Test "Real part of: csin (0.75 + 1.25 i) == 1.28722291002649188575873510790565441 + 1.17210635989270256101081285116138863 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csin (0.75 + 1.25 i) == 1.28722291002649188575873510790565441 + 1.17210635989270256101081285116138863 i": +float: 1 +ifloat: 1 + +# csinh +Test "Real part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i": +double: 1 +idouble: 1 +Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": +float: 1 +ifloat: 1 + +# csqrt +Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": +float: 1 +ifloat: 1 +Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i": +float: 1 +ifloat: 1 + +# ctan +Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": +double: 1 +idouble: 1 +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# ctanh +Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": +float: 1 +ifloat: 1 +ildouble: 24 +ldouble: 24 +Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i": +float: 1 +ifloat: 1 +Test "Real part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +# erf +Test "erf (1.25) == 0.922900128256458230136523481197281140": +double: 1 +idouble: 1 + +# erfc +Test "erfc (0.75) == 0.288844366346484868401062165408589223": +float: 1 +ifloat: 1 +Test "erfc (1.25) == 0.0770998717435417698634765188027188596": +ildouble: 1 +ldouble: 1 +Test "erfc (2.0) == 0.00467773498104726583793074363274707139": +double: 1 +idouble: 1 +Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +# exp10 +Test "exp10 (-1) == 0.1": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "exp10 (0.75) == 5.62341325190349080394951039776481231": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "exp10 (3) == 1000": +double: 6 +float: 2 +idouble: 6 +ifloat: 2 +ildouble: 3 +ldouble: 3 + +# expm1 +Test "expm1 (1) == M_El - 1.0": +ildouble: 1 +ldouble: 1 + +# gamma +Test "gamma (-0.5) == log(2*sqrt(pi))": +ildouble: 1 +ldouble: 1 + +# hypot +Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 + +# j0 +Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 2 +ldouble: 2 +Test "j0 (10.0) == -0.245935764451348335197760862485328754": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "j0 (2.0) == 0.223890779141235668051827454649948626": +float: 2 +ifloat: 2 +Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 2 +ldouble: 2 +Test "j0 (8.0) == 0.171650807137553906090869407851972001": +float: 1 +ifloat: 1 + +# j1 +Test "j1 (10.0) == 0.0434727461688614366697487680258592883": +float: 2 +ifloat: 2 +ildouble: 1 +ldouble: 1 +Test "j1 (2.0) == 0.576724807756873387202448242269137087": +double: 1 +idouble: 1 +Test "j1 (8.0) == 0.234636346853914624381276651590454612": +double: 1 +idouble: 1 + +# jn +Test "jn (0, -4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 2 +ldouble: 2 +Test "jn (0, 10.0) == -0.245935764451348335197760862485328754": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "jn (0, 2.0) == 0.223890779141235668051827454649948626": +float: 2 +ifloat: 2 +Test "jn (0, 4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 2 +ldouble: 2 +Test "jn (0, 8.0) == 0.171650807137553906090869407851972001": +float: 1 +ifloat: 1 +Test "jn (1, 10.0) == 0.0434727461688614366697487680258592883": +float: 2 +ifloat: 2 +ildouble: 1 +ldouble: 1 +Test "jn (1, 2.0) == 0.576724807756873387202448242269137087": +double: 1 +idouble: 1 +Test "jn (1, 8.0) == 0.234636346853914624381276651590454612": +double: 1 +idouble: 1 +Test "jn (10, -1.0) == 0.263061512368745320699785368779050294e-9": +ildouble: 1 +ldouble: 1 +Test "jn (10, 0.125) == 0.250543369809369890173993791865771547e-18": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (10, 0.75) == 0.149621713117596814698712483621682835e-10": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "jn (10, 1.0) == 0.263061512368745320699785368779050294e-9": +ildouble: 1 +ldouble: 1 +Test "jn (10, 10.0) == 0.207486106633358857697278723518753428": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6": +float: 4 +ifloat: 4 +ildouble: 1 +ldouble: 1 +Test "jn (3, -1.0) == -0.0195633539826684059189053216217515083": +ildouble: 1 +ldouble: 1 +Test "jn (3, 0.125) == 0.406503832554912875023029337653442868e-4": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (3, 0.75) == 0.848438342327410884392755236884386804e-2": +double: 1 +idouble: 1 +Test "jn (3, 1.0) == 0.0195633539826684059189053216217515083": +ildouble: 1 +ldouble: 1 +Test "jn (3, 10.0) == 0.0583793793051868123429354784103409563": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 +ildouble: 1 +ldouble: 1 +Test "jn (3, 2.0) == 0.128943249474402051098793332969239835": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 1 +ldouble: 1 + +# lgamma +Test "lgamma (-0.5) == log(2*sqrt(pi))": +ildouble: 1 +ldouble: 1 +Test "lgamma (0.7) == 0.260867246531666514385732417016759578": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 1 +ldouble: 1 + +# log +Test "log (e) == 1": +float: 1 +ifloat: 1 + +# log10 +Test "log10 (e) == log10(e)": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# sincos +Test "sincos (0.80190127184058835, &sin_res, &cos_res) puts 0.69534156199418473 in cos_res": +double: 1 +idouble: 1 +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# tan +Test "tan (pi/4) == 1": +double: 1 +idouble: 1 + +# tgamma +Test "tgamma (-0.5) == -2 sqrt (pi)": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "tgamma (0.5) == sqrt (pi)": +float: 1 +ifloat: 1 +Test "tgamma (0.7) == 1.29805533264755778568117117915281162": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# y0 +Test "y0 (0.125) == -1.38968062514384052915582277745018693": +ildouble: 1 +ldouble: 1 +Test "y0 (1.0) == 0.0882569642156769579829267660235151628": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "y0 (1.5) == 0.382448923797758843955068554978089862": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "y0 (10.0) == 0.0556711672835993914244598774101900481": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "y0 (2.0) == 0.510375672649745119596606592727157873": +double: 1 +idouble: 1 +Test "y0 (8.0) == 0.223521489387566220527323400498620359": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# y1 +Test "y1 (0.125) == -5.19993611253477499595928744876579921": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "y1 (10.0) == 0.249015424206953883923283474663222803": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "y1 (1.5) == -0.412308626973911295952829820633445323"; +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "y1 (2.0) == -0.107032431540937546888370772277476637": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "y1 (8.0) == -0.158060461731247494255555266187483550": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +# yn +Test "yn (0, 0.125) == -1.38968062514384052915582277745018693": +ildouble: 1 +ldouble: 1 +Test "yn (0, 1.0) == 0.0882569642156769579829267660235151628": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "yn (0, 1.5) == 0.382448923797758843955068554978089862": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "yn (0, 10.0) == 0.0556711672835993914244598774101900481": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (0, 2.0) == 0.510375672649745119596606592727157873": +double: 1 +idouble: 1 +Test "yn (0, 8.0) == 0.223521489387566220527323400498620359": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "yn (1, 0.125) == -5.19993611253477499595928744876579921": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "yn (1, 10.0) == 0.249015424206953883923283474663222803": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "yn (1, 1.5) == -0.412308626973911295952829820633445323"; +float: 1 +ifloat: 1 +ldouble: 1 +ildouble: 1 +Test "yn (1, 2.0) == -0.107032431540937546888370772277476637": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "yn (1, 8.0) == -0.158060461731247494255555266187483550": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +Test "yn (10, 0.125) == -127057845771019398.252538486899753195": +double: 1 +idouble: 1 +ildouble: 2 +ldouble: 2 +Test "yn (10, 0.75) == -2133501638.90573424452445412893839236": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +Test "yn (10, 1.0) == -121618014.278689189288130426667971145": +float: 2 +ifloat: 2 +Test "yn (10, 10.0) == -0.359814152183402722051986577343560609": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +Test "yn (10, 2.0) == -129184.542208039282635913145923304214": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "yn (3, 0.125) == -2612.69757350066712600220955744091741": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "yn (3, 0.75) == -12.9877176234475433186319774484809207": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "yn (3, 10.0) == -0.251362657183837329779204747654240998": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (3, 2.0) == -1.12778377684042778608158395773179238": +double: 1 +idouble: 1 + +# Maximal error of functions: +Function: Imaginary part of "cacos": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: Real part of "cacosh": +double: 1 +float: 7 +idouble: 1 +ifloat: 7 +ildouble: 7 +ldouble: 7 + +Function: Imaginary part of "cacosh": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "casin": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: Imaginary part of "casin": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: Real part of "casinh": +double: 5 +float: 1 +idouble: 5 +ifloat: 1 +ildouble: 5 +ldouble: 5 + +Function: Imaginary part of "casinh": +double: 3 +float: 6 +idouble: 3 +ifloat: 6 +ildouble: 5 +ldouble: 5 + +Function: Imaginary part of "catan": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "catanh": +double: 4 +idouble: 4 +ildouble: 1 +ldouble: 1 + +Function: Real part of "ccos": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "ccos": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "ccosh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "ccosh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "cexp": +float: 1 +ifloat: 1 + +Function: Imaginary part of "cexp": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "clog": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "clog10": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "clog10": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "cos": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "cpow": +double: 2 +float: 5 +idouble: 2 +ifloat: 5 +ildouble: 6 +ldouble: 6 + +Function: Imaginary part of "cpow": +double: 2 +float: 3 +idouble: 2 +ifloat: 3 +ildouble: 4 +ldouble: 4 + +Function: Real part of "csin": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "csin": +float: 1 +ifloat: 1 + +Function: Real part of "csinh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "csinh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: Real part of "csqrt": +float: 1 +ifloat: 1 + +Function: Real part of "ctan": +double: 1 +idouble: 1 +ildouble: 2 +ldouble: 2 + +Function: Imaginary part of "ctan": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "ctanh": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "ctanh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 24 +ldouble: 24 + +Function: "erf": +double: 1 +idouble: 1 + +Function: "erfc": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "exp10": +double: 6 +float: 2 +idouble: 6 +ifloat: 2 +ildouble: 3 +ldouble: 3 + +Function: "expm1": +ildouble: 1 +ldouble: 1 + +Function: "gamma": +ildouble: 1 +ldouble: 1 + +Function: "hypot": +float: 1 +ifloat: 1 + +Function: "j0": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 +ildouble: 2 +ldouble: 2 + +Function: "j1": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 1 +ldouble: 1 + +Function: "jn": +double: 3 +float: 4 +idouble: 3 +ifloat: 4 +ildouble: 2 +ldouble: 2 + +Function: "lgamma": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 1 +ldouble: 1 + +Function: "log": +float: 1 +ifloat: 1 + +Function: "log10": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "sincos": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "tan": +double: 1 +idouble: 1 + +Function: "tgamma": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "y0": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "y1": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 +ildouble: 1 +ldouble: 1 + +Function: "yn": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 +ildouble: 2 +ldouble: 2 + +# end of automatic generation diff --git a/sysdeps/ia64/fpu/libm_cpu_defs.h b/sysdeps/ia64/fpu/libm_cpu_defs.h new file mode 100644 index 0000000000..516128c404 --- /dev/null +++ b/sysdeps/ia64/fpu/libm_cpu_defs.h @@ -0,0 +1,156 @@ +/* file: libm_cpu_defs.h */ + + +// Copyright (c) 2000 - 2004, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// + +#ifndef __LIBM_CPU_DEFS__H_INCLUDED__ +#define __LIBM_CPU_DEFS__H_INCLUDED__ + +void __libm_sincos_pi4(double,double*,double*,int); +void __libm_y0y1(double , double *, double *); +void __libm_j0j1(double , double *, double *); +double __libm_j0(double); +double __libm_j1(double); +double __libm_jn(int,double); +double __libm_y0(double); +double __libm_y1(double); +double __libm_yn(int,double); + +double __libm_copysign (double, double); +float __libm_copysignf (float, float); +long double __libm_copysignl (long double, long double); + +extern double sqrt(double); +extern double fabs(double); +extern double log(double); +extern double log1p(double); +extern double sqrt(double); +extern double sin(double); +extern double exp(double); +extern double modf(double, double *); +extern double asinh(double); +extern double acosh(double); +extern double atanh(double); +extern double tanh(double); +extern double erf(double); +extern double erfc(double); +extern double j0(double); +extern double j1(double); +extern double jn(int, double); +extern double y0(double); +extern double y1(double); +extern double yn(int, double); + +extern float fabsf(float); +extern float asinhf(float); +extern float acoshf(float); +extern float atanhf(float); +extern float tanhf(float); +extern float erff(float); +extern float erfcf(float); +extern float j0f(float); +extern float j1f(float); +extern float jnf(int, float); +extern float y0f(float); +extern float y1f(float); +extern float ynf(int, float); + +extern long double log1pl(long double); +extern long double logl(long double); +extern long double sqrtl(long double); +extern long double expl(long double); +extern long double fabsl(long double); + +#if !(defined(SIZE_LONG_INT_32) || defined(SIZE_LONG_INT_64)) +#error long int size not established; define SIZE_LONG_INT_32 or SIZE_LONG_INT_64 +#endif + +#if (defined(SIZE_LONG_INT_32) && defined(SIZE_LONG_INT_64)) +#error multiple long int size definitions; define SIZE_LONG_INT_32 or SIZE_LONG_INT_64 +#endif + +#if !(defined(SIZE_LONG_LONG_INT_32) || defined(SIZE_LONG_LONG_INT_64)) +#error long long int size not established; define SIZE_LONG_LONG_INT_32 or SIZE_LONG_LONG_INT_64 +#endif + +#if (defined(SIZE_LONG_LONG_INT_32) && defined(SIZE_LONG_LONG_INT_64)) +#error multiple long long int size definitions; define SIZE_LONG_LONG_INT_32 or SIZE_LONG_LONG_INT_64 +#endif + +#define HI_SIGNIFICAND_LESS(X, HI) ((X)->hi_significand < 0x ## HI) +#define f64abs(x) ((x) < 0.0 ? -(x) : (x)) + +#define FP80_DECLARE() +#define FP80_SET() +#define FP80_RESET() + +#ifdef _LIBC +# include +#else + +static const unsigned INF[] = { + DOUBLE_HEX(7ff00000, 00000000), + DOUBLE_HEX(fff00000, 00000000) +}; + +static const double _zeroo = 0.0; +static const double _bigg = 1.0e300; +static const double _ponee = 1.0; +static const double _nonee = -1.0; + +#define INVALID (_zeroo * *((double*)&INF[0])) +#define PINF *((double*)&INF[0]) +#define NINF -PINF +#define PINF_DZ (_ponee/_zeroo) +#define X_TLOSS 1.41484755040568800000e+16 +#endif + +/* Set these appropriately to make thread Safe */ +#define ERRNO_RANGE errno = ERANGE +#define ERRNO_DOMAIN errno = EDOM + +#ifndef _LIBC +#if defined(__ICC) || defined(__ICL) || defined(__ECC) || defined(__ECL) +# pragma warning( disable : 68 ) /* #68: integer conversion resulted in a change of sign */ +# pragma warning( disable : 186 ) /* #186: pointless comparison of unsigned integer with zero */ +# pragma warning( disable : 1572 ) /* #1572: floating-point equality and inequality comparisons are unreliable */ +#endif +#endif + +#endif /*__LIBM_CPU_DEFS__H_INCLUDED__*/ diff --git a/sysdeps/ia64/fpu/libm_error.c b/sysdeps/ia64/fpu/libm_error.c new file mode 100644 index 0000000000..8ef4bb5a73 --- /dev/null +++ b/sysdeps/ia64/fpu/libm_error.c @@ -0,0 +1,4295 @@ +/* file: libm_error.c */ + + +// Copyright (c) 2000 - 2005, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 2/02/00: Initial version +// 3/22/00: Updated to support flexible and dynamic error handling. +// 8/16/00: Changed all matherr function-calls to use the pmatherr +// function-pointers. +// 10/03/00: Corrected a scalb type. +// 11/28/00: Changed INPUT_XL to INPUT_XD for scalb_underflow case. +// 12/07/00: Added code to make scalbn error support equivalent to ldexp. +// 2/07/01: Added __declspec(align(16)) to long double constants to correct +// alignment problem. +// 4/23/01: Added code for remquo +// 6/07/01: Added code for fdim, lrint, lround, llrint, llround +// Deleted code for remquo +// 8/15/01: Added code for scalbln, nexttoward +// 12/10/01: Added code for erfc +// 12/27/01: Added code for degree argument functions +// 01/02/02: Added code for tand, cotd +// 01/15/02: Corrected SVID/XOPEN code for log1p, pow, and acosh +// 01/25/02: Corrected ISOC for lgamma and gamma to return EDOM for neg ints +// 01/28/02: Corrected SVID/XOPEN stderr message for log2 +// 05/20/02: Added code for cot +// 07/01/02: Added code for sinhcosh +// 10/04/02: Underflow detection in ISOC path redefined to +// be zero rather than tiny and inexact +// 12/06/02: Added code for annuity and compound +// 01/30/03: Corrected test for underflow in ISOC path to not set denormal +// 04/10/03: Corrected ISOC branch for gamma/lgamma to return ERANGE for neg ints. +// Added code for tgamma +// 04/11/03: Corrected POSIX/SVID/XOPEN branches for gamma/lgamma +// to return EDOM for neg ints. +// 09/08/03: Corrected XOPEN/SVID result for pow overflow with neg x, pos y. +// 10/14/03: Added ILP32 ifdef +// 12/12/03: Corrected XOPEN/SVID results for powf_zero_to_negative, +// powl_neg_to_non_integer, atan2f_zero, atan2df_zero, +// acoshf_lt_one, acosh_lt_one. +// 12/07/04: Cast name strings as char *. +// 12/08/04: Corrected POSIX behavior for atan2_zero, acos_gt_one, asin_gt_one, +// log_negative, log10_negative, log1p_negative, and log2_negative. +// Added SVID and XOPEN case log2l_zero. +// 12/13/04: Corrected POSIX behavior for exp2_overflow, exp2_underflow, +// exp10_overflow, exp10_underflow. Added ISOC to set errno for +// exp10_underflow. +// 12/14/04: Corrected POSIX behavior for nextafter_overflow, +// nextafter_underflow, nexttoward_overflow, nexttoward_underflow. +// Added ISOC to set errno for nextafter and nexttoward underflow. +// 12/15/04: Corrected POSIX behavior for exp, exp2, and exp10 underflow. +// 03/31/05: Added missing ALIGNIT statement to 6 float constants. + +#include +#include +#include +#include "libm_support.h" + +#ifdef _LIBC +# define pmatherr matherr +# define pmatherrf matherrf +# define pmatherrl matherrl +#else +_LIB_VERSION_TYPE +#if defined( __POSIX__ ) +_LIB_VERSIONIMF = _POSIX_; +#elif defined( __XOPEN__ ) +_LIB_VERSIONIMF = _XOPEN_; +#elif defined( __SVID__ ) +_LIB_VERSIONIMF = _SVID_; +#elif defined( __IEEE__ ) +_LIB_VERSIONIMF = _IEEE_; +#else +_LIB_VERSIONIMF = _ISOC_; +#endif + +/************************************************************/ +/* matherrX function pointers and setusermatherrX functions */ +/************************************************************/ +int (*pmatherrf)(struct exceptionf*) = MATHERR_F; +int (*pmatherr)(struct EXC_DECL_D*) = MATHERR_D; +int (*pmatherrl)(struct exceptionl*) = matherrl; + +void __libm_setusermatherrf( int(*user_merrf)(struct exceptionf*) ) +{ pmatherrf = ( (user_merrf==NULL)? (MATHERR_F) : (user_merrf) ); } + +void __libm_setusermatherr( int(*user_merr)(struct EXC_DECL_D*) ) +{ pmatherr = ( (user_merr==NULL)? (MATHERR_D) : (user_merr) ); } + +void __libm_setusermatherrl( int(*user_merrl)(struct exceptionl*) ) +{ pmatherrl = ( (user_merrl==NULL)? (matherrl) : (user_merrl) ); } + +#endif /* !_LIBC */ + +/***********************************************/ +/* error-handling function, libm_error_support */ +/***********************************************/ +void __libm_error_support(void *arg1,void *arg2,void *retval,error_types input_tag) +{ + +# ifdef __cplusplus +struct __exception exc; +# else +struct exception exc; +# endif + +struct exceptionf excf; +struct exceptionl excl; + +# ifdef __GNUC__ +#define ALIGNIT __attribute__ ((__aligned__ (16))) +# elif defined opensource +#define ALIGNIT +# else +#define ALIGNIT __declspec(align(16)) +# endif + +# ifdef SIZE_LONG_INT_64 +#define __INT_64__ signed long +# else +# if ILP32 +#define __INT_64__ signed long long +# else +#define __INT_64__ __int64 +# endif +# endif + + +#define STATIC static + +ALIGNIT +STATIC const char float_inf[4] = {0x00,0x00,0x80,0x7F}; +ALIGNIT +STATIC const char float_huge[4] = {0xFF,0xFF,0x7F,0x7F}; +ALIGNIT +STATIC const char float_zero[4] = {0x00,0x00,0x00,0x00}; +ALIGNIT +STATIC const char float_neg_inf[4] = {0x00,0x00,0x80,0xFF}; +ALIGNIT +STATIC const char float_neg_huge[4] = {0xFF,0xFF,0x7F,0xFF}; +ALIGNIT +STATIC const char float_neg_zero[4] = {0x00,0x00,0x00,0x80}; +ALIGNIT +STATIC const char double_inf[8] = {0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x7F}; +#ifndef _LIBC +ALIGNIT +STATIC const char double_huge[8] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xEF,0x7F}; +#endif +ALIGNIT +STATIC const char double_zero[8] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; +ALIGNIT +STATIC const char double_neg_inf[8] = {0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0xFF}; +#ifndef _LIBC +ALIGNIT +STATIC const char double_neg_huge[8] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xEF,0xFF}; +#endif +ALIGNIT +STATIC const char double_neg_zero[8] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80}; +ALIGNIT +STATIC const char long_double_inf[16] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xFF,0x7F,0x00,0x00,0x00,0x00,0x00,0x00}; +ALIGNIT +#ifndef _LIBC +STATIC const char long_double_huge[16] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0x7F,0x00,0x00,0x00,0x00,0x00,0x00}; +#endif +ALIGNIT +STATIC const char long_double_zero[16] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; +ALIGNIT +STATIC const char long_double_neg_inf[16] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00}; +ALIGNIT +#ifndef _LIBC +STATIC const char long_double_neg_huge[16] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFF,0x00,0x00,0x00,0x00,0x00,0x00}; +#endif +ALIGNIT +STATIC const char long_double_neg_zero[16] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00}; + + +#define RETVAL_HUGE_VALL *(long double *)retval = *(long double *)long_double_inf +#define RETVAL_NEG_HUGE_VALL *(long double *)retval = *(long double *)long_double_neg_inf +#define RETVAL_HUGEL *(long double *)retval = (long double)*(float *)float_huge +#define RETVAL_NEG_HUGEL *(long double *)retval =(long double)*(float*)float_neg_huge + +#define RETVAL_HUGE_VALD *(double *)retval = *(double *) double_inf +#define RETVAL_NEG_HUGE_VALD *(double *)retval = *(double *) double_neg_inf +#define RETVAL_HUGED *(double *)retval = (double) *(float *)float_huge +#define RETVAL_NEG_HUGED *(double *)retval = (double) *(float *) float_neg_huge + +#define RETVAL_HUGE_VALF *(float *)retval = *(float *) float_inf +#define RETVAL_NEG_HUGE_VALF *(float *)retval = *(float *) float_neg_inf +#define RETVAL_HUGEF *(float *)retval = *(float *) float_huge +#define RETVAL_NEG_HUGEF *(float *)retval = *(float *) float_neg_huge + +#define ZEROL_VALUE *(long double *)long_double_zero +#define ZEROD_VALUE *(double *)double_zero +#define ZEROF_VALUE *(float *)float_zero + +#define RETVAL_ZEROL *(long double *)retval = *(long double *)long_double_zero +#define RETVAL_ZEROD *(double *)retval = *(double *)double_zero +#define RETVAL_ZEROF *(float *)retval = *(float *)float_zero + +#define RETVAL_NEG_ZEROL *(long double *)retval = *(long double *)long_double_neg_zero +#define RETVAL_NEG_ZEROD *(double *)retval = *(double *)double_neg_zero +#define RETVAL_NEG_ZEROF *(float *)retval = *(float *)float_neg_zero + +#define RETVAL_ONEL *(long double *)retval = (long double) 1.0 +#define RETVAL_ONED *(double *)retval = 1.0 +#define RETVAL_ONEF *(float *)retval = 1.0f + +#define NOT_MATHERRL excl.arg1=*(long double *)arg1;excl.arg2=*(long double *)arg2;excl.retval=*(long double *)retval;if(!pmatherrl(&excl)) +#define NOT_MATHERRD exc.arg1=*(double *)arg1;exc.arg2=*(double *)arg2;exc.retval=*(double *)retval;if(!pmatherr(&exc)) +#define NOT_MATHERRF excf.arg1=*(float *)arg1;excf.arg2=*(float *)arg2;excf.retval=*(float *)retval;if(!pmatherrf(&excf)) + +#define ifSVID if(_LIB_VERSIONIMF==_SVID_) + +#define NAMEL excl.name +#define NAMED exc.name +#define NAMEF excf.name + +// +// These should work OK for MS because they are ints - +// leading underbars are not necessary. +// + +#define DOMAIN 1 +#define SING 2 +#define OVERFLOW 3 +#define UNDERFLOW 4 +#define TLOSS 5 +#define PLOSS 6 + +#define SINGL excl.type = SING +#define DOMAINL excl.type = DOMAIN +#define OVERFLOWL excl.type = OVERFLOW +#define UNDERFLOWL excl.type = UNDERFLOW +#define TLOSSL excl.type = TLOSS +#define SINGD exc.type = SING +#define DOMAIND exc.type = DOMAIN +#define OVERFLOWD exc.type = OVERFLOW +#define UNDERFLOWD exc.type = UNDERFLOW +#define TLOSSD exc.type = TLOSS +#define SINGF excf.type = SING +#define DOMAINF excf.type = DOMAIN +#define OVERFLOWF excf.type = OVERFLOW +#define UNDERFLOWF excf.type = UNDERFLOW +#define TLOSSF excf.type = TLOSS + +#define INPUT_XL (excl.arg1=*(long double*)arg1) +#define INPUT_XD (exc.arg1=*(double*)arg1) +#define INPUT_XF (excf.arg1=*(float*)arg1) +#define INPUT_YL (excl.arg2=*(long double*)arg2) +#define INPUT_YD (exc.arg2=*(double*)arg2) +#define INPUT_YF (excf.arg2=*(float*)arg2) +#define INPUT_RESL (*(long double *)retval) +#define INPUT_RESD (*(double *)retval) +#define INPUT_RESF (*(float *)retval) +#define INPUT_RESI64 (*(__INT_64__ *)retval) + +#define WRITEL_LOG_ZERO fputs("logl: SING error\n",stderr) +#define WRITED_LOG_ZERO fputs("log: SING error\n",stderr) +#define WRITEF_LOG_ZERO fputs("logf: SING error\n",stderr) +#define WRITEL_LOG_NEGATIVE fputs("logl: DOMAIN error\n",stderr) +#define WRITED_LOG_NEGATIVE fputs("log: DOMAIN error\n",stderr) +#define WRITEF_LOG_NEGATIVE fputs("logf: DOMAIN error\n",stderr) +#define WRITEL_Y0_ZERO fputs("y0l: DOMAIN error\n",stderr) +#define WRITED_Y0_ZERO fputs("y0: DOMAIN error\n",stderr) +#define WRITEF_Y0_ZERO fputs("y0f: DOMAIN error\n",stderr) +#define WRITEL_Y0_NEGATIVE fputs("y0l: DOMAIN error\n",stderr) +#define WRITED_Y0_NEGATIVE fputs("y0: DOMAIN error\n",stderr) +#define WRITEF_Y0_NEGATIVE fputs("y0f: DOMAIN error\n",stderr) +#define WRITEL_Y1_ZERO fputs("y1l: DOMAIN error\n",stderr) +#define WRITED_Y1_ZERO fputs("y1: DOMAIN error\n",stderr) +#define WRITEF_Y1_ZERO fputs("y1f: DOMAIN error\n",stderr) +#define WRITEL_Y1_NEGATIVE fputs("y1l: DOMAIN error\n",stderr) +#define WRITED_Y1_NEGATIVE fputs("y1: DOMAIN error\n",stderr) +#define WRITEF_Y1_NEGATIVE fputs("y1f: DOMAIN error\n",stderr) +#define WRITEL_YN_ZERO fputs("ynl: DOMAIN error\n",stderr) +#define WRITED_YN_ZERO fputs("yn: DOMAIN error\n",stderr) +#define WRITEF_YN_ZERO fputs("ynf: DOMAIN error\n",stderr) +#define WRITEL_YN_NEGATIVE fputs("ynl: DOMAIN error\n",stderr) +#define WRITED_YN_NEGATIVE fputs("yn: DOMAIN error\n",stderr) +#define WRITEF_YN_NEGATIVE fputs("ynf: DOMAIN error\n",stderr) +#define WRITEL_LOG1P_ZERO fputs("log1pl: SING error\n",stderr) +#define WRITED_LOG1P_ZERO fputs("log1p: SING error\n",stderr) +#define WRITEF_LOG1P_ZERO fputs("log1pf: SING error\n",stderr) +#define WRITEL_LOG1P_NEGATIVE fputs("log1pl: DOMAIN error\n",stderr) +#define WRITED_LOG1P_NEGATIVE fputs("log1p: DOMAIN error\n",stderr) +#define WRITEF_LOG1P_NEGATIVE fputs("log1pf: DOMAIN error\n",stderr) +#define WRITEL_LOG10_ZERO fputs("log10l: SING error\n",stderr) +#define WRITED_LOG10_ZERO fputs("log10: SING error\n",stderr) +#define WRITEF_LOG10_ZERO fputs("log10f: SING error\n",stderr) +#define WRITEL_LOG10_NEGATIVE fputs("log10l: DOMAIN error\n",stderr) +#define WRITED_LOG10_NEGATIVE fputs("log10: DOMAIN error\n",stderr) +#define WRITEF_LOG10_NEGATIVE fputs("log10f: DOMAIN error\n",stderr) +#define WRITEL_LOG2_ZERO fputs("log2l: SING error\n",stderr) +#define WRITED_LOG2_ZERO fputs("log2: SING error\n",stderr) +#define WRITEF_LOG2_ZERO fputs("log2f: SING error\n",stderr) +#define WRITEL_LOG2_NEGATIVE fputs("log2l: DOMAIN error\n",stderr) +#define WRITED_LOG2_NEGATIVE fputs("log2: DOMAIN error\n",stderr) +#define WRITEF_LOG2_NEGATIVE fputs("log2f: DOMAIN error\n",stderr) +#define WRITEL_POW_ZERO_TO_ZERO fputs("powl(0,0): DOMAIN error\n",stderr) +#define WRITED_POW_ZERO_TO_ZERO fputs("pow(0,0): DOMAIN error\n",stderr) +#define WRITEF_POW_ZERO_TO_ZERO fputs("powf(0,0): DOMAIN error\n",stderr) +#define WRITEL_POW_ZERO_TO_NEGATIVE fputs("powl(0,negative): DOMAIN error\n",stderr) +#define WRITED_POW_ZERO_TO_NEGATIVE fputs("pow(0,negative): DOMAIN error\n",stderr) +#define WRITEF_POW_ZERO_TO_NEGATIVE fputs("powf(0,negative): DOMAIN error\n",stderr) +#define WRITEL_POW_NEG_TO_NON_INTEGER fputs("powl(negative,non-integer): DOMAIN error\n",stderr) +#define WRITED_POW_NEG_TO_NON_INTEGER fputs("pow(negative,non-integer): DOMAIN error\n",stderr) +#define WRITEF_POW_NEG_TO_NON_INTEGER fputs("powf(negative,non-integer): DOMAIN error\n",stderr) +#define WRITEL_ATAN2_ZERO_BY_ZERO fputs("atan2l: DOMAIN error\n",stderr) +#define WRITED_ATAN2_ZERO_BY_ZERO fputs("atan2: DOMAIN error\n",stderr) +#define WRITEF_ATAN2_ZERO_BY_ZERO fputs("atan2f: DOMAIN error\n",stderr) +#define WRITEL_SQRT fputs("sqrtl: DOMAIN error\n",stderr) +#define WRITED_SQRT fputs("sqrt: DOMAIN error\n",stderr) +#define WRITEF_SQRT fputs("sqrtf: DOMAIN error\n",stderr) +#define WRITEL_FMOD fputs("fmodl: DOMAIN error\n",stderr) +#define WRITED_FMOD fputs("fmod: DOMAIN error\n",stderr) +#define WRITEF_FMOD fputs("fmodf: DOMAIN error\n",stderr) +#define WRITEL_REM fputs("remainderl: DOMAIN error\n",stderr) +#define WRITED_REM fputs("remainder: DOMAIN error\n",stderr) +#define WRITEF_REM fputs("remainderf: DOMAIN error\n",stderr) +#define WRITEL_ACOS fputs("acosl: DOMAIN error\n",stderr) +#define WRITED_ACOS fputs("acos: DOMAIN error\n",stderr) +#define WRITEF_ACOS fputs("acosf: DOMAIN error\n",stderr) +#define WRITEL_ASIN fputs("asinl: DOMAIN error\n",stderr) +#define WRITED_ASIN fputs("asin: DOMAIN error\n",stderr) +#define WRITEF_ASIN fputs("asinf: DOMAIN error\n",stderr) +#define WRITEL_ACOSH fputs("acoshl: DOMAIN error\n",stderr) +#define WRITED_ACOSH fputs("acosh: DOMAIN error\n",stderr) +#define WRITEF_ACOSH fputs("acoshf: DOMAIN error\n",stderr) +#define WRITEL_ATANH_GT_ONE fputs("atanhl: DOMAIN error\n",stderr) +#define WRITED_ATANH_GT_ONE fputs("atanh: DOMAIN error\n",stderr) +#define WRITEF_ATANH_GT_ONE fputs("atanhf: DOMAIN error\n",stderr) +#define WRITEL_ATANH_EQ_ONE fputs("atanhl: SING error\n",stderr) +#define WRITED_ATANH_EQ_ONE fputs("atanh: SING error\n",stderr) +#define WRITEF_ATANH_EQ_ONE fputs("atanhf: SING error\n",stderr) +#define WRITEL_LGAMMA_NEGATIVE fputs("lgammal: SING error\n",stderr) +#define WRITED_LGAMMA_NEGATIVE fputs("lgamma: SING error\n",stderr) +#define WRITEF_LGAMMA_NEGATIVE fputs("lgammaf: SING error\n",stderr) +#define WRITEL_GAMMA_NEGATIVE fputs("gammal: SING error\n",stderr) +#define WRITED_GAMMA_NEGATIVE fputs("gamma: SING error\n",stderr) +#define WRITEF_GAMMA_NEGATIVE fputs("gammaf: SING error\n",stderr) +#define WRITEL_TGAMMA_NEGATIVE fputs("tgammal: SING error\n",stderr) +#define WRITED_TGAMMA_NEGATIVE fputs("tgamma: SING error\n",stderr) +#define WRITEF_TGAMMA_NEGATIVE fputs("tgammaf: SING error\n",stderr) +#define WRITEL_J0_TLOSS fputs("j0l: TLOSS error\n",stderr) +#define WRITEL_Y0_TLOSS fputs("y0l: TLOSS error\n",stderr) +#define WRITEL_J1_TLOSS fputs("j1l: TLOSS error\n",stderr) +#define WRITEL_Y1_TLOSS fputs("y1l: TLOSS error\n",stderr) +#define WRITEL_JN_TLOSS fputs("jnl: TLOSS error\n",stderr) +#define WRITEL_YN_TLOSS fputs("ynl: TLOSS error\n",stderr) +#define WRITED_J0_TLOSS fputs("j0: TLOSS error\n",stderr) +#define WRITED_Y0_TLOSS fputs("y0: TLOSS error\n",stderr) +#define WRITED_J1_TLOSS fputs("j1: TLOSS error\n",stderr) +#define WRITED_Y1_TLOSS fputs("y1: TLOSS error\n",stderr) +#define WRITED_JN_TLOSS fputs("jn: TLOSS error\n",stderr) +#define WRITED_YN_TLOSS fputs("yn: TLOSS error\n",stderr) +#define WRITEF_J0_TLOSS fputs("j0f: TLOSS error\n",stderr) +#define WRITEF_Y0_TLOSS fputs("y0f: TLOSS error\n",stderr) +#define WRITEF_J1_TLOSS fputs("j1f: TLOSS error\n",stderr) +#define WRITEF_Y1_TLOSS fputs("y1f: TLOSS error\n",stderr) +#define WRITEF_JN_TLOSS fputs("jnf: TLOSS error\n",stderr) +#define WRITEF_YN_TLOSS fputs("ynf: TLOSS error\n",stderr) +#define WRITEL_ACOSD fputs("acosdl: DOMAIN error\n",stderr) +#define WRITED_ACOSD fputs("acosd: DOMAIN error\n",stderr) +#define WRITEF_ACOSD fputs("acosdf: DOMAIN error\n",stderr) +#define WRITEL_ASIND fputs("asindl: DOMAIN error\n",stderr) +#define WRITED_ASIND fputs("asind: DOMAIN error\n",stderr) +#define WRITEF_ASIND fputs("asindf: DOMAIN error\n",stderr) +#define WRITEL_ATAN2D_ZERO_BY_ZERO fputs("atan2dl: DOMAIN error\n",stderr) +#define WRITED_ATAN2D_ZERO_BY_ZERO fputs("atan2d: DOMAIN error\n",stderr) +#define WRITEF_ATAN2D_ZERO_BY_ZERO fputs("atan2df: DOMAIN error\n",stderr) + + +/***********************/ +/* IEEE Path */ +/***********************/ +if(_LIB_VERSIONIMF==_IEEE_) return; + +/***********************/ +/* C9X Path */ +/***********************/ +else if(_LIB_VERSIONIMF==_ISOC_) +{ + switch(input_tag) + { + case logl_zero: + case log_zero: + case logf_zero: + case log10l_zero: + case log10_zero: + case log10f_zero: + case log2l_zero: + case log2_zero: + case log2f_zero: + case log1pl_zero: + case log1p_zero: + case log1pf_zero: + case powl_overflow: + case pow_overflow: + case powf_overflow: + case expl_overflow: + case exp_overflow: + case expf_overflow: + case exp2l_overflow: + case exp2_overflow: + case exp2f_overflow: + case exp10l_overflow: + case exp10_overflow: + case exp10f_overflow: + case expm1l_overflow: + case expm1_overflow: + case expm1f_overflow: + case hypotl_overflow: + case hypot_overflow: + case hypotf_overflow: + case sinhl_overflow: + case sinh_overflow: + case sinhf_overflow: + case atanhl_eq_one: + case atanh_eq_one: + case atanhf_eq_one: + case scalbl_overflow: + case scalb_overflow: + case scalbf_overflow: + case coshl_overflow: + case cosh_overflow: + case coshf_overflow: + case nextafterl_overflow: + case nextafter_overflow: + case nextafterf_overflow: + case nextafterl_underflow: + case nextafter_underflow: + case nextafterf_underflow: + case nexttowardl_overflow: + case nexttoward_overflow: + case nexttowardf_overflow: + case nexttowardl_underflow: + case nexttoward_underflow: + case nexttowardf_underflow: + case scalbnl_overflow: + case scalbn_overflow: + case scalbnf_overflow: + case scalblnl_overflow: + case scalbln_overflow: + case scalblnf_overflow: + case ldexpl_overflow: + case ldexp_overflow: + case ldexpf_overflow: + case lgammal_overflow: + case lgamma_overflow: + case lgammaf_overflow: + case gammal_overflow: + case gamma_overflow: + case gammaf_overflow: + case lgammal_negative: + case lgamma_negative: + case lgammaf_negative: + case gammal_negative: + case gamma_negative: + case gammaf_negative: + case ilogbl_zero: + case ilogb_zero: + case ilogbf_zero: + case fdiml_overflow: + case fdim_overflow: + case fdimf_overflow: + case llrintl_large: + case llrint_large: + case llrintf_large: + case llroundl_large: + case llround_large: + case llroundf_large: + case lrintl_large: + case lrint_large: + case lrintf_large: + case lroundl_large: + case lround_large: + case lroundf_large: + case tandl_overflow: + case tand_overflow: + case tandf_overflow: + case cotdl_overflow: + case cotd_overflow: + case cotdf_overflow: + case cotl_overflow: + case cot_overflow: + case cotf_overflow: + case sinhcoshl_overflow: + case sinhcosh_overflow: + case sinhcoshf_overflow: + case annuityl_overflow: + case annuity_overflow: + case annuityf_overflow: + case compoundl_overflow: + case compound_overflow: + case compoundf_overflow: + case tgammal_overflow: + case tgamma_overflow: + case tgammaf_overflow: + { + ERRNO_RANGE; break; + } + case powl_underflow: + case expl_underflow: + case exp10l_underflow: + case exp2l_underflow: + case scalbl_underflow: + case scalbnl_underflow: + case scalblnl_underflow: + case ldexpl_underflow: + case erfcl_underflow: + case annuityl_underflow: + case compoundl_underflow: + { + /* Test for zero by testing 64 significand bits for zero. An integer + test is needed so denormal flag is not set by a floating-point test */ + if ( INPUT_RESI64 == 0 ) ERRNO_RANGE; + break; + } + case pow_underflow: + case exp_underflow: + case exp10_underflow: + case exp2_underflow: + case scalb_underflow: + case scalbn_underflow: + case scalbln_underflow: + case ldexp_underflow: + case erfc_underflow: + case annuity_underflow: + case compound_underflow: + { + /* Test for zero by testing exp and significand bits for zero. An integer + test is needed so denormal flag is not set by a floating-point test */ + if ( (INPUT_RESI64 << 1) == 0 ) ERRNO_RANGE; + break; + } + case powf_underflow: + case expf_underflow: + case exp10f_underflow: + case exp2f_underflow: + case scalbf_underflow: + case scalbnf_underflow: + case scalblnf_underflow: + case ldexpf_underflow: + case erfcf_underflow: + case annuityf_underflow: + case compoundf_underflow: + { + /* Test for zero by testing exp and significand bits for zero. An integer + test is needed so denormal flag is not set by a floating-point test */ + if ( (INPUT_RESI64 << 33) == 0 ) ERRNO_RANGE; + break; + } + case logl_negative: + case log_negative: + case logf_negative: + case log10l_negative: + case log10_negative: + case log10f_negative: + case log2l_negative: + case log2_negative: + case log2f_negative: + case log1pl_negative: + case log1p_negative: + case log1pf_negative: + case sqrtl_negative: + case sqrt_negative: + case sqrtf_negative: + case atan2l_zero: + case atan2_zero: + case atan2f_zero: + case powl_zero_to_negative: + case powl_neg_to_non_integer: + case pow_zero_to_negative: + case pow_neg_to_non_integer: + case powf_zero_to_negative: + case powf_neg_to_non_integer: + case fmodl_by_zero: + case fmod_by_zero: + case fmodf_by_zero: + case atanhl_gt_one: + case atanh_gt_one: + case atanhf_gt_one: + case acosl_gt_one: + case acos_gt_one: + case acosf_gt_one: + case asinl_gt_one: + case asin_gt_one: + case asinf_gt_one: + case logbl_zero: + case logb_zero: + case logbf_zero: + case acoshl_lt_one: + case acosh_lt_one: + case acoshf_lt_one: + case y0l_zero: + case y0_zero: + case y0f_zero: + case y1l_zero: + case y1_zero: + case y1f_zero: + case ynl_zero: + case yn_zero: + case ynf_zero: + case y0l_negative: + case y0_negative: + case y0f_negative: + case y1l_negative: + case y1_negative: + case y1f_negative: + case ynl_negative: + case yn_negative: + case ynf_negative: + case acosdl_gt_one: + case acosd_gt_one: + case acosdf_gt_one: + case asindl_gt_one: + case asind_gt_one: + case asindf_gt_one: + case atan2dl_zero: + case atan2d_zero: + case atan2df_zero: + case annuityl_by_zero: + case annuity_by_zero: + case annuityf_by_zero: + case annuityl_less_m1: + case annuity_less_m1: + case annuityf_less_m1: + case compoundl_by_zero: + case compound_by_zero: + case compoundf_by_zero: + case compoundl_less_m1: + case compound_less_m1: + case compoundf_less_m1: + case tgammal_negative: + case tgamma_negative: + case tgammaf_negative: + { + ERRNO_DOMAIN; break; + } + default: + break; + } + return; +} + +/***********************/ +/* _POSIX_ Path */ +/***********************/ + +else if(_LIB_VERSIONIMF==_POSIX_) +{ +switch(input_tag) + { + case gammal_overflow: + case lgammal_overflow: + case tgammal_overflow: + { + RETVAL_HUGE_VALL; ERRNO_RANGE; break; + } + case gamma_overflow: + case lgamma_overflow: + case tgamma_overflow: + { + RETVAL_HUGE_VALD; ERRNO_RANGE; break; + } + case gammaf_overflow: + case lgammaf_overflow: + case tgammaf_overflow: + { + RETVAL_HUGE_VALF; ERRNO_RANGE; break; + } + case gammal_negative: + case gamma_negative: + case gammaf_negative: + case lgammal_negative: + case lgamma_negative: + case lgammaf_negative: + case tgammal_negative: + case tgamma_negative: + case tgammaf_negative: + { + ERRNO_DOMAIN; break; + } + case ldexpl_overflow: + case ldexpl_underflow: + case ldexp_overflow: + case ldexp_underflow: + case ldexpf_overflow: + case ldexpf_underflow: + case scalbnl_overflow: + case scalbnl_underflow: + case scalbn_overflow: + case scalbn_underflow: + case scalbnf_overflow: + case scalbnf_underflow: + case scalblnl_overflow: + case scalblnl_underflow: + case scalbln_overflow: + case scalbln_underflow: + case scalblnf_overflow: + case scalblnf_underflow: + case tandl_overflow: + case tand_overflow: + case tandf_overflow: + case cotdl_overflow: + case cotd_overflow: + case cotdf_overflow: + case cotl_overflow: + case cot_overflow: + case cotf_overflow: + case sinhcoshl_overflow: + case sinhcosh_overflow: + case sinhcoshf_overflow: + case nextafterl_overflow: + case nextafter_overflow: + case nextafterf_overflow: + case nextafterl_underflow: + case nextafter_underflow: + case nextafterf_underflow: + case nexttowardl_overflow: + case nexttoward_overflow: + case nexttowardf_overflow: + case nexttowardl_underflow: + case nexttoward_underflow: + case nexttowardf_underflow: + { + ERRNO_RANGE; break; + } + case atanhl_gt_one: + case atanhl_eq_one: + /* atanhl(|x| >= 1) */ + { + ERRNO_DOMAIN; break; + } + case atanh_gt_one: + case atanh_eq_one: + /* atanh(|x| >= 1) */ + { + ERRNO_DOMAIN; break; + } + case atanhf_gt_one: + case atanhf_eq_one: + /* atanhf(|x| >= 1) */ + { + ERRNO_DOMAIN; break; + } + case sqrtl_negative: + /* sqrtl(x < 0) */ + { + ERRNO_DOMAIN; break; + } + case sqrt_negative: + /* sqrt(x < 0) */ + { + ERRNO_DOMAIN; break; + } + case sqrtf_negative: + /* sqrtf(x < 0) */ + { + ERRNO_DOMAIN; break; + } + case y0l_zero: + case y1l_zero: + case ynl_zero: + /* y0l(0) */ + /* y1l(0) */ + /* ynl(0) */ + { + RETVAL_NEG_HUGE_VALL; ERRNO_DOMAIN; break; + } + case y0_zero: + case y1_zero: + case yn_zero: + /* y0(0) */ + /* y1(0) */ + /* yn(0) */ + { + RETVAL_NEG_HUGE_VALD; ERRNO_DOMAIN; break; + } + case y0f_zero: + case y1f_zero: + case ynf_zero: + /* y0f(0) */ + /* y1f(0) */ + /* ynf(0) */ + { + RETVAL_NEG_HUGE_VALF; ERRNO_DOMAIN; break; + } + case y0l_negative: + case y1l_negative: + case ynl_negative: + /* y0l(x < 0) */ + /* y1l(x < 0) */ + /* ynl(x < 0) */ + { +#ifndef _LIBC + RETVAL_NEG_HUGE_VALL; +#endif + ERRNO_DOMAIN; break; + } + case y0_negative: + case y1_negative: + case yn_negative: + /* y0(x < 0) */ + /* y1(x < 0) */ + /* yn(x < 0) */ + { + RETVAL_NEG_HUGE_VALD; ERRNO_DOMAIN; break; + } + case y0f_negative: + case y1f_negative: + case ynf_negative: + /* y0f(x < 0) */ + /* y1f(x < 0) */ + /* ynf(x < 0) */ + { + RETVAL_NEG_HUGE_VALF; ERRNO_DOMAIN; break; + } + case logl_zero: + case log1pl_zero: + case log10l_zero: + case log2l_zero: + /* logl(0) */ + /* log1pl(-1) */ + /* log10l(0) */ + /* log2l(0) */ + { + RETVAL_NEG_HUGE_VALL; ERRNO_RANGE; break; + } + case log_zero: + case log1p_zero: + case log10_zero: + case log2_zero: + /* log(0) */ + /* log1p(-1) */ + /* log10(0) */ + /* log2(0) */ + { + RETVAL_NEG_HUGE_VALD; ERRNO_RANGE; break; + } + case logf_zero: + case log1pf_zero: + case log10f_zero: + case log2f_zero: + /* logf(0) */ + /* log1pf(-1) */ + /* log10f(0) */ + /* log2f(0) */ + { + RETVAL_NEG_HUGE_VALF; ERRNO_RANGE; break; + } + case logl_negative: + case log1pl_negative: + case log10l_negative: + case log2l_negative: + /* logl(x < 0) */ + /* log1pl(x < -1) */ + /* log10l(x < 0) */ + /* log2l(x < 0) */ + { + ERRNO_DOMAIN; break; + } + case log_negative: + case log1p_negative: + case log10_negative: + case log2_negative: + /* log(x < 0) */ + /* log1p(x < -1) */ + /* log10(x < 0) */ + /* log2(x < 0) */ + { + ERRNO_DOMAIN; break; + } + case logf_negative: + case log1pf_negative: + case log10f_negative: + case log2f_negative: + /* logf(x < 0) */ + /* log1pf(x < -1) */ + /* log10f(x < 0) */ + /* log2f(x < 0) */ + { + ERRNO_DOMAIN; break; + } + case expl_overflow: + case exp10l_overflow: + case exp2l_overflow: + /* expl overflow */ + /* exp10l overflow */ + /* exp2l overflow */ + { + RETVAL_HUGE_VALL; ERRNO_RANGE; break; + } + case exp_overflow: + case exp10_overflow: + case exp2_overflow: + /* exp overflow */ + /* exp10 overflow */ + /* exp2 overflow */ + { + RETVAL_HUGE_VALD; ERRNO_RANGE; break; + } + case expf_overflow: + case exp10f_overflow: + case exp2f_overflow: + /* expf overflow */ + { + RETVAL_HUGE_VALF; ERRNO_RANGE; break; + } + case expl_underflow: + case exp10l_underflow: + case exp2l_underflow: + /* expl underflow */ + /* exp10l underflow */ + /* exp2l underflow */ + { + ERRNO_RANGE; break; + } + case exp_underflow: + case exp10_underflow: + case exp2_underflow: + /* exp underflow */ + /* exp10 underflow */ + /* exp2 underflow */ + { + ERRNO_RANGE; break; + } + case expf_underflow: + case exp10f_underflow: + case exp2f_underflow: + /* expf underflow */ + /* exp10f underflow */ + /* exp2f underflow */ + { + ERRNO_RANGE; break; + } + case j0l_gt_loss: + case y0l_gt_loss: + case j1l_gt_loss: + case y1l_gt_loss: + case jnl_gt_loss: + case ynl_gt_loss: + /* jn and yn doubl-extended> XLOSS */ + { + RETVAL_ZEROL; ERRNO_RANGE; break; + } + case j0_gt_loss: + case y0_gt_loss: + case j1_gt_loss: + case y1_gt_loss: + case jn_gt_loss: + case yn_gt_loss: + /* jn and yn double > XLOSS */ + { + RETVAL_ZEROD; ERRNO_RANGE; break; + } + case j0f_gt_loss: + case y0f_gt_loss: + case j1f_gt_loss: + case y1f_gt_loss: + case jnf_gt_loss: + case ynf_gt_loss: + /* j0n and y0n > XLOSS */ + { + RETVAL_ZEROF; ERRNO_RANGE; break; + } + case powl_zero_to_zero: + /* powl 0**0 */ + { + break; + } + case pow_zero_to_zero: + /* pow 0**0 */ + { + break; + } + case powf_zero_to_zero: + /* powf 0**0 */ + { + break; + } + case powl_overflow: + case annuityl_overflow: + case compoundl_overflow: + /* powl(x,y) overflow */ + { + if (INPUT_RESL < ZEROL_VALUE /*0*/) RETVAL_NEG_HUGE_VALL; + else RETVAL_HUGE_VALL; + ERRNO_RANGE; break; + } + case pow_overflow: + case annuity_overflow: + case compound_overflow: + /* pow(x,y) overflow */ + { + if (INPUT_RESD < ZEROD_VALUE /*0*/) RETVAL_NEG_HUGE_VALD; + else RETVAL_HUGE_VALD; + ERRNO_RANGE; break; + } + case powf_overflow: + case annuityf_overflow: + case compoundf_overflow: + /* powf(x,y) overflow */ + { + if (INPUT_RESF < ZEROF_VALUE /*0*/) RETVAL_NEG_HUGE_VALF; + else RETVAL_HUGE_VALF; + ERRNO_RANGE; break; + } + case powl_underflow: + case annuityl_underflow: + case compoundl_underflow: + /* powl(x,y) underflow */ + { + RETVAL_ZEROL; ERRNO_RANGE; break; + } + case pow_underflow: + case annuity_underflow: + case compound_underflow: + /* pow(x,y) underflow */ + { + RETVAL_ZEROD; ERRNO_RANGE; break; + } + case powf_underflow: + case annuityf_underflow: + case compoundf_underflow: + /* powf(x,y) underflow */ + { + RETVAL_ZEROF; ERRNO_RANGE; break; + } + case annuityl_by_zero: + case annuityl_less_m1: + case compoundl_by_zero: + case compoundl_less_m1: + case annuity_by_zero: + case annuity_less_m1: + case compound_by_zero: + case compound_less_m1: + case annuityf_by_zero: + case annuityf_less_m1: + case compoundf_by_zero: + case compoundf_less_m1: + { + ERRNO_DOMAIN; break; + } + case powl_zero_to_negative: + /* 0**neg */ + { + ERRNO_DOMAIN; break; + } + case pow_zero_to_negative: + /* 0**neg */ + { + ERRNO_DOMAIN; break; + } + case powf_zero_to_negative: + /* 0**neg */ + { + ERRNO_DOMAIN; break; + } + case powl_neg_to_non_integer: + /* neg**non_integral */ + { + ERRNO_DOMAIN; break; + } + case pow_neg_to_non_integer: + /* neg**non_integral */ + { + ERRNO_DOMAIN; break; + } + case powf_neg_to_non_integer: + /* neg**non-integral */ + { + ERRNO_DOMAIN; break; + } + case powl_nan_to_zero: + /* powl(NaN,0.0) */ + /* Special Error */ + { + break; + } + case pow_nan_to_zero: + /* pow(NaN,0.0) */ + { + break; + } + case powf_nan_to_zero: + /* powf(NaN,0.0) */ + { + break; + } + case atan2l_zero: + case atan2dl_zero: + /* atan2l(0,0) */ + /* atan2dl(0,0) */ + { + break; + } + case atan2_zero: + case atan2d_zero: + /* atan2(0,0) */ + /* atan2d(0,0) */ + { + break; + } + case atan2f_zero: + case atan2df_zero: + /* atan2f(0,0) */ + /* atan2df(0,0) */ + { + break; + } + case expm1l_overflow: + /* expm1 overflow */ + { + ERRNO_RANGE; break; + } + case expm1_overflow: + /* expm1 overflow */ + { + ERRNO_RANGE; break; + } + case expm1f_overflow: + /* expm1f overflow */ + { + ERRNO_RANGE; break; + } + case expm1l_underflow: + /* expm1 underflow */ + { + ERRNO_RANGE; break; + } + case expm1_underflow: + /* expm1 underflow */ + { + ERRNO_RANGE; break; + } + case expm1f_underflow: + /* expm1f underflow */ + { + ERRNO_RANGE; break; + } + case hypotl_overflow: + /* hypotl overflow */ + { + RETVAL_HUGE_VALL; ERRNO_RANGE; break; + } + case hypot_overflow: + /* hypot overflow */ + { + RETVAL_HUGE_VALD; ERRNO_RANGE; break; + } + case hypotf_overflow: + /* hypotf overflow */ + { + RETVAL_HUGE_VALF; ERRNO_RANGE; break; + } + case scalbl_underflow: + /* scalbl underflow */ + { + if (INPUT_XL < ZEROL_VALUE /*0*/) RETVAL_NEG_ZEROL; + else RETVAL_ZEROL; + ERRNO_RANGE; break; + } + case scalb_underflow: + /* scalb underflow */ + { + if (INPUT_XD < ZEROD_VALUE /*0*/) RETVAL_NEG_ZEROD; + else RETVAL_ZEROD; + ERRNO_RANGE; break; + } + case scalbf_underflow: + /* scalbf underflow */ + { + if (INPUT_XF < ZEROF_VALUE /*0*/) RETVAL_NEG_ZEROF; + else RETVAL_ZEROF; + ERRNO_RANGE; break; + } + case scalbl_overflow: + /* scalbl overflow */ + { + if (INPUT_XL < ZEROL_VALUE /*0*/) RETVAL_NEG_HUGE_VALL; + else RETVAL_HUGE_VALL; + ERRNO_RANGE; break; + } + case scalb_overflow: + /* scalb overflow */ + { + if (INPUT_XD < ZEROD_VALUE /*0*/) RETVAL_NEG_HUGE_VALD; + else RETVAL_HUGE_VALD; + ERRNO_RANGE; break; + } + case scalbf_overflow: + /* scalbf overflow */ + { + if (INPUT_XF < ZEROF_VALUE /*0*/) RETVAL_NEG_HUGE_VALF; + else RETVAL_HUGE_VALF; + ERRNO_RANGE; break; + } + case acoshl_lt_one: + /* acoshl(x < 1) */ + { + ERRNO_DOMAIN; break; + } + case acosh_lt_one: + /* acosh(x < 1) */ + { + ERRNO_DOMAIN; break; + } + case acoshf_lt_one: + /* acoshf(x < 1) */ + { + ERRNO_DOMAIN; break; + } + case acosl_gt_one: + case acosdl_gt_one: + /* acosl(x > 1) */ + /* acosdl(x > 1) */ + { + ERRNO_DOMAIN; break; + } + case acos_gt_one: + case acosd_gt_one: + /* acos(x > 1) */ + /* acosd(x > 1) */ + { + ERRNO_DOMAIN; break; + } + case acosf_gt_one: + case acosdf_gt_one: + /* acosf(x > 1) */ + /* acosdf(x > 1) */ + { + ERRNO_DOMAIN; break; + } + case asinl_gt_one: + case asindl_gt_one: + /* asinl(x > 1) */ + /* asindl(x > 1) */ + { + ERRNO_DOMAIN; break; + } + case asin_gt_one: + case asind_gt_one: + /* asin(x > 1) */ + /* asind(x > 1) */ + { + ERRNO_DOMAIN; break; + } + case asinf_gt_one: + case asindf_gt_one: + /* asinf(x > 1) */ + /* asindf(x > 1) */ + { + ERRNO_DOMAIN; break; + } + case remainderl_by_zero: + case fmodl_by_zero: + /* fmodl(x,0) */ + { + ERRNO_DOMAIN; break; + } + case remainder_by_zero: + case fmod_by_zero: + /* fmod(x,0) */ + { + ERRNO_DOMAIN; break; + } + case remainderf_by_zero: + case fmodf_by_zero: + /* fmodf(x,0) */ + { + ERRNO_DOMAIN; break; + } + case coshl_overflow: + /* coshl overflows */ + { + RETVAL_HUGE_VALL; ERRNO_RANGE; break; + } + case cosh_overflow: + /* cosh overflows */ + { + RETVAL_HUGE_VALD; ERRNO_RANGE; break; + } + case coshf_overflow: + /* coshf overflows */ + { + RETVAL_HUGE_VALF; ERRNO_RANGE; break; + } + case sinhl_overflow: + /* sinhl overflows */ + { + if (INPUT_XL > ZEROL_VALUE /*0*/) RETVAL_HUGE_VALL; + else RETVAL_NEG_HUGE_VALL; + ERRNO_RANGE; break; + } + case sinh_overflow: + /* sinh overflows */ + { + if (INPUT_XD > ZEROD_VALUE /*0*/) RETVAL_HUGE_VALD; + else RETVAL_NEG_HUGE_VALD; + ERRNO_RANGE; break; + } + case sinhf_overflow: + /* sinhf overflows */ + { + if (INPUT_XF > ZEROF_VALUE /*0*/) RETVAL_HUGE_VALF; + else RETVAL_NEG_HUGE_VALF; + ERRNO_RANGE; break; + } + case logbl_zero: + /* logbl(0) */ + { + ERRNO_DOMAIN; break; + } + case logb_zero: + /* logb(0) */ + { + ERRNO_DOMAIN; break; + } + case logbf_zero: + /* logbf(0) */ + { + ERRNO_DOMAIN; break; + } + case ilogbl_zero: + /* ilogbl(0) */ + { + ERRNO_RANGE; break; + } + case ilogb_zero: + /* ilogb(0) */ + { + ERRNO_RANGE; break; + } + case ilogbf_zero: + /* ilogbf(0) */ + { + ERRNO_RANGE; break; + } + default: + break; +} +return; +/* _POSIX_ */ +} + +/*******************************/ +/* __SVID__ and __XOPEN__ Path */ +/*******************************/ +else +{ + switch(input_tag) + { + case ldexpl_overflow: + case ldexpl_underflow: + case ldexp_overflow: + case ldexp_underflow: + case ldexpf_overflow: + case ldexpf_underflow: + case scalbnl_overflow: + case scalbnl_underflow: + case scalbn_overflow: + case scalbn_underflow: + case scalbnf_overflow: + case scalbnf_underflow: + case scalblnl_overflow: + case scalblnl_underflow: + case scalbln_overflow: + case scalbln_underflow: + case scalblnf_overflow: + case scalblnf_underflow: + case tandl_overflow: + case tand_overflow: + case tandf_overflow: + case cotdl_overflow: + case cotd_overflow: + case cotdf_overflow: + case cotl_overflow: + case cot_overflow: + case cotf_overflow: + case annuityl_overflow: + case annuityl_underflow: + case annuity_overflow: + case annuity_underflow: + case annuityf_overflow: + case annuityf_underflow: + case compoundl_overflow: + case compoundl_underflow: + case compound_overflow: + case compound_underflow: + case compoundf_overflow: + case compoundf_underflow: + { + ERRNO_RANGE; break; + } + case annuityl_by_zero: + case annuityl_less_m1: + case annuity_by_zero: + case annuity_less_m1: + case annuityf_by_zero: + case annuityf_less_m1: + case compoundl_by_zero: + case compoundl_less_m1: + case compound_by_zero: + case compound_less_m1: + case compoundf_by_zero: + case compoundf_less_m1: + { + ERRNO_DOMAIN; break; + } + case sqrtl_negative: + /* sqrtl(x < 0) */ + { + DOMAINL; NAMEL = (char *) "sqrtl"; + ifSVID + { + RETVAL_ZEROL; + NOT_MATHERRL + { + WRITEL_SQRT; + ERRNO_DOMAIN; + } + } + else + { /* NaN already computed */ + NOT_MATHERRL {ERRNO_DOMAIN;} + } + *(long double *)retval = excl.retval; + break; + } + case sqrt_negative: + /* sqrt(x < 0) */ + { + DOMAIND; NAMED = (char *) "sqrt"; + ifSVID + { + + RETVAL_ZEROD; + NOT_MATHERRD + { + WRITED_SQRT; + ERRNO_DOMAIN; + } + } + else + { /* NaN already computed */ + NOT_MATHERRD {ERRNO_DOMAIN;} + } + *(double *)retval = exc.retval; + break; + } + case sqrtf_negative: + /* sqrtf(x < 0) */ + { + DOMAINF; NAMEF = (char *) "sqrtf"; + ifSVID + { + RETVAL_ZEROF; + NOT_MATHERRF + { + WRITEF_SQRT; + ERRNO_DOMAIN; + } + } + else + { + NOT_MATHERRF {ERRNO_DOMAIN;} + } + *(float *)retval = excf.retval; + break; + } + case logl_zero: + /* logl(0) */ + { + SINGL; NAMEL = (char *) "logl"; + ifSVID + { + RETVAL_NEG_HUGEL; + NOT_MATHERRL + { + WRITEL_LOG_ZERO; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALL; + NOT_MATHERRL {ERRNO_DOMAIN;} + } + *(long double *)retval = excl.retval; + break; + } + case log_zero: + /* log(0) */ + { + SINGD; NAMED = (char *) "log"; + ifSVID + { + RETVAL_NEG_HUGED; + NOT_MATHERRD + { + WRITED_LOG_ZERO; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALD; + NOT_MATHERRD {ERRNO_DOMAIN;} + } + *(double *)retval = exc.retval; + break; + } + case logf_zero: + /* logf(0) */ + { + SINGF; NAMEF = (char *) "logf"; + ifSVID + { + RETVAL_NEG_HUGEF; + NOT_MATHERRF + { + WRITEF_LOG_ZERO; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALF; + NOT_MATHERRF {ERRNO_DOMAIN;} + } + *(float *)retval = excf.retval; + break; + } + + case logl_negative: + /* logl(x < 0) */ + { + DOMAINL; NAMEL = (char *) "logl"; + ifSVID + { + RETVAL_NEG_HUGEL; + NOT_MATHERRL + { + WRITEL_LOG_NEGATIVE; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALL; + NOT_MATHERRL {ERRNO_DOMAIN;} + } + *(long double *)retval = excl.retval; + break; + } + case log_negative: + /* log(x < 0) */ + { + DOMAIND; NAMED = (char *) "log"; + ifSVID + { + RETVAL_NEG_HUGED; + NOT_MATHERRD + { + WRITED_LOG_NEGATIVE; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALD; + NOT_MATHERRD {ERRNO_DOMAIN;} + } + *(double *)retval = exc.retval; + break; + } + case logf_negative: + /* logf(x < 0) */ + { + DOMAINF; NAMEF = (char *) "logf"; + ifSVID + { + RETVAL_NEG_HUGEF; + NOT_MATHERRF + { + WRITEF_LOG_NEGATIVE; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALF; + NOT_MATHERRF{ERRNO_DOMAIN;} + } + *(float *)retval = excf.retval; + break; + } + case log1pl_zero: + /* log1pl(-1) */ + { + SINGL; NAMEL = (char *) "log1pl"; + ifSVID + { + RETVAL_NEG_HUGEL; + NOT_MATHERRL + { + WRITEL_LOG1P_ZERO; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALL; + NOT_MATHERRL {ERRNO_DOMAIN;} + } + *(long double *)retval = excl.retval; + break; + } + case log1p_zero: + /* log1p(-1) */ + { + SINGD; NAMED = (char *) "log1p"; + ifSVID + { + RETVAL_NEG_HUGED; + NOT_MATHERRD + { + WRITED_LOG1P_ZERO; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALD; + NOT_MATHERRD {ERRNO_DOMAIN;} + } + *(double *)retval = exc.retval; + break; + } + case log1pf_zero: + /* log1pf(-1) */ + { + SINGF; NAMEF = (char *) "log1pf"; + ifSVID + { + RETVAL_NEG_HUGEF; + NOT_MATHERRF + { + WRITEF_LOG1P_ZERO; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALF; + NOT_MATHERRF {ERRNO_DOMAIN;} + } + *(float *)retval = excf.retval; + break; + } + case log1pl_negative: + /* log1pl(x < -1) */ + { + DOMAINL; NAMEL = (char *) "log1pl"; + ifSVID + { + RETVAL_NEG_HUGEL; + NOT_MATHERRL + { + WRITEL_LOG1P_NEGATIVE; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALL; + NOT_MATHERRL {ERRNO_DOMAIN;} + } + *(long double *)retval = excl.retval; + break; + } + case log1p_negative: + /* log1p(x < -1) */ + { + DOMAIND; NAMED = (char *) "log1p"; + ifSVID + { + RETVAL_NEG_HUGED; + NOT_MATHERRD + { + WRITED_LOG1P_NEGATIVE; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALD; + NOT_MATHERRD {ERRNO_DOMAIN;} + } + *(double *)retval = exc.retval; + break; + } + case log1pf_negative: + /* log1pf(x < -1) */ + { + DOMAINF; NAMEF = (char *) "log1pf"; + ifSVID + { + RETVAL_NEG_HUGEF; + NOT_MATHERRF + { + WRITEF_LOG1P_NEGATIVE; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALF; + NOT_MATHERRF {ERRNO_DOMAIN;} + } + *(float *)retval = excf.retval; + break; + } + case log10l_zero: + /* log10l(0) */ + { + SINGL; NAMEL = (char *) "log10l"; + ifSVID + { + RETVAL_NEG_HUGEL; + NOT_MATHERRL + { + WRITEL_LOG10_ZERO; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALL; + NOT_MATHERRL {ERRNO_DOMAIN;} + } + *(long double *)retval = excl.retval; + break; + } + case log10_zero: + /* log10(0) */ + { + SINGD; NAMED = (char *) "log10"; + ifSVID + { + RETVAL_NEG_HUGED; + NOT_MATHERRD + { + WRITED_LOG10_ZERO; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALD; + NOT_MATHERRD {ERRNO_DOMAIN;} + } + *(double *)retval = exc.retval; + break; + } + case log10f_zero: + /* log10f(0) */ + { + SINGF; NAMEF = (char *) "log10f"; + ifSVID + { + RETVAL_NEG_HUGEF; + NOT_MATHERRF + { + WRITEF_LOG10_ZERO; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALF; + NOT_MATHERRF {ERRNO_DOMAIN;} + } + *(float *)retval = excf.retval; + break; + } + case log10l_negative: + /* log10l(x < 0) */ + { + DOMAINL; NAMEL = (char *) "log10l"; + ifSVID + { + RETVAL_NEG_HUGEL; + NOT_MATHERRL + { + WRITEL_LOG10_NEGATIVE; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALL; + NOT_MATHERRL {ERRNO_DOMAIN;} + } + *(long double *)retval = excl.retval; + break; + } + case log10_negative: + /* log10(x < 0) */ + { + DOMAIND; NAMED = (char *) "log10"; + ifSVID + { + RETVAL_NEG_HUGED; + NOT_MATHERRD + { + WRITED_LOG10_NEGATIVE; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALD; + NOT_MATHERRD {ERRNO_DOMAIN;} + } + *(double *)retval = exc.retval; + break; + } + case log10f_negative: + /* log10f(x < 0) */ + { + DOMAINF; NAMEF = (char *) "log10f"; + ifSVID + { + RETVAL_NEG_HUGEF; + NOT_MATHERRF + { + WRITEF_LOG10_NEGATIVE; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALF; + NOT_MATHERRF {ERRNO_DOMAIN;} + } + *(float *)retval = excf.retval; + break; + } + case log2l_zero: + /* log2l(0) */ + { + SINGL; NAMEL = (char *) "log2l"; + ifSVID + { + RETVAL_NEG_HUGEL; + NOT_MATHERRL + { + WRITEL_LOG2_ZERO; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALL; + NOT_MATHERRL {ERRNO_DOMAIN;} + } + *(long double *)retval = excl.retval; + break; + } + case log2_zero: + /* log2(0) */ + { + SINGD; NAMED = (char *) "log2"; + ifSVID + { + RETVAL_NEG_HUGED; + NOT_MATHERRD + { + WRITED_LOG2_ZERO; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALD; + NOT_MATHERRD {ERRNO_DOMAIN;} + } + *(double *)retval = exc.retval; + break; + } + case log2f_zero: + /* log2f(0) */ + { + SINGF; NAMEF = (char *) "log2f"; + ifSVID + { + RETVAL_NEG_HUGEF; + NOT_MATHERRF + { + WRITEF_LOG2_ZERO; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALF; + NOT_MATHERRF {ERRNO_DOMAIN;} + } + *(float *)retval = excf.retval; + break; + } + case log2l_negative: + /* log2l(x < 0) */ + { + DOMAINL; NAMEL = (char *) "log2l"; + ifSVID + { + RETVAL_NEG_HUGEL; + NOT_MATHERRL + { + WRITEL_LOG2_NEGATIVE; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALL; + NOT_MATHERRL {ERRNO_DOMAIN;} + } + *(long double *)retval = excl.retval; + break; + } + case log2_negative: + /* log2(x < 0) */ + { + DOMAIND; NAMED = (char *) "log2"; + ifSVID + { + RETVAL_NEG_HUGED; + NOT_MATHERRD + { + WRITED_LOG2_NEGATIVE; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALD; + NOT_MATHERRD {ERRNO_DOMAIN;} + } + *(double *)retval = exc.retval; + break; + } + case log2f_negative: + /* log2f(x < 0) */ + { + DOMAINF; NAMEF = (char *) "log2f"; + ifSVID + { + RETVAL_NEG_HUGEF; + NOT_MATHERRF + { + WRITEF_LOG2_NEGATIVE; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALF; + NOT_MATHERRF {ERRNO_DOMAIN;} + } + *(float *)retval = excf.retval; + break; + } + case expl_overflow: + /* expl overflow */ + { + OVERFLOWL; NAMEL = (char *) "expl"; + ifSVID + { + RETVAL_HUGEL; + } + else + { + RETVAL_HUGE_VALL; + } + NOT_MATHERRL {ERRNO_RANGE;} + *(long double *)retval = excl.retval; + break; + } + case exp_overflow: + /* exp overflow */ + { + OVERFLOWD; NAMED = (char *) "exp"; + ifSVID + { + RETVAL_HUGED; + } + else + { + RETVAL_HUGE_VALD; + } + NOT_MATHERRD {ERRNO_RANGE;} + *(double *)retval = exc.retval; + break; + } + case expf_overflow: + /* expf overflow */ + { + OVERFLOWF; NAMEF = (char *) "expf"; + ifSVID + { + RETVAL_HUGEF; + } + else + { + RETVAL_HUGE_VALF; + } + NOT_MATHERRF {ERRNO_RANGE;} + *(float *)retval = excf.retval; + break; + } + case expl_underflow: + /* expl underflow */ + { + UNDERFLOWL; NAMEL = (char *) "expl"; RETVAL_ZEROL; + NOT_MATHERRL {ERRNO_RANGE;} + *(long double *)retval = excl.retval; + break; + } + case exp_underflow: + /* exp underflow */ + { + UNDERFLOWD; NAMED = (char *) "exp"; RETVAL_ZEROD; + NOT_MATHERRD {ERRNO_RANGE;} + *(double *)retval = exc.retval; + break; + } + case expf_underflow: + /* expf underflow */ + { + UNDERFLOWF; NAMEF = (char *) "expf"; RETVAL_ZEROF; + NOT_MATHERRF {ERRNO_RANGE;} + *(float *)retval = excf.retval; + break; + } + case powl_zero_to_zero: + /* powl 0**0 */ + { + DOMAINL; NAMEL = (char *) "powl"; + ifSVID + { + RETVAL_ZEROL; + NOT_MATHERRL + { + WRITEL_POW_ZERO_TO_ZERO; + ERRNO_DOMAIN; + } + *(long double *)retval = excl.retval; + } + else RETVAL_ONEL; + break; + } + case pow_zero_to_zero: + /* pow 0**0 */ + { + DOMAIND; NAMED = (char *) "pow"; + ifSVID + { + RETVAL_ZEROD; + NOT_MATHERRD + { + WRITED_POW_ZERO_TO_ZERO; + ERRNO_DOMAIN; + } + *(double *)retval = exc.retval; + } + else RETVAL_ONED; + break; + } + case powf_zero_to_zero: + /* powf 0**0 */ + { + DOMAINF; NAMEF = (char *) "powf"; + ifSVID + { + RETVAL_ZEROF; + NOT_MATHERRF + { + WRITEF_POW_ZERO_TO_ZERO; + ERRNO_DOMAIN; + } + *(float *)retval = excf.retval; + } + else RETVAL_ONEF; + break; + } + case powl_overflow: + /* powl(x,y) overflow */ + { + OVERFLOWL; NAMEL = (char *) "powl"; + ifSVID + { + if (INPUT_RESL < ZEROL_VALUE /*0*/) RETVAL_NEG_HUGEL; + else RETVAL_HUGEL; + } + else + { + if (INPUT_RESL < ZEROL_VALUE /*0*/) RETVAL_NEG_HUGE_VALL; + else RETVAL_HUGE_VALL; + } + NOT_MATHERRL {ERRNO_RANGE;} + *(long double *)retval = excl.retval; + break; + } + case pow_overflow: + /* pow(x,y) overflow */ + { + OVERFLOWD; NAMED = (char *) "pow"; + ifSVID + { + if (INPUT_RESD < ZEROD_VALUE /*0*/) RETVAL_NEG_HUGED; + else RETVAL_HUGED; + } + else + { + if (INPUT_RESD < ZEROD_VALUE /*0*/) RETVAL_NEG_HUGE_VALD; + else RETVAL_HUGE_VALD; + } + NOT_MATHERRD {ERRNO_RANGE;} + *(double *)retval = exc.retval; + break; + } + case powf_overflow: + /* powf(x,y) overflow */ + { + OVERFLOWF; NAMEF = (char *) "powf"; + ifSVID + { + if (INPUT_RESF < ZEROF_VALUE /*0*/) RETVAL_NEG_HUGEF; + else RETVAL_HUGEF; + } + else + { + if (INPUT_RESF < ZEROF_VALUE /*0*/) RETVAL_NEG_HUGE_VALF; + else RETVAL_HUGE_VALF; + } + NOT_MATHERRF {ERRNO_RANGE;} + *(float *)retval = excf.retval; + break; + } + case powl_underflow: + /* powl(x,y) underflow */ + { + UNDERFLOWL; NAMEL = (char *) "powl"; RETVAL_ZEROL; + NOT_MATHERRL {ERRNO_RANGE;} + *(long double *)retval = excl.retval; + break; + } + case pow_underflow: + /* pow(x,y) underflow */ + { + UNDERFLOWD; NAMED = (char *) "pow"; RETVAL_ZEROD; + NOT_MATHERRD {ERRNO_RANGE;} + *(double *)retval = exc.retval; + break; + } + case powf_underflow: + /* powf(x,y) underflow */ + { + UNDERFLOWF; NAMEF = (char *) "powf"; RETVAL_ZEROF; + NOT_MATHERRF {ERRNO_RANGE;} + *(float *)retval = excf.retval; + break; + } + case powl_zero_to_negative: + /* 0 to neg */ + { + DOMAINL; NAMEL = (char *) "powl"; + ifSVID + { + RETVAL_ZEROL; + NOT_MATHERRL + { + WRITEL_POW_ZERO_TO_NEGATIVE; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALL; + NOT_MATHERRL {ERRNO_DOMAIN;} + } + *(long double *)retval = excl.retval; + break; + } + case pow_zero_to_negative: + /* 0**neg */ + { + DOMAIND; NAMED = (char *) "pow"; + ifSVID + { + RETVAL_ZEROD; + NOT_MATHERRD + { + WRITED_POW_ZERO_TO_NEGATIVE; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALD; + NOT_MATHERRD {ERRNO_DOMAIN;} + } + *(double *)retval = exc.retval; + break; + } + case powf_zero_to_negative: + /* 0**neg */ + { + DOMAINF; NAMEF = (char *) "powf"; + ifSVID + { + RETVAL_ZEROF; + NOT_MATHERRF + { + WRITEF_POW_ZERO_TO_NEGATIVE; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALF; + NOT_MATHERRF {ERRNO_DOMAIN;} + } + *(float *)retval = excf.retval; + break; + } + case powl_neg_to_non_integer: + /* neg**non_integral */ + { + DOMAINL; NAMEL = (char *) "powl"; + ifSVID + { + RETVAL_ZEROL; + NOT_MATHERRL + { + WRITEL_POW_NEG_TO_NON_INTEGER; + ERRNO_DOMAIN; + } + } + else + { + NOT_MATHERRL {ERRNO_DOMAIN;} + } + *(long double *)retval = excl.retval; + break; + } + case pow_neg_to_non_integer: + /* neg**non_integral */ + { + DOMAIND; NAMED = (char *) "pow"; + ifSVID + { + RETVAL_ZEROD; + NOT_MATHERRD + { + WRITED_POW_NEG_TO_NON_INTEGER; + ERRNO_DOMAIN; + } + } + else + { + NOT_MATHERRD {ERRNO_DOMAIN;} + } + *(double *)retval = exc.retval; + break; + } + case powf_neg_to_non_integer: + /* neg**non-integral */ + { + DOMAINF; NAMEF = (char *) "powf"; + ifSVID + { + RETVAL_ZEROF; + NOT_MATHERRF + { + WRITEF_POW_NEG_TO_NON_INTEGER; + ERRNO_DOMAIN; + } + } + else + { + NOT_MATHERRF {ERRNO_DOMAIN;} + } + *(float *)retval = excf.retval; + break; + } + case powl_nan_to_zero: + /* pow(NaN,0.0) */ + /* Special Error */ + { + DOMAINL; NAMEL = (char *) "powl"; + *(long double *)retval = *(long double *)arg1; + NOT_MATHERRL {ERRNO_DOMAIN;} + *(long double *)retval = excl.retval; + break; + } + case pow_nan_to_zero: + /* pow(NaN,0.0) */ + /* Special Error */ + { + DOMAIND; NAMED = (char *) "pow"; + *(double *)retval = *(double *)arg1; + NOT_MATHERRD {ERRNO_DOMAIN;} + *(double *)retval = exc.retval; + break; + } + case powf_nan_to_zero: + /* powf(NaN,0.0) */ + /* Special Error */ + { + DOMAINF; NAMEF = (char *) "powf"; + *(float *)retval = *(float *)arg1; + NOT_MATHERRF {ERRNO_DOMAIN;} + *(float *)retval = excf.retval; + break; + } + case atan2l_zero: + /* atan2l(0.0,0.0) */ + { + DOMAINL; NAMEL = (char *) "atan2l"; + RETVAL_ZEROL; + NOT_MATHERRL + { + ifSVID + { + WRITEL_ATAN2_ZERO_BY_ZERO; + } + ERRNO_DOMAIN; + } + *(long double *)retval = excl.retval; + break; + } + case atan2_zero: + /* atan2(0.0,0.0) */ + { + DOMAIND; NAMED = (char *) "atan2"; + RETVAL_ZEROD; + NOT_MATHERRD + { + ifSVID + { + WRITED_ATAN2_ZERO_BY_ZERO; + } + ERRNO_DOMAIN; + } + *(double *)retval = exc.retval; + break; + } + case atan2f_zero: + /* atan2f(0.0,0.0) */ + { + DOMAINF; NAMEF = (char *) "atan2f"; + RETVAL_ZEROF; + NOT_MATHERRF + { + ifSVID + { + WRITEF_ATAN2_ZERO_BY_ZERO; + } + ERRNO_DOMAIN; + } + *(float *)retval = excf.retval; + break; + } + case atan2dl_zero: + /* atan2dl(0.0,0.0) */ + { + DOMAINL; NAMEL = (char *) "atan2dl"; + RETVAL_ZEROL; + NOT_MATHERRL + { + ifSVID + { + WRITEL_ATAN2D_ZERO_BY_ZERO; + } + ERRNO_DOMAIN; + } + *(long double *)retval = excl.retval; + break; + } + case atan2d_zero: + /* atan2d(0.0,0.0) */ + { + DOMAIND; NAMED = (char *) "atan2d"; + RETVAL_ZEROD; + NOT_MATHERRD + { + ifSVID + { + WRITED_ATAN2D_ZERO_BY_ZERO; + } + ERRNO_DOMAIN; + } + *(double *)retval = exc.retval; + break; + } + case atan2df_zero: + /* atan2df(0.0,0.0) */ + { + DOMAINF; NAMEF = (char *) "atan2df"; + RETVAL_ZEROF; + NOT_MATHERRF + { + ifSVID + { + WRITEF_ATAN2D_ZERO_BY_ZERO; + } + ERRNO_DOMAIN; + } + *(float *)retval = excf.retval; + break; + } + case expm1_overflow: + /* expm1(finite) overflow */ + /* Overflow is the only documented */ + /* special value. */ + { + ERRNO_RANGE; + break; + } + case expm1f_overflow: + /* expm1f(finite) overflow */ + { + ERRNO_RANGE; + break; + } + case expm1_underflow: + /* expm1(finite) underflow */ + /* Underflow is not documented */ + /* special value. */ + { + ERRNO_RANGE; + break; + } + case expm1f_underflow: + /* expm1f(finite) underflow */ + { + ERRNO_RANGE; + break; + } + case scalbl_underflow: + /* scalbl underflow */ + { + UNDERFLOWL; NAMEL = (char *) "scalbl"; + if (INPUT_XL < ZEROL_VALUE /*0.0L*/) RETVAL_NEG_ZEROL; + else RETVAL_ZEROL; + NOT_MATHERRL {ERRNO_RANGE;} + *(long double *)retval = excl.retval; + break; + } + case scalb_underflow: + /* scalb underflow */ + { + UNDERFLOWD; NAMED = (char *) "scalb"; + if (INPUT_XD < ZEROD_VALUE /*0.0*/) RETVAL_NEG_ZEROD; + else RETVAL_ZEROD; + NOT_MATHERRD {ERRNO_RANGE;} + *(double *)retval = exc.retval; + break; + } + case scalbf_underflow: + /* scalbf underflow */ + { + UNDERFLOWF; NAMEF = (char *) "scalbf"; + if (INPUT_XF < ZEROF_VALUE /*0.0*/) RETVAL_NEG_ZEROF; + else RETVAL_ZEROF; + NOT_MATHERRF {ERRNO_RANGE;} + *(float *)retval = excf.retval; + break; + } + case scalbl_overflow: + /* scalbl overflow */ + { + OVERFLOWL; NAMEL = (char *) "scalbl"; + if (INPUT_XL < ZEROL_VALUE /*0*/) RETVAL_NEG_HUGE_VALL; + else RETVAL_HUGE_VALL; + NOT_MATHERRL {ERRNO_RANGE;} + *(long double *)retval = excl.retval; + break; + } + case scalb_overflow: + /* scalb overflow */ + { + OVERFLOWD; NAMED = (char *) "scalb"; + if (INPUT_XD < ZEROD_VALUE /*0*/) RETVAL_NEG_HUGE_VALD; + else RETVAL_HUGE_VALD; + NOT_MATHERRD {ERRNO_RANGE;} + *(double *)retval = exc.retval; + break; + } + case scalbf_overflow: + /* scalbf overflow */ + { + OVERFLOWF; NAMEF = (char *) "scalbf"; + if (INPUT_XF < ZEROF_VALUE /*0*/) RETVAL_NEG_HUGE_VALF; + else RETVAL_HUGE_VALF; + NOT_MATHERRF {ERRNO_RANGE;} + *(float *)retval = excf.retval; + break; + } + case hypotl_overflow: + /* hypotl overflow */ + { + OVERFLOWL; NAMEL = (char *) "hypotl"; + ifSVID + { + RETVAL_HUGEL; + } + else + { + RETVAL_HUGE_VALL; + } + NOT_MATHERRL {ERRNO_RANGE;} + *(long double *)retval = excl.retval; + break; + } + case hypot_overflow: + /* hypot overflow */ + { + OVERFLOWD; NAMED = (char *) "hypot"; + ifSVID + { + RETVAL_HUGED; + } + else + { + RETVAL_HUGE_VALD; + } + NOT_MATHERRD {ERRNO_RANGE;} + *(double *)retval = exc.retval; + break; + } + case hypotf_overflow: + /* hypotf overflow */ + { + OVERFLOWF; NAMEF = (char *) "hypotf"; + ifSVID + { + RETVAL_HUGEF; + } + else + { + RETVAL_HUGE_VALF; + } + NOT_MATHERRF {ERRNO_RANGE;} + *(float *)retval = excf.retval; + break; + } + case acosl_gt_one: + /* acosl(x > 1) */ + { + DOMAINL; NAMEL = (char *) "acosl"; + RETVAL_ZEROL; + ifSVID + { + NOT_MATHERRL + { + WRITEL_ACOS; + ERRNO_DOMAIN; + } + } + else + { + NOT_MATHERRL {ERRNO_DOMAIN;} + } + *(long double *)retval = excl.retval; + break; + } + case acos_gt_one: + /* acos(x > 1) */ + { + DOMAIND; NAMED = (char *) "acos"; + RETVAL_ZEROD; + ifSVID + { + NOT_MATHERRD + { + WRITED_ACOS; + ERRNO_DOMAIN; + } + } + else + { + NOT_MATHERRD {ERRNO_DOMAIN;} + } + *(double *)retval = exc.retval; + break; + } + case acosf_gt_one: + /* acosf(x > 1) */ + { + DOMAINF; NAMEF = (char *) "acosf"; + RETVAL_ZEROF; + ifSVID + { + NOT_MATHERRF + { + WRITEF_ACOS; + ERRNO_DOMAIN; + } + } + else + { + NOT_MATHERRF {ERRNO_DOMAIN;} + } + *(float *)retval = excf.retval; + break; + } + case asinl_gt_one: + /* asinl(x > 1) */ + { + DOMAINL; NAMEL = (char *) "asinl"; + RETVAL_ZEROL; + ifSVID + { + NOT_MATHERRL + { + WRITEL_ASIN; + ERRNO_DOMAIN; + } + } + else + { + NOT_MATHERRL {ERRNO_DOMAIN;} + } + *(long double *)retval = excl.retval; + break; + } + case asin_gt_one: + /* asin(x > 1) */ + { + DOMAIND; NAMED = (char *) "asin"; + RETVAL_ZEROD; + ifSVID + { + NOT_MATHERRD + { + WRITED_ASIN; + ERRNO_DOMAIN; + } + } + else + { + NOT_MATHERRD {ERRNO_DOMAIN;} + } + *(double *)retval = exc.retval; + break; + } + case asinf_gt_one: + /* asinf(x > 1) */ + { + DOMAINF; NAMEF = (char *) "asinf"; + RETVAL_ZEROF; + ifSVID + { + NOT_MATHERRF + { + WRITEF_ASIN; + ERRNO_DOMAIN; + } + } + else + { + NOT_MATHERRF {ERRNO_DOMAIN;} + } + *(float *)retval = excf.retval; + break; + } + case acosdl_gt_one: + /* acosdl(x > 1) */ + { + DOMAINL; NAMEL = (char *) "acosdl"; + RETVAL_ZEROL; + ifSVID + { + NOT_MATHERRL + { + WRITEL_ACOSD; + ERRNO_DOMAIN; + } + } + else + { + NOT_MATHERRL {ERRNO_DOMAIN;} + } + *(long double *)retval = excl.retval; + break; + } + case acosd_gt_one: + /* acosd(x > 1) */ + { + DOMAIND; NAMED = (char *) "acosd"; + RETVAL_ZEROD; + ifSVID + { + NOT_MATHERRD + { + WRITED_ACOSD; + ERRNO_DOMAIN; + } + } + else + { + NOT_MATHERRD {ERRNO_DOMAIN;} + } + *(double *)retval = exc.retval; + break; + } + case acosdf_gt_one: + /* acosdf(x > 1) */ + { + DOMAINF; NAMEF = (char *) "acosdf"; + RETVAL_ZEROF; + ifSVID + { + NOT_MATHERRF + { + WRITEF_ACOSD; + ERRNO_DOMAIN; + } + } + else + { + NOT_MATHERRF {ERRNO_DOMAIN;} + } + *(float *)retval = excf.retval; + break; + } + case asindl_gt_one: + /* asindl(x > 1) */ + { + DOMAINL; NAMEL = (char *) "asindl"; + RETVAL_ZEROL; + ifSVID + { + NOT_MATHERRL + { + WRITEL_ASIND; + ERRNO_DOMAIN; + } + } + else + { + NOT_MATHERRL {ERRNO_DOMAIN;} + } + *(long double *)retval = excl.retval; + break; + } + case asind_gt_one: + /* asind(x > 1) */ + { + DOMAIND; NAMED = (char *) "asind"; + RETVAL_ZEROD; + ifSVID + { + NOT_MATHERRD + { + WRITED_ASIND; + ERRNO_DOMAIN; + } + } + else + { + NOT_MATHERRD {ERRNO_DOMAIN;} + } + *(double *)retval = exc.retval; + break; + } + case asindf_gt_one: + /* asindf(x > 1) */ + { + DOMAINF; NAMEF = (char *) "asindf"; + RETVAL_ZEROF; + ifSVID + { + NOT_MATHERRF + { + WRITEF_ASIND; + ERRNO_DOMAIN; + } + } + else + { + NOT_MATHERRF {ERRNO_DOMAIN;} + } + *(float *)retval = excf.retval; + break; + } + case coshl_overflow: + /* coshl overflow */ + { + OVERFLOWL; NAMEL = (char *) "coshl"; + ifSVID + { + RETVAL_HUGEL; + } + else + { + RETVAL_HUGE_VALL; + } + NOT_MATHERRL {ERRNO_RANGE;} + *(long double *)retval = excl.retval; + break; + } + case cosh_overflow: + /* cosh overflow */ + { + OVERFLOWD; NAMED = (char *) "cosh"; + ifSVID + { + RETVAL_HUGED; + } + else + { + RETVAL_HUGE_VALD; + } + NOT_MATHERRD {ERRNO_RANGE;} + *(double *)retval = exc.retval; + break; + } + case coshf_overflow: + /* coshf overflow */ + { + OVERFLOWF; NAMEF = (char *) "coshf"; + ifSVID + { + RETVAL_HUGEF; + } + else + { + RETVAL_HUGE_VALF; + } + NOT_MATHERRF {ERRNO_RANGE;} + *(float *)retval = excf.retval; + break; + } + case sinhl_overflow: + /* sinhl overflow */ + { + OVERFLOWL; NAMEL = (char *) "sinhl"; + ifSVID + { + if (INPUT_XL > ZEROL_VALUE /*0.0*/) RETVAL_HUGEL; + else RETVAL_NEG_HUGEL; + } + else + { + if (INPUT_XL > ZEROL_VALUE /*0.0*/) RETVAL_HUGE_VALL; + else RETVAL_NEG_HUGE_VALL; + } + NOT_MATHERRL {ERRNO_RANGE;} + *(long double *)retval = excl.retval; + break; + } + case sinh_overflow: + /* sinh overflow */ + { + OVERFLOWD; NAMED = (char *) "sinh"; + ifSVID + { + if (INPUT_XD > ZEROD_VALUE /*0.0*/) RETVAL_HUGED; + else RETVAL_NEG_HUGED; + } + else + { + if (INPUT_XD > ZEROD_VALUE /*0.0*/) RETVAL_HUGE_VALD; + else RETVAL_NEG_HUGE_VALD; + } + NOT_MATHERRD {ERRNO_RANGE;} + *(double *)retval = exc.retval; + break; + } + case sinhf_overflow: + /* sinhf overflow */ + { + OVERFLOWF; NAMEF = (char *) "sinhf"; + ifSVID + { + if (INPUT_XF > ZEROF_VALUE /*0.0*/) RETVAL_HUGEF; + else RETVAL_NEG_HUGEF; + } + else + { + if (INPUT_XF > ZEROF_VALUE /*0.0*/) RETVAL_HUGE_VALF; + else RETVAL_NEG_HUGE_VALF; + } + NOT_MATHERRF {ERRNO_RANGE;} + *(float *)retval = excf.retval; + break; + } + case acoshl_lt_one: + /* acoshl(x < 1) */ + { + DOMAINL; NAMEL = (char *) "acoshl"; + ifSVID + { + NOT_MATHERRL + { + WRITEL_ACOSH; + ERRNO_DOMAIN; + } + } + else + { + NOT_MATHERRL {ERRNO_DOMAIN;} + } + *(long double *)retval = excl.retval; + break; + } + case acosh_lt_one: + /* acosh(x < 1) */ + { + DOMAIND; NAMED = (char *) "acosh"; + ifSVID + { + NOT_MATHERRD + { + WRITED_ACOSH; + ERRNO_DOMAIN; + } + } + else + { + NOT_MATHERRD {ERRNO_DOMAIN;} + } + *(double *)retval = exc.retval; + break; + } + case acoshf_lt_one: + /* acoshf(x < 1) */ + { + DOMAINF; NAMEF = (char *) "acoshf"; + ifSVID + { + NOT_MATHERRF + { + WRITEF_ACOSH; + ERRNO_DOMAIN; + } + } + else + { + NOT_MATHERRF {ERRNO_DOMAIN;} + } + *(float *)retval = excf.retval; + break; + } + case atanhl_gt_one: + /* atanhl(|x| > 1) */ + { + DOMAINL; NAMEL = (char *) "atanhl"; + ifSVID + { + NOT_MATHERRL + { + WRITEL_ATANH_GT_ONE; + ERRNO_DOMAIN; + } + } + else + { + NOT_MATHERRL {ERRNO_DOMAIN;} + } + break; + } + case atanh_gt_one: + /* atanh(|x| > 1) */ + { + DOMAIND; NAMED = (char *) "atanh"; + ifSVID + { + NOT_MATHERRD + { + WRITED_ATANH_GT_ONE; + ERRNO_DOMAIN; + } + } + else + { + NOT_MATHERRD {ERRNO_DOMAIN;} + } + break; + } + case atanhf_gt_one: + /* atanhf(|x| > 1) */ + { + DOMAINF; NAMEF = (char *) "atanhf"; + ifSVID + { + NOT_MATHERRF + { + WRITEF_ATANH_GT_ONE; + ERRNO_DOMAIN; + } + } + else + { + NOT_MATHERRF {ERRNO_DOMAIN;} + } + break; + } + case atanhl_eq_one: + /* atanhl(|x| == 1) */ + { + SINGL; NAMEL = (char *) "atanhl"; + ifSVID + { + NOT_MATHERRL + { + WRITEL_ATANH_EQ_ONE; + ERRNO_DOMAIN; + } + } + else + { + NOT_MATHERRL {ERRNO_DOMAIN;} + } + break; + } + case atanh_eq_one: + /* atanh(|x| == 1) */ + { + SINGD; NAMED = (char *) "atanh"; + ifSVID + { + NOT_MATHERRD + { + WRITED_ATANH_EQ_ONE; + ERRNO_DOMAIN; + } + } + else + { + NOT_MATHERRD {ERRNO_DOMAIN;} + } + break; + } + case atanhf_eq_one: + /* atanhf(|x| == 1) */ + { + SINGF; NAMEF = (char *) "atanhf"; + ifSVID + { + NOT_MATHERRF + { + WRITEF_ATANH_EQ_ONE; + ERRNO_DOMAIN; + } + } + else + { + NOT_MATHERRF {ERRNO_DOMAIN;} + } + break; + } + case gammal_overflow: + /* gammal overflow */ + { + OVERFLOWL; NAMEL = (char *) "gammal"; + ifSVID + { + RETVAL_HUGEL; + } + else + { + RETVAL_HUGE_VALL; + } + NOT_MATHERRL {ERRNO_RANGE;} + *(long double *)retval = excl.retval; + break; + } + case gamma_overflow: + /* gamma overflow */ + { + OVERFLOWD; NAMED = (char *) "gamma"; + ifSVID + { + RETVAL_HUGED; + } + else + { + RETVAL_HUGE_VALD; + } + NOT_MATHERRD {ERRNO_RANGE;} + *(double *)retval = exc.retval; + break; + } + case gammaf_overflow: + /* gammaf overflow */ + { + OVERFLOWF; NAMEF = (char *) "gammaf"; + ifSVID + { + RETVAL_HUGEF; + } + else + { + RETVAL_HUGE_VALF; + } + NOT_MATHERRF {ERRNO_RANGE;} + *(float *)retval = excf.retval; + break; + } + case gammal_negative: + /* gammal -int or 0 */ + { + SINGL; NAMEL = (char *) "gammal"; + ifSVID + { + RETVAL_HUGEL; + NOT_MATHERRL + { + WRITEL_GAMMA_NEGATIVE; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_HUGE_VALL; + NOT_MATHERRL {ERRNO_DOMAIN;} + } + *(long double *)retval = excl.retval; + break; + } + case gamma_negative: + /* gamma -int or 0 */ + { + SINGD; NAMED = (char *) "gamma"; + ifSVID + { + RETVAL_HUGED; + NOT_MATHERRD + { + WRITED_GAMMA_NEGATIVE; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_HUGE_VALD; + NOT_MATHERRD {ERRNO_DOMAIN;} + } + *(double *)retval = exc.retval; + break; + } + case gammaf_negative: + /* gammaf -int or 0 */ + { + SINGF; NAMEF = (char *) "gammaf"; + ifSVID + { + RETVAL_HUGEF; + NOT_MATHERRF + { + WRITEF_GAMMA_NEGATIVE; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_HUGE_VALF; + NOT_MATHERRF {ERRNO_DOMAIN;} + } + *(float *)retval = excf.retval; + break; + } + case lgammal_overflow: + /* lgammal overflow */ + { + OVERFLOWL; NAMEL = (char *) "lgammal"; + ifSVID + { + RETVAL_HUGEL; + } + else + { + RETVAL_HUGE_VALL; + } + NOT_MATHERRL {ERRNO_RANGE;} + *(long double *)retval = excl.retval; + break; + } + case lgamma_overflow: + /* lgamma overflow */ + { + OVERFLOWD; NAMED = (char *) "lgamma"; + ifSVID + { + RETVAL_HUGED; + } + else + { + RETVAL_HUGE_VALD; + } + NOT_MATHERRD {ERRNO_RANGE;} + *(double *)retval = exc.retval; + break; + } + case lgammaf_overflow: + /* lgammaf overflow */ + { + OVERFLOWF; NAMEF = (char *) "lgammaf"; + ifSVID + { + RETVAL_HUGEF; + } + else + { + RETVAL_HUGE_VALF; + } + NOT_MATHERRF {ERRNO_RANGE;} + *(float *)retval = excf.retval; + break; + } + case lgammal_negative: + /* lgammal -int or 0 */ + { + SINGL; NAMEL = (char *) "lgammal"; + ifSVID + { + RETVAL_HUGEL; + NOT_MATHERRL + { + WRITEL_LGAMMA_NEGATIVE; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_HUGE_VALL; + NOT_MATHERRL {ERRNO_DOMAIN;} + } + *(long double *)retval = excl.retval; + break; + } + case lgamma_negative: + /* lgamma -int or 0 */ + { + SINGD; NAMED = (char *) "lgamma"; + ifSVID + { + RETVAL_HUGED; + NOT_MATHERRD + { + WRITED_LGAMMA_NEGATIVE; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_HUGE_VALD; + NOT_MATHERRD {ERRNO_DOMAIN;} + } + *(double *)retval = exc.retval; + break; + } + case lgammaf_negative: + /* lgammaf -int or 0 */ + { + SINGF; NAMEF = (char *) "lgammaf"; + ifSVID + { + RETVAL_HUGEF; + NOT_MATHERRF + { + WRITEF_LGAMMA_NEGATIVE; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_HUGE_VALF; + NOT_MATHERRF {ERRNO_DOMAIN;} + } + *(float *)retval = excf.retval; + break; + } + case tgammal_overflow: + /* tgammal overflow */ + { + OVERFLOWL; NAMEL = (char *) "tgammal"; + ifSVID + { + RETVAL_HUGEL; + } + else + { + RETVAL_HUGE_VALL; + } + NOT_MATHERRL {ERRNO_RANGE;} + *(long double *)retval = excl.retval; + break; + } + case tgamma_overflow: + /* tgamma overflow */ + { + OVERFLOWD; NAMED = (char *) "tgamma"; + ifSVID + { + RETVAL_HUGED; + } + else + { + RETVAL_HUGE_VALD; + } + NOT_MATHERRD {ERRNO_RANGE;} + *(double *)retval = exc.retval; + break; + } + case tgammaf_overflow: + /* tgammaf overflow */ + { + OVERFLOWF; NAMEF = (char *) "tgammaf"; + ifSVID + { + RETVAL_HUGEF; + } + else + { + RETVAL_HUGE_VALF; + } + NOT_MATHERRF {ERRNO_RANGE;} + *(float *)retval = excf.retval; + break; + } + case tgammal_negative: + /* tgammal -int or 0 */ + { + SINGL; NAMEL = (char *) "tgammal"; + ifSVID + { + NOT_MATHERRL + { + WRITEL_TGAMMA_NEGATIVE; + ERRNO_DOMAIN; + } + } + else + { + NOT_MATHERRL {ERRNO_DOMAIN;} + } + *(long double *)retval = excl.retval; + break; + } + case tgamma_negative: + /* tgamma -int or 0 */ + { + SINGD; NAMED = (char *) "tgamma"; + ifSVID + { + NOT_MATHERRD + { + WRITED_TGAMMA_NEGATIVE; + ERRNO_DOMAIN; + } + } + else + { + NOT_MATHERRD {ERRNO_DOMAIN;} + } + *(double *)retval = exc.retval; + break; + } + case tgammaf_negative: + /* tgammaf -int or 0 */ + { + SINGF; NAMEF = (char *) "tgammaf"; + ifSVID + { + NOT_MATHERRF + { + WRITEF_TGAMMA_NEGATIVE; + ERRNO_DOMAIN; + } + } + else + { + NOT_MATHERRF {ERRNO_DOMAIN;} + } + *(float *)retval = excf.retval; + break; + } + case j0l_gt_loss: + /* j0l > loss */ + { + TLOSSL; NAMEL = (char *) "j0l"; + RETVAL_ZEROL; + ifSVID + { + NOT_MATHERRL + { + WRITEL_J0_TLOSS; + ERRNO_RANGE; + } + } + else + { + NOT_MATHERRL {ERRNO_RANGE;} + } + *(long double *)retval = excl.retval; + break; + } + case j0_gt_loss: + /* j0 > loss */ + { + TLOSSD; NAMED = (char *) "j0"; + RETVAL_ZEROD; + ifSVID + { + NOT_MATHERRD + { + WRITED_J0_TLOSS; + ERRNO_RANGE; + } + } + else + { + NOT_MATHERRD {ERRNO_RANGE;} + } + *(double*)retval = exc.retval; + break; + } + case j0f_gt_loss: + /* j0f > loss */ + { + TLOSSF; NAMEF = (char *) "j0f"; + RETVAL_ZEROF; + ifSVID + { + NOT_MATHERRF + { + WRITEF_J0_TLOSS; + ERRNO_RANGE; + } + } + else + { + NOT_MATHERRF {ERRNO_RANGE;} + } + *(float*)retval = excf.retval; + break; + } + case j1l_gt_loss: + /* j1l > loss */ + { + TLOSSL; NAMEL = (char *) "j1l"; + RETVAL_ZEROL; + ifSVID + { + NOT_MATHERRL + { + WRITEL_J1_TLOSS; + ERRNO_RANGE; + } + } + else + { + NOT_MATHERRL {ERRNO_RANGE;} + } + *(long double *)retval = excl.retval; + break; + } + case j1_gt_loss: + /* j1 > loss */ + { + TLOSSD; NAMED = (char *) "j1"; + RETVAL_ZEROD; + ifSVID + { + NOT_MATHERRD + { + WRITED_J1_TLOSS; + ERRNO_RANGE; + } + } + else + { + NOT_MATHERRD {ERRNO_RANGE;} + } + *(double*)retval = exc.retval; + break; + } + case j1f_gt_loss: + /* j1f > loss */ + { + TLOSSF; NAMEF = (char *) "j1f"; + RETVAL_ZEROF; + ifSVID + { + NOT_MATHERRF + { + WRITEF_J1_TLOSS; + ERRNO_RANGE; + } + } + else + { + NOT_MATHERRF {ERRNO_RANGE;} + } + *(float*)retval = excf.retval; + break; + } + case jnl_gt_loss: + /* jnl > loss */ + { + TLOSSL; NAMEL = (char *) "jnl"; + RETVAL_ZEROL; + ifSVID + { + NOT_MATHERRL + { + WRITEL_JN_TLOSS; + ERRNO_RANGE; + } + } + else + { + NOT_MATHERRL {ERRNO_RANGE;} + } + *(long double *)retval = excl.retval; + break; + } + case jn_gt_loss: + /* jn > loss */ + { + TLOSSD; NAMED = (char *) "jn"; + RETVAL_ZEROD; + ifSVID + { + NOT_MATHERRD + { + WRITED_JN_TLOSS; + ERRNO_RANGE; + } + } + else + { + NOT_MATHERRD {ERRNO_RANGE;} + } + *(double*)retval = exc.retval; + break; + } + case jnf_gt_loss: + /* jnf > loss */ + { + TLOSSF; NAMEF = (char *) "jnf"; + RETVAL_ZEROF; + ifSVID + { + NOT_MATHERRF + { + WRITEF_JN_TLOSS; + ERRNO_RANGE; + } + } + else + { + NOT_MATHERRF {ERRNO_RANGE;} + } + *(float*)retval = excf.retval; + break; + } + case y0l_gt_loss: + /* y0l > loss */ + { + TLOSSL; NAMEL = (char *) "y0l"; + RETVAL_ZEROL; + ifSVID + { + NOT_MATHERRL + { + WRITEL_Y0_TLOSS; + ERRNO_RANGE; + } + } + else + { + NOT_MATHERRL {ERRNO_RANGE;} + } + *(long double *)retval = excl.retval; + break; + } + case y0_gt_loss: + /* y0 > loss */ + { + TLOSSD; NAMED = (char *) "y0"; + RETVAL_ZEROD; + ifSVID + { + NOT_MATHERRD + { + WRITED_Y0_TLOSS; + ERRNO_RANGE; + } + } + else + { + NOT_MATHERRD {ERRNO_RANGE;} + } + *(double*)retval = exc.retval; + break; + } + case y0f_gt_loss: + /* y0f > loss */ + { + TLOSSF; NAMEF = (char *) "y0f"; + RETVAL_ZEROF; + ifSVID + { + NOT_MATHERRF + { + WRITEF_Y0_TLOSS; + ERRNO_RANGE; + } + } + else + { + NOT_MATHERRF {ERRNO_RANGE;} + } + *(float*)retval = excf.retval; + break; + } + case y0l_zero: + /* y0l(0) */ + { + DOMAINL; NAMEL = (char *) "y0l"; + ifSVID + { + RETVAL_NEG_HUGEL; + NOT_MATHERRL + { + WRITEL_Y0_ZERO; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALL; + NOT_MATHERRL {ERRNO_DOMAIN;} + } + *(long double *)retval = excl.retval; + break; + } + case y0_zero: + /* y0(0) */ + { + DOMAIND; NAMED = (char *) "y0"; + ifSVID + { + RETVAL_NEG_HUGED; + NOT_MATHERRD + { + WRITED_Y0_ZERO; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALD; + NOT_MATHERRD {ERRNO_DOMAIN;} + } + *(double *)retval = exc.retval; + break; + } + case y0f_zero: + /* y0f(0) */ + { + DOMAINF; NAMEF = (char *) "y0f"; + ifSVID + { + RETVAL_NEG_HUGEF; + NOT_MATHERRF + { + WRITEF_Y0_ZERO; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALF; + NOT_MATHERRF {ERRNO_DOMAIN;} + } + *(float *)retval = excf.retval; + break; + } + case y1l_gt_loss: + /* y1l > loss */ + { + TLOSSL; NAMEL = (char *) "y1l"; + RETVAL_ZEROL; + ifSVID + { + NOT_MATHERRL + { + WRITEL_Y1_TLOSS; + ERRNO_RANGE; + } + } + else + { + NOT_MATHERRL {ERRNO_RANGE;} + } + *(long double *)retval = excl.retval; + break; + } + case y1_gt_loss: + /* y1 > loss */ + { + TLOSSD; NAMED = (char *) "y1"; + RETVAL_ZEROD; + ifSVID + { + NOT_MATHERRD + { + WRITED_Y1_TLOSS; + ERRNO_RANGE; + } + } + else + { + NOT_MATHERRD {ERRNO_RANGE;} + } + *(double*)retval = exc.retval; + break; + } + case y1f_gt_loss: + /* y1f > loss */ + { + TLOSSF; NAMEF = (char *) "y1f"; + RETVAL_ZEROF; + ifSVID + { + NOT_MATHERRF + { + WRITEF_Y1_TLOSS; + ERRNO_RANGE; + } + } + else + { + NOT_MATHERRF {ERRNO_RANGE;} + } + *(float*)retval = excf.retval; + break; + } + case y1l_zero: + /* y1l(0) */ + { + DOMAINL; NAMEL = (char *) "y1l"; + ifSVID + { + RETVAL_NEG_HUGEL; + NOT_MATHERRL + { + WRITEL_Y1_ZERO; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALL; + NOT_MATHERRL {ERRNO_DOMAIN;} + } + *(long double *)retval = excl.retval; + break; + } + case y1_zero: + /* y1(0) */ + { + DOMAIND; NAMED = (char *) "y1"; + ifSVID + { + RETVAL_NEG_HUGED; + NOT_MATHERRD + { + WRITED_Y1_ZERO; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALD; + NOT_MATHERRD {ERRNO_DOMAIN;} + } + *(double *)retval = exc.retval; + break; + } + case y1f_zero: + /* y1f(0) */ + { + DOMAINF; NAMEF = (char *) "y1f"; + ifSVID + { + RETVAL_NEG_HUGEF; + NOT_MATHERRF + { + WRITEF_Y1_ZERO; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALF; + NOT_MATHERRF {ERRNO_DOMAIN;} + } + *(float *)retval = excf.retval; + break; + } + case ynl_gt_loss: + /* ynl > loss */ + { + TLOSSL; NAMEL = (char *) "ynl"; + RETVAL_ZEROL; + ifSVID + { + NOT_MATHERRL + { + WRITEL_YN_TLOSS; + ERRNO_RANGE; + } + } + else + { + NOT_MATHERRL {ERRNO_RANGE;} + } + *(long double *)retval = excl.retval; + break; + } + case yn_gt_loss: + /* yn > loss */ + { + TLOSSD; NAMED = (char *) "yn"; + RETVAL_ZEROD; + ifSVID + { + NOT_MATHERRD + { + WRITED_YN_TLOSS; + ERRNO_RANGE; + } + } + else + { + NOT_MATHERRD {ERRNO_RANGE;} + } + *(double*)retval = exc.retval; + break; + } + case ynf_gt_loss: + /* ynf > loss */ + { + TLOSSF; NAMEF = (char *) "ynf"; + RETVAL_ZEROF; + ifSVID + { + NOT_MATHERRF + { + WRITEF_YN_TLOSS; + ERRNO_RANGE; + } + } + else + { + NOT_MATHERRF {ERRNO_RANGE;} + } + *(float*)retval = excf.retval; + break; + } + case ynl_zero: + /* ynl(0) */ + { + DOMAINL; NAMEL = (char *) "ynl"; + ifSVID + { + RETVAL_NEG_HUGEL; + NOT_MATHERRL + { + WRITEL_YN_ZERO; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALL; + NOT_MATHERRL {ERRNO_DOMAIN;} + } + *(long double *)retval = excl.retval; + break; + } + case yn_zero: + /* yn(0) */ + { + DOMAIND; NAMED = (char *) "yn"; + ifSVID + { + RETVAL_NEG_HUGED; + NOT_MATHERRD + { + WRITED_YN_ZERO; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALD; + NOT_MATHERRD {ERRNO_DOMAIN;} + } + *(double *)retval = exc.retval; + break; + } + case ynf_zero: + /* ynf(0) */ + { + DOMAINF; NAMEF = (char *) "ynf"; + ifSVID + { + RETVAL_NEG_HUGEF; + NOT_MATHERRF + { + WRITEF_YN_ZERO; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALF; + NOT_MATHERRF {ERRNO_DOMAIN;} + } + *(float *)retval = excf.retval; + break; + } + case y0l_negative: + /* y0l(x<0) */ + { + DOMAINL; NAMEL = (char *) "y0l"; + ifSVID + { + RETVAL_NEG_HUGEL; + NOT_MATHERRL + { + WRITEL_Y0_NEGATIVE; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALL; + NOT_MATHERRL {ERRNO_DOMAIN;} + } + *(long double *)retval = excl.retval; + break; + } + case y0_negative: + /* y0(x<0) */ + { + DOMAIND; NAMED = (char *) "y0"; + ifSVID + { + RETVAL_NEG_HUGED; + NOT_MATHERRD + { + WRITED_Y0_NEGATIVE; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALD; + NOT_MATHERRD {ERRNO_DOMAIN;} + } + *(double *)retval = exc.retval; + break; + } + case y0f_negative: + /* y0f(x<0) */ + { + DOMAINF; NAMEF = (char *) "y0f"; + ifSVID + { + RETVAL_NEG_HUGEF; + NOT_MATHERRF + { + WRITEF_Y0_NEGATIVE; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALF; + NOT_MATHERRF {ERRNO_DOMAIN;} + } + *(float *)retval = excf.retval; + break; + } + case y1l_negative: + /* y1l(x<0) */ + { + DOMAINL; NAMEL = (char *) "y1l"; + ifSVID + { + RETVAL_NEG_HUGEL; + NOT_MATHERRL + { + WRITEL_Y1_NEGATIVE; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALL; + NOT_MATHERRL {ERRNO_DOMAIN;} + } + *(long double *)retval = excl.retval; + break; + } + case y1_negative: + /* y1(x<0) */ + { + DOMAIND; NAMED = (char *) "y1"; + ifSVID + { + RETVAL_NEG_HUGED; + NOT_MATHERRD + { + WRITED_Y1_NEGATIVE; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALD; + NOT_MATHERRD {ERRNO_DOMAIN;} + } + *(double *)retval = exc.retval; + break; + } + case y1f_negative: + /* y1f(x<0) */ + { + DOMAINF; NAMEF = (char *) "y1f"; + ifSVID + { + RETVAL_NEG_HUGEF; + NOT_MATHERRF + { + WRITEF_Y1_NEGATIVE; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALF; + NOT_MATHERRF {ERRNO_DOMAIN;} + } + *(float *)retval = excf.retval; + break; + } + case ynl_negative: + /* ynl(x<0) */ + { + DOMAINL; NAMEL = (char *) "ynl"; + ifSVID + { + RETVAL_NEG_HUGEL; + NOT_MATHERRL + { + WRITEL_YN_NEGATIVE; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALL; + NOT_MATHERRL {ERRNO_DOMAIN;} + } + *(long double *)retval = excl.retval; + break; + } + case yn_negative: + /* yn(x<0) */ + { + DOMAIND; NAMED = (char *) "yn"; + ifSVID + { + RETVAL_NEG_HUGED; + NOT_MATHERRD + { + WRITED_YN_NEGATIVE; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALD; + NOT_MATHERRD {ERRNO_DOMAIN;} + } + *(double *)retval = exc.retval; + break; + } + case ynf_negative: + /* ynf(x<0) */ + { + DOMAINF; NAMEF = (char *) "ynf"; + ifSVID + { + RETVAL_NEG_HUGEF; + NOT_MATHERRF + { + WRITEF_YN_NEGATIVE; + ERRNO_DOMAIN; + } + } + else + { + RETVAL_NEG_HUGE_VALF; + NOT_MATHERRF {ERRNO_DOMAIN;} + } + *(float *)retval = excf.retval; + break; + } + case fmodl_by_zero: + /* fmodl(x,0) */ + { + DOMAINL; NAMEL = (char *) "fmodl"; + ifSVID + { + *(long double *)retval = *(long double *)arg1; + NOT_MATHERRL + { + WRITEL_FMOD; + ERRNO_DOMAIN; + } + } + else + { /* NaN already computed */ + NOT_MATHERRL {ERRNO_DOMAIN;} + } + *(long double *)retval = excl.retval; + break; + } + case fmod_by_zero: + /* fmod(x,0) */ + { + DOMAIND; NAMED = (char *) "fmod"; + ifSVID + { + *(double *)retval = *(double *)arg1; + NOT_MATHERRD + { + WRITED_FMOD; + ERRNO_DOMAIN; + } + } + else + { /* NaN already computed */ + NOT_MATHERRD {ERRNO_DOMAIN;} + } + *(double *)retval = exc.retval; + break; + } + case fmodf_by_zero: + /* fmodf(x,0) */ + { + DOMAINF; NAMEF = (char *) "fmodf"; + ifSVID + { + *(float *)retval = *(float *)arg1; + NOT_MATHERRF + { + WRITEF_FMOD; + ERRNO_DOMAIN; + } + } + else + { + NOT_MATHERRF {ERRNO_DOMAIN;} + } + *(float *)retval = excf.retval; + break; + } + case remainderl_by_zero: + /* remainderl(x,0) */ + { + DOMAINL; NAMEL = (char *) "remainderl"; + ifSVID + { + NOT_MATHERRL + { + WRITEL_REM; + ERRNO_DOMAIN; + } + } + else + { /* NaN already computed */ + NOT_MATHERRL {ERRNO_DOMAIN;} + } + *(long double *)retval = excl.retval; + break; + } + case remainder_by_zero: + /* remainder(x,0) */ + { + DOMAIND; NAMED = (char *) "remainder"; + ifSVID + { + NOT_MATHERRD + { + WRITED_REM; + ERRNO_DOMAIN; + } + } + else + { /* NaN already computed */ + NOT_MATHERRD {ERRNO_DOMAIN;} + } + *(double *)retval = exc.retval; + break; + } + case remainderf_by_zero: + /* remainderf(x,0) */ + { + DOMAINF; NAMEF = (char *) "remainderf"; + ifSVID + { + NOT_MATHERRF + { + WRITEF_REM; + ERRNO_DOMAIN; + } + } + else + { + NOT_MATHERRF {ERRNO_DOMAIN;} + } + *(float *)retval = excf.retval; + break; + } + default: + /* We don't want to abort () since SVID doesn't cover all math + library functions. */ + break; + } + return; + } +} diff --git a/sysdeps/ia64/fpu/libm_error_codes.h b/sysdeps/ia64/fpu/libm_error_codes.h new file mode 100644 index 0000000000..4f0945ea1c --- /dev/null +++ b/sysdeps/ia64/fpu/libm_error_codes.h @@ -0,0 +1,211 @@ +/* file: libm_error_codes.h */ + + +/* +// Copyright (c) 2000 - 2004, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// + +// Abstract: +// ======================================================================== +// This file contains the interface to the Intel exception dispatcher. +// +// +// History: +// ======================================================================== +// 12/15/2004 Initial version - extracted from libm_support.h +// +*/ + +#if !defined(__LIBM_ERROR_CODES_H__) +#define __LIBM_ERROR_CODES_H__ + +typedef enum +{ + logl_zero=0, logl_negative, /* 0, 1 */ + log_zero, log_negative, /* 2, 3 */ + logf_zero, logf_negative, /* 4, 5 */ + log10l_zero, log10l_negative, /* 6, 7 */ + log10_zero, log10_negative, /* 8, 9 */ + log10f_zero, log10f_negative, /* 10, 11 */ + expl_overflow, expl_underflow, /* 12, 13 */ + exp_overflow, exp_underflow, /* 14, 15 */ + expf_overflow, expf_underflow, /* 16, 17 */ + powl_overflow, powl_underflow, /* 18, 19 */ + powl_zero_to_zero, /* 20 */ + powl_zero_to_negative, /* 21 */ + powl_neg_to_non_integer, /* 22 */ + powl_nan_to_zero, /* 23 */ + pow_overflow, pow_underflow, /* 24, 25 */ + pow_zero_to_zero, /* 26 */ + pow_zero_to_negative, /* 27 */ + pow_neg_to_non_integer, /* 28 */ + pow_nan_to_zero, /* 29 */ + powf_overflow, powf_underflow, /* 30, 31 */ + powf_zero_to_zero, /* 32 */ + powf_zero_to_negative, /* 33 */ + powf_neg_to_non_integer, /* 34 */ + powf_nan_to_zero, /* 35 */ + atan2l_zero, /* 36 */ + atan2_zero, /* 37 */ + atan2f_zero, /* 38 */ + expm1l_overflow, /* 39 */ + expm1l_underflow, /* 40 */ + expm1_overflow, /* 41 */ + expm1_underflow, /* 42 */ + expm1f_overflow, /* 43 */ + expm1f_underflow, /* 44 */ + hypotl_overflow, /* 45 */ + hypot_overflow, /* 46 */ + hypotf_overflow, /* 47 */ + sqrtl_negative, /* 48 */ + sqrt_negative, /* 49 */ + sqrtf_negative, /* 50 */ + scalbl_overflow, scalbl_underflow, /* 51, 52 */ + scalb_overflow, scalb_underflow, /* 53, 54 */ + scalbf_overflow, scalbf_underflow, /* 55, 56 */ + acosl_gt_one, acos_gt_one, acosf_gt_one, /* 57, 58, 59 */ + asinl_gt_one, asin_gt_one, asinf_gt_one, /* 60, 61, 62 */ + coshl_overflow, cosh_overflow, coshf_overflow, /* 63, 64, 65 */ + y0l_zero, y0l_negative,y0l_gt_loss, /* 66, 67, 68 */ + y0_zero, y0_negative,y0_gt_loss, /* 69, 70, 71 */ + y0f_zero, y0f_negative,y0f_gt_loss, /* 72, 73, 74 */ + y1l_zero, y1l_negative,y1l_gt_loss, /* 75, 76, 77 */ + y1_zero, y1_negative,y1_gt_loss, /* 78, 79, 80 */ + y1f_zero, y1f_negative,y1f_gt_loss, /* 81, 82, 83 */ + ynl_zero, ynl_negative,ynl_gt_loss, /* 84, 85, 86 */ + yn_zero, yn_negative,yn_gt_loss, /* 87, 88, 89 */ + ynf_zero, ynf_negative,ynf_gt_loss, /* 90, 91, 92 */ + j0l_gt_loss, /* 93 */ + j0_gt_loss, /* 94 */ + j0f_gt_loss, /* 95 */ + j1l_gt_loss, /* 96 */ + j1_gt_loss, /* 97 */ + j1f_gt_loss, /* 98 */ + jnl_gt_loss, /* 99 */ + jn_gt_loss, /* 100 */ + jnf_gt_loss, /* 101 */ + lgammal_overflow, lgammal_negative,lgammal_reserve, /* 102, 103, 104 */ + lgamma_overflow, lgamma_negative,lgamma_reserve, /* 105, 106, 107 */ + lgammaf_overflow, lgammaf_negative, lgammaf_reserve,/* 108, 109, 110 */ + gammal_overflow,gammal_negative, gammal_reserve, /* 111, 112, 113 */ + gamma_overflow, gamma_negative, gamma_reserve, /* 114, 115, 116 */ + gammaf_overflow,gammaf_negative,gammaf_reserve, /* 117, 118, 119 */ + fmodl_by_zero, /* 120 */ + fmod_by_zero, /* 121 */ + fmodf_by_zero, /* 122 */ + remainderl_by_zero, /* 123 */ + remainder_by_zero, /* 124 */ + remainderf_by_zero, /* 125 */ + sinhl_overflow, sinh_overflow, sinhf_overflow, /* 126, 127, 128 */ + atanhl_gt_one, atanhl_eq_one, /* 129, 130 */ + atanh_gt_one, atanh_eq_one, /* 131, 132 */ + atanhf_gt_one, atanhf_eq_one, /* 133, 134 */ + acoshl_lt_one, /* 135 */ + acosh_lt_one, /* 136 */ + acoshf_lt_one, /* 137 */ + log1pl_zero, log1pl_negative, /* 138, 139 */ + log1p_zero, log1p_negative, /* 140, 141 */ + log1pf_zero, log1pf_negative, /* 142, 143 */ + ldexpl_overflow, ldexpl_underflow, /* 144, 145 */ + ldexp_overflow, ldexp_underflow, /* 146, 147 */ + ldexpf_overflow, ldexpf_underflow, /* 148, 149 */ + logbl_zero, logb_zero, logbf_zero, /* 150, 151, 152 */ + nextafterl_overflow, nextafter_overflow, + nextafterf_overflow, /* 153, 154, 155 */ + ilogbl_zero, ilogb_zero, ilogbf_zero, /* 156, 157, 158 */ + exp2l_overflow, exp2l_underflow, /* 159, 160 */ + exp2_overflow, exp2_underflow, /* 161, 162 */ + exp2f_overflow, exp2f_underflow, /* 163, 164 */ + exp10l_overflow, exp10_overflow, + exp10f_overflow, /* 165, 166, 167 */ + log2l_zero, log2l_negative, /* 168, 169 */ + log2_zero, log2_negative, /* 170, 171 */ + log2f_zero, log2f_negative, /* 172, 173 */ + scalbnl_overflow, scalbnl_underflow, /* 174, 175 */ + scalbn_overflow, scalbn_underflow, /* 176, 177 */ + scalbnf_overflow, scalbnf_underflow, /* 178, 179 */ + remquol_by_zero, /* 180 */ + remquo_by_zero, /* 181 */ + remquof_by_zero, /* 182 */ + lrintl_large, lrint_large, lrintf_large, /* 183, 184, 185 */ + llrintl_large, llrint_large, llrintf_large, /* 186, 187, 188 */ + lroundl_large, lround_large, lroundf_large, /* 189, 190, 191 */ + llroundl_large, llround_large, llroundf_large, /* 192, 193, 194 */ + fdiml_overflow, fdim_overflow, fdimf_overflow, /* 195, 196, 197 */ + nexttowardl_overflow, nexttoward_overflow, + nexttowardf_overflow, /* 198, 199, 200 */ + scalblnl_overflow, scalblnl_underflow, /* 201, 202 */ + scalbln_overflow, scalbln_underflow, /* 203, 204 */ + scalblnf_overflow, scalblnf_underflow, /* 205, 206 */ + erfcl_underflow, erfc_underflow, erfcf_underflow, /* 207, 208, 209 */ + acosdl_gt_one, acosd_gt_one, acosdf_gt_one, /* 210, 211, 212 */ + asindl_gt_one, asind_gt_one, asindf_gt_one, /* 213, 214, 215 */ + atan2dl_zero, atan2d_zero, atan2df_zero, /* 216, 217, 218 */ + tandl_overflow, tand_overflow, tandf_overflow, /* 219, 220, 221 */ + cotdl_overflow, cotd_overflow, cotdf_overflow, /* 222, 223, 224 */ + cotl_overflow, cot_overflow, cotf_overflow, /* 225, 226, 227 */ + sinhcoshl_overflow, sinhcosh_overflow, sinhcoshf_overflow, /* 228, 229, 230 */ + annuityl_by_zero, annuity_by_zero, annuityf_by_zero, /* 231, 232, 233 */ + annuityl_less_m1, annuity_less_m1, annuityf_less_m1, /* 234, 235, 236 */ + annuityl_overflow, annuity_overflow, annuityf_overflow, /* 237, 238, 239 */ + annuityl_underflow, annuity_underflow, annuityf_underflow, /* 240, 241, 242 */ + compoundl_by_zero, compound_by_zero, compoundf_by_zero, /* 243, 244, 245 */ + compoundl_less_m1, compound_less_m1, compoundf_less_m1, /* 246, 247, 248 */ + compoundl_overflow, compound_overflow, compoundf_overflow, /* 249, 250, 251 */ + compoundl_underflow, compound_underflow, compoundf_underflow, /* 252, 253, 254 */ + tgammal_overflow, tgammal_negative, tgammal_reserve, /* 255, 256, 257 */ + tgamma_overflow, tgamma_negative, tgamma_reserve, /* 258, 259, 260 */ + tgammaf_overflow, tgammaf_negative, tgammaf_reserve, /* 261, 262, 263 */ + exp10l_underflow, exp10_underflow, exp10f_underflow, /* 264, 265, 266 */ + nextafterl_underflow, nextafter_underflow, + nextafterf_underflow, /* 267, 268, 269 */ + nexttowardl_underflow, nexttoward_underflow, + nexttowardf_underflow /* 270, 271, 272 */ +} error_types; + +#define LIBM_ERROR __libm_error_support + +extern void LIBM_ERROR(void*,void*,void*,error_types); +#ifdef _LIBC +libc_hidden_proto(LIBM_ERROR) +#endif + +#define LIBM_ERROR1(x,r,e) LIBM_ERROR(&(x), (void *)0, &(r), e) +#define LIBM_ERROR2(x,y,r,e) LIBM_ERROR(&(x), &(y), &(r), e) + +#endif // !defined(__LIBM_ERROR_CODES_H__) diff --git a/sysdeps/ia64/fpu/libm_frexp.S b/sysdeps/ia64/fpu/libm_frexp.S new file mode 100644 index 0000000000..c6bd676a40 --- /dev/null +++ b/sysdeps/ia64/fpu/libm_frexp.S @@ -0,0 +1,209 @@ +.file "libm_frexp.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 03/20/00 Improved speed +// 06/01/00 Fixed bug when x a double-extended denormal +// 12/08/00 Corrected label on .endp +// 01/23/02 Added handling for int 32 or 64 bits +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// +// API +//============================================================== +// double __libm_frexp(double x, int* y, int int_type) +// input floating point f8, pointer to y (r33), int int_type (r34) +// output floating point f8, returns the fraction of x, 0.5 <= fraction < 1.0 +// output int* y, returns the true exponent of x +// +// int_type = 0 if int is 32 bits +// int_type = 1 if int is 64 bits +// +// int* y is returned as a 32 bit integer if int_type = 0 +// int* y is returned as a 64 bit integer if int_type = 1 +// +// Overview of operation +//============================================================== +// break a floating point x number into fraction and an exponent +// The fraction is returned as a double +// The exponent is returned as an integer pointed to by y +// This is a true (not a biased exponent) but 0fffe is subtracted +// as a bias instead of 0xffff. This is because the fraction returned +// is between 0.5 and 1.0, not the expected IEEE range. +// +// The fraction is 0.5 <= fraction < 1.0 +// +// Registers used +//============================================================== +// +// general registers: +// r14 exponent bias for x negative +// r15 exponent bias for x positive +// r16 signexp of x +// r17 exponent mask +// r18 exponent of x +// r19 exponent result +// r20 signexp of 2^64 +// r32 on input contains the 64-bit IEEE double that is in f8 +// r33 on input pointer to 32-bit or 64-bit integer for exponent +// r34 on input contains 0 if output int is 32 bits, else output int is 64 bits +// +// predicate registers: +// p6 set if x is Nan, zero, or infinity +// p7 set if x negative +// p8 set if x positive +// p9 set if x double-extended denormal +// p10 set if int_type = 0, 32-bit integer +// p11 set if int_type = 1, 64-bit integer +// +// floating-point registers: +// f8 input, output +// f9 normalized x +// f10 signexp for significand result for x positive +// f11 signexp for significand result for x negative +// f12 2^64 + +.section .text +GLOBAL_LIBM_ENTRY(__libm_frexp) + +// Set signexp for significand result for x>0 +// If x is a NaN, zero, or infinity, return it. +// Put 0 in the int pointer. +// x NAN, ZERO, INFINITY? +// Set signexp for significand result for x<0 +{ .mfi + mov r15 = 0x0fffe + fclass.m p6,p7 = f8, 0xe7 + mov r14 = 0x2fffe +} +// Form signexp of 2^64 in case x double-extended denormal +// Save the normalized value of input in f9 +// The normalization also sets fault flags and takes faults if necessary +{ .mfi + mov r20 = 0x1003f + fnorm.s0 f9 = f8 + nop.i 999 ;; +} + +// Move signexp for significand result for x>0 to FP reg +// Form 2^64 in case x double-extended denormal +{ .mmi + setf.exp f10 = r15 + setf.exp f12 = r20 + nop.i 999 ;; +} + +// Move signexp for significand result for x<0 to FP reg +// p7 if x<0, else p8 +// If x=0,nan,inf, set p10 if output int to be 32 bits, or set p11 if 64 bits +{ .mfi + setf.exp f11 = r14 +(p7) fcmp.lt.s0 p7,p8 = f8,f0 +(p6) cmp.eq.unc p10,p11 = r34, r0 ;; +} + +// If x NAN, ZERO, INFINITY, set *y=0 and exit +{ .mmb +(p10) st4 [r33] = r0 // Store *y=0 as 32-bit integer +(p11) st8 [r33] = r0 // Store *y=0 as 64-bit integer +(p6) br.ret.spnt b0 ;; +} + +// Form exponent mask +// Test for fnorm(x) denormal, means x double-extended denormal +{ .mfi + mov r17 = 0x1ffff + fclass.m p9,p0 = f9, 0x0b + nop.i 999 ;; +} + +// If x double-extended denormal add 64 to exponent bias for scaling +// If x double-extended denormal multiply x * 2^64 which is normal +// Set p10 if output int to be 32 bits, or set p11 if 64 bits +{ .mfi +(p9) add r15 = 64, r15 +(p9) fmpy.s0 f9 = f9, f12 + cmp.eq p10,p11 = r34, r0 ;; +} + +// true exponent stored to int pointer +// the bias is treated as 0xfffe instead of +// normal 0xffff because we want the significand +// to be in the range <=0.5 sig < 1.0 +// Store the value of the exponent at the pointer in r33 + +// If x>0 form significand result +{ .mfi + nop.m 999 +(p8) fmerge.se f8 = f10,f9 + nop.i 999 ;; +} + +// Get signexp of normalized x +// If x<0 form significand result +{ .mfi + getf.exp r16 = f9 +(p7) fmerge.se f8 = f11,f9 + nop.i 999 ;; +} + +// Get exp of normalized x +// Subtract off bias to get true exponent of x +{ .mmi + and r18 = r17,r16 ;; + sub r19 = r18,r15 + nop.i 999 ;; +} + +// Store int *y as a 32-bit integer +// Make the value a double +{ .mfi +(p10) st4 [r33] = r19 // Store *y as 32-bit integer + fnorm.d.s0 f8 = f8 + nop.i 999 +} +{ .mfb +(p11) st8 [r33] = r19 // Store *y as 64-bit integer + nop.f 999 + br.ret.sptk b0 ;; +} + +GLOBAL_LIBM_END(__libm_frexp) diff --git a/sysdeps/ia64/fpu/libm_frexp4.S b/sysdeps/ia64/fpu/libm_frexp4.S new file mode 100644 index 0000000000..08c2de6766 --- /dev/null +++ b/sysdeps/ia64/fpu/libm_frexp4.S @@ -0,0 +1,199 @@ +.file "libm_frexp_4.s" + +// Copyright (C) 2000, 2001, Intel Corporation +// All rights reserved. +// +// Contributed 2/2/2000 by John Harrison, Ted Kubaska, Bob Norin, Shane Story, +// and Ping Tak Peter Tang of the Computational Software Lab, Intel Corporation. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://developer.intel.com/opensource. +// +// History +//============================================================== +// 2/02/00: Initial version +// 3/20/00: Improved speed +// 6/01/00: Fixed bug when x a double-extended denormal +// 12/08/00 Corrected label on .endp +// +// API +//============================================================== +// double frexp(double x, int* y) +// double __libm_frexp_4(double x, int* y) +// where int* y is a 32-bit integer +// +// Overview of operation +//============================================================== +// break a floating point x number into fraction and an exponent +// The fraction is returned as a double +// The exponent is returned as an integer pointed to by y +// This is a true (not a biased exponent) but 0fffe is subtracted +// as a bias instead of 0xffff. This is because the fraction returned +// is between 0.5 and 1.0, not the expected IEEE range. +// +// The fraction is 0.5 <= fraction < 1.0 +// +// Registers used +//============================================================== +// +// general registers: +// r14 exponent bias for x negative +// r15 exponent bias for x positive +// r16 signexp of x +// r17 exponent mask +// r18 exponent of x +// r19 exponent result +// r20 signexp of 2^64 +// r32 on input contains the 64-bit IEEE double that is in f8 +// r33 on input pointer to 32-bit integer for exponent +// +// predicate registers: +// p6 set if x is Nan, zero, or infinity +// p7 set if x negative +// p8 set if x positive +// p9 set if x double-extended denormal +// +// floating-point registers: +// f8 input, output +// f9 normalized x +// f10 signexp for significand result for x positive +// f11 signexp for significand result for x negative +// f12 2^64 + +#include "libm_support.h" + +.align 32 +.global __libm_frexp_4# + +.section .text +.proc __libm_frexp_4# +.align 32 + +__libm_frexp_4: + +// Set signexp for significand result for x>0 +// If x is a NaN, zero, or infinity, return it. +// Put 0 in the int pointer. +// x NAN, ZERO, INFINITY? +// Set signexp for significand result for x<0 +{ .mfi +(p0) mov r15 = 0x0fffe +(p0) fclass.m.unc p6,p0 = f8, 0xe7 +(p0) mov r14 = 0x2fffe +} +// Form signexp of 2^64 in case x double-extended denormal +// Save the normalized value of input in f9 +// The normalization also sets fault flags and takes faults if necessary +{ .mfi +(p0) mov r20 = 0x1003f +(p0) fnorm f9 = f8 + nop.i 999 ;; +} + +// Move signexp for significand result for x>0 to FP reg +// Form 2^64 in case x double-extended denormal +{ .mmi +(p0) setf.exp f10 = r15 +(p0) setf.exp f12 = r20 + nop.i 999 ;; +} + +// Move signexp for significand result for x<0 to FP reg +// If x NAN, ZERO, INFINITY, set *y=0 as a 32-bit integer, and exit +{ .mmb +(p0) setf.exp f11 = r14 +(p6) st4 [r33] = r0 +(p6) br.ret.spnt b0 ;; +} + +// Form exponent mask +// p7 if x<0, else p8 +{ .mfi +(p0) mov r17 = 0x1ffff +(p0) fcmp.lt.unc p7,p8 = f8,f0 + nop.i 999 ;; +} + +// Test for fnorm(x) denormal, means x double-extended denormal +{ .mfi + nop.m 999 +(p0) fclass.m.unc p9,p0 = f9, 0x0b + nop.i 999 ;; +} + +// If x double-extended denormal add 64 to exponent bias for scaling +// If x double-extended denormal multiply x * 2^64 which is normal +{ .mfi +(p9) add r15 = 64, r15 +(p9) fmpy f9 = f9, f12 + nop.i 999 ;; +} + +// true exponent stored to int pointer +// the bias is treated as 0xfffe instead of +// normal 0xffff because we want the significand +// to be in the range <=0.5 sig < 1.0 +// Store the value of the exponent at the pointer in r33 + +// If x>0 form significand result +{ .mfi + nop.m 999 +(p8) fmerge.se f8 = f10,f9 + nop.i 999 ;; +} + +// Get signexp of normalized x +// If x<0 form significand result +{ .mfi +(p0) getf.exp r16 = f9 +(p7) fmerge.se f8 = f11,f9 + nop.i 999 ;; +} + +// Get exp of normalized x +// Subtract off bias to get true exponent of x +{ .mmi +(p0) and r18 = r17,r16 ;; +(p0) sub r19 = r18,r15 + nop.i 999 ;; +} + +// Store int y as a 32-bit integer +// Make the value a double +{ .mfb +(p0) st4 [r33] = r19 +(p0) fnorm.d f8 = f8 +(p0) br.ret.sptk b0 ;; +} + +.endp __libm_frexp_4 +ASM_SIZE_DIRECTIVE(__libm_frexp_4) +strong_alias(__libm_frexp_4, _GI___libm_frexp_4) diff --git a/sysdeps/ia64/fpu/libm_frexp4f.S b/sysdeps/ia64/fpu/libm_frexp4f.S new file mode 100644 index 0000000000..596dea6711 --- /dev/null +++ b/sysdeps/ia64/fpu/libm_frexp4f.S @@ -0,0 +1,199 @@ +.file "libm_frexp_4f.s" + +// Copyright (C) 2000, 2001, Intel Corporation +// All rights reserved. +// +// Contributed 2/2/2000 by John Harrison, Ted Kubaska, Bob Norin, Shane Story, +// and Ping Tak Peter Tang of the Computational Software Lab, Intel Corporation. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://developer.intel.com/opensource. +// +// History +//============================================================== +// 2/02/00: Initial version +// 3/20/00: Improved speed +// 6/01/00: Fixed bug when x a double-extended denormal +// 12/08/00 Corrected label on .endp +// +// API +//============================================================== +// float frexp(float x, int* y) +// float __libm_frexp_4f(float x, int* y) +// where int* y is a 32-bit integer +// +// Overview of operation +//============================================================== +// break a floating point x number into fraction and an exponent +// The fraction is returned as a float +// The exponent is returned as an integer pointed to by y +// This is a true (not a biased exponent) but 0fffe is subtracted +// as a bias instead of 0xffff. This is because the fraction returned +// is between 0.5 and 1.0, not the expected IEEE range. +// +// The fraction is 0.5 <= fraction < 1.0 +// +// Registers used +//============================================================== + +// general registers: +// r14 exponent bias for x negative +// r15 exponent bias for x positive +// r16 signexp of x +// r17 exponent mask +// r18 exponent of x +// r19 exponent result +// r20 signexp of 2^64 +// r32 on input contains the 32-bit IEEE float that is in f8 +// r33 on input pointer to 32-bit integer for exponent + +// predicate registers: +// p6 set if x is Nan, zero, or infinity +// p7 set if x negative +// p8 set if x positive +// p9 set if x double-extended denormal + +// floating-point registers: +// f8 input, output +// f9 normalized x +// f10 signexp for significand result for x positive +// f11 signexp for significand result for x negative +// f12 2^64 + +#include "libm_support.h" + +.align 32 +.global __libm_frexp_4f# + +.section .text +.proc __libm_frexp_4f# +.align 32 + +__libm_frexp_4f: + +// Set signexp for significand result for x>0 +// If x is a NaN, zero, or infinity, return it. +// Put 0 in the int pointer. +// x NAN, ZERO, INFINITY? +// Set signexp for significand result for x<0 +{ .mfi +(p0) mov r15 = 0x0fffe +(p0) fclass.m.unc p6,p0 = f8, 0xe7 +(p0) mov r14 = 0x2fffe +} +// Form signexp of 2^64 in case x double-extended denormal +// Save the normalized value of input in f9 +// The normalization also sets fault flags and takes faults if necessary +{ .mfi +(p0) mov r20 = 0x1003f +(p0) fnorm f9 = f8 + nop.i 999 ;; +} + +// Move signexp for significand result for x>0 to FP reg +// Form 2^64 in case x double-extended denormal +{ .mmi +(p0) setf.exp f10 = r15 +(p0) setf.exp f12 = r20 + nop.i 999 ;; +} + +// Move signexp for significand result for x<0 to FP reg +// If x NAN, ZERO, INFINITY, set *y=0 as a 32-bit integer, and exit +{ .mmb +(p0) setf.exp f11 = r14 +(p6) st4 [r33] = r0 +(p6) br.ret.spnt b0 ;; +} + +// Form exponent mask +// p7 if x<0, else p8 +{ .mfi +(p0) mov r17 = 0x1ffff +(p0) fcmp.lt.unc p7,p8 = f8,f0 + nop.i 999 ;; +} + +// Test for fnorm(x) denormal, means x double-extended denormal +{ .mfi + nop.m 999 +(p0) fclass.m.unc p9,p0 = f9, 0x0b + nop.i 999 ;; +} + +// If x double-extended denormal add 64 to exponent bias for scaling +// If x double-extended denormal multiply x * 2^64 which is normal +{ .mfi +(p9) add r15 = 64, r15 +(p9) fmpy f9 = f9, f12 + nop.i 999 ;; +} + +// true exponent stored to int pointer +// the bias is treated as 0xfffe instead of +// normal 0xffff because we want the significand +// to be in the range <=0.5 sig < 1.0 +// Store the value of the exponent at the pointer in r33 + +// If x>0 form significand result +{ .mfi + nop.m 999 +(p8) fmerge.se f8 = f10,f9 + nop.i 999 ;; +} + +// Get signexp of normalized x +// If x<0 form significand result +{ .mfi +(p0) getf.exp r16 = f9 +(p7) fmerge.se f8 = f11,f9 + nop.i 999 ;; +} + +// Get exp of normalized x +// Subtract off bias to get true exponent of x +{ .mmi +(p0) and r18 = r17,r16 ;; +(p0) sub r19 = r18,r15 + nop.i 999 ;; +} + +// Store int y as a 32-bit integer +// Make the value a float +{ .mfb +(p0) st4 [r33] = r19 +(p0) fnorm.s f8 = f8 +(p0) br.ret.sptk b0 ;; +} + +.endp __libm_frexp_4f +ASM_SIZE_DIRECTIVE(__libm_frexp_4f) +strong_alias(__libm_frexp_4f, _GI___libm_frexp_4f) diff --git a/sysdeps/ia64/fpu/libm_frexp4l.S b/sysdeps/ia64/fpu/libm_frexp4l.S new file mode 100644 index 0000000000..447c574bfc --- /dev/null +++ b/sysdeps/ia64/fpu/libm_frexp4l.S @@ -0,0 +1,198 @@ +.file "libm_frexp_4l.s" + +// Copyright (C) 2000, 2001, Intel Corporation +// All rights reserved. +// +// Contributed 2/2/2000 by John Harrison, Ted Kubaska, Bob Norin, Shane Story, +// and Ping Tak Peter Tang of the Computational Software Lab, Intel Corporation. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://developer.intel.com/opensource. +// +// History +//============================================================== +// 3/20/00: Initial version +// 6/01/00: Fixed bug when x a double-extended denormal +// 12/08/00 Corrected label on .endp +// +// API +//============================================================== +// long double frexpl(long double x, int* y) +// long double __libm_frexp_4l(long double x, int* y) +// where int* y is a 32-bit integer +// +// Overview of operation +//============================================================== +// break a floating point x number into fraction and an exponent +// The fraction is returned as a long double +// The exponent is returned as an integer pointed to by y +// This is a true (not a biased exponent) but 0fffe is subtracted +// as a bias instead of 0xffff. This is because the fraction returned +// is between 0.5 and 1.0, not the expected IEEE range. +// +// The fraction is 0.5 <= fraction < 1.0 +// +// Registers used +//============================================================== +// +// general registers: +// r14 exponent bias for x negative +// r15 exponent bias for x positive +// r16 signexp of x +// r17 exponent mask +// r18 exponent of x +// r19 exponent result +// r20 signexp of 2^64 +// r32-33 on input contains the 80-bit IEEE long double that is in f8 +// r34 on input pointer to 32-bit integer for exponent +// +// predicate registers: +// p6 set if x is Nan, zero, or infinity +// p7 set if x negative +// p8 set if x positive +// p9 set if x double-extended denormal +// +// floating-point registers: +// f8 input, output +// f9 normalized x +// f10 signexp for significand result for x positive +// f11 signexp for significand result for x negative +// f12 2^64 + +#include "libm_support.h" + +.align 32 +.global __libm_frexp_4l# + +.section .text +.proc __libm_frexp_4l# +.align 32 + +__libm_frexp_4l: + +// Set signexp for significand result for x>0 +// If x is a NaN, zero, or infinity, return it. +// Put 0 in the int pointer. +// x NAN, ZERO, INFINITY? +// Set signexp for significand result for x<0 +{ .mfi +(p0) mov r15 = 0x0fffe +(p0) fclass.m.unc p6,p0 = f8, 0xe7 +(p0) mov r14 = 0x2fffe +} +// Form signexp of 2^64 in case x double-extended denormal +// Save the normalized value of input in f9 +// The normalization also sets fault flags and takes faults if necessary +{ .mfi +(p0) mov r20 = 0x1003f +(p0) fnorm f9 = f8 + nop.i 999 ;; +} + +// Move signexp for significand result for x>0 to FP reg +// Form 2^64 in case x double-extended denormal +{ .mmi +(p0) setf.exp f10 = r15 +(p0) setf.exp f12 = r20 + nop.i 999 ;; +} + +// Move signexp for significand result for x<0 to FP reg +// If x NAN, ZERO, INFINITY, set *y=0 as a 32-bit integer, and exit +{ .mmb +(p0) setf.exp f11 = r14 +(p6) st4 [r34] = r0 +(p6) br.ret.spnt b0 ;; +} + +// Form exponent mask +// p7 if x<0, else p8 +{ .mfi +(p0) mov r17 = 0x1ffff +(p0) fcmp.lt.unc p7,p8 = f8,f0 + nop.i 999 ;; +} + +// Test for fnorm(x) denormal, means x double-extended denormal +{ .mfi + nop.m 999 +(p0) fclass.m.unc p9,p0 = f9, 0x0b + nop.i 999 ;; +} + +// If x double-extended denormal add 64 to exponent bias for scaling +// If x double-extended denormal multiply x * 2^64 which is normal +{ .mfi +(p9) add r15 = 64, r15 +(p9) fmpy f9 = f9, f12 + nop.i 999 ;; +} + +// true exponent stored to int pointer +// the bias is treated as 0xfffe instead of +// normal 0xffff because we want the significand +// to be in the range <=0.5 sig < 1.0 +// Store the value of the exponent at the pointer in r34 + +// If x>0 form significand result +{ .mfi + nop.m 999 +(p8) fmerge.se f8 = f10,f9 + nop.i 999 ;; +} + +// Get signexp of normalized x +// If x<0 form significand result +{ .mfi +(p0) getf.exp r16 = f9 +(p7) fmerge.se f8 = f11,f9 + nop.i 999 ;; +} + +// Get exp of normalized x +// Subtract off bias to get true exponent of x +{ .mmi +(p0) and r18 = r17,r16 ;; +(p0) sub r19 = r18,r15 + nop.i 999 ;; +} + +// Store int y as a 32-bit integer +// Make the value a long double +{ .mfb +(p0) st4 [r34] = r19 +(p0) fnorm f8 = f8 +(p0) br.ret.sptk b0 ;; +} + +.endp __libm_frexp_4l +ASM_SIZE_DIRECTIVE(__libm_frexp_4l) +strong_alias(__libm_frexp_4l, _GI___libm_frexp_4l) diff --git a/sysdeps/ia64/fpu/libm_frexpf.S b/sysdeps/ia64/fpu/libm_frexpf.S new file mode 100644 index 0000000000..dde2d09b4b --- /dev/null +++ b/sysdeps/ia64/fpu/libm_frexpf.S @@ -0,0 +1,209 @@ +.file "libm_frexpf.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 03/20/00 Improved speed +// 06/01/00 Fixed bug when x a double-extended denormal +// 12/08/00 Corrected label on .endp +// 01/23/02 Added handling for int 32 or 64 bits +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// +// API +//============================================================== +// float __libm_frexpf(float x, int* y, int int_type) +// input floating point f8, pointer to y (r33), int int_type (r34) +// output floating point f8, returns the fraction of x, 0.5 <= fraction < 1.0 +// output int* y, returns the true exponent of x +// +// int_type = 0 if int is 32 bits +// int_type = 1 if int is 64 bits +// +// int* y is returned as a 32 bit integer if int_type = 0 +// int* y is returned as a 64 bit integer if int_type = 1 +// +// Overview of operation +//============================================================== +// break a floating point x number into fraction and an exponent +// The fraction is returned as a float +// The exponent is returned as an integer pointed to by y +// This is a true (not a biased exponent) but 0fffe is subtracted +// as a bias instead of 0xffff. This is because the fraction returned +// is between 0.5 and 1.0, not the expected IEEE range. +// +// The fraction is 0.5 <= fraction < 1.0 +// +// Registers used +//============================================================== +// +// general registers: +// r14 exponent bias for x negative +// r15 exponent bias for x positive +// r16 signexp of x +// r17 exponent mask +// r18 exponent of x +// r19 exponent result +// r20 signexp of 2^64 +// r32 on input contains the 32-bit IEEE float that is in f8 +// r33 on input pointer to 32-bit or 64-bit integer for exponent +// r34 on input contains 0 if output int is 32 bits, else output int is 64 bits +// +// predicate registers: +// p6 set if x is Nan, zero, or infinity +// p7 set if x negative +// p8 set if x positive +// p9 set if x double-extended denormal +// p10 set if int_type = 0, 32-bit integer +// p11 set if int_type = 1, 64-bit integer +// +// floating-point registers: +// f8 input, output +// f9 normalized x +// f10 signexp for significand result for x positive +// f11 signexp for significand result for x negative +// f12 2^64 + +.section .text +GLOBAL_LIBM_ENTRY(__libm_frexpf) + +// Set signexp for significand result for x>0 +// If x is a NaN, zero, or infinity, return it. +// Put 0 in the int pointer. +// x NAN, ZERO, INFINITY? +// Set signexp for significand result for x<0 +{ .mfi + mov r15 = 0x0fffe + fclass.m p6,p7 = f8, 0xe7 + mov r14 = 0x2fffe +} +// Form signexp of 2^64 in case x double-extended denormal +// Save the normalized value of input in f9 +// The normalization also sets fault flags and takes faults if necessary +{ .mfi + mov r20 = 0x1003f + fnorm.s0 f9 = f8 + nop.i 999 ;; +} + +// Move signexp for significand result for x>0 to FP reg +// Form 2^64 in case x double-extended denormal +{ .mmi + setf.exp f10 = r15 + setf.exp f12 = r20 + nop.i 999 ;; +} + +// Move signexp for significand result for x<0 to FP reg +// p7 if x<0, else p8 +// If x=0,nan,inf, set p10 if output int to be 32 bits, or set p11 if 64 bits +{ .mfi + setf.exp f11 = r14 +(p7) fcmp.lt.s0 p7,p8 = f8,f0 +(p6) cmp.eq.unc p10,p11 = r34, r0 ;; +} + +// If x NAN, ZERO, INFINITY, set *y=0 and exit +{ .mmb +(p10) st4 [r33] = r0 // Store *y=0 as 32-bit integer +(p11) st8 [r33] = r0 // Store *y=0 as 64-bit integer +(p6) br.ret.spnt b0 ;; +} + +// Form exponent mask +// Test for fnorm(x) denormal, means x double-extended denormal +{ .mfi + mov r17 = 0x1ffff + fclass.m p9,p0 = f9, 0x0b + nop.i 999 ;; +} + +// If x double-extended denormal add 64 to exponent bias for scaling +// If x double-extended denormal multiply x * 2^64 which is normal +// Set p10 if output int to be 32 bits, or set p11 if 64 bits +{ .mfi +(p9) add r15 = 64, r15 +(p9) fmpy.s0 f9 = f9, f12 + cmp.eq p10,p11 = r34, r0 ;; +} + +// true exponent stored to int pointer +// the bias is treated as 0xfffe instead of +// normal 0xffff because we want the significand +// to be in the range <=0.5 sig < 1.0 +// Store the value of the exponent at the pointer in r33 + +// If x>0 form significand result +{ .mfi + nop.m 999 +(p8) fmerge.se f8 = f10,f9 + nop.i 999 ;; +} + +// Get signexp of normalized x +// If x<0 form significand result +{ .mfi + getf.exp r16 = f9 +(p7) fmerge.se f8 = f11,f9 + nop.i 999 ;; +} + +// Get exp of normalized x +// Subtract off bias to get true exponent of x +{ .mmi + and r18 = r17,r16 ;; + sub r19 = r18,r15 + nop.i 999 ;; +} + +// Store int *y as a 32-bit integer +// Make the value a float +{ .mfi +(p10) st4 [r33] = r19 // Store *y as 32-bit integer + fnorm.s.s0 f8 = f8 + nop.i 999 +} +{ .mfb +(p11) st8 [r33] = r19 // Store *y as 64-bit integer + nop.f 999 + br.ret.sptk b0 ;; +} + +GLOBAL_LIBM_END(__libm_frexpf) diff --git a/sysdeps/ia64/fpu/libm_frexpl.S b/sysdeps/ia64/fpu/libm_frexpl.S new file mode 100644 index 0000000000..64f30b6364 --- /dev/null +++ b/sysdeps/ia64/fpu/libm_frexpl.S @@ -0,0 +1,209 @@ +.file "libm_frexpl.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 03/20/00 Improved speed +// 06/01/00 Fixed bug when x a double-extended denormal +// 12/08/00 Corrected label on .endp +// 01/23/02 Added handling for int 32 or 64 bits +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// +// API +//============================================================== +// long double __libm_frexpl(long double x, int* y, int int_type) +// input floating point f8, pointer to y (r34), int int_type (r35) +// output floating point f8, returns the fraction of x, 0.5 <= fraction < 1.0 +// output int* y, returns the true exponent of x +// +// int_type = 0 if int is 32 bits +// int_type = 1 if int is 64 bits +// +// int* y is returned as a 32 bit integer if int_type = 0 +// int* y is returned as a 64 bit integer if int_type = 1 +// +// Overview of operation +//============================================================== +// break a floating point x number into fraction and an exponent +// The fraction is returned as a long double +// The exponent is returned as an integer pointed to by y +// This is a true (not a biased exponent) but 0fffe is subtracted +// as a bias instead of 0xffff. This is because the fraction returned +// is between 0.5 and 1.0, not the expected IEEE range. +// +// The fraction is 0.5 <= fraction < 1.0 +// +// Registers used +//============================================================== +// +// general registers: +// r14 exponent bias for x negative +// r15 exponent bias for x positive +// r16 signexp of x +// r17 exponent mask +// r18 exponent of x +// r19 exponent result +// r20 signexp of 2^64 +// r32-33 on input contains the 80-bit IEEE long double that is in f8 +// r34 on input pointer to 32-bit or 64-bit integer for exponent +// r35 on input contains 0 if output int is 32 bits, else output int is 64 bits +// +// predicate registers: +// p6 set if x is Nan, zero, or infinity +// p7 set if x negative +// p8 set if x positive +// p9 set if x double-extended denormal +// p10 set if int_type = 0, 32-bit integer +// p11 set if int_type = 1, 64-bit integer +// +// floating-point registers: +// f8 input, output +// f9 normalized x +// f10 signexp for significand result for x positive +// f11 signexp for significand result for x negative +// f12 2^64 + +.section .text +GLOBAL_LIBM_ENTRY(__libm_frexpl) + +// Set signexp for significand result for x>0 +// If x is a NaN, zero, or infinity, return it. +// Put 0 in the int pointer. +// x NAN, ZERO, INFINITY? +// Set signexp for significand result for x<0 +{ .mfi + mov r15 = 0x0fffe + fclass.m p6,p7 = f8, 0xe7 + mov r14 = 0x2fffe +} +// Form signexp of 2^64 in case x double-extended denormal +// Save the normalized value of input in f9 +// The normalization also sets fault flags and takes faults if necessary +{ .mfi + mov r20 = 0x1003f + fnorm.s0 f9 = f8 + nop.i 999 ;; +} + +// Move signexp for significand result for x>0 to FP reg +// Form 2^64 in case x double-extended denormal +{ .mmi + setf.exp f10 = r15 + setf.exp f12 = r20 + nop.i 999 ;; +} + +// Move signexp for significand result for x<0 to FP reg +// p7 if x<0, else p8 +// If x=0,nan,inf, set p10 if output int to be 32 bits, or set p11 if 64 bits +{ .mfi + setf.exp f11 = r14 +(p7) fcmp.lt.s0 p7,p8 = f8,f0 +(p6) cmp.eq.unc p10,p11 = r35, r0 ;; +} + +// If x NAN, ZERO, INFINITY, set *y=0 and exit +{ .mmb +(p10) st4 [r34] = r0 // Store *y=0 as 32-bit integer +(p11) st8 [r34] = r0 // Store *y=0 as 64-bit integer +(p6) br.ret.spnt b0 ;; +} + +// Form exponent mask +// Test for fnorm(x) denormal, means x double-extended denormal +{ .mfi + mov r17 = 0x1ffff + fclass.m p9,p0 = f9, 0x0b + nop.i 999 ;; +} + +// If x double-extended denormal add 64 to exponent bias for scaling +// If x double-extended denormal multiply x * 2^64 which is normal +// Set p10 if output int to be 32 bits, or set p11 if 64 bits +{ .mfi +(p9) add r15 = 64, r15 +(p9) fmpy.s0 f9 = f9, f12 + cmp.eq p10,p11 = r35, r0 ;; +} + +// true exponent stored to int pointer +// the bias is treated as 0xfffe instead of +// normal 0xffff because we want the significand +// to be in the range <=0.5 sig < 1.0 +// Store the value of the exponent at the pointer in r34 + +// If x>0 form significand result +{ .mfi + nop.m 999 +(p8) fmerge.se f8 = f10,f9 + nop.i 999 ;; +} + +// Get signexp of normalized x +// If x<0 form significand result +{ .mfi + getf.exp r16 = f9 +(p7) fmerge.se f8 = f11,f9 + nop.i 999 ;; +} + +// Get exp of normalized x +// Subtract off bias to get true exponent of x +{ .mmi + and r18 = r17,r16 ;; + sub r19 = r18,r15 + nop.i 999 ;; +} + +// Store int *y as a 32-bit integer +// Make the value a long double +{ .mfi +(p10) st4 [r34] = r19 // Store *y as 32-bit integer + fnorm.s0 f8 = f8 + nop.i 999 +} +{ .mfb +(p11) st8 [r34] = r19 // Store *y as 64-bit integer + nop.f 999 + br.ret.sptk b0 ;; +} + +GLOBAL_LIBM_END(__libm_frexpl) diff --git a/sysdeps/ia64/fpu/libm_lgamma.S b/sysdeps/ia64/fpu/libm_lgamma.S new file mode 100644 index 0000000000..6096319ba5 --- /dev/null +++ b/sysdeps/ia64/fpu/libm_lgamma.S @@ -0,0 +1,3623 @@ +.file "libm_lgamma.s" + + +// Copyright (c) 2002 - 2005, Intel Corporation +// All rights reserved. +// +// Contributed 2002 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,INCLUDING,BUT NOT +// LIMITED TO,THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT,INDIRECT,INCIDENTAL,SPECIAL, +// EXEMPLARY,OR CONSEQUENTIAL DAMAGES (INCLUDING,BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,DATA,OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY,WHETHER IN CONTRACT,STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE,EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code,and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +//********************************************************************* +// +// History: +// 01/10/02 Initial version +// 01/25/02 Corrected error tag numbers +// 02/04/02 Added support of SIGN(GAMMA(x)) calculation +// 05/20/02 Cleaned up namespace and sf0 syntax +// 09/15/02 Fixed bug on the branch lgamma_negrecursion +// 10/21/02 Now it returns SIGN(GAMMA(x))=-1 for negative zero +// 02/10/03 Reordered header: .section, .global, .proc, .align +// 07/22/03 Reformatted some data tables +// 03/31/05 Reformatted delimiters between data tables +// +//********************************************************************* +// +//********************************************************************* +// +// Function: __libm_lgamma(double x, int* signgam, int szsigngam) +// computes the principle value of the logarithm of the GAMMA function +// of x. Signum of GAMMA(x) is stored to memory starting at the address +// specified by the signgam. +// +//********************************************************************* +// +// Resources Used: +// +// Floating-Point Registers: f6-f15 +// f32-f122 +// +// General Purpose Registers: +// r8-r11 +// r14-r31 +// r32-r36 +// r37-r40 (Used to pass arguments to error handling routine) +// +// Predicate Registers: p6-p15 +// +//********************************************************************* +// +// IEEE Special Conditions: +// +// __libm_lgamma(+inf) = +inf +// __libm_lgamma(-inf) = QNaN +// __libm_lgamma(+/-0) = +inf +// __libm_lgamma(x<0, x - integer) = +inf +// __libm_lgamma(SNaN) = QNaN +// __libm_lgamma(QNaN) = QNaN +// +//********************************************************************* +// +// Overview +// +// The method consists of three cases. +// +// If 512 <= x < OVERFLOW_BOUNDARY use case lgamma_pstirling; +// else if 1 < x < 512 use case lgamma_regular; +// else if -17 < x < 1 use case lgamma_negrecursion; +// else if -512 < x < -17 use case lgamma_negpoly; +// else if x < -512 use case lgamma_negstirling; +// else if x is close to negative +// roots of ln(GAMMA(x)) use case lgamma_negroots; +// +// +// Case 512 <= x < OVERFLOW_BOUNDARY +// --------------------------------- +// Here we use algorithm based on the Stirling formula: +// ln(GAMMA(x)) = ln(sqrt(2*Pi)) + (x-0.5)ln(x) - x + (W2 + W4/x^2)/x +// +// Case 1 < x < 512 +// ---------------- +// To calculate GAMMA(x) on this interval we use polynomial approximation +// on following intervals [0.875; 1.25), [1.25; 1.75), [1.75, 2.25), +// [2.25; 4), [2^i; 2^(i+1)), i=2..8 +// +// Following variants of approximation and argument reduction are used: +// 1. [0.875; 1.25) +// ln(GAMMA(x)) ~ (x-1.0)*P17(x-1.0) +// +// 2. [1.25; 1.75) +// ln(GAMMA(x)) ~ (x-LocalMinimun)*P17(x-LocalMinimun) +// +// 3. [1.75, 2.25) +// ln(GAMMA(x)) ~ (x-2.0)*P17(x-2.0) +// +// 4. [2.25; 4) +// ln(GAMMA(x)) ~ P22(x) +// +// 5. [2^i; 2^(i+1)), i=2..8 +// ln(GAMMA(x)) ~ P22((x-2^i)/2^i) +// +// Case -17 < x < 1 +// ---------------- +// Here we use the recursive formula: +// ln(GAMMA(x)) = ln(GAMMA(x+1)) - ln(x) +// +// Using this formula we reduce argument to base interval [1.0; 2.0] +// +// Case -512 < x < -17 +// -------------------- +// Here we use the formula: +// ln(GAMMA(-x)) = ln(Pi/(x*GAMMA(x)*sin(Pi*x))) = +// = -ln(x) - ln((GAMMA(x)) - ln(sin(Pi*r)/(Pi*r)) - ln(|r|) +// where r = x - rounded_to_nearest(x), i.e |r| <= 0.5 and +// ln(sin(Pi*r)/(Pi*r)) is approximated by 14-degree polynomial of r^2 +// +// +// Case x < -512 +// ------------- +// Here we use algorithm based on the Stirling formula: +// ln(GAMMA(-x)) = -ln(sqrt(2*Pi)) + (-x-0.5)ln(x) + x - (W2 + W4/x^2)/x - +// - ln(sin(Pi*r)/(Pi*r)) - ln(|r|) +// where r = x - rounded_to_nearest(x). +// +// Neighbourhoods of negative roots +// -------------------------------- +// Here we use polynomial approximation +// ln(GAMMA(x-x0)) = ln(GAMMA(x0)) + (x-x0)*P14(x-x0), +// where x0 is a root of ln(GAMMA(x)) rounded to nearest double +// precision number. +// + +//********************************************************************* + +FR_X = f10 +FR_Y = f1 // __libm_lgamma is single argument function +FR_RESULT = f8 + +FR_B11 = f6 +FR_B10 = f7 + +FR_int_N = f9 +FR_N = f10 +FR_P5 = f11 +FR_P4 = f12 +FR_P3 = f13 +FR_P2 = f14 +FR_NormX = f15 + +FR_Ln2 = f32 +FR_C01 = f33 +FR_A17 = f33 +FR_C00 = f34 +FR_Xp2 = f34 +FR_A00 = f34 +FR_A16 = f34 +FR_C11 = f35 +FR_A15 = f35 +FR_C10 = f36 +FR_Xp3 = f36 +FR_A14 = f36 +FR_B1 = f36 +FR_C21 = f37 +FR_A13 = f37 +FR_PR01 = f37 +FR_C20 = f38 +FR_Xp6 = f38 +FR_A12 = f38 +FR_C31 = f39 +FR_Xp7 = f39 +FR_B0 = f39 +FR_A11 = f39 +FR_C30 = f40 +FR_Xp8 = f40 +FR_A10 = f40 +FR_PR00 = f40 +FR_C41 = f41 +FR_Xp9 = f41 +FR_A9 = f41 +FR_PR11 = f41 +FR_C40 = f42 +FR_A8 = f42 +FR_C51 = f43 +FR_Xp11 = f43 +FR_A7 = f43 +FR_C50 = f44 +FR_C = f44 +FR_Xp12 = f44 +FR_A6 = f44 +FR_Xm2 = f45 +FR_Xp13 = f45 +FR_A5 = f45 +FR_PR10 = f45 +FR_C61 = f46 +FR_Xp14 = f46 +FR_A4 = f46 +FR_PR21 = f46 +FR_C60 = f47 +FR_Xp15 = f47 +FR_A3 = f47 +FR_PR20 = f47 +FR_C71 = f48 +FR_Xp16 = f48 +FR_A2 = f48 +FR_PR31 = f48 +FR_C70 = f49 +FR_Xp17 = f49 +FR_A1 = f49 +FR_PR30 = f49 +FR_C81 = f50 +FR_B17 = f50 +FR_A0 = f50 +FR_C80 = f51 +FR_B16 = f51 +FR_C91 = f52 +FR_B15 = f52 +FR_C90 = f53 +FR_B14 = f53 +FR_CA1 = f54 +FR_B13 = f54 +FR_CA0 = f55 +FR_B12 = f55 +FR_CN = f56 +FR_Qlo = f56 +FR_PRN = f56 +FR_B7 = f57 +FR_B6 = f58 +FR_Qhi = f59 +FR_x = f60 +FR_x2 = f61 +FR_TpNxLn2 = f62 +FR_W2 = f63 +FR_x4 = f64 +FR_r4 = f64 +FR_x8 = f65 +FR_r8 = f65 +FR_r05 = f66 +FR_Xm05 = f66 +FR_B5 = f66 +FR_LnSqrt2Pi = f67 +FR_B4 = f67 +FR_InvX = f68 +FR_B3 = f68 +FR_InvX2 = f69 +FR_B2 = f69 +FR_W4 = f70 +FR_OvfBound = f71 +FR_05 = f72 +FR_LocalMin = f73 +FR_tmp = f73 +FR_LnX = f74 +FR_Xf = f75 +FR_InvXf = f76 +FR_rf = f77 +FR_rf2 = f78 +FR_P54f = f79 +FR_P32f = f80 +FR_rf3 = f81 +FR_P10f = f82 +FR_TpNxLn2f = f83 +FR_Nf = f84 +FR_LnXf = f85 +FR_int_Nf = f86 +FR_Tf = f87 +FR_Xf2 = f88 +FR_Xp10 = f89 +FR_w3 = f90 +FR_S28 = f90 +FR_w2 = f91 +FR_S26 = f91 +FR_w6 = f92 +FR_S24 = f92 +FR_w4 = f93 +FR_S22 = f93 +FR_w = f94 +FR_S20 = f94 +FR_Q8 = f95 +FR_S18 = f95 +FR_Q7 = f96 +FR_S16 = f96 +FR_Q4 = f97 +FR_S14 = f97 +FR_Q3 = f98 +FR_S12 = f98 +FR_Q6 = f99 +FR_S10 = f99 +FR_Q5 = f100 +FR_S8 = f100 +FR_Q2 = f101 +FR_S6 = f101 +FR_Root = f101 +FR_S4 = f102 +FR_Q1 = f102 +FR_S2 = f103 +FR_Xp1 = f104 +FR_Xf4 = f105 +FR_Xf8 = f106 +FR_Xfr = f107 +FR_Xf6 = f108 +FR_Ntrunc = f109 +FR_B9 = f110 +FR_2 = f110 +FR_B8 = f111 +FR_3 = f111 +FR_5 = f112 +FR_Xp4 = f113 +FR_Xp5 = f114 +FR_P54 = f115 +FR_P32 = f116 +FR_P10 = f117 +FR_r = f118 +FR_r2 = f119 +FR_r3 = f120 +FR_T = f121 +FR_int_Ntrunc = f122 + +//=================================== + +GR_TAG = r8 +GR_ExpMask = r8 +GR_ExpBias = r9 +GR_ad_Roots = r9 +GR_Expf = r10 +GR_Arg = r10 +GR_SignExp = r11 +GR_ArgXfr = r11 + +GR_Exp = r14 +GR_Arg125 = r14 +GR_RootInd = r14 +GR_ArgAsIs = r15 +GR_Arg175 = r15 +GR_Sig = r16 +GR_Ind = r17 +GR_ad_Dx = r17 +GR_ad_1 = r18 +GR_SignExp_w = r19 +GR_2_25 = r19 +GR_Arg025 = r19 +GR_Arg15 = r19 +GR_Arg17 = r19 +GR_Exp_w = r19//21 +GR_ad_2 = r20 +GR_2xDx = r21 +GR_SignOfGamma = r21 +GR_fff9 = r22 +GR_Offs = r22 +GR_ad_Co7 = r23 +GR_Arg075 = r23 +GR_Arg0875 = r23 +GR_ad_T = r24 +GR_ad_Root = r24 +GR_Ind = r24 +GR_ad_Co = r25 +GR_ad_Ce = r26 +GR_ad_Ce7 = r27 +GR_Arg05 = r27 +GR_Offs7 = r28 +GR_ArgXfrAsIs = r28 +GR_ExpOf2 = r29 +GR_ad_LnT = r29 +GR_Dx = r29 +GR_ExpOf256 = r30 +GR_0x30033 = r30 +GR_Root = r30 +GR_PseudoRoot = r30 +GR_ad_Data = r31 +GR_ad_SignGam = r31 + + +GR_SAVE_B0 = r33 +GR_SAVE_PFS = r34 +GR_SAVE_GP = r35 +GR_SAVE_SP = r36 + +GR_Parameter_X = r37 +GR_Parameter_Y = r38 +GR_Parameter_RESULT = r39 +GR_Parameter_TAG = r40 + + + +// Data tables +//============================================================== + +RODATA +.align 16 +LOCAL_OBJECT_START(lgamma_data) +// polynomial approximation of ln(GAMMA(x)), 2.25 <= x < 512 +// [2.25; 4) +data8 0xF888E8D7892718A2,0xC001 // C01 +data8 0xF62F273BA12A4639,0x3FFD // C11 +data8 0xA93AC50A37EC8D38,0xBFFC // C21 +data8 0xB4CC43D2C161E057,0xBFFF // C31 +data8 0xC6AC672F0C1392C7,0xC000 // C41 +data8 0xA292B9AE3276942E,0xC001 // C51 +data8 0xE554E4CCCA6C7B7B,0xC001 // C61 +data8 0x92F0F55FBC87F860,0xC002 // C71 +data8 0xAF60D0112843F6C1,0xC002 // C81 +data8 0xC5956500FA3D92E7,0xC002 // C91 +data8 0xD3B22CCBD8587750,0xC002 // CA1 +data8 0xD888B6CF34159B54,0x4001 // C00 +data8 0xBCB79C8329FD9F44,0x3FFE // C10 +data8 0xCB8896FAD69C455D,0x4000 // C20 +data8 0xE510A424639EBF5E,0x4001 // C30 +data8 0xC65ED41B097486B3,0x4002 // C40 +// [4; 8) +data8 0x9F1F3C822D03080E,0xC001 // C01 +data8 0x941CACFA9C0FA8A6,0xC001 // C11 +data8 0xFE34336391D99CB7,0xC000 // C21 +data8 0xC40BAEAA165F81A1,0xC000 // C31 +data8 0xFE3AE166E9B4DE8F,0xBFFF // C41 +data8 0xD744F91AF7DAF873,0xBFFE // C51 +data8 0x87871851E9C32D02,0x3FFD // C61 +data8 0x9C93C03C502E808F,0x3FFF // C71 +data8 0xF78BED07501D6A8E,0x3FFF // C81 +data8 0x92FE41BA8BEADF70,0x4000 // C91 +data8 0xA021878E1903A2C6,0x3FFF // CA1 +data8 0xC85EFAC379FAFEE2,0x4001 // C00 +data8 0xC10D7AAB7CEC7FF2,0x4001 // C10 +data8 0xB3537BDF603E454C,0x4001 // C20 +data8 0xA0D44E3D5BBE44C4,0x4001 // C30 +data8 0x8B9C229B6241E7B3,0x4001 // C40 +// [8; 16) +data8 0xD16AB33AEC220DF6,0x3FFF // C01 +data8 0x987483646E150BCD,0x4000 // C11 +data8 0x80C10A24C863999B,0x4000 // C21 +data8 0xA39A8EB6F8AACE75,0x3FFF // C31 +data8 0x93E04A1379BEC764,0x3FFD // C41 +data8 0xD9F59C4BD3A69BD1,0xBFFE // C51 +data8 0x82094EC891179B1A,0xC000 // C61 +data8 0xC90CFE3A24F70659,0xC000 // C71 +data8 0x827984EA7C155184,0xC001 // C81 +data8 0x981BFDF79D1E0D80,0xC001 // C91 +data8 0xA37209A8B97D230D,0xC001 // CA1 +data8 0xAA1989737D6BA66D,0x3FFE // C00 +data8 0xDBC013A351630AF8,0x3FFF // C10 +data8 0x8B8D47698299389D,0x4000 // C20 +data8 0xACCDD1315DE06EB0,0x4000 // C30 +data8 0xD3414A5AC81BBB2D,0x4000 // C40 +// [16; 32) +data8 0xECB2B0BE75C5F995,0x3FFF // C01 +data8 0x9DD28BD6DBC96500,0x4000 // C11 +data8 0x8521431B99C6244F,0x4000 // C21 +data8 0xA95F92612B8413C3,0x3FFF // C31 +data8 0x9C76E643B22D9544,0x3FFD // C41 +data8 0xDD90EA99417C8038,0xBFFE // C51 +data8 0x84EA6B6D32E5F906,0xC000 // C61 +data8 0xCDBFE499E05AA622,0xC000 // C71 +data8 0x8594A7DE35427100,0xC001 // C81 +data8 0x9BC1CB2C10DC702F,0xC001 // C91 +data8 0xA7602268762666B0,0xC001 // CA1 +data8 0xDA082BCC6BDB8F7B,0x3FFE // C00 +data8 0xEEBFE1C99322B85E,0x3FFF // C10 +data8 0x96FED4C785361946,0x4000 // C20 +data8 0xB9E3A7207C16B2FE,0x4000 // C30 +data8 0xE1E8170CED48E2C7,0x4000 // C40 +// [32; 64) +data8 0xFD481EB9AEDD53E7,0x3FFF // C01 +data8 0xA216FB66AC8C53E1,0x4000 // C11 +data8 0x885FF935787553BA,0x4000 // C21 +data8 0xAD471CD89A313327,0x3FFF // C31 +data8 0x9FF13FBA139D21E0,0x3FFD // C41 +data8 0xE25E1663A6EE0266,0xBFFE // C51 +data8 0x87BE51DD5D262FA2,0xC000 // C61 +data8 0xD211A9D4CCE55696,0xC000 // C71 +data8 0x885BEFC29FDED3C9,0xC001 // C81 +data8 0x9EFA48E6367A67F6,0xC001 // C91 +data8 0xAAD3978FC0791297,0xC001 // CA1 +data8 0xF96D210DF37A0AEA,0x3FFE // C00 +data8 0xFE11DC6783917C82,0x3FFF // C10 +data8 0x9FFCD928291B7DDE,0x4000 // C20 +data8 0xC4518F4A80E09AE1,0x4000 // C30 +data8 0xEDDFE9E0FD297C63,0x4000 // C40 +// [64; 128) +data8 0x840E2E62609B0AD3,0x4000 // C01 +data8 0xA5275A0DD0D3DDF8,0x4000 // C11 +data8 0x8AADC6ABFC441731,0x4000 // C21 +data8 0xB041C6696BE90E50,0x3FFF // C31 +data8 0xA4A8C9153F4B037E,0x3FFD // C41 +data8 0xE3C6A461A7B86736,0xBFFE // C51 +data8 0x89047681C6DE7673,0xC000 // C61 +data8 0xD42DF77A480092DF,0xC000 // C71 +data8 0x89C25D17F086FB20,0xC001 // C81 +data8 0xA09F907D02E34EC7,0xC001 // C91 +data8 0xAC998A9CB79805B7,0xC001 // CA1 +data8 0x875CC9B69AE964CC,0x3FFF // C00 +data8 0x847836BA85DD4C12,0x4000 // C10 +data8 0xA5F3CB2B32E74936,0x4000 // C20 +data8 0xCAE2197C96CB5A0F,0x4000 // C30 +data8 0xF50F7EB60DE5CD09,0x4000 // C40 +// [128; 256) +data8 0x87D9065DD1876926,0x4000 // C01 +data8 0xA781C28FDAD7CC25,0x4000 // C11 +data8 0x8C6A4FCE35A7EC8D,0x4000 // C21 +data8 0xB27BA081728354F9,0x3FFF // C31 +data8 0xA82FEA7124B0EB2B,0x3FFD // C41 +data8 0xE4C996E42ECBF77A,0xBFFE // C51 +data8 0x89F1A92C84FA538F,0xC000 // C61 +data8 0xD5B6CFF7DB7F6070,0xC000 // C71 +data8 0x8AC6B561FAE38B66,0xC001 // C81 +data8 0xA1D1505C438D8F46,0xC001 // C91 +data8 0xADE2DC1C924FEC81,0xC001 // CA1 +data8 0x8EF6CC62A7E0EB5A,0x3FFF // C00 +data8 0x88A2FFC0ABCB00C0,0x4000 // C10 +data8 0xAA6EA8FCB75B065B,0x4000 // C20 +data8 0xCFC4B82B3D5C9363,0x4000 // C30 +data8 0xFA60FD85DE861771,0x4000 // C40 +// [256; 512) +data8 0x8AAA7CE4ED5C1EFD,0x4000 // C01 +data8 0xA9679234FB56F1E1,0x4000 // C11 +data8 0x8DCE02287789D841,0x4000 // C21 +data8 0xB44328EF30A8DE7E,0x3FFF // C31 +data8 0xAB0DC564BFA1AB12,0x3FFD // C41 +data8 0xE5882B16FCF2D3CB,0xBFFE // C51 +data8 0x8AA7F48993006A86,0xC000 // C61 +data8 0xD6E63752D192750D,0xC000 // C71 +data8 0x8B90080B17853295,0xC001 // C81 +data8 0xA2BDD4253128D1AB,0xC001 // C91 +data8 0xAEE1A042F96B8121,0xC001 // CA1 +data8 0x94A9C37A42E43BA7,0x3FFF // C00 +data8 0x8BFA54E703878F5A,0x4000 // C10 +data8 0xADFA426DDF14647B,0x4000 // C20 +data8 0xD39C7F7B3958EAF0,0x4000 // C30 +data8 0xFE8C3987853C01E3,0x4000 // C40 +// +// [2.25; 4) +data8 0x943AF77763601441,0x4003 // C50 +data8 0xC8A93F9ECB06E891,0x4003 // C60 +data8 0xFC2E5A4AD33DE19D,0x4003 // C70 +data8 0x9526B75B38670119,0x4004 // C80 +data8 0xA7675879D68B587E,0x4004 // C90 +data8 0xB31DFA672D7FB8C0,0x4004 // CA0 +data8 0x83A27775D86F9A81,0xBFD7 // CN +// [4; 8) +data8 0xEB8049BA5E79ADA3,0x4000 // C50 +data8 0xC20C95EA99037228,0x4000 // C60 +data8 0x9D4A8C864053CEB8,0x4000 // C70 +data8 0xFC7716544AB0C5C9,0x3FFF // C80 +data8 0xC7EB985259EABA5F,0x3FFF // C90 +data8 0xC042FB3B4C95096D,0x3FFD // CA0 +data8 0xCC2A7F930856177B,0x3FEE // CN +// [8; 16) +data8 0xFE1903679D078C7A,0x4000 // C50 +data8 0x957C221AB90171F1,0x4001 // C60 +data8 0xAB2C53B2A78F4031,0x4001 // C70 +data8 0xBE080AE6063AE387,0x4001 // C80 +data8 0xCC019A0311605CB9,0x4001 // C90 +data8 0xD3739D85A12C8ADF,0x4001 // CA0 +data8 0x81FA4D2B7BD7A82D,0x3FEF // CN +// [16; 32) +data8 0x871F69E2DD221F02,0x4001 // C50 +data8 0x9E3EF2D477442A9C,0x4001 // C60 +data8 0xB48733582B3C82C5,0x4001 // C70 +data8 0xC7DB9B3C25854A2A,0x4001 // C80 +data8 0xD628B87975BE898F,0x4001 // C90 +data8 0xDDC569C321FF119C,0x4001 // CA0 +data8 0xB27B65560DF7ADA7,0x3FEF // CN +// [32; 64) +data8 0x8DE4127349719B22,0x4001 // C50 +data8 0xA5C30A7760F5FBB2,0x4001 // C60 +data8 0xBCB4096055AA2A4E,0x4001 // C70 +data8 0xD08F5F2FB4E7B899,0x4001 // C80 +data8 0xDF39ED39DC91F9CF,0x4001 // C90 +data8 0xE7063E45322F072E,0x4001 // CA0 +data8 0x85A9E11DDDDE67C8,0x3FF0 // CN +// [64; 128) +data8 0x91CA191EB80E8893,0x4001 // C50 +data8 0xA9F1D5A55397334A,0x4001 // C60 +data8 0xC1222710295094E3,0x4001 // C70 +data8 0xD52FFABBA6CBE5C6,0x4001 // C80 +data8 0xE3FD9D5282052E1D,0x4001 // C90 +data8 0xEBDBE47BB662F3EF,0x4001 // CA0 +data8 0xEF889F489D88FD31,0x3FF0 // CN +// [128; 256) +data8 0x94AA029C2286F8D2,0x4001 // C50 +data8 0xAD0549E55A72389F,0x4001 // C60 +data8 0xC4628899DAF94BA4,0x4001 // C70 +data8 0xD89432A4161C72CB,0x4001 // C80 +data8 0xE77ABA75E9C38F3A,0x4001 // C90 +data8 0xEF65BFFFF71347FF,0x4001 // CA0 +data8 0xE2627460064D918D,0x3FF1 // CN +// [256; 512) +data8 0x96E9890D722C2FC1,0x4001 // C50 +data8 0xAF6C2236F6A1CEC4,0x4001 // C60 +data8 0xC6EBB8C9F987D20D,0x4001 // C70 +data8 0xDB38CEFD5EF328CC,0x4001 // C80 +data8 0xEA3265DC66C9A0B4,0x4001 // C90 +data8 0xF2272D6B368C70B1,0x4001 // CA0 +data8 0xDBFF93ECEBCEF1F3,0x3FF2 // CN +// +data8 0x3FDD8B618D5AF8FE // point of local minimum on [1;2] +data8 0x3FE0000000000000 // 0.5 +data8 0xBFC5555DA7212371 // P5 +data8 0x3FC999A19EEF5826 // P4 +data8 0xb17217f7d1cf79ac,0x3ffe // ln(2) +data8 0xEB3F8E4325F5A535,0x3FFE // ln(sqrt(4*arcsin(1))) +// +data8 0xBFCFFFFFFFFEF009 // P3 +data8 0x3FD555555554ECB2 // P2 +data8 0xBF66C16C16C16C17 // W4=B4/12=-1/360 +data8 0x7F5754D9278B51A8 // overflow boundary (first inf result) +data8 0xAAAAAAAAAAAAAAAB,0x3FFB // W2=B2/2=1/12 +// +data8 0x3FBC756AC654273B // Q8 +data8 0xBFC001A42489AB4D // Q7 +data8 0x3FC99999999A169B // Q4 +data8 0xBFD00000000019AC // Q3 +data8 0x3FC2492479AA0DF8 // Q6 +data8 0xBFC5555544986F52 // Q5 +data8 0x3FD5555555555555 // Q2 +data8 0xBFE0000000000000 // Q1, P1 = -0.5 +// +data8 0x80200aaeac44ef38,0x3ff6 // ln(1/frcpa(1+ 0/2^-8)) +data8 0xc09090a2c35aa070,0x3ff7 // ln(1/frcpa(1+ 1/2^-8)) +data8 0xa0c94fcb41977c75,0x3ff8 // ln(1/frcpa(1+ 2/2^-8)) +data8 0xe18b9c263af83301,0x3ff8 // ln(1/frcpa(1+ 3/2^-8)) +data8 0x8d35c8d6399c30ea,0x3ff9 // ln(1/frcpa(1+ 4/2^-8)) +data8 0xadd4d2ecd601cbb8,0x3ff9 // ln(1/frcpa(1+ 5/2^-8)) +data8 0xce95403a192f9f01,0x3ff9 // ln(1/frcpa(1+ 6/2^-8)) +data8 0xeb59392cbcc01096,0x3ff9 // ln(1/frcpa(1+ 7/2^-8)) +data8 0x862c7d0cefd54c5d,0x3ffa // ln(1/frcpa(1+ 8/2^-8)) +data8 0x94aa63c65e70d499,0x3ffa // ln(1/frcpa(1+ 9/2^-8)) +data8 0xa54a696d4b62b382,0x3ffa // ln(1/frcpa(1+ 10/2^-8)) +data8 0xb3e4a796a5dac208,0x3ffa // ln(1/frcpa(1+ 11/2^-8)) +data8 0xc28c45b1878340a9,0x3ffa // ln(1/frcpa(1+ 12/2^-8)) +data8 0xd35c55f39d7a6235,0x3ffa // ln(1/frcpa(1+ 13/2^-8)) +data8 0xe220f037b954f1f5,0x3ffa // ln(1/frcpa(1+ 14/2^-8)) +data8 0xf0f3389b036834f3,0x3ffa // ln(1/frcpa(1+ 15/2^-8)) +data8 0xffd3488d5c980465,0x3ffa // ln(1/frcpa(1+ 16/2^-8)) +data8 0x87609ce2ed300490,0x3ffb // ln(1/frcpa(1+ 17/2^-8)) +data8 0x8ede9321e8c85927,0x3ffb // ln(1/frcpa(1+ 18/2^-8)) +data8 0x96639427f2f8e2f4,0x3ffb // ln(1/frcpa(1+ 19/2^-8)) +data8 0x9defad3e8f73217b,0x3ffb // ln(1/frcpa(1+ 20/2^-8)) +data8 0xa582ebd50097029c,0x3ffb // ln(1/frcpa(1+ 21/2^-8)) +data8 0xac06dbe75ab80fee,0x3ffb // ln(1/frcpa(1+ 22/2^-8)) +data8 0xb3a78449b2d3ccca,0x3ffb // ln(1/frcpa(1+ 23/2^-8)) +data8 0xbb4f79635ab46bb2,0x3ffb // ln(1/frcpa(1+ 24/2^-8)) +data8 0xc2fec93a83523f3f,0x3ffb // ln(1/frcpa(1+ 25/2^-8)) +data8 0xc99af2eaca4c4571,0x3ffb // ln(1/frcpa(1+ 26/2^-8)) +data8 0xd1581106472fa653,0x3ffb // ln(1/frcpa(1+ 27/2^-8)) +data8 0xd8002560d4355f2e,0x3ffb // ln(1/frcpa(1+ 28/2^-8)) +data8 0xdfcb43b4fe508632,0x3ffb // ln(1/frcpa(1+ 29/2^-8)) +data8 0xe67f6dff709d4119,0x3ffb // ln(1/frcpa(1+ 30/2^-8)) +data8 0xed393b1c22351280,0x3ffb // ln(1/frcpa(1+ 31/2^-8)) +data8 0xf5192bff087bcc35,0x3ffb // ln(1/frcpa(1+ 32/2^-8)) +data8 0xfbdf4ff6dfef2fa3,0x3ffb // ln(1/frcpa(1+ 33/2^-8)) +data8 0x81559a97f92f9cc7,0x3ffc // ln(1/frcpa(1+ 34/2^-8)) +data8 0x84be72bce90266e8,0x3ffc // ln(1/frcpa(1+ 35/2^-8)) +data8 0x88bc74113f23def2,0x3ffc // ln(1/frcpa(1+ 36/2^-8)) +data8 0x8c2ba3edf6799d11,0x3ffc // ln(1/frcpa(1+ 37/2^-8)) +data8 0x8f9dc92f92ea08b1,0x3ffc // ln(1/frcpa(1+ 38/2^-8)) +data8 0x9312e8f36efab5a7,0x3ffc // ln(1/frcpa(1+ 39/2^-8)) +data8 0x968b08643409ceb6,0x3ffc // ln(1/frcpa(1+ 40/2^-8)) +data8 0x9a062cba08a1708c,0x3ffc // ln(1/frcpa(1+ 41/2^-8)) +data8 0x9d845b3abf95485c,0x3ffc // ln(1/frcpa(1+ 42/2^-8)) +data8 0xa06fd841bc001bb4,0x3ffc // ln(1/frcpa(1+ 43/2^-8)) +data8 0xa3f3a74652fbe0db,0x3ffc // ln(1/frcpa(1+ 44/2^-8)) +data8 0xa77a8fb2336f20f5,0x3ffc // ln(1/frcpa(1+ 45/2^-8)) +data8 0xab0497015d28b0a0,0x3ffc // ln(1/frcpa(1+ 46/2^-8)) +data8 0xae91c2be6ba6a615,0x3ffc // ln(1/frcpa(1+ 47/2^-8)) +data8 0xb189d1b99aebb20b,0x3ffc // ln(1/frcpa(1+ 48/2^-8)) +data8 0xb51cced5de9c1b2c,0x3ffc // ln(1/frcpa(1+ 49/2^-8)) +data8 0xb819bee9e720d42f,0x3ffc // ln(1/frcpa(1+ 50/2^-8)) +data8 0xbbb2a0947b093a5d,0x3ffc // ln(1/frcpa(1+ 51/2^-8)) +data8 0xbf4ec1505811684a,0x3ffc // ln(1/frcpa(1+ 52/2^-8)) +data8 0xc2535bacfa8975ff,0x3ffc // ln(1/frcpa(1+ 53/2^-8)) +data8 0xc55a3eafad187eb8,0x3ffc // ln(1/frcpa(1+ 54/2^-8)) +data8 0xc8ff2484b2c0da74,0x3ffc // ln(1/frcpa(1+ 55/2^-8)) +data8 0xcc0b1a008d53ab76,0x3ffc // ln(1/frcpa(1+ 56/2^-8)) +data8 0xcfb6203844b3209b,0x3ffc // ln(1/frcpa(1+ 57/2^-8)) +data8 0xd2c73949a47a19f5,0x3ffc // ln(1/frcpa(1+ 58/2^-8)) +data8 0xd5daae18b49d6695,0x3ffc // ln(1/frcpa(1+ 59/2^-8)) +data8 0xd8f08248cf7e8019,0x3ffc // ln(1/frcpa(1+ 60/2^-8)) +data8 0xdca7749f1b3e540e,0x3ffc // ln(1/frcpa(1+ 61/2^-8)) +data8 0xdfc28e033aaaf7c7,0x3ffc // ln(1/frcpa(1+ 62/2^-8)) +data8 0xe2e012a5f91d2f55,0x3ffc // ln(1/frcpa(1+ 63/2^-8)) +data8 0xe600064ed9e292a8,0x3ffc // ln(1/frcpa(1+ 64/2^-8)) +data8 0xe9226cce42b39f60,0x3ffc // ln(1/frcpa(1+ 65/2^-8)) +data8 0xec4749fd97a28360,0x3ffc // ln(1/frcpa(1+ 66/2^-8)) +data8 0xef6ea1bf57780495,0x3ffc // ln(1/frcpa(1+ 67/2^-8)) +data8 0xf29877ff38809091,0x3ffc // ln(1/frcpa(1+ 68/2^-8)) +data8 0xf5c4d0b245cb89be,0x3ffc // ln(1/frcpa(1+ 69/2^-8)) +data8 0xf8f3afd6fcdef3aa,0x3ffc // ln(1/frcpa(1+ 70/2^-8)) +data8 0xfc2519756be1abc7,0x3ffc // ln(1/frcpa(1+ 71/2^-8)) +data8 0xff59119f503e6832,0x3ffc // ln(1/frcpa(1+ 72/2^-8)) +data8 0x8147ce381ae0e146,0x3ffd // ln(1/frcpa(1+ 73/2^-8)) +data8 0x82e45f06cb1ad0f2,0x3ffd // ln(1/frcpa(1+ 74/2^-8)) +data8 0x842f5c7c573cbaa2,0x3ffd // ln(1/frcpa(1+ 75/2^-8)) +data8 0x85ce471968c8893a,0x3ffd // ln(1/frcpa(1+ 76/2^-8)) +data8 0x876e8305bc04066d,0x3ffd // ln(1/frcpa(1+ 77/2^-8)) +data8 0x891012678031fbb3,0x3ffd // ln(1/frcpa(1+ 78/2^-8)) +data8 0x8a5f1493d766a05f,0x3ffd // ln(1/frcpa(1+ 79/2^-8)) +data8 0x8c030c778c56fa00,0x3ffd // ln(1/frcpa(1+ 80/2^-8)) +data8 0x8da85df17e31d9ae,0x3ffd // ln(1/frcpa(1+ 81/2^-8)) +data8 0x8efa663e7921687e,0x3ffd // ln(1/frcpa(1+ 82/2^-8)) +data8 0x90a22b6875c6a1f8,0x3ffd // ln(1/frcpa(1+ 83/2^-8)) +data8 0x91f62cc8f5d24837,0x3ffd // ln(1/frcpa(1+ 84/2^-8)) +data8 0x93a06cfc3857d980,0x3ffd // ln(1/frcpa(1+ 85/2^-8)) +data8 0x94f66d5e6fd01ced,0x3ffd // ln(1/frcpa(1+ 86/2^-8)) +data8 0x96a330156e6772f2,0x3ffd // ln(1/frcpa(1+ 87/2^-8)) +data8 0x97fb3582754ea25b,0x3ffd // ln(1/frcpa(1+ 88/2^-8)) +data8 0x99aa8259aad1bbf2,0x3ffd // ln(1/frcpa(1+ 89/2^-8)) +data8 0x9b0492f6227ae4a8,0x3ffd // ln(1/frcpa(1+ 90/2^-8)) +data8 0x9c5f8e199bf3a7a5,0x3ffd // ln(1/frcpa(1+ 91/2^-8)) +data8 0x9e1293b9998c1daa,0x3ffd // ln(1/frcpa(1+ 92/2^-8)) +data8 0x9f6fa31e0b41f308,0x3ffd // ln(1/frcpa(1+ 93/2^-8)) +data8 0xa0cda11eaf46390e,0x3ffd // ln(1/frcpa(1+ 94/2^-8)) +data8 0xa22c8f029cfa45aa,0x3ffd // ln(1/frcpa(1+ 95/2^-8)) +data8 0xa3e48badb7856b34,0x3ffd // ln(1/frcpa(1+ 96/2^-8)) +data8 0xa5459a0aa95849f9,0x3ffd // ln(1/frcpa(1+ 97/2^-8)) +data8 0xa6a79c84480cfebd,0x3ffd // ln(1/frcpa(1+ 98/2^-8)) +data8 0xa80a946d0fcb3eb2,0x3ffd // ln(1/frcpa(1+ 99/2^-8)) +data8 0xa96e831a3ea7b314,0x3ffd // ln(1/frcpa(1+100/2^-8)) +data8 0xaad369e3dc544e3b,0x3ffd // ln(1/frcpa(1+101/2^-8)) +data8 0xac92e9588952c815,0x3ffd // ln(1/frcpa(1+102/2^-8)) +data8 0xadfa035aa1ed8fdc,0x3ffd // ln(1/frcpa(1+103/2^-8)) +data8 0xaf6219eae1ad6e34,0x3ffd // ln(1/frcpa(1+104/2^-8)) +data8 0xb0cb2e6d8160f753,0x3ffd // ln(1/frcpa(1+105/2^-8)) +data8 0xb2354249ad950f72,0x3ffd // ln(1/frcpa(1+106/2^-8)) +data8 0xb3a056e98ef4a3b4,0x3ffd // ln(1/frcpa(1+107/2^-8)) +data8 0xb50c6dba52c6292a,0x3ffd // ln(1/frcpa(1+108/2^-8)) +data8 0xb679882c33876165,0x3ffd // ln(1/frcpa(1+109/2^-8)) +data8 0xb78c07429785cedc,0x3ffd // ln(1/frcpa(1+110/2^-8)) +data8 0xb8faeb8dc4a77d24,0x3ffd // ln(1/frcpa(1+111/2^-8)) +data8 0xba6ad77eb36ae0d6,0x3ffd // ln(1/frcpa(1+112/2^-8)) +data8 0xbbdbcc915e9bee50,0x3ffd // ln(1/frcpa(1+113/2^-8)) +data8 0xbd4dcc44f8cf12ef,0x3ffd // ln(1/frcpa(1+114/2^-8)) +data8 0xbec0d81bf5b531fa,0x3ffd // ln(1/frcpa(1+115/2^-8)) +data8 0xc034f19c139186f4,0x3ffd // ln(1/frcpa(1+116/2^-8)) +data8 0xc14cb69f7c5e55ab,0x3ffd // ln(1/frcpa(1+117/2^-8)) +data8 0xc2c2abbb6e5fd56f,0x3ffd // ln(1/frcpa(1+118/2^-8)) +data8 0xc439b2c193e6771e,0x3ffd // ln(1/frcpa(1+119/2^-8)) +data8 0xc553acb9d5c67733,0x3ffd // ln(1/frcpa(1+120/2^-8)) +data8 0xc6cc96e441272441,0x3ffd // ln(1/frcpa(1+121/2^-8)) +data8 0xc8469753eca88c30,0x3ffd // ln(1/frcpa(1+122/2^-8)) +data8 0xc962cf3ce072b05c,0x3ffd // ln(1/frcpa(1+123/2^-8)) +data8 0xcadeba8771f694aa,0x3ffd // ln(1/frcpa(1+124/2^-8)) +data8 0xcc5bc08d1f72da94,0x3ffd // ln(1/frcpa(1+125/2^-8)) +data8 0xcd7a3f99ea035c29,0x3ffd // ln(1/frcpa(1+126/2^-8)) +data8 0xcef93860c8a53c35,0x3ffd // ln(1/frcpa(1+127/2^-8)) +data8 0xd0192f68a7ed23df,0x3ffd // ln(1/frcpa(1+128/2^-8)) +data8 0xd19a201127d3c645,0x3ffd // ln(1/frcpa(1+129/2^-8)) +data8 0xd2bb92f4061c172c,0x3ffd // ln(1/frcpa(1+130/2^-8)) +data8 0xd43e80b2ee8cc8fc,0x3ffd // ln(1/frcpa(1+131/2^-8)) +data8 0xd56173601fc4ade4,0x3ffd // ln(1/frcpa(1+132/2^-8)) +data8 0xd6e6637efb54086f,0x3ffd // ln(1/frcpa(1+133/2^-8)) +data8 0xd80ad9f58f3c8193,0x3ffd // ln(1/frcpa(1+134/2^-8)) +data8 0xd991d1d31aca41f8,0x3ffd // ln(1/frcpa(1+135/2^-8)) +data8 0xdab7d02231484a93,0x3ffd // ln(1/frcpa(1+136/2^-8)) +data8 0xdc40d532cde49a54,0x3ffd // ln(1/frcpa(1+137/2^-8)) +data8 0xdd685f79ed8b265e,0x3ffd // ln(1/frcpa(1+138/2^-8)) +data8 0xde9094bbc0e17b1d,0x3ffd // ln(1/frcpa(1+139/2^-8)) +data8 0xe01c91b78440c425,0x3ffd // ln(1/frcpa(1+140/2^-8)) +data8 0xe14658f26997e729,0x3ffd // ln(1/frcpa(1+141/2^-8)) +data8 0xe270cdc2391e0d23,0x3ffd // ln(1/frcpa(1+142/2^-8)) +data8 0xe3ffce3a2aa64922,0x3ffd // ln(1/frcpa(1+143/2^-8)) +data8 0xe52bdb274ed82887,0x3ffd // ln(1/frcpa(1+144/2^-8)) +data8 0xe6589852e75d7df6,0x3ffd // ln(1/frcpa(1+145/2^-8)) +data8 0xe786068c79937a7d,0x3ffd // ln(1/frcpa(1+146/2^-8)) +data8 0xe91903adad100911,0x3ffd // ln(1/frcpa(1+147/2^-8)) +data8 0xea481236f7d35bb0,0x3ffd // ln(1/frcpa(1+148/2^-8)) +data8 0xeb77d48c692e6b14,0x3ffd // ln(1/frcpa(1+149/2^-8)) +data8 0xeca84b83d7297b87,0x3ffd // ln(1/frcpa(1+150/2^-8)) +data8 0xedd977f4962aa158,0x3ffd // ln(1/frcpa(1+151/2^-8)) +data8 0xef7179a22f257754,0x3ffd // ln(1/frcpa(1+152/2^-8)) +data8 0xf0a450d139366ca7,0x3ffd // ln(1/frcpa(1+153/2^-8)) +data8 0xf1d7e0524ff9ffdb,0x3ffd // ln(1/frcpa(1+154/2^-8)) +data8 0xf30c29036a8b6cae,0x3ffd // ln(1/frcpa(1+155/2^-8)) +data8 0xf4412bc411ea8d92,0x3ffd // ln(1/frcpa(1+156/2^-8)) +data8 0xf576e97564c8619d,0x3ffd // ln(1/frcpa(1+157/2^-8)) +data8 0xf6ad62fa1b5f172f,0x3ffd // ln(1/frcpa(1+158/2^-8)) +data8 0xf7e499368b55c542,0x3ffd // ln(1/frcpa(1+159/2^-8)) +data8 0xf91c8d10abaffe22,0x3ffd // ln(1/frcpa(1+160/2^-8)) +data8 0xfa553f7018c966f3,0x3ffd // ln(1/frcpa(1+161/2^-8)) +data8 0xfb8eb13e185d802c,0x3ffd // ln(1/frcpa(1+162/2^-8)) +data8 0xfcc8e3659d9bcbed,0x3ffd // ln(1/frcpa(1+163/2^-8)) +data8 0xfe03d6d34d487fd2,0x3ffd // ln(1/frcpa(1+164/2^-8)) +data8 0xff3f8c7581e9f0ae,0x3ffd // ln(1/frcpa(1+165/2^-8)) +data8 0x803e029e280173ae,0x3ffe // ln(1/frcpa(1+166/2^-8)) +data8 0x80dca10cc52d0757,0x3ffe // ln(1/frcpa(1+167/2^-8)) +data8 0x817ba200632755a1,0x3ffe // ln(1/frcpa(1+168/2^-8)) +data8 0x821b05f3b01d6774,0x3ffe // ln(1/frcpa(1+169/2^-8)) +data8 0x82bacd623ff19d06,0x3ffe // ln(1/frcpa(1+170/2^-8)) +data8 0x835af8c88e7a8f47,0x3ffe // ln(1/frcpa(1+171/2^-8)) +data8 0x83c5f8299e2b4091,0x3ffe // ln(1/frcpa(1+172/2^-8)) +data8 0x8466cb43f3d87300,0x3ffe // ln(1/frcpa(1+173/2^-8)) +data8 0x850803a67c80ca4b,0x3ffe // ln(1/frcpa(1+174/2^-8)) +data8 0x85a9a1d11a23b461,0x3ffe // ln(1/frcpa(1+175/2^-8)) +data8 0x864ba644a18e6e05,0x3ffe // ln(1/frcpa(1+176/2^-8)) +data8 0x86ee1182dcc432f7,0x3ffe // ln(1/frcpa(1+177/2^-8)) +data8 0x875a925d7e48c316,0x3ffe // ln(1/frcpa(1+178/2^-8)) +data8 0x87fdaa109d23aef7,0x3ffe // ln(1/frcpa(1+179/2^-8)) +data8 0x88a129ed4becfaf2,0x3ffe // ln(1/frcpa(1+180/2^-8)) +data8 0x89451278ecd7f9cf,0x3ffe // ln(1/frcpa(1+181/2^-8)) +data8 0x89b29295f8432617,0x3ffe // ln(1/frcpa(1+182/2^-8)) +data8 0x8a572ac5a5496882,0x3ffe // ln(1/frcpa(1+183/2^-8)) +data8 0x8afc2d0ce3b2dadf,0x3ffe // ln(1/frcpa(1+184/2^-8)) +data8 0x8b6a69c608cfd3af,0x3ffe // ln(1/frcpa(1+185/2^-8)) +data8 0x8c101e106e899a83,0x3ffe // ln(1/frcpa(1+186/2^-8)) +data8 0x8cb63de258f9d626,0x3ffe // ln(1/frcpa(1+187/2^-8)) +data8 0x8d2539c5bd19e2b1,0x3ffe // ln(1/frcpa(1+188/2^-8)) +data8 0x8dcc0e064b29e6f1,0x3ffe // ln(1/frcpa(1+189/2^-8)) +data8 0x8e734f45d88357ae,0x3ffe // ln(1/frcpa(1+190/2^-8)) +data8 0x8ee30cef034a20db,0x3ffe // ln(1/frcpa(1+191/2^-8)) +data8 0x8f8b0515686d1d06,0x3ffe // ln(1/frcpa(1+192/2^-8)) +data8 0x90336bba039bf32f,0x3ffe // ln(1/frcpa(1+193/2^-8)) +data8 0x90a3edd23d1c9d58,0x3ffe // ln(1/frcpa(1+194/2^-8)) +data8 0x914d0de2f5d61b32,0x3ffe // ln(1/frcpa(1+195/2^-8)) +data8 0x91be0c20d28173b5,0x3ffe // ln(1/frcpa(1+196/2^-8)) +data8 0x9267e737c06cd34a,0x3ffe // ln(1/frcpa(1+197/2^-8)) +data8 0x92d962ae6abb1237,0x3ffe // ln(1/frcpa(1+198/2^-8)) +data8 0x9383fa6afbe2074c,0x3ffe // ln(1/frcpa(1+199/2^-8)) +data8 0x942f0421651c1c4e,0x3ffe // ln(1/frcpa(1+200/2^-8)) +data8 0x94a14a3845bb985e,0x3ffe // ln(1/frcpa(1+201/2^-8)) +data8 0x954d133857f861e7,0x3ffe // ln(1/frcpa(1+202/2^-8)) +data8 0x95bfd96468e604c4,0x3ffe // ln(1/frcpa(1+203/2^-8)) +data8 0x9632d31cafafa858,0x3ffe // ln(1/frcpa(1+204/2^-8)) +data8 0x96dfaabd86fa1647,0x3ffe // ln(1/frcpa(1+205/2^-8)) +data8 0x9753261fcbb2a594,0x3ffe // ln(1/frcpa(1+206/2^-8)) +data8 0x9800c11b426b996d,0x3ffe // ln(1/frcpa(1+207/2^-8)) +data8 0x9874bf4d45ae663c,0x3ffe // ln(1/frcpa(1+208/2^-8)) +data8 0x99231f5ee9a74f79,0x3ffe // ln(1/frcpa(1+209/2^-8)) +data8 0x9997a18a56bcad28,0x3ffe // ln(1/frcpa(1+210/2^-8)) +data8 0x9a46c873a3267e79,0x3ffe // ln(1/frcpa(1+211/2^-8)) +data8 0x9abbcfc621eb6cb6,0x3ffe // ln(1/frcpa(1+212/2^-8)) +data8 0x9b310cb0d354c990,0x3ffe // ln(1/frcpa(1+213/2^-8)) +data8 0x9be14cf9e1b3515c,0x3ffe // ln(1/frcpa(1+214/2^-8)) +data8 0x9c5710b8cbb73a43,0x3ffe // ln(1/frcpa(1+215/2^-8)) +data8 0x9ccd0abd301f399c,0x3ffe // ln(1/frcpa(1+216/2^-8)) +data8 0x9d7e67f3bdce8888,0x3ffe // ln(1/frcpa(1+217/2^-8)) +data8 0x9df4ea81a99daa01,0x3ffe // ln(1/frcpa(1+218/2^-8)) +data8 0x9e6ba405a54514ba,0x3ffe // ln(1/frcpa(1+219/2^-8)) +data8 0x9f1e21c8c7bb62b3,0x3ffe // ln(1/frcpa(1+220/2^-8)) +data8 0x9f956593f6b6355c,0x3ffe // ln(1/frcpa(1+221/2^-8)) +data8 0xa00ce1092e5498c3,0x3ffe // ln(1/frcpa(1+222/2^-8)) +data8 0xa0c08309c4b912c1,0x3ffe // ln(1/frcpa(1+223/2^-8)) +data8 0xa1388a8c6faa2afa,0x3ffe // ln(1/frcpa(1+224/2^-8)) +data8 0xa1b0ca7095b5f985,0x3ffe // ln(1/frcpa(1+225/2^-8)) +data8 0xa22942eb47534a00,0x3ffe // ln(1/frcpa(1+226/2^-8)) +data8 0xa2de62326449d0a3,0x3ffe // ln(1/frcpa(1+227/2^-8)) +data8 0xa357690f88bfe345,0x3ffe // ln(1/frcpa(1+228/2^-8)) +data8 0xa3d0a93f45169a4b,0x3ffe // ln(1/frcpa(1+229/2^-8)) +data8 0xa44a22f7ffe65f30,0x3ffe // ln(1/frcpa(1+230/2^-8)) +data8 0xa500c5e5b4c1aa36,0x3ffe // ln(1/frcpa(1+231/2^-8)) +data8 0xa57ad064eb2ebbc2,0x3ffe // ln(1/frcpa(1+232/2^-8)) +data8 0xa5f5152dedf4384e,0x3ffe // ln(1/frcpa(1+233/2^-8)) +data8 0xa66f9478856233ec,0x3ffe // ln(1/frcpa(1+234/2^-8)) +data8 0xa6ea4e7cca02c32e,0x3ffe // ln(1/frcpa(1+235/2^-8)) +data8 0xa765437325341ccf,0x3ffe // ln(1/frcpa(1+236/2^-8)) +data8 0xa81e21e6c75b4020,0x3ffe // ln(1/frcpa(1+237/2^-8)) +data8 0xa899ab333fe2b9ca,0x3ffe // ln(1/frcpa(1+238/2^-8)) +data8 0xa9157039c51ebe71,0x3ffe // ln(1/frcpa(1+239/2^-8)) +data8 0xa991713433c2b999,0x3ffe // ln(1/frcpa(1+240/2^-8)) +data8 0xaa0dae5cbcc048b3,0x3ffe // ln(1/frcpa(1+241/2^-8)) +data8 0xaa8a27ede5eb13ad,0x3ffe // ln(1/frcpa(1+242/2^-8)) +data8 0xab06de228a9e3499,0x3ffe // ln(1/frcpa(1+243/2^-8)) +data8 0xab83d135dc633301,0x3ffe // ln(1/frcpa(1+244/2^-8)) +data8 0xac3fb076adc7fe7a,0x3ffe // ln(1/frcpa(1+245/2^-8)) +data8 0xacbd3cbbe47988f1,0x3ffe // ln(1/frcpa(1+246/2^-8)) +data8 0xad3b06b1a5dc57c3,0x3ffe // ln(1/frcpa(1+247/2^-8)) +data8 0xadb90e94af887717,0x3ffe // ln(1/frcpa(1+248/2^-8)) +data8 0xae3754a218f7c816,0x3ffe // ln(1/frcpa(1+249/2^-8)) +data8 0xaeb5d9175437afa2,0x3ffe // ln(1/frcpa(1+250/2^-8)) +data8 0xaf349c322e9c7cee,0x3ffe // ln(1/frcpa(1+251/2^-8)) +data8 0xafb39e30d1768d1c,0x3ffe // ln(1/frcpa(1+252/2^-8)) +data8 0xb032df51c2c93116,0x3ffe // ln(1/frcpa(1+253/2^-8)) +data8 0xb0b25fd3e6035ad9,0x3ffe // ln(1/frcpa(1+254/2^-8)) +data8 0xb1321ff67cba178c,0x3ffe // ln(1/frcpa(1+255/2^-8)) +// +data8 0xC7DC2985D3B44557,0x3FCA // A00 +// +// polynomial approximation of ln(GAMMA(x)), 1 <= x < 2.25 +// [0.875,1.25) +data8 0xBF9A04F7E40C8498,0x3FAB79D8D9380F03 // C17,C16 +data8 0xBFB3B63609CA0CBD,0x3FB5564EA1675539 // C13,C12 +data8 0xBFBC806766F48C41,0x3FC010B36CDA773A // C9,C8 +data8 0xD45CE0BD54BE3D67,0xBFFC // C5 +data8 0xCD26AADF559676D0,0xBFFD // C3 +data8 0x93C467E37DB0C7A7,0xBFFE // C1 +data8 0xBFB10C251723B123,0x3FB2669DAD69A12D // C15,C14 +data8 0xBFB748A3CFCE4717,0x3FB9A01DEE29966A // C11,C10 +data8 0xBFC2703A1D85497E,0x3FC5B40CB0FD353C // C7,C6 +data8 0x8A8991563ECBBA5D,0x3FFD // C4 +data8 0xD28D3312983E9844,0x3FFE // C2 +data8 0,0 // C0 +// [1.25,1.75) +data8 0xBF12680486396DE6,0x3F23C51FC332CD9D // C17,C16 +data8 0xBF422633DA3A1496,0x3F4CC70680768857 // C13,C12 +data8 0xBF6E2F1A1F804B5D,0x3F78FCE02A032428 // C9,C8 +data8 0x864D46FA895985C1,0xBFFA // C5 +data8 0x97213C6E35E12043,0xBFFC // C3 +data8 0x8A8A42A401D979B7,0x3FC7 // C1 +data8 0xBF2E098A8A2332A8,0x3F370E61B73B205C // C15,C14 +data8 0xBF56F9849D3BC6CC,0x3F6283126F58D7F4 // C11,C10 +data8 0xBF851F9F9516A98F,0x3F9266E797A1433F // C7,C6 +data8 0x845A14A6A81B0638,0x3FFB // C4 +data8 0xF7B95E4771C55C99,0x3FFD // C2 +data8 0xF8CDCDE61C520E0F,0xBFFB // C0 +// [1.75,2.25) +data8 0xBEA01D7AFA5D8F52,0x3EB1010986E60253 // C17,C16 +data8 0xBEE3CBEDB4C918AA,0x3EF580F6D9D0F72D // C13,C12 +data8 0xBF2D3FD4C7F68563,0x3F40B36AF884AE9A // C9,C8 +data8 0xF2027E10C7B051EC,0xBFF7 // C5 +data8 0x89F000D2ABB03401,0xBFFB // C3 +data8 0xD8773039049E70B6,0x3FFD // C1 +data8 0xBEC112CD07CFC31A,0x3ED2528A428D30E1 // C15,C14 +data8 0xBF078DE5618D8C9F,0x3F1A127AD811A53D // C11,C10 +data8 0xBF538AC5C2BF540D,0x3F67ADD6EADB5718 // C7,C6 +data8 0xA8991563EC243383,0x3FF9 // C4 +data8 0xA51A6625307D3230,0x3FFD // C2 +data8 0,0 // C0 +// +// polynomial approximation of ln(sin(Pi*x)/(Pi*x)), 9 <= x <= 0.5 +data8 0xBFDC1BF0931AE591,0x3FD36D6D6CE263D7 //S28,S26 +data8 0xBFBD516F4FD9FB18,0xBFBBE1703F315086 //S20,S18 +data8 0xAAB5A3CCEFCD3628,0xBFFC //S12 +data8 0x80859B5C318E19A5,0xBFFD //S8 +data8 0x8A8991563EC7EB33,0xBFFE //S4 +data8 0xBFD23AB9E6CC88AC,0xBF9957F5146FC7AF //S24,S22 +data8 0xBFC007B324E23040,0xBFC248DEC29CAC4A //S16,S14 +data8 0xCD00EFF2F8F86899,0xBFFC //S10 +data8 0xADA06587FACD668B,0xBFFD //S6 +data8 0xD28D3312983E98A0,0xBFFF //S2 +// +data8 0x8090F777D7942F73,0x4001 // PR01 +data8 0xE5B521193CF61E63,0x4000 // PR11 +data8 0xC02C000000001939 // (-15;-14) +data8 0x0000000000000233 // (-15;-14) +data8 0xC02A000000016124 // (-14;-13) +data8 0x0000000000002BFB // (-14;-13) +data8 0xC02800000011EED9 // (-13;-12) +data8 0x0000000000025CBB // (-13;-12) +data8 0xC026000000D7322A // (-12;-11) +data8 0x00000000001E1095 // (-12;-11) +data8 0xC0240000093F2777 // (-11;-10) +data8 0x00000000013DD3DC // (-11;-10) +data8 0xC02200005C7768FB // (-10;-9) +data8 0x000000000C9539B9 // (-10;-9) +data8 0xC02000034028B3F9 // (-9;-8) +data8 0x000000007570C565 // (-9;-8) +data8 0xC01C0033FDEDFE1F // (-8;-7) +data8 0x00000007357E670E // (-8;-7) +data8 0xC018016B25897C8D // (-7;-6) +data8 0x000000346DC5D639 // (-7;-6) +data8 0xC014086A57F0B6D9 // (-6;-5) +data8 0x0000010624DD2F1B // (-6;-5) +data8 0xC010284E78599581 // (-5;-4) +data8 0x0000051EB851EB85 // (-5;-4) +data8 0xC009260DBC9E59AF // (-4;-3) +data8 0x000028F5C28F5C29 // (-4;-3) +data8 0xC003A7FC9600F86C // (-3;-2) +data8 0x0000666666666666 // (-3;-2) +data8 0xCC15879606130890,0x4000 // PR21 +data8 0xB42FE3281465E1CC,0x4000 // PR31 +// +data8 0x828185F0B95C9916,0x4001 // PR00 +// +data8 0xD4D3C819E4E5654B,0x4000 // PR10 +data8 0xA82FBBA4FCC75298,0x4000 // PR20 +data8 0xC02DFFFFFFFFFE52 // (-15;-14) +data8 0x000000000000001C // (-15;-14) +data8 0xC02BFFFFFFFFE6C7 // (-14;-13) +data8 0x00000000000001A6 // (-14;-13) +data8 0xC029FFFFFFFE9EDC // (-13;-12) +data8 0x0000000000002BFB // (-13;-12) +data8 0xC027FFFFFFEE1127 // (-12;-11) +data8 0x000000000001EEC8 // (-12;-11) +data8 0xC025FFFFFF28CDD4 // (-11;-10) +data8 0x00000000001E1095 // (-11;-10) +data8 0xC023FFFFF6C0D7C0 // (-10;-9) +data8 0x000000000101B2B3 // (-10;-9) +data8 0xC021FFFFA3884BD0 // (-9;-8) +data8 0x000000000D6BF94D // (-9;-8) +data8 0xC01FFFF97F8159CF // (-8;-7) +data8 0x00000000C9539B89 // (-8;-7) +data8 0xC01BFFCBF76B86F0 // (-7;-6) +data8 0x00000007357E670E // (-7;-6) +data8 0xC017FE92F591F40D // (-6;-5) +data8 0x000000346DC5D639 // (-6;-5) +data8 0xC013F7577A6EEAFD // (-5;-4) +data8 0x00000147AE147AE1 // (-5;-4) +data8 0xC00FA471547C2FE5 // (-4;-3) +data8 0x00000C49BA5E353F // (-4;-3) +data8 0xC005FB410A1BD901 // (-3;-2) +data8 0x000053F7CED91687 // (-3;-2) +data8 0x80151BB918A293AA,0x4000 // PR30 +data8 0xB3C9F8F47422A314,0x400B // PRN +// +// right negative roots +//(-3;-2) +data8 0x40BFCF8B90BE7F6B,0x40B237623345EFC3 // A15,A14 +data8 0x407A92EFB03B281E,0x40728700C7819759 // A11,A10 +data8 0x403809F04EF4D0F2,0x4038D32F682D9593 // A7,A6 +data8 0xB4A5302C53C2F2D8,0x3FFF // A3 +data8 0xC1FF4B357A9B0383,0x3FFF // A1 +data8 0x409C46632EB4B2D3,0x4091A72AFA2148F5 // A13,A12 +data8 0x4059297AC79A88DB,0x40548EAA7BE7FA6B // A9,A8 +data8 0x4017339FE04B227F,0x4021718D7CA09E02 // A5,A4 +data8 0x9B775D8017AAE668,0x4001 // A2 +data8 0x8191DB68FF4366A1,0x3FC9 // A0 +//(-4;-3) +data8 0x425260910D35307B,0x422668F5BE7983BB // A15,A14 +data8 0x41A4454DBE4BEE43,0x41799CA93F6EA817 // A11,A10 +data8 0x40FBB97AA1400F31,0x40D293C3F7ADAB15 // A7,A6 +data8 0xE089B8926AE4517B,0x4005 // A3 +data8 0xF90532F97D630C69,0x4001 // A1 +data8 0x41F9F0CF98C5F2EA,0x41D026336C6BF394 // A13,A12 +data8 0x415057F61156D5B8,0x41251EA3055CB754 // A9,A8 +data8 0x40A99A6337D9FC2B,0x408267203D776151 // A5,A4 +data8 0xCEA694BB8A8827A9,0x4003 // A2 +data8 0xF4B02F1D73D30EED,0x3FCD // A0 +//(-5;-4) +data8 0x4412365489340979,0x43C86441BAFDEE39 // A15,A14 +data8 0x42ED68FCB19352DD,0x42A45FCE3905CD6F // A11,A10 +data8 0x41CD14FE49FD4FCA,0x41855E3DBFA89744 // A7,A6 +data8 0xAACD88D954E0EC16,0x400B // A3 +data8 0xD652E7A490B0DCDF,0x4003 // A1 +data8 0x437F52608E0E752A,0x433560E0633E33D5 // A13,A12 +data8 0x425C83998976DE3D,0x421433DCCD3B473B // A9,A8 +data8 0x4140261EB5732106,0x40F96D18E21AE6CC // A5,A4 +data8 0xA220AE6C09FA8A0E,0x4007 // A2 +data8 0xCC1682D17A2B5A58,0xBFCF // A0 +//(-6;-5) +data8 0x4630E41D6386CF5A,0x45C2E7992C628C8C // A15,A14 +data8 0x447AABEC714F913A,0x440EDCAB45339F3A // A11,A10 +data8 0x42C9A8D00C97E3CE,0x425F7D8D5BEAB44D // A7,A6 +data8 0x929EC2B1FB95BB5B,0x4012 // A3 +data8 0xF6B970414D717D38,0x4005 // A1 +data8 0x45545E578976F6A2,0x44E738288DD52686 // A13,A12 +data8 0x43A20921FEC49492,0x433557FD7C6A41B3 // A9,A8 +data8 0x41F3E01773761DB4,0x418A225DF2DA6C47 // A5,A4 +data8 0xE7661976117F9312,0x400B // A2 +data8 0xC33C13FEE07494DE,0x3FCF // A0 +//(-7;-6) +data8 0x4898F1E6133305AD,0x4802C5306FE4A850 // A15,A14 +data8 0x463FD37946B44094,0x45A8D489B784C2DD // A11,A10 +data8 0x43E9500995815F06,0x4354F21E2FEE6DF5 // A7,A6 +data8 0xEF281D1E1BBE10BD,0x4019 // A3 +data8 0xB4EF24F1D78C2029,0x4008 // A1 +data8 0x476AB1D5930011E5,0x46D4867E77BFB622 // A13,A12 +data8 0x45139151ECDEF7C5,0x447F3A2BC6BF466F // A9,A8 +data8 0x42C1D3D50713FA40,0x422F9C7B52556A1B // A5,A4 +data8 0xFE711A4267CEA83A,0x4010 // A2 +data8 0xD11E91B3FF8F4B94,0xBFD2 // A0 +//(-8;-7) +data8 0x4B39E57569811B6E,0x4A7656073EB1FA21 // A15,A14 +data8 0x482C9B24A516B0BB,0x47698FF55139C62B // A11,A10 +data8 0x452393E2BC8E8D04,0x44628E1C710DA478 // A7,A6 +data8 0x9F2A95AF1B7A773F,0x4022 // A3 +data8 0x9DA03D51C303C918,0x400B // A1 +data8 0x49B24C241A3D5BCB,0x48F01CB936ECDA67 // A13,A12 +data8 0x46A712B3425C6797,0x45E5164114BD6DA1 // A9,A8 +data8 0x43A216A356069D01,0x42E25E42A45E2108 // A5,A4 +data8 0xC1F42ED57BBC2529,0x4016 // A2 +data8 0xB1C7B615A7DCA8A9,0xBFD7 // A0 +//(-9;-8) +data8 0x4E09D478E5EE857D,0x4D1647782106E9AB // A15,A14 +data8 0x4A3C7F4D51927548,0x49497954796D743A // A11,A10 +data8 0x467387BD6AF0CBDF,0x4582843E134111D2 // A7,A6 +data8 0x9F003C6DE9666513,0x402B // A3 +data8 0x9D8447F6BF99950A,0x400E // A1 +data8 0x4C22364D238C61A9,0x4B300B18050AB940 // A13,A12 +data8 0x4857004D64215772,0x4765074E448C3C9A // A9,A8 +data8 0x44920E9EA07BF624,0x43A257BEC94BBF48 // A5,A4 +data8 0xC1D1C49AC5B2A4B4,0x401C // A2 +data8 0x9A749AF9F2D2E688,0x3FDB // A0 +//(-10;-9) +data8 0x5102C7C43EA26C83,0x4FDCD174DEB0426B // A15,A14 +data8 0x4C6A036195CD5BAD,0x4B44ABB52B65628A // A11,A10 +data8 0x47D6439374B98FED,0x46B2C3903EF44D7D // A7,A6 +data8 0xE25BAF73AB8A7DB3,0x4034 // A3 +data8 0xB130901CA6D81B61,0x4011 // A1 +data8 0x4EB50BB0726AE206,0x4D907A96E6D2B6E2 // A13,A12 +data8 0x4A20975D78EAF01A,0x48FAF79C9C3E7908 // A9,A8 +data8 0x459044144129A247,0x446D6043FA3150A3 // A5,A4 +data8 0xF547997E083D9BA7,0x4022 // A2 +data8 0x977AF525A6ECA1BC,0x3FDC // A0 +//(-11;-10) +data8 0x5420A5D5E90C6D73,0x52C4710A503DC67A // A15,A14 +data8 0x4EB2ED07BA88D2A8,0x4D581001ED9A5ECE // A11,A10 +data8 0x494A8A28E9E3DFEF,0x47F1E4E1E476793E // A7,A6 +data8 0xDD0C97E12D4A3378,0x403E // A3 +data8 0xDD7C12D5182FD543,0x4014 // A1 +data8 0x5167ED536877A072,0x500DF9AF21DDC0B6 // A13,A12 +data8 0x4BFEE6F04BC34FF8,0x4AA4175CEF736A5E // A9,A8 +data8 0x4698D1B4388FEC78,0x4541EDE7607A600D // A5,A4 +data8 0xBF9F645F282AC552,0x4029 // A2 +data8 0xAE1BBE4D3CDACCF4,0x3FE1 // A0 +//(-12;-11) +data8 0x575F0EEF5FB7D4C0,0x55CBB7302B211A7C // A15,A14 +data8 0x5113A4F1825C7CB2,0x4F822A0D46E0605A // A11,A10 +data8 0x4ACED38FC8BE069A,0x493E3B56D2649F18 // A7,A6 +data8 0x8FA8FF5DF8B72D5E,0x4049 // A3 +data8 0x9845417E8598D642,0x4018 // A1 +data8 0x5437780541C3F2D3,0x52A56279B563C1B2 // A13,A12 +data8 0x4DF0F71A48C50188,0x4C600B358988DEBF // A9,A8 +data8 0x47AE7EE95BDA3DE9,0x46200599DC16B18F // A5,A4 +data8 0xB5249F914932E55D,0x4030 // A2 +data8 0xEAE760CD2C086094,0x3FE5 // A0 +//(-13;-12) +data8 0x5ABA5848651F6D18,0x58EF60D8A817650B // A15,A14 +data8 0x538A8CA86E13EFB1,0x51C05DBD4D01076D // A11,A10 +data8 0x4C607594C339D259,0x4A9585BD5BF932BB // A7,A6 +data8 0xF26D282C36EC3611,0x4053 // A3 +data8 0xE467DF4810EE7EEE,0x401B // A1 +data8 0x5721D9BA485E8CC3,0x5555AF2CCFB2104D // A13,A12 +data8 0x4FF4619A17B14EA6,0x4E29B2F29EB9F8C4 // A9,A8 +data8 0x48CCF27629D46E79,0x47044715F991A63D // A5,A4 +data8 0xCBC92FB9BDAA95A9,0x4037 // A2 +data8 0xFB743A426163665B,0xBFE6 // A0 +//(-14;-13) +data8 0x5E3295B24B353EAA,0x5C2B447E29796F20 // A15,A14 +data8 0x5615A35CB5EAFAE5,0x54106AB089C95CAF // A11,A10 +data8 0x4DFEC7D93501900A,0x4BF8C4C685F01B83 // A7,A6 +data8 0x820899603D9A74D5,0x405F // A3 +data8 0xB9949919933821CB,0x401F // A1 +data8 0x5A23373DB9A995AC,0x581CBA0AF7F53009 // A13,A12 +data8 0x520929836BB304CD,0x500386409A7076DA // A9,A8 +data8 0x49F480173FEAF90B,0x47F1ACB14B810793 // A5,A4 +data8 0x86881B8674DBF205,0x403F // A2 +data8 0x8CF3CC35AA2C5F90,0x3FED // A0 +//(-15;-14) +data8 0x61C37D53BE0029D6,0x5F80667CD9D68354 // A15,A14 +data8 0x58B3F01898E6605B,0x567149652116DB6A // A11,A10 +data8 0x4FA82FA4F5D35B00,0x4D663DB00832DF8F // A7,A6 +data8 0xAE426731C9B94996,0x406A // A3 +data8 0xA264C84BE3708F3F,0x4023 // A1 +data8 0x5D3B254BC1C806A8,0x5AF72E736048B553 // A13,A12 +data8 0x542E476505104BB0,0x51EAD96CDC4FB48F // A9,A8 +data8 0x4B25095F498DB134,0x48E4B9FDEBFE24AB // A5,A4 +data8 0xCE076A5A116C1D34,0x4046 // A2 +data8 0x940013871A15050B,0x3FF1 // A0 +// +// left negative roots +//(-3;-2) +data8 0x41AEB7998DBE2B2C,0xC19053D8FAC05DF7 // A16,A15 +data8 0x4133197BF1ADEAF9,0xC1150728B9B82072 // A12,A11 +data8 0x40BDBA65E74F4526,0xC0A12239BEEF8F72 // A8,A7 +data8 0xFA8256664F99E2AA,0x4004 // A4 +data8 0x9933F9E132D2A5DB,0x4002 // A2 +data8 0x416FFB167B85F77C,0xC15166AE0ACCF87C // A14,A13 +data8 0x40F75815106322C0,0xC0DA2D23C59C348D // A10,A9 +data8 0x4084373F7CC42043,0xC0685884581F8C61 // A6,A5 +data8 0xA0C2D6186460FF9D,0xC003 // A3 +data8 0xF5096D48258CA0AD,0xBFFF // A1 +//(-4;-3) +data8 0xC3E5BD233016D4B9,0x43A084DAD2D94AB1 // A15,A14 +data8 0xC2CCFFF5E5AED722,0x4286D143AC7D29A6 // A11,A10 +data8 0xC1B7DBBE0680D07B,0x4173E8F3ABB79CED // A7,A6 +data8 0xE929ACEA59799BAF,0xC00A // A3 +data8 0xA5CCECB362B21E1C,0xC003 // A1 +data8 0xC357EED873871B81,0x43128E0B873204FC // A13,A12 +data8 0xC242225FA76E8450,0x41FD2F76AE7386CE // A9,A8 +data8 0xC13116F7806D0C7A,0x40EE8F829F141025 // A5,A4 +data8 0xFBB6F57021B5B397,0x4006 // A2 +data8 0xEEE019B4C05AC269,0xBFCB // A0 +//(-5;-4) +data8 0xC626A52FE8AAA100,0x45B9FD1F4DDFE31E // A15,A14 +data8 0xC473812A5675F08B,0x440738530AECC254 // A11,A10 +data8 0xC2C5068B3F94AC27,0x425A8C5C539A500B // A7,A6 +data8 0x869FBFF732F20C3A,0xC012 // A3 +data8 0xE91251F7CF25A655,0xC005 // A1 +data8 0xC54C18CB48E5DA0F,0x44E07BD36FF561DF // A13,A12 +data8 0xC39BEC120D2FEBEA,0x4330FFA5388435BE // A9,A8 +data8 0xC1F13D5D163B7FB5,0x418752A6F5AC0F39 // A5,A4 +data8 0xDA99E33C51D360F0,0x400B // A2 +data8 0x9F47A66A2F53D9B9,0x3FD1 // A0 +//(-6;-5) +data8 0xC8970DAC16B6D59E,0x480170728306FD76 // A15,A14 +data8 0xC63E0E5030604CF3,0x45A7924D74D57C65 // A11,A10 +data8 0xC3E8684E41730FC6,0x43544D54EA2E5B9A // A7,A6 +data8 0xEB7404450C47C5F4,0xC019 // A3 +data8 0xB30FB521D2C19F8B,0xC008 // A1 +data8 0xC768F34D35DF6320,0x46D348B3BB2E68B8 // A13,A12 +data8 0xC512AC2FE5EA638E,0x447DF44BC7FC5E17 // A9,A8 +data8 0xC2C15EA6B0AAFEF9,0x422EF5D308DBC420 // A5,A4 +data8 0xFBCEE5BCA70FD3A3,0x4010 // A2 +data8 0x8589A7CFFE0A3E86,0xBFD5 // A0 +//(-7;-6) +data8 0xCB3995A0CC961E5A,0x4A7615C6C7116ADD // A15,A14 +data8 0xC82C5AFE0BF9C427,0x47695BD2F367668B // A11,A10 +data8 0xC52377E70BA14CF5,0x4462775E859E4392 // A7,A6 +data8 0x9EC8ED6E4C3D4DBE,0xC022 // A3 +data8 0x9D5FBD2E75520E65,0xC00B // A1 +data8 0xC9B21BB881A4DDF8,0x48EFEAB06FBA0207 // A13,A12 +data8 0xC6A6E8550CBC188F,0x45E4F3D26238B099 // A9,A8 +data8 0xC3A20427DF1B110A,0x42E24F3D636F2E4E // A5,A4 +data8 0xC1A4D12A82280CFB,0x4016 // A2 +data8 0xEF46D8DCCA9E8197,0x3FD2 // A0 +//(-8;-7) +data8 0xCE0946982B27DE5B,0x4D15DBC6664E2DD2 // A15,A14 +data8 0xCA3C769F6B3B2B93,0x49497251CD0C4363 // A11,A10 +data8 0xC67384066C47F489,0x458281393433AB28 // A7,A6 +data8 0x9EF3459926D0F14F,0xC02B // A3 +data8 0x9D7BB7F2600DFF0B,0xC00E // A1 +data8 0xCC22351326C939A7,0x4B3009431C4F1D3F // A13,A12 +data8 0xC856FAADDD48815D,0x476502BC3ECA040C // A9,A8 +data8 0xC4920C2A84173810,0x43A255C052525F99 // A5,A4 +data8 0xC1C73B6554011EFA,0x401C // A2 +data8 0x954612700ADF8317,0xBFD8 // A0 +//(-9;-8) +data8 0xD102F5CC7B590D3A,0x4FDD0F1C30E4EB22 // A15,A14 +data8 0xCC6A02912B0DF650,0x4B44AB18E4FCC159 // A11,A10 +data8 0xC7D64314B4A2FAAB,0x46B2C334AE5E2D34 // A7,A6 +data8 0xE2598724F7E28E99,0xC034 // A3 +data8 0xB12F6FE2E195452C,0xC011 // A1 +data8 0xCEB507747AF9356A,0x4D907802C08BA48F // A13,A12 +data8 0xCA2096E3DC29516F,0x48FAF6ED046A1DB7 // A9,A8 +data8 0xC59043D21BA5EE56,0x446D5FE468B30450 // A5,A4 +data8 0xF5460A8196B59C83,0x4022 // A2 +data8 0xB108F35A8EDA92D5,0xBFDD // A0 +//(-10;-9) +data8 0xD420430D91F8265B,0x52C406CAAAC9E0EE // A15,A14 +data8 0xCEB2ECDDDAA3DAD1,0x4D580FDA97F92E3A // A11,A10 +data8 0xC94A8A192341B5D4,0x47F1E4D8C690D07B // A7,A6 +data8 0xDD0C5F920C2F0D2B,0xC03E // A3 +data8 0xDD7BED3631657B48,0xC014 // A1 +data8 0xD167F410E64E90A4,0x500DFFED20F714A7 // A13,A12 +data8 0xCBFEE6D9043169E9,0x4AA4174F64B40AA7 // A9,A8 +data8 0xC698D1A9AF0AB9C2,0x4541EDE14987A887 // A5,A4 +data8 0xBF9F43D461B3DE6E,0x4029 // A2 +data8 0xF3891A50642FAF26,0x3FE1 // A0 +//(-11;-10) +data8 0xD75F0EEAF769D42A,0x55CBB72C8869183A // A15,A14 +data8 0xD113A4EF80394F77,0x4F822A0B96B3ECA9 // A11,A10 +data8 0xCACED38DC75763CB,0x493E3B5522D2D028 // A7,A6 +data8 0x8FA8FB5C92533701,0xC049 // A3 +data8 0x98453EDB9339C24E,0xC018 // A1 +data8 0xD43778026CCD4B20,0x52A5627753273B9B // A13,A12 +data8 0xCDF0F718DD7E1214,0x4C600B34582911EB // A9,A8 +data8 0xC7AE7EE7F112362C,0x46200599439C264F // A5,A4 +data8 0xB5249C335342B5BC,0x4030 // A2 +data8 0x881550711D143475,0x3FE4 // A0 +//(-12;-11) +data8 0xDAB9C724EEEE2BBB,0x58EEC971340EDDBA // A15,A14 +data8 0xD38A8C8AE63BD8BF,0x51C05DB21CEE00D3 // A11,A10 +data8 0xCC607594C311C12D,0x4A9585BD5BE6AB57 // A7,A6 +data8 0xF26D282C36EC0E66,0xC053 // A3 +data8 0xE467DF1FA674BFAE,0xC01B // A1 +data8 0xD721DE506999AA9C,0x5555B34F71B45132 // A13,A12 +data8 0xCFF4619A476BF76F,0x4E29B2F2BBE7A67E // A9,A8 +data8 0xC8CCF27629D48EDC,0x47044715F991AB46 // A5,A4 +data8 0xCBC92FB9BDAA928D,0x4037 // A2 +data8 0xCE27C4F01CF53284,0xBFE6 // A0 +//(-13;-12) +data8 0xDE3295B24355C5A1,0x5C2B447E298B562D // A15,A14 +data8 0xD615A35CB5E92103,0x54106AB089C95E8C // A11,A10 +data8 0xCDFEC7D935019005,0x4BF8C4C685F01B83 // A7,A6 +data8 0x820899603D9A74D5,0xC05F // A3 +data8 0xB9949916F8DF4AC4,0xC01F // A1 +data8 0xDA23373DBA0B7548,0x581CBA0AF7F45C01 // A13,A12 +data8 0xD20929836BB30934,0x500386409A7076D6 // A9,A8 +data8 0xC9F480173FEAF90B,0x47F1ACB14B810793 // A5,A4 +data8 0x86881B8674DBF205,0x403F // A2 +data8 0x8CFAFA9A142C1FF0,0x3FED // A0 +//(-14;-13) +data8 0xE1C33F356FA2C630,0x5F8038B8AA919DD7 // A15,A14 +data8 0xD8B3F0167E14982D,0x5671496400BAE0DB // A11,A10 +data8 0xCFA82FA4F5D25C3E,0x4D663DB008328C58 // A7,A6 +data8 0xAE426731C9B94980,0xC06A // A3 +data8 0xA264C84BB8A66F86,0xC023 // A1 +data8 0xDD3B26E34762ED1E,0x5AF72F76E3C1B793 // A13,A12 +data8 0xD42E476507E3D06E,0x51EAD96CDD881DFA // A9,A8 +data8 0xCB25095F498DB15F,0x48E4B9FDEBFE24B5 // A5,A4 +data8 0xCE076A5A116C1D32,0x4046 // A2 +data8 0x94001BF5A24966F5,0x3FF1 // A0 +//(-15;-14) +data8 0xE56DB8B72D7156FF,0x62EAB0CDB22539BE // A15,A14 +data8 0xDB63D76B0D3457E7,0x58E254823D0AE4FF // A11,A10 +data8 0xD15F060BF548404A,0x4EDE65C20CD4E961 // A7,A6 +data8 0x900DA565ED76C19D,0xC076 // A3 +data8 0x9868C809852DA712,0xC027 // A1 +data8 0xE067CCDA0408AAF0,0x5DE5A79C5C5C54AF // A13,A12 +data8 0xD6611ADBF5958ED0,0x53E0294092BE9677 // A9,A8 +data8 0xCC5EA28D90EE8C5D,0x49E014930EF336EE // A5,A4 +data8 0xB57930DCE7A61AE8,0x404E // A2 +data8 0x976BEC1F30DF151C,0x3FF5 // A0 +LOCAL_OBJECT_END(lgamma_data) + + +.section .text +GLOBAL_LIBM_ENTRY(__libm_lgamma) + +{ .mfi + getf.exp GR_SignExp = f8 + frcpa.s1 FR_C,p9 = f1,f8 + mov GR_ExpMask = 0x1ffff +} +{ .mfi + addl GR_ad_Data = @ltoff(lgamma_data),gp + fcvt.fx.s1 FR_int_N = f8 + mov GR_2_25 = 0x4002 // 2.25 +};; +{ .mfi + getf.d GR_ArgAsIs = f8 + fclass.m p13,p0 = f8,0x1EF // is x NaTVal, NaN, + // +/-0, +/-INF or +/-deno? + mov GR_ExpBias = 0xFFFF +} +{ .mfi + ld8 GR_ad_Data = [GR_ad_Data] + fcvt.fx.trunc.s1 FR_int_Ntrunc = f8 + mov GR_ExpOf256 = 0x10007 +};; +{ .mfi + mov GR_ExpOf2 = 0x10000 + fcmp.lt.s1 p14,p15 = f8,f0 // p14 if x<0 + dep.z GR_Ind = GR_SignExp,8,4 +} +{ .mfi + and GR_Exp = GR_SignExp,GR_ExpMask + fma.s1 FR_2 = f1,f1,f1 + cmp.lt p10,p0 = GR_SignExp,GR_ExpBias +};; +{ .mfi + add GR_ad_1 = 0xB80,GR_ad_Data + fnorm.s1 FR_NormX = f8 + shr.u GR_Arg = GR_ArgAsIs,48 +} +{ .mib + add GR_ad_Co = GR_Ind,GR_ad_Data + add GR_ad_Ce = 0x10,GR_ad_Data + // jump if the input argument is NaTVal, NaN, +/-0, +/-INF or +/-deno +(p13) br.cond.spnt lgamma_spec +};; +lgamma_common: +{ .mfi + ldfpd FR_LocalMin,FR_05 = [GR_ad_1],16 + fmerge.se FR_x = f1,f8 + add GR_ad_2 = 0xBC0,GR_ad_Data +} +{ .mfb + add GR_ad_Ce = GR_Ind,GR_ad_Ce + fms.s1 FR_w = f8,f1,f1 // x-1 + // jump if the input argument is positive and less than 1.0 +(p10) br.cond.spnt lgamma_0_1 +};; +{ .mfi + ldfe FR_C01 = [GR_ad_Co],32 + fnma.s1 FR_InvX = FR_C,f8,f1 // NR iteration #1 +(p15) cmp.lt.unc p8,p0 = GR_ExpOf256,GR_SignExp +} +{ .mib + ldfe FR_C11 = [GR_ad_Ce],32 +(p15) cmp.lt.unc p11,p0 = GR_Arg,GR_2_25 + // jump if the input argument isn't less than 512.0 +(p8) br.cond.spnt lgamma_pstirling +};; +{ .mfi + ldfe FR_C21 = [GR_ad_Co],32 +(p14) fms.s1 FR_r = FR_C,f8,f1 // reduced arg for log(x) +(p14) cmp.lt.unc p0,p9 = GR_Exp,GR_ExpOf256 +} +{ .mib + ldfe FR_C31 = [GR_ad_Ce],32 + add GR_ad_Co7 = 0x12C0,GR_ad_2 + // jump if the input argument is from range [1.0; 2.25) +(p11) br.cond.spnt lgamma_1_2 +};; +{ .mfi + ldfe FR_C41 = [GR_ad_Co],32 + fcvt.xf FR_N = FR_int_N + add GR_ad_Ce7 = 0x1310,GR_ad_2 +} +{ .mfb + ldfe FR_C51 = [GR_ad_Ce],32 +(p14) fma.s1 FR_5 = FR_2,FR_2,f1 + // jump if the input argument is less or equal to -512.0 +(p9) br.cond.spnt lgamma_negstirling +};; +{ .mfi + ldfe FR_C61 = [GR_ad_Co],32 +(p14) fcvt.xf FR_Ntrunc = FR_int_Ntrunc + shr GR_Ind = GR_Ind,4 +} +{ .mfi + ldfe FR_C71 = [GR_ad_Ce],32 +(p14) fma.s1 FR_Xp1 = f1,f1,FR_NormX // x+1 + cmp.eq p6,p7 = GR_ExpOf2,GR_SignExp +};; +.pred.rel "mutex",p6,p7 +{ .mfi + ldfe FR_C81 = [GR_ad_Co],32 +(p6) fma.s1 FR_x = f0,f0,FR_NormX + shladd GR_Offs7 = GR_Ind,2,GR_Ind // (ind*16)*5 +} +{ .mfi + ldfe FR_C91 = [GR_ad_Ce],32 +(p7) fms.s1 FR_x = FR_x,f1,f1 + add GR_ad_Co7 = 0x800,GR_ad_Data +};; +{ .mfi + ldfe FR_CA1 = [GR_ad_Co],32 +(p14) fma.s1 FR_3 = f1,f1,FR_2 + shladd GR_Offs7 = GR_Ind,1,GR_Offs7 // (ind*16)*7 +} +{ .mfi + ldfe FR_C00 = [GR_ad_Ce],32 +(p14) fma.s1 FR_Xp4 = FR_2,FR_2,FR_NormX + add GR_ad_Ce7 = 0x810,GR_ad_Data +};; +{ .mfi + ldfe FR_C10 = [GR_ad_Co],32 +(p6) fms.s1 FR_Xm2 = FR_w,f1,f1 + add GR_ad_Co7 = GR_ad_Co7,GR_Offs7 +} +{ .mfi + ldfe FR_C20 = [GR_ad_Ce],32 +(p14) fma.s1 FR_r2 = FR_r,FR_r,f0 // log(x) + add GR_ad_Ce7 = GR_ad_Ce7,GR_Offs7 +};; +{ .mfi + ldfe FR_C30 = [GR_ad_Co],32 +(p14) fms.s1 FR_Xf = FR_NormX,f1,FR_N // xf = x - [x] +(p14) mov GR_Arg17 = 0xC031 // -17 +} +{ .mfi + ldfe FR_C40 = [GR_ad_Ce],32 +(p14) fma.s1 FR_Xp5 = FR_5,f1,FR_NormX +(p14) sub GR_Exp = GR_Exp,GR_ExpBias +};; +{ .mfi + ldfe FR_C50 = [GR_ad_Co7],32 +(p14) fms.s1 FR_Xfr = FR_Xp1,f1,FR_Ntrunc // xfr = (x+1) - [x] +(p14) cmp.lt.unc p13,p0 = GR_Arg,GR_Arg17 +} +{ .mfb + ldfe FR_C60 = [GR_ad_Ce7],32 +(p14) fma.s1 FR_Xp10 = FR_5,FR_2,FR_NormX + // jump if the input argument is negative and great than -17.0 +(p13) br.cond.spnt lgamma_negrecursion +};; +{ .mfi + ldfe FR_C70 = [GR_ad_Co7],32 + fma.s1 FR_C01 = FR_x,f1,FR_C01 +(p14) add GR_ad_Ce = 0x1310,GR_ad_2 +} +{ .mfi + ldfe FR_C80 = [GR_ad_Ce7],32 + fma.s1 FR_C11 = FR_x,f1,FR_C11 +(p14) add GR_ad_Co = 0x12C0,GR_ad_2 +};; +{ .mfi + ldfe FR_C90 = [GR_ad_Co7],32 + fma.s1 FR_C21 = FR_x,f1,FR_C21 + nop.i 0 +} +{ .mfi + ldfe FR_CA0 = [GR_ad_Ce7],32 + fma.s1 FR_C31 = FR_x,f1,FR_C31 + nop.i 0 +};; +{ .mfi + ldfe FR_CN = [GR_ad_Co7],32 + fma.s1 FR_C41 = FR_x,f1,FR_C41 + nop.i 0 +} +{ .mfi +(p14) ldfpd FR_P5,FR_P4 = [GR_ad_1],16 + fma.s1 FR_C51 = FR_x,f1,FR_C51 + nop.i 0 +};; +{ .mfi +(p14) ldfpd FR_P3,FR_P2 = [GR_ad_2],16 + fma.s1 FR_C61 = FR_x,f1,FR_C61 + nop.i 0 +} +{ .mfi +(p14) ldfe FR_Ln2 = [GR_ad_1] + fma.s1 FR_C71 = FR_x,f1,FR_C71 + nop.i 0 +};; +{ .mfi +(p14) ldfpd FR_S28,FR_S26 = [GR_ad_Co],16 + fma.s1 FR_C81 = FR_x,f1,FR_C81 + add GR_ad_2 = 0x60,GR_ad_2 +} +{ .mfi +(p14) ldfpd FR_S24,FR_S22 = [GR_ad_Ce],16 + fma.s1 FR_C91 = FR_x,f1,FR_C91 + nop.i 0 +};; +{ .mfi +(p14) ldfpd FR_S20,FR_S18 = [GR_ad_Co],16 + fma.s1 FR_CA1 = FR_x,f1,FR_CA1 + nop.i 0 +} +{ .mfi +(p14) ldfpd FR_S16,FR_S14 = [GR_ad_Ce],16 + fma.s1 FR_C01 = FR_C01,FR_x,FR_C00 + nop.i 0 +};; +{ .mfi +(p14) getf.exp GR_SignExp = FR_Xf + fma.s1 FR_C11 = FR_C11,FR_x,FR_C10 + nop.i 0 +} +{ .mfi +(p14) ldfe FR_S12 = [GR_ad_Co],16 + fma.s1 FR_C21 = FR_C21,FR_x,FR_C20 + nop.i 0 +};; +{ .mfi +(p14) getf.sig GR_Sig = FR_Xf +(p14) frcpa.s1 FR_InvXf,p0 = f1,FR_Xf + nop.i 0 +} +{ .mfi +(p14) ldfe FR_S10 = [GR_ad_Ce],16 + fma.s1 FR_C41 = FR_C41,FR_x,FR_C40 + nop.i 0 +};; +{ .mfi +(p14) ldfe FR_S8 = [GR_ad_Co],16 + fma.s1 FR_C51 = FR_C51,FR_x,FR_C50 + nop.i 0 +} +{ .mfi +(p14) ldfe FR_S6 = [GR_ad_Ce],16 + fma.s1 FR_C61 = FR_C61,FR_x,FR_C60 +(p14) and GR_Expf = GR_SignExp,GR_ExpMask +};; +{ .mfi +(p14) sub GR_Expf = GR_Expf,GR_ExpBias + fma.s1 FR_C71 = FR_C71,FR_x,FR_C70 +(p14) shl GR_Ind = GR_Sig,1 +} +{ .mfi +(p14) ldfe FR_S4 = [GR_ad_Co],16 + fma.s1 FR_C81 = FR_C81,FR_x,FR_C80 +(p14) cmp.eq.unc p8,p0 = 0,GR_Sig +};; +{ .mfi +(p14) setf.sig FR_int_Nf = GR_Expf + fma.s1 FR_C91 = FR_C91,FR_x,FR_C90 +(p14) shr.u GR_Ind = GR_Ind,56 +} +{ .mfb +(p14) ldfe FR_S2 = [GR_ad_Ce],16 + fma.s1 FR_CA1 = FR_CA1,FR_x,FR_CA0 + // jump if the input argument is integer number from range (-512.0;-17.0] +(p8) br.cond.spnt lgamma_singularity +};; +{ .mfi +(p14) getf.sig GR_Sig = FR_int_Ntrunc + fma.s1 FR_C01 = FR_C01,FR_C11,f0 + nop.i 0 +} +{ .mfi +(p14) shladd GR_ad_T = GR_Ind,4,GR_ad_2 + fma.s1 FR_C31 = FR_C31,FR_x,FR_C30 + nop.i 0 +};; +{ .mfi +(p14) ldfe FR_Tf = [GR_ad_T] +(p14) fms.s1 FR_rf = FR_InvXf,FR_Xf,f1 // reduced arg for log({x}) +(p14) extr.u GR_Ind = GR_ArgAsIs,44,8 +} +{ .mfi + // set p9 if signgum is 32-bit int + // set p10 if signgum is 64-bit int + cmp.eq p10,p9 = 8,r34 + fma.s1 FR_C21 = FR_C21,FR_C41,f0 + mov GR_SignOfGamma = 1 +};; +{ .mfi + nop.m 0 + fma.s1 FR_C51 = FR_C51,FR_C61,f0 +(p14) tbit.z.unc p8,p0 = GR_Sig,0 +} +{ .mfi +(p14) shladd GR_ad_T = GR_Ind,4,GR_ad_2 +(p6) fma.s1 FR_CN = FR_CN,FR_Xm2,f0 + nop.i 0 +};; +{ .mfi +(p14) setf.sig FR_int_N = GR_Exp + fma.s1 FR_C71 = FR_C71,FR_C81,f0 +(p8) sub GR_SignOfGamma = r0,GR_SignOfGamma +} +{ .mfi + nop.m 0 +(p14) fma.s1 FR_Xf2 = FR_Xf,FR_Xf,f0 + nop.i 0 +};; +{ .mfi +(p14) ldfe FR_T = [GR_ad_T] + fma.s1 FR_C91 = FR_C91,FR_CA1,f0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p14) fma.s1 FR_r2 = FR_r,FR_r,f0 + nop.i 0 +};; +.pred.rel "mutex",p9,p10 +{ .mfi + // store sign of gamma(x) as 32-bit int +(p9) st4 [r33] = GR_SignOfGamma + fma.s1 FR_C01 = FR_C01,FR_C31,f0 + nop.i 0 +} +{ .mfi + // store sign of gamma(x) as 64-bit int +(p10) st8 [r33] = GR_SignOfGamma +(p14) fma.s1 FR_P54 = FR_P5,FR_r,FR_P4 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p14) fma.s1 FR_P32 = FR_P3,FR_r,FR_P2 + nop.i 0 +} +{ .mfb + nop.m 0 +(p14) fma.s1 FR_P54f = FR_P5,FR_rf,FR_P4 + // jump if the input argument is non-integer from range (-512.0;-17.0] +(p14) br.cond.spnt lgamma_negpoly +};; +{ .mfi + nop.m 0 + fma.s1 FR_C21 = FR_C21,FR_C51,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_C71 = FR_C71,FR_C91,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_CN = FR_C01,FR_CN,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_C21 = FR_C21,FR_C71,f0 + nop.i 0 +};; +{ .mfb + nop.m 0 + fma.d.s0 f8 = FR_C21,FR_CN,f0 + br.ret.sptk b0 // exit for arguments from range [2.25; 512.0) +};; +// branch for calculating of ln(GAMMA(x)) for -512 < x < -17 +//--------------------------------------------------------------------- +.align 32 +lgamma_negpoly: +{ .mfi + nop.m 0 + fma.s1 FR_Xf4 = FR_Xf2,FR_Xf2,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_S28 = FR_S28,FR_Xf2,FR_S26 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_S24 = FR_S24,FR_Xf2,FR_S22 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_S20 = FR_S20,FR_Xf2,FR_S18 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_S16 = FR_S16,FR_Xf2,FR_S14 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_S12 = FR_S12,FR_Xf2,FR_S10 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_S8 = FR_S8,FR_Xf2,FR_S6 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_S4 = FR_S4,FR_Xf2,FR_S2 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_rf2 = FR_rf,FR_rf,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_P32f = FR_P3,FR_rf,FR_P2 // log(x) + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_r3 = FR_r2,FR_r,f0 // log(x) + nop.i 0 +} +{ .mfi + nop.m 0 + fcvt.xf FR_Nf = FR_int_Nf // log({x}) + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_S28 = FR_S28,FR_Xf4,FR_S24 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_Xf8 = FR_Xf4,FR_Xf4,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_S20 = FR_S20,FR_Xf4,FR_S16 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_C21 = FR_C21,FR_C51,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_S12 = FR_S12,FR_Xf4,FR_S8 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_C71 = FR_C71,FR_C91,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fnma.s1 FR_P10 = FR_r2,FR_05,FR_r // log(x) + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_P54 = FR_P54,FR_r2,FR_P32 // log(x) + nop.i 0 +};; +{ .mfi + nop.m 0 + fnma.s1 FR_P10f = FR_rf2,FR_05,FR_rf // log({x}) + nop.i 0 +} +{ .mfi + nop.m 0 + fcvt.xf FR_N = FR_int_N // log(x) + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_rf3 = FR_rf2,FR_rf,f0 // log({x}) + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_P54f = FR_P54f,FR_rf2,FR_P32f // log({x}) + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_S28 = FR_S28,FR_Xf8,FR_S20 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_TpNxLn2f = FR_Nf,FR_Ln2,FR_Tf // log({x}) + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_CN = FR_C01,FR_CN,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_C21 = FR_C21,FR_C71,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_P54 = FR_P54,FR_r3,FR_P10 // log(x) + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_TpNxLn2 = FR_N,FR_Ln2,FR_T // log(x) + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_P54f = FR_P54f,FR_rf3,FR_P10f // log({x}) + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_S28 = FR_S28,FR_Xf8,FR_S12 + nop.i 0 +};; +{ .mfi + nop.m 0 + fnma.s1 FR_C21 = FR_C21,FR_CN,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_LnX = FR_TpNxLn2,f1,FR_P54 // log(x) + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_LnXf = FR_TpNxLn2f,f1,FR_P54f // log({x}) + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_S28 = FR_S28,FR_Xf4,FR_S4 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_LnX = FR_LnX,f1,FR_LnXf + nop.i 0 +};; +{ .mfi + nop.m 0 + fnma.s1 FR_S28 = FR_S28,FR_Xf2,FR_C21 + nop.i 0 +};; +{ .mfb + nop.m 0 + fms.d.s0 f8 = FR_S28,f1,FR_LnX + br.ret.sptk b0 +};; +// branch for calculating of ln(GAMMA(x)) for x >= 512 +//--------------------------------------------------------------------- +.align 32 +lgamma_pstirling: +{ .mfi + ldfpd FR_P5,FR_P4 = [GR_ad_1],16 + nop.f 0 + and GR_Exp = GR_SignExp,GR_ExpMask +} +{ .mfi + ldfpd FR_P3,FR_P2 = [GR_ad_2],16 + fma.s1 FR_InvX = FR_C,FR_InvX,FR_C // NR iteration #1 + mov GR_ExpBias = 0xffff +};; +{ .mfi + ldfe FR_Ln2 = [GR_ad_1],16 + nop.f 0 + sub GR_Exp = GR_Exp,GR_ExpBias +};; +{ .mfi + ldfpd FR_W4,FR_OvfBound = [GR_ad_2],16 + nop.f 0 + nop.i 0 +};; +{ .mfi + setf.sig FR_int_N = GR_Exp + fms.s1 FR_r = FR_C,f8,f1 + nop.i 0 +};; +{ .mmf + getf.sig GR_Sig = FR_NormX + ldfe FR_LnSqrt2Pi = [GR_ad_1],16 + nop.f 0 +};; +{ .mmf + ldfe FR_W2 = [GR_ad_2],16 + nop.m 0 + fnma.s1 FR_InvX2 = FR_InvX,FR_NormX,f1 // NR iteration #2 +};; +{ .mfi + add GR_ad_2 = 0x40,GR_ad_2 + nop.f 0 + shl GR_Ind = GR_Sig,1 +};; +{ .mfi + mov GR_SignOfGamma = 1 + nop.f 0 + shr.u GR_Ind = GR_Ind,56 +};; +{ .mfi + shladd GR_ad_2 = GR_Ind,4,GR_ad_2 + fma.s1 FR_r2 = FR_r,FR_r,f0 + // set p9 if signgum is 32-bit int + // set p10 if signgum is 64-bit int + cmp.eq p10,p9 = 8,r34 +};; +{ .mfi + ldfe FR_T = [GR_ad_2] + fma.s1 FR_P54 = FR_P5,FR_r,FR_P4 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_P32 = FR_P3,FR_r,FR_P2 + nop.i 0 +};; +{ .mfi + nop.m 0 + fcmp.le.s1 p6,p0 = FR_OvfBound,FR_NormX + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_InvX2 = FR_InvX,FR_InvX2,FR_InvX // NR iteration #2 + nop.i 0 +};; +{ .mfi + nop.m 0 + fcvt.xf FR_N = FR_int_N + nop.i 0 +} +{ .mfb + nop.m 0 + nop.f 0 + // jump if x is great than OVERFLOW_BOUNDARY +(p6) br.cond.spnt lgamma_overflow +};; +.pred.rel "mutex",p9,p10 +{ .mfi + // store sign of gamma(x) as 32-bit int +(p9) st4 [r33] = GR_SignOfGamma + fma.s1 FR_r3 = FR_r2,FR_r,f0 + nop.i 0 +} +{ .mfi + // store sign of gamma(x) as 64-bit int +(p10) st8 [r33] = GR_SignOfGamma + fnma.s1 FR_P10 = FR_r2,FR_05,FR_r + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_P54 = FR_P54,FR_r2,FR_P32 + nop.i 0 +};; +{ .mfi + nop.m 0 + fnma.s1 FR_InvX = FR_InvX2,FR_NormX,f1 // NR iteration #3 + nop.i 0 +};; +{ .mfi + nop.m 0 + fms.s1 FR_Xm05 = FR_NormX,f1,FR_05 // (x-1/2) + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_TpNxLn2 = FR_N,FR_Ln2,FR_T + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_P54 = FR_P54,FR_r3,FR_P10 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_InvX = FR_InvX2,FR_InvX,FR_InvX2 // NR iteration #3 + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 FR_LnSqrt2Pi = FR_LnSqrt2Pi,f1,FR_NormX // ln(sqrt(2*Pi))-x + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_LnX = FR_TpNxLn2,f1,FR_P54 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_InvX2 = FR_InvX,FR_InvX,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + // (x-1/2)*ln(x)+ln(sqrt(2*Pi))-x + fma.s1 FR_LnX = FR_LnX,FR_Xm05,FR_LnSqrt2Pi + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_W2 = FR_W4,FR_InvX2,FR_W2 // W2 + W4/x^2 + nop.i 0 +};; +{ .mfb + nop.m 0 + fma.d.s0 f8 = FR_InvX,FR_W2,FR_LnX + br.ret.sptk b0 +};; +// branch for calculating of ln(GAMMA(x)) for x < -512 +//--------------------------------------------------------------------- +.align 32 +lgamma_negstirling: +{ .mfi + ldfpd FR_P5,FR_P4 = [GR_ad_1],16 + fms.s1 FR_Xf = FR_NormX,f1,FR_N // xf = x - [x] + and GR_Exp = GR_SignExp,GR_ExpMask +} +{ .mfi + ldfpd FR_P3,FR_P2 = [GR_ad_2],16 + fma.s1 FR_InvX = FR_C,FR_InvX,FR_C // NR iteration #1 + mov GR_0x30033 = 0x30033 +};; +{ .mfi + ldfe FR_Ln2 = [GR_ad_1],16 + nop.f 0 + extr.u GR_Ind = GR_ArgAsIs,44,8 +} +{ .mib + ldfd FR_W4 = [GR_ad_2],16 + // jump if x is less or equal to -2^52, i.e. x is big negative integer + cmp.leu.unc p7,p0 = GR_0x30033,GR_SignExp +(p7) br.cond.spnt lgamma_singularity +};; +{ .mfi + ldfpd FR_S28,FR_S26 = [GR_ad_Co7],16 + nop.f 0 + add GR_ad_LnT = 0x50,GR_ad_2 +} +{ .mfi + ldfpd FR_S24,FR_S22 = [GR_ad_Ce7],16 + nop.f 0 + mov GR_ExpBias = 0xffff +};; +{ .mfi + ldfpd FR_S20,FR_S18 = [GR_ad_Co7],16 + nop.f 0 + shladd GR_ad_T = GR_Ind,4,GR_ad_LnT +} +{ .mfi + ldfpd FR_S16,FR_S14 = [GR_ad_Ce7],16 + nop.f 0 + sub GR_Exp = GR_Exp,GR_ExpBias +};; +{ .mfi + ldfe FR_S12 = [GR_ad_Co7],16 + nop.f 0 + nop.i 0 +} +{ .mfi + ldfe FR_S10 = [GR_ad_Ce7],16 + fms.s1 FR_r = FR_C,f8,f1 + nop.i 0 +};; +{ .mmf + ldfe FR_S8 = [GR_ad_Co7],16 + ldfe FR_S6 = [GR_ad_Ce7],16 + nop.f 0 +};; +{ .mfi + ldfe FR_S4 = [GR_ad_Co7],16 + fma.s1 FR_Xf2 = FR_Xf,FR_Xf,f0 + nop.i 0 +} +{ .mfi + ldfe FR_S2 = [GR_ad_Ce7],16 + fnma.s1 FR_InvX2 = FR_InvX,FR_NormX,f1 // NR iteration #2 + nop.i 0 +};; +{ .mfi + setf.sig FR_int_N = GR_Exp + frcpa.s1 FR_InvXf,p9 = f1,FR_Xf // 1/xf + nop.i 0 +} +{ .mfi + ldfe FR_LnSqrt2Pi = [GR_ad_1],16 + nop.f 0 + nop.i 0 +};; +{ .mfi + getf.exp GR_SignExp = FR_Xf + nop.f 0 + nop.i 0 +} +{ .mfi + ldfe FR_W2 = [GR_ad_2],16 + nop.f 0 + nop.i 0 +};; +{ .mfi + getf.sig GR_Sig = FR_Xf + fma.s1 FR_P54 = FR_P5,FR_r,FR_P4 + nop.i 0 +} +{ .mfi + ldfe FR_T = [GR_ad_T] + fma.s1 FR_P32 = FR_P3,FR_r,FR_P2 + nop.i 0 +};; +{ .mfi + and GR_Exp = GR_SignExp,GR_ExpMask + fma.s1 FR_r2 = FR_r,FR_r,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 FR_Xm05 = FR_NormX,f1,FR_05 // (x-1/2) + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_InvX2 = FR_InvX,FR_InvX2,FR_InvX // NR iteration #2 + extr.u GR_Ind = GR_Sig,55,8 +} +{ .mfi + sub GR_Exp = GR_Exp,GR_ExpBias + fma.s1 FR_Xf4 = FR_Xf2,FR_Xf2,f0 + cmp.eq p6,p0 = 0,GR_Sig +};; +{ .mfi + setf.sig FR_int_Nf = GR_Exp + fma.s1 FR_S28 = FR_S28,FR_Xf2,FR_S26 + shladd GR_ad_T = GR_Ind,4,GR_ad_LnT +} +{ .mfb + nop.m 0 + fma.s1 FR_S24 = FR_S24,FR_Xf2,FR_S22 + // jump if the input argument is integer number from range (-512.0;-17.0] +(p6) br.cond.spnt lgamma_singularity +};; +{ .mfi + getf.sig GR_Sig = FR_int_Ntrunc + fma.s1 FR_S20 = FR_S20,FR_Xf2,FR_S18 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_S16 = FR_S16,FR_Xf2,FR_S14 + nop.i 0 +};; +{ .mfi + ldfe FR_Tf = [GR_ad_T] + fma.s1 FR_S12 = FR_S12,FR_Xf2,FR_S10 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_S8 = FR_S8,FR_Xf2,FR_S6 + mov GR_SignOfGamma = 1 +};; +{ .mfi + nop.m 0 + fms.s1 FR_rf = FR_InvXf,FR_Xf,f1 // reduced arg rf + tbit.z p8,p0 = GR_Sig,0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r3 = FR_r2,FR_r,f0 + // set p9 if signgum is 32-bit int + // set p10 if signgum is 64-bit int + cmp.eq p10,p9 = 8,r34 +};; +{ .mfi + nop.m 0 + fcvt.xf FR_N = FR_int_N +(p8) sub GR_SignOfGamma = r0,GR_SignOfGamma +} +{ .mfi + nop.m 0 + fnma.s1 FR_InvX = FR_InvX2,FR_NormX,f1 // NR iteration #3 + nop.i 0 +};; +.pred.rel "mutex",p9,p10 +{ .mfi + // store sign of gamma(x) as 32-bit int +(p9) st4 [r33] = GR_SignOfGamma + fma.s1 FR_P54 = FR_P54,FR_r2,FR_P32 + nop.i 0 +} +{ .mfi + // store sign of gamma(x) as 64-bit int +(p10) st8 [r33] = GR_SignOfGamma + fnma.s1 FR_P10 = FR_r2,FR_05,FR_r + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_Xf8 = FR_Xf4,FR_Xf4,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_S28 = FR_S28,FR_Xf4,FR_S24 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_S20 = FR_S20,FR_Xf4,FR_S16 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_S12 = FR_S12,FR_Xf4,FR_S8 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_rf2 = FR_rf,FR_rf,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_P54f = FR_P5,FR_rf,FR_P4 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_P32f = FR_P3,FR_rf,FR_P2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_InvX = FR_InvX2,FR_InvX,FR_InvX2 // NR iteration #3 + nop.i 0 +};; +{ .mfi + nop.m 0 + fcvt.xf FR_Nf = FR_int_Nf + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_LnSqrt2Pi = FR_NormX,f1,FR_LnSqrt2Pi // x+ln(sqrt(2*Pi)) + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_P54 = FR_P54,FR_r3,FR_P10 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_S28 = FR_S28,FR_Xf8,FR_S20 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_rf3 = FR_rf2,FR_rf,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 FR_P10f = FR_rf2,FR_05,FR_rf + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_TpNxLn2 = FR_N,FR_Ln2,FR_T + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_P54f = FR_P54f,FR_rf2,FR_P32f + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_InvX2 = FR_InvX,FR_InvX,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_S28 = FR_S28,FR_Xf8,FR_S12 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_S4 = FR_S4,FR_Xf2,FR_S2 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_P54f = FR_P54f,FR_rf3,FR_P10f + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_TpNxLn2f = FR_Nf,FR_Ln2,FR_Tf + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_LnX = FR_TpNxLn2,f1,FR_P54 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_W2 = FR_W4,FR_InvX2,FR_W2 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_S28 = FR_S28,FR_Xf4,FR_S4 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_LnXf = FR_TpNxLn2f,f1,FR_P54f + nop.i 0 +};; +{ .mfi + nop.m 0 + fms.s1 FR_LnX = FR_LnX,FR_Xm05,FR_LnSqrt2Pi + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_LnX = FR_InvX,FR_W2,FR_LnX + nop.i 0 +};; +{ .mfi + nop.m 0 + fnma.s1 FR_LnX = FR_S28,FR_Xf2,FR_LnX + nop.i 0 +};; +{ .mfb + nop.m 0 + fms.d.s0 f8 = FR_LnX,f1,FR_LnXf + br.ret.sptk b0 +};; +// branch for calculating of ln(GAMMA(x)) for 0 <= x < 1 +//--------------------------------------------------------------------- +.align 32 +lgamma_0_1: +{ .mfi + ldfpd FR_P5,FR_P4 = [GR_ad_1],16 + fms.s1 FR_x = FR_NormX,f1,f0 // x + mov GR_Arg025 = 0x3FD0 +} +{ .mfi + ldfpd FR_P3,FR_P2 = [GR_ad_2],16 + nop.f 0 + add GR_ad_Co = 0x1C40,GR_ad_Data +};; +{ .mfi + ldfe FR_Ln2 = [GR_ad_1],0x50 + nop.f 0 + // p6 if arg < 0.25 + cmp.lt p6,p9 = GR_Arg,GR_Arg025 +} +{ .mfi + add GR_ad_2 = 0x40,GR_ad_2 + nop.f 0 + mov GR_Arg075 = 0x3FE8 +};; +{ .mfi + ldfpd FR_Q8,FR_Q7 = [GR_ad_1],16 + fma.s1 FR_w2 = FR_w,FR_w,f0 + // p7 if 0.25 <= arg < 0.75 + // p8 if 0.75 <= arg < 1.0 +(p9) cmp.lt.unc p7,p8 = GR_Arg,GR_Arg075 +} +{ .mfi + mov GR_Arg0875 = 0x3FEC + nop.f 0 + sub GR_Exp = GR_Exp,GR_ExpBias +};; +{ .mfi + ldfpd FR_Q6,FR_Q5 = [GR_ad_2],16 + nop.f 0 +(p8) cmp.lt p9,p0 = GR_Arg,GR_Arg0875 +} +{ .mfi + ldfpd FR_Q4,FR_Q3 = [GR_ad_1],16 + nop.f 0 + add GR_ad_Ce = 0x60,GR_ad_Co +};; +.pred.rel "mutex",p7,p8 +{ .mfi + ldfd FR_Q2 = [GR_ad_2],16 + fms.s1 FR_r = FR_C,f8,f1 +(p7) mov GR_Offs = 0xC0 +} +{ .mfi + setf.sig FR_int_N = GR_Exp + nop.f 0 +(p8) mov GR_Offs = 0x180 +};; +.pred.rel "mutex",p6,p7 +{ .mfi +(p9) add GR_ad_Co = GR_Offs,GR_ad_Co +(p8) fms.s1 FR_x = FR_NormX,f1,f1 // x-1 + nop.i 0 +} +{ .mfi +(p9) add GR_ad_Ce = GR_Offs,GR_ad_Ce +(p7) fms.s1 FR_x = FR_NormX,f1,FR_LocalMin // x-LocalMin + cmp.lt p10,p0 = GR_Arg,GR_Arg0875 +};; +lgamma_common_0_2: +{ .mfi + ldfpd FR_A17,FR_A16 = [GR_ad_Co],16 + nop.f 0 + nop.i 0 +} +{ .mfi + ldfpd FR_A15,FR_A14 = [GR_ad_Ce],16 + nop.f 0 + nop.i 0 +};; +{ .mfi + ldfpd FR_A13,FR_A12 = [GR_ad_Co],16 + nop.f 0 +(p10) extr.u GR_Ind = GR_ArgAsIs,44,8 +} +{ .mfi + ldfpd FR_A11,FR_A10 = [GR_ad_Ce],16 + nop.f 0 + nop.i 0 +};; +{ .mfi + ldfpd FR_A9,FR_A8 = [GR_ad_Co],16 +(p10) fnma.s1 FR_Q1 = FR_05,FR_w2,FR_w + nop.i 0 +} +{ .mfi + ldfpd FR_A7,FR_A6 = [GR_ad_Ce],16 +(p10) fma.s1 FR_w3 = FR_w2,FR_w,f0 + nop.i 0 +};; +{ .mfi +(p10) getf.exp GR_SignExp_w = FR_w +(p10) fma.s1 FR_w4 = FR_w2,FR_w2,f0 + nop.i 0 +} +{ .mfi +(p10) shladd GR_ad_2 = GR_Ind,4,GR_ad_2 +(p10) fma.s1 FR_r2 = FR_r,FR_r,f0 + nop.i 0 +};; +{ .mfi +(p10) ldfe FR_T = [GR_ad_2] +(p10) fma.s1 FR_P54 = FR_P5,FR_r,FR_P4 + nop.i 0 +} +{ .mfi + ldfe FR_A5 = [GR_ad_Co],16 +(p10) fma.s1 FR_P32 = FR_P3,FR_r,FR_P2 + nop.i 0 +};; +{ .mfi + ldfe FR_A4 = [GR_ad_Ce],16 + fma.s1 FR_x2 = FR_x,FR_x,f0 +(p10) and GR_Exp_w = GR_ExpMask, GR_SignExp_w +} +{ .mfi + ldfe FR_A3 = [GR_ad_Co],16 + nop.f 0 +(p10) mov GR_fff9 = 0xfff9 +};; +// p13 <== large w __libm_lgamma +// p14 <== small w __libm_lgamma +{ .mfi + ldfe FR_A2 = [GR_ad_Ce],16 +(p10) fma.s1 FR_Q8 = FR_Q8,FR_w,FR_Q7 +(p10) cmp.ge.unc p13,p14 = GR_Exp_w,GR_fff9 +} +{ .mfi + ldfe FR_A1 = [GR_ad_Co],16 +(p10) fma.s1 FR_Q6 = FR_Q6,FR_w,FR_Q5 + nop.i 0 +};; +{ .mfi + ldfe FR_A0 = [GR_ad_Ce],16 +(p10) fma.s1 FR_Q4 = FR_Q4,FR_w,FR_Q3 + nop.i 0 +} +{ .mfi + nop.m 0 +(p10) fma.s1 FR_Q2 = FR_Q2,FR_w3,FR_Q1 + nop.i 0 +};; +{ .mfi + // set p11 if signgum is 32-bit int + // set p12 if signgum is 64-bit int + cmp.eq p12,p11 = 8,r34 +(p10) fma.s1 FR_r3 = FR_r2,FR_r,f0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p10) fnma.s1 FR_P10 = FR_r2,FR_05,FR_r + mov GR_SignOfGamma = 1 +};; +.pred.rel "mutex",p11,p12 +{ .mfi + // store sign of gamma(x) as 32-bit int +(p11) st4 [r33] = GR_SignOfGamma + fma.s1 FR_A17 = FR_A17,FR_x,FR_A16 + nop.i 0 +} +{ .mfi + // store sign of gamma(x) as 64-bit int +(p12) st8 [r33] = GR_SignOfGamma + fma.s1 FR_A15 = FR_A15,FR_x,FR_A14 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p10) fcvt.xf FR_N = FR_int_N + nop.i 0 +} +{ .mfi + nop.m 0 +(p10) fma.s1 FR_P54 = FR_P54,FR_r2,FR_P32 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A13 = FR_A13,FR_x,FR_A12 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_A11 = FR_A11,FR_x,FR_A10 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A9 = FR_A9,FR_x,FR_A8 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_A7 = FR_A7,FR_x,FR_A6 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p10) fma.s1 FR_Qlo = FR_Q8,FR_w2,FR_Q6 + nop.i 0 +} +{ .mfi + nop.m 0 +(p10) fma.s1 FR_w6 = FR_w3,FR_w3,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p10) fma.s1 FR_Qhi = FR_Q4,FR_w4,FR_Q2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_A5 = FR_A5,FR_x,FR_A4 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p10) fma.s1 FR_TpNxLn2 = FR_N,FR_Ln2,FR_T + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_A3 = FR_A3,FR_x,FR_A2 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p10) fma.s1 FR_P54 = FR_P54,FR_r3,FR_P10 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_A1 = FR_A1,FR_x,FR_A0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A17 = FR_A17,FR_x2,FR_A15 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_A13 = FR_A13,FR_x2,FR_A11 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A9 = FR_A9,FR_x2,FR_A7 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_x4 = FR_x2,FR_x2,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p14) fma.s1 FR_LnX = FR_Qlo,FR_w6,FR_Qhi + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A5 = FR_A5,FR_x2,FR_A3 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p13) fma.s1 FR_LnX = FR_TpNxLn2,f1,FR_P54 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A17 = FR_A17,FR_x4,FR_A13 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_x8 = FR_x4,FR_x4,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A9 = FR_A9,FR_x4,FR_A5 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A17 = FR_A17,FR_x8,FR_A9 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p10) fms.s1 FR_A1 = FR_A1,f1,FR_LnX + nop.i 0 +};; +{ .mfb + nop.m 0 + fma.d.s0 f8 = FR_A17,FR_x2,FR_A1 + br.ret.sptk b0 +};; +// branch for calculating of ln(GAMMA(x)) for 1.0 <= x < 2.25 +//--------------------------------------------------------------------- +.align 32 +lgamma_1_2: +{ .mfi + add GR_ad_Co = 0x10B0,GR_ad_1 + fcmp.eq.s1 p12,p0 = f1,FR_w + mov GR_Arg125 = 0x3FF4 +} +{ .mfi + add GR_ad_Ce = 0x1110,GR_ad_1 + nop.f 0 + mov GR_Arg175 = 0x3FFC +};; +{ .mfi + mov GR_SignOfGamma = 1 + fcmp.eq.s1 p13,p0 = f1,FR_NormX + cmp.lt p6,p9 = GR_Arg,GR_Arg125 // 1.0 <= x < 1.25 +} +{ .mfi + // set p10 if signgum is 32-bit int + // set p11 if signgum is 64-bit int + cmp.eq p11,p10 = 8,r34 + nop.f 0 + cmp.ge p8,p0 = GR_Arg,GR_Arg175 // x >= 1.75 +};; +.pred.rel "mutex",p10,p11 +{ .mfi + // store sign of gamma(x) as 32-bit int +(p10) st4 [r33] = GR_SignOfGamma +(p12) fma.d.s0 f8 = f0,f0,f0 +(p9) cmp.lt.unc p7,p0 = GR_Arg,GR_Arg175 // 1.25 <= x < 1.75 +} +{ .mib + // store sign of gamma(x) as 64-bit int +(p11) st8 [r33] = GR_SignOfGamma + mov GR_Offs = 0 +(p12) br.ret.spnt b0 // fast exit for 2.0 +};; +.pred.rel "mutex",p7,p8 +{ .mfi +(p7) mov GR_Offs = 0xC0 +(p7) fms.s1 FR_x = FR_w,f1,FR_LocalMin + nop.i 0 +} +{ .mfb +(p8) mov GR_Offs = 0x180 +(p13) fma.d.s0 f8 = f0,f0,f0 +(p13) br.ret.spnt b0 // fast exit for 1.0 +};; +.pred.rel "mutex",p6,p8 +{ .mfi + add GR_ad_Co = GR_ad_Co,GR_Offs +(p8) fms.s1 FR_x = FR_w,f1,f1 + cmp.eq p0,p10 = r0,r0 +} +{ .mfb + add GR_ad_Ce = GR_ad_Ce,GR_Offs +(p6) fma.s1 FR_x = f0,f0,FR_w + br.cond.sptk lgamma_common_0_2 +};; +// branch for calculating of ln(GAMMA(x)) for -17 < x < 0 +//--------------------------------------------------------------------- +.align 32 +lgamma_negrecursion: +{ .mfi + getf.d GR_ArgXfrAsIs = FR_Xfr + fma.s1 FR_Xp2 = FR_2,f1,FR_NormX + mov GR_Arg05 = 0x3FE +} +{ .mfi + add GR_ad_Roots = 0x1390,GR_ad_1 + fma.s1 FR_NormX = FR_NormX,FR_Xfr,f0 + mov GR_Arg075 = 0x3FE8 +};; +{ .mfi + getf.sig GR_Sig = FR_int_Ntrunc + fma.s1 FR_Xp3 = FR_2,f1,FR_Xp1 + shl GR_Arg05 = GR_Arg05,52 +} +{ .mfi + mov GR_Arg025 = 0x3FD0 + fma.s1 FR_Xp6 = FR_5,f1,FR_Xp1 + add GR_ad_Co = 0x1C40,GR_ad_Data +};; +{ .mfi + add GR_ad_Dx = 8,GR_ad_Roots + fma.s1 FR_Xp7 = FR_2,f1,FR_Xp5 + shr.u GR_ArgXfr = GR_ArgXfrAsIs,48 +} +{ .mfi + add GR_ad_Ce = 0x60,GR_ad_Co + fma.s1 FR_Xp8 = FR_3,f1,FR_Xp5 + cmp.lt p6,p0 = GR_ArgXfrAsIs,GR_Arg05 +};; +{ .mfi + and GR_RootInd = 0xF,GR_Sig + fma.s1 FR_Xp9 = FR_2,FR_2,FR_Xp5 + // p10 if arg < 0.25 + cmp.lt p10,p14 = GR_ArgXfr,GR_Arg025 +} +{ .mfi +(p6) add GR_ad_Roots = 0x120,GR_ad_Roots + fma.s1 FR_Xp11 = f1,f1,FR_Xp10 +(p6) add GR_ad_Dx = 0x120,GR_ad_Dx +};; +{ .mfi + shladd GR_ad_Root = GR_RootInd,4,GR_ad_Roots + fma.s1 FR_Xp12 = FR_2,f1,FR_Xp10 + // p11 if 0.25 <= arg < 0.75 + // p12 if 0.75 <= arg < 1.0 +(p14) cmp.lt.unc p11,p12 = GR_ArgXfr,GR_Arg075 +} +{ .mfi + shladd GR_ad_Dx = GR_RootInd,4,GR_ad_Dx + fma.s1 FR_Xp13 = FR_3,f1,FR_Xp10 + cmp.eq p0,p13 = 0,GR_Sig +};; +{ .mfi + ld8 GR_Root = [GR_ad_Root] + fma.s1 FR_Xp14 = FR_2,FR_2,FR_Xp10 +(p12) mov GR_Offs = 0x180 +} +{ .mfi + ldfd FR_Root = [GR_ad_Root] + fma.s1 FR_Xp15 = FR_5,f1,FR_Xp10 + and GR_Sig = 0xF,GR_Sig +};; +{ .mfi + ld8 GR_Dx = [GR_ad_Dx] + fma.s1 FR_Xp16 = FR_3,FR_2,FR_Xp10 +(p13) cmp.ge.unc p6,p0 = 0xD,GR_Sig +} +{ .mfi +(p11) mov GR_Offs = 0xC0 +(p13) fma.s1 FR_NormX = FR_NormX,FR_Xp1,f0 +(p13) cmp.ge.unc p7,p0 = 0xB,GR_Sig +};; +{ .mfi +(p14) add GR_ad_Co = GR_Offs,GR_ad_Co +(p6) fma.s1 FR_Xp2 = FR_Xp2,FR_Xp3,f0 +(p13) cmp.ge.unc p8,p0 = 0x9,GR_Sig +} +{ .mfi +(p14) add GR_ad_Ce = GR_Offs,GR_ad_Ce +(p7) fma.s1 FR_Xp4 = FR_Xp4,FR_Xp5,f0 +(p13) cmp.ge.unc p9,p0 = 0x7,GR_Sig +};; +{ .mfi + ldfpd FR_B17,FR_B16 = [GR_ad_Co],16 +(p8) fma.s1 FR_Xp6 = FR_Xp6,FR_Xp7,f0 +(p13) cmp.ge.unc p6,p0 = 0x5,GR_Sig +} +{ .mfi + ldfpd FR_B15,FR_B14 = [GR_ad_Ce],16 +(p9) fma.s1 FR_Xp8 = FR_Xp8,FR_Xp9,f0 +(p13) cmp.ge.unc p7,p0 = 0x3,GR_Sig +};; +{ .mfi + ldfpd FR_B13,FR_B12 = [GR_ad_Co],16 +(p6) fma.s1 FR_Xp10 = FR_Xp10,FR_Xp11,f0 +(p13) cmp.ge.unc p8,p0 = 0x1,GR_Sig +} +{ .mfi + ldfpd FR_B11,FR_B10 = [GR_ad_Ce],16 +(p7) fma.s1 FR_Xp12 = FR_Xp12,FR_Xp13,f0 +(p13) cmp.eq.unc p9,p0 = 0,GR_Sig +};; +{ .mfi + ldfpd FR_B9,FR_B8 = [GR_ad_Co],16 +(p8) fma.s1 FR_Xp14 = FR_Xp14,FR_Xp15,f0 + mov GR_Arg15 = 0xC02E // -15 +} +{ .mfi + ldfpd FR_B7,FR_B6 = [GR_ad_Ce],16 + fcmp.eq.s1 p15,p0 = f0,FR_Xf +(p13) cmp.ge.unc p6,p0 = 0xC,GR_Sig +};; +{ .mfi + ldfe FR_B5 = [GR_ad_Co],16 +(p9) fma.s1 FR_NormX = FR_NormX,FR_Xp16,f0 + sub GR_Root = GR_ArgAsIs,GR_Root +} +{ .mfi + sub GR_RootInd = 0xE,GR_RootInd +(p11) fms.s1 FR_x = FR_Xfr,f1,FR_LocalMin // x-LocalMin +(p13) cmp.ge.unc p7,p0 = 0x8,GR_Sig +};; +.pred.rel "mutex",p10,p12 +{ .mfi + ldfe FR_B4 = [GR_ad_Ce],16 +(p10) fms.s1 FR_x = FR_Xfr,f1,f0 // x + add GR_Root = GR_Root,GR_Dx +} +{ .mfb + cmp.gtu p14,p0 = 0xE,GR_RootInd +(p12) fms.s1 FR_x = FR_Xfr,f1,f1 // x-1 +(p15) br.cond.spnt lgamma_singularity +};; +{ .mfi + ldfe FR_B3 = [GR_ad_Co],16 +(p6) fma.s1 FR_Xp2 = FR_Xp2,FR_Xp4,f0 +(p14) cmp.lt.unc p11,p0 = GR_Arg,GR_Arg15 +} +{ .mfi + ldfe FR_B2 = [GR_ad_Ce],16 +(p7) fma.s1 FR_Xp6 = FR_Xp6,FR_Xp8,f0 + add GR_2xDx = GR_Dx,GR_Dx +};; +{ .mfi + ldfe FR_B1 = [GR_ad_Co],16 + fms.s1 FR_r = f8,f1,FR_Root +(p13) cmp.ge.unc p6,p0 = 0x4,GR_Sig +} +{ .mib + ldfe FR_B0 = [GR_ad_Ce],16 +(p11) cmp.leu.unc p10,p0 = GR_Root,GR_2xDx +(p10) br.cond.spnt lgamma_negroots +};; +{ .mfi + ldfpd FR_P5,FR_P4 = [GR_ad_1],16 +(p6) fma.s1 FR_Xp10 = FR_Xp10,FR_Xp12,f0 + tbit.z p14,p15 = GR_Sig,0 +} +{ .mfi + ldfpd FR_P3,FR_P2 = [GR_ad_2],16 + fnma.d.s0 FR_T = f1,f1,f8 // nop.f 0 + +(p13) cmp.ge.unc p7,p0 = 0x2,GR_Sig +};; +{ .mfi + ldfe FR_Ln2 = [GR_ad_1],0x50 +(p7) fma.s1 FR_NormX = FR_NormX,FR_Xp14,f0 + mov GR_PseudoRoot = 0xBFFBC +} +{ .mlx + add GR_ad_2 = 0x40,GR_ad_2 + movl GR_2xDx = 0x00002346DC5D6389 +};; +{ .mfi + ldfpd FR_Q8,FR_Q7 = [GR_ad_1],16 + fma.s1 FR_x2 = FR_x,FR_x,f0 + shl GR_PseudoRoot = GR_PseudoRoot,44 +} +{ .mfi + ldfpd FR_Q6,FR_Q5 = [GR_ad_2],16 + fma.s1 FR_B17 = FR_B17,FR_x,FR_B16 +(p13) cmp.ge.unc p6,p0 = 0xA,GR_Sig +};; +{ .mfi + ldfpd FR_Q4,FR_Q3 = [GR_ad_1],16 +(p6) fma.s1 FR_Xp2 = FR_Xp2,FR_Xp6,f0 + sub GR_PseudoRoot = GR_ArgAsIs,GR_PseudoRoot +} +{ .mfi + ldfpd FR_Q2,FR_Q1 = [GR_ad_2],16 + fma.s1 FR_B15 = FR_B15,FR_x,FR_B14 +(p13) cmp.ge.unc p7,p0 = 0x6,GR_Sig +};; +{ .mfi + add GR_ad_Co = 0x12F0,GR_ad_2 + fma.s1 FR_B13 = FR_B13,FR_x,FR_B12 + cmp.leu.unc p10,p0 = GR_PseudoRoot,GR_2xDx +} +{ .mfi + add GR_ad_Ce = 0x1300,GR_ad_2 + fma.s1 FR_B11 = FR_B11,FR_x,FR_B10 + mov GR_ExpMask = 0x1ffff +};; +{ .mfi +(p10) ldfe FR_PR01 = [GR_ad_Co],0xF0 + fma.s1 FR_B9 = FR_B9,FR_x,FR_B8 + mov GR_ExpBias = 0xFFFF +} +{ .mfb +(p10) ldfe FR_PR11 = [GR_ad_Ce],0xF0 + fma.s1 FR_B7 = FR_B7,FR_x,FR_B6 +(p10) br.cond.spnt lgamma_pseudoroot +};; +{ .mfi +(p13) cmp.ge.unc p6,p0 = 0xE,GR_Sig +(p7) fma.s1 FR_NormX = FR_NormX,FR_Xp10,f0 + tbit.z.unc p8,p0 = GR_Sig,0 +} +{ .mfi + mov GR_SignOfGamma = 1 + fma.s1 FR_B5 = FR_B5,FR_x,FR_B4 + // set p9 if signgum is 32-bit int + // set p10 if signgum is 64-bit int + cmp.eq p10,p9 = 8,r34 +};; +{ .mfi + nop.m 0 + fma.s1 FR_B3 = FR_B3,FR_x,FR_B2 +(p8) sub GR_SignOfGamma = r0,GR_SignOfGamma +} +{ .mfi + nop.m 0 +(p14) fms.s1 FR_w = f0,f0,f1 + nop.i 0 +};; +.pred.rel "mutex",p9,p10 +{ .mfi + // store sign of gamma(x) as 32-bit int +(p9) st4 [r33] = GR_SignOfGamma + fma.s1 FR_B1 = FR_B1,FR_x,FR_B0 + nop.i 0 +} +{ .mfi + // store sign of gamma(x) as 64-bit int +(p10) st8 [r33] = GR_SignOfGamma + fma.s1 FR_B17 = FR_B17,FR_x2,FR_B15 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_B13 = FR_B13,FR_x2,FR_B11 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_B9 = FR_B9,FR_x2,FR_B7 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_x4 = FR_x2,FR_x2,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p6) fma.s1 FR_NormX = FR_NormX,FR_Xp2,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_B5 = FR_B5,FR_x2,FR_B3 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_B17 = FR_B17,FR_x4,FR_B13 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_x8 = FR_x4,FR_x4,f0 + nop.i 0 +};; +.pred.rel "mutex",p14,p15 +{ .mfi + nop.m 0 +(p15) fms.s1 FR_w = FR_NormX,f1,f1 + nop.i 0 +} +{ .mfi + nop.m 0 +(p14) fnma.s1 FR_w = FR_NormX,f1,FR_w + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_B9 = FR_B9,FR_x4,FR_B5 + nop.i 0 +};; +{ .mfi + nop.m 0 + frcpa.s1 FR_C,p0 = f1,FR_NormX + nop.i 0 +};; +{ .mfi + getf.exp GR_Exp = FR_NormX + nop.f 0 + nop.i 0 +};; +{ .mfi + getf.d GR_ArgAsIs = FR_NormX + nop.f 0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_w2 = FR_w,FR_w,f0 + nop.i 0 +} +{ .mfi + and GR_Exp = GR_Exp,GR_ExpMask + fma.s1 FR_Q8 = FR_Q8,FR_w,FR_Q7 + nop.i 0 +};; +{ .mfi + sub GR_Exp = GR_Exp,GR_ExpBias + fma.s1 FR_B17 = FR_B17,FR_x8,FR_B9 + extr.u GR_Ind = GR_ArgAsIs,44,8 +} +{ .mfi + nop.m 0 + fma.s1 FR_Q6 = FR_Q6,FR_w,FR_Q5 + nop.i 0 +};; +{ .mfi + setf.sig FR_int_N = GR_Exp + fms.s1 FR_r = FR_C,FR_NormX,f1 + nop.i 0 +} +{ .mfi + shladd GR_ad_2 = GR_Ind,4,GR_ad_2 + nop.f 0 + nop.i 0 +};; +{ .mfi + getf.exp GR_SignExp_w = FR_w + fma.s1 FR_Q4 = FR_Q4,FR_w,FR_Q3 + nop.i 0 +} +{ .mfi + ldfe FR_T = [GR_ad_2] + nop.f 0 + nop.i 0 +};; +{ .mfi + and GR_Exp_w = GR_ExpMask, GR_SignExp_w + fnma.s1 FR_Q1 = FR_05,FR_w2,FR_w + mov GR_fff9 = 0xfff9 +} +{ .mfi + nop.m 0 + fma.s1 FR_w3 = FR_w2,FR_w,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_w4 = FR_w2,FR_w2,f0 +// p13 <== large w __libm_lgamma +// p14 <== small w __libm_lgamma + cmp.ge p13,p14 = GR_Exp_w,GR_fff9 +} +{ .mfi + nop.m 0 + fma.s1 FR_Qlo = FR_Q8,FR_w2,FR_Q6 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p13) fma.s1 FR_r2 = FR_r,FR_r,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_B17 = FR_B17,FR_x2,FR_B1 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p13) fma.s1 FR_P32 = FR_P3,FR_r,FR_P2 + nop.i 0 +} +{ .mfi + nop.m 0 +(p13) fma.s1 FR_P54 = FR_P5,FR_r,FR_P4 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p14) fma.s1 FR_Q2 = FR_Q2,FR_w3,FR_Q1 + nop.i 0 +} +{ .mfi + nop.m 0 +(p14) fma.s1 FR_w6 = FR_w3,FR_w3,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p13) fcvt.xf FR_N = FR_int_N + nop.i 0 +};; +{ .mfi + nop.m 0 +(p13) fma.s1 FR_r3 = FR_r2,FR_r,f0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p13) fnma.s1 FR_P10 = FR_r2,FR_05,FR_r + nop.i 0 +};; +{ .mfi + nop.m 0 +(p13) fma.s1 FR_P54 = FR_P54,FR_r2,FR_P32 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p14) fma.s1 FR_Qhi = FR_Q4,FR_w4,FR_Q2 + nop.i 0 +} +{ .mfi + nop.m 0 +(p14) fnma.s1 FR_Qlo = FR_Qlo,FR_w6,FR_B17 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p13) fma.s1 FR_TpNxLn2 = FR_N,FR_Ln2,FR_T + nop.i 0 +};; +{ .mfi + nop.m 0 +(p13) fma.s1 FR_P54 = FR_P54,FR_r3,FR_P10 + nop.i 0 +};; +.pred.rel "mutex",p13,p14 +{ .mfi + nop.m 0 +(p14) fms.d.s0 f8 = FR_Qlo,f1,FR_Qhi + nop.i 0 +} +{ .mfi + nop.m 0 +(p13) fma.s1 FR_LnX = FR_TpNxLn2,f1,FR_P54 + nop.i 0 +};; +{ .mfb + nop.m 0 +(p13) fms.d.s0 f8 = FR_B17,f1,FR_LnX + br.ret.sptk b0 +};; +// branch for calculating of ln(GAMMA(x)) near negative roots +//--------------------------------------------------------------------- +.align 32 +lgamma_negroots: +{ .mfi + shladd GR_Offs = GR_RootInd,3,r0 //GR_RootInd*8 + fma.s1 FR_r2 = FR_r,FR_r,f0 + add GR_ad_Co = 0x15C0,GR_ad_1//0x1590,GR_ad_1 +} +{ .mfi + add GR_ad_Ce = 0x1610,GR_ad_1//0x15E0,GR_ad_1 + nop.f 0 + cmp.lt p6,p0 = GR_ArgXfrAsIs,GR_Arg05 +};; +{ .mfi + add GR_ad_Roots = 0x10A0,GR_ad_1 + nop.f 0 +(p6) add GR_ad_Co = 0x820,GR_ad_Co +} +{ .mfi +(p6) add GR_ad_Ce = 0x820,GR_ad_Ce + nop.f 0 + shladd GR_Offs = GR_RootInd,1,GR_Offs //GR_RootInd*10 +};; +{ .mmi + shladd GR_ad_Co = GR_Offs,4,GR_ad_Co + shladd GR_ad_Ce = GR_Offs,4,GR_ad_Ce + cmp.eq p8,p7 = r0,r0 +};; +{ .mmi + ldfpd FR_A15,FR_A14 = [GR_ad_Co],16 + ldfpd FR_A13,FR_A12 = [GR_ad_Ce],16 + mov GR_SignOfGamma = 1 +};; +{ .mmi + ldfpd FR_A11,FR_A10 = [GR_ad_Co],16 + ldfpd FR_A9,FR_A8 = [GR_ad_Ce],16 +(p6) cmp.eq p7,p8 = r0,GR_RootInd +};; +{ .mmi + ldfpd FR_A7,FR_A6 = [GR_ad_Co],16 + ldfpd FR_A5,FR_A4 = [GR_ad_Ce],16 + tbit.z p11,p0 = GR_Sig,0 +};; +{ .mmi + ldfe FR_A3 = [GR_ad_Co],16 + ldfe FR_A2 = [GR_ad_Ce],16 + // set p9 if signgum is 32-bit int + // set p10 if signgum is 64-bit int + cmp.eq p10,p9 = 8,r34 +};; +{ .mmi + ldfe FR_A1 = [GR_ad_Co],16 + ldfe FR_A0 = [GR_ad_Ce],16 +(p11) sub GR_SignOfGamma = r0,GR_SignOfGamma +};; +{ .mfi + ldfe FR_A00 = [GR_ad_Roots] + fma.s1 FR_r4 = FR_r2,FR_r2,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A15 = FR_A15,FR_r,FR_A14 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_A13 = FR_A13,FR_r,FR_A12 + nop.i 0 +};; +.pred.rel "mutex",p9,p10 +{ .mfi + // store sign of gamma(x) as 32-bit int +(p9) st4 [r33] = GR_SignOfGamma + fma.s1 FR_A11 = FR_A11,FR_r,FR_A10 + nop.i 0 +} +{ .mfi + // store sign of gamma(x) as 64-bit int +(p10) st8 [r33] = GR_SignOfGamma + fma.s1 FR_A9 = FR_A9,FR_r,FR_A8 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A7 = FR_A7,FR_r,FR_A6 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_A5 = FR_A5,FR_r,FR_A4 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A3 = FR_A3,FR_r,FR_A2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r8 = FR_r4,FR_r4,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A1 = FR_A1,FR_r,FR_A0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A15 = FR_A15,FR_r2,FR_A13 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A11 = FR_A11,FR_r2,FR_A9 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A7 = FR_A7,FR_r2,FR_A5 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A3 = FR_A3,FR_r2,FR_A1 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A15 = FR_A15,FR_r4,FR_A11 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A7 = FR_A7,FR_r4,FR_A3 + nop.i 0 +};; +.pred.rel "mutex",p7,p8 +{ .mfi + nop.m 0 +(p7) fma.s1 FR_A1 = FR_A15,FR_r8,FR_A7 + nop.i 0 +} +{ .mfi + nop.m 0 +(p8) fma.d.s0 f8 = FR_A15,FR_r8,FR_A7 + nop.i 0 +};; +{ .mfb + nop.m 0 +(p7) fma.d.s0 f8 = FR_A1,FR_r,FR_A00 + br.ret.sptk b0 +};; +// branch for handling pseudo root on (-2;-1) +//--------------------------------------------------------------------- +.align 32 +lgamma_pseudoroot: +{ .mmi + ldfe FR_PR21 = [GR_ad_Co],32 + ldfe FR_PR31 = [GR_ad_Ce],32 + // set p9 if signgum is 32-bit int + // set p10 if signgum is 64-bit int + cmp.eq p10,p9 = 8,r34 +};; +{ .mmi + ldfe FR_PR00 = [GR_ad_Co],32 + ldfe FR_PR10 = [GR_ad_Ce],0xF0 + mov GR_SignOfGamma = 1 +};; +{ .mmi + ldfe FR_PR20 = [GR_ad_Co],0xF0 + ldfe FR_PR30 = [GR_ad_Ce] + tbit.z p8,p0 = GR_Sig,0 +};; +{ .mfi + ldfe FR_PRN = [GR_ad_Co] + fma.s1 FR_PR01 = f8,f1,FR_PR01 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_PR11 = f8,f1,FR_PR11 +(p8) sub GR_SignOfGamma = r0,GR_SignOfGamma +};; +.pred.rel "mutex",p9,p10 +{ .mfi + // store sign of gamma(x) as 32-bit int +(p9) st4 [r33] = GR_SignOfGamma + fma.s1 FR_PR21 = f8,f1,FR_PR21 + nop.i 0 +} +{ .mfi + // store sign of gamma(x) as 64-bit int +(p10) st8 [r33] = GR_SignOfGamma + fma.s1 FR_PR31 = f8,f1,FR_PR31 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_PR01 = f8,FR_PR01,FR_PR00 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_PR11 = f8,FR_PR11,FR_PR10 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_PR21 = f8,FR_PR21,FR_PR20 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_PR31 = f8,FR_PR31,FR_PR30 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_PR01 = FR_PR11,FR_PR01,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_PR21 = FR_PR31,FR_PR21,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_PR01 = FR_PR21,FR_PR01,f0 + nop.i 0 +};; +{ .mfb + nop.m 0 + fma.d.s0 f8 = FR_PR01,FR_PRN,f0 + br.ret.sptk b0 +};; +// branch for handling +/-0, NaT, QNaN, +/-INF and denormalised numbers +//--------------------------------------------------------------------- +.align 32 +lgamma_spec: +{ .mfi + getf.exp GR_SignExp = FR_NormX + fclass.m p6,p0 = f8,0x21 // is arg +INF? + mov GR_SignOfGamma = 1 +};; +{ .mfi + getf.sig GR_ArgAsIs = FR_NormX + fclass.m p7,p0 = f8,0xB // is x deno? + // set p11 if signgum is 32-bit int + // set p12 if signgum is 64-bit int + cmp.eq p12,p11 = 8,r34 +};; +.pred.rel "mutex",p11,p12 +{ .mfi + // store sign of gamma(x) as 32-bit int +(p11) st4 [r33] = GR_SignOfGamma + fclass.m p8,p0 = f8,0x1C0 // is arg NaT or NaN? + dep.z GR_Ind = GR_SignExp,8,4 +} +{ .mib + // store sign of gamma(x) as 64-bit int +(p12) st8 [r33] = GR_SignOfGamma + cmp.lt p10,p0 = GR_SignExp,GR_ExpBias +(p6) br.ret.spnt b0 // exit for +INF +};; +{ .mfi + and GR_Exp = GR_SignExp,GR_ExpMask + fclass.m p9,p0 = f8,0x22 // is arg -INF? + nop.i 0 +};; +{ .mfi + add GR_ad_Co = GR_Ind,GR_ad_Data +(p7) fma.s0 FR_tmp = f8,f8,f8 + extr.u GR_ArgAsIs = GR_ArgAsIs,11,52 +} +{ .mfb + nop.m 0 +(p8) fms.d.s0 f8 = f8,f1,f8 +(p8) br.ret.spnt b0 // exit for NaT and NaN +};; +{ .mib + nop.m 0 + shr.u GR_Arg = GR_ArgAsIs,48 +(p7) br.cond.sptk lgamma_common +};; +{ .mfb + nop.m 0 +(p9) fmerge.s f8 = f1,f8 +(p9) br.ret.spnt b0 // exit -INF +};; +// branch for handling negative integers and +/-0 +//--------------------------------------------------------------------- +.align 32 +lgamma_singularity: +{ .mfi + mov GR_ad_SignGam = r33 + fclass.m p6,p0 = f8, 0x6 // is x -0? + mov GR_SignOfGamma = 1 +} +{ .mfi + // set p9 if signgum is 32-bit int + // set p10 if signgum is 64-bit int + cmp.eq p10,p9 = 8,r34 + fma.s1 FR_X = f0,f0,f8 + nop.i 0 +};; +{ .mfi + nop.m 0 + frcpa.s0 f8,p0 = f1,f0 + mov GR_TAG = 106 // negative +} +{ .mib + nop.m 0 +(p6) sub GR_SignOfGamma = r0,GR_SignOfGamma + br.cond.sptk lgamma_libm_err +};; +// overflow (x > OVERFLOV_BOUNDARY) +//--------------------------------------------------------------------- +.align 32 +lgamma_overflow: +{ .mfi + mov GR_SignOfGamma = 1 + nop.f 0 + mov r8 = 0x1FFFE +};; +{ .mfi + setf.exp f9 = r8 + fmerge.s FR_X = f8,f8 + mov GR_TAG = 105 // overflow +};; +{ .mfi + mov GR_ad_SignGam = r33 + nop.f 0 + // set p9 if signgum is 32-bit int + // set p10 if signgum is 64-bit int + cmp.eq p10,p9 = 8,r34 +} +{ .mfi + nop.m 0 + fma.d.s0 f8 = f9,f9,f0 // Set I,O and +INF result + nop.i 0 +};; +// +//--------------------------------------------------------------------- +.align 32 +lgamma_libm_err: +{ .mmi + alloc r32 = ar.pfs,1,4,4,0 + mov GR_Parameter_TAG = GR_TAG + nop.i 0 +};; +.pred.rel "mutex",p9,p10 +{ .mmi + // store sign of gamma(x) as 32-bit int +(p9) st4 [GR_ad_SignGam] = GR_SignOfGamma + // store sign of gamma(x) as 64-bit int +(p10) st8 [GR_ad_SignGam] = GR_SignOfGamma + nop.i 0 +};; +GLOBAL_LIBM_END(__libm_lgamma) + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfd [GR_Parameter_Y] = FR_Y,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; +.body +{ .mib + stfd [GR_Parameter_X] = FR_X // STORE Parameter 1 + // on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfd [GR_Parameter_Y] = FR_RESULT // STORE Parameter 3 + // on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling + // function +};; +{ .mmi + nop.m 0 + nop.m 0 + add GR_Parameter_RESULT = 48,sp +};; +{ .mmi + ldfd f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/libm_lgammaf.S b/sysdeps/ia64/fpu/libm_lgammaf.S new file mode 100644 index 0000000000..4bd92c3b26 --- /dev/null +++ b/sysdeps/ia64/fpu/libm_lgammaf.S @@ -0,0 +1,2199 @@ +.file "libm_lgammaf.s" + + +// Copyright (c) 2002 - 2005, Intel Corporation +// All rights reserved. +// +// Contributed 2002 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,INCLUDING,BUT NOT +// LIMITED TO,THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT,INDIRECT,INCIDENTAL,SPECIAL, +// EXEMPLARY,OR CONSEQUENTIAL DAMAGES (INCLUDING,BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,DATA,OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY,WHETHER IN CONTRACT,STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE,EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code,and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +//********************************************************************* +// +// History: +// 01/10/02 Initial version +// 01/25/02 Corrected parameter store, load, and tag for __libm_error_support +// 02/01/02 Added support of SIGN(GAMMA(x)) calculation +// 05/20/02 Cleaned up namespace and sf0 syntax +// 09/16/02 Improved accuracy on intervals reduced to [1;1.25] +// 10/21/02 Now it returns SIGN(GAMMA(x))=-1 for negative zero +// 02/10/03 Reordered header: .section, .global, .proc, .align +// 07/22/03 Reformatted some data tables +// 03/31/05 Reformatted delimiters between data tables +// +//********************************************************************* +// +//********************************************************************* +// +// Function: __libm_lgammaf(float x, int* signgam, int szsigngam) +// computes the principle value of the logarithm of the GAMMA function +// of x. Signum of GAMMA(x) is stored to memory starting at the address +// specified by the signgam. +// +//********************************************************************* +// +// Resources Used: +// +// Floating-Point Registers: f6-f15 +// f32-f97 +// +// General Purpose Registers: +// r8-r11 +// r14-r30 +// r32-r36 +// r37-r40 (Used to pass arguments to error handling routine) +// +// Predicate Registers: p6-p15 +// +//********************************************************************* +// +// IEEE Special Conditions: +// +// lgamma(+inf) = +inf +// lgamma(-inf) = +inf +// lgamma(+/-0) = +inf +// lgamma(x<0, x - integer) = +inf +// lgamma(SNaN) = QNaN +// lgamma(QNaN) = QNaN +// +//********************************************************************* +// +// Overview +// +// The method consists of three cases. +// +// If 2^13 <= x < OVERFLOW_BOUNDARY use case lgammaf_pstirling; +// else if 1 < x < 2^13 use case lgammaf_regular; +// else if -9 < x < 1 use case lgammaf_negrecursion; +// else if -2^13 < x < -9 use case lgammaf_negpoly; +// else if x < -2^13 use case lgammaf_negstirling; +// else if x is close to negative +// roots of ln(GAMMA(x)) use case lgammaf_negroots; +// +// +// Case 2^13 <= x < OVERFLOW_BOUNDARY +// ---------------------------------- +// Here we use algorithm based on the Stirling formula: +// ln(GAMMA(x)) = ln(sqrt(2*Pi)) + (x-0.5)*ln(x) - x +// +// Case 1 < x < 2^13 +// ----------------- +// To calculate ln(GAMMA(x)) for such arguments we use polynomial +// approximation on following intervals: [1.0; 1.25), [1.25; 1.5), +// [1.5, 1.75), [1.75; 2), [2; 4), [2^i; 2^(i+1)), i=1..8 +// +// Following variants of approximation and argument reduction are used: +// 1. [1.0; 1.25) +// ln(GAMMA(x)) ~ (x-1.0)*P7(x) +// +// 2. [1.25; 1.5) +// ln(GAMMA(x)) ~ ln(GAMMA(x0))+(x-x0)*P8(x-x0), +// where x0 - point of local minimum on [1;2] rounded to nearest double +// precision number. +// +// 3. [1.5; 1.75) +// ln(GAMMA(x)) ~ P8(x) +// +// 4. [1.75; 2.0) +// ln(GAMMA(x)) ~ (x-2)*P7(x) +// +// 5. [2; 4) +// ln(GAMMA(x)) ~ (x-2)*P10(x) +// +// 6. [2^i; 2^(i+1)), i=2..8 +// ln(GAMMA(x)) ~ P10((x-2^i)/2^i) +// +// Case -9 < x < 1 +// --------------- +// Here we use the recursive formula: +// ln(GAMMA(x)) = ln(GAMMA(x+1)) - ln(x) +// +// Using this formula we reduce argument to base interval [1.0; 2.0] +// +// Case -2^13 < x < -9 +// -------------------- +// Here we use the formula: +// ln(GAMMA(x)) = ln(Pi/(|x|*GAMMA(|x|)*sin(Pi*|x|))) = +// = -ln(|x|) - ln((GAMMA(|x|)) - ln(sin(Pi*r)/(Pi*r)) - ln(|r|) +// where r = x - rounded_to_nearest(x), i.e |r| <= 0.5 and +// ln(sin(Pi*r)/(Pi*r)) is approximated by 8-degree polynomial of r^2 +// +// Case x < -2^13 +// -------------- +// Here we use algorithm based on the Stirling formula: +// ln(GAMMA(x)) = -ln(sqrt(2*Pi)) + (|x|-0.5)ln(x) - |x| - +// - ln(sin(Pi*r)/(Pi*r)) - ln(|r|) +// where r = x - rounded_to_nearest(x). +// +// Neighbourhoods of negative roots +// -------------------------------- +// Here we use polynomial approximation +// ln(GAMMA(x-x0)) = ln(GAMMA(x0)) + (x-x0)*P14(x-x0), +// where x0 is a root of ln(GAMMA(x)) rounded to nearest double +// precision number. +// +// +// Claculation of logarithm +// ------------------------ +// Consider x = 2^N * xf so +// ln(x) = ln(frcpa(x)*x/frcpa(x)) +// = ln(1/frcpa(x)) + ln(frcpa(x)*x) +// +// frcpa(x) = 2^(-N) * frcpa(xf) +// +// ln(1/frcpa(x)) = -ln(2^(-N)) - ln(frcpa(xf)) +// = N*ln(2) - ln(frcpa(xf)) +// = N*ln(2) + ln(1/frcpa(xf)) +// +// ln(x) = ln(1/frcpa(x)) + ln(frcpa(x)*x) = +// = N*ln(2) + ln(1/frcpa(xf)) + ln(frcpa(x)*x) +// = N*ln(2) + T + ln(frcpa(x)*x) +// +// Let r = 1 - frcpa(x)*x, note that r is quite small by +// absolute value so +// +// ln(x) = N*ln(2) + T + ln(1+r) ~ N*ln(2) + T + Series(r), +// where T - is precomputed tabular value, +// Series(r) = (P3*r + P2)*r^2 + (P1*r + 1) +// +//********************************************************************* + +GR_TAG = r8 +GR_ad_Data = r8 +GR_ad_Co = r9 +GR_ad_SignGam = r10 +GR_ad_Ce = r10 +GR_SignExp = r11 + +GR_ad_C650 = r14 +GR_ad_RootCo = r14 +GR_ad_C0 = r15 +GR_Dx = r15 +GR_Ind = r16 +GR_Offs = r17 +GR_IntNum = r17 +GR_ExpBias = r18 +GR_ExpMask = r19 +GR_Ind4T = r20 +GR_RootInd = r20 +GR_Sig = r21 +GR_Exp = r22 +GR_PureExp = r23 +GR_ad_C43 = r24 +GR_StirlBound = r25 +GR_ad_T = r25 +GR_IndX8 = r25 +GR_Neg2 = r25 +GR_2xDx = r25 +GR_SingBound = r26 +GR_IndX2 = r26 +GR_Neg4 = r26 +GR_ad_RootCe = r26 +GR_Arg = r27 +GR_ExpOf2 = r28 +GR_fff7 = r28 +GR_Root = r28 +GR_ReqBound = r28 +GR_N = r29 +GR_ad_Root = r30 +GR_ad_OvfBound = r30 +GR_SignOfGamma = r31 + +GR_SAVE_B0 = r33 +GR_SAVE_PFS = r34 +GR_SAVE_GP = r35 +GR_SAVE_SP = r36 + +GR_Parameter_X = r37 +GR_Parameter_Y = r38 +GR_Parameter_RESULT = r39 +GR_Parameter_TAG = r40 + +//********************************************************************* + +FR_X = f10 +FR_Y = f1 // lgammaf is single argument function +FR_RESULT = f8 + +FR_x = f6 +FR_x2 = f7 + +FR_x3 = f9 +FR_x4 = f10 +FR_xm2 = f11 +FR_w = f11 +FR_w2 = f12 +FR_Q32 = f13 +FR_Q10 = f14 +FR_InvX = f15 + +FR_NormX = f32 + +FR_A0 = f33 +FR_A1 = f34 +FR_A2 = f35 +FR_A3 = f36 +FR_A4 = f37 +FR_A5 = f38 +FR_A6 = f39 +FR_A7 = f40 +FR_A8 = f41 +FR_A9 = f42 +FR_A10 = f43 + +FR_int_N = f44 +FR_P3 = f45 +FR_P2 = f46 +FR_P1 = f47 +FR_LocalMin = f48 +FR_Ln2 = f49 +FR_05 = f50 +FR_LnSqrt2Pi = f51 +FR_3 = f52 +FR_r = f53 +FR_r2 = f54 +FR_T = f55 +FR_N = f56 +FR_xm05 = f57 +FR_int_Ln = f58 +FR_P32 = f59 +FR_P10 = f60 + +FR_Xf = f61 +FR_InvXf = f62 +FR_rf = f63 +FR_rf2 = f64 +FR_Tf = f65 +FR_Nf = f66 +FR_xm05f = f67 +FR_P32f = f68 +FR_P10f = f69 +FR_Lnf = f70 +FR_Xf2 = f71 +FR_Xf4 = f72 +FR_Xf8 = f73 +FR_Ln = f74 +FR_xx = f75 +FR_Root = f75 +FR_Req = f76 +FR_1pXf = f77 + +FR_S16 = f78 +FR_R3 = f78 +FR_S14 = f79 +FR_R2 = f79 +FR_S12 = f80 +FR_R1 = f80 +FR_S10 = f81 +FR_R0 = f81 +FR_S8 = f82 +FR_rx = f82 +FR_S6 = f83 +FR_rx2 = f84 +FR_S4 = f84 +FR_S2 = f85 + +FR_Xp1 = f86 +FR_Xp2 = f87 +FR_Xp3 = f88 +FR_Xp4 = f89 +FR_Xp5 = f90 +FR_Xp6 = f91 +FR_Xp7 = f92 +FR_Xp8 = f93 +FR_OverflowBound = f93 + +FR_2 = f94 +FR_tmp = f95 +FR_int_Ntrunc = f96 +FR_Ntrunc = f97 + +//********************************************************************* + +RODATA +.align 32 +LOCAL_OBJECT_START(lgammaf_data) +log_table_1: +data8 0xbfd0001008f39d59 // P3 +data8 0x3fd5556073e0c45a // P2 +data8 0x3fe62e42fefa39ef // ln(2) +data8 0x3fe0000000000000 // 0.5 +// +data8 0x3F60040155D5889E //ln(1/frcpa(1+ 0/256) +data8 0x3F78121214586B54 //ln(1/frcpa(1+ 1/256) +data8 0x3F841929F96832F0 //ln(1/frcpa(1+ 2/256) +data8 0x3F8C317384C75F06 //ln(1/frcpa(1+ 3/256) +data8 0x3F91A6B91AC73386 //ln(1/frcpa(1+ 4/256) +data8 0x3F95BA9A5D9AC039 //ln(1/frcpa(1+ 5/256) +data8 0x3F99D2A8074325F4 //ln(1/frcpa(1+ 6/256) +data8 0x3F9D6B2725979802 //ln(1/frcpa(1+ 7/256) +data8 0x3FA0C58FA19DFAAA //ln(1/frcpa(1+ 8/256) +data8 0x3FA2954C78CBCE1B //ln(1/frcpa(1+ 9/256) +data8 0x3FA4A94D2DA96C56 //ln(1/frcpa(1+ 10/256) +data8 0x3FA67C94F2D4BB58 //ln(1/frcpa(1+ 11/256) +data8 0x3FA85188B630F068 //ln(1/frcpa(1+ 12/256) +data8 0x3FAA6B8ABE73AF4C //ln(1/frcpa(1+ 13/256) +data8 0x3FAC441E06F72A9E //ln(1/frcpa(1+ 14/256) +data8 0x3FAE1E6713606D07 //ln(1/frcpa(1+ 15/256) +data8 0x3FAFFA6911AB9301 //ln(1/frcpa(1+ 16/256) +data8 0x3FB0EC139C5DA601 //ln(1/frcpa(1+ 17/256) +data8 0x3FB1DBD2643D190B //ln(1/frcpa(1+ 18/256) +data8 0x3FB2CC7284FE5F1C //ln(1/frcpa(1+ 19/256) +data8 0x3FB3BDF5A7D1EE64 //ln(1/frcpa(1+ 20/256) +data8 0x3FB4B05D7AA012E0 //ln(1/frcpa(1+ 21/256) +data8 0x3FB580DB7CEB5702 //ln(1/frcpa(1+ 22/256) +data8 0x3FB674F089365A7A //ln(1/frcpa(1+ 23/256) +data8 0x3FB769EF2C6B568D //ln(1/frcpa(1+ 24/256) +data8 0x3FB85FD927506A48 //ln(1/frcpa(1+ 25/256) +data8 0x3FB9335E5D594989 //ln(1/frcpa(1+ 26/256) +data8 0x3FBA2B0220C8E5F5 //ln(1/frcpa(1+ 27/256) +data8 0x3FBB0004AC1A86AC //ln(1/frcpa(1+ 28/256) +data8 0x3FBBF968769FCA11 //ln(1/frcpa(1+ 29/256) +data8 0x3FBCCFEDBFEE13A8 //ln(1/frcpa(1+ 30/256) +data8 0x3FBDA727638446A2 //ln(1/frcpa(1+ 31/256) +data8 0x3FBEA3257FE10F7A //ln(1/frcpa(1+ 32/256) +data8 0x3FBF7BE9FEDBFDE6 //ln(1/frcpa(1+ 33/256) +data8 0x3FC02AB352FF25F4 //ln(1/frcpa(1+ 34/256) +data8 0x3FC097CE579D204D //ln(1/frcpa(1+ 35/256) +data8 0x3FC1178E8227E47C //ln(1/frcpa(1+ 36/256) +data8 0x3FC185747DBECF34 //ln(1/frcpa(1+ 37/256) +data8 0x3FC1F3B925F25D41 //ln(1/frcpa(1+ 38/256) +data8 0x3FC2625D1E6DDF57 //ln(1/frcpa(1+ 39/256) +data8 0x3FC2D1610C86813A //ln(1/frcpa(1+ 40/256) +data8 0x3FC340C59741142E //ln(1/frcpa(1+ 41/256) +data8 0x3FC3B08B6757F2A9 //ln(1/frcpa(1+ 42/256) +data8 0x3FC40DFB08378003 //ln(1/frcpa(1+ 43/256) +data8 0x3FC47E74E8CA5F7C //ln(1/frcpa(1+ 44/256) +data8 0x3FC4EF51F6466DE4 //ln(1/frcpa(1+ 45/256) +data8 0x3FC56092E02BA516 //ln(1/frcpa(1+ 46/256) +data8 0x3FC5D23857CD74D5 //ln(1/frcpa(1+ 47/256) +data8 0x3FC6313A37335D76 //ln(1/frcpa(1+ 48/256) +data8 0x3FC6A399DABBD383 //ln(1/frcpa(1+ 49/256) +data8 0x3FC70337DD3CE41B //ln(1/frcpa(1+ 50/256) +data8 0x3FC77654128F6127 //ln(1/frcpa(1+ 51/256) +data8 0x3FC7E9D82A0B022D //ln(1/frcpa(1+ 52/256) +data8 0x3FC84A6B759F512F //ln(1/frcpa(1+ 53/256) +data8 0x3FC8AB47D5F5A310 //ln(1/frcpa(1+ 54/256) +data8 0x3FC91FE49096581B //ln(1/frcpa(1+ 55/256) +data8 0x3FC981634011AA75 //ln(1/frcpa(1+ 56/256) +data8 0x3FC9F6C407089664 //ln(1/frcpa(1+ 57/256) +data8 0x3FCA58E729348F43 //ln(1/frcpa(1+ 58/256) +data8 0x3FCABB55C31693AD //ln(1/frcpa(1+ 59/256) +data8 0x3FCB1E104919EFD0 //ln(1/frcpa(1+ 60/256) +data8 0x3FCB94EE93E367CB //ln(1/frcpa(1+ 61/256) +data8 0x3FCBF851C067555F //ln(1/frcpa(1+ 62/256) +data8 0x3FCC5C0254BF23A6 //ln(1/frcpa(1+ 63/256) +data8 0x3FCCC000C9DB3C52 //ln(1/frcpa(1+ 64/256) +data8 0x3FCD244D99C85674 //ln(1/frcpa(1+ 65/256) +data8 0x3FCD88E93FB2F450 //ln(1/frcpa(1+ 66/256) +data8 0x3FCDEDD437EAEF01 //ln(1/frcpa(1+ 67/256) +data8 0x3FCE530EFFE71012 //ln(1/frcpa(1+ 68/256) +data8 0x3FCEB89A1648B971 //ln(1/frcpa(1+ 69/256) +data8 0x3FCF1E75FADF9BDE //ln(1/frcpa(1+ 70/256) +data8 0x3FCF84A32EAD7C35 //ln(1/frcpa(1+ 71/256) +data8 0x3FCFEB2233EA07CD //ln(1/frcpa(1+ 72/256) +data8 0x3FD028F9C7035C1C //ln(1/frcpa(1+ 73/256) +data8 0x3FD05C8BE0D9635A //ln(1/frcpa(1+ 74/256) +data8 0x3FD085EB8F8AE797 //ln(1/frcpa(1+ 75/256) +data8 0x3FD0B9C8E32D1911 //ln(1/frcpa(1+ 76/256) +data8 0x3FD0EDD060B78081 //ln(1/frcpa(1+ 77/256) +data8 0x3FD122024CF0063F //ln(1/frcpa(1+ 78/256) +data8 0x3FD14BE2927AECD4 //ln(1/frcpa(1+ 79/256) +data8 0x3FD180618EF18ADF //ln(1/frcpa(1+ 80/256) +data8 0x3FD1B50BBE2FC63B //ln(1/frcpa(1+ 81/256) +data8 0x3FD1DF4CC7CF242D //ln(1/frcpa(1+ 82/256) +data8 0x3FD214456D0EB8D4 //ln(1/frcpa(1+ 83/256) +data8 0x3FD23EC5991EBA49 //ln(1/frcpa(1+ 84/256) +data8 0x3FD2740D9F870AFB //ln(1/frcpa(1+ 85/256) +data8 0x3FD29ECDABCDFA04 //ln(1/frcpa(1+ 86/256) +data8 0x3FD2D46602ADCCEE //ln(1/frcpa(1+ 87/256) +data8 0x3FD2FF66B04EA9D4 //ln(1/frcpa(1+ 88/256) +data8 0x3FD335504B355A37 //ln(1/frcpa(1+ 89/256) +data8 0x3FD360925EC44F5D //ln(1/frcpa(1+ 90/256) +data8 0x3FD38BF1C3337E75 //ln(1/frcpa(1+ 91/256) +data8 0x3FD3C25277333184 //ln(1/frcpa(1+ 92/256) +data8 0x3FD3EDF463C1683E //ln(1/frcpa(1+ 93/256) +data8 0x3FD419B423D5E8C7 //ln(1/frcpa(1+ 94/256) +data8 0x3FD44591E0539F49 //ln(1/frcpa(1+ 95/256) +data8 0x3FD47C9175B6F0AD //ln(1/frcpa(1+ 96/256) +data8 0x3FD4A8B341552B09 //ln(1/frcpa(1+ 97/256) +data8 0x3FD4D4F3908901A0 //ln(1/frcpa(1+ 98/256) +data8 0x3FD501528DA1F968 //ln(1/frcpa(1+ 99/256) +data8 0x3FD52DD06347D4F6 //ln(1/frcpa(1+ 100/256) +data8 0x3FD55A6D3C7B8A8A //ln(1/frcpa(1+ 101/256) +data8 0x3FD5925D2B112A59 //ln(1/frcpa(1+ 102/256) +data8 0x3FD5BF406B543DB2 //ln(1/frcpa(1+ 103/256) +data8 0x3FD5EC433D5C35AE //ln(1/frcpa(1+ 104/256) +data8 0x3FD61965CDB02C1F //ln(1/frcpa(1+ 105/256) +data8 0x3FD646A84935B2A2 //ln(1/frcpa(1+ 106/256) +data8 0x3FD6740ADD31DE94 //ln(1/frcpa(1+ 107/256) +data8 0x3FD6A18DB74A58C5 //ln(1/frcpa(1+ 108/256) +data8 0x3FD6CF31058670EC //ln(1/frcpa(1+ 109/256) +data8 0x3FD6F180E852F0BA //ln(1/frcpa(1+ 110/256) +data8 0x3FD71F5D71B894F0 //ln(1/frcpa(1+ 111/256) +data8 0x3FD74D5AEFD66D5C //ln(1/frcpa(1+ 112/256) +data8 0x3FD77B79922BD37E //ln(1/frcpa(1+ 113/256) +data8 0x3FD7A9B9889F19E2 //ln(1/frcpa(1+ 114/256) +data8 0x3FD7D81B037EB6A6 //ln(1/frcpa(1+ 115/256) +data8 0x3FD8069E33827231 //ln(1/frcpa(1+ 116/256) +data8 0x3FD82996D3EF8BCB //ln(1/frcpa(1+ 117/256) +data8 0x3FD85855776DCBFB //ln(1/frcpa(1+ 118/256) +data8 0x3FD8873658327CCF //ln(1/frcpa(1+ 119/256) +data8 0x3FD8AA75973AB8CF //ln(1/frcpa(1+ 120/256) +data8 0x3FD8D992DC8824E5 //ln(1/frcpa(1+ 121/256) +data8 0x3FD908D2EA7D9512 //ln(1/frcpa(1+ 122/256) +data8 0x3FD92C59E79C0E56 //ln(1/frcpa(1+ 123/256) +data8 0x3FD95BD750EE3ED3 //ln(1/frcpa(1+ 124/256) +data8 0x3FD98B7811A3EE5B //ln(1/frcpa(1+ 125/256) +data8 0x3FD9AF47F33D406C //ln(1/frcpa(1+ 126/256) +data8 0x3FD9DF270C1914A8 //ln(1/frcpa(1+ 127/256) +data8 0x3FDA0325ED14FDA4 //ln(1/frcpa(1+ 128/256) +data8 0x3FDA33440224FA79 //ln(1/frcpa(1+ 129/256) +data8 0x3FDA57725E80C383 //ln(1/frcpa(1+ 130/256) +data8 0x3FDA87D0165DD199 //ln(1/frcpa(1+ 131/256) +data8 0x3FDAAC2E6C03F896 //ln(1/frcpa(1+ 132/256) +data8 0x3FDADCCC6FDF6A81 //ln(1/frcpa(1+ 133/256) +data8 0x3FDB015B3EB1E790 //ln(1/frcpa(1+ 134/256) +data8 0x3FDB323A3A635948 //ln(1/frcpa(1+ 135/256) +data8 0x3FDB56FA04462909 //ln(1/frcpa(1+ 136/256) +data8 0x3FDB881AA659BC93 //ln(1/frcpa(1+ 137/256) +data8 0x3FDBAD0BEF3DB165 //ln(1/frcpa(1+ 138/256) +data8 0x3FDBD21297781C2F //ln(1/frcpa(1+ 139/256) +data8 0x3FDC039236F08819 //ln(1/frcpa(1+ 140/256) +data8 0x3FDC28CB1E4D32FD //ln(1/frcpa(1+ 141/256) +data8 0x3FDC4E19B84723C2 //ln(1/frcpa(1+ 142/256) +data8 0x3FDC7FF9C74554C9 //ln(1/frcpa(1+ 143/256) +data8 0x3FDCA57B64E9DB05 //ln(1/frcpa(1+ 144/256) +data8 0x3FDCCB130A5CEBB0 //ln(1/frcpa(1+ 145/256) +data8 0x3FDCF0C0D18F326F //ln(1/frcpa(1+ 146/256) +data8 0x3FDD232075B5A201 //ln(1/frcpa(1+ 147/256) +data8 0x3FDD490246DEFA6B //ln(1/frcpa(1+ 148/256) +data8 0x3FDD6EFA918D25CD //ln(1/frcpa(1+ 149/256) +data8 0x3FDD9509707AE52F //ln(1/frcpa(1+ 150/256) +data8 0x3FDDBB2EFE92C554 //ln(1/frcpa(1+ 151/256) +data8 0x3FDDEE2F3445E4AF //ln(1/frcpa(1+ 152/256) +data8 0x3FDE148A1A2726CE //ln(1/frcpa(1+ 153/256) +data8 0x3FDE3AFC0A49FF40 //ln(1/frcpa(1+ 154/256) +data8 0x3FDE6185206D516E //ln(1/frcpa(1+ 155/256) +data8 0x3FDE882578823D52 //ln(1/frcpa(1+ 156/256) +data8 0x3FDEAEDD2EAC990C //ln(1/frcpa(1+ 157/256) +data8 0x3FDED5AC5F436BE3 //ln(1/frcpa(1+ 158/256) +data8 0x3FDEFC9326D16AB9 //ln(1/frcpa(1+ 159/256) +data8 0x3FDF2391A2157600 //ln(1/frcpa(1+ 160/256) +data8 0x3FDF4AA7EE03192D //ln(1/frcpa(1+ 161/256) +data8 0x3FDF71D627C30BB0 //ln(1/frcpa(1+ 162/256) +data8 0x3FDF991C6CB3B379 //ln(1/frcpa(1+ 163/256) +data8 0x3FDFC07ADA69A910 //ln(1/frcpa(1+ 164/256) +data8 0x3FDFE7F18EB03D3E //ln(1/frcpa(1+ 165/256) +data8 0x3FE007C053C5002E //ln(1/frcpa(1+ 166/256) +data8 0x3FE01B942198A5A1 //ln(1/frcpa(1+ 167/256) +data8 0x3FE02F74400C64EB //ln(1/frcpa(1+ 168/256) +data8 0x3FE04360BE7603AD //ln(1/frcpa(1+ 169/256) +data8 0x3FE05759AC47FE34 //ln(1/frcpa(1+ 170/256) +data8 0x3FE06B5F1911CF52 //ln(1/frcpa(1+ 171/256) +data8 0x3FE078BF0533C568 //ln(1/frcpa(1+ 172/256) +data8 0x3FE08CD9687E7B0E //ln(1/frcpa(1+ 173/256) +data8 0x3FE0A10074CF9019 //ln(1/frcpa(1+ 174/256) +data8 0x3FE0B5343A234477 //ln(1/frcpa(1+ 175/256) +data8 0x3FE0C974C89431CE //ln(1/frcpa(1+ 176/256) +data8 0x3FE0DDC2305B9886 //ln(1/frcpa(1+ 177/256) +data8 0x3FE0EB524BAFC918 //ln(1/frcpa(1+ 178/256) +data8 0x3FE0FFB54213A476 //ln(1/frcpa(1+ 179/256) +data8 0x3FE114253DA97D9F //ln(1/frcpa(1+ 180/256) +data8 0x3FE128A24F1D9AFF //ln(1/frcpa(1+ 181/256) +data8 0x3FE1365252BF0865 //ln(1/frcpa(1+ 182/256) +data8 0x3FE14AE558B4A92D //ln(1/frcpa(1+ 183/256) +data8 0x3FE15F85A19C765B //ln(1/frcpa(1+ 184/256) +data8 0x3FE16D4D38C119FA //ln(1/frcpa(1+ 185/256) +data8 0x3FE18203C20DD133 //ln(1/frcpa(1+ 186/256) +data8 0x3FE196C7BC4B1F3B //ln(1/frcpa(1+ 187/256) +data8 0x3FE1A4A738B7A33C //ln(1/frcpa(1+ 188/256) +data8 0x3FE1B981C0C9653D //ln(1/frcpa(1+ 189/256) +data8 0x3FE1CE69E8BB106B //ln(1/frcpa(1+ 190/256) +data8 0x3FE1DC619DE06944 //ln(1/frcpa(1+ 191/256) +data8 0x3FE1F160A2AD0DA4 //ln(1/frcpa(1+ 192/256) +data8 0x3FE2066D7740737E //ln(1/frcpa(1+ 193/256) +data8 0x3FE2147DBA47A394 //ln(1/frcpa(1+ 194/256) +data8 0x3FE229A1BC5EBAC3 //ln(1/frcpa(1+ 195/256) +data8 0x3FE237C1841A502E //ln(1/frcpa(1+ 196/256) +data8 0x3FE24CFCE6F80D9A //ln(1/frcpa(1+ 197/256) +data8 0x3FE25B2C55CD5762 //ln(1/frcpa(1+ 198/256) +data8 0x3FE2707F4D5F7C41 //ln(1/frcpa(1+ 199/256) +data8 0x3FE285E0842CA384 //ln(1/frcpa(1+ 200/256) +data8 0x3FE294294708B773 //ln(1/frcpa(1+ 201/256) +data8 0x3FE2A9A2670AFF0C //ln(1/frcpa(1+ 202/256) +data8 0x3FE2B7FB2C8D1CC1 //ln(1/frcpa(1+ 203/256) +data8 0x3FE2C65A6395F5F5 //ln(1/frcpa(1+ 204/256) +data8 0x3FE2DBF557B0DF43 //ln(1/frcpa(1+ 205/256) +data8 0x3FE2EA64C3F97655 //ln(1/frcpa(1+ 206/256) +data8 0x3FE3001823684D73 //ln(1/frcpa(1+ 207/256) +data8 0x3FE30E97E9A8B5CD //ln(1/frcpa(1+ 208/256) +data8 0x3FE32463EBDD34EA //ln(1/frcpa(1+ 209/256) +data8 0x3FE332F4314AD796 //ln(1/frcpa(1+ 210/256) +data8 0x3FE348D90E7464D0 //ln(1/frcpa(1+ 211/256) +data8 0x3FE35779F8C43D6E //ln(1/frcpa(1+ 212/256) +data8 0x3FE36621961A6A99 //ln(1/frcpa(1+ 213/256) +data8 0x3FE37C299F3C366A //ln(1/frcpa(1+ 214/256) +data8 0x3FE38AE2171976E7 //ln(1/frcpa(1+ 215/256) +data8 0x3FE399A157A603E7 //ln(1/frcpa(1+ 216/256) +data8 0x3FE3AFCCFE77B9D1 //ln(1/frcpa(1+ 217/256) +data8 0x3FE3BE9D503533B5 //ln(1/frcpa(1+ 218/256) +data8 0x3FE3CD7480B4A8A3 //ln(1/frcpa(1+ 219/256) +data8 0x3FE3E3C43918F76C //ln(1/frcpa(1+ 220/256) +data8 0x3FE3F2ACB27ED6C7 //ln(1/frcpa(1+ 221/256) +data8 0x3FE4019C2125CA93 //ln(1/frcpa(1+ 222/256) +data8 0x3FE4181061389722 //ln(1/frcpa(1+ 223/256) +data8 0x3FE42711518DF545 //ln(1/frcpa(1+ 224/256) +data8 0x3FE436194E12B6BF //ln(1/frcpa(1+ 225/256) +data8 0x3FE445285D68EA69 //ln(1/frcpa(1+ 226/256) +data8 0x3FE45BCC464C893A //ln(1/frcpa(1+ 227/256) +data8 0x3FE46AED21F117FC //ln(1/frcpa(1+ 228/256) +data8 0x3FE47A1527E8A2D3 //ln(1/frcpa(1+ 229/256) +data8 0x3FE489445EFFFCCC //ln(1/frcpa(1+ 230/256) +data8 0x3FE4A018BCB69835 //ln(1/frcpa(1+ 231/256) +data8 0x3FE4AF5A0C9D65D7 //ln(1/frcpa(1+ 232/256) +data8 0x3FE4BEA2A5BDBE87 //ln(1/frcpa(1+ 233/256) +data8 0x3FE4CDF28F10AC46 //ln(1/frcpa(1+ 234/256) +data8 0x3FE4DD49CF994058 //ln(1/frcpa(1+ 235/256) +data8 0x3FE4ECA86E64A684 //ln(1/frcpa(1+ 236/256) +data8 0x3FE503C43CD8EB68 //ln(1/frcpa(1+ 237/256) +data8 0x3FE513356667FC57 //ln(1/frcpa(1+ 238/256) +data8 0x3FE522AE0738A3D8 //ln(1/frcpa(1+ 239/256) +data8 0x3FE5322E26867857 //ln(1/frcpa(1+ 240/256) +data8 0x3FE541B5CB979809 //ln(1/frcpa(1+ 241/256) +data8 0x3FE55144FDBCBD62 //ln(1/frcpa(1+ 242/256) +data8 0x3FE560DBC45153C7 //ln(1/frcpa(1+ 243/256) +data8 0x3FE5707A26BB8C66 //ln(1/frcpa(1+ 244/256) +data8 0x3FE587F60ED5B900 //ln(1/frcpa(1+ 245/256) +data8 0x3FE597A7977C8F31 //ln(1/frcpa(1+ 246/256) +data8 0x3FE5A760D634BB8B //ln(1/frcpa(1+ 247/256) +data8 0x3FE5B721D295F10F //ln(1/frcpa(1+ 248/256) +data8 0x3FE5C6EA94431EF9 //ln(1/frcpa(1+ 249/256) +data8 0x3FE5D6BB22EA86F6 //ln(1/frcpa(1+ 250/256) +data8 0x3FE5E6938645D390 //ln(1/frcpa(1+ 251/256) +data8 0x3FE5F673C61A2ED2 //ln(1/frcpa(1+ 252/256) +data8 0x3FE6065BEA385926 //ln(1/frcpa(1+ 253/256) +data8 0x3FE6164BFA7CC06B //ln(1/frcpa(1+ 254/256) +data8 0x3FE62643FECF9743 //ln(1/frcpa(1+ 255/256) +// +// [2;4) +data8 0xBEB2CC7A38B9355F,0x3F035F2D1833BF4C // A10,A9 +data8 0xBFF51BAA7FD27785,0x3FFC9D5D5B6CDEFF // A2,A1 +data8 0xBF421676F9CB46C7,0x3F7437F2FA1436C6 // A8,A7 +data8 0xBFD7A7041DE592FE,0x3FE9F107FEE8BD29 // A4,A3 +// [4;8) +data8 0x3F6BBBD68451C0CD,0xBF966EC3272A16F7 // A10,A9 +data8 0x40022A24A39AD769,0x4014190EDF49C8C5 // A2,A1 +data8 0x3FB130FD016EE241,0xBFC151B46E635248 // A8,A7 +data8 0x3FDE8F611965B5FE,0xBFEB5110EB265E3D // A4,A3 +// [8;16) +data8 0x3F736EF93508626A,0xBF9FE5DBADF58AF1 // A10,A9 +data8 0x40110A9FC5192058,0x40302008A6F96B29 // A2,A1 +data8 0x3FB8E74E0CE1E4B5,0xBFC9B5DA78873656 // A8,A7 +data8 0x3FE99D0DF10022DC,0xBFF829C0388F9484 // A4,A3 +// [16;32) +data8 0x3F7FFF9D6D7E9269,0xBFAA780A249AEDB1 // A10,A9 +data8 0x402082A807AEA080,0x4045ED9868408013 // A2,A1 +data8 0x3FC4E1E54C2F99B7,0xBFD5DE2D6FFF1490 // A8,A7 +data8 0x3FF75FC89584AE87,0xC006B4BADD886CAE // A4,A3 +// [32;64) +data8 0x3F8CE54375841A5F,0xBFB801ABCFFA1BE2 // A10,A9 +data8 0x403040A8B1815BDA,0x405B99A917D24B7A // A2,A1 +data8 0x3FD30CAB81BFFA03,0xBFE41AEF61ECF48B // A8,A7 +data8 0x400650CC136BEC43,0xC016022046E8292B // A4,A3 +// [64;128) +data8 0x3F9B69BD22CAA8B8,0xBFC6D48875B7A213 // A10,A9 +data8 0x40402028CCAA2F6D,0x40709AACEB3CBE0F // A2,A1 +data8 0x3FE22C6A5924761E,0xBFF342F5F224523D // A8,A7 +data8 0x4015CD405CCA331F,0xC025AAD10482C769 // A4,A3 +// [128;256) +data8 0x3FAAAD9CD0E40D06,0xBFD63FC8505D80CB // A10,A9 +data8 0x40501008D56C2648,0x408364794B0F4376 // A2,A1 +data8 0x3FF1BE0126E00284,0xC002D8E3F6F7F7CA // A8,A7 +data8 0x40258C757E95D860,0xC0357FA8FD398011 // A4,A3 +// [256;512) +data8 0x3FBA4DAC59D49FEB,0xBFE5F476D1C43A77 // A10,A9 +data8 0x40600800D890C7C6,0x40962C42AAEC8EF0 // A2,A1 +data8 0x40018680ECF19B89,0xC012A3EB96FB7BA4 // A8,A7 +data8 0x40356C4CDD3B60F9,0xC0456A34BF18F440 // A4,A3 +// [512;1024) +data8 0x3FCA1B54F6225A5A,0xBFF5CD67BA10E048 // A10,A9 +data8 0x407003FED94C58C2,0x40A8F30B4ACBCD22 // A2,A1 +data8 0x40116A135EB66D8C,0xC022891B1CED527E // A8,A7 +data8 0x40455C4617FDD8BC,0xC0555F82729E59C4 // A4,A3 +// [1024;2048) +data8 0x3FD9FFF9095C6EC9,0xC005B88CB25D76C9 // A10,A9 +data8 0x408001FE58FA734D,0x40BBB953BAABB0F3 // A2,A1 +data8 0x40215B2F9FEB5D87,0xC0327B539DEA5058 // A8,A7 +data8 0x40555444B3E8D64D,0xC0655A2B26F9FC8A // A4,A3 +// [2048;4096) +data8 0x3FE9F065A1C3D6B1,0xC015ACF6FAE8D78D // A10,A9 +data8 0x409000FE383DD2B7,0x40CE7F5C1E8BCB8B // A2,A1 +data8 0x40315324E5DB2EBE,0xC04274194EF70D18 // A8,A7 +data8 0x4065504353FF2207,0xC075577FE1BFE7B6 // A4,A3 +// [4096;8192) +data8 0x3FF9E6FBC6B1C70D,0xC025A62DAF76F85D // A10,A9 +data8 0x40A0007E2F61EBE8,0x40E0A2A23FB5F6C3 // A2,A1 +data8 0x40414E9BC0A0141A,0xC0527030F2B69D43 // A8,A7 +data8 0x40754E417717B45B,0xC085562A447258E5 // A4,A3 +// +data8 0xbfdffffffffaea15 // P1 +data8 0x3FDD8B618D5AF8FE // point of local minimum on [1;2] +data8 0x3FED67F1C864BEB5 // ln(sqrt(2*Pi)) +data8 0x4008000000000000 // 3.0 +// +data8 0xBF9E1C289FB224AB,0x3FBF7422445C9460 // A6,A5 +data8 0xBFF01E76D66F8D8A // A0 +data8 0xBFE2788CFC6F91DA // A1 [1.0;1.25) +data8 0x3FCB8CC69000EB5C,0xBFD41997A0C2C641 // A6,A5 +data8 0x3FFCAB0BFA0EA462 // A0 +data8 0xBFBF19B9BCC38A42 // A0 [1.25;1.5) +data8 0x3FD51EE4DE0A364C,0xBFE00D7F98A16E4B // A6,A5 +data8 0x40210CE1F327E9E4 // A0 +data8 0x4001DB08F9DFA0CC // A0 [1.5;1.75) +data8 0x3FE24F606742D252,0xBFEC81D7D12574EC // A6,A5 +data8 0x403BE636A63A9C27 // A0 +data8 0x4000A0CB38D6CF0A // A0 [1.75;2.0) +data8 0x3FF1029A9DD542B4,0xBFFAD37C209D3B25 // A6,A5 +data8 0x405385E6FD9BE7EA // A0 +data8 0x478895F1C0000000 // Overflow boundary +data8 0x400062D97D26B523,0xC00A03E1529FF023 // A6,A5 +data8 0x4069204C51E566CE // A0 +data8 0x0000000000000000 // pad +data8 0x40101476B38FD501,0xC0199DE7B387C0FC // A6,A5 +data8 0x407EB8DAEC83D759 // A0 +data8 0x0000000000000000 // pad +data8 0x401FDB008D65125A,0xC0296B506E665581 // A6,A5 +data8 0x409226D93107EF66 // A0 +data8 0x0000000000000000 // pad +data8 0x402FB3EAAF3E7B2D,0xC039521142AD8E0D // A6,A5 +data8 0x40A4EFA4F072792E // A0 +data8 0x0000000000000000 // pad +data8 0x403FA024C66B2563,0xC0494569F250E691 // A6,A5 +data8 0x40B7B747C9235BB8 // A0 +data8 0x0000000000000000 // pad +data8 0x404F9607D6DA512C,0xC0593F0B2EDDB4BC // A6,A5 +data8 0x40CA7E29C5F16DE2 // A0 +data8 0x0000000000000000 // pad +data8 0x405F90C5F613D98D,0xC0693BD130E50AAF // A6,A5 +data8 0x40DD4495238B190C // A0 +data8 0x0000000000000000 // pad +// +// polynomial approximation of ln(sin(Pi*x)/(Pi*x)), |x| <= 0.5 +data8 0xBFD58731A486E820,0xBFA4452CC28E15A9 // S16,S14 +data8 0xBFD013F6E1B86C4F,0xBFD5B3F19F7A341F // S8,S6 +data8 0xBFC86A0D5252E778,0xBFC93E08C9EE284B // S12,S10 +data8 0xBFE15132555C9EDD,0xBFFA51A662480E35 // S4,S2 +// +// [1.0;1.25) +data8 0xBFA697D6775F48EA,0x3FB9894B682A98E7 // A9,A8 +data8 0xBFCA8969253CFF55,0x3FD15124EFB35D9D // A5,A4 +data8 0xBFC1B00158AB719D,0x3FC5997D04E7F1C1 // A7,A6 +data8 0xBFD9A4D50BAFF989,0x3FEA51A661F5176A // A3,A2 +// [1.25;1.5) +data8 0x3F838E0D35A6171A,0xBF831BBBD61313B7 // A8,A7 +data8 0x3FB08B40196425D0,0xBFC2E427A53EB830 // A4,A3 +data8 0x3F9285DDDC20D6C3,0xBFA0C90C9C223044 // A6,A5 +data8 0x3FDEF72BC8F5287C,0x3D890B3DAEBC1DFC // A2,A1 +// [1.5;1.75) +data8 0x3F65D5A7EB31047F,0xBFA44EAC9BFA7FDE // A8,A7 +data8 0x40051FEFE7A663D8,0xC012A5CFE00A2522 // A4,A3 +data8 0x3FD0E1583AB00E08,0xBFF084AF95883BA5 // A6,A5 +data8 0x40185982877AE0A2,0xC015F83DB73B57B7 // A2,A1 +// [1.75;2.0) +data8 0x3F4A9222032EB39A,0xBF8CBC9587EEA5A3 // A8,A7 +data8 0x3FF795400783BE49,0xC00851BC418B8A25 // A4,A3 +data8 0x3FBBC992783E8C5B,0xBFDFA67E65E89B29 // A6,A5 +data8 0x4012B408F02FAF88,0xC013284CE7CB0C39 // A2,A1 +// +// roots +data8 0xC003A7FC9600F86C // -2.4570247382208005860 +data8 0xC009260DBC9E59AF // -3.1435808883499798405 +data8 0xC005FB410A1BD901 // -2.7476826467274126919 +data8 0xC00FA471547C2FE5 // -3.9552942848585979085 +// +// polynomial approximation of ln(GAMMA(x)) near roots +// near -2.4570247382208005860 +data8 0x3FF694A6058D9592,0x40136EEBB003A92B // R3,R2 +data8 0x3FF83FE966AF5360,0x3C90323B6D1FE86D // R1,R0 +// near -3.1435808883499798405 +data8 0x405C11371268DA38,0x4039D4D2977D2C23 // R3,R2 +data8 0x401F20A65F2FAC62,0x3CDE9605E3AE7A62 // R1,R0 +// near -2.7476826467274126919 +data8 0xC034185AC31314FF,0x4023267F3C28DFE3 // R3,R2 +data8 0xBFFEA12DA904B194,0x3CA8FB8530BA7689 // R1,R0 +// near -2.7476826467274126919 +data8 0xC0AD25359E70C888,0x406F76DEAEA1B8C6 // R3,R2 +data8 0xC034B99D966C5644,0xBCBDDC0336980B58 // R1,R0 +LOCAL_OBJECT_END(lgammaf_data) + +//********************************************************************* + +.section .text +GLOBAL_LIBM_ENTRY(__libm_lgammaf) +{ .mfi + getf.exp GR_SignExp = f8 + frcpa.s1 FR_InvX,p0 = f1,f8 + mov GR_ExpOf2 = 0x10000 +} +{ .mfi + addl GR_ad_Data = @ltoff(lgammaf_data),gp + fcvt.fx.s1 FR_int_N = f8 + mov GR_ExpMask = 0x1ffff +};; +{ .mfi + getf.sig GR_Sig = f8 + fclass.m p13,p0 = f8,0x1EF // is x NaTVal, NaN, + // +/-0, +/-INF or +/-deno? + mov GR_ExpBias = 0xffff +} +{ .mfi + ld8 GR_ad_Data = [GR_ad_Data] + fma.s1 FR_Xp1 = f8,f1,f1 + mov GR_StirlBound = 0x1000C +};; +{ .mfi + setf.exp FR_2 = GR_ExpOf2 + fmerge.se FR_x = f1,f8 + dep.z GR_Ind = GR_SignExp,3,4 +} +{ .mfi + cmp.eq p8,p0 = GR_SignExp,GR_ExpBias + fcvt.fx.trunc.s1 FR_int_Ntrunc = f8 + and GR_Exp = GR_ExpMask,GR_SignExp +};; +{ .mfi + add GR_ad_C650 = 0xB20,GR_ad_Data + fcmp.lt.s1 p14,p15 = f8,f0 + extr.u GR_Ind4T = GR_Sig,55,8 +} +{ .mfb + sub GR_PureExp = GR_Exp,GR_ExpBias + fnorm.s1 FR_NormX = f8 + // jump if x is NaTVal, NaN, +/-0, +/-INF or +/-deno +(p13) br.cond.spnt lgammaf_spec +};; +lgammaf_core: +{ .mfi + ldfpd FR_P1,FR_LocalMin = [GR_ad_C650],16 + fms.s1 FR_xm2 = f8,f1,f1 + add GR_ad_Co = 0x820,GR_ad_Data +} +{ .mib + ldfpd FR_P3,FR_P2 = [GR_ad_Data],16 + cmp.ltu p9,p0 = GR_SignExp,GR_ExpBias + // jump if x is from the interval [1; 2) +(p8) br.cond.spnt lgammaf_1_2 +};; +{ .mfi + setf.sig FR_int_Ln = GR_PureExp + fms.s1 FR_r = FR_InvX,f8,f1 + shladd GR_ad_Co = GR_Ind,3,GR_ad_Co +} +{ .mib + ldfpd FR_LnSqrt2Pi,FR_3 = [GR_ad_C650],16 + cmp.lt p13,p12 = GR_Exp,GR_StirlBound + // jump if x is from the interval (0; 1) +(p9) br.cond.spnt lgammaf_0_1 +};; +{ .mfi + ldfpd FR_Ln2,FR_05 = [GR_ad_Data],16 + fma.s1 FR_Xp2 = f1,f1,FR_Xp1 // (x+2) + shladd GR_ad_C650 = GR_Ind,2,GR_ad_C650 +} +{ .mfi + add GR_ad_Ce = 0x20,GR_ad_Co + nop.f 0 + add GR_ad_C43 = 0x30,GR_ad_Co +};; +{ .mfi + // load coefficients of polynomial approximation + // of ln(GAMMA(x)), 2 <= x < 2^13 +(p13) ldfpd FR_A10,FR_A9 = [GR_ad_Co],16 + fcvt.xf FR_N = FR_int_N + cmp.eq.unc p6,p7 = GR_ExpOf2,GR_SignExp +} +{ .mib +(p13) ldfpd FR_A8,FR_A7 = [GR_ad_Ce] +(p14) cmp.le.unc p9,p0 = GR_StirlBound,GR_Exp + // jump if x is less or equal to -2^13 +(p9) br.cond.spnt lgammaf_negstirling +};; +.pred.rel "mutex",p6,p7 +{ .mfi +(p13) ldfpd FR_A6,FR_A5 = [GR_ad_C650],16 +(p6) fma.s1 FR_x = f0,f0,FR_NormX + shladd GR_ad_T = GR_Ind4T,3,GR_ad_Data +} +{ .mfi +(p13) ldfpd FR_A4,FR_A3 = [GR_ad_C43] +(p7) fms.s1 FR_x = FR_x,f1,f1 +(p14) mov GR_ReqBound = 0x20005 +};; +{ .mfi +(p13) ldfpd FR_A2,FR_A1 = [GR_ad_Co],16 + fms.s1 FR_xm2 = FR_xm2,f1,f1 +(p14) extr.u GR_Arg = GR_Sig,60,4 +} +{ .mfi + mov GR_SignOfGamma = 1 // set sign of gamma(x) to 1 + fcvt.xf FR_Ntrunc = FR_int_Ntrunc + nop.i 0 +};; +{ .mfi + ldfd FR_T = [GR_ad_T] + fma.s1 FR_r2 = FR_r,FR_r,f0 + shl GR_ReqBound = GR_ReqBound,3 +} +{ .mfi + add GR_ad_Co = 0xCA0,GR_ad_Data + fnma.s1 FR_Req = FR_Xp1,FR_NormX,f0 // -x*(x+1) +(p14) shladd GR_Arg = GR_Exp,4,GR_Arg +};; +{ .mfi +(p13) ldfd FR_A0 = [GR_ad_C650] + fma.s1 FR_Xp3 = FR_2,f1,FR_Xp1 // (x+3) +(p14) cmp.le.unc p9,p0 = GR_Arg,GR_ReqBound +} +{ .mfi +(p14) add GR_ad_Ce = 0x20,GR_ad_Co + fma.s1 FR_Xp4 = FR_2,FR_2,FR_NormX // (x+4) +(p15) add GR_ad_OvfBound = 0xBB8,GR_ad_Data +};; +{ .mfi + // load coefficients of polynomial approximation + // of ln(sin(Pi*xf)/(Pi*xf)), |xf| <= 0.5 +(p14) ldfpd FR_S16,FR_S14 = [GR_ad_Co],16 +(p14) fms.s1 FR_Xf = FR_NormX,f1,FR_N // xf = x - [x] +(p14) sub GR_SignOfGamma = r0,GR_SignOfGamma // set sign of + // gamma(x) to -1 +} +{ .mfb +(p14) ldfpd FR_S12,FR_S10 = [GR_ad_Ce],16 + fma.s1 FR_Xp5 = FR_2,FR_2,FR_Xp1 // (x+5) + // jump if x is from the interval (-9; 0) +(p9) br.cond.spnt lgammaf_negrecursion +};; +{ .mfi +(p14) ldfpd FR_S8,FR_S6 = [GR_ad_Co],16 + fma.s1 FR_P32 = FR_P3,FR_r,FR_P2 + nop.i 0 +} +{ .mfb +(p14) ldfpd FR_S4,FR_S2 = [GR_ad_Ce],16 + fma.s1 FR_x2 = FR_x,FR_x,f0 + // jump if x is from the interval (-2^13; -9) +(p14) br.cond.spnt lgammaf_negpoly +};; +{ .mfi + ldfd FR_OverflowBound = [GR_ad_OvfBound] +(p12) fcvt.xf FR_N = FR_int_Ln + // set p9 if signgum is 32-bit int + // set p10 if signgum is 64-bit int + cmp.eq p10,p9 = 8,r34 +} +{ .mfi + nop.m 0 +(p12) fma.s1 FR_P10 = FR_P1,FR_r,f1 + nop.i 0 +};; +.pred.rel "mutex",p6,p7 +.pred.rel "mutex",p9,p10 +{ .mfi + // store sign of gamma(x) as 32-bit int +(p9) st4 [r33] = GR_SignOfGamma +(p6) fma.s1 FR_xx = FR_x,FR_xm2,f0 + nop.i 0 +} +{ .mfi + // store sign of gamma(x) as 64-bit int +(p10) st8 [r33] = GR_SignOfGamma +(p7) fma.s1 FR_xx = f0,f0,FR_x + nop.i 0 +};; +{ .mfi + nop.m 0 +(p13) fma.s1 FR_A9 = FR_A10,FR_x,FR_A9 + nop.i 0 +} +{ .mfi + nop.m 0 +(p13) fma.s1 FR_A7 = FR_A8,FR_x,FR_A7 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p13) fma.s1 FR_A5 = FR_A6,FR_x,FR_A5 + nop.i 0 +} +{ .mfi + nop.m 0 +(p13) fma.s1 FR_A3 = FR_A4,FR_x,FR_A3 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p15) fcmp.eq.unc.s1 p8,p0 = FR_NormX,FR_2 // is input argument 2.0? + nop.i 0 +} +{ .mfi + nop.m 0 +(p13) fma.s1 FR_A1 = FR_A2,FR_x,FR_A1 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p12) fma.s1 FR_T = FR_N,FR_Ln2,FR_T + nop.i 0 +} +{ .mfi + nop.m 0 +(p12) fma.s1 FR_P32 = FR_P32,FR_r2,FR_P10 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p13) fma.s1 FR_x4 = FR_x2,FR_x2,f0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p13) fma.s1 FR_x3 = FR_x2,FR_xx,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p13) fma.s1 FR_A7 = FR_A9,FR_x2,FR_A7 + nop.i 0 +} +{ .mfb + nop.m 0 +(p8) fma.s.s0 f8 = f0,f0,f0 +(p8) br.ret.spnt b0 // fast exit for 2.0 +};; +{ .mfi + nop.m 0 +(p6) fma.s1 FR_A0 = FR_A0,FR_xm2,f0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p13) fma.s1 FR_A3 = FR_A5,FR_x2,FR_A3 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p15) fcmp.le.unc.s1 p8,p0 = FR_OverflowBound,FR_NormX // overflow test + nop.i 0 +} +{ .mfi + nop.m 0 +(p12) fms.s1 FR_xm05 = FR_NormX,f1,FR_05 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p12) fma.s1 FR_Ln = FR_P32,FR_r,FR_T + nop.i 0 +} +{ .mfi + nop.m 0 +(p12) fms.s1 FR_LnSqrt2Pi = FR_LnSqrt2Pi,f1,FR_NormX + nop.i 0 +};; +{ .mfi + nop.m 0 +(p13) fma.s1 FR_A0 = FR_A1,FR_xx,FR_A0 + nop.i 0 +} +{ .mfb + nop.m 0 +(p13) fma.s1 FR_A3 = FR_A7,FR_x4,FR_A3 + // jump if result overflows +(p8) br.cond.spnt lgammaf_overflow +};; +.pred.rel "mutex",p12,p13 +{ .mfi + nop.m 0 +(p12) fma.s.s0 f8 = FR_Ln,FR_xm05,FR_LnSqrt2Pi + nop.i 0 +} +{ .mfb + nop.m 0 +(p13) fma.s.s0 f8 = FR_A3,FR_x3,FR_A0 + br.ret.sptk b0 +};; +// branch for calculating of ln(GAMMA(x)) for 0 < x < 1 +//--------------------------------------------------------------------- +.align 32 +lgammaf_0_1: +{ .mfi + getf.sig GR_Ind = FR_Xp1 + fma.s1 FR_r2 = FR_r,FR_r,f0 + mov GR_fff7 = 0xFFF7 +} +{ .mfi + ldfpd FR_Ln2,FR_05 = [GR_ad_Data],16 + fma.s1 FR_P32 = FR_P3,FR_r,FR_P2 + // input argument cann't be equal to 1.0 + cmp.eq p0,p14 = r0,r0 +};; +{ .mfi + getf.exp GR_Exp = FR_w + fcvt.xf FR_N = FR_int_Ln + add GR_ad_Co = 0xCE0,GR_ad_Data +} +{ .mfi + shladd GR_ad_T = GR_Ind4T,3,GR_ad_Data + fma.s1 FR_P10 = FR_P1,FR_r,f1 + add GR_ad_Ce = 0xD00,GR_ad_Data +};; +{ .mfi + ldfd FR_T = [GR_ad_T] + fma.s1 FR_w2 = FR_w,FR_w,f0 + extr.u GR_Ind = GR_Ind,61,2 +} +{ .mfi + nop.m 0 + fma.s1 FR_Q32 = FR_P3,FR_w,FR_P2 +//// add GR_ad_C0 = 0xB30,GR_ad_Data + add GR_ad_C0 = 0xB38,GR_ad_Data +};; +{ .mfi + and GR_Exp = GR_Exp,GR_ExpMask + nop.f 0 + shladd GR_IndX8 = GR_Ind,3,r0 +} +{ .mfi + shladd GR_IndX2 = GR_Ind,1,r0 + fma.s1 FR_Q10 = FR_P1,FR_w,f1 + cmp.eq p6,p15 = 0,GR_Ind +};; +{ .mfi + shladd GR_ad_Co = GR_IndX8,3,GR_ad_Co +(p6) fma.s1 FR_x = f0,f0,FR_NormX + shladd GR_ad_C0 = GR_IndX2,4,GR_ad_C0 +} +{ .mfi + shladd GR_ad_Ce = GR_IndX8,3,GR_ad_Ce + nop.f 0 +(p15) cmp.eq.unc p7,p8 = 1,GR_Ind +};; +.pred.rel "mutex",p7,p8 +{ .mfi + ldfpd FR_A8,FR_A7 = [GR_ad_Co],16 +(p7) fms.s1 FR_x = FR_NormX,f1,FR_LocalMin + cmp.ge p10,p11 = GR_Exp,GR_fff7 +} +{ .mfb + ldfpd FR_A6,FR_A5 = [GR_ad_Ce],16 +(p8) fma.s1 FR_x = f1,f1,FR_NormX + br.cond.sptk lgamma_0_2_core +};; +// branch for calculating of ln(GAMMA(x)) for 1 <= x < 2 +//--------------------------------------------------------------------- +.align 32 +lgammaf_1_2: +{ .mfi + add GR_ad_Co = 0xCF0,GR_ad_Data + fcmp.eq.s1 p14,p0 = f1,FR_NormX // is input argument 1.0? + extr.u GR_Ind = GR_Sig,61,2 +} +{ .mfi + add GR_ad_Ce = 0xD10,GR_ad_Data + nop.f 0 +//// add GR_ad_C0 = 0xB40,GR_ad_Data + add GR_ad_C0 = 0xB48,GR_ad_Data +};; +{ .mfi + shladd GR_IndX8 = GR_Ind,3,r0 + nop.f 0 + shladd GR_IndX2 = GR_Ind,1,r0 +} +{ .mfi + cmp.eq p6,p15 = 0,GR_Ind // p6 <- x from [1;1.25) + nop.f 0 + cmp.ne p9,p0 = r0,r0 +};; +{ .mfi + shladd GR_ad_Co = GR_IndX8,3,GR_ad_Co +(p6) fms.s1 FR_x = FR_NormX,f1,f1 // reduced x for [1;1.25) + shladd GR_ad_C0 = GR_IndX2,4,GR_ad_C0 +} +{ .mfi + shladd GR_ad_Ce = GR_IndX8,3,GR_ad_Ce +(p14) fma.s.s0 f8 = f0,f0,f0 +(p15) cmp.eq.unc p7,p8 = 1,GR_Ind // p7 <- x from [1.25;1.5) +};; +.pred.rel "mutex",p7,p8 +{ .mfi + ldfpd FR_A8,FR_A7 = [GR_ad_Co],16 +(p7) fms.s1 FR_x = FR_xm2,f1,FR_LocalMin + nop.i 0 +} +{ .mfi + ldfpd FR_A6,FR_A5 = [GR_ad_Ce],16 +(p8) fma.s1 FR_x = f0,f0,FR_NormX +(p9) cmp.eq.unc p10,p11 = r0,r0 +};; +lgamma_0_2_core: +{ .mmi + ldfpd FR_A4,FR_A3 = [GR_ad_Co],16 + ldfpd FR_A2,FR_A1 = [GR_ad_Ce],16 + mov GR_SignOfGamma = 1 // set sign of gamma(x) to 1 +};; +{ .mfi +// add GR_ad_C0 = 8,GR_ad_C0 + ldfd FR_A0 = [GR_ad_C0] + nop.f 0 + // set p13 if signgum is 32-bit int + // set p15 if signgum is 64-bit int + cmp.eq p15,p13 = 8,r34 +};; +.pred.rel "mutex",p13,p15 +{ .mmf + // store sign of gamma(x) +(p13) st4 [r33] = GR_SignOfGamma // as 32-bit int +(p15) st8 [r33] = GR_SignOfGamma // as 64-bit int +(p11) fma.s1 FR_Q32 = FR_Q32,FR_w2,FR_Q10 +};; +{ .mfb + nop.m 0 +(p10) fma.s1 FR_P32 = FR_P32,FR_r2,FR_P10 +(p14) br.ret.spnt b0 // fast exit for 1.0 +};; +{ .mfi + nop.m 0 +(p10) fma.s1 FR_T = FR_N,FR_Ln2,FR_T + cmp.eq p6,p7 = 0,GR_Ind // p6 <- x from [1;1.25) +} +{ .mfi + nop.m 0 + fma.s1 FR_x2 = FR_x,FR_x,f0 + cmp.eq p8,p0 = r0,r0 // set p8 to 1 that means we on [1;2] +};; +{ .mfi + nop.m 0 +(p11) fma.s1 FR_Ln = FR_Q32,FR_w,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + nop.f 0 + nop.i 0 +};; +.pred.rel "mutex",p6,p7 +{ .mfi + nop.m 0 +(p6) fma.s1 FR_xx = f0,f0,FR_x + nop.i 0 +} +{ .mfi + nop.m 0 +(p7) fma.s1 FR_xx = f0,f0,f1 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A7 = FR_A8,FR_x,FR_A7 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_A5 = FR_A6,FR_x,FR_A5 +(p9) cmp.ne p8,p0 = r0,r0 // set p8 to 0 that means we on [0;1] +};; +{ .mfi + nop.m 0 + fma.s1 FR_A3 = FR_A4,FR_x,FR_A3 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_A1 = FR_A2,FR_x,FR_A1 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_x4 = FR_x2,FR_x2,f0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p10) fma.s1 FR_Ln = FR_P32,FR_r,FR_T + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A5 = FR_A7,FR_x2,FR_A5 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_A1 = FR_A3,FR_x2,FR_A1 + nop.i 0 +};; +.pred.rel "mutex",p9,p8 +{ .mfi + nop.m 0 +(p9) fms.d.s1 FR_A0 = FR_A0,FR_xx,FR_Ln + nop.i 0 +} +{ .mfi + nop.m 0 +(p8) fms.s1 FR_A0 = FR_A0,FR_xx,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.d.s1 FR_A1 = FR_A5,FR_x4,FR_A1 + nop.i 0 +} +{ .mfi + nop.m 0 + nop.f 0 + nop.i 0 +};; +.pred.rel "mutex",p6,p7 +{ .mfi + nop.m 0 +(p6) fma.s.s0 f8 = FR_A1,FR_x2,FR_A0 + nop.i 0 +} +{ .mfb + nop.m 0 +(p7) fma.s.s0 f8 = FR_A1,FR_x,FR_A0 + br.ret.sptk b0 +};; +// branch for calculating of ln(GAMMA(x)) for -9 < x < 1 +//--------------------------------------------------------------------- +.align 32 +lgammaf_negrecursion: +{ .mfi + getf.sig GR_N = FR_int_Ntrunc + fms.s1 FR_1pXf = FR_Xp2,f1,FR_Ntrunc // 1 + (x+1) - [x] + mov GR_Neg2 = 2 +} +{ .mfi + add GR_ad_Co = 0xCE0,GR_ad_Data + fms.s1 FR_Xf = FR_Xp1,f1,FR_Ntrunc // (x+1) - [x] + mov GR_Neg4 = 4 +};; +{ .mfi + add GR_ad_Ce = 0xD00,GR_ad_Data + fma.s1 FR_Xp6 = FR_2,FR_2,FR_Xp2 // (x+6) + add GR_ad_C0 = 0xB30,GR_ad_Data +} +{ .mfi + sub GR_Neg2 = r0,GR_Neg2 + fma.s1 FR_Xp7 = FR_2,FR_3,FR_Xp1 // (x+7) + sub GR_Neg4 = r0,GR_Neg4 +};; +{ .mfi + cmp.ne p8,p0 = r0,GR_N + fcmp.eq.s1 p13,p0 = FR_NormX,FR_Ntrunc + and GR_IntNum = 0xF,GR_N +} +{ .mfi + cmp.lt p6,p0 = GR_N,GR_Neg2 + fma.s1 FR_Xp8 = FR_2,FR_3,FR_Xp2 // (x+8) + cmp.lt p7,p0 = GR_N,GR_Neg4 +};; +{ .mfi + getf.d GR_Arg = FR_NormX +(p6) fma.s1 FR_Xp2 = FR_Xp2,FR_Xp3,f0 +(p8) tbit.z.unc p14,p15 = GR_IntNum,0 +} +{ .mfi + sub GR_RootInd = 0xE,GR_IntNum +(p7) fma.s1 FR_Xp4 = FR_Xp4,FR_Xp5,f0 + add GR_ad_Root = 0xDE0,GR_ad_Data +};; +{ .mfi + shladd GR_ad_Root = GR_RootInd,3,GR_ad_Root + fms.s1 FR_x = FR_Xp1,f1,FR_Ntrunc // (x+1) - [x] + nop.i 0 +} +{ .mfb + nop.m 0 + nop.f 0 +(p13) br.cond.spnt lgammaf_singularity +};; +.pred.rel "mutex",p14,p15 +{ .mfi + cmp.gt p6,p0 = 0xA,GR_IntNum +(p14) fma.s1 FR_Req = FR_Req,FR_Xf,f0 + cmp.gt p7,p0 = 0xD,GR_IntNum +} +{ .mfi +(p15) mov GR_SignOfGamma = 1 // set sign of gamma(x) to 1 +(p15) fnma.s1 FR_Req = FR_Req,FR_Xf,f0 + cmp.leu p0,p13 = 2,GR_RootInd +};; +{ .mfi + nop.m 0 +(p6) fma.s1 FR_Xp6 = FR_Xp6,FR_Xp7,f0 +(p13) add GR_ad_RootCo = 0xE00,GR_ad_Data +};; +{ .mfi + nop.m 0 + fcmp.eq.s1 p12,p11 = FR_1pXf,FR_2 + nop.i 0 +};; +{ .mfi + getf.sig GR_Sig = FR_1pXf + fcmp.le.s1 p9,p0 = FR_05,FR_Xf + nop.i 0 +} +{ .mfi +(p13) shladd GR_RootInd = GR_RootInd,4,r0 +(p7) fma.s1 FR_Xp2 = FR_Xp2,FR_Xp4,f0 +(p8) cmp.gt.unc p10,p0 = 0x9,GR_IntNum +};; +.pred.rel "mutex",p11,p12 +{ .mfi + nop.m 0 +(p10) fma.s1 FR_Req = FR_Req,FR_Xp8,f0 +(p11) extr.u GR_Ind = GR_Sig,61,2 +} +{ .mfi +(p13) add GR_RootInd = GR_RootInd,GR_RootInd + nop.f 0 +(p12) mov GR_Ind = 3 +};; +{ .mfi + shladd GR_IndX2 = GR_Ind,1,r0 + nop.f 0 + cmp.gt p14,p0 = 2,GR_Ind +} +{ .mfi + shladd GR_IndX8 = GR_Ind,3,r0 + nop.f 0 + cmp.eq p6,p0 = 1,GR_Ind +};; +.pred.rel "mutex",p6,p9 +{ .mfi + shladd GR_ad_Co = GR_IndX8,3,GR_ad_Co +(p6) fms.s1 FR_x = FR_Xf,f1,FR_LocalMin + cmp.gt p10,p0 = 0xB,GR_IntNum +} +{ .mfi + shladd GR_ad_Ce = GR_IndX8,3,GR_ad_Ce +(p9) fma.s1 FR_x = f0,f0,FR_1pXf + shladd GR_ad_C0 = GR_IndX2,4,GR_ad_C0 +};; +{ .mfi + // load coefficients of polynomial approximation + // of ln(GAMMA(x)), 1 <= x < 2 + ldfpd FR_A8,FR_A7 = [GR_ad_Co],16 +(p10) fma.s1 FR_Xp2 = FR_Xp2,FR_Xp6,f0 + add GR_ad_C0 = 8,GR_ad_C0 +} +{ .mfi + ldfpd FR_A6,FR_A5 = [GR_ad_Ce],16 + nop.f 0 +(p14) add GR_ad_Root = 0x10,GR_ad_Root +};; +{ .mfi + ldfpd FR_A4,FR_A3 = [GR_ad_Co],16 + nop.f 0 + add GR_ad_RootCe = 0xE10,GR_ad_Data +} +{ .mfi + ldfpd FR_A2,FR_A1 = [GR_ad_Ce],16 + nop.f 0 +(p14) add GR_RootInd = 0x40,GR_RootInd +};; +{ .mmi + ldfd FR_A0 = [GR_ad_C0] +(p13) add GR_ad_RootCo = GR_ad_RootCo,GR_RootInd +(p13) add GR_ad_RootCe = GR_ad_RootCe,GR_RootInd +};; +{ .mmi +(p13) ld8 GR_Root = [GR_ad_Root] +(p13) ldfd FR_Root = [GR_ad_Root] + mov GR_ExpBias = 0xffff +};; +{ .mfi + nop.m 0 + fma.s1 FR_x2 = FR_x,FR_x,f0 + nop.i 0 +} +{ .mlx +(p8) cmp.gt.unc p10,p0 = 0xF,GR_IntNum + movl GR_Dx = 0x000000014F8B588E +};; +{ .mfi + // load coefficients of polynomial approximation + // of ln(GAMMA(x)), x is close to one of negative roots +(p13) ldfpd FR_R3,FR_R2 = [GR_ad_RootCo] + // argumenth for logarithm +(p10) fma.s1 FR_Req = FR_Req,FR_Xp2,f0 + mov GR_ExpMask = 0x1ffff +} +{ .mfi +(p13) ldfpd FR_R1,FR_R0 = [GR_ad_RootCe] + nop.f 0 + // set p9 if signgum is 32-bit int + // set p8 if signgum is 64-bit int + cmp.eq p8,p9 = 8,r34 +};; +.pred.rel "mutex",p9,p8 +{ .mfi +(p9) st4 [r33] = GR_SignOfGamma // as 32-bit int + fma.s1 FR_A7 = FR_A8,FR_x,FR_A7 +(p13) sub GR_Root = GR_Arg,GR_Root +} +{ .mfi +(p8) st8 [r33] = GR_SignOfGamma // as 64-bit int + fma.s1 FR_A5 = FR_A6,FR_x,FR_A5 + nop.i 0 +};; +{ .mfi + nop.m 0 + fms.s1 FR_w = FR_Req,f1,f1 +(p13) add GR_Root = GR_Root,GR_Dx +} +{ .mfi + nop.m 0 + nop.f 0 +(p13) add GR_2xDx = GR_Dx,GR_Dx +};; +{ .mfi + nop.m 0 + fma.s1 FR_A3 = FR_A4,FR_x,FR_A3 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_A1 = FR_A2,FR_x,FR_A1 +(p13) cmp.leu.unc p10,p0 = GR_Root,GR_2xDx +};; +{ .mfi + nop.m 0 + frcpa.s1 FR_InvX,p0 = f1,FR_Req + nop.i 0 +} +{ .mfi + nop.m 0 +(p10) fms.s1 FR_rx = FR_NormX,f1,FR_Root + nop.i 0 +};; +{ .mfi + getf.exp GR_SignExp = FR_Req + fma.s1 FR_x4 = FR_x2,FR_x2,f0 + nop.i 0 +};; +{ .mfi + getf.sig GR_Sig = FR_Req + fma.s1 FR_A5 = FR_A7,FR_x2,FR_A5 + nop.i 0 +};; +{ .mfi + sub GR_PureExp = GR_SignExp,GR_ExpBias + fma.s1 FR_w2 = FR_w,FR_w,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_Q32 = FR_P3,FR_w,FR_P2 + nop.i 0 +};; +{ .mfi + setf.sig FR_int_Ln = GR_PureExp + fma.s1 FR_A1 = FR_A3,FR_x2,FR_A1 + extr.u GR_Ind4T = GR_Sig,55,8 +} +{ .mfi + nop.m 0 + fma.s1 FR_Q10 = FR_P1,FR_w,f1 + nop.i 0 +};; +{ .mfi + shladd GR_ad_T = GR_Ind4T,3,GR_ad_Data + fms.s1 FR_r = FR_InvX,FR_Req,f1 + nop.i 0 +} +{ .mfi + nop.m 0 +(p10) fms.s1 FR_rx2 = FR_rx,FR_rx,f0 + nop.i 0 +};; +{ .mfi + ldfd FR_T = [GR_ad_T] +(p10) fma.s1 FR_R2 = FR_R3,FR_rx,FR_R2 + nop.i 0 +} +{ .mfi + nop.m 0 +(p10) fma.s1 FR_R0 = FR_R1,FR_rx,FR_R0 + nop.i 0 +};; +{ .mfi + getf.exp GR_Exp = FR_w + fma.s1 FR_A1 = FR_A5,FR_x4,FR_A1 + mov GR_ExpMask = 0x1ffff +} +{ .mfi + nop.m 0 + fma.s1 FR_Q32 = FR_Q32, FR_w2,FR_Q10 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_r2 = FR_r,FR_r,f0 + mov GR_fff7 = 0xFFF7 +} +{ .mfi + nop.m 0 + fma.s1 FR_P32 = FR_P3,FR_r,FR_P2 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_P10 = FR_P1,FR_r,f1 + and GR_Exp = GR_ExpMask,GR_Exp +} +{ .mfb + nop.m 0 +(p10) fma.s.s0 f8 = FR_R2,FR_rx2,FR_R0 +(p10) br.ret.spnt b0 // exit for arguments close to negative roots +};; +{ .mfi + nop.m 0 + fcvt.xf FR_N = FR_int_Ln + nop.i 0 +} +{ .mfi + cmp.ge p14,p15 = GR_Exp,GR_fff7 + nop.f 0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A0 = FR_A1,FR_x,FR_A0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p15) fma.s1 FR_Ln = FR_Q32,FR_w,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p14) fma.s1 FR_P32 = FR_P32,FR_r2,FR_P10 + cmp.eq p6,p7 = 0,GR_Ind +};; +{ .mfi + nop.m 0 +(p14) fma.s1 FR_T = FR_N,FR_Ln2,FR_T + nop.i 0 +};; +{ .mfi + nop.m 0 +(p14) fma.s1 FR_Ln = FR_P32,FR_r,FR_T + nop.i 0 +};; +.pred.rel "mutex",p6,p7 +{ .mfi + nop.m 0 +(p6) fms.s.s0 f8 = FR_A0,FR_x,FR_Ln + nop.i 0 +} +{ .mfb + nop.m 0 +(p7) fms.s.s0 f8 = FR_A0,f1,FR_Ln + br.ret.sptk b0 +};; + +// branch for calculating of ln(GAMMA(x)) for x < -2^13 +//--------------------------------------------------------------------- +.align 32 +lgammaf_negstirling: +{ .mfi + shladd GR_ad_T = GR_Ind4T,3,GR_ad_Data + fms.s1 FR_Xf = FR_NormX,f1,FR_N // xf = x - [x] + mov GR_SingBound = 0x10016 +} +{ .mfi + add GR_ad_Co = 0xCA0,GR_ad_Data + fma.s1 FR_P32 = FR_P3,FR_r,FR_P2 + nop.i 0 +};; +{ .mfi + ldfd FR_T = [GR_ad_T] + fcvt.xf FR_int_Ln = FR_int_Ln + cmp.le p6,p0 = GR_SingBound,GR_Exp +} +{ .mfb + add GR_ad_Ce = 0x20,GR_ad_Co + fma.s1 FR_r2 = FR_r,FR_r,f0 +(p6) br.cond.spnt lgammaf_singularity +};; +{ .mfi + // load coefficients of polynomial approximation + // of ln(sin(Pi*xf)/(Pi*xf)), |xf| <= 0.5 + ldfpd FR_S16,FR_S14 = [GR_ad_Co],16 + fma.s1 FR_P10 = FR_P1,FR_r,f1 + nop.i 0 +} +{ .mfi + ldfpd FR_S12,FR_S10 = [GR_ad_Ce],16 + fms.s1 FR_xm05 = FR_NormX,f1,FR_05 + nop.i 0 +};; +{ .mmi + ldfpd FR_S8,FR_S6 = [GR_ad_Co],16 + ldfpd FR_S4,FR_S2 = [GR_ad_Ce],16 + nop.i 0 +};; +{ .mfi + getf.sig GR_N = FR_int_Ntrunc // signgam calculation + fma.s1 FR_Xf2 = FR_Xf,FR_Xf,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + frcpa.s1 FR_InvXf,p0 = f1,FR_Xf + nop.i 0 +};; +{ .mfi + getf.d GR_Arg = FR_Xf + fcmp.eq.s1 p6,p0 = FR_NormX,FR_N + mov GR_ExpBias = 0x3FF +};; +{ .mfi + nop.m 0 + fma.s1 FR_T = FR_int_Ln,FR_Ln2,FR_T + extr.u GR_Exp = GR_Arg,52,11 +} +{ .mfi + nop.m 0 + fma.s1 FR_P32 = FR_P32,FR_r2,FR_P10 + nop.i 0 +};; +{ .mfi + sub GR_PureExp = GR_Exp,GR_ExpBias + fma.s1 FR_S14 = FR_S16,FR_Xf2,FR_S14 + extr.u GR_Ind4T = GR_Arg,44,8 +} +{ .mfb + mov GR_SignOfGamma = 1 // set signgam to -1 + fma.s1 FR_S10 = FR_S12,FR_Xf2,FR_S10 +(p6) br.cond.spnt lgammaf_singularity +};; +{ .mfi + setf.sig FR_int_Ln = GR_PureExp + fms.s1 FR_rf = FR_InvXf,FR_Xf,f1 + // set p14 if GR_N is even + tbit.z p14,p0 = GR_N,0 +} +{ .mfi + shladd GR_ad_T = GR_Ind4T,3,GR_ad_Data + fma.s1 FR_Xf4 = FR_Xf2,FR_Xf2,f0 + nop.i 0 +};; +{ .mfi +(p14) sub GR_SignOfGamma = r0,GR_SignOfGamma // set signgam to -1 + fma.s1 FR_S6 = FR_S8,FR_Xf2,FR_S6 + nop.i 0 +} +{ .mfi + // set p9 if signgum is 32-bit int + // set p10 if signgum is 64-bit int + cmp.eq p10,p9 = 8,r34 + fma.s1 FR_S2 = FR_S4,FR_Xf2,FR_S2 + nop.i 0 +};; +{ .mfi + ldfd FR_Tf = [GR_ad_T] + fma.s1 FR_Ln = FR_P32,FR_r,FR_T + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_LnSqrt2Pi = FR_LnSqrt2Pi,f1,FR_NormX + nop.i 0 +};; +.pred.rel "mutex",p9,p10 +{ .mfi +(p9) st4 [r33] = GR_SignOfGamma // as 32-bit int + fma.s1 FR_rf2 = FR_rf,FR_rf,f0 + nop.i 0 +} +{ .mfi +(p10) st8 [r33] = GR_SignOfGamma // as 64-bit int + fma.s1 FR_S10 = FR_S14,FR_Xf4,FR_S10 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_P32f = FR_P3,FR_rf,FR_P2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_Xf8 = FR_Xf4,FR_Xf4,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_P10f = FR_P1,FR_rf,f1 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_S2 = FR_S6,FR_Xf4,FR_S2 + nop.i 0 +};; +{ .mfi + nop.m 0 + fms.s1 FR_Ln = FR_Ln,FR_xm05,FR_LnSqrt2Pi + nop.i 0 +};; +{ .mfi + nop.m 0 + fcvt.xf FR_Nf = FR_int_Ln + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_S2 = FR_S10,FR_Xf8,FR_S2 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_Tf = FR_Nf,FR_Ln2,FR_Tf + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_P32f = FR_P32f,FR_rf2,FR_P10f // ?????? + nop.i 0 +};; +{ .mfi + nop.m 0 + fnma.s1 FR_Ln = FR_S2,FR_Xf2,FR_Ln + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_Lnf = FR_P32f,FR_rf,FR_Tf + nop.i 0 +};; +{ .mfb + nop.m 0 + fms.s.s0 f8 = FR_Ln,f1,FR_Lnf + br.ret.sptk b0 +};; +// branch for calculating of ln(GAMMA(x)) for -2^13 < x < -9 +//--------------------------------------------------------------------- +.align 32 +lgammaf_negpoly: +{ .mfi + getf.d GR_Arg = FR_Xf + frcpa.s1 FR_InvXf,p0 = f1,FR_Xf + mov GR_ExpBias = 0x3FF +} +{ .mfi + nop.m 0 + fma.s1 FR_Xf2 = FR_Xf,FR_Xf,f0 + nop.i 0 +};; +{ .mfi + getf.sig GR_N = FR_int_Ntrunc + fcvt.xf FR_N = FR_int_Ln + mov GR_SignOfGamma = 1 +} +{ .mfi + nop.m 0 + fma.s1 FR_A9 = FR_A10,FR_x,FR_A9 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_P10 = FR_P1,FR_r,f1 + extr.u GR_Exp = GR_Arg,52,11 +} +{ .mfi + nop.m 0 + fma.s1 FR_x4 = FR_x2,FR_x2,f0 + nop.i 0 +};; +{ .mfi + sub GR_PureExp = GR_Exp,GR_ExpBias + fma.s1 FR_A7 = FR_A8,FR_x,FR_A7 + tbit.z p14,p0 = GR_N,0 +} +{ .mfi + nop.m 0 + fma.s1 FR_A5 = FR_A6,FR_x,FR_A5 + nop.i 0 +};; +{ .mfi + setf.sig FR_int_Ln = GR_PureExp + fma.s1 FR_A3 = FR_A4,FR_x,FR_A3 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_A1 = FR_A2,FR_x,FR_A1 +(p14) sub GR_SignOfGamma = r0,GR_SignOfGamma +};; +{ .mfi + nop.m 0 + fms.s1 FR_rf = FR_InvXf,FR_Xf,f1 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_Xf4 = FR_Xf2,FR_Xf2,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_S14 = FR_S16,FR_Xf2,FR_S14 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_S10 = FR_S12,FR_Xf2,FR_S10 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_T = FR_N,FR_Ln2,FR_T + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_P32 = FR_P32,FR_r2,FR_P10 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_S6 = FR_S8,FR_Xf2,FR_S6 + extr.u GR_Ind4T = GR_Arg,44,8 +} +{ .mfi + nop.m 0 + fma.s1 FR_S2 = FR_S4,FR_Xf2,FR_S2 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A7 = FR_A9,FR_x2,FR_A7 + nop.i 0 +} +{ .mfi + shladd GR_ad_T = GR_Ind4T,3,GR_ad_Data + fma.s1 FR_A3 = FR_A5,FR_x2,FR_A3 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_Xf8 = FR_Xf4,FR_Xf4,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_rf2 = FR_rf,FR_rf,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_P32f = FR_P3,FR_rf,FR_P2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_P10f = FR_P1,FR_rf,f1 + nop.i 0 +};; +{ .mfi + ldfd FR_Tf = [GR_ad_T] + fma.s1 FR_Ln = FR_P32,FR_r,FR_T + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_A0 = FR_A1,FR_x,FR_A0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_S10 = FR_S14,FR_Xf4,FR_S10 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_S2 = FR_S6,FR_Xf4,FR_S2 + nop.i 0 +};; +{ .mfi + nop.m 0 + fcvt.xf FR_Nf = FR_int_Ln + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_A3 = FR_A7,FR_x4,FR_A3 + nop.i 0 +};; +{ .mfi + nop.m 0 + fcmp.eq.s1 p13,p0 = FR_NormX,FR_Ntrunc + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 FR_x3 = FR_x2,FR_x,f0 // -x^3 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_P32f = FR_P32f,FR_rf2,FR_P10f + nop.i 0 +};; +{ .mfb + // set p9 if signgum is 32-bit int + // set p10 if signgum is 64-bit int + cmp.eq p10,p9 = 8,r34 + fma.s1 FR_S2 = FR_S10,FR_Xf8,FR_S2 +(p13) br.cond.spnt lgammaf_singularity +};; +.pred.rel "mutex",p9,p10 +{ .mmf +(p9) st4 [r33] = GR_SignOfGamma // as 32-bit int +(p10) st8 [r33] = GR_SignOfGamma // as 64-bit int + fms.s1 FR_A0 = FR_A3,FR_x3,FR_A0 // -A3*x^3-A0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_Tf = FR_Nf,FR_Ln2,FR_Tf + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_Ln = FR_S2,FR_Xf2,FR_Ln // S2*Xf^2+Ln + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_Lnf = FR_P32f,FR_rf,FR_Tf + nop.i 0 +};; +{ .mfi + nop.m 0 + fms.s1 FR_Ln = FR_A0,f1,FR_Ln + nop.i 0 +};; +{ .mfb + nop.m 0 + fms.s.s0 f8 = FR_Ln,f1,FR_Lnf + br.ret.sptk b0 +};; +// branch for handling +/-0, NaT, QNaN, +/-INF and denormalised numbers +//--------------------------------------------------------------------- +.align 32 +lgammaf_spec: +{ .mfi + getf.exp GR_SignExp = FR_NormX + fclass.m p6,p0 = f8,0x21 // is arg +INF? + mov GR_SignOfGamma = 1 // set signgam to 1 +};; +{ .mfi + getf.sig GR_Sig = FR_NormX + fclass.m p7,p0 = f8,0xB // is x deno? + // set p11 if signgum is 32-bit int + // set p12 if signgum is 64-bit int + cmp.eq p12,p11 = 8,r34 +};; +.pred.rel "mutex",p11,p12 +{ .mfi + // store sign of gamma(x) as 32-bit int +(p11) st4 [r33] = GR_SignOfGamma + fclass.m p8,p0 = f8,0x1C0 // is arg NaT or NaN? + dep.z GR_Ind = GR_SignExp,3,4 +} +{ .mib + // store sign of gamma(x) as 64-bit int +(p12) st8 [r33] = GR_SignOfGamma + and GR_Exp = GR_ExpMask,GR_SignExp +(p6) br.ret.spnt b0 // exit for +INF +};; +{ .mfi + sub GR_PureExp = GR_Exp,GR_ExpBias + fclass.m p9,p0 = f8,0x22 // is arg -INF? + extr.u GR_Ind4T = GR_Sig,55,8 +} +{ .mfb + nop.m 0 +(p7) fma.s0 FR_tmp = f1,f1,f8 +(p7) br.cond.sptk lgammaf_core +};; +{ .mfb + nop.m 0 +(p8) fms.s.s0 f8 = f8,f1,f8 +(p8) br.ret.spnt b0 // exit for NaT and NaN +};; +{ .mfb + nop.m 0 +(p9) fmerge.s f8 = f1,f8 +(p9) br.ret.spnt b0 // exit -INF +};; +// branch for handling negative integers and +/-0 +//--------------------------------------------------------------------- +.align 32 +lgammaf_singularity: +{ .mfi + mov GR_SignOfGamma = 1 // set signgam to 1 + fclass.m p6,p0 = f8,0x6 // is x -0? + mov GR_TAG = 109 // negative +} +{ .mfi + mov GR_ad_SignGam = r33 + fma.s1 FR_X = f0,f0,f8 + nop.i 0 +};; +{ .mfi + nop.m 0 + frcpa.s0 f8,p0 = f1,f0 + // set p9 if signgum is 32-bit int + // set p10 if signgum is 64-bit int + cmp.eq p10,p9 = 8,r34 +} +{ .mib + nop.m 0 +(p6) sub GR_SignOfGamma = r0,GR_SignOfGamma + br.cond.sptk lgammaf_libm_err +};; +// overflow (x > OVERFLOV_BOUNDARY) +//--------------------------------------------------------------------- +.align 32 +lgammaf_overflow: +{ .mfi + nop.m 0 + nop.f 0 + mov r8 = 0x1FFFE +};; +{ .mfi + setf.exp f9 = r8 + fmerge.s FR_X = f8,f8 + mov GR_TAG = 108 // overflow +};; +{ .mfi + mov GR_ad_SignGam = r33 + nop.f 0 + // set p9 if signgum is 32-bit int + // set p10 if signgum is 64-bit int + cmp.eq p10,p9 = 8,r34 +} +{ .mfi + nop.m 0 + fma.s.s0 f8 = f9,f9,f0 // Set I,O and +INF result + nop.i 0 +};; +// gate to __libm_error_support# +//--------------------------------------------------------------------- +.align 32 +lgammaf_libm_err: +{ .mmi + alloc r32 = ar.pfs,1,4,4,0 + mov GR_Parameter_TAG = GR_TAG + nop.i 0 +};; +.pred.rel "mutex",p9,p10 +{ .mmi + // store sign of gamma(x) as 32-bit int +(p9) st4 [GR_ad_SignGam] = GR_SignOfGamma + // store sign of gamma(x) as 64-bit int +(p10) st8 [GR_ad_SignGam] = GR_SignOfGamma + nop.i 0 +};; +GLOBAL_LIBM_END(__libm_lgammaf) + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfs [GR_Parameter_Y] = FR_Y,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; +.body +{ .mib + stfs [GR_Parameter_X] = FR_X // STORE Parameter 1 + // on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfs [GR_Parameter_Y] = FR_RESULT // STORE Parameter 3 + // on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling + // function +};; +{ .mmi + nop.m 0 + nop.m 0 + add GR_Parameter_RESULT = 48,sp +};; +{ .mmi + ldfs f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/libm_lgammal.S b/sysdeps/ia64/fpu/libm_lgammal.S new file mode 100644 index 0000000000..351befb147 --- /dev/null +++ b/sysdeps/ia64/fpu/libm_lgammal.S @@ -0,0 +1,7678 @@ +.file "libm_lgammal.s" + + +// Copyright (c) 2002 - 2005, Intel Corporation +// All rights reserved. +// +// Contributed 2002 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,INCLUDING,BUT NOT +// LIMITED TO,THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT,INDIRECT,INCIDENTAL,SPECIAL, +// EXEMPLARY,OR CONSEQUENTIAL DAMAGES (INCLUDING,BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,DATA,OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY,WHETHER IN CONTRACT,STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE,EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code,and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +//********************************************************************* +// +// History: +// 03/28/02 Original version +// 05/20/02 Cleaned up namespace and sf0 syntax +// 08/21/02 Added support of SIGN(GAMMA(x)) calculation +// 09/26/02 Algorithm description improved +// 10/21/02 Now it returns SIGN(GAMMA(x))=-1 for negative zero +// 02/10/03 Reordered header: .section, .global, .proc, .align +// 03/31/05 Reformatted delimiters between data tables +// +//********************************************************************* +// +// Function: __libm_lgammal(long double x, int* signgam, int szsigngam) +// computes the principal value of the logarithm of the GAMMA function +// of x. Signum of GAMMA(x) is stored to memory starting at the address +// specified by the signgam. +// +//********************************************************************* +// +// Resources Used: +// +// Floating-Point Registers: f8 (Input and Return Value) +// f9-f15 +// f32-f127 +// +// General Purpose Registers: +// r2, r3, r8-r11, r14-r31 +// r32-r65 +// r66-r69 (Used to pass arguments to error handling routine) +// +// Predicate Registers: p6-p15 +// +//********************************************************************* +// +// IEEE Special Conditions: +// +// __libm_lgammal(+inf) = +inf +// __libm_lgammal(-inf) = QNaN +// __libm_lgammal(+/-0) = +inf +// __libm_lgammal(x<0, x - integer) = QNaN +// __libm_lgammal(SNaN) = QNaN +// __libm_lgammal(QNaN) = QNaN +// +//********************************************************************* +// +// ALGORITHM DESCRIPTION +// +// Below we suppose that there is log(z) function which takes an long +// double argument and returns result as a pair of long double numbers +// lnHi and lnLo (such that sum lnHi + lnLo provides ~80 correct bits +// of significand). Algorithm description for such log(z) function +// see below. +// Also, it this algorithm description we use the following notational +// conventions: +// a) pair A = (Ahi, Alo) means number A represented as sum of Ahi and Alo +// b) C = A + B = (Ahi, Alo) + (Bhi, Blo) means multi-precision addition. +// The result would be C = (Chi, Clo). Notice, that Clo shouldn't be +// equal to Alo + Blo +// c) D = A*B = (Ahi, Alo)*(Bhi, Blo) = (Dhi, Dlo) multi-precisiion +// multiplication. +// +// So, lgammal has the following computational paths: +// 1) |x| < 0.5 +// P = A1*|x| + A2*|x|^2 + ... + A22*|x|^22 +// A1, A2, A3 represented as a sum of two double precision +// numbers and multi-precision computations are used for 3 higher +// terms of the polynomial. We get polynomial as a sum of two +// double extended numbers: P = (Phi, Plo) +// 1.1) x > 0 +// lgammal(x) = P - log(|x|) = (Phi, Plo) - (lnHi(|x|), lnLo(|x|)) +// 1.2) x < 0 +// lgammal(x) = -P - log(|x|) - log(sin(Pi*x)/(Pi*x)) +// P and log(|x|) are computed by the same way as in 1.1; +// - log(sin(Pi*x)/(Pi*x)) is approximated by a polynomial Plnsin. +// Plnsin:= fLnSin2*|x|^2 + fLnSin4*|x|^4 + ... + fLnSin36*|x|^36 +// The first coefficient of Plnsin is represented as sum of two +// double precision numbers (fLnSin2, fLnSin2L). Multi-precision +// computations for higher two terms of Plnsin are used. +// So, the final result is reconstructed by the following formula +// lgammal(x) = (-(Phi, Plo) - (lnHi(|x|), lnLo(|x|))) - +// - (PlnsinHi,PlnsinLo) +// +// 2) 0.5 <= x < 0.75 -> t = x - 0.625 +// -0.75 < x <= -0.5 -> t = x + 0.625 +// 2.25 <= x < 4.0 -> t = x/2 - 1.5 +// 4.0 <= x < 8.0 -> t = x/4 - 1.5 +// -0.5 < x <= -0.40625 -> t = x + 0.5 +// -2.6005859375 < x <= -2.5 -> t = x + 2.5 +// 1.3125 <= x < 1.5625 -> t = x - LOC_MIN, where LOC_MIN is point in +// which lgammal has local minimum. Exact +// value can be found in the table below, +// approximate value is ~1.46 +// +// lgammal(x) is approximated by the polynomial of 25th degree: P25(t) +// P25(t) = A0 + A1*t + ... + A25*t^25 = (Phi, Plo) + t^4*P21(t), +// where +// (Phi, Plo) is sum of four highest terms of the polynomial P25(t): +// (Phi, Plo) = ((A0, A0L) + (A1, A1L)*t) + t^2 *((A2, A2L) + (A3, A3L)*t), +// (Ai, AiL) - coefficients represented as pairs of DP numbers. +// +// P21(t) = (PolC(t)*t^8 + PolD(t))*t^8 + PolE(t), +// where +// PolC(t) = C21*t^5 + C20*t^4 + ... + C16, +// C21 = A25, C20 = A24, ..., C16 = A20 +// +// PolD(t) = D7*t^7 + D6*t^6 + ... + D0, +// D7 = A19, D6 = A18, ..., D0 = A12 +// +// PolE(t) = E7*t^7 + E6*t^6 + ... + E0, +// E7 = A11, E6 = A10, ..., E0 = A4 +// +// Cis and Dis are represented as double precision numbers, +// Eis are represented as double extended numbers. +// +// 3) 0.75 <= x < 1.3125 -> t = x - 1.0 +// 1.5625 <= x < 2.25 -> t = x - 2.0 +// lgammal(x) is approximated by the polynomial of 25th degree: P25(t) +// P25(t) = A1*t + ... + A25*t^25, and computations are carried out +// by similar way as in the previous case +// +// 4) 10.0 < x <= Overflow Bound ("positive Sterling" range) +// lgammal(x) is approximated using Sterling's formula: +// lgammal(x) ~ ((x*(lnHi(x) - 1, lnLo(x))) - 0.5*(lnHi(x), lnLo(x))) + +// + ((Chi, Clo) + S(1/x)) +// where +// C = (Chi, Clo) - pair of double precision numbers representing constant +// 0.5*ln(2*Pi); +// S(1/x) = 1/x * (B2 + B4*(1/x)^2 + ... + B20*(1/x)^18), B2, ..., B20 are +// Bernulli numbers. S is computed in native precision and then added to +// Clo; +// lnHi(x) - 1 is computed in native precision and the multiprecision +// multiplication (x, 0) *(lnHi(x) - 1, lnLo(x)) is used. +// +// 5) -INF < x <= -2^63, any negative integer < 0 +// All numbers in this range are integers -> error handler is called +// +// 6) -2^63 < x <= -0.75 ("negative Sterling" range), x is "far" from root, +// lgammal(-t) for positive t is approximated using the following formula: +// lgammal(-t) = -lgammal(t)-log(t)-log(|dT|)+log(sin(Pi*|dT|)/(Pi*|dT|)) +// where dT = -t -round_to_nearest_integer(-t) +// Last item is approximated by the same polynomial as described in 1.2. +// We split the whole range into three subranges due to different ways of +// approximation of the first terms. +// 6.1) -2^63 < x < -6.0 ("negative Sterling" range) +// lgammal(t) is approximated exactly as in #4. The only difference that +// for -13.0 < x < -6.0 subrange instead of Bernulli numbers we use their +// minimax approximation on this range. +// log(t), log(|dT|) are approximated by the log routine mentioned above. +// 6.2) -6.0 < x <= -0.75, |x + 1|> 2^(-7) +// log(t), log(|dT|) are approximated by the log routine mentioned above, +// lgammal(t) is approximated by polynomials of the 25th degree similar +// to ones from #2. Arguments z of the polynomials are as follows +// a) 0.75 <= t < 1.0 - 2^(-7), z = 2*t - 1.5 +// b) 1.0 - 2^(-7) < t < 2.0, z = t - 1.5 +// c) 2.0 < t < 3.0, z = t/2 - 1.5 +// d) 3.0 < t < 4.0, z = t/2 - 1.5. Notice, that range reduction is +// the same as in case c) but the set of coefficients is different +// e) 4.0 < t < 6.0, z = t/4 - 1.5 +// 6.3) |x + 1| <= 2^(-7) +// log(1 + (x-1)) is approximated by Taylor series, +// log(sin(Pi*|dT|)/(Pi*|dT|)) is still approximated by polynomial but +// it has just 4th degree. +// log(|dT|) is approximated by the log routine mentioned above. +// lgammal(-x) is approximated by polynomial of 8th degree from (-x + 1). +// +// 7) -20.0 < x < -2.0, x falls in root "neighbourhood". +// "Neighbourhood" means that |lgammal(x)| < epsilon, where epsilon is +// different for every root (and it is stored in the table), but typically +// it is ~ 0.15. There are 35 roots significant from "double extended" +// point of view. We split all the roots into two subsets: "left" and "right" +// roots. Considering [-(N+1), -N] range we call root as "left" one if it +// lies closer to -(N+1) and "right" otherwise. There is no "left" root in +// the [-20, -19] range (it exists, but is insignificant for double extended +// precision). To determine if x falls in root "neighbourhood" we store +// significands of all the 35 roots as well as epsilon values (expressed +// by the left and right bound). +// In these ranges we approximate lgammal(x) by polynomial series of 19th +// degree: +// lgammal(x) = P19(t) = A0 + A1*t + ...+ A19*t^19, where t = x - EDP_Root, +// EDP_Root is the exact value of the corresponding root rounded to double +// extended precision. So, we have 35 different polynomials which make our +// table rather big. We may hope that x falls in root "neighbourhood" +// quite rarely -> ther might be no need in frequent use of different +// polynomials. +// A0, A1, A2, A3 are represented as pairs of double precision numbers, +// A4, A5 are long doubles, and to decrease the size of the table we +// keep the rest of coefficients in just double precision +// +//********************************************************************* +// Algorithm for log(X) = (lnHi(X), lnLo(X)) +// +// ALGORITHM +// +// Here we use a table lookup method. The basic idea is that in +// order to compute logl(Arg) for an argument Arg in [1,2), we +// construct a value G such that G*Arg is close to 1 and that +// logl(1/G) is obtainable easily from a table of values calculated +// beforehand. Thus +// +// logl(Arg) = logl(1/G) + logl(G*Arg) +// = logl(1/G) + logl(1 + (G*Arg - 1)) +// +// Because |G*Arg - 1| is small, the second term on the right hand +// side can be approximated by a short polynomial. We elaborate +// this method in four steps. +// +// Step 0: Initialization +// +// We need to calculate logl( X ). Obtain N, S_hi such that +// +// X = 2^N * S_hi exactly +// +// where S_hi in [1,2) +// +// Step 1: Argument Reduction +// +// Based on S_hi, obtain G_1, G_2, G_3 from a table and calculate +// +// G := G_1 * G_2 * G_3 +// r := (G * S_hi - 1) +// +// These G_j's have the property that the product is exactly +// representable and that |r| < 2^(-12) as a result. +// +// Step 2: Approximation +// +// +// logl(1 + r) is approximated by a short polynomial poly(r). +// +// Step 3: Reconstruction +// +// +// Finally, logl( X ) is given by +// +// logl( X ) = logl( 2^N * S_hi ) +// ~=~ N*logl(2) + logl(1/G) + logl(1 + r) +// ~=~ N*logl(2) + logl(1/G) + poly(r). +// +// IMPLEMENTATION +// +// Step 0. Initialization +// ---------------------- +// +// Z := X +// N := unbaised exponent of Z +// S_hi := 2^(-N) * Z +// +// Step 1. Argument Reduction +// -------------------------- +// +// Let +// +// Z = 2^N * S_hi = 2^N * 1.d_1 d_2 d_3 ... d_63 +// +// We obtain G_1, G_2, G_3 by the following steps. +// +// +// Define X_0 := 1.d_1 d_2 ... d_14. This is extracted +// from S_hi. +// +// Define A_1 := 1.d_1 d_2 d_3 d_4. This is X_0 truncated +// to lsb = 2^(-4). +// +// Define index_1 := [ d_1 d_2 d_3 d_4 ]. +// +// Fetch Z_1 := (1/A_1) rounded UP in fixed point with +// fixed point lsb = 2^(-15). +// Z_1 looks like z_0.z_1 z_2 ... z_15 +// Note that the fetching is done using index_1. +// A_1 is actually not needed in the implementation +// and is used here only to explain how is the value +// Z_1 defined. +// +// Fetch G_1 := (1/A_1) truncated to 21 sig. bits. +// floating pt. Again, fetching is done using index_1. A_1 +// explains how G_1 is defined. +// +// Calculate X_1 := X_0 * Z_1 truncated to lsb = 2^(-14) +// = 1.0 0 0 0 d_5 ... d_14 +// This is accomplised by integer multiplication. +// It is proved that X_1 indeed always begin +// with 1.0000 in fixed point. +// +// +// Define A_2 := 1.0 0 0 0 d_5 d_6 d_7 d_8. This is X_1 +// truncated to lsb = 2^(-8). Similar to A_1, +// A_2 is not needed in actual implementation. It +// helps explain how some of the values are defined. +// +// Define index_2 := [ d_5 d_6 d_7 d_8 ]. +// +// Fetch Z_2 := (1/A_2) rounded UP in fixed point with +// fixed point lsb = 2^(-15). Fetch done using index_2. +// Z_2 looks like z_0.z_1 z_2 ... z_15 +// +// Fetch G_2 := (1/A_2) truncated to 21 sig. bits. +// floating pt. +// +// Calculate X_2 := X_1 * Z_2 truncated to lsb = 2^(-14) +// = 1.0 0 0 0 0 0 0 0 d_9 d_10 ... d_14 +// This is accomplised by integer multiplication. +// It is proved that X_2 indeed always begin +// with 1.00000000 in fixed point. +// +// +// Define A_3 := 1.0 0 0 0 0 0 0 0 d_9 d_10 d_11 d_12 d_13 1. +// This is 2^(-14) + X_2 truncated to lsb = 2^(-13). +// +// Define index_3 := [ d_9 d_10 d_11 d_12 d_13 ]. +// +// Fetch G_3 := (1/A_3) truncated to 21 sig. bits. +// floating pt. Fetch is done using index_3. +// +// Compute G := G_1 * G_2 * G_3. +// +// This is done exactly since each of G_j only has 21 sig. bits. +// +// Compute +// +// r := (G*S_hi - 1) +// +// +// Step 2. Approximation +// --------------------- +// +// This step computes an approximation to logl( 1 + r ) where r is the +// reduced argument just obtained. It is proved that |r| <= 1.9*2^(-13); +// thus logl(1+r) can be approximated by a short polynomial: +// +// logl(1+r) ~=~ poly = r + Q1 r^2 + ... + Q4 r^5 +// +// +// Step 3. Reconstruction +// ---------------------- +// +// This step computes the desired result of logl(X): +// +// logl(X) = logl( 2^N * S_hi ) +// = N*logl(2) + logl( S_hi ) +// = N*logl(2) + logl(1/G) + +// logl(1 + G*S_hi - 1 ) +// +// logl(2), logl(1/G_j) are stored as pairs of (single,double) numbers: +// log2_hi, log2_lo, log1byGj_hi, log1byGj_lo. The high parts are +// single-precision numbers and the low parts are double precision +// numbers. These have the property that +// +// N*log2_hi + SUM ( log1byGj_hi ) +// +// is computable exactly in double-extended precision (64 sig. bits). +// Finally +// +// lnHi(X) := N*log2_hi + SUM ( log1byGj_hi ) +// lnLo(X) := poly_hi + [ poly_lo + +// ( SUM ( log1byGj_lo ) + N*log2_lo ) ] +// +// +//********************************************************************* +// General Purpose Registers +// scratch registers +rPolDataPtr = r2 +rLnSinDataPtr = r3 +rExpX = r8 +rSignifX = r9 +rDelta = r10 +rSignExpX = r11 +GR_ad_z_1 = r14 +r17Ones = r15 +GR_Index1 = r16 +rSignif1andQ = r17 +GR_X_0 = r18 +GR_X_1 = r19 +GR_X_2 = r20 +GR_Z_1 = r21 +GR_Z_2 = r22 +GR_N = r23 +rExpHalf = r24 +rExp8 = r25 +rX0Dx = r25 +GR_ad_tbl_1 = r26 +GR_ad_tbl_2 = r27 +GR_ad_tbl_3 = r28 +GR_ad_q = r29 +GR_ad_z_1 = r30 +GR_ad_z_2 = r31 +// stacked registers +rPFS_SAVED = r32 +GR_ad_z_3 = r33 +rSgnGamAddr = r34 +rSgnGamSize = r35 +rLogDataPtr = r36 +rZ1offsett = r37 +rTmpPtr = r38 +rTmpPtr2 = r39 +rTmpPtr3 = r40 +rExp2 = r41 +rExp2tom7 = r42 +rZ625 = r42 +rExpOne = r43 +rNegSingularity = r44 +rXint = r45 +rTbl1Addr = r46 +rTbl2Addr = r47 +rTbl3Addr = r48 +rZ2Addr = r49 +rRootsAddr = r50 +rRootsBndAddr = r51 +rRoot = r52 +rRightBound = r53 +rLeftBound = r54 +rSignifDx = r55 +rBernulliPtr = r56 +rLnSinTmpPtr = r56 +rIndex1Dx = r57 +rIndexPol = r58 +GR_Index3 = r59 +GR_Index2 = r60 +rSgnGam = r61 +rXRnd = r62 + +GR_SAVE_B0 = r63 +GR_SAVE_GP = r64 +GR_SAVE_PFS = r65 +// output parameters when calling error handling routine +GR_Parameter_X = r66 +GR_Parameter_Y = r67 +GR_Parameter_RESULT = r68 +GR_Parameter_TAG = r69 + +//******************************************************************** +// Floating Point Registers +// CAUTION: due to the lack of registers there exist (below in the code) +// sometimes "unconventional" use of declared registers +// +fAbsX = f6 +fDelX4 = f6 +fSignifX = f7 +// macros for error handling routine +FR_X = f10 // first argument +FR_Y = f1 // second argument (lgammal has just one) +FR_RESULT = f8 // result + +// First 7 Bernulli numbers +fB2 = f9 +fLnDeltaL = f9 +fXSqr = f9 +fB4 = f10 +fX4 = f10 +fB6 = f11 +fX6 = f11 +fB8 = f12 +fXSqrL = f12 +fB10 = f13 +fRes7H = f13 +fB12 = f14 +fRes7L = f14 +fB14 = f15 + +// stack registers +// Polynomial coefficients: A0, ..., A25 +fA0 = f32 +fA0L = f33 +fInvXL = f33 +fA1 = f34 +fA1L = f35 +fA2 = f36 +fA2L = f37 +fA3 = f38 +fA3L = f39 +fA4 = f40 +fA4L = f41 +fRes6H = f41 +fA5 = f42 +fB2L = f42 +fA5L = f43 +fMinNegStir = f43 +fRes6L = f43 +fA6 = f44 +fMaxNegStir = f44 +fA7 = f45 +fLnDeltaH = f45 +fA8 = f46 +fBrnL = f46 +fA9 = f47 +fBrnH = f47 +fA10 = f48 +fRes5L = f48 +fA11 = f49 +fRes5H = f49 +fA12 = f50 +fDx6 = f50 +fA13 = f51 +fDx8 = f51 +fA14 = f52 +fDx4 = f52 +fA15 = f53 +fYL = f53 +fh3Dx = f53 +fA16 = f54 +fYH = f54 +fH3Dx = f54 +fA17 = f55 +fResLnDxL = f55 +fG3Dx = f55 +fA18 = f56 +fResLnDxH = f56 +fh2Dx = f56 +fA19 = f57 +fFloatNDx = f57 +fA20 = f58 +fPolyHiDx = f58 +fhDx = f58 +fA21 = f59 +fRDxCub = f59 +fHDx = f59 +fA22 = f60 +fRDxSq = f60 +fGDx = f60 +fA23 = f61 +fPolyLoDx = f61 +fInvX3 = f61 +fA24 = f62 +fRDx = f62 +fInvX8 = f62 +fA25 = f63 +fInvX4 = f63 +fPol = f64 +fPolL = f65 +// Coefficients of ln(sin(Pi*x)/Pi*x) +fLnSin2 = f66 +fLnSin2L = f67 +fLnSin4 = f68 +fLnSin6 = f69 +fLnSin8 = f70 +fLnSin10 = f71 +fLnSin12 = f72 +fLnSin14 = f73 +fLnSin16 = f74 +fLnSin18 = f75 +fDelX8 = f75 +fLnSin20 = f76 +fLnSin22 = f77 +fDelX6 = f77 +fLnSin24 = f78 +fLnSin26 = f79 +fLnSin28 = f80 +fLnSin30 = f81 +fhDelX = f81 +fLnSin32 = f82 +fLnSin34 = f83 +fLnSin36 = f84 +fXint = f85 +fDxSqr = f85 +fRes3L = f86 +fRes3H = f87 +fRes4H = f88 +fRes4L = f89 +fResH = f90 +fResL = f91 +fDx = f92 +FR_MHalf = f93 +fRes1H = f94 +fRes1L = f95 +fRes2H = f96 +fRes2L = f97 +FR_FracX = f98 +fRcpX = f99 +fLnSinH = f99 +fTwo = f100 +fMOne = f100 +FR_G = f101 +FR_H = f102 +FR_h = f103 +FR_G2 = f104 +FR_H2 = f105 +FR_poly_lo = f106 +FR_poly_hi = f107 +FR_h2 = f108 +FR_rsq = f109 +FR_r = f110 +FR_log2_hi = f111 +FR_log2_lo = f112 +fFloatN = f113 +FR_Q4 = f114 +FR_G3 = f115 +FR_H3 = f116 +FR_h3 = f117 +FR_Q3 = f118 +FR_Q2 = f119 +FR_Q1 = f120 +fThirteen = f121 +fSix = f121 +FR_rcub = f121 +// Last three Bernulli numbers +fB16 = f122 +fB18 = f123 +fB20 = f124 +fInvX = f125 +fLnSinL = f125 +fDxSqrL = f126 +fFltIntX = f126 +fRoot = f127 +fNormDx = f127 + +// Data tables +//============================================================== +RODATA +// ************* DO NOT CHANGE THE ORDER OF THESE TABLES ************* +.align 16 +LOCAL_OBJECT_START(lgammal_right_roots_data) +// List of all right roots themselves +data8 0x9D3FE4B007C360AB, 0x0000C000 // Range [-3, -2] +data8 0xC9306DE4F2CD7BEE, 0x0000C000 // Range [-4, -3] +data8 0x814273C2CCAC0618, 0x0000C001 // Range [-5, -4] +data8 0xA04352BF85B6C865, 0x0000C001 // Range [-6, -5] +data8 0xC00B592C4BE4676C, 0x0000C001 // Range [-7, -6] +data8 0xE0019FEF6FF0F5BF, 0x0000C001 // Range [-8, -7] +data8 0x80001A01459FC9F6, 0x0000C002 // Range [-9, -8] +data8 0x900002E3BB47D86D, 0x0000C002 // Range [-10, -9] +data8 0xA0000049F93BB992, 0x0000C002 // Range [-11, -10] +data8 0xB0000006B9915316, 0x0000C002 // Range [-12, -11] +data8 0xC00000008F76C773, 0x0000C002 // Range [-13, -12] +data8 0xD00000000B09230A, 0x0000C002 // Range [-14, -13] +data8 0xE000000000C9CBA5, 0x0000C002 // Range [-15, -14] +data8 0xF0000000000D73FA, 0x0000C002 // Range [-16, -15] +data8 0x8000000000006BA0, 0x0000C003 // Range [-17, -16] +data8 0x8800000000000655, 0x0000C003 // Range [-18, -17] +data8 0x900000000000005A, 0x0000C003 // Range [-19, -18] +data8 0x9800000000000005, 0x0000C003 // Range [-20, -19] +// List of bounds of ranges with special polynomial approximation near root +// Only significands of bounds are actually stored +data8 0xA000000000000000, 0x9800000000000000 // Bounds for root on [-3, -2] +data8 0xCAB88035C5EFBB41, 0xC7E05E31F4B02115 // Bounds for root on [-4, -3] +data8 0x817831B899735C72, 0x8114633941B8053A // Bounds for root on [-5, -4] +data8 0xA04E8B34C6AA9476, 0xA039B4A42978197B // Bounds for root on [-6, -5] +data8 0xC00D3D5E588A78A9, 0xC009BA25F7E858A6 // Bounds for root on [-7, -6] +data8 0xE001E54202991EB4, 0xE001648416CE897F // Bounds for root on [-8, -7] +data8 0x80001E56D13A6B9F, 0x8000164A3BAD888A // Bounds for root on [-9, -8] +data8 0x9000035F0529272A, 0x9000027A0E3D94F0 // Bounds for root on [-10, -9] +data8 0xA00000564D705880, 0xA000003F67EA0CC7 // Bounds for root on [-11, -10] +data8 0xB0000007D87EE0EF, 0xB0000005C3A122A5 // Bounds for root on [-12, -11] +data8 0xC0000000A75FE8B1, 0xC00000007AF818AC // Bounds for root on [-13, -12] +data8 0xD00000000CDFFE36, 0xD000000009758BBF // Bounds for root on [-14, -13] +data8 0xE000000000EB6D96, 0xE000000000ACF7B2 // Bounds for root on [-15, -14] +data8 0xF0000000000FB1F9, 0xF0000000000B87FB // Bounds for root on [-16, -15] +data8 0x8000000000007D90, 0x8000000000005C40 // Bounds for root on [-17, -16] +data8 0x8800000000000763, 0x880000000000056D // Bounds for root on [-18, -17] +data8 0x9000000000000069, 0x900000000000004D // Bounds for root on [-19, -18] +data8 0x9800000000000006, 0x9800000000000005 // Bounds for root on [-20, -19] +// List of all left roots themselves +data8 0xAFDA0850DEC8065E, 0x0000C000 // Range [-3, -2] +data8 0xFD238AA3E17F285C, 0x0000C000 // Range [-4, -3] +data8 0x9FBABBD37757E6A2, 0x0000C001 // Range [-5, -4] +data8 0xBFF497AC8FA06AFC, 0x0000C001 // Range [-6, -5] +data8 0xDFFE5FBB5C377FE8, 0x0000C001 // Range [-7, -6] +data8 0xFFFFCBFC0ACE7879, 0x0000C001 // Range [-8, -7] +data8 0x8FFFFD1C425E8100, 0x0000C002 // Range [-9, -8] +data8 0x9FFFFFB606BDFDCD, 0x0000C002 // Range [-10, -9] +data8 0xAFFFFFF9466E9F1B, 0x0000C002 // Range [-11, -10] +data8 0xBFFFFFFF70893874, 0x0000C002 // Range [-12, -11] +data8 0xCFFFFFFFF4F6DCF6, 0x0000C002 // Range [-13, -12] +data8 0xDFFFFFFFFF36345B, 0x0000C002 // Range [-14, -13] +data8 0xEFFFFFFFFFF28C06, 0x0000C002 // Range [-15, -14] +data8 0xFFFFFFFFFFFF28C0, 0x0000C002 // Range [-16, -15] +data8 0x87FFFFFFFFFFF9AB, 0x0000C003 // Range [-17, -16] +data8 0x8FFFFFFFFFFFFFA6, 0x0000C003 // Range [-18, -17] +data8 0x97FFFFFFFFFFFFFB, 0x0000C003 // Range [-19, -18] +data8 0x0000000000000000, 0x00000000 // pad to keep logic in the main path +// List of bounds of ranges with special polynomial approximation near root +// Only significands of bounds are actually stored +data8 0xB235880944CC758E, 0xADD2F1A9FBE76C8B // Bounds for root on [-3, -2] +data8 0xFD8E7844F307B07C, 0xFCA655C2152BDE4D // Bounds for root on [-4, -3] +data8 0x9FC4D876EE546967, 0x9FAEE4AF68BC4292 // Bounds for root on [-5, -4] +data8 0xBFF641FFBFCC44F1, 0xBFF2A47919F4BA89 // Bounds for root on [-6, -5] +data8 0xDFFE9C803DEFDD59, 0xDFFE18932EB723FE // Bounds for root on [-7, -6] +data8 0xFFFFD393FA47AFC3, 0xFFFFC317CF638AE1 // Bounds for root on [-8, -7] +data8 0x8FFFFD8840279925, 0x8FFFFC9DCECEEE92 // Bounds for root on [-9, -8] +data8 0x9FFFFFC0D34E2AF8, 0x9FFFFFA9619AA3B7 // Bounds for root on [-10, -9] +data8 0xAFFFFFFA41C18246, 0xAFFFFFF82025A23C // Bounds for root on [-11, -10] +data8 0xBFFFFFFF857ACB4E, 0xBFFFFFFF58032378 // Bounds for root on [-12, -11] +data8 0xCFFFFFFFF6934AB8, 0xCFFFFFFFF313EF0A // Bounds for root on [-13, -12] +data8 0xDFFFFFFFFF53A9E9, 0xDFFFFFFFFF13B5A5 // Bounds for root on [-14, -13] +data8 0xEFFFFFFFFFF482CB, 0xEFFFFFFFFFF03F4F // Bounds for root on [-15, -14] +data8 0xFFFFFFFFFFFF482D, 0xFFFFFFFFFFFF03F5 // Bounds for root on [-16, -15] +data8 0x87FFFFFFFFFFFA98, 0x87FFFFFFFFFFF896 // Bounds for root on [-17, -16] +data8 0x8FFFFFFFFFFFFFB3, 0x8FFFFFFFFFFFFF97 // Bounds for root on [-18, -17] +data8 0x97FFFFFFFFFFFFFC, 0x97FFFFFFFFFFFFFB // Bounds for root on [-19, -18] +LOCAL_OBJECT_END(lgammal_right_roots_data) + +LOCAL_OBJECT_START(lgammal_0_Half_data) +// Polynomial coefficients for the lgammal(x), 0.0 < |x| < 0.5 +data8 0xBFD9A4D55BEAB2D6, 0xBC8AA3C097746D1F //A3 +data8 0x3FEA51A6625307D3, 0x3C7180E7BD2D0DCC //A2 +data8 0xBFE2788CFC6FB618, 0xBC9E9346C4692BCC //A1 +data8 0x8A8991563EC1BD13, 0x00003FFD //A4 +data8 0xD45CE0BD52C27EF2, 0x0000BFFC //A5 +data8 0xADA06587FA2BBD47, 0x00003FFC //A6 +data8 0x9381D0ED2194902A, 0x0000BFFC //A7 +data8 0x80859B3CF92D4192, 0x00003FFC //A8 +data8 0xE4033517C622A946, 0x0000BFFB //A9 +data8 0xCD00CE67A51FC82A, 0x00003FFB //A10 +data8 0xBA44E2A96C3B5700, 0x0000BFFB //A11 +data8 0xAAAD008FA46DBD99, 0x00003FFB //A12 +data8 0x9D604AC65A41153D, 0x0000BFFB //A13 +data8 0x917CECB864B5A861, 0x00003FFB //A14 +data8 0x85A4810EB730FDE4, 0x0000BFFB //A15 +data8 0xEF2761C38BD21F77, 0x00003FFA //A16 +data8 0xC913043A128367DA, 0x0000BFFA //A17 +data8 0x96A29B71FF7AFFAA, 0x00003FFA //A18 +data8 0xBB9FFA1A5FE649BB, 0x0000BFF9 //A19 +data8 0xB17982CD2DAA0EE3, 0x00003FF8 //A20 +data8 0xDE1DDCBFFB9453F0, 0x0000BFF6 //A21 +data8 0x87FBF5D7ACD9FA9D, 0x00003FF4 //A22 +LOCAL_OBJECT_END(lgammal_0_Half_data) + +LOCAL_OBJECT_START(Constants_Q) +// log2_hi, log2_lo, Q_4, Q_3, Q_2, and Q_1 +data4 0x00000000,0xB1721800,0x00003FFE,0x00000000 +data4 0x4361C4C6,0x82E30865,0x0000BFE2,0x00000000 +data4 0x328833CB,0xCCCCCAF2,0x00003FFC,0x00000000 +data4 0xA9D4BAFB,0x80000077,0x0000BFFD,0x00000000 +data4 0xAAABE3D2,0xAAAAAAAA,0x00003FFD,0x00000000 +data4 0xFFFFDAB7,0xFFFFFFFF,0x0000BFFD,0x00000000 +LOCAL_OBJECT_END(Constants_Q) + +LOCAL_OBJECT_START(Constants_Z_1) +// Z1 - 16 bit fixed +data4 0x00008000 +data4 0x00007879 +data4 0x000071C8 +data4 0x00006BCB +data4 0x00006667 +data4 0x00006187 +data4 0x00005D18 +data4 0x0000590C +data4 0x00005556 +data4 0x000051EC +data4 0x00004EC5 +data4 0x00004BDB +data4 0x00004925 +data4 0x0000469F +data4 0x00004445 +data4 0x00004211 +LOCAL_OBJECT_END(Constants_Z_1) + +LOCAL_OBJECT_START(Constants_G_H_h1) +// G1 and H1 - IEEE single and h1 - IEEE double +data4 0x3F800000,0x00000000,0x00000000,0x00000000 +data4 0x3F70F0F0,0x3D785196,0x617D741C,0x3DA163A6 +data4 0x3F638E38,0x3DF13843,0xCBD3D5BB,0x3E2C55E6 +data4 0x3F579430,0x3E2FF9A0,0xD86EA5E7,0xBE3EB0BF +data4 0x3F4CCCC8,0x3E647FD6,0x86B12760,0x3E2E6A8C +data4 0x3F430C30,0x3E8B3AE7,0x5C0739BA,0x3E47574C +data4 0x3F3A2E88,0x3EA30C68,0x13E8AF2F,0x3E20E30F +data4 0x3F321640,0x3EB9CEC8,0xF2C630BD,0xBE42885B +data4 0x3F2AAAA8,0x3ECF9927,0x97E577C6,0x3E497F34 +data4 0x3F23D708,0x3EE47FC5,0xA6B0A5AB,0x3E3E6A6E +data4 0x3F1D89D8,0x3EF8947D,0xD328D9BE,0xBDF43E3C +data4 0x3F17B420,0x3F05F3A1,0x0ADB090A,0x3E4094C3 +data4 0x3F124920,0x3F0F4303,0xFC1FE510,0xBE28FBB2 +data4 0x3F0D3DC8,0x3F183EBF,0x10FDE3FA,0x3E3A7895 +data4 0x3F088888,0x3F20EC80,0x7CC8C98F,0x3E508CE5 +data4 0x3F042108,0x3F29516A,0xA223106C,0xBE534874 +LOCAL_OBJECT_END(Constants_G_H_h1) + +LOCAL_OBJECT_START(Constants_Z_2) +// Z2 - 16 bit fixed +data4 0x00008000 +data4 0x00007F81 +data4 0x00007F02 +data4 0x00007E85 +data4 0x00007E08 +data4 0x00007D8D +data4 0x00007D12 +data4 0x00007C98 +data4 0x00007C20 +data4 0x00007BA8 +data4 0x00007B31 +data4 0x00007ABB +data4 0x00007A45 +data4 0x000079D1 +data4 0x0000795D +data4 0x000078EB +LOCAL_OBJECT_END(Constants_Z_2) + +LOCAL_OBJECT_START(Constants_G_H_h2) +// G2 and H2 - IEEE single and h2 - IEEE double +data4 0x3F800000,0x00000000,0x00000000,0x00000000 +data4 0x3F7F00F8,0x3B7F875D,0x22C42273,0x3DB5A116 +data4 0x3F7E03F8,0x3BFF015B,0x21F86ED3,0x3DE620CF +data4 0x3F7D08E0,0x3C3EE393,0x484F34ED,0xBDAFA07E +data4 0x3F7C0FC0,0x3C7E0586,0x3860BCF6,0xBDFE07F0 +data4 0x3F7B1880,0x3C9E75D2,0xA78093D6,0x3DEA370F +data4 0x3F7A2328,0x3CBDC97A,0x72A753D0,0x3DFF5791 +data4 0x3F792FB0,0x3CDCFE47,0xA7EF896B,0x3DFEBE6C +data4 0x3F783E08,0x3CFC15D0,0x409ECB43,0x3E0CF156 +data4 0x3F774E38,0x3D0D874D,0xFFEF71DF,0xBE0B6F97 +data4 0x3F766038,0x3D1CF49B,0x5D59EEE8,0xBE080483 +data4 0x3F757400,0x3D2C531D,0xA9192A74,0x3E1F91E9 +data4 0x3F748988,0x3D3BA322,0xBF72A8CD,0xBE139A06 +data4 0x3F73A0D0,0x3D4AE46F,0xF8FBA6CF,0x3E1D9202 +data4 0x3F72B9D0,0x3D5A1756,0xBA796223,0xBE1DCCC4 +data4 0x3F71D488,0x3D693B9D,0xB6B7C239,0xBE049391 +LOCAL_OBJECT_END(Constants_G_H_h2) + +LOCAL_OBJECT_START(Constants_G_H_h3) +// G3 and H3 - IEEE single and h3 - IEEE double +data4 0x3F7FFC00,0x38800100,0x562224CD,0x3D355595 +data4 0x3F7FF400,0x39400480,0x06136FF6,0x3D8200A2 +data4 0x3F7FEC00,0x39A00640,0xE8DE9AF0,0x3DA4D68D +data4 0x3F7FE400,0x39E00C41,0xB10238DC,0xBD8B4291 +data4 0x3F7FDC00,0x3A100A21,0x3B1952CA,0xBD89CCB8 +data4 0x3F7FD400,0x3A300F22,0x1DC46826,0xBDB10707 +data4 0x3F7FCC08,0x3A4FF51C,0xF43307DB,0x3DB6FCB9 +data4 0x3F7FC408,0x3A6FFC1D,0x62DC7872,0xBD9B7C47 +data4 0x3F7FBC10,0x3A87F20B,0x3F89154A,0xBDC3725E +data4 0x3F7FB410,0x3A97F68B,0x62B9D392,0xBD93519D +data4 0x3F7FAC18,0x3AA7EB86,0x0F21BD9D,0x3DC18441 +data4 0x3F7FA420,0x3AB7E101,0x2245E0A6,0xBDA64B95 +data4 0x3F7F9C20,0x3AC7E701,0xAABB34B8,0x3DB4B0EC +data4 0x3F7F9428,0x3AD7DD7B,0x6DC40A7E,0x3D992337 +data4 0x3F7F8C30,0x3AE7D474,0x4F2083D3,0x3DC6E17B +data4 0x3F7F8438,0x3AF7CBED,0x811D4394,0x3DAE314B +data4 0x3F7F7C40,0x3B03E1F3,0xB08F2DB1,0xBDD46F21 +data4 0x3F7F7448,0x3B0BDE2F,0x6D34522B,0xBDDC30A4 +data4 0x3F7F6C50,0x3B13DAAA,0xB1F473DB,0x3DCB0070 +data4 0x3F7F6458,0x3B1BD766,0x6AD282FD,0xBDD65DDC +data4 0x3F7F5C68,0x3B23CC5C,0xF153761A,0xBDCDAB83 +data4 0x3F7F5470,0x3B2BC997,0x341D0F8F,0xBDDADA40 +data4 0x3F7F4C78,0x3B33C711,0xEBC394E8,0x3DCD1BD7 +data4 0x3F7F4488,0x3B3BBCC6,0x52E3E695,0xBDC3532B +data4 0x3F7F3C90,0x3B43BAC0,0xE846B3DE,0xBDA3961E +data4 0x3F7F34A0,0x3B4BB0F4,0x785778D4,0xBDDADF06 +data4 0x3F7F2CA8,0x3B53AF6D,0xE55CE212,0x3DCC3ED1 +data4 0x3F7F24B8,0x3B5BA620,0x9E382C15,0xBDBA3103 +data4 0x3F7F1CC8,0x3B639D12,0x5C5AF197,0x3D635A0B +data4 0x3F7F14D8,0x3B6B9444,0x71D34EFC,0xBDDCCB19 +data4 0x3F7F0CE0,0x3B7393BC,0x52CD7ADA,0x3DC74502 +data4 0x3F7F04F0,0x3B7B8B6D,0x7D7F2A42,0xBDB68F17 +LOCAL_OBJECT_END(Constants_G_H_h3) + +LOCAL_OBJECT_START(lgammal_data) +// Positive overflow value +data8 0xB8D54C8BFFFDEBF4, 0x00007FF1 +LOCAL_OBJECT_END(lgammal_data) + +LOCAL_OBJECT_START(lgammal_Stirling) +// Coefficients needed for Strirling's formula +data8 0x3FED67F1C864BEB4 // High part of 0.5*ln(2*Pi) +data8 0x3C94D252F2400510 // Low part of 0.5*ln(2*Pi) +// +// Bernulli numbers used in Striling's formula for -2^63 < |x| < -13.0 +//(B1H, B1L) = 8.3333333333333333333262747254e-02 +data8 0x3FB5555555555555, 0x3C55555555555555 +data8 0xB60B60B60B60B60B, 0x0000BFF6 //B2 = -2.7777777777777777777777777778e-03 +data8 0xD00D00D00D00D00D, 0x00003FF4 //B3 = 7.9365079365079365079365079365e-04 +data8 0x9C09C09C09C09C0A, 0x0000BFF4 //B4 = -5.9523809523809523809523809524e-04 +data8 0xDCA8F158C7F91AB8, 0x00003FF4 //B5 = 8.4175084175084175084175084175e-04 +data8 0xFB5586CCC9E3E410, 0x0000BFF5 //B6 = -1.9175269175269175269175269175e-03 +data8 0xD20D20D20D20D20D, 0x00003FF7 //B7 = 6.4102564102564102564102564103e-03 +data8 0xF21436587A9CBEE1, 0x0000BFF9 //B8 = -2.9550653594771241830065359477e-02 +data8 0xB7F4B1C0F033FFD1, 0x00003FFC //B9 = 1.7964437236883057316493849002e-01 +data8 0xB23B3808C0F9CF6E, 0x0000BFFF //B10 = -1.3924322169059011164274322169e+00 +// Polynomial coefficients for Stirling's formula, -13.0 < x < -6.0 +data8 0x3FB5555555555555, 0x3C4D75060289C58B //A0 +data8 0xB60B60B60B0F0876, 0x0000BFF6 //A1 +data8 0xD00D00CE54B1256C, 0x00003FF4 //A2 +data8 0x9C09BF46B58F75E1, 0x0000BFF4 //A3 +data8 0xDCA8483BC91ACC6D, 0x00003FF4 //A4 +data8 0xFB3965C939CC9FEE, 0x0000BFF5 //A5 +data8 0xD0723ADE3F0BC401, 0x00003FF7 //A6 +data8 0xE1ED7434E81F0B73, 0x0000BFF9 //A7 +data8 0x8069C6982F993283, 0x00003FFC //A8 +data8 0xC271F65BFA5BEE3F, 0x0000BFFD //A9 +LOCAL_OBJECT_END(lgammal_Stirling) + +LOCAL_OBJECT_START(lgammal_lnsin_data) +// polynomial approximation of -ln(sin(Pi*x)/(Pi*x)), 0 < x <= 0.5 +data8 0x3FFA51A6625307D3, 0x3C81873332FAF94C //A2 +data8 0x8A8991563EC241C3, 0x00003FFE //A4 +data8 0xADA06588061805DF, 0x00003FFD //A6 +data8 0x80859B57C338D0F7, 0x00003FFD //A8 +data8 0xCD00F1C2D78754BD, 0x00003FFC //A10 +data8 0xAAB56B1D3A1F4655, 0x00003FFC //A12 +data8 0x924B6F2FBBED12B1, 0x00003FFC //A14 +data8 0x80008E58765F43FC, 0x00003FFC //A16 +data8 0x3FBC718EC115E429//A18 +data8 0x3FB99CE544FE183E//A20 +data8 0x3FB7251C09EAAD89//A22 +data8 0x3FB64A970733628C//A24 +data8 0x3FAC92D6802A3498//A26 +data8 0x3FC47E1165261586//A28 +data8 0xBFCA1BAA434750D4//A30 +data8 0x3FE460001C4D5961//A32 +data8 0xBFE6F06A3E4908AD//A34 +data8 0x3FE300889EBB203A//A36 +LOCAL_OBJECT_END(lgammal_lnsin_data) + +LOCAL_OBJECT_START(lgammal_half_3Q_data) +// Polynomial coefficients for the lgammal(x), 0.5 <= x < 0.75 +data8 0xBFF7A648EE90C62E, 0x3C713F326857E066 // A3, A0L +data8 0xBFF73E4B8BA780AE, 0xBCA953BC788877EF // A1, A1L +data8 0x403774DCD58D0291, 0xC0415254D5AE6623 // D0, D1 +data8 0x40B07213855CBFB0, 0xC0B8855E25D2D229 // C20, C21 +data8 0x3FFB359F85FF5000, 0x3C9BAECE6EF9EF3A // A2, A2L +data8 0x3FD717D498A3A8CC, 0xBC9088E101CFEDFA // A0, A3L +data8 0xAFEF36CC5AEC3FF0, 0x00004002 // E6 +data8 0xABE2054E1C34E791, 0x00004001 // E4 +data8 0xB39343637B2900D1, 0x00004000 // E2 +data8 0xD74FB710D53F58F6, 0x00003FFF // E0 +data8 0x4070655963BA4256, 0xC078DA9D263C4EA3 // D6, D7 +data8 0x405CD2B6A9B90978, 0xC065B3B9F4F4F171 // D4, D5 +data8 0x4049BC2204CF61FF, 0xC05337227E0BA152 // D2, D3 +data8 0x4095509A50C07A96, 0xC0A0747949D2FB45 // C18, C19 +data8 0x4082ECCBAD709414, 0xC08CD02FB088A702 // C16, C17 +data8 0xFFE4B2A61B508DD5, 0x0000C002 // E7 +data8 0xF461ADB8AE17E0A5, 0x0000C001 // E5 +data8 0xF5BE8B0B90325F20, 0x0000C000 // E3 +data8 0x877B275F3FB78DCA, 0x0000C000 // E1 +LOCAL_OBJECT_END(lgammal_half_3Q_data) + +LOCAL_OBJECT_START(lgammal_half_3Q_neg_data) +// Polynomial coefficients for the lgammal(x), -0.75 < x <= -0.5 +data8 0xC014836EFD94899C, 0x3C9835679663B44F // A3, A0L +data8 0xBFF276C7B4FB1875, 0xBC92D3D9FA29A1C0 // A1, A1L +data8 0x40C5178F24E1A435, 0xC0D9DE84FBC5D76A // D0, D1 +data8 0x41D4D1B236BF6E93, 0xC1EBB0445CE58550 // C20, C21 +data8 0x4015718CD67F63D3, 0x3CC5354B6F04B59C // A2, A2L +data8 0x3FF554493087E1ED, 0xBCB72715E37B02B9 // A0, A3L +data8 0xE4AC7E915FA72229, 0x00004009 // E6 +data8 0xA28244206395FCC6, 0x00004007 // E4 +data8 0xFB045F19C07B2544, 0x00004004 // E2 +data8 0xE5C8A6E6A9BA7D7B, 0x00004002 // E0 +data8 0x4143943B55BF5118, 0xC158AC05EA675406 // D6, D7 +data8 0x4118F6833D19717C, 0xC12F51A6F375CC80 // D4, D5 +data8 0x40F00C209483481C, 0xC103F1DABF750259 // D2, D3 +data8 0x4191038F2D8F9E40, 0xC1A413066DA8AE4A // C18, C19 +data8 0x4170B537EDD833DE, 0xC1857E79424C61CE // C16, C17 +data8 0x8941D8AB4855DB73, 0x0000C00B // E7 +data8 0xBB822B131BD2E813, 0x0000C008 // E5 +data8 0x852B4C03B83D2D4F, 0x0000C006 // E3 +data8 0xC754CA7E2DDC0F1F, 0x0000C003 // E1 +LOCAL_OBJECT_END(lgammal_half_3Q_neg_data) + +LOCAL_OBJECT_START(lgammal_2Q_4_data) +// Polynomial coefficients for the lgammal(x), 2.25 <= |x| < 4.0 +data8 0xBFCA4D55BEAB2D6F, 0x3C7ABC9DA14141F5 // A3, A0L +data8 0x3FFD8773039049E7, 0x3C66CB7957A95BA4 // A1, A1L +data8 0x3F45C3CC79E91E7D, 0xBF3A8E5005937E97 // D0, D1 +data8 0x3EC951E35E1C9203, 0xBEB030A90026C5DF // C20, C21 +data8 0x3FE94699894C1F4C, 0x3C91884D21D123F1 // A2, A2L +data8 0x3FE62E42FEFA39EF, 0xBC66480CEB70870F // A0, A3L +data8 0xF1C2EAFF0B3A7579, 0x00003FF5 // E6 +data8 0xB36AF863926B55A3, 0x00003FF7 // E4 +data8 0x9620656185BB44CA, 0x00003FF9 // E2 +data8 0xA264558FB0906AFF, 0x00003FFB // E0 +data8 0x3F03D59E9666C961, 0xBEF91115893D84A6 // D6, D7 +data8 0x3F19333611C46225, 0xBF0F89EB7D029870 // D4, D5 +data8 0x3F3055A96B347AFE, 0xBF243B5153E178A8 // D2, D3 +data8 0x3ED9A4AEF30C4BB2, 0xBED388138B1CEFF2 // C18, C19 +data8 0x3EEF7945A3C3A254, 0xBEE36F32A938EF11 // C16, C17 +data8 0x9028923F47C82118, 0x0000BFF5 // E7 +data8 0xCE0DAAFB6DC93B22, 0x0000BFF6 // E5 +data8 0xA0D0983B34AC4C8D, 0x0000BFF8 // E3 +data8 0x94D6C50FEB8B0CE7, 0x0000BFFA // E1 +LOCAL_OBJECT_END(lgammal_2Q_4_data) + +LOCAL_OBJECT_START(lgammal_4_8_data) +// Polynomial coefficients for the lgammal(x), 4.0 <= |x| < 8.0 +data8 0xBFD6626BC9B31B54, 0x3CAA53C82493A92B // A3, A0L +data8 0x401B4C420A50AD7C, 0x3C8C6E9929F789A3 // A1, A1L +data8 0x3F49410427E928C2, 0xBF3E312678F8C146 // D0, D1 +data8 0x3ED51065F7CD5848, 0xBED052782A03312F // C20, C21 +data8 0x3FF735973273D5EC, 0x3C831DFC65BF8CCF // A2, A2L +data8 0x401326643C4479C9, 0xBC6FA0498C5548A6 // A0, A3L +data8 0x9382D8B3CD4EB7E3, 0x00003FF6 // E6 +data8 0xE9F92CAD8A85CBCD, 0x00003FF7 // E4 +data8 0xD58389FE38258CEC, 0x00003FF9 // E2 +data8 0x81310136363AE8AA, 0x00003FFC // E0 +data8 0x3F04F0AE38E78570, 0xBEF9E2144BB8F03C // D6, D7 +data8 0x3F1B5E992A6CBC2A, 0xBF10F3F400113911 // D4, D5 +data8 0x3F323EE00AAB7DEE, 0xBF2640FDFA9FB637 // D2, D3 +data8 0x3ED2143EBAFF067A, 0xBEBBDEB92D6FF35D // C18, C19 +data8 0x3EF173A42B69AAA4, 0xBEE78B9951A2EAA5 // C16, C17 +data8 0xAB3CCAC6344E52AA, 0x0000BFF5 // E7 +data8 0x81ACCB8915B16508, 0x0000BFF7 // E5 +data8 0xDA62C7221102C426, 0x0000BFF8 // E3 +data8 0xDF1BD44C4083580A, 0x0000BFFA // E1 +LOCAL_OBJECT_END(lgammal_4_8_data) + +LOCAL_OBJECT_START(lgammal_loc_min_data) +// Polynomial coefficients for the lgammal(x), 1.3125 <= x < 1.5625 +data8 0xBB16C31AB5F1FB71, 0x00003FFF // xMin - point of local minimum +data8 0xBFC2E4278DC6BC23, 0xBC683DA8DDCA9650 // A3, A0L +data8 0x3BD4DB7D0CA61D5F, 0x386E719EDD01D801 // A1, A1L +data8 0x3F4CC72638E1D93F, 0xBF4228EC9953CCB9 // D0, D1 +data8 0x3ED222F97A04613E,0xBED3DDD58095CB6C // C20, C21 +data8 0x3FDEF72BC8EE38AB, 0x3C863AFF3FC48940 // A2, A2L +data8 0xBFBF19B9BCC38A41, 0xBC7425F1BFFC1442// A0, A3L +data8 0x941890032BEB34C3, 0x00003FF6 // E6 +data8 0xC7E701591CE534BC, 0x00003FF7 // E4 +data8 0x93373CBD05138DD4, 0x00003FF9 // E2 +data8 0x845A14A6A81C05D6, 0x00003FFB // E0 +data8 0x3F0F6C4DF6D47A13, 0xBF045DCDB5B49E19 // D6, D7 +data8 0x3F22E23345DDE59C, 0xBF1851159AFB1735 // D4, D5 +data8 0x3F37101EA4022B78, 0xBF2D721E6323AF13 // D2, D3 +data8 0x3EE691EBE82DF09D, 0xBEDD42550961F730 // C18, C19 +data8 0x3EFA793EDE99AD85, 0xBEF14000108E70BE // C16, C17 +data8 0xB7CBC033ACE0C99C, 0x0000BFF5 // E7 +data8 0xF178D1F7B1A45E27, 0x0000BFF6 // E5 +data8 0xA8FCFCA8106F471C, 0x0000BFF8 // E3 +data8 0x864D46FA898A9AD2, 0x0000BFFA // E1 +LOCAL_OBJECT_END(lgammal_loc_min_data) + +LOCAL_OBJECT_START(lgammal_03Q_1Q_data) +// Polynomial coefficients for the lgammal(x), 0.75 <= |x| < 1.3125 +data8 0x3FD151322AC7D848, 0x3C7184DE0DB7B4EE // A4, A2L +data8 0x3FD9A4D55BEAB2D6, 0x3C9E934AAB10845F // A3, A1L +data8 0x3FB111289C381259, 0x3FAFFFCFB32AE18D // D2, D3 +data8 0x3FB3B1D9E0E3E00D, 0x3FB2496F0D3768DF // D0, D1 +data8 0xBA461972C057D439, 0x00003FFB // E6 +data8 0x3FEA51A6625307D3, 0x3C76ABC886A72DA2 // A2, A4L +data8 0x3FA8EFE46B32A70E, 0x3F8F31B3559576B6 // C17, C20 +data8 0xE403383700387D85, 0x00003FFB // E4 +data8 0x9381D0EE74BF7251, 0x00003FFC // E2 +data8 0x3FAA2177A6D28177, 0x3FA4895E65FBD995 // C18, C19 +data8 0x3FAAED2C77DBEE5D, 0x3FA94CA59385512C // D6, D7 +data8 0x3FAE1F522E8A5941, 0x3FAC785EF56DD87E // D4, D5 +data8 0x3FB556AD5FA56F0A, 0x3FA81F416E87C783 // E7, C16 +data8 0xCD00F1C2DC2C9F1E, 0x00003FFB // E5 +data8 0x3FE2788CFC6FB618, 0x3C8E52519B5B17CB // A1, A3L +data8 0x80859B57C3E7F241, 0x00003FFC // E3 +data8 0xADA065880615F401, 0x00003FFC // E1 +data8 0xD45CE0BD530AB50E, 0x00003FFC // E0 +LOCAL_OBJECT_END(lgammal_03Q_1Q_data) + +LOCAL_OBJECT_START(lgammal_13Q_2Q_data) +// Polynomial coefficients for the lgammal(x), 1.5625 <= |x| < 2.25 +data8 0x3F951322AC7D8483, 0x3C71873D88C6539D // A4, A2L +data8 0xBFB13E001A557606, 0x3C56CB907018A101 // A3, A1L +data8 0xBEC11B2EC1E7F6FC, 0x3EB0064ED9824CC7 // D2, D3 +data8 0xBEE3CBC963EC103A, 0x3ED2597A330C107D // D0, D1 +data8 0xBC6F2DEBDFE66F38, 0x0000BFF0 // E6 +data8 0x3FD4A34CC4A60FA6, 0x3C3AFC9BF775E8A0 // A2, A4L +data8 0x3E48B0C542F85B32, 0xBE347F12EAF787AB // C17, C20 +data8 0xE9FEA63B6984FA1E, 0x0000BFF2 // E4 +data8 0x9C562E15FC703BBF, 0x0000BFF5 // E2 +data8 0xBE3C12A50AB0355E, 0xBE1C941626AE4717 // C18, C19 +data8 0xBE7AFA8714342BC4,0x3E69A12D2B7761CB // D6, D7 +data8 0xBE9E25EF1D526730, 0x3E8C762291889B99 // D4, D5 +data8 0x3EF580DCEE754733, 0xBE57C811D070549C // E7, C16 +data8 0xD093D878BE209C98, 0x00003FF1 // E5 +data8 0x3FDB0EE6072093CE, 0xBC6024B9E81281C4 // A1, A3L +data8 0x859B57C31CB77D96, 0x00003FF4 // E3 +data8 0xBD6EB756DB617E8D, 0x00003FF6 // E1 +data8 0xF2027E10C7AF8C38, 0x0000BFF7 // E0 +LOCAL_OBJECT_END(lgammal_13Q_2Q_data) + +LOCAL_OBJECT_START(lgammal_8_10_data) +// Polynomial coefficients for the lgammal(x), 8.0 <= |x| < 10.0 +// Multi Precision terms +data8 0x40312008A3A23E5C, 0x3CE020B4F2E4083A //A1 +data8 0x4025358E82FCB70C, 0x3CD4A5A74AF7B99C //A0 +// Native precision terms +data8 0xF0AA239FFBC616D2, 0x00004000 //A2 +data8 0x96A8EA798FE57D66, 0x0000BFFF //A3 +data8 0x8D501B7E3B9B9BDB, 0x00003FFE //A4 +data8 0x9EE062401F4B1DC2, 0x0000BFFD //A5 +data8 0xC63FD8CD31E93431, 0x00003FFC //A6 +data8 0x8461101709C23C30, 0x0000BFFC //A7 +data8 0xB96D7EA7EF3648B2, 0x00003FFB //A8 +data8 0x86886759D2ACC906, 0x0000BFFB //A9 +data8 0xC894B6E28265B183, 0x00003FFA //A10 +data8 0x98C4348CAD821662, 0x0000BFFA //A11 +data8 0xEC9B092226A94DF2, 0x00003FF9 //A12 +data8 0xB9F169FF9B98CDDC, 0x0000BFF9 //A13 +data8 0x9A3A32BB040894D3, 0x00003FF9 //A14 +data8 0xF9504CCC1003B3C3, 0x0000BFF8 //A15 +LOCAL_OBJECT_END(lgammal_8_10_data) + +LOCAL_OBJECT_START(lgammal_03Q_6_data) +// Polynomial coefficients for the lgammal(x), 0.75 <= |x| < 1.0 +data8 0xBFBC47DCA479E295, 0xBC607E6C1A379D55 //A3 +data8 0x3FCA051C372609ED, 0x3C7B02D73EB7D831 //A0 +data8 0xBFE15FAFA86B04DB, 0xBC3F52EE4A8945B5 //A1 +data8 0x3FD455C4FF28F0BF, 0x3C75F8C6C99F30BB //A2 +data8 0xD2CF04CD934F03E1, 0x00003FFA //A4 +data8 0xDB4ED667E29256E1, 0x0000BFF9 //A5 +data8 0xF155A33A5B6021BF, 0x00003FF8 //A6 +data8 0x895E9B9D386E0338, 0x0000BFF8 //A7 +data8 0xA001BE94B937112E, 0x00003FF7 //A8 +data8 0xBD82846E490ED048, 0x0000BFF6 //A9 +data8 0xE358D24EC30DBB5D, 0x00003FF5 //A10 +data8 0x89C4F3652446B78B, 0x0000BFF5 //A11 +data8 0xA86043E10280193D, 0x00003FF4 //A12 +data8 0xCF3A2FBA61EB7682, 0x0000BFF3 //A13 +data8 0x3F300900CC9200EC //A14 +data8 0xBF23F42264B94AE8 //A15 +data8 0x3F18EEF29895FE73 //A16 +data8 0xBF0F3C4563E3EDFB //A17 +data8 0x3F0387DBBC385056 //A18 +data8 0xBEF81B4004F92900 //A19 +data8 0x3EECA6692A9A5B81 //A20 +data8 0xBEDF61A0059C15D3 //A21 +data8 0x3ECDA9F40DCA0111 //A22 +data8 0xBEB60FE788217BAF //A23 +data8 0x3E9661D795DFC8C6 //A24 +data8 0xBE66C7756A4EDEE5 //A25 +// Polynomial coefficients for the lgammal(x), 1.0 <= |x| < 2.0 +data8 0xBFC1AE55B180726B, 0xBC7DE1BC478453F5 //A3 +data8 0xBFBEEB95B094C191, 0xBC53456FF6F1C9D9 //A0 +data8 0x3FA2AED059BD608A, 0x3C0B65CC647D557F //A1 +data8 0x3FDDE9E64DF22EF2, 0x3C8993939A8BA8E4 //A2 +data8 0xF07C206D6B100CFF, 0x00003FFA //A4 +data8 0xED2CEA9BA52FE7FB, 0x0000BFF9 //A5 +data8 0xFCE51CED52DF3602, 0x00003FF8 //A6 +data8 0x8D45D27872326619, 0x0000BFF8 //A7 +data8 0xA2B78D6BCEBE27F7, 0x00003FF7 //A8 +data8 0xBF6DC0996A895B6F, 0x0000BFF6 //A9 +data8 0xE4B9AD335AF82D79, 0x00003FF5 //A10 +data8 0x8A451880195362A1, 0x0000BFF5 //A11 +data8 0xA8BE35E63089A7A9, 0x00003FF4 //A12 +data8 0xCF7FA175FA11C40C, 0x0000BFF3 //A13 +data8 0x3F300C282FAA3B02 //A14 +data8 0xBF23F6AEBDA68B80 //A15 +data8 0x3F18F6860E2224DD //A16 +data8 0xBF0F542B3CE32F28 //A17 +data8 0x3F039436218C9BF8 //A18 +data8 0xBEF8AE6307677AEC //A19 +data8 0x3EF0B55527B3A211 //A20 +data8 0xBEE576AC995E7605 //A21 +data8 0x3ED102DDC1365D2D //A22 +data8 0xBEC442184F97EA54 //A23 +data8 0x3ED4D2283DFE5FC6 //A24 +data8 0xBECB9219A9B46787 //A25 +// Polynomial coefficients for the lgammal(x), 2.0 <= |x| < 3.0 +data8 0xBFCA4D55BEAB2D6F, 0xBC66F80E5BFD5AF5 //A3 +data8 0x3FE62E42FEFA39EF, 0x3C7ABC9E3B347E3D //A0 +data8 0x3FFD8773039049E7, 0x3C66CB9007C426EA //A1 +data8 0x3FE94699894C1F4C, 0x3C918726EB111663 //A2 +data8 0xA264558FB0906209, 0x00003FFB //A4 +data8 0x94D6C50FEB902ADC, 0x0000BFFA //A5 +data8 0x9620656184243D17, 0x00003FF9 //A6 +data8 0xA0D0983B8BCA910B, 0x0000BFF8 //A7 +data8 0xB36AF8559B222BD3, 0x00003FF7 //A8 +data8 0xCE0DACB3260AE6E5, 0x0000BFF6 //A9 +data8 0xF1C2C0BF0437C7DB, 0x00003FF5 //A10 +data8 0x902A2F2F3AB74A92, 0x0000BFF5 //A11 +data8 0xAE05009B1B2C6E4C, 0x00003FF4 //A12 +data8 0xD5B71F6456D7D4CB, 0x0000BFF3 //A13 +data8 0x3F2F0351D71BC9C6 //A14 +data8 0xBF2B53BC56A3B793 //A15 +data8 0xBF18B12DC6F6B861 //A16 +data8 0xBF43EE6EB5215C2F //A17 +data8 0xBF5474787CDD455E //A18 +data8 0xBF642B503C9C060A //A19 +data8 0xBF6E07D1AA254AA3 //A20 +data8 0xBF71C785443AAEE8 //A21 +data8 0xBF6F67BF81B71052 //A22 +data8 0xBF63E4BCCF4FFABF //A23 +data8 0xBF50067F8C671D5A //A24 +data8 0xBF29C770D680A5AC //A25 +// Polynomial coefficients for the lgammal(x), 4.0 <= |x| < 6.0 +data8 0xBFD6626BC9B31B54, 0xBC85AABE08680902 //A3 +data8 0x401326643C4479C9, 0x3CAA53C26F31E364 //A0 +data8 0x401B4C420A50AD7C, 0x3C8C76D55E57DD8D //A1 +data8 0x3FF735973273D5EC, 0x3C83A0B78E09188A //A2 +data8 0x81310136363AAB6D, 0x00003FFC //A4 +data8 0xDF1BD44C4075C0E6, 0x0000BFFA //A5 +data8 0xD58389FE38D8D664, 0x00003FF9 //A6 +data8 0xDA62C7221D5B5F87, 0x0000BFF8 //A7 +data8 0xE9F92CAD0263E157, 0x00003FF7 //A8 +data8 0x81ACCB8606C165FE, 0x0000BFF7 //A9 +data8 0x9382D8D263D1C2A3, 0x00003FF6 //A10 +data8 0xAB3CCBA4C853B12C, 0x0000BFF5 //A11 +data8 0xCA0818BBCCC59296, 0x00003FF4 //A12 +data8 0xF18912691CBB5BD0, 0x0000BFF3 //A13 +data8 0x3F323EF5D8330339 //A14 +data8 0xBF2641132EA571F7 //A15 +data8 0x3F1B5D9576175CA9 //A16 +data8 0xBF10F56A689C623D //A17 +data8 0x3F04CACA9141A18D //A18 +data8 0xBEFA307AC9B4E85D //A19 +data8 0x3EF4B625939FBE32 //A20 +data8 0xBECEE6AC1420F86F //A21 +data8 0xBE9A95AE2E485964 //A22 +data8 0xBF039EF47F8C09BB //A23 +data8 0xBF05345957F7B7A9 //A24 +data8 0xBEF85AE6385D4CCC //A25 +// Polynomial coefficients for the lgammal(x), 3.0 <= |x| < 4.0 +data8 0xBFCA4D55BEAB2D6F, 0xBC667B20FF46C6A8 //A3 +data8 0x3FE62E42FEFA39EF, 0x3C7ABC9E3B398012 //A0 +data8 0x3FFD8773039049E7, 0x3C66CB9070238D77 //A1 +data8 0x3FE94699894C1F4C, 0x3C91873D8839B1CD //A2 +data8 0xA264558FB0906D7E, 0x00003FFB //A4 +data8 0x94D6C50FEB8AFD72, 0x0000BFFA //A5 +data8 0x9620656185B68F14, 0x00003FF9 //A6 +data8 0xA0D0983B34B7088A, 0x0000BFF8 //A7 +data8 0xB36AF863964AA440, 0x00003FF7 //A8 +data8 0xCE0DAAFB5497AFB8, 0x0000BFF6 //A9 +data8 0xF1C2EAFA79CC2864, 0x00003FF5 //A10 +data8 0x9028922A839572B8, 0x0000BFF5 //A11 +data8 0xAE1E62F870BA0278, 0x00003FF4 //A12 +data8 0xD4726F681E2ABA29, 0x0000BFF3 //A13 +data8 0x3F30559B9A02FADF //A14 +data8 0xBF243ADEB1266CAE //A15 +data8 0x3F19303B6F552603 //A16 +data8 0xBF0F768C288EC643 //A17 +data8 0x3F039D5356C21DE1 //A18 +data8 0xBEF81BCA8168E6BE //A19 +data8 0x3EEC74A53A06AD54 //A20 +data8 0xBEDED52D1A5DACDF //A21 +data8 0x3ECCB4C2C7087342 //A22 +data8 0xBEB4F1FAFDFF5C2F //A23 +data8 0x3E94C80B52D58904 //A24 +data8 0xBE64A328CBE92A27 //A25 +LOCAL_OBJECT_END(lgammal_03Q_6_data) + +LOCAL_OBJECT_START(lgammal_1pEps_data) +// Polynomial coefficients for the lgammal(x), 1 - 2^(-7) <= |x| < 1 + 2^(-7) +data8 0x93C467E37DB0C7A5, 0x00003FFE //A1 +data8 0xD28D3312983E9919, 0x00003FFE //A2 +data8 0xCD26AADF559A47E3, 0x00003FFD //A3 +data8 0x8A8991563EC22E81, 0x00003FFD //A4 +data8 0x3FCA8B9C168D52FE //A5 +data8 0x3FC5B40CB0696370 //A6 +data8 0x3FC270AC2229A65D //A7 +data8 0x3FC0110AF10FCBFC //A8 +// Polynomial coefficients for the log1p(x), - 2^(-7) <= |x| < 2^(-7) +data8 0x3FBC71C71C71C71C //P8 +data8 0xBFC0000000000000 //P7 +data8 0x3FC2492492492492 //P6 +data8 0xBFC5555555555555 //P5 +data8 0x3FC999999999999A //P4 +data8 0xBFD0000000000000 //P3 +data8 0x3FD5555555555555 //P2 +data8 0xBFE0000000000000 //P1 +// short version of "lnsin" polynomial +data8 0xD28D3312983E9918, 0x00003FFF //A2 +data8 0x8A8991563EC241B6, 0x00003FFE //A4 +data8 0xADA06588061830A5, 0x00003FFD //A6 +data8 0x80859B57C31CB746, 0x00003FFD //A8 +LOCAL_OBJECT_END(lgammal_1pEps_data) + +LOCAL_OBJECT_START(lgammal_neg2andHalf_data) +// Polynomial coefficients for the lgammal(x), -2.005859375 <= x < -2.5 +data8 0xBF927781D4BB093A, 0xBC511D86D85B7045 // A3, A0L +data8 0x3FF1A68793DEFC15, 0x3C9852AE2DA7DEEF // A1, A1L +data8 0x408555562D45FAFD, 0xBF972CDAFE5FEFAD // D0, D1 +data8 0xC18682331EF492A5, 0xC1845E3E0D29606B // C20, C21 +data8 0x4013141822E16979, 0x3CCF8718B6E75F6C // A2, A2L +data8 0xBFACCBF9F5ED0F15, 0xBBDD1AEB73297401 // A0, A3L +data8 0xCCCDB17423046445, 0x00004006 // E6 +data8 0x800514E230A3A452, 0x00004005 // E4 +data8 0xAAE9A48EC162E76F, 0x00004003 // E2 +data8 0x81D4F88B3F3EA0FC, 0x00004002 // E0 +data8 0x40CF3F3E35238DA0, 0xC0F8B340945F1A7E // D6, D7 +data8 0x40BF89EC0BD609C6, 0xC095897242AEFEE2 // D4, D5 +data8 0x40A2482FF01DBC5C, 0xC02095E275FDCF62 // D2, D3 +data8 0xC1641354F2312A6A, 0xC17B3657F85258E9 // C18, C19 +data8 0xC11F964E9ECBE2C9, 0xC146D7A90F70696C // C16, C17 +data8 0xE7AECDE6AF8EA816, 0x0000BFEF // E7 +data8 0xD711252FEBBE1091, 0x0000BFEB // E5 +data8 0xE648BD10F8C43391, 0x0000BFEF // E3 +data8 0x948A1E78AA00A98D, 0x0000BFF4 // E1 +LOCAL_OBJECT_END(lgammal_neg2andHalf_data) + +LOCAL_OBJECT_START(lgammal_near_neg_half_data) +// Polynomial coefficients for the lgammal(x), -0.5 < x < -0.40625 +data8 0xBFC1AE55B180726C, 0x3C8053CD734E6A1D // A3, A0L +data8 0x3FA2AED059BD608A, 0x3C0CD3D2CDBA17F4 // A1, A1L +data8 0x40855554DBCD1E1E, 0x3F96C51AC2BEE9E1 // D0, D1 +data8 0xC18682331EF4927D, 0x41845E3E0D295DFC // C20, C21 +data8 0x4011DE9E64DF22EF, 0x3CA692B70DAD6B7B // A2, A2L +data8 0x3FF43F89A3F0EDD6, 0xBC4955AED0FA087D // A0, A3L +data8 0xCCCD3F1DF4A2C1DD, 0x00004006 // E6 +data8 0x80028ADE33C7FCD9, 0x00004005 // E4 +data8 0xAACA474E485507EF, 0x00004003 // E2 +data8 0x80F07C206D6B0ECD, 0x00004002 // E0 +data8 0x40CF3F3E33E83056, 0x40F8B340944633D9 // D6, D7 +data8 0x40BF89EC059931F0, 0x409589723307AD20 // D4, D5 +data8 0x40A2482FD0054824, 0x402095CE7F19D011 // D2, D3 +data8 0xC1641354F2313614, 0x417B3657F8525354 // C18, C19 +data8 0xC11F964E9ECFD21C, 0x4146D7A90F701836 // C16, C17 +data8 0x86A9C01F0EA11E5A, 0x0000BFF5 // E7 +data8 0xBF6D8469142881C0, 0x0000BFF6 // E5 +data8 0x8D45D277BA8255F1, 0x0000BFF8 // E3 +data8 0xED2CEA9BA528BCC3, 0x0000BFF9 // E1 +LOCAL_OBJECT_END(lgammal_near_neg_half_data) + +//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +////////////// POLYNOMIAL COEFFICIENTS FOR "NEAR ROOTS" RANGES ///////////// +////////////// THIS PART OF TABLE SHOULD BE ADDRESSED REALLY RARE ///////////// +//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +LOCAL_OBJECT_START(lgammal_right_roots_polynomial_data) +// Polynomial coefficients for right root on [-3, -2] +// Lgammal is aproximated by polynomial within [-.056244 ; .158208 ] range +data8 0xBBBD5E9DCD11030B, 0xB867411D9FF87DD4 //A0 +data8 0x3FF83FE966AF535E, 0x3CAA21235B8A769A //A1 +data8 0x40136EEBB002F55C, 0x3CC3959A6029838E //A2 +data8 0xB4A5302C53C2BEDD, 0x00003FFF //A3 +data8 0x8B8C6BE504F2DA1C, 0x00004002 //A4 +data8 0xB99CFF02593B4D98, 0x00004001 //A5 +data8 0x4038D32F682AA1CF //A6 +data8 0x403809F04EE6C5B5 //A7 +data8 0x40548EAA81634CEE //A8 +data8 0x4059297ADB6BC03D //A9 +data8 0x407286FB8EC5C9DA //A10 +data8 0x407A92E05B744CFB //A11 +data8 0x4091A9D4144258CD //A12 +data8 0x409C4D01D24F367E //A13 +data8 0x40B1871B9A426A83 //A14 +data8 0x40BE51C48BD9A583 //A15 +data8 0x40D2140D0C6153E7 //A16 +data8 0x40E0FB2C989CE4A3 //A17 +data8 0x40E52739AB005641 //A18 +data8 0x41161E3E6DDF503A //A19 +// Polynomial coefficients for right root on [-4, -3] +// Lgammal is aproximated by polynomial within [-.172797 ; .171573 ] range +data8 0x3C172712B248E42E, 0x38CB8D17801A5D67 //A0 +data8 0x401F20A65F2FAC54, 0x3CCB9EA1817A824E //A1 +data8 0x4039D4D2977150EF, 0x3CDA42E149B6276A //A2 +data8 0xE089B8926AE2D9CB, 0x00004005 //A3 +data8 0x933901EBBB586C37, 0x00004008 //A4 +data8 0xCCD319BED1CFA1CD, 0x0000400A //A5 +data8 0x40D293C3F78D3C37 //A6 +data8 0x40FBB97AA0B6DD02 //A7 +data8 0x41251EA3345E5EB9 //A8 +data8 0x415057F65C92E7B0 //A9 +data8 0x41799C865241B505 //A10 +data8 0x41A445209EFE896B //A11 +data8 0x41D02D21880C953B //A12 +data8 0x41F9FFDE8C63E16D //A13 +data8 0x422504DC8302D2BE //A14 +data8 0x425111BF18C95414 //A15 +data8 0x427BCBE74A2B8EF7 //A16 +data8 0x42A7256F59B286F7 //A17 +data8 0x42D462D1586DE61F //A18 +data8 0x42FBB1228D6C5118 //A19 +// Polynomial coefficients for right root on [-5, -4] +// Lgammal is aproximated by polynomial within [-.163171 ; .161988 ] range +data8 0x3C5840FBAFDEE5BB, 0x38CAC0336E8C490A //A0 +data8 0x403ACA5CF4921642, 0x3CCEDCDDA5491E56 //A1 +data8 0x40744415CD813F8E, 0x3CFBFEBC17E39146 //A2 +data8 0xAACD88D954E3E1BD, 0x0000400B //A3 +data8 0xCB68C710D75ED802, 0x0000400F //A4 +data8 0x8130F5AB997277AC, 0x00004014 //A5 +data8 0x41855E3DBF99EBA7 //A6 +data8 0x41CD14FE49C49FC2 //A7 +data8 0x421433DCE281F07D //A8 +data8 0x425C8399C7A92B6F //A9 +data8 0x42A45FBE67840F1A //A10 +data8 0x42ED68D75F9E6C98 //A11 +data8 0x433567291C27E5BE //A12 +data8 0x437F5ED7A9D9FD28 //A13 +data8 0x43C720A65C8AB711 //A14 +data8 0x441120A6C1D40B9B //A15 +data8 0x44596F561F2D1CBE //A16 +data8 0x44A3507DA81D5C01 //A17 +data8 0x44EF06A31E39EEDF //A18 +data8 0x45333774C99F523F //A19 +// Polynomial coefficients for right root on [-6, -5] +// Lgammal is aproximated by polynomial within [-.156450 ; .156126 ] range +data8 0x3C71B82D6B2B3304, 0x3917186E3C0DC231 //A0 +data8 0x405ED72E0829AE02, 0x3C960C25157980EB //A1 +data8 0x40BCECC32EC22F9B, 0x3D5D8335A32F019C //A2 +data8 0x929EC2B1FB931F17, 0x00004012 //A3 +data8 0xD112EF96D37316DE, 0x00004018 //A4 +data8 0x9F00BB9BB13416AB, 0x0000401F //A5 +data8 0x425F7D8D5BDCB223 //A6 +data8 0x42C9A8D00C776CC6 //A7 +data8 0x433557FD8C481424 //A8 +data8 0x43A209221A953EF0 //A9 +data8 0x440EDC98D5618AB7 //A10 +data8 0x447AABD25E367378 //A11 +data8 0x44E73DE20CC3B288 //A12 +data8 0x455465257B4E0BD8 //A13 +data8 0x45C2011532085353 //A14 +data8 0x462FEE4CC191945B //A15 +data8 0x469C63AEEFEF0A7F //A16 +data8 0x4709D045390A3810 //A17 +data8 0x4778D360873C9F64 //A18 +data8 0x47E26965BE9A682A //A19 +// Polynomial coefficients for right root on [-7, -6] +// Lgammal is aproximated by polynomial within [-.154582 ; .154521 ] range +data8 0x3C75F103A1B00A48, 0x391C041C190C726D //A0 +data8 0x40869DE49E3AF2AA, 0x3D1C17E1F813063B //A1 +data8 0x410FCE23484CFD10, 0x3DB6F38C2F11DAB9 //A2 +data8 0xEF281D1E1BE2055A, 0x00004019 //A3 +data8 0xFCE3DA92AC55DFF8, 0x00004022 //A4 +data8 0x8E9EA838A20BD58E, 0x0000402C //A5 +data8 0x4354F21E2FB9E0C9 //A6 +data8 0x43E9500994CD4F09 //A7 +data8 0x447F3A2C23C033DF //A8 +data8 0x45139152656606D8 //A9 +data8 0x45A8D45F8D3BF2E8 //A10 +data8 0x463FD32110E5BFE5 //A11 +data8 0x46D490B3BDBAE0BE //A12 +data8 0x476AC3CAD905DD23 //A13 +data8 0x48018558217AD473 //A14 +data8 0x48970AF371D30585 //A15 +data8 0x492E6273A8BEFFE3 //A16 +data8 0x49C47CC9AE3F1073 //A17 +data8 0x4A5D38E8C35EFF45 //A18 +data8 0x4AF0123E89694CD8 //A19 +// Polynomial coefficients for right root on [-8, -7] +// Lgammal is aproximated by polynomial within [-.154217 ; .154208 ] range +data8 0xBCD2507D818DDD68, 0xB97F6940EA2871A0 //A0 +data8 0x40B3B407AA387BCB, 0x3D6320238F2C43D1 //A1 +data8 0x41683E85DAAFBAC7, 0x3E148D085958EA3A //A2 +data8 0x9F2A95AF1E10A548, 0x00004022 //A3 +data8 0x92F21522F482300E, 0x0000402E //A4 +data8 0x90B51AB03A1F244D, 0x0000403A //A5 +data8 0x44628E1C70EF534F //A6 +data8 0x452393E2BC32D244 //A7 +data8 0x45E5164141F4BA0B //A8 +data8 0x46A712B3A8AF5808 //A9 +data8 0x47698FD36CEDD0F2 //A10 +data8 0x482C9AE6BBAA3637 //A11 +data8 0x48F023821857C8E9 //A12 +data8 0x49B2569053FC106F //A13 +data8 0x4A74F646D5C1604B //A14 +data8 0x4B3811CF5ABA4934 //A15 +data8 0x4BFBB5DD6C84E233 //A16 +data8 0x4CC05021086F637B //A17 +data8 0x4D8450A345B0FB49 //A18 +data8 0x4E43825848865DB2 //A19 +// Polynomial coefficients for right root on [-9, -8] +// Lgammal is aproximated by polynomial within [-.154160 ; .154158 ] range +data8 0x3CDF4358564F2B46, 0x397969BEE6042F81 //A0 +data8 0x40E3B088FED67721, 0x3D82787BA937EE85 //A1 +data8 0x41C83A3893550EF4, 0x3E542ED57E244DA8 //A2 +data8 0x9F003C6DC56E0B8E, 0x0000402B //A3 +data8 0x92BDF64A3213A699, 0x0000403A //A4 +data8 0x9074F503AAD417AF, 0x00004049 //A5 +data8 0x4582843E1313C8CD //A6 +data8 0x467387BD6A7826C1 //A7 +data8 0x4765074E788CF440 //A8 +data8 0x4857004DD9D1E09D //A9 +data8 0x4949792ED7530EAF //A10 +data8 0x4A3C7F089A292ED3 //A11 +data8 0x4B30125BF0AABB86 //A12 +data8 0x4C224175195E307E //A13 +data8 0x4D14DC4C8B32C08D //A14 +data8 0x4E07F1DB2786197E //A15 +data8 0x4EFB8EA1C336DACB //A16 +data8 0x4FF03797EACD0F23 //A17 +data8 0x50E4304A8E68A730 //A18 +data8 0x51D3618FB2EC9F93 //A19 +// Polynomial coefficients for right root on [-10, -9] +// Lgammal is aproximated by polynomial within [-.154152 ; .154152 ] range +data8 0x3D42F34DA97ECF0C, 0x39FD1256F345B0D0 //A0 +data8 0x4116261203919787, 0x3DC12D44055588EB //A1 +data8 0x422EA8F32FB7FE99, 0x3ED849CE4E7B2D77 //A2 +data8 0xE25BAF73477A57B5, 0x00004034 //A3 +data8 0xEB021FD10060504A, 0x00004046 //A4 +data8 0x8220A208EE206C5F, 0x00004059 //A5 +data8 0x46B2C3903EC9DA14 //A6 +data8 0x47D64393744B9C67 //A7 +data8 0x48FAF79CCDC604DD //A8 +data8 0x4A20975DB8061EBA //A9 +data8 0x4B44AB9CBB38DB21 //A10 +data8 0x4C6A032F60094FE9 //A11 +data8 0x4D908103927634B4 //A12 +data8 0x4EB516CA21D30861 //A13 +data8 0x4FDB1BF12C58D318 //A14 +data8 0x510180AAE094A553 //A15 +data8 0x5226A8F2A2D45D57 //A16 +data8 0x534E00B6B0C8B809 //A17 +data8 0x5475022FE21215B2 //A18 +data8 0x5596B02BF6C5E19B //A19 +// Polynomial coefficients for right root on [-11, -10] +// Lgammal is aproximated by polynomial within [-.154151 ; .154151 ] range +data8 0x3D7AA9C2E2B1029C, 0x3A15FB37578544DB //A0 +data8 0x414BAF825A0C91D4, 0x3DFB9DA2CE398747 //A1 +data8 0x4297F3EC8AE0AF03, 0x3F34208B55FB8781 //A2 +data8 0xDD0C97D3197F56DE, 0x0000403E //A3 +data8 0x8F6F3AF7A5499674, 0x00004054 //A4 +data8 0xC68DA1AF6D878EEB, 0x00004069 //A5 +data8 0x47F1E4E1E2197CE0 //A6 +data8 0x494A8A28E597C3EB //A7 +data8 0x4AA4175D0D35D705 //A8 +data8 0x4BFEE6F0AF69E814 //A9 +data8 0x4D580FE7B3DBB3C6 //A10 +data8 0x4EB2ECE60E4608AF //A11 +data8 0x500E04BE3E2B4F24 //A12 +data8 0x5167F9450F0FB8FD //A13 +data8 0x52C342BDE747603F //A14 +data8 0x541F1699D557268C //A15 +data8 0x557927C5F079864E //A16 +data8 0x56D4D10FEEDB030C //A17 +data8 0x5832385DF86AD28A //A18 +data8 0x598898914B4D6523 //A19 +// Polynomial coefficients for right root on [-12, -11] +// Lgammal is aproximated by polynomial within [-.154151 ; .154151 ] range +data8 0xBD96F61647C58B03, 0xBA3ABB0C2A6C755B //A0 +data8 0x418308A82714B70D, 0x3E1088FC6A104C39 //A1 +data8 0x4306A493DD613C39, 0x3FB2341ECBF85741 //A2 +data8 0x8FA8FE98339474AB, 0x00004049 //A3 +data8 0x802CCDF570BA7942, 0x00004062 //A4 +data8 0xF3F748AF11A32890, 0x0000407A //A5 +data8 0x493E3B567EF178CF //A6 +data8 0x4ACED38F651BA362 //A7 +data8 0x4C600B357337F946 //A8 +data8 0x4DF0F71A52B54CCF //A9 +data8 0x4F8229F3B9FA2C70 //A10 +data8 0x5113A4C4979B770E //A11 +data8 0x52A56BC367F298D5 //A12 +data8 0x543785CF31842DC0 //A13 +data8 0x55C9FC37E3E40896 //A14 +data8 0x575CD5D1BA556C82 //A15 +data8 0x58F00A7AD99A9E08 //A16 +data8 0x5A824088688B008D //A17 +data8 0x5C15F75EF7E08EBD //A18 +data8 0x5DA462EA902F0C90 //A19 +// Polynomial coefficients for right root on [-13, -12] +// Lgammal is aproximated by polynomial within [-.154151 ; .154151 ] range +data8 0x3DC3191752ACFC9D, 0x3A26CB6629532DBF //A0 +data8 0x41BC8CFC051191BD, 0x3E68A84DA4E62AF2 //A1 +data8 0x43797926294A0148, 0x400F345FF3723CFF //A2 +data8 0xF26D2AF700B82625, 0x00004053 //A3 +data8 0xA238B24A4B1F7B15, 0x00004070 //A4 +data8 0xE793B5C0A41A264F, 0x0000408C //A5 +data8 0x4A9585BDDACE863D //A6 +data8 0x4C6075953448088A //A7 +data8 0x4E29B2F38D1FC670 //A8 +data8 0x4FF4619B079C440F //A9 +data8 0x51C05DAE118D8AD9 //A10 +data8 0x538A8C7F87326AD4 //A11 +data8 0x5555B6937588DAB3 //A12 +data8 0x5721E1F8B6E6A7DB //A13 +data8 0x58EDA1D7A77DD6E5 //A14 +data8 0x5AB8A9616B7DC9ED //A15 +data8 0x5C84942AA209ED17 //A16 +data8 0x5E518FC34C6F54EF //A17 +data8 0x601FB3F17BCCD9A0 //A18 +data8 0x61E61128D512FE97 //A1 +// Polynomial coefficients for right root on [-14, -13] +// Lgammal is aproximated by polynomial within [-.154151 ; .154151 ] range +data8 0xBE170D646421B3F5, 0xBAAD95F79FCB5097 //A0 +data8 0x41F7328CBFCD9AC7, 0x3E743B8B1E8AEDB1 //A1 +data8 0x43F0D0FA2DBDA237, 0x40A0422D6A227B55 //A2 +data8 0x82082DF2D32686CC, 0x0000405F //A3 +data8 0x8D64EE9B42E68B43, 0x0000407F //A4 +data8 0xA3FFD82E08C5F1F1, 0x0000409F //A5 +data8 0x4BF8C49D99123454 //A6 +data8 0x4DFEC79DDF11342F //A7 +data8 0x50038615A892F6BD //A8 +data8 0x520929453DB32EF1 //A9 +data8 0x54106A7808189A7F //A10 +data8 0x5615A302D03C207B //A11 +data8 0x581CC175AA736F5E //A12 +data8 0x5A233E071147C017 //A13 +data8 0x5C29E81917243F22 //A14 +data8 0x5E3184B0B5AC4707 //A15 +data8 0x6037C11DE62D8388 //A16 +data8 0x6240787C4B1C9D6C //A17 +data8 0x6448289235E80977 //A18 +data8 0x664B5352C6C3449E //A19 +// Polynomial coefficients for right root on [-15, -14] +// Lgammal is aproximated by polynomial within [-.154151 ; .154151 ] range +data8 0x3E562C2E34A9207D, 0x3ADC00DA3DFF7A83 //A0 +data8 0x42344C3B2F0D90AB, 0x3EB8A2E979F24536 //A1 +data8 0x4469BFFF28B50D07, 0x41181E3D05C1C294 //A2 +data8 0xAE38F64DCB24D9F8, 0x0000406A //A3 +data8 0xA5C3F52C1B350702, 0x0000408E //A4 +data8 0xA83BC857BCD67A1B, 0x000040B2 //A5 +data8 0x4D663B4727B4D80A //A6 +data8 0x4FA82C965B0F7788 //A7 +data8 0x51EAD58C02908D95 //A8 +data8 0x542E427970E073D8 //A9 +data8 0x56714644C558A818 //A10 +data8 0x58B3EC2040C77BAE //A11 +data8 0x5AF72AE6A83D45B1 //A12 +data8 0x5D3B214F611F5D12 //A13 +data8 0x5F7FF5E49C54E92A //A14 +data8 0x61C2E917AB765FB2 //A15 +data8 0x64066FD70907B4C1 //A16 +data8 0x664B3998D60D0F9B //A17 +data8 0x689178710782FA8B //A18 +data8 0x6AD14A66C1C7BEC3 //A19 +// Polynomial coefficients for right root on [-16, -15] +// Lgammal is aproximated by polynomial within [-.154151 ; .154151 ] range +data8 0xBE6D7E7192615BAE, 0xBB0137677D7CC719 //A0 +data8 0x4273077763F6628C, 0x3F09250FB8FC8EC9 //A1 +data8 0x44E6A1BF095B1AB3, 0x4178D5A74F6CB3B3 //A2 +data8 0x8F8E0D5060FCC76E, 0x00004076 //A3 +data8 0x800CC1DCFF092A63, 0x0000409E //A4 +data8 0xF3AB0BA9D14CDA72, 0x000040C5 //A5 +data8 0x4EDE3000A2F6D54F //A6 +data8 0x515EC613B9C8E241 //A7 +data8 0x53E003309FEEEA96 //A8 +data8 0x5660ED908D7C9A90 //A9 +data8 0x58E21E9B517B1A50 //A10 +data8 0x5B639745E4374EE2 //A11 +data8 0x5DE55BB626B2075D //A12 +data8 0x606772B7506BA747 //A13 +data8 0x62E9E581AB2E057B //A14 +data8 0x656CBAD1CF85D396 //A15 +data8 0x67EFF4EBD7989872 //A16 +data8 0x6A722D2B19B7E2F9 //A17 +data8 0x6CF5DEB3073B0743 //A18 +data8 0x6F744AC11550B93A //A19 +// Polynomial coefficients for right root on [-17, -16] +// Lgammal is aproximated by polynomial within [-.154151 ; .154151 ] range +data8 0xBEDCC6291188207E, 0xBB872E3FDD48F5B7 //A0 +data8 0x42B3076EE7525EF9, 0x3F6687A5038CA81C //A1 +data8 0x4566A1AAD96EBCB5, 0x421F0FEDFBF548D2 //A2 +data8 0x8F8D4D3DE9850DBA, 0x00004082 //A3 +data8 0x800BDD6DA2CE1859, 0x000040AE //A4 +data8 0xF3A8EC4C9CDC1CE5, 0x000040D9 //A5 +data8 0x505E2FAFDB812628 //A6 +data8 0x531EC5B3A7508719 //A7 +data8 0x55E002F77E99B628 //A8 +data8 0x58A0ED4C9B4DAE54 //A9 +data8 0x5B621E4A8240F90C //A10 +data8 0x5E2396E5C8849814 //A11 +data8 0x60E55B43D8C5CE71 //A12 +data8 0x63A7722F5D45D01D //A13 +data8 0x6669E4E010DCE45A //A14 +data8 0x692CBA120D5E78F6 //A15 +data8 0x6BEFF4045350B22E //A16 +data8 0x6EB22C9807C21819 //A17 +data8 0x7175DE20D04617C4 //A18 +data8 0x74344AB87C6D655F //A19 +// Polynomial coefficients for right root on [-18, -17] +// Lgammal is aproximated by polynomial within [-.154151 ; .154151 ] range +data8 0xBF28AEEE7B61D77C, 0xBBDBBB5FC57ABF79 //A0 +data8 0x42F436F56B3B8A0C, 0x3FA43EE3C5C576E9 //A1 +data8 0x45E98A22535D115D, 0x42984678BE78CC48 //A2 +data8 0xAC176F3775E6FCFC, 0x0000408E //A3 +data8 0xA3114F53A9FEB922, 0x000040BE //A4 +data8 0xA4D168A8334ABF41, 0x000040EE //A5 +data8 0x51E5B0E7EC7182BB //A6 +data8 0x54E77D67B876EAB6 //A7 +data8 0x57E9F7C30C09C4B6 //A8 +data8 0x5AED29B0488614CA //A9 +data8 0x5DF09486F87E79F9 //A10 +data8 0x60F30B199979654E //A11 +data8 0x63F60E02C7DCCC5F //A12 +data8 0x66F9B8A00EB01684 //A13 +data8 0x69FE2D3ED0700044 //A14 +data8 0x6D01C8363C7DCC84 //A15 +data8 0x700502B29C2F06E3 //A16 +data8 0x730962B4500F4A61 //A17 +data8 0x76103C6ED099192A //A18 +data8 0x79100C7132CFD6E3 //A19 +// Polynomial coefficients for right root on [-19, -18] +// Lgammal is aproximated by polynomial within [-.154151 ; .154151 ] range +data8 0x3F3C19A53328A0C3, 0x3BE04ADC3FBE1458 //A0 +data8 0x4336C16C16C16C19, 0x3FE58CE3AC4A7C28 //A1 +data8 0x46702E85C0898B70, 0x432C922E412CEC6E //A2 +data8 0xF57B99A1C034335D, 0x0000409A //A3 +data8 0x82EC9634223DF909, 0x000040CF //A4 +data8 0x94F66D7557E2EA60, 0x00004103 //A5 +data8 0x5376118B79AE34D0 //A6 +data8 0x56BAE7106D52E548 //A7 +data8 0x5A00BD48CC8E25AB //A8 +data8 0x5D4529722821B493 //A9 +data8 0x608B1654AF31BBC1 //A10 +data8 0x63D182CC98AEA859 //A11 +data8 0x6716D43D5EEB05E8 //A12 +data8 0x6A5DF884FC172E1C //A13 +data8 0x6DA3CA7EBB97976B //A14 +data8 0x70EA416D0BE6D2EF //A15 +data8 0x743176C31EBB65F2 //A16 +data8 0x7777C401A8715CF9 //A17 +data8 0x7AC1110C6D350440 //A18 +data8 0x7E02D0971CF84865 //A19 +// Polynomial coefficients for right root on [-20, -19] +// Lgammal is aproximated by polynomial within [-.154151 ; .154151 ] range +data8 0xBFAB767F9BE21803, 0xBC5ACEF5BB1BD8B5 //A0 +data8 0x4379999999999999, 0x4029241C7F5914C8 //A1 +data8 0x46F47AE147AE147A, 0x43AC2979B64B9D7E //A2 +data8 0xAEC33E1F67152993, 0x000040A7 //A3 +data8 0xD1B71758E219616F, 0x000040DF //A4 +data8 0x8637BD05AF6CF468, 0x00004118 //A5 +data8 0x55065E9F80F293DE //A6 +data8 0x588EADA78C44EE66 //A7 +data8 0x5C15798EE22DEF09 //A8 +data8 0x5F9E8ABFD644FA63 //A9 +data8 0x6325FD7FE29BD7CD //A10 +data8 0x66AFFC5C57E1F802 //A11 +data8 0x6A3774CD7D5C0181 //A12 +data8 0x6DC152724DE2A6FE //A13 +data8 0x7149BB138EB3D0C2 //A14 +data8 0x74D32FF8A70896C2 //A15 +data8 0x785D3749F9C72BD7 //A16 +data8 0x7BE5CCF65EBC4E40 //A17 +data8 0x7F641A891B5FC652 //A18 +data8 0x7FEFFFFFFFFFFFFF //A19 +LOCAL_OBJECT_END(lgammal_right_roots_polynomial_data) + +LOCAL_OBJECT_START(lgammal_left_roots_polynomial_data) +// Polynomial coefficients for left root on [-3, -2] +// Lgammal is aproximated by polynomial within [.084641 ; -.059553 ] range +data8 0xBC0844590979B82E, 0xB8BC7CE8CE2ECC3B //A0 +data8 0xBFFEA12DA904B18C, 0xBC91A6B2BAD5EF6E //A1 +data8 0x4023267F3C265A51, 0x3CD7055481D03AED //A2 +data8 0xA0C2D618645F8E00, 0x0000C003 //A3 +data8 0xFA8256664F8CD2BE, 0x00004004 //A4 +data8 0xC2C422C103F57158, 0x0000C006 //A5 +data8 0x4084373F7CC70AF5 //A6 +data8 0xC0A12239BDD6BB95 //A7 +data8 0x40BDBA65E2709397 //A8 +data8 0xC0DA2D2504DFB085 //A9 +data8 0x40F758173CA5BF3C //A10 +data8 0xC11506C65C267E72 //A11 +data8 0x413318EE3A6B05FC //A12 +data8 0xC1517767F247DA98 //A13 +data8 0x41701237B4754D73 //A14 +data8 0xC18DB8A03BC5C3D8 //A15 +data8 0x41AB80953AC14A07 //A16 +data8 0xC1C9B7B76638D0A4 //A17 +data8 0x41EA727E3033E2D9 //A18 +data8 0xC20812C297729142 //A19 +// +// Polynomial coefficients for left root on [-4, -3] +// Lgammal is aproximated by polynomial within [.147147 ; -.145158 ] range +data8 0xBC3130AE5C4F54DB, 0xB8ED23294C13398A //A0 +data8 0xC034B99D966C5646, 0xBCE2E5FE3BC3DBB9 //A1 +data8 0x406F76DEAE0436BD, 0x3D14974DDEC057BD //A2 +data8 0xE929ACEA5979BE96, 0x0000C00A //A3 +data8 0xF47C14F8A0D52771, 0x0000400E //A4 +data8 0x88B7BC036937481C, 0x0000C013 //A5 +data8 0x4173E8F3AB9FC266 //A6 +data8 0xC1B7DBBE062FB11B //A7 +data8 0x41FD2F76DE7A47A7 //A8 +data8 0xC242225FE53B124D //A9 +data8 0x4286D12AE2FBFA30 //A10 +data8 0xC2CCFFC267A3C4C0 //A11 +data8 0x431294E10008E014 //A12 +data8 0xC357FAC8C9A2DF6A //A13 +data8 0x439F2190AB9FAE01 //A14 +data8 0xC3E44C1D8E8C67C3 //A15 +data8 0x442A8901105D5A38 //A16 +data8 0xC471C4421E908C3A //A17 +data8 0x44B92CD4D59D6D17 //A18 +data8 0xC4FB3A078B5247FA //A19 +// Polynomial coefficients for left root on [-5, -4] +// Lgammal is aproximated by polynomial within [.155671 ; -.155300 ] range +data8 0xBC57BF3C6E8A94C1, 0xB902FB666934AC9E //A0 +data8 0xC05D224A3EF9E41F, 0xBCF6F5713913E440 //A1 +data8 0x40BB533C678A3955, 0x3D688E53E3C72538 //A2 +data8 0x869FBFF732E99B84, 0x0000C012 //A3 +data8 0xBA9537AD61392DEC, 0x00004018 //A4 +data8 0x89EAE8B1DEA06B05, 0x0000C01F //A5 +data8 0x425A8C5C53458D3C //A6 +data8 0xC2C5068B3ED6509B //A7 +data8 0x4330FFA575E99B4E //A8 +data8 0xC39BEC12DDDF7669 //A9 +data8 0x44073825725F74F9 //A10 +data8 0xC47380EBCA299047 //A11 +data8 0x44E084DD9B666437 //A12 +data8 0xC54C2DA6BF787ACF //A13 +data8 0x45B82D65C8D6FA42 //A14 +data8 0xC624D62113FE950A //A15 +data8 0x469200CC19B45016 //A16 +data8 0xC6FFDDC6DD938E2E //A17 +data8 0x476DD7C07184B9F9 //A18 +data8 0xC7D554A30085C052 //A19 +// Polynomial coefficients for left root on [-6, -5] +// Lgammal is aproximated by polynomial within [.157425 ; -.157360 ] range +data8 0x3C9E20A87C8B79F1, 0x39488BE34B2427DB //A0 +data8 0xC08661F6A43A5E12, 0xBD3D912526D759CC //A1 +data8 0x410F79DCB794F270, 0x3DB9BEE7CD3C1BF5 //A2 +data8 0xEB7404450D0005DB, 0x0000C019 //A3 +data8 0xF7AE9846DFE4D4AB, 0x00004022 //A4 +data8 0x8AF535855A95B6DA, 0x0000C02C //A5 +data8 0x43544D54E9FE240E //A6 +data8 0xC3E8684E40CE6CFC //A7 +data8 0x447DF44C1D803454 //A8 +data8 0xC512AC305439B2BA //A9 +data8 0x45A79226AF79211A //A10 +data8 0xC63E0DFF7244893A //A11 +data8 0x46D35216C3A83AF3 //A12 +data8 0xC76903BE0C390E28 //A13 +data8 0x48004A4DECFA4FD5 //A14 +data8 0xC8954FBD243DB8BE //A15 +data8 0x492BF3A31EB18DDA //A16 +data8 0xC9C2C6A864521F3A //A17 +data8 0x4A5AB127C62E8DA1 //A18 +data8 0xCAECF60EF3183C57 //A19 +// Polynomial coefficients for left root on [-7, -6] +// Lgammal is aproximated by polynomial within [.157749 ; -.157739 ] range +data8 0x3CC9B9E8B8D551D6, 0x3961813C8E1E10DB //A0 +data8 0xC0B3ABF7A5CEA91F, 0xBD55638D4BCB4CC4 //A1 +data8 0x4168349A25504236, 0x3E0287ECE50CCF76 //A2 +data8 0x9EC8ED6E4C219E67, 0x0000C022 //A3 +data8 0x9279EB1B799A3FF3, 0x0000402E //A4 +data8 0x90213EF8D9A5DBCF, 0x0000C03A //A5 +data8 0x4462775E857FB71C //A6 +data8 0xC52377E70B45FDBF //A7 +data8 0x45E4F3D28EDA8C28 //A8 +data8 0xC6A6E85571BD2D0B //A9 +data8 0x47695BB17E74DF74 //A10 +data8 0xC82C5AC0ED6A662F //A11 +data8 0x48EFF8159441C2E3 //A12 +data8 0xC9B22602C1B68AE5 //A13 +data8 0x4A74BA8CE7B34100 //A14 +data8 0xCB37C7E208482E4B //A15 +data8 0x4BFB5A1D57352265 //A16 +data8 0xCCC01CB3021212FF //A17 +data8 0x4D841613AC3431D1 //A18 +data8 0xCE431C9E9EE43AD9 //A19 +// Polynomial coefficients for left root on [-8, -7] +// Lgammal is aproximated by polynomial within [.157799 ; -.157798 ] range +data8 0xBCF9C7A33AD9478C, 0xB995B0470F11E5ED //A0 +data8 0xC0E3AF76FE4C2F8B, 0xBD8DBCD503250511 //A1 +data8 0x41C838E76CAAF0D5, 0x3E5D79F5E2E069C3 //A2 +data8 0x9EF345992B262CE0, 0x0000C02B //A3 +data8 0x92AE0292985FD559, 0x0000403A //A4 +data8 0x90615420C08F7D8C, 0x0000C049 //A5 +data8 0x45828139342CEEB7 //A6 +data8 0xC67384066C31E2D3 //A7 +data8 0x476502BC4DAC2C35 //A8 +data8 0xC856FAADFF22ADC6 //A9 +data8 0x49497243255AB3CE //A10 +data8 0xCA3C768489520F6B //A11 +data8 0x4B300D1EA47AF838 //A12 +data8 0xCC223B0508AC620E //A13 +data8 0x4D14D46583338CD8 //A14 +data8 0xCE07E7A87AA068E4 //A15 +data8 0x4EFB811AD2F8BEAB //A16 +data8 0xCFF0351B51508523 //A17 +data8 0x50E4364CCBF53100 //A18 +data8 0xD1D33CFD0BF96FA6 //A19 +// Polynomial coefficients for left root on [-9, -8] +// Lgammal is aproximated by polynomial within [.157806 ; -.157806 ] range +data8 0x3D333E4438B1B9D4, 0x39E7B956B83964C1 //A0 +data8 0xC11625EDFC63DCD8, 0xBDCF39625709EFAC //A1 +data8 0x422EA8C150480F16, 0x3EC16ED908AB7EDD //A2 +data8 0xE2598725E2E11646, 0x0000C034 //A3 +data8 0xEAFF2346DE3EBC98, 0x00004046 //A4 +data8 0x821E90DE12A0F05F, 0x0000C059 //A5 +data8 0x46B2C334AE5366FE //A6 +data8 0xC7D64314B43191B6 //A7 +data8 0x48FAF6ED5899E01B //A8 +data8 0xCA2096E4472AF37D //A9 +data8 0x4B44AAF49FB7E4C8 //A10 +data8 0xCC6A02469F2BD920 //A11 +data8 0x4D9080626D2EFC07 //A12 +data8 0xCEB515EDCF0695F7 //A13 +data8 0x4FDB1AC69BF36960 //A14 +data8 0xD1017F8274339270 //A15 +data8 0x5226A684961BAE2F //A16 +data8 0xD34E085C088404A5 //A17 +data8 0x547511892FF8960E //A18 +data8 0xD5968FA3B1ED67A9 //A19 +// Polynomial coefficients for left root on [-10, -9] +// Lgammal is aproximated by polynomial within [.157807 ; -.157807 ] range +data8 0xBD355818A2B42BA2, 0xB9B7320B6A0D61EA //A0 +data8 0xC14BAF7DA5F3770E, 0xBDE64AF9A868F719 //A1 +data8 0x4297F3E8791F9CD3, 0x3F2A553E59B4835E //A2 +data8 0xDD0C5F7E551BD13C, 0x0000C03E //A3 +data8 0x8F6F0A3B2EB08BBB, 0x00004054 //A4 +data8 0xC68D4D5AD230BA08, 0x0000C069 //A5 +data8 0x47F1E4D8C35D1A3E //A6 +data8 0xC94A8A191DB0A466 //A7 +data8 0x4AA4174F65FE6AE8 //A8 +data8 0xCBFEE6D90F94E9DD //A9 +data8 0x4D580FD3438BE16C //A10 +data8 0xCEB2ECD456D50224 //A11 +data8 0x500E049F7FE64546 //A12 +data8 0xD167F92D9600F378 //A13 +data8 0x52C342AE2B43261A //A14 +data8 0xD41F15DEEDA4B67E //A15 +data8 0x55792638748AFB7D //A16 +data8 0xD6D4D760074F6E6B //A17 +data8 0x5832469D58ED3FA9 //A18 +data8 0xD988769F3DC76642 //A19 +// Polynomial coefficients for left root on [-11, -10] +// Lgammal is aproximated by polynomial within [.157807 ; -.157807 ] range +data8 0xBDA050601F39778A, 0xBA0D4D1CE53E8241 //A0 +data8 0xC18308A7D8EA4039, 0xBE370C379D3EAD41 //A1 +data8 0x4306A49380644E6C, 0x3FBBB143C0E7B5C8 //A2 +data8 0x8FA8FB233E4AA6D2, 0x0000C049 //A3 +data8 0x802CC9D8AEAC207D, 0x00004062 //A4 +data8 0xF3F73EE651A37A13, 0x0000C07A //A5 +data8 0x493E3B550A7B9568 //A6 +data8 0xCACED38DAA060929 //A7 +data8 0x4C600B346BAB3BC6 //A8 +data8 0xCDF0F719193E3D26 //A9 +data8 0x4F8229F24528B151 //A10 +data8 0xD113A4C2D32FBBE2 //A11 +data8 0x52A56BC13DC4474D //A12 +data8 0xD43785CFAF5E3CE3 //A13 +data8 0x55C9FC3EA5941202 //A14 +data8 0xD75CD545A3341AF5 //A15 +data8 0x58F009911F77C282 //A16 +data8 0xDA8246294D210BEC //A17 +data8 0x5C1608AAC32C3A8E //A18 +data8 0xDDA446E570A397D5 //A19 +// Polynomial coefficients for left root on [-12, -11] +// Lgammal is aproximated by polynomial within [.157807 ; -.157807 ] range +data8 0x3DEACBB3081C502E, 0x3A8AA6F01DEDF745 //A0 +data8 0xC1BC8CFBFB0A9912, 0xBE6556B6504A2AE6 //A1 +data8 0x43797926206941D7, 0x40289A9644C2A216 //A2 +data8 0xF26D2A78446D0839, 0x0000C053 //A3 +data8 0xA238B1D937FFED38, 0x00004070 //A4 +data8 0xE793B4F6DE470538, 0x0000C08C //A5 +data8 0x4A9585BDC44DC45D //A6 +data8 0xCC60759520342C47 //A7 +data8 0x4E29B2F3694C0404 //A8 +data8 0xCFF4619AE7B6BBAB //A9 +data8 0x51C05DADF52B89E8 //A10 +data8 0xD38A8C7F48819A4A //A11 +data8 0x5555B6932D687860 //A12 +data8 0xD721E1FACB6C1B5B //A13 +data8 0x58EDA1E2677C8F91 //A14 +data8 0xDAB8A8EC523C1F71 //A15 +data8 0x5C84930133F30411 //A16 +data8 0xDE51952FDFD1EC49 //A17 +data8 0x601FCCEC1BBD25F1 //A18 +data8 0xE1E5F2D76B610920 //A19 +// Polynomial coefficients for left root on [-13, -12] +// Lgammal is aproximated by polynomial within [.157807 ; -.157807 ] range +data8 0xBE01612F373268ED, 0xBA97B7A18CDF103B //A0 +data8 0xC1F7328CBF7A4FAC, 0xBE89A25A6952F481 //A1 +data8 0x43F0D0FA2DBDA237, 0x40A0422EC1CE6084 //A2 +data8 0x82082DF2D32686C5, 0x0000C05F //A3 +data8 0x8D64EE9B42E68B36, 0x0000407F //A4 +data8 0xA3FFD82E08C630C9, 0x0000C09F //A5 +data8 0x4BF8C49D99123466 //A6 +data8 0xCDFEC79DDF1119ED //A7 +data8 0x50038615A892D242 //A8 +data8 0xD20929453DC8B537 //A9 +data8 0x54106A78083BA1EE //A10 +data8 0xD615A302C69E27B2 //A11 +data8 0x581CC175870FF16F //A12 +data8 0xDA233E0979E12B74 //A13 +data8 0x5C29E822BC568C80 //A14 +data8 0xDE31845DB5340FBC //A15 +data8 0x6037BFC6D498D5F9 //A16 +data8 0xE2407D92CD613E82 //A17 +data8 0x64483B9B62367EB7 //A18 +data8 0xE64B2DC830E8A799 //A1 +// Polynomial coefficients for left root on [-14, -13] +// Lgammal is aproximated by polynomial within [.157807 ; -.157807 ] range +data8 0x3E563D0B930B371F, 0x3AE779957E14F012 //A0 +data8 0xC2344C3B2F083767, 0xBEC0B7769AA3DD66 //A1 +data8 0x4469BFFF28B50D07, 0x41181E3F13ED2401 //A2 +data8 0xAE38F64DCB24D9EE, 0x0000C06A //A3 +data8 0xA5C3F52C1B3506F2, 0x0000408E //A4 +data8 0xA83BC857BCD6BA92, 0x0000C0B2 //A5 +data8 0x4D663B4727B4D81A //A6 +data8 0xCFA82C965B0F62E9 //A7 +data8 0x51EAD58C02905B71 //A8 +data8 0xD42E427970FA56AD //A9 +data8 0x56714644C57D8476 //A10 +data8 0xD8B3EC2037EC95F2 //A11 +data8 0x5AF72AE68BBA5B3D //A12 +data8 0xDD3B2152C67AA6B7 //A13 +data8 0x5F7FF5F082861B8B //A14 +data8 0xE1C2E8BE125A5B7A //A15 +data8 0x64066E92FE9EBE7D //A16 +data8 0xE64B4201CDF9F138 //A17 +data8 0x689186351E58AA88 //A18 +data8 0xEAD132A585DFC60A //A19 +// Polynomial coefficients for left root on [-15, -14] +// Lgammal is aproximated by polynomial within [.157807 ; -.157807 ] range +data8 0xBE6D7DDE12700AC1, 0xBB1E025BF1667FB5 //A0 +data8 0xC273077763F60AD5, 0xBF2A1698184C7A9A //A1 +data8 0x44E6A1BF095B1AB3, 0x4178D5AE8A4A2874 //A2 +data8 0x8F8E0D5060FCC767, 0x0000C076 //A3 +data8 0x800CC1DCFF092A57, 0x0000409E //A4 +data8 0xF3AB0BA9D14D37D1, 0x0000C0C5 //A5 +data8 0x4EDE3000A2F6D565 //A6 +data8 0xD15EC613B9C8C800 //A7 +data8 0x53E003309FEECCAA //A8 +data8 0xD660ED908D8B15C4 //A9 +data8 0x58E21E9B51A1C4AE //A10 +data8 0xDB639745DB82210D //A11 +data8 0x5DE55BB60C68FCF6 //A12 +data8 0xE06772BA3FCA23C6 //A13 +data8 0x62E9E58B4F702C31 //A14 +data8 0xE56CBA49B071ABE2 //A15 +data8 0x67EFF31E4F2BA36A //A16 +data8 0xEA7232C8804F32C3 //A17 +data8 0x6CF5EFEE929A0928 //A18 +data8 0xEF742EE03EC3E8FF //A19 +// Polynomial coefficients for left root on [-16, -15] +// Lgammal is aproximated by polynomial within [.157807 ; -.157807 ] range +data8 0xBEDCC628FEAC7A1B, 0xBB80582C8BEBB198 //A0 +data8 0xC2B3076EE752595E, 0xBF5388F55AFAE53E //A1 +data8 0x4566A1AAD96EBCB5, 0x421F0FEFE2444293 //A2 +data8 0x8F8D4D3DE9850DB2, 0x0000C082 //A3 +data8 0x800BDD6DA2CE184C, 0x000040AE //A4 +data8 0xF3A8EC4C9CDC7A43, 0x0000C0D9 //A5 +data8 0x505E2FAFDB81263F //A6 +data8 0xD31EC5B3A7506CD9 //A7 +data8 0x55E002F77E999810 //A8 +data8 0xD8A0ED4C9B5C2900 //A9 +data8 0x5B621E4A8267C401 //A10 +data8 0xDE2396E5BFCFDA7A //A11 +data8 0x60E55B43BE6F9A79 //A12 +data8 0xE3A772324C7405FA //A13 +data8 0x6669E4E9B7E57A2D //A14 +data8 0xE92CB989F8A8FB37 //A15 +data8 0x6BEFF2368849A36E //A16 +data8 0xEEB23234FE191D55 //A17 +data8 0x7175EF5D1080B105 //A18 +data8 0xF4342ED7B1B7BE31 //A19 +// Polynomial coefficients for left root on [-17, -16] +// Lgammal is aproximated by polynomial within [.157807 ; -.157807 ] range +data8 0xBF28AEEE7B58C790, 0xBBC4448DE371FA0A //A0 +data8 0xC2F436F56B3B89B1, 0xBF636755245AC63A //A1 +data8 0x45E98A22535D115D, 0x4298467DA93DB784 //A2 +data8 0xAC176F3775E6FCF2, 0x0000C08E //A3 +data8 0xA3114F53A9FEB908, 0x000040BE //A4 +data8 0xA4D168A8334AFE5A, 0x0000C0EE //A5 +data8 0x51E5B0E7EC7182CF //A6 +data8 0xD4E77D67B876D6B4 //A7 +data8 0x57E9F7C30C098C83 //A8 +data8 0xDAED29B0489EF7A7 //A9 +data8 0x5DF09486F8A524B8 //A10 +data8 0xE0F30B19910A2393 //A11 +data8 0x63F60E02AB3109F4 //A12 +data8 0xE6F9B8A3431854D5 //A13 +data8 0x69FE2D4A6D94218E //A14 +data8 0xED01C7E272A73560 //A15 +data8 0x7005017D82B186B6 //A16 +data8 0xF3096A81A69BD8AE //A17 +data8 0x76104951BAD67D5C //A18 +data8 0xF90FECC99786FD5B //A19 +// Polynomial coefficients for left root on [-18, -17] +// Lgammal is aproximated by polynomial within [.157807 ; -.157807 ] range +data8 0x3F3C19A53328E26A, 0x3BE238D7BA036B3B //A0 +data8 0xC336C16C16C16C13, 0xBFEACE245DEC56F3 //A1 +data8 0x46702E85C0898B70, 0x432C922B64FD1DA4 //A2 +data8 0xF57B99A1C0343350, 0x0000C09A //A3 +data8 0x82EC9634223DF90D, 0x000040CF //A4 +data8 0x94F66D7557E3237D, 0x0000C103 //A5 +data8 0x5376118B79AE34D6 //A6 +data8 0xD6BAE7106D52CE49 //A7 +data8 0x5A00BD48CC8E11AB //A8 +data8 0xDD4529722833E2DF //A9 +data8 0x608B1654AF5F46AF //A10 +data8 0xE3D182CC90D8723F //A11 +data8 0x6716D43D46706AA0 //A12 +data8 0xEA5DF888C5B428D3 //A13 +data8 0x6DA3CA85888931A6 //A14 +data8 0xF0EA40EF2AC7E070 //A15 +data8 0x743175D1A251AFCD //A16 +data8 0xF777CB6E2B550D73 //A17 +data8 0x7AC11E468A134A51 //A18 +data8 0xFE02B6BDD0FC40AA //A19 +// Polynomial coefficients for left root on [-19, -18] +// Lgammal is aproximated by polynomial within [.157807 ; -.157807 ] range +data8 0xBFAB767F9BE217FC, 0xBC4A5541CE0D8D0D //A0 +data8 0xC379999999999999, 0xC01A84981B490BE8 //A1 +data8 0x46F47AE147AE147A, 0x43AC2987BBC466EB //A2 +data8 0xAEC33E1F67152987, 0x0000C0A7 //A3 +data8 0xD1B71758E2196153, 0x000040DF //A4 +data8 0x8637BD05AF6D420E, 0x0000C118 //A5 +data8 0x55065E9F80F293B2 //A6 +data8 0xD88EADA78C44BFA7 //A7 +data8 0x5C15798EE22EC6CD //A8 +data8 0xDF9E8ABFD67895CF //A9 +data8 0x6325FD7FE13B0DE0 //A10 +data8 0xE6AFFC5C3DE70858 //A11 +data8 0x6A3774CE81C70D43 //A12 +data8 0xEDC1527412D8129F //A13 +data8 0x7149BABCDA8B7A72 //A14 +data8 0xF4D330AD49071BB5 //A15 +data8 0x785D4046F4C5F1FD //A16 +data8 0xFBE59BFEDBA73FAF //A17 +data8 0x7F64BEF2B2EC8DA1 //A18 +data8 0xFFEFFFFFFFFFFFFF //A19 +LOCAL_OBJECT_END(lgammal_left_roots_polynomial_data) + + +//============================================================== +// Code +//============================================================== + +.section .text +GLOBAL_LIBM_ENTRY(__libm_lgammal) +{ .mfi + getf.exp rSignExpX = f8 + // Test x for NaTVal, NaN, +/-0, +/-INF, denormals + fclass.m p6,p0 = f8,0x1EF + addl r17Ones = 0x1FFFF, r0 // exponent mask +} +{ .mfi + addl GR_ad_z_1 = @ltoff(Constants_Z_1#),gp + fcvt.fx.s1 fXint = f8 // Convert arg to int (int repres. in FR) + adds rDelta = 0x3FC, r0 +} +;; +{ .mfi + getf.sig rSignifX = f8 + fcmp.lt.s1 p15, p14 = f8, f0 + shl rDelta = rDelta, 20 // single precision 1.5 +} +{ .mfi + ld8 GR_ad_z_1 = [GR_ad_z_1]// get pointer to Constants_Z_1 + fma.s1 fTwo = f1, f1, f1 // 2.0 + addl rExp8 = 0x10002, r0 // exponent of 8.0 +} +;; +{ .mfi + alloc rPFS_SAVED = ar.pfs, 0, 34, 4, 0 // get some registers + fmerge.s fAbsX = f1, f8 // |x| + and rExpX = rSignExpX, r17Ones // mask sign bit +} +{ .mib + addl rExpHalf = 0xFFFE, r0 // exponent of 0.5 + addl rExp2 = 0x10000, r0 // exponent of 2.0 + // branch out if x is NaTVal, NaN, +/-0, +/-INF, or denormalized number +(p6) br.cond.spnt lgammal_spec +} +;; +_deno_back_to_main_path: +{ .mfi + // Point to Constants_G_H_h1 + add rTbl1Addr = 0x040, GR_ad_z_1 + frcpa.s1 fRcpX, p0 = f1, f8 // initial approximation of 1/x + extr.u GR_Index1 = rSignifX, 59, 4 +} +{ .mib +(p14) cmp.ge.unc p8, p0 = rExpX, rExp8 // p8 = 1 if x >= 8.0 + adds rZ625 = 0x3F2, r0 +(p8) br.cond.spnt lgammal_big_positive // branch out if x >= 8.0 +} +;; +{ .mfi + shladd rZ1offsett = GR_Index1, 2, GR_ad_z_1 // Point to Z_1 + fmerge.se fSignifX = f1, f8 // sifnificand of x + // Get high 15 bits of significand + extr.u GR_X_0 = rSignifX, 49, 15 +} +{ .mib + cmp.lt.unc p9, p0 = rExpX, rExpHalf // p9 = 1 if |x| < 0.5 + // set p11 if 2 <= x < 4 +(p14) cmp.eq.unc p11, p0 = rExpX, rExp2 +(p9) br.cond.spnt lgammal_0_half // branch out if |x| < 0.5 +} +;; +{ .mfi + ld4 GR_Z_1 = [rZ1offsett] // Load Z_1 + fms.s1 fA5L = f1, f1, f8 // for 0.75 <= x < 1.3125 path + shl rZ625 = rZ625, 20 // sinfle precision 0.625 +} +{ .mib + setf.s FR_MHalf = rDelta + // set p10 if x >= 4.0 +(p14) cmp.gt.unc p10, p0 = rExpX, rExp2 + // branch to special path for 4.0 <= x < 8 +(p10) br.cond.spnt lgammal_4_8 +} +;; +{ .mfi + // for 1.3125 <= x < 1.5625 path + addl rPolDataPtr= @ltoff(lgammal_loc_min_data),gp + // argument of polynomial approximation for 1.5625 <= x < 2.25 + fms.s1 fB4 = f8, f1, fTwo + cmp.eq p12, p0 = rExpX, rExpHalf +} +{ .mib + addl rExpOne = 0xFFFF, r0 // exponent of 1.0 + // set p10 if significand of x >= 1.125 +(p11) cmp.le p11, p0 = 2, GR_Index1 +(p11) br.cond.spnt lgammal_2Q_4 +} +;; +{ .mfi + // point to xMin for 1.3125 <= x < 1.5625 path + ld8 rPolDataPtr = [rPolDataPtr] + fcvt.xf fFltIntX = fXint // RTN(x) +(p14) cmp.eq.unc p13, p7 = rExpX, rExpOne // p13 set if 1.0 <= x < 2.0 +} +{ .mib + setf.s FR_FracX = rZ625 + // set p12 if |x| < 0.75 +(p12) cmp.gt.unc p12, p0 = 8, GR_Index1 + // branch out to special path for |x| < 0.75 +(p12) br.cond.spnt lgammal_half_3Q +} +;; +.pred.rel "mutex", p7, p13 +{ .mfi + getf.sig rXRnd = fXint // integer part of the input value + fnma.s1 fInvX = f8, fRcpX, f1 // start of 1st NR iteration + // Get bits 30-15 of X_0 * Z_1 + pmpyshr2.u GR_X_1 = GR_X_0,GR_Z_1,15 +} +{ .mib +(p7) cmp.eq p6, p0 = rExpX, rExp2 // p6 set if 2.0 <= x < 2.25 +(p13) cmp.le p6, p0 = 9, GR_Index1 + // branch to special path 1.5625 <= x < 2.25 +(p6) br.cond.spnt lgammal_13Q_2Q +} +;; +// +// For performance, don't use result of pmpyshr2.u for 4 cycles. +// +{ .mfi + shladd GR_ad_tbl_1 = GR_Index1, 4, rTbl1Addr // Point to G_1 + fma.s1 fSix = fTwo, fTwo, fTwo // 6.0 + add GR_ad_q = -0x60, GR_ad_z_1 // Point to Constants_Q +} +{ .mib + add rTmpPtr3 = -0x50, GR_ad_z_1 +(p13) cmp.gt p7, p0 = 5, GR_Index1 + // branch to special path 0.75 <= x < 1.3125 +(p7) br.cond.spnt lgammal_03Q_1Q +} +;; +{ .mfi + add rTmpPtr = 8, GR_ad_tbl_1 + fma.s1 fRoot = f8, f1, f1 // x + 1 + // Absolute value of int arg. Will be used as index in table with roots + sub rXRnd = r0, rXRnd +} +{ .mib + ldfe fA5L = [rPolDataPtr], 16 // xMin + addl rNegSingularity = 0x3003E, r0 +(p14) br.cond.spnt lgammal_loc_min +} +;; +{ .mfi + ldfps FR_G, FR_H = [GR_ad_tbl_1], 8 // Load G_1, H_1 + nop.f 0 + add rZ2Addr = 0x140, GR_ad_z_1 // Point to Constants_Z_2 +} +{ .mib + ldfd FR_h = [rTmpPtr] // Load h_1 + // If arg is less or equal to -2^63 + cmp.geu.unc p8,p0 = rSignExpX, rNegSingularity + // Singularity for x < -2^63 since all such arguments are integers + // branch to special code which deals with singularity +(p8) br.cond.spnt lgammal_singularity +} +;; +{ .mfi + ldfe FR_log2_hi = [GR_ad_q], 32 // Load log2_hi + nop.f 0 + extr.u GR_Index2 = GR_X_1, 6, 4 // Extract bits 6-9 of X_1 +} +{ .mfi + ldfe FR_log2_lo = [rTmpPtr3], 32 // Load log2_lo + fms.s1 fDx = f8, f1, fFltIntX // x - RTN(x) + // index in table with roots and bounds + adds rXint = -2, rXRnd +} +;; +{ .mfi + ldfe FR_Q4 = [GR_ad_q], 32 // Load Q4 + nop.f 0 + // set p12 if x may be close to negative root: -19.5 < x < -2.0 + cmp.gtu p12, p0 = 18, rXint +} +{ .mfi + shladd GR_ad_z_2 = GR_Index2, 2, rZ2Addr // Point to Z_2 + fma.s1 fRcpX = fInvX, fRcpX, fRcpX // end of 1st NR iteration + // Point to Constants_G_H_h2 + add rTbl2Addr = 0x180, GR_ad_z_1 +} +;; +{ .mfi + shladd GR_ad_tbl_2 = GR_Index2, 4, rTbl2Addr // Point to G_2 + // set p9 if x is integer and negative + fcmp.eq.s1 p9, p0 = f8,fFltIntX + // Point to Constants_G_H_h3 + add rTbl3Addr = 0x280, GR_ad_z_1 +} +{ .mfi + ld4 GR_Z_2 = [GR_ad_z_2] // Load Z_2 + nop.f 0 + sub GR_N = rExpX, rExpHalf, 1 +} +;; +{ .mfi + ldfe FR_Q3 = [rTmpPtr3], 32 // Load Q3 + nop.f 0 + // Point to lnsin polynomial coefficients + adds rLnSinDataPtr = 864, rTbl3Addr +} +{ .mfi + ldfe FR_Q2 = [GR_ad_q],32 // Load Q2 + nop.f 0 + add rTmpPtr = 8, GR_ad_tbl_2 +} +;; +{ .mfi + ldfe FR_Q1 = [rTmpPtr3] // Load Q1 + fcmp.lt.s1 p0, p15 = fAbsX, fSix // p15 is set when x < -6.0 + // point to table with roots and bounds + adds rRootsBndAddr = -1296, GR_ad_z_1 +} +{ .mfb + // Put integer N into rightmost significand + setf.sig fFloatN = GR_N + fma.s1 fThirteen = fSix, fTwo, f1 // 13.0 + // Singularity if -2^63 < x < 0 and x is integer + // branch to special code which deals with singularity +(p9) br.cond.spnt lgammal_singularity +} +;; +{ .mfi + ldfps FR_G2, FR_H2 = [GR_ad_tbl_2] // Load G_2, H_2 + // y = |x|/2^(exponent(x)) - 1.5 + fms.s1 FR_FracX = fSignifX, f1, FR_MHalf + // Get bits 30-15 of X_1 * Z_2 + pmpyshr2.u GR_X_2 = GR_X_1,GR_Z_2,15 +} +{ .mfi + ldfd FR_h2 = [rTmpPtr] // Load h_2 + fma.s1 fDxSqr = fDx, fDx, f0 // deltaX^2 + adds rTmpPtr3 = 128, rLnSinDataPtr +} +;; +// +// For performance, don't use result of pmpyshr2.u for 4 cycles. +// +{ .mfi + getf.exp rRoot = fRoot // sign and biased exponent of (x + 1) + nop.f 0 + // set p6 if -4 < x <= -2 + cmp.eq p6, p0 = rExpX, rExp2 +} +{ .mfi + ldfpd fLnSin2, fLnSin2L = [rLnSinDataPtr], 16 + fnma.s1 fInvX = f8, fRcpX, f1 // start of 2nd NR iteration + sub rIndexPol = rExpX, rExpHalf // index of polynom +} +;; +{ .mfi + ldfe fLnSin4 = [rLnSinDataPtr], 96 + // p10 is set if x is potential "right" root + // p11 set for possible "left" root + fcmp.lt.s1 p10, p11 = fDx, f0 + shl rIndexPol = rIndexPol, 6 // (i*16)*4 +} +{ .mfi + ldfpd fLnSin18, fLnSin20 = [rTmpPtr3], 16 + nop.f 0 + mov rExp2tom7 = 0x0fff8 // Exponent of 2^-7 +} +;; +{ .mfi + getf.sig rSignifDx = fDx // Get significand of RTN(x) + nop.f 0 + // set p6 if -4 < x <= -3.0 +(p6) cmp.le.unc p6, p0 = 0x8, GR_Index1 +} +{ .mfi + ldfpd fLnSin22, fLnSin24 = [rTmpPtr3], 16 + nop.f 0 + // mask sign bit in the exponent of (x + 1) + and rRoot = rRoot, r17Ones +} +;; +{ .mfi + ldfe fLnSin16 = [rLnSinDataPtr], -80 + nop.f 0 + extr.u GR_Index3 = GR_X_2, 1, 5 // Extract bits 1-5 of X_2 +} +{ .mfi + ldfpd fLnSin26, fLnSin28 = [rTmpPtr3], 16 + nop.f 0 + and rXRnd = 1, rXRnd +} +;; +{ .mfi + shladd GR_ad_tbl_3 = GR_Index3, 4, rTbl3Addr // Point to G_3 + fms.s1 fDxSqrL = fDx, fDx, fDxSqr // low part of deltaX^2 + // potential "left" root +(p11) adds rRootsBndAddr = 560, rRootsBndAddr +} +{ .mib + ldfpd fLnSin30, fLnSin32 = [rTmpPtr3], 16 + // set p7 if |x+1| < 2^-7 + cmp.lt p7, p0 = rRoot, rExp2tom7 + // branch to special path for |x+1| < 2^-7 +(p7) br.cond.spnt _closeToNegOne +} +;; +{ .mfi + ldfps FR_G3, FR_H3 = [GR_ad_tbl_3], 8 // Load G_3, H_3 + fcmp.lt.s1 p14, p0 = fAbsX, fThirteen // set p14 if x > -13.0 + // base address of polynomial on range [-6.0, -0.75] + adds rPolDataPtr = 3440, rTbl3Addr +} +{ .mfi + // (i*16)*4 + (i*16)*8 - offsett of polynomial on range [-6.0, -0.75] + shladd rTmpPtr = rIndexPol, 2, rIndexPol + fma.s1 fXSqr = FR_FracX, FR_FracX, f0 // y^2 + // point to left "near root" bound +(p12) shladd rRootsBndAddr = rXint, 4, rRootsBndAddr +} +;; +{ .mfi + ldfpd fLnSin34, fLnSin36 = [rTmpPtr3], 16 + fma.s1 fRcpX = fInvX, fRcpX, fRcpX // end of 2nd NR iteration + // add special offsett if -4 < x <= -3.0 +(p6) adds rPolDataPtr = 640, rPolDataPtr +} +{ .mfi + // point to right "near root" bound + adds rTmpPtr2 = 8, rRootsBndAddr + fnma.s1 fMOne = f1, f1, f0 // -1.0 + // Point to Bernulli numbers + adds rBernulliPtr = 544, rTbl3Addr +} +;; +{ .mfi + // left bound of "near root" range +(p12) ld8 rLeftBound = [rRootsBndAddr] + fmerge.se fNormDx = f1, fDx // significand of DeltaX + // base address + offsett for polynomial coeff. on range [-6.0, -0.75] + add rPolDataPtr = rPolDataPtr, rTmpPtr +} +{ .mfi + // right bound of "near root" range +(p12) ld8 rRightBound = [rTmpPtr2] + fcvt.xf fFloatN = fFloatN + // special "Bernulli" numbers for Stirling's formula for -13 < x < -6 +(p14) adds rBernulliPtr = 160, rBernulliPtr +} +;; +{ .mfi + ldfd FR_h3 = [GR_ad_tbl_3] // Load h_3 + fmpy.s1 FR_G = FR_G, FR_G2 // G = G_1 * G_2 + adds rTmpPtr3 = -160, rTmpPtr3 +} +{ .mfb + adds rTmpPtr = 80, rPolDataPtr + fadd.s1 FR_H = FR_H, FR_H2 // H = H_1 + H_2 + // p15 is set if -2^63 < x < 6.0 and x is not an integer + // branch to path with implementation using Stirling's formula for neg. x +(p15) br.cond.spnt _negStirling +} +;; +{ .mfi + ldfpd fA3, fA3L = [rPolDataPtr], 16 // A3 + fma.s1 fDelX4 = fDxSqr, fDxSqr, f0 // deltaX^4 + // Get high 4 bits of signif + extr.u rIndex1Dx = rSignifDx, 59, 4 +} +{ .mfi + ldfe fA5 = [rTmpPtr], -16 // A5 + fadd.s1 FR_h = FR_h, FR_h2 // h = h_1 + h_2 + adds rLnSinTmpPtr = 16, rLnSinDataPtr +} +;; +{ .mfi + ldfpd fA0, fA0L = [rPolDataPtr], 16 // A0 + fma.s1 fLnSin20 = fLnSin20, fDxSqr, fLnSin18 + // Get high 15 bits of significand + extr.u rX0Dx = rSignifDx, 49, 15 +} +{ .mfi + ldfe fA4 = [rTmpPtr], 192 // A4 + fms.s1 fXSqrL = FR_FracX, FR_FracX, fXSqr // low part of y^2 + shladd GR_ad_z_1 = rIndex1Dx, 2, GR_ad_z_1 // Point to Z_1 +} +;; +{ .mfi + ldfpd fA1, fA1L = [rPolDataPtr], 16 // A1 + fma.s1 fX4 = fXSqr, fXSqr, f0 // y^4 + adds rTmpPtr2 = 32, rTmpPtr +} +{ .mfi + ldfpd fA18, fA19 = [rTmpPtr], 16 // A18, A19 + fma.s1 fLnSin24 = fLnSin24, fDxSqr, fLnSin22 + nop.i 0 +} +;; +{ .mfi + ldfe fLnSin6 = [rLnSinDataPtr], 32 + fma.s1 fLnSin28 = fLnSin28, fDxSqr, fLnSin26 + nop.i 0 +} +{ .mfi + ldfe fLnSin8 = [rLnSinTmpPtr], 32 + nop.f 0 + nop.i 0 +} +;; +{ .mfi + ldfpd fA20, fA21 = [rTmpPtr], 16 // A20, A21 + fma.s1 fLnSin32 = fLnSin32, fDxSqr, fLnSin30 + nop.i 0 +} +{ .mfi + ldfpd fA22, fA23 = [rTmpPtr2], 16 // A22, A23 + fma.s1 fB20 = f1, f1, FR_MHalf // 2.5 +(p12) cmp.ltu.unc p6, p0 = rSignifX, rLeftBound +} +;; +{ .mfi + ldfpd fA2, fA2L = [rPolDataPtr], 16 // A2 + fmpy.s1 FR_G = FR_G, FR_G3 // G = (G_1 * G_2) * G_3 + // set p6 if x falls in "near root" range +(p6) cmp.geu.unc p6, p0 = rSignifX, rRightBound +} +{ .mfb + adds rTmpPtr3 = -64, rTmpPtr + fadd.s1 FR_H = FR_H, FR_H3 // H = (H_1 + H_2) + H_3 + // branch to special path if x falls in "near root" range +(p6) br.cond.spnt _negRoots +} +;; +{ .mfi + ldfpd fA24, fA25 = [rTmpPtr2], 16 // A24, A25 + fma.s1 fLnSin36 = fLnSin36, fDxSqr, fLnSin34 +(p11) cmp.eq.unc p7, p0 = 1,rXint // p7 set if -3.0 < x < -2.5 +} +{ .mfi + adds rTmpPtr = -48, rTmpPtr + fma.s1 fLnSin20 = fLnSin20, fDxSqr, fLnSin16 + addl rDelta = 0x5338, r0 // significand of -2.605859375 +} +;; +{ .mfi + getf.exp GR_N = fDx // Get N = exponent of DeltaX + fma.s1 fX6 = fX4, fXSqr, f0 // y^6 + // p7 set if -2.605859375 <= x < -2.5 +(p7) cmp.gt.unc p7, p0 = rDelta, GR_X_0 +} +{ .mfb + ld4 GR_Z_1 = [GR_ad_z_1] // Load Z_1 + fma.s1 fDelX8 = fDelX4, fDelX4, f0 // deltaX^8 + // branch to special path for -2.605859375 <= x < -2.5 +(p7) br.cond.spnt _neg2andHalf +} +;; +{ .mfi + ldfpd fA14, fA15 = [rTmpPtr3], 16 // A14, A15 + fadd.s1 FR_h = FR_h, FR_h3 // h = (h_1 + h_2) + h_3 + adds rTmpPtr2 = 128 , rPolDataPtr +} +{ .mfi + ldfpd fA16, fA17 = [rTmpPtr], 16 // A16, A17 + fma.s1 fLnSin28 = fLnSin28, fDelX4, fLnSin24 + adds rPolDataPtr = 144 , rPolDataPtr +} +;; +{ .mfi + ldfe fLnSin10 = [rLnSinDataPtr], 32 + fma.s1 fRes1H = fA3, FR_FracX, f0 // (A3*y)hi + and GR_N = GR_N, r17Ones // mask sign bit +} +{ .mfi + ldfe fLnSin12 = [rLnSinTmpPtr] + fma.s1 fDelX6 = fDxSqr, fDelX4, f0 // DeltaX^6 + shladd GR_ad_tbl_1 = rIndex1Dx, 4, rTbl1Addr // Point to G_1 +} +;; +{ .mfi + ldfe fA13 = [rPolDataPtr], -32 // A13 + fma.s1 fA4 = fA5, FR_FracX, fA4 // A5*y + A4 + // Get bits 30-15 of X_0 * Z_1 + pmpyshr2.u GR_X_1 = rX0Dx, GR_Z_1, 15 +} +{ .mfi + ldfe fA12 = [rTmpPtr2], -32 // A12 + fms.s1 FR_r = FR_G, fSignifX, f1 // r = G * S_hi - 1 + sub GR_N = GR_N, rExpHalf, 1 // unbisaed exponent of DeltaX +} +;; +// +// For performance, don't use result of pmpyshr2.u for 4 cycles. +// +.pred.rel "mutex",p10,p11 +{ .mfi + ldfe fA11 = [rPolDataPtr], -32 // A11 + // High part of log(|x|) = Y_hi = N * log2_hi + H + fma.s1 fResH = fFloatN, FR_log2_hi, FR_H +(p10) cmp.eq p8, p9 = rXRnd, r0 +} +{ .mfi + ldfe fA10 = [rTmpPtr2], -32 // A10 + fma.s1 fRes6H = fA1, FR_FracX, f0 // (A1*y)hi +(p11) cmp.eq p9, p8 = rXRnd, r0 +} +;; +{ .mfi + ldfe fA9 = [rPolDataPtr], -32 // A9 + fma.s1 fB14 = fLnSin6, fDxSqr, f0 // (LnSin6*deltaX^2)hi + cmp.eq p6, p7 = 4, rSgnGamSize +} +{ .mfi + ldfe fA8 = [rTmpPtr2], -32 // A8 + fma.s1 fA18 = fA19, FR_FracX, fA18 + nop.i 0 +} +;; +{ .mfi + ldfe fA7 = [rPolDataPtr] // A7 + fma.s1 fA23 = fA23, FR_FracX, fA22 + nop.i 0 +} +{ .mfi + ldfe fA6 = [rTmpPtr2] // A6 + fma.s1 fA21 = fA21, FR_FracX, fA20 + nop.i 0 +} +;; +{ .mfi + ldfe fLnSin14 = [rLnSinDataPtr] + fms.s1 fRes1L = fA3, FR_FracX, fRes1H // delta((A3*y)hi) + extr.u GR_Index2 = GR_X_1, 6, 4 // Extract bits 6-9 of X_1 +} +{ .mfi + setf.sig fFloatNDx = GR_N + fadd.s1 fPol = fRes1H, fA2 // (A3*y + A2)hi + nop.i 0 +} +;; +{ .mfi + ldfps FR_G, FR_H = [GR_ad_tbl_1], 8 // Load G_1, H_1 + fma.s1 fRes2H = fA4, fXSqr, f0 // ((A5 + A4*y)*y^2)hi + nop.i 0 +} +{ .mfi + shladd GR_ad_z_2 = GR_Index2, 2, rZ2Addr // Point to Z_2 + fma.s1 fA25 = fA25, FR_FracX, fA24 + shladd GR_ad_tbl_2 = GR_Index2, 4, rTbl2Addr // Point to G_2 +} +;; +.pred.rel "mutex",p8,p9 +{ .mfi + ld4 GR_Z_2 = [GR_ad_z_2] // Load Z_2 + fms.s1 fRes6L = fA1, FR_FracX, fRes6H // delta((A1*y)hi) + // sign of GAMMA(x) is negative +(p8) adds rSgnGam = -1, r0 +} +{ .mfi + adds rTmpPtr = 8, GR_ad_tbl_2 + fadd.s1 fRes3H = fRes6H, fA0 // (A1*y + A0)hi + // sign of GAMMA(x) is positive +(p9) adds rSgnGam = 1, r0 +} +;; +{ .mfi + ldfps FR_G2, FR_H2 = [GR_ad_tbl_2] // Load G_2, H_2 + // (LnSin6*deltaX^2 + LnSin4)hi + fadd.s1 fLnSinH = fB14, fLnSin4 + nop.i 0 +} +{ .mfi + ldfd FR_h2 = [rTmpPtr] // Load h_2 + fms.s1 fB16 = fLnSin6, fDxSqr, fB14 // delta(LnSin6*deltaX^2) + nop.i 0 +} +;; +{ .mfi + ldfd fhDelX = [GR_ad_tbl_1] // Load h_1 + fma.s1 fA21 = fA21, fXSqr, fA18 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fLnSin36 = fLnSin36, fDelX4, fLnSin32 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fRes1L = fA3L, FR_FracX, fRes1L // (A3*y)lo + // Get bits 30-15 of X_1 * Z_ + pmpyshr2.u GR_X_2 = GR_X_1,GR_Z_2,15 +} +{ .mfi + nop.m 0 + fsub.s1 fPolL = fA2, fPol + nop.i 0 +} +;; +// +// For performance, don't use result of pmpyshr2.u for 4 cycles. +// +{ .mfi + nop.m 0 + // delta(((A5 + A4*y)*y^2)hi) + fms.s1 fRes2L = fA4, fXSqr, fRes2H + nop.i 0 +} +{ .mfi + nop.m 0 + // (((A5 + A4*y)*y^2) + A3*y + A2)hi + fadd.s1 fRes4H = fRes2H, fPol + nop.i 0 +} +;; +{ .mfi + // store signgam if size of variable is 4 bytes +(p6) st4 [rSgnGamAddr] = rSgnGam + fma.s1 fRes6L = fA1L, FR_FracX, fRes6L // (A1*y)lo + nop.i 0 +} +{ .mfi + // store signgam if size of variable is 8 bytes +(p7) st8 [rSgnGamAddr] = rSgnGam + fsub.s1 fRes3L = fA0, fRes3H + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fsub.s1 fLnSinL = fLnSin4, fLnSinH + nop.i 0 +} +{ .mfi + nop.m 0 + // ((LnSin6*deltaX^2 + LnSin4)*deltaX^2)hi + fma.s1 fB18 = fLnSinH, fDxSqr, f0 + nop.i 0 +} +;; +{ .mfi + adds rTmpPtr = 8, rTbl3Addr + fma.s1 fB16 = fLnSin6, fDxSqrL, fB16 // (LnSin6*deltaX^2)lo + extr.u GR_Index3 = GR_X_2, 1, 5 // Extract bits 1-5 of X_2 +} +{ .mfi + nop.m 0 + fma.s1 fA25 = fA25, fXSqr, fA23 + nop.i 0 +} +;; +{ .mfi + shladd GR_ad_tbl_3 = GR_Index3, 4, rTbl3Addr // Point to G_3 + fadd.s1 fPolL = fPolL, fRes1H + nop.i 0 +} +{ .mfi + shladd rTmpPtr = GR_Index3, 4, rTmpPtr // Point to G_3 + fadd.s1 fRes1L = fRes1L, fA2L // (A3*y)lo + A2lo + nop.i 0 +} +;; +{ .mfi + ldfps FR_G3, FR_H3 = [GR_ad_tbl_3] // Load G_3, H_3 + fma.s1 fRes2L = fA4, fXSqrL, fRes2L // ((A5 + A4*y)*y^2)lo + nop.i 0 +} +{ .mfi + ldfd FR_h3 = [rTmpPtr] // Load h_3 + fsub.s1 fRes4L = fPol, fRes4H + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // ((((A5 + A4*y)*y^2) + A3*y + A2)*y^2)hi + fma.s1 fRes7H = fRes4H, fXSqr, f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA15 = fA15, FR_FracX, fA14 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fRes3L = fRes3L, fRes6H + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 fRes6L = fRes6L, fA0L // (A1*y)lo + A0lo + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fLnSinL = fLnSinL, fB14 + + nop.i 0 +} +{ .mfi + nop.m 0 + // delta((LnSin6*deltaX^2 + LnSin4)*deltaX^2) + fms.s1 fB20 = fLnSinH, fDxSqr, fB18 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fPolL = fPolL, fRes1L // (A3*y + A2)lo + + nop.i 0 +} +{ .mfi + nop.m 0 + // ((LnSin6*deltaX^2 + LnSin4)*deltaX^2 + LnSin2)hi + fadd.s1 fLnSin6 = fB18, fLnSin2 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fRes4L = fRes4L, fRes2H + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA17 = fA17, FR_FracX, fA16 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // delta(((((A5 + A4*y)*y^2) + A3*y + A2)*y^2) + fms.s1 fRes7L = fRes4H, fXSqr, fRes7H + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 fPol = fRes7H, fRes3H + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fRes3L = fRes3L, fRes6L // (A1*y + A0)lo + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA25 = fA25, fX4, fA21 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // (LnSin6*deltaX^2 + LnSin4)lo + fadd.s1 fLnSinL = fLnSinL, fB16 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fB20 = fLnSinH, fDxSqrL, fB20 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fsub.s1 fLnSin4 = fLnSin2, fLnSin6 + nop.i 0 +} +{ .mfi + nop.m 0 + // (((LnSin6*deltaX^2 + LnSin4)*deltaX^2 + LnSin2)*DeltaX^2)hi + fma.s1 fLnSinH = fLnSin6, fDxSqr, f0 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // ((A5 + A4*y)*y^2)lo + (A3*y + A2)lo + fadd.s1 fRes2L = fRes2L, fPolL + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA17 = fA17, fXSqr, fA15 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // ((((A5 + A4*y)*y^2) + A3*y + A2)*y^2)lo + fma.s1 fRes7L = fRes4H, fXSqrL, fRes7L + nop.i 0 +} +{ .mfi + nop.m 0 + fsub.s1 fPolL = fRes3H, fPol + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA13 = fA13, FR_FracX, fA12 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA11 = fA11, FR_FracX, fA10 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // ((LnSin6*deltaX^2 + LnSin4)*deltaX^2)lo + fma.s1 fB20 = fLnSinL, fDxSqr, fB20 + nop.i 0 +} +{ .mfi + nop.m 0 + fmpy.s1 FR_G = FR_G, FR_G2 // G = G_1 * G_2 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fLnSin4 = fLnSin4, fB18 + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 fLnSinL = fLnSin6, fDxSqr, fLnSinH + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // (((A5 + A4*y)*y^2) + A3*y + A2)lo + fadd.s1 fRes4L = fRes4L, fRes2L + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 fhDelX = fhDelX, FR_h2 // h = h_1 + h_2 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fRes7L = fRes7L, fRes3L + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 fPolL = fPolL, fRes7H + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fcvt.xf fFloatNDx = fFloatNDx + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 FR_H = FR_H, FR_H2 // H = H_1 + H_2 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fmpy.s1 FR_G = FR_G, FR_G3 // G = (G_1 * G_2) * G_3 + nop.i 0 +} +{ .mfi + nop.m 0 + // ((LnSin6*deltaX^2 + LnSin4)*deltaX^2)lo + (LnSin2)lo + fadd.s1 fLnSin2L = fLnSin2L, fB20 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA25 = fA25, fX4, fA17 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA13 = fA13, fXSqr, fA11 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA9 = fA9, FR_FracX, fA8 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA7 = fA7, FR_FracX, fA6 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fLnSin36 = fLnSin36, fDelX8, fLnSin28 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fLnSin14 = fLnSin14, fDxSqr, fLnSin12 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fLnSin10 = fLnSin10, fDxSqr, fLnSin8 + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 FR_H = FR_H, FR_H3 // H = (H_1 + H_2) + H_3 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fms.s1 fRDx = FR_G, fNormDx, f1 // r = G * S_hi - 1 + nop.i 0 +} +{ .mfi + nop.m 0 + // poly_lo = r * Q4 + Q3 + fma.s1 FR_poly_lo = FR_r, FR_Q4, FR_Q3 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fmpy.s1 FR_rsq = FR_r, FR_r // rsq = r * r + nop.i 0 +} +{ .mfi + nop.m 0 + // ((((A5 + A4*y)*y^2) + A3*y + A2)*y^2)lo + (A1*y + A0)lo + fma.s1 fRes7L = fRes4L, fXSqr, fRes7L + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA25 = fA25, fX4, fA13 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA9 = fA9, fXSqr, fA7 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // h = N * log2_lo + h + fma.s1 FR_h = fFloatN, FR_log2_lo, FR_h + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 fhDelX = fhDelX, FR_h3 // h = (h_1 + h_2) + h_3 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fLnSin36 = fLnSin36, fDelX6, fLnSin20 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fLnSin14 = fLnSin14, fDelX4, fLnSin10 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // poly_lo = r * Q4 + Q3 + fma.s1 fPolyLoDx = fRDx, FR_Q4, FR_Q3 + nop.i 0 +} +{ .mfi + nop.m 0 + fmpy.s1 fRDxSq = fRDx, fRDx // rsq = r * r + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // Y_hi = N * log2_hi + H + fma.s1 fResLnDxH = fFloatNDx, FR_log2_hi, FR_H + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_rcub = FR_rsq, FR_r, f0 // rcub = r^3 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA9 = fA25, fX4, fA9 + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 fPolL = fPolL, fRes7L + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fLnSin4 = fLnSin4, fLnSin2L + nop.i 0 +} +{ .mfi + nop.m 0 + // h = N * log2_lo + h + fma.s1 fhDelX = fFloatNDx, FR_log2_lo, fhDelX + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fLnSin36 = fLnSin36, fDelX8, fLnSin14 + nop.i 0 +} +{ .mfi + nop.m 0 + // ((LnSin6*deltaX^2 + LnSin4)*deltaX^2 + LnSin2)lo + fma.s1 fLnSinL = fLnSin6, fDxSqrL, fLnSinL + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // poly_lo = poly_lo * r + Q2 + fma.s1 fPolyLoDx = fPolyLoDx, fRDx, FR_Q2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fRDxCub = fRDxSq, fRDx, f0 // rcub = r^3 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + famax.s0 fRes5H = fPol, fResH + nop.i 0 +} +{ .mfi + nop.m 0 + // High part of (lgammal(|x|) + log(|x|)) + fadd.s1 fRes1H = fPol, fResH + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // poly_lo = poly_lo * r + Q2 + fma.s1 FR_poly_lo = FR_poly_lo, FR_r, FR_Q2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fPolL = fA9, fX6, fPolL // P25lo + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + famin.s0 fRes5L = fPol, fResH + nop.i 0 +} +{ .mfi + nop.m 0 + // High part of -(LnSin + log(|DeltaX|)) + fnma.s1 fRes2H = fResLnDxH, f1, fLnSinH + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + // (((LnSin6*deltaX^2 + LnSin4)*deltaX^2 + LnSin2)*DeltaX^2)lo + fma.s1 fLnSinL = fLnSin4, fDxSqr, fLnSinL + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fLnSin36 = fLnSin36, fDelX6, f0 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // poly_hi = Q1 * rsq + r + fma.s1 fPolyHiDx = FR_Q1, fRDxSq, fRDx + nop.i 0 +} +{ .mfi + nop.m 0 + // poly_lo = poly_lo*r^3 + h + fma.s1 fPolyLoDx = fPolyLoDx, fRDxCub, fhDelX + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fsub.s1 fRes1L = fRes5H, fRes1H + nop.i 0 +} +{ .mfi + nop.m 0 + // -(lgammal(|x|) + log(|x|))hi + fnma.s1 fRes1H = fRes1H, f1, f0 + + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // poly_hi = Q1 * rsq + r + fma.s1 FR_poly_hi = FR_Q1, FR_rsq, FR_r + nop.i 0 +} +{ .mfi + nop.m 0 + // poly_lo = poly_lo*r^3 + h + fma.s1 FR_poly_lo = FR_poly_lo, FR_rcub, FR_h + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fms.s1 fRes2L = fResLnDxH, fMOne, fRes2H + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fLnSinL = fLnSin36, fDxSqr, fLnSinL + nop.i 0 +} +{ .mfi + nop.m 0 + // Y_lo = poly_hi + poly_lo + fadd.s1 fResLnDxL = fPolyHiDx, fPolyLoDx + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fRes1L = fRes1L, fRes5L + nop.i 0 +} +{ .mfi + nop.m 0 + // high part of the final result + fadd.s1 fYH = fRes2H, fRes1H + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // Y_lo = poly_hi + poly_lo + fadd.s1 fResL = FR_poly_hi, FR_poly_lo + nop.i 0 +} +;; +{ .mfi + nop.m 0 + famax.s0 fRes4H = fRes2H, fRes1H + nop.i 0 +} +;; +{ .mfi + nop.m 0 + famin.s0 fRes4L = fRes2H, fRes1H + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // (LnSin)lo + (log(|DeltaX|))lo + fsub.s1 fLnSinL = fLnSinL, fResLnDxL + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 fRes2L = fRes2L, fLnSinH + nop.i 0 +} +;; +{ .mfi + nop.m 0 + //(lgammal(|x|))lo + (log(|x|))lo + fadd.s1 fPolL = fResL, fPolL + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fsub.s1 fYL = fRes4H, fYH + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // Low part of -(LnSin + log(|DeltaX|)) + fadd.s1 fRes2L = fRes2L, fLnSinL + nop.i 0 +} +{ .mfi + nop.m 0 + // High part of (lgammal(|x|) + log(|x|)) + fadd.s1 fRes1L = fRes1L, fPolL + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fYL = fYL, fRes4L + nop.i 0 +} +{ .mfi + nop.m 0 + fsub.s1 fRes2L = fRes2L, fRes1L + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // low part of the final result + fadd.s1 fYL = fYL, fRes2L + nop.i 0 +} +;; +{ .mfb + nop.m 0 + // final result for -6.0 < x <= -0.75, non-integer, "far" from roots + fma.s0 f8 = fYH, f1, fYL + // exit here for -6.0 < x <= -0.75, non-integer, "far" from roots + br.ret.sptk b0 +} +;; + +// here if |x+1| < 2^(-7) +.align 32 +_closeToNegOne: +{ .mfi + getf.exp GR_N = fDx // Get N = exponent of x + fmerge.se fAbsX = f1, fDx // Form |deltaX| + // Get high 4 bits of significand of deltaX + extr.u rIndex1Dx = rSignifDx, 59, 4 +} +{ .mfi + addl rPolDataPtr= @ltoff(lgammal_1pEps_data),gp + fma.s1 fA0L = fDxSqr, fDxSqr, f0 // deltaX^4 + // sign of GAMMA is positive if p10 is set to 1 +(p10) adds rSgnGam = 1, r0 +} +;; +{ .mfi + shladd GR_ad_z_1 = rIndex1Dx, 2, GR_ad_z_1 // Point to Z_1 + fnma.s1 fResL = fDx, f1, f0 // -(x+1) + // Get high 15 bits of significand + extr.u GR_X_0 = rSignifDx, 49, 15 +} +{ .mfi + ld8 rPolDataPtr = [rPolDataPtr] + nop.f 0 + shladd GR_ad_tbl_1 = rIndex1Dx, 4, rTbl1Addr // Point to G_1 +} +;; +{ .mfi + ld4 GR_Z_1 = [GR_ad_z_1] // Load Z_1 + nop.f 0 + and GR_N = GR_N, r17Ones // mask sign bit +} +{ .mfi + adds rTmpPtr = 8, GR_ad_tbl_1 + nop.f 0 + cmp.eq p6, p7 = 4, rSgnGamSize +} +;; +{ .mfi + ldfps FR_G, FR_H = [GR_ad_tbl_1],8 // Load G_1, H_1 + nop.f 0 + adds rTmpPtr2 = 96, rPolDataPtr +} +{ .mfi + ldfd FR_h = [rTmpPtr] // Load h_1 + nop.f 0 + // unbiased exponent of deltaX + sub GR_N = GR_N, rExpHalf, 1 +} +;; +{ .mfi + adds rTmpPtr3 = 192, rPolDataPtr + nop.f 0 + // sign of GAMMA is negative if p11 is set to 1 +(p11) adds rSgnGam = -1, r0 +} +{ .mfi + ldfe fA1 = [rPolDataPtr], 16 // A1 + nop.f 0 + nop.i 0 +} +;; +{.mfi + ldfe fA2 = [rPolDataPtr], 16 // A2 + nop.f 0 + // Get bits 30-15 of X_0 * Z_1 + pmpyshr2.u GR_X_1 = GR_X_0,GR_Z_1,15 +} +{ .mfi + ldfpd fA20, fA19 = [rTmpPtr2], 16 // P8, P7 + nop.f 0 + nop.i 0 +} +;; +// +// For performance, don't use result of pmpyshr2.u for 4 cycles. +// +{ .mfi + ldfe fA3 = [rPolDataPtr], 16 // A3 + nop.f 0 + nop.i 0 +} +{ .mfi + ldfpd fA18, fA17 = [rTmpPtr2], 16 // P6, P5 + nop.f 0 + nop.i 0 +} +;; +{ .mfi + ldfe fA4 = [rPolDataPtr], 16 // A4 + nop.f 0 + nop.i 0 +} +{ .mfi + ldfpd fA16, fA15 = [rTmpPtr2], 16 // P4, p3 + nop.f 0 + nop.i 0 +} +;; +{ .mfi + ldfpd fA5L, fA6 = [rPolDataPtr], 16 // A5, A6 + nop.f 0 + nop.i 0 +} +{ .mfi + ldfpd fA14, fA13 = [rTmpPtr2], 16 // P2, P1 + nop.f 0 + nop.i 0 +} +;; +{ .mfi + ldfpd fA7, fA8 = [rPolDataPtr], 16 // A7, A8 + nop.f 0 + extr.u GR_Index2 = GR_X_1, 6, 4 // Extract bits 6-9 of X_1 +} +{ .mfi + ldfe fLnSin2 = [rTmpPtr2], 16 + nop.f 0 + nop.i 0 +} +;; +{ .mfi + shladd GR_ad_z_2 = GR_Index2, 2, rZ2Addr // Point to Z_2 + nop.f 0 + shladd GR_ad_tbl_2 = GR_Index2, 4, rTbl2Addr // Point to G_2 +} +{ .mfi + ldfe fLnSin4 = [rTmpPtr2], 32 + nop.f 0 + nop.i 0 +} +;; +{ .mfi + ld4 GR_Z_2 = [GR_ad_z_2] // Load Z_2 + nop.f 0 + adds rTmpPtr = 8, GR_ad_tbl_2 +} +{ .mfi + // Put integer N into rightmost significand + setf.sig fFloatN = GR_N + nop.f 0 + nop.i 0 +} +;; +{ .mfi + ldfe fLnSin6 = [rTmpPtr3] + nop.f 0 + nop.i 0 +} +{ .mfi + ldfe fLnSin8 = [rTmpPtr2] + nop.f 0 + nop.i 0 +} +;; +{ .mfi + ldfps FR_G2, FR_H2 = [GR_ad_tbl_2],8 // Load G_2, H_2 + nop.f 0 + nop.i 0 +} +{ .mfi + ldfd FR_h2 = [rTmpPtr] // Load h_2 + nop.f 0 + nop.i 0 +} +;; +{ .mfi + // store signgam if size of variable is 4 bytes +(p6) st4 [rSgnGamAddr] = rSgnGam + fma.s1 fResH = fA20, fResL, fA19 //polynomial for log(|x|) + // Get bits 30-15 of X_1 * Z_2 + pmpyshr2.u GR_X_2 = GR_X_1,GR_Z_2,15 +} +{ .mfi + // store signgam if size of variable is 8 bytes +(p7) st8 [rSgnGamAddr] = rSgnGam + fma.s1 fA2 = fA2, fDx, fA1 // polynomial for lgammal(|x|) + nop.i 0 +} +;; +// +// For performance, don't use result of pmpyshr2.u for 4 cycles. +// +{ .mfi + nop.m 0 + fma.s1 fA18 = fA18, fResL, fA17 //polynomial for log(|x|) + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA16 = fA16, fResL, fA15 //polynomial for log(|x|) + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA4 = fA4, fDx, fA3 // polynomial for lgammal(|x|) + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA14 = fA14, fResL, fA13 //polynomial for log(|x|) + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA6 = fA6, fDx, fA5L // polynomial for lgammal(|x|) + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fPol = fA8, fDx, fA7 // polynomial for lgammal(|x|) + extr.u GR_Index3 = GR_X_2, 1, 5 // Extract bits 1-5 of X_2 +} +;; +{ .mfi + shladd GR_ad_tbl_3 = GR_Index3, 4, rTbl3Addr // Point to G_3 + // loqw part of lnsin polynomial + fma.s1 fRes3L = fLnSin4, fDxSqr, fLnSin2 + nop.i 0 +} +;; +{ .mfi + ldfps FR_G3, FR_H3 = [GR_ad_tbl_3], 8 // Load G_3, H_3 + fcvt.xf fFloatN = fFloatN // N as FP number + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fResH = fResH, fDxSqr, fA18 // High part of log(|x|) + nop.i 0 +} +;; +{ .mfi + ldfd FR_h3 = [GR_ad_tbl_3] // Load h_3 + fma.s1 fA4 = fA4, fDxSqr, fA2 // Low part of lgammal(|x|) + nop.i 0 +} +{ .mfi + nop.m 0 + // high part of lnsin polynomial + fma.s1 fRes3H = fLnSin8, fDxSqr, fLnSin6 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fmpy.s1 FR_G = FR_G, FR_G2 // G = G_1 * G_2 + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 FR_H = FR_H, FR_H2 // H = H_1 + H_2 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 FR_h = FR_h, FR_h2 // h = h_1 + h_2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA16 = fA16, fDxSqr, fA14 // Low part of log(|x|) + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fPol = fPol, fDxSqr, fA6 // High part of lgammal(|x|) + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fResH = fResH, fA0L, fA16 // log(|x|)/deltaX^2 - deltaX + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fmpy.s1 FR_G = FR_G, FR_G3 // G = (G_1 * G_2) * G_3 + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 FR_H = FR_H, FR_H3 // H = (H_1 + H_2) + H_3 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 FR_h = FR_h, FR_h3 // h = (h_1 + h_2) + h_3 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fResH = fResH, fDxSqr, fResL // log(|x|) + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fPol = fPol, fA0L, fA4 // lgammal(|x|)/|x| + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fms.s1 FR_r = FR_G, fAbsX, f1 // r = G * S_hi - 1 + nop.i 0 +} +{ .mfi + nop.m 0 + // high part of log(deltaX)= Y_hi = N * log2_hi + H + fma.s1 fRes4H = fFloatN, FR_log2_hi, FR_H + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // h = N * log2_lo + h + fma.s1 FR_h = fFloatN, FR_log2_lo, FR_h + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fResH = fPol, fDx, fResH // lgammal(|x|) + log(|x|) + nop.i 0 +} +{ .mfi + nop.m 0 + // lnsin/deltaX^2 + fma.s1 fRes3H = fRes3H, fA0L, fRes3L + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // poly_lo = r * Q4 + Q3 + fma.s1 FR_poly_lo = FR_r, FR_Q4, FR_Q3 + nop.i 0 +} +{ .mfi + nop.m 0 + fmpy.s1 FR_rsq = FR_r, FR_r // rsq = r * r + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // lnSin - log(|x|) - lgammal(|x|) + fms.s1 fResH = fRes3H, fDxSqr, fResH + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + // poly_lo = poly_lo * r + Q2 + fma.s1 FR_poly_lo = FR_poly_lo, FR_r, FR_Q2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_rcub = FR_rsq, FR_r, f0 // rcub = r^3 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + // poly_hi = Q1 * rsq + r + fma.s1 FR_poly_hi = FR_Q1, FR_rsq, FR_r + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + // poly_lo = poly_lo*r^3 + h + fma.s1 FR_poly_lo = FR_poly_lo, FR_rcub, FR_h + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + // low part of log(|deltaX|) = Y_lo = poly_hi + poly_lo + fadd.s1 fRes4L = FR_poly_hi, FR_poly_lo + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fsub.s1 fResH = fResH, fRes4L + nop.i 0 +} +;; +{ .mfb + nop.m 0 + // final result for |x+1|< 2^(-7) path + fsub.s0 f8 = fResH, fRes4H + // exit for |x+1|< 2^(-7) path + br.ret.sptk b0 +} +;; + + +// here if -2^63 < x < -6.0 and x is not an integer +// Also we are going to filter out cases when x falls in +// range which is "close enough" to negative root. Rhis case +// may occur only for -19.5 < x since other roots of lgamma are +// insignificant from double extended point of view (they are closer +// to RTN(x) than one ulp(x). +.align 32 +_negStirling: +{ .mfi + ldfe fLnSin6 = [rLnSinDataPtr], 32 + fnma.s1 fInvX = f8, fRcpX, f1 // start of 3rd NR iteration + // Get high 4 bits of significand of deltaX + extr.u rIndex1Dx = rSignifDx, 59, 4 +} +{ .mfi + ldfe fLnSin8 = [rTmpPtr3], 32 + fadd.s1 FR_h = FR_h, FR_h2 // h = h_1 + h_2 +(p12) cmp.ltu.unc p6, p0 = rSignifX, rLeftBound +} +;; +{ .mfi + ldfe fLnSin10 = [rLnSinDataPtr], 32 + fmpy.s1 FR_G = FR_G, FR_G3 // G = (G_1 * G_2) * G_3 + // Get high 15 bits of significand + extr.u GR_X_0 = rSignifDx, 49, 15 +} +{ .mfi + shladd GR_ad_z_1 = rIndex1Dx, 2, GR_ad_z_1 // Point to Z_1 + fadd.s1 FR_H = FR_H, FR_H3 // H = (H_1 + H_2) + H_3 + // set p6 if x falls in "near root" range +(p6) cmp.geu.unc p6, p0 = rSignifX, rRightBound +} +;; +{ .mfi + getf.exp GR_N = fDx // Get N = exponent of x + fma.s1 fDx4 = fDxSqr, fDxSqr, f0 // deltaX^4 + adds rTmpPtr = 96, rBernulliPtr +} +{ .mfb + ld4 GR_Z_1 = [GR_ad_z_1] // Load Z_1 + fma.s1 fLnSin34 = fLnSin34, fDxSqr, fLnSin32 + // branch to special path if x falls in "near root" range +(p6) br.cond.spnt _negRoots +} +;; +.pred.rel "mutex",p10,p11 +{ .mfi + ldfe fLnSin12 = [rTmpPtr3] + fma.s1 fLnSin26 = fLnSin26, fDxSqr, fLnSin24 +(p10) cmp.eq p8, p9 = rXRnd, r0 +} +{ .mfi + ldfe fLnSin14 = [rLnSinDataPtr] + fma.s1 fLnSin30 = fLnSin30, fDxSqr, fLnSin28 +(p11) cmp.eq p9, p8 = rXRnd, r0 +} +;; +{ .mfi + ldfpd fB2, fB2L = [rBernulliPtr], 16 + fma.s1 fLnSin18 = fLnSin18, fDxSqr, fLnSin16 + shladd GR_ad_tbl_1 = rIndex1Dx, 4, rTbl1Addr // Point to G_1 + +} +{ .mfi + ldfe fB14 = [rTmpPtr], 16 + fma.s1 fLnSin22 = fLnSin22, fDxSqr, fLnSin20 + and GR_N = GR_N, r17Ones // mask sign bit +} +;; +{ .mfi + ldfe fB4 = [rBernulliPtr], 16 + fma.s1 fInvX = fInvX, fRcpX, fRcpX // end of 3rd NR iteration + // Get bits 30-15 of X_0 * Z_1 + pmpyshr2.u GR_X_1 = GR_X_0,GR_Z_1,15 +} +{ .mfi + ldfe fB16 = [rTmpPtr], 16 + fadd.s1 FR_h = FR_h, FR_h3 // h = (h_1 + h_2) + h_3 + adds rTmpPtr2 = 8, GR_ad_tbl_1 +} +;; +// +// For performance, don't use result of pmpyshr2.u for 4 cycles. +// +{ .mfi + ldfe fB6 = [rBernulliPtr], 16 + fms.s1 FR_r = FR_G, fSignifX, f1 // r = G * S_hi - 1 + adds rTmpPtr3 = -48, rTmpPtr +} +{ .mfi + ldfe fB18 = [rTmpPtr], 16 + // High part of the log(|x|) = Y_hi = N * log2_hi + H + fma.s1 fResH = fFloatN, FR_log2_hi, FR_H + sub GR_N = GR_N, rExpHalf, 1 // unbiased exponent of deltaX +} +;; +.pred.rel "mutex",p8,p9 +{ .mfi + ldfe fB8 = [rBernulliPtr], 16 + fma.s1 fLnSin36 = fLnSin36, fDx4, fLnSin34 + // sign of GAMMA(x) is negative +(p8) adds rSgnGam = -1, r0 +} +{ .mfi + ldfe fB20 = [rTmpPtr], -160 + fma.s1 fRes5H = fLnSin4, fDxSqr, f0 + // sign of GAMMA(x) is positive +(p9) adds rSgnGam = 1, r0 + +} +;; +{ .mfi + ldfe fB10 = [rBernulliPtr], 16 + fma.s1 fLnSin30 = fLnSin30, fDx4, fLnSin26 +(p14) adds rTmpPtr = -160, rTmpPtr +} +{ .mfi + ldfe fB12 = [rTmpPtr3], 16 + fma.s1 fDx8 = fDx4, fDx4, f0 // deltaX^8 + cmp.eq p6, p7 = 4, rSgnGamSize +} +;; +{ .mfi + ldfps fGDx, fHDx = [GR_ad_tbl_1], 8 // Load G_1, H_1 + fma.s1 fDx6 = fDx4, fDxSqr, f0 // deltaX^6 + extr.u GR_Index2 = GR_X_1, 6, 4 // Extract bits 6-9 of X_1 +} +{ .mfi + ldfd fhDx = [rTmpPtr2] // Load h_1 + fma.s1 fLnSin22 = fLnSin22, fDx4, fLnSin18 + nop.i 0 +} +;; +{ .mfi + // Load two parts of C + ldfpd fRes1H, fRes1L = [rTmpPtr], 16 + fma.s1 fRcpX = fInvX, fInvX, f0 // (1/x)^2 + shladd GR_ad_tbl_2 = GR_Index2, 4, rTbl2Addr // Point to G_2 +} +{ .mfi + shladd GR_ad_z_2 = GR_Index2, 2, rZ2Addr // Point to Z_2 + fma.s1 FR_h = fFloatN, FR_log2_lo, FR_h// h = N * log2_lo + h + nop.i 0 +} +;; +{ .mfi + ld4 GR_Z_2 = [GR_ad_z_2] // Load Z_2 + fnma.s1 fInvXL = f8, fInvX, f1 // relative error of 1/x + nop.i 0 +} +{ .mfi + adds rTmpPtr2 = 8, GR_ad_tbl_2 + fma.s1 fLnSin8 = fLnSin8, fDxSqr, fLnSin6 + nop.i 0 +} +;; +{ .mfi + ldfps FR_G2, FR_H2 = [GR_ad_tbl_2],8 // Load G_2, H_2 + // poly_lo = r * Q4 + Q3 + fma.s1 FR_poly_lo = FR_r, FR_Q4, FR_Q3 + nop.i 0 +} +{ .mfi + ldfd fh2Dx = [rTmpPtr2] // Load h_2 + fmpy.s1 FR_rsq = FR_r, FR_r // rsq = r * r + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA1L = fB2, fInvX, f0 // (B2*(1/x))hi + nop.i 0 +} +{ .mfi + // Put integer N into rightmost significand + setf.sig fFloatNDx = GR_N + fms.s1 fRes4H = fResH, f1, f1 // ln(|x|)hi - 1 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fRes2H = fRes5H, fLnSin2//(lnSin4*DeltaX^2 + lnSin2)hi + // Get bits 30-15 of X_1 * Z_2 + pmpyshr2.u GR_X_2 = GR_X_1,GR_Z_2,15 +} +{ .mfi + nop.m 0 + fms.s1 fRes5L = fLnSin4, fDxSqr, fRes5H + nop.i 0 +} +;; +// +// For performance, don't use result of pmpyshr2.u for 4 cycles. +// +{ .mfi + nop.m 0 + fma.s1 fInvX4 = fRcpX, fRcpX, f0 // (1/x)^4 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fB6 = fB6, fRcpX, fB4 + nop.i 0 +} +;; +{ .mfi + // store signgam if size of variable is 4 bytes +(p6) st4 [rSgnGamAddr] = rSgnGam + fma.s1 fB18 = fB18, fRcpX, fB16 + nop.i 0 +} +{ .mfi + // store signgam if size of variable is 8 bytes +(p7) st8 [rSgnGamAddr] = rSgnGam + fma.s1 fInvXL = fInvXL, fInvX, f0 // low part of 1/x + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // poly_lo = poly_lo * r + Q2 + fma.s1 FR_poly_lo = FR_poly_lo, FR_r, FR_Q2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_rcub = FR_rsq, FR_r, f0 // rcub = r^3 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fRes3H = fRes4H, f8, f0 // (-|x|*(ln(|x|)-1))hi + extr.u GR_Index3 = GR_X_2, 1, 5 // Extract bits 1-5 of X_2 +} +{ .mfi + nop.m 0 + // poly_hi = Q1 * rsq + r + fma.s1 FR_poly_hi = FR_Q1, FR_rsq, FR_r + nop.i 0 +} +;; +{ .mfi + shladd GR_ad_tbl_3 = GR_Index3, 4, rTbl3Addr // Point to G_3 + fms.s1 fA2L = fB2, fInvX, fA1L // delta(B2*(1/x)) + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 fBrnH = fRes1H, f1, fA1L // (-C - S(1/x))hi + nop.i 0 +} +;; +{ .mfi + ldfps fG3Dx, fH3Dx = [GR_ad_tbl_3],8 // Load G_3, H_3 + fma.s1 fInvX8 = fInvX4, fInvX4, f0 // (1/x)^8 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fB10 = fB10, fRcpX, fB8 + nop.i 0 +} +;; + +{ .mfi + ldfd fh3Dx = [GR_ad_tbl_3] // Load h_3 + fma.s1 fB20 = fB20, fInvX4, fB18 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fB14 = fB14, fRcpX, fB12 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fLnSin36 = fLnSin36, fDx8, fLnSin30 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fLnSin12 = fLnSin12, fDxSqr, fLnSin10 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fsub.s1 fRes2L = fLnSin2, fRes2H + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fPol = fRes2H, fDxSqr, f0 // high part of LnSin + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fnma.s1 fResH = fResH, FR_MHalf, fResH // -0.5*ln(|x|)hi + nop.i 0 +} +{ .mfi + nop.m 0 + fmpy.s1 fGDx = fGDx, FR_G2 // G = G_1 * G_2 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // poly_lo = poly_lo*r^3 + h + fma.s1 FR_poly_lo = FR_poly_lo, FR_rcub, FR_h + nop.i 0 +} +{ .mfi + nop.m 0 + // B2lo*(1/x)hi+ delta(B2*(1/x)) + fma.s1 fA2L = fB2L, fInvX, fA2L + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fB20 = fB20, fInvX4, fB14 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fB10 = fB10, fInvX4, fB6 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fcvt.xf fFloatNDx = fFloatNDx + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fLnSin14 = fLnSin14, fDx4, fLnSin12 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fLnSin36 = fLnSin36, fDx8, fLnSin22 + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 fRes3L = fRes4H, f8, fRes3H // delta(-|x|*(ln(|x|)-1)) + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fmpy.s1 fGDx = fGDx, fG3Dx // G = (G_1 * G_2) * G_3 + nop.i 0 +} +{ .mfi + nop.m 0 + // (-|x|*(ln(|x|)-1) - 0.5ln(|x|))hi + fadd.s1 fRes4H = fRes3H, fResH + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA2L = fInvXL, fB2, fA2L //(B2*(1/x))lo + nop.i 0 +} +{ .mfi + nop.m 0 + // low part of log(|x|) = Y_lo = poly_hi + poly_lo + fadd.s1 fResL = FR_poly_hi, FR_poly_lo + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fB20 = fB20, fInvX8, fB10 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fInvX3 = fInvX, fRcpX, f0 // (1/x)^3 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fHDx = fHDx, FR_H2 // H = H_1 + H_2 + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 fRes5L = fRes5L, fLnSin2L + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fRes2L = fRes2L, fRes5H + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 fhDx = fhDx, fh2Dx // h = h_1 + h_2 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fms.s1 fBrnL = fRes1H, fMOne, fBrnH + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 FR_r = fGDx, fNormDx, f1 // r = G * S_hi - 1 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fRes3L = fResL, f8 , fRes3L // (-|x|*(ln(|x|)-1))lo + nop.i 0 +} +{ .mfi + nop.m 0 + fsub.s1 fRes4L = fRes3H, fRes4H + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // low part of "Bernulli" polynomial + fma.s1 fB20 = fB20, fInvX3, fA2L + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 fResL = fResL, FR_MHalf, fResL // -0.5*ln(|x|)lo + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fHDx = fHDx, fH3Dx // H = (H_1 + H_2) + H_3 + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 fPolL = fRes2H, fDxSqr, fPol + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fhDx = fhDx, fh3Dx // h = (h_1 + h_2) + h_3 + nop.i 0 +} +{ .mfi + nop.m 0 + // (-|x|*(ln(|x|)-1) - 0.5ln(|x|) - C - S(1/x))hi + fadd.s1 fB14 = fRes4H, fBrnH + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // poly_lo = r * Q4 + Q3 + fma.s1 FR_poly_lo = FR_r, FR_Q4, FR_Q3 + nop.i 0 +} +{ .mfi + nop.m 0 + fmpy.s1 FR_rsq = FR_r, FR_r // rsq = r * r + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fRes4L = fRes4L, fResH + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 fBrnL = fBrnL, fA1L + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // (-|x|*(ln(|x|)-1))lo + (-0.5ln(|x|))lo + fadd.s1 fRes3L = fRes3L, fResL + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 fB20 = fRes1L, f1, fB20 // -Clo - S(1/x)lo + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fRes2L = fRes2L, fRes5L // (lnSin4*DeltaX^2 + lnSin2)lo + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fPolL = fDxSqrL, fRes2H, fPolL + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fLnSin14 = fLnSin14, fDx4, fLnSin8 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fLnSin36 = fLnSin36, fDx8, f0 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // poly_lo = poly_lo * r + Q2 + fma.s1 FR_poly_lo = FR_poly_lo, FR_r, FR_Q2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_rcub = FR_rsq, FR_r, f0 // rcub = r^3 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // poly_hi = Q1 * rsq + r + fma.s1 FR_poly_hi = FR_Q1, FR_rsq, FR_r + nop.i 0 +} +{ .mfi + nop.m 0 + fsub.s1 fB12 = fRes4H, fB14 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // (-|x|*(ln(|x|)-1) - 0.5ln(|x|))lo + fadd.s1 fRes4L = fRes4L, fRes3L + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 fBrnL = fBrnL, fB20 // (-C - S(1/x))lo + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // high part of log(|DeltaX|) = Y_hi = N * log2_hi + H + fma.s1 fLnDeltaH = fFloatNDx, FR_log2_hi, fHDx + nop.i 0 +} +{ .mfi + nop.m 0 + // h = N * log2_lo + h + fma.s1 fhDx = fFloatNDx, FR_log2_lo, fhDx + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fPolL = fRes2L, fDxSqr, fPolL + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fLnSin14 = fLnSin36, fDxSqr, fLnSin14 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // (-|x|*(ln(|x|)-1) - 0.5ln(|x|))lo + (- C - S(1/x))lo + fadd.s1 fBrnL = fBrnL, fRes4L + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 fB12 = fB12, fBrnH + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // poly_lo = poly_lo*r^3 + h + fma.s1 FR_poly_lo = FR_poly_lo, FR_rcub, fhDx + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 fRes1H = fLnDeltaH, f1, fPol//(-ln(|DeltaX|) + LnSin)hi + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fPolL = fDxSqrL, fRes2L, fPolL + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fLnSin36 = fLnSin14, fDx6, f0 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // (-|x|*(ln(|x|)-1) - 0.5ln(|x|) - C - S(1/x))lo + fadd.s1 fB12 = fB12, fBrnL + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // low part of log(|DeltaX|) = Y_lo = poly_hi + poly_lo + fadd.s1 fLnDeltaL= FR_poly_hi, FR_poly_lo + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 fRes1L = fLnDeltaH, fMOne, fRes1H + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fPolL = fPolL, fLnSin36 + nop.i 0 +} +{ .mfi + nop.m 0 + //(-|x|*(ln(|x|)-1)-0.5ln(|x|) - C - S(1/x))hi + (-ln(|DeltaX|) + LnSin)hi + fadd.s1 f8 = fRes1H, fB14 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + //max((-|x|*(ln(|x|)-1)-0.5ln(|x|) - C - S(1/x))hi, + // (-ln(|DeltaX|) + LnSin)hi) + famax.s1 fMaxNegStir = fRes1H, fB14 + nop.i 0 +} +{ .mfi + nop.m 0 + //min((-|x|*(ln(|x|)-1)-0.5ln(|x|) - C - S(1/x))hi, + // (-ln(|DeltaX|) + LnSin)hi) + famin.s1 fMinNegStir = fRes1H, fB14 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fRes1L = fRes1L, fPol + nop.i 0 +} +{ .mfi + nop.m 0 + // (-ln(|DeltaX|))lo + (LnSin)lo + fnma.s1 fPolL = fLnDeltaL, f1, fPolL + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fsub.s1 f9 = fMaxNegStir, f8 // delta1 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fRes1L = fRes1L, fPolL // (-ln(|DeltaX|) + LnSin)lo + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 f9 = f9, fMinNegStir + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fRes1L = fRes1L, fB12 + nop.i 0 +} +;; +{ .mfi + // low part of the result + fadd.s1 f9 = f9, fRes1L + nop.i 0 +} +;; +{ .mfb + nop.m 0 + // final result for -2^63 < x < -6.0 path + fma.s0 f8 = f8, f1, f9 + // exit here for -2^63 < x < -6.0 path + br.ret.sptk b0 +} +;; + +// here if x falls in neighbourhood of any negative root +// "neighbourhood" typically means that |lgammal(x)| < 0.17 +// on the [-3.0,-2.0] range |lgammal(x)| has even less +// magnitude +// rXint contains index of the root +// p10 is set if root belongs to "right" ones +// p11 is set if root belongs to "left" ones +// lgammal(x) is approximated by polynomial of +// 19th degree from (x - root) argument +.align 32 +_negRoots: +{ .mfi + addl rPolDataPtr= @ltoff(lgammal_right_roots_polynomial_data),gp + nop.f 0 + shl rTmpPtr2 = rXint, 7 // (i*16)*8 +} +{ .mfi + adds rRootsAddr = -288, rRootsBndAddr + nop.f 0 + nop.i 0 +} +;; +{ .mfi + ldfe fRoot = [rRootsAddr] // FP representation of root + nop.f 0 + shl rTmpPtr = rXint, 6 // (i*16)*4 +} +{ .mfi +(p11) adds rTmpPtr2 = 3536, rTmpPtr2 + nop.f 0 + nop.i 0 +} +;; +{ .mfi + ld8 rPolDataPtr = [rPolDataPtr] + nop.f 0 + shladd rTmpPtr = rXint, 4, rTmpPtr // (i*16) + (i*16)*4 +} +{ .mfi + adds rTmpPtr3 = 32, rTmpPtr2 + nop.f 0 + nop.i 0 +} +;; +.pred.rel "mutex",p10,p11 +{ .mfi + add rTmpPtr3 = rTmpPtr, rTmpPtr3 + nop.f 0 +(p10) cmp.eq p8, p9 = rXRnd, r0 +} +{ .mfi + // (i*16) + (i*16)*4 + (i*16)*8 + add rTmpPtr = rTmpPtr, rTmpPtr2 + nop.f 0 +(p11) cmp.eq p9, p8 = rXRnd, r0 +} +;; +{ .mfi + add rTmpPtr2 = rPolDataPtr, rTmpPtr3 + nop.f 0 + nop.i 0 +} +{ .mfi + add rPolDataPtr = rPolDataPtr, rTmpPtr // begin + offsett + nop.f 0 + nop.i 0 +} +;; +{ .mfi + ldfpd fA0, fA0L = [rPolDataPtr], 16 // A0 + nop.f 0 + adds rTmpPtr = 112, rTmpPtr2 +} +{ .mfi + ldfpd fA2, fA2L = [rTmpPtr2], 16 // A2 + nop.f 0 + cmp.eq p12, p13 = 4, rSgnGamSize +} +;; +{ .mfi + ldfpd fA1, fA1L = [rPolDataPtr], 16 // A1 + nop.f 0 + nop.i 0 +} +{ .mfi + ldfe fA3 = [rTmpPtr2], 128 // A4 + nop.f 0 + nop.i 0 +} +;; +{ .mfi + ldfpd fA12, fA13 = [rTmpPtr], 16 // A12, A13 + nop.f 0 + adds rTmpPtr3 = 64, rPolDataPtr +} +{ .mfi + ldfpd fA16, fA17 = [rTmpPtr2], 16 // A16, A17 + nop.f 0 + adds rPolDataPtr = 32, rPolDataPtr +} +;; +.pred.rel "mutex",p8,p9 +{ .mfi + ldfpd fA14, fA15 = [rTmpPtr], 16 // A14, A15 + nop.f 0 + // sign of GAMMA(x) is negative +(p8) adds rSgnGam = -1, r0 +} +{ .mfi + ldfpd fA18, fA19 = [rTmpPtr2], 16 // A18, A19 + nop.f 0 + // sign of GAMMA(x) is positive +(p9) adds rSgnGam = 1, r0 +} +;; +{ .mfi + ldfe fA4 = [rPolDataPtr], 16 // A4 + nop.f 0 + nop.i 0 +} +{ .mfi + ldfpd fA6, fA7 = [rTmpPtr3], 16 // A6, A7 + nop.f 0 + nop.i 0 +} +;; +{ .mfi + ldfe fA5 = [rPolDataPtr], 16 // A5 + // if x equals to (rounded) root exactly + fcmp.eq.s1 p6, p0 = f8, fRoot + nop.i 0 +} +{ .mfi + ldfpd fA8, fA9 = [rTmpPtr3], 16 // A8, A9 + fms.s1 FR_FracX = f8, f1, fRoot + nop.i 0 +} +;; +{ .mfi + // store signgam if size of variable is 4 bytes +(p12) st4 [rSgnGamAddr] = rSgnGam + nop.f 0 + nop.i 0 +} +{ .mfb + // store signgam if size of variable is 8 bytes +(p13) st8 [rSgnGamAddr] = rSgnGam + // answer if x equals to (rounded) root exactly +(p6) fadd.s0 f8 = fA0, fA0L + // exit if x equals to (rounded) root exactly +(p6) br.ret.spnt b0 +} +;; +{ .mmf + ldfpd fA10, fA11 = [rTmpPtr3], 16 // A10, A11 + nop.m 0 + nop.f 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fResH = fA2, FR_FracX, f0 // (A2*x)hi + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA4L = FR_FracX, FR_FracX, f0 // x^2 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA17 = fA17, FR_FracX, fA16 + nop.i 0 +} +{.mfi + nop.m 0 + fma.s1 fA13 = fA13, FR_FracX, fA12 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA19 = fA19, FR_FracX, fA18 + nop.i 0 +} +{.mfi + nop.m 0 + fma.s1 fA15 = fA15, FR_FracX, fA14 + nop.i 0 +} +;; +{.mfi + nop.m 0 + fma.s1 fPol = fA7, FR_FracX, fA6 + nop.i 0 +} +;; +{.mfi + nop.m 0 + fma.s1 fA9 = fA9, FR_FracX, fA8 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fms.s1 fResL = fA2, FR_FracX, fResH // delta(A2*x) + nop.i 0 +} +{.mfi + nop.m 0 + fadd.s1 fRes1H = fResH, fA1 // (A2*x + A1)hi + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA11 = fA11, FR_FracX, fA10 + nop.i 0 +} +{.mfi + nop.m 0 + fma.s1 fA5L = fA4L, fA4L, f0 // x^4 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA19 = fA19, fA4L, fA17 + nop.i 0 +} +{.mfi + nop.m 0 + fma.s1 fA15 = fA15, fA4L, fA13 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fPol = fPol, FR_FracX, fA5 + nop.i 0 +} +{.mfi + nop.m 0 + fma.s1 fA3L = fA4L, FR_FracX, f0 // x^3 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // delta(A2*x) + A2L*x = (A2*x)lo + fma.s1 fResL = fA2L, FR_FracX, fResL + nop.i 0 +} +{.mfi + nop.m 0 + fsub.s1 fRes1L = fA1, fRes1H + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA11 = fA11, fA4L, fA9 + nop.i 0 +} +{.mfi + nop.m 0 + fma.s1 fA19 = fA19, fA5L, fA15 + nop.i 0 +} +;; +{.mfi + nop.m 0 + fma.s1 fPol = fPol, FR_FracX, fA4 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fResL = fResL, fA1L // (A2*x)lo + A1 + nop.i 0 +} +{.mfi + nop.m 0 + fadd.s1 fRes1L = fRes1L, fResH + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fRes2H = fRes1H, FR_FracX, f0 // ((A2*x + A1)*x)hi + nop.i 0 +} +;; +{.mfi + nop.m 0 + fma.s1 fA19 = fA19, fA5L, fA11 + nop.i 0 +} +;; +{.mfi + nop.m 0 + fma.s1 fPol = fPol, FR_FracX, fA3 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fRes1L = fRes1L, fResL // (A2*x + A1)lo + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // delta((A2*x + A1)*x) + fms.s1 fRes2L = fRes1H, FR_FracX, fRes2H + nop.i 0 +} +{.mfi + nop.m 0 + fadd.s1 fRes3H = fRes2H, fA0 // ((A2*x + A1)*x + A0)hi + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA19 = fA19, fA5L, f0 + nop.i 0 +} + +;; +{ .mfi + nop.m 0 + fma.s1 fRes2L = fRes1L, FR_FracX, fRes2L // ((A2*x + A1)*x)lo + nop.i 0 +} +{.mfi + nop.m 0 + fsub.s1 fRes3L = fRes2H, fRes3H + nop.i 0 +} +;; +{.mfi + nop.m 0 + fma.s1 fPol = fA19, FR_FracX, fPol + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fRes3L = fRes3L, fA0 + nop.i 0 +} +{.mfi + nop.m 0 + fadd.s1 fRes2L = fRes2L, fA0L // ((A2*x + A1)*x)lo + A0L + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fRes3L = fRes3L, fRes2L // (((A2*x + A1)*x) + A0)lo + nop.i 0 +} +;; +{.mfi + nop.m 0 + fma.s1 fRes3L = fPol, fA3L, fRes3L + nop.i 0 +} +;; +{ .mfb + nop.m 0 + // final result for arguments which are close to negative roots + fma.s0 f8 = fRes3H, f1, fRes3L + // exit here for arguments which are close to negative roots + br.ret.sptk b0 +} +;; + +// here if |x| < 0.5 +.align 32 +lgammal_0_half: +{ .mfi + ld4 GR_Z_1 = [rZ1offsett] // Load Z_1 + fma.s1 fA4L = f8, f8, f0 // x^2 + addl rPolDataPtr = @ltoff(lgammal_0_Half_data), gp +} +{ .mfi + shladd GR_ad_tbl_1 = GR_Index1, 4, rTbl1Addr// Point to G_1 + nop.f 0 + addl rLnSinDataPtr = @ltoff(lgammal_lnsin_data), gp +} +;; +{ .mfi + ldfps FR_G, FR_H = [GR_ad_tbl_1],8 // Load G_1, H_1 + nop.f 0 + // Point to Constants_Z_2 + add GR_ad_z_2 = 0x140, GR_ad_z_1 +} +{ .mfi + add GR_ad_q = -0x60, GR_ad_z_1 // Point to Constants_Q + nop.f 0 + // Point to Constants_G_H_h2 + add GR_ad_tbl_2 = 0x180, GR_ad_z_1 +} +;; +{ .mfi + ld8 rPolDataPtr = [rPolDataPtr] + nop.f 0 + // Point to Constants_G_H_h3 + add GR_ad_tbl_3 = 0x280, GR_ad_z_1 +} +{ .mfi + ldfd FR_h = [GR_ad_tbl_1] // Load h_1 + nop.f 0 + sub GR_N = rExpX, rExpHalf, 1 +} +;; +{ .mfi + ld8 rLnSinDataPtr = [rLnSinDataPtr] + nop.f 0 + // Get bits 30-15 of X_0 * Z_1 + pmpyshr2.u GR_X_1 = GR_X_0,GR_Z_1,15 +} +{ .mfi + ldfe FR_log2_hi = [GR_ad_q],16 // Load log2_hi + nop.f 0 + sub GR_N = r0, GR_N +} +;; +// +// For performance, don't use result of pmpyshr2.u for 4 cycles. +// +{ .mfi + ldfe FR_log2_lo = [GR_ad_q], 16 // Load log2_lo + nop.f 0 + add rTmpPtr2 = 320, rPolDataPtr +} +{ .mfi + add rTmpPtr = 32, rPolDataPtr + nop.f 0 + // exponent of 0.25 + adds rExp2 = -1, rExpHalf +} +;; +{ .mfi + ldfpd fA3, fA3L = [rPolDataPtr], 16 // A3 + fma.s1 fA5L = fA4L, fA4L, f0 // x^4 + nop.i 0 +} +{ .mfi + ldfpd fA1, fA1L = [rTmpPtr], 16 // A1 + fms.s1 fB8 = f8, f8, fA4L // x^2 - + // set p6 if -0.5 < x <= -0.25 +(p15) cmp.eq.unc p6, p0 = rExpX, rExp2 +} +;; +{ .mfi + ldfpd fA2, fA2L = [rPolDataPtr], 16 // A2 + nop.f 0 + // set p6 if -0.5 < x <= -0.40625 +(p6) cmp.le.unc p6, p0 = 10, GR_Index1 +} +{ .mfi + ldfe fA21 = [rTmpPtr2], -16 // A21 + // Put integer N into rightmost significand + nop.f 0 + adds rTmpPtr = 240, rTmpPtr +} +;; +{ .mfi + setf.sig fFloatN = GR_N + nop.f 0 + extr.u GR_Index2 = GR_X_1, 6, 4 // Extract bits 6-9 of X_1 +} +{ .mfi + ldfe FR_Q4 = [GR_ad_q], 16 // Load Q4 + nop.f 0 + adds rPolDataPtr = 304, rPolDataPtr +} +;; +{ .mfi + ldfe fA20 = [rTmpPtr2], -32 // A20 + nop.f 0 + shladd GR_ad_z_2 = GR_Index2, 2, GR_ad_z_2 // Point to Z_2 +} +{ .mfi + ldfe fA19 = [rTmpPtr], -32 // A19 + nop.f 0 + shladd GR_ad_tbl_2 = GR_Index2, 4, GR_ad_tbl_2// Point to G_2 +} +;; +{ .mfi + ldfe fA17 = [rTmpPtr], -32 // A17 + nop.f 0 + adds rTmpPtr3 = 8, GR_ad_tbl_2 +} +{ .mfb + ldfe fA18 = [rTmpPtr2], -32 // A18 + nop.f 0 + // branch to special path for -0.5 < x <= 0.40625 +(p6) br.cond.spnt lgammal_near_neg_half +} +;; +{ .mmf + ld4 GR_Z_2 = [GR_ad_z_2] // Load Z_2 + ldfe fA15 = [rTmpPtr], -32 // A15 + fma.s1 fB20 = fA5L, fA5L, f0 // x^8 +} +;; +{ .mmf + ldfe fA16 = [rTmpPtr2], -32 // A16 + ldfe fA13 = [rTmpPtr], -32 // A13 + fms.s1 fB16 = fA4L, fA4L, fA5L +} +;; +{ .mmf + ldfps FR_G2, FR_H2 = [GR_ad_tbl_2], 8 // Load G_2, H_2 + ldfd FR_h2 = [rTmpPtr3] // Load h_2 + fmerge.s fB10 = f8, fA5L // sign(x) * x^4 +} +;; +{ .mmi + ldfe fA14 = [rTmpPtr2], -32 // A14 + ldfe fA11 = [rTmpPtr], -32 // A11 + // Get bits 30-15 of X_1 * Z_2 + pmpyshr2.u GR_X_2 = GR_X_1,GR_Z_2,15 +} +;; +// +// For performance, don't use result of pmpyshr2.u for 4 cycles. +// +{ .mfi + ldfe fA12 = [rTmpPtr2], -32 // A12 + fma.s1 fRes4H = fA3, fAbsX, f0 + adds rTmpPtr3 = 16, GR_ad_q +} +{ .mfi + ldfe fA9 = [rTmpPtr], -32 // A9 + nop.f 0 + nop.i 0 +} +;; +{ .mmf + ldfe fA10 = [rTmpPtr2], -32 // A10 + ldfe fA7 = [rTmpPtr], -32 // A7 + fma.s1 fB18 = fB20, fB20, f0 // x^16 +} +;; +{ .mmf + ldfe fA8 = [rTmpPtr2], -32 // A8 + ldfe fA22 = [rPolDataPtr], 16 // A22 + fcvt.xf fFloatN = fFloatN +} +;; +{ .mfi + ldfe fA5 = [rTmpPtr], -32 // A5 + fma.s1 fA21 = fA21, fAbsX, fA20 // v16 + extr.u GR_Index3 = GR_X_2, 1, 5 // Extract bits 1-5 of X_2 +} +{ .mfi + ldfe fA6 = [rTmpPtr2], -32 // A6 + nop.f 0 + nop.i 0 +} +;; +{ .mmf + // Point to G_3 + shladd GR_ad_tbl_3 = GR_Index3, 4, GR_ad_tbl_3 + ldfe fA4 = [rTmpPtr2], -32 // A4 + fma.s1 fA19 = fA19, fAbsX, fA18 // v13 +} +;; +.pred.rel "mutex",p14,p15 +{ .mfi + ldfps FR_G3, FR_H3 = [GR_ad_tbl_3],8 // Load G_3, H_3 + fms.s1 fRes4L = fA3, fAbsX, fRes4H +(p14) adds rSgnGam = 1, r0 +} +{ .mfi + cmp.eq p6, p7 = 4, rSgnGamSize + fadd.s1 fRes2H = fRes4H, fA2 +(p15) adds rSgnGam = -1, r0 +} +;; + +{ .mfi + ldfd FR_h3 = [GR_ad_tbl_3] // Load h_3 + fma.s1 fA17 = fA17, fAbsX, fA16 // v12 + nop.i 0 +} +;; +{ .mfi + ldfe FR_Q3 = [GR_ad_q], 32 // Load Q3 + fmpy.s1 FR_G = FR_G, FR_G2 // G = G_1 * G_2 + nop.i 0 +} +{ .mfi + ldfe FR_Q2 = [rTmpPtr3], 16 // Load Q2 + fadd.s1 FR_H = FR_H, FR_H2 // H = H_1 + H_2 + nop.i 0 +} +;; +{ .mfi + ldfe FR_Q1 = [GR_ad_q] // Load Q1 + fma.s1 fA15 = fA15, fAbsX, fA14 // v8 + nop.i 0 +} +{ .mfi + adds rTmpPtr3 = 32, rLnSinDataPtr + fadd.s1 FR_h = FR_h, FR_h2 // h = h_1 + h_2 + nop.i 0 +} +;; +{ .mmf + ldfpd fLnSin2, fLnSin2L = [rLnSinDataPtr], 16 + ldfe fLnSin6 = [rTmpPtr3], 32 + fma.s1 fA13 = fA13, fAbsX, fA12 // v7 + +} +;; +{ .mfi + ldfe fLnSin4 = [rLnSinDataPtr], 32 + fma.s1 fRes4L = fA3L, fAbsX, fRes4L + nop.i 0 +} +{ .mfi + ldfe fLnSin10 = [rTmpPtr3], 32 + fsub.s1 fRes2L = fA2, fRes2H + nop.i 0 +} +;; +{ .mfi + ldfe fLnSin8 = [rLnSinDataPtr], 32 + fma.s1 fResH = fRes2H, fAbsX, f0 + nop.i 0 +} +{ .mfi + ldfe fLnSin14 = [rTmpPtr3], 32 + fma.s1 fA22 = fA22, fA4L, fA21 // v15 + nop.i 0 +} +;; +{ .mfi + ldfe fLnSin12 = [rLnSinDataPtr], 32 + fma.s1 fA9 = fA9, fAbsX, fA8 // v4 + nop.i 0 +} +{ .mfi + ldfd fLnSin18 = [rTmpPtr3], 16 + fma.s1 fA11 = fA11, fAbsX, fA10 // v5 + nop.i 0 +} +;; +{ .mfi + ldfe fLnSin16 = [rLnSinDataPtr], 24 + fma.s1 fA19 = fA19, fA4L, fA17 // v11 + nop.i 0 +} +{ .mfi + ldfd fLnSin22 = [rTmpPtr3], 16 + fma.s1 fPolL = fA7, fAbsX, fA6 + nop.i 0 +} +;; +{ .mfi + ldfd fLnSin20 = [rLnSinDataPtr], 16 + fmpy.s1 FR_G = FR_G, FR_G3 // G = (G_1 * G_2) * G_3 + nop.i 0 +} +{ .mfi + ldfd fLnSin26 = [rTmpPtr3], 16 + fadd.s1 FR_H = FR_H, FR_H3 // H = (H_1 + H_2) + H_3 + nop.i 0 +} +;; +{ .mfi + ldfd fLnSin24 = [rLnSinDataPtr], 16 + fadd.s1 fRes2L = fRes2L, fRes4H + nop.i 0 +} +{ .mfi + ldfd fLnSin30 = [rTmpPtr3], 16 + fadd.s1 fA2L = fA2L, fRes4L + nop.i 0 +} +;; +{ .mfi + ldfd fLnSin28 = [rLnSinDataPtr], 16 + fms.s1 fResL = fRes2H, fAbsX, fResH + nop.i 0 +} +{ .mfi + ldfd fLnSin34 = [rTmpPtr3], 8 + fadd.s1 fRes2H = fResH, fA1 + nop.i 0 +} +;; +{ .mfi + ldfd fLnSin32 = [rLnSinDataPtr] + fma.s1 fA11 = fA11, fA4L, fA9 // v3 + nop.i 0 +} +{ .mfi + ldfd fLnSin36 = [rTmpPtr3] + fma.s1 fA15 = fA15, fA4L, fA13 // v6 + nop.i 0 +} +;; + +{ .mfi + // store signgam if size of variable is 4 bytes +(p6) st4 [rSgnGamAddr] = rSgnGam + fadd.s1 FR_h = FR_h, FR_h3 // h = (h_1 + h_2) + h_3 + nop.i 0 +} +{ .mfi + // store signgam if size of variable is 8 bytes +(p7) st8 [rSgnGamAddr] = rSgnGam + fma.s1 fA5 = fA5, fAbsX, fA4 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fms.s1 FR_r = FR_G, fSignifX, f1 // r = G * S_hi - 1 + nop.i 0 +} +{ .mfi + nop.m 0 + // High part of the log(|x|): Y_hi = N * log2_hi + H + fms.s1 FR_log2_hi = fFloatN, FR_log2_hi, FR_H + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fA3L = fRes2L, fA2L + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA22 = fA22, fA5L, fA19 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fsub.s1 fRes2L = fA1, fRes2H + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fRes3H = fRes2H, f8, f0 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA15 = fA15, fA5L, fA11 // v2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fLnSin18 = fLnSin18, fA4L, fLnSin16 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // h = N * log2_lo + h + fms.s1 FR_h = fFloatN, FR_log2_lo, FR_h + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fPolL = fPolL, fA4L, fA5 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // poly_lo = r * Q4 + Q3 + fma.s1 FR_poly_lo = FR_r, FR_Q4, FR_Q3 + nop.i 0 +} +{ .mfi + nop.m 0 + fmpy.s1 FR_rsq = FR_r, FR_r // rsq = r * r + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fResL = fA3L, fAbsX, fResL + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fLnSin30 = fLnSin30, fA4L, fLnSin28 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fRes2L = fRes2L, fResH + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 fRes3L = fRes2H, f8, fRes3H + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fRes1H = fRes3H, FR_log2_hi + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fPol = fB20, fA22, fA15 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fLnSin34 = fLnSin34, fA4L, fLnSin32 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fLnSin14 = fLnSin14, fA4L, fLnSin12 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + // poly_lo = poly_lo * r + Q2 + fma.s1 FR_poly_lo = FR_poly_lo, FR_r, FR_Q2 + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 FR_rcub = FR_rsq, FR_r, f0 // rcub = r^3 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // poly_hi = Q1 * rsq + r + fma.s1 FR_poly_hi = FR_Q1, FR_rsq, FR_r + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 fA1L = fA1L, fResL + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fLnSin22 = fLnSin22, fA4L, fLnSin20 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fLnSin26 = fLnSin26, fA4L, fLnSin24 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fsub.s1 fRes1L = FR_log2_hi, fRes1H + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fPol = fPol, fA5L, fPolL + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fLnSin34 = fLnSin36, fA5L, fLnSin34 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fLnSin18 = fLnSin18, fA5L, fLnSin14 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fLnSin6 = fLnSin6, fA4L, fLnSin4 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fLnSin10 = fLnSin10, fA4L, fLnSin8 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // poly_hi = Q1 * rsq + r + fma.s1 FR_poly_hi = FR_Q1, FR_rsq, FR_r + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 fRes2L = fRes2L, fA1L + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // poly_lo = poly_lo*r^3 + h + fma.s1 FR_poly_lo = FR_poly_lo, FR_rcub, FR_h + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fB2 = fLnSin2, fA4L, f0 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fRes1L = fRes1L, fRes3H + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fPol = fPol, fB10, f0 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fLnSin26 = fLnSin26, fA5L, fLnSin22 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fLnSin34 = fLnSin34, fA5L, fLnSin30 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fLnSin10 = fLnSin10, fA5L, fLnSin6 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fLnSin2L = fLnSin2L, fA4L, f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fRes3L = fRes2L, f8, fRes3L + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // Y_lo = poly_hi + poly_lo + fsub.s1 FR_log2_lo = FR_poly_lo, FR_poly_hi + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 fB4 = fLnSin2, fA4L, fB2 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fRes2H = fRes1H, fPol + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fLnSin34 = fLnSin34, fB20, fLnSin26 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fLnSin18 = fLnSin18, fB20, fLnSin10 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fLnSin2L = fB8, fLnSin2, fLnSin2L + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fadd.s1 FR_log2_lo = FR_log2_lo, fRes3L + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fsub.s1 fRes2L = fRes1H, fRes2H + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fB6 = fLnSin34, fB18, fLnSin18 + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 fB4 = fLnSin2L, fB4 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fadd.s1 fRes1L = fRes1L, FR_log2_lo + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fRes2L = fRes2L, fPol + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fB12 = fB6, fA5L, f0 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fRes2L = fRes2L, fRes1L + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fms.s1 fB14 = fB6, fA5L, fB12 + nop.i 0 +} +{ .mfb + nop.m 0 + fadd.s1 fLnSin30 = fB2, fB12 + // branch out if x is negative +(p15) br.cond.spnt _O_Half_neg +} +;; +{ .mfb + nop.m 0 + // sign(x)*Pol(|x|) - log(|x|) + fma.s0 f8 = fRes2H, f1, fRes2L + // it's an answer already for positive x + // exit if 0 < x < 0.5 + br.ret.sptk b0 +} +;; + +// here if x is negative and |x| < 0.5 +.align 32 +_O_Half_neg: +{ .mfi + nop.m 0 + fma.s1 fB14 = fB16, fB6, fB14 + nop.i 0 +} +{ .mfi + nop.m 0 + fsub.s1 fLnSin16 = fB2, fLnSin30 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fResH = fLnSin30, fRes2H + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fLnSin16 = fLnSin16, fB12 + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 fB4 = fB14, fB4 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fLnSin16 = fB4, fLnSin16 + nop.i 0 +} +{ .mfi + nop.m 0 + fsub.s1 fResL = fRes2H, fResH + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fResL = fResL, fLnSin30 + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 fLnSin16 = fLnSin16, fRes2L + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fResL = fResL, fLnSin16 + nop.i 0 +} +;; +{ .mfb + nop.m 0 + // final result for -0.5 < x < 0 + fma.s0 f8 = fResH, f1, fResL + // exit for -0.5 < x < 0 + br.ret.sptk b0 +} +;; + +// here if x >= 8.0 +// there are two computational paths: +// 1) For x >10.0 Stirling's formula is used +// 2) Polynomial approximation for 8.0 <= x <= 10.0 +.align 32 +lgammal_big_positive: +{ .mfi + addl rPolDataPtr = @ltoff(lgammal_data), gp + fmerge.se fSignifX = f1, f8 + // Get high 15 bits of significand + extr.u GR_X_0 = rSignifX, 49, 15 +} +{.mfi + shladd rZ1offsett = GR_Index1, 2, GR_ad_z_1 // Point to Z_1 + fnma.s1 fInvX = f8, fRcpX, f1 // start of 1st NR iteration + adds rSignif1andQ = 0x5, r0 +} +;; +{.mfi + ld4 GR_Z_1 = [rZ1offsett] // Load Z_1 + nop.f 0 + shl rSignif1andQ = rSignif1andQ, 61 // significand of 1.25 +} +{ .mfi + cmp.eq p8, p0 = rExpX, rExp8 // p8 = 1 if 8.0 <= x < 16 + nop.f 0 + adds rSgnGam = 1, r0 // gamma is positive at this range +} +;; +{ .mfi + shladd GR_ad_tbl_1 = GR_Index1, 4, rTbl1Addr// Point to G_1 + nop.f 0 + add GR_ad_q = -0x60, GR_ad_z_1 // Point to Constants_Q +} +{ .mlx + ld8 rPolDataPtr = [rPolDataPtr] + movl rDelta = 0x3FF2000000000000 +} +;; +{ .mfi + ldfps FR_G, FR_H = [GR_ad_tbl_1],8 // Load G_1, H_1 + nop.f 0 + add GR_ad_z_2 = 0x140, GR_ad_z_1 // Point to Constants_Z_2 +} +{ .mfi + // Point to Constants_G_H_h2 + add GR_ad_tbl_2 = 0x180, GR_ad_z_1 + nop.f 0 + // p8 = 1 if 8.0 <= x <= 10.0 +(p8) cmp.leu.unc p8, p0 = rSignifX, rSignif1andQ +} +;; +{ .mfi + ldfd FR_h = [GR_ad_tbl_1] // Load h_1 + nop.f 0 + // Get bits 30-15 of X_0 * Z_1 + pmpyshr2.u GR_X_1 = GR_X_0,GR_Z_1,15 +} +{ .mfb +(p8) setf.d FR_MHalf = rDelta + nop.f 0 +(p8) br.cond.spnt lgammal_8_10 // branch out if 8.0 <= x <= 10.0 +} +;; +// +// For performance, don't use result of pmpyshr2.u for 4 cycles. +// +{ .mfi + ldfe fA1 = [rPolDataPtr], 16 // Load overflow threshold + fma.s1 fRcpX = fInvX, fRcpX, fRcpX // end of 1st NR iteration + // Point to Constants_G_H_h3 + add GR_ad_tbl_3 = 0x280, GR_ad_z_1 +} +{ .mlx + nop.m 0 + movl rDelta = 0xBFE0000000000000 // -0.5 in DP +} +;; +{ .mfi + ldfe FR_log2_hi = [GR_ad_q],16 // Load log2_hi + nop.f 0 + sub GR_N = rExpX, rExpHalf, 1 // unbiased exponent of x +} +;; +{ .mfi + ldfe FR_log2_lo = [GR_ad_q],16 // Load log2_lo + nop.f 0 + nop.i 0 +} +{ .mfi + setf.d FR_MHalf = rDelta + nop.f 0 + nop.i 0 +} +;; +{ .mfi + // Put integer N into rightmost significand + setf.sig fFloatN = GR_N + nop.f 0 + extr.u GR_Index2 = GR_X_1, 6, 4 // Extract bits 6-9 of X_1 +} +{ .mfi + ldfe FR_Q4 = [GR_ad_q], 16 // Load Q4 + nop.f 0 + nop.i 0 +} +;; +{ .mfi + shladd GR_ad_z_2 = GR_Index2, 2, GR_ad_z_2 // Point to Z_2 + nop.f 0 + shladd GR_ad_tbl_2 = GR_Index2, 4, GR_ad_tbl_2// Point to G_2 +} +{ .mfi + ldfe FR_Q3 = [GR_ad_q], 16 // Load Q3 + nop.f 0 + nop.i 0 +} +;; +{ .mfi + ld4 GR_Z_2 = [GR_ad_z_2] // Load Z_2 + fnma.s1 fInvX = f8, fRcpX, f1 // start of 2nd NR iteration + nop.i 0 +} +;; +{ .mfi + ldfps FR_G2, FR_H2 = [GR_ad_tbl_2], 8 // Load G_2, H_2 + nop.f 0 + nop.i 0 +} +;; +{ .mfi + ldfd FR_h2 = [GR_ad_tbl_2] // Load h_2 + nop.f 0 + nop.i 0 +} +;; +{ .mfi + ldfe FR_Q2 = [GR_ad_q],16 // Load Q2 + nop.f 0 + // Get bits 30-15 of X_1 * Z_2 + pmpyshr2.u GR_X_2 = GR_X_1,GR_Z_2,15 +} +;; +// +// For performance, don't use result of pmpyshr2.u for 4 cycles. +// +{ .mfi + ldfe FR_Q1 = [GR_ad_q] // Load Q1 + fcmp.gt.s1 p7,p0 = f8, fA1 // check if x > overflow threshold + nop.i 0 +} +;; +{.mfi + ldfpd fA0, fA0L = [rPolDataPtr], 16 // Load two parts of C + fma.s1 fRcpX = fInvX, fRcpX, fRcpX // end of 2nd NR iteration + nop.i 0 +} +;; +{ .mfb + ldfpd fB2, fA1 = [rPolDataPtr], 16 + nop.f 0 +(p7) br.cond.spnt lgammal_overflow // branch if x > overflow threshold +} +;; +{.mfi + ldfe fB4 = [rPolDataPtr], 16 + fcvt.xf fFloatN = fFloatN + extr.u GR_Index3 = GR_X_2, 1, 5 // Extract bits 1-5 of X_2 +} +;; +{ .mfi + shladd GR_ad_tbl_3 = GR_Index3, 4, GR_ad_tbl_3// Point to G_3 + nop.f 0 + nop.i 0 +} +{ .mfi + ldfe fB6 = [rPolDataPtr], 16 + nop.f 0 + nop.i 0 +} +;; +{ .mfi + ldfps FR_G3, FR_H3 = [GR_ad_tbl_3], 8 // Load G_3, H_3 + nop.f 0 + nop.i 0 +} +;; +{ .mfi + ldfd FR_h3 = [GR_ad_tbl_3] // Load h_3 + fmpy.s1 FR_G = FR_G, FR_G2 // G = G_1 * G_2 + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 FR_H = FR_H, FR_H2 // H = H_1 + H_2 + nop.i 0 +} +;; + +{ .mfi + ldfe fB8 = [rPolDataPtr], 16 + fadd.s1 FR_h = FR_h, FR_h2 // h = h_1 + h_2 + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 fInvX = f8, fRcpX, f1 // start of 3rd NR iteration + nop.i 0 +} +;; +{ .mfi + ldfe fB10 = [rPolDataPtr], 16 + nop.f 0 + cmp.eq p6, p7 = 4, rSgnGamSize +} +;; +{ .mfi + ldfe fB12 = [rPolDataPtr], 16 + nop.f 0 + nop.i 0 +} +;; +{ .mfi + ldfe fB14 = [rPolDataPtr], 16 + nop.f 0 + nop.i 0 +} +;; + +{ .mfi + ldfe fB16 = [rPolDataPtr], 16 + // get double extended coefficients from two doubles + // two doubles are needed in Stitling's formula for negative x + fadd.s1 fB2 = fB2, fA1 + nop.i 0 +} +;; +{ .mfi + ldfe fB18 = [rPolDataPtr], 16 + fma.s1 fInvX = fInvX, fRcpX, fRcpX // end of 3rd NR iteration + nop.i 0 +} +;; +{ .mfi + ldfe fB20 = [rPolDataPtr], 16 + nop.f 0 + nop.i 0 +} +;; +{ .mfi + // store signgam if size of variable is 4 bytes +(p6) st4 [rSgnGamAddr] = rSgnGam + fmpy.s1 FR_G = FR_G, FR_G3 // G = (G_1 * G_2) * G_3 + nop.i 0 +} +{ .mfi + // store signgam if size of variable is 8 bytes +(p7) st8 [rSgnGamAddr] = rSgnGam + fadd.s1 FR_H = FR_H, FR_H3 // H = (H_1 + H_2) + H_3 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 FR_h = FR_h, FR_h3 // h = (h_1 + h_2) + h_3 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fRcpX = fInvX, fInvX, f0 // 1/x^2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA0L = fB2, fInvX, fA0L + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fms.s1 FR_r = fSignifX, FR_G, f1 // r = G * S_hi - 1 + nop.i 0 +} +{ .mfi + nop.m 0 + // High part of the log(x): Y_hi = N * log2_hi + H + fma.s1 fRes2H = fFloatN, FR_log2_hi, FR_H + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + // h = N * log2_lo + h + fma.s1 FR_h = fFloatN, FR_log2_lo, FR_h + nop.i 0 +} +{ .mfi + nop.m 0 + // High part of the log(x): Y_hi = N * log2_hi + H + fma.s1 fRes1H = fFloatN, FR_log2_hi, FR_H + nop.i 0 +} +;; +{.mfi + nop.m 0 + fma.s1 fPol = fB18, fRcpX, fB16 // v9 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA2L = fRcpX, fRcpX, f0 // v10 + nop.i 0 +} +;; +{.mfi + nop.m 0 + fma.s1 fA3 = fB6, fRcpX, fB4 // v3 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA4 = fB10, fRcpX, fB8 // v4 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fms.s1 fRes2H =fRes2H, f1, f1 // log_Hi(x) -1 + nop.i 0 +} +{ .mfi + nop.m 0 + // poly_lo = r * Q4 + Q3 + fma.s1 FR_poly_lo = FR_r, FR_Q4, FR_Q3 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fRes1H = fRes1H, FR_MHalf, f0 // -0.5*log_Hi(x) + nop.i 0 +} +{ .mfi + nop.m 0 + fmpy.s1 FR_rsq = FR_r, FR_r // rsq = r * r + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA7 = fB14, fRcpX, fB12 // v7 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA8 = fA2L, fB20, fPol // v8 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA2 = fA4, fA2L, fA3 // v2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA4L = fA2L, fA2L, f0 // v5 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fResH = fRes2H, f8, f0 // (x*(ln(x)-1))hi + nop.i 0 +} +{ .mfi + nop.m 0 + // poly_lo = poly_lo * r + Q2 + fma.s1 FR_poly_lo = FR_poly_lo, FR_r, FR_Q2 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 FR_rcub = FR_rsq, FR_r, f0 // rcub = r^3 + nop.i 0 +} +{ .mfi + nop.m 0 + // poly_hi = Q1 * rsq + r + fma.s1 FR_poly_hi = FR_Q1, FR_rsq, FR_r + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA11 = fRcpX, fInvX, f0 // 1/x^3 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA6 = fA8, fA2L, fA7 // v6 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fms.s1 fResL = fRes2H, f8, fResH // d(x*(ln(x)-1)) + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 fRes3H = fResH, fRes1H // (x*(ln(x)-1) -0.5ln(x))hi + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // poly_lo = poly_lo*r^3 + h + fma.s1 FR_poly_lo = FR_poly_lo, FR_rcub, FR_h + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fPol = fA4L, fA6, fA2 // v1 + nop.i 0 +} +{ .mfi + nop.m 0 + // raise inexact exception + fma.s0 FR_log2_lo = FR_log2_lo, FR_log2_lo, f0 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fRes4H = fRes3H, fA0 // (x*(ln(x)-1) -0.5ln(x))hi + Chi + nop.i 0 +} +{ .mfi + nop.m 0 + fsub.s1 fRes3L = fResH, fRes3H + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // Y_lo = poly_hi + poly_lo + fadd.s1 fRes2L = FR_poly_hi, FR_poly_lo + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fA0L = fPol, fA11, fA0L // S(1/x) + Clo + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fRes3L = fRes3L, fRes1H + nop.i 0 +} +{ .mfi + nop.m 0 + fsub.s1 fRes4L = fRes3H, fRes4H + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fResL = fRes2L, f8 , fResL // lo part of x*(ln(x)-1) + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // Clo + S(1/x) - 0.5*logLo(x) + fma.s1 fA0L = fRes2L, FR_MHalf, fA0L + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fRes4L = fRes4L, fA0 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // Clo + S(1/x) - 0.5*logLo(x) + (x*(ln(x)-1))lo + fadd.s1 fA0L = fA0L, fResL + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fRes4L = fRes4L, fRes3L + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fRes4L = fRes4L, fA0L + nop.i 0 +} +;; +{ .mfb + nop.m 0 + fma.s0 f8 = fRes4H, f1, fRes4L + // exit for x > 10.0 + br.ret.sptk b0 +} +;; +// here if 8.0 <= x <= 10.0 +// Result = P15(y), where y = x/8.0 - 1.5 +.align 32 +lgammal_8_10: +{ .mfi + addl rPolDataPtr = @ltoff(lgammal_8_10_data), gp + fms.s1 FR_FracX = fSignifX, f1, FR_MHalf // y = x/8.0 - 1.5 + cmp.eq p6, p7 = 4, rSgnGamSize +} +;; +{ .mfi + ld8 rLnSinDataPtr = [rPolDataPtr] + nop.f 0 + nop.i 0 +} +{ .mfi + ld8 rPolDataPtr = [rPolDataPtr] + nop.f 0 + nop.i 0 +} +;; +{ .mfi + adds rZ1offsett = 32, rLnSinDataPtr + nop.f 0 + nop.i 0 +} +{ .mfi + adds rLnSinDataPtr = 48, rLnSinDataPtr + nop.f 0 + nop.i 0 +} +;; +{ .mfi + ldfpd fA1, fA1L = [rPolDataPtr], 16 // A1 + nop.f 0 + nop.i 0 +} +{ .mfi + ldfe fA2 = [rZ1offsett], 32 // A5 + nop.f 0 + nop.i 0 +} +;; +{ .mfi + ldfpd fA0, fA0L = [rPolDataPtr], 16 // A0 + fma.s1 FR_rsq = FR_FracX, FR_FracX, f0 // y^2 + nop.i 0 +} +{ .mfi + ldfe fA3 = [rLnSinDataPtr],32 // A5 + nop.f 0 + nop.i 0 +} +;; +{ .mmf + ldfe fA4 = [rZ1offsett], 32 // A4 + ldfe fA5 = [rLnSinDataPtr], 32 // A5 + nop.f 0 +} +;; +{ .mmf + ldfe fA6 = [rZ1offsett], 32 // A6 + ldfe fA7 = [rLnSinDataPtr], 32 // A7 + nop.f 0 +} +;; +{ .mmf + ldfe fA8 = [rZ1offsett], 32 // A8 + ldfe fA9 = [rLnSinDataPtr], 32 // A9 + nop.f 0 +} +;; +{ .mmf + ldfe fA10 = [rZ1offsett], 32 // A10 + ldfe fA11 = [rLnSinDataPtr], 32 // A11 + nop.f 0 +} +;; +{ .mmf + ldfe fA12 = [rZ1offsett], 32 // A12 + ldfe fA13 = [rLnSinDataPtr], 32 // A13 + fma.s1 FR_Q4 = FR_rsq, FR_rsq, f0 // y^4 +} +;; +{ .mmf + ldfe fA14 = [rZ1offsett], 32 // A14 + ldfe fA15 = [rLnSinDataPtr], 32 // A15 + nop.f 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fRes1H = FR_FracX, fA1, f0 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA3 = fA3, FR_FracX, fA2 // v4 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA5 = fA5, FR_FracX, fA4 // v5 + nop.i 0 +} +;; +{ .mfi + // store sign of GAMMA(x) if size of variable is 4 bytes +(p6) st4 [rSgnGamAddr] = rSgnGam + fma.s1 fA3L = FR_Q4, FR_Q4, f0 // v9 = y^8 + nop.i 0 +} +{ .mfi + // store sign of GAMMA(x) if size of variable is 8 bytes +(p7) st8 [rSgnGamAddr] = rSgnGam + fma.s1 fA7 = fA7, FR_FracX, fA6 // v7 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA9 = fA9, FR_FracX, fA8 // v8 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fms.s1 fRes1L = FR_FracX, fA1, fRes1H + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA11 = fA11, FR_FracX, fA10 // v12 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA13 = fA13, FR_FracX, fA12 // v13 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fRes2H = fRes1H, f1, fA0 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA15 = fA15, FR_FracX, fA14 // v16 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA5 = fA5, FR_rsq, fA3 // v3 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA9 = fA9, FR_rsq, fA7 // v6 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fRes1L = FR_FracX, fA1L, fRes1L + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fms.s1 fRes2L = fA0, f1, fRes2H + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA13 = fA13, FR_rsq, fA11 // v11 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA9 = fA9, FR_Q4, fA5 // v2 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fRes1L = fRes1L, f1, fA0L + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fRes2L = fRes2L, f1, fRes1H + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA15 = fA15, FR_Q4, fA13 // v10 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fRes2L = fRes1L, f1, fRes2L + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fPol = fA3L, fA15, fA9 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 f8 = FR_rsq , fPol, fRes2H + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fPol = fPol, FR_rsq, f0 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fms.s1 fRes1L = fRes2H, f1, f8 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fRes1L = fRes1L, f1, fPol + nop.i 0 +} +;; +{.mfi + nop.m 0 + fma.s1 fRes1L = fRes1L, f1, fRes2L + nop.i 0 +} +;; +{ .mfb + nop.m 0 + fma.s0 f8 = f8, f1, fRes1L + // exit for 8.0 <= x <= 10.0 + br.ret.sptk b0 +} +;; + +// here if 4.0 <=x < 8.0 +.align 32 +lgammal_4_8: +{ .mfi + addl rPolDataPtr= @ltoff(lgammal_4_8_data),gp + fms.s1 FR_FracX = fSignifX, f1, FR_MHalf + adds rSgnGam = 1, r0 +} +;; +{ .mfi + ld8 rPolDataPtr = [rPolDataPtr] + nop.f 0 + nop.i 0 +} +;; + +{ .mfb + adds rTmpPtr = 160, rPolDataPtr + nop.f 0 + // branch to special path which computes polynomial of 25th degree + br.sptk lgamma_polynom25 +} +;; + +// here if 2.25 <=x < 4.0 +.align 32 +lgammal_2Q_4: +{ .mfi + addl rPolDataPtr= @ltoff(lgammal_2Q_4_data),gp + fms.s1 FR_FracX = fSignifX, f1, FR_MHalf + adds rSgnGam = 1, r0 +} +;; +{ .mfi + ld8 rPolDataPtr = [rPolDataPtr] + nop.f 0 + nop.i 0 +} +;; + +{ .mfb + adds rTmpPtr = 160, rPolDataPtr + nop.f 0 + // branch to special path which computes polynomial of 25th degree + br.sptk lgamma_polynom25 +} +;; + +// here if 0.5 <= |x| < 0.75 +.align 32 +lgammal_half_3Q: +.pred.rel "mutex", p14, p15 +{ .mfi +(p14) addl rPolDataPtr= @ltoff(lgammal_half_3Q_data),gp + // FR_FracX = x - 0.625 for positive x +(p14) fms.s1 FR_FracX = f8, f1, FR_FracX +(p14) adds rSgnGam = 1, r0 +} +{ .mfi +(p15) addl rPolDataPtr= @ltoff(lgammal_half_3Q_neg_data),gp + // FR_FracX = x + 0.625 for negative x +(p15) fma.s1 FR_FracX = f8, f1, FR_FracX +(p15) adds rSgnGam = -1, r0 +} +;; +{ .mfi + ld8 rPolDataPtr = [rPolDataPtr] + nop.f 0 + nop.i 0 +} +;; +{ .mfb + adds rTmpPtr = 160, rPolDataPtr + nop.f 0 + // branch to special path which computes polynomial of 25th degree + br.sptk lgamma_polynom25 +} +;; +// here if 1.3125 <= x < 1.5625 +.align 32 +lgammal_loc_min: +{ .mfi + adds rSgnGam = 1, r0 + nop.f 0 + nop.i 0 +} +{ .mfb + adds rTmpPtr = 160, rPolDataPtr + fms.s1 FR_FracX = f8, f1, fA5L + br.sptk lgamma_polynom25 +} +;; +// here if -2.605859375 <= x < -2.5 +// special polynomial approximation used since neither "near root" +// approximation nor reflection formula give satisfactory accuracy on +// this range +.align 32 +_neg2andHalf: +{ .mfi + addl rPolDataPtr= @ltoff(lgammal_neg2andHalf_data),gp + fma.s1 FR_FracX = fB20, f1, f8 // 2.5 + x + adds rSgnGam = -1, r0 +} +;; +{.mfi + ld8 rPolDataPtr = [rPolDataPtr] + nop.f 0 + nop.i 0 +} +;; +{ .mfb + adds rTmpPtr = 160, rPolDataPtr + nop.f 0 + // branch to special path which computes polynomial of 25th degree + br.sptk lgamma_polynom25 +} +;; + +// here if -0.5 < x <= -0.40625 +.align 32 +lgammal_near_neg_half: +{ .mmf + addl rPolDataPtr= @ltoff(lgammal_near_neg_half_data),gp + setf.exp FR_FracX = rExpHalf + nop.f 0 +} +;; +{ .mfi + ld8 rPolDataPtr = [rPolDataPtr] + nop.f 0 + adds rSgnGam = -1, r0 +} +;; +{ .mfb + adds rTmpPtr = 160, rPolDataPtr + fma.s1 FR_FracX = FR_FracX, f1, f8 + // branch to special path which computes polynomial of 25th degree + br.sptk lgamma_polynom25 +} +;; + +// here if there an answer is P25(x) +// rPolDataPtr, rTmpPtr point to coefficients +// x is in FR_FracX register +.align 32 +lgamma_polynom25: +{ .mfi + ldfpd fA3, fA0L = [rPolDataPtr], 16 // A3 + nop.f 0 + cmp.eq p6, p7 = 4, rSgnGamSize +} +{ .mfi + ldfpd fA18, fA19 = [rTmpPtr], 16 // D7, D6 + nop.f 0 + nop.i 0 +} +;; +{ .mfi + ldfpd fA1, fA1L = [rPolDataPtr], 16 // A1 + nop.f 0 + nop.i 0 +} +{ .mfi + ldfpd fA16, fA17 = [rTmpPtr], 16 // D4, D5 + nop.f 0 +} +;; +{ .mfi + ldfpd fA12, fA13 = [rPolDataPtr], 16 // D0, D1 + nop.f 0 + nop.i 0 +} +{ .mfi + ldfpd fA14, fA15 = [rTmpPtr], 16 // D2, D3 + nop.f 0 + nop.i 0 +} +;; +{ .mfi + ldfpd fA24, fA25 = [rPolDataPtr], 16 // C21, C20 + nop.f 0 + nop.i 0 +} +{ .mfi + ldfpd fA22, fA23 = [rTmpPtr], 16 // C19, C18 + nop.f 0 + nop.i 0 +} +;; +{ .mfi + ldfpd fA2, fA2L = [rPolDataPtr], 16 // A2 + fma.s1 fA4L = FR_FracX, FR_FracX, f0 // x^2 + nop.i 0 +} +{ .mfi + ldfpd fA20, fA21 = [rTmpPtr], 16 // C17, C16 + nop.f 0 + nop.i 0 +} +;; +{ .mfi + ldfe fA11 = [rTmpPtr], 16 // E7 + nop.f 0 + nop.i 0 +} +{ .mfi + ldfpd fA0, fA3L = [rPolDataPtr], 16 // A0 + nop.f 0 + nop.i 0 +};; +{ .mfi + ldfe fA10 = [rPolDataPtr], 16 // E6 + nop.f 0 + nop.i 0 +} +{ .mfi + ldfe fA9 = [rTmpPtr], 16 // E5 + nop.f 0 + nop.i 0 +} +;; +{ .mmf + ldfe fA8 = [rPolDataPtr], 16 // E4 + ldfe fA7 = [rTmpPtr], 16 // E3 + nop.f 0 +} +;; +{ .mmf + ldfe fA6 = [rPolDataPtr], 16 // E2 + ldfe fA5 = [rTmpPtr], 16 // E1 + nop.f 0 +} +;; +{ .mfi + ldfe fA4 = [rPolDataPtr], 16 // E0 + fma.s1 fA5L = fA4L, fA4L, f0 // x^4 + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 fB2 = FR_FracX, FR_FracX, fA4L // x^2 - + nop.i 0 +} +;; +{ .mfi + // store signgam if size of variable is 4 bytes +(p6) st4 [rSgnGamAddr] = rSgnGam + fma.s1 fRes4H = fA3, FR_FracX, f0 // (A3*x)hi + nop.i 0 +} +{ .mfi + // store signgam if size of variable is 8 bytes +(p7) st8 [rSgnGamAddr] = rSgnGam + fma.s1 fA19 = fA19, FR_FracX, fA18 // D7*x + D6 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fResH = fA1, FR_FracX, f0 // (A1*x)hi + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fB6 = fA1L, FR_FracX, fA0L // A1L*x + A0L + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA17 = fA17, FR_FracX, fA16 // D5*x + D4 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA15 = fA15, FR_FracX, fA14 // D3*x + D2 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA25 = fA25, FR_FracX, fA24 // C21*x + C20 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA13 = fA13, FR_FracX, fA12 // D1*x + D0 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA23 = fA23, FR_FracX, fA22 // C19*x + C18 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA21 = fA21, FR_FracX, fA20 // C17*x + C16 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fms.s1 fRes4L = fA3, FR_FracX, fRes4H // delta((A3*x)hi) + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 fRes2H = fRes4H, fA2 // (A3*x + A2)hi + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fms.s1 fResL = fA1, FR_FracX, fResH // d(A1*x) + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 fRes1H = fResH, fA0 // (A1*x + A0)hi + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA19 = fA19, fA4L, fA17 // Dhi + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA11 = fA11, FR_FracX, fA10 // E7*x + E6 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // Doing this to raise inexact flag + fma.s0 fA10 = fA0, fA0, f0 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA15 = fA15, fA4L, fA13 // Dlo + nop.i 0 +} +{ .mfi + nop.m 0 + // (C21*x + C20)*x^2 + C19*x + C18 + fma.s1 fA25 = fA25, fA4L, fA23 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA9 = fA9, FR_FracX, fA8 // E5*x + E4 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA7 = fA7, FR_FracX, fA6 // E3*x + E2 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fRes4L = fA3L, FR_FracX, fRes4L // (A3*x)lo + nop.i 0 +} +{ .mfi + nop.m 0 + fsub.s1 fRes2L = fA2, fRes2H + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fResL = fResL, fB6 // (A1L*x + A0L) + d(A1*x) + nop.i 0 +} +{ .mfi + nop.m 0 + fsub.s1 fRes1L = fA0, fRes1H + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA5 = fA5, FR_FracX, fA4 // E1*x + E0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fB8 = fA5L, fA5L, f0 // x^8 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // ((C21*x + C20)*x^2 + C19*x + C18)*x^2 + C17*x + C16 + fma.s1 fA25 = fA25, fA4L, fA21 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA19 = fA19, fA5L, fA15 // D + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA11 = fA11, fA4L, fA9 // Ehi + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fRes2L = fRes2L, fRes4H + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 fRes4L = fRes4L, fA2L // (A3*x)lo + A2L + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fRes3H = fRes2H, fA4L, f0 // ((A3*x + A2)*x^2)hi + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 fRes1L = fRes1L, fResH + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fRes3L = fRes2H, fB2, f0 // (A3*x + A2)hi*d(x^2) + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA7 = fA7, fA4L, fA5 // Elo + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA25 = fA25, fB8, fA19 // C*x^8 + D + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fRes2L = fRes2L, fRes4L // (A3*x + A2)lo + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fms.s1 fB4 = fRes2H, fA4L, fRes3H // d((A3*x + A2)*x^2)) + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 fRes1L = fRes1L, fResL // (A1*x + A0)lo + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fB20 = fRes3H, fRes1H // Phi + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA11 = fA11, fA5L, fA7 // E + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // ( (A3*x + A2)lo* + (A3*x + A2)hi*d(x^2)) + fma.s1 fRes3L = fRes2L, fA4L, fRes3L + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // d((A3*x + A2)*x^2)) + (A1*x + A0)lo + fadd.s1 fRes1L = fRes1L, fB4 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fsub.s1 fB18 = fRes1H, fB20 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fPol = fA25, fB8, fA11 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fRes1L = fRes1L, fRes3L + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fB18 = fB18, fRes3H + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fRes4H = fPol, fA5L, fB20 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fPolL = fPol, fA5L, f0 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fB18 = fB18, fRes1L // Plo + nop.i 0 +} +{ .mfi + nop.m 0 + fsub.s1 fRes4L = fB20, fRes4H + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fB18 = fB18, fPolL + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fRes4L = fRes4L, fB18 + nop.i 0 +} +;; +{ .mfb + nop.m 0 + fma.s0 f8 = fRes4H, f1, fRes4L + // P25(x) computed, exit here + br.ret.sptk b0 +} +;; + + +// here if 0.75 <= x < 1.3125 +.align 32 +lgammal_03Q_1Q: +{ .mfi + addl rPolDataPtr= @ltoff(lgammal_03Q_1Q_data),gp + fma.s1 FR_FracX = fA5L, f1, f0 // x + adds rSgnGam = 1, r0 +} +{ .mfi + nop.m 0 + fma.s1 fB4 = fA5L, fA5L, f0 // x^2 + nop.i 0 +} +;; +{ .mfi + ld8 rPolDataPtr = [rPolDataPtr] + nop.f 0 + nop.i 0 +} +;; +{ .mfb + adds rTmpPtr = 144, rPolDataPtr + nop.f 0 + br.sptk lgamma_polynom24x +} +;; + +// here if 1.5625 <= x < 2.25 +.align 32 +lgammal_13Q_2Q: +{ .mfi + addl rPolDataPtr= @ltoff(lgammal_13Q_2Q_data),gp + fma.s1 FR_FracX = fB4, f1, f0 // x + adds rSgnGam = 1, r0 +} +{ .mfi + nop.m 0 + fma.s1 fB4 = fB4, fB4, f0 // x^2 + nop.i 0 +} +;; +{ .mfi + ld8 rPolDataPtr = [rPolDataPtr] + nop.f 0 + nop.i 0 +} +;; +{ .mfb + adds rTmpPtr = 144, rPolDataPtr + nop.f 0 + br.sptk lgamma_polynom24x +} +;; + +// here if result is Pol24(x) +// x is in FR_FracX, +// rPolDataPtr, rTmpPtr point to coefficients +.align 32 +lgamma_polynom24x: +{ .mfi + ldfpd fA4, fA2L = [rPolDataPtr], 16 + nop.f 0 + cmp.eq p6, p7 = 4, rSgnGamSize +} +{ .mfi + ldfpd fA23, fA24 = [rTmpPtr], 16 // C18, C19 + nop.f 0 + nop.i 0 +} +;; +{ .mfi + ldfpd fA3, fA1L = [rPolDataPtr], 16 + fma.s1 fA5L = fB4, fB4, f0 // x^4 + nop.i 0 +} +{ .mfi + ldfpd fA19, fA20 = [rTmpPtr], 16 // D6, D7 + fms.s1 fB2 = FR_FracX, FR_FracX, fB4 // x^2 - + nop.i 0 +} +;; +{ .mmf + ldfpd fA15, fA16 = [rPolDataPtr], 16 // D2, D3 + ldfpd fA17, fA18 = [rTmpPtr], 16 // D4, D5 + nop.f 0 +} +;; +{ .mmf + ldfpd fA13, fA14 = [rPolDataPtr], 16 // D0, D1 + ldfpd fA12, fA21 = [rTmpPtr], 16 // E7, C16 + nop.f 0 +} +;; +{ .mfi + ldfe fA11 = [rPolDataPtr], 16 // E6 + nop.f 0 + nop.i 0 +} +{ .mfi + ldfe fA10 = [rTmpPtr], 16 // E5 + nop.f 0 + nop.i 0 +} +;; +{ .mfi + ldfpd fA2, fA4L = [rPolDataPtr], 16 + nop.f 0 + nop.i 0 +} +{ .mfi + ldfpd fA1, fA3L = [rTmpPtr], 16 + nop.f 0 + nop.i 0 +} +;; +{ .mfi + ldfpd fA22, fA25 = [rPolDataPtr], 16 // C17, C20 + fma.s1 fA0 = fA5L, fA5L, f0 // x^8 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA0L = fA5L, FR_FracX, f0 // x^5 + nop.i 0 +} +;; +{ .mmf + ldfe fA9 = [rPolDataPtr], 16 // E4 + ldfe fA8 = [rTmpPtr], 16 // E3 + nop.f 0 +} +;; +{ .mmf + ldfe fA7 = [rPolDataPtr], 16 // E2 + ldfe fA6 = [rTmpPtr], 16 // E1 + nop.f 0 +} +;; +{ .mfi + ldfe fA5 = [rTmpPtr], 16 // E0 + fma.s1 fRes4H = fA4, fB4, f0 // A4* + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fPol = fA24, FR_FracX, fA23 // C19*x + C18 + nop.i 0 +} +;; +{ .mfi + // store signgam if size of variable is 4 bytes +(p6) st4 [rSgnGamAddr] = rSgnGam + fma.s1 fRes1H = fA3, fB4, f0 // A3* + nop.i 0 +} +{ .mfi + // store signgam if size of variable is 8 bytes +(p7) st8 [rSgnGamAddr] = rSgnGam + fma.s1 fA1L = fA3, fB2,fA1L // A3*d(x^2) + A1L + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA20 = fA20, FR_FracX, fA19 // D7*x + D6 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA18 = fA18, FR_FracX, fA17 // D5*x + D4 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA16 = fA16, FR_FracX, fA15 // D3*x + D2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA14 = fA14, FR_FracX, fA13 // D1*x + D0 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA2L = fA4, fB2,fA2L // A4*d(x^2) + A2L + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA12 = fA12, FR_FracX, fA11 // E7*x + E6 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fms.s1 fRes2L = fA4, fB4, fRes4H // delta(A4*) + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 fRes2H = fRes4H, fA2 // A4* + A2 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fms.s1 fRes3L = fA3, fB4, fRes1H // delta(A3*) + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 fRes3H = fRes1H, fA1 // A3* + A1 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA20 = fA20, fB4, fA18 // (D7*x + D6)*x^2 + D5*x + D4 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA22 = fA22, FR_FracX, fA21 // C17*x + C16 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA16 = fA16, fB4, fA14 // (D3*x + D2)*x^2 + D1*x + D0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fPol = fA25, fB4, fPol // C20*x^2 + C19*x + C18 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA2L = fA4L, fB4, fA2L // A4L* + A4*d(x^2) + A2L + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA1L = fA3L, fB4, fA1L // A3L* + A3*d(x^2) + A1L + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fsub.s1 fRes4L = fA2, fRes2H // d1 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fResH = fRes2H, fB4, f0 // (A4* + A2)*x^2 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fsub.s1 fRes1L = fA1, fRes3H // d1 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fB6 = fRes3H, FR_FracX, f0 // (A3* + A1)*x + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA10 = fA10, FR_FracX, fA9 // E5*x + E4 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA8 = fA8, FR_FracX, fA7 // E3*x + E2 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // (C20*x^2 + C19*x + C18)*x^2 + C17*x + C16 + fma.s1 fPol = fPol, fB4, fA22 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA6 = fA6, FR_FracX, fA5 // E1*x + E0 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // A4L* + A4*d(x^2) + A2L + delta(A4*) + fadd.s1 fRes2L = fA2L, fRes2L + nop.i 0 +} +{ .mfi + nop.m 0 + // A3L* + A3*d(x^2) + A1L + delta(A3*) + fadd.s1 fRes3L = fA1L, fRes3L + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fRes4L = fRes4L, fRes4H // d2 + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 fResL = fRes2H, fB4, fResH // d(A4* + A2)*x^2) + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fRes1L = fRes1L, fRes1H // d2 + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 fB8 = fRes3H, FR_FracX, fB6 // d((A3* + A1)*x) + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fB10 = fResH, fB6 // (A4*x^4 + .. + A1*x)hi + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA12 = fA12, fB4, fA10 // Ehi + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // ((D7*x + D6)*x^2 + D5*x + D4)*x^4 + (D3*x + D2)*x^2 + D1*x + D0 + fma.s1 fA20 = fA20, fA5L, fA16 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA8 = fA8, fB4, fA6 // Elo + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fRes2L = fRes2L, fRes4L // (A4* + A2)lo + nop.i 0 +} +{ .mfi + nop.m 0 + // d(A4* + A2)*x^2) + A4* + A2)*d(x^2) + fma.s1 fResL = fRes2H, fB2, fResL + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fRes3L = fRes3L, fRes1L // (A4* + A2)lo + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fsub.s1 fB12 = fB6, fB10 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fPol = fPol, fA0, fA20 // PolC*x^8 + PolD + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fPolL = fA12, fA5L, fA8 // E + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fResL = fB4, fRes2L, fResL // ((A4* + A2)*x^2)lo + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fRes3L = fRes3L, FR_FracX, fB8 // ((A3* + A1)*x)lo + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fB12 = fB12, fResH + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fPol = fPol, fA0, fPolL + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fRes3L = fRes3L, fResL + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fRes2H = fPol, fA0L, fB10 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fRes3L = fB12, fRes3L + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fsub.s1 fRes4L = fB10, fRes2H + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fRes4L = fPol, fA0L, fRes4L + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fadd.s1 fRes4L = fRes4L, fRes3L + nop.i 0 +} +;; +{ .mfb + nop.m 0 + // final result for all paths for which the result is Pol24(x) + fma.s0 f8 = fRes2H, f1, fRes4L + // here is the exit for all paths for which the result is Pol24(x) + br.ret.sptk b0 +} +;; + + +// here if x is natval, nan, +/-inf, +/-0, or denormal +.align 32 +lgammal_spec: +{ .mfi + nop.m 0 + fclass.m p9, p0 = f8, 0xB // +/-denormals + nop.i 0 +};; +{ .mfi + nop.m 0 + fclass.m p6, p0 = f8, 0x1E1 // Test x for natval, nan, +inf + nop.i 0 +};; +{ .mfb + nop.m 0 + fclass.m p7, p0 = f8, 0x7 // +/-0 +(p9) br.cond.sptk lgammal_denormal_input +};; +{ .mfb + nop.m 0 + nop.f 0 + // branch out if x is natval, nan, +inf +(p6) br.cond.spnt lgammal_nan_pinf +};; +{ .mfb + nop.m 0 + nop.f 0 +(p7) br.cond.spnt lgammal_singularity +};; +// if we are still here then x = -inf +{ .mfi + cmp.eq p6, p7 = 4, rSgnGamSize + nop.f 0 + adds rSgnGam = 1, r0 +};; +{ .mfi + // store signgam if size of variable is 4 bytes +(p6) st4 [rSgnGamAddr] = rSgnGam + nop.f 0 + nop.i 0 +} +{ .mfb + // store signgam if size of variable is 8 bytes +(p7) st8 [rSgnGamAddr] = rSgnGam + fma.s0 f8 = f8,f8,f0 // return +inf, no call to error support + br.ret.spnt b0 +};; + +// here if x is NaN, NatVal or +INF +.align 32 +lgammal_nan_pinf: +{ .mfi + cmp.eq p6, p7 = 4, rSgnGamSize + nop.f 0 + adds rSgnGam = 1, r0 +} +;; +{ .mfi + // store signgam if size of variable is 4 bytes +(p6) st4 [rSgnGamAddr] = rSgnGam + fma.s0 f8 = f8,f1,f8 // return x+x if x is natval, nan, +inf + nop.i 0 +} +{ .mfb + // store signgam if size of variable is 8 bytes +(p7) st8 [rSgnGamAddr] = rSgnGam + nop.f 0 + br.ret.sptk b0 +} +;; + +// here if x denormal or unnormal +.align 32 +lgammal_denormal_input: +{ .mfi + nop.m 0 + fma.s0 fResH = f1, f1, f8 // raise denormal exception + nop.i 0 +} +{ .mfi + nop.m 0 + fnorm.s1 f8 = f8 // normalize input value + nop.i 0 +} +;; +{ .mfi + getf.sig rSignifX = f8 + fmerge.se fSignifX = f1, f8 + nop.i 0 +} +{ .mfi + getf.exp rSignExpX = f8 + fcvt.fx.s1 fXint = f8 // Convert arg to int (int repres. in FR) + nop.i 0 +} +;; +{ .mfi + getf.exp rSignExpX = f8 + fcmp.lt.s1 p15, p14 = f8, f0 + nop.i 0 +} +;; +{ .mfb + and rExpX = rSignExpX, r17Ones + fmerge.s fAbsX = f1, f8 // |x| + br.cond.sptk _deno_back_to_main_path +} +;; + + +// here if overflow (x > overflow_bound) +.align 32 +lgammal_overflow: +{ .mfi + addl r8 = 0x1FFFE, r0 + nop.f 0 + cmp.eq p6, p7 = 4, rSgnGamSize +} +{ .mfi + adds rSgnGam = 1, r0 + nop.f 0 + nop.i 0 +} +;; +{ .mfi + setf.exp f9 = r8 + fmerge.s FR_X = f8,f8 + mov GR_Parameter_TAG = 102 // overflow +};; +{ .mfi + // store signgam if size of variable is 4 bytes +(p6) st4 [rSgnGamAddr] = rSgnGam + nop.f 0 + nop.i 0 +} +{ .mfb + // store signgam if size of variable is 8 bytes +(p7) st8 [rSgnGamAddr] = rSgnGam + fma.s0 FR_RESULT = f9,f9,f0 // Set I,O and +INF result + br.cond.sptk __libm_error_region +};; + +// here if x is negative integer or +/-0 (SINGULARITY) +.align 32 +lgammal_singularity: +{ .mfi + adds rSgnGam = 1, r0 + fclass.m p8,p0 = f8,0x6 // is x -0? + mov GR_Parameter_TAG = 103 // negative +} +{ .mfi + cmp.eq p6, p7 = 4, rSgnGamSize + fma.s1 FR_X = f0,f0,f8 + nop.i 0 +};; +{ .mfi +(p8) sub rSgnGam = r0, rSgnGam + nop.f 0 + nop.i 0 +} +{ .mfi + nop.m 0 + nop.f 0 + nop.i 0 +};; +{ .mfi + // store signgam if size of variable is 4 bytes +(p6) st4 [rSgnGamAddr] = rSgnGam + nop.f 0 + nop.i 0 +} +{ .mfb + // store signgam if size of variable is 8 bytes +(p7) st8 [rSgnGamAddr] = rSgnGam + frcpa.s0 FR_RESULT, p0 = f1, f0 + br.cond.sptk __libm_error_region +};; + +GLOBAL_LIBM_END(__libm_lgammal) + + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfe [GR_Parameter_Y] = FR_Y,16 // Save Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; +.body +{ .mib + stfe [GR_Parameter_X] = FR_X // Store Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y + nop.b 0 // Parameter 3 address +} +{ .mib + stfe [GR_Parameter_Y] = FR_RESULT // Store Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 999 + nop.i 999 +};; +{ .mmi + ldfe f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region#) + +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/libm_reduce.S b/sysdeps/ia64/fpu/libm_reduce.S new file mode 100644 index 0000000000..8bdf91d6de --- /dev/null +++ b/sysdeps/ia64/fpu/libm_reduce.S @@ -0,0 +1,1578 @@ +.file "libm_reduce.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History: +// 02/02/00 Initial Version +// 05/13/02 Rescheduled for speed, changed interface to pass +// parameters in fp registers +// 02/10/03 Reordered header: .section, .global, .proc, .align; +// used data8 for long double data storage +// +//********************************************************************* +//********************************************************************* +// +// Function: __libm_pi_by_two_reduce(x) return r, c, and N where +// x = N * pi/4 + (r+c) , where |r+c| <= pi/4. +// This function is not designed to be used by the +// general user. +// +//********************************************************************* +// +// Accuracy: Returns double-precision values +// +//********************************************************************* +// +// Resources Used: +// +// Floating-Point Registers: +// f8 = Input x, return value r +// f9 = return value c +// f32-f70 +// +// General Purpose Registers: +// r8 = return value N +// r34-r64 +// +// Predicate Registers: p6-p14 +// +//********************************************************************* +// +// IEEE Special Conditions: +// +// No condions should be raised. +// +//********************************************************************* +// +// I. Introduction +// =============== +// +// For the forward trigonometric functions sin, cos, sincos, and +// tan, the original algorithms for IA 64 handle arguments up to +// 1 ulp less than 2^63 in magnitude. For double-extended arguments x, +// |x| >= 2^63, this routine returns N and r_hi, r_lo where +// +// x is accurately approximated by +// 2*K*pi + N * pi/2 + r_hi + r_lo, |r_hi+r_lo| <= pi/4. +// CASE = 1 or 2. +// CASE is 1 unless |r_hi + r_lo| < 2^(-33). +// +// The exact value of K is not determined, but that information is +// not required in trigonometric function computations. +// +// We first assume the argument x in question satisfies x >= 2^(63). +// In particular, it is positive. Negative x can be handled by symmetry: +// +// -x is accurately approximated by +// -2*K*pi + (-N) * pi/2 - (r_hi + r_lo), |r_hi+r_lo| <= pi/4. +// +// The idea of the reduction is that +// +// x * 2/pi = N_big + N + f, |f| <= 1/2 +// +// Moreover, for double extended x, |f| >= 2^(-75). (This is an +// non-obvious fact found by enumeration using a special algorithm +// involving continued fraction.) The algorithm described below +// calculates N and an accurate approximation of f. +// +// Roughly speaking, an appropriate 256-bit (4 X 64) portion of +// 2/pi is multiplied with x to give the desired information. +// +// II. Representation of 2/PI +// ========================== +// +// The value of 2/pi in binary fixed-point is +// +// .101000101111100110...... +// +// We store 2/pi in a table, starting at the position corresponding +// to bit position 63 +// +// bit position 63 62 ... 0 -1 -2 -3 -4 -5 -6 -7 .... -16576 +// +// 0 0 ... 0 . 1 0 1 0 1 0 1 .... X +// +// ^ +// |__ implied binary pt +// +// III. Algorithm +// ============== +// +// This describes the algorithm in the most natural way using +// unsigned interger multiplication. The implementation section +// describes how the integer arithmetic is simulated. +// +// STEP 0. Initialization +// ---------------------- +// +// Let the input argument x be +// +// x = 2^m * ( 1. b_1 b_2 b_3 ... b_63 ), 63 <= m <= 16383. +// +// The first crucial step is to fetch four 64-bit portions of 2/pi. +// To fulfill this goal, we calculate the bit position L of the +// beginning of these 256-bit quantity by +// +// L := 62 - m. +// +// Note that -16321 <= L <= -1 because 63 <= m <= 16383; and that +// the storage of 2/pi is adequate. +// +// Fetch P_1, P_2, P_3, P_4 beginning at bit position L thus: +// +// bit position L L-1 L-2 ... L-63 +// +// P_1 = b b b ... b +// +// each b can be 0 or 1. Also, let P_0 be the two bits correspoding to +// bit positions L+2 and L+1. So, when each of the P_j is interpreted +// with appropriate scaling, we have +// +// 2/pi = P_big + P_0 + (P_1 + P_2 + P_3 + P_4) + P_small +// +// Note that P_big and P_small can be ignored. The reasons are as follow. +// First, consider P_big. If P_big = 0, we can certainly ignore it. +// Otherwise, P_big >= 2^(L+3). Now, +// +// P_big * ulp(x) >= 2^(L+3) * 2^(m-63) +// >= 2^(65-m + m-63 ) +// >= 2^2 +// +// Thus, P_big * x is an integer of the form 4*K. So +// +// x = 4*K * (pi/2) + x*(P_0 + P_1 + P_2 + P_3 + P_4)*(pi/2) +// + x*P_small*(pi/2). +// +// Hence, P_big*x corresponds to information that can be ignored for +// trigonometic function evaluation. +// +// Next, we must estimate the effect of ignoring P_small. The absolute +// error made by ignoring P_small is bounded by +// +// |P_small * x| <= ulp(P_4) * x +// <= 2^(L-255) * 2^(m+1) +// <= 2^(62-m-255 + m + 1) +// <= 2^(-192) +// +// Since for double-extended precision, x * 2/pi = integer + f, +// 0.5 >= |f| >= 2^(-75), the relative error introduced by ignoring +// P_small is bounded by 2^(-192+75) <= 2^(-117), which is acceptable. +// +// Further note that if x is split into x_hi + x_lo where x_lo is the +// two bits corresponding to bit positions 2^(m-62) and 2^(m-63); then +// +// P_0 * x_hi +// +// is also an integer of the form 4*K; and thus can also be ignored. +// Let M := P_0 * x_lo which is a small integer. The main part of the +// calculation is really the multiplication of x with the four pieces +// P_1, P_2, P_3, and P_4. +// +// Unless the reduced argument is extremely small in magnitude, it +// suffices to carry out the multiplication of x with P_1, P_2, and +// P_3. x*P_4 will be carried out and added on as a correction only +// when it is found to be needed. Note also that x*P_4 need not be +// computed exactly. A straightforward multiplication suffices since +// the rounding error thus produced would be bounded by 2^(-3*64), +// that is 2^(-192) which is small enough as the reduced argument +// is bounded from below by 2^(-75). +// +// Now that we have four 64-bit data representing 2/pi and a +// 64-bit x. We first need to calculate a highly accurate product +// of x and P_1, P_2, P_3. This is best understood as integer +// multiplication. +// +// +// STEP 1. Multiplication +// ---------------------- +// +// +// --------- --------- --------- +// | P_1 | | P_2 | | P_3 | +// --------- --------- --------- +// +// --------- +// X | X | +// --------- +// ---------------------------------------------------- +// +// --------- --------- +// | A_hi | | A_lo | +// --------- --------- +// +// +// --------- --------- +// | B_hi | | B_lo | +// --------- --------- +// +// +// --------- --------- +// | C_hi | | C_lo | +// --------- --------- +// +// ==================================================== +// --------- --------- --------- --------- +// | S_0 | | S_1 | | S_2 | | S_3 | +// --------- --------- --------- --------- +// +// +// +// STEP 2. Get N and f +// ------------------- +// +// Conceptually, after the individual pieces S_0, S_1, ..., are obtained, +// we have to sum them and obtain an integer part, N, and a fraction, f. +// Here, |f| <= 1/2, and N is an integer. Note also that N need only to +// be known to module 2^k, k >= 2. In the case when |f| is small enough, +// we would need to add in the value x*P_4. +// +// +// STEP 3. Get reduced argument +// ---------------------------- +// +// The value f is not yet the reduced argument that we seek. The +// equation +// +// x * 2/pi = 4K + N + f +// +// says that +// +// x = 2*K*pi + N * pi/2 + f * (pi/2). +// +// Thus, the reduced argument is given by +// +// reduced argument = f * pi/2. +// +// This multiplication must be performed to extra precision. +// +// IV. Implementation +// ================== +// +// Step 0. Initialization +// ---------------------- +// +// Set sgn_x := sign(x); x := |x|; x_lo := 2 lsb of x. +// +// In memory, 2/pi is stored contigously as +// +// 0x00000000 0x00000000 0xA2F.... +// ^ +// |__ implied binary bit +// +// Given x = 2^m * 1.xxxx...xxx; we calculate L := 62 - m. Thus +// -1 <= L <= -16321. We fetch from memory 5 integer pieces of data. +// +// P_0 is the two bits corresponding to bit positions L+2 and L+1 +// P_1 is the 64-bit starting at bit position L +// P_2 is the 64-bit starting at bit position L-64 +// P_3 is the 64-bit starting at bit position L-128 +// P_4 is the 64-bit starting at bit position L-192 +// +// For example, if m = 63, P_0 would be 0 and P_1 would look like +// 0xA2F... +// +// If m = 65, P_0 would be the two msb of 0xA, thus, P_0 is 10 in binary. +// P_1 in binary would be 1 0 0 0 1 0 1 1 1 1 .... +// +// Step 1. Multiplication +// ---------------------- +// +// At this point, P_1, P_2, P_3, P_4 are integers. They are +// supposed to be interpreted as +// +// 2^(L-63) * P_1; +// 2^(L-63-64) * P_2; +// 2^(L-63-128) * P_3; +// 2^(L-63-192) * P_4; +// +// Since each of them need to be multiplied to x, we would scale +// both x and the P_j's by some convenient factors: scale each +// of P_j's up by 2^(63-L), and scale x down by 2^(L-63). +// +// p_1 := fcvt.xf ( P_1 ) +// p_2 := fcvt.xf ( P_2 ) * 2^(-64) +// p_3 := fcvt.xf ( P_3 ) * 2^(-128) +// p_4 := fcvt.xf ( P_4 ) * 2^(-192) +// x := replace exponent of x by -1 +// because 2^m * 1.xxxx...xxx * 2^(L-63) +// is 2^(-1) * 1.xxxx...xxx +// +// We are now faced with the task of computing the following +// +// --------- --------- --------- +// | P_1 | | P_2 | | P_3 | +// --------- --------- --------- +// +// --------- +// X | X | +// --------- +// ---------------------------------------------------- +// +// --------- --------- +// | A_hi | | A_lo | +// --------- --------- +// +// --------- --------- +// | B_hi | | B_lo | +// --------- --------- +// +// --------- --------- +// | C_hi | | C_lo | +// --------- --------- +// +// ==================================================== +// ----------- --------- --------- --------- +// | S_0 | | S_1 | | S_2 | | S_3 | +// ----------- --------- --------- --------- +// ^ ^ +// | |___ binary point +// | +// |___ possibly one more bit +// +// Let FPSR3 be set to round towards zero with widest precision +// and exponent range. Unless an explicit FPSR is given, +// round-to-nearest with widest precision and exponent range is +// used. +// +// Define sigma_C := 2^63; sigma_B := 2^(-1); sigma_C := 2^(-65). +// +// Tmp_C := fmpy.fpsr3( x, p_1 ); +// If Tmp_C >= sigma_C then +// C_hi := Tmp_C; +// C_lo := x*p_1 - C_hi ...fma, exact +// Else +// C_hi := fadd.fpsr3(sigma_C, Tmp_C) - sigma_C +// ...subtraction is exact, regardless +// ...of rounding direction +// C_lo := x*p_1 - C_hi ...fma, exact +// End If +// +// Tmp_B := fmpy.fpsr3( x, p_2 ); +// If Tmp_B >= sigma_B then +// B_hi := Tmp_B; +// B_lo := x*p_2 - B_hi ...fma, exact +// Else +// B_hi := fadd.fpsr3(sigma_B, Tmp_B) - sigma_B +// ...subtraction is exact, regardless +// ...of rounding direction +// B_lo := x*p_2 - B_hi ...fma, exact +// End If +// +// Tmp_A := fmpy.fpsr3( x, p_3 ); +// If Tmp_A >= sigma_A then +// A_hi := Tmp_A; +// A_lo := x*p_3 - A_hi ...fma, exact +// Else +// A_hi := fadd.fpsr3(sigma_A, Tmp_A) - sigma_A +// ...subtraction is exact, regardless +// ...of rounding direction +// A_lo := x*p_3 - A_hi ...fma, exact +// End If +// +// ...Note that C_hi is of integer value. We need only the +// ...last few bits. Thus we can ensure C_hi is never a big +// ...integer, freeing us from overflow worry. +// +// Tmp_C := fadd.fpsr3( C_hi, 2^(70) ) - 2^(70); +// ...Tmp_C is the upper portion of C_hi +// C_hi := C_hi - Tmp_C +// ...0 <= C_hi < 2^7 +// +// Step 2. Get N and f +// ------------------- +// +// At this point, we have all the components to obtain +// S_0, S_1, S_2, S_3 and thus N and f. We start by adding +// C_lo and B_hi. This sum together with C_hi gives a good +// estimation of N and f. +// +// A := fadd.fpsr3( B_hi, C_lo ) +// B := max( B_hi, C_lo ) +// b := min( B_hi, C_lo ) +// +// a := (B - A) + b ...exact. Note that a is either 0 +// ...or 2^(-64). +// +// N := round_to_nearest_integer_value( A ); +// f := A - N; ...exact because lsb(A) >= 2^(-64) +// ...and |f| <= 1/2. +// +// f := f + a ...exact because a is 0 or 2^(-64); +// ...the msb of the sum is <= 1/2 +// ...lsb >= 2^(-64). +// +// N := convert to integer format( C_hi + N ); +// M := P_0 * x_lo; +// N := N + M; +// +// If sgn_x == 1 (that is original x was negative) +// N := 2^10 - N +// ...this maintains N to be non-negative, but still +// ...equivalent to the (negated N) mod 4. +// End If +// +// If |f| >= 2^(-33) +// +// ...Case 1 +// CASE := 1 +// g := A_hi + B_lo; +// s_hi := f + g; +// s_lo := (f - s_hi) + g; +// +// Else +// +// ...Case 2 +// CASE := 2 +// A := fadd.fpsr3( A_hi, B_lo ) +// B := max( A_hi, B_lo ) +// b := min( A_hi, B_lo ) +// +// a := (B - A) + b ...exact. Note that a is either 0 +// ...or 2^(-128). +// +// f_hi := A + f; +// f_lo := (f - f_hi) + A; +// ...this is exact. +// ...f-f_hi is exact because either |f| >= |A|, in which +// ...case f-f_hi is clearly exact; or otherwise, 0<|f|<|A| +// ...means msb(f) <= msb(A) = 2^(-64) => |f| = 2^(-64). +// ...If f = 2^(-64), f-f_hi involves cancellation and is +// ...exact. If f = -2^(-64), then A + f is exact. Hence +// ...f-f_hi is -A exactly, giving f_lo = 0. +// +// f_lo := f_lo + a; +// +// If |f| >= 2^(-50) then +// s_hi := f_hi; +// s_lo := f_lo; +// Else +// f_lo := (f_lo + A_lo) + x*p_4 +// s_hi := f_hi + f_lo +// s_lo := (f_hi - s_hi) + f_lo +// End If +// +// End If +// +// Step 3. Get reduced argument +// ---------------------------- +// +// If sgn_x == 0 (that is original x is positive) +// +// D_hi := Pi_by_2_hi +// D_lo := Pi_by_2_lo +// ...load from table +// +// Else +// +// D_hi := neg_Pi_by_2_hi +// D_lo := neg_Pi_by_2_lo +// ...load from table +// End If +// +// r_hi := s_hi*D_hi +// r_lo := s_hi*D_hi - r_hi ...fma +// r_lo := (s_hi*D_lo + r_lo) + s_lo*D_hi +// +// Return N, r_hi, r_lo +// +FR_input_X = f8 +FR_r_hi = f8 +FR_r_lo = f9 + +FR_X = f32 +FR_N = f33 +FR_p_1 = f34 +FR_TWOM33 = f35 +FR_TWOM50 = f36 +FR_g = f37 +FR_p_2 = f38 +FR_f = f39 +FR_s_lo = f40 +FR_p_3 = f41 +FR_f_abs = f42 +FR_D_lo = f43 +FR_p_4 = f44 +FR_D_hi = f45 +FR_Tmp2_C = f46 +FR_s_hi = f47 +FR_sigma_A = f48 +FR_A = f49 +FR_sigma_B = f50 +FR_B = f51 +FR_sigma_C = f52 +FR_b = f53 +FR_ScaleP2 = f54 +FR_ScaleP3 = f55 +FR_ScaleP4 = f56 +FR_Tmp_A = f57 +FR_Tmp_B = f58 +FR_Tmp_C = f59 +FR_A_hi = f60 +FR_f_hi = f61 +FR_RSHF = f62 +FR_A_lo = f63 +FR_B_hi = f64 +FR_a = f65 +FR_B_lo = f66 +FR_f_lo = f67 +FR_N_fix = f68 +FR_C_hi = f69 +FR_C_lo = f70 + +GR_N = r8 +GR_Exp_x = r36 +GR_Temp = r37 +GR_BIASL63 = r38 +GR_CASE = r39 +GR_x_lo = r40 +GR_sgn_x = r41 +GR_M = r42 +GR_BASE = r43 +GR_LENGTH1 = r44 +GR_LENGTH2 = r45 +GR_ASUB = r46 +GR_P_0 = r47 +GR_P_1 = r48 +GR_P_2 = r49 +GR_P_3 = r50 +GR_P_4 = r51 +GR_START = r52 +GR_SEGMENT = r53 +GR_A = r54 +GR_B = r55 +GR_C = r56 +GR_D = r57 +GR_E = r58 +GR_TEMP1 = r59 +GR_TEMP2 = r60 +GR_TEMP3 = r61 +GR_TEMP4 = r62 +GR_TEMP5 = r63 +GR_TEMP6 = r64 +GR_rshf = r64 + +RODATA +.align 64 + +LOCAL_OBJECT_START(Constants_Bits_of_2_by_pi) +data8 0x0000000000000000,0xA2F9836E4E441529 +data8 0xFC2757D1F534DDC0,0xDB6295993C439041 +data8 0xFE5163ABDEBBC561,0xB7246E3A424DD2E0 +data8 0x06492EEA09D1921C,0xFE1DEB1CB129A73E +data8 0xE88235F52EBB4484,0xE99C7026B45F7E41 +data8 0x3991D639835339F4,0x9C845F8BBDF9283B +data8 0x1FF897FFDE05980F,0xEF2F118B5A0A6D1F +data8 0x6D367ECF27CB09B7,0x4F463F669E5FEA2D +data8 0x7527BAC7EBE5F17B,0x3D0739F78A5292EA +data8 0x6BFB5FB11F8D5D08,0x56033046FC7B6BAB +data8 0xF0CFBC209AF4361D,0xA9E391615EE61B08 +data8 0x6599855F14A06840,0x8DFFD8804D732731 +data8 0x06061556CA73A8C9,0x60E27BC08C6B47C4 +data8 0x19C367CDDCE8092A,0x8359C4768B961CA6 +data8 0xDDAF44D15719053E,0xA5FF07053F7E33E8 +data8 0x32C2DE4F98327DBB,0xC33D26EF6B1E5EF8 +data8 0x9F3A1F35CAF27F1D,0x87F121907C7C246A +data8 0xFA6ED5772D30433B,0x15C614B59D19C3C2 +data8 0xC4AD414D2C5D000C,0x467D862D71E39AC6 +data8 0x9B0062337CD2B497,0xA7B4D55537F63ED7 +data8 0x1810A3FC764D2A9D,0x64ABD770F87C6357 +data8 0xB07AE715175649C0,0xD9D63B3884A7CB23 +data8 0x24778AD623545AB9,0x1F001B0AF1DFCE19 +data8 0xFF319F6A1E666157,0x9947FBACD87F7EB7 +data8 0x652289E83260BFE6,0xCDC4EF09366CD43F +data8 0x5DD7DE16DE3B5892,0x9BDE2822D2E88628 +data8 0x4D58E232CAC616E3,0x08CB7DE050C017A7 +data8 0x1DF35BE01834132E,0x6212830148835B8E +data8 0xF57FB0ADF2E91E43,0x4A48D36710D8DDAA +data8 0x425FAECE616AA428,0x0AB499D3F2A6067F +data8 0x775C83C2A3883C61,0x78738A5A8CAFBDD7 +data8 0x6F63A62DCBBFF4EF,0x818D67C12645CA55 +data8 0x36D9CAD2A8288D61,0xC277C9121426049B +data8 0x4612C459C444C5C8,0x91B24DF31700AD43 +data8 0xD4E5492910D5FDFC,0xBE00CC941EEECE70 +data8 0xF53E1380F1ECC3E7,0xB328F8C79405933E +data8 0x71C1B3092EF3450B,0x9C12887B20AB9FB5 +data8 0x2EC292472F327B6D,0x550C90A7721FE76B +data8 0x96CB314A1679E279,0x4189DFF49794E884 +data8 0xE6E29731996BED88,0x365F5F0EFDBBB49A +data8 0x486CA46742727132,0x5D8DB8159F09E5BC +data8 0x25318D3974F71C05,0x30010C0D68084B58 +data8 0xEE2C90AA4702E774,0x24D6BDA67DF77248 +data8 0x6EEF169FA6948EF6,0x91B45153D1F20ACF +data8 0x3398207E4BF56863,0xB25F3EDD035D407F +data8 0x8985295255C06437,0x10D86D324832754C +data8 0x5BD4714E6E5445C1,0x090B69F52AD56614 +data8 0x9D072750045DDB3B,0xB4C576EA17F9877D +data8 0x6B49BA271D296996,0xACCCC65414AD6AE2 +data8 0x9089D98850722CBE,0xA4049407777030F3 +data8 0x27FC00A871EA49C2,0x663DE06483DD9797 +data8 0x3FA3FD94438C860D,0xDE41319D39928C70 +data8 0xDDE7B7173BDF082B,0x3715A0805C93805A +data8 0x921110D8E80FAF80,0x6C4BFFDB0F903876 +data8 0x185915A562BBCB61,0xB989C7BD401004F2 +data8 0xD2277549F6B6EBBB,0x22DBAA140A2F2689 +data8 0x768364333B091A94,0x0EAA3A51C2A31DAE +data8 0xEDAF12265C4DC26D,0x9C7A2D9756C0833F +data8 0x03F6F0098C402B99,0x316D07B43915200C +data8 0x5BC3D8C492F54BAD,0xC6A5CA4ECD37A736 +data8 0xA9E69492AB6842DD,0xDE6319EF8C76528B +data8 0x6837DBFCABA1AE31,0x15DFA1AE00DAFB0C +data8 0x664D64B705ED3065,0x29BF56573AFF47B9 +data8 0xF96AF3BE75DF9328,0x3080ABF68C6615CB +data8 0x040622FA1DE4D9A4,0xB33D8F1B5709CD36 +data8 0xE9424EA4BE13B523,0x331AAAF0A8654FA5 +data8 0xC1D20F3F0BCD785B,0x76F923048B7B7217 +data8 0x8953A6C6E26E6F00,0xEBEF584A9BB7DAC4 +data8 0xBA66AACFCF761D02,0xD12DF1B1C1998C77 +data8 0xADC3DA4886A05DF7,0xF480C62FF0AC9AEC +data8 0xDDBC5C3F6DDED01F,0xC790B6DB2A3A25A3 +data8 0x9AAF009353AD0457,0xB6B42D297E804BA7 +data8 0x07DA0EAA76A1597B,0x2A12162DB7DCFDE5 +data8 0xFAFEDB89FDBE896C,0x76E4FCA90670803E +data8 0x156E85FF87FD073E,0x2833676186182AEA +data8 0xBD4DAFE7B36E6D8F,0x3967955BBF3148D7 +data8 0x8416DF30432DC735,0x6125CE70C9B8CB30 +data8 0xFD6CBFA200A4E46C,0x05A0DD5A476F21D2 +data8 0x1262845CB9496170,0xE0566B0152993755 +data8 0x50B7D51EC4F1335F,0x6E13E4305DA92E85 +data8 0xC3B21D3632A1A4B7,0x08D4B1EA21F716E4 +data8 0x698F77FF2780030C,0x2D408DA0CD4F99A5 +data8 0x20D3A2B30A5D2F42,0xF9B4CBDA11D0BE7D +data8 0xC1DB9BBD17AB81A2,0xCA5C6A0817552E55 +data8 0x0027F0147F8607E1,0x640B148D4196DEBE +data8 0x872AFDDAB6256B34,0x897BFEF3059EBFB9 +data8 0x4F6A68A82A4A5AC4,0x4FBCF82D985AD795 +data8 0xC7F48D4D0DA63A20,0x5F57A4B13F149538 +data8 0x800120CC86DD71B6,0xDEC9F560BF11654D +data8 0x6B0701ACB08CD0C0,0xB24855510EFB1EC3 +data8 0x72953B06A33540C0,0x7BDC06CC45E0FA29 +data8 0x4EC8CAD641F3E8DE,0x647CD8649B31BED9 +data8 0xC397A4D45877C5E3,0x6913DAF03C3ABA46 +data8 0x18465F7555F5BDD2,0xC6926E5D2EACED44 +data8 0x0E423E1C87C461E9,0xFD29F3D6E7CA7C22 +data8 0x35916FC5E0088DD7,0xFFE26A6EC6FDB0C1 +data8 0x0893745D7CB2AD6B,0x9D6ECD7B723E6A11 +data8 0xC6A9CFF7DF7329BA,0xC9B55100B70DB2E2 +data8 0x24BA74607DE58AD8,0x742C150D0C188194 +data8 0x667E162901767A9F,0xBEFDFDEF4556367E +data8 0xD913D9ECB9BA8BFC,0x97C427A831C36EF1 +data8 0x36C59456A8D8B5A8,0xB40ECCCF2D891234 +data8 0x576F89562CE3CE99,0xB920D6AA5E6B9C2A +data8 0x3ECC5F114A0BFDFB,0xF4E16D3B8E2C86E2 +data8 0x84D4E9A9B4FCD1EE,0xEFC9352E61392F44 +data8 0x2138C8D91B0AFC81,0x6A4AFBD81C2F84B4 +data8 0x538C994ECC2254DC,0x552AD6C6C096190B +data8 0xB8701A649569605A,0x26EE523F0F117F11 +data8 0xB5F4F5CBFC2DBC34,0xEEBC34CC5DE8605E +data8 0xDD9B8E67EF3392B8,0x17C99B5861BC57E1 +data8 0xC68351103ED84871,0xDDDD1C2DA118AF46 +data8 0x2C21D7F359987AD9,0xC0549EFA864FFC06 +data8 0x56AE79E536228922,0xAD38DC9367AAE855 +data8 0x3826829BE7CAA40D,0x51B133990ED7A948 +data8 0x0569F0B265A7887F,0x974C8836D1F9B392 +data8 0x214A827B21CF98DC,0x9F405547DC3A74E1 +data8 0x42EB67DF9DFE5FD4,0x5EA4677B7AACBAA2 +data8 0xF65523882B55BA41,0x086E59862A218347 +data8 0x39E6E389D49EE540,0xFB49E956FFCA0F1C +data8 0x8A59C52BFA94C5C1,0xD3CFC50FAE5ADB86 +data8 0xC5476243853B8621,0x94792C8761107B4C +data8 0x2A1A2C8012BF4390,0x2688893C78E4C4A8 +data8 0x7BDBE5C23AC4EAF4,0x268A67F7BF920D2B +data8 0xA365B1933D0B7CBD,0xDC51A463DD27DDE1 +data8 0x6919949A9529A828,0xCE68B4ED09209F44 +data8 0xCA984E638270237C,0x7E32B90F8EF5A7E7 +data8 0x561408F1212A9DB5,0x4D7E6F5119A5ABF9 +data8 0xB5D6DF8261DD9602,0x36169F3AC4A1A283 +data8 0x6DED727A8D39A9B8,0x825C326B5B2746ED +data8 0x34007700D255F4FC,0x4D59018071E0E13F +data8 0x89B295F364A8F1AE,0xA74B38FC4CEAB2BB +LOCAL_OBJECT_END(Constants_Bits_of_2_by_pi) + +LOCAL_OBJECT_START(Constants_Bits_of_pi_by_2) +data8 0xC90FDAA22168C234,0x00003FFF +data8 0xC4C6628B80DC1CD1,0x00003FBF +LOCAL_OBJECT_END(Constants_Bits_of_pi_by_2) + +.section .text +.global __libm_pi_by_2_reduce# +.proc __libm_pi_by_2_reduce# +.align 32 + +__libm_pi_by_2_reduce: + +// X is in f8 +// Place the two-piece result r (r_hi) in f8 and c (r_lo) in f9 +// N is returned in r8 + +{ .mfi + alloc r34 = ar.pfs,2,34,0,0 + fsetc.s3 0x00,0x7F // Set sf3 to round to zero, 82-bit prec, td, ftz + nop.i 999 +} +{ .mfi + addl GR_BASE = @ltoff(Constants_Bits_of_2_by_pi#), gp + nop.f 999 + mov GR_BIASL63 = 0x1003E +} +;; + + +// L -1-2-3-4 +// 0 0 0 0 0. 1 0 1 0 +// M 0 1 2 .... 63, 64 65 ... 127, 128 +// --------------------------------------------- +// Segment 0. 1 , 2 , 3 +// START = M - 63 M = 128 becomes 65 +// LENGTH1 = START & 0x3F 65 become position 1 +// SEGMENT = shr(START,6) + 1 0 maps to 1, 64 maps to 2, +// LENGTH2 = 64 - LENGTH1 +// Address_BASE = shladd(SEGMENT,3) + BASE + + +{ .mmi + getf.exp GR_Exp_x = FR_input_X + ld8 GR_BASE = [GR_BASE] + mov GR_TEMP5 = 0x0FFFE +} +;; + +// Define sigma_C := 2^63; sigma_B := 2^(-1); sigma_A := 2^(-65). +{ .mmi + getf.sig GR_x_lo = FR_input_X + mov GR_TEMP6 = 0x0FFBE + nop.i 999 +} +;; + +// Special Code for testing DE arguments +// movl GR_BIASL63 = 0x0000000000013FFE +// movl GR_x_lo = 0xFFFFFFFFFFFFFFFF +// setf.exp FR_X = GR_BIASL63 +// setf.sig FR_ScaleP3 = GR_x_lo +// fmerge.se FR_X = FR_X,FR_ScaleP3 +// Set sgn_x := sign(x); x := |x|; x_lo := 2 lsb of x. +// 2/pi is stored contigously as +// 0x00000000 0x00000000.0xA2F.... +// M = EXP - BIAS ( M >= 63) +// Given x = 2^m * 1.xxxx...xxx; we calculate L := 62 - m. +// Thus -1 <= L <= -16321. +{ .mmi + setf.exp FR_sigma_B = GR_TEMP5 + setf.exp FR_sigma_A = GR_TEMP6 + extr.u GR_M = GR_Exp_x,0,17 +} +;; + +{ .mii + and GR_x_lo = 0x03,GR_x_lo + sub GR_START = GR_M,GR_BIASL63 + add GR_BASE = 8,GR_BASE // To effectively add 1 to SEGMENT +} +;; + +{ .mii + and GR_LENGTH1 = 0x3F,GR_START + shr.u GR_SEGMENT = GR_START,6 + nop.i 999 +} +;; + +{ .mmi + shladd GR_BASE = GR_SEGMENT,3,GR_BASE + sub GR_LENGTH2 = 0x40,GR_LENGTH1 + cmp.le p6,p7 = 0x2,GR_LENGTH1 +} +;; + +// P_0 is the two bits corresponding to bit positions L+2 and L+1 +// P_1 is the 64-bit starting at bit position L +// P_2 is the 64-bit starting at bit position L-64 +// P_3 is the 64-bit starting at bit position L-128 +// P_4 is the 64-bit starting at bit position L-192 +// P_1 is made up of Alo and Bhi +// P_1 = deposit Alo, position 0, length2 into P_1,position length1 +// deposit Bhi, position length2, length1 into P_1, position 0 +// P_2 is made up of Blo and Chi +// P_2 = deposit Blo, position 0, length2 into P_2, position length1 +// deposit Chi, position length2, length1 into P_2, position 0 +// P_3 is made up of Clo and Dhi +// P_3 = deposit Clo, position 0, length2 into P_3, position length1 +// deposit Dhi, position length2, length1 into P_3, position 0 +// P_4 is made up of Clo and Dhi +// P_4 = deposit Dlo, position 0, length2 into P_4, position length1 +// deposit Ehi, position length2, length1 into P_4, position 0 +{ .mfi + ld8 GR_A = [GR_BASE],8 + fabs FR_X = FR_input_X +(p7) cmp.eq.unc p8,p9 = 0x1,GR_LENGTH1 +} +;; + +// ld_64 A at Base and increment Base by 8 +// ld_64 B at Base and increment Base by 8 +// ld_64 C at Base and increment Base by 8 +// ld_64 D at Base and increment Base by 8 +// ld_64 E at Base and increment Base by 8 +// A/B/C/D +// --------------------- +// A, B, C, D, and E look like | length1 | length2 | +// --------------------- +// hi lo +{ .mlx + ld8 GR_B = [GR_BASE],8 + movl GR_rshf = 0x43e8000000000000 // 1.10000 2^63 for right shift N_fix +} +;; + +{ .mmi + ld8 GR_C = [GR_BASE],8 + nop.m 999 +(p8) extr.u GR_Temp = GR_A,63,1 +} +;; + +// If length1 >= 2, +// P_0 = deposit Ahi, position length2, 2 bit into P_0 at position 0. +{ .mii + ld8 GR_D = [GR_BASE],8 + shl GR_TEMP1 = GR_A,GR_LENGTH1 // MM instruction +(p6) shr.u GR_P_0 = GR_A,GR_LENGTH2 // MM instruction +} +;; + +{ .mii + ld8 GR_E = [GR_BASE],-40 + shl GR_TEMP2 = GR_B,GR_LENGTH1 // MM instruction + shr.u GR_P_1 = GR_B,GR_LENGTH2 // MM instruction +} +;; + +// Else +// Load 16 bit of ASUB from (Base_Address_of_A - 2) +// P_0 = ASUB & 0x3 +// If length1 == 0, +// P_0 complete +// Else +// Deposit element 63 from Ahi and place in element 0 of P_0. +// Endif +// Endif + +{ .mii +(p7) ld2 GR_ASUB = [GR_BASE],8 + shl GR_TEMP3 = GR_C,GR_LENGTH1 // MM instruction + shr.u GR_P_2 = GR_C,GR_LENGTH2 // MM instruction +} +;; + +{ .mii + setf.d FR_RSHF = GR_rshf // Form right shift const 1.100 * 2^63 + shl GR_TEMP4 = GR_D,GR_LENGTH1 // MM instruction + shr.u GR_P_3 = GR_D,GR_LENGTH2 // MM instruction +} +;; + +{ .mmi +(p7) and GR_P_0 = 0x03,GR_ASUB +(p6) and GR_P_0 = 0x03,GR_P_0 + shr.u GR_P_4 = GR_E,GR_LENGTH2 // MM instruction +} +;; + +{ .mmi + nop.m 999 + or GR_P_1 = GR_P_1,GR_TEMP1 +(p8) and GR_P_0 = 0x1,GR_P_0 +} +;; + +{ .mmi + setf.sig FR_p_1 = GR_P_1 + or GR_P_2 = GR_P_2,GR_TEMP2 +(p8) shladd GR_P_0 = GR_P_0,1,GR_Temp +} +;; + +{ .mmf + setf.sig FR_p_2 = GR_P_2 + or GR_P_3 = GR_P_3,GR_TEMP3 + fmerge.se FR_X = FR_sigma_B,FR_X +} +;; + +{ .mmi + setf.sig FR_p_3 = GR_P_3 + or GR_P_4 = GR_P_4,GR_TEMP4 + pmpy2.r GR_M = GR_P_0,GR_x_lo +} +;; + +// P_1, P_2, P_3, P_4 are integers. They should be +// 2^(L-63) * P_1; +// 2^(L-63-64) * P_2; +// 2^(L-63-128) * P_3; +// 2^(L-63-192) * P_4; +// Since each of them need to be multiplied to x, we would scale +// both x and the P_j's by some convenient factors: scale each +// of P_j's up by 2^(63-L), and scale x down by 2^(L-63). +// p_1 := fcvt.xf ( P_1 ) +// p_2 := fcvt.xf ( P_2 ) * 2^(-64) +// p_3 := fcvt.xf ( P_3 ) * 2^(-128) +// p_4 := fcvt.xf ( P_4 ) * 2^(-192) +// x= Set x's exp to -1 because 2^m*1.x...x *2^(L-63)=2^(-1)*1.x...xxx +// --------- --------- --------- +// | P_1 | | P_2 | | P_3 | +// --------- --------- --------- +// --------- +// X | X | +// --------- +// ---------------------------------------------------- +// --------- --------- +// | A_hi | | A_lo | +// --------- --------- +// --------- --------- +// | B_hi | | B_lo | +// --------- --------- +// --------- --------- +// | C_hi | | C_lo | +// --------- --------- +// ==================================================== +// ----------- --------- --------- --------- +// | S_0 | | S_1 | | S_2 | | S_3 | +// ----------- --------- --------- --------- +// | |___ binary point +// |___ possibly one more bit +// +// Let FPSR3 be set to round towards zero with widest precision +// and exponent range. Unless an explicit FPSR is given, +// round-to-nearest with widest precision and exponent range is +// used. +{ .mmi + setf.sig FR_p_4 = GR_P_4 + mov GR_TEMP1 = 0x0FFBF + nop.i 999 +} +;; + +{ .mmi + setf.exp FR_ScaleP2 = GR_TEMP1 + mov GR_TEMP2 = 0x0FF7F + nop.i 999 +} +;; + +{ .mmi + setf.exp FR_ScaleP3 = GR_TEMP2 + mov GR_TEMP4 = 0x1003E + nop.i 999 +} +;; + +{ .mmf + setf.exp FR_sigma_C = GR_TEMP4 + mov GR_Temp = 0x0FFDE + fcvt.xuf.s1 FR_p_1 = FR_p_1 +} +;; + +{ .mfi + setf.exp FR_TWOM33 = GR_Temp + fcvt.xuf.s1 FR_p_2 = FR_p_2 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fcvt.xuf.s1 FR_p_3 = FR_p_3 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fcvt.xuf.s1 FR_p_4 = FR_p_4 + nop.i 999 +} +;; + +// Tmp_C := fmpy.fpsr3( x, p_1 ); +// Tmp_B := fmpy.fpsr3( x, p_2 ); +// Tmp_A := fmpy.fpsr3( x, p_3 ); +// If Tmp_C >= sigma_C then +// C_hi := Tmp_C; +// C_lo := x*p_1 - C_hi ...fma, exact +// Else +// C_hi := fadd.fpsr3(sigma_C, Tmp_C) - sigma_C +// C_lo := x*p_1 - C_hi ...fma, exact +// End If +// If Tmp_B >= sigma_B then +// B_hi := Tmp_B; +// B_lo := x*p_2 - B_hi ...fma, exact +// Else +// B_hi := fadd.fpsr3(sigma_B, Tmp_B) - sigma_B +// B_lo := x*p_2 - B_hi ...fma, exact +// End If +// If Tmp_A >= sigma_A then +// A_hi := Tmp_A; +// A_lo := x*p_3 - A_hi ...fma, exact +// Else +// A_hi := fadd.fpsr3(sigma_A, Tmp_A) - sigma_A +// Exact, regardless ...of rounding direction +// A_lo := x*p_3 - A_hi ...fma, exact +// Endif +{ .mfi + nop.m 999 + fmpy.s3 FR_Tmp_C = FR_X,FR_p_1 + nop.i 999 +} +;; + +{ .mfi + mov GR_TEMP3 = 0x0FF3F + fmpy.s1 FR_p_2 = FR_p_2,FR_ScaleP2 + nop.i 999 +} +;; + +{ .mmf + setf.exp FR_ScaleP4 = GR_TEMP3 + mov GR_TEMP4 = 0x10045 + fmpy.s1 FR_p_3 = FR_p_3,FR_ScaleP3 +} +;; + +{ .mfi + nop.m 999 + fadd.s3 FR_C_hi = FR_sigma_C,FR_Tmp_C // For Tmp_C < sigma_C case + nop.i 999 +} +;; + +{ .mmf + setf.exp FR_Tmp2_C = GR_TEMP4 + nop.m 999 + fmpy.s3 FR_Tmp_B = FR_X,FR_p_2 +} +;; + +{ .mfi + addl GR_BASE = @ltoff(Constants_Bits_of_pi_by_2#), gp + fcmp.ge.s1 p12, p9 = FR_Tmp_C,FR_sigma_C + nop.i 999 +} +{ .mfi + nop.m 999 + fmpy.s3 FR_Tmp_A = FR_X,FR_p_3 + nop.i 99 +} +;; + +{ .mfi + ld8 GR_BASE = [GR_BASE] +(p12) mov FR_C_hi = FR_Tmp_C + nop.i 999 +} +{ .mfi + nop.m 999 +(p9) fsub.s1 FR_C_hi = FR_C_hi,FR_sigma_C + nop.i 999 +} +;; + + + +// End If +// Step 3. Get reduced argument +// If sgn_x == 0 (that is original x is positive) +// D_hi := Pi_by_2_hi +// D_lo := Pi_by_2_lo +// Load from table +// Else +// D_hi := neg_Pi_by_2_hi +// D_lo := neg_Pi_by_2_lo +// Load from table +// End If + +{ .mfi + nop.m 999 + fmpy.s1 FR_p_4 = FR_p_4,FR_ScaleP4 + nop.i 999 +} +{ .mfi + nop.m 999 + fadd.s3 FR_B_hi = FR_sigma_B,FR_Tmp_B // For Tmp_B < sigma_B case + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fadd.s3 FR_A_hi = FR_sigma_A,FR_Tmp_A // For Tmp_A < sigma_A case + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fcmp.ge.s1 p13, p10 = FR_Tmp_B,FR_sigma_B + nop.i 999 +} +{ .mfi + nop.m 999 + fms.s1 FR_C_lo = FR_X,FR_p_1,FR_C_hi + nop.i 999 +} +;; + +{ .mfi + ldfe FR_D_hi = [GR_BASE],16 + fcmp.ge.s1 p14, p11 = FR_Tmp_A,FR_sigma_A + nop.i 999 +} +;; + +{ .mfi + ldfe FR_D_lo = [GR_BASE] +(p13) mov FR_B_hi = FR_Tmp_B + nop.i 999 +} +{ .mfi + nop.m 999 +(p10) fsub.s1 FR_B_hi = FR_B_hi,FR_sigma_B + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p14) mov FR_A_hi = FR_Tmp_A + nop.i 999 +} +{ .mfi + nop.m 999 +(p11) fsub.s1 FR_A_hi = FR_A_hi,FR_sigma_A + nop.i 999 +} +;; + +// Note that C_hi is of integer value. We need only the +// last few bits. Thus we can ensure C_hi is never a big +// integer, freeing us from overflow worry. +// Tmp_C := fadd.fpsr3( C_hi, 2^(70) ) - 2^(70); +// Tmp_C is the upper portion of C_hi +{ .mfi + nop.m 999 + fadd.s3 FR_Tmp_C = FR_C_hi,FR_Tmp2_C + tbit.z p12,p9 = GR_Exp_x, 17 +} +;; + +{ .mfi + nop.m 999 + fms.s1 FR_B_lo = FR_X,FR_p_2,FR_B_hi + nop.i 999 +} +{ .mfi + nop.m 999 + fadd.s3 FR_A = FR_B_hi,FR_C_lo + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fms.s1 FR_A_lo = FR_X,FR_p_3,FR_A_hi + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fsub.s1 FR_Tmp_C = FR_Tmp_C,FR_Tmp2_C + nop.i 999 +} +;; + +// ******************* +// Step 2. Get N and f +// ******************* +// We have all the components to obtain +// S_0, S_1, S_2, S_3 and thus N and f. We start by adding +// C_lo and B_hi. This sum together with C_hi estimates +// N and f well. +// A := fadd.fpsr3( B_hi, C_lo ) +// B := max( B_hi, C_lo ) +// b := min( B_hi, C_lo ) +{ .mfi + nop.m 999 + fmax.s1 FR_B = FR_B_hi,FR_C_lo + nop.i 999 +} +;; + +// We use a right-shift trick to get the integer part of A into the rightmost +// bits of the significand by adding 1.1000..00 * 2^63. This operation is good +// if |A| < 2^61, which it is in this case. We are doing this to save a few +// cycles over using fcvt.fx followed by fnorm. The second step of the trick +// is to subtract the same constant to float the rounded integer into a fp reg. + +{ .mfi + nop.m 999 +// N := round_to_nearest_integer_value( A ); + fma.s1 FR_N_fix = FR_A, f1, FR_RSHF + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fmin.s1 FR_b = FR_B_hi,FR_C_lo + nop.i 999 +} +{ .mfi + nop.m 999 +// C_hi := C_hi - Tmp_C ...0 <= C_hi < 2^7 + fsub.s1 FR_C_hi = FR_C_hi,FR_Tmp_C + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +// a := (B - A) + b: Exact - note that a is either 0 or 2^(-64). + fsub.s1 FR_a = FR_B,FR_A + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fms.s1 FR_N = FR_N_fix, f1, FR_RSHF + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fadd.s1 FR_a = FR_a,FR_b + nop.i 999 +} +;; + +// f := A - N; Exact because lsb(A) >= 2^(-64) and |f| <= 1/2. +// N := convert to integer format( C_hi + N ); +// M := P_0 * x_lo; +// N := N + M; +{ .mfi + nop.m 999 + fsub.s1 FR_f = FR_A,FR_N + nop.i 999 +} +{ .mfi + nop.m 999 + fadd.s1 FR_N = FR_N,FR_C_hi + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fsub.s1 FR_D_hi = f0, FR_D_hi + nop.i 999 +} +{ .mfi + nop.m 999 +(p9) fsub.s1 FR_D_lo = f0, FR_D_lo + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fadd.s1 FR_g = FR_A_hi,FR_B_lo // For Case 1, g=A_hi+B_lo + nop.i 999 +} +{ .mfi + nop.m 999 + fadd.s3 FR_A = FR_A_hi,FR_B_lo // For Case 2, A=A_hi+B_lo w/ sf3 + nop.i 999 +} +;; + +{ .mfi + mov GR_Temp = 0x0FFCD // For Case 2, exponent of 2^-50 + fmax.s1 FR_B = FR_A_hi,FR_B_lo // For Case 2, B=max(A_hi,B_lo) + nop.i 999 +} +;; + +// f = f + a Exact because a is 0 or 2^(-64); +// the msb of the sum is <= 1/2 and lsb >= 2^(-64). +{ .mfi + setf.exp FR_TWOM50 = GR_Temp // For Case 2, form 2^-50 + fcvt.fx.s1 FR_N = FR_N + nop.i 999 +} +{ .mfi + nop.m 999 + fadd.s1 FR_f = FR_f,FR_a + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fmin.s1 FR_b = FR_A_hi,FR_B_lo // For Case 2, b=min(A_hi,B_lo) + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fsub.s1 FR_a = FR_B,FR_A // For Case 2, a=B-A + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fadd.s1 FR_s_hi = FR_f,FR_g // For Case 1, s_hi=f+g + nop.i 999 +} +{ .mfi + nop.m 999 + fadd.s1 FR_f_hi = FR_A,FR_f // For Case 2, f_hi=A+f + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fabs FR_f_abs = FR_f + nop.i 999 +} +;; + +{ .mfi + getf.sig GR_N = FR_N + fsetc.s3 0x7F,0x40 // Reset sf3 to user settings + td + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fsub.s1 FR_s_lo = FR_f,FR_s_hi // For Case 1, s_lo=f-s_hi + nop.i 999 +} +{ .mfi + nop.m 999 + fsub.s1 FR_f_lo = FR_f,FR_f_hi // For Case 2, f_lo=f-f_hi + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fmpy.s1 FR_r_hi = FR_s_hi,FR_D_hi // For Case 1, r_hi=s_hi*D_hi + nop.i 999 +} +{ .mfi + nop.m 999 + fadd.s1 FR_a = FR_a,FR_b // For Case 2, a=a+b + nop.i 999 +} +;; + + +// If sgn_x == 1 (that is original x was negative) +// N := 2^10 - N +// this maintains N to be non-negative, but still +// equivalent to the (negated N) mod 4. +// End If +{ .mfi + add GR_N = GR_N,GR_M + fcmp.ge.s1 p13, p10 = FR_f_abs,FR_TWOM33 + mov GR_Temp = 0x00400 +} +;; + +{ .mfi +(p9) sub GR_N = GR_Temp,GR_N + fadd.s1 FR_s_lo = FR_s_lo,FR_g // For Case 1, s_lo=s_lo+g + nop.i 999 +} +{ .mfi + nop.m 999 + fadd.s1 FR_f_lo = FR_f_lo,FR_A // For Case 2, f_lo=f_lo+A + nop.i 999 +} +;; + +// a := (B - A) + b Exact. +// Note that a is either 0 or 2^(-128). +// f_hi := A + f; +// f_lo := (f - f_hi) + A +// f_lo=f-f_hi is exact because either |f| >= |A|, in which +// case f-f_hi is clearly exact; or otherwise, 0<|f|<|A| +// means msb(f) <= msb(A) = 2^(-64) => |f| = 2^(-64). +// If f = 2^(-64), f-f_hi involves cancellation and is +// exact. If f = -2^(-64), then A + f is exact. Hence +// f-f_hi is -A exactly, giving f_lo = 0. +// f_lo := f_lo + a; + +// If |f| >= 2^(-33) +// Case 1 +// CASE := 1 +// g := A_hi + B_lo; +// s_hi := f + g; +// s_lo := (f - s_hi) + g; +// Else +// Case 2 +// CASE := 2 +// A := fadd.fpsr3( A_hi, B_lo ) +// B := max( A_hi, B_lo ) +// b := min( A_hi, B_lo ) + +{ .mfi + nop.m 999 +(p10) fcmp.ge.unc.s1 p14, p11 = FR_f_abs,FR_TWOM50 + nop.i 999 +} +{ .mfi + nop.m 999 +(p13) fms.s1 FR_r_lo = FR_s_hi,FR_D_hi,FR_r_hi //For Case 1, r_lo=s_hi*D_hi+r_hi + nop.i 999 +} +;; + +// If |f| >= 2^(-50) then +// s_hi := f_hi; +// s_lo := f_lo; +// Else +// f_lo := (f_lo + A_lo) + x*p_4 +// s_hi := f_hi + f_lo +// s_lo := (f_hi - s_hi) + f_lo +// End If +{ .mfi + nop.m 999 +(p14) mov FR_s_hi = FR_f_hi + nop.i 999 +} +{ .mfi + nop.m 999 +(p10) fadd.s1 FR_f_lo = FR_f_lo,FR_a + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p14) mov FR_s_lo = FR_f_lo + nop.i 999 +} +{ .mfi + nop.m 999 +(p11) fadd.s1 FR_f_lo = FR_f_lo,FR_A_lo + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p11) fma.s1 FR_f_lo = FR_X,FR_p_4,FR_f_lo + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p13) fma.s1 FR_r_lo = FR_s_hi,FR_D_lo,FR_r_lo //For Case 1, r_lo=s_hi*D_lo+r_lo + nop.i 999 +} +{ .mfi + nop.m 999 +(p11) fadd.s1 FR_s_hi = FR_f_hi,FR_f_lo + nop.i 999 +} +;; + +// r_hi := s_hi*D_hi +// r_lo := s_hi*D_hi - r_hi with fma +// r_lo := (s_hi*D_lo + r_lo) + s_lo*D_hi +{ .mfi + nop.m 999 +(p10) fmpy.s1 FR_r_hi = FR_s_hi,FR_D_hi + nop.i 999 +} +{ .mfi + nop.m 999 +(p11) fsub.s1 FR_s_lo = FR_f_hi,FR_s_hi + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p10) fms.s1 FR_r_lo = FR_s_hi,FR_D_hi,FR_r_hi + nop.i 999 +} +{ .mfi + nop.m 999 +(p11) fadd.s1 FR_s_lo = FR_s_lo,FR_f_lo + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p10) fma.s1 FR_r_lo = FR_s_hi,FR_D_lo,FR_r_lo + nop.i 999 +} +;; + +// Return N, r_hi, r_lo +// We do not return CASE +{ .mfb + nop.m 999 + fma.s1 FR_r_lo = FR_s_lo,FR_D_hi,FR_r_lo + br.ret.sptk b0 +} +;; + +.endp __libm_pi_by_2_reduce# diff --git a/sysdeps/ia64/fpu/libm_scalblnf.S b/sysdeps/ia64/fpu/libm_scalblnf.S new file mode 100644 index 0000000000..af620d45f8 --- /dev/null +++ b/sysdeps/ia64/fpu/libm_scalblnf.S @@ -0,0 +1,450 @@ +.file "libm_scalblnf.s" + + +// Copyright (c) 2001 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2001 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 08/03/01 Initial version +// 08/23/01 Corrected error tag number +// 02/06/02 Corrected to handle 32- or 64-bit integers +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// 08/25/03 Improved performance +// +// API +//============================================================== +// float __libm_scalblnf (float x, long int n, int long_int_type) +// input floating point f8 and long int n (r33) +// input long_int_type = 0 if long int defined as 32 bits, = 1 if 64 bits +// output floating point f8 +// +// Returns x* 2**n using an fma and detects overflow +// and underflow. +// +// +// Strategy: +// Compute biased exponent of result exp_Result = N + exp_X +// Break into ranges: +// exp_Result > 0x1007e -> Certain overflow +// exp_Result = 0x1007e -> Possible overflow +// 0x0ff81 <= exp_Result < 0x1007e -> No over/underflow (main path) +// 0x0ff81 - 23 <= exp_Result < 0x0ff81 -> Possible underflow +// exp_Result < 0x0ff81 - 23 -> Certain underflow + +FR_Big = f6 +FR_NBig = f7 +FR_Floating_X = f8 +FR_Result = f8 +FR_Result2 = f9 +FR_Result3 = f10 +FR_Norm_X = f11 +FR_Two_N = f12 + +GR_neg_ov_limit= r14 +GR_N_Biased = r15 +GR_Big = r16 +GR_NBig = r17 +GR_exp_Result = r18 +GR_pos_ov_limit= r19 +GR_Bias = r20 +GR_N_as_int = r21 +GR_signexp_X = r22 +GR_exp_X = r23 +GR_exp_mask = r24 +GR_max_exp = r25 +GR_min_exp = r26 +GR_min_den_exp = r27 + +GR_SAVE_B0 = r32 +GR_SAVE_GP = r33 +GR_SAVE_PFS = r34 +GR_Parameter_X = r35 +GR_Parameter_Y = r36 +GR_Parameter_RESULT = r37 +GR_Tag = r38 + +.section .text +GLOBAL_LIBM_ENTRY(__libm_scalblnf) + +// +// Is x NAN, INF, ZERO, +-? +// Build the exponent Bias +// +{ .mfi + getf.exp GR_signexp_X = FR_Floating_X // Get signexp of x + fclass.m p6,p0 = FR_Floating_X, 0xe7 // @snan | @qnan | @inf | @zero + mov GR_Bias = 0x0ffff +} +// +// Normalize x +// Is long integer type 32 bits? +// +{ .mfi + mov GR_Big = 35000 // If N this big then certain overflow + fnorm.s1 FR_Norm_X = FR_Floating_X + cmp.eq p8,p9 = r34,r0 +} +;; + +// Sign extend N if long int is 32 bits +{ .mfi +(p9) mov GR_N_as_int = r33 // Copy N if long int is 64 bits + fclass.m p9,p0 = FR_Floating_X, 0x0b // Test for x=unorm +(p8) sxt4 GR_N_as_int = r33 // Sign extend N if long int is 32 bits +} +{ .mfi + mov GR_NBig = -35000 // If N this small then certain underflow + nop.f 0 + mov GR_max_exp = 0x1007e // Exponent of maximum float +} +;; + +// Create biased exponent for 2**N +{ .mfi + add GR_N_Biased = GR_Bias,GR_N_as_int + nop.f 0 + cmp.ge p7, p0 = GR_N_as_int, GR_Big // Certain overflow? +} +{ .mib + cmp.le p8, p0 = GR_N_as_int, GR_NBig // Certain underflow? + mov GR_min_exp = 0x0ff81 // Exponent of minimum float +(p9) br.cond.spnt SCALBNF_UNORM // Branch if x=unorm +} +;; + +SCALBNF_COMMON: +// Main path continues. Also return here from x=unorm path. +// Create 2**N +.pred.rel "mutex",p7,p8 +{ .mfi + setf.exp FR_Two_N = GR_N_Biased + nop.f 0 +(p7) mov GR_N_as_int = GR_Big // Limit max N +} +{ .mfi +(p8) mov GR_N_as_int = GR_NBig // Limit min N + nop.f 0 +(p8) cmp.eq p7,p0 = r0,r0 // Set p7 if |N| big +} +;; + +// +// Create biased exponent for 2**N for N big +// Is N zero? +// +{ .mfi +(p7) add GR_N_Biased = GR_Bias,GR_N_as_int + nop.f 0 + cmp.eq.or p6,p0 = r33,r0 +} +{ .mfi + mov GR_pos_ov_limit = 0x1007f // Exponent for positive overflow + nop.f 0 + mov GR_exp_mask = 0x1ffff // Exponent mask +} +;; + +// +// Create 2**N for N big +// Return x when N = 0 or X = Nan, Inf, Zero +// +{ .mfi +(p7) setf.exp FR_Two_N = GR_N_Biased + nop.f 0 + mov GR_min_den_exp = 0x0ff81 - 23 // Exponent of min denorm float +} +{ .mfb + and GR_exp_X = GR_exp_mask, GR_signexp_X +(p6) fma.s.s0 FR_Result = FR_Floating_X, f1, f0 +(p6) br.ret.spnt b0 +} +;; + +// +// Raise Denormal operand flag with compare +// Compute biased result exponent +// +{ .mfi + add GR_exp_Result = GR_exp_X, GR_N_as_int + fcmp.ge.s0 p0,p11 = FR_Floating_X,f0 + mov GR_neg_ov_limit = 0x3007f // Exponent for negative overflow +} +;; + +// +// Do final operation +// +{ .mfi + cmp.lt p7,p6 = GR_exp_Result, GR_max_exp // Test no overflow + fma.s.s0 FR_Result = FR_Two_N,FR_Norm_X,f0 + cmp.lt p9,p0 = GR_exp_Result, GR_min_den_exp // Test sure underflow +} +{ .mfb + nop.m 0 + nop.f 0 +(p9) br.cond.spnt SCALBNF_UNDERFLOW // Branch if certain underflow +} +;; + +{ .mib +(p6) cmp.gt.unc p6,p8 = GR_exp_Result, GR_max_exp // Test sure overflow +(p7) cmp.ge.unc p7,p9 = GR_exp_Result, GR_min_exp // Test no over/underflow +(p7) br.ret.sptk b0 // Return from main path +} +;; + +{ .bbb +(p6) br.cond.spnt SCALBNF_OVERFLOW // Branch if certain overflow +(p8) br.cond.spnt SCALBNF_POSSIBLE_OVERFLOW // Branch if possible overflow +(p9) br.cond.spnt SCALBNF_POSSIBLE_UNDERFLOW // Branch if possible underflow +} +;; + +// Here if possible underflow. +// Resulting exponent: 0x0ff81-23 <= exp_Result < 0x0ff81 +SCALBNF_POSSIBLE_UNDERFLOW: +// +// Here if possible overflow. +// Resulting exponent: 0x1007e = exp_Result +SCALBNF_POSSIBLE_OVERFLOW: + +// Set up necessary status fields +// +// S0 user supplied status +// S2 user supplied status + WRE + TD (Overflows) +// S3 user supplied status + FZ + TD (Underflows) +// +{ .mfi + nop.m 0 + fsetc.s3 0x7F,0x41 + nop.i 0 +} +{ .mfi + nop.m 0 + fsetc.s2 0x7F,0x42 + nop.i 0 +} +;; + +// +// Do final operation with s2 and s3 +// +{ .mfi + setf.exp FR_NBig = GR_neg_ov_limit + fma.s.s3 FR_Result3 = FR_Two_N,FR_Norm_X,f0 + nop.i 0 +} +{ .mfi + setf.exp FR_Big = GR_pos_ov_limit + fma.s.s2 FR_Result2 = FR_Two_N,FR_Norm_X,f0 + nop.i 0 +} +;; + +// Check for overflow or underflow. +// Restore s3 +// Restore s2 +// +{ .mfi + nop.m 0 + fsetc.s3 0x7F,0x40 + nop.i 0 +} +{ .mfi + nop.m 0 + fsetc.s2 0x7F,0x40 + nop.i 0 +} +;; + +// +// Is the result zero? +// +{ .mfi + nop.m 0 + fclass.m p6, p0 = FR_Result3, 0x007 + nop.i 0 +} +{ .mfi + nop.m 0 + fcmp.ge.s1 p7, p8 = FR_Result2 , FR_Big + nop.i 0 +} +;; + +// +// Detect masked underflow - Tiny + Inexact Only +// +{ .mfi + nop.m 0 +(p6) fcmp.neq.unc.s1 p6, p0 = FR_Result , FR_Result2 + nop.i 0 +} +;; + +// +// Is result bigger the allowed range? +// Branch out for underflow +// +{ .mfb + nop.m 0 +(p8) fcmp.le.unc.s1 p9, p10 = FR_Result2 , FR_NBig +(p6) br.cond.spnt SCALBNF_UNDERFLOW +} +;; + +// +// Branch out for overflow +// +{ .bbb +(p7) br.cond.spnt SCALBNF_OVERFLOW +(p9) br.cond.spnt SCALBNF_OVERFLOW + br.ret.sptk b0 // Return from main path. +} +;; + +// Here if result overflows +SCALBNF_OVERFLOW: +{ .mib + alloc r32=ar.pfs,3,0,4,0 + addl GR_Tag = 205, r0 // Set error tag for overflow + br.cond.sptk __libm_error_region // Call error support for overflow +} +;; + +// Here if result underflows +SCALBNF_UNDERFLOW: +{ .mib + alloc r32=ar.pfs,3,0,4,0 + addl GR_Tag = 206, r0 // Set error tag for underflow + br.cond.sptk __libm_error_region // Call error support for underflow +} +;; + +// Here if x=unorm +SCALBNF_UNORM: +{ .mib + getf.exp GR_signexp_X = FR_Norm_X // Get signexp of normalized x + nop.i 0 + br.cond.sptk SCALBNF_COMMON // Return to main path +} +;; + + +GLOBAL_LIBM_END(__libm_scalblnf) +LOCAL_LIBM_ENTRY(__libm_error_region) + +// +// Get stack address of N +// +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs +} +// +// Adjust sp +// +{ .mfi +.fframe 64 + add sp=-64,sp + nop.f 0 + mov GR_SAVE_GP=gp +};; + +// +// Store N on stack in correct position +// Locate the address of x on stack +// +{ .mmi + st8 [GR_Parameter_Y] = GR_N_as_int,16 + add GR_Parameter_X = 16,sp +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 +};; + +// +// Store x on the stack. +// Get address for result on stack. +// +.body +{ .mib + stfs [GR_Parameter_X] = FR_Norm_X + add GR_Parameter_RESULT = 0,GR_Parameter_Y + nop.b 0 +} +{ .mib + stfs [GR_Parameter_Y] = FR_Result + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# +};; + +// +// Get location of result on stack +// +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; + +// +// Get the new result +// +{ .mmi + ldfs FR_Result = [GR_Parameter_RESULT] +.restore sp + add sp = 64,sp + mov b0 = GR_SAVE_B0 +};; + +// +// Restore gp, ar.pfs and return +// +{ .mib + mov gp = GR_SAVE_GP + mov ar.pfs = GR_SAVE_PFS + br.ret.sptk b0 +};; + +LOCAL_LIBM_END(__libm_error_region) + +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/libm_sincos.S b/sysdeps/ia64/fpu/libm_sincos.S new file mode 100644 index 0000000000..7fda2afac4 --- /dev/null +++ b/sysdeps/ia64/fpu/libm_sincos.S @@ -0,0 +1,783 @@ +.file "libm_sincos.s" + + +// Copyright (c) 2002 - 2005, Intel Corporation +// All rights reserved. +// +// Contributed 2002 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/01/02 Initial version +// 02/18/02 Large arguments processing routine is excluded. +// External interface entry points are added +// 03/13/02 Corrected restore of predicate registers +// 03/19/02 Added stack unwind around call to __libm_cis_large +// 09/05/02 Work range is widened by reduction strengthen (3 parts of Pi/16) +// 02/10/03 Reordered header: .section, .global, .proc, .align +// 08/08/03 Improved performance +// 02/11/04 cis is moved to the separate file. +// 03/31/05 Reformatted delimiters between data tables +// +// API +//============================================================== +// 1) void sincos(double, double*s, double*c) +// 2) __libm_sincos - internal LIBM function, that accepts +// argument in f8 and returns cosine through f8, sine through f9 +// +// Overview of operation +//============================================================== +// +// Step 1 +// ====== +// Reduce x to region -1/2*pi/2^k ===== 0 ===== +1/2*pi/2^k where k=4 +// divide x by pi/2^k. +// Multiply by 2^k/pi. +// nfloat = Round result to integer (round-to-nearest) +// +// r = x - nfloat * pi/2^k +// Do this as ((((x - nfloat * HIGH(pi/2^k))) - +// nfloat * LOW(pi/2^k)) - +// nfloat * LOWEST(pi/2^k) for increased accuracy. +// pi/2^k is stored as two numbers that when added make pi/2^k. +// pi/2^k = HIGH(pi/2^k) + LOW(pi/2^k) +// HIGH and LOW parts are rounded to zero values, +// and LOWEST is rounded to nearest one. +// +// x = (nfloat * pi/2^k) + r +// r is small enough that we can use a polynomial approximation +// and is referred to as the reduced argument. +// +// Step 3 +// ====== +// Take the unreduced part and remove the multiples of 2pi. +// So nfloat = nfloat (with lower k+1 bits cleared) + lower k+1 bits +// +// nfloat (with lower k+1 bits cleared) is a multiple of 2^(k+1) +// N * 2^(k+1) +// nfloat * pi/2^k = N * 2^(k+1) * pi/2^k + (lower k+1 bits) * pi/2^k +// nfloat * pi/2^k = N * 2 * pi + (lower k+1 bits) * pi/2^k +// nfloat * pi/2^k = N2pi + M * pi/2^k +// +// +// Sin(x) = Sin((nfloat * pi/2^k) + r) +// = Sin(nfloat * pi/2^k) * Cos(r) + Cos(nfloat * pi/2^k) * Sin(r) +// +// Sin(nfloat * pi/2^k) = Sin(N2pi + Mpi/2^k) +// = Sin(N2pi)Cos(Mpi/2^k) + Cos(N2pi)Sin(Mpi/2^k) +// = Sin(Mpi/2^k) +// +// Cos(nfloat * pi/2^k) = Cos(N2pi + Mpi/2^k) +// = Cos(N2pi)Cos(Mpi/2^k) + Sin(N2pi)Sin(Mpi/2^k) +// = Cos(Mpi/2^k) +// +// Sin(x) = Sin(Mpi/2^k) Cos(r) + Cos(Mpi/2^k) Sin(r) +// +// +// Step 4 +// ====== +// 0 <= M < 2^(k+1) +// There are 2^(k+1) Sin entries in a table. +// There are 2^(k+1) Cos entries in a table. +// +// Get Sin(Mpi/2^k) and Cos(Mpi/2^k) by table lookup. +// +// +// Step 5 +// ====== +// Calculate Cos(r) and Sin(r) by polynomial approximation. +// +// Cos(r) = 1 + r^2 q1 + r^4 q2 + r^6 q3 + ... = Series for Cos +// Sin(r) = r + r^3 p1 + r^5 p2 + r^7 p3 + ... = Series for Sin +// +// and the coefficients q1, q2, ... and p1, p2, ... are stored in a table +// +// +// Calculate +// Sin(x) = Sin(Mpi/2^k) Cos(r) + Cos(Mpi/2^k) Sin(r) +// +// as follows +// +// S[m] = Sin(Mpi/2^k) and C[m] = Cos(Mpi/2^k) +// rsq = r*r +// +// +// P = p1 + r^2p2 + r^4p3 + r^6p4 +// Q = q1 + r^2q2 + r^4q3 + r^6q4 +// +// rcub = r * rsq +// Sin(r) = r + rcub * P +// = r + r^3p1 + r^5p2 + r^7p3 + r^9p4 + ... = Sin(r) +// +// The coefficients are not exactly these values, but almost. +// +// p1 = -1/6 = -1/3! +// p2 = 1/120 = 1/5! +// p3 = -1/5040 = -1/7! +// p4 = 1/362889 = 1/9! +// +// P = r + rcub * P +// +// Answer = S[m] Cos(r) + C[m] P +// +// Cos(r) = 1 + rsq Q +// Cos(r) = 1 + r^2 Q +// Cos(r) = 1 + r^2 (q1 + r^2q2 + r^4q3 + r^6q4) +// Cos(r) = 1 + r^2q1 + r^4q2 + r^6q3 + r^8q4 + ... +// +// S[m] Cos(r) = S[m](1 + rsq Q) +// S[m] Cos(r) = S[m] + S[m] rsq Q +// S[m] Cos(r) = S[m] + s_rsq Q +// Q = S[m] + s_rsq Q +// +// Then, +// +// Answer = Q + C[m] P + +// Registers used +//============================================================== +// general input registers: +// r14 -> r39 + +// predicate registers used: +// p6 -> p14 +// +// floating-point registers used +// f9 -> f15 +// f32 -> f67 + +// Assembly macros +//============================================================== + +cis_Arg = f8 + +cis_Sin_res = f9 +cis_Cos_res = f8 + +cis_NORM_f8 = f10 +cis_W = f11 +cis_int_Nfloat = f12 +cis_Nfloat = f13 + +cis_r = f14 +cis_rsq = f15 +cis_rcub = f32 + +cis_Inv_Pi_by_16 = f33 +cis_Pi_by_16_hi = f34 +cis_Pi_by_16_lo = f35 + +cis_Inv_Pi_by_64 = f36 +cis_Pi_by_16_lowest = f37 +cis_r_exact = f38 + + +cis_P1 = f39 +cis_Q1 = f40 +cis_P2 = f41 +cis_Q2 = f42 +cis_P3 = f43 +cis_Q3 = f44 +cis_P4 = f45 +cis_Q4 = f46 + +cis_P_temp1 = f47 +cis_P_temp2 = f48 + +cis_Q_temp1 = f49 +cis_Q_temp2 = f50 + +cis_P = f51 + +cis_SIG_INV_PI_BY_16_2TO61 = f52 +cis_RSHF_2TO61 = f53 +cis_RSHF = f54 +cis_2TOM61 = f55 +cis_NFLOAT = f56 +cis_W_2TO61_RSH = f57 + +cis_tmp = f58 + +cis_Sm_sin = f59 +cis_Cm_sin = f60 + +cis_Sm_cos = f61 +cis_Cm_cos = f62 + +cis_srsq_sin = f63 +cis_srsq_cos = f64 + +cis_Q_sin = f65 +cis_Q_cos = f66 +cis_Q = f67 + +///////////////////////////////////////////////////////////// + +cis_pResSin = r33 +cis_pResCos = r34 + +cis_GR_sig_inv_pi_by_16 = r14 +cis_GR_rshf_2to61 = r15 +cis_GR_rshf = r16 +cis_GR_exp_2tom61 = r17 +cis_GR_n = r18 +cis_GR_n_sin = r19 +cis_exp_limit = r20 +cis_r_signexp = r21 +cis_AD_1 = r22 +cis_r_sincos = r23 +cis_r_exp = r24 +cis_r_17_ones = r25 +cis_GR_m_sin = r26 +cis_GR_32m_sin = r26 +cis_GR_n_cos = r27 +cis_GR_m_cos = r28 +cis_GR_32m_cos = r28 +cis_AD_2_sin = r29 +cis_AD_2_cos = r30 +cis_gr_tmp = r31 + +GR_SAVE_B0 = r35 +GR_SAVE_GP = r36 +rB0_SAVED = r37 +GR_SAVE_PFS = r38 +GR_SAVE_PR = r39 + +RODATA + +.align 16 +// Pi/16 parts +LOCAL_OBJECT_START(double_cis_pi) + data8 0xC90FDAA22168C234, 0x00003FFC // pi/16 1st part + data8 0xC4C6628B80DC1CD1, 0x00003FBC // pi/16 2nd part + data8 0xA4093822299F31D0, 0x00003F7A // pi/16 3rd part +LOCAL_OBJECT_END(double_cis_pi) + +// Coefficients for polynomials +LOCAL_OBJECT_START(double_cis_pq_k4) + data8 0x3EC71C963717C63A // P4 + data8 0x3EF9FFBA8F191AE6 // Q4 + data8 0xBF2A01A00F4E11A8 // P3 + data8 0xBF56C16C05AC77BF // Q3 + data8 0x3F8111111110F167 // P2 + data8 0x3FA555555554DD45 // Q2 + data8 0xBFC5555555555555 // P1 + data8 0xBFDFFFFFFFFFFFFC // Q1 +LOCAL_OBJECT_END(double_cis_pq_k4) + +// Sincos table (S[m], C[m]) +LOCAL_OBJECT_START(double_sin_cos_beta_k4) +data8 0x0000000000000000 , 0x00000000 // sin( 0 pi/16) S0 +data8 0x8000000000000000 , 0x00003fff // cos( 0 pi/16) C0 +// +data8 0xc7c5c1e34d3055b3 , 0x00003ffc // sin( 1 pi/16) S1 +data8 0xfb14be7fbae58157 , 0x00003ffe // cos( 1 pi/16) C1 +// +data8 0xc3ef1535754b168e , 0x00003ffd // sin( 2 pi/16) S2 +data8 0xec835e79946a3146 , 0x00003ffe // cos( 2 pi/16) C2 +// +data8 0x8e39d9cd73464364 , 0x00003ffe // sin( 3 pi/16) S3 +data8 0xd4db3148750d181a , 0x00003ffe // cos( 3 pi/16) C3 +// +data8 0xb504f333f9de6484 , 0x00003ffe // sin( 4 pi/16) S4 +data8 0xb504f333f9de6484 , 0x00003ffe // cos( 4 pi/16) C4 +// +data8 0xd4db3148750d181a , 0x00003ffe // sin( 5 pi/16) C3 +data8 0x8e39d9cd73464364 , 0x00003ffe // cos( 5 pi/16) S3 +// +data8 0xec835e79946a3146 , 0x00003ffe // sin( 6 pi/16) C2 +data8 0xc3ef1535754b168e , 0x00003ffd // cos( 6 pi/16) S2 +// +data8 0xfb14be7fbae58157 , 0x00003ffe // sin( 7 pi/16) C1 +data8 0xc7c5c1e34d3055b3 , 0x00003ffc // cos( 7 pi/16) S1 +// +data8 0x8000000000000000 , 0x00003fff // sin( 8 pi/16) C0 +data8 0x0000000000000000 , 0x00000000 // cos( 8 pi/16) S0 +// +data8 0xfb14be7fbae58157 , 0x00003ffe // sin( 9 pi/16) C1 +data8 0xc7c5c1e34d3055b3 , 0x0000bffc // cos( 9 pi/16) -S1 +// +data8 0xec835e79946a3146 , 0x00003ffe // sin(10 pi/16) C2 +data8 0xc3ef1535754b168e , 0x0000bffd // cos(10 pi/16) -S2 +// +data8 0xd4db3148750d181a , 0x00003ffe // sin(11 pi/16) C3 +data8 0x8e39d9cd73464364 , 0x0000bffe // cos(11 pi/16) -S3 +// +data8 0xb504f333f9de6484 , 0x00003ffe // sin(12 pi/16) S4 +data8 0xb504f333f9de6484 , 0x0000bffe // cos(12 pi/16) -S4 +// +data8 0x8e39d9cd73464364 , 0x00003ffe // sin(13 pi/16) S3 +data8 0xd4db3148750d181a , 0x0000bffe // cos(13 pi/16) -C3 +// +data8 0xc3ef1535754b168e , 0x00003ffd // sin(14 pi/16) S2 +data8 0xec835e79946a3146 , 0x0000bffe // cos(14 pi/16) -C2 +// +data8 0xc7c5c1e34d3055b3 , 0x00003ffc // sin(15 pi/16) S1 +data8 0xfb14be7fbae58157 , 0x0000bffe // cos(15 pi/16) -C1 +// +data8 0x0000000000000000 , 0x00000000 // sin(16 pi/16) S0 +data8 0x8000000000000000 , 0x0000bfff // cos(16 pi/16) -C0 +// +data8 0xc7c5c1e34d3055b3 , 0x0000bffc // sin(17 pi/16) -S1 +data8 0xfb14be7fbae58157 , 0x0000bffe // cos(17 pi/16) -C1 +// +data8 0xc3ef1535754b168e , 0x0000bffd // sin(18 pi/16) -S2 +data8 0xec835e79946a3146 , 0x0000bffe // cos(18 pi/16) -C2 +// +data8 0x8e39d9cd73464364 , 0x0000bffe // sin(19 pi/16) -S3 +data8 0xd4db3148750d181a , 0x0000bffe // cos(19 pi/16) -C3 +// +data8 0xb504f333f9de6484 , 0x0000bffe // sin(20 pi/16) -S4 +data8 0xb504f333f9de6484 , 0x0000bffe // cos(20 pi/16) -S4 +// +data8 0xd4db3148750d181a , 0x0000bffe // sin(21 pi/16) -C3 +data8 0x8e39d9cd73464364 , 0x0000bffe // cos(21 pi/16) -S3 +// +data8 0xec835e79946a3146 , 0x0000bffe // sin(22 pi/16) -C2 +data8 0xc3ef1535754b168e , 0x0000bffd // cos(22 pi/16) -S2 +// +data8 0xfb14be7fbae58157 , 0x0000bffe // sin(23 pi/16) -C1 +data8 0xc7c5c1e34d3055b3 , 0x0000bffc // cos(23 pi/16) -S1 +// +data8 0x8000000000000000 , 0x0000bfff // sin(24 pi/16) -C0 +data8 0x0000000000000000 , 0x00000000 // cos(24 pi/16) S0 +// +data8 0xfb14be7fbae58157 , 0x0000bffe // sin(25 pi/16) -C1 +data8 0xc7c5c1e34d3055b3 , 0x00003ffc // cos(25 pi/16) S1 +// +data8 0xec835e79946a3146 , 0x0000bffe // sin(26 pi/16) -C2 +data8 0xc3ef1535754b168e , 0x00003ffd // cos(26 pi/16) S2 +// +data8 0xd4db3148750d181a , 0x0000bffe // sin(27 pi/16) -C3 +data8 0x8e39d9cd73464364 , 0x00003ffe // cos(27 pi/16) S3 +// +data8 0xb504f333f9de6484 , 0x0000bffe // sin(28 pi/16) -S4 +data8 0xb504f333f9de6484 , 0x00003ffe // cos(28 pi/16) S4 +// +data8 0x8e39d9cd73464364 , 0x0000bffe // sin(29 pi/16) -S3 +data8 0xd4db3148750d181a , 0x00003ffe // cos(29 pi/16) C3 +// +data8 0xc3ef1535754b168e , 0x0000bffd // sin(30 pi/16) -S2 +data8 0xec835e79946a3146 , 0x00003ffe // cos(30 pi/16) C2 +// +data8 0xc7c5c1e34d3055b3 , 0x0000bffc // sin(31 pi/16) -S1 +data8 0xfb14be7fbae58157 , 0x00003ffe // cos(31 pi/16) C1 +// +data8 0x0000000000000000 , 0x00000000 // sin(32 pi/16) S0 +data8 0x8000000000000000 , 0x00003fff // cos(32 pi/16) C0 +LOCAL_OBJECT_END(double_sin_cos_beta_k4) + +.section .text + +GLOBAL_IEEE754_ENTRY(sincos) +// cis_GR_sig_inv_pi_by_16 = significand of 16/pi +{ .mlx + getf.exp cis_r_signexp = cis_Arg + movl cis_GR_sig_inv_pi_by_16 = 0xA2F9836E4E44152A + +} +// cis_GR_rshf_2to61 = 1.1000 2^(63+63-2) +{ .mlx + addl cis_AD_1 = @ltoff(double_cis_pi), gp + movl cis_GR_rshf_2to61 = 0x47b8000000000000 +};; + +{ .mfi + ld8 cis_AD_1 = [cis_AD_1] + fnorm.s1 cis_NORM_f8 = cis_Arg + cmp.eq p13, p14 = r0, r0 // p13 set for sincos +} +// cis_GR_exp_2tom61 = exponent of scaling factor 2^-61 +{ .mib + mov cis_GR_exp_2tom61 = 0xffff-61 + nop.i 0 + br.cond.sptk _CIS_COMMON +};; +GLOBAL_IEEE754_END(sincos) + +GLOBAL_LIBM_ENTRY(__libm_sincos) +// cis_GR_sig_inv_pi_by_16 = significand of 16/pi +{ .mlx + getf.exp cis_r_signexp = cis_Arg + movl cis_GR_sig_inv_pi_by_16 = 0xA2F9836E4E44152A +} +// cis_GR_rshf_2to61 = 1.1000 2^(63+63-2) +{ .mlx + addl cis_AD_1 = @ltoff(double_cis_pi), gp + movl cis_GR_rshf_2to61 = 0x47b8000000000000 +};; + +// p14 set for __libm_sincos and cis +{ .mfi + ld8 cis_AD_1 = [cis_AD_1] + fnorm.s1 cis_NORM_f8 = cis_Arg + cmp.eq p14, p13 = r0, r0 +} +// cis_GR_exp_2tom61 = exponent of scaling factor 2^-61 +{ .mib + mov cis_GR_exp_2tom61 = 0xffff-61 + nop.i 0 + nop.b 0 +};; + +_CIS_COMMON: +// Form two constants we need +// 16/pi * 2^-2 * 2^63, scaled by 2^61 since we just loaded the significand +// 1.1000...000 * 2^(63+63-2) to right shift int(W) into the low significand +// fcmp used to set denormal, and invalid on snans +{ .mfi + setf.sig cis_SIG_INV_PI_BY_16_2TO61 = cis_GR_sig_inv_pi_by_16 + fclass.m p6,p0 = cis_Arg, 0xe7 // if x=0,inf,nan + addl cis_gr_tmp = -1, r0 +} +// 1.1000 2^63 for right shift +{ .mlx + setf.d cis_RSHF_2TO61 = cis_GR_rshf_2to61 + movl cis_GR_rshf = 0x43e8000000000000 +};; + +// Form another constant +// 2^-61 for scaling Nfloat +// 0x1001a is register_bias + 27. +// So if f8 >= 2^27, go to large arguments routine +{ .mfi + alloc GR_SAVE_PFS = ar.pfs, 3, 5, 0, 0 + fclass.m p11,p0 = cis_Arg, 0x0b // Test for x=unorm + mov cis_exp_limit = 0x1001a +} +{ .mib + setf.exp cis_2TOM61 = cis_GR_exp_2tom61 + nop.i 0 +(p6) br.cond.spnt _CIS_SPECIAL_ARGS +};; + +// Load the two pieces of pi/16 +// Form another constant +// 1.1000...000 * 2^63, the right shift constant +{ .mmb + ldfe cis_Pi_by_16_hi = [cis_AD_1],16 + setf.d cis_RSHF = cis_GR_rshf +(p11) br.cond.spnt _CIS_UNORM // Branch if x=unorm +};; + +_CIS_COMMON2: +// Return here if x=unorm +// Create constant inexact set +{ .mmi + ldfe cis_Pi_by_16_lo = [cis_AD_1],16 + setf.sig cis_tmp = cis_gr_tmp + nop.i 0 +};; + +// Select exponent (17 lsb) +{ .mfi + ldfe cis_Pi_by_16_lowest = [cis_AD_1],16 + nop.f 0 + dep.z cis_r_exp = cis_r_signexp, 0, 17 +};; + +// Start loading P, Q coefficients +// p10 is true if we must call routines to handle larger arguments +// p10 is true if f8 exp is > 0x1001a +{ .mmb + ldfpd cis_P4,cis_Q4 = [cis_AD_1],16 + cmp.ge p10, p0 = cis_r_exp, cis_exp_limit +(p10) br.cond.spnt _CIS_LARGE_ARGS // go to |x| >= 2^27 path +};; + +// cis_W = x * cis_Inv_Pi_by_16 +// Multiply x by scaled 16/pi and add large const to shift integer part of W to +// rightmost bits of significand +{ .mfi + ldfpd cis_P3,cis_Q3 = [cis_AD_1],16 + fma.s1 cis_W_2TO61_RSH = cis_NORM_f8,cis_SIG_INV_PI_BY_16_2TO61,cis_RSHF_2TO61 + nop.i 0 +};; + +// get N = (int)cis_int_Nfloat +// cis_NFLOAT = Round_Int_Nearest(cis_W) +{ .mmf + getf.sig cis_GR_n = cis_W_2TO61_RSH + ldfpd cis_P2,cis_Q2 = [cis_AD_1],16 + fms.s1 cis_NFLOAT = cis_W_2TO61_RSH,cis_2TOM61,cis_RSHF +};; + +// cis_r = -cis_Nfloat * cis_Pi_by_16_hi + x +{ .mfi + ldfpd cis_P1,cis_Q1 = [cis_AD_1], 16 + fnma.s1 cis_r = cis_NFLOAT,cis_Pi_by_16_hi,cis_NORM_f8 + nop.i 0 +};; + +// Add 2^(k-1) (which is in cis_r_sincos) to N +{ .mmi + add cis_GR_n_cos = 0x8, cis_GR_n +;; +//Get M (least k+1 bits of N) + and cis_GR_m_sin = 0x1f,cis_GR_n + and cis_GR_m_cos = 0x1f,cis_GR_n_cos +};; + +{ .mmi + nop.m 0 + nop.m 0 + shl cis_GR_32m_sin = cis_GR_m_sin,5 +};; + +// Add 32*M to address of sin_cos_beta table +// cis_r = cis_r -cis_Nfloat * cis_Pi_by_16_lo +{ .mfi + add cis_AD_2_sin = cis_GR_32m_sin, cis_AD_1 + fnma.s1 cis_r = cis_NFLOAT, cis_Pi_by_16_lo, cis_r + shl cis_GR_32m_cos = cis_GR_m_cos,5 +};; + +// Add 32*M to address of sin_cos_beta table +{ .mmf + ldfe cis_Sm_sin = [cis_AD_2_sin],16 + add cis_AD_2_cos = cis_GR_32m_cos, cis_AD_1 + fclass.m.unc p10,p0 = cis_Arg,0x0b // den. input - uflow +};; + +{ .mfi + ldfe cis_Sm_cos = [cis_AD_2_cos], 16 + nop.i 0 +};; + +{ .mfi + ldfe cis_Cm_sin = [cis_AD_2_sin] + fma.s1 cis_rsq = cis_r, cis_r, f0 // get r^2 + nop.i 0 +} +// fmpy forces inexact flag +{ .mfi + nop.m 0 + fmpy.s0 cis_tmp = cis_tmp,cis_tmp + nop.i 0 +};; + +{ .mfi + nop.m 0 + fnma.s1 cis_r_exact = cis_NFLOAT, cis_Pi_by_16_lowest, cis_r + nop.i 0 +};; + +{ .mfi + ldfe cis_Cm_cos = [cis_AD_2_cos] + fma.s1 cis_P_temp1 = cis_rsq, cis_P4, cis_P3 + nop.i 0 +} + +{ .mfi + nop.m 0 + fma.s1 cis_Q_temp1 = cis_rsq, cis_Q4, cis_Q3 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fmpy.s1 cis_srsq_sin = cis_Sm_sin, cis_rsq + nop.i 0 +} +{ .mfi + nop.m 0 + fmpy.s1 cis_srsq_cos = cis_Sm_cos,cis_rsq + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 cis_Q_temp2 = cis_rsq, cis_Q_temp1, cis_Q2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 cis_P_temp2 = cis_rsq, cis_P_temp1, cis_P2 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fmpy.s1 cis_rcub = cis_r_exact, cis_rsq // get r^3 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 cis_Q = cis_rsq, cis_Q_temp2, cis_Q1 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 cis_P = cis_rsq, cis_P_temp2, cis_P1 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 cis_Q_sin = cis_srsq_sin,cis_Q, cis_Sm_sin + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 cis_Q_cos = cis_srsq_cos,cis_Q, cis_Sm_cos + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 cis_P = cis_rcub,cis_P, cis_r_exact // final P + nop.i 0 +};; + +// If den. arg, force underflow to be set +{ .mfi + nop.m 0 +(p10) fmpy.d.s0 cis_tmp = cis_Arg,cis_Arg + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.d.s0 cis_Sin_res = cis_Cm_sin,cis_P,cis_Q_sin//Final sin + nop.i 0 +} +{ .mfb + nop.m 0 + fma.d.s0 cis_Cos_res = cis_Cm_cos,cis_P,cis_Q_cos//Final cos +(p14) br.ret.sptk b0 // common exit for __libm_sincos and cis main path +};; + +{ .mmb + stfd [cis_pResSin] = cis_Sin_res + stfd [cis_pResCos] = cis_Cos_res + br.ret.sptk b0 // common exit for sincos main path +};; + +_CIS_SPECIAL_ARGS: +// sin(+/-0) = +/-0 +// sin(Inf) = NaN +// sin(NaN) = NaN +{ .mfi + nop.m 999 + fma.d.s0 cis_Sin_res = cis_Arg, f0, f0 // sinf(+/-0,NaN,Inf) + nop.i 999 +};; +// cos(+/-0) = 1.0 +// cos(Inf) = NaN +// cos(NaN) = NaN +{ .mfb + nop.m 999 + fma.d.s0 cis_Cos_res = cis_Arg, f0, f1 // cosf(+/-0,NaN,Inf) +(p14) br.ret.sptk b0 //spec exit for __libm_sincos and cis main path +};; + +{ .mmb + stfd [cis_pResSin] = cis_Sin_res + stfd [cis_pResCos] = cis_Cos_res + br.ret.sptk b0 // common exit for sincos main path +};; + +_CIS_UNORM: +// Here if x=unorm +{ .mfb + getf.exp cis_r_signexp = cis_NORM_f8 // Get signexp of x + fcmp.eq.s0 p11,p0 = cis_Arg, f0 // Dummy op to set denorm + br.cond.sptk _CIS_COMMON2 // Return to main path +};; + +GLOBAL_LIBM_END(__libm_sincos) + +//// |x| > 2^27 path /////// +.proc _CIS_LARGE_ARGS +_CIS_LARGE_ARGS: +.prologue +{ .mfi + nop.m 0 + nop.f 0 +.save ar.pfs, GR_SAVE_PFS + mov GR_SAVE_PFS = ar.pfs +} +;; + +{ .mfi + mov GR_SAVE_GP = gp + nop.f 0 +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0 = b0 +};; + +.body +// Call of huge arguments sincos +{ .mib + nop.m 0 + mov GR_SAVE_PR = pr + br.call.sptk b0 = __libm_sincos_large +};; + +{ .mfi + mov gp = GR_SAVE_GP + nop.f 0 + mov pr = GR_SAVE_PR, 0x1fffe +} +;; + +{ .mfi + nop.m 0 + nop.f 0 + mov b0 = GR_SAVE_B0 +} +;; + +{ .mfi + nop.m 0 + fma.d.s0 cis_Cos_res = cis_Cos_res, f1, f0 + mov ar.pfs = GR_SAVE_PFS +} +{ .mfb + nop.m 0 + fma.d.s0 cis_Sin_res = cis_Sin_res, f1, f0 +(p14) br.ret.sptk b0 // exit for |x| > 2^27 path (__libm_sincos and cis) +};; + +{ .mmb + stfd [cis_pResSin] = cis_Sin_res + stfd [cis_pResCos] = cis_Cos_res + br.ret.sptk b0 // exit for sincos |x| > 2^27 path +};; +.endp _CIS_LARGE_ARGS + +.type __libm_sincos_large#,@function +.global __libm_sincos_large# + diff --git a/sysdeps/ia64/fpu/libm_sincos_large.S b/sysdeps/ia64/fpu/libm_sincos_large.S new file mode 100644 index 0000000000..b09d3693a6 --- /dev/null +++ b/sysdeps/ia64/fpu/libm_sincos_large.S @@ -0,0 +1,2757 @@ +.file "libm_sincos_large.s" + + +// Copyright (c) 2002 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2002 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/15/02 Initial version +// 05/13/02 Changed interface to __libm_pi_by_2_reduce +// 02/10/03 Reordered header: .section, .global, .proc, .align; +// used data8 for long double table values +// 05/15/03 Reformatted data tables +// +// +// Overview of operation +//============================================================== +// +// These functions calculate the sin and cos for inputs +// greater than 2^10 +// +// __libm_sin_large# +// __libm_cos_large# +// They accept argument in f8 +// and return result in f8 without final rounding +// +// __libm_sincos_large# +// It accepts argument in f8 +// and returns cos in f8 and sin in f9 without final rounding +// +// +//********************************************************************* +// +// Accuracy: Within .7 ulps for 80-bit floating point values +// Very accurate for double precision values +// +//********************************************************************* +// +// Resources Used: +// +// Floating-Point Registers: f8 as Input Value, f8 and f9 as Return Values +// f32-f103 +// +// General Purpose Registers: +// r32-r43 +// r44-r45 (Used to pass arguments to pi_by_2 reduce routine) +// +// Predicate Registers: p6-p13 +// +//********************************************************************* +// +// IEEE Special Conditions: +// +// Denormal fault raised on denormal inputs +// Overflow exceptions do not occur +// Underflow exceptions raised when appropriate for sin +// (No specialized error handling for this routine) +// Inexact raised when appropriate by algorithm +// +// sin(SNaN) = QNaN +// sin(QNaN) = QNaN +// sin(inf) = QNaN +// sin(+/-0) = +/-0 +// cos(inf) = QNaN +// cos(SNaN) = QNaN +// cos(QNaN) = QNaN +// cos(0) = 1 +// +//********************************************************************* +// +// Mathematical Description +// ======================== +// +// The computation of FSIN and FCOS is best handled in one piece of +// code. The main reason is that given any argument Arg, computation +// of trigonometric functions first calculate N and an approximation +// to alpha where +// +// Arg = N pi/2 + alpha, |alpha| <= pi/4. +// +// Since +// +// cos( Arg ) = sin( (N+1) pi/2 + alpha ), +// +// therefore, the code for computing sine will produce cosine as long +// as 1 is added to N immediately after the argument reduction +// process. +// +// Let M = N if sine +// N+1 if cosine. +// +// Now, given +// +// Arg = M pi/2 + alpha, |alpha| <= pi/4, +// +// let I = M mod 4, or I be the two lsb of M when M is represented +// as 2's complement. I = [i_0 i_1]. Then +// +// sin( Arg ) = (-1)^i_0 sin( alpha ) if i_1 = 0, +// = (-1)^i_0 cos( alpha ) if i_1 = 1. +// +// For example: +// if M = -1, I = 11 +// sin ((-pi/2 + alpha) = (-1) cos (alpha) +// if M = 0, I = 00 +// sin (alpha) = sin (alpha) +// if M = 1, I = 01 +// sin (pi/2 + alpha) = cos (alpha) +// if M = 2, I = 10 +// sin (pi + alpha) = (-1) sin (alpha) +// if M = 3, I = 11 +// sin ((3/2)pi + alpha) = (-1) cos (alpha) +// +// The value of alpha is obtained by argument reduction and +// represented by two working precision numbers r and c where +// +// alpha = r + c accurately. +// +// The reduction method is described in a previous write up. +// The argument reduction scheme identifies 4 cases. For Cases 2 +// and 4, because |alpha| is small, sin(r+c) and cos(r+c) can be +// computed very easily by 2 or 3 terms of the Taylor series +// expansion as follows: +// +// Case 2: +// ------- +// +// sin(r + c) = r + c - r^3/6 accurately +// cos(r + c) = 1 - 2^(-67) accurately +// +// Case 4: +// ------- +// +// sin(r + c) = r + c - r^3/6 + r^5/120 accurately +// cos(r + c) = 1 - r^2/2 + r^4/24 accurately +// +// The only cases left are Cases 1 and 3 of the argument reduction +// procedure. These two cases will be merged since after the +// argument is reduced in either cases, we have the reduced argument +// represented as r + c and that the magnitude |r + c| is not small +// enough to allow the usage of a very short approximation. +// +// The required calculation is either +// +// sin(r + c) = sin(r) + correction, or +// cos(r + c) = cos(r) + correction. +// +// Specifically, +// +// sin(r + c) = sin(r) + c sin'(r) + O(c^2) +// = sin(r) + c cos (r) + O(c^2) +// = sin(r) + c(1 - r^2/2) accurately. +// Similarly, +// +// cos(r + c) = cos(r) - c sin(r) + O(c^2) +// = cos(r) - c(r - r^3/6) accurately. +// +// We therefore concentrate on accurately calculating sin(r) and +// cos(r) for a working-precision number r, |r| <= pi/4 to within +// 0.1% or so. +// +// The greatest challenge of this task is that the second terms of +// the Taylor series +// +// r - r^3/3! + r^r/5! - ... +// +// and +// +// 1 - r^2/2! + r^4/4! - ... +// +// are not very small when |r| is close to pi/4 and the rounding +// errors will be a concern if simple polynomial accumulation is +// used. When |r| < 2^-3, however, the second terms will be small +// enough (6 bits or so of right shift) that a normal Horner +// recurrence suffices. Hence there are two cases that we consider +// in the accurate computation of sin(r) and cos(r), |r| <= pi/4. +// +// Case small_r: |r| < 2^(-3) +// -------------------------- +// +// Since Arg = M pi/4 + r + c accurately, and M mod 4 is [i_0 i_1], +// we have +// +// sin(Arg) = (-1)^i_0 * sin(r + c) if i_1 = 0 +// = (-1)^i_0 * cos(r + c) if i_1 = 1 +// +// can be accurately approximated by +// +// sin(Arg) = (-1)^i_0 * [sin(r) + c] if i_1 = 0 +// = (-1)^i_0 * [cos(r) - c*r] if i_1 = 1 +// +// because |r| is small and thus the second terms in the correction +// are unneccessary. +// +// Finally, sin(r) and cos(r) are approximated by polynomials of +// moderate lengths. +// +// sin(r) = r + S_1 r^3 + S_2 r^5 + ... + S_5 r^11 +// cos(r) = 1 + C_1 r^2 + C_2 r^4 + ... + C_5 r^10 +// +// We can make use of predicates to selectively calculate +// sin(r) or cos(r) based on i_1. +// +// Case normal_r: 2^(-3) <= |r| <= pi/4 +// ------------------------------------ +// +// This case is more likely than the previous one if one considers +// r to be uniformly distributed in [-pi/4 pi/4]. Again, +// +// sin(Arg) = (-1)^i_0 * sin(r + c) if i_1 = 0 +// = (-1)^i_0 * cos(r + c) if i_1 = 1. +// +// Because |r| is now larger, we need one extra term in the +// correction. sin(Arg) can be accurately approximated by +// +// sin(Arg) = (-1)^i_0 * [sin(r) + c(1-r^2/2)] if i_1 = 0 +// = (-1)^i_0 * [cos(r) - c*r*(1 - r^2/6)] i_1 = 1. +// +// Finally, sin(r) and cos(r) are approximated by polynomials of +// moderate lengths. +// +// sin(r) = r + PP_1_hi r^3 + PP_1_lo r^3 + +// PP_2 r^5 + ... + PP_8 r^17 +// +// cos(r) = 1 + QQ_1 r^2 + QQ_2 r^4 + ... + QQ_8 r^16 +// +// where PP_1_hi is only about 16 bits long and QQ_1 is -1/2. +// The crux in accurate computation is to calculate +// +// r + PP_1_hi r^3 or 1 + QQ_1 r^2 +// +// accurately as two pieces: U_hi and U_lo. The way to achieve this +// is to obtain r_hi as a 10 sig. bit number that approximates r to +// roughly 8 bits or so of accuracy. (One convenient way is +// +// r_hi := frcpa( frcpa( r ) ).) +// +// This way, +// +// r + PP_1_hi r^3 = r + PP_1_hi r_hi^3 + +// PP_1_hi (r^3 - r_hi^3) +// = [r + PP_1_hi r_hi^3] + +// [PP_1_hi (r - r_hi) +// (r^2 + r_hi r + r_hi^2) ] +// = U_hi + U_lo +// +// Since r_hi is only 10 bit long and PP_1_hi is only 16 bit long, +// PP_1_hi * r_hi^3 is only at most 46 bit long and thus computed +// exactly. Furthermore, r and PP_1_hi r_hi^3 are of opposite sign +// and that there is no more than 8 bit shift off between r and +// PP_1_hi * r_hi^3. Hence the sum, U_hi, is representable and thus +// calculated without any error. Finally, the fact that +// +// |U_lo| <= 2^(-8) |U_hi| +// +// says that U_hi + U_lo is approximating r + PP_1_hi r^3 to roughly +// 8 extra bits of accuracy. +// +// Similarly, +// +// 1 + QQ_1 r^2 = [1 + QQ_1 r_hi^2] + +// [QQ_1 (r - r_hi)(r + r_hi)] +// = U_hi + U_lo. +// +// Summarizing, we calculate r_hi = frcpa( frcpa( r ) ). +// +// If i_1 = 0, then +// +// U_hi := r + PP_1_hi * r_hi^3 +// U_lo := PP_1_hi * (r - r_hi) * (r^2 + r*r_hi + r_hi^2) +// poly := PP_1_lo r^3 + PP_2 r^5 + ... + PP_8 r^17 +// correction := c * ( 1 + C_1 r^2 ) +// +// Else ...i_1 = 1 +// +// U_hi := 1 + QQ_1 * r_hi * r_hi +// U_lo := QQ_1 * (r - r_hi) * (r + r_hi) +// poly := QQ_2 * r^4 + QQ_3 * r^6 + ... + QQ_8 r^16 +// correction := -c * r * (1 + S_1 * r^2) +// +// End +// +// Finally, +// +// V := poly + ( U_lo + correction ) +// +// / U_hi + V if i_0 = 0 +// result := | +// \ (-U_hi) - V if i_0 = 1 +// +// It is important that in the last step, negation of U_hi is +// performed prior to the subtraction which is to be performed in +// the user-set rounding mode. +// +// +// Algorithmic Description +// ======================= +// +// The argument reduction algorithm is tightly integrated into FSIN +// and FCOS which share the same code. The following is complete and +// self-contained. The argument reduction description given +// previously is repeated below. +// +// +// Step 0. Initialization. +// +// If FSIN is invoked, set N_inc := 0; else if FCOS is invoked, +// set N_inc := 1. +// +// Step 1. Check for exceptional and special cases. +// +// * If Arg is +-0, +-inf, NaN, NaT, go to Step 10 for special +// handling. +// * If |Arg| < 2^24, go to Step 2 for reduction of moderate +// arguments. This is the most likely case. +// * If |Arg| < 2^63, go to Step 8 for pre-reduction of large +// arguments. +// * If |Arg| >= 2^63, go to Step 10 for special handling. +// +// Step 2. Reduction of moderate arguments. +// +// If |Arg| < pi/4 ...quick branch +// N_fix := N_inc (integer) +// r := Arg +// c := 0.0 +// Branch to Step 4, Case_1_complete +// Else ...cf. argument reduction +// N := Arg * two_by_PI (fp) +// N_fix := fcvt.fx( N ) (int) +// N := fcvt.xf( N_fix ) +// N_fix := N_fix + N_inc +// s := Arg - N * P_1 (first piece of pi/2) +// w := -N * P_2 (second piece of pi/2) +// +// If |s| >= 2^(-33) +// go to Step 3, Case_1_reduce +// Else +// go to Step 7, Case_2_reduce +// Endif +// Endif +// +// Step 3. Case_1_reduce. +// +// r := s + w +// c := (s - r) + w ...observe order +// +// Step 4. Case_1_complete +// +// ...At this point, the reduced argument alpha is +// ...accurately represented as r + c. +// If |r| < 2^(-3), go to Step 6, small_r. +// +// Step 5. Normal_r. +// +// Let [i_0 i_1] by the 2 lsb of N_fix. +// FR_rsq := r * r +// r_hi := frcpa( frcpa( r ) ) +// r_lo := r - r_hi +// +// If i_1 = 0, then +// poly := r*FR_rsq*(PP_1_lo + FR_rsq*(PP_2 + ... FR_rsq*PP_8)) +// U_hi := r + PP_1_hi*r_hi*r_hi*r_hi ...any order +// U_lo := PP_1_hi*r_lo*(r*r + r*r_hi + r_hi*r_hi) +// correction := c + c*C_1*FR_rsq ...any order +// Else +// poly := FR_rsq*FR_rsq*(QQ_2 + FR_rsq*(QQ_3 + ... + FR_rsq*QQ_8)) +// U_hi := 1 + QQ_1 * r_hi * r_hi ...any order +// U_lo := QQ_1 * r_lo * (r + r_hi) +// correction := -c*(r + S_1*FR_rsq*r) ...any order +// Endif +// +// V := poly + (U_lo + correction) ...observe order +// +// result := (i_0 == 0? 1.0 : -1.0) +// +// Last instruction in user-set rounding mode +// +// result := (i_0 == 0? result*U_hi + V : +// result*U_hi - V) +// +// Return +// +// Step 6. Small_r. +// +// ...Use flush to zero mode without causing exception +// Let [i_0 i_1] be the two lsb of N_fix. +// +// FR_rsq := r * r +// +// If i_1 = 0 then +// z := FR_rsq*FR_rsq; z := FR_rsq*z *r +// poly_lo := S_3 + FR_rsq*(S_4 + FR_rsq*S_5) +// poly_hi := r*FR_rsq*(S_1 + FR_rsq*S_2) +// correction := c +// result := r +// Else +// z := FR_rsq*FR_rsq; z := FR_rsq*z +// poly_lo := C_3 + FR_rsq*(C_4 + FR_rsq*C_5) +// poly_hi := FR_rsq*(C_1 + FR_rsq*C_2) +// correction := -c*r +// result := 1 +// Endif +// +// poly := poly_hi + (z * poly_lo + correction) +// +// If i_0 = 1, result := -result +// +// Last operation. Perform in user-set rounding mode +// +// result := (i_0 == 0? result + poly : +// result - poly ) +// Return +// +// Step 7. Case_2_reduce. +// +// ...Refer to the write up for argument reduction for +// ...rationale. The reduction algorithm below is taken from +// ...argument reduction description and integrated this. +// +// w := N*P_3 +// U_1 := N*P_2 + w ...FMA +// U_2 := (N*P_2 - U_1) + w ...2 FMA +// ...U_1 + U_2 is N*(P_2+P_3) accurately +// +// r := s - U_1 +// c := ( (s - r) - U_1 ) - U_2 +// +// ...The mathematical sum r + c approximates the reduced +// ...argument accurately. Note that although compared to +// ...Case 1, this case requires much more work to reduce +// ...the argument, the subsequent calculation needed for +// ...any of the trigonometric function is very little because +// ...|alpha| < 1.01*2^(-33) and thus two terms of the +// ...Taylor series expansion suffices. +// +// If i_1 = 0 then +// poly := c + S_1 * r * r * r ...any order +// result := r +// Else +// poly := -2^(-67) +// result := 1.0 +// Endif +// +// If i_0 = 1, result := -result +// +// Last operation. Perform in user-set rounding mode +// +// result := (i_0 == 0? result + poly : +// result - poly ) +// +// Return +// +// +// Step 8. Pre-reduction of large arguments. +// +// ...Again, the following reduction procedure was described +// ...in the separate write up for argument reduction, which +// ...is tightly integrated here. + +// N_0 := Arg * Inv_P_0 +// N_0_fix := fcvt.fx( N_0 ) +// N_0 := fcvt.xf( N_0_fix) + +// Arg' := Arg - N_0 * P_0 +// w := N_0 * d_1 +// N := Arg' * two_by_PI +// N_fix := fcvt.fx( N ) +// N := fcvt.xf( N_fix ) +// N_fix := N_fix + N_inc +// +// s := Arg' - N * P_1 +// w := w - N * P_2 +// +// If |s| >= 2^(-14) +// go to Step 3 +// Else +// go to Step 9 +// Endif +// +// Step 9. Case_4_reduce. +// +// ...first obtain N_0*d_1 and -N*P_2 accurately +// U_hi := N_0 * d_1 V_hi := -N*P_2 +// U_lo := N_0 * d_1 - U_hi V_lo := -N*P_2 - U_hi ...FMAs +// +// ...compute the contribution from N_0*d_1 and -N*P_3 +// w := -N*P_3 +// w := w + N_0*d_2 +// t := U_lo + V_lo + w ...any order +// +// ...at this point, the mathematical value +// ...s + U_hi + V_hi + t approximates the true reduced argument +// ...accurately. Just need to compute this accurately. +// +// ...Calculate U_hi + V_hi accurately: +// A := U_hi + V_hi +// if |U_hi| >= |V_hi| then +// a := (U_hi - A) + V_hi +// else +// a := (V_hi - A) + U_hi +// endif +// ...order in computing "a" must be observed. This branch is +// ...best implemented by predicates. +// ...A + a is U_hi + V_hi accurately. Moreover, "a" is +// ...much smaller than A: |a| <= (1/2)ulp(A). +// +// ...Just need to calculate s + A + a + t +// C_hi := s + A t := t + a +// C_lo := (s - C_hi) + A +// C_lo := C_lo + t +// +// ...Final steps for reduction +// r := C_hi + C_lo +// c := (C_hi - r) + C_lo +// +// ...At this point, we have r and c +// ...And all we need is a couple of terms of the corresponding +// ...Taylor series. +// +// If i_1 = 0 +// poly := c + r*FR_rsq*(S_1 + FR_rsq*S_2) +// result := r +// Else +// poly := FR_rsq*(C_1 + FR_rsq*C_2) +// result := 1 +// Endif +// +// If i_0 = 1, result := -result +// +// Last operation. Perform in user-set rounding mode +// +// result := (i_0 == 0? result + poly : +// result - poly ) +// Return +// +// Large Arguments: For arguments above 2**63, a Payne-Hanek +// style argument reduction is used and pi_by_2 reduce is called. +// + + +RODATA +.align 16 + +LOCAL_OBJECT_START(FSINCOS_CONSTANTS) + +data4 0x4B800000 // two**24 +data4 0xCB800000 // -two**24 +data4 0x00000000 // pad +data4 0x00000000 // pad +data8 0xA2F9836E4E44152A, 0x00003FFE // Inv_pi_by_2 +data8 0xC84D32B0CE81B9F1, 0x00004016 // P_0 +data8 0xC90FDAA22168C235, 0x00003FFF // P_1 +data8 0xECE675D1FC8F8CBB, 0x0000BFBD // P_2 +data8 0xB7ED8FBBACC19C60, 0x0000BF7C // P_3 +data4 0x5F000000 // two**63 +data4 0xDF000000 // -two**63 +data4 0x00000000 // pad +data4 0x00000000 // pad +data8 0xA397E5046EC6B45A, 0x00003FE7 // Inv_P_0 +data8 0x8D848E89DBD171A1, 0x0000BFBF // d_1 +data8 0xD5394C3618A66F8E, 0x0000BF7C // d_2 +data8 0xC90FDAA22168C234, 0x00003FFE // pi_by_4 +data8 0xC90FDAA22168C234, 0x0000BFFE // neg_pi_by_4 +data4 0x3E000000 // two**-3 +data4 0xBE000000 // -two**-3 +data4 0x00000000 // pad +data4 0x00000000 // pad +data4 0x2F000000 // two**-33 +data4 0xAF000000 // -two**-33 +data4 0x9E000000 // -two**-67 +data4 0x00000000 // pad +data8 0xCC8ABEBCA21C0BC9, 0x00003FCE // PP_8 +data8 0xD7468A05720221DA, 0x0000BFD6 // PP_7 +data8 0xB092382F640AD517, 0x00003FDE // PP_6 +data8 0xD7322B47D1EB75A4, 0x0000BFE5 // PP_5 +data8 0xFFFFFFFFFFFFFFFE, 0x0000BFFD // C_1 +data8 0xAAAA000000000000, 0x0000BFFC // PP_1_hi +data8 0xB8EF1D2ABAF69EEA, 0x00003FEC // PP_4 +data8 0xD00D00D00D03BB69, 0x0000BFF2 // PP_3 +data8 0x8888888888888962, 0x00003FF8 // PP_2 +data8 0xAAAAAAAAAAAB0000, 0x0000BFEC // PP_1_lo +data8 0xD56232EFC2B0FE52, 0x00003FD2 // QQ_8 +data8 0xC9C99ABA2B48DCA6, 0x0000BFDA // QQ_7 +data8 0x8F76C6509C716658, 0x00003FE2 // QQ_6 +data8 0x93F27DBAFDA8D0FC, 0x0000BFE9 // QQ_5 +data8 0xAAAAAAAAAAAAAAAA, 0x0000BFFC // S_1 +data8 0x8000000000000000, 0x0000BFFE // QQ_1 +data8 0xD00D00D00C6E5041, 0x00003FEF // QQ_4 +data8 0xB60B60B60B607F60, 0x0000BFF5 // QQ_3 +data8 0xAAAAAAAAAAAAAA9B, 0x00003FFA // QQ_2 +data8 0xFFFFFFFFFFFFFFFE, 0x0000BFFD // C_1 +data8 0xAAAAAAAAAAAA719F, 0x00003FFA // C_2 +data8 0xB60B60B60356F994, 0x0000BFF5 // C_3 +data8 0xD00CFFD5B2385EA9, 0x00003FEF // C_4 +data8 0x93E4BD18292A14CD, 0x0000BFE9 // C_5 +data8 0xAAAAAAAAAAAAAAAA, 0x0000BFFC // S_1 +data8 0x88888888888868DB, 0x00003FF8 // S_2 +data8 0xD00D00D0055EFD4B, 0x0000BFF2 // S_3 +data8 0xB8EF1C5D839730B9, 0x00003FEC // S_4 +data8 0xD71EA3A4E5B3F492, 0x0000BFE5 // S_5 +data4 0x38800000 // two**-14 +data4 0xB8800000 // -two**-14 +LOCAL_OBJECT_END(FSINCOS_CONSTANTS) + +// sin and cos registers + +// FR +FR_Input_X = f8 + +FR_r = f8 +FR_c = f9 + +FR_Two_to_63 = f32 +FR_Two_to_24 = f33 +FR_Pi_by_4 = f33 +FR_Two_to_M14 = f34 +FR_Two_to_M33 = f35 +FR_Neg_Two_to_24 = f36 +FR_Neg_Pi_by_4 = f36 +FR_Neg_Two_to_M14 = f37 +FR_Neg_Two_to_M33 = f38 +FR_Neg_Two_to_M67 = f39 +FR_Inv_pi_by_2 = f40 +FR_N_float = f41 +FR_N_fix = f42 +FR_P_1 = f43 +FR_P_2 = f44 +FR_P_3 = f45 +FR_s = f46 +FR_w = f47 +FR_d_2 = f48 +FR_prelim = f49 +FR_Z = f50 +FR_A = f51 +FR_a = f52 +FR_t = f53 +FR_U_1 = f54 +FR_U_2 = f55 +FR_C_1 = f56 +FR_C_2 = f57 +FR_C_3 = f58 +FR_C_4 = f59 +FR_C_5 = f60 +FR_S_1 = f61 +FR_S_2 = f62 +FR_S_3 = f63 +FR_S_4 = f64 +FR_S_5 = f65 +FR_poly_hi = f66 +FR_poly_lo = f67 +FR_r_hi = f68 +FR_r_lo = f69 +FR_rsq = f70 +FR_r_cubed = f71 +FR_C_hi = f72 +FR_N_0 = f73 +FR_d_1 = f74 +FR_V = f75 +FR_V_hi = f75 +FR_V_lo = f76 +FR_U_hi = f77 +FR_U_lo = f78 +FR_U_hiabs = f79 +FR_V_hiabs = f80 +FR_PP_8 = f81 +FR_QQ_8 = f81 +FR_PP_7 = f82 +FR_QQ_7 = f82 +FR_PP_6 = f83 +FR_QQ_6 = f83 +FR_PP_5 = f84 +FR_QQ_5 = f84 +FR_PP_4 = f85 +FR_QQ_4 = f85 +FR_PP_3 = f86 +FR_QQ_3 = f86 +FR_PP_2 = f87 +FR_QQ_2 = f87 +FR_QQ_1 = f88 +FR_N_0_fix = f89 +FR_Inv_P_0 = f90 +FR_corr = f91 +FR_poly = f92 +FR_Neg_Two_to_M3 = f93 +FR_Two_to_M3 = f94 +FR_Neg_Two_to_63 = f94 +FR_P_0 = f95 +FR_C_lo = f96 +FR_PP_1 = f97 +FR_PP_1_lo = f98 +FR_ArgPrime = f99 + +// GR +GR_Table_Base = r32 +GR_Table_Base1 = r33 +GR_i_0 = r34 +GR_i_1 = r35 +GR_N_Inc = r36 +GR_Sin_or_Cos = r37 + +GR_SAVE_B0 = r39 +GR_SAVE_GP = r40 +GR_SAVE_PFS = r41 + +// sincos combined routine registers + +// GR +GR_SINCOS_SAVE_PFS = r32 +GR_SINCOS_SAVE_B0 = r33 +GR_SINCOS_SAVE_GP = r34 + +// FR +FR_SINCOS_ARG = f100 +FR_SINCOS_RES_SIN = f101 + + +.section .text + + +GLOBAL_LIBM_ENTRY(__libm_sincos_large) + +{ .mfi + alloc GR_SINCOS_SAVE_PFS = ar.pfs,0,3,0,0 + fma.s1 FR_SINCOS_ARG = f8, f1, f0 // Save argument for sin and cos + mov GR_SINCOS_SAVE_B0 = b0 +};; + +{ .mfb + mov GR_SINCOS_SAVE_GP = gp + nop.f 0 + br.call.sptk b0 = __libm_sin_large // Call sin +};; + +{ .mfi + nop.m 0 + fma.s1 FR_SINCOS_RES_SIN = f8, f1, f0 // Save sin result + nop.i 0 +};; + +{ .mfb + nop.m 0 + fma.s1 f8 = FR_SINCOS_ARG, f1, f0 // Arg for cos + br.call.sptk b0 = __libm_cos_large // Call cos +};; + +{ .mfi + mov gp = GR_SINCOS_SAVE_GP + fma.s1 f9 = FR_SINCOS_RES_SIN, f1, f0 // Out sin result + mov b0 = GR_SINCOS_SAVE_B0 +};; + +{ .mib + nop.m 0 + mov ar.pfs = GR_SINCOS_SAVE_PFS + br.ret.sptk b0 // sincos_large exit +};; + +GLOBAL_LIBM_END(__libm_sincos_large) + + + + +GLOBAL_LIBM_ENTRY(__libm_sin_large) + +{ .mlx +alloc GR_Table_Base = ar.pfs,0,12,2,0 + movl GR_Sin_or_Cos = 0x0 ;; +} + +{ .mmi + nop.m 999 + addl GR_Table_Base = @ltoff(FSINCOS_CONSTANTS#), gp + nop.i 999 +} +;; + +{ .mmi + ld8 GR_Table_Base = [GR_Table_Base] + nop.m 999 + nop.i 999 +} +;; + + +{ .mib + nop.m 999 + nop.i 999 + br.cond.sptk SINCOS_CONTINUE ;; +} + +GLOBAL_LIBM_END(__libm_sin_large) + +GLOBAL_LIBM_ENTRY(__libm_cos_large) + +{ .mlx +alloc GR_Table_Base= ar.pfs,0,12,2,0 + movl GR_Sin_or_Cos = 0x1 ;; +} + +{ .mmi + nop.m 999 + addl GR_Table_Base = @ltoff(FSINCOS_CONSTANTS#), gp + nop.i 999 +} +;; + +{ .mmi + ld8 GR_Table_Base = [GR_Table_Base] + nop.m 999 + nop.i 999 +} +;; + +// +// Load Table Address +// +SINCOS_CONTINUE: + +{ .mmi + add GR_Table_Base1 = 96, GR_Table_Base + ldfs FR_Two_to_24 = [GR_Table_Base], 4 + nop.i 999 +} +;; + +{ .mmi + nop.m 999 +// +// Load 2**24, load 2**63. +// + ldfs FR_Neg_Two_to_24 = [GR_Table_Base], 12 + mov r41 = ar.pfs ;; +} + +{ .mfi + ldfs FR_Two_to_63 = [GR_Table_Base1], 4 +// +// Check for unnormals - unsupported operands. We do not want +// to generate denormal exception +// Check for NatVals, QNaNs, SNaNs, +/-Infs +// Check for EM unsupporteds +// Check for Zero +// + fclass.m.unc p6, p8 = FR_Input_X, 0x1E3 + mov r40 = gp ;; +} + +{ .mfi + nop.m 999 + fclass.nm.unc p8, p0 = FR_Input_X, 0x1FF +// GR_Sin_or_Cos denotes + mov r39 = b0 +} + +{ .mfb + ldfs FR_Neg_Two_to_63 = [GR_Table_Base1], 12 + fclass.m.unc p10, p0 = FR_Input_X, 0x007 +(p6) br.cond.spnt SINCOS_SPECIAL ;; +} + +{ .mib + nop.m 999 + nop.i 999 +(p8) br.cond.spnt SINCOS_SPECIAL ;; +} + +{ .mib + nop.m 999 + nop.i 999 +// +// Branch if +/- NaN, Inf. +// Load -2**24, load -2**63. +// +(p10) br.cond.spnt SINCOS_ZERO ;; +} + +{ .mmb + ldfe FR_Inv_pi_by_2 = [GR_Table_Base], 16 + ldfe FR_Inv_P_0 = [GR_Table_Base1], 16 + nop.b 999 ;; +} + +{ .mmb + nop.m 999 + ldfe FR_d_1 = [GR_Table_Base1], 16 + nop.b 999 ;; +} +// +// Raise possible denormal operand flag with useful fcmp +// Is x <= -2**63 +// Load Inv_P_0 for pre-reduction +// Load Inv_pi_by_2 +// + +{ .mmb + ldfe FR_P_0 = [GR_Table_Base], 16 + ldfe FR_d_2 = [GR_Table_Base1], 16 + nop.b 999 ;; +} +// +// Load P_0 +// Load d_1 +// Is x >= 2**63 +// Is x <= -2**24? +// + +{ .mmi + ldfe FR_P_1 = [GR_Table_Base], 16 ;; +// +// Load P_1 +// Load d_2 +// Is x >= 2**24? +// + ldfe FR_P_2 = [GR_Table_Base], 16 + nop.i 999 ;; +} + +{ .mmf + nop.m 999 + ldfe FR_P_3 = [GR_Table_Base], 16 + fcmp.le.unc.s1 p7, p8 = FR_Input_X, FR_Neg_Two_to_24 +} + +{ .mfi + nop.m 999 +// +// Branch if +/- zero. +// Decide about the paths to take: +// If -2**24 < FR_Input_X < 2**24 - CASE 1 OR 2 +// OTHERWISE - CASE 3 OR 4 +// + fcmp.le.unc.s1 p10, p11 = FR_Input_X, FR_Neg_Two_to_63 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p8) fcmp.ge.s1 p7, p0 = FR_Input_X, FR_Two_to_24 + nop.i 999 +} + +{ .mfi + ldfe FR_Pi_by_4 = [GR_Table_Base1], 16 +(p11) fcmp.ge.s1 p10, p0 = FR_Input_X, FR_Two_to_63 + nop.i 999 ;; +} + +{ .mmi + ldfe FR_Neg_Pi_by_4 = [GR_Table_Base1], 16 ;; + ldfs FR_Two_to_M3 = [GR_Table_Base1], 4 + nop.i 999 ;; +} + +{ .mib + ldfs FR_Neg_Two_to_M3 = [GR_Table_Base1], 12 + nop.i 999 +// +// Load P_2 +// Load P_3 +// Load pi_by_4 +// Load neg_pi_by_4 +// Load 2**(-3) +// Load -2**(-3). +// +(p10) br.cond.spnt SINCOS_ARG_TOO_LARGE ;; +} + +{ .mib + nop.m 999 + nop.i 999 +// +// Branch out if x >= 2**63. Use Payne-Hanek Reduction +// +(p7) br.cond.spnt SINCOS_LARGER_ARG ;; +} + +{ .mfi + nop.m 999 +// +// Branch if Arg <= -2**24 or Arg >= 2**24 and use pre-reduction. +// + fma.s1 FR_N_float = FR_Input_X, FR_Inv_pi_by_2, f0 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 + fcmp.lt.unc.s1 p6, p7 = FR_Input_X, FR_Pi_by_4 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// Select the case when |Arg| < pi/4 +// Else Select the case when |Arg| >= pi/4 +// + fcvt.fx.s1 FR_N_fix = FR_N_float + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N = Arg * 2/pi +// Check if Arg < pi/4 +// +(p6) fcmp.gt.s1 p6, p7 = FR_Input_X, FR_Neg_Pi_by_4 + nop.i 999 ;; +} +// +// Case 2: Convert integer N_fix back to normalized floating-point value. +// Case 1: p8 is only affected when p6 is set +// + +{ .mfi +(p7) ldfs FR_Two_to_M33 = [GR_Table_Base1], 4 +// +// Grab the integer part of N and call it N_fix +// +(p6) fmerge.se FR_r = FR_Input_X, FR_Input_X +// If |x| < pi/4, r = x and c = 0 +// lf |x| < pi/4, is x < 2**(-3). +// r = Arg +// c = 0 +(p6) mov GR_N_Inc = GR_Sin_or_Cos ;; +} + +{ .mmf + nop.m 999 +(p7) ldfs FR_Neg_Two_to_M33 = [GR_Table_Base1], 4 +(p6) fmerge.se FR_c = f0, f0 +} + +{ .mfi + nop.m 999 +(p6) fcmp.lt.unc.s1 p8, p9 = FR_Input_X, FR_Two_to_M3 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// lf |x| < pi/4, is -2**(-3)< x < 2**(-3) - set p8. +// If |x| >= pi/4, +// Create the right N for |x| < pi/4 and otherwise +// Case 2: Place integer part of N in GP register +// +(p7) fcvt.xf FR_N_float = FR_N_fix + nop.i 999 ;; +} + +{ .mmf + nop.m 999 +(p7) getf.sig GR_N_Inc = FR_N_fix +(p8) fcmp.gt.s1 p8, p0 = FR_Input_X, FR_Neg_Two_to_M3 ;; +} + +{ .mib + nop.m 999 + nop.i 999 +// +// Load 2**(-33), -2**(-33) +// +(p8) br.cond.spnt SINCOS_SMALL_R ;; +} + +{ .mib + nop.m 999 + nop.i 999 +(p6) br.cond.sptk SINCOS_NORMAL_R ;; +} +// +// if |x| < pi/4, branch based on |x| < 2**(-3) or otherwise. +// +// +// In this branch, |x| >= pi/4. +// + +{ .mfi + ldfs FR_Neg_Two_to_M67 = [GR_Table_Base1], 8 +// +// Load -2**(-67) +// + fnma.s1 FR_s = FR_N_float, FR_P_1, FR_Input_X +// +// w = N * P_2 +// s = -N * P_1 + Arg +// + add GR_N_Inc = GR_N_Inc, GR_Sin_or_Cos +} + +{ .mfi + nop.m 999 + fma.s1 FR_w = FR_N_float, FR_P_2, f0 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// Adjust N_fix by N_inc to determine whether sine or +// cosine is being calculated +// + fcmp.lt.unc.s1 p7, p6 = FR_s, FR_Two_to_M33 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p7) fcmp.gt.s1 p7, p6 = FR_s, FR_Neg_Two_to_M33 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// Remember x >= pi/4. +// Is s <= -2**(-33) or s >= 2**(-33) (p6) +// or -2**(-33) < s < 2**(-33) (p7) +(p6) fms.s1 FR_r = FR_s, f1, FR_w + nop.i 999 +} + +{ .mfi + nop.m 999 +(p7) fma.s1 FR_w = FR_N_float, FR_P_3, f0 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p7) fma.s1 FR_U_1 = FR_N_float, FR_P_2, FR_w + nop.i 999 +} + +{ .mfi + nop.m 999 +(p6) fms.s1 FR_c = FR_s, f1, FR_r + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// For big s: r = s - w: No futher reduction is necessary +// For small s: w = N * P_3 (change sign) More reduction +// +(p6) fcmp.lt.unc.s1 p8, p9 = FR_r, FR_Two_to_M3 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p8) fcmp.gt.s1 p8, p9 = FR_r, FR_Neg_Two_to_M3 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p7) fms.s1 FR_r = FR_s, f1, FR_U_1 + nop.i 999 +} + +{ .mfb + nop.m 999 +// +// For big s: Is |r| < 2**(-3)? +// For big s: c = S - r +// For small s: U_1 = N * P_2 + w +// +// If p8 is set, prepare to branch to Small_R. +// If p9 is set, prepare to branch to Normal_R. +// For big s, r is complete here. +// +(p6) fms.s1 FR_c = FR_c, f1, FR_w +// +// For big s: c = c + w (w has not been negated.) +// For small s: r = S - U_1 +// +(p8) br.cond.spnt SINCOS_SMALL_R ;; +} + +{ .mib + nop.m 999 + nop.i 999 +(p9) br.cond.sptk SINCOS_NORMAL_R ;; +} + +{ .mfi +(p7) add GR_Table_Base1 = 224, GR_Table_Base1 +// +// Branch to SINCOS_SMALL_R or SINCOS_NORMAL_R +// +(p7) fms.s1 FR_U_2 = FR_N_float, FR_P_2, FR_U_1 +// +// c = S - U_1 +// r = S_1 * r +// +// +(p7) extr.u GR_i_1 = GR_N_Inc, 0, 1 +} + +{ .mmi + nop.m 999 ;; +// +// Get [i_0,i_1] - two lsb of N_fix_gr. +// Do dummy fmpy so inexact is always set. +// +(p7) cmp.eq.unc p9, p10 = 0x0, GR_i_1 +(p7) extr.u GR_i_0 = GR_N_Inc, 1, 1 ;; +} +// +// For small s: U_2 = N * P_2 - U_1 +// S_1 stored constant - grab the one stored with the +// coefficients. +// + +{ .mfi +(p7) ldfe FR_S_1 = [GR_Table_Base1], 16 +// +// Check if i_1 and i_0 != 0 +// +(p10) fma.s1 FR_poly = f0, f1, FR_Neg_Two_to_M67 +(p7) cmp.eq.unc p11, p12 = 0x0, GR_i_0 ;; +} + +{ .mfi + nop.m 999 +(p7) fms.s1 FR_s = FR_s, f1, FR_r + nop.i 999 +} + +{ .mfi + nop.m 999 +// +// S = S - r +// U_2 = U_2 + w +// load S_1 +// +(p7) fma.s1 FR_rsq = FR_r, FR_r, f0 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p7) fma.s1 FR_U_2 = FR_U_2, f1, FR_w + nop.i 999 +} + +{ .mfi + nop.m 999 +//(p7) fmerge.se FR_Input_X = FR_r, FR_r +(p7) fmerge.se FR_prelim = FR_r, FR_r + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +//(p10) fma.s1 FR_Input_X = f0, f1, f1 +(p10) fma.s1 FR_prelim = f0, f1, f1 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// FR_rsq = r * r +// Save r as the result. +// +(p7) fms.s1 FR_c = FR_s, f1, FR_U_1 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// if ( i_1 ==0) poly = c + S_1*r*r*r +// else Result = 1 +// +//(p12) fnma.s1 FR_Input_X = FR_Input_X, f1, f0 +(p12) fnma.s1 FR_prelim = FR_prelim, f1, f0 + nop.i 999 +} + +{ .mfi + nop.m 999 +(p7) fma.s1 FR_r = FR_S_1, FR_r, f0 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p7) fma.d.s1 FR_S_1 = FR_S_1, FR_S_1, f0 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// If i_1 != 0, poly = 2**(-67) +// +(p7) fms.s1 FR_c = FR_c, f1, FR_U_2 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// c = c - U_2 +// +(p9) fma.s1 FR_poly = FR_r, FR_rsq, FR_c + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// i_0 != 0, so Result = -Result +// +(p11) fma.s1 FR_Input_X = FR_prelim, f1, FR_poly + nop.i 999 ;; +} + +{ .mfb + nop.m 999 +(p12) fms.s1 FR_Input_X = FR_prelim, f1, FR_poly +// +// if (i_0 == 0), Result = Result + poly +// else Result = Result - poly +// + br.ret.sptk b0 ;; +} +SINCOS_LARGER_ARG: + +{ .mfi + nop.m 999 + fma.s1 FR_N_0 = FR_Input_X, FR_Inv_P_0, f0 + nop.i 999 +} +;; + +// This path for argument > 2*24 +// Adjust table_ptr1 to beginning of table. +// + +{ .mmi + nop.m 999 + addl GR_Table_Base = @ltoff(FSINCOS_CONSTANTS#), gp + nop.i 999 +} +;; + +{ .mmi + ld8 GR_Table_Base = [GR_Table_Base] + nop.m 999 + nop.i 999 +} +;; + + +// +// Point to 2*-14 +// N_0 = Arg * Inv_P_0 +// + +{ .mmi + add GR_Table_Base = 688, GR_Table_Base ;; + ldfs FR_Two_to_M14 = [GR_Table_Base], 4 + nop.i 999 ;; +} + +{ .mfi + ldfs FR_Neg_Two_to_M14 = [GR_Table_Base], 0 + nop.f 999 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// Load values 2**(-14) and -2**(-14) +// + fcvt.fx.s1 FR_N_0_fix = FR_N_0 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N_0_fix = integer part of N_0 +// + fcvt.xf FR_N_0 = FR_N_0_fix + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// Make N_0 the integer part +// + fnma.s1 FR_ArgPrime = FR_N_0, FR_P_0, FR_Input_X + nop.i 999 +} + +{ .mfi + nop.m 999 + fma.s1 FR_w = FR_N_0, FR_d_1, f0 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// Arg' = -N_0 * P_0 + Arg +// w = N_0 * d_1 +// + fma.s1 FR_N_float = FR_ArgPrime, FR_Inv_pi_by_2, f0 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N = A' * 2/pi +// + fcvt.fx.s1 FR_N_fix = FR_N_float + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N_fix is the integer part +// + fcvt.xf FR_N_float = FR_N_fix + nop.i 999 ;; +} + +{ .mfi + getf.sig GR_N_Inc = FR_N_fix + nop.f 999 + nop.i 999 ;; +} + +{ .mii + nop.m 999 + nop.i 999 ;; + add GR_N_Inc = GR_N_Inc, GR_Sin_or_Cos ;; +} + +{ .mfi + nop.m 999 +// +// N is the integer part of the reduced-reduced argument. +// Put the integer in a GP register +// + fnma.s1 FR_s = FR_N_float, FR_P_1, FR_ArgPrime + nop.i 999 +} + +{ .mfi + nop.m 999 + fnma.s1 FR_w = FR_N_float, FR_P_2, FR_w + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// s = -N*P_1 + Arg' +// w = -N*P_2 + w +// N_fix_gr = N_fix_gr + N_inc +// + fcmp.lt.unc.s1 p9, p8 = FR_s, FR_Two_to_M14 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p9) fcmp.gt.s1 p9, p8 = FR_s, FR_Neg_Two_to_M14 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// For |s| > 2**(-14) r = S + w (r complete) +// Else U_hi = N_0 * d_1 +// +(p9) fma.s1 FR_V_hi = FR_N_float, FR_P_2, f0 + nop.i 999 +} + +{ .mfi + nop.m 999 +(p9) fma.s1 FR_U_hi = FR_N_0, FR_d_1, f0 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// Either S <= -2**(-14) or S >= 2**(-14) +// or -2**(-14) < s < 2**(-14) +// +(p8) fma.s1 FR_r = FR_s, f1, FR_w + nop.i 999 +} + +{ .mfi + nop.m 999 +(p9) fma.s1 FR_w = FR_N_float, FR_P_3, f0 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// We need abs of both U_hi and V_hi - don't +// worry about switched sign of V_hi. +// +(p9) fms.s1 FR_A = FR_U_hi, f1, FR_V_hi + nop.i 999 +} + +{ .mfi + nop.m 999 +// +// Big s: finish up c = (S - r) + w (c complete) +// Case 4: A = U_hi + V_hi +// Note: Worry about switched sign of V_hi, so subtract instead of add. +// +(p9) fnma.s1 FR_V_lo = FR_N_float, FR_P_2, FR_V_hi + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p9) fms.s1 FR_U_lo = FR_N_0, FR_d_1, FR_U_hi + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p9) fmerge.s FR_V_hiabs = f0, FR_V_hi + nop.i 999 +} + +{ .mfi + nop.m 999 +// For big s: c = S - r +// For small s do more work: U_lo = N_0 * d_1 - U_hi +// +(p9) fmerge.s FR_U_hiabs = f0, FR_U_hi + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// For big s: Is |r| < 2**(-3) +// For big s: if p12 set, prepare to branch to Small_R. +// For big s: If p13 set, prepare to branch to Normal_R. +// +(p8) fms.s1 FR_c = FR_s, f1, FR_r + nop.i 999 +} + +{ .mfi + nop.m 999 +// +// For small S: V_hi = N * P_2 +// w = N * P_3 +// Note the product does not include the (-) as in the writeup +// so (-) missing for V_hi and w. +// +(p8) fcmp.lt.unc.s1 p12, p13 = FR_r, FR_Two_to_M3 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p12) fcmp.gt.s1 p12, p13 = FR_r, FR_Neg_Two_to_M3 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p8) fma.s1 FR_c = FR_c, f1, FR_w + nop.i 999 +} + +{ .mfb + nop.m 999 +(p9) fms.s1 FR_w = FR_N_0, FR_d_2, FR_w +(p12) br.cond.spnt SINCOS_SMALL_R ;; +} + +{ .mib + nop.m 999 + nop.i 999 +(p13) br.cond.sptk SINCOS_NORMAL_R ;; +} + +{ .mfi + nop.m 999 +// +// Big s: Vector off when |r| < 2**(-3). Recall that p8 will be true. +// The remaining stuff is for Case 4. +// Small s: V_lo = N * P_2 + U_hi (U_hi is in place of V_hi in writeup) +// Note: the (-) is still missing for V_lo. +// Small s: w = w + N_0 * d_2 +// Note: the (-) is now incorporated in w. +// +(p9) fcmp.ge.unc.s1 p10, p11 = FR_U_hiabs, FR_V_hiabs + extr.u GR_i_1 = GR_N_Inc, 0, 1 ;; +} + +{ .mfi + nop.m 999 +// +// C_hi = S + A +// +(p9) fma.s1 FR_t = FR_U_lo, f1, FR_V_lo + extr.u GR_i_0 = GR_N_Inc, 1, 1 ;; +} + +{ .mfi + nop.m 999 +// +// t = U_lo + V_lo +// +// +(p10) fms.s1 FR_a = FR_U_hi, f1, FR_A + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p11) fma.s1 FR_a = FR_V_hi, f1, FR_A + nop.i 999 +} +;; + +{ .mmi + nop.m 999 + addl GR_Table_Base = @ltoff(FSINCOS_CONSTANTS#), gp + nop.i 999 +} +;; + +{ .mmi + ld8 GR_Table_Base = [GR_Table_Base] + nop.m 999 + nop.i 999 +} +;; + + +{ .mfi + add GR_Table_Base = 528, GR_Table_Base +// +// Is U_hiabs >= V_hiabs? +// +(p9) fma.s1 FR_C_hi = FR_s, f1, FR_A + nop.i 999 ;; +} + +{ .mmi + ldfe FR_C_1 = [GR_Table_Base], 16 ;; + ldfe FR_C_2 = [GR_Table_Base], 64 + nop.i 999 ;; +} + +{ .mmf + nop.m 999 +// +// c = c + C_lo finished. +// Load C_2 +// + ldfe FR_S_1 = [GR_Table_Base], 16 +// +// C_lo = S - C_hi +// + fma.s1 FR_t = FR_t, f1, FR_w ;; +} +// +// r and c have been computed. +// Make sure ftz mode is set - should be automatic when using wre +// |r| < 2**(-3) +// Get [i_0,i_1] - two lsb of N_fix. +// Load S_1 +// + +{ .mfi + ldfe FR_S_2 = [GR_Table_Base], 64 +// +// t = t + w +// +(p10) fms.s1 FR_a = FR_a, f1, FR_V_hi + cmp.eq.unc p9, p10 = 0x0, GR_i_0 +} + +{ .mfi + nop.m 999 +// +// For larger u than v: a = U_hi - A +// Else a = V_hi - A (do an add to account for missing (-) on V_hi +// + fms.s1 FR_C_lo = FR_s, f1, FR_C_hi + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p11) fms.s1 FR_a = FR_U_hi, f1, FR_a + cmp.eq.unc p11, p12 = 0x0, GR_i_1 +} + +{ .mfi + nop.m 999 +// +// If u > v: a = (U_hi - A) + V_hi +// Else a = (V_hi - A) + U_hi +// In each case account for negative missing from V_hi. +// + fma.s1 FR_C_lo = FR_C_lo, f1, FR_A + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// C_lo = (S - C_hi) + A +// + fma.s1 FR_t = FR_t, f1, FR_a + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// t = t + a +// + fma.s1 FR_C_lo = FR_C_lo, f1, FR_t + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// C_lo = C_lo + t +// Adjust Table_Base to beginning of table +// + fma.s1 FR_r = FR_C_hi, f1, FR_C_lo + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// Load S_2 +// + fma.s1 FR_rsq = FR_r, FR_r, f0 + nop.i 999 +} + +{ .mfi + nop.m 999 +// +// Table_Base points to C_1 +// r = C_hi + C_lo +// + fms.s1 FR_c = FR_C_hi, f1, FR_r + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// if i_1 ==0: poly = S_2 * FR_rsq + S_1 +// else poly = C_2 * FR_rsq + C_1 +// +//(p11) fma.s1 FR_Input_X = f0, f1, FR_r +(p11) fma.s1 FR_prelim = f0, f1, FR_r + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +//(p12) fma.s1 FR_Input_X = f0, f1, f1 +(p12) fma.s1 FR_prelim = f0, f1, f1 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// Compute r_cube = FR_rsq * r +// +(p11) fma.s1 FR_poly = FR_rsq, FR_S_2, FR_S_1 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p12) fma.s1 FR_poly = FR_rsq, FR_C_2, FR_C_1 + nop.i 999 +} + +{ .mfi + nop.m 999 +// +// Compute FR_rsq = r * r +// Is i_1 == 0 ? +// + fma.s1 FR_r_cubed = FR_rsq, FR_r, f0 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// c = C_hi - r +// Load C_1 +// + fma.s1 FR_c = FR_c, f1, FR_C_lo + nop.i 999 +} + +{ .mfi + nop.m 999 +// +// if i_1 ==0: poly = r_cube * poly + c +// else poly = FR_rsq * poly +// +//(p10) fms.s1 FR_Input_X = f0, f1, FR_Input_X +(p10) fms.s1 FR_prelim = f0, f1, FR_prelim + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// if i_1 ==0: Result = r +// else Result = 1.0 +// +(p11) fma.s1 FR_poly = FR_r_cubed, FR_poly, FR_c + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p12) fma.s1 FR_poly = FR_rsq, FR_poly, f0 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// if i_0 !=0: Result = -Result +// +(p9) fma.s1 FR_Input_X = FR_prelim, f1, FR_poly + nop.i 999 ;; +} + +{ .mfb + nop.m 999 +(p10) fms.s1 FR_Input_X = FR_prelim, f1, FR_poly +// +// if i_0 == 0: Result = Result + poly +// else Result = Result - poly +// + br.ret.sptk b0 ;; +} +SINCOS_SMALL_R: + +{ .mii + nop.m 999 + extr.u GR_i_1 = GR_N_Inc, 0, 1 ;; +// +// +// Compare both i_1 and i_0 with 0. +// if i_1 == 0, set p9. +// if i_0 == 0, set p11. +// + cmp.eq.unc p9, p10 = 0x0, GR_i_1 ;; +} + +{ .mfi + nop.m 999 + fma.s1 FR_rsq = FR_r, FR_r, f0 + extr.u GR_i_0 = GR_N_Inc, 1, 1 ;; +} + +{ .mfi + nop.m 999 +// +// Z = Z * FR_rsq +// +(p10) fnma.s1 FR_c = FR_c, FR_r, f0 + cmp.eq.unc p11, p12 = 0x0, GR_i_0 +} +;; + +// ****************************************************************** +// ****************************************************************** +// ****************************************************************** +// r and c have been computed. +// We know whether this is the sine or cosine routine. +// Make sure ftz mode is set - should be automatic when using wre +// |r| < 2**(-3) +// +// Set table_ptr1 to beginning of constant table. +// Get [i_0,i_1] - two lsb of N_fix_gr. +// + +{ .mmi + nop.m 999 + addl GR_Table_Base = @ltoff(FSINCOS_CONSTANTS#), gp + nop.i 999 +} +;; + +{ .mmi + ld8 GR_Table_Base = [GR_Table_Base] + nop.m 999 + nop.i 999 +} +;; + + +// +// Set table_ptr1 to point to S_5. +// Set table_ptr1 to point to C_5. +// Compute FR_rsq = r * r +// + +{ .mfi +(p9) add GR_Table_Base = 672, GR_Table_Base +(p10) fmerge.s FR_r = f1, f1 +(p10) add GR_Table_Base = 592, GR_Table_Base ;; +} +// +// Set table_ptr1 to point to S_5. +// Set table_ptr1 to point to C_5. +// + +{ .mmi +(p9) ldfe FR_S_5 = [GR_Table_Base], -16 ;; +// +// if (i_1 == 0) load S_5 +// if (i_1 != 0) load C_5 +// +(p9) ldfe FR_S_4 = [GR_Table_Base], -16 + nop.i 999 ;; +} + +{ .mmf +(p10) ldfe FR_C_5 = [GR_Table_Base], -16 +// +// Z = FR_rsq * FR_rsq +// +(p9) ldfe FR_S_3 = [GR_Table_Base], -16 +// +// Compute FR_rsq = r * r +// if (i_1 == 0) load S_4 +// if (i_1 != 0) load C_4 +// + fma.s1 FR_Z = FR_rsq, FR_rsq, f0 ;; +} +// +// if (i_1 == 0) load S_3 +// if (i_1 != 0) load C_3 +// + +{ .mmi +(p9) ldfe FR_S_2 = [GR_Table_Base], -16 ;; +// +// if (i_1 == 0) load S_2 +// if (i_1 != 0) load C_2 +// +(p9) ldfe FR_S_1 = [GR_Table_Base], -16 + nop.i 999 +} + +{ .mmi +(p10) ldfe FR_C_4 = [GR_Table_Base], -16 ;; +(p10) ldfe FR_C_3 = [GR_Table_Base], -16 + nop.i 999 ;; +} + +{ .mmi +(p10) ldfe FR_C_2 = [GR_Table_Base], -16 ;; +(p10) ldfe FR_C_1 = [GR_Table_Base], -16 + nop.i 999 +} + +{ .mfi + nop.m 999 +// +// if (i_1 != 0): +// poly_lo = FR_rsq * C_5 + C_4 +// poly_hi = FR_rsq * C_2 + C_1 +// +(p9) fma.s1 FR_Z = FR_Z, FR_r, f0 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// if (i_1 == 0) load S_1 +// if (i_1 != 0) load C_1 +// +(p9) fma.s1 FR_poly_lo = FR_rsq, FR_S_5, FR_S_4 + nop.i 999 +} + +{ .mfi + nop.m 999 +// +// c = -c * r +// dummy fmpy's to flag inexact. +// +(p9) fma.d.s1 FR_S_4 = FR_S_4, FR_S_4, f0 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// poly_lo = FR_rsq * poly_lo + C_3 +// poly_hi = FR_rsq * poly_hi +// + fma.s1 FR_Z = FR_Z, FR_rsq, f0 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p9) fma.s1 FR_poly_hi = FR_rsq, FR_S_2, FR_S_1 + nop.i 999 +} + +{ .mfi + nop.m 999 +// +// if (i_1 == 0): +// poly_lo = FR_rsq * S_5 + S_4 +// poly_hi = FR_rsq * S_2 + S_1 +// +(p10) fma.s1 FR_poly_lo = FR_rsq, FR_C_5, FR_C_4 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// if (i_1 == 0): +// Z = Z * r for only one of the small r cases - not there +// in original implementation notes. +// +(p9) fma.s1 FR_poly_lo = FR_rsq, FR_poly_lo, FR_S_3 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p10) fma.s1 FR_poly_hi = FR_rsq, FR_C_2, FR_C_1 + nop.i 999 +} + +{ .mfi + nop.m 999 +(p10) fma.d.s1 FR_C_1 = FR_C_1, FR_C_1, f0 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p9) fma.s1 FR_poly_hi = FR_poly_hi, FR_rsq, f0 + nop.i 999 +} + +{ .mfi + nop.m 999 +// +// poly_lo = FR_rsq * poly_lo + S_3 +// poly_hi = FR_rsq * poly_hi +// +(p10) fma.s1 FR_poly_lo = FR_rsq, FR_poly_lo, FR_C_3 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p10) fma.s1 FR_poly_hi = FR_poly_hi, FR_rsq, f0 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// if (i_1 == 0): dummy fmpy's to flag inexact +// r = 1 +// +(p9) fma.s1 FR_poly_hi = FR_r, FR_poly_hi, f0 + nop.i 999 +} + +{ .mfi + nop.m 999 +// +// poly_hi = r * poly_hi +// + fma.s1 FR_poly = FR_Z, FR_poly_lo, FR_c + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p12) fms.s1 FR_r = f0, f1, FR_r + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// poly_hi = Z * poly_lo + c +// if i_0 == 1: r = -r +// + fma.s1 FR_poly = FR_poly, f1, FR_poly_hi + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p12) fms.s1 FR_Input_X = FR_r, f1, FR_poly + nop.i 999 +} + +{ .mfb + nop.m 999 +// +// poly = poly + poly_hi +// +(p11) fma.s1 FR_Input_X = FR_r, f1, FR_poly +// +// if (i_0 == 0) Result = r + poly +// if (i_0 != 0) Result = r - poly +// + br.ret.sptk b0 ;; +} +SINCOS_NORMAL_R: + +{ .mii + nop.m 999 + extr.u GR_i_1 = GR_N_Inc, 0, 1 ;; +// +// Set table_ptr1 and table_ptr2 to base address of +// constant table. + cmp.eq.unc p9, p10 = 0x0, GR_i_1 ;; +} + +{ .mfi + nop.m 999 + fma.s1 FR_rsq = FR_r, FR_r, f0 + extr.u GR_i_0 = GR_N_Inc, 1, 1 ;; +} + +{ .mfi + nop.m 999 + frcpa.s1 FR_r_hi, p6 = f1, FR_r + cmp.eq.unc p11, p12 = 0x0, GR_i_0 +} +;; + +// ****************************************************************** +// ****************************************************************** +// ****************************************************************** +// +// r and c have been computed. +// We known whether this is the sine or cosine routine. +// Make sure ftz mode is set - should be automatic when using wre +// Get [i_0,i_1] - two lsb of N_fix_gr alone. +// + +{ .mmi + nop.m 999 + addl GR_Table_Base = @ltoff(FSINCOS_CONSTANTS#), gp + nop.i 999 +} +;; + +{ .mmi + ld8 GR_Table_Base = [GR_Table_Base] + nop.m 999 + nop.i 999 +} +;; + + +{ .mfi +(p10) add GR_Table_Base = 384, GR_Table_Base +//(p12) fms.s1 FR_Input_X = f0, f1, f1 +(p12) fms.s1 FR_prelim = f0, f1, f1 +(p9) add GR_Table_Base = 224, GR_Table_Base ;; +} + +{ .mmf + nop.m 999 +(p10) ldfe FR_QQ_8 = [GR_Table_Base], 16 +// +// if (i_1==0) poly = poly * FR_rsq + PP_1_lo +// else poly = FR_rsq * poly +// +//(p11) fma.s1 FR_Input_X = f0, f1, f1 ;; +(p11) fma.s1 FR_prelim = f0, f1, f1 ;; +} + +{ .mmf +(p10) ldfe FR_QQ_7 = [GR_Table_Base], 16 +// +// Adjust table pointers based on i_0 +// Compute rsq = r * r +// +(p9) ldfe FR_PP_8 = [GR_Table_Base], 16 + fma.s1 FR_r_cubed = FR_r, FR_rsq, f0 ;; +} + +{ .mmf +(p9) ldfe FR_PP_7 = [GR_Table_Base], 16 +(p10) ldfe FR_QQ_6 = [GR_Table_Base], 16 +// +// Load PP_8 and QQ_8; PP_7 and QQ_7 +// + frcpa.s1 FR_r_hi, p6 = f1, FR_r_hi ;; +} +// +// if (i_1==0) poly = PP_7 + FR_rsq * PP_8. +// else poly = QQ_7 + FR_rsq * QQ_8. +// + +{ .mmb +(p9) ldfe FR_PP_6 = [GR_Table_Base], 16 +(p10) ldfe FR_QQ_5 = [GR_Table_Base], 16 + nop.b 999 ;; +} + +{ .mmb +(p9) ldfe FR_PP_5 = [GR_Table_Base], 16 +(p10) ldfe FR_S_1 = [GR_Table_Base], 16 + nop.b 999 ;; +} + +{ .mmb +(p10) ldfe FR_QQ_1 = [GR_Table_Base], 16 +(p9) ldfe FR_C_1 = [GR_Table_Base], 16 + nop.b 999 ;; +} + +{ .mmi +(p10) ldfe FR_QQ_4 = [GR_Table_Base], 16 ;; +(p9) ldfe FR_PP_1 = [GR_Table_Base], 16 + nop.i 999 ;; +} + +{ .mmf +(p10) ldfe FR_QQ_3 = [GR_Table_Base], 16 +// +// if (i_1=0) corr = corr + c*c +// else corr = corr * c +// +(p9) ldfe FR_PP_4 = [GR_Table_Base], 16 +(p10) fma.s1 FR_poly = FR_rsq, FR_QQ_8, FR_QQ_7 ;; +} +// +// if (i_1=0) poly = rsq * poly + PP_5 +// else poly = rsq * poly + QQ_5 +// Load PP_4 or QQ_4 +// + +{ .mmf +(p9) ldfe FR_PP_3 = [GR_Table_Base], 16 +(p10) ldfe FR_QQ_2 = [GR_Table_Base], 16 +// +// r_hi = frcpa(frcpa(r)). +// r_cube = r * FR_rsq. +// +(p9) fma.s1 FR_poly = FR_rsq, FR_PP_8, FR_PP_7 ;; +} +// +// Do dummy multiplies so inexact is always set. +// + +{ .mfi +(p9) ldfe FR_PP_2 = [GR_Table_Base], 16 +// +// r_lo = r - r_hi +// +(p9) fma.s1 FR_U_lo = FR_r_hi, FR_r_hi, f0 + nop.i 999 ;; +} + +{ .mmf + nop.m 999 +(p9) ldfe FR_PP_1_lo = [GR_Table_Base], 16 +(p10) fma.s1 FR_corr = FR_S_1, FR_r_cubed, FR_r +} + +{ .mfi + nop.m 999 +(p10) fma.s1 FR_poly = FR_rsq, FR_poly, FR_QQ_6 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// if (i_1=0) U_lo = r_hi * r_hi +// else U_lo = r_hi + r +// +(p9) fma.s1 FR_corr = FR_C_1, FR_rsq, f0 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// if (i_1=0) corr = C_1 * rsq +// else corr = S_1 * r_cubed + r +// +(p9) fma.s1 FR_poly = FR_rsq, FR_poly, FR_PP_6 + nop.i 999 +} + +{ .mfi + nop.m 999 +(p10) fma.s1 FR_U_lo = FR_r_hi, f1, FR_r + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// if (i_1=0) U_hi = r_hi + U_hi +// else U_hi = QQ_1 * U_hi + 1 +// +(p9) fma.s1 FR_U_lo = FR_r, FR_r_hi, FR_U_lo + nop.i 999 +} + +{ .mfi + nop.m 999 +// +// U_hi = r_hi * r_hi +// + fms.s1 FR_r_lo = FR_r, f1, FR_r_hi + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// Load PP_1, PP_6, PP_5, and C_1 +// Load QQ_1, QQ_6, QQ_5, and S_1 +// + fma.s1 FR_U_hi = FR_r_hi, FR_r_hi, f0 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p10) fma.s1 FR_poly = FR_rsq, FR_poly, FR_QQ_5 + nop.i 999 +} + +{ .mfi + nop.m 999 +(p10) fnma.s1 FR_corr = FR_corr, FR_c, f0 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// if (i_1=0) U_lo = r * r_hi + U_lo +// else U_lo = r_lo * U_lo +// +(p9) fma.s1 FR_corr = FR_corr, FR_c, FR_c + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p9) fma.s1 FR_poly = FR_rsq, FR_poly, FR_PP_5 + nop.i 999 +} + +{ .mfi + nop.m 999 +// +// if (i_1 =0) U_hi = r + U_hi +// if (i_1 =0) U_lo = r_lo * U_lo +// +// +(p9) fma.d.s1 FR_PP_5 = FR_PP_5, FR_PP_4, f0 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p9) fma.s1 FR_U_lo = FR_r, FR_r, FR_U_lo + nop.i 999 +} + +{ .mfi + nop.m 999 +(p10) fma.s1 FR_U_lo = FR_r_lo, FR_U_lo, f0 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// if (i_1=0) poly = poly * rsq + PP_6 +// else poly = poly * rsq + QQ_6 +// +(p9) fma.s1 FR_U_hi = FR_r_hi, FR_U_hi, f0 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p10) fma.s1 FR_poly = FR_rsq, FR_poly, FR_QQ_4 + nop.i 999 +} + +{ .mfi + nop.m 999 +(p10) fma.s1 FR_U_hi = FR_QQ_1, FR_U_hi, f1 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p10) fma.d.s1 FR_QQ_5 = FR_QQ_5, FR_QQ_5, f0 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// if (i_1!=0) U_hi = PP_1 * U_hi +// if (i_1!=0) U_lo = r * r + U_lo +// Load PP_3 or QQ_3 +// +(p9) fma.s1 FR_poly = FR_rsq, FR_poly, FR_PP_4 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p9) fma.s1 FR_U_lo = FR_r_lo, FR_U_lo, f0 + nop.i 999 +} + +{ .mfi + nop.m 999 +(p10) fma.s1 FR_U_lo = FR_QQ_1,FR_U_lo, f0 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p9) fma.s1 FR_U_hi = FR_PP_1, FR_U_hi, f0 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p10) fma.s1 FR_poly = FR_rsq, FR_poly, FR_QQ_3 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// Load PP_2, QQ_2 +// +(p9) fma.s1 FR_poly = FR_rsq, FR_poly, FR_PP_3 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// if (i_1==0) poly = FR_rsq * poly + PP_3 +// else poly = FR_rsq * poly + QQ_3 +// Load PP_1_lo +// +(p9) fma.s1 FR_U_lo = FR_PP_1, FR_U_lo, f0 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// if (i_1 =0) poly = poly * rsq + pp_r4 +// else poly = poly * rsq + qq_r4 +// +(p9) fma.s1 FR_U_hi = FR_r, f1, FR_U_hi + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p10) fma.s1 FR_poly = FR_rsq, FR_poly, FR_QQ_2 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// if (i_1==0) U_lo = PP_1_hi * U_lo +// else U_lo = QQ_1 * U_lo +// +(p9) fma.s1 FR_poly = FR_rsq, FR_poly, FR_PP_2 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// if (i_0==0) Result = 1 +// else Result = -1 +// + fma.s1 FR_V = FR_U_lo, f1, FR_corr + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p10) fma.s1 FR_poly = FR_rsq, FR_poly, f0 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// if (i_1==0) poly = FR_rsq * poly + PP_2 +// else poly = FR_rsq * poly + QQ_2 +// +(p9) fma.s1 FR_poly = FR_rsq, FR_poly, FR_PP_1_lo + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p10) fma.s1 FR_poly = FR_rsq, FR_poly, f0 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// V = U_lo + corr +// +(p9) fma.s1 FR_poly = FR_r_cubed, FR_poly, f0 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// if (i_1==0) poly = r_cube * poly +// else poly = FR_rsq * poly +// + fma.s1 FR_V = FR_poly, f1, FR_V + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +//(p12) fms.s1 FR_Input_X = FR_Input_X, FR_U_hi, FR_V +(p12) fms.s1 FR_Input_X = FR_prelim, FR_U_hi, FR_V + nop.i 999 +} + +{ .mfb + nop.m 999 +// +// V = V + poly +// +//(p11) fma.s1 FR_Input_X = FR_Input_X, FR_U_hi, FR_V +(p11) fma.s1 FR_Input_X = FR_prelim, FR_U_hi, FR_V +// +// if (i_0==0) Result = Result * U_hi + V +// else Result = Result * U_hi - V +// + br.ret.sptk b0 ;; +} + +// +// If cosine, FR_Input_X = 1 +// If sine, FR_Input_X = +/-Zero (Input FR_Input_X) +// Results are exact, no exceptions +// +SINCOS_ZERO: + +{ .mmb + cmp.eq.unc p6, p7 = 0x1, GR_Sin_or_Cos + nop.m 999 + nop.b 999 ;; +} + +{ .mfi + nop.m 999 +(p7) fmerge.s FR_Input_X = FR_Input_X, FR_Input_X + nop.i 999 +} + +{ .mfb + nop.m 999 +(p6) fmerge.s FR_Input_X = f1, f1 + br.ret.sptk b0 ;; +} + +SINCOS_SPECIAL: + +// +// Path for Arg = +/- QNaN, SNaN, Inf +// Invalid can be raised. SNaNs +// become QNaNs +// + +{ .mfb + nop.m 999 + fmpy.s1 FR_Input_X = FR_Input_X, f0 + br.ret.sptk b0 ;; +} +GLOBAL_LIBM_END(__libm_cos_large) + + +// ******************************************************************* +// ******************************************************************* +// ******************************************************************* +// +// Special Code to handle very large argument case. +// Call int __libm_pi_by_2_reduce(x,r,c) for |arguments| >= 2**63 +// The interface is custom: +// On input: +// (Arg or x) is in f8 +// On output: +// r is in f8 +// c is in f9 +// N is in r8 +// Be sure to allocate at least 2 GP registers as output registers for +// __libm_pi_by_2_reduce. This routine uses r49-50. These are used as +// scratch registers within the __libm_pi_by_2_reduce routine (for speed). +// +// We know also that __libm_pi_by_2_reduce preserves f10-15, f71-127. We +// use this to eliminate save/restore of key fp registers in this calling +// function. +// +// ******************************************************************* +// ******************************************************************* +// ******************************************************************* + +LOCAL_LIBM_ENTRY(__libm_callout_2) +SINCOS_ARG_TOO_LARGE: + +.prologue +// Readjust Table ptr +{ .mfi + adds GR_Table_Base1 = -16, GR_Table_Base1 + nop.f 999 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +};; + +{ .mmi + ldfs FR_Two_to_M3 = [GR_Table_Base1],4 + mov GR_SAVE_GP=gp // Save gp +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; + +.body +// +// Call argument reduction with x in f8 +// Returns with N in r8, r in f8, c in f9 +// Assumes f71-127 are preserved across the call +// +{ .mib + ldfs FR_Neg_Two_to_M3 = [GR_Table_Base1],0 + nop.i 0 + br.call.sptk b0=__libm_pi_by_2_reduce# +};; + +{ .mfi + add GR_N_Inc = GR_Sin_or_Cos,r8 + fcmp.lt.unc.s1 p6, p0 = FR_r, FR_Two_to_M3 + mov b0 = GR_SAVE_B0 // Restore return address +};; + +{ .mfi + mov gp = GR_SAVE_GP // Restore gp +(p6) fcmp.gt.unc.s1 p6, p0 = FR_r, FR_Neg_Two_to_M3 + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs +};; + +{ .mbb + nop.m 999 +(p6) br.cond.spnt SINCOS_SMALL_R // Branch if |r| < 1/4 + br.cond.sptk SINCOS_NORMAL_R ;; // Branch if 1/4 <= |r| < pi/4 +} + +LOCAL_LIBM_END(__libm_callout_2) + +.type __libm_pi_by_2_reduce#,@function +.global __libm_pi_by_2_reduce# + diff --git a/sysdeps/ia64/fpu/libm_sincosf.S b/sysdeps/ia64/fpu/libm_sincosf.S new file mode 100644 index 0000000000..cf23356ef4 --- /dev/null +++ b/sysdeps/ia64/fpu/libm_sincosf.S @@ -0,0 +1,745 @@ +.file "libm_sincosf.s" + + +// Copyright (c) 2002 - 2005, Intel Corporation +// All rights reserved. +// +// Contributed 2002 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/01/02 Initial version +// 02/18/02 Large arguments processing routine is excluded. +// External interface entry points are added +// 02/26/02 Added temporary return of results in r8, r9 +// 03/13/02 Corrected restore of predicate registers +// 03/19/02 Added stack unwind around call to __libm_cisf_large +// 09/05/02 Work range is widened by reduction strengthen (2 parts of Pi/16) +// 02/10/03 Reordered header: .section, .global, .proc, .align +// 02/11/04 cisf is moved to the separate file. +// 03/31/05 Reformatted delimiters between data tables + +// API +//============================================================== +// 1) void sincosf(float, float*s, float*c) +// 2) __libm_sincosf - internal LIBM function, that accepts +// argument in f8 and returns cosine through f8, sine through f9 + +// +// Overview of operation +//============================================================== +// +// Step 1 +// ====== +// Reduce x to region -1/2*pi/2^k ===== 0 ===== +1/2*pi/2^k where k=4 +// divide x by pi/2^k. +// Multiply by 2^k/pi. +// nfloat = Round result to integer (round-to-nearest) +// +// r = x - nfloat * pi/2^k +// Do this as (x - nfloat * HIGH(pi/2^k)) - nfloat * LOW(pi/2^k) for increased accuracy. +// pi/2^k is stored as two numbers that when added make pi/2^k. +// pi/2^k = HIGH(pi/2^k) + LOW(pi/2^k) +// HIGH part is rounded to zero, LOW - to nearest +// +// x = (nfloat * pi/2^k) + r +// r is small enough that we can use a polynomial approximation +// and is referred to as the reduced argument. +// +// Step 3 +// ====== +// Take the unreduced part and remove the multiples of 2pi. +// So nfloat = nfloat (with lower k+1 bits cleared) + lower k+1 bits +// +// nfloat (with lower k+1 bits cleared) is a multiple of 2^(k+1) +// N * 2^(k+1) +// nfloat * pi/2^k = N * 2^(k+1) * pi/2^k + (lower k+1 bits) * pi/2^k +// nfloat * pi/2^k = N * 2 * pi + (lower k+1 bits) * pi/2^k +// nfloat * pi/2^k = N2pi + M * pi/2^k +// +// +// Sin(x) = Sin((nfloat * pi/2^k) + r) +// = Sin(nfloat * pi/2^k) * Cos(r) + Cos(nfloat * pi/2^k) * Sin(r) +// +// Sin(nfloat * pi/2^k) = Sin(N2pi + Mpi/2^k) +// = Sin(N2pi)Cos(Mpi/2^k) + Cos(N2pi)Sin(Mpi/2^k) +// = Sin(Mpi/2^k) +// +// Cos(nfloat * pi/2^k) = Cos(N2pi + Mpi/2^k) +// = Cos(N2pi)Cos(Mpi/2^k) + Sin(N2pi)Sin(Mpi/2^k) +// = Cos(Mpi/2^k) +// +// Sin(x) = Sin(Mpi/2^k) Cos(r) + Cos(Mpi/2^k) Sin(r) +// +// +// Step 4 +// ====== +// 0 <= M < 2^(k+1) +// There are 2^(k+1) Sin entries in a table. +// There are 2^(k+1) Cos entries in a table. +// +// Get Sin(Mpi/2^k) and Cos(Mpi/2^k) by table lookup. +// +// +// Step 5 +// ====== +// Calculate Cos(r) and Sin(r) by polynomial approximation. +// +// Cos(r) = 1 + r^2 q1 + r^4 q2 = Series for Cos +// Sin(r) = r + r^3 p1 + r^5 p2 = Series for Sin +// +// and the coefficients q1, q2 and p1, p2 are stored in a table +// +// +// Calculate +// Sin(x) = Sin(Mpi/2^k) Cos(r) + Cos(Mpi/2^k) Sin(r) +// +// as follows +// +// S[m] = Sin(Mpi/2^k) and C[m] = Cos(Mpi/2^k) +// rsq = r*r +// +// +// P = p1 + r^2p2 +// Q = q1 + r^2q2 +// +// rcub = r * rsq +// Sin(r) = r + rcub * P +// = r + r^3p1 + r^5p2 = Sin(r) +// +// P = r + rcub * P +// +// Answer = S[m] Cos(r) + C[m] P +// +// Cos(r) = 1 + rsq Q +// Cos(r) = 1 + r^2 Q +// Cos(r) = 1 + r^2 (q1 + r^2q2) +// Cos(r) = 1 + r^2q1 + r^4q2 +// +// S[m] Cos(r) = S[m](1 + rsq Q) +// S[m] Cos(r) = S[m] + S[m] rsq Q +// S[m] Cos(r) = S[m] + s_rsq Q +// Q = S[m] + s_rsq Q +// +// Then, +// +// Answer = Q + C[m] P + + +// Registers used +//============================================================== +// general input registers: +// r14 -> r19 +// r32 -> r49 + +// predicate registers used: +// p6 -> p14 + +// floating-point registers used +// f9 -> f15 +// f32 -> f100 + +// Assembly macros +//============================================================== + +cisf_Arg = f8 + +cisf_Sin_res = f9 +cisf_Cos_res = f8 + + +cisf_NORM_f8 = f10 +cisf_W = f11 +cisf_int_Nfloat = f12 +cisf_Nfloat = f13 + +cisf_r = f14 +cisf_r_exact = f68 +cisf_rsq = f15 +cisf_rcub = f32 + +cisf_Inv_Pi_by_16 = f33 +cisf_Pi_by_16_hi = f34 +cisf_Pi_by_16_lo = f35 + +cisf_Inv_Pi_by_64 = f36 +cisf_Pi_by_64_hi = f37 +cisf_Pi_by_64_lo = f38 + + +cisf_P1 = f39 +cisf_Q1 = f40 +cisf_P2 = f41 +cisf_Q2 = f42 +cisf_P3 = f43 +cisf_Q3 = f44 +cisf_P4 = f45 +cisf_Q4 = f46 + +cisf_P_temp1 = f47 +cisf_P_temp2 = f48 + +cisf_Q_temp1 = f49 +cisf_Q_temp2 = f50 + +cisf_P = f51 + +cisf_SIG_INV_PI_BY_16_2TO61 = f52 +cisf_RSHF_2TO61 = f53 +cisf_RSHF = f54 +cisf_2TOM61 = f55 +cisf_NFLOAT = f56 +cisf_W_2TO61_RSH = f57 + +cisf_tmp = f58 + +cisf_Sm_sin = f59 +cisf_Cm_sin = f60 + +cisf_Sm_cos = f61 +cisf_Cm_cos = f62 + +cisf_srsq_sin = f63 +cisf_srsq_cos = f64 + +cisf_Q_sin = f65 +cisf_Q_cos = f66 +cisf_Q = f67 + +///////////////////////////////////////////////////////////// + +cisf_pResSin = r33 +cisf_pResCos = r34 + +cisf_exp_limit = r35 +cisf_r_signexp = r36 +cisf_AD_beta_table = r37 +cisf_r_sincos = r38 + +cisf_r_exp = r39 +cisf_r_17_ones = r40 + +cisf_GR_sig_inv_pi_by_16 = r14 +cisf_GR_rshf_2to61 = r15 +cisf_GR_rshf = r16 +cisf_GR_exp_2tom61 = r17 +cisf_GR_n = r18 + +cisf_GR_n_sin = r19 +cisf_GR_m_sin = r41 +cisf_GR_32m_sin = r41 + +cisf_GR_n_cos = r42 +cisf_GR_m_cos = r43 +cisf_GR_32m_cos = r43 + +cisf_AD_2_sin = r44 +cisf_AD_2_cos = r45 + +cisf_gr_tmp = r46 +GR_SAVE_B0 = r47 +GR_SAVE_GP = r48 +rB0_SAVED = r49 +GR_SAVE_PFS = r50 +GR_SAVE_PR = r51 +cisf_AD_1 = r52 + +RODATA + +.align 16 +// Pi/16 parts +LOCAL_OBJECT_START(double_cisf_pi) + data8 0xC90FDAA22168C234, 0x00003FFC // pi/16 1st part + data8 0xC4C6628B80DC1CD1, 0x00003FBC // pi/16 2nd part +LOCAL_OBJECT_END(double_cisf_pi) + +// Coefficients for polynomials +LOCAL_OBJECT_START(double_cisf_pq_k4) + data8 0x3F810FABB668E9A2 // P2 + data8 0x3FA552E3D6DE75C9 // Q2 + data8 0xBFC555554447BC7F // P1 + data8 0xBFDFFFFFC447610A // Q1 +LOCAL_OBJECT_END(double_cisf_pq_k4) + +// Sincos table (S[m], C[m]) +LOCAL_OBJECT_START(double_sin_cos_beta_k4) + data8 0x0000000000000000 // sin ( 0 Pi / 16 ) + data8 0x3FF0000000000000 // cos ( 0 Pi / 16 ) +// + data8 0x3FC8F8B83C69A60B // sin ( 1 Pi / 16 ) + data8 0x3FEF6297CFF75CB0 // cos ( 1 Pi / 16 ) +// + data8 0x3FD87DE2A6AEA963 // sin ( 2 Pi / 16 ) + data8 0x3FED906BCF328D46 // cos ( 2 Pi / 16 ) +// + data8 0x3FE1C73B39AE68C8 // sin ( 3 Pi / 16 ) + data8 0x3FEA9B66290EA1A3 // cos ( 3 Pi / 16 ) +// + data8 0x3FE6A09E667F3BCD // sin ( 4 Pi / 16 ) + data8 0x3FE6A09E667F3BCD // cos ( 4 Pi / 16 ) +// + data8 0x3FEA9B66290EA1A3 // sin ( 5 Pi / 16 ) + data8 0x3FE1C73B39AE68C8 // cos ( 5 Pi / 16 ) +// + data8 0x3FED906BCF328D46 // sin ( 6 Pi / 16 ) + data8 0x3FD87DE2A6AEA963 // cos ( 6 Pi / 16 ) +// + data8 0x3FEF6297CFF75CB0 // sin ( 7 Pi / 16 ) + data8 0x3FC8F8B83C69A60B // cos ( 7 Pi / 16 ) +// + data8 0x3FF0000000000000 // sin ( 8 Pi / 16 ) + data8 0x0000000000000000 // cos ( 8 Pi / 16 ) +// + data8 0x3FEF6297CFF75CB0 // sin ( 9 Pi / 16 ) + data8 0xBFC8F8B83C69A60B // cos ( 9 Pi / 16 ) +// + data8 0x3FED906BCF328D46 // sin ( 10 Pi / 16 ) + data8 0xBFD87DE2A6AEA963 // cos ( 10 Pi / 16 ) +// + data8 0x3FEA9B66290EA1A3 // sin ( 11 Pi / 16 ) + data8 0xBFE1C73B39AE68C8 // cos ( 11 Pi / 16 ) +// + data8 0x3FE6A09E667F3BCD // sin ( 12 Pi / 16 ) + data8 0xBFE6A09E667F3BCD // cos ( 12 Pi / 16 ) +// + data8 0x3FE1C73B39AE68C8 // sin ( 13 Pi / 16 ) + data8 0xBFEA9B66290EA1A3 // cos ( 13 Pi / 16 ) +// + data8 0x3FD87DE2A6AEA963 // sin ( 14 Pi / 16 ) + data8 0xBFED906BCF328D46 // cos ( 14 Pi / 16 ) +// + data8 0x3FC8F8B83C69A60B // sin ( 15 Pi / 16 ) + data8 0xBFEF6297CFF75CB0 // cos ( 15 Pi / 16 ) +// + data8 0x0000000000000000 // sin ( 16 Pi / 16 ) + data8 0xBFF0000000000000 // cos ( 16 Pi / 16 ) +// + data8 0xBFC8F8B83C69A60B // sin ( 17 Pi / 16 ) + data8 0xBFEF6297CFF75CB0 // cos ( 17 Pi / 16 ) +// + data8 0xBFD87DE2A6AEA963 // sin ( 18 Pi / 16 ) + data8 0xBFED906BCF328D46 // cos ( 18 Pi / 16 ) +// + data8 0xBFE1C73B39AE68C8 // sin ( 19 Pi / 16 ) + data8 0xBFEA9B66290EA1A3 // cos ( 19 Pi / 16 ) +// + data8 0xBFE6A09E667F3BCD // sin ( 20 Pi / 16 ) + data8 0xBFE6A09E667F3BCD // cos ( 20 Pi / 16 ) +// + data8 0xBFEA9B66290EA1A3 // sin ( 21 Pi / 16 ) + data8 0xBFE1C73B39AE68C8 // cos ( 21 Pi / 16 ) +// + data8 0xBFED906BCF328D46 // sin ( 22 Pi / 16 ) + data8 0xBFD87DE2A6AEA963 // cos ( 22 Pi / 16 ) +// + data8 0xBFEF6297CFF75CB0 // sin ( 23 Pi / 16 ) + data8 0xBFC8F8B83C69A60B // cos ( 23 Pi / 16 ) +// + data8 0xBFF0000000000000 // sin ( 24 Pi / 16 ) + data8 0x0000000000000000 // cos ( 24 Pi / 16 ) +// + data8 0xBFEF6297CFF75CB0 // sin ( 25 Pi / 16 ) + data8 0x3FC8F8B83C69A60B // cos ( 25 Pi / 16 ) +// + data8 0xBFED906BCF328D46 // sin ( 26 Pi / 16 ) + data8 0x3FD87DE2A6AEA963 // cos ( 26 Pi / 16 ) +// + data8 0xBFEA9B66290EA1A3 // sin ( 27 Pi / 16 ) + data8 0x3FE1C73B39AE68C8 // cos ( 27 Pi / 16 ) +// + data8 0xBFE6A09E667F3BCD // sin ( 28 Pi / 16 ) + data8 0x3FE6A09E667F3BCD // cos ( 28 Pi / 16 ) +// + data8 0xBFE1C73B39AE68C8 // sin ( 29 Pi / 16 ) + data8 0x3FEA9B66290EA1A3 // cos ( 29 Pi / 16 ) +// + data8 0xBFD87DE2A6AEA963 // sin ( 30 Pi / 16 ) + data8 0x3FED906BCF328D46 // cos ( 30 Pi / 16 ) +// + data8 0xBFC8F8B83C69A60B // sin ( 31 Pi / 16 ) + data8 0x3FEF6297CFF75CB0 // cos ( 31 Pi / 16 ) +// + data8 0x0000000000000000 // sin ( 32 Pi / 16 ) + data8 0x3FF0000000000000 // cos ( 32 Pi / 16 ) +LOCAL_OBJECT_END(double_sin_cos_beta_k4) + +.section .text + +GLOBAL_IEEE754_ENTRY(sincosf) +// cis_GR_sig_inv_pi_by_16 = significand of 16/pi +{ .mlx + alloc GR_SAVE_PFS = ar.pfs, 0, 21, 0, 0 + movl cisf_GR_sig_inv_pi_by_16 = 0xA2F9836E4E44152A // 16/pi signd + +} +// cis_GR_rshf_2to61 = 1.1000 2^(63+63-2) +{ .mlx + addl cisf_AD_1 = @ltoff(double_cisf_pi), gp + movl cisf_GR_rshf_2to61 = 0x47b8000000000000 // 1.1 2^(63+63-2) +};; + +{ .mfi + ld8 cisf_AD_1 = [cisf_AD_1] + fnorm.s1 cisf_NORM_f8 = cisf_Arg + cmp.eq p13, p14 = r0, r0 // p13 set for sincos +} +// cis_GR_exp_2tom61 = exponent of scaling factor 2^-61 +{ .mib + mov cisf_GR_exp_2tom61 = 0xffff-61 + nop.i 0 + br.cond.sptk _CISF_COMMON +};; +GLOBAL_IEEE754_END(sincosf) + +GLOBAL_LIBM_ENTRY(__libm_sincosf) +{ .mlx +// cisf_GR_sig_inv_pi_by_16 = significand of 16/pi + alloc GR_SAVE_PFS = ar.pfs,0,21,0,0 + movl cisf_GR_sig_inv_pi_by_16 = 0xA2F9836E4E44152A +} +// cisf_GR_rshf_2to61 = 1.1000 2^(63+63-2) +{ .mlx + addl cisf_AD_1 = @ltoff(double_cisf_pi), gp + movl cisf_GR_rshf_2to61 = 0x47b8000000000000 +};; + +// p14 set for __libm_sincos and cis +{ .mfi + ld8 cisf_AD_1 = [cisf_AD_1] + fnorm.s1 cisf_NORM_f8 = cisf_Arg + cmp.eq p14, p13 = r0, r0 +} +// cisf_GR_exp_2tom61 = exponent of scaling factor 2^-61 +{ .mib + mov cisf_GR_exp_2tom61 = 0xffff-61 + nop.i 0 + nop.b 0 +};; + +_CISF_COMMON: +// Form two constants we need +// 16/pi * 2^-2 * 2^63, scaled by 2^61 since we just loaded the significand +// 1.1000...000 * 2^(63+63-2) to right shift int(W) into the low significand +// fcmp used to set denormal, and invalid on snans +{ .mfi + setf.sig cisf_SIG_INV_PI_BY_16_2TO61 = cisf_GR_sig_inv_pi_by_16 + fclass.m p6,p0 = cisf_Arg, 0xe7//if x=0,inf,nan + addl cisf_gr_tmp = -1, r0 +} +// cisf_GR_rshf = 1.1000 2^63 for right shift +{ .mlx + setf.d cisf_RSHF_2TO61 = cisf_GR_rshf_2to61 + movl cisf_GR_rshf = 0x43e8000000000000 +};; + +// Form another constant +// 2^-61 for scaling Nfloat +// 0x10017 is register_bias + 24. +// So if f8 >= 2^24, go to large args routine +{ .mmi + getf.exp cisf_r_signexp = cisf_Arg + setf.exp cisf_2TOM61 = cisf_GR_exp_2tom61 + mov cisf_exp_limit = 0x10017 +};; + +// Load the two pieces of pi/16 +// Form another constant +// 1.1000...000 * 2^63, the right shift constant +{ .mmb + ldfe cisf_Pi_by_16_hi = [cisf_AD_1],16 + setf.d cisf_RSHF = cisf_GR_rshf +(p6) br.cond.spnt _CISF_SPECIAL_ARGS +};; + +{ .mmi + ldfe cisf_Pi_by_16_lo = [cisf_AD_1],16 + setf.sig cisf_tmp = cisf_gr_tmp //constant for inexact set + nop.i 0 +};; + +// Start loading P, Q coefficients +{ .mmi + ldfpd cisf_P2,cisf_Q2 = [cisf_AD_1],16 + nop.m 0 + dep.z cisf_r_exp = cisf_r_signexp, 0, 17 +};; + +// p10 is true if we must call routines to handle larger arguments +// p10 is true if f8 exp is >= 0x10017 +{ .mmb + ldfpd cisf_P1,cisf_Q1 = [cisf_AD_1], 16 + cmp.ge p10, p0 = cisf_r_exp, cisf_exp_limit +(p10) br.cond.spnt _CISF_LARGE_ARGS // go to |x| >= 2^24 path +};; + +// cisf_W = x * cisf_Inv_Pi_by_16 +// Multiply x by scaled 16/pi and add large const to shift integer part of W to +// rightmost bits of significand +{ .mfi + nop.m 0 + fma.s1 cisf_W_2TO61_RSH = cisf_NORM_f8,cisf_SIG_INV_PI_BY_16_2TO61,cisf_RSHF_2TO61 + nop.i 0 +};; + +// cisf_NFLOAT = Round_Int_Nearest(cisf_W) +{ .mfi + nop.m 0 + fms.s1 cisf_NFLOAT = cisf_W_2TO61_RSH,cisf_2TOM61,cisf_RSHF + nop.i 0 +};; + +// N = (int)cisf_int_Nfloat +{ .mfi + getf.sig cisf_GR_n = cisf_W_2TO61_RSH + nop.f 0 + nop.i 0 +};; + +// Add 2^(k-1) (which is in cisf_r_sincos) to N +// cisf_r = -cisf_Nfloat * cisf_Pi_by_16_hi + x +// cisf_r = cisf_r -cisf_Nfloat * cisf_Pi_by_16_lo +{ .mfi + add cisf_GR_n_cos = 0x8, cisf_GR_n + fnma.s1 cisf_r = cisf_NFLOAT, cisf_Pi_by_16_hi, cisf_NORM_f8 + nop.i 0 +};; + +//Get M (least k+1 bits of N) +{ .mmi + and cisf_GR_m_sin = 0x1f,cisf_GR_n + and cisf_GR_m_cos = 0x1f,cisf_GR_n_cos + nop.i 0 +};; + +{ .mmi + shladd cisf_AD_2_cos = cisf_GR_m_cos,4, cisf_AD_1 + shladd cisf_AD_2_sin = cisf_GR_m_sin,4, cisf_AD_1 + nop.i 0 +};; + +// den. input to set uflow +{ .mmf + ldfpd cisf_Sm_sin, cisf_Cm_sin = [cisf_AD_2_sin] + ldfpd cisf_Sm_cos, cisf_Cm_cos = [cisf_AD_2_cos] + fclass.m.unc p10,p0 = cisf_Arg,0x0b +};; + +{ .mfi + nop.m 0 + fma.s1 cisf_rsq = cisf_r, cisf_r, f0 // get r^2 + nop.i 0 +} +{ .mfi + nop.m 0 + fmpy.s0 cisf_tmp = cisf_tmp,cisf_tmp // inexact flag + nop.i 0 +};; + +{ .mmf + nop.m 0 + nop.m 0 + fnma.s1 cisf_r_exact = cisf_NFLOAT, cisf_Pi_by_16_lo, cisf_r +};; + +{ .mfi + nop.m 0 + fma.s1 cisf_P = cisf_rsq, cisf_P2, cisf_P1 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 cisf_Q = cisf_rsq, cisf_Q2, cisf_Q1 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fmpy.s1 cisf_rcub = cisf_r_exact, cisf_rsq // get r^3 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fmpy.s1 cisf_srsq_sin = cisf_Sm_sin,cisf_rsq + nop.i 0 +} +{ .mfi + nop.m 0 + fmpy.s1 cisf_srsq_cos = cisf_Sm_cos,cisf_rsq + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 cisf_P = cisf_rcub,cisf_P,cisf_r_exact + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 cisf_Q_sin = cisf_srsq_sin,cisf_Q, cisf_Sm_sin + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 cisf_Q_cos = cisf_srsq_cos,cisf_Q, cisf_Sm_cos + nop.i 0 +};; + +// If den. arg, force underflow to be set +{ .mfi + nop.m 0 +(p10) fmpy.s.s0 cisf_tmp = cisf_Arg,cisf_Arg + nop.i 0 +};; + +//Final sin +{ .mfi + nop.m 0 + fma.s.s0 cisf_Sin_res = cisf_Cm_sin, cisf_P, cisf_Q_sin + nop.i 0 +} +//Final cos +{ .mfb + nop.m 0 + fma.s.s0 cisf_Cos_res = cisf_Cm_cos, cisf_P, cisf_Q_cos +(p14) br.cond.sptk _CISF_RETURN //com. exit for __libm_sincos and cis main path +};; + +{ .mmb + stfs [cisf_pResSin] = cisf_Sin_res + stfs [cisf_pResCos] = cisf_Cos_res + br.ret.sptk b0 // common exit for sincos main path +};; + +_CISF_SPECIAL_ARGS: +// sinf(+/-0) = +/-0 +// sinf(Inf) = NaN +// sinf(NaN) = NaN +{ .mfi + nop.m 999 + fma.s.s0 cisf_Sin_res = cisf_Arg, f0, f0 // sinf(+/-0,NaN,Inf) + nop.i 999 +};; + +// cosf(+/-0) = 1.0 +// cosf(Inf) = NaN +// cosf(NaN) = NaN +{ .mfb + nop.m 999 + fma.s.s0 cisf_Cos_res = cisf_Arg, f0, f1 // cosf(+/-0,NaN,Inf) +(p14) br.cond.sptk _CISF_RETURN //spec exit for __libm_sincos and cis main path +};; + +{ .mmb + stfs [cisf_pResSin] = cisf_Sin_res + stfs [cisf_pResCos] = cisf_Cos_res + br.ret.sptk b0 // special exit for sincos main path +};; + + // exit for sincos + // NOTE! r8 and r9 used only because of compiler issue + // connected with float point complex function arguments pass + // After fix of this issue this operations can be deleted +_CISF_RETURN: +{ .mmb + getf.s r8 = cisf_Cos_res + getf.s r9 = cisf_Sin_res + br.ret.sptk b0 // exit for sincos +};; +GLOBAL_LIBM_END(__libm_sincosf) + +//// |x| > 2^24 path /////// +.proc _CISF_LARGE_ARGS +_CISF_LARGE_ARGS: +.prologue +{ .mfi + nop.m 0 + nop.f 0 +.save ar.pfs, GR_SAVE_PFS + mov GR_SAVE_PFS = ar.pfs +};; + +{ .mfi + mov GR_SAVE_GP = gp + nop.f 0 +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0 = b0 +};; + +.body +// Call of huge arguments sincos +{ .mib + nop.m 0 + mov GR_SAVE_PR = pr + br.call.sptk b0 = __libm_sincos_large +};; + +{ .mfi + mov gp = GR_SAVE_GP + nop.f 0 + mov pr = GR_SAVE_PR, 0x1fffe +} +;; + +{ .mfi + nop.m 0 + nop.f 0 + mov b0 = GR_SAVE_B0 +} +;; + +{ .mfi + nop.m 0 + fma.s.s0 cisf_Cos_res = cisf_Cos_res, f1, f0 + mov ar.pfs = GR_SAVE_PFS +} +// exit for |x| > 2^24 path (__libm_sincos and cis) +{ .mfb + nop.m 0 + fma.s.s0 cisf_Sin_res = cisf_Sin_res, f1, f0 +(p14) br.cond.sptk _CISF_RETURN +};; + +{ .mmb + stfs [cisf_pResSin] = cisf_Sin_res + stfs [cisf_pResCos] = cisf_Cos_res + br.ret.sptk b0 // exit for sincos |x| > 2^24 path +};; + +.endp _CISF_LARGE_ARGS + +.type __libm_sincos_large#,@function +.global __libm_sincos_large# + diff --git a/sysdeps/ia64/fpu/libm_sincosl.S b/sysdeps/ia64/fpu/libm_sincosl.S new file mode 100644 index 0000000000..1d89ff4bd1 --- /dev/null +++ b/sysdeps/ia64/fpu/libm_sincosl.S @@ -0,0 +1,2528 @@ +.file "libm_sincosl.s" + + +// Copyright (c) 2000 - 2004, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +//********************************************************************* +// +// History: +// 05/13/02 Initial version of sincosl (based on libm's sinl and cosl) +// 02/10/03 Reordered header: .section, .global, .proc, .align; +// used data8 for long double table values +// 10/13/03 Corrected .file name +// 02/11/04 cisl is moved to the separate file. +// 10/26/04 Avoided using r14-31 as scratch so not clobbered by dynamic loader +// +//********************************************************************* +// +// Function: Combined sincosl routine with 3 different API's +// +// API's +//============================================================== +// 1) void sincosl(long double, long double*s, long double*c) +// 2) __libm_sincosl - internal LIBM function, that accepts +// argument in f8 and returns cosine through f8, sine through f9 +// +// +//********************************************************************* +// +// Resources Used: +// +// Floating-Point Registers: f8 (Input x and cosl return value), +// f9 (sinl returned) +// f32-f121 +// +// General Purpose Registers: +// r32-r61 +// +// Predicate Registers: p6-p15 +// +//********************************************************************* +// +// IEEE Special Conditions: +// +// Denormal fault raised on denormal inputs +// Overflow exceptions do not occur +// Underflow exceptions raised when appropriate for sincosl +// (No specialized error handling for this routine) +// Inexact raised when appropriate by algorithm +// +// sincosl(SNaN) = QNaN, QNaN +// sincosl(QNaN) = QNaN, QNaN +// sincosl(inf) = QNaN, QNaN +// sincosl(+/-0) = +/-0, 1 +// +//********************************************************************* +// +// Mathematical Description +// ======================== +// +// The computation of FSIN and FCOS performed in parallel. +// +// Arg = N pi/2 + alpha, |alpha| <= pi/4. +// +// cosl( Arg ) = sinl( (N+1) pi/2 + alpha ), +// +// therefore, the code for computing sine will produce cosine as long +// as 1 is added to N immediately after the argument reduction +// process. +// +// Let M = N if sine +// N+1 if cosine. +// +// Now, given +// +// Arg = M pi/2 + alpha, |alpha| <= pi/4, +// +// let I = M mod 4, or I be the two lsb of M when M is represented +// as 2's complement. I = [i_0 i_1]. Then +// +// sinl( Arg ) = (-1)^i_0 sinl( alpha ) if i_1 = 0, +// = (-1)^i_0 cosl( alpha ) if i_1 = 1. +// +// For example: +// if M = -1, I = 11 +// sin ((-pi/2 + alpha) = (-1) cos (alpha) +// if M = 0, I = 00 +// sin (alpha) = sin (alpha) +// if M = 1, I = 01 +// sin (pi/2 + alpha) = cos (alpha) +// if M = 2, I = 10 +// sin (pi + alpha) = (-1) sin (alpha) +// if M = 3, I = 11 +// sin ((3/2)pi + alpha) = (-1) cos (alpha) +// +// The value of alpha is obtained by argument reduction and +// represented by two working precision numbers r and c where +// +// alpha = r + c accurately. +// +// The reduction method is described in a previous write up. +// The argument reduction scheme identifies 4 cases. For Cases 2 +// and 4, because |alpha| is small, sinl(r+c) and cosl(r+c) can be +// computed very easily by 2 or 3 terms of the Taylor series +// expansion as follows: +// +// Case 2: +// ------- +// +// sinl(r + c) = r + c - r^3/6 accurately +// cosl(r + c) = 1 - 2^(-67) accurately +// +// Case 4: +// ------- +// +// sinl(r + c) = r + c - r^3/6 + r^5/120 accurately +// cosl(r + c) = 1 - r^2/2 + r^4/24 accurately +// +// The only cases left are Cases 1 and 3 of the argument reduction +// procedure. These two cases will be merged since after the +// argument is reduced in either cases, we have the reduced argument +// represented as r + c and that the magnitude |r + c| is not small +// enough to allow the usage of a very short approximation. +// +// The required calculation is either +// +// sinl(r + c) = sinl(r) + correction, or +// cosl(r + c) = cosl(r) + correction. +// +// Specifically, +// +// sinl(r + c) = sinl(r) + c sin'(r) + O(c^2) +// = sinl(r) + c cos (r) + O(c^2) +// = sinl(r) + c(1 - r^2/2) accurately. +// Similarly, +// +// cosl(r + c) = cosl(r) - c sinl(r) + O(c^2) +// = cosl(r) - c(r - r^3/6) accurately. +// +// We therefore concentrate on accurately calculating sinl(r) and +// cosl(r) for a working-precision number r, |r| <= pi/4 to within +// 0.1% or so. +// +// The greatest challenge of this task is that the second terms of +// the Taylor series +// +// r - r^3/3! + r^r/5! - ... +// +// and +// +// 1 - r^2/2! + r^4/4! - ... +// +// are not very small when |r| is close to pi/4 and the rounding +// errors will be a concern if simple polynomial accumulation is +// used. When |r| < 2^-3, however, the second terms will be small +// enough (6 bits or so of right shift) that a normal Horner +// recurrence suffices. Hence there are two cases that we consider +// in the accurate computation of sinl(r) and cosl(r), |r| <= pi/4. +// +// Case small_r: |r| < 2^(-3) +// -------------------------- +// +// Since Arg = M pi/4 + r + c accurately, and M mod 4 is [i_0 i_1], +// we have +// +// sinl(Arg) = (-1)^i_0 * sinl(r + c) if i_1 = 0 +// = (-1)^i_0 * cosl(r + c) if i_1 = 1 +// +// can be accurately approximated by +// +// sinl(Arg) = (-1)^i_0 * [sinl(r) + c] if i_1 = 0 +// = (-1)^i_0 * [cosl(r) - c*r] if i_1 = 1 +// +// because |r| is small and thus the second terms in the correction +// are unneccessary. +// +// Finally, sinl(r) and cosl(r) are approximated by polynomials of +// moderate lengths. +// +// sinl(r) = r + S_1 r^3 + S_2 r^5 + ... + S_5 r^11 +// cosl(r) = 1 + C_1 r^2 + C_2 r^4 + ... + C_5 r^10 +// +// We can make use of predicates to selectively calculate +// sinl(r) or cosl(r) based on i_1. +// +// Case normal_r: 2^(-3) <= |r| <= pi/4 +// ------------------------------------ +// +// This case is more likely than the previous one if one considers +// r to be uniformly distributed in [-pi/4 pi/4]. Again, +// +// sinl(Arg) = (-1)^i_0 * sinl(r + c) if i_1 = 0 +// = (-1)^i_0 * cosl(r + c) if i_1 = 1. +// +// Because |r| is now larger, we need one extra term in the +// correction. sinl(Arg) can be accurately approximated by +// +// sinl(Arg) = (-1)^i_0 * [sinl(r) + c(1-r^2/2)] if i_1 = 0 +// = (-1)^i_0 * [cosl(r) - c*r*(1 - r^2/6)] i_1 = 1. +// +// Finally, sinl(r) and cosl(r) are approximated by polynomials of +// moderate lengths. +// +// sinl(r) = r + PP_1_hi r^3 + PP_1_lo r^3 + +// PP_2 r^5 + ... + PP_8 r^17 +// +// cosl(r) = 1 + QQ_1 r^2 + QQ_2 r^4 + ... + QQ_8 r^16 +// +// where PP_1_hi is only about 16 bits long and QQ_1 is -1/2. +// The crux in accurate computation is to calculate +// +// r + PP_1_hi r^3 or 1 + QQ_1 r^2 +// +// accurately as two pieces: U_hi and U_lo. The way to achieve this +// is to obtain r_hi as a 10 sig. bit number that approximates r to +// roughly 8 bits or so of accuracy. (One convenient way is +// +// r_hi := frcpa( frcpa( r ) ).) +// +// This way, +// +// r + PP_1_hi r^3 = r + PP_1_hi r_hi^3 + +// PP_1_hi (r^3 - r_hi^3) +// = [r + PP_1_hi r_hi^3] + +// [PP_1_hi (r - r_hi) +// (r^2 + r_hi r + r_hi^2) ] +// = U_hi + U_lo +// +// Since r_hi is only 10 bit long and PP_1_hi is only 16 bit long, +// PP_1_hi * r_hi^3 is only at most 46 bit long and thus computed +// exactly. Furthermore, r and PP_1_hi r_hi^3 are of opposite sign +// and that there is no more than 8 bit shift off between r and +// PP_1_hi * r_hi^3. Hence the sum, U_hi, is representable and thus +// calculated without any error. Finally, the fact that +// +// |U_lo| <= 2^(-8) |U_hi| +// +// says that U_hi + U_lo is approximating r + PP_1_hi r^3 to roughly +// 8 extra bits of accuracy. +// +// Similarly, +// +// 1 + QQ_1 r^2 = [1 + QQ_1 r_hi^2] + +// [QQ_1 (r - r_hi)(r + r_hi)] +// = U_hi + U_lo. +// +// Summarizing, we calculate r_hi = frcpa( frcpa( r ) ). +// +// If i_1 = 0, then +// +// U_hi := r + PP_1_hi * r_hi^3 +// U_lo := PP_1_hi * (r - r_hi) * (r^2 + r*r_hi + r_hi^2) +// poly := PP_1_lo r^3 + PP_2 r^5 + ... + PP_8 r^17 +// correction := c * ( 1 + C_1 r^2 ) +// +// Else ...i_1 = 1 +// +// U_hi := 1 + QQ_1 * r_hi * r_hi +// U_lo := QQ_1 * (r - r_hi) * (r + r_hi) +// poly := QQ_2 * r^4 + QQ_3 * r^6 + ... + QQ_8 r^16 +// correction := -c * r * (1 + S_1 * r^2) +// +// End +// +// Finally, +// +// V := poly + ( U_lo + correction ) +// +// / U_hi + V if i_0 = 0 +// result := | +// \ (-U_hi) - V if i_0 = 1 +// +// It is important that in the last step, negation of U_hi is +// performed prior to the subtraction which is to be performed in +// the user-set rounding mode. +// +// +// Algorithmic Description +// ======================= +// +// The argument reduction algorithm shares the same code between FSIN and FCOS. +// The argument reduction description given +// previously is repeated below. +// +// +// Step 0. Initialization. +// +// Step 1. Check for exceptional and special cases. +// +// * If Arg is +-0, +-inf, NaN, NaT, go to Step 10 for special +// handling. +// * If |Arg| < 2^24, go to Step 2 for reduction of moderate +// arguments. This is the most likely case. +// * If |Arg| < 2^63, go to Step 8 for pre-reduction of large +// arguments. +// * If |Arg| >= 2^63, go to Step 10 for special handling. +// +// Step 2. Reduction of moderate arguments. +// +// If |Arg| < pi/4 ...quick branch +// N_fix := N_inc (integer) +// r := Arg +// c := 0.0 +// Branch to Step 4, Case_1_complete +// Else ...cf. argument reduction +// N := Arg * two_by_PI (fp) +// N_fix := fcvt.fx( N ) (int) +// N := fcvt.xf( N_fix ) +// N_fix := N_fix + N_inc +// s := Arg - N * P_1 (first piece of pi/2) +// w := -N * P_2 (second piece of pi/2) +// +// If |s| >= 2^(-33) +// go to Step 3, Case_1_reduce +// Else +// go to Step 7, Case_2_reduce +// Endif +// Endif +// +// Step 3. Case_1_reduce. +// +// r := s + w +// c := (s - r) + w ...observe order +// +// Step 4. Case_1_complete +// +// ...At this point, the reduced argument alpha is +// ...accurately represented as r + c. +// If |r| < 2^(-3), go to Step 6, small_r. +// +// Step 5. Normal_r. +// +// Let [i_0 i_1] by the 2 lsb of N_fix. +// FR_rsq := r * r +// r_hi := frcpa( frcpa( r ) ) +// r_lo := r - r_hi +// +// If i_1 = 0, then +// poly := r*FR_rsq*(PP_1_lo + FR_rsq*(PP_2 + ... FR_rsq*PP_8)) +// U_hi := r + PP_1_hi*r_hi*r_hi*r_hi ...any order +// U_lo := PP_1_hi*r_lo*(r*r + r*r_hi + r_hi*r_hi) +// correction := c + c*C_1*FR_rsq ...any order +// Else +// poly := FR_rsq*FR_rsq*(QQ_2 + FR_rsq*(QQ_3 + ... + FR_rsq*QQ_8)) +// U_hi := 1 + QQ_1 * r_hi * r_hi ...any order +// U_lo := QQ_1 * r_lo * (r + r_hi) +// correction := -c*(r + S_1*FR_rsq*r) ...any order +// Endif +// +// V := poly + (U_lo + correction) ...observe order +// +// result := (i_0 == 0? 1.0 : -1.0) +// +// Last instruction in user-set rounding mode +// +// result := (i_0 == 0? result*U_hi + V : +// result*U_hi - V) +// +// Return +// +// Step 6. Small_r. +// +// ...Use flush to zero mode without causing exception +// Let [i_0 i_1] be the two lsb of N_fix. +// +// FR_rsq := r * r +// +// If i_1 = 0 then +// z := FR_rsq*FR_rsq; z := FR_rsq*z *r +// poly_lo := S_3 + FR_rsq*(S_4 + FR_rsq*S_5) +// poly_hi := r*FR_rsq*(S_1 + FR_rsq*S_2) +// correction := c +// result := r +// Else +// z := FR_rsq*FR_rsq; z := FR_rsq*z +// poly_lo := C_3 + FR_rsq*(C_4 + FR_rsq*C_5) +// poly_hi := FR_rsq*(C_1 + FR_rsq*C_2) +// correction := -c*r +// result := 1 +// Endif +// +// poly := poly_hi + (z * poly_lo + correction) +// +// If i_0 = 1, result := -result +// +// Last operation. Perform in user-set rounding mode +// +// result := (i_0 == 0? result + poly : +// result - poly ) +// Return +// +// Step 7. Case_2_reduce. +// +// ...Refer to the write up for argument reduction for +// ...rationale. The reduction algorithm below is taken from +// ...argument reduction description and integrated this. +// +// w := N*P_3 +// U_1 := N*P_2 + w ...FMA +// U_2 := (N*P_2 - U_1) + w ...2 FMA +// ...U_1 + U_2 is N*(P_2+P_3) accurately +// +// r := s - U_1 +// c := ( (s - r) - U_1 ) - U_2 +// +// ...The mathematical sum r + c approximates the reduced +// ...argument accurately. Note that although compared to +// ...Case 1, this case requires much more work to reduce +// ...the argument, the subsequent calculation needed for +// ...any of the trigonometric function is very little because +// ...|alpha| < 1.01*2^(-33) and thus two terms of the +// ...Taylor series expansion suffices. +// +// If i_1 = 0 then +// poly := c + S_1 * r * r * r ...any order +// result := r +// Else +// poly := -2^(-67) +// result := 1.0 +// Endif +// +// If i_0 = 1, result := -result +// +// Last operation. Perform in user-set rounding mode +// +// result := (i_0 == 0? result + poly : +// result - poly ) +// +// Return +// +// +// Step 8. Pre-reduction of large arguments. +// +// ...Again, the following reduction procedure was described +// ...in the separate write up for argument reduction, which +// ...is tightly integrated here. + +// N_0 := Arg * Inv_P_0 +// N_0_fix := fcvt.fx( N_0 ) +// N_0 := fcvt.xf( N_0_fix) + +// Arg' := Arg - N_0 * P_0 +// w := N_0 * d_1 +// N := Arg' * two_by_PI +// N_fix := fcvt.fx( N ) +// N := fcvt.xf( N_fix ) +// N_fix := N_fix + N_inc +// +// s := Arg' - N * P_1 +// w := w - N * P_2 +// +// If |s| >= 2^(-14) +// go to Step 3 +// Else +// go to Step 9 +// Endif +// +// Step 9. Case_4_reduce. +// +// ...first obtain N_0*d_1 and -N*P_2 accurately +// U_hi := N_0 * d_1 V_hi := -N*P_2 +// U_lo := N_0 * d_1 - U_hi V_lo := -N*P_2 - U_hi ...FMAs +// +// ...compute the contribution from N_0*d_1 and -N*P_3 +// w := -N*P_3 +// w := w + N_0*d_2 +// t := U_lo + V_lo + w ...any order +// +// ...at this point, the mathematical value +// ...s + U_hi + V_hi + t approximates the true reduced argument +// ...accurately. Just need to compute this accurately. +// +// ...Calculate U_hi + V_hi accurately: +// A := U_hi + V_hi +// if |U_hi| >= |V_hi| then +// a := (U_hi - A) + V_hi +// else +// a := (V_hi - A) + U_hi +// endif +// ...order in computing "a" must be observed. This branch is +// ...best implemented by predicates. +// ...A + a is U_hi + V_hi accurately. Moreover, "a" is +// ...much smaller than A: |a| <= (1/2)ulp(A). +// +// ...Just need to calculate s + A + a + t +// C_hi := s + A t := t + a +// C_lo := (s - C_hi) + A +// C_lo := C_lo + t +// +// ...Final steps for reduction +// r := C_hi + C_lo +// c := (C_hi - r) + C_lo +// +// ...At this point, we have r and c +// ...And all we need is a couple of terms of the corresponding +// ...Taylor series. +// +// If i_1 = 0 +// poly := c + r*FR_rsq*(S_1 + FR_rsq*S_2) +// result := r +// Else +// poly := FR_rsq*(C_1 + FR_rsq*C_2) +// result := 1 +// Endif +// +// If i_0 = 1, result := -result +// +// Last operation. Perform in user-set rounding mode +// +// result := (i_0 == 0? result + poly : +// result - poly ) +// Return +// +// Large Arguments: For arguments above 2**63, a Payne-Hanek +// style argument reduction is used and pi_by_2 reduce is called. +// + + +RODATA +.align 64 + +LOCAL_OBJECT_START(FSINCOSL_CONSTANTS) + +sincosl_table_p: +//data4 0x4E44152A, 0xA2F9836E, 0x00003FFE,0x00000000 // Inv_pi_by_2 +//data4 0xCE81B9F1, 0xC84D32B0, 0x00004016,0x00000000 // P_0 +//data4 0x2168C235, 0xC90FDAA2, 0x00003FFF,0x00000000 // P_1 +//data4 0xFC8F8CBB, 0xECE675D1, 0x0000BFBD,0x00000000 // P_2 +//data4 0xACC19C60, 0xB7ED8FBB, 0x0000BF7C,0x00000000 // P_3 +//data4 0xDBD171A1, 0x8D848E89, 0x0000BFBF,0x00000000 // d_1 +//data4 0x18A66F8E, 0xD5394C36, 0x0000BF7C,0x00000000 // d_2 +data8 0xA2F9836E4E44152A, 0x00003FFE // Inv_pi_by_2 +data8 0xC84D32B0CE81B9F1, 0x00004016 // P_0 +data8 0xC90FDAA22168C235, 0x00003FFF // P_1 +data8 0xECE675D1FC8F8CBB, 0x0000BFBD // P_2 +data8 0xB7ED8FBBACC19C60, 0x0000BF7C // P_3 +data8 0x8D848E89DBD171A1, 0x0000BFBF // d_1 +data8 0xD5394C3618A66F8E, 0x0000BF7C // d_2 +LOCAL_OBJECT_END(FSINCOSL_CONSTANTS) + +LOCAL_OBJECT_START(sincosl_table_d) +//data4 0x2168C234, 0xC90FDAA2, 0x00003FFE,0x00000000 // pi_by_4 +//data4 0x6EC6B45A, 0xA397E504, 0x00003FE7,0x00000000 // Inv_P_0 +data8 0xC90FDAA22168C234, 0x00003FFE // pi_by_4 +data8 0xA397E5046EC6B45A, 0x00003FE7 // Inv_P_0 +data4 0x3E000000, 0xBE000000 // 2^-3 and -2^-3 +data4 0x2F000000, 0xAF000000 // 2^-33 and -2^-33 +data4 0x9E000000, 0x00000000 // -2^-67 +data4 0x00000000, 0x00000000 // pad +LOCAL_OBJECT_END(sincosl_table_d) + +LOCAL_OBJECT_START(sincosl_table_pp) +//data4 0xA21C0BC9, 0xCC8ABEBC, 0x00003FCE,0x00000000 // PP_8 +//data4 0x720221DA, 0xD7468A05, 0x0000BFD6,0x00000000 // PP_7 +//data4 0x640AD517, 0xB092382F, 0x00003FDE,0x00000000 // PP_6 +//data4 0xD1EB75A4, 0xD7322B47, 0x0000BFE5,0x00000000 // PP_5 +//data4 0xFFFFFFFE, 0xFFFFFFFF, 0x0000BFFD,0x00000000 // C_1 +//data4 0x00000000, 0xAAAA0000, 0x0000BFFC,0x00000000 // PP_1_hi +//data4 0xBAF69EEA, 0xB8EF1D2A, 0x00003FEC,0x00000000 // PP_4 +//data4 0x0D03BB69, 0xD00D00D0, 0x0000BFF2,0x00000000 // PP_3 +//data4 0x88888962, 0x88888888, 0x00003FF8,0x00000000 // PP_2 +//data4 0xAAAB0000, 0xAAAAAAAA, 0x0000BFEC,0x00000000 // PP_1_lo +data8 0xCC8ABEBCA21C0BC9, 0x00003FCE // PP_8 +data8 0xD7468A05720221DA, 0x0000BFD6 // PP_7 +data8 0xB092382F640AD517, 0x00003FDE // PP_6 +data8 0xD7322B47D1EB75A4, 0x0000BFE5 // PP_5 +data8 0xFFFFFFFFFFFFFFFE, 0x0000BFFD // C_1 +data8 0xAAAA000000000000, 0x0000BFFC // PP_1_hi +data8 0xB8EF1D2ABAF69EEA, 0x00003FEC // PP_4 +data8 0xD00D00D00D03BB69, 0x0000BFF2 // PP_3 +data8 0x8888888888888962, 0x00003FF8 // PP_2 +data8 0xAAAAAAAAAAAB0000, 0x0000BFEC // PP_1_lo +LOCAL_OBJECT_END(sincosl_table_pp) + +LOCAL_OBJECT_START(sincosl_table_qq) +//data4 0xC2B0FE52, 0xD56232EF, 0x00003FD2 // QQ_8 +//data4 0x2B48DCA6, 0xC9C99ABA, 0x0000BFDA // QQ_7 +//data4 0x9C716658, 0x8F76C650, 0x00003FE2 // QQ_6 +//data4 0xFDA8D0FC, 0x93F27DBA, 0x0000BFE9 // QQ_5 +//data4 0xAAAAAAAA, 0xAAAAAAAA, 0x0000BFFC // S_1 +//data4 0x00000000, 0x80000000, 0x0000BFFE,0x00000000 // QQ_1 +//data4 0x0C6E5041, 0xD00D00D0, 0x00003FEF,0x00000000 // QQ_4 +//data4 0x0B607F60, 0xB60B60B6, 0x0000BFF5,0x00000000 // QQ_3 +//data4 0xAAAAAA9B, 0xAAAAAAAA, 0x00003FFA,0x00000000 // QQ_2 +data8 0xD56232EFC2B0FE52, 0x00003FD2 // QQ_8 +data8 0xC9C99ABA2B48DCA6, 0x0000BFDA // QQ_7 +data8 0x8F76C6509C716658, 0x00003FE2 // QQ_6 +data8 0x93F27DBAFDA8D0FC, 0x0000BFE9 // QQ_5 +data8 0xAAAAAAAAAAAAAAAA, 0x0000BFFC // S_1 +data8 0x8000000000000000, 0x0000BFFE // QQ_1 +data8 0xD00D00D00C6E5041, 0x00003FEF // QQ_4 +data8 0xB60B60B60B607F60, 0x0000BFF5 // QQ_3 +data8 0xAAAAAAAAAAAAAA9B, 0x00003FFA // QQ_2 +LOCAL_OBJECT_END(sincosl_table_qq) + +LOCAL_OBJECT_START(sincosl_table_c) +//data4 0xFFFFFFFE, 0xFFFFFFFF, 0x0000BFFD,0x00000000 // C_1 +//data4 0xAAAA719F, 0xAAAAAAAA, 0x00003FFA,0x00000000 // C_2 +//data4 0x0356F994, 0xB60B60B6, 0x0000BFF5,0x00000000 // C_3 +//data4 0xB2385EA9, 0xD00CFFD5, 0x00003FEF,0x00000000 // C_4 +//data4 0x292A14CD, 0x93E4BD18, 0x0000BFE9,0x00000000 // C_5 +data8 0xFFFFFFFFFFFFFFFE, 0x0000BFFD // C_1 +data8 0xAAAAAAAAAAAA719F, 0x00003FFA // C_2 +data8 0xB60B60B60356F994, 0x0000BFF5 // C_3 +data8 0xD00CFFD5B2385EA9, 0x00003FEF // C_4 +data8 0x93E4BD18292A14CD, 0x0000BFE9 // C_5 +LOCAL_OBJECT_END(sincosl_table_c) + +LOCAL_OBJECT_START(sincosl_table_s) +//data4 0xAAAAAAAA, 0xAAAAAAAA, 0x0000BFFC,0x00000000 // S_1 +//data4 0x888868DB, 0x88888888, 0x00003FF8,0x00000000 // S_2 +//data4 0x055EFD4B, 0xD00D00D0, 0x0000BFF2,0x00000000 // S_3 +//data4 0x839730B9, 0xB8EF1C5D, 0x00003FEC,0x00000000 // S_4 +//data4 0xE5B3F492, 0xD71EA3A4, 0x0000BFE5,0x00000000 // S_5 +data8 0xAAAAAAAAAAAAAAAA, 0x0000BFFC // S_1 +data8 0x88888888888868DB, 0x00003FF8 // S_2 +data8 0xD00D00D0055EFD4B, 0x0000BFF2 // S_3 +data8 0xB8EF1C5D839730B9, 0x00003FEC // S_4 +data8 0xD71EA3A4E5B3F492, 0x0000BFE5 // S_5 +data4 0x38800000, 0xB8800000 // two**-14 and -two**-14 +LOCAL_OBJECT_END(sincosl_table_s) + +FR_Input_X = f8 +FR_Result = f8 +FR_ResultS = f9 +FR_ResultC = f8 +FR_r = f8 +FR_c = f9 + +FR_norm_x = f9 +FR_inv_pi_2to63 = f10 +FR_rshf_2to64 = f11 +FR_2tom64 = f12 +FR_rshf = f13 +FR_N_float_signif = f14 +FR_abs_x = f15 + +FR_r6 = f32 +FR_r7 = f33 +FR_Pi_by_4 = f34 +FR_Two_to_M14 = f35 +FR_Neg_Two_to_M14 = f36 +FR_Two_to_M33 = f37 +FR_Neg_Two_to_M33 = f38 +FR_Neg_Two_to_M67 = f39 +FR_Inv_pi_by_2 = f40 +FR_N_float = f41 +FR_N_fix = f42 +FR_P_1 = f43 +FR_P_2 = f44 +FR_P_3 = f45 +FR_s = f46 +FR_w = f47 +FR_Z = f50 +FR_A = f51 +FR_a = f52 +FR_t = f53 +FR_U_1 = f54 +FR_U_2 = f55 +FR_C_1 = f56 +FR_C_2 = f57 +FR_C_3 = f58 +FR_C_4 = f59 +FR_C_5 = f60 +FR_S_1 = f61 +FR_S_2 = f62 +FR_S_3 = f63 +FR_S_4 = f64 +FR_S_5 = f65 +FR_r_hi = f68 +FR_r_lo = f69 +FR_rsq = f70 +FR_r_cubed = f71 +FR_C_hi = f72 +FR_N_0 = f73 +FR_d_1 = f74 +FR_V_hi = f75 +FR_V_lo = f76 +FR_U_hi = f77 +FR_U_lo = f78 +FR_U_hiabs = f79 +FR_V_hiabs = f80 +FR_PP_8 = f81 +FR_QQ_8 = f101 +FR_PP_7 = f82 +FR_QQ_7 = f102 +FR_PP_6 = f83 +FR_QQ_6 = f103 +FR_PP_5 = f84 +FR_QQ_5 = f104 +FR_PP_4 = f85 +FR_QQ_4 = f105 +FR_PP_3 = f86 +FR_QQ_3 = f106 +FR_PP_2 = f87 +FR_QQ_2 = f107 +FR_QQ_1 = f108 +FR_r_hi_sq = f88 +FR_N_0_fix = f89 +FR_Inv_P_0 = f90 +FR_d_2 = f93 +FR_P_0 = f95 +FR_C_lo = f96 +FR_PP_1 = f97 +FR_PP_1_lo = f98 +FR_ArgPrime = f99 +FR_inexact = f100 + +FR_Neg_Two_to_M3 = f109 +FR_Two_to_M3 = f110 + +FR_poly_hiS = f66 +FR_poly_hiC = f112 + +FR_poly_loS = f67 +FR_poly_loC = f113 + +FR_polyS = f92 +FR_polyC = f114 + +FR_cS = FR_c +FR_cC = f115 + +FR_corrS = f91 +FR_corrC = f116 + +FR_U_hiC = f117 +FR_U_loC = f118 + +FR_VS = f75 +FR_VC = f119 + +FR_FirstS = f120 +FR_FirstC = f121 + +FR_U_hiS = FR_U_hi +FR_U_loS = FR_U_lo + +FR_Tmp = f94 + + + + +sincos_pResSin = r34 +sincos_pResCos = r35 + +GR_exp_m2_to_m3= r36 +GR_N_Inc = r37 +GR_Cis = r38 +GR_signexp_x = r40 +GR_exp_x = r40 +GR_exp_mask = r41 +GR_exp_2_to_63 = r42 +GR_exp_2_to_m3 = r43 +GR_exp_2_to_24 = r44 + +GR_N_SignS = r45 +GR_N_SignC = r46 +GR_N_SinCos = r47 + +GR_sig_inv_pi = r48 +GR_rshf_2to64 = r49 +GR_exp_2tom64 = r50 +GR_rshf = r51 +GR_ad_p = r52 +GR_ad_d = r53 +GR_ad_pp = r54 +GR_ad_qq = r55 +GR_ad_c = r56 +GR_ad_s = r57 +GR_ad_ce = r58 +GR_ad_se = r59 +GR_ad_m14 = r60 +GR_ad_s1 = r61 + +// For unwind support +GR_SAVE_B0 = r39 +GR_SAVE_GP = r40 +GR_SAVE_PFS = r41 + + +.section .text + +GLOBAL_IEEE754_ENTRY(sincosl) +{ .mlx ///////////////////////////// 1 ///////////////// + alloc r32 = ar.pfs,3,27,2,0 + movl GR_sig_inv_pi = 0xa2f9836e4e44152a // significand of 1/pi +} +{ .mlx + mov GR_N_Inc = 0x0 + movl GR_rshf_2to64 = 0x47e8000000000000 // 1.1000 2^(63+64) +};; + +{ .mfi ///////////////////////////// 2 ///////////////// + addl GR_ad_p = @ltoff(FSINCOSL_CONSTANTS#), gp + fclass.m p6, p0 = FR_Input_X, 0x1E3 // Test x natval, nan, inf + mov GR_exp_2_to_m3 = 0xffff - 3 // Exponent of 2^-3 +} +{ .mfb + mov GR_Cis = 0x0 + fnorm.s1 FR_norm_x = FR_Input_X // Normalize x + br.cond.sptk _COMMON_SINCOSL +};; +GLOBAL_IEEE754_END(sincosl) + +GLOBAL_LIBM_ENTRY(__libm_sincosl) +{ .mlx ///////////////////////////// 1 ///////////////// + alloc r32 = ar.pfs,3,27,2,0 + movl GR_sig_inv_pi = 0xa2f9836e4e44152a // significand of 1/pi +} +{ .mlx + mov GR_N_Inc = 0x0 + movl GR_rshf_2to64 = 0x47e8000000000000 // 1.1000 2^(63+64) +};; + +{ .mfi ///////////////////////////// 2 ///////////////// + addl GR_ad_p = @ltoff(FSINCOSL_CONSTANTS#), gp + fclass.m p6, p0 = FR_Input_X, 0x1E3 // Test x natval, nan, inf + mov GR_exp_2_to_m3 = 0xffff - 3 // Exponent of 2^-3 +} +{ .mfb + mov GR_Cis = 0x1 + fnorm.s1 FR_norm_x = FR_Input_X // Normalize x + nop.b 0 +};; + +_COMMON_SINCOSL: +{ .mfi ///////////////////////////// 3 ///////////////// + setf.sig FR_inv_pi_2to63 = GR_sig_inv_pi // Form 1/pi * 2^63 + nop.f 0 + mov GR_exp_2tom64 = 0xffff - 64 // Scaling constant to compute N +} +{ .mlx + setf.d FR_rshf_2to64 = GR_rshf_2to64 // Form const 1.1000 * 2^(63+64) + movl GR_rshf = 0x43e8000000000000 // Form const 1.1000 * 2^63 +};; + +{ .mfi ///////////////////////////// 4 ///////////////// + ld8 GR_ad_p = [GR_ad_p] // Point to Inv_pi_by_2 + fclass.m p7, p0 = FR_Input_X, 0x0b // Test x denormal + nop.i 0 +};; + +{ .mfi ///////////////////////////// 5 ///////////////// + getf.exp GR_signexp_x = FR_Input_X // Get sign and exponent of x + fclass.m p10, p0 = FR_Input_X, 0x007 // Test x zero + nop.i 0 +} +{ .mib + mov GR_exp_mask = 0x1ffff // Exponent mask + nop.i 0 +(p6) br.cond.spnt SINCOSL_SPECIAL // Branch if x natval, nan, inf +};; + +{ .mfi ///////////////////////////// 6 ///////////////// + setf.exp FR_2tom64 = GR_exp_2tom64 // Form 2^-64 for scaling N_float + nop.f 0 + add GR_ad_d = 0x70, GR_ad_p // Point to constant table d +} +{ .mib + setf.d FR_rshf = GR_rshf // Form right shift const 1.1000 * 2^63 + mov GR_exp_m2_to_m3 = 0x2fffc // Form -(2^-3) +(p7) br.cond.spnt SINCOSL_DENORMAL // Branch if x denormal +};; + +SINCOSL_COMMON2: +{ .mfi ///////////////////////////// 7 ///////////////// + and GR_exp_x = GR_exp_mask, GR_signexp_x // Get exponent of x + fclass.nm p8, p0 = FR_Input_X, 0x1FF // Test x unsupported type + mov GR_exp_2_to_63 = 0xffff + 63 // Exponent of 2^63 +} +{ .mib + add GR_ad_pp = 0x40, GR_ad_d // Point to constant table pp + mov GR_exp_2_to_24 = 0xffff + 24 // Exponent of 2^24 +(p10) br.cond.spnt SINCOSL_ZERO // Branch if x zero +};; + +{ .mfi ///////////////////////////// 8 ///////////////// + ldfe FR_Inv_pi_by_2 = [GR_ad_p], 16 // Load 2/pi + fcmp.eq.s0 p15, p0 = FR_Input_X, f0 // Dummy to set denormal + add GR_ad_qq = 0xa0, GR_ad_pp // Point to constant table qq +} +{ .mfi + ldfe FR_Pi_by_4 = [GR_ad_d], 16 // Load pi/4 for range test + nop.f 0 + cmp.ge p10,p0 = GR_exp_x, GR_exp_2_to_63 // Is |x| >= 2^63 +};; + +{ .mfi ///////////////////////////// 9 ///////////////// + ldfe FR_P_0 = [GR_ad_p], 16 // Load P_0 for pi/4 <= |x| < 2^63 + fmerge.s FR_abs_x = f1, FR_norm_x // |x| + add GR_ad_c = 0x90, GR_ad_qq // Point to constant table c +} +{ .mfi + ldfe FR_Inv_P_0 = [GR_ad_d], 16 // Load 1/P_0 for pi/4 <= |x| < 2^63 + nop.f 0 + cmp.ge p7,p0 = GR_exp_x, GR_exp_2_to_24 // Is |x| >= 2^24 +};; + +{ .mfi ///////////////////////////// 10 ///////////////// + ldfe FR_P_1 = [GR_ad_p], 16 // Load P_1 for pi/4 <= |x| < 2^63 + nop.f 0 + add GR_ad_s = 0x50, GR_ad_c // Point to constant table s +} +{ .mfi + ldfe FR_PP_8 = [GR_ad_pp], 16 // Load PP_8 for 2^-3 < |r| < pi/4 + nop.f 0 + nop.i 0 +};; + +{ .mfi ///////////////////////////// 11 ///////////////// + ldfe FR_P_2 = [GR_ad_p], 16 // Load P_2 for pi/4 <= |x| < 2^63 + nop.f 0 + add GR_ad_ce = 0x40, GR_ad_c // Point to end of constant table c +} +{ .mfi + ldfe FR_QQ_8 = [GR_ad_qq], 16 // Load QQ_8 for 2^-3 < |r| < pi/4 + nop.f 0 + nop.i 0 +};; + +{ .mfi ///////////////////////////// 12 ///////////////// + ldfe FR_QQ_7 = [GR_ad_qq], 16 // Load QQ_7 for 2^-3 < |r| < pi/4 + fma.s1 FR_N_float_signif = FR_Input_X, FR_inv_pi_2to63, FR_rshf_2to64 + add GR_ad_se = 0x40, GR_ad_s // Point to end of constant table s +} +{ .mib + ldfe FR_PP_7 = [GR_ad_pp], 16 // Load PP_7 for 2^-3 < |r| < pi/4 + mov GR_ad_s1 = GR_ad_s // Save pointer to S_1 +(p10) br.cond.spnt SINCOSL_ARG_TOO_LARGE // Branch if |x| >= 2^63 + // Use Payne-Hanek Reduction +};; + +{ .mfi ///////////////////////////// 13 ///////////////// + ldfe FR_P_3 = [GR_ad_p], 16 // Load P_3 for pi/4 <= |x| < 2^63 + fmerge.se FR_r = FR_norm_x, FR_norm_x // r = x, in case |x| < pi/4 + add GR_ad_m14 = 0x50, GR_ad_s // Point to constant table m14 +} +{ .mfb + ldfps FR_Two_to_M3, FR_Neg_Two_to_M3 = [GR_ad_d], 8 + fma.s1 FR_rsq = FR_norm_x, FR_norm_x, f0 // rsq = x*x, in case |x| < pi/4 +(p7) br.cond.spnt SINCOSL_LARGER_ARG // Branch if 2^24 <= |x| < 2^63 + // Use pre-reduction +};; + +{ .mmf ///////////////////////////// 14 ///////////////// + ldfe FR_PP_6 = [GR_ad_pp], 16 // Load PP_6 for normal path + ldfe FR_QQ_6 = [GR_ad_qq], 16 // Load QQ_6 for normal path + fmerge.se FR_c = f0, f0 // c = 0 in case |x| < pi/4 +};; + +{ .mmf ///////////////////////////// 15 ///////////////// + ldfe FR_PP_5 = [GR_ad_pp], 16 // Load PP_5 for normal path + ldfe FR_QQ_5 = [GR_ad_qq], 16 // Load QQ_5 for normal path + nop.f 0 +};; + +// Here if 0 < |x| < 2^24 +{ .mfi ///////////////////////////// 17 ///////////////// + ldfe FR_S_5 = [GR_ad_se], -16 // Load S_5 if i_1=0 + fcmp.lt.s1 p6, p7 = FR_abs_x, FR_Pi_by_4 // Test |x| < pi/4 + nop.i 0 +} +{ .mfi + ldfe FR_C_5 = [GR_ad_ce], -16 // Load C_5 if i_1=1 + fms.s1 FR_N_float = FR_N_float_signif, FR_2tom64, FR_rshf + nop.i 0 +};; + +{ .mmi ///////////////////////////// 18 ///////////////// + ldfe FR_S_4 = [GR_ad_se], -16 // Load S_4 if i_1=0 + ldfe FR_C_4 = [GR_ad_ce], -16 // Load C_4 if i_1=1 + nop.i 0 +};; + +// +// N = Arg * 2/pi +// Check if Arg < pi/4 +// +// +// Case 2: Convert integer N_fix back to normalized floating-point value. +// Case 1: p8 is only affected when p6 is set +// +// +// Grab the integer part of N and call it N_fix +// +{ .mfi ///////////////////////////// 19 ///////////////// +(p7) ldfps FR_Two_to_M33, FR_Neg_Two_to_M33 = [GR_ad_d], 8 +(p6) fma.s1 FR_r_cubed = FR_r, FR_rsq, f0 // r^3 if |x| < pi/4 +(p6) mov GR_N_Inc = 0x0 // N_IncS if |x| < pi/4 +};; + +// If |x| < pi/4, r = x and c = 0 +// lf |x| < pi/4, is x < 2**(-3). +// r = Arg +// c = 0 +{ .mmi ///////////////////////////// 20 ///////////////// +(p7) getf.sig GR_N_Inc = FR_N_float_signif + nop.m 0 +(p6) cmp.lt.unc p8,p0 = GR_exp_x, GR_exp_2_to_m3 // Is |x| < 2^-3 +};; + +// +// lf |x| < pi/4, is -2**(-3)< x < 2**(-3) - set p8. +// If |x| >= pi/4, +// Create the right N for |x| < pi/4 and otherwise +// Case 2: Place integer part of N in GP register +// + +{ .mbb ///////////////////////////// 21 ///////////////// + nop.m 0 +(p8) br.cond.spnt SINCOSL_SMALL_R_0 // Branch if 0 < |x| < 2^-3 +(p6) br.cond.spnt SINCOSL_NORMAL_R_0 // Branch if 2^-3 <= |x| < pi/4 +};; + +// Here if pi/4 <= |x| < 2^24 +{ .mfi + ldfs FR_Neg_Two_to_M67 = [GR_ad_d], 8 // Load -2^-67 + fnma.s1 FR_s = FR_N_float, FR_P_1, FR_Input_X // s = -N * P_1 + Arg + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_w = FR_N_float, FR_P_2, f0 // w = N * P_2 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_r = FR_s, f1, FR_w // r = s - w, assume |s| >= 2^-33 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fcmp.lt.s1 p7, p6 = FR_s, FR_Two_to_M33 + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p7) fcmp.gt.s1 p7, p6 = FR_s, FR_Neg_Two_to_M33 // p6 if |s| >= 2^-33, else p7 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_c = FR_s, f1, FR_r // c = s - r, for |s| >= 2^-33 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_rsq = FR_r, FR_r, f0 // rsq = r * r, for |s| >= 2^-33 + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p7) fma.s1 FR_w = FR_N_float, FR_P_3, f0 + nop.i 0 +};; + +{ .mmf + ldfe FR_C_1 = [GR_ad_pp], 16 // Load C_1 if i_1=0 + ldfe FR_S_1 = [GR_ad_qq], 16 // Load S_1 if i_1=1 + frcpa.s1 FR_r_hi, p15 = f1, FR_r // r_hi = frcpa(r) +};; + +{ .mfi + nop.m 0 +(p6) fcmp.lt.unc.s1 p8, p13 = FR_r, FR_Two_to_M3 // If big s, test r with 2^-3 + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p7) fma.s1 FR_U_1 = FR_N_float, FR_P_2, FR_w + nop.i 0 +};; + +// +// For big s: r = s - w: No futher reduction is necessary +// For small s: w = N * P_3 (change sign) More reduction +// +{ .mfi + nop.m 0 +(p8) fcmp.gt.s1 p8, p13 = FR_r, FR_Neg_Two_to_M3 // If big s, p8 if |r| < 2^-3 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_polyS = FR_rsq, FR_PP_8, FR_PP_7 // poly = rsq*PP_8+PP_7 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_polyC = FR_rsq, FR_QQ_8, FR_QQ_7 // poly = rsq*QQ_8+QQ_7 + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p7) fms.s1 FR_r = FR_s, f1, FR_U_1 + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p6) fma.s1 FR_r_cubed = FR_r, FR_rsq, f0 // rcubed = r * rsq + nop.i 0 +};; + +{ .mfi +// +// For big s: Is |r| < 2**(-3)? +// For big s: c = S - r +// For small s: U_1 = N * P_2 + w +// +// If p8 is set, prepare to branch to Small_R. +// If p9 is set, prepare to branch to Normal_R. +// For big s, r is complete here. +// +// +// For big s: c = c + w (w has not been negated.) +// For small s: r = S - U_1 +// + nop.m 0 +(p6) fms.s1 FR_c = FR_c, f1, FR_w + nop.i 0 +} +{ .mbb + nop.m 0 +(p8) br.cond.spnt SINCOSL_SMALL_R_1 // Branch if |s|>=2^-33, |r| < 2^-3, + // and pi/4 <= |x| < 2^24 +(p13) br.cond.sptk SINCOSL_NORMAL_R_1 // Branch if |s|>=2^-33, |r| >= 2^-3, + // and pi/4 <= |x| < 2^24 +};; + +SINCOSL_S_TINY: +// +// Here if |s| < 2^-33, and pi/4 <= |x| < 2^24 +// +{ .mfi + and GR_N_SinCos = 0x1, GR_N_Inc + fms.s1 FR_U_2 = FR_N_float, FR_P_2, FR_U_1 + tbit.z p8,p12 = GR_N_Inc, 0 +};; + + +// +// For small s: U_2 = N * P_2 - U_1 +// S_1 stored constant - grab the one stored with the +// coefficients. +// +{ .mfi + ldfe FR_S_1 = [GR_ad_s1], 16 + fma.s1 FR_polyC = f0, f1, FR_Neg_Two_to_M67 + sub GR_N_SignS = GR_N_Inc, GR_N_SinCos +} +{ .mfi + add GR_N_SignC = GR_N_Inc, GR_N_SinCos + nop.f 0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_s = FR_s, f1, FR_r +(p8) tbit.z.unc p10,p11 = GR_N_SignC, 1 +} +{ .mfi + nop.m 0 + fma.s1 FR_rsq = FR_r, FR_r, f0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_U_2 = FR_U_2, f1, FR_w +(p8) tbit.z.unc p8,p9 = GR_N_SignS, 1 +};; + +{ .mfi + nop.m 0 + fmerge.se FR_FirstS = FR_r, FR_r +(p12) tbit.z.unc p14,p15 = GR_N_SignC, 1 +} +{ .mfi + nop.m 0 + fma.s1 FR_FirstC = f0, f1, f1 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_c = FR_s, f1, FR_U_1 +(p12) tbit.z.unc p12,p13 = GR_N_SignS, 1 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r = FR_S_1, FR_r, f0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s0 FR_S_1 = FR_S_1, FR_S_1, f0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_c = FR_c, f1, FR_U_2 + nop.i 0 +};; + +.pred.rel "mutex",p9,p15 +{ .mfi + nop.m 0 +(p9) fms.s0 FR_FirstS = f1, f0, FR_FirstS + nop.i 0 +} +{ .mfi + nop.m 0 +(p15) fms.s0 FR_FirstS = f1, f0, FR_FirstS + nop.i 0 +};; + +.pred.rel "mutex",p11,p13 +{ .mfi + nop.m 0 +(p11) fms.s0 FR_FirstC = f1, f0, FR_FirstC + nop.i 0 +} +{ .mfi + nop.m 0 +(p13) fms.s0 FR_FirstC = f1, f0, FR_FirstC + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_polyS = FR_r, FR_rsq, FR_c + nop.i 0 +};; + + +.pred.rel "mutex",p8,p9 +{ .mfi + nop.m 0 +(p8) fma.s0 FR_ResultS = FR_FirstS, f1, FR_polyS + nop.i 0 +} +{ .mfi + nop.m 0 +(p9) fms.s0 FR_ResultS = FR_FirstS, f1, FR_polyS + nop.i 0 +};; + +.pred.rel "mutex",p10,p11 +{ .mfi + nop.m 0 +(p10) fma.s0 FR_ResultC = FR_FirstC, f1, FR_polyC + nop.i 0 +} +{ .mfi + nop.m 0 +(p11) fms.s0 FR_ResultC = FR_FirstC, f1, FR_polyC + nop.i 0 +};; + + + +.pred.rel "mutex",p12,p13 +{ .mfi + nop.m 0 +(p12) fma.s0 FR_ResultS = FR_FirstC, f1, FR_polyC + nop.i 0 +} +{ .mfi + nop.m 0 +(p13) fms.s0 FR_ResultS = FR_FirstC, f1, FR_polyC + nop.i 0 +};; + +.pred.rel "mutex",p14,p15 +{ .mfi + nop.m 0 +(p14) fma.s0 FR_ResultC = FR_FirstS, f1, FR_polyS + nop.i 0 +} +{ .mfb + cmp.eq p10, p0 = 0x1, GR_Cis +(p15) fms.s0 FR_ResultC = FR_FirstS, f1, FR_polyS +(p10) br.ret.sptk b0 +};; + +{ .mmb // exit for sincosl + stfe [sincos_pResSin] = FR_ResultS + stfe [sincos_pResCos] = FR_ResultC + br.ret.sptk b0 +};; + + + + + + +SINCOSL_LARGER_ARG: +// +// Here if 2^24 <= |x| < 2^63 +// +{ .mfi + ldfe FR_d_1 = [GR_ad_p], 16 // Load d_1 for |x| >= 2^24 path + fma.s1 FR_N_0 = FR_Input_X, FR_Inv_P_0, f0 // N_0 = Arg * Inv_P_0 + nop.i 0 +};; + +{ .mmi + ldfps FR_Two_to_M14, FR_Neg_Two_to_M14 = [GR_ad_m14] + nop.m 0 + nop.i 0 +};; + +{ .mfi + ldfe FR_d_2 = [GR_ad_p], 16 // Load d_2 for |x| >= 2^24 path + nop.f 0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fcvt.fx.s1 FR_N_0_fix = FR_N_0 // N_0_fix = integer part of N_0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fcvt.xf FR_N_0 = FR_N_0_fix // Make N_0 the integer part + nop.i 0 +};; + +{ .mfi + nop.m 0 + fnma.s1 FR_ArgPrime = FR_N_0, FR_P_0, FR_Input_X // Arg'=-N_0*P_0+Arg + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_w = FR_N_0, FR_d_1, f0 // w = N_0 * d_1 + nop.i 0 +};; + + +{ .mfi + nop.m 0 + fma.s1 FR_N_float = FR_ArgPrime, FR_Inv_pi_by_2, f0 // N = A' * 2/pi + nop.i 0 +};; + +{ .mfi + nop.m 0 + fcvt.fx.s1 FR_N_fix = FR_N_float // N_fix is the integer part + nop.i 0 +};; + +{ .mfi + nop.m 0 + fcvt.xf FR_N_float = FR_N_fix + nop.i 0 +};; + +{ .mfi + getf.sig GR_N_Inc = FR_N_fix // N is the integer part of + // the reduced-reduced argument + nop.f 0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fnma.s1 FR_s = FR_N_float, FR_P_1, FR_ArgPrime // s = -N*P_1 + Arg' + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 FR_w = FR_N_float, FR_P_2, FR_w // w = -N*P_2 + w + nop.i 0 +};; + +// +// For |s| > 2**(-14) r = S + w (r complete) +// Else U_hi = N_0 * d_1 +// +{ .mfi + nop.m 0 + fcmp.lt.unc.s1 p9, p8 = FR_s, FR_Two_to_M14 + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p9) fcmp.gt.s1 p9, p8 = FR_s, FR_Neg_Two_to_M14 // p9 if |s| < 2^-14 + nop.i 0 +};; + +// +// Either S <= -2**(-14) or S >= 2**(-14) +// or -2**(-14) < s < 2**(-14) +// +{ .mfi + nop.m 0 +(p9) fma.s1 FR_V_hi = FR_N_float, FR_P_2, f0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p9) fma.s1 FR_U_hi = FR_N_0, FR_d_1, f0 + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p8) fma.s1 FR_r = FR_s, f1, FR_w + nop.i 0 +} +{ .mfi + nop.m 0 +(p9) fma.s1 FR_w = FR_N_float, FR_P_3, f0 + nop.i 0 +};; + +// +// We need abs of both U_hi and V_hi - don't +// worry about switched sign of V_hi. +// +// Big s: finish up c = (S - r) + w (c complete) +// Case 4: A = U_hi + V_hi +// Note: Worry about switched sign of V_hi, so subtract instead of add. +// +{ .mfi + nop.m 0 +(p9) fms.s1 FR_A = FR_U_hi, f1, FR_V_hi + nop.i 0 +} +{ .mfi + nop.m 0 +(p9) fnma.s1 FR_V_lo = FR_N_float, FR_P_2, FR_V_hi + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p9) fmerge.s FR_V_hiabs = f0, FR_V_hi + nop.i 0 +} +{ .mfi + nop.m 0 +(p9) fms.s1 FR_U_lo = FR_N_0, FR_d_1, FR_U_hi // For small s: U_lo=N_0*d_1-U_hi + nop.i 0 +};; + +// +// For big s: Is |r| < 2**(-3) +// For big s: if p12 set, prepare to branch to Small_R. +// For big s: If p13 set, prepare to branch to Normal_R. +// +{ .mfi + nop.m 0 +(p9) fmerge.s FR_U_hiabs = f0, FR_U_hi + nop.i 0 +} +{ .mfi + nop.m 0 +(p8) fms.s1 FR_c = FR_s, f1, FR_r // For big s: c = S - r + nop.i 0 +};; + +// +// For small S: V_hi = N * P_2 +// w = N * P_3 +// Note the product does not include the (-) as in the writeup +// so (-) missing for V_hi and w. +// +{ .mfi + nop.m 0 +(p8) fcmp.lt.unc.s1 p12, p13 = FR_r, FR_Two_to_M3 + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p12) fcmp.gt.s1 p12, p13 = FR_r, FR_Neg_Two_to_M3 + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p8) fma.s1 FR_c = FR_c, f1, FR_w + nop.i 0 +} +{ .mfb + nop.m 0 +(p9) fms.s1 FR_w = FR_N_0, FR_d_2, FR_w +(p12) br.cond.spnt SINCOSL_SMALL_R // Branch if |r| < 2^-3 + // and 2^24 <= |x| < 2^63 +};; + +{ .mib + nop.m 0 + nop.i 0 +(p13) br.cond.sptk SINCOSL_NORMAL_R // Branch if |r| >= 2^-3 + // and 2^24 <= |x| < 2^63 +};; + +SINCOSL_LARGER_S_TINY: +// Here if |s| < 2^-14, and 2^24 <= |x| < 2^63 +// +// Big s: Vector off when |r| < 2**(-3). Recall that p8 will be true. +// The remaining stuff is for Case 4. +// Small s: V_lo = N * P_2 + U_hi (U_hi is in place of V_hi in writeup) +// Note: the (-) is still missing for V_lo. +// Small s: w = w + N_0 * d_2 +// Note: the (-) is now incorporated in w. +// +{ .mfi + and GR_N_SinCos = 0x1, GR_N_Inc + fcmp.ge.unc.s1 p6, p7 = FR_U_hiabs, FR_V_hiabs + tbit.z p8,p12 = GR_N_Inc, 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_t = FR_U_lo, f1, FR_V_lo // C_hi = S + A + nop.i 0 +};; + +{ .mfi + sub GR_N_SignS = GR_N_Inc, GR_N_SinCos +(p6) fms.s1 FR_a = FR_U_hi, f1, FR_A + add GR_N_SignC = GR_N_Inc, GR_N_SinCos +} +{ .mfi + nop.m 0 +(p7) fma.s1 FR_a = FR_V_hi, f1, FR_A + nop.i 0 +};; + +{ .mmf + ldfe FR_C_1 = [GR_ad_c], 16 + ldfe FR_S_1 = [GR_ad_s], 16 + fma.s1 FR_C_hi = FR_s, f1, FR_A +};; + +{ .mmi + ldfe FR_C_2 = [GR_ad_c], 64 + ldfe FR_S_2 = [GR_ad_s], 64 +(p8) tbit.z.unc p10,p11 = GR_N_SignC, 1 +};; + +// +// r and c have been computed. +// Make sure ftz mode is set - should be automatic when using wre +// |r| < 2**(-3) +// Get [i_0,i_1] - two lsb of N_fix. +// +// For larger u than v: a = U_hi - A +// Else a = V_hi - A (do an add to account for missing (-) on V_hi +// +{ .mfi + nop.m 0 + fma.s1 FR_t = FR_t, f1, FR_w // t = t + w +(p8) tbit.z.unc p8,p9 = GR_N_SignS, 1 +} +{ .mfi + nop.m 0 +(p6) fms.s1 FR_a = FR_a, f1, FR_V_hi + nop.i 0 +};; + +// +// If u > v: a = (U_hi - A) + V_hi +// Else a = (V_hi - A) + U_hi +// In each case account for negative missing from V_hi. +// +{ .mfi + nop.m 0 + fms.s1 FR_C_lo = FR_s, f1, FR_C_hi +(p12) tbit.z.unc p14,p15 = GR_N_SignC, 1 +} +{ .mfi + nop.m 0 +(p7) fms.s1 FR_a = FR_U_hi, f1, FR_a + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_C_lo = FR_C_lo, f1, FR_A // C_lo = (S - C_hi) + A +(p12) tbit.z.unc p12,p13 = GR_N_SignS, 1 +} +{ .mfi + nop.m 0 + fma.s1 FR_t = FR_t, f1, FR_a // t = t + a + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r = FR_C_hi, f1, FR_C_lo + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_C_lo = FR_C_lo, f1, FR_t // C_lo = C_lo + t + nop.i 0 +};; + + +{ .mfi + nop.m 0 + fma.s1 FR_rsq = FR_r, FR_r, f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 FR_c = FR_C_hi, f1, FR_r + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_FirstS = f0, f1, FR_r + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_FirstC = f0, f1, f1 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_polyS = FR_rsq, FR_S_2, FR_S_1 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_polyC = FR_rsq, FR_C_2, FR_C_1 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_cubed = FR_rsq, FR_r, f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_c = FR_c, f1, FR_C_lo + nop.i 0 +};; + +.pred.rel "mutex",p9,p15 +{ .mfi + nop.m 0 +(p9) fms.s0 FR_FirstS = f1, f0, FR_FirstS + nop.i 0 +} +{ .mfi + nop.m 0 +(p15) fms.s0 FR_FirstS = f1, f0, FR_FirstS + nop.i 0 +};; + +.pred.rel "mutex",p11,p13 +{ .mfi + nop.m 0 +(p11) fms.s0 FR_FirstC = f1, f0, FR_FirstC + nop.i 0 +} +{ .mfi + nop.m 0 +(p13) fms.s0 FR_FirstC = f1, f0, FR_FirstC + nop.i 0 +};; + + +{ .mfi + nop.m 0 + fma.s1 FR_polyS = FR_r_cubed, FR_polyS, FR_c + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_polyC = FR_rsq, FR_polyC, f0 + nop.i 0 +};; + + + +.pred.rel "mutex",p8,p9 +{ .mfi + nop.m 0 +(p8) fma.s0 FR_ResultS = FR_FirstS, f1, FR_polyS + nop.i 0 +} +{ .mfi + nop.m 0 +(p9) fms.s0 FR_ResultS = FR_FirstS, f1, FR_polyS + nop.i 0 +};; + +.pred.rel "mutex",p10,p11 +{ .mfi + nop.m 0 +(p10) fma.s0 FR_ResultC = FR_FirstC, f1, FR_polyC + nop.i 0 +} +{ .mfi + nop.m 0 +(p11) fms.s0 FR_ResultC = FR_FirstC, f1, FR_polyC + nop.i 0 +};; + + + +.pred.rel "mutex",p12,p13 +{ .mfi + nop.m 0 +(p12) fma.s0 FR_ResultS = FR_FirstC, f1, FR_polyC + nop.i 0 +} +{ .mfi + nop.m 0 +(p13) fms.s0 FR_ResultS = FR_FirstC, f1, FR_polyC + nop.i 0 +};; + +.pred.rel "mutex",p14,p15 +{ .mfi + nop.m 0 +(p14) fma.s0 FR_ResultC = FR_FirstS, f1, FR_polyS + nop.i 0 +} +{ .mfb + cmp.eq p10, p0 = 0x1, GR_Cis +(p15) fms.s0 FR_ResultC = FR_FirstS, f1, FR_polyS +(p10) br.ret.sptk b0 +};; + + +{ .mmb // exit for sincosl + stfe [sincos_pResSin] = FR_ResultS + stfe [sincos_pResCos] = FR_ResultC + br.ret.sptk b0 +};; + + + +SINCOSL_SMALL_R: +// +// Here if |r| < 2^-3 +// +// Enter with r, c, and N_Inc computed +// +{ .mfi + nop.m 0 + fma.s1 FR_rsq = FR_r, FR_r, f0 // rsq = r * r + nop.i 0 +};; + +{ .mmi + ldfe FR_S_5 = [GR_ad_se], -16 // Load S_5 + ldfe FR_C_5 = [GR_ad_ce], -16 // Load C_5 + nop.i 0 +};; + +{ .mmi + ldfe FR_S_4 = [GR_ad_se], -16 // Load S_4 + ldfe FR_C_4 = [GR_ad_ce], -16 // Load C_4 + nop.i 0 +};; + +SINCOSL_SMALL_R_0: +// Entry point for 2^-3 < |x| < pi/4 +SINCOSL_SMALL_R_1: +// Entry point for pi/4 < |x| < 2^24 and |r| < 2^-3 +{ .mfi + ldfe FR_S_3 = [GR_ad_se], -16 // Load S_3 + fma.s1 FR_r6 = FR_rsq, FR_rsq, f0 // Z = rsq * rsq + tbit.z p7,p11 = GR_N_Inc, 0 +} +{ .mfi + ldfe FR_C_3 = [GR_ad_ce], -16 // Load C_3 + nop.f 0 + and GR_N_SinCos = 0x1, GR_N_Inc +};; + +{ .mfi + ldfe FR_S_2 = [GR_ad_se], -16 // Load S_2 + fnma.s1 FR_cC = FR_c, FR_r, f0 // c = -c * r + sub GR_N_SignS = GR_N_Inc, GR_N_SinCos +} +{ .mfi + ldfe FR_C_2 = [GR_ad_ce], -16 // Load C_2 + nop.f 0 + add GR_N_SignC = GR_N_Inc, GR_N_SinCos +};; + +{ .mmi + ldfe FR_S_1 = [GR_ad_se], -16 // Load S_1 + ldfe FR_C_1 = [GR_ad_ce], -16 // Load C_1 +(p7) tbit.z.unc p9,p10 = GR_N_SignC, 1 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r7 = FR_r6, FR_r, f0 // Z = Z * r +(p7) tbit.z.unc p7,p8 = GR_N_SignS, 1 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_poly_loS = FR_rsq, FR_S_5, FR_S_4 // poly_lo=rsq*S_5+S_4 +(p11) tbit.z.unc p13,p14 = GR_N_SignC, 1 +} +{ .mfi + nop.m 0 + fma.s1 FR_poly_loC = FR_rsq, FR_C_5, FR_C_4 // poly_lo=rsq*C_5+C_4 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_poly_hiS = FR_rsq, FR_S_2, FR_S_1 // poly_hi=rsq*S_2+S_1 +(p11) tbit.z.unc p11,p12 = GR_N_SignS, 1 +} +{ .mfi + nop.m 0 + fma.s1 FR_poly_hiC = FR_rsq, FR_C_2, FR_C_1 // poly_hi=rsq*C_2+C_1 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s0 FR_FirstS = FR_r, f1, f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s0 FR_FirstC = f1, f1, f0 + nop.i 0 +};; + + +{ .mfi + nop.m 0 + fma.s1 FR_r6 = FR_r6, FR_rsq, f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r7 = FR_r7, FR_rsq, f0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_poly_loS = FR_rsq, FR_poly_loS, FR_S_3 // p_lo=p_lo*rsq+S_3 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_poly_loC = FR_rsq, FR_poly_loC, FR_C_3 // p_lo=p_lo*rsq+C_3 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s0 FR_inexact = FR_S_4, FR_S_4, f0 // Dummy op to set inexact + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_poly_hiS = FR_poly_hiS, FR_rsq, f0 // p_hi=p_hi*rsq + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_poly_hiC = FR_poly_hiC, FR_rsq, f0 // p_hi=p_hi*rsq + nop.i 0 +};; + +.pred.rel "mutex",p8,p14 +{ .mfi + nop.m 0 +(p8) fms.s0 FR_FirstS = f1, f0, FR_FirstS + nop.i 0 +} +{ .mfi + nop.m 0 +(p14) fms.s0 FR_FirstS = f1, f0, FR_FirstS + nop.i 0 +};; + +.pred.rel "mutex",p10,p12 +{ .mfi + nop.m 0 +(p10) fms.s0 FR_FirstC = f1, f0, FR_FirstC + nop.i 0 +} +{ .mfi + nop.m 0 +(p12) fms.s0 FR_FirstC = f1, f0, FR_FirstC + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_polyS = FR_r7, FR_poly_loS, FR_cS // poly=Z*poly_lo+c + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_polyC = FR_r6, FR_poly_loC, FR_cC // poly=Z*poly_lo+c + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_poly_hiS = FR_r, FR_poly_hiS, f0 // p_hi=r*p_hi + nop.i 0 +};; + + +{ .mfi + nop.m 0 + fma.s1 FR_polyS = FR_polyS, f1, FR_poly_hiS + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_polyC = FR_polyC, f1, FR_poly_hiC + nop.i 0 +};; + +.pred.rel "mutex",p7,p8 +{ .mfi + nop.m 0 +(p7) fma.s0 FR_ResultS = FR_FirstS, f1, FR_polyS + nop.i 0 +} +{ .mfi + nop.m 0 +(p8) fms.s0 FR_ResultS = FR_FirstS, f1, FR_polyS + nop.i 0 +};; + +.pred.rel "mutex",p9,p10 +{ .mfi + nop.m 0 +(p9) fma.s0 FR_ResultC = FR_FirstC, f1, FR_polyC + nop.i 0 +} +{ .mfi + nop.m 0 +(p10) fms.s0 FR_ResultC = FR_FirstC, f1, FR_polyC + nop.i 0 +};; + +.pred.rel "mutex",p11,p12 +{ .mfi + nop.m 0 +(p11) fma.s0 FR_ResultS = FR_FirstC, f1, FR_polyC + nop.i 0 +} +{ .mfi + nop.m 0 +(p12) fms.s0 FR_ResultS = FR_FirstC, f1, FR_polyC + nop.i 0 +};; + +.pred.rel "mutex",p13,p14 +{ .mfi + nop.m 0 +(p13) fma.s0 FR_ResultC = FR_FirstS, f1, FR_polyS + nop.i 0 +} +{ .mfb + cmp.eq p15, p0 = 0x1, GR_Cis +(p14) fms.s0 FR_ResultC = FR_FirstS, f1, FR_polyS +(p15) br.ret.sptk b0 +};; + + +{ .mmb // exit for sincosl + stfe [sincos_pResSin] = FR_ResultS + stfe [sincos_pResCos] = FR_ResultC + br.ret.sptk b0 +};; + + + + + + +SINCOSL_NORMAL_R: +// +// Here if 2^-3 <= |r| < pi/4 +// THIS IS THE MAIN PATH +// +// Enter with r, c, and N_Inc having been computed +// +{ .mfi + ldfe FR_PP_6 = [GR_ad_pp], 16 // Load PP_6 + fma.s1 FR_rsq = FR_r, FR_r, f0 // rsq = r * r + nop.i 0 +} +{ .mfi + ldfe FR_QQ_6 = [GR_ad_qq], 16 // Load QQ_6 + nop.f 0 + nop.i 0 +};; + +{ .mmi + ldfe FR_PP_5 = [GR_ad_pp], 16 // Load PP_5 + ldfe FR_QQ_5 = [GR_ad_qq], 16 // Load QQ_5 + nop.i 0 +};; + + + +SINCOSL_NORMAL_R_0: +// Entry for 2^-3 < |x| < pi/4 +.pred.rel "mutex",p9,p10 +{ .mmf + ldfe FR_C_1 = [GR_ad_pp], 16 // Load C_1 + ldfe FR_S_1 = [GR_ad_qq], 16 // Load S_1 + frcpa.s1 FR_r_hi, p6 = f1, FR_r // r_hi = frcpa(r) +};; + +{ .mfi + nop.m 0 + fma.s1 FR_polyS = FR_rsq, FR_PP_8, FR_PP_7 // poly = rsq*PP_8+PP_7 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_polyC = FR_rsq, FR_QQ_8, FR_QQ_7 // poly = rsq*QQ_8+QQ_7 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_cubed = FR_r, FR_rsq, f0 // rcubed = r * rsq + nop.i 0 +};; + + +SINCOSL_NORMAL_R_1: +// Entry for pi/4 <= |x| < 2^24 +.pred.rel "mutex",p9,p10 +{ .mmf + ldfe FR_PP_1 = [GR_ad_pp], 16 // Load PP_1_hi + ldfe FR_QQ_1 = [GR_ad_qq], 16 // Load QQ_1 + frcpa.s1 FR_r_hi, p6 = f1, FR_r_hi // r_hi = frpca(frcpa(r)) +};; + +{ .mfi + ldfe FR_PP_4 = [GR_ad_pp], 16 // Load PP_4 + fma.s1 FR_polyS = FR_rsq, FR_polyS, FR_PP_6 // poly = rsq*poly+PP_6 + and GR_N_SinCos = 0x1, GR_N_Inc +} +{ .mfi + ldfe FR_QQ_4 = [GR_ad_qq], 16 // Load QQ_4 + fma.s1 FR_polyC = FR_rsq, FR_polyC, FR_QQ_6 // poly = rsq*poly+QQ_6 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_corrS = FR_C_1, FR_rsq, f0 // corr = C_1 * rsq + sub GR_N_SignS = GR_N_Inc, GR_N_SinCos +} +{ .mfi + nop.m 0 + fma.s1 FR_corrC = FR_S_1, FR_r_cubed, FR_r // corr = S_1 * r^3 + r + add GR_N_SignC = GR_N_Inc, GR_N_SinCos +};; + +{ .mfi + ldfe FR_PP_3 = [GR_ad_pp], 16 // Load PP_3 + fma.s1 FR_r_hi_sq = FR_r_hi, FR_r_hi, f0 // r_hi_sq = r_hi * r_hi + tbit.z p7,p11 = GR_N_Inc, 0 +} +{ .mfi + ldfe FR_QQ_3 = [GR_ad_qq], 16 // Load QQ_3 + fms.s1 FR_r_lo = FR_r, f1, FR_r_hi // r_lo = r - r_hi + nop.i 0 +};; + +{ .mfi + ldfe FR_PP_2 = [GR_ad_pp], 16 // Load PP_2 + fma.s1 FR_polyS = FR_rsq, FR_polyS, FR_PP_5 // poly = rsq*poly+PP_5 +(p7) tbit.z.unc p9,p10 = GR_N_SignC, 1 +} +{ .mfi + ldfe FR_QQ_2 = [GR_ad_qq], 16 // Load QQ_2 + fma.s1 FR_polyC = FR_rsq, FR_polyC, FR_QQ_5 // poly = rsq*poly+QQ_5 + nop.i 0 +};; + +{ .mfi + ldfe FR_PP_1_lo = [GR_ad_pp], 16 // Load PP_1_lo + fma.s1 FR_corrS = FR_corrS, FR_c, FR_c // corr = corr * c + c +(p7) tbit.z.unc p7,p8 = GR_N_SignS, 1 +} +{ .mfi + nop.m 0 + fnma.s1 FR_corrC = FR_corrC, FR_c, f0 // corr = -corr * c + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_U_loS = FR_r, FR_r_hi, FR_r_hi_sq // U_lo = r*r_hi+r_hi_sq +(p11) tbit.z.unc p13,p14 = GR_N_SignC, 1 +} +{ .mfi + nop.m 0 + fma.s1 FR_U_loC = FR_r_hi, f1, FR_r // U_lo = r_hi + r + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_U_hiS = FR_r_hi, FR_r_hi_sq, f0 // U_hi = r_hi*r_hi_sq +(p11) tbit.z.unc p11,p12 = GR_N_SignS, 1 +} +{ .mfi + nop.m 0 + fma.s1 FR_U_hiC = FR_QQ_1, FR_r_hi_sq, f1 // U_hi = QQ_1*r_hi_sq+1 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_polyS = FR_rsq, FR_polyS, FR_PP_4 // poly = poly*rsq+PP_4 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_polyC = FR_rsq, FR_polyC, FR_QQ_4 // poly = poly*rsq+QQ_4 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_U_loS = FR_r, FR_r, FR_U_loS // U_lo = r * r + U_lo + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_U_loC = FR_r_lo, FR_U_loC, f0 // U_lo = r_lo * U_lo + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_U_hiS = FR_PP_1, FR_U_hiS, f0 // U_hi = PP_1 * U_hi + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_polyS = FR_rsq, FR_polyS, FR_PP_3 // poly = poly*rsq+PP_3 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_polyC = FR_rsq, FR_polyC, FR_QQ_3 // poly = poly*rsq+QQ_3 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_U_loS = FR_r_lo, FR_U_loS, f0 // U_lo = r_lo * U_lo + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_U_loC = FR_QQ_1,FR_U_loC, f0 // U_lo = QQ_1 * U_lo + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_U_hiS = FR_r, f1, FR_U_hiS // U_hi = r + U_hi + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_polyS = FR_rsq, FR_polyS, FR_PP_2 // poly = poly*rsq+PP_2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_polyC = FR_rsq, FR_polyC, FR_QQ_2 // poly = poly*rsq+QQ_2 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_U_loS = FR_PP_1, FR_U_loS, f0 // U_lo = PP_1 * U_lo + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_polyS = FR_rsq, FR_polyS, FR_PP_1_lo // poly =poly*rsq+PP1lo + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_polyC = FR_rsq, FR_polyC, f0 // poly = poly*rsq + nop.i 0 +};; + + +.pred.rel "mutex",p8,p14 +{ .mfi + nop.m 0 +(p8) fms.s0 FR_U_hiS = f1, f0, FR_U_hiS + nop.i 0 +} +{ .mfi + nop.m 0 +(p14) fms.s0 FR_U_hiS = f1, f0, FR_U_hiS + nop.i 0 +};; + +.pred.rel "mutex",p10,p12 +{ .mfi + nop.m 0 +(p10) fms.s0 FR_U_hiC = f1, f0, FR_U_hiC + nop.i 0 +} +{ .mfi + nop.m 0 +(p12) fms.s0 FR_U_hiC = f1, f0, FR_U_hiC + nop.i 0 +};; + + +{ .mfi + nop.m 0 + fma.s1 FR_VS = FR_U_loS, f1, FR_corrS // V = U_lo + corr + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_VC = FR_U_loC, f1, FR_corrC // V = U_lo + corr + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s0 FR_inexact = FR_PP_5, FR_PP_4, f0 // Dummy op to set inexact + nop.i 0 +};; + + +{ .mfi + nop.m 0 + fma.s1 FR_polyS = FR_r_cubed, FR_polyS, f0 // poly = poly*r^3 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_polyC = FR_rsq, FR_polyC, f0 // poly = poly*rsq + nop.i 0 +};; + + +{ .mfi + nop.m 0 + fma.s1 FR_VS = FR_polyS, f1, FR_VS // V = poly + V + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_VC = FR_polyC, f1, FR_VC // V = poly + V + nop.i 0 +};; + + + +.pred.rel "mutex",p7,p8 +{ .mfi + nop.m 0 +(p7) fma.s0 FR_ResultS = FR_U_hiS, f1, FR_VS + nop.i 0 +} +{ .mfi + nop.m 0 +(p8) fms.s0 FR_ResultS = FR_U_hiS, f1, FR_VS + nop.i 0 +};; + +.pred.rel "mutex",p9,p10 +{ .mfi + nop.m 0 +(p9) fma.s0 FR_ResultC = FR_U_hiC, f1, FR_VC + nop.i 0 +} +{ .mfi + nop.m 0 +(p10) fms.s0 FR_ResultC = FR_U_hiC, f1, FR_VC + nop.i 0 +};; + + + +.pred.rel "mutex",p11,p12 +{ .mfi + nop.m 0 +(p11) fma.s0 FR_ResultS = FR_U_hiC, f1, FR_VC + nop.i 0 +} +{ .mfi + nop.m 0 +(p12) fms.s0 FR_ResultS = FR_U_hiC, f1, FR_VC + nop.i 0 +};; + +.pred.rel "mutex",p13,p14 +{ .mfi + nop.m 0 +(p13) fma.s0 FR_ResultC = FR_U_hiS, f1, FR_VS + nop.i 0 +} +{ .mfb + cmp.eq p15, p0 = 0x1, GR_Cis +(p14) fms.s0 FR_ResultC = FR_U_hiS, f1, FR_VS +(p15) br.ret.sptk b0 +};; + +{ .mmb // exit for sincosl + stfe [sincos_pResSin] = FR_ResultS + stfe [sincos_pResCos] = FR_ResultC + br.ret.sptk b0 +};; + + + + + +SINCOSL_ZERO: + +{ .mfi + nop.m 0 + fmerge.s FR_ResultS = FR_Input_X, FR_Input_X // If sin, result = input + nop.i 0 +} +{ .mfb + cmp.eq p15, p0 = 0x1, GR_Cis + fma.s0 FR_ResultC = f1, f1, f0 // If cos, result=1.0 +(p15) br.ret.sptk b0 +};; + +{ .mmb // exit for sincosl + stfe [sincos_pResSin] = FR_ResultS + stfe [sincos_pResCos] = FR_ResultC + br.ret.sptk b0 +};; + + +SINCOSL_DENORMAL: +{ .mmb + getf.exp GR_signexp_x = FR_norm_x // Get sign and exponent of x + nop.m 999 + br.cond.sptk SINCOSL_COMMON2 // Return to common code +} +;; + + +SINCOSL_SPECIAL: +// +// Path for Arg = +/- QNaN, SNaN, Inf +// Invalid can be raised. SNaNs +// become QNaNs +// +{ .mfi + cmp.eq p15, p0 = 0x1, GR_Cis + fmpy.s0 FR_ResultS = FR_Input_X, f0 + nop.i 0 +} +{ .mfb + nop.m 0 + fmpy.s0 FR_ResultC = FR_Input_X, f0 +(p15) br.ret.sptk b0 +};; + +{ .mmb // exit for sincosl + stfe [sincos_pResSin] = FR_ResultS + stfe [sincos_pResCos] = FR_ResultC + br.ret.sptk b0 +};; + +GLOBAL_LIBM_END(__libm_sincosl) + + +// ******************************************************************* +// ******************************************************************* +// ******************************************************************* +// +// Special Code to handle very large argument case. +// Call int __libm_pi_by_2_reduce(x,r,c) for |arguments| >= 2**63 +// The interface is custom: +// On input: +// (Arg or x) is in f8 +// On output: +// r is in f8 +// c is in f9 +// N is in r8 +// Be sure to allocate at least 2 GP registers as output registers for +// __libm_pi_by_2_reduce. This routine uses r62-63. These are used as +// scratch registers within the __libm_pi_by_2_reduce routine (for speed). +// +// We know also that __libm_pi_by_2_reduce preserves f10-15, f71-127. We +// use this to eliminate save/restore of key fp registers in this calling +// function. +// +// ******************************************************************* +// ******************************************************************* +// ******************************************************************* + +LOCAL_LIBM_ENTRY(__libm_callout) +SINCOSL_ARG_TOO_LARGE: +.prologue +{ .mfi + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +};; + +{ .mmi + setf.exp FR_Two_to_M3 = GR_exp_2_to_m3 // Form 2^-3 + mov GR_SAVE_GP=gp // Save gp +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; + +.body +// +// Call argument reduction with x in f8 +// Returns with N in r8, r in f8, c in f9 +// Assumes f71-127 are preserved across the call +// +{ .mib + setf.exp FR_Neg_Two_to_M3 = GR_exp_m2_to_m3 // Form -(2^-3) + nop.i 0 + br.call.sptk b0=__libm_pi_by_2_reduce# +};; + +{ .mfi + mov GR_N_Inc = r8 + fcmp.lt.unc.s1 p6, p0 = FR_r, FR_Two_to_M3 + mov b0 = GR_SAVE_B0 // Restore return address +};; + +{ .mfi + mov gp = GR_SAVE_GP // Restore gp +(p6) fcmp.gt.unc.s1 p6, p0 = FR_r, FR_Neg_Two_to_M3 + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs +};; + +{ .mbb + nop.m 0 +(p6) br.cond.spnt SINCOSL_SMALL_R // Branch if |r|< 2^-3 for |x| >= 2^63 + br.cond.sptk SINCOSL_NORMAL_R // Branch if |r|>=2^-3 for |x| >= 2^63 +};; + +LOCAL_LIBM_END(__libm_callout) + +.type __libm_pi_by_2_reduce#,@function +.global __libm_pi_by_2_reduce# + + + diff --git a/sysdeps/ia64/fpu/libm_support.h b/sysdeps/ia64/fpu/libm_support.h new file mode 100644 index 0000000000..dc9c0a2648 --- /dev/null +++ b/sysdeps/ia64/fpu/libm_support.h @@ -0,0 +1,1051 @@ +/* file: libm_support.h */ + + +/* +// Copyright (c) 2000 - 2004, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// + +// History: 02/02/2000 Initial version +// 2/28/2000 added tags for logb and nextafter +// 3/22/2000 Changes to support _LIB_VERSIONIMF variable +// and filled some enum gaps. Added support for C99. +// 5/31/2000 added prototypes for __libm_frexp_4l/8l +// 8/10/2000 Changed declaration of _LIB_VERSIONIMF to work for library +// builds and other application builds (precompiler directives). +// 8/11/2000 Added pointers-to-matherr-functions declarations to allow +// for user-defined matherr functions in the dll build. +// 12/07/2000 Added scalbn error_types values. +// 5/01/2001 Added error_types values for C99 nearest integer +// functions. +// 6/07/2001 Added error_types values for fdim. +// 6/18/2001 Added include of complex_support.h. +// 8/03/2001 Added error_types values for nexttoward, scalbln. +// 8/23/2001 Corrected tag numbers from 186 and higher. +// 8/27/2001 Added check for long int and long long int definitions. +// 12/10/2001 Added error_types for erfc. +// 12/27/2001 Added error_types for degree argument functions. +// 01/02/2002 Added error_types for tand, cotd. +// 01/04/2002 Delete include of complex_support.h +// 01/23/2002 Deleted prototypes for __libm_frexp*. Added check for +// multiple int, long int, and long long int definitions. +// 05/20/2002 Added error_types for cot. +// 06/27/2002 Added error_types for sinhcosh. +// 12/05/2002 Added error_types for annuity and compound +// 04/10/2003 Added error_types for tgammal/tgamma/tgammaf +// 05/16/2003 FP-treatment macros copied here from IA32 libm_support.h +// 06/02/2003 Added pad into struct fp80 (12/16 bytes). +// 08/01/2003 Added struct ker80 and macros for multiprecision addition, +// subtraction, multiplication, division, square root. +// 08/07/2003 History section updated. +// 09/03/2003 ALIGN(n) macro added. +// 10/01/2003 LDOUBLE_ALIGN and fp80 corrected on linux to 16 bytes. +// 11/24/2004 Added ifdef around definitions of INT32/64 +// 12/15/2004 Added error_types for exp10, nextafter, nexttoward +// underflow. Moved error codes into libm_error_codes.h. +// +*/ + +#ifndef __LIBM_SUPPORT_H_INCLUDED__ +#define __LIBM_SUPPORT_H_INCLUDED__ + +#ifndef _LIBC +#if !(defined(_WIN32) || defined(_WIN64)) +# pragma const_seg(".rodata") /* place constant data in text (code) section */ +#endif + +#if defined(__ICC) || defined(__ICL) || defined(__ECC) || defined(__ECL) +# pragma warning( disable : 1682 ) /* #1682: ixplicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem) */ +# pragma warning( disable : 1683 ) /* #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem) */ +#endif +#endif + +/* macros to form a double value in hex representation (unsigned int type) */ + +#define DOUBLE_HEX(hi,lo) 0x##lo,0x##hi /*LITTLE_ENDIAN*/ + +#include "libm_cpu_defs.h" + +#if !(defined (IA64)) +# include "libm_dll.h" +# include "libm_dispatch.h" +#endif + +#include "libm_error_codes.h" + +struct exceptionf +{ + int type; + char *name; + float arg1, arg2, retval; +}; + +# ifdef __cplusplus +struct __exception +{ + int type; + char *name; + double arg1, arg2, retval; +}; +# else + +# ifndef _LIBC +struct exception +{ + int type; + char *name; + double arg1, arg2, retval; +}; +# endif +# endif + +struct exceptionl +{ + int type; + char *name; + long double arg1, arg2, retval; +}; + +#if (defined (_MS_) && defined (IA64)) +#define MATHERR_F _matherrf +#define MATHERR_D _matherr +#else +#define MATHERR_F matherrf +#define MATHERR_D matherr +#endif + +# ifdef __cplusplus +#define EXC_DECL_D __exception +#else +// exception is a reserved name in C++ +#define EXC_DECL_D exception +#endif + +extern int MATHERR_F(struct exceptionf*); +extern int MATHERR_D(struct EXC_DECL_D*); +extern int matherrl(struct exceptionl*); + +#ifndef _LIBC +// Add code to support _LIB_VERSIONIMF +typedef enum +{ + _IEEE_ = -1, // IEEE-like behavior + _SVID_, // SysV, Rel. 4 behavior + _XOPEN_, // Unix98 + _POSIX_, // Posix + _ISOC_ // ISO C9X +} _LIB_VERSION_TYPE; +#endif + +// This is a run-time variable and may affect +// floating point behavior of the libm functions + +#if !defined( LIBM_BUILD ) +#if defined( _DLL ) +extern _LIB_VERSION_TYPE __declspec(dllimport) _LIB_VERSIONIMF; +#else +extern _LIB_VERSION_TYPE _LIB_VERSIONIMF; +#endif /* _DLL */ +#else +extern int (*pmatherrf)(struct exceptionf*); +extern int (*pmatherr)(struct EXC_DECL_D*); +extern int (*pmatherrl)(struct exceptionl*); +#endif /* LIBM_BUILD */ + +/* memory format definitions (LITTLE_ENDIAN only) */ + +#if !(defined(SIZE_INT_32) || defined(SIZE_INT_64)) +# error "You need to define SIZE_INT_32 or SIZE_INT_64" +#endif + +#if (defined(SIZE_INT_32) && defined(SIZE_INT_64)) +#error multiple integer size definitions; define SIZE_INT_32 or SIZE_INT_64 +#endif + +#if !(defined(SIZE_LONG_32) || defined(SIZE_LONG_64)) +# error "You need to define SIZE_LONG_32 or SIZE_LONG_64" +#endif + +#if (defined(SIZE_LONG_32) && defined(SIZE_LONG_64)) +#error multiple integer size definitions; define SIZE_LONG_32 or SIZE_LONG_64 +#endif + +#if !defined(__USE_EXTERNAL_FPMEMTYP_H__) + +#define BIAS_32 0x007F +#define BIAS_64 0x03FF +#define BIAS_80 0x3FFF + +#define MAXEXP_32 0x00FE +#define MAXEXP_64 0x07FE +#define MAXEXP_80 0x7FFE + +#define EXPINF_32 0x00FF +#define EXPINF_64 0x07FF +#define EXPINF_80 0x7FFF + +struct fp32 { /*// sign:1 exponent:8 significand:23 (implied leading 1)*/ +#if defined(SIZE_INT_32) + unsigned significand:23; + unsigned exponent:8; + unsigned sign:1; +#elif defined(SIZE_INT_64) + unsigned significand:23; + unsigned exponent:8; + unsigned sign:1; +#endif +}; + +struct fp64 { /*/ sign:1 exponent:11 significand:52 (implied leading 1)*/ +#if defined(SIZE_INT_32) + unsigned lo_significand:32; + unsigned hi_significand:20; + unsigned exponent:11; + unsigned sign:1; +#elif defined(SIZE_INT_64) + unsigned significand:52; + unsigned exponent:11; + unsigned sign:1; +#endif +}; + +struct fp80 { /*/ sign:1 exponent:15 significand:64 (NO implied bits) */ +#if defined(SIZE_INT_32) + unsigned lo_significand; + unsigned hi_significand; + unsigned exponent:15; + unsigned sign:1; +#elif defined(SIZE_INT_64) + unsigned significand; + unsigned exponent:15; + unsigned sign:1; +#endif + unsigned pad:16; +#if !(defined(__unix__) && defined(__i386__)) + unsigned padwin:32; +#endif +}; + +#endif /*__USE_EXTERNAL_FPMEMTYP_H__*/ + +#if !(defined(opensource)) +typedef __int32 INT32; +typedef signed __int32 SINT32; +typedef unsigned __int32 UINT32; + +typedef __int64 INT64; +typedef signed __int64 SINT64; +typedef unsigned __int64 UINT64; +#else +typedef int INT32; +typedef signed int SINT32; +typedef unsigned int UINT32; + +typedef long long INT64; +typedef signed long long SINT64; +typedef unsigned long long UINT64; +#endif + +#if (defined(_WIN32) || defined(_WIN64)) /* Windows */ +# define I64CONST(bits) 0x##bits##i64 +# define U64CONST(bits) 0x##bits##ui64 +#elif (defined(__linux__) && defined(_M_IA64)) /* Linux,64 */ +# define I64CONST(bits) 0x##bits##L +# define U64CONST(bits) 0x##bits##uL +#else /* Linux,32 */ +# define I64CONST(bits) 0x##bits##LL +# define U64CONST(bits) 0x##bits##uLL +#endif + +struct ker80 { + union { + long double ldhi; + struct fp80 fphi; + }; + union { + long double ldlo; + struct fp80 fplo; + }; + int ex; +}; + +/* Addition: x+y */ +/* The result is sum rhi+rlo */ +/* Temporary variables: t1 */ +/* All variables are in long double precision */ +/* Correct if no overflow (algorithm by D.Knuth) */ +#define __LIBM_ADDL1_K80( rhi,rlo,x,y, t1 ) \ + rhi = x + y; \ + rlo = rhi - x; \ + t1 = rhi - rlo; \ + rlo = y - rlo; \ + t1 = x - t1; \ + rlo = rlo + t1; + +/* Addition: (xhi+xlo) + (yhi+ylo) */ +/* The result is sum rhi+rlo */ +/* Temporary variables: t1 */ +/* All variables are in long double precision */ +/* Correct if no overflow (algorithm by T.J.Dekker) */ +#define __LIBM_ADDL2_K80( rhi,rlo,xhi,xlo,yhi,ylo, t1 ) \ + rlo = xhi+yhi; \ + if ( VALUE_GT_80(FP80(xhi),FP80(yhi)) ) { \ + t1=xhi-rlo;t1=t1+yhi;t1=t1+ylo;t1=t1+xlo; \ + } else { \ + t1=yhi-rlo;t1=t1+xhi;t1=t1+xlo;t1=t1+ylo; \ + } \ + rhi=rlo+t1; \ + rlo=rlo-rhi;rlo=rlo+t1; + +/* Addition: r=x+y */ +/* Variables r,x,y are pointers to struct ker80, */ +/* all other variables are in long double precision */ +/* Temporary variables: t1 */ +/* Correct if x and y belong to interval [2^-8000;2^8000], */ +/* or when one or both of them are zero */ +#if defined(SIZE_INT_32) +#define __LIBM_ADDL_K80(r,x,y, t1) \ + if ( ((y)->ex+(y)->fphi.exponent-134 < \ + (x)->ex+(x)->fphi.exponent) && \ + ((x)->ex+(x)->fphi.exponent < \ + (y)->ex+(y)->fphi.exponent+134) && \ + !SIGNIFICAND_ZERO_80(&((x)->fphi)) && \ + !SIGNIFICAND_ZERO_80(&((y)->fphi)) ) \ + { \ + /* y/2^134 < x < y*2^134, */ \ + /* and x,y are nonzero finite numbers */ \ + if ( (x)->ex != (y)->ex ) { \ + /* adjust x->ex to y->ex */ \ + /* t1 = 2^(x->ex - y->ex) */ \ + FP80(t1)->sign = 0; \ + FP80(t1)->exponent = BIAS_80 + (x)->ex-(y)->ex; \ + /* exponent is correct because */ \ + /* |x->ex - y->ex| = */ \ + /* = | (x->ex + x->fphi.exponent) - */ \ + /* -(y->ex + y->fphi.exponent) + */ \ + /* + y->fphi.exponent - */ \ + /* - x->fphi.exponent | < */ \ + /* < | (x->ex+x->fphi.exponent) - */ \ + /* -(y->ex+y->fphi.exponent) | + */ \ + /* +| y->fphi.exponent - */ \ + /* -x->fphi.exponent | < */ \ + /* < 134 + 16000 */ \ + FP80(t1)->hi_significand = 0x80000000; \ + FP80(t1)->lo_significand = 0x00000000; \ + (x)->ex = (y)->ex; \ + (x)->ldhi *= t1; \ + (x)->ldlo *= t1; \ + } \ + /* r==x+y */ \ + (r)->ex = (y)->ex; \ + __LIBM_ADDL2_K80( (r)->ldhi,(r)->ldlo, \ + (x)->ldhi,(x)->ldlo, (y)->ldhi,(y)->ldlo, t1 ); \ + } else if ( SIGNIFICAND_ZERO_80(&((x)->fphi)) || \ + ((y)->ex+(y)->fphi.exponent-BIAS_80 - 134 >= \ + (x)->ex+(x)->fphi.exponent-BIAS_80) ) \ + { \ + /* |x|<<|y| */ \ + *(r) = *(y); \ + } else { \ + /* |y|<<|x| */ \ + *(r) = *(x); \ + } +#elif defined(SIZE_INT_64) +#define __LIBM_ADDL_K80(r,x,y, t1) \ + if ( ((y)->ex+(y)->fphi.exponent-134 < \ + (x)->ex+(x)->fphi.exponent) && \ + ((x)->ex+(x)->fphi.exponent < \ + (y)->ex+(y)->fphi.exponent+134) && \ + !SIGNIFICAND_ZERO_80(&((x)->fphi)) && \ + !SIGNIFICAND_ZERO_80(&((y)->fphi)) ) \ + { \ + /* y/2^134 < x < y*2^134, */ \ + /* and x,y are nonzero finite numbers */ \ + if ( (x)->ex != (y)->ex ) { \ + /* adjust x->ex to y->ex */ \ + /* t1 = 2^(x->ex - y->ex) */ \ + FP80(t1)->sign = 0; \ + FP80(t1)->exponent = BIAS_80 + (x)->ex-(y)->ex; \ + /* exponent is correct because */ \ + /* |x->ex - y->ex| = */ \ + /* = | (x->ex + x->fphi.exponent) - */ \ + /* -(y->ex + y->fphi.exponent) + */ \ + /* + y->fphi.exponent - */ \ + /* - x->fphi.exponent | < */ \ + /* < | (x->ex+x->fphi.exponent) - */ \ + /* -(y->ex+y->fphi.exponent) | + */ \ + /* +| y->fphi.exponent - */ \ + /* -x->fphi.exponent | < */ \ + /* < 134 + 16000 */ \ + FP80(t1)->significand = 0x8000000000000000; \ + (x)->ex = (y)->ex; \ + (x)->ldhi *= t1; \ + (x)->ldlo *= t1; \ + } \ + /* r==x+y */ \ + (r)->ex = (y)->ex; \ + __LIBM_ADDL2_K80( (r)->ldhi,(r)->ldlo, \ + (x)->ldhi,(x)->ldlo, (y)->ldhi,(y)->ldlo, t1 ); \ + } else if ( SIGNIFICAND_ZERO_80(&((x)->fphi)) || \ + ((y)->ex+(y)->fphi.exponent-BIAS_80 - 134 >= \ + (x)->ex+(x)->fphi.exponent-BIAS_80) ) \ + { \ + /* |x|<<|y| */ \ + *(r) = *(y); \ + } else { \ + /* |y|<<|x| */ \ + *(r) = *(x); \ + } +#endif + +/* Addition: r=x+y */ +/* Variables r,x,y are pointers to struct ker80, */ +/* all other variables are in long double precision */ +/* Temporary variables: t1 */ +/* Correct for any finite x and y */ +#define __LIBM_ADDL_NORM_K80(r,x,y, t1) \ + if ( ((x)->fphi.exponent-BIAS_80<-8000) || \ + ((x)->fphi.exponent-BIAS_80>+8000) || \ + ((y)->fphi.exponent-BIAS_80<-8000) || \ + ((y)->fphi.exponent-BIAS_80>+8000) ) \ + { \ + __libm_normalizel_k80(x); \ + __libm_normalizel_k80(y); \ + } \ + __LIBM_ADDL_K80(r,x,y, t1) + +/* Subtraction: x-y */ +/* The result is sum rhi+rlo */ +/* Temporary variables: t1 */ +/* All variables are in long double precision */ +/* Correct if no overflow (algorithm by D.Knuth) */ +#define __LIBM_SUBL1_K80( rhi, rlo, x, y, t1 ) \ + rhi = x - y; \ + rlo = rhi - x; \ + t1 = rhi - rlo; \ + rlo = y + rlo; \ + t1 = x - t1; \ + rlo = t1 - rlo; + +/* Subtraction: (xhi+xlo) - (yhi+ylo) */ +/* The result is sum rhi+rlo */ +/* Temporary variables: t1 */ +/* All variables are in long double precision */ +/* Correct if no overflow (algorithm by T.J.Dekker) */ +#define __LIBM_SUBL2_K80( rhi,rlo,xhi,xlo,yhi,ylo, t1 ) \ + rlo = xhi-yhi; \ + if ( VALUE_GT_80(FP80(xhi),FP80(yhi)) ) { \ + t1=xhi-rlo;t1=t1-yhi;t1=t1-ylo;t1=t1+xlo; \ + } else { \ + t1=yhi+rlo;t1=xhi-t1;t1=t1+xlo;t1=t1-ylo; \ + } \ + rhi=rlo+t1; \ + rlo=rlo-rhi;rlo=rlo+t1; + +/* Subtraction: r=x-y */ +/* Variables r,x,y are pointers to struct ker80, */ +/* all other variables are in long double precision */ +/* Temporary variables: t1 */ +/* Correct if x and y belong to interval [2^-8000;2^8000], */ +/* or when one or both of them are zero */ +#if defined(SIZE_INT_32) +#define __LIBM_SUBL_K80(r,x,y, t1) \ + if ( ((y)->ex+(y)->fphi.exponent-134 < \ + (x)->ex+(x)->fphi.exponent) && \ + ((x)->ex+(x)->fphi.exponent < \ + (y)->ex+(y)->fphi.exponent+134) && \ + !SIGNIFICAND_ZERO_80(&((x)->fphi)) && \ + !SIGNIFICAND_ZERO_80(&((y)->fphi)) ) \ + { \ + /* y/2^134 < x < y*2^134, */ \ + /* and x,y are nonzero finite numbers */ \ + if ( (x)->ex != (y)->ex ) { \ + /* adjust x->ex to y->ex */ \ + /* t1 = 2^(x->ex - y->ex) */ \ + FP80(t1)->sign = 0; \ + FP80(t1)->exponent = BIAS_80 + (x)->ex-(y)->ex; \ + /* exponent is correct because */ \ + /* |x->ex - y->ex| = */ \ + /* = | (x->ex + x->fphi.exponent) - */ \ + /* -(y->ex + y->fphi.exponent) + */ \ + /* + y->fphi.exponent - */ \ + /* - x->fphi.exponent | < */ \ + /* < | (x->ex+x->fphi.exponent) - */ \ + /* -(y->ex+y->fphi.exponent) | + */ \ + /* +| y->fphi.exponent - */ \ + /* -x->fphi.exponent | < */ \ + /* < 134 + 16000 */ \ + FP80(t1)->hi_significand = 0x80000000; \ + FP80(t1)->lo_significand = 0x00000000; \ + (x)->ex = (y)->ex; \ + (x)->ldhi *= t1; \ + (x)->ldlo *= t1; \ + } \ + /* r==x+y */ \ + (r)->ex = (y)->ex; \ + __LIBM_SUBL2_K80( (r)->ldhi,(r)->ldlo, \ + (x)->ldhi,(x)->ldlo, (y)->ldhi,(y)->ldlo, t1 ); \ + } else if ( SIGNIFICAND_ZERO_80(&((x)->fphi)) || \ + ((y)->ex+(y)->fphi.exponent-BIAS_80 - 134 >= \ + (x)->ex+(x)->fphi.exponent-BIAS_80) ) \ + { \ + /* |x|<<|y| */ \ + (r)->ex = (y)->ex; \ + (r)->ldhi = -((y)->ldhi); \ + (r)->ldlo = -((y)->ldlo); \ + } else { \ + /* |y|<<|x| */ \ + *(r) = *(x); \ + } +#elif defined(SIZE_INT_64) +#define __LIBM_SUBL_K80(r,x,y, t1) \ + if ( ((y)->ex+(y)->fphi.exponent-134 < \ + (x)->ex+(x)->fphi.exponent) && \ + ((x)->ex+(x)->fphi.exponent < \ + (y)->ex+(y)->fphi.exponent+134) && \ + !SIGNIFICAND_ZERO_80(&((x)->fphi)) && \ + !SIGNIFICAND_ZERO_80(&((y)->fphi)) ) \ + { \ + /* y/2^134 < x < y*2^134, */ \ + /* and x,y are nonzero finite numbers */ \ + if ( (x)->ex != (y)->ex ) { \ + /* adjust x->ex to y->ex */ \ + /* t1 = 2^(x->ex - y->ex) */ \ + FP80(t1)->sign = 0; \ + FP80(t1)->exponent = BIAS_80 + (x)->ex-(y)->ex; \ + /* exponent is correct because */ \ + /* |x->ex - y->ex| = */ \ + /* = | (x->ex + x->fphi.exponent) - */ \ + /* -(y->ex + y->fphi.exponent) + */ \ + /* + y->fphi.exponent - */ \ + /* - x->fphi.exponent | < */ \ + /* < | (x->ex+x->fphi.exponent) - */ \ + /* -(y->ex+y->fphi.exponent) | + */ \ + /* +| y->fphi.exponent - */ \ + /* -x->fphi.exponent | < */ \ + /* < 134 + 16000 */ \ + FP80(t1)->significand = 0x8000000000000000; \ + (x)->ex = (y)->ex; \ + (x)->ldhi *= t1; \ + (x)->ldlo *= t1; \ + } \ + /* r==x+y */ \ + (r)->ex = (y)->ex; \ + __LIBM_SUBL2_K80( (r)->ldhi,(r)->ldlo, \ + (x)->ldhi,(x)->ldlo, (y)->ldhi,(y)->ldlo, t1 ); \ + } else if ( SIGNIFICAND_ZERO_80(&((x)->fphi)) || \ + ((y)->ex+(y)->fphi.exponent-BIAS_80 - 134 >= \ + (x)->ex+(x)->fphi.exponent-BIAS_80) ) \ + { \ + /* |x|<<|y| */ \ + (r)->ex = (y)->ex; \ + (r)->ldhi = -((y)->ldhi); \ + (r)->ldlo = -((y)->ldlo); \ + } else { \ + /* |y|<<|x| */ \ + *(r) = *(x); \ + } +#endif + +/* Subtraction: r=x+y */ +/* Variables r,x,y are pointers to struct ker80, */ +/* all other variables are in long double precision */ +/* Temporary variables: t1 */ +/* Correct for any finite x and y */ +#define __LIBM_SUBL_NORM_K80(r,x,y, t1) \ + if ( ((x)->fphi.exponent-BIAS_80<-8000) || \ + ((x)->fphi.exponent-BIAS_80>+8000) || \ + ((y)->fphi.exponent-BIAS_80<-8000) || \ + ((y)->fphi.exponent-BIAS_80>+8000) ) \ + { \ + __libm_normalizel_k80(x); \ + __libm_normalizel_k80(y); \ + } \ + __LIBM_SUBL_K80(r,x,y, t1) + +/* Multiplication: x*y */ +/* The result is sum rhi+rlo */ +/* Here t32 is the constant 2^32+1 */ +/* Temporary variables: t1,t2,t3,t4,t5,t6 */ +/* All variables are in long double precision */ +/* Correct if no over/underflow (algorithm by T.J.Dekker) */ +#define __LIBM_MULL1_K80(rhi,rlo,x,y, \ + t32,t1,t2,t3,t4,t5,t6) \ + t1=(x)*(t32); t3=x-t1; t3=t3+t1; t4=x-t3; \ + t1=(y)*(t32); t5=y-t1; t5=t5+t1; t6=y-t5; \ + t1=(t3)*(t5); \ + t2=(t3)*(t6)+(t4)*(t5); \ + rhi=t1+t2; \ + rlo=t1-rhi; rlo=rlo+t2; rlo=rlo+(t4*t6); + +/* Multiplication: (xhi+xlo)*(yhi+ylo) */ +/* The result is sum rhi+rlo */ +/* Here t32 is the constant 2^32+1 */ +/* Temporary variables: t1,t2,t3,t4,t5,t6,t7,t8 */ +/* All variables are in long double precision */ +/* Correct if no over/underflow (algorithm by T.J.Dekker) */ +#define __LIBM_MULL2_K80(rhi,rlo,xhi,xlo,yhi,ylo, \ + t32,t1,t2,t3,t4,t5,t6,t7,t8) \ + __LIBM_MULL1_K80(t7,t8,xhi,yhi, t32,t1,t2,t3,t4,t5,t6) \ + t1=(xhi)*(ylo)+(xlo)*(yhi); t1=t1+t8; \ + rhi=t7+t1; \ + rlo=t7-rhi; rlo=rlo+t1; + +/* Multiplication: r=x*y */ +/* Variables r,x,y are pointers to struct ker80, */ +/* all other variables are in long double precision */ +/* Here t32 is the constant 2^32+1 */ +/* Temporary variables: t1,t2,t3,t4,t5,t6,t7,t8 */ +/* Correct if x and y belong to interval [2^-8000;2^8000] */ +#define __LIBM_MULL_K80(r,x,y, t32,t1,t2,t3,t4,t5,t6,t7,t8) \ + (r)->ex = (x)->ex + (y)->ex; \ + __LIBM_MULL2_K80((r)->ldhi,(r)->ldlo, \ + (x)->ldhi,(x)->ldlo,(y)->ldhi,(y)->ldlo, \ + t32,t1,t2,t3,t4,t5,t6,t7,t8) + +/* Multiplication: r=x*y */ +/* Variables r,x,y are pointers to struct ker80, */ +/* all other variables are in long double precision */ +/* Here t32 is the constant 2^32+1 */ +/* Temporary variables: t1,t2,t3,t4,t5,t6,t7,t8 */ +/* Correct for any finite x and y */ +#define __LIBM_MULL_NORM_K80(r,x,y, \ + t32,t1,t2,t3,t4,t5,t6,t7,t8) \ + if ( ((x)->fphi.exponent-BIAS_80<-8000) || \ + ((x)->fphi.exponent-BIAS_80>+8000) || \ + ((y)->fphi.exponent-BIAS_80<-8000) || \ + ((y)->fphi.exponent-BIAS_80>+8000) ) \ + { \ + __libm_normalizel_k80(x); \ + __libm_normalizel_k80(y); \ + } \ + __LIBM_MULL_K80(r,x,y, t32,t1,t2,t3,t4,t5,t6,t7,t8) + +/* Division: (xhi+xlo)/(yhi+ylo) */ +/* The result is sum rhi+rlo */ +/* Here t32 is the constant 2^32+1 */ +/* Temporary variables: t1,t2,t3,t4,t5,t6,t7,t8,t9 */ +/* All variables are in long double precision */ +/* Correct if no over/underflow (algorithm by T.J.Dekker) */ +#define __LIBM_DIVL2_K80(rhi,rlo,xhi,xlo,yhi,ylo, \ + t32,t1,t2,t3,t4,t5,t6,t7,t8,t9) \ + t7=(xhi)/(yhi); \ + __LIBM_MULL1_K80(t8,t9,t7,yhi, t32,t1,t2,t3,t4,t5,t6) \ + t1=xhi-t8; t1=t1-t9; t1=t1+xlo; t1=t1-(t7)*(ylo); \ + t1=(t1)/(yhi); \ + rhi=t7+t1; \ + rlo=t7-rhi; rlo=rlo+t1; + +/* Division: r=x/y */ +/* Variables r,x,y are pointers to struct ker80, */ +/* all other variables are in long double precision */ +/* Here t32 is the constant 2^32+1 */ +/* Temporary variables: t1,t2,t3,t4,t5,t6,t7,t8,t9 */ +/* Correct if x and y belong to interval [2^-8000;2^8000] */ +#define __LIBM_DIVL_K80(r,x,y, \ + t32,t1,t2,t3,t4,t5,t6,t7,t8,t9) \ + (r)->ex = (x)->ex - (y)->ex; \ + __LIBM_DIVL2_K80( (r)->ldhi,(r)->ldlo, \ + (x)->ldhi,(x)->ldlo,(y)->ldhi,(y)->ldlo, \ + t32,t1,t2,t3,t4,t5,t6,t7,t8,t9) + +/* Division: r=x/y */ +/* Variables r,x,y are pointers to struct ker80, */ +/* all other variables are in long double precision */ +/* Here t32 is the constant 2^32+1 */ +/* Temporary variables: t1,t2,t3,t4,t5,t6,t7,t8 */ +/* Correct for any finite x and y */ +#define __LIBM_DIVL_NORM_K80(r,x,y, \ + t32,t1,t2,t3,t4,t5,t6,t7,t8,t9) \ + if ( ((x)->fphi.exponent-BIAS_80<-8000) || \ + ((x)->fphi.exponent-BIAS_80>+8000) || \ + ((y)->fphi.exponent-BIAS_80<-8000) || \ + ((y)->fphi.exponent-BIAS_80>+8000) ) \ + { \ + __libm_normalizel_k80(x); \ + __libm_normalizel_k80(y); \ + } \ + __LIBM_DIVL_K80(r,x,y, t32,t1,t2,t3,t4,t5,t6,t7,t8,t9) + +/* Square root: sqrt(xhi+xlo) */ +/* The result is sum rhi+rlo */ +/* Here t32 is the constant 2^32+1 */ +/* half is the constant 0.5 */ +/* Temporary variables: t1,t2,t3,t4,t5,t6,t7,t8,t9 */ +/* All variables are in long double precision */ +/* Correct for positive xhi+xlo (algorithm by T.J.Dekker) */ +#define __LIBM_SQRTL2_NORM_K80(rhi,rlo,xhi,xlo, \ + t32,half,t1,t2,t3,t4,t5,t6,t7,t8,t9) \ + t7=sqrtl(xhi); \ + __LIBM_MULL1_K80(t8,t9,t7,t7, t32,t1,t2,t3,t4,t5,t6) \ + t1=xhi-t8; t1=t1-t9; t1=t1+xlo; t1=(t1)*(half); \ + t1=(t1)/(t7); \ + rhi=t7+t1; \ + rlo=t7-rhi; rlo=rlo+t1; + +/* Square root: r=sqrt(x) */ +/* Variables r,x,y are pointers to struct ker80, */ +/* all other variables are in long double precision */ +/* Here t32 is the constant 2^32+1 */ +/* half is the constant 0.5 */ +/* Temporary variables: t1,t2,t3,t4,t5,t6,t7,t8,t9 */ +/* Correct if x belongs to interval [2^-16000;2^16000] */ +#define __LIBM_SQRTL_K80(r,x, \ + t32,half,t1,t2,t3,t4,t5,t6,t7,t8,t9) \ + if ( ((x)->ex & 1) == 1 ) { \ + (x)->ex = (x)->ex + 1; \ + (x)->ldhi *= half; \ + (x)->ldlo *= half; \ + } \ + (r)->ex = (x)->ex >> 1; \ + __LIBM_SQRTL2_NORM_K80( (r)->ldhi,(r)->ldlo, \ + (x)->ldhi,(x)->ldlo, \ + t32,half,t1,t2,t3,t4,t5,t6,t7,t8,t9) + +/* Square root: r=sqrt(x) */ +/* Variables r,x,y are pointers to struct ker80, */ +/* all other variables are in long double precision */ +/* Here t32 is the constant 2^32+1 */ +/* half is the constant 0.5 */ +/* Temporary variables: t1,t2,t3,t4,t5,t6,t7,t8,t9 */ +/* Correct for any positive x */ +#define __LIBM_SQRTL_NORM_K80(r,x, \ + t32,half,t1,t2,t3,t4,t5,t6,t7,t8,t9) \ + if ( ((x)->fphi.exponent-BIAS_80<-16000) || \ + ((x)->fphi.exponent-BIAS_80>+16000) ) \ + { \ + __libm_normalizel_k80(x); \ + } \ + __LIBM_SQRTL_K80(r,x, t32,half,t1,t2,t3,t4,t5,t6,t7,t8,t9) + + +#ifdef __INTEL_COMPILER +#define ALIGN(n) __declspec(align(n)) +#else /* __INTEL_COMPILER */ +#define ALIGN(n) +#endif /* __INTEL_COMPILER */ + +/* macros to form a long double value in hex representation (unsigned short type) */ + +#if (defined(__unix__) && defined(__i386__)) +# define LDOUBLE_ALIGN 12 /* IA32 Linux: 12-byte alignment */ +#else /*__linux__ & IA32*/ +# define LDOUBLE_ALIGN 16 /* EFI2/IA32 Win or IPF Win/Linux: 16-byte alignment */ +#endif /*__linux__ & IA32*/ + +#if (LDOUBLE_ALIGN == 16) +#define _XPD_ ,0x0000,0x0000,0x0000 +#else /*12*/ +#define _XPD_ ,0x0000 +#endif + +#define LDOUBLE_HEX(w4,w3,w2,w1,w0) 0x##w0,0x##w1,0x##w2,0x##w3,0x##w4 _XPD_ /*LITTLE_ENDIAN*/ + +/* macros to sign-expand low 'num' bits of 'val' to native integer */ + +#if defined(SIZE_INT_32) +# define SIGN_EXPAND(val,num) ((int)(val) << (32-(num))) >> (32-(num)) /* sign expand of 'num' LSBs */ +#elif defined(SIZE_INT_64) +# define SIGN_EXPAND(val,num) ((int)(val) << (64-(num))) >> (64-(num)) /* sign expand of 'num' LSBs */ +#endif + +/* macros to form pointers to FP number on-the-fly */ + +#define FP32(f) ((struct fp32 *)&f) +#define FP64(d) ((struct fp64 *)&d) +#define FP80(ld) ((struct fp80 *)&ld) + +/* macros to extract signed low and high doubleword of long double */ + +#if defined(SIZE_INT_32) +# define HI_DWORD_80(ld) ((((FP80(ld)->sign << 15) | FP80(ld)->exponent) << 16) | \ + ((FP80(ld)->hi_significand >> 16) & 0xFFFF)) +# define LO_DWORD_80(ld) SIGN_EXPAND(FP80(ld)->lo_significand, 32) +#elif defined(SIZE_INT_64) +# define HI_DWORD_80(ld) ((((FP80(ld)->sign << 15) | FP80(ld)->exponent) << 16) | \ + ((FP80(ld)->significand >> 48) & 0xFFFF)) +# define LO_DWORD_80(ld) SIGN_EXPAND(FP80(ld)->significand, 32) +#endif + +/* macros to extract hi bits of significand. + * note that explicit high bit do not count (returns as is) + */ + +#if defined(SIZE_INT_32) +# define HI_SIGNIFICAND_80(X,NBITS) ((X)->hi_significand >> (31 - (NBITS))) +#elif defined(SIZE_INT_64) +# define HI_SIGNIFICAND_80(X,NBITS) ((X)->significand >> (63 - (NBITS))) +#endif + +/* macros to check, whether a significand bits are all zero, or some of them are non-zero. + * note that SIGNIFICAND_ZERO_80 tests high bit also, but SIGNIFICAND_NONZERO_80 does not + */ + +#define SIGNIFICAND_ZERO_32(X) ((X)->significand == 0) +#define SIGNIFICAND_NONZERO_32(X) ((X)->significand != 0) + +#if defined(SIZE_INT_32) +# define SIGNIFICAND_ZERO_64(X) (((X)->hi_significand == 0) && ((X)->lo_significand == 0)) +# define SIGNIFICAND_NONZERO_64(X) (((X)->hi_significand != 0) || ((X)->lo_significand != 0)) +#elif defined(SIZE_INT_64) +# define SIGNIFICAND_ZERO_64(X) ((X)->significand == 0) +# define SIGNIFICAND_NONZERO_64(X) ((X)->significand != 0) +#endif + +#if defined(SIZE_INT_32) +# define SIGNIFICAND_ZERO_80(X) (((X)->hi_significand == 0x00000000) && ((X)->lo_significand == 0)) +# define SIGNIFICAND_NONZERO_80(X) (((X)->hi_significand != 0x80000000) || ((X)->lo_significand != 0)) +#elif defined(SIZE_INT_64) +# define SIGNIFICAND_ZERO_80(X) ((X)->significand == 0x0000000000000000) +# define SIGNIFICAND_NONZERO_80(X) ((X)->significand != 0x8000000000000000) +#endif + +/* macros to compare long double with constant value, represented as hex */ + +#define SIGNIFICAND_EQ_HEX_32(X,BITS) ((X)->significand == 0x ## BITS) +#define SIGNIFICAND_GT_HEX_32(X,BITS) ((X)->significand > 0x ## BITS) +#define SIGNIFICAND_GE_HEX_32(X,BITS) ((X)->significand >= 0x ## BITS) +#define SIGNIFICAND_LT_HEX_32(X,BITS) ((X)->significand < 0x ## BITS) +#define SIGNIFICAND_LE_HEX_32(X,BITS) ((X)->significand <= 0x ## BITS) + +#if defined(SIZE_INT_32) +# define SIGNIFICAND_EQ_HEX_64(X,HI,LO) \ + (((X)->hi_significand == 0x ## HI) && ((X)->lo_significand == 0x ## LO)) +# define SIGNIFICAND_GT_HEX_64(X,HI,LO) (((X)->hi_significand > 0x ## HI) || \ + (((X)->hi_significand == 0x ## HI) && ((X)->lo_significand > 0x ## LO))) +# define SIGNIFICAND_GE_HEX_64(X,HI,LO) (((X)->hi_significand > 0x ## HI) || \ + (((X)->hi_significand == 0x ## HI) && ((X)->lo_significand >= 0x ## LO))) +# define SIGNIFICAND_LT_HEX_64(X,HI,LO) (((X)->hi_significand < 0x ## HI) || \ + (((X)->hi_significand == 0x ## HI) && ((X)->lo_significand < 0x ## LO))) +# define SIGNIFICAND_LE_HEX_64(X,HI,LO) (((X)->hi_significand < 0x ## HI) || \ + (((X)->hi_significand == 0x ## HI) && ((X)->lo_significand <= 0x ## LO))) +#elif defined(SIZE_INT_64) +# define SIGNIFICAND_EQ_HEX_64(X,HI,LO) ((X)->significand == 0x ## HI ## LO) +# define SIGNIFICAND_GT_HEX_64(X,HI,LO) ((X)->significand > 0x ## HI ## LO) +# define SIGNIFICAND_GE_HEX_64(X,HI,LO) ((X)->significand >= 0x ## HI ## LO) +# define SIGNIFICAND_LT_HEX_64(X,HI,LO) ((X)->significand < 0x ## HI ## LO) +# define SIGNIFICAND_LE_HEX_64(X,HI,LO) ((X)->significand <= 0x ## HI ## LO) +#endif + +#if defined(SIZE_INT_32) +# define SIGNIFICAND_EQ_HEX_80(X,HI,LO) \ + (((X)->hi_significand == 0x ## HI) && ((X)->lo_significand == 0x ## LO)) +# define SIGNIFICAND_GT_HEX_80(X,HI,LO) (((X)->hi_significand > 0x ## HI) || \ + (((X)->hi_significand == 0x ## HI) && ((X)->lo_significand > 0x ## LO))) +# define SIGNIFICAND_GE_HEX_80(X,HI,LO) (((X)->hi_significand > 0x ## HI) || \ + (((X)->hi_significand == 0x ## HI) && ((X)->lo_significand >= 0x ## LO))) +# define SIGNIFICAND_LT_HEX_80(X,HI,LO) (((X)->hi_significand < 0x ## HI) || \ + (((X)->hi_significand == 0x ## HI) && ((X)->lo_significand < 0x ## LO))) +# define SIGNIFICAND_LE_HEX_80(X,HI,LO) (((X)->hi_significand < 0x ## HI) || \ + (((X)->hi_significand == 0x ## HI) && ((X)->lo_significand <= 0x ## LO))) +#elif defined(SIZE_INT_64) +# define SIGNIFICAND_EQ_HEX_80(X,HI,LO) ((X)->significand == 0x ## HI ## LO) +# define SIGNIFICAND_GT_HEX_80(X,HI,LO) ((X)->significand > 0x ## HI ## LO) +# define SIGNIFICAND_GE_HEX_80(X,HI,LO) ((X)->significand >= 0x ## HI ## LO) +# define SIGNIFICAND_LT_HEX_80(X,HI,LO) ((X)->significand < 0x ## HI ## LO) +# define SIGNIFICAND_LE_HEX_80(X,HI,LO) ((X)->significand <= 0x ## HI ## LO) +#endif + +#define VALUE_EQ_HEX_32(X,EXP,BITS) \ + (((X)->exponent == (EXP)) && (SIGNIFICAND_EQ_HEX_32(X, BITS))) +#define VALUE_GT_HEX_32(X,EXP,BITS) (((X)->exponent > (EXP)) || \ + (((X)->exponent == (EXP)) && (SIGNIFICAND_GT_HEX_32(X, BITS)))) +#define VALUE_GE_HEX_32(X,EXP,BITS) (((X)->exponent > (EXP)) || \ + (((X)->exponent == (EXP)) && (SIGNIFICAND_GE_HEX_32(X, BITS)))) +#define VALUE_LT_HEX_32(X,EXP,BITS) (((X)->exponent < (EXP)) || \ + (((X)->exponent == (EXP)) && (SIGNIFICAND_LT_HEX_32(X, BITS)))) +#define VALUE_LE_HEX_32(X,EXP,BITS) (((X)->exponent < (EXP)) || \ + (((X)->exponent == (EXP)) && (SIGNIFICAND_LE_HEX_32(X, BITS)))) + +#define VALUE_EQ_HEX_64(X,EXP,HI,LO) \ + (((X)->exponent == (EXP)) && (SIGNIFICAND_EQ_HEX_64(X, HI, LO))) +#define VALUE_GT_HEX_64(X,EXP,HI,LO) (((X)->exponent > (EXP)) || \ + (((X)->exponent == (EXP)) && (SIGNIFICAND_GT_HEX_64(X, HI, LO)))) +#define VALUE_GE_HEX_64(X,EXP,HI,LO) (((X)->exponent > (EXP)) || \ + (((X)->exponent == (EXP)) && (SIGNIFICAND_GE_HEX_64(X, HI, LO)))) +#define VALUE_LT_HEX_64(X,EXP,HI,LO) (((X)->exponent < (EXP)) || \ + (((X)->exponent == (EXP)) && (SIGNIFICAND_LT_HEX_64(X, HI, LO)))) +#define VALUE_LE_HEX_64(X,EXP,HI,LO) (((X)->exponent < (EXP)) || \ + (((X)->exponent == (EXP)) && (SIGNIFICAND_LE_HEX_64(X, HI, LO)))) + +#define VALUE_EQ_HEX_80(X,EXP,HI,LO) \ + (((X)->exponent == (EXP)) && (SIGNIFICAND_EQ_HEX_80(X, HI, LO))) +#define VALUE_GT_HEX_80(X,EXP,HI,LO) (((X)->exponent > (EXP)) || \ + (((X)->exponent == (EXP)) && (SIGNIFICAND_GT_HEX_80(X, HI, LO)))) +#define VALUE_GE_HEX_80(X,EXP,HI,LO) (((X)->exponent > (EXP)) || \ + (((X)->exponent == (EXP)) && (SIGNIFICAND_GE_HEX_80(X, HI, LO)))) +#define VALUE_LT_HEX_80(X,EXP,HI,LO) (((X)->exponent < (EXP)) || \ + (((X)->exponent == (EXP)) && (SIGNIFICAND_LT_HEX_80(X, HI, LO)))) +#define VALUE_LE_HEX_80(X,EXP,HI,LO) (((X)->exponent < (EXP)) || \ + (((X)->exponent == (EXP)) && (SIGNIFICAND_LE_HEX_80(X, HI, LO)))) + +/* macros to compare two long doubles */ + +#define SIGNIFICAND_EQ_32(X,Y) ((X)->significand == (Y)->significand) +#define SIGNIFICAND_GT_32(X,Y) ((X)->significand > (Y)->significand) +#define SIGNIFICAND_GE_32(X,Y) ((X)->significand >= (Y)->significand) +#define SIGNIFICAND_LT_32(X,Y) ((X)->significand < (Y)->significand) +#define SIGNIFICAND_LE_32(X,Y) ((X)->significand <= (Y)->significand) + +#if defined(SIZE_INT_32) +# define SIGNIFICAND_EQ_64(X,Y) \ + (((X)->hi_significand == (Y)->hi_significand) && ((X)->lo_significand == (Y)->lo_significand)) +# define SIGNIFICAND_GT_64(X,Y) (((X)->hi_significand > (Y)->hi_significand) || \ + (((X)->hi_significand == (Y)->hi_significand) && ((X)->lo_significand > (Y)->lo_significand))) +# define SIGNIFICAND_GE_64(X,Y) (((X)->hi_significand > (Y)->hi_significand) || \ + (((X)->hi_significand == (Y)->hi_significand) && ((X)->lo_significand >= (Y)->lo_significand))) +# define SIGNIFICAND_LT_64(X,Y) (((X)->hi_significand < (Y)->hi_significand) || \ + (((X)->hi_significand == (Y)->hi_significand) && ((X)->lo_significand < (Y)->lo_significand))) +# define SIGNIFICAND_LE_64(X,Y) (((X)->hi_significand < (Y)->hi_significand) || \ + (((X)->hi_significand == (Y)->hi_significand) && ((X)->lo_significand <= (Y)->lo_significand))) +#elif defined(SIZE_INT_64) +# define SIGNIFICAND_EQ_64(X,Y) ((X)->significand == (Y)->significand) +# define SIGNIFICAND_GT_64(X,Y) ((X)->significand > (Y)->significand) +# define SIGNIFICAND_GE_64(X,Y) ((X)->significand >= (Y)->significand) +# define SIGNIFICAND_LT_64(X,Y) ((X)->significand < (Y)->significand) +# define SIGNIFICAND_LE_64(X,Y) ((X)->significand <= (Y)->significand) +#endif + +#if defined(SIZE_INT_32) +# define SIGNIFICAND_EQ_80(X,Y) \ + (((X)->hi_significand == (Y)->hi_significand) && ((X)->lo_significand == (Y)->lo_significand)) +# define SIGNIFICAND_GT_80(X,Y) (((X)->hi_significand > (Y)->hi_significand) || \ + (((X)->hi_significand == (Y)->hi_significand) && ((X)->lo_significand > (Y)->lo_significand))) +# define SIGNIFICAND_GE_80(X,Y) (((X)->hi_significand > (Y)->hi_significand) || \ + (((X)->hi_significand == (Y)->hi_significand) && ((X)->lo_significand >= (Y)->lo_significand))) +# define SIGNIFICAND_LT_80(X,Y) (((X)->hi_significand < (Y)->hi_significand) || \ + (((X)->hi_significand == (Y)->hi_significand) && ((X)->lo_significand < (Y)->lo_significand))) +# define SIGNIFICAND_LE_80(X,Y) (((X)->hi_significand < (Y)->hi_significand) || \ + (((X)->hi_significand == (Y)->hi_significand) && ((X)->lo_significand <= (Y)->lo_significand))) +#elif defined(SIZE_INT_64) +# define SIGNIFICAND_EQ_80(X,Y) ((X)->significand == (Y)->significand) +# define SIGNIFICAND_GT_80(X,Y) ((X)->significand > (Y)->significand) +# define SIGNIFICAND_GE_80(X,Y) ((X)->significand >= (Y)->significand) +# define SIGNIFICAND_LT_80(X,Y) ((X)->significand < (Y)->significand) +# define SIGNIFICAND_LE_80(X,Y) ((X)->significand <= (Y)->significand) +#endif + +#define VALUE_EQ_32(X,Y) \ + (((X)->exponent == (Y)->exponent) && (SIGNIFICAND_EQ_32(X, Y))) +#define VALUE_GT_32(X,Y) (((X)->exponent > (Y)->exponent) || \ + (((X)->exponent == (Y)->exponent) && (SIGNIFICAND_GT_32(X, Y)))) +#define VALUE_GE_32(X,Y) (((X)->exponent > (Y)->exponent) || \ + (((X)->exponent == (Y)->exponent) && (SIGNIFICAND_GE_32(X, Y)))) +#define VALUE_LT_32(X,Y) (((X)->exponent < (Y)->exponent) || \ + (((X)->exponent == (Y)->exponent) && (SIGNIFICAND_LT_32(X, Y)))) +#define VALUE_LE_32(X,Y) (((X)->exponent < (Y)->exponent) || \ + (((X)->exponent == (Y)->exponent) && (SIGNIFICAND_LE_32(X, Y)))) + +#define VALUE_EQ_64(X,Y) \ + (((X)->exponent == (Y)->exponent) && (SIGNIFICAND_EQ_64(X, Y))) +#define VALUE_GT_64(X,Y) (((X)->exponent > (Y)->exponent) || \ + (((X)->exponent == (Y)->exponent) && (SIGNIFICAND_GT_64(X, Y)))) +#define VALUE_GE_64(X,Y) (((X)->exponent > (Y)->exponent) || \ + (((X)->exponent == (Y)->exponent) && (SIGNIFICAND_GE_64(X, Y)))) +#define VALUE_LT_64(X,Y) (((X)->exponent < (Y)->exponent) || \ + (((X)->exponent == (Y)->exponent) && (SIGNIFICAND_LT_64(X, Y)))) +#define VALUE_LE_64(X,Y) (((X)->exponent < (Y)->exponent) || \ + (((X)->exponent == (Y)->exponent) && (SIGNIFICAND_LE_64(X, Y)))) + +#define VALUE_EQ_80(X,Y) \ + (((X)->exponent == (Y)->exponent) && (SIGNIFICAND_EQ_80(X, Y))) +#define VALUE_GT_80(X,Y) (((X)->exponent > (Y)->exponent) || \ + (((X)->exponent == (Y)->exponent) && (SIGNIFICAND_GT_80(X, Y)))) +#define VALUE_GE_80(X,Y) (((X)->exponent > (Y)->exponent) || \ + (((X)->exponent == (Y)->exponent) && (SIGNIFICAND_GE_80(X, Y)))) +#define VALUE_LT_80(X,Y) (((X)->exponent < (Y)->exponent) || \ + (((X)->exponent == (Y)->exponent) && (SIGNIFICAND_LT_80(X, Y)))) +#define VALUE_LE_80(X,Y) (((X)->exponent < (Y)->exponent) || \ + (((X)->exponent == (Y)->exponent) && (SIGNIFICAND_LE_80(X, Y)))) + +/* add/subtract 1 ulp macros */ + +#if defined(SIZE_INT_32) +# define ADD_ULP_80(X) \ + if ((++(X)->lo_significand == 0) && \ + (++(X)->hi_significand == (((X)->exponent == 0) ? 0x80000000 : 0))) \ + { \ + (X)->hi_significand |= 0x80000000; \ + ++(X)->exponent; \ + } +# define SUB_ULP_80(X) \ + if (--(X)->lo_significand == 0xFFFFFFFF) { \ + --(X)->hi_significand; \ + if (((X)->exponent != 0) && \ + ((X)->hi_significand == 0x7FFFFFFF) && \ + (--(X)->exponent != 0)) \ + { \ + (X)->hi_significand |= 0x80000000; \ + } \ + } +#elif defined(SIZE_INT_64) +# define ADD_ULP_80(X) \ + if (++(X)->significand == (((X)->exponent == 0) ? 0x8000000000000000 : 0))) { \ + (X)->significand |= 0x8000000000000000; \ + ++(X)->exponent; \ + } +# define SUB_ULP_80(X) \ + { \ + --(X)->significand; \ + if (((X)->exponent != 0) && \ + ((X)->significand == 0x7FFFFFFFFFFFFFFF) && \ + (--(X)->exponent != 0)) \ + { \ + (X)->significand |= 0x8000000000000000; \ + } \ + } +#endif + + +/* error codes */ + +#define DOMAIN 1 /* argument domain error */ +#define SING 2 /* argument singularity */ +#define OVERFLOW 3 /* overflow range error */ +#define UNDERFLOW 4 /* underflow range error */ +#define TLOSS 5 /* total loss of precision */ +#define PLOSS 6 /* partial loss of precision */ + +/* */ + +#define VOLATILE_32 /*volatile*/ +#define VOLATILE_64 /*volatile*/ +#define VOLATILE_80 /*volatile*/ + +#define QUAD_TYPE _Quad + +#endif /*__LIBM_SUPPORT_H_INCLUDED__*/ diff --git a/sysdeps/ia64/fpu/libm_tan.S b/sysdeps/ia64/fpu/libm_tan.S new file mode 100644 index 0000000000..179ea9c323 --- /dev/null +++ b/sysdeps/ia64/fpu/libm_tan.S @@ -0,0 +1,3332 @@ +.file "libm_tan.s" + +// Copyright (C) 2000, 2001, Intel Corporation +// All rights reserved. +// +// Contributed 2/2/2000 by John Harrison, Ted Kubaska, Bob Norin, Shane Story, +// and Ping Tak Peter Tang of the Computational Software Lab, Intel Corporation. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://developer.intel.com/opensource. +// +// ********************************************************************* +// +// History: +// 02/02/00 Initial Version +// 4/04/00 Unwind support added +// 12/28/00 Fixed false invalid flags +// +// ********************************************************************* +// +// Function: tan(x) = tangent(x), for double precision x values +// +// ********************************************************************* +// +// Accuracy: Very accurate for double-precision values +// +// ********************************************************************* +// +// Resources Used: +// +// Floating-Point Registers: f8 (Input and Return Value) +// f9-f15 +// f32-f112 +// +// General Purpose Registers: +// r32-r48 +// r49-r50 (Used to pass arguments to pi_by_2 reduce routine) +// +// Predicate Registers: p6-p15 +// +// ********************************************************************* +// +// IEEE Special Conditions: +// +// Denormal fault raised on denormal inputs +// Overflow exceptions do not occur +// Underflow exceptions raised when appropriate for tan +// (No specialized error handling for this routine) +// Inexact raised when appropriate by algorithm +// +// tan(SNaN) = QNaN +// tan(QNaN) = QNaN +// tan(inf) = QNaN +// tan(+/-0) = +/-0 +// +// ********************************************************************* +// +// Mathematical Description +// +// We consider the computation of FPTAN of Arg. Now, given +// +// Arg = N pi/2 + alpha, |alpha| <= pi/4, +// +// basic mathematical relationship shows that +// +// tan( Arg ) = tan( alpha ) if N is even; +// = -cot( alpha ) otherwise. +// +// The value of alpha is obtained by argument reduction and +// represented by two working precision numbers r and c where +// +// alpha = r + c accurately. +// +// The reduction method is described in a previous write up. +// The argument reduction scheme identifies 4 cases. For Cases 2 +// and 4, because |alpha| is small, tan(r+c) and -cot(r+c) can be +// computed very easily by 2 or 3 terms of the Taylor series +// expansion as follows: +// +// Case 2: +// ------- +// +// tan(r + c) = r + c + r^3/3 ...accurately +// -cot(r + c) = -1/(r+c) + r/3 ...accurately +// +// Case 4: +// ------- +// +// tan(r + c) = r + c + r^3/3 + 2r^5/15 ...accurately +// -cot(r + c) = -1/(r+c) + r/3 + r^3/45 ...accurately +// +// +// The only cases left are Cases 1 and 3 of the argument reduction +// procedure. These two cases will be merged since after the +// argument is reduced in either cases, we have the reduced argument +// represented as r + c and that the magnitude |r + c| is not small +// enough to allow the usage of a very short approximation. +// +// The greatest challenge of this task is that the second terms of +// the Taylor series for tan(r) and -cot(r) +// +// r + r^3/3 + 2 r^5/15 + ... +// +// and +// +// -1/r + r/3 + r^3/45 + ... +// +// are not very small when |r| is close to pi/4 and the rounding +// errors will be a concern if simple polynomial accumulation is +// used. When |r| < 2^(-2), however, the second terms will be small +// enough (5 bits or so of right shift) that a normal Horner +// recurrence suffices. Hence there are two cases that we consider +// in the accurate computation of tan(r) and cot(r), |r| <= pi/4. +// +// Case small_r: |r| < 2^(-2) +// -------------------------- +// +// Since Arg = N pi/4 + r + c accurately, we have +// +// tan(Arg) = tan(r+c) for N even, +// = -cot(r+c) otherwise. +// +// Here for this case, both tan(r) and -cot(r) can be approximated +// by simple polynomials: +// +// tan(r) = r + P1_1 r^3 + P1_2 r^5 + ... + P1_9 r^19 +// -cot(r) = -1/r + Q1_1 r + Q1_2 r^3 + ... + Q1_7 r^13 +// +// accurately. Since |r| is relatively small, tan(r+c) and +// -cot(r+c) can be accurately approximated by replacing r with +// r+c only in the first two terms of the corresponding polynomials. +// +// Note that P1_1 (and Q1_1 for that matter) approximates 1/3 to +// almost 64 sig. bits, thus +// +// P1_1 (r+c)^3 = P1_1 r^3 + c * r^2 accurately. +// +// Hence, +// +// tan(r+c) = r + P1_1 r^3 + P1_2 r^5 + ... + P1_9 r^19 +// + c*(1 + r^2) +// +// -cot(r+c) = -1/(r+c) + Q1_1 r + Q1_2 r^3 + ... + Q1_7 r^13 +// + Q1_1*c +// +// +// Case normal_r: 2^(-2) <= |r| <= pi/4 +// ------------------------------------ +// +// This case is more likely than the previous one if one considers +// r to be uniformly distributed in [-pi/4 pi/4]. +// +// The required calculation is either +// +// tan(r + c) = tan(r) + correction, or +// -cot(r + c) = -cot(r) + correction. +// +// Specifically, +// +// tan(r + c) = tan(r) + c tan'(r) + O(c^2) +// = tan(r) + c sec^2(r) + O(c^2) +// = tan(r) + c SEC_sq ...accurately +// as long as SEC_sq approximates sec^2(r) +// to, say, 5 bits or so. +// +// Similarly, +// +// -cot(r + c) = -cot(r) - c cot'(r) + O(c^2) +// = -cot(r) + c csc^2(r) + O(c^2) +// = -cot(r) + c CSC_sq ...accurately +// as long as CSC_sq approximates csc^2(r) +// to, say, 5 bits or so. +// +// We therefore concentrate on accurately calculating tan(r) and +// cot(r) for a working-precision number r, |r| <= pi/4 to within +// 0.1% or so. +// +// We will employ a table-driven approach. Let +// +// r = sgn_r * 2^k * 1.b_1 b_2 ... b_5 ... b_63 +// = sgn_r * ( B + x ) +// +// where +// +// B = 2^k * 1.b_1 b_2 ... b_5 1 +// x = |r| - B +// +// Now, +// tan(B) + tan(x) +// tan( B + x ) = ------------------------ +// 1 - tan(B)*tan(x) +// +// / \ +// | tan(B) + tan(x) | + +// = tan(B) + | ------------------------ - tan(B) | +// | 1 - tan(B)*tan(x) | +// \ / +// +// sec^2(B) * tan(x) +// = tan(B) + ------------------------ +// 1 - tan(B)*tan(x) +// +// (1/[sin(B)*cos(B)]) * tan(x) +// = tan(B) + -------------------------------- +// cot(B) - tan(x) +// +// +// Clearly, the values of tan(B), cot(B) and 1/(sin(B)*cos(B)) are +// calculated beforehand and stored in a table. Since +// +// |x| <= 2^k * 2^(-6) <= 2^(-7) (because k = -1, -2) +// +// a very short polynomial will be sufficient to approximate tan(x) +// accurately. The details involved in computing the last expression +// will be given in the next section on algorithm description. +// +// +// Now, we turn to the case where cot( B + x ) is needed. +// +// +// 1 - tan(B)*tan(x) +// cot( B + x ) = ------------------------ +// tan(B) + tan(x) +// +// / \ +// | 1 - tan(B)*tan(x) | + +// = cot(B) + | ----------------------- - cot(B) | +// | tan(B) + tan(x) | +// \ / +// +// [tan(B) + cot(B)] * tan(x) +// = cot(B) - ---------------------------- +// tan(B) + tan(x) +// +// (1/[sin(B)*cos(B)]) * tan(x) +// = cot(B) - -------------------------------- +// tan(B) + tan(x) +// +// +// Note that the values of tan(B), cot(B) and 1/(sin(B)*cos(B)) that +// are needed are the same set of values needed in the previous +// case. +// +// Finally, we can put all the ingredients together as follows: +// +// Arg = N * pi/2 + r + c ...accurately +// +// tan(Arg) = tan(r) + correction if N is even; +// = -cot(r) + correction otherwise. +// +// For Cases 2 and 4, +// +// Case 2: +// tan(Arg) = tan(r + c) = r + c + r^3/3 N even +// = -cot(r + c) = -1/(r+c) + r/3 N odd +// Case 4: +// tan(Arg) = tan(r + c) = r + c + r^3/3 + 2r^5/15 N even +// = -cot(r + c) = -1/(r+c) + r/3 + r^3/45 N odd +// +// +// For Cases 1 and 3, +// +// Case small_r: |r| < 2^(-2) +// +// tan(Arg) = r + P1_1 r^3 + P1_2 r^5 + ... + P1_9 r^19 +// + c*(1 + r^2) N even +// +// = -1/(r+c) + Q1_1 r + Q1_2 r^3 + ... + Q1_7 r^13 +// + Q1_1*c N odd +// +// Case normal_r: 2^(-2) <= |r| <= pi/4 +// +// tan(Arg) = tan(r) + c * sec^2(r) N even +// = -cot(r) + c * csc^2(r) otherwise +// +// For N even, +// +// tan(Arg) = tan(r) + c*sec^2(r) +// = tan( sgn_r * (B+x) ) + c * sec^2(|r|) +// = sgn_r * ( tan(B+x) + sgn_r*c*sec^2(|r|) ) +// = sgn_r * ( tan(B+x) + sgn_r*c*sec^2(B) ) +// +// since B approximates |r| to 2^(-6) in relative accuracy. +// +// / (1/[sin(B)*cos(B)]) * tan(x) +// tan(Arg) = sgn_r * | tan(B) + -------------------------------- +// \ cot(B) - tan(x) +// \ +// + CORR | + +// / +// where +// +// CORR = sgn_r*c*tan(B)*SC_inv(B); SC_inv(B) = 1/(sin(B)*cos(B)). +// +// For N odd, +// +// tan(Arg) = -cot(r) + c*csc^2(r) +// = -cot( sgn_r * (B+x) ) + c * csc^2(|r|) +// = sgn_r * ( -cot(B+x) + sgn_r*c*csc^2(|r|) ) +// = sgn_r * ( -cot(B+x) + sgn_r*c*csc^2(B) ) +// +// since B approximates |r| to 2^(-6) in relative accuracy. +// +// / (1/[sin(B)*cos(B)]) * tan(x) +// tan(Arg) = sgn_r * | -cot(B) + -------------------------------- +// \ tan(B) + tan(x) +// \ +// + CORR | + +// / +// where +// +// CORR = sgn_r*c*cot(B)*SC_inv(B); SC_inv(B) = 1/(sin(B)*cos(B)). +// +// +// The actual algorithm prescribes how all the mathematical formulas +// are calculated. +// +// +// 2. Algorithmic Description +// ========================== +// +// 2.1 Computation for Cases 2 and 4. +// ---------------------------------- +// +// For Case 2, we use two-term polynomials. +// +// For N even, +// +// rsq := r * r +// Result := c + r * rsq * P1_1 +// Result := r + Result ...in user-defined rounding +// +// For N odd, +// S_hi := -frcpa(r) ...8 bits +// S_hi := S_hi + S_hi*(1 + S_hi*r) ...16 bits +// S_hi := S_hi + S_hi*(1 + S_hi*r) ...32 bits +// S_hi := S_hi + S_hi*(1 + S_hi*r) ...64 bits +// S_lo := S_hi*( (1 + S_hi*r) + S_hi*c ) +// ...S_hi + S_lo is -1/(r+c) to extra precision +// S_lo := S_lo + Q1_1*r +// +// Result := S_hi + S_lo ...in user-defined rounding +// +// For Case 4, we use three-term polynomials +// +// For N even, +// +// rsq := r * r +// Result := c + r * rsq * (P1_1 + rsq * P1_2) +// Result := r + Result ...in user-defined rounding +// +// For N odd, +// S_hi := -frcpa(r) ...8 bits +// S_hi := S_hi + S_hi*(1 + S_hi*r) ...16 bits +// S_hi := S_hi + S_hi*(1 + S_hi*r) ...32 bits +// S_hi := S_hi + S_hi*(1 + S_hi*r) ...64 bits +// S_lo := S_hi*( (1 + S_hi*r) + S_hi*c ) +// ...S_hi + S_lo is -1/(r+c) to extra precision +// rsq := r * r +// P := Q1_1 + rsq*Q1_2 +// S_lo := S_lo + r*P +// +// Result := S_hi + S_lo ...in user-defined rounding +// +// +// Note that the coefficients P1_1, P1_2, Q1_1, and Q1_2 are +// the same as those used in the small_r case of Cases 1 and 3 +// below. +// +// +// 2.2 Computation for Cases 1 and 3. +// ---------------------------------- +// This is further divided into the case of small_r, +// where |r| < 2^(-2), and the case of normal_r, where |r| lies between +// 2^(-2) and pi/4. +// +// Algorithm for the case of small_r +// --------------------------------- +// +// For N even, +// rsq := r * r +// Poly1 := rsq*(P1_1 + rsq*(P1_2 + rsq*P1_3)) +// r_to_the_8 := rsq * rsq +// r_to_the_8 := r_to_the_8 * r_to_the_8 +// Poly2 := P1_4 + rsq*(P1_5 + rsq*(P1_6 + ... rsq*P1_9)) +// CORR := c * ( 1 + rsq ) +// Poly := Poly1 + r_to_the_8*Poly2 +// Result := r*Poly + CORR +// Result := r + Result ...in user-defined rounding +// ...note that Poly1 and r_to_the_8 can be computed in parallel +// ...with Poly2 (Poly1 is intentionally set to be much +// ...shorter than Poly2 so that r_to_the_8 and CORR can be hidden) +// +// For N odd, +// S_hi := -frcpa(r) ...8 bits +// S_hi := S_hi + S_hi*(1 + S_hi*r) ...16 bits +// S_hi := S_hi + S_hi*(1 + S_hi*r) ...32 bits +// S_hi := S_hi + S_hi*(1 + S_hi*r) ...64 bits +// S_lo := S_hi*( (1 + S_hi*r) + S_hi*c ) +// ...S_hi + S_lo is -1/(r+c) to extra precision +// S_lo := S_lo + Q1_1*c +// +// ...S_hi and S_lo are computed in parallel with +// ...the following +// rsq := r*r +// P := Q1_1 + rsq*(Q1_2 + rsq*(Q1_3 + ... + rsq*Q1_7)) +// +// Result := r*P + S_lo +// Result := S_hi + Result ...in user-defined rounding +// +// +// Algorithm for the case of normal_r +// ---------------------------------- +// +// Here, we first consider the computation of tan( r + c ). As +// presented in the previous section, +// +// tan( r + c ) = tan(r) + c * sec^2(r) +// = sgn_r * [ tan(B+x) + CORR ] +// CORR = sgn_r * c * tan(B) * 1/[sin(B)*cos(B)] +// +// because sec^2(r) = sec^(|r|), and B approximate |r| to 6.5 bits. +// +// tan( r + c ) = +// / (1/[sin(B)*cos(B)]) * tan(x) +// sgn_r * | tan(B) + -------------------------------- + +// \ cot(B) - tan(x) +// \ +// CORR | + +// / +// +// The values of tan(B), cot(B) and 1/(sin(B)*cos(B)) are +// calculated beforehand and stored in a table. Specifically, +// the table values are +// +// tan(B) as T_hi + T_lo; +// cot(B) as C_hi + C_lo; +// 1/[sin(B)*cos(B)] as SC_inv +// +// T_hi, C_hi are in double-precision memory format; +// T_lo, C_lo are in single-precision memory format; +// SC_inv is in extended-precision memory format. +// +// The value of tan(x) will be approximated by a short polynomial of +// the form +// +// tan(x) as x + x * P, where +// P = x^2 * (P2_1 + x^2 * (P2_2 + x^2 * P2_3)) +// +// Because |x| <= 2^(-7), cot(B) - x approximates cot(B) - tan(x) +// to a relative accuracy better than 2^(-20). Thus, a good +// initial guess of 1/( cot(B) - tan(x) ) to initiate the iterative +// division is: +// +// 1/(cot(B) - tan(x)) is approximately +// 1/(cot(B) - x) is +// tan(B)/(1 - x*tan(B)) is approximately +// T_hi / ( 1 - T_hi * x ) is approximately +// +// T_hi * [ 1 + (Thi * x) + (T_hi * x)^2 ] +// +// The calculation of tan(r+c) therefore proceed as follows: +// +// Tx := T_hi * x +// xsq := x * x +// +// V_hi := T_hi*(1 + Tx*(1 + Tx)) +// P := xsq * (P1_1 + xsq*(P1_2 + xsq*P1_3)) +// ...V_hi serves as an initial guess of 1/(cot(B) - tan(x)) +// ...good to about 20 bits of accuracy +// +// tanx := x + x*P +// D := C_hi - tanx +// ...D is a double precision denominator: cot(B) - tan(x) +// +// V_hi := V_hi + V_hi*(1 - V_hi*D) +// ....V_hi approximates 1/(cot(B)-tan(x)) to 40 bits +// +// V_lo := V_hi * ( [ (1 - V_hi*C_hi) + V_hi*tanx ] +// - V_hi*C_lo ) ...observe all order +// ...V_hi + V_lo approximates 1/(cot(B) - tan(x)) +// ...to extra accuracy +// +// ... SC_inv(B) * (x + x*P) +// ... tan(B) + ------------------------- + CORR +// ... cot(B) - (x + x*P) +// ... +// ... = tan(B) + SC_inv(B)*(x + x*P)*(V_hi + V_lo) + CORR +// ... +// +// Sx := SC_inv * x +// CORR := sgn_r * c * SC_inv * T_hi +// +// ...put the ingredients together to compute +// ... SC_inv(B) * (x + x*P) +// ... tan(B) + ------------------------- + CORR +// ... cot(B) - (x + x*P) +// ... +// ... = tan(B) + SC_inv(B)*(x + x*P)*(V_hi + V_lo) + CORR +// ... +// ... = T_hi + T_lo + CORR + +// ... Sx * V_hi + Sx * V_lo + Sx * P *(V_hi + V_lo) +// +// CORR := CORR + T_lo +// tail := V_lo + P*(V_hi + V_lo) +// tail := Sx * tail + CORR +// tail := Sx * V_hi + tail +// T_hi := sgn_r * T_hi +// +// ...T_hi + sgn_r*tail now approximate +// ...sgn_r*(tan(B+x) + CORR) accurately +// +// Result := T_hi + sgn_r*tail ...in user-defined +// ...rounding control +// ...It is crucial that independent paths be fully +// ...exploited for performance's sake. +// +// +// Next, we consider the computation of -cot( r + c ). As +// presented in the previous section, +// +// -cot( r + c ) = -cot(r) + c * csc^2(r) +// = sgn_r * [ -cot(B+x) + CORR ] +// CORR = sgn_r * c * cot(B) * 1/[sin(B)*cos(B)] +// +// because csc^2(r) = csc^(|r|), and B approximate |r| to 6.5 bits. +// +// -cot( r + c ) = +// / (1/[sin(B)*cos(B)]) * tan(x) +// sgn_r * | -cot(B) + -------------------------------- + +// \ tan(B) + tan(x) +// \ +// CORR | + +// / +// +// The values of tan(B), cot(B) and 1/(sin(B)*cos(B)) are +// calculated beforehand and stored in a table. Specifically, +// the table values are +// +// tan(B) as T_hi + T_lo; +// cot(B) as C_hi + C_lo; +// 1/[sin(B)*cos(B)] as SC_inv +// +// T_hi, C_hi are in double-precision memory format; +// T_lo, C_lo are in single-precision memory format; +// SC_inv is in extended-precision memory format. +// +// The value of tan(x) will be approximated by a short polynomial of +// the form +// +// tan(x) as x + x * P, where +// P = x^2 * (P2_1 + x^2 * (P2_2 + x^2 * P2_3)) +// +// Because |x| <= 2^(-7), tan(B) + x approximates tan(B) + tan(x) +// to a relative accuracy better than 2^(-18). Thus, a good +// initial guess of 1/( tan(B) + tan(x) ) to initiate the iterative +// division is: +// +// 1/(tan(B) + tan(x)) is approximately +// 1/(tan(B) + x) is +// cot(B)/(1 + x*cot(B)) is approximately +// C_hi / ( 1 + C_hi * x ) is approximately +// +// C_hi * [ 1 - (C_hi * x) + (C_hi * x)^2 ] +// +// The calculation of -cot(r+c) therefore proceed as follows: +// +// Cx := C_hi * x +// xsq := x * x +// +// V_hi := C_hi*(1 - Cx*(1 - Cx)) +// P := xsq * (P1_1 + xsq*(P1_2 + xsq*P1_3)) +// ...V_hi serves as an initial guess of 1/(tan(B) + tan(x)) +// ...good to about 18 bits of accuracy +// +// tanx := x + x*P +// D := T_hi + tanx +// ...D is a double precision denominator: tan(B) + tan(x) +// +// V_hi := V_hi + V_hi*(1 - V_hi*D) +// ....V_hi approximates 1/(tan(B)+tan(x)) to 40 bits +// +// V_lo := V_hi * ( [ (1 - V_hi*T_hi) - V_hi*tanx ] +// - V_hi*T_lo ) ...observe all order +// ...V_hi + V_lo approximates 1/(tan(B) + tan(x)) +// ...to extra accuracy +// +// ... SC_inv(B) * (x + x*P) +// ... -cot(B) + ------------------------- + CORR +// ... tan(B) + (x + x*P) +// ... +// ... =-cot(B) + SC_inv(B)*(x + x*P)*(V_hi + V_lo) + CORR +// ... +// +// Sx := SC_inv * x +// CORR := sgn_r * c * SC_inv * C_hi +// +// ...put the ingredients together to compute +// ... SC_inv(B) * (x + x*P) +// ... -cot(B) + ------------------------- + CORR +// ... tan(B) + (x + x*P) +// ... +// ... =-cot(B) + SC_inv(B)*(x + x*P)*(V_hi + V_lo) + CORR +// ... +// ... =-C_hi - C_lo + CORR + +// ... Sx * V_hi + Sx * V_lo + Sx * P *(V_hi + V_lo) +// +// CORR := CORR - C_lo +// tail := V_lo + P*(V_hi + V_lo) +// tail := Sx * tail + CORR +// tail := Sx * V_hi + tail +// C_hi := -sgn_r * C_hi +// +// ...C_hi + sgn_r*tail now approximates +// ...sgn_r*(-cot(B+x) + CORR) accurately +// +// Result := C_hi + sgn_r*tail in user-defined rounding control +// ...It is crucial that independent paths be fully +// ...exploited for performance's sake. +// +// 3. Implementation Notes +// ======================= +// +// Table entries T_hi, T_lo; C_hi, C_lo; SC_inv +// +// Recall that 2^(-2) <= |r| <= pi/4; +// +// r = sgn_r * 2^k * 1.b_1 b_2 ... b_63 +// +// and +// +// B = 2^k * 1.b_1 b_2 b_3 b_4 b_5 1 +// +// Thus, for k = -2, possible values of B are +// +// B = 2^(-2) * ( 1 + index/32 + 1/64 ), +// index ranges from 0 to 31 +// +// For k = -1, however, since |r| <= pi/4 = 0.78... +// possible values of B are +// +// B = 2^(-1) * ( 1 + index/32 + 1/64 ) +// index ranges from 0 to 19. +// +// + +#include "libm_support.h" + +#ifdef _LIBC +.rodata +#else +.data +#endif + +.align 128 + +TAN_BASE_CONSTANTS: +ASM_TYPE_DIRECTIVE(TAN_BASE_CONSTANTS,@object) +data4 0x4B800000, 0xCB800000, 0x38800000, 0xB8800000 // two**24, -two**24 + // two**-14, -two**-14 +data4 0x4E44152A, 0xA2F9836E, 0x00003FFE, 0x00000000 // two_by_pi +data4 0xCE81B9F1, 0xC84D32B0, 0x00004016, 0x00000000 // P_0 +data4 0x2168C235, 0xC90FDAA2, 0x00003FFF, 0x00000000 // P_1 +data4 0xFC8F8CBB, 0xECE675D1, 0x0000BFBD, 0x00000000 // P_2 +data4 0xACC19C60, 0xB7ED8FBB, 0x0000BF7C, 0x00000000 // P_3 +data4 0x5F000000, 0xDF000000, 0x00000000, 0x00000000 // two_to_63, -two_to_63 +data4 0x6EC6B45A, 0xA397E504, 0x00003FE7, 0x00000000 // Inv_P_0 +data4 0xDBD171A1, 0x8D848E89, 0x0000BFBF, 0x00000000 // d_1 +data4 0x18A66F8E, 0xD5394C36, 0x0000BF7C, 0x00000000 // d_2 +data4 0x2168C234, 0xC90FDAA2, 0x00003FFE, 0x00000000 // PI_BY_4 +data4 0x2168C234, 0xC90FDAA2, 0x0000BFFE, 0x00000000 // MPI_BY_4 +data4 0x3E800000, 0xBE800000, 0x00000000, 0x00000000 // two**-2, -two**-2 +data4 0x2F000000, 0xAF000000, 0x00000000, 0x00000000 // two**-33, -two**-33 +data4 0xAAAAAABD, 0xAAAAAAAA, 0x00003FFD, 0x00000000 // P1_1 +data4 0x88882E6A, 0x88888888, 0x00003FFC, 0x00000000 // P1_2 +data4 0x0F0177B6, 0xDD0DD0DD, 0x00003FFA, 0x00000000 // P1_3 +data4 0x646B8C6D, 0xB327A440, 0x00003FF9, 0x00000000 // P1_4 +data4 0x1D5F7D20, 0x91371B25, 0x00003FF8, 0x00000000 // P1_5 +data4 0x61C67914, 0xEB69A5F1, 0x00003FF6, 0x00000000 // P1_6 +data4 0x019318D2, 0xBEDD37BE, 0x00003FF5, 0x00000000 // P1_7 +data4 0x3C794015, 0x9979B146, 0x00003FF4, 0x00000000 // P1_8 +data4 0x8C6EB58A, 0x8EBD21A3, 0x00003FF3, 0x00000000 // P1_9 +data4 0xAAAAAAB4, 0xAAAAAAAA, 0x00003FFD, 0x00000000 // Q1_1 +data4 0x0B5FC93E, 0xB60B60B6, 0x00003FF9, 0x00000000 // Q1_2 +data4 0x0C9BBFBF, 0x8AB355E0, 0x00003FF6, 0x00000000 // Q1_3 +data4 0xCBEE3D4C, 0xDDEBBC89, 0x00003FF2, 0x00000000 // Q1_4 +data4 0x5F80BBB6, 0xB3548A68, 0x00003FEF, 0x00000000 // Q1_5 +data4 0x4CED5BF1, 0x91362560, 0x00003FEC, 0x00000000 // Q1_6 +data4 0x8EE92A83, 0xF189D95A, 0x00003FE8, 0x00000000 // Q1_7 +data4 0xAAAB362F, 0xAAAAAAAA, 0x00003FFD, 0x00000000 // P2_1 +data4 0xE97A6097, 0x88888886, 0x00003FFC, 0x00000000 // P2_2 +data4 0x25E716A1, 0xDD108EE0, 0x00003FFA, 0x00000000 // P2_3 +// +// Entries T_hi double-precision memory format +// Index = 0,1,...,31 B = 2^(-2)*(1+Index/32+1/64) +// Entries T_lo single-precision memory format +// Index = 0,1,...,31 B = 2^(-2)*(1+Index/32+1/64) +// +data4 0x62400794, 0x3FD09BC3, 0x23A05C32, 0x00000000 +data4 0xDFFBC074, 0x3FD124A9, 0x240078B2, 0x00000000 +data4 0x5BD4920F, 0x3FD1AE23, 0x23826B8E, 0x00000000 +data4 0x15E2701D, 0x3FD23835, 0x22D31154, 0x00000000 +data4 0x63739C2D, 0x3FD2C2E4, 0x2265C9E2, 0x00000000 +data4 0xAFEEA48B, 0x3FD34E36, 0x245C05EB, 0x00000000 +data4 0x7DBB35D1, 0x3FD3DA31, 0x24749F2D, 0x00000000 +data4 0x67321619, 0x3FD466DA, 0x2462CECE, 0x00000000 +data4 0x1F94A4D5, 0x3FD4F437, 0x246D0DF1, 0x00000000 +data4 0x740C3E6D, 0x3FD5824D, 0x240A85B5, 0x00000000 +data4 0x4CB1E73D, 0x3FD61123, 0x23F96E33, 0x00000000 +data4 0xAD9EA64B, 0x3FD6A0BE, 0x247C5393, 0x00000000 +data4 0xB804FD01, 0x3FD73125, 0x241F3B29, 0x00000000 +data4 0xAB53EE83, 0x3FD7C25E, 0x2479989B, 0x00000000 +data4 0xE6640EED, 0x3FD8546F, 0x23B343BC, 0x00000000 +data4 0xE8AF1892, 0x3FD8E75F, 0x241454D1, 0x00000000 +data4 0x53928BDA, 0x3FD97B35, 0x238613D9, 0x00000000 +data4 0xEB9DE4DE, 0x3FDA0FF6, 0x22859FA7, 0x00000000 +data4 0x99ECF92D, 0x3FDAA5AB, 0x237A6D06, 0x00000000 +data4 0x6D8F1796, 0x3FDB3C5A, 0x23952F6C, 0x00000000 +data4 0x9CFB8BE4, 0x3FDBD40A, 0x2280FC95, 0x00000000 +data4 0x87943100, 0x3FDC6CC3, 0x245D2EC0, 0x00000000 +data4 0xB736C500, 0x3FDD068C, 0x23C4AD7D, 0x00000000 +data4 0xE1DDBC31, 0x3FDDA16D, 0x23D076E6, 0x00000000 +data4 0xEB515A93, 0x3FDE3D6E, 0x244809A6, 0x00000000 +data4 0xE6E9E5F1, 0x3FDEDA97, 0x220856C8, 0x00000000 +data4 0x1963CE69, 0x3FDF78F1, 0x244BE993, 0x00000000 +data4 0x7D635BCE, 0x3FE00C41, 0x23D21799, 0x00000000 +data4 0x1C302CD3, 0x3FE05CAB, 0x248A1B1D, 0x00000000 +data4 0xDB6A1FA0, 0x3FE0ADB9, 0x23D53E33, 0x00000000 +data4 0x4A20BA81, 0x3FE0FF72, 0x24DB9ED5, 0x00000000 +data4 0x153FA6F5, 0x3FE151D9, 0x24E9E451, 0x00000000 +// +// Entries T_hi double-precision memory format +// Index = 0,1,...,19 B = 2^(-1)*(1+Index/32+1/64) +// Entries T_lo single-precision memory format +// Index = 0,1,...,19 B = 2^(-1)*(1+Index/32+1/64) +// +data4 0xBA1BE39E, 0x3FE1CEC4, 0x24B60F9E, 0x00000000 +data4 0x5ABD9B2D, 0x3FE277E4, 0x248C2474, 0x00000000 +data4 0x0272B110, 0x3FE32418, 0x247B8311, 0x00000000 +data4 0x890E2DF0, 0x3FE3D38B, 0x24C55751, 0x00000000 +data4 0x46236871, 0x3FE4866D, 0x24E5BC34, 0x00000000 +data4 0x45E044B0, 0x3FE53CEE, 0x24001BA4, 0x00000000 +data4 0x82EC06E4, 0x3FE5F742, 0x24B973DC, 0x00000000 +data4 0x25DF43F9, 0x3FE6B5A1, 0x24895440, 0x00000000 +data4 0xCAFD348C, 0x3FE77844, 0x240021CA, 0x00000000 +data4 0xCEED6B92, 0x3FE83F6B, 0x24C45372, 0x00000000 +data4 0xA34F3665, 0x3FE90B58, 0x240DAD33, 0x00000000 +data4 0x2C1E56B4, 0x3FE9DC52, 0x24F846CE, 0x00000000 +data4 0x27041578, 0x3FEAB2A4, 0x2323FB6E, 0x00000000 +data4 0x9DD8C373, 0x3FEB8E9F, 0x24B3090B, 0x00000000 +data4 0x65C9AA7B, 0x3FEC709B, 0x2449F611, 0x00000000 +data4 0xACCF8435, 0x3FED58F4, 0x23616A7E, 0x00000000 +data4 0x97635082, 0x3FEE480F, 0x24C2FEAE, 0x00000000 +data4 0xF0ACC544, 0x3FEF3E57, 0x242CE964, 0x00000000 +data4 0xF7E06E4B, 0x3FF01E20, 0x2480D3EE, 0x00000000 +data4 0x8A798A69, 0x3FF0A125, 0x24DB8967, 0x00000000 +// +// Entries C_hi double-precision memory format +// Index = 0,1,...,31 B = 2^(-2)*(1+Index/32+1/64) +// Entries C_lo single-precision memory format +// Index = 0,1,...,31 B = 2^(-2)*(1+Index/32+1/64) +// +data4 0xE63EFBD0, 0x400ED3E2, 0x259D94D4, 0x00000000 +data4 0xC515DAB5, 0x400DDDB4, 0x245F0537, 0x00000000 +data4 0xBE19A79F, 0x400CF57A, 0x25D4EA9F, 0x00000000 +data4 0xD15298ED, 0x400C1A06, 0x24AE40A0, 0x00000000 +data4 0x164B2708, 0x400B4A4C, 0x25A5AAB6, 0x00000000 +data4 0x5285B068, 0x400A855A, 0x25524F18, 0x00000000 +data4 0x3FFA549F, 0x4009CA5A, 0x24C999C0, 0x00000000 +data4 0x646AF623, 0x4009188A, 0x254FD801, 0x00000000 +data4 0x6084D0E7, 0x40086F3C, 0x2560F5FD, 0x00000000 +data4 0xA29A76EE, 0x4007CDD2, 0x255B9D19, 0x00000000 +data4 0x6C8ECA95, 0x400733BE, 0x25CB021B, 0x00000000 +data4 0x1F8DDC52, 0x4006A07E, 0x24AB4722, 0x00000000 +data4 0xC298AD58, 0x4006139B, 0x252764E2, 0x00000000 +data4 0xBAD7164B, 0x40058CAB, 0x24DAF5DB, 0x00000000 +data4 0xAE31A5D3, 0x40050B4B, 0x25EA20F4, 0x00000000 +data4 0x89F85A8A, 0x40048F21, 0x2583A3E8, 0x00000000 +data4 0xA862380D, 0x400417DA, 0x25DCC4CC, 0x00000000 +data4 0x1088FCFE, 0x4003A52B, 0x2430A492, 0x00000000 +data4 0xCD3527D5, 0x400336CC, 0x255F77CF, 0x00000000 +data4 0x5760766D, 0x4002CC7F, 0x25DA0BDA, 0x00000000 +data4 0x11CE02E3, 0x40026607, 0x256FF4A2, 0x00000000 +data4 0xD37BBE04, 0x4002032C, 0x25208AED, 0x00000000 +data4 0x7F050775, 0x4001A3BD, 0x24B72DD6, 0x00000000 +data4 0xA554848A, 0x40014789, 0x24AB4DAA, 0x00000000 +data4 0x323E81B7, 0x4000EE65, 0x2584C440, 0x00000000 +data4 0x21CF1293, 0x40009827, 0x25C9428D, 0x00000000 +data4 0x3D415EEB, 0x400044A9, 0x25DC8482, 0x00000000 +data4 0xBD72C577, 0x3FFFE78F, 0x257F5070, 0x00000000 +data4 0x75EFD28E, 0x3FFF4AC3, 0x23EBBF7A, 0x00000000 +data4 0x60B52DDE, 0x3FFEB2AF, 0x22EECA07, 0x00000000 +data4 0x35204180, 0x3FFE1F19, 0x24191079, 0x00000000 +data4 0x54F7E60A, 0x3FFD8FCA, 0x248D3058, 0x00000000 +// +// Entries C_hi double-precision memory format +// Index = 0,1,...,19 B = 2^(-1)*(1+Index/32+1/64) +// Entries C_lo single-precision memory format +// Index = 0,1,...,19 B = 2^(-1)*(1+Index/32+1/64) +// +data4 0x79F6FADE, 0x3FFCC06A, 0x239C7886, 0x00000000 +data4 0x891662A6, 0x3FFBB91F, 0x250BD191, 0x00000000 +data4 0x529F155D, 0x3FFABFB6, 0x256CC3E6, 0x00000000 +data4 0x2E964AE9, 0x3FF9D300, 0x250843E3, 0x00000000 +data4 0x89DCB383, 0x3FF8F1EF, 0x2277C87E, 0x00000000 +data4 0x7C87DBD6, 0x3FF81B93, 0x256DA6CF, 0x00000000 +data4 0x1042EDE4, 0x3FF74F14, 0x2573D28A, 0x00000000 +data4 0x1784B360, 0x3FF68BAF, 0x242E489A, 0x00000000 +data4 0x7C923C4C, 0x3FF5D0B5, 0x2532D940, 0x00000000 +data4 0xF418EF20, 0x3FF51D88, 0x253C7DD6, 0x00000000 +data4 0x02F88DAE, 0x3FF4719A, 0x23DB59BF, 0x00000000 +data4 0x49DA0788, 0x3FF3CC66, 0x252B4756, 0x00000000 +data4 0x0B980DB8, 0x3FF32D77, 0x23FE585F, 0x00000000 +data4 0xE56C987A, 0x3FF2945F, 0x25378A63, 0x00000000 +data4 0xB16523F6, 0x3FF200BD, 0x247BB2E0, 0x00000000 +data4 0x8CE27778, 0x3FF17235, 0x24446538, 0x00000000 +data4 0xFDEFE692, 0x3FF0E873, 0x2514638F, 0x00000000 +data4 0x33154062, 0x3FF0632C, 0x24A7FC27, 0x00000000 +data4 0xB3EF115F, 0x3FEFC42E, 0x248FD0FE, 0x00000000 +data4 0x135D26F6, 0x3FEEC9E8, 0x2385C719, 0x00000000 +// +// Entries SC_inv in Swapped IEEE format (extended) +// Index = 0,1,...,31 B = 2^(-2)*(1+Index/32+1/64) +// +data4 0x1BF30C9E, 0x839D6D4A, 0x00004001, 0x00000000 +data4 0x554B0EB0, 0x80092804, 0x00004001, 0x00000000 +data4 0xA1CF0DE9, 0xF959F94C, 0x00004000, 0x00000000 +data4 0x77378677, 0xF3086BA0, 0x00004000, 0x00000000 +data4 0xCCD4723C, 0xED154515, 0x00004000, 0x00000000 +data4 0x1C27CF25, 0xE7790944, 0x00004000, 0x00000000 +data4 0x8DDACB88, 0xE22D037D, 0x00004000, 0x00000000 +data4 0x89C73522, 0xDD2B2D8A, 0x00004000, 0x00000000 +data4 0xBB2C1171, 0xD86E1A23, 0x00004000, 0x00000000 +data4 0xDFF5E0F9, 0xD3F0E288, 0x00004000, 0x00000000 +data4 0x283BEBD5, 0xCFAF16B1, 0x00004000, 0x00000000 +data4 0x0D88DD53, 0xCBA4AFAA, 0x00004000, 0x00000000 +data4 0xCA67C43D, 0xC7CE03CC, 0x00004000, 0x00000000 +data4 0x0CA0DDB0, 0xC427BC82, 0x00004000, 0x00000000 +data4 0xF13D8CAB, 0xC0AECD57, 0x00004000, 0x00000000 +data4 0x71ECE6B1, 0xBD606C38, 0x00004000, 0x00000000 +data4 0xA44C4929, 0xBA3A0A96, 0x00004000, 0x00000000 +data4 0xE5CCCEC1, 0xB7394F6F, 0x00004000, 0x00000000 +data4 0x9637D8BC, 0xB45C1203, 0x00004000, 0x00000000 +data4 0x92CB051B, 0xB1A05528, 0x00004000, 0x00000000 +data4 0x6BA2FFD0, 0xAF04432B, 0x00004000, 0x00000000 +data4 0x7221235F, 0xAC862A23, 0x00004000, 0x00000000 +data4 0x5F00A9D1, 0xAA2478AF, 0x00004000, 0x00000000 +data4 0x81E082BF, 0xA7DDBB0C, 0x00004000, 0x00000000 +data4 0x45684FEE, 0xA5B0987D, 0x00004000, 0x00000000 +data4 0x627A8F53, 0xA39BD0F5, 0x00004000, 0x00000000 +data4 0x6EC5C8B0, 0xA19E3B03, 0x00004000, 0x00000000 +data4 0x91CD7C66, 0x9FB6C1F0, 0x00004000, 0x00000000 +data4 0x1FA3DF8A, 0x9DE46410, 0x00004000, 0x00000000 +data4 0xA8F6B888, 0x9C263139, 0x00004000, 0x00000000 +data4 0xC27B0450, 0x9A7B4968, 0x00004000, 0x00000000 +data4 0x5EE614EE, 0x98E2DB7E, 0x00004000, 0x00000000 +// +// Entries SC_inv in Swapped IEEE format (extended) +// Index = 0,1,...,19 B = 2^(-1)*(1+Index/32+1/64) +// +data4 0x13B2B5BA, 0x969F335C, 0x00004000, 0x00000000 +data4 0xD4C0F548, 0x93D446D9, 0x00004000, 0x00000000 +data4 0x61B798AF, 0x9147094F, 0x00004000, 0x00000000 +data4 0x758787AC, 0x8EF317CC, 0x00004000, 0x00000000 +data4 0xB99EEFDB, 0x8CD498B3, 0x00004000, 0x00000000 +data4 0xDFF8BC37, 0x8AE82A7D, 0x00004000, 0x00000000 +data4 0xE3C55D42, 0x892AD546, 0x00004000, 0x00000000 +data4 0xD15573C1, 0x8799FEA9, 0x00004000, 0x00000000 +data4 0x435A4B4C, 0x86335F88, 0x00004000, 0x00000000 +data4 0x3E93A87B, 0x84F4FB6E, 0x00004000, 0x00000000 +data4 0x80A382FB, 0x83DD1952, 0x00004000, 0x00000000 +data4 0xA4CB8C9E, 0x82EA3D7F, 0x00004000, 0x00000000 +data4 0x6861D0A8, 0x821B247C, 0x00004000, 0x00000000 +data4 0x63E8D244, 0x816EBED1, 0x00004000, 0x00000000 +data4 0x27E4CFC6, 0x80E42D91, 0x00004000, 0x00000000 +data4 0x28E64AFD, 0x807ABF8D, 0x00004000, 0x00000000 +data4 0x863B4FD8, 0x8031EF26, 0x00004000, 0x00000000 +data4 0xAE8C11FD, 0x800960AD, 0x00004000, 0x00000000 +data4 0x5FDBEC21, 0x8000E147, 0x00004000, 0x00000000 +data4 0xA07791FA, 0x80186650, 0x00004000, 0x00000000 + +Arg = f8 +Result = f8 +fp_tmp = f9 +U_2 = f10 +rsq = f11 +C_hi = f12 +C_lo = f13 +T_hi = f14 +T_lo = f15 + +N_0 = f32 +d_1 = f33 +MPI_BY_4 = f34 +tail = f35 +tanx = f36 +Cx = f37 +Sx = f38 +sgn_r = f39 +CORR = f40 +P = f41 +D = f42 +ArgPrime = f43 +P_0 = f44 + +P2_1 = f45 +P2_2 = f46 +P2_3 = f47 + +P1_1 = f45 +P1_2 = f46 +P1_3 = f47 + +P1_4 = f48 +P1_5 = f49 +P1_6 = f50 +P1_7 = f51 +P1_8 = f52 +P1_9 = f53 + +TWO_TO_63 = f54 +NEGTWO_TO_63 = f55 +x = f56 +xsq = f57 +Tx = f58 +Tx1 = f59 +Set = f60 +poly1 = f61 +poly2 = f62 +Poly = f63 +Poly1 = f64 +Poly2 = f65 +r_to_the_8 = f66 +B = f67 +SC_inv = f68 +Pos_r = f69 +N_0_fix = f70 +PI_BY_4 = f71 +NEGTWO_TO_NEG2 = f72 +TWO_TO_24 = f73 +TWO_TO_NEG14 = f74 +TWO_TO_NEG33 = f75 +NEGTWO_TO_24 = f76 +NEGTWO_TO_NEG14 = f76 +NEGTWO_TO_NEG33 = f77 +two_by_PI = f78 +N = f79 +N_fix = f80 +P_1 = f81 +P_2 = f82 +P_3 = f83 +s_val = f84 +w = f85 +c = f86 +r = f87 +Z = f88 +A = f89 +a = f90 +t = f91 +U_1 = f92 +d_2 = f93 +TWO_TO_NEG2 = f94 +Q1_1 = f95 +Q1_2 = f96 +Q1_3 = f97 +Q1_4 = f98 +Q1_5 = f99 +Q1_6 = f100 +Q1_7 = f101 +Q1_8 = f102 +S_hi = f103 +S_lo = f104 +V_hi = f105 +V_lo = f106 +U_hi = f107 +U_lo = f108 +U_hiabs = f109 +V_hiabs = f110 +V = f111 +Inv_P_0 = f112 + +GR_SAVE_B0 = r33 +GR_SAVE_GP = r34 +GR_SAVE_PFS = r35 + +delta1 = r36 +table_ptr1 = r37 +table_ptr2 = r38 +i_0 = r39 +i_1 = r40 +N_fix_gr = r41 +N_inc = r42 +exp_Arg = r43 +exp_r = r44 +sig_r = r45 +lookup = r46 +table_offset = r47 +Create_B = r48 +gr_tmp = r49 + +GR_Parameter_X = r49 +GR_Parameter_r = r50 + + + +.global __libm_tan +.section .text +.proc __libm_tan + + +__libm_tan: + +{ .mfi +alloc r32 = ar.pfs, 0,17,2,0 +(p0) fclass.m.unc p6,p0 = Arg, 0x1E7 + addl gr_tmp = -1,r0 +} +;; + +{ .mfi + nop.m 999 +(p0) fclass.nm.unc p7,p0 = Arg, 0x1FF + nop.i 999 +} +;; + +{ .mfi +(p0) addl table_ptr1 = @ltoff(TAN_BASE_CONSTANTS), gp + nop.f 999 + nop.i 999 +} +;; + +{ .mmi + ld8 table_ptr1 = [table_ptr1] + setf.sig fp_tmp = gr_tmp // Make a constant so fmpy produces inexact + nop.i 999 +} +;; + +// +// Check for NatVals, Infs , NaNs, and Zeros +// Check for everything - if false, then must be pseudo-zero +// or pseudo-nan. +// Local table pointer +// + +{ .mbb +(p0) add table_ptr2 = 96, table_ptr1 +(p6) br.cond.spnt __libm_TAN_SPECIAL +(p7) br.cond.spnt __libm_TAN_SPECIAL ;; +} +// +// Point to Inv_P_0 +// Branch out to deal with unsupporteds and special values. +// + +{ .mmf +(p0) ldfs TWO_TO_24 = [table_ptr1],4 +(p0) ldfs TWO_TO_63 = [table_ptr2],4 +// +// Load -2**24, load -2**63. +// +(p0) fcmp.eq.s0 p0, p6 = Arg, f1 ;; +} + +{ .mfi +(p0) ldfs NEGTWO_TO_63 = [table_ptr2],12 +(p0) fnorm.s1 Arg = Arg + nop.i 999 +} +// +// Load 2**24, Load 2**63. +// + +{ .mmi +(p0) ldfs NEGTWO_TO_24 = [table_ptr1],12 ;; +// +// Do fcmp to generate Denormal exception +// - can't do FNORM (will generate Underflow when U is unmasked!) +// Normalize input argument. +// +(p0) ldfe two_by_PI = [table_ptr1],16 + nop.i 999 +} + +{ .mmi +(p0) ldfe Inv_P_0 = [table_ptr2],16 ;; +(p0) ldfe d_1 = [table_ptr2],16 + nop.i 999 +} +// +// Decide about the paths to take: +// PR_1 and PR_3 set if -2**24 < Arg < 2**24 - CASE 1 OR 2 +// OTHERWISE - CASE 3 OR 4 +// Load inverse of P_0 . +// Set PR_6 if Arg <= -2**63 +// Are there any Infs, NaNs, or zeros? +// + +{ .mmi +(p0) ldfe P_0 = [table_ptr1],16 ;; +(p0) ldfe d_2 = [table_ptr2],16 + nop.i 999 +} +// +// Set PR_8 if Arg <= -2**24 +// Set PR_6 if Arg >= 2**63 +// + +{ .mmi +(p0) ldfe P_1 = [table_ptr1],16 ;; +(p0) ldfe PI_BY_4 = [table_ptr2],16 + nop.i 999 +} +// +// Set PR_8 if Arg >= 2**24 +// + +{ .mmi +(p0) ldfe P_2 = [table_ptr1],16 ;; +(p0) ldfe MPI_BY_4 = [table_ptr2],16 + nop.i 999 +} +// +// Load P_2 and PI_BY_4 +// + +{ .mfi +(p0) ldfe P_3 = [table_ptr1],16 + nop.f 999 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p0) fcmp.le.unc.s1 p6,p7 = Arg,NEGTWO_TO_63 + nop.i 999 +} + +{ .mfi + nop.m 999 +(p0) fcmp.le.unc.s1 p8,p9 = Arg,NEGTWO_TO_24 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p7) fcmp.ge.s1 p6,p0 = Arg,TWO_TO_63 + nop.i 999 +} + +{ .mfi + nop.m 999 +(p9) fcmp.ge.s1 p8,p0 = Arg,TWO_TO_24 + nop.i 999 ;; +} + +{ .mib + nop.m 999 + nop.i 999 +// +// Load P_3 and -PI_BY_4 +// +(p6) br.cond.spnt TAN_ARG_TOO_LARGE ;; +} + +{ .mib + nop.m 999 + nop.i 999 +// +// Load 2**(-2). +// Load -2**(-2). +// Branch out if we have a special argument. +// Branch out if the magnitude of the input argument is too large +// - do this branch before the next. +// +(p8) br.cond.spnt TAN_LARGER_ARG ;; +} +// +// Branch to Cases 3 or 4 if Arg <= -2**24 or Arg >= 2**24 +// + +{ .mfi +(p0) ldfs TWO_TO_NEG2 = [table_ptr2],4 +// ARGUMENT REDUCTION CODE - CASE 1 and 2 +// Load 2**(-2). +// Load -2**(-2). +(p0) fmpy.s1 N = Arg,two_by_PI + nop.i 999 ;; +} + +{ .mfi +(p0) ldfs NEGTWO_TO_NEG2 = [table_ptr2],12 +// +// N = Arg * 2/pi +// +(p0) fcmp.lt.unc.s1 p8,p9= Arg,PI_BY_4 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// if Arg < pi/4, set PR_8. +// +(p8) fcmp.gt.s1 p8,p9= Arg,MPI_BY_4 + nop.i 999 ;; +} +// +// Case 1: Is |r| < 2**(-2). +// Arg is the same as r in this case. +// r = Arg +// c = 0 +// + +{ .mfi +(p8) mov N_fix_gr = r0 +// +// if Arg > -pi/4, reset PR_8. +// Select the case when |Arg| < pi/4 - set PR[8] = true. +// Else Select the case when |Arg| >= pi/4 - set PR[9] = true. +// +(p0) fcvt.fx.s1 N_fix = N + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// Grab the integer part of N . +// +(p8) mov r = Arg + nop.i 999 +} + +{ .mfi + nop.m 999 +(p8) mov c = f0 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p8) fcmp.lt.unc.s1 p10, p11 = Arg, TWO_TO_NEG2 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p10) fcmp.gt.s1 p10,p0 = Arg, NEGTWO_TO_NEG2 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// Case 2: Place integer part of N in GP register. +// +(p9) fcvt.xf N = N_fix + nop.i 999 ;; +} + +{ .mib +(p9) getf.sig N_fix_gr = N_fix + nop.i 999 +// +// Case 2: Convert integer N_fix back to normalized floating-point value. +// +(p10) br.cond.spnt TAN_SMALL_R ;; +} + +{ .mib + nop.m 999 + nop.i 999 +(p8) br.cond.sptk TAN_NORMAL_R ;; +} +// +// Case 1: PR_3 is only affected when PR_1 is set. +// + +{ .mmi +(p9) ldfs TWO_TO_NEG33 = [table_ptr2], 4 ;; +// +// Case 2: Load 2**(-33). +// +(p9) ldfs NEGTWO_TO_NEG33 = [table_ptr2], 4 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// Case 2: Load -2**(-33). +// +(p9) fnma.s1 s_val = N, P_1, Arg + nop.i 999 +} + +{ .mfi + nop.m 999 +(p9) fmpy.s1 w = N, P_2 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// Case 2: w = N * P_2 +// Case 2: s_val = -N * P_1 + Arg +// +(p0) fcmp.lt.unc.s1 p9,p8 = s_val, TWO_TO_NEG33 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// Decide between case_1 and case_2 reduce: +// +(p9) fcmp.gt.s1 p9, p8 = s_val, NEGTWO_TO_NEG33 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// Case 1_reduce: s <= -2**(-33) or s >= 2**(-33) +// Case 2_reduce: -2**(-33) < s < 2**(-33) +// +(p8) fsub.s1 r = s_val, w + nop.i 999 +} + +{ .mfi + nop.m 999 +(p9) fmpy.s1 w = N, P_3 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p9) fma.s1 U_1 = N, P_2, w + nop.i 999 +} + +{ .mfi + nop.m 999 +// +// Case 1_reduce: Is |r| < 2**(-2), if so set PR_10 +// else set PR_11. +// +(p8) fsub.s1 c = s_val, r + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// Case 1_reduce: r = s + w (change sign) +// Case 2_reduce: w = N * P_3 (change sign) +// +(p8) fcmp.lt.unc.s1 p10, p11 = r, TWO_TO_NEG2 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p10) fcmp.gt.s1 p10, p11 = r, NEGTWO_TO_NEG2 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p9) fsub.s1 r = s_val, U_1 + nop.i 999 +} + +{ .mfi + nop.m 999 +// +// Case 1_reduce: c is complete here. +// c = c + w (w has not been negated.) +// Case 2_reduce: r is complete here - continue to calculate c . +// r = s - U_1 +// +(p9) fms.s1 U_2 = N, P_2, U_1 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// Case 1_reduce: c = s - r +// Case 2_reduce: U_1 = N * P_2 + w +// +(p8) fsub.s1 c = c, w + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p9) fsub.s1 s_val = s_val, r + nop.i 999 +} + +{ .mfb + nop.m 999 +// +// Case 2_reduce: +// U_2 = N * P_2 - U_1 +// Not needed until later. +// +(p9) fadd.s1 U_2 = U_2, w +// +// Case 2_reduce: +// s = s - r +// U_2 = U_2 + w +// +(p10) br.cond.spnt TAN_SMALL_R ;; +} + +{ .mib + nop.m 999 + nop.i 999 +(p11) br.cond.sptk TAN_NORMAL_R ;; +} + +{ .mii + nop.m 999 +// +// Case 2_reduce: +// c = c - U_2 +// c is complete here +// Argument reduction ends here. +// +(p9) extr.u i_1 = N_fix_gr, 0, 1 ;; +(p9) cmp.eq.unc p11, p12 = 0x0000,i_1 ;; +} + +{ .mfi + nop.m 999 +// +// Is i_1 even or odd? +// if i_1 == 0, set p11, else set p12. +// +(p11) fmpy.s1 rsq = r, Z + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p12) frcpa.s1 S_hi,p0 = f1, r + nop.i 999 +} + +// +// Case 1: Branch to SMALL_R or NORMAL_R. +// Case 1 is done now. +// + +{ .mfi +(p9) addl table_ptr1 = @ltoff(TAN_BASE_CONSTANTS), gp +(p9) fsub.s1 c = s_val, U_1 + nop.i 999 ;; +} +;; + +{ .mmi +(p9) ld8 table_ptr1 = [table_ptr1] + nop.m 999 + nop.i 999 +} +;; + +{ .mmi +(p9) add table_ptr1 = 224, table_ptr1 ;; +(p9) ldfe P1_1 = [table_ptr1],144 + nop.i 999 ;; +} +// +// Get [i_1] - lsb of N_fix_gr . +// Load P1_1 and point to Q1_1 . +// + +{ .mfi +(p9) ldfe Q1_1 = [table_ptr1] , 0 +// +// N even: rsq = r * Z +// N odd: S_hi = frcpa(r) +// +(p12) fmerge.ns S_hi = S_hi, S_hi + nop.i 999 +} + +{ .mfi + nop.m 999 +// +// Case 2_reduce: +// c = s - U_1 +// +(p9) fsub.s1 c = c, U_2 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p12) fma.s1 poly1 = S_hi, r, f1 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N odd: Change sign of S_hi +// +(p11) fmpy.s1 rsq = rsq, P1_1 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p12) fma.s1 S_hi = S_hi, poly1, S_hi + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N even: rsq = rsq * P1_1 +// N odd: poly1 = 1.0 + S_hi * r 16 bits partial account for necessary +// +(p11) fma.s1 Result = r, rsq, c + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N even: Result = c + r * rsq +// N odd: S_hi = S_hi + S_hi*poly1 16 bits account for necessary +// +(p12) fma.s1 poly1 = S_hi, r, f1 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N even: Result = Result + r +// N odd: poly1 = 1.0 + S_hi * r 32 bits partial +// +(p11) fadd.s0 Result = r, Result + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p12) fma.s1 S_hi = S_hi, poly1, S_hi + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N even: Result1 = Result + r +// N odd: S_hi = S_hi * poly1 + S_hi 32 bits +// +(p12) fma.s1 poly1 = S_hi, r, f1 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N odd: poly1 = S_hi * r + 1.0 64 bits partial +// +(p12) fma.s1 S_hi = S_hi, poly1, S_hi + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N odd: poly1 = S_hi * poly + 1.0 64 bits +// +(p12) fma.s1 poly1 = S_hi, r, f1 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N odd: poly1 = S_hi * r + 1.0 +// +(p12) fma.s1 poly1 = S_hi, c, poly1 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N odd: poly1 = S_hi * c + poly1 +// +(p12) fmpy.s1 S_lo = S_hi, poly1 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N odd: S_lo = S_hi * poly1 +// +(p12) fma.s1 S_lo = Q1_1, r, S_lo + nop.i 999 +} + +{ .mfi + nop.m 999 +// +// N odd: Result = S_hi + S_lo +// +(p0) fmpy.s0 fp_tmp = fp_tmp, fp_tmp // Dummy mult to set inexact + nop.i 999 ;; +} + +{ .mfb + nop.m 999 +// +// N odd: S_lo = S_lo + Q1_1 * r +// +(p12) fadd.s0 Result = S_hi, S_lo +(p0) br.ret.sptk b0 ;; +} + + +TAN_LARGER_ARG: + +{ .mmf +(p0) addl table_ptr1 = @ltoff(TAN_BASE_CONSTANTS), gp + nop.m 999 +(p0) fmpy.s1 N_0 = Arg, Inv_P_0 +} +;; + +// +// ARGUMENT REDUCTION CODE - CASE 3 and 4 +// +// +// Adjust table_ptr1 to beginning of table. +// N_0 = Arg * Inv_P_0 +// + + +{ .mmi +(p0) ld8 table_ptr1 = [table_ptr1] + nop.m 999 + nop.i 999 +} +;; + + +{ .mmi +(p0) add table_ptr1 = 8, table_ptr1 ;; +// +// Point to 2*-14 +// +(p0) ldfs TWO_TO_NEG14 = [table_ptr1], 4 + nop.i 999 ;; +} +// +// Load 2**(-14). +// + +{ .mmi +(p0) ldfs NEGTWO_TO_NEG14 = [table_ptr1], 180 ;; +// +// N_0_fix = integer part of N_0 . +// Adjust table_ptr1 to beginning of table. +// +(p0) ldfs TWO_TO_NEG2 = [table_ptr1], 4 + nop.i 999 ;; +} +// +// Make N_0 the integer part. +// + +{ .mfi +(p0) ldfs NEGTWO_TO_NEG2 = [table_ptr1] +// +// Load -2**(-14). +// +(p0) fcvt.fx.s1 N_0_fix = N_0 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p0) fcvt.xf N_0 = N_0_fix + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p0) fnma.s1 ArgPrime = N_0, P_0, Arg + nop.i 999 +} + +{ .mfi + nop.m 999 +(p0) fmpy.s1 w = N_0, d_1 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// ArgPrime = -N_0 * P_0 + Arg +// w = N_0 * d_1 +// +(p0) fmpy.s1 N = ArgPrime, two_by_PI + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N = ArgPrime * 2/pi +// +(p0) fcvt.fx.s1 N_fix = N + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N_fix is the integer part. +// +(p0) fcvt.xf N = N_fix + nop.i 999 ;; +} + +{ .mfi +(p0) getf.sig N_fix_gr = N_fix + nop.f 999 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N is the integer part of the reduced-reduced argument. +// Put the integer in a GP register. +// +(p0) fnma.s1 s_val = N, P_1, ArgPrime + nop.i 999 +} + +{ .mfi + nop.m 999 +(p0) fnma.s1 w = N, P_2, w + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// s_val = -N*P_1 + ArgPrime +// w = -N*P_2 + w +// +(p0) fcmp.lt.unc.s1 p11, p10 = s_val, TWO_TO_NEG14 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p11) fcmp.gt.s1 p11, p10 = s_val, NEGTWO_TO_NEG14 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// Case 3: r = s_val + w (Z complete) +// Case 4: U_hi = N_0 * d_1 +// +(p10) fmpy.s1 V_hi = N, P_2 + nop.i 999 +} + +{ .mfi + nop.m 999 +(p11) fmpy.s1 U_hi = N_0, d_1 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// Case 3: r = s_val + w (Z complete) +// Case 4: U_hi = N_0 * d_1 +// +(p11) fmpy.s1 V_hi = N, P_2 + nop.i 999 +} + +{ .mfi + nop.m 999 +(p11) fmpy.s1 U_hi = N_0, d_1 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// Decide between case 3 and 4: +// Case 3: s <= -2**(-14) or s >= 2**(-14) +// Case 4: -2**(-14) < s < 2**(-14) +// +(p10) fadd.s1 r = s_val, w + nop.i 999 +} + +{ .mfi + nop.m 999 +(p11) fmpy.s1 w = N, P_3 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// Case 4: We need abs of both U_hi and V_hi - dont +// worry about switched sign of V_hi . +// +(p11) fsub.s1 A = U_hi, V_hi + nop.i 999 +} + +{ .mfi + nop.m 999 +// +// Case 4: A = U_hi + V_hi +// Note: Worry about switched sign of V_hi, so subtract instead of add. +// +(p11) fnma.s1 V_lo = N, P_2, V_hi + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p11) fms.s1 U_lo = N_0, d_1, U_hi + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p11) fabs V_hiabs = V_hi + nop.i 999 +} + +{ .mfi + nop.m 999 +// +// Case 4: V_hi = N * P_2 +// w = N * P_3 +// Note the product does not include the (-) as in the writeup +// so (-) missing for V_hi and w . +(p10) fadd.s1 r = s_val, w + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// Case 3: c = s_val - r +// Case 4: U_lo = N_0 * d_1 - U_hi +// +(p11) fabs U_hiabs = U_hi + nop.i 999 +} + +{ .mfi + nop.m 999 +(p11) fmpy.s1 w = N, P_3 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// Case 4: Set P_12 if U_hiabs >= V_hiabs +// +(p11) fadd.s1 C_hi = s_val, A + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// Case 4: C_hi = s_val + A +// +(p11) fadd.s1 t = U_lo, V_lo + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// Case 3: Is |r| < 2**(-2), if so set PR_7 +// else set PR_8. +// Case 3: If PR_7 is set, prepare to branch to Small_R. +// Case 3: If PR_8 is set, prepare to branch to Normal_R. +// +(p10) fsub.s1 c = s_val, r + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// Case 3: c = (s - r) + w (c complete) +// +(p11) fcmp.ge.unc.s1 p12, p13 = U_hiabs, V_hiabs + nop.i 999 +} + +{ .mfi + nop.m 999 +(p11) fms.s1 w = N_0, d_2, w + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// Case 4: V_hi = N * P_2 +// w = N * P_3 +// Note the product does not include the (-) as in the writeup +// so (-) missing for V_hi and w . +// +(p10) fcmp.lt.unc.s1 p14, p15 = r, TWO_TO_NEG2 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p14) fcmp.gt.s1 p14, p15 = r, NEGTWO_TO_NEG2 + nop.i 999 ;; +} + +{ .mfb + nop.m 999 +// +// Case 4: V_lo = -N * P_2 - V_hi (U_hi is in place of V_hi in writeup) +// Note: the (-) is still missing for V_hi . +// Case 4: w = w + N_0 * d_2 +// Note: the (-) is now incorporated in w . +// +(p10) fadd.s1 c = c, w +// +// Case 4: t = U_lo + V_lo +// Note: remember V_lo should be (-), subtract instead of add. NO +// +(p14) br.cond.spnt TAN_SMALL_R ;; +} + +{ .mib + nop.m 999 + nop.i 999 +(p15) br.cond.spnt TAN_NORMAL_R ;; +} + +{ .mfi + nop.m 999 +// +// Case 3: Vector off when |r| < 2**(-2). Recall that PR_3 will be true. +// The remaining stuff is for Case 4. +// +(p12) fsub.s1 a = U_hi, A +(p11) extr.u i_1 = N_fix_gr, 0, 1 ;; +} + +{ .mfi + nop.m 999 +// +// Case 4: C_lo = s_val - C_hi +// +(p11) fadd.s1 t = t, w + nop.i 999 +} + +{ .mfi + nop.m 999 +(p13) fadd.s1 a = V_hi, A + nop.i 999 ;; +} + +// +// Case 4: a = U_hi - A +// a = V_hi - A (do an add to account for missing (-) on V_hi +// + +{ .mfi +(p11) addl table_ptr1 = @ltoff(TAN_BASE_CONSTANTS), gp +(p11) fsub.s1 C_lo = s_val, C_hi + nop.i 999 +} +;; + +{ .mmi +(p11) ld8 table_ptr1 = [table_ptr1] + nop.m 999 + nop.i 999 +} +;; + +// +// Case 4: a = (U_hi - A) + V_hi +// a = (V_hi - A) + U_hi +// In each case account for negative missing form V_hi . +// +// +// Case 4: C_lo = (s_val - C_hi) + A +// + +{ .mmi +(p11) add table_ptr1 = 224, table_ptr1 ;; +(p11) ldfe P1_1 = [table_ptr1], 16 + nop.i 999 ;; +} + +{ .mfi +(p11) ldfe P1_2 = [table_ptr1], 128 +// +// Case 4: w = U_lo + V_lo + w +// +(p12) fsub.s1 a = a, V_hi + nop.i 999 ;; +} +// +// Case 4: r = C_hi + C_lo +// + +{ .mfi +(p11) ldfe Q1_1 = [table_ptr1], 16 +(p11) fadd.s1 C_lo = C_lo, A + nop.i 999 ;; +} +// +// Case 4: c = C_hi - r +// Get [i_1] - lsb of N_fix_gr. +// + +{ .mfi +(p11) ldfe Q1_2 = [table_ptr1], 16 + nop.f 999 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p13) fsub.s1 a = U_hi, a + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p11) fadd.s1 t = t, a + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// Case 4: t = t + a +// +(p11) fadd.s1 C_lo = C_lo, t + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// Case 4: C_lo = C_lo + t +// +(p11) fadd.s1 r = C_hi, C_lo + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p11) fsub.s1 c = C_hi, r + nop.i 999 +} + +{ .mfi + nop.m 999 +// +// Case 4: c = c + C_lo finished. +// Is i_1 even or odd? +// if i_1 == 0, set PR_4, else set PR_5. +// +// r and c have been computed. +// We known whether this is the sine or cosine routine. +// Make sure ftz mode is set - should be automatic when using wre +(p0) fmpy.s1 rsq = r, r + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p11) fadd.s1 c = c , C_lo +(p11) cmp.eq.unc p11, p12 = 0x0000, i_1 ;; +} + +{ .mfi + nop.m 999 +(p12) frcpa.s1 S_hi, p0 = f1, r + nop.i 999 +} + +{ .mfi + nop.m 999 +// +// N odd: Change sign of S_hi +// +(p11) fma.s1 Result = rsq, P1_2, P1_1 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p12) fma.s1 P = rsq, Q1_2, Q1_1 + nop.i 999 +} + +{ .mfi + nop.m 999 +// +// N odd: Result = S_hi + S_lo (User supplied rounding mode for C1) +// +(p0) fmpy.s0 fp_tmp = fp_tmp, fp_tmp // Dummy mult to set inexact + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N even: rsq = r * r +// N odd: S_hi = frcpa(r) +// +(p12) fmerge.ns S_hi = S_hi, S_hi + nop.i 999 +} + +{ .mfi + nop.m 999 +// +// N even: rsq = rsq * P1_2 + P1_1 +// N odd: poly1 = 1.0 + S_hi * r 16 bits partial account for necessary +// +(p11) fmpy.s1 Result = rsq, Result + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p12) fma.s1 poly1 = S_hi, r,f1 + nop.i 999 +} + +{ .mfi + nop.m 999 +// +// N even: Result = Result * rsq +// N odd: S_hi = S_hi + S_hi*poly1 16 bits account for necessary +// +(p11) fma.s1 Result = r, Result, c + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p12) fma.s1 S_hi = S_hi, poly1, S_hi + nop.i 999 +} + +{ .mfi + nop.m 999 +// +// N odd: S_hi = S_hi * poly1 + S_hi 32 bits +// +(p11) fadd.s0 Result= r, Result + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p12) fma.s1 poly1 = S_hi, r, f1 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N even: Result = Result * r + c +// N odd: poly1 = 1.0 + S_hi * r 32 bits partial +// +(p12) fma.s1 S_hi = S_hi, poly1, S_hi + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p12) fma.s1 poly1 = S_hi, r, f1 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N even: Result1 = Result + r (Rounding mode S0) +// N odd: poly1 = S_hi * r + 1.0 64 bits partial +// +(p12) fma.s1 S_hi = S_hi, poly1, S_hi + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N odd: poly1 = S_hi * poly + S_hi 64 bits +// +(p12) fma.s1 poly1 = S_hi, r, f1 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N odd: poly1 = S_hi * r + 1.0 +// +(p12) fma.s1 poly1 = S_hi, c, poly1 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N odd: poly1 = S_hi * c + poly1 +// +(p12) fmpy.s1 S_lo = S_hi, poly1 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N odd: S_lo = S_hi * poly1 +// +(p12) fma.s1 S_lo = P, r, S_lo + nop.i 999 ;; +} + +{ .mfb + nop.m 999 +// +// N odd: S_lo = S_lo + r * P +// +(p12) fadd.s0 Result = S_hi, S_lo +(p0) br.ret.sptk b0 ;; +} + + +TAN_SMALL_R: + +{ .mii + nop.m 999 +(p0) extr.u i_1 = N_fix_gr, 0, 1 ;; +(p0) cmp.eq.unc p11, p12 = 0x0000, i_1 +} + +{ .mfi + nop.m 999 +(p0) fmpy.s1 rsq = r, r + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p12) frcpa.s1 S_hi, p0 = f1, r + nop.i 999 +} + +{ .mfi +(p0) addl table_ptr1 = @ltoff(TAN_BASE_CONSTANTS), gp + nop.f 999 + nop.i 999 +} +;; + +{ .mmi +(p0) ld8 table_ptr1 = [table_ptr1] + nop.m 999 + nop.i 999 +} +;; + +// ***************************************************************** +// ***************************************************************** +// ***************************************************************** + +{ .mmi +(p0) add table_ptr1 = 224, table_ptr1 ;; +(p0) ldfe P1_1 = [table_ptr1], 16 + nop.i 999 ;; +} +// r and c have been computed. +// We known whether this is the sine or cosine routine. +// Make sure ftz mode is set - should be automatic when using wre +// |r| < 2**(-2) + +{ .mfi +(p0) ldfe P1_2 = [table_ptr1], 16 +(p11) fmpy.s1 r_to_the_8 = rsq, rsq + nop.i 999 ;; +} +// +// Set table_ptr1 to beginning of constant table. +// Get [i_1] - lsb of N_fix_gr. +// + +{ .mfi +(p0) ldfe P1_3 = [table_ptr1], 96 +// +// N even: rsq = r * r +// N odd: S_hi = frcpa(r) +// +(p12) fmerge.ns S_hi = S_hi, S_hi + nop.i 999 ;; +} +// +// Is i_1 even or odd? +// if i_1 == 0, set PR_11. +// if i_1 != 0, set PR_12. +// + +{ .mfi +(p11) ldfe P1_9 = [table_ptr1], -16 +// +// N even: Poly2 = P1_7 + Poly2 * rsq +// N odd: poly2 = Q1_5 + poly2 * rsq +// +(p11) fadd.s1 CORR = rsq, f1 + nop.i 999 ;; +} + +{ .mmi +(p11) ldfe P1_8 = [table_ptr1], -16 ;; +// +// N even: Poly1 = P1_2 + P1_3 * rsq +// N odd: poly1 = 1.0 + S_hi * r +// 16 bits partial account for necessary (-1) +// +(p11) ldfe P1_7 = [table_ptr1], -16 + nop.i 999 ;; +} +// +// N even: Poly1 = P1_1 + Poly1 * rsq +// N odd: S_hi = S_hi + S_hi * poly1) 16 bits account for necessary +// + +{ .mfi +(p11) ldfe P1_6 = [table_ptr1], -16 +// +// N even: Poly2 = P1_5 + Poly2 * rsq +// N odd: poly2 = Q1_3 + poly2 * rsq +// +(p11) fmpy.s1 r_to_the_8 = r_to_the_8, r_to_the_8 + nop.i 999 ;; +} +// +// N even: Poly1 = Poly1 * rsq +// N odd: poly1 = 1.0 + S_hi * r 32 bits partial +// + +{ .mfi +(p11) ldfe P1_5 = [table_ptr1], -16 +(p12) fma.s1 poly1 = S_hi, r, f1 + nop.i 999 ;; +} +// +// N even: CORR = CORR * c +// N odd: S_hi = S_hi * poly1 + S_hi 32 bits +// + +// +// N even: Poly2 = P1_6 + Poly2 * rsq +// N odd: poly2 = Q1_4 + poly2 * rsq +// +{ .mmf +(p0) addl table_ptr2 = @ltoff(TAN_BASE_CONSTANTS), gp +(p11) ldfe P1_4 = [table_ptr1], -16 +(p11) fmpy.s1 CORR = CORR, c +} +;; + + +{ .mmi +(p0) ld8 table_ptr2 = [table_ptr2] + nop.m 999 + nop.i 999 +} +;; + + +{ .mii +(p0) add table_ptr2 = 464, table_ptr2 + nop.i 999 ;; + nop.i 999 +} + +{ .mfi + nop.m 999 +(p11) fma.s1 Poly1 = P1_3, rsq, P1_2 + nop.i 999 ;; +} + +{ .mfi +(p0) ldfe Q1_7 = [table_ptr2], -16 +(p12) fma.s1 S_hi = S_hi, poly1, S_hi + nop.i 999 ;; +} + +{ .mfi +(p0) ldfe Q1_6 = [table_ptr2], -16 +(p11) fma.s1 Poly2 = P1_9, rsq, P1_8 + nop.i 999 ;; +} + +{ .mmi +(p0) ldfe Q1_5 = [table_ptr2], -16 ;; +(p12) ldfe Q1_4 = [table_ptr2], -16 + nop.i 999 ;; +} + +{ .mfi +(p12) ldfe Q1_3 = [table_ptr2], -16 +// +// N even: Poly2 = P1_8 + P1_9 * rsq +// N odd: poly2 = Q1_6 + Q1_7 * rsq +// +(p11) fma.s1 Poly1 = Poly1, rsq, P1_1 + nop.i 999 ;; +} + +{ .mfi +(p12) ldfe Q1_2 = [table_ptr2], -16 +(p12) fma.s1 poly1 = S_hi, r, f1 + nop.i 999 ;; +} + +{ .mfi +(p12) ldfe Q1_1 = [table_ptr2], -16 +(p11) fma.s1 Poly2 = Poly2, rsq, P1_7 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N even: CORR = rsq + 1 +// N even: r_to_the_8 = rsq * rsq +// +(p11) fmpy.s1 Poly1 = Poly1, rsq + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p12) fma.s1 S_hi = S_hi, poly1, S_hi + nop.i 999 +} + +{ .mfi + nop.m 999 +(p12) fma.s1 poly2 = Q1_7, rsq, Q1_6 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p11) fma.s1 Poly2 = Poly2, rsq, P1_6 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p12) fma.s1 poly1 = S_hi, r, f1 + nop.i 999 +} + +{ .mfi + nop.m 999 +(p12) fma.s1 poly2 = poly2, rsq, Q1_5 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p11) fma.s1 Poly2= Poly2, rsq, P1_5 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p12) fma.s1 S_hi = S_hi, poly1, S_hi + nop.i 999 +} + +{ .mfi + nop.m 999 +(p12) fma.s1 poly2 = poly2, rsq, Q1_4 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N even: r_to_the_8 = r_to_the_8 * r_to_the_8 +// N odd: poly1 = S_hi * r + 1.0 64 bits partial +// +(p11) fma.s1 Poly2 = Poly2, rsq, P1_4 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N even: Result = CORR + Poly * r +// N odd: P = Q1_1 + poly2 * rsq +// +(p12) fma.s1 poly1 = S_hi, r, f1 + nop.i 999 +} + +{ .mfi + nop.m 999 +(p12) fma.s1 poly2 = poly2, rsq, Q1_3 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N even: Poly2 = P1_4 + Poly2 * rsq +// N odd: poly2 = Q1_2 + poly2 * rsq +// +(p11) fma.s1 Poly = Poly2, r_to_the_8, Poly1 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p12) fma.s1 poly1 = S_hi, c, poly1 + nop.i 999 +} + +{ .mfi + nop.m 999 +(p12) fma.s1 poly2 = poly2, rsq, Q1_2 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N even: Poly = Poly1 + Poly2 * r_to_the_8 +// N odd: S_hi = S_hi * poly1 + S_hi 64 bits +// +(p11) fma.s1 Result = Poly, r, CORR + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N even: Result = r + Result (User supplied rounding mode) +// N odd: poly1 = S_hi * c + poly1 +// +(p12) fmpy.s1 S_lo = S_hi, poly1 + nop.i 999 +} + +{ .mfi + nop.m 999 +(p12) fma.s1 P = poly2, rsq, Q1_1 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N odd: poly1 = S_hi * r + 1.0 +// +(p11) fadd.s0 Result = Result, r + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N odd: S_lo = S_hi * poly1 +// +(p12) fma.s1 S_lo = Q1_1, c, S_lo + nop.i 999 +} + +{ .mfi + nop.m 999 +// +// N odd: Result = Result + S_hi (user supplied rounding mode) +// +(p0) fmpy.s0 fp_tmp = fp_tmp, fp_tmp // Dummy mult to set inexact + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N odd: S_lo = Q1_1 * c + S_lo +// +(p12) fma.s1 Result = P, r, S_lo + nop.i 999 ;; +} + +{ .mfb + nop.m 999 +// +// N odd: Result = S_lo + r * P +// +(p12) fadd.s0 Result = Result, S_hi +(p0) br.ret.sptk b0 ;; +} + + +TAN_NORMAL_R: + +{ .mfi +(p0) getf.sig sig_r = r +// ******************************************************************* +// ******************************************************************* +// ******************************************************************* +// +// r and c have been computed. +// Make sure ftz mode is set - should be automatic when using wre +// +// +// Get [i_1] - lsb of N_fix_gr alone. +// +(p0) fmerge.s Pos_r = f1, r +(p0) extr.u i_1 = N_fix_gr, 0, 1 ;; +} + +{ .mfi + nop.m 999 +(p0) fmerge.s sgn_r = r, f1 +(p0) cmp.eq.unc p11, p12 = 0x0000, i_1 ;; +} + +{ .mfi + nop.m 999 + nop.f 999 +(p0) extr.u lookup = sig_r, 58, 5 +} + +{ .mlx + nop.m 999 +(p0) movl Create_B = 0x8200000000000000 ;; +} + +{ .mfi +(p0) addl table_ptr1 = @ltoff(TAN_BASE_CONSTANTS), gp + nop.f 999 +(p0) dep Create_B = lookup, Create_B, 58, 5 +} +;; + +// +// Get [i_1] - lsb of N_fix_gr alone. +// Pos_r = abs (r) +// + + +{ .mmi + ld8 table_ptr1 = [table_ptr1] + nop.m 999 + nop.i 999 +} +;; + + +{ .mmi + nop.m 999 +(p0) setf.sig B = Create_B +// +// Set table_ptr1 and table_ptr2 to base address of +// constant table. +// +(p0) add table_ptr1 = 480, table_ptr1 ;; +} + +{ .mmb + nop.m 999 +// +// Is i_1 or i_0 == 0 ? +// Create the constant 1 00000 1000000000000000000000... +// +(p0) ldfe P2_1 = [table_ptr1], 16 + nop.b 999 +} + +{ .mmi + nop.m 999 ;; +(p0) getf.exp exp_r = Pos_r + nop.i 999 +} +// +// Get r's exponent +// Get r's significand +// + +{ .mmi +(p0) ldfe P2_2 = [table_ptr1], 16 ;; +// +// Get the 5 bits or r for the lookup. 1.xxxxx .... +// from sig_r. +// Grab lsb of exp of B +// +(p0) ldfe P2_3 = [table_ptr1], 16 + nop.i 999 ;; +} + +{ .mii + nop.m 999 +(p0) andcm table_offset = 0x0001, exp_r ;; +(p0) shl table_offset = table_offset, 9 ;; +} + +{ .mii + nop.m 999 +// +// Deposit 0 00000 1000000000000000000000... on +// 1 xxxxx yyyyyyyyyyyyyyyyyyyyyy..., +// getting rid of the ys. +// Is B = 2** -2 or B= 2** -1? If 2**-1, then +// we want an offset of 512 for table addressing. +// +(p0) shladd table_offset = lookup, 4, table_offset ;; +// +// B = ........ 1xxxxx 1000000000000000000... +// +(p0) add table_ptr1 = table_ptr1, table_offset ;; +} + +{ .mmb + nop.m 999 +// +// B = ........ 1xxxxx 1000000000000000000... +// Convert B so it has the same exponent as Pos_r +// +(p0) ldfd T_hi = [table_ptr1], 8 + nop.b 999 ;; +} + +// +// x = |r| - B +// Load T_hi. +// Load C_hi. +// + +{ .mmf +(p0) addl table_ptr2 = @ltoff(TAN_BASE_CONSTANTS), gp +(p0) ldfs T_lo = [table_ptr1] +(p0) fmerge.se B = Pos_r, B +} +;; + +{ .mmi + ld8 table_ptr2 = [table_ptr2] + nop.m 999 + nop.i 999 +} +;; + +{ .mii +(p0) add table_ptr2 = 1360, table_ptr2 + nop.i 999 ;; +(p0) add table_ptr2 = table_ptr2, table_offset ;; +} + +{ .mfi +(p0) ldfd C_hi = [table_ptr2], 8 +(p0) fsub.s1 x = Pos_r, B + nop.i 999 ;; +} + +{ .mii +(p0) ldfs C_lo = [table_ptr2],255 + nop.i 999 ;; +// +// xsq = x * x +// N even: Tx = T_hi * x +// Load T_lo. +// Load C_lo - increment pointer to get SC_inv +// - cant get all the way, do an add later. +// +(p0) add table_ptr2 = 569, table_ptr2 ;; +} +// +// N even: Tx1 = Tx + 1 +// N odd: Cx1 = 1 - Cx +// + +{ .mfi +(p0) ldfe SC_inv = [table_ptr2], 0 + nop.f 999 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p0) fmpy.s1 xsq = x, x + nop.i 999 +} + +{ .mfi + nop.m 999 +(p11) fmpy.s1 Tx = T_hi, x + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p12) fmpy.s1 Cx = C_hi, x + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N odd: Cx = C_hi * x +// +(p0) fma.s1 P = P2_3, xsq, P2_2 + nop.i 999 +} + +{ .mfi + nop.m 999 +// +// N even and odd: P = P2_3 + P2_2 * xsq +// +(p11) fadd.s1 Tx1 = Tx, f1 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N even: D = C_hi - tanx +// N odd: D = T_hi + tanx +// +(p11) fmpy.s1 CORR = SC_inv, T_hi + nop.i 999 +} + +{ .mfi + nop.m 999 +(p0) fmpy.s1 Sx = SC_inv, x + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p12) fmpy.s1 CORR = SC_inv, C_hi + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p12) fsub.s1 V_hi = f1, Cx + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p0) fma.s1 P = P, xsq, P2_1 + nop.i 999 +} + +{ .mfi + nop.m 999 +// +// N even and odd: P = P2_1 + P * xsq +// +(p11) fma.s1 V_hi = Tx, Tx1, f1 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N even: Result = sgn_r * tail + T_hi (user rounding mode for C1) +// N odd: Result = sgn_r * tail + C_hi (user rounding mode for C1) +// +(p0) fmpy.s0 fp_tmp = fp_tmp, fp_tmp // Dummy mult to set inexact + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p0) fmpy.s1 CORR = CORR, c + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p12) fnma.s1 V_hi = Cx,V_hi,f1 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N even: V_hi = Tx * Tx1 + 1 +// N odd: Cx1 = 1 - Cx * Cx1 +// +(p0) fmpy.s1 P = P, xsq + nop.i 999 +} + +{ .mfi + nop.m 999 +// +// N even and odd: P = P * xsq +// +(p11) fmpy.s1 V_hi = V_hi, T_hi + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N even and odd: tail = P * tail + V_lo +// +(p11) fmpy.s1 T_hi = sgn_r, T_hi + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p0) fmpy.s1 CORR = CORR, sgn_r + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p12) fmpy.s1 V_hi = V_hi,C_hi + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N even: V_hi = T_hi * V_hi +// N odd: V_hi = C_hi * V_hi +// +(p0) fma.s1 tanx = P, x, x + nop.i 999 +} + +{ .mfi + nop.m 999 +(p12) fnmpy.s1 C_hi = sgn_r, C_hi + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N even: V_lo = 1 - V_hi + C_hi +// N odd: V_lo = 1 - V_hi + T_hi +// +(p11) fadd.s1 CORR = CORR, T_lo + nop.i 999 +} + +{ .mfi + nop.m 999 +(p12) fsub.s1 CORR = CORR, C_lo + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N even and odd: tanx = x + x * P +// N even and odd: Sx = SC_inv * x +// +(p11) fsub.s1 D = C_hi, tanx + nop.i 999 +} + +{ .mfi + nop.m 999 +(p12) fadd.s1 D = T_hi, tanx + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N odd: CORR = SC_inv * C_hi +// N even: CORR = SC_inv * T_hi +// +(p0) fnma.s1 D = V_hi, D, f1 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N even and odd: D = 1 - V_hi * D +// N even and odd: CORR = CORR * c +// +(p0) fma.s1 V_hi = V_hi, D, V_hi + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N even and odd: V_hi = V_hi + V_hi * D +// N even and odd: CORR = sgn_r * CORR +// +(p11) fnma.s1 V_lo = V_hi, C_hi, f1 + nop.i 999 +} + +{ .mfi + nop.m 999 +(p12) fnma.s1 V_lo = V_hi, T_hi, f1 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N even: CORR = COOR + T_lo +// N odd: CORR = CORR - C_lo +// +(p11) fma.s1 V_lo = tanx, V_hi, V_lo + nop.i 999 +} + +{ .mfi + nop.m 999 +(p12) fnma.s1 V_lo = tanx, V_hi, V_lo + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N even: V_lo = V_lo + V_hi * tanx +// N odd: V_lo = V_lo - V_hi * tanx +// +(p11) fnma.s1 V_lo = C_lo, V_hi, V_lo + nop.i 999 +} + +{ .mfi + nop.m 999 +(p12) fnma.s1 V_lo = T_lo, V_hi, V_lo + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N even: V_lo = V_lo - V_hi * C_lo +// N odd: V_lo = V_lo - V_hi * T_lo +// +(p0) fmpy.s1 V_lo = V_hi, V_lo + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N even and odd: V_lo = V_lo * V_hi +// +(p0) fadd.s1 tail = V_hi, V_lo + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N even and odd: tail = V_hi + V_lo +// +(p0) fma.s1 tail = tail, P, V_lo + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N even: T_hi = sgn_r * T_hi +// N odd : C_hi = -sgn_r * C_hi +// +(p0) fma.s1 tail = tail, Sx, CORR + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N even and odd: tail = Sx * tail + CORR +// +(p0) fma.s1 tail = V_hi, Sx, tail + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N even an odd: tail = Sx * V_hi + tail +// +(p11) fma.s0 Result = sgn_r, tail, T_hi + nop.i 999 +} + +{ .mfb + nop.m 999 +(p12) fma.s0 Result = sgn_r, tail, C_hi +(p0) br.ret.sptk b0 ;; +} + +.endp __libm_tan +ASM_SIZE_DIRECTIVE(__libm_tan) + + + +// ******************************************************************* +// ******************************************************************* +// ******************************************************************* +// +// Special Code to handle very large argument case. +// Call int pi_by_2_reduce(&x,&r) +// for |arguments| >= 2**63 +// (Arg or x) is in f8 +// Address to save r and c as double + +// (1) (2) (3) (call) (4) +// sp -> + psp -> + psp -> + sp -> + +// | | | | +// | r50 ->| <- r50 f0 ->| r50 -> | -> c +// | | | | +// sp-32 -> | <- r50 f0 ->| f0 ->| <- r50 r49 -> | -> r +// | | | | +// | r49 ->| <- r49 Arg ->| <- r49 | -> x +// | | | | +// sp -64 ->| sp -64 ->| sp -64 ->| | +// +// save pfs save b0 restore gp +// save gp restore b0 +// restore pfs + + + +.proc __libm_callout +__libm_callout: +TAN_ARG_TOO_LARGE: +.prologue +// (1) +{ .mfi + add GR_Parameter_r =-32,sp // Parameter: r address + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; + +// (2) +{ .mmi + stfe [GR_Parameter_r ] = f0,16 // Clear Parameter r on stack + add GR_Parameter_X = 16,sp // Parameter x address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; + +// (3) +.body +{ .mib + stfe [GR_Parameter_r ] = f0,-16 // Clear Parameter c on stack + nop.i 0 + nop.b 0 +} +{ .mib + stfe [GR_Parameter_X] = Arg // Store Parameter x on stack + nop.i 0 +(p0) br.call.sptk b0=__libm_pi_by_2_reduce# +} +;; + + +// (4) +{ .mmi + mov gp = GR_SAVE_GP // Restore gp +(p0) mov N_fix_gr = r8 + nop.i 999 +} +;; + +{ .mmi +(p0) ldfe Arg =[GR_Parameter_X],16 +(p0) ldfs TWO_TO_NEG2 = [table_ptr2],4 + nop.i 999 +} +;; + + +{ .mmb +(p0) ldfe r =[GR_Parameter_r ],16 +(p0) ldfs NEGTWO_TO_NEG2 = [table_ptr2],4 + nop.b 999 ;; +} + +{ .mfi +(p0) ldfe c =[GR_Parameter_r ] + nop.f 999 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// Is |r| < 2**(-2) +// +(p0) fcmp.lt.unc.s1 p6, p0 = r, TWO_TO_NEG2 + mov b0 = GR_SAVE_B0 // Restore return address +} +;; + +{ .mfi + nop.m 999 +(p6) fcmp.gt.unc.s1 p6, p0 = r, NEGTWO_TO_NEG2 + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs +} +;; + +{ .mbb +.restore sp + add sp = 64,sp // Restore stack pointer +(p6) br.cond.spnt TAN_SMALL_R +(p0) br.cond.sptk TAN_NORMAL_R +} +;; +.endp __libm_callout +ASM_SIZE_DIRECTIVE(__libm_callout) + + +.proc __libm_TAN_SPECIAL +__libm_TAN_SPECIAL: + +// +// Code for NaNs, Unsupporteds, Infs, or +/- zero ? +// Invalid raised for Infs and SNaNs. +// + +{ .mfb + nop.m 999 +(p0) fmpy.s0 Arg = Arg, f0 +(p0) br.ret.sptk b0 +} +.endp __libm_TAN_SPECIAL +ASM_SIZE_DIRECTIVE(__libm_TAN_SPECIAL) + + +.type __libm_pi_by_2_reduce#,@function +.global __libm_pi_by_2_reduce# diff --git a/sysdeps/ia64/fpu/math_ldbl.h b/sysdeps/ia64/fpu/math_ldbl.h new file mode 100644 index 0000000000..475ca795fa --- /dev/null +++ b/sysdeps/ia64/fpu/math_ldbl.h @@ -0,0 +1,100 @@ +#ifndef _MATH_PRIVATE_H_ +#error "Never use directly; include instead." +#endif + +/* A union which permits us to convert between a long double and + three 32 bit ints. */ + +#if __FLOAT_WORD_ORDER == BIG_ENDIAN + +typedef union +{ + long double value; + struct + { + unsigned int empty0:32; + int sign_exponent:16; + unsigned int empty1:16; + u_int32_t msw; + u_int32_t lsw; + } parts; +} ieee_long_double_shape_type; + +#endif + +#if __FLOAT_WORD_ORDER == LITTLE_ENDIAN + +typedef union +{ + long double value; + struct + { + u_int32_t lsw; + u_int32_t msw; + int sign_exponent:16; + unsigned int empty1:16; + unsigned int empty0:32; + } parts; +} ieee_long_double_shape_type; + +#endif + +/* Get three 32 bit ints from a double. */ + +#define GET_LDOUBLE_WORDS(exp,ix0,ix1,d) \ +do { \ + ieee_long_double_shape_type ew_u; \ + ew_u.value = (d); \ + (exp) = ew_u.parts.sign_exponent; \ + (ix0) = ew_u.parts.msw; \ + (ix1) = ew_u.parts.lsw; \ +} while (0) + +/* Set a double from two 32 bit ints. */ + +#define SET_LDOUBLE_WORDS(d,exp,ix0,ix1) \ +do { \ + ieee_long_double_shape_type iw_u; \ + iw_u.parts.sign_exponent = (exp); \ + iw_u.parts.msw = (ix0); \ + iw_u.parts.lsw = (ix1); \ + (d) = iw_u.value; \ +} while (0) + +/* Get the more significant 32 bits of a long double mantissa. */ + +#define GET_LDOUBLE_MSW(v,d) \ +do { \ + ieee_long_double_shape_type sh_u; \ + sh_u.value = (d); \ + (v) = sh_u.parts.msw; \ +} while (0) + +/* Set the more significant 32 bits of a long double mantissa from an int. */ + +#define SET_LDOUBLE_MSW(d,v) \ +do { \ + ieee_long_double_shape_type sh_u; \ + sh_u.value = (d); \ + sh_u.parts.msw = (v); \ + (d) = sh_u.value; \ +} while (0) + +/* Get int from the exponent of a long double. */ + +#define GET_LDOUBLE_EXP(exp,d) \ +do { \ + ieee_long_double_shape_type ge_u; \ + ge_u.value = (d); \ + (exp) = ge_u.parts.sign_exponent; \ +} while (0) + +/* Set exponent of a long double from an int. */ + +#define SET_LDOUBLE_EXP(d,exp) \ +do { \ + ieee_long_double_shape_type se_u; \ + se_u.value = (d); \ + se_u.parts.sign_exponent = (exp); \ + (d) = se_u.value; \ +} while (0) diff --git a/sysdeps/ia64/fpu/mpa.c b/sysdeps/ia64/fpu/mpa.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/mpa.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/mpatan.c b/sysdeps/ia64/fpu/mpatan.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/mpatan.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/mpatan2.c b/sysdeps/ia64/fpu/mpatan2.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/mpatan2.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/mpexp.c b/sysdeps/ia64/fpu/mpexp.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/mpexp.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/mplog.c b/sysdeps/ia64/fpu/mplog.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/mplog.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/mpsqrt.c b/sysdeps/ia64/fpu/mpsqrt.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/mpsqrt.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/mptan.c b/sysdeps/ia64/fpu/mptan.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/mptan.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/printf_fphex.c b/sysdeps/ia64/fpu/printf_fphex.c new file mode 100644 index 0000000000..5def1905d8 --- /dev/null +++ b/sysdeps/ia64/fpu/printf_fphex.c @@ -0,0 +1,81 @@ +/* Print floating point number in hexadecimal notation according to ISO C99. + 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 + 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 LONG_DOUBLE_DENORM_BIAS +# define LONG_DOUBLE_DENORM_BIAS (IEEE854_LONG_DOUBLE_BIAS - 1) +#endif + +#define PRINT_FPHEX_LONG_DOUBLE \ +do { \ + /* The "strange" 80 bit format on ia64 has an explicit \ + leading digit in the 64 bit mantissa. */ \ + unsigned long long int num; \ + \ + num = (((unsigned long long int) fpnum.ldbl.ieee.mantissa0) << 32 \ + | fpnum.ldbl.ieee.mantissa1); \ + \ + zero_mantissa = num == 0; \ + \ + numstr = _itoa_word (num, numbuf + sizeof numbuf, 16, \ + info->spec == 'A'); \ + wnumstr = _itowa_word (num, \ + wnumbuf + sizeof (wnumbuf) / sizeof (wchar_t), \ + 16, info->spec == 'A'); \ + \ + /* Fill with zeroes. */ \ + while (numstr > numbuf + (sizeof numbuf - 64 / 4)) \ + { \ + *--numstr = '0'; \ + *--wnumstr = L'0'; \ + } \ + \ + /* We use a full nibble for the leading digit. */ \ + leading = *numstr++; \ + \ + /* We have 3 bits from the mantissa in the leading nibble. \ + Therefore we are here using `IEEE854_LONG_DOUBLE_BIAS + 3'. */ \ + exponent = fpnum.ldbl.ieee.exponent; \ + \ + if (exponent == 0) \ + { \ + if (zero_mantissa) \ + expnegative = 0; \ + else \ + { \ + /* This is a denormalized number. */ \ + expnegative = 1; \ + /* This is a hook for the m68k long double format, where the \ + exponent bias is the same for normalized and denormalized \ + numbers. */ \ + exponent = LONG_DOUBLE_DENORM_BIAS + 3; \ + } \ + } \ + else if (exponent >= IEEE854_LONG_DOUBLE_BIAS + 3) \ + { \ + expnegative = 0; \ + exponent -= IEEE854_LONG_DOUBLE_BIAS + 3; \ + } \ + else \ + { \ + expnegative = 1; \ + exponent = -(exponent - (IEEE854_LONG_DOUBLE_BIAS + 3)); \ + } \ +} while (0) + +#include diff --git a/sysdeps/ia64/fpu/s_asinh.S b/sysdeps/ia64/fpu/s_asinh.S new file mode 100644 index 0000000000..7eba39eb40 --- /dev/null +++ b/sysdeps/ia64/fpu/s_asinh.S @@ -0,0 +1,1138 @@ +.file "asinh.s" + + +// Copyright (c) 2000 - 2005, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// ============================================================== +// History +// ============================================================== +// 04/02/01 Initial version +// 04/19/01 Improved speed of the paths #1,2,3,4,5 +// 10/18/01 Improved accuracy +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/06/03 Reordered header: .section, .global, .proc, .align +// 05/21/03 Improved performance, fixed to handle unorms +// 03/31/05 Reformatted delimiters between data tables +// +// API +// ============================================================== +// double asinh(double) +// +// Overview of operation +// ============================================================== +// +// There are 7 paths: +// 1. x = 0.0 +// Return asinh(x) = 0.0 +// +// 2. 0.0 <|x| < 2^(-3) +// Return asinh(x) = POL13(x), +// where POL13(x) = (x^2*C13 + ...)*x^2 + C5)*x^2 + C3)*x^3 + x +// +// 3. 2^(-3) <= |x| < 2^63 +// Return asinh(x) = sign(x)*(log(|x| + sqrt(x^2 + 1.0))) +// To compute x + sqrt(x^2 + 1.0) modified Newton Raphson method is used +// (3 iterations) +// Algorithm description for log function see below. +// +// 4. 2^63 <= |x| < +INF +// Return asinh(x) = sign(x)*log(2*|x|) +// Algorithm description for log function see below. +// +// 5. x = INF +// Return asinh(x) = INF +// +// 6. x = [S,Q]NaN +// Return asinh(x) = QNaN +// +// 7. x = denormal +// Return asinh(x) = x correctly rounded +// +//============================================================== +// Algorithm Description for log(x) function +// Below we are using the fact that inequality x - 1.0 > 2^(-6) is always +// true for this asinh implementation +// +// Consider x = 2^N 1.f1 f2 f3 f4...f63 +// Log(x) = log(frcpa(x) x/frcpa(x)) +// = log(1/frcpa(x)) + log(frcpa(x) x) +// = -log(frcpa(x)) + log(frcpa(x) x) +// +// frcpa(x) = 2^-N frcpa((1.f1 f2 ... f63) +// +// -log(frcpa(x)) = -log(C) +// = -log(2^-N) - log(frcpa(1.f1 f2 ... f63)) +// +// -log(frcpa(x)) = -log(C) +// = +Nlog2 - log(frcpa(1.f1 f2 ... f63)) +// +// -log(frcpa(x)) = -log(C) +// = +Nlog2 + log(frcpa(1.f1 f2 ... f63)) +// +// Log(x) = log(1/frcpa(x)) + log(frcpa(x) x) +// +// Log(x) = +Nlog2 + log(1./frcpa(1.f1 f2 ... f63)) + log(frcpa(x) x) +// Log(x) = +Nlog2 - log(/frcpa(1.f1 f2 ... f63)) + log(frcpa(x) x) +// Log(x) = +Nlog2 + T + log(frcpa(x) x) +// +// Log(x) = +Nlog2 + T + log(C x) +// +// Cx = 1 + r +// +// Log(x) = +Nlog2 + T + log(1+r) +// Log(x) = +Nlog2 + T + Series( r - r^2/2 + r^3/3 - r^4/4 ....) +// +// 1.f1 f2 ... f8 has 256 entries. +// They are 1 + k/2^8, k = 0 ... 255 +// These 256 values are the table entries. +// +// Implementation +//============================================================== +// C = frcpa(x) +// r = C * x - 1 +// +// Form rseries = r + P1*r^2 + P2*r^3 + P3*r^4 + P4*r^5 + P5*r^6 +// +// x = f * 2*n where f is 1.f_1f_2f_3....f_63 +// Nfloat = float(n) where n is the true unbiased exponent +// pre-index = f_1f_2....f_8 +// index = pre_index * 16 +// get the dxt table entry at index + offset = T +// +// result = (T + Nfloat * log(2)) + rseries +// +// The T table is calculated as follows +// Form x_k = 1 + k/2^8 where k goes from 0... 255 +// y_k = frcpa(x_k) +// log(1/y_k) in quad and round to double-extended +// +// +// Registers used +//============================================================== +// Floating Point registers used: +// f8, input +// f9 -> f15, f32 -> f68 + +// General registers used: +// r14 -> r27 + +// Predicate registers used: +// p6 -> p14 + +// p6 to filter out case when x = [Q,S]NaN or INF or zero +// p7 to filter out case when x < 0.0 +// p8 to select path #2 +// p9 used in the frcpa from path #3 +// p11 to filter out case when x >= 0 +// p12 to filter out case when x = unorm +// p13 to select path #4 +// Assembly macros +//============================================================== +log_GR_exp_17_ones = r14 +log_GR_signexp_f8 = r15 +log_table_address2 = r16 +log_GR_exp_16_ones = r17 +log_GR_exp_f8 = r18 +log_GR_true_exp_f8 = r19 +log_GR_significand_f8 = r20 +log_GR_index = r21 +log_GR_comp2 = r22 +asinh_GR_f8 = r23 +asinh_GR_comp = r24 +asinh_GR_f8 = r25 +log_table_address3 = r26 +NR_table_address = r27 + +//============================================================== +log_y = f9 +NR1 = f10 +NR2 = f11 +log_y_rs = f12 +log_y_rs_iter = f13 +log_y_rs_iter1 = f14 +fNormX = f15 +asinh_w_sq = f32 +log_C13 = f33 +log_C11 = f34 +log_P3 = f35 +log_P2 = f36 +log_P1 = f37 +log_P5 = f38 +log_P4 = f39 +log_C3 = f40 +log_C5 = f41 +log_C7 = f42 +log2 = f43 +asinh_f8 = f44 +log_C = f45 +log_arg = f46 +log_C9 = f47 +asinh_w_four = f48 +log_int_Nfloat = f49 +log_r = f50 +log_rsq = f51 +log_rp_p4 = f52 +log_rp_p32 = f53 +log_rcube = f54 +log_rp_p10 = f55 +log_rp_p2 = f56 +log_Nfloat = f57 +log_T = f58 +log_r2P_r = f59 +log_T_plus_Nlog2 = f60 +asinh_w_3 = f61 +asinh_w_5 = f62 +asinh_w_cube = f63 +asinh_w_7 = f64 +log_arg_early = f65 +asinh_w_9 = f66 +asinh_w_13 = f67 +asinh_w_seven = f68 + +// Data tables +//============================================================== + +RODATA +.align 16 + +LOCAL_OBJECT_START(log_table_1) +data8 0xBFC5555DA7212371 // P5 +data8 0x3FC999A19EEF5826 // P4 +data8 0xBFCFFFFFFFFEF009 // P3 +data8 0x3FD555555554ECB2 // P2 +data8 0xBFE0000000000000 // P1 = -0.5 +data8 0x0000000000000000 // pad +data8 0xb17217f7d1cf79ac, 0x00003ffe // log2 +LOCAL_OBJECT_END(log_table_1) + +LOCAL_OBJECT_START(log_table_2) +data8 0x3FE0000000000000 // 0.5 +data8 0x4008000000000000 // 3.0 +// +data8 0x8824BE4D74BC4F00, 0x00003FF9 // C13 +data8 0xB725A2CD9556CC57, 0x0000BFF9 // C11 +data8 0xF8E339127FBFF49D, 0x00003FF9 // C9 +data8 0xB6DB6D7DCE17CB78, 0x0000BFFA // C7 +data8 0x999999998802CCEF, 0x00003FFB // C5 +data8 0xAAAAAAAAAAA8DC40, 0x0000BFFC // C3 +LOCAL_OBJECT_END(log_table_2) + + +LOCAL_OBJECT_START(log_table_3) +data8 0x80200aaeac44ef38 , 0x00003ff6 // log(1/frcpa(1+ 0/2^-8)) +// +data8 0xc09090a2c35aa070 , 0x00003ff7 // log(1/frcpa(1+ 1/2^-8)) +data8 0xa0c94fcb41977c75 , 0x00003ff8 // log(1/frcpa(1+ 2/2^-8)) +data8 0xe18b9c263af83301 , 0x00003ff8 // log(1/frcpa(1+ 3/2^-8)) +data8 0x8d35c8d6399c30ea , 0x00003ff9 // log(1/frcpa(1+ 4/2^-8)) +data8 0xadd4d2ecd601cbb8 , 0x00003ff9 // log(1/frcpa(1+ 5/2^-8)) +// +data8 0xce95403a192f9f01 , 0x00003ff9 // log(1/frcpa(1+ 6/2^-8)) +data8 0xeb59392cbcc01096 , 0x00003ff9 // log(1/frcpa(1+ 7/2^-8)) +data8 0x862c7d0cefd54c5d , 0x00003ffa // log(1/frcpa(1+ 8/2^-8)) +data8 0x94aa63c65e70d499 , 0x00003ffa // log(1/frcpa(1+ 9/2^-8)) +data8 0xa54a696d4b62b382 , 0x00003ffa // log(1/frcpa(1+ 10/2^-8)) +// +data8 0xb3e4a796a5dac208 , 0x00003ffa // log(1/frcpa(1+ 11/2^-8)) +data8 0xc28c45b1878340a9 , 0x00003ffa // log(1/frcpa(1+ 12/2^-8)) +data8 0xd35c55f39d7a6235 , 0x00003ffa // log(1/frcpa(1+ 13/2^-8)) +data8 0xe220f037b954f1f5 , 0x00003ffa // log(1/frcpa(1+ 14/2^-8)) +data8 0xf0f3389b036834f3 , 0x00003ffa // log(1/frcpa(1+ 15/2^-8)) +// +data8 0xffd3488d5c980465 , 0x00003ffa // log(1/frcpa(1+ 16/2^-8)) +data8 0x87609ce2ed300490 , 0x00003ffb // log(1/frcpa(1+ 17/2^-8)) +data8 0x8ede9321e8c85927 , 0x00003ffb // log(1/frcpa(1+ 18/2^-8)) +data8 0x96639427f2f8e2f4 , 0x00003ffb // log(1/frcpa(1+ 19/2^-8)) +data8 0x9defad3e8f73217b , 0x00003ffb // log(1/frcpa(1+ 20/2^-8)) +// +data8 0xa582ebd50097029c , 0x00003ffb // log(1/frcpa(1+ 21/2^-8)) +data8 0xac06dbe75ab80fee , 0x00003ffb // log(1/frcpa(1+ 22/2^-8)) +data8 0xb3a78449b2d3ccca , 0x00003ffb // log(1/frcpa(1+ 23/2^-8)) +data8 0xbb4f79635ab46bb2 , 0x00003ffb // log(1/frcpa(1+ 24/2^-8)) +data8 0xc2fec93a83523f3f , 0x00003ffb // log(1/frcpa(1+ 25/2^-8)) +// +data8 0xc99af2eaca4c4571 , 0x00003ffb // log(1/frcpa(1+ 26/2^-8)) +data8 0xd1581106472fa653 , 0x00003ffb // log(1/frcpa(1+ 27/2^-8)) +data8 0xd8002560d4355f2e , 0x00003ffb // log(1/frcpa(1+ 28/2^-8)) +data8 0xdfcb43b4fe508632 , 0x00003ffb // log(1/frcpa(1+ 29/2^-8)) +data8 0xe67f6dff709d4119 , 0x00003ffb // log(1/frcpa(1+ 30/2^-8)) +// +data8 0xed393b1c22351280 , 0x00003ffb // log(1/frcpa(1+ 31/2^-8)) +data8 0xf5192bff087bcc35 , 0x00003ffb // log(1/frcpa(1+ 32/2^-8)) +data8 0xfbdf4ff6dfef2fa3 , 0x00003ffb // log(1/frcpa(1+ 33/2^-8)) +data8 0x81559a97f92f9cc7 , 0x00003ffc // log(1/frcpa(1+ 34/2^-8)) +data8 0x84be72bce90266e8 , 0x00003ffc // log(1/frcpa(1+ 35/2^-8)) +// +data8 0x88bc74113f23def2 , 0x00003ffc // log(1/frcpa(1+ 36/2^-8)) +data8 0x8c2ba3edf6799d11 , 0x00003ffc // log(1/frcpa(1+ 37/2^-8)) +data8 0x8f9dc92f92ea08b1 , 0x00003ffc // log(1/frcpa(1+ 38/2^-8)) +data8 0x9312e8f36efab5a7 , 0x00003ffc // log(1/frcpa(1+ 39/2^-8)) +data8 0x968b08643409ceb6 , 0x00003ffc // log(1/frcpa(1+ 40/2^-8)) +// +data8 0x9a062cba08a1708c , 0x00003ffc // log(1/frcpa(1+ 41/2^-8)) +data8 0x9d845b3abf95485c , 0x00003ffc // log(1/frcpa(1+ 42/2^-8)) +data8 0xa06fd841bc001bb4 , 0x00003ffc // log(1/frcpa(1+ 43/2^-8)) +data8 0xa3f3a74652fbe0db , 0x00003ffc // log(1/frcpa(1+ 44/2^-8)) +data8 0xa77a8fb2336f20f5 , 0x00003ffc // log(1/frcpa(1+ 45/2^-8)) +// +data8 0xab0497015d28b0a0 , 0x00003ffc // log(1/frcpa(1+ 46/2^-8)) +data8 0xae91c2be6ba6a615 , 0x00003ffc // log(1/frcpa(1+ 47/2^-8)) +data8 0xb189d1b99aebb20b , 0x00003ffc // log(1/frcpa(1+ 48/2^-8)) +data8 0xb51cced5de9c1b2c , 0x00003ffc // log(1/frcpa(1+ 49/2^-8)) +data8 0xb819bee9e720d42f , 0x00003ffc // log(1/frcpa(1+ 50/2^-8)) +// +data8 0xbbb2a0947b093a5d , 0x00003ffc // log(1/frcpa(1+ 51/2^-8)) +data8 0xbf4ec1505811684a , 0x00003ffc // log(1/frcpa(1+ 52/2^-8)) +data8 0xc2535bacfa8975ff , 0x00003ffc // log(1/frcpa(1+ 53/2^-8)) +data8 0xc55a3eafad187eb8 , 0x00003ffc // log(1/frcpa(1+ 54/2^-8)) +data8 0xc8ff2484b2c0da74 , 0x00003ffc // log(1/frcpa(1+ 55/2^-8)) +// +data8 0xcc0b1a008d53ab76 , 0x00003ffc // log(1/frcpa(1+ 56/2^-8)) +data8 0xcfb6203844b3209b , 0x00003ffc // log(1/frcpa(1+ 57/2^-8)) +data8 0xd2c73949a47a19f5 , 0x00003ffc // log(1/frcpa(1+ 58/2^-8)) +data8 0xd5daae18b49d6695 , 0x00003ffc // log(1/frcpa(1+ 59/2^-8)) +data8 0xd8f08248cf7e8019 , 0x00003ffc // log(1/frcpa(1+ 60/2^-8)) +// +data8 0xdca7749f1b3e540e , 0x00003ffc // log(1/frcpa(1+ 61/2^-8)) +data8 0xdfc28e033aaaf7c7 , 0x00003ffc // log(1/frcpa(1+ 62/2^-8)) +data8 0xe2e012a5f91d2f55 , 0x00003ffc // log(1/frcpa(1+ 63/2^-8)) +data8 0xe600064ed9e292a8 , 0x00003ffc // log(1/frcpa(1+ 64/2^-8)) +data8 0xe9226cce42b39f60 , 0x00003ffc // log(1/frcpa(1+ 65/2^-8)) +// +data8 0xec4749fd97a28360 , 0x00003ffc // log(1/frcpa(1+ 66/2^-8)) +data8 0xef6ea1bf57780495 , 0x00003ffc // log(1/frcpa(1+ 67/2^-8)) +data8 0xf29877ff38809091 , 0x00003ffc // log(1/frcpa(1+ 68/2^-8)) +data8 0xf5c4d0b245cb89be , 0x00003ffc // log(1/frcpa(1+ 69/2^-8)) +data8 0xf8f3afd6fcdef3aa , 0x00003ffc // log(1/frcpa(1+ 70/2^-8)) +// +data8 0xfc2519756be1abc7 , 0x00003ffc // log(1/frcpa(1+ 71/2^-8)) +data8 0xff59119f503e6832 , 0x00003ffc // log(1/frcpa(1+ 72/2^-8)) +data8 0x8147ce381ae0e146 , 0x00003ffd // log(1/frcpa(1+ 73/2^-8)) +data8 0x82e45f06cb1ad0f2 , 0x00003ffd // log(1/frcpa(1+ 74/2^-8)) +data8 0x842f5c7c573cbaa2 , 0x00003ffd // log(1/frcpa(1+ 75/2^-8)) +// +data8 0x85ce471968c8893a , 0x00003ffd // log(1/frcpa(1+ 76/2^-8)) +data8 0x876e8305bc04066d , 0x00003ffd // log(1/frcpa(1+ 77/2^-8)) +data8 0x891012678031fbb3 , 0x00003ffd // log(1/frcpa(1+ 78/2^-8)) +data8 0x8a5f1493d766a05f , 0x00003ffd // log(1/frcpa(1+ 79/2^-8)) +data8 0x8c030c778c56fa00 , 0x00003ffd // log(1/frcpa(1+ 80/2^-8)) +// +data8 0x8da85df17e31d9ae , 0x00003ffd // log(1/frcpa(1+ 81/2^-8)) +data8 0x8efa663e7921687e , 0x00003ffd // log(1/frcpa(1+ 82/2^-8)) +data8 0x90a22b6875c6a1f8 , 0x00003ffd // log(1/frcpa(1+ 83/2^-8)) +data8 0x91f62cc8f5d24837 , 0x00003ffd // log(1/frcpa(1+ 84/2^-8)) +data8 0x93a06cfc3857d980 , 0x00003ffd // log(1/frcpa(1+ 85/2^-8)) +// +data8 0x94f66d5e6fd01ced , 0x00003ffd // log(1/frcpa(1+ 86/2^-8)) +data8 0x96a330156e6772f2 , 0x00003ffd // log(1/frcpa(1+ 87/2^-8)) +data8 0x97fb3582754ea25b , 0x00003ffd // log(1/frcpa(1+ 88/2^-8)) +data8 0x99aa8259aad1bbf2 , 0x00003ffd // log(1/frcpa(1+ 89/2^-8)) +data8 0x9b0492f6227ae4a8 , 0x00003ffd // log(1/frcpa(1+ 90/2^-8)) +// +data8 0x9c5f8e199bf3a7a5 , 0x00003ffd // log(1/frcpa(1+ 91/2^-8)) +data8 0x9e1293b9998c1daa , 0x00003ffd // log(1/frcpa(1+ 92/2^-8)) +data8 0x9f6fa31e0b41f308 , 0x00003ffd // log(1/frcpa(1+ 93/2^-8)) +data8 0xa0cda11eaf46390e , 0x00003ffd // log(1/frcpa(1+ 94/2^-8)) +data8 0xa22c8f029cfa45aa , 0x00003ffd // log(1/frcpa(1+ 95/2^-8)) +// +data8 0xa3e48badb7856b34 , 0x00003ffd // log(1/frcpa(1+ 96/2^-8)) +data8 0xa5459a0aa95849f9 , 0x00003ffd // log(1/frcpa(1+ 97/2^-8)) +data8 0xa6a79c84480cfebd , 0x00003ffd // log(1/frcpa(1+ 98/2^-8)) +data8 0xa80a946d0fcb3eb2 , 0x00003ffd // log(1/frcpa(1+ 99/2^-8)) +data8 0xa96e831a3ea7b314 , 0x00003ffd // log(1/frcpa(1+100/2^-8)) +// +data8 0xaad369e3dc544e3b , 0x00003ffd // log(1/frcpa(1+101/2^-8)) +data8 0xac92e9588952c815 , 0x00003ffd // log(1/frcpa(1+102/2^-8)) +data8 0xadfa035aa1ed8fdc , 0x00003ffd // log(1/frcpa(1+103/2^-8)) +data8 0xaf6219eae1ad6e34 , 0x00003ffd // log(1/frcpa(1+104/2^-8)) +data8 0xb0cb2e6d8160f753 , 0x00003ffd // log(1/frcpa(1+105/2^-8)) +// +data8 0xb2354249ad950f72 , 0x00003ffd // log(1/frcpa(1+106/2^-8)) +data8 0xb3a056e98ef4a3b4 , 0x00003ffd // log(1/frcpa(1+107/2^-8)) +data8 0xb50c6dba52c6292a , 0x00003ffd // log(1/frcpa(1+108/2^-8)) +data8 0xb679882c33876165 , 0x00003ffd // log(1/frcpa(1+109/2^-8)) +data8 0xb78c07429785cedc , 0x00003ffd // log(1/frcpa(1+110/2^-8)) +// +data8 0xb8faeb8dc4a77d24 , 0x00003ffd // log(1/frcpa(1+111/2^-8)) +data8 0xba6ad77eb36ae0d6 , 0x00003ffd // log(1/frcpa(1+112/2^-8)) +data8 0xbbdbcc915e9bee50 , 0x00003ffd // log(1/frcpa(1+113/2^-8)) +data8 0xbd4dcc44f8cf12ef , 0x00003ffd // log(1/frcpa(1+114/2^-8)) +data8 0xbec0d81bf5b531fa , 0x00003ffd // log(1/frcpa(1+115/2^-8)) +// +data8 0xc034f19c139186f4 , 0x00003ffd // log(1/frcpa(1+116/2^-8)) +data8 0xc14cb69f7c5e55ab , 0x00003ffd // log(1/frcpa(1+117/2^-8)) +data8 0xc2c2abbb6e5fd56f , 0x00003ffd // log(1/frcpa(1+118/2^-8)) +data8 0xc439b2c193e6771e , 0x00003ffd // log(1/frcpa(1+119/2^-8)) +data8 0xc553acb9d5c67733 , 0x00003ffd // log(1/frcpa(1+120/2^-8)) +// +data8 0xc6cc96e441272441 , 0x00003ffd // log(1/frcpa(1+121/2^-8)) +data8 0xc8469753eca88c30 , 0x00003ffd // log(1/frcpa(1+122/2^-8)) +data8 0xc962cf3ce072b05c , 0x00003ffd // log(1/frcpa(1+123/2^-8)) +data8 0xcadeba8771f694aa , 0x00003ffd // log(1/frcpa(1+124/2^-8)) +data8 0xcc5bc08d1f72da94 , 0x00003ffd // log(1/frcpa(1+125/2^-8)) +// +data8 0xcd7a3f99ea035c29 , 0x00003ffd // log(1/frcpa(1+126/2^-8)) +data8 0xcef93860c8a53c35 , 0x00003ffd // log(1/frcpa(1+127/2^-8)) +data8 0xd0192f68a7ed23df , 0x00003ffd // log(1/frcpa(1+128/2^-8)) +data8 0xd19a201127d3c645 , 0x00003ffd // log(1/frcpa(1+129/2^-8)) +data8 0xd2bb92f4061c172c , 0x00003ffd // log(1/frcpa(1+130/2^-8)) +// +data8 0xd43e80b2ee8cc8fc , 0x00003ffd // log(1/frcpa(1+131/2^-8)) +data8 0xd56173601fc4ade4 , 0x00003ffd // log(1/frcpa(1+132/2^-8)) +data8 0xd6e6637efb54086f , 0x00003ffd // log(1/frcpa(1+133/2^-8)) +data8 0xd80ad9f58f3c8193 , 0x00003ffd // log(1/frcpa(1+134/2^-8)) +data8 0xd991d1d31aca41f8 , 0x00003ffd // log(1/frcpa(1+135/2^-8)) +// +data8 0xdab7d02231484a93 , 0x00003ffd // log(1/frcpa(1+136/2^-8)) +data8 0xdc40d532cde49a54 , 0x00003ffd // log(1/frcpa(1+137/2^-8)) +data8 0xdd685f79ed8b265e , 0x00003ffd // log(1/frcpa(1+138/2^-8)) +data8 0xde9094bbc0e17b1d , 0x00003ffd // log(1/frcpa(1+139/2^-8)) +data8 0xe01c91b78440c425 , 0x00003ffd // log(1/frcpa(1+140/2^-8)) +// +data8 0xe14658f26997e729 , 0x00003ffd // log(1/frcpa(1+141/2^-8)) +data8 0xe270cdc2391e0d23 , 0x00003ffd // log(1/frcpa(1+142/2^-8)) +data8 0xe3ffce3a2aa64922 , 0x00003ffd // log(1/frcpa(1+143/2^-8)) +data8 0xe52bdb274ed82887 , 0x00003ffd // log(1/frcpa(1+144/2^-8)) +data8 0xe6589852e75d7df6 , 0x00003ffd // log(1/frcpa(1+145/2^-8)) +// +data8 0xe786068c79937a7d , 0x00003ffd // log(1/frcpa(1+146/2^-8)) +data8 0xe91903adad100911 , 0x00003ffd // log(1/frcpa(1+147/2^-8)) +data8 0xea481236f7d35bb0 , 0x00003ffd // log(1/frcpa(1+148/2^-8)) +data8 0xeb77d48c692e6b14 , 0x00003ffd // log(1/frcpa(1+149/2^-8)) +data8 0xeca84b83d7297b87 , 0x00003ffd // log(1/frcpa(1+150/2^-8)) +// +data8 0xedd977f4962aa158 , 0x00003ffd // log(1/frcpa(1+151/2^-8)) +data8 0xef7179a22f257754 , 0x00003ffd // log(1/frcpa(1+152/2^-8)) +data8 0xf0a450d139366ca7 , 0x00003ffd // log(1/frcpa(1+153/2^-8)) +data8 0xf1d7e0524ff9ffdb , 0x00003ffd // log(1/frcpa(1+154/2^-8)) +data8 0xf30c29036a8b6cae , 0x00003ffd // log(1/frcpa(1+155/2^-8)) +// +data8 0xf4412bc411ea8d92 , 0x00003ffd // log(1/frcpa(1+156/2^-8)) +data8 0xf576e97564c8619d , 0x00003ffd // log(1/frcpa(1+157/2^-8)) +data8 0xf6ad62fa1b5f172f , 0x00003ffd // log(1/frcpa(1+158/2^-8)) +data8 0xf7e499368b55c542 , 0x00003ffd // log(1/frcpa(1+159/2^-8)) +data8 0xf91c8d10abaffe22 , 0x00003ffd // log(1/frcpa(1+160/2^-8)) +// +data8 0xfa553f7018c966f3 , 0x00003ffd // log(1/frcpa(1+161/2^-8)) +data8 0xfb8eb13e185d802c , 0x00003ffd // log(1/frcpa(1+162/2^-8)) +data8 0xfcc8e3659d9bcbed , 0x00003ffd // log(1/frcpa(1+163/2^-8)) +data8 0xfe03d6d34d487fd2 , 0x00003ffd // log(1/frcpa(1+164/2^-8)) +data8 0xff3f8c7581e9f0ae , 0x00003ffd // log(1/frcpa(1+165/2^-8)) +// +data8 0x803e029e280173ae , 0x00003ffe // log(1/frcpa(1+166/2^-8)) +data8 0x80dca10cc52d0757 , 0x00003ffe // log(1/frcpa(1+167/2^-8)) +data8 0x817ba200632755a1 , 0x00003ffe // log(1/frcpa(1+168/2^-8)) +data8 0x821b05f3b01d6774 , 0x00003ffe // log(1/frcpa(1+169/2^-8)) +data8 0x82bacd623ff19d06 , 0x00003ffe // log(1/frcpa(1+170/2^-8)) +// +data8 0x835af8c88e7a8f47 , 0x00003ffe // log(1/frcpa(1+171/2^-8)) +data8 0x83c5f8299e2b4091 , 0x00003ffe // log(1/frcpa(1+172/2^-8)) +data8 0x8466cb43f3d87300 , 0x00003ffe // log(1/frcpa(1+173/2^-8)) +data8 0x850803a67c80ca4b , 0x00003ffe // log(1/frcpa(1+174/2^-8)) +data8 0x85a9a1d11a23b461 , 0x00003ffe // log(1/frcpa(1+175/2^-8)) +// +data8 0x864ba644a18e6e05 , 0x00003ffe // log(1/frcpa(1+176/2^-8)) +data8 0x86ee1182dcc432f7 , 0x00003ffe // log(1/frcpa(1+177/2^-8)) +data8 0x875a925d7e48c316 , 0x00003ffe // log(1/frcpa(1+178/2^-8)) +data8 0x87fdaa109d23aef7 , 0x00003ffe // log(1/frcpa(1+179/2^-8)) +data8 0x88a129ed4becfaf2 , 0x00003ffe // log(1/frcpa(1+180/2^-8)) +// +data8 0x89451278ecd7f9cf , 0x00003ffe // log(1/frcpa(1+181/2^-8)) +data8 0x89b29295f8432617 , 0x00003ffe // log(1/frcpa(1+182/2^-8)) +data8 0x8a572ac5a5496882 , 0x00003ffe // log(1/frcpa(1+183/2^-8)) +data8 0x8afc2d0ce3b2dadf , 0x00003ffe // log(1/frcpa(1+184/2^-8)) +data8 0x8b6a69c608cfd3af , 0x00003ffe // log(1/frcpa(1+185/2^-8)) +// +data8 0x8c101e106e899a83 , 0x00003ffe // log(1/frcpa(1+186/2^-8)) +data8 0x8cb63de258f9d626 , 0x00003ffe // log(1/frcpa(1+187/2^-8)) +data8 0x8d2539c5bd19e2b1 , 0x00003ffe // log(1/frcpa(1+188/2^-8)) +data8 0x8dcc0e064b29e6f1 , 0x00003ffe // log(1/frcpa(1+189/2^-8)) +data8 0x8e734f45d88357ae , 0x00003ffe // log(1/frcpa(1+190/2^-8)) +// +data8 0x8ee30cef034a20db , 0x00003ffe // log(1/frcpa(1+191/2^-8)) +data8 0x8f8b0515686d1d06 , 0x00003ffe // log(1/frcpa(1+192/2^-8)) +data8 0x90336bba039bf32f , 0x00003ffe // log(1/frcpa(1+193/2^-8)) +data8 0x90a3edd23d1c9d58 , 0x00003ffe // log(1/frcpa(1+194/2^-8)) +data8 0x914d0de2f5d61b32 , 0x00003ffe // log(1/frcpa(1+195/2^-8)) +// +data8 0x91be0c20d28173b5 , 0x00003ffe // log(1/frcpa(1+196/2^-8)) +data8 0x9267e737c06cd34a , 0x00003ffe // log(1/frcpa(1+197/2^-8)) +data8 0x92d962ae6abb1237 , 0x00003ffe // log(1/frcpa(1+198/2^-8)) +data8 0x9383fa6afbe2074c , 0x00003ffe // log(1/frcpa(1+199/2^-8)) +data8 0x942f0421651c1c4e , 0x00003ffe // log(1/frcpa(1+200/2^-8)) +// +data8 0x94a14a3845bb985e , 0x00003ffe // log(1/frcpa(1+201/2^-8)) +data8 0x954d133857f861e7 , 0x00003ffe // log(1/frcpa(1+202/2^-8)) +data8 0x95bfd96468e604c4 , 0x00003ffe // log(1/frcpa(1+203/2^-8)) +data8 0x9632d31cafafa858 , 0x00003ffe // log(1/frcpa(1+204/2^-8)) +data8 0x96dfaabd86fa1647 , 0x00003ffe // log(1/frcpa(1+205/2^-8)) +// +data8 0x9753261fcbb2a594 , 0x00003ffe // log(1/frcpa(1+206/2^-8)) +data8 0x9800c11b426b996d , 0x00003ffe // log(1/frcpa(1+207/2^-8)) +data8 0x9874bf4d45ae663c , 0x00003ffe // log(1/frcpa(1+208/2^-8)) +data8 0x99231f5ee9a74f79 , 0x00003ffe // log(1/frcpa(1+209/2^-8)) +data8 0x9997a18a56bcad28 , 0x00003ffe // log(1/frcpa(1+210/2^-8)) +// +data8 0x9a46c873a3267e79 , 0x00003ffe // log(1/frcpa(1+211/2^-8)) +data8 0x9abbcfc621eb6cb6 , 0x00003ffe // log(1/frcpa(1+212/2^-8)) +data8 0x9b310cb0d354c990 , 0x00003ffe // log(1/frcpa(1+213/2^-8)) +data8 0x9be14cf9e1b3515c , 0x00003ffe // log(1/frcpa(1+214/2^-8)) +data8 0x9c5710b8cbb73a43 , 0x00003ffe // log(1/frcpa(1+215/2^-8)) +// +data8 0x9ccd0abd301f399c , 0x00003ffe // log(1/frcpa(1+216/2^-8)) +data8 0x9d7e67f3bdce8888 , 0x00003ffe // log(1/frcpa(1+217/2^-8)) +data8 0x9df4ea81a99daa01 , 0x00003ffe // log(1/frcpa(1+218/2^-8)) +data8 0x9e6ba405a54514ba , 0x00003ffe // log(1/frcpa(1+219/2^-8)) +data8 0x9f1e21c8c7bb62b3 , 0x00003ffe // log(1/frcpa(1+220/2^-8)) +// +data8 0x9f956593f6b6355c , 0x00003ffe // log(1/frcpa(1+221/2^-8)) +data8 0xa00ce1092e5498c3 , 0x00003ffe // log(1/frcpa(1+222/2^-8)) +data8 0xa0c08309c4b912c1 , 0x00003ffe // log(1/frcpa(1+223/2^-8)) +data8 0xa1388a8c6faa2afa , 0x00003ffe // log(1/frcpa(1+224/2^-8)) +data8 0xa1b0ca7095b5f985 , 0x00003ffe // log(1/frcpa(1+225/2^-8)) +// +data8 0xa22942eb47534a00 , 0x00003ffe // log(1/frcpa(1+226/2^-8)) +data8 0xa2de62326449d0a3 , 0x00003ffe // log(1/frcpa(1+227/2^-8)) +data8 0xa357690f88bfe345 , 0x00003ffe // log(1/frcpa(1+228/2^-8)) +data8 0xa3d0a93f45169a4b , 0x00003ffe // log(1/frcpa(1+229/2^-8)) +data8 0xa44a22f7ffe65f30 , 0x00003ffe // log(1/frcpa(1+230/2^-8)) +// +data8 0xa500c5e5b4c1aa36 , 0x00003ffe // log(1/frcpa(1+231/2^-8)) +data8 0xa57ad064eb2ebbc2 , 0x00003ffe // log(1/frcpa(1+232/2^-8)) +data8 0xa5f5152dedf4384e , 0x00003ffe // log(1/frcpa(1+233/2^-8)) +data8 0xa66f9478856233ec , 0x00003ffe // log(1/frcpa(1+234/2^-8)) +data8 0xa6ea4e7cca02c32e , 0x00003ffe // log(1/frcpa(1+235/2^-8)) +// +data8 0xa765437325341ccf , 0x00003ffe // log(1/frcpa(1+236/2^-8)) +data8 0xa81e21e6c75b4020 , 0x00003ffe // log(1/frcpa(1+237/2^-8)) +data8 0xa899ab333fe2b9ca , 0x00003ffe // log(1/frcpa(1+238/2^-8)) +data8 0xa9157039c51ebe71 , 0x00003ffe // log(1/frcpa(1+239/2^-8)) +data8 0xa991713433c2b999 , 0x00003ffe // log(1/frcpa(1+240/2^-8)) +// +data8 0xaa0dae5cbcc048b3 , 0x00003ffe // log(1/frcpa(1+241/2^-8)) +data8 0xaa8a27ede5eb13ad , 0x00003ffe // log(1/frcpa(1+242/2^-8)) +data8 0xab06de228a9e3499 , 0x00003ffe // log(1/frcpa(1+243/2^-8)) +data8 0xab83d135dc633301 , 0x00003ffe // log(1/frcpa(1+244/2^-8)) +data8 0xac3fb076adc7fe7a , 0x00003ffe // log(1/frcpa(1+245/2^-8)) +// +data8 0xacbd3cbbe47988f1 , 0x00003ffe // log(1/frcpa(1+246/2^-8)) +data8 0xad3b06b1a5dc57c3 , 0x00003ffe // log(1/frcpa(1+247/2^-8)) +data8 0xadb90e94af887717 , 0x00003ffe // log(1/frcpa(1+248/2^-8)) +data8 0xae3754a218f7c816 , 0x00003ffe // log(1/frcpa(1+249/2^-8)) +data8 0xaeb5d9175437afa2 , 0x00003ffe // log(1/frcpa(1+250/2^-8)) +// +data8 0xaf349c322e9c7cee , 0x00003ffe // log(1/frcpa(1+251/2^-8)) +data8 0xafb39e30d1768d1c , 0x00003ffe // log(1/frcpa(1+252/2^-8)) +data8 0xb032df51c2c93116 , 0x00003ffe // log(1/frcpa(1+253/2^-8)) +data8 0xb0b25fd3e6035ad9 , 0x00003ffe // log(1/frcpa(1+254/2^-8)) +data8 0xb1321ff67cba178c , 0x00003ffe // log(1/frcpa(1+255/2^-8)) +LOCAL_OBJECT_END(log_table_3) + + +.section .text +GLOBAL_LIBM_ENTRY(asinh) + +{ .mfi + getf.exp asinh_GR_f8 = f8 // Must recompute later if x unorm + fclass.m p12,p0 = f8, 0x0b // Test x unorm + mov log_GR_exp_17_ones = 0x1ffff +} +{ .mfi + addl NR_table_address = @ltoff(log_table_1), gp + fma.s1 log_y = f8, f8, f1 // y = x^2 + 1 + mov asinh_GR_comp = 0xfffc +} +;; + +{ .mfi + mov log_GR_exp_16_ones = 0xffff //BIAS + fclass.m p6,p0 = f8, 0xe7 // Test for x = NaN and inf and zero + mov log_GR_comp2 = 0x1003e +} +{ .mfi + ld8 NR_table_address = [NR_table_address] + fma.s1 asinh_w_sq = f8,f8,f0 // x^2 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcmp.lt.s1 p7,p11 = f8,f0 // if x<0 + nop.i 0 +} +{ .mfb + nop.m 0 + fnorm.s1 fNormX = f8 // Normalize x +(p12) br.cond.spnt ASINH_UNORM // Branch if x=unorm +} +;; + +ASINH_COMMON: +// Return here if x=unorm and not denorm +{ .mfi + //to get second table address + adds log_table_address2 = 0x40, NR_table_address + fma.s1 log_arg = f8,f1,f8 + nop.i 0 +} +{ .mfb + nop.m 0 +(p6) fma.d.s0 f8 = f8,f1,f8 // quietize nan result if x=nan +(p6) br.ret.spnt b0 // Exit for x=nan and inf and zero +} +;; + +{ .mfi + ldfpd NR1,NR2 = [log_table_address2],16 + frsqrta.s1 log_y_rs,p0 = log_y // z=1/sqrt(y) + nop.i 0 +} +;; + +{ .mfi + ldfe log_C13 = [log_table_address2],16 + nop.f 0 + and asinh_GR_f8 = asinh_GR_f8,log_GR_exp_17_ones +} +;; + +{ .mib + ldfe log_C11 = [log_table_address2],16 + cmp.le p13,p0 = log_GR_comp2,asinh_GR_f8 +(p13) br.cond.spnt LOG_COMMON1 // Branch if path 4, |x| >= 2^63 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_y_rs_iter = log_y_rs,log_y,f0 // y*z + nop.i 0 +} +;; + +.pred.rel "mutex",p7,p11 +{ .mfi + nop.m 0 +(p11) mov asinh_f8 = fNormX + nop.i 0 +} +{ .mfb + cmp.gt p8,p0 = asinh_GR_comp,asinh_GR_f8 +(p7) fnma.s1 asinh_f8 = fNormX,f1,f0 +(p8) br.cond.spnt ASINH_NEAR_ZERO // Branch if path 2, 0 < |x| < 2^-3 +} +;; + +// Here if main path, 2^-3 <= |x| < 2^63 +///////////////////////////////// The first iteration ///////////////////////// +{ .mfi + ldfpd log_P5,log_P4 = [NR_table_address],16 + fnma.s1 log_y_rs_iter = log_y_rs_iter,log_y_rs,NR2 // 3-(y*z)*z + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 log_y_rs_iter1 = log_y_rs,NR1,f0 // 0.5*z + nop.i 0 +} +;; + +{ .mfi + ldfpd log_P3,log_P2 = [NR_table_address],16 + // (0.5*z)*(3-(y*z)*z) + fma.s1 log_y_rs_iter = log_y_rs_iter1,log_y_rs_iter,f0 + nop.i 0 +} +;; + +/////////////////////////// The second iteration ///////////////////////////// +{ .mfi + ldfd log_P1 = [NR_table_address],16 + fma.s1 log_y_rs = log_y_rs_iter,log_y,f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fnma.s1 log_y_rs = log_y_rs,log_y_rs_iter,NR2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 log_y_rs_iter1 = log_y_rs_iter,NR1,f0 + nop.i 0 +} +;; + +{ .mfi + ldfe log2 = [NR_table_address],16 + // (0.5*z)*(3-(y*z)*z) + fma.s1 log_y_rs_iter = log_y_rs_iter1,log_y_rs,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + // (0.5*z)*(3-(y*z)*z) + fma.s1 log_arg_early = log_y_rs_iter1,log_y_rs,f0 + nop.i 0 +} +;; + +////////////////////////////////// The third iteration //////////////////////// +{ .mfi + nop.m 0 + fma.s1 log_y_rs = log_y_rs_iter,log_y,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 log_y_rs_iter1 = log_y_rs_iter,NR1,f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_arg_early = log_arg_early,log_y,asinh_f8 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fnma.s1 log_y_rs = log_y_rs,log_y_rs_iter,NR2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 log_y_rs_iter1 = log_y_rs_iter1,log_y,f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + frcpa.s1 log_C,p0 = f1,log_arg_early + nop.i 0 +} +;; + +{ .mfi + getf.exp log_GR_signexp_f8 = log_arg_early + nop.f 0 + nop.i 0 +} +;; + +{ .mfi + getf.sig log_GR_significand_f8 = log_arg_early + // (0.5*z)*(3-(y*z)*z)*y + |x| + fma.s1 log_arg = log_y_rs_iter1,log_y_rs,asinh_f8 + //to get third table address + adds log_table_address3 = 0x70, NR_table_address +} +;; + +///////////////////////////////// The end NR iterations ///////////////////// +{ .mfi + nop.m 0 + nop.f 0 + //significant bit destruction + and log_GR_exp_f8 = log_GR_signexp_f8, log_GR_exp_17_ones +} +;; + +{ .mfi + //BIAS subtraction + sub log_GR_true_exp_f8 = log_GR_exp_f8, log_GR_exp_16_ones +(p7) fnma.s1 log2 = log2,f1,f0 + nop.i 0 +} +;; + +{ .mfi + setf.sig log_int_Nfloat = log_GR_true_exp_f8 + fms.s1 log_r = log_C,log_arg,f1 // C = frcpa(x); r = C * x - 1 + extr.u log_GR_index = log_GR_significand_f8,55,8 //Extract 8 bits +} +;; + +{ .mmi + //pre-index*16 + index + shladd log_table_address3 = log_GR_index,4,log_table_address3 +;; + ldfe log_T = [log_table_address3] + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_rsq = log_r, log_r, f0 //r^2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 log_rp_p4 = log_P5, log_r, log_P4 //P5*r + P4 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_rp_p32 = log_P3, log_r, log_P2 //P3*r + P2 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + //convert N to the floating-point format + fcvt.xf log_Nfloat = log_int_Nfloat + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_rcube = log_rsq, log_r, f0 //r^3 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 log_rp_p10 = log_rsq, log_P1, log_r //P1*r^2 + r + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + //(P5*r + P4)*r^2 + P3*r + P2 + fma.s1 log_rp_p2 = log_rp_p4, log_rsq, log_rp_p32 + nop.i 0 +} +;; + +.pred.rel "mutex",p7,p11 +{ .mfi + nop.m 0 +(p11) fma.s1 log_T_plus_Nlog2 = log_Nfloat,log2,log_T //N*log2 + T if x>0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p7) fms.s1 log_T_plus_Nlog2 = log_Nfloat,log2,log_T //N*log2 - T if x<0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + //((P5*r + P4)*r^2 + P3*r + P2)*w^3 + P1*r^2 + r + fma.s1 log_r2P_r = log_rp_p2, log_rcube, log_rp_p10 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + // N*log2 + T + ((P5*r + P4)*r^2 + P3*r + P2)*r^3 + P1*r^2 + r +(p11) fadd.d.s0 f8 = log_T_plus_Nlog2,log_r2P_r + nop.i 0 +} +{ .mfb + nop.m 0 + // -N*log2 - T - ((P5*r + P4)*r^2 + P3*r + P2)*r^3 + P1*r^2 + r +(p7) fsub.d.s0 f8 = log_T_plus_Nlog2,log_r2P_r + br.ret.sptk b0 // Exit main path, path 3: 2^-3 <= |x| < 2^63 +} +;; + +// Here if path 4, |x| >= 2^63 +LOG_COMMON1: +{ .mfi + ldfpd log_P5,log_P4 = [NR_table_address],16 + nop.f 0 + nop.i 0 +} +;; + +{ .mfi + ldfpd log_P3,log_P2 = [NR_table_address],16 + frcpa.s1 log_C,p0 = f1,log_arg + nop.i 0 +} +;; + +{ .mmi + getf.exp log_GR_signexp_f8 = log_arg + ldfd log_P1 = [NR_table_address],16 + nop.i 0 +} +;; + +{ .mmi + getf.sig log_GR_significand_f8 = log_arg + ldfe log2 = [NR_table_address],16 + nop.i 0 +} +;; + +{ .mfi + adds log_table_address3 = 0x70, NR_table_address + nop.f 0 + //significant bit destruction + and log_GR_exp_f8 = log_GR_signexp_f8, log_GR_exp_17_ones +} +;; + +{ .mmf + nop.m 0 + //BIAS subtraction + sub log_GR_true_exp_f8 = log_GR_exp_f8, log_GR_exp_16_ones + fms.s1 log_r = log_C,log_arg,f1 //C = frcpa(x); r = C * x - 1 +} +;; + +{ .mfi + setf.sig log_int_Nfloat = log_GR_true_exp_f8 + nop.f 0 + extr.u log_GR_index = log_GR_significand_f8,55,8 //Extract 8 bits +} +;; + +{ .mmi + //pre-index*16 + index + shladd log_table_address3 = log_GR_index,4,log_table_address3 +;; + ldfe log_T = [log_table_address3] + nop.i 0 + +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_rsq = log_r, log_r, f0 //r^2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 log_rp_p4 = log_P5, log_r, log_P4 //P5*r + P4 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_rp_p32 = log_P3, log_r, log_P2 //P3*r + P2 + nop.i 0 +} +{ .mfi + nop.m 0 +(p7) fnma.s1 log2 = log2,f1,f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_rcube = log_rsq, log_r, f0 //r^3 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 log_rp_p10 = log_rsq, log_P1, log_r //P1*r^2 + r + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + //convert N to the floating-point format + fcvt.xf log_Nfloat = log_int_Nfloat + nop.i 0 +} +{ .mfi + nop.m 0 + //(P5*r + P4)*r^2 + P3*r + P2 + fma.s1 log_rp_p2 = log_rp_p4, log_rsq, log_rp_p32 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p7) fnma.s1 log_T = log_T,f1,f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_T_plus_Nlog2 = log_Nfloat,log2,log_T //N*log2 + T + nop.i 0 +} +{ .mfi + nop.m 0 + //((P5*r + P4)*r^2 + P3*r + P2)*w^3 + P1*r^2 + r + fma.s1 log_r2P_r = log_rp_p2, log_rcube, log_rp_p10 + nop.i 0 +} +;; + +.pred.rel "mutex",p7,p11 +{ .mfi + nop.m 0 + // N*log2 + T + ((P5*r + P4)*r^2 + P3*r + P2)*r^3 + P1*r^2 + r +(p11) fadd.d.s0 f8 = log_T_plus_Nlog2,log_r2P_r + nop.i 0 +} +{ .mfb + nop.m 0 + // -N*log2 - T - ((P5*r + P4)*r^2 + P3*r + P2)*r^3 + P1*r^2 + r +(p7) fsub.d.s0 f8 = log_T_plus_Nlog2,log_r2P_r + br.ret.sptk b0 // Exit path 4, |x| >= 2^63 +} +;; + +// Here is path 2, 0 < |x| < 2^-3 +ASINH_NEAR_ZERO: +{ .mfi + ldfe log_C9 = [log_table_address2],16 + fma.s1 asinh_w_cube = asinh_w_sq,fNormX,f0 + nop.i 0 +} +;; + +{ .mfi + ldfe log_C7 = [log_table_address2],16 + fma.s1 asinh_w_four = asinh_w_sq,asinh_w_sq,f0 + nop.i 0 +} +;; + +{ .mfi + ldfe log_C5 = [log_table_address2],16 + nop.f 0 + nop.i 0 +} +;; + +{ .mfi + ldfe log_C3 = [log_table_address2],16 + nop.f 0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 asinh_w_13 = log_C13,asinh_w_sq,log_C11 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 asinh_w_9 = log_C9,asinh_w_sq,log_C7 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 asinh_w_3 = log_C5,asinh_w_sq,log_C3 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 asinh_w_seven = asinh_w_four,asinh_w_cube,f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 asinh_w_7 = asinh_w_13,asinh_w_four,asinh_w_9 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 asinh_w_5 = asinh_w_3,asinh_w_cube,fNormX + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + fma.d.s0 f8 = asinh_w_7,asinh_w_seven,asinh_w_5 + br.ret.sptk b0 // Exit path 2 (0.0 <|x| < 2^(-3)) +} +;; + +ASINH_UNORM: +// Here if x=unorm +{ .mfi + getf.exp asinh_GR_f8 = fNormX // Recompute if x unorm + fclass.m p0,p13 = fNormX, 0x0b // Test x denorm + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + fcmp.eq.s0 p14,p0 = f8, f0 // Dummy to set denormal flag +(p13) br.cond.sptk ASINH_COMMON // Continue if x unorm and not denorm +} +;; + +.pred.rel "mutex",p7,p11 +{ .mfi + nop.m 0 +(p7) fma.d.s0 f8 = f8,f8,f8 // Result x+x^2 if x=-denorm + nop.i 0 +} +{ .mfb + nop.m 0 +(p11) fnma.d.s0 f8 = f8,f8,f8 // Result x-x^2 if x=+denorm + br.ret.spnt b0 // Exit if denorm +} +;; + +GLOBAL_LIBM_END(asinh) + diff --git a/sysdeps/ia64/fpu/s_asinhf.S b/sysdeps/ia64/fpu/s_asinhf.S new file mode 100644 index 0000000000..df616deae0 --- /dev/null +++ b/sysdeps/ia64/fpu/s_asinhf.S @@ -0,0 +1,937 @@ +.file "asinhf.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// ============================================================== +// History +// ============================================================== +// 04/02/01 Initial version +// 04/19/01 Improved speed of the paths #1,2,3,4,5 +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/06/03 Reordered header: .section, .global, .proc, .align +// 05/21/03 Improved performance, fixed to handle unorms +// +// API +// ============================================================== +// float asinhf(float) +// +// Overview of operation +// ============================================================== +// +// There are 7 paths: +// 1. x = 0.0 +// Return asinhf(x) = 0.0 +// 2. 0.0 <|x| < 2^(-5) +// Return asinhf(x) = Pol5(x), where Pol5(x) = ((x^2)*C1 + C0)*x^3 + x + +// 3. 2^(-5) <= |x| < 2^51 +// Return asinhf(x) = sign(x)*(log(|x| + sqrt(x^2 + 1.0))) +// To compute x + sqrt(x^2 + 1.0) modified Newton Raphson method is used +// (2 iterations) +// Algorithm description for log function see below. +// +// 4. 2^51 <= |x| < +INF +// Return asinhf(x) = sign(x)*log(2*|x|) +// Algorithm description for log function see below. +// +// 5. x = INF +// Return asinhf(x) = INF +// +// 6. x = [S,Q]NaN +// Return asinhf(x) = QNaN +// +// 7. x = denormal +// Return asinhf(x) = x +// +//============================================================== +// Algorithm Description for log(x) function +// Below we are using the fact that inequality x - 1.0 > 2^(-6) is always +// true for this asinh implementation +// +// Consider x = 2^N 1.f1 f2 f3 f4...f63 +// Log(x) = log(frcpa(x) x/frcpa(x)) +// = log(1/frcpa(x)) + log(frcpa(x) x) +// = -log(frcpa(x)) + log(frcpa(x) x) +// +// frcpa(x) = 2^-N frcpa((1.f1 f2 ... f63) +// +// -log(frcpa(x)) = -log(C) +// = -log(2^-N) - log(frcpa(1.f1 f2 ... f63)) +// +// -log(frcpa(x)) = -log(C) +// = +Nlog2 - log(frcpa(1.f1 f2 ... f63)) +// +// -log(frcpa(x)) = -log(C) +// = +Nlog2 + log(frcpa(1.f1 f2 ... f63)) +// +// Log(x) = log(1/frcpa(x)) + log(frcpa(x) x) +// +// Log(x) = +Nlog2 + log(1./frcpa(1.f1 f2 ... f63)) + log(frcpa(x) x) +// Log(x) = +Nlog2 - log(/frcpa(1.f1 f2 ... f63)) + log(frcpa(x) x) +// Log(x) = +Nlog2 + T + log(frcpa(x) x) +// +// Log(x) = +Nlog2 + T + log(C x) +// +// Cx = 1 + r +// +// Log(x) = +Nlog2 + T + log(1+r) +// Log(x) = +Nlog2 + T + Series( r - r^2/2 + r^3/3 - r^4/4 ....) +// +// 1.f1 f2 ... f8 has 256 entries. +// They are 1 + k/2^8, k = 0 ... 255 +// These 256 values are the table entries. +// +// Implementation +//============================================================== +// C = frcpa(x) +// r = C * x - 1 +// +// Form rseries = r + P1*r^2 + P2*r^3 + P3*r^4 +// +// x = f * 2*n where f is 1.f_1f_2f_3....f_63 +// Nfloat = float(n) where n is the true unbiased exponent +// pre-index = f_1f_2....f_8 +// index = pre_index * 8 +// get the dxt table entry at index + offset = T +// +// result = (T + Nfloat * log(2)) + rseries +// +// The T table is calculated as follows +// Form x_k = 1 + k/2^8 where k goes from 0... 255 +// y_k = frcpa(x_k) +// log(1/y_k) in quad and round to double-extended +// +// +// Registers used +//============================================================== +// Floating Point registers used: +// f8, input +// f9 -> f15, f32 -> f55 + +// General registers used: +// r14 -> r27 + +// Predicate registers used: +// p6 -> p14 + +// p6 to filter out case when x = [Q,S]NaN or INF or zero +// p7 to filter out case when x < 0.0 +// p8 to select path #2 + +// p11 to filter out case when x >= 0 +// p12 to filter out case when x = + denormal +// p13 to select path #4 +// p14 to filtef out case when x = - denormal +// Assembly macros +//============================================================== +log_GR_exp_17_ones = r14 +log_GR_signexp_f8 = r15 +log_table_address2 = r16 +log_GR_exp_16_ones = r17 +log_GR_exp_f8 = r18 +log_GR_true_exp_f8 = r19 +log_GR_significand_f8 = r20 +log_GR_index = r21 +log_GR_comp2 = r22 +asinh_GR_f8 = r23 +asinh_GR_comp = r24 +asinh_GR_f8 = r25 +log_table_address3 = r26 +NR_table_address = r27 + +//============================================================== +log_y = f9 +NR1 = f10 +NR2 = f11 +log_y_rs = f12 +log_y_rs_iter = f13 +log_y_rs_iter1 = f14 +fNormX = f15 +asinh_w_sq = f32 +log_arg_early = f33 +log_y_rs_iter2 = f34 +log_P3 = f35 +log_P2 = f36 +log_P1 = f37 +log2 = f38 +log_C0 = f39 +log_C1 = f40 +asinh_f8 = f41 +log_C = f42 +log_arg = f43 +asinh_w_cube = f44 +log_int_Nfloat = f45 +log_r = f46 +log_rsq = f47 +asinh_w_1 = f48 +log_rp_p32 = f49 +log_rcube = f50 +log_rp_p10 = f51 +log_rp_p2 = f52 +log_Nfloat = f53 +log_T = f54 +log_T_plus_Nlog2 = f55 + +// Data tables +//============================================================== + +RODATA +.align 16 + +LOCAL_OBJECT_START(log_table_1) + +data8 0xbfd0001008f39d59 // p3 +data8 0x3fd5556073e0c45a // p2 +data8 0xbfdffffffffaea15 // p1 +data8 0x3fe62e42fefa39ef // log(2) +LOCAL_OBJECT_END(log_table_1) + +LOCAL_OBJECT_START(log_table_2) +data8 0x3FE0000000000000 // 0.5 +data8 0x4008000000000000 // 3.0 +data8 0x9979C79685A5EB16, 0x00003FFB // C1 3FFB9979C79685A5EB16 +data8 0xAAAAA96F80786D62, 0x0000BFFC // C0 BFFCAAAAA96F80786D62 +LOCAL_OBJECT_END(log_table_2) + +LOCAL_OBJECT_START(log_table_3) +data8 0x3F60040155D5889E //log(1/frcpa(1+ 0/256) +data8 0x3F78121214586B54 //log(1/frcpa(1+ 1/256) +data8 0x3F841929F96832F0 //log(1/frcpa(1+ 2/256) +data8 0x3F8C317384C75F06 //log(1/frcpa(1+ 3/256) +data8 0x3F91A6B91AC73386 //log(1/frcpa(1+ 4/256) +data8 0x3F95BA9A5D9AC039 //log(1/frcpa(1+ 5/256) +data8 0x3F99D2A8074325F4 //log(1/frcpa(1+ 6/256) +data8 0x3F9D6B2725979802 //log(1/frcpa(1+ 7/256) +data8 0x3FA0C58FA19DFAAA //log(1/frcpa(1+ 8/256) +data8 0x3FA2954C78CBCE1B //log(1/frcpa(1+ 9/256) +data8 0x3FA4A94D2DA96C56 //log(1/frcpa(1+ 10/256) +data8 0x3FA67C94F2D4BB58 //log(1/frcpa(1+ 11/256) +data8 0x3FA85188B630F068 //log(1/frcpa(1+ 12/256) +data8 0x3FAA6B8ABE73AF4C //log(1/frcpa(1+ 13/256) +data8 0x3FAC441E06F72A9E //log(1/frcpa(1+ 14/256) +data8 0x3FAE1E6713606D07 //log(1/frcpa(1+ 15/256) +data8 0x3FAFFA6911AB9301 //log(1/frcpa(1+ 16/256) +data8 0x3FB0EC139C5DA601 //log(1/frcpa(1+ 17/256) +data8 0x3FB1DBD2643D190B //log(1/frcpa(1+ 18/256) +data8 0x3FB2CC7284FE5F1C //log(1/frcpa(1+ 19/256) +data8 0x3FB3BDF5A7D1EE64 //log(1/frcpa(1+ 20/256) +data8 0x3FB4B05D7AA012E0 //log(1/frcpa(1+ 21/256) +data8 0x3FB580DB7CEB5702 //log(1/frcpa(1+ 22/256) +data8 0x3FB674F089365A7A //log(1/frcpa(1+ 23/256) +data8 0x3FB769EF2C6B568D //log(1/frcpa(1+ 24/256) +data8 0x3FB85FD927506A48 //log(1/frcpa(1+ 25/256) +data8 0x3FB9335E5D594989 //log(1/frcpa(1+ 26/256) +data8 0x3FBA2B0220C8E5F5 //log(1/frcpa(1+ 27/256) +data8 0x3FBB0004AC1A86AC //log(1/frcpa(1+ 28/256) +data8 0x3FBBF968769FCA11 //log(1/frcpa(1+ 29/256) +data8 0x3FBCCFEDBFEE13A8 //log(1/frcpa(1+ 30/256) +data8 0x3FBDA727638446A2 //log(1/frcpa(1+ 31/256) +data8 0x3FBEA3257FE10F7A //log(1/frcpa(1+ 32/256) +data8 0x3FBF7BE9FEDBFDE6 //log(1/frcpa(1+ 33/256) +data8 0x3FC02AB352FF25F4 //log(1/frcpa(1+ 34/256) +data8 0x3FC097CE579D204D //log(1/frcpa(1+ 35/256) +data8 0x3FC1178E8227E47C //log(1/frcpa(1+ 36/256) +data8 0x3FC185747DBECF34 //log(1/frcpa(1+ 37/256) +data8 0x3FC1F3B925F25D41 //log(1/frcpa(1+ 38/256) +data8 0x3FC2625D1E6DDF57 //log(1/frcpa(1+ 39/256) +data8 0x3FC2D1610C86813A //log(1/frcpa(1+ 40/256) +data8 0x3FC340C59741142E //log(1/frcpa(1+ 41/256) +data8 0x3FC3B08B6757F2A9 //log(1/frcpa(1+ 42/256) +data8 0x3FC40DFB08378003 //log(1/frcpa(1+ 43/256) +data8 0x3FC47E74E8CA5F7C //log(1/frcpa(1+ 44/256) +data8 0x3FC4EF51F6466DE4 //log(1/frcpa(1+ 45/256) +data8 0x3FC56092E02BA516 //log(1/frcpa(1+ 46/256) +data8 0x3FC5D23857CD74D5 //log(1/frcpa(1+ 47/256) +data8 0x3FC6313A37335D76 //log(1/frcpa(1+ 48/256) +data8 0x3FC6A399DABBD383 //log(1/frcpa(1+ 49/256) +data8 0x3FC70337DD3CE41B //log(1/frcpa(1+ 50/256) +data8 0x3FC77654128F6127 //log(1/frcpa(1+ 51/256) +data8 0x3FC7E9D82A0B022D //log(1/frcpa(1+ 52/256) +data8 0x3FC84A6B759F512F //log(1/frcpa(1+ 53/256) +data8 0x3FC8AB47D5F5A310 //log(1/frcpa(1+ 54/256) +data8 0x3FC91FE49096581B //log(1/frcpa(1+ 55/256) +data8 0x3FC981634011AA75 //log(1/frcpa(1+ 56/256) +data8 0x3FC9F6C407089664 //log(1/frcpa(1+ 57/256) +data8 0x3FCA58E729348F43 //log(1/frcpa(1+ 58/256) +data8 0x3FCABB55C31693AD //log(1/frcpa(1+ 59/256) +data8 0x3FCB1E104919EFD0 //log(1/frcpa(1+ 60/256) +data8 0x3FCB94EE93E367CB //log(1/frcpa(1+ 61/256) +data8 0x3FCBF851C067555F //log(1/frcpa(1+ 62/256) +data8 0x3FCC5C0254BF23A6 //log(1/frcpa(1+ 63/256) +data8 0x3FCCC000C9DB3C52 //log(1/frcpa(1+ 64/256) +data8 0x3FCD244D99C85674 //log(1/frcpa(1+ 65/256) +data8 0x3FCD88E93FB2F450 //log(1/frcpa(1+ 66/256) +data8 0x3FCDEDD437EAEF01 //log(1/frcpa(1+ 67/256) +data8 0x3FCE530EFFE71012 //log(1/frcpa(1+ 68/256) +data8 0x3FCEB89A1648B971 //log(1/frcpa(1+ 69/256) +data8 0x3FCF1E75FADF9BDE //log(1/frcpa(1+ 70/256) +data8 0x3FCF84A32EAD7C35 //log(1/frcpa(1+ 71/256) +data8 0x3FCFEB2233EA07CD //log(1/frcpa(1+ 72/256) +data8 0x3FD028F9C7035C1C //log(1/frcpa(1+ 73/256) +data8 0x3FD05C8BE0D9635A //log(1/frcpa(1+ 74/256) +data8 0x3FD085EB8F8AE797 //log(1/frcpa(1+ 75/256) +data8 0x3FD0B9C8E32D1911 //log(1/frcpa(1+ 76/256) +data8 0x3FD0EDD060B78081 //log(1/frcpa(1+ 77/256) +data8 0x3FD122024CF0063F //log(1/frcpa(1+ 78/256) +data8 0x3FD14BE2927AECD4 //log(1/frcpa(1+ 79/256) +data8 0x3FD180618EF18ADF //log(1/frcpa(1+ 80/256) +data8 0x3FD1B50BBE2FC63B //log(1/frcpa(1+ 81/256) +data8 0x3FD1DF4CC7CF242D //log(1/frcpa(1+ 82/256) +data8 0x3FD214456D0EB8D4 //log(1/frcpa(1+ 83/256) +data8 0x3FD23EC5991EBA49 //log(1/frcpa(1+ 84/256) +data8 0x3FD2740D9F870AFB //log(1/frcpa(1+ 85/256) +data8 0x3FD29ECDABCDFA04 //log(1/frcpa(1+ 86/256) +data8 0x3FD2D46602ADCCEE //log(1/frcpa(1+ 87/256) +data8 0x3FD2FF66B04EA9D4 //log(1/frcpa(1+ 88/256) +data8 0x3FD335504B355A37 //log(1/frcpa(1+ 89/256) +data8 0x3FD360925EC44F5D //log(1/frcpa(1+ 90/256) +data8 0x3FD38BF1C3337E75 //log(1/frcpa(1+ 91/256) +data8 0x3FD3C25277333184 //log(1/frcpa(1+ 92/256) +data8 0x3FD3EDF463C1683E //log(1/frcpa(1+ 93/256) +data8 0x3FD419B423D5E8C7 //log(1/frcpa(1+ 94/256) +data8 0x3FD44591E0539F49 //log(1/frcpa(1+ 95/256) +data8 0x3FD47C9175B6F0AD //log(1/frcpa(1+ 96/256) +data8 0x3FD4A8B341552B09 //log(1/frcpa(1+ 97/256) +data8 0x3FD4D4F3908901A0 //log(1/frcpa(1+ 98/256) +data8 0x3FD501528DA1F968 //log(1/frcpa(1+ 99/256) +data8 0x3FD52DD06347D4F6 //log(1/frcpa(1+ 100/256) +data8 0x3FD55A6D3C7B8A8A //log(1/frcpa(1+ 101/256) +data8 0x3FD5925D2B112A59 //log(1/frcpa(1+ 102/256) +data8 0x3FD5BF406B543DB2 //log(1/frcpa(1+ 103/256) +data8 0x3FD5EC433D5C35AE //log(1/frcpa(1+ 104/256) +data8 0x3FD61965CDB02C1F //log(1/frcpa(1+ 105/256) +data8 0x3FD646A84935B2A2 //log(1/frcpa(1+ 106/256) +data8 0x3FD6740ADD31DE94 //log(1/frcpa(1+ 107/256) +data8 0x3FD6A18DB74A58C5 //log(1/frcpa(1+ 108/256) +data8 0x3FD6CF31058670EC //log(1/frcpa(1+ 109/256) +data8 0x3FD6F180E852F0BA //log(1/frcpa(1+ 110/256) +data8 0x3FD71F5D71B894F0 //log(1/frcpa(1+ 111/256) +data8 0x3FD74D5AEFD66D5C //log(1/frcpa(1+ 112/256) +data8 0x3FD77B79922BD37E //log(1/frcpa(1+ 113/256) +data8 0x3FD7A9B9889F19E2 //log(1/frcpa(1+ 114/256) +data8 0x3FD7D81B037EB6A6 //log(1/frcpa(1+ 115/256) +data8 0x3FD8069E33827231 //log(1/frcpa(1+ 116/256) +data8 0x3FD82996D3EF8BCB //log(1/frcpa(1+ 117/256) +data8 0x3FD85855776DCBFB //log(1/frcpa(1+ 118/256) +data8 0x3FD8873658327CCF //log(1/frcpa(1+ 119/256) +data8 0x3FD8AA75973AB8CF //log(1/frcpa(1+ 120/256) +data8 0x3FD8D992DC8824E5 //log(1/frcpa(1+ 121/256) +data8 0x3FD908D2EA7D9512 //log(1/frcpa(1+ 122/256) +data8 0x3FD92C59E79C0E56 //log(1/frcpa(1+ 123/256) +data8 0x3FD95BD750EE3ED3 //log(1/frcpa(1+ 124/256) +data8 0x3FD98B7811A3EE5B //log(1/frcpa(1+ 125/256) +data8 0x3FD9AF47F33D406C //log(1/frcpa(1+ 126/256) +data8 0x3FD9DF270C1914A8 //log(1/frcpa(1+ 127/256) +data8 0x3FDA0325ED14FDA4 //log(1/frcpa(1+ 128/256) +data8 0x3FDA33440224FA79 //log(1/frcpa(1+ 129/256) +data8 0x3FDA57725E80C383 //log(1/frcpa(1+ 130/256) +data8 0x3FDA87D0165DD199 //log(1/frcpa(1+ 131/256) +data8 0x3FDAAC2E6C03F896 //log(1/frcpa(1+ 132/256) +data8 0x3FDADCCC6FDF6A81 //log(1/frcpa(1+ 133/256) +data8 0x3FDB015B3EB1E790 //log(1/frcpa(1+ 134/256) +data8 0x3FDB323A3A635948 //log(1/frcpa(1+ 135/256) +data8 0x3FDB56FA04462909 //log(1/frcpa(1+ 136/256) +data8 0x3FDB881AA659BC93 //log(1/frcpa(1+ 137/256) +data8 0x3FDBAD0BEF3DB165 //log(1/frcpa(1+ 138/256) +data8 0x3FDBD21297781C2F //log(1/frcpa(1+ 139/256) +data8 0x3FDC039236F08819 //log(1/frcpa(1+ 140/256) +data8 0x3FDC28CB1E4D32FD //log(1/frcpa(1+ 141/256) +data8 0x3FDC4E19B84723C2 //log(1/frcpa(1+ 142/256) +data8 0x3FDC7FF9C74554C9 //log(1/frcpa(1+ 143/256) +data8 0x3FDCA57B64E9DB05 //log(1/frcpa(1+ 144/256) +data8 0x3FDCCB130A5CEBB0 //log(1/frcpa(1+ 145/256) +data8 0x3FDCF0C0D18F326F //log(1/frcpa(1+ 146/256) +data8 0x3FDD232075B5A201 //log(1/frcpa(1+ 147/256) +data8 0x3FDD490246DEFA6B //log(1/frcpa(1+ 148/256) +data8 0x3FDD6EFA918D25CD //log(1/frcpa(1+ 149/256) +data8 0x3FDD9509707AE52F //log(1/frcpa(1+ 150/256) +data8 0x3FDDBB2EFE92C554 //log(1/frcpa(1+ 151/256) +data8 0x3FDDEE2F3445E4AF //log(1/frcpa(1+ 152/256) +data8 0x3FDE148A1A2726CE //log(1/frcpa(1+ 153/256) +data8 0x3FDE3AFC0A49FF40 //log(1/frcpa(1+ 154/256) +data8 0x3FDE6185206D516E //log(1/frcpa(1+ 155/256) +data8 0x3FDE882578823D52 //log(1/frcpa(1+ 156/256) +data8 0x3FDEAEDD2EAC990C //log(1/frcpa(1+ 157/256) +data8 0x3FDED5AC5F436BE3 //log(1/frcpa(1+ 158/256) +data8 0x3FDEFC9326D16AB9 //log(1/frcpa(1+ 159/256) +data8 0x3FDF2391A2157600 //log(1/frcpa(1+ 160/256) +data8 0x3FDF4AA7EE03192D //log(1/frcpa(1+ 161/256) +data8 0x3FDF71D627C30BB0 //log(1/frcpa(1+ 162/256) +data8 0x3FDF991C6CB3B379 //log(1/frcpa(1+ 163/256) +data8 0x3FDFC07ADA69A910 //log(1/frcpa(1+ 164/256) +data8 0x3FDFE7F18EB03D3E //log(1/frcpa(1+ 165/256) +data8 0x3FE007C053C5002E //log(1/frcpa(1+ 166/256) +data8 0x3FE01B942198A5A1 //log(1/frcpa(1+ 167/256) +data8 0x3FE02F74400C64EB //log(1/frcpa(1+ 168/256) +data8 0x3FE04360BE7603AD //log(1/frcpa(1+ 169/256) +data8 0x3FE05759AC47FE34 //log(1/frcpa(1+ 170/256) +data8 0x3FE06B5F1911CF52 //log(1/frcpa(1+ 171/256) +data8 0x3FE078BF0533C568 //log(1/frcpa(1+ 172/256) +data8 0x3FE08CD9687E7B0E //log(1/frcpa(1+ 173/256) +data8 0x3FE0A10074CF9019 //log(1/frcpa(1+ 174/256) +data8 0x3FE0B5343A234477 //log(1/frcpa(1+ 175/256) +data8 0x3FE0C974C89431CE //log(1/frcpa(1+ 176/256) +data8 0x3FE0DDC2305B9886 //log(1/frcpa(1+ 177/256) +data8 0x3FE0EB524BAFC918 //log(1/frcpa(1+ 178/256) +data8 0x3FE0FFB54213A476 //log(1/frcpa(1+ 179/256) +data8 0x3FE114253DA97D9F //log(1/frcpa(1+ 180/256) +data8 0x3FE128A24F1D9AFF //log(1/frcpa(1+ 181/256) +data8 0x3FE1365252BF0865 //log(1/frcpa(1+ 182/256) +data8 0x3FE14AE558B4A92D //log(1/frcpa(1+ 183/256) +data8 0x3FE15F85A19C765B //log(1/frcpa(1+ 184/256) +data8 0x3FE16D4D38C119FA //log(1/frcpa(1+ 185/256) +data8 0x3FE18203C20DD133 //log(1/frcpa(1+ 186/256) +data8 0x3FE196C7BC4B1F3B //log(1/frcpa(1+ 187/256) +data8 0x3FE1A4A738B7A33C //log(1/frcpa(1+ 188/256) +data8 0x3FE1B981C0C9653D //log(1/frcpa(1+ 189/256) +data8 0x3FE1CE69E8BB106B //log(1/frcpa(1+ 190/256) +data8 0x3FE1DC619DE06944 //log(1/frcpa(1+ 191/256) +data8 0x3FE1F160A2AD0DA4 //log(1/frcpa(1+ 192/256) +data8 0x3FE2066D7740737E //log(1/frcpa(1+ 193/256) +data8 0x3FE2147DBA47A394 //log(1/frcpa(1+ 194/256) +data8 0x3FE229A1BC5EBAC3 //log(1/frcpa(1+ 195/256) +data8 0x3FE237C1841A502E //log(1/frcpa(1+ 196/256) +data8 0x3FE24CFCE6F80D9A //log(1/frcpa(1+ 197/256) +data8 0x3FE25B2C55CD5762 //log(1/frcpa(1+ 198/256) +data8 0x3FE2707F4D5F7C41 //log(1/frcpa(1+ 199/256) +data8 0x3FE285E0842CA384 //log(1/frcpa(1+ 200/256) +data8 0x3FE294294708B773 //log(1/frcpa(1+ 201/256) +data8 0x3FE2A9A2670AFF0C //log(1/frcpa(1+ 202/256) +data8 0x3FE2B7FB2C8D1CC1 //log(1/frcpa(1+ 203/256) +data8 0x3FE2C65A6395F5F5 //log(1/frcpa(1+ 204/256) +data8 0x3FE2DBF557B0DF43 //log(1/frcpa(1+ 205/256) +data8 0x3FE2EA64C3F97655 //log(1/frcpa(1+ 206/256) +data8 0x3FE3001823684D73 //log(1/frcpa(1+ 207/256) +data8 0x3FE30E97E9A8B5CD //log(1/frcpa(1+ 208/256) +data8 0x3FE32463EBDD34EA //log(1/frcpa(1+ 209/256) +data8 0x3FE332F4314AD796 //log(1/frcpa(1+ 210/256) +data8 0x3FE348D90E7464D0 //log(1/frcpa(1+ 211/256) +data8 0x3FE35779F8C43D6E //log(1/frcpa(1+ 212/256) +data8 0x3FE36621961A6A99 //log(1/frcpa(1+ 213/256) +data8 0x3FE37C299F3C366A //log(1/frcpa(1+ 214/256) +data8 0x3FE38AE2171976E7 //log(1/frcpa(1+ 215/256) +data8 0x3FE399A157A603E7 //log(1/frcpa(1+ 216/256) +data8 0x3FE3AFCCFE77B9D1 //log(1/frcpa(1+ 217/256) +data8 0x3FE3BE9D503533B5 //log(1/frcpa(1+ 218/256) +data8 0x3FE3CD7480B4A8A3 //log(1/frcpa(1+ 219/256) +data8 0x3FE3E3C43918F76C //log(1/frcpa(1+ 220/256) +data8 0x3FE3F2ACB27ED6C7 //log(1/frcpa(1+ 221/256) +data8 0x3FE4019C2125CA93 //log(1/frcpa(1+ 222/256) +data8 0x3FE4181061389722 //log(1/frcpa(1+ 223/256) +data8 0x3FE42711518DF545 //log(1/frcpa(1+ 224/256) +data8 0x3FE436194E12B6BF //log(1/frcpa(1+ 225/256) +data8 0x3FE445285D68EA69 //log(1/frcpa(1+ 226/256) +data8 0x3FE45BCC464C893A //log(1/frcpa(1+ 227/256) +data8 0x3FE46AED21F117FC //log(1/frcpa(1+ 228/256) +data8 0x3FE47A1527E8A2D3 //log(1/frcpa(1+ 229/256) +data8 0x3FE489445EFFFCCC //log(1/frcpa(1+ 230/256) +data8 0x3FE4A018BCB69835 //log(1/frcpa(1+ 231/256) +data8 0x3FE4AF5A0C9D65D7 //log(1/frcpa(1+ 232/256) +data8 0x3FE4BEA2A5BDBE87 //log(1/frcpa(1+ 233/256) +data8 0x3FE4CDF28F10AC46 //log(1/frcpa(1+ 234/256) +data8 0x3FE4DD49CF994058 //log(1/frcpa(1+ 235/256) +data8 0x3FE4ECA86E64A684 //log(1/frcpa(1+ 236/256) +data8 0x3FE503C43CD8EB68 //log(1/frcpa(1+ 237/256) +data8 0x3FE513356667FC57 //log(1/frcpa(1+ 238/256) +data8 0x3FE522AE0738A3D8 //log(1/frcpa(1+ 239/256) +data8 0x3FE5322E26867857 //log(1/frcpa(1+ 240/256) +data8 0x3FE541B5CB979809 //log(1/frcpa(1+ 241/256) +data8 0x3FE55144FDBCBD62 //log(1/frcpa(1+ 242/256) +data8 0x3FE560DBC45153C7 //log(1/frcpa(1+ 243/256) +data8 0x3FE5707A26BB8C66 //log(1/frcpa(1+ 244/256) +data8 0x3FE587F60ED5B900 //log(1/frcpa(1+ 245/256) +data8 0x3FE597A7977C8F31 //log(1/frcpa(1+ 246/256) +data8 0x3FE5A760D634BB8B //log(1/frcpa(1+ 247/256) +data8 0x3FE5B721D295F10F //log(1/frcpa(1+ 248/256) +data8 0x3FE5C6EA94431EF9 //log(1/frcpa(1+ 249/256) +data8 0x3FE5D6BB22EA86F6 //log(1/frcpa(1+ 250/256) +data8 0x3FE5E6938645D390 //log(1/frcpa(1+ 251/256) +data8 0x3FE5F673C61A2ED2 //log(1/frcpa(1+ 252/256) +data8 0x3FE6065BEA385926 //log(1/frcpa(1+ 253/256) +data8 0x3FE6164BFA7CC06B //log(1/frcpa(1+ 254/256) +data8 0x3FE62643FECF9743 //log(1/frcpa(1+ 255/256) +LOCAL_OBJECT_END(log_table_3) + + +.section .text +GLOBAL_LIBM_ENTRY(asinhf) + +{ .mfi + getf.exp asinh_GR_f8 = f8 // Must recompute later if x unorm + fclass.m p12,p0 = f8, 0x0b // Test x unorm + mov log_GR_exp_17_ones = 0x1ffff +} +{ .mfi + addl NR_table_address = @ltoff(log_table_1), gp + fma.s1 log_y = f8, f8, f1 // y = x^2 + 1 + mov asinh_GR_comp = 0xfffa +} +;; + +{ .mfi + mov log_GR_exp_16_ones = 0xffff //BIAS + fclass.m p6,p0 = f8, 0xe7 // Test for x = NaN and inf and zero + mov log_GR_comp2 = 0x10032 +} +{ .mfi + ld8 NR_table_address = [NR_table_address] + fma.s1 asinh_w_sq = f8,f8,f0 // x^2 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcmp.lt.s1 p7,p11 = f8,f0 // if x<0 + nop.i 0 +} +{ .mfb + nop.m 0 + fnorm.s1 fNormX = f8 // Normalize x +(p12) br.cond.spnt ASINH_UNORM // Branch if x=unorm +} +;; + +ASINH_COMMON: +// Return here if x=unorm and not denorm +{ .mfi + //to get second table address + adds log_table_address2 = 0x20, NR_table_address + fma.s1 log_arg = f8,f1,f8 +} +{ .mfb + nop.m 0 +(p6) fma.s.s0 f8 = f8,f1,f8 // quietize nan result if x=nan +(p6) br.ret.spnt b0 // Exit for x=nan and inf and zero +} +;; + +{ .mfi + ldfpd NR1,NR2 = [log_table_address2],16 + frsqrta.s1 log_y_rs,p0 = log_y // z=1/sqrt(y) + nop.i 0 +} +;; + +{ .mfi + ldfe log_C1 = [log_table_address2],16 + nop.f 0 + and asinh_GR_f8 = asinh_GR_f8,log_GR_exp_17_ones +} +;; + +{ .mib + ldfe log_C0 = [log_table_address2],16 + cmp.le p13,p0 = log_GR_comp2,asinh_GR_f8 +(p13) br.cond.spnt LOG_COMMON1 // Branch if path 4: |x| >= 2^51 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_y_rs_iter = log_y_rs,log_y,f0 // y*z + nop.i 0 +} +;; + +.pred.rel "mutex",p7,p11 +{ .mfi + nop.m 0 +(p11) mov asinh_f8 = fNormX + nop.i 0 +} +{ .mfb + cmp.gt p8,p0 = asinh_GR_comp,asinh_GR_f8 +(p7) fnma.s1 asinh_f8 = fNormX,f1,f0 +(p8) br.cond.spnt ASINH_NEAR_ZERO // Branch if path 2: 0 < |x| < 2^-5 +} +;; + +// Here if main path, 2^-5 <= |x| < 2^51 +///////////////////////////////// The first iteration ///////////////////////// +{ .mfi + ldfpd log_P3,log_P2 = [NR_table_address],16 + fnma.s1 log_y_rs_iter2 = log_y_rs_iter,log_y_rs,NR2 // 3-(y*z)*z + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 log_y_rs_iter1 = log_y_rs,NR1,f0 // 0.5*z + nop.i 0 +} +;; + +{ .mfi + ldfpd log_P1,log2 = [NR_table_address],16 + // (0.5*z)*(3-(y*z)*z) + fma.s1 log_y_rs_iter = log_y_rs_iter1,log_y_rs_iter2,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + // (0.5*z)*(3-(y*z)*z) + fma.s1 log_arg_early = log_y_rs_iter1,log_y_rs_iter2,f0 + nop.i 0 +} +;; + +////////////////////////////////// The second iteration //////////////////////// +{ .mfi + nop.m 0 + fma.s1 log_y_rs = log_y_rs_iter,log_y,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 log_y_rs_iter1 = log_y_rs_iter,NR1,f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_arg_early = log_arg_early,log_y,asinh_f8 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fnma.s1 log_y_rs = log_y_rs,log_y_rs_iter,NR2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 log_y_rs_iter1 = log_y_rs_iter1,log_y,f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + frcpa.s1 log_C,p0 = f1,log_arg_early + nop.i 0 +} +;; + +{ .mfi + getf.exp log_GR_signexp_f8 = log_arg_early + nop.f 0 + nop.i 0 +} +;; + +{ .mfi + getf.sig log_GR_significand_f8 = log_arg_early + // (0.5*z)*(3-(y*z)*z)*y + |x| + fma.s1 log_arg = log_y_rs_iter1,log_y_rs,asinh_f8 + //to get third table address + adds log_table_address3 = 0x30, NR_table_address +} +;; + +/////////////////////////////////////////// The end NR iterations ///////////// + +{ .mfi + nop.m 0 + nop.f 0 + //significant bit destruction + and log_GR_exp_f8 = log_GR_signexp_f8, log_GR_exp_17_ones +} +;; + +{ .mfi + //BIAS subtraction + sub log_GR_true_exp_f8 = log_GR_exp_f8, log_GR_exp_16_ones +(p7) fnma.s1 log2 = log2,f1,f0 + nop.i 0 +} +;; + +{ .mfi + setf.sig log_int_Nfloat = log_GR_true_exp_f8 + fms.s1 log_r = log_C,log_arg,f1 //C = frcpa(x); r = C * x - 1 + extr.u log_GR_index = log_GR_significand_f8,55,8 //Extract 8 bits +} +;; + +{ .mmi + //pre-index*16 + index + shladd log_table_address3 = log_GR_index,3,log_table_address3 +;; + ldfd log_T = [log_table_address3] + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_rsq = log_r, log_r, f0 //r^2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 log_rp_p32 = log_P3, log_r, log_P2 //P3*r + P2 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_rp_p10 = log_P1, log_r, f1 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + //convert N to the floating-point format + fcvt.xf log_Nfloat = log_int_Nfloat + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_rp_p2 = log_rp_p32, log_rsq, log_rp_p10 + nop.i 0 +} +;; + +.pred.rel "mutex",p7,p11 +{ .mfi + nop.m 0 +(p11) fma.s1 log_T_plus_Nlog2 = log_Nfloat,log2,log_T //N*log2 + T if x>0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p7) fms.s1 log_T_plus_Nlog2 = log_Nfloat,log2,log_T //N*log2 - T if x<0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p11) fma.s.s0 f8 = log_rp_p2,log_r,log_T_plus_Nlog2 + nop.i 0 +} +{ .mfb + nop.m 0 +(p7) fnma.s.s0 f8 = log_rp_p2,log_r,log_T_plus_Nlog2 + br.ret.sptk b0 // Exit main path, path 3: 2^-5 <= |x| < 2^51 +} +;; + + +// Here if path 4, |x| >= 2^51 +LOG_COMMON1: +{ .mfi + ldfpd log_P3,log_P2 = [NR_table_address],16 + nop.f 0 + nop.i 0 +} +;; + +{ .mfi + ldfpd log_P1,log2 = [NR_table_address],16 + frcpa.s1 log_C,p0 = f1,log_arg + nop.i 0 +} +;; + +{ .mfi + getf.exp log_GR_signexp_f8 = log_arg + nop.f 0 + //to get third table address + adds log_table_address3 = 0x30, NR_table_address +} +;; + +{ .mfi + getf.sig log_GR_significand_f8 = log_arg + nop.f 0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + nop.f 0 + //to destroy the most bit in the significant area + and log_GR_exp_f8 = log_GR_signexp_f8, log_GR_exp_17_ones +} +;; + +{ .mmf + nop.m 0 + //BIAS subtraction + sub log_GR_true_exp_f8 = log_GR_exp_f8, log_GR_exp_16_ones + fms.s1 log_r = log_C,log_arg,f1 //C = frcpa(x); r = C * x - 1 +} +;; + +{ .mfi + setf.sig log_int_Nfloat = log_GR_true_exp_f8 + nop.f 0 + extr.u log_GR_index = log_GR_significand_f8,55,8 //Extract 8 bits +} +;; + +{ .mmi + //pre-index*16 + index + shladd log_table_address3 = log_GR_index,3,log_table_address3 +;; + ldfd log_T = [log_table_address3] + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_rsq = log_r, log_r, f0 //r^2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 log_rp_p32 = log_P3, log_r, log_P2 //P3*r + P2 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_rp_p10 = log_P1, log_r, f1 + nop.i 0 +} +{ .mfi + nop.m 0 +(p7) fnma.s1 log2 = log2,f1,f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + //convert N to the floating-point format + fcvt.xf log_Nfloat = log_int_Nfloat + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 log_rp_p2 = log_rp_p32, log_rsq, log_rp_p10 + nop.i 0 +} +;; + +.pred.rel "mutex",p7,p11 +{ .mfi + nop.m 0 +(p11) fma.s1 log_T_plus_Nlog2 = log_Nfloat,log2,log_T //N*log2 + T if x>0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p7) fms.s1 log_T_plus_Nlog2 = log_Nfloat,log2,log_T //N*log2 - T if x<0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p11) fma.s.s0 f8 = log_rp_p2,log_r,log_T_plus_Nlog2 + nop.i 0 +} +{ .mfb + nop.m 0 +(p7) fnma.s.s0 f8 = log_rp_p2,log_r,log_T_plus_Nlog2 + br.ret.sptk b0 // Exit path 4, |x| >= 2^51 +} +;; + +// Here if path 2, 0 < |x| < 2^-5 +ASINH_NEAR_ZERO: +{ .mfi + nop.m 0 + fma.s1 asinh_w_1 = asinh_w_sq,log_C1,log_C0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 asinh_w_cube = asinh_w_sq,fNormX,f0 + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + fma.s.s0 f8 = asinh_w_1,asinh_w_cube,fNormX + br.ret.sptk b0 // Exit path 2, 0 < |x| < 2^-5 +} +;; + +ASINH_UNORM: +// Here if x=unorm +{ .mfi + getf.exp asinh_GR_f8 = fNormX // Recompute if x unorm + fclass.m p0,p13 = fNormX, 0x0b // Test x denorm + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + fcmp.eq.s0 p14,p0 = f8, f0 // Dummy to set denormal flag +(p13) br.cond.sptk ASINH_COMMON // Continue if x unorm and not denorm +} +;; + +.pred.rel "mutex",p7,p11 +{ .mfi + nop.m 0 +(p7) fma.s.s0 f8 = f8,f8,f8 // Result x+x^2 if x=-denorm + nop.i 0 +} +{ .mfb + nop.m 0 +(p11) fnma.s.s0 f8 = f8,f8,f8 // Result x-x^2 if x=+denorm + br.ret.spnt b0 // Exit if denorm +} +;; + +GLOBAL_LIBM_END(asinhf) diff --git a/sysdeps/ia64/fpu/s_asinhl.S b/sysdeps/ia64/fpu/s_asinhl.S new file mode 100644 index 0000000000..d3a5507a32 --- /dev/null +++ b/sysdeps/ia64/fpu/s_asinhl.S @@ -0,0 +1,1347 @@ +.file "asinhl.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +//********************************************************************* +// +// History: +// 09/04/01 Initial version +// 09/13/01 Performance improved, symmetry problems fixed +// 10/10/01 Performance improved, split issues removed +// 12/11/01 Changed huges_logp to not be global +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align; +// used data8 for long double table values +// +//********************************************************************* +// +// API +//============================================================== +// long double asinhl(long double); +// +// Overview of operation +//============================================================== +// +// There are 6 paths: +// 1. x = 0, [S,Q]Nan or +/-INF +// Return asinhl(x) = x + x; +// +// 2. x = + denormal +// Return asinhl(x) = x - x^2; +// +// 3. x = - denormal +// Return asinhl(x) = x + x^2; +// +// 4. 'Near 0': max denormal < |x| < 1/128 +// Return asinhl(x) = sign(x)*(x+x^3*(c3+x^2*(c5+x^2*(c7+x^2*(c9))))); +// +// 5. 'Huges': |x| > 2^63 +// Return asinhl(x) = sign(x)*(logl(2*x)); +// +// 6. 'Main path': 1/128 < |x| < 2^63 +// b_hi + b_lo = x + sqrt(x^2 + 1); +// asinhl(x) = sign(x)*(log_special(b_hi, b_lo)); +// +// Algorithm description +//============================================================== +// +// Main path algorithm +// ( thanks to Peter Markstein for the idea of sqrt(x^2+1) computation! ) +// ************************************************************************* +// +// There are 3 parts of x+sqrt(x^2+1) computation: +// +// 1) p2 = (p2_hi+p2_lo) = x^2+1 obtaining +// ------------------------------------ +// p2_hi = x2_hi + 1, where x2_hi = x * x; +// p2_lo = x2_lo + p1_lo, where +// x2_lo = FMS(x*x-x2_hi), +// p1_lo = (1 - p2_hi) + x2_hi; +// +// 2) g = (g_hi+g_lo) = sqrt(p2) = sqrt(p2_hi+p2_lo) +// ---------------------------------------------- +// r = invsqrt(p2_hi) (8-bit reciprocal square root approximation); +// g = p2_hi * r (first 8 bit-approximation of sqrt); +// +// h = 0.5 * r; +// e = 0.5 - g * h; +// g = g * e + g (second 16 bit-approximation of sqrt); +// +// h = h * e + h; +// e = 0.5 - g * h; +// g = g * e + g (third 32 bit-approximation of sqrt); +// +// h = h * e + h; +// e = 0.5 - g * h; +// g_hi = g * e + g (fourth 64 bit-approximation of sqrt); +// +// Remainder computation: +// h = h * e + h; +// d = (p2_hi - g_hi * g_hi) + p2_lo; +// g_lo = d * h; +// +// 3) b = (b_hi + b_lo) = x + g, where g = (g_hi + g_lo) = sqrt(x^2+1) +// ------------------------------------------------------------------- +// b_hi = (g_hi + x) + gl; +// b_lo = (g_hi - b_hi) + x + gl; +// +// Now we pass b presented as sum b_hi + b_lo to special version +// of logl function which accept a pair of arguments as +// 'mutiprecision' value. +// +// Special log algorithm overview +// ================================ +// Here we use a table lookup method. The basic idea is that in +// order to compute logl(Arg) = logl (Arg-1) for an argument Arg in [1,2), +// we construct a value G such that G*Arg is close to 1 and that +// logl(1/G) is obtainable easily from a table of values calculated +// beforehand. Thus +// +// logl(Arg) = logl(1/G) + logl((G*Arg - 1)) +// +// Because |G*Arg - 1| is small, the second term on the right hand +// side can be approximated by a short polynomial. We elaborate +// this method in four steps. +// +// Step 0: Initialization +// +// We need to calculate logl( X ). Obtain N, S_hi such that +// +// X = 2^N * ( S_hi + S_lo ) exactly +// +// where S_hi in [1,2) and S_lo is a correction to S_hi in the sense +// that |S_lo| <= ulp(S_hi). +// +// For the special version of logl: S_lo = b_lo +// !-----------------------------------------------! +// +// Step 1: Argument Reduction +// +// Based on S_hi, obtain G_1, G_2, G_3 from a table and calculate +// +// G := G_1 * G_2 * G_3 +// r := (G * S_hi - 1) + G * S_lo +// +// These G_j's have the property that the product is exactly +// representable and that |r| < 2^(-12) as a result. +// +// Step 2: Approximation +// +// logl(1 + r) is approximated by a short polynomial poly(r). +// +// Step 3: Reconstruction +// +// Finally, +// +// logl( X ) = logl( 2^N * (S_hi + S_lo) ) +// ~=~ N*logl(2) + logl(1/G) + logl(1 + r) +// ~=~ N*logl(2) + logl(1/G) + poly(r). +// +// For detailed description see logl or log1pl function, regular path. +// +// Registers used +//============================================================== +// Floating Point registers used: +// f8, input +// f32 -> f101 (70 registers) + +// General registers used: +// r32 -> r57 (26 registers) + +// Predicate registers used: +// p6 -> p11 +// p6 for '0, NaNs, Inf' path +// p7 for '+ denormals' path +// p8 for 'near 0' path +// p9 for 'huges' path +// p10 for '- denormals' path +// p11 for negative values +// +// Data tables +//============================================================== + +RODATA +.align 64 + +// C7, C9 'near 0' polynomial coefficients +LOCAL_OBJECT_START(Poly_C_near_0_79) +data8 0xF8DC939BBEDD5A54, 0x00003FF9 +data8 0xB6DB6DAB21565AC5, 0x0000BFFA +LOCAL_OBJECT_END(Poly_C_near_0_79) + +// C3, C5 'near 0' polynomial coefficients +LOCAL_OBJECT_START(Poly_C_near_0_35) +data8 0x999999999991D582, 0x00003FFB +data8 0xAAAAAAAAAAAAAAA9, 0x0000BFFC +LOCAL_OBJECT_END(Poly_C_near_0_35) + +// Q coeffs +LOCAL_OBJECT_START(Constants_Q) +data4 0x00000000,0xB1721800,0x00003FFE,0x00000000 +data4 0x4361C4C6,0x82E30865,0x0000BFE2,0x00000000 +data4 0x328833CB,0xCCCCCAF2,0x00003FFC,0x00000000 +data4 0xA9D4BAFB,0x80000077,0x0000BFFD,0x00000000 +data4 0xAAABE3D2,0xAAAAAAAA,0x00003FFD,0x00000000 +data4 0xFFFFDAB7,0xFFFFFFFF,0x0000BFFD,0x00000000 +LOCAL_OBJECT_END(Constants_Q) + +// Z1 - 16 bit fixed +LOCAL_OBJECT_START(Constants_Z_1) +data4 0x00008000 +data4 0x00007879 +data4 0x000071C8 +data4 0x00006BCB +data4 0x00006667 +data4 0x00006187 +data4 0x00005D18 +data4 0x0000590C +data4 0x00005556 +data4 0x000051EC +data4 0x00004EC5 +data4 0x00004BDB +data4 0x00004925 +data4 0x0000469F +data4 0x00004445 +data4 0x00004211 +LOCAL_OBJECT_END(Constants_Z_1) + +// G1 and H1 - IEEE single and h1 - IEEE double +LOCAL_OBJECT_START(Constants_G_H_h1) +data4 0x3F800000,0x00000000 +data8 0x0000000000000000 +data4 0x3F70F0F0,0x3D785196 +data8 0x3DA163A6617D741C +data4 0x3F638E38,0x3DF13843 +data8 0x3E2C55E6CBD3D5BB +data4 0x3F579430,0x3E2FF9A0 +data8 0xBE3EB0BFD86EA5E7 +data4 0x3F4CCCC8,0x3E647FD6 +data8 0x3E2E6A8C86B12760 +data4 0x3F430C30,0x3E8B3AE7 +data8 0x3E47574C5C0739BA +data4 0x3F3A2E88,0x3EA30C68 +data8 0x3E20E30F13E8AF2F +data4 0x3F321640,0x3EB9CEC8 +data8 0xBE42885BF2C630BD +data4 0x3F2AAAA8,0x3ECF9927 +data8 0x3E497F3497E577C6 +data4 0x3F23D708,0x3EE47FC5 +data8 0x3E3E6A6EA6B0A5AB +data4 0x3F1D89D8,0x3EF8947D +data8 0xBDF43E3CD328D9BE +data4 0x3F17B420,0x3F05F3A1 +data8 0x3E4094C30ADB090A +data4 0x3F124920,0x3F0F4303 +data8 0xBE28FBB2FC1FE510 +data4 0x3F0D3DC8,0x3F183EBF +data8 0x3E3A789510FDE3FA +data4 0x3F088888,0x3F20EC80 +data8 0x3E508CE57CC8C98F +data4 0x3F042108,0x3F29516A +data8 0xBE534874A223106C +LOCAL_OBJECT_END(Constants_G_H_h1) + +// Z2 - 16 bit fixed +LOCAL_OBJECT_START(Constants_Z_2) +data4 0x00008000 +data4 0x00007F81 +data4 0x00007F02 +data4 0x00007E85 +data4 0x00007E08 +data4 0x00007D8D +data4 0x00007D12 +data4 0x00007C98 +data4 0x00007C20 +data4 0x00007BA8 +data4 0x00007B31 +data4 0x00007ABB +data4 0x00007A45 +data4 0x000079D1 +data4 0x0000795D +data4 0x000078EB +LOCAL_OBJECT_END(Constants_Z_2) + +// G2 and H2 - IEEE single and h2 - IEEE double +LOCAL_OBJECT_START(Constants_G_H_h2) +data4 0x3F800000,0x00000000 +data8 0x0000000000000000 +data4 0x3F7F00F8,0x3B7F875D +data8 0x3DB5A11622C42273 +data4 0x3F7E03F8,0x3BFF015B +data8 0x3DE620CF21F86ED3 +data4 0x3F7D08E0,0x3C3EE393 +data8 0xBDAFA07E484F34ED +data4 0x3F7C0FC0,0x3C7E0586 +data8 0xBDFE07F03860BCF6 +data4 0x3F7B1880,0x3C9E75D2 +data8 0x3DEA370FA78093D6 +data4 0x3F7A2328,0x3CBDC97A +data8 0x3DFF579172A753D0 +data4 0x3F792FB0,0x3CDCFE47 +data8 0x3DFEBE6CA7EF896B +data4 0x3F783E08,0x3CFC15D0 +data8 0x3E0CF156409ECB43 +data4 0x3F774E38,0x3D0D874D +data8 0xBE0B6F97FFEF71DF +data4 0x3F766038,0x3D1CF49B +data8 0xBE0804835D59EEE8 +data4 0x3F757400,0x3D2C531D +data8 0x3E1F91E9A9192A74 +data4 0x3F748988,0x3D3BA322 +data8 0xBE139A06BF72A8CD +data4 0x3F73A0D0,0x3D4AE46F +data8 0x3E1D9202F8FBA6CF +data4 0x3F72B9D0,0x3D5A1756 +data8 0xBE1DCCC4BA796223 +data4 0x3F71D488,0x3D693B9D +data8 0xBE049391B6B7C239 +LOCAL_OBJECT_END(Constants_G_H_h2) + +// G3 and H3 - IEEE single and h3 - IEEE double +LOCAL_OBJECT_START(Constants_G_H_h3) +data4 0x3F7FFC00,0x38800100 +data8 0x3D355595562224CD +data4 0x3F7FF400,0x39400480 +data8 0x3D8200A206136FF6 +data4 0x3F7FEC00,0x39A00640 +data8 0x3DA4D68DE8DE9AF0 +data4 0x3F7FE400,0x39E00C41 +data8 0xBD8B4291B10238DC +data4 0x3F7FDC00,0x3A100A21 +data8 0xBD89CCB83B1952CA +data4 0x3F7FD400,0x3A300F22 +data8 0xBDB107071DC46826 +data4 0x3F7FCC08,0x3A4FF51C +data8 0x3DB6FCB9F43307DB +data4 0x3F7FC408,0x3A6FFC1D +data8 0xBD9B7C4762DC7872 +data4 0x3F7FBC10,0x3A87F20B +data8 0xBDC3725E3F89154A +data4 0x3F7FB410,0x3A97F68B +data8 0xBD93519D62B9D392 +data4 0x3F7FAC18,0x3AA7EB86 +data8 0x3DC184410F21BD9D +data4 0x3F7FA420,0x3AB7E101 +data8 0xBDA64B952245E0A6 +data4 0x3F7F9C20,0x3AC7E701 +data8 0x3DB4B0ECAABB34B8 +data4 0x3F7F9428,0x3AD7DD7B +data8 0x3D9923376DC40A7E +data4 0x3F7F8C30,0x3AE7D474 +data8 0x3DC6E17B4F2083D3 +data4 0x3F7F8438,0x3AF7CBED +data8 0x3DAE314B811D4394 +data4 0x3F7F7C40,0x3B03E1F3 +data8 0xBDD46F21B08F2DB1 +data4 0x3F7F7448,0x3B0BDE2F +data8 0xBDDC30A46D34522B +data4 0x3F7F6C50,0x3B13DAAA +data8 0x3DCB0070B1F473DB +data4 0x3F7F6458,0x3B1BD766 +data8 0xBDD65DDC6AD282FD +data4 0x3F7F5C68,0x3B23CC5C +data8 0xBDCDAB83F153761A +data4 0x3F7F5470,0x3B2BC997 +data8 0xBDDADA40341D0F8F +data4 0x3F7F4C78,0x3B33C711 +data8 0x3DCD1BD7EBC394E8 +data4 0x3F7F4488,0x3B3BBCC6 +data8 0xBDC3532B52E3E695 +data4 0x3F7F3C90,0x3B43BAC0 +data8 0xBDA3961EE846B3DE +data4 0x3F7F34A0,0x3B4BB0F4 +data8 0xBDDADF06785778D4 +data4 0x3F7F2CA8,0x3B53AF6D +data8 0x3DCC3ED1E55CE212 +data4 0x3F7F24B8,0x3B5BA620 +data8 0xBDBA31039E382C15 +data4 0x3F7F1CC8,0x3B639D12 +data8 0x3D635A0B5C5AF197 +data4 0x3F7F14D8,0x3B6B9444 +data8 0xBDDCCB1971D34EFC +data4 0x3F7F0CE0,0x3B7393BC +data8 0x3DC7450252CD7ADA +data4 0x3F7F04F0,0x3B7B8B6D +data8 0xBDB68F177D7F2A42 +LOCAL_OBJECT_END(Constants_G_H_h3) + +// Assembly macros +//============================================================== + +// Floating Point Registers + +FR_Arg = f8 +FR_Res = f8 +FR_AX = f32 +FR_XLog_Hi = f33 +FR_XLog_Lo = f34 + + // Special logl registers +FR_Y_hi = f35 +FR_Y_lo = f36 + +FR_Scale = f37 +FR_X_Prime = f38 +FR_S_hi = f39 +FR_W = f40 +FR_G = f41 + +FR_H = f42 +FR_wsq = f43 +FR_w4 = f44 +FR_h = f45 +FR_w6 = f46 + +FR_G2 = f47 +FR_H2 = f48 +FR_poly_lo = f49 +FR_P8 = f50 +FR_poly_hi = f51 + +FR_P7 = f52 +FR_h2 = f53 +FR_rsq = f54 +FR_P6 = f55 +FR_r = f56 + +FR_log2_hi = f57 +FR_log2_lo = f58 + +FR_float_N = f59 +FR_Q4 = f60 + +FR_G3 = f61 +FR_H3 = f62 +FR_h3 = f63 + +FR_Q3 = f64 +FR_Q2 = f65 +FR_1LN10_hi = f66 + +FR_Q1 = f67 +FR_1LN10_lo = f68 +FR_P5 = f69 +FR_rcub = f70 + +FR_Neg_One = f71 +FR_Z = f72 +FR_AA = f73 +FR_BB = f74 +FR_S_lo = f75 +FR_2_to_minus_N = f76 + + + // Huge & Main path prolog registers +FR_Half = f77 +FR_Two = f78 +FR_X2 = f79 +FR_P2 = f80 +FR_P2L = f81 +FR_Rcp = f82 +FR_GG = f83 +FR_HH = f84 +FR_EE = f85 +FR_DD = f86 +FR_GL = f87 +FR_A = f88 +FR_AL = f89 +FR_B = f90 +FR_BL = f91 +FR_Tmp = f92 + + // Near 0 & Huges path prolog registers +FR_C3 = f93 +FR_C5 = f94 +FR_C7 = f95 +FR_C9 = f96 + +FR_X3 = f97 +FR_X4 = f98 +FR_P9 = f99 +FR_P5 = f100 +FR_P3 = f101 + + +// General Purpose Registers + + // General prolog registers +GR_PFS = r32 +GR_TwoN7 = r40 +GR_TwoP63 = r41 +GR_ExpMask = r42 +GR_ArgExp = r43 +GR_Half = r44 + + // Near 0 path prolog registers +GR_Poly_C_35 = r45 +GR_Poly_C_79 = r46 + + // Special logl registers +GR_Index1 = r34 +GR_Index2 = r35 +GR_signif = r36 +GR_X_0 = r37 +GR_X_1 = r38 +GR_X_2 = r39 +GR_Z_1 = r40 +GR_Z_2 = r41 +GR_N = r42 +GR_Bias = r43 +GR_M = r44 +GR_Index3 = r45 +GR_exp_2tom80 = r45 +GR_exp_mask = r47 +GR_exp_2tom7 = r48 +GR_ad_ln10 = r49 +GR_ad_tbl_1 = r50 +GR_ad_tbl_2 = r51 +GR_ad_tbl_3 = r52 +GR_ad_q = r53 +GR_ad_z_1 = r54 +GR_ad_z_2 = r55 +GR_ad_z_3 = r56 +GR_minus_N = r57 + + + +.section .text +GLOBAL_LIBM_ENTRY(asinhl) + +{ .mfi + alloc GR_PFS = ar.pfs,0,27,0,0 + fma.s1 FR_P2 = FR_Arg, FR_Arg, f1 // p2 = x^2 + 1 + mov GR_Half = 0xfffe // 0.5's exp +} +{ .mfi + addl GR_Poly_C_79 = @ltoff(Poly_C_near_0_79), gp // C7, C9 coeffs + fma.s1 FR_X2 = FR_Arg, FR_Arg, f0 // Obtain x^2 + addl GR_Poly_C_35 = @ltoff(Poly_C_near_0_35), gp // C3, C5 coeffs +};; + +{ .mfi + getf.exp GR_ArgExp = FR_Arg // get arument's exponent + fabs FR_AX = FR_Arg // absolute value of argument + mov GR_TwoN7 = 0xfff8 // 2^-7 exp +} +{ .mfi + ld8 GR_Poly_C_79 = [GR_Poly_C_79] // get actual coeff table address + fma.s0 FR_Two = f1, f1, f1 // construct 2.0 + mov GR_ExpMask = 0x1ffff // mask for exp +};; + +{ .mfi + ld8 GR_Poly_C_35 = [GR_Poly_C_35] // get actual coeff table address + fclass.m p6,p0 = FR_Arg, 0xe7 // if arg NaN inf zero + mov GR_TwoP63 = 0x1003e // 2^63 exp +} +{ .mfi + addl GR_ad_z_1 = @ltoff(Constants_Z_1#),gp + nop.f 0 + nop.i 0 +};; + +{ .mfi + setf.exp FR_Half = GR_Half // construct 0.5 + fclass.m p7,p0 = FR_Arg, 0x09 // if arg + denorm + and GR_ArgExp = GR_ExpMask, GR_ArgExp // select exp +} +{ .mfb + ld8 GR_ad_z_1 = [GR_ad_z_1] // Get pointer to Constants_Z_1 + nop.f 0 + nop.b 0 +};; +{ .mfi + ldfe FR_C9 = [GR_Poly_C_79],16 // load C9 + fclass.m p10,p0 = FR_Arg, 0x0a // if arg - denorm + cmp.gt p8, p0 = GR_TwoN7, GR_ArgExp // if arg < 2^-7 ('near 0') +} +{ .mfb + cmp.le p9, p0 = GR_TwoP63, GR_ArgExp // if arg > 2^63 ('huges') +(p6) fma.s0 FR_Res = FR_Arg,f1,FR_Arg // r = a + a +(p6) br.ret.spnt b0 // return +};; +// (X^2 + 1) computation +{ .mfi +(p8) ldfe FR_C5 = [GR_Poly_C_35],16 // load C5 + fms.s1 FR_Tmp = f1, f1, FR_P2 // Tmp = 1 - p2 + add GR_ad_tbl_1 = 0x040, GR_ad_z_1 // Point to Constants_G_H_h1 +} +{ .mfb +(p8) ldfe FR_C7 = [GR_Poly_C_79],16 // load C7 +(p7) fnma.s0 FR_Res = FR_Arg,FR_Arg,FR_Arg // r = a - a*a +(p7) br.ret.spnt b0 // return +};; + +{ .mfi +(p8) ldfe FR_C3 = [GR_Poly_C_35],16 // load C3 + fcmp.lt.s1 p11, p12 = FR_Arg, f0 // if arg is negative + add GR_ad_q = -0x60, GR_ad_z_1 // Point to Constants_P +} +{ .mfb + add GR_ad_z_2 = 0x140, GR_ad_z_1 // Point to Constants_Z_2 +(p10) fma.s0 FR_Res = FR_Arg,FR_Arg,FR_Arg // r = a + a*a +(p10) br.ret.spnt b0 // return +};; + +{ .mfi + add GR_ad_tbl_2 = 0x180, GR_ad_z_1 // Point to Constants_G_H_h2 + frsqrta.s1 FR_Rcp, p0 = FR_P2 // Rcp = 1/p2 reciprocal appr. + add GR_ad_tbl_3 = 0x280, GR_ad_z_1 // Point to Constants_G_H_h3 +} +{ .mfi + nop.m 0 + fms.s1 FR_P2L = FR_AX, FR_AX, FR_X2 //low part of p2=fma(X*X-p2) + mov GR_Bias = 0x0FFFF // Create exponent bias +};; + +{ .mfb + nop.m 0 +(p9) fms.s1 FR_XLog_Hi = FR_Two, FR_AX, f0 // Hi of log1p arg = 2*X - 1 +(p9) br.cond.spnt huges_logl // special version of log1p +};; + +{ .mfb + ldfe FR_log2_hi = [GR_ad_q],16 // Load log2_hi +(p8) fma.s1 FR_X3 = FR_X2, FR_Arg, f0 // x^3 = x^2 * x +(p8) br.cond.spnt near_0 // Go to near 0 branch +};; + +{ .mfi + ldfe FR_log2_lo = [GR_ad_q],16 // Load log2_lo + nop.f 0 + nop.i 0 +};; + +{ .mfi + ldfe FR_Q4 = [GR_ad_q],16 // Load Q4 + fma.s1 FR_Tmp = FR_Tmp, f1, FR_X2 // Tmp = Tmp + x^2 + mov GR_exp_mask = 0x1FFFF // Create exponent mask +};; + +{ .mfi + ldfe FR_Q3 = [GR_ad_q],16 // Load Q3 + fma.s1 FR_GG = FR_Rcp, FR_P2, f0 // g = Rcp * p2 + // 8 bit Newton Raphson iteration + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_HH = FR_Half, FR_Rcp, f0 // h = 0.5 * Rcp + nop.i 0 +};; +{ .mfi + ldfe FR_Q2 = [GR_ad_q],16 // Load Q2 + fnma.s1 FR_EE = FR_GG, FR_HH, FR_Half // e = 0.5 - g * h + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_P2L = FR_Tmp, f1, FR_P2L // low part of p2 = Tmp + p2l + nop.i 0 +};; + +{ .mfi + ldfe FR_Q1 = [GR_ad_q] // Load Q1 + fma.s1 FR_GG = FR_GG, FR_EE, FR_GG // g = g * e + g + // 16 bit Newton Raphson iteration + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_HH = FR_HH, FR_EE, FR_HH // h = h * e + h + nop.i 0 +};; + +{ .mfi + nop.m 0 + fnma.s1 FR_EE = FR_GG, FR_HH, FR_Half // e = 0.5 - g * h + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_GG = FR_GG, FR_EE, FR_GG // g = g * e + g + // 32 bit Newton Raphson iteration + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_HH = FR_HH, FR_EE, FR_HH // h = h * e + h + nop.i 0 +};; + +{ .mfi + nop.m 0 + fnma.s1 FR_EE = FR_GG, FR_HH, FR_Half // e = 0.5 - g * h + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_GG = FR_GG, FR_EE, FR_GG // g = g * e + g + // 64 bit Newton Raphson iteration + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_HH = FR_HH, FR_EE, FR_HH // h = h * e + h + nop.i 0 +};; + +{ .mfi + nop.m 0 + fnma.s1 FR_DD = FR_GG, FR_GG, FR_P2 // Remainder d = g * g - p2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_XLog_Hi = FR_AX, f1, FR_GG // bh = z + gh + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_DD = FR_DD, f1, FR_P2L // add p2l: d = d + p2l + nop.i 0 +};; + + +{ .mfi + getf.sig GR_signif = FR_XLog_Hi // Get significand of x+1 + fmerge.ns FR_Neg_One = f1, f1 // Form -1.0 + mov GR_exp_2tom7 = 0x0fff8 // Exponent of 2^-7 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_GL = FR_DD, FR_HH, f0 // gl = d * h + extr.u GR_Index1 = GR_signif, 59, 4 // Get high 4 bits of signif +} +{ .mfi + nop.m 0 + fma.s1 FR_XLog_Hi = FR_DD, FR_HH, FR_XLog_Hi // bh = bh + gl + nop.i 0 +};; + +{ .mmi + shladd GR_ad_z_1 = GR_Index1, 2, GR_ad_z_1 // Point to Z_1 + shladd GR_ad_tbl_1 = GR_Index1, 4, GR_ad_tbl_1 // Point to G_1 + extr.u GR_X_0 = GR_signif, 49, 15 // Get high 15 bits of signif. +};; + +{ .mmi + ld4 GR_Z_1 = [GR_ad_z_1] // Load Z_1 + nop.m 0 + nop.i 0 +};; + +{ .mmi + ldfps FR_G, FR_H = [GR_ad_tbl_1],8 // Load G_1, H_1 + nop.m 0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_XLog_Lo = FR_GG, f1, FR_XLog_Hi // bl = gh - bh + pmpyshr2.u GR_X_1 = GR_X_0,GR_Z_1,15 // Get bits 30-15 of X_0 * Z_1 +};; + +// WE CANNOT USE GR_X_1 IN NEXT 3 CYCLES BECAUSE OF POSSIBLE 10 CLOCKS STALL! +// "DEAD" ZONE! + +{ .mfi + nop.m 0 + nop.f 0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fmerge.se FR_S_hi = f1,FR_XLog_Hi // Form |x+1| + nop.i 0 +};; + +{ .mmi + getf.exp GR_N = FR_XLog_Hi // Get N = exponent of x+1 + ldfd FR_h = [GR_ad_tbl_1] // Load h_1 + nop.i 0 +};; + +{ .mfi + nop.m 0 + nop.f 0 + extr.u GR_Index2 = GR_X_1, 6, 4 // Extract bits 6-9 of X_1 +};; + + +{ .mfi + shladd GR_ad_tbl_2 = GR_Index2, 4, GR_ad_tbl_2 // Point to G_2 + fma.s1 FR_XLog_Lo = FR_XLog_Lo, f1, FR_AX // bl = bl + x + mov GR_exp_2tom80 = 0x0ffaf // Exponent of 2^-80 +} +{ .mfi + shladd GR_ad_z_2 = GR_Index2, 2, GR_ad_z_2 // Point to Z_2 + nop.f 0 + sub GR_N = GR_N, GR_Bias // sub bias from exp +};; + +{ .mmi + ldfps FR_G2, FR_H2 = [GR_ad_tbl_2],8 // Load G_2, H_2 + ld4 GR_Z_2 = [GR_ad_z_2] // Load Z_2 + sub GR_minus_N = GR_Bias, GR_N // Form exponent of 2^(-N) +};; + +{ .mmi + ldfd FR_h2 = [GR_ad_tbl_2] // Load h_2 + nop.m 0 + nop.i 0 +};; + +{ .mmi + setf.sig FR_float_N = GR_N // Put integer N into rightmost sign + setf.exp FR_2_to_minus_N = GR_minus_N // Form 2^(-N) + pmpyshr2.u GR_X_2 = GR_X_1,GR_Z_2,15 // Get bits 30-15 of X_1 * Z_2 +};; + +// WE CANNOT USE GR_X_2 IN NEXT 3 CYCLES ("DEAD" ZONE!) +// BECAUSE OF POSSIBLE 10 CLOCKS STALL! +// So we can negate Q coefficients there for negative values + +{ .mfi + nop.m 0 +(p11) fma.s1 FR_Q1 = FR_Q1, FR_Neg_One, f0 // Negate Q1 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_XLog_Lo = FR_XLog_Lo, f1, FR_GL // bl = bl + gl + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p11) fma.s1 FR_Q2 = FR_Q2, FR_Neg_One, f0 // Negate Q2 + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p11) fma.s1 FR_Q3 = FR_Q3, FR_Neg_One, f0 // Negate Q3 + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p11) fma.s1 FR_Q4 = FR_Q4, FR_Neg_One, f0 // Negate Q4 + extr.u GR_Index3 = GR_X_2, 1, 5 // Extract bits 1-5 of X_2 +};; + +{ .mfi + shladd GR_ad_tbl_3 = GR_Index3, 4, GR_ad_tbl_3 // Point to G_3 + nop.f 0 + nop.i 0 +};; + +{ .mfi + ldfps FR_G3, FR_H3 = [GR_ad_tbl_3],8 // Load G_3, H_3 + nop.f 0 + nop.i 0 +};; + +{ .mfi + ldfd FR_h3 = [GR_ad_tbl_3] // Load h_3 + fcvt.xf FR_float_N = FR_float_N + nop.i 0 +};; + +{ .mfi + nop.m 0 + fmpy.s1 FR_G = FR_G, FR_G2 // G = G_1 * G_2 + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 FR_H = FR_H, FR_H2 // H = H_1 + H_2 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fadd.s1 FR_h = FR_h, FR_h2 // h = h_1 + h_2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_S_lo = FR_XLog_Lo, FR_2_to_minus_N, f0 //S_lo=S_lo*2^-N + nop.i 0 +};; + +{ .mfi + nop.m 0 + fmpy.s1 FR_G = FR_G, FR_G3 // G = (G_1 * G_2) * G_3 + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 FR_H = FR_H, FR_H3 // H = (H_1 + H_2) + H_3 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fadd.s1 FR_h = FR_h, FR_h3 // h = (h_1 + h_2) + h_3 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_r = FR_G, FR_S_hi, f1 // r = G * S_hi - 1 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_Y_hi = FR_float_N, FR_log2_hi, FR_H // Y_hi=N*log2_hi+H + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_h = FR_float_N, FR_log2_lo, FR_h // h=N*log2_lo+h + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r = FR_G, FR_S_lo, FR_r // r=G*S_lo+(G*S_hi-1) + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_poly_lo = FR_r, FR_Q4, FR_Q3 // poly_lo = r * Q4 + Q3 + nop.i 0 +} +{ .mfi + nop.m 0 + fmpy.s1 FR_rsq = FR_r, FR_r // rsq = r * r + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_poly_lo = FR_poly_lo, FR_r, FR_Q2 // poly_lo=poly_lo*r+Q2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_rcub = FR_rsq, FR_r, f0 // rcub = r^3 + nop.i 0 +};; + +.pred.rel "mutex",p12,p11 +{ .mfi + nop.m 0 +(p12) fma.s1 FR_poly_hi = FR_Q1, FR_rsq, FR_r // poly_hi = Q1*rsq + r + nop.i 0 +} +{ .mfi + nop.m 0 +(p11) fms.s1 FR_poly_hi = FR_Q1, FR_rsq, FR_r // poly_hi = Q1*rsq + r + nop.i 0 +};; + + +.pred.rel "mutex",p12,p11 +{ .mfi + nop.m 0 +(p12) fma.s1 FR_poly_lo = FR_poly_lo, FR_rcub, FR_h//poly_lo=poly_lo*r^3+h + nop.i 0 +} +{ .mfi + nop.m 0 +(p11) fms.s1 FR_poly_lo = FR_poly_lo, FR_rcub, FR_h//poly_lo=poly_lo*r^3+h + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fadd.s0 FR_Y_lo = FR_poly_hi, FR_poly_lo + // Y_lo=poly_hi+poly_lo + nop.i 0 +} +{ .mfi + nop.m 0 +(p11) fma.s0 FR_Y_hi = FR_Y_hi, FR_Neg_One, f0 // FR_Y_hi sign for neg + nop.i 0 +};; + +{ .mfb + nop.m 0 + fadd.s0 FR_Res = FR_Y_lo,FR_Y_hi // Result=Y_lo+Y_hi + br.ret.sptk b0 // Common exit for 2^-7 < x < inf +};; + +// * SPECIAL VERSION OF LOGL FOR HUGE ARGUMENTS * + +huges_logl: +{ .mfi + getf.sig GR_signif = FR_XLog_Hi // Get significand of x+1 + fmerge.ns FR_Neg_One = f1, f1 // Form -1.0 + mov GR_exp_2tom7 = 0x0fff8 // Exponent of 2^-7 +};; + +{ .mfi + add GR_ad_tbl_1 = 0x040, GR_ad_z_1 // Point to Constants_G_H_h1 + nop.f 0 + add GR_ad_q = -0x60, GR_ad_z_1 // Point to Constants_P +} +{ .mfi + add GR_ad_z_2 = 0x140, GR_ad_z_1 // Point to Constants_Z_2 + nop.f 0 + add GR_ad_tbl_2 = 0x180, GR_ad_z_1 // Point to Constants_G_H_h2 +};; + +{ .mfi + nop.m 0 + nop.f 0 + extr.u GR_Index1 = GR_signif, 59, 4 // Get high 4 bits of signif +} +{ .mfi + add GR_ad_tbl_3 = 0x280, GR_ad_z_1 // Point to Constants_G_H_h3 + nop.f 0 + nop.i 0 +};; + +{ .mfi + shladd GR_ad_z_1 = GR_Index1, 2, GR_ad_z_1 // Point to Z_1 + nop.f 0 + extr.u GR_X_0 = GR_signif, 49, 15 // Get high 15 bits of signif. +};; + +{ .mfi + ld4 GR_Z_1 = [GR_ad_z_1] // Load Z_1 + nop.f 0 + mov GR_exp_mask = 0x1FFFF // Create exponent mask +} +{ .mfi + shladd GR_ad_tbl_1 = GR_Index1, 4, GR_ad_tbl_1 // Point to G_1 + nop.f 0 + mov GR_Bias = 0x0FFFF // Create exponent bias +};; + +{ .mfi + ldfps FR_G, FR_H = [GR_ad_tbl_1],8 // Load G_1, H_1 + fmerge.se FR_S_hi = f1,FR_XLog_Hi // Form |x+1| + nop.i 0 +};; + +{ .mmi + getf.exp GR_N = FR_XLog_Hi // Get N = exponent of x+1 + ldfd FR_h = [GR_ad_tbl_1] // Load h_1 + nop.i 0 +};; + +{ .mfi + ldfe FR_log2_hi = [GR_ad_q],16 // Load log2_hi + nop.f 0 + pmpyshr2.u GR_X_1 = GR_X_0,GR_Z_1,15 // Get bits 30-15 of X_0 * Z_1 +};; + +// WE CANNOT USE GR_X_1 IN NEXT 3 CYCLES BECAUSE OF POSSIBLE 10 CLOCKS STALL! +// "DEAD" ZONE! + +{ .mmi + ldfe FR_log2_lo = [GR_ad_q],16 // Load log2_lo + sub GR_N = GR_N, GR_Bias + mov GR_exp_2tom80 = 0x0ffaf // Exponent of 2^-80 +};; + +{ .mfi + ldfe FR_Q4 = [GR_ad_q],16 // Load Q4 + nop.f 0 + sub GR_minus_N = GR_Bias, GR_N // Form exponent of 2^(-N) +};; + +{ .mmf + ldfe FR_Q3 = [GR_ad_q],16 // Load Q3 + setf.sig FR_float_N = GR_N // Put integer N into rightmost sign + nop.f 0 +};; + +{ .mmi + nop.m 0 + ldfe FR_Q2 = [GR_ad_q],16 // Load Q2 + extr.u GR_Index2 = GR_X_1, 6, 4 // Extract bits 6-9 of X_1 +};; + +{ .mmi + ldfe FR_Q1 = [GR_ad_q] // Load Q1 + shladd GR_ad_z_2 = GR_Index2, 2, GR_ad_z_2 // Point to Z_2 + nop.i 0 +};; + +{ .mmi + ld4 GR_Z_2 = [GR_ad_z_2] // Load Z_2 + shladd GR_ad_tbl_2 = GR_Index2, 4, GR_ad_tbl_2 // Point to G_2 + nop.i 0 +};; + +{ .mmi + ldfps FR_G2, FR_H2 = [GR_ad_tbl_2],8 // Load G_2, H_2 + nop.m 0 + nop.i 0 +};; + +{ .mfi + ldfd FR_h2 = [GR_ad_tbl_2] // Load h_2 + nop.f 0 + nop.i 0 +} +{ .mfi + setf.exp FR_2_to_minus_N = GR_minus_N // Form 2^(-N) + nop.f 0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + nop.f 0 + pmpyshr2.u GR_X_2 = GR_X_1,GR_Z_2,15 // Get bits 30-15 of X_1 * Z_2 +};; + +// WE CANNOT USE GR_X_2 IN NEXT 3 CYCLES BECAUSE OF POSSIBLE 10 CLOCKS STALL! +// "DEAD" ZONE! +// JUST HAVE TO INSERT 3 NOP CYCLES (nothing to do here) + +{ .mfi + nop.m 0 + nop.f 0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + nop.f 0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + nop.f 0 + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p11) fma.s1 FR_Q4 = FR_Q4, FR_Neg_One, f0 // Negate Q4 + extr.u GR_Index3 = GR_X_2, 1, 5 // Extract bits 1-5 of X_2 + };; + +{ .mfi + shladd GR_ad_tbl_3 = GR_Index3, 4, GR_ad_tbl_3 // Point to G_3 + fcvt.xf FR_float_N = FR_float_N + nop.i 0 +} +{ .mfi + nop.m 0 +(p11) fma.s1 FR_Q3 = FR_Q3, FR_Neg_One, f0 // Negate Q3 + nop.i 0 +};; + +{ .mfi + ldfps FR_G3, FR_H3 = [GR_ad_tbl_3],8 // Load G_3, H_3 +(p11) fma.s1 FR_Q2 = FR_Q2, FR_Neg_One, f0 // Negate Q2 + nop.i 0 +} +{ .mfi + nop.m 0 +(p11) fma.s1 FR_Q1 = FR_Q1, FR_Neg_One, f0 // Negate Q1 + nop.i 0 +};; + +{ .mfi + ldfd FR_h3 = [GR_ad_tbl_3] // Load h_3 + fmpy.s1 FR_G = FR_G, FR_G2 // G = G_1 * G_2 + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 FR_H = FR_H, FR_H2 // H = H_1 + H_2 + nop.i 0 +};; + +{ .mmf + nop.m 0 + nop.m 0 + fadd.s1 FR_h = FR_h, FR_h2 // h = h_1 + h_2 +};; + +{ .mfi + nop.m 0 + fmpy.s1 FR_G = FR_G, FR_G3 // G = (G_1 * G_2) * G_3 + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 FR_H = FR_H, FR_H3 // H = (H_1 + H_2) + H_3 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fadd.s1 FR_h = FR_h, FR_h3 // h = (h_1 + h_2) + h_3 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_r = FR_G, FR_S_hi, f1 // r = G * S_hi - 1 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_Y_hi = FR_float_N, FR_log2_hi, FR_H // Y_hi=N*log2_hi+H + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_h = FR_float_N, FR_log2_lo, FR_h // h=N*log2_lo+h + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_poly_lo = FR_r, FR_Q4, FR_Q3 // poly_lo = r * Q4 + Q3 + nop.i 0 +} +{ .mfi + nop.m 0 + fmpy.s1 FR_rsq = FR_r, FR_r // rsq = r * r + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_poly_lo = FR_poly_lo, FR_r, FR_Q2 // poly_lo=poly_lo*r+Q2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_rcub = FR_rsq, FR_r, f0 // rcub = r^3 + nop.i 0 +};; + +.pred.rel "mutex",p12,p11 +{ .mfi + nop.m 0 +(p12) fma.s1 FR_poly_hi = FR_Q1, FR_rsq, FR_r // poly_hi = Q1*rsq + r + nop.i 0 +} +{ .mfi + nop.m 0 +(p11) fms.s1 FR_poly_hi = FR_Q1, FR_rsq, FR_r // poly_hi = Q1*rsq + r + nop.i 0 +};; + + +.pred.rel "mutex",p12,p11 +{ .mfi + nop.m 0 +(p12) fma.s1 FR_poly_lo = FR_poly_lo, FR_rcub, FR_h//poly_lo=poly_lo*r^3+h + nop.i 0 +} +{ .mfi + nop.m 0 +(p11) fms.s1 FR_poly_lo = FR_poly_lo, FR_rcub, FR_h//poly_lo=poly_lo*r^3+h + nop.i 0 +};; + +{ .mfi + nop.m 0 + fadd.s0 FR_Y_lo = FR_poly_hi, FR_poly_lo // Y_lo=poly_hi+poly_lo + nop.i 0 +} +{ .mfi + nop.m 0 +(p11) fma.s0 FR_Y_hi = FR_Y_hi, FR_Neg_One, f0 // FR_Y_hi sign for neg + nop.i 0 +};; + +{ .mfb + nop.m 0 + fadd.s0 FR_Res = FR_Y_lo,FR_Y_hi // Result=Y_lo+Y_hi + br.ret.sptk b0 // Common exit for 2^-7 < x < inf +};; + +// NEAR ZERO POLYNOMIAL INTERVAL +near_0: +{ .mfi + nop.m 0 + fma.s1 FR_X4 = FR_X2, FR_X2, f0 // x^4 = x^2 * x^2 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_P9 = FR_C9,FR_X2,FR_C7 // p9 = C9*x^2 + C7 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_P5 = FR_C5,FR_X2,FR_C3 // p5 = C5*x^2 + C3 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_P3 = FR_P9,FR_X4,FR_P5 // p3 = p9*x^4 + p5 + nop.i 0 +};; + +{ .mfb + nop.m 0 + fma.s0 FR_Res = FR_P3,FR_X3,FR_Arg // res = p3*C3 + x + br.ret.sptk b0 // Near 0 path return +};; + +GLOBAL_LIBM_END(asinhl) + + + diff --git a/sysdeps/ia64/fpu/s_atan.S b/sysdeps/ia64/fpu/s_atan.S new file mode 100644 index 0000000000..720ecad28a --- /dev/null +++ b/sysdeps/ia64/fpu/s_atan.S @@ -0,0 +1,753 @@ +.file "atan.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 04/13/00 Improved speed +// 04/19/00 Removed the qualifying predicate from the fmerge.s that +// takes the absolute value. +// 06/16/00 Reassigned FP registers to eliminate stalls on loads +// 08/30/00 Saved 5 cycles in main path by rearranging large argument logic +// and delaying use of result of fcmp in load by 1 group +// 05/20/02 Cleaned up namespace and sf0 syntax +// 08/20/02 Use atan2 algorithm with x=1 for better accuracy +// 02/06/03 Reordered header: .section, .global, .proc, .align +// +// API +//============================================================== +// double atan(double Y) +// +// Overview of operation +//============================================================== +// +// The atan function returns values in the interval [-pi/2,+pi/2]. +// +// The algorithm used is the atan2(Y,X) algorithm where we fix X=1.0. +// +// There are two basic paths: swap true and swap false. +// atan2(Y,X) ==> atan2(V/U) where U >= V. If Y > X, we must swap. +// +// p6 swap True |Y| > |X| +// p7 swap False |Y| <= |X| +// +// +// Simple trigonometric identities show +// Region 1 +// |Y|<=1.0, V=Y, U=1.0 atan2(Y,X) = sgnY * (0 + atan(V/U)) +// +// Region 2 +// |Y|>1.0, V=1.0, U=Y atan2(Y,X) = sgnY * (pi/2 - atan(V/U)) +// +// +// We compute atan(V/U) from the identity +// atan(z) + atan([(V/U)-z] / [1+(V/U)z]) +// where z is a limited precision approximation (16 bits) to V/U +// +// z is calculated with the assistance of the frcpa instruction. +// +// atan(z) is calculated by a polynomial z + z^3 * p(w), w=z^2 +// where p(w) = P0+P1*w+...+P22*w^22 +// +// Let d = [(V/U)-z] / [1+(V/U)z]) = (V-U*z)/(U+V*z) +// +// Approximate atan(d) by d + P0*d^3 +// Let F = 1/(U+V*z) * (1-a), where |a|< 2^-8.8. +// Compute q(a) = 1 + a + ... + a^5. +// Then F*q(a) approximates the reciprocal to more than 50 bits. + +// Special values +//============================================================== +// atan(QNAN) = QNAN +// atan(SNAN) = quieted SNAN +// atan(+-inf) = +- pi/2 +// atan(+-0) = +-0 + +// Registers used +//============================================================== + +// predicate registers used: +// p6 -> p15 + +// floating-point registers used: +// f8, input +// f32 -> f116 + +// general registers used +// r14 -> r16 + +// Assembly macros +//============================================================== + +EXP_AD_P1 = r14 +EXP_AD_P2 = r15 +rsig_near_one = r16 + +atan2_Y = f8 +atan2_X = f1 + +atan2_u1_X = f32 +atan2_u1_Y = f33 +atan2_z2_X = f34 + +atan2_two = f36 +atan2_B1sq_Y = f37 +atan2_z1_X = f38 +atan2_B1X = f40 + +atan2_B1Y = f41 +atan2_wp_X = f42 +atan2_B1sq_X = f43 +atan2_z = f44 +atan2_w = f45 + +atan2_P0 = f46 +atan2_P1 = f47 +atan2_P2 = f48 +atan2_P3 = f49 +atan2_P4 = f50 + +atan2_P5 = f51 +atan2_P6 = f52 +atan2_P7 = f53 +atan2_P8 = f54 +atan2_P9 = f55 + +atan2_P10 = f56 +atan2_P11 = f57 +atan2_P12 = f58 +atan2_P13 = f59 +atan2_P14 = f60 + +atan2_P15 = f61 +atan2_P16 = f62 +atan2_P17 = f63 +atan2_P18 = f64 +atan2_P19 = f65 + +atan2_P20 = f66 +atan2_P21 = f67 +atan2_P22 = f68 +atan2_pi_by_2 = f69 +atan2_sgn_pi_by_2 = f69 +atan2_V13 = f70 + +atan2_W11 = f71 +atan2_E = f72 +atan2_wp_Y = f73 +atan2_V11 = f74 +atan2_V12 = f75 + +atan2_V7 = f76 +atan2_V8 = f77 +atan2_W7 = f78 +atan2_W8 = f79 +atan2_W3 = f80 + +atan2_W4 = f81 +atan2_V3 = f82 +atan2_V4 = f83 +atan2_F = f84 +atan2_gV = f85 + +atan2_V10 = f86 +atan2_zcub = f87 +atan2_V6 = f88 +atan2_V9 = f89 +atan2_W10 = f90 + +atan2_W6 = f91 +atan2_W2 = f92 +atan2_V2 = f93 +atan2_alpha = f94 +atan2_alpha_1 = f95 + +atan2_gVF = f96 +atan2_V5 = f97 +atan2_W12 = f98 +atan2_W5 = f99 +atan2_alpha_sq = f100 + +atan2_Cp = f101 +atan2_V1 = f102 +atan2_ysq = f103 +atan2_W1 = f104 +atan2_alpha_cub = f105 + +atan2_C = f106 +atan2_d = f108 +atan2_A_hi = f109 +atan2_dsq = f110 + +atan2_pd = f111 +atan2_A_lo = f112 +atan2_A = f113 +atan2_Pp = f114 +atan2_sgnY = f115 + +atan2_sig_near_one = f116 +atan2_near_one = f116 + +///////////////////////////////////////////////////////////// + + +RODATA + +.align 16 + +LOCAL_OBJECT_START(atan2_tb1) +data8 0xA21922DC45605EA1 , 0x00003FFA // P11 +data8 0xB199DD6D2675C40F , 0x0000BFFA // P10 +data8 0xC2F01E5DDD100DBE , 0x00003FFA // P9 +data8 0xD78F28FC2A592781 , 0x0000BFFA // P8 +data8 0xF0F03ADB3FC930D3 , 0x00003FFA // P7 +data8 0x88887EBB209E3543 , 0x0000BFFB // P6 +data8 0x9D89D7D55C3287A5 , 0x00003FFB // P5 +data8 0xBA2E8B9793955C77 , 0x0000BFFB // P4 +data8 0xE38E38E320A8A098 , 0x00003FFB // P3 +data8 0x9249249247E37913 , 0x0000BFFC // P2 +data8 0xCCCCCCCCCCC906CD , 0x00003FFC // P1 +data8 0xAAAAAAAAAAAAA8A9 , 0x0000BFFD // P0 +data8 0x0000000000000000 , 0x00000000 // pad to avoid bank conflict +LOCAL_OBJECT_END(atan2_tb1) + +LOCAL_OBJECT_START(atan2_tb2) +data8 0xCE585A259BD8374C , 0x00003FF0 // P21 +data8 0x9F90FB984D8E39D0 , 0x0000BFF3 // P20 +data8 0x9D3436AABE218776 , 0x00003FF5 // P19 +data8 0xDEC343E068A6D2A8 , 0x0000BFF6 // P18 +data8 0xF396268151CFB11C , 0x00003FF7 // P17 +data8 0xD818B4BB43D84BF2 , 0x0000BFF8 // P16 +data8 0xA2270D30A90AA220 , 0x00003FF9 // P15 +data8 0xD5F4F2182E7A8725 , 0x0000BFF9 // P14 +data8 0x80D601879218B53A , 0x00003FFA // P13 +data8 0x9297B23CCFFB291F , 0x0000BFFA // P12 +data8 0xFE7E52D2A89995B3 , 0x0000BFEC // P22 +data8 0xC90FDAA22168C235 , 0x00003FFF // pi/2 +LOCAL_OBJECT_END(atan2_tb2) + + + + +.section .text +GLOBAL_LIBM_ENTRY(atan) + +{ .mfi + nop.m 999 + frcpa.s1 atan2_u1_Y,p7 = f1,atan2_Y + nop.i 999 +} +{ .mfi + addl EXP_AD_P1 = @ltoff(atan2_tb1), gp + fma.s1 atan2_two = f1,f1,f1 + nop.i 999 +;; +} + +{ .mfi + ld8 EXP_AD_P1 = [EXP_AD_P1] + frcpa.s1 atan2_u1_X,p6 = f1,atan2_X + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2_ysq = atan2_Y,atan2_Y,f0 + nop.i 999 +} +;; + +{ .mfi + add EXP_AD_P2 = 0xd0,EXP_AD_P1 + fmerge.s atan2_sgnY = atan2_Y,f1 + nop.i 999 +} +;; + + +{ .mfi + ldfe atan2_P11 = [EXP_AD_P1],16 + fclass.m p10,p0 = atan2_Y, 0xc3 // Test for y=nan + nop.i 999 +} +{ .mfi + ldfe atan2_P21 = [EXP_AD_P2],16 + nop.f 999 + nop.i 999 +;; +} + + +{ .mfi + ldfe atan2_P10 = [EXP_AD_P1],16 + fnma.s1 atan2_B1Y = atan2_u1_Y, atan2_Y, atan2_two + nop.i 999 +} +{ .mfi + ldfe atan2_P20 = [EXP_AD_P2],16 + fma.s1 atan2_wp_Y = atan2_u1_Y, atan2_u1_Y, f0 + nop.i 999 +;; +} + +{ .mfi + ldfe atan2_P9 = [EXP_AD_P1],16 + fma.s1 atan2_z1_X = atan2_u1_X, atan2_Y, f0 + nop.i 999 +} +{ .mfi + ldfe atan2_P19 = [EXP_AD_P2],16 + fnma.s1 atan2_B1X = atan2_u1_X, atan2_X, atan2_two + nop.i 999 +} +;; + +{ .mfi + ldfe atan2_P8 = [EXP_AD_P1],16 + fma.s1 atan2_z2_X = atan2_u1_X, atan2_ysq, f0 + nop.i 999 +} +{ .mfb + ldfe atan2_P18 = [EXP_AD_P2],16 +(p10) fma.d.s0 f8 = atan2_Y,atan2_X,f0 // If y=nan, result quietized y +(p10) br.ret.spnt b0 // Exit if y=nan +} +;; + +// p6 true if swap, means |y| > 1.0 or ysq > 1.0 +// p7 true if no swap, means 1.0 >= |y| or 1.0 >= ysq +{ .mfi + ldfe atan2_P7 = [EXP_AD_P1],16 + fcmp.ge.s1 p7,p6 = f1, atan2_ysq + nop.i 999 +} +{ .mmf + ldfe atan2_P17 = [EXP_AD_P2],16 + nop.m 999 + nop.f 999 +} +;; + +{ .mfi + ldfe atan2_P6 = [EXP_AD_P1],16 + fma.s1 atan2_E = atan2_u1_Y, atan2_B1Y, atan2_Y + nop.i 999 +} +{ .mfi + ldfe atan2_P16 = [EXP_AD_P2],16 + fma.s1 atan2_B1sq_Y = atan2_B1Y, atan2_B1Y, f0 + nop.i 999 +;; +} + +{ .mfi + ldfe atan2_P5 = [EXP_AD_P1],16 +(p7) fma.s1 atan2_wp_X = atan2_z1_X, atan2_z1_X, f0 + nop.i 999 +} +{ .mfi + ldfe atan2_P15 = [EXP_AD_P2],16 +(p7) fma.s1 atan2_B1sq_X = atan2_B1X, atan2_B1X, f0 + nop.i 999 +;; +} + +{ .mfi + ldfe atan2_P4 = [EXP_AD_P1],16 +(p6) fma.s1 atan2_z = atan2_u1_Y, atan2_B1Y, f0 + nop.i 999 +} +{ .mfi + ldfe atan2_P14 = [EXP_AD_P2],16 +(p7) fma.s1 atan2_E = atan2_z2_X, atan2_B1X, atan2_X + nop.i 999 +;; +} + + +{ .mfi + ldfe atan2_P3 = [EXP_AD_P1],16 + fcmp.eq.s0 p14,p15=atan2_X,atan2_Y // Dummy for denorm and invalid + nop.i 999 +} +{ .mmf + ldfe atan2_P13 = [EXP_AD_P2],16 + nop.m 999 +(p7) fma.s1 atan2_z = atan2_z1_X, atan2_B1X, f0 +;; +} + +{ .mfi + ldfe atan2_P2 = [EXP_AD_P1],16 +(p6) fma.s1 atan2_w = atan2_wp_Y, atan2_B1sq_Y,f0 + nop.i 999 +} +{ .mlx + ldfe atan2_P12 = [EXP_AD_P2],16 + movl rsig_near_one = 0x8000000000000001 // signif near 1.0 +;; +} + +{ .mfi + ldfe atan2_P1 = [EXP_AD_P1],16 + fclass.m p9,p0 = atan2_Y, 0x23 // test if y inf + nop.i 999 +} +{ .mfi + ldfe atan2_P22 = [EXP_AD_P2],16 +(p7) fma.s1 atan2_w = atan2_wp_X, atan2_B1sq_X,f0 + nop.i 999 +;; +} + +{ .mfi + ldfe atan2_P0 = [EXP_AD_P1],16 + frcpa.s1 atan2_F,p0 = f1, atan2_E + nop.i 999 +} +{ .mfi + ldfe atan2_pi_by_2 = [EXP_AD_P2],16 +(p6) fnma.s1 atan2_gV = atan2_Y, atan2_z, atan2_X + nop.i 999 +;; +} + +{ .mfi + setf.sig atan2_sig_near_one = rsig_near_one +(p7) fnma.s1 atan2_gV = atan2_X, atan2_z, atan2_Y + nop.i 999 +} +{ .mfb + nop.m 999 +(p9) fma.d.s0 f8 = atan2_sgnY, atan2_pi_by_2, f0 // +-pi/2 if y inf +(p9) br.ret.spnt b0 // exit if y inf, result is +-pi/2 +;; +} + +{ .mfi + nop.m 999 + fma.s1 atan2_V13 = atan2_w, atan2_P11, atan2_P10 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2_W11 = atan2_w, atan2_P21, atan2_P20 + nop.i 999 +;; +} + +{ .mfi + nop.m 999 + fma.s1 atan2_V11 = atan2_w, atan2_P9, atan2_P8 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2_V12 = atan2_w, atan2_w, f0 + nop.i 999 +;; +} + +{ .mfi + nop.m 999 + fma.s1 atan2_V8 = atan2_w, atan2_P7 , atan2_P6 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2_W8 = atan2_w, atan2_P19, atan2_P18 + nop.i 999 +;; +} + +{ .mfi + nop.m 999 + fnma.s1 atan2_alpha = atan2_E, atan2_F, f1 + nop.i 999 +} +{ .mfi + nop.m 999 + fnma.s1 atan2_alpha_1 = atan2_E, atan2_F, atan2_two + nop.i 999 +;; +} + + +{ .mfi + nop.m 999 + fma.s1 atan2_V7 = atan2_w, atan2_P5 , atan2_P4 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2_W7 = atan2_w, atan2_P17, atan2_P16 + nop.i 999 +;; +} + +{ .mfi + nop.m 999 + fma.s1 atan2_V4 = atan2_w, atan2_P3 , atan2_P2 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2_W4 = atan2_w, atan2_P15, atan2_P14 + nop.i 999 +;; +} + +{ .mfi + nop.m 999 + fma.s1 atan2_V3 = atan2_w, atan2_P1 , atan2_P0 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2_W3 = atan2_w, atan2_P13, atan2_P12 + nop.i 999 +;; +} + +{ .mfi + nop.m 999 + fma.s1 atan2_V10 = atan2_V12, atan2_V13, atan2_V11 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2_gVF = atan2_gV, atan2_F, f0 + nop.i 999 +;; +} + +{ .mfi + nop.m 999 + fma.s1 atan2_alpha_sq = atan2_alpha, atan2_alpha, f0 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2_Cp = atan2_alpha, atan2_alpha_1, f1 + nop.i 999 +;; +} + +{ .mfi + nop.m 999 + fma.s1 atan2_V9 = atan2_V12, atan2_V12, f0 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2_W10 = atan2_V12, atan2_P22 , atan2_W11 + nop.i 999 +;; +} + +{ .mfi + nop.m 999 + fma.s1 atan2_V6 = atan2_V12, atan2_V8 , atan2_V7 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2_W6 = atan2_V12, atan2_W8 , atan2_W7 + nop.i 999 +;; +} + +{ .mfi + nop.m 999 + fma.s1 atan2_V2 = atan2_V12, atan2_V4 , atan2_V3 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2_W2 = atan2_V12, atan2_W4 , atan2_W3 + nop.i 999 +;; +} + +{ .mfi + nop.m 999 + fma.s1 atan2_alpha_cub = atan2_alpha, atan2_alpha_sq, f0 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2_C = atan2_gVF, atan2_Cp, f0 + nop.i 999 +;; +} + +{ .mfi + nop.m 999 + fma.s1 atan2_W12 = atan2_V9, atan2_V9, f0 + nop.i 999 +;; +} + +{ .mfi + nop.m 999 + fma.s1 atan2_V5 = atan2_V9, atan2_V10, atan2_V6 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2_W5 = atan2_V9, atan2_W10, atan2_W6 + nop.i 999 +;; +} + +{ .mfi + nop.m 999 + fclass.m p8,p0 = atan2_Y, 0x07 // Test for y=0 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2_d = atan2_alpha_cub, atan2_C, atan2_C + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 atan2_W12 = atan2_V9, atan2_W12, f0 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 atan2_V1 = atan2_V9, atan2_V5, atan2_V2 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2_W1 = atan2_V9, atan2_W5, atan2_W2 + nop.i 999 +;; +} + +{ .mfi + nop.m 999 +(p8) fmerge.s f8 = atan2_sgnY, f0 // +-0 if y=0 + nop.i 999 +} +{ .mfb + nop.m 999 + fma.s1 atan2_zcub = atan2_z, atan2_w, f0 +(p8) br.ret.spnt b0 // Exit if y=0 +;; +} + +{ .mfi + nop.m 999 + fma.s1 atan2_pd = atan2_P0, atan2_d, f0 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2_dsq = atan2_d, atan2_d, f0 + nop.i 999 +;; +} + + +{ .mfi + nop.m 999 + fmerge.se atan2_near_one = f1, atan2_sig_near_one // Const ~1.0 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2_Pp = atan2_W12, atan2_W1, atan2_V1 + nop.i 999 +;; +} + +{ .mfi + nop.m 999 + fma.s1 atan2_sgn_pi_by_2 = atan2_pi_by_2, atan2_sgnY, f0 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atan2_A_lo = atan2_pd, atan2_dsq, atan2_d + nop.i 999 +;; +} + + +{ .mfi + nop.m 999 + fma.s1 atan2_A_hi = atan2_zcub, atan2_Pp, atan2_z + nop.i 999 +;; +} + + +{ .mfi + nop.m 999 +(p6) fma.s1 atan2_A = atan2_A_hi, f1, atan2_A_lo + nop.i 999 +} +// For |Y| <= |X| and X > 0, result is A_hi + A_lo +{ .mfi + nop.m 999 +(p7) fma.d.s0 f8 = atan2_A_hi, f1, atan2_A_lo + nop.i 999 +;; +} + +// For |Y| > |X|, result is +- pi/2 - (A_hi + A_lo) +// We perturb A by multiplying by 1.0+1ulp as we produce the result +// in order to get symmetrically rounded results in directed rounding modes. +// If we don't do this, there are a few cases where the trailing 11 bits of +// the significand of the result, before converting to double, are zero. These +// cases do not round symmetrically in round to +infinity or round to -infinity. +{ .mfb + nop.m 999 +(p6) fnma.d.s0 f8 = atan2_A, atan2_near_one, atan2_sgn_pi_by_2 + br.ret.sptk b0 +;; +} + +GLOBAL_LIBM_END(atan) diff --git a/sysdeps/ia64/fpu/s_atanf.S b/sysdeps/ia64/fpu/s_atanf.S new file mode 100644 index 0000000000..4da68c7f08 --- /dev/null +++ b/sysdeps/ia64/fpu/s_atanf.S @@ -0,0 +1,556 @@ +.file "atanf.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. + + +// History +//============================================================== +// 02/20/00 Initial version +// 08/17/00 Changed predicate register macro-usage to direct predicate +// names due to an assembler bug. +// 02/06/02 Corrected .section statement +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/06/03 Reordered header: .section, .global, .proc, .align; +// added missing bundling + +// +// Assembly macros +//============================================================== + +// integer registers used +EXP_Addr1 = r33 +EXP_Addr2 = r34 + +// floating point registers used +atanf_coeff_R4 = f32 +atanf_coeff_R5 = f33 +atanf_coeff_R1 = f34 +atanf_coeff_R2 = f35 + +atanf_coeff_R3 = f36 +atanf_coeff_P1 = f37 +atanf_coeff_Q6 = f38 +atanf_coeff_Q7 = f39 +atanf_coeff_Q8 = f40 + +atanf_coeff_Q9 = f41 +atanf_coeff_Q4 = f42 +atanf_coeff_Q5 = f43 +atanf_coeff_Q2 = f44 +atanf_coeff_Q3 = f45 + +atanf_coeff_P5 = f46 +atanf_coeff_P6 = f47 +atanf_coeff_Q0 = f48 +atanf_coeff_Q1 = f49 +atanf_coeff_P7 = f50 + +atanf_coeff_P8 = f51 +atanf_coeff_P3 = f52 +atanf_coeff_P4 = f53 +atanf_coeff_P9 = f54 +atanf_coeff_P10 = f55 + +atanf_coeff_P2 = f56 +atanf_piby2 = f57 +atanf_z = f58 +atanf_b = f59 +atanf_zsq = f60 + +atanf_sgn_x = f61 +atanf_sgnx_piby2 = f62 +atanf_abs_x = f63 +atanf_t = f64 +atanf_xcub = f65 + +atanf_tsq = f66 +atanf_t4 = f67 +atanf_x5 = f68 +atanf_x6 = f69 +atanf_x11 = f70 + +atanf_poly_p1 = f71 +atanf_poly_p2 = f72 +atanf_poly_p3 = f73 +atanf_poly_p4 = f74 +atanf_poly_p5 = f75 + +atanf_poly_q1 = f76 +atanf_poly_q2 = f77 +atanf_poly_q3 = f78 +atanf_poly_q4 = f79 +atanf_poly_q5 = f80 + +atanf_poly_q = f81 +atanf_poly_r1 = f81 +atanf_poly_r2 = f82 +atanf_poly_r3 = f83 +atanf_bsq = f84 +atanf_z4 = f85 + +atanf_z5 = f86 +atanf_z8 = f87 +atanf_z13 = f88 +atanf_poly_r2 = f89 +atanf_poly_r1 = f90 + +atanf_z8_bsq = f91 +atanf_poly_r = f92 +atanf_z21_poly_r = f93 +atanf_answer = f8 + + +// predicate registers used +//atanf_pred_LE1 = p6 +//atanf_pred_GT1 = p7 + + +RODATA + +.align 16 + +LOCAL_OBJECT_START(atanf_coeff_1_table) +data8 0x40c4c241be751ff2 // r4 +data8 0x40e9f300c2f3070b // r5 +data8 0x409babffef772075 // r3 +data8 0xbfd5555512191621 // p1 +data8 0x3fc9997e7afbff4e // p2 = q8 +data8 0xbfd5555512191621 // p1 = q9 +data8 0x3f97105b4160f86b // p8 = q2 +data8 0xbfa6e10ba401393f // p7 = q3 +data8 0x3f522e5d33bc9baa // p10 = q0 +data8 0xbf7deaadaa336451 // p9 = q1 +data8 0xbfc2473c5145ee38 // p3 +data8 0x3fbc4f512b1865f5 // p4 +data8 0x3fc9997e7afbff4e // p2 +data8 0x3ff921fb54442d18 // pi/2 +LOCAL_OBJECT_END(atanf_coeff_1_table) + + + +LOCAL_OBJECT_START(atanf_coeff_2_table) +data8 0x4035000000004284 // r1 +data8 0x406cdffff336a59b // r2 +data8 0x3fbc4f512b1865f5 // p4 = q6 +data8 0xbfc2473c5145ee38 // p3 = q7 +data8 0x3fb142a73d7c54e3 // p6 = q4 +data8 0xbfb68eed6a8cfa32 // p5 = q5 +data8 0xbfb68eed6a8cfa32 // p5 +data8 0x3fb142a73d7c54e3 // p6 +data8 0xbfa6e10ba401393f // p7 +data8 0x3f97105b4160f86b // p8 +data8 0xbf7deaadaa336451 // p9 +data8 0x3f522e5d33bc9baa // p10 +LOCAL_OBJECT_END(atanf_coeff_2_table) + + + +.section .text +GLOBAL_LIBM_ENTRY(atanf) + +{ .mfi + alloc r32 = ar.pfs,1,2,0,0 + frcpa.s1 atanf_z,p0 = f1,f8 + addl EXP_Addr2 = @ltoff(atanf_coeff_2_table),gp +} +{ .mfi + addl EXP_Addr1 = @ltoff(atanf_coeff_1_table),gp + fma.s1 atanf_t = f8,f8,f0 + nop.i 999;; +} + + +{ .mfi + nop.m 999 + fmerge.s atanf_sgn_x = f8,f1 + nop.i 999;; +} + +{ .mfi + ld8 EXP_Addr1 = [EXP_Addr1] + fmerge.s atanf_abs_x = f1,f8 + nop.i 999 +} +{ .mfi + ld8 EXP_Addr2 = [EXP_Addr2] + nop.f 999 + nop.i 999;; +} + + +{ .mfi + nop.m 999 + fclass.m p8,p0 = f8,0x7 // @zero + nop.i 999;; +} + +{ .mfi + nop.m 999 + fcmp.eq.unc.s0 p9,p10 = f8,f1 + nop.i 999;; +} + +{ .mfi + ldfpd atanf_coeff_R4,atanf_coeff_R5 = [EXP_Addr1],16 + fnma.s1 atanf_b = f8,atanf_z,f1 + nop.i 999 +} +{ .mfi + ldfpd atanf_coeff_R1,atanf_coeff_R2 = [EXP_Addr2],16 + fma.s1 atanf_zsq = atanf_z,atanf_z,f0 + nop.i 999;; +} + + +{ .mfi + ldfpd atanf_coeff_R3,atanf_coeff_P1 = [EXP_Addr1],16 + fma.s1 atanf_xcub = f8,atanf_t,f0 + nop.i 999 +} +{ .mfi + ldfpd atanf_coeff_Q6,atanf_coeff_Q7 = [EXP_Addr2],16 + fma.s1 atanf_tsq = atanf_t,atanf_t,f0 + nop.i 999;; +} + + +{ .mfi + ldfpd atanf_coeff_Q8,atanf_coeff_Q9 = [EXP_Addr1],16 +// fcmp.le.s1 atanf_pred_LE1,atanf_pred_GT1 = atanf_abs_x,f1 + fcmp.le.s1 p6,p7 = atanf_abs_x,f1 + nop.i 999 +} +{ .mfi + ldfpd atanf_coeff_Q4,atanf_coeff_Q5 = [EXP_Addr2],16 + nop.f 999 + nop.i 999;; +} + + +{ .mfi + ldfpd atanf_coeff_Q2,atanf_coeff_Q3 = [EXP_Addr1],16 + fclass.m p8,p0 = f8,0xe7 // @inf|@qnan|@snan|@zero + nop.i 999 +} +{ .mfi + ldfpd atanf_coeff_P5,atanf_coeff_P6 = [EXP_Addr2],16 + nop.f 999 + nop.i 999;; +} + + +{ .mfi + ldfpd atanf_coeff_Q0,atanf_coeff_Q1 = [EXP_Addr1],16 + nop.f 999 + nop.i 999 +} +{ .mfi + ldfpd atanf_coeff_P7,atanf_coeff_P8 = [EXP_Addr2],16 + nop.f 999 + nop.i 999;; +} + + +{ .mfi + ldfpd atanf_coeff_P3,atanf_coeff_P4 = [EXP_Addr1],16 + fma.s1 atanf_bsq = atanf_b,atanf_b,f0 + nop.i 999 +} +{ .mfi + ldfpd atanf_coeff_P9,atanf_coeff_P10 = [EXP_Addr2] + fma.s1 atanf_z4 = atanf_zsq,atanf_zsq,f0 + nop.i 999;; +} + + +{ .mfi + ldfpd atanf_coeff_P2,atanf_piby2 = [EXP_Addr1] + fma.s1 atanf_x6 = atanf_t,atanf_tsq,f0 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atanf_t4 = atanf_tsq,atanf_tsq,f0 + nop.i 999;; +} + + +{ .mfb + nop.m 999 + fma.s1 atanf_x5 = atanf_t,atanf_xcub,f0 +(p8) br.cond.spnt ATANF_X_INF_NAN_ZERO +} +;; + +{ .mfi + nop.m 999 + fma.s1 atanf_poly_r1 = atanf_b,atanf_coeff_R1,f1 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atanf_poly_r3 = atanf_b,atanf_coeff_R5,atanf_coeff_R4 + nop.i 999;; +} + + +{ .mfi + nop.m 999 + fma.s1 atanf_poly_r2 = atanf_b,atanf_coeff_R3,atanf_coeff_R2 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atanf_z8 = atanf_z4,atanf_z4,f0 + nop.i 999;; +} + + +{ .mfi + nop.m 999 + fma.s1 atanf_poly_q2 = atanf_t,atanf_coeff_Q5,atanf_coeff_Q4 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atanf_poly_q3 = atanf_t,atanf_coeff_Q7,atanf_coeff_Q6 + nop.i 999;; +} + + +{ .mfi + nop.m 999 + fma.s1 atanf_z5 = atanf_z,atanf_z4,f0 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atanf_poly_q1 = atanf_t,atanf_coeff_Q9,atanf_coeff_Q8 + nop.i 999;; +} + + +{ .mfi + nop.m 999 + fma.s1 atanf_poly_q4 = atanf_t,atanf_coeff_Q1,atanf_coeff_Q0 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atanf_poly_q5 = atanf_t,atanf_coeff_Q3,atanf_coeff_Q2 + nop.i 999;; +} + + +{ .mfi + nop.m 999 + fma.s1 atanf_poly_p4 = f8,atanf_coeff_P1,f0 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atanf_poly_p5 = atanf_t,atanf_coeff_P4,atanf_coeff_P3 + nop.i 999;; +} + + +{ .mfi + nop.m 999 + fma.s1 atanf_poly_r1 = atanf_z8,atanf_poly_r1,f0 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atanf_z8_bsq = atanf_z8,atanf_bsq,f0 + nop.i 999;; +} + + +{ .mfi + nop.m 999 + fma.s1 atanf_poly_q2 = atanf_tsq,atanf_poly_q3,atanf_poly_q2 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atanf_poly_r2 = atanf_bsq,atanf_poly_r3,atanf_poly_r2 + nop.i 999;; +} + + +{ .mfi + nop.m 999 + fma.s1 atanf_poly_p2 = atanf_t,atanf_coeff_P8,atanf_coeff_P7 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atanf_poly_q1 = atanf_poly_q1,f1,atanf_tsq + nop.i 999;; +} + + +{ .mfi + nop.m 999 + fma.s1 atanf_z13 = atanf_z5,atanf_z8,f0 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atanf_poly_p1 = atanf_t,atanf_coeff_P10,atanf_coeff_P9 + nop.i 999;; +} + + +{ .mfi + nop.m 999 + fma.s1 atanf_poly_p4 = atanf_t,atanf_poly_p4,f8 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atanf_poly_q4 = atanf_tsq,atanf_poly_q5,atanf_poly_q4 + nop.i 999;; +} + + +{ .mfi + nop.m 999 + fma.s1 atanf_poly_p3 = atanf_t,atanf_coeff_P6,atanf_coeff_P5 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atanf_poly_p5 = atanf_t,atanf_poly_p5,atanf_coeff_P2 + nop.i 999;; +} + + +{ .mfi + nop.m 999 + fma.s1 atanf_x11 = atanf_x5,atanf_x6,f0 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atanf_poly_r = atanf_z8_bsq,atanf_poly_r2,atanf_poly_r1 + nop.i 999;; +} + + +{ .mfi + nop.m 999 + fma.s0 atanf_sgnx_piby2 = atanf_sgn_x,atanf_piby2,f0 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 atanf_poly_q2 = atanf_t4,atanf_poly_q1,atanf_poly_q2 + nop.i 999;; +} + + +{ .mfi + nop.m 999 + fma.s1 atanf_poly_p1 = atanf_tsq,atanf_poly_p1,atanf_poly_p2 + nop.i 999;; +} + +{ .mfi + nop.m 999 + fma.s1 atanf_poly_p4 = atanf_x5,atanf_poly_p5,atanf_poly_p4 + nop.i 999;; +} + +{ .mfi + nop.m 999 + fma.s1 atanf_z21_poly_r = atanf_z13,atanf_poly_r,f0 + nop.i 999;; +} + +{ .mfi + nop.m 999 + fma.s1 atanf_poly_q = atanf_t4,atanf_poly_q2,atanf_poly_q4 + nop.i 999;; +} + +{ .mfi + nop.m 999 + fma.s1 atanf_poly_p1 = atanf_tsq,atanf_poly_p1,atanf_poly_p3 + nop.i 999;; +} + +{ .mfi + nop.m 999 +//(atanf_pred_GT1) fnma.s atanf_answer = atanf_poly_q,atanf_z21_poly_r,atanf_sgnx_piby2 +(p7) fnma.s.s0 atanf_answer = atanf_poly_q,atanf_z21_poly_r,atanf_sgnx_piby2 + nop.i 999;; +} + +{ .mfb + nop.m 999 +//(atanf_pred_LE1) fma.s atanf_answer = atanf_x11,atanf_poly_p1,atanf_poly_p4 +(p6) fma.s.s0 atanf_answer = atanf_x11,atanf_poly_p1,atanf_poly_p4 + br.ret.sptk b0 +} + + + +ATANF_X_INF_NAN_ZERO: + +{ .mfi + nop.m 0 + fclass.m p8,p9 = f8,0x23 // @inf + nop.i 0 +} +;; +{ .mfi + nop.m 0 +(p8) fmerge.s f8 = f8, atanf_piby2 + nop.i 0 +} +;; +{ .mfb + nop.m 0 + fnorm.s.s0 f8 = f8 + br.ret.sptk b0 +} +;; + +GLOBAL_LIBM_END(atanf) + diff --git a/sysdeps/ia64/fpu/s_atanl.S b/sysdeps/ia64/fpu/s_atanl.S new file mode 100644 index 0000000000..1a23611307 --- /dev/null +++ b/sysdeps/ia64/fpu/s_atanl.S @@ -0,0 +1,2007 @@ +.file "atanl.s" + + +// Copyright (c) 2000 - 2005, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// +//********************************************************************* +// +// History +// 02/02/00 (hand-optimized) +// 04/04/00 Unwind support added +// 08/15/00 Bundle added after call to __libm_error_support to properly +// set [the previously overwritten] GR_Parameter_RESULT. +// 03/13/01 Fixed flags when denormal raised on intermediate result +// 01/08/02 Improved speed. +// 02/06/02 Corrected .section statement +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align; +// used data8 for long double table values +// 03/31/05 Reformatted delimiters between data tables +// +//********************************************************************* +// +// Function: atanl(x) = inverse tangent(x), for double extended x values +// Function: atan2l(y,x) = atan(y/x), for double extended y, x values +// +// API +// +// long double atanl (long double x) +// long double atan2l (long double y, long double x) +// +//********************************************************************* +// +// Resources Used: +// +// Floating-Point Registers: f8 (Input and Return Value) +// f9 (Input for atan2l) +// f10-f15, f32-f83 +// +// General Purpose Registers: +// r32-r51 +// r49-r52 (Arguments to error support for 0,0 case) +// +// Predicate Registers: p6-p15 +// +//********************************************************************* +// +// IEEE Special Conditions: +// +// Denormal fault raised on denormal inputs +// Underflow exceptions may occur +// Special error handling for the y=0 and x=0 case +// Inexact raised when appropriate by algorithm +// +// atanl(SNaN) = QNaN +// atanl(QNaN) = QNaN +// atanl(+/-0) = +/- 0 +// atanl(+/-Inf) = +/-pi/2 +// +// atan2l(Any NaN for x or y) = QNaN +// atan2l(+/-0,x) = +/-0 for x > 0 +// atan2l(+/-0,x) = +/-pi for x < 0 +// atan2l(+/-0,+0) = +/-0 +// atan2l(+/-0,-0) = +/-pi +// atan2l(y,+/-0) = pi/2 y > 0 +// atan2l(y,+/-0) = -pi/2 y < 0 +// atan2l(+/-y, Inf) = +/-0 for finite y > 0 +// atan2l(+/-Inf, x) = +/-pi/2 for finite x +// atan2l(+/-y, -Inf) = +/-pi for finite y > 0 +// atan2l(+/-Inf, Inf) = +/-pi/4 +// atan2l(+/-Inf, -Inf) = +/-3pi/4 +// +//********************************************************************* +// +// Mathematical Description +// --------------------------- +// +// The function ATANL( Arg_Y, Arg_X ) returns the "argument" +// or the "phase" of the complex number +// +// Arg_X + i Arg_Y +// +// or equivalently, the angle in radians from the positive +// x-axis to the line joining the origin and the point +// (Arg_X,Arg_Y) +// +// +// (Arg_X, Arg_Y) x +// \ +// \ +// \ +// \ +// \ angle between is ATANL(Arg_Y,Arg_X) + + + + +// \ +// ------------------> X-axis + +// Origin +// +// Moreover, this angle is reported in the range [-pi,pi] thus +// +// -pi <= ATANL( Arg_Y, Arg_X ) <= pi. +// +// From the geometry, it is easy to define ATANL when one of +// Arg_X or Arg_Y is +-0 or +-inf: +// +// +// \ Y | +// X \ | +0 | -0 | +inf | -inf | finite non-zero +// \ | | | | | +// ______________________________________________________ +// | | | | +// +-0 | Invalid/ | pi/2 | -pi/2 | sign(Y)*pi/2 +// | qNaN | | | +// -------------------------------------------------------- +// | | | | | +// +inf | +0 | -0 | pi/4 | -pi/4 | sign(Y)*0 +// -------------------------------------------------------- +// | | | | | +// -inf | +pi | -pi | 3pi/4 | -3pi/4 | sign(Y)*pi +// -------------------------------------------------------- +// finite | X>0? | pi/2 | -pi/2 | normal case +// non-zero| sign(Y)*0: | | | +// | sign(Y)*pi | | | +// +// +// One must take note that ATANL is NOT the arctangent of the +// value Arg_Y/Arg_X; but rather ATANL and arctan are related +// in a slightly more complicated way as follows: +// +// Let U := max(|Arg_X|, |Arg_Y|); V := min(|Arg_X|, |Arg_Y|); +// sign_X be the sign bit of Arg_X, i.e., sign_X is 0 or 1; +// s_X be the sign of Arg_X, i.e., s_X = (-1)^sign_X; +// +// sign_Y be the sign bit of Arg_Y, i.e., sign_Y is 0 or 1; +// s_Y be the sign of Arg_Y, i.e., s_Y = (-1)^sign_Y; +// +// swap be 0 if |Arg_X| >= |Arg_Y| and 1 otherwise. +// +// Then, ATANL(Arg_Y, Arg_X) = +// +// / arctan(V/U) \ sign_X = 0 & swap = 0 +// | pi/2 - arctan(V/U) | sign_X = 0 & swap = 1 +// s_Y * | | +// | pi - arctan(V/U) | sign_X = 1 & swap = 0 +// \ pi/2 + arctan(V/U) / sign_X = 1 & swap = 1 +// +// +// This relationship also suggest that the algorithm's major +// task is to calculate arctan(V/U) for 0 < V <= U; and the +// final Result is given by +// +// s_Y * { (P_hi + P_lo) + sigma * arctan(V/U) } +// +// where +// +// (P_hi,P_lo) represents M(sign_X,swap)*(pi/2) accurately +// +// M(sign_X,swap) = 0 for sign_X = 0 and swap = 0 +// 1 for swap = 1 +// 2 for sign_X = 1 and swap = 0 +// +// and +// +// sigma = { (sign_X XOR swap) : -1.0 : 1.0 } +// +// = (-1) ^ ( sign_X XOR swap ) +// +// Both (P_hi,P_lo) and sigma can be stored in a table and fetched +// using (sign_X,swap) as an index. (P_hi, P_lo) can be stored as a +// double-precision, and single-precision pair; and sigma can +// obviously be just a single-precision number. +// +// In the algorithm we propose, arctan(V/U) is calculated to high accuracy +// as A_hi + A_lo. Consequently, the Result ATANL( Arg_Y, Arg_X ) is +// given by +// +// s_Y*P_hi + s_Y*sigma*A_hi + s_Y*(sigma*A_lo + P_lo) +// +// We now discuss the calculation of arctan(V/U) for 0 < V <= U. +// +// For (V/U) < 2^(-3), we use a simple polynomial of the form +// +// z + z^3*(P_1 + z^2*(P_2 + z^2*(P_3 + ... + P_8))) +// +// where z = V/U. +// +// For the sake of accuracy, the first term "z" must approximate V/U to +// extra precision. For z^3 and higher power, a working precision +// approximation to V/U suffices. Thus, we obtain: +// +// z_hi + z_lo = V/U to extra precision and +// z = V/U to working precision +// +// The value arctan(V/U) is delivered as two pieces (A_hi, A_lo) +// +// (A_hi,A_lo) = (z_hi, z^3*(P_1 + ... + P_8) + z_lo). +// +// +// For 2^(-3) <= (V/U) <= 1, we use a table-driven approach. +// Consider +// +// (V/U) = 2^k * 1.b_1 b_2 .... b_63 b_64 b_65 .... +// +// Define +// +// z_hi = 2^k * 1.b_1 b_2 b_3 b_4 1 +// +// then +// / \ +// | (V/U) - z_hi | + +// arctan(V/U) = arctan(z_hi) + acrtan| -------------- | +// | 1 + (V/U)*z_hi | +// \ / +// +// / \ +// | V - z_hi*U | + +// = arctan(z_hi) + acrtan| -------------- | +// | U + V*z_hi | +// \ / +// +// = arctan(z_hi) + acrtan( V' / U' ) +// +// +// where +// +// V' = V - U*z_hi; U' = U + V*z_hi. +// +// Let +// +// w_hi + w_lo = V'/U' to extra precision and +// w = V'/U' to working precision +// +// then we can approximate arctan(V'/U') by +// +// arctan(V'/U') = w_hi + w_lo +// + w^3*(Q_1 + w^2*(Q_2 + w^2*(Q_3 + w^2*Q_4))) +// +// = w_hi + w_lo + poly +// +// Finally, arctan(z_hi) is calculated beforehand and stored in a table +// as Tbl_hi, Tbl_lo. Thus, +// +// (A_hi, A_lo) = (Tbl_hi, w_hi+(poly+(w_lo+Tbl_lo))) +// +// This completes the mathematical description. +// +// +// Algorithm +// ------------- +// +// Step 0. Check for unsupported format. +// +// If +// ( expo(Arg_X) not zero AND msb(Arg_X) = 0 ) OR +// ( expo(Arg_Y) not zero AND msb(Arg_Y) = 0 ) +// +// then one of the arguments is unsupported. Generate an +// invalid and return qNaN. +// +// Step 1. Initialize +// +// Normalize Arg_X and Arg_Y and set the following +// +// sign_X := sign_bit(Arg_X) +// s_Y := (sign_bit(Arg_Y)==0? 1.0 : -1.0) +// swap := (|Arg_X| >= |Arg_Y|? 0 : 1 ) +// U := max( |Arg_X|, |Arg_Y| ) +// V := min( |Arg_X|, |Arg_Y| ) +// +// execute: frcpa E, pred, V, U +// If pred is 0, go to Step 5 for special cases handling. +// +// Step 2. Decide on branch. +// +// Q := E * V +// If Q < 2^(-3) go to Step 4 for simple polynomial case. +// +// Step 3. Table-driven algorithm. +// +// Q is represented as +// +// 2^(-k) * 1.b_1 b_2 b_3 ... b_63; k = 0,-1,-2,-3 +// +// and that if k = 0, b_1 = b_2 = b_3 = b_4 = 0. +// +// Define +// +// z_hi := 2^(-k) * 1.b_1 b_2 b_3 b_4 1 +// +// (note that there are 49 possible values of z_hi). +// +// ...We now calculate V' and U'. While V' is representable +// ...as a 64-bit number because of cancellation, U' is +// ...not in general a 64-bit number. Obtaining U' accurately +// ...requires two working precision numbers +// +// U_prime_hi := U + V * z_hi ...WP approx. to U' +// U_prime_lo := ( U - U_prime_hi ) + V*z_hi ...observe order +// V_prime := V - U * z_hi ...this is exact +// +// C_hi := frcpa (1.0, U_prime_hi) ...C_hi approx 1/U'_hi +// +// loop 3 times +// C_hi := C_hi + C_hi*(1.0 - C_hi*U_prime_hi) +// +// ...at this point C_hi is (1/U_prime_hi) to roughly 64 bits +// +// w_hi := V_prime * C_hi ...w_hi is V_prime/U_prime to +// ...roughly working precision +// +// ...note that we want w_hi + w_lo to approximate +// ...V_prime/(U_prime_hi + U_prime_lo) to extra precision +// ...but for now, w_hi is good enough for the polynomial +// ...calculation. +// +// wsq := w_hi*w_hi +// poly := w_hi*wsq*(Q_1 + wsq*(Q_2 + wsq*(Q_3 + wsq*Q_4))) +// +// Fetch +// (Tbl_hi, Tbl_lo) = atan(z_hi) indexed by (k,b_1,b_2,b_3,b_4) +// ...Tbl_hi is a double-precision number +// ...Tbl_lo is a single-precision number +// +// (P_hi, P_lo) := M(sign_X,swap)*(Pi_by_2_hi, Pi_by_2_lo) +// ...as discussed previous. Again; the implementation can +// ...chose to fetch P_hi and P_lo from a table indexed by +// ...(sign_X, swap). +// ...P_hi is a double-precision number; +// ...P_lo is a single-precision number. +// +// ...calculate w_lo so that w_hi + w_lo is V'/U' accurately +// w_lo := ((V_prime - w_hi*U_prime_hi) - +// w_hi*U_prime_lo) * C_hi ...observe order +// +// +// ...Ready to deliver arctan(V'/U') as A_hi, A_lo +// A_hi := Tbl_hi +// A_lo := w_hi + (poly + (Tbl_lo + w_lo)) ...observe order +// +// ...Deliver final Result +// ...s_Y*P_hi + s_Y*sigma*A_hi + s_Y*(sigma*A_lo + P_lo) +// +// sigma := ( (sign_X XOR swap) ? -1.0 : 1.0 ) +// ...sigma can be obtained by a table lookup using +// ...(sign_X,swap) as index and stored as single precision +// ...sigma should be calculated earlier +// +// P_hi := s_Y*P_hi +// A_hi := s_Y*A_hi +// +// Res_hi := P_hi + sigma*A_hi ...this is exact because +// ...both P_hi and Tbl_hi +// ...are double-precision +// ...and |Tbl_hi| > 2^(-4) +// ...P_hi is either 0 or +// ...between (1,4) +// +// Res_lo := sigma*A_lo + P_lo +// +// Return Res_hi + s_Y*Res_lo in user-defined rounding control +// +// Step 4. Simple polynomial case. +// +// ...E and Q are inherited from Step 2. +// +// A_hi := Q ...Q is inherited from Step 2 Q approx V/U +// +// loop 3 times +// E := E + E2(1.0 - E*U1 +// ...at this point E approximates 1/U to roughly working precision +// +// z := V * E ...z approximates V/U to roughly working precision +// zsq := z * z +// z4 := zsq * zsq; z8 := z4 * z4 +// +// poly1 := P_4 + zsq*(P_5 + zsq*(P_6 + zsq*(P_7 + zsq*P_8))) +// poly2 := zsq*(P_1 + zsq*(P_2 + zsq*P_3)) +// +// poly := poly1 + z8*poly2 +// +// z_lo := (V - A_hi*U)*E +// +// A_lo := z*poly + z_lo +// ...A_hi, A_lo approximate arctan(V/U) accurately +// +// (P_hi, P_lo) := M(sign_X,swap)*(Pi_by_2_hi, Pi_by_2_lo) +// ...one can store the M(sign_X,swap) as single precision +// ...values +// +// ...Deliver final Result +// ...s_Y*P_hi + s_Y*sigma*A_hi + s_Y*(sigma*A_lo + P_lo) +// +// sigma := ( (sign_X XOR swap) ? -1.0 : 1.0 ) +// ...sigma can be obtained by a table lookup using +// ...(sign_X,swap) as index and stored as single precision +// ...sigma should be calculated earlier +// +// P_hi := s_Y*P_hi +// A_hi := s_Y*A_hi +// +// Res_hi := P_hi + sigma*A_hi ...need to compute +// ...P_hi + sigma*A_hi +// ...exactly +// +// tmp := (P_hi - Res_hi) + sigma*A_hi +// +// Res_lo := s_Y*(sigma*A_lo + P_lo) + tmp +// +// Return Res_hi + Res_lo in user-defined rounding control +// +// Step 5. Special Cases +// +// These are detected early in the function by fclass instructions. +// +// We are in one of those special cases when X or Y is 0,+-inf or NaN +// +// If one of X and Y is NaN, return X+Y (which will generate +// invalid in case one is a signaling NaN). Otherwise, +// return the Result as described in the table +// +// +// +// \ Y | +// X \ | +0 | -0 | +inf | -inf | finite non-zero +// \ | | | | | +// ______________________________________________________ +// | | | | +// +-0 | Invalid/ | pi/2 | -pi/2 | sign(Y)*pi/2 +// | qNaN | | | +// -------------------------------------------------------- +// | | | | | +// +inf | +0 | -0 | pi/4 | -pi/4 | sign(Y)*0 +// -------------------------------------------------------- +// | | | | | +// -inf | +pi | -pi | 3pi/4 | -3pi/4 | sign(Y)*pi +// -------------------------------------------------------- +// finite | X>0? | pi/2 | -pi/2 | +// non-zero| sign(Y)*0: | | | N/A +// | sign(Y)*pi | | | +// +// + +ArgY_orig = f8 +Result = f8 +FR_RESULT = f8 +ArgX_orig = f9 +ArgX = f10 +FR_X = f10 +ArgY = f11 +FR_Y = f11 +s_Y = f12 +U = f13 +V = f14 +E = f15 +Q = f32 +z_hi = f33 +U_prime_hi = f34 +U_prime_lo = f35 +V_prime = f36 +C_hi = f37 +w_hi = f38 +w_lo = f39 +wsq = f40 +poly = f41 +Tbl_hi = f42 +Tbl_lo = f43 +P_hi = f44 +P_lo = f45 +A_hi = f46 +A_lo = f47 +sigma = f48 +Res_hi = f49 +Res_lo = f50 +Z = f52 +zsq = f53 +z4 = f54 +z8 = f54 +poly1 = f55 +poly2 = f56 +z_lo = f57 +tmp = f58 +P_1 = f59 +Q_1 = f60 +P_2 = f61 +Q_2 = f62 +P_3 = f63 +Q_3 = f64 +P_4 = f65 +Q_4 = f66 +P_5 = f67 +P_6 = f68 +P_7 = f69 +P_8 = f70 +U_hold = f71 +TWO_TO_NEG3 = f72 +C_hi_hold = f73 +E_hold = f74 +M = f75 +ArgX_abs = f76 +ArgY_abs = f77 +Result_lo = f78 +A_temp = f79 +FR_temp = f80 +Xsq = f81 +Ysq = f82 +tmp_small = f83 + +GR_SAVE_PFS = r33 +GR_SAVE_B0 = r34 +GR_SAVE_GP = r35 +sign_X = r36 +sign_Y = r37 +swap = r38 +table_ptr1 = r39 +table_ptr2 = r40 +k = r41 +lookup = r42 +exp_ArgX = r43 +exp_ArgY = r44 +exponent_Q = r45 +significand_Q = r46 +special = r47 +sp_exp_Q = r48 +sp_exp_4sig_Q = r49 +table_base = r50 +int_temp = r51 + +GR_Parameter_X = r49 +GR_Parameter_Y = r50 +GR_Parameter_RESULT = r51 +GR_Parameter_TAG = r52 +GR_temp = r52 + +RODATA +.align 16 + +LOCAL_OBJECT_START(Constants_atan) +// double pi/2 +data8 0x3FF921FB54442D18 +// single lo_pi/2, two**(-3) +data4 0x248D3132, 0x3E000000 +data8 0xAAAAAAAAAAAAAAA3, 0xBFFD // P_1 +data8 0xCCCCCCCCCCCC54B2, 0x3FFC // P_2 +data8 0x9249249247E4D0C2, 0xBFFC // P_3 +data8 0xE38E38E058870889, 0x3FFB // P_4 +data8 0xBA2E895B290149F8, 0xBFFB // P_5 +data8 0x9D88E6D4250F733D, 0x3FFB // P_6 +data8 0x884E51FFFB8745A0, 0xBFFB // P_7 +data8 0xE1C7412B394396BD, 0x3FFA // P_8 +data8 0xAAAAAAAAAAAAA52F, 0xBFFD // Q_1 +data8 0xCCCCCCCCC75B60D3, 0x3FFC // Q_2 +data8 0x924923AD011F1940, 0xBFFC // Q_3 +data8 0xE36F716D2A5F89BD, 0x3FFB // Q_4 +// +// Entries Tbl_hi (double precision) +// B = 1+Index/16+1/32 Index = 0 +// Entries Tbl_lo (single precision) +// B = 1+Index/16+1/32 Index = 0 +// +data8 0x3FE9A000A935BD8E +data4 0x23ACA08F, 0x00000000 +// +// Entries Tbl_hi (double precision) Index = 0,1,...,15 +// B = 2^(-1)*(1+Index/16+1/32) +// Entries Tbl_lo (single precision) +// Index = 0,1,...,15 B = 2^(-1)*(1+Index/16+1/32) +// +data8 0x3FDE77EB7F175A34 +data4 0x238729EE, 0x00000000 +data8 0x3FE0039C73C1A40B +data4 0x249334DB, 0x00000000 +data8 0x3FE0C6145B5B43DA +data4 0x22CBA7D1, 0x00000000 +data8 0x3FE1835A88BE7C13 +data4 0x246310E7, 0x00000000 +data8 0x3FE23B71E2CC9E6A +data4 0x236210E5, 0x00000000 +data8 0x3FE2EE628406CBCA +data4 0x2462EAF5, 0x00000000 +data8 0x3FE39C391CD41719 +data4 0x24B73EF3, 0x00000000 +data8 0x3FE445065B795B55 +data4 0x24C11260, 0x00000000 +data8 0x3FE4E8DE5BB6EC04 +data4 0x242519EE, 0x00000000 +data8 0x3FE587D81F732FBA +data4 0x24D4346C, 0x00000000 +data8 0x3FE6220D115D7B8D +data4 0x24ED487B, 0x00000000 +data8 0x3FE6B798920B3D98 +data4 0x2495FF1E, 0x00000000 +data8 0x3FE748978FBA8E0F +data4 0x223D9531, 0x00000000 +data8 0x3FE7D528289FA093 +data4 0x242B0411, 0x00000000 +data8 0x3FE85D69576CC2C5 +data4 0x2335B374, 0x00000000 +data8 0x3FE8E17AA99CC05D +data4 0x24C27CFB, 0x00000000 +// +// Entries Tbl_hi (double precision) Index = 0,1,...,15 +// B = 2^(-2)*(1+Index/16+1/32) +// Entries Tbl_lo (single precision) +// Index = 0,1,...,15 B = 2^(-2)*(1+Index/16+1/32) +// +data8 0x3FD025FA510665B5 +data4 0x24263482, 0x00000000 +data8 0x3FD1151A362431C9 +data4 0x242C8DC9, 0x00000000 +data8 0x3FD2025567E47C95 +data4 0x245CF9BA, 0x00000000 +data8 0x3FD2ED987A823CFE +data4 0x235C892C, 0x00000000 +data8 0x3FD3D6D129271134 +data4 0x2389BE52, 0x00000000 +data8 0x3FD4BDEE586890E6 +data4 0x24436471, 0x00000000 +data8 0x3FD5A2E0175E0F4E +data4 0x2389DBD4, 0x00000000 +data8 0x3FD685979F5FA6FD +data4 0x2476D43F, 0x00000000 +data8 0x3FD7660752817501 +data4 0x24711774, 0x00000000 +data8 0x3FD84422B8DF95D7 +data4 0x23EBB501, 0x00000000 +data8 0x3FD91FDE7CD0C662 +data4 0x23883A0C, 0x00000000 +data8 0x3FD9F93066168001 +data4 0x240DF63F, 0x00000000 +data8 0x3FDAD00F5422058B +data4 0x23FE261A, 0x00000000 +data8 0x3FDBA473378624A5 +data4 0x23A8CD0E, 0x00000000 +data8 0x3FDC76550AAD71F8 +data4 0x2422D1D0, 0x00000000 +data8 0x3FDD45AEC9EC862B +data4 0x2344A109, 0x00000000 +// +// Entries Tbl_hi (double precision) Index = 0,1,...,15 +// B = 2^(-3)*(1+Index/16+1/32) +// Entries Tbl_lo (single precision) +// Index = 0,1,...,15 B = 2^(-3)*(1+Index/16+1/32) +// +data8 0x3FC068D584212B3D +data4 0x239874B6, 0x00000000 +data8 0x3FC1646541060850 +data4 0x2335E774, 0x00000000 +data8 0x3FC25F6E171A535C +data4 0x233E36BE, 0x00000000 +data8 0x3FC359E8EDEB99A3 +data4 0x239680A3, 0x00000000 +data8 0x3FC453CEC6092A9E +data4 0x230FB29E, 0x00000000 +data8 0x3FC54D18BA11570A +data4 0x230C1418, 0x00000000 +data8 0x3FC645BFFFB3AA73 +data4 0x23F0564A, 0x00000000 +data8 0x3FC73DBDE8A7D201 +data4 0x23D4A5E1, 0x00000000 +data8 0x3FC8350BE398EBC7 +data4 0x23D4ADDA, 0x00000000 +data8 0x3FC92BA37D050271 +data4 0x23BCB085, 0x00000000 +data8 0x3FCA217E601081A5 +data4 0x23BC841D, 0x00000000 +data8 0x3FCB1696574D780B +data4 0x23CF4A8E, 0x00000000 +data8 0x3FCC0AE54D768466 +data4 0x23BECC90, 0x00000000 +data8 0x3FCCFE654E1D5395 +data4 0x2323DCD2, 0x00000000 +data8 0x3FCDF110864C9D9D +data4 0x23F53F3A, 0x00000000 +data8 0x3FCEE2E1451D980C +data4 0x23CCB11F, 0x00000000 +// +data8 0x400921FB54442D18, 0x3CA1A62633145C07 // PI two doubles +data8 0x3FF921FB54442D18, 0x3C91A62633145C07 // PI_by_2 two dbles +data8 0x3FE921FB54442D18, 0x3C81A62633145C07 // PI_by_4 two dbles +data8 0x4002D97C7F3321D2, 0x3C9A79394C9E8A0A // 3PI_by_4 two dbles +LOCAL_OBJECT_END(Constants_atan) + + +.section .text +GLOBAL_IEEE754_ENTRY(atanl) + +// Use common code with atan2l after setting x=1.0 +{ .mfi + alloc r32 = ar.pfs, 0, 17, 4, 0 + fma.s1 Ysq = ArgY_orig, ArgY_orig, f0 // Form y*y + nop.i 999 +} +{ .mfi + addl table_ptr1 = @ltoff(Constants_atan#), gp // Address of table pointer + fma.s1 Xsq = f1, f1, f0 // Form x*x + nop.i 999 +} +;; + +{ .mfi + ld8 table_ptr1 = [table_ptr1] // Get table pointer + fnorm.s1 ArgY = ArgY_orig + nop.i 999 +} +{ .mfi + nop.m 999 + fnorm.s1 ArgX = f1 + nop.i 999 +} +;; + +{ .mfi + getf.exp sign_X = f1 // Get signexp of x + fmerge.s ArgX_abs = f0, f1 // Form |x| + nop.i 999 +} +{ .mfi + nop.m 999 + fnorm.s1 ArgX_orig = f1 + nop.i 999 +} +;; + +{ .mfi + getf.exp sign_Y = ArgY_orig // Get signexp of y + fmerge.s ArgY_abs = f0, ArgY_orig // Form |y| + mov table_base = table_ptr1 // Save base pointer to tables +} +;; + +{ .mfi + ldfd P_hi = [table_ptr1],8 // Load double precision hi part of pi + fclass.m p8,p0 = ArgY_orig, 0x1e7 // Test y natval, nan, inf, zero + nop.i 999 +} +;; + +{ .mfi + ldfps P_lo, TWO_TO_NEG3 = [table_ptr1], 8 // Load P_lo and constant 2^-3 + nop.f 999 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 M = f1, f1, f0 // Set M = 1.0 + nop.i 999 +} +;; + +// +// Check for everything - if false, then must be pseudo-zero +// or pseudo-nan (IA unsupporteds). +// +{ .mfb + nop.m 999 + fclass.m p0,p12 = f1, 0x1FF // Test x unsupported +(p8) br.cond.spnt ATANL_Y_SPECIAL // Branch if y natval, nan, inf, zero +} +;; + +// U = max(ArgX_abs,ArgY_abs) +// V = min(ArgX_abs,ArgY_abs) +{ .mfi + nop.m 999 + fcmp.ge.s1 p6,p7 = Xsq, Ysq // Test for |x| >= |y| using squares + nop.i 999 +} +{ .mfb + nop.m 999 + fma.s1 V = ArgX_abs, f1, f0 // Set V assuming |x| < |y| + br.cond.sptk ATANL_COMMON // Branch to common code +} +;; + +GLOBAL_IEEE754_END(atanl) + +GLOBAL_IEEE754_ENTRY(atan2l) + +{ .mfi + alloc r32 = ar.pfs, 0, 17, 4, 0 + fma.s1 Ysq = ArgY_orig, ArgY_orig, f0 // Form y*y + nop.i 999 +} +{ .mfi + addl table_ptr1 = @ltoff(Constants_atan#), gp // Address of table pointer + fma.s1 Xsq = ArgX_orig, ArgX_orig, f0 // Form x*x + nop.i 999 +} +;; + +{ .mfi + ld8 table_ptr1 = [table_ptr1] // Get table pointer + fnorm.s1 ArgY = ArgY_orig + nop.i 999 +} +{ .mfi + nop.m 999 + fnorm.s1 ArgX = ArgX_orig + nop.i 999 +} +;; + +{ .mfi + getf.exp sign_X = ArgX_orig // Get signexp of x + fmerge.s ArgX_abs = f0, ArgX_orig // Form |x| + nop.i 999 +} +;; + +{ .mfi + getf.exp sign_Y = ArgY_orig // Get signexp of y + fmerge.s ArgY_abs = f0, ArgY_orig // Form |y| + mov table_base = table_ptr1 // Save base pointer to tables +} +;; + +{ .mfi + ldfd P_hi = [table_ptr1],8 // Load double precision hi part of pi + fclass.m p8,p0 = ArgY_orig, 0x1e7 // Test y natval, nan, inf, zero + nop.i 999 +} +;; + +{ .mfi + ldfps P_lo, TWO_TO_NEG3 = [table_ptr1], 8 // Load P_lo and constant 2^-3 + fclass.m p9,p0 = ArgX_orig, 0x1e7 // Test x natval, nan, inf, zero + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 M = f1, f1, f0 // Set M = 1.0 + nop.i 999 +} +;; + +// +// Check for everything - if false, then must be pseudo-zero +// or pseudo-nan (IA unsupporteds). +// +{ .mfb + nop.m 999 + fclass.m p0,p12 = ArgX_orig, 0x1FF // Test x unsupported +(p8) br.cond.spnt ATANL_Y_SPECIAL // Branch if y natval, nan, inf, zero +} +;; + +// U = max(ArgX_abs,ArgY_abs) +// V = min(ArgX_abs,ArgY_abs) +{ .mfi + nop.m 999 + fcmp.ge.s1 p6,p7 = Xsq, Ysq // Test for |x| >= |y| using squares + nop.i 999 +} +{ .mfb + nop.m 999 + fma.s1 V = ArgX_abs, f1, f0 // Set V assuming |x| < |y| +(p9) br.cond.spnt ATANL_X_SPECIAL // Branch if x natval, nan, inf, zero +} +;; + +// Now common code for atanl and atan2l +ATANL_COMMON: +{ .mfi + nop.m 999 + fclass.m p0,p13 = ArgY_orig, 0x1FF // Test y unsupported + shr sign_X = sign_X, 17 // Get sign bit of x +} +{ .mfi + nop.m 999 + fma.s1 U = ArgY_abs, f1, f0 // Set U assuming |x| < |y| + adds table_ptr1 = 176, table_ptr1 // Point to Q4 +} +;; + +{ .mfi +(p6) add swap = r0, r0 // Set swap=0 if |x| >= |y| +(p6) frcpa.s1 E, p0 = ArgY_abs, ArgX_abs // Compute E if |x| >= |y| + shr sign_Y = sign_Y, 17 // Get sign bit of y +} +{ .mfb + nop.m 999 +(p6) fma.s1 V = ArgY_abs, f1, f0 // Set V if |x| >= |y| +(p12) br.cond.spnt ATANL_UNSUPPORTED // Branch if x unsupported +} +;; + +// Set p8 if y >=0 +// Set p9 if y < 0 +// Set p10 if |x| >= |y| and x >=0 +// Set p11 if |x| >= |y| and x < 0 +{ .mfi + cmp.eq p8, p9 = 0, sign_Y // Test for y >= 0 +(p7) frcpa.s1 E, p0 = ArgX_abs, ArgY_abs // Compute E if |x| < |y| +(p7) add swap = 1, r0 // Set swap=1 if |x| < |y| +} +{ .mfb +(p6) cmp.eq.unc p10, p11 = 0, sign_X // If |x| >= |y|, test for x >= 0 +(p6) fma.s1 U = ArgX_abs, f1, f0 // Set U if |x| >= |y| +(p13) br.cond.spnt ATANL_UNSUPPORTED // Branch if y unsupported +} +;; + +// +// if p8, s_Y = 1.0 +// if p9, s_Y = -1.0 +// +.pred.rel "mutex",p8,p9 +{ .mfi + nop.m 999 +(p8) fadd.s1 s_Y = f0, f1 // If y >= 0 set s_Y = 1.0 + nop.i 999 +} +{ .mfi + nop.m 999 +(p9) fsub.s1 s_Y = f0, f1 // If y < 0 set s_Y = -1.0 + nop.i 999 +} +;; + +.pred.rel "mutex",p10,p11 +{ .mfi + nop.m 999 +(p10) fsub.s1 M = M, f1 // If |x| >= |y| and x >=0, set M=0 + nop.i 999 +} +{ .mfi + nop.m 999 +(p11) fadd.s1 M = M, f1 // If |x| >= |y| and x < 0, set M=2.0 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fcmp.eq.s0 p0, p9 = ArgX_orig, ArgY_orig // Dummy to set denormal flag + nop.i 999 +} +// ************************************************* +// ********************* STEP2 ********************* +// ************************************************* +// +// Q = E * V +// +{ .mfi + nop.m 999 + fmpy.s1 Q = E, V + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fnma.s1 E_hold = E, U, f1 // E_hold = 1.0 - E*U (1) if POLY path + nop.i 999 +} +;; + +// Create a single precision representation of the signexp of Q with the +// 4 most significant bits of the significand followed by a 1 and then 18 0's +{ .mfi + nop.m 999 + fmpy.s1 P_hi = M, P_hi + dep.z special = 0x1, 18, 1 // Form 0x0000000000040000 +} +{ .mfi + nop.m 999 + fmpy.s1 P_lo = M, P_lo + add table_ptr2 = 32, table_ptr1 +} +;; + +{ .mfi + nop.m 999 + fma.s1 A_temp = Q, f1, f0 // Set A_temp if POLY path + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 E = E, E_hold, E // E = E + E*E_hold (1) if POLY path + nop.i 999 +} +;; + +// +// Is Q < 2**(-3)? +// swap = xor(swap,sign_X) +// +{ .mfi + nop.m 999 + fcmp.lt.s1 p9, p0 = Q, TWO_TO_NEG3 // Test Q < 2^-3 + xor swap = sign_X, swap +} +;; + +// P_hi = s_Y * P_hi +{ .mmf + getf.exp exponent_Q = Q // Get signexp of Q + cmp.eq.unc p7, p6 = 0x00000, swap + fmpy.s1 P_hi = s_Y, P_hi +} +;; + +// +// if (PR_1) sigma = -1.0 +// if (PR_2) sigma = 1.0 +// +{ .mfi + getf.sig significand_Q = Q // Get significand of Q +(p6) fsub.s1 sigma = f0, f1 + nop.i 999 +} +{ .mfb +(p9) add table_ptr1 = 128, table_base // Point to P8 if POLY path +(p7) fadd.s1 sigma = f0, f1 +(p9) br.cond.spnt ATANL_POLY // Branch to POLY if 0 < Q < 2^-3 +} +;; + +// +// ************************************************* +// ******************** STEP3 ********************** +// ************************************************* +// +// lookup = b_1 b_2 b_3 B_4 +// +{ .mmi + nop.m 999 + nop.m 999 + andcm k = 0x0003, exponent_Q // k=0,1,2,3 for exp_Q=0,-1,-2,-3 +} +;; + +// +// Generate sign_exp_Q b_1 b_2 b_3 b_4 1 0 0 0 ... 0 in single precision +// representation. Note sign of Q is always 0. +// +{ .mfi + cmp.eq p8, p9 = 0x0000, k // Test k=0 + nop.f 999 + extr.u lookup = significand_Q, 59, 4 // Extract b_1 b_2 b_3 b_4 for index +} +{ .mfi + sub sp_exp_Q = 0x7f, k // Form single prec biased exp of Q + nop.f 999 + sub k = k, r0, 1 // Decrement k +} +;; + +// Form pointer to B index table +{ .mfi + ldfe Q_4 = [table_ptr1], -16 // Load Q_4 + nop.f 999 +(p9) shl k = k, 8 // k = 0, 256, or 512 +} +{ .mfi +(p9) shladd table_ptr2 = lookup, 4, table_ptr2 + nop.f 999 + shladd sp_exp_4sig_Q = sp_exp_Q, 4, lookup // Shift and add in 4 high bits +} +;; + +{ .mmi +(p8) add table_ptr2 = -16, table_ptr2 // Pointer if original k was 0 +(p9) add table_ptr2 = k, table_ptr2 // Pointer if k was 1, 2, 3 + dep special = sp_exp_4sig_Q, special, 19, 13 // Form z_hi as single prec +} +;; + +// z_hi = s exp 1.b_1 b_2 b_3 b_4 1 0 0 0 ... 0 +{ .mmi + ldfd Tbl_hi = [table_ptr2], 8 // Load Tbl_hi from index table +;; + setf.s z_hi = special // Form z_hi + nop.i 999 +} +{ .mmi + ldfs Tbl_lo = [table_ptr2], 8 // Load Tbl_lo from index table +;; + ldfe Q_3 = [table_ptr1], -16 // Load Q_3 + nop.i 999 +} +;; + +{ .mmi + ldfe Q_2 = [table_ptr1], -16 // Load Q_2 + nop.m 999 + nop.i 999 +} +;; + +{ .mmf + ldfe Q_1 = [table_ptr1], -16 // Load Q_1 + nop.m 999 + nop.f 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 U_prime_hi = V, z_hi, U // U_prime_hi = U + V * z_hi + nop.i 999 +} +{ .mfi + nop.m 999 + fnma.s1 V_prime = U, z_hi, V // V_prime = V - U * z_hi + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + mov A_hi = Tbl_hi // Start with A_hi = Tbl_hi + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fsub.s1 U_hold = U, U_prime_hi // U_hold = U - U_prime_hi + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + frcpa.s1 C_hi, p0 = f1, U_prime_hi // C_hi = frcpa(1,U_prime_hi) + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fmpy.s1 A_hi = s_Y, A_hi // A_hi = s_Y * A_hi + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 U_prime_lo = z_hi, V, U_hold // U_prime_lo = U_hold + V * z_hi + nop.i 999 +} +;; + +// C_hi_hold = 1 - C_hi * U_prime_hi (1) +{ .mfi + nop.m 999 + fnma.s1 C_hi_hold = C_hi, U_prime_hi, f1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 Res_hi = sigma, A_hi, P_hi // Res_hi = P_hi + sigma * A_hi + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 C_hi = C_hi_hold, C_hi, C_hi // C_hi = C_hi + C_hi * C_hi_hold (1) + nop.i 999 +} +;; + +// C_hi_hold = 1 - C_hi * U_prime_hi (2) +{ .mfi + nop.m 999 + fnma.s1 C_hi_hold = C_hi, U_prime_hi, f1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 C_hi = C_hi_hold, C_hi, C_hi // C_hi = C_hi + C_hi * C_hi_hold (2) + nop.i 999 +} +;; + +// C_hi_hold = 1 - C_hi * U_prime_hi (3) +{ .mfi + nop.m 999 + fnma.s1 C_hi_hold = C_hi, U_prime_hi, f1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 C_hi = C_hi_hold, C_hi, C_hi // C_hi = C_hi + C_hi * C_hi_hold (3) + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fmpy.s1 w_hi = V_prime, C_hi // w_hi = V_prime * C_hi + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fmpy.s1 wsq = w_hi, w_hi // wsq = w_hi * w_hi + nop.i 999 +} +{ .mfi + nop.m 999 + fnma.s1 w_lo = w_hi, U_prime_hi, V_prime // w_lo = V_prime-w_hi*U_prime_hi + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 poly = wsq, Q_4, Q_3 // poly = Q_3 + wsq * Q_4 + nop.i 999 +} +{ .mfi + nop.m 999 + fnma.s1 w_lo = w_hi, U_prime_lo, w_lo // w_lo = w_lo - w_hi * U_prime_lo + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 poly = wsq, poly, Q_2 // poly = Q_2 + wsq * poly + nop.i 999 +} +{ .mfi + nop.m 999 + fmpy.s1 w_lo = C_hi, w_lo // w_lo = = w_lo * C_hi + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 poly = wsq, poly, Q_1 // poly = Q_1 + wsq * poly + nop.i 999 +} +{ .mfi + nop.m 999 + fadd.s1 A_lo = Tbl_lo, w_lo // A_lo = Tbl_lo + w_lo + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fmpy.s0 Q_1 = Q_1, Q_1 // Dummy operation to raise inexact + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fmpy.s1 poly = wsq, poly // poly = wsq * poly + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fmpy.s1 poly = w_hi, poly // poly = w_hi * poly + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fadd.s1 A_lo = A_lo, poly // A_lo = A_lo + poly + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fadd.s1 A_lo = A_lo, w_hi // A_lo = A_lo + w_hi + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 Res_lo = sigma, A_lo, P_lo // Res_lo = P_lo + sigma * A_lo + nop.i 999 +} +;; + +// +// Result = Res_hi + Res_lo * s_Y (User Supplied Rounding Mode) +// +{ .mfb + nop.m 999 + fma.s0 Result = Res_lo, s_Y, Res_hi + br.ret.sptk b0 // Exit table path 2^-3 <= V/U < 1 +} +;; + + +ATANL_POLY: +// Here if 0 < V/U < 2^-3 +// +// *********************************************** +// ******************** STEP4 ******************** +// *********************************************** + +// +// Following: +// Iterate 3 times E = E + E*(1.0 - E*U) +// Also load P_8, P_7, P_6, P_5, P_4 +// +{ .mfi + ldfe P_8 = [table_ptr1], -16 // Load P_8 + fnma.s1 z_lo = A_temp, U, V // z_lo = V - A_temp * U + nop.i 999 +} +{ .mfi + nop.m 999 + fnma.s1 E_hold = E, U, f1 // E_hold = 1.0 - E*U (2) + nop.i 999 +} +;; + +{ .mmi + ldfe P_7 = [table_ptr1], -16 // Load P_7 +;; + ldfe P_6 = [table_ptr1], -16 // Load P_6 + nop.i 999 +} +;; + +{ .mfi + ldfe P_5 = [table_ptr1], -16 // Load P_5 + fma.s1 E = E, E_hold, E // E = E + E_hold*E (2) + nop.i 999 +} +;; + +{ .mmi + ldfe P_4 = [table_ptr1], -16 // Load P_4 +;; + ldfe P_3 = [table_ptr1], -16 // Load P_3 + nop.i 999 +} +;; + +{ .mfi + ldfe P_2 = [table_ptr1], -16 // Load P_2 + fnma.s1 E_hold = E, U, f1 // E_hold = 1.0 - E*U (3) + nop.i 999 +} +{ .mlx + nop.m 999 + movl int_temp = 0x24005 // Signexp for small neg number +} +;; + +{ .mmf + ldfe P_1 = [table_ptr1], -16 // Load P_1 + setf.exp tmp_small = int_temp // Form small neg number + fma.s1 E = E, E_hold, E // E = E + E_hold*E (3) +} +;; + +// +// +// At this point E approximates 1/U to roughly working precision +// Z = V*E approximates V/U +// +{ .mfi + nop.m 999 + fmpy.s1 Z = V, E // Z = V * E + nop.i 999 +} +{ .mfi + nop.m 999 + fmpy.s1 z_lo = z_lo, E // z_lo = z_lo * E + nop.i 999 +} +;; + +// +// Now what we want to do is +// poly1 = P_4 + zsq*(P_5 + zsq*(P_6 + zsq*(P_7 + zsq*P_8))) +// poly2 = zsq*(P_1 + zsq*(P_2 + zsq*P_3)) +// +// +// Fixup added to force inexact later - +// A_hi = A_temp + z_lo +// z_lo = (A_temp - A_hi) + z_lo +// +{ .mfi + nop.m 999 + fmpy.s1 zsq = Z, Z // zsq = Z * Z + nop.i 999 +} +{ .mfi + nop.m 999 + fadd.s1 A_hi = A_temp, z_lo // A_hi = A_temp + z_lo + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 poly1 = zsq, P_8, P_7 // poly1 = P_7 + zsq * P_8 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 poly2 = zsq, P_3, P_2 // poly2 = P_2 + zsq * P_3 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fmpy.s1 z4 = zsq, zsq // z4 = zsq * zsq + nop.i 999 +} +{ .mfi + nop.m 999 + fsub.s1 A_temp = A_temp, A_hi // A_temp = A_temp - A_hi + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fmerge.s tmp = A_hi, A_hi // Copy tmp = A_hi + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 poly1 = zsq, poly1, P_6 // poly1 = P_6 + zsq * poly1 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 poly2 = zsq, poly2, P_1 // poly2 = P_2 + zsq * poly2 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fmpy.s1 z8 = z4, z4 // z8 = z4 * z4 + nop.i 999 +} +{ .mfi + nop.m 999 + fadd.s1 z_lo = A_temp, z_lo // z_lo = (A_temp - A_hi) + z_lo + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 poly1 = zsq, poly1, P_5 // poly1 = P_5 + zsq * poly1 + nop.i 999 +} +{ .mfi + nop.m 999 + fmpy.s1 poly2 = poly2, zsq // poly2 = zsq * poly2 + nop.i 999 +} +;; + +// Create small GR double in case need to raise underflow +{ .mfi + nop.m 999 + fma.s1 poly1 = zsq, poly1, P_4 // poly1 = P_4 + zsq * poly1 + dep GR_temp = -1,r0,0,53 +} +;; + +// Create small double in case need to raise underflow +{ .mfi + setf.d FR_temp = GR_temp + fma.s1 poly = z8, poly1, poly2 // poly = poly2 + z8 * poly1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 A_lo = Z, poly, z_lo // A_lo = z_lo + Z * poly + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fadd.s1 A_hi = tmp, A_lo // A_hi = tmp + A_lo + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fsub.s1 tmp = tmp, A_hi // tmp = tmp - A_hi + nop.i 999 +} +{ .mfi + nop.m 999 + fmpy.s1 A_hi = s_Y, A_hi // A_hi = s_Y * A_hi + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fadd.s1 A_lo = tmp, A_lo // A_lo = tmp + A_lo + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 Res_hi = sigma, A_hi, P_hi // Res_hi = P_hi + sigma * A_hi + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fsub.s1 tmp = P_hi, Res_hi // tmp = P_hi - Res_hi + nop.i 999 +} +;; + +// +// Test if A_lo is zero +// +{ .mfi + nop.m 999 + fclass.m p6,p0 = A_lo, 0x007 // Test A_lo = 0 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p6) mov A_lo = tmp_small // If A_lo zero, make very small + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 tmp = A_hi, sigma, tmp // tmp = sigma * A_hi + tmp + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 sigma = A_lo, sigma, P_lo // sigma = A_lo * sigma + P_lo + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 Res_lo = s_Y, sigma, tmp // Res_lo = s_Y * sigma + tmp + nop.i 999 +} +;; + +// +// Test if Res_lo is denormal +// +{ .mfi + nop.m 999 + fclass.m p14, p15 = Res_lo, 0x0b + nop.i 999 +} +;; + +// +// Compute Result = Res_lo + Res_hi. Use s3 if Res_lo is denormal. +// +{ .mfi + nop.m 999 +(p14) fadd.s3 Result = Res_lo, Res_hi // Result for Res_lo denormal + nop.i 999 +} +{ .mfi + nop.m 999 +(p15) fadd.s0 Result = Res_lo, Res_hi // Result for Res_lo normal + nop.i 999 +} +;; + +// +// If Res_lo is denormal test if Result equals zero +// +{ .mfi + nop.m 999 +(p14) fclass.m.unc p14, p0 = Result, 0x07 + nop.i 999 +} +;; + +// +// If Res_lo is denormal and Result equals zero, raise inexact, underflow +// by squaring small double +// +{ .mfb + nop.m 999 +(p14) fmpy.d.s0 FR_temp = FR_temp, FR_temp + br.ret.sptk b0 // Exit POLY path, 0 < Q < 2^-3 +} +;; + + +ATANL_UNSUPPORTED: +{ .mfb + nop.m 999 + fmpy.s0 Result = ArgX,ArgY + br.ret.sptk b0 +} +;; + +// Here if y natval, nan, inf, zero +ATANL_Y_SPECIAL: +// Here if x natval, nan, inf, zero +ATANL_X_SPECIAL: +{ .mfi + nop.m 999 + fclass.m p13,p12 = ArgY_orig, 0x0c3 // Test y nan + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fclass.m p15,p14 = ArgY_orig, 0x103 // Test y natval + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p12) fclass.m p13,p0 = ArgX_orig, 0x0c3 // Test x nan + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p14) fclass.m p15,p0 = ArgX_orig, 0x103 // Test x natval + nop.i 999 +} +;; + +{ .mfb + nop.m 999 +(p13) fmpy.s0 Result = ArgX_orig, ArgY_orig // Result nan if x or y nan +(p13) br.ret.spnt b0 // Exit if x or y nan +} +;; + +{ .mfb + nop.m 999 +(p15) fmpy.s0 Result = ArgX_orig, ArgY_orig // Result natval if x or y natval +(p15) br.ret.spnt b0 // Exit if x or y natval +} +;; + + +// Here if x or y inf or zero +ATANL_SPECIAL_HANDLING: +{ .mfi + nop.m 999 + fclass.m p6, p7 = ArgY_orig, 0x007 // Test y zero + mov special = 992 // Offset to table +} +;; + +{ .mfb + add table_ptr1 = table_base, special // Point to 3pi/4 + fcmp.eq.s0 p0, p9 = ArgX_orig, ArgY_orig // Dummy to set denormal flag +(p7) br.cond.spnt ATANL_ArgY_Not_ZERO // Branch if y not zero +} +;; + +// Here if y zero +{ .mmf + ldfd Result = [table_ptr1], 8 // Get pi high + nop.m 999 + fclass.m p14, p0 = ArgX, 0x035 // Test for x>=+0 +} +;; + +{ .mmf + nop.m 999 + ldfd Result_lo = [table_ptr1], -8 // Get pi lo + fclass.m p15, p0 = ArgX, 0x036 // Test for x<=-0 +} +;; + +// +// Return sign_Y * 0 when ArgX > +0 +// +{ .mfi + nop.m 999 +(p14) fmerge.s Result = ArgY, f0 // If x>=+0, y=0, hi sgn(y)*0 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fclass.m p13, p0 = ArgX, 0x007 // Test for x=0 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p14) fmerge.s Result_lo = ArgY, f0 // If x>=+0, y=0, lo sgn(y)*0 + nop.i 999 +} +;; + +{ .mfi +(p13) mov GR_Parameter_TAG = 36 // Error tag for x=0, y=0 + nop.f 999 + nop.i 999 +} +;; + +// +// Return sign_Y * pi when ArgX < -0 +// +{ .mfi + nop.m 999 +(p15) fmerge.s Result = ArgY, Result // If x<0, y=0, hi=sgn(y)*pi + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p15) fmerge.s Result_lo = ArgY, Result_lo // If x<0, y=0, lo=sgn(y)*pi + nop.i 999 +} +;; + +// +// Call error support function for atan(0,0) +// +{ .mfb + nop.m 999 + fadd.s0 Result = Result, Result_lo +(p13) br.cond.spnt __libm_error_region // Branch if atan(0,0) +} +;; + +{ .mib + nop.m 999 + nop.i 999 + br.ret.sptk b0 // Exit for y=0, x not 0 +} +;; + +// Here if y not zero +ATANL_ArgY_Not_ZERO: +{ .mfi + nop.m 999 + fclass.m p0, p10 = ArgY, 0x023 // Test y inf + nop.i 999 +} +;; + +{ .mfb + nop.m 999 + fclass.m p6, p0 = ArgX, 0x017 // Test for 0 <= |x| < inf +(p10) br.cond.spnt ATANL_ArgY_Not_INF // Branch if 0 < |y| < inf +} +;; + +// Here if y=inf +// +// Return +PI/2 when ArgY = +Inf and ArgX = +/-0 or normal +// Return -PI/2 when ArgY = -Inf and ArgX = +/-0 or normal +// Return +PI/4 when ArgY = +Inf and ArgX = +Inf +// Return -PI/4 when ArgY = -Inf and ArgX = +Inf +// Return +3PI/4 when ArgY = +Inf and ArgX = -Inf +// Return -3PI/4 when ArgY = -Inf and ArgX = -Inf +// +{ .mfi + nop.m 999 + fclass.m p7, p0 = ArgX, 0x021 // Test for x=+inf + nop.i 999 +} +;; + +{ .mfi +(p6) add table_ptr1 = 16, table_ptr1 // Point to pi/2, if x finite + fclass.m p8, p0 = ArgX, 0x022 // Test for x=-inf + nop.i 999 +} +;; + +{ .mmi +(p7) add table_ptr1 = 32, table_ptr1 // Point to pi/4 if x=+inf +;; +(p8) add table_ptr1 = 48, table_ptr1 // Point to 3pi/4 if x=-inf + + nop.i 999 +} +;; + +{ .mmi + ldfd Result = [table_ptr1], 8 // Load pi/2, pi/4, or 3pi/4 hi +;; + ldfd Result_lo = [table_ptr1], -8 // Load pi/2, pi/4, or 3pi/4 lo + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fmerge.s Result = ArgY, Result // Merge sgn(y) in hi + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fmerge.s Result_lo = ArgY, Result_lo // Merge sgn(y) in lo + nop.i 999 +} +;; + +{ .mfb + nop.m 999 + fadd.s0 Result = Result, Result_lo // Compute complete result + br.ret.sptk b0 // Exit for y=inf +} +;; + +// Here if y not INF, and x=0 or INF +ATANL_ArgY_Not_INF: +// +// Return +PI/2 when ArgY NOT Inf, ArgY > 0 and ArgX = +/-0 +// Return -PI/2 when ArgY NOT Inf, ArgY < 0 and ArgX = +/-0 +// Return +0 when ArgY NOT Inf, ArgY > 0 and ArgX = +Inf +// Return -0 when ArgY NOT Inf, ArgY > 0 and ArgX = +Inf +// Return +PI when ArgY NOT Inf, ArgY > 0 and ArgX = -Inf +// Return -PI when ArgY NOT Inf, ArgY > 0 and ArgX = -Inf +// +{ .mfi + nop.m 999 + fclass.m p7, p9 = ArgX, 0x021 // Test for x=+inf + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fclass.m p6, p0 = ArgX, 0x007 // Test for x=0 + nop.i 999 +} +;; + +{ .mfi +(p6) add table_ptr1 = 16, table_ptr1 // Point to pi/2 + fclass.m p8, p0 = ArgX, 0x022 // Test for x=-inf + nop.i 999 +} +;; + +.pred.rel "mutex",p7,p9 +{ .mfi +(p9) ldfd Result = [table_ptr1], 8 // Load pi or pi/2 hi +(p7) fmerge.s Result = ArgY, f0 // If y not inf, x=+inf, sgn(y)*0 + nop.i 999 +} +;; + +{ .mfi +(p9) ldfd Result_lo = [table_ptr1], -8 // Load pi or pi/2 lo +(p7) fnorm.s0 Result = Result // If y not inf, x=+inf normalize + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fmerge.s Result = ArgY, Result // Merge sgn(y) in hi + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fmerge.s Result_lo = ArgY, Result_lo // Merge sgn(y) in lo + nop.i 999 +} +;; + +{ .mfb + nop.m 999 +(p9) fadd.s0 Result = Result, Result_lo // Compute complete result + br.ret.spnt b0 // Exit for y not inf, x=0,inf +} +;; + +GLOBAL_IEEE754_END(atan2l) + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfe [GR_Parameter_Y] = FR_Y,16 // Save Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; +.body +{ .mib + stfe [GR_Parameter_X] = FR_X // Store Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y + nop.b 0 // Parameter 3 address +} +{ .mib + stfe [GR_Parameter_Y] = FR_RESULT // Store Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + nop.m 0 + nop.m 0 + add GR_Parameter_RESULT = 48,sp +};; +{ .mmi + ldfe f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region#) +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/s_cbrt.S b/sysdeps/ia64/fpu/s_cbrt.S new file mode 100644 index 0000000000..7a74ac19be --- /dev/null +++ b/sysdeps/ia64/fpu/s_cbrt.S @@ -0,0 +1,767 @@ +.file "cbrt.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 05/19/00 New version (modified algorithm) +// 05/20/02 Cleaned up namespace and sf0 syntax +// 01/28/03 Updated polynomial coefficients (changed to Remez coefficients), +// to slightly improve accuracy +// +// API +//============================================================== +// double cbrt(double) +// +// Overview of operation +//============================================================== +// Background +// +// Implementation +// +// Let y= frcpa(a), where a is the argument +// +// cbrt(a)= cbrt(a*y)/cbrt(y) = cbrt(1 - (1-a*y)) * (1/cbrt(y)) +// +// For all values of y, the 3 possible significands of 1/cbrt(y) +// are stored in a table (T0) to 64 bits of accuracy. (There are +// 3 possible significands because the exponent of y modulo 3 +// can be 0, 1, or 2.) +// +// +// * cbrt(1 - (1-a*y)) is approximated by a degree-5 polynomial ~ +// +// ~ 1 - (1/3)*r - (1/9)*r^2 - (5/81)*r^3 - (10/243)*r^4 - (22/729)*r^5 +// +// in r = 1-a*y. +// +// +// The table values are stored for three exponent values and are +// then multiplied by e/3 where e is the exponent of the input number. +// This computation is carried out in parallel with the polynomial +// evaluation: +// +// T= 2^(e/3) * T0 + + + + + +//=============== +// input= x +// C= frcpa(x) +// r= 1 - C * x +// +// Special values +//============================================================== + + + +// Registers used +//============================================================== +// f6-f15 +// GR_GP, r23-r26, r28-r30 +// p6, p7, p8, p12 + + FR_R = f6 + FR_COEFF1 = f7 + FR_COEFF2 = f9 + FR_COEFF3 = f10 + FR_COEFF4 = f11 + FR_COEFF5 = f12 + FR_R2 = f13 + FR_ARG = f14 + FR_P23 = f15 + FR_P25 = f32 + FR_P15 = f33 + FR_P1 = f34 + FR_P45 = f35 + FR_2EXP = f36 + FR_TMP63 = f37 + + GR_GP = r2 + GR_ADDR = r2 + GR_CONST1 = r3 + GR_I1 = r8 + GR_EXP = r9 + GR_ADDR2 = r10 + GR_IT1 = r11 + GR_TMP2 = r11 + GR_EXPON = r15 + GR_TMP1 = r16 + GR_TMP6 = r16 + GR_ITB1 = r17 + GR_TMP3 = r18 + GR_TMP4 = r19 + GR_TMP63 = r19 + GR_TMP5 = r20 + GR_EXP_BY_3 = r20 + GR_CONST4 = r21 + GR_TMP6 = r22 + GR_INDEX = r23 + GR_EBIAS = r24 + GR_SIGNIF = r25 + GR_SIGNIF2 = r25 + GR_TEST = r25 + GR_ARGEXP = r26 + GR_CONST2 = r27 + GR_SIGN = r28 + GR_REM = r29 + GR_CONST3 = r30 + GR_SEXP = r31 + + + + + +// Data tables +//============================================================== + +RODATA + +.align 16 + +LOCAL_OBJECT_START(poly_coeffs) + + data8 0xaaaaaaaaaaaaaab4, 0x0000bffd // ~ 1/3 + data8 0xbfbc71c71c718e45, 0xbfaf9add3c0bbb43 + data8 0xbfa511edb93dc98d, 0xbf9ee71c45f0dfbc +LOCAL_OBJECT_END(poly_coeffs) + + +// For every entry B in the frcpa table, this table contains +// the significands of cbrt(1/B), cbrt(2/B), cbrt(4/B). +// The index to this table is the same as the frcpa index. + +LOCAL_OBJECT_START(T_table) + + + data8 0x80155c748c374836, 0xa160019ed37fb4ae + data8 0xcb51ddcb9e93095e, 0x8040404b0879f7f9 + data8 0xa1960b5966da4608, 0xcb95f333968ad59b + data8 0x806b5dce4b405c10, 0xa1cc5dbe6dc2aab4 + data8 0xcbda64292d3ffd97, 0x8096b586974669b1 + data8 0xa202f97995b69c0d, 0xcc1f3184af961596 + data8 0x80bcd273d952a028, 0xa232fe6eb0c0577d + data8 0xcc5bb1ac954d33e2, 0x80e898c52813f2f3 + data8 0xa26a2582012f6e17, 0xcca12e9831fc6402 + data8 0x81149add67c2d208, 0xa2a197e5d10465cb + data8 0xcce70a67b64f24ad, 0x813b4e2c856b6e9a + data8 0xa2d25a532efefbc8, 0xcd24794726477ea5 + data8 0x8167c1dde03de7aa, 0xa30a5bd6e49e4ab8 + data8 0xcd6b096a0b70ee87, 0x818ed973b811135e + data8 0xa33b9c9b59879e24, 0xcda9177738b15a90 + data8 0x81bbc0c33e13ec98, 0xa3742fca6a3c1f21 + data8 0xcdf05f2247dffab9, 0x81e33e69fbe7504a + data8 0xa3a5f1273887bf22, 0xce2f0f347f96f906 + data8 0x820aec524e3c23e9, 0xa3d7ef508ff11574 + data8 0xce6e0be0cd551a61, 0x823880f78e70b805 + data8 0xa4115ce30548bc15, 0xceb666b2c347d1de + data8 0x826097a62a8e5200, 0xa443df0e53df577a + data8 0xcef609b0cb874f00, 0x8288dfe00e9b5eaf + data8 0xa4769fa5913c0ec3, 0xcf35fb5447e5c765 + data8 0x82b15a10c5371624, 0xa4a99f303bc7def5 + data8 0xcf763c47ee869f00, 0x82da06a527b18937 + data8 0xa4dcde37779adf4b, 0xcfb6cd3888d71785 + data8 0x8302e60b635ab394, 0xa5105d46152c938a + data8 0xcff7aed4fbfbb447, 0x832bf8b2feec2f0e + data8 0xa5441ce89825cb8d, 0xd038e1ce5167e3c6 + data8 0x83553f0ce00e276b, 0xa5781dad3e54d899 + data8 0xd07a66d7bfa0ebba, 0x837eb98b50f8322a + data8 0xa5ac602406c4e68c, 0xd0bc3ea6b32d1b21 + data8 0x83a270f44c84f699, 0xa5d9601d95c2c0bc + data8 0xd0f4f0e8f36c1bf8, 0x83cc4d7cfcfac5ca + data8 0xa60e1e1a2de14745, 0xd1376458e34b037e + data8 0x83f65f78a8872b4c, 0xa6431f6e3fbd9658 + data8 0xd17a2ca133f78572, 0x8420a75f2f7b53c8 + data8 0xa67864b0d432fda4, 0xd1bd4a80301c5715 + data8 0x844510461ff14209, 0xa6a6444aa0243c0b + data8 0xd1f71682b2fa4575, 0x846fbd91b930bed2 + data8 0xa6dc094d10f25792, 0xd23ad555f773f059 + data8 0x84947e18234f3294, 0xa70a574cc02bba69 + data8 0xd2752c7039a5bf73, 0x84bf92755825045a + data8 0xa7409e2af9549084, 0xd2b98ee008c06b59 + data8 0x84e4ac0ee112ba51, 0xa76f5c64ca2cf13b + data8 0xd2f4735ffd700280, 0x8509ef44b86f20be + data8 0xa79e4f0babab5dc0, 0xd32f99ed6d9ac0e1 + data8 0x85359d5d91768427, 0xa7d5579ae5164b85 + data8 0xd374f0666c75d51c, 0x855b3bd5b7384357 + data8 0xa804bd3c6fe61cc8, 0xd3b0a7d13618e4a1 + data8 0x858104f0c415f79a, 0xa8345895e5250a5a + data8 0xd3eca2ea53bcec0c, 0x85a6f90390d29864 + data8 0xa8642a122b44ef0b, 0xd428e23874f13a17 + data8 0x85d3772fcd56a1dd, 0xa89c38ca18f6108b + data8 0xd46f82fe293bc6d3, 0x85f9c982fcc002f3 + data8 0xa8cc81063b6e87ca, 0xd4ac57e9b7186420 + data8 0x862047e0e7ea554b, 0xa8fd00bfa409285e + data8 0xd4e972becb04e8b8, 0x8646f2a26f7f5852 + data8 0xa92db8664d5516da, 0xd526d40a7a9b43a3 + data8 0x866dca21754096b5, 0xa95ea86b75cc2c20 + data8 0xd5647c5b73917370, 0x8694ceb8dfd17a37 + data8 0xa98fd141a4992deb, 0xd5a26c4201bd6d13 + data8 0x86bc00c49e9307e8, 0xa9c1335cae7446ba + data8 0xd5e0a45015350a7e, 0x86dccd74fce79610 + data8 0xa9ea8686f556f645, 0xd614b539c6194104 + data8 0x870453c845acf90f, 0xaa1c52d17906bb19 + data8 0xd6537310e224283f, 0x872c089a1e90342c + data8 0xaa4e59b046dab887, 0xd6927ab62244c917 + data8 0x8753ec4a92d16c5e, 0xaa809b9c60d1890b + data8 0xd6d1ccc1fc4ef4b7, 0x877bff3aca19f6b4 + data8 0xaab319102f3f9b33, 0xd71169cea98fdded + data8 0x879d88b6fe1c324c, 0xaadd5a18c1e21274 + data8 0xd746a66a5bc9f6d9, 0x87c5f346dbf98c3a + data8 0xab1045f2ac31bdf5, 0xd786ce8f0fae5317 + data8 0x87e7c653efacef2c, 0xab3ae3ab2df7231e + data8 0xd7bc7ff214c4e75a, 0x881089d4e73ffefc + data8 0xab6e3f945d1e96fc, 0xd7fd35467a517ed1 + data8 0x88397e6a366f2a8a, 0xaba1d953a08fa94e + data8 0xd83e38838648d815, 0x885bc559e5e1c081 + data8 0xabcd090db7ef4c3f, 0xd874a1db598b8951 + data8 0x887e2ee392bb7a93, 0xabf864602d7c323d + data8 0xd8ab42205b80edaf, 0x88a7a8587e404257 + data8 0xac2ca5886ccf9b57, 0xd8ed1849d202f965 + data8 0x88ca5eda67594784, 0xac5861d4aa441f0f + data8 0xd92432bd5a173685, 0x88f4356166bd590e + data8 0xac8d183fe3a2fbed, 0xd9669ca45b03c23e + data8 0x89173a0acf5ce026, 0xacb93703ff51571e + data8 0xd99e3327cf89574e, 0x893a62a098b6a57b + data8 0xace5830ad0c3f14b, 0xd9d602b19b100466 + data8 0x895daf637236ae2c, 0xad11fca5d78b3ff2 + data8 0xda0e0ba86c096841, 0x89883b9d1c2fa9c5 + data8 0xad4797fddf91a798, 0xda5195fcdb1c3dce + data8 0x89abd8dd374a5d7b, 0xad747701e559ebcb + data8 0xda8a1eb87a491f6c, 0x89cf9b1dcd197fa0 + data8 0xada184a47e9c7613, 0xdac2e230b91c3f84 + data8 0x89f382a258ea79de, 0xadcec13ab0dda8ff + data8 0xdafbe0d0b66aea30, 0x8a178faf06648f29 + data8 0xadfc2d1a5fd21ba8, 0xdb351b04a8fafced + data8 0x8a3bc288b3e1d18a, 0xae29c89a5053c33a + data8 0xdb6e9139e33cdd8e, 0x8a601b74f4d1f835 + data8 0xae5794122b638df9, 0xdba843ded7151ea1 + data8 0x8a849aba14274764, 0xae858fda8137ae0a + data8 0xdbe2336319b61fc8, 0x8aa9409f16cdbc9b + data8 0xaeb3bc4ccc56d3d1, 0xdc1c60376789fa68 + data8 0x8ace0d6bbe2cb316, 0xaee219c374c09920 + data8 0xdc56cacda82d0cd5, 0x8af301688ab33558 + data8 0xaf10a899d3235fe7, 0xdc917398f2797814 + data8 0x8b181cdebe6f3206, 0xaf3f692c341fe8b4 + data8 0xdccc5b0d90a3e628, 0x8b3d60185fafcb7c + data8 0xaf6e5bd7db9ae6c2, 0xdd0781a10469f0f2 + data8 0x8b62cb603bb2fad0, 0xaf9d80fb081cd91b + data8 0xdd42e7ca0b52838f, 0x8b80d7d6bc4104de + data8 0xafc35ce063eb3787, 0xdd729ad01c69114d + data8 0x8ba68bf73ac74f39, 0xaff2ddcb5f28f03d + data8 0xddae749c001fbf5e, 0x8bcc68fb9f9f7335 + data8 0xb022923b148e05c5, 0xddea8f50a51c69b1 + data8 0x8bf26f31c534fca2, 0xb0527a919adbf58b + data8 0xde26eb69a0f0f111, 0x8c10f86e13a1a1f9 + data8 0xb078f3ab1d701c65, 0xde576480262399bc + data8 0x8c3749916cc6abb5, 0xb0a93a6870649f31 + data8 0xde943789645933c8, 0x8c5dc4c4f7706032 + data8 0xb0d9b624d62ec856, 0xded14d58139a28af + data8 0x8c7cac3a8c42e3e0, 0xb100a5f53fb3c8e1 + data8 0xdf025c00bbf2b5c7, 0x8ca373f1b7bf2716 + data8 0xb131821882f5540a, 0xdf3feb44d723a713 + data8 0x8cc29907fb951294, 0xb158bf8e4cb04055 + data8 0xdf715bc16c159be0, 0x8ce9ae4e9492aac8 + data8 0xb189fd69d56b238f, 0xdfaf66240e29cda8 + data8 0x8d0911dddbfdad0e, 0xb1b189958e8108e4 + data8 0xdfe139cbf6e19bdc, 0x8d3075c4f20f04ee + data8 0xb1e32a8165b09832, 0xe01fc0fe94d9fc52 + data8 0x8d5018a9d4de77d5, 0xb20b0678fc271eec + data8 0xe051f92ffcc0bd60, 0x8d77cc47dd143515 + data8 0xb23d0bd3f7592b6e, 0xe090feec9c9a06ac + data8 0x8d97af6352739cb7, 0xb26538b2db8420dc + data8 0xe0c39d0c9ff862d6, 0x8db7af523167800f + data8 0xb28d89e339ceca14, 0xe0f668eeb99f188d + data8 0x8ddfd80bc68c32ff, 0xb2c022ca12e55a16 + data8 0xe1362890eb663139, 0x8e00197e1e7c88fe + data8 0xb2e8c6852c6b03f1, 0xe1695c7212aecbaa + data8 0x8e207859f77e20e7, 0xb3118f4eda9fe40f + data8 0xe19cbf0391bbbbe9, 0x8e40f4ce60c9f8e2 + data8 0xb33a7d6268109ebe, 0xe1d050901c531e85 + data8 0x8e69ba46cf2fde4d, 0xb36ddbc5ea70ec55 + data8 0xe2110903b4f4047a, 0x8e8a7a00bd7ae63e + data8 0xb3971e9b39264023, 0xe2450559b4d80b6d + data8 0x8eab57ef1cf2f529, 0xb3c0877ecc18e24a + data8 0xe27931a231554ef3, 0x8ecc5442cffb1dad + data8 0xb3ea16ae3a6c905f, 0xe2ad8e2ac3c5b04b + data8 0x8eed6f2d2a4acbfe, 0xb413cc67aa0e4d2d + data8 0xe2e21b41b9694cce, 0x8f0ea8dff24441ff + data8 0xb43da8e9d163e1af, 0xe316d93615862714 + data8 0x8f385c95d696b817, 0xb47233773b84d425 + data8 0xe3590bd86a0d30f9, 0x8f59dc43edd930f3 + data8 0xb49c6825430fe730, 0xe38e38e38e38e38e + data8 0x8f7b7b5f5ffad1c4, 0xb4c6c46bcdb27dcf + data8 0xe3c397d1e6db7839, 0x8f9d3a1bea165f38 + data8 0xb4f1488c0b35d26f, 0xe3f928f5953feb9e + data8 0x8fbf18adc34b66da, 0xb51bf4c7c51f0168 + data8 0xe42eeca17c62886c, 0x8fe117499e356095 + data8 0xb546c9616087ab9c, 0xe464e32943446305 + data8 0x90033624aa685f8d, 0xb571c69bdffd9a70 + data8 0xe49b0ce15747a8a2, 0x9025757495f36b86 + data8 0xb59cecbae56984c3, 0xe4d16a1eee94e9d4 + data8 0x903f3a5dcc091203, 0xb5bd64512bb14bb7 + data8 0xe4fa52107353f67d, 0x9061b2fceb2bdbab + data8 0xb5e8d2a4bf5ba416, 0xe5310a471f4d2dc3 + data8 0x90844ca7211032a7, 0xb6146a9a1bc47819 + data8 0xe567f6f1c2b9c224, 0x90a7079403e6a15d + data8 0xb6402c7749d621c0, 0xe59f18689a9e4c9a + data8 0x90c9e3fbafd63799, 0xb66c1882fb435ea2 + data8 0xe5d66f04b8a68ecf, 0x90ece216c8a16ee4 + data8 0xb6982f048c999a56, 0xe60dfb2005c192e9 + data8 0x9110021e7b516f0a, 0xb6c47044075b4142 + data8 0xe645bd1544c7ea51, 0x912a708a39be9075 + data8 0xb6e5bd6bfd02bafd, 0xe66fb21b505b20a0 + data8 0x914dcc7b31146370, 0xb7124a2736ff8ef2 + data8 0xe6a7d32af4a7c59a, 0x91714af8cfe984d5 + data8 0xb73f026a01e94177, 0xe6e02b129c6a5ae4 + data8 0x918c00a6f3795e97, 0xb760a959f1d0a7a7 + data8 0xe70a9136a7403039, 0x91afbc299ed0295d + data8 0xb78dae7e06868ab0, 0xe74349fb2d92a589 + data8 0x91d39add3e958db0, 0xb7badff8ad9e4e02 + data8 0xe77c3a9c86ed7d42, 0x91ee9920a8974d92 + data8 0xb7dce25b8e17ae9f, 0xe7a713f88151518a + data8 0x9212b5fcac537c19, 0xb80a6226904045e2 + data8 0xe7e067453317ed2b, 0x9236f6b256923fcf + data8 0xb8380f1cafd73c1c, 0xe819f37a81871bb5 + data8 0x92523ee6f90dcfc3, 0xb85a6ea8e321b4d8 + data8 0xe8454236bfaeca14, 0x9276bef031e6eb79 + data8 0xb8886b684ae7d2fa, 0xe87f32f24c3fc90e + data8 0x929236ec237a24ad, 0xb8ab0726fa00cf5d + data8 0xe8aacd8688892ba6, 0x92b6f70b7efe9dc3 + data8 0xb8d954a4d13b7cb1, 0xe8e523fd32f606f7 + data8 0x92d29f61eec7dc2b, 0xb8fc2d4f6cd9f04a + data8 0xe9110b5311407927, 0x92f7a05d5b8ba92f + data8 0xb92acc851476b1ab, 0xe94bc8bf0c108fa3 + data8 0x931379a403be5c16, 0xb94de2d841a184c2 + data8 0xe977fdc439c2ca3c, 0x9338bc44de2e3f34 + data8 0xb97cd4c36c92693c, 0xe9b3236528fc349e + data8 0x9354c71412c69486, 0xb9a0297f172665e3 + data8 0xe9dfa70b745ac1b4, 0x937a4c273907e262 + data8 0xb9cf6f21e36c3924, 0xea1b36268d0eaa38 + data8 0x93968919f6e7975d, 0xb9f3030951267208 + data8 0xea480963fd394197, 0x93bc516fdd4680c9 + data8 0xba229d6a618e7c59, 0xea84034425f27484 + data8 0x93d8c123d9be59b2, 0xba467144459f9855 + data8 0xeab12713138dd1cc, 0x93f546c955e60076 + data8 0xba6a60c3c48f1a4b, 0xeade6db73a5e503b + data8 0x941b70a65879079f, 0xba9a76056b67ee7a + data8 0xeb1b0268343b121b, 0x943829f337410591 + data8 0xbabea699563ada6e, 0xeb489b0b2bdb5f14 + data8 0x9454f995765bc4d2, 0xbae2f350b262cc4b + data8 0xeb765721e85f03d0, 0x947b86b57f5842ed + data8 0xbb1385a23be24e57, 0xebb389645f222f62 + data8 0x94988aeb23470f86, 0xbb3814975e17c680 + data8 0xebe198f090607e0c, 0x94b5a5dc9695f42a + data8 0xbb5cc031009bf467, 0xec0fcc9321024509 + data8 0x94d2d7a9170d8b42, 0xbb81889680024764 + data8 0xec3e247da8b82f61, 0x94f9e87dd78bf019 + data8 0xbbb2c0d8703ae95d, 0xec7c27d21321c9f7 + data8 0x95175019a503d89e, 0xbbd7cd09ba3c5463 + data8 0xecaad5278824e453, 0x9534cefa625fcb3a + data8 0xbbfcf68c4977718f, 0xecd9a76d097d4e77 + data8 0x955265405c491a25, 0xbc223d88cfc88eee + data8 0xed089ed5dcd99446, 0x9570130c1f9bb857 + data8 0xbc47a2284fee4ff8, 0xed37bb95add09a1c + data8 0x9597ca4119525184, 0xbc79ac0916ed7b8a + data8 0xed76c70508f904b6, 0x95b5af6fb5aa4d3c + data8 0xbc9f5670d1a13030, 0xeda63bb05e7f93c6 + data8 0x95d3ac9273aafd7a, 0xbcc51f068cb95c1d + data8 0xedd5d661daed2dc4, 0x95f1c1cafdfd3684 + data8 0xbceb05f4b30a9bc0, 0xee05974eef86b903 + data8 0x960fef3b430b8d5f, 0xbd110b6604c7d306 + data8 0xee357ead791fc670, 0x962e350575b409c5 + data8 0xbd372f8598620f19, 0xee658cb3c134a463 + data8 0x964c934c0dfc1708, 0xbd5d727edb6b3c7e + data8 0xee95c1987f080211, 0x966b0a31c9c6bc7d + data8 0xbd83d47d937bbc6d, 0xeec61d92d8c4314f + data8 0x968999d9ad8d264e, 0xbdaa55addf1ae47d + data8 0xeef6a0da64a014ac, 0x96a8426705198795 + data8 0xbdd0f63c36aa73f0, 0xef274ba72a07c811 + data8 0x96c703fd64445ee5, 0xbdf7b6556d550a15 + data8 0xef581e31a2c91260, 0x96e5dec0a7b4268d + data8 0xbe1e9626b1ffa96b, 0xef8918b2bc43aec6 + data8 0x9704d2d4f59f79f3, 0xbe4595dd903e5371 + data8 0xefba3b63d89d7cbf, 0x9723e05ebe91b9b0 + data8 0xbe6cb5a7f14bc935, 0xefeb867ecffaa607 + data8 0x97430782be323831, 0xbe93f5b41d047cf7 + data8 0xf01cfa3df1b9c9fa, 0x97624865fc0df8bf + data8 0xbebb5630bae4c15f, 0xf04e96dc05b43e2d + data8 0x9781a32dcc640b2a, 0xbee2d74cd30a430c + data8 0xf0805c944d827454, 0x97a117ffd0f48e46 + data8 0xbf0a7937cf38d981, 0xf0b24ba285c495cb + data8 0x97c0a701f9d263c9, 0xbf323c217be2bc8c + data8 0xf0e46442e76f6569, 0x97e0505a8637a036 + data8 0xbf5a203a09342bbb, 0xf116a6b2291d7896 + data8 0x97f57a9fb0b08c6e, 0xbf74cad1c14ebfc4 + data8 0xf1383fa9e9b5b381, 0x9815503365914a9d + data8 0xbf9ce6a497a89f78, 0xf16ac84f90083b9b + data8 0x98354085054fd204, 0xbfc52428bec6e72f + data8 0xf19d7b686dcb03d7, 0x98554bbbf8a77902 + data8 0xbfed838fddab024b, 0xf1d0593311db1757 + data8 0x987571fffb7f94f6, 0xc016050c0420981a + data8 0xf20361ee8f1c711e, 0x9895b3791dd03c23 + data8 0xc03ea8cfabddc330, 0xf23695da7de51d3f + data8 0x98ab43a5fc65d0c8, 0xc059d3cbd65ddbce + data8 0xf258d095e465cc35, 0x98cbb2d196bd713d + data8 0xc082b122a3c78c9d, 0xf28c4d0bfc982b34 + data8 0x98ec3d9ec7b6f21a, 0xc0abb1499ae736c4 + data8 0xf2bff55eb3f0ea71, 0x990ce436db5e8344 + data8 0xc0d4d474c3aedaaf, 0xf2f3c9cf9884636e + data8 0x9922b8218160967a, 0xc0f054ca33eb3437 + data8 0xf31670135ab9cc0f, 0x99438d686f75779d + data8 0xc119b2c67e600ed0, 0xf34a8e9f0b54cdfb + data8 0x99647eea131fa20b, 0xc1433453de2033ff + data8 0xf37ed9fa6b8add3f, 0x997a85045a47c6d0 + data8 0xc15ef3e44e10032d, 0xf3a1cfe884ef6bb6 + data8 0x999ba5f14f8add02, 0xc188b130431d80e6 + data8 0xf3d66689dcc8e8d3, 0x99bce38b5465ecae + data8 0xc1b2929d6067730e, 0xf40b2ab069d5c96a + data8 0x99d31ca0887f30f9, 0xc1ce9268f31cc734 + data8 0xf42e718b90c8bc16, 0x99f48a669c74c09e + data8 0xc1f8b0877c1b0c08, 0xf463822a0a3b4b00 + data8 0x9a16154eb445c873, 0xc222f35a87b415ba + data8 0xf498c1076015faf8, 0x9a2c822ec198d667 + data8 0xc23f3467349e5c88, 0xf4bc5a19a33990b5 + data8 0x9a4e3e080cd91b78, 0xc269b4e40e088c01 + data8 0xf4f1e6a7d6f5425f, 0x9a70177afe52322e + data8 0xc2945aac24daaf6e, 0xf527a232cf6be334 + data8 0x9a86b8fa94eebe10, 0xc2b0de05e43c1d66 + data8 0xf54b8ecdcda90851, 0x9aa8c42866ae2958 + data8 0xc2dbc275e1229d09, 0xf5819949c7ad87b4 + data8 0x9abf86f9e12fc45e, 0xc2f86fca9d80eeff + data8 0xf5a5bac9213b48a9, 0x9ae1c462fc05f49d + data8 0xc323938449a2587e, 0xf5dc1501f324a812 + data8 0x9af8a8dc936b84d0, 0xc3406b40a538ed20 + data8 0xf6006bee86b5589e, 0x9b1b19033be35730 + data8 0xc36bcee8211d15e0, 0xf63716b2fa067fa4 + data8 0x9b3da7daf04c2892, 0xc397593adf2ba366 + data8 0xf66df22fb6132b9c, 0x9b54c2e4c8a9012b + data8 0xc3b475b6206155d5, 0xf6929fb98225deb1 + data8 0x9b77854e6c661200, 0xc3e0410243b97383 + data8 0xf6c9cd13021e3fea, 0x9b8ec2e678d56d2f + data8 0xc3fd890709833d37, 0xf6eeb177472cedae + data8 0x9ba60e6a5ca133b6, 0xc41ae295f7e7fa06 + data8 0xf713abf4cb0b3afb, 0x9bc919ea66a151a4 + data8 0xc44709f7bb8a4dd2, 0xf74b4d5333684ef1 + data8 0x9be0887c09ef82bb, 0xc4648fb0e0bec4c1 + data8 0xf7707f75a72f8e94, 0x9c03c8d5fffc3503 + data8 0xc490f9a94695ba14, 0xf7a874b97927af44 + data8 0x9c1b5ad21a81cbb9, 0xc4aeac0173b7d390 + data8 0xf7cddf140aedf1d8, 0x9c3ed09216e9ca02 + data8 0xc4db5941007aa853, 0xf806291bacb7f7a9 + data8 0x9c568656c0423def, 0xc4f938aec206291a + data8 0xf82bcc43b92eafef, 0x9c7a320af242ce60 + data8 0xc52629e899dfd622, 0xf8646bf0defb759e + data8 0x9c920bf7a8c01dc2, 0xc54436e44043b965 + data8 0xf88a487dfc3ff5f7, 0x9ca9f475d98b159c + data8 0xc562563abf9ea07f, 0xf8b03c2b46cdc17f + data8 0x9ccdeca60e80b5f8, 0xc58fa7d1dc42921c + data8 0xf8e95541c152ae7a, 0x9ce5f9d4653d4902 + data8 0xc5adf561b91e110a, 0xf90f832c2700c160 + data8 0x9cfe15cb38bfdd8e, 0xc5cc5591bdbd82fa + data8 0xf935c88e0c7f419b, 0x9d225b983f6c1f96 + data8 0xc5fa08f1ff20593c, 0xf96f5cd84fd86873 + data8 0x9d3a9cca32261ed7, 0xc618980a79ce6862 + data8 0xf995dd53ebdd9d6d, 0x9d52ecfccebe1768 + data8 0xc6373a09e34b50fa, 0xf9bc75a034436a41 + data8 0x9d77818d95b82f86, 0xc66550a6e0baaf35 + data8 0xf9f686f26d5518de, 0x9d8ff7893fa4706c + data8 0xc6842241926342c9, 0xfa1d5b39b910a8c5 + data8 0x9da87cbef36f2a5e, 0xc6a3070b7c93bb9e + data8 0xfa4447acc4ecbfd2, 0x9dcd6140b4a35aeb + data8 0xc6d18260bb84081b, 0xfa7ed7e51e6fdfb4 + data8 0x9de60cd06dc6e2d4, 0xc6f0977c9416828b + data8 0xfaa601394d49a1a0, 0x9dfec7d4cc43b76f + data8 0xc70fc0117c641630, 0xfacd431644ce0e40 + data8 0x9e17925ec9fccc4a, 0xc72efc34d7e615be + data8 0xfaf49d96f7a75909, 0x9e3cdf6db57dc075 + data8 0xc75dfb441594141e, 0xfb2fd3c65e562fd5 + data8 0x9e55d110b63637a8, 0xc77d68aa019bda4c + data8 0xfb576c5762024805, 0x9e6ed27594550d2e + data8 0xc79ce9ea478dbc4f, 0xfb7f1debc22c4040 + data8 0x9e87e3adc385d393, 0xc7bc7f1ae453219d + data8 0xfba6e89f32d0190a, 0x9ead9b54b37a1055 + data8 0xc7ec0476e15e141a, 0xfbe2c803a0894893 + data8 0x9ec6d46a3d7de215, 0xc80bcbe16f1d540f + data8 0xfc0ad1ff0ed9ecf0, 0x9ee01d9108be3154 + data8 0xc82ba78a5d349735, 0xfc32f57bdfbcbe7f + data8 0x9ef976db07288d04, 0xc84b978847a06b87 + data8 0xfc5b32968f99b21c, 0x9f12e05a4759ec25 + data8 0xc86b9bf1ee817bc6, 0xfc83896bc861ab08 + data8 0x9f2c5a20f4da6668, 0xc88bb4de3667cdf4 + data8 0xfcabfa1861ed4815, 0x9f52af78ed1733ca + data8 0xc8bc00e7fe9e23a3, 0xfce8d3cea7d3163e + data8 0x9f6c52426a39d003, 0xc8dc4d7ff2d25232 + data8 0xfd118595143ee273, 0x9f860593d42fd7f3 + data8 0xc8fcaeebcb40eb47, 0xfd3a519943d4865a + data8 0x9f9fc97fdb96bd51, 0xc91d25431426a663 + data8 0xfd6337f8e1ae5a4b, 0x9fb99e194f4a7037 + data8 0xc93db09d7fdb2949, 0xfd8c38d1c8e927eb + data8 0x9fd383731ca51db9, 0xc95e5112e721582a + data8 0xfdb5544205095a53, 0x9fed79a04fbf9423 + data8 0xc97f06bb49787677, 0xfdde8a67d2613531 + data8 0xa00780b413b24ee8, 0xc99fd1aecd6e1b06 + data8 0xfe07db619e781611, 0xa02eab2c4474b0cd + data8 0xc9d12a3e27bb1625, 0xfe460768d80bf758 + data8 0xa048dcd51ccfd142, 0xc9f22ad82ba3d5f0 + data8 0xfe6f9bfb06cd32f6, 0xa0631fa894b11b8d + data8 0xca134113105e67b2, 0xfe994bcd3d14fcc2 + data8 0xa07d73ba65e680af, 0xca346d07b045a876 + data8 0xfec316fecaf3f2ab, 0xa097d91e6aaf71b0 + data8 0xca55aecf0e94bb88, 0xfeecfdaf33fadb80 + data8 0xa0b24fe89e02602f, 0xca77068257be9bab + data8 0xff16fffe2fa8fad6, 0xa0ccd82d1bd2f68b + data8 0xca98743ae1c693a8, 0xff411e0ba9db886d + data8 0xa0e77200215909e6, 0xcab9f8122c99a101 + data8 0xff6b57f7c33e4e9a, 0xa1021d760d584855 + data8 0xcadb9221e268c3b5, 0xff95ade2d1bd7358 + data8 0xa11cdaa36068a57d, 0xcafd4283d8043dfd + data8 0xffc01fed60f86fb5, 0xa137a99cbd3f880b + data8 0xcb1f09520d37c6fb, 0xffeaae3832b63956 +LOCAL_OBJECT_END(T_table) + + + + + + + +.section .text +GLOBAL_LIBM_ENTRY(cbrt) + + +{.mfi + // get significand + getf.sig GR_SIGNIF = f8 + // normalize a + fma.s1 FR_ARG = f8, f1, f0 + // GR_GP = pointer to C_1,..., C_5 followed by T_table + addl GR_GP = @ltoff(poly_coeffs), gp ;; +} + +{.mfi + // get exponent + getf.exp GR_ARGEXP = f8 + // will continue only for normal/denormal numbers + fclass.m.unc p12, p13 = f8, 0x1e7 + // GR_CONST4 = bias-((2^{12}-1)/3)-63 = 0xffff-0x555-0x3f = 0xfa6b + mov GR_CONST4 = 0xfa6b ;; +} + +{.mlx + mov GR_CONST2 = 0x20000 + // GR_CONST3 = 2^52 + movl GR_CONST3 = 0x8000000000000000 ;; +} + +.pred.rel "mutex", p12, p13 +{.mfi + // load start address for C_1,..., C_5 followed by T_table + ld8 GR_ADDR = [ GR_GP ] + // y = frcpa(a) + (p13) frcpa.s0 f8, p0 = f1, f8 + // p7 = 1 if denormal input + cmp.gtu p7, p0 = GR_CONST3, GR_SIGNIF +} +{.mfb + nop.m 0 + // if argument is 0, +/-Infinity, NaN, or NaTVal, then return + (p12) fma.d.s0 f8 = f8, f1, f0 + (p12) br.ret.spnt b0 ;; +} + +{.mmi + // get exponent (for denormal input) + (p7) getf.exp GR_ARGEXP = FR_ARG + // get normalized significand (for denormal input) + (p7) getf.sig GR_SIGNIF = FR_ARG + // GR_CONST1 = bias-(2^{12}-1) + mov GR_CONST1 = 0xf000 ;; +} + +{.mii + // get GR_SIGN = sign + and GR_SIGN = GR_ARGEXP, GR_CONST2 + // eliminate leading 1 from GR_I1 = 1st table index + shl GR_I1 = GR_SIGNIF, 1 + // eliminate sign from exponent + andcm GR_EXP = GR_ARGEXP, GR_CONST2 ;; +} + +{.mib + add GR_ADDR2 = 32, GR_ADDR + // GR_IT1 = 1st table index (y_index, 8 bits) + shr.u GR_IT1 = GR_I1, 56 + nop.b 0 +} +{.mib + // load C_1 + ldfe FR_COEFF1 = [ GR_ADDR ], 16 + // subtract bias from GR_EXPON = exponent + sub GR_EXPON = GR_EXP, GR_CONST1 + nop.b 0 ;; +} + +{.mib + // load C_2, C_3 + ldfpd FR_COEFF2, FR_COEFF3 = [ GR_ADDR ] + // 1: exponent* = 5; // (2^{16}-1)/3 = 0x5555 + shladd GR_TMP1 = GR_EXPON, 2, GR_EXPON + nop.b 0 +} +{.mib + // load C_4, C_5 + ldfpd FR_COEFF4, FR_COEFF5 = [ GR_ADDR2 ], 16 + // GR_TMP2 = 3*y_index + shladd GR_TMP2 = GR_IT1, 1, GR_IT1 + nop.b 0 ;; +} + +{.mfi + // GR_TMP6 = (5*expon)*16+5*expon = (0x55)*expon + shladd GR_TMP6 = GR_TMP1, 4, GR_TMP1 + // r = 1-a*y + fnma.s1 FR_R = f8, FR_ARG, f1 + // adjust T_table pointer by 1st index + shladd GR_ITB1 = GR_TMP2, 3, GR_ADDR2 ;; +} + +{.mii + // eliminate leading 1 from significand + add GR_SIGNIF2 = GR_SIGNIF, GR_SIGNIF + // GR_TMP3 = (0x5500)*expon + shl GR_TMP3 = GR_TMP6, 8 ;; + // GR_TMP4 = (0x5555)*expon + add GR_TMP4 = GR_TMP3, GR_TMP6 ;; +} + +{.mii + // GR_TMP5 = (0x5556)*expon // 0x5556 = (2^{16}+2)/3 + add GR_TMP5 = GR_TMP4, GR_EXPON + nop.i 0 ;; + // GR_EXP_BY_3 = floor(expon/3) + shr GR_EXP_BY_3 = GR_TMP5, 16 ;; +} + +{.mfi + // GR_TMP6 = 3*exponent + shladd GR_TMP6 = GR_EXP_BY_3, 1, GR_EXP_BY_3 + // r*r + fma.s1 FR_R2 = FR_R, FR_R, f0 + // bias exponent + add GR_EBIAS = GR_CONST4, GR_EXP_BY_3 ;; +} + +{.mfi + // get remainder of exponent/3 + sub GR_REM = GR_EXPON, GR_TMP6 + // c2+c3*r + fma.s1 FR_P23 = FR_COEFF3, FR_R, FR_COEFF2 + nop.i 0 +} +{.mfi + // add sign to exponent + or GR_SEXP = GR_EBIAS, GR_SIGN + // c4+c5*r + fma.s1 FR_P45 = FR_COEFF5, FR_R, FR_COEFF4 + mov GR_TMP63 = 63+0xffff ;; +} + +{.mmi + // FR_2EXP = sign*2^{exponent/3} + setf.exp FR_2EXP = GR_SEXP + // adjust T_table pointer by 2nd index + shladd GR_INDEX = GR_REM, 3, GR_ITB1 + // is the argument of the form 2^(3*k) ? + // get (significand - leading 1) | (exponent mod 3) + or GR_TEST = GR_REM, GR_SIGNIF2 ;; +} + +{.mmi + // 2^63 + setf.exp FR_TMP63 = GR_TMP63 + // load T + ldf8 f8 = [ GR_INDEX ] + // is the argument of the form 2^(3*k) ? + cmp.eq p14, p0 = GR_TEST, r0 ;; +} + +{.mfi + nop.m 0 + // (c2+c3*r)+r^2*(c4+c5*r) + fma.s1 FR_P25 = FR_P45, FR_R2, FR_P23 + nop.i 0 +} +{.mfi + nop.m 0 + // c1*r + fma.s1 FR_P1 = FR_COEFF1, FR_R, f0 + nop.i 0 ;; +} + +{.mfb + nop.m 0 + (p14) fma.d.s0 f8 = FR_2EXP, FR_TMP63, f0 + (p14) br.ret.spnt b0 ;; +} + +{.mfi + nop.m 0 + // P = c1*r+r^2* [ (c2+c3*r)+r^2*(c4+c5*r) ] + fma.s1 FR_P15 = FR_P25, FR_R2, FR_P1 + nop.i 0 +} +{.mfi + nop.m 0 + // T' = T*(2^exp) + fma.s1 f8 = f8, FR_2EXP, f0 + nop.i 0 ;; +} + +{.mfb + nop.m 0 + // result = T'+T'*P + fma.d.s0 f8 = f8, FR_P15, f8 + br.ret.sptk b0 ;; +} + + +GLOBAL_LIBM_END(cbrt) diff --git a/sysdeps/ia64/fpu/s_cbrtf.S b/sysdeps/ia64/fpu/s_cbrtf.S new file mode 100644 index 0000000000..612fb85ea3 --- /dev/null +++ b/sysdeps/ia64/fpu/s_cbrtf.S @@ -0,0 +1,765 @@ +.file "cbrtf.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 05/18/00 New version (modified algorithm) +// 05/20/02 Cleaned up namespace and sf0 syntax +// 01/28/03 Rescheduled some instructions for better performance +// on Itanium 2, and reformatted +// +// API +//============================================================== +// float cbrtf(float) +// +// Overview of operation +//============================================================== +// Background +// +// Implementation +// +// Let y= frcpa(a), where a is the argument +// +// cbrt(a)= cbrt(a*y)/cbrt(y) = cbrt(1 - (1-a*y)) * (1/cbrt(y)) +// +// For all values of y, the 3 possible significands of 1/cbrt(y) +// are stored in a table (T0) to 64 bits of accuracy. (There are +// 3 possible significands because the exponent of y modulo 3 +// can be 0, 1, or 2.) +// +// +// * cbrt(1 - (1-a*y)) is approximated by a degree-2 polynomial +// +// 1 - (1/3)*r - (1/9)*r^2 +// +// in r = 1-a*y. +// +// The table values are stored for three exponent values and are +// then multiplied by 2^(e/3) where e is the exponent of the input number. +// This computation is carried out in parallel with the polynomial +// evaluation: +// +// T= 2^(e/3) * T0 + + + + + +//=============== +// input= x +// C= frcpa(x) +// r= 1 - C * x +// +// Special values +//============================================================== + + + +// Registers used +//============================================================== +// p6, p7, p8, p12 + + FR_R = f6 + FR_COEFF1 = f7 + FR_COEFF2 = f9 + FR_T0 = f10 + FR_T1 = f11 + FR_T2 = f12 + FR_2M63 = f13 + FR_ARG = f14 + FR_Y = f15 + + GR_GP = r2 + GR_ADDR = r2 + GR_TMP5 = r3 + GR_CONST = r8 + GR_TMP63 = r8 + GR_SIGN = r9 + GR_CT2 = r10 + GR_CT3 = r11 + GR_TMP4 = r14 + GR_EBIAS3 = r15 + GR_REM = r16 + GR_SEXP = r17 + GR_2P63 = r18 + GR_SIGNIF = r19 + GR_I1 = r20 + GR_EBIAS = r21 + GR_EXP = r22 + GR_IT1 = r23 + GR_E5 = r24 + GR_IT1_3 = r25 + GR_TP1 = r26 + GR_TMP = r27 + GR_TMP2 = r28 + GR_TMP3 = r29 + GR_EXP3 = r30 + GR_ARGEXP = r31 + + + + +// Data tables +//============================================================== + +RODATA + +.align 16 + +LOCAL_OBJECT_START(poly_coeffs) + + data8 0xaaaab19b7e1f5ef9, 0x00003ffd // ~ 1/3 + data8 0xe38e5192a5a8e56c, 0x00003ffb // ~ 1/9 +LOCAL_OBJECT_END(poly_coeffs) + +// For every entry B in the frcpa table, this table contains +// the significands of cbrt(1/B), cbrt(2/B), cbrt(4/B). +// The index to this table is the same as the frcpa index. + +LOCAL_OBJECT_START(T_table) + + data8 0x80155c748c374836, 0xa160019ed37fb4ae + data8 0xcb51ddcb9e93095e, 0x8040404b0879f7f9 + data8 0xa1960b5966da4608, 0xcb95f333968ad59b + data8 0x806b5dce4b405c10, 0xa1cc5dbe6dc2aab4 + data8 0xcbda64292d3ffd97, 0x8096b586974669b1 + data8 0xa202f97995b69c0d, 0xcc1f3184af961596 + data8 0x80bcd273d952a028, 0xa232fe6eb0c0577d + data8 0xcc5bb1ac954d33e2, 0x80e898c52813f2f3 + data8 0xa26a2582012f6e17, 0xcca12e9831fc6402 + data8 0x81149add67c2d208, 0xa2a197e5d10465cb + data8 0xcce70a67b64f24ad, 0x813b4e2c856b6e9a + data8 0xa2d25a532efefbc8, 0xcd24794726477ea5 + data8 0x8167c1dde03de7aa, 0xa30a5bd6e49e4ab8 + data8 0xcd6b096a0b70ee87, 0x818ed973b811135e + data8 0xa33b9c9b59879e24, 0xcda9177738b15a90 + data8 0x81bbc0c33e13ec98, 0xa3742fca6a3c1f21 + data8 0xcdf05f2247dffab9, 0x81e33e69fbe7504a + data8 0xa3a5f1273887bf22, 0xce2f0f347f96f906 + data8 0x820aec524e3c23e9, 0xa3d7ef508ff11574 + data8 0xce6e0be0cd551a61, 0x823880f78e70b805 + data8 0xa4115ce30548bc15, 0xceb666b2c347d1de + data8 0x826097a62a8e5200, 0xa443df0e53df577a + data8 0xcef609b0cb874f00, 0x8288dfe00e9b5eaf + data8 0xa4769fa5913c0ec3, 0xcf35fb5447e5c765 + data8 0x82b15a10c5371624, 0xa4a99f303bc7def5 + data8 0xcf763c47ee869f00, 0x82da06a527b18937 + data8 0xa4dcde37779adf4b, 0xcfb6cd3888d71785 + data8 0x8302e60b635ab394, 0xa5105d46152c938a + data8 0xcff7aed4fbfbb447, 0x832bf8b2feec2f0e + data8 0xa5441ce89825cb8d, 0xd038e1ce5167e3c6 + data8 0x83553f0ce00e276b, 0xa5781dad3e54d899 + data8 0xd07a66d7bfa0ebba, 0x837eb98b50f8322a + data8 0xa5ac602406c4e68c, 0xd0bc3ea6b32d1b21 + data8 0x83a270f44c84f699, 0xa5d9601d95c2c0bc + data8 0xd0f4f0e8f36c1bf8, 0x83cc4d7cfcfac5ca + data8 0xa60e1e1a2de14745, 0xd1376458e34b037e + data8 0x83f65f78a8872b4c, 0xa6431f6e3fbd9658 + data8 0xd17a2ca133f78572, 0x8420a75f2f7b53c8 + data8 0xa67864b0d432fda4, 0xd1bd4a80301c5715 + data8 0x844510461ff14209, 0xa6a6444aa0243c0b + data8 0xd1f71682b2fa4575, 0x846fbd91b930bed2 + data8 0xa6dc094d10f25792, 0xd23ad555f773f059 + data8 0x84947e18234f3294, 0xa70a574cc02bba69 + data8 0xd2752c7039a5bf73, 0x84bf92755825045a + data8 0xa7409e2af9549084, 0xd2b98ee008c06b59 + data8 0x84e4ac0ee112ba51, 0xa76f5c64ca2cf13b + data8 0xd2f4735ffd700280, 0x8509ef44b86f20be + data8 0xa79e4f0babab5dc0, 0xd32f99ed6d9ac0e1 + data8 0x85359d5d91768427, 0xa7d5579ae5164b85 + data8 0xd374f0666c75d51c, 0x855b3bd5b7384357 + data8 0xa804bd3c6fe61cc8, 0xd3b0a7d13618e4a1 + data8 0x858104f0c415f79a, 0xa8345895e5250a5a + data8 0xd3eca2ea53bcec0c, 0x85a6f90390d29864 + data8 0xa8642a122b44ef0b, 0xd428e23874f13a17 + data8 0x85d3772fcd56a1dd, 0xa89c38ca18f6108b + data8 0xd46f82fe293bc6d3, 0x85f9c982fcc002f3 + data8 0xa8cc81063b6e87ca, 0xd4ac57e9b7186420 + data8 0x862047e0e7ea554b, 0xa8fd00bfa409285e + data8 0xd4e972becb04e8b8, 0x8646f2a26f7f5852 + data8 0xa92db8664d5516da, 0xd526d40a7a9b43a3 + data8 0x866dca21754096b5, 0xa95ea86b75cc2c20 + data8 0xd5647c5b73917370, 0x8694ceb8dfd17a37 + data8 0xa98fd141a4992deb, 0xd5a26c4201bd6d13 + data8 0x86bc00c49e9307e8, 0xa9c1335cae7446ba + data8 0xd5e0a45015350a7e, 0x86dccd74fce79610 + data8 0xa9ea8686f556f645, 0xd614b539c6194104 + data8 0x870453c845acf90f, 0xaa1c52d17906bb19 + data8 0xd6537310e224283f, 0x872c089a1e90342c + data8 0xaa4e59b046dab887, 0xd6927ab62244c917 + data8 0x8753ec4a92d16c5e, 0xaa809b9c60d1890b + data8 0xd6d1ccc1fc4ef4b7, 0x877bff3aca19f6b4 + data8 0xaab319102f3f9b33, 0xd71169cea98fdded + data8 0x879d88b6fe1c324c, 0xaadd5a18c1e21274 + data8 0xd746a66a5bc9f6d9, 0x87c5f346dbf98c3a + data8 0xab1045f2ac31bdf5, 0xd786ce8f0fae5317 + data8 0x87e7c653efacef2c, 0xab3ae3ab2df7231e + data8 0xd7bc7ff214c4e75a, 0x881089d4e73ffefc + data8 0xab6e3f945d1e96fc, 0xd7fd35467a517ed1 + data8 0x88397e6a366f2a8a, 0xaba1d953a08fa94e + data8 0xd83e38838648d815, 0x885bc559e5e1c081 + data8 0xabcd090db7ef4c3f, 0xd874a1db598b8951 + data8 0x887e2ee392bb7a93, 0xabf864602d7c323d + data8 0xd8ab42205b80edaf, 0x88a7a8587e404257 + data8 0xac2ca5886ccf9b57, 0xd8ed1849d202f965 + data8 0x88ca5eda67594784, 0xac5861d4aa441f0f + data8 0xd92432bd5a173685, 0x88f4356166bd590e + data8 0xac8d183fe3a2fbed, 0xd9669ca45b03c23e + data8 0x89173a0acf5ce026, 0xacb93703ff51571e + data8 0xd99e3327cf89574e, 0x893a62a098b6a57b + data8 0xace5830ad0c3f14b, 0xd9d602b19b100466 + data8 0x895daf637236ae2c, 0xad11fca5d78b3ff2 + data8 0xda0e0ba86c096841, 0x89883b9d1c2fa9c5 + data8 0xad4797fddf91a798, 0xda5195fcdb1c3dce + data8 0x89abd8dd374a5d7b, 0xad747701e559ebcb + data8 0xda8a1eb87a491f6c, 0x89cf9b1dcd197fa0 + data8 0xada184a47e9c7613, 0xdac2e230b91c3f84 + data8 0x89f382a258ea79de, 0xadcec13ab0dda8ff + data8 0xdafbe0d0b66aea30, 0x8a178faf06648f29 + data8 0xadfc2d1a5fd21ba8, 0xdb351b04a8fafced + data8 0x8a3bc288b3e1d18a, 0xae29c89a5053c33a + data8 0xdb6e9139e33cdd8e, 0x8a601b74f4d1f835 + data8 0xae5794122b638df9, 0xdba843ded7151ea1 + data8 0x8a849aba14274764, 0xae858fda8137ae0a + data8 0xdbe2336319b61fc8, 0x8aa9409f16cdbc9b + data8 0xaeb3bc4ccc56d3d1, 0xdc1c60376789fa68 + data8 0x8ace0d6bbe2cb316, 0xaee219c374c09920 + data8 0xdc56cacda82d0cd5, 0x8af301688ab33558 + data8 0xaf10a899d3235fe7, 0xdc917398f2797814 + data8 0x8b181cdebe6f3206, 0xaf3f692c341fe8b4 + data8 0xdccc5b0d90a3e628, 0x8b3d60185fafcb7c + data8 0xaf6e5bd7db9ae6c2, 0xdd0781a10469f0f2 + data8 0x8b62cb603bb2fad0, 0xaf9d80fb081cd91b + data8 0xdd42e7ca0b52838f, 0x8b80d7d6bc4104de + data8 0xafc35ce063eb3787, 0xdd729ad01c69114d + data8 0x8ba68bf73ac74f39, 0xaff2ddcb5f28f03d + data8 0xddae749c001fbf5e, 0x8bcc68fb9f9f7335 + data8 0xb022923b148e05c5, 0xddea8f50a51c69b1 + data8 0x8bf26f31c534fca2, 0xb0527a919adbf58b + data8 0xde26eb69a0f0f111, 0x8c10f86e13a1a1f9 + data8 0xb078f3ab1d701c65, 0xde576480262399bc + data8 0x8c3749916cc6abb5, 0xb0a93a6870649f31 + data8 0xde943789645933c8, 0x8c5dc4c4f7706032 + data8 0xb0d9b624d62ec856, 0xded14d58139a28af + data8 0x8c7cac3a8c42e3e0, 0xb100a5f53fb3c8e1 + data8 0xdf025c00bbf2b5c7, 0x8ca373f1b7bf2716 + data8 0xb131821882f5540a, 0xdf3feb44d723a713 + data8 0x8cc29907fb951294, 0xb158bf8e4cb04055 + data8 0xdf715bc16c159be0, 0x8ce9ae4e9492aac8 + data8 0xb189fd69d56b238f, 0xdfaf66240e29cda8 + data8 0x8d0911dddbfdad0e, 0xb1b189958e8108e4 + data8 0xdfe139cbf6e19bdc, 0x8d3075c4f20f04ee + data8 0xb1e32a8165b09832, 0xe01fc0fe94d9fc52 + data8 0x8d5018a9d4de77d5, 0xb20b0678fc271eec + data8 0xe051f92ffcc0bd60, 0x8d77cc47dd143515 + data8 0xb23d0bd3f7592b6e, 0xe090feec9c9a06ac + data8 0x8d97af6352739cb7, 0xb26538b2db8420dc + data8 0xe0c39d0c9ff862d6, 0x8db7af523167800f + data8 0xb28d89e339ceca14, 0xe0f668eeb99f188d + data8 0x8ddfd80bc68c32ff, 0xb2c022ca12e55a16 + data8 0xe1362890eb663139, 0x8e00197e1e7c88fe + data8 0xb2e8c6852c6b03f1, 0xe1695c7212aecbaa + data8 0x8e207859f77e20e7, 0xb3118f4eda9fe40f + data8 0xe19cbf0391bbbbe9, 0x8e40f4ce60c9f8e2 + data8 0xb33a7d6268109ebe, 0xe1d050901c531e85 + data8 0x8e69ba46cf2fde4d, 0xb36ddbc5ea70ec55 + data8 0xe2110903b4f4047a, 0x8e8a7a00bd7ae63e + data8 0xb3971e9b39264023, 0xe2450559b4d80b6d + data8 0x8eab57ef1cf2f529, 0xb3c0877ecc18e24a + data8 0xe27931a231554ef3, 0x8ecc5442cffb1dad + data8 0xb3ea16ae3a6c905f, 0xe2ad8e2ac3c5b04b + data8 0x8eed6f2d2a4acbfe, 0xb413cc67aa0e4d2d + data8 0xe2e21b41b9694cce, 0x8f0ea8dff24441ff + data8 0xb43da8e9d163e1af, 0xe316d93615862714 + data8 0x8f385c95d696b817, 0xb47233773b84d425 + data8 0xe3590bd86a0d30f9, 0x8f59dc43edd930f3 + data8 0xb49c6825430fe730, 0xe38e38e38e38e38e + data8 0x8f7b7b5f5ffad1c4, 0xb4c6c46bcdb27dcf + data8 0xe3c397d1e6db7839, 0x8f9d3a1bea165f38 + data8 0xb4f1488c0b35d26f, 0xe3f928f5953feb9e + data8 0x8fbf18adc34b66da, 0xb51bf4c7c51f0168 + data8 0xe42eeca17c62886c, 0x8fe117499e356095 + data8 0xb546c9616087ab9c, 0xe464e32943446305 + data8 0x90033624aa685f8d, 0xb571c69bdffd9a70 + data8 0xe49b0ce15747a8a2, 0x9025757495f36b86 + data8 0xb59cecbae56984c3, 0xe4d16a1eee94e9d4 + data8 0x903f3a5dcc091203, 0xb5bd64512bb14bb7 + data8 0xe4fa52107353f67d, 0x9061b2fceb2bdbab + data8 0xb5e8d2a4bf5ba416, 0xe5310a471f4d2dc3 + data8 0x90844ca7211032a7, 0xb6146a9a1bc47819 + data8 0xe567f6f1c2b9c224, 0x90a7079403e6a15d + data8 0xb6402c7749d621c0, 0xe59f18689a9e4c9a + data8 0x90c9e3fbafd63799, 0xb66c1882fb435ea2 + data8 0xe5d66f04b8a68ecf, 0x90ece216c8a16ee4 + data8 0xb6982f048c999a56, 0xe60dfb2005c192e9 + data8 0x9110021e7b516f0a, 0xb6c47044075b4142 + data8 0xe645bd1544c7ea51, 0x912a708a39be9075 + data8 0xb6e5bd6bfd02bafd, 0xe66fb21b505b20a0 + data8 0x914dcc7b31146370, 0xb7124a2736ff8ef2 + data8 0xe6a7d32af4a7c59a, 0x91714af8cfe984d5 + data8 0xb73f026a01e94177, 0xe6e02b129c6a5ae4 + data8 0x918c00a6f3795e97, 0xb760a959f1d0a7a7 + data8 0xe70a9136a7403039, 0x91afbc299ed0295d + data8 0xb78dae7e06868ab0, 0xe74349fb2d92a589 + data8 0x91d39add3e958db0, 0xb7badff8ad9e4e02 + data8 0xe77c3a9c86ed7d42, 0x91ee9920a8974d92 + data8 0xb7dce25b8e17ae9f, 0xe7a713f88151518a + data8 0x9212b5fcac537c19, 0xb80a6226904045e2 + data8 0xe7e067453317ed2b, 0x9236f6b256923fcf + data8 0xb8380f1cafd73c1c, 0xe819f37a81871bb5 + data8 0x92523ee6f90dcfc3, 0xb85a6ea8e321b4d8 + data8 0xe8454236bfaeca14, 0x9276bef031e6eb79 + data8 0xb8886b684ae7d2fa, 0xe87f32f24c3fc90e + data8 0x929236ec237a24ad, 0xb8ab0726fa00cf5d + data8 0xe8aacd8688892ba6, 0x92b6f70b7efe9dc3 + data8 0xb8d954a4d13b7cb1, 0xe8e523fd32f606f7 + data8 0x92d29f61eec7dc2b, 0xb8fc2d4f6cd9f04a + data8 0xe9110b5311407927, 0x92f7a05d5b8ba92f + data8 0xb92acc851476b1ab, 0xe94bc8bf0c108fa3 + data8 0x931379a403be5c16, 0xb94de2d841a184c2 + data8 0xe977fdc439c2ca3c, 0x9338bc44de2e3f34 + data8 0xb97cd4c36c92693c, 0xe9b3236528fc349e + data8 0x9354c71412c69486, 0xb9a0297f172665e3 + data8 0xe9dfa70b745ac1b4, 0x937a4c273907e262 + data8 0xb9cf6f21e36c3924, 0xea1b36268d0eaa38 + data8 0x93968919f6e7975d, 0xb9f3030951267208 + data8 0xea480963fd394197, 0x93bc516fdd4680c9 + data8 0xba229d6a618e7c59, 0xea84034425f27484 + data8 0x93d8c123d9be59b2, 0xba467144459f9855 + data8 0xeab12713138dd1cc, 0x93f546c955e60076 + data8 0xba6a60c3c48f1a4b, 0xeade6db73a5e503b + data8 0x941b70a65879079f, 0xba9a76056b67ee7a + data8 0xeb1b0268343b121b, 0x943829f337410591 + data8 0xbabea699563ada6e, 0xeb489b0b2bdb5f14 + data8 0x9454f995765bc4d2, 0xbae2f350b262cc4b + data8 0xeb765721e85f03d0, 0x947b86b57f5842ed + data8 0xbb1385a23be24e57, 0xebb389645f222f62 + data8 0x94988aeb23470f86, 0xbb3814975e17c680 + data8 0xebe198f090607e0c, 0x94b5a5dc9695f42a + data8 0xbb5cc031009bf467, 0xec0fcc9321024509 + data8 0x94d2d7a9170d8b42, 0xbb81889680024764 + data8 0xec3e247da8b82f61, 0x94f9e87dd78bf019 + data8 0xbbb2c0d8703ae95d, 0xec7c27d21321c9f7 + data8 0x95175019a503d89e, 0xbbd7cd09ba3c5463 + data8 0xecaad5278824e453, 0x9534cefa625fcb3a + data8 0xbbfcf68c4977718f, 0xecd9a76d097d4e77 + data8 0x955265405c491a25, 0xbc223d88cfc88eee + data8 0xed089ed5dcd99446, 0x9570130c1f9bb857 + data8 0xbc47a2284fee4ff8, 0xed37bb95add09a1c + data8 0x9597ca4119525184, 0xbc79ac0916ed7b8a + data8 0xed76c70508f904b6, 0x95b5af6fb5aa4d3c + data8 0xbc9f5670d1a13030, 0xeda63bb05e7f93c6 + data8 0x95d3ac9273aafd7a, 0xbcc51f068cb95c1d + data8 0xedd5d661daed2dc4, 0x95f1c1cafdfd3684 + data8 0xbceb05f4b30a9bc0, 0xee05974eef86b903 + data8 0x960fef3b430b8d5f, 0xbd110b6604c7d306 + data8 0xee357ead791fc670, 0x962e350575b409c5 + data8 0xbd372f8598620f19, 0xee658cb3c134a463 + data8 0x964c934c0dfc1708, 0xbd5d727edb6b3c7e + data8 0xee95c1987f080211, 0x966b0a31c9c6bc7d + data8 0xbd83d47d937bbc6d, 0xeec61d92d8c4314f + data8 0x968999d9ad8d264e, 0xbdaa55addf1ae47d + data8 0xeef6a0da64a014ac, 0x96a8426705198795 + data8 0xbdd0f63c36aa73f0, 0xef274ba72a07c811 + data8 0x96c703fd64445ee5, 0xbdf7b6556d550a15 + data8 0xef581e31a2c91260, 0x96e5dec0a7b4268d + data8 0xbe1e9626b1ffa96b, 0xef8918b2bc43aec6 + data8 0x9704d2d4f59f79f3, 0xbe4595dd903e5371 + data8 0xefba3b63d89d7cbf, 0x9723e05ebe91b9b0 + data8 0xbe6cb5a7f14bc935, 0xefeb867ecffaa607 + data8 0x97430782be323831, 0xbe93f5b41d047cf7 + data8 0xf01cfa3df1b9c9fa, 0x97624865fc0df8bf + data8 0xbebb5630bae4c15f, 0xf04e96dc05b43e2d + data8 0x9781a32dcc640b2a, 0xbee2d74cd30a430c + data8 0xf0805c944d827454, 0x97a117ffd0f48e46 + data8 0xbf0a7937cf38d981, 0xf0b24ba285c495cb + data8 0x97c0a701f9d263c9, 0xbf323c217be2bc8c + data8 0xf0e46442e76f6569, 0x97e0505a8637a036 + data8 0xbf5a203a09342bbb, 0xf116a6b2291d7896 + data8 0x97f57a9fb0b08c6e, 0xbf74cad1c14ebfc4 + data8 0xf1383fa9e9b5b381, 0x9815503365914a9d + data8 0xbf9ce6a497a89f78, 0xf16ac84f90083b9b + data8 0x98354085054fd204, 0xbfc52428bec6e72f + data8 0xf19d7b686dcb03d7, 0x98554bbbf8a77902 + data8 0xbfed838fddab024b, 0xf1d0593311db1757 + data8 0x987571fffb7f94f6, 0xc016050c0420981a + data8 0xf20361ee8f1c711e, 0x9895b3791dd03c23 + data8 0xc03ea8cfabddc330, 0xf23695da7de51d3f + data8 0x98ab43a5fc65d0c8, 0xc059d3cbd65ddbce + data8 0xf258d095e465cc35, 0x98cbb2d196bd713d + data8 0xc082b122a3c78c9d, 0xf28c4d0bfc982b34 + data8 0x98ec3d9ec7b6f21a, 0xc0abb1499ae736c4 + data8 0xf2bff55eb3f0ea71, 0x990ce436db5e8344 + data8 0xc0d4d474c3aedaaf, 0xf2f3c9cf9884636e + data8 0x9922b8218160967a, 0xc0f054ca33eb3437 + data8 0xf31670135ab9cc0f, 0x99438d686f75779d + data8 0xc119b2c67e600ed0, 0xf34a8e9f0b54cdfb + data8 0x99647eea131fa20b, 0xc1433453de2033ff + data8 0xf37ed9fa6b8add3f, 0x997a85045a47c6d0 + data8 0xc15ef3e44e10032d, 0xf3a1cfe884ef6bb6 + data8 0x999ba5f14f8add02, 0xc188b130431d80e6 + data8 0xf3d66689dcc8e8d3, 0x99bce38b5465ecae + data8 0xc1b2929d6067730e, 0xf40b2ab069d5c96a + data8 0x99d31ca0887f30f9, 0xc1ce9268f31cc734 + data8 0xf42e718b90c8bc16, 0x99f48a669c74c09e + data8 0xc1f8b0877c1b0c08, 0xf463822a0a3b4b00 + data8 0x9a16154eb445c873, 0xc222f35a87b415ba + data8 0xf498c1076015faf8, 0x9a2c822ec198d667 + data8 0xc23f3467349e5c88, 0xf4bc5a19a33990b5 + data8 0x9a4e3e080cd91b78, 0xc269b4e40e088c01 + data8 0xf4f1e6a7d6f5425f, 0x9a70177afe52322e + data8 0xc2945aac24daaf6e, 0xf527a232cf6be334 + data8 0x9a86b8fa94eebe10, 0xc2b0de05e43c1d66 + data8 0xf54b8ecdcda90851, 0x9aa8c42866ae2958 + data8 0xc2dbc275e1229d09, 0xf5819949c7ad87b4 + data8 0x9abf86f9e12fc45e, 0xc2f86fca9d80eeff + data8 0xf5a5bac9213b48a9, 0x9ae1c462fc05f49d + data8 0xc323938449a2587e, 0xf5dc1501f324a812 + data8 0x9af8a8dc936b84d0, 0xc3406b40a538ed20 + data8 0xf6006bee86b5589e, 0x9b1b19033be35730 + data8 0xc36bcee8211d15e0, 0xf63716b2fa067fa4 + data8 0x9b3da7daf04c2892, 0xc397593adf2ba366 + data8 0xf66df22fb6132b9c, 0x9b54c2e4c8a9012b + data8 0xc3b475b6206155d5, 0xf6929fb98225deb1 + data8 0x9b77854e6c661200, 0xc3e0410243b97383 + data8 0xf6c9cd13021e3fea, 0x9b8ec2e678d56d2f + data8 0xc3fd890709833d37, 0xf6eeb177472cedae + data8 0x9ba60e6a5ca133b6, 0xc41ae295f7e7fa06 + data8 0xf713abf4cb0b3afb, 0x9bc919ea66a151a4 + data8 0xc44709f7bb8a4dd2, 0xf74b4d5333684ef1 + data8 0x9be0887c09ef82bb, 0xc4648fb0e0bec4c1 + data8 0xf7707f75a72f8e94, 0x9c03c8d5fffc3503 + data8 0xc490f9a94695ba14, 0xf7a874b97927af44 + data8 0x9c1b5ad21a81cbb9, 0xc4aeac0173b7d390 + data8 0xf7cddf140aedf1d8, 0x9c3ed09216e9ca02 + data8 0xc4db5941007aa853, 0xf806291bacb7f7a9 + data8 0x9c568656c0423def, 0xc4f938aec206291a + data8 0xf82bcc43b92eafef, 0x9c7a320af242ce60 + data8 0xc52629e899dfd622, 0xf8646bf0defb759e + data8 0x9c920bf7a8c01dc2, 0xc54436e44043b965 + data8 0xf88a487dfc3ff5f7, 0x9ca9f475d98b159c + data8 0xc562563abf9ea07f, 0xf8b03c2b46cdc17f + data8 0x9ccdeca60e80b5f8, 0xc58fa7d1dc42921c + data8 0xf8e95541c152ae7a, 0x9ce5f9d4653d4902 + data8 0xc5adf561b91e110a, 0xf90f832c2700c160 + data8 0x9cfe15cb38bfdd8e, 0xc5cc5591bdbd82fa + data8 0xf935c88e0c7f419b, 0x9d225b983f6c1f96 + data8 0xc5fa08f1ff20593c, 0xf96f5cd84fd86873 + data8 0x9d3a9cca32261ed7, 0xc618980a79ce6862 + data8 0xf995dd53ebdd9d6d, 0x9d52ecfccebe1768 + data8 0xc6373a09e34b50fa, 0xf9bc75a034436a41 + data8 0x9d77818d95b82f86, 0xc66550a6e0baaf35 + data8 0xf9f686f26d5518de, 0x9d8ff7893fa4706c + data8 0xc6842241926342c9, 0xfa1d5b39b910a8c5 + data8 0x9da87cbef36f2a5e, 0xc6a3070b7c93bb9e + data8 0xfa4447acc4ecbfd2, 0x9dcd6140b4a35aeb + data8 0xc6d18260bb84081b, 0xfa7ed7e51e6fdfb4 + data8 0x9de60cd06dc6e2d4, 0xc6f0977c9416828b + data8 0xfaa601394d49a1a0, 0x9dfec7d4cc43b76f + data8 0xc70fc0117c641630, 0xfacd431644ce0e40 + data8 0x9e17925ec9fccc4a, 0xc72efc34d7e615be + data8 0xfaf49d96f7a75909, 0x9e3cdf6db57dc075 + data8 0xc75dfb441594141e, 0xfb2fd3c65e562fd5 + data8 0x9e55d110b63637a8, 0xc77d68aa019bda4c + data8 0xfb576c5762024805, 0x9e6ed27594550d2e + data8 0xc79ce9ea478dbc4f, 0xfb7f1debc22c4040 + data8 0x9e87e3adc385d393, 0xc7bc7f1ae453219d + data8 0xfba6e89f32d0190a, 0x9ead9b54b37a1055 + data8 0xc7ec0476e15e141a, 0xfbe2c803a0894893 + data8 0x9ec6d46a3d7de215, 0xc80bcbe16f1d540f + data8 0xfc0ad1ff0ed9ecf0, 0x9ee01d9108be3154 + data8 0xc82ba78a5d349735, 0xfc32f57bdfbcbe7f + data8 0x9ef976db07288d04, 0xc84b978847a06b87 + data8 0xfc5b32968f99b21c, 0x9f12e05a4759ec25 + data8 0xc86b9bf1ee817bc6, 0xfc83896bc861ab08 + data8 0x9f2c5a20f4da6668, 0xc88bb4de3667cdf4 + data8 0xfcabfa1861ed4815, 0x9f52af78ed1733ca + data8 0xc8bc00e7fe9e23a3, 0xfce8d3cea7d3163e + data8 0x9f6c52426a39d003, 0xc8dc4d7ff2d25232 + data8 0xfd118595143ee273, 0x9f860593d42fd7f3 + data8 0xc8fcaeebcb40eb47, 0xfd3a519943d4865a + data8 0x9f9fc97fdb96bd51, 0xc91d25431426a663 + data8 0xfd6337f8e1ae5a4b, 0x9fb99e194f4a7037 + data8 0xc93db09d7fdb2949, 0xfd8c38d1c8e927eb + data8 0x9fd383731ca51db9, 0xc95e5112e721582a + data8 0xfdb5544205095a53, 0x9fed79a04fbf9423 + data8 0xc97f06bb49787677, 0xfdde8a67d2613531 + data8 0xa00780b413b24ee8, 0xc99fd1aecd6e1b06 + data8 0xfe07db619e781611, 0xa02eab2c4474b0cd + data8 0xc9d12a3e27bb1625, 0xfe460768d80bf758 + data8 0xa048dcd51ccfd142, 0xc9f22ad82ba3d5f0 + data8 0xfe6f9bfb06cd32f6, 0xa0631fa894b11b8d + data8 0xca134113105e67b2, 0xfe994bcd3d14fcc2 + data8 0xa07d73ba65e680af, 0xca346d07b045a876 + data8 0xfec316fecaf3f2ab, 0xa097d91e6aaf71b0 + data8 0xca55aecf0e94bb88, 0xfeecfdaf33fadb80 + data8 0xa0b24fe89e02602f, 0xca77068257be9bab + data8 0xff16fffe2fa8fad6, 0xa0ccd82d1bd2f68b + data8 0xca98743ae1c693a8, 0xff411e0ba9db886d + data8 0xa0e77200215909e6, 0xcab9f8122c99a101 + data8 0xff6b57f7c33e4e9a, 0xa1021d760d584855 + data8 0xcadb9221e268c3b5, 0xff95ade2d1bd7358 + data8 0xa11cdaa36068a57d, 0xcafd4283d8043dfd + data8 0xffc01fed60f86fb5, 0xa137a99cbd3f880b + data8 0xcb1f09520d37c6fb, 0xffeaae3832b63956 +LOCAL_OBJECT_END(T_table) + + + + + + + +.section .text +GLOBAL_LIBM_ENTRY(cbrtf) + + +{.mfi + getf.sig GR_SIGNIF = f8 + // will continue only for normal/denormal numbers + fclass.nm.unc p12, p7 = f8, 0x1b + // GR_GP = pointer to C_1, C_2 followed by T_table + nop.i 0 +} +{.mfi + addl GR_GP = @ltoff(poly_coeffs), gp + // normalize a + fma.s1 FR_ARG = f8, f1, f0 + // GR_CT3 = bias-((2^8-1)/3) -63 = 0xffff-0x55-0x3f = 0xff6b + mov GR_CT3 = 0xff6b ;; +} + +{.mmi + // get exponent + getf.exp GR_ARGEXP = f8 + // load start address for C_1, C_2 followed by T_table + ld8 GR_ADDR = [ GR_GP ] + nop.i 0 ;; +} + +{.mlx + // check if input significand is 0 + (p7) cmp.eq p12, p7 = GR_SIGNIF, r0 + // GR_2P63 = 2^63 + movl GR_2P63 = 0x8000000000000000 ;; +} + +{.mfi + nop.m 0 + // y = frcpa(a) + // p7 = 1 for normal and denormal (but non-zero) arguments + (p7) frcpa.s0 FR_Y, p0 = f1, f8 + // p9 = 1 if denormal input + cmp.gtu p9, p0 = GR_2P63, GR_SIGNIF +} +{.mfb + // load C_1 + ldfe FR_COEFF1 = [ GR_ADDR ], 16 + // if argument is 0, +/-Infinity, or NaN, return + (p12) fma.s.s0 f8 = f8, f1, f0 + (p12) br.ret.spnt b0 ;; +} + +{.mmi + // get normalized significand (for denormal inputs only) + (p9) getf.sig GR_SIGNIF = FR_ARG + // load C_2 + ldfe FR_COEFF2 = [ GR_ADDR ], 16 + // GR_CT2 = bias-(2^8-1) + mov GR_CT2 = 0xff00 +} + +{.mii + // get exponent (for denormal inputs only) + (p9) getf.exp GR_ARGEXP = FR_ARG + nop.i 0 + mov GR_CONST = 0x20000 ;; +} + + +{.mii + // get GR_SIGN = sign + and GR_SIGN = GR_ARGEXP, GR_CONST + // eliminate leading 1 from GR_I1 = 1st table index + shl GR_I1 = GR_SIGNIF, 1 + // eliminate sign from exponent + andcm GR_EBIAS = GR_ARGEXP, GR_CONST ;; +} + + +{.mfi + // subtract bias from GR_EXP = exponent + sub GR_EXP = GR_EBIAS, GR_CT2 + // r = 1-a*y + fnma.s1 FR_R = FR_Y, FR_ARG, f1 + // GR_IT1 = 1st table index (y_index8 bits) + shr.u GR_IT1 = GR_I1, 56 ;; +} + + +{.mii + // 1: exponent* = 5; // (2^{16}-1)/3 = 0x5555 + shladd GR_E5 = GR_EXP, 2, GR_EXP + // GR_IT1_3 = 3*y_index + shladd GR_IT1_3 = GR_IT1, 1, GR_IT1 + nop.i 0 ;; +} + + +{.mmi + // GR_TMP5 = (5*expon)*16+5*expon = (0x55)*expon + shladd GR_TMP5 = GR_E5, 4, GR_E5 + // adjust T_table pointer by 1st index + shladd GR_TP1 = GR_IT1_3, 3, GR_ADDR + nop.i 0 ;; +} + + +{.mmi + // FR_T0 = T [ 0 ] [ y ] + ldf8 FR_T0 = [ GR_TP1 ], 8 + // get 2^{-63} + mov GR_TMP63 = 0xffff + 63 + // GR_TMP = (0x5500)*expon + shl GR_TMP = GR_TMP5, 8 ;; +} + + +{.mfi + // FR_T1 = T [ 1 ] [ y ] + ldf8 FR_T1 = [ GR_TP1 ], 8 + // P_1 = C_1+C_2*r + fma.s1 FR_COEFF1 = FR_COEFF2, FR_R, FR_COEFF1 + // GR_TMP2 = (0x5555)*expon + add GR_TMP2 = GR_TMP, GR_TMP5 ;; +} + + +{.mmi + // GR_TMP3 = (0x5556)*expon // 0x5556 = (2^{16}+2)/3 + add GR_TMP3 = GR_TMP2, GR_EXP ;; + // FR_T2 = T [ 2 ] [ y ] + ldf8 FR_T2 = [ GR_TP1 ] + // GR_EXP3 = floor(expon/3) + shr GR_EXP3 = GR_TMP3, 16 ;; +} + + +{.mmi + setf.exp FR_2M63 = GR_TMP63 + // GR_TMP4 = 3*exponent + shladd GR_TMP4 = GR_EXP3, 1, GR_EXP3 + // bias exponent + add GR_EBIAS3 = GR_CT3, GR_EXP3 ;; +} + + +{.mmf + // get remainder of exponent/3 + sub GR_REM = GR_EXP, GR_TMP4 + // add sign to exponent + or GR_SEXP = GR_EBIAS3, GR_SIGN + // P_2 = -r*P_1 + fnma.s1 FR_R = FR_COEFF1, FR_R, f0 ;; +} + + + +{.mmi + // FR_ARG = sign*2^{exponent/3} + setf.exp FR_ARG = GR_SEXP + nop.m 0 + // remainder = 0 ? + // p7=1 if input exponent is 3*j (remainder is 0) + cmp.eq.unc p7, p8 = r0, GR_REM ;; +} + + +{.mfi + // remainder = 1 ? + // p8=1 if input exponent is 3*j+1 (remainder is 1) + // p12=1 if input exponent is 3*j+2 (remainder is 2) + (p8) cmp.eq.unc p8, p12 = 1, GR_REM + // p7=1 -> remainder = 0 -> use T = FR_T0 + (p7) fma.s1 f8 = FR_T0, FR_R, FR_T0 + // argument is of the form 2^(3*k) ? + // ( GR_I1 holds significand bits, without the leading 1) + or GR_I1 = GR_I1, GR_REM ;; +} + + +.pred.rel "mutex", p12, p8 +{.mfi + nop.m 0 + // p8=1 -> remainder = 1 -> use FR_T1 + (p8) fma.s1 f8 = FR_T1, FR_R, FR_T1 + // argument is of the form 2^(3*k) ? + cmp.eq p14, p7 = GR_I1, r0 +} + + +{.mfi + nop.m 0 + // p12=1 -> remainder=2 -> result = T+T*P_2 + (p12) fma.s1 f8 = FR_T2, FR_R, FR_T2 + nop.i 0 ;; +} + + +.pred.rel "mutex", p14, p7 +{.mfi + nop.m 0 + // if argument is sgn*2^{3*(expon/3)} + (p14) fma.s.s0 f8 = FR_2M63, FR_ARG, f0 + nop.i 0 +} +{.mfb + nop.m 0 + // T* = sgn*2^{expon/3} + (p7) fma.s.s0 f8 = f8, FR_ARG, f0 + br.ret.sptk b0 ;; +} + + +GLOBAL_LIBM_END(cbrtf) + + + + diff --git a/sysdeps/ia64/fpu/s_cbrtl.S b/sysdeps/ia64/fpu/s_cbrtl.S new file mode 100644 index 0000000000..76ef12f334 --- /dev/null +++ b/sysdeps/ia64/fpu/s_cbrtl.S @@ -0,0 +1,986 @@ +.file "cbrtl.s" + + +// Copyright (c) 2000 - 2004, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 04/28/00 Initial version +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/06/03 Reordered header:.section,.global,.proc,.align +// 11/23/04 Reformatted routine and improved speed +// +// API +//============================================================== +// long double cbrtl(long double) +// +// Overview of operation +//============================================================== +// Background +// +// Implementation +// +// The result is computed as +// cbrt(x)= cbrt(1 - (1 - x*y)) * (1/cbrt(y)) +// where y = frcpa(x) = (-1)^sgn_y * 2^(3*k+j) * m_y, +// m_y in [1,2), j in {0,1,2} +// +// cbrt(1 - (1 - x*y)) is approximated by a degree-6 polynomial +// in r= 1 - x*y : +// P = 1 - c_1 r - c_2 * r^2 - c_3 * r^3 - c_4 * r^4 - c_5 * r^5 - c_6 * r^6 +// +// +// The values (1/cbrt(y)) are stored as two tables of constants T_hi +// (double-extended precision) and D (single precision) as follows: +// T_hi (1 + D)= 1/cbrt(y) to about 80 bits of accuracy +// +// The tables are only stored for three exponent values (i.e. +// only for 2^j * m_y, where j in {0,1,2} and m_y covers the 256 +// possible mantissas for an frcpa result); the index is formed +// by the 8 leading mantissa bits of x, which is the same index used +// by the hardware to get frcpa(x). +// +// The table values are multiplied by 2^k where e is the exponent of +// the input number. This multiplication is carried out in parallel with +// the polynomial evaluation: +// T= 2^(k) * T_hi +// +//======================================================================= + +//=============== +// Special values +//============================================================== + +// Registers used +//============================================================== +// p6, p7, p12 + FR_R = f6 + FR_C1 = f7 + FR_C2 = f9 + FR_C3 = f10 + FR_C4 = f11 + FR_C5 = f12 + FR_C6 = f13 + FR_XNORM = f14 + FR_D = f15 + FR_SPECIAL = f32 + FR_RCP = f33 + FR_R2 = f34 + FR_P1 = f35 + FR_P2 = f36 + FR_P3 = f37 + FR_P4 = f38 + FR_P5 = f39 + FR_R3 = f40 + FR_T = f41 + FR_TF = f42 + FR_P = f43 + FR_SGNEXP = f44 + + GR_ADDR = r2 + GR_C_START = r2 + GR_ARGSIG = r3 + GR_NORMSIG = r15 + GR_D_ADDR = r16 + GR_D_START = r16 + GR_INDEX2 = r17 + GR_IX2 = r17 + GR_NORMEXP = r18 + GR_EXP5 = r19 + GR_EXP3 = r20 + GR_EXP6 = r20 + GR_EXP17 = r21 + GR_TMP1 = r21 + GR_SGNMASK = r22 + GR_T_INDEX = r23 + GR_IX_T = r23 + GR_IX_D = r24 + GR_D_INDEX = r24 + GR_TMP2 = r25 + GR_TMP3 = r25 + GR_TMP4 = r25 + GR_EXP_RES = r26 + GR_BIAS23 = r27 + GR_EXPBIAS = r27 + GR_EXP_MOD_3 = r28 + GR_SIGN = r29 + GR_EXPSIGNRES = r29 + GR_REMTMP = r30 + GR_NORMEXPSGN = r31 + + +// Data tables +//============================================================== + +RODATA + +.align 16 + +LOCAL_OBJECT_START(poly_coeffs) + + data8 0xaaaaaaaaaaaaaab1, 0x00003ffd // C_1 + data8 0xe38e38e38e38e3e0, 0x00003ffb // C_2 + data8 0x3faf9add3c0be9a6, 0x3fa511e8d2b1f749 // C_3, C_4 + data8 0x3f9ee71b2c6ebe99, 0x3f9809180fd0340c // C_5, C_6 +LOCAL_OBJECT_END(poly_coeffs) + + +LOCAL_OBJECT_START(T_table) + + data8 0x80155c748c374836, 0x8040404b0879f7f9 + data8 0x806b5dce4b405c10, 0x8096b586974669b1 + data8 0x80bcd273d952a028, 0x80e898c52813f2f3 + data8 0x81149add67c2d208, 0x813b4e2c856b6e9a + data8 0x8167c1dde03de7aa, 0x818ed973b811135e + data8 0x81bbc0c33e13ec98, 0x81e33e69fbe7504a + data8 0x820aec524e3c23e9, 0x823880f78e70b805 + data8 0x826097a62a8e5200, 0x8288dfe00e9b5eaf + data8 0x82b15a10c5371624, 0x82da06a527b18937 + data8 0x8302e60b635ab394, 0x832bf8b2feec2f0e + data8 0x83553f0ce00e276b, 0x837eb98b50f8322a + data8 0x83a270f44c84f699, 0x83cc4d7cfcfac5ca + data8 0x83f65f78a8872b4c, 0x8420a75f2f7b53c8 + data8 0x844510461ff14209, 0x846fbd91b930bed2 + data8 0x84947e18234f3294, 0x84bf92755825045a + data8 0x84e4ac0ee112ba51, 0x8509ef44b86f20be + data8 0x85359d5d91768427, 0x855b3bd5b7384357 + data8 0x858104f0c415f79a, 0x85a6f90390d29864 + data8 0x85d3772fcd56a1dd, 0x85f9c982fcc002f3 + data8 0x862047e0e7ea554b, 0x8646f2a26f7f5852 + data8 0x866dca21754096b5, 0x8694ceb8dfd17a37 + data8 0x86bc00c49e9307e8, 0x86dccd74fce79610 + data8 0x870453c845acf90f, 0x872c089a1e90342c + data8 0x8753ec4a92d16c5e, 0x877bff3aca19f6b4 + data8 0x879d88b6fe1c324c, 0x87c5f346dbf98c3a + data8 0x87e7c653efacef2c, 0x881089d4e73ffefc + data8 0x88397e6a366f2a8a, 0x885bc559e5e1c081 + data8 0x887e2ee392bb7a93, 0x88a7a8587e404257 + data8 0x88ca5eda67594784, 0x88f4356166bd590e + data8 0x89173a0acf5ce026, 0x893a62a098b6a57b + data8 0x895daf637236ae2c, 0x89883b9d1c2fa9c5 + data8 0x89abd8dd374a5d7b, 0x89cf9b1dcd197fa0 + data8 0x89f382a258ea79de, 0x8a178faf06648f29 + data8 0x8a3bc288b3e1d18a, 0x8a601b74f4d1f835 + data8 0x8a849aba14274764, 0x8aa9409f16cdbc9b + data8 0x8ace0d6bbe2cb316, 0x8af301688ab33558 + data8 0x8b181cdebe6f3206, 0x8b3d60185fafcb7c + data8 0x8b62cb603bb2fad0, 0x8b80d7d6bc4104de + data8 0x8ba68bf73ac74f39, 0x8bcc68fb9f9f7335 + data8 0x8bf26f31c534fca2, 0x8c10f86e13a1a1f9 + data8 0x8c3749916cc6abb5, 0x8c5dc4c4f7706032 + data8 0x8c7cac3a8c42e3e0, 0x8ca373f1b7bf2716 + data8 0x8cc29907fb951294, 0x8ce9ae4e9492aac8 + data8 0x8d0911dddbfdad0e, 0x8d3075c4f20f04ee + data8 0x8d5018a9d4de77d5, 0x8d77cc47dd143515 + data8 0x8d97af6352739cb7, 0x8db7af523167800f + data8 0x8ddfd80bc68c32ff, 0x8e00197e1e7c88fe + data8 0x8e207859f77e20e7, 0x8e40f4ce60c9f8e2 + data8 0x8e69ba46cf2fde4d, 0x8e8a7a00bd7ae63e + data8 0x8eab57ef1cf2f529, 0x8ecc5442cffb1dad + data8 0x8eed6f2d2a4acbfe, 0x8f0ea8dff24441ff + data8 0x8f385c95d696b817, 0x8f59dc43edd930f3 + data8 0x8f7b7b5f5ffad1c4, 0x8f9d3a1bea165f38 + data8 0x8fbf18adc34b66da, 0x8fe117499e356095 + data8 0x90033624aa685f8d, 0x9025757495f36b86 + data8 0x903f3a5dcc091203, 0x9061b2fceb2bdbab + data8 0x90844ca7211032a7, 0x90a7079403e6a15d + data8 0x90c9e3fbafd63799, 0x90ece216c8a16ee4 + data8 0x9110021e7b516f0a, 0x912a708a39be9075 + data8 0x914dcc7b31146370, 0x91714af8cfe984d5 + data8 0x918c00a6f3795e97, 0x91afbc299ed0295d + data8 0x91d39add3e958db0, 0x91ee9920a8974d92 + data8 0x9212b5fcac537c19, 0x9236f6b256923fcf + data8 0x92523ee6f90dcfc3, 0x9276bef031e6eb79 + data8 0x929236ec237a24ad, 0x92b6f70b7efe9dc3 + data8 0x92d29f61eec7dc2b, 0x92f7a05d5b8ba92f + data8 0x931379a403be5c16, 0x9338bc44de2e3f34 + data8 0x9354c71412c69486, 0x937a4c273907e262 + data8 0x93968919f6e7975d, 0x93bc516fdd4680c9 + data8 0x93d8c123d9be59b2, 0x93f546c955e60076 + data8 0x941b70a65879079f, 0x943829f337410591 + data8 0x9454f995765bc4d2, 0x947b86b57f5842ed + data8 0x94988aeb23470f86, 0x94b5a5dc9695f42a + data8 0x94d2d7a9170d8b42, 0x94f9e87dd78bf019 + data8 0x95175019a503d89e, 0x9534cefa625fcb3a + data8 0x955265405c491a25, 0x9570130c1f9bb857 + data8 0x9597ca4119525184, 0x95b5af6fb5aa4d3c + data8 0x95d3ac9273aafd7a, 0x95f1c1cafdfd3684 + data8 0x960fef3b430b8d5f, 0x962e350575b409c5 + data8 0x964c934c0dfc1708, 0x966b0a31c9c6bc7d + data8 0x968999d9ad8d264e, 0x96a8426705198795 + data8 0x96c703fd64445ee5, 0x96e5dec0a7b4268d + data8 0x9704d2d4f59f79f3, 0x9723e05ebe91b9b0 + data8 0x97430782be323831, 0x97624865fc0df8bf + data8 0x9781a32dcc640b2a, 0x97a117ffd0f48e46 + data8 0x97c0a701f9d263c9, 0x97e0505a8637a036 + data8 0x97f57a9fb0b08c6e, 0x9815503365914a9d + data8 0x98354085054fd204, 0x98554bbbf8a77902 + data8 0x987571fffb7f94f6, 0x9895b3791dd03c23 + data8 0x98ab43a5fc65d0c8, 0x98cbb2d196bd713d + data8 0x98ec3d9ec7b6f21a, 0x990ce436db5e8344 + data8 0x9922b8218160967a, 0x99438d686f75779d + data8 0x99647eea131fa20b, 0x997a85045a47c6d0 + data8 0x999ba5f14f8add02, 0x99bce38b5465ecae + data8 0x99d31ca0887f30f9, 0x99f48a669c74c09e + data8 0x9a16154eb445c873, 0x9a2c822ec198d667 + data8 0x9a4e3e080cd91b78, 0x9a70177afe52322e + data8 0x9a86b8fa94eebe10, 0x9aa8c42866ae2958 + data8 0x9abf86f9e12fc45e, 0x9ae1c462fc05f49d + data8 0x9af8a8dc936b84d0, 0x9b1b19033be35730 + data8 0x9b3da7daf04c2892, 0x9b54c2e4c8a9012b + data8 0x9b77854e6c661200, 0x9b8ec2e678d56d2f + data8 0x9ba60e6a5ca133b6, 0x9bc919ea66a151a4 + data8 0x9be0887c09ef82bb, 0x9c03c8d5fffc3503 + data8 0x9c1b5ad21a81cbb9, 0x9c3ed09216e9ca02 + data8 0x9c568656c0423def, 0x9c7a320af242ce60 + data8 0x9c920bf7a8c01dc2, 0x9ca9f475d98b159c + data8 0x9ccdeca60e80b5f8, 0x9ce5f9d4653d4902 + data8 0x9cfe15cb38bfdd8e, 0x9d225b983f6c1f96 + data8 0x9d3a9cca32261ed7, 0x9d52ecfccebe1768 + data8 0x9d77818d95b82f86, 0x9d8ff7893fa4706c + data8 0x9da87cbef36f2a5e, 0x9dcd6140b4a35aeb + data8 0x9de60cd06dc6e2d4, 0x9dfec7d4cc43b76f + data8 0x9e17925ec9fccc4a, 0x9e3cdf6db57dc075 + data8 0x9e55d110b63637a8, 0x9e6ed27594550d2e + data8 0x9e87e3adc385d393, 0x9ead9b54b37a1055 + data8 0x9ec6d46a3d7de215, 0x9ee01d9108be3154 + data8 0x9ef976db07288d04, 0x9f12e05a4759ec25 + data8 0x9f2c5a20f4da6668, 0x9f52af78ed1733ca + data8 0x9f6c52426a39d003, 0x9f860593d42fd7f3 + data8 0x9f9fc97fdb96bd51, 0x9fb99e194f4a7037 + data8 0x9fd383731ca51db9, 0x9fed79a04fbf9423 + data8 0xa00780b413b24ee8, 0xa02eab2c4474b0cd + data8 0xa048dcd51ccfd142, 0xa0631fa894b11b8d + data8 0xa07d73ba65e680af, 0xa097d91e6aaf71b0 + data8 0xa0b24fe89e02602f, 0xa0ccd82d1bd2f68b + data8 0xa0e77200215909e6, 0xa1021d760d584855 + data8 0xa11cdaa36068a57d, 0xa137a99cbd3f880b + data8 0xa160019ed37fb4ae, 0xa1960b5966da4608 + data8 0xa1cc5dbe6dc2aab4, 0xa202f97995b69c0d + data8 0xa232fe6eb0c0577d, 0xa26a2582012f6e17 + data8 0xa2a197e5d10465cb, 0xa2d25a532efefbc8 + data8 0xa30a5bd6e49e4ab8, 0xa33b9c9b59879e24 + data8 0xa3742fca6a3c1f21, 0xa3a5f1273887bf22 + data8 0xa3d7ef508ff11574, 0xa4115ce30548bc15 + data8 0xa443df0e53df577a, 0xa4769fa5913c0ec3 + data8 0xa4a99f303bc7def5, 0xa4dcde37779adf4b + data8 0xa5105d46152c938a, 0xa5441ce89825cb8d + data8 0xa5781dad3e54d899, 0xa5ac602406c4e68c + data8 0xa5d9601d95c2c0bc, 0xa60e1e1a2de14745 + data8 0xa6431f6e3fbd9658, 0xa67864b0d432fda4 + data8 0xa6a6444aa0243c0b, 0xa6dc094d10f25792 + data8 0xa70a574cc02bba69, 0xa7409e2af9549084 + data8 0xa76f5c64ca2cf13b, 0xa79e4f0babab5dc0 + data8 0xa7d5579ae5164b85, 0xa804bd3c6fe61cc8 + data8 0xa8345895e5250a5a, 0xa8642a122b44ef0b + data8 0xa89c38ca18f6108b, 0xa8cc81063b6e87ca + data8 0xa8fd00bfa409285e, 0xa92db8664d5516da + data8 0xa95ea86b75cc2c20, 0xa98fd141a4992deb + data8 0xa9c1335cae7446ba, 0xa9ea8686f556f645 + data8 0xaa1c52d17906bb19, 0xaa4e59b046dab887 + data8 0xaa809b9c60d1890b, 0xaab319102f3f9b33 + data8 0xaadd5a18c1e21274, 0xab1045f2ac31bdf5 + data8 0xab3ae3ab2df7231e, 0xab6e3f945d1e96fc + data8 0xaba1d953a08fa94e, 0xabcd090db7ef4c3f + data8 0xabf864602d7c323d, 0xac2ca5886ccf9b57 + data8 0xac5861d4aa441f0f, 0xac8d183fe3a2fbed + data8 0xacb93703ff51571e, 0xace5830ad0c3f14b + data8 0xad11fca5d78b3ff2, 0xad4797fddf91a798 + data8 0xad747701e559ebcb, 0xada184a47e9c7613 + data8 0xadcec13ab0dda8ff, 0xadfc2d1a5fd21ba8 + data8 0xae29c89a5053c33a, 0xae5794122b638df9 + data8 0xae858fda8137ae0a, 0xaeb3bc4ccc56d3d1 + data8 0xaee219c374c09920, 0xaf10a899d3235fe7 + data8 0xaf3f692c341fe8b4, 0xaf6e5bd7db9ae6c2 + data8 0xaf9d80fb081cd91b, 0xafc35ce063eb3787 + data8 0xaff2ddcb5f28f03d, 0xb022923b148e05c5 + data8 0xb0527a919adbf58b, 0xb078f3ab1d701c65 + data8 0xb0a93a6870649f31, 0xb0d9b624d62ec856 + data8 0xb100a5f53fb3c8e1, 0xb131821882f5540a + data8 0xb158bf8e4cb04055, 0xb189fd69d56b238f + data8 0xb1b189958e8108e4, 0xb1e32a8165b09832 + data8 0xb20b0678fc271eec, 0xb23d0bd3f7592b6e + data8 0xb26538b2db8420dc, 0xb28d89e339ceca14 + data8 0xb2c022ca12e55a16, 0xb2e8c6852c6b03f1 + data8 0xb3118f4eda9fe40f, 0xb33a7d6268109ebe + data8 0xb36ddbc5ea70ec55, 0xb3971e9b39264023 + data8 0xb3c0877ecc18e24a, 0xb3ea16ae3a6c905f + data8 0xb413cc67aa0e4d2d, 0xb43da8e9d163e1af + data8 0xb47233773b84d425, 0xb49c6825430fe730 + data8 0xb4c6c46bcdb27dcf, 0xb4f1488c0b35d26f + data8 0xb51bf4c7c51f0168, 0xb546c9616087ab9c + data8 0xb571c69bdffd9a70, 0xb59cecbae56984c3 + data8 0xb5bd64512bb14bb7, 0xb5e8d2a4bf5ba416 + data8 0xb6146a9a1bc47819, 0xb6402c7749d621c0 + data8 0xb66c1882fb435ea2, 0xb6982f048c999a56 + data8 0xb6c47044075b4142, 0xb6e5bd6bfd02bafd + data8 0xb7124a2736ff8ef2, 0xb73f026a01e94177 + data8 0xb760a959f1d0a7a7, 0xb78dae7e06868ab0 + data8 0xb7badff8ad9e4e02, 0xb7dce25b8e17ae9f + data8 0xb80a6226904045e2, 0xb8380f1cafd73c1c + data8 0xb85a6ea8e321b4d8, 0xb8886b684ae7d2fa + data8 0xb8ab0726fa00cf5d, 0xb8d954a4d13b7cb1 + data8 0xb8fc2d4f6cd9f04a, 0xb92acc851476b1ab + data8 0xb94de2d841a184c2, 0xb97cd4c36c92693c + data8 0xb9a0297f172665e3, 0xb9cf6f21e36c3924 + data8 0xb9f3030951267208, 0xba229d6a618e7c59 + data8 0xba467144459f9855, 0xba6a60c3c48f1a4b + data8 0xba9a76056b67ee7a, 0xbabea699563ada6e + data8 0xbae2f350b262cc4b, 0xbb1385a23be24e57 + data8 0xbb3814975e17c680, 0xbb5cc031009bf467 + data8 0xbb81889680024764, 0xbbb2c0d8703ae95d + data8 0xbbd7cd09ba3c5463, 0xbbfcf68c4977718f + data8 0xbc223d88cfc88eee, 0xbc47a2284fee4ff8 + data8 0xbc79ac0916ed7b8a, 0xbc9f5670d1a13030 + data8 0xbcc51f068cb95c1d, 0xbceb05f4b30a9bc0 + data8 0xbd110b6604c7d306, 0xbd372f8598620f19 + data8 0xbd5d727edb6b3c7e, 0xbd83d47d937bbc6d + data8 0xbdaa55addf1ae47d, 0xbdd0f63c36aa73f0 + data8 0xbdf7b6556d550a15, 0xbe1e9626b1ffa96b + data8 0xbe4595dd903e5371, 0xbe6cb5a7f14bc935 + data8 0xbe93f5b41d047cf7, 0xbebb5630bae4c15f + data8 0xbee2d74cd30a430c, 0xbf0a7937cf38d981 + data8 0xbf323c217be2bc8c, 0xbf5a203a09342bbb + data8 0xbf74cad1c14ebfc4, 0xbf9ce6a497a89f78 + data8 0xbfc52428bec6e72f, 0xbfed838fddab024b + data8 0xc016050c0420981a, 0xc03ea8cfabddc330 + data8 0xc059d3cbd65ddbce, 0xc082b122a3c78c9d + data8 0xc0abb1499ae736c4, 0xc0d4d474c3aedaaf + data8 0xc0f054ca33eb3437, 0xc119b2c67e600ed0 + data8 0xc1433453de2033ff, 0xc15ef3e44e10032d + data8 0xc188b130431d80e6, 0xc1b2929d6067730e + data8 0xc1ce9268f31cc734, 0xc1f8b0877c1b0c08 + data8 0xc222f35a87b415ba, 0xc23f3467349e5c88 + data8 0xc269b4e40e088c01, 0xc2945aac24daaf6e + data8 0xc2b0de05e43c1d66, 0xc2dbc275e1229d09 + data8 0xc2f86fca9d80eeff, 0xc323938449a2587e + data8 0xc3406b40a538ed20, 0xc36bcee8211d15e0 + data8 0xc397593adf2ba366, 0xc3b475b6206155d5 + data8 0xc3e0410243b97383, 0xc3fd890709833d37 + data8 0xc41ae295f7e7fa06, 0xc44709f7bb8a4dd2 + data8 0xc4648fb0e0bec4c1, 0xc490f9a94695ba14 + data8 0xc4aeac0173b7d390, 0xc4db5941007aa853 + data8 0xc4f938aec206291a, 0xc52629e899dfd622 + data8 0xc54436e44043b965, 0xc562563abf9ea07f + data8 0xc58fa7d1dc42921c, 0xc5adf561b91e110a + data8 0xc5cc5591bdbd82fa, 0xc5fa08f1ff20593c + data8 0xc618980a79ce6862, 0xc6373a09e34b50fa + data8 0xc66550a6e0baaf35, 0xc6842241926342c9 + data8 0xc6a3070b7c93bb9e, 0xc6d18260bb84081b + data8 0xc6f0977c9416828b, 0xc70fc0117c641630 + data8 0xc72efc34d7e615be, 0xc75dfb441594141e + data8 0xc77d68aa019bda4c, 0xc79ce9ea478dbc4f + data8 0xc7bc7f1ae453219d, 0xc7ec0476e15e141a + data8 0xc80bcbe16f1d540f, 0xc82ba78a5d349735 + data8 0xc84b978847a06b87, 0xc86b9bf1ee817bc6 + data8 0xc88bb4de3667cdf4, 0xc8bc00e7fe9e23a3 + data8 0xc8dc4d7ff2d25232, 0xc8fcaeebcb40eb47 + data8 0xc91d25431426a663, 0xc93db09d7fdb2949 + data8 0xc95e5112e721582a, 0xc97f06bb49787677 + data8 0xc99fd1aecd6e1b06, 0xc9d12a3e27bb1625 + data8 0xc9f22ad82ba3d5f0, 0xca134113105e67b2 + data8 0xca346d07b045a876, 0xca55aecf0e94bb88 + data8 0xca77068257be9bab, 0xca98743ae1c693a8 + data8 0xcab9f8122c99a101, 0xcadb9221e268c3b5 + data8 0xcafd4283d8043dfd, 0xcb1f09520d37c6fb + data8 0xcb51ddcb9e93095e, 0xcb95f333968ad59b + data8 0xcbda64292d3ffd97, 0xcc1f3184af961596 + data8 0xcc5bb1ac954d33e2, 0xcca12e9831fc6402 + data8 0xcce70a67b64f24ad, 0xcd24794726477ea5 + data8 0xcd6b096a0b70ee87, 0xcda9177738b15a90 + data8 0xcdf05f2247dffab9, 0xce2f0f347f96f906 + data8 0xce6e0be0cd551a61, 0xceb666b2c347d1de + data8 0xcef609b0cb874f00, 0xcf35fb5447e5c765 + data8 0xcf763c47ee869f00, 0xcfb6cd3888d71785 + data8 0xcff7aed4fbfbb447, 0xd038e1ce5167e3c6 + data8 0xd07a66d7bfa0ebba, 0xd0bc3ea6b32d1b21 + data8 0xd0f4f0e8f36c1bf8, 0xd1376458e34b037e + data8 0xd17a2ca133f78572, 0xd1bd4a80301c5715 + data8 0xd1f71682b2fa4575, 0xd23ad555f773f059 + data8 0xd2752c7039a5bf73, 0xd2b98ee008c06b59 + data8 0xd2f4735ffd700280, 0xd32f99ed6d9ac0e1 + data8 0xd374f0666c75d51c, 0xd3b0a7d13618e4a1 + data8 0xd3eca2ea53bcec0c, 0xd428e23874f13a17 + data8 0xd46f82fe293bc6d3, 0xd4ac57e9b7186420 + data8 0xd4e972becb04e8b8, 0xd526d40a7a9b43a3 + data8 0xd5647c5b73917370, 0xd5a26c4201bd6d13 + data8 0xd5e0a45015350a7e, 0xd614b539c6194104 + data8 0xd6537310e224283f, 0xd6927ab62244c917 + data8 0xd6d1ccc1fc4ef4b7, 0xd71169cea98fdded + data8 0xd746a66a5bc9f6d9, 0xd786ce8f0fae5317 + data8 0xd7bc7ff214c4e75a, 0xd7fd35467a517ed1 + data8 0xd83e38838648d815, 0xd874a1db598b8951 + data8 0xd8ab42205b80edaf, 0xd8ed1849d202f965 + data8 0xd92432bd5a173685, 0xd9669ca45b03c23e + data8 0xd99e3327cf89574e, 0xd9d602b19b100466 + data8 0xda0e0ba86c096841, 0xda5195fcdb1c3dce + data8 0xda8a1eb87a491f6c, 0xdac2e230b91c3f84 + data8 0xdafbe0d0b66aea30, 0xdb351b04a8fafced + data8 0xdb6e9139e33cdd8e, 0xdba843ded7151ea1 + data8 0xdbe2336319b61fc8, 0xdc1c60376789fa68 + data8 0xdc56cacda82d0cd5, 0xdc917398f2797814 + data8 0xdccc5b0d90a3e628, 0xdd0781a10469f0f2 + data8 0xdd42e7ca0b52838f, 0xdd729ad01c69114d + data8 0xddae749c001fbf5e, 0xddea8f50a51c69b1 + data8 0xde26eb69a0f0f111, 0xde576480262399bc + data8 0xde943789645933c8, 0xded14d58139a28af + data8 0xdf025c00bbf2b5c7, 0xdf3feb44d723a713 + data8 0xdf715bc16c159be0, 0xdfaf66240e29cda8 + data8 0xdfe139cbf6e19bdc, 0xe01fc0fe94d9fc52 + data8 0xe051f92ffcc0bd60, 0xe090feec9c9a06ac + data8 0xe0c39d0c9ff862d6, 0xe0f668eeb99f188d + data8 0xe1362890eb663139, 0xe1695c7212aecbaa + data8 0xe19cbf0391bbbbe9, 0xe1d050901c531e85 + data8 0xe2110903b4f4047a, 0xe2450559b4d80b6d + data8 0xe27931a231554ef3, 0xe2ad8e2ac3c5b04b + data8 0xe2e21b41b9694cce, 0xe316d93615862714 + data8 0xe3590bd86a0d30f9, 0xe38e38e38e38e38e + data8 0xe3c397d1e6db7839, 0xe3f928f5953feb9e + data8 0xe42eeca17c62886c, 0xe464e32943446305 + data8 0xe49b0ce15747a8a2, 0xe4d16a1eee94e9d4 + data8 0xe4fa52107353f67d, 0xe5310a471f4d2dc3 + data8 0xe567f6f1c2b9c224, 0xe59f18689a9e4c9a + data8 0xe5d66f04b8a68ecf, 0xe60dfb2005c192e9 + data8 0xe645bd1544c7ea51, 0xe66fb21b505b20a0 + data8 0xe6a7d32af4a7c59a, 0xe6e02b129c6a5ae4 + data8 0xe70a9136a7403039, 0xe74349fb2d92a589 + data8 0xe77c3a9c86ed7d42, 0xe7a713f88151518a + data8 0xe7e067453317ed2b, 0xe819f37a81871bb5 + data8 0xe8454236bfaeca14, 0xe87f32f24c3fc90e + data8 0xe8aacd8688892ba6, 0xe8e523fd32f606f7 + data8 0xe9110b5311407927, 0xe94bc8bf0c108fa3 + data8 0xe977fdc439c2ca3c, 0xe9b3236528fc349e + data8 0xe9dfa70b745ac1b4, 0xea1b36268d0eaa38 + data8 0xea480963fd394197, 0xea84034425f27484 + data8 0xeab12713138dd1cc, 0xeade6db73a5e503b + data8 0xeb1b0268343b121b, 0xeb489b0b2bdb5f14 + data8 0xeb765721e85f03d0, 0xebb389645f222f62 + data8 0xebe198f090607e0c, 0xec0fcc9321024509 + data8 0xec3e247da8b82f61, 0xec7c27d21321c9f7 + data8 0xecaad5278824e453, 0xecd9a76d097d4e77 + data8 0xed089ed5dcd99446, 0xed37bb95add09a1c + data8 0xed76c70508f904b6, 0xeda63bb05e7f93c6 + data8 0xedd5d661daed2dc4, 0xee05974eef86b903 + data8 0xee357ead791fc670, 0xee658cb3c134a463 + data8 0xee95c1987f080211, 0xeec61d92d8c4314f + data8 0xeef6a0da64a014ac, 0xef274ba72a07c811 + data8 0xef581e31a2c91260, 0xef8918b2bc43aec6 + data8 0xefba3b63d89d7cbf, 0xefeb867ecffaa607 + data8 0xf01cfa3df1b9c9fa, 0xf04e96dc05b43e2d + data8 0xf0805c944d827454, 0xf0b24ba285c495cb + data8 0xf0e46442e76f6569, 0xf116a6b2291d7896 + data8 0xf1383fa9e9b5b381, 0xf16ac84f90083b9b + data8 0xf19d7b686dcb03d7, 0xf1d0593311db1757 + data8 0xf20361ee8f1c711e, 0xf23695da7de51d3f + data8 0xf258d095e465cc35, 0xf28c4d0bfc982b34 + data8 0xf2bff55eb3f0ea71, 0xf2f3c9cf9884636e + data8 0xf31670135ab9cc0f, 0xf34a8e9f0b54cdfb + data8 0xf37ed9fa6b8add3f, 0xf3a1cfe884ef6bb6 + data8 0xf3d66689dcc8e8d3, 0xf40b2ab069d5c96a + data8 0xf42e718b90c8bc16, 0xf463822a0a3b4b00 + data8 0xf498c1076015faf8, 0xf4bc5a19a33990b5 + data8 0xf4f1e6a7d6f5425f, 0xf527a232cf6be334 + data8 0xf54b8ecdcda90851, 0xf5819949c7ad87b4 + data8 0xf5a5bac9213b48a9, 0xf5dc1501f324a812 + data8 0xf6006bee86b5589e, 0xf63716b2fa067fa4 + data8 0xf66df22fb6132b9c, 0xf6929fb98225deb1 + data8 0xf6c9cd13021e3fea, 0xf6eeb177472cedae + data8 0xf713abf4cb0b3afb, 0xf74b4d5333684ef1 + data8 0xf7707f75a72f8e94, 0xf7a874b97927af44 + data8 0xf7cddf140aedf1d8, 0xf806291bacb7f7a9 + data8 0xf82bcc43b92eafef, 0xf8646bf0defb759e + data8 0xf88a487dfc3ff5f7, 0xf8b03c2b46cdc17f + data8 0xf8e95541c152ae7a, 0xf90f832c2700c160 + data8 0xf935c88e0c7f419b, 0xf96f5cd84fd86873 + data8 0xf995dd53ebdd9d6d, 0xf9bc75a034436a41 + data8 0xf9f686f26d5518de, 0xfa1d5b39b910a8c5 + data8 0xfa4447acc4ecbfd2, 0xfa7ed7e51e6fdfb4 + data8 0xfaa601394d49a1a0, 0xfacd431644ce0e40 + data8 0xfaf49d96f7a75909, 0xfb2fd3c65e562fd5 + data8 0xfb576c5762024805, 0xfb7f1debc22c4040 + data8 0xfba6e89f32d0190a, 0xfbe2c803a0894893 + data8 0xfc0ad1ff0ed9ecf0, 0xfc32f57bdfbcbe7f + data8 0xfc5b32968f99b21c, 0xfc83896bc861ab08 + data8 0xfcabfa1861ed4815, 0xfce8d3cea7d3163e + data8 0xfd118595143ee273, 0xfd3a519943d4865a + data8 0xfd6337f8e1ae5a4b, 0xfd8c38d1c8e927eb + data8 0xfdb5544205095a53, 0xfdde8a67d2613531 + data8 0xfe07db619e781611, 0xfe460768d80bf758 + data8 0xfe6f9bfb06cd32f6, 0xfe994bcd3d14fcc2 + data8 0xfec316fecaf3f2ab, 0xfeecfdaf33fadb80 + data8 0xff16fffe2fa8fad6, 0xff411e0ba9db886d + data8 0xff6b57f7c33e4e9a, 0xff95ade2d1bd7358 + data8 0xffc01fed60f86fb5, 0xffeaae3832b63956 +LOCAL_OBJECT_END(T_table) + + +LOCAL_OBJECT_START(D_table) + + data4 0x1e50f488, 0x1ebdc559, 0x1e649ec1, 0x9eed9b2c + data4 0x9e511c44, 0x9ec6d551, 0x9eefe248, 0x9e313854 + data4 0x9f54ff18, 0x9d231411, 0x1ee5d63c, 0x9edf6b95 + data4 0x9f332aaa, 0x1dc92a84, 0x1f73fb7b, 0x1e32f100 + data4 0x9ea636f5, 0x9f6c3353, 0x9f405552, 0x1f33fd97 + data4 0x1e975291, 0x9e59a11e, 0x1e47b0ba, 0x9d8ad33e + data4 0x1ea51bf6, 0x1f25d782, 0x9ecf534d, 0x1f55436f + data4 0x1d0975e4, 0x9f0633a1, 0x1f3e840a, 0x1f523a4c + data4 0x9f53cbbc, 0x9c8b5661, 0x9f6bc8eb, 0x1f4f6c7b + data4 0x9ed9b376, 0x9f5b30b6, 0x1f64fa5e, 0x1cbcc3e0 + data4 0x1f343548, 0x1f62a6a2, 0x9f336abb, 0x9f1d15af + data4 0x1f476c83, 0x1ea86421, 0x1f33b2cf, 0x9e8f1348 + data4 0x1f6fa829, 0x9f30ee3a, 0x9ebd6146, 0x1f2db598 + data4 0x1ef9600d, 0x1f5b1427, 0x9edd741b, 0x1f51ef4e + data4 0x9f1aa57d, 0x9ee9b5e0, 0x9f17ecd7, 0x1ead71ff + data4 0x1f6c910e, 0x9e1837df, 0x9f0f17d9, 0x9e8350dd + data4 0x9d292f1b, 0x9e33b3ab, 0x9d6f0fe8, 0x9ed8c7cc + data4 0x9ec598c8, 0x9d56758c, 0x1e090c1e, 0x9ed4b941 + data4 0x9f1fc4cf, 0x1f63513a, 0x9edd0abc, 0x1e3924dd + data4 0x1f60d56f, 0x1ea84424, 0x9e88f4fb, 0x1f205c09 + data4 0x1ec9ae4e, 0x1d2d5738, 0x9f2c9f6d, 0x1e0765c2 + data4 0x1e8bbdd7, 0x9f16d9f1, 0x9ea62627, 0x1f13904c + data4 0x1e566ab8, 0x9dca3d1a, 0x9e91f2a1, 0x9f14641c + data4 0x9f278946, 0x1f490c1e, 0x1f575eb6, 0x1f50b3fd + data4 0x9da32efb, 0x1ea95e59, 0x9e41e058, 0x9eada15f + data4 0x9e4fe66c, 0x1f3abc98, 0x1f1b8d1e, 0x9ece97e4 + data4 0x1d188aed, 0x9e89b6ee, 0x1f287478, 0x9e8a161a + data4 0x1e4749f7, 0x9e68084a, 0x1e867f33, 0x9f462b63 + data4 0x1db30792, 0x1f59a767, 0x9d1da4ae, 0x9f472a33 + data4 0x1d1e91cd, 0x9f414824, 0x9f473d4f, 0x1f4b5783 + data4 0x9f5b04b8, 0x9f5c205b, 0x1f309617, 0x9f0d6852 + data4 0x9d96a609, 0x9f0965c2, 0x9e23f467, 0x9f089884 + data4 0x9ec71458, 0x9ed6e955, 0x1e5e8691, 0x1f5b2bbc + data4 0x9f128268, 0x1ed40f5b, 0x1dc430ce, 0x1f345986 + data4 0x1d778f72, 0x1e9b11d6, 0x9f5a40be, 0x9e07f61a + data4 0x9ed641a7, 0x9f334787, 0x1e952fd0, 0x1edeb5e2 + data4 0x9e9f3eb1, 0x9e379fd9, 0x1f13102a, 0x9e5e80e1 + data4 0x1c757944, 0x1dae2260, 0x1f183ab7, 0x1e55d576 + data4 0x9e6bb99f, 0x9f52d7cb, 0x9e73a0f5, 0x1d4e1d14 + data4 0x9dd05b53, 0x1f2261e4, 0x9d4ee73d, 0x1ede515e + data4 0x1f22a573, 0x9ecac348, 0x1e6a2ac0, 0x1e2787d2 + data4 0x9eb64b87, 0x1f0c69c6, 0x9f470a01, 0x9d7c1686 + data4 0x1e468ebe, 0x9f21ee2f, 0x9ee52116, 0x9e20f715 + data4 0x1ed18533, 0x9f005b38, 0x9f20cb95, 0x1da72967 + data4 0x1f1ba5d7, 0x1e2f8b16, 0x9c794f96, 0x9ca74ea3 + data4 0x1f410555, 0x9eff2b96, 0x1ce8f0b1, 0x1f0cee77 + data4 0x1f191edd, 0x9ed5fcbc, 0x1f30f242, 0x9e0ad369 + data4 0x1ed8f3c8, 0x1f52bb0e, 0x9e9ce408, 0x1f18907f + data4 0x9ecdad40, 0x9e8af91d, 0x1d46698a, 0x9f4b93d6 + data4 0x9f3f5d33, 0x1e2e52f7, 0x9f13aeec, 0x9f3b1969 + data4 0x1f0996f4, 0x9f2a03df, 0x1e264767, 0x1f3ab1fb + data4 0x9f3193c9, 0x9f21ce22, 0x9eab624c, 0x9ecd8fb1 + data4 0x1eaf9a85, 0x1f0c6a2c, 0x1eecbe61, 0x1f3fead9 + data4 0x1f1d3a29, 0x1e9099ce, 0x1eadd875, 0x1e4dbfb8 + data4 0x9dc640d2, 0x1f413680, 0x9f3f57b3, 0x1dfa1553 + data4 0x1ec71c6b, 0x1e00cc00, 0x9f271e55, 0x1e5a88bb + data4 0x1f46cc2b, 0x1ee80ff9, 0x9e29c6f3, 0x1f15e229 + data4 0x9ea83d66, 0x1f37408e, 0x9dacb66e, 0x1e6f6259 + data4 0x9f106973, 0x1dd4e5ac, 0x1cbfdcc8, 0x9f231c9f + data4 0x9e8677e4, 0x9e9e695a, 0x1efd782b, 0x9dd26959 + data4 0x9e80af69, 0x1f386fb3, 0x1f022e8c, 0x9e839967 + data4 0x1ce6796f, 0x1e4c22c2, 0x1e57ef24, 0x1e919804 + data4 0x9d7ea090, 0x1e40140a, 0x1f261b46, 0x1db75be2 + data4 0x1f145019, 0x9e3102b9, 0x9e22507b, 0x1eae813c + data4 0x1f117e97, 0x1f282296, 0x1f3814b3, 0x1e17977b + data4 0x1f39d6ff, 0x9f1c81b9, 0x9eb5bcad, 0x1f0f596e + data4 0x1e757fd5, 0x9f090daa, 0x9f2532fc, 0x9eebafbb + data4 0x1f086556, 0x9eeedde8, 0x9f32e174, 0x1e33c030 + data4 0x1f1f145a, 0x1e6e556c, 0x1e419ffb, 0x9eb6019a + data4 0x9e872a2e, 0x1e113136, 0x1e93096f, 0x1f39be40 + data4 0x1f1665ad, 0x9db81d7d, 0x9cd29091, 0x1e3f4af7 + data4 0x9f23176c, 0x9eccf9b3, 0x1f34fc6c, 0x9ed36894 + data4 0x1ef08e06, 0x9f3b46bb, 0x9f2c850b, 0x1f1565a4 + data4 0x1e887bc3, 0x1e92629c, 0x9f11ac9e, 0x9e5579f3 + data4 0x1e4d5790, 0x9ee1c3d1, 0x9e916aec, 0x9eb8d9b8 + data4 0x1db46105, 0x1e168663, 0x1f26a942, 0x9f0f0383 + data4 0x9f079032, 0x9ecae1d8, 0x1ed3b34c, 0x9edc5ee6 + data4 0x9e8a75a7, 0x1f3c3de2, 0x9ee5041e, 0x1f08c727 + data4 0x1d02d7ae, 0x9f36adda, 0x9ef9a857, 0x9ef5cb3a + data4 0x9eee73da, 0x9da5d629, 0x1e0e99be, 0x1e5159b9 + data4 0x1f2eac89, 0x9e8eedc5, 0x1dd0ec90, 0x1f229aff + data4 0x1ed9c3e6, 0x1e95c55a, 0x9f0c24e4, 0x1e8afed6 + data4 0x1e599a96, 0x1e881b21, 0x1eab84b9, 0x9ba2bb0e + data4 0x9e33ab10, 0x1f1710b5, 0x1ebfa271, 0x9e90bbc5 + data4 0x9f32515b, 0x9b32aae8, 0x1eda455c, 0x1da8186e + data4 0x9e8917ff, 0x1ec4d08e, 0x1c90069d, 0x9f2f1d29 + data4 0x9ecee86d, 0x9f234d1f, 0x1f370724, 0x1da87496 + data4 0x1e7959f0, 0x9e8ada34, 0x1f1c7f6f, 0x1edd576b + data4 0x9de91e8b, 0x1ec4ef89, 0x1f32078a, 0x1e9925e2 + data4 0x9d8eeccb, 0x9ea3d011, 0x1f231fdf, 0x9f1dbdfa + data4 0x1e7507a3, 0x1ec42614, 0x9e8693cb, 0x9ec68398 + data4 0x1d5b05fb, 0x1de32119, 0x9f003429, 0x9ec16d92 + data4 0x9f095315, 0x9f119d2c, 0x9ed0c984, 0x9f090662 + data4 0x9e59aa1f, 0x9ed4e64a, 0x9f2798a7, 0x9f23624d + data4 0x1e0467d9, 0x1f22e7e7, 0x1e915256, 0x9cb4df70 + data4 0x9e6f687c, 0x9e3c35e5, 0x9e5757ab, 0x9f031fa1 + data4 0x1f25bff7, 0x1f0e58c2, 0x1ef3ce04, 0x1f002ecb + data4 0x9ebdc836, 0x9ed657dd, 0x9f149441, 0x9e8544b2 + data4 0x1cd8ff1e, 0x1e9bb463, 0x1eaa1c5c, 0x1f200c1a + data4 0x1edbfbaf, 0x1f18724d, 0x9ed63c22, 0x9f08e045 + data4 0x1f13ad07, 0x9e949311, 0x9f0c50d4, 0x1e824516 + data4 0x1d5e52ba, 0x1d583fbd, 0x1e3b60a9, 0x9effe6d3 + data4 0x1f0d0508, 0x1f00be77, 0x9e404bfa, 0x9e1ca381 + data4 0x9f084dd8, 0x9e6db85d, 0x1db698e4, 0x9ebd1871 + data4 0x9ecc2679, 0x1ee68442, 0x1edb1050, 0x9dbc96a4 + data4 0x9f27c1f4, 0x1c99b756, 0x1eb4400a, 0x9f24390a + data4 0x1d927875, 0x9f074faa, 0x1e9dc2c3, 0x1f13c0d2 + data4 0x1e3c9685, 0x9e6b6f75, 0x9db9cb31, 0x1ea5f3aa + data4 0x9d992c61, 0x1f1015e4, 0x1f194f70, 0x9e19d2b3 + data4 0x9d89116c, 0x1f23cd35, 0x1e33d3a2, 0x1ee331b8 + data4 0x1d5ba7ec, 0x9f273788, 0x9e6907f4, 0x9ed5f912 + data4 0x9edd458d, 0x1e2ca7b2, 0x1ef81fe4, 0x1dc7ade6 + data4 0x1e876e51, 0x9f04ec89, 0x1f1da63a, 0x1ec02bd0 + data4 0x9e71326f, 0x1e7847b4, 0x1f0de618, 0x9e036cb6 + data4 0x1eec61e2, 0x1ef1758b, 0x9ee880a3, 0x1ed269d7 + data4 0x1e27edd3, 0x9e8a81a1, 0x1eacb84d, 0x9e1aad37 + data4 0x1f1aa8f7, 0x1e9bbd90, 0x1ea1b61f, 0x9ed41c2f + data4 0x1dbb5dd6, 0x1f0ec733, 0x9df06b1b, 0x1e06fef1 + data4 0x9edede3a, 0x1edeb5e2, 0x1f0e63ee, 0x9db316bb + data4 0x9efc1ad3, 0x1f01fbb5, 0x9cc0d078, 0x1ea28b36 + data4 0x9e9dd205, 0x9e791534, 0x1da1c8d5, 0x9e8195cc + data4 0x1f0681a4, 0x1eeaf1e2, 0x9ef83b37, 0x9f22a92b + data4 0x1eabc4ce, 0x1f10eefb, 0x1e06d9aa, 0x1e7cacd5 + data4 0x1f1ea087, 0x1eb21983, 0x9f100c78, 0x1e840abe + data4 0x9efab66c, 0x1f183fa8, 0x9e84ee68, 0x9eea083d + data4 0x9ee23a74, 0x1f1351d7, 0x9ec5d42a, 0x9f071f57 + data4 0x9ef578d9, 0x9f1aa7e7, 0x1eb02044, 0x1f151a2e + data4 0x9c0dc8b2, 0x9ef4087a, 0x1ec12b93, 0x1c1a946b + data4 0x1e89946f, 0x9dafe8c3, 0x1d295288, 0x9e8497ab + data4 0x1ec000c6, 0x1e102f29, 0x1e542256, 0x1e67d44d + data4 0x1ef688d8, 0x1f0e0f29, 0x1e67861f, 0x1e869748 + data4 0x1ee6aa6e, 0x9e4d228b, 0x9e50be5b, 0x1e9fe225 + data4 0x9ea34102, 0x9e628a3b, 0x9ed9fd83, 0x1ecd7109 + data4 0x1f1864ff, 0x1ea19b76, 0x1db0d1c9, 0x9dff519b + data4 0x1e8fea71, 0x9ee82e9a, 0x9f08919b, 0x9ef5c8ae + data4 0x9ee446a4, 0x1ea59444, 0x1eb74230, 0x1ea13fbf + data4 0x9ea6a3ea, 0x1e5f2797, 0x9e0adb07, 0x9d3adadd + data4 0x1ebf2ee2, 0x1da19bfa, 0x1e8dea6d, 0x1ec4fea9 + data4 0x1e669f22, 0x1dc5f919, 0x9ed25caa, 0x1ee475b1 + data4 0x1ed0603e, 0x9eacb35c, 0x1dc00b27, 0x1e2f9991 + data4 0x1e7b0406, 0x1eaa3387, 0x9d865bde, 0x1eb78a48 + data4 0x1c40ae2e, 0x1ee9838b, 0x9f0f0d7f, 0x1e3e5d26 + data4 0x1e99e7a6, 0x9e681ccf, 0x9e93ed65, 0x9eeb6a66 + data4 0x1e29e9af, 0x9e96f923, 0x9e74f11d, 0x9f1474da + data4 0x1eec2ea7, 0x1ebf7aa3, 0x9c25dcca, 0x9f0553c2 + data4 0x9e599efd, 0x1d2ab490, 0x1e95d7cd, 0x9ee4b20e + data4 0x9d988ce5, 0x9ef9787e, 0x9dbbba5b, 0x9f12c304 + data4 0x1e3b9d70, 0x1e7bcae8, 0x9d98bb6e, 0x9e8e6b01 + data4 0x9f07d03b, 0x9d67c822, 0x9f0ef69e, 0x1c7c0fe3 + data4 0x9e9bfbb9, 0x9e83b84b, 0x1efbf15e, 0x9ecfa6a6 + data4 0x9c91158e, 0x9ecf6770, 0x1ee1e3a8, 0x9dc95ec0 + data4 0x1ef603f7, 0x1d5e52ba, 0x1c477d1b, 0x9e955cd8 + data4 0x1ed665b0, 0x9e8376c4, 0x9c0ee88e, 0x1e8c989e + data4 0x1ea2df29, 0x9d961e5c, 0x1e101813, 0x1e7fffff + data4 0x9e5abff4, 0x1dbddd71, 0x1eb69100, 0x1e71f114 + data4 0x1e9ca798, 0x1ef62c8d, 0x9db4e55a, 0x1dbe69ce + data4 0x9ef1c01f, 0x1f044a2a, 0x9eb9e0d7, 0x9ee59745 + data4 0x9e874803, 0x1ea0b418, 0x9e13572a, 0x1ddbb3a2 + data4 0x9ec0e391, 0x1e89fba1, 0x1ee8b261, 0x9e5d25f0 + data4 0x9ef222cb, 0x9ef135ec, 0x1ea04b9a, 0x9f04291f + data4 0x9e969254, 0x9ee32f08, 0x9ed909d3, 0x9e362640 + data4 0x9ec20735, 0x1e50131b, 0x9ed4e049, 0x1ee8e817 + data4 0x1e1e09c0, 0x9ea643c5, 0x9e5a1ab6, 0x9e389059 + data4 0x1e560947, 0x1d02b877, 0x1e4475ab, 0x9ea9aaf6 + data4 0x1e95bc5e, 0x1eaf6afd, 0x1d43067d, 0x9d043821 + data4 0x9e97baa9, 0x1de5c4f9, 0x9e9a0069, 0x9e1b9944 + data4 0x1eb13686, 0x9eb907eb, 0x1e059589, 0x1cbd0f93 + data4 0x9eb7e6ae, 0x1e9fa175, 0x1ee5bdf4, 0x1e8052f7 + data4 0x9c80d1e3, 0x1bfbe28e, 0x9e672b3b, 0x9ecacf19 + data4 0x9e3c04be, 0x1dfe8c5c, 0x1e1ba9cb, 0x1eb40b1e + data4 0x1ec7e7f6, 0x9d0d45b3, 0x1ef0113b, 0x9a155fa3 + data4 0x1e28ec3b, 0x1e7ca8df, 0x9d2f91b4, 0x1eccd9ed + data4 0x9ed943bc, 0x9ccaab19, 0x9e8a5c58, 0x1ec3bca8 + data4 0x1ed78dc7, 0x9ed391a8, 0x9e938f6e, 0x9ec4a030 + data4 0x9e80346e, 0x1e7a4686, 0x9e284315, 0x9e39584c + data4 0x1ebdc9b4, 0x9e9cfce5, 0x9ef55c65, 0x1e2941e7 + data4 0x9efbe59f, 0x1d87c41b, 0x1e40befc, 0x1e3d05b5 + data4 0x1de9ea67, 0x1ec9a21c, 0x1decb69a, 0x1df6e75a + data4 0x9e8030ab, 0x9db20540, 0x9ef1e977, 0x1e3cdc43 + data4 0x1e0492b0, 0x9e91d872, 0x1e775346, 0x9e939978 + data4 0x1eb2714e, 0x1e49a203, 0x9e10195a, 0x1ef1ffc3 + data4 0x9ea8b709, 0x9e832e27, 0x1ed5ac3b, 0x1edb20a6 + data4 0x1e4dbd4e, 0x1efbb932, 0x1d8170ec, 0x1e6c4849 + data4 0x1f008e17, 0x1e8000c4, 0x1d855ecf, 0x9e37cb85 + data4 0x1ecffdf5, 0x1eba6519, 0x9edbe600, 0x1ea3e5e7 + data4 0x1ed4fb39, 0x1f00be77, 0x1e6f4484, 0x9e9e7107 + data4 0x9e30b29d, 0x9ee6e174, 0x1e3a2656, 0x9dd72f3f + data4 0x9ee12138, 0x1ed16fed, 0x9ece8a02, 0x9ca5b249 + data4 0x9eafd508, 0x9ef0e9fc, 0x1d1307ac, 0x1eecee20 + data4 0x1cf60c6f, 0x9d556216, 0x9eaed175, 0x9ec919f4 + data4 0x1ec2c988, 0x1cd82772, 0x9dc99456, 0x1eab0467 + data4 0x1e89b36f, 0x1c757944, 0x1eef9abd, 0x9e98664d +LOCAL_OBJECT_END(D_table) + + +.section .text +GLOBAL_LIBM_ENTRY(cbrtl) + +{ .mfi + getf.sig GR_ARGSIG = f8 + // will continue on main path only for normal/denormal numbers + // all other values will be filtered out and will exit early + fclass.nm.unc p12, p7 = f8, 0x1b + // GR_ADDR = pointer to C_1...C_6 followed by T_table + addl GR_ADDR = @ltoff(poly_coeffs), gp +} +{ .mfi + // GR_BIAS23 = 2/3*bias -63 = 0xaaaa-0x3f = 0xaa6b + mov GR_BIAS23 = 0xaa6b + // normalize a + fma.s1 FR_XNORM = f8, f1, f0 + // GR_D_ADDR = pointer to D table + addl GR_D_ADDR = @ltoff(D_table), gp +} +;; + +{ .mmf + // load start address for C_1...C_6 followed by T_table + ld8 GR_C_START = [ GR_ADDR ] + // load start address of D table + ld8 GR_D_START = [ GR_D_ADDR ] + // y = frcpa(a) + frcpa.s1 FR_RCP, p6 = f1, f8 +} +;; + +{ .mmi + // get normalized significand + getf.sig GR_NORMSIG = FR_XNORM + // get exponent + getf.exp GR_NORMEXPSGN = FR_XNORM + (p7) cmp.eq p12, p0 = GR_ARGSIG, r0 +} +;; + +{ .mii + // load C_1 + ldfe FR_C1 = [ GR_C_START ], 16 + mov GR_SGNMASK = 0x20000 + nop.i 0 +} +;; + +{ .mfb + // load C_2 + ldfe FR_C2 = [ GR_C_START ], 16 + (p12) fma.s0 f8 = f8, f1, f0 + // NaN/Infinities exit early + (p12) br.ret.spnt b0 +} +;; + +{ .mfi + // load C_3, C_4 + ldfpd FR_C3, FR_C4 = [ GR_C_START ], 16 + // y = frcpa(a), set flags and result when argument is 0 + // only used when p6=0 + frcpa.s0 f8, p0 = f1, f8 + nop.i 0 +} +;; + +{ .mii + // get GR_SIGN = sign + and GR_SIGN = GR_NORMEXPSGN, GR_SGNMASK + // eliminate leading 1 from GR_NORMSIG = 2nd table index + shl GR_INDEX2 = GR_NORMSIG, 1 + // eliminate sign from exponent + andcm GR_NORMEXP = GR_NORMEXPSGN, GR_SGNMASK +} +;; + +{ .mfi + // load C_5, C_6 + (p6) ldfpd FR_C5, FR_C6 = [ GR_C_START ], 16 + // r = 1-a*y + (p6) fnma.s1 FR_R = FR_RCP, FR_XNORM, f1 + // Start computation of floor(exponent/3) by + // computing (2^20+2)/3*exponent = exponent*0x55556 + // 1: exponent* = 5; + // (2^{16}-1)/3 = 0x5555: + // will form 0x5555*exponent by using shladd's + shladd GR_EXP5 = GR_NORMEXP, 2, GR_NORMEXP +} +;; + +{ .mib + // Next several integer steps compute floor(exponent/3) + // GR_TMP1 = (5*expon)*16 + shladd GR_TMP1 = GR_EXP5, 4, r0 + // GR_EXP3 = 3*exponent + shladd GR_EXP3 = GR_NORMEXP, 1, GR_NORMEXP + nop.b 0 +} +;; + +{ .mmi + // GR_EXP6 = 6*exponent + shladd GR_EXP6 = GR_EXP3, 1, r0 + // GR_EXP17 = 17*expon + add GR_EXP17 = GR_EXP5, GR_TMP1 + // GR_IX2 = 2nd table index (8 bits) + shr.u GR_IX2 = GR_INDEX2, 56 +} +;; + +{ .mmi + // adjust T_table pointer by 2nd index + shladd GR_T_INDEX = GR_IX2, 3, GR_C_START + // adjust D_table pointer by 2nd index + shladd GR_D_INDEX = GR_IX2, 2, GR_D_START + // GR_TMP2 = (17*expon)*16^2 + shl GR_TMP2 = GR_EXP17, 8 +} +;; + +{ .mmi + // GR_TMP3 = expon*(2^16-1)/3 + add GR_TMP3 = GR_EXP17, GR_TMP2 +;; + // GR_TMP4 = expon*(2^20+2)/3 = expon*0x55556 + shladd GR_TMP4 = GR_TMP3, 4, GR_EXP6 + nop.i 0 +} +;; + +{ .mii + nop.m 0 + // GR_EXP_RES = floor(expon/3) + shr.u GR_EXP_RES = GR_TMP4, 20 + nop.i 0 +} +;; + +{ .mmi + nop.m 0 + // r16 = 3*exponent + shladd r16 = GR_EXP_RES, 1, GR_EXP_RES + // bias exponent + add GR_EXPBIAS = GR_BIAS23, GR_EXP_RES +} +;; + +{ .mmi + // get remainder of exponent/3 + sub GR_EXP_MOD_3 = GR_NORMEXP, r16 +;; + // add sign to exponent + or GR_EXPSIGNRES = GR_EXPBIAS, GR_SIGN + // remainder << = 8 + shl GR_REMTMP = GR_EXP_MOD_3, 8 +} +;; + +{ .mfi + // adjust D_table pointer by 1st index + shladd GR_IX_D = GR_REMTMP, 2, GR_D_INDEX + // P_1 = C_1+C_2*r + (p6) fma.s1 FR_P1 = FR_C2, FR_R, FR_C1 + // adjust T_table pointer by 1st index + shladd GR_IX_T = GR_REMTMP, 3, GR_T_INDEX +} +{ .mfi + // FR_SGNEXP = sign*2^{exponent/3} + (p6) setf.exp FR_SGNEXP = GR_EXPSIGNRES + // r^2 = r*r + (p6) fma.s1 FR_R2 = FR_R, FR_R, f0 + nop.i 0 +} +;; + +{ .mfi + // load D + (p6) ldfs FR_D = [ GR_IX_D ] + // P_2 = C_3+C_4*r + (p6) fma.s1 FR_P2 = FR_C4, FR_R, FR_C3 + nop.i 0 +} +{ .mfi + // load T + (p6) ldf8 FR_T = [ GR_IX_T ] + // P_3 = C_5+C_6*r + (p6) fma.s1 FR_P3 = FR_C6, FR_R, FR_C5 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + // P_4 = D-r*P_1 + (p6) fnma.s1 FR_P4 = FR_R, FR_P1, FR_D + nop.i 0 +} +{ .mfi + nop.m 0 + // r^3 = r*r^2 + (p6) fma.s1 FR_R3 = FR_R, FR_R2, f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + // P_5 = P_2+r2*P_3 + (p6) fma.s1 FR_P5 = FR_R2, FR_P3, FR_P2 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + // T = T*(sign*2^{exponent/3}) + (p6) fma.s1 FR_TF = FR_T, FR_SGNEXP, f0 + nop.i 0 +} +{ .mfi + nop.m 0 + // P = P_4-r3*P_5 + (p6) fnma.s1 FR_P = FR_R3, FR_P5, FR_P4 + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + // result = T+T*p + (p6) fma.s0 f8 = FR_TF, FR_P, FR_TF + br.ret.sptk b0 +} +;; + +GLOBAL_LIBM_END(cbrtl) + + diff --git a/sysdeps/ia64/fpu/s_ceil.S b/sysdeps/ia64/fpu/s_ceil.S new file mode 100644 index 0000000000..d1d2980618 --- /dev/null +++ b/sysdeps/ia64/fpu/s_ceil.S @@ -0,0 +1,224 @@ +.file "ceil.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 06/13/00 Improved speed +// 06/27/00 Eliminated incorrect invalid flag setting +// 05/20/02 Cleaned up namespace and sf0 syntax +// 01/28/03 Improved performance +//============================================================== + +// API +//============================================================== +// double ceil(double x) +//============================================================== + +// general input registers: +// r14 - r19 + +rSignexp = r14 +rExp = r15 +rExpMask = r16 +rBigexp = r17 +rM1 = r18 +rSignexpM1 = r19 + +// floating-point registers: +// f8 - f13 + +fXInt = f9 +fNormX = f10 +fTmp = f11 +fAdj = f12 +fPreResult = f13 + +// predicate registers used: +// p6 - p10 + +// Overview of operation +//============================================================== +// double ceil(double x) +// Return an integer value (represented as a double) that is the smallest +// value not less than x +// This is x rounded toward +infinity to an integral value. +// Inexact is set if x != ceil(x) +//============================================================== + +// double_extended +// if the exponent is > 1003e => 3F(true) = 63(decimal) +// we have a significand of 64 bits 1.63-bits. +// If we multiply by 2^63, we no longer have a fractional part +// So input is an integer value already. + +// double +// if the exponent is >= 10033 => 34(true) = 52(decimal) +// 34 + 3ff = 433 +// we have a significand of 53 bits 1.52-bits. (implicit 1) +// If we multiply by 2^52, we no longer have a fractional part +// So input is an integer value already. + +// single +// if the exponent is > 10016 => 17(true) = 23(decimal) +// we have a significand of 24 bits 1.23-bits. (implicit 1) +// If we multiply by 2^23, we no longer have a fractional part +// So input is an integer value already. + + +.section .text +GLOBAL_LIBM_ENTRY(ceil) + +{ .mfi + getf.exp rSignexp = f8 // Get signexp, recompute if unorm + fclass.m p7,p0 = f8, 0x0b // Test x unorm + addl rBigexp = 0x10033, r0 // Set exponent at which is integer +} +{ .mfi + mov rM1 = -1 // Set all ones + fcvt.fx.trunc.s1 fXInt = f8 // Convert to int in significand + mov rExpMask = 0x1FFFF // Form exponent mask +} +;; + +{ .mfi + mov rSignexpM1 = 0x2FFFF // Form signexp of -1 + fcmp.lt.s1 p8,p9 = f8, f0 // Test x < 0 + nop.i 0 +} +{ .mfb + setf.sig fTmp = rM1 // Make const for setting inexact + fnorm.s1 fNormX = f8 // Normalize input +(p7) br.cond.spnt CEIL_UNORM // Branch if x unorm +} +;; + +CEIL_COMMON: +// Return here from CEIL_UNORM +{ .mfi + nop.m 0 + fclass.m p6,p0 = f8, 0x1e7 // Test x natval, nan, inf, 0 + nop.i 0 +} +;; + +.pred.rel "mutex",p8,p9 +{ .mfi + nop.m 0 +(p8) fma.s1 fAdj = f0, f0, f0 // If x < 0, adjustment is 0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p9) fma.s1 fAdj = f1, f1, f0 // If x > 0, adjustment is +1 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcvt.xf fPreResult = fXInt // trunc(x) + nop.i 0 +} +{ .mfb + nop.m 0 +(p6) fma.d.s0 f8 = f8, f1, f0 // Result if x natval, nan, inf, 0 +(p6) br.ret.spnt b0 // Exit if x natval, nan, inf, 0 +} +;; + +{ .mmi + and rExp = rSignexp, rExpMask // Get biased exponent +;; + cmp.ge p7,p6 = rExp, rBigexp // Is |x| >= 2^52? +(p8) cmp.lt.unc p10,p0 = rSignexp, rSignexpM1 // Is -1 < x < 0? +} +;; + +// If -1 < x < 0, we turn off p6 and compute result as -0 +{ .mfi +(p10) cmp.ne p6,p0 = r0,r0 +(p10) fmerge.s f8 = fNormX, f0 + nop.i 0 +} +;; + +.pred.rel "mutex",p6,p7 +{ .mfi + nop.m 0 +(p6) fma.d.s0 f8 = fPreResult, f1, fAdj // Result if !int, |x| < 2^52 + nop.i 0 +} +{ .mfi + nop.m 0 +(p7) fma.d.s0 f8 = fNormX, f1, f0 // Result, if |x| >= 2^52 +(p10) cmp.eq p6,p0 = r0,r0 // If -1 < x < 0, turn on p6 again +} +;; + +{ .mfi + nop.m 0 +(p6) fcmp.eq.unc.s1 p8, p9 = fPreResult, fNormX // Is trunc(x) = x ? + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p9) fmpy.s0 fTmp = fTmp, fTmp // Dummy to set inexact + nop.i 0 +} +{ .mfb + nop.m 0 +(p8) fma.d.s0 f8 = fNormX, f1, f0 // If x int, result normalized x + br.ret.sptk b0 // Exit main path, 0 < |x| < 2^52 +} +;; + + +CEIL_UNORM: +// Here if x unorm +{ .mfb + getf.exp rSignexp = fNormX // Get signexp, recompute if unorm + fcmp.eq.s0 p7,p0 = f8, f0 // Dummy op to set denormal flag + br.cond.sptk CEIL_COMMON // Return to main path +} +;; + +GLOBAL_LIBM_END(ceil) diff --git a/sysdeps/ia64/fpu/s_ceilf.S b/sysdeps/ia64/fpu/s_ceilf.S new file mode 100644 index 0000000000..051534a202 --- /dev/null +++ b/sysdeps/ia64/fpu/s_ceilf.S @@ -0,0 +1,224 @@ +.file "ceilf.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 06/13/00 Improved speed +// 06/27/00 Eliminated incorrect invalid flag setting +// 05/20/02 Cleaned up namespace and sf0 syntax +// 01/28/03 Improved performance +//============================================================== + +// API +//============================================================== +// float ceilf(float x) +//============================================================== + +// general input registers: +// r14 - r19 + +rSignexp = r14 +rExp = r15 +rExpMask = r16 +rBigexp = r17 +rM1 = r18 +rSignexpM1 = r19 + +// floating-point registers: +// f8 - f13 + +fXInt = f9 +fNormX = f10 +fTmp = f11 +fAdj = f12 +fPreResult = f13 + +// predicate registers used: +// p6 - p10 + +// Overview of operation +//============================================================== +// float ceilf(float x) +// Return an integer value (represented as a float) that is the smallest +// value not less than x +// This is x rounded toward +infinity to an integral value. +// Inexact is set if x != ceilf(x) +//============================================================== + +// double_extended +// if the exponent is > 1003e => 3F(true) = 63(decimal) +// we have a significand of 64 bits 1.63-bits. +// If we multiply by 2^63, we no longer have a fractional part +// So input is an integer value already. + +// double +// if the exponent is >= 10033 => 34(true) = 52(decimal) +// 34 + 3ff = 433 +// we have a significand of 53 bits 1.52-bits. (implicit 1) +// If we multiply by 2^52, we no longer have a fractional part +// So input is an integer value already. + +// single +// if the exponent is > 10016 => 17(true) = 23(decimal) +// we have a significand of 24 bits 1.23-bits. (implicit 1) +// If we multiply by 2^23, we no longer have a fractional part +// So input is an integer value already. + + +.section .text +GLOBAL_LIBM_ENTRY(ceilf) + +{ .mfi + getf.exp rSignexp = f8 // Get signexp, recompute if unorm + fclass.m p7,p0 = f8, 0x0b // Test x unorm + addl rBigexp = 0x10016, r0 // Set exponent at which is integer +} +{ .mfi + mov rM1 = -1 // Set all ones + fcvt.fx.trunc.s1 fXInt = f8 // Convert to int in significand + mov rExpMask = 0x1FFFF // Form exponent mask +} +;; + +{ .mfi + mov rSignexpM1 = 0x2FFFF // Form signexp of -1 + fcmp.lt.s1 p8,p9 = f8, f0 // Test x < 0 + nop.i 0 +} +{ .mfb + setf.sig fTmp = rM1 // Make const for setting inexact + fnorm.s1 fNormX = f8 // Normalize input +(p7) br.cond.spnt CEIL_UNORM // Branch if x unorm +} +;; + +CEIL_COMMON: +// Return here from CEIL_UNORM +{ .mfi + nop.m 0 + fclass.m p6,p0 = f8, 0x1e7 // Test x natval, nan, inf, 0 + nop.i 0 +} +;; + +.pred.rel "mutex",p8,p9 +{ .mfi + nop.m 0 +(p8) fma.s1 fAdj = f0, f0, f0 // If x < 0, adjustment is 0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p9) fma.s1 fAdj = f1, f1, f0 // If x > 0, adjustment is +1 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcvt.xf fPreResult = fXInt // trunc(x) + nop.i 0 +} +{ .mfb + nop.m 0 +(p6) fma.s.s0 f8 = f8, f1, f0 // Result if x natval, nan, inf, 0 +(p6) br.ret.spnt b0 // Exit if x natval, nan, inf, 0 +} +;; + +{ .mmi + and rExp = rSignexp, rExpMask // Get biased exponent +;; + cmp.ge p7,p6 = rExp, rBigexp // Is |x| >= 2^23? +(p8) cmp.lt.unc p10,p0 = rSignexp, rSignexpM1 // Is -1 < x < 0? +} +;; + +// If -1 < x < 0, we turn off p6 and compute result as -0 +{ .mfi +(p10) cmp.ne p6,p0 = r0,r0 +(p10) fmerge.s f8 = fNormX, f0 + nop.i 0 +} +;; + +.pred.rel "mutex",p6,p7 +{ .mfi + nop.m 0 +(p6) fma.s.s0 f8 = fPreResult, f1, fAdj // Result if !int, |x| < 2^23 + nop.i 0 +} +{ .mfi + nop.m 0 +(p7) fma.s.s0 f8 = fNormX, f1, f0 // Result, if |x| >= 2^23 +(p10) cmp.eq p6,p0 = r0,r0 // If -1 < x < 0, turn on p6 again +} +;; + +{ .mfi + nop.m 0 +(p6) fcmp.eq.unc.s1 p8, p9 = fPreResult, fNormX // Is trunc(x) = x ? + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p9) fmpy.s0 fTmp = fTmp, fTmp // Dummy to set inexact + nop.i 0 +} +{ .mfb + nop.m 0 +(p8) fma.s.s0 f8 = fNormX, f1, f0 // If x int, result normalized x + br.ret.sptk b0 // Exit main path, 0 < |x| < 2^23 +} +;; + + +CEIL_UNORM: +// Here if x unorm +{ .mfb + getf.exp rSignexp = fNormX // Get signexp, recompute if unorm + fcmp.eq.s0 p7,p0 = f8, f0 // Dummy op to set denormal flag + br.cond.sptk CEIL_COMMON // Return to main path +} +;; + +GLOBAL_LIBM_END(ceilf) diff --git a/sysdeps/ia64/fpu/s_ceill.S b/sysdeps/ia64/fpu/s_ceill.S new file mode 100644 index 0000000000..71cb01d3fa --- /dev/null +++ b/sysdeps/ia64/fpu/s_ceill.S @@ -0,0 +1,224 @@ +.file "ceill.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 06/13/00 Improved speed +// 06/27/00 Eliminated incorrect invalid flag setting +// 05/20/02 Cleaned up namespace and sf0 syntax +// 01/28/03 Improved performance +//============================================================== + +// API +//============================================================== +// long double ceill(long double x) +//============================================================== + +// general input registers: +// r14 - r19 + +rSignexp = r14 +rExp = r15 +rExpMask = r16 +rBigexp = r17 +rM1 = r18 +rSignexpM1 = r19 + +// floating-point registers: +// f8 - f13 + +fXInt = f9 +fNormX = f10 +fTmp = f11 +fAdj = f12 +fPreResult = f13 + +// predicate registers used: +// p6 - p10 + +// Overview of operation +//============================================================== +// long double ceill(long double x) +// Return an integer value (represented as a long double) that is the smallest +// value not less than x +// This is x rounded toward +infinity to an integral value. +// Inexact is set if x != ceill(x) +//============================================================== + +// double_extended +// if the exponent is > 1003e => 3F(true) = 63(decimal) +// we have a significand of 64 bits 1.63-bits. +// If we multiply by 2^63, we no longer have a fractional part +// So input is an integer value already. + +// double +// if the exponent is >= 10033 => 34(true) = 52(decimal) +// 34 + 3ff = 433 +// we have a significand of 53 bits 1.52-bits. (implicit 1) +// If we multiply by 2^52, we no longer have a fractional part +// So input is an integer value already. + +// single +// if the exponent is > 10016 => 17(true) = 23(decimal) +// we have a significand of 24 bits 1.23-bits. (implicit 1) +// If we multiply by 2^23, we no longer have a fractional part +// So input is an integer value already. + + +.section .text +GLOBAL_LIBM_ENTRY(ceill) + +{ .mfi + getf.exp rSignexp = f8 // Get signexp, recompute if unorm + fclass.m p7,p0 = f8, 0x0b // Test x unorm + addl rBigexp = 0x1003e, r0 // Set exponent at which is integer +} +{ .mfi + mov rM1 = -1 // Set all ones + fcvt.fx.trunc.s1 fXInt = f8 // Convert to int in significand + mov rExpMask = 0x1FFFF // Form exponent mask +} +;; + +{ .mfi + mov rSignexpM1 = 0x2FFFF // Form signexp of -1 + fcmp.lt.s1 p8,p9 = f8, f0 // Test x < 0 + nop.i 0 +} +{ .mfb + setf.sig fTmp = rM1 // Make const for setting inexact + fnorm.s1 fNormX = f8 // Normalize input +(p7) br.cond.spnt CEIL_UNORM // Branch if x unorm +} +;; + +CEIL_COMMON: +// Return here from CEIL_UNORM +{ .mfi + nop.m 0 + fclass.m p6,p0 = f8, 0x1e7 // Test x natval, nan, inf, 0 + nop.i 0 +} +;; + +.pred.rel "mutex",p8,p9 +{ .mfi + nop.m 0 +(p8) fma.s1 fAdj = f0, f0, f0 // If x < 0, adjustment is 0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p9) fma.s1 fAdj = f1, f1, f0 // If x > 0, adjustment is +1 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcvt.xf fPreResult = fXInt // trunc(x) + nop.i 0 +} +{ .mfb + nop.m 0 +(p6) fma.s0 f8 = f8, f1, f0 // Result if x natval, nan, inf, 0 +(p6) br.ret.spnt b0 // Exit if x natval, nan, inf, 0 +} +;; + +{ .mmi + and rExp = rSignexp, rExpMask // Get biased exponent +;; + cmp.ge p7,p6 = rExp, rBigexp // Is |x| >= 2^63? +(p8) cmp.lt.unc p10,p0 = rSignexp, rSignexpM1 // Is -1 < x < 0? +} +;; + +// If -1 < x < 0, we turn off p6 and compute result as -0 +{ .mfi +(p10) cmp.ne p6,p0 = r0,r0 +(p10) fmerge.s f8 = fNormX, f0 + nop.i 0 +} +;; + +.pred.rel "mutex",p6,p7 +{ .mfi + nop.m 0 +(p6) fma.s0 f8 = fPreResult, f1, fAdj // Result if !int, |x| < 2^63 + nop.i 0 +} +{ .mfi + nop.m 0 +(p7) fma.s0 f8 = fNormX, f1, f0 // Result, if |x| >= 2^63 +(p10) cmp.eq p6,p0 = r0,r0 // If -1 < x < 0, turn on p6 again +} +;; + +{ .mfi + nop.m 0 +(p6) fcmp.eq.unc.s1 p8, p9 = fPreResult, fNormX // Is trunc(x) = x ? + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p9) fmpy.s0 fTmp = fTmp, fTmp // Dummy to set inexact + nop.i 0 +} +{ .mfb + nop.m 0 +(p8) fma.s0 f8 = fNormX, f1, f0 // If x int, result normalized x + br.ret.sptk b0 // Exit main path, 0 < |x| < 2^63 +} +;; + + +CEIL_UNORM: +// Here if x unorm +{ .mfb + getf.exp rSignexp = fNormX // Get signexp, recompute if unorm + fcmp.eq.s0 p7,p0 = f8, f0 // Dummy op to set denormal flag + br.cond.sptk CEIL_COMMON // Return to main path +} +;; + +GLOBAL_LIBM_END(ceill) diff --git a/sysdeps/ia64/fpu/s_copysign.S b/sysdeps/ia64/fpu/s_copysign.S new file mode 100644 index 0000000000..0903565ff3 --- /dev/null +++ b/sysdeps/ia64/fpu/s_copysign.S @@ -0,0 +1,38 @@ +/* Copyright (C) 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 + 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. */ + +#include +#undef ret + +ENTRY (__copysign) +{ + fmerge.s fret0 = farg1, farg0 + br.ret.sptk.many rp +} +END (__copysign) + +strong_alias (__copysign, __copysignf) +strong_alias (__copysign, __copysignl) + +strong_alias (__copysign, __libm_copysign) +strong_alias (__copysign, __libm_copysignf) +strong_alias (__copysign, __libm_copysignl) + +weak_alias (__copysign, copysign) +weak_alias (__copysignf, copysignf) +weak_alias (__copysignl, copysignl) diff --git a/sysdeps/ia64/fpu/s_copysignf.S b/sysdeps/ia64/fpu/s_copysignf.S new file mode 100644 index 0000000000..055251d0d2 --- /dev/null +++ b/sysdeps/ia64/fpu/s_copysignf.S @@ -0,0 +1 @@ +/* __copysignf is in s_copysign.S. */ diff --git a/sysdeps/ia64/fpu/s_copysignl.S b/sysdeps/ia64/fpu/s_copysignl.S new file mode 100644 index 0000000000..e772372678 --- /dev/null +++ b/sysdeps/ia64/fpu/s_copysignl.S @@ -0,0 +1 @@ +/* __copysignl is in s_copysign.S. */ diff --git a/sysdeps/ia64/fpu/s_cos.S b/sysdeps/ia64/fpu/s_cos.S new file mode 100644 index 0000000000..fc121fce19 --- /dev/null +++ b/sysdeps/ia64/fpu/s_cos.S @@ -0,0 +1,768 @@ +.file "sincos.s" + + +// Copyright (c) 2000 - 2005, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 04/02/00 Unwind support added. +// 06/16/00 Updated tables to enforce symmetry +// 08/31/00 Saved 2 cycles in main path, and 9 in other paths. +// 09/20/00 The updated tables regressed to an old version, so reinstated them +// 10/18/00 Changed one table entry to ensure symmetry +// 01/03/01 Improved speed, fixed flag settings for small arguments. +// 02/18/02 Large arguments processing routine excluded +// 05/20/02 Cleaned up namespace and sf0 syntax +// 06/03/02 Insure inexact flag set for large arg result +// 09/05/02 Work range is widened by reduction strengthen (3 parts of Pi/16) +// 02/10/03 Reordered header: .section, .global, .proc, .align +// 08/08/03 Improved performance +// 10/28/04 Saved sincos_r_sincos to avoid clobber by dynamic loader +// 03/31/05 Reformatted delimiters between data tables + +// API +//============================================================== +// double sin( double x); +// double cos( double x); +// +// Overview of operation +//============================================================== +// +// Step 1 +// ====== +// Reduce x to region -1/2*pi/2^k ===== 0 ===== +1/2*pi/2^k where k=4 +// divide x by pi/2^k. +// Multiply by 2^k/pi. +// nfloat = Round result to integer (round-to-nearest) +// +// r = x - nfloat * pi/2^k +// Do this as ((((x - nfloat * HIGH(pi/2^k))) - +// nfloat * LOW(pi/2^k)) - +// nfloat * LOWEST(pi/2^k) for increased accuracy. +// pi/2^k is stored as two numbers that when added make pi/2^k. +// pi/2^k = HIGH(pi/2^k) + LOW(pi/2^k) +// HIGH and LOW parts are rounded to zero values, +// and LOWEST is rounded to nearest one. +// +// x = (nfloat * pi/2^k) + r +// r is small enough that we can use a polynomial approximation +// and is referred to as the reduced argument. +// +// Step 3 +// ====== +// Take the unreduced part and remove the multiples of 2pi. +// So nfloat = nfloat (with lower k+1 bits cleared) + lower k+1 bits +// +// nfloat (with lower k+1 bits cleared) is a multiple of 2^(k+1) +// N * 2^(k+1) +// nfloat * pi/2^k = N * 2^(k+1) * pi/2^k + (lower k+1 bits) * pi/2^k +// nfloat * pi/2^k = N * 2 * pi + (lower k+1 bits) * pi/2^k +// nfloat * pi/2^k = N2pi + M * pi/2^k +// +// +// Sin(x) = Sin((nfloat * pi/2^k) + r) +// = Sin(nfloat * pi/2^k) * Cos(r) + Cos(nfloat * pi/2^k) * Sin(r) +// +// Sin(nfloat * pi/2^k) = Sin(N2pi + Mpi/2^k) +// = Sin(N2pi)Cos(Mpi/2^k) + Cos(N2pi)Sin(Mpi/2^k) +// = Sin(Mpi/2^k) +// +// Cos(nfloat * pi/2^k) = Cos(N2pi + Mpi/2^k) +// = Cos(N2pi)Cos(Mpi/2^k) + Sin(N2pi)Sin(Mpi/2^k) +// = Cos(Mpi/2^k) +// +// Sin(x) = Sin(Mpi/2^k) Cos(r) + Cos(Mpi/2^k) Sin(r) +// +// +// Step 4 +// ====== +// 0 <= M < 2^(k+1) +// There are 2^(k+1) Sin entries in a table. +// There are 2^(k+1) Cos entries in a table. +// +// Get Sin(Mpi/2^k) and Cos(Mpi/2^k) by table lookup. +// +// +// Step 5 +// ====== +// Calculate Cos(r) and Sin(r) by polynomial approximation. +// +// Cos(r) = 1 + r^2 q1 + r^4 q2 + r^6 q3 + ... = Series for Cos +// Sin(r) = r + r^3 p1 + r^5 p2 + r^7 p3 + ... = Series for Sin +// +// and the coefficients q1, q2, ... and p1, p2, ... are stored in a table +// +// +// Calculate +// Sin(x) = Sin(Mpi/2^k) Cos(r) + Cos(Mpi/2^k) Sin(r) +// +// as follows +// +// S[m] = Sin(Mpi/2^k) and C[m] = Cos(Mpi/2^k) +// rsq = r*r +// +// +// P = p1 + r^2p2 + r^4p3 + r^6p4 +// Q = q1 + r^2q2 + r^4q3 + r^6q4 +// +// rcub = r * rsq +// Sin(r) = r + rcub * P +// = r + r^3p1 + r^5p2 + r^7p3 + r^9p4 + ... = Sin(r) +// +// The coefficients are not exactly these values, but almost. +// +// p1 = -1/6 = -1/3! +// p2 = 1/120 = 1/5! +// p3 = -1/5040 = -1/7! +// p4 = 1/362889 = 1/9! +// +// P = r + rcub * P +// +// Answer = S[m] Cos(r) + [Cm] P +// +// Cos(r) = 1 + rsq Q +// Cos(r) = 1 + r^2 Q +// Cos(r) = 1 + r^2 (q1 + r^2q2 + r^4q3 + r^6q4) +// Cos(r) = 1 + r^2q1 + r^4q2 + r^6q3 + r^8q4 + ... +// +// S[m] Cos(r) = S[m](1 + rsq Q) +// S[m] Cos(r) = S[m] + Sm rsq Q +// S[m] Cos(r) = S[m] + s_rsq Q +// Q = S[m] + s_rsq Q +// +// Then, +// +// Answer = Q + C[m] P + + +// Registers used +//============================================================== +// general input registers: +// r14 -> r26 +// r32 -> r35 + +// predicate registers used: +// p6 -> p11 + +// floating-point registers used +// f9 -> f15 +// f32 -> f61 + +// Assembly macros +//============================================================== +sincos_NORM_f8 = f9 +sincos_W = f10 +sincos_int_Nfloat = f11 +sincos_Nfloat = f12 + +sincos_r = f13 +sincos_rsq = f14 +sincos_rcub = f15 +sincos_save_tmp = f15 + +sincos_Inv_Pi_by_16 = f32 +sincos_Pi_by_16_1 = f33 +sincos_Pi_by_16_2 = f34 + +sincos_Inv_Pi_by_64 = f35 + +sincos_Pi_by_16_3 = f36 + +sincos_r_exact = f37 + +sincos_Sm = f38 +sincos_Cm = f39 + +sincos_P1 = f40 +sincos_Q1 = f41 +sincos_P2 = f42 +sincos_Q2 = f43 +sincos_P3 = f44 +sincos_Q3 = f45 +sincos_P4 = f46 +sincos_Q4 = f47 + +sincos_P_temp1 = f48 +sincos_P_temp2 = f49 + +sincos_Q_temp1 = f50 +sincos_Q_temp2 = f51 + +sincos_P = f52 +sincos_Q = f53 + +sincos_srsq = f54 + +sincos_SIG_INV_PI_BY_16_2TO61 = f55 +sincos_RSHF_2TO61 = f56 +sincos_RSHF = f57 +sincos_2TOM61 = f58 +sincos_NFLOAT = f59 +sincos_W_2TO61_RSH = f60 + +fp_tmp = f61 + +///////////////////////////////////////////////////////////// + +sincos_GR_sig_inv_pi_by_16 = r14 +sincos_GR_rshf_2to61 = r15 +sincos_GR_rshf = r16 +sincos_GR_exp_2tom61 = r17 +sincos_GR_n = r18 +sincos_GR_m = r19 +sincos_GR_32m = r19 +sincos_GR_all_ones = r19 +sincos_AD_1 = r20 +sincos_AD_2 = r21 +sincos_exp_limit = r22 +sincos_r_signexp = r23 +sincos_r_17_ones = r24 +sincos_r_sincos = r25 +sincos_r_exp = r26 + +GR_SAVE_PFS = r33 +GR_SAVE_B0 = r34 +GR_SAVE_GP = r35 +GR_SAVE_r_sincos = r36 + + +RODATA + +// Pi/16 parts +.align 16 +LOCAL_OBJECT_START(double_sincos_pi) + data8 0xC90FDAA22168C234, 0x00003FFC // pi/16 1st part + data8 0xC4C6628B80DC1CD1, 0x00003FBC // pi/16 2nd part + data8 0xA4093822299F31D0, 0x00003F7A // pi/16 3rd part +LOCAL_OBJECT_END(double_sincos_pi) + +// Coefficients for polynomials +LOCAL_OBJECT_START(double_sincos_pq_k4) + data8 0x3EC71C963717C63A // P4 + data8 0x3EF9FFBA8F191AE6 // Q4 + data8 0xBF2A01A00F4E11A8 // P3 + data8 0xBF56C16C05AC77BF // Q3 + data8 0x3F8111111110F167 // P2 + data8 0x3FA555555554DD45 // Q2 + data8 0xBFC5555555555555 // P1 + data8 0xBFDFFFFFFFFFFFFC // Q1 +LOCAL_OBJECT_END(double_sincos_pq_k4) + +// Sincos table (S[m], C[m]) +LOCAL_OBJECT_START(double_sin_cos_beta_k4) + +data8 0x0000000000000000 , 0x00000000 // sin( 0 pi/16) S0 +data8 0x8000000000000000 , 0x00003fff // cos( 0 pi/16) C0 +// +data8 0xc7c5c1e34d3055b3 , 0x00003ffc // sin( 1 pi/16) S1 +data8 0xfb14be7fbae58157 , 0x00003ffe // cos( 1 pi/16) C1 +// +data8 0xc3ef1535754b168e , 0x00003ffd // sin( 2 pi/16) S2 +data8 0xec835e79946a3146 , 0x00003ffe // cos( 2 pi/16) C2 +// +data8 0x8e39d9cd73464364 , 0x00003ffe // sin( 3 pi/16) S3 +data8 0xd4db3148750d181a , 0x00003ffe // cos( 3 pi/16) C3 +// +data8 0xb504f333f9de6484 , 0x00003ffe // sin( 4 pi/16) S4 +data8 0xb504f333f9de6484 , 0x00003ffe // cos( 4 pi/16) C4 +// +data8 0xd4db3148750d181a , 0x00003ffe // sin( 5 pi/16) C3 +data8 0x8e39d9cd73464364 , 0x00003ffe // cos( 5 pi/16) S3 +// +data8 0xec835e79946a3146 , 0x00003ffe // sin( 6 pi/16) C2 +data8 0xc3ef1535754b168e , 0x00003ffd // cos( 6 pi/16) S2 +// +data8 0xfb14be7fbae58157 , 0x00003ffe // sin( 7 pi/16) C1 +data8 0xc7c5c1e34d3055b3 , 0x00003ffc // cos( 7 pi/16) S1 +// +data8 0x8000000000000000 , 0x00003fff // sin( 8 pi/16) C0 +data8 0x0000000000000000 , 0x00000000 // cos( 8 pi/16) S0 +// +data8 0xfb14be7fbae58157 , 0x00003ffe // sin( 9 pi/16) C1 +data8 0xc7c5c1e34d3055b3 , 0x0000bffc // cos( 9 pi/16) -S1 +// +data8 0xec835e79946a3146 , 0x00003ffe // sin(10 pi/16) C2 +data8 0xc3ef1535754b168e , 0x0000bffd // cos(10 pi/16) -S2 +// +data8 0xd4db3148750d181a , 0x00003ffe // sin(11 pi/16) C3 +data8 0x8e39d9cd73464364 , 0x0000bffe // cos(11 pi/16) -S3 +// +data8 0xb504f333f9de6484 , 0x00003ffe // sin(12 pi/16) S4 +data8 0xb504f333f9de6484 , 0x0000bffe // cos(12 pi/16) -S4 +// +data8 0x8e39d9cd73464364 , 0x00003ffe // sin(13 pi/16) S3 +data8 0xd4db3148750d181a , 0x0000bffe // cos(13 pi/16) -C3 +// +data8 0xc3ef1535754b168e , 0x00003ffd // sin(14 pi/16) S2 +data8 0xec835e79946a3146 , 0x0000bffe // cos(14 pi/16) -C2 +// +data8 0xc7c5c1e34d3055b3 , 0x00003ffc // sin(15 pi/16) S1 +data8 0xfb14be7fbae58157 , 0x0000bffe // cos(15 pi/16) -C1 +// +data8 0x0000000000000000 , 0x00000000 // sin(16 pi/16) S0 +data8 0x8000000000000000 , 0x0000bfff // cos(16 pi/16) -C0 +// +data8 0xc7c5c1e34d3055b3 , 0x0000bffc // sin(17 pi/16) -S1 +data8 0xfb14be7fbae58157 , 0x0000bffe // cos(17 pi/16) -C1 +// +data8 0xc3ef1535754b168e , 0x0000bffd // sin(18 pi/16) -S2 +data8 0xec835e79946a3146 , 0x0000bffe // cos(18 pi/16) -C2 +// +data8 0x8e39d9cd73464364 , 0x0000bffe // sin(19 pi/16) -S3 +data8 0xd4db3148750d181a , 0x0000bffe // cos(19 pi/16) -C3 +// +data8 0xb504f333f9de6484 , 0x0000bffe // sin(20 pi/16) -S4 +data8 0xb504f333f9de6484 , 0x0000bffe // cos(20 pi/16) -S4 +// +data8 0xd4db3148750d181a , 0x0000bffe // sin(21 pi/16) -C3 +data8 0x8e39d9cd73464364 , 0x0000bffe // cos(21 pi/16) -S3 +// +data8 0xec835e79946a3146 , 0x0000bffe // sin(22 pi/16) -C2 +data8 0xc3ef1535754b168e , 0x0000bffd // cos(22 pi/16) -S2 +// +data8 0xfb14be7fbae58157 , 0x0000bffe // sin(23 pi/16) -C1 +data8 0xc7c5c1e34d3055b3 , 0x0000bffc // cos(23 pi/16) -S1 +// +data8 0x8000000000000000 , 0x0000bfff // sin(24 pi/16) -C0 +data8 0x0000000000000000 , 0x00000000 // cos(24 pi/16) S0 +// +data8 0xfb14be7fbae58157 , 0x0000bffe // sin(25 pi/16) -C1 +data8 0xc7c5c1e34d3055b3 , 0x00003ffc // cos(25 pi/16) S1 +// +data8 0xec835e79946a3146 , 0x0000bffe // sin(26 pi/16) -C2 +data8 0xc3ef1535754b168e , 0x00003ffd // cos(26 pi/16) S2 +// +data8 0xd4db3148750d181a , 0x0000bffe // sin(27 pi/16) -C3 +data8 0x8e39d9cd73464364 , 0x00003ffe // cos(27 pi/16) S3 +// +data8 0xb504f333f9de6484 , 0x0000bffe // sin(28 pi/16) -S4 +data8 0xb504f333f9de6484 , 0x00003ffe // cos(28 pi/16) S4 +// +data8 0x8e39d9cd73464364 , 0x0000bffe // sin(29 pi/16) -S3 +data8 0xd4db3148750d181a , 0x00003ffe // cos(29 pi/16) C3 +// +data8 0xc3ef1535754b168e , 0x0000bffd // sin(30 pi/16) -S2 +data8 0xec835e79946a3146 , 0x00003ffe // cos(30 pi/16) C2 +// +data8 0xc7c5c1e34d3055b3 , 0x0000bffc // sin(31 pi/16) -S1 +data8 0xfb14be7fbae58157 , 0x00003ffe // cos(31 pi/16) C1 +// +data8 0x0000000000000000 , 0x00000000 // sin(32 pi/16) S0 +data8 0x8000000000000000 , 0x00003fff // cos(32 pi/16) C0 +LOCAL_OBJECT_END(double_sin_cos_beta_k4) + +.section .text + +//////////////////////////////////////////////////////// +// There are two entry points: sin and cos + + +// If from sin, p8 is true +// If from cos, p9 is true + +GLOBAL_IEEE754_ENTRY(sin) + +{ .mlx + getf.exp sincos_r_signexp = f8 + movl sincos_GR_sig_inv_pi_by_16 = 0xA2F9836E4E44152A // signd of 16/pi +} +{ .mlx + addl sincos_AD_1 = @ltoff(double_sincos_pi), gp + movl sincos_GR_rshf_2to61 = 0x47b8000000000000 // 1.1 2^(63+63-2) +} +;; + +{ .mfi + ld8 sincos_AD_1 = [sincos_AD_1] + fnorm.s0 sincos_NORM_f8 = f8 // Normalize argument + cmp.eq p8,p9 = r0, r0 // set p8 (clear p9) for sin +} +{ .mib + mov sincos_GR_exp_2tom61 = 0xffff-61 // exponent of scale 2^-61 + mov sincos_r_sincos = 0x0 // sincos_r_sincos = 0 for sin + br.cond.sptk _SINCOS_COMMON // go to common part +} +;; + +GLOBAL_IEEE754_END(sin) + +GLOBAL_IEEE754_ENTRY(cos) + +{ .mlx + getf.exp sincos_r_signexp = f8 + movl sincos_GR_sig_inv_pi_by_16 = 0xA2F9836E4E44152A // signd of 16/pi +} +{ .mlx + addl sincos_AD_1 = @ltoff(double_sincos_pi), gp + movl sincos_GR_rshf_2to61 = 0x47b8000000000000 // 1.1 2^(63+63-2) +} +;; + +{ .mfi + ld8 sincos_AD_1 = [sincos_AD_1] + fnorm.s1 sincos_NORM_f8 = f8 // Normalize argument + cmp.eq p9,p8 = r0, r0 // set p9 (clear p8) for cos +} +{ .mib + mov sincos_GR_exp_2tom61 = 0xffff-61 // exp of scale 2^-61 + mov sincos_r_sincos = 0x8 // sincos_r_sincos = 8 for cos + nop.b 999 +} +;; + +//////////////////////////////////////////////////////// +// All entry points end up here. +// If from sin, sincos_r_sincos is 0 and p8 is true +// If from cos, sincos_r_sincos is 8 = 2^(k-1) and p9 is true +// We add sincos_r_sincos to N + +///////////// Common sin and cos part ////////////////// +_SINCOS_COMMON: + + +// Form two constants we need +// 16/pi * 2^-2 * 2^63, scaled by 2^61 since we just loaded the significand +// 1.1000...000 * 2^(63+63-2) to right shift int(W) into the low significand +{ .mfi + setf.sig sincos_SIG_INV_PI_BY_16_2TO61 = sincos_GR_sig_inv_pi_by_16 + fclass.m p6,p0 = f8, 0xe7 // if x = 0,inf,nan + mov sincos_exp_limit = 0x1001a +} +{ .mlx + setf.d sincos_RSHF_2TO61 = sincos_GR_rshf_2to61 + movl sincos_GR_rshf = 0x43e8000000000000 // 1.1 2^63 +} // Right shift +;; + +// Form another constant +// 2^-61 for scaling Nfloat +// 0x1001a is register_bias + 27. +// So if f8 >= 2^27, go to large argument routines +{ .mfi + alloc r32 = ar.pfs, 1, 4, 0, 0 + fclass.m p11,p0 = f8, 0x0b // Test for x=unorm + mov sincos_GR_all_ones = -1 // For "inexect" constant create +} +{ .mib + setf.exp sincos_2TOM61 = sincos_GR_exp_2tom61 + nop.i 999 +(p6) br.cond.spnt _SINCOS_SPECIAL_ARGS +} +;; + +// Load the two pieces of pi/16 +// Form another constant +// 1.1000...000 * 2^63, the right shift constant +{ .mmb + ldfe sincos_Pi_by_16_1 = [sincos_AD_1],16 + setf.d sincos_RSHF = sincos_GR_rshf +(p11) br.cond.spnt _SINCOS_UNORM // Branch if x=unorm +} +;; + +_SINCOS_COMMON2: +// Return here if x=unorm +// Create constant used to set inexact +{ .mmi + ldfe sincos_Pi_by_16_2 = [sincos_AD_1],16 + setf.sig fp_tmp = sincos_GR_all_ones + nop.i 999 +};; + +// Select exponent (17 lsb) +{ .mfi + ldfe sincos_Pi_by_16_3 = [sincos_AD_1],16 + nop.f 999 + dep.z sincos_r_exp = sincos_r_signexp, 0, 17 +};; + +// Polynomial coefficients (Q4, P4, Q3, P3, Q2, Q1, P2, P1) loading +// p10 is true if we must call routines to handle larger arguments +// p10 is true if f8 exp is >= 0x1001a (2^27) +{ .mmb + ldfpd sincos_P4,sincos_Q4 = [sincos_AD_1],16 + cmp.ge p10,p0 = sincos_r_exp,sincos_exp_limit +(p10) br.cond.spnt _SINCOS_LARGE_ARGS // Go to "large args" routine +};; + +// sincos_W = x * sincos_Inv_Pi_by_16 +// Multiply x by scaled 16/pi and add large const to shift integer part of W to +// rightmost bits of significand +{ .mfi + ldfpd sincos_P3,sincos_Q3 = [sincos_AD_1],16 + fma.s1 sincos_W_2TO61_RSH = sincos_NORM_f8,sincos_SIG_INV_PI_BY_16_2TO61,sincos_RSHF_2TO61 + nop.i 999 +};; + +// get N = (int)sincos_int_Nfloat +// sincos_NFLOAT = Round_Int_Nearest(sincos_W) +// This is done by scaling back by 2^-61 and subtracting the shift constant +{ .mmf + getf.sig sincos_GR_n = sincos_W_2TO61_RSH + ldfpd sincos_P2,sincos_Q2 = [sincos_AD_1],16 + fms.s1 sincos_NFLOAT = sincos_W_2TO61_RSH,sincos_2TOM61,sincos_RSHF +};; + +// sincos_r = -sincos_Nfloat * sincos_Pi_by_16_1 + x +{ .mfi + ldfpd sincos_P1,sincos_Q1 = [sincos_AD_1],16 + fnma.s1 sincos_r = sincos_NFLOAT, sincos_Pi_by_16_1, sincos_NORM_f8 + nop.i 999 +};; + +// Add 2^(k-1) (which is in sincos_r_sincos) to N +{ .mmi + add sincos_GR_n = sincos_GR_n, sincos_r_sincos +;; +// Get M (least k+1 bits of N) + and sincos_GR_m = 0x1f,sincos_GR_n + nop.i 999 +};; + +// sincos_r = sincos_r -sincos_Nfloat * sincos_Pi_by_16_2 +{ .mfi + nop.m 999 + fnma.s1 sincos_r = sincos_NFLOAT, sincos_Pi_by_16_2, sincos_r + shl sincos_GR_32m = sincos_GR_m,5 +};; + +// Add 32*M to address of sin_cos_beta table +// For sin denorm. - set uflow +{ .mfi + add sincos_AD_2 = sincos_GR_32m, sincos_AD_1 +(p8) fclass.m.unc p10,p0 = f8,0x0b + nop.i 999 +};; + +// Load Sin and Cos table value using obtained index m (sincosf_AD_2) +{ .mfi + ldfe sincos_Sm = [sincos_AD_2],16 + nop.f 999 + nop.i 999 +};; + +// get rsq = r*r +{ .mfi + ldfe sincos_Cm = [sincos_AD_2] + fma.s1 sincos_rsq = sincos_r, sincos_r, f0 // r^2 = r*r + nop.i 999 +} +{ .mfi + nop.m 999 + fmpy.s0 fp_tmp = fp_tmp,fp_tmp // forces inexact flag + nop.i 999 +};; + +// sincos_r_exact = sincos_r -sincos_Nfloat * sincos_Pi_by_16_3 +{ .mfi + nop.m 999 + fnma.s1 sincos_r_exact = sincos_NFLOAT, sincos_Pi_by_16_3, sincos_r + nop.i 999 +};; + +// Polynomials calculation +// P_1 = P4*r^2 + P3 +// Q_2 = Q4*r^2 + Q3 +{ .mfi + nop.m 999 + fma.s1 sincos_P_temp1 = sincos_rsq, sincos_P4, sincos_P3 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 sincos_Q_temp1 = sincos_rsq, sincos_Q4, sincos_Q3 + nop.i 999 +};; + +// get rcube = r^3 and S[m]*r^2 +{ .mfi + nop.m 999 + fmpy.s1 sincos_srsq = sincos_Sm,sincos_rsq + nop.i 999 +} +{ .mfi + nop.m 999 + fmpy.s1 sincos_rcub = sincos_r_exact, sincos_rsq + nop.i 999 +};; + +// Polynomials calculation +// Q_2 = Q_1*r^2 + Q2 +// P_1 = P_1*r^2 + P2 +{ .mfi + nop.m 999 + fma.s1 sincos_Q_temp2 = sincos_rsq, sincos_Q_temp1, sincos_Q2 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 sincos_P_temp2 = sincos_rsq, sincos_P_temp1, sincos_P2 + nop.i 999 +};; + +// Polynomials calculation +// Q = Q_2*r^2 + Q1 +// P = P_2*r^2 + P1 +{ .mfi + nop.m 999 + fma.s1 sincos_Q = sincos_rsq, sincos_Q_temp2, sincos_Q1 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 sincos_P = sincos_rsq, sincos_P_temp2, sincos_P1 + nop.i 999 +};; + +// Get final P and Q +// Q = Q*S[m]*r^2 + S[m] +// P = P*r^3 + r +{ .mfi + nop.m 999 + fma.s1 sincos_Q = sincos_srsq,sincos_Q, sincos_Sm + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 sincos_P = sincos_rcub,sincos_P, sincos_r_exact + nop.i 999 +};; + +// If sin(denormal), force underflow to be set +{ .mfi + nop.m 999 +(p10) fmpy.d.s0 fp_tmp = sincos_NORM_f8,sincos_NORM_f8 + nop.i 999 +};; + +// Final calculation +// result = C[m]*P + Q +{ .mfb + nop.m 999 + fma.d.s0 f8 = sincos_Cm, sincos_P, sincos_Q + br.ret.sptk b0 // Exit for common path +};; + +////////// x = 0/Inf/NaN path ////////////////// +_SINCOS_SPECIAL_ARGS: +.pred.rel "mutex",p8,p9 +// sin(+/-0) = +/-0 +// sin(Inf) = NaN +// sin(NaN) = NaN +{ .mfi + nop.m 999 +(p8) fma.d.s0 f8 = f8, f0, f0 // sin(+/-0,NaN,Inf) + nop.i 999 +} +// cos(+/-0) = 1.0 +// cos(Inf) = NaN +// cos(NaN) = NaN +{ .mfb + nop.m 999 +(p9) fma.d.s0 f8 = f8, f0, f1 // cos(+/-0,NaN,Inf) + br.ret.sptk b0 // Exit for x = 0/Inf/NaN path +};; + +_SINCOS_UNORM: +// Here if x=unorm +{ .mfb + getf.exp sincos_r_signexp = sincos_NORM_f8 // Get signexp of x + fcmp.eq.s0 p11,p0 = f8, f0 // Dummy op to set denorm flag + br.cond.sptk _SINCOS_COMMON2 // Return to main path +};; + +GLOBAL_IEEE754_END(cos) + +//////////// x >= 2^27 - large arguments routine call //////////// +LOCAL_LIBM_ENTRY(__libm_callout_sincos) +_SINCOS_LARGE_ARGS: +.prologue +{ .mfi + mov GR_SAVE_r_sincos = sincos_r_sincos // Save sin or cos + nop.f 999 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS = ar.pfs +} +;; + +{ .mfi + mov GR_SAVE_GP = gp + nop.f 999 +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0 = b0 +} + +.body +{ .mbb + setf.sig sincos_save_tmp = sincos_GR_all_ones// inexact set + nop.b 999 +(p8) br.call.sptk.many b0 = __libm_sin_large# // sin(large_X) + +};; + +{ .mbb + cmp.ne p9,p0 = GR_SAVE_r_sincos, r0 // set p9 if cos + nop.b 999 +(p9) br.call.sptk.many b0 = __libm_cos_large# // cos(large_X) +};; + +{ .mfi + mov gp = GR_SAVE_GP + fma.d.s0 f8 = f8, f1, f0 // Round result to double + mov b0 = GR_SAVE_B0 +} +// Force inexact set +{ .mfi + nop.m 999 + fmpy.s0 sincos_save_tmp = sincos_save_tmp, sincos_save_tmp + nop.i 999 +};; + +{ .mib + nop.m 999 + mov ar.pfs = GR_SAVE_PFS + br.ret.sptk b0 // Exit for large arguments routine call +};; + +LOCAL_LIBM_END(__libm_callout_sincos) + +.type __libm_sin_large#,@function +.global __libm_sin_large# +.type __libm_cos_large#,@function +.global __libm_cos_large# + diff --git a/sysdeps/ia64/fpu/s_cosf.S b/sysdeps/ia64/fpu/s_cosf.S new file mode 100644 index 0000000000..bcdf1b0c02 --- /dev/null +++ b/sysdeps/ia64/fpu/s_cosf.S @@ -0,0 +1,717 @@ +.file "sincosf.s" + + +// Copyright (c) 2000 - 2005, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 04/02/00 Unwind support added. +// 06/16/00 Updated tables to enforce symmetry +// 08/31/00 Saved 2 cycles in main path, and 9 in other paths. +// 09/20/00 The updated tables regressed to an old version, so reinstated them +// 10/18/00 Changed one table entry to ensure symmetry +// 01/03/01 Improved speed, fixed flag settings for small arguments. +// 02/18/02 Large arguments processing routine excluded +// 05/20/02 Cleaned up namespace and sf0 syntax +// 06/03/02 Insure inexact flag set for large arg result +// 09/05/02 Single precision version is made using double precision one as base +// 02/10/03 Reordered header: .section, .global, .proc, .align +// 03/31/05 Reformatted delimiters between data tables +// +// API +//============================================================== +// float sinf( float x); +// float cosf( float x); +// +// Overview of operation +//============================================================== +// +// Step 1 +// ====== +// Reduce x to region -1/2*pi/2^k ===== 0 ===== +1/2*pi/2^k where k=4 +// divide x by pi/2^k. +// Multiply by 2^k/pi. +// nfloat = Round result to integer (round-to-nearest) +// +// r = x - nfloat * pi/2^k +// Do this as (x - nfloat * HIGH(pi/2^k)) - nfloat * LOW(pi/2^k) + +// for increased accuracy. +// pi/2^k is stored as two numbers that when added make pi/2^k. +// pi/2^k = HIGH(pi/2^k) + LOW(pi/2^k) +// HIGH part is rounded to zero, LOW - to nearest +// +// x = (nfloat * pi/2^k) + r +// r is small enough that we can use a polynomial approximation +// and is referred to as the reduced argument. +// +// Step 3 +// ====== +// Take the unreduced part and remove the multiples of 2pi. +// So nfloat = nfloat (with lower k+1 bits cleared) + lower k+1 bits +// +// nfloat (with lower k+1 bits cleared) is a multiple of 2^(k+1) +// N * 2^(k+1) +// nfloat * pi/2^k = N * 2^(k+1) * pi/2^k + (lower k+1 bits) * pi/2^k +// nfloat * pi/2^k = N * 2 * pi + (lower k+1 bits) * pi/2^k +// nfloat * pi/2^k = N2pi + M * pi/2^k +// +// +// Sin(x) = Sin((nfloat * pi/2^k) + r) +// = Sin(nfloat * pi/2^k) * Cos(r) + Cos(nfloat * pi/2^k) * Sin(r) +// +// Sin(nfloat * pi/2^k) = Sin(N2pi + Mpi/2^k) +// = Sin(N2pi)Cos(Mpi/2^k) + Cos(N2pi)Sin(Mpi/2^k) +// = Sin(Mpi/2^k) +// +// Cos(nfloat * pi/2^k) = Cos(N2pi + Mpi/2^k) +// = Cos(N2pi)Cos(Mpi/2^k) + Sin(N2pi)Sin(Mpi/2^k) +// = Cos(Mpi/2^k) +// +// Sin(x) = Sin(Mpi/2^k) Cos(r) + Cos(Mpi/2^k) Sin(r) +// +// +// Step 4 +// ====== +// 0 <= M < 2^(k+1) +// There are 2^(k+1) Sin entries in a table. +// There are 2^(k+1) Cos entries in a table. +// +// Get Sin(Mpi/2^k) and Cos(Mpi/2^k) by table lookup. +// +// +// Step 5 +// ====== +// Calculate Cos(r) and Sin(r) by polynomial approximation. +// +// Cos(r) = 1 + r^2 q1 + r^4 q2 = Series for Cos +// Sin(r) = r + r^3 p1 + r^5 p2 = Series for Sin +// +// and the coefficients q1, q2 and p1, p2 are stored in a table +// +// +// Calculate +// Sin(x) = Sin(Mpi/2^k) Cos(r) + Cos(Mpi/2^k) Sin(r) +// +// as follows +// +// S[m] = Sin(Mpi/2^k) and C[m] = Cos(Mpi/2^k) +// rsq = r*r +// +// +// P = P1 + r^2*P2 +// Q = Q1 + r^2*Q2 +// +// rcub = r * rsq +// Sin(r) = r + rcub * P +// = r + r^3p1 + r^5p2 = Sin(r) +// +// The coefficients are not exactly these values, but almost. +// +// p1 = -1/6 = -1/3! +// p2 = 1/120 = 1/5! +// p3 = -1/5040 = -1/7! +// p4 = 1/362889 = 1/9! +// +// P = r + r^3 * P +// +// Answer = S[m] Cos(r) + C[m] P +// +// Cos(r) = 1 + rsq Q +// Cos(r) = 1 + r^2 Q +// Cos(r) = 1 + r^2 (q1 + r^2q2) +// Cos(r) = 1 + r^2q1 + r^4q2 +// +// S[m] Cos(r) = S[m](1 + rsq Q) +// S[m] Cos(r) = S[m] + S[m] rsq Q +// S[m] Cos(r) = S[m] + s_rsq Q +// Q = S[m] + s_rsq Q +// +// Then, +// +// Answer = Q + C[m] P + + +// Registers used +//============================================================== +// general input registers: +// r14 -> r19 +// r32 -> r45 + +// predicate registers used: +// p6 -> p14 + +// floating-point registers used +// f9 -> f15 +// f32 -> f61 + +// Assembly macros +//============================================================== +sincosf_NORM_f8 = f9 +sincosf_W = f10 +sincosf_int_Nfloat = f11 +sincosf_Nfloat = f12 + +sincosf_r = f13 +sincosf_rsq = f14 +sincosf_rcub = f15 +sincosf_save_tmp = f15 + +sincosf_Inv_Pi_by_16 = f32 +sincosf_Pi_by_16_1 = f33 +sincosf_Pi_by_16_2 = f34 + +sincosf_Inv_Pi_by_64 = f35 + +sincosf_Pi_by_16_3 = f36 + +sincosf_r_exact = f37 + +sincosf_Sm = f38 +sincosf_Cm = f39 + +sincosf_P1 = f40 +sincosf_Q1 = f41 +sincosf_P2 = f42 +sincosf_Q2 = f43 +sincosf_P3 = f44 +sincosf_Q3 = f45 +sincosf_P4 = f46 +sincosf_Q4 = f47 + +sincosf_P_temp1 = f48 +sincosf_P_temp2 = f49 + +sincosf_Q_temp1 = f50 +sincosf_Q_temp2 = f51 + +sincosf_P = f52 +sincosf_Q = f53 + +sincosf_srsq = f54 + +sincosf_SIG_INV_PI_BY_16_2TO61 = f55 +sincosf_RSHF_2TO61 = f56 +sincosf_RSHF = f57 +sincosf_2TOM61 = f58 +sincosf_NFLOAT = f59 +sincosf_W_2TO61_RSH = f60 + +fp_tmp = f61 + +///////////////////////////////////////////////////////////// + +sincosf_AD_1 = r33 +sincosf_AD_2 = r34 +sincosf_exp_limit = r35 +sincosf_r_signexp = r36 +sincosf_AD_beta_table = r37 +sincosf_r_sincos = r38 + +sincosf_r_exp = r39 +sincosf_r_17_ones = r40 + +sincosf_GR_sig_inv_pi_by_16 = r14 +sincosf_GR_rshf_2to61 = r15 +sincosf_GR_rshf = r16 +sincosf_GR_exp_2tom61 = r17 +sincosf_GR_n = r18 +sincosf_GR_m = r19 +sincosf_GR_32m = r19 +sincosf_GR_all_ones = r19 + +gr_tmp = r41 +GR_SAVE_PFS = r41 +GR_SAVE_B0 = r42 +GR_SAVE_GP = r43 + +RODATA +.align 16 + +// Pi/16 parts +LOCAL_OBJECT_START(double_sincosf_pi) + data8 0xC90FDAA22168C234, 0x00003FFC // pi/16 1st part + data8 0xC4C6628B80DC1CD1, 0x00003FBC // pi/16 2nd part +LOCAL_OBJECT_END(double_sincosf_pi) + +// Coefficients for polynomials +LOCAL_OBJECT_START(double_sincosf_pq_k4) + data8 0x3F810FABB668E9A2 // P2 + data8 0x3FA552E3D6DE75C9 // Q2 + data8 0xBFC555554447BC7F // P1 + data8 0xBFDFFFFFC447610A // Q1 +LOCAL_OBJECT_END(double_sincosf_pq_k4) + +// Sincos table (S[m], C[m]) +LOCAL_OBJECT_START(double_sin_cos_beta_k4) + data8 0x0000000000000000 // sin ( 0 Pi / 16 ) + data8 0x3FF0000000000000 // cos ( 0 Pi / 16 ) +// + data8 0x3FC8F8B83C69A60B // sin ( 1 Pi / 16 ) + data8 0x3FEF6297CFF75CB0 // cos ( 1 Pi / 16 ) +// + data8 0x3FD87DE2A6AEA963 // sin ( 2 Pi / 16 ) + data8 0x3FED906BCF328D46 // cos ( 2 Pi / 16 ) +// + data8 0x3FE1C73B39AE68C8 // sin ( 3 Pi / 16 ) + data8 0x3FEA9B66290EA1A3 // cos ( 3 Pi / 16 ) +// + data8 0x3FE6A09E667F3BCD // sin ( 4 Pi / 16 ) + data8 0x3FE6A09E667F3BCD // cos ( 4 Pi / 16 ) +// + data8 0x3FEA9B66290EA1A3 // sin ( 5 Pi / 16 ) + data8 0x3FE1C73B39AE68C8 // cos ( 5 Pi / 16 ) +// + data8 0x3FED906BCF328D46 // sin ( 6 Pi / 16 ) + data8 0x3FD87DE2A6AEA963 // cos ( 6 Pi / 16 ) +// + data8 0x3FEF6297CFF75CB0 // sin ( 7 Pi / 16 ) + data8 0x3FC8F8B83C69A60B // cos ( 7 Pi / 16 ) +// + data8 0x3FF0000000000000 // sin ( 8 Pi / 16 ) + data8 0x0000000000000000 // cos ( 8 Pi / 16 ) +// + data8 0x3FEF6297CFF75CB0 // sin ( 9 Pi / 16 ) + data8 0xBFC8F8B83C69A60B // cos ( 9 Pi / 16 ) +// + data8 0x3FED906BCF328D46 // sin ( 10 Pi / 16 ) + data8 0xBFD87DE2A6AEA963 // cos ( 10 Pi / 16 ) +// + data8 0x3FEA9B66290EA1A3 // sin ( 11 Pi / 16 ) + data8 0xBFE1C73B39AE68C8 // cos ( 11 Pi / 16 ) +// + data8 0x3FE6A09E667F3BCD // sin ( 12 Pi / 16 ) + data8 0xBFE6A09E667F3BCD // cos ( 12 Pi / 16 ) +// + data8 0x3FE1C73B39AE68C8 // sin ( 13 Pi / 16 ) + data8 0xBFEA9B66290EA1A3 // cos ( 13 Pi / 16 ) +// + data8 0x3FD87DE2A6AEA963 // sin ( 14 Pi / 16 ) + data8 0xBFED906BCF328D46 // cos ( 14 Pi / 16 ) +// + data8 0x3FC8F8B83C69A60B // sin ( 15 Pi / 16 ) + data8 0xBFEF6297CFF75CB0 // cos ( 15 Pi / 16 ) +// + data8 0x0000000000000000 // sin ( 16 Pi / 16 ) + data8 0xBFF0000000000000 // cos ( 16 Pi / 16 ) +// + data8 0xBFC8F8B83C69A60B // sin ( 17 Pi / 16 ) + data8 0xBFEF6297CFF75CB0 // cos ( 17 Pi / 16 ) +// + data8 0xBFD87DE2A6AEA963 // sin ( 18 Pi / 16 ) + data8 0xBFED906BCF328D46 // cos ( 18 Pi / 16 ) +// + data8 0xBFE1C73B39AE68C8 // sin ( 19 Pi / 16 ) + data8 0xBFEA9B66290EA1A3 // cos ( 19 Pi / 16 ) +// + data8 0xBFE6A09E667F3BCD // sin ( 20 Pi / 16 ) + data8 0xBFE6A09E667F3BCD // cos ( 20 Pi / 16 ) +// + data8 0xBFEA9B66290EA1A3 // sin ( 21 Pi / 16 ) + data8 0xBFE1C73B39AE68C8 // cos ( 21 Pi / 16 ) +// + data8 0xBFED906BCF328D46 // sin ( 22 Pi / 16 ) + data8 0xBFD87DE2A6AEA963 // cos ( 22 Pi / 16 ) +// + data8 0xBFEF6297CFF75CB0 // sin ( 23 Pi / 16 ) + data8 0xBFC8F8B83C69A60B // cos ( 23 Pi / 16 ) +// + data8 0xBFF0000000000000 // sin ( 24 Pi / 16 ) + data8 0x0000000000000000 // cos ( 24 Pi / 16 ) +// + data8 0xBFEF6297CFF75CB0 // sin ( 25 Pi / 16 ) + data8 0x3FC8F8B83C69A60B // cos ( 25 Pi / 16 ) +// + data8 0xBFED906BCF328D46 // sin ( 26 Pi / 16 ) + data8 0x3FD87DE2A6AEA963 // cos ( 26 Pi / 16 ) +// + data8 0xBFEA9B66290EA1A3 // sin ( 27 Pi / 16 ) + data8 0x3FE1C73B39AE68C8 // cos ( 27 Pi / 16 ) +// + data8 0xBFE6A09E667F3BCD // sin ( 28 Pi / 16 ) + data8 0x3FE6A09E667F3BCD // cos ( 28 Pi / 16 ) +// + data8 0xBFE1C73B39AE68C8 // sin ( 29 Pi / 16 ) + data8 0x3FEA9B66290EA1A3 // cos ( 29 Pi / 16 ) +// + data8 0xBFD87DE2A6AEA963 // sin ( 30 Pi / 16 ) + data8 0x3FED906BCF328D46 // cos ( 30 Pi / 16 ) +// + data8 0xBFC8F8B83C69A60B // sin ( 31 Pi / 16 ) + data8 0x3FEF6297CFF75CB0 // cos ( 31 Pi / 16 ) +// + data8 0x0000000000000000 // sin ( 32 Pi / 16 ) + data8 0x3FF0000000000000 // cos ( 32 Pi / 16 ) +LOCAL_OBJECT_END(double_sin_cos_beta_k4) + +.section .text + +//////////////////////////////////////////////////////// +// There are two entry points: sin and cos +// If from sin, p8 is true +// If from cos, p9 is true + +GLOBAL_IEEE754_ENTRY(sinf) + +{ .mlx + alloc r32 = ar.pfs,1,13,0,0 + movl sincosf_GR_sig_inv_pi_by_16 = 0xA2F9836E4E44152A //signd of 16/pi +} +{ .mlx + addl sincosf_AD_1 = @ltoff(double_sincosf_pi), gp + movl sincosf_GR_rshf_2to61 = 0x47b8000000000000 // 1.1 2^(63+63-2) +};; + +{ .mfi + ld8 sincosf_AD_1 = [sincosf_AD_1] + fnorm.s1 sincosf_NORM_f8 = f8 // Normalize argument + cmp.eq p8,p9 = r0, r0 // set p8 (clear p9) for sin +} +{ .mib + mov sincosf_GR_exp_2tom61 = 0xffff-61 // exponent of scale 2^-61 + mov sincosf_r_sincos = 0x0 // 0 for sin + br.cond.sptk _SINCOSF_COMMON // go to common part +};; + +GLOBAL_IEEE754_END(sinf) + +GLOBAL_IEEE754_ENTRY(cosf) + +{ .mlx + alloc r32 = ar.pfs,1,13,0,0 + movl sincosf_GR_sig_inv_pi_by_16 = 0xA2F9836E4E44152A //signd of 16/pi +} +{ .mlx + addl sincosf_AD_1 = @ltoff(double_sincosf_pi), gp + movl sincosf_GR_rshf_2to61 = 0x47b8000000000000 // 1.1 2^(63+63-2) +};; + +{ .mfi + ld8 sincosf_AD_1 = [sincosf_AD_1] + fnorm.s1 sincosf_NORM_f8 = f8 // Normalize argument + cmp.eq p9,p8 = r0, r0 // set p9 (clear p8) for cos +} +{ .mib + mov sincosf_GR_exp_2tom61 = 0xffff-61 // exponent of scale 2^-61 + mov sincosf_r_sincos = 0x8 // 8 for cos + nop.b 999 +};; + +//////////////////////////////////////////////////////// +// All entry points end up here. +// If from sin, sincosf_r_sincos is 0 and p8 is true +// If from cos, sincosf_r_sincos is 8 = 2^(k-1) and p9 is true +// We add sincosf_r_sincos to N + +///////////// Common sin and cos part ////////////////// +_SINCOSF_COMMON: + +// Form two constants we need +// 16/pi * 2^-2 * 2^63, scaled by 2^61 since we just loaded the significand +// 1.1000...000 * 2^(63+63-2) to right shift int(W) into the low significand +// fcmp used to set denormal, and invalid on snans +{ .mfi + setf.sig sincosf_SIG_INV_PI_BY_16_2TO61 = sincosf_GR_sig_inv_pi_by_16 + fclass.m p6,p0 = f8, 0xe7 // if x=0,inf,nan + mov sincosf_exp_limit = 0x10017 +} +{ .mlx + setf.d sincosf_RSHF_2TO61 = sincosf_GR_rshf_2to61 + movl sincosf_GR_rshf = 0x43e8000000000000 // 1.1000 2^63 +};; // Right shift + +// Form another constant +// 2^-61 for scaling Nfloat +// 0x10017 is register_bias + 24. +// So if f8 >= 2^24, go to large argument routines +{ .mmi + getf.exp sincosf_r_signexp = f8 + setf.exp sincosf_2TOM61 = sincosf_GR_exp_2tom61 + addl gr_tmp = -1,r0 // For "inexect" constant create +};; + +// Load the two pieces of pi/16 +// Form another constant +// 1.1000...000 * 2^63, the right shift constant +{ .mmb + ldfe sincosf_Pi_by_16_1 = [sincosf_AD_1],16 + setf.d sincosf_RSHF = sincosf_GR_rshf +(p6) br.cond.spnt _SINCOSF_SPECIAL_ARGS +};; + +// Getting argument's exp for "large arguments" filtering +{ .mmi + ldfe sincosf_Pi_by_16_2 = [sincosf_AD_1],16 + setf.sig fp_tmp = gr_tmp // constant for inexact set + nop.i 999 +};; + +// Polynomial coefficients (Q2, Q1, P2, P1) loading +{ .mmi + ldfpd sincosf_P2,sincosf_Q2 = [sincosf_AD_1],16 + nop.m 999 + nop.i 999 +};; + +// Select exponent (17 lsb) +{ .mmi + ldfpd sincosf_P1,sincosf_Q1 = [sincosf_AD_1],16 + nop.m 999 + dep.z sincosf_r_exp = sincosf_r_signexp, 0, 17 +};; + +// p10 is true if we must call routines to handle larger arguments +// p10 is true if f8 exp is >= 0x10017 (2^24) +{ .mfb + cmp.ge p10,p0 = sincosf_r_exp,sincosf_exp_limit + nop.f 999 +(p10) br.cond.spnt _SINCOSF_LARGE_ARGS // Go to "large args" routine +};; + +// sincosf_W = x * sincosf_Inv_Pi_by_16 +// Multiply x by scaled 16/pi and add large const to shift integer part of W to +// rightmost bits of significand +{ .mfi + nop.m 999 + fma.s1 sincosf_W_2TO61_RSH = sincosf_NORM_f8, sincosf_SIG_INV_PI_BY_16_2TO61, sincosf_RSHF_2TO61 + nop.i 999 +};; + +// sincosf_NFLOAT = Round_Int_Nearest(sincosf_W) +// This is done by scaling back by 2^-61 and subtracting the shift constant +{ .mfi + nop.m 999 + fms.s1 sincosf_NFLOAT = sincosf_W_2TO61_RSH,sincosf_2TOM61,sincosf_RSHF + nop.i 999 +};; + +// get N = (int)sincosf_int_Nfloat +{ .mfi + getf.sig sincosf_GR_n = sincosf_W_2TO61_RSH // integer N value + nop.f 999 + nop.i 999 +};; + +// Add 2^(k-1) (which is in sincosf_r_sincos=8) to N +// sincosf_r = -sincosf_Nfloat * sincosf_Pi_by_16_1 + x +{ .mfi + add sincosf_GR_n = sincosf_GR_n, sincosf_r_sincos + fnma.s1 sincosf_r = sincosf_NFLOAT, sincosf_Pi_by_16_1, sincosf_NORM_f8 + nop.i 999 +};; + +// Get M (least k+1 bits of N) +{ .mmi + and sincosf_GR_m = 0x1f,sincosf_GR_n // Put mask 0x1F - + nop.m 999 // - select k+1 bits + nop.i 999 +};; + +// Add 16*M to address of sin_cos_beta table +{ .mfi + shladd sincosf_AD_2 = sincosf_GR_32m, 4, sincosf_AD_1 +(p8) fclass.m.unc p10,p0 = f8,0x0b // If sin denormal input - + nop.i 999 +};; + +// Load Sin and Cos table value using obtained index m (sincosf_AD_2) +{ .mfi + ldfd sincosf_Sm = [sincosf_AD_2],8 // Sin value S[m] +(p9) fclass.m.unc p11,p0 = f8,0x0b // If cos denormal input - + nop.i 999 // - set denormal +};; + +// sincosf_r = sincosf_r -sincosf_Nfloat * sincosf_Pi_by_16_2 +{ .mfi + ldfd sincosf_Cm = [sincosf_AD_2] // Cos table value C[m] + fnma.s1 sincosf_r_exact = sincosf_NFLOAT, sincosf_Pi_by_16_2, sincosf_r + nop.i 999 +} +// get rsq = r*r +{ .mfi + nop.m 999 + fma.s1 sincosf_rsq = sincosf_r, sincosf_r, f0 // r^2 = r*r + nop.i 999 +};; + +{ .mfi + nop.m 999 + fmpy.s0 fp_tmp = fp_tmp, fp_tmp // forces inexact flag + nop.i 999 +};; + +// Polynomials calculation +// Q = Q2*r^2 + Q1 +// P = P2*r^2 + P1 +{ .mfi + nop.m 999 + fma.s1 sincosf_Q = sincosf_rsq, sincosf_Q2, sincosf_Q1 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 sincosf_P = sincosf_rsq, sincosf_P2, sincosf_P1 + nop.i 999 +};; + +// get rcube and S[m]*r^2 +{ .mfi + nop.m 999 + fmpy.s1 sincosf_srsq = sincosf_Sm,sincosf_rsq // r^2*S[m] + nop.i 999 +} +{ .mfi + nop.m 999 + fmpy.s1 sincosf_rcub = sincosf_r_exact, sincosf_rsq + nop.i 999 +};; + +// Get final P and Q +// Q = Q*S[m]*r^2 + S[m] +// P = P*r^3 + r +{ .mfi + nop.m 999 + fma.s1 sincosf_Q = sincosf_srsq,sincosf_Q, sincosf_Sm + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 sincosf_P = sincosf_rcub,sincosf_P,sincosf_r_exact + nop.i 999 +};; + +// If sinf(denormal) - force underflow to be set +.pred.rel "mutex",p10,p11 +{ .mfi + nop.m 999 +(p10) fmpy.s.s0 fp_tmp = f8,f8 // forces underflow flag + nop.i 999 // for denormal sine args +} +// If cosf(denormal) - force denormal to be set +{ .mfi + nop.m 999 +(p11) fma.s.s0 fp_tmp = f8, f1, f8 // forces denormal flag + nop.i 999 // for denormal cosine args +};; + + +// Final calculation +// result = C[m]*P + Q +{ .mfb + nop.m 999 + fma.s.s0 f8 = sincosf_Cm, sincosf_P, sincosf_Q + br.ret.sptk b0 // Exit for common path +};; + +////////// x = 0/Inf/NaN path ////////////////// +_SINCOSF_SPECIAL_ARGS: +.pred.rel "mutex",p8,p9 +// sinf(+/-0) = +/-0 +// sinf(Inf) = NaN +// sinf(NaN) = NaN +{ .mfi + nop.m 999 +(p8) fma.s.s0 f8 = f8, f0, f0 // sinf(+/-0,NaN,Inf) + nop.i 999 +} +// cosf(+/-0) = 1.0 +// cosf(Inf) = NaN +// cosf(NaN) = NaN +{ .mfb + nop.m 999 +(p9) fma.s.s0 f8 = f8, f0, f1 // cosf(+/-0,NaN,Inf) + br.ret.sptk b0 // Exit for x = 0/Inf/NaN path +};; + +GLOBAL_IEEE754_END(cosf) + +//////////// x >= 2^24 - large arguments routine call //////////// +LOCAL_LIBM_ENTRY(__libm_callout_sincosf) +_SINCOSF_LARGE_ARGS: +.prologue +{ .mfi + mov sincosf_GR_all_ones = -1 // 0xffffffff + nop.f 999 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS = ar.pfs +} +;; + +{ .mfi + mov GR_SAVE_GP = gp + nop.f 999 +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0 = b0 +} +.body + +{ .mbb + setf.sig sincosf_save_tmp = sincosf_GR_all_ones // inexact set + nop.b 999 +(p8) br.call.sptk.many b0 = __libm_sin_large# // sinf(large_X) +};; + +{ .mbb + cmp.ne p9,p0 = sincosf_r_sincos, r0 // set p9 if cos + nop.b 999 +(p9) br.call.sptk.many b0 = __libm_cos_large# // cosf(large_X) +};; + +{ .mfi + mov gp = GR_SAVE_GP + fma.s.s0 f8 = f8, f1, f0 // Round result to single + mov b0 = GR_SAVE_B0 +} +{ .mfi // force inexact set + nop.m 999 + fmpy.s0 sincosf_save_tmp = sincosf_save_tmp, sincosf_save_tmp + nop.i 999 +};; + +{ .mib + nop.m 999 + mov ar.pfs = GR_SAVE_PFS + br.ret.sptk b0 // Exit for large arguments routine call +};; +LOCAL_LIBM_END(__libm_callout_sincosf) + +.type __libm_sin_large#, @function +.global __libm_sin_large# +.type __libm_cos_large#, @function +.global __libm_cos_large# + diff --git a/sysdeps/ia64/fpu/s_cosl.S b/sysdeps/ia64/fpu/s_cosl.S new file mode 100644 index 0000000000..8d71e50c1a --- /dev/null +++ b/sysdeps/ia64/fpu/s_cosl.S @@ -0,0 +1,2365 @@ +.file "sincosl.s" + + +// Copyright (c) 2000 - 2004, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +//********************************************************************* +// +// History: +// 02/02/00 (hand-optimized) +// 04/04/00 Unwind support added +// 07/30/01 Improved speed on all paths +// 08/20/01 Fixed bundling typo +// 05/13/02 Changed interface to __libm_pi_by_2_reduce +// 02/10/03 Reordered header: .section, .global, .proc, .align; +// used data8 for long double table values +// 10/13/03 Corrected final .endp name to match .proc +// 10/26/04 Avoided using r14-31 as scratch so not clobbered by dynamic loader +// +//********************************************************************* +// +// Function: Combined sinl(x) and cosl(x), where +// +// sinl(x) = sine(x), for double-extended precision x values +// cosl(x) = cosine(x), for double-extended precision x values +// +//********************************************************************* +// +// Resources Used: +// +// Floating-Point Registers: f8 (Input and Return Value) +// f32-f99 +// +// General Purpose Registers: +// r32-r58 +// +// Predicate Registers: p6-p13 +// +//********************************************************************* +// +// IEEE Special Conditions: +// +// Denormal fault raised on denormal inputs +// Overflow exceptions do not occur +// Underflow exceptions raised when appropriate for sin +// (No specialized error handling for this routine) +// Inexact raised when appropriate by algorithm +// +// sinl(SNaN) = QNaN +// sinl(QNaN) = QNaN +// sinl(inf) = QNaN +// sinl(+/-0) = +/-0 +// cosl(inf) = QNaN +// cosl(SNaN) = QNaN +// cosl(QNaN) = QNaN +// cosl(0) = 1 +// +//********************************************************************* +// +// Mathematical Description +// ======================== +// +// The computation of FSIN and FCOS is best handled in one piece of +// code. The main reason is that given any argument Arg, computation +// of trigonometric functions first calculate N and an approximation +// to alpha where +// +// Arg = N pi/2 + alpha, |alpha| <= pi/4. +// +// Since +// +// cosl( Arg ) = sinl( (N+1) pi/2 + alpha ), +// +// therefore, the code for computing sine will produce cosine as long +// as 1 is added to N immediately after the argument reduction +// process. +// +// Let M = N if sine +// N+1 if cosine. +// +// Now, given +// +// Arg = M pi/2 + alpha, |alpha| <= pi/4, +// +// let I = M mod 4, or I be the two lsb of M when M is represented +// as 2's complement. I = [i_0 i_1]. Then +// +// sinl( Arg ) = (-1)^i_0 sinl( alpha ) if i_1 = 0, +// = (-1)^i_0 cosl( alpha ) if i_1 = 1. +// +// For example: +// if M = -1, I = 11 +// sin ((-pi/2 + alpha) = (-1) cos (alpha) +// if M = 0, I = 00 +// sin (alpha) = sin (alpha) +// if M = 1, I = 01 +// sin (pi/2 + alpha) = cos (alpha) +// if M = 2, I = 10 +// sin (pi + alpha) = (-1) sin (alpha) +// if M = 3, I = 11 +// sin ((3/2)pi + alpha) = (-1) cos (alpha) +// +// The value of alpha is obtained by argument reduction and +// represented by two working precision numbers r and c where +// +// alpha = r + c accurately. +// +// The reduction method is described in a previous write up. +// The argument reduction scheme identifies 4 cases. For Cases 2 +// and 4, because |alpha| is small, sinl(r+c) and cosl(r+c) can be +// computed very easily by 2 or 3 terms of the Taylor series +// expansion as follows: +// +// Case 2: +// ------- +// +// sinl(r + c) = r + c - r^3/6 accurately +// cosl(r + c) = 1 - 2^(-67) accurately +// +// Case 4: +// ------- +// +// sinl(r + c) = r + c - r^3/6 + r^5/120 accurately +// cosl(r + c) = 1 - r^2/2 + r^4/24 accurately +// +// The only cases left are Cases 1 and 3 of the argument reduction +// procedure. These two cases will be merged since after the +// argument is reduced in either cases, we have the reduced argument +// represented as r + c and that the magnitude |r + c| is not small +// enough to allow the usage of a very short approximation. +// +// The required calculation is either +// +// sinl(r + c) = sinl(r) + correction, or +// cosl(r + c) = cosl(r) + correction. +// +// Specifically, +// +// sinl(r + c) = sinl(r) + c sin'(r) + O(c^2) +// = sinl(r) + c cos (r) + O(c^2) +// = sinl(r) + c(1 - r^2/2) accurately. +// Similarly, +// +// cosl(r + c) = cosl(r) - c sinl(r) + O(c^2) +// = cosl(r) - c(r - r^3/6) accurately. +// +// We therefore concentrate on accurately calculating sinl(r) and +// cosl(r) for a working-precision number r, |r| <= pi/4 to within +// 0.1% or so. +// +// The greatest challenge of this task is that the second terms of +// the Taylor series +// +// r - r^3/3! + r^r/5! - ... +// +// and +// +// 1 - r^2/2! + r^4/4! - ... +// +// are not very small when |r| is close to pi/4 and the rounding +// errors will be a concern if simple polynomial accumulation is +// used. When |r| < 2^-3, however, the second terms will be small +// enough (6 bits or so of right shift) that a normal Horner +// recurrence suffices. Hence there are two cases that we consider +// in the accurate computation of sinl(r) and cosl(r), |r| <= pi/4. +// +// Case small_r: |r| < 2^(-3) +// -------------------------- +// +// Since Arg = M pi/4 + r + c accurately, and M mod 4 is [i_0 i_1], +// we have +// +// sinl(Arg) = (-1)^i_0 * sinl(r + c) if i_1 = 0 +// = (-1)^i_0 * cosl(r + c) if i_1 = 1 +// +// can be accurately approximated by +// +// sinl(Arg) = (-1)^i_0 * [sinl(r) + c] if i_1 = 0 +// = (-1)^i_0 * [cosl(r) - c*r] if i_1 = 1 +// +// because |r| is small and thus the second terms in the correction +// are unneccessary. +// +// Finally, sinl(r) and cosl(r) are approximated by polynomials of +// moderate lengths. +// +// sinl(r) = r + S_1 r^3 + S_2 r^5 + ... + S_5 r^11 +// cosl(r) = 1 + C_1 r^2 + C_2 r^4 + ... + C_5 r^10 +// +// We can make use of predicates to selectively calculate +// sinl(r) or cosl(r) based on i_1. +// +// Case normal_r: 2^(-3) <= |r| <= pi/4 +// ------------------------------------ +// +// This case is more likely than the previous one if one considers +// r to be uniformly distributed in [-pi/4 pi/4]. Again, +// +// sinl(Arg) = (-1)^i_0 * sinl(r + c) if i_1 = 0 +// = (-1)^i_0 * cosl(r + c) if i_1 = 1. +// +// Because |r| is now larger, we need one extra term in the +// correction. sinl(Arg) can be accurately approximated by +// +// sinl(Arg) = (-1)^i_0 * [sinl(r) + c(1-r^2/2)] if i_1 = 0 +// = (-1)^i_0 * [cosl(r) - c*r*(1 - r^2/6)] i_1 = 1. +// +// Finally, sinl(r) and cosl(r) are approximated by polynomials of +// moderate lengths. +// +// sinl(r) = r + PP_1_hi r^3 + PP_1_lo r^3 + +// PP_2 r^5 + ... + PP_8 r^17 +// +// cosl(r) = 1 + QQ_1 r^2 + QQ_2 r^4 + ... + QQ_8 r^16 +// +// where PP_1_hi is only about 16 bits long and QQ_1 is -1/2. +// The crux in accurate computation is to calculate +// +// r + PP_1_hi r^3 or 1 + QQ_1 r^2 +// +// accurately as two pieces: U_hi and U_lo. The way to achieve this +// is to obtain r_hi as a 10 sig. bit number that approximates r to +// roughly 8 bits or so of accuracy. (One convenient way is +// +// r_hi := frcpa( frcpa( r ) ).) +// +// This way, +// +// r + PP_1_hi r^3 = r + PP_1_hi r_hi^3 + +// PP_1_hi (r^3 - r_hi^3) +// = [r + PP_1_hi r_hi^3] + +// [PP_1_hi (r - r_hi) +// (r^2 + r_hi r + r_hi^2) ] +// = U_hi + U_lo +// +// Since r_hi is only 10 bit long and PP_1_hi is only 16 bit long, +// PP_1_hi * r_hi^3 is only at most 46 bit long and thus computed +// exactly. Furthermore, r and PP_1_hi r_hi^3 are of opposite sign +// and that there is no more than 8 bit shift off between r and +// PP_1_hi * r_hi^3. Hence the sum, U_hi, is representable and thus +// calculated without any error. Finally, the fact that +// +// |U_lo| <= 2^(-8) |U_hi| +// +// says that U_hi + U_lo is approximating r + PP_1_hi r^3 to roughly +// 8 extra bits of accuracy. +// +// Similarly, +// +// 1 + QQ_1 r^2 = [1 + QQ_1 r_hi^2] + +// [QQ_1 (r - r_hi)(r + r_hi)] +// = U_hi + U_lo. +// +// Summarizing, we calculate r_hi = frcpa( frcpa( r ) ). +// +// If i_1 = 0, then +// +// U_hi := r + PP_1_hi * r_hi^3 +// U_lo := PP_1_hi * (r - r_hi) * (r^2 + r*r_hi + r_hi^2) +// poly := PP_1_lo r^3 + PP_2 r^5 + ... + PP_8 r^17 +// correction := c * ( 1 + C_1 r^2 ) +// +// Else ...i_1 = 1 +// +// U_hi := 1 + QQ_1 * r_hi * r_hi +// U_lo := QQ_1 * (r - r_hi) * (r + r_hi) +// poly := QQ_2 * r^4 + QQ_3 * r^6 + ... + QQ_8 r^16 +// correction := -c * r * (1 + S_1 * r^2) +// +// End +// +// Finally, +// +// V := poly + ( U_lo + correction ) +// +// / U_hi + V if i_0 = 0 +// result := | +// \ (-U_hi) - V if i_0 = 1 +// +// It is important that in the last step, negation of U_hi is +// performed prior to the subtraction which is to be performed in +// the user-set rounding mode. +// +// +// Algorithmic Description +// ======================= +// +// The argument reduction algorithm is tightly integrated into FSIN +// and FCOS which share the same code. The following is complete and +// self-contained. The argument reduction description given +// previously is repeated below. +// +// +// Step 0. Initialization. +// +// If FSIN is invoked, set N_inc := 0; else if FCOS is invoked, +// set N_inc := 1. +// +// Step 1. Check for exceptional and special cases. +// +// * If Arg is +-0, +-inf, NaN, NaT, go to Step 10 for special +// handling. +// * If |Arg| < 2^24, go to Step 2 for reduction of moderate +// arguments. This is the most likely case. +// * If |Arg| < 2^63, go to Step 8 for pre-reduction of large +// arguments. +// * If |Arg| >= 2^63, go to Step 10 for special handling. +// +// Step 2. Reduction of moderate arguments. +// +// If |Arg| < pi/4 ...quick branch +// N_fix := N_inc (integer) +// r := Arg +// c := 0.0 +// Branch to Step 4, Case_1_complete +// Else ...cf. argument reduction +// N := Arg * two_by_PI (fp) +// N_fix := fcvt.fx( N ) (int) +// N := fcvt.xf( N_fix ) +// N_fix := N_fix + N_inc +// s := Arg - N * P_1 (first piece of pi/2) +// w := -N * P_2 (second piece of pi/2) +// +// If |s| >= 2^(-33) +// go to Step 3, Case_1_reduce +// Else +// go to Step 7, Case_2_reduce +// Endif +// Endif +// +// Step 3. Case_1_reduce. +// +// r := s + w +// c := (s - r) + w ...observe order +// +// Step 4. Case_1_complete +// +// ...At this point, the reduced argument alpha is +// ...accurately represented as r + c. +// If |r| < 2^(-3), go to Step 6, small_r. +// +// Step 5. Normal_r. +// +// Let [i_0 i_1] by the 2 lsb of N_fix. +// FR_rsq := r * r +// r_hi := frcpa( frcpa( r ) ) +// r_lo := r - r_hi +// +// If i_1 = 0, then +// poly := r*FR_rsq*(PP_1_lo + FR_rsq*(PP_2 + ... FR_rsq*PP_8)) +// U_hi := r + PP_1_hi*r_hi*r_hi*r_hi ...any order +// U_lo := PP_1_hi*r_lo*(r*r + r*r_hi + r_hi*r_hi) +// correction := c + c*C_1*FR_rsq ...any order +// Else +// poly := FR_rsq*FR_rsq*(QQ_2 + FR_rsq*(QQ_3 + ... + FR_rsq*QQ_8)) +// U_hi := 1 + QQ_1 * r_hi * r_hi ...any order +// U_lo := QQ_1 * r_lo * (r + r_hi) +// correction := -c*(r + S_1*FR_rsq*r) ...any order +// Endif +// +// V := poly + (U_lo + correction) ...observe order +// +// result := (i_0 == 0? 1.0 : -1.0) +// +// Last instruction in user-set rounding mode +// +// result := (i_0 == 0? result*U_hi + V : +// result*U_hi - V) +// +// Return +// +// Step 6. Small_r. +// +// ...Use flush to zero mode without causing exception +// Let [i_0 i_1] be the two lsb of N_fix. +// +// FR_rsq := r * r +// +// If i_1 = 0 then +// z := FR_rsq*FR_rsq; z := FR_rsq*z *r +// poly_lo := S_3 + FR_rsq*(S_4 + FR_rsq*S_5) +// poly_hi := r*FR_rsq*(S_1 + FR_rsq*S_2) +// correction := c +// result := r +// Else +// z := FR_rsq*FR_rsq; z := FR_rsq*z +// poly_lo := C_3 + FR_rsq*(C_4 + FR_rsq*C_5) +// poly_hi := FR_rsq*(C_1 + FR_rsq*C_2) +// correction := -c*r +// result := 1 +// Endif +// +// poly := poly_hi + (z * poly_lo + correction) +// +// If i_0 = 1, result := -result +// +// Last operation. Perform in user-set rounding mode +// +// result := (i_0 == 0? result + poly : +// result - poly ) +// Return +// +// Step 7. Case_2_reduce. +// +// ...Refer to the write up for argument reduction for +// ...rationale. The reduction algorithm below is taken from +// ...argument reduction description and integrated this. +// +// w := N*P_3 +// U_1 := N*P_2 + w ...FMA +// U_2 := (N*P_2 - U_1) + w ...2 FMA +// ...U_1 + U_2 is N*(P_2+P_3) accurately +// +// r := s - U_1 +// c := ( (s - r) - U_1 ) - U_2 +// +// ...The mathematical sum r + c approximates the reduced +// ...argument accurately. Note that although compared to +// ...Case 1, this case requires much more work to reduce +// ...the argument, the subsequent calculation needed for +// ...any of the trigonometric function is very little because +// ...|alpha| < 1.01*2^(-33) and thus two terms of the +// ...Taylor series expansion suffices. +// +// If i_1 = 0 then +// poly := c + S_1 * r * r * r ...any order +// result := r +// Else +// poly := -2^(-67) +// result := 1.0 +// Endif +// +// If i_0 = 1, result := -result +// +// Last operation. Perform in user-set rounding mode +// +// result := (i_0 == 0? result + poly : +// result - poly ) +// +// Return +// +// +// Step 8. Pre-reduction of large arguments. +// +// ...Again, the following reduction procedure was described +// ...in the separate write up for argument reduction, which +// ...is tightly integrated here. + +// N_0 := Arg * Inv_P_0 +// N_0_fix := fcvt.fx( N_0 ) +// N_0 := fcvt.xf( N_0_fix) + +// Arg' := Arg - N_0 * P_0 +// w := N_0 * d_1 +// N := Arg' * two_by_PI +// N_fix := fcvt.fx( N ) +// N := fcvt.xf( N_fix ) +// N_fix := N_fix + N_inc +// +// s := Arg' - N * P_1 +// w := w - N * P_2 +// +// If |s| >= 2^(-14) +// go to Step 3 +// Else +// go to Step 9 +// Endif +// +// Step 9. Case_4_reduce. +// +// ...first obtain N_0*d_1 and -N*P_2 accurately +// U_hi := N_0 * d_1 V_hi := -N*P_2 +// U_lo := N_0 * d_1 - U_hi V_lo := -N*P_2 - U_hi ...FMAs +// +// ...compute the contribution from N_0*d_1 and -N*P_3 +// w := -N*P_3 +// w := w + N_0*d_2 +// t := U_lo + V_lo + w ...any order +// +// ...at this point, the mathematical value +// ...s + U_hi + V_hi + t approximates the true reduced argument +// ...accurately. Just need to compute this accurately. +// +// ...Calculate U_hi + V_hi accurately: +// A := U_hi + V_hi +// if |U_hi| >= |V_hi| then +// a := (U_hi - A) + V_hi +// else +// a := (V_hi - A) + U_hi +// endif +// ...order in computing "a" must be observed. This branch is +// ...best implemented by predicates. +// ...A + a is U_hi + V_hi accurately. Moreover, "a" is +// ...much smaller than A: |a| <= (1/2)ulp(A). +// +// ...Just need to calculate s + A + a + t +// C_hi := s + A t := t + a +// C_lo := (s - C_hi) + A +// C_lo := C_lo + t +// +// ...Final steps for reduction +// r := C_hi + C_lo +// c := (C_hi - r) + C_lo +// +// ...At this point, we have r and c +// ...And all we need is a couple of terms of the corresponding +// ...Taylor series. +// +// If i_1 = 0 +// poly := c + r*FR_rsq*(S_1 + FR_rsq*S_2) +// result := r +// Else +// poly := FR_rsq*(C_1 + FR_rsq*C_2) +// result := 1 +// Endif +// +// If i_0 = 1, result := -result +// +// Last operation. Perform in user-set rounding mode +// +// result := (i_0 == 0? result + poly : +// result - poly ) +// Return +// +// Large Arguments: For arguments above 2**63, a Payne-Hanek +// style argument reduction is used and pi_by_2 reduce is called. +// + + +RODATA +.align 16 + +LOCAL_OBJECT_START(FSINCOSL_CONSTANTS) + +sincosl_table_p: +data8 0xA2F9836E4E44152A, 0x00003FFE // Inv_pi_by_2 +data8 0xC84D32B0CE81B9F1, 0x00004016 // P_0 +data8 0xC90FDAA22168C235, 0x00003FFF // P_1 +data8 0xECE675D1FC8F8CBB, 0x0000BFBD // P_2 +data8 0xB7ED8FBBACC19C60, 0x0000BF7C // P_3 +data8 0x8D848E89DBD171A1, 0x0000BFBF // d_1 +data8 0xD5394C3618A66F8E, 0x0000BF7C // d_2 +LOCAL_OBJECT_END(FSINCOSL_CONSTANTS) + +LOCAL_OBJECT_START(sincosl_table_d) +data8 0xC90FDAA22168C234, 0x00003FFE // pi_by_4 +data8 0xA397E5046EC6B45A, 0x00003FE7 // Inv_P_0 +data4 0x3E000000, 0xBE000000 // 2^-3 and -2^-3 +data4 0x2F000000, 0xAF000000 // 2^-33 and -2^-33 +data4 0x9E000000, 0x00000000 // -2^-67 +data4 0x00000000, 0x00000000 // pad +LOCAL_OBJECT_END(sincosl_table_d) + +LOCAL_OBJECT_START(sincosl_table_pp) +data8 0xCC8ABEBCA21C0BC9, 0x00003FCE // PP_8 +data8 0xD7468A05720221DA, 0x0000BFD6 // PP_7 +data8 0xB092382F640AD517, 0x00003FDE // PP_6 +data8 0xD7322B47D1EB75A4, 0x0000BFE5 // PP_5 +data8 0xFFFFFFFFFFFFFFFE, 0x0000BFFD // C_1 +data8 0xAAAA000000000000, 0x0000BFFC // PP_1_hi +data8 0xB8EF1D2ABAF69EEA, 0x00003FEC // PP_4 +data8 0xD00D00D00D03BB69, 0x0000BFF2 // PP_3 +data8 0x8888888888888962, 0x00003FF8 // PP_2 +data8 0xAAAAAAAAAAAB0000, 0x0000BFEC // PP_1_lo +LOCAL_OBJECT_END(sincosl_table_pp) + +LOCAL_OBJECT_START(sincosl_table_qq) +data8 0xD56232EFC2B0FE52, 0x00003FD2 // QQ_8 +data8 0xC9C99ABA2B48DCA6, 0x0000BFDA // QQ_7 +data8 0x8F76C6509C716658, 0x00003FE2 // QQ_6 +data8 0x93F27DBAFDA8D0FC, 0x0000BFE9 // QQ_5 +data8 0xAAAAAAAAAAAAAAAA, 0x0000BFFC // S_1 +data8 0x8000000000000000, 0x0000BFFE // QQ_1 +data8 0xD00D00D00C6E5041, 0x00003FEF // QQ_4 +data8 0xB60B60B60B607F60, 0x0000BFF5 // QQ_3 +data8 0xAAAAAAAAAAAAAA9B, 0x00003FFA // QQ_2 +LOCAL_OBJECT_END(sincosl_table_qq) + +LOCAL_OBJECT_START(sincosl_table_c) +data8 0xFFFFFFFFFFFFFFFE, 0x0000BFFD // C_1 +data8 0xAAAAAAAAAAAA719F, 0x00003FFA // C_2 +data8 0xB60B60B60356F994, 0x0000BFF5 // C_3 +data8 0xD00CFFD5B2385EA9, 0x00003FEF // C_4 +data8 0x93E4BD18292A14CD, 0x0000BFE9 // C_5 +LOCAL_OBJECT_END(sincosl_table_c) + +LOCAL_OBJECT_START(sincosl_table_s) +data8 0xAAAAAAAAAAAAAAAA, 0x0000BFFC // S_1 +data8 0x88888888888868DB, 0x00003FF8 // S_2 +data8 0xD00D00D0055EFD4B, 0x0000BFF2 // S_3 +data8 0xB8EF1C5D839730B9, 0x00003FEC // S_4 +data8 0xD71EA3A4E5B3F492, 0x0000BFE5 // S_5 +data4 0x38800000, 0xB8800000 // two**-14 and -two**-14 +LOCAL_OBJECT_END(sincosl_table_s) + +FR_Input_X = f8 +FR_Result = f8 + +FR_r = f8 +FR_c = f9 + +FR_norm_x = f9 +FR_inv_pi_2to63 = f10 +FR_rshf_2to64 = f11 +FR_2tom64 = f12 +FR_rshf = f13 +FR_N_float_signif = f14 +FR_abs_x = f15 +FR_Pi_by_4 = f34 +FR_Two_to_M14 = f35 +FR_Neg_Two_to_M14 = f36 +FR_Two_to_M33 = f37 +FR_Neg_Two_to_M33 = f38 +FR_Neg_Two_to_M67 = f39 +FR_Inv_pi_by_2 = f40 +FR_N_float = f41 +FR_N_fix = f42 +FR_P_1 = f43 +FR_P_2 = f44 +FR_P_3 = f45 +FR_s = f46 +FR_w = f47 +FR_d_2 = f48 +FR_tmp_result = f49 +FR_Z = f50 +FR_A = f51 +FR_a = f52 +FR_t = f53 +FR_U_1 = f54 +FR_U_2 = f55 +FR_C_1 = f56 +FR_C_2 = f57 +FR_C_3 = f58 +FR_C_4 = f59 +FR_C_5 = f60 +FR_S_1 = f61 +FR_S_2 = f62 +FR_S_3 = f63 +FR_S_4 = f64 +FR_S_5 = f65 +FR_poly_hi = f66 +FR_poly_lo = f67 +FR_r_hi = f68 +FR_r_lo = f69 +FR_rsq = f70 +FR_r_cubed = f71 +FR_C_hi = f72 +FR_N_0 = f73 +FR_d_1 = f74 +FR_V = f75 +FR_V_hi = f75 +FR_V_lo = f76 +FR_U_hi = f77 +FR_U_lo = f78 +FR_U_hiabs = f79 +FR_V_hiabs = f80 +FR_PP_8 = f81 +FR_QQ_8 = f101 +FR_PP_7 = f82 +FR_QQ_7 = f102 +FR_PP_6 = f83 +FR_QQ_6 = f103 +FR_PP_5 = f84 +FR_QQ_5 = f104 +FR_PP_4 = f85 +FR_QQ_4 = f105 +FR_PP_3 = f86 +FR_QQ_3 = f106 +FR_PP_2 = f87 +FR_QQ_2 = f107 +FR_QQ_1 = f108 +FR_r_hi_sq = f88 +FR_N_0_fix = f89 +FR_Inv_P_0 = f90 +FR_corr = f91 +FR_poly = f92 +FR_Neg_Two_to_M3 = f93 +FR_Two_to_M3 = f94 +FR_P_0 = f95 +FR_C_lo = f96 +FR_PP_1 = f97 +FR_PP_1_lo = f98 +FR_ArgPrime = f99 +FR_inexact = f100 + +GR_exp_m2_to_m3= r36 +GR_N_Inc = r37 +GR_Sin_or_Cos = r38 +GR_signexp_x = r40 +GR_exp_x = r40 +GR_exp_mask = r41 +GR_exp_2_to_63 = r42 +GR_exp_2_to_m3 = r43 +GR_exp_2_to_24 = r44 + +GR_sig_inv_pi = r45 +GR_rshf_2to64 = r46 +GR_exp_2tom64 = r47 +GR_rshf = r48 +GR_ad_p = r49 +GR_ad_d = r50 +GR_ad_pp = r51 +GR_ad_qq = r52 +GR_ad_c = r53 +GR_ad_s = r54 +GR_ad_ce = r55 +GR_ad_se = r56 +GR_ad_m14 = r57 +GR_ad_s1 = r58 + +// Added for unwind support + +GR_SAVE_B0 = r39 +GR_SAVE_GP = r40 +GR_SAVE_PFS = r41 + + +.section .text + +GLOBAL_IEEE754_ENTRY(sinl) +{ .mlx + alloc r32 = ar.pfs,0,27,2,0 + movl GR_sig_inv_pi = 0xa2f9836e4e44152a // significand of 1/pi +} +{ .mlx + mov GR_Sin_or_Cos = 0x0 + movl GR_rshf_2to64 = 0x47e8000000000000 // 1.1000 2^(63+64) +} +;; + +{ .mfi + addl GR_ad_p = @ltoff(FSINCOSL_CONSTANTS#), gp + fclass.m p6, p0 = FR_Input_X, 0x1E3 // Test x natval, nan, inf + mov GR_exp_2_to_m3 = 0xffff - 3 // Exponent of 2^-3 +} +{ .mfb + nop.m 999 + fnorm.s1 FR_norm_x = FR_Input_X // Normalize x + br.cond.sptk SINCOSL_CONTINUE +} +;; + +GLOBAL_IEEE754_END(sinl) + +GLOBAL_IEEE754_ENTRY(cosl) +{ .mlx + alloc r32 = ar.pfs,0,27,2,0 + movl GR_sig_inv_pi = 0xa2f9836e4e44152a // significand of 1/pi +} +{ .mlx + mov GR_Sin_or_Cos = 0x1 + movl GR_rshf_2to64 = 0x47e8000000000000 // 1.1000 2^(63+64) +} +;; + +{ .mfi + addl GR_ad_p = @ltoff(FSINCOSL_CONSTANTS#), gp + fclass.m p6, p0 = FR_Input_X, 0x1E3 // Test x natval, nan, inf + mov GR_exp_2_to_m3 = 0xffff - 3 // Exponent of 2^-3 +} +{ .mfi + nop.m 999 + fnorm.s1 FR_norm_x = FR_Input_X // Normalize x + nop.i 999 +} +;; + +SINCOSL_CONTINUE: +{ .mfi + setf.sig FR_inv_pi_2to63 = GR_sig_inv_pi // Form 1/pi * 2^63 + nop.f 999 + mov GR_exp_2tom64 = 0xffff - 64 // Scaling constant to compute N +} +{ .mlx + setf.d FR_rshf_2to64 = GR_rshf_2to64 // Form const 1.1000 * 2^(63+64) + movl GR_rshf = 0x43e8000000000000 // Form const 1.1000 * 2^63 +} +;; + +{ .mfi + ld8 GR_ad_p = [GR_ad_p] // Point to Inv_pi_by_2 + fclass.m p7, p0 = FR_Input_X, 0x0b // Test x denormal + nop.i 999 +} +;; + +{ .mfi + getf.exp GR_signexp_x = FR_Input_X // Get sign and exponent of x + fclass.m p10, p0 = FR_Input_X, 0x007 // Test x zero + nop.i 999 +} +{ .mib + mov GR_exp_mask = 0x1ffff // Exponent mask + nop.i 999 +(p6) br.cond.spnt SINCOSL_SPECIAL // Branch if x natval, nan, inf +} +;; + +{ .mfi + setf.exp FR_2tom64 = GR_exp_2tom64 // Form 2^-64 for scaling N_float + nop.f 0 + add GR_ad_d = 0x70, GR_ad_p // Point to constant table d +} +{ .mib + setf.d FR_rshf = GR_rshf // Form right shift const 1.1000 * 2^63 + mov GR_exp_m2_to_m3 = 0x2fffc // Form -(2^-3) +(p7) br.cond.spnt SINCOSL_DENORMAL // Branch if x denormal +} +;; + +SINCOSL_COMMON: +{ .mfi + and GR_exp_x = GR_exp_mask, GR_signexp_x // Get exponent of x + fclass.nm p8, p0 = FR_Input_X, 0x1FF // Test x unsupported type + mov GR_exp_2_to_63 = 0xffff + 63 // Exponent of 2^63 +} +{ .mib + add GR_ad_pp = 0x40, GR_ad_d // Point to constant table pp + mov GR_exp_2_to_24 = 0xffff + 24 // Exponent of 2^24 +(p10) br.cond.spnt SINCOSL_ZERO // Branch if x zero +} +;; + +{ .mfi + ldfe FR_Inv_pi_by_2 = [GR_ad_p], 16 // Load 2/pi + fcmp.eq.s0 p15, p0 = FR_Input_X, f0 // Dummy to set denormal + add GR_ad_qq = 0xa0, GR_ad_pp // Point to constant table qq +} +{ .mfi + ldfe FR_Pi_by_4 = [GR_ad_d], 16 // Load pi/4 for range test + nop.f 999 + cmp.ge p10,p0 = GR_exp_x, GR_exp_2_to_63 // Is |x| >= 2^63 +} +;; + +{ .mfi + ldfe FR_P_0 = [GR_ad_p], 16 // Load P_0 for pi/4 <= |x| < 2^63 + fmerge.s FR_abs_x = f1, FR_norm_x // |x| + add GR_ad_c = 0x90, GR_ad_qq // Point to constant table c +} +{ .mfi + ldfe FR_Inv_P_0 = [GR_ad_d], 16 // Load 1/P_0 for pi/4 <= |x| < 2^63 + nop.f 999 + cmp.ge p7,p0 = GR_exp_x, GR_exp_2_to_24 // Is |x| >= 2^24 +} +;; + +{ .mfi + ldfe FR_P_1 = [GR_ad_p], 16 // Load P_1 for pi/4 <= |x| < 2^63 + nop.f 999 + add GR_ad_s = 0x50, GR_ad_c // Point to constant table s +} +{ .mfi + ldfe FR_PP_8 = [GR_ad_pp], 16 // Load PP_8 for 2^-3 < |r| < pi/4 + nop.f 999 + nop.i 999 +} +;; + +{ .mfi + ldfe FR_P_2 = [GR_ad_p], 16 // Load P_2 for pi/4 <= |x| < 2^63 + nop.f 999 + add GR_ad_ce = 0x40, GR_ad_c // Point to end of constant table c +} +{ .mfi + ldfe FR_QQ_8 = [GR_ad_qq], 16 // Load QQ_8 for 2^-3 < |r| < pi/4 + nop.f 999 + nop.i 999 +} +;; + +{ .mfi + ldfe FR_QQ_7 = [GR_ad_qq], 16 // Load QQ_7 for 2^-3 < |r| < pi/4 + fma.s1 FR_N_float_signif = FR_Input_X, FR_inv_pi_2to63, FR_rshf_2to64 + add GR_ad_se = 0x40, GR_ad_s // Point to end of constant table s +} +{ .mib + ldfe FR_PP_7 = [GR_ad_pp], 16 // Load PP_7 for 2^-3 < |r| < pi/4 + mov GR_ad_s1 = GR_ad_s // Save pointer to S_1 +(p10) br.cond.spnt SINCOSL_ARG_TOO_LARGE // Branch if |x| >= 2^63 + // Use Payne-Hanek Reduction +} +;; + +{ .mfi + ldfe FR_P_3 = [GR_ad_p], 16 // Load P_3 for pi/4 <= |x| < 2^63 + fmerge.se FR_r = FR_norm_x, FR_norm_x // r = x, in case |x| < pi/4 + add GR_ad_m14 = 0x50, GR_ad_s // Point to constant table m14 +} +{ .mfb + ldfps FR_Two_to_M3, FR_Neg_Two_to_M3 = [GR_ad_d], 8 + fma.s1 FR_rsq = FR_norm_x, FR_norm_x, f0 // rsq = x*x, in case |x| < pi/4 +(p7) br.cond.spnt SINCOSL_LARGER_ARG // Branch if 2^24 <= |x| < 2^63 + // Use pre-reduction +} +;; + +{ .mmf + ldfe FR_PP_6 = [GR_ad_pp], 16 // Load PP_6 for normal path + ldfe FR_QQ_6 = [GR_ad_qq], 16 // Load QQ_6 for normal path + fmerge.se FR_c = f0, f0 // c = 0 in case |x| < pi/4 +} +;; + +{ .mmf + ldfe FR_PP_5 = [GR_ad_pp], 16 // Load PP_5 for normal path + ldfe FR_QQ_5 = [GR_ad_qq], 16 // Load QQ_5 for normal path + nop.f 999 +} +;; + +// Here if 0 < |x| < 2^24 +{ .mfi + ldfe FR_S_5 = [GR_ad_se], -16 // Load S_5 if i_1=0 + fcmp.lt.s1 p6, p7 = FR_abs_x, FR_Pi_by_4 // Test |x| < pi/4 + nop.i 999 +} +{ .mfi + ldfe FR_C_5 = [GR_ad_ce], -16 // Load C_5 if i_1=1 + fms.s1 FR_N_float = FR_N_float_signif, FR_2tom64, FR_rshf + nop.i 999 +} +;; + +{ .mmi + ldfe FR_S_4 = [GR_ad_se], -16 // Load S_4 if i_1=0 + ldfe FR_C_4 = [GR_ad_ce], -16 // Load C_4 if i_1=1 + nop.i 999 +} +;; + +// +// N = Arg * 2/pi +// Check if Arg < pi/4 +// +// +// Case 2: Convert integer N_fix back to normalized floating-point value. +// Case 1: p8 is only affected when p6 is set +// +// +// Grab the integer part of N and call it N_fix +// +{ .mfi +(p7) ldfps FR_Two_to_M33, FR_Neg_Two_to_M33 = [GR_ad_d], 8 +(p6) fma.s1 FR_r_cubed = FR_r, FR_rsq, f0 // r^3 if |x| < pi/4 +(p6) mov GR_N_Inc = GR_Sin_or_Cos // N_Inc if |x| < pi/4 +} +;; + +// If |x| < pi/4, r = x and c = 0 +// lf |x| < pi/4, is x < 2**(-3). +// r = Arg +// c = 0 +{ .mmi +(p7) getf.sig GR_N_Inc = FR_N_float_signif +(p6) cmp.lt.unc p8,p0 = GR_exp_x, GR_exp_2_to_m3 // Is |x| < 2^-3 +(p6) tbit.z p9,p10 = GR_N_Inc, 0 // p9 if i_1=0, N mod 4 = 0,1 + // p10 if i_1=1, N mod 4 = 2,3 +} +;; + +// +// lf |x| < pi/4, is -2**(-3)< x < 2**(-3) - set p8. +// If |x| >= pi/4, +// Create the right N for |x| < pi/4 and otherwise +// Case 2: Place integer part of N in GP register +// + + +{ .mbb + nop.m 999 +(p8) br.cond.spnt SINCOSL_SMALL_R_0 // Branch if 0 < |x| < 2^-3 +(p6) br.cond.spnt SINCOSL_NORMAL_R_0 // Branch if 2^-3 <= |x| < pi/4 +} +;; + +// Here if pi/4 <= |x| < 2^24 +{ .mfi + ldfs FR_Neg_Two_to_M67 = [GR_ad_d], 8 // Load -2^-67 + fnma.s1 FR_s = FR_N_float, FR_P_1, FR_Input_X // s = -N * P_1 + Arg + add GR_N_Inc = GR_N_Inc, GR_Sin_or_Cos // Adjust N_Inc for sin/cos +} +{ .mfi + nop.m 999 + fma.s1 FR_w = FR_N_float, FR_P_2, f0 // w = N * P_2 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fms.s1 FR_r = FR_s, f1, FR_w // r = s - w, assume |s| >= 2^-33 + tbit.z p9,p10 = GR_N_Inc, 0 // p9 if i_1=0, N mod 4 = 0,1 + // p10 if i_1=1, N mod 4 = 2,3 +} +;; + +{ .mfi + nop.m 999 + fcmp.lt.s1 p7, p6 = FR_s, FR_Two_to_M33 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p7) fcmp.gt.s1 p7, p6 = FR_s, FR_Neg_Two_to_M33 // p6 if |s| >= 2^-33, else p7 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fms.s1 FR_c = FR_s, f1, FR_r // c = s - r, for |s| >= 2^-33 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 FR_rsq = FR_r, FR_r, f0 // rsq = r * r, for |s| >= 2^-33 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p7) fma.s1 FR_w = FR_N_float, FR_P_3, f0 + nop.i 999 +} +;; + +{ .mmf +(p9) ldfe FR_C_1 = [GR_ad_pp], 16 // Load C_1 if i_1=0 +(p10) ldfe FR_S_1 = [GR_ad_qq], 16 // Load S_1 if i_1=1 + frcpa.s1 FR_r_hi, p15 = f1, FR_r // r_hi = frcpa(r) +} +;; + +{ .mfi + nop.m 999 +(p6) fcmp.lt.unc.s1 p8, p13 = FR_r, FR_Two_to_M3 // If big s, test r with 2^-3 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p7) fma.s1 FR_U_1 = FR_N_float, FR_P_2, FR_w + nop.i 999 +} +;; + +// +// For big s: r = s - w: No futher reduction is necessary +// For small s: w = N * P_3 (change sign) More reduction +// +{ .mfi + nop.m 999 +(p8) fcmp.gt.s1 p8, p13 = FR_r, FR_Neg_Two_to_M3 // If big s, p8 if |r| < 2^-3 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p9) fma.s1 FR_poly = FR_rsq, FR_PP_8, FR_PP_7 // poly = rsq*PP_8+PP_7 if i_1=0 + nop.i 999 +} +{ .mfi + nop.m 999 +(p10) fma.s1 FR_poly = FR_rsq, FR_QQ_8, FR_QQ_7 // poly = rsq*QQ_8+QQ_7 if i_1=1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p7) fms.s1 FR_r = FR_s, f1, FR_U_1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p6) fma.s1 FR_r_cubed = FR_r, FR_rsq, f0 // rcubed = r * rsq + nop.i 999 +} +;; + +{ .mfi +// +// For big s: Is |r| < 2**(-3)? +// For big s: c = S - r +// For small s: U_1 = N * P_2 + w +// +// If p8 is set, prepare to branch to Small_R. +// If p9 is set, prepare to branch to Normal_R. +// For big s, r is complete here. +// +// +// For big s: c = c + w (w has not been negated.) +// For small s: r = S - U_1 +// + nop.m 999 +(p6) fms.s1 FR_c = FR_c, f1, FR_w + nop.i 999 +} +{ .mbb + nop.m 999 +(p8) br.cond.spnt SINCOSL_SMALL_R_1 // Branch if |s|>=2^-33, |r| < 2^-3, + // and pi/4 <= |x| < 2^24 +(p13) br.cond.sptk SINCOSL_NORMAL_R_1 // Branch if |s|>=2^-33, |r| >= 2^-3, + // and pi/4 <= |x| < 2^24 +} +;; + +SINCOSL_S_TINY: +// +// Here if |s| < 2^-33, and pi/4 <= |x| < 2^24 +// +{ .mfi + fms.s1 FR_U_2 = FR_N_float, FR_P_2, FR_U_1 +// +// c = S - U_1 +// r = S_1 * r +// +// +} +;; + +{ .mmi + nop.m 999 +// +// Get [i_0,i_1] - two lsb of N_fix_gr. +// Do dummy fmpy so inexact is always set. +// + tbit.z p9,p10 = GR_N_Inc, 0 // p9 if i_1=0, N mod 4 = 0,1 + // p10 if i_1=1, N mod 4 = 2,3 +} +;; + +// +// For small s: U_2 = N * P_2 - U_1 +// S_1 stored constant - grab the one stored with the +// coefficients. +// +{ .mfi + ldfe FR_S_1 = [GR_ad_s1], 16 +// +// Check if i_1 and i_0 != 0 +// +(p10) fma.s1 FR_poly = f0, f1, FR_Neg_Two_to_M67 + tbit.z p11,p12 = GR_N_Inc, 1 // p11 if i_0=0, N mod 4 = 0,2 + // p12 if i_0=1, N mod 4 = 1,3 +} +;; + +{ .mfi + nop.m 999 + fms.s1 FR_s = FR_s, f1, FR_r + nop.i 999 +} +{ .mfi + nop.m 999 +// +// S = S - r +// U_2 = U_2 + w +// load S_1 +// + fma.s1 FR_rsq = FR_r, FR_r, f0 + nop.i 999 ;; +} +{ .mfi + nop.m 999 + fma.s1 FR_U_2 = FR_U_2, f1, FR_w + nop.i 999 +} +{ .mfi + nop.m 999 + fmerge.se FR_tmp_result = FR_r, FR_r + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p10) fma.s1 FR_tmp_result = f0, f1, f1 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// FR_rsq = r * r +// Save r as the result. +// + fms.s1 FR_c = FR_s, f1, FR_U_1 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// if ( i_1 ==0) poly = c + S_1*r*r*r +// else Result = 1 +// +(p12) fnma.s1 FR_tmp_result = FR_tmp_result, f1, f0 + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 FR_r = FR_S_1, FR_r, f0 + nop.i 999 ;; +} +{ .mfi + nop.m 999 + fma.s0 FR_S_1 = FR_S_1, FR_S_1, f0 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// If i_1 != 0, poly = 2**(-67) +// + fms.s1 FR_c = FR_c, f1, FR_U_2 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// c = c - U_2 +// +(p9) fma.s1 FR_poly = FR_r, FR_rsq, FR_c + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// i_0 != 0, so Result = -Result +// +(p11) fma.s0 FR_Result = FR_tmp_result, f1, FR_poly + nop.i 999 ;; +} +{ .mfb + nop.m 999 +(p12) fms.s0 FR_Result = FR_tmp_result, f1, FR_poly +// +// if (i_0 == 0), Result = Result + poly +// else Result = Result - poly +// + br.ret.sptk b0 // Exit if |s| < 2^-33, and pi/4 <= |x| < 2^24 +} +;; + +SINCOSL_LARGER_ARG: +// +// Here if 2^24 <= |x| < 2^63 +// +{ .mfi + ldfe FR_d_1 = [GR_ad_p], 16 // Load d_1 for |x| >= 2^24 path + fma.s1 FR_N_0 = FR_Input_X, FR_Inv_P_0, f0 + nop.i 999 +} +;; + +// +// N_0 = Arg * Inv_P_0 +// +// Load values 2**(-14) and -2**(-14) +{ .mmi + ldfps FR_Two_to_M14, FR_Neg_Two_to_M14 = [GR_ad_m14] + nop.i 999 ;; +} +{ .mfi + ldfe FR_d_2 = [GR_ad_p], 16 // Load d_2 for |x| >= 2^24 path + nop.f 999 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// + fcvt.fx.s1 FR_N_0_fix = FR_N_0 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N_0_fix = integer part of N_0 +// + fcvt.xf FR_N_0 = FR_N_0_fix + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// Make N_0 the integer part +// + fnma.s1 FR_ArgPrime = FR_N_0, FR_P_0, FR_Input_X + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 FR_w = FR_N_0, FR_d_1, f0 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// Arg' = -N_0 * P_0 + Arg +// w = N_0 * d_1 +// + fma.s1 FR_N_float = FR_ArgPrime, FR_Inv_pi_by_2, f0 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N = A' * 2/pi +// + fcvt.fx.s1 FR_N_fix = FR_N_float + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N_fix is the integer part +// + fcvt.xf FR_N_float = FR_N_fix + nop.i 999 ;; +} +{ .mfi + getf.sig GR_N_Inc = FR_N_fix + nop.f 999 + nop.i 999 ;; +} +{ .mii + nop.m 999 + nop.i 999 ;; + add GR_N_Inc = GR_N_Inc, GR_Sin_or_Cos ;; +} +{ .mfi + nop.m 999 +// +// N is the integer part of the reduced-reduced argument. +// Put the integer in a GP register +// + fnma.s1 FR_s = FR_N_float, FR_P_1, FR_ArgPrime + nop.i 999 +} +{ .mfi + nop.m 999 + fnma.s1 FR_w = FR_N_float, FR_P_2, FR_w + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// s = -N*P_1 + Arg' +// w = -N*P_2 + w +// N_fix_gr = N_fix_gr + N_inc +// + fcmp.lt.unc.s1 p9, p8 = FR_s, FR_Two_to_M14 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p9) fcmp.gt.s1 p9, p8 = FR_s, FR_Neg_Two_to_M14 // p9 if |s| < 2^-14 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// For |s| > 2**(-14) r = S + w (r complete) +// Else U_hi = N_0 * d_1 +// +(p9) fma.s1 FR_V_hi = FR_N_float, FR_P_2, f0 + nop.i 999 +} +{ .mfi + nop.m 999 +(p9) fma.s1 FR_U_hi = FR_N_0, FR_d_1, f0 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// Either S <= -2**(-14) or S >= 2**(-14) +// or -2**(-14) < s < 2**(-14) +// +(p8) fma.s1 FR_r = FR_s, f1, FR_w + nop.i 999 +} +{ .mfi + nop.m 999 +(p9) fma.s1 FR_w = FR_N_float, FR_P_3, f0 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// We need abs of both U_hi and V_hi - don't +// worry about switched sign of V_hi. +// +(p9) fms.s1 FR_A = FR_U_hi, f1, FR_V_hi + nop.i 999 +} +{ .mfi + nop.m 999 +// +// Big s: finish up c = (S - r) + w (c complete) +// Case 4: A = U_hi + V_hi +// Note: Worry about switched sign of V_hi, so subtract instead of add. +// +(p9) fnma.s1 FR_V_lo = FR_N_float, FR_P_2, FR_V_hi + nop.i 999 ;; +} +{ .mmf + nop.m 999 + nop.m 999 +(p9) fms.s1 FR_U_lo = FR_N_0, FR_d_1, FR_U_hi +} +{ .mfi + nop.m 999 +(p9) fmerge.s FR_V_hiabs = f0, FR_V_hi + nop.i 999 ;; +} +//{ .mfb +//(p9) fmerge.s f8= FR_V_lo,FR_V_lo +//(p9) br.ret.sptk b0 +//} +//;; +{ .mfi + nop.m 999 +// For big s: c = S - r +// For small s do more work: U_lo = N_0 * d_1 - U_hi +// +(p9) fmerge.s FR_U_hiabs = f0, FR_U_hi + nop.i 999 +} +{ .mfi + nop.m 999 +// +// For big s: Is |r| < 2**(-3) +// For big s: if p12 set, prepare to branch to Small_R. +// For big s: If p13 set, prepare to branch to Normal_R. +// +(p8) fms.s1 FR_c = FR_s, f1, FR_r + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// For small S: V_hi = N * P_2 +// w = N * P_3 +// Note the product does not include the (-) as in the writeup +// so (-) missing for V_hi and w. +// +(p8) fcmp.lt.unc.s1 p12, p13 = FR_r, FR_Two_to_M3 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p12) fcmp.gt.s1 p12, p13 = FR_r, FR_Neg_Two_to_M3 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p8) fma.s1 FR_c = FR_c, f1, FR_w + nop.i 999 +} +{ .mfb + nop.m 999 +(p9) fms.s1 FR_w = FR_N_0, FR_d_2, FR_w +(p12) br.cond.spnt SINCOSL_SMALL_R // Branch if |r| < 2^-3 + // and 2^24 <= |x| < 2^63 +} +;; + +{ .mib + nop.m 999 + nop.i 999 +(p13) br.cond.sptk SINCOSL_NORMAL_R // Branch if |r| >= 2^-3 + // and 2^24 <= |x| < 2^63 +} +;; + +SINCOSL_LARGER_S_TINY: +// +// Here if |s| < 2^-14, and 2^24 <= |x| < 2^63 +// +{ .mfi + nop.m 999 +// +// Big s: Vector off when |r| < 2**(-3). Recall that p8 will be true. +// The remaining stuff is for Case 4. +// Small s: V_lo = N * P_2 + U_hi (U_hi is in place of V_hi in writeup) +// Note: the (-) is still missing for V_lo. +// Small s: w = w + N_0 * d_2 +// Note: the (-) is now incorporated in w. +// + fcmp.ge.unc.s1 p7, p8 = FR_U_hiabs, FR_V_hiabs +} +{ .mfi + nop.m 999 +// +// C_hi = S + A +// + fma.s1 FR_t = FR_U_lo, f1, FR_V_lo +} +;; + +{ .mfi + nop.m 999 +// +// t = U_lo + V_lo +// +// +(p7) fms.s1 FR_a = FR_U_hi, f1, FR_A + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p8) fma.s1 FR_a = FR_V_hi, f1, FR_A + nop.i 999 +} +;; + +{ .mfi +// +// Is U_hiabs >= V_hiabs? +// + nop.m 999 + fma.s1 FR_C_hi = FR_s, f1, FR_A + nop.i 999 ;; +} +{ .mmi + ldfe FR_C_1 = [GR_ad_c], 16 ;; + ldfe FR_C_2 = [GR_ad_c], 64 + nop.i 999 ;; +} +// +// c = c + C_lo finished. +// Load C_2 +// +{ .mfi + ldfe FR_S_1 = [GR_ad_s], 16 +// +// C_lo = S - C_hi +// + fma.s1 FR_t = FR_t, f1, FR_w + nop.i 999 ;; +} +// +// r and c have been computed. +// Make sure ftz mode is set - should be automatic when using wre +// |r| < 2**(-3) +// Get [i_0,i_1] - two lsb of N_fix. +// Load S_1 +// +{ .mfi + ldfe FR_S_2 = [GR_ad_s], 64 +// +// t = t + w +// +(p7) fms.s1 FR_a = FR_a, f1, FR_V_hi + tbit.z p9,p10 = GR_N_Inc, 0 // p9 if i_1=0, N mod 4 = 0,1 + // p10 if i_1=1, N mod 4 = 2,3 +} +;; +{ .mfi + nop.m 999 +// +// For larger u than v: a = U_hi - A +// Else a = V_hi - A (do an add to account for missing (-) on V_hi +// + fms.s1 FR_C_lo = FR_s, f1, FR_C_hi + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p8) fms.s1 FR_a = FR_U_hi, f1, FR_a + tbit.z p11,p12 = GR_N_Inc, 1 // p11 if i_0=0, N mod 4 = 0,2 + // p12 if i_0=1, N mod 4 = 1,3 +} +;; + +{ .mfi + nop.m 999 +// +// If u > v: a = (U_hi - A) + V_hi +// Else a = (V_hi - A) + U_hi +// In each case account for negative missing from V_hi. +// + fma.s1 FR_C_lo = FR_C_lo, f1, FR_A + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// C_lo = (S - C_hi) + A +// + fma.s1 FR_t = FR_t, f1, FR_a + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// t = t + a +// + fma.s1 FR_C_lo = FR_C_lo, f1, FR_t + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// C_lo = C_lo + t +// + fma.s1 FR_r = FR_C_hi, f1, FR_C_lo + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// Load S_2 +// + fma.s1 FR_rsq = FR_r, FR_r, f0 + nop.i 999 +} +{ .mfi + nop.m 999 +// +// r = C_hi + C_lo +// + fms.s1 FR_c = FR_C_hi, f1, FR_r + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// if i_1 ==0: poly = S_2 * FR_rsq + S_1 +// else poly = C_2 * FR_rsq + C_1 +// +(p9) fma.s1 FR_tmp_result = f0, f1, FR_r + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p10) fma.s1 FR_tmp_result = f0, f1, f1 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// Compute r_cube = FR_rsq * r +// +(p9) fma.s1 FR_poly = FR_rsq, FR_S_2, FR_S_1 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p10) fma.s1 FR_poly = FR_rsq, FR_C_2, FR_C_1 + nop.i 999 +} +{ .mfi + nop.m 999 +// +// Compute FR_rsq = r * r +// Is i_1 == 0 ? +// + fma.s1 FR_r_cubed = FR_rsq, FR_r, f0 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// c = C_hi - r +// Load C_1 +// + fma.s1 FR_c = FR_c, f1, FR_C_lo + nop.i 999 +} +{ .mfi + nop.m 999 +// +// if i_1 ==0: poly = r_cube * poly + c +// else poly = FR_rsq * poly +// +(p12) fms.s1 FR_tmp_result = f0, f1, FR_tmp_result + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// if i_1 ==0: Result = r +// else Result = 1.0 +// +(p9) fma.s1 FR_poly = FR_r_cubed, FR_poly, FR_c + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p10) fma.s1 FR_poly = FR_rsq, FR_poly, f0 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// if i_0 !=0: Result = -Result +// +(p11) fma.s0 FR_Result = FR_tmp_result, f1, FR_poly + nop.i 999 ;; +} +{ .mfb + nop.m 999 +(p12) fms.s0 FR_Result = FR_tmp_result, f1, FR_poly +// +// if i_0 == 0: Result = Result + poly +// else Result = Result - poly +// + br.ret.sptk b0 // Exit for |s| < 2^-14, and 2^24 <= |x| < 2^63 +} +;; + + +SINCOSL_SMALL_R: +// +// Here if |r| < 2^-3 +// +// Enter with r, c, and N_Inc computed +// +// Compare both i_1 and i_0 with 0. +// if i_1 == 0, set p9. +// if i_0 == 0, set p11. +// + +{ .mfi + nop.m 999 + fma.s1 FR_rsq = FR_r, FR_r, f0 // rsq = r * r + tbit.z p9,p10 = GR_N_Inc, 0 // p9 if i_1=0, N mod 4 = 0,1 + // p10 if i_1=1, N mod 4 = 2,3 +} +;; + +{ .mmi +(p9) ldfe FR_S_5 = [GR_ad_se], -16 // Load S_5 if i_1=0 +(p10) ldfe FR_C_5 = [GR_ad_ce], -16 // Load C_5 if i_1=1 + nop.i 999 +} +;; + +{ .mmi +(p9) ldfe FR_S_4 = [GR_ad_se], -16 // Load S_4 if i_1=0 +(p10) ldfe FR_C_4 = [GR_ad_ce], -16 // Load C_4 if i_1=1 + nop.i 999 +} +;; + +SINCOSL_SMALL_R_0: +// Entry point for 2^-3 < |x| < pi/4 +.pred.rel "mutex",p9,p10 +SINCOSL_SMALL_R_1: +// Entry point for pi/4 < |x| < 2^24 and |r| < 2^-3 +.pred.rel "mutex",p9,p10 +{ .mfi +(p9) ldfe FR_S_3 = [GR_ad_se], -16 // Load S_3 if i_1=0 + fma.s1 FR_Z = FR_rsq, FR_rsq, f0 // Z = rsq * rsq + nop.i 999 +} +{ .mfi +(p10) ldfe FR_C_3 = [GR_ad_ce], -16 // Load C_3 if i_1=1 +(p10) fnma.s1 FR_c = FR_c, FR_r, f0 // c = -c * r if i_1=0 + nop.i 999 +} +;; + +{ .mmf +(p9) ldfe FR_S_2 = [GR_ad_se], -16 // Load S_2 if i_1=0 +(p10) ldfe FR_C_2 = [GR_ad_ce], -16 // Load C_2 if i_1=1 +(p10) fmerge.s FR_r = f1, f1 +} +;; + +{ .mmi +(p9) ldfe FR_S_1 = [GR_ad_se], -16 // Load S_1 if i_1=0 +(p10) ldfe FR_C_1 = [GR_ad_ce], -16 // Load C_1 if i_1=1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fma.s1 FR_Z = FR_Z, FR_r, f0 // Z = Z * r if i_1=0 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fma.s1 FR_poly_lo = FR_rsq, FR_S_5, FR_S_4 // poly_lo=rsq*S_5+S_4 if i_1=0 + nop.i 999 +} +{ .mfi + nop.m 999 +(p10) fma.s1 FR_poly_lo = FR_rsq, FR_C_5, FR_C_4 // poly_lo=rsq*C_5+C_4 if i_1=1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fma.s1 FR_poly_hi = FR_rsq, FR_S_2, FR_S_1 // poly_hi=rsq*S_2+S_1 if i_1=0 + nop.i 999 +} +{ .mfi + nop.m 999 +(p10) fma.s1 FR_poly_hi = FR_rsq, FR_C_2, FR_C_1 // poly_hi=rsq*C_2+C_1 if i_1=1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 FR_Z = FR_Z, FR_rsq, f0 // Z = Z * rsq + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fma.s1 FR_poly_lo = FR_rsq, FR_poly_lo, FR_S_3 // p_lo=p_lo*rsq+S_3, i_1=0 + nop.i 999 +} +{ .mfi + nop.m 999 +(p10) fma.s1 FR_poly_lo = FR_rsq, FR_poly_lo, FR_C_3 // p_lo=p_lo*rsq+C_3, i_1=1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fma.s0 FR_inexact = FR_S_4, FR_S_4, f0 // Dummy op to set inexact + tbit.z p11,p12 = GR_N_Inc, 1 // p11 if i_0=0, N mod 4 = 0,2 + // p12 if i_0=1, N mod 4 = 1,3 +} +{ .mfi + nop.m 999 +(p10) fma.s0 FR_inexact = FR_C_1, FR_C_1, f0 // Dummy op to set inexact + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fma.s1 FR_poly_hi = FR_poly_hi, FR_rsq, f0 // p_hi=p_hi*rsq if i_1=0 + nop.i 999 +} +{ .mfi + nop.m 999 +(p10) fma.s1 FR_poly_hi = FR_poly_hi, FR_rsq, f0 // p_hi=p_hi*rsq if i_1=1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 FR_poly = FR_Z, FR_poly_lo, FR_c // poly=Z*poly_lo+c + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fma.s1 FR_poly_hi = FR_r, FR_poly_hi, f0 // p_hi=r*p_hi if i_1=0 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p12) fms.s1 FR_r = f0, f1, FR_r // r = -r if i_0=1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 FR_poly = FR_poly, f1, FR_poly_hi // poly=poly+poly_hi + nop.i 999 +} +;; + +// +// if (i_0 == 0) Result = r + poly +// if (i_0 != 0) Result = r - poly +// +{ .mfi + nop.m 999 +(p11) fma.s0 FR_Result = FR_r, f1, FR_poly + nop.i 999 +} +{ .mfb + nop.m 999 +(p12) fms.s0 FR_Result = FR_r, f1, FR_poly + br.ret.sptk b0 // Exit for |r| < 2^-3 +} +;; + + +SINCOSL_NORMAL_R: +// +// Here if 2^-3 <= |r| < pi/4 +// THIS IS THE MAIN PATH +// +// Enter with r, c, and N_Inc having been computed +// +{ .mfi + ldfe FR_PP_6 = [GR_ad_pp], 16 // Load PP_6 + fma.s1 FR_rsq = FR_r, FR_r, f0 // rsq = r * r + tbit.z p9,p10 = GR_N_Inc, 0 // p9 if i_1=0, N mod 4 = 0,1 + // p10 if i_1=1, N mod 4 = 2,3 +} +{ .mfi + ldfe FR_QQ_6 = [GR_ad_qq], 16 // Load QQ_6 + nop.f 999 + nop.i 999 +} +;; + +{ .mmi +(p9) ldfe FR_PP_5 = [GR_ad_pp], 16 // Load PP_5 if i_1=0 +(p10) ldfe FR_QQ_5 = [GR_ad_qq], 16 // Load QQ_5 if i_1=1 + nop.i 999 +} +;; + +SINCOSL_NORMAL_R_0: +// Entry for 2^-3 < |x| < pi/4 +.pred.rel "mutex",p9,p10 +{ .mmf +(p9) ldfe FR_C_1 = [GR_ad_pp], 16 // Load C_1 if i_1=0 +(p10) ldfe FR_S_1 = [GR_ad_qq], 16 // Load S_1 if i_1=1 + frcpa.s1 FR_r_hi, p6 = f1, FR_r // r_hi = frcpa(r) +} +;; + +{ .mfi + nop.m 999 +(p9) fma.s1 FR_poly = FR_rsq, FR_PP_8, FR_PP_7 // poly = rsq*PP_8+PP_7 if i_1=0 + nop.i 999 +} +{ .mfi + nop.m 999 +(p10) fma.s1 FR_poly = FR_rsq, FR_QQ_8, FR_QQ_7 // poly = rsq*QQ_8+QQ_7 if i_1=1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 FR_r_cubed = FR_r, FR_rsq, f0 // rcubed = r * rsq + nop.i 999 +} +;; + + +SINCOSL_NORMAL_R_1: +// Entry for pi/4 <= |x| < 2^24 +.pred.rel "mutex",p9,p10 +{ .mmf +(p9) ldfe FR_PP_1 = [GR_ad_pp], 16 // Load PP_1_hi if i_1=0 +(p10) ldfe FR_QQ_1 = [GR_ad_qq], 16 // Load QQ_1 if i_1=1 + frcpa.s1 FR_r_hi, p6 = f1, FR_r_hi // r_hi = frpca(frcpa(r)) +} +;; + +{ .mfi +(p9) ldfe FR_PP_4 = [GR_ad_pp], 16 // Load PP_4 if i_1=0 +(p9) fma.s1 FR_poly = FR_rsq, FR_poly, FR_PP_6 // poly = rsq*poly+PP_6 if i_1=0 + nop.i 999 +} +{ .mfi +(p10) ldfe FR_QQ_4 = [GR_ad_qq], 16 // Load QQ_4 if i_1=1 +(p10) fma.s1 FR_poly = FR_rsq, FR_poly, FR_QQ_6 // poly = rsq*poly+QQ_6 if i_1=1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fma.s1 FR_corr = FR_C_1, FR_rsq, f0 // corr = C_1 * rsq if i_1=0 + nop.i 999 +} +{ .mfi + nop.m 999 +(p10) fma.s1 FR_corr = FR_S_1, FR_r_cubed, FR_r // corr = S_1 * r^3 + r if i_1=1 + nop.i 999 +} +;; + +{ .mfi +(p9) ldfe FR_PP_3 = [GR_ad_pp], 16 // Load PP_3 if i_1=0 + fma.s1 FR_r_hi_sq = FR_r_hi, FR_r_hi, f0 // r_hi_sq = r_hi * r_hi + nop.i 999 +} +{ .mfi +(p10) ldfe FR_QQ_3 = [GR_ad_qq], 16 // Load QQ_3 if i_1=1 + fms.s1 FR_r_lo = FR_r, f1, FR_r_hi // r_lo = r - r_hi + nop.i 999 +} +;; + +{ .mfi +(p9) ldfe FR_PP_2 = [GR_ad_pp], 16 // Load PP_2 if i_1=0 +(p9) fma.s1 FR_poly = FR_rsq, FR_poly, FR_PP_5 // poly = rsq*poly+PP_5 if i_1=0 + nop.i 999 +} +{ .mfi +(p10) ldfe FR_QQ_2 = [GR_ad_qq], 16 // Load QQ_2 if i_1=1 +(p10) fma.s1 FR_poly = FR_rsq, FR_poly, FR_QQ_5 // poly = rsq*poly+QQ_5 if i_1=1 + nop.i 999 +} +;; + +{ .mfi +(p9) ldfe FR_PP_1_lo = [GR_ad_pp], 16 // Load PP_1_lo if i_1=0 +(p9) fma.s1 FR_corr = FR_corr, FR_c, FR_c // corr = corr * c + c if i_1=0 + nop.i 999 +} +{ .mfi + nop.m 999 +(p10) fnma.s1 FR_corr = FR_corr, FR_c, f0 // corr = -corr * c if i_1=1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fma.s1 FR_U_lo = FR_r, FR_r_hi, FR_r_hi_sq // U_lo = r*r_hi+r_hi_sq, i_1=0 + nop.i 999 +} +{ .mfi + nop.m 999 +(p10) fma.s1 FR_U_lo = FR_r_hi, f1, FR_r // U_lo = r_hi + r if i_1=1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fma.s1 FR_U_hi = FR_r_hi, FR_r_hi_sq, f0 // U_hi = r_hi*r_hi_sq if i_1=0 + nop.i 999 +} +{ .mfi + nop.m 999 +(p10) fma.s1 FR_U_hi = FR_QQ_1, FR_r_hi_sq, f1 // U_hi = QQ_1*r_hi_sq+1, i_1=1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fma.s1 FR_poly = FR_rsq, FR_poly, FR_PP_4 // poly = poly*rsq+PP_4 if i_1=0 + nop.i 999 +} +{ .mfi + nop.m 999 +(p10) fma.s1 FR_poly = FR_rsq, FR_poly, FR_QQ_4 // poly = poly*rsq+QQ_4 if i_1=1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fma.s1 FR_U_lo = FR_r, FR_r, FR_U_lo // U_lo = r * r + U_lo if i_1=0 + nop.i 999 +} +{ .mfi + nop.m 999 +(p10) fma.s1 FR_U_lo = FR_r_lo, FR_U_lo, f0 // U_lo = r_lo * U_lo if i_1=1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fma.s1 FR_U_hi = FR_PP_1, FR_U_hi, f0 // U_hi = PP_1 * U_hi if i_1=0 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fma.s1 FR_poly = FR_rsq, FR_poly, FR_PP_3 // poly = poly*rsq+PP_3 if i_1=0 + nop.i 999 +} +{ .mfi + nop.m 999 +(p10) fma.s1 FR_poly = FR_rsq, FR_poly, FR_QQ_3 // poly = poly*rsq+QQ_3 if i_1=1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fma.s1 FR_U_lo = FR_r_lo, FR_U_lo, f0 // U_lo = r_lo * U_lo if i_1=0 + nop.i 999 +} +{ .mfi + nop.m 999 +(p10) fma.s1 FR_U_lo = FR_QQ_1,FR_U_lo, f0 // U_lo = QQ_1 * U_lo if i_1=1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fma.s1 FR_U_hi = FR_r, f1, FR_U_hi // U_hi = r + U_hi if i_1=0 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fma.s1 FR_poly = FR_rsq, FR_poly, FR_PP_2 // poly = poly*rsq+PP_2 if i_1=0 + nop.i 999 +} +{ .mfi + nop.m 999 +(p10) fma.s1 FR_poly = FR_rsq, FR_poly, FR_QQ_2 // poly = poly*rsq+QQ_2 if i_1=1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fma.s1 FR_U_lo = FR_PP_1, FR_U_lo, f0 // U_lo = PP_1 * U_lo if i_1=0 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fma.s1 FR_poly = FR_rsq, FR_poly, FR_PP_1_lo // poly =poly*rsq+PP1lo i_1=0 + nop.i 999 +} +{ .mfi + nop.m 999 +(p10) fma.s1 FR_poly = FR_rsq, FR_poly, f0 // poly = poly*rsq if i_1=1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 FR_V = FR_U_lo, f1, FR_corr // V = U_lo + corr + tbit.z p11,p12 = GR_N_Inc, 1 // p11 if i_0=0, N mod 4 = 0,2 + // p12 if i_0=1, N mod 4 = 1,3 +} +;; + +{ .mfi + nop.m 999 +(p9) fma.s0 FR_inexact = FR_PP_5, FR_PP_4, f0 // Dummy op to set inexact + nop.i 999 +} +{ .mfi + nop.m 999 +(p10) fma.s0 FR_inexact = FR_QQ_5, FR_QQ_5, f0 // Dummy op to set inexact + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fma.s1 FR_poly = FR_r_cubed, FR_poly, f0 // poly = poly*r^3 if i_1=0 + nop.i 999 +} +{ .mfi + nop.m 999 +(p10) fma.s1 FR_poly = FR_rsq, FR_poly, f0 // poly = poly*rsq if i_1=1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p11) fma.s1 FR_tmp_result = f0, f1, f1// tmp_result=+1.0 if i_0=0 + nop.i 999 +} +{ .mfi + nop.m 999 +(p12) fms.s1 FR_tmp_result = f0, f1, f1// tmp_result=-1.0 if i_0=1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 FR_V = FR_poly, f1, FR_V // V = poly + V + nop.i 999 +} +;; + +// If i_0 = 0 Result = U_hi + V +// If i_0 = 1 Result = -U_hi - V +{ .mfi + nop.m 999 +(p11) fma.s0 FR_Result = FR_tmp_result, FR_U_hi, FR_V + nop.i 999 +} +{ .mfb + nop.m 999 +(p12) fms.s0 FR_Result = FR_tmp_result, FR_U_hi, FR_V + br.ret.sptk b0 // Exit for 2^-3 <= |r| < pi/4 +} +;; + +SINCOSL_ZERO: +// Here if x = 0 +{ .mfi + cmp.eq.unc p6, p7 = 0x1, GR_Sin_or_Cos + nop.f 999 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p7) fmerge.s FR_Result = FR_Input_X, FR_Input_X // If sin, result = input + nop.i 999 +} +{ .mfb + nop.m 999 +(p6) fma.s0 FR_Result = f1, f1, f0 // If cos, result=1.0 + br.ret.sptk b0 // Exit for x=0 +} +;; + + +SINCOSL_DENORMAL: +{ .mmb + getf.exp GR_signexp_x = FR_norm_x // Get sign and exponent of x + nop.m 999 + br.cond.sptk SINCOSL_COMMON // Return to common code +} +;; + +SINCOSL_SPECIAL: +{ .mfb + nop.m 999 +// +// Path for Arg = +/- QNaN, SNaN, Inf +// Invalid can be raised. SNaNs +// become QNaNs +// + fmpy.s0 FR_Result = FR_Input_X, f0 + br.ret.sptk b0 ;; +} + +GLOBAL_IEEE754_END(cosl) + +// ******************************************************************* +// ******************************************************************* +// ******************************************************************* +// +// Special Code to handle very large argument case. +// Call int __libm_pi_by_2_reduce(x,r,c) for |arguments| >= 2**63 +// The interface is custom: +// On input: +// (Arg or x) is in f8 +// On output: +// r is in f8 +// c is in f9 +// N is in r8 +// Be sure to allocate at least 2 GP registers as output registers for +// __libm_pi_by_2_reduce. This routine uses r59-60. These are used as +// scratch registers within the __libm_pi_by_2_reduce routine (for speed). +// +// We know also that __libm_pi_by_2_reduce preserves f10-15, f71-127. We +// use this to eliminate save/restore of key fp registers in this calling +// function. +// +// ******************************************************************* +// ******************************************************************* +// ******************************************************************* + +LOCAL_LIBM_ENTRY(__libm_callout) +SINCOSL_ARG_TOO_LARGE: +.prologue +{ .mfi + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +};; + +{ .mmi + setf.exp FR_Two_to_M3 = GR_exp_2_to_m3 // Form 2^-3 + mov GR_SAVE_GP=gp // Save gp +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; + +.body +// +// Call argument reduction with x in f8 +// Returns with N in r8, r in f8, c in f9 +// Assumes f71-127 are preserved across the call +// +{ .mib + setf.exp FR_Neg_Two_to_M3 = GR_exp_m2_to_m3 // Form -(2^-3) + nop.i 0 + br.call.sptk b0=__libm_pi_by_2_reduce# +};; + +{ .mfi + add GR_N_Inc = GR_Sin_or_Cos,r8 + fcmp.lt.unc.s1 p6, p0 = FR_r, FR_Two_to_M3 + mov b0 = GR_SAVE_B0 // Restore return address +};; + +{ .mfi + mov gp = GR_SAVE_GP // Restore gp +(p6) fcmp.gt.unc.s1 p6, p0 = FR_r, FR_Neg_Two_to_M3 + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs +};; + +{ .mbb + nop.m 999 +(p6) br.cond.spnt SINCOSL_SMALL_R // Branch if |r|< 2^-3 for |x| >= 2^63 + br.cond.sptk SINCOSL_NORMAL_R // Branch if |r|>=2^-3 for |x| >= 2^63 +};; + +LOCAL_LIBM_END(__libm_callout) +.type __libm_pi_by_2_reduce#,@function +.global __libm_pi_by_2_reduce# diff --git a/sysdeps/ia64/fpu/s_erf.S b/sysdeps/ia64/fpu/s_erf.S new file mode 100644 index 0000000000..7174a197fb --- /dev/null +++ b/sysdeps/ia64/fpu/s_erf.S @@ -0,0 +1,926 @@ +.file "erf.s" + + +// Copyright (c) 2001 - 2005, Intel Corporation +// All rights reserved. +// +// Contributed 2001 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 08/15/01 Initial version +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/06/03 Reordered header: .section, .global, .proc, .align +// 03/31/05 Reformatted delimiters between data tables +// +// API +//============================================================== +// double erf(double) +// +// Overview of operation +//============================================================== +// Background +// +// +// There are 9 paths: +// 1. x = +/-0.0 +// Return erf(x) = +/-0.0 +// +// 2. 0.0 < |x| < 0.5 +// Return erf(x) = x *Pol9(x^2) +// +// 3. For several subranges of 0.5 <= |x| < 5.90625 +// Return erf(x) = sign(x)*Pol19(y), +// where y = (|x|-b)/a, Pol19(y) = A0 + A1*y^1 + A2*y^2 + ... + A19*y^19 +// +// For each subrange there is particular set of coefficients. +// Below is the list of subranges: +// 3.1 0.5 <= |x| < 1.0 b = a = 0.5 +// 3.2 1.0 <= |x| < 2.0, b = a = 1.0 +// 3.3 2.0 <= |x| < 3.25 b = a = 2.0 +// 3.4 4.0 <= |x| < 5.90625 b = 4.0, a = 2.0 +// +// 4. 3.25 <= |x| < 4.0 +// Return erf(x) = sign(x)*Pol14(|x| - 3.25) +// +// 5. 5.90625 <= |x| < +INF +// Return erf(x) = sign(x)*(1.0d - 2^(-63)) +// +// 6. |x| = INF +// Return erf(x) = sign(x) * 1.0 +// +// 7. x = [S,Q]NaN +// Return erf(x) = QNaN +// +// 8. x is positive denormal +// Return erf(x) = A0*x - x^2, +// where A0 = 2.0/sqrt(Pi) +// +// 9. x is negative denormal +// Return erf(x) = A0*x + x^2, +// where A0 = 2.0/sqrt(Pi) +// +// Registers used +//============================================================== +// Floating Point registers used: +// f8, input, output +// f32 -> f63 + +// General registers used: +// r32 -> r48, r2, r3 + +// Predicate registers used: +// p0, p6 -> p15 + +// p6 to filter out case when x = denormal +// p7 to filter out case when x = [Q,S]NaN or +/-0, +// used also to process denormals +// p8 to filter out case when 3.25 <= |x| < 4.0, +// used also to process denormals +// p9 to filter out case when |x| = inf +// p10 to filter out case when |x| < 0.5 +// p11 set when |x| < 3.25 or |x| > 4.0 +// p12 to filter out case when |x| >= 5.90625 +// p13 set if 4.0 <=|x| < 5.90625 +// p14 set to 1 for positive x +// p15 set to 1 for negative x + +// Assembly macros +//============================================================== +rDataPtr = r2 +rDataPtr1 = r3 + +rBias = r33 +rCoeffAddr3 = r34 +rThreeAndQ = r35 +rCoeffAddr2 = r36 +rMask = r37 +rArg = r38 +rSignBit = r39 +rAbsArg = r40 +rSaturation = r41 +rIndex = r42 +rCoeffAddr1 = r43 +rCoeffAddr4 = r44 +rShiftedArg = r45 +rShiftedArgMasked = r46 +rBiasedExpOf4 = r47 +rShiftedAbsArg = r48 + +//============================================================== +fA0 = f32 +fA1 = f33 +fA2 = f34 +fA3 = f35 +fA4 = f36 +fA5 = f37 +fA6 = f38 +fA7 = f39 +fA8 = f40 +fA9 = f41 +fA10 = f42 +fA11 = f43 +fA12 = f44 +fA13 = f45 +fA14 = f46 +fA15 = f47 +fA16 = f48 +fA17 = f49 +fA18 = f50 +fA19 = f51 +fArgSqr = f52 +fArgAbsNorm = f53 +fSignumX = f54 +fRes = f55 +fThreeAndQ = f56 +fArgAbs = f57 +fTSqr = f58 +fTQuadr = f59 +fTDeg3 = f60 +fTDeg7 = f61 +fArgAbsNormSgn = f62 +fTQuadrSgn = f63 + +// Data tables +//============================================================== +RODATA + +.align 64 + +LOCAL_OBJECT_START(erf_data) +// Coefficients ##0..15 +// Polynomial coefficients for the erf(x), 0.5 <= |x| < 1.0 +data8 0xB69AC40646D1F6C1, 0x00003FD2 //A19 +data8 0x90AD48C0118FA10C, 0x00003FD7 //A18 +data8 0x826FBAD055EA4AB8, 0x0000BFDB //A17 +data8 0x8DAB171246CC2B89, 0x00003FDC //A16 +data8 0xC0B1D6662F8A7564, 0x00003FDF //A15 +data8 0xA46374AC35099BAF, 0x0000BFE1 //A14 +data8 0xB2F230996346EF27, 0x0000BFE4 //A13 +data8 0xCDEC50950FACE04A, 0x00003FE6 //A12 +data8 0x826014649396E9D2, 0x00003FE9 //A11 +data8 0xCDB787DC718B13F9, 0x0000BFEB //A10 +data8 0x8E0B23C24EE0C8EE, 0x0000BFED //A9 +data8 0xA49EA40A4E5A3F76, 0x00003FF0 //A8 +data8 0xB11E30BE912617D3, 0x00003FF0 //A7 +data8 0xCCF89D9351CE26E3, 0x0000BFF4 //A6 +data8 0xEFF75AD1F0F22809, 0x00003FF2 //A5 +data8 0xBB793EF404C09A22, 0x00003FF8 //A4 +// Polynomial coefficients for the erf(x), 1.0 <= |x| < 2.0 +data8 0xBAE93FF4174EA59B, 0x00003FE6 //A19 +data8 0x8A0FD46092F95D44, 0x0000BFEA //A18 +data8 0xA37B3242B7809E12, 0x00003FEC //A17 +data8 0xA0330A5CD2E91689, 0x0000BFED //A16 +data8 0x8E34A678F3497D17, 0x0000BFEC //A15 +data8 0xAC185D45A2772384, 0x00003FEF //A14 +data8 0xB0C11347CE7EEDE8, 0x00003FEF //A13 +data8 0xD3330DC14EA0E4EB, 0x0000BFF2 //A12 +data8 0xB4A6DFDE578A428F, 0x00003FF1 //A11 +data8 0xA0B4034310D2D9CB, 0x00003FF5 //A10 +data8 0xF71662D3132B7759, 0x0000BFF5 //A9 +data8 0x9C88BF157695E9EC, 0x0000BFF7 //A8 +data8 0xF84B80EFCA43895D, 0x00003FF8 //A7 +data8 0x9722D22DA628A17B, 0x00003FF7 //A6 +data8 0x8DB0A586F8F3381F, 0x0000BFFB //A5 +data8 0x8DB0A5879F87E5BE, 0x00003FFB //A4 +// Polynomial coefficients for the erf(x), 2.0 <= |x| < 3.25 +data8 0x9C4AF1F3A4B21AFC, 0x00003FF6 //A19 +data8 0x8D40D5D5DB741AB8, 0x0000BFF9 //A18 +data8 0xDEBE7099E0A75BA4, 0x00003FFA //A17 +data8 0xB99A33294D32429D, 0x0000BFFB //A16 +data8 0x8109D9C7197BC7C9, 0x00003FFB //A15 +data8 0xC30DE8E2EFC2D760, 0x00003FFA //A14 +data8 0x80DDA28C5B35DC73, 0x0000BFFC //A13 +data8 0x9BE4DE5095BACE0D, 0x00003FF9 //A12 +data8 0xDA4092509EE7D111, 0x00003FFC //A11 +data8 0x89D98C561B0C9040, 0x0000BFFD //A10 +data8 0xD20B26EB2F0881D4, 0x0000BFF9 //A9 +data8 0xD089C56948731561, 0x00003FFD //A8 +data8 0xDD704DEFFB21B7E7, 0x0000BFFD //A7 +data8 0xF0C9A6BBDE469115, 0x00003FF9 //A6 +data8 0xD673A02CB5766633, 0x00003FFD //A5 +data8 0x8D162CBAD8A12649, 0x0000BFFE //A4 +// Polynomial coefficients for the erf(x), 4.0 <= |x| < 6.0 +data8 0xD4428B75C6FE8FD1, 0x0000BFFC //A19 +data8 0xF76BE1935675D5C8, 0x00003FFE //A18 +data8 0xFD6BB3B14AA7A8E6, 0x0000BFFF //A17 +data8 0x8BE8F573D348DDA4, 0x00004000 //A16 +data8 0x81E91923A1030502, 0x0000BFFF //A15 +data8 0xCE7FE87B26CFD286, 0x0000BFFE //A14 +data8 0x84EF6B4E17404384, 0x00004000 //A13 +data8 0x91FEF33015404991, 0x0000C000 //A12 +data8 0xDEDF6A9370747E56, 0x00003FFF //A11 +data8 0x8397E6FF56CDFD9D, 0x0000BFFF //A10 +data8 0xFAD1CE912473937B, 0x00003FFD //A9 +data8 0xC48C1EA8AAA624EA, 0x0000BFFC //A8 +data8 0xFECAF0097ACF981B, 0x00003FFA //A7 +data8 0x8829A394065E4B95, 0x0000BFF9 //A6 +data8 0xED3003E477A53EE7, 0x00003FF6 //A5 +data8 0xA4C07E9BB3FCB0F3, 0x0000BFF4 //A4 +// +// Coefficients ##16..19 +// Polynomial coefficients for the erf(x), 0.5 <= |x| < 1.0 +data8 0x95FA98C337005D13, 0x0000BFF9 //A3 +data8 0xE0F7E524D2808A97, 0x0000BFFB //A2 +data8 0xE0F7E524D2808A98, 0x00003FFD //A1 +data8 0x853F7AE0C76E915F, 0x00003FFE //A0 +// Polynomial coefficients for the erf(x), 1.0 <= |x| < 2.0 +data8 0x8DB0A587A96ABCF0, 0x00003FFC //A3 +data8 0xD488F84B7DE18DA8, 0x0000BFFD //A2 +data8 0xD488F84B7DE12E9C, 0x00003FFD //A1 +data8 0xD7BB3D3A08445636, 0x00003FFE //A0 +// Polynomial coefficients for the erf(x), 2.0 <= |x| < 3.25 +data8 0xC58571D23D5C4B3A, 0x00003FFD //A3 +data8 0xA94DCF467CD6AFF3, 0x0000BFFC //A2 +data8 0xA94DCF467CD10A16, 0x00003FFA //A1 +data8 0xFECD70A13CAF1997, 0x00003FFE //A0 +// Polynomial coefficients for the erf(x), 4.0 <= |x| < 6.0 +data8 0xB01D2B4F0D5AB8B0, 0x00003FF1 //A3 +data8 0x8858A465CE594BD1, 0x0000BFEE //A2 +data8 0x8858A447456DE61D, 0x00003FEA //A1 +data8 0xFFFFFFBDC88BB107, 0x00003FFE //A0 +// Polynomial coefficients for the erf(x), 0.0 <= |x| < 0.5 +data8 0xBE839EDBB36C7FCE //A9 +data8 0x3EBB7745A18DD242 //A8 +data8 0xBF4C02DB238F2AFC //A5 +data8 0x3F7565BCD0A9A3EA //A4 +data8 0xC093A3581BCF3333, 0x0000BFFD //A1 +data8 0xBEEF4BB82AD8AE22 //A7 +data8 0x3F1F9A2A57A218CD //A6 +data8 0xBF9B82CE3127F4E4 //A3 +data8 0x3FBCE2F21A042B25 //A2 +data8 0x906EBA8214DB688D, 0x00003FFF //A0 +// 1.0 - 2^(-63) +data8 0xFFFFFFFFFFFFFFFF, 0x00003FFE +// Polynomial coefficients for the erf(x), 3.25 <= |x| < 4.0 +data8 0x95E91576C7A12250, 0x00003FE7 //A14 +data8 0x8E5E0D0E1F5D3CB5, 0x0000BFEA //A13 +data8 0xED761DAFAF814DE9, 0x00003FEB //A12 +data8 0xB3A77D921D0ACFC7, 0x0000BFEC //A11 +data8 0xA662D27096B08D7C, 0x0000BFEC //A10 +data8 0xDA0F410AE6233EA5, 0x00003FEF //A9 +data8 0xAB4A8B16B3124327, 0x0000BFF1 //A8 +data8 0xB241E236A5EDCED3, 0x00003FF2 //A7 +data8 0x8A2A65BA1F551F77, 0x0000BFF3 //A6 +data8 0xA4852D0B1D87000A, 0x00003FF3 //A5 +data8 0x963EB00039489476, 0x0000BFF3 //A4 +data8 0xCD5244FF4F7313A5, 0x00003FF2 //A3 +data8 0xC6F1E695363BCB26, 0x0000BFF1 //A2 +data8 0xF4DAF4680DA54C02, 0x00003FEF //A1 +data8 0xFFFFB7CFB3F2ABBE, 0x00003FFE //A0 +// A = 2.0/sqrt(Pi) +data8 0x906EBA8214DB688D, 0x00003FFF +LOCAL_OBJECT_END(erf_data) + + +.section .text +GLOBAL_LIBM_ENTRY(erf) + +{ .mfi + alloc r32 = ar.pfs, 0, 17, 0, 0 + fmerge.se fArgAbsNorm = f1, f8 // normalized x + adds rSignBit = 0x1, r0 +} +{ .mfi + addl rDataPtr = @ltoff(erf_data), gp + fma.s1 fArgSqr = f8, f8, f0 // x^2 + addl rThreeAndQ = 0x400A0, r0 // shifted bits of 3.25 +} +;; +{ .mfi + getf.d rArg = f8 // x in GR + fclass.m p6,p0 = f8, 0x0b // is x denormal ? + shl rThreeAndQ = rThreeAndQ, 44 // bits of 3.25 +} +{ .mfi + ld8 rDataPtr = [rDataPtr] + nop.f 0 + addl rBiasedExpOf4 = 0x40100, r0 // shifted bits of 4.0 +} +;; +{ .mfi + addl rSaturation = 0x4017A, r0 // shifted bits of 5.90625 + fclass.m p7,p0 = f8, 0xc7 // is x [S,Q]NaN or +/-0 ? + shl rSignBit = rSignBit, 63 // mask for sign bit +} +{ .mfi + addl rMask = 0x7FF00, r0 // Mask for index bits + nop.f 0 + addl rBias = 0x3FE00, r0 // bias of 0.5 << 8 +} +;; +{ .mfi + setf.d fThreeAndQ = rThreeAndQ // 3.25 if FP register + fclass.m p9,p0 = f8, 0x23 // is x +/- inf? + shr.u rShiftedArg = rArg, 44 +} +{ .mfb + andcm rAbsArg = rArg, rSignBit // |x| in GR + nop.f 0 +(p6) br.cond.spnt erf_denormal // branch out if x is denormal +} +;; +{ .mfi + and rShiftedArgMasked = rShiftedArg, rMask // bias of x << 8 + fmerge.s fArgAbs = f1, f8 // |x| + shr rShiftedAbsArg = rAbsArg, 44 +} +{ .mfb + cmp.lt p8, p11 = rThreeAndQ, rAbsArg // p8 = 1 if |x| >= 3.25 +(p7) fma.d.s0 f8 = f8,f1,f8 // NaN or +/-0 +(p7) br.ret.spnt b0 // exit for x = NaN or +/-0 +} +;; +{ .mfi + sub rIndex = rShiftedArgMasked, rBias // index << 8 + nop.f 0 + cmp.lt p10, p0 = rShiftedArgMasked, rBias // p10 = 1 if |x| < 0.5 +} +{ .mfb + // p8 = 1 if 3.25 <= |x| < 4.0 +(p8) cmp.lt p8, p11 = rShiftedAbsArg, rBiasedExpOf4 + fms.s1 fArgAbsNorm = fArgAbsNorm, f1, f1 +(p10) br.cond.spnt erf_near_zero // branch out if |x| < 0.5 +} +;; +.pred.rel "mutex", p8, p11 +{ .mfi +(p8) adds rCoeffAddr1 = 1392, rDataPtr // coeff. for 3.25 <=|x|<4.0 +(p9) fmerge.s f8 = f8,f1 // +/- inf + nop.i 0 +} +{ .mfb +(p11) add rCoeffAddr1 = rDataPtr, rIndex// coeff. ##0,2,..14 + nop.f 0 +(p9) br.ret.spnt b0 // exit for x = +/- inf +} +;; +{ .mfi + adds rCoeffAddr2 = 16, rCoeffAddr1 + fmerge.s fSignumX = f8, f1 // signum(x) + nop.i 0 +} +{ .mfb + cmp.lt p12, p0 = rSaturation, rShiftedAbsArg // |x| > 5.90625? + nop.f 0 +(p12) br.cond.spnt erf_saturation // branch out if x |x| >= 6.0 +} +;; +// Here if paths #3,4 +// if path #4 we'll branch out after loading of 14 necessary coefficients +{.mfi + ldfe fA19 = [rCoeffAddr1], 32 + nop.f 0 + nop.i 0 +} +{.mfi + ldfe fA18 = [rCoeffAddr2], 32 + nop.f 0 + adds rCoeffAddr3 = 1024, rDataPtr +} +;; +{.mfi + ldfe fA17 = [rCoeffAddr1], 32 + nop.f 0 + nop.i 0 +} +{.mfi + ldfe fA16 = [rCoeffAddr2], 32 + nop.f 0 + nop.i 0 +} +;; +{.mfi + ldfe fA15 = [rCoeffAddr1], 32 + fma.s1 fTSqr = fArgAbsNorm, fArgAbsNorm, f0 + shr.u rIndex = rIndex, 2 +} +{.mfi + ldfe fA14 = [rCoeffAddr2], 32 + nop.f 0 + adds rCoeffAddr4 = 16, r0 +} +;; +{.mfi + ldfe fA13 = [rCoeffAddr1], 32 + nop.f 0 + // address of coefficients ##16..23 + add rCoeffAddr3 = rCoeffAddr3, rIndex +} +{.mfi + ldfe fA12 = [rCoeffAddr2], 32 + nop.f 0 + cmp.lt p15, p14 = rArg, r0 +} +;; +{.mfi + ldfe fA11 = [rCoeffAddr1], 32 + nop.f 0 + add rCoeffAddr4 = rCoeffAddr3, rCoeffAddr4 +} +{.mfi + ldfe fA10 = [rCoeffAddr2], 32 + nop.f 0 + nop.i 0 +} +;; +{.mfi + ldfe fA9 = [rCoeffAddr1], 32 + nop.f 0 + nop.i 0 +} +{.mfi + ldfe fA8 = [rCoeffAddr2], 32 + nop.f 0 + nop.i 0 +} +;; +{.mfi + ldfe fA7 = [rCoeffAddr1], 32 + fms.s1 fArgAbs = fArgAbs, f1, fThreeAndQ + nop.i 0 +} +{.mfb + ldfe fA6 = [rCoeffAddr2], 32 + nop.f 0 +(p8) br.cond.spnt erf_3q_4 // branch out if 3.25 < |x| < 4.0 +} +;; +{.mfi + ldfe fA5 = [rCoeffAddr1], 32 + fma.s1 fTDeg3 = fArgAbsNorm, fTSqr, f0 + nop.i 0 +} +{.mfi + ldfe fA4 = [rCoeffAddr2], 32 + fma.s1 fTQuadr = fTSqr, fTSqr, f0 + nop.i 0 +} +;; +// Path #3 Polynomial Pol19(y) computation; y = fArgAbsNorm +{.mfi + ldfe fA3 = [rCoeffAddr3], 32 + fma.s1 fArgAbsNormSgn = fArgAbsNorm, fSignumX, f0 + nop.i 0 +} +{.mfi + ldfe fA2 = [rCoeffAddr4], 32 + nop.f 0 + nop.i 0 +} +;; +{.mfi + ldfe fA1 = [rCoeffAddr3], 32 + fma.s1 fRes = fA19, fArgAbsNorm, fA18 + nop.i 0 +} +{.mfi + ldfe fA0 = [rCoeffAddr4], 32 + nop.f 0 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA17 = fA17, fArgAbsNorm, fA16 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA15 = fA15, fArgAbsNorm, fA14 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fTDeg7 = fTDeg3, fTQuadr, f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA13 = fA13, fArgAbsNorm, fA12 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA11 = fA11, fArgAbsNorm, fA10 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA9 = fA9, fArgAbsNorm, fA8 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fRes = fRes, fTSqr, fA17 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA7 = fA7, fArgAbsNorm, fA6 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA5 = fA5, fArgAbsNorm, f0 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA15 = fA15, fTSqr, fA13 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA4 = fA4, fArgAbsNorm, fA3 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA2 = fA2, fArgAbsNorm, fA1 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA11 = fA11, fTSqr, fA9 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA7 = fA7, fTSqr, fA5 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fRes = fRes, fTQuadr, fA15 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA4 = fA4, fTSqr, fA2 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fRes = fRes, fTQuadr, fA11 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA4 = fA7, fTDeg3, fA4 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fRes = fRes, fTDeg7, fA4 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // result for negative argument +(p15) fms.d.s0 f8 = fRes, fArgAbsNormSgn, fA0 + nop.i 0 +} +{ .mfb + nop.m 0 + // result for positive argument +(p14) fma.d.s0 f8 = fRes, fArgAbsNormSgn, fA0 + br.ret.sptk b0 +} + +// Here if 3.25 < |x| < 4.0 +.align 32 +erf_3q_4: +.pred.rel "mutex", p14, p15 +{ .mfi + ldfe fA5 = [rCoeffAddr1], 32 + fma.s1 fTSqr = fArgAbs, fArgAbs, f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fRes = fA19, fArgAbs, fA18 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA17 = fA17, fArgAbs, fA16 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA15 = fA15, fArgAbs, fA14 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA13 = fA13, fArgAbs, fA12 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA11 = fA11, fArgAbs, fA10 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA9 = fA9, fArgAbs, fA8 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fArgAbsNormSgn = fArgAbs, fSignumX, f0 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fTQuadr = fTSqr, fTSqr, f0 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fRes = fRes, fTSqr, fA17 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA15 = fA15, fTSqr, fA13 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA11 = fA11, fTSqr, fA9 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA7 = fA7, fArgAbs, fA6 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fTDeg7 = fTQuadr, fTSqr, f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fRes = fRes, fTQuadr, fA15 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA11 = fA11, fTSqr, fA7 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fRes = fRes, fTDeg7, fA11 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // result for negative argument +(p15) fms.d.s0 f8 = fRes, fArgAbsNormSgn, fA5 + nop.i 0 +} +{ .mfb + nop.m 0 + // result for positive argument +(p14) fma.d.s0 f8 = fRes, fArgAbsNormSgn, fA5 + br.ret.sptk b0 +} +;; + +// Here if |x| < 0.5 +.align 32 +erf_near_zero: +{ .mfi + adds rCoeffAddr1 = 1280, rDataPtr // address of A9 + fma.s1 fTSqr = fArgSqr, fArgSqr, f0 // x^4 + nop.i 0 +} +{ .mfi + adds rCoeffAddr2 = 1328, rDataPtr // address of A7 + nop.f 0 + nop.i 0 +} +;; +{ .mfi + ldfpd fA9, fA8 = [rCoeffAddr1], 16 + nop.f 0 + nop.i 0 +} +{ .mfi + ldfpd fA7, fA6 = [rCoeffAddr2], 16 + nop.f 0 + nop.i 0 +} +;; +{ .mfi + ldfpd fA5, fA4 = [rCoeffAddr1], 16 + nop.f 0 + nop.i 0 +} +{ .mfi + ldfpd fA3, fA2 = [rCoeffAddr2], 16 + nop.f 0 + nop.i 0 +} +;; +{ .mfi + ldfe fA1 = [rCoeffAddr1] + nop.f 0 + nop.i 0 +} +{ .mfi + ldfe fA0 = [rCoeffAddr2] + nop.f 0 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fTQuadr = fTSqr, fTSqr, f0 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fRes = fA9, fArgSqr, fA8 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA7 = fA7, fArgSqr, fA6 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA3 = fA3, fArgSqr, fA2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA5 = fA5, fArgSqr, fA4 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA1 = fA1, fArgSqr, fA0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fTQuadrSgn = fTQuadr, f8, f0 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fRes = fRes, fTSqr, fA7 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA1 = fA3, fTSqr, fA1 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fRes = fRes, fTSqr, fA5 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA1 = fA1, f8, f0 + nop.i 0 +} +;; +{ .mfb + nop.m 0 + fma.d.s0 f8 = fRes, fTQuadrSgn, fA1 // x*Pol9(x^2) + br.ret.sptk b0 // Exit for |x| < 0.5 +};; + +// Here if 5.90625 <= |x| < +inf +.align 32 +erf_saturation: +{ .mfi + adds rDataPtr = 1376, rDataPtr // address of A0 + nop.f 0 + nop.i 0 +} +;; +{ .mfi + ldfe fA0 = [rDataPtr] + nop.f 0 + nop.i 0 +} +;; +{ .mfb + nop.m 0 + fma.d.s0 f8 = fA0, fSignumX, f0 // sign(x)*(1.0 - 2^(-63)) + // Exit for 5.90625 <= |x| < +inf + br.ret.sptk b0 // Exit for 5.90625 <=|x|< +inf +} +;; + +// Here if x is double precision denormal +.align 32 +erf_denormal: +{ .mfi + adds rDataPtr = 1632, rDataPtr // address of A0 + fclass.m p7,p8 = f8, 0x0a // is x -denormal ? + nop.i 0 +} +;; +{ .mfi + ldfe fA0 = [rDataPtr] // A0 + nop.f 0 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA0 = fA0,f8,f0 // A0*x + nop.i 0 +} +;; +{ .mfi + nop.m 0 +(p7) fma.d.s0 f8 = f8,f8,fA0 // -denormal + nop.i 0 +} +{ .mfb + nop.m 0 +(p8) fnma.d.s0 f8 = f8,f8,fA0 // +denormal + br.ret.sptk b0 // Exit for denormal +} +;; + +GLOBAL_LIBM_END(erf) + + diff --git a/sysdeps/ia64/fpu/s_erfc.S b/sysdeps/ia64/fpu/s_erfc.S new file mode 100644 index 0000000000..addfef44c2 --- /dev/null +++ b/sysdeps/ia64/fpu/s_erfc.S @@ -0,0 +1,1199 @@ +.file "erfc.s" + + +// Copyright (c) 2001 - 2005, Intel Corporation +// All rights reserved. +// +// Contributed 2001 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 11/12/01 Initial version +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/06/03 Reordered header: .section, .global, .proc, .align +// 03/31/05 Reformatted delimiters between data tables +// +// API +//============================================================== +// double erfc(double) +// +// Overview of operation +//============================================================== +// 1. 0 <= x <= 28.0 +// +// erfc(x) = P14(z) * exp( -x^2 ), z = x - x(i). +// +// Comment: +// +// Let x(i) = -1.0 + 2^(i/4),i=0,...19. So we have 20 unequal +// argument intervals [x(i),x(i+1)] with length ratio q = 2^(1/4). +// Values x(i) we have in the table erfc_xb_table. +// +// Let x(i)<= x < x(i+1). +// We can find i as exponent of number (x + 1)^4. +// +// Let P14(z) - polynomial approximation of degree 14 for function +// erfc(z+x(i)) * exp( (z+x(i))^2) and 0 <= z <= x(i+1)-x(i). +// Polynomial coeffitients we have in the table erfc_p_table. +// +// So we can find result for erfc(x) as above. +// Algorithm description for exp function see below. +// +// 2. -6 <= x < 0 +// +// erfc(x) = 2.0 - erfc(-x) +// +// 3. x > 28.0 +// erfc(x) ~=~ 0.0 +// +// 4. x < -6.0 +// erfc(x) ~=~ 2.0 + +// Special values +//============================================================== +// erfc(+0) = 1.0 +// erfc(-0) = 1.0 + +// erfc(+qnan) = +qnan +// erfc(-qnan) = -qnan +// erfc(+snan) = +qnan +// erfc(-snan) = -qnan + +// erfc(-inf) = 2.0 +// erfc(+inf) = +0 + +//============================================================== +// Take double exp(double) from libm_64. +// +// Overview of operation +//============================================================== +// Take the input x. w is "how many log2/128 in x?" +// w = x * 128/log2 +// n = int(w) +// x = n log2/128 + r + delta + +// n = 128M + index_1 + 2^4 index_2 +// x = M log2 + (log2/128) index_1 + (log2/8) index_2 + r + delta + +// exp(x) = 2^M 2^(index_1/128) 2^(index_2/8) exp(r) exp(delta) +// Construct 2^M +// Get 2^(index_1/128) from table_1; +// Get 2^(index_2/8) from table_2; +// Calculate exp(r) by series +// r = x - n (log2/128)_high +// delta = - n (log2/128)_low +// Calculate exp(delta) as 1 + delta +//============================================================== +// Comment for exp for erfc: +// +// We use quad precision for calculate input argument -x^2 and add +// result low bits to value delta in exp. + +// Registers used +//============================================================== +// Floating Point registers used: +// f8, input +// f9 -> f15, f32 -> f93 + +// General registers used: +// r32 -> r68 + +// Predicate registers used: +// p6 -> p15 + +// Assembly macros +//============================================================== + +exp_GR_rshf = r33 +EXP_AD_TB1 = r34 +EXP_AD_TB2 = r35 +EXP_AD_P = r36 +exp_GR_N = r37 +exp_GR_index_1 = r38 +exp_GR_index_2_16 = r39 +exp_GR_biased_M = r40 +EXP_AD_T1 = r41 +EXP_AD_T2 = r42 +exp_GR_sig_inv_ln2 = r43 +exp_GR_17ones = r44 +exp_TB1_size = r45 +exp_TB2_size = r46 +exp_GR_rshf_2to56 = r47 +exp_GR_exp_2tom56 = r48 + +// GR for erfc(x) +//============================================================== +GR_POS_ARG_ASYMP = r49 +GR_NEG_ARG_ASYMP = r50 +GR_ARG_ASYMP = r51 +GR_ERFC_XB_TB = r52 +GR_ERFC_P_TB = r53 +GR_IndxPlusBias = r54 +GR_BIAS = r55 +GR_P_A12 = r56 +GR_P_A13 = r57 +GR_AbsArg = r58 +GR_ShftXBi = r59 +GR_ShftPi = r60 +GR_mBIAS = r61 +GR_ShftPi_bias = r62 +GR_ShftXBi_bias = r63 +GR_ShftA12 = r64 +GR_ShftA13 = r65 +GR_EpsNorm = r66 +GR_0x1 = r67 +GR_ShftPi_8 = r68 + +// GR for __libm_support call + +//============================================================== + +GR_SAVE_B0 = r61 +GR_SAVE_PFS = r62 +GR_SAVE_GP = r63 +GR_SAVE_SP = r64 + +GR_Parameter_X = r65 +GR_Parameter_Y = r66 +GR_Parameter_RESULT = r67 +GR_Parameter_TAG = r68 + + +// FR for exp(-x^2) +//============================================================== +FR_X = f10 +FR_Y = f1 +FR_RESULT = f8 + +EXP_2TOM56 = f6 +EXP_INV_LN2_2TO63 = f7 +EXP_W_2TO56_RSH = f9 +EXP_RSHF_2TO56 = f10 + +exp_P4 = f11 +exp_P3 = f12 +exp_P2 = f13 +exp_P1 = f14 +exp_ln2_by_128_hi = f15 + +exp_ln2_by_128_lo = f32 +EXP_RSHF = f33 +EXP_Nfloat = f34 +exp_r = f35 +exp_f = f36 +exp_rsq = f37 +exp_rcube = f38 +EXP_2M = f39 +exp_S1 = f40 +exp_T1 = f41 +exp_rP4pP3 = f42 +exp_P_lo = f43 +exp_P_hi = f44 +exp_P = f45 +exp_S = f46 +EXP_NORM_f8 = f47 +exp_S2 = f48 +exp_T2 = f49 + +// FR for erfc(x) +//============================================================== +FR_AbsArg = f50 +FR_Tmp = f51 +FR_Xb = f52 +FR_A0 = f53 +FR_A1 = f54 +FR_A2 = f55 +FR_A3 = f56 +FR_A4 = f57 +FR_A5 = f58 +FR_A6 = f59 +FR_A7 = f60 +FR_A8 = f61 +FR_A9 = f62 +FR_A10 = f63 +FR_A11 = f64 +FR_A12 = f65 +FR_A13 = f66 +FR_A14 = f67 + +FR_P14_0_1 = f68 +FR_P14_0_2 = f69 +FR_P14_1_1 = f70 +FR_P14_1_2 = f71 +FR_P14_2_1 = f72 +FR_P14_2_2 = f73 +FR_P14_3_1 = f74 +FR_P14_3_2 = f75 +FR_P14_6_1 = f76 + +FR_P14_7_1 = f77 +FR_P14_7_2 = f78 +FR_P14_8_1 = f79 +FR_P14_8_2 = f80 +FR_P14_12_1 = f81 +FR_P14_13_1 = f82 +FR_P14_13_2 = f83 +FR_Pol = f84 +FR_Exp = f85 +FR_2 = f86 +f8_sq_lo = f87 +FR_LocArg = f88 +FR_Tmpf = f89 +FR_Tmp1 = f90 +FR_EpsNorm = f91 +FR_UnfBound = f92 +FR_NormX = f93 + + +// Data tables +//============================================================== +RODATA +.align 16 + +// ************* DO NOT CHANGE ORDER OF THESE TABLES ******************** + +LOCAL_OBJECT_START(exp_table_1) + +data8 0x403a8b12fc6e4892 , 0 // underflow boundary +data8 0xb17217f7d1cf79ab , 0x00003ff7 // ln2/128 hi +data8 0xc9e3b39803f2f6af , 0x00003fb7 // ln2/128 lo +// +// Table 1 is 2^(index_1/128) where +// index_1 goes from 0 to 15 +// +data8 0x8000000000000000 , 0x00003FFF +data8 0x80B1ED4FD999AB6C , 0x00003FFF +data8 0x8164D1F3BC030773 , 0x00003FFF +data8 0x8218AF4373FC25EC , 0x00003FFF +data8 0x82CD8698AC2BA1D7 , 0x00003FFF +data8 0x8383594EEFB6EE37 , 0x00003FFF +data8 0x843A28C3ACDE4046 , 0x00003FFF +data8 0x84F1F656379C1A29 , 0x00003FFF +data8 0x85AAC367CC487B15 , 0x00003FFF +data8 0x8664915B923FBA04 , 0x00003FFF +data8 0x871F61969E8D1010 , 0x00003FFF +data8 0x87DB357FF698D792 , 0x00003FFF +data8 0x88980E8092DA8527 , 0x00003FFF +data8 0x8955EE03618E5FDD , 0x00003FFF +data8 0x8A14D575496EFD9A , 0x00003FFF +data8 0x8AD4C6452C728924 , 0x00003FFF +LOCAL_OBJECT_END(exp_table_1) + +// Table 2 is 2^(index_1/8) where +// index_2 goes from 0 to 7 +LOCAL_OBJECT_START(exp_table_2) +data8 0x8000000000000000 , 0x00003FFF +data8 0x8B95C1E3EA8BD6E7 , 0x00003FFF +data8 0x9837F0518DB8A96F , 0x00003FFF +data8 0xA5FED6A9B15138EA , 0x00003FFF +data8 0xB504F333F9DE6484 , 0x00003FFF +data8 0xC5672A115506DADD , 0x00003FFF +data8 0xD744FCCAD69D6AF4 , 0x00003FFF +data8 0xEAC0C6E7DD24392F , 0x00003FFF +LOCAL_OBJECT_END(exp_table_2) + +LOCAL_OBJECT_START(exp_p_table) +data8 0x3f8111116da21757 //P_4 +data8 0x3fa55555d787761c //P_3 +data8 0x3fc5555555555414 //P_2 +data8 0x3fdffffffffffd6a //P_1 +LOCAL_OBJECT_END(exp_p_table) + +LOCAL_OBJECT_START(erfc_xb_table) +data8 0x0000000000000000, 0x00000000 //XB[0] = +0.00000000000000000000e-01L +data8 0xC1BF828C6DC54B7A, 0x00003FFC //XB[1] = +1.89207115002721066717e-01L +data8 0xD413CCCFE7799211, 0x00003FFD //XB[2] = +4.14213562373095048802e-01L +data8 0xAE89F995AD3AD5E8, 0x00003FFE //XB[3] = +6.81792830507429086062e-01L +data8 0x8000000000000000, 0x00003FFF //XB[4] = +1.00000000000000000000e+00L +data8 0xB06FE0A31B7152DF, 0x00003FFF //XB[5] = +1.37841423000544213343e+00L +data8 0xEA09E667F3BCC909, 0x00003FFF //XB[6] = +1.82842712474619009760e+00L +data8 0x9744FCCAD69D6AF4, 0x00004000 //XB[7] = +2.36358566101485817212e+00L +data8 0xC000000000000000, 0x00004000 //XB[8] = +3.00000000000000000000e+00L +data8 0xF06FE0A31B7152DF, 0x00004000 //XB[9] = +3.75682846001088426687e+00L +data8 0x9504F333F9DE6484, 0x00004001 //XB[10] = +4.65685424949238019521e+00L +data8 0xB744FCCAD69D6AF4, 0x00004001 //XB[11] = +5.72717132202971634425e+00L +data8 0xE000000000000000, 0x00004001 //XB[12] = +7.00000000000000000000e+00L +data8 0x8837F0518DB8A96F, 0x00004002 //XB[13] = +8.51365692002176853374e+00L +data8 0xA504F333F9DE6484, 0x00004002 //XB[14] = +1.03137084989847603904e+01L +data8 0xC744FCCAD69D6AF4, 0x00004002 //XB[15] = +1.24543426440594326885e+01L +data8 0xF000000000000000, 0x00004002 //XB[16] = +1.50000000000000000000e+01L +data8 0x9037F0518DB8A96F, 0x00004003 //XB[17] = +1.80273138400435370675e+01L +data8 0xAD04F333F9DE6484, 0x00004003 //XB[18] = +2.16274169979695207808e+01L +data8 0xCF44FCCAD69D6AF4, 0x00004003 //XB[19] = +2.59086852881188653770e+01L +LOCAL_OBJECT_END(erfc_xb_table) + +LOCAL_OBJECT_START(erfc_p_table) + +// Pol0 +data8 0x8000000000000000, 0x00003FFF //A0 = +1.00000000000000000000e+00L +data8 0x906EBA8214DB688D, 0x0000BFFF //A1 = -1.12837916709551257389e+00L +data8 0xFFFFFFFFFFFFFFEB, 0x00003FFE //A2 = +9.99999999999999998841e-01L +data8 0xC093A3581BCF2925, 0x0000BFFE //A3 = -7.52252778063674869885e-01L +data8 0xFFFFFFFFFFF7CDBD, 0x00003FFD //A4 = +4.99999999999985440383e-01L +data8 0x9A0FB5E014AE3EFB, 0x0000BFFD //A5 = -3.00901111224757482205e-01L +data8 0xAAAAAAAA4672B0BD, 0x00003FFC //A6 = +1.66666666643879582201e-01L +data8 0xB011F45C9F590FC0, 0x0000BFFB //A7 = -8.59717455640916223912e-02L +data8 0xAAAAA89474161033, 0x00003FFA //A8 = +4.16666588928413935202e-02L +data8 0x9C818E2CE37D4214, 0x0000BFF9 //A9 = -1.91047455656271634308e-02L +data8 0x8885969315AB76A1, 0x00003FF8 //A10 = +8.33263115449753085659e-03L +data8 0xE36112A686F5165B, 0x0000BFF6 //A11 = -3.46953111013788405745e-03L +data8 0xB3DD6B2DB3307D2E, 0x00003FF5 //A12 = +1.37226041156280127011e-03L +data8 0x8018A34267FED226, 0x0000BFF4 //A13 = -4.88648380816410282971e-04L +data8 0xFBBA6A7AEBD3ABD9, 0x00003FF1 //A14 = +1.20033353451879025825e-04L +// Pol1 +data8 0xD15A1EF03BB91E71, 0x00003FFE //A0 = +8.17781385088640600540e-01L +data8 0xD1A4ADDAC3337118, 0x0000BFFE //A1 = -8.18919053944410683867e-01L +data8 0xA9AF9FFA2AD18CB0, 0x00003FFE //A2 = +6.62836073471060947628e-01L +data8 0xECB77514F0F151B3, 0x0000BFFD //A3 = -4.62337168508812580002e-01L +data8 0x934AB35EA5CD5EEB, 0x00003FFD //A4 = +2.87679295829458273854e-01L +data8 0xA71410A68C1EF21C, 0x0000BFFC //A5 = -1.63162479558223113104e-01L +data8 0xAF506A335238094A, 0x00003FFB //A6 = +8.56025978958108330224e-02L +data8 0xABFDF67F968765A7, 0x0000BFFA //A7 = -4.19902447551140139048e-02L +data8 0x9F0B0165A6CDCA99, 0x00003FF9 //A8 = +1.94144274984979538382e-02L +data8 0x8B8197BFC346CDEA, 0x0000BFF8 //A9 = -8.51478404279186775501e-03L +data8 0xE950D763FE51AB1E, 0x00003FF6 //A10 = +3.56011637267641495904e-03L +data8 0xBA821A59FC05FBAD, 0x0000BFF5 //A11 = -1.42294475244146555952e-03L +data8 0x8D535042E11A0D89, 0x00003FF4 //A12 = +5.39113782651680545599e-04L +data8 0xBE589447DB26564E, 0x0000BFF2 //A13 = -1.81528103431449706486e-04L +data8 0xABC8C7EF636F5B0A, 0x00003FF0 //A14 = +4.09565689009869217620e-05L +// Pol2 +data8 0xA9973ABB272898B2, 0x00003FFE //A0 = +6.62463827792779356910e-01L +data8 0x945F1A7993F7AADD, 0x0000BFFE //A1 = -5.79576162988785154930e-01L +data8 0xD84439C6609A8A62, 0x00003FFD //A2 = +4.22395520654665085222e-01L +data8 0x8A1BBAA7E9CB8C52, 0x0000BFFD //A3 = -2.69742806431984313298e-01L +data8 0x9F0F67364B466975, 0x00003FFC //A4 = +1.55332195938916594663e-01L +data8 0xA843F180287DAF7F, 0x0000BFFB //A5 = -8.21608416782158837025e-02L +data8 0xA59D71B7C690E545, 0x00003FFA //A6 = +4.04333536247671644540e-02L +data8 0x991A733518C74874, 0x0000BFF9 //A7 = -1.86893701691354422481e-02L +data8 0x85E7F91148F9F6D2, 0x00003FF8 //A8 = +8.17298243522623724858e-03L +data8 0xDEE0607CC9D6777E, 0x0000BFF6 //A9 = -3.40082507754089306495e-03L +data8 0xB145D2CC470B306B, 0x00003FF5 //A10 = +1.35248373238824318949e-03L +data8 0x86FAEBB4438A20FA, 0x0000BFF4 //A11 = -5.14908443679775343409e-04L +data8 0xC2503856CE48A657, 0x00003FF2 //A12 = +1.85311660448280465934e-04L +data8 0xF52642F22A26965B, 0x0000BFF0 //A13 = -5.84481856856861454591e-05L +data8 0xC98588E1A95FFDBD, 0x00003FEE //A14 = +1.20116245684500489648e-05L +// Pol3 +data8 0x887CBA2C47B1E2B5, 0x00003FFE //A0 = +5.33153186617432643784e-01L +data8 0xCD81909CF194328E, 0x0000BFFD //A1 = -4.01379126699602646289e-01L +data8 0x84DCA15C52122372, 0x00003FFD //A2 = +2.59495775718310530164e-01L +data8 0x993AA9C76AD28157, 0x0000BFFC //A3 = -1.49637844845261107836e-01L +data8 0xA140CD8A96FADBA5, 0x00003FFB //A4 = +7.87368829650154013961e-02L +data8 0x9D36B25E76E56EEA, 0x0000BFFA //A5 = -3.83822410143975630292e-02L +data8 0x8F8BCC2C0536ECD3, 0x00003FF9 //A6 = +1.75227153523910189727e-02L +data8 0xF77EDC644BA17AF9, 0x0000BFF7 //A7 = -7.55296479527793552675e-03L +data8 0xCAB8AC76793C1151, 0x00003FF6 //A8 = +3.09328279988546711083e-03L +data8 0x9E8FCBC793D555AF, 0x0000BFF5 //A9 = -1.20972979110659888616e-03L +data8 0xEDC1328664A0CE79, 0x00003FF3 //A10 = +4.53481058502015766058e-04L +data8 0xAAE3CAAB9D117591, 0x0000BFF2 //A11 = -1.62973223928790256249e-04L +data8 0xE7704D06A3080C19, 0x00003FF0 //A12 = +5.51792801195012080688e-05L +data8 0x875A5B53E510F305, 0x0000BFEF //A13 = -1.61353297293572230995e-05L +data8 0xC8F10CDDB9CC9A42, 0x00003FEC //A14 = +2.99426321046583353559e-06L +// Pol4 +data8 0xDAEC3C07CAB590C1, 0x00003FFD //A0 = +4.27583576155807004411e-01L +data8 0x8BE271F8BE0280AC, 0x0000BFFD //A1 = -2.73212014783898564863e-01L +data8 0x9E13941E19661429, 0x00003FFC //A2 = +1.54371561371908397882e-01L +data8 0xA241BFC48377449D, 0x0000BFFB //A3 = -7.92269689413235358504e-02L +data8 0x99E56877AD00D1AE, 0x00003FFA //A4 = +3.75722962151600767952e-02L +data8 0x887E78DA3BA57C80, 0x0000BFF9 //A5 = -1.66618690872055148862e-02L +data8 0xE465CAA9F4D54FD8, 0x00003FF7 //A6 = +6.97014232347351913821e-03L +data8 0xB57930370208D4A7, 0x0000BFF6 //A7 = -2.76906420823065422653e-03L +data8 0x89A90B5DF0C0C55E, 0x00003FF5 //A8 = +1.05026496655247749532e-03L +data8 0xC83DB867F08D93C6, 0x0000BFF3 //A9 = -3.81929578900287685559e-04L +data8 0x8C0C9113FC8061FA, 0x00003FF2 //A10 = +1.33561218944256209215e-04L +data8 0xBC17A73E9CA51313, 0x0000BFF0 //A11 = -4.48447217225392170834e-05L +data8 0xED10FE8FC0E44CAD, 0x00003FEE //A12 = +1.41302576244352578317e-05L +data8 0xFE49912328516F81, 0x0000BFEC //A13 = -3.78917710289305330220e-06L +data8 0xA8F6077E25DAFD33, 0x00003FEA //A14 = +6.29428967202166402369e-07L +// Pol5 +data8 0xAF72220985BED710, 0x00003FFD //A0 = +3.42667640364081975844e-01L +data8 0xBC1CB559042410AB, 0x0000BFFC //A1 = -1.83703263815036934677e-01L +data8 0xB730BF62E0B63A3C, 0x00003FFB //A2 = +8.94484474229911741150e-02L +data8 0xA4F307B1D1A1534E, 0x0000BFFA //A3 = -4.02708340235238993824e-02L +data8 0x8B0327F5117861DB, 0x00003FF9 //A4 = +1.69692783752415790321e-02L +data8 0xDD4059307B2B081C, 0x0000BFF7 //A5 = -6.75205569219747369303e-03L +data8 0xA761D738974FECF6, 0x00003FF6 //A6 = +2.55404953403837072821e-03L +data8 0xF208F6D704F4B487, 0x0000BFF4 //A7 = -9.23290315545127419886e-04L +data8 0xA7F3658D34EC10B9, 0x00003FF3 //A8 = +3.20340668304962386053e-04L +data8 0xE079C35CEFD4E6D6, 0x0000BFF1 //A9 = -1.07038324953715640850e-04L +data8 0x90C5CDD19BB3DD2F, 0x00003FF0 //A10 = +3.45164947021915687751e-05L +data8 0xB3911863705825F6, 0x0000BFEE //A11 = -1.07030140392753204852e-05L +data8 0xD023CF5C3F915685, 0x00003FEC //A12 = +3.10152594473606007552e-06L +data8 0xCA7016FADFF584F5, 0x0000BFEA //A13 = -7.54139761055503416594e-07L +data8 0xEEBB5CC0901D2BB0, 0x00003FE7 //A14 = +1.11168196441717301549e-07L +// Pol6 +data8 0x8CD1160326A754AF, 0x00003FFD //A0 = +2.75032699474947383325e-01L +data8 0xFB22A4C657119388, 0x0000BFFB //A1 = -1.22624671271190511269e-01L +data8 0xD02B2CA872A774E9, 0x00003FFA //A2 = +5.08224243596176920409e-02L +data8 0xA23302E146E9E406, 0x0000BFF9 //A3 = -1.97997146844646077750e-02L +data8 0xEF8918FEDE237C98, 0x00003FF7 //A4 = +7.31004448401605074486e-03L +data8 0xA8A8B598FA20D881, 0x0000BFF6 //A5 = -2.57353242430059589053e-03L +data8 0xE3964D9788BFF50F, 0x00003FF4 //A6 = +8.68175969920725727944e-04L +data8 0x93B83C10B7210AC7, 0x0000BFF3 //A7 = -2.81752903983413936245e-04L +data8 0xB913B752B0D56A42, 0x00003FF1 //A8 = +8.82515983758695613094e-05L +data8 0xE0623EFA0B1E8DE9, 0x0000BFEF //A9 = -2.67486302195396417310e-05L +data8 0x83C4D1A4019E1D2E, 0x00003FEE //A10 = +7.85403393879249335151e-06L +data8 0x950CBA5D80D8125E, 0x0000BFEC //A11 = -2.22101388436550539151e-06L +data8 0x9CE72C0409A3E800, 0x00003FEA //A12 = +5.84509280984781223375e-07L +data8 0x88CCD7A000D1C213, 0x0000BFE8 //A13 = -1.27405082040077425019e-07L +data8 0x8DF4EC84F093B1C0, 0x00003FE5 //A14 = +1.65259388738830506389e-08L +// Pol7 +data8 0xE2BF82A153B1B82E, 0x00003FFC //A0 = +2.21433678719152843912e-01L +data8 0xA72A9AE0BD7F29D5, 0x0000BFFB //A1 = -8.16242313227913578068e-02L +data8 0xE98939292289EDBE, 0x00003FF9 //A2 = +2.85078159732432477516e-02L +data8 0x9B93E5E0EEFF9516, 0x0000BFF8 //A3 = -9.49571084105114051468e-03L +data8 0xC6B39897AABC47BC, 0x00003FF6 //A4 = +3.03194499398790451607e-03L +data8 0xF442AC7D84DDF1E0, 0x0000BFF4 //A5 = -9.31779649708690069328e-04L +data8 0x90FBD9F8B41DF23E, 0x00003FF3 //A6 = +2.76534642660360753287e-04L +data8 0xA6AC59077C78B437, 0x0000BFF1 //A7 = -7.94759910003852154521e-05L +data8 0xB9FC0BADD531E5E9, 0x00003FEF //A8 = +2.21710864553358009804e-05L +data8 0xC9CFC8CD93648856, 0x0000BFED //A9 = -6.01445608619100503330e-06L +data8 0xD4FA51B86A9B2494, 0x00003FEB //A10 = +1.58680833469323702924e-06L +data8 0xD8D0ED030032926D, 0x0000BFE9 //A11 = -4.03851487695924456733e-07L +data8 0xCCA1CA2AC3EB8973, 0x00003FE7 //A12 = +9.52891963880517988726e-08L +data8 0x9E26A080F9DA39DE, 0x0000BFE5 //A13 = -1.84111863600343741644e-08L +data8 0x8F3DC58F64A92C62, 0x00003FE2 //A14 = +2.08443519336792003049e-09L +// Pol8 +data8 0xB74C13E914E9666F, 0x00003FFC //A0 = +1.79001151181389950418e-01L +data8 0xDEB57268A58B763B, 0x0000BFFA //A1 = -5.43722600071728705200e-02L +data8 0x821FF0D4C605A4CD, 0x00003FF9 //A2 = +1.58843711598712515609e-02L +data8 0x92C830DD423DB924, 0x0000BFF7 //A3 = -4.47943101836927657394e-03L +data8 0xA04E61767A095BB6, 0x00003FF5 //A4 = +1.22303905230942532198e-03L +data8 0xA9EF64E0F6654358, 0x0000BFF3 //A5 = -3.24125543666296226957e-04L +data8 0xAF39C8969BD163E8, 0x00003FF1 //A6 = +8.35541329311315562274e-05L +data8 0xB01273B34197330C, 0x0000BFEF //A7 = -2.09894273215824495783e-05L +data8 0xACAE4C820B99EBAC, 0x00003FED //A8 = +5.14629050848703676006e-06L +data8 0xA57BF2AEA52B92DF, 0x0000BFEB //A9 = -1.23295315941138567172e-06L +data8 0x9AD6FE7A852DA239, 0x00003FE9 //A10 = +2.88411640627675721042e-07L +data8 0x8BFE95FCD7B92763, 0x0000BFE7 //A11 = -6.51900079707465044843e-08L +data8 0xE9F15C8E7F58CF90, 0x00003FE4 //A12 = +1.36172642554216769522e-08L +data8 0x9E90F22B11FAF8B5, 0x0000BFE2 //A13 = -2.30744183054978535129e-09L +data8 0xF8CF74F1A138FBBA, 0x00003FDE //A14 = +2.26291720693360003233e-10L +// Pol9 +data8 0x94D45274A831ED57, 0x00003FFC //A0 = +1.45341194505862183128e-01L +data8 0x94D4518B699A4A68, 0x0000BFFA //A1 = -3.63352952323113355459e-02L +data8 0x90C3B59FF403A916, 0x00003FF8 //A2 = +8.83572327421709216515e-03L +data8 0x893B796D0E9B4867, 0x0000BFF6 //A3 = -2.09399904729894563201e-03L +data8 0xFDFFA94903DCB8EA, 0x00003FF3 //A4 = +4.84464029001979577664e-04L +data8 0xE5CE7C2E4B05CF16, 0x0000BFF1 //A5 = -1.09580317663729186599e-04L +data8 0xCB88CC8F1146FDAE, 0x00003FEF //A6 = +2.42631878042764234194e-05L +data8 0xB0AA52C6F44E47C8, 0x0000BFED //A7 = -5.26503698764159271674e-06L +data8 0x966DD813170F8EBD, 0x00003FEB //A8 = +1.12078397189300511086e-06L +data8 0xFB75782788A6E378, 0x0000BFE8 //A9 = -2.34189317246047219283e-07L +data8 0xCDF787C4E5FDCF2A, 0x00003FE6 //A10 = +4.79554094892420966704e-08L +data8 0xA34CD3DFAC12AA45, 0x0000BFE4 //A11 = -9.50531730989412282035e-09L +data8 0xEEBB49645DE0E34C, 0x00003FE1 //A12 = +1.73700091999434388879e-09L +data8 0x8C86D8677DEACFBA, 0x0000BFDF //A13 = -2.55616650187281815453e-10L +data8 0xBDB223D0FE2A7D6B, 0x00003FDB //A14 = +2.15659223402509415592e-11L +// Pol10 +data8 0xF2C1812715E4050A, 0x00003FFB //A0 = +1.18533143048567888157e-01L +data8 0xC7DA2C565ADAEE57, 0x0000BFF9 //A1 = -2.43960252726894623056e-02L +data8 0xA15CEFFD632F697D, 0x00003FF7 //A2 = +4.92440908672041077933e-03L +data8 0xFFCFF4D3FB118F69, 0x0000BFF4 //A3 = -9.75846593969603576904e-04L +data8 0xC73F437D2F226C56, 0x00003FF2 //A4 = +1.90016864347860462550e-04L +data8 0x989D7E1F60845811, 0x0000BFF0 //A5 = -3.63863004988760879054e-05L +data8 0xE615A5A669361BE1, 0x00003FED //A6 = +6.85705419984646959791e-06L +data8 0xAACD08E0BE6270F8, 0x0000BFEB //A7 = -1.27256599602163049440e-06L +data8 0xF9DEE9C1C02A3062, 0x00003FE8 //A8 = +2.32710274258898439253e-07L +data8 0xB420E960508A3003, 0x0000BFE6 //A9 = -4.19394488070741280136e-08L +data8 0xFF5E3ECA229CB0C7, 0x00003FE3 //A10 = +7.43219121339261970485e-09L +data8 0xAF86504D78D35E89, 0x0000BFE1 //A11 = -1.27711000692808421573e-09L +data8 0xDE1CE78ADB6DDF04, 0x00003FDE //A12 = +2.02010513073041015283e-10L +data8 0xE124FFAA267301A5, 0x0000BFDB //A13 = -2.55959692063871343080e-11L +data8 0x81F1BEBEFBE168D2, 0x00003FD8 //A14 = +1.84661980716000872722e-12L +// Pol11 +data8 0xC6CE5D7D18203EAA, 0x00003FFB //A0 = +9.70732978630764996752e-02L +data8 0x86E8A30A76923C88, 0x0000BFF9 //A1 = -1.64683517829920230086e-02L +data8 0xB4A1CBB7576B4183, 0x00003FF6 //A2 = +2.75622581042760461528e-03L +data8 0xEEB782FBC8BB352B, 0x0000BFF3 //A3 = -4.55316242981110299585e-04L +data8 0x9BC489CC00C7E63A, 0x00003FF1 //A4 = +7.42758405750422020216e-05L +data8 0xC8D418A9F2A78515, 0x0000BFEE //A5 = -1.19703114831817055481e-05L +data8 0xFFE671DCEE8665A8, 0x00003FEB //A6 = +1.90660487794668853072e-06L +data8 0xA1313247D3E35365, 0x0000BFE9 //A7 = -3.00243820009225833104e-07L +data8 0xC8D5A87C970712B1, 0x00003FE6 //A8 = +4.67604496871825103188e-08L +data8 0xF77258CEF4675E25, 0x0000BFE3 //A9 = -7.20164586117313631144e-09L +data8 0x96549D79C0F33C27, 0x00003FE1 //A10 = +1.09379854902340983112e-09L +data8 0xB16A6CC5A3AE6E01, 0x0000BFDE //A11 = -1.61358659378896671620e-10L +data8 0xC0970F2551C52F96, 0x00003FDB //A12 = +2.18949565869759698947e-11L +data8 0xA6E029ABB3BB500C, 0x0000BFD8 //A13 = -2.37144541649446501026e-12L +data8 0xA3E43F3857D1B6A5, 0x00003FD4 //A14 = +1.45564973108152568130e-13L +// Pol12 +data8 0xA36E35FC807B3E64, 0x00003FFB //A0 = +7.98000543291529334886e-02L +data8 0xB725A29237C8F94F, 0x0000BFF8 //A1 = -1.11784064873715046550e-02L +data8 0xCB51EF23EAD5F327, 0x00003FF5 //A2 = +1.55120891755237931425e-03L +data8 0xDFA838770AE711A2, 0x0000BFF2 //A3 = -2.13296043002775850891e-04L +data8 0xF3D7B777730B202D, 0x00003FEF //A4 = +2.90683082614108095819e-05L +data8 0x83C5FF0D475796DD, 0x0000BFED //A5 = -3.92715403535014263671e-06L +data8 0x8D37B41345244FD5, 0x00003FEA //A6 = +5.26076523514903487927e-07L +data8 0x9616B7E9C40C1DCC, 0x0000BFE7 //A7 = -6.98905176445499510102e-08L +data8 0x9E38FDF61B26699A, 0x00003FE4 //A8 = +9.20976891314475742405e-09L +data8 0xA565DFE27AEA03A1, 0x0000BFE1 //A9 = -1.20342845518628622757e-09L +data8 0xAAEB9EFB497EC812, 0x00003FDE //A10 = +1.55451193328690040046e-10L +data8 0xABD305A38349EAEB, 0x0000BFDB //A11 = -1.95341618552982314342e-11L +data8 0x9EDB00104DB66DD9, 0x00003FD8 //A12 = +2.25747200093121867690e-12L +data8 0xE9F80AF513F2B8AB, 0x0000BFD4 //A13 = -2.07806143133802417637e-13L +data8 0xC2B840C3859AB166, 0x00003FD0 //A14 = +1.08091168358477817812e-14L +// Pol13 +data8 0x86CD0BF01914407A, 0x00003FFB //A0 = +6.58207829138836028568e-02L +data8 0xF9F4A17FA70807C3, 0x0000BFF7 //A1 = -7.62803922344113067603e-03L +data8 0xE63BF84EDE20EDAA, 0x00003FF4 //A2 = +8.78273993036530088653e-04L +data8 0xD2B746011B39D879, 0x0000BFF1 //A3 = -1.00477176633442906101e-04L +data8 0xBFA4F1F66023C975, 0x00003FEE //A4 = +1.14228914411837438985e-05L +data8 0xAD3A05E1F1F0EA8F, 0x0000BFEB //A5 = -1.29063913420827451449e-06L +data8 0x9BA1F2E56DBE1B49, 0x00003FE8 //A6 = +1.44944165416032280452e-07L +data8 0x8AFE93AF627BAFA6, 0x0000BFE5 //A7 = -1.61810825806733824014e-08L +data8 0xF6CEAB6E78304875, 0x00003FE1 //A8 = +1.79575947795401009493e-09L +data8 0xD9BFD64FD9166ECF, 0x0000BFDE //A9 = -1.98041892772535870322e-10L +data8 0xBE482C8AEA403737, 0x00003FDB //A10 = +2.16325508593741350803e-11L +data8 0xA1FB98FA19E62A4F, 0x0000BFD8 //A11 = -2.30191407969654156362e-12L +data8 0xFDB2E0599016AD1E, 0x00003FD4 //A12 = +2.25329742249079975388e-13L +data8 0x9E179A99CDD4BF4B, 0x0000BFD1 //A13 = -1.75517603530017718494e-14L +data8 0xDE4DE992A707C7BC, 0x00003FCC //A14 = +7.71273133169032472595e-16L +// Pol14 +data8 0xDF0639E60CF6E96C, 0x00003FFA //A0 = +5.44492971101228988138e-02L +data8 0xAB6737B6065BD1C2, 0x0000BFF7 //A1 = -5.23081035867078490333e-03L +data8 0x8322CC0765FD9C27, 0x00003FF4 //A2 = +5.00243857322493802503e-04L +data8 0xC7C37C447AABC9BE, 0x0000BFF0 //A3 = -4.76273572257807668623e-05L +data8 0x977C068C67DD09B3, 0x00003FED //A4 = +4.51458915834329225528e-06L +data8 0xE4C00648054CBD72, 0x0000BFE9 //A5 = -4.26080256412742187632e-07L +data8 0xABF9032C426C0F54, 0x00003FE6 //A6 = +4.00405155179176153559e-08L +data8 0x80BD82177111B70D, 0x0000BFE3 //A7 = -3.74683488305340664541e-09L +data8 0xBFEFB2BBFC4AAE16, 0x00003FDF //A8 = +3.49130134089615132836e-10L +data8 0x8E68BCEC2A2F6025, 0x0000BFDC //A9 = -3.23800879252444001040e-11L +data8 0xD19FEF92B2157585, 0x00003FD8 //A10 = +2.97894685764287382560e-12L +data8 0x967A0ECC142382D9, 0x0000BFD5 //A11 = -2.67300472044743953909e-13L +data8 0xC6D8869855133985, 0x00003FD1 //A12 = +2.20763189681614758000e-14L +data8 0xD10AC0B228ABCECC, 0x0000BFCD //A13 = -1.45052027893524847250e-15L +data8 0xF7C6DEB4522487A3, 0x00003FC8 //A14 = +5.37280367113168366711e-17L +// Pol15 +data8 0xB8F57DECFAC3B255, 0x00003FFA //A0 = +4.51559943173131409760e-02L +data8 0xEC1B8A6C822C036F, 0x0000BFF6 //A1 = -3.60271577347565115947e-03L +data8 0x963A6DD66951B72E, 0x00003FF3 //A2 = +2.86537625289770759336e-04L +data8 0xBE93F9E80DF4AE0A, 0x0000BFEF //A3 = -2.27186718010906557773e-05L +data8 0xF10589FC10D908E0, 0x00003FEB //A4 = +1.79575113004740124999e-06L +data8 0x97F1A2435C7877EF, 0x0000BFE8 //A5 = -1.41508767557208714648e-07L +data8 0xBEFF2FB5F00E9327, 0x00003FE4 //A6 = +1.11174782364058338591e-08L +data8 0xEF5E09DC714DF198, 0x0000BFE0 //A7 = -8.70813302639377671664e-10L +data8 0x958A6EB9408970A4, 0x00003FDD //A8 = +6.80032608255179732632e-11L +data8 0xBA31F40954675710, 0x0000BFD9 //A9 = -5.29198388081297293593e-12L +data8 0xE63B9CEEDC4CF0E6, 0x00003FD5 //A10 = +4.08975721481205179918e-13L +data8 0x8AF8F1E3FED32CEC, 0x0000BFD2 //A11 = -3.08580807479307213059e-14L +data8 0x9A88033A08842BEA, 0x00003FCE //A12 = +2.14455258045503137285e-15L +data8 0x88BCF775B7B3A939, 0x0000BFCA //A13 = -1.18601440246395438386e-16L +data8 0x88687B63A5B7135E, 0x00003FC5 //A14 = +3.69734984736162880476e-18L +// Pol16 +data8 0x99B8A501204BF3E7, 0x00003FFA //A0 = +3.75296063885057657456e-02L +data8 0xA33FA20D2867C79C, 0x0000BFF6 //A1 = -2.49097544033960143953e-03L +data8 0xACFD14CA6AA55829, 0x00003FF2 //A2 = +1.64974783411741182991e-04L +data8 0xB6E9B4ED9B378B09, 0x0000BFEE //A3 = -1.09024594422859744844e-05L +data8 0xC0FD95D38ADCF301, 0x00003FEA //A4 = +7.18945888498730738040e-07L +data8 0xCB302F7AAFFFA074, 0x0000BFE6 //A5 = -4.73084450875945514829e-08L +data8 0xD578674188198402, 0x00003FE2 //A6 = +3.10640208133938026422e-09L +data8 0xDFCC6ED4219E7FC4, 0x0000BFDE //A7 = -2.03543610142159316364e-10L +data8 0xEA1F448AA373E4A9, 0x00003FDA //A8 = +1.33083028465054001215e-11L +data8 0xF44780B8EACD37B5, 0x0000BFD6 //A9 = -8.67854438613319891312e-13L +data8 0xFD55794492F53AEE, 0x00003FD2 //A10 = +5.62514216652784597182e-14L +data8 0x805C040421E7A098, 0x0000BFCF //A11 = -3.56269003968981157635e-15L +data8 0xEFCCD20DE93A138E, 0x00003FCA //A12 = +2.07993414310230172191e-16L +data8 0xB259764466732080, 0x0000BFC6 //A13 = -9.66834364652262630640e-18L +data8 0x9597C1DB6AF830E4, 0x00003FC1 //A14 = +2.53420063550355940811e-19L +// Pol17 +data8 0xFFFCBD66BAA4368C, 0x00003FF9 //A0 = +3.12484454387527380657e-02L +data8 0xE28174723762D197, 0x0000BFF5 //A1 = -1.72810121976742793952e-03L +data8 0xC81D832836019EC4, 0x00003FF1 //A2 = +9.54224026432644399736e-05L +data8 0xB0885530C7D7AB5B, 0x0000BFED //A3 = -5.26107996417947739207e-06L +data8 0x9B7EA64F62F6FD06, 0x00003FE9 //A4 = +2.89631495607631932854e-07L +data8 0x88C24ACAA9042166, 0x0000BFE5 //A5 = -1.59208376111789845204e-08L +data8 0xF033E5CD9B7F2822, 0x00003FE0 //A6 = +8.73852423930118273815e-10L +data8 0xD2A1B161FB4DFBFE, 0x0000BFDC //A7 = -4.78920839886600387264e-11L +data8 0xB86B27FCBB5A1E9D, 0x00003FD8 //A8 = +2.62074563162805723295e-12L +data8 0xA124E1303F08E508, 0x0000BFD4 //A9 = -1.43124677534734729453e-13L +data8 0x8C0B270950D7C697, 0x00003FD0 //A10 = +7.77397948226387851915e-15L +data8 0xEE034E350C65D2D9, 0x0000BFCB //A11 = -4.12886586201102092942e-16L +data8 0xBA94473E52495304, 0x00003FC7 //A12 = +2.02289587087169937807e-17L +data8 0xE913D34CBB853CEE, 0x0000BFC2 //A13 = -7.89697093687557412061e-19L +data8 0xA44576A85E8CAB59, 0x00003FBD //A14 = +1.73929048516879172258e-20L +// Pol18 +data8 0xD579A3FE4622DED2, 0x00003FF9 //A0 = +2.60589793198885278242e-02L +data8 0x9D97EB84E7CD89C8, 0x0000BFF5 //A1 = -1.20234251012583627659e-03L +data8 0xE86EFDC2CCA5C47B, 0x00003FF0 //A2 = +5.54164790116744315389e-05L +data8 0xAB39FA5621E39B15, 0x0000BFEC //A3 = -2.55147332073979814633e-06L +data8 0xFC0244F58F8D8097, 0x00003FE7 //A4 = +1.17350772365097747003e-07L +data8 0xB941D44B71B14FE2, 0x0000BFE3 //A5 = -5.39169255673480031672e-09L +data8 0x880B4A40B6F2C901, 0x00003FDF //A6 = +2.47462779512141204748e-10L +data8 0xC7998AE5652CDCFC, 0x0000BFDA //A7 = -1.13459336509953900777e-11L +data8 0x92438AA45915CD95, 0x00003FD6 //A8 = +5.19633524685027215673e-13L +data8 0xD6067243AD3AEAE6, 0x0000BFD1 //A9 = -2.37615683835509918256e-14L +data8 0x9BD0722A07669E4D, 0x00003FCD //A10 = +1.08117849400479298186e-15L +data8 0xDDF6F1B79F50E3C4, 0x0000BFC8 //A11 = -4.81309059042573202592e-17L +data8 0x91F283C0351A9ACA, 0x00003FC4 //A12 = +1.97795505638619048412e-18L +data8 0x990BC4FAFA9C7542, 0x0000BFBF //A13 = -6.48174913943425248713e-20L +data8 0xB536865B89676892, 0x00003FB9 //A14 = +1.19916696090758913485e-21L +// Pol19 +data8 0xB241CEB1B7C953F1, 0x00003FF9 //A0 = +2.17598950382519671244e-02L +data8 0xDBD6FBA9B11B85E1, 0x0000BFF4 //A1 = -8.38622198373701898430e-04L +data8 0x877605B1AD082441, 0x00003FF0 //A2 = +3.22964249573360786077e-05L +data8 0xA6D04DC067A5D310, 0x0000BFEB //A3 = -1.24285881515578912302e-06L +data8 0xCD458A72BC161315, 0x00003FE6 //A4 = +4.77935289502172654216e-08L +data8 0xFC6902CFB5DE90A2, 0x0000BFE1 //A5 = -1.83652591038905929358e-09L +data8 0x9B12B0707DFE615C, 0x00003FDD //A6 = +7.05190381049444126079e-11L +data8 0xBE67972F2C8EE5AE, 0x0000BFD8 //A7 = -2.70581282732878853626e-12L +data8 0xE99D8CAF9A3FFE02, 0x00003FD3 //A8 = +1.03746090805854376435e-13L +data8 0x8F35F5BBEF9E4299, 0x0000BFCF //A9 = -3.97489765699919189983e-15L +data8 0xAF6E62C3C91B7178, 0x00003FCA //A10 = +1.52162305785839987182e-16L +data8 0xD6636229C1646963, 0x0000BFC5 //A11 = -5.81100425482928485309e-18L +data8 0x810331BF289E068F, 0x00003FC1 //A12 = +2.18555638648715837944e-19L +data8 0x8E3D07CA59546B83, 0x0000BFBC //A13 = -7.53003820427900359431e-21L +data8 0xD5970B291ED73560, 0x00003FB6 //A14 = +1.76677518655145552907e-22L +LOCAL_OBJECT_END(erfc_p_table) + + +.section .text +GLOBAL_LIBM_ENTRY(erfc) + +{ .mfi + alloc r32 = ar.pfs, 0, 33, 4, 0 + fma.s1 FR_Tmp = f1, f1, f8 // |x|+1, if x >= 0 + nop.i 0 +} +{ .mfi + addl EXP_AD_TB1 = @ltoff(exp_table_1), gp + fms.s1 FR_Tmp1 = f1, f1, f8 // |x|+1, if x < 0 + mov exp_GR_rshf_2to56 = 0x4768 // begin 1.1 2^(63+56) +};; + +{ .mfi + ld8 EXP_AD_TB1 = [EXP_AD_TB1] + fcmp.ge.s1 p6,p7 = f8, f0 // p6: x >= 0 ,p7: x<0 + mov exp_GR_rshf_2to56 = 0x4768 // begin 1.1 2^(63+56) +} +{ .mlx + mov exp_TB1_size = 0x100 + movl exp_GR_sig_inv_ln2 = 0xb8aa3b295c17f0bc //signif. of 1/ln2 +};; + +{ .mfi + nop.m 0 + fclass.m p8,p0 = f8,0x07 // p8: x = 0 + shl exp_GR_rshf_2to56 = exp_GR_rshf_2to56, 48 //end 1.1 2^(63+56) +} +{ .mfi + mov exp_GR_exp_2tom56 = 0xffff-56 + fnma.s1 EXP_NORM_f8 = f8, f8, f0 // high bits for -x^2 + nop.i 0 +};; + + +.pred.rel "mutex",p6,p7 +{ .mfi + setf.sig EXP_INV_LN2_2TO63 = exp_GR_sig_inv_ln2 // form 1/ln2 * 2^63 +(p6) fma.s1 FR_AbsArg = f1, f0, f8 // |x|, if x >= 0 + mov GR_POS_ARG_ASYMP = 0x403C +} +{ .mfi + mov GR_NEG_ARG_ASYMP = 0x4018 +(p7) fms.s1 FR_AbsArg = f1, f0, f8 // |x|, if x < 0 + mov exp_GR_rshf = 0x43e8 // begin 1.1 2^63 for right shift +};; + +{ .mfi + setf.exp EXP_2TOM56 = exp_GR_exp_2tom56 // 2^-56 for scaling Nfloat + fclass.m p10,p0 = f8, 0x21 // p10: x = +inf + mov exp_GR_17ones = 0x1FFFF +} +{ .mlx + setf.d EXP_RSHF_2TO56 = exp_GR_rshf_2to56 // const 1.10*2^(63+56) + movl GR_ERFC_XB_TB = 0x1A0 +};; + + +.pred.rel "mutex",p6,p7 +{ .mfi + ldfd FR_UnfBound = [EXP_AD_TB1], 16 +(p6) fma.s1 FR_Tmp = FR_Tmp, FR_Tmp, f0 // (|x|+1)^2,x >=0 + shl exp_GR_rshf = exp_GR_rshf, 48 //end 1.1 2^63 for right shift +} +{ .mfi + nop.m 0 +(p7) fma.s1 FR_Tmp = FR_Tmp1, FR_Tmp1, f0 // (|x|+1)^2, x<0 + mov GR_0x1 = 0x1 +};; + +{ .mfi + mov GR_BIAS = 0x0FFFF + fclass.m p9,p0 = f8, 0x22 // p9: x = -inf + shl GR_EpsNorm = GR_0x1,53 +} +{ .mfb + mov exp_TB2_size = 0x80 +(p8) fma.d.s0 f8 = f1, f1, f0 //p8: y = 1.0, x = 0 +(p8) br.ret.spnt b0 //p8: quick exit for x = 0 +};; + +{ .mfi + nop.m 0 + fclass.m p11,p0 = f8, 0xc3 // p11: x = nan + nop.i 0 +} +{ .mfi + setf.d EXP_RSHF = exp_GR_rshf //Form right shift const 1.100 * 2^63 + fma.s1 FR_NormX = f8,f1,f0 + nop.i 0 +};; + +{ .mfi + setf.d FR_EpsNorm = GR_EpsNorm + nop.f 0 +(p6) shl GR_ARG_ASYMP = GR_POS_ARG_ASYMP, 48//p6:ARG_ASYMP= 28.0,x>=0 +} +{ .mfi + nop.m 0 + fma.s1 FR_2 = f1, f1, f1 + nop.i 0 +};; + +{ .mfi + ldfe exp_ln2_by_128_hi = [EXP_AD_TB1],16 + fma.s1 f8_sq_lo = f8, f8, EXP_NORM_f8 // low bits for -x^2 +(p7) shl GR_ARG_ASYMP = GR_NEG_ARG_ASYMP, 48//p6:ARG_ASYMP= 6.0,x < 0 +};; + +{ .mfi + sub GR_mBIAS = r0, GR_BIAS + fma.s1 FR_Tmp = FR_Tmp, FR_Tmp, f0 // (|x|+1)^4 + nop.i 0 +} +{ .mfi + ldfe exp_ln2_by_128_lo = [EXP_AD_TB1], 16 + nop.f 0 + nop.i 0 +};; + +{ .mfi + getf.d GR_AbsArg = FR_AbsArg + nop.f 0 + add GR_ERFC_XB_TB = GR_ERFC_XB_TB, EXP_AD_TB1//pointer to XB_TBL +} +{ .mfb + shladd GR_ShftPi_bias = GR_BIAS, 4, GR_mBIAS // BIAS * 2^4 - BIAS +(p9) fma.d.s0 f8 = f1, f1, f1 // p9: y = 2 for x = -inf +(p9) br.ret.spnt b0 // p9: quick exit for x = -inf +};; + +{ .mfi + add GR_ERFC_P_TB = 0x140, GR_ERFC_XB_TB // pointer to P_TBL + fma.s1 EXP_W_2TO56_RSH = EXP_NORM_f8,EXP_INV_LN2_2TO63,EXP_RSHF_2TO56 + shladd GR_ShftPi_bias = GR_ShftPi_bias, 4, r0 // BIAS * 240 +} +{ .mfb + nop.m 0 +(p10) fma.d.s0 f8 = f0, f1, f0 // p10: y = 0 for x = +inf +(p10) br.ret.spnt b0 // p10: quick exit for x = +inf +};; + + +.pred.rel "mutex",p6,p7 +{ .mfi +(p6) cmp.gt.unc p15,p0 = GR_AbsArg,GR_ARG_ASYMP //p15: x > 28.0,p6: x >= 0 + nop.f 0 +(p7) cmp.gt.unc p14,p0 = GR_AbsArg, GR_ARG_ASYMP //p14: x < - 6.0,p7: x < 0 +} +{ .mfb + add EXP_AD_TB2 = exp_TB1_size, EXP_AD_TB1 +(p11) fma.d.s0 f8 = f8, f1, f0 //p11: y = x for x = nan +(p11) br.ret.spnt b0 //p11: quick exit for x = nan +};; + +{ .mfi + add EXP_AD_P = exp_TB2_size, EXP_AD_TB2 + fms.s1 f8_sq_lo = f1, f1, f8_sq_lo // 1 - low bits for -x^2 + nop.i 0 +};; + +{ .mfi + ldfpd exp_P4, exp_P3 = [EXP_AD_P], 16 + fmerge.s FR_X = f8,f8 + shladd GR_ShftXBi_bias = GR_mBIAS, 4, r0 +} +{ .mfb + nop.m 0 +(p14) fnma.d.s0 FR_RESULT = FR_EpsNorm,FR_EpsNorm,FR_2 //p14:y ~=~ 2,x< -6.0 +(p14) br.ret.spnt b0 //p14: quick exit for x < -6.0 +};; + +//p15: y ~=~ 0.0(result with underflow error), x > ARG_ASYMP = 28, +{ .mfi + ldfpd exp_P2, exp_P1 = [EXP_AD_P] + fma.d.s0 FR_Tmpf = f1, f1, FR_EpsNorm // flag i + nop.i 0 +} +{ .mfb +(p15) mov GR_Parameter_TAG = 208 +(p15) fma.d.s0 FR_RESULT = FR_EpsNorm,FR_EpsNorm,f0 +(p15) br.cond.spnt __libm_error_region +};; + +//p8: x < 27.0, result without ungerflow error +{ .mfi + getf.exp GR_IndxPlusBias = FR_Tmp // exp + bias for (|x|+1)^4 + fcmp.lt.s1 p8,p0 = FR_NormX,FR_UnfBound + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 EXP_Nfloat = EXP_W_2TO56_RSH, EXP_2TOM56, EXP_RSHF + nop.i 0 +};; + +{ .mmi + shladd GR_ShftXBi = GR_IndxPlusBias, 4, GR_ShftXBi_bias + shladd GR_ShftPi = GR_IndxPlusBias, 4, GR_ShftPi_bias + shl GR_ShftPi_8 = GR_IndxPlusBias, 8 +};; + +{ .mmi + getf.sig exp_GR_N = EXP_W_2TO56_RSH + add GR_ERFC_XB_TB = GR_ERFC_XB_TB, GR_ShftXBi// pointer to XB[i] + sub GR_ShftPi = GR_ShftPi_8, GR_ShftPi // (256-16)*i +};; + +{ .mmi + ldfe FR_Xb = [GR_ERFC_XB_TB] + add GR_ShftA12 = 0xC0, GR_ShftPi // pointer shift for A12 + add GR_ShftA13 = 0xD0, GR_ShftPi // pointer shift for A13 +};; + +{ .mfi + add GR_P_A13 = GR_ERFC_P_TB, GR_ShftA13 // pointer to A13 + nop.f 0 + and exp_GR_index_1 = 0x0f, exp_GR_N +} +{ .mfi + add GR_P_A12 = GR_ERFC_P_TB, GR_ShftA12 // pointer to A12 + fnma.s1 exp_r = EXP_Nfloat, exp_ln2_by_128_hi, EXP_NORM_f8 + nop.i 0 +};; + +{ .mfi + ldfe FR_A12 = [GR_P_A12], -64 + nop.f 0 + and exp_GR_index_2_16 = 0x70, exp_GR_N +} +{ .mfi + ldfe FR_A13 = [GR_P_A13], -64 + nop.f 0 + shladd EXP_AD_T1 = exp_GR_index_1, 4, EXP_AD_TB1 +};; + +{ .mmi + ldfe FR_A8 = [GR_P_A12], 32 + ldfe FR_A9 = [GR_P_A13], 32 + add EXP_AD_T2 = EXP_AD_TB2, exp_GR_index_2_16 +};; + +{ .mmi + ldfe FR_A10 = [GR_P_A12], -96 + ldfe FR_A11 = [GR_P_A13], -96 + nop.i 0 +};; + +{ .mmi + ldfe FR_A4 = [GR_P_A12], 32 + ldfe FR_A5 = [GR_P_A13], 32 + shr r2 = exp_GR_N, 0x7 +};; + +{ .mfi + ldfe FR_A6 = [GR_P_A12], -64 + fma.s1 exp_rP4pP3 = exp_r, exp_P4, exp_P3 + nop.i 0 +} +{ .mfi + ldfe FR_A7 = [GR_P_A13], -64 + fma.s1 exp_rsq = exp_r, exp_r, f0 + nop.i 0 +};; + +{ .mmi + ldfe FR_A2 = [GR_P_A12], -32 + ldfe FR_A3 = [GR_P_A13], -32 + addl exp_GR_biased_M = 0xffff, r2 +};; + +{ .mmi + ldfe FR_A0 = [GR_P_A12], 224 + ldfe FR_A1 = [GR_P_A13] + nop.i 0 +};; + +{ .mfi + ldfe FR_A14 = [GR_P_A12] + fms.s1 FR_LocArg = FR_AbsArg, f1, FR_Xb // xloc = x - x[i] + nop.i 0 +};; + +{ .mmi + setf.exp EXP_2M = exp_GR_biased_M + ldfe exp_T1 = [EXP_AD_T1] + nop.i 0 +};; + +{ .mfi + ldfe exp_T2 = [EXP_AD_T2] + fma.s1 exp_P_hi = exp_rsq, exp_P1, exp_r + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 exp_rcube = exp_r, exp_rsq, f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 exp_P_lo = exp_r, exp_rP4pP3, exp_P2 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fnma.s1 exp_f = EXP_Nfloat, exp_ln2_by_128_lo, f8_sq_lo + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_P14_0_1 = FR_LocArg, FR_LocArg, f0 // xloc ^2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_P14_0_2 = FR_A13, FR_LocArg, FR_A12 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_P14_1_1 = FR_A9, FR_LocArg, FR_A8 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_P14_1_2 = FR_A11, FR_LocArg, FR_A10 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_P14_2_1 = FR_A5, FR_LocArg, FR_A4 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_P14_2_2 = FR_A7, FR_LocArg, FR_A6 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_P14_3_1 = FR_A1, FR_LocArg, FR_A0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_P14_3_2 = FR_A3, FR_LocArg, FR_A2 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_P14_6_1 = FR_P14_0_1, FR_A14, FR_P14_0_2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_P14_7_2 = FR_P14_0_1, FR_P14_0_1, f0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_P14_7_1 = FR_P14_0_1, FR_P14_1_2, FR_P14_1_1 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 exp_S2 = exp_f, exp_T2, f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 exp_S1 = EXP_2M, exp_T1, f0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_P14_8_1 = FR_P14_0_1, FR_P14_3_2, FR_P14_3_1 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_P14_8_2 = FR_P14_0_1, FR_P14_2_2, FR_P14_2_1 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_P14_12_1 = FR_P14_7_2, FR_P14_6_1, FR_P14_7_1 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 exp_S = exp_S1, exp_S2, f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 exp_P = exp_rcube, exp_P_lo, exp_P_hi + nop.i 0 +};; + + +{ .mfi + nop.m 0 + fma.s1 FR_P14_13_1 = FR_P14_7_2, FR_P14_8_2, FR_P14_8_1 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_P14_13_2 = FR_P14_7_2, FR_P14_7_2, f0 // xloc^8 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_Exp = exp_S, exp_P, exp_S // exp(-x^2) + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_Pol = FR_P14_13_2, FR_P14_12_1, FR_P14_13_1 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.d.s0 FR_Tmpf = f8, f1, f0 // flag d + nop.i 0 +};; + +//p6: result for 0 < x < = 28.0, +//p7: result for -6.0 <= x < 0, +//p8: exit for - 6.0 <= x < UnfBound ~=~ 26.54.. + +.pred.rel "mutex",p6,p7 +{ .mfi + nop.m 0 +(p6) fma.d.s0 f8 = FR_Exp, FR_Pol, f0 + nop.i 0 +} +{ .mfb + mov GR_Parameter_TAG = 208 +(p7) fnma.d.s0 f8 = FR_Exp, FR_Pol, FR_2 +(p8) br.ret.sptk b0 +};; + +GLOBAL_LIBM_END(erfc) + +// call via (p15) br.cond.spnt __libm_error_region +// for x > ARG_ASYMP = 28.0 +// or +// +// after .endp erfc for UnfBound < = x < = ARG_ASYMP = 28.0 + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfd [GR_Parameter_Y] = FR_Y,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; +.body +{ .mib + stfd [GR_Parameter_X] = FR_X // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfd [GR_Parameter_Y] = FR_RESULT // STORE Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + nop.m 0 + nop.m 0 + add GR_Parameter_RESULT = 48,sp +};; +{ .mmi + ldfd f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) +.type __libm_error_support#,@function +.global __libm_error_support# + + + diff --git a/sysdeps/ia64/fpu/s_erfcf.S b/sysdeps/ia64/fpu/s_erfcf.S new file mode 100644 index 0000000000..2e3eeab3c7 --- /dev/null +++ b/sysdeps/ia64/fpu/s_erfcf.S @@ -0,0 +1,983 @@ +.file "erfcf.s" + + +// Copyright (c) 2002 - 2005, Intel Corporation +// All rights reserved. +// +// Contributed 2002 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 01/17/02 Initial version +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/06/03 Reordered header: .section, .global, .proc, .align +// 03/31/05 Reformatted delimiters between data tables +// +// API +//============================================================== +// float erfcf(float) +// +// Overview of operation +//============================================================== +// 1. 0 <= x <= 10.06 +// +// erfcf(x) = P15(x) * exp( -x^2 ) +// +// Comment: +// +// Let x(0)=0, x(i) = 2^(i), i=1,...3, x(4)= 10.06 +// +// Let x(i)<= x < x(i+1). +// We can find i as exponent of argument x (let i = 0 for 0<= x < 2 ) +// +// Let P15(x) - polynomial approximation of degree 15 for function +// erfcf(x) * exp( x^2) and x(i) <= x <= x(i+1), i = 0,1,2,3 +// Polynomial coeffitients we have in the table erfc_p_table. +// +// So we can find result for erfcf(x) as above. +// Algorithm description for exp function see below. +// +// 2. -4.4 <= x < 0 +// +// erfcf(x) = 2.0 - erfcf(-x) +// +// 3. x > 10.06 +// +// erfcf(x) ~=~ 0.0 +// +// 4. x < -4.4 +// +// erfcf(x) ~=~ 2.0 + +// Special values +//============================================================== +// erfcf(+0) = 1.0 +// erfcf(-0) = 1.0 + +// erfcf(+qnan) = +qnan +// erfcf(-qnan) = -qnan +// erfcf(+snan) = +qnan +// erfcf(-snan) = -qnan + +// erfcf(-inf) = 2.0 +// erfcf(+inf) = +0 + +//============================================================== +// Take double exp(double) from libm_64. +// +// Overview of operation +//============================================================== +// Take the input x. w is "how many log2/128 in x?" +// w = x * 128/log2 +// n = int(w) +// x = n log2/128 + r + delta + +// n = 128M + index_1 + 2^4 index_2 +// x = M log2 + (log2/128) index_1 + (log2/8) index_2 + r + delta + +// exp(x) = 2^M 2^(index_1/128) 2^(index_2/8) exp(r) exp(delta) +// Construct 2^M +// Get 2^(index_1/128) from table_1; +// Get 2^(index_2/8) from table_2; +// Calculate exp(r) by series +// r = x - n (log2/128)_high +// delta = - n (log2/128)_low +// Calculate exp(delta) as 1 + delta +// +// Comment for erfcf: +// +// Let exp(r) = 1 + x + 0.5*x^2 + (1/6)*x^3 +// Let delta = 0. +//============================================================== +// +// Registers used +//============================================================== +// Floating Point registers used: +// f8, input +// f6,f7,f9 -> f11, f32 -> f92 + +// General registers used: +// r14 -> r22,r32 -> r50 + +// Predicate registers used: +// p6 -> p15 + +// Assembly macros +//============================================================== +EXP_AD_TB1 = r14 +exp_GR_sig_inv_ln2 = r15 +exp_TB1_size = r16 +exp_GR_rshf_2to56 = r17 +exp_GR_exp_2tom56 = r18 + +exp_GR_rshf = r33 +EXP_AD_TB2 = r34 +EXP_AD_P = r35 +exp_GR_N = r36 +exp_GR_index_1 = r37 +exp_GR_index_2_16 = r38 +exp_GR_biased_M = r39 +EXP_AD_T1 = r40 +EXP_AD_T2 = r41 +exp_TB2_size = r42 + +// GR for erfcf(x) +//============================================================== +GR_IndxPlusBias = r19 +GR_ExpMask = r20 +GR_BIAS = r21 +GR_ShftPi_bias = r22 + +GR_P_POINT_1 = r43 +GR_P_POINT_2 = r44 +GR_P_POINT_3 = r45 +GR_P_POINT_4 = r46 + +GR_ShftPi = r47 +GR_EpsNorm = r48 + +GR_05 = r49 +GR_1_by_6 = r50 + +// GR for __libm_support call +//============================================================== + +GR_SAVE_B0 = r43 +GR_SAVE_PFS = r44 +GR_SAVE_GP = r45 +GR_SAVE_SP = r46 + +GR_Parameter_X = r47 +GR_Parameter_Y = r48 +GR_Parameter_RESULT = r49 +GR_Parameter_TAG = r50 + + +// FR for exp(-x^2) +//============================================================== +FR_X = f10 +FR_Y = f1 +FR_RESULT = f8 + +EXP_2TOM56 = f6 +EXP_INV_LN2_2TO63 = f7 +EXP_W_2TO56_RSH = f9 +exp_ln2_by_128_hi = f11 + +EXP_RSHF_2TO56 = f32 +exp_ln2_by_128_lo = f33 +EXP_RSHF = f34 +EXP_Nfloat = f35 +exp_r = f36 +exp_rsq = f37 +EXP_2M = f38 +exp_S1 = f39 +exp_T1 = f40 +exp_P = f41 +exp_S = f42 +EXP_NORM_f8 = f43 +exp_S2 = f44 +exp_T2 = f45 + +// FR for erfcf(x) +//============================================================== +FR_AbsArg = f46 +FR_Tmp = f47 +FR_Tmp1 = f48 +FR_Tmpf = f49 +FR_NormX = f50 + +FR_A15 = f51 +FR_A14 = f52 + +FR_A13 = f53 +FR_A12 = f54 + +FR_A11 = f55 +FR_A10 = f56 + +FR_A9 = f57 +FR_A8 = f58 + +FR_A7 = f59 +FR_A6 = f60 + +FR_A5 = f61 +FR_A4 = f62 + +FR_A3 = f63 +FR_A2 = f64 + +FR_A1 = f65 +FR_A0 = f66 + +FR_P15_0_1 = f67 +FR_P15_1_1 = f68 +FR_P15_1_2 = f69 +FR_P15_2_1 = f70 +FR_P15_2_2 = f71 +FR_P15_3_1 = f72 +FR_P15_3_2 = f73 +FR_P15_4_1 = f74 +FR_P15_4_2 = f75 +FR_P15_7_1 = f76 +FR_P15_7_2 = f77 +FR_P15_8_1 = f78 +FR_P15_9_1 = f79 +FR_P15_9_2 = f80 +FR_P15_13_1 = f81 +FR_P15_14_1 = f82 +FR_P15_14_2 = f83 + +FR_2 = f84 +FR_05 = f85 +FR_1_by_6 = f86 +FR_Pol = f87 +FR_Exp = f88 + +FR_POS_ARG_ASYMP = f89 +FR_NEG_ARG_ASYMP = f90 + +FR_UnfBound = f91 +FR_EpsNorm = f92 + +// Data tables +//============================================================== +RODATA +.align 16 + +// ************* DO NOT CHANGE ORDER OF THESE TABLES ******************** + +// double-extended 1/ln(2) +// 3fff b8aa 3b29 5c17 f0bb be87fed0691d3e88 +// 3fff b8aa 3b29 5c17 f0bc +// For speed the significand will be loaded directly with a movl and setf.sig +// and the exponent will be bias+63 instead of bias+0. Thus subsequent +// computations need to scale appropriately. +// The constant 128/ln(2) is needed for the computation of w. This is also +// obtained by scaling the computations. +// +// Two shifting constants are loaded directly with movl and setf.d. +// 1. EXP_RSHF_2TO56 = 1.1000..00 * 2^(63-7) +// This constant is added to x*1/ln2 to shift the integer part of +// x*128/ln2 into the rightmost bits of the significand. +// The result of this fma is EXP_W_2TO56_RSH. +// 2. EXP_RSHF = 1.1000..00 * 2^(63) +// This constant is subtracted from EXP_W_2TO56_RSH * 2^(-56) to give +// the integer part of w, n, as a floating-point number. +// The result of this fms is EXP_Nfloat. + + +LOCAL_OBJECT_START(exp_table_1) + +data4 0x4120f5c3, 0x408ccccd //POS_ARG_ASYMP = 10.06, NEG_ARG_ASYMP = 4.4 +data4 0x41131Cdf, 0x00800000 //UnfBound ~=~ 9.1, EpsNorm ~=~ 1.1754944e-38 +// +data8 0xb17217f7d1cf79ab , 0x00003ff7 // ln2/128 hi +data8 0xc9e3b39803f2f6af , 0x00003fb7 // ln2/128 lo +// +// Table 1 is 2^(index_1/128) where +// index_1 goes from 0 to 15 +// +data8 0x8000000000000000 , 0x00003FFF +data8 0x80B1ED4FD999AB6C , 0x00003FFF +data8 0x8164D1F3BC030773 , 0x00003FFF +data8 0x8218AF4373FC25EC , 0x00003FFF +data8 0x82CD8698AC2BA1D7 , 0x00003FFF +data8 0x8383594EEFB6EE37 , 0x00003FFF +data8 0x843A28C3ACDE4046 , 0x00003FFF +data8 0x84F1F656379C1A29 , 0x00003FFF +data8 0x85AAC367CC487B15 , 0x00003FFF +data8 0x8664915B923FBA04 , 0x00003FFF +data8 0x871F61969E8D1010 , 0x00003FFF +data8 0x87DB357FF698D792 , 0x00003FFF +data8 0x88980E8092DA8527 , 0x00003FFF +data8 0x8955EE03618E5FDD , 0x00003FFF +data8 0x8A14D575496EFD9A , 0x00003FFF +data8 0x8AD4C6452C728924 , 0x00003FFF +LOCAL_OBJECT_END(exp_table_1) + +// Table 2 is 2^(index_1/8) where +// index_2 goes from 0 to 7 + +LOCAL_OBJECT_START(exp_table_2) + +data8 0x8000000000000000 , 0x00003FFF +data8 0x8B95C1E3EA8BD6E7 , 0x00003FFF +data8 0x9837F0518DB8A96F , 0x00003FFF +data8 0xA5FED6A9B15138EA , 0x00003FFF +data8 0xB504F333F9DE6484 , 0x00003FFF +data8 0xC5672A115506DADD , 0x00003FFF +data8 0xD744FCCAD69D6AF4 , 0x00003FFF +data8 0xEAC0C6E7DD24392F , 0x00003FFF +LOCAL_OBJECT_END(exp_table_2) + +LOCAL_OBJECT_START(erfc_p_table) + +// Pol_0 +data8 0xBEA3260C63CB0446 //A15 = -5.70673541831883454676e-07 +data8 0x3EE63D6178077654 //A14 = +1.06047480138940182343e-05 +data8 0xBF18646BC5FC70A7 //A13 = -9.30491237309283694347e-05 +data8 0x3F40F92F909117FE //A12 = +5.17986512144075019133e-04 +data8 0xBF611344289DE1E6 //A11 = -2.08438217390159994419e-03 +data8 0x3F7AF9FE6AD16DC0 //A10 = +6.58606893292862351928e-03 +data8 0xBF91D219E196CBA7 //A9 = -1.74030345858217321001e-02 +data8 0x3FA4AFDDA355854C //A8 = +4.04042493708041968315e-02 +data8 0xBFB5D465BB7025AE //A7 = -8.52721769916999425445e-02 +data8 0x3FC54C15A95B717D //A6 = +1.66384418195672549029e-01 +data8 0xBFD340A75B4B1AB5 //A5 = -3.00821150926292166899e-01 +data8 0x3FDFFFC0BFCD247F //A4 = +4.99984919839853542841e-01 +data8 0xBFE81270C361852B //A3 = -7.52251035312075583309e-01 +data8 0x3FEFFFFFC67295FC //A2 = +9.99999892800303301771e-01 +data8 0xBFF20DD74F8CD2BF //A1 = -1.12837916445020868099e+00 +data8 0x3FEFFFFFFFFE7C1D //A0 = +9.99999999988975570714e-01 +// Pol_1 +data8 0xBDE8EC4BDD953B56 //A15 = -1.81338928934942767144e-10 +data8 0x3E43607F269E2A1C //A14 = +9.02309090272196442358e-09 +data8 0xBE8C4D9E69C10E02 //A13 = -2.10875261143659275328e-07 +data8 0x3EC9CF2F84566725 //A12 = +3.07671055805877356583e-06 +data8 0xBF007980B1B46A4D //A11 = -3.14228438702169818945e-05 +data8 0x3F2F4C3AD6DEF24A //A10 = +2.38783056770846320260e-04 +data8 0xBF56F5129F8D30FA //A9 = -1.40120333363130546426e-03 +data8 0x3F7AA6C7ABFC38EE //A8 = +6.50671002200751820429e-03 +data8 0xBF98E7522CB84BEF //A7 = -2.43199195666185511109e-02 +data8 0x3FB2F68EB1C3D073 //A6 = +7.40746673580490638637e-02 +data8 0xBFC7C16055AC6385 //A5 = -1.85588876564704611769e-01 +data8 0x3FD8A707AEF5A440 //A4 = +3.85194702967570635211e-01 +data8 0xBFE547BFE39AE2EA //A3 = -6.65008492032112467310e-01 +data8 0x3FEE7C91BDF13578 //A2 = +9.52706213932898128515e-01 +data8 0xBFF1CB5B61F8C589 //A1 = -1.11214769621105541214e+00 +data8 0x3FEFEA56BC81FD37 //A0 = +9.97355812243688815239e-01 +// Pol_2 +data8 0xBD302724A12F46E0 //A15 = -5.73866382814058809406e-14 +data8 0x3D98889B75D3102E //A14 = +5.57829983681360947356e-12 +data8 0xBDF16EA15074A1E9 //A13 = -2.53671153922423457844e-10 +data8 0x3E3EC6E688CFEE5F //A12 = +7.16581828336436419561e-09 +data8 0xBE82E5ED44C52609 //A11 = -1.40802202239825487803e-07 +data8 0x3EC120BE5CE42353 //A10 = +2.04180535157522081699e-06 +data8 0xBEF7B8B0311A1911 //A9 = -2.26225266204633600888e-05 +data8 0x3F29A281F43FC238 //A8 = +1.95577968156184077632e-04 +data8 0xBF55E19858B3B7A4 //A7 = -1.33552434527526534043e-03 +data8 0x3F7DAC8C3D12E5FD //A6 = +7.24463253680473816303e-03 +data8 0xBF9FF9C04613FB47 //A5 = -3.12261622211693854028e-02 +data8 0x3FBB3D5DBF9D9366 //A4 = +1.06405123978743883370e-01 +data8 0xBFD224DE9F62C258 //A3 = -2.83500342989133623476e-01 +data8 0x3FE28A95CB8C6D3E //A2 = +5.79417131000276437708e-01 +data8 0xBFEC21205D358672 //A1 = -8.79043752717008257224e-01 +data8 0x3FEDAE44D5EDFE5B //A0 = +9.27523057776805771830e-01 +// Pol_3 +data8 0xBCA3BCA734AC82F1 //A15 = -1.36952437983096410260e-16 +data8 0x3D16740DC3990612 //A14 = +1.99425676175410093285e-14 +data8 0xBD77F4353812C46A //A13 = -1.36162367755616790260e-12 +data8 0x3DCFD0BE13C73DB4 //A12 = +5.78718761040355136007e-11 +data8 0xBE1D728DF71189B4 //A11 = -1.71406885583934105120e-09 +data8 0x3E64252C8CB710B5 //A10 = +3.75233795940731111303e-08 +data8 0xBEA514B93180F33D //A9 = -6.28261292774310809962e-07 +data8 0x3EE1381118CC7151 //A8 = +8.21066421390821904504e-06 +data8 0xBF1634404FB0FA72 //A7 = -8.47019436358372148764e-05 +data8 0x3F46B2CBBCF0EB32 //A6 = +6.92700845213200923490e-04 +data8 0xBF725C2B445E6D81 //A5 = -4.48243046949004063741e-03 +data8 0x3F974E7CFA4D89D9 //A4 = +2.27603462002522228717e-02 +data8 0xBFB6D7BAC2E342D1 //A3 = -8.92292714882032736443e-02 +data8 0x3FD0D156AD9CE2A6 //A2 = +2.62777013343603696631e-01 +data8 0xBFE1C228572AADB0 //A1 = -5.54950876471982857725e-01 +data8 0x3FE8A739F48B9A3B //A0 = +7.70413377406675619766e-01 +LOCAL_OBJECT_END(erfc_p_table) + + +.section .text +GLOBAL_LIBM_ENTRY(erfcf) + +// Form index i for table erfc_p_table as exponent of x +// We use i + bias in real calculations +{ .mlx + getf.exp GR_IndxPlusBias = f8 // (sign + exp + bias) of x + movl exp_GR_sig_inv_ln2 = 0xb8aa3b295c17f0bc //signif.of 1/ln2 +} +{ .mlx + addl EXP_AD_TB1 = @ltoff(exp_table_1), gp + movl exp_GR_rshf_2to56 = 0x4768000000000000 // 1.100 2^(63+56) +} +;; + +// Form argument EXP_NORM_f8 for exp(-x^2) +{ .mfi + ld8 EXP_AD_TB1 = [EXP_AD_TB1] + fcmp.ge.s1 p6,p7 = f8, f0 // p6: x >= 0 ,p7: x<0 + mov GR_BIAS = 0x0FFFF +} +{ .mfi + mov exp_GR_exp_2tom56 = 0xffff-56 + fnma.s1 EXP_NORM_f8 = f8, f8, f0 // -x^2 + mov GR_ExpMask = 0x1ffff +} +;; + +// Form two constants we need +// 1/ln2 * 2^63 to compute w = x * 1/ln2 * 128 +// 1.1000..000 * 2^(63+63-7) to right shift int(w) into the significand + +// p9: x = 0,+inf,-inf,nan,unnorm. +// p10: x!= 0,+inf,-inf,nan,unnorm. +{ .mfi + setf.sig EXP_INV_LN2_2TO63 = exp_GR_sig_inv_ln2 // Form 1/ln2*2^63 + fclass.m p9,p10 = f8,0xef + shl GR_ShftPi_bias = GR_BIAS, 7 +} +{ .mfi + setf.d EXP_RSHF_2TO56 = exp_GR_rshf_2to56 //Const 1.10*2^(63+56) + nop.f 0 + and GR_IndxPlusBias = GR_IndxPlusBias, GR_ExpMask // i + bias +} +;; + +{ .mfi + alloc r32 = ar.pfs, 0, 15, 4, 0 +(p6) fma.s1 FR_AbsArg = f1, f0, f8 // |x| if x >= 0 + cmp.lt p15,p0 = GR_IndxPlusBias, GR_BIAS//p15: i < 0 (for |x|<1) +} +{ .mlx + setf.exp EXP_2TOM56 = exp_GR_exp_2tom56 //2^-56 for scaling Nfloat + movl exp_GR_rshf = 0x43e8000000000000 //1.10 2^63,right shift. +} +;; + +{ .mfi + ldfps FR_POS_ARG_ASYMP, FR_NEG_ARG_ASYMP = [EXP_AD_TB1],8 + nop.f 0 +(p15) mov GR_IndxPlusBias = GR_BIAS //Let i = 0 if i < 0 +} +{ .mlx + mov GR_P_POINT_3 = 0x1A0 + movl GR_05 = 0x3fe0000000000000 +} +;; + +// Form shift GR_ShftPi from the beginning of erfc_p_table +// to the polynomial with number i +{ .mfi + ldfps FR_UnfBound, FR_EpsNorm = [EXP_AD_TB1],8 + nop.f 0 + shl GR_ShftPi = GR_IndxPlusBias, 7 +} +{ .mfi + setf.d EXP_RSHF = exp_GR_rshf // Form right shift 1.100 * 2^63 +(p7) fms.s1 FR_AbsArg = f1, f0, f8 // |x| if x < 0 + mov exp_TB1_size = 0x100 +} +;; + +// Form pointer GR_P_POINT_3 to the beginning of erfc_p_table +{ .mfi + setf.d FR_05 = GR_05 + nop.f 0 + sub GR_ShftPi = GR_ShftPi,GR_ShftPi_bias +} +{ .mfb + add GR_P_POINT_3 = GR_P_POINT_3, EXP_AD_TB1 + nop.f 0 +(p9) br.cond.spnt SPECIAL // For x = 0,+inf,-inf,nan,unnorm +} +;; + +{ .mfi + add GR_P_POINT_1 = GR_P_POINT_3, GR_ShftPi + nop.f 0 + add GR_P_POINT_2 = GR_P_POINT_3, GR_ShftPi +} +{ .mfi + ldfe exp_ln2_by_128_hi = [EXP_AD_TB1],16 + fma.s1 FR_NormX = f8,f1,f0 + add GR_P_POINT_3 = GR_P_POINT_3, GR_ShftPi +} +;; + +// Load coefficients for polynomial P15(x) +{ .mfi + ldfpd FR_A15, FR_A14 = [GR_P_POINT_1], 16 + nop.f 0 + add GR_P_POINT_3 = 0x30, GR_P_POINT_3 +} +{ .mfi + ldfe exp_ln2_by_128_lo = [EXP_AD_TB1], 16 + nop.f 0 + add GR_P_POINT_2 = 0x20, GR_P_POINT_2 +} +;; + +// Now EXP_AD_TB1 points to the beginning of table 1 +{ .mlx + ldfpd FR_A13, FR_A12 = [GR_P_POINT_1] + movl GR_1_by_6 = 0x3FC5555555555555 +} +{ .mfi + add GR_P_POINT_4 = 0x30, GR_P_POINT_2 + nop.f 0 + nop.i 0 +} +;; + +{ .mfi + ldfpd FR_A11, FR_A10 = [GR_P_POINT_2] + fma.s1 FR_2 = f1, f1, f1 + mov exp_TB2_size = 0x80 +} +{ .mfi + ldfpd FR_A9, FR_A8 = [GR_P_POINT_3],16 + nop.f 0 + add GR_P_POINT_1 = 0x60 ,GR_P_POINT_1 +} +;; + +// W = X * Inv_log2_by_128 +// By adding 1.10...0*2^63 we shift and get round_int(W) in significand. +// We actually add 1.10...0*2^56 to X * Inv_log2 to do the same thing. +{ .mfi + ldfpd FR_A7, FR_A6 = [GR_P_POINT_3] + fma.s1 EXP_W_2TO56_RSH = EXP_NORM_f8,EXP_INV_LN2_2TO63,EXP_RSHF_2TO56 + add EXP_AD_TB2 = exp_TB1_size, EXP_AD_TB1 + +} +{ .mfi + ldfpd FR_A5, FR_A4 = [GR_P_POINT_4], 16 + nop.f 0 + nop.i 0 +} +;; + +{ .mfi + ldfpd FR_A3, FR_A2 = [GR_P_POINT_4] + fmerge.s FR_X = f8,f8 + nop.i 0 +} +{ .mfi + ldfpd FR_A1, FR_A0 = [GR_P_POINT_1] + nop.f 0 + nop.i 0 +} +;; + +//p14: x < - NEG_ARG_ASYMP = -4.4 -> erfcf(x) ~=~ 2.0 +{ .mfi + setf.d FR_1_by_6 = GR_1_by_6 +(p7) fcmp.gt.unc.s1 p14,p0 = FR_AbsArg, FR_NEG_ARG_ASYMP //p7: x < 0 + nop.i 0 +} +;; + +//p15: x > POS_ARG_ASYMP = 10.06 -> erfcf(x) ~=~ 0.0 +{ .mfi + nop.m 0 +(p6) fcmp.gt.unc.s1 p15,p0 = FR_AbsArg, FR_POS_ARG_ASYMP //p6: x > 0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcmp.le.s1 p8,p0 = FR_NormX, FR_UnfBound // p8: x <= UnfBound + nop.i 0 +} +{ .mfb + nop.m 0 +(p14) fnma.s.s0 FR_RESULT = FR_EpsNorm, FR_EpsNorm, FR_2//y = 2 if x <-4.4 +(p14) br.ret.spnt b0 +} +;; + +// Nfloat = round_int(W) +// The signficand of EXP_W_2TO56_RSH contains the rounded integer part of W, +// as a twos complement number in the lower bits (that is, it may be negative). +// That twos complement number (called N) is put into exp_GR_N. + +// Since EXP_W_2TO56_RSH is scaled by 2^56, it must be multiplied by 2^-56 +// before the shift constant 1.10000 * 2^63 is subtracted to yield EXP_Nfloat. +// Thus, EXP_Nfloat contains the floating point version of N + +{ .mfi + nop.m 0 + fms.s1 EXP_Nfloat = EXP_W_2TO56_RSH, EXP_2TOM56, EXP_RSHF + nop.i 0 +} +{ .mfb +(p15) mov GR_Parameter_TAG = 209 +(p15) fma.s.s0 FR_RESULT = FR_EpsNorm,FR_EpsNorm,f0 //Result.for x>10.06 +(p15) br.cond.spnt __libm_error_region +} +;; + +// Now we can calculate polynomial P15(x) +{ .mfi + nop.m 0 + fma.s1 FR_P15_1_1 = FR_AbsArg, FR_AbsArg, f0 // x ^2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_P15_0_1 = FR_A15, FR_AbsArg, FR_A14 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 FR_P15_1_2 = FR_A13, FR_AbsArg, FR_A12 + nop.i 0 +} +;; + +{ .mfi + getf.sig exp_GR_N = EXP_W_2TO56_RSH + fma.s1 FR_P15_2_1 = FR_A9, FR_AbsArg, FR_A8 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_P15_2_2 = FR_A11, FR_AbsArg, FR_A10 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 FR_P15_3_1 = FR_A5, FR_AbsArg, FR_A4 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_P15_3_2 = FR_A7, FR_AbsArg, FR_A6 + nop.i 0 +} +;; + +// exp_GR_index_1 has index_1 +// exp_GR_index_2_16 has index_2 * 16 +// exp_GR_biased_M has M +// exp_GR_index_1_16 has index_1 * 16 + +// r2 has true M +{ .mfi + and exp_GR_index_1 = 0x0f, exp_GR_N + fma.s1 FR_P15_4_1 = FR_A1, FR_AbsArg, FR_A0 + shr r2 = exp_GR_N, 0x7 + +} +{ .mfi + and exp_GR_index_2_16 = 0x70, exp_GR_N + fma.s1 FR_P15_4_2 = FR_A3, FR_AbsArg, FR_A2 + nop.i 0 +} +;; + +// EXP_AD_T1 has address of T1 +// EXP_AD_T2 has address if T2 + +{ .mfi + add EXP_AD_T2 = EXP_AD_TB2, exp_GR_index_2_16 + nop.f 0 + shladd EXP_AD_T1 = exp_GR_index_1, 4, EXP_AD_TB1 +} +{ .mfi + addl exp_GR_biased_M = 0xffff, r2 + fnma.s1 exp_r = EXP_Nfloat, exp_ln2_by_128_hi, EXP_NORM_f8 + nop.i 0 +} +;; + +// Create Scale = 2^M +// r = x - Nfloat * ln2_by_128_hi + +{ .mfi + setf.exp EXP_2M = exp_GR_biased_M + fma.s1 FR_P15_7_1 = FR_P15_0_1, FR_P15_1_1, FR_P15_1_2 + nop.i 0 +} +{ .mfi + ldfe exp_T2 = [EXP_AD_T2] + nop.f 0 + nop.i 0 +} +;; + +// Load T1 and T2 + +{ .mfi + ldfe exp_T1 = [EXP_AD_T1] + fma.s1 FR_P15_7_2 = FR_P15_1_1, FR_P15_1_1, f0 // x^4 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_P15_8_1 = FR_P15_1_1, FR_P15_2_2, FR_P15_2_1 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 FR_P15_9_1 = FR_P15_1_1, FR_P15_4_2, FR_P15_4_1 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_P15_9_2 = FR_P15_1_1, FR_P15_3_2, FR_P15_3_1 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 exp_P = FR_1_by_6, exp_r, FR_05 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 exp_rsq = exp_r, exp_r, f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 FR_P15_13_1 = FR_P15_7_2, FR_P15_7_1, FR_P15_8_1 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 FR_P15_14_1 = FR_P15_7_2, FR_P15_9_2, FR_P15_9_1 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_P15_14_2 = FR_P15_7_2, FR_P15_7_2, f0 // x^8 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 exp_P = exp_P, exp_rsq, exp_r + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 exp_S1 = EXP_2M, exp_T2, f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 FR_Pol = FR_P15_14_2, FR_P15_13_1, FR_P15_14_1 // P15(x) + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 exp_S = exp_S1, exp_T1, f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 FR_Exp = exp_S, exp_P, exp_S // exp(-x^2) + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s.s0 FR_Tmpf = f8, f1, f0 // Flag d + nop.i 0 +} +;; + +//p6: result for 0 < x < = POS_ARG_ASYMP +//p7: result for - NEG_ARG_ASYMP <= x < 0 +//p8: exit for - NEG_ARG_ASYMP <= x <= UnfBound, x!=0 +.pred.rel "mutex",p6,p7 +{ .mfi + nop.m 0 +(p6) fma.s.s0 f8 = FR_Exp, FR_Pol, f0 + nop.i 0 +} +{ .mfb + mov GR_Parameter_TAG = 209 +(p7) fnma.s.s0 f8 = FR_Exp, FR_Pol, FR_2 +(p8) br.ret.sptk b0 +} +;; + +//p10: branch for UnfBound < x < = POS_ARG_ASYMP +{ .mfb + nop.m 0 + nop.f 0 +(p10) br.cond.spnt __libm_error_region +} +;; + +//Only via (p9) br.cond.spnt SPECIAL for x = 0,+inf,-inf,nan,unnorm +SPECIAL: + +{ .mfi + nop.m 0 + fclass.m.unc p10,p0 = f8,0x07 // p10: x = 0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fclass.m.unc p11,p0 = f8,0x21 // p11: x = +inf + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fclass.m.unc p12,p0 = f8,0x22 // p12 x = -inf + nop.i 0 +} +{ .mfb + nop.m 0 +(p10) fma.s.s0 f8 = f1, f1, f0 +(p10) br.ret.sptk b0 // Quick exit for x = 0 +} +;; + +{ .mfi + nop.m 0 + fclass.m.unc p13,p0 = f8,0xc3 // p13: x = nan + nop.i 0 +} +{ .mfb + nop.m 0 +(p11) fma.s.s0 f8 = f0, f1, f0 +(p11) br.ret.spnt b0 // Quick exit for x = +inf +} +;; +{ .mfi + nop.m 0 + fclass.m.unc p14,p0 = f8,0x0b // P14: x = unnormalized + nop.i 0 +} +{ .mfb + nop.m 0 +(p12) fma.s.s0 f8 = f1, f1, f1 +(p12) br.ret.spnt b0 // Quick exit for x = -inf +} +;; + +{ .mfb + nop.m 0 +(p13) fma.s.s0 f8 = f8, f1, f0 +(p13) br.ret.sptk b0 // Quick exit for x = nan +} +;; + +{ .mfb + nop.m 0 +(p14) fnma.s.s0 f8 = f8, f1, f1 +(p14) br.ret.sptk b0 // Quick exit for x = unnormalized +} +;; + +GLOBAL_LIBM_END(erfcf) + + +// Call via (p10) br.cond.spnt __libm_error_region +// for UnfBound < x < = POS_ARG_ASYMP +// and +// +// call via (p15) br.cond.spnt __libm_error_region +// for x > POS_ARG_ASYMP + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfs [GR_Parameter_Y] = FR_Y,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; +.body +{ .mib + stfs [GR_Parameter_X] = FR_X // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfs [GR_Parameter_Y] = FR_RESULT // STORE Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + nop.m 0 + nop.m 0 + add GR_Parameter_RESULT = 48,sp +};; +{ .mmi + ldfs f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) +.type __libm_error_support#,@function +.global __libm_error_support# + + + diff --git a/sysdeps/ia64/fpu/s_erfcl.S b/sysdeps/ia64/fpu/s_erfcl.S new file mode 100644 index 0000000000..31ffc2db12 --- /dev/null +++ b/sysdeps/ia64/fpu/s_erfcl.S @@ -0,0 +1,2066 @@ +.file "erfcl.s" + + +// Copyright (c) 2001 - 2005, Intel Corporation +// All rights reserved. +// +// Contributed 2001 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 11/12/01 Initial version +// 02/08/02 Added missing } +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align; +// used data8 for long double table values +// 03/31/05 Reformatted delimiters between data tables +// +// API +//============================================================== +// long double erfcl(long double) +// +// Implementation and Algorithm Notes: +//============================================================== +// 1. 0 <= x <= 107.0 +// +// erfcl(x) ~=~ P15(z) * expl( -x^2 )/(dx + x), z = x - xc(i). +// +// Comment: +// +// Let x(i) = -1.0 + 2^(i/4),i=0,...27. So we have 28 unequal +// argument intervals [x(i),x(i+1)] with length ratio q = 2^(1/4). +// Values xc(i) we have in the table erfc_xc_table,xc(i)=x(i)for i = 0 +// and xc(i)= 0.5*( x(i)+x(i+1) ) for i>0. +// +// Let x(i)<= x < x(i+1). +// We can find i as exponent of number (x + 1)^4. +// +// Let P15(z)= a0+ a1*z +..+a15*z^15 - polynomial approximation of degree 15 +// for function erfcl(z+xc(i)) * expl( (z+xc(i))^2)* (dx+z+xc(i)) and +// -0.5*[x(i+1)-x(i)] <= z <= 0.5*[x(i+1)-x(i)]. +// +// Let Q(z)= (P(z)- S)/S, S = a0, rounded to 16 bits. +// Polynomial coeffitients for Q(z) we have in the table erfc_Q_table as +// long double values +// +// We use multi precision to calculate input argument -x^2 for expl and +// for u = 1/(dx + x). +// +// Algorithm description for expl function see below. In accordance with +// denotation of this algorithm we have for expl: +// +// expl(X) ~=~ 2^K*T_1*(1+W_1)*T_2*(1+W_2)*(1+ poly(r)), X = -x^2. +// +// Final calculations for erfcl: +// +// erfcl(x) ~=~ +// +// 2^K*T_1*(1+W_1)*T_2*(1+W_2)*(1+ poly(r))*(1-dy)*S*(1+Q(z))*u*(1+du), +// +// where dy - low bits of x^2 and u, u*du - hi and low bits of 1/(dx + x). +// +// The order of calculations is the next: +// +// 1) M = 2^K*T_1*T_2*S without rounding error, +// 2) W = W_1 + (W_2 + W_1*W_2), where 1+W ~=~ (1+W_1)(1+W_2), +// 3) H = W - dy, where 1+H ~=~ (1+W )(1-dy), +// 4) R = poly(r)*H + poly(r), +// 5) R = H + R , where 1+R ~=~ (1+H )(1+poly(r)), +// 6) G = Q(z)*R + Q(z), +// 7) R1 = R + du, where 1+R1 ~=~ (1+R)(1+du), +// 8) G1 = R1 + G, where 1+G1 ~=~ (1+R1)(1+Q(z)), +// 9) V = G1*M*u, +// 10) erfcl(x) ~=~ M*u + V +// +// 2. -6.5 <= x < 0 +// +// erfcl(x) = 2.0 - erfl(-x) +// +// 3. x > 107.0 +// erfcl(x) ~=~ 0.0 +// +// 4. x < -6.5 +// erfcl(x) ~=~ 2.0 + +// Special values +//============================================================== +// erfcl(+0) = 1.0 +// erfcl(-0) = 1.0 + +// erfcl(+qnan) = +qnan +// erfcl(-qnan) = -qnan +// erfcl(+snan) = +qnan +// erfcl(-snan) = -qnan + +// erfcl(-inf) = 2.0 +// erfcl(+inf) = +0 + +//============================================================== +// Algorithm description of used expl function. +// +// Implementation and Algorithm Notes: +// +// ker_exp_64( in_FR : X, +// out_FR : Y_hi, +// out_FR : Y_lo, +// out_FR : scale, +// out_PR : Safe ) +// +// On input, X is in register format +// +// On output, +// +// scale*(Y_hi + Y_lo) approximates exp(X) +// +// The accuracy is sufficient for a highly accurate 64 sig. +// bit implementation. Safe is set if there is no danger of +// overflow/underflow when the result is composed from scale, +// Y_hi and Y_lo. Thus, we can have a fast return if Safe is set. +// Otherwise, one must prepare to handle the possible exception +// appropriately. Note that SAFE not set (false) does not mean +// that overflow/underflow will occur; only the setting of SAFE +// guarantees the opposite. +// +// **** High Level Overview **** +// +// The method consists of three cases. +// +// If |X| < Tiny use case exp_tiny; +// else if |X| < 2^(-6) use case exp_small; +// else use case exp_regular; +// +// Case exp_tiny: +// +// 1 + X can be used to approximate exp(X) +// X + X^2/2 can be used to approximate exp(X) - 1 +// +// Case exp_small: +// +// Here, exp(X) and exp(X) - 1 can all be +// approximated by a relatively simple polynomial. +// +// This polynomial resembles the truncated Taylor series +// +// exp(w) = 1 + w + w^2/2! + w^3/3! + ... + w^n/n! +// +// Case exp_regular: +// +// Here we use a table lookup method. The basic idea is that in +// order to compute exp(X), we accurately decompose X into +// +// X = N * log(2)/(2^12) + r, |r| <= log(2)/2^13. +// +// Hence +// +// exp(X) = 2^( N / 2^12 ) * exp(r). +// +// The value 2^( N / 2^12 ) is obtained by simple combinations +// of values calculated beforehand and stored in table; exp(r) +// is approximated by a short polynomial because |r| is small. +// +// We elaborate this method in 4 steps. +// +// Step 1: Reduction +// +// The value 2^12/log(2) is stored as a double-extended number +// L_Inv. +// +// N := round_to_nearest_integer( X * L_Inv ) +// +// The value log(2)/2^12 is stored as two numbers L_hi and L_lo so +// that r can be computed accurately via +// +// r := (X - N*L_hi) - N*L_lo +// +// We pick L_hi such that N*L_hi is representable in 64 sig. bits +// and thus the FMA X - N*L_hi is error free. So r is the +// 1 rounding error from an exact reduction with respect to +// +// L_hi + L_lo. +// +// In particular, L_hi has 30 significant bit and can be stored +// as a double-precision number; L_lo has 64 significant bits and +// stored as a double-extended number. +// +// Step 2: Approximation +// +// exp(r) - 1 is approximated by a short polynomial of the form +// +// r + A_1 r^2 + A_2 r^3 + A_3 r^4 . +// +// Step 3: Composition from Table Values +// +// The value 2^( N / 2^12 ) can be composed from a couple of tables +// of precalculated values. First, express N as three integers +// K, M_1, and M_2 as +// +// N = K * 2^12 + M_1 * 2^6 + M_2 +// +// Where 0 <= M_1, M_2 < 2^6; and K can be positive or negative. +// When N is represented in 2's complement, M_2 is simply the 6 +// lsb's, M_1 is the next 6, and K is simply N shifted right +// arithmetically (sign extended) by 12 bits. +// +// Now, 2^( N / 2^12 ) is simply +// +// 2^K * 2^( M_1 / 2^6 ) * 2^( M_2 / 2^12 ) +// +// Clearly, 2^K needs no tabulation. The other two values are less +// trivial because if we store each accurately to more than working +// precision, than its product is too expensive to calculate. We +// use the following method. +// +// Define two mathematical values, delta_1 and delta_2, implicitly +// such that +// +// T_1 = exp( [M_1 log(2)/2^6] - delta_1 ) +// T_2 = exp( [M_2 log(2)/2^12] - delta_2 ) +// +// are representable as 24 significant bits. To illustrate the idea, +// we show how we define delta_1: +// +// T_1 := round_to_24_bits( exp( M_1 log(2)/2^6 ) ) +// delta_1 = (M_1 log(2)/2^6) - log( T_1 ) +// +// The last equality means mathematical equality. We then tabulate +// +// W_1 := exp(delta_1) - 1 +// W_2 := exp(delta_2) - 1 +// +// Both in double precision. +// +// From the tabulated values T_1, T_2, W_1, W_2, we compose the values +// T and W via +// +// T := T_1 * T_2 ...exactly +// W := W_1 + (1 + W_1)*W_2 +// +// W approximates exp( delta ) - 1 where delta = delta_1 + delta_2. +// The mathematical product of T and (W+1) is an accurate representation +// of 2^(M_1/2^6) * 2^(M_2/2^12). +// +// Step 4. Reconstruction +// +// Finally, we can reconstruct exp(X), exp(X) - 1. +// Because +// +// X = K * log(2) + (M_1*log(2)/2^6 - delta_1) +// + (M_2*log(2)/2^12 - delta_2) +// + delta_1 + delta_2 + r ...accurately +// We have +// +// exp(X) ~=~ 2^K * ( T + T*[exp(delta_1+delta_2+r) - 1] ) +// ~=~ 2^K * ( T + T*[exp(delta + r) - 1] ) +// ~=~ 2^K * ( T + T*[(exp(delta)-1) +// + exp(delta)*(exp(r)-1)] ) +// ~=~ 2^K * ( T + T*( W + (1+W)*poly(r) ) ) +// ~=~ 2^K * ( Y_hi + Y_lo ) +// +// where Y_hi = T and Y_lo = T*(W + (1+W)*poly(r)) +// +// For exp(X)-1, we have +// +// exp(X)-1 ~=~ 2^K * ( Y_hi + Y_lo ) - 1 +// ~=~ 2^K * ( Y_hi + Y_lo - 2^(-K) ) +// +// and we combine Y_hi + Y_lo - 2^(-N) into the form of two +// numbers Y_hi + Y_lo carefully. +// +// **** Algorithm Details **** +// +// A careful algorithm must be used to realize the mathematical ideas +// accurately. We describe each of the three cases. We assume SAFE +// is preset to be TRUE. +// +// Case exp_tiny: +// +// The important points are to ensure an accurate result under +// different rounding directions and a correct setting of the SAFE +// flag. +// +// If expm1 is 1, then +// SAFE := False ...possibility of underflow +// Scale := 1.0 +// Y_hi := X +// Y_lo := 2^(-17000) +// Else +// Scale := 1.0 +// Y_hi := 1.0 +// Y_lo := X ...for different rounding modes +// Endif +// +// Case exp_small: +// +// Here we compute a simple polynomial. To exploit parallelism, we split +// the polynomial into several portions. +// +// Let r = X +// +// If exp ...i.e. exp( argument ) +// +// rsq := r * r; +// r4 := rsq*rsq +// poly_lo := P_3 + r*(P_4 + r*(P_5 + r*P_6)) +// poly_hi := r + rsq*(P_1 + r*P_2) +// Y_lo := poly_hi + r4 * poly_lo +// Y_hi := 1.0 +// Scale := 1.0 +// +// Else ...i.e. exp( argument ) - 1 +// +// rsq := r * r +// r4 := rsq * rsq +// r6 := rsq * r4 +// poly_lo := r6*(Q_5 + r*(Q_6 + r*Q_7)) +// poly_hi := Q_1 + r*(Q_2 + r*(Q_3 + r*Q_4)) +// Y_lo := rsq*poly_hi + poly_lo +// Y_hi := X +// Scale := 1.0 +// +// Endif +// +// Case exp_regular: +// +// The previous description contain enough information except the +// computation of poly and the final Y_hi and Y_lo in the case for +// exp(X)-1. +// +// The computation of poly for Step 2: +// +// rsq := r*r +// poly := r + rsq*(A_1 + r*(A_2 + r*A_3)) +// +// For the case exp(X) - 1, we need to incorporate 2^(-K) into +// Y_hi and Y_lo at the end of Step 4. +// +// If K > 10 then +// Y_lo := Y_lo - 2^(-K) +// Else +// If K < -10 then +// Y_lo := Y_hi + Y_lo +// Y_hi := -2^(-K) +// Else +// Y_hi := Y_hi - 2^(-K) +// End If +// End If +// + +// Overview of operation +//============================================================== + +// Registers used +//============================================================== +// Floating Point registers used: +// f8, input +// f9 -> f14, f36 -> f126 + +// General registers used: +// r32 -> r71 + +// Predicate registers used: +// p6 -> p15 + +// Assembly macros +//============================================================== +// GR for exp(X) +GR_ad_Arg = r33 +GR_ad_C = r34 +GR_ERFC_S_TB = r35 +GR_signexp_x = r36 +GR_exp_x = r36 +GR_exp_mask = r37 +GR_ad_W1 = r38 +GR_ad_W2 = r39 +GR_M2 = r40 +GR_M1 = r41 +GR_K = r42 +GR_exp_2_k = r43 +GR_ad_T1 = r44 +GR_ad_T2 = r45 +GR_N_fix = r46 +GR_ad_P = r47 +GR_exp_bias = r48 +GR_BIAS = r48 +GR_exp_half = r49 +GR_sig_inv_ln2 = r50 +GR_rshf_2to51 = r51 +GR_exp_2tom51 = r52 +GR_rshf = r53 + +// GR for erfcl(x) +//============================================================== + +GR_ERFC_XC_TB = r54 +GR_ERFC_P_TB = r55 +GR_IndxPlusBias = r56 +GR_P_POINT_1 = r57 +GR_P_POINT_2 = r58 +GR_AbsArg = r59 +GR_ShftXBi = r60 +GR_ShftPi = r61 +GR_mBIAS = r62 +GR_ShftPi_bias = r63 +GR_ShftXBi_bias = r64 +GR_ShftA14 = r65 +GR_ShftA15 = r66 +GR_EpsNorm = r67 +GR_0x1 = r68 +GR_ShftPi_8 = r69 +GR_26PlusBias = r70 +GR_27PlusBias = r71 + +// GR for __libm_support call +//============================================================== +GR_SAVE_B0 = r64 +GR_SAVE_PFS = r65 +GR_SAVE_GP = r66 +GR_SAVE_SP = r67 + +GR_Parameter_X = r68 +GR_Parameter_Y = r69 +GR_Parameter_RESULT = r70 +GR_Parameter_TAG = r71 + +//============================================================== +// Floating Point Registers +// +FR_RSHF_2TO51 = f10 +FR_INV_LN2_2TO63 = f11 +FR_W_2TO51_RSH = f12 +FR_2TOM51 = f13 +FR_RSHF = f14 + +FR_scale = f36 +FR_float_N = f37 +FR_N_signif = f38 +FR_L_hi = f39 +FR_L_lo = f40 +FR_r = f41 +FR_W1 = f42 +FR_T1 = f43 +FR_W2 = f44 +FR_T2 = f45 +FR_rsq = f46 +FR_C2 = f47 +FR_C3 = f48 +FR_poly = f49 +FR_P6 = f49 +FR_T = f50 +FR_P5 = f50 +FR_P4 = f51 +FR_W = f51 +FR_P3 = f52 +FR_Wp1 = f52 +FR_P2 = f53 +FR_P1 = f54 +FR_Q7 = f56 +FR_Q6 = f57 +FR_Q5 = f58 +FR_Q4 = f59 +FR_Q3 = f60 +FR_Q2 = f61 +FR_Q1 = f62 +FR_C1 = f63 +FR_A15 = f64 +FR_ch_dx = f65 +FR_T_scale = f66 +FR_norm_x = f67 +FR_AbsArg = f68 +FR_POS_ARG_ASYMP = f69 +FR_NEG_ARG_ASYMP = f70 +FR_Tmp = f71 +FR_Xc = f72 +FR_A0 = f73 +FR_A1 = f74 +FR_A2 = f75 +FR_A3 = f76 +FR_A4 = f77 +FR_A5 = f78 +FR_A6 = f79 +FR_A7 = f80 +FR_A8 = f81 +FR_A9 = f82 +FR_A10 = f83 +FR_A11 = f84 +FR_A12 = f85 +FR_A13 = f86 +FR_A14 = f87 +FR_P15_0_1 = f88 +FR_P15_8_1 = f88 +FR_P15_1_1 = f89 +FR_P15_8_2 = f89 +FR_P15_1_2 = f90 +FR_P15_2_1 = f91 +FR_P15_2_2 = f92 +FR_P15_3_1 = f93 +FR_P15_3_2 = f94 +FR_P15_4_2 = f95 +FR_P15_7_1 = f96 +FR_P15_7_2 = f97 +FR_P15_9_1 = f98 +FR_P15_9_2 = f99 +FR_P15_13_1 = f100 +FR_P15_14_1 = f101 +FR_P15_14_2 = f102 +FR_Tmp2 = f103 +FR_Xpdx_lo = f104 +FR_2 = f105 +FR_xsq_lo = f106 +FR_LocArg = f107 +FR_Tmpf = f108 +FR_Tmp1 = f109 +FR_EpsNorm = f110 +FR_UnfBound = f111 +FR_NormX = f112 +FR_Xpdx_hi = f113 +FR_dU = f114 +FR_H = f115 +FR_G = f116 +FR_V = f117 +FR_M = f118 +FR_U = f119 +FR_Q = f120 +FR_S = f121 +FR_R = f122 +FR_res_pos_x_hi = f123 +FR_res_pos_x_lo = f124 +FR_dx = f125 +FR_dx1 = f126 + +// for error handler routine +FR_X = f9 +FR_Y = f0 +FR_RESULT = f8 + +// Data tables +//============================================================== +RODATA +.align 16 + +// ************* DO NOT CHANGE ORDER OF THESE TABLES ******************** +LOCAL_OBJECT_START(exp_table_1) + +data8 0xae89f995ad3ad5ea , 0x00003ffe // x = 0.681..,bound for dx = 0.875 +data8 0x405AC00000000000 , 0x401A000000000000 //ARG_ASYMP,NEG_ARG_ASYMP +data8 0x3FE4000000000000 , 0x3FEC000000000000 //0.625,0.875 +data8 0xD5126065B720A4e9 , 0x00004005 // underflow boundary +data8 0x8000000000000000 , 0x00000001 //FR_EpsNorm +LOCAL_OBJECT_END(exp_table_1) + +LOCAL_OBJECT_START(Constants_exp_64_Arg) +data8 0xB17217F400000000,0x00003FF2 //L_hi = hi part log(2)/2^12 +data8 0xF473DE6AF278ECE6,0x00003FD4 //L_lo = lo part log(2)/2^12 +LOCAL_OBJECT_END(Constants_exp_64_Arg) + +LOCAL_OBJECT_START(Constants_exp_64_C) +data8 0xAAAAAAABB1B736A0,0x00003FFA // C3 +data8 0xAAAAAAAB90CD6327,0x00003FFC // C2 +data8 0xFFFFFFFFFFFFFFFF,0x00003FFD // C1 +LOCAL_OBJECT_END(Constants_exp_64_C) + +LOCAL_OBJECT_START(Constants_exp_64_T1) +data4 0x3F800000,0x3F8164D2,0x3F82CD87,0x3F843A29 +data4 0x3F85AAC3,0x3F871F62,0x3F88980F,0x3F8A14D5 +data4 0x3F8B95C2,0x3F8D1ADF,0x3F8EA43A,0x3F9031DC +data4 0x3F91C3D3,0x3F935A2B,0x3F94F4F0,0x3F96942D +data4 0x3F9837F0,0x3F99E046,0x3F9B8D3A,0x3F9D3EDA +data4 0x3F9EF532,0x3FA0B051,0x3FA27043,0x3FA43516 +data4 0x3FA5FED7,0x3FA7CD94,0x3FA9A15B,0x3FAB7A3A +data4 0x3FAD583F,0x3FAF3B79,0x3FB123F6,0x3FB311C4 +data4 0x3FB504F3,0x3FB6FD92,0x3FB8FBAF,0x3FBAFF5B +data4 0x3FBD08A4,0x3FBF179A,0x3FC12C4D,0x3FC346CD +data4 0x3FC5672A,0x3FC78D75,0x3FC9B9BE,0x3FCBEC15 +data4 0x3FCE248C,0x3FD06334,0x3FD2A81E,0x3FD4F35B +data4 0x3FD744FD,0x3FD99D16,0x3FDBFBB8,0x3FDE60F5 +data4 0x3FE0CCDF,0x3FE33F89,0x3FE5B907,0x3FE8396A +data4 0x3FEAC0C7,0x3FED4F30,0x3FEFE4BA,0x3FF28177 +data4 0x3FF5257D,0x3FF7D0DF,0x3FFA83B3,0x3FFD3E0C +LOCAL_OBJECT_END(Constants_exp_64_T1) + +LOCAL_OBJECT_START(Constants_exp_64_T2) +data4 0x3F800000,0x3F80058C,0x3F800B18,0x3F8010A4 +data4 0x3F801630,0x3F801BBD,0x3F80214A,0x3F8026D7 +data4 0x3F802C64,0x3F8031F2,0x3F803780,0x3F803D0E +data4 0x3F80429C,0x3F80482B,0x3F804DB9,0x3F805349 +data4 0x3F8058D8,0x3F805E67,0x3F8063F7,0x3F806987 +data4 0x3F806F17,0x3F8074A8,0x3F807A39,0x3F807FCA +data4 0x3F80855B,0x3F808AEC,0x3F80907E,0x3F809610 +data4 0x3F809BA2,0x3F80A135,0x3F80A6C7,0x3F80AC5A +data4 0x3F80B1ED,0x3F80B781,0x3F80BD14,0x3F80C2A8 +data4 0x3F80C83C,0x3F80CDD1,0x3F80D365,0x3F80D8FA +data4 0x3F80DE8F,0x3F80E425,0x3F80E9BA,0x3F80EF50 +data4 0x3F80F4E6,0x3F80FA7C,0x3F810013,0x3F8105AA +data4 0x3F810B41,0x3F8110D8,0x3F81166F,0x3F811C07 +data4 0x3F81219F,0x3F812737,0x3F812CD0,0x3F813269 +data4 0x3F813802,0x3F813D9B,0x3F814334,0x3F8148CE +data4 0x3F814E68,0x3F815402,0x3F81599C,0x3F815F37 +LOCAL_OBJECT_END(Constants_exp_64_T2) + +LOCAL_OBJECT_START(Constants_exp_64_W1) +data8 0x0000000000000000, 0xBE384454171EC4B4 +data8 0xBE6947414AA72766, 0xBE5D32B6D42518F8 +data8 0x3E68D96D3A319149, 0xBE68F4DA62415F36 +data8 0xBE6DDA2FC9C86A3B, 0x3E6B2E50F49228FE +data8 0xBE49C0C21188B886, 0x3E64BFC21A4C2F1F +data8 0xBE6A2FBB2CB98B54, 0x3E5DC5DE9A55D329 +data8 0x3E69649039A7AACE, 0x3E54728B5C66DBA5 +data8 0xBE62B0DBBA1C7D7D, 0x3E576E0409F1AF5F +data8 0x3E6125001A0DD6A1, 0xBE66A419795FBDEF +data8 0xBE5CDE8CE1BD41FC, 0xBE621376EA54964F +data8 0x3E6370BE476E76EE, 0x3E390D1A3427EB92 +data8 0x3E1336DE2BF82BF8, 0xBE5FF1CBD0F7BD9E +data8 0xBE60A3550CEB09DD, 0xBE5CA37E0980F30D +data8 0xBE5C541B4C082D25, 0xBE5BBECA3B467D29 +data8 0xBE400D8AB9D946C5, 0xBE5E2A0807ED374A +data8 0xBE66CB28365C8B0A, 0x3E3AAD5BD3403BCA +data8 0x3E526055C7EA21E0, 0xBE442C75E72880D6 +data8 0x3E58B2BB85222A43, 0xBE5AAB79522C42BF +data8 0xBE605CB4469DC2BC, 0xBE589FA7A48C40DC +data8 0xBE51C2141AA42614, 0xBE48D087C37293F4 +data8 0x3E367A1CA2D673E0, 0xBE51BEBB114F7A38 +data8 0xBE6348E5661A4B48, 0xBDF526431D3B9962 +data8 0x3E3A3B5E35A78A53, 0xBE46C46C1CECD788 +data8 0xBE60B7EC7857D689, 0xBE594D3DD14F1AD7 +data8 0xBE4F9C304C9A8F60, 0xBE52187302DFF9D2 +data8 0xBE5E4C8855E6D68F, 0xBE62140F667F3DC4 +data8 0xBE36961B3BF88747, 0x3E602861C96EC6AA +data8 0xBE3B5151D57FD718, 0x3E561CD0FC4A627B +data8 0xBE3A5217CA913FEA, 0x3E40A3CC9A5D193A +data8 0xBE5AB71310A9C312, 0x3E4FDADBC5F57719 +data8 0x3E361428DBDF59D5, 0x3E5DB5DB61B4180D +data8 0xBE42AD5F7408D856, 0x3E2A314831B2B707 +LOCAL_OBJECT_END(Constants_exp_64_W1) + +LOCAL_OBJECT_START(Constants_exp_64_W2) +data8 0x0000000000000000, 0xBE641F2537A3D7A2 +data8 0xBE68DD57AD028C40, 0xBE5C77D8F212B1B6 +data8 0x3E57878F1BA5B070, 0xBE55A36A2ECAE6FE +data8 0xBE620608569DFA3B, 0xBE53B50EA6D300A3 +data8 0x3E5B5EF2223F8F2C, 0xBE56A0D9D6DE0DF4 +data8 0xBE64EEF3EAE28F51, 0xBE5E5AE2367EA80B +data8 0x3E47CB1A5FCBC02D, 0xBE656BA09BDAFEB7 +data8 0x3E6E70C6805AFEE7, 0xBE6E0509A3415EBA +data8 0xBE56856B49BFF529, 0x3E66DD3300508651 +data8 0x3E51165FC114BC13, 0x3E53333DC453290F +data8 0x3E6A072B05539FDA, 0xBE47CD877C0A7696 +data8 0xBE668BF4EB05C6D9, 0xBE67C3E36AE86C93 +data8 0xBE533904D0B3E84B, 0x3E63E8D9556B53CE +data8 0x3E212C8963A98DC8, 0xBE33138F032A7A22 +data8 0x3E530FA9BC584008, 0xBE6ADF82CCB93C97 +data8 0x3E5F91138370EA39, 0x3E5443A4FB6A05D8 +data8 0x3E63DACD181FEE7A, 0xBE62B29DF0F67DEC +data8 0x3E65C4833DDE6307, 0x3E5BF030D40A24C1 +data8 0x3E658B8F14E437BE, 0xBE631C29ED98B6C7 +data8 0x3E6335D204CF7C71, 0x3E529EEDE954A79D +data8 0x3E5D9257F64A2FB8, 0xBE6BED1B854ED06C +data8 0x3E5096F6D71405CB, 0xBE3D4893ACB9FDF5 +data8 0xBDFEB15801B68349, 0x3E628D35C6A463B9 +data8 0xBE559725ADE45917, 0xBE68C29C042FC476 +data8 0xBE67593B01E511FA, 0xBE4A4313398801ED +data8 0x3E699571DA7C3300, 0x3E5349BE08062A9E +data8 0x3E5229C4755BB28E, 0x3E67E42677A1F80D +data8 0xBE52B33F6B69C352, 0xBE6B3550084DA57F +data8 0xBE6DB03FD1D09A20, 0xBE60CBC42161B2C1 +data8 0x3E56ED9C78A2B771, 0xBE508E319D0FA795 +data8 0xBE59482AFD1A54E9, 0xBE2A17CEB07FD23E +data8 0x3E68BF5C17365712, 0x3E3956F9B3785569 +LOCAL_OBJECT_END(Constants_exp_64_W2) + + +LOCAL_OBJECT_START(erfc_xc_table) + +data8 0x0000000000000000, 0x00000000 //XC[0] = +0.00000000000000000000e-01L +data8 0x9A79C70000000000, 0x00003FFD //XC[1] = +3.01710337400436401367e-01L +data8 0x8C49EF0000000000, 0x00003FFE //XC[2] = +5.48003137111663818359e-01L +data8 0xD744FC0000000000, 0x00003FFE //XC[3] = +8.40896368026733398438e-01L +data8 0x9837F00000000000, 0x00003FFF //XC[4] = +1.18920707702636718750e+00L +data8 0xCD3CE30000000000, 0x00003FFF //XC[5] = +1.60342061519622802734e+00L +data8 0x8624F70000000000, 0x00004000 //XC[6] = +2.09600615501403808594e+00L +data8 0xABA27E0000000000, 0x00004000 //XC[7] = +2.68179273605346679688e+00L +data8 0xD837F00000000000, 0x00004000 //XC[8] = +3.37841415405273437500e+00L +data8 0x869E710000000000, 0x00004001 //XC[9] = +4.20684099197387695313e+00L +data8 0xA624F70000000000, 0x00004001 //XC[10] = +5.19201231002807617188e+00L +data8 0xCBA27E0000000000, 0x00004001 //XC[11] = +6.36358547210693359375e+00L +data8 0xF837F00000000000, 0x00004001 //XC[12] = +7.75682830810546875000e+00L +data8 0x969E710000000000, 0x00004002 //XC[13] = +9.41368198394775390625e+00L +data8 0xB624F70000000000, 0x00004002 //XC[14] = +1.13840246200561523438e+01L +data8 0xDBA27E0000000000, 0x00004002 //XC[15] = +1.37271709442138671875e+01L +data8 0x841BF80000000000, 0x00004003 //XC[16] = +1.65136566162109375000e+01L +data8 0x9E9E710000000000, 0x00004003 //XC[17] = +1.98273639678955078125e+01L +data8 0xBE24F70000000000, 0x00004003 //XC[18] = +2.37680492401123046875e+01L +data8 0xE3A27E0000000000, 0x00004003 //XC[19] = +2.84543418884277343750e+01L +data8 0x881BF80000000000, 0x00004004 //XC[20] = +3.40273132324218750000e+01L +data8 0xA29E710000000000, 0x00004004 //XC[21] = +4.06547279357910156250e+01L +data8 0xC224F70000000000, 0x00004004 //XC[22] = +4.85360984802246093750e+01L +data8 0xE7A27E0000000000, 0x00004004 //XC[23] = +5.79086837768554687500e+01L +data8 0x8A1BF80000000000, 0x00004005 //XC[24] = +6.90546264648437500000e+01L +data8 0xA49E710000000000, 0x00004005 //XC[25] = +8.23094558715820312500e+01L +data8 0xC424F70000000000, 0x00004005 //XC[26] = +9.80721969604492187500e+01L +data8 0xD5A27E0000000000, 0x00004005 //XC[27] = +1.06817367553710937500e+02L +LOCAL_OBJECT_END(erfc_xc_table) + +LOCAL_OBJECT_START(erfc_s_table) + +data8 0xE000000000000000, 0x00003FFE //s[0] = +8.75000000000000000000e-01L +data8 0xDCEF000000000000, 0x00003FFE //s[1] = +8.63021850585937500000e-01L +data8 0xD79D000000000000, 0x00003FFE //s[2] = +8.42239379882812500000e-01L +data8 0xB25E000000000000, 0x00003FFE //s[3] = +6.96746826171875000000e-01L +data8 0xB0EA000000000000, 0x00003FFE //s[4] = +6.91070556640625000000e-01L +data8 0xAE3F000000000000, 0x00003FFE //s[5] = +6.80648803710937500000e-01L +data8 0xAB05000000000000, 0x00003FFE //s[6] = +6.68045043945312500000e-01L +data8 0xA7AC000000000000, 0x00003FFE //s[7] = +6.54968261718750000000e-01L +data8 0xA478000000000000, 0x00003FFE //s[8] = +6.42456054687500000000e-01L +data8 0xA18D000000000000, 0x00003FFE //s[9] = +6.31057739257812500000e-01L +data8 0x9EF8000000000000, 0x00003FFE //s[10] = +6.20971679687500000000e-01L +data8 0x9CBA000000000000, 0x00003FFE //s[11] = +6.12213134765625000000e-01L +data8 0x9ACD000000000000, 0x00003FFE //s[12] = +6.04690551757812500000e-01L +data8 0x992A000000000000, 0x00003FFE //s[13] = +5.98297119140625000000e-01L +data8 0x97C7000000000000, 0x00003FFE //s[14] = +5.92880249023437500000e-01L +data8 0x969C000000000000, 0x00003FFE //s[15] = +5.88317871093750000000e-01L +data8 0x95A0000000000000, 0x00003FFE //s[16] = +5.84472656250000000000e-01L +data8 0x94CB000000000000, 0x00003FFE //s[17] = +5.81222534179687500000e-01L +data8 0x9419000000000000, 0x00003FFE //s[18] = +5.78506469726562500000e-01L +data8 0x9383000000000000, 0x00003FFE //s[19] = +5.76217651367187500000e-01L +data8 0x9305000000000000, 0x00003FFE //s[20] = +5.74295043945312500000e-01L +data8 0x929B000000000000, 0x00003FFE //s[21] = +5.72677612304687500000e-01L +data8 0x9242000000000000, 0x00003FFE //s[22] = +5.71319580078125000000e-01L +data8 0x91F8000000000000, 0x00003FFE //s[23] = +5.70190429687500000000e-01L +data8 0x91B9000000000000, 0x00003FFE //s[24] = +5.69229125976562500000e-01L +data8 0x9184000000000000, 0x00003FFE //s[25] = +5.68420410156250000000e-01L +data8 0x9158000000000000, 0x00003FFE //s[26] = +5.67749023437500000000e-01L +data8 0x9145000000000000, 0x00003FFE //s[27] = +5.67459106445312500000e-01L +LOCAL_OBJECT_END(erfc_s_table) + +LOCAL_OBJECT_START(erfc_Q_table) +// Q(z)= (P(z)- S)/S +// +// Pol0 +data8 0x98325D50F9DC3499, 0x0000BFAA //A0 = +3.07358861423101280650e-26L +data8 0xED35081A2494DDD9, 0x00003FF8 //A1 = +1.44779757616302832466e-02L +data8 0x9443549BCD0F94CE, 0x0000BFFD //A2 = -2.89576190966300084405e-01L +data8 0xC7FD4B98ECF3DBBF, 0x00003FFD //A3 = +3.90604364793467799170e-01L +data8 0xB82CE31288B49759, 0x0000BFFD //A4 = -3.59717460644199233866e-01L +data8 0x8A8293447BEF69B5, 0x00003FFD //A5 = +2.70527460203054582368e-01L +data8 0xB5793E30EE36766C, 0x0000BFFC //A6 = -1.77220317589265674647e-01L +data8 0xD6066D16BBDECE17, 0x00003FFB //A7 = +1.04504444366724593714e-01L +data8 0xE7C783CE3C997BD8, 0x0000BFFA //A8 = -5.65867565781331646771e-02L +data8 0xE9969EBC2F5B2828, 0x00003FF9 //A9 = +2.85142040533900194955e-02L +data8 0xDD31D619F29AD7BF, 0x0000BFF8 //A10 = -1.35006514390540367929e-02L +data8 0xC63A20EB59768F3A, 0x00003FF7 //A11 = +6.04940993680332271481e-03L +data8 0xA8DEC641AACEB600, 0x0000BFF6 //A12 = -2.57675495383156581601e-03L +data8 0x87F0E77BA914FBEB, 0x00003FF5 //A13 = +1.03714776726541296794e-03L +data8 0xC306C2894C5CEF2D, 0x0000BFF3 //A14 = -3.71983348634136412407e-04L +data8 0xBDAB416A989D0697, 0x00003FF1 //A15 = +9.04412111877987292294e-05L +// Pol1 +data8 0x82808893DA2DD83F, 0x00003FEE //A0 = +7.77853035974467145290e-06L +data8 0xAE9CD9DCADC86113, 0x0000BFFB //A1 = -8.52601070853077921197e-02L +data8 0x9D429743E312AD9F, 0x0000BFFB //A2 = -7.67871682732076080494e-02L +data8 0x8637FC533AE805DC, 0x00003FFC //A3 = +1.31072943286859831330e-01L +data8 0xF68DBE3639ABCB6E, 0x0000BFFB //A4 = -1.20387540845703264588e-01L +data8 0xB168FFC3CFA71256, 0x00003FFB //A5 = +8.66260511047190247534e-02L +data8 0xDBC5078A7EA89236, 0x0000BFFA //A6 = -5.36546988077281230848e-02L +data8 0xF4331FEDB2CB838F, 0x00003FF9 //A7 = +2.98095344165515989564e-02L +data8 0xF909173C0E61C25D, 0x0000BFF8 //A8 = -1.51999213123642373375e-02L +data8 0xEC83560A2ACB23E9, 0x00003FF7 //A9 = +7.21780491979582106904e-03L +data8 0xD350D62C4FEAD8F5, 0x0000BFF6 //A10 = -3.22442272982896360044e-03L +data8 0xB2F44F4B3FD9B826, 0x00003FF5 //A11 = +1.36531322425499451283e-03L +data8 0x9078BC61927671C6, 0x0000BFF4 //A12 = -5.51115510818844954547e-04L +data8 0xDF67AC6287A63B03, 0x00003FF2 //A13 = +2.13055585989529858265e-04L +data8 0xA719CFEE67FCE1CE, 0x0000BFF1 //A14 = -7.96798844477905965933e-05L +data8 0xEF926367BABBB029, 0x00003FEF //A15 = +2.85591875675765038065e-05L +// Pol2 +data8 0x82B5E5A93B059C50, 0x00003FEF //A0 = +1.55819100856330860049e-05L +data8 0xDC856BC2542B1938, 0x0000BFFB //A1 = -1.07676355235999875911e-01L +data8 0xDF225EF5694F14AE, 0x0000BFF8 //A2 = -1.36190345125628043277e-02L +data8 0xDAF66A954ED22428, 0x00003FFA //A3 = +5.34576571853233908886e-02L +data8 0xD28AE4F21A392EC6, 0x0000BFFA //A4 = -5.14019911949062230820e-02L +data8 0x9441A95713F0DB5B, 0x00003FFA //A5 = +3.61954321717769771045e-02L +data8 0xB0957B5C483C7A04, 0x0000BFF9 //A6 = -2.15556535133667988704e-02L +data8 0xBB9260E812814F71, 0x00003FF8 //A7 = +1.14484735825400480057e-02L +data8 0xB68AB17287ABAB04, 0x0000BFF7 //A8 = -5.57073273108465072470e-03L +data8 0xA56A95E0BC0EF01B, 0x00003FF6 //A9 = +2.52405318381952650677e-03L +data8 0x8D19C7D286839C00, 0x0000BFF5 //A10 = -1.07651294935087466892e-03L +data8 0xE45DB3766711A0D3, 0x00003FF3 //A11 = +4.35573615323234291196e-04L +data8 0xB05949F947FA7AEF, 0x0000BFF2 //A12 = -1.68179306983868501372e-04L +data8 0x82901D055A0D5CB6, 0x00003FF1 //A13 = +6.22572626227726684168e-05L +data8 0xBB957698542D6FD0, 0x0000BFEF //A14 = -2.23617364009159182821e-05L +data8 0x810740E1DF572394, 0x00003FEE //A15 = +7.69068800065192940487e-06L +// Pol3 +data8 0x9526D1C87655AFA8, 0x00003FEC //A0 = +2.22253260814242012255e-06L +data8 0xA47E21EBFE73F72F, 0x0000BFF8 //A1 = -1.00398379581527733314e-02L +data8 0xDE65685FCDF7A913, 0x0000BFFA //A2 = -5.42959286802879105148e-02L +data8 0xED289CB8F97D4860, 0x00003FFA //A3 = +5.79000589346770417248e-02L +data8 0xAA3100D5A7D870F1, 0x0000BFFA //A4 = -4.15506394006027604387e-02L +data8 0xCA0567032C5308C0, 0x00003FF9 //A5 = +2.46607791863290331169e-02L +data8 0xD3E1794A50F31BEB, 0x0000BFF8 //A6 = -1.29321751094401754013e-02L +data8 0xCAA02CB4C87CC1F0, 0x00003FF7 //A7 = +6.18364508551740736863e-03L +data8 0xB3F126AF16B121F2, 0x0000BFF6 //A8 = -2.74569696838501870748e-03L +data8 0x962B2D64D3900510, 0x00003FF5 //A9 = +1.14569596409019883022e-03L +data8 0xED8785714A9A00FB, 0x0000BFF3 //A10 = -4.53051338046340380512e-04L +data8 0xB325DA4515D8B54C, 0x00003FF2 //A11 = +1.70848714622328427290e-04L +data8 0x8179C36354571747, 0x0000BFF1 //A12 = -6.17387951061077132522e-05L +data8 0xB40F241C01C907E9, 0x00003FEF //A13 = +2.14647227210702861416e-05L +data8 0xF436D84AD7D4D316, 0x0000BFED //A14 = -7.27815144835213913238e-06L +data8 0x9EB432503FB0B7BC, 0x00003FEC //A15 = +2.36487228755136968792e-06L +// Pol4 +data8 0xE0BA539E4AFC4741, 0x00003FED //A0 = +6.69741148991838024429e-06L +data8 0x8583BF71139452CF, 0x0000BFFA //A1 = -3.25963476363756051657e-02L +data8 0x8384FEF6D08AD6CE, 0x0000BFF9 //A2 = -1.60546283500634200479e-02L +data8 0xB1E67DFB84C97036, 0x00003FF9 //A3 = +2.17163525195697635702e-02L +data8 0xFB6ACEE6899E360D, 0x0000BFF8 //A4 = -1.53452892792759316229e-02L +data8 0x8D2B869EB9149905, 0x00003FF8 //A5 = +8.61633440480716870830e-03L +data8 0x8A90BFE0FD869A41, 0x0000BFF7 //A6 = -4.22868126950622376530e-03L +data8 0xF7536A76E59F54D2, 0x00003FF5 //A7 = +1.88694643606912107006e-03L +data8 0xCCF6FE58C16E1CC7, 0x0000BFF4 //A8 = -7.81878732767742447339e-04L +data8 0x9FCC6ED9914FAA24, 0x00003FF3 //A9 = +3.04791577214885118730e-04L +data8 0xEC7F5AAACAE593E8, 0x0000BFF1 //A10 = -1.12770784960291779798e-04L +data8 0xA72CE628A114C940, 0x00003FF0 //A11 = +3.98577182157456408782e-05L +data8 0xE2DCC5750FD769BA, 0x0000BFEE //A12 = -1.35220520471857266339e-05L +data8 0x9459160B1E6F1F8D, 0x00003FED //A13 = +4.42111470121432700283e-06L +data8 0xBE0A05701BD0DD42, 0x0000BFEB //A14 = -1.41590196994052764542e-06L +data8 0xE905D729105081BF, 0x00003FE9 //A15 = +4.34038814785401120999e-07L +// Pol5 +data8 0xA33649C3AB459832, 0x00003FEE //A0 = +9.72819704141525206634e-06L +data8 0x9E4EA2F44C9A24BD, 0x0000BFFA //A1 = -3.86492123987296806210e-02L +data8 0xE80C0B1280F357BF, 0x0000BFF2 //A2 = -2.21297306012713370124e-04L +data8 0xDAECCE90A4D45D9A, 0x00003FF7 //A3 = +6.68106161291482829670e-03L +data8 0xA4006572071BDD4B, 0x0000BFF7 //A4 = -5.00493005170532147076e-03L +data8 0xB07FD7EB1F4D8E8E, 0x00003FF6 //A5 = +2.69316693731732554959e-03L +data8 0xA1F471D42ADD73A1, 0x0000BFF5 //A6 = -1.23561753760779610478e-03L +data8 0x8611D0ED1B4C8176, 0x00003FF4 //A7 = +5.11434914439322741260e-04L +data8 0xCDADB789B487A541, 0x0000BFF2 //A8 = -1.96150380913036018825e-04L +data8 0x9470252731687FEE, 0x00003FF1 //A9 = +7.07807859951401721129e-05L +data8 0xCB9399AD1C376D85, 0x0000BFEF //A10 = -2.42682175234436724152e-05L +data8 0x858D815F9CA0A9F7, 0x00003FEE //A11 = +7.96036454038012144300e-06L +data8 0xA878D338E6E6A079, 0x0000BFEC //A12 = -2.51042802626063073967e-06L +data8 0xCD2C2F079D2FCB36, 0x00003FEA //A13 = +7.64327468786076941271e-07L +data8 0xF5EF4A4B2EA426F2, 0x0000BFE8 //A14 = -2.29044563492386125272e-07L +data8 0x8CE52181393820FC, 0x00003FE7 //A15 = +6.56093668622712763489e-08L +// Pol6 +data8 0xB2015D7F1864B7CF, 0x00003FEC //A0 = +2.65248615880090351276e-06L +data8 0x954EA7A861B4462A, 0x0000BFFA //A1 = -3.64519642954351295215e-02L +data8 0x9E46F2A4D9157E69, 0x00003FF7 //A2 = +4.83023498390681965101e-03L +data8 0xA0D12B422FFD5BAD, 0x00003FF5 //A3 = +1.22693684633643883352e-03L +data8 0xB291D16A560A740E, 0x0000BFF5 //A4 = -1.36237794246703606647e-03L +data8 0xC138941BC8AF4A9D, 0x00003FF4 //A5 = +7.37079658343628747256e-04L +data8 0xA761669D61B405CF, 0x0000BFF3 //A6 = -3.19252914480518163396e-04L +data8 0x8053680F1C84607E, 0x00003FF2 //A7 = +1.22381025852939439541e-04L +data8 0xB518F4B6F25015F9, 0x0000BFF0 //A8 = -4.31770048258291369742e-05L +data8 0xEFF526AC70B9411E, 0x00003FEE //A9 = +1.43025887824433324525e-05L +data8 0x970B2A848DF5B5C2, 0x0000BFED //A10 = -4.50145058393497252604e-06L +data8 0xB614D2E61DB86963, 0x00003FEB //A11 = +1.35661172167726780059e-06L +data8 0xD34EA4D283EC33FA, 0x0000BFE9 //A12 = -3.93590335713880681528e-07L +data8 0xED209EBD68E1145F, 0x00003FE7 //A13 = +1.10421060667544991323e-07L +data8 0x83A126E22A17568D, 0x0000BFE6 //A14 = -3.06473811074239684132e-08L +data8 0x8B778496EDE9F415, 0x00003FE4 //A15 = +8.11804009754249175736e-09L +// Pol7 +data8 0x8E152F522501B7B9, 0x00003FEE //A0 = +8.46879203970927626532e-06L +data8 0xFD22F92EE21F491E, 0x0000BFF9 //A1 = -3.09004656656418947425e-02L +data8 0xAF0C41847D89EC14, 0x00003FF7 //A2 = +5.34203719233189217519e-03L +data8 0xB7C539C400445956, 0x0000BFF3 //A3 = -3.50514245383356287965e-04L +data8 0x8428C78B2B1E3622, 0x0000BFF3 //A4 = -2.52073850239006530978e-04L +data8 0xAFC0CCC7D1A05F5B, 0x00003FF2 //A5 = +1.67611241057491801028e-04L +data8 0x95DC7272C5695A5A, 0x0000BFF1 //A6 = -7.14593512262564106636e-05L +data8 0xD6FCA68A61F0E835, 0x00003FEF //A7 = +2.56284375437771117850e-05L +data8 0x8B71C74DEA936C66, 0x0000BFEE //A8 = -8.31153675277218441096e-06L +data8 0xA8AC71E2A56AA2C9, 0x00003FEC //A9 = +2.51343269277107451413e-06L +data8 0xC15DED6C44B46046, 0x0000BFEA //A10 = -7.20347851650066610771e-07L +data8 0xD42BA1DFBD1277AC, 0x00003FE8 //A11 = +1.97599119274780745741e-07L +data8 0xE03A81F2C976D11A, 0x0000BFE6 //A12 = -5.22072765405802337371e-08L +data8 0xE56A19A67DD66100, 0x00003FE4 //A13 = +1.33536787408751203998e-08L +data8 0xE964D255CB31DFFA, 0x0000BFE2 //A14 = -3.39632729387679010008e-09L +data8 0xE22E62E932B704D4, 0x00003FE0 //A15 = +8.22842400379225526299e-10L +// Pol8 +data8 0xB8B835882D46A6C8, 0x00003FEF //A0 = +2.20202883282415435401e-05L +data8 0xC9D1F63F89B74E90, 0x0000BFF9 //A1 = -2.46362504515706189782e-02L +data8 0x8E376748B1274F30, 0x00003FF7 //A2 = +4.34010070001387441657e-03L +data8 0x98174C7EA49B5B37, 0x0000BFF4 //A3 = -5.80181163659971286762e-04L +data8 0x8D2C40506AE9FF97, 0x00003FEF //A4 = +1.68291159100251734927e-05L +data8 0xD9A580C115B9D150, 0x00003FEF //A5 = +2.59454841475194555896e-05L +data8 0xDB35B21F1C3F99CE, 0x0000BFEE //A6 = -1.30659192305072674545e-05L +data8 0x99FAADAE17A3050E, 0x00003FED //A7 = +4.58893813631592314881e-06L +data8 0xBA1D259BCD6987A9, 0x0000BFEB //A8 = -1.38665627771423394637e-06L +data8 0xCDD7FF5BEA0145C2, 0x00003FE9 //A9 = +3.83413844219813384124e-07L +data8 0xD60857176CE6AB9D, 0x0000BFE7 //A10 = -9.96666862214499946343e-08L +data8 0xD446A2402112DF4C, 0x00003FE5 //A11 = +2.47121687566658908126e-08L +data8 0xCA87133235F1F495, 0x0000BFE3 //A12 = -5.89433000014933371980e-09L +data8 0xBB15B0021581C8B6, 0x00003FE1 //A13 = +1.36122047057936849125e-09L +data8 0xAC9D6585D4AF505E, 0x0000BFDF //A14 = -3.13984547328132268695e-10L +data8 0x975A1439C3795183, 0x00003FDD //A15 = +6.88268624429648826457e-11L +// Pol9 +data8 0x99A7676284CDC9FE, 0x00003FEF //A0 = +1.83169747921764176475e-05L +data8 0x9AD0AE249A02896C, 0x0000BFF9 //A1 = -1.88983346204739151909e-02L +data8 0xCB89B4AEC19898BE, 0x00003FF6 //A2 = +3.10574208447745576452e-03L +data8 0xEBBC47E30E1AC2C2, 0x0000BFF3 //A3 = -4.49629730048297442064e-04L +data8 0xD1E35B7FCE1CF859, 0x00003FF0 //A4 = +5.00412261289558493438e-05L +data8 0xB40743664EF24552, 0x0000BFEB //A5 = -1.34131589671166307319e-06L +data8 0xCAD2F5C596FFE1B4, 0x0000BFEB //A6 = -1.51115702599728593837e-06L +data8 0xAE42B6D069DFDDF2, 0x00003FEA //A7 = +6.49171330116787223873e-07L +data8 0xD0739A05BB43A714, 0x0000BFE8 //A8 = -1.94135651872623440782e-07L +data8 0xD745B854AB601BD7, 0x00003FE6 //A9 = +5.01219983943456578062e-08L +data8 0xCC4066E13E338B13, 0x0000BFE4 //A10 = -1.18890061172430768892e-08L +data8 0xB6EAADB55A6C3CB4, 0x00003FE2 //A11 = +2.66178850259168707794e-09L +data8 0x9CC6C178AD3F96AD, 0x0000BFE0 //A12 = -5.70349182959704086428e-10L +data8 0x81D0E2AA27DEB74A, 0x00003FDE //A13 = +1.18066926578104076645e-10L +data8 0xD75FB9049190BEFD, 0x0000BFDB //A14 = -2.44851795398843967972e-11L +data8 0xA9384A51D48C8703, 0x00003FD9 //A15 = +4.80951837368635202609e-12L +// Pol10 +data8 0xD2B3482EE449C535, 0x00003FEE //A0 = +1.25587177382575655080e-05L +data8 0xE7939B2D0607DFCF, 0x0000BFF8 //A1 = -1.41343131436717436429e-02L +data8 0x8810EB4AC5F0F1CE, 0x00003FF6 //A2 = +2.07620377002350121270e-03L +data8 0x9546589602AEB955, 0x0000BFF3 //A3 = -2.84719065122144294949e-04L +data8 0x9333434342229798, 0x00003FF0 //A4 = +3.50952732796136549298e-05L +data8 0xEB36A98FD81D3DEB, 0x0000BFEC //A5 = -3.50495464815398722482e-06L +data8 0xAC370EFA025D0477, 0x00003FE8 //A6 = +1.60387784498518639254e-07L +data8 0xC8DF7F8ACA099426, 0x00003FE6 //A7 = +4.67693991699936842330e-08L +data8 0xAC694AD4921C02CF, 0x0000BFE5 //A8 = -2.00713167514877937714e-08L +data8 0xB6E29F2FDE2D8C1A, 0x00003FE3 //A9 = +5.32266106167252495164e-09L +data8 0xA41F8EEA75474358, 0x0000BFE1 //A10 = -1.19415398856537468324e-09L +data8 0x869D778A1C56D3D6, 0x00003FDF //A11 = +2.44863450057778470469e-10L +data8 0xD02658BF31411F4C, 0x0000BFDC //A12 = -4.73277831746128372261e-11L +data8 0x9A4A95EE59127779, 0x00003FDA //A13 = +8.77044784978207256260e-12L +data8 0xE518330AF013C2F6, 0x0000BFD7 //A14 = -1.62781453276882333209e-12L +data8 0xA036A9DF71BD108A, 0x00003FD5 //A15 = +2.84596398987114375607e-13L +// Pol11 +data8 0x9191CFBF001F3BB3, 0x00003FEE //A0 = +8.67662287973472452343e-06L +data8 0xAA47E0CF01AE9730, 0x0000BFF8 //A1 = -1.03931136509584404513e-02L +data8 0xAEABE7F17B01D18F, 0x00003FF5 //A2 = +1.33263784731775399430e-03L +data8 0xAC0D6A309D04E5DB, 0x0000BFF2 //A3 = -1.64081956462118568288e-04L +data8 0xA08357DF458054D0, 0x00003FEF //A4 = +1.91346477952797715021e-05L +data8 0x8A1596B557440FE0, 0x0000BFEC //A5 = -2.05761687274453412571e-06L +data8 0xCDA0EAE0A5615E9A, 0x00003FE8 //A6 = +1.91506542215670149741e-07L +data8 0xD36A08FB4E104F9A, 0x0000BFE4 //A7 = -1.23059260396551086769e-08L +data8 0xD7433F91E78A7A11, 0x0000BFDF //A8 = -3.91560549815575091188e-10L +data8 0xC2F5308FD4F5CE62, 0x00003FDF //A9 = +3.54626121852421163117e-10L +data8 0xC83876915F49D630, 0x0000BFDD //A10 = -9.10497688901018285126e-11L +data8 0xA11C605DEAE1FE9C, 0x00003FDB //A11 = +1.83161825409194847892e-11L +data8 0xE7977BC1342D19BF, 0x0000BFD8 //A12 = -3.29111645807102123274e-12L +data8 0x9BC3A7D6396C6756, 0x00003FD6 //A13 = +5.53385887288503961220e-13L +data8 0xD0110D5683740B8C, 0x0000BFD3 //A14 = -9.24001363293241428519e-14L +data8 0x81786D7856A5CC92, 0x00003FD1 //A15 = +1.43741041714595023996e-14L +// Pol12 +data8 0xB85654F6033B3372, 0x00003FEF //A0 = +2.19747106911869287049e-05L +data8 0xF78B40078736B406, 0x0000BFF7 //A1 = -7.55444170413862312647e-03L +data8 0xDA8FDE84D88E5D5D, 0x00003FF4 //A2 = +8.33747822263358628569e-04L +data8 0xBC2D3F3891721AA9, 0x0000BFF1 //A3 = -8.97296647669960333635e-05L +data8 0x9D15ACFD3BF50064, 0x00003FEE //A4 = +9.36297600601039610762e-06L +data8 0xFBED3D03F3C1B671, 0x0000BFEA //A5 = -9.38500137149172923985e-07L +data8 0xBEE615E3B2FA16C8, 0x00003FE7 //A6 = +8.88941676851808958175e-08L +data8 0x843D32692CF5662A, 0x0000BFE4 //A7 = -7.69732580860195238520e-09L +data8 0x99E74472FD94E22B, 0x00003FE0 //A8 = +5.59897264617128952416e-10L +data8 0xCEF63DABF4C32E15, 0x0000BFDB //A9 = -2.35288414996279313219e-11L +data8 0xA2D86C25C0991123, 0x0000BFD8 //A10 = -2.31417232327307408235e-12L +data8 0xF50C1B31D2E922BD, 0x00003FD6 //A11 = +8.70582858983364191159e-13L +data8 0xC0F093DEC2B019A1, 0x0000BFD4 //A12 = -1.71364927865227509533e-13L +data8 0xFC1441C4CD105981, 0x00003FD1 //A13 = +2.79864052545369490865e-14L +data8 0x9CC959853267F026, 0x0000BFCF //A14 = -4.35170017302700609509e-15L +data8 0xB06BA14016154F1E, 0x00003FCC //A15 = +6.12081320471295704631e-16L +// Pol13 +data8 0xA59E74BF544F2422, 0x00003FEF //A0 = +1.97433196215210145261e-05L +data8 0xB2814F4EDAE15330, 0x0000BFF7 //A1 = -5.44754383528015875700e-03L +data8 0x867C249D378F0A23, 0x00003FF4 //A2 = +5.13019308804593120161e-04L +data8 0xC76644393388AB68, 0x0000BFF0 //A3 = -4.75405403392600215101e-05L +data8 0x91143AD5CCA229FE, 0x00003FED //A4 = +4.32369180778264703719e-06L +data8 0xCE6A11FB6840A974, 0x0000BFE9 //A5 = -3.84476663329551178495e-07L +data8 0x8EC29F66C59DE243, 0x00003FE6 //A6 = +3.32389596787155456596e-08L +data8 0xBE3FCDDCA94CA24E, 0x0000BFE2 //A7 = -2.76849073931513325199e-09L +data8 0xF06A84BDC70A0B0D, 0x00003FDE //A8 = +2.18657158231304988330e-10L +data8 0x8B8E6969D056D124, 0x0000BFDB //A9 = -1.58657139740906811035e-11L +data8 0x8984985AA29A0567, 0x00003FD7 //A10 = +9.77123802231106533829e-13L +data8 0xA53ABA084300137C, 0x0000BFD2 //A11 = -3.66882970952892030306e-14L +data8 0xA90EC851E91C3319, 0x0000BFCE //A12 = -2.34614750044359490986e-15L +data8 0xEC9CAF64237B5060, 0x00003FCC //A13 = +8.20912960028437475035e-16L +data8 0xA9156668FCF01479, 0x0000BFCA //A14 = -1.46656639874123613261e-16L +data8 0xBAEF58D8118DD5D4, 0x00003FC7 //A15 = +2.02675278255254907493e-17L +// Pol14 +data8 0xC698952E9CEAA800, 0x00003FEF //A0 = +2.36744912073515619263e-05L +data8 0x800395F8C7B4FA00, 0x0000BFF7 //A1 = -3.90667746392883642897e-03L +data8 0xA3B2467B6B391831, 0x00003FF3 //A2 = +3.12226081793919541155e-04L +data8 0xCF2061122A69D72B, 0x0000BFEF //A3 = -2.46914006692526122176e-05L +data8 0x817FAB6B5DEB9924, 0x00003FEC //A4 = +1.92968114320180123521e-06L +data8 0x9FC190F5827740E7, 0x0000BFE8 //A5 = -1.48784479265231093475e-07L +data8 0xC1FE5C1835C8AFCD, 0x00003FE4 //A6 = +1.12919132662720380018e-08L +data8 0xE7216A9FBB204DA3, 0x0000BFE0 //A7 = -8.40847981461949000003e-10L +data8 0x867566ED95C5C64F, 0x00003FDD //A8 = +6.11446929759298780795e-11L +data8 0x97A8BFA723F0F014, 0x0000BFD9 //A9 = -4.31041298699752869577e-12L +data8 0xA3D24B7034984522, 0x00003FD5 //A10 = +2.91005377301348717042e-13L +data8 0xA5AAA371C22F3741, 0x0000BFD1 //A11 = -1.83926825395757259128e-14L +data8 0x95352E5597EACC23, 0x00003FCD //A12 = +1.03533666540077850452e-15L +data8 0xCCEBE3043B689428, 0x0000BFC8 //A13 = -4.44352525147076912166e-17L +data8 0xA779DAB4BE1F80BB, 0x0000BFBC //A14 = -8.86610526981738255206e-21L +data8 0xB171271F3517282C, 0x00003FC1 //A15 = +3.00598445879282370850e-19L +// Pol15 +data8 0xB7AC727D1C3FEB05, 0x00003FEE //A0 = +1.09478009914822049780e-05L +data8 0xB6E6274485C10B0A, 0x0000BFF6 //A1 = -2.79081782038927199588e-03L +data8 0xC5CAE2122D009506, 0x00003FF2 //A2 = +1.88629638738336219173e-04L +data8 0xD466E7957D0A3362, 0x0000BFEE //A3 = -1.26601440424012313479e-05L +data8 0xE2593D798DA20E2E, 0x00003FEA //A4 = +8.43214222346512003230e-07L +data8 0xEF2D2BBA7D2882CC, 0x0000BFE6 //A5 = -5.56876064495961858535e-08L +data8 0xFA5819BB4AE974C2, 0x00003FE2 //A6 = +3.64298674151704370449e-09L +data8 0x819BB0CE825FBB28, 0x0000BFDF //A7 = -2.35755881668932259913e-10L +data8 0x84871099BF728B8F, 0x00003FDB //A8 = +1.50666434199945890414e-11L +data8 0x858188962DFEBC9F, 0x0000BFD7 //A9 = -9.48617116568458677088e-13L +data8 0x840F38FF2FBAE753, 0x00003FD3 //A10 = +5.86461827778372616657e-14L +data8 0xFF47EAF69577B213, 0x0000BFCE //A11 = -3.54273456410181081472e-15L +data8 0xEF402CCB4D29FAF8, 0x00003FCA //A12 = +2.07516888659313950588e-16L +data8 0xD6B789E01141231B, 0x0000BFC6 //A13 = -1.16398290506765191078e-17L +data8 0xB5EEE343E9CFE3EC, 0x00003FC2 //A14 = +6.16413506924643419723e-19L +data8 0x859B41A39D600346, 0x0000BFBE //A15 = -2.82922705825870414438e-20L +// Pol16 +data8 0x85708B69FD184E11, 0x00003FED //A0 = +3.97681079176353356199e-06L +data8 0x824D92BC60A1F70A, 0x0000BFF6 //A1 = -1.98826630037499070532e-03L +data8 0xEDCF7D3576BB5258, 0x00003FF1 //A2 = +1.13396885054265675352e-04L +data8 0xD7FC59226A947CDF, 0x0000BFED //A3 = -6.43687650810478871875e-06L +data8 0xC32C51B574E2651E, 0x00003FE9 //A4 = +3.63538268539251809118e-07L +data8 0xAF67910F5681401F, 0x0000BFE5 //A5 = -2.04197779750247395258e-08L +data8 0x9CB3E8D7DCD1EA9D, 0x00003FE1 //A6 = +1.14016272459029850306e-09L +data8 0x8B14ECFBF7D4F114, 0x0000BFDD //A7 = -6.32470533185766848692e-11L +data8 0xF518253AE4A3AE72, 0x00003FD8 //A8 = +3.48299974583453268369e-12L +data8 0xD631A5699AA2F334, 0x0000BFD4 //A9 = -1.90242426474085078079e-13L +data8 0xB971AD4C30C56E5D, 0x00003FD0 //A10 = +1.02942127356740047925e-14L +data8 0x9ED0065A601F3160, 0x0000BFCC //A11 = -5.50991880383698965959e-16L +data8 0x863A04008E12867C, 0x00003FC8 //A12 = +2.91057593756148904838e-17L +data8 0xDF62F9F44F5C7170, 0x0000BFC3 //A13 = -1.51372666097522872780e-18L +data8 0xBA4E118E88CFDD31, 0x00003FBF //A14 = +7.89032177282079635722e-20L +data8 0x942AD897FC4D2F2A, 0x0000BFBB //A15 = -3.92195756076319409245e-21L +// Pol17 +data8 0xCB8514540566C717, 0x00003FEF //A0 = +2.42614557068144130848e-05L +data8 0xB94F08D6816E0CD4, 0x0000BFF5 //A1 = -1.41379340061829929314e-03L +data8 0x8E7C342C2DABB51B, 0x00003FF1 //A2 = +6.79422240687700109911e-05L +data8 0xDA69DAFF71E30D5B, 0x0000BFEC //A3 = -3.25461473899657142468e-06L +data8 0xA6D5B2DB69B4B3F6, 0x00003FE8 //A4 = +1.55376978584082701045e-07L +data8 0xFDF4F76BC1D1BD47, 0x0000BFE3 //A5 = -7.39111857092131684572e-09L +data8 0xC08BC52C95B12C2D, 0x00003FDF //A6 = +3.50239092565793882444e-10L +data8 0x91624BF6D3A3F6C9, 0x0000BFDB //A7 = -1.65282439890232458821e-11L +data8 0xDA91F7A450DE4270, 0x00003FD6 //A8 = +7.76517285902715940501e-13L +data8 0xA380ADF55416E624, 0x0000BFD2 //A9 = -3.63048822989374426852e-14L +data8 0xF350FC0CEDEE0FD6, 0x00003FCD //A10 = +1.68834630987974622269e-15L +data8 0xB3FA19FBDC8F023C, 0x0000BFC9 //A11 = -7.80525639701804380489e-17L +data8 0x8435328C80940126, 0x00003FC5 //A12 = +3.58349966898667910204e-18L +data8 0xC0D22F655BA5EF39, 0x0000BFC0 //A13 = -1.63325770165403860181e-19L +data8 0x8F14B9EBD5A9AB25, 0x00003FBC //A14 = +7.57464305512080733773e-21L +data8 0xCD4804BBF6DC1B6F, 0x0000BFB7 //A15 = -3.39609459750208886298e-22L +// Pol18 +data8 0xE251DFE45AB0C22E, 0x00003FEE //A0 = +1.34897126299700418200e-05L +data8 0x83943CC7D59D4215, 0x0000BFF5 //A1 = -1.00386850310061655307e-03L +data8 0xAA57896951134BCA, 0x00003FF0 //A2 = +4.06126834109940757047e-05L +data8 0xDC0A67051E1C4A2C, 0x0000BFEB //A3 = -1.63943048164477430317e-06L +data8 0x8DCB3C0A8CD07BBE, 0x00003FE7 //A4 = +6.60279229777753829876e-08L +data8 0xB64DE81C24F7F265, 0x0000BFE2 //A5 = -2.65287705357477481067e-09L +data8 0xE9CBB7A990DBA8B5, 0x00003FDD //A6 = +1.06318007608620426224e-10L +data8 0x9583D4B85C2ADC6F, 0x0000BFD9 //A7 = -4.24947087941505088222e-12L +data8 0xBEB0EE8114EEDF77, 0x00003FD4 //A8 = +1.69367754741562774916e-13L +data8 0xF2791BB8F06BDA93, 0x0000BFCF //A9 = -6.72997988617021128704e-15L +data8 0x99A907F6A92195B4, 0x00003FCB //A10 = +2.66558091161711891239e-16L +data8 0xC213E5E6F833BB93, 0x0000BFC6 //A11 = -1.05209746502719578617e-17L +data8 0xF41FBBA6B343960F, 0x00003FC1 //A12 = +4.13562069721140021224e-19L +data8 0x98F194AEE31D188D, 0x0000BFBD //A13 = -1.61935414722333263347e-20L +data8 0xC42F5029BB622157, 0x00003FB8 //A14 = +6.49121108201931196678e-22L +data8 0xF43BD08079E50E0F, 0x0000BFB3 //A15 = -2.52531675510242468317e-23L +// Pol19 +data8 0x82557B149A04D08E, 0x00003FEF //A0 = +1.55370127331027842820e-05L +data8 0xBAAB433307CE614B, 0x0000BFF4 //A1 = -7.12085701486669872724e-04L +data8 0xCB52D9DBAC16FE82, 0x00003FEF //A2 = +2.42380662859334411743e-05L +data8 0xDD214359DBBCE7D1, 0x0000BFEA //A3 = -8.23773197624244883859e-07L +data8 0xF01E8E968139524C, 0x00003FE5 //A4 = +2.79535729459988509676e-08L +data8 0x82286A057E0916CE, 0x0000BFE1 //A5 = -9.47023128967039348510e-10L +data8 0x8CDDDC4E8D013365, 0x00003FDC //A6 = +3.20293663356974901319e-11L +data8 0x982FEEE90D4E8751, 0x0000BFD7 //A7 = -1.08135537312234452657e-12L +data8 0xA41D1E84083B8FD6, 0x00003FD2 //A8 = +3.64405720894915411836e-14L +data8 0xB0A1B6111B72E159, 0x0000BFCD //A9 = -1.22562851790685744085e-15L +data8 0xBDB77DE6B650FFA2, 0x00003FC8 //A10 = +4.11382657214908334175e-17L +data8 0xCB54E95CDB66978A, 0x0000BFC3 //A11 = -1.37782909696752432371e-18L +data8 0xD959E428A62B1B6C, 0x00003FBE //A12 = +4.60258936838597812582e-20L +data8 0xE7D49EC23F1A16A0, 0x0000BFB9 //A13 = -1.53412587409583783059e-21L +data8 0xFDE429BC9947B2BE, 0x00003FB4 //A14 = +5.25034823750902928092e-23L +data8 0x872137A062C042EF, 0x0000BFB0 //A15 = -1.74651114923000080365e-24L +// Pol20 +data8 0x8B9B185C6A2659AC, 0x00003FEF //A0 = +1.66423130594825442963e-05L +data8 0x84503AD52588A1E8, 0x0000BFF4 //A1 = -5.04735556466270303549e-04L +data8 0xF26C7C2B566388E1, 0x00003FEE //A2 = +1.44495826764677427386e-05L +data8 0xDDDA15FEE262BB47, 0x0000BFE9 //A3 = -4.13231361893675488873e-07L +data8 0xCACEBC73C90C2FE0, 0x00003FE4 //A4 = +1.18049538609157282958e-08L +data8 0xB9314D00022B41DD, 0x0000BFDF //A5 = -3.36863342776746896664e-10L +data8 0xA8E9FBDC714638B9, 0x00003FDA //A6 = +9.60164921624768038366e-12L +data8 0x99E246C0CC8CA6F6, 0x0000BFD5 //A7 = -2.73352704217713596798e-13L +data8 0x8C04E7B5DF372EA1, 0x00003FD0 //A8 = +7.77262480048865685174e-15L +data8 0xFE7B90CAA0B6D5F7, 0x0000BFCA //A9 = -2.20728537958846147109e-16L +data8 0xE6F40BAD4EC6CB4F, 0x00003FC5 //A10 = +6.26000182616999972048e-18L +data8 0xD14F4E0538F0F992, 0x0000BFC0 //A11 = -1.77292283439752259258e-19L +data8 0xBD5A7FAA548CC749, 0x00003FBB //A12 = +5.01214569023722089225e-21L +data8 0xAB15D69425373A67, 0x0000BFB6 //A13 = -1.41518447770061562822e-22L +data8 0x9EF95456F75B4DF4, 0x00003FB1 //A14 = +4.10938011540250142351e-24L +data8 0x8FADCC45E81433E7, 0x0000BFAC //A15 = -1.16062889679749879834e-25L +// Pol21 +data8 0xB47A917B0F7B50AE, 0x00003FEF //A0 = +2.15147474240529518138e-05L +data8 0xBB77DC3BA0C937B3, 0x0000BFF3 //A1 = -3.57567223048598672970e-04L +data8 0x90694DFF4EBF7370, 0x00003FEE //A2 = +8.60758700336677694536e-06L +data8 0xDE5379AA90A98F3F, 0x0000BFE8 //A3 = -2.07057292787309736495e-07L +data8 0xAB0322293F1F9CA0, 0x00003FE3 //A4 = +4.97711123919916694625e-09L +data8 0x837119E59D3B7AC2, 0x0000BFDE //A5 = -1.19545621970063369582e-10L +data8 0xC9E5B74A38ECF3FC, 0x00003FD8 //A6 = +2.86913359605586285967e-12L +data8 0x9AEF5110C6885352, 0x0000BFD3 //A7 = -6.88048865490621757799e-14L +data8 0xED988D52189CE6A3, 0x00003FCD //A8 = +1.64865278639132278935e-15L +data8 0xB6063CECD8012B6D, 0x0000BFC8 //A9 = -3.94702428606368525374e-17L +data8 0x8B541EB15E79CEEC, 0x00003FC3 //A10 = +9.44127272399408815784e-19L +data8 0xD51A136D8C75BC25, 0x0000BFBD //A11 = -2.25630369561137931232e-20L +data8 0xA2C1C5E19CC79E6F, 0x00003FB8 //A12 = +5.38517493921589837361e-22L +data8 0xF86F9772306F56C1, 0x0000BFB2 //A13 = -1.28438352359240135735e-23L +data8 0xC32F6FEEDE86528E, 0x00003FAD //A14 = +3.15338862172962186458e-25L +data8 0x9534ED189744D7D4, 0x0000BFA8 //A15 = -7.53301543611470014315e-27L +// Pol22 +data8 0xCBA0A2DB94A2C494, 0x00003FEF //A0 = +2.42742878212752702946e-05L +data8 0x84C089154A49E0E8, 0x0000BFF3 //A1 = -2.53204520651046300034e-04L +data8 0xABF5665BD0D8B0CD, 0x00003FED //A2 = +5.12476542947092361490e-06L +data8 0xDEA1C518E3EEE872, 0x0000BFE7 //A3 = -1.03671063536324831083e-07L +data8 0x900B77F271559AE8, 0x00003FE2 //A4 = +2.09612770408581408652e-09L +data8 0xBA4C74A262BE3E4E, 0x0000BFDC //A5 = -4.23594098489216166935e-11L +data8 0xF0D1680FCC1EAF97, 0x00003FD6 //A6 = +8.55557381760467917779e-13L +data8 0x9B8F8E033BB83A24, 0x0000BFD1 //A7 = -1.72707138247091685914e-14L +data8 0xC8DCA6A691DB8335, 0x00003FCB //A8 = +3.48439884388851942939e-16L +data8 0x819A6CB9CEA5E9BD, 0x0000BFC6 //A9 = -7.02580471688245511753e-18L +data8 0xA726B4F622585BEA, 0x00003FC0 //A10 = +1.41582572516648501043e-19L +data8 0xD7727648A4095986, 0x0000BFBA //A11 = -2.85141885626054217632e-21L +data8 0x8AB627E09CF45997, 0x00003FB5 //A12 = +5.73697507862703019314e-23L +data8 0xB28C15C117CC604F, 0x0000BFAF //A13 = -1.15383428132352407085e-24L +data8 0xECB8428626DA072C, 0x00003FA9 //A14 = +2.39025879246942839796e-26L +data8 0x98B731BCFA2CE2B2, 0x0000BFA4 //A15 = -4.81885474332093262902e-28L +// Pol23 +data8 0xC6D013811314D31B, 0x00003FED //A0 = +5.92508308918577687876e-06L +data8 0xBBF3057B8DBACBCF, 0x0000BFF2 //A1 = -1.79242422493281965934e-04L +data8 0xCCADECA501162313, 0x00003FEC //A2 = +3.04996061562356504918e-06L +data8 0xDED1FDBE8CCAF3DB, 0x0000BFE6 //A3 = -5.18793887648024117154e-08L +data8 0xF27B74EDDCA65859, 0x00003FE0 //A4 = +8.82145297317787820675e-10L +data8 0x83E4415687F01A0C, 0x0000BFDB //A5 = -1.49943414247603665601e-11L +data8 0x8F6CB350861CE446, 0x00003FD5 //A6 = +2.54773288906376920377e-13L +data8 0x9BE8456A30CBFC02, 0x0000BFCF //A7 = -4.32729710913845745148e-15L +data8 0xA9694F7E1033977D, 0x00003FC9 //A8 = +7.34704698157502347441e-17L +data8 0xB8035A3D5AF82D85, 0x0000BFC3 //A9 = -1.24692123826025468001e-18L +data8 0xC7CB4B3ACB905FDA, 0x00003FBD //A10 = +2.11540249352095943317e-20L +data8 0xD8D70AEB2E58D729, 0x0000BFB7 //A11 = -3.58731705184186608576e-22L +data8 0xEB27A61B1D5C7697, 0x00003FB1 //A12 = +6.07861113430709162243e-24L +data8 0xFEF9ED74D4F4C9B0, 0x0000BFAB //A13 = -1.02984099170876754831e-25L +data8 0x8E6F410068C12043, 0x00003FA6 //A14 = +1.79777721804459361762e-27L +data8 0x9AE2F6705481630E, 0x0000BFA0 //A15 = -3.05459905177379058768e-29L +// Pol24 +data8 0xD2D858D5B01C9434, 0x00003FEE //A0 = +1.25673476165670766128e-05L +data8 0x8505330F8B4FDE49, 0x0000BFF2 //A1 = -1.26858053564784963985e-04L +data8 0xF39171C8B1D418C2, 0x00003FEB //A2 = +1.81472407620770441249e-06L +data8 0xDEF065C3D7BFD26E, 0x0000BFE5 //A3 = -2.59535215807652675043e-08L +data8 0xCC0199EA6ACA630C, 0x00003FDF //A4 = +3.71085215769339916703e-10L +data8 0xBAA25319F01ED248, 0x0000BFD9 //A5 = -5.30445960650683029105e-12L +data8 0xAAB28A84F8CFE4D1, 0x00003FD3 //A6 = +7.58048850973457592162e-14L +data8 0x9C14B931AEB311A8, 0x0000BFCD //A7 = -1.08302915828084288776e-15L +data8 0x8EADA745715A0714, 0x00003FC7 //A8 = +1.54692159263197000533e-17L +data8 0x82643F3F722CE6B5, 0x0000BFC1 //A9 = -2.20891945694400066611e-19L +data8 0xEE42ECDE465A99E4, 0x00003FBA //A10 = +3.15336372779307614198e-21L +data8 0xD99FC74326ACBFC0, 0x0000BFB4 //A11 = -4.50036161691276556269e-23L +data8 0xC6A4DCACC554911E, 0x00003FAE //A12 = +6.41853356148678957077e-25L +data8 0xB550CEA09DA96F44, 0x0000BFA8 //A13 = -9.15410112414783078242e-27L +data8 0xAA9149317996F32F, 0x00003FA2 //A14 = +1.34554050666508391264e-28L +data8 0x9C3008EFE3F52F19, 0x0000BF9C //A15 = -1.92516125328592532359e-30L +// Pol25 +data8 0xA68E78218806283F, 0x00003FEF //A0 = +1.98550844852103406280e-05L +data8 0xBC41423996DC8A37, 0x0000BFF1 //A1 = -8.97669395268764751516e-05L +data8 0x90E55AE31A2F8271, 0x00003FEB //A2 = +1.07955871580069359702e-06L +data8 0xDF022272DA4A3BEF, 0x0000BFE4 //A3 = -1.29807937275957214439e-08L +data8 0xAB95DCBFFB0BAAB8, 0x00003FDE //A4 = +1.56056011861921437794e-10L +data8 0x83FF2547BA9011FF, 0x0000BFD8 //A5 = -1.87578539510813332135e-12L +data8 0xCB0C353560EEDC45, 0x00003FD1 //A6 = +2.25428217090412574481e-14L +data8 0x9C24CEB86E76D2C5, 0x0000BFCB //A7 = -2.70866279585559299821e-16L +data8 0xF01AFA23DDFDAE0E, 0x00003FC4 //A8 = +3.25403467375734083376e-18L +data8 0xB892BDFBCF1D9740, 0x0000BFBE //A9 = -3.90848978133441513662e-20L +data8 0x8DDBBF34415AAECA, 0x00003FB8 //A10 = +4.69370027479731756829e-22L +data8 0xDA04170D07458C3B, 0x0000BFB1 //A11 = -5.63558091177482043435e-24L +data8 0xA76F391095A9563A, 0x00003FAB //A12 = +6.76262416498584003290e-26L +data8 0x8098FA125C18D8DB, 0x0000BFA5 //A13 = -8.11564737276592661642e-28L +data8 0xCB9E4D5C08923227, 0x00003F9E //A14 = +1.00391606269366059664e-29L +data8 0x9CEC3BF7A0BE2CAF, 0x0000BF98 //A15 = -1.20888920108938909316e-31L +// Pol26 +data8 0xC17AB25E269272F7, 0x00003FEE //A0 = +1.15322640047234590651e-05L +data8 0x85310509E633FEF2, 0x0000BFF1 //A1 = -6.35106483144690768696e-05L +data8 0xAC5E4C4DCB2D940C, 0x00003FEA //A2 = +6.42122148740412561597e-07L +data8 0xDF0AAD0571FFDD48, 0x0000BFE3 //A3 = -6.49136789710824396482e-09L +data8 0x9049D8440AFD180F, 0x00003FDD //A4 = +6.56147932223174570008e-11L +data8 0xBAA936477C5FA9D7, 0x0000BFD6 //A5 = -6.63153032879993841863e-13L +data8 0xF17261294EAB1443, 0x00003FCF //A6 = +6.70149477756803680009e-15L +data8 0x9C22F87C31DB007A, 0x0000BFC9 //A7 = -6.77134581402030645534e-17L +data8 0xC9E98E633942AC12, 0x00003FC2 //A8 = +6.84105580182052870823e-19L +data8 0x828998181309642C, 0x0000BFBC //A9 = -6.91059649300859944955e-21L +data8 0xA8C3D4DCE1ECBAB6, 0x00003FB5 //A10 = +6.97995542988331257517e-23L +data8 0xDA288D52CC4C351A, 0x0000BFAE //A11 = -7.04907829139578377009e-25L +data8 0x8CEEACB790B5F374, 0x00003FA8 //A12 = +7.11526399101774993883e-27L +data8 0xB61C8A29D98F24C0, 0x0000BFA1 //A13 = -7.18303147470398859453e-29L +data8 0xF296F69FE45BDA7D, 0x00003F9A //A14 = +7.47537230021540031251e-31L +data8 0x9D4B25BF6FB7234B, 0x0000BF94 //A15 = -7.57340869663212138051e-33L +// Pol27 +data8 0xC7772CC326D6FBB8, 0x00003FEE //A0 = +1.18890718679826004395e-05L +data8 0xE0F9D5410565D55D, 0x0000BFF0 //A1 = -5.36384368533203585378e-05L +data8 0x85C0BE825680E148, 0x00003FEA //A2 = +4.98268406609692971520e-07L +data8 0x9F058A389D7BA177, 0x0000BFE3 //A3 = -4.62813885933188677790e-09L +data8 0xBD0B751F0A6BAC7A, 0x00003FDC //A4 = +4.29838009673609430305e-11L +data8 0xE0B6823570502E9D, 0x0000BFD5 //A5 = -3.99170340031272728535e-13L +data8 0x858A9C52FC426D86, 0x00003FCF //A6 = +3.70651975271664045723e-15L +data8 0x9EB4438BFDF1928D, 0x0000BFC8 //A7 = -3.44134780748056488222e-17L +data8 0xBC968DCD8C06D74E, 0x00003FC1 //A8 = +3.19480670422195579127e-19L +data8 0xE0133A405F782125, 0x0000BFBA //A9 = -2.96560935615546392028e-21L +data8 0x851AFEBB70D07E79, 0x00003FB4 //A10 = +2.75255617931932536111e-23L +data8 0x9E1E21A841BF8738, 0x0000BFAD //A11 = -2.55452923487640676799e-25L +data8 0xBBCF2EF1C6E72327, 0x00003FA6 //A12 = +2.37048675755308004410e-27L +data8 0xDF0D320CF12B8BCB, 0x0000BF9F //A13 = -2.19945804585962185550e-29L +data8 0x8470A76DE5FCADD8, 0x00003F99 //A14 = +2.04056213851532266258e-31L +data8 0x9D41C15F6A6FBB04, 0x0000BF92 //A15 = -1.89291056020108587823e-33L +LOCAL_OBJECT_END(erfc_Q_table) + + +.section .text +GLOBAL_LIBM_ENTRY(erfcl) + +{ .mfi + alloc r32 = ar.pfs, 0, 36, 4, 0 + fma.s1 FR_Tmp = f1, f1, f8 // |x|+1, if x >= 0 + nop.i 0 +} +{ .mfi + addl GR_ad_Arg = @ltoff(exp_table_1), gp + fms.s1 FR_Tmp1 = f1, f1, f8 // |x|+1, if x < 0 + mov GR_rshf_2to51 = 0x4718 // begin 1.10000 2^(63+51) +} +;; + +{ .mfi + ld8 GR_ad_Arg = [GR_ad_Arg] // Point to Arg table + fcmp.ge.s1 p6,p7 = f8, f0 // p6: x >= 0 ,p7: x<0 + shl GR_rshf_2to51 = GR_rshf_2to51,48 // end 1.10000 2^(63+51) +} +{ .mlx + mov GR_rshf = 0x43e8 // begin 1.1000 2^63 for right shift + movl GR_sig_inv_ln2 = 0xb8aa3b295c17f0bc // signif. of 1/ln2 +} +;; + +{ .mfi + mov GR_exp_2tom51 = 0xffff-51 + fclass.m p8,p0 = f8,0x07 // p8: x = 0 + shl GR_rshf = GR_rshf,48 // end 1.1000 2^63 for right shift +} +{ .mfi + nop.m 0 + fnma.s1 FR_norm_x = f8, f8, f0 //high bits for -x^2 + nop.i 0 +} +;; + +.pred.rel "mutex",p6,p7 +{ .mfi + setf.sig FR_INV_LN2_2TO63 = GR_sig_inv_ln2 // form 1/ln2 * 2^63 +(p6) fma.s1 FR_AbsArg = f1, f0, f8 // |x|, if x >= 0 + nop.i 0 +} +{ .mfi + setf.d FR_RSHF_2TO51 = GR_rshf_2to51 //const 1.10 * 2^(63+51) +(p7) fms.s1 FR_AbsArg = f1, f0, f8 // |x|, if x < 0 + mov GR_exp_mask = 0x1FFFF // Form exponent mask +} +;; + +{ .mfi + ldfe FR_ch_dx = [GR_ad_Arg], 16 + fclass.m p10,p0 = f8, 0x21 // p10: x = +inf + mov GR_exp_bias = 0x0FFFF // Set exponent bias +} +{ .mlx + setf.d FR_RSHF = GR_rshf // Right shift const 1.1000 * 2^63 + movl GR_ERFC_XC_TB = 0x650 +} +;; + +.pred.rel "mutex",p6,p7 +{ .mfi + setf.exp FR_2TOM51 = GR_exp_2tom51 // 2^-51 for scaling float_N +(p6) fma.s1 FR_Tmp = FR_Tmp, FR_Tmp, f0 // (|x|+1)^2,x >=0 + nop.i 0 +} +{ .mfi + ldfpd FR_POS_ARG_ASYMP,FR_NEG_ARG_ASYMP = [GR_ad_Arg], 16 +(p7) fma.s1 FR_Tmp = FR_Tmp1, FR_Tmp1, f0 // (|x|+1)^2, x<0 + mov GR_0x1 = 0x1 +} +;; + +//p8: y = 1.0, x = 0.0,quick exit +{ .mfi + ldfpd FR_dx,FR_dx1 = [GR_ad_Arg], 16 + fclass.m p9,p0 = f8, 0x22 // p9: x = -inf + nop.i 0 + +} +{ .mfb + nop.m 0 +(p8) fma.s0 f8 = f1, f1, f0 +(p8) br.ret.spnt b0 +} +;; + +{ .mfi + ldfe FR_UnfBound = [GR_ad_Arg], 16 + fclass.m p11,p0 = f8, 0xc3 // p11: x = nan + mov GR_BIAS = 0x0FFFF +} +{ .mfi + nop.m 0 + fma.s1 FR_NormX = f8,f1,f0 + nop.i 0 +} +;; + +{ .mfi + ldfe FR_EpsNorm = [GR_ad_Arg], 16 + fmerge.s FR_X = f8,f8 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_xsq_lo = f8, f8, FR_norm_x // low bits for -x^2 + nop.i 0 +} +;; + +{ .mfi + add GR_ad_C = 0x20, GR_ad_Arg // Point to C table + nop.f 0 + add GR_ad_T1 = 0x50, GR_ad_Arg // Point to T1 table +} +{ .mfi + add GR_ad_T2 = 0x150, GR_ad_Arg // Point to T2 table + nop.f 0 + add GR_ERFC_XC_TB = GR_ERFC_XC_TB, GR_ad_Arg //poin.to XB_TBL +} +;; + +{ .mfi + getf.exp GR_signexp_x = FR_norm_x // Extr. sign and exponent of x + fma.s1 FR_Tmp = FR_Tmp, FR_Tmp, f0 // (|x|+1)^4 + add GR_ad_W1 = 0x100, GR_ad_T2 // Point to W1 table +} +{ .mfi + ldfe FR_L_hi = [GR_ad_Arg],16 // Get L_hi + nop.f 0 + add GR_ad_W2 = 0x300, GR_ad_T2 // Point to W2 table +} +;; + +// p9: y = 2.0, x = -inf, quick exit +{ .mfi + sub GR_mBIAS = r0, GR_BIAS + fma.s1 FR_2 = f1, f1, f1 + nop.i 0 +} +{ .mfb + ldfe FR_L_lo = [GR_ad_Arg],16 // Get L_lo +(p9) fma.s0 f8 = f1, f1, f1 +(p9) br.ret.spnt b0 +} +;; + +// p10: y = 0.0, x = +inf, quick exit +{ .mfi + adds GR_ERFC_P_TB = 0x380, GR_ERFC_XC_TB // pointer to P_TBL + fma.s1 FR_N_signif = FR_norm_x, FR_INV_LN2_2TO63, FR_RSHF_2TO51 + and GR_exp_x = GR_signexp_x, GR_exp_mask +} +{ .mfb + adds GR_ERFC_S_TB = 0x1C0, GR_ERFC_XC_TB // pointer to S_TBL +(p10) fma.s0 f8 = f0, f1, f0 +(p10) br.ret.spnt b0 +} +;; + +// p12: |x| < 0.681... -> dx = 0.875 (else dx = 0.625 ) +// p11: y = x, x = nan, quick exit +{ .mfi + ldfe FR_C3 = [GR_ad_C],16 // Get C3 for normal path + fcmp.lt.s1 p12,p0 = FR_AbsArg, FR_ch_dx + shl GR_ShftPi_bias = GR_BIAS, 8 // BIAS * 256 +} +{ .mfb + sub GR_exp_x = GR_exp_x, GR_exp_bias // Get exponent +(p11) fma.s0 f8 = f8, f1, f0 +(p11) br.ret.spnt b0 + +} +;; + +{ .mfi + ldfe FR_C2 = [GR_ad_C],16 // Get A2 for main path + nop.f 0 + nop.i 0 +} +;; + +//p15: x > POS_ARG_ASYMP = 107.0 -> erfcl(x) ~=~ 0.0 +{ .mfi + ldfe FR_C1 = [GR_ad_C],16 // Get C1 for main path +(p6) fcmp.gt.unc.s1 p15,p0 = FR_AbsArg, FR_POS_ARG_ASYMP // p6: x >= 0 + nop.i 0 +} +{ .mfb + nop.m 0 +(p12) fma.s1 FR_dx = FR_dx1, f1, f0 //p12: dx = 0.875 for x < 0.681 + nop.b 0 +} +;; + +//p14: x < - NEG_ARG_ASYMP = -6.5 -> erfcl(x) ~=~ 2.0 +{ .mfi + nop.m 0 +(p7) fcmp.gt.unc.s1 p14,p0 = FR_AbsArg,FR_NEG_ARG_ASYMP // p7: x < 0 + shladd GR_ShftXBi_bias = GR_mBIAS, 4, r0 +} +;; + +{ .mfi + nop.m 0 + fma.s0 FR_Tmpf = f1, f1, FR_EpsNorm // flag i + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 FR_float_N = FR_N_signif, FR_2TOM51, FR_RSHF + nop.i 0 +} +;; + +// p8: x < UnfBound ~=~ 106.53... -> result without underflow error +// p14: y ~=~ 2, x < -6.5,quick exit +{ .mfi + getf.exp GR_IndxPlusBias = FR_Tmp // exp + bias for (|x|+1)^4 + fcmp.lt.s1 p8,p0 = FR_NormX,FR_UnfBound + nop.i 0 +} +{ .mfb + nop.m 0 +(p14) fnma.s0 FR_RESULT = FR_EpsNorm,FR_EpsNorm,FR_2 +(p14) br.ret.spnt b0 + +} +;; + +// p15: y ~=~ 0.0 (result with underflow error), x > POS_ARG_ASYMP = 107.0, +// call __libm_error_region +{ .mfb +(p15) mov GR_Parameter_TAG = 207 +(p15) fma.s0 FR_RESULT = FR_EpsNorm,FR_EpsNorm,f0 +(p15) br.cond.spnt __libm_error_region +} +;; + +{ .mfi + getf.sig GR_N_fix = FR_N_signif // Get N from significand + nop.f 0 + shl GR_ShftPi = GR_IndxPlusBias, 8 + +} +{ .mfi + shladd GR_ShftXBi = GR_IndxPlusBias, 4, GR_ShftXBi_bias + nop.f 0 + nop.i 0 +} +;; + +{ .mmi + add GR_ERFC_S_TB = GR_ERFC_S_TB, GR_ShftXBi //poin.to S[i] + add GR_ERFC_XC_TB = GR_ERFC_XC_TB, GR_ShftXBi //poin.to XC[i] + sub GR_ShftPi = GR_ShftPi, GR_ShftPi_bias // 256*i +} +;; + +{ .mfi + ldfe FR_Xc = [GR_ERFC_XC_TB] + fma.s1 FR_Xpdx_hi = FR_AbsArg, f1, FR_dx // x + dx + add GR_ShftA14 = 0xE0, GR_ShftPi // pointer shift for A14 + + +} +{ .mfi + ldfe FR_S = [GR_ERFC_S_TB] + fnma.s1 FR_r = FR_L_hi, FR_float_N, FR_norm_x//r= -L_hi*float_N+x + add GR_ShftA15 = 0xF0, GR_ShftPi // pointer shift for A15 +} +;; + +{ .mfi + add GR_P_POINT_1 = GR_ERFC_P_TB, GR_ShftA14 // pointer to A14 + fcmp.gt.s1 p9,p10 = FR_AbsArg, FR_dx //p9: x > dx, p10: x <= dx + extr.u GR_M1 = GR_N_fix, 6, 6 // Extract index M_1 +} +{ .mfi + add GR_P_POINT_2 = GR_ERFC_P_TB, GR_ShftA15 // pointer to A15 + nop.f 0 + nop.i 0 + +} +;; + +{ .mfi + ldfe FR_A14 = [GR_P_POINT_1], -32 + nop.f 0 + extr.u GR_M2 = GR_N_fix, 0, 6 // Extract index M_2 +} +{ .mfi + ldfe FR_A15 = [GR_P_POINT_2], -32 + nop.f 0 + shladd GR_ad_W1 = GR_M1,3,GR_ad_W1 // Point to W1 +} +;; + +{ .mfi + ldfe FR_A12 = [GR_P_POINT_1], -64 + nop.f 0 + extr GR_K = GR_N_fix, 12, 32 // Extract limite range K +} +{ .mfi + ldfe FR_A13 = [GR_P_POINT_2], -64 + nop.f 0 + shladd GR_ad_T1 = GR_M1,2,GR_ad_T1 // Point to T1 +} +;; + +{ .mfi + ldfe FR_A8 = [GR_P_POINT_1], 32 + nop.f 0 + add GR_exp_2_k = GR_exp_bias, GR_K // Form exponent of 2^k +} +{ .mfi + ldfe FR_A9 = [GR_P_POINT_2], 32 + nop.f 0 + shladd GR_ad_W2 = GR_M2,3,GR_ad_W2 // Point to W2 +} +;; + +{ .mfi + ldfe FR_A10 = [GR_P_POINT_1], -96 + nop.f 0 + shladd GR_ad_T2 = GR_M2,2,GR_ad_T2 // Point to T2 +} +{ .mfi + ldfe FR_A11 = [GR_P_POINT_2], -96 + fnma.s1 FR_r = FR_L_lo, FR_float_N, FR_r //r = -L_lo*float_N + r + nop.i 0 +} +;; + +{ .mfi + ldfe FR_A4 = [GR_P_POINT_1], 32 +(p10) fms.s1 FR_Tmp = FR_dx,f1, FR_Xpdx_hi //for lo of x+dx, x<=dx + nop.i 0 +} +{ .mfi + ldfe FR_A5 = [GR_P_POINT_2], 32 +(p9) fms.s1 FR_Tmp = FR_AbsArg, f1, FR_Xpdx_hi //for lo of x+dx, x>dx + nop.i 0 +} +;; + +{ .mfi + ldfe FR_A6 = [GR_P_POINT_1], -64 + frcpa.s1 FR_U,p11 = f1, FR_Xpdx_hi // hi of 1 /(x + dx) + nop.i 0 +} +{ .mfi + ldfe FR_A7 = [GR_P_POINT_2], -64 + nop.f 0 + nop.i 0 +} +;; + +{ .mfi + ldfe FR_A2 = [GR_P_POINT_1], -32 + nop.f 0 + nop.i 0 +} +{ .mfi + ldfe FR_A3 = [GR_P_POINT_2], -32 + nop.f 0 + nop.i 0 +} +;; + +{ .mfi + ldfe FR_A0 = [GR_P_POINT_1], 224 + nop.f 0 + nop.i 0 +} +{ .mfi + ldfe FR_A1 = [GR_P_POINT_2] + fms.s1 FR_LocArg = FR_AbsArg, f1, FR_Xc // xloc = x - x[i] + nop.i 0 +} +;; + +{ .mfi + ldfd FR_W1 = [GR_ad_W1],0 // Get W1 + nop.f 0 + nop.i 0 +} +{ .mfi + ldfd FR_W2 = [GR_ad_W2],0 // Get W2 + fma.s1 FR_poly = FR_r, FR_C3, FR_C2 // poly = r * A3 + A2 + nop.i 0 +} +;; + +{ .mfi + ldfs FR_T1 = [GR_ad_T1],0 // Get T1 +(p10) fma.s1 FR_Xpdx_lo = FR_AbsArg,f1, FR_Tmp//lo of x + dx , x <= dx + nop.i 0 +} +{ .mfi + ldfs FR_T2 = [GR_ad_T2],0 // Get T2 +(p9) fma.s1 FR_Xpdx_lo = FR_dx,f1, FR_Tmp // lo of x + dx, x > dx + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fnma.s1 FR_Tmp1 = FR_Xpdx_hi, FR_U, FR_2 // N-R, iter. N1 + nop.i 0 +} +{ .mfi + nop.m 0 + fmpy.s1 FR_rsq = FR_r, FR_r // rsq = r * r + nop.i 0 +} +;; + +{ .mfi + setf.exp FR_scale = GR_exp_2_k // Set scale = 2^k + fma.s1 FR_P15_1_1 = FR_LocArg, FR_LocArg, f0 // xloc ^2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_P15_0_1 = FR_A15, FR_LocArg, FR_A14 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 FR_P15_1_2 = FR_A13, FR_LocArg, FR_A12 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_poly = FR_r, FR_poly, FR_C1 // poly = r * poly + A1 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 FR_P15_2_1 = FR_A9, FR_LocArg, FR_A8 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_P15_2_2 = FR_A11, FR_LocArg, FR_A10 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 FR_U = FR_U, FR_Tmp1, f0 // N-R, iter. N1 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 FR_P15_3_1 = FR_A5, FR_LocArg, FR_A4 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_P15_3_2 = FR_A7, FR_LocArg, FR_A6 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 FR_P15_4_2 = FR_A3, FR_LocArg, FR_A2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_W = FR_W1, FR_W2, FR_W2 // W = W1 * W2 + W2 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fmpy.s1 FR_T = FR_T1, FR_T2 // T = T1 * T2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_P15_7_1 = FR_P15_0_1, FR_P15_1_1, FR_P15_1_2 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 FR_P15_7_2 = FR_P15_1_1, FR_P15_1_1, f0 // xloc^4 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_P15_8_1 = FR_P15_1_1, FR_P15_2_2, FR_P15_2_1 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fnma.s1 FR_Tmp = FR_Xpdx_hi, FR_U, FR_2 // N-R, iter. N2 + nop.i 0 +} + +{ .mfi + nop.m 0 + fma.s1 FR_poly = FR_rsq, FR_poly, FR_r // poly = rsq * poly + r + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 FR_P15_9_1 = FR_P15_1_1, FR_P15_4_2, FR_A0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_P15_9_2 = FR_P15_1_1, FR_P15_3_2, FR_P15_3_1 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 FR_W = FR_W, f1, FR_W1 // W = W + W1 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 FR_T_scale = FR_T, FR_scale, f0 // T_scale = T * scale + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 FR_P15_13_1 = FR_P15_7_2, FR_P15_7_1, FR_P15_8_1 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 FR_U = FR_U, FR_Tmp, f0 // N-R, iter. N2 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 FR_P15_14_1 = FR_P15_7_2, FR_P15_9_2, FR_P15_9_1 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_P15_14_2 = FR_P15_7_2, FR_P15_7_2, f0 // xloc^8 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 FR_M = FR_T_scale, FR_S, f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fnma.s1 FR_Tmp = FR_Xpdx_hi, FR_U, FR_2 // N-R, iter. N3 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 FR_Q = FR_P15_14_2, FR_P15_13_1, FR_P15_14_1 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fms.s1 FR_H = FR_W, f1, FR_xsq_lo // H = W - xsq_lo + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 FR_U = FR_U, FR_Tmp, f0 // N-R, iter. N3 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 FR_Q = FR_A1, FR_LocArg, FR_Q + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fnma.s1 FR_Tmp = FR_Xpdx_hi, FR_U, f1 // for du + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_R = FR_H, FR_poly, FR_poly + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 FR_res_pos_x_hi = FR_M, FR_U, f0 // M *U + nop.i 0 + +} +;; + +{ .mfi + nop.m 0 + fma.s1 FR_R = FR_R, f1, FR_H // R = H + P(r) + H*P(r) + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s0 FR_Tmpf = f8, f1, f0 // flag d + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fnma.s1 FR_dU = FR_Xpdx_lo, FR_U, FR_Tmp + nop.i 0 +} +;; + +// p7: we begin to calculate y(x) = 2 - erfcl(-x) in multi precision +// for -6.5 <= x < 0 +{ .mfi + nop.m 0 + fms.s1 FR_res_pos_x_lo = FR_M, FR_U, FR_res_pos_x_hi + nop.i 0 + +} +{ .mfi + nop.m 0 +(p7) fnma.s1 FR_Tmp1 = FR_res_pos_x_hi, f1, FR_2 //p7: x < 0 + nop.i 0 + +} +;; + +{ .mfi + nop.m 0 + fma.s1 FR_G = FR_R, FR_Q, FR_Q + nop.i 0 + +} +;; + +{ .mfi + nop.m 0 + fma.s1 FR_Tmp = FR_R, f1, FR_dU // R + du + nop.i 0 + +} +;; + +{ .mfi + nop.m 0 +(p7) fnma.s1 FR_Tmp2 = FR_Tmp1, f1, FR_2 //p7: x < 0 + nop.i 0 + +} +;; + +{ .mfi + nop.m 0 + fma.s1 FR_G = FR_G, f1, FR_Tmp + nop.i 0 + +} +;; + +{ .mfi + nop.m 0 +(p7) fnma.s1 FR_Tmp2 = FR_res_pos_x_hi, f1, FR_Tmp2 //p7: x < 0 + nop.i 0 + +} +;; + +{ .mfi + nop.m 0 + fma.s1 FR_V = FR_G, FR_res_pos_x_hi, f0 // V = G * M *U + nop.i 0 + +} +;; + +{ .mfi + nop.m 0 +(p7) fma.s1 FR_res_pos_x_lo = FR_res_pos_x_lo, f1, FR_V //p7: x < 0 + nop.i 0 + +} +;; + +{ .mfi + nop.m 0 +(p7) fnma.s1 FR_Tmp2 = FR_res_pos_x_lo, f1, FR_Tmp2 //p7: x < 0 + nop.i 0 + +} +;; + + +//p6: result for 0 < x < = POS_ARG_ASYMP +//p7: result for - NEG_ARG_ASYMP <= x < 0 +//p8: exit for - NEG_ARG_ASYMP <= x < UnfBound + +ERFC_RESULT: +.pred.rel "mutex",p6,p7 +{ .mfi + nop.m 0 +(p6) fma.s0 f8 = FR_M, FR_U, FR_V // p6: x >= 0 + nop.i 0 +} +{ .mfb + mov GR_Parameter_TAG = 207 +(p7) fma.s0 f8 = FR_Tmp2, f1, FR_Tmp1 // p7: x < 0 +(p8) br.ret.sptk b0 +};; + +GLOBAL_LIBM_END(erfcl) + +// call via (p15) br.cond.spnt __libm_error_region +// for x > POS_ARG_ASYMP +// or +// +// after .endp erfcl for UnfBound < = x < = POS_ARG_ASYMP + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfe [GR_Parameter_Y] = FR_Y,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; +.body +{ .mib + stfe [GR_Parameter_X] = FR_X // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfe [GR_Parameter_Y] = FR_RESULT // STORE Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + nop.m 0 + nop.m 0 + add GR_Parameter_RESULT = 48,sp +};; +{ .mmi + ldfe f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) +.type __libm_error_support#,@function +.global __libm_error_support# + + + diff --git a/sysdeps/ia64/fpu/s_erff.S b/sysdeps/ia64/fpu/s_erff.S new file mode 100644 index 0000000000..ed0aaac488 --- /dev/null +++ b/sysdeps/ia64/fpu/s_erff.S @@ -0,0 +1,558 @@ +.file "erff.s" + + +// Copyright (c) 2001 - 2005, Intel Corporation +// All rights reserved. +// +// Contributed 2001 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 08/14/01 Initial version +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/06/03 Reordered header: .section, .global, .proc, .align +// 03/31/05 Reformatted delimiters between data tables +// +// API +//============================================================== +// float erff(float) +// +// Overview of operation +//============================================================== +// Background +// +// +// There are 8 paths: +// 1. x = +/-0.0 +// Return erff(x) = +/-0.0 +// +// 2. 0.0 < |x| < 0.125 +// Return erff(x) = x *Pol3(x^2), +// where Pol3(x^2) = C3*x^6 + C2*x^4 + C1*x^2 + C0 +// +// 3. 0.125 <= |x| < 4.0 +// Return erff(x) = sign(x)*PolD(x)*PolC(|x|) + sign(x)*PolA(|x|), +// where sign(x)*PolD(x) = sign(x)*(|x|^7 + D2*x^6 + D1*|x|^5 + D0*x^4), +// PolC(|x|) = B0*x^4 + C3*|x|^3 + C2*|x|^2 + C1*|x| + C0, +// PolA(|x|) = A3|x|^3 + A2*x^2 + A1*|x| + A0 +// +// Actually range 0.125<=|x|< 4.0 is splitted to 5 subranges. +// For each subrange there is particular set of coefficients. +// Below is the list of subranges: +// 3.1 0.125 <= |x| < 0.25 +// 3.2 0.25 <= |x| < 0.5 +// 3.3 0.5 <= |x| < 1.0 +// 3.4 1.0 <= |x| < 2.0 +// 3.5 2.0 <= |x| < 4.0 +// +// 4. 4.0 <= |x| < +INF +// Return erff(x) = sign(x)*(1.0d - 2^(-52)) +// +// 5. |x| = INF +// Return erff(x) = sign(x) * 1.0 +// +// 6. x = [S,Q]NaN +// Return erff(x) = QNaN +// +// 7. x is positive denormal +// Return erff(x) = C0*x - x^2, +// where C0 = 2.0/sqrt(Pi) +// +// 8. x is negative denormal +// Return erff(x) = C0*x + x^2, +// where C0 = 2.0/sqrt(Pi) +// +// Registers used +//============================================================== +// Floating Point registers used: +// f8, input +// f32 -> f59 + +// General registers used: +// r32 -> r45, r2, r3 + +// Predicate registers used: +// p0, p6 -> p12, p14, p15 + +// p6 to filter out case when x = [Q,S]NaN or +/-0 +// p7 to filter out case when x = denormal +// p8 set if |x| >= 0.3125, used also to process denormal input +// p9 to filter out case when |x| = inf +// p10 to filter out case when |x| < 0.125 +// p11 to filter out case when 0.125 <= |x| < 4.0 +// p12 to filter out case when |x| >= 4.0 +// p14 set to 1 for positive x +// p15 set to 1 for negative x + +// Assembly macros +//============================================================== +rDataPtr = r2 +rDataPtr1 = r3 + +rBias = r33 +rCoeffAddr3 = r34 +rCoeffAddr1 = r35 +rCoeffAddr2 = r36 +rOffset2 = r37 +rBias2 = r38 +rMask = r39 +rArg = r40 +rBound = r41 +rSignBit = r42 +rAbsArg = r43 +rDataPtr2 = r44 +rSaturation = r45 + +//============================================================== +fA0 = f32 +fA1 = f33 +fA2 = f34 +fA3 = f35 +fC0 = f36 +fC1 = f37 +fC2 = f38 +fC3 = f39 +fD0 = f40 +fD1 = f41 +fD2 = f42 +fB0 = f43 +fArgSqr = f44 +fAbsArg = f45 +fSignumX = f46 +fArg4 = f47 +fArg4Sgn = f48 +fArg3 = f49 +fArg3Sgn = f50 +fArg7Sgn = f51 +fArg6Sgn = f52 +fPolC = f53 +fPolCTmp = f54 +fPolA = f55 +fPolATmp = f56 +fPolD = f57 +fPolDTmp = f58 +fArgSqrSgn = f59 + +// Data tables +//============================================================== + +RODATA + +.align 16 + +LOCAL_OBJECT_START(erff_data) +// Polynomial coefficients for the erf(x), 0.125 <= |x| < 0.25 +data8 0xBE4218BB56B49E66 // C0 +data8 0x3F7AFB8315DA322B // C1 +data8 0x3F615D6EBEE0CA32 // C2 +data8 0xBF468D71CF4F0918 // C3 +data8 0x40312115B0932F24 // D0 +data8 0xC0160D6CD0991EA3 // D1 +data8 0xBFE04A567A6DBE4A // D2 +data8 0xBF4207BC640D1509 // B0 +// Polynomial coefficients for the erf(x), 0.25 <= |x| < 0.5 +data8 0x3F90849356383F58 // C0 +data8 0x3F830BD5BA240F09 // C1 +data8 0xBF3FA4970E2BCE23 // C2 +data8 0xBF6061798E58D0FD // C3 +data8 0xBF68C0D83DD22E02 // D0 +data8 0x401C0A9EE4108F94 // D1 +data8 0xC01056F9B5E387F5 // D2 +data8 0x3F1C9744E36A5706 // B0 +// Polynomial coefficients for the erf(x), 0.5 <= |x| < 1.0 +data8 0x3F85F7D419A13DE3 // C0 +data8 0x3F791A13FF66D45A // C1 +data8 0x3F46B17B16B5929F // C2 +data8 0xBF5124947A8BF45E // C3 +data8 0x3FA1B3FD95EA9564 // D0 +data8 0x40250CECD79A020A // D1 +data8 0xC0190DC96FF66CCD // D2 +data8 0x3F4401AE28BA4DD5 // B0 +// Polynomial coefficients for the erf(x), 1.0 <= |x| < 2.0 +data8 0xBF49E07E3584C3AE // C0 +data8 0x3F3166621131445C // C1 +data8 0xBF65B7FC1EAC2099 // C2 +data8 0x3F508C6BD211D736 // C3 +data8 0xC053FABD70601067 // D0 +data8 0x404A06640EE87808 // D1 +data8 0xC0283F30817A3F08 // D2 +data8 0xBF2F6DBBF4D6257F // B0 +// Polynomial coefficients for the erf(x), 2.0 <= |x| < 4.0 +data8 0xBF849855D67E9407 // C0 +data8 0x3F5ECA5FEC01C70C // C1 +data8 0xBF483110C30FABA4 // C2 +data8 0x3F1618DA72860403 // C3 +data8 0xC08A5C9D5FE8B9F6 // D0 +data8 0x406EFF5F088CEC4B // D1 +data8 0xC03A5743DF38FDE0 // D2 +data8 0xBEE397A9FA5686A2 // B0 +// Polynomial coefficients for the erf(x), -0.125 < x < 0.125 +data8 0x3FF20DD7504270CB // C0 +data8 0xBFD8127465AFE719 // C1 +data8 0x3FBCE2D77791DD77 // C2 +data8 0xBF9B582755CDF345 // C3 +// Polynomial coefficients for the erf(x), 0.125 <= |x| < 0.25 +data8 0xBD54E7E451AF0E36 // A0 +data8 0x3FF20DD75043FE20 // A1 +data8 0xBE05680ACF8280E4 // A2 +data8 0xBFD812745E92C3D3 // A3 +// Polynomial coefficients for the erf(x), 0.25 <= |x| < 0.5 +data8 0xBE1ACEC2859CB55F // A0 +data8 0x3FF20DD75E8D2B64 // A1 +data8 0xBEABC6A83208FCFC // A2 +data8 0xBFD81253E42E7B99 // A3 +// Polynomial coefficients for the erf(x), 0.5 <= |x| < 1.0 +data8 0x3EABD5A2482B4979 // A0 +data8 0x3FF20DCAA52085D5 // A1 +data8 0x3F13A994A348795B // A2 +data8 0xBFD8167B2DFCDE44 // A3 +// Polynomial coefficients for the erf(x), 1.0 <= |x| < 2.0 +data8 0xBF5BA377DDAB4E17 // A0 +data8 0x3FF2397F1D8FC0ED // A1 +data8 0xBF9945BFC1915C21 // A2 +data8 0xBFD747AAABB690D8 // A3 +// Polynomial coefficients for the erf(x), 2.0 <= |x| < 4.0 +data8 0x3FF0E2920E0391AF // A0 +data8 0xC00D249D1A95A5AE // A1 +data8 0x40233905061C3803 // A2 +data8 0xC027560B851F7690 // A3 +// +data8 0x3FEFFFFFFFFFFFFF // 1.0 - epsilon +data8 0x3FF20DD750429B6D // C0 = 2.0/sqrt(Pi) +LOCAL_OBJECT_END(erff_data) + + +.section .text +GLOBAL_LIBM_ENTRY(erff) + +{ .mfi + alloc r32 = ar.pfs, 0, 14, 0, 0 + fmerge.s fAbsArg = f1, f8 // |x| + addl rMask = 0x806, r0 +} +{ .mfi + addl rDataPtr = @ltoff(erff_data), gp + fma.s1 fArgSqr = f8, f8, f0 // x^2 + adds rSignBit = 0x1, r0 +} +;; + +{ .mfi + getf.s rArg = f8 // x in GR + fclass.m p7,p0 = f8, 0x0b // is x denormal ? + // sign bit and 2 most bits in significand + shl rMask = rMask, 20 +} +{ .mfi + ld8 rDataPtr = [rDataPtr] + nop.f 0 + adds rBias2 = 0x1F0, r0 +} +;; + +{ .mfi + nop.m 0 + fmerge.s fSignumX = f8, f1 // signum(x) + shl rSignBit = rSignBit, 31 // mask for sign bit +} +{ .mfi + adds rBound = 0x3E0, r0 + nop.f 0 + adds rSaturation = 0x408, r0 +} +;; + +{ .mfi + andcm rOffset2 = rArg, rMask + fclass.m p6,p0 = f8, 0xc7 // is x [S,Q]NaN or +/-0 ? + shl rBound = rBound, 20 // 0.125f in GR +} +{ .mfb + andcm rAbsArg = rArg, rSignBit // |x| in GR + nop.f 0 +(p7) br.cond.spnt erff_denormal // branch out if x is denormal +} +;; + +{ .mfi + adds rCoeffAddr2 = 352, rDataPtr + fclass.m p9,p0 = f8, 0x23 // is x +/- inf? + shr rOffset2 = rOffset2, 21 +} +{ .mfi + cmp.lt p10, p8 = rAbsArg, rBound // |x| < 0.125? + nop.f 0 + adds rCoeffAddr3 = 16, rDataPtr +} +;; + +{ .mfi +(p8) sub rBias = rOffset2, rBias2 + fma.s1 fArg4 = fArgSqr, fArgSqr, f0 // x^4 + shl rSaturation = rSaturation, 20// 4.0 in GR (saturation bound) +} +{ .mfb +(p10) adds rBias = 0x14, r0 +(p6) fma.s.s0 f8 = f8,f1,f8 // NaN or +/-0 +(p6) br.ret.spnt b0 // exit for x = NaN or +/-0 +} +;; + +{ .mfi + shladd rCoeffAddr1 = rBias, 4, rDataPtr + fma.s1 fArg3Sgn = fArgSqr, f8, f0 // sign(x)*|x|^3 + // is |x| < 4.0? + cmp.lt p11, p12 = rAbsArg, rSaturation +} +{ .mfi + shladd rCoeffAddr3 = rBias, 4, rCoeffAddr3 + fma.s1 fArg3 = fArgSqr, fAbsArg, f0 // |x|^3 + shladd rCoeffAddr2 = rBias, 3, rCoeffAddr2 +} +;; + +{ .mfi +(p11) ldfpd fC0, fC1 = [rCoeffAddr1] +(p9) fmerge.s f8 = f8,f1 // +/- inf +(p12) adds rDataPtr = 512, rDataPtr +} +{ .mfb +(p11) ldfpd fC2, fC3 = [rCoeffAddr3], 16 + nop.f 0 +(p9) br.ret.spnt b0 // exit for x = +/- inf +} +;; + +{ .mfi +(p11) ldfpd fA0, fA1 = [rCoeffAddr2], 16 + nop.f 0 + nop.i 0 +} +{ .mfi + add rCoeffAddr1 = 48, rCoeffAddr1 + nop.f 0 + nop.i 0 +} +;; + +{ .mfi +(p11) ldfpd fD0, fD1 = [rCoeffAddr3] + nop.f 0 + nop.i 0 +} +{ .mfb +(p11) ldfpd fD2, fB0 = [rCoeffAddr1] + // sign(x)*|x|^2 + fma.s1 fArgSqrSgn = fArgSqr, fSignumX, f0 +(p10) br.cond.spnt erff_near_zero +} +;; + +{ .mfi +(p11) ldfpd fA2, fA3 = [rCoeffAddr2], 16 + fcmp.lt.s1 p15, p14 = f8,f0 + nop.i 0 +} +{ .mfb +(p12) ldfd fA0 = [rDataPtr] + fma.s1 fArg4Sgn = fArg4, fSignumX, f0 // sign(x)*|x|^4 +(p12) br.cond.spnt erff_saturation +} +;; +{ .mfi + nop.m 0 + fma.s1 fArg7Sgn = fArg4, fArg3Sgn, f0 // sign(x)*|x|^7 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fArg6Sgn = fArg3, fArg3Sgn, f0 // sign(x)*|x|^6 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fPolC = fC3, fAbsArg, fC2 // C3*|x| + C2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fPolCTmp = fC1, fAbsArg, fC0 // C1*|x| + C0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fPolA = fA1, fAbsArg, fA0 // A1*|x| + A0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fPolD = fD1, fAbsArg, fD0 // D1*|x| + D0 + nop.i 0 +} +{ .mfi + nop.m 0 + // sign(x)*(|x|^7 + D2*x^6) + fma.s1 fPolDTmp = fArg6Sgn, fD2, fArg7Sgn + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fPolATmp = fA3, fAbsArg, fA2 // A3*|x| + A2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fB0 = fB0, fArg4, f0 // B0*x^4 + nop.i 0 +};; + +{ .mfi + nop.m 0 + // C3*|x|^3 + C2*x^2 + C1*|x| + C0 + fma.s1 fPolC = fPolC, fArgSqr, fPolCTmp + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + // PolD = sign(x)*(|x|^7 + D2*x^6 + D1*|x|^5 + D0*x^4) + fma.d.s1 fPolD = fPolD, fArg4Sgn, fPolDTmp + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + // PolA = A3|x|^3 + A2*x^2 + A1*|x| + A0 + fma.d.s1 fPolA = fPolATmp, fArgSqr, fPolA + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + // PolC = B0*x^4 + C3*|x|^3 + C2*|x|^2 + C1*|x| + C0 + fma.d.s1 fPolC = fPolC, f1, fB0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p14) fma.s.s0 f8 = fPolC, fPolD, fPolA // for positive x + nop.i 0 +} +{ .mfb + nop.m 0 +(p15) fms.s.s0 f8 = fPolC, fPolD, fPolA // for negative x + br.ret.sptk b0 // Exit for 0.125 <=|x|< 4.0 +};; + + +// Here if |x| < 0.125 +erff_near_zero: +{ .mfi + nop.m 0 + fma.s1 fPolC = fC3, fArgSqr, fC2 // C3*x^2 + C2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fPolCTmp = fC1, fArgSqr, fC0 // C1*x^2 + C0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fPolC = fPolC, fArg4, fPolCTmp // C3*x^6 + C2*x^4 + C1*x^2 + C0 + nop.i 0 +};; + +{ .mfb + nop.m 0 + // x*(C3*x^6 + C2*x^4 + C1*x^2 + C0) + fma.s.s0 f8 = fPolC, f8, f0 + br.ret.sptk b0 // Exit for |x| < 0.125 +};; + +// Here if 4.0 <= |x| < +inf +erff_saturation: +{ .mfb + nop.m 0 + fma.s.s0 f8 = fA0, fSignumX, f0 // sign(x)*(1.0d - 2^(-52)) + // Exit for 4.0 <= |x| < +inf + br.ret.sptk b0 // Exit for 4.0 <=|x|< +inf +} +;; + +// Here if x is single precision denormal +erff_denormal: +{ .mfi + adds rDataPtr = 520, rDataPtr // address of C0 + fclass.m p7,p8 = f8, 0x0a // is x -denormal ? + nop.i 0 +} +;; +{ .mfi + ldfd fC0 = [rDataPtr] // C0 + nop.f 0 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fC0 = fC0,f8,f0 // C0*x + nop.i 0 +} +;; +{ .mfi + nop.m 0 +(p7) fma.s.s0 f8 = f8,f8,fC0 // -denormal + nop.i 0 +} +{ .mfb + nop.m 0 +(p8) fnma.s.s0 f8 = f8,f8,fC0 // +denormal + br.ret.sptk b0 // Exit for denormal +} +;; + +GLOBAL_LIBM_END(erff) diff --git a/sysdeps/ia64/fpu/s_erfl.S b/sysdeps/ia64/fpu/s_erfl.S new file mode 100644 index 0000000000..10da22ce36 --- /dev/null +++ b/sysdeps/ia64/fpu/s_erfl.S @@ -0,0 +1,1240 @@ +.file "erfl.s" + + +// Copyright (c) 2001 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2001 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 11/21/01 Initial version +// 05/20/02 Cleaned up namespace and sf0 syntax +// 08/14/02 Changed mli templates to mlx +// 02/06/03 Reordered header: .section, .global, .proc, .align +// +// API +//============================================================== +// long double erfl(long double) +// +// Overview of operation +//============================================================== +// +// Algorithm description +// --------------------- +// +// There are 4 paths: +// +// 1. Special path: x = 0, Inf, NaNs, denormal +// Return erfl(x) = +/-0.0 for zeros +// Return erfl(x) = QNaN for NaNs +// Return erfl(x) = sign(x)*1.0 for Inf +// Return erfl(x) = (A0H+A0L)*x + x^2, ((A0H+A0L) = 2.0/sqrt(Pi)) +// for denormals +// +// 2. [0;1/8] path: 0.0 < |x| < 1/8 +// Return erfl(x) = x*(A1H+A1L) + x^3*A3 + ... + x^15*A15 +// +// 3. Main path: 1/8 <= |x| < 6.53 +// For several ranges of 1/8 <= |x| < 6.53 +// Return erfl(x) = sign(x)*((A0H+A0L) + y*(A1H+A1L) + y^2*(A2H+A2L) + +// + y^3*A3 + y^4*A4 + ... + y^25*A25 ) +// where y = (|x|/a) - b +// +// For each range there is particular set of coefficients. +// Below is the list of ranges: +// 1/8 <= |x| < 1/4 a = 0.125, b = 1.5 +// 1/4 <= |x| < 1/2 a = 0.25, b = 1.5 +// 1/2 <= |x| < 1.0 a = 0.5, b = 1.5 +// 1.0 <= |x| < 2.0 a = 1.0, b = 1.5 +// 2.0 <= |x| < 3.25 a = 2.0, b = 1.5 +// 3.25 <= |x| < 4.0 a = 2.0, b = 2.0 +// 4.0 <= |x| < 6.53 a = 4.0, b = 1.5 +// ( [3.25;4.0] subrange separated for monotonicity issues resolve ) +// +// 4. Saturation path: 6.53 <= |x| < +INF +// Return erfl(x) = sign(x)*(1.0 - tiny_value) +// (tiny_value ~ 1e-1233) +// +// Implementation notes +// -------------------- +// +// 1. Special path: x = 0, INF, NaNa, denormals +// +// This branch is cut off by one fclass operation. +// Then zeros+nans, infinities and denormals processed separately. +// For denormals we had to use multiprecision A0 coefficient to reach +// necessary accuracy: (A0H+A0L)*x-x^2 +// +// 2. [0;1/8] path: 0.0 < |x| < 1/8 +// +// First coefficient of polynomial we must split to multiprecision too. +// Also we can parallelise computations: +// (x*(A1H+A1L)) calculated in parallel with "tail" (x^3*A3 + ... + x^15*A15) +// Furthermore the second part is factorized using binary tree technique. +// +// 3. Main path: 1/8 <= |x| < 6.53 +// +// Multiprecision have to be performed only for first few +// polynomial iterations (up to 3-rd x degree) +// Here we use the same parallelisation way as above: +// Split whole polynomial to first, "multiprecision" part, and second, +// so called "tail", native precision part. +// +// 1) Multiprecision part: +// [v1=(A0H+A0L)+y*(A1H+A1L)] + [v2=y^2*((A2H+A2L)+y*A3)] +// v1 and v2 terms calculated in parallel +// +// 2) Tail part: +// v3 = x^4 * ( A4 + x*A5 + ... + x^21*A25 ) +// v3 is splitted to 2 even parts (10 coefficient in each one). +// These 2 parts are also factorized using binary tree technique. +// +// So Multiprecision and Tail parts cost is almost the same +// and we have both results ready before final summation. +// +// 4. Saturation path: 6.53 <= |x| < +INF +// +// We use formula sign(x)*(1.0 - tiny_value) instead of simple sign(x)*1.0 +// just to meet IEEE requirements for different rounding modes in this case. +// +// Registers used +//============================================================== +// Floating Point registers used: +// f8 - input & output +// f32 -> f90 + +// General registers used: +// r2, r3, r32 -> r52 + +// Predicate registers used: +// p0, p6 -> p11, p14, p15 + +// p6 - arg is zero, denormal or special IEEE +// p7 - arg is in [4;8] binary interval +// p8 - arg is in [3.25;4] interval +// p9 - arg < 1/8 +// p10 - arg is NOT in [3.25;4] interval +// p11 - arg in saturation domain +// p14 - arg is positive +// p15 - arg is negative + +// Assembly macros +//============================================================== +rDataPtr = r2 +rTailDataPtr = r3 + +rBias = r33 +rSignBit = r34 +rInterval = r35 + +rArgExp = r36 +rArgSig = r37 +r3p25Offset = r38 +r2to4 = r39 +r1p25 = r40 +rOffset = r41 +r1p5 = r42 +rSaturation = r43 +r3p25Sign = r44 +rTiny = r45 +rAddr1 = r46 +rAddr2 = r47 +rTailAddr1 = r48 +rTailAddr2 = r49 +rTailOffset = r50 +rTailAddOffset = r51 +rShiftedDataPtr = r52 + +//============================================================== +fA0H = f32 +fA0L = f33 +fA1H = f34 +fA1L = f35 +fA2H = f36 +fA2L = f37 +fA3 = f38 +fA4 = f39 +fA5 = f40 +fA6 = f41 +fA7 = f42 +fA8 = f43 +fA9 = f44 +fA10 = f45 +fA11 = f46 +fA12 = f47 +fA13 = f48 +fA14 = f49 +fA15 = f50 +fA16 = f51 +fA17 = f52 +fA18 = f53 +fA19 = f54 +fA20 = f55 +fA21 = f56 +fA22 = f57 +fA23 = f58 +fA24 = f59 +fA25 = f60 + +fArgSqr = f61 +fArgCube = f62 +fArgFour = f63 +fArgEight = f64 + +fArgAbsNorm = f65 +fArgAbsNorm2 = f66 +fArgAbsNorm2L = f67 +fArgAbsNorm3 = f68 +fArgAbsNorm4 = f69 +fArgAbsNorm11 = f70 + +fRes = f71 +fResH = f72 +fResL = f73 +fRes1H = f74 +fRes1L = f75 +fRes1Hd = f76 +fRes2H = f77 +fRes2L = f78 +fRes3H = f79 +fRes3L = f80 +fRes4 = f81 + +fTT = f82 +fTH = f83 +fTL = f84 +fTT2 = f85 +fTH2 = f86 +fTL2 = f87 + +f1p5 = f88 +f2p0 = f89 +fTiny = f90 + + +// Data tables +//============================================================== +RODATA + +.align 64 +LOCAL_OBJECT_START(erfl_data) +////////// Main tables /////////// +_0p125_to_0p25_data: // exp = 2^-3 +// Polynomial coefficients for the erf(x), 1/8 <= |x| < 1/4 +data8 0xACD9ED470F0BB048, 0x0000BFF4 //A3 = -6.5937529303909561891162915809e-04 +data8 0xBF6A254428DDB452 //A2H = -3.1915980570631852578089571182e-03 +data8 0xBC131B3BE3AC5079 //A2L = -2.5893976889070198978842231134e-19 +data8 0x3FC16E2D7093CD8C //A1H = 1.3617485043469590433318217038e-01 +data8 0x3C6979A52F906B4C //A1L = 1.1048096806003284897639351952e-17 +data8 0x3FCAC45E37FE2526 //A0H = 2.0911767705937583938791135552e-01 +data8 0x3C648D48536C61E3 //A0L = 8.9129592834861155344147026365e-18 +data8 0xD1FC135B4A30E746, 0x00003F90 //A25 = 6.3189963203954877364460345654e-34 +data8 0xB1C79B06DD8C988C, 0x00003F97 //A24 = 6.8478253118093953461840838106e-32 +data8 0xCC7AE121D1DEDA30, 0x0000BF9A //A23 = -6.3010264109146390803803408666e-31 +data8 0x8927B8841D1E0CA8, 0x0000BFA1 //A22 = -5.4098171537601308358556861717e-29 +data8 0xB4E84D6D0C8F3515, 0x00003FA4 //A21 = 5.7084320046554628404861183887e-28 +data8 0xC190EAE69A67959A, 0x00003FAA //A20 = 3.9090359419467121266470910523e-26 +data8 0x90122425D312F680, 0x0000BFAE //A19 = -4.6551806872355374409398000522e-25 +data8 0xF8456C9C747138D6, 0x0000BFB3 //A18 = -2.5670639225386507569611436435e-23 +data8 0xCDCAE0B3C6F65A3A, 0x00003FB7 //A17 = 3.4045511783329546779285646369e-22 +data8 0x8F41909107C62DCC, 0x00003FBD //A16 = 1.5167830861896169812375771948e-20 +data8 0x82F0FCB8A4B8C0A3, 0x0000BFC1 //A15 = -2.2182328575376704666050112195e-19 +data8 0x92E992C58B7C3847, 0x0000BFC6 //A14 = -7.9641369349930600223371163611e-18 +LOCAL_OBJECT_END(erfl_data) + +LOCAL_OBJECT_START(_0p25_to_0p5_data) +// Polynomial coefficients for the erf(x), 1/4 <= |x| < 1/2 +data8 0xF083628E8F7CE71D, 0x0000BFF6 //A3 = -3.6699405305266733332335619531e-03 +data8 0xBF978749A434FE4E //A2H = -2.2977018973732214746075186440e-02 +data8 0xBC30B3FAFBC21107 //A2L = -9.0547407100537663337591537643e-19 +data8 0x3FCF5F0CDAF15313 //A1H = 2.4508820238647696654332719390e-01 +data8 0x3C1DFF29F5AD8117 //A1L = 4.0653155218104625249413579084e-19 +data8 0x3FD9DD0D2B721F38 //A0H = 4.0411690943482225790717166092e-01 +data8 0x3C874C71FEF1759E //A0L = 4.0416653425001310671815863946e-17 +data8 0xA621D99B8C12595E, 0x0000BFAB //A25 = -6.7100271986703749013021666304e-26 +data8 0xBD7BBACB439992E5, 0x00003FAE //A24 = 6.1225362452814749024566661525e-25 +data8 0xFF2FEFF03A98E410, 0x00003FB2 //A23 = 1.3192871864994282747963195183e-23 +data8 0xAE8180957ABE6FD5, 0x0000BFB6 //A22 = -1.4434787102181180110707433640e-22 +data8 0xAF0566617B453AA6, 0x0000BFBA //A21 = -2.3163848847252215762970075142e-21 +data8 0x8F33D3616B9B8257, 0x00003FBE //A20 = 3.0324297082969526400202995913e-20 +data8 0xD58AB73354438856, 0x00003FC1 //A19 = 3.6175397854863872232142412590e-19 +data8 0xD214550E2F3210DF, 0x0000BFC5 //A18 = -5.6942141660091333278722310354e-18 +data8 0xE2CA60C328F3BBF5, 0x0000BFC8 //A17 = -4.9177359011428870333915211291e-17 +data8 0x88D9BB274F9B3873, 0x00003FCD //A16 = 9.4959118337089189766177270051e-16 +data8 0xCA4A00AB538A2DB2, 0x00003FCF //A15 = 5.6146496538690657993449251855e-15 +data8 0x9CC8FFFBDDCF9853, 0x0000BFD4 //A14 = -1.3925319209173383944263942226e-13 +LOCAL_OBJECT_END(_0p25_to_0p5_data) + +LOCAL_OBJECT_START(_0p5_to_1_data) +// Polynomial coefficients for the erf(x), 1/2 <= |x| < 1 +data8 0xDB742C8FB372DBE0, 0x00003FF6 //A3 = 3.3485993187250381721535255963e-03 +data8 0xBFBEDC5644353C26 //A2H = -1.2054957547410136142751468924e-01 +data8 0xBC6D7215B023455F //A2L = -1.2770012232203569059818773287e-17 +data8 0x3FD492E42D78D2C4 //A1H = 3.2146553459760363047337250464e-01 +data8 0x3C83A163CAC22E05 //A1L = 3.4053365952542489137756724868e-17 +data8 0x3FE6C1C9759D0E5F //A0H = 7.1115563365351508462453011816e-01 +data8 0x3C8B1432F2CBC455 //A0L = 4.6974407716428899960674098333e-17 +data8 0x95A6B92162813FF8, 0x00003FC3 //A25 = 1.0140763985766801318711038400e-18 +data8 0xFE5EC3217F457B83, 0x0000BFC6 //A24 = -1.3789434273280972156856405853e-17 +data8 0x9B49651031B5310B, 0x0000BFC8 //A23 = -3.3672435142472427475576375889e-17 +data8 0xDBF73927E19B7C8D, 0x00003FCC //A22 = 7.6315938248752024965922341872e-16 +data8 0xF55CBA3052730592, 0x00003FCB //A21 = 4.2563559623888750271176552350e-16 +data8 0xA1DC9380DA82CFF6, 0x0000BFD2 //A20 = -3.5940500736023122607663701015e-14 +data8 0xAAD1AE1067F3D577, 0x00003FD2 //A19 = 3.7929451192558641569555227613e-14 +data8 0xCD1DB83F3B9D2090, 0x00003FD7 //A18 = 1.4574374961011929143375716362e-12 +data8 0x87235ACB5E8BB298, 0x0000BFD9 //A17 = -3.8408559294899660346666452560e-12 +data8 0xDA417B78FF9F46B4, 0x0000BFDC //A16 = -4.9625621225715971268115023451e-11 +data8 0xF075762685484436, 0x00003FDE //A15 = 2.1869603559309150844390066920e-10 +data8 0xB989FDB3795165C7, 0x00003FE1 //A14 = 1.3499740992928183247608593000e-09 +LOCAL_OBJECT_END(_0p5_to_1_data) + +LOCAL_OBJECT_START(_1_to_2_data) +// Polynomial coefficients for the erf(x), 1 <= |x| < 2.0 +data8 0x8E15015F5B55BEAC, 0x00003FFC //A3 = 1.3875200409423426678618977531e-01 +data8 0xBFC6D5A95D0A1B7E //A2H = -1.7839543383544403942764233761e-01 +data8 0xBC7499F704C80E02 //A2L = -1.7868888188464394090788198634e-17 +data8 0x3FBE723726B824A8 //A1H = 1.1893028922362935961842822508e-01 +data8 0x3C6B77F399C2AD27 //A1L = 1.1912589318015368492508652194e-17 +data8 0x3FEEEA5557137ADF //A0H = 9.6610514647531064991170524081e-01 +data8 0x3C963D0DDD0A762F //A0L = 7.7155271023949055047261953350e-17 +data8 0x8FAA405DAD409771, 0x0000BFDB //A25 = -1.6332824616946528652252813763e-11 +data8 0x941386F4697976D8, 0x0000BFDD //A24 = -6.7337295147729213955410252613e-11 +data8 0xBCBE75234530B404, 0x00003FDF //A23 = 3.4332329029092304943838374908e-10 +data8 0xF55E2CE71A00D040, 0x00003FDF //A22 = 4.4632156034175937694868068394e-10 +data8 0xA6CADFE489D2671F, 0x0000BFE3 //A21 = -4.8543000253822277507724949798e-09 +data8 0xA4C69F11FEAFB3A8, 0x00003FE2 //A20 = 2.3978044150868471771557059958e-09 +data8 0xD63441E3BED59703, 0x00003FE6 //A19 = 4.9873285553412397317802071288e-08 +data8 0xDFDAED9D3089D732, 0x0000BFE7 //A18 = -1.0424069510877052249228047044e-07 +data8 0xB47287FF165756A5, 0x0000BFE9 //A17 = -3.3610945128073834488448164164e-07 +data8 0xCDAF2DC0A79A9059, 0x00003FEB //A16 = 1.5324673941628851136481785187e-06 +data8 0x9FD6A7B2ECE8EDA9, 0x00003FEA //A15 = 5.9544479989469083598476592569e-07 +data8 0xEC6E63BB4507B585, 0x0000BFEE //A14 = -1.4092398243085031882423746824e-05 +LOCAL_OBJECT_END(_1_to_2_data) + +LOCAL_OBJECT_START(_2_to_3p25_data) +// Polynomial coefficients for the erf(x), 2 <= |x| < 3.25 +data8 0xCEDBA58E8EE6F055, 0x00003FF7 //A3 = 6.3128050215859026984338771121e-03 +data8 0xBF5B60D5E974CBBD //A2H = -1.6710366233609740427984435840e-03 +data8 0xBC0E11E2AEC18AF6 //A2L = -2.0376133202996259839305825162e-19 +data8 0x3F32408E9BA3327E //A1H = 2.7850610389349567379974059733e-04 +data8 0x3BE41010E4B3B224 //A1L = 3.3987633691879253781833531576e-20 +data8 0x3FEFFFD1AC4135F9 //A0H = 9.9997790950300136092465663751e-01 +data8 0x3C8EEAFA1E97EAE0 //A0L = 5.3633970564750967956196033852e-17 +data8 0xBF9C6F2C6D7263C1, 0x00003FF0 //A25 = 4.5683639377039166585098497471e-05 +data8 0xCB4167CC4798096D, 0x00003FF0 //A24 = 4.8459885139772945417160731273e-05 +data8 0xE1394FECFE972D32, 0x0000BFF2 //A23 = -2.1479022581129892562916533804e-04 +data8 0xC7F9E47581FC2A5F, 0x0000BFF2 //A22 = -1.9071211076537531370822343363e-04 +data8 0xDD612EDFAA41BEAE, 0x00003FF2 //A21 = 2.1112405918671957390188348542e-04 +data8 0x8C166AA4CB2AD8FD, 0x0000BFF4 //A20 = -5.3439165021555312536009227942e-04 +data8 0xEFBE33D9F62B68D4, 0x0000BFF2 //A19 = -2.2863672131516067770956697877e-04 +data8 0xCCB92F5D91562494, 0x00003FF5 //A18 = 1.5619154280865226092321881421e-03 +data8 0x80A5DBE71D4BA0E2, 0x0000BFF6 //A17 = -1.9630109664962540123775799179e-03 +data8 0xA0ADEB2D4C41347A, 0x0000BFF4 //A16 = -6.1294315248639348947483422457e-04 +data8 0xB1F5D4911B911665, 0x00003FF7 //A15 = 5.4309165882071876864550213817e-03 +data8 0xF2F3D8D21E8762E0, 0x0000BFF7 //A14 = -7.4143227286535936033409745884e-03 +LOCAL_OBJECT_END(_2_to_3p25_data) + +LOCAL_OBJECT_START(_4_to_6p53_data) +// Polynomial coefficients for the erf(x), 4 <= |x| < 6.53 +data8 0xDF3151BE8652827E, 0x00003FD5 //A3 = 3.9646979666953349095427642209e-13 +data8 0xBD1C4A9787DF888B //A2H = -2.5127788450714750484839908889e-14 +data8 0xB99B35483E4603FD //A2L = -3.3536613901268985626466020210e-31 +data8 0x3CD2DBF507F1A1F3 //A1H = 1.0468963266736687758710258897e-15 +data8 0x398A97B60913B4BD //A1L = 1.6388968267515149775818013207e-31 +data8 0x3FEFFFFFFFFFFFFF //A0H = 9.9999999999999988897769753748e-01 +data8 0x3C99CC25E658129E //A0L = 8.9502895736398715695745861054e-17 +data8 0xB367B21294713D39, 0x00003FFB //A25 = 8.7600127403270828432337605471e-02 +data8 0xCEE3A423ADEC0F4C, 0x00003FFD //A24 = 4.0408051429309221404807497715e-01 +data8 0xC389626CF2D727C0, 0x00003FFE //A23 = 7.6381507072332210580356159947e-01 +data8 0xD15A03E082D0A307, 0x00003FFE //A22 = 8.1777977210259904277239787430e-01 +data8 0x8FD3DA92675E8E00, 0x00003FFE //A21 = 5.6182638239203638864793584264e-01 +data8 0xFD375E6EE167AA58, 0x00003FFC //A20 = 2.4728152801285544751731937424e-01 +data8 0x89A9482FADE66AE1, 0x00003FFB //A19 = 6.7217410998398471333985773237e-02 +data8 0xC62E1F02606C04DD, 0x00003FF7 //A18 = 6.0479785358923404401184993359e-03 +data8 0xEE7BF2BE71CC531C, 0x0000BFF5 //A17 = -1.8194898432032114199803271708e-03 +data8 0x8084081981CDC79C, 0x0000BFF5 //A16 = -9.8049734947701208487713246099e-04 +data8 0x8975DFB834C118C3, 0x0000BFF0 //A15 = -3.2773123965143773578608926094e-05 +data8 0x965DA4A80008B7BC, 0x0000BFEE //A14 = -8.9624997201558650125662820562e-06 +LOCAL_OBJECT_END(_4_to_6p53_data) + +LOCAL_OBJECT_START(_3p25_to_4_data) +// Polynomial coefficients for the erf(x), 3.25 <= |x| < 4 +data8 0xB01D29846286CE08, 0x00003FEE //A3 = 1.0497207328743021499800978059e-05 +data8 0xBEC10B1488AEB234 //A2H = -2.0317175474986489113480084279e-06 +data8 0xBB7F19701B8B74F9 //A2L = -4.1159669348226960337518214996e-22 +data8 0x3E910B1488AEB234 //A1H = 2.5396469343733111391850105348e-07 +data8 0x3B4F1944906D5D60 //A1L = 5.1448487494628801547474934193e-23 +data8 0x3FEFFFFFF7B91176 //A0H = 9.9999998458274208523732795584e-01 +data8 0x3C70B2865615DB3F //A0L = 1.4482653192002495179309994964e-17 +data8 0xA818D085D56F3021, 0x00003FEC //A25 = 2.5048394770210505593609705765e-06 +data8 0xD9C5C509AAE5561F, 0x00003FEC //A24 = 3.2450636894654766492719395406e-06 +data8 0x9682D71C549EEB07, 0x0000BFED //A23 = -4.4855801709974050650263470866e-06 +data8 0xBC230E1EB6FBF8B9, 0x00003FEA //A22 = 7.0086469577174843181452303996e-07 +data8 0xE1432649FF29D4DE, 0x0000BFEA //A21 = -8.3916747195472308725504497231e-07 +data8 0xB40CEEBD2803D2F0, 0x0000BFEF //A20 = -2.1463694318102769992677291330e-05 +data8 0xEAAB57ABFFA003EB, 0x00003FEF //A19 = 2.7974761309213643228699449426e-05 +data8 0xFBFA4D0B893A5BFB, 0x0000BFEE //A18 = -1.5019043571612821858165073446e-05 +data8 0xBB6AA248EED3E364, 0x0000BFF0 //A17 = -4.4683584873907316507141131797e-05 +data8 0x86C1B3AE3E500ED9, 0x00003FF2 //A16 = 1.2851395412345761361068234880e-04 +data8 0xB60729445F0C37B5, 0x0000BFF2 //A15 = -1.7359540313300841352152461287e-04 +data8 0xCA389F9E707337B1, 0x00003FF1 //A14 = 9.6426575465763394281615740282e-05 +LOCAL_OBJECT_END(_3p25_to_4_data) + + +//////// "Tail" tables ////////// +LOCAL_OBJECT_START(_0p125_to_0p25_data_tail) +// Polynomial coefficients for the erf(x), 1/8 <= |x| < 1/4 +data8 0x93086CBD21ED3962, 0x00003FCA //A13 = 1.2753071968462837024755878679e-16 +data8 0x83CB5045A6D4B419, 0x00003FCF //A12 = 3.6580237062957773626379648530e-15 +data8 0x8FCDB723209690EB, 0x0000BFD3 //A11 = -6.3861616307180801527566117146e-14 +data8 0xCAA173F680B5D56B, 0x0000BFD7 //A10 = -1.4397775466324880354578008779e-12 +data8 0xF0CEA934AD6AC013, 0x00003FDB //A9 = 2.7376616955640415767655526857e-11 +data8 0x81C69F9D0B5AB8EE, 0x00003FE0 //A8 = 4.7212187567505249115688961488e-10 +data8 0xA8B590298C20A194, 0x0000BFE4 //A7 = -9.8201697105565925460801441797e-09 +data8 0x84F3DE72AC964615, 0x0000BFE8 //A6 = -1.2382176987480830706988411266e-07 +data8 0xC01A1398868CC4BD, 0x00003FEC //A5 = 2.8625408039722670291121341583e-06 +data8 0xCC43247F4410C54A, 0x00003FEF //A4 = 2.4349960762505993017186935493e-05 +LOCAL_OBJECT_END(_0p125_to_0p25_data_tail) + +LOCAL_OBJECT_START(_0p25_to_0p5_data_tail) +// Polynomial coefficients for the erf(x), 1/4 <= |x| < 1/2 +data8 0x8CEAC59AF361B78A, 0x0000BFD6 //A13 = -5.0063802958258679384986669123e-13 +data8 0x9BC67404F348C0CE, 0x00003FDB //A12 = 1.7709590771868743572061278273e-11 +data8 0xF4B5D0348AFAAC7A, 0x00003FDB //A11 = 2.7820329729584630464848160970e-11 +data8 0x83AB447FF619DA4A, 0x0000BFE2 //A10 = -1.9160363295631539615395477207e-09 +data8 0x82115AB487202E7B, 0x00003FE0 //A9 = 4.7318386460142606822119637959e-10 +data8 0xB84D5B0AE17054AA, 0x00003FE8 //A8 = 1.7164477188916895004843908951e-07 +data8 0xB2E085C1C4AA06E5, 0x0000BFE9 //A7 = -3.3318445266863554512523957574e-07 +data8 0xCD3CA2E6C3971666, 0x0000BFEE //A6 = -1.2233070175554502732980949519e-05 +data8 0xBA445C53F8DD40E6, 0x00003FF0 //A5 = 4.4409521535330413551781808621e-05 +data8 0xAA94D5E68033B764, 0x00003FF4 //A4 = 6.5071635765452563856926608000e-04 +LOCAL_OBJECT_END(_0p25_to_0p5_data_tail) + +LOCAL_OBJECT_START(_0p5_to_1_data_tail) +// Polynomial coefficients for the erf(x), 1/2 <= |x| < 1 +data8 0x9ED99EDF111CB785, 0x0000BFE4 //A13 = -9.2462916180079278241704711522e-09 +data8 0xDEAF7539AE2FB062, 0x0000BFE5 //A12 = -2.5923990465973151101298441139e-08 +data8 0xA392D5E5CC9DB1A7, 0x00003FE9 //A11 = 3.0467952847327075747032372101e-07 +data8 0xC311A7619B96CA1A, 0x00003FE8 //A10 = 1.8167212632079596881709988649e-07 +data8 0x82082E6B6A93F116, 0x0000BFEE //A9 = -7.7505086843257228386931766018e-06 +data8 0x96D9997CF326A36D, 0x00003FEE //A8 = 8.9913605625817479172071008270e-06 +data8 0x97057D85DCB0ED99, 0x00003FF2 //A7 = 1.4402527482741758767786898553e-04 +data8 0xDC23BCB3599C0490, 0x0000BFF3 //A6 = -4.1988296144950673955519083419e-04 +data8 0xDA150C4867208A81, 0x0000BFF5 //A5 = -1.6638352864915033417887831090e-03 +data8 0x9A4DAF550A2CC29A, 0x00003FF8 //A4 = 9.4179355839141698591817907680e-03 +LOCAL_OBJECT_END(_0p5_to_1_data_tail) + +LOCAL_OBJECT_START(_1_to_2_data_tail) +// Polynomial coefficients for the erf(x), 1 <= |x| < 2.0 +data8 0x969EAC5C7B46CAB9, 0x00003FEF //A13 = 1.7955281439310148162059582795e-05 +data8 0xA2ED832912E9FCD9, 0x00003FF1 //A12 = 7.7690020847111408916570845775e-05 +data8 0x85677C39C48E43E7, 0x0000BFF3 //A11 = -2.5444839340796031538582511806e-04 +data8 0xC2DAFA91683DAAE4, 0x0000BFF1 //A10 = -9.2914288456063075386925076097e-05 +data8 0xE01C061CBC6A2825, 0x00003FF5 //A9 = 1.7098195515864039518892834211e-03 +data8 0x9AD7271CAFD01C78, 0x0000BFF6 //A8 = -2.3626776207372761518718893636e-03 +data8 0x9B6B9D30EDD5F4FF, 0x0000BFF7 //A7 = -4.7430532011804570628999212874e-03 +data8 0x9E51EB9623F1D446, 0x00003FF9 //A6 = 1.9326171998839772791190405201e-02 +data8 0xF391B935C12546DE, 0x0000BFF8 //A5 = -1.4866286152953671441682166195e-02 +data8 0xB6AD4AE850DBF526, 0x0000BFFA //A4 = -4.4598858458861014323191919669e-02 +LOCAL_OBJECT_END(_1_to_2_data_tail) + +LOCAL_OBJECT_START(_2_to_3p25_data_tail) +// Polynomial coefficients for the erf(x), 2 <= |x| < 3.25 +data8 0x847C24DAC7C7558B, 0x00003FF5 //A13 = 1.0107798565424606512130100541e-03 +data8 0xCB6340EAF02C3DF8, 0x00003FF8 //A12 = 1.2413800617425931997420375435e-02 +data8 0xB5163D252DBBC107, 0x0000BFF9 //A11 = -2.2105330871844825370020459523e-02 +data8 0x82FF9C0B68E331E4, 0x00003FF9 //A10 = 1.5991024756001692140897408128e-02 +data8 0xE9519E4A49752E04, 0x00003FF7 //A9 = 7.1203253651891723548763348088e-03 +data8 0x8D52F11B7AE846D9, 0x0000BFFA //A8 = -3.4502927613795425888684181521e-02 +data8 0xCCC5A3E32BC6FA30, 0x00003FFA //A7 = 4.9993171868423886228679106871e-02 +data8 0xC1791AD8284A1919, 0x0000BFFA //A6 = -4.7234635220336795411997070641e-02 +data8 0x853DAAA35A8A3C18, 0x00003FFA //A5 = 3.2529512934760303976755163452e-02 +data8 0x88E42D8F47FAB60E, 0x0000BFF9 //A4 = -1.6710366233609742619461063050e-02 +LOCAL_OBJECT_END(_2_to_3p25_data_tail) + +LOCAL_OBJECT_START(_4_to_6p53_data_tail) +// Polynomial coefficients for the erf(x), 4 <= |x| < 6.53 +data8 0xD8235ABF08B8A6D1, 0x00003FEE //A13 = 1.2882834877224764938429832586e-05 +data8 0xAEDF44F9C77844C2, 0x0000BFEC //A12 = -2.6057980393716019511497492890e-06 +data8 0xCCD5490956A4FCFD, 0x00003FEA //A11 = 7.6306293047300300284923464089e-07 +data8 0xF71AF0126EE26AEA, 0x0000BFE8 //A10 = -2.3013467500738417953513680935e-07 +data8 0xE4CE68089858AC20, 0x00003FE6 //A9 = 5.3273112263151109935867439775e-08 +data8 0xBD15106FBBAEE593, 0x0000BFE4 //A8 = -1.1006037358336556244645388790e-08 +data8 0x8BBF9A5769B6E480, 0x00003FE2 //A7 = 2.0336075804332107927300019116e-09 +data8 0xB049D845D105E302, 0x0000BFDF //A6 = -3.2066683399502826067820249320e-10 +data8 0xBAC69B3F0DFE5483, 0x00003FDC //A5 = 4.2467901578369360007795282687e-11 +data8 0xA29C398F83F8A0D1, 0x0000BFD9 //A4 = -4.6216613698438694005327544047e-12 +LOCAL_OBJECT_END(_4_to_6p53_data_tail) + +LOCAL_OBJECT_START(_3p25_to_4_data_tail) +// Polynomial coefficients for the erf(x), 3.25 <= |x| < 4 +data8 0x95BE1BEAD738160F, 0x00003FF2 //A13 = 1.4280568455209843005829620687e-04 +data8 0x8108C8FFAC0F0B21, 0x0000BFF4 //A12 = -4.9222685622046459346377033307e-04 +data8 0xD72A7FAEE7832BBE, 0x00003FF4 //A11 = 8.2079319302109644436194651098e-04 +data8 0x823AB4281CA7BBE7, 0x0000BFF5 //A10 = -9.9357079675971109178261577703e-04 +data8 0xFA1232D476048D11, 0x00003FF4 //A9 = 9.5394549599882496825916138915e-04 +data8 0xC463D7AF88025FB2, 0x0000BFF4 //A8 = -7.4916843357898101689031755368e-04 +data8 0xFEBE32B6B379D072, 0x00003FF3 //A7 = 4.8588363901002111193445057206e-04 +data8 0x882829BB68409BF3, 0x0000BFF3 //A6 = -2.5969865184916169002074135516e-04 +data8 0xED2F886E29DAAB09, 0x00003FF1 //A5 = 1.1309894347742479284610149994e-04 +data8 0xA4C07129436555B2, 0x0000BFF0 //A4 = -3.9279872584973887163830479579e-05 +LOCAL_OBJECT_END(_3p25_to_4_data_tail) + + +LOCAL_OBJECT_START(_0_to_1o8_data) +// Polynomial coefficients for the erf(x), 0.0 <= |x| < 0.125 +data8 0x3FF20DD750429B6D, 0x3C71AE3A8DDFFEDE //A1H, A1L +data8 0xF8B0DACE42525CC2, 0x0000BFEE //A15 +data8 0xFCD02E1BF0EC2C37, 0x00003FF1 //A13 +data8 0xE016D968FE473B5E, 0x0000BFF4 //A11 +data8 0xAB2DE68711BF5A79, 0x00003FF7 //A9 +data8 0xDC16718944518309, 0x0000BFF9 //A7 +data8 0xE71790D0215F0C8F, 0x00003FFB //A5 +data8 0xC093A3581BCF3612, 0x0000BFFD //A3 +LOCAL_OBJECT_END(_0_to_1o8_data) + + +LOCAL_OBJECT_START(_denorm_data) +data8 0x3FF20DD750429B6D //A1H = 1.1283791670955125585606992900e+00 +data8 0x3C71AE3A914FED80 //A1L = 1.5335459613165880745599768129e-17 +LOCAL_OBJECT_END(_denorm_data) + + +.section .text +GLOBAL_LIBM_ENTRY(erfl) + +{ .mfi + alloc r32 = ar.pfs, 0, 21, 0, 0 + fmerge.se fArgAbsNorm = f1, f8 // normalized x (1.0 <= x < 2.0) + addl rSignBit = 0x20000, r0 // Set sign bit for exponent +} +{ .mlx + addl rDataPtr = @ltoff(erfl_data), gp // Get common data ptr + movl r1p5 = 0x3FF8000000000000 // 1.5 in dbl repres. +};; + +{ .mfi + getf.exp rArgExp = f8 // Get arg exponent + fclass.m p6,p0 = f8, 0xEF // Filter 0, denormals and specials + // 0xEF = @qnan|@snan|@pos|@neg|@zero|@unorm|@inf + addl rBias = 0xfffc, r0 // Value to subtract from exp + // to get actual interval number +} +{ .mfi + ld8 rDataPtr = [rDataPtr] // Get real common data pointer + fma.s1 fArgSqr = f8, f8, f0 // x^2 (for [0;1/8] path) + addl r2to4 = 0x10000, r0 // unbiased exponent + // for [2;4] binary interval +};; + +{ .mfi + getf.sig rArgSig = f8 // Get arg significand + fcmp.lt.s1 p15, p14 = f8, f0 // Is arg negative/positive? + addl rSaturation = 0xd0e, r0 // First 12 bits of + // saturation value signif. +} +{ .mfi + setf.d f1p5 = r1p5 // 1.5 construction + fma.s1 f2p0 = f1,f1,f1 // 2.0 construction + addl r3p25Sign = 0xd00, r0 // First 12 bits of + // 3.25 value signif. +};; + +{ .mfi + addl rTailDataPtr = 0x700, rDataPtr // Pointer to "tail" data + nop.f 0 + andcm rArgExp = rArgExp, rSignBit // Remove sign of exp +} +{ .mfb + addl rTiny = 0xf000, r0 // Tiny value for saturation path + nop.f 0 +(p6) br.cond.spnt erfl_spec // Branch to zero, denorm & specs +};; + +{ .mfi + sub rInterval = rArgExp, rBias // Get actual interval number + nop.f 0 + shr.u rArgSig = rArgSig, 52 // Leave only 12 bits of sign. +} +{ .mfi + adds rShiftedDataPtr = 0x10, rDataPtr // Second ptr to data + nop.f 0 + cmp.eq p8, p10 = r2to4, rArgExp // If exp is in 2to4 interval? +};; + +{ .mfi +(p8) cmp.le p8, p10 = r3p25Sign, rArgSig // If sign. is greater + // than 1.25? (means arg is in [3.25;4] interval) + nop.f 0 + shl rOffset = rInterval, 8 // Make offset from + // interval number +} +{ .mfi + cmp.gt p9, p0 = 0x0, rInterval // If interval is less than 0 + // (means arg is in [0; 1/8]) + nop.f 0 + cmp.eq p7, p0 = 0x5, rInterval // If arg is in [4:8] interv.? +};; + +{ .mfi +(p8) adds rOffset = 0x200, rOffset // Add additional offset + // if arg is in [3.25;4] (another data set) + fma.s1 fArgCube = fArgSqr, f8, f0 // x^3 (for [0;1/8] path) + shl rTailOffset = rInterval, 7 // Make offset to "tail" data + // from interval number +} +{ .mib + setf.exp fTiny = rTiny // Construct "tiny" value + // for saturation path + cmp.ltu p11, p0 = 0x5, rInterval // if arg > 8 +(p9) br.cond.spnt _0_to_1o8 +};; + +{ .mfi + add rAddr1 = rDataPtr, rOffset // Get address for + // interval data + nop.f 0 + shl rTailAddOffset = rInterval, 5 // Offset to interval + // "tail" data +} +{ .mib + add rAddr2 = rShiftedDataPtr, rOffset // Get second + // address for interval data +(p7) cmp.leu p11, p0 = rSaturation, rArgSig // if arg is + // in [6.53;8] interval +(p11) br.cond.spnt _saturation // Branch to Saturation path +};; + +{ .mmi + ldfe fA3 = [rAddr1], 0x90 // Load A3 + ldfpd fA2H, fA2L = [rAddr2], 16 // Load A2High, A2Low + add rTailOffset = rTailOffset, rTailAddOffset // "Tail" offset +};; + +{ .mmi + ldfe fA20 = [rAddr1], 16 // Load A20 + ldfpd fA1H, fA1L = [rAddr2], 16 // Load A1High, A1Low +(p8) adds rTailOffset = 0x140, rTailOffset // Additional offset + // for [3.24;4] interval +};; + +{ .mmi + ldfe fA19 = [rAddr1], 16 // Load A19 + ldfpd fA0H, fA0L = [rAddr2], 16 // Load A0High, A0Low + add rTailAddr1 = rTailDataPtr, rTailOffset // First tail + // data address +};; + +.pred.rel "mutex",p8,p10 +{ .mfi + ldfe fA18 = [rAddr1], 16 // Load A18 +(p8) fms.s1 fArgAbsNorm = fArgAbsNorm, f1, f2p0 // Add 2.0 + // to normalized arg (for [3.24;4] interval) + adds rTailAddr2 = 0x10, rTailAddr1 // First tail + // data address +} +{ .mfi + ldfe fA25 = [rAddr2], 16 // Load A25 +(p10) fms.s1 fArgAbsNorm = fArgAbsNorm, f1, f1p5 // Add 1.5 + // to normalized arg + nop.i 0 +};; + +{ .mmi + ldfe fA17 = [rAddr1], 16 // Load A17 + ldfe fA24 = [rAddr2], 16 // Load A24 + nop.i 0 +};; + +{ .mmi + ldfe fA16 = [rAddr1], 16 // Load A16 + ldfe fA23 = [rAddr2], 16 // Load A23 + nop.i 0 +};; + +{ .mmi + ldfe fA15 = [rAddr1], 16 // Load A15 + ldfe fA22 = [rAddr2], 16 // Load A22 + nop.i 0 +};; + +{ .mmi + ldfe fA14 = [rAddr1], 16 // Load A14 + ldfe fA21 = [rAddr2], 16 // Load A21 + nop.i 0 +};; + +{ .mfi + ldfe fA13 = [rTailAddr1], 32 // Load A13 + fms.s1 fArgAbsNorm2 = fArgAbsNorm, fArgAbsNorm, f0 // x^2 + nop.i 0 +} +{ .mfi + ldfe fA12 = [rTailAddr2], 32 // Load A12 + nop.f 0 + nop.i 0 +};; + +{ .mfi + ldfe fA11 = [rTailAddr1], 32 // Load A11 + fma.s1 fRes3H = fA3, fArgAbsNorm, fA2H // (A3*x+A2)*x^2 + nop.i 0 +} +{ .mfi + ldfe fA10 = [rTailAddr2], 32 // Load A10 + fma.s1 fTH = fA3, fArgAbsNorm, f0 // (A3*x+A2)*x^2 + nop.i 0 +};; + +{ .mfi + ldfe fA9 = [rTailAddr1], 32 // Load A9 + fma.s1 fTT2 = fA1L, fArgAbsNorm, f0 // A1*x+A0 + nop.i 0 +} +{ .mfi + ldfe fA8 = [rTailAddr2], 32 // Load A8 + nop.f 0 + nop.i 0 +};; + +{ .mmi + ldfe fA7 = [rTailAddr1], 32 // Load A7 + ldfe fA6 = [rTailAddr2], 32 // Load A6 + nop.i 0 +};; + +{ .mmi + ldfe fA5 = [rTailAddr1], 32 // Load A5 + ldfe fA4 = [rTailAddr2], 32 // Load A4 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 fArgAbsNorm2L = fArgAbsNorm, fArgAbsNorm, fArgAbsNorm2 + // Low part of x^2 (delta) + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 fArgAbsNorm4 = fArgAbsNorm2, fArgAbsNorm2, f0 // x^4 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 fRes3L = fA2H, f1, fRes3H // // (A3*x+A2)*x^2 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 fArgAbsNorm3 = fArgAbsNorm2, fArgAbsNorm, f0 // x^3 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fTH2 = fA1H, fArgAbsNorm, fTT2 // A1*x+A0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fA23 = fA24, fArgAbsNorm, fA23 // Polynomial tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA21 = fA22, fArgAbsNorm, fA21 // Polynomial tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fA12 = fA13, fArgAbsNorm, fA12 // Polynomial tail + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fRes3L = fRes3L, f1, fTH // (A3*x+A2)*x^2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA19 = fA20, fArgAbsNorm, fA19 // Polynomial tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fRes1H = fTH2, f1, fA0H // A1*x+A0 + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 fTL2 = fA1H, fArgAbsNorm, fTH2 // A1*x+A0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fA8 = fA9, fArgAbsNorm, fA8 // Polynomial tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA10 = fA11, fArgAbsNorm, fA10 // Polynomial tail + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 fA15 = fA16, fArgAbsNorm, fA15 // Polynomial tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA17 = fA18, fArgAbsNorm, fA17 // Polynomial tail + nop.i 0 +};; +{ .mfi + nop.m 0 + fms.s1 fArgAbsNorm11 = fArgAbsNorm4, fArgAbsNorm4, f0 // x^8 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA4 = fA5, fArgAbsNorm, fA4 // Polynomial tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fRes3L = fRes3L, f1, fA2L // (A3*x+A2)*x^2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA6 = fA7, fArgAbsNorm, fA6 // Polynomial tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fTL2 = fTL2, f1, fTT2 // A1*x+A0 + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 fRes1L = fA0H, f1, fRes1H // A1*x+A0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fA23 = fA25, fArgAbsNorm2, fA23 // Polynomial tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA12 = fA14, fArgAbsNorm2, fA12 // Polynomial tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fA19 = fA21, fArgAbsNorm2, fA19 // Polynomial tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA8 = fA10, fArgAbsNorm2, fA8 // Polynomial tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fA15 = fA17, fArgAbsNorm2, fA15 // Polynomial tail + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 fArgAbsNorm11 = fArgAbsNorm11, fArgAbsNorm3, f0 // x^11 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fTT = fRes3L, fArgAbsNorm2, f0 // (A3*x+A2)*x^2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA4 = fA6, fArgAbsNorm2, fA4 // Polynomial tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fRes1L = fRes1L, f1, fTH2 // A1*x+A0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fA19 = fA23, fArgAbsNorm4, fA19 // Polynomial tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA8 = fA12, fArgAbsNorm4, fA8 // Polynomial tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fTT = fRes3H, fArgAbsNorm2L, fTT // (A3*x+A2)*x^2 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fRes1L = fRes1L, f1, fTL2 // A1*x+A0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fA15 = fA19, fArgAbsNorm4, fA15 // Polynomial tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA4 = fA8, fArgAbsNorm4, fA4 // Polynomial tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fRes2H = fRes3H, fArgAbsNorm2, fTT // (A3*x+A2)*x^2 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fRes1L = fRes1L, f1, fA0L // A1*x+A0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fRes4 = fA15, fArgAbsNorm11, fA4 // Result of + // polynomial tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 fRes2L = fRes3H, fArgAbsNorm2, fRes2H // (A3*x+A2)*x^2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fResH = fRes2H, f1, fRes1H // High result + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fRes1L = fRes4, fArgAbsNorm4, fRes1L // A1*x+A0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fRes2L = fRes2L, f1, fTT // (A3*x+A2)*x^2 + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 fResL = fRes1H, f1, fResH // Low result + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fRes1L = fRes1L, f1, fRes2L // Low result + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fResL = fResL, f1, fRes2H // Low result + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p15) fneg fResH = fResH // Invert high result if arg is neg. + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fResL = fResL, f1, fRes1L // Low result + nop.i 0 +};; + +.pred.rel "mutex",p14,p15 +{ .mfi + nop.m 0 +(p14) fma.s0 f8 = fResH, f1, fResL // Add high and low results + nop.i 0 +} +{ .mfb + nop.m 0 +(p15) fms.s0 f8 = fResH, f1, fResL // Add high and low results + br.ret.sptk b0 // Main path return +};; + +// satiration path //////////////////////////////////////////////////////////// +_saturation: + +.pred.rel "mutex",p14,p15 +{ .mfi + nop.m 0 +(p14) fms.s0 f8 = f1, f1, fTiny // Saturation result r = 1-tiny + nop.i 0 +};; +{ .mfb + nop.m 0 +(p15) fnma.s0 f8 = f1, f1, fTiny // Saturation result r = tiny-1 + br.ret.sptk b0 // Saturation path return +};; + + +// 0, denormals and special IEEE numbers path ///////////////////////////////// +erfl_spec: + +{ .mfi + addl rDataPtr = 0xBE0, rDataPtr // Ptr to denormals coeffs + fclass.m p6,p0 = f8, 0x23 // To filter infinities + // 0x23 = @pos|@neg|@inf + nop.i 0 +};; + +{ .mfi + ldfpd fA1H, fA1L = [rDataPtr] // Load denormals coeffs A1H, A1L + fclass.m p7,p0 = f8, 0xC7 // To filter NaNs & Zeros + // 0xC7 = @pos|@neg|@zero|@qnan|@snan + nop.i 0 +};; + +{ .mfb + nop.m 0 +(p6) fmerge.s f8 = f8, f1 // +/-1 for INF args +(p6) br.ret.spnt b0 // exit for x = INF +};; + +{ .mfb + nop.m 0 +(p7) fma.s0 f8 = f8, f1, f8 // +/-0 for 0 args + // and NaNs for NaNs +(p7) br.ret.spnt b0 // exit for x = NaN or +/-0 +};; + +{ .mfi + nop.m 0 + fnorm.s0 f8 = f8 // Normalize arg + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 fRes1H = f8, fA1H, f0 // HighRes + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 fRes1L = f8, fA1L, f0 // LowRes + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 fRes1Hd = f8, fA1H, fRes1H // HighRes delta + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fRes = fRes1L, f1, fRes1Hd // LowRes+HighRes delta + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fRes = f8, f8, fRes // r=x^2+r + nop.i 0 +};; + +{ .mfb + nop.m 0 + fma.s0 f8 = fRes, f1, fRes1H // res = r+ResHigh + br.ret.sptk b0 // 0, denormals, specials return +};; + + +// 0 < |x| < 1/8 path ///////////////////////////////////////////////////////// +_0_to_1o8: + +{ .mmi + adds rAddr1 = 0xB60, rDataPtr // Ptr 1 to coeffs + adds rAddr2 = 0xB80, rDataPtr // Ptr 2 to coeffs + nop.i 0 +};; + +{ .mmi + ldfpd fA1H, fA1L = [rAddr1], 16 // Load A1High, A1Low + ldfe fA13 = [rAddr2], 16 // Load A13 + nop.i 0 +};; + +{ .mmi + ldfe fA15 = [rAddr1], 48 // Load A15 + ldfe fA11 = [rAddr2], 32 // Load A11 + nop.i 0 +};; + +{ .mmi + ldfe fA9 = [rAddr1], 32 // Load A9 + ldfe fA7 = [rAddr2], 32 // Load A7 + nop.i 0 +};; + +{ .mmi + ldfe fA5 = [rAddr1] // Load A5 + ldfe fA3 = [rAddr2] // Load A3 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 fRes1H = f8, fA1H, f0 // x*(A1H+A1L) + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 fRes1L = f8, fA1L, f0 // x*(A1H+A1L) + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fA11 = fA13, fArgSqr, fA11 // Polynomial tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fArgFour = fArgSqr, fArgSqr, f0 // a^4 + nop.i 0 +};; + + +{ .mfi + nop.m 0 + fma.s1 fA3 = fA5, fArgSqr, fA3 // Polynomial tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA7 = fA9, fArgSqr, fA7 // Polynomial tail + nop.i 0 +};; + + +{ .mfi + nop.m 0 + fms.s1 fRes1Hd = f8, fA1H, fRes1H // x*(A1H+A1L) delta + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fA11 = fA15, fArgFour, fA11 // Polynomial tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fA3 = fA7, fArgFour, fA3 // Polynomial tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fArgEight = fArgFour, fArgFour, f0 // a^8 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 f8 = fRes1L, f1, fRes1Hd // x*(A1H+A1L) + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fRes = fA11, fArgEight, fA3 //Polynomial tail result + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 f8 = fRes, fArgCube, f8 // (Polynomial tail)*x^3 + nop.i 0 +};; + +{ .mfb + nop.m 0 + fma.s0 f8 = f8, f1, fRes1H // (Polynomial tail)*x^3 + + // + x*(A1H+A1L) + br.ret.sptk b0 // [0;1/8] interval return +};; + + +GLOBAL_LIBM_END(erfl) + + + diff --git a/sysdeps/ia64/fpu/s_expm1.S b/sysdeps/ia64/fpu/s_expm1.S new file mode 100644 index 0000000000..09a22bbbdd --- /dev/null +++ b/sysdeps/ia64/fpu/s_expm1.S @@ -0,0 +1,886 @@ +.file "exp_m1.s" + + +// Copyright (c) 2000 - 2005, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial Version +// 04/04/00 Unwind support added +// 08/15/00 Bundle added after call to __libm_error_support to properly +// set [the previously overwritten] GR_Parameter_RESULT. +// 07/07/01 Improved speed of all paths +// 05/20/02 Cleaned up namespace and sf0 syntax +// 11/20/02 Improved speed, algorithm based on exp +// 03/31/05 Reformatted delimiters between data tables + +// API +//============================================================== +// double expm1(double) + +// Overview of operation +//============================================================== +// 1. Inputs of Nan, Inf, Zero, NatVal handled with special paths +// +// 2. |x| < 2^-60 +// Result = x, computed by x + x*x to handle appropriate flags and rounding +// +// 3. 2^-60 <= |x| < 2^-2 +// Result determined by 13th order Taylor series polynomial +// expm1f(x) = x + Q2*x^2 + ... + Q13*x^13 +// +// 4. x < -48.0 +// Here we know result is essentially -1 + eps, where eps only affects +// rounded result. Set I. +// +// 5. x >= 709.7827 +// Result overflows. Set I, O, and call error support +// +// 6. 2^-2 <= x < 709.7827 or -48.0 <= x < -2^-2 +// This is the main path. The algorithm is described below: + +// Take the input x. w is "how many log2/128 in x?" +// w = x * 128/log2 +// n = int(w) +// x = n log2/128 + r + delta + +// n = 128M + index_1 + 2^4 index_2 +// x = M log2 + (log2/128) index_1 + (log2/8) index_2 + r + delta + +// exp(x) = 2^M 2^(index_1/128) 2^(index_2/8) exp(r) exp(delta) +// Construct 2^M +// Get 2^(index_1/128) from table_1; +// Get 2^(index_2/8) from table_2; +// Calculate exp(r) by series by 5th order polynomial +// r = x - n (log2/128)_high +// delta = - n (log2/128)_low +// Calculate exp(delta) as 1 + delta + + +// Special values +//============================================================== +// expm1(+0) = +0.0 +// expm1(-0) = -0.0 + +// expm1(+qnan) = +qnan +// expm1(-qnan) = -qnan +// expm1(+snan) = +qnan +// expm1(-snan) = -qnan + +// expm1(-inf) = -1.0 +// expm1(+inf) = +inf + +// Overflow and Underflow +//======================= +// expm1(x) = largest double normal when +// x = 709.7827 = 40862e42fefa39ef +// +// Underflow is handled as described in case 2 above. + + +// Registers used +//============================================================== +// Floating Point registers used: +// f8, input +// f9 -> f15, f32 -> f75 + +// General registers used: +// r14 -> r40 + +// Predicate registers used: +// p6 -> p15 + +// Assembly macros +//============================================================== + +rRshf = r14 +rAD_TB1 = r15 +rAD_T1 = r15 +rAD_TB2 = r16 +rAD_T2 = r16 +rAD_Ln2_lo = r17 +rAD_P = r17 + +rN = r18 +rIndex_1 = r19 +rIndex_2_16 = r20 + +rM = r21 +rBiased_M = r21 +rIndex_1_16 = r22 +rSignexp_x = r23 +rExp_x = r24 +rSig_inv_ln2 = r25 + +rAD_Q1 = r26 +rAD_Q2 = r27 +rTmp = r27 +rExp_bias = r28 +rExp_mask = r29 +rRshf_2to56 = r30 + +rGt_ln = r31 +rExp_2tom56 = r31 + + +GR_SAVE_B0 = r33 +GR_SAVE_PFS = r34 +GR_SAVE_GP = r35 +GR_SAVE_SP = r36 + +GR_Parameter_X = r37 +GR_Parameter_Y = r38 +GR_Parameter_RESULT = r39 +GR_Parameter_TAG = r40 + + +FR_X = f10 +FR_Y = f1 +FR_RESULT = f8 + +fRSHF_2TO56 = f6 +fINV_LN2_2TO63 = f7 +fW_2TO56_RSH = f9 +f2TOM56 = f11 +fP5 = f12 +fP54 = f50 +fP5432 = f50 +fP4 = f13 +fP3 = f14 +fP32 = f14 +fP2 = f15 + +fLn2_by_128_hi = f33 +fLn2_by_128_lo = f34 + +fRSHF = f35 +fNfloat = f36 +fW = f37 +fR = f38 +fF = f39 + +fRsq = f40 +fRcube = f41 + +f2M = f42 +fS1 = f43 +fT1 = f44 + +fMIN_DBL_OFLOW_ARG = f45 +fMAX_DBL_MINUS_1_ARG = f46 +fMAX_DBL_NORM_ARG = f47 +fP_lo = f51 +fP_hi = f52 +fP = f53 +fS = f54 + +fNormX = f56 + +fWre_urm_f8 = f57 + +fGt_pln = f58 +fTmp = f58 + +fS2 = f59 +fT2 = f60 +fSm1 = f61 + +fXsq = f62 +fX6 = f63 +fX4 = f63 +fQ7 = f64 +fQ76 = f64 +fQ7654 = f64 +fQ765432 = f64 +fQ6 = f65 +fQ5 = f66 +fQ54 = f66 +fQ4 = f67 +fQ3 = f68 +fQ32 = f68 +fQ2 = f69 +fQD = f70 +fQDC = f70 +fQDCBA = f70 +fQDCBA98 = f70 +fQDCBA98765432 = f70 +fQC = f71 +fQB = f72 +fQBA = f72 +fQA = f73 +fQ9 = f74 +fQ98 = f74 +fQ8 = f75 + +// Data tables +//============================================================== + +RODATA +.align 16 + +// ************* DO NOT CHANGE ORDER OF THESE TABLES ******************** + +// double-extended 1/ln(2) +// 3fff b8aa 3b29 5c17 f0bb be87fed0691d3e88 +// 3fff b8aa 3b29 5c17 f0bc +// For speed the significand will be loaded directly with a movl and setf.sig +// and the exponent will be bias+63 instead of bias+0. Thus subsequent +// computations need to scale appropriately. +// The constant 128/ln(2) is needed for the computation of w. This is also +// obtained by scaling the computations. +// +// Two shifting constants are loaded directly with movl and setf.d. +// 1. fRSHF_2TO56 = 1.1000..00 * 2^(63-7) +// This constant is added to x*1/ln2 to shift the integer part of +// x*128/ln2 into the rightmost bits of the significand. +// The result of this fma is fW_2TO56_RSH. +// 2. fRSHF = 1.1000..00 * 2^(63) +// This constant is subtracted from fW_2TO56_RSH * 2^(-56) to give +// the integer part of w, n, as a floating-point number. +// The result of this fms is fNfloat. + + +LOCAL_OBJECT_START(exp_Table_1) +data8 0x40862e42fefa39f0 // smallest dbl overflow arg +data8 0xc048000000000000 // approx largest arg for minus one result +data8 0x40862e42fefa39ef // largest dbl arg to give normal dbl result +data8 0x0 // pad +data8 0xb17217f7d1cf79ab , 0x00003ff7 // ln2/128 hi +data8 0xc9e3b39803f2f6af , 0x00003fb7 // ln2/128 lo +// +// Table 1 is 2^(index_1/128) where +// index_1 goes from 0 to 15 +// +data8 0x8000000000000000 , 0x00003FFF +data8 0x80B1ED4FD999AB6C , 0x00003FFF +data8 0x8164D1F3BC030773 , 0x00003FFF +data8 0x8218AF4373FC25EC , 0x00003FFF +data8 0x82CD8698AC2BA1D7 , 0x00003FFF +data8 0x8383594EEFB6EE37 , 0x00003FFF +data8 0x843A28C3ACDE4046 , 0x00003FFF +data8 0x84F1F656379C1A29 , 0x00003FFF +data8 0x85AAC367CC487B15 , 0x00003FFF +data8 0x8664915B923FBA04 , 0x00003FFF +data8 0x871F61969E8D1010 , 0x00003FFF +data8 0x87DB357FF698D792 , 0x00003FFF +data8 0x88980E8092DA8527 , 0x00003FFF +data8 0x8955EE03618E5FDD , 0x00003FFF +data8 0x8A14D575496EFD9A , 0x00003FFF +data8 0x8AD4C6452C728924 , 0x00003FFF +LOCAL_OBJECT_END(exp_Table_1) + +// Table 2 is 2^(index_1/8) where +// index_2 goes from 0 to 7 +LOCAL_OBJECT_START(exp_Table_2) +data8 0x8000000000000000 , 0x00003FFF +data8 0x8B95C1E3EA8BD6E7 , 0x00003FFF +data8 0x9837F0518DB8A96F , 0x00003FFF +data8 0xA5FED6A9B15138EA , 0x00003FFF +data8 0xB504F333F9DE6484 , 0x00003FFF +data8 0xC5672A115506DADD , 0x00003FFF +data8 0xD744FCCAD69D6AF4 , 0x00003FFF +data8 0xEAC0C6E7DD24392F , 0x00003FFF +LOCAL_OBJECT_END(exp_Table_2) + + +LOCAL_OBJECT_START(exp_p_table) +data8 0x3f8111116da21757 //P5 +data8 0x3fa55555d787761c //P4 +data8 0x3fc5555555555414 //P3 +data8 0x3fdffffffffffd6a //P2 +LOCAL_OBJECT_END(exp_p_table) + +LOCAL_OBJECT_START(exp_Q1_table) +data8 0x3de6124613a86d09 // QD = 1/13! +data8 0x3e21eed8eff8d898 // QC = 1/12! +data8 0x3ec71de3a556c734 // Q9 = 1/9! +data8 0x3efa01a01a01a01a // Q8 = 1/8! +data8 0x8888888888888889,0x3ff8 // Q5 = 1/5! +data8 0xaaaaaaaaaaaaaaab,0x3ffc // Q3 = 1/3! +data8 0x0,0x0 // Pad to avoid bank conflicts +LOCAL_OBJECT_END(exp_Q1_table) + +LOCAL_OBJECT_START(exp_Q2_table) +data8 0x3e5ae64567f544e4 // QB = 1/11! +data8 0x3e927e4fb7789f5c // QA = 1/10! +data8 0x3f2a01a01a01a01a // Q7 = 1/7! +data8 0x3f56c16c16c16c17 // Q6 = 1/6! +data8 0xaaaaaaaaaaaaaaab,0x3ffa // Q4 = 1/4! +data8 0x8000000000000000,0x3ffe // Q2 = 1/2! +LOCAL_OBJECT_END(exp_Q2_table) + + +.section .text +GLOBAL_IEEE754_ENTRY(expm1) + +{ .mlx + getf.exp rSignexp_x = f8 // Must recompute if x unorm + movl rSig_inv_ln2 = 0xb8aa3b295c17f0bc // signif of 1/ln2 +} +{ .mlx + addl rAD_TB1 = @ltoff(exp_Table_1), gp + movl rRshf_2to56 = 0x4768000000000000 // 1.10000 2^(63+56) +} +;; + +// We do this fnorm right at the beginning to normalize +// any input unnormals so that SWA is not taken. +{ .mfi + ld8 rAD_TB1 = [rAD_TB1] + fclass.m p6,p0 = f8,0x0b // Test for x=unorm + mov rExp_mask = 0x1ffff +} +{ .mfi + mov rExp_bias = 0xffff + fnorm.s1 fNormX = f8 + mov rExp_2tom56 = 0xffff-56 +} +;; + +// Form two constants we need +// 1/ln2 * 2^63 to compute w = x * 1/ln2 * 128 +// 1.1000..000 * 2^(63+63-7) to right shift int(w) into the significand + +{ .mfi + setf.sig fINV_LN2_2TO63 = rSig_inv_ln2 // form 1/ln2 * 2^63 + fclass.m p8,p0 = f8,0x07 // Test for x=0 + nop.i 0 +} +{ .mlx + setf.d fRSHF_2TO56 = rRshf_2to56 // Form 1.100 * 2^(63+56) + movl rRshf = 0x43e8000000000000 // 1.10000 2^63 for rshift +} +;; + +{ .mfi + setf.exp f2TOM56 = rExp_2tom56 // form 2^-56 for scaling Nfloat + fclass.m p9,p0 = f8,0x22 // Test for x=-inf + add rAD_TB2 = 0x140, rAD_TB1 // Point to Table 2 +} +{ .mib + add rAD_Q1 = 0x1e0, rAD_TB1 // Point to Q table for small path + add rAD_Ln2_lo = 0x30, rAD_TB1 // Point to ln2_by_128_lo +(p6) br.cond.spnt EXPM1_UNORM // Branch if x unorm +} +;; + +EXPM1_COMMON: +{ .mfi + ldfpd fMIN_DBL_OFLOW_ARG, fMAX_DBL_MINUS_1_ARG = [rAD_TB1],16 + fclass.m p10,p0 = f8,0x1e1 // Test for x=+inf, NaN, NaT + add rAD_Q2 = 0x50, rAD_Q1 // Point to Q table for small path +} +{ .mfb + nop.m 0 + nop.f 0 +(p8) br.ret.spnt b0 // Exit for x=0, return x +} +;; + +{ .mfi + ldfd fMAX_DBL_NORM_ARG = [rAD_TB1],16 + nop.f 0 + and rExp_x = rExp_mask, rSignexp_x // Biased exponent of x +} +{ .mfb + setf.d fRSHF = rRshf // Form right shift const 1.100 * 2^63 +(p9) fms.d.s0 f8 = f0,f0,f1 // quick exit for x=-inf +(p9) br.ret.spnt b0 +} +;; + +{ .mfi + ldfpd fQD, fQC = [rAD_Q1], 16 // Load coeff for small path + nop.f 0 + sub rExp_x = rExp_x, rExp_bias // True exponent of x +} +{ .mfb + ldfpd fQB, fQA = [rAD_Q2], 16 // Load coeff for small path +(p10) fma.d.s0 f8 = f8, f1, f0 // For x=+inf, NaN, NaT +(p10) br.ret.spnt b0 // Exit for x=+inf, NaN, NaT +} +;; + +{ .mfi + ldfpd fQ9, fQ8 = [rAD_Q1], 16 // Load coeff for small path + fma.s1 fXsq = fNormX, fNormX, f0 // x*x for small path + cmp.gt p7, p8 = -2, rExp_x // Test |x| < 2^(-2) +} +{ .mfi + ldfpd fQ7, fQ6 = [rAD_Q2], 16 // Load coeff for small path + nop.f 0 + nop.i 0 +} +;; + +{ .mfi + ldfe fQ5 = [rAD_Q1], 16 // Load coeff for small path + nop.f 0 + nop.i 0 +} +{ .mib + ldfe fQ4 = [rAD_Q2], 16 // Load coeff for small path +(p7) cmp.gt.unc p6, p7 = -60, rExp_x // Test |x| < 2^(-60) +(p7) br.cond.spnt EXPM1_SMALL // Branch if 2^-60 <= |x| < 2^-2 +} +;; + +// W = X * Inv_log2_by_128 +// By adding 1.10...0*2^63 we shift and get round_int(W) in significand. +// We actually add 1.10...0*2^56 to X * Inv_log2 to do the same thing. + +{ .mfi + ldfe fLn2_by_128_hi = [rAD_TB1],32 + fma.s1 fW_2TO56_RSH = fNormX, fINV_LN2_2TO63, fRSHF_2TO56 + nop.i 0 +} +{ .mfb + ldfe fLn2_by_128_lo = [rAD_Ln2_lo] +(p6) fma.d.s0 f8 = f8, f8, f8 // If x < 2^-60, result=x+x*x +(p6) br.ret.spnt b0 // Exit if x < 2^-60 +} +;; + +// Divide arguments into the following categories: +// Certain minus one p11 - -inf < x <= MAX_DBL_MINUS_1_ARG +// Possible Overflow p14 - MAX_DBL_NORM_ARG < x < MIN_DBL_OFLOW_ARG +// Certain Overflow p15 - MIN_DBL_OFLOW_ARG <= x < +inf +// +// If the input is really a double arg, then there will never be "Possible +// Overflow" arguments. +// + +// After that last load, rAD_TB1 points to the beginning of table 1 + +{ .mfi + nop.m 0 + fcmp.ge.s1 p15,p14 = fNormX,fMIN_DBL_OFLOW_ARG + nop.i 0 +} +;; + +{ .mfi + add rAD_P = 0x80, rAD_TB2 + fcmp.le.s1 p11,p0 = fNormX,fMAX_DBL_MINUS_1_ARG + nop.i 0 +} +;; + +{ .mfb + ldfpd fP5, fP4 = [rAD_P] ,16 +(p14) fcmp.gt.unc.s1 p14,p0 = fNormX,fMAX_DBL_NORM_ARG +(p15) br.cond.spnt EXPM1_CERTAIN_OVERFLOW +} +;; + +// Nfloat = round_int(W) +// The signficand of fW_2TO56_RSH contains the rounded integer part of W, +// as a twos complement number in the lower bits (that is, it may be negative). +// That twos complement number (called N) is put into rN. + +// Since fW_2TO56_RSH is scaled by 2^56, it must be multiplied by 2^-56 +// before the shift constant 1.10000 * 2^63 is subtracted to yield fNfloat. +// Thus, fNfloat contains the floating point version of N + +{ .mfb + ldfpd fP3, fP2 = [rAD_P] + fms.s1 fNfloat = fW_2TO56_RSH, f2TOM56, fRSHF +(p11) br.cond.spnt EXPM1_CERTAIN_MINUS_ONE +} +;; + +{ .mfi + getf.sig rN = fW_2TO56_RSH + nop.f 0 + nop.i 0 +} +;; + +// rIndex_1 has index_1 +// rIndex_2_16 has index_2 * 16 +// rBiased_M has M +// rIndex_1_16 has index_1 * 16 + +// r = x - Nfloat * ln2_by_128_hi +// f = 1 - Nfloat * ln2_by_128_lo +{ .mfi + and rIndex_1 = 0x0f, rN + fnma.s1 fR = fNfloat, fLn2_by_128_hi, fNormX + shr rM = rN, 0x7 +} +{ .mfi + and rIndex_2_16 = 0x70, rN + fnma.s1 fF = fNfloat, fLn2_by_128_lo, f1 + nop.i 0 +} +;; + +// rAD_T1 has address of T1 +// rAD_T2 has address if T2 + +{ .mmi + add rBiased_M = rExp_bias, rM + add rAD_T2 = rAD_TB2, rIndex_2_16 + shladd rAD_T1 = rIndex_1, 4, rAD_TB1 +} +;; + +// Create Scale = 2^M +// Load T1 and T2 +{ .mmi + setf.exp f2M = rBiased_M + ldfe fT2 = [rAD_T2] + nop.i 0 +} +;; + +{ .mfi + ldfe fT1 = [rAD_T1] + fmpy.s0 fTmp = fLn2_by_128_lo, fLn2_by_128_lo // Force inexact + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fP54 = fR, fP5, fP4 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fP32 = fR, fP3, fP2 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fRsq = fR, fR, f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fP5432 = fRsq, fP54, fP32 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fS2 = fF,fT2,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fS1 = f2M,fT1,f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fP = fRsq, fP5432, fR + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fms.s1 fSm1 = fS1,fS2,f1 // S - 1.0 + nop.i 0 +} +{ .mfb + nop.m 0 + fma.s1 fS = fS1,fS2,f0 +(p14) br.cond.spnt EXPM1_POSSIBLE_OVERFLOW +} +;; + +{ .mfb + nop.m 0 + fma.d.s0 f8 = fS, fP, fSm1 + br.ret.sptk b0 // Normal path exit +} +;; + +// Here if 2^-60 <= |x| <2^-2 +// Compute 13th order polynomial +EXPM1_SMALL: +{ .mmf + ldfe fQ3 = [rAD_Q1], 16 + ldfe fQ2 = [rAD_Q2], 16 + fma.s1 fX4 = fXsq, fXsq, f0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fQDC = fQD, fNormX, fQC + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fQBA = fQB, fNormX, fQA + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fQ98 = fQ9, fNormX, fQ8 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fQ76= fQ7, fNormX, fQ6 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fQ54 = fQ5, fNormX, fQ4 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fX6 = fX4, fXsq, f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fQ32= fQ3, fNormX, fQ2 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fQDCBA = fQDC, fXsq, fQBA + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fQ7654 = fQ76, fXsq, fQ54 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fQDCBA98 = fQDCBA, fXsq, fQ98 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fQ765432 = fQ7654, fXsq, fQ32 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fQDCBA98765432 = fQDCBA98, fX6, fQ765432 + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + fma.d.s0 f8 = fQDCBA98765432, fXsq, fNormX + br.ret.sptk b0 // Exit small branch +} +;; + + +EXPM1_POSSIBLE_OVERFLOW: + +// Here if fMAX_DBL_NORM_ARG < x < fMIN_DBL_OFLOW_ARG +// This cannot happen if input is a double, only if input higher precision. +// Overflow is a possibility, not a certainty. + +// Recompute result using status field 2 with user's rounding mode, +// and wre set. If result is larger than largest double, then we have +// overflow + +{ .mfi + mov rGt_ln = 0x103ff // Exponent for largest dbl + 1 ulp + fsetc.s2 0x7F,0x42 // Get user's round mode, set wre + nop.i 0 +} +;; + +{ .mfi + setf.exp fGt_pln = rGt_ln // Create largest double + 1 ulp + fma.d.s2 fWre_urm_f8 = fS, fP, fSm1 // Result with wre set + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fsetc.s2 0x7F,0x40 // Turn off wre in sf2 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcmp.ge.s1 p6, p0 = fWre_urm_f8, fGt_pln // Test for overflow + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + nop.f 0 +(p6) br.cond.spnt EXPM1_CERTAIN_OVERFLOW // Branch if overflow +} +;; + +{ .mfb + nop.m 0 + fma.d.s0 f8 = fS, fP, fSm1 + br.ret.sptk b0 // Exit if really no overflow +} +;; + +EXPM1_CERTAIN_OVERFLOW: +{ .mmi + sub rTmp = rExp_mask, r0, 1 +;; + setf.exp fTmp = rTmp + nop.i 0 +} +;; + +{ .mfi + alloc r32=ar.pfs,1,4,4,0 + fmerge.s FR_X = f8,f8 + nop.i 0 +} +{ .mfb + mov GR_Parameter_TAG = 41 + fma.d.s0 FR_RESULT = fTmp, fTmp, f0 // Set I,O and +INF result + br.cond.sptk __libm_error_region +} +;; + +// Here if x unorm +EXPM1_UNORM: +{ .mfb + getf.exp rSignexp_x = fNormX // Must recompute if x unorm + fcmp.eq.s0 p6, p0 = f8, f0 // Set D flag + br.cond.sptk EXPM1_COMMON +} +;; + +// here if result will be -1 and inexact, x <= -48.0 +EXPM1_CERTAIN_MINUS_ONE: +{ .mmi + mov rTmp = 1 +;; + setf.exp fTmp = rTmp + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + fms.d.s0 FR_RESULT = fTmp, fTmp, f1 // Set I, rounded -1+eps result + br.ret.sptk b0 +} +;; + +GLOBAL_IEEE754_END(expm1) + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfd [GR_Parameter_Y] = FR_Y,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; +.body +{ .mib + stfd [GR_Parameter_X] = FR_X // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfd [GR_Parameter_Y] = FR_RESULT // STORE Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; +{ .mmi + ldfd f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/s_expm1f.S b/sysdeps/ia64/fpu/s_expm1f.S new file mode 100644 index 0000000000..8996977ddb --- /dev/null +++ b/sysdeps/ia64/fpu/s_expm1f.S @@ -0,0 +1,671 @@ +.file "expf_m1.s" + + +// Copyright (c) 2000 - 2005, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. + +// History +//********************************************************************* +// 02/02/00 Initial Version +// 04/04/00 Unwind support added +// 08/15/00 Bundle added after call to __libm_error_support to properly +// set [the previously overwritten] GR_Parameter_RESULT. +// 07/07/01 Improved speed of all paths +// 05/20/02 Cleaned up namespace and sf0 syntax +// 11/20/02 Improved speed, algorithm based on expf +// 03/31/05 Reformatted delimiters between data tables +// +// +// API +//********************************************************************* +// float expm1f(float) +// +// Overview of operation +//********************************************************************* +// 1. Inputs of Nan, Inf, Zero, NatVal handled with special paths +// +// 2. |x| < 2^-40 +// Result = x, computed by x + x*x to handle appropriate flags and rounding +// +// 3. 2^-40 <= |x| < 2^-2 +// Result determined by 8th order Taylor series polynomial +// expm1f(x) = x + A2*x^2 + ... + A8*x^8 +// +// 4. x < -24.0 +// Here we know result is essentially -1 + eps, where eps only affects +// rounded result. Set I. +// +// 5. x >= 88.7228 +// Result overflows. Set I, O, and call error support +// +// 6. 2^-2 <= x < 88.7228 or -24.0 <= x < -2^-2 +// This is the main path. The algorithm is described below: + +// Take the input x. w is "how many log2/128 in x?" +// w = x * 64/log2 +// NJ = int(w) +// x = NJ*log2/64 + R + +// NJ = 64*n + j +// x = n*log2 + (log2/64)*j + R +// +// So, exp(x) = 2^n * 2^(j/64)* exp(R) +// +// T = 2^n * 2^(j/64) +// Construct 2^n +// Get 2^(j/64) table +// actually all the entries of 2^(j/64) table are stored in DP and +// with exponent bits set to 0 -> multiplication on 2^n can be +// performed by doing logical "or" operation with bits presenting 2^n + +// exp(R) = 1 + (exp(R) - 1) +// P = exp(R) - 1 approximated by Taylor series of 3rd degree +// P = A3*R^3 + A2*R^2 + R, A3 = 1/6, A2 = 1/2 +// + +// The final result is reconstructed as follows +// expm1f(x) = T*P + (T - 1.0) + +// Special values +//********************************************************************* +// expm1f(+0) = +0.0 +// expm1f(-0) = -0.0 + +// expm1f(+qnan) = +qnan +// expm1f(-qnan) = -qnan +// expm1f(+snan) = +qnan +// expm1f(-snan) = -qnan + +// expm1f(-inf) = -1.0 +// expm1f(+inf) = +inf + +// Overflow and Underflow +//********************************************************************* +// expm1f(x) = largest single normal when +// x = 88.7228 = 0x42b17217 +// +// Underflow is handled as described in case 2 above. + + +// Registers used +//********************************************************************* +// Floating Point registers used: +// f8, input +// f6,f7, f9 -> f15, f32 -> f45 + +// General registers used: +// r3, r20 -> r38 + +// Predicate registers used: +// p9 -> p15 + +// Assembly macros +//********************************************************************* +// integer registers used +// scratch +rNJ = r3 + +rExp_half = r20 +rSignexp_x = r21 +rExp_x = r22 +rExp_mask = r23 +rExp_bias = r24 +rTmp = r25 +rM1_lim = r25 +rGt_ln = r25 +rJ = r26 +rN = r27 +rTblAddr = r28 +rLn2Div64 = r29 +rRightShifter = r30 +r64DivLn2 = r31 +// stacked +GR_SAVE_PFS = r32 +GR_SAVE_B0 = r33 +GR_SAVE_GP = r34 +GR_Parameter_X = r35 +GR_Parameter_Y = r36 +GR_Parameter_RESULT = r37 +GR_Parameter_TAG = r38 + +// floating point registers used +FR_X = f10 +FR_Y = f1 +FR_RESULT = f8 +// scratch +fRightShifter = f6 +f64DivLn2 = f7 +fNormX = f9 +fNint = f10 +fN = f11 +fR = f12 +fLn2Div64 = f13 +fA2 = f14 +fA3 = f15 +// stacked +fP = f32 +fX3 = f33 +fT = f34 +fMIN_SGL_OFLOW_ARG = f35 +fMAX_SGL_NORM_ARG = f36 +fMAX_SGL_MINUS_1_ARG = f37 +fA4 = f38 +fA43 = f38 +fA432 = f38 +fRSqr = f39 +fA5 = f40 +fTmp = f41 +fGt_pln = f41 +fXsq = f41 +fA7 = f42 +fA6 = f43 +fA65 = f43 +fTm1 = f44 +fA8 = f45 +fA87 = f45 +fA8765 = f45 +fA8765432 = f45 +fWre_urm_f8 = f45 + +RODATA +.align 16 +LOCAL_OBJECT_START(_expf_table) +data8 0x3efa01a01a01a01a // A8 = 1/8! +data8 0x3f2a01a01a01a01a // A7 = 1/7! +data8 0x3f56c16c16c16c17 // A6 = 1/6! +data8 0x3f81111111111111 // A5 = 1/5! +data8 0x3fa5555555555555 // A4 = 1/4! +data8 0x3fc5555555555555 // A3 = 1/3! +// +data4 0x42b17218 // Smallest sgl arg to overflow sgl result +data4 0x42b17217 // Largest sgl arg to give sgl result +// +// 2^(j/64) table, j goes from 0 to 63 +data8 0x0000000000000000 // 2^(0/64) +data8 0x00002C9A3E778061 // 2^(1/64) +data8 0x000059B0D3158574 // 2^(2/64) +data8 0x0000874518759BC8 // 2^(3/64) +data8 0x0000B5586CF9890F // 2^(4/64) +data8 0x0000E3EC32D3D1A2 // 2^(5/64) +data8 0x00011301D0125B51 // 2^(6/64) +data8 0x0001429AAEA92DE0 // 2^(7/64) +data8 0x000172B83C7D517B // 2^(8/64) +data8 0x0001A35BEB6FCB75 // 2^(9/64) +data8 0x0001D4873168B9AA // 2^(10/64) +data8 0x0002063B88628CD6 // 2^(11/64) +data8 0x0002387A6E756238 // 2^(12/64) +data8 0x00026B4565E27CDD // 2^(13/64) +data8 0x00029E9DF51FDEE1 // 2^(14/64) +data8 0x0002D285A6E4030B // 2^(15/64) +data8 0x000306FE0A31B715 // 2^(16/64) +data8 0x00033C08B26416FF // 2^(17/64) +data8 0x000371A7373AA9CB // 2^(18/64) +data8 0x0003A7DB34E59FF7 // 2^(19/64) +data8 0x0003DEA64C123422 // 2^(20/64) +data8 0x0004160A21F72E2A // 2^(21/64) +data8 0x00044E086061892D // 2^(22/64) +data8 0x000486A2B5C13CD0 // 2^(23/64) +data8 0x0004BFDAD5362A27 // 2^(24/64) +data8 0x0004F9B2769D2CA7 // 2^(25/64) +data8 0x0005342B569D4F82 // 2^(26/64) +data8 0x00056F4736B527DA // 2^(27/64) +data8 0x0005AB07DD485429 // 2^(28/64) +data8 0x0005E76F15AD2148 // 2^(29/64) +data8 0x0006247EB03A5585 // 2^(30/64) +data8 0x0006623882552225 // 2^(31/64) +data8 0x0006A09E667F3BCD // 2^(32/64) +data8 0x0006DFB23C651A2F // 2^(33/64) +data8 0x00071F75E8EC5F74 // 2^(34/64) +data8 0x00075FEB564267C9 // 2^(35/64) +data8 0x0007A11473EB0187 // 2^(36/64) +data8 0x0007E2F336CF4E62 // 2^(37/64) +data8 0x00082589994CCE13 // 2^(38/64) +data8 0x000868D99B4492ED // 2^(39/64) +data8 0x0008ACE5422AA0DB // 2^(40/64) +data8 0x0008F1AE99157736 // 2^(41/64) +data8 0x00093737B0CDC5E5 // 2^(42/64) +data8 0x00097D829FDE4E50 // 2^(43/64) +data8 0x0009C49182A3F090 // 2^(44/64) +data8 0x000A0C667B5DE565 // 2^(45/64) +data8 0x000A5503B23E255D // 2^(46/64) +data8 0x000A9E6B5579FDBF // 2^(47/64) +data8 0x000AE89F995AD3AD // 2^(48/64) +data8 0x000B33A2B84F15FB // 2^(49/64) +data8 0x000B7F76F2FB5E47 // 2^(50/64) +data8 0x000BCC1E904BC1D2 // 2^(51/64) +data8 0x000C199BDD85529C // 2^(52/64) +data8 0x000C67F12E57D14B // 2^(53/64) +data8 0x000CB720DCEF9069 // 2^(54/64) +data8 0x000D072D4A07897C // 2^(55/64) +data8 0x000D5818DCFBA487 // 2^(56/64) +data8 0x000DA9E603DB3285 // 2^(57/64) +data8 0x000DFC97337B9B5F // 2^(58/64) +data8 0x000E502EE78B3FF6 // 2^(59/64) +data8 0x000EA4AFA2A490DA // 2^(60/64) +data8 0x000EFA1BEE615A27 // 2^(61/64) +data8 0x000F50765B6E4540 // 2^(62/64) +data8 0x000FA7C1819E90D8 // 2^(63/64) +LOCAL_OBJECT_END(_expf_table) + + +.section .text +GLOBAL_IEEE754_ENTRY(expm1f) + +{ .mlx + getf.exp rSignexp_x = f8 // Must recompute if x unorm + movl r64DivLn2 = 0x40571547652B82FE // 64/ln(2) +} +{ .mlx + addl rTblAddr = @ltoff(_expf_table),gp + movl rRightShifter = 0x43E8000000000000 // DP Right Shifter +} +;; + +{ .mfi + // point to the beginning of the table + ld8 rTblAddr = [rTblAddr] + fclass.m p14, p0 = f8 , 0x22 // test for -INF + mov rExp_mask = 0x1ffff // Exponent mask +} +{ .mfi + nop.m 0 + fnorm.s1 fNormX = f8 // normalized x + nop.i 0 +} +;; + +{ .mfi + setf.d f64DivLn2 = r64DivLn2 // load 64/ln(2) to FP reg + fclass.m p9, p0 = f8 , 0x0b // test for x unorm + mov rExp_bias = 0xffff // Exponent bias +} +{ .mlx + // load Right Shifter to FP reg + setf.d fRightShifter = rRightShifter + movl rLn2Div64 = 0x3F862E42FEFA39EF // DP ln(2)/64 in GR +} +;; + +{ .mfi + ldfpd fA8, fA7 = [rTblAddr], 16 + fcmp.eq.s1 p13, p0 = f0, f8 // test for x = 0.0 + mov rExp_half = 0xfffe +} +{ .mfb + setf.d fLn2Div64 = rLn2Div64 // load ln(2)/64 to FP reg + nop.f 0 +(p9) br.cond.spnt EXPM1_UNORM // Branch if x unorm +} +;; + +EXPM1_COMMON: +{ .mfb + ldfpd fA6, fA5 = [rTblAddr], 16 +(p14) fms.s.s0 f8 = f0, f0, f1 // result if x = -inf +(p14) br.ret.spnt b0 // exit here if x = -inf +} +;; + +{ .mfb + ldfpd fA4, fA3 = [rTblAddr], 16 + fclass.m p15, p0 = f8 , 0x1e1 // test for NaT,NaN,+Inf +(p13) br.ret.spnt b0 // exit here if x =0.0, result is x +} +;; + +{ .mfi + // overflow thresholds + ldfps fMIN_SGL_OFLOW_ARG, fMAX_SGL_NORM_ARG = [rTblAddr], 8 + fma.s1 fXsq = fNormX, fNormX, f0 // x^2 for small path + and rExp_x = rExp_mask, rSignexp_x // Biased exponent of x +} +{ .mlx + nop.m 0 + movl rM1_lim = 0xc1c00000 // Minus -1 limit (-24.0), SP +} +;; + +{ .mfi + setf.exp fA2 = rExp_half + // x*(64/ln(2)) + Right Shifter + fma.s1 fNint = fNormX, f64DivLn2, fRightShifter + sub rExp_x = rExp_x, rExp_bias // True exponent of x +} +{ .mfb + nop.m 0 +(p15) fma.s.s0 f8 = f8, f1, f0 // result if x = NaT,NaN,+Inf +(p15) br.ret.spnt b0 // exit here if x = NaT,NaN,+Inf +} +;; + +{ .mfi + setf.s fMAX_SGL_MINUS_1_ARG = rM1_lim // -1 threshold, -24.0 + nop.f 0 + cmp.gt p7, p8 = -2, rExp_x // Test |x| < 2^(-2) +} +;; + +{ .mfi +(p7) cmp.gt.unc p6, p7 = -40, rExp_x // Test |x| < 2^(-40) + fma.s1 fA87 = fA8, fNormX, fA7 // Small path, A8*x+A7 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA65 = fA6, fNormX, fA5 // Small path, A6*x+A5 + nop.i 0 +} +;; + +{ .mfb + nop.m 0 +(p6) fma.s.s0 f8 = f8, f8, f8 // If x < 2^-40, result=x+x*x +(p6) br.ret.spnt b0 // Exit if x < 2^-40 +} +;; + +{ .mfi + nop.m 0 + // check for overflow + fcmp.gt.s1 p15, p14 = fNormX, fMIN_SGL_OFLOW_ARG + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 fN = fNint, f1, fRightShifter // n in FP register + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p7) fma.s1 fA43 = fA4, fNormX, fA3 // Small path, A4*x+A3 + nop.i 0 +} +;; + +{ .mfi + getf.sig rNJ = fNint // bits of n, j +(p7) fma.s1 fA8765 = fA87, fXsq, fA65 // Small path, A87*xsq+A65 + nop.i 0 +} +{ .mfb + nop.m 0 +(p7) fma.s1 fX3 = fXsq, fNormX, f0 // Small path, x^3 + // branch out if overflow +(p15) br.cond.spnt EXPM1_CERTAIN_OVERFLOW +} +;; + +{ .mfi + addl rN = 0xffff-63, rNJ // biased and shifted n + fnma.s1 fR = fLn2Div64, fN, fNormX // R = x - N*ln(2)/64 + extr.u rJ = rNJ , 0 , 6 // bits of j +} +;; + +{ .mfi + shladd rJ = rJ, 3, rTblAddr // address in the 2^(j/64) table + // check for certain -1 + fcmp.le.s1 p13, p0 = fNormX, fMAX_SGL_MINUS_1_ARG + shr rN = rN, 6 // biased n +} +{ .mfi + nop.m 0 +(p7) fma.s1 fA432 = fA43, fNormX, fA2 // Small path, A43*x+A2 + nop.i 0 +} +;; + +{ .mfi + ld8 rJ = [rJ] + nop.f 0 + shl rN = rN , 52 // 2^n bits in DP format +} +;; + +{ .mmi + or rN = rN, rJ // bits of 2^n * 2^(j/64) in DP format +(p13) mov rTmp = 1 // Make small value for -1 path + nop.i 0 +} +;; + +{ .mfi + setf.d fT = rN // 2^n + // check for possible overflow (only happens if input higher precision) +(p14) fcmp.gt.s1 p14, p0 = fNormX, fMAX_SGL_NORM_ARG + nop.i 0 +} +{ .mfi + nop.m 0 +(p7) fma.s1 fA8765432 = fA8765, fX3, fA432 // A8765*x^3+A432 + nop.i 0 +} +;; + +{ .mfi +(p13) setf.exp fTmp = rTmp // Make small value for -1 path + fma.s1 fP = fA3, fR, fA2 // A3*R + A2 + nop.i 0 +} +{ .mfb + nop.m 0 + fma.s1 fRSqr = fR, fR, f0 // R^2 +(p13) br.cond.spnt EXPM1_CERTAIN_MINUS_ONE // Branch if x < -24.0 +} +;; + +{ .mfb + nop.m 0 +(p7) fma.s.s0 f8 = fA8765432, fXsq, fNormX // Small path, + // result=xsq*A8765432+x +(p7) br.ret.spnt b0 // Exit if 2^-40 <= |x| < 2^-2 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fP = fP, fRSqr, fR // P = (A3*R + A2)*Rsqr + R + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + fms.s1 fTm1 = fT, f1, f1 // T - 1.0 +(p14) br.cond.spnt EXPM1_POSSIBLE_OVERFLOW +} +;; + +{ .mfb + nop.m 0 + fma.s.s0 f8 = fP, fT, fTm1 + br.ret.sptk b0 // Result for main path + // minus_one_limit < x < -2^-2 + // and +2^-2 <= x < overflow_limit +} +;; + +// Here if x unorm +EXPM1_UNORM: +{ .mfb + getf.exp rSignexp_x = fNormX // Must recompute if x unorm + fcmp.eq.s0 p6, p0 = f8, f0 // Set D flag + br.cond.sptk EXPM1_COMMON +} +;; + +// here if result will be -1 and inexact, x <= -24.0 +EXPM1_CERTAIN_MINUS_ONE: +{ .mfb + nop.m 0 + fms.s.s0 f8 = fTmp, fTmp, f1 // Result -1, and Inexact set + br.ret.sptk b0 +} +;; + +EXPM1_POSSIBLE_OVERFLOW: + +// Here if fMAX_SGL_NORM_ARG < x < fMIN_SGL_OFLOW_ARG +// This cannot happen if input is a single, only if input higher precision. +// Overflow is a possibility, not a certainty. + +// Recompute result using status field 2 with user's rounding mode, +// and wre set. If result is larger than largest single, then we have +// overflow + +{ .mfi + mov rGt_ln = 0x1007f // Exponent for largest sgl + 1 ulp + fsetc.s2 0x7F,0x42 // Get user's round mode, set wre + nop.i 0 +} +;; + +{ .mfi + setf.exp fGt_pln = rGt_ln // Create largest single + 1 ulp + fma.s.s2 fWre_urm_f8 = fP, fT, fTm1 // Result with wre set + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fsetc.s2 0x7F,0x40 // Turn off wre in sf2 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcmp.ge.s1 p6, p0 = fWre_urm_f8, fGt_pln // Test for overflow + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + nop.f 0 +(p6) br.cond.spnt EXPM1_CERTAIN_OVERFLOW // Branch if overflow +} +;; + +{ .mfb + nop.m 0 + fma.s.s0 f8 = fP, fT, fTm1 + br.ret.sptk b0 // Exit if really no overflow +} +;; + +// here if overflow +EXPM1_CERTAIN_OVERFLOW: +{ .mmi + addl rTmp = 0x1FFFE, r0;; + setf.exp fTmp = rTmp + nop.i 999 +} +;; + +{ .mfi + alloc r32 = ar.pfs, 0, 3, 4, 0 // get some registers + fmerge.s FR_X = fNormX,fNormX + nop.i 0 +} +{ .mfb + mov GR_Parameter_TAG = 43 + fma.s.s0 FR_RESULT = fTmp, fTmp, f0 // Set I,O and +INF result + br.cond.sptk __libm_error_region +} +;; + +GLOBAL_IEEE754_END(expm1f) + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 999 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfs [GR_Parameter_Y] = FR_Y,16 // Store Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; +.body +{ .mfi + stfs [GR_Parameter_X] = FR_X // Store Parameter 1 on stack + nop.f 0 + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address +} +{ .mib + stfs [GR_Parameter_Y] = FR_RESULT // Store Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; + +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; + +{ .mmi + ldfs f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) + + +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/s_expm1l.S b/sysdeps/ia64/fpu/s_expm1l.S new file mode 100644 index 0000000000..a3a6e401e8 --- /dev/null +++ b/sysdeps/ia64/fpu/s_expm1l.S @@ -0,0 +1,1431 @@ +.file "expl_m1.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial Version +// 04/04/00 Unwind support added +// 08/15/00 Bundle added after call to __libm_error_support to properly +// set [the previously overwritten] GR_Parameter_RESULT. +// 07/07/01 Improved speed of all paths +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align; +// used data8 for long double table values +// 03/11/03 Improved accuracy and performance, corrected missing inexact flags +// 04/17/03 Eliminated misplaced and unused data label +// 12/15/03 Eliminated call to error support on expm1l underflow +// +//********************************************************************* +// +// Function: Combined expl(x) and expm1l(x), where +// x +// expl(x) = e , for double-extended precision x values +// x +// expm1l(x) = e - 1 for double-extended precision x values +// +//********************************************************************* +// +// Resources Used: +// +// Floating-Point Registers: f8 (Input and Return Value) +// f9-f15,f32-f77 +// +// General Purpose Registers: +// r14-r38 +// r35-r38 (Used to pass arguments to error handling routine) +// +// Predicate Registers: p6-p15 +// +//********************************************************************* +// +// IEEE Special Conditions: +// +// Denormal fault raised on denormal inputs +// Overflow exceptions raised when appropriate for exp and expm1 +// Underflow exceptions raised when appropriate for exp and expm1 +// (Error Handling Routine called for overflow and Underflow) +// Inexact raised when appropriate by algorithm +// +// exp(inf) = inf +// exp(-inf) = +0 +// exp(SNaN) = QNaN +// exp(QNaN) = QNaN +// exp(0) = 1 +// exp(EM_special Values) = QNaN +// exp(inf) = inf +// expm1(-inf) = -1 +// expm1(SNaN) = QNaN +// expm1(QNaN) = QNaN +// expm1(0) = 0 +// expm1(EM_special Values) = QNaN +// +//********************************************************************* +// +// Implementation and Algorithm Notes: +// +// ker_exp_64( in_FR : X, +// out_FR : Y_hi, +// out_FR : Y_lo, +// out_FR : scale, +// out_PR : Safe ) +// +// On input, X is in register format +// p6 for exp, +// p7 for expm1, +// +// On output, +// +// scale*(Y_hi + Y_lo) approximates exp(X) if exp +// scale*(Y_hi + Y_lo) approximates exp(X)-1 if expm1 +// +// The accuracy is sufficient for a highly accurate 64 sig. +// bit implementation. Safe is set if there is no danger of +// overflow/underflow when the result is composed from scale, +// Y_hi and Y_lo. Thus, we can have a fast return if Safe is set. +// Otherwise, one must prepare to handle the possible exception +// appropriately. Note that SAFE not set (false) does not mean +// that overflow/underflow will occur; only the setting of SAFE +// guarantees the opposite. +// +// **** High Level Overview **** +// +// The method consists of three cases. +// +// If |X| < Tiny use case exp_tiny; +// else if |X| < 2^(-m) use case exp_small; m=12 for exp, m=7 for expm1 +// else use case exp_regular; +// +// Case exp_tiny: +// +// 1 + X can be used to approximate exp(X) +// X + X^2/2 can be used to approximate exp(X) - 1 +// +// Case exp_small: +// +// Here, exp(X) and exp(X) - 1 can all be +// approximated by a relatively simple polynomial. +// +// This polynomial resembles the truncated Taylor series +// +// exp(w) = 1 + w + w^2/2! + w^3/3! + ... + w^n/n! +// +// Case exp_regular: +// +// Here we use a table lookup method. The basic idea is that in +// order to compute exp(X), we accurately decompose X into +// +// X = N * log(2)/(2^12) + r, |r| <= log(2)/2^13. +// +// Hence +// +// exp(X) = 2^( N / 2^12 ) * exp(r). +// +// The value 2^( N / 2^12 ) is obtained by simple combinations +// of values calculated beforehand and stored in table; exp(r) +// is approximated by a short polynomial because |r| is small. +// +// We elaborate this method in 4 steps. +// +// Step 1: Reduction +// +// The value 2^12/log(2) is stored as a double-extended number +// L_Inv. +// +// N := round_to_nearest_integer( X * L_Inv ) +// +// The value log(2)/2^12 is stored as two numbers L_hi and L_lo so +// that r can be computed accurately via +// +// r := (X - N*L_hi) - N*L_lo +// +// We pick L_hi such that N*L_hi is representable in 64 sig. bits +// and thus the FMA X - N*L_hi is error free. So r is the +// 1 rounding error from an exact reduction with respect to +// +// L_hi + L_lo. +// +// In particular, L_hi has 30 significant bit and can be stored +// as a double-precision number; L_lo has 64 significant bits and +// stored as a double-extended number. +// +// Step 2: Approximation +// +// exp(r) - 1 is approximated by a short polynomial of the form +// +// r + A_1 r^2 + A_2 r^3 + A_3 r^4 . +// +// Step 3: Composition from Table Values +// +// The value 2^( N / 2^12 ) can be composed from a couple of tables +// of precalculated values. First, express N as three integers +// K, M_1, and M_2 as +// +// N = K * 2^12 + M_1 * 2^6 + M_2 +// +// Where 0 <= M_1, M_2 < 2^6; and K can be positive or negative. +// When N is represented in 2's complement, M_2 is simply the 6 +// lsb's, M_1 is the next 6, and K is simply N shifted right +// arithmetically (sign extended) by 12 bits. +// +// Now, 2^( N / 2^12 ) is simply +// +// 2^K * 2^( M_1 / 2^6 ) * 2^( M_2 / 2^12 ) +// +// Clearly, 2^K needs no tabulation. The other two values are less +// trivial because if we store each accurately to more than working +// precision, than its product is too expensive to calculate. We +// use the following method. +// +// Define two mathematical values, delta_1 and delta_2, implicitly +// such that +// +// T_1 = exp( [M_1 log(2)/2^6] - delta_1 ) +// T_2 = exp( [M_2 log(2)/2^12] - delta_2 ) +// +// are representable as 24 significant bits. To illustrate the idea, +// we show how we define delta_1: +// +// T_1 := round_to_24_bits( exp( M_1 log(2)/2^6 ) ) +// delta_1 = (M_1 log(2)/2^6) - log( T_1 ) +// +// The last equality means mathematical equality. We then tabulate +// +// W_1 := exp(delta_1) - 1 +// W_2 := exp(delta_2) - 1 +// +// Both in double precision. +// +// From the tabulated values T_1, T_2, W_1, W_2, we compose the values +// T and W via +// +// T := T_1 * T_2 ...exactly +// W := W_1 + (1 + W_1)*W_2 +// +// W approximates exp( delta ) - 1 where delta = delta_1 + delta_2. +// The mathematical product of T and (W+1) is an accurate representation +// of 2^(M_1/2^6) * 2^(M_2/2^12). +// +// Step 4. Reconstruction +// +// Finally, we can reconstruct exp(X), exp(X) - 1. +// Because +// +// X = K * log(2) + (M_1*log(2)/2^6 - delta_1) +// + (M_2*log(2)/2^12 - delta_2) +// + delta_1 + delta_2 + r ...accurately +// We have +// +// exp(X) ~=~ 2^K * ( T + T*[exp(delta_1+delta_2+r) - 1] ) +// ~=~ 2^K * ( T + T*[exp(delta + r) - 1] ) +// ~=~ 2^K * ( T + T*[(exp(delta)-1) +// + exp(delta)*(exp(r)-1)] ) +// ~=~ 2^K * ( T + T*( W + (1+W)*poly(r) ) ) +// ~=~ 2^K * ( Y_hi + Y_lo ) +// +// where Y_hi = T and Y_lo = T*(W + (1+W)*poly(r)) +// +// For exp(X)-1, we have +// +// exp(X)-1 ~=~ 2^K * ( Y_hi + Y_lo ) - 1 +// ~=~ 2^K * ( Y_hi + Y_lo - 2^(-K) ) +// +// and we combine Y_hi + Y_lo - 2^(-N) into the form of two +// numbers Y_hi + Y_lo carefully. +// +// **** Algorithm Details **** +// +// A careful algorithm must be used to realize the mathematical ideas +// accurately. We describe each of the three cases. We assume SAFE +// is preset to be TRUE. +// +// Case exp_tiny: +// +// The important points are to ensure an accurate result under +// different rounding directions and a correct setting of the SAFE +// flag. +// +// If expm1 is 1, then +// SAFE := False ...possibility of underflow +// Scale := 1.0 +// Y_hi := X +// Y_lo := 2^(-17000) +// Else +// Scale := 1.0 +// Y_hi := 1.0 +// Y_lo := X ...for different rounding modes +// Endif +// +// Case exp_small: +// +// Here we compute a simple polynomial. To exploit parallelism, we split +// the polynomial into several portions. +// +// Let r = X +// +// If exp ...i.e. exp( argument ) +// +// rsq := r * r; +// r4 := rsq*rsq +// poly_lo := P_3 + r*(P_4 + r*(P_5 + r*P_6)) +// poly_hi := r + rsq*(P_1 + r*P_2) +// Y_lo := poly_hi + r4 * poly_lo +// Y_hi := 1.0 +// Scale := 1.0 +// +// Else ...i.e. exp( argument ) - 1 +// +// rsq := r * r +// r4 := rsq * rsq +// poly_lo := Q_7 + r*(Q_8 + r*Q_9)) +// poly_med:= Q_3 + r*Q_4 + rsq*(Q_5 + r*Q_6) +// poly_med:= poly_med + r4*poly_lo +// poly_hi := Q_1 + r*Q_2 +// Y_lo := rsq*(poly_hi + rsq*poly_lo) +// Y_hi := X +// Scale := 1.0 +// +// Endif +// +// Case exp_regular: +// +// The previous description contain enough information except the +// computation of poly and the final Y_hi and Y_lo in the case for +// exp(X)-1. +// +// The computation of poly for Step 2: +// +// rsq := r*r +// poly := r + rsq*(A_1 + r*(A_2 + r*A_3)) +// +// For the case exp(X) - 1, we need to incorporate 2^(-K) into +// Y_hi and Y_lo at the end of Step 4. +// +// If K > 10 then +// Y_lo := Y_lo - 2^(-K) +// Else +// If K < -10 then +// Y_lo := Y_hi + Y_lo +// Y_hi := -2^(-K) +// Else +// Y_hi := Y_hi - 2^(-K) +// End If +// End If +// +//======================================================= +// General Purpose Registers +// +GR_ad_Arg = r14 +GR_ad_A = r15 +GR_sig_inv_ln2 = r15 +GR_rshf_2to51 = r16 +GR_ad_PQ = r16 +GR_ad_Q = r16 +GR_signexp_x = r17 +GR_exp_x = r17 +GR_small_exp = r18 +GR_rshf = r18 +GR_exp_mask = r19 +GR_ad_W1 = r20 +GR_exp_2tom51 = r20 +GR_ad_W2 = r21 +GR_exp_underflow = r21 +GR_M2 = r22 +GR_huge_exp = r22 +GR_M1 = r23 +GR_huge_signif = r23 +GR_K = r24 +GR_one = r24 +GR_minus_one = r24 +GR_exp_bias = r25 +GR_ad_Limits = r26 +GR_N_fix = r26 +GR_exp_2_mk = r26 +GR_ad_P = r27 +GR_exp_2_k = r27 +GR_big_expo_neg = r28 +GR_very_small_exp = r29 +GR_exp_half = r29 +GR_ad_T1 = r30 +GR_ad_T2 = r31 + +GR_SAVE_PFS = r32 +GR_SAVE_B0 = r33 +GR_SAVE_GP = r34 +GR_Parameter_X = r35 +GR_Parameter_Y = r36 +GR_Parameter_RESULT = r37 +GR_Parameter_TAG = r38 + +// Floating Point Registers +// +FR_norm_x = f9 +FR_RSHF_2TO51 = f10 +FR_INV_LN2_2TO63 = f11 +FR_W_2TO51_RSH = f12 +FR_2TOM51 = f13 +FR_RSHF = f14 +FR_Y_hi = f34 +FR_Y_lo = f35 +FR_scale = f36 +FR_tmp = f37 +FR_float_N = f38 +FR_N_signif = f39 +FR_L_hi = f40 +FR_L_lo = f41 +FR_r = f42 +FR_W1 = f43 +FR_T1 = f44 +FR_W2 = f45 +FR_T2 = f46 +FR_W1_p1 = f47 +FR_rsq = f48 +FR_A2 = f49 +FR_r4 = f50 +FR_A3 = f51 +FR_poly = f52 +FR_T = f53 +FR_W = f54 +FR_Wp1 = f55 +FR_p21 = f59 +FR_p210 = f59 +FR_p65 = f60 +FR_p654 = f60 +FR_p6543 = f60 +FR_2_mk = f61 +FR_P4Q7 = f61 +FR_P4 = f61 +FR_Q7 = f61 +FR_P3Q6 = f62 +FR_P3 = f62 +FR_Q6 = f62 +FR_q65 = f62 +FR_q6543 = f62 +FR_P2Q5 = f63 +FR_P2 = f63 +FR_Q5 = f63 +FR_P1Q4 = f64 +FR_P1 = f64 +FR_Q4 = f64 +FR_q43 = f64 +FR_Q3 = f65 +FR_Q2 = f66 +FR_q21 = f66 +FR_Q1 = f67 +FR_A1 = f68 +FR_P6Q9 = f68 +FR_P6 = f68 +FR_Q9 = f68 +FR_P5Q8 = f69 +FR_P5 = f69 +FR_Q8 = f69 +FR_q987 = f69 +FR_q98 = f69 +FR_q9876543 = f69 +FR_min_oflow_x = f70 +FR_huge_exp = f70 +FR_zero_uflow_x = f71 +FR_huge_signif = f71 +FR_huge = f72 +FR_small = f72 +FR_half = f73 +FR_T_scale = f74 +FR_result_lo = f75 +FR_W_T_scale = f76 +FR_Wp1_T_scale = f77 +FR_ftz = f77 +FR_half_x = f77 +// + +FR_X = f9 +FR_Y = f0 +FR_RESULT = f15 + +// ************* DO NOT CHANGE ORDER OF THESE TABLES ******************** + +// double-extended 1/ln(2) +// 3fff b8aa 3b29 5c17 f0bb be87fed0691d3e88 +// 3fff b8aa 3b29 5c17 f0bc +// For speed the significand will be loaded directly with a movl and setf.sig +// and the exponent will be bias+63 instead of bias+0. Thus subsequent +// computations need to scale appropriately. +// The constant 2^12/ln(2) is needed for the computation of N. This is also +// obtained by scaling the computations. +// +// Two shifting constants are loaded directly with movl and setf.d. +// 1. RSHF_2TO51 = 1.1000..00 * 2^(63-12) +// This constant is added to x*1/ln2 to shift the integer part of +// x*2^12/ln2 into the rightmost bits of the significand. +// The result of this fma is N_signif. +// 2. RSHF = 1.1000..00 * 2^(63) +// This constant is subtracted from N_signif * 2^(-51) to give +// the integer part of N, N_fix, as a floating-point number. +// The result of this fms is float_N. + +RODATA +.align 64 +LOCAL_OBJECT_START(Constants_exp_64_Arg) +//data8 0xB8AA3B295C17F0BC,0x0000400B // Inv_L = 2^12/log(2) +data8 0xB17217F400000000,0x00003FF2 // L_hi = hi part log(2)/2^12 +data8 0xF473DE6AF278ECE6,0x00003FD4 // L_lo = lo part log(2)/2^12 +LOCAL_OBJECT_END(Constants_exp_64_Arg) + +LOCAL_OBJECT_START(Constants_exp_64_Limits) +data8 0xb17217f7d1cf79ac,0x0000400c // Smallest long dbl oflow x +data8 0xb220000000000000,0x0000c00c // Small long dbl uflow zero x +LOCAL_OBJECT_END(Constants_exp_64_Limits) + +LOCAL_OBJECT_START(Constants_exp_64_A) +data8 0xAAAAAAABB1B736A0,0x00003FFA // A3 +data8 0xAAAAAAAB90CD6327,0x00003FFC // A2 +data8 0xFFFFFFFFFFFFFFFF,0x00003FFD // A1 +LOCAL_OBJECT_END(Constants_exp_64_A) + +LOCAL_OBJECT_START(Constants_exp_64_P) +data8 0xD00D6C8143914A8A,0x00003FF2 // P6 +data8 0xB60BC4AC30304B30,0x00003FF5 // P5 +data8 0x888888887474C518,0x00003FF8 // P4 +data8 0xAAAAAAAA8DAE729D,0x00003FFA // P3 +data8 0xAAAAAAAAAAAAAF61,0x00003FFC // P2 +data8 0x80000000000004C7,0x00003FFE // P1 +LOCAL_OBJECT_END(Constants_exp_64_P) + +LOCAL_OBJECT_START(Constants_exp_64_Q) +data8 0x93F2AC5F7471F32E, 0x00003FE9 // Q9 +data8 0xB8DA0F3550B3E764, 0x00003FEC // Q8 +data8 0xD00D00D0028E89C4, 0x00003FEF // Q7 +data8 0xD00D00DAEB8C4E91, 0x00003FF2 // Q6 +data8 0xB60B60B60B60B6F5, 0x00003FF5 // Q5 +data8 0x888888888886CC23, 0x00003FF8 // Q4 +data8 0xAAAAAAAAAAAAAAAB, 0x00003FFA // Q3 +data8 0xAAAAAAAAAAAAAAAB, 0x00003FFC // Q2 +data8 0x8000000000000000, 0x00003FFE // Q1 +LOCAL_OBJECT_END(Constants_exp_64_Q) + +LOCAL_OBJECT_START(Constants_exp_64_T1) +data4 0x3F800000,0x3F8164D2,0x3F82CD87,0x3F843A29 +data4 0x3F85AAC3,0x3F871F62,0x3F88980F,0x3F8A14D5 +data4 0x3F8B95C2,0x3F8D1ADF,0x3F8EA43A,0x3F9031DC +data4 0x3F91C3D3,0x3F935A2B,0x3F94F4F0,0x3F96942D +data4 0x3F9837F0,0x3F99E046,0x3F9B8D3A,0x3F9D3EDA +data4 0x3F9EF532,0x3FA0B051,0x3FA27043,0x3FA43516 +data4 0x3FA5FED7,0x3FA7CD94,0x3FA9A15B,0x3FAB7A3A +data4 0x3FAD583F,0x3FAF3B79,0x3FB123F6,0x3FB311C4 +data4 0x3FB504F3,0x3FB6FD92,0x3FB8FBAF,0x3FBAFF5B +data4 0x3FBD08A4,0x3FBF179A,0x3FC12C4D,0x3FC346CD +data4 0x3FC5672A,0x3FC78D75,0x3FC9B9BE,0x3FCBEC15 +data4 0x3FCE248C,0x3FD06334,0x3FD2A81E,0x3FD4F35B +data4 0x3FD744FD,0x3FD99D16,0x3FDBFBB8,0x3FDE60F5 +data4 0x3FE0CCDF,0x3FE33F89,0x3FE5B907,0x3FE8396A +data4 0x3FEAC0C7,0x3FED4F30,0x3FEFE4BA,0x3FF28177 +data4 0x3FF5257D,0x3FF7D0DF,0x3FFA83B3,0x3FFD3E0C +LOCAL_OBJECT_END(Constants_exp_64_T1) + +LOCAL_OBJECT_START(Constants_exp_64_T2) +data4 0x3F800000,0x3F80058C,0x3F800B18,0x3F8010A4 +data4 0x3F801630,0x3F801BBD,0x3F80214A,0x3F8026D7 +data4 0x3F802C64,0x3F8031F2,0x3F803780,0x3F803D0E +data4 0x3F80429C,0x3F80482B,0x3F804DB9,0x3F805349 +data4 0x3F8058D8,0x3F805E67,0x3F8063F7,0x3F806987 +data4 0x3F806F17,0x3F8074A8,0x3F807A39,0x3F807FCA +data4 0x3F80855B,0x3F808AEC,0x3F80907E,0x3F809610 +data4 0x3F809BA2,0x3F80A135,0x3F80A6C7,0x3F80AC5A +data4 0x3F80B1ED,0x3F80B781,0x3F80BD14,0x3F80C2A8 +data4 0x3F80C83C,0x3F80CDD1,0x3F80D365,0x3F80D8FA +data4 0x3F80DE8F,0x3F80E425,0x3F80E9BA,0x3F80EF50 +data4 0x3F80F4E6,0x3F80FA7C,0x3F810013,0x3F8105AA +data4 0x3F810B41,0x3F8110D8,0x3F81166F,0x3F811C07 +data4 0x3F81219F,0x3F812737,0x3F812CD0,0x3F813269 +data4 0x3F813802,0x3F813D9B,0x3F814334,0x3F8148CE +data4 0x3F814E68,0x3F815402,0x3F81599C,0x3F815F37 +LOCAL_OBJECT_END(Constants_exp_64_T2) + +LOCAL_OBJECT_START(Constants_exp_64_W1) +data8 0x0000000000000000, 0xBE384454171EC4B4 +data8 0xBE6947414AA72766, 0xBE5D32B6D42518F8 +data8 0x3E68D96D3A319149, 0xBE68F4DA62415F36 +data8 0xBE6DDA2FC9C86A3B, 0x3E6B2E50F49228FE +data8 0xBE49C0C21188B886, 0x3E64BFC21A4C2F1F +data8 0xBE6A2FBB2CB98B54, 0x3E5DC5DE9A55D329 +data8 0x3E69649039A7AACE, 0x3E54728B5C66DBA5 +data8 0xBE62B0DBBA1C7D7D, 0x3E576E0409F1AF5F +data8 0x3E6125001A0DD6A1, 0xBE66A419795FBDEF +data8 0xBE5CDE8CE1BD41FC, 0xBE621376EA54964F +data8 0x3E6370BE476E76EE, 0x3E390D1A3427EB92 +data8 0x3E1336DE2BF82BF8, 0xBE5FF1CBD0F7BD9E +data8 0xBE60A3550CEB09DD, 0xBE5CA37E0980F30D +data8 0xBE5C541B4C082D25, 0xBE5BBECA3B467D29 +data8 0xBE400D8AB9D946C5, 0xBE5E2A0807ED374A +data8 0xBE66CB28365C8B0A, 0x3E3AAD5BD3403BCA +data8 0x3E526055C7EA21E0, 0xBE442C75E72880D6 +data8 0x3E58B2BB85222A43, 0xBE5AAB79522C42BF +data8 0xBE605CB4469DC2BC, 0xBE589FA7A48C40DC +data8 0xBE51C2141AA42614, 0xBE48D087C37293F4 +data8 0x3E367A1CA2D673E0, 0xBE51BEBB114F7A38 +data8 0xBE6348E5661A4B48, 0xBDF526431D3B9962 +data8 0x3E3A3B5E35A78A53, 0xBE46C46C1CECD788 +data8 0xBE60B7EC7857D689, 0xBE594D3DD14F1AD7 +data8 0xBE4F9C304C9A8F60, 0xBE52187302DFF9D2 +data8 0xBE5E4C8855E6D68F, 0xBE62140F667F3DC4 +data8 0xBE36961B3BF88747, 0x3E602861C96EC6AA +data8 0xBE3B5151D57FD718, 0x3E561CD0FC4A627B +data8 0xBE3A5217CA913FEA, 0x3E40A3CC9A5D193A +data8 0xBE5AB71310A9C312, 0x3E4FDADBC5F57719 +data8 0x3E361428DBDF59D5, 0x3E5DB5DB61B4180D +data8 0xBE42AD5F7408D856, 0x3E2A314831B2B707 +LOCAL_OBJECT_END(Constants_exp_64_W1) + +LOCAL_OBJECT_START(Constants_exp_64_W2) +data8 0x0000000000000000, 0xBE641F2537A3D7A2 +data8 0xBE68DD57AD028C40, 0xBE5C77D8F212B1B6 +data8 0x3E57878F1BA5B070, 0xBE55A36A2ECAE6FE +data8 0xBE620608569DFA3B, 0xBE53B50EA6D300A3 +data8 0x3E5B5EF2223F8F2C, 0xBE56A0D9D6DE0DF4 +data8 0xBE64EEF3EAE28F51, 0xBE5E5AE2367EA80B +data8 0x3E47CB1A5FCBC02D, 0xBE656BA09BDAFEB7 +data8 0x3E6E70C6805AFEE7, 0xBE6E0509A3415EBA +data8 0xBE56856B49BFF529, 0x3E66DD3300508651 +data8 0x3E51165FC114BC13, 0x3E53333DC453290F +data8 0x3E6A072B05539FDA, 0xBE47CD877C0A7696 +data8 0xBE668BF4EB05C6D9, 0xBE67C3E36AE86C93 +data8 0xBE533904D0B3E84B, 0x3E63E8D9556B53CE +data8 0x3E212C8963A98DC8, 0xBE33138F032A7A22 +data8 0x3E530FA9BC584008, 0xBE6ADF82CCB93C97 +data8 0x3E5F91138370EA39, 0x3E5443A4FB6A05D8 +data8 0x3E63DACD181FEE7A, 0xBE62B29DF0F67DEC +data8 0x3E65C4833DDE6307, 0x3E5BF030D40A24C1 +data8 0x3E658B8F14E437BE, 0xBE631C29ED98B6C7 +data8 0x3E6335D204CF7C71, 0x3E529EEDE954A79D +data8 0x3E5D9257F64A2FB8, 0xBE6BED1B854ED06C +data8 0x3E5096F6D71405CB, 0xBE3D4893ACB9FDF5 +data8 0xBDFEB15801B68349, 0x3E628D35C6A463B9 +data8 0xBE559725ADE45917, 0xBE68C29C042FC476 +data8 0xBE67593B01E511FA, 0xBE4A4313398801ED +data8 0x3E699571DA7C3300, 0x3E5349BE08062A9E +data8 0x3E5229C4755BB28E, 0x3E67E42677A1F80D +data8 0xBE52B33F6B69C352, 0xBE6B3550084DA57F +data8 0xBE6DB03FD1D09A20, 0xBE60CBC42161B2C1 +data8 0x3E56ED9C78A2B771, 0xBE508E319D0FA795 +data8 0xBE59482AFD1A54E9, 0xBE2A17CEB07FD23E +data8 0x3E68BF5C17365712, 0x3E3956F9B3785569 +LOCAL_OBJECT_END(Constants_exp_64_W2) + + +.section .text + +GLOBAL_IEEE754_ENTRY(expm1l) + +// +// Set p7 true for expm1, p6 false +// + +{ .mlx + getf.exp GR_signexp_x = f8 // Get sign and exponent of x, redo if unorm + movl GR_sig_inv_ln2 = 0xb8aa3b295c17f0bc // significand of 1/ln2 +} +{ .mlx + addl GR_ad_Arg = @ltoff(Constants_exp_64_Arg#),gp + movl GR_rshf_2to51 = 0x4718000000000000 // 1.10000 2^(63+51) +} +;; + +{ .mfi + ld8 GR_ad_Arg = [GR_ad_Arg] // Point to Arg table + fclass.m p8, p0 = f8, 0x1E7 // Test x for natval, nan, inf, zero + cmp.eq p7, p6 = r0, r0 +} +{ .mfb + mov GR_exp_half = 0x0FFFE // Exponent of 0.5, for very small path + fnorm.s1 FR_norm_x = f8 // Normalize x + br.cond.sptk exp_continue +} +;; + +GLOBAL_IEEE754_END(expm1l) + + +GLOBAL_IEEE754_ENTRY(expl) +// +// Set p7 false for exp, p6 true +// +{ .mlx + getf.exp GR_signexp_x = f8 // Get sign and exponent of x, redo if unorm + movl GR_sig_inv_ln2 = 0xb8aa3b295c17f0bc // significand of 1/ln2 +} +{ .mlx + addl GR_ad_Arg = @ltoff(Constants_exp_64_Arg#),gp + movl GR_rshf_2to51 = 0x4718000000000000 // 1.10000 2^(63+51) +} +;; + +{ .mfi + ld8 GR_ad_Arg = [GR_ad_Arg] // Point to Arg table + fclass.m p8, p0 = f8, 0x1E7 // Test x for natval, nan, inf, zero + cmp.eq p6, p7 = r0, r0 +} +{ .mfi + mov GR_exp_half = 0x0FFFE // Exponent of 0.5, for very small path + fnorm.s1 FR_norm_x = f8 // Normalize x + nop.i 999 +} +;; + +exp_continue: +// Form two constants we need +// 1/ln2 * 2^63 to compute w = x * 1/ln2 * 128 +// 1.1000..000 * 2^(63+63-12) to right shift int(N) into the significand + +{ .mfi + setf.sig FR_INV_LN2_2TO63 = GR_sig_inv_ln2 // form 1/ln2 * 2^63 + fclass.nm.unc p9, p0 = f8, 0x1FF // Test x for unsupported + mov GR_exp_2tom51 = 0xffff-51 +} +{ .mlx + setf.d FR_RSHF_2TO51 = GR_rshf_2to51 // Form const 1.1000 * 2^(63+51) + movl GR_rshf = 0x43e8000000000000 // 1.10000 2^63 for right shift +} +;; + +{ .mfi + setf.exp FR_half = GR_exp_half // Form 0.5 for very small path + fma.s1 FR_scale = f1,f1,f0 // Scale = 1.0 + mov GR_exp_bias = 0x0FFFF // Set exponent bias +} +{ .mib + add GR_ad_Limits = 0x20, GR_ad_Arg // Point to Limits table + mov GR_exp_mask = 0x1FFFF // Form exponent mask +(p8) br.cond.spnt EXP_64_SPECIAL // Branch if natval, nan, inf, zero +} +;; + +{ .mfi + setf.exp FR_2TOM51 = GR_exp_2tom51 // Form 2^-51 for scaling float_N + nop.f 999 + add GR_ad_A = 0x40, GR_ad_Arg // Point to A table +} +{ .mib + setf.d FR_RSHF = GR_rshf // Form right shift const 1.1000 * 2^63 + add GR_ad_T1 = 0x160, GR_ad_Arg // Point to T1 table +(p9) br.cond.spnt EXP_64_UNSUPPORTED // Branch if unsupported +} +;; + +.pred.rel "mutex",p6,p7 +{ .mfi + ldfe FR_L_hi = [GR_ad_Arg],16 // Get L_hi + fcmp.eq.s0 p9,p0 = f8, f0 // Dummy op to flag denormals +(p6) add GR_ad_PQ = 0x30, GR_ad_A // Point to P table for exp +} +{ .mfi + ldfe FR_min_oflow_x = [GR_ad_Limits],16 // Get min x to cause overflow + fmpy.s1 FR_rsq = f8, f8 // rsq = x * x for small path +(p7) add GR_ad_PQ = 0x90, GR_ad_A // Point to Q table for expm1 +};; + +{ .mmi + ldfe FR_L_lo = [GR_ad_Arg],16 // Get L_lo + ldfe FR_zero_uflow_x = [GR_ad_Limits],16 // Get x for zero uflow result + add GR_ad_W1 = 0x200, GR_ad_T1 // Point to W1 table +} +;; + +{ .mfi + ldfe FR_P6Q9 = [GR_ad_PQ],16 // P6(exp) or Q9(expm1) for small path + mov FR_r = FR_norm_x // r = X for small path + mov GR_very_small_exp = -60 // Exponent of x for very small path +} +{ .mfi + add GR_ad_W2 = 0x400, GR_ad_T1 // Point to W2 table + nop.f 999 +(p7) mov GR_small_exp = -7 // Exponent of x for small path expm1 +} +;; + +{ .mmi + ldfe FR_P5Q8 = [GR_ad_PQ],16 // P5(exp) or Q8(expm1) for small path + and GR_exp_x = GR_signexp_x, GR_exp_mask +(p6) mov GR_small_exp = -12 // Exponent of x for small path exp +} +;; + +// N_signif = X * Inv_log2_by_2^12 +// By adding 1.10...0*2^63 we shift and get round_int(N_signif) in significand. +// We actually add 1.10...0*2^51 to X * Inv_log2 to do the same thing. +{ .mfi + ldfe FR_P4Q7 = [GR_ad_PQ],16 // P4(exp) or Q7(expm1) for small path + fma.s1 FR_N_signif = FR_norm_x, FR_INV_LN2_2TO63, FR_RSHF_2TO51 + nop.i 999 +} +{ .mfi + sub GR_exp_x = GR_exp_x, GR_exp_bias // Get exponent + fmpy.s1 FR_r4 = FR_rsq, FR_rsq // Form r4 for small path + cmp.eq.unc p15, p0 = r0, r0 // Set Safe as default +} +;; + +{ .mmi + ldfe FR_P3Q6 = [GR_ad_PQ],16 // P3(exp) or Q6(expm1) for small path + cmp.lt p14, p0 = GR_exp_x, GR_very_small_exp // Is |x| < 2^-60? + nop.i 999 +} +;; + +{ .mfi + ldfe FR_P2Q5 = [GR_ad_PQ],16 // P2(exp) or Q5(expm1) for small path + fmpy.s1 FR_half_x = FR_half, FR_norm_x // 0.5 * x for very small path + cmp.lt p13, p0 = GR_exp_x, GR_small_exp // Is |x| < 2^-m? +} +{ .mib + nop.m 999 + nop.i 999 +(p14) br.cond.spnt EXP_VERY_SMALL // Branch if |x| < 2^-60 +} +;; + +{ .mfi + ldfe FR_A3 = [GR_ad_A],16 // Get A3 for normal path + fcmp.ge.s1 p10,p0 = FR_norm_x, FR_min_oflow_x // Will result overflow? + mov GR_big_expo_neg = -16381 // -0x3ffd +} +{ .mfb + ldfe FR_P1Q4 = [GR_ad_PQ],16 // P1(exp) or Q4(expm1) for small path + nop.f 999 +(p13) br.cond.spnt EXP_SMALL // Branch if |x| < 2^-m + // m=12 for exp, m=7 for expm1 +} +;; + +// Now we are on the main path for |x| >= 2^-m, m=12 for exp, m=7 for expm1 +// +// float_N = round_int(N_signif) +// The signficand of N_signif contains the rounded integer part of X * 2^12/ln2, +// as a twos complement number in the lower bits (that is, it may be negative). +// That twos complement number (called N) is put into GR_N. + +// Since N_signif is scaled by 2^51, it must be multiplied by 2^-51 +// before the shift constant 1.10000 * 2^63 is subtracted to yield float_N. +// Thus, float_N contains the floating point version of N + + +{ .mfi + ldfe FR_A2 = [GR_ad_A],16 // Get A2 for main path + fcmp.lt.s1 p11,p0 = FR_norm_x, FR_zero_uflow_x // Certain zero, uflow? + add GR_ad_T2 = 0x100, GR_ad_T1 // Point to T2 table +} +{ .mfi + nop.m 999 + fms.s1 FR_float_N = FR_N_signif, FR_2TOM51, FR_RSHF // Form float_N + nop.i 999 +} +;; + +{ .mbb + getf.sig GR_N_fix = FR_N_signif // Get N from significand +(p10) br.cond.spnt EXP_OVERFLOW // Branch if result will overflow +(p11) br.cond.spnt EXP_CERTAIN_UNDERFLOW_ZERO // Branch if certain zero, uflow +} +;; + +{ .mfi + ldfe FR_A1 = [GR_ad_A],16 // Get A1 for main path + fnma.s1 FR_r = FR_L_hi, FR_float_N, FR_norm_x // r = -L_hi * float_N + x + extr.u GR_M1 = GR_N_fix, 6, 6 // Extract index M_1 +} +{ .mfi + and GR_M2 = 0x3f, GR_N_fix // Extract index M_2 + nop.f 999 + nop.i 999 +} +;; + +// N_fix is only correct up to 50 bits because of our right shift technique. +// Actually in the normal path we will have restricted K to about 14 bits. +// Somewhat arbitrarily we extract 32 bits. +{ .mfi + shladd GR_ad_W1 = GR_M1,3,GR_ad_W1 // Point to W1 + nop.f 999 + extr GR_K = GR_N_fix, 12, 32 // Extract limited range K +} +{ .mfi + shladd GR_ad_T1 = GR_M1,2,GR_ad_T1 // Point to T1 + nop.f 999 + shladd GR_ad_T2 = GR_M2,2,GR_ad_T2 // Point to T2 +} +;; + +{ .mmi + ldfs FR_T1 = [GR_ad_T1],0 // Get T1 + ldfd FR_W1 = [GR_ad_W1],0 // Get W1 + add GR_exp_2_k = GR_exp_bias, GR_K // Form exponent of 2^k +} +;; + +{ .mmi + ldfs FR_T2 = [GR_ad_T2],0 // Get T2 + shladd GR_ad_W2 = GR_M2,3,GR_ad_W2 // Point to W2 + sub GR_exp_2_mk = GR_exp_bias, GR_K // Form exponent of 2^-k +} +;; + +{ .mmf + ldfd FR_W2 = [GR_ad_W2],0 // Get W2 + setf.exp FR_scale = GR_exp_2_k // Set scale = 2^k + fnma.s1 FR_r = FR_L_lo, FR_float_N, FR_r // r = -L_lo * float_N + r +} +;; + +{ .mfi + setf.exp FR_2_mk = GR_exp_2_mk // Form 2^-k + fma.s1 FR_poly = FR_r, FR_A3, FR_A2 // poly = r * A3 + A2 + cmp.lt p8,p15 = GR_K,GR_big_expo_neg // Set Safe if K > big_expo_neg +} +{ .mfi + nop.m 999 + fmpy.s1 FR_rsq = FR_r, FR_r // rsq = r * r + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fmpy.s1 FR_T = FR_T1, FR_T2 // T = T1 * T2 + nop.i 999 +} +{ .mfi + nop.m 999 + fadd.s1 FR_W1_p1 = FR_W1, f1 // W1_p1 = W1 + 1.0 + nop.i 999 +} +;; + +{ .mfi +(p7) cmp.lt.unc p8, p9 = 10, GR_K // If expm1, set p8 if K > 10 + fma.s1 FR_poly = FR_r, FR_poly, FR_A1 // poly = r * poly + A1 + nop.i 999 +} +;; + +{ .mfi +(p7) cmp.eq p15, p0 = r0, r0 // If expm1, set Safe flag + fma.s1 FR_T_scale = FR_T, FR_scale, f0 // T_scale = T * scale +(p9) cmp.gt.unc p9, p10 = -10, GR_K // If expm1, set p9 if K < -10 + // If expm1, set p10 if -10<=K<=10 +} +{ .mfi + nop.m 999 + fma.s1 FR_W = FR_W2, FR_W1_p1, FR_W1 // W = W2 * (W1+1.0) + W1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + mov FR_Y_hi = FR_T // Assume Y_hi = T + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 FR_poly = FR_rsq, FR_poly, FR_r // poly = rsq * poly + r + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 FR_Wp1_T_scale = FR_W, FR_T_scale, FR_T_scale // (W+1)*T*scale + nop.i 999 +} +{ .mfi + nop.m 999 + fma.s1 FR_W_T_scale = FR_W, FR_T_scale, f0 // W*T*scale + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fsub.s1 FR_Y_hi = f0, FR_2_mk // If expm1, if K < -10 set Y_hi + nop.i 999 +} +{ .mfi + nop.m 999 +(p10) fsub.s1 FR_Y_hi = FR_T, FR_2_mk // If expm1, if |K|<=10 set Y_hi + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s1 FR_result_lo = FR_Wp1_T_scale, FR_poly, FR_W_T_scale + nop.i 999 +} +;; + +.pred.rel "mutex",p8,p9 +// If K > 10 adjust result_lo = result_lo - scale * 2^-k +// If |K| <= 10 adjust result_lo = result_lo + scale * T +{ .mfi + nop.m 999 +(p8) fnma.s1 FR_result_lo = FR_scale, FR_2_mk, FR_result_lo // If K > 10 + nop.i 999 +} +{ .mfi + nop.m 999 +(p9) fma.s1 FR_result_lo = FR_T_scale, f1, FR_result_lo // If |K| <= 10 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fmpy.s0 FR_tmp = FR_A1, FR_A1 // Dummy op to set inexact + nop.i 999 +} +{ .mfb + nop.m 999 +(p15) fma.s0 f8 = FR_Y_hi, FR_scale, FR_result_lo // Safe result +(p15) br.ret.sptk b0 // Safe exit for normal path +} +;; + +// Here if unsafe, will only be here for exp with K < big_expo_neg +{ .mfb + nop.m 999 + fma.s0 FR_RESULT = FR_Y_hi, FR_scale, FR_result_lo // Prelim result + br.cond.sptk EXP_POSSIBLE_UNDERFLOW // Branch to unsafe code +} +;; + + +EXP_SMALL: +// Here if 2^-60 < |x| < 2^-m, m=12 for exp, m=7 for expm1 +{ .mfi +(p7) ldfe FR_Q3 = [GR_ad_Q],16 // Get Q3 for small path, if expm1 +(p6) fma.s1 FR_p65 = FR_P6, FR_r, FR_P5 // If exp, p65 = P6 * r + P5 + nop.i 999 +} +{ .mfi + mov GR_minus_one = -1 +(p7) fma.s1 FR_q98 = FR_Q9, FR_r, FR_Q8 // If expm1, q98 = Q9 * r + Q8 + nop.i 999 +} +;; + +{ .mfi +(p7) ldfe FR_Q2 = [GR_ad_Q],16 // Get Q2 for small path, if expm1 +(p7) fma.s1 FR_q65 = FR_Q6, FR_r, FR_Q5 // If expm1, q65 = Q6 * r + Q5 + nop.i 999 +} +;; + +{ .mfi + setf.sig FR_tmp = GR_minus_one // Create value to force inexact +(p6) fma.s1 FR_p21 = FR_P2, FR_r, FR_P1 // If exp, p21 = P2 * r + P1 + nop.i 999 +} +{ .mfi +(p7) ldfe FR_Q1 = [GR_ad_Q],16 // Get Q1 for small path, if expm1 +(p7) fma.s1 FR_q43 = FR_Q4, FR_r, FR_Q3 // If expm1, q43 = Q4 * r + Q3 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p6) fma.s1 FR_p654 = FR_p65, FR_r, FR_P4 // If exp, p654 = p65 * r + P4 + nop.i 999 +} +{ .mfi + nop.m 999 +(p7) fma.s1 FR_q987 = FR_q98, FR_r, FR_Q7 // If expm1, q987 = q98 * r + Q7 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p7) fma.s1 FR_q21 = FR_Q2, FR_r, FR_Q1 // If expm1, q21 = Q2 * r + Q1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p6) fma.s1 FR_p210 = FR_p21, FR_rsq, FR_r // If exp, p210 = p21 * r + P0 + nop.i 999 +} +{ .mfi + nop.m 999 +(p7) fma.s1 FR_q6543 = FR_q65, FR_rsq, FR_q43 // If expm1, q6543 = q65*r2+q43 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p6) fma.s1 FR_p6543 = FR_p654, FR_r, FR_P3 // If exp, p6543 = p654 * r + P3 + nop.i 999 +} +{ .mfi + nop.m 999 +(p7) fma.s1 FR_q9876543 = FR_q987, FR_r4, FR_q6543 // If expm1, q9876543 = ... + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p6) fma.s1 FR_Y_lo = FR_p6543, FR_r4, FR_p210 // If exp, form Y_lo + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p7) fma.s1 FR_Y_lo = FR_q9876543, FR_rsq, FR_q21 // If expm1, form Y_lo + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fmpy.s0 FR_tmp = FR_tmp, FR_tmp // Dummy op to set inexact + nop.i 999 +} +;; + +.pred.rel "mutex",p6,p7 +{ .mfi + nop.m 999 +(p6) fma.s0 f8 = FR_Y_lo, f1, f1 // If exp, result = 1 + Y_lo + nop.i 999 +} +{ .mfb + nop.m 999 +(p7) fma.s0 f8 = FR_Y_lo, FR_rsq, FR_norm_x // If expm1, result = Y_lo*r2+x + br.ret.sptk b0 // Exit for 2^-60 <= |x| < 2^-m + // m=12 for exp, m=7 for expm1 +} +;; + + +EXP_VERY_SMALL: +// +// Here if 0 < |x| < 2^-60 +// If exp, result = 1.0 + x +// If expm1, result = x +x*x/2, but have to check for possible underflow +// + +{ .mfi +(p7) mov GR_exp_underflow = -16381 // Exponent for possible underflow +(p6) fadd.s0 f8 = f1, FR_norm_x // If exp, result = 1+x + nop.i 999 +} +{ .mfi + nop.m 999 +(p7) fmpy.s1 FR_result_lo = FR_half_x, FR_norm_x // If expm1 result_lo = x*x/2 + nop.i 999 +} +;; + +{ .mfi +(p7) cmp.lt.unc p0, p8 = GR_exp_x, GR_exp_underflow // Unsafe if expm1 x small +(p7) mov FR_Y_hi = FR_norm_x // If expm1, Y_hi = x +(p7) cmp.lt p0, p15 = GR_exp_x, GR_exp_underflow // Unsafe if expm1 x small +} +;; + +{ .mfb + nop.m 999 +(p8) fma.s0 f8 = FR_norm_x, f1, FR_result_lo // If expm1, result=x+x*x/2 +(p15) br.ret.sptk b0 // If Safe, exit +} +;; + +// Here if expm1 and 0 < |x| < 2^-16381; may be possible underflow +{ .mfb + nop.m 999 + fma.s0 FR_RESULT = FR_Y_hi, FR_scale, FR_result_lo // Prelim result + br.cond.sptk EXP_POSSIBLE_UNDERFLOW // Branch to unsafe code +} +;; + +EXP_CERTAIN_UNDERFLOW_ZERO: +// Here if x < zero_uflow_x +// For exp, set result to tiny+0.0 and set I, U, and branch to error handling +// For expm1, set result to tiny-1.0 and set I, and exit +{ .mmi + alloc GR_SAVE_PFS = ar.pfs,0,3,4,0 + nop.m 999 + mov GR_one = 1 +} +;; + +{ .mmi + setf.exp FR_small = GR_one // Form small value + nop.m 999 +(p6) mov GR_Parameter_TAG = 13 // Error tag for exp underflow +} +;; + +{ .mfi + nop.m 999 + fmerge.s FR_X = f8,f8 // Save x for error call + nop.i 999 +} +;; + +.pred.rel "mutex",p6,p7 +{ .mfb + nop.m 999 +(p6) fma.s0 FR_RESULT = FR_small, FR_small, f0 // If exp, set I,U, tiny result +(p6) br.cond.sptk __libm_error_region // If exp, go to error handling +} +{ .mfb + nop.m 999 +(p7) fms.s0 f8 = FR_small, FR_small, f1 // If expm1, set I, result -1.0 +(p7) br.ret.sptk b0 // If expm1, exit +} +;; + + +EXP_OVERFLOW: +// Here if x >= min_oflow_x +{ .mmi + alloc GR_SAVE_PFS = ar.pfs,0,3,4,0 + mov GR_huge_exp = 0x1fffe + nop.i 999 +} +{ .mfi + mov GR_huge_signif = -0x1 + nop.f 999 +(p6) mov GR_Parameter_TAG = 12 // Error tag for exp overflow +} +;; + +{ .mmf + setf.exp FR_huge_exp = GR_huge_exp // Create huge value + setf.sig FR_huge_signif = GR_huge_signif // Create huge value + fmerge.s FR_X = f8,f8 // Save x for error call +} +;; + +{ .mfi + nop.m 999 + fmerge.se FR_huge = FR_huge_exp, FR_huge_signif +(p7) mov GR_Parameter_TAG = 39 // Error tag for expm1 overflow +} +;; + +{ .mfb + nop.m 999 + fma.s0 FR_RESULT = FR_huge, FR_huge, FR_huge // Force I, O, and Inf + br.cond.sptk __libm_error_region // Branch to error handling +} +;; + + + +EXP_POSSIBLE_UNDERFLOW: +// Here if exp and zero_uflow_x < x < about -11356 [where k < -16381] +// Here if expm1 and |x| < 2^-16381 +{ .mfi + alloc GR_SAVE_PFS = ar.pfs,0,3,4,0 + fsetc.s2 0x7F,0x41 // Set FTZ and disable traps + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fma.s2 FR_ftz = FR_Y_hi, FR_scale, FR_result_lo // Result with FTZ + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fsetc.s2 0x7F,0x40 // Disable traps (set s2 default) + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p6) fclass.m.unc p11, p0 = FR_ftz, 0x00F // If exp, FTZ result denorm or zero? + nop.i 999 +} +;; + +{ .mfb +(p11) mov GR_Parameter_TAG = 13 // exp underflow + fmerge.s FR_X = f8,f8 // Save x for error call +(p11) br.cond.spnt __libm_error_region // Branch on exp underflow +} +;; + +{ .mfb + nop.m 999 + mov f8 = FR_RESULT // Was safe after all + br.ret.sptk b0 +} +;; + + +EXP_64_SPECIAL: +// Here if x natval, nan, inf, zero +// If x natval, +inf, or if expm1 and x zero, just return x. +// The other cases must be tested for, and results set. +// These cases do not generate exceptions. +{ .mfi + nop.m 999 + fclass.m p8, p0 = f8, 0x0c3 // Is x nan? + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p6) fclass.m.unc p13, p0 = f8, 0x007 // If exp, is x zero? + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p6) fclass.m.unc p11, p0 = f8, 0x022 // If exp, is x -inf? + nop.i 999 +} +{ .mfi + nop.m 999 +(p8) fadd.s0 f8 = f8, f1 // If x nan, result quietized x + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p7) fclass.m.unc p10, p0 = f8, 0x022 // If expm1, is x -inf? + nop.i 999 +} +{ .mfi + nop.m 999 +(p13) fadd.s0 f8 = f0, f1 // If exp and x zero, result 1.0 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p11) mov f8 = f0 // If exp and x -inf, result 0 + nop.i 999 +} +;; + +{ .mfb + nop.m 999 +(p10) fsub.s1 f8 = f0, f1 // If expm1, x -inf, result -1.0 + br.ret.sptk b0 // Exit special cases +} +;; + + +EXP_64_UNSUPPORTED: +// Here if x unsupported type +{ .mfb + nop.m 999 + fmpy.s0 f8 = f8, f0 // Return nan + br.ret.sptk b0 +} +;; + +GLOBAL_IEEE754_END(expl) + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfe [GR_Parameter_Y] = FR_Y,16 // Save Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; +.body +{ .mib + stfe [GR_Parameter_X] = FR_X // Store Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y + nop.b 0 // Parameter 3 address +} +{ .mib + stfe [GR_Parameter_Y] = FR_RESULT // Store Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; +{ .mmi + ldfe f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; +LOCAL_LIBM_END(__libm_error_region#) + +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/s_fabs.S b/sysdeps/ia64/fpu/s_fabs.S new file mode 100644 index 0000000000..3434389a3c --- /dev/null +++ b/sysdeps/ia64/fpu/s_fabs.S @@ -0,0 +1,82 @@ +.file "fabs.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 02/07/02 Added __libm_fabs entry point to test in case compiler inlines +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// +// API +//============================================================== +// double fabs (double x) +// +// Overview of operation +//============================================================== +// returns absolute value of x + +// floating-point registers used: 1 +// f8, input + +.section .text +.global __libm_fabs# + +.proc __libm_fabs# +__libm_fabs: +.endp __libm_fabs# + +GLOBAL_IEEE754_ENTRY(fabs) + +// set invalid or denormal flags and take fault if +// necessary + +{ .mfi + nop.m 999 + fcmp.eq.unc.s0 p6,p7 = f8,f1 + nop.i 999 ;; +} + +{ .mfb + nop.m 999 + fmerge.s f8 = f0,f8 + br.ret.sptk b0 ;; +} + +GLOBAL_IEEE754_END(fabs) diff --git a/sysdeps/ia64/fpu/s_fabsf.S b/sysdeps/ia64/fpu/s_fabsf.S new file mode 100644 index 0000000000..71bb6da882 --- /dev/null +++ b/sysdeps/ia64/fpu/s_fabsf.S @@ -0,0 +1,82 @@ +.file "fabsf.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 02/07/02 Added __libm_fabsf entry point to test in case compiler inlines +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// +// API +//============================================================== +// float fabsf (float x) +// +// Overview of operation +//============================================================== +// returns absolute value of x + +// floating-point registers used: 1 +// f8, input + +.section .text +.global __libm_fabsf# + +.proc __libm_fabsf# +__libm_fabsf: +.endp __libm_fabsf# + +GLOBAL_IEEE754_ENTRY(fabsf) + +// set invalid or denormal flags and take fault if +// necessary + +{ .mfi + nop.m 999 + fcmp.eq.unc.s0 p6,p7 = f8,f1 + nop.i 999 ;; +} + +{ .mfb + nop.m 999 + fmerge.s f8 = f0,f8 + br.ret.sptk b0 ;; +} + +GLOBAL_IEEE754_END(fabsf) diff --git a/sysdeps/ia64/fpu/s_fabsl.S b/sysdeps/ia64/fpu/s_fabsl.S new file mode 100644 index 0000000000..a048949147 --- /dev/null +++ b/sysdeps/ia64/fpu/s_fabsl.S @@ -0,0 +1,82 @@ +.file "fabsl.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 02/07/02 Added __libm_fabsl entry point to test in case compiler inlines +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// +// API +//============================================================== +// long double fabsl (long double x) +// +// Overview of operation +//============================================================== +// returns absolute value of x + +// floating-point registers used: 1 +// f8, input + +.section .text +.global __libm_fabsl# + +.proc __libm_fabsl# +__libm_fabsl: +.endp __libm_fabsl# + +GLOBAL_IEEE754_ENTRY(fabsl) + +// set invalid or denormal flags and take fault if +// necessary + +{ .mfi + nop.m 999 + fcmp.eq.unc.s0 p6,p7 = f8,f1 + nop.i 999 ;; +} + +{ .mfb + nop.m 999 + fmerge.s f8 = f0,f8 + br.ret.sptk b0 ;; +} + +GLOBAL_IEEE754_END(fabsl) diff --git a/sysdeps/ia64/fpu/s_fdim.S b/sysdeps/ia64/fpu/s_fdim.S new file mode 100644 index 0000000000..eff290c593 --- /dev/null +++ b/sysdeps/ia64/fpu/s_fdim.S @@ -0,0 +1,228 @@ +.file "fdim.s" + + +// Copyright (c) 2001 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2001 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 06/08/01 Initial version +// 08/23/01 Corrected error tag number +// 05/20/02 Cleaned up namespace and sf0 syntax +// 01/28/03 Improved performance +// +// API +//============================================================== +// double fdim( double x, double y ); +// input floating point f8, f9 +// output floating point f8 +// +// +// Overview of operation +//============================================================== +// fdim determines the positive difference between the arguments +// Result = x - y if x > y +// = +0 if x <= y +// +// Error support is called if x-y overflows for x > y +// + +// Registers used +//============================================================== +// General purpose registers: r14, r32 - r39 + +rExpBig = r14 + +// r36-39 parameters for libm_error_support +GR_SAVE_B0 = r33 +GR_SAVE_GP = r34 +GR_SAVE_PFS = r35 + +GR_Parameter_X = r36 +GR_Parameter_Y = r37 +GR_Parameter_RESULT = r38 +GR_Parameter_TAG = r39 + +// Floating-point registers: f8 - f12 + +f_tmp_result = f10 +fBig = f11 +fNormX = f12 + +// Predicate registers: p6 - p10 + + +.section .text +GLOBAL_LIBM_ENTRY(fdim) + +{ .mfi + mov rExpBig = 0x103ff // Exponent to indicate overflow + fcmp.le.s1 p6,p7 = f8, f9 // Is x <= y? + nop.i 0 +} +{ .mfi + nop.m 0 + fnorm.s1 fNormX = f8 // Save x + nop.i 0 +} +;; + +{ .mfi + setf.exp fBig = rExpBig // Constant to test for overflow + fcmp.eq.s0 p8,p0 = f8, f9 // Dummy op to set Denormal or Invalid + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fclass.m p9,p10 = f8, 0x1e3 // Test for x natval, nan, inf + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p6) fmerge.s f8 = f0, f0 // Result is +0 if x <= y + nop.i 0 +} +{ .mfi + nop.m 0 +(p7) fms.d.s0 f8 = f8, f1, f9 // Result is x - y if x > y + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p10) fclass.m p9,p10 = f9, 0x1e3 // Test for y natval, nan, inf + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p10) fcmp.ge.s1 p8,p0 = f8, fBig // Test result for overflow + nop.i 0 +} +;; + +{ .mbb +(p9) cmp.ne p8,p0 = r0,r0 // Clear p8 if x or y natval,nan,inf +(p8) br.cond.spnt FDIM_OVERFLOW // Branch if result overflows + br.ret.sptk b0 // Normal return +} +;; + + +// Here if result will overflow +FDIM_OVERFLOW: +{ .mfi + alloc r32=ar.pfs,2,2,4,0 + fms.d.s0 f_tmp_result = f8,f1,f9 // Normalize result force overflow + nop.i 0 +} +{ .mfb + mov GR_Parameter_TAG = 196 // Error code + nop.f 0 + br.cond.sptk __libm_error_region // Branch to error code +} +;; + +GLOBAL_LIBM_END(fdim) + + +LOCAL_LIBM_ENTRY(__libm_error_region) +// Call error support to report possible range error +.prologue + +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; + +{ .mmi + stfd [GR_Parameter_Y] = f9,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; + +.body +{ .mib + stfd [GR_Parameter_X] = fNormX // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfd [GR_Parameter_Y] = f_tmp_result // STORE Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; + +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; + +{ .mmi + ldfd f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; + +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) + + +.type __libm_error_support#,@function +.global __libm_error_support# + diff --git a/sysdeps/ia64/fpu/s_fdimf.S b/sysdeps/ia64/fpu/s_fdimf.S new file mode 100644 index 0000000000..76d69d1cc9 --- /dev/null +++ b/sysdeps/ia64/fpu/s_fdimf.S @@ -0,0 +1,228 @@ +.file "fdimf.s" + + +// Copyright (c) 2001 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2001 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 06/08/01 Initial version +// 08/23/01 Corrected error tag number +// 05/20/02 Cleaned up namespace and sf0 syntax +// 01/28/03 Improved performance; fixed parameters for call to error routine +// +// API +//============================================================== +// float fdimf( float x, float y ); +// input floating point f8, f9 +// output floating point f8 +// +// +// Overview of operation +//============================================================== +// fdimf determines the positive difference between the arguments +// Result = x - y if x > y +// = +0 if x <= y +// +// Error support is called if x-y overflows for x > y +// + +// Registers used +//============================================================== +// General purpose registers: r14, r32 - r39 + +rExpBig = r14 + +// r36-39 parameters for libm_error_support +GR_SAVE_B0 = r33 +GR_SAVE_GP = r34 +GR_SAVE_PFS = r35 + +GR_Parameter_X = r36 +GR_Parameter_Y = r37 +GR_Parameter_RESULT = r38 +GR_Parameter_TAG = r39 + +// Floating-point registers: f8 - f12 + +f_tmp_result = f10 +fBig = f11 +fNormX = f12 + +// Predicate registers: p6 - p10 + + +.section .text +GLOBAL_LIBM_ENTRY(fdimf) + +{ .mfi + mov rExpBig = 0x1007f // Exponent to indicate overflow + fcmp.le.s1 p6,p7 = f8, f9 // Is x <= y? + nop.i 0 +} +{ .mfi + nop.m 0 + fnorm.s1 fNormX = f8 // Save x + nop.i 0 +} +;; + +{ .mfi + setf.exp fBig = rExpBig // Constant to test for overflow + fcmp.eq.s0 p8,p0 = f8, f9 // Dummy op to set Denormal or Invalid + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fclass.m p9,p10 = f8, 0x1e3 // Test for x natval, nan, inf + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p6) fmerge.s f8 = f0, f0 // Result is +0 if x <= y + nop.i 0 +} +{ .mfi + nop.m 0 +(p7) fms.s.s0 f8 = f8, f1, f9 // Result is x - y if x > y + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p10) fclass.m p9,p10 = f9, 0x1e3 // Test for y natval, nan, inf + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p10) fcmp.ge.s1 p8,p0 = f8, fBig // Test result for overflow + nop.i 0 +} +;; + +{ .mbb +(p9) cmp.ne p8,p0 = r0,r0 // Clear p8 if x or y natval,nan,inf +(p8) br.cond.spnt FDIM_OVERFLOW // Branch if result overflows + br.ret.sptk b0 // Normal return +} +;; + + +// Here if result will overflow +FDIM_OVERFLOW: +{ .mfi + alloc r32=ar.pfs,2,2,4,0 + fms.s.s0 f_tmp_result = f8,f1,f9 // Normalize result force overflow + nop.i 0 +} +{ .mfb + mov GR_Parameter_TAG = 197 // Error code + nop.f 0 + br.cond.sptk __libm_error_region // Branch to error code +} +;; + +GLOBAL_LIBM_END(fdimf) + + +LOCAL_LIBM_ENTRY(__libm_error_region) +// Call error support to report possible range error +.prologue + +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; + +{ .mmi + stfs [GR_Parameter_Y] = f9,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; + +.body +{ .mib + stfs [GR_Parameter_X] = fNormX // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfs [GR_Parameter_Y] = f_tmp_result // STORE Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; + +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; + +{ .mmi + ldfs f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; + +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) + + +.type __libm_error_support#,@function +.global __libm_error_support# + diff --git a/sysdeps/ia64/fpu/s_fdiml.S b/sysdeps/ia64/fpu/s_fdiml.S new file mode 100644 index 0000000000..2227debdb3 --- /dev/null +++ b/sysdeps/ia64/fpu/s_fdiml.S @@ -0,0 +1,228 @@ +.file "fdiml.s" + + +// Copyright (c) 2001 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2001 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 06/08/01 Initial version +// 08/23/01 Corrected error tag number +// 05/20/02 Cleaned up namespace and sf0 syntax +// 01/28/03 Improved performance; fixed parameters for call to error routine +// +// API +//============================================================== +// long double fdiml( long double x, long double y ); +// input floating point f8, f9 +// output floating point f8 +// +// +// Overview of operation +//============================================================== +// fdiml determines the positive difference between the arguments +// Result = x - y if x > y +// = +0 if x <= y +// +// Error support is called if x-y overflows for x > y +// + +// Registers used +//============================================================== +// General purpose registers: r14, r32 - r39 + +rExpBig = r14 + +// r36-39 parameters for libm_error_support +GR_SAVE_B0 = r33 +GR_SAVE_GP = r34 +GR_SAVE_PFS = r35 + +GR_Parameter_X = r36 +GR_Parameter_Y = r37 +GR_Parameter_RESULT = r38 +GR_Parameter_TAG = r39 + +// Floating-point registers: f8 - f12 + +f_tmp_result = f10 +fBig = f11 +fNormX = f12 + +// Predicate registers: p6 - p10 + + +.section .text +GLOBAL_LIBM_ENTRY(fdiml) + +{ .mfi + mov rExpBig = 0x13fff // Exponent to indicate overflow + fcmp.le.s1 p6,p7 = f8, f9 // Is x <= y? + nop.i 0 +} +{ .mfi + nop.m 0 + fnorm.s1 fNormX = f8 // Save x + nop.i 0 +} +;; + +{ .mfi + setf.exp fBig = rExpBig // Constant to test for overflow + fcmp.eq.s0 p8,p0 = f8, f9 // Dummy op to set Denormal or Invalid + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fclass.m p9,p10 = f8, 0x1e3 // Test for x natval, nan, inf + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p6) fmerge.s f8 = f0, f0 // Result is +0 if x <= y + nop.i 0 +} +{ .mfi + nop.m 0 +(p7) fms.s0 f8 = f8, f1, f9 // Result is x - y if x > y + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p10) fclass.m p9,p10 = f9, 0x1e3 // Test for y natval, nan, inf + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p10) fcmp.ge.s1 p8,p0 = f8, fBig // Test result for overflow + nop.i 0 +} +;; + +{ .mbb +(p9) cmp.ne p8,p0 = r0,r0 // Clear p8 if x or y natval,nan,inf +(p8) br.cond.spnt FDIM_OVERFLOW // Branch if result overflows + br.ret.sptk b0 // Normal return +} +;; + + +// Here if result will overflow +FDIM_OVERFLOW: +{ .mfi + alloc r32=ar.pfs,2,2,4,0 + fms.s0 f_tmp_result = f8,f1,f9 // Normalize result force overflow + nop.i 0 +} +{ .mfb + mov GR_Parameter_TAG = 195 // Error code + nop.f 0 + br.cond.sptk __libm_error_region // Branch to error code +} +;; + +GLOBAL_LIBM_END(fdiml) + + +LOCAL_LIBM_ENTRY(__libm_error_region) +// Call error support to report possible range error +.prologue + +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; + +{ .mmi + stfe [GR_Parameter_Y] = f9,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; + +.body +{ .mib + stfe [GR_Parameter_X] = fNormX // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfe [GR_Parameter_Y] = f_tmp_result // STORE Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; + +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; + +{ .mmi + ldfe f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; + +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) + + +.type __libm_error_support#,@function +.global __libm_error_support# + diff --git a/sysdeps/ia64/fpu/s_finite.S b/sysdeps/ia64/fpu/s_finite.S new file mode 100644 index 0000000000..78d3db5035 --- /dev/null +++ b/sysdeps/ia64/fpu/s_finite.S @@ -0,0 +1,45 @@ +/* Copyright (C) 2000, 2002 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. */ + +#include +#undef ret + +ENTRY (__finite) +{ +.mfi + fclass.m p6, p7 = farg0, @nat | @qnan | @snan | @inf + ;; +} +{ +.mib +(p6) mov ret0 = 0 +(p7) mov ret0 = 1 + br.ret.sptk.many rp +} +END (__finite) + +strong_alias (__finite, __finitef) +strong_alias (__finite, __finitel) + +weak_alias (__finite, finite) +weak_alias (__finitef, finitef) +weak_alias (__finitel, finitel) + +hidden_def (__finite) +hidden_def (__finitef) +hidden_def (__finitel) diff --git a/sysdeps/ia64/fpu/s_finitef.S b/sysdeps/ia64/fpu/s_finitef.S new file mode 100644 index 0000000000..cf9b5ce8ba --- /dev/null +++ b/sysdeps/ia64/fpu/s_finitef.S @@ -0,0 +1 @@ +/* __finitef is in s_finite.S. */ diff --git a/sysdeps/ia64/fpu/s_finitel.S b/sysdeps/ia64/fpu/s_finitel.S new file mode 100644 index 0000000000..362b186429 --- /dev/null +++ b/sysdeps/ia64/fpu/s_finitel.S @@ -0,0 +1 @@ +/* __finitel is in s_finite.S. */ diff --git a/sysdeps/ia64/fpu/s_floor.S b/sysdeps/ia64/fpu/s_floor.S new file mode 100644 index 0000000000..9ed9d6dcdb --- /dev/null +++ b/sysdeps/ia64/fpu/s_floor.S @@ -0,0 +1,216 @@ +.file "floor.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 03/22/00 Updated to improve performance +// 06/13/00 Improved speed, fixed setting of inexact flag +// 06/27/00 Eliminated incorrect invalid flag setting +// 02/07/01 Corrected sign of zero result in round to -inf mode +// 05/20/02 Cleaned up namespace and sf0 syntax +// 01/28/03 Improved performance +//============================================================== + +// API +//============================================================== +// double floor(double x) +//============================================================== + +// general input registers: +// r14 - r18 + +rSignexp = r14 +rExp = r15 +rExpMask = r16 +rBigexp = r17 +rM1 = r18 + +// floating-point registers: +// f8 - f13 + +fXInt = f9 +fNormX = f10 +fTmp = f11 +fAdj = f12 +fPreResult = f13 + +// predicate registers used: +// p6 - p9 + +// Overview of operation +//============================================================== +// double floor(double x) +// Return an integer value (represented as a double) that is the largest +// value not greater than x +// This is x rounded toward -infinity to an integral value. +// Inexact is set if x != floor(x) +//============================================================== + +// double_extended +// if the exponent is > 1003e => 3F(true) = 63(decimal) +// we have a significand of 64 bits 1.63-bits. +// If we multiply by 2^63, we no longer have a fractional part +// So input is an integer value already. + +// double +// if the exponent is >= 10033 => 34(true) = 52(decimal) +// 34 + 3ff = 433 +// we have a significand of 53 bits 1.52-bits. (implicit 1) +// If we multiply by 2^52, we no longer have a fractional part +// So input is an integer value already. + +// single +// if the exponent is > 10016 => 17(true) = 23(decimal) +// we have a significand of 24 bits 1.23-bits. (implicit 1) +// If we multiply by 2^23, we no longer have a fractional part +// So input is an integer value already. + + +.section .text +GLOBAL_IEEE754_ENTRY(floor) + +{ .mfi + getf.exp rSignexp = f8 // Get signexp, recompute if unorm + fclass.m p7,p0 = f8, 0x0b // Test x unorm + addl rBigexp = 0x10033, r0 // Set exponent at which is integer +} +{ .mfi + mov rM1 = -1 // Set all ones + fcvt.fx.trunc.s1 fXInt = f8 // Convert to int in significand + mov rExpMask = 0x1FFFF // Form exponent mask +} +;; + +{ .mfi + nop.m 0 + fcmp.lt.s1 p8,p9 = f8, f0 // Test x < 0 + nop.i 0 +} +{ .mfb + setf.sig fTmp = rM1 // Make const for setting inexact + fnorm.s1 fNormX = f8 // Normalize input +(p7) br.cond.spnt FLOOR_UNORM // Branch if x unorm +} +;; + +FLOOR_COMMON: +// Return here from FLOOR_UNORM +{ .mfi + nop.m 0 + fclass.m p6,p0 = f8, 0x1e7 // Test x natval, nan, inf, 0 + nop.i 0 +} +;; + +.pred.rel "mutex",p8,p9 +{ .mfi + nop.m 0 +(p8) fnma.s1 fAdj = f1, f1, f0 // If x < 0, adjustment is -1 + nop.i 0 +} +{ .mfi + nop.m 0 +(p9) fma.s1 fAdj = f0, f0, f0 // If x > 0, adjustment is 0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcvt.xf fPreResult = fXInt // trunc(x) + nop.i 0 +} +{ .mfb + nop.m 0 +(p6) fma.d.s0 f8 = f8, f1, f0 // Result if x natval, nan, inf, 0 +(p6) br.ret.spnt b0 // Exit if x natval, nan, inf, 0 +} +;; + +{ .mmi + and rExp = rSignexp, rExpMask // Get biased exponent +;; + cmp.ge p7,p6 = rExp, rBigexp // Is |x| >= 2^52? + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p6) fma.d.s0 f8 = fPreResult, f1, fAdj // Result if !int, |x| < 2^52 + nop.i 0 +} +{ .mfi + nop.m 0 +(p7) fma.d.s0 f8 = fNormX, f1, f0 // Result, if |x| >= 2^52 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p6) fcmp.eq.unc.s1 p8, p9 = fPreResult, fNormX // Is trunc(x) = x ? + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p9) fmpy.s0 fTmp = fTmp, fTmp // Dummy to set inexact + nop.i 0 +} +{ .mfb + nop.m 0 +(p8) fma.d.s0 f8 = fNormX, f1, f0 // If x int, result normalized x + br.ret.sptk b0 // Exit main path, 0 < |x| < 2^52 +} +;; + + +FLOOR_UNORM: +// Here if x unorm +{ .mfb + getf.exp rSignexp = fNormX // Get signexp, recompute if unorm + fcmp.eq.s0 p7,p0 = f8, f0 // Dummy op to set denormal flag + br.cond.sptk FLOOR_COMMON // Return to main path +} +;; + +GLOBAL_IEEE754_END(floor) diff --git a/sysdeps/ia64/fpu/s_floorf.S b/sysdeps/ia64/fpu/s_floorf.S new file mode 100644 index 0000000000..a3f2095931 --- /dev/null +++ b/sysdeps/ia64/fpu/s_floorf.S @@ -0,0 +1,215 @@ +.file "floorf.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 06/13/00 Improved speed +// 06/27/00 Eliminated incorrect invalid flag setting +// 02/07/01 Corrected sign of zero result in round to -inf mode +// 05/20/02 Cleaned up namespace and sf0 syntax +// 01/28/03 Improved performance +//============================================================== + +// API +//============================================================== +// float floorf(float x) +//============================================================== + +// general input registers: +// r14 - r18 + +rSignexp = r14 +rExp = r15 +rExpMask = r16 +rBigexp = r17 +rM1 = r18 + +// floating-point registers: +// f8 - f13 + +fXInt = f9 +fNormX = f10 +fTmp = f11 +fAdj = f12 +fPreResult = f13 + +// predicate registers used: +// p6 - p9 + +// Overview of operation +//============================================================== +// float floorf(float x) +// Return an integer value (represented as a float) that is the largest +// value not greater than x +// This is x rounded toward -infinity to an integral value. +// Inexact is set if x != floorf(x) +//============================================================== + +// double_extended +// if the exponent is > 1003e => 3F(true) = 63(decimal) +// we have a significand of 64 bits 1.63-bits. +// If we multiply by 2^63, we no longer have a fractional part +// So input is an integer value already. + +// double +// if the exponent is >= 10033 => 34(true) = 52(decimal) +// 34 + 3ff = 433 +// we have a significand of 53 bits 1.52-bits. (implicit 1) +// If we multiply by 2^52, we no longer have a fractional part +// So input is an integer value already. + +// single +// if the exponent is > 10016 => 17(true) = 23(decimal) +// we have a significand of 24 bits 1.23-bits. (implicit 1) +// If we multiply by 2^23, we no longer have a fractional part +// So input is an integer value already. + + +.section .text +GLOBAL_IEEE754_ENTRY(floorf) + +{ .mfi + getf.exp rSignexp = f8 // Get signexp, recompute if unorm + fclass.m p7,p0 = f8, 0x0b // Test x unorm + addl rBigexp = 0x10016, r0 // Set exponent at which is integer +} +{ .mfi + mov rM1 = -1 // Set all ones + fcvt.fx.trunc.s1 fXInt = f8 // Convert to int in significand + mov rExpMask = 0x1FFFF // Form exponent mask +} +;; + +{ .mfi + nop.m 0 + fcmp.lt.s1 p8,p9 = f8, f0 // Test x < 0 + nop.i 0 +} +{ .mfb + setf.sig fTmp = rM1 // Make const for setting inexact + fnorm.s1 fNormX = f8 // Normalize input +(p7) br.cond.spnt FLOOR_UNORM // Branch if x unorm +} +;; + +FLOOR_COMMON: +// Return here from FLOOR_UNORM +{ .mfi + nop.m 0 + fclass.m p6,p0 = f8, 0x1e7 // Test x natval, nan, inf, 0 + nop.i 0 +} +;; + +.pred.rel "mutex",p8,p9 +{ .mfi + nop.m 0 +(p8) fnma.s1 fAdj = f1, f1, f0 // If x < 0, adjustment is -1 + nop.i 0 +} +{ .mfi + nop.m 0 +(p9) fma.s1 fAdj = f0, f0, f0 // If x > 0, adjustment is 0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcvt.xf fPreResult = fXInt // trunc(x) + nop.i 0 +} +{ .mfb + nop.m 0 +(p6) fma.s.s0 f8 = f8, f1, f0 // Result if x natval, nan, inf, 0 +(p6) br.ret.spnt b0 // Exit if x natval, nan, inf, 0 +} +;; + +{ .mmi + and rExp = rSignexp, rExpMask // Get biased exponent +;; + cmp.ge p7,p6 = rExp, rBigexp // Is |x| >= 2^23? + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p6) fma.s.s0 f8 = fPreResult, f1, fAdj // Result if !int, |x| < 2^23 + nop.i 0 +} +{ .mfi + nop.m 0 +(p7) fma.s.s0 f8 = fNormX, f1, f0 // Result, if |x| >= 2^23 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p6) fcmp.eq.unc.s1 p8, p9 = fPreResult, fNormX // Is trunc(x) = x ? + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p9) fmpy.s0 fTmp = fTmp, fTmp // Dummy to set inexact + nop.i 0 +} +{ .mfb + nop.m 0 +(p8) fma.s.s0 f8 = fNormX, f1, f0 // If x int, result normalized x + br.ret.sptk b0 // Exit main path, 0 < |x| < 2^23 +} +;; + + +FLOOR_UNORM: +// Here if x unorm +{ .mfb + getf.exp rSignexp = fNormX // Get signexp, recompute if unorm + fcmp.eq.s0 p7,p0 = f8, f0 // Dummy op to set denormal flag + br.cond.sptk FLOOR_COMMON // Return to main path +} +;; + +GLOBAL_IEEE754_END(floorf) diff --git a/sysdeps/ia64/fpu/s_floorl.S b/sysdeps/ia64/fpu/s_floorl.S new file mode 100644 index 0000000000..345c4f30dd --- /dev/null +++ b/sysdeps/ia64/fpu/s_floorl.S @@ -0,0 +1,215 @@ +.file "floorl.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 06/13/00 Improved speed +// 06/27/00 Eliminated incorrect invalid flag setting +// 02/07/01 Corrected sign of zero result in round to -inf mode +// 05/20/02 Cleaned up namespace and sf0 syntax +// 01/28/03 Improved performance +//============================================================== + +// API +//============================================================== +// long double floorl(long double x) +//============================================================== + +// general input registers: +// r14 - r18 + +rSignexp = r14 +rExp = r15 +rExpMask = r16 +rBigexp = r17 +rM1 = r18 + +// floating-point registers: +// f8 - f13 + +fXInt = f9 +fNormX = f10 +fTmp = f11 +fAdj = f12 +fPreResult = f13 + +// predicate registers used: +// p6 - p9 + +// Overview of operation +//============================================================== +// long double floorl(long double x) +// Return an integer value (represented as a long double) that is the largest +// value not greater than x +// This is x rounded toward -infinity to an integral value. +// Inexact is set if x != floorl(x) +//============================================================== + +// double_extended +// if the exponent is > 1003e => 3F(true) = 63(decimal) +// we have a significand of 64 bits 1.63-bits. +// If we multiply by 2^63, we no longer have a fractional part +// So input is an integer value already. + +// double +// if the exponent is >= 10033 => 34(true) = 52(decimal) +// 34 + 3ff = 433 +// we have a significand of 53 bits 1.52-bits. (implicit 1) +// If we multiply by 2^52, we no longer have a fractional part +// So input is an integer value already. + +// single +// if the exponent is > 10016 => 17(true) = 23(decimal) +// we have a significand of 24 bits 1.23-bits. (implicit 1) +// If we multiply by 2^23, we no longer have a fractional part +// So input is an integer value already. + + +.section .text +GLOBAL_IEEE754_ENTRY(floorl) + +{ .mfi + getf.exp rSignexp = f8 // Get signexp, recompute if unorm + fclass.m p7,p0 = f8, 0x0b // Test x unorm + addl rBigexp = 0x1003e, r0 // Set exponent at which is integer +} +{ .mfi + mov rM1 = -1 // Set all ones + fcvt.fx.trunc.s1 fXInt = f8 // Convert to int in significand + mov rExpMask = 0x1FFFF // Form exponent mask +} +;; + +{ .mfi + nop.m 0 + fcmp.lt.s1 p8,p9 = f8, f0 // Test x < 0 + nop.i 0 +} +{ .mfb + setf.sig fTmp = rM1 // Make const for setting inexact + fnorm.s1 fNormX = f8 // Normalize input +(p7) br.cond.spnt FLOOR_UNORM // Branch if x unorm +} +;; + +FLOOR_COMMON: +// Return here from FLOOR_UNORM +{ .mfi + nop.m 0 + fclass.m p6,p0 = f8, 0x1e7 // Test x natval, nan, inf, 0 + nop.i 0 +} +;; + +.pred.rel "mutex",p8,p9 +{ .mfi + nop.m 0 +(p8) fnma.s1 fAdj = f1, f1, f0 // If x < 0, adjustment is -1 + nop.i 0 +} +{ .mfi + nop.m 0 +(p9) fma.s1 fAdj = f0, f0, f0 // If x > 0, adjustment is 0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcvt.xf fPreResult = fXInt // trunc(x) + nop.i 0 +} +{ .mfb + nop.m 0 +(p6) fma.s0 f8 = f8, f1, f0 // Result if x natval, nan, inf, 0 +(p6) br.ret.spnt b0 // Exit if x natval, nan, inf, 0 +} +;; + +{ .mmi + and rExp = rSignexp, rExpMask // Get biased exponent +;; + cmp.ge p7,p6 = rExp, rBigexp // Is |x| >= 2^63? + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p6) fma.s0 f8 = fPreResult, f1, fAdj // Result if !int, |x| < 2^63 + nop.i 0 +} +{ .mfi + nop.m 0 +(p7) fma.s0 f8 = fNormX, f1, f0 // Result, if |x| >= 2^63 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p6) fcmp.eq.unc.s1 p8, p9 = fPreResult, fNormX // Is trunc(x) = x ? + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p9) fmpy.s0 fTmp = fTmp, fTmp // Dummy to set inexact + nop.i 0 +} +{ .mfb + nop.m 0 +(p8) fma.s0 f8 = fNormX, f1, f0 // If x int, result normalized x + br.ret.sptk b0 // Exit main path, 0 < |x| < 2^63 +} +;; + + +FLOOR_UNORM: +// Here if x unorm +{ .mfb + getf.exp rSignexp = fNormX // Get signexp, recompute if unorm + fcmp.eq.s0 p7,p0 = f8, f0 // Dummy op to set denormal flag + br.cond.sptk FLOOR_COMMON // Return to main path +} +;; + +GLOBAL_IEEE754_END(floorl) diff --git a/sysdeps/ia64/fpu/s_fma.S b/sysdeps/ia64/fpu/s_fma.S new file mode 100644 index 0000000000..7798790d50 --- /dev/null +++ b/sysdeps/ia64/fpu/s_fma.S @@ -0,0 +1,71 @@ +.file "fma.s" + + +// Copyright (c) 2001 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2001 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 06/07/01 Initial version +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// +// API +//============================================================== +// double fma (double x, double y, double z) +// +// Overview of operation +//============================================================== +// returns x * y + z with one rounding error + +// All the special cases are handled by the fma instruction itself + +// floating-point registers used: 3 +// f8, input x, output +// f9, input y +// f10, input z + +.section .text +GLOBAL_LIBM_ENTRY(fma) + +{ .mfb + nop.m 999 + fma.d.s0 f8 = f8, f9, f10 // Result = x * y + z + br.ret.sptk b0 +} +;; + +GLOBAL_LIBM_END(fma) diff --git a/sysdeps/ia64/fpu/s_fmaf.S b/sysdeps/ia64/fpu/s_fmaf.S new file mode 100644 index 0000000000..db112b2a6c --- /dev/null +++ b/sysdeps/ia64/fpu/s_fmaf.S @@ -0,0 +1,71 @@ +.file "fmaf.s" + + +// Copyright (c) 2001 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2001 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 06/07/01 Initial version +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// +// API +//============================================================== +// float fmaf (float x, float y, float z) +// +// Overview of operation +//============================================================== +// returns x * y + z with one rounding error + +// All the special cases are handled by the fma instruction itself + +// floating-point registers used: 3 +// f8, input x, output +// f9, input y +// f10, input z + +.section .text +GLOBAL_LIBM_ENTRY(fmaf) + +{ .mfb + nop.m 999 + fma.s.s0 f8 = f8, f9, f10 // Result = x * y + z + br.ret.sptk b0 +} +;; + +GLOBAL_LIBM_END(fmaf) diff --git a/sysdeps/ia64/fpu/s_fmal.S b/sysdeps/ia64/fpu/s_fmal.S new file mode 100644 index 0000000000..2bdef0b3ed --- /dev/null +++ b/sysdeps/ia64/fpu/s_fmal.S @@ -0,0 +1,71 @@ +.file "fmal.s" + + +// Copyright (c) 2001 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2001 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 06/07/01 Initial version +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// +// API +//============================================================== +// long double fmal (long double x, long double y, long double z) +// +// Overview of operation +//============================================================== +// returns x * y + z with one rounding error + +// All the special cases are handled by the fma instruction itself + +// floating-point registers used: 3 +// f8, input x, output +// f9, input y +// f10, input z + +.section .text +GLOBAL_LIBM_ENTRY(fmal) + +{ .mfb + nop.m 999 + fma.s0 f8 = f8, f9, f10 // Result = x * y + z + br.ret.sptk b0 +} +;; + +GLOBAL_LIBM_END(fmal) diff --git a/sysdeps/ia64/fpu/s_fmax.S b/sysdeps/ia64/fpu/s_fmax.S new file mode 100644 index 0000000000..6fd38dfe9d --- /dev/null +++ b/sysdeps/ia64/fpu/s_fmax.S @@ -0,0 +1,114 @@ +.file "fmax.s" + + +// Copyright (c) 2001 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2001 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 05/31/01 Initial version +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// +// API +//============================================================== +// double fmax (double x, double y) +// +// Overview of operation +//============================================================== +// returns the algebraic maximum of 2 input values +// +// Special cases: +// fmax(x, nan) returns x if x is numeric // Must special case this one +// fmax(nan, y) returns y if y is numeric +// fmax(nan1, nan2) returns quietized nan2 +// fmax(+0,+0) returns +0 +// fmax(-0,+0) returns +0 +// fmax(-0,-0) returns -0 +// fmax(+0,-0) returns +0 // Must special case this one +// +// SNaN causes invalid to be set + +// floating-point registers used: 2 +// f8, input x, output +// f9, input y + +.section .text +GLOBAL_LIBM_ENTRY(fmax) + +{ .mfi + nop.m 999 + fcmp.unord.s0 p6,p7 = f8, f9 // Is x or y a nan? Raise invalid or denormal + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p7) fclass.m.unc p8,p9 = f9, 0x06 // If no nan, is y=-0? + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p6) fclass.m.unc p10,p0 = f8, 0xc3 // Is x nan? + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fmax.s0 f8 = f8, f9 // Normal case, no nan and y not -0 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p8) fmax.s0 f8 = f9, f8 // No nan and y -0 + nop.i 999 +} +;; + +{ .mfb + nop.m 999 +(p10) fmerge.s f8 = f9, f9 // If x nan, return y, else do nothing (returns x) + br.ret.sptk b0 +} +;; + +GLOBAL_LIBM_END(fmax) diff --git a/sysdeps/ia64/fpu/s_fmaxf.S b/sysdeps/ia64/fpu/s_fmaxf.S new file mode 100644 index 0000000000..cac283c66a --- /dev/null +++ b/sysdeps/ia64/fpu/s_fmaxf.S @@ -0,0 +1,114 @@ +.file "fmaxf.s" + + +// Copyright (c) 2001 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2001 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 05/31/01 Initial version +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// +// API +//============================================================== +// float fmaxf (float x, float y) +// +// Overview of operation +//============================================================== +// returns the algebraic maximum of 2 input values +// +// Special cases: +// fmaxf(x, nan) returns x if x is numeric // Must special case this one +// fmaxf(nan, y) returns y if y is numeric +// fmaxf(nan1, nan2) returns quietized nan2 +// fmaxf(+0,+0) returns +0 +// fmaxf(-0,+0) returns +0 +// fmaxf(-0,-0) returns -0 +// fmaxf(+0,-0) returns +0 // Must special case this one +// +// SNaN causes invalid to be set + +// floating-point registers used: 2 +// f8, input x, output +// f9, input y + +.section .text +GLOBAL_LIBM_ENTRY(fmaxf) + +{ .mfi + nop.m 999 + fcmp.unord.s0 p6,p7 = f8, f9 // Is x or y a nan? Raise invalid or denormal + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p7) fclass.m.unc p8,p9 = f9, 0x06 // If no nan, is y=-0? + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p6) fclass.m.unc p10,p0 = f8, 0xc3 // Is x nan? + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fmax.s0 f8 = f8, f9 // Normal case, no nan and y not -0 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p8) fmax.s0 f8 = f9, f8 // No nan and y -0 + nop.i 999 +} +;; + +{ .mfb + nop.m 999 +(p10) fmerge.s f8 = f9, f9 // If x nan, return y, else do nothing (returns x) + br.ret.sptk b0 +} +;; + +GLOBAL_LIBM_END(fmaxf) diff --git a/sysdeps/ia64/fpu/s_fmaxl.S b/sysdeps/ia64/fpu/s_fmaxl.S new file mode 100644 index 0000000000..fb8861dcdf --- /dev/null +++ b/sysdeps/ia64/fpu/s_fmaxl.S @@ -0,0 +1,114 @@ +.file "fmaxl.s" + + +// Copyright (c) 2001 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2001 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 05/31/01 Initial version +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// +// API +//============================================================== +// long double fmaxl (long double x, long double y) +// +// Overview of operation +//============================================================== +// returns the algebraic maximum of 2 input values +// +// Special cases: +// fmaxl(x, nan) returns x if x is numeric // Must special case this one +// fmaxl(nan, y) returns y if y is numeric +// fmaxl(nan1, nan2) returns quietized nan2 +// fmaxl(+0,+0) returns +0 +// fmaxl(-0,+0) returns +0 +// fmaxl(-0,-0) returns -0 +// fmaxl(+0,-0) returns +0 // Must special case this one +// +// SNaN causes invalid to be set + +// floating-point registers used: 2 +// f8, input x, output +// f9, input y + +.section .text +GLOBAL_LIBM_ENTRY(fmaxl) + +{ .mfi + nop.m 999 + fcmp.unord.s0 p6,p7 = f8, f9 // Is x or y a nan? Raise invalid or denormal + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p7) fclass.m.unc p8,p9 = f9, 0x06 // If no nan, is y=-0? + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p6) fclass.m.unc p10,p0 = f8, 0xc3 // Is x nan? + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fmax.s0 f8 = f8, f9 // Normal case, no nan and y not -0 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p8) fmax.s0 f8 = f9, f8 // No nan and y -0 + nop.i 999 +} +;; + +{ .mfb + nop.m 999 +(p10) fmerge.s f8 = f9, f9 // If x nan, return y, else do nothing (returns x) + br.ret.sptk b0 +} +;; + +GLOBAL_LIBM_END(fmaxl) diff --git a/sysdeps/ia64/fpu/s_fpclassify.S b/sysdeps/ia64/fpu/s_fpclassify.S new file mode 100644 index 0000000000..a9df24a57f --- /dev/null +++ b/sysdeps/ia64/fpu/s_fpclassify.S @@ -0,0 +1,62 @@ +/* Return classification value corresponding to argument. + Copyright (C) 2000, 2002 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. */ + +#include +#undef ret + +ENTRY (__fpclassify) +{ +.mfi + fclass.m p6, p7 = farg0, @nat | @qnan | @snan + ;; +} +{ +.mfb +(p6) mov ret0 = 0 +(p7) fclass.m p7, p8 = farg0, @inf +(p6) br.ret.sptk.many rp + ;; +} +{ +.mfb +(p7) mov ret0 = 1 +(p8) fclass.m p8, p6 = farg0, @zero +(p7) br.ret.sptk.many rp + ;; +} +{ +.mfb +(p8) mov ret0 = 2 +(p6) fclass.m p6, p7 = farg0, @unorm +(p8) br.ret.sptk.many rp + ;; +} +{ + .pred.rel.mutex p6, p7 +(p6) mov ret0 = 3 +(p7) mov ret0 = 4 + br.ret.sptk.many rp +} +END (__fpclassify) + +strong_alias (__fpclassify, __fpclassifyf) +strong_alias (__fpclassify, __fpclassifyl) +libm_hidden_def (__fpclassify) +libm_hidden_def (__fpclassifyf) +libm_hidden_def (__fpclassifyl) diff --git a/sysdeps/ia64/fpu/s_fpclassifyf.S b/sysdeps/ia64/fpu/s_fpclassifyf.S new file mode 100644 index 0000000000..cf31fca7ad --- /dev/null +++ b/sysdeps/ia64/fpu/s_fpclassifyf.S @@ -0,0 +1 @@ +/* __fpclassifyf is in s_fpclassify.S. */ diff --git a/sysdeps/ia64/fpu/s_fpclassifyl.S b/sysdeps/ia64/fpu/s_fpclassifyl.S new file mode 100644 index 0000000000..621e3c53a4 --- /dev/null +++ b/sysdeps/ia64/fpu/s_fpclassifyl.S @@ -0,0 +1 @@ +/* __fpclassifyl is in s_fpclassify.S. */ diff --git a/sysdeps/ia64/fpu/s_frexp.c b/sysdeps/ia64/fpu/s_frexp.c new file mode 100644 index 0000000000..7d90213d63 --- /dev/null +++ b/sysdeps/ia64/fpu/s_frexp.c @@ -0,0 +1,67 @@ +/* file: frexp.c */ + + +// Copyright (c) 2000-2002, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// +// History +//===================================================================== +// 2/02/00 Initial version +// 1/23/02 Calls kernel with parameter to specify 32- or 64-bit int +// +//===================================================================== + +#include "libm_support.h" + +double __libm_frexp(double, int*, int); + +double frexp(double x, int *y) +{ + +#ifdef SIZE_INT_64 + return( __libm_frexp(x, y, 1) ); + +#else + +#ifdef SIZE_INT_32 + return( __libm_frexp(x, y, 0) ); +#endif + +#endif + +} diff --git a/sysdeps/ia64/fpu/s_frexpf.c b/sysdeps/ia64/fpu/s_frexpf.c new file mode 100644 index 0000000000..920f09d4a4 --- /dev/null +++ b/sysdeps/ia64/fpu/s_frexpf.c @@ -0,0 +1,67 @@ +/* file: frexpf.c */ + + +// Copyright (c) 2000-2002, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// +// History +//===================================================================== +// 2/02/00 Initial version +// 1/23/02 Calls kernel with parameter to specify 32- or 64-bit int +// +//===================================================================== + +#include "libm_support.h" + +float __libm_frexpf(float, int*, int); + +float frexpf(float x, int *y) +{ + +#ifdef SIZE_INT_64 + return( __libm_frexpf(x, y, 1) ); + +#else + +#ifdef SIZE_INT_32 + return( __libm_frexpf(x, y, 0) ); +#endif + +#endif + +} diff --git a/sysdeps/ia64/fpu/s_frexpl.c b/sysdeps/ia64/fpu/s_frexpl.c new file mode 100644 index 0000000000..968cc3269c --- /dev/null +++ b/sysdeps/ia64/fpu/s_frexpl.c @@ -0,0 +1,67 @@ +/* file: frexpl.c */ + + +// Copyright (c) 2000-2002, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// +// History +//===================================================================== +// 2/02/00 Initial version +// 1/23/02 Calls kernel with parameter to specify 32- or 64-bit int +// +//===================================================================== + +#include "libm_support.h" + +long double __libm_frexpl(long double, int*, int); + +long double frexpl(long double x, int *y) +{ + +#ifdef SIZE_INT_64 + return( __libm_frexpl(x, y, 1) ); + +#else + +#ifdef SIZE_INT_32 + return( __libm_frexpl(x, y, 0) ); +#endif + +#endif + +} diff --git a/sysdeps/ia64/fpu/s_ilogb.S b/sysdeps/ia64/fpu/s_ilogb.S new file mode 100644 index 0000000000..0102370cd6 --- /dev/null +++ b/sysdeps/ia64/fpu/s_ilogb.S @@ -0,0 +1,268 @@ +.file "ilogb.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/03/00 Initial version +// 05/26/00 Fix bug when x a double-extended denormal; +// if x=0 call error routine, per C9X +// 08/15/00 Bundle added after call to __libm_error_support to properly +// set [the previously overwritten] GR_Parameter_RESULT. +// 01/20/01 Fixed result for x=0, corrected error tag value. +// 05/20/02 Cleaned up namespace and sf0 syntax +// 01/20/03 Improved performance +// +// API +//============================================================== +// int ilogb( double x ); +// +// Overview of operation +//============================================================== +// The ilogb function extracts the exponent of x as an integer +// and returns it in r8 +// +// ilogb is similar to logb but differs in the following ways: +// +-inf +// ilogb: returns INT_MAX +// logb: returns +inf +// Nan returns FP_LOGBNAN (which is either INT_MAX or INT_MIN) +// ilogb: returns INT_MAX (7fffffff) +// logb: returns QNAN (quietized SNAN) +// 0 returns FP_ILOGB0 (which is either INT_MIN or -INT_MAX) +// ilogb: returns -INT_MAX (80000001) +// logb: returns -inf, raises the divide-by-zero exception, +// and calls libm_error_support to set domain error +// +// Registers used +//============================================================== +// general registers used: +// r26 -> r39 +// r36 -> r39 used as parameters to error path +// +// predicate registers used: +// p6 -> p10 +// floating-point registers used: +// f9, f10, f11 +// f8, input + +rExpBias = r26 +rExpMask = r27 +rSignexp_x = r28 +rExp_x = r29 +rIntMax = r30 +rExp_2to64 = r31 + +GR_SAVE_PFS = r32 +rTrialResult = r33 +GR_SAVE_B0 = r34 +GR_SAVE_GP = r35 + +GR_Parameter_X = r36 +GR_Parameter_Y = r37 +GR_Parameter_RESULT = r38 +GR_Parameter_TAG = r39 + +fTmp = f9 +fNorm_x = f10 +f2to64 = f11 + +.section .text +GLOBAL_LIBM_ENTRY(ilogb) + +// X NORMAL +// TrueExp_x = exp(f8) - 0xffff +// r8 = TrueExp_x +{ .mfi + getf.exp rSignexp_x = f8 + fclass.m p8,p0 = f8, 0x0b // Test for x unorm + mov rExpBias = 0xffff // Exponent bias +} +{ .mfi + nop.m 0 + fnorm.s1 fNorm_x = f8 + mov rExpMask = 0x1ffff // Exponent mask +} +;; + +// Form signexp of 2^64 in case need to scale denormal +{ .mfb + mov rExp_2to64 = 0x1003f + fclass.m p6,p9 = f8, 0x1e3 // Test x natval, nan, inf +(p8) br.cond.spnt ILOGB_DENORM // Branch if x unorm +} +;; + +ILOGB_COMMON: +// Return here from ILOGB_DENORM +{ .mfi + and rExp_x = rSignexp_x, rExpMask // Get biased exponent + fclass.m p7,p10 = f8, 0x07 // Test x zero + nop.i 0 +} +{ .mlx + nop.m 0 + movl rIntMax = 0x000000007fffffff // Form INT_MAX +} +;; + +.pred.rel "mutex",p6,p9 +{ .mfi +(p9) sub r8 = rExp_x, rExpBias // Get true exponent for normal path +(p6) fma.s0 fTmp = f8, f8, f0 // Dummy to set Invalid flag +(p6) mov r8 = rIntMax // If nan, inf, return INT_MAX +} +{ .mbb + nop.m 0 +(p7) br.cond.spnt ILOGB_ZERO // Branch if x zero +(p10) br.ret.sptk b0 // Exit if x not zero +} +;; + + +ILOGB_DENORM: +// Form 2^64 in case need to scale denormal +// Check to see if double-extended denormal +{ .mfi + setf.exp f2to64 = rExp_2to64 + fclass.m p8,p0 = fNorm_x, 0x0b + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcmp.eq.s0 p7,p0 = f8, f0 // Dummy op to set denormal flag + nop.i 0 +} +;; + +// If double-extended denormal add 64 to exponent bias for scaling +// If double-extended denormal form x * 2^64 which is normal +{ .mfi +(p8) add rExpBias = 64, rExpBias +(p8) fmpy.s1 fNorm_x = fNorm_x, f2to64 + nop.i 0 +} +;; + +// Logic is the same as normal path but use normalized input +{ .mib + getf.exp rSignexp_x = fNorm_x + nop.i 0 + br.cond.sptk ILOGB_COMMON // Return to main path +} +;; + +ILOGB_ZERO: +// Here if x zero +// Return INT_MIN, call error support + +{ .mlx + alloc r32=ar.pfs,1,3,4,0 + movl rTrialResult = 0x0000000080000000 +} +{ .mib + mov GR_Parameter_TAG = 157 // Error code + nop.i 0 + br.cond.sptk __libm_error_region // Call error support +} +;; + +GLOBAL_LIBM_END(ilogb) + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue + +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; + +{ .mmi + stfd [GR_Parameter_Y] = f0,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; + +.body +{ .mib + stfd [GR_Parameter_X] = f8 // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfd [GR_Parameter_Y] = f9 // Store Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; + +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; + +{ .mmi + mov r8 = rTrialResult +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; + +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 +};; + +LOCAL_LIBM_END(__libm_error_region) + + +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/s_ilogbf.S b/sysdeps/ia64/fpu/s_ilogbf.S new file mode 100644 index 0000000000..9e971bc634 --- /dev/null +++ b/sysdeps/ia64/fpu/s_ilogbf.S @@ -0,0 +1,268 @@ +.file "ilogbf.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/03/00 Initial version +// 05/26/00 Fix bug when x a double-extended denormal; +// if x=0 call error routine, per C9X +// 08/15/00 Bundle added after call to __libm_error_support to properly +// set [the previously overwritten] GR_Parameter_RESULT. +// 01/20/01 Fixed result for x=0 +// 05/20/02 Cleaned up namespace and sf0 syntax +// 01/20/03 Improved performance +// +// API +//============================================================== +// int ilogbf( float x ); +// +// Overview of operation +//============================================================== +// The ilogbf function extracts the exponent of x as an integer +// and returns it in r8 +// +// ilogbf is similar to logbf but differs in the following ways: +// +-inf +// ilogbf: returns INT_MAX +// logbf: returns +inf +// Nan returns FP_LOGBNAN (which is either INT_MAX or INT_MIN) +// ilogbf: returns INT_MAX (7fffffff) +// logbf: returns QNAN (quietized SNAN) +// 0 returns FP_ILOGB0 (which is either INT_MIN or -INT_MAX) +// ilogbf: returns -INT_MAX (80000001) +// logbf: returns -inf, raises the divide-by-zero exception, +// and calls libm_error_support to set domain error +// +// Registers used +//============================================================== +// general registers used: +// r26 -> r39 +// r36 -> r39 used as parameters to error path +// +// predicate registers used: +// p6 -> p10 +// floating-point registers used: +// f9, f10, f11 +// f8, input + +rExpBias = r26 +rExpMask = r27 +rSignexp_x = r28 +rExp_x = r29 +rIntMax = r30 +rExp_2to64 = r31 + +GR_SAVE_PFS = r32 +rTrialResult = r33 +GR_SAVE_B0 = r34 +GR_SAVE_GP = r35 + +GR_Parameter_X = r36 +GR_Parameter_Y = r37 +GR_Parameter_RESULT = r38 +GR_Parameter_TAG = r39 + +fTmp = f9 +fNorm_x = f10 +f2to64 = f11 + +.section .text +GLOBAL_LIBM_ENTRY(ilogbf) + +// X NORMAL +// TrueExp_x = exp(f8) - 0xffff +// r8 = TrueExp_x +{ .mfi + getf.exp rSignexp_x = f8 + fclass.m p8,p0 = f8, 0x0b // Test for x unorm + mov rExpBias = 0xffff // Exponent bias +} +{ .mfi + nop.m 0 + fnorm.s1 fNorm_x = f8 + mov rExpMask = 0x1ffff // Exponent mask +} +;; + +// Form signexp of 2^64 in case need to scale denormal +{ .mfb + mov rExp_2to64 = 0x1003f + fclass.m p6,p9 = f8, 0x1e3 // Test x natval, nan, inf +(p8) br.cond.spnt ILOGB_DENORM // Branch if x unorm +} +;; + +ILOGB_COMMON: +// Return here from ILOGB_DENORM +{ .mfi + and rExp_x = rSignexp_x, rExpMask // Get biased exponent + fclass.m p7,p10 = f8, 0x07 // Test x zero + nop.i 0 +} +{ .mlx + nop.m 0 + movl rIntMax = 0x000000007fffffff // Form INT_MAX +} +;; + +.pred.rel "mutex",p6,p9 +{ .mfi +(p9) sub r8 = rExp_x, rExpBias // Get true exponent for normal path +(p6) fma.s0 fTmp = f8, f8, f0 // Dummy to set Invalid flag +(p6) mov r8 = rIntMax // If nan, inf, return INT_MAX +} +{ .mbb + nop.m 0 +(p7) br.cond.spnt ILOGB_ZERO // Branch if x zero +(p10) br.ret.sptk b0 // Exit if x not zero +} +;; + + +ILOGB_DENORM: +// Form 2^64 in case need to scale denormal +// Check to see if double-extended denormal +{ .mfi + setf.exp f2to64 = rExp_2to64 + fclass.m p8,p0 = fNorm_x, 0x0b + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcmp.eq.s0 p7,p0 = f8, f0 // Dummy op to set denormal flag + nop.i 0 +} +;; + +// If double-extended denormal add 64 to exponent bias for scaling +// If double-extended denormal form x * 2^64 which is normal +{ .mfi +(p8) add rExpBias = 64, rExpBias +(p8) fmpy.s1 fNorm_x = fNorm_x, f2to64 + nop.i 0 +} +;; + +// Logic is the same as normal path but use normalized input +{ .mib + getf.exp rSignexp_x = fNorm_x + nop.i 0 + br.cond.sptk ILOGB_COMMON // Return to main path +} +;; + +ILOGB_ZERO: +// Here if x zero +// Return INT_MIN, call error support + +{ .mlx + alloc r32=ar.pfs,1,3,4,0 + movl rTrialResult = 0x0000000080000000 +} +{ .mib + mov GR_Parameter_TAG = 158 // Error code + nop.i 0 + br.cond.sptk __libm_error_region // Call error support +} +;; + +GLOBAL_LIBM_END(ilogbf) + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue + +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; + +{ .mmi + stfs [GR_Parameter_Y] = f0,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; + +.body +{ .mib + stfs [GR_Parameter_X] = f8 // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfs [GR_Parameter_Y] = f9 // Store Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; + +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; + +{ .mmi + mov r8 = rTrialResult +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; + +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 +};; + +LOCAL_LIBM_END(__libm_error_region) + + +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/s_ilogbl.S b/sysdeps/ia64/fpu/s_ilogbl.S new file mode 100644 index 0000000000..8a6c9dc710 --- /dev/null +++ b/sysdeps/ia64/fpu/s_ilogbl.S @@ -0,0 +1,268 @@ +.file "ilogbl.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/03/00 Initial version +// 05/26/00 Fix bug when x a double-extended denormal; +// if x=0 call error routine, per C9X +// 08/15/00 Bundle added after call to __libm_error_support to properly +// set [the previously overwritten] GR_Parameter_RESULT. +// 01/20/01 Fixed result for x=0 +// 05/20/02 Cleaned up namespace and sf0 syntax +// 01/20/03 Improved performance +// +// API +//============================================================== +// int ilogbl( long double x ); +// +// Overview of operation +//============================================================== +// The ilogbl function extracts the exponent of x as an integer +// and returns it in r8 +// +// ilogbl is similar to logbl but differs in the following ways: +// +-inf +// ilogbl: returns INT_MAX +// logbl: returns +inf +// Nan returns FP_LOGBNAN (which is either INT_MAX or INT_MIN) +// ilogbl: returns INT_MAX (7fffffff) +// logbl: returns QNAN (quietized SNAN) +// 0 returns FP_ILOGB0 (which is either INT_MIN or -INT_MAX) +// ilogbl: returns -INT_MAX (80000001) +// logbl: returns -inf, raises the divide-by-zero exception, +// and calls libm_error_support to set domain error +// +// Registers used +//============================================================== +// general registers used: +// r26 -> r39 +// r36 -> r39 used as parameters to error path +// +// predicate registers used: +// p6 -> p10 +// floating-point registers used: +// f9, f10, f11 +// f8, input + +rExpBias = r26 +rExpMask = r27 +rSignexp_x = r28 +rExp_x = r29 +rIntMax = r30 +rExp_2to64 = r31 + +GR_SAVE_PFS = r32 +rTrialResult = r33 +GR_SAVE_B0 = r34 +GR_SAVE_GP = r35 + +GR_Parameter_X = r36 +GR_Parameter_Y = r37 +GR_Parameter_RESULT = r38 +GR_Parameter_TAG = r39 + +fTmp = f9 +fNorm_x = f10 +f2to64 = f11 + +.section .text +GLOBAL_LIBM_ENTRY(ilogbl) + +// X NORMAL +// TrueExp_x = exp(f8) - 0xffff +// r8 = TrueExp_x +{ .mfi + getf.exp rSignexp_x = f8 + fclass.m p8,p0 = f8, 0x0b // Test for x unorm + mov rExpBias = 0xffff // Exponent bias +} +{ .mfi + nop.m 0 + fnorm.s1 fNorm_x = f8 + mov rExpMask = 0x1ffff // Exponent mask +} +;; + +// Form signexp of 2^64 in case need to scale denormal +{ .mfb + mov rExp_2to64 = 0x1003f + fclass.m p6,p9 = f8, 0x1e3 // Test x natval, nan, inf +(p8) br.cond.spnt ILOGB_DENORM // Branch if x unorm +} +;; + +ILOGB_COMMON: +// Return here from ILOGB_DENORM +{ .mfi + and rExp_x = rSignexp_x, rExpMask // Get biased exponent + fclass.m p7,p10 = f8, 0x07 // Test x zero + nop.i 0 +} +{ .mlx + nop.m 0 + movl rIntMax = 0x000000007fffffff // Form INT_MAX +} +;; + +.pred.rel "mutex",p6,p9 +{ .mfi +(p9) sub r8 = rExp_x, rExpBias // Get true exponent for normal path +(p6) fma.s0 fTmp = f8, f8, f0 // Dummy to set Invalid flag +(p6) mov r8 = rIntMax // If nan, inf, return INT_MAX +} +{ .mbb + nop.m 0 +(p7) br.cond.spnt ILOGB_ZERO // Branch if x zero +(p10) br.ret.sptk b0 // Exit if x not zero +} +;; + + +ILOGB_DENORM: +// Form 2^64 in case need to scale denormal +// Check to see if double-extended denormal +{ .mfi + setf.exp f2to64 = rExp_2to64 + fclass.m p8,p0 = fNorm_x, 0x0b + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcmp.eq.s0 p7,p0 = f8, f0 // Dummy op to set denormal flag + nop.i 0 +} +;; + +// If double-extended denormal add 64 to exponent bias for scaling +// If double-extended denormal form x * 2^64 which is normal +{ .mfi +(p8) add rExpBias = 64, rExpBias +(p8) fmpy.s1 fNorm_x = fNorm_x, f2to64 + nop.i 0 +} +;; + +// Logic is the same as normal path but use normalized input +{ .mib + getf.exp rSignexp_x = fNorm_x + nop.i 0 + br.cond.sptk ILOGB_COMMON // Return to main path +} +;; + +ILOGB_ZERO: +// Here if x zero +// Return INT_MIN, call error support + +{ .mlx + alloc r32=ar.pfs,1,3,4,0 + movl rTrialResult = 0x0000000080000000 +} +{ .mib + mov GR_Parameter_TAG = 156 // Error code + nop.i 0 + br.cond.sptk __libm_error_region // Call error support +} +;; + +GLOBAL_LIBM_END(ilogbl) + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue + +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; + +{ .mmi + stfe [GR_Parameter_Y] = f0,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; + +.body +{ .mib + stfe [GR_Parameter_X] = f8 // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfe [GR_Parameter_Y] = f9 // Store Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; + +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; + +{ .mmi + mov r8 = rTrialResult +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; + +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 +};; + +LOCAL_LIBM_END(__libm_error_region) + + +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/s_isinf.S b/sysdeps/ia64/fpu/s_isinf.S new file mode 100644 index 0000000000..e435edf110 --- /dev/null +++ b/sysdeps/ia64/fpu/s_isinf.S @@ -0,0 +1,58 @@ +/* Test for inf/-inf + Copyright (C) 2000, 2002 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jes Sorensen , October 2000. + + 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. */ + +/* + * isinf(x) returns 1 if x is inf, -1 for x == -inf, else 0; + */ + +#include +#undef ret + +ENTRY (__isinf) +{ +.mfi + fclass.m p6, p7 = farg0, @inf|@pos + ;; +} +{ +.mfb +(p6) mov ret0 = 1 +(p7) fclass.m p7, p8 = farg0, @inf|@neg +(p6) br.ret.sptk.many rp + ;; +} +{ + .pred.rel.mutex p7,p8 +(p7) mov ret0 = -1 +(p8) mov ret0 = 0 + br.ret.sptk.many rp +} +END (__isinf) + +strong_alias (__isinf, __isinff) +strong_alias (__isinf, __isinfl) + +weak_alias (__isinf, isinf) +weak_alias (__isinff, isinff) +weak_alias (__isinfl, isinfl) + +hidden_def (__isinf) +hidden_def (__isinff) +hidden_def (__isinfl) diff --git a/sysdeps/ia64/fpu/s_isinff.S b/sysdeps/ia64/fpu/s_isinff.S new file mode 100644 index 0000000000..37da979e19 --- /dev/null +++ b/sysdeps/ia64/fpu/s_isinff.S @@ -0,0 +1 @@ +/* __isinff is in s_isinf.S. */ diff --git a/sysdeps/ia64/fpu/s_isinfl.S b/sysdeps/ia64/fpu/s_isinfl.S new file mode 100644 index 0000000000..c3bca40991 --- /dev/null +++ b/sysdeps/ia64/fpu/s_isinfl.S @@ -0,0 +1 @@ +/* __isinfl is in s_isinf.S. */ diff --git a/sysdeps/ia64/fpu/s_isnan.S b/sysdeps/ia64/fpu/s_isnan.S new file mode 100644 index 0000000000..83fd54f356 --- /dev/null +++ b/sysdeps/ia64/fpu/s_isnan.S @@ -0,0 +1,51 @@ +/* Test for NaN + Copyright (C) 2000, 2002 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jes Sorensen , October 2000. + + 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. */ + +/* + * isnan(x) returns 1 is x is nan, else 0; + */ + +#include +#undef ret + +ENTRY (__isnan) +{ +.mfi + fclass.m p6, p7 = farg0, @nat | @qnan | @snan + ;; +} +{ +.mib +(p6) mov ret0 = 1 +(p7) mov ret0 = 0 + br.ret.sptk.many rp +} +END (__isnan) + +strong_alias (__isnan, __isnanf) +strong_alias (__isnan, __isnanl) + +weak_alias (__isnan, isnan) +weak_alias (__isnanf, isnanf) +weak_alias (__isnanl, isnanl) + +hidden_def (__isnan) +hidden_def (__isnanf) +hidden_def (__isnanl) diff --git a/sysdeps/ia64/fpu/s_isnanf.S b/sysdeps/ia64/fpu/s_isnanf.S new file mode 100644 index 0000000000..a8911b15e3 --- /dev/null +++ b/sysdeps/ia64/fpu/s_isnanf.S @@ -0,0 +1 @@ +/* __isnanf is in s_isnan.S. */ diff --git a/sysdeps/ia64/fpu/s_isnanl.S b/sysdeps/ia64/fpu/s_isnanl.S new file mode 100644 index 0000000000..82fb19d72c --- /dev/null +++ b/sysdeps/ia64/fpu/s_isnanl.S @@ -0,0 +1 @@ +/* __isnanl is in s_isnan.S. */ diff --git a/sysdeps/ia64/fpu/s_ldexp.c b/sysdeps/ia64/fpu/s_ldexp.c new file mode 100644 index 0000000000..a0bc14c295 --- /dev/null +++ b/sysdeps/ia64/fpu/s_ldexp.c @@ -0,0 +1,61 @@ +/* file: ldexp.c */ + + +// Copyright (c) 2000, 2001, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// + +#include "libm_support.h" + +double __libm_ldexp(double, int, int); + + +double ldexp(double x, int n) +{ + +#ifdef SIZE_INT_64 + return __libm_ldexp(x,n,1); +#else + +#ifdef SIZE_INT_32 + return __libm_ldexp(x,n,0); +#endif + +#endif + +} diff --git a/sysdeps/ia64/fpu/s_ldexpf.c b/sysdeps/ia64/fpu/s_ldexpf.c new file mode 100644 index 0000000000..ad083fa1c5 --- /dev/null +++ b/sysdeps/ia64/fpu/s_ldexpf.c @@ -0,0 +1,61 @@ +/* file: ldexpf.c */ + + +// Copyright (c) 2000, 2001, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// + +#include "libm_support.h" + +float __libm_ldexpf(float, int, int); + + +float ldexpf(float x, int n) +{ + +#ifdef SIZE_INT_64 + return __libm_ldexpf(x,n,1); +#else + +#ifdef SIZE_INT_32 + return __libm_ldexpf(x,n,0); +#endif + +#endif + +} diff --git a/sysdeps/ia64/fpu/s_ldexpl.c b/sysdeps/ia64/fpu/s_ldexpl.c new file mode 100644 index 0000000000..61dfd21f13 --- /dev/null +++ b/sysdeps/ia64/fpu/s_ldexpl.c @@ -0,0 +1,61 @@ +/* file: ldexpl.c */ + + +// Copyright (c) 2000, 2001, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// + +#include "libm_support.h" + +long double __libm_ldexpl(long double, int, int); + + +long double ldexpl(long double x, int n) +{ + +#ifdef SIZE_INT_64 + return __libm_ldexpl(x,n,1); +#else + +#ifdef SIZE_INT_32 + return __libm_ldexpl(x,n,0); +#endif + +#endif + +} diff --git a/sysdeps/ia64/fpu/s_libm_ldexp.S b/sysdeps/ia64/fpu/s_libm_ldexp.S new file mode 100644 index 0000000000..2aaf2c35fd --- /dev/null +++ b/sysdeps/ia64/fpu/s_libm_ldexp.S @@ -0,0 +1,452 @@ +.file "libm_ldexp.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 01/26/01 ldexp completely reworked and now standalone version +// 01/04/02 Added handling for int 32 or 64 bits +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// 08/04/03 Improved performance +// +// API +//============================================================== +// double __libm_ldexp (double x, int n, int int_type) +// input floating point f8 and int n (r33), int int_type (r34) +// output floating point f8 +// +// int_type = 0 if int is 32 bits +// int_type = 1 if int is 64 bits +// +// Returns x* 2**n using an fma and detects overflow +// and underflow. +// +// +// Strategy: +// Compute biased exponent of result exp_Result = N + exp_X +// Break into ranges: +// exp_Result > 0x103fe -> Certain overflow +// exp_Result = 0x103fe -> Possible overflow +// 0x0fc01 <= exp_Result < 0x103fe -> No over/underflow (main path) +// 0x0fc01 - 52 <= exp_Result < 0x0fc01 -> Possible underflow +// exp_Result < 0x0fc01 - 52 -> Certain underflow + +FR_Big = f6 +FR_NBig = f7 +FR_Floating_X = f8 +FR_Result = f8 +FR_Result2 = f9 +FR_Result3 = f10 +FR_Norm_X = f11 +FR_Two_N = f12 + +GR_neg_ov_limit= r14 +GR_N_Biased = r15 +GR_Big = r16 +GR_NBig = r17 +GR_exp_Result = r18 +GR_pos_ov_limit= r19 +GR_Bias = r20 +GR_N_as_int = r21 +GR_signexp_X = r22 +GR_exp_X = r23 +GR_exp_mask = r24 +GR_max_exp = r25 +GR_min_exp = r26 +GR_min_den_exp = r27 + +GR_SAVE_B0 = r32 +GR_SAVE_GP = r33 +GR_SAVE_PFS = r34 +GR_Parameter_X = r35 +GR_Parameter_Y = r36 +GR_Parameter_RESULT = r37 +GR_Tag = r38 + +.section .text +GLOBAL_LIBM_ENTRY(__libm_ldexp) + +// +// Is x NAN, INF, ZERO, +-? +// Build the exponent Bias +// +{ .mfi + getf.exp GR_signexp_X = FR_Floating_X // Get signexp of x + fclass.m p6,p0 = FR_Floating_X, 0xe7 // @snan | @qnan | @inf | @zero + mov GR_Bias = 0x0ffff +} +// +// Normalize x +// Is integer type 32 bits? +// +{ .mfi + mov GR_Big = 35000 // If N this big then certain overflow + fnorm.s1 FR_Norm_X = FR_Floating_X + cmp.eq p8,p9 = r34,r0 +} +;; + +// Sign extend N if int is 32 bits +{ .mfi +(p9) mov GR_N_as_int = r33 // Copy N if int is 64 bits + fclass.m p9,p0 = FR_Floating_X, 0x0b // Test for x=unorm +(p8) sxt4 GR_N_as_int = r33 // Sign extend N if int is 32 bits +} +{ .mfi + mov GR_NBig = -35000 // If N this small then certain underflow + nop.f 0 + mov GR_max_exp = 0x103fe // Exponent of maximum double +} +;; + +// Create biased exponent for 2**N +{ .mfi + add GR_N_Biased = GR_Bias,GR_N_as_int + nop.f 0 + cmp.ge p7, p0 = GR_N_as_int, GR_Big // Certain overflow? +} +{ .mib + cmp.le p8, p0 = GR_N_as_int, GR_NBig // Certain underflow? + mov GR_min_exp = 0x0fc01 // Exponent of minimum double +(p9) br.cond.spnt LDEXP_UNORM // Branch if x=unorm +} +;; + +LDEXP_COMMON: +// Main path continues. Also return here from x=unorm path. +// Create 2**N +.pred.rel "mutex",p7,p8 +{ .mfi + setf.exp FR_Two_N = GR_N_Biased + nop.f 0 +(p7) mov GR_N_as_int = GR_Big // Limit max N +} +{ .mfi +(p8) mov GR_N_as_int = GR_NBig // Limit min N + nop.f 0 +(p8) cmp.eq p7,p0 = r0,r0 // Set p7 if |N| big +} +;; + +// +// Create biased exponent for 2**N for N big +// Is N zero? +// +{ .mfi +(p7) add GR_N_Biased = GR_Bias,GR_N_as_int + nop.f 0 + cmp.eq.or p6,p0 = r33,r0 +} +{ .mfi + mov GR_pos_ov_limit = 0x103ff // Exponent for positive overflow + nop.f 0 + mov GR_exp_mask = 0x1ffff // Exponent mask +} +;; + +// +// Create 2**N for N big +// Return x when N = 0 or X = Nan, Inf, Zero +// +{ .mfi +(p7) setf.exp FR_Two_N = GR_N_Biased + nop.f 0 + mov GR_min_den_exp = 0x0fc01 - 52 // Exponent of min denorm dble +} +{ .mfb + and GR_exp_X = GR_exp_mask, GR_signexp_X +(p6) fma.d.s0 FR_Result = FR_Floating_X, f1, f0 +(p6) br.ret.spnt b0 +} +;; + +// +// Raise Denormal operand flag with compare +// Compute biased result exponent +// +{ .mfi + add GR_exp_Result = GR_exp_X, GR_N_as_int + fcmp.ge.s0 p0,p11 = FR_Floating_X,f0 + mov GR_neg_ov_limit = 0x303ff // Exponent for negative overflow +} +;; + +// +// Do final operation +// +{ .mfi + cmp.lt p7,p6 = GR_exp_Result, GR_max_exp // Test no overflow + fma.d.s0 FR_Result = FR_Two_N,FR_Norm_X,f0 + cmp.lt p9,p0 = GR_exp_Result, GR_min_den_exp // Test sure underflow +} +{ .mfb + nop.m 0 + nop.f 0 +(p9) br.cond.spnt LDEXP_UNDERFLOW // Branch if certain underflow +} +;; + +{ .mib +(p6) cmp.gt.unc p6,p8 = GR_exp_Result, GR_max_exp // Test sure overflow +(p7) cmp.ge.unc p7,p9 = GR_exp_Result, GR_min_exp // Test no over/underflow +(p7) br.ret.sptk b0 // Return from main path +} +;; + +{ .bbb +(p6) br.cond.spnt LDEXP_OVERFLOW // Branch if certain overflow +(p8) br.cond.spnt LDEXP_POSSIBLE_OVERFLOW // Branch if possible overflow +(p9) br.cond.spnt LDEXP_POSSIBLE_UNDERFLOW // Branch if possible underflow +} +;; + +// Here if possible underflow. +// Resulting exponent: 0x0fc01-52 <= exp_Result < 0x0fc01 +LDEXP_POSSIBLE_UNDERFLOW: +// +// Here if possible overflow. +// Resulting exponent: 0x103fe = exp_Result +LDEXP_POSSIBLE_OVERFLOW: + +// Set up necessary status fields +// +// S0 user supplied status +// S2 user supplied status + WRE + TD (Overflows) +// S3 user supplied status + FZ + TD (Underflows) +// +{ .mfi + nop.m 0 + fsetc.s3 0x7F,0x41 + nop.i 0 +} +{ .mfi + nop.m 0 + fsetc.s2 0x7F,0x42 + nop.i 0 +} +;; + +// +// Do final operation with s2 and s3 +// +{ .mfi + setf.exp FR_NBig = GR_neg_ov_limit + fma.d.s3 FR_Result3 = FR_Two_N,FR_Norm_X,f0 + nop.i 0 +} +{ .mfi + setf.exp FR_Big = GR_pos_ov_limit + fma.d.s2 FR_Result2 = FR_Two_N,FR_Norm_X,f0 + nop.i 0 +} +;; + +// Check for overflow or underflow. +// Restore s3 +// Restore s2 +// +{ .mfi + nop.m 0 + fsetc.s3 0x7F,0x40 + nop.i 0 +} +{ .mfi + nop.m 0 + fsetc.s2 0x7F,0x40 + nop.i 0 +} +;; + +// +// Is the result zero? +// +{ .mfi + nop.m 0 + fclass.m p6, p0 = FR_Result3, 0x007 + nop.i 0 +} +{ .mfi + nop.m 0 + fcmp.ge.s1 p7, p8 = FR_Result2 , FR_Big + nop.i 0 +} +;; + +// +// Detect masked underflow - Tiny + Inexact Only +// +{ .mfi + nop.m 0 +(p6) fcmp.neq.unc.s1 p6, p0 = FR_Result , FR_Result2 + nop.i 0 +} +;; + +// +// Is result bigger the allowed range? +// Branch out for underflow +// +{ .mfb + nop.m 0 +(p8) fcmp.le.unc.s1 p9, p10 = FR_Result2 , FR_NBig +(p6) br.cond.spnt LDEXP_UNDERFLOW +} +;; + +// +// Branch out for overflow +// +{ .bbb +(p7) br.cond.spnt LDEXP_OVERFLOW +(p9) br.cond.spnt LDEXP_OVERFLOW + br.ret.sptk b0 // Return from main path. +} +;; + +// Here if result overflows +LDEXP_OVERFLOW: +{ .mib + alloc r32=ar.pfs,3,0,4,0 + addl GR_Tag = 146, r0 // Set error tag for overflow + br.cond.sptk __libm_error_region // Call error support for overflow +} +;; + +// Here if result underflows +LDEXP_UNDERFLOW: +{ .mib + alloc r32=ar.pfs,3,0,4,0 + addl GR_Tag = 147, r0 // Set error tag for underflow + br.cond.sptk __libm_error_region // Call error support for underflow +} +;; + +// Here if x=unorm +LDEXP_UNORM: +{ .mib + getf.exp GR_signexp_X = FR_Norm_X // Get signexp of normalized x + nop.i 0 + br.cond.sptk LDEXP_COMMON // Return to main path +} +;; + + +GLOBAL_LIBM_END(__libm_ldexp) +LOCAL_LIBM_ENTRY(__libm_error_region) + +// +// Get stack address of N +// +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs +} +// +// Adjust sp +// +{ .mfi +.fframe 64 + add sp=-64,sp + nop.f 0 + mov GR_SAVE_GP=gp +};; + +// +// Store N on stack in correct position +// Locate the address of x on stack +// +{ .mmi + st8 [GR_Parameter_Y] = GR_N_as_int,16 + add GR_Parameter_X = 16,sp +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 +};; + +// +// Store x on the stack. +// Get address for result on stack. +// +.body +{ .mib + stfd [GR_Parameter_X] = FR_Norm_X + add GR_Parameter_RESULT = 0,GR_Parameter_Y + nop.b 0 +} +{ .mib + stfd [GR_Parameter_Y] = FR_Result + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# +};; + +// +// Get location of result on stack +// +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; + +// +// Get the new result +// +{ .mmi + ldfd FR_Result = [GR_Parameter_RESULT] +.restore sp + add sp = 64,sp + mov b0 = GR_SAVE_B0 +};; + +// +// Restore gp, ar.pfs and return +// +{ .mib + mov gp = GR_SAVE_GP + mov ar.pfs = GR_SAVE_PFS + br.ret.sptk b0 +};; + +LOCAL_LIBM_END(__libm_error_region) + +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/s_libm_ldexpf.S b/sysdeps/ia64/fpu/s_libm_ldexpf.S new file mode 100644 index 0000000000..1326a14c2d --- /dev/null +++ b/sysdeps/ia64/fpu/s_libm_ldexpf.S @@ -0,0 +1,452 @@ +.file "libm_ldexpf.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 01/26/01 ldexpf completely reworked and now standalone version +// 01/04/02 Added handling for int 32 or 64 bits +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// 08/04/03 Improved performance +// +// API +//============================================================== +// float __libm_ldexpf (float x, int n, int int_type) +// input floating point f8 and int n (r33), int int_type (r34) +// output floating point f8 +// +// int_type = 0 if int is 32 bits +// int_type = 1 if int is 64 bits +// +// Returns x* 2**n using an fma and detects overflow +// and underflow. +// +// +// Strategy: +// Compute biased exponent of result exp_Result = N + exp_X +// Break into ranges: +// exp_Result > 0x1007e -> Certain overflow +// exp_Result = 0x1007e -> Possible overflow +// 0x0ff81 <= exp_Result < 0x1007e -> No over/underflow (main path) +// 0x0ff81 - 23 <= exp_Result < 0x0ff81 -> Possible underflow +// exp_Result < 0x0ff81 - 23 -> Certain underflow + +FR_Big = f6 +FR_NBig = f7 +FR_Floating_X = f8 +FR_Result = f8 +FR_Result2 = f9 +FR_Result3 = f10 +FR_Norm_X = f11 +FR_Two_N = f12 + +GR_neg_ov_limit= r14 +GR_N_Biased = r15 +GR_Big = r16 +GR_NBig = r17 +GR_exp_Result = r18 +GR_pos_ov_limit= r19 +GR_Bias = r20 +GR_N_as_int = r21 +GR_signexp_X = r22 +GR_exp_X = r23 +GR_exp_mask = r24 +GR_max_exp = r25 +GR_min_exp = r26 +GR_min_den_exp = r27 + +GR_SAVE_B0 = r32 +GR_SAVE_GP = r33 +GR_SAVE_PFS = r34 +GR_Parameter_X = r35 +GR_Parameter_Y = r36 +GR_Parameter_RESULT = r37 +GR_Tag = r38 + +.section .text +GLOBAL_LIBM_ENTRY(__libm_ldexpf) + +// +// Is x NAN, INF, ZERO, +-? +// Build the exponent Bias +// +{ .mfi + getf.exp GR_signexp_X = FR_Floating_X // Get signexp of x + fclass.m p6,p0 = FR_Floating_X, 0xe7 // @snan | @qnan | @inf | @zero + mov GR_Bias = 0x0ffff +} +// +// Normalize x +// Is integer type 32 bits? +// +{ .mfi + mov GR_Big = 35000 // If N this big then certain overflow + fnorm.s1 FR_Norm_X = FR_Floating_X + cmp.eq p8,p9 = r34,r0 +} +;; + +// Sign extend N if int is 32 bits +{ .mfi +(p9) mov GR_N_as_int = r33 // Copy N if int is 64 bits + fclass.m p9,p0 = FR_Floating_X, 0x0b // Test for x=unorm +(p8) sxt4 GR_N_as_int = r33 // Sign extend N if int is 32 bits +} +{ .mfi + mov GR_NBig = -35000 // If N this small then certain underflow + nop.f 0 + mov GR_max_exp = 0x1007e // Exponent of maximum float +} +;; + +// Create biased exponent for 2**N +{ .mfi + add GR_N_Biased = GR_Bias,GR_N_as_int + nop.f 0 + cmp.ge p7, p0 = GR_N_as_int, GR_Big // Certain overflow? +} +{ .mib + cmp.le p8, p0 = GR_N_as_int, GR_NBig // Certain underflow? + mov GR_min_exp = 0x0ff81 // Exponent of minimum float +(p9) br.cond.spnt LDEXPF_UNORM // Branch if x=unorm +} +;; + +LDEXPF_COMMON: +// Main path continues. Also return here from x=unorm path. +// Create 2**N +.pred.rel "mutex",p7,p8 +{ .mfi + setf.exp FR_Two_N = GR_N_Biased + nop.f 0 +(p7) mov GR_N_as_int = GR_Big // Limit max N +} +{ .mfi +(p8) mov GR_N_as_int = GR_NBig // Limit min N + nop.f 0 +(p8) cmp.eq p7,p0 = r0,r0 // Set p7 if |N| big +} +;; + +// +// Create biased exponent for 2**N for N big +// Is N zero? +// +{ .mfi +(p7) add GR_N_Biased = GR_Bias,GR_N_as_int + nop.f 0 + cmp.eq.or p6,p0 = r33,r0 +} +{ .mfi + mov GR_pos_ov_limit = 0x1007f // Exponent for positive overflow + nop.f 0 + mov GR_exp_mask = 0x1ffff // Exponent mask +} +;; + +// +// Create 2**N for N big +// Return x when N = 0 or X = Nan, Inf, Zero +// +{ .mfi +(p7) setf.exp FR_Two_N = GR_N_Biased + nop.f 0 + mov GR_min_den_exp = 0x0ff81 - 23 // Exponent of min denorm float +} +{ .mfb + and GR_exp_X = GR_exp_mask, GR_signexp_X +(p6) fma.s.s0 FR_Result = FR_Floating_X, f1, f0 +(p6) br.ret.spnt b0 +} +;; + +// +// Raise Denormal operand flag with compare +// Compute biased result exponent +// +{ .mfi + add GR_exp_Result = GR_exp_X, GR_N_as_int + fcmp.ge.s0 p0,p11 = FR_Floating_X,f0 + mov GR_neg_ov_limit = 0x3007f // Exponent for negative overflow +} +;; + +// +// Do final operation +// +{ .mfi + cmp.lt p7,p6 = GR_exp_Result, GR_max_exp // Test no overflow + fma.s.s0 FR_Result = FR_Two_N,FR_Norm_X,f0 + cmp.lt p9,p0 = GR_exp_Result, GR_min_den_exp // Test sure underflow +} +{ .mfb + nop.m 0 + nop.f 0 +(p9) br.cond.spnt LDEXPF_UNDERFLOW // Branch if certain underflow +} +;; + +{ .mib +(p6) cmp.gt.unc p6,p8 = GR_exp_Result, GR_max_exp // Test sure overflow +(p7) cmp.ge.unc p7,p9 = GR_exp_Result, GR_min_exp // Test no over/underflow +(p7) br.ret.sptk b0 // Return from main path +} +;; + +{ .bbb +(p6) br.cond.spnt LDEXPF_OVERFLOW // Branch if certain overflow +(p8) br.cond.spnt LDEXPF_POSSIBLE_OVERFLOW // Branch if possible overflow +(p9) br.cond.spnt LDEXPF_POSSIBLE_UNDERFLOW // Branch if possible underflow +} +;; + +// Here if possible underflow. +// Resulting exponent: 0x0ff81-23 <= exp_Result < 0x0ff81 +LDEXPF_POSSIBLE_UNDERFLOW: +// +// Here if possible overflow. +// Resulting exponent: 0x1007e = exp_Result +LDEXPF_POSSIBLE_OVERFLOW: + +// Set up necessary status fields +// +// S0 user supplied status +// S2 user supplied status + WRE + TD (Overflows) +// S3 user supplied status + FZ + TD (Underflows) +// +{ .mfi + nop.m 0 + fsetc.s3 0x7F,0x41 + nop.i 0 +} +{ .mfi + nop.m 0 + fsetc.s2 0x7F,0x42 + nop.i 0 +} +;; + +// +// Do final operation with s2 and s3 +// +{ .mfi + setf.exp FR_NBig = GR_neg_ov_limit + fma.s.s3 FR_Result3 = FR_Two_N,FR_Norm_X,f0 + nop.i 0 +} +{ .mfi + setf.exp FR_Big = GR_pos_ov_limit + fma.s.s2 FR_Result2 = FR_Two_N,FR_Norm_X,f0 + nop.i 0 +} +;; + +// Check for overflow or underflow. +// Restore s3 +// Restore s2 +// +{ .mfi + nop.m 0 + fsetc.s3 0x7F,0x40 + nop.i 0 +} +{ .mfi + nop.m 0 + fsetc.s2 0x7F,0x40 + nop.i 0 +} +;; + +// +// Is the result zero? +// +{ .mfi + nop.m 0 + fclass.m p6, p0 = FR_Result3, 0x007 + nop.i 0 +} +{ .mfi + nop.m 0 + fcmp.ge.s1 p7, p8 = FR_Result2 , FR_Big + nop.i 0 +} +;; + +// +// Detect masked underflow - Tiny + Inexact Only +// +{ .mfi + nop.m 0 +(p6) fcmp.neq.unc.s1 p6, p0 = FR_Result , FR_Result2 + nop.i 0 +} +;; + +// +// Is result bigger the allowed range? +// Branch out for underflow +// +{ .mfb + nop.m 0 +(p8) fcmp.le.unc.s1 p9, p10 = FR_Result2 , FR_NBig +(p6) br.cond.spnt LDEXPF_UNDERFLOW +} +;; + +// +// Branch out for overflow +// +{ .bbb +(p7) br.cond.spnt LDEXPF_OVERFLOW +(p9) br.cond.spnt LDEXPF_OVERFLOW + br.ret.sptk b0 // Return from main path. +} +;; + +// Here if result overflows +LDEXPF_OVERFLOW: +{ .mib + alloc r32=ar.pfs,3,0,4,0 + addl GR_Tag = 148, r0 // Set error tag for overflow + br.cond.sptk __libm_error_region // Call error support for overflow +} +;; + +// Here if result underflows +LDEXPF_UNDERFLOW: +{ .mib + alloc r32=ar.pfs,3,0,4,0 + addl GR_Tag = 149, r0 // Set error tag for underflow + br.cond.sptk __libm_error_region // Call error support for underflow +} +;; + +// Here if x=unorm +LDEXPF_UNORM: +{ .mib + getf.exp GR_signexp_X = FR_Norm_X // Get signexp of normalized x + nop.i 0 + br.cond.sptk LDEXPF_COMMON // Return to main path +} +;; + + +GLOBAL_LIBM_END(__libm_ldexpf) +LOCAL_LIBM_ENTRY(__libm_error_region) + +// +// Get stack address of N +// +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs +} +// +// Adjust sp +// +{ .mfi +.fframe 64 + add sp=-64,sp + nop.f 0 + mov GR_SAVE_GP=gp +};; + +// +// Store N on stack in correct position +// Locate the address of x on stack +// +{ .mmi + st8 [GR_Parameter_Y] = GR_N_as_int,16 + add GR_Parameter_X = 16,sp +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 +};; + +// +// Store x on the stack. +// Get address for result on stack. +// +.body +{ .mib + stfs [GR_Parameter_X] = FR_Norm_X + add GR_Parameter_RESULT = 0,GR_Parameter_Y + nop.b 0 +} +{ .mib + stfs [GR_Parameter_Y] = FR_Result + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# +};; + +// +// Get location of result on stack +// +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; + +// +// Get the new result +// +{ .mmi + ldfs FR_Result = [GR_Parameter_RESULT] +.restore sp + add sp = 64,sp + mov b0 = GR_SAVE_B0 +};; + +// +// Restore gp, ar.pfs and return +// +{ .mib + mov gp = GR_SAVE_GP + mov ar.pfs = GR_SAVE_PFS + br.ret.sptk b0 +};; + +LOCAL_LIBM_END(__libm_error_region) + +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/s_libm_ldexpl.S b/sysdeps/ia64/fpu/s_libm_ldexpl.S new file mode 100644 index 0000000000..fffda9e55a --- /dev/null +++ b/sysdeps/ia64/fpu/s_libm_ldexpl.S @@ -0,0 +1,452 @@ +.file "libm_ldexpl.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 01/26/01 ldexpl completely reworked and now standalone version +// 01/04/02 Added handling for int 32 or 64 bits +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// 08/04/03 Improved performance +// +// API +//============================================================== +// long double __libm_ldexpl (long double x, int n, int int_type) +// input floating point f8 and int n (r34), int int_type (r35) +// output floating point f8 +// +// int_type = 0 if int is 32 bits +// int_type = 1 if int is 64 bits +// +// Returns x* 2**n using an fma and detects overflow +// and underflow. +// +// +// Strategy: +// Compute biased exponent of result exp_Result = N + exp_X +// Break into ranges: +// exp_Result > 0x13ffe -> Certain overflow +// exp_Result = 0x13ffe -> Possible overflow +// 0x0c001 <= exp_Result < 0x13ffe -> No over/underflow (main path) +// 0x0c001 - 63 <= exp_Result < 0x0c001 -> Possible underflow +// exp_Result < 0x0c001 - 63 -> Certain underflow + +FR_Big = f6 +FR_NBig = f7 +FR_Floating_X = f8 +FR_Result = f8 +FR_Result2 = f9 +FR_Result3 = f10 +FR_Norm_X = f11 +FR_Two_N = f12 + +GR_neg_ov_limit= r14 +GR_N_Biased = r15 +GR_Big = r16 +GR_NBig = r17 +GR_exp_Result = r18 +GR_pos_ov_limit= r19 +GR_Bias = r20 +GR_N_as_int = r21 +GR_signexp_X = r22 +GR_exp_X = r23 +GR_exp_mask = r24 +GR_max_exp = r25 +GR_min_exp = r26 +GR_min_den_exp = r27 + +GR_SAVE_B0 = r32 +GR_SAVE_GP = r33 +GR_SAVE_PFS = r34 +GR_Parameter_X = r35 +GR_Parameter_Y = r36 +GR_Parameter_RESULT = r37 +GR_Tag = r38 + +.section .text +GLOBAL_LIBM_ENTRY(__libm_ldexpl) + +// +// Is x NAN, INF, ZERO, +-? +// Build the exponent Bias +// +{ .mfi + getf.exp GR_signexp_X = FR_Floating_X // Get signexp of x + fclass.m p6,p0 = FR_Floating_X, 0xe7 // @snan | @qnan | @inf | @zero + mov GR_Bias = 0x0ffff +} +// +// Normalize x +// Is integer type 32 bits? +// +{ .mfi + mov GR_Big = 35000 // If N this big then certain overflow + fnorm.s1 FR_Norm_X = FR_Floating_X + cmp.eq p8,p9 = r35,r0 +} +;; + +// Sign extend N if int is 32 bits +{ .mfi +(p9) mov GR_N_as_int = r34 // Copy N if int is 64 bits + fclass.m p9,p0 = FR_Floating_X, 0x0b // Test for x=unorm +(p8) sxt4 GR_N_as_int = r34 // Sign extend N if int is 32 bits +} +{ .mfi + mov GR_NBig = -35000 // If N this small then certain underflow + nop.f 0 + mov GR_max_exp = 0x13ffe // Exponent of maximum long double +} +;; + +// Create biased exponent for 2**N +{ .mfi + add GR_N_Biased = GR_Bias,GR_N_as_int + nop.f 0 + cmp.ge p7, p0 = GR_N_as_int, GR_Big // Certain overflow? +} +{ .mib + cmp.le p8, p0 = GR_N_as_int, GR_NBig // Certain underflow? + mov GR_min_exp = 0x0c001 // Exponent of minimum long double +(p9) br.cond.spnt LDEXPL_UNORM // Branch if x=unorm +} +;; + +LDEXPL_COMMON: +// Main path continues. Also return here from x=unorm path. +// Create 2**N +.pred.rel "mutex",p7,p8 +{ .mfi + setf.exp FR_Two_N = GR_N_Biased + nop.f 0 +(p7) mov GR_N_as_int = GR_Big // Limit max N +} +{ .mfi +(p8) mov GR_N_as_int = GR_NBig // Limit min N + nop.f 0 +(p8) cmp.eq p7,p0 = r0,r0 // Set p7 if |N| big +} +;; + +// +// Create biased exponent for 2**N for N big +// Is N zero? +// +{ .mfi +(p7) add GR_N_Biased = GR_Bias,GR_N_as_int + nop.f 0 + cmp.eq.or p6,p0 = r34,r0 +} +{ .mfi + mov GR_pos_ov_limit = 0x13fff // Exponent for positive overflow + nop.f 0 + mov GR_exp_mask = 0x1ffff // Exponent mask +} +;; + +// +// Create 2**N for N big +// Return x when N = 0 or X = Nan, Inf, Zero +// +{ .mfi +(p7) setf.exp FR_Two_N = GR_N_Biased + nop.f 0 + mov GR_min_den_exp = 0x0c001 - 63 // Exp of min denorm long dble +} +{ .mfb + and GR_exp_X = GR_exp_mask, GR_signexp_X +(p6) fma.s0 FR_Result = FR_Floating_X, f1, f0 +(p6) br.ret.spnt b0 +} +;; + +// +// Raise Denormal operand flag with compare +// Compute biased result exponent +// +{ .mfi + add GR_exp_Result = GR_exp_X, GR_N_as_int + fcmp.ge.s0 p0,p11 = FR_Floating_X,f0 + mov GR_neg_ov_limit = 0x33fff // Exponent for negative overflow +} +;; + +// +// Do final operation +// +{ .mfi + cmp.lt p7,p6 = GR_exp_Result, GR_max_exp // Test no overflow + fma.s0 FR_Result = FR_Two_N,FR_Norm_X,f0 + cmp.lt p9,p0 = GR_exp_Result, GR_min_den_exp // Test sure underflow +} +{ .mfb + nop.m 0 + nop.f 0 +(p9) br.cond.spnt LDEXPL_UNDERFLOW // Branch if certain underflow +} +;; + +{ .mib +(p6) cmp.gt.unc p6,p8 = GR_exp_Result, GR_max_exp // Test sure overflow +(p7) cmp.ge.unc p7,p9 = GR_exp_Result, GR_min_exp // Test no over/underflow +(p7) br.ret.sptk b0 // Return from main path +} +;; + +{ .bbb +(p6) br.cond.spnt LDEXPL_OVERFLOW // Branch if certain overflow +(p8) br.cond.spnt LDEXPL_POSSIBLE_OVERFLOW // Branch if possible overflow +(p9) br.cond.spnt LDEXPL_POSSIBLE_UNDERFLOW // Branch if possible underflow +} +;; + +// Here if possible underflow. +// Resulting exponent: 0x0c001-63 <= exp_Result < 0x0c001 +LDEXPL_POSSIBLE_UNDERFLOW: +// +// Here if possible overflow. +// Resulting exponent: 0x13ffe = exp_Result +LDEXPL_POSSIBLE_OVERFLOW: + +// Set up necessary status fields +// +// S0 user supplied status +// S2 user supplied status + WRE + TD (Overflows) +// S3 user supplied status + FZ + TD (Underflows) +// +{ .mfi + nop.m 0 + fsetc.s3 0x7F,0x41 + nop.i 0 +} +{ .mfi + nop.m 0 + fsetc.s2 0x7F,0x42 + nop.i 0 +} +;; + +// +// Do final operation with s2 and s3 +// +{ .mfi + setf.exp FR_NBig = GR_neg_ov_limit + fma.s3 FR_Result3 = FR_Two_N,FR_Norm_X,f0 + nop.i 0 +} +{ .mfi + setf.exp FR_Big = GR_pos_ov_limit + fma.s2 FR_Result2 = FR_Two_N,FR_Norm_X,f0 + nop.i 0 +} +;; + +// Check for overflow or underflow. +// Restore s3 +// Restore s2 +// +{ .mfi + nop.m 0 + fsetc.s3 0x7F,0x40 + nop.i 0 +} +{ .mfi + nop.m 0 + fsetc.s2 0x7F,0x40 + nop.i 0 +} +;; + +// +// Is the result zero? +// +{ .mfi + nop.m 0 + fclass.m p6, p0 = FR_Result3, 0x007 + nop.i 0 +} +{ .mfi + nop.m 0 + fcmp.ge.s1 p7, p8 = FR_Result2 , FR_Big + nop.i 0 +} +;; + +// +// Detect masked underflow - Tiny + Inexact Only +// +{ .mfi + nop.m 0 +(p6) fcmp.neq.unc.s1 p6, p0 = FR_Result , FR_Result2 + nop.i 0 +} +;; + +// +// Is result bigger the allowed range? +// Branch out for underflow +// +{ .mfb + nop.m 0 +(p8) fcmp.le.unc.s1 p9, p10 = FR_Result2 , FR_NBig +(p6) br.cond.spnt LDEXPL_UNDERFLOW +} +;; + +// +// Branch out for overflow +// +{ .bbb +(p7) br.cond.spnt LDEXPL_OVERFLOW +(p9) br.cond.spnt LDEXPL_OVERFLOW + br.ret.sptk b0 // Return from main path. +} +;; + +// Here if result overflows +LDEXPL_OVERFLOW: +{ .mib + alloc r32=ar.pfs,3,0,4,0 + addl GR_Tag = 144, r0 // Set error tag for overflow + br.cond.sptk __libm_error_region // Call error support for overflow +} +;; + +// Here if result underflows +LDEXPL_UNDERFLOW: +{ .mib + alloc r32=ar.pfs,3,0,4,0 + addl GR_Tag = 145, r0 // Set error tag for underflow + br.cond.sptk __libm_error_region // Call error support for underflow +} +;; + +// Here if x=unorm +LDEXPL_UNORM: +{ .mib + getf.exp GR_signexp_X = FR_Norm_X // Get signexp of normalized x + nop.i 0 + br.cond.sptk LDEXPL_COMMON // Return to main path +} +;; + + +GLOBAL_LIBM_END(__libm_ldexpl) +LOCAL_LIBM_ENTRY(__libm_error_region) + +// +// Get stack address of N +// +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs +} +// +// Adjust sp +// +{ .mfi +.fframe 64 + add sp=-64,sp + nop.f 0 + mov GR_SAVE_GP=gp +};; + +// +// Store N on stack in correct position +// Locate the address of x on stack +// +{ .mmi + st8 [GR_Parameter_Y] = GR_N_as_int,16 + add GR_Parameter_X = 16,sp +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 +};; + +// +// Store x on the stack. +// Get address for result on stack. +// +.body +{ .mib + stfe [GR_Parameter_X] = FR_Norm_X + add GR_Parameter_RESULT = 0,GR_Parameter_Y + nop.b 0 +} +{ .mib + stfe [GR_Parameter_Y] = FR_Result + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# +};; + +// +// Get location of result on stack +// +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; + +// +// Get the new result +// +{ .mmi + ldfe FR_Result = [GR_Parameter_RESULT] +.restore sp + add sp = 64,sp + mov b0 = GR_SAVE_B0 +};; + +// +// Restore gp, ar.pfs and return +// +{ .mib + mov gp = GR_SAVE_GP + mov ar.pfs = GR_SAVE_PFS + br.ret.sptk b0 +};; + +LOCAL_LIBM_END(__libm_error_region) + +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/s_libm_scalbn.S b/sysdeps/ia64/fpu/s_libm_scalbn.S new file mode 100644 index 0000000000..eaccb7de7a --- /dev/null +++ b/sysdeps/ia64/fpu/s_libm_scalbn.S @@ -0,0 +1,452 @@ +.file "libm_scalbn.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 01/26/01 Scalbn completely reworked and now standalone version +// 01/04/02 Added handling for int 32 or 64 bits +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// 08/04/03 Improved performance +// +// API +//============================================================== +// double __libm_scalbn (double x, int n, int int_type) +// input floating point f8 and int n (r33), int int_type (r34) +// output floating point f8 +// +// int_type = 0 if int is 32 bits +// int_type = 1 if int is 64 bits +// +// Returns x* 2**n using an fma and detects overflow +// and underflow. +// +// +// Strategy: +// Compute biased exponent of result exp_Result = N + exp_X +// Break into ranges: +// exp_Result > 0x103fe -> Certain overflow +// exp_Result = 0x103fe -> Possible overflow +// 0x0fc01 <= exp_Result < 0x103fe -> No over/underflow (main path) +// 0x0fc01 - 52 <= exp_Result < 0x0fc01 -> Possible underflow +// exp_Result < 0x0fc01 - 52 -> Certain underflow + +FR_Big = f6 +FR_NBig = f7 +FR_Floating_X = f8 +FR_Result = f8 +FR_Result2 = f9 +FR_Result3 = f10 +FR_Norm_X = f11 +FR_Two_N = f12 + +GR_neg_ov_limit= r14 +GR_N_Biased = r15 +GR_Big = r16 +GR_NBig = r17 +GR_exp_Result = r18 +GR_pos_ov_limit= r19 +GR_Bias = r20 +GR_N_as_int = r21 +GR_signexp_X = r22 +GR_exp_X = r23 +GR_exp_mask = r24 +GR_max_exp = r25 +GR_min_exp = r26 +GR_min_den_exp = r27 + +GR_SAVE_B0 = r32 +GR_SAVE_GP = r33 +GR_SAVE_PFS = r34 +GR_Parameter_X = r35 +GR_Parameter_Y = r36 +GR_Parameter_RESULT = r37 +GR_Tag = r38 + +.section .text +GLOBAL_LIBM_ENTRY(__libm_scalbn) + +// +// Is x NAN, INF, ZERO, +-? +// Build the exponent Bias +// +{ .mfi + getf.exp GR_signexp_X = FR_Floating_X // Get signexp of x + fclass.m p6,p0 = FR_Floating_X, 0xe7 // @snan | @qnan | @inf | @zero + mov GR_Bias = 0x0ffff +} +// +// Normalize x +// Is integer type 32 bits? +// +{ .mfi + mov GR_Big = 35000 // If N this big then certain overflow + fnorm.s1 FR_Norm_X = FR_Floating_X + cmp.eq p8,p9 = r34,r0 +} +;; + +// Sign extend N if int is 32 bits +{ .mfi +(p9) mov GR_N_as_int = r33 // Copy N if int is 64 bits + fclass.m p9,p0 = FR_Floating_X, 0x0b // Test for x=unorm +(p8) sxt4 GR_N_as_int = r33 // Sign extend N if int is 32 bits +} +{ .mfi + mov GR_NBig = -35000 // If N this small then certain underflow + nop.f 0 + mov GR_max_exp = 0x103fe // Exponent of maximum double +} +;; + +// Create biased exponent for 2**N +{ .mfi + add GR_N_Biased = GR_Bias,GR_N_as_int + nop.f 0 + cmp.ge p7, p0 = GR_N_as_int, GR_Big // Certain overflow? +} +{ .mib + cmp.le p8, p0 = GR_N_as_int, GR_NBig // Certain underflow? + mov GR_min_exp = 0x0fc01 // Exponent of minimum double +(p9) br.cond.spnt SCALBN_UNORM // Branch if x=unorm +} +;; + +SCALBN_COMMON: +// Main path continues. Also return here from x=unorm path. +// Create 2**N +.pred.rel "mutex",p7,p8 +{ .mfi + setf.exp FR_Two_N = GR_N_Biased + nop.f 0 +(p7) mov GR_N_as_int = GR_Big // Limit max N +} +{ .mfi +(p8) mov GR_N_as_int = GR_NBig // Limit min N + nop.f 0 +(p8) cmp.eq p7,p0 = r0,r0 // Set p7 if |N| big +} +;; + +// +// Create biased exponent for 2**N for N big +// Is N zero? +// +{ .mfi +(p7) add GR_N_Biased = GR_Bias,GR_N_as_int + nop.f 0 + cmp.eq.or p6,p0 = r33,r0 +} +{ .mfi + mov GR_pos_ov_limit = 0x103ff // Exponent for positive overflow + nop.f 0 + mov GR_exp_mask = 0x1ffff // Exponent mask +} +;; + +// +// Create 2**N for N big +// Return x when N = 0 or X = Nan, Inf, Zero +// +{ .mfi +(p7) setf.exp FR_Two_N = GR_N_Biased + nop.f 0 + mov GR_min_den_exp = 0x0fc01 - 52 // Exponent of min denorm dble +} +{ .mfb + and GR_exp_X = GR_exp_mask, GR_signexp_X +(p6) fma.d.s0 FR_Result = FR_Floating_X, f1, f0 +(p6) br.ret.spnt b0 +} +;; + +// +// Raise Denormal operand flag with compare +// Compute biased result exponent +// +{ .mfi + add GR_exp_Result = GR_exp_X, GR_N_as_int + fcmp.ge.s0 p0,p11 = FR_Floating_X,f0 + mov GR_neg_ov_limit = 0x303ff // Exponent for negative overflow +} +;; + +// +// Do final operation +// +{ .mfi + cmp.lt p7,p6 = GR_exp_Result, GR_max_exp // Test no overflow + fma.d.s0 FR_Result = FR_Two_N,FR_Norm_X,f0 + cmp.lt p9,p0 = GR_exp_Result, GR_min_den_exp // Test sure underflow +} +{ .mfb + nop.m 0 + nop.f 0 +(p9) br.cond.spnt SCALBN_UNDERFLOW // Branch if certain underflow +} +;; + +{ .mib +(p6) cmp.gt.unc p6,p8 = GR_exp_Result, GR_max_exp // Test sure overflow +(p7) cmp.ge.unc p7,p9 = GR_exp_Result, GR_min_exp // Test no over/underflow +(p7) br.ret.sptk b0 // Return from main path +} +;; + +{ .bbb +(p6) br.cond.spnt SCALBN_OVERFLOW // Branch if certain overflow +(p8) br.cond.spnt SCALBN_POSSIBLE_OVERFLOW // Branch if possible overflow +(p9) br.cond.spnt SCALBN_POSSIBLE_UNDERFLOW // Branch if possible underflow +} +;; + +// Here if possible underflow. +// Resulting exponent: 0x0fc01-52 <= exp_Result < 0x0fc01 +SCALBN_POSSIBLE_UNDERFLOW: +// +// Here if possible overflow. +// Resulting exponent: 0x103fe = exp_Result +SCALBN_POSSIBLE_OVERFLOW: + +// Set up necessary status fields +// +// S0 user supplied status +// S2 user supplied status + WRE + TD (Overflows) +// S3 user supplied status + FZ + TD (Underflows) +// +{ .mfi + nop.m 0 + fsetc.s3 0x7F,0x41 + nop.i 0 +} +{ .mfi + nop.m 0 + fsetc.s2 0x7F,0x42 + nop.i 0 +} +;; + +// +// Do final operation with s2 and s3 +// +{ .mfi + setf.exp FR_NBig = GR_neg_ov_limit + fma.d.s3 FR_Result3 = FR_Two_N,FR_Norm_X,f0 + nop.i 0 +} +{ .mfi + setf.exp FR_Big = GR_pos_ov_limit + fma.d.s2 FR_Result2 = FR_Two_N,FR_Norm_X,f0 + nop.i 0 +} +;; + +// Check for overflow or underflow. +// Restore s3 +// Restore s2 +// +{ .mfi + nop.m 0 + fsetc.s3 0x7F,0x40 + nop.i 0 +} +{ .mfi + nop.m 0 + fsetc.s2 0x7F,0x40 + nop.i 0 +} +;; + +// +// Is the result zero? +// +{ .mfi + nop.m 0 + fclass.m p6, p0 = FR_Result3, 0x007 + nop.i 0 +} +{ .mfi + nop.m 0 + fcmp.ge.s1 p7, p8 = FR_Result2 , FR_Big + nop.i 0 +} +;; + +// +// Detect masked underflow - Tiny + Inexact Only +// +{ .mfi + nop.m 0 +(p6) fcmp.neq.unc.s1 p6, p0 = FR_Result , FR_Result2 + nop.i 0 +} +;; + +// +// Is result bigger the allowed range? +// Branch out for underflow +// +{ .mfb + nop.m 0 +(p8) fcmp.le.unc.s1 p9, p10 = FR_Result2 , FR_NBig +(p6) br.cond.spnt SCALBN_UNDERFLOW +} +;; + +// +// Branch out for overflow +// +{ .bbb +(p7) br.cond.spnt SCALBN_OVERFLOW +(p9) br.cond.spnt SCALBN_OVERFLOW + br.ret.sptk b0 // Return from main path. +} +;; + +// Here if result overflows +SCALBN_OVERFLOW: +{ .mib + alloc r32=ar.pfs,3,0,4,0 + addl GR_Tag = 176, r0 // Set error tag for overflow + br.cond.sptk __libm_error_region // Call error support for overflow +} +;; + +// Here if result underflows +SCALBN_UNDERFLOW: +{ .mib + alloc r32=ar.pfs,3,0,4,0 + addl GR_Tag = 177, r0 // Set error tag for underflow + br.cond.sptk __libm_error_region // Call error support for underflow +} +;; + +// Here if x=unorm +SCALBN_UNORM: +{ .mib + getf.exp GR_signexp_X = FR_Norm_X // Get signexp of normalized x + nop.i 0 + br.cond.sptk SCALBN_COMMON // Return to main path +} +;; + + +GLOBAL_LIBM_END(__libm_scalbn) +LOCAL_LIBM_ENTRY(__libm_error_region) + +// +// Get stack address of N +// +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs +} +// +// Adjust sp +// +{ .mfi +.fframe 64 + add sp=-64,sp + nop.f 0 + mov GR_SAVE_GP=gp +};; + +// +// Store N on stack in correct position +// Locate the address of x on stack +// +{ .mmi + st8 [GR_Parameter_Y] = GR_N_as_int,16 + add GR_Parameter_X = 16,sp +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 +};; + +// +// Store x on the stack. +// Get address for result on stack. +// +.body +{ .mib + stfd [GR_Parameter_X] = FR_Norm_X + add GR_Parameter_RESULT = 0,GR_Parameter_Y + nop.b 0 +} +{ .mib + stfd [GR_Parameter_Y] = FR_Result + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# +};; + +// +// Get location of result on stack +// +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; + +// +// Get the new result +// +{ .mmi + ldfd FR_Result = [GR_Parameter_RESULT] +.restore sp + add sp = 64,sp + mov b0 = GR_SAVE_B0 +};; + +// +// Restore gp, ar.pfs and return +// +{ .mib + mov gp = GR_SAVE_GP + mov ar.pfs = GR_SAVE_PFS + br.ret.sptk b0 +};; + +LOCAL_LIBM_END(__libm_error_region) + +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/s_libm_scalbnf.S b/sysdeps/ia64/fpu/s_libm_scalbnf.S new file mode 100644 index 0000000000..e00997aba7 --- /dev/null +++ b/sysdeps/ia64/fpu/s_libm_scalbnf.S @@ -0,0 +1,452 @@ +.file "libm_scalbnf.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 01/26/01 Scalbnf completely reworked and now standalone version +// 01/04/02 Added handling for int 32 or 64 bits +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// 08/04/03 Improved performance +// +// API +//============================================================== +// float __libm_scalbnf (float x, int n, int int_type) +// input floating point f8 and int n (r33), int int_type (r34) +// output floating point f8 +// +// int_type = 0 if int is 32 bits +// int_type = 1 if int is 64 bits +// +// Returns x* 2**n using an fma and detects overflow +// and underflow. +// +// +// Strategy: +// Compute biased exponent of result exp_Result = N + exp_X +// Break into ranges: +// exp_Result > 0x1007e -> Certain overflow +// exp_Result = 0x1007e -> Possible overflow +// 0x0ff81 <= exp_Result < 0x1007e -> No over/underflow (main path) +// 0x0ff81 - 23 <= exp_Result < 0x0ff81 -> Possible underflow +// exp_Result < 0x0ff81 - 23 -> Certain underflow + +FR_Big = f6 +FR_NBig = f7 +FR_Floating_X = f8 +FR_Result = f8 +FR_Result2 = f9 +FR_Result3 = f10 +FR_Norm_X = f11 +FR_Two_N = f12 + +GR_neg_ov_limit= r14 +GR_N_Biased = r15 +GR_Big = r16 +GR_NBig = r17 +GR_exp_Result = r18 +GR_pos_ov_limit= r19 +GR_Bias = r20 +GR_N_as_int = r21 +GR_signexp_X = r22 +GR_exp_X = r23 +GR_exp_mask = r24 +GR_max_exp = r25 +GR_min_exp = r26 +GR_min_den_exp = r27 + +GR_SAVE_B0 = r32 +GR_SAVE_GP = r33 +GR_SAVE_PFS = r34 +GR_Parameter_X = r35 +GR_Parameter_Y = r36 +GR_Parameter_RESULT = r37 +GR_Tag = r38 + +.section .text +GLOBAL_LIBM_ENTRY(__libm_scalbnf) + +// +// Is x NAN, INF, ZERO, +-? +// Build the exponent Bias +// +{ .mfi + getf.exp GR_signexp_X = FR_Floating_X // Get signexp of x + fclass.m p6,p0 = FR_Floating_X, 0xe7 // @snan | @qnan | @inf | @zero + mov GR_Bias = 0x0ffff +} +// +// Normalize x +// Is integer type 32 bits? +// +{ .mfi + mov GR_Big = 35000 // If N this big then certain overflow + fnorm.s1 FR_Norm_X = FR_Floating_X + cmp.eq p8,p9 = r34,r0 +} +;; + +// Sign extend N if int is 32 bits +{ .mfi +(p9) mov GR_N_as_int = r33 // Copy N if int is 64 bits + fclass.m p9,p0 = FR_Floating_X, 0x0b // Test for x=unorm +(p8) sxt4 GR_N_as_int = r33 // Sign extend N if int is 32 bits +} +{ .mfi + mov GR_NBig = -35000 // If N this small then certain underflow + nop.f 0 + mov GR_max_exp = 0x1007e // Exponent of maximum float +} +;; + +// Create biased exponent for 2**N +{ .mfi + add GR_N_Biased = GR_Bias,GR_N_as_int + nop.f 0 + cmp.ge p7, p0 = GR_N_as_int, GR_Big // Certain overflow? +} +{ .mib + cmp.le p8, p0 = GR_N_as_int, GR_NBig // Certain underflow? + mov GR_min_exp = 0x0ff81 // Exponent of minimum float +(p9) br.cond.spnt SCALBNF_UNORM // Branch if x=unorm +} +;; + +SCALBNF_COMMON: +// Main path continues. Also return here from x=unorm path. +// Create 2**N +.pred.rel "mutex",p7,p8 +{ .mfi + setf.exp FR_Two_N = GR_N_Biased + nop.f 0 +(p7) mov GR_N_as_int = GR_Big // Limit max N +} +{ .mfi +(p8) mov GR_N_as_int = GR_NBig // Limit min N + nop.f 0 +(p8) cmp.eq p7,p0 = r0,r0 // Set p7 if |N| big +} +;; + +// +// Create biased exponent for 2**N for N big +// Is N zero? +// +{ .mfi +(p7) add GR_N_Biased = GR_Bias,GR_N_as_int + nop.f 0 + cmp.eq.or p6,p0 = r33,r0 +} +{ .mfi + mov GR_pos_ov_limit = 0x1007f // Exponent for positive overflow + nop.f 0 + mov GR_exp_mask = 0x1ffff // Exponent mask +} +;; + +// +// Create 2**N for N big +// Return x when N = 0 or X = Nan, Inf, Zero +// +{ .mfi +(p7) setf.exp FR_Two_N = GR_N_Biased + nop.f 0 + mov GR_min_den_exp = 0x0ff81 - 23 // Exponent of min denorm float +} +{ .mfb + and GR_exp_X = GR_exp_mask, GR_signexp_X +(p6) fma.s.s0 FR_Result = FR_Floating_X, f1, f0 +(p6) br.ret.spnt b0 +} +;; + +// +// Raise Denormal operand flag with compare +// Compute biased result exponent +// +{ .mfi + add GR_exp_Result = GR_exp_X, GR_N_as_int + fcmp.ge.s0 p0,p11 = FR_Floating_X,f0 + mov GR_neg_ov_limit = 0x3007f // Exponent for negative overflow +} +;; + +// +// Do final operation +// +{ .mfi + cmp.lt p7,p6 = GR_exp_Result, GR_max_exp // Test no overflow + fma.s.s0 FR_Result = FR_Two_N,FR_Norm_X,f0 + cmp.lt p9,p0 = GR_exp_Result, GR_min_den_exp // Test sure underflow +} +{ .mfb + nop.m 0 + nop.f 0 +(p9) br.cond.spnt SCALBNF_UNDERFLOW // Branch if certain underflow +} +;; + +{ .mib +(p6) cmp.gt.unc p6,p8 = GR_exp_Result, GR_max_exp // Test sure overflow +(p7) cmp.ge.unc p7,p9 = GR_exp_Result, GR_min_exp // Test no over/underflow +(p7) br.ret.sptk b0 // Return from main path +} +;; + +{ .bbb +(p6) br.cond.spnt SCALBNF_OVERFLOW // Branch if certain overflow +(p8) br.cond.spnt SCALBNF_POSSIBLE_OVERFLOW // Branch if possible overflow +(p9) br.cond.spnt SCALBNF_POSSIBLE_UNDERFLOW // Branch if possible underflow +} +;; + +// Here if possible underflow. +// Resulting exponent: 0x0ff81-23 <= exp_Result < 0x0ff81 +SCALBNF_POSSIBLE_UNDERFLOW: +// +// Here if possible overflow. +// Resulting exponent: 0x1007e = exp_Result +SCALBNF_POSSIBLE_OVERFLOW: + +// Set up necessary status fields +// +// S0 user supplied status +// S2 user supplied status + WRE + TD (Overflows) +// S3 user supplied status + FZ + TD (Underflows) +// +{ .mfi + nop.m 0 + fsetc.s3 0x7F,0x41 + nop.i 0 +} +{ .mfi + nop.m 0 + fsetc.s2 0x7F,0x42 + nop.i 0 +} +;; + +// +// Do final operation with s2 and s3 +// +{ .mfi + setf.exp FR_NBig = GR_neg_ov_limit + fma.s.s3 FR_Result3 = FR_Two_N,FR_Norm_X,f0 + nop.i 0 +} +{ .mfi + setf.exp FR_Big = GR_pos_ov_limit + fma.s.s2 FR_Result2 = FR_Two_N,FR_Norm_X,f0 + nop.i 0 +} +;; + +// Check for overflow or underflow. +// Restore s3 +// Restore s2 +// +{ .mfi + nop.m 0 + fsetc.s3 0x7F,0x40 + nop.i 0 +} +{ .mfi + nop.m 0 + fsetc.s2 0x7F,0x40 + nop.i 0 +} +;; + +// +// Is the result zero? +// +{ .mfi + nop.m 0 + fclass.m p6, p0 = FR_Result3, 0x007 + nop.i 0 +} +{ .mfi + nop.m 0 + fcmp.ge.s1 p7, p8 = FR_Result2 , FR_Big + nop.i 0 +} +;; + +// +// Detect masked underflow - Tiny + Inexact Only +// +{ .mfi + nop.m 0 +(p6) fcmp.neq.unc.s1 p6, p0 = FR_Result , FR_Result2 + nop.i 0 +} +;; + +// +// Is result bigger the allowed range? +// Branch out for underflow +// +{ .mfb + nop.m 0 +(p8) fcmp.le.unc.s1 p9, p10 = FR_Result2 , FR_NBig +(p6) br.cond.spnt SCALBNF_UNDERFLOW +} +;; + +// +// Branch out for overflow +// +{ .bbb +(p7) br.cond.spnt SCALBNF_OVERFLOW +(p9) br.cond.spnt SCALBNF_OVERFLOW + br.ret.sptk b0 // Return from main path. +} +;; + +// Here if result overflows +SCALBNF_OVERFLOW: +{ .mib + alloc r32=ar.pfs,3,0,4,0 + addl GR_Tag = 178, r0 // Set error tag for overflow + br.cond.sptk __libm_error_region // Call error support for overflow +} +;; + +// Here if result underflows +SCALBNF_UNDERFLOW: +{ .mib + alloc r32=ar.pfs,3,0,4,0 + addl GR_Tag = 179, r0 // Set error tag for underflow + br.cond.sptk __libm_error_region // Call error support for underflow +} +;; + +// Here if x=unorm +SCALBNF_UNORM: +{ .mib + getf.exp GR_signexp_X = FR_Norm_X // Get signexp of normalized x + nop.i 0 + br.cond.sptk SCALBNF_COMMON // Return to main path +} +;; + + +GLOBAL_LIBM_END(__libm_scalbnf) +LOCAL_LIBM_ENTRY(__libm_error_region) + +// +// Get stack address of N +// +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs +} +// +// Adjust sp +// +{ .mfi +.fframe 64 + add sp=-64,sp + nop.f 0 + mov GR_SAVE_GP=gp +};; + +// +// Store N on stack in correct position +// Locate the address of x on stack +// +{ .mmi + st8 [GR_Parameter_Y] = GR_N_as_int,16 + add GR_Parameter_X = 16,sp +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 +};; + +// +// Store x on the stack. +// Get address for result on stack. +// +.body +{ .mib + stfs [GR_Parameter_X] = FR_Norm_X + add GR_Parameter_RESULT = 0,GR_Parameter_Y + nop.b 0 +} +{ .mib + stfs [GR_Parameter_Y] = FR_Result + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# +};; + +// +// Get location of result on stack +// +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; + +// +// Get the new result +// +{ .mmi + ldfs FR_Result = [GR_Parameter_RESULT] +.restore sp + add sp = 64,sp + mov b0 = GR_SAVE_B0 +};; + +// +// Restore gp, ar.pfs and return +// +{ .mib + mov gp = GR_SAVE_GP + mov ar.pfs = GR_SAVE_PFS + br.ret.sptk b0 +};; + +LOCAL_LIBM_END(__libm_error_region) + +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/s_libm_scalbnl.S b/sysdeps/ia64/fpu/s_libm_scalbnl.S new file mode 100644 index 0000000000..1edf9a05d3 --- /dev/null +++ b/sysdeps/ia64/fpu/s_libm_scalbnl.S @@ -0,0 +1,452 @@ +.file "libm_scalbnl.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 01/26/01 Scalbnl completely reworked and now standalone version +// 01/04/02 Added handling for int 32 or 64 bits +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// 08/04/03 Improved performance +// +// API +//============================================================== +// long double __libm_scalbnl (long double x, int n, int int_type) +// input floating point f8 and int n (r34), int int_type (r35) +// output floating point f8 +// +// int_type = 0 if int is 32 bits +// int_type = 1 if int is 64 bits +// +// Returns x* 2**n using an fma and detects overflow +// and underflow. +// +// +// Strategy: +// Compute biased exponent of result exp_Result = N + exp_X +// Break into ranges: +// exp_Result > 0x13ffe -> Certain overflow +// exp_Result = 0x13ffe -> Possible overflow +// 0x0c001 <= exp_Result < 0x13ffe -> No over/underflow (main path) +// 0x0c001 - 63 <= exp_Result < 0x0c001 -> Possible underflow +// exp_Result < 0x0c001 - 63 -> Certain underflow + +FR_Big = f6 +FR_NBig = f7 +FR_Floating_X = f8 +FR_Result = f8 +FR_Result2 = f9 +FR_Result3 = f10 +FR_Norm_X = f11 +FR_Two_N = f12 + +GR_neg_ov_limit= r14 +GR_N_Biased = r15 +GR_Big = r16 +GR_NBig = r17 +GR_exp_Result = r18 +GR_pos_ov_limit= r19 +GR_Bias = r20 +GR_N_as_int = r21 +GR_signexp_X = r22 +GR_exp_X = r23 +GR_exp_mask = r24 +GR_max_exp = r25 +GR_min_exp = r26 +GR_min_den_exp = r27 + +GR_SAVE_B0 = r32 +GR_SAVE_GP = r33 +GR_SAVE_PFS = r34 +GR_Parameter_X = r35 +GR_Parameter_Y = r36 +GR_Parameter_RESULT = r37 +GR_Tag = r38 + +.section .text +GLOBAL_LIBM_ENTRY(__libm_scalbnl) + +// +// Is x NAN, INF, ZERO, +-? +// Build the exponent Bias +// +{ .mfi + getf.exp GR_signexp_X = FR_Floating_X // Get signexp of x + fclass.m p6,p0 = FR_Floating_X, 0xe7 // @snan | @qnan | @inf | @zero + mov GR_Bias = 0x0ffff +} +// +// Normalize x +// Is integer type 32 bits? +// +{ .mfi + mov GR_Big = 35000 // If N this big then certain overflow + fnorm.s1 FR_Norm_X = FR_Floating_X + cmp.eq p8,p9 = r35,r0 +} +;; + +// Sign extend N if int is 32 bits +{ .mfi +(p9) mov GR_N_as_int = r34 // Copy N if int is 64 bits + fclass.m p9,p0 = FR_Floating_X, 0x0b // Test for x=unorm +(p8) sxt4 GR_N_as_int = r34 // Sign extend N if int is 32 bits +} +{ .mfi + mov GR_NBig = -35000 // If N this small then certain underflow + nop.f 0 + mov GR_max_exp = 0x13ffe // Exponent of maximum long double +} +;; + +// Create biased exponent for 2**N +{ .mfi + add GR_N_Biased = GR_Bias,GR_N_as_int + nop.f 0 + cmp.ge p7, p0 = GR_N_as_int, GR_Big // Certain overflow? +} +{ .mib + cmp.le p8, p0 = GR_N_as_int, GR_NBig // Certain underflow? + mov GR_min_exp = 0x0c001 // Exponent of minimum long double +(p9) br.cond.spnt SCALBNL_UNORM // Branch if x=unorm +} +;; + +SCALBNL_COMMON: +// Main path continues. Also return here from x=unorm path. +// Create 2**N +.pred.rel "mutex",p7,p8 +{ .mfi + setf.exp FR_Two_N = GR_N_Biased + nop.f 0 +(p7) mov GR_N_as_int = GR_Big // Limit max N +} +{ .mfi +(p8) mov GR_N_as_int = GR_NBig // Limit min N + nop.f 0 +(p8) cmp.eq p7,p0 = r0,r0 // Set p7 if |N| big +} +;; + +// +// Create biased exponent for 2**N for N big +// Is N zero? +// +{ .mfi +(p7) add GR_N_Biased = GR_Bias,GR_N_as_int + nop.f 0 + cmp.eq.or p6,p0 = r34,r0 +} +{ .mfi + mov GR_pos_ov_limit = 0x13fff // Exponent for positive overflow + nop.f 0 + mov GR_exp_mask = 0x1ffff // Exponent mask +} +;; + +// +// Create 2**N for N big +// Return x when N = 0 or X = Nan, Inf, Zero +// +{ .mfi +(p7) setf.exp FR_Two_N = GR_N_Biased + nop.f 0 + mov GR_min_den_exp = 0x0c001 - 63 // Exp of min denorm long dble +} +{ .mfb + and GR_exp_X = GR_exp_mask, GR_signexp_X +(p6) fma.s0 FR_Result = FR_Floating_X, f1, f0 +(p6) br.ret.spnt b0 +} +;; + +// +// Raise Denormal operand flag with compare +// Compute biased result exponent +// +{ .mfi + add GR_exp_Result = GR_exp_X, GR_N_as_int + fcmp.ge.s0 p0,p11 = FR_Floating_X,f0 + mov GR_neg_ov_limit = 0x33fff // Exponent for negative overflow +} +;; + +// +// Do final operation +// +{ .mfi + cmp.lt p7,p6 = GR_exp_Result, GR_max_exp // Test no overflow + fma.s0 FR_Result = FR_Two_N,FR_Norm_X,f0 + cmp.lt p9,p0 = GR_exp_Result, GR_min_den_exp // Test sure underflow +} +{ .mfb + nop.m 0 + nop.f 0 +(p9) br.cond.spnt SCALBNL_UNDERFLOW // Branch if certain underflow +} +;; + +{ .mib +(p6) cmp.gt.unc p6,p8 = GR_exp_Result, GR_max_exp // Test sure overflow +(p7) cmp.ge.unc p7,p9 = GR_exp_Result, GR_min_exp // Test no over/underflow +(p7) br.ret.sptk b0 // Return from main path +} +;; + +{ .bbb +(p6) br.cond.spnt SCALBNL_OVERFLOW // Branch if certain overflow +(p8) br.cond.spnt SCALBNL_POSSIBLE_OVERFLOW // Branch if possible overflow +(p9) br.cond.spnt SCALBNL_POSSIBLE_UNDERFLOW // Branch if possible underflow +} +;; + +// Here if possible underflow. +// Resulting exponent: 0x0c001-63 <= exp_Result < 0x0c001 +SCALBNL_POSSIBLE_UNDERFLOW: +// +// Here if possible overflow. +// Resulting exponent: 0x13ffe = exp_Result +SCALBNL_POSSIBLE_OVERFLOW: + +// Set up necessary status fields +// +// S0 user supplied status +// S2 user supplied status + WRE + TD (Overflows) +// S3 user supplied status + FZ + TD (Underflows) +// +{ .mfi + nop.m 0 + fsetc.s3 0x7F,0x41 + nop.i 0 +} +{ .mfi + nop.m 0 + fsetc.s2 0x7F,0x42 + nop.i 0 +} +;; + +// +// Do final operation with s2 and s3 +// +{ .mfi + setf.exp FR_NBig = GR_neg_ov_limit + fma.s3 FR_Result3 = FR_Two_N,FR_Norm_X,f0 + nop.i 0 +} +{ .mfi + setf.exp FR_Big = GR_pos_ov_limit + fma.s2 FR_Result2 = FR_Two_N,FR_Norm_X,f0 + nop.i 0 +} +;; + +// Check for overflow or underflow. +// Restore s3 +// Restore s2 +// +{ .mfi + nop.m 0 + fsetc.s3 0x7F,0x40 + nop.i 0 +} +{ .mfi + nop.m 0 + fsetc.s2 0x7F,0x40 + nop.i 0 +} +;; + +// +// Is the result zero? +// +{ .mfi + nop.m 0 + fclass.m p6, p0 = FR_Result3, 0x007 + nop.i 0 +} +{ .mfi + nop.m 0 + fcmp.ge.s1 p7, p8 = FR_Result2 , FR_Big + nop.i 0 +} +;; + +// +// Detect masked underflow - Tiny + Inexact Only +// +{ .mfi + nop.m 0 +(p6) fcmp.neq.unc.s1 p6, p0 = FR_Result , FR_Result2 + nop.i 0 +} +;; + +// +// Is result bigger the allowed range? +// Branch out for underflow +// +{ .mfb + nop.m 0 +(p8) fcmp.le.unc.s1 p9, p10 = FR_Result2 , FR_NBig +(p6) br.cond.spnt SCALBNL_UNDERFLOW +} +;; + +// +// Branch out for overflow +// +{ .bbb +(p7) br.cond.spnt SCALBNL_OVERFLOW +(p9) br.cond.spnt SCALBNL_OVERFLOW + br.ret.sptk b0 // Return from main path. +} +;; + +// Here if result overflows +SCALBNL_OVERFLOW: +{ .mib + alloc r32=ar.pfs,3,0,4,0 + addl GR_Tag = 174, r0 // Set error tag for overflow + br.cond.sptk __libm_error_region // Call error support for overflow +} +;; + +// Here if result underflows +SCALBNL_UNDERFLOW: +{ .mib + alloc r32=ar.pfs,3,0,4,0 + addl GR_Tag = 175, r0 // Set error tag for underflow + br.cond.sptk __libm_error_region // Call error support for underflow +} +;; + +// Here if x=unorm +SCALBNL_UNORM: +{ .mib + getf.exp GR_signexp_X = FR_Norm_X // Get signexp of normalized x + nop.i 0 + br.cond.sptk SCALBNL_COMMON // Return to main path +} +;; + + +GLOBAL_LIBM_END(__libm_scalbnl) +LOCAL_LIBM_ENTRY(__libm_error_region) + +// +// Get stack address of N +// +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs +} +// +// Adjust sp +// +{ .mfi +.fframe 64 + add sp=-64,sp + nop.f 0 + mov GR_SAVE_GP=gp +};; + +// +// Store N on stack in correct position +// Locate the address of x on stack +// +{ .mmi + st8 [GR_Parameter_Y] = GR_N_as_int,16 + add GR_Parameter_X = 16,sp +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 +};; + +// +// Store x on the stack. +// Get address for result on stack. +// +.body +{ .mib + stfe [GR_Parameter_X] = FR_Norm_X + add GR_Parameter_RESULT = 0,GR_Parameter_Y + nop.b 0 +} +{ .mib + stfe [GR_Parameter_Y] = FR_Result + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# +};; + +// +// Get location of result on stack +// +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; + +// +// Get the new result +// +{ .mmi + ldfe FR_Result = [GR_Parameter_RESULT] +.restore sp + add sp = 64,sp + mov b0 = GR_SAVE_B0 +};; + +// +// Restore gp, ar.pfs and return +// +{ .mib + mov gp = GR_SAVE_GP + mov ar.pfs = GR_SAVE_PFS + br.ret.sptk b0 +};; + +LOCAL_LIBM_END(__libm_error_region) + +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/s_log1p.S b/sysdeps/ia64/fpu/s_log1p.S new file mode 100644 index 0000000000..e1e6dcc80b --- /dev/null +++ b/sysdeps/ia64/fpu/s_log1p.S @@ -0,0 +1,1103 @@ +.file "log1p.s" + + +// Copyright (c) 2000 - 2005, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 04/04/00 Unwind support added +// 08/15/00 Bundle added after call to __libm_error_support to properly +// set [the previously overwritten] GR_Parameter_RESULT. +// 06/29/01 Improved speed of all paths +// 05/20/02 Cleaned up namespace and sf0 syntax +// 10/02/02 Improved performance by basing on log algorithm +// 02/10/03 Reordered header: .section, .global, .proc, .align +// 04/18/03 Eliminate possible WAW dependency warning +// 03/31/05 Reformatted delimiters between data tables +// +// API +//============================================================== +// double log1p(double) +// +// log1p(x) = log(x+1) +// +// Overview of operation +//============================================================== +// Background +// ---------- +// +// This algorithm is based on fact that +// log1p(x) = log(1+x) and +// log(a b) = log(a) + log(b). +// In our case we have 1+x = 2^N f, where 1 <= f < 2. +// So +// log(1+x) = log(2^N f) = log(2^N) + log(f) = n*log(2) + log(f) +// +// To calculate log(f) we do following +// log(f) = log(f * frcpa(f) / frcpa(f)) = +// = log(f * frcpa(f)) + log(1/frcpa(f)) +// +// According to definition of IA-64's frcpa instruction it's a +// floating point that approximates 1/f using a lookup on the +// top of 8 bits of the input number's + 1 significand with relative +// error < 2^(-8.886). So we have following +// +// |(1/f - frcpa(f)) / (1/f))| = |1 - f*frcpa(f)| < 1/256 +// +// and +// +// log(f) = log(f * frcpa(f)) + log(1/frcpa(f)) = +// = log(1 + r) + T +// +// The first value can be computed by polynomial P(r) approximating +// log(1 + r) on |r| < 1/256 and the second is precomputed tabular +// value defined by top 8 bit of f. +// +// Finally we have that log(1+x) ~ (N*log(2) + T) + P(r) +// +// Note that if input argument is close to 0.0 (in our case it means +// that |x| < 1/256) we can use just polynomial approximation +// because 1+x = 2^0 * f = f = 1 + r and +// log(1+x) = log(1 + r) ~ P(r) +// +// +// Implementation +// -------------- +// +// 1. |x| >= 2^(-8), and x > -1 +// InvX = frcpa(x+1) +// r = InvX*(x+1) - 1 +// P(r) = r*((r*A3 - A2) + r^4*((A4 + r*A5) + r^2*(A6 + r*A7)), +// all coefficients are calcutated in quad and rounded to double +// precision. A7,A6,A5,A4 are stored in memory whereas A3 and A2 +// created with setf. +// +// N = float(n) where n is true unbiased exponent of x +// +// T is tabular value of log(1/frcpa(x)) calculated in quad precision +// and represented by two floating-point numbers 64-bit Thi and 32-bit Tlo. +// To load Thi,Tlo we get bits from 55 to 62 of register format significand +// as index and calculate two addresses +// ad_Thi = Thi_table_base_addr + 8 * index +// ad_Tlo = Tlo_table_base_addr + 4 * index +// +// L1 (log(2)) is calculated in quad +// precision and represented by two floating-point 64-bit numbers L1hi,L1lo +// stored in memory. +// +// And final result = ((L1hi*N + Thi) + (N*L1lo + Tlo)) + P(r) +// +// +// 2. 2^(-80) <= |x| < 2^(-8) +// r = x +// P(r) = r*((r*A3 - A2) + r^4*((A4 + r*A5) + r^2*(A6 + r*A7)), +// A7,A6,A5,A4,A3,A2 are the same as in case |x| >= 1/256 +// +// And final results +// log(1+x) = P(r) +// +// 3. 0 < |x| < 2^(-80) +// Although log1p(x) is basically x, we would like to preserve the inexactness +// nature as well as consistent behavior under different rounding modes. +// We can do this by computing the result as +// +// log1p(x) = x - x*x +// +// +// Note: NaT, any NaNs, +/-INF, +/-0, negatives and unnormalized numbers are +// filtered and processed on special branches. +// + +// +// Special values +//============================================================== +// +// log1p(-1) = -inf // Call error support +// +// log1p(+qnan) = +qnan +// log1p(-qnan) = -qnan +// log1p(+snan) = +qnan +// log1p(-snan) = -qnan +// +// log1p(x),x<-1= QNAN Indefinite // Call error support +// log1p(-inf) = QNAN Indefinite +// log1p(+inf) = +inf +// log1p(+/-0) = +/-0 +// +// +// Registers used +//============================================================== +// Floating Point registers used: +// f8, input +// f7 -> f15, f32 -> f40 +// +// General registers used: +// r8 -> r11 +// r14 -> r20 +// +// Predicate registers used: +// p6 -> p12 + +// Assembly macros +//============================================================== +GR_TAG = r8 +GR_ad_1 = r8 +GR_ad_2 = r9 +GR_Exp = r10 +GR_N = r11 + +GR_signexp_x = r14 +GR_exp_mask = r15 +GR_exp_bias = r16 +GR_05 = r17 +GR_A3 = r18 +GR_Sig = r19 +GR_Ind = r19 +GR_exp_x = r20 + + +GR_SAVE_B0 = r33 +GR_SAVE_PFS = r34 +GR_SAVE_GP = r35 +GR_SAVE_SP = r36 + +GR_Parameter_X = r37 +GR_Parameter_Y = r38 +GR_Parameter_RESULT = r39 +GR_Parameter_TAG = r40 + + + +FR_NormX = f7 +FR_RcpX = f9 +FR_r = f10 +FR_r2 = f11 +FR_r4 = f12 +FR_N = f13 +FR_Ln2hi = f14 +FR_Ln2lo = f15 + +FR_A7 = f32 +FR_A6 = f33 +FR_A5 = f34 +FR_A4 = f35 +FR_A3 = f36 +FR_A2 = f37 + +FR_Thi = f38 +FR_NxLn2hipThi = f38 +FR_NxLn2pT = f38 +FR_Tlo = f39 +FR_NxLn2lopTlo = f39 + +FR_Xp1 = f40 + + +FR_Y = f1 +FR_X = f10 +FR_RESULT = f8 + + +// Data +//============================================================== +RODATA +.align 16 + +LOCAL_OBJECT_START(log_data) +// coefficients of polynomial approximation +data8 0x3FC2494104381A8E // A7 +data8 0xBFC5556D556BBB69 // A6 +data8 0x3FC999999988B5E9 // A5 +data8 0xBFCFFFFFFFF6FFF5 // A4 +// +// hi parts of ln(1/frcpa(1+i/256)), i=0...255 +data8 0x3F60040155D5889D // 0 +data8 0x3F78121214586B54 // 1 +data8 0x3F841929F96832EF // 2 +data8 0x3F8C317384C75F06 // 3 +data8 0x3F91A6B91AC73386 // 4 +data8 0x3F95BA9A5D9AC039 // 5 +data8 0x3F99D2A8074325F3 // 6 +data8 0x3F9D6B2725979802 // 7 +data8 0x3FA0C58FA19DFAA9 // 8 +data8 0x3FA2954C78CBCE1A // 9 +data8 0x3FA4A94D2DA96C56 // 10 +data8 0x3FA67C94F2D4BB58 // 11 +data8 0x3FA85188B630F068 // 12 +data8 0x3FAA6B8ABE73AF4C // 13 +data8 0x3FAC441E06F72A9E // 14 +data8 0x3FAE1E6713606D06 // 15 +data8 0x3FAFFA6911AB9300 // 16 +data8 0x3FB0EC139C5DA600 // 17 +data8 0x3FB1DBD2643D190B // 18 +data8 0x3FB2CC7284FE5F1C // 19 +data8 0x3FB3BDF5A7D1EE64 // 20 +data8 0x3FB4B05D7AA012E0 // 21 +data8 0x3FB580DB7CEB5701 // 22 +data8 0x3FB674F089365A79 // 23 +data8 0x3FB769EF2C6B568D // 24 +data8 0x3FB85FD927506A47 // 25 +data8 0x3FB9335E5D594988 // 26 +data8 0x3FBA2B0220C8E5F4 // 27 +data8 0x3FBB0004AC1A86AB // 28 +data8 0x3FBBF968769FCA10 // 29 +data8 0x3FBCCFEDBFEE13A8 // 30 +data8 0x3FBDA727638446A2 // 31 +data8 0x3FBEA3257FE10F79 // 32 +data8 0x3FBF7BE9FEDBFDE5 // 33 +data8 0x3FC02AB352FF25F3 // 34 +data8 0x3FC097CE579D204C // 35 +data8 0x3FC1178E8227E47B // 36 +data8 0x3FC185747DBECF33 // 37 +data8 0x3FC1F3B925F25D41 // 38 +data8 0x3FC2625D1E6DDF56 // 39 +data8 0x3FC2D1610C868139 // 40 +data8 0x3FC340C59741142E // 41 +data8 0x3FC3B08B6757F2A9 // 42 +data8 0x3FC40DFB08378003 // 43 +data8 0x3FC47E74E8CA5F7C // 44 +data8 0x3FC4EF51F6466DE4 // 45 +data8 0x3FC56092E02BA516 // 46 +data8 0x3FC5D23857CD74D4 // 47 +data8 0x3FC6313A37335D76 // 48 +data8 0x3FC6A399DABBD383 // 49 +data8 0x3FC70337DD3CE41A // 50 +data8 0x3FC77654128F6127 // 51 +data8 0x3FC7E9D82A0B022D // 52 +data8 0x3FC84A6B759F512E // 53 +data8 0x3FC8AB47D5F5A30F // 54 +data8 0x3FC91FE49096581B // 55 +data8 0x3FC981634011AA75 // 56 +data8 0x3FC9F6C407089664 // 57 +data8 0x3FCA58E729348F43 // 58 +data8 0x3FCABB55C31693AC // 59 +data8 0x3FCB1E104919EFD0 // 60 +data8 0x3FCB94EE93E367CA // 61 +data8 0x3FCBF851C067555E // 62 +data8 0x3FCC5C0254BF23A5 // 63 +data8 0x3FCCC000C9DB3C52 // 64 +data8 0x3FCD244D99C85673 // 65 +data8 0x3FCD88E93FB2F450 // 66 +data8 0x3FCDEDD437EAEF00 // 67 +data8 0x3FCE530EFFE71012 // 68 +data8 0x3FCEB89A1648B971 // 69 +data8 0x3FCF1E75FADF9BDE // 70 +data8 0x3FCF84A32EAD7C35 // 71 +data8 0x3FCFEB2233EA07CD // 72 +data8 0x3FD028F9C7035C1C // 73 +data8 0x3FD05C8BE0D9635A // 74 +data8 0x3FD085EB8F8AE797 // 75 +data8 0x3FD0B9C8E32D1911 // 76 +data8 0x3FD0EDD060B78080 // 77 +data8 0x3FD122024CF0063F // 78 +data8 0x3FD14BE2927AECD4 // 79 +data8 0x3FD180618EF18ADF // 80 +data8 0x3FD1B50BBE2FC63B // 81 +data8 0x3FD1DF4CC7CF242D // 82 +data8 0x3FD214456D0EB8D4 // 83 +data8 0x3FD23EC5991EBA49 // 84 +data8 0x3FD2740D9F870AFB // 85 +data8 0x3FD29ECDABCDFA03 // 86 +data8 0x3FD2D46602ADCCEE // 87 +data8 0x3FD2FF66B04EA9D4 // 88 +data8 0x3FD335504B355A37 // 89 +data8 0x3FD360925EC44F5C // 90 +data8 0x3FD38BF1C3337E74 // 91 +data8 0x3FD3C25277333183 // 92 +data8 0x3FD3EDF463C1683E // 93 +data8 0x3FD419B423D5E8C7 // 94 +data8 0x3FD44591E0539F48 // 95 +data8 0x3FD47C9175B6F0AD // 96 +data8 0x3FD4A8B341552B09 // 97 +data8 0x3FD4D4F39089019F // 98 +data8 0x3FD501528DA1F967 // 99 +data8 0x3FD52DD06347D4F6 // 100 +data8 0x3FD55A6D3C7B8A89 // 101 +data8 0x3FD5925D2B112A59 // 102 +data8 0x3FD5BF406B543DB1 // 103 +data8 0x3FD5EC433D5C35AD // 104 +data8 0x3FD61965CDB02C1E // 105 +data8 0x3FD646A84935B2A1 // 106 +data8 0x3FD6740ADD31DE94 // 107 +data8 0x3FD6A18DB74A58C5 // 108 +data8 0x3FD6CF31058670EC // 109 +data8 0x3FD6F180E852F0B9 // 110 +data8 0x3FD71F5D71B894EF // 111 +data8 0x3FD74D5AEFD66D5C // 112 +data8 0x3FD77B79922BD37D // 113 +data8 0x3FD7A9B9889F19E2 // 114 +data8 0x3FD7D81B037EB6A6 // 115 +data8 0x3FD8069E33827230 // 116 +data8 0x3FD82996D3EF8BCA // 117 +data8 0x3FD85855776DCBFA // 118 +data8 0x3FD8873658327CCE // 119 +data8 0x3FD8AA75973AB8CE // 120 +data8 0x3FD8D992DC8824E4 // 121 +data8 0x3FD908D2EA7D9511 // 122 +data8 0x3FD92C59E79C0E56 // 123 +data8 0x3FD95BD750EE3ED2 // 124 +data8 0x3FD98B7811A3EE5B // 125 +data8 0x3FD9AF47F33D406B // 126 +data8 0x3FD9DF270C1914A7 // 127 +data8 0x3FDA0325ED14FDA4 // 128 +data8 0x3FDA33440224FA78 // 129 +data8 0x3FDA57725E80C382 // 130 +data8 0x3FDA87D0165DD199 // 131 +data8 0x3FDAAC2E6C03F895 // 132 +data8 0x3FDADCCC6FDF6A81 // 133 +data8 0x3FDB015B3EB1E790 // 134 +data8 0x3FDB323A3A635948 // 135 +data8 0x3FDB56FA04462909 // 136 +data8 0x3FDB881AA659BC93 // 137 +data8 0x3FDBAD0BEF3DB164 // 138 +data8 0x3FDBD21297781C2F // 139 +data8 0x3FDC039236F08818 // 140 +data8 0x3FDC28CB1E4D32FC // 141 +data8 0x3FDC4E19B84723C1 // 142 +data8 0x3FDC7FF9C74554C9 // 143 +data8 0x3FDCA57B64E9DB05 // 144 +data8 0x3FDCCB130A5CEBAF // 145 +data8 0x3FDCF0C0D18F326F // 146 +data8 0x3FDD232075B5A201 // 147 +data8 0x3FDD490246DEFA6B // 148 +data8 0x3FDD6EFA918D25CD // 149 +data8 0x3FDD9509707AE52F // 150 +data8 0x3FDDBB2EFE92C554 // 151 +data8 0x3FDDEE2F3445E4AE // 152 +data8 0x3FDE148A1A2726CD // 153 +data8 0x3FDE3AFC0A49FF3F // 154 +data8 0x3FDE6185206D516D // 155 +data8 0x3FDE882578823D51 // 156 +data8 0x3FDEAEDD2EAC990C // 157 +data8 0x3FDED5AC5F436BE2 // 158 +data8 0x3FDEFC9326D16AB8 // 159 +data8 0x3FDF2391A21575FF // 160 +data8 0x3FDF4AA7EE03192C // 161 +data8 0x3FDF71D627C30BB0 // 162 +data8 0x3FDF991C6CB3B379 // 163 +data8 0x3FDFC07ADA69A90F // 164 +data8 0x3FDFE7F18EB03D3E // 165 +data8 0x3FE007C053C5002E // 166 +data8 0x3FE01B942198A5A0 // 167 +data8 0x3FE02F74400C64EA // 168 +data8 0x3FE04360BE7603AC // 169 +data8 0x3FE05759AC47FE33 // 170 +data8 0x3FE06B5F1911CF51 // 171 +data8 0x3FE078BF0533C568 // 172 +data8 0x3FE08CD9687E7B0E // 173 +data8 0x3FE0A10074CF9019 // 174 +data8 0x3FE0B5343A234476 // 175 +data8 0x3FE0C974C89431CD // 176 +data8 0x3FE0DDC2305B9886 // 177 +data8 0x3FE0EB524BAFC918 // 178 +data8 0x3FE0FFB54213A475 // 179 +data8 0x3FE114253DA97D9F // 180 +data8 0x3FE128A24F1D9AFF // 181 +data8 0x3FE1365252BF0864 // 182 +data8 0x3FE14AE558B4A92D // 183 +data8 0x3FE15F85A19C765B // 184 +data8 0x3FE16D4D38C119FA // 185 +data8 0x3FE18203C20DD133 // 186 +data8 0x3FE196C7BC4B1F3A // 187 +data8 0x3FE1A4A738B7A33C // 188 +data8 0x3FE1B981C0C9653C // 189 +data8 0x3FE1CE69E8BB106A // 190 +data8 0x3FE1DC619DE06944 // 191 +data8 0x3FE1F160A2AD0DA3 // 192 +data8 0x3FE2066D7740737E // 193 +data8 0x3FE2147DBA47A393 // 194 +data8 0x3FE229A1BC5EBAC3 // 195 +data8 0x3FE237C1841A502E // 196 +data8 0x3FE24CFCE6F80D9A // 197 +data8 0x3FE25B2C55CD5762 // 198 +data8 0x3FE2707F4D5F7C40 // 199 +data8 0x3FE285E0842CA383 // 200 +data8 0x3FE294294708B773 // 201 +data8 0x3FE2A9A2670AFF0C // 202 +data8 0x3FE2B7FB2C8D1CC0 // 203 +data8 0x3FE2C65A6395F5F5 // 204 +data8 0x3FE2DBF557B0DF42 // 205 +data8 0x3FE2EA64C3F97654 // 206 +data8 0x3FE3001823684D73 // 207 +data8 0x3FE30E97E9A8B5CC // 208 +data8 0x3FE32463EBDD34E9 // 209 +data8 0x3FE332F4314AD795 // 210 +data8 0x3FE348D90E7464CF // 211 +data8 0x3FE35779F8C43D6D // 212 +data8 0x3FE36621961A6A99 // 213 +data8 0x3FE37C299F3C366A // 214 +data8 0x3FE38AE2171976E7 // 215 +data8 0x3FE399A157A603E7 // 216 +data8 0x3FE3AFCCFE77B9D1 // 217 +data8 0x3FE3BE9D503533B5 // 218 +data8 0x3FE3CD7480B4A8A2 // 219 +data8 0x3FE3E3C43918F76C // 220 +data8 0x3FE3F2ACB27ED6C6 // 221 +data8 0x3FE4019C2125CA93 // 222 +data8 0x3FE4181061389722 // 223 +data8 0x3FE42711518DF545 // 224 +data8 0x3FE436194E12B6BF // 225 +data8 0x3FE445285D68EA69 // 226 +data8 0x3FE45BCC464C893A // 227 +data8 0x3FE46AED21F117FC // 228 +data8 0x3FE47A1527E8A2D3 // 229 +data8 0x3FE489445EFFFCCB // 230 +data8 0x3FE4A018BCB69835 // 231 +data8 0x3FE4AF5A0C9D65D7 // 232 +data8 0x3FE4BEA2A5BDBE87 // 233 +data8 0x3FE4CDF28F10AC46 // 234 +data8 0x3FE4DD49CF994058 // 235 +data8 0x3FE4ECA86E64A683 // 236 +data8 0x3FE503C43CD8EB68 // 237 +data8 0x3FE513356667FC57 // 238 +data8 0x3FE522AE0738A3D7 // 239 +data8 0x3FE5322E26867857 // 240 +data8 0x3FE541B5CB979809 // 241 +data8 0x3FE55144FDBCBD62 // 242 +data8 0x3FE560DBC45153C6 // 243 +data8 0x3FE5707A26BB8C66 // 244 +data8 0x3FE587F60ED5B8FF // 245 +data8 0x3FE597A7977C8F31 // 246 +data8 0x3FE5A760D634BB8A // 247 +data8 0x3FE5B721D295F10E // 248 +data8 0x3FE5C6EA94431EF9 // 249 +data8 0x3FE5D6BB22EA86F5 // 250 +data8 0x3FE5E6938645D38F // 251 +data8 0x3FE5F673C61A2ED1 // 252 +data8 0x3FE6065BEA385926 // 253 +data8 0x3FE6164BFA7CC06B // 254 +data8 0x3FE62643FECF9742 // 255 +// +// two parts of ln(2) +data8 0x3FE62E42FEF00000,0x3DD473DE6AF278ED +// +// lo parts of ln(1/frcpa(1+i/256)), i=0...255 +data4 0x20E70672 // 0 +data4 0x1F60A5D0 // 1 +data4 0x218EABA0 // 2 +data4 0x21403104 // 3 +data4 0x20E9B54E // 4 +data4 0x21EE1382 // 5 +data4 0x226014E3 // 6 +data4 0x2095E5C9 // 7 +data4 0x228BA9D4 // 8 +data4 0x22932B86 // 9 +data4 0x22608A57 // 10 +data4 0x220209F3 // 11 +data4 0x212882CC // 12 +data4 0x220D46E2 // 13 +data4 0x21FA4C28 // 14 +data4 0x229E5BD9 // 15 +data4 0x228C9838 // 16 +data4 0x2311F954 // 17 +data4 0x221365DF // 18 +data4 0x22BD0CB3 // 19 +data4 0x223D4BB7 // 20 +data4 0x22A71BBE // 21 +data4 0x237DB2FA // 22 +data4 0x23194C9D // 23 +data4 0x22EC639E // 24 +data4 0x2367E669 // 25 +data4 0x232E1D5F // 26 +data4 0x234A639B // 27 +data4 0x2365C0E0 // 28 +data4 0x234646C1 // 29 +data4 0x220CBF9C // 30 +data4 0x22A00FD4 // 31 +data4 0x2306A3F2 // 32 +data4 0x23745A9B // 33 +data4 0x2398D756 // 34 +data4 0x23DD0B6A // 35 +data4 0x23DE338B // 36 +data4 0x23A222DF // 37 +data4 0x223164F8 // 38 +data4 0x23B4E87B // 39 +data4 0x23D6CCB8 // 40 +data4 0x220C2099 // 41 +data4 0x21B86B67 // 42 +data4 0x236D14F1 // 43 +data4 0x225A923F // 44 +data4 0x22748723 // 45 +data4 0x22200D13 // 46 +data4 0x23C296EA // 47 +data4 0x2302AC38 // 48 +data4 0x234B1996 // 49 +data4 0x2385E298 // 50 +data4 0x23175BE5 // 51 +data4 0x2193F482 // 52 +data4 0x23BFEA90 // 53 +data4 0x23D70A0C // 54 +data4 0x231CF30A // 55 +data4 0x235D9E90 // 56 +data4 0x221AD0CB // 57 +data4 0x22FAA08B // 58 +data4 0x23D29A87 // 59 +data4 0x20C4B2FE // 60 +data4 0x2381B8B7 // 61 +data4 0x23F8D9FC // 62 +data4 0x23EAAE7B // 63 +data4 0x2329E8AA // 64 +data4 0x23EC0322 // 65 +data4 0x2357FDCB // 66 +data4 0x2392A9AD // 67 +data4 0x22113B02 // 68 +data4 0x22DEE901 // 69 +data4 0x236A6D14 // 70 +data4 0x2371D33E // 71 +data4 0x2146F005 // 72 +data4 0x23230B06 // 73 +data4 0x22F1C77D // 74 +data4 0x23A89FA3 // 75 +data4 0x231D1241 // 76 +data4 0x244DA96C // 77 +data4 0x23ECBB7D // 78 +data4 0x223E42B4 // 79 +data4 0x23801BC9 // 80 +data4 0x23573263 // 81 +data4 0x227C1158 // 82 +data4 0x237BD749 // 83 +data4 0x21DDBAE9 // 84 +data4 0x23401735 // 85 +data4 0x241D9DEE // 86 +data4 0x23BC88CB // 87 +data4 0x2396D5F1 // 88 +data4 0x23FC89CF // 89 +data4 0x2414F9A2 // 90 +data4 0x2474A0F5 // 91 +data4 0x24354B60 // 92 +data4 0x23C1EB40 // 93 +data4 0x2306DD92 // 94 +data4 0x24353B6B // 95 +data4 0x23CD1701 // 96 +data4 0x237C7A1C // 97 +data4 0x245793AA // 98 +data4 0x24563695 // 99 +data4 0x23C51467 // 100 +data4 0x24476B68 // 101 +data4 0x212585A9 // 102 +data4 0x247B8293 // 103 +data4 0x2446848A // 104 +data4 0x246A53F8 // 105 +data4 0x246E496D // 106 +data4 0x23ED1D36 // 107 +data4 0x2314C258 // 108 +data4 0x233244A7 // 109 +data4 0x245B7AF0 // 110 +data4 0x24247130 // 111 +data4 0x22D67B38 // 112 +data4 0x2449F620 // 113 +data4 0x23BBC8B8 // 114 +data4 0x237D3BA0 // 115 +data4 0x245E8F13 // 116 +data4 0x2435573F // 117 +data4 0x242DE666 // 118 +data4 0x2463BC10 // 119 +data4 0x2466587D // 120 +data4 0x2408144B // 121 +data4 0x2405F0E5 // 122 +data4 0x22381CFF // 123 +data4 0x24154F9B // 124 +data4 0x23A4E96E // 125 +data4 0x24052967 // 126 +data4 0x2406963F // 127 +data4 0x23F7D3CB // 128 +data4 0x2448AFF4 // 129 +data4 0x24657A21 // 130 +data4 0x22FBC230 // 131 +data4 0x243C8DEA // 132 +data4 0x225DC4B7 // 133 +data4 0x23496EBF // 134 +data4 0x237C2B2B // 135 +data4 0x23A4A5B1 // 136 +data4 0x2394E9D1 // 137 +data4 0x244BC950 // 138 +data4 0x23C7448F // 139 +data4 0x2404A1AD // 140 +data4 0x246511D5 // 141 +data4 0x24246526 // 142 +data4 0x23111F57 // 143 +data4 0x22868951 // 144 +data4 0x243EB77F // 145 +data4 0x239F3DFF // 146 +data4 0x23089666 // 147 +data4 0x23EBFA6A // 148 +data4 0x23C51312 // 149 +data4 0x23E1DD5E // 150 +data4 0x232C0944 // 151 +data4 0x246A741F // 152 +data4 0x2414DF8D // 153 +data4 0x247B5546 // 154 +data4 0x2415C980 // 155 +data4 0x24324ABD // 156 +data4 0x234EB5E5 // 157 +data4 0x2465E43E // 158 +data4 0x242840D1 // 159 +data4 0x24444057 // 160 +data4 0x245E56F0 // 161 +data4 0x21AE30F8 // 162 +data4 0x23FB3283 // 163 +data4 0x247A4D07 // 164 +data4 0x22AE314D // 165 +data4 0x246B7727 // 166 +data4 0x24EAD526 // 167 +data4 0x24B41DC9 // 168 +data4 0x24EE8062 // 169 +data4 0x24A0C7C4 // 170 +data4 0x24E8DA67 // 171 +data4 0x231120F7 // 172 +data4 0x24401FFB // 173 +data4 0x2412DD09 // 174 +data4 0x248C131A // 175 +data4 0x24C0A7CE // 176 +data4 0x243DD4C8 // 177 +data4 0x24457FEB // 178 +data4 0x24DEEFBB // 179 +data4 0x243C70AE // 180 +data4 0x23E7A6FA // 181 +data4 0x24C2D311 // 182 +data4 0x23026255 // 183 +data4 0x2437C9B9 // 184 +data4 0x246BA847 // 185 +data4 0x2420B448 // 186 +data4 0x24C4CF5A // 187 +data4 0x242C4981 // 188 +data4 0x24DE1525 // 189 +data4 0x24F5CC33 // 190 +data4 0x235A85DA // 191 +data4 0x24A0B64F // 192 +data4 0x244BA0A4 // 193 +data4 0x24AAF30A // 194 +data4 0x244C86F9 // 195 +data4 0x246D5B82 // 196 +data4 0x24529347 // 197 +data4 0x240DD008 // 198 +data4 0x24E98790 // 199 +data4 0x2489B0CE // 200 +data4 0x22BC29AC // 201 +data4 0x23F37C7A // 202 +data4 0x24987FE8 // 203 +data4 0x22AFE20B // 204 +data4 0x24C8D7C2 // 205 +data4 0x24B28B7D // 206 +data4 0x23B6B271 // 207 +data4 0x24C77CB6 // 208 +data4 0x24EF1DCA // 209 +data4 0x24A4F0AC // 210 +data4 0x24CF113E // 211 +data4 0x2496BBAB // 212 +data4 0x23C7CC8A // 213 +data4 0x23AE3961 // 214 +data4 0x2410A895 // 215 +data4 0x23CE3114 // 216 +data4 0x2308247D // 217 +data4 0x240045E9 // 218 +data4 0x24974F60 // 219 +data4 0x242CB39F // 220 +data4 0x24AB8D69 // 221 +data4 0x23436788 // 222 +data4 0x24305E9E // 223 +data4 0x243E71A9 // 224 +data4 0x23C2A6B3 // 225 +data4 0x23FFE6CF // 226 +data4 0x2322D801 // 227 +data4 0x24515F21 // 228 +data4 0x2412A0D6 // 229 +data4 0x24E60D44 // 230 +data4 0x240D9251 // 231 +data4 0x247076E2 // 232 +data4 0x229B101B // 233 +data4 0x247B12DE // 234 +data4 0x244B9127 // 235 +data4 0x2499EC42 // 236 +data4 0x21FC3963 // 237 +data4 0x23E53266 // 238 +data4 0x24CE102D // 239 +data4 0x23CC45D2 // 240 +data4 0x2333171D // 241 +data4 0x246B3533 // 242 +data4 0x24931129 // 243 +data4 0x24405FFA // 244 +data4 0x24CF464D // 245 +data4 0x237095CD // 246 +data4 0x24F86CBD // 247 +data4 0x24E2D84B // 248 +data4 0x21ACBB44 // 249 +data4 0x24F43A8C // 250 +data4 0x249DB931 // 251 +data4 0x24A385EF // 252 +data4 0x238B1279 // 253 +data4 0x2436213E // 254 +data4 0x24F18A3B // 255 +LOCAL_OBJECT_END(log_data) + + +// Code +//============================================================== + +.section .text +GLOBAL_IEEE754_ENTRY(log1p) +{ .mfi + getf.exp GR_signexp_x = f8 // if x is unorm then must recompute + fadd.s1 FR_Xp1 = f8, f1 // Form 1+x + mov GR_05 = 0xfffe +} +{ .mlx + addl GR_ad_1 = @ltoff(log_data),gp + movl GR_A3 = 0x3fd5555555555557 // double precision memory + // representation of A3 +} +;; + +{ .mfi + ld8 GR_ad_1 = [GR_ad_1] + fclass.m p8,p0 = f8,0xb // Is x unorm? + mov GR_exp_mask = 0x1ffff +} +{ .mfi + nop.m 0 + fnorm.s1 FR_NormX = f8 // Normalize x + mov GR_exp_bias = 0xffff +} +;; + +{ .mfi + setf.exp FR_A2 = GR_05 // create A2 = 0.5 + fclass.m p9,p0 = f8,0x1E1 // is x NaN, NaT or +Inf? + nop.i 0 +} +{ .mib + setf.d FR_A3 = GR_A3 // create A3 + add GR_ad_2 = 16,GR_ad_1 // address of A5,A4 +(p8) br.cond.spnt log1p_unorm // Branch if x=unorm +} +;; + +log1p_common: +{ .mfi + nop.m 0 + frcpa.s1 FR_RcpX,p0 = f1,FR_Xp1 + nop.i 0 +} +{ .mfb + nop.m 0 +(p9) fma.d.s0 f8 = f8,f1,f0 // set V-flag +(p9) br.ret.spnt b0 // exit for NaN, NaT and +Inf +} +;; + +{ .mfi + getf.exp GR_Exp = FR_Xp1 // signexp of x+1 + fclass.m p10,p0 = FR_Xp1,0x3A // is 1+x < 0? + and GR_exp_x = GR_exp_mask, GR_signexp_x // biased exponent of x +} +{ .mfi + ldfpd FR_A7,FR_A6 = [GR_ad_1] + nop.f 0 + nop.i 0 +} +;; + +{ .mfi + getf.sig GR_Sig = FR_Xp1 // get significand to calculate index + // for Thi,Tlo if |x| >= 2^-8 + fcmp.eq.s1 p12,p0 = f8,f0 // is x equal to 0? + sub GR_exp_x = GR_exp_x, GR_exp_bias // true exponent of x +} +;; + +{ .mfi + sub GR_N = GR_Exp,GR_exp_bias // true exponent of x+1 + fcmp.eq.s1 p11,p0 = FR_Xp1,f0 // is x = -1? + cmp.gt p6,p7 = -8, GR_exp_x // Is |x| < 2^-8 +} +{ .mfb + ldfpd FR_A5,FR_A4 = [GR_ad_2],16 + nop.f 0 +(p10) br.cond.spnt log1p_lt_minus_1 // jump if x < -1 +} +;; + +// p6 is true if |x| < 1/256 +// p7 is true if |x| >= 1/256 +.pred.rel "mutex",p6,p7 +{ .mfi +(p7) add GR_ad_1 = 0x820,GR_ad_1 // address of log(2) parts +(p6) fms.s1 FR_r = f8,f1,f0 // range reduction for |x|<1/256 +(p6) cmp.gt.unc p10,p0 = -80, GR_exp_x // Is |x| < 2^-80 +} +{ .mfb +(p7) setf.sig FR_N = GR_N // copy unbiased exponent of x to the + // significand field of FR_N +(p7) fms.s1 FR_r = FR_RcpX,FR_Xp1,f1 // range reduction for |x|>=1/256 +(p12) br.ret.spnt b0 // exit for x=0, return x +} +;; + +{ .mib +(p7) ldfpd FR_Ln2hi,FR_Ln2lo = [GR_ad_1],16 +(p7) extr.u GR_Ind = GR_Sig,55,8 // get bits from 55 to 62 as index +(p11) br.cond.spnt log1p_eq_minus_1 // jump if x = -1 +} +;; + +{ .mmf +(p7) shladd GR_ad_2 = GR_Ind,3,GR_ad_2 // address of Thi +(p7) shladd GR_ad_1 = GR_Ind,2,GR_ad_1 // address of Tlo +(p10) fnma.d.s0 f8 = f8,f8,f8 // If |x| very small, result=x-x*x +} +;; + +{ .mmb +(p7) ldfd FR_Thi = [GR_ad_2] +(p7) ldfs FR_Tlo = [GR_ad_1] +(p10) br.ret.spnt b0 // Exit if |x| < 2^(-80) +} +;; + +{ .mfi + nop.m 0 + fma.s1 FR_r2 = FR_r,FR_r,f0 // r^2 + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 FR_A2 = FR_A3,FR_r,FR_A2 // A3*r+A2 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 FR_A6 = FR_A7,FR_r,FR_A6 // A7*r+A6 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_A4 = FR_A5,FR_r,FR_A4 // A5*r+A4 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p7) fcvt.xf FR_N = FR_N + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 FR_r4 = FR_r2,FR_r2,f0 // r^4 + nop.i 0 +} +{ .mfi + nop.m 0 + // (A3*r+A2)*r^2+r + fma.s1 FR_A2 = FR_A2,FR_r2,FR_r + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + // (A7*r+A6)*r^2+(A5*r+A4) + fma.s1 FR_A4 = FR_A6,FR_r2,FR_A4 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + // N*Ln2hi+Thi +(p7) fma.s1 FR_NxLn2hipThi = FR_N,FR_Ln2hi,FR_Thi + nop.i 0 +} +{ .mfi + nop.m 0 + // N*Ln2lo+Tlo +(p7) fma.s1 FR_NxLn2lopTlo = FR_N,FR_Ln2lo,FR_Tlo + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p7) fma.s1 f8 = FR_A4,FR_r4,FR_A2 // P(r) if |x| >= 1/256 + nop.i 0 +} +{ .mfi + nop.m 0 + // (N*Ln2hi+Thi) + (N*Ln2lo+Tlo) +(p7) fma.s1 FR_NxLn2pT = FR_NxLn2hipThi,f1,FR_NxLn2lopTlo + nop.i 0 +} +;; + +.pred.rel "mutex",p6,p7 +{ .mfi + nop.m 0 +(p6) fma.d.s0 f8 = FR_A4,FR_r4,FR_A2 // result if 2^(-80) <= |x| < 1/256 + nop.i 0 +} +{ .mfb + nop.m 0 +(p7) fma.d.s0 f8 = f8,f1,FR_NxLn2pT // result if |x| >= 1/256 + br.ret.sptk b0 // Exit if |x| >= 2^(-80) +} +;; + +.align 32 +log1p_unorm: +// Here if x=unorm +{ .mfb + getf.exp GR_signexp_x = FR_NormX // recompute biased exponent + nop.f 0 + br.cond.sptk log1p_common +} +;; + +.align 32 +log1p_eq_minus_1: +// Here if x=-1 +{ .mfi + nop.m 0 + fmerge.s FR_X = f8,f8 // keep input argument for subsequent + // call of __libm_error_support# + nop.i 0 +} +;; + +{ .mfi + mov GR_TAG = 140 // set libm error in case of log1p(-1). + frcpa.s0 f8,p0 = f8,f0 // log1p(-1) should be equal to -INF. + // We can get it using frcpa because it + // sets result to the IEEE-754 mandated + // quotient of f8/f0. + nop.i 0 +} +{ .mib + nop.m 0 + nop.i 0 + br.cond.sptk log_libm_err +} +;; + +.align 32 +log1p_lt_minus_1: +// Here if x < -1 +{ .mfi + nop.m 0 + fmerge.s FR_X = f8,f8 + nop.i 0 +} +;; + +{ .mfi + mov GR_TAG = 141 // set libm error in case of x < -1. + frcpa.s0 f8,p0 = f0,f0 // log1p(x) x < -1 should be equal to NaN. + // We can get it using frcpa because it + // sets result to the IEEE-754 mandated + // quotient of f0/f0 i.e. NaN. + nop.i 0 +} +;; + +.align 32 +log_libm_err: +{ .mmi + alloc r32 = ar.pfs,1,4,4,0 + mov GR_Parameter_TAG = GR_TAG + nop.i 0 +} +;; + +GLOBAL_IEEE754_END(log1p) + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y = -32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS = ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp = -64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP = gp // Save gp +};; +{ .mmi + stfd [GR_Parameter_Y] = FR_Y,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0 = b0 // Save b0 +};; +.body +{ .mib + stfd [GR_Parameter_X] = FR_X // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfd [GR_Parameter_Y] = FR_RESULT // STORE Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; +{ .mmi + ldfd f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; +LOCAL_LIBM_END(__libm_error_region) + +.type __libm_error_support#,@function +.global __libm_error_support# + diff --git a/sysdeps/ia64/fpu/s_log1pf.S b/sysdeps/ia64/fpu/s_log1pf.S new file mode 100644 index 0000000000..77e79c39df --- /dev/null +++ b/sysdeps/ia64/fpu/s_log1pf.S @@ -0,0 +1,789 @@ +.file "log1pf.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 04/04/00 Unwind support added +// 08/15/00 Bundle added after call to __libm_error_support to properly +// set [the previously overwritten] GR_Parameter_RESULT. +// 06/29/01 Improved speed of all paths +// 05/20/02 Cleaned up namespace and sf0 syntax +// 10/02/02 Improved performance by basing on log algorithm +// 02/10/03 Reordered header: .section, .global, .proc, .align +// 04/18/03 Eliminate possible WAW dependency warning +// 12/16/03 Fixed parameter passing to/from error handling routine +// +// API +//============================================================== +// float log1pf(float) +// +// log1p(x) = log(x+1) +// +// Overview of operation +//============================================================== +// Background +// ---------- +// +// This algorithm is based on fact that +// log1p(x) = log(1+x) and +// log(a b) = log(a) + log(b). +// In our case we have 1+x = 2^N f, where 1 <= f < 2. +// So +// log(1+x) = log(2^N f) = log(2^N) + log(f) = n*log(2) + log(f) +// +// To calculate log(f) we do following +// log(f) = log(f * frcpa(f) / frcpa(f)) = +// = log(f * frcpa(f)) + log(1/frcpa(f)) +// +// According to definition of IA-64's frcpa instruction it's a +// floating point that approximates 1/f using a lookup on the +// top of 8 bits of the input number's + 1 significand with relative +// error < 2^(-8.886). So we have following +// +// |(1/f - frcpa(f)) / (1/f))| = |1 - f*frcpa(f)| < 1/256 +// +// and +// +// log(f) = log(f * frcpa(f)) + log(1/frcpa(f)) = +// = log(1 + r) + T +// +// The first value can be computed by polynomial P(r) approximating +// log(1 + r) on |r| < 1/256 and the second is precomputed tabular +// value defined by top 8 bit of f. +// +// Finally we have that log(1+x) ~ (N*log(2) + T) + P(r) +// +// Note that if input argument is close to 0.0 (in our case it means +// that |x| < 1/256) we can use just polynomial approximation +// because 1+x = 2^0 * f = f = 1 + r and +// log(1+x) = log(1 + r) ~ P(r) +// +// +// Implementation +// -------------- +// +// 1. |x| >= 2^(-8), and x > -1 +// InvX = frcpa(x+1) +// r = InvX*(x+1) - 1 +// P(r) = r*((1 - A2*4) + r^2*(A3 - A4*r)) = r*P2(r), +// A4,A3,A2 are created with setf instruction. +// We use Taylor series and so A4 = 1/4, A3 = 1/3, +// A2 = 1/2 rounded to double. +// +// N = float(n) where n is true unbiased exponent of x +// +// T is tabular value of log(1/frcpa(x)) calculated in quad precision +// and rounded to double. To load T we get bits from 55 to 62 of register +// format significand as index and calculate address +// ad_T = table_base_addr + 8 * index +// +// L1 (log(2)) is calculated in quad precision and rounded to double; +// it's created with setf +// +// And final result = P2(r)*r + (T + N*L1) +// +// +// 2. 2^(-40) <= |x| < 2^(-8) +// r = x +// P(r) = r*((1 - A2*4) + r^2*(A3 - A4*r)) = r*P2(r), +// A4,A3,A2 are the same as in case |x| >= 1/256 +// +// And final result = P2(r)*r +// +// 3. 0 < |x| < 2^(-40) +// Although log1p(x) is basically x, we would like to preserve the inexactness +// nature as well as consistent behavior under different rounding modes. +// We can do this by computing the result as +// +// log1p(x) = x - x*x +// +// +// Note: NaT, any NaNs, +/-INF, +/-0, negatives and unnormalized numbers are +// filtered and processed on special branches. +// + +// +// Special values +//============================================================== +// +// log1p(-1) = -inf // Call error support +// +// log1p(+qnan) = +qnan +// log1p(-qnan) = -qnan +// log1p(+snan) = +qnan +// log1p(-snan) = -qnan +// +// log1p(x),x<-1= QNAN Indefinite // Call error support +// log1p(-inf) = QNAN Indefinite +// log1p(+inf) = +inf +// log1p(+/-0) = +/-0 +// +// +// Registers used +//============================================================== +// Floating Point registers used: +// f8, input +// f7 -> f15, f32 -> f36 +// +// General registers used: +// r8 -> r11 +// r14 -> r22 +// +// Predicate registers used: +// p6 -> p12 + +// Assembly macros +//============================================================== +GR_TAG = r8 +GR_ad_T = r9 +GR_Exp = r10 +GR_N = r11 + +GR_signexp_x = r14 +GR_exp_mask = r15 +GR_exp_bias = r16 +GR_05 = r17 +GR_A3 = r18 +GR_Sig = r19 +GR_Ind = r19 +GR_exp_x = r20 +GR_Ln2 = r21 +GR_025 = r22 + + +GR_SAVE_B0 = r33 +GR_SAVE_PFS = r34 +GR_SAVE_GP = r35 +GR_SAVE_SP = r36 + +GR_Parameter_X = r37 +GR_Parameter_Y = r38 +GR_Parameter_RESULT = r39 +GR_Parameter_TAG = r40 + + + +FR_NormX = f7 +FR_RcpX = f9 +FR_r = f10 +FR_r2 = f11 +FR_r4 = f12 +FR_N = f13 +FR_Ln2 = f14 +FR_Xp1 = f15 + +FR_A4 = f33 +FR_A3 = f34 +FR_A2 = f35 + +FR_T = f36 +FR_NxLn2pT = f36 + + + +FR_Y = f1 +FR_X = f10 +FR_RESULT = f8 + + +// Data +//============================================================== +RODATA +.align 16 + +LOCAL_OBJECT_START(log_data) +// ln(1/frcpa(1+i/256)), i=0...255 +data8 0x3F60040155D5889E // 0 +data8 0x3F78121214586B54 // 1 +data8 0x3F841929F96832F0 // 2 +data8 0x3F8C317384C75F06 // 3 +data8 0x3F91A6B91AC73386 // 4 +data8 0x3F95BA9A5D9AC039 // 5 +data8 0x3F99D2A8074325F4 // 6 +data8 0x3F9D6B2725979802 // 7 +data8 0x3FA0C58FA19DFAAA // 8 +data8 0x3FA2954C78CBCE1B // 9 +data8 0x3FA4A94D2DA96C56 // 10 +data8 0x3FA67C94F2D4BB58 // 11 +data8 0x3FA85188B630F068 // 12 +data8 0x3FAA6B8ABE73AF4C // 13 +data8 0x3FAC441E06F72A9E // 14 +data8 0x3FAE1E6713606D07 // 15 +data8 0x3FAFFA6911AB9301 // 16 +data8 0x3FB0EC139C5DA601 // 17 +data8 0x3FB1DBD2643D190B // 18 +data8 0x3FB2CC7284FE5F1C // 19 +data8 0x3FB3BDF5A7D1EE64 // 20 +data8 0x3FB4B05D7AA012E0 // 21 +data8 0x3FB580DB7CEB5702 // 22 +data8 0x3FB674F089365A7A // 23 +data8 0x3FB769EF2C6B568D // 24 +data8 0x3FB85FD927506A48 // 25 +data8 0x3FB9335E5D594989 // 26 +data8 0x3FBA2B0220C8E5F5 // 27 +data8 0x3FBB0004AC1A86AC // 28 +data8 0x3FBBF968769FCA11 // 29 +data8 0x3FBCCFEDBFEE13A8 // 30 +data8 0x3FBDA727638446A2 // 31 +data8 0x3FBEA3257FE10F7A // 32 +data8 0x3FBF7BE9FEDBFDE6 // 33 +data8 0x3FC02AB352FF25F4 // 34 +data8 0x3FC097CE579D204D // 35 +data8 0x3FC1178E8227E47C // 36 +data8 0x3FC185747DBECF34 // 37 +data8 0x3FC1F3B925F25D41 // 38 +data8 0x3FC2625D1E6DDF57 // 39 +data8 0x3FC2D1610C86813A // 40 +data8 0x3FC340C59741142E // 41 +data8 0x3FC3B08B6757F2A9 // 42 +data8 0x3FC40DFB08378003 // 43 +data8 0x3FC47E74E8CA5F7C // 44 +data8 0x3FC4EF51F6466DE4 // 45 +data8 0x3FC56092E02BA516 // 46 +data8 0x3FC5D23857CD74D5 // 47 +data8 0x3FC6313A37335D76 // 48 +data8 0x3FC6A399DABBD383 // 49 +data8 0x3FC70337DD3CE41B // 50 +data8 0x3FC77654128F6127 // 51 +data8 0x3FC7E9D82A0B022D // 52 +data8 0x3FC84A6B759F512F // 53 +data8 0x3FC8AB47D5F5A310 // 54 +data8 0x3FC91FE49096581B // 55 +data8 0x3FC981634011AA75 // 56 +data8 0x3FC9F6C407089664 // 57 +data8 0x3FCA58E729348F43 // 58 +data8 0x3FCABB55C31693AD // 59 +data8 0x3FCB1E104919EFD0 // 60 +data8 0x3FCB94EE93E367CB // 61 +data8 0x3FCBF851C067555F // 62 +data8 0x3FCC5C0254BF23A6 // 63 +data8 0x3FCCC000C9DB3C52 // 64 +data8 0x3FCD244D99C85674 // 65 +data8 0x3FCD88E93FB2F450 // 66 +data8 0x3FCDEDD437EAEF01 // 67 +data8 0x3FCE530EFFE71012 // 68 +data8 0x3FCEB89A1648B971 // 69 +data8 0x3FCF1E75FADF9BDE // 70 +data8 0x3FCF84A32EAD7C35 // 71 +data8 0x3FCFEB2233EA07CD // 72 +data8 0x3FD028F9C7035C1C // 73 +data8 0x3FD05C8BE0D9635A // 74 +data8 0x3FD085EB8F8AE797 // 75 +data8 0x3FD0B9C8E32D1911 // 76 +data8 0x3FD0EDD060B78081 // 77 +data8 0x3FD122024CF0063F // 78 +data8 0x3FD14BE2927AECD4 // 79 +data8 0x3FD180618EF18ADF // 80 +data8 0x3FD1B50BBE2FC63B // 81 +data8 0x3FD1DF4CC7CF242D // 82 +data8 0x3FD214456D0EB8D4 // 83 +data8 0x3FD23EC5991EBA49 // 84 +data8 0x3FD2740D9F870AFB // 85 +data8 0x3FD29ECDABCDFA04 // 86 +data8 0x3FD2D46602ADCCEE // 87 +data8 0x3FD2FF66B04EA9D4 // 88 +data8 0x3FD335504B355A37 // 89 +data8 0x3FD360925EC44F5D // 90 +data8 0x3FD38BF1C3337E75 // 91 +data8 0x3FD3C25277333184 // 92 +data8 0x3FD3EDF463C1683E // 93 +data8 0x3FD419B423D5E8C7 // 94 +data8 0x3FD44591E0539F49 // 95 +data8 0x3FD47C9175B6F0AD // 96 +data8 0x3FD4A8B341552B09 // 97 +data8 0x3FD4D4F3908901A0 // 98 +data8 0x3FD501528DA1F968 // 99 +data8 0x3FD52DD06347D4F6 // 100 +data8 0x3FD55A6D3C7B8A8A // 101 +data8 0x3FD5925D2B112A59 // 102 +data8 0x3FD5BF406B543DB2 // 103 +data8 0x3FD5EC433D5C35AE // 104 +data8 0x3FD61965CDB02C1F // 105 +data8 0x3FD646A84935B2A2 // 106 +data8 0x3FD6740ADD31DE94 // 107 +data8 0x3FD6A18DB74A58C5 // 108 +data8 0x3FD6CF31058670EC // 109 +data8 0x3FD6F180E852F0BA // 110 +data8 0x3FD71F5D71B894F0 // 111 +data8 0x3FD74D5AEFD66D5C // 112 +data8 0x3FD77B79922BD37E // 113 +data8 0x3FD7A9B9889F19E2 // 114 +data8 0x3FD7D81B037EB6A6 // 115 +data8 0x3FD8069E33827231 // 116 +data8 0x3FD82996D3EF8BCB // 117 +data8 0x3FD85855776DCBFB // 118 +data8 0x3FD8873658327CCF // 119 +data8 0x3FD8AA75973AB8CF // 120 +data8 0x3FD8D992DC8824E5 // 121 +data8 0x3FD908D2EA7D9512 // 122 +data8 0x3FD92C59E79C0E56 // 123 +data8 0x3FD95BD750EE3ED3 // 124 +data8 0x3FD98B7811A3EE5B // 125 +data8 0x3FD9AF47F33D406C // 126 +data8 0x3FD9DF270C1914A8 // 127 +data8 0x3FDA0325ED14FDA4 // 128 +data8 0x3FDA33440224FA79 // 129 +data8 0x3FDA57725E80C383 // 130 +data8 0x3FDA87D0165DD199 // 131 +data8 0x3FDAAC2E6C03F896 // 132 +data8 0x3FDADCCC6FDF6A81 // 133 +data8 0x3FDB015B3EB1E790 // 134 +data8 0x3FDB323A3A635948 // 135 +data8 0x3FDB56FA04462909 // 136 +data8 0x3FDB881AA659BC93 // 137 +data8 0x3FDBAD0BEF3DB165 // 138 +data8 0x3FDBD21297781C2F // 139 +data8 0x3FDC039236F08819 // 140 +data8 0x3FDC28CB1E4D32FD // 141 +data8 0x3FDC4E19B84723C2 // 142 +data8 0x3FDC7FF9C74554C9 // 143 +data8 0x3FDCA57B64E9DB05 // 144 +data8 0x3FDCCB130A5CEBB0 // 145 +data8 0x3FDCF0C0D18F326F // 146 +data8 0x3FDD232075B5A201 // 147 +data8 0x3FDD490246DEFA6B // 148 +data8 0x3FDD6EFA918D25CD // 149 +data8 0x3FDD9509707AE52F // 150 +data8 0x3FDDBB2EFE92C554 // 151 +data8 0x3FDDEE2F3445E4AF // 152 +data8 0x3FDE148A1A2726CE // 153 +data8 0x3FDE3AFC0A49FF40 // 154 +data8 0x3FDE6185206D516E // 155 +data8 0x3FDE882578823D52 // 156 +data8 0x3FDEAEDD2EAC990C // 157 +data8 0x3FDED5AC5F436BE3 // 158 +data8 0x3FDEFC9326D16AB9 // 159 +data8 0x3FDF2391A2157600 // 160 +data8 0x3FDF4AA7EE03192D // 161 +data8 0x3FDF71D627C30BB0 // 162 +data8 0x3FDF991C6CB3B379 // 163 +data8 0x3FDFC07ADA69A910 // 164 +data8 0x3FDFE7F18EB03D3E // 165 +data8 0x3FE007C053C5002E // 166 +data8 0x3FE01B942198A5A1 // 167 +data8 0x3FE02F74400C64EB // 168 +data8 0x3FE04360BE7603AD // 169 +data8 0x3FE05759AC47FE34 // 170 +data8 0x3FE06B5F1911CF52 // 171 +data8 0x3FE078BF0533C568 // 172 +data8 0x3FE08CD9687E7B0E // 173 +data8 0x3FE0A10074CF9019 // 174 +data8 0x3FE0B5343A234477 // 175 +data8 0x3FE0C974C89431CE // 176 +data8 0x3FE0DDC2305B9886 // 177 +data8 0x3FE0EB524BAFC918 // 178 +data8 0x3FE0FFB54213A476 // 179 +data8 0x3FE114253DA97D9F // 180 +data8 0x3FE128A24F1D9AFF // 181 +data8 0x3FE1365252BF0865 // 182 +data8 0x3FE14AE558B4A92D // 183 +data8 0x3FE15F85A19C765B // 184 +data8 0x3FE16D4D38C119FA // 185 +data8 0x3FE18203C20DD133 // 186 +data8 0x3FE196C7BC4B1F3B // 187 +data8 0x3FE1A4A738B7A33C // 188 +data8 0x3FE1B981C0C9653D // 189 +data8 0x3FE1CE69E8BB106B // 190 +data8 0x3FE1DC619DE06944 // 191 +data8 0x3FE1F160A2AD0DA4 // 192 +data8 0x3FE2066D7740737E // 193 +data8 0x3FE2147DBA47A394 // 194 +data8 0x3FE229A1BC5EBAC3 // 195 +data8 0x3FE237C1841A502E // 196 +data8 0x3FE24CFCE6F80D9A // 197 +data8 0x3FE25B2C55CD5762 // 198 +data8 0x3FE2707F4D5F7C41 // 199 +data8 0x3FE285E0842CA384 // 200 +data8 0x3FE294294708B773 // 201 +data8 0x3FE2A9A2670AFF0C // 202 +data8 0x3FE2B7FB2C8D1CC1 // 203 +data8 0x3FE2C65A6395F5F5 // 204 +data8 0x3FE2DBF557B0DF43 // 205 +data8 0x3FE2EA64C3F97655 // 206 +data8 0x3FE3001823684D73 // 207 +data8 0x3FE30E97E9A8B5CD // 208 +data8 0x3FE32463EBDD34EA // 209 +data8 0x3FE332F4314AD796 // 210 +data8 0x3FE348D90E7464D0 // 211 +data8 0x3FE35779F8C43D6E // 212 +data8 0x3FE36621961A6A99 // 213 +data8 0x3FE37C299F3C366A // 214 +data8 0x3FE38AE2171976E7 // 215 +data8 0x3FE399A157A603E7 // 216 +data8 0x3FE3AFCCFE77B9D1 // 217 +data8 0x3FE3BE9D503533B5 // 218 +data8 0x3FE3CD7480B4A8A3 // 219 +data8 0x3FE3E3C43918F76C // 220 +data8 0x3FE3F2ACB27ED6C7 // 221 +data8 0x3FE4019C2125CA93 // 222 +data8 0x3FE4181061389722 // 223 +data8 0x3FE42711518DF545 // 224 +data8 0x3FE436194E12B6BF // 225 +data8 0x3FE445285D68EA69 // 226 +data8 0x3FE45BCC464C893A // 227 +data8 0x3FE46AED21F117FC // 228 +data8 0x3FE47A1527E8A2D3 // 229 +data8 0x3FE489445EFFFCCC // 230 +data8 0x3FE4A018BCB69835 // 231 +data8 0x3FE4AF5A0C9D65D7 // 232 +data8 0x3FE4BEA2A5BDBE87 // 233 +data8 0x3FE4CDF28F10AC46 // 234 +data8 0x3FE4DD49CF994058 // 235 +data8 0x3FE4ECA86E64A684 // 236 +data8 0x3FE503C43CD8EB68 // 237 +data8 0x3FE513356667FC57 // 238 +data8 0x3FE522AE0738A3D8 // 239 +data8 0x3FE5322E26867857 // 240 +data8 0x3FE541B5CB979809 // 241 +data8 0x3FE55144FDBCBD62 // 242 +data8 0x3FE560DBC45153C7 // 243 +data8 0x3FE5707A26BB8C66 // 244 +data8 0x3FE587F60ED5B900 // 245 +data8 0x3FE597A7977C8F31 // 246 +data8 0x3FE5A760D634BB8B // 247 +data8 0x3FE5B721D295F10F // 248 +data8 0x3FE5C6EA94431EF9 // 249 +data8 0x3FE5D6BB22EA86F6 // 250 +data8 0x3FE5E6938645D390 // 251 +data8 0x3FE5F673C61A2ED2 // 252 +data8 0x3FE6065BEA385926 // 253 +data8 0x3FE6164BFA7CC06B // 254 +data8 0x3FE62643FECF9743 // 255 +LOCAL_OBJECT_END(log_data) + + +// Code +//============================================================== + +.section .text +GLOBAL_IEEE754_ENTRY(log1pf) +{ .mfi + getf.exp GR_signexp_x = f8 // if x is unorm then must recompute + fadd.s1 FR_Xp1 = f8, f1 // Form 1+x + mov GR_05 = 0xfffe +} +{ .mlx + addl GR_ad_T = @ltoff(log_data),gp + movl GR_A3 = 0x3fd5555555555555 // double precision memory + // representation of A3 +} +;; + +{ .mfi + ld8 GR_ad_T = [GR_ad_T] + fclass.m p8,p0 = f8,0xb // Is x unorm? + mov GR_exp_mask = 0x1ffff +} +{ .mfi + mov GR_025 = 0xfffd // Exponent of 0.25 + fnorm.s1 FR_NormX = f8 // Normalize x + mov GR_exp_bias = 0xffff +} +;; + +{ .mfi + setf.exp FR_A2 = GR_05 // create A2 = 0.5 + fclass.m p9,p0 = f8,0x1E1 // is x NaN, NaT or +Inf? + nop.i 0 +} +{ .mib + setf.d FR_A3 = GR_A3 // create A3 + nop.i 0 +(p8) br.cond.spnt log1p_unorm // Branch if x=unorm +} +;; + +log1p_common: +{ .mfi + setf.exp FR_A4 = GR_025 // create A4 = 0.25 + frcpa.s1 FR_RcpX,p0 = f1,FR_Xp1 + nop.i 0 +} +{ .mfb + nop.m 0 +(p9) fma.s.s0 f8 = f8,f1,f0 // set V-flag +(p9) br.ret.spnt b0 // exit for NaN, NaT and +Inf +} +;; + +{ .mfi + getf.exp GR_Exp = FR_Xp1 // signexp of x+1 + fclass.m p10,p0 = FR_Xp1,0x3A // is 1+x < 0? + and GR_exp_x = GR_exp_mask, GR_signexp_x // biased exponent of x +} +{ .mlx + nop.m 0 + movl GR_Ln2 = 0x3FE62E42FEFA39EF // double precision memory + // representation of log(2) +} +;; + +{ .mfi + getf.sig GR_Sig = FR_Xp1 // get significand to calculate index + // for T if |x| >= 2^-8 + fcmp.eq.s1 p12,p0 = f8,f0 // is x equal to 0? + sub GR_exp_x = GR_exp_x, GR_exp_bias // true exponent of x +} +;; + +{ .mfi + sub GR_N = GR_Exp,GR_exp_bias // true exponent of x+1 + fcmp.eq.s1 p11,p0 = FR_Xp1,f0 // is x = -1? + cmp.gt p6,p7 = -8, GR_exp_x // Is |x| < 2^-8 +} +{ .mfb + nop.m 0 + nop.f 0 +(p10) br.cond.spnt log1p_lt_minus_1 // jump if x < -1 +} +;; + +// p6 is true if |x| < 1/256 +// p7 is true if |x| >= 1/256 +.pred.rel "mutex",p6,p7 +{ .mfi + nop.m 0 +(p6) fms.s1 FR_r = f8,f1,f0 // range reduction for |x|<1/256 +(p6) cmp.gt.unc p10,p0 = -40, GR_exp_x // Is |x| < 2^-40 +} +{ .mfb +(p7) setf.sig FR_N = GR_N // copy unbiased exponent of x to the + // significand field of FR_N +(p7) fms.s1 FR_r = FR_RcpX,FR_Xp1,f1 // range reduction for |x|>=1/256 +(p12) br.ret.spnt b0 // exit for x=0, return x +} +;; + +{ .mib + setf.d FR_Ln2 = GR_Ln2 // create log(2) +(p7) extr.u GR_Ind = GR_Sig,55,8 // get bits from 55 to 62 as index +(p11) br.cond.spnt log1p_eq_minus_1 // jump if x = -1 +} +;; + +{ .mmf +(p7) shladd GR_ad_T = GR_Ind,3,GR_ad_T // address of T + nop.m 0 +(p10) fnma.s.s0 f8 = f8,f8,f8 // If |x| very small, result=x-x*x +} +;; + +{ .mmb +(p7) ldfd FR_T = [GR_ad_T] + nop.m 0 +(p10) br.ret.spnt b0 // Exit if |x| < 2^-40 +} +;; + +{ .mfi + nop.m 0 + fma.s1 FR_r2 = FR_r,FR_r,f0 // r^2 + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 FR_A2 = FR_A2,FR_r,f1 // 1.0 - A2*r + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fnma.s1 FR_A3 = FR_A4,FR_r,FR_A3 // A3 - A4*r + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p7) fcvt.xf FR_N = FR_N + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + // (A3*r+A2)*r^2+r + fma.s1 FR_A2 = FR_A3,FR_r2,FR_A2 // (A4*r+A3)*r^2+(A2*r+1) + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + // N*Ln2hi+T +(p7) fma.s1 FR_NxLn2pT = FR_N,FR_Ln2,FR_T + nop.i 0 +} +;; + +.pred.rel "mutex",p6,p7 +{ .mfi + nop.m 0 +(p6) fma.s.s0 f8 = FR_A2,FR_r,f0 // result if 2^(-40) <= |x| < 1/256 + nop.i 0 +} +{ .mfb + nop.m 0 +(p7) fma.s.s0 f8 = FR_A2,FR_r,FR_NxLn2pT // result if |x| >= 1/256 + br.ret.sptk b0 // Exit if |x| >= 2^(-40) +} +;; + +.align 32 +log1p_unorm: +// Here if x=unorm +{ .mfb + getf.exp GR_signexp_x = FR_NormX // recompute biased exponent + nop.f 0 + br.cond.sptk log1p_common +} +;; + +.align 32 +log1p_eq_minus_1: +// Here if x=-1 +{ .mfi + nop.m 0 + fmerge.s FR_X = f8,f8 // keep input argument for subsequent + // call of __libm_error_support# + nop.i 0 +} +;; + +{ .mfi + mov GR_TAG = 142 // set libm error in case of log1p(-1). + frcpa.s0 f8,p0 = f8,f0 // log1p(-1) should be equal to -INF. + // We can get it using frcpa because it + // sets result to the IEEE-754 mandated + // quotient of f8/f0. + nop.i 0 +} +{ .mib + nop.m 0 + nop.i 0 + br.cond.sptk log_libm_err +} +;; + +.align 32 +log1p_lt_minus_1: +// Here if x < -1 +{ .mfi + nop.m 0 + fmerge.s FR_X = f8,f8 + nop.i 0 +} +;; + +{ .mfi + mov GR_TAG = 143 // set libm error in case of x < -1. + frcpa.s0 f8,p0 = f0,f0 // log1p(x) x < -1 should be equal to NaN. + // We can get it using frcpa because it + // sets result to the IEEE-754 mandated + // quotient of f0/f0 i.e. NaN. + nop.i 0 +} +;; + +.align 32 +log_libm_err: +{ .mmi + alloc r32 = ar.pfs,1,4,4,0 + mov GR_Parameter_TAG = GR_TAG + nop.i 0 +} +;; + +GLOBAL_IEEE754_END(log1pf) + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y = -32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS = ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp = -64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP = gp // Save gp +};; +{ .mmi + stfs [GR_Parameter_Y] = FR_Y,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0 = b0 // Save b0 +};; +.body +{ .mib + stfs [GR_Parameter_X] = FR_X // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfs [GR_Parameter_Y] = FR_RESULT // STORE Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; +{ .mmi + ldfs f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; +LOCAL_LIBM_END(__libm_error_region) + +.type __libm_error_support#,@function +.global __libm_error_support# + diff --git a/sysdeps/ia64/fpu/s_log1pl.S b/sysdeps/ia64/fpu/s_log1pl.S new file mode 100644 index 0000000000..9654265004 --- /dev/null +++ b/sysdeps/ia64/fpu/s_log1pl.S @@ -0,0 +1,1200 @@ +.file "log1pl.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +//********************************************************************* +// +// History: +// 02/02/00 Initial version +// 04/04/00 Unwind support added +// 08/15/00 Bundle added after call to __libm_error_support to properly +// set [the previously overwritten] GR_Parameter_RESULT. +// 05/21/01 Removed logl and log10l, putting them in a separate file +// 06/29/01 Improved speed of all paths +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align; +// used data8 for long double table values +// +//********************************************************************* +// +//********************************************************************* +// +// Function: log1pl(x) = ln(x+1), for double-extended precision x values +// +//********************************************************************* +// +// Resources Used: +// +// Floating-Point Registers: f8 (Input and Return Value) +// f34-f82 +// +// General Purpose Registers: +// r32-r56 +// r53-r56 (Used to pass arguments to error handling routine) +// +// Predicate Registers: p6-p13 +// +//********************************************************************* +// +// IEEE Special Conditions: +// +// Denormal fault raised on denormal inputs +// Overflow exceptions cannot occur +// Underflow exceptions raised when appropriate for log1p +// Inexact raised when appropriate by algorithm +// +// log1pl(inf) = inf +// log1pl(-inf) = QNaN +// log1pl(+/-0) = +/-0 +// log1pl(-1) = -inf +// log1pl(SNaN) = QNaN +// log1pl(QNaN) = QNaN +// log1pl(EM_special Values) = QNaN +// +//********************************************************************* +// +// Overview +// +// The method consists of three cases. +// +// If |X| < 2^(-80) use case log1p_small; +// else |X| < 2^(-7) use case log_near1; +// else use case log_regular; +// +// Case log1p_small: +// +// log1pl( X ) = logl( X+1 ) can be approximated by X +// +// Case log_near1: +// +// log1pl( X ) = log( X+1 ) can be approximated by a simple polynomial +// in W = X. This polynomial resembles the truncated Taylor +// series W - W^/2 + W^3/3 - ... +// +// Case log_regular: +// +// Here we use a table lookup method. The basic idea is that in +// order to compute logl(Arg) = log1pl (Arg-1) for an argument Arg in [1,2), +// we construct a value G such that G*Arg is close to 1 and that +// logl(1/G) is obtainable easily from a table of values calculated +// beforehand. Thus +// +// logl(Arg) = logl(1/G) + logl(G*Arg) +// = logl(1/G) + logl(1 + (G*Arg - 1)) +// +// Because |G*Arg - 1| is small, the second term on the right hand +// side can be approximated by a short polynomial. We elaborate +// this method in four steps. +// +// Step 0: Initialization +// +// We need to calculate logl( X+1 ). Obtain N, S_hi such that +// +// X+1 = 2^N * ( S_hi + S_lo ) exactly +// +// where S_hi in [1,2) and S_lo is a correction to S_hi in the sense +// that |S_lo| <= ulp(S_hi). +// +// Step 1: Argument Reduction +// +// Based on S_hi, obtain G_1, G_2, G_3 from a table and calculate +// +// G := G_1 * G_2 * G_3 +// r := (G * S_hi - 1) + G * S_lo +// +// These G_j's have the property that the product is exactly +// representable and that |r| < 2^(-12) as a result. +// +// Step 2: Approximation +// +// +// logl(1 + r) is approximated by a short polynomial poly(r). +// +// Step 3: Reconstruction +// +// +// Finally, log1pl( X ) = logl( X+1 ) is given by +// +// logl( X+1 ) = logl( 2^N * (S_hi + S_lo) ) +// ~=~ N*logl(2) + logl(1/G) + logl(1 + r) +// ~=~ N*logl(2) + logl(1/G) + poly(r). +// +// **** Algorithm **** +// +// Case log1p_small: +// +// Although log1pl(X) is basically X, we would like to preserve the inexactness +// nature as well as consistent behavior under different rounding modes. +// We can do this by computing the result as +// +// log1pl(X) = X - X*X +// +// +// Case log_near1: +// +// Here we compute a simple polynomial. To exploit parallelism, we split +// the polynomial into two portions. +// +// W := X +// Wsq := W * W +// W4 := Wsq*Wsq +// W6 := W4*Wsq +// Y_hi := W + Wsq*(P_1 + W*(P_2 + W*(P_3 + W*P_4)) +// Y_lo := W6*(P_5 + W*(P_6 + W*(P_7 + W*P_8))) +// +// Case log_regular: +// +// We present the algorithm in four steps. +// +// Step 0. Initialization +// ---------------------- +// +// Z := X + 1 +// N := unbaised exponent of Z +// S_hi := 2^(-N) * Z +// S_lo := 2^(-N) * { (max(X,1)-Z) + min(X,1) } +// +// Step 1. Argument Reduction +// -------------------------- +// +// Let +// +// Z = 2^N * S_hi = 2^N * 1.d_1 d_2 d_3 ... d_63 +// +// We obtain G_1, G_2, G_3 by the following steps. +// +// +// Define X_0 := 1.d_1 d_2 ... d_14. This is extracted +// from S_hi. +// +// Define A_1 := 1.d_1 d_2 d_3 d_4. This is X_0 truncated +// to lsb = 2^(-4). +// +// Define index_1 := [ d_1 d_2 d_3 d_4 ]. +// +// Fetch Z_1 := (1/A_1) rounded UP in fixed point with +// fixed point lsb = 2^(-15). +// Z_1 looks like z_0.z_1 z_2 ... z_15 +// Note that the fetching is done using index_1. +// A_1 is actually not needed in the implementation +// and is used here only to explain how is the value +// Z_1 defined. +// +// Fetch G_1 := (1/A_1) truncated to 21 sig. bits. +// floating pt. Again, fetching is done using index_1. A_1 +// explains how G_1 is defined. +// +// Calculate X_1 := X_0 * Z_1 truncated to lsb = 2^(-14) +// = 1.0 0 0 0 d_5 ... d_14 +// This is accomplised by integer multiplication. +// It is proved that X_1 indeed always begin +// with 1.0000 in fixed point. +// +// +// Define A_2 := 1.0 0 0 0 d_5 d_6 d_7 d_8. This is X_1 +// truncated to lsb = 2^(-8). Similar to A_1, +// A_2 is not needed in actual implementation. It +// helps explain how some of the values are defined. +// +// Define index_2 := [ d_5 d_6 d_7 d_8 ]. +// +// Fetch Z_2 := (1/A_2) rounded UP in fixed point with +// fixed point lsb = 2^(-15). Fetch done using index_2. +// Z_2 looks like z_0.z_1 z_2 ... z_15 +// +// Fetch G_2 := (1/A_2) truncated to 21 sig. bits. +// floating pt. +// +// Calculate X_2 := X_1 * Z_2 truncated to lsb = 2^(-14) +// = 1.0 0 0 0 0 0 0 0 d_9 d_10 ... d_14 +// This is accomplised by integer multiplication. +// It is proved that X_2 indeed always begin +// with 1.00000000 in fixed point. +// +// +// Define A_3 := 1.0 0 0 0 0 0 0 0 d_9 d_10 d_11 d_12 d_13 1. +// This is 2^(-14) + X_2 truncated to lsb = 2^(-13). +// +// Define index_3 := [ d_9 d_10 d_11 d_12 d_13 ]. +// +// Fetch G_3 := (1/A_3) truncated to 21 sig. bits. +// floating pt. Fetch is done using index_3. +// +// Compute G := G_1 * G_2 * G_3. +// +// This is done exactly since each of G_j only has 21 sig. bits. +// +// Compute +// +// r := (G*S_hi - 1) + G*S_lo using 2 FMA operations. +// +// Thus r approximates G*(S_hi + S_lo) - 1 to within a couple of +// rounding errors. +// +// +// Step 2. Approximation +// --------------------- +// +// This step computes an approximation to logl( 1 + r ) where r is the +// reduced argument just obtained. It is proved that |r| <= 1.9*2^(-13); +// thus logl(1+r) can be approximated by a short polynomial: +// +// logl(1+r) ~=~ poly = r + Q1 r^2 + ... + Q4 r^5 +// +// +// Step 3. Reconstruction +// ---------------------- +// +// This step computes the desired result of logl(X+1): +// +// logl(X+1) = logl( 2^N * (S_hi + S_lo) ) +// = N*logl(2) + logl( S_hi + S_lo) ) +// = N*logl(2) + logl(1/G) + +// logl(1 + G * ( S_hi + S_lo ) - 1 ) +// +// logl(2), logl(1/G_j) are stored as pairs of (single,double) numbers: +// log2_hi, log2_lo, log1byGj_hi, log1byGj_lo. The high parts are +// single-precision numbers and the low parts are double precision +// numbers. These have the property that +// +// N*log2_hi + SUM ( log1byGj_hi ) +// +// is computable exactly in double-extended precision (64 sig. bits). +// Finally +// +// Y_hi := N*log2_hi + SUM ( log1byGj_hi ) +// Y_lo := poly_hi + [ poly_lo + +// ( SUM ( log1byGj_lo ) + N*log2_lo ) ] +// + +RODATA +.align 64 + +// ************* DO NOT CHANGE THE ORDER OF THESE TABLES ************* + +// P_8, P_7, P_6, P_5, P_4, P_3, P_2, and P_1 + +LOCAL_OBJECT_START(Constants_P) +//data4 0xEFD62B15,0xE3936754,0x00003FFB,0x00000000 +//data4 0xA5E56381,0x8003B271,0x0000BFFC,0x00000000 +//data4 0x73282DB0,0x9249248C,0x00003FFC,0x00000000 +//data4 0x47305052,0xAAAAAA9F,0x0000BFFC,0x00000000 +//data4 0xCCD17FC9,0xCCCCCCCC,0x00003FFC,0x00000000 +//data4 0x00067ED5,0x80000000,0x0000BFFD,0x00000000 +//data4 0xAAAAAAAA,0xAAAAAAAA,0x00003FFD,0x00000000 +//data4 0xFFFFFFFE,0xFFFFFFFF,0x0000BFFD,0x00000000 +data8 0xE3936754EFD62B15,0x00003FFB +data8 0x8003B271A5E56381,0x0000BFFC +data8 0x9249248C73282DB0,0x00003FFC +data8 0xAAAAAA9F47305052,0x0000BFFC +data8 0xCCCCCCCCCCD17FC9,0x00003FFC +data8 0x8000000000067ED5,0x0000BFFD +data8 0xAAAAAAAAAAAAAAAA,0x00003FFD +data8 0xFFFFFFFFFFFFFFFE,0x0000BFFD +LOCAL_OBJECT_END(Constants_P) + +// log2_hi, log2_lo, Q_4, Q_3, Q_2, and Q_1 + +LOCAL_OBJECT_START(Constants_Q) +//data4 0x00000000,0xB1721800,0x00003FFE,0x00000000 +//data4 0x4361C4C6,0x82E30865,0x0000BFE2,0x00000000 +//data4 0x328833CB,0xCCCCCAF2,0x00003FFC,0x00000000 +//data4 0xA9D4BAFB,0x80000077,0x0000BFFD,0x00000000 +//data4 0xAAABE3D2,0xAAAAAAAA,0x00003FFD,0x00000000 +//data4 0xFFFFDAB7,0xFFFFFFFF,0x0000BFFD,0x00000000 +data8 0xB172180000000000,0x00003FFE +data8 0x82E308654361C4C6,0x0000BFE2 +data8 0xCCCCCAF2328833CB,0x00003FFC +data8 0x80000077A9D4BAFB,0x0000BFFD +data8 0xAAAAAAAAAAABE3D2,0x00003FFD +data8 0xFFFFFFFFFFFFDAB7,0x0000BFFD +LOCAL_OBJECT_END(Constants_Q) + +// 1/ln10_hi, 1/ln10_lo + +LOCAL_OBJECT_START(Constants_1_by_LN10) +//data4 0x37287195,0xDE5BD8A9,0x00003FFD,0x00000000 +//data4 0xACCF70C8,0xD56EAABE,0x00003FBB,0x00000000 +data8 0xDE5BD8A937287195,0x00003FFD +data8 0xD56EAABEACCF70C8,0x00003FBB +LOCAL_OBJECT_END(Constants_1_by_LN10) + + +// Z1 - 16 bit fixed + +LOCAL_OBJECT_START(Constants_Z_1) +data4 0x00008000 +data4 0x00007879 +data4 0x000071C8 +data4 0x00006BCB +data4 0x00006667 +data4 0x00006187 +data4 0x00005D18 +data4 0x0000590C +data4 0x00005556 +data4 0x000051EC +data4 0x00004EC5 +data4 0x00004BDB +data4 0x00004925 +data4 0x0000469F +data4 0x00004445 +data4 0x00004211 +LOCAL_OBJECT_END(Constants_Z_1) + +// G1 and H1 - IEEE single and h1 - IEEE double + +LOCAL_OBJECT_START(Constants_G_H_h1) +data4 0x3F800000,0x00000000 +data8 0x0000000000000000 +data4 0x3F70F0F0,0x3D785196 +data8 0x3DA163A6617D741C +data4 0x3F638E38,0x3DF13843 +data8 0x3E2C55E6CBD3D5BB +data4 0x3F579430,0x3E2FF9A0 +data8 0xBE3EB0BFD86EA5E7 +data4 0x3F4CCCC8,0x3E647FD6 +data8 0x3E2E6A8C86B12760 +data4 0x3F430C30,0x3E8B3AE7 +data8 0x3E47574C5C0739BA +data4 0x3F3A2E88,0x3EA30C68 +data8 0x3E20E30F13E8AF2F +data4 0x3F321640,0x3EB9CEC8 +data8 0xBE42885BF2C630BD +data4 0x3F2AAAA8,0x3ECF9927 +data8 0x3E497F3497E577C6 +data4 0x3F23D708,0x3EE47FC5 +data8 0x3E3E6A6EA6B0A5AB +data4 0x3F1D89D8,0x3EF8947D +data8 0xBDF43E3CD328D9BE +data4 0x3F17B420,0x3F05F3A1 +data8 0x3E4094C30ADB090A +data4 0x3F124920,0x3F0F4303 +data8 0xBE28FBB2FC1FE510 +data4 0x3F0D3DC8,0x3F183EBF +data8 0x3E3A789510FDE3FA +data4 0x3F088888,0x3F20EC80 +data8 0x3E508CE57CC8C98F +data4 0x3F042108,0x3F29516A +data8 0xBE534874A223106C +LOCAL_OBJECT_END(Constants_G_H_h1) + +// Z2 - 16 bit fixed + +LOCAL_OBJECT_START(Constants_Z_2) +data4 0x00008000 +data4 0x00007F81 +data4 0x00007F02 +data4 0x00007E85 +data4 0x00007E08 +data4 0x00007D8D +data4 0x00007D12 +data4 0x00007C98 +data4 0x00007C20 +data4 0x00007BA8 +data4 0x00007B31 +data4 0x00007ABB +data4 0x00007A45 +data4 0x000079D1 +data4 0x0000795D +data4 0x000078EB +LOCAL_OBJECT_END(Constants_Z_2) + +// G2 and H2 - IEEE single and h2 - IEEE double + +LOCAL_OBJECT_START(Constants_G_H_h2) +data4 0x3F800000,0x00000000 +data8 0x0000000000000000 +data4 0x3F7F00F8,0x3B7F875D +data8 0x3DB5A11622C42273 +data4 0x3F7E03F8,0x3BFF015B +data8 0x3DE620CF21F86ED3 +data4 0x3F7D08E0,0x3C3EE393 +data8 0xBDAFA07E484F34ED +data4 0x3F7C0FC0,0x3C7E0586 +data8 0xBDFE07F03860BCF6 +data4 0x3F7B1880,0x3C9E75D2 +data8 0x3DEA370FA78093D6 +data4 0x3F7A2328,0x3CBDC97A +data8 0x3DFF579172A753D0 +data4 0x3F792FB0,0x3CDCFE47 +data8 0x3DFEBE6CA7EF896B +data4 0x3F783E08,0x3CFC15D0 +data8 0x3E0CF156409ECB43 +data4 0x3F774E38,0x3D0D874D +data8 0xBE0B6F97FFEF71DF +data4 0x3F766038,0x3D1CF49B +data8 0xBE0804835D59EEE8 +data4 0x3F757400,0x3D2C531D +data8 0x3E1F91E9A9192A74 +data4 0x3F748988,0x3D3BA322 +data8 0xBE139A06BF72A8CD +data4 0x3F73A0D0,0x3D4AE46F +data8 0x3E1D9202F8FBA6CF +data4 0x3F72B9D0,0x3D5A1756 +data8 0xBE1DCCC4BA796223 +data4 0x3F71D488,0x3D693B9D +data8 0xBE049391B6B7C239 +LOCAL_OBJECT_END(Constants_G_H_h2) + +// G3 and H3 - IEEE single and h3 - IEEE double + +LOCAL_OBJECT_START(Constants_G_H_h3) +data4 0x3F7FFC00,0x38800100 +data8 0x3D355595562224CD +data4 0x3F7FF400,0x39400480 +data8 0x3D8200A206136FF6 +data4 0x3F7FEC00,0x39A00640 +data8 0x3DA4D68DE8DE9AF0 +data4 0x3F7FE400,0x39E00C41 +data8 0xBD8B4291B10238DC +data4 0x3F7FDC00,0x3A100A21 +data8 0xBD89CCB83B1952CA +data4 0x3F7FD400,0x3A300F22 +data8 0xBDB107071DC46826 +data4 0x3F7FCC08,0x3A4FF51C +data8 0x3DB6FCB9F43307DB +data4 0x3F7FC408,0x3A6FFC1D +data8 0xBD9B7C4762DC7872 +data4 0x3F7FBC10,0x3A87F20B +data8 0xBDC3725E3F89154A +data4 0x3F7FB410,0x3A97F68B +data8 0xBD93519D62B9D392 +data4 0x3F7FAC18,0x3AA7EB86 +data8 0x3DC184410F21BD9D +data4 0x3F7FA420,0x3AB7E101 +data8 0xBDA64B952245E0A6 +data4 0x3F7F9C20,0x3AC7E701 +data8 0x3DB4B0ECAABB34B8 +data4 0x3F7F9428,0x3AD7DD7B +data8 0x3D9923376DC40A7E +data4 0x3F7F8C30,0x3AE7D474 +data8 0x3DC6E17B4F2083D3 +data4 0x3F7F8438,0x3AF7CBED +data8 0x3DAE314B811D4394 +data4 0x3F7F7C40,0x3B03E1F3 +data8 0xBDD46F21B08F2DB1 +data4 0x3F7F7448,0x3B0BDE2F +data8 0xBDDC30A46D34522B +data4 0x3F7F6C50,0x3B13DAAA +data8 0x3DCB0070B1F473DB +data4 0x3F7F6458,0x3B1BD766 +data8 0xBDD65DDC6AD282FD +data4 0x3F7F5C68,0x3B23CC5C +data8 0xBDCDAB83F153761A +data4 0x3F7F5470,0x3B2BC997 +data8 0xBDDADA40341D0F8F +data4 0x3F7F4C78,0x3B33C711 +data8 0x3DCD1BD7EBC394E8 +data4 0x3F7F4488,0x3B3BBCC6 +data8 0xBDC3532B52E3E695 +data4 0x3F7F3C90,0x3B43BAC0 +data8 0xBDA3961EE846B3DE +data4 0x3F7F34A0,0x3B4BB0F4 +data8 0xBDDADF06785778D4 +data4 0x3F7F2CA8,0x3B53AF6D +data8 0x3DCC3ED1E55CE212 +data4 0x3F7F24B8,0x3B5BA620 +data8 0xBDBA31039E382C15 +data4 0x3F7F1CC8,0x3B639D12 +data8 0x3D635A0B5C5AF197 +data4 0x3F7F14D8,0x3B6B9444 +data8 0xBDDCCB1971D34EFC +data4 0x3F7F0CE0,0x3B7393BC +data8 0x3DC7450252CD7ADA +data4 0x3F7F04F0,0x3B7B8B6D +data8 0xBDB68F177D7F2A42 +LOCAL_OBJECT_END(Constants_G_H_h3) + + +// Floating Point Registers + +FR_Input_X = f8 + +FR_Y_hi = f34 +FR_Y_lo = f35 + +FR_Scale = f36 +FR_X_Prime = f37 +FR_S_hi = f38 +FR_W = f39 +FR_G = f40 + +FR_H = f41 +FR_wsq = f42 +FR_w4 = f43 +FR_h = f44 +FR_w6 = f45 + +FR_G2 = f46 +FR_H2 = f47 +FR_poly_lo = f48 +FR_P8 = f49 +FR_poly_hi = f50 + +FR_P7 = f51 +FR_h2 = f52 +FR_rsq = f53 +FR_P6 = f54 +FR_r = f55 + +FR_log2_hi = f56 +FR_log2_lo = f57 +FR_p87 = f58 +FR_p876 = f58 +FR_p8765 = f58 +FR_float_N = f59 +FR_Q4 = f60 + +FR_p43 = f61 +FR_p432 = f61 +FR_p4321 = f61 +FR_P4 = f62 +FR_G3 = f63 +FR_H3 = f64 +FR_h3 = f65 + +FR_Q3 = f66 +FR_P3 = f67 +FR_Q2 = f68 +FR_P2 = f69 +FR_1LN10_hi = f70 + +FR_Q1 = f71 +FR_P1 = f72 +FR_1LN10_lo = f73 +FR_P5 = f74 +FR_rcub = f75 + +FR_Output_X_tmp = f76 +FR_Neg_One = f77 +FR_Z = f78 +FR_AA = f79 +FR_BB = f80 +FR_S_lo = f81 +FR_2_to_minus_N = f82 + +FR_X = f8 +FR_Y = f0 +FR_RESULT = f76 + + +// General Purpose Registers + +GR_ad_p = r33 +GR_Index1 = r34 +GR_Index2 = r35 +GR_signif = r36 +GR_X_0 = r37 +GR_X_1 = r38 +GR_X_2 = r39 +GR_minus_N = r39 +GR_Z_1 = r40 +GR_Z_2 = r41 +GR_N = r42 +GR_Bias = r43 +GR_M = r44 +GR_Index3 = r45 +GR_exp_2tom80 = r45 +GR_ad_p2 = r46 +GR_exp_mask = r47 +GR_exp_2tom7 = r48 +GR_ad_ln10 = r49 +GR_ad_tbl_1 = r50 +GR_ad_tbl_2 = r51 +GR_ad_tbl_3 = r52 +GR_ad_q = r53 +GR_ad_z_1 = r54 +GR_ad_z_2 = r55 +GR_ad_z_3 = r56 +GR_minus_N = r39 + +// +// Added for unwind support +// + +GR_SAVE_PFS = r50 +GR_SAVE_B0 = r51 +GR_SAVE_GP = r52 +GR_Parameter_X = r53 +GR_Parameter_Y = r54 +GR_Parameter_RESULT = r55 +GR_Parameter_TAG = r56 + +.section .text +GLOBAL_IEEE754_ENTRY(log1pl) +{ .mfi + alloc r32 = ar.pfs,0,21,4,0 + fclass.m p6, p0 = FR_Input_X, 0x1E3 // Test for natval, nan, inf + nop.i 999 +} +{ .mfi + addl GR_ad_z_1 = @ltoff(Constants_Z_1#),gp + fma.s1 FR_Z = FR_Input_X, f1, f1 // x+1 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fmerge.ns FR_Neg_One = f1, f1 // Form -1.0 + nop.i 999 +} +{ .mfi + nop.m 999 + fnorm.s1 FR_X_Prime = FR_Input_X // Normalize x + nop.i 999 +} +;; + +{ .mfi + ld8 GR_ad_z_1 = [GR_ad_z_1] // Get pointer to Constants_Z_1 + nop.f 999 + mov GR_exp_2tom7 = 0x0fff8 // Exponent of 2^-7 +} +;; + +{ .mfb + getf.sig GR_signif = FR_Z // Get significand of x+1 + fcmp.eq.s1 p9, p0 = FR_Input_X, f0 // Test for x=0 +(p6) br.cond.spnt LOG1P_special // Branch for nan, inf, natval +} +;; + +{ .mfi + add GR_ad_tbl_1 = 0x040, GR_ad_z_1 // Point to Constants_G_H_h1 + fcmp.lt.s1 p13, p0 = FR_X_Prime, FR_Neg_One // Test for x<-1 + add GR_ad_p = -0x100, GR_ad_z_1 // Point to Constants_P +} +{ .mfi + add GR_ad_z_2 = 0x140, GR_ad_z_1 // Point to Constants_Z_2 + nop.f 999 + add GR_ad_tbl_2 = 0x180, GR_ad_z_1 // Point to Constants_G_H_h2 +} +;; + +{ .mfi + add GR_ad_q = 0x080, GR_ad_p // Point to Constants_Q + fcmp.eq.s1 p8, p0 = FR_X_Prime, FR_Neg_One // Test for x=-1 + extr.u GR_Index1 = GR_signif, 59, 4 // Get high 4 bits of signif +} +{ .mfb + add GR_ad_tbl_3 = 0x280, GR_ad_z_1 // Point to Constants_G_H_h3 + nop.f 999 +(p9) br.ret.spnt b0 // Exit if x=0, return input +} +;; + +{ .mfi + shladd GR_ad_z_1 = GR_Index1, 2, GR_ad_z_1 // Point to Z_1 + fclass.nm p10, p0 = FR_Input_X, 0x1FF // Test for unsupported + extr.u GR_X_0 = GR_signif, 49, 15 // Get high 15 bits of significand +} +{ .mfi + ldfe FR_P8 = [GR_ad_p],16 // Load P_8 for near1 path + fsub.s1 FR_W = FR_X_Prime, f0 // W = x + add GR_ad_ln10 = 0x060, GR_ad_q // Point to Constants_1_by_LN10 +} +;; + +{ .mfi + ld4 GR_Z_1 = [GR_ad_z_1] // Load Z_1 + fmax.s1 FR_AA = FR_X_Prime, f1 // For S_lo, form AA = max(X,1.0) + mov GR_exp_mask = 0x1FFFF // Create exponent mask +} +{ .mib + shladd GR_ad_tbl_1 = GR_Index1, 4, GR_ad_tbl_1 // Point to G_1 + mov GR_Bias = 0x0FFFF // Create exponent bias +(p13) br.cond.spnt LOG1P_LT_Minus_1 // Branch if x<-1 +} +;; + +{ .mfb + ldfps FR_G, FR_H = [GR_ad_tbl_1],8 // Load G_1, H_1 + fmerge.se FR_S_hi = f1,FR_Z // Form |x+1| +(p8) br.cond.spnt LOG1P_EQ_Minus_1 // Branch if x=-1 +} +;; + +{ .mmb + getf.exp GR_N = FR_Z // Get N = exponent of x+1 + ldfd FR_h = [GR_ad_tbl_1] // Load h_1 +(p10) br.cond.spnt LOG1P_unsupported // Branch for unsupported type +} +;; + +{ .mfi + ldfe FR_log2_hi = [GR_ad_q],16 // Load log2_hi + fcmp.eq.s0 p8, p0 = FR_Input_X, f0 // Dummy op to flag denormals + pmpyshr2.u GR_X_1 = GR_X_0,GR_Z_1,15 // Get bits 30-15 of X_0 * Z_1 +} +;; + +// +// For performance, don't use result of pmpyshr2.u for 4 cycles. +// +{ .mmi + ldfe FR_log2_lo = [GR_ad_q],16 // Load log2_lo + sub GR_N = GR_N, GR_Bias + mov GR_exp_2tom80 = 0x0ffaf // Exponent of 2^-80 +} +;; + +{ .mfi + ldfe FR_Q4 = [GR_ad_q],16 // Load Q4 + fms.s1 FR_S_lo = FR_AA, f1, FR_Z // Form S_lo = AA - Z + sub GR_minus_N = GR_Bias, GR_N // Form exponent of 2^(-N) +} +;; + +{ .mmf + ldfe FR_Q3 = [GR_ad_q],16 // Load Q3 + setf.sig FR_float_N = GR_N // Put integer N into rightmost significand + fmin.s1 FR_BB = FR_X_Prime, f1 // For S_lo, form BB = min(X,1.0) +} +;; + +{ .mmi + getf.exp GR_M = FR_W // Get signexp of w = x + ldfe FR_Q2 = [GR_ad_q],16 // Load Q2 + extr.u GR_Index2 = GR_X_1, 6, 4 // Extract bits 6-9 of X_1 +} +;; + +{ .mmi + ldfe FR_Q1 = [GR_ad_q] // Load Q1 + shladd GR_ad_z_2 = GR_Index2, 2, GR_ad_z_2 // Point to Z_2 + add GR_ad_p2 = 0x30,GR_ad_p // Point to P_4 +} +;; + +{ .mmi + ld4 GR_Z_2 = [GR_ad_z_2] // Load Z_2 + shladd GR_ad_tbl_2 = GR_Index2, 4, GR_ad_tbl_2 // Point to G_2 + and GR_M = GR_exp_mask, GR_M // Get exponent of w = x +} +;; + +{ .mmi + ldfps FR_G2, FR_H2 = [GR_ad_tbl_2],8 // Load G_2, H_2 + cmp.lt p8, p9 = GR_M, GR_exp_2tom7 // Test |x| < 2^-7 + cmp.lt p7, p0 = GR_M, GR_exp_2tom80 // Test |x| < 2^-80 +} +;; + +// Small path is separate code +// p7 is for the small path: |x| < 2^-80 +// near1 and regular paths are merged. +// p8 is for the near1 path: |x| < 2^-7 +// p9 is for regular path: |x| >= 2^-7 + +{ .mfi + ldfd FR_h2 = [GR_ad_tbl_2] // Load h_2 + nop.f 999 + nop.i 999 +} +{ .mfb +(p9) setf.exp FR_2_to_minus_N = GR_minus_N // Form 2^(-N) +(p7) fnma.s0 f8 = FR_X_Prime, FR_X_Prime, FR_X_Prime // Result x - x*x +(p7) br.ret.spnt b0 // Branch if |x| < 2^-80 +} +;; + +{ .mmi +(p8) ldfe FR_P7 = [GR_ad_p],16 // Load P_7 for near1 path +(p8) ldfe FR_P4 = [GR_ad_p2],16 // Load P_4 for near1 path +(p9) pmpyshr2.u GR_X_2 = GR_X_1,GR_Z_2,15 // Get bits 30-15 of X_1 * Z_2 +} +;; + +// +// For performance, don't use result of pmpyshr2.u for 4 cycles. +// +{ .mmf +(p8) ldfe FR_P6 = [GR_ad_p],16 // Load P_6 for near1 path +(p8) ldfe FR_P3 = [GR_ad_p2],16 // Load P_3 for near1 path +(p9) fma.s1 FR_S_lo = FR_S_lo, f1, FR_BB // S_lo = S_lo + BB +} +;; + +{ .mmf +(p8) ldfe FR_P5 = [GR_ad_p],16 // Load P_5 for near1 path +(p8) ldfe FR_P2 = [GR_ad_p2],16 // Load P_2 for near1 path +(p8) fmpy.s1 FR_wsq = FR_W, FR_W // wsq = w * w for near1 path +} +;; + +{ .mmi +(p8) ldfe FR_P1 = [GR_ad_p2],16 ;; // Load P_1 for near1 path + nop.m 999 +(p9) extr.u GR_Index3 = GR_X_2, 1, 5 // Extract bits 1-5 of X_2 +} +;; + +{ .mfi +(p9) shladd GR_ad_tbl_3 = GR_Index3, 4, GR_ad_tbl_3 // Point to G_3 +(p9) fcvt.xf FR_float_N = FR_float_N + nop.i 999 +} +;; + +{ .mfi +(p9) ldfps FR_G3, FR_H3 = [GR_ad_tbl_3],8 // Load G_3, H_3 + nop.f 999 + nop.i 999 +} +;; + +{ .mfi +(p9) ldfd FR_h3 = [GR_ad_tbl_3] // Load h_3 +(p9) fmpy.s1 FR_G = FR_G, FR_G2 // G = G_1 * G_2 + nop.i 999 +} +{ .mfi + nop.m 999 +(p9) fadd.s1 FR_H = FR_H, FR_H2 // H = H_1 + H_2 + nop.i 999 +} +;; + +{ .mmf + nop.m 999 + nop.m 999 +(p9) fadd.s1 FR_h = FR_h, FR_h2 // h = h_1 + h_2 +} +;; + +{ .mfi + nop.m 999 +(p8) fmpy.s1 FR_w4 = FR_wsq, FR_wsq // w4 = w^4 for near1 path + nop.i 999 +} +{ .mfi + nop.m 999 +(p8) fma.s1 FR_p87 = FR_W, FR_P8, FR_P7 // p87 = w * P8 + P7 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fma.s1 FR_S_lo = FR_S_lo, FR_2_to_minus_N, f0 // S_lo = S_lo * 2^(-N) + nop.i 999 +} +{ .mfi + nop.m 999 +(p8) fma.s1 FR_p43 = FR_W, FR_P4, FR_P3 // p43 = w * P4 + P3 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fmpy.s1 FR_G = FR_G, FR_G3 // G = (G_1 * G_2) * G_3 + nop.i 999 +} +{ .mfi + nop.m 999 +(p9) fadd.s1 FR_H = FR_H, FR_H3 // H = (H_1 + H_2) + H_3 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fadd.s1 FR_h = FR_h, FR_h3 // h = (h_1 + h_2) + h_3 + nop.i 999 +} +{ .mfi + nop.m 999 +(p8) fmpy.s1 FR_w6 = FR_w4, FR_wsq // w6 = w^6 for near1 path + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p8) fma.s1 FR_p432 = FR_W, FR_p43, FR_P2 // p432 = w * p43 + P2 + nop.i 999 +} +{ .mfi + nop.m 999 +(p8) fma.s1 FR_p876 = FR_W, FR_p87, FR_P6 // p876 = w * p87 + P6 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fms.s1 FR_r = FR_G, FR_S_hi, f1 // r = G * S_hi - 1 + nop.i 999 +} +{ .mfi + nop.m 999 +(p9) fma.s1 FR_Y_hi = FR_float_N, FR_log2_hi, FR_H // Y_hi = N * log2_hi + H + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fma.s1 FR_h = FR_float_N, FR_log2_lo, FR_h // h = N * log2_lo + h + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fma.s1 FR_r = FR_G, FR_S_lo, FR_r // r = G * S_lo + (G * S_hi - 1) + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p8) fma.s1 FR_p4321 = FR_W, FR_p432, FR_P1 // p4321 = w * p432 + P1 + nop.i 999 +} +{ .mfi + nop.m 999 +(p8) fma.s1 FR_p8765 = FR_W, FR_p876, FR_P5 // p8765 = w * p876 + P5 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fma.s1 FR_poly_lo = FR_r, FR_Q4, FR_Q3 // poly_lo = r * Q4 + Q3 + nop.i 999 +} +{ .mfi + nop.m 999 +(p9) fmpy.s1 FR_rsq = FR_r, FR_r // rsq = r * r + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p8) fma.s1 FR_Y_lo = FR_wsq, FR_p4321, f0 // Y_lo = wsq * p4321 + nop.i 999 +} +{ .mfi + nop.m 999 +(p8) fma.s1 FR_Y_hi = FR_W, f1, f0 // Y_hi = w for near1 path + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fma.s1 FR_poly_lo = FR_poly_lo, FR_r, FR_Q2 // poly_lo = poly_lo * r + Q2 + nop.i 999 +} +{ .mfi + nop.m 999 +(p9) fma.s1 FR_rcub = FR_rsq, FR_r, f0 // rcub = r^3 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p8) fma.s1 FR_Y_lo = FR_w6, FR_p8765,FR_Y_lo // Y_lo = w6 * p8765 + w2 * p4321 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fma.s1 FR_poly_hi = FR_Q1, FR_rsq, FR_r // poly_hi = Q1 * rsq + r + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fma.s1 FR_poly_lo = FR_poly_lo, FR_rcub, FR_h // poly_lo = poly_lo*r^3 + h + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fadd.s1 FR_Y_lo = FR_poly_hi, FR_poly_lo // Y_lo = poly_hi + poly_lo + nop.i 999 +} +;; + +// Remainder of code is common for near1 and regular paths +{ .mfb + nop.m 999 + fadd.s0 f8 = FR_Y_lo,FR_Y_hi // Result=Y_lo+Y_hi + br.ret.sptk b0 // Common exit for 2^-80 < x < inf +} +;; + + +// Here if x=-1 +LOG1P_EQ_Minus_1: +// +// If x=-1 raise divide by zero and return -inf +// +{ .mfi + mov GR_Parameter_TAG = 138 + fsub.s1 FR_Output_X_tmp = f0, f1 + nop.i 999 +} +;; + +{ .mfb + nop.m 999 + frcpa.s0 FR_Output_X_tmp, p8 = FR_Output_X_tmp, f0 + br.cond.sptk __libm_error_region +} +;; + +LOG1P_special: +{ .mfi + nop.m 999 + fclass.m.unc p8, p0 = FR_Input_X, 0x1E1 // Test for natval, nan, +inf + nop.i 999 +} +;; + +// +// For SNaN raise invalid and return QNaN. +// For QNaN raise invalid and return QNaN. +// For +Inf return +Inf. +// +{ .mfb + nop.m 999 +(p8) fmpy.s0 f8 = FR_Input_X, f1 +(p8) br.ret.sptk b0 // Return for natval, nan, +inf +} +;; + +// +// For -Inf raise invalid and return QNaN. +// +{ .mfb + mov GR_Parameter_TAG = 139 + fmpy.s0 FR_Output_X_tmp = FR_Input_X, f0 + br.cond.sptk __libm_error_region +} +;; + + +LOG1P_unsupported: +// +// Return generated NaN or other value. +// +{ .mfb + nop.m 999 + fmpy.s0 f8 = FR_Input_X, f0 + br.ret.sptk b0 +} +;; + +// Here if -inf < x < -1 +LOG1P_LT_Minus_1: +// +// Deal with x < -1 in a special way - raise +// invalid and produce QNaN indefinite. +// +{ .mfb + mov GR_Parameter_TAG = 139 + frcpa.s0 FR_Output_X_tmp, p8 = f0, f0 + br.cond.sptk __libm_error_region +} +;; + + +GLOBAL_IEEE754_END(log1pl) + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfe [GR_Parameter_Y] = FR_Y,16 // Save Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; +.body +{ .mib + stfe [GR_Parameter_X] = FR_X // Store Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y + nop.b 0 // Parameter 3 address +} +{ .mib + stfe [GR_Parameter_Y] = FR_RESULT // Store Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + nop.m 999 + nop.m 999 + add GR_Parameter_RESULT = 48,sp +};; +{ .mmi + ldfe f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region#) + +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/s_logb.S b/sysdeps/ia64/fpu/s_logb.S new file mode 100644 index 0000000000..7ee898712b --- /dev/null +++ b/sysdeps/ia64/fpu/s_logb.S @@ -0,0 +1,281 @@ +.file "logb.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 02/16/00 Modified to conform to C9X +// 03/16/00 Improved speed +// 04/04/00 Unwind support added +// 05/30/00 Fixed bug when x double-extended denormal +// 08/15/00 Bundle added after call to __libm_error_support to properly +// set [the previously overwritten] GR_Parameter_RESULT. +// 05/20/02 Cleaned up namespace and sf0 syntax +// 01/20/03 Improved performance +// +// API +//============================================================== +// double logb( double x ); +// +// Overview of operation +//============================================================== +// The logb function extracts the exponent of x as an integer in +// floating-point format. +// logb computes log2 of x as a double +// +// logb is similar to ilogb but differs in the following ways: +// +-inf +// ilogb: returns INT_MAX +// logb: returns +inf +// Nan returns FP_LOGBNAN (which is either INT_MAX or INT_MIN) +// ilogb: returns INT_MAX (7fffffff) +// logb: returns QNAN (quietized SNAN) +// 0 returns FP_ILOGB0 (which is either INT_MIN or -INT_MAX) +// ilogb: returns -INT_MAX (80000001) +// logb: returns -inf, raises the divide-by-zero exception, +// and calls libm_error_support to set domain error +// +// Registers used +//============================================================== +// general registers used: +// r26 -> r38 +// r35 -> r38 used as parameters to error path +// +// predicate registers used: +// p6, p7, p8 +// floating-point registers used: +// f9, f10, f11 +// f8, input + +rExpBias = r26 +rExpMask = r27 +rSignexp_x = r28 +rExp_x = r29 +rTrueExp_x = r30 +rExp_2to64 = r31 + +GR_SAVE_PFS = r32 +GR_SAVE_B0 = r33 +GR_SAVE_GP = r34 + +GR_Parameter_X = r35 +GR_Parameter_Y = r36 +GR_Parameter_RESULT = r37 +GR_Parameter_TAG = r38 + +fExp_in_signif = f9 +fNorm_x = f10 +fFloat_Exp = f10 +f2to64 = f11 + +.section .text +GLOBAL_LIBM_ENTRY(logb) + +// X NORMAL +// TrueExp_x = exp(f8) - 0xffff +// sig = TrueExp_x +// f8 = convert_to_fp (sig)) +{ .mfi + getf.exp rSignexp_x = f8 + fclass.m p8,p0 = f8, 0x0b // Test for x unorm + mov rExpBias = 0xffff // Exponent bias +} +{ .mfi + nop.m 0 + fnorm.s1 fNorm_x = f8 + mov rExpMask = 0x1ffff // Exponent mask +} +;; + +// Form signexp of 2^64 in case need to scale denormal +{ .mfb + mov rExp_2to64 = 0x1003f + fclass.m p6,p0 = f8, 0x1e3 // Test x natval, nan, inf +(p8) br.cond.spnt LOGB_DENORM // Branch if x unorm +} +;; + +LOGB_COMMON: +// Return here from LOGB_DENORM +{ .mfi + and rExp_x = rSignexp_x, rExpMask // Get biased exponent + fclass.m p7,p0 = f8, 0x07 // Test x zero + nop.i 0 +} +;; + +// X NAN or INFINITY, return f8 * f8 +{ .mfb + sub rTrueExp_x = rExp_x, rExpBias // Get true exponent +(p6) fma.d.s0 f8= f8,f8,f0 // Result if x natval, nan, inf +(p6) br.ret.spnt b0 // Exit if x natval, nan, inf +} +;; + +{ .mib + setf.sig fExp_in_signif = rTrueExp_x // Exponent as integer in fp + nop.i 999 +(p7) br.cond.spnt LOGB_ZERO +} +;; + +// Result can be represented in less than 24 bits, so no precision completer +// is needed. +{ .mfb + nop.m 0 + fcvt.xf f8 = fExp_in_signif + br.ret.sptk b0 // Exit main path, 0 < |x| < inf +} +;; + +LOGB_DENORM: +// Form 2^64 in case need to scale denormal +// Check to see if double-extended denormal +{ .mfi + setf.exp f2to64 = rExp_2to64 + fclass.m p8,p0 = fNorm_x, 0x0b + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcmp.eq.s0 p7,p0 = f8, f0 // Dummy op to set denormal flag + nop.i 0 +} +;; + +// If double-extended denormal add 64 to exponent bias for scaling +// If double-extended denormal form x * 2^64 which is normal +{ .mfi +(p8) add rExpBias = 64, rExpBias +(p8) fmpy.s1 fNorm_x = fNorm_x, f2to64 + nop.i 0 +} +;; + +// Logic is the same as normal path but use normalized input +{ .mib + getf.exp rSignexp_x = fNorm_x + nop.i 0 + br.cond.sptk LOGB_COMMON // Return to main path +} +;; + +LOGB_ZERO: +// Here if x zero +// f10 = -|f8| +// f9 = 1.0/f10 = -1.0/|f8| = -inf + +{ .mmf + alloc r32=ar.pfs,1,2,4,0 + mov GR_Parameter_TAG = 151 // Error code + fmerge.ns f10 = f0,f8 +} +;; + +{ .mfb + nop.m 0 + frcpa.s0 f9,p6 = f1,f10 // Produce -inf, Z flag + br.cond.sptk __libm_error_region // Call error support +} +;; + +GLOBAL_LIBM_END(logb) + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue + +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; + +{ .mmi + stfd [GR_Parameter_Y] = f0,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; + +.body +{ .mib + stfd [GR_Parameter_X] = f8 // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfd [GR_Parameter_Y] = f9 // Store Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; + +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; + +{ .mmi + ldfd f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; + +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 +};; + +LOCAL_LIBM_END(__libm_error_region) + + +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/s_logbf.S b/sysdeps/ia64/fpu/s_logbf.S new file mode 100644 index 0000000000..eefa270db9 --- /dev/null +++ b/sysdeps/ia64/fpu/s_logbf.S @@ -0,0 +1,281 @@ +.file "logbf.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 02/16/00 Modified to conform to C9X +// 03/16/00 Improved speed +// 04/04/00 Unwind support added +// 05/30/00 Fixed bug when x double-extended denormal +// 08/15/00 Bundle added after call to __libm_error_support to properly +// set [the previously overwritten] GR_Parameter_RESULT. +// 05/20/02 Cleaned up namespace and sf0 syntax +// 01/20/03 Improved performance +// +// API +//============================================================== +// float logbf( float x ); +// +// Overview of operation +//============================================================== +// The logbf function extracts the exponent of x as an integer in +// floating-point format. +// logbf computes log2 of x as a float +// +// logbf is similar to ilogbf but differs in the following ways: +// +-inf +// ilogbf: returns INT_MAX +// logbf: returns +inf +// Nan returns FP_LOGBNAN (which is either INT_MAX or INT_MIN) +// ilogbf: returns INT_MAX (7fffffff) +// logbf: returns QNAN (quietized SNAN) +// 0 returns FP_ILOGB0 (which is either INT_MIN or -INT_MAX) +// ilogbf: returns -INT_MAX (80000001) +// logbf: returns -inf, raises the divide-by-zero exception, +// and calls libm_error_support to set domain error +// +// Registers used +//============================================================== +// general registers used: +// r26 -> r38 +// r35 -> r38 used as parameters to error path +// +// predicate registers used: +// p6, p7, p8 +// floating-point registers used: +// f9, f10, f11 +// f8, input + +rExpBias = r26 +rExpMask = r27 +rSignexp_x = r28 +rExp_x = r29 +rTrueExp_x = r30 +rExp_2to64 = r31 + +GR_SAVE_PFS = r32 +GR_SAVE_B0 = r33 +GR_SAVE_GP = r34 + +GR_Parameter_X = r35 +GR_Parameter_Y = r36 +GR_Parameter_RESULT = r37 +GR_Parameter_TAG = r38 + +fExp_in_signif = f9 +fNorm_x = f10 +fFloat_Exp = f10 +f2to64 = f11 + +.section .text +GLOBAL_LIBM_ENTRY(logbf) + +// X NORMAL +// TrueExp_x = exp(f8) - 0xffff +// sig = TrueExp_x +// f8 = convert_to_fp (sig)) +{ .mfi + getf.exp rSignexp_x = f8 + fclass.m p8,p0 = f8, 0x0b // Test for x unorm + mov rExpBias = 0xffff // Exponent bias +} +{ .mfi + nop.m 0 + fnorm.s1 fNorm_x = f8 + mov rExpMask = 0x1ffff // Exponent mask +} +;; + +// Form signexp of 2^64 in case need to scale denormal +{ .mfb + mov rExp_2to64 = 0x1003f + fclass.m p6,p0 = f8, 0x1e3 // Test x natval, nan, inf +(p8) br.cond.spnt LOGB_DENORM // Branch if x unorm +} +;; + +LOGB_COMMON: +// Return here from LOGB_DENORM +{ .mfi + and rExp_x = rSignexp_x, rExpMask // Get biased exponent + fclass.m p7,p0 = f8, 0x07 // Test x zero + nop.i 0 +} +;; + +// X NAN or INFINITY, return f8 * f8 +{ .mfb + sub rTrueExp_x = rExp_x, rExpBias // Get true exponent +(p6) fma.s.s0 f8= f8,f8,f0 // Result if x natval, nan, inf +(p6) br.ret.spnt b0 // Exit if x natval, nan, inf +} +;; + +{ .mib + setf.sig fExp_in_signif = rTrueExp_x // Exponent as integer in fp + nop.i 999 +(p7) br.cond.spnt LOGB_ZERO +} +;; + +// Result can be represented in less than 24 bits, so no precision completer +// is needed. +{ .mfb + nop.m 0 + fcvt.xf f8 = fExp_in_signif + br.ret.sptk b0 // Exit main path, 0 < |x| < inf +} +;; + +LOGB_DENORM: +// Form 2^64 in case need to scale denormal +// Check to see if double-extended denormal +{ .mfi + setf.exp f2to64 = rExp_2to64 + fclass.m p8,p0 = fNorm_x, 0x0b + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcmp.eq.s0 p7,p0 = f8, f0 // Dummy op to set denormal flag + nop.i 0 +} +;; + +// If double-extended denormal add 64 to exponent bias for scaling +// If double-extended denormal form x * 2^64 which is normal +{ .mfi +(p8) add rExpBias = 64, rExpBias +(p8) fmpy.s1 fNorm_x = fNorm_x, f2to64 + nop.i 0 +} +;; + +// Logic is the same as normal path but use normalized input +{ .mib + getf.exp rSignexp_x = fNorm_x + nop.i 0 + br.cond.sptk LOGB_COMMON // Return to main path +} +;; + +LOGB_ZERO: +// Here if x zero +// f10 = -|f8| +// f9 = 1.0/f10 = -1.0/|f8| = -inf + +{ .mmf + alloc r32=ar.pfs,1,2,4,0 + mov GR_Parameter_TAG = 152 // Error code + fmerge.ns f10 = f0,f8 +} +;; + +{ .mfb + nop.m 0 + frcpa.s0 f9,p6 = f1,f10 // Produce -inf, Z flag + br.cond.sptk __libm_error_region // Call error support +} +;; + +GLOBAL_LIBM_END(logbf) + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue + +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; + +{ .mmi + stfs [GR_Parameter_Y] = f0,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; + +.body +{ .mib + stfs [GR_Parameter_X] = f8 // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfs [GR_Parameter_Y] = f9 // Store Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; + +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; + +{ .mmi + ldfs f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; + +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 +};; + +LOCAL_LIBM_END(__libm_error_region) + + +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/s_logbl.S b/sysdeps/ia64/fpu/s_logbl.S new file mode 100644 index 0000000000..e312c1b438 --- /dev/null +++ b/sysdeps/ia64/fpu/s_logbl.S @@ -0,0 +1,281 @@ +.file "logbl.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 02/16/00 Modified to conform to C9X +// 03/16/00 Improved speed +// 04/04/00 Unwind support added +// 05/30/00 Fixed bug when x double-extended denormal +// 08/15/00 Bundle added after call to __libm_error_support to properly +// set [the previously overwritten] GR_Parameter_RESULT. +// 05/20/02 Cleaned up namespace and sf0 syntax +// 01/20/03 Improved performance +// +// API +//============================================================== +// long double logbl( long double x ); +// +// Overview of operation +//============================================================== +// The logbl function extracts the exponent of x as an integer in +// floating-point format. +// logbl computes log2 of x as a long double +// +// logbl is similar to ilogbl but differs in the following ways: +// +-inf +// ilogbl: returns INT_MAX +// logbl: returns +inf +// Nan returns FP_LOGBNAN (which is either INT_MAX or INT_MIN) +// ilogbl: returns INT_MAX (7fffffff) +// logbl: returns QNAN (quietized SNAN) +// 0 returns FP_ILOGB0 (which is either INT_MIN or -INT_MAX) +// ilogbl: returns -INT_MAX (80000001) +// logbl: returns -inf, raises the divide-by-zero exception, +// and calls libm_error_support to set domain error +// +// Registers used +//============================================================== +// general registers used: +// r26 -> r38 +// r35 -> r38 used as parameters to error path +// +// predicate registers used: +// p6, p7, p8 +// floating-point registers used: +// f9, f10, f11 +// f8, input + +rExpBias = r26 +rExpMask = r27 +rSignexp_x = r28 +rExp_x = r29 +rTrueExp_x = r30 +rExp_2to64 = r31 + +GR_SAVE_PFS = r32 +GR_SAVE_B0 = r33 +GR_SAVE_GP = r34 + +GR_Parameter_X = r35 +GR_Parameter_Y = r36 +GR_Parameter_RESULT = r37 +GR_Parameter_TAG = r38 + +fExp_in_signif = f9 +fNorm_x = f10 +fFloat_Exp = f10 +f2to64 = f11 + +.section .text +GLOBAL_LIBM_ENTRY(logbl) + +// X NORMAL +// TrueExp_x = exp(f8) - 0xffff +// sig = TrueExp_x +// f8 = convert_to_fp (sig)) +{ .mfi + getf.exp rSignexp_x = f8 + fclass.m p8,p0 = f8, 0x0b // Test for x unorm + mov rExpBias = 0xffff // Exponent bias +} +{ .mfi + nop.m 0 + fnorm.s1 fNorm_x = f8 + mov rExpMask = 0x1ffff // Exponent mask +} +;; + +// Form signexp of 2^64 in case need to scale denormal +{ .mfb + mov rExp_2to64 = 0x1003f + fclass.m p6,p0 = f8, 0x1e3 // Test x natval, nan, inf +(p8) br.cond.spnt LOGB_DENORM // Branch if x unorm +} +;; + +LOGB_COMMON: +// Return here from LOGB_DENORM +{ .mfi + and rExp_x = rSignexp_x, rExpMask // Get biased exponent + fclass.m p7,p0 = f8, 0x07 // Test x zero + nop.i 0 +} +;; + +// X NAN or INFINITY, return f8 * f8 +{ .mfb + sub rTrueExp_x = rExp_x, rExpBias // Get true exponent +(p6) fma.s0 f8= f8,f8,f0 // Result if x natval, nan, inf +(p6) br.ret.spnt b0 // Exit if x natval, nan, inf +} +;; + +{ .mib + setf.sig fExp_in_signif = rTrueExp_x // Exponent as integer in fp + nop.i 999 +(p7) br.cond.spnt LOGB_ZERO +} +;; + +// Result can be represented in less than 24 bits, so no precision completer +// is needed. +{ .mfb + nop.m 0 + fcvt.xf f8 = fExp_in_signif + br.ret.sptk b0 // Exit main path, 0 < |x| < inf +} +;; + +LOGB_DENORM: +// Form 2^64 in case need to scale denormal +// Check to see if double-extended denormal +{ .mfi + setf.exp f2to64 = rExp_2to64 + fclass.m p8,p0 = fNorm_x, 0x0b + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcmp.eq.s0 p7,p0 = f8, f0 // Dummy op to set denormal flag + nop.i 0 +} +;; + +// If double-extended denormal add 64 to exponent bias for scaling +// If double-extended denormal form x * 2^64 which is normal +{ .mfi +(p8) add rExpBias = 64, rExpBias +(p8) fmpy.s1 fNorm_x = fNorm_x, f2to64 + nop.i 0 +} +;; + +// Logic is the same as normal path but use normalized input +{ .mib + getf.exp rSignexp_x = fNorm_x + nop.i 0 + br.cond.sptk LOGB_COMMON // Return to main path +} +;; + +LOGB_ZERO: +// Here if x zero +// f10 = -|f8| +// f9 = 1.0/f10 = -1.0/|f8| = -inf + +{ .mmf + alloc r32=ar.pfs,1,2,4,0 + mov GR_Parameter_TAG = 150 // Error code + fmerge.ns f10 = f0,f8 +} +;; + +{ .mfb + nop.m 0 + frcpa.s0 f9,p6 = f1,f10 // Produce -inf, Z flag + br.cond.sptk __libm_error_region // Call error support +} +;; + +GLOBAL_LIBM_END(logbl) + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue + +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; + +{ .mmi + stfe [GR_Parameter_Y] = f0,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; + +.body +{ .mib + stfe [GR_Parameter_X] = f8 // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfe [GR_Parameter_Y] = f9 // Store Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; + +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; + +{ .mmi + ldfe f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; + +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 +};; + +LOCAL_LIBM_END(__libm_error_region) + + +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/fpu/s_matherrf.c b/sysdeps/ia64/fpu/s_matherrf.c new file mode 100644 index 0000000000..4b3033ecc3 --- /dev/null +++ b/sysdeps/ia64/fpu/s_matherrf.c @@ -0,0 +1,33 @@ +/* Derived from: */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + + +#include "math.h" +#include "math_private.h" +#include "libm_support.h" + +#ifdef __STDC__ + int + weak_function + __matherrf(struct exceptionf *x) +#else + int + weak_function + __matherrf(x) + struct exceptionf *x; +#endif +{ + int n=0; + if(x->arg1!=x->arg1) return 0; + return n; +} +weak_alias (__matherrf, matherrf) diff --git a/sysdeps/ia64/fpu/s_matherrl.c b/sysdeps/ia64/fpu/s_matherrl.c new file mode 100644 index 0000000000..751cc6b51e --- /dev/null +++ b/sysdeps/ia64/fpu/s_matherrl.c @@ -0,0 +1,33 @@ +/* Derived from: */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + + +#include "math.h" +#include "math_private.h" +#include "libm_support.h" + +#ifdef __STDC__ + int + weak_function + __matherrl(struct exceptionl *x) +#else + int + weak_function + __matherrl(x) + struct exceptionl *x; +#endif +{ + int n=0; + if(x->arg1!=x->arg1) return 0; + return n; +} +weak_alias (__matherrl, matherrl) diff --git a/sysdeps/ia64/fpu/s_modf.S b/sysdeps/ia64/fpu/s_modf.S new file mode 100644 index 0000000000..2008bbfc5c --- /dev/null +++ b/sysdeps/ia64/fpu/s_modf.S @@ -0,0 +1,278 @@ +.file "modf.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 04/04/00 Improved speed, corrected result for NaN input +// 12/22/00 Fixed so inexact flag is never set, and invalid is not set for +// qnans nor for inputs larger than 2^63. +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// +// API +//============================================================== +// double modf(double x, double *iptr) +// break a floating point x number into fraction and an exponent +// +// input floating point f8, address in r33 +// output floating point f8 (x fraction), and *iptr (x integral part) +// +// OVERVIEW +//============================================================== +// +// NO FRACTIONAL PART: HUGE +// If +// for double-extended +// If the true exponent is greater than or equal 63 +// 1003e ==> 1003e -ffff = 3f = 63(dec) +// for double +// If the true exponent is greater than or equal 52 +// 10033 -ffff = 34 = 52(dec) +// for single +// If the true exponent is greater than or equal 23 +// 10016 -ffff = 17 = 23(dec) +// then +// we are already an integer (p9 true) + +// NO INTEGER PART: SMALL +// Is f8 exponent less than register bias (that is, is it +// less than 1). If it is, get the right sign of +// zero and store this in iptr. + +// CALCULATION: NOT HUGE, NOT SMALL +// To get the integer part +// Take the floating-point input and truncate +// then convert this integer to fp Call it MODF_INTEGER_PART + +// Subtract MODF_INTEGER_PART from MODF_NORM_F8 to get fraction part +// Then put fraction part in f8 +// put integer part MODF_INTEGER_PART into *iptr + +// Registers used +//============================================================== + +// predicate registers used: +// p6 - p13 + +// 0xFFFF 0x10033 +// -----------------------+-----------------+------------- +// SMALL | NORMAL | HUGE +// p11 --------------->|<----- p12 ----->| <-------------- p9 +// p10 --------------------------------->| +// p13 --------------------------------------------------->| +// + +// floating-point registers used: +MODF_NORM_F8 = f9 +MODF_FRACTION_PART = f10 +MODF_INTEGER_PART = f11 +MODF_INT_INTEGER_PART = f12 + + +// general registers used +modf_signexp = r14 +modf_GR_no_frac = r15 +modf_GR_FFFF = r16 +modf_17_ones = r17 +modf_exp = r18 +// r33 = iptr + + +.section .text +GLOBAL_LIBM_ENTRY(modf) + +// Main path is p9, p11, p8 FALSE and p12 TRUE + +// Assume input is normalized and get signexp +// Normalize input just in case +// Form exponent bias +{ .mfi + getf.exp modf_signexp = f8 + fnorm.s0 MODF_NORM_F8 = f8 + addl modf_GR_FFFF = 0xffff, r0 +} +// Get integer part of input +// Form exponent mask +{ .mfi + nop.m 999 + fcvt.fx.trunc.s1 MODF_INT_INTEGER_PART = f8 + mov modf_17_ones = 0x1ffff ;; +} + +// Is x nan or inf? +// qnan snan inf norm unorm 0 -+ +// 1 1 1 0 0 0 11 = 0xe3 NAN_INF +// Form biased exponent where input only has an integer part +{ .mfi + nop.m 999 + fclass.m.unc p6,p13 = f8, 0xe3 + addl modf_GR_no_frac = 0x10033, r0 ;; +} + +// Mask to get exponent +// Is x unnorm? +// qnan snan inf norm unorm 0 -+ +// 0 0 0 0 1 0 11 = 0x0b UNORM +// Set p13 to indicate calculation path, else p6 if nan or inf +{ .mfi + and modf_exp = modf_17_ones, modf_signexp + fclass.m.unc p8,p0 = f8, 0x0b + nop.i 999 ;; +} + +// p11 <== SMALL, no integer part, fraction is everyting +// p9 <== HUGE, no fraction part, integer is everything +// p12 <== NORMAL, fraction part and integer part +{ .mii +(p13) cmp.lt.unc p11,p10 = modf_exp, modf_GR_FFFF + nop.i 999 + nop.i 999 ;; +} + +// Is x inf? p6 if inf, p7 if nan +{ .mfb +(p10) cmp.ge.unc p9,p12 = modf_exp, modf_GR_no_frac +(p6) fclass.m.unc p6,p7 = f8, 0x23 +(p8) br.cond.spnt MODF_DENORM ;; +} + +MODF_COMMON: +// For HUGE set fraction to signed 0 +{ .mfi + nop.m 999 +(p9) fmerge.s f8 = f8,f0 + nop.i 999 +} +// For HUGE set integer part to normalized input +{ .mfi + nop.m 999 +(p9) fnorm.d.s0 MODF_INTEGER_PART = MODF_NORM_F8 + nop.i 999 ;; +} + +// For SMALL set fraction to normalized input, integer part to signed 0 +{ .mfi + nop.m 999 +(p11) fmerge.s MODF_INTEGER_PART = f8,f0 + nop.i 999 +} +{ .mfi + nop.m 999 +(p11) fnorm.d.s0 f8 = MODF_NORM_F8 + nop.i 999 ;; +} + +// For NORMAL float the integer part +{ .mfi + nop.m 999 +(p12) fcvt.xf MODF_INTEGER_PART = MODF_INT_INTEGER_PART + nop.i 999 ;; +} + +// If x inf set integer part to INF, fraction to signed 0 +{ .mfi +(p6) stfd [r33] = MODF_NORM_F8 +(p6) fmerge.s f8 = f8,f0 + nop.i 999 ;; +} + +// If x nan set integer and fraction parts to NaN (quietized) +{ .mfi +(p7) stfd [r33] = MODF_NORM_F8 +(p7) fmerge.s f8 = MODF_NORM_F8, MODF_NORM_F8 + nop.i 999 ;; +} + +{ .mmi +(p9) stfd [r33] = MODF_INTEGER_PART + nop.m 999 + nop.i 999 ;; +} + +// For NORMAL compute fraction part +{ .mfi +(p11) stfd [r33] = MODF_INTEGER_PART +(p12) fms.d.s0 f8 = MODF_NORM_F8,f1, MODF_INTEGER_PART + nop.i 999 ;; +} + +// For NORMAL test if fraction part is zero; if so append correct sign +{ .mfi + nop.m 999 +(p12) fcmp.eq.unc.s0 p7,p0 = MODF_NORM_F8, MODF_INTEGER_PART + nop.i 999 ;; +} + +{ .mfi +(p12) stfd [r33] = MODF_INTEGER_PART + nop.f 999 + nop.i 999 ;; +} + +// For NORMAL if fraction part is zero append sign of input +{ .mfb + nop.m 999 +(p7) fmerge.s f8 = MODF_NORM_F8, f0 + br.ret.sptk b0 ;; +} + +MODF_DENORM: +// If x unorm get signexp from normalized input +// If x unorm get integer part from normalized input +{ .mfi + getf.exp modf_signexp = MODF_NORM_F8 + fcvt.fx.trunc.s1 MODF_INT_INTEGER_PART = MODF_NORM_F8 + nop.i 999 ;; +} + +// If x unorm mask to get exponent +{ .mmi + and modf_exp = modf_17_ones, modf_signexp ;; + cmp.lt.unc p11,p10 = modf_exp, modf_GR_FFFF + nop.i 999 ;; +} + +{ .mfb +(p10) cmp.ge.unc p9,p12 = modf_exp, modf_GR_no_frac + nop.f 999 + br.cond.spnt MODF_COMMON ;; +} + +GLOBAL_LIBM_END(modf) diff --git a/sysdeps/ia64/fpu/s_modff.S b/sysdeps/ia64/fpu/s_modff.S new file mode 100644 index 0000000000..edc1120971 --- /dev/null +++ b/sysdeps/ia64/fpu/s_modff.S @@ -0,0 +1,278 @@ +.file "modff.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 04/04/00 Improved speed, corrected result for NaN input +// 12/22/00 Fixed so inexact flag is never set, and invalid is not set for +// qnans nor for inputs larger than 2^63. +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// +// API +//============================================================== +// float modff(float x, float *iptr) +// break a floating point x number into fraction and an exponent +// +// input floating point f8, address in r33 +// output floating point f8 (x fraction), and *iptr (x integral part) +// +// OVERVIEW +//============================================================== + +// NO FRACTIONAL PART: HUGE +// If +// for double-extended +// If the true exponent is greater than or equal 63 +// 1003e ==> 1003e -ffff = 3f = 63(dec) +// for double +// If the true exponent is greater than or equal 52 +// 10033 -ffff = 34 = 52(dec) +// for single +// If the true exponent is greater than or equal 23 +// 10016 -ffff = 17 = 23(dec) +// then +// we are already an integer (p9 true) + +// NO INTEGER PART: SMALL +// Is f8 exponent less than register bias (that is, is it +// less than 1). If it is, get the right sign of +// zero and store this in iptr. + +// CALCULATION: NOT HUGE, NOT SMALL +// To get the integer part +// Take the floating-point input and truncate +// then convert this integer to fp Call it MODF_INTEGER_PART + +// Subtract MODF_INTEGER_PART from MODF_NORM_F8 to get fraction part +// Then put fraction part in f8 +// put integer part MODF_INTEGER_PART into *iptr + +// Registers used +//============================================================== + +// predicate registers used: +// p6 - p13 + +// 0xFFFF 0x10016 +// -----------------------+-----------------+------------- +// SMALL | NORMAL | HUGE +// p11 --------------->|<----- p12 ----->| <-------------- p9 +// p10 --------------------------------->| +// p13 --------------------------------------------------->| +// + +// floating-point registers used: +MODF_NORM_F8 = f9 +MODF_FRACTION_PART = f10 +MODF_INTEGER_PART = f11 +MODF_INT_INTEGER_PART = f12 + + +// general registers used +modf_signexp = r14 +modf_GR_no_frac = r15 +modf_GR_FFFF = r16 +modf_17_ones = r17 +modf_exp = r18 +// r33 = iptr + + +.section .text +GLOBAL_LIBM_ENTRY(modff) + +// Main path is p9, p11, p8 FALSE and p12 TRUE + +// Assume input is normalized and get signexp +// Normalize input just in case +// Form exponent bias +{ .mfi + getf.exp modf_signexp = f8 + fnorm.s0 MODF_NORM_F8 = f8 + addl modf_GR_FFFF = 0xffff, r0 +} +// Get integer part of input +// Form exponent mask +{ .mfi + nop.m 999 + fcvt.fx.trunc.s1 MODF_INT_INTEGER_PART = f8 + mov modf_17_ones = 0x1ffff ;; +} + +// Is x nan or inf? +// qnan snan inf norm unorm 0 -+ +// 1 1 1 0 0 0 11 = 0xe3 NAN_INF +// Form biased exponent where input only has an integer part +{ .mfi + nop.m 999 + fclass.m.unc p6,p13 = f8, 0xe3 + addl modf_GR_no_frac = 0x10016, r0 ;; +} + +// Mask to get exponent +// Is x unnorm? +// qnan snan inf norm unorm 0 -+ +// 0 0 0 0 1 0 11 = 0x0b UNORM +// Set p13 to indicate calculation path, else p6 if nan or inf +{ .mfi + and modf_exp = modf_17_ones, modf_signexp + fclass.m.unc p8,p0 = f8, 0x0b + nop.i 999 ;; +} + +// p11 <== SMALL, no integer part, fraction is everyting +// p9 <== HUGE, no fraction part, integer is everything +// p12 <== NORMAL, fraction part and integer part +{ .mii +(p13) cmp.lt.unc p11,p10 = modf_exp, modf_GR_FFFF + nop.i 999 + nop.i 999 ;; +} + +// Is x inf? p6 if inf, p7 if nan +{ .mfb +(p10) cmp.ge.unc p9,p12 = modf_exp, modf_GR_no_frac +(p6) fclass.m.unc p6,p7 = f8, 0x23 +(p8) br.cond.spnt MODF_DENORM ;; +} + +MODF_COMMON: +// For HUGE set fraction to signed 0 +{ .mfi + nop.m 999 +(p9) fmerge.s f8 = f8,f0 + nop.i 999 +} +// For HUGE set integer part to normalized input +{ .mfi + nop.m 999 +(p9) fnorm.s.s0 MODF_INTEGER_PART = MODF_NORM_F8 + nop.i 999 ;; +} + +// For SMALL set fraction to normalized input, integer part to signed 0 +{ .mfi + nop.m 999 +(p11) fmerge.s MODF_INTEGER_PART = f8,f0 + nop.i 999 +} +{ .mfi + nop.m 999 +(p11) fnorm.s.s0 f8 = MODF_NORM_F8 + nop.i 999 ;; +} + +// For NORMAL float the integer part +{ .mfi + nop.m 999 +(p12) fcvt.xf MODF_INTEGER_PART = MODF_INT_INTEGER_PART + nop.i 999 ;; +} + +// If x inf set integer part to INF, fraction to signed 0 +{ .mfi +(p6) stfs [r33] = MODF_NORM_F8 +(p6) fmerge.s f8 = f8,f0 + nop.i 999 ;; +} + +// If x nan set integer and fraction parts to NaN (quietized) +{ .mfi +(p7) stfs [r33] = MODF_NORM_F8 +(p7) fmerge.s f8 = MODF_NORM_F8, MODF_NORM_F8 + nop.i 999 ;; +} + +{ .mmi +(p9) stfs [r33] = MODF_INTEGER_PART + nop.m 999 + nop.i 999 ;; +} + +// For NORMAL compute fraction part +{ .mfi +(p11) stfs [r33] = MODF_INTEGER_PART +(p12) fms.s.s0 f8 = MODF_NORM_F8,f1, MODF_INTEGER_PART + nop.i 999 ;; +} + +// For NORMAL test if fraction part is zero; if so append correct sign +{ .mfi + nop.m 999 +(p12) fcmp.eq.unc.s0 p7,p0 = MODF_NORM_F8, MODF_INTEGER_PART + nop.i 999 ;; +} + +{ .mfi +(p12) stfs [r33] = MODF_INTEGER_PART + nop.f 999 + nop.i 999 ;; +} + +// For NORMAL if fraction part is zero append sign of input +{ .mfb + nop.m 999 +(p7) fmerge.s f8 = MODF_NORM_F8, f0 + br.ret.sptk b0 ;; +} + +MODF_DENORM: +// If x unorm get signexp from normalized input +// If x unorm get integer part from normalized input +{ .mfi + getf.exp modf_signexp = MODF_NORM_F8 + fcvt.fx.trunc.s1 MODF_INT_INTEGER_PART = MODF_NORM_F8 + nop.i 999 ;; +} + +// If x unorm mask to get exponent +{ .mmi + and modf_exp = modf_17_ones, modf_signexp ;; + cmp.lt.unc p11,p10 = modf_exp, modf_GR_FFFF + nop.i 999 ;; +} + +{ .mfb +(p10) cmp.ge.unc p9,p12 = modf_exp, modf_GR_no_frac + nop.f 999 + br.cond.spnt MODF_COMMON ;; +} + +GLOBAL_LIBM_END(modff) diff --git a/sysdeps/ia64/fpu/s_modfl.S b/sysdeps/ia64/fpu/s_modfl.S new file mode 100644 index 0000000000..eaf410cb6c --- /dev/null +++ b/sysdeps/ia64/fpu/s_modfl.S @@ -0,0 +1,273 @@ +.file "modfl.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 04/04/00 Improved speed, corrected result for NaN input +// 05/30/00 Fixed bug for exponent 0x1003e +// 12/22/00 Fixed so inexact flag is never set, and invalid is not set for +// qnans nor for inputs larger than 2^63. +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// +// API +//============================================================== +// long double modfl(long double x, long double *iptr) +// break a floating point x number into fraction and an exponent +// +// input floating point f8, address in r34 +// output floating point f8 (x fraction), and *iptr (x integral part) +// +// OVERVIEW +//============================================================== +// +// NO FRACTIONAL PART: HUGE +// If +// for double-extended +// If the true exponent is >= 63 +// 1003e ==> 1003e -ffff = 3f = 63(dec) +// then +// we are already an integer (p9 true) + +// NO INTEGER PART: SMALL +// Is f8 exponent less than register bias (that is, is it +// less than 1). If it is, get the right sign of +// zero and store this in iptr. + +// CALCULATION: NOT HUGE, NOT SMALL +// To get the integer part +// Take the floating-point input and truncate +// then convert this integer to fp Call it MODF_INTEGER_PART + +// Subtract MODF_INTEGER_PART from MODF_NORM_F8 to get fraction part +// Then put fraction part in f8 +// put integer part MODF_INTEGER_PART into *iptr + +// Registers used +//============================================================== + +// predicate registers used: +// p6 - p13 + +// 0xFFFF 0x1003e +// -----------------------+-----------------+------------- +// SMALL | NORMAL | HUGE +// p11 --------------->|<----- p12 ----->| <-------------- p9 +// p10 --------------------------------->| +// p13 --------------------------------------------------->| +// + +// floating-point registers used: +MODF_NORM_F8 = f9 +MODF_FRACTION_PART = f10 +MODF_INTEGER_PART = f11 +MODF_INT_INTEGER_PART = f12 + + +// general registers used +modf_signexp = r14 +modf_GR_no_frac = r15 +modf_GR_FFFF = r16 +modf_17_ones = r17 +modf_exp = r18 +// r34 = iptr + + +.section .text +GLOBAL_LIBM_ENTRY(modfl) + +// Main path is p9, p11, p8 FALSE and p12 TRUE + +// Assume input is normalized and get signexp +// Normalize input just in case +// Form exponent bias +{ .mfi + getf.exp modf_signexp = f8 + fnorm.s0 MODF_NORM_F8 = f8 + addl modf_GR_FFFF = 0xffff, r0 +} +// Get integer part of input +// Form exponent mask +{ .mfi + nop.m 999 + fcvt.fx.trunc.s1 MODF_INT_INTEGER_PART = f8 + mov modf_17_ones = 0x1ffff ;; +} + +// Is x nan or inf? +// qnan snan inf norm unorm 0 -+ +// 1 1 1 0 0 0 11 = 0xe3 NAN_INF +// Form biased exponent where input only has an integer part +{ .mfi + nop.m 999 + fclass.m.unc p6,p13 = f8, 0xe3 + addl modf_GR_no_frac = 0x1003e, r0 ;; +} + +// Mask to get exponent +// Is x unnorm? +// qnan snan inf norm unorm 0 -+ +// 0 0 0 0 1 0 11 = 0x0b UNORM +// Set p13 to indicate calculation path, else p6 if nan or inf +{ .mfi + and modf_exp = modf_17_ones, modf_signexp + fclass.m.unc p8,p0 = f8, 0x0b + nop.i 999 ;; +} + +// p11 <== SMALL, no integer part, fraction is everyting +// p9 <== HUGE, no fraction part, integer is everything +// p12 <== NORMAL, fraction part and integer part +{ .mii +(p13) cmp.lt.unc p11,p10 = modf_exp, modf_GR_FFFF + nop.i 999 + nop.i 999 ;; +} + +// Is x inf? p6 if inf, p7 if nan +{ .mfb +(p10) cmp.ge.unc p9,p12 = modf_exp, modf_GR_no_frac +(p6) fclass.m.unc p6,p7 = f8, 0x23 +(p8) br.cond.spnt MODF_DENORM ;; +} + +MODF_COMMON: +// For HUGE set fraction to signed 0 +{ .mfi + nop.m 999 +(p9) fmerge.s f8 = f8,f0 + nop.i 999 +} +// For HUGE set integer part to normalized input +{ .mfi + nop.m 999 +(p9) fnorm.s0 MODF_INTEGER_PART = MODF_NORM_F8 + nop.i 999 ;; +} + +// For SMALL set fraction to normalized input, integer part to signed 0 +{ .mfi + nop.m 999 +(p11) fmerge.s MODF_INTEGER_PART = f8,f0 + nop.i 999 +} +{ .mfi + nop.m 999 +(p11) fnorm.s0 f8 = MODF_NORM_F8 + nop.i 999 ;; +} + +// For NORMAL float the integer part +{ .mfi + nop.m 999 +(p12) fcvt.xf MODF_INTEGER_PART = MODF_INT_INTEGER_PART + nop.i 999 ;; +} + +// If x inf set integer part to INF, fraction to signed 0 +{ .mfi +(p6) stfe [r34] = MODF_NORM_F8 +(p6) fmerge.s f8 = f8,f0 + nop.i 999 ;; +} + +// If x nan set integer and fraction parts to NaN (quietized) +{ .mfi +(p7) stfe [r34] = MODF_NORM_F8 +(p7) fmerge.s f8 = MODF_NORM_F8, MODF_NORM_F8 + nop.i 999 ;; +} + +{ .mmi +(p9) stfe [r34] = MODF_INTEGER_PART + nop.m 999 + nop.i 999 ;; +} + +// For NORMAL compute fraction part +{ .mfi +(p11) stfe [r34] = MODF_INTEGER_PART +(p12) fms.s0 f8 = MODF_NORM_F8,f1, MODF_INTEGER_PART + nop.i 999 ;; +} + +// For NORMAL test if fraction part is zero; if so append correct sign +{ .mfi + nop.m 999 +(p12) fcmp.eq.unc.s0 p7,p0 = MODF_NORM_F8, MODF_INTEGER_PART + nop.i 999 ;; +} + +{ .mfi +(p12) stfe [r34] = MODF_INTEGER_PART + nop.f 999 + nop.i 999 ;; +} + +// For NORMAL if fraction part is zero append sign of input +{ .mfb + nop.m 999 +(p7) fmerge.s f8 = MODF_NORM_F8, f0 + br.ret.sptk b0 ;; +} + +MODF_DENORM: +// If x unorm get signexp from normalized input +// If x unorm get integer part from normalized input +{ .mfi + getf.exp modf_signexp = MODF_NORM_F8 + fcvt.fx.trunc.s1 MODF_INT_INTEGER_PART = MODF_NORM_F8 + nop.i 999 ;; +} + +// If x unorm mask to get exponent +{ .mmi + and modf_exp = modf_17_ones, modf_signexp ;; + cmp.lt.unc p11,p10 = modf_exp, modf_GR_FFFF + nop.i 999 ;; +} + +{ .mfb +(p10) cmp.ge.unc p9,p12 = modf_exp, modf_GR_no_frac + nop.f 999 + br.cond.spnt MODF_COMMON ;; +} + +GLOBAL_LIBM_END(modfl) diff --git a/sysdeps/ia64/fpu/s_nearbyint.S b/sysdeps/ia64/fpu/s_nearbyint.S new file mode 100644 index 0000000000..ec1ff22dbc --- /dev/null +++ b/sysdeps/ia64/fpu/s_nearbyint.S @@ -0,0 +1,217 @@ +.file "nearbyint.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 10/19/00 Created +// 02/08/01 Corrected behavior for all rounding modes. +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// 07/25/03 Improved performance +//============================================================== + +// API +//============================================================== +// double nearbyint(double x) +//============================================================== + +// general input registers: +// r14 - r21 + +rSignexp = r14 +rExp = r15 +rExpMask = r16 +rBigexp = r17 +rFpsr = r19 +rRcs0 = r20 +rRcs0Mask = r21 + +// floating-point registers: +// f8 - f10 + +fXInt = f9 +fNormX = f10 + +// predicate registers used: +// p6 - p10 + +// Overview of operation +//============================================================== +// double nearbyint(double x) +// Return an integer value (represented as a double) that is x +// rounded to integer in current rounding mode +// Inexact is not set, otherwise result identical with rint. +//============================================================== + +// double_extended +// if the exponent is > 1003e => 3F(true) = 63(decimal) +// we have a significand of 64 bits 1.63-bits. +// If we multiply by 2^63, we no longer have a fractional part +// So input is an integer value already. + +// double +// if the exponent is >= 10033 => 34(true) = 52(decimal) +// 34 + 3ff = 433 +// we have a significand of 53 bits 1.52-bits. (implicit 1) +// If we multiply by 2^52, we no longer have a fractional part +// So input is an integer value already. + +// single +// if the exponent is > 10016 => 17(true) = 23(decimal) +// we have a significand of 24 bits 1.23-bits. (implicit 1) +// If we multiply by 2^23, we no longer have a fractional part +// So input is an integer value already. + +.section .text +GLOBAL_LIBM_ENTRY(nearbyint) + +{ .mfi + getf.exp rSignexp = f8 // Get signexp, recompute if unorm + fclass.m p7,p0 = f8, 0x0b // Test x unorm + addl rBigexp = 0x10033, r0 // Set exponent at which is integer +} +{ .mfi + nop.m 0 + fcvt.fx.s1 fXInt = f8 // Convert to int in significand + mov rExpMask = 0x1FFFF // Form exponent mask +} +;; + +{ .mfi + mov rFpsr = ar40 // Read fpsr -- check rc.s0 + fclass.m p6,p0 = f8, 0x1e3 // Test x natval, nan, inf + nop.i 0 +} +{ .mfb + nop.m 0 + fnorm.s1 fNormX = f8 // Normalize input +(p7) br.cond.spnt RINT_UNORM // Branch if x unorm +} +;; + + +RINT_COMMON: +// Return here from RINT_UNORM +{ .mfb + and rExp = rSignexp, rExpMask // Get biased exponent +(p6) fma.d.s0 f8 = f8, f1, f0 // Result if x natval, nan, inf +(p6) br.ret.spnt b0 // Exit if x natval, nan, inf +} +;; + +{ .mfi + mov rRcs0Mask = 0x0c00 // Mask for rc.s0 + fcvt.xf f8 = fXInt // Result assume |x| < 2^52 + cmp.ge p7,p8 = rExp, rBigexp // Is |x| >= 2^52? +} +;; + +// We must correct result if |x| >= 2^52 +{ .mfi + nop.m 0 +(p7) fma.d.s0 f8 = fNormX, f1, f0 // If |x| >= 2^52, result x + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p8) fmerge.s f8 = fNormX, f8 // Make sign nearbyint(x) = sign x + nop.i 0 +} +;; + +{ .mfi +(p8) and rRcs0 = rFpsr, rRcs0Mask // Get rounding mode for sf0 + nop.f 0 + nop.i 0 +} +;; + +// If |x| < 2^52 we must test for other rounding modes +{ .mbb +(p8) cmp.ne.unc p10,p0 = rRcs0, r0 // Test for other rounding modes +(p10) br.cond.spnt RINT_NOT_ROUND_NEAREST // Branch if not round nearest + br.ret.sptk b0 // Exit main path if round nearest +} +;; + + +RINT_UNORM: +// Here if x unorm +{ .mfb + getf.exp rSignexp = fNormX // Get signexp, recompute if unorm + fcmp.eq.s0 p7,p0 = f8, f0 // Dummy op to set denormal flag + br.cond.sptk RINT_COMMON // Return to main path +} +;; + +RINT_NOT_ROUND_NEAREST: +// Here if not round to nearest, and |x| < 2^52 +// Set rounding mode of s2 to that of s0, and repeat the conversion using s2 +{ .mfi + nop.m 0 + fsetc.s2 0x7f, 0x40 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcvt.fx.s2 fXInt = fNormX // Convert to int in significand + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcvt.xf f8 = fXInt // Expected result + nop.i 0 +} +;; + +// Be sure sign of result = sign of input. Fixes cases where result is 0. +{ .mfb + nop.m 0 + fmerge.s f8 = fNormX, f8 + br.ret.sptk b0 // Exit main path +} +;; + +GLOBAL_LIBM_END(nearbyint) diff --git a/sysdeps/ia64/fpu/s_nearbyintf.S b/sysdeps/ia64/fpu/s_nearbyintf.S new file mode 100644 index 0000000000..aac7b5c126 --- /dev/null +++ b/sysdeps/ia64/fpu/s_nearbyintf.S @@ -0,0 +1,217 @@ +.file "nearbyintf.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 10/19/00 Created +// 02/08/01 Corrected behavior for all rounding modes. +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// 07/25/03 Improved performance +//============================================================== + +// API +//============================================================== +// float nearbyintf(float x) +//============================================================== + +// general input registers: +// r14 - r21 + +rSignexp = r14 +rExp = r15 +rExpMask = r16 +rBigexp = r17 +rFpsr = r19 +rRcs0 = r20 +rRcs0Mask = r21 + +// floating-point registers: +// f8 - f10 + +fXInt = f9 +fNormX = f10 + +// predicate registers used: +// p6 - p10 + +// Overview of operation +//============================================================== +// float nearbyintf(float x) +// Return an integer value (represented as a float) that is x +// rounded to integer in current rounding mode +// Inexact is not set, otherwise result identical with rint. +//============================================================== + +// double_extended +// if the exponent is > 1003e => 3F(true) = 63(decimal) +// we have a significand of 64 bits 1.63-bits. +// If we multiply by 2^63, we no longer have a fractional part +// So input is an integer value already. + +// double +// if the exponent is >= 10033 => 34(true) = 52(decimal) +// 34 + 3ff = 433 +// we have a significand of 53 bits 1.52-bits. (implicit 1) +// If we multiply by 2^52, we no longer have a fractional part +// So input is an integer value already. + +// single +// if the exponent is > 10016 => 17(true) = 23(decimal) +// we have a significand of 24 bits 1.23-bits. (implicit 1) +// If we multiply by 2^23, we no longer have a fractional part +// So input is an integer value already. + +.section .text +GLOBAL_LIBM_ENTRY(nearbyintf) + +{ .mfi + getf.exp rSignexp = f8 // Get signexp, recompute if unorm + fclass.m p7,p0 = f8, 0x0b // Test x unorm + addl rBigexp = 0x10016, r0 // Set exponent at which is integer +} +{ .mfi + nop.m 0 + fcvt.fx.s1 fXInt = f8 // Convert to int in significand + mov rExpMask = 0x1FFFF // Form exponent mask +} +;; + +{ .mfi + mov rFpsr = ar40 // Read fpsr -- check rc.s0 + fclass.m p6,p0 = f8, 0x1e3 // Test x natval, nan, inf + nop.i 0 +} +{ .mfb + nop.m 0 + fnorm.s1 fNormX = f8 // Normalize input +(p7) br.cond.spnt RINT_UNORM // Branch if x unorm +} +;; + + +RINT_COMMON: +// Return here from RINT_UNORM +{ .mfb + and rExp = rSignexp, rExpMask // Get biased exponent +(p6) fma.s.s0 f8 = f8, f1, f0 // Result if x natval, nan, inf +(p6) br.ret.spnt b0 // Exit if x natval, nan, inf +} +;; + +{ .mfi + mov rRcs0Mask = 0x0c00 // Mask for rc.s0 + fcvt.xf f8 = fXInt // Result assume |x| < 2^23 + cmp.ge p7,p8 = rExp, rBigexp // Is |x| >= 2^23? +} +;; + +// We must correct result if |x| >= 2^23 +{ .mfi + nop.m 0 +(p7) fma.s.s0 f8 = fNormX, f1, f0 // If |x| >= 2^23, result x + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p8) fmerge.s f8 = fNormX, f8 // Make sign nearbyintf(x)= sign x + nop.i 0 +} +;; + +{ .mfi +(p8) and rRcs0 = rFpsr, rRcs0Mask // Get rounding mode for sf0 + nop.f 0 + nop.i 0 +} +;; + +// If |x| < 2^23 we must test for other rounding modes +{ .mbb +(p8) cmp.ne.unc p10,p0 = rRcs0, r0 // Test for other rounding modes +(p10) br.cond.spnt RINT_NOT_ROUND_NEAREST // Branch if not round nearest + br.ret.sptk b0 // Exit main path if round nearest +} +;; + + +RINT_UNORM: +// Here if x unorm +{ .mfb + getf.exp rSignexp = fNormX // Get signexp, recompute if unorm + fcmp.eq.s0 p7,p0 = f8, f0 // Dummy op to set denormal flag + br.cond.sptk RINT_COMMON // Return to main path +} +;; + +RINT_NOT_ROUND_NEAREST: +// Here if not round to nearest, and |x| < 2^23 +// Set rounding mode of s2 to that of s0, and repeat the conversion using s2 +{ .mfi + nop.m 0 + fsetc.s2 0x7f, 0x40 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcvt.fx.s2 fXInt = fNormX // Convert to int in significand + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcvt.xf f8 = fXInt // Expected result + nop.i 0 +} +;; + +// Be sure sign of result = sign of input. Fixes cases where result is 0. +{ .mfb + nop.m 0 + fmerge.s f8 = fNormX, f8 + br.ret.sptk b0 // Exit main path +} +;; + +GLOBAL_LIBM_END(nearbyintf) diff --git a/sysdeps/ia64/fpu/s_nearbyintl.S b/sysdeps/ia64/fpu/s_nearbyintl.S new file mode 100644 index 0000000000..ee6159c67c --- /dev/null +++ b/sysdeps/ia64/fpu/s_nearbyintl.S @@ -0,0 +1,217 @@ +.file "nearbyintl.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 10/19/00 Created +// 02/08/01 Corrected behavior for all rounding modes. +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// 07/25/03 Improved performance +//============================================================== + +// API +//============================================================== +// long double nearbyintl(long double x) +//============================================================== + +// general input registers: +// r14 - r21 + +rSignexp = r14 +rExp = r15 +rExpMask = r16 +rBigexp = r17 +rFpsr = r19 +rRcs0 = r20 +rRcs0Mask = r21 + +// floating-point registers: +// f8 - f10 + +fXInt = f9 +fNormX = f10 + +// predicate registers used: +// p6 - p10 + +// Overview of operation +//============================================================== +// long double nearbyintl(long double x) +// Return an integer value (represented as a long double) that is x +// rounded to integer in current rounding mode +// Inexact is not set, otherwise result identical with rint. +//============================================================== + +// double_extended +// if the exponent is > 1003e => 3F(true) = 63(decimal) +// we have a significand of 64 bits 1.63-bits. +// If we multiply by 2^63, we no longer have a fractional part +// So input is an integer value already. + +// double +// if the exponent is >= 10033 => 34(true) = 52(decimal) +// 34 + 3ff = 433 +// we have a significand of 53 bits 1.52-bits. (implicit 1) +// If we multiply by 2^52, we no longer have a fractional part +// So input is an integer value already. + +// single +// if the exponent is > 10016 => 17(true) = 23(decimal) +// we have a significand of 24 bits 1.23-bits. (implicit 1) +// If we multiply by 2^23, we no longer have a fractional part +// So input is an integer value already. + +.section .text +GLOBAL_LIBM_ENTRY(nearbyintl) + +{ .mfi + getf.exp rSignexp = f8 // Get signexp, recompute if unorm + fclass.m p7,p0 = f8, 0x0b // Test x unorm + addl rBigexp = 0x1003e, r0 // Set exponent at which is integer +} +{ .mfi + nop.m 0 + fcvt.fx.s1 fXInt = f8 // Convert to int in significand + mov rExpMask = 0x1FFFF // Form exponent mask +} +;; + +{ .mfi + mov rFpsr = ar40 // Read fpsr -- check rc.s0 + fclass.m p6,p0 = f8, 0x1e3 // Test x natval, nan, inf + nop.i 0 +} +{ .mfb + nop.m 0 + fnorm.s1 fNormX = f8 // Normalize input +(p7) br.cond.spnt RINT_UNORM // Branch if x unorm +} +;; + + +RINT_COMMON: +// Return here from RINT_UNORM +{ .mfb + and rExp = rSignexp, rExpMask // Get biased exponent +(p6) fma.s0 f8 = f8, f1, f0 // Result if x natval, nan, inf +(p6) br.ret.spnt b0 // Exit if x natval, nan, inf +} +;; + +{ .mfi + mov rRcs0Mask = 0x0c00 // Mask for rc.s0 + fcvt.xf f8 = fXInt // Result assume |x| < 2^63 + cmp.ge p7,p8 = rExp, rBigexp // Is |x| >= 2^63? +} +;; + +// We must correct result if |x| >= 2^63 +{ .mfi + nop.m 0 +(p7) fma.s0 f8 = fNormX, f1, f0 // If |x| >= 2^63, result x + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p8) fmerge.s f8 = fNormX, f8 // Make sign nearbyintl(x)= sign x + nop.i 0 +} +;; + +{ .mfi +(p8) and rRcs0 = rFpsr, rRcs0Mask // Get rounding mode for sf0 + nop.f 0 + nop.i 0 +} +;; + +// If |x| < 2^63 we must test for other rounding modes +{ .mbb +(p8) cmp.ne.unc p10,p0 = rRcs0, r0 // Test for other rounding modes +(p10) br.cond.spnt RINT_NOT_ROUND_NEAREST // Branch if not round nearest + br.ret.sptk b0 // Exit main path if round nearest +} +;; + + +RINT_UNORM: +// Here if x unorm +{ .mfb + getf.exp rSignexp = fNormX // Get signexp, recompute if unorm + fcmp.eq.s0 p7,p0 = f8, f0 // Dummy op to set denormal flag + br.cond.sptk RINT_COMMON // Return to main path +} +;; + +RINT_NOT_ROUND_NEAREST: +// Here if not round to nearest, and |x| < 2^63 +// Set rounding mode of s2 to that of s0, and repeat the conversion using s2 +{ .mfi + nop.m 0 + fsetc.s2 0x7f, 0x40 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcvt.fx.s2 fXInt = fNormX // Convert to int in significand + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcvt.xf f8 = fXInt // Expected result + nop.i 0 +} +;; + +// Be sure sign of result = sign of input. Fixes cases where result is 0. +{ .mfb + nop.m 0 + fmerge.s f8 = fNormX, f8 + br.ret.sptk b0 // Exit main path +} +;; + +GLOBAL_LIBM_END(nearbyintl) diff --git a/sysdeps/ia64/fpu/s_nextafter.S b/sysdeps/ia64/fpu/s_nextafter.S new file mode 100644 index 0000000000..6635a31df6 --- /dev/null +++ b/sysdeps/ia64/fpu/s_nextafter.S @@ -0,0 +1,498 @@ +.file "nextafter.s" + + +// Copyright (c) 2000 - 2004, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 03/03/00 Modified to conform to C9X, and improve speed of main path +// 03/14/00 Fixed case where x is a power of 2, and x > y, improved speed +// 04/04/00 Unwind support added +// 05/12/00 Fixed erroneous denormal flag setting for exponent change cases 1,3 +// 08/15/00 Bundle added after call to __libm_error_support to properly +// set [the previously overwritten] GR_Parameter_RESULT. +// 09/09/00 Updated fcmp so that qnans do not raise invalid +// 12/15/00 Corrected behavior when both args are zero to conform to C99, and +// fixed flag settings for several cases +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// 12/14/04 Added error handling on underflow. +// +// API +//============================================================== +// double nextafter( double x, double y ); +// input floating point f8, f9 +// output floating point f8 +// +// Registers used +//============================================================== +GR_max_pexp = r14 +GR_min_pexp = r15 +GR_exp = r16 +GR_sig = r17 +GR_lnorm_sig = r18 +GR_sign_mask = r19 +GR_exp_mask = r20 +GR_sden_sig = r21 +GR_new_sig = r22 +GR_new_exp = r23 +GR_lden_sig = r24 +GR_snorm_sig = r25 +GR_exp1 = r26 +GR_x_exp = r27 +GR_min_den_rexp = r28 +// r36-39 parameters for libm_error_support + +GR_SAVE_B0 = r34 +GR_SAVE_GP = r35 +GR_SAVE_PFS = r32 + +GR_Parameter_X = r36 +GR_Parameter_Y = r37 +GR_Parameter_RESULT = r38 +GR_Parameter_TAG = r39 + +FR_lnorm_sig = f10 +FR_lnorm_exp = f11 +FR_lnorm = f12 +FR_sden_sig = f13 +FR_sden_exp = f14 +FR_sden = f15 +FR_save_f8 = f33 +FR_new_exp = f34 +FR_new_sig = f35 +FR_lden_sig = f36 +FR_snorm_sig = f37 +FR_exp1 = f38 +FR_tmp = f39 + +// +// Overview of operation +//============================================================== +// nextafter determines the next representable value +// after x in the direction of y. + + +.section .text +GLOBAL_LIBM_ENTRY(nextafter) + +// Extract signexp from x +// Is x < y ? p10 if yes, p11 if no +// Form smallest denormal significand = ulp size +{ .mfi + getf.exp GR_exp = f8 + fcmp.lt.s1 p10,p11 = f8, f9 + addl GR_sden_sig = 0x800, r0 +} +// Form largest normal significand 0xfffffffffffff800 +// Form smallest normal exponent +{ .mfi + addl GR_lnorm_sig = -0x800,r0 + nop.f 999 + addl GR_min_pexp = 0x0fc01, r0 ;; +} +// Extract significand from x +// Is x=y? +// Form largest normal exponent +{ .mfi + getf.sig GR_sig = f8 + fcmp.eq.s0 p6,p0 = f8, f9 + addl GR_max_pexp = 0x103fe, r0 +} +// Move largest normal significand to fp reg for special cases +{ .mfi + setf.sig FR_lnorm_sig = GR_lnorm_sig + nop.f 999 + addl GR_sign_mask = 0x20000, r0 ;; +} + +// Move smallest denormal significand and signexp to fp regs +// Is x=nan? +// Set p12 and p13 based on whether significand increases or decreases +// It increases (p12 set) if x=0 or if x>y and x<0 +// It decreases (p13 set) if xy and x>=0 +{ .mfi + setf.sig FR_sden_sig = GR_sden_sig + fclass.m p8,p0 = f8, 0xc3 +(p10) cmp.lt p12,p13 = GR_exp, GR_sign_mask +} +{ .mfi + setf.exp FR_sden_exp = GR_min_pexp +(p11) cmp.ge p12,p13 = GR_exp, GR_sign_mask ;; +} + +.pred.rel "mutex",p12,p13 + +// Form expected new significand, adding or subtracting 1 ulp increment +// If x=y set result to y +// Form smallest normal significand and largest denormal significand +{ .mfi +(p12) add GR_new_sig = GR_sig, GR_sden_sig +(p6) fmerge.s f8=f9,f9 + dep.z GR_snorm_sig = 1,63,1 // 0x8000000000000000 +} +{ .mlx +(p13) sub GR_new_sig = GR_sig, GR_sden_sig + movl GR_lden_sig = 0x7ffffffffffff800 ;; +} + +// Move expected result significand and signexp to fp regs +// Is y=nan? +// Form new exponent in case result exponent needs incrementing or decrementing +{ .mfi + setf.exp FR_new_exp = GR_exp + fclass.m p9,p0 = f9, 0xc3 +(p12) add GR_exp1 = 1, GR_exp +} +{ .mib + setf.sig FR_new_sig = GR_new_sig +(p13) add GR_exp1 = -1, GR_exp +(p6) br.ret.spnt b0 ;; // Exit if x=y +} + +// Move largest normal signexp to fp reg for special cases +// Is x=zero? +{ .mfi + setf.exp FR_lnorm_exp = GR_max_pexp + fclass.m p7,p0 = f8, 0x7 + nop.i 999 +} +{ .mfb + nop.m 999 +(p8) fma.s0 f8 = f8,f1,f9 +(p8) br.ret.spnt b0 ;; // Exit if x=nan +} + +// Move exp+-1 and smallest normal significand to fp regs for special cases +// Is x=inf? +{ .mfi + setf.exp FR_exp1 = GR_exp1 + fclass.m p6,p0 = f8, 0x23 + addl GR_exp_mask = 0x1ffff, r0 +} +{ .mfb + setf.sig FR_snorm_sig = GR_snorm_sig +(p9) fma.s0 f8 = f8,f1,f9 +(p9) br.ret.spnt b0 ;; // Exit if y=nan +} + +// Move largest denormal significand to fp regs for special cases +// Save x +{ .mfb + setf.sig FR_lden_sig = GR_lden_sig + mov FR_save_f8 = f8 +(p7) br.cond.spnt NEXT_ZERO ;; // Exit if x=0 +} + +// Mask off the sign to get x_exp +{ .mfb + and GR_x_exp = GR_exp_mask, GR_exp + nop.f 999 +(p6) br.cond.spnt NEXT_INF ;; // Exit if x=inf +} + +// Check 6 special cases when significand rolls over: +// 1 sig size incr, x_sig=max_sig, x_exp < max_exp +// Set p6, result is sig=min_sig, exp++ +// 2 sig size incr, x_sig=max_sig, x_exp >= max_exp +// Set p7, result is inf, signal overflow +// 3 sig size decr, x_sig=min_sig, x_exp > min_exp +// Set p8, result is sig=max_sig, exp-- +// 4 sig size decr, x_sig=min_sig, x_exp = min_exp +// Set p9, result is sig=max_den_sig, exp same, signal underflow and inexact +// 5 sig size decr, x_sig=min_den_sig, x_exp = min_exp +// Set p10, result is zero, sign of x, signal underflow and inexact +// 6 sig size decr, x_sig=min_sig, x_exp < min_exp +// Set p14, result is zero, sign of x, signal underflow and inexact +// +// Form exponent of smallest double denormal (if normalized register format) +{ .mmi + adds GR_min_den_rexp = -52, GR_min_pexp +(p12) cmp.eq.unc p6,p0 = GR_new_sig, r0 +(p13) cmp.eq.unc p8,p10 = GR_new_sig, GR_lden_sig ;; +} + +{ .mmi +(p6) cmp.lt.unc p6,p7 = GR_x_exp, GR_max_pexp +(p8) cmp.gt.unc p8,p9 = GR_x_exp, GR_min_pexp +(p10) cmp.eq.unc p10,p0 = GR_new_sig, r0 ;; +} + +// Create small normal in case need to generate underflow flag +{ .mfi +(p10) cmp.le.unc p10,p0 = GR_x_exp, GR_min_pexp + fmerge.se FR_tmp = FR_sden_exp, FR_lnorm_sig +(p9) cmp.gt.unc p9,p14 = GR_x_exp, GR_min_den_rexp +} +// Branch if cases 1, 2, 3 +{ .bbb +(p6) br.cond.spnt NEXT_EXPUP +(p7) br.cond.spnt NEXT_OVERFLOW +(p8) br.cond.spnt NEXT_EXPDOWN ;; +} + +// Branch if cases 4, 5, 6 +{ .bbb +(p9) br.cond.spnt NEXT_NORM_TO_DENORM +(p10) br.cond.spnt NEXT_UNDERFLOW_TO_ZERO +(p14) br.cond.spnt NEXT_UNDERFLOW_TO_ZERO ;; +} + +// Here if no special cases +// Set p6 if result will be a denormal, so can force underflow flag +// Case 1: x_exp=min_exp, x_sig=unnormalized +// Case 2: x_exp y, improved speed +// 04/04/00 Unwind support added +// 05/12/00 Fixed erroneous denormal flag setting for exponent change cases 1,3 +// 08/15/00 Bundle added after call to __libm_error_support to properly +// set [the previously overwritten] GR_Parameter_RESULT. +// 09/09/00 Updated fcmp so that qnans do not raise invalid +// 12/15/00 Corrected behavior when both args are zero to conform to C99, and +// fixed flag settings for several cases +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// 12/14/04 Added error handling on underflow. +// +// API +//============================================================== +// float nextafterf( float x, float y ); +// input floating point f8, f9 +// output floating point f8 +// +// Registers used +//============================================================== +GR_max_pexp = r14 +GR_min_pexp = r15 +GR_exp = r16 +GR_sig = r17 +GR_lnorm_sig = r18 +GR_sign_mask = r19 +GR_exp_mask = r20 +GR_sden_sig = r21 +GR_new_sig = r22 +GR_new_exp = r23 +GR_lden_sig = r24 +GR_snorm_sig = r25 +GR_exp1 = r26 +GR_x_exp = r27 +GR_min_den_rexp = r28 +// r36-39 parameters for libm_error_support + +GR_SAVE_B0 = r34 +GR_SAVE_GP = r35 +GR_SAVE_PFS = r32 + +GR_Parameter_X = r36 +GR_Parameter_Y = r37 +GR_Parameter_RESULT = r38 +GR_Parameter_TAG = r39 + +FR_lnorm_sig = f10 +FR_lnorm_exp = f11 +FR_lnorm = f12 +FR_sden_sig = f13 +FR_sden_exp = f14 +FR_sden = f15 +FR_save_f8 = f33 +FR_new_exp = f34 +FR_new_sig = f35 +FR_lden_sig = f36 +FR_snorm_sig = f37 +FR_exp1 = f38 +FR_tmp = f39 + +// +// Overview of operation +//============================================================== +// nextafterf determines the next representable value +// after x in the direction of y. + + +.section .text +GLOBAL_LIBM_ENTRY(nextafterf) + +// Extract signexp from x +// Form smallest denormal significand = ulp size +{ .mlx + getf.exp GR_exp = f8 + movl GR_sden_sig = 0x0000010000000000 +} +// Form largest normal exponent +// Is x < y ? p10 if yes, p11 if no +// Form smallest normal exponent +{ .mfi + addl GR_max_pexp = 0x1007e, r0 + fcmp.lt.s1 p10,p11 = f8, f9 + addl GR_min_pexp = 0x0ff81, r0 ;; +} + +// Is x=y? +{ .mfi + getf.sig GR_sig = f8 + fcmp.eq.s0 p6,p0 = f8, f9 + nop.i 0 +} +// Extract significand from x +// Form largest normal significand +{ .mlx + nop.m 0 + movl GR_lnorm_sig = 0xffffff0000000000 ;; +} + +// Move largest normal significand to fp reg for special cases +{ .mfi + setf.sig FR_lnorm_sig = GR_lnorm_sig + nop.f 0 + addl GR_sign_mask = 0x20000, r0 ;; +} + +// Move smallest denormal significand and signexp to fp regs +// Is x=nan? +// Set p12 and p13 based on whether significand increases or decreases +// It increases (p12 set) if x=0 or if x>y and x<0 +// It decreases (p13 set) if xy and x>=0 +{ .mfi + setf.sig FR_sden_sig = GR_sden_sig + fclass.m p8,p0 = f8, 0xc3 +(p10) cmp.lt p12,p13 = GR_exp, GR_sign_mask +} +{ .mfi + setf.exp FR_sden_exp = GR_min_pexp + nop.f 999 +(p11) cmp.ge p12,p13 = GR_exp, GR_sign_mask ;; +} + +.pred.rel "mutex",p12,p13 + +// Form expected new significand, adding or subtracting 1 ulp increment +// If x=y set result to y +// Form smallest normal significand and largest denormal significand +{ .mfi +(p12) add GR_new_sig = GR_sig, GR_sden_sig +(p6) fmerge.s f8=f9,f9 + dep.z GR_snorm_sig = 1,63,1 // 0x8000000000000000 +} +{ .mlx +(p13) sub GR_new_sig = GR_sig, GR_sden_sig + movl GR_lden_sig = 0x7fffff0000000000 ;; +} + +// Move expected result significand and signexp to fp regs +// Is y=nan? +// Form new exponent in case result exponent needs incrementing or decrementing +{ .mfi + setf.exp FR_new_exp = GR_exp + fclass.m p9,p0 = f9, 0xc3 +(p12) add GR_exp1 = 1, GR_exp +} +{ .mib + setf.sig FR_new_sig = GR_new_sig +(p13) add GR_exp1 = -1, GR_exp +(p6) br.ret.spnt b0 ;; // Exit if x=y +} + +// Move largest normal signexp to fp reg for special cases +// Is x=zero? +{ .mfi + setf.exp FR_lnorm_exp = GR_max_pexp + fclass.m p7,p0 = f8, 0x7 + nop.i 999 +} +{ .mfb + nop.m 999 +(p8) fma.s0 f8 = f8,f1,f9 +(p8) br.ret.spnt b0 ;; // Exit if x=nan +} + +// Move exp+-1 and smallest normal significand to fp regs for special cases +// Is x=inf? +{ .mfi + setf.exp FR_exp1 = GR_exp1 + fclass.m p6,p0 = f8, 0x23 + addl GR_exp_mask = 0x1ffff, r0 +} +{ .mfb + setf.sig FR_snorm_sig = GR_snorm_sig +(p9) fma.s0 f8 = f8,f1,f9 +(p9) br.ret.spnt b0 ;; // Exit if y=nan +} + +// Move largest denormal significand to fp regs for special cases +// Save x +{ .mfb + setf.sig FR_lden_sig = GR_lden_sig + mov FR_save_f8 = f8 +(p7) br.cond.spnt NEXT_ZERO ;; // Exit if x=0 +} + +// Mask off the sign to get x_exp +{ .mfb + and GR_x_exp = GR_exp_mask, GR_exp + nop.f 999 +(p6) br.cond.spnt NEXT_INF ;; // Exit if x=inf +} + +// Check 6 special cases when significand rolls over: +// 1 sig size incr, x_sig=max_sig, x_exp < max_exp +// Set p6, result is sig=min_sig, exp++ +// 2 sig size incr, x_sig=max_sig, x_exp >= max_exp +// Set p7, result is inf, signal overflow +// 3 sig size decr, x_sig=min_sig, x_exp > min_exp +// Set p8, result is sig=max_sig, exp-- +// 4 sig size decr, x_sig=min_sig, x_exp = min_exp +// Set p9, result is sig=max_den_sig, exp same, signal underflow and inexact +// 5 sig size decr, x_sig=min_den_sig, x_exp = min_exp +// Set p10, result is zero, sign of x, signal underflow and inexact +// 6 sig size decr, x_sig=min_sig, x_exp < min_exp +// Set p14, result is zero, sign of x, signal underflow and inexact +// +// Form exponent of smallest float denormal (if normalized register format) +{ .mmi + adds GR_min_den_rexp = -23, GR_min_pexp +(p12) cmp.eq.unc p6,p0 = GR_new_sig, r0 +(p13) cmp.eq.unc p8,p10 = GR_new_sig, GR_lden_sig ;; +} + +{ .mmi +(p6) cmp.lt.unc p6,p7 = GR_x_exp, GR_max_pexp +(p8) cmp.gt.unc p8,p9 = GR_x_exp, GR_min_pexp +(p10) cmp.eq.unc p10,p0 = GR_new_sig, r0 ;; +} + +// Create small normal in case need to generate underflow flag +{ .mfi +(p10) cmp.le.unc p10,p0 = GR_x_exp, GR_min_pexp + fmerge.se FR_tmp = FR_sden_exp, FR_lnorm_sig +(p9) cmp.gt.unc p9,p14 = GR_x_exp, GR_min_den_rexp +} +// Branch if cases 1, 2, 3 +{ .bbb +(p6) br.cond.spnt NEXT_EXPUP +(p7) br.cond.spnt NEXT_OVERFLOW +(p8) br.cond.spnt NEXT_EXPDOWN ;; +} + +// Branch if cases 4, 5, 6 +{ .bbb +(p9) br.cond.spnt NEXT_NORM_TO_DENORM +(p10) br.cond.spnt NEXT_UNDERFLOW_TO_ZERO +(p14) br.cond.spnt NEXT_UNDERFLOW_TO_ZERO ;; +} + +// Here if no special cases +// Set p6 if result will be a denormal, so can force underflow flag +// Case 1: x_exp=min_exp, x_sig=unnormalized +// Case 2: x_exp y, improved speed +// 04/04/00 Unwind support added +// 05/12/00 Fixed erroneous denormal flag setting for exponent change cases 1,3 +// 08/15/00 Bundle added after call to __libm_error_support to properly +// set [the previously overwritten] GR_Parameter_RESULT. +// 09/09/00 Updated fcmp so that qnans do not raise invalid. +// 12/15/00 Fixed case of smallest long double normal to largest denormal, +// now adhere to C99 for two zero args, and fixed flag settings +// for several cases +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// 12/14/04 Added error handling on underflow. +// +// API +//============================================================== +// long double nextafterl( long double x, long double y ); +// input floating point f8, f9 +// output floating point f8 +// +// Registers used +//============================================================== +GR_max_pexp = r14 +GR_min_pexp = r15 +GR_exp = r16 +GR_sig = r17 +GR_lnorm_sig = r18 +GR_sign_mask = r19 +GR_exp_mask = r20 +GR_sden_sig = r21 +GR_new_sig = r22 +GR_new_exp = r23 +GR_lden_sig = r24 +GR_snorm_sig = r25 +GR_exp1 = r26 +GR_x_exp = r27 +// r36-39 parameters for libm_error_support + +GR_SAVE_B0 = r34 +GR_SAVE_GP = r35 +GR_SAVE_PFS = r32 + +GR_Parameter_X = r36 +GR_Parameter_Y = r37 +GR_Parameter_RESULT = r38 +GR_Parameter_TAG = r39 + +FR_lnorm_sig = f10 +FR_lnorm_exp = f11 +FR_lnorm = f12 +FR_sden_sig = f13 +FR_den_exp = f14 +FR_sden = f15 +FR_snorm_exp = f32 +FR_save_f8 = f33 +FR_new_exp = f34 +FR_new_sig = f35 +FR_lden_sig = f36 +FR_snorm_sig = f37 +FR_exp1 = f38 +FR_tmp = f39 + +// +// Overview of operation +//============================================================== +// nextafterl determines the next representable value +// after x in the direction of y. + + +.section .text +GLOBAL_LIBM_ENTRY(nextafterl) + +// Extract signexp from x +// Is x < y ? p10 if yes, p11 if no +// Form smallest denormal significand = ulp size +{ .mfi + getf.exp GR_exp = f8 + fcmp.lt.s1 p10,p11 = f8, f9 + addl GR_sden_sig = 0x1, r0 +} +// Form largest normal significand 0xffffffffffffffff +// Form smallest normal exponent +{ .mfi + addl GR_lnorm_sig = -0x1,r0 + nop.f 999 + addl GR_min_pexp = 0x0c001, r0 ;; +} + +// Extract significand from x +// Is x=y? This fcmp also sets Invalid and Denormal if required +// Form largest normal exponent +{ .mfi + getf.sig GR_sig = f8 + fcmp.eq.s0 p6,p0 = f8, f9 + addl GR_max_pexp = 0x13ffe, r0 +} +// Move largest normal significand to fp reg for special cases +{ .mfi + setf.sig FR_lnorm_sig = GR_lnorm_sig + nop.f 999 + addl GR_sign_mask = 0x20000, r0 ;; +} + +// Move smallest denormal significand and exp to fp regs +// Is x=nan? +// Set p12 and p13 based on whether significand increases or decreases +// It increases (p12 set) if x=0 or if x>y and x<0 +// It decreases (p13 set) if xy and x>=0 +{ .mfi + setf.sig FR_sden_sig = GR_sden_sig + fclass.m p8,p0 = f8, 0xc3 +(p10) cmp.lt p12,p13 = GR_exp, GR_sign_mask +} +// Move smallest normal exp to fp regs +{ .mfi + setf.exp FR_snorm_exp = GR_min_pexp + nop.f 999 +(p11) cmp.ge p12,p13 = GR_exp, GR_sign_mask ;; +} + +.pred.rel "mutex",p12,p13 + +// Form expected new significand, adding or subtracting 1 ulp increment +// If x=y set result to y +// Form smallest normal significand and largest denormal significand +{ .mfi +(p12) add GR_new_sig = GR_sig, GR_sden_sig +(p6) fmerge.s f8=f9,f9 + dep.z GR_snorm_sig = 1,63,1 // 0x8000000000000000 +} +{ .mlx +(p13) sub GR_new_sig = GR_sig, GR_sden_sig + movl GR_lden_sig = 0x7fffffffffffffff ;; +} + +// Move expected result significand and signexp to fp regs +// Is y=nan? +// Form new exponent in case result exponent needs incrementing or decrementing +{ .mfi + setf.exp FR_new_exp = GR_exp + fclass.m p9,p0 = f9, 0xc3 +(p12) add GR_exp1 = 1, GR_exp +} +{ .mib + setf.sig FR_new_sig = GR_new_sig +(p13) add GR_exp1 = -1, GR_exp +(p6) br.ret.spnt b0 ;; // Exit if x=y +} + +// Move largest normal signexp to fp reg for special cases +// Is x=zero? +{ .mfi + setf.exp FR_lnorm_exp = GR_max_pexp + fclass.m p7,p0 = f8, 0x7 + nop.i 999 +} +{ .mfb + setf.exp FR_den_exp = GR_min_pexp +(p8) fma.s0 f8 = f8,f1,f9 +(p8) br.ret.spnt b0 ;; // Exit if x=nan +} + +// Move exp+-1 and smallest normal significand to fp regs for special cases +// Is x=inf? +{ .mfi + setf.exp FR_exp1 = GR_exp1 + fclass.m p6,p0 = f8, 0x23 + addl GR_exp_mask = 0x1ffff, r0 +} +{ .mfb + setf.sig FR_snorm_sig = GR_snorm_sig +(p9) fma.s0 f8 = f8,f1,f9 +(p9) br.ret.spnt b0 ;; // Exit if y=nan +} + +// Move largest denormal significand to fp regs for special cases +// Save x +{ .mfb + setf.sig FR_lden_sig = GR_lden_sig + mov FR_save_f8 = f8 +(p7) br.cond.spnt NEXT_ZERO ;; // Exit if x=0 +} + +// Mask off the sign to get x_exp +{ .mfb + and GR_x_exp = GR_exp_mask, GR_exp + nop.f 999 +(p6) br.cond.spnt NEXT_INF ;; // Exit if x=inf +} + +// Check 5 special cases when significand rolls over: +// 1 sig size incr, x_sig=max_sig, x_exp < max_exp +// Set p6, result is sig=min_sig, exp++ +// 2 sig size incr, x_sig=max_sig, x_exp >= max_exp +// Set p7, result is inf, signal overflow +// 3 sig size decr, x_sig=min_sig, x_exp > min_exp +// Set p8, result is sig=max_sig, exp-- +// 4 sig size decr, x_sig=min_sig, x_exp = min_exp +// Set p9, result is sig=max_den_sig, exp same, signal underflow and inexact +// 5 sig size decr, x_sig=min_den_sig, x_exp = min_exp +// Set p10, result is zero, sign of x, signal underflow and inexact +// +{ .mmi +(p12) cmp.eq.unc p6,p0 = GR_new_sig, r0 +(p13) cmp.eq.unc p9,p10 = GR_new_sig, GR_lden_sig + nop.i 999 +;; +} + +{ .mmi +(p6) cmp.lt.unc p6,p7 = GR_x_exp, GR_max_pexp +(p10) cmp.eq.unc p10,p0 = GR_new_sig, r0 +(p9) cmp.le.unc p9,p8 = GR_x_exp, GR_min_pexp +;; +} + +// Create small normal in case need to generate underflow flag +{ .mfi + nop.m 999 + fmerge.se FR_tmp = FR_snorm_exp, FR_lnorm_sig + nop.i 999 +} +// Branch if cases 1, 2, 3 +{ .bbb +(p6) br.cond.spnt NEXT_EXPUP +(p7) br.cond.spnt NEXT_OVERFLOW +(p8) br.cond.spnt NEXT_EXPDOWN ;; +} + +// Branch if cases 4, 5 +{ .mbb + nop.m 999 +(p9) br.cond.spnt NEXT_NORM_TO_DENORM +(p10) br.cond.spnt NEXT_UNDERFLOW_TO_ZERO +;; +} + +// Here if no special cases +// Set p6 if result will be a denormal, so can force underflow flag +// Case 1: x_exp=min_exp, x_sig=unnormalized +// Case 2: x_exp=0 or if x>y and x<0 +// It decreases (p13 set) if xy and x>=0 +{ .mfi + setf.sig FR_sden_sig = GR_sden_sig + fclass.m p8,p0 = f8, 0xc3 +(p10) cmp.lt p12,p13 = GR_exp, GR_sign_mask +} +{ .mfi + setf.exp FR_sden_exp = GR_min_pexp +(p11) cmp.ge p12,p13 = GR_exp, GR_sign_mask ;; +} + +.pred.rel "mutex",p12,p13 + +// Form expected new significand, adding or subtracting 1 ulp increment +// If x=y set result to y +// Form smallest normal significand and largest denormal significand +{ .mfi +(p12) add GR_new_sig = GR_sig, GR_sden_sig +(p6) fnorm.d.s0 f8=f9 //Normalise + dep.z GR_snorm_sig = 1,63,1 // 0x8000000000000000 +} +{ .mlx +(p13) sub GR_new_sig = GR_sig, GR_sden_sig + movl GR_lden_sig = 0x7ffffffffffff800 ;; +} + +// Move expected result significand and signexp to fp regs +// Is y=nan? +// Form new exponent in case result exponent needs incrementing or decrementing +{ .mfi + setf.exp FR_new_exp = GR_exp + fclass.m p9,p0 = f9, 0xc3 +(p12) add GR_exp1 = 1, GR_exp +} +{ .mib + setf.sig FR_new_sig = GR_new_sig +(p13) add GR_exp1 = -1, GR_exp +(p6) br.ret.spnt b0 ;; // Exit if x=y +} + +// Move largest normal signexp to fp reg for special cases +// Is x=zero? +{ .mfi + setf.exp FR_lnorm_exp = GR_max_pexp + fclass.m p7,p0 = f8, 0x7 + nop.i 999 +} +{ .mfb + nop.m 999 +(p8) fma.s0 f8 = f8,f1,f9 +(p8) br.ret.spnt b0 ;; // Exit if x=nan +} + +// Move exp+-1 and smallest normal significand to fp regs for special cases +// Is x=inf? +{ .mfi + setf.exp FR_exp1 = GR_exp1 + fclass.m p6,p0 = f8, 0x23 + addl GR_exp_mask = 0x1ffff, r0 +} +{ .mfb + setf.sig FR_snorm_sig = GR_snorm_sig +(p9) fma.s0 f8 = f8,f1,f9 +(p9) br.ret.spnt b0 ;; // Exit if y=nan +} + +// Move largest denormal significand to fp regs for special cases +// Save x +{ .mfb + setf.sig FR_lden_sig = GR_lden_sig + mov FR_save_f8 = f8 +(p7) br.cond.spnt NEXT_ZERO ;; // Exit if x=0 +} + +// Mask off the sign to get x_exp +{ .mfb + and GR_x_exp = GR_exp_mask, GR_exp + nop.f 999 +(p6) br.cond.spnt NEXT_INF ;; // Exit if x=inf +} + +// Check 6 special cases when significand rolls over: +// 1 sig size incr, x_sig=max_sig, x_exp < max_exp +// Set p6, result is sig=min_sig, exp++ +// 2 sig size incr, x_sig=max_sig, x_exp >= max_exp +// Set p7, result is inf, signal overflow +// 3 sig size decr, x_sig=min_sig, x_exp > min_exp +// Set p8, result is sig=max_sig, exp-- +// 4 sig size decr, x_sig=min_sig, x_exp = min_exp +// Set p9, result is sig=max_den_sig, exp same, signal underflow and inexact +// 5 sig size decr, x_sig=min_den_sig, x_exp = min_exp +// Set p10, result is zero, sign of x, signal underflow and inexact +// 6 sig size decr, x_sig=min_sig, x_exp < min_exp +// Set p14, result is zero, sign of x, signal underflow and inexact +// +// Form exponent of smallest double denormal (if normalized register format) +{ .mmi + adds GR_min_den_rexp = -52, GR_min_pexp +(p12) cmp.eq.unc p6,p0 = GR_new_sig, r0 +(p13) cmp.eq.unc p8,p10 = GR_new_sig, GR_lden_sig ;; +} + +{ .mmi +(p6) cmp.lt.unc p6,p7 = GR_x_exp, GR_max_pexp +(p8) cmp.gt.unc p8,p9 = GR_x_exp, GR_min_pexp +(p10) cmp.eq.unc p10,p0 = GR_new_sig, r0 ;; +} + +// Create small normal in case need to generate underflow flag +{ .mfi +(p10) cmp.le.unc p10,p0 = GR_x_exp, GR_min_pexp + fmerge.se FR_tmp = FR_sden_exp, FR_lnorm_sig +(p9) cmp.gt.unc p9,p14 = GR_x_exp, GR_min_den_rexp +} +// Branch if cases 1, 2, 3 +{ .bbb +(p6) br.cond.spnt NEXT_EXPUP +(p7) br.cond.spnt NEXT_OVERFLOW +(p8) br.cond.spnt NEXT_EXPDOWN ;; +} + +// Branch if cases 4, 5, 6 +{ .bbb +(p9) br.cond.spnt NEXT_NORM_TO_DENORM +(p10) br.cond.spnt NEXT_UNDERFLOW_TO_ZERO +(p14) br.cond.spnt NEXT_UNDERFLOW_TO_ZERO ;; +} + +// Here if no special cases +// Set p6 if result will be a denormal, so can force underflow flag +// Case 1: x_exp=min_exp, x_sig=unnormalized +// Case 2: x_exp=0 or if x>y and x<0 +// It decreases (p13 set) if xy and x>=0 +{ .mfi + setf.sig FR_sden_sig = GR_sden_sig + fclass.m p8,p0 = f8, 0xc3 +(p10) cmp.lt p12,p13 = GR_exp, GR_sign_mask +} +{ .mfi + setf.exp FR_sden_exp = GR_min_pexp + nop.f 999 +(p11) cmp.ge p12,p13 = GR_exp, GR_sign_mask ;; +} + +.pred.rel "mutex",p12,p13 + +// Form expected new significand, adding or subtracting 1 ulp increment +// If x=y set result to y +// Form smallest normal significand and largest denormal significand +{ .mfi +(p12) add GR_new_sig = GR_sig, GR_sden_sig +(p6) fnorm.s.s0 f8=f9 //Normalise + dep.z GR_snorm_sig = 1,63,1 // 0x8000000000000000 +} +{ .mlx +(p13) sub GR_new_sig = GR_sig, GR_sden_sig + movl GR_lden_sig = 0x7fffff0000000000 ;; +} + +// Move expected result significand and signexp to fp regs +// Is y=nan? +// Form new exponent in case result exponent needs incrementing or decrementing +{ .mfi + setf.exp FR_new_exp = GR_exp + fclass.m p9,p0 = f9, 0xc3 +(p12) add GR_exp1 = 1, GR_exp +} +{ .mib + setf.sig FR_new_sig = GR_new_sig +(p13) add GR_exp1 = -1, GR_exp +(p6) br.ret.spnt b0 ;; // Exit if x=y +} + +// Move largest normal signexp to fp reg for special cases +// Is x=zero? +{ .mfi + setf.exp FR_lnorm_exp = GR_max_pexp + fclass.m p7,p0 = f8, 0x7 + nop.i 999 +} +{ .mfb + nop.m 999 +(p8) fma.s0 f8 = f8,f1,f9 +(p8) br.ret.spnt b0 ;; // Exit if x=nan +} + +// Move exp+-1 and smallest normal significand to fp regs for special cases +// Is x=inf? +{ .mfi + setf.exp FR_exp1 = GR_exp1 + fclass.m p6,p0 = f8, 0x23 + addl GR_exp_mask = 0x1ffff, r0 +} +{ .mfb + setf.sig FR_snorm_sig = GR_snorm_sig +(p9) fma.s0 f8 = f8,f1,f9 +(p9) br.ret.spnt b0 ;; // Exit if y=nan +} + +// Move largest denormal significand to fp regs for special cases +// Save x +{ .mfb + setf.sig FR_lden_sig = GR_lden_sig + mov FR_save_f8 = f8 +(p7) br.cond.spnt NEXT_ZERO ;; // Exit if x=0 +} + +// Mask off the sign to get x_exp +{ .mfb + and GR_x_exp = GR_exp_mask, GR_exp + nop.f 999 +(p6) br.cond.spnt NEXT_INF ;; // Exit if x=inf +} + +// Check 6 special cases when significand rolls over: +// 1 sig size incr, x_sig=max_sig, x_exp < max_exp +// Set p6, result is sig=min_sig, exp++ +// 2 sig size incr, x_sig=max_sig, x_exp >= max_exp +// Set p7, result is inf, signal overflow +// 3 sig size decr, x_sig=min_sig, x_exp > min_exp +// Set p8, result is sig=max_sig, exp-- +// 4 sig size decr, x_sig=min_sig, x_exp = min_exp +// Set p9, result is sig=max_den_sig, exp same, signal underflow and inexact +// 5 sig size decr, x_sig=min_den_sig, x_exp = min_exp +// Set p10, result is zero, sign of x, signal underflow and inexact +// 6 sig size decr, x_sig=min_sig, x_exp < min_exp +// Set p14, result is zero, sign of x, signal underflow and inexact +// +// Form exponent of smallest float denormal (if normalized register format) +{ .mmi + adds GR_min_den_rexp = -23, GR_min_pexp +(p12) cmp.eq.unc p6,p0 = GR_new_sig, r0 +(p13) cmp.eq.unc p8,p10 = GR_new_sig, GR_lden_sig ;; +} + +{ .mmi +(p6) cmp.lt.unc p6,p7 = GR_x_exp, GR_max_pexp +(p8) cmp.gt.unc p8,p9 = GR_x_exp, GR_min_pexp +(p10) cmp.eq.unc p10,p0 = GR_new_sig, r0 ;; +} + +// Create small normal in case need to generate underflow flag +{ .mfi +(p10) cmp.le.unc p10,p0 = GR_x_exp, GR_min_pexp + fmerge.se FR_tmp = FR_sden_exp, FR_lnorm_sig +(p9) cmp.gt.unc p9,p14 = GR_x_exp, GR_min_den_rexp +} +// Branch if cases 1, 2, 3 +{ .bbb +(p6) br.cond.spnt NEXT_EXPUP +(p7) br.cond.spnt NEXT_OVERFLOW +(p8) br.cond.spnt NEXT_EXPDOWN ;; +} + +// Branch if cases 4, 5, 6 +{ .bbb +(p9) br.cond.spnt NEXT_NORM_TO_DENORM +(p10) br.cond.spnt NEXT_UNDERFLOW_TO_ZERO +(p14) br.cond.spnt NEXT_UNDERFLOW_TO_ZERO ;; +} + +// Here if no special cases +// Set p6 if result will be a denormal, so can force underflow flag +// Case 1: x_exp=min_exp, x_sig=unnormalized +// Case 2: x_exp=0 or if x>y and x<0 +// It decreases (p13 set) if xy and x>=0 +{ .mfi + setf.sig FR_sden_sig = GR_sden_sig + fclass.m p8,p0 = f8, 0xc3 +(p10) cmp.lt p12,p13 = GR_exp, GR_sign_mask +} +// Move smallest normal exp to fp regs +{ .mfi + setf.exp FR_snorm_exp = GR_min_pexp + nop.f 999 +(p11) cmp.ge p12,p13 = GR_exp, GR_sign_mask ;; +} + +.pred.rel "mutex",p12,p13 + +// Form expected new significand, adding or subtracting 1 ulp increment +// If x=y set result to y +// Form smallest normal significand and largest denormal significand +{ .mfi +(p12) add GR_new_sig = GR_sig, GR_sden_sig +(p6) fmerge.s f8=f9,f9 + dep.z GR_snorm_sig = 1,63,1 // 0x8000000000000000 +} +{ .mlx +(p13) sub GR_new_sig = GR_sig, GR_sden_sig + movl GR_lden_sig = 0x7fffffffffffffff ;; +} + +// Move expected result significand and signexp to fp regs +// Is y=nan? +// Form new exponent in case result exponent needs incrementing or decrementing +{ .mfi + setf.exp FR_new_exp = GR_exp + fclass.m p9,p0 = f9, 0xc3 +(p12) add GR_exp1 = 1, GR_exp +} +{ .mib + setf.sig FR_new_sig = GR_new_sig +(p13) add GR_exp1 = -1, GR_exp +(p6) br.ret.spnt b0 ;; // Exit if x=y +} + +// Move largest normal signexp to fp reg for special cases +// Is x=zero? +{ .mfi + setf.exp FR_lnorm_exp = GR_max_pexp + fclass.m p7,p0 = f8, 0x7 + nop.i 999 +} +{ .mfb + setf.exp FR_den_exp = GR_min_pexp +(p8) fma.s0 f8 = f8,f1,f9 +(p8) br.ret.spnt b0 ;; // Exit if x=nan +} + +// Move exp+-1 and smallest normal significand to fp regs for special cases +// Is x=inf? +{ .mfi + setf.exp FR_exp1 = GR_exp1 + fclass.m p6,p0 = f8, 0x23 + addl GR_exp_mask = 0x1ffff, r0 +} +{ .mfb + setf.sig FR_snorm_sig = GR_snorm_sig +(p9) fma.s0 f8 = f8,f1,f9 +(p9) br.ret.spnt b0 ;; // Exit if y=nan +} + +// Move largest denormal significand to fp regs for special cases +// Save x +{ .mfb + setf.sig FR_lden_sig = GR_lden_sig + mov FR_save_f8 = f8 +(p7) br.cond.spnt NEXT_ZERO ;; // Exit if x=0 +} + +// Mask off the sign to get x_exp +{ .mfb + and GR_x_exp = GR_exp_mask, GR_exp + nop.f 999 +(p6) br.cond.spnt NEXT_INF ;; // Exit if x=inf +} + +// Check 5 special cases when significand rolls over: +// 1 sig size incr, x_sig=max_sig, x_exp < max_exp +// Set p6, result is sig=min_sig, exp++ +// 2 sig size incr, x_sig=max_sig, x_exp >= max_exp +// Set p7, result is inf, signal overflow +// 3 sig size decr, x_sig=min_sig, x_exp > min_exp +// Set p8, result is sig=max_sig, exp-- +// 4 sig size decr, x_sig=min_sig, x_exp = min_exp +// Set p9, result is sig=max_den_sig, exp same, signal underflow and inexact +// 5 sig size decr, x_sig=min_den_sig, x_exp = min_exp +// Set p10, result is zero, sign of x, signal underflow and inexact +// +{ .mmi +(p12) cmp.eq.unc p6,p0 = GR_new_sig, r0 +(p13) cmp.eq.unc p9,p10 = GR_new_sig, GR_lden_sig + nop.i 999 +;; +} + +{ .mmi +(p6) cmp.lt.unc p6,p7 = GR_x_exp, GR_max_pexp +(p10) cmp.eq.unc p10,p0 = GR_new_sig, r0 +(p9) cmp.le.unc p9,p8 = GR_x_exp, GR_min_pexp +;; +} + +// Create small normal in case need to generate underflow flag +{ .mfi + nop.m 999 + fmerge.se FR_tmp = FR_snorm_exp, FR_lnorm_sig + nop.i 999 +} +// Branch if cases 1, 2, 3 +{ .bbb +(p6) br.cond.spnt NEXT_EXPUP +(p7) br.cond.spnt NEXT_OVERFLOW +(p8) br.cond.spnt NEXT_EXPDOWN ;; +} + +// Branch if cases 4, 5 +{ .mbb + nop.m 999 +(p9) br.cond.spnt NEXT_NORM_TO_DENORM +(p10) br.cond.spnt NEXT_UNDERFLOW_TO_ZERO +;; +} + +// Here if no special cases +// Set p6 if result will be a denormal, so can force underflow flag +// Case 1: x_exp=min_exp, x_sig=unnormalized +// Case 2: x_exp 1003e => 3F(true) = 63(decimal) +// we have a significand of 64 bits 1.63-bits. +// If we multiply by 2^63, we no longer have a fractional part +// So input is an integer value already. + +// double +// if the exponent is >= 10033 => 34(true) = 52(decimal) +// 34 + 3ff = 433 +// we have a significand of 53 bits 1.52-bits. (implicit 1) +// If we multiply by 2^52, we no longer have a fractional part +// So input is an integer value already. + +// single +// if the exponent is > 10016 => 17(true) = 23(decimal) +// we have a significand of 24 bits 1.23-bits. (implicit 1) +// If we multiply by 2^23, we no longer have a fractional part +// So input is an integer value already. + +.section .text +GLOBAL_IEEE754_ENTRY(rint) + +{ .mfi + getf.exp rSignexp = f8 // Get signexp, recompute if unorm + fclass.m p7,p0 = f8, 0x0b // Test x unorm + addl rBigexp = 0x10033, r0 // Set exponent at which is integer +} +{ .mfi + mov rM1 = -1 // Set all ones + fcvt.fx.s1 fXInt = f8 // Convert to int in significand + mov rExpMask = 0x1FFFF // Form exponent mask +} +;; + +{ .mfi + mov rFpsr = ar40 // Read fpsr -- check rc.s0 + fclass.m p6,p0 = f8, 0x1e3 // Test x natval, nan, inf + nop.i 0 +} +{ .mfb + setf.sig fTmp = rM1 // Make const for setting inexact + fnorm.s1 fNormX = f8 // Normalize input +(p7) br.cond.spnt RINT_UNORM // Branch if x unorm +} +;; + + +RINT_COMMON: +// Return here from RINT_UNORM +{ .mfb + and rExp = rSignexp, rExpMask // Get biased exponent +(p6) fma.d.s0 f8 = f8, f1, f0 // Result if x natval, nan, inf +(p6) br.ret.spnt b0 // Exit if x natval, nan, inf +} +;; + +{ .mfi + mov rRcs0Mask = 0x0c00 // Mask for rc.s0 + fcvt.xf f8 = fXInt // Result assume |x| < 2^52 + cmp.ge p7,p8 = rExp, rBigexp // Is |x| >= 2^52? +} +;; + +// We must correct result if |x| >= 2^52 +{ .mfi + nop.m 0 +(p7) fma.d.s0 f8 = fNormX, f1, f0 // If |x| >= 2^52, result x + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcmp.eq.unc.s1 p0, p9 = f8, fNormX // Is result = x ? + nop.i 0 +} +{ .mfi + nop.m 0 +(p8) fmerge.s f8 = fNormX, f8 // Make sure sign rint(x) = sign x + nop.i 0 +} +;; + +{ .mfi +(p8) and rRcs0 = rFpsr, rRcs0Mask // Get rounding mode for sf0 + nop.f 0 + nop.i 0 +} +;; + +// If |x| < 2^52 we must test for other rounding modes +{ .mfi +(p8) cmp.ne.unc p10,p0 = rRcs0, r0 // Test for other rounding modes +(p9) fmpy.s0 fTmp = fTmp, fTmp // Dummy to set inexact + nop.i 0 +} +{ .mbb + nop.m 0 +(p10) br.cond.spnt RINT_NOT_ROUND_NEAREST // Branch if not round nearest + br.ret.sptk b0 // Exit main path if round nearest +} +;; + + + +RINT_UNORM: +// Here if x unorm +{ .mfb + getf.exp rSignexp = fNormX // Get signexp, recompute if unorm + fcmp.eq.s0 p7,p0 = f8, f0 // Dummy op to set denormal flag + br.cond.sptk RINT_COMMON // Return to main path +} +;; + +RINT_NOT_ROUND_NEAREST: +// Here if not round to nearest, and |x| < 2^52 +// Set rounding mode of s2 to that of s0, and repeat the conversion using s2 +{ .mfi + nop.m 0 + fsetc.s2 0x7f, 0x40 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcvt.fx.s2 fXInt = fNormX // Convert to int in significand + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcvt.xf f8 = fXInt // Expected result + nop.i 0 +} +;; + +// Be sure sign of result = sign of input. Fixes cases where result is 0. +{ .mfb + nop.m 0 + fmerge.s f8 = fNormX, f8 + br.ret.sptk b0 // Exit main path +} +;; + +GLOBAL_IEEE754_END(rint) diff --git a/sysdeps/ia64/fpu/s_rintf.S b/sysdeps/ia64/fpu/s_rintf.S new file mode 100644 index 0000000000..05d6b411f2 --- /dev/null +++ b/sysdeps/ia64/fpu/s_rintf.S @@ -0,0 +1,229 @@ +.file "rintf.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 02/08/01 Corrected behavior for all rounding modes. +// 05/20/02 Cleaned up namespace and sf0 syntax +// 01/20/03 Improved performance +//============================================================== + +// API +//============================================================== +// float rintf(float x) +//============================================================== + +// general input registers: +// r14 - r21 + +rSignexp = r14 +rExp = r15 +rExpMask = r16 +rBigexp = r17 +rM1 = r18 +rFpsr = r19 +rRcs0 = r20 +rRcs0Mask = r21 + +// floating-point registers: +// f8 - f11 + +fXInt = f9 +fNormX = f10 +fTmp = f11 + +// predicate registers used: +// p6 - p10 + +// Overview of operation +//============================================================== +// float rintf(float x) +// Return an integer value (represented as a float) that is x +// rounded to integer in current rounding mode +// Inexact is set if x != rint(x) +//============================================================== + +// double_extended +// if the exponent is > 1003e => 3F(true) = 63(decimal) +// we have a significand of 64 bits 1.63-bits. +// If we multiply by 2^63, we no longer have a fractional part +// So input is an integer value already. + +// double +// if the exponent is >= 10033 => 34(true) = 52(decimal) +// 34 + 3ff = 433 +// we have a significand of 53 bits 1.52-bits. (implicit 1) +// If we multiply by 2^52, we no longer have a fractional part +// So input is an integer value already. + +// single +// if the exponent is > 10016 => 17(true) = 23(decimal) +// we have a significand of 24 bits 1.23-bits. (implicit 1) +// If we multiply by 2^23, we no longer have a fractional part +// So input is an integer value already. + +.section .text +GLOBAL_IEEE754_ENTRY(rintf) + +{ .mfi + getf.exp rSignexp = f8 // Get signexp, recompute if unorm + fclass.m p7,p0 = f8, 0x0b // Test x unorm + addl rBigexp = 0x10016, r0 // Set exponent at which is integer +} +{ .mfi + mov rM1 = -1 // Set all ones + fcvt.fx.s1 fXInt = f8 // Convert to int in significand + mov rExpMask = 0x1FFFF // Form exponent mask +} +;; + +{ .mfi + mov rFpsr = ar40 // Read fpsr -- check rc.s0 + fclass.m p6,p0 = f8, 0x1e3 // Test x natval, nan, inf + nop.i 0 +} +{ .mfb + setf.sig fTmp = rM1 // Make const for setting inexact + fnorm.s1 fNormX = f8 // Normalize input +(p7) br.cond.spnt RINT_UNORM // Branch if x unorm +} +;; + + +RINT_COMMON: +// Return here from RINT_UNORM +{ .mfb + and rExp = rSignexp, rExpMask // Get biased exponent +(p6) fma.s.s0 f8 = f8, f1, f0 // Result if x natval, nan, inf +(p6) br.ret.spnt b0 // Exit if x natval, nan, inf +} +;; + +{ .mfi + mov rRcs0Mask = 0x0c00 // Mask for rc.s0 + fcvt.xf f8 = fXInt // Result assume |x| < 2^23 + cmp.ge p7,p8 = rExp, rBigexp // Is |x| >= 2^23? +} +;; + +// We must correct result if |x| >= 2^23 +{ .mfi + nop.m 0 +(p7) fma.s.s0 f8 = fNormX, f1, f0 // If |x| >= 2^23, result x + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcmp.eq.unc.s1 p0, p9 = f8, fNormX // Is result = x ? + nop.i 0 +} +{ .mfi + nop.m 0 +(p8) fmerge.s f8 = fNormX, f8 // Make sure sign rint(x) = sign x + nop.i 0 +} +;; + +{ .mfi +(p8) and rRcs0 = rFpsr, rRcs0Mask // Get rounding mode for sf0 + nop.f 0 + nop.i 0 +} +;; + +// If |x| < 2^23 we must test for other rounding modes +{ .mfi +(p8) cmp.ne.unc p10,p0 = rRcs0, r0 // Test for other rounding modes +(p9) fmpy.s0 fTmp = fTmp, fTmp // Dummy to set inexact + nop.i 0 +} +{ .mbb + nop.m 0 +(p10) br.cond.spnt RINT_NOT_ROUND_NEAREST // Branch if not round nearest + br.ret.sptk b0 // Exit main path if round nearest +} +;; + + + +RINT_UNORM: +// Here if x unorm +{ .mfb + getf.exp rSignexp = fNormX // Get signexp, recompute if unorm + fcmp.eq.s0 p7,p0 = f8, f0 // Dummy op to set denormal flag + br.cond.sptk RINT_COMMON // Return to main path +} +;; + +RINT_NOT_ROUND_NEAREST: +// Here if not round to nearest, and |x| < 2^23 +// Set rounding mode of s2 to that of s0, and repeat the conversion using s2 +{ .mfi + nop.m 0 + fsetc.s2 0x7f, 0x40 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcvt.fx.s2 fXInt = fNormX // Convert to int in significand + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcvt.xf f8 = fXInt // Expected result + nop.i 0 +} +;; + +// Be sure sign of result = sign of input. Fixes cases where result is 0. +{ .mfb + nop.m 0 + fmerge.s f8 = fNormX, f8 + br.ret.sptk b0 // Exit main path +} +;; + +GLOBAL_IEEE754_END(rintf) diff --git a/sysdeps/ia64/fpu/s_rintl.S b/sysdeps/ia64/fpu/s_rintl.S new file mode 100644 index 0000000000..b5402149ec --- /dev/null +++ b/sysdeps/ia64/fpu/s_rintl.S @@ -0,0 +1,229 @@ +.file "rintl.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 02/08/01 Corrected behavior for all rounding modes. +// 05/20/02 Cleaned up namespace and sf0 syntax +// 01/20/03 Improved performance +//============================================================== + +// API +//============================================================== +// long double rintl(long double x) +//============================================================== + +// general input registers: +// r14 - r21 + +rSignexp = r14 +rExp = r15 +rExpMask = r16 +rBigexp = r17 +rM1 = r18 +rFpsr = r19 +rRcs0 = r20 +rRcs0Mask = r21 + +// floating-point registers: +// f8 - f11 + +fXInt = f9 +fNormX = f10 +fTmp = f11 + +// predicate registers used: +// p6 - p10 + +// Overview of operation +//============================================================== +// long double rintl(long double x) +// Return an integer value (represented as a long double) that is x +// rounded to integer in current rounding mode +// Inexact is set if x != rint(x) +//============================================================== + +// double_extended +// if the exponent is > 1003e => 3F(true) = 63(decimal) +// we have a significand of 64 bits 1.63-bits. +// If we multiply by 2^63, we no longer have a fractional part +// So input is an integer value already. + +// double +// if the exponent is >= 10033 => 34(true) = 52(decimal) +// 34 + 3ff = 433 +// we have a significand of 53 bits 1.52-bits. (implicit 1) +// If we multiply by 2^52, we no longer have a fractional part +// So input is an integer value already. + +// single +// if the exponent is > 10016 => 17(true) = 23(decimal) +// we have a significand of 24 bits 1.23-bits. (implicit 1) +// If we multiply by 2^23, we no longer have a fractional part +// So input is an integer value already. + +.section .text +GLOBAL_IEEE754_ENTRY(rintl) + +{ .mfi + getf.exp rSignexp = f8 // Get signexp, recompute if unorm + fclass.m p7,p0 = f8, 0x0b // Test x unorm + addl rBigexp = 0x1003e, r0 // Set exponent at which is integer +} +{ .mfi + mov rM1 = -1 // Set all ones + fcvt.fx.s1 fXInt = f8 // Convert to int in significand + mov rExpMask = 0x1FFFF // Form exponent mask +} +;; + +{ .mfi + mov rFpsr = ar40 // Read fpsr -- check rc.s0 + fclass.m p6,p0 = f8, 0x1e3 // Test x natval, nan, inf + nop.i 0 +} +{ .mfb + setf.sig fTmp = rM1 // Make const for setting inexact + fnorm.s1 fNormX = f8 // Normalize input +(p7) br.cond.spnt RINT_UNORM // Branch if x unorm +} +;; + + +RINT_COMMON: +// Return here from RINT_UNORM +{ .mfb + and rExp = rSignexp, rExpMask // Get biased exponent +(p6) fma.s0 f8 = f8, f1, f0 // Result if x natval, nan, inf +(p6) br.ret.spnt b0 // Exit if x natval, nan, inf +} +;; + +{ .mfi + mov rRcs0Mask = 0x0c00 // Mask for rc.s0 + fcvt.xf f8 = fXInt // Result assume |x| < 2^63 + cmp.ge p7,p8 = rExp, rBigexp // Is |x| >= 2^63? +} +;; + +// We must correct result if |x| >= 2^63 +{ .mfi + nop.m 0 +(p7) fma.s0 f8 = fNormX, f1, f0 // If |x| >= 2^63, result x + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcmp.eq.unc.s1 p0, p9 = f8, fNormX // Is result = x ? + nop.i 0 +} +{ .mfi + nop.m 0 +(p8) fmerge.s f8 = fNormX, f8 // Make sure sign rint(x) = sign x + nop.i 0 +} +;; + +{ .mfi +(p8) and rRcs0 = rFpsr, rRcs0Mask // Get rounding mode for sf0 + nop.f 0 + nop.i 0 +} +;; + +// If |x| < 2^63 we must test for other rounding modes +{ .mfi +(p8) cmp.ne.unc p10,p0 = rRcs0, r0 // Test for other rounding modes +(p9) fmpy.s0 fTmp = fTmp, fTmp // Dummy to set inexact + nop.i 0 +} +{ .mbb + nop.m 0 +(p10) br.cond.spnt RINT_NOT_ROUND_NEAREST // Branch if not round nearest + br.ret.sptk b0 // Exit main path if round nearest +} +;; + + + +RINT_UNORM: +// Here if x unorm +{ .mfb + getf.exp rSignexp = fNormX // Get signexp, recompute if unorm + fcmp.eq.s0 p7,p0 = f8, f0 // Dummy op to set denormal flag + br.cond.sptk RINT_COMMON // Return to main path +} +;; + +RINT_NOT_ROUND_NEAREST: +// Here if not round to nearest, and |x| < 2^63 +// Set rounding mode of s2 to that of s0, and repeat the conversion using s2 +{ .mfi + nop.m 0 + fsetc.s2 0x7f, 0x40 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcvt.fx.s2 fXInt = fNormX // Convert to int in significand + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcvt.xf f8 = fXInt // Expected result + nop.i 0 +} +;; + +// Be sure sign of result = sign of input. Fixes cases where result is 0. +{ .mfb + nop.m 0 + fmerge.s f8 = fNormX, f8 + br.ret.sptk b0 // Exit main path +} +;; + +GLOBAL_IEEE754_END(rintl) diff --git a/sysdeps/ia64/fpu/s_round.S b/sysdeps/ia64/fpu/s_round.S new file mode 100644 index 0000000000..ed5ffae205 --- /dev/null +++ b/sysdeps/ia64/fpu/s_round.S @@ -0,0 +1,233 @@ +.file "round.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 10/25/00 Initial version +// 06/14/01 Changed cmp to an equivalent form +// 05/20/02 Cleaned up namespace and sf0 syntax +// 01/20/03 Improved performance and reduced code size +// 04/18/03 Eliminate possible WAW dependency warning +// 09/03/03 Improved performance +//============================================================== + +// API +//============================================================== +// double round(double x) +//============================================================== + +// general input registers: +// r14 - r18 + +rSignexp = r14 +rExp = r15 +rExpMask = r16 +rBigexp = r17 +rExpHalf = r18 + +// floating-point registers: +// f8 - f13 + +fXtruncInt = f9 +fNormX = f10 +fHalf = f11 +fInc = f12 +fRem = f13 + +// predicate registers used: +// p6 - p10 + +// Overview of operation +//============================================================== +// double round(double x) +// Return an integer value (represented as a double) that is x +// rounded to nearest integer, halfway cases rounded away from +// zero. +// if x>0 result = trunc(x+0.5) +// if x<0 result = trunc(x-0.5) +// +//============================================================== + +// double_extended +// if the exponent is > 1003e => 3F(true) = 63(decimal) +// we have a significand of 64 bits 1.63-bits. +// If we multiply by 2^63, we no longer have a fractional part +// So input is an integer value already. + +// double +// if the exponent is >= 10033 => 34(true) = 52(decimal) +// 34 + 3ff = 433 +// we have a significand of 53 bits 1.52-bits. (implicit 1) +// If we multiply by 2^52, we no longer have a fractional part +// So input is an integer value already. + +// single +// if the exponent is > 10016 => 17(true) = 23(decimal) +// we have a significand of 24 bits 1.23-bits. (implicit 1) +// If we multiply by 2^23, we no longer have a fractional part +// So input is an integer value already. + + +.section .text +GLOBAL_LIBM_ENTRY(round) + +{ .mfi + getf.exp rSignexp = f8 // Get signexp, recompute if unorm + fcvt.fx.trunc.s1 fXtruncInt = f8 // Convert to int in significand + addl rBigexp = 0x10033, r0 // Set exponent at which is integer +} +{ .mfi + mov rExpHalf = 0x0FFFE // Form sign and exponent of 0.5 + fnorm.s1 fNormX = f8 // Normalize input + mov rExpMask = 0x1FFFF // Form exponent mask +} +;; + +{ .mfi + setf.exp fHalf = rExpHalf // Form 0.5 + fclass.m p7,p0 = f8, 0x0b // Test x unorm + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + fclass.m p6,p0 = f8, 0x1e3 // Test x natval, nan, inf +(p7) br.cond.spnt ROUND_UNORM // Branch if x unorm +} +;; + +ROUND_COMMON: +// Return here from ROUND_UNORM +{ .mfb + nop.m 0 + fcmp.lt.s1 p8,p9 = f8, f0 // Test if x < 0 +(p6) br.cond.spnt ROUND_SPECIAL // Exit if x natval, nan, inf +} +;; + +{ .mfi + nop.m 0 + fcvt.xf f8 = fXtruncInt // Pre-Result if 0.5 <= |x| < 2^52 + nop.i 0 +} +;; + +{ .mfi + and rExp = rSignexp, rExpMask // Get biased exponent + fmerge.s fInc = fNormX, f1 // Form increment if |rem| >= 0.5 + nop.i 0 +} +;; + +{ .mmi + cmp.lt p6,p0 = rExp, rExpHalf // Is |x| < 0.5? + cmp.ge p7,p0 = rExp, rBigexp // Is |x| >= 2^52? + cmp.lt p10,p0 = rExp, rExpHalf // Is |x| < 0.5? +} +;; + +// We must correct result if |x| < 0.5, or |x| >= 2^52 +.pred.rel "mutex",p6,p7 +{ .mfi + nop.m 0 +(p6) fmerge.s f8 = fNormX, f0 // If |x| < 0.5, result sgn(x)*0 + nop.i 0 +} +{ .mfb +(p7) cmp.eq p10,p0 = r0, r0 // Also turn on p10 if |x| >= 2^52 +(p7) fma.d.s0 f8 = fNormX, f1, f0 // If |x| >= 2^52, result x +(p10) br.ret.spnt b0 // Exit |x| < 0.5 or |x| >= 2^52 +} +;; + +// Here if 0.5 <= |x| < 2^52 +{ .mfi + nop.m 0 +(p9) fms.s1 fRem = fNormX, f1, f8 // Get remainder = x - trunc(x) + nop.i 0 +} +{ .mfi + nop.m 0 +(p8) fms.s1 fRem = f8, f1, fNormX // Get remainder = trunc(x) - x + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcmp.ge.s1 p9,p0 = fRem, fHalf // Test |rem| >= 0.5 + nop.i 0 +} +;; + +// If x < 0 and remainder <= -0.5, then subtract 1 from result +// If x > 0 and remainder >= +0.5, then add 1 to result +{ .mfb + nop.m 0 +(p9) fma.d.s0 f8 = f8, f1, fInc + br.ret.sptk b0 +} +;; + + +ROUND_SPECIAL: +// Here if x natval, nan, inf +{ .mfb + nop.m 0 + fma.d.s0 f8 = f8, f1, f0 + br.ret.sptk b0 +} +;; + +ROUND_UNORM: +// Here if x unorm +{ .mfi + getf.exp rSignexp = fNormX // Get signexp, recompute if unorm + fcmp.eq.s0 p7,p0 = f8, f0 // Dummy op to set denormal flag + nop.i 0 +} +{ .mfb + nop.m 0 + fcvt.fx.trunc.s1 fXtruncInt = fNormX // Convert to int in significand + br.cond.sptk ROUND_COMMON // Return to main path +} +;; + +GLOBAL_LIBM_END(round) diff --git a/sysdeps/ia64/fpu/s_roundf.S b/sysdeps/ia64/fpu/s_roundf.S new file mode 100644 index 0000000000..7cec860aa1 --- /dev/null +++ b/sysdeps/ia64/fpu/s_roundf.S @@ -0,0 +1,233 @@ +.file "roundf.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 10/25/00 Initial version +// 06/14/01 Changed cmp to an equivalent form +// 05/20/02 Cleaned up namespace and sf0 syntax +// 01/20/03 Improved performance and reduced code size +// 04/18/03 Eliminate possible WAW dependency warning +// 09/03/03 Improved performance +//============================================================== + +// API +//============================================================== +// float roundf(float x) +//============================================================== + +// general input registers: +// r14 - r18 + +rSignexp = r14 +rExp = r15 +rExpMask = r16 +rBigexp = r17 +rExpHalf = r18 + +// floating-point registers: +// f8 - f13 + +fXtruncInt = f9 +fNormX = f10 +fHalf = f11 +fInc = f12 +fRem = f13 + +// predicate registers used: +// p6 - p10 + +// Overview of operation +//============================================================== +// float roundf(float x) +// Return an integer value (represented as a float) that is x +// rounded to nearest integer, halfway cases rounded away from +// zero. +// if x>0 result = trunc(x+0.5) +// if x<0 result = trunc(x-0.5) +// +//============================================================== + +// double_extended +// if the exponent is > 1003e => 3F(true) = 63(decimal) +// we have a significand of 64 bits 1.63-bits. +// If we multiply by 2^63, we no longer have a fractional part +// So input is an integer value already. + +// double +// if the exponent is >= 10033 => 34(true) = 52(decimal) +// 34 + 3ff = 433 +// we have a significand of 53 bits 1.52-bits. (implicit 1) +// If we multiply by 2^52, we no longer have a fractional part +// So input is an integer value already. + +// single +// if the exponent is > 10016 => 17(true) = 23(decimal) +// we have a significand of 24 bits 1.23-bits. (implicit 1) +// If we multiply by 2^23, we no longer have a fractional part +// So input is an integer value already. + + +.section .text +GLOBAL_LIBM_ENTRY(roundf) + +{ .mfi + getf.exp rSignexp = f8 // Get signexp, recompute if unorm + fcvt.fx.trunc.s1 fXtruncInt = f8 // Convert to int in significand + addl rBigexp = 0x10016, r0 // Set exponent at which is integer +} +{ .mfi + mov rExpHalf = 0x0FFFE // Form sign and exponent of 0.5 + fnorm.s1 fNormX = f8 // Normalize input + mov rExpMask = 0x1FFFF // Form exponent mask +} +;; + +{ .mfi + setf.exp fHalf = rExpHalf // Form 0.5 + fclass.m p7,p0 = f8, 0x0b // Test x unorm + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + fclass.m p6,p0 = f8, 0x1e3 // Test x natval, nan, inf +(p7) br.cond.spnt ROUND_UNORM // Branch if x unorm +} +;; + +ROUND_COMMON: +// Return here from ROUND_UNORM +{ .mfb + nop.m 0 + fcmp.lt.s1 p8,p9 = f8, f0 // Test if x < 0 +(p6) br.cond.spnt ROUND_SPECIAL // Exit if x natval, nan, inf +} +;; + +{ .mfi + nop.m 0 + fcvt.xf f8 = fXtruncInt // Pre-Result if 0.5 <= |x| < 2^23 + nop.i 0 +} +;; + +{ .mfi + and rExp = rSignexp, rExpMask // Get biased exponent + fmerge.s fInc = fNormX, f1 // Form increment if |rem| >= 0.5 + nop.i 0 +} +;; + +{ .mmi + cmp.lt p6,p0 = rExp, rExpHalf // Is |x| < 0.5? + cmp.ge p7,p0 = rExp, rBigexp // Is |x| >= 2^23? + cmp.lt p10,p0 = rExp, rExpHalf // Is |x| < 0.5? +} +;; + +// We must correct result if |x| < 0.5, or |x| >= 2^23 +.pred.rel "mutex",p6,p7 +{ .mfi + nop.m 0 +(p6) fmerge.s f8 = fNormX, f0 // If |x| < 0.5, result sgn(x)*0 + nop.i 0 +} +{ .mfb +(p7) cmp.eq p10,p0 = r0, r0 // Also turn on p10 if |x| >= 2^23 +(p7) fma.s.s0 f8 = fNormX, f1, f0 // If |x| >= 2^23, result x +(p10) br.ret.spnt b0 // Exit |x| < 0.5 or |x| >= 2^23 +} +;; + +// Here if 0.5 <= |x| < 2^23 +{ .mfi + nop.m 0 +(p9) fms.s1 fRem = fNormX, f1, f8 // Get remainder = x - trunc(x) + nop.i 0 +} +{ .mfi + nop.m 0 +(p8) fms.s1 fRem = f8, f1, fNormX // Get remainder = trunc(x) - x + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcmp.ge.s1 p9,p0 = fRem, fHalf // Test |rem| >= 0.5 + nop.i 0 +} +;; + +// If x < 0 and remainder <= -0.5, then subtract 1 from result +// If x > 0 and remainder >= +0.5, then add 1 to result +{ .mfb + nop.m 0 +(p9) fma.s.s0 f8 = f8, f1, fInc + br.ret.sptk b0 +} +;; + + +ROUND_SPECIAL: +// Here if x natval, nan, inf +{ .mfb + nop.m 0 + fma.s.s0 f8 = f8, f1, f0 + br.ret.sptk b0 +} +;; + +ROUND_UNORM: +// Here if x unorm +{ .mfi + getf.exp rSignexp = fNormX // Get signexp, recompute if unorm + fcmp.eq.s0 p7,p0 = f8, f0 // Dummy op to set denormal flag + nop.i 0 +} +{ .mfb + nop.m 0 + fcvt.fx.trunc.s1 fXtruncInt = fNormX // Convert to int in significand + br.cond.sptk ROUND_COMMON // Return to main path +} +;; + +GLOBAL_LIBM_END(roundf) diff --git a/sysdeps/ia64/fpu/s_roundl.S b/sysdeps/ia64/fpu/s_roundl.S new file mode 100644 index 0000000000..da6cbfe228 --- /dev/null +++ b/sysdeps/ia64/fpu/s_roundl.S @@ -0,0 +1,233 @@ +.file "roundl.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 10/25/00 Initial version +// 06/14/01 Changed cmp to an equivalent form +// 05/20/02 Cleaned up namespace and sf0 syntax +// 01/20/03 Improved performance and reduced code size +// 04/18/03 Eliminate possible WAW dependency warning +// 09/03/03 Improved performance +//============================================================== + +// API +//============================================================== +// long double roundl(long double x) +//============================================================== + +// general input registers: +// r14 - r18 + +rSignexp = r14 +rExp = r15 +rExpMask = r16 +rBigexp = r17 +rExpHalf = r18 + +// floating-point registers: +// f8 - f13 + +fXtruncInt = f9 +fNormX = f10 +fHalf = f11 +fInc = f12 +fRem = f13 + +// predicate registers used: +// p6 - p10 + +// Overview of operation +//============================================================== +// long double roundl(long double x) +// Return an integer value (represented as a long double) that is x +// rounded to nearest integer, halfway cases rounded away from +// zero. +// if x>0 result = trunc(x+0.5) +// if x<0 result = trunc(x-0.5) +// +//============================================================== + +// double_extended +// if the exponent is > 1003e => 3F(true) = 63(decimal) +// we have a significand of 64 bits 1.63-bits. +// If we multiply by 2^63, we no longer have a fractional part +// So input is an integer value already. + +// double +// if the exponent is >= 10033 => 34(true) = 52(decimal) +// 34 + 3ff = 433 +// we have a significand of 53 bits 1.52-bits. (implicit 1) +// If we multiply by 2^52, we no longer have a fractional part +// So input is an integer value already. + +// single +// if the exponent is > 10016 => 17(true) = 23(decimal) +// we have a significand of 24 bits 1.23-bits. (implicit 1) +// If we multiply by 2^23, we no longer have a fractional part +// So input is an integer value already. + + +.section .text +GLOBAL_LIBM_ENTRY(roundl) + +{ .mfi + getf.exp rSignexp = f8 // Get signexp, recompute if unorm + fcvt.fx.trunc.s1 fXtruncInt = f8 // Convert to int in significand + addl rBigexp = 0x1003e, r0 // Set exponent at which is integer +} +{ .mfi + mov rExpHalf = 0x0FFFE // Form sign and exponent of 0.5 + fnorm.s1 fNormX = f8 // Normalize input + mov rExpMask = 0x1FFFF // Form exponent mask +} +;; + +{ .mfi + setf.exp fHalf = rExpHalf // Form 0.5 + fclass.m p7,p0 = f8, 0x0b // Test x unorm + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + fclass.m p6,p0 = f8, 0x1e3 // Test x natval, nan, inf +(p7) br.cond.spnt ROUND_UNORM // Branch if x unorm +} +;; + +ROUND_COMMON: +// Return here from ROUND_UNORM +{ .mfb + nop.m 0 + fcmp.lt.s1 p8,p9 = f8, f0 // Test if x < 0 +(p6) br.cond.spnt ROUND_SPECIAL // Exit if x natval, nan, inf +} +;; + +{ .mfi + nop.m 0 + fcvt.xf f8 = fXtruncInt // Pre-Result if 0.5 <= |x| < 2^63 + nop.i 0 +} +;; + +{ .mfi + and rExp = rSignexp, rExpMask // Get biased exponent + fmerge.s fInc = fNormX, f1 // Form increment if |rem| >= 0.5 + nop.i 0 +} +;; + +{ .mmi + cmp.lt p6,p0 = rExp, rExpHalf // Is |x| < 0.5? + cmp.ge p7,p0 = rExp, rBigexp // Is |x| >= 2^63? + cmp.lt p10,p0 = rExp, rExpHalf // Is |x| < 0.5? +} +;; + +// We must correct result if |x| < 0.5, or |x| >= 2^63 +.pred.rel "mutex",p6,p7 +{ .mfi + nop.m 0 +(p6) fmerge.s f8 = fNormX, f0 // If |x| < 0.5, result sgn(x)*0 + nop.i 0 +} +{ .mfb +(p7) cmp.eq p10,p0 = r0, r0 // Also turn on p10 if |x| >= 2^63 +(p7) fma.s0 f8 = fNormX, f1, f0 // If |x| >= 2^63, result x +(p10) br.ret.spnt b0 // Exit |x| < 0.5 or |x| >= 2^63 +} +;; + +// Here if 0.5 <= |x| < 2^63 +{ .mfi + nop.m 0 +(p9) fms.s1 fRem = fNormX, f1, f8 // Get remainder = x - trunc(x) + nop.i 0 +} +{ .mfi + nop.m 0 +(p8) fms.s1 fRem = f8, f1, fNormX // Get remainder = trunc(x) - x + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcmp.ge.s1 p9,p0 = fRem, fHalf // Test |rem| >= 0.5 + nop.i 0 +} +;; + +// If x < 0 and remainder <= -0.5, then subtract 1 from result +// If x > 0 and remainder >= +0.5, then add 1 to result +{ .mfb + nop.m 0 +(p9) fma.s0 f8 = f8, f1, fInc + br.ret.sptk b0 +} +;; + + +ROUND_SPECIAL: +// Here if x natval, nan, inf +{ .mfb + nop.m 0 + fma.s0 f8 = f8, f1, f0 + br.ret.sptk b0 +} +;; + +ROUND_UNORM: +// Here if x unorm +{ .mfi + getf.exp rSignexp = fNormX // Get signexp, recompute if unorm + fcmp.eq.s0 p7,p0 = f8, f0 // Dummy op to set denormal flag + nop.i 0 +} +{ .mfb + nop.m 0 + fcvt.fx.trunc.s1 fXtruncInt = fNormX // Convert to int in significand + br.cond.sptk ROUND_COMMON // Return to main path +} +;; + +GLOBAL_LIBM_END(roundl) diff --git a/sysdeps/ia64/fpu/s_scalblnf.c b/sysdeps/ia64/fpu/s_scalblnf.c new file mode 100644 index 0000000000..2fa51ba11b --- /dev/null +++ b/sysdeps/ia64/fpu/s_scalblnf.c @@ -0,0 +1,61 @@ +/* file: scalblnf.c */ + + +// Copyright (c) 2000, 2001, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// + +#include "libm_support.h" + +float __libm_scalblnf(float, long int, int); + + +float scalblnf(float x, long int n) +{ + +#ifdef SIZE_LONG_INT_64 + return __libm_scalblnf(x,n,1); +#else + +#ifdef SIZE_LONG_INT_32 + return __libm_scalblnf(x,n,0); +#endif + +#endif + +} diff --git a/sysdeps/ia64/fpu/s_scalbn.c b/sysdeps/ia64/fpu/s_scalbn.c new file mode 100644 index 0000000000..1f57141310 --- /dev/null +++ b/sysdeps/ia64/fpu/s_scalbn.c @@ -0,0 +1,61 @@ +/* file: scalbn.c */ + + +// Copyright (c) 2000, 2001, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// + +#include "libm_support.h" + +double __libm_scalbn(double, int, int); + + +double scalbn(double x, int n) +{ + +#ifdef SIZE_INT_64 + return __libm_scalbn(x,n,1); +#else + +#ifdef SIZE_INT_32 + return __libm_scalbn(x,n,0); +#endif + +#endif + +} diff --git a/sysdeps/ia64/fpu/s_scalbnf.c b/sysdeps/ia64/fpu/s_scalbnf.c new file mode 100644 index 0000000000..97c06da08a --- /dev/null +++ b/sysdeps/ia64/fpu/s_scalbnf.c @@ -0,0 +1,61 @@ +/* file: scalbnf.c */ + + +// Copyright (c) 2000, 2001, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// + +#include "libm_support.h" + +float __libm_scalbnf(float, int, int); + + +float scalbnf(float x, int n) +{ + +#ifdef SIZE_INT_64 + return __libm_scalbnf(x,n,1); +#else + +#ifdef SIZE_INT_32 + return __libm_scalbnf(x,n,0); +#endif + +#endif + +} diff --git a/sysdeps/ia64/fpu/s_scalbnl.c b/sysdeps/ia64/fpu/s_scalbnl.c new file mode 100644 index 0000000000..d7a81dfc55 --- /dev/null +++ b/sysdeps/ia64/fpu/s_scalbnl.c @@ -0,0 +1,61 @@ +/* file: scalbnl.c */ + + +// Copyright (c) 2000, 2001, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// + +#include "libm_support.h" + +long double __libm_scalbnl(long double, int, int); + + +long double scalbnl(long double x, int n) +{ + +#ifdef SIZE_INT_64 + return __libm_scalbnl(x,n,1); +#else + +#ifdef SIZE_INT_32 + return __libm_scalbnl(x,n,0); +#endif + +#endif + +} diff --git a/sysdeps/ia64/fpu/s_signbit.S b/sysdeps/ia64/fpu/s_signbit.S new file mode 100644 index 0000000000..5703080fd8 --- /dev/null +++ b/sysdeps/ia64/fpu/s_signbit.S @@ -0,0 +1,37 @@ +/* Copyright (C) 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 + 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. */ + +#include +#undef ret + +ENTRY (__signbit) +{ +.mfi + fclass.m p6, p7 = farg0, @zero | @unorm | @norm | @inf | @neg + ;; +} +{ +.mib +(p6) mov ret0 = 1 +(p7) mov ret0 = 0 + br.ret.sptk.many rp +} +END (__signbit) + +strong_alias (__signbit, __signbitf) +strong_alias (__signbit, __signbitl) diff --git a/sysdeps/ia64/fpu/s_signbitf.S b/sysdeps/ia64/fpu/s_signbitf.S new file mode 100644 index 0000000000..34eadfca36 --- /dev/null +++ b/sysdeps/ia64/fpu/s_signbitf.S @@ -0,0 +1 @@ +/* __signbitf is in s_signbit.S. */ diff --git a/sysdeps/ia64/fpu/s_signbitl.S b/sysdeps/ia64/fpu/s_signbitl.S new file mode 100644 index 0000000000..52d7678526 --- /dev/null +++ b/sysdeps/ia64/fpu/s_signbitl.S @@ -0,0 +1 @@ +/* __signbitl is in s_signbit.S. */ diff --git a/sysdeps/ia64/fpu/s_significand.S b/sysdeps/ia64/fpu/s_significand.S new file mode 100644 index 0000000000..720e043e5c --- /dev/null +++ b/sysdeps/ia64/fpu/s_significand.S @@ -0,0 +1,153 @@ +.file "significand.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 04/04/00 Unwind support added +// 05/31/00 Fixed bug when x a double-extended denormal +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// +// API +//============================================================== +// double significand(double x) +// +// Overview of operation +//============================================================== +// If x = sig * 2**n with 1 <= sig < 2 +// significand returns sig +// +// predicate registers used: +// p6, p7 +// +// floating-point registers used: +// f8, f9, f10 + +.section .text +GLOBAL_LIBM_ENTRY(significand) + +// qnan snan inf norm unorm 0 -+ +// 1 1 1 0 0 1 11 + +// f10 gets f8(sign) with f1(exp,significand) +{ .mfi + nop.m 999 + fmerge.s f10 = f8,f1 + nop.i 999 +} +{ .mfi + nop.m 999 + fnorm.s0 f9 = f8 + nop.i 999 ;; +} + +// Test for denormal input +{ .mfi + nop.m 999 + fclass.m.unc p7,p0 = f8, 0x0b + nop.i 999 ;; +} + +// p6 = TRUE ==> x is not (nan,inf,0) +// return sign(f8) exp(f1) significand(f8) +// else x is (nan,inf,0) +// return sign(f8) exp(f8) significand(f8), normalized. +{ .mfi + nop.m 999 + fclass.m.unc p0,p6 = f8, 0xe7 + nop.i 999 ;; +} + +{ .mmb + nop.m 999 + nop.m 999 +(p7) br.cond.spnt SIGNIFICAND_DENORM ;; // Branch if x denormal +} + +{ .mfi + nop.m 999 +(p6) fmerge.se f8 = f10,f8 + nop.i 999 ;; +} + +{ .mfb + nop.m 999 + fnorm.d.s0 f8 = f8 + br.ret.sptk b0 ;; +} + +SIGNIFICAND_DENORM: +// Here if x denorm +{ .mfi + nop.m 999 + fmerge.se f8 = f10,f9 + nop.i 999 ;; +} + +// Check if fnorm(x) still denormal, means x double-extended denormal +{ .mfi + nop.m 999 + fclass.m.unc p7,p0 = f9, 0x0b + nop.i 999 ;; +} + +// This will be the final result unless x double-extended denormal +{ .mfi + nop.m 999 + fnorm.d.s0 f8 = f8 + nop.i 999 ;; +} + +// If x double-extended denorm, then significand ok, but must merge in +// correct signexp +{ .mfi + nop.m 999 +(p7) fmerge.se f8 = f10,f8 + nop.i 999 ;; +} + +// Final normalization if x double-extended denorm +{ .mfb + nop.m 999 +(p7) fnorm.d.s0 f8 = f8 + br.ret.sptk b0 ;; +} + +GLOBAL_LIBM_END(significand) diff --git a/sysdeps/ia64/fpu/s_significandf.S b/sysdeps/ia64/fpu/s_significandf.S new file mode 100644 index 0000000000..5c8299b944 --- /dev/null +++ b/sysdeps/ia64/fpu/s_significandf.S @@ -0,0 +1,152 @@ +.file "significandf.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 02/03/00 Modified to improve speed +// 05/31/00 Fixed bug when x a double-extended denormal +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// +// API +//============================================================== +// float significandf(float x) +// Overview of operation +//============================================================== +// If x = sig * 2**n with 1 <= sig < 2 +// significandf returns sig +// +// predicate registers used: +// p6, p7 +// +// floating-point registers used: +// f8, f9, f10 + +.section .text +GLOBAL_LIBM_ENTRY(significandf) + +// qnan snan inf norm unorm 0 -+ +// 1 1 1 0 0 1 11 + +// f10 gets f8(sign) with f1(exp,significand) +{ .mfi + nop.m 999 + fmerge.s f10 = f8,f1 + nop.i 999 +} +{ .mfi + nop.m 999 + fnorm.s0 f9 = f8 + nop.i 999 ;; +} + +// Test for denormal input +{ .mfi + nop.m 999 + fclass.m.unc p7,p0 = f8, 0x0b + nop.i 999 ;; +} + +// p6 = TRUE ==> x is not (nan,inf,0) +// return sign(f8) exp(f1) significand(f8) +// else x is (nan,inf,0) +// return sign(f8) exp(f8) significand(f8), normalized. +{ .mfi + nop.m 999 + fclass.m.unc p0,p6 = f8, 0xe7 + nop.i 999 ;; +} + +{ .mmb + nop.m 999 + nop.m 999 +(p7) br.cond.spnt SIGNIFICAND_DENORM ;; // Branch if x denormal +} + +{ .mfi + nop.m 999 +(p6) fmerge.se f8 = f10,f8 + nop.i 999 ;; +} + +{ .mfb + nop.m 999 + fnorm.s.s0 f8 = f8 + br.ret.sptk b0 ;; +} + +SIGNIFICAND_DENORM: +// Here if x denorm +{ .mfi + nop.m 999 + fmerge.se f8 = f10,f9 + nop.i 999 ;; +} + +// Check if fnorm(x) still denormal, means x double-extended denormal +{ .mfi + nop.m 999 + fclass.m.unc p7,p0 = f9, 0x0b + nop.i 999 ;; +} + +// This will be the final result unless x double-extended denormal +{ .mfi + nop.m 999 + fnorm.s.s0 f8 = f8 + nop.i 999 ;; +} + +// If x double-extended denorm, then significand ok, but must merge in +// correct signexp +{ .mfi + nop.m 999 +(p7) fmerge.se f8 = f10,f8 + nop.i 999 ;; +} + +// Final normalization if x double-extended denorm +{ .mfb + nop.m 999 +(p7) fnorm.s.s0 f8 = f8 + br.ret.sptk b0 ;; +} + +GLOBAL_LIBM_END(significandf) diff --git a/sysdeps/ia64/fpu/s_significandl.S b/sysdeps/ia64/fpu/s_significandl.S new file mode 100644 index 0000000000..f62df4310c --- /dev/null +++ b/sysdeps/ia64/fpu/s_significandl.S @@ -0,0 +1,153 @@ +.file "significandl.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 02/03/00 Modified to improve speed +// 05/31/00 Fixed bug when x a double-extended denormal +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// +// API +//============================================================== +// long double significandl(long double x) +// +// Overview of operation +//============================================================== +// If x = sig * 2**n with 1 <= sig < 2 +// significandl returns sig +// +// predicate registers used: +// p6, p7 +// +// floating-point registers used: +// f8, f9, f10 + +.section .text +GLOBAL_LIBM_ENTRY(significandl) + +// qnan snan inf norm unorm 0 -+ +// 1 1 1 0 0 1 11 + +// f10 gets f8(sign) with f1(exp,significand) +{ .mfi + nop.m 999 + fmerge.s f10 = f8,f1 + nop.i 999 +} +{ .mfi + nop.m 999 + fnorm.s0 f9 = f8 + nop.i 999 ;; +} + +// Test for denormal input +{ .mfi + nop.m 999 + fclass.m.unc p7,p0 = f8, 0x0b + nop.i 999 ;; +} + +// p6 = TRUE ==> x is not (nan,inf,0) +// return sign(f8) exp(f1) significand(f8) +// else x is (nan,inf,0) +// return sign(f8) exp(f8) significand(f8), normalized. +{ .mfi + nop.m 999 + fclass.m.unc p0,p6 = f8, 0xe7 + nop.i 999 ;; +} + +{ .mmb + nop.m 999 + nop.m 999 +(p7) br.cond.spnt SIGNIFICAND_DENORM ;; // Branch if x denormal +} + +{ .mfi + nop.m 999 +(p6) fmerge.se f8 = f10,f8 + nop.i 999 ;; +} + +{ .mfb + nop.m 999 + fnorm.s0 f8 = f8 + br.ret.sptk b0 ;; +} + +SIGNIFICAND_DENORM: +// Here if x denorm +{ .mfi + nop.m 999 + fmerge.se f8 = f10,f9 + nop.i 999 ;; +} + +// Check if fnorm(x) still denormal, means x double-extended denormal +{ .mfi + nop.m 999 + fclass.m.unc p7,p0 = f9, 0x0b + nop.i 999 ;; +} + +// This will be the final result unless x double-extended denormal +{ .mfi + nop.m 999 + fnorm.s0 f8 = f8 + nop.i 999 ;; +} + +// If x double-extended denorm, then significand ok, but must merge in +// correct signexp +{ .mfi + nop.m 999 +(p7) fmerge.se f8 = f10,f8 + nop.i 999 ;; +} + +// Final normalization if x double-extended denorm +{ .mfb + nop.m 999 +(p7) fnorm.s0 f8 = f8 + br.ret.sptk b0 ;; +} + +GLOBAL_LIBM_END(significandl) diff --git a/sysdeps/ia64/fpu/s_sin.c b/sysdeps/ia64/fpu/s_sin.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/s_sin.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/s_sincos.c b/sysdeps/ia64/fpu/s_sincos.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/s_sincos.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/s_sincosf.c b/sysdeps/ia64/fpu/s_sincosf.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/s_sincosf.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/s_sincosl.c b/sysdeps/ia64/fpu/s_sincosl.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/s_sincosl.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/s_sinf.c b/sysdeps/ia64/fpu/s_sinf.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/s_sinf.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/s_sinl.c b/sysdeps/ia64/fpu/s_sinl.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/s_sinl.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/s_tan.S b/sysdeps/ia64/fpu/s_tan.S new file mode 100644 index 0000000000..a2f80c8858 --- /dev/null +++ b/sysdeps/ia64/fpu/s_tan.S @@ -0,0 +1,878 @@ +.file "tancot.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 04/04/00 Unwind support added +// 12/27/00 Improved speed +// 02/21/01 Updated to call tanl +// 05/30/02 Added cot +// 02/10/03 Reordered header: .section, .global, .proc, .align +// +// API +//============================================================== +// double tan(double x); +// double cot(double x); +// +// Overview of operation +//============================================================== +// If the input value in radians is |x| >= 1.xxxxx 2^10 call the +// older slower version. +// +// The new algorithm is used when |x| <= 1.xxxxx 2^9. +// +// Represent the input X as Nfloat * pi/2 + r +// where r can be negative and |r| <= pi/4 +// +// tan_W = x * 2/pi +// Nfloat = round_int(tan_W) +// +// tan_r = x - Nfloat * (pi/2)_hi +// a) tan_r = tan_r - Nfloat * (pi/2)_lo (for tan) +// b) tan_r = Nfloat * (pi/2)_lo - tan_r (for cot) +// +// We have two paths: p8, when Nfloat is even and p9. when Nfloat is odd. +// a) for tan: p8: tan(X) = tan(r) +// p9: tan(X) = -cot(r) +// b) for cot: p9: cot(X) = cot(r) +// p8: cot(X) = -tan(r) +// +// Each is evaluated as a series. The p9 path requires 1/r. +// +// The coefficients used in the series are stored in a table as +// are the pi constants. +// +// Registers used +//============================================================== +// +// predicate registers used: +// p6-12 +// +// floating-point registers used: +// f10-15, f32-106 +// f8, input +// +// general registers used +// r14-26, r32-39 +// +// Assembly macros +//============================================================== +TAN_INV_PI_BY_2_2TO64 = f10 +TAN_RSHF_2TO64 = f11 +TAN_2TOM64 = f12 +TAN_RSHF = f13 +TAN_W_2TO64_RSH = f14 +TAN_NFLOAT = f15 + +tan_Inv_Pi_by_2 = f32 +tan_Pi_by_2_hi = f33 +tan_Pi_by_2_lo = f34 + + +tan_P0 = f35 +tan_P1 = f36 +tan_P2 = f37 +tan_P3 = f38 +tan_P4 = f39 +tan_P5 = f40 +tan_P6 = f41 +tan_P7 = f42 +tan_P8 = f43 +tan_P9 = f44 +tan_P10 = f45 +tan_P11 = f46 +tan_P12 = f47 +tan_P13 = f48 +tan_P14 = f49 +tan_P15 = f50 + +tan_Q0 = f51 +tan_Q1 = f52 +tan_Q2 = f53 +tan_Q3 = f54 +tan_Q4 = f55 +tan_Q5 = f56 +tan_Q6 = f57 +tan_Q7 = f58 +tan_Q8 = f59 +tan_Q9 = f60 +tan_Q10 = f61 + +tan_r = f62 +tan_rsq = f63 +tan_rcube = f64 + +tan_v18 = f65 +tan_v16 = f66 +tan_v17 = f67 +tan_v12 = f68 +tan_v13 = f69 +tan_v7 = f70 +tan_v8 = f71 +tan_v4 = f72 +tan_v5 = f73 +tan_v15 = f74 +tan_v11 = f75 +tan_v14 = f76 +tan_v3 = f77 +tan_v6 = f78 +tan_v10 = f79 +tan_v2 = f80 +tan_v9 = f81 +tan_v1 = f82 +tan_int_Nfloat = f83 +tan_Nfloat = f84 + +tan_NORM_f8 = f85 +tan_W = f86 + +tan_y0 = f87 +tan_d = f88 +tan_y1 = f89 +tan_dsq = f90 +tan_y2 = f91 +tan_d4 = f92 +tan_inv_r = f93 + +tan_z1 = f94 +tan_z2 = f95 +tan_z3 = f96 +tan_z4 = f97 +tan_z5 = f98 +tan_z6 = f99 +tan_z7 = f100 +tan_z8 = f101 +tan_z9 = f102 +tan_z10 = f103 +tan_z11 = f104 +tan_z12 = f105 + +arg_copy = f106 + +///////////////////////////////////////////////////////////// + +tan_GR_sig_inv_pi_by_2 = r14 +tan_GR_rshf_2to64 = r15 +tan_GR_exp_2tom64 = r16 +tan_GR_n = r17 +tan_GR_rshf = r18 +tan_AD = r19 +tan_GR_10009 = r20 +tan_GR_17_ones = r21 +tan_GR_N_odd_even = r22 +tan_GR_N = r23 +tan_signexp = r24 +tan_exp = r25 +tan_ADQ = r26 + +GR_SAVE_B0 = r33 +GR_SAVE_PFS = r34 +GR_SAVE_GP = r35 +GR_Parameter_X = r36 +GR_Parameter_Y = r37 +GR_Parameter_RESULT = r38 +GR_Parameter_Tag = r39 + + +RODATA + +.align 16 + +LOCAL_OBJECT_START(double_tan_constants) + data8 0xC90FDAA22168C234, 0x00003FFF // pi/2 hi + data8 0xBEEA54580DDEA0E1 // P14 + data8 0x3ED3021ACE749A59 // P15 + data8 0xBEF312BD91DC8DA1 // P12 + data8 0x3EFAE9AFC14C5119 // P13 + data8 0x3F2F342BF411E769 // P8 + data8 0x3F1A60FC9F3B0227 // P9 + data8 0x3EFF246E78E5E45B // P10 + data8 0x3F01D9D2E782875C // P11 + data8 0x3F8226E34C4499B6 // P4 + data8 0x3F6D6D3F12C236AC // P5 + data8 0x3F57DA1146DCFD8B // P6 + data8 0x3F43576410FE3D75 // P7 + data8 0x3FD5555555555555 // P0 + data8 0x3FC11111111111C2 // P1 + data8 0x3FABA1BA1BA0E850 // P2 + data8 0x3F9664F4886725A7 // P3 +LOCAL_OBJECT_END(double_tan_constants) + +LOCAL_OBJECT_START(double_Q_tan_constants) + data8 0xC4C6628B80DC1CD1, 0x00003FBF // pi/2 lo + data8 0x3E223A73BA576E48 // Q8 + data8 0x3DF54AD8D1F2CA43 // Q9 + data8 0x3EF66A8EE529A6AA // Q4 + data8 0x3EC2281050410EE6 // Q5 + data8 0x3E8D6BB992CC3CF5 // Q6 + data8 0x3E57F88DE34832E4 // Q7 + data8 0x3FD5555555555555 // Q0 + data8 0x3F96C16C16C16DB8 // Q1 + data8 0x3F61566ABBFFB489 // Q2 + data8 0x3F2BBD77945C1733 // Q3 + data8 0x3D927FB33E2B0E04 // Q10 +LOCAL_OBJECT_END(double_Q_tan_constants) + + +.section .text + +//////////////////////////////////////////////////////// + +LOCAL_LIBM_ENTRY(cot) +// The initial fnorm will take any unmasked faults and +// normalize any single/double unorms + +{ .mlx + cmp.eq p12, p11 = r0, r0 // set p12=1, p11=0 for cot + movl tan_GR_sig_inv_pi_by_2 = 0xA2F9836E4E44152A // significand of 2/pi +} +{ .mlx + addl tan_AD = @ltoff(double_tan_constants), gp + movl tan_GR_rshf_2to64 = 0x47e8000000000000 // 1.1000 2^(63+63+1) +} +;; + +{ .mlx + mov tan_GR_exp_2tom64 = 0xffff-64 // exponent of scaling factor 2^-64 + movl tan_GR_rshf = 0x43e8000000000000 // 1.1000 2^63 for right shift +} +{ .mfb + ld8 tan_AD = [tan_AD] + fnorm.s0 tan_NORM_f8 = f8 + br.cond.sptk COMMON_PATH +} +;; + +LOCAL_LIBM_END(cot) + + +GLOBAL_IEEE754_ENTRY(tan) +// The initial fnorm will take any unmasked faults and +// normalize any single/double unorms + +{ .mlx + cmp.eq p11, p12 = r0, r0 // set p11=1, p12=0 for tan + movl tan_GR_sig_inv_pi_by_2 = 0xA2F9836E4E44152A // significand of 2/pi +} +{ .mlx + addl tan_AD = @ltoff(double_tan_constants), gp + movl tan_GR_rshf_2to64 = 0x47e8000000000000 // 1.1000 2^(63+63+1) +} +;; + +{ .mlx + mov tan_GR_exp_2tom64 = 0xffff-64 // exponent of scaling factor 2^-64 + movl tan_GR_rshf = 0x43e8000000000000 // 1.1000 2^63 for right shift +} +{ .mfi + ld8 tan_AD = [tan_AD] + fnorm.s0 tan_NORM_f8 = f8 + nop.i 0 +} +;; + + +// Common path for both tan and cot +COMMON_PATH: +// Form two constants we need +// 2/pi * 2^1 * 2^63, scaled by 2^64 since we just loaded the significand +// 1.1000...000 * 2^(63+63+1) to right shift int(W) into the significand +{ .mmi + setf.sig TAN_INV_PI_BY_2_2TO64 = tan_GR_sig_inv_pi_by_2 + setf.d TAN_RSHF_2TO64 = tan_GR_rshf_2to64 + mov tan_GR_17_ones = 0x1ffff ;; +} + + +// Form another constant +// 2^-64 for scaling Nfloat +// 1.1000...000 * 2^63, the right shift constant +{ .mmf + setf.exp TAN_2TOM64 = tan_GR_exp_2tom64 + adds tan_ADQ = double_Q_tan_constants - double_tan_constants, tan_AD +(p11) fclass.m.unc p6,p0 = f8, 0x07 // Test for x=0 (tan) +} +;; + + +// Form another constant +// 2^-64 for scaling Nfloat +// 1.1000...000 * 2^63, the right shift constant +{ .mmf + setf.d TAN_RSHF = tan_GR_rshf + ldfe tan_Pi_by_2_hi = [tan_AD],16 + fclass.m.unc p7,p0 = f8, 0x23 // Test for x=inf +} +;; + +{ .mfb + ldfe tan_Pi_by_2_lo = [tan_ADQ],16 + fclass.m.unc p8,p0 = f8, 0xc3 // Test for x=nan +(p6) br.ret.spnt b0 ;; // Exit for x=0 (tan only) +} + +{ .mfi + ldfpd tan_P14,tan_P15 = [tan_AD],16 +(p7) frcpa.s0 f8,p9=f0,f0 // Set qnan indef if x=inf + mov tan_GR_10009 = 0x10009 +} +{ .mib + ldfpd tan_Q8,tan_Q9 = [tan_ADQ],16 + nop.i 999 +(p7) br.ret.spnt b0 ;; // Exit for x=inf +} + +{ .mfi + ldfpd tan_P12,tan_P13 = [tan_AD],16 +(p12) fclass.m.unc p6,p0 = f8, 0x07 // Test for x=0 (cot) + nop.i 999 +} +{ .mfb + ldfpd tan_Q4,tan_Q5 = [tan_ADQ],16 +(p8) fma.d.s0 f8=f8,f1,f8 // Set qnan if x=nan +(p8) br.ret.spnt b0 ;; // Exit for x=nan +} + +{ .mmf + getf.exp tan_signexp = tan_NORM_f8 + ldfpd tan_P8,tan_P9 = [tan_AD],16 + fmerge.s arg_copy = f8, f8 ;; // Save input for error call +} + +// Multiply x by scaled 2/pi and add large const to shift integer part of W to +// rightmost bits of significand +{ .mmf + alloc r32=ar.pfs,0,4,4,0 + ldfpd tan_Q6,tan_Q7 = [tan_ADQ],16 + fma.s1 TAN_W_2TO64_RSH = tan_NORM_f8,TAN_INV_PI_BY_2_2TO64,TAN_RSHF_2TO64 +};; + +{ .mmf + ldfpd tan_P10,tan_P11 = [tan_AD],16 + and tan_exp = tan_GR_17_ones, tan_signexp +(p6) frcpa.s0 f8, p0 = f1, f8 ;; // cot(+-0) = +-Inf +} + + +// p7 is true if we must call DBX TAN +// p7 is true if f8 exp is > 0x10009 (which includes all ones +// NAN or inf) +{ .mmb + ldfpd tan_Q0,tan_Q1 = [tan_ADQ],16 + cmp.ge.unc p7,p0 = tan_exp,tan_GR_10009 +(p7) br.cond.spnt TAN_DBX ;; +} + + +{ .mmb + ldfpd tan_P4,tan_P5 = [tan_AD],16 +(p6) mov GR_Parameter_Tag = 226 // (cot) +(p6) br.cond.spnt __libm_error_region ;; // call error support if cot(+-0) +} + + +{ .mmi + ldfpd tan_Q2,tan_Q3 = [tan_ADQ],16 + nop.m 999 + nop.i 999 ;; +} + + + +// TAN_NFLOAT = Round_Int_Nearest(tan_W) +{ .mfi + ldfpd tan_P6,tan_P7 = [tan_AD],16 + fms.s1 TAN_NFLOAT = TAN_W_2TO64_RSH,TAN_2TOM64,TAN_RSHF + nop.i 999 ;; +} + + +{ .mfi + ldfd tan_Q10 = [tan_ADQ] + nop.f 999 + nop.i 999 ;; +} + + +{ .mfi + ldfpd tan_P0,tan_P1 = [tan_AD],16 + nop.f 999 + nop.i 999 ;; +} + + +{ .mmi + getf.sig tan_GR_n = TAN_W_2TO64_RSH + ldfpd tan_P2,tan_P3 = [tan_AD] + nop.i 999 ;; +} + +// tan_r = -tan_Nfloat * tan_Pi_by_2_hi + x +{ .mfi +(p12) add tan_GR_n = 0x1, tan_GR_n // N = N + 1 (for cot) + fnma.s1 tan_r = TAN_NFLOAT, tan_Pi_by_2_hi, tan_NORM_f8 + nop.i 999 ;; +} + + +// p8 ==> even +// p9 ==> odd +{ .mmi + and tan_GR_N_odd_even = 0x1, tan_GR_n ;; + nop.m 999 + cmp.eq.unc p8,p9 = tan_GR_N_odd_even, r0 ;; +} + + +.pred.rel "mutex", p11, p12 +// tan_r = tan_r -tan_Nfloat * tan_Pi_by_2_lo (tan) +{ .mfi + nop.m 999 +(p11) fnma.s1 tan_r = TAN_NFLOAT, tan_Pi_by_2_lo, tan_r + nop.i 999 +} +// tan_r = -(tan_r -tan_Nfloat * tan_Pi_by_2_lo) (cot) +{ .mfi + nop.m 999 +(p12) fms.s1 tan_r = TAN_NFLOAT, tan_Pi_by_2_lo, tan_r + nop.i 999 ;; +} + + +{ .mfi + nop.m 999 + fma.s1 tan_rsq = tan_r, tan_r, f0 + nop.i 999 ;; +} + + +{ .mfi + nop.m 999 +(p9) frcpa.s1 tan_y0, p0 = f1,tan_r + nop.i 999 ;; +} + + +{ .mfi + nop.m 999 +(p8) fma.s1 tan_v18 = tan_rsq, tan_P15, tan_P14 + nop.i 999 +} +{ .mfi + nop.m 999 +(p8) fma.s1 tan_v4 = tan_rsq, tan_P1, tan_P0 + nop.i 999 ;; +} + + + +{ .mfi + nop.m 999 +(p8) fma.s1 tan_v16 = tan_rsq, tan_P13, tan_P12 + nop.i 999 +} +{ .mfi + nop.m 999 +(p8) fma.s1 tan_v17 = tan_rsq, tan_rsq, f0 + nop.i 999 ;; +} + + + +{ .mfi + nop.m 999 +(p8) fma.s1 tan_v12 = tan_rsq, tan_P9, tan_P8 + nop.i 999 +} +{ .mfi + nop.m 999 +(p8) fma.s1 tan_v13 = tan_rsq, tan_P11, tan_P10 + nop.i 999 ;; +} + + + +{ .mfi + nop.m 999 +(p8) fma.s1 tan_v7 = tan_rsq, tan_P5, tan_P4 + nop.i 999 +} +{ .mfi + nop.m 999 +(p8) fma.s1 tan_v8 = tan_rsq, tan_P7, tan_P6 + nop.i 999 ;; +} + + + +{ .mfi + nop.m 999 +(p9) fnma.s1 tan_d = tan_r, tan_y0, f1 + nop.i 999 +} +{ .mfi + nop.m 999 +(p8) fma.s1 tan_v5 = tan_rsq, tan_P3, tan_P2 + nop.i 999 ;; +} + + + +{ .mfi + nop.m 999 +(p9) fma.s1 tan_z11 = tan_rsq, tan_Q9, tan_Q8 + nop.i 999 +} +{ .mfi + nop.m 999 +(p9) fma.s1 tan_z12 = tan_rsq, tan_rsq, f0 + nop.i 999 ;; +} + + +{ .mfi + nop.m 999 +(p8) fma.s1 tan_v15 = tan_v17, tan_v18, tan_v16 + nop.i 999 +} +{ .mfi + nop.m 999 +(p9) fma.s1 tan_z7 = tan_rsq, tan_Q5, tan_Q4 + nop.i 999 ;; +} + + +{ .mfi + nop.m 999 +(p8) fma.s1 tan_v11 = tan_v17, tan_v13, tan_v12 + nop.i 999 +} +{ .mfi + nop.m 999 +(p9) fma.s1 tan_z8 = tan_rsq, tan_Q7, tan_Q6 + nop.i 999 ;; +} + + + +{ .mfi + nop.m 999 +(p8) fma.s1 tan_v14 = tan_v17, tan_v17, f0 + nop.i 999 +} +{ .mfi + nop.m 999 +(p9) fma.s1 tan_z3 = tan_rsq, tan_Q1, tan_Q0 + nop.i 999 ;; +} + + + + +{ .mfi + nop.m 999 +(p8) fma.s1 tan_v3 = tan_v17, tan_v5, tan_v4 + nop.i 999 +} +{ .mfi + nop.m 999 +(p8) fma.s1 tan_v6 = tan_v17, tan_v8, tan_v7 + nop.i 999 ;; +} + + + +{ .mfi + nop.m 999 +(p9) fma.s1 tan_y1 = tan_y0, tan_d, tan_y0 + nop.i 999 +} +{ .mfi + nop.m 999 +(p9) fma.s1 tan_dsq = tan_d, tan_d, f0 + nop.i 999 ;; +} + + +{ .mfi + nop.m 999 +(p9) fma.s1 tan_z10 = tan_z12, tan_Q10, tan_z11 + nop.i 999 +} +{ .mfi + nop.m 999 +(p9) fma.s1 tan_z9 = tan_z12, tan_z12,f0 + nop.i 999 ;; +} + + +{ .mfi + nop.m 999 +(p9) fma.s1 tan_z4 = tan_rsq, tan_Q3, tan_Q2 + nop.i 999 +} +{ .mfi + nop.m 999 +(p9) fma.s1 tan_z6 = tan_z12, tan_z8, tan_z7 + nop.i 999 ;; +} + + + +{ .mfi + nop.m 999 +(p8) fma.s1 tan_v10 = tan_v14, tan_v15, tan_v11 + nop.i 999 ;; +} + + + +{ .mfi + nop.m 999 +(p9) fma.s1 tan_y2 = tan_y1, tan_d, tan_y0 + nop.i 999 +} +{ .mfi + nop.m 999 +(p9) fma.s1 tan_d4 = tan_dsq, tan_dsq, tan_d + nop.i 999 ;; +} + + +{ .mfi + nop.m 999 +(p8) fma.s1 tan_v2 = tan_v14, tan_v6, tan_v3 + nop.i 999 +} +{ .mfi + nop.m 999 +(p8) fma.s1 tan_v9 = tan_v14, tan_v14, f0 + nop.i 999 ;; +} + + +{ .mfi + nop.m 999 +(p9) fma.s1 tan_z2 = tan_z12, tan_z4, tan_z3 + nop.i 999 +} +{ .mfi + nop.m 999 +(p9) fma.s1 tan_z5 = tan_z9, tan_z10, tan_z6 + nop.i 999 ;; +} + + +{ .mfi + nop.m 999 +(p9) fma.s1 tan_inv_r = tan_d4, tan_y2, tan_y0 + nop.i 999 +} +{ .mfi + nop.m 999 +(p8) fma.s1 tan_rcube = tan_rsq, tan_r, f0 + nop.i 999 ;; +} + + + +{ .mfi + nop.m 999 +(p8) fma.s1 tan_v1 = tan_v9, tan_v10, tan_v2 + nop.i 999 +} +{ .mfi + nop.m 999 +(p9) fma.s1 tan_z1 = tan_z9, tan_z5, tan_z2 + nop.i 999 ;; +} + + + +{ .mfi + nop.m 999 +(p8) fma.d.s0 f8 = tan_v1, tan_rcube, tan_r + nop.i 999 +} +{ .mfb + nop.m 999 +(p9) fms.d.s0 f8 = tan_r, tan_z1, tan_inv_r + br.ret.sptk b0 ;; +} +GLOBAL_IEEE754_END(tan) + + +LOCAL_LIBM_ENTRY(__libm_callout) +TAN_DBX: +.prologue + +{ .mfi + nop.m 0 + fmerge.s f9 = f0,f0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs +} +;; + +{ .mfi + mov GR_SAVE_GP=gp + nop.f 0 +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 +} + +.body +{ .mmb + nop.m 999 + nop.m 999 +(p11) br.cond.sptk.many call_tanl ;; +} + +// Here if we should call cotl +{ .mmb + nop.m 999 + nop.m 999 + br.call.sptk.many b0=__libm_cotl# ;; +} + +{ .mfi + mov gp = GR_SAVE_GP + fnorm.d.s0 f8 = f8 + mov b0 = GR_SAVE_B0 +} +;; + +{ .mib + nop.m 999 + mov ar.pfs = GR_SAVE_PFS + br.ret.sptk b0 +;; +} + +// Here if we should call tanl +call_tanl: +{ .mmb + nop.m 999 + nop.m 999 + br.call.sptk.many b0=__libm_tanl# ;; +} + +{ .mfi + mov gp = GR_SAVE_GP + fnorm.d.s0 f8 = f8 + mov b0 = GR_SAVE_B0 +} +;; + +{ .mib + nop.m 999 + mov ar.pfs = GR_SAVE_PFS + br.ret.sptk b0 +;; +} + +LOCAL_LIBM_END(__libm_callout) + +.type __libm_tanl#,@function +.global __libm_tanl# +.type __libm_cotl#,@function +.global __libm_cotl# + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue + +// (1) +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; + +// (2) +{ .mmi + stfd [GR_Parameter_Y] = f1,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; + +.body +// (3) +{ .mib + stfd [GR_Parameter_X] = arg_copy // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfd [GR_Parameter_Y] = f8 // STORE Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + nop.m 0 + nop.m 0 + add GR_Parameter_RESULT = 48,sp +};; + +// (4) +{ .mmi + ldfd f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) + +.type __libm_error_support#,@function +.global __libm_error_support# + diff --git a/sysdeps/ia64/fpu/s_tanf.S b/sysdeps/ia64/fpu/s_tanf.S new file mode 100644 index 0000000000..193d7568a5 --- /dev/null +++ b/sysdeps/ia64/fpu/s_tanf.S @@ -0,0 +1,692 @@ +.file "tancotf.s" + + +// Copyright (c) 2000 - 2005, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 02/02/00 Initial version +// 04/04/00 Unwind support added +// 12/27/00 Improved speed +// 02/21/01 Updated to call tanl +// 05/30/02 Improved speed, added cotf. +// 11/25/02 Added explicit completer on fnorm +// 02/10/03 Reordered header: .section, .global, .proc, .align +// 04/17/03 Eliminated redundant stop bits +// 03/31/05 Reformatted delimiters between data tables +// +// APIs +//============================================================== +// float tanf(float) +// float cotf(float) +// +// Algorithm Description for tanf +//============================================================== +// The tanf function computes the principle value of the tangent of x, +// where x is radian argument. +// +// There are 5 paths: +// 1. x = +/-0.0 +// Return tanf(x) = +/-0.0 +// +// 2. x = [S,Q]NaN +// Return tanf(x) = QNaN +// +// 3. x = +/-Inf +// Return tanf(x) = QNaN +// +// 4. x = r + (Pi/2)*N, N = RoundInt(x*(2/Pi)), N is even, |r| f80 +// +// General registers used: +// r14 -> r23, r32 -> r39 +// +// Predicate registers used: +// p6 -> p13 +// +// Assembly macros +//============================================================== +// integer registers +rExp = r14 +rSignMask = r15 +rRshf = r16 +rScFctrExp = r17 +rIntN = r18 +rSigRcpPiby2 = r19 +rScRshf = r20 +rCoeffA = r21 +rCoeffB = r22 +rExpCut = r23 + +GR_SAVE_B0 = r33 +GR_SAVE_PFS = r34 +GR_SAVE_GP = r35 +GR_Parameter_X = r36 +GR_Parameter_Y = r37 +GR_Parameter_RESULT = r38 +GR_Parameter_Tag = r39 + +//============================================================== +// floating point registers +fScRcpPiby2 = f32 +fScRshf = f33 +fNormArg = f34 +fScFctr = f35 +fRshf = f36 +fShiftedN = f37 +fN = f38 +fR = f39 +fA01 = f40 +fA03 = f41 +fA05 = f42 +fA07 = f43 +fA09 = f44 +fA11 = f45 +fA13 = f46 +fA15 = f47 +fA17 = f48 +fA19 = f49 +fB01 = f50 +fB03 = f51 +fB05 = f52 +fB07 = f53 +fB09 = f54 +fB11 = f55 +fA03_01 = f56 +fA07_05 = f57 +fA11_09 = f58 +fA15_13 = f59 +fA19_17 = f60 +fA11_05 = f61 +fA19_13 = f62 +fA19_05 = f63 +fRbyA03_01 = f64 +fB03_01 = f65 +fB07_05 = f66 +fB11_09 = f67 +fB11_05 = f68 +fRbyB03_01 = f69 +fRbyB11_01 = f70 +fRp2 = f71 +fRp4 = f72 +fRp8 = f73 +fRp5 = f74 +fY0 = f75 +fY1 = f76 +fD = f77 +fDp2 = f78 +fInvR = f79 +fPiby2 = f80 +//============================================================== + + +RODATA +.align 16 + +LOCAL_OBJECT_START(coeff_A) +data8 0x3FF0000000000000 // A1 = 1.00000000000000000000e+00 +data8 0x3FD5555556BCE758 // A3 = 3.33333334641442641606e-01 +data8 0x3FC111105C2DAE48 // A5 = 1.33333249100689099175e-01 +data8 0x3FABA1F876341060 // A7 = 5.39701122561673229739e-02 +data8 0x3F965FB86D12A38D // A9 = 2.18495194027670719750e-02 +data8 0x3F8265F62415F9D6 // A11 = 8.98353860497717439465e-03 +data8 0x3F69E3AE64CCF58D // A13 = 3.16032468108912746342e-03 +data8 0x3F63920D09D0E6F6 // A15 = 2.38897844840557235331e-03 +LOCAL_OBJECT_END(coeff_A) + +LOCAL_OBJECT_START(coeff_B) +data8 0xC90FDAA22168C235, 0x3FFF // pi/2 +data8 0x3FD55555555358DB // B1 = 3.33333333326107426583e-01 +data8 0x3F96C16C252F643F // B3 = 2.22222230621336129239e-02 +data8 0x3F61566243AB3C60 // B5 = 2.11638633968606896785e-03 +data8 0x3F2BC1169BD4438B // B7 = 2.11748132564551094391e-04 +data8 0x3EF611B4CEA056A1 // B9 = 2.10467959860990200942e-05 +data8 0x3EC600F9E32194BF // B11 = 2.62305891234274186608e-06 +data8 0xBF42BA7BCC177616 // A17 =-5.71546981685324877205e-04 +data8 0x3F4F2614BC6D3BB8 // A19 = 9.50584530849832782542e-04 +LOCAL_OBJECT_END(coeff_B) + + +.section .text + +LOCAL_LIBM_ENTRY(cotf) + +{ .mlx + getf.exp rExp = f8 // ***** Get 2ˆ17 * s + E + movl rSigRcpPiby2= 0xA2F9836E4E44152A // significand of 2/Pi +} +{ .mlx + addl rCoeffA = @ltoff(coeff_A), gp + movl rScRshf = 0x47e8000000000000 // 1.5*2^(63+63+1) +} +;; + +{ .mfi + alloc r32 = ar.pfs, 0, 4, 4, 0 + fclass.m p9, p0 = f8, 0xc3 // Test for x=nan + cmp.eq p11, p10 = r0, r0 // if p11=1 we compute cotf +} +{ .mib + ld8 rCoeffA = [rCoeffA] + mov rExpCut = 0x10009 // cutoff for exponent + br.cond.sptk Common_Path +} +;; + +LOCAL_LIBM_END(cotf) + + +GLOBAL_IEEE754_ENTRY(tanf) + +{ .mlx + getf.exp rExp = f8 // ***** Get 2ˆ17 * s + E + movl rSigRcpPiby2= 0xA2F9836E4E44152A // significand of 2/Pi +} +{ .mlx + addl rCoeffA = @ltoff(coeff_A), gp + movl rScRshf = 0x47e8000000000000 // 1.5*2^(63+63+1) +} +;; + +{ .mfi + alloc r32 = ar.pfs, 0, 4, 4, 0 + fclass.m p9, p0 = f8, 0xc3 // Test for x=nan + cmp.eq p10, p11 = r0, r0 // if p10=1 we compute tandf +} +{ .mib + ld8 rCoeffA = [rCoeffA] + mov rExpCut = 0x10009 // cutoff for exponent + nop.b 0 +} +;; + +// Below is common path for both tandf and cotdf +Common_Path: +{ .mfi + setf.sig fScRcpPiby2 = rSigRcpPiby2 // 2^(63+1)*(2/Pi) + fclass.m p8, p0 = f8, 0x23 // Test for x=inf + mov rSignMask = 0x1ffff // mask for sign bit +} +{ .mlx + setf.d fScRshf = rScRshf // 1.5*2^(63+63+1) + movl rRshf = 0x43e8000000000000 // 1.5 2^63 for right shift +} +;; + +{ .mfi + and rSignMask = rSignMask, rExp // clear sign bit +(p10) fclass.m.unc p7, p0 = f8, 0x07 // Test for x=0 (for tanf) + mov rScFctrExp = 0xffff-64 // exp of scaling factor +} +{ .mfb + adds rCoeffB = coeff_B - coeff_A, rCoeffA +(p9) fma.s.s0 f8 = f8, f1, f8 // Set qnan if x=nan +(p9) br.ret.spnt b0 // Exit for x=nan +} +;; + +{ .mfi + cmp.ge p6, p0 = rSignMask, rExpCut // p6 = (E => 0x10009) +(p8) frcpa.s0 f8, p0 = f0, f0 // Set qnan indef if x=inf + mov GR_Parameter_Tag = 227 // (cotf) +} +{ .mbb + ldfe fPiby2 = [rCoeffB], 16 +(p8) br.ret.spnt b0 // Exit for x=inf +(p6) br.cond.spnt Huge_Argument // Branch if |x|>=2^10 +} +;; + +{ .mfi + nop.m 0 +(p11) fclass.m.unc p6, p0 = f8, 0x07 // Test for x=0 (for cotf) + nop.i 0 +} +{ .mfb + nop.m 0 + fnorm.s0 fNormArg = f8 +(p7) br.ret.spnt b0 // Exit for x=0 (for tanf) +} +;; + +{ .mmf + ldfpd fA01, fA03 = [rCoeffA], 16 + ldfpd fB01, fB03 = [rCoeffB], 16 + fmerge.s f10 = f8, f8 // Save input for error call +} +;; + +{ .mmf + setf.exp fScFctr = rScFctrExp // get as real + setf.d fRshf = rRshf // get right shifter as real +(p6) frcpa.s0 f8, p0 = f1, f8 // cotf(+-0) = +-Inf +} +;; + +{ .mmb + ldfpd fA05, fA07 = [rCoeffA], 16 + ldfpd fB05, fB07 = [rCoeffB], 16 +(p6) br.cond.spnt __libm_error_region // call error support if cotf(+-0) +} +;; + +{ .mmi + ldfpd fA09, fA11 = [rCoeffA], 16 + ldfpd fB09, fB11 = [rCoeffB], 16 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fShiftedN = fNormArg,fScRcpPiby2,fScRshf // x*2^70*(2/Pi)+ScRshf + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fms.s1 fN = fShiftedN, fScFctr, fRshf // N = Y*2^(-70) - Rshf + nop.i 0 +} +;; + +.pred.rel "mutex", p10, p11 +{ .mfi + getf.sig rIntN = fShiftedN // get N as integer +(p10) fnma.s1 fR = fN, fPiby2, fNormArg // R = x - (Pi/2)*N (tanf) + nop.i 0 +} +{ .mfi + nop.m 0 +(p11) fms.s1 fR = fN, fPiby2, fNormArg // R = (Pi/2)*N - x (cotf) + nop.i 0 +} +;; + +{ .mmi + ldfpd fA13, fA15 = [rCoeffA], 16 + ldfpd fA17, fA19 = [rCoeffB], 16 + nop.i 0 +} +;; + +Return_From_Huges: +{ .mfi + nop.m 0 + fma.s1 fRp2 = fR, fR, f0 // R^2 +(p11) add rIntN = 0x1, rIntN // N = N + 1 (cotf) +} +;; + +{ .mfi + nop.m 0 + frcpa.s1 fY0, p0 = f1, fR // Y0 ~ 1/R + tbit.z p8, p9 = rIntN, 0 // p8=1 if N is even +} +;; + +// Below are mixed polynomial calculations (mixed for even and odd N) +{ .mfi + nop.m 0 +(p9) fma.s1 fB03_01 = fRp2, fB03, fB01 // R^2*B3 + B1 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fRp4 = fRp2, fRp2, f0 // R^4 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p8) fma.s1 fA15_13 = fRp2, fA15, fA13 // R^2*A15 + A13 + nop.i 0 +} +{ .mfi + nop.m 0 +(p8) fma.s1 fA19_17 = fRp2, fA19, fA17 // R^2*A19 + A17 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p8) fma.s1 fA07_05 = fRp2, fA07, fA05 // R^2*A7 + A5 + nop.i 0 +} +{ .mfi + nop.m 0 +(p8) fma.s1 fA11_09 = fRp2, fA11, fA09 // R^2*A11 + A9 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p9) fma.s1 fB07_05 = fRp2, fB07, fB05 // R^2*B7 + B5 + nop.i 0 +} +{ .mfi + nop.m 0 +(p9) fma.s1 fB11_09 = fRp2, fB11, fB09 // R^2*B11 + B9 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p9) fnma.s1 fD = fR, fY0, f1 // D = 1 - R*Y0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p8) fma.s1 fA03_01 = fRp2, fA03, fA01 // R^2*A3 + A1 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fRp8 = fRp4, fRp4, f0 // R^8 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fRp5 = fR, fRp4, f0 // R^5 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p8) fma.s1 fA11_05 = fRp4, fA11_09, fA07_05 // R^4*(R^2*A11 + A9) + ... + nop.i 0 +} +{ .mfi + nop.m 0 +(p8) fma.s1 fA19_13 = fRp4, fA19_17, fA15_13 // R^4*(R^2*A19 + A17) + .. + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p9) fma.s1 fB11_05 = fRp4, fB11_09, fB07_05 // R^4*(R^2*B11 + B9) + ... + nop.i 0 +} +{ .mfi + nop.m 0 +(p9) fma.s1 fRbyB03_01 = fR, fB03_01, f0 // R*(R^2*B3 + B1) + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p9) fma.s1 fY1 = fY0, fD, fY0 // Y1 = Y0*D + Y0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p9) fma.s1 fDp2 = fD, fD, f0 // D^2 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + // R^8*(R^6*A19 + R^4*A17 + R^2*A15 + A13) + R^6*A11 + R^4*A9 + R^2*A7 + A5 +(p8) fma.d.s1 fA19_05 = fRp8, fA19_13, fA11_05 + nop.i 0 +} +{ .mfi + nop.m 0 +(p8) fma.d.s1 fRbyA03_01 = fR, fA03_01, f0 // R*(R^2*A3 + A1) + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p9) fma.d.s1 fInvR = fY1, fDp2, fY1 // 1/R = Y1*D^2 + Y1 + nop.i 0 +} +{ .mfi + nop.m 0 + // R^5*(R^6*B11 + R^4*B9 + R^2*B7 + B5) + R^3*B3 + R*B1 +(p9) fma.d.s1 fRbyB11_01 = fRp5, fB11_05, fRbyB03_01 + nop.i 0 +} +;; + +.pred.rel "mutex", p8, p9 +{ .mfi + nop.m 0 + // Result = R^5*(R^14*A19 + R^12*A17 + R^10*A15 + ...) + R^3*A3 + R*A1 +(p8) fma.s.s0 f8 = fRp5, fA19_05, fRbyA03_01 + nop.i 0 +} +{ .mfb + nop.m 0 + // Result = -1/R + R^11*B11 + R^9*B9 + R^7*B7 + R^5*B5 + R^3*B3 + R*B1 +(p9) fnma.s.s0 f8 = f1, fInvR, fRbyB11_01 + br.ret.sptk b0 // exit for main path +} +;; + +GLOBAL_IEEE754_END(tanf) + + +LOCAL_LIBM_ENTRY(__libm_callout) +Huge_Argument: +.prologue + +{ .mfi + nop.m 0 + fmerge.s f9 = f0,f0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs +} +;; + +{ .mfi + mov GR_SAVE_GP=gp + nop.f 0 +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 +} + +.body +{ .mmb + nop.m 999 + nop.m 999 +(p10) br.cond.sptk.many call_tanl ;; +} + +// Here if we should call cotl (p10=0, p11=1) +{ .mmb + nop.m 999 + nop.m 999 + br.call.sptk.many b0=__libm_cotl# ;; +} + +{ .mfi + mov gp = GR_SAVE_GP + fnorm.s.s0 f8 = f8 + mov b0 = GR_SAVE_B0 +} +;; + +{ .mib + nop.m 999 + mov ar.pfs = GR_SAVE_PFS + br.ret.sptk b0 +;; +} + +// Here if we should call tanl (p10=1, p11=0) +call_tanl: +{ .mmb + nop.m 999 + nop.m 999 + br.call.sptk.many b0=__libm_tanl# ;; +} + +{ .mfi + mov gp = GR_SAVE_GP + fnorm.s.s0 f8 = f8 + mov b0 = GR_SAVE_B0 +} +;; + +{ .mib + nop.m 999 + mov ar.pfs = GR_SAVE_PFS + br.ret.sptk b0 +;; +} + +LOCAL_LIBM_END(__libm_callout) + +.type __libm_tanl#,@function +.global __libm_tanl# +.type __libm_cotl#,@function +.global __libm_cotl# + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue + +// (1) +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; + +// (2) +{ .mmi + stfs [GR_Parameter_Y] = f1,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; + +.body +// (3) +{ .mib + stfs [GR_Parameter_X] = f10 // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfs [GR_Parameter_Y] = f8 // STORE Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + nop.m 0 + nop.m 0 + add GR_Parameter_RESULT = 48,sp +};; + +// (4) +{ .mmi + ldfs f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) + +.type __libm_error_support#,@function +.global __libm_error_support# + diff --git a/sysdeps/ia64/fpu/s_tanh.S b/sysdeps/ia64/fpu/s_tanh.S new file mode 100644 index 0000000000..9adbc9c461 --- /dev/null +++ b/sysdeps/ia64/fpu/s_tanh.S @@ -0,0 +1,986 @@ +.file "tanh.s" + + +// Copyright (c) 2001 - 2005, Intel Corporation +// All rights reserved. +// +// Contributed 2001 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================================== +// 05/30/01 Initial version +// 12/04/01 Rewritten version with erf-like algorithm. +// Performance improved. +// 05/20/02 Cleaned up namespace and sf0 syntax +// 08/14/02 Changed mli templates to mlx +// 02/10/03 Reordered header: .section, .global, .proc, .align +// 03/31/05 Reformatted delimiters between data tables +// +// API +//============================================================================== +// double tanh(double) +// +// Overview of operation +//============================================================================== +// +// Algorithm description +// --------------------- +// +// There are 4 paths: +// +// 1. Special path: x = 0, Inf, NaNs, denormals +// Return tanh(x) = +/-0.0 for zeros +// Return tanh(x) = QNaN for NaNs +// Return tanh(x) = sign(x)*1.0 for Inf +// Return tanh(x) = x + x^2 for - denormals +// Return tanh(x) = x - x^2 for + denormals +// +// 2. Near zero path: 0.0 < |x| < 0.25 +// Return tanh(x) = x + x^3*A3 + ... + x^19*A19 +// +// 3. Main path: 0.25 <= |x| < 19.0625 +// For several ranges of 0.25 <= |x| < 19.0625 +// Return tanh(x) = sign(x)*(A0 + y*A1 + y^2*A2 + +// + y^3*A3 + ... + y^19*A19) +// where y = (|x|/a) - b +// +// For each range there is particular set of coefficients. +// Below is the list of ranges: +// 1/4 <= |x| < 1/2 a = 0.25, b = 1.0 +// 1/2 <= |x| < 1.0 a = 0.5, b = 1.0 +// 1.0 <= |x| < 2.0 a = 1.0, b = 1.0 +// 2.0 <= |x| < 3.25 a = 2.0, b = 1.0 +// 3.25 <= |x| < 4.0 a = 2.0, b = 2.0 +// 4.0 <= |x| < 6.5 a = 4.0, b = 1.0 +// 6.5 <= |x| < 8.0 a = 4.0, b = 2.0 +// 8.0 <= |x| < 13.0 a = 8.0, b = 1.0 +// 13.0 <= |x| < 16.0 a = 8.0, b = 2.0 +// 16.0 <= |x| < 19.0625 a = 16.0, b = 1.0 +// ( [3.25;4.0], [6.5;8.0], [13.0;16.0] subranges separated +// for monotonicity issues resolve ) +// +// 4. Saturation path: 19.0625 <= |x| < +INF +// Return tanh(x) = sign(x)*(1.0 - tiny_value) +// (tiny_value ~ 2^(-63)) +// +// Registers used +//============================================================================== +// Floating Point registers used: +// f8 = input, output +// f32 -> f64 +// +// General registers used: +// r32 -> r51, r2, r3 +// +// Predicate registers used: +// p6, p8, p10, p11, p12, p14, p15 +// p6 arg is zero, denormal or special IEEE +// p8 to filter out case when signd(x) > 1.625 +// p10 to filter out case when |x| < 0.25 +// p11 to filter out case when signd(x) <= 1.625 +// p12 to filter out case when |x| >= 19.0625 +// p14 set to 1 for positive x +// p15 set to 1 for negative x + +// Assembly macros +//============================================================================== +rDataPtr = r2 +rDataPtr1 = r3 + +rBias = r33 +rCoeffAddr3 = r34 +rThreeAndQ = r35 +rCoeffAddr2 = r36 +rMask = r37 +rArg = r38 +rSignBit = r39 +rAbsArg = r40 +rSaturation = r41 +rIndex = r42 +rCoeffAddr1 = r43 +rCoeffAddr4 = r44 +rShiftedArg = r45 +rShiftedArgMasked = r46 +rBiasedExpOf4 = r47 +rShiftedAbsArg = r48 +rArgSgnd = r49 +r1625Sgnd = r50 +rTwo = r51 + +//============================================================================== +fA0 = f32 +fA1 = f33 +fA2 = f34 +fA3 = f35 +fA4 = f36 +fA5 = f37 +fA6 = f38 +fA7 = f39 +fA8 = f40 +fA9 = f41 +fA10 = f42 +fA11 = f43 +fA12 = f44 +fA13 = f45 +fA14 = f46 +fA15 = f47 +fA16 = f48 +fA17 = f49 +fA18 = f50 +fA19 = f51 +fArgSqr = f52 +fArgAbsNorm = f53 +fSignumX = f54 +fRes = f55 +fThreeAndQ = f56 +fArgAbs = f57 +fTSqr = f58 +fTQuadr = f59 +fTDeg3 = f60 +fTDeg7 = f61 +fArgAbsNormSgn = f62 +fTQuadrSgn = f63 +fTwo = f64 + +// Data tables +//============================================================================== +RODATA + +.align 16 + +LOCAL_OBJECT_START(tanh_data) +// CAUTION: The order of these table coefficients shouldn't be changed! + +// Main path coefficients: +// Coefficients ##0..15 ("main" coefficient tables) +// Polynomial coefficients for the tanh(x), 0.25 <= |x| < 0.5 +data8 0xE9D218BC9A3FB55A, 0x00003FC7 //A19 +data8 0xC8C0D38687F36EBA, 0x00003FCE //A18 +data8 0xA2663E519FAC8A43, 0x0000BFD2 //A17 +data8 0xD913F0490674B0DF, 0x00003FD3 //A16 +data8 0xF75D84789DE0AE52, 0x00003FD6 //A15 +data8 0xACB3C40EEF3A06F0, 0x0000BFD9 //A14 +data8 0xEBD7F5DC02CFD5BA, 0x0000BFDB //A13 +data8 0x8B52CDF66D709E2A, 0x00003FDF //A12 +data8 0x9EC21F28E05C4A3E, 0x00003FE0 //A11 +data8 0xC412B44D0176F3ED, 0x0000BFE4 //A10 +data8 0x97BF35A34DD1EA4C, 0x0000BFE0 //A9 +data8 0xF89F5B39E3A3AA36, 0x00003FE9 //A8 +data8 0xF2BA654BCEEBA433, 0x0000BFEA //A7 +data8 0x8E1C15876AA589AD, 0x0000BFEF //A6 +data8 0x942226246A8C2A86, 0x00003FF1 //A5 +data8 0x8F06D9FF7DB47261, 0x00003FF4 //A4 +// +// Polynomial coefficients for the tanh(x), 0.5 <= |x| < 1.0 +data8 0xC4A7B8FB672A8520, 0x00003FDC //A19 +data8 0xA20724B847E13499, 0x0000BFE0 //A18 +data8 0xE17DB53F02E4D340, 0x00003FE2 //A17 +data8 0x90264A1012F4CA6F, 0x0000BFE4 //A16 +data8 0xEBEC9F776F0BF415, 0x0000BFE0 //A15 +data8 0x89AF912B305B45A4, 0x00003FE7 //A14 +data8 0xB4A960B81F5EC36A, 0x0000BFE7 //A13 +data8 0x969A4E95B2DA86B5, 0x0000BFEA //A12 +data8 0x8A3FC0EC082305CB, 0x00003FEC //A11 +data8 0x83D7795BCBE24373, 0x00003FEC //A10 +data8 0xDCBF42AEB82932EC, 0x0000BFEF //A9 +data8 0x83318E61ECAFD804, 0x00003FF0 //A8 +data8 0xEA4DE5746975A914, 0x00003FF2 //A7 +data8 0xCE63E8FA6B96480B, 0x0000BFF4 //A6 +data8 0xDF017BE0D4FE45D8, 0x0000BFF4 //A5 +data8 0xA8A0C6E2226DF3CD, 0x00003FF8 //A4 +// +// Polynomial coefficients for the tanh(x), 1.0 <= |x| < 2.0 +data8 0x8E89D2EBFDAA160B, 0x00003FE9 //A19 +data8 0xDD9226310A272046, 0x0000BFEC //A18 +data8 0xA038042D28B0D665, 0x00003FEF //A17 +data8 0x8C04796F03516306, 0x0000BFF1 //A16 +data8 0x9CD6A9CB4E90A2FD, 0x00003FF2 //A15 +data8 0xC8980E166F5A84FD, 0x0000BFF2 //A14 +data8 0x9ADFE65F56B7BCFD, 0x00003FED //A13 +data8 0x8B11FDFB5D0A7B96, 0x00003FF4 //A12 +data8 0x8209A125E829CBFA, 0x0000BFF5 //A11 +data8 0xCF38AAC17B85BD76, 0x00003FF1 //A10 +data8 0xD5C2E248D8AB99AB, 0x00003FF6 //A9 +data8 0xE12BE2785727F2D6, 0x0000BFF7 //A8 +data8 0x9FC9EF90F87BF1E2, 0x00003FF6 //A7 +data8 0x9B02FE0DAF42C08F, 0x00003FF9 //A6 +data8 0xBDACE06F531D9491, 0x0000BFFA //A5 +data8 0xE3048AD1DB2F648C, 0x00003FF9 //A4 +// +// Polynomial coefficients for the tanh(x), 2.0 <= |x| < 3.25 +data8 0x856EC3B0330A385A, 0x00003FEB //A19 +data8 0xC641D69DAE2D429C, 0x0000BFF2 //A18 +data8 0xC683EB0BE1343FFF, 0x00003FF5 //A17 +data8 0xC358954224E4E823, 0x0000BFF7 //A16 +data8 0xF813A8D6D396BC5F, 0x00003FF8 //A15 +data8 0xE0ECDFED078D37D6, 0x0000BFF9 //A14 +data8 0x950E4E619855E316, 0x00003FFA //A13 +data8 0x8453B8F93370FB58, 0x0000BFFA //A12 +data8 0xFDBA28430AEC95BA, 0x00003FF7 //A11 +data8 0x9371AAC1FDB1E664, 0x00003FFA //A10 +data8 0xAC972DA97782D88A, 0x0000BFFB //A9 +data8 0xE18F47B10B9CE1BC, 0x00003FFB //A8 +data8 0xAB7C81230BF13BC6, 0x0000BFFB //A7 +data8 0xA6CAAD4A3E31A7D5, 0x0000BFF8 //A6 +data8 0x9CABD76D1D5C3878, 0x00003FFC //A5 +data8 0x92906D077941CAA9, 0x0000BFFD //A4 +// +// Polynomial coefficients for the tanh(x), 4.0 <= |x| < 6.5 +data8 0x9232D19F71709AC9, 0x0000BFF5 //A19 +data8 0x819E31323F5DD3F8, 0x00003FF8 //A18 +data8 0xDA8E1CDB8D23DC29, 0x0000BFF9 //A17 +data8 0xE97C7CD8FC0486D8, 0x00003FFA //A16 +data8 0xB0C4AD234D88C9F2, 0x0000BFFB //A15 +data8 0xC5989BFB28FDE267, 0x00003FFB //A14 +data8 0x9B26520EC4EFEE8E, 0x0000BFFB //A13 +data8 0xC4B6F758AD21E574, 0x00003FF9 //A12 +data8 0xCC36E3FFA10D2CFF, 0x00003FFA //A11 +data8 0x8738696FB06A5CED, 0x0000BFFC //A10 +data8 0xD31981825BF39228, 0x00003FFC //A9 +data8 0x82C58FB9BEE43992, 0x0000BFFD //A8 +data8 0x88D5AAE49164B6F3, 0x00003FFD //A7 +data8 0xF4CA0B968AF2DDE2, 0x0000BFFC //A6 +data8 0xB99874B482BD17EE, 0x00003FFC //A5 +data8 0xE93FB2F99431DC1D, 0x0000BFFB //A4 +// +// Polynomial coefficients for the tanh(x), 8.0 <= |x| < 13.0 +data8 0xAAA9EB7EADA85CEC, 0x00003FF5 //A19 +data8 0x980C80EE05A6BE78, 0x0000BFF8 //A18 +data8 0x818DA9F5396390A5, 0x00003FFA //A17 +data8 0x8D8CC21E23D8A6A2, 0x0000BFFB //A16 +data8 0xE0EC19E55A886765, 0x00003FFB //A15 +data8 0x8C11197A7E6244C5, 0x0000BFFC //A14 +data8 0x901D2BF203C2F7F3, 0x00003FFC //A13 +data8 0xFEACAEE66EE803E5, 0x0000BFFB //A12 +data8 0xC684E4925E318C3F, 0x00003FFB //A11 +data8 0x8A9D8A970565F28D, 0x0000BFFB //A10 +data8 0xAE34C61DE5CEA4D4, 0x00003FFA //A9 +data8 0xC44C5714BD6208A0, 0x0000BFF9 //A8 +data8 0xC4612F7D6C8BDB79, 0x00003FF8 //A7 +data8 0xABD91DCE40D5EECB, 0x0000BFF7 //A6 +data8 0x80E375C1B847B72F, 0x00003FF6 //A5 +data8 0xA11C7DD978CF700A, 0x0000BFF4 //A4 +// +// Polynomial coefficients for the tanh(x), 16.0 <= |x| < 19.0625 +data8 0xE29D17C510F86F6B, 0x00003FF3 //A19 +data8 0x88FE52EB39A3A98C, 0x0000BFF5 //A18 +data8 0xA406547E50360693, 0x00003FF5 //A17 +data8 0x83E6260B71C6D7DE, 0x0000BFF5 //A16 +data8 0xA36AB5B0CBC97B85, 0x00003FF4 //A15 +data8 0xA94931E0B7BA6C14, 0x0000BFF3 //A14 +data8 0x9A4596DAF350AD63, 0x00003FF2 //A13 +data8 0xFE47643F375AECA5, 0x0000BFF0 //A12 +data8 0xBF8433C5ABEE63B1, 0x00003FEF //A11 +data8 0x83CEE05D7AE90A0A, 0x0000BFEE //A10 +data8 0xA4CC45480BCEB02D, 0x00003FEC //A9 +data8 0xB967CBDCBC16CB10, 0x0000BFEA //A8 +data8 0xB9681B214EDC098D, 0x00003FE8 //A7 +data8 0xA23B20D87B80DFA8, 0x0000BFE6 //A6 +data8 0xF358B2C46F10CBAF, 0x00003FE3 //A5 +data8 0x98176FD06229A385, 0x0000BFE1 //A4 +// +// Binary subranges +// Polynomial coefficients for the tanh(x), 3.25 <= |x| < 4.0 +data8 0xEF2EE841288F6706, 0x00003FE9 //A19 +data8 0xE65D5B74B85F82A6, 0x00003FEB //A18 +data8 0xE495FC21E42A79FF, 0x00003FEA //A17 +data8 0xF99B267A913CF3E5, 0x00003FEC //A16 +data8 0xFE3D700F4A0A0FDE, 0x0000BFEC //A15 +data8 0x8F91BB4EE4E4EA52, 0x00003FEE //A14 +data8 0xBCA9F41A5C6EF8BA, 0x0000BFEE //A13 +data8 0xF93E00884027A9CF, 0x00003FED //A12 +data8 0xC4D4036A61BABC2F, 0x00003FEF //A11 +data8 0x86CC2AD1AD47C7D5, 0x0000BFF2 //A10 +data8 0xD3065DEF4CE9AD32, 0x00003FF3 //A9 +data8 0x82C44125F568D54E, 0x0000BFF5 //A8 +data8 0x88D588729BAF14CA, 0x00003FF6 //A7 +data8 0xF4CA0661307243C7, 0x0000BFF6 //A6 +data8 0xB998746D57061F74, 0x00003FF7 //A5 +data8 0xE93FB2F482327C19, 0x0000BFF7 //A4 +// +// Polynomial coefficients for the tanh(x), 6.5 <= |x| < 8.0 +data8 0xEB189B71ADC40BE2, 0x00003FEA //A19 +data8 0xA60B46F9FF6DC2DF, 0x00003FEA //A18 +data8 0xBB061CDD9F368B9D, 0x00003FEC //A17 +data8 0x841E08BDF5429991, 0x0000BFEC //A16 +data8 0xDD33990B433F25BE, 0x00003FED //A15 +data8 0xBA5DE6B870F0A2BB, 0x0000BFEE //A14 +data8 0xA71D489AAA6DACF0, 0x00003FEF //A13 +data8 0x874CCB2B8F3FBC0E, 0x0000BFF0 //A12 +data8 0xCB1D2E9754EA534A, 0x00003FF0 //A11 +data8 0x8BA5ABB53BA6ABCF, 0x0000BFF1 //A10 +data8 0xAE91FD1C2391A32B, 0x00003FF1 //A9 +data8 0xC465A74B798E5761, 0x0000BFF1 //A8 +data8 0xC4666152397D15C1, 0x00003FF1 //A7 +data8 0xABD9E63CA575B950, 0x0000BFF1 //A6 +data8 0x80E38B18E8D0F460, 0x00003FF1 //A5 +data8 0xA11C80E20AAFDD3C, 0x0000BFF0 //A4 +// +// Polynomial coefficients for the tanh(x), 13.0 <= |x| < 16.0 +data8 0xBECD0AF7E22E5594, 0x00003FE9 //A19 +data8 0xE2834E2D68C1128C, 0x00003FEA //A18 +data8 0x97B117611B317379, 0x00003FEB //A17 +data8 0xEE91A0D39A772F6B, 0x00003FEA //A16 +data8 0x92F6EC377DCADA4F, 0x00003FEA //A15 +data8 0xD8FCCD6A3277FAB7, 0x00003FE8 //A14 +data8 0xC15AB9CB0C3DCFE0, 0x00003FE7 //A13 +data8 0xC3C659704A7147CD, 0x00003FE2 //A12 +data8 0xFA17F09D27C97912, 0x00003FE4 //A11 +data8 0xF664147182B94788, 0x0000BFE3 //A10 +data8 0xA6C89FA741464DA1, 0x00003FE3 //A9 +data8 0xB90FE464A825EFA8, 0x0000BFE2 //A8 +data8 0xB973AE0FD86EC024, 0x00003FE1 //A7 +data8 0xA23A087F96846951, 0x0000BFE0 //A6 +data8 0xF358D8A7FC012D5D, 0x00003FDE //A5 +data8 0x98176E2309B7C73A, 0x0000BFDD //A4 +// +// Coefficients ##16..19 ("tail" coefficient tables) +// Polynomial coefficients for the tanh(x), 0.25 <= |x| < 0.5 +data8 0x838F209ABB9BA7B3, 0x0000BFF7 //A3 +data8 0xEBC0AC78DA4FC500, 0x0000BFF8 //A2 +data8 0xF0A4D02960B60E69, 0x00003FFC //A1 +data8 0xFACBF534D0E42F8A, 0x00003FFC //A0 +// +// Polynomial coefficients for the tanh(x), 0.5 <= |x| < 1.0 +data8 0xC0ECBDC0A0D133A6, 0x0000BFF8 //A3 +data8 0xBA13A076BF8E812F, 0x0000BFFB //A2 +data8 0xC954A37D1A1CA070, 0x00003FFD //A1 +data8 0xEC9A9EBAB4579B29, 0x00003FFD //A0 +// +// Polynomial coefficients for the tanh(x), 1.0 <= |x| < 2.0 +data8 0xD42E9175A6EA1397, 0x00003FFB //A3 +data8 0xA3C361378A55CF56, 0x0000BFFD //A2 +data8 0xD706E07CC8622983, 0x00003FFD //A1 +data8 0xC2F7D5A8A79CA2AC, 0x00003FFE //A0 +// +// Polynomial coefficients for the tanh(x), 2.0 <= |x| < 3.25 +data8 0xAC7A7F8776817C7E, 0x00003FFD //A3 +data8 0x8B7CE95E69FCFE9A, 0x0000BFFD //A2 +data8 0x90B161317028D995, 0x00003FFC //A1 +data8 0xF6CA82F0DE1E9E9A, 0x00003FFE //A0 +// +// Polynomial coefficients for the tanh(x), 4.0 <= |x| < 6.5 +data8 0xE9E072407BC22DC6, 0x00003FFA //A3 +data8 0xAFA4A913D8E6BB4A, 0x0000BFF9 //A2 +data8 0xAFC2D6A885BAA875, 0x00003FF7 //A1 +data8 0xFFD40B84505A10B2, 0x00003FFE //A0 +// +// Polynomial coefficients for the tanh(x), 8.0 <= |x| < 13.0 +data8 0xA11C8A1FED168CD5, 0x00003FF2 //A3 +data8 0xF1AAD6B02063A5F5, 0x0000BFEF //A2 +data8 0xF1AADA46AD341C34, 0x00003FEC //A1 +data8 0xFFFFFC39548FC34B, 0x00003FFE //A0 +// +// Polynomial coefficients for the tanh(x), 16.0 <= |x| < 19.0625 +data8 0x98176FD1F0950C16, 0x00003FDE //A3 +data8 0xE42327BB09C8B2A5, 0x0000BFDA //A2 +data8 0xE42327BB0B154F13, 0x00003FD6 //A1 +data8 0xFFFFFFFFFFF8DEE7, 0x00003FFE //A0 +// +// Binary subranges +// Polynomial coefficients for the tanh(x), 3.25 <= |x| < 4.0 +data8 0xE9E072404329293B, 0x00003FF7 //A3 +data8 0xAFA4A913D798300B, 0x0000BFF7 //A2 +data8 0xAFC2D6A885B48567, 0x00003FF6 //A1 +data8 0xFFD40B84505A10B4, 0x00003FFE //A0 +// +// Polynomial coefficients for the tanh(x), 6.5 <= |x| < 8.0 +data8 0xA11C8A63815F7A28, 0x00003FEF //A3 +data8 0xF1AAD6B65B0EBF53, 0x0000BFED //A2 +data8 0xF1AADA46E799831F, 0x00003FEB //A1 +data8 0xFFFFFC39548FC348, 0x00003FFE //A0 +// +// Polynomial coefficients for the tanh(x), 13.0 <= |x| < 16.0 +data8 0x98176FE982140A59, 0x00003FDB //A3 +data8 0xE42327B9B0D7202F, 0x0000BFD8 //A2 +data8 0xE42327BB13076BD6, 0x00003FD5 //A1 +data8 0xFFFFFFFFFFF8DEE7, 0x00003FFE //A0 +// +// Polynomial coefficients for the tanh(x), 0.0 <= |x| < 0.25 +// ('tanh_near_zero' path) +data8 0xBF2BA5D26E479D0C //A9 +data8 0x3F4336D96F81EE26 //A8 +data8 0xBF8226E34AE197B0 //A5 +data8 0x3F9664F488148657 //A4 +data8 0xAAAAAAAAAAAAAA99, 0x0000BFFD //A1 +data8 0xBF57D91925BB5EE2 //A7 +data8 0x3F6D6D36C3D5B7A1 //A6 +data8 0xBFABA1BA1BA19D32 //A3 +data8 0x3FC1111111111108 //A2 +// +// 1.0 - 2^(-63) +// ('tanh_saturation' path) +data8 0xFFFFFFFFFFFFFFFF, 0x00003FFE +LOCAL_OBJECT_END(tanh_data) + +// CAUTION: The order of table coefficients shouldn't be changed! + + +.section .text +GLOBAL_LIBM_ENTRY(tanh) +{ .mfi + alloc r32 = ar.pfs, 0, 20, 0, 0 + fmerge.se fArgAbsNorm = f1, f8 // normalized x + adds rSignBit = 0x1, r0 // Bit for sign removing +} +{ .mfi + addl rDataPtr = @ltoff(tanh_data), gp // Data pointer + fma.s1 fTwo = f1, f1, f1 // 2.0 construct + addl rArgSgnd = 0xfff, r0 // mask for exponent +};; + +{ .mfi + getf.d rArg = f8 // x in GR + fclass.m p6,p0 = f8, 0xEF // Filter 0, denormals and specials + // 0xEF = @qnan|@snan|@pos|@neg|@zero|@unorm|@inf + shl rArgSgnd = rArgSgnd, 52 // mask for exponent +} +{ .mlx + ld8 rDataPtr = [rDataPtr] // Real data pointer + movl r1625Sgnd = 0xA000000000000 // 1.625 signd + // 1.625 significand used to filter values greater than 3.25, 6.5, 13.0 + // to enter binary subranges +};; + +{ .mfi + addl rBias = 0x3FD00, r0 // bias of 0.25 << 8 + fma.s1 fArgSqr = f8, f8, f0 // x^2 + shl rSignBit = rSignBit, 63 // mask for sign bit +} +{ .mlx + addl rMask = 0x7FF00, r0 // Mask for index bits + movl rTwo = 0x4000000000000000 // 2.0 +};; + +{ .mfi + andcm rArgSgnd = rArg, rArgSgnd // Remove exponent + nop.f 0 + shr.u rShiftedArg = rArg, 44 // Select only necessary bits of arg +} +{ .mfb + andcm rAbsArg = rArg, rSignBit // Remove sign + nop.f 0 +(p6) br.cond.spnt _tanh_spec // Branch to zero, denorm & specs +};; + +{ .mfi + and rShiftedArgMasked = rShiftedArg, rMask // bias of x << 8 + fmerge.s fArgAbs = f1, f8 // |x| + shr rShiftedAbsArg = rAbsArg, 44 // Select only necessary + // bits of absolute arg +} +{ .mfi + cmp.gt p8, p11 = rArgSgnd, r1625Sgnd // p8 = 1 if + // signd(x) > 1.625 - to filter values greater than 3.25, 6.5, 13.0 + nop.f 0 + nop.i 0 +};; + +{ .mfi + sub rIndex = rShiftedArgMasked, rBias // index << 8 + nop.f 0 + cmp.lt p10, p0 = rShiftedArgMasked, rBias // p10=1 if |x|<0.25 +} +{ .mfb +(p8) cmp.gt p8, p11 = rAbsArg, rTwo // If arg is greater than 2.0? + // (then we should use binary subranges) + nop.f 0 +(p10) br.cond.spnt tanh_near_zero // branch out if |x| < 0.25 +};; + +.pred.rel "mutex",p8,p11 +{ .mfi +(p8) add rIndex = 0x400, rIndex // Make pointer to binary + // subranges +(p11) fms.s1 fArgAbsNorm = fArgAbsNorm, f1, f1 // |x|/b - 1.0 + addl rSaturation = 0x40331, r0 // shifted bits of 19.0625 +} +{ .mfi + nop.m 0 +(p8) fms.s1 fArgAbsNorm = fArgAbsNorm, f1, fTwo // |x|/b - 2.0 + // this is only for binary subranges [3.25;4], [6.5;8], [13.0;16] + nop.i 0 +} +;; + +{ .mfi + add rCoeffAddr1 = rDataPtr, rIndex// coeff. ##0,2,..14 + nop.f 0 + nop.i 0 +};; + +{ .mfi + adds rCoeffAddr2 = 16, rCoeffAddr1 // Shifted pointer to coeffs + fmerge.s fSignumX = f8, f1 // signum(x) + nop.i 0 +} +{ .mfb + cmp.le p12, p0 = rSaturation, rShiftedAbsArg // |x|>=19.0625? + nop.f 0 +(p12) br.cond.spnt tanh_saturation // branch out if x |x| >= 19.0625 +};; + +{.mfi + ldfe fA19 = [rCoeffAddr1], 32 // Load A19 + nop.f 0 + nop.i 0 +} +{.mfi + ldfe fA18 = [rCoeffAddr2], 32 // Load A18 + nop.f 0 + adds rCoeffAddr3 = 0xA00, rDataPtr // Pointer to "tail" + // coefficients tables +};; + +{.mfi + ldfe fA17 = [rCoeffAddr1], 32 // Load A17 + nop.f 0 + nop.i 0 +} +{.mfi + ldfe fA16 = [rCoeffAddr2], 32 // Load A16 + nop.f 0 + nop.i 0 +};; + +{.mfi + ldfe fA15 = [rCoeffAddr1], 32 // Load A15 + fma.s1 fTSqr = fArgAbsNorm, fArgAbsNorm, f0 // x^2 + shr.u rIndex = rIndex, 2 // Index for "tail" tables +} +{.mfi + ldfe fA14 = [rCoeffAddr2], 32 // Load A14 + nop.f 0 + adds rCoeffAddr4 = 16, r0 // Shifter pointer + // to "tail" tables +};; + +{.mfi + ldfe fA13 = [rCoeffAddr1], 32 // Load A13 + nop.f 0 + add rCoeffAddr3 = rCoeffAddr3, rIndex // "tail" coeffs to load + // ##16..23 +} +{.mfi + ldfe fA12 = [rCoeffAddr2], 32 // Load A12 + nop.f 0 + cmp.lt p15, p14 = rArg, r0 // Arg positive (p14) + // or negative (p15)? +};; + +{.mfi + ldfe fA11 = [rCoeffAddr1], 32 // Load A11 + nop.f 0 + add rCoeffAddr4 = rCoeffAddr3, rCoeffAddr4 // shifted "tail" + // coeffs to load +} +{.mfi + ldfe fA10 = [rCoeffAddr2], 32 // Load A10 + nop.f 0 + nop.i 0 +};; + +{.mfi + ldfe fA9 = [rCoeffAddr1], 32 // Load A9 + nop.f 0 + nop.i 0 +} +{.mfi + ldfe fA8 = [rCoeffAddr2], 32 // Load A8 + nop.f 0 + nop.i 0 +};; + +{.mfi + ldfe fA7 = [rCoeffAddr1], 32 // Load A7 + nop.f 0 + nop.i 0 +} +{.mfi + ldfe fA6 = [rCoeffAddr2], 32 // Load A6 + nop.f 0 + nop.i 0 +};; + +{.mfi + ldfe fA5 = [rCoeffAddr1], 32 // Load A5 + fma.s1 fTDeg3 = fArgAbsNorm, fTSqr, f0 // x^3 + nop.i 0 +} +{.mfi + ldfe fA4 = [rCoeffAddr2], 32 // Load A4 + fma.s1 fTQuadr = fTSqr, fTSqr, f0 // x^4 + nop.i 0 +};; + +// Path #3 Polynomial Pol19(y) computation; y = fArgAbsNorm +{.mfi + ldfe fA3 = [rCoeffAddr3], 32 // Load A3 + fma.s1 fArgAbsNormSgn = fArgAbsNorm, fSignumX, f0 // sign(x)*x + nop.i 0 +} +{.mfi + ldfe fA2 = [rCoeffAddr4], 32 // Load A2 + nop.f 0 + nop.i 0 +};; + +{.mfi + ldfe fA1 = [rCoeffAddr3], 32 // Load A1 + fma.s1 fRes = fA19, fArgAbsNorm, fA18 // Polynomial + nop.i 0 +} +{.mfi + ldfe fA0 = [rCoeffAddr4], 32 // Load A0 + nop.f 0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fA17 = fA17, fArgAbsNorm, fA16 // Polynomial + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fA15 = fA15, fArgAbsNorm, fA14 // Polynomial + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fTDeg7 = fTDeg3, fTQuadr, f0 // Polynomial + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA13 = fA13, fArgAbsNorm, fA12 // Polynomial + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fA11 = fA11, fArgAbsNorm, fA10 // Polynomial + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fA9 = fA9, fArgAbsNorm, fA8 // Polynomial + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fRes = fRes, fTSqr, fA17 // Polynomial + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA7 = fA7, fArgAbsNorm, fA6 // Polynomial + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fA5 = fA5, fArgAbsNorm, f0 // Polynomial + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fA15 = fA15, fTSqr, fA13 // Polynomial + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA4 = fA4, fArgAbsNorm, fA3 // Polynomial + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fA2 = fA2, fArgAbsNorm, fA1 // Polynomial + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fA11 = fA11, fTSqr, fA9 // Polynomial + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fA7 = fA7, fTSqr, fA5 // Polynomial + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fRes = fRes, fTQuadr, fA15 // Polynomial + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fA4 = fA4, fTSqr, fA2 // Polynomial + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fRes = fRes, fTQuadr, fA11 // Polynomial + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fA4 = fA7, fTDeg3, fA4 // Polynomial + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fRes = fRes, fTDeg7, fA4 // Polynomial + nop.i 0 +};; + +{ .mfi + nop.m 0 + // result for negative argument +(p15) fms.d.s0 f8 = fRes, fArgAbsNormSgn, fA0 // Polynomial + nop.i 0 +} +{ .mfb + nop.m 0 + // result for positive argument +(p14) fma.d.s0 f8 = fRes, fArgAbsNormSgn, fA0 // Polynomial + br.ret.sptk b0 +};; + + +// |x| < 0.25 Path ///////////////////////////////////////////////////////////// +.align 32 +tanh_near_zero: +{ .mfi + adds rCoeffAddr1 = 0xC80, rDataPtr // address of A9 + fma.s0 fTSqr = fArgSqr, fArgSqr, f0 // x^4 + nop.i 0 +} +{ .mfi + adds rCoeffAddr2 = 0xCB0, rDataPtr // address of A7 + nop.f 0 + nop.i 0 +};; + +{ .mfi + ldfpd fA9, fA8 = [rCoeffAddr1], 16 // Load A9, A8 + nop.f 0 + nop.i 0 +} +{ .mfi + ldfpd fA7, fA6 = [rCoeffAddr2], 16 // Load A7, A6 + nop.f 0 + nop.i 0 +};; + +{ .mfi + ldfpd fA5, fA4 = [rCoeffAddr1], 16 // Load A5, A4 + nop.f 0 + nop.i 0 +} +{ .mfi + ldfpd fA3, fA2 = [rCoeffAddr2], 16 // Load A3, A2 + nop.f 0 + nop.i 0 +};; + +{ .mfi + ldfe fA1 = [rCoeffAddr1] // Load A1 + nop.f 0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fTQuadr = fTSqr, fTSqr, f0 // x^4 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fRes = fA9, fArgSqr, fA8 // Polynomial + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA7 = fA7, fArgSqr, fA6 // Polynomial + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fA3 = fA3, fArgSqr, fA2 // Polynomial + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA5 = fA5, fArgSqr, fA4 // Polynomial + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fA1 = fA1, fArgSqr, f0 // Polynomial + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fTQuadrSgn = fTQuadr, f8, f0 // x^4 * x + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fRes = fRes, fTSqr, fA7 // Polynomial + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fA1 = fA3, fTSqr, fA1 // Polynomial + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fRes = fRes, fTSqr, fA5 // Polynomial + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fRes = fRes, fTQuadr, fA1 // Polynomial + nop.i 0 +};; + +{ .mfb + nop.m 0 + fma.d.s0 f8 = fRes, f8, f8 // x+x*Polynomial + br.ret.sptk b0 // Exit for |x| < 0.25 +};; + + + + + +// 19.0625 <= |x| < +inf Saturation path /////////////////////////////////////// +.align 32 +tanh_saturation: +{ .mfi + adds rDataPtr = 0xCD0, rDataPtr // address of A0 + nop.f 0 + nop.i 0 +};; + +{ .mfi + ldfe fA0 = [rDataPtr] // Load A0 = 2^(-63) + nop.f 0 + nop.i 0 +};; + +{ .mfb + nop.m 0 + fma.d.s0 f8 = fA0, fSignumX, f0 // sign(x)*(1.0-2^(-63)) + br.ret.sptk b0 // Exit for 19.0625 <=|x|< +inf +};; + + + + + +// 0, denormals and special IEEE numbers path ///////////////////////////////// +_tanh_spec: + +{ .mfi + cmp.lt p15, p14 = rArg, r0 // Is arg negative (p15) + // or positive p14) + fclass.m p6,p0 = f8, 0x23 // To filter infinities + // 0x23 = @pos|@neg|@inf + nop.i 0 +};; + +{ .mfi + nop.m 0 + fclass.m p7,p0 = f8, 0xC7 // To filter NaNs & Zeros + // 0xC7 = @pos|@neg|@zero|@qnan|@snan + nop.i 0 +};; + +{ .mfb + nop.m 0 +(p6) fmerge.s f8 = f8, f1 // +/-1 for INF args +(p6) br.ret.spnt b0 // exit for x = INF +};; + +{ .mfb + nop.m 0 +(p7) fma.d.s0 f8 = f8, f1, f8 // +/-0 for 0 args + // and NaNs for NaNs +(p7) br.ret.spnt b0 // exit for x = NaN or +/-0 +};; + +{ .mfi + nop.m 0 + fnorm.s0 f8 = f8 // Normalize arg + nop.i 0 +};; + +.pred.rel "mutex",p14,p15 +{ .mfi + nop.m 0 +(p14) fnma.d.s0 f8 = f8, f8, f8 // res = r-r^2 + nop.i 0 +} +{ .mfb + nop.m 0 +(p15) fma.d.s0 f8 = f8, f8, f8 // res = r+r^2 + br.ret.sptk b0 // 0, denormals, specials return +};; + +GLOBAL_LIBM_END(tanh) + + diff --git a/sysdeps/ia64/fpu/s_tanhf.S b/sysdeps/ia64/fpu/s_tanhf.S new file mode 100644 index 0000000000..e4e91cfe63 --- /dev/null +++ b/sysdeps/ia64/fpu/s_tanhf.S @@ -0,0 +1,581 @@ +.file "tanhf.s" + + +// Copyright (c) 2001 - 2005, Intel Corporation +// All rights reserved. +// +// Contributed 2001 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 05/30/01 Initial version +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// 03/31/05 Reformatted delimiters between data tables +// +// API +//============================================================== +// float tanhf(float) +// +// Overview of operation +//============================================================== +// Background +// +// +// There are 9 paths: +// 1. x = +/-0.0 +// Return tanhf(x) = +/-0.0 +// +// 2. 0.0 < |x| < 0.3125 +// Return tanhf(x) = x + x^3*Pol3(x^2), +// where Pol3(x^2) = C3*x^6 + C2*x^4 + C1*x^2 + C0 +// +// 3. 0.3125 <= |x| < 8.0 +// Return tanhf(x) = sign(x)*PolD(x)*PolC(|x|) + sign(x)*PolA(|x|), +// where sign(x)*PolD(x) = sign(x)*(|x|^7 + D2*x^6 + D1*|x|^5 + D0*x^4), +// PolC(|x|) = B0*x^4 + C3*|x|^3 + C2*|x|^2 + C1*|x| + C0, +// PolA(|x|) = A3|x|^3 + A2*x^2 + A1*|x| + A0 +// +// Actually range 0.3125<=|x|< 8.0 is split to 5 subranges. +// For each subrange there is particular set of coefficients. +// Below is the list of subranges: +// 3.1 0.3125 <= |x| < 0.5 +// 3.2 0.5 <= |x| < 1.0 +// 3.3 1.0 <= |x| < 2.0 +// 3.4 2.0 <= |x| < 4.0 +// 3.5 4.0 <= |x| < 8.0 +// +// 4. 8.0 <= |x| < 9.125 +// Return tanhf(x) = sign(x)*(A3|x|^3 + A2*x^2 + A1*|x| + A0) +// +// 5. 9.125 <= |x| < +INF +// Return tanhf(x) = sign(x)*(1.0d - 2^(-52)) +// +// 6. |x| = INF +// Return tanhf(x) = sign(x) * 1.0 +// +// 7. x = [S,Q]NaN +// Return tanhf(x) = QNaN +// +// 8. x is positive denormal +// Return tanhf(x) = x - x^2 +// +// 9. x is negative denormal +// Return tanhf(x) = x + x^2 +// +// Registers used +//============================================================== +// Floating Point registers used: +// f8, input +// f32 -> f59 + +// General registers used: +// r32 -> r46, r2, r3 + +// Predicate registers used: +// p0, p6 -> p15 + +// p6 to filter out case when x = [Q,S]NaN or +/-0 +// p7 to filter out case when x = denormal +// p8 set if |x| >= 0.3125, used also to process denormal input +// p9 to filter out case when |x| = inf +// p10 to filter out case when |x| < 0.3125 +// p11 to filter out case when 0.3125 <= |x| < 9.125 +// p12 to filter out case when |x| >= 9.125 +// p13 to filter out case when 8.0 <= |x| < 9.125 +// p14 set to 1 for positive x +// p15 set to 1 for negative x + +// Assembly macros +//============================================================== +rDataPtr = r2 +rDataPtr1 = r3 + +rBias = r33 +rCoeffAddr3 = r34 +rNearSaturation = r35 +rCoeffAddr1 = r36 +rCoeffAddr2 = r37 +rOffset2 = r38 +rBias2 = r39 +rMask = r40 +rArg = r41 +rBound = r42 +rSignBit = r43 +rAbsArg = r44 +rDataPtr2 = r45 +rSaturation = r46 + +//============================================================== +fA0 = f32 +fA1 = f33 +fA2 = f34 +fA3 = f35 +fC0 = f36 +fC1 = f37 +fC2 = f38 +fC3 = f39 +fD0 = f40 +fD1 = f41 +fD2 = f42 +fB0 = f43 +fArgSqr = f44 +fAbsArg = f45 +fSignumX = f46 +fArg4 = f47 +fArg4Sgn = f48 +fArg3 = f49 +fArg3Sgn = f50 +fArg7Sgn = f51 +fArg6Sgn = f52 +fPolC = f53 +fPolCTmp = f54 +fPolA = f55 +fPolATmp = f56 +fPolD = f57 +fPolDTmp = f58 +fArgSqrSgn = f59 + +// Data tables +//============================================================== + +RODATA + +.align 16 + +LOCAL_OBJECT_START(tanhf_data) +// Polynomial coefficients for the tanh(x), 0.3125 <= |x| < 0.5 +data8 0x3F9BEEDFDD177D7B // C0 +data8 0x3F970D10C7F32458 // C1 +data8 0x3F766D6B051F3A38 // C2 +data8 0xBF732F2001B23402 // C3 +data8 0xBF854BE1CE1ED499 // D0 +data8 0x4013C944F3999A16 // D1 +data8 0xC01106C6975222C0 // D2 +data8 0x3F783D5ACCF9EBE8 // B0 +// Polynomial coefficients for the tanh(x), 0.5 <= |x| < 1.0 +data8 0xBF5D631440786869 // C0 +data8 0xBF575D79A0D52069 // C1 +data8 0xBF7E2237B7EFC705 // C2 +data8 0x3F6A7ACBC273041F // C3 +data8 0xC040E32EA52D91EB // D0 +data8 0x403D19463E5DB4D7 // D1 +data8 0xC02216F61F759F39 // D2 +data8 0xBF55B4EA0B844BE7 // B0 +// Polynomial coefficients for the tanh(x), 1.0 <= |x| < 2.0 +data8 0x3F8637DBE5B3E690 // C0 +data8 0xBF7F7FEC158C07F5 // C1 +data8 0x3F711C586706838A // C2 +data8 0xBF50EF7EF605554E // C3 +data8 0xC054D45448354E25 // D0 +data8 0x404ADFEEA282E730 // D1 +data8 0xC028AEE456D59549 // D2 +data8 0x3F25232D1BED59A8 // B0 +// Polynomial coefficients for the tanh(x), 2.0 <= |x| < 4.0 +data8 0xBF52602285F2D06C // C0 +data8 0x3F2E57C298FFE1E0 // C1 +data8 0xBF15ED575DB3C811 // C2 +data8 0x3EE428878A08525C // C3 +data8 0xC0895A26849039C1 // D0 +data8 0x406E3C60BBFBB575 // D1 +data8 0xC03A06F62867C75A // D2 +data8 0xBEB114C70F1C723E // B0 +// Polynomial coefficients for the tanh(x), 4.0 <= |x| < 8.0 +data8 0x3EF4B22BD17039A3 // C0 +data8 0xBEB704ADC040C57F // C1 +data8 0x3E937A98288AFE1A // C2 +data8 0xBE4F33B2C9FFE7E7 // C3 +data8 0xC0BE48CFADE2431E // D0 +data8 0x4090E74249760FDD // D1 +data8 0xC04B6F537FCF2F1E // D2 +data8 0x3E0DCD879C91ADEA // B0 +// Polynomial coefficients for the tanh(x), -0.3125 < x < 0.3125 +data8 0xBFD555551E8245B7 // A0 +data8 0x3FC110E63F52E689 // A1 +data8 0xBFAB8CD6A5B7BAFA // A2 +data8 0x3F945D467FCEB553 // A3 +// Polynomial coefficients for the tanh(x), 0.3125 <= |x| < 0.5 +data8 0xBE3DCC92FCAECBB6 // A0 +data8 0x3FF0000043B7D267 // A1 +data8 0xBED18BF28ACFC4B1 // A2 +data8 0xBFD554A56F82837E // A3 +// Polynomial coefficients for the tanh(x), 0.5 <= |x| < 1.0 +data8 0x3EFD6054758539F9 // A0 +data8 0x3FEFFBFC77198EBE // A1 +data8 0x3F700327CA98D237 // A2 +data8 0xBFD68955F5BB2FA1 // A3 +// Polynomial coefficients for the tanh(x), 1.0 <= |x| < 2.0 +data8 0xBF71A53F229DF01B // A0 +data8 0x3FF0AECFD730DE50 // A1 +data8 0xBFC882F88E5DF3BA // A2 +data8 0x3FC6EDF212CA2A8D // A3 +// Polynomial coefficients for the tanh(x), 2.0 <= |x| < 4.0 +data8 0xBFAF0B712E9EDA47 // A0 +data8 0x3FF1C208080BEA64 // A1 +data8 0x3FC3D29B20C8946E // A2 +data8 0xBFF04514ED900A6A // A3 +// Polynomial coefficients for the tanh(x), 4.0 <= |x| < 8.0 +data8 0xBFB1DEA49A831CBC // A0 +data8 0x3FFA729FC7085674 // A1 +data8 0xBFF2F44D923A8FA4 // A2 +data8 0x3FE092FC5712227E // A3 +// Polynomial coefficients for the tanh(x), 8.0 <= |x| <= 9.125 +data8 0x3FEFFF5769EE3041 // A0 +data8 0x3EFBBF148D850891 // A1 +data8 0xBEC86BCEF0F5C2FE // A2 +data8 0x3E7CBA4F3A885A5C // A3 +// +data8 0x3FEFFFFFFFFFFFFF // 1.0 - epsilon +LOCAL_OBJECT_END(tanhf_data) + +.section .text +GLOBAL_LIBM_ENTRY(tanhf) + +{ .mfi + alloc r32 = ar.pfs, 1, 14, 0, 0 + fmerge.s fAbsArg = f1, f8 // |x| + addl rMask = 0x806, r0 +} +{ .mfi + addl rDataPtr = @ltoff(tanhf_data), gp + fma.s1 fArgSqr = f8, f8, f0 // x^2 + adds rSignBit = 0x1, r0 +} +;; + +{ .mfi + getf.s rArg = f8 // x in GR + fclass.m p7,p0 = f8, 0x0b // is x denormal ? + // sign bit and 2 most bits in significand + shl rMask = rMask, 20 +} +{ .mfi + ld8 rDataPtr = [rDataPtr] + nop.f 0 + adds rBias2 = 0x1F4, r0 +} +;; + +{ .mfi + adds rNearSaturation = 0x14, r0 + fmerge.s fSignumX = f8, f1 // signum(x) + shl rSignBit = rSignBit, 31 // mask for sign bit +} +{ .mfi + adds rBound = 0x3EA, r0 + nop.f 0 + addl rSaturation = 0x4112, r0 +} +;; + +{ .mfi + andcm rOffset2 = rArg, rMask + fclass.m p6,p0 = f8, 0xc7 // is x [S,Q]NaN or +/-0 ? + shl rBound = rBound, 20 // 1.0f in GR +} +{ .mfb + andcm rAbsArg = rArg, rSignBit // |x| in GR + nop.f 0 +(p7) br.cond.spnt tanhf_denormal // branch out if x is denormal +} +;; + +{ .mfi + adds rCoeffAddr2 = 352, rDataPtr + fclass.m p9,p0 = f8, 0x23 // is x +/- inf? + shr rOffset2 = rOffset2, 21 +} +{ .mfi + cmp.lt p10, p8 = rAbsArg, rBound // |x| < 0.3125? + nop.f 0 + adds rCoeffAddr3 = 16, rDataPtr +} +;; + +{ .mfi +(p8) sub rBias = rOffset2, rBias2 + fma.s1 fArg4 = fArgSqr, fArgSqr, f0 // x^4 + shl rSaturation = rSaturation, 16 +} +{ .mfb +(p10) adds rBias = 0x14, r0 +(p6) fma.s.s0 f8 = f8,f1,f8 // NaN or +/-0 +(p6) br.ret.spnt b0 // exit for x = NaN or +/-0 +} +;; + +{ .mfi + shladd rCoeffAddr1 = rBias, 4, rDataPtr + fma.s1 fArg3Sgn = fArgSqr, f8, f0 // sign(x)*|x|^3 + // is |x| < 9.125? + cmp.lt p11, p12 = rAbsArg, rSaturation +} +{ .mfi + shladd rCoeffAddr3 = rBias, 4, rCoeffAddr3 + fma.s1 fArg3 = fArgSqr, fAbsArg, f0 // |x|^3 + shladd rCoeffAddr2 = rBias, 3, rCoeffAddr2 +} +;; + +{ .mfi +(p11) ldfpd fC0, fC1 = [rCoeffAddr1] +(p9) fmerge.s f8 = f8,f1 // +/- inf +(p12) adds rDataPtr = 544, rDataPtr +} +{ .mfb +(p11) ldfpd fC2, fC3 = [rCoeffAddr3], 16 + nop.f 0 +(p9) br.ret.spnt b0 // exit for x = +/- inf +} +;; + +{ .mfi +(p11) ldfpd fA0, fA1 = [rCoeffAddr2], 16 + nop.f 0 +(p8) cmp.eq.unc p13, p0 = rBias, rNearSaturation +} +{ .mfi + add rCoeffAddr1 = 48, rCoeffAddr1 + nop.f 0 + nop.i 0 +} +;; + +{ .mfi +(p11) ldfpd fD0, fD1 = [rCoeffAddr3] + nop.f 0 + nop.i 0 +} +{ .mfb +(p11) ldfpd fD2, fB0 = [rCoeffAddr1] + // sign(x)*|x|^2 + fma.s1 fArgSqrSgn = fArgSqr, fSignumX, f0 +(p10) br.cond.spnt tanhf_near_zero +} +;; + +{ .mfi +(p11) ldfpd fA2, fA3 = [rCoeffAddr2], 16 + fcmp.lt.s1 p15, p14 = f8,f0 + nop.i 0 +} +{ .mfb +(p12) ldfd fA0 = [rDataPtr] + fma.s1 fArg4Sgn = fArg4, fSignumX, f0 // sign(x)*|x|^4 +(p12) br.cond.spnt tanhf_saturation +} +;; +{ .mfi + nop.m 0 + fma.s1 fArg7Sgn = fArg4, fArg3Sgn, f0 // sign(x)*|x|^7 + nop.i 0 +} +{ .mfb + nop.m 0 + fma.s1 fArg6Sgn = fArg3, fArg3Sgn, f0 // sign(x)*|x|^6 +(p13) br.cond.spnt tanhf_close_to_saturation +} +;; + +{ .mfi + nop.m 0 + fma.s1 fPolC = fC3, fAbsArg, fC2 // C3*|x| + C2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fPolCTmp = fC1, fAbsArg, fC0 // C1*|x| + C0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fPolA = fA1, fAbsArg, fA0 // A1*|x| + A0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fPolD = fD1, fAbsArg, fD0 // D1*|x| + D0 + nop.i 0 +} +{ .mfi + nop.m 0 + // sign(x)*(|x|^7 + D2*x^6) + fma.s1 fPolDTmp = fArg6Sgn, fD2, fArg7Sgn + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fPolATmp = fA3, fAbsArg, fA2 // A3*|x| + A2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fB0 = fB0, fArg4, f0 // B0*x^4 + nop.i 0 +};; + +{ .mfi + nop.m 0 + // C3*|x|^3 + C2*x^2 + C1*|x| + C0 + fma.s1 fPolC = fPolC, fArgSqr, fPolCTmp + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + // PolD = sign(x)*(|x|^7 + D2*x^6 + D1*|x|^5 + D0*x^4) + fma.d.s1 fPolD = fPolD, fArg4Sgn, fPolDTmp + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + // PolA = A3|x|^3 + A2*x^2 + A1*|x| + A0 + fma.d.s1 fPolA = fPolATmp, fArgSqr, fPolA + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + // PolC = B0*x^4 + C3*|x|^3 + C2*|x|^2 + C1*|x| + C0 + fma.d.s1 fPolC = fPolC, f1, fB0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p14) fma.s.s0 f8 = fPolC, fPolD, fPolA // for positive x + nop.i 0 +} +{ .mfb + nop.m 0 +(p15) fms.s.s0 f8 = fPolC, fPolD, fPolA // for negative x + br.ret.sptk b0 // Exit for 0.3125 <=|x|< 8.0 +};; + + +// Here if |x| < 0.3125 +tanhf_near_zero: +{ .mfi + nop.m 0 + fma.s1 fPolC = fC3, fArgSqr, fC2 // C3*x^2 + C2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fPolCTmp = fC1, fArgSqr, fC0 // C1*x^2 + C0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fPolC = fPolC, fArg4, fPolCTmp // C3*x^6 + C2*x^4 + C1*x^2 + C0 + nop.i 0 +};; + +{ .mfb + nop.m 0 + // x + x^3*(C3*x^6 + C2*x^4 + C1*x^2 + C0) + fma.s.s0 f8 = fPolC, fArg3Sgn, f8 + br.ret.sptk b0 // Exit for |x| < 0.3125 +};; + +// Here if 9.125 <= |x| < +inf +tanhf_saturation: +{ .mfb + nop.m 0 + fma.s.s0 f8 = fA0, fSignumX, f0 // sign(x)*(1.0d - 2^(-52)) + // Exit for 9.125 <= |x| < +inf + br.ret.sptk b0 // Exit for 9.125 <=|x|< +inf +} +;; + +// Here if 8.0 <= |x| < 9.125 +tanhf_close_to_saturation: +{ .mfi + nop.m 0 + fma.s1 fPolATmp = fA1, fAbsArg, fA0 // A1*|x| + A0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fPolA = fA3, fAbsArg, fA2 // A3*|x| + A2 + nop.i 0 +} +;; + +.pred.rel "mutex", p14, p15 +{ .mfi + nop.m 0 + // for positive x +(p14) fma.s.s0 f8 = fPolA, fArgSqr, fPolATmp + nop.i 0 +} +{ .mfb + nop.m 0 + // for negative x +(p15) fms.s.s0 f8 = fPolA, fArgSqrSgn, fPolATmp + br.ret.sptk b0 // Exit for 8.0 <=|x|< 9.125 +};; + +// Here if x is single precision denormal +tanhf_denormal: +{ .mfi + nop.m 0 + fclass.m p7,p8 = f8, 0x0a // is x -denormal ? + nop.i 0 +} +;; + +{ .mfi + nop.m 0 +(p7) fma.s.s0 f8 = f8,f8,f8 // -denormal + nop.i 0 +} +{ .mfb + nop.m 0 +(p8) fnma.s.s0 f8 = f8,f8,f8 // +denormal + br.ret.sptk b0 // Exit for denormal +} +;; + +GLOBAL_LIBM_END(tanhf) diff --git a/sysdeps/ia64/fpu/s_tanhl.S b/sysdeps/ia64/fpu/s_tanhl.S new file mode 100644 index 0000000000..3435f4313e --- /dev/null +++ b/sysdeps/ia64/fpu/s_tanhl.S @@ -0,0 +1,1348 @@ +.file "tanhl.s" + + +// Copyright (c) 2001 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2001 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 11/29/01 Initial version +// 05/20/02 Cleaned up namespace and sf0 syntax +// 08/14/02 Changed mli templates to mlx +// 02/10/03 Reordered header: .section, .global, .proc, .align +// +// API +//============================================================== +// long double tanhl(long double) +// +// Overview of operation +//============================================================== +// +// Algorithm description +// --------------------- +// +// There are 4 paths: +// +// 1. Special path: x = 0, Inf, NaNs, denormal +// Return tanhl(x) = +/-0.0 for zeros +// Return tanhl(x) = QNaN for NaNs +// Return tanhl(x) = sign(x)*1.0 for Inf +// Return tanhl(x) = x + x^2 for - denormals +// Return tanhl(x) = x - x^2 for + denormals +// +// 2. [0;1/8] path: 0.0 < |x| < 1/8 +// Return tanhl(x) = x + x^3*A3 + ... + x^15*A15 +// +// 3. Main path: 1/8 <= |x| < 22.8 +// For several ranges of 1/8 <= |x| < 22.8 +// Return tanhl(x) = sign(x)*((A0H+A0L) + y*(A1H+A1L) + y^2*(A2H+A2L) + +// + y^3*A3 + y^4*A4 + ... + y^25*A25 ) +// where y = (|x|/a) - b +// +// For each range there is particular set of coefficients. +// Below is the list of ranges: +// 1/8 <= |x| < 1/4 a = 0.125, b = 1.5 +// 1/4 <= |x| < 1/2 a = 0.25, b = 1.5 +// 1/2 <= |x| < 1.0 a = 0.5, b = 1.5 +// 1.0 <= |x| < 2.0 a = 1.0, b = 1.5 +// 2.0 <= |x| < 3.25 a = 2.0, b = 1.5 +// 3.25 <= |x| < 4.0 a = 2.0, b = 2.0 +// 4.0 <= |x| < 6.5 a = 4.0, b = 1.5 +// 6.5 <= |x| < 8.0 a = 4.0, b = 2.0 +// 8.0 <= |x| < 13.0 a = 8.0, b = 1.5 +// 13.0 <= |x| < 16.0 a = 8.0, b = 2.0 +// 16.0 <= |x| < 22.8 a = 16.0, b = 1.5 +// ( [3.25;4.0], [6.5;8.0], [13.9;16.0] subranges separated +// for monotonicity issues resolve ) +// +// 4. Saturation path: 22.8 <= |x| < +INF +// Return tanhl(x) = sign(x)*(1.0 - tiny_value) +// (tiny_value ~ 1e-1233) +// +// Implementation notes +// -------------------- +// +// 1. Special path: x = 0, INF, NaNa, denormals +// +// This branch is cut off by one fclass operation. +// Then zeros+nans, infinities and denormals processed separately. +// For denormals we use simple fma operaton x+x*x (- for +denorms) +// +// 2. [0;1/8] path: 0.0 < |x| < 1/8 +// +// Here we use simple polynimial computations, where last step +// is performed as x + x^3*A3+... +// The rest of polynomial is factorized using binary tree technique. +// +// 3. Main path: 1/8 <= |x| < 22.8 +// +// Multiprecision have to be performed only for first few +// polynomial iterations (up to 3-rd x degree) +// Here we use the same parallelisation way as above: +// Split whole polynomial to first, "multiprecision" part, and second, +// so called "tail", native precision part. +// +// 1) Multiprecision part: +// [v1=(A0H+A0L)+y*(A1H+A1L)] + [v2=y^2*((A2H+A2L)+y*A3)] +// v1 and v2 terms calculated in parallel +// +// 2) Tail part: +// v3 = x^4 * ( A4 + x*A5 + ... + x^21*A25 ) +// v3 is splitted to 2 even parts (10 coefficient in each one). +// These 2 parts are also factorized using binary tree technique. +// +// So Multiprecision and Tail parts cost is almost the same +// and we have both results ready before final summation. +// +// Some tricks were applied to maintain symmetry at direct +// rounding modes (to +/-inf). We had to set result sign +// not at the last operation but much more earlier and at +// several places. +// +// 4. Saturation path: 22.8 <= |x| < +INF +// +// We use formula sign(x)*(1.0 - tiny_value) instead of simple sign(x)*1.0 +// just to meet IEEE requirements for different rounding modes in this case. +// +// Registers used +//============================================================== +// Floating Point registers used: +// f8 - input & output +// f32 -> f92 + +// General registers used: +// r2, r3, r32 -> r52 + +// Predicate registers used: +// p0, p6 -> p11, p14, p15 + +// p6 - arg is zero, denormal or special IEEE +// p7 - arg is in [16;32] binary interval +// p8 - arg is in one of subranges +// [3.25;4.0], [6.5;8.0], [13.9;16.0] +// p9 - arg < 1/8 +// p10 - arg is NOT in one of subranges +// [3.25;4.0], [6.5;8.0], [13.9;16.0] +// p11 - arg in saturation domain +// p14 - arg is positive +// p15 - arg is negative + +// Assembly macros +//============================================================== +rDataPtr = r2 +rTailDataPtr = r3 + +rBias = r33 +rSignBit = r34 +rInterval = r35 + +rArgExp = r36 +rArgSig = r37 +r3p25Offset = r38 +r2to4 = r39 +r1p25 = r40 +rOffset = r41 +r1p5 = r42 +rSaturation = r43 +r1625Sign = r44 +rTiny = r45 +rAddr1 = r46 +rAddr2 = r47 +rTailAddr1 = r48 +rTailAddr2 = r49 +rTailOffset = r50 +rTailAddOffset = r51 +rShiftedDataPtr = r52 + +//============================================================== +fA0H = f32 +fA0L = f33 +fA1H = f34 +fA1L = f35 +fA2H = f36 +fA2L = f37 +fA3 = f38 +fA4 = f39 +fA5 = f40 +fA6 = f41 +fA7 = f42 +fA8 = f43 +fA9 = f44 +fA10 = f45 +fA11 = f46 +fA12 = f47 +fA13 = f48 +fA14 = f49 +fA15 = f50 +fA16 = f51 +fA17 = f52 +fA18 = f53 +fA19 = f54 +fA20 = f55 +fA21 = f56 +fA22 = f57 +fA23 = f58 +fA24 = f59 +fA25 = f60 + +fArgSqr = f61 +fArgCube = f62 +fArgFour = f63 +fArgEight = f64 + +fArgAbsNorm = f65 +fArgAbsNorm2 = f66 +fArgAbsNorm2L = f67 +fArgAbsNorm3 = f68 +fArgAbsNorm4 = f69 +fArgAbsNorm11 = f70 + +fRes = f71 +fResH = f72 +fResL = f73 +fRes1H = f74 +fRes1L = f75 +fRes1Hd = f76 +fRes2H = f77 +fRes2L = f78 +fRes3H = f79 +fRes3L = f80 +fRes4 = f81 + +fTT = f82 +fTH = f83 +fTL = f84 +fTT2 = f85 +fTH2 = f86 +fTL2 = f87 + +f1p5 = f88 +f2p0 = f89 +fTiny = f90 +fSignumX = f91 +fArgAbsNorm4X = f92 + +// Data tables +//============================================================== +RODATA + +.align 16 +LOCAL_OBJECT_START(tanhl_data) + +////////// Main tables /////////// +_0p125_to_0p25_data: // exp = 2^-3 +// Polynomial coefficients for the tanh(x), 1/8 <= |x| < 1/4 +data8 0x93D27D6AE7E835F8, 0x0000BFF4 //A3 = -5.6389704216278164626050408239e-04 +data8 0xBF66E8668A78A8BC //A2H = -2.7963640930198357253955165902e-03 +data8 0xBBD5384EFD0E7A54 //A2L = -1.7974001252014762983581666453e-20 +data8 0x3FBEE69E31DB6156 //A1H = 1.2070645062647619716322822114e-01 +data8 0x3C43A0B4E24A3DCA //A1L = 2.1280460108882061756490131241e-18 +data8 0x3FC7B8FF903BF776 //A0H = 1.8533319990813951205765874874e-01 +data8 0x3C593F1A61986FD4 //A0L = 5.4744612262799573374268254539e-18 +data8 0xDB9E6735560AAE5A, 0x0000BFA3 //A25 = -3.4649731131719154051239475238e-28 +data8 0xF0DDE953E4327704, 0x00003FA4 //A24 = 7.6004173864565644629900702857e-28 +data8 0x8532AED11DEC5612, 0x00003FAB //A23 = 5.3798235684551098715428515761e-26 +data8 0xAEF72A34D88B0038, 0x0000BFAD //A22 = -2.8267199091484508912273222600e-25 +data8 0x9645EF1DCB759DDD, 0x0000BFB2 //A21 = -7.7689413112830095709522203109e-24 +data8 0xA5D12364E121F70F, 0x00003FB5 //A20 = 6.8580281614531622113161030550e-23 +data8 0x9CF166EA815AC705, 0x00003FB9 //A19 = 1.0385615003184753213024737634e-21 +data8 0x852B1D0252498752, 0x0000BFBD //A18 = -1.4099753997949827217635356478e-20 +data8 0x9270F5716D25EC9F, 0x0000BFC0 //A17 = -1.2404055949090177751123473821e-19 +data8 0xC216A9C4EEBDDDCA, 0x00003FC4 //A16 = 2.6303900460415782677749729120e-18 +data8 0xDCE944D89FF592F2, 0x00003FC6 //A15 = 1.1975620514752377092265425941e-17 +data8 0x83C8DDF213711381, 0x0000BFCC //A14 = -4.5721980583985311263109531319e-16 +LOCAL_OBJECT_END(tanhl_data) + +LOCAL_OBJECT_START(_0p25_to_0p5_data) +// Polynomial coefficients for the tanh(x), 1/4 <= |x| < 1/2 +data8 0xB6E27B747C47C8AD, 0x0000BFF6 //A3 = -2.7905990032063258105302045572e-03 +data8 0xBF93FD54E226F8F7 //A2H = -1.9521070769536099515084615064e-02 +data8 0xBC491BC884F6F18A //A2L = -2.7222721075104525371410300625e-18 +data8 0x3FCBE3FBB015A591 //A1H = 2.1789499376181400980279079249e-01 +data8 0x3C76AFC2D1AE35F7 //A1L = 1.9677459707672596091076696742e-17 +data8 0x3FD6EF53DE8C8FAF //A0H = 3.5835739835078589399230963863e-01 +data8 0x3C8E2A1C14355F9D //A0L = 5.2327050592919416045278607775e-17 +data8 0xF56D363AAE3BAD53, 0x00003FBB //A25 = 6.4963882412697389947564301120e-21 +data8 0xAD6348526CEEB897, 0x0000BFBD //A24 = -1.8358149767147407353343152624e-20 +data8 0x85D96A988565FD65, 0x0000BFC1 //A23 = -2.2674950494950919052759556703e-19 +data8 0xD52CAF6B1E4D9717, 0x00003FC3 //A22 = 1.4445269502644677106995571101e-18 +data8 0xBD7E1BE5CBEF7A01, 0x00003FC5 //A21 = 5.1362075721080004718090799595e-18 +data8 0xAE84A9B12ADD6948, 0x0000BFC9 //A20 = -7.5685210830925426342786733068e-17 +data8 0xEAC2D5FCF80E250C, 0x00003FC6 //A19 = 1.2726423522879522181100392135e-17 +data8 0xE0D2A8AC8C2EDB95, 0x00003FCE //A18 = 3.1200443098733419749016380203e-15 +data8 0xB22F0AB7B417F78E, 0x0000BFD0 //A17 = -9.8911854977385933809488291835e-15 +data8 0xE25A627BAEFFA7A4, 0x0000BFD3 //A16 = -1.0052095388666003876301743498e-13 +data8 0xC90F32EC4A17F908, 0x00003FD6 //A15 = 7.1430637679768183097897337145e-13 +data8 0x905F6F124AF956B1, 0x00003FD8 //A14 = 2.0516607231389483452611375485e-12 +LOCAL_OBJECT_END(_0p25_to_0p5_data) + +LOCAL_OBJECT_START(_0p5_to_1_data) +// Polynomial coefficients for the tanh(x), 1/2 <= |x| < 1 +data8 0xAB402BE491EE72A7, 0x00003FF7 //A3 = 5.2261556931080934657023772945e-03 +data8 0xBFB8403D3DDA87BE //A2H = -9.4730212784752659826992271519e-02 +data8 0xBC6FF7BC2AB71A8B //A2L = -1.3863786398568460929625760740e-17 +data8 0x3FD3173B1EFA6EF4 //A1H = 2.9829290414066567116435635398e-01 +data8 0x3C881E4DCABDE840 //A1L = 4.1838710466827119847963316219e-17 +data8 0x3FE45323E552F228 //A0H = 6.3514895238728730220145735075e-01 +data8 0x3C739D5832BF7BCF //A0L = 1.7012977006567066423682445459e-17 +data8 0xF153980BECD8AE12, 0x00003FD0 //A25 = 1.3396313991261493342597057700e-14 +data8 0xEC9ACCD245368129, 0x0000BFD3 //A24 = -1.0507358886349528807350792383e-13 +data8 0x8AE6498CA36D2D1A, 0x00003FD4 //A23 = 1.2336759149738309660361813001e-13 +data8 0x8DF02FBF5AC70E64, 0x00003FD7 //A22 = 1.0085317723615282268326194551e-12 +data8 0x9E15C7125DA204EE, 0x0000BFD9 //A21 = -4.4930478919612724261941857560e-12 +data8 0xA62C6F39BDDCEC1C, 0x00003FD7 //A20 = 1.1807342457875095150035780314e-12 +data8 0xDFD8D65D30F80F52, 0x00003FDC //A19 = 5.0896919887121116317817665996e-11 +data8 0xB795AFFD458F743E, 0x0000BFDE //A18 = -1.6696932710534097241291327756e-10 +data8 0xFEF30234CB01EC89, 0x0000BFDD //A17 = -1.1593749714588103589483091370e-10 +data8 0xA2F638356E13761E, 0x00003FE2 //A16 = 2.3714062288761887457674853605e-09 +data8 0xC429CC0D031E4FD5, 0x0000BFE3 //A15 = -5.7091025466377379046489586383e-09 +data8 0xC78363FF929EFF62, 0x0000BFE4 //A14 = -1.1613199289622686725595739572e-08 +LOCAL_OBJECT_END(_0p5_to_1_data) + +LOCAL_OBJECT_START(_1_to_2_data) +// Polynomial coefficients for the tanh(x), 1 <= |x| < 2.0 +data8 0xB3D8FB48A548D99A, 0x00003FFB //A3 = 8.7816203264683800892441646129e-02 +data8 0xBFC4EFBD8FB38E3B //A2H = -1.6356629864377389416141284073e-01 +data8 0xBC77687FD8087B23 //A2L = -2.0303377679446772162287121190e-17 +data8 0x3FC72165282C6F72 //A1H = 1.8070663892364852154415189034e-01 +data8 0x3C64E01F7A76D777 //A1L = 9.0532964466719018524360408402e-18 +data8 0x3FECF6F9786DF577 //A0H = 9.0514825364486639625027919465e-01 +data8 0x3C8834EDCE71A65B //A0L = 4.1992023813070331863928976191e-17 +data8 0xC3EEEB3EFA688094, 0x00003FE2 //A25 = 2.8512044383274095705865793485e-09 +data8 0x88461973672AEB12, 0x0000BFE1 //A24 = -9.9152258079470849685057375343e-10 +data8 0xFC2AF9950DC5027E, 0x0000BFE4 //A23 = -1.4678101918123116001692289670e-08 +data8 0x9C80CA742F89B7B5, 0x00003FE6 //A22 = 3.6438714992394138274843759814e-08 +data8 0xA0B3D7FAA606260A, 0x0000BFE6 //A21 = -3.7416469848124568887944709492e-08 +data8 0xDA5858432FBD9D9D, 0x0000BFE6 //A20 = -5.0837429421503142141842414978e-08 +data8 0xB0244D1E1AE9C1B0, 0x00003FE9 //A19 = 3.2808967255272595749004827841e-07 +data8 0xC8D3109ACF740738, 0x0000BFEA //A18 = -7.4812945767507614821609020680e-07 +data8 0xBB0F3440EEA55BBF, 0x00003FEA //A17 = 6.9685053481643125932497676583e-07 +data8 0xC13A8B08D8576C19, 0x00003FEB //A16 = 1.4396658837712390333960587173e-06 +data8 0xFF3A1163CC5522A1, 0x0000BFED //A15 = -7.6063522055104010298762276148e-06 +data8 0x8672AF27EB0823B7, 0x00003FEF //A14 = 1.6027448793338500004496520337e-05 +LOCAL_OBJECT_END(_1_to_2_data) + +LOCAL_OBJECT_START(_2_to_3p25_data) +// Polynomial coefficients for the tanh(x), 2 <= |x| < 3.25 +data8 0xD45657BEC559E366, 0x00003FFA //A3 = 5.1840155367548909799883161889e-02 +data8 0xBFA41B109CA6AB81 //A2H = -3.9268988726084870510835145296e-02 +data8 0xBC2C3D708A4E56C5 //A2L = -7.6544669252238280132415018518e-19 +data8 0x3F9434A517BBC5F4 //A1H = 1.9732074330880380874653212686e-02 +data8 0x3C3ED62DD9585229 //A1L = 1.6716574468135097509707871438e-18 +data8 0x3FEFD77D111A0AFF //A0H = 9.9505475368673035330147058630e-01 +data8 0x3C9C415E151C6CA5 //A0L = 9.8030409604070051319822874013e-17 +data8 0xB1596391D4534D52, 0x00003FEC //A25 = 2.6427086526487251988631279067e-06 +data8 0xC4DC44E243D1AF5F, 0x00003FEF //A24 = 2.3467591534149209236830008333e-05 +data8 0xAED5786023982BB8, 0x00003FF0 //A23 = 4.1683642395739762658623742687e-05 +data8 0xCF39926C9FBC6A10, 0x00003FF0 //A22 = 4.9406263949321793291856681624e-05 +data8 0xA255A72359928142, 0x00003FF0 //A21 = 3.8703580278108400672236161973e-05 +data8 0xA2E573B9FC332C0D, 0x00003FED //A20 = 4.8546879618263642155709302480e-06 +data8 0x82C7BD01830ACA93, 0x00003FF0 //A19 = 3.1180436075031301077175550468e-05 +data8 0xB38AF4C76E96444B, 0x0000BFF0 //A18 = -4.2806338675404452784440167120e-05 +data8 0xEC08FF0FB194464C, 0x00003FF0 //A17 = 5.6275163156181928637744511210e-05 +data8 0xB850825D9E235135, 0x0000BFF0 //A16 = -4.3943998628289568813056822585e-05 +data8 0xF98436E838763687, 0x0000BFEF //A15 = -2.9744680263523220185672219686e-05 +data8 0xE1851A2D00737A5D, 0x00003FF2 //A14 = 2.1507256570895163202182573369e-04 +LOCAL_OBJECT_END(_2_to_3p25_data) + +LOCAL_OBJECT_START(_4_to_6p5_data) +// Polynomial coefficients for the tanh(x), 4 <= |x| < 6.5 +data8 0x896FDBD321A0BE58, 0x00003FF5 //A3 = 1.0485606995331904734870550114e-03 +data8 0xBF39C522B95A37D6 //A2H = -3.9321992640217512306882730044e-04 +data8 0xBBA9B3EC39A45338 //A2L = -2.7213922673282819034134988241e-21 +data8 0x3F19C5377A48B5AD //A1H = 9.8306189621330793766869338146e-05 +data8 0x3BCAFCB1D08A891C //A1L = 1.1429476443042275163117526657e-20 +data8 0x3FEFFFE63ABE253B //A0H = 9.9998771165079547440512897083e-01 +data8 0x3C9BB74C4EE0D16F //A0L = 9.6159219890436197391279544561e-17 +data8 0x8D86121D469AFA7E, 0x0000BFEF //A25 = -1.6870941388985743600323604423e-05 +data8 0x9D3656A36593C5C4, 0x00003FEF //A24 = 1.8741161763079973068909254398e-05 +data8 0xDCD772D5BF9ADB96, 0x00003FF0 //A23 = 5.2652739523018349983563695656e-05 +data8 0xFF79ADCF0DCBCC2D, 0x00003FF1 //A22 = 1.2182012003034659966028035977e-04 +data8 0x84D24E394DEFD0D2, 0x00003FF1 //A21 = 6.3334229517535065590380468696e-05 +data8 0xA66B56BFD2782544, 0x00003FF1 //A20 = 7.9354902476954571736114945842e-05 +data8 0xFB15771FBF3155FE, 0x0000BFEE //A19 = -1.4965763624796745134798717707e-05 +data8 0xC774790126BE54C3, 0x00003FEF //A18 = 2.3776885435831770523136610539e-05 +data8 0x825A13DACB8C68CD, 0x00003FEF //A17 = 1.5539153272890695426189818556e-05 +data8 0xCFF96E6810AACE27, 0x0000BFF1 //A16 = -9.9169893703251156059893890295e-05 +data8 0x8A85D2061B865024, 0x00003FF3 //A15 = 2.6421115104625621420758344535e-04 +data8 0x922EC6F3CFE0496E, 0x0000BFF4 //A14 = -5.5764283474946207558456581668e-04 +LOCAL_OBJECT_END(_4_to_6p5_data) + +LOCAL_OBJECT_START(_8_to_13_data) +// Polynomial coefficients for the tanh(x), 8 <= |x| < 13 +data8 0xDD6050A898303460, 0x00003FE6 //A3 = 5.1543170295688189081352133793e-08 +data8 0xBE44C1078FDBADC0 //A2H = -9.6643444318955652627581125180e-09 +data8 0xBAF95FCAA6DBBA6F //A2L = -1.3118146684038113473094275420e-24 +data8 0x3E14C1078FE26748 //A1H = 1.2080430540780827633746315479e-09 +data8 0x3A88168082F37D95 //A1L = 9.7290246966246404028418245094e-27 +data8 0x3FEFFFFFFFF59F7C //A0H = 9.9999999992449728480892190419e-01 +data8 0x3C7C068EBC5C2EEB //A0L = 2.4308346546749583521003998922e-17 +data8 0x9DC155C77A6C46E5, 0x00003FF2 //A25 = 1.5044709695520252096006763473e-04 +data8 0xF2F9E09CA47F46E9, 0x00003FF3 //A24 = 4.6344010077547944693833282056e-04 +data8 0xCBFD67E704734BC8, 0x00003FF4 //A23 = 7.7815958662026429864083620142e-04 +data8 0xC18DC821CD67E621, 0x00003FF4 //A22 = 7.3834928521190855055818897104e-04 +data8 0x8AF72BCAB05A296E, 0x00003FF4 //A21 = 5.3011135848666430331904214879e-04 +data8 0xC2E73BE9B9AB4007, 0x00003FF2 //A20 = 1.8587423129049905806822275188e-04 +data8 0xE7E8C2058E2FF9F7, 0x00003FF1 //A19 = 1.1058292891321512917337425414e-04 +data8 0xC46309F52E429F97, 0x0000BFF0 //A18 = -4.6822278664829811025251866877e-05 +data8 0x81966C1E007E9BEB, 0x00003FF1 //A17 = 6.1792176836716291200611553354e-05 +data8 0x8CEDC4BEFCAB9A7E, 0x0000BFF1 //A16 = -6.7200080564674449915571760779e-05 +data8 0x8B64E9FA53210018, 0x00003FF1 //A15 = 6.6468331917938095774361868182e-05 +data8 0x82DEDAA539A3A3F1, 0x0000BFF1 //A14 = -6.2403928644276709411156885292e-05 +LOCAL_OBJECT_END(_8_to_13_data) + +LOCAL_OBJECT_START(_16_to_22p8_data) +// Polynomial coefficients for the tanh(x), 16 <= |x| < 22.88 +data8 0x992C00F33DDE804D, 0x00003FCE //A3 = 2.1256869805798788337547274131e-15 +data8 0x3C8D42EA28102760 //A2H = 5.0760412270332007485198379096e-17 +data8 0x391A747B43B072DD //A2L = 1.2737621993898125881520341053e-33 +data8 0x3C309BC5C3CB4D5F //A1H = 9.0034785192019775952205276560e-19 +data8 0x38A8EF3B5C9DCE71 //A1L = 9.3793162715476168397242934494e-36 +data8 0x3FF0000000000000 //A0H = 1.0000000000000000000000000000e+00 +data8 0x3BACC66AFD5CA22A //A0L = 3.0466790472070565954180861749e-21 +data8 0xF020FB351C2F37CB, 0x00003FF1 //A25 = 1.1450235038836625246604146870e-04 +data8 0xBE80596C51302A7B, 0x00003FF4 //A24 = 7.2670503421185030764546828414e-04 +data8 0x91343CF8577E0131, 0x00003FF6 //A23 = 2.2156380512949603402001207105e-03 +data8 0x8D029A8679641286, 0x00003FF7 //A22 = 4.3032888906494613055765544559e-03 +data8 0xC3713F64D8DC4BAB, 0x00003FF7 //A21 = 5.9644279041951657632420721490e-03 +data8 0xCD678C455A5D06C2, 0x00003FF7 //A20 = 6.2684473911812928601693994403e-03 +data8 0xA9E1C825BDCEEBCC, 0x00003FF7 //A19 = 5.1843859941826642445235686826e-03 +data8 0xE29C919AD93F6EB9, 0x00003FF6 //A18 = 3.4578185539872939928152204329e-03 +data8 0xF7E615A75994A607, 0x00003FF5 //A17 = 1.8913175041916131006881986311e-03 +data8 0xE102EFE0F7F2B2AD, 0x00003FF4 //A16 = 8.5835064987089641065525269712e-04 +data8 0xAAD62946DEE96996, 0x00003FF3 //A15 = 3.2584489313998677644253007210e-04 +data8 0xDA2470DE110B293E, 0x00003FF1 //A14 = 1.0401837693241806604296821650e-04 +LOCAL_OBJECT_END(_16_to_22p8_data) + +LOCAL_OBJECT_START(_3p25_to_4_data) +// Polynomial coefficients for the tanh(x), 3.25 <= |x| < 4 +data8 0xE9E07240432926E6, 0x00003FF7 //A3 = 7.1373517862636557382403555215e-03 +data8 0xBF75F495227AF306 //A2H = -5.3602052282115727338540622782e-03 +data8 0xBBBE92D355A6B716 //A2L = -6.4741983326810209847018826624e-21 +data8 0x3F65F85AD510B690 //A1H = 2.6819013660517934671823070403e-03 +data8 0x3C159A0B73E6EC01 //A1L = 2.9275813076637328121849573333e-19 +data8 0x3FEFFA81708A0B42 //A0H = 9.9932929973906703402519724477e-01 +data8 0x3C66857246C19DC6 //A0L = 9.7670460995685717424398031188e-18 +data8 0xE6B6B8365B1E4D6C, 0x00003FE3 //A25 = 6.7146538162212081470554423396e-09 +data8 0xE0453CEEF483A510, 0x00003FE2 //A24 = 3.2635647369924061614015292015e-09 +data8 0x9C7D83B56E92CF1A, 0x00003FE5 //A23 = 1.8217867585545497089756353348e-08 +data8 0xA94635C48ABA9EB4, 0x0000BFE4 //A22 = -9.8530586070049930796756799547e-09 +data8 0xB1B0C14443067646, 0x00003FE5 //A21 = 2.0685890807654992387562340307e-08 +data8 0x9C6E549781E293C3, 0x00003FDE //A20 = 1.4227314592865135171341122138e-10 +data8 0xB0CBFCE7C80F57A7, 0x0000BFE7 //A19 = -8.2327438416004542109809245219e-08 +data8 0xB151AB3876E896E1, 0x00003FE9 //A18 = 3.3028241036175815328309577940e-07 +data8 0xFCF3A5C1A5CB7EEE, 0x0000BFEA //A17 = -9.4231869277542043001280640966e-07 +data8 0x96A9016C7C95BEDA, 0x00003FEC //A16 = 2.2450115975007100522962781833e-06 +data8 0x9B9B0A3901DEC05B, 0x0000BFED //A15 = -4.6374089937147736266514566049e-06 +data8 0x8987DF26A6789CCF, 0x00003FEE //A14 = 8.1974714257536543772040700977e-06 +LOCAL_OBJECT_END(_3p25_to_4_data) + +LOCAL_OBJECT_START(_6p5_to_8_data) +// Polynomial coefficients for the tanh(x), 6.5 <= |x| < 8.0 +data8 0xA11C8A63815E5657, 0x00003FEF //A3 = 1.9205985861286093001394561449e-05 +data8 0xBEDE355AD6CB61D8 //A2H = -7.2022479400070228499307345427e-06 +data8 0xBB8E6B50B8468A63 //A2L = -8.0518953122203408718779840543e-22 +data8 0x3EBE355B48DCF330 //A1H = 1.8005623902549165889479948488e-06 +data8 0x3B5837550FFA98DA //A1L = 8.0124491698609178046195694087e-23 +data8 0x3FEFFFFF872A91F8 //A0H = 9.9999977492967584424832239165e-01 +data8 0x3C8A43B839B4EB63 //A0L = 4.5561696441306660142461355317e-17 +data8 0xB5BC1948966B8826, 0x0000BFE6 //A25 = -4.2313421330480692560677276010e-08 +data8 0x91D0BE367389BDFC, 0x0000BFE8 //A24 = -1.3580117599617083801153887619e-07 +data8 0xFFD950AF282AB36C, 0x0000BFE8 //A23 = -2.3827784451962439125197203287e-07 +data8 0x959B1770EBB8903A, 0x0000BFE9 //A22 = -2.7866256690165347051403663794e-07 +data8 0xCC78060D1C0CFF3C, 0x0000BFE8 //A21 = -1.9042644867126442102188429523e-07 +data8 0xF8919BAF2E87F31D, 0x0000BFE8 //A20 = -2.3149771783868910586746973299e-07 +data8 0xC5B6AC942A3F2440, 0x00003FE8 //A19 = 1.8413511183396213757149263639e-07 +data8 0xABF1A4703056450A, 0x0000BFEA //A18 = -6.4054099983863829656292958643e-07 +data8 0xBB543D8BDB670453, 0x00003FEB //A17 = 1.3957102903892251890348444989e-06 +data8 0xC9D6F37700C1D092, 0x0000BFEC //A16 = -3.0076451968978522605262647414e-06 +data8 0xCA6EF4BB64E49EC8, 0x00003FED //A15 = 6.0329860989478473738709576062e-06 +data8 0xBE25D0FD069D0A93, 0x0000BFEE //A14 = -1.1333687314965721384777951065e-05 +LOCAL_OBJECT_END(_6p5_to_8_data) + +LOCAL_OBJECT_START(_13_to_16_data) +// Polynomial coefficients for the tanh(x), 13 <= |x| < 16 +data8 0x98176FD2075BDBD5, 0x00003FDB //A3 = 1.7290807363028159200235264756e-11 +data8 0xBD8C8464F76162D1 //A2H = -3.2420263805679445515400340441e-12 +data8 0xBA2D56B508E0F1FD //A2L = -1.8515322669984580704502445180e-28 +data8 0x3D5C8464F761639C //A1H = 4.0525329757100331782338488690e-13 +data8 0x3A0A09D9E328E620 //A1L = 4.1081479300866418212862258651e-29 +data8 0x3FEFFFFFFFFFFF1B //A0H = 9.9999999999997457589273608392e-01 +data8 0x3C9B9B089E9BFD89 //A0L = 9.5776165728054091471814161399e-17 +data8 0xC5395B9EC765BDB7, 0x00003FE6 //A25 = 4.5919803498257974411526879804e-08 +data8 0x9A0F1FCB1DC24C3A, 0x00003FE8 //A24 = 1.4347869798460288751020493795e-07 +data8 0x8AA5C3459FAD0B28, 0x00003FE9 //A23 = 2.5825111356333853968900510087e-07 +data8 0x9578B747988CFF9D, 0x00003FE9 //A22 = 2.7841245127068220034870119246e-07 +data8 0x810DF1A589D9CAF1, 0x00003FE9 //A21 = 2.4038267971021370956311255310e-07 +data8 0x8A00D77B9416EB75, 0x00003FE8 //A20 = 1.2852557749068320312899366352e-07 +data8 0xB2436C4A1849C498, 0x00003FE7 //A19 = 8.3010350873515703893886683374e-08 +data8 0xEA6405B18356600B, 0x00003FE3 //A18 = 6.8216675390299296071261114202e-09 +data8 0xF7606C022194B7E8, 0x00003FE5 //A17 = 2.8798432098264655723769995993e-08 +data8 0xAF4B0C453FCAF34E, 0x0000BFE5 //A16 = -2.0406809167824936143455638336e-08 +data8 0xC324C1F10D5FA7CC, 0x00003FE5 //A15 = 2.2717703170390130238356558599e-08 +data8 0xB34A2E3A4D3B9C31, 0x0000BFE5 //A14 = -2.0872076027950789618606920471e-08 +LOCAL_OBJECT_END(_13_to_16_data) + + +//////// "Tail" tables ////////// +LOCAL_OBJECT_START(_0p125_to_0p25_data_tail) +// Polynomial coefficients for the erf(x), 1/8 <= |x| < 1/4 +data8 0x9D7D206E97ADC83A, 0x0000BFCC //A13 = -5.4639895428711257047470806445e-16 +data8 0xA8972B666A845810, 0x00003FD3 //A12 = 7.4869224589947988668562043110e-14 +data8 0x9A5B31511C9F4698, 0x0000BFD4 //A11 = -1.3709586467430093373657009487e-13 +data8 0xCBB8047BCB274982, 0x0000BFDA //A10 = -1.1580074124926108509393610532e-11 +data8 0xF95EB849E5F9247C, 0x00003FDC //A9 = 5.6700173336564916962945623180e-11 +data8 0xE7893404C6A53386, 0x00003FE1 //A8 = 1.6846457582993065168777704528e-09 +data8 0xF2E5C7E2B5F55ECC, 0x0000BFE4 //A7 = -1.4138500046802141367543484859e-08 +data8 0xF43906FF53A002C0, 0x0000BFE8 //A6 = -2.2745017243678613107034288816e-07 +data8 0xC6175D5E47D1D259, 0x00003FEC //A5 = 2.9517899220726077077586632607e-06 +data8 0xE7C2AE92CB36769B, 0x00003FEF //A4 = 2.7628001723157068127646694830e-05 +LOCAL_OBJECT_END(_0p125_to_0p25_data_tail) + +LOCAL_OBJECT_START(_0p25_to_0p5_data_tail) +// Polynomial coefficients for the tanh(x), 1/4 <= |x| < 1/2 +data8 0x9E2972C008B9965E, 0x0000BFDC //A13 = -3.5961854154738002253192260213e-11 +data8 0xC3EABA3D219BEA8A, 0x00003FDB //A12 = 2.2273173303628274478819473067e-11 +data8 0xC50FB68D960D5CD9, 0x00003FE1 //A11 = 1.4338102430978399800743148719e-09 +data8 0xB3BB92499EF2D583, 0x0000BFE3 //A10 = -5.2309100551458044083112632491e-09 +data8 0xBD915BE632F1D04E, 0x0000BFE6 //A9 = -4.4137194873936112573773943707e-08 +data8 0xBC48C813FA819141, 0x00003FE9 //A8 = 3.5070684356359066908197915734e-07 +data8 0xD3E34EA031AC611B, 0x00003FEA //A7 = 7.8934400708919584259192272835e-07 +data8 0x8EAC489D859541CD, 0x0000BFEF //A6 = -1.7007944944124693133572815137e-05 +data8 0x98D4D7E5D1508B8A, 0x00003FEF //A5 = 1.8218924920302265989878708948e-05 +data8 0xAC262F3F8CF49C02, 0x00003FF4 //A4 = 6.5669692402266433496312492412e-04 +LOCAL_OBJECT_END(_0p25_to_0p5_data_tail) + +LOCAL_OBJECT_START(_0p5_to_1_data_tail) +// Polynomial coefficients for the tanh(x), 1/2 <= |x| < 1 +data8 0xDF67FB36FFA2A538, 0x00003FE7 //A13 = 1.0403160796697495720021114635e-07 +data8 0xB7FB80FB5AFA63A4, 0x0000BFE8 //A12 = -1.7134699677764282023124981753e-07 +data8 0xC87625A0BA7D6C5F, 0x0000BFEA //A11 = -7.4677732458471897291461679095e-07 +data8 0x90DA375DD9AF6D79, 0x00003FED //A10 = 4.3169381418023765618186668159e-06 +data8 0x82DFB03317B17316, 0x0000BFED //A9 = -3.9003426534601562552753368105e-06 +data8 0xAA582FD4F3438BB4, 0x0000BFF0 //A8 = -4.0613288845040776435400454867e-05 +data8 0xB1532D8CF763B21C, 0x00003FF2 //A7 = 1.6911021594787399557528570601e-04 +data8 0x82E12AEF7CAB76C6, 0x0000BFEF //A6 = -1.5602059530458172761585925044e-05 +data8 0x83256E3D0FBA5C93, 0x0000BFF6 //A5 = -2.0011324059500451791903108104e-03 +data8 0xCC4AB2EC0965499B, 0x00003FF7 //A4 = 6.2344907419841579664122448353e-03 +LOCAL_OBJECT_END(_0p5_to_1_data_tail) + +LOCAL_OBJECT_START(_1_to_2_data_tail) +// Polynomial coefficients for the tanh(x), 1 <= |x| < 2.0 +data8 0xCCAEE174EAC17F78, 0x0000BFEE //A13 = -1.2200065117856038355953618829e-05 +data8 0xA39DD0981D1A2776, 0x0000BFF0 //A12 = -3.9009204899026604074167603200e-05 +data8 0xB7104FA27FAF80D0, 0x00003FF2 //A11 = 1.7458316338540792661905876072e-04 +data8 0xB219A7274436A734, 0x0000BFF3 //A10 = -3.3969918595931391572998415468e-04 +data8 0xCCD9D03C0C73CECF, 0x00003FF2 //A9 = 1.9536097875337884986025498958e-04 +data8 0x85321EA40CFEEBEE, 0x00003FF5 //A8 = 1.0162031558369402750607778300e-03 +data8 0x81F272C08C308220, 0x0000BFF7 //A7 = -3.9656696618251138315464862909e-03 +data8 0xE8761C6BDEA9ED87, 0x00003FF7 //A6 = 7.0941580558970243020090656343e-03 +data8 0xAE4E9F3691F66877, 0x0000BFF6 //A5 = -2.6597155288710984120834711909e-03 +data8 0xCC8286B331BD8AAA, 0x0000BFF9 //A4 = -2.4964583478826523250880337777e-02 +LOCAL_OBJECT_END(_1_to_2_data_tail) + +LOCAL_OBJECT_START(_2_to_3p25_data_tail) +// Polynomial coefficients for the tanh(x), 2 <= |x| < 3.25 +data8 0x92E1711A3BD6408B, 0x0000BFF4 //A13 = -5.6030514548041036913731470443e-04 +data8 0x8B9BD885FF3E98C5, 0x00003FF5 //A12 = 1.0651304064581604055612602669e-03 +data8 0xD041356C7FA26A22, 0x0000BFF5 //A11 = -1.5888574328066952147023520244e-03 +data8 0xDFA210BE9BE6B7FD, 0x00003FF5 //A10 = 1.7061849060196387827639060629e-03 +data8 0x8ECC3606808028E9, 0x0000BFF4 //A9 = -5.4472999329435778312080340471e-04 +data8 0xD5C053B8EEBD10C8, 0x0000BFF6 //A8 = -3.2615856552479930645151033322e-03 +data8 0xB7BFD63AC5051539, 0x00003FF8 //A7 = 1.1215171059191957498023766643e-02 +data8 0xC367C59D7FA3ADA2, 0x0000BFF9 //A6 = -2.3853193251842394834616848995e-02 +data8 0x9FC9FB890BB053CF, 0x00003FFA //A5 = 3.9010984954739386625695104667e-02 +data8 0xD01D077B42E7ED76, 0x0000BFFA //A4 = -5.0808934425896607486919526567e-02 +LOCAL_OBJECT_END(_2_to_3p25_data_tail) + +LOCAL_OBJECT_START(_4_to_6p5_data_tail) +// Polynomial coefficients for the tanh(x), 4 <= |x| < 6.5 +data8 0x870CCE8C76C52C7E, 0x00003FF5 //A13 = 1.0303499350193060915603525934e-03 +data8 0xE1431E54AD2A738B, 0x0000BFF5 //A12 = -1.7186140560972621669872002486e-03 +data8 0xAB20056533E28734, 0x00003FF6 //A11 = 2.6111615345168277554841545330e-03 +data8 0xECCB91D64718B9BD, 0x0000BFF6 //A10 = -3.6132079169671860943878776041e-03 +data8 0x94771DA3B8C2EB4F, 0x00003FF7 //A9 = 4.5308012699419563988381317896e-03 +data8 0xA7497377E4946F2C, 0x0000BFF7 //A8 = -5.1051915941441437592654444804e-03 +data8 0xA76B2D6FCA088AE9, 0x00003FF7 //A7 = 5.1092120989582196669504468168e-03 +data8 0x928C8961F33C9560, 0x0000BFF7 //A6 = -4.4723196805537430568162704711e-03 +data8 0xDBDDDF6CDE9AB9BE, 0x00003FF6 //A5 = 3.3548994514326736175581084349e-03 +data8 0x896E211733AD9D40, 0x0000BFF6 //A4 = -2.0970183170010094667442967500e-03 +LOCAL_OBJECT_END(_4_to_6p5_data_tail) + +LOCAL_OBJECT_START(_8_to_13_data_tail) +// Polynomial coefficients for the tanh(x), 8 <= |x| < 13 +data8 0xE50C3476BED020AA, 0x00003FF0 //A13 = 5.4609221347524272615754239857e-05 +data8 0xBA16F5F4EDC0EABC, 0x0000BFF0 //A12 = -4.4367239594986428539386662937e-05 +data8 0x8B916C2F002C3D91, 0x00003FF0 //A11 = 3.3275617838067362533536610680e-05 +data8 0xBFE8031097CB4442, 0x0000BFEF //A10 = -2.2877013297722792747267224605e-05 +data8 0xEFE1FFD106B2DA41, 0x00003FEE //A9 = 1.4298129659899553350478452989e-05 +data8 0x86EF1FF403A6622E, 0x0000BFEE //A8 = -8.0426979849841642112688693288e-06 +data8 0x86EF200FD047306B, 0x00003FED //A7 = 4.0213490418736097707257704218e-06 +data8 0xEC22782377882553, 0x0000BFEB //A6 = -1.7593402092805559754997565942e-06 +data8 0xB119DA1DB7C47773, 0x00003FEA //A5 = 6.5975257917246601211360847253e-07 +data8 0xDD6050A7761D67BB, 0x0000BFE8 //A4 = -2.0617268111985310661707082242e-07 +LOCAL_OBJECT_END(_8_to_13_data_tail) + +LOCAL_OBJECT_START(_16_to_22p8_data_tail) +// Polynomial coefficients for the tanh(x), 16 <= |x| < 22.88 +data8 0xEAF4AF87336E81B1, 0x00003FEF //A13 = 2.8008914392791730186582989654e-05 +data8 0xD5B309EA768E2711, 0x00003FED //A12 = 6.3687375204024238267961143128e-06 +data8 0xA4048CA537113538, 0x00003FEB //A11 = 1.2220276227448617951538196845e-06 +data8 0xD3EC78BB3425377D, 0x00003FE8 //A10 = 1.9736934193679794194181457250e-07 +data8 0xE5763CD37440266E, 0x00003FE5 //A9 = 2.6712876934440631473215182284e-08 +data8 0xCECA765EEB4A265F, 0x00003FE2 //A8 = 3.0092031912460315516888139627e-09 +data8 0x99ABF588DF81A52E, 0x00003FDF //A7 = 2.7952722177649984066847682907e-10 +data8 0xB9C78918294A4685, 0x00003FDB //A6 = 2.1120676552098603524020495036e-11 +data8 0xB3A3C42AD539D50F, 0x00003FD7 //A5 = 1.2764169243389521270291967366e-12 +data8 0x86BC347939478174, 0x00003FD3 //A4 = 5.9834437707863962671883176163e-14 +LOCAL_OBJECT_END(_16_to_22p8_data_tail) + +LOCAL_OBJECT_START(_3p25_to_4_data_tail) +// Polynomial coefficients for the tanh(x), 3.25 <= |x| < 4 +data8 0xBE9A2BE19F21BA1C, 0x0000BFEE //A13 = -1.1360778336288065244475976873e-05 +data8 0xF84910F515BDB014, 0x00003FED //A12 = 7.3994819819577018481862729782e-06 +data8 0xC4C84FB788AA4007, 0x00003FEF //A11 = 2.3458298013663976251972482656e-05 +data8 0x86CC6243C170E5ED, 0x0000BFF2 //A10 = -1.2855374755847770638424932233e-04 +data8 0xD3065AC539ABABFF, 0x00003FF3 //A9 = 4.0249790677367806832685138089e-04 +data8 0x82C4413795EC381B, 0x0000BFF5 //A8 = -9.9767013652382759950854031514e-04 +data8 0x88D588720888899A, 0x00003FF6 //A7 = 2.0879228705174076794011525274e-03 +data8 0xF4CA066137741469, 0x0000BFF6 //A6 = -3.7351861548964870836350490741e-03 +data8 0xB998746D56E81737, 0x00003FF7 //A5 = 5.6639259807333999973200378964e-03 +data8 0xE93FB2F48233275B, 0x0000BFF7 //A4 = -7.1181892208343798194003322900e-03 +LOCAL_OBJECT_END(_3p25_to_4_data_tail) + +LOCAL_OBJECT_START(_6p5_to_8_data_tail) +// Polynomial coefficients for the tanh(x), 6.5 <= |x| < 8.0 +data8 0xA6881D7D21774BFD, 0x00003FEF //A13 = 1.9852125640303530752913966680e-05 +data8 0x875E983AA042E605, 0x0000BFF0 //A12 = -3.2274606306629334402383651599e-05 +data8 0xCB19E01E94FC133C, 0x00003FF0 //A11 = 4.8423069963831314927026982707e-05 +data8 0x8BA5E8D9E72D56B2, 0x0000BFF1 //A10 = -6.6589395655200734237190902534e-05 +data8 0xAE91F647ED4E46B2, 0x00003FF1 //A9 = 8.3241541003842930001632190258e-05 +data8 0xC465A7E0B22F884E, 0x0000BFF1 //A8 = -9.3649431639051891449916386619e-05 +data8 0xC4666148AA01A4D7, 0x00003FF1 //A7 = 9.3650780646160216748407869111e-05 +data8 0xABD9E63D181B0C6C, 0x0000BFF1 //A6 = -8.1945023256769295802996591839e-05 +data8 0x80E38B18E509387A, 0x00003FF1 //A5 = 6.1458988764532931141264026311e-05 +data8 0xA11C80E20ADA5A64, 0x0000BFF0 //A4 = -3.8411937140983728563216440713e-05 +LOCAL_OBJECT_END(_6p5_to_8_data_tail) + +LOCAL_OBJECT_START(_13_to_16_data_tail) +// Polynomial coefficients for the tanh(x), 13 <= |x| < 16 +data8 0x9D6CCDA4767CA6D9, 0x00003FE5 //A13 = 1.8326683535066775712253572575e-08 +data8 0xFFAF154F334BF403, 0x0000BFE4 //A12 = -1.4882762852665077172347508377e-08 +data8 0xBFC68FA7C61B6C17, 0x00003FE4 //A11 = 1.1162810813806544919835662888e-08 +data8 0x83D8439A6B19A015, 0x0000BFE4 //A10 = -7.6743763372603959795701788561e-09 +data8 0xA4CE5BE9DC6A2962, 0x00003FE3 //A9 = 4.7964885012772346158732715382e-09 +data8 0xB96826C0697253CA, 0x0000BFE2 //A8 = -2.6980246373950994097953903952e-09 +data8 0xB96826CADDC00E35, 0x00003FE1 //A7 = 1.3490123232313844006540534789e-09 +data8 0xA23B21F1155DF322, 0x0000BFE0 //A6 = -5.9019289132168830718664922372e-10 +data8 0xF358B2E9A50C349C, 0x00003FDE //A5 = 2.2132233424669131155945897524e-10 +data8 0x98176FD2074C1D77, 0x0000BFDD //A4 = -6.9163229452106125388824134881e-11 +LOCAL_OBJECT_END(_13_to_16_data_tail) + +LOCAL_OBJECT_START(_0_to_1o8_data) +// Polynomial coefficients for the tanh(x), 0.0 <= |x| < 0.125 +data8 0xBA0EC1879495150B, 0x0000BFF5 // A15 = -1.4195071451378679802688367813e-03 +data8 0xEB5A82898D1BCBA4, 0x00003FF6 // A13 = 3.5912102408030526706365632879e-03 +data8 0x91370DAFE0B64438, 0x0000BFF8 // A11 = -8.8632234251336964576640807982e-03 +data8 0xB327A435358F1200, 0x00003FF9 // A9 = 2.1869488447622383899199238857e-02 +data8 0xDD0DD0DD07A0775F, 0x0000BFFA // A7 = -5.3968253967902161405327069187e-02 +data8 0x888888888887C299, 0x00003FFC // A5 = 1.3333333333333264660338062012e-01 +data8 0xAAAAAAAAAAAAAA98, 0x0000BFFD // A3 = -3.3333333333333333282255458755e-01 +LOCAL_OBJECT_END(_0_to_1o8_data) + + +.section .text +GLOBAL_LIBM_ENTRY(tanhl) + +{ .mfi + alloc r32 = ar.pfs, 0, 21, 0, 0 + fmerge.se fArgAbsNorm = f1, f8 // normalized x (1.0 <= x < 2.0) + addl rSignBit = 0x20000, r0 // Set sign bit for exponent +} +{ .mlx + addl rDataPtr = @ltoff(tanhl_data), gp // Get common data ptr + movl r1p5 = 0x3FF8000000000000 // 1.5 in dbl repres. +};; + +{ .mfi + getf.exp rArgExp = f8 // Get arg exponent + fclass.m p6,p0 = f8, 0xEF // Filter 0, denormals and specials + // 0xEF = @qnan|@snan|@pos|@neg|@zero|@unorm|@inf + addl rBias = 0xfffc, r0 // Value to subtract from exp + // to get actual interval number +} +{ .mfi + ld8 rDataPtr = [rDataPtr] // Get real common data pointer + fma.s1 fArgSqr = f8, f8, f0 // x^2 (for [0;1/8] path) + addl r2to4 = 0x10000, r0 // unbiased exponent + // for [2;4] binary interval +};; + +{ .mfi + getf.sig rArgSig = f8 // Get arg significand + fcmp.lt.s1 p15, p14 = f8, f0 // Is arg negative/positive? + addl rSaturation = 0xb70, r0 // First 12 bits of + // saturation value signif. +} +{ .mfi + setf.d f1p5 = r1p5 // 1.5 construction + fma.s1 f2p0 = f1,f1,f1 // 2.0 construction + addl r1625Sign = 0xd01, r0 // First 12 bits of + // 1.625 value signif. + // 1.625 significand used to filter values greater than 3.25, 6.5, 13.0 +};; + +{ .mfi + addl rTailDataPtr = 0xB00, rDataPtr // Pointer to "tail" data + fmerge.s fSignumX = f8, f1 // signum(x) + andcm rArgExp = rArgExp, rSignBit // Remove sign of exp +} +{ .mfb + addl rTiny = 0xf000, r0 // Tiny value for saturation path + nop.f 0 +(p6) br.cond.spnt tanhl_spec // Branch to zero, denorm & specs +};; + +{ .mfi + sub rInterval = rArgExp, rBias // Get actual interval number + nop.f 0 + shr.u rArgSig = rArgSig, 52 // Leave only 12 bits of sign. +} +{ .mfi + adds rShiftedDataPtr = 0x10, rDataPtr // Second ptr to data + nop.f 0 + cmp.ge p8, p10 = rArgExp, r2to4 // If exp >= 2to4 interval? +};; + +{ .mfi +(p8) cmp.le p8, p10 = r1625Sign, rArgSig // If signd is greater + // than 1.625? (arg is at one of binary subranges) + nop.f 0 + shl rOffset = rInterval, 8 // Make offset from + // interval number +} +{ .mfi + cmp.gt p9, p0 = 0x0, rInterval // If interval is less than 0 + // (means arg is in [0; 1/8]) + nop.f 0 + cmp.eq p7, p0 = 0x7, rInterval // If arg is in [16;] interv.? +};; + +{ .mfi +(p8) adds rOffset = 0x400, rOffset // Add additional offset + // (arg is at one of binary subranges) + fma.s1 fArgCube = fArgSqr, f8, f0 // x^3 (for [0;1/8] path) + shl rTailOffset = rInterval, 7 // Make offset to "tail" data + // from interval number +} +{ .mib + setf.exp fTiny = rTiny // Construct "tiny" value + // for saturation path + cmp.ltu p11, p0 = 0x7, rInterval // if arg > 32 +(p9) br.cond.spnt _0_to_1o8 +};; + +{ .mfi + add rAddr1 = rDataPtr, rOffset // Get address for + // interval data + nop.f 0 + shl rTailAddOffset = rInterval, 5 // Offset to interval + // "tail" data +} +{ .mib + add rAddr2 = rShiftedDataPtr, rOffset // Get second + // address for interval data +(p7) cmp.leu p11, p0 = rSaturation, rArgSig // if arg is + // in [22.8;32] interval +(p11) br.cond.spnt _saturation // Branch to Saturation path +};; + +{ .mmi + ldfe fA3 = [rAddr1], 0x90 // Load A3 + ldfpd fA2H, fA2L = [rAddr2], 16 // Load A2High, A2Low + add rTailOffset = rTailOffset, rTailAddOffset // "Tail" offset +};; + +{ .mmi + ldfe fA20 = [rAddr1], 16 // Load A20 + ldfpd fA1H, fA1L = [rAddr2], 16 // Load A1High, A1Low +(p8) adds rTailOffset = 0x280, rTailOffset // Additional offset + // (arg is at one of binary subranges) +};; + +{ .mmi + ldfe fA19 = [rAddr1], 16 // Load A19 + ldfpd fA0H, fA0L = [rAddr2], 16 // Load A0High, A0Low + add rTailAddr1 = rTailDataPtr, rTailOffset // First tail + // data address +};; + +.pred.rel "mutex",p8,p10 +{ .mfi + ldfe fA18 = [rAddr1], 16 // Load A18 +(p8) fms.s1 fArgAbsNorm = fArgAbsNorm, f1, f2p0 // Add 2.0 + // (arg is at one of binary subranges) + adds rTailAddr2 = 0x10, rTailAddr1 // First tail + // data address +} +{ .mfi + ldfe fA25 = [rAddr2], 16 // Load A25 +(p10) fms.s1 fArgAbsNorm = fArgAbsNorm, f1, f1p5 // Add 1.5 + // to normalized arg + nop.i 0 +};; + +{ .mmi + ldfe fA17 = [rAddr1], 16 // Load A17 + ldfe fA24 = [rAddr2], 16 // Load A24 + nop.i 0 +};; + +{ .mmi + ldfe fA16 = [rAddr1], 16 // Load A16 + ldfe fA23 = [rAddr2], 16 // Load A23 + nop.i 0 +};; + +{ .mmi + ldfe fA15 = [rAddr1], 16 // Load A15 + ldfe fA22 = [rAddr2], 16 // Load A22 + nop.i 0 +};; + +{ .mmi + ldfe fA14 = [rAddr1], 16 // Load A14 + ldfe fA21 = [rAddr2], 16 // Load A21 + nop.i 0 +};; + +{ .mfi + ldfe fA13 = [rTailAddr1], 32 // Load A13 + fms.s1 fArgAbsNorm2 = fArgAbsNorm, fArgAbsNorm, f0 // x^2 + nop.i 0 +} +{ .mfi + ldfe fA12 = [rTailAddr2], 32 // Load A12 + nop.f 0 + nop.i 0 +};; + +{ .mfi + ldfe fA11 = [rTailAddr1], 32 // Load A11 + fma.s1 fRes3H = fA3, fArgAbsNorm, fA2H // (A3*x+A2)*x^2 + nop.i 0 +} +{ .mfi + ldfe fA10 = [rTailAddr2], 32 // Load A10 + fma.s1 fTH = fA3, fArgAbsNorm, f0 // (A3*x+A2)*x^2 + nop.i 0 +};; + +{ .mfi + ldfe fA9 = [rTailAddr1], 32 // Load A9 + fma.s1 fTT2 = fA1L, fArgAbsNorm, f0 // A1*x+A0 + nop.i 0 +} +{ .mfi + ldfe fA8 = [rTailAddr2], 32 // Load A8 + nop.f 0 + nop.i 0 +};; + +{ .mmi + ldfe fA7 = [rTailAddr1], 32 // Load A7 + ldfe fA6 = [rTailAddr2], 32 // Load A6 + nop.i 0 +};; + +{ .mmi + ldfe fA5 = [rTailAddr1], 32 // Load A5 + ldfe fA4 = [rTailAddr2], 32 // Load A4 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 fArgAbsNorm2L = fArgAbsNorm, fArgAbsNorm, fArgAbsNorm2 + // Low part of x^2 (delta) + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 fArgAbsNorm4 = fArgAbsNorm2, fArgAbsNorm2, f0 // x^4 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 fRes3L = fA2H, f1, fRes3H // // (A3*x+A2)*x^2 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 fArgAbsNorm3 = fArgAbsNorm2, fArgAbsNorm, f0 // x^3 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fTH2 = fA1H, fArgAbsNorm, fTT2 // A1*x+A0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fA23 = fA24, fArgAbsNorm, fA23 // Polynomial tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA21 = fA22, fArgAbsNorm, fA21 // Polynomial tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fA12 = fA13, fArgAbsNorm, fA12 // Polynomial tail + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 fRes3L = fRes3L, f1, fTH // (A3*x+A2)*x^2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA19 = fA20, fArgAbsNorm, fA19 // Polynomial tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fRes1H = fTH2, f1, fA0H // A1*x+A0 + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 fTL2 = fA1H, fArgAbsNorm, fTH2 // A1*x+A0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fA8 = fA9, fArgAbsNorm, fA8 // Polynomial tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA10 = fA11, fArgAbsNorm, fA10 // Polynomial tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fA15 = fA16, fArgAbsNorm, fA15 // Polynomial tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA17 = fA18, fArgAbsNorm, fA17 // Polynomial tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 fArgAbsNorm11 = fArgAbsNorm4, fArgAbsNorm4, f0 // x^8 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA4 = fA5, fArgAbsNorm, fA4 // Polynomial tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fRes3L = fRes3L, f1, fA2L // (A3*x+A2)*x^2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA6 = fA7, fArgAbsNorm, fA6 // Polynomial tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fTL2 = fTL2, f1, fTT2 // A1*x+A0 + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 fRes1L = fA0H, f1, fRes1H // A1*x+A0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fA23 = fA25, fArgAbsNorm2, fA23 // Polynomial tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA12 = fA14, fArgAbsNorm2, fA12 // Polynomial tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fA19 = fA21, fArgAbsNorm2, fA19 // Polynomial tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA8 = fA10, fArgAbsNorm2, fA8 // Polynomial tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fA15 = fA17, fArgAbsNorm2, fA15 // Polynomial tail + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 fArgAbsNorm11 = fArgAbsNorm11, fArgAbsNorm3, f0 // x^11 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fTT = fRes3L, fArgAbsNorm2, f0 // (A3*x+A2)*x^2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA4 = fA6, fArgAbsNorm2, fA4 // Polynomial tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fRes1L = fRes1L, f1, fTH2 // A1*x+A0 + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 fArgAbsNorm4X = fArgAbsNorm4, fSignumX, f0 // x^4 * signum + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fA19 = fA23, fArgAbsNorm4, fA19 // Polynomial tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA8 = fA12, fArgAbsNorm4, fA8 // Polynomial tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fTT = fRes3H, fArgAbsNorm2L, fTT // (A3*x+A2)*x^2 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fRes1L = fRes1L, f1, fTL2 // A1*x+A0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fA15 = fA19, fArgAbsNorm4, fA15 // Polynomial tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA4 = fA8, fArgAbsNorm4, fA4 // Polynomial tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fRes2H = fRes3H, fArgAbsNorm2, fTT // (A3*x+A2)*x^2 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fRes1L = fRes1L, f1, fA0L // A1*x+A0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fRes4 = fA15, fArgAbsNorm11, fA4 // Result of + // polynomial tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 fRes2L = fRes3H, fArgAbsNorm2, fRes2H // (A3*x+A2)*x^2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fResH = fRes2H, f1, fRes1H // High result + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p14) fma.s1 fRes1L = fRes4, fArgAbsNorm4X, fRes1L // A1*x+A0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p15) fms.s1 fRes1L = fRes4, fArgAbsNorm4X, fRes1L // A1*x+A0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fRes2L = fRes2L, f1, fTT // (A3*x+A2)*x^2 + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 fResL = fRes1H, f1, fResH // Low result + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s0 fRes1L = fRes2L, fSignumX, fRes1L // Low result + // .s0 - for symmetry issue resolving at +/-inf rounding mode + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fResL = fResL, f1, fRes2H // Low result + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p14) fma.s0 fResL = fRes1L, f1, fResL // Low result + // .s0 - for symmetry issue resolving at +/-inf rounding mode + nop.i 0 +} +{ .mfi + nop.m 0 +(p15) fms.s0 fResL = fRes1L, f1, fResL // Low result + // .s0 - for symmetry issue resolving at +/-inf rounding mode + nop.i 0 +};; + +.pred.rel "mutex",p14,p15 +{ .mfi + nop.m 0 +(p14) fma.s0 f8 = fResL, f1, fResH// Add high and low results + nop.i 0 +} +{ .mfb + nop.m 0 +(p15) fms.s0 f8 = fResL, f1, fResH // Add high and low results + br.ret.sptk b0 // Main path return +};; + +// satiration path //////////////////////////////////////////////////////////// +_saturation: + +.pred.rel "mutex",p14,p15 +{ .mfi + nop.m 0 +(p14) fms.s0 f8 = f1, f1, fTiny // Saturation result r = 1-tiny + nop.i 0 +};; +{ .mfb + nop.m 0 +(p15) fnma.s0 f8 = f1, f1, fTiny // Saturation result r = tiny-1 + br.ret.sptk b0 // Saturation path return +};; + + +// 0, denormals and special IEEE numbers path ///////////////////////////////// +tanhl_spec: + +{ .mfi + nop.m 0 + fclass.m p6,p0 = f8, 0x23 // To filter infinities + // 0x23 = @pos|@neg|@inf + nop.i 0 +};; + +{ .mfi + nop.m 0 + fclass.m p7,p0 = f8, 0xC7 // To filter NaNs & Zeros + // 0xC7 = @pos|@neg|@zero|@qnan|@snan + nop.i 0 +};; + +{ .mfb + nop.m 0 +(p6) fmerge.s f8 = f8, f1 // +/-1 for INF args +(p6) br.ret.spnt b0 // exit for x = INF +};; + +{ .mfb + nop.m 0 +(p7) fma.s0 f8 = f8, f1, f8 // +/-0 for 0 args + // and NaNs for NaNs +(p7) br.ret.spnt b0 // exit for x = NaN or +/-0 +};; + +{ .mfi + nop.m 0 + fnorm.s0 f8 = f8 // Normalize arg + nop.i 0 +};; + +.pred.rel "mutex",p14,p15 +{ .mfi + nop.m 0 +(p14) fnma.s0 f8 = f8, f8, f8 // res = r-r^2 + nop.i 0 +} +{ .mfb + nop.m 0 +(p15) fma.s0 f8 = f8, f8, f8 // res = r+r^2 + br.ret.sptk b0 // 0, denormals, IEEE specials return +};; + + +// 0 < |x| < 1/8 path ///////////////////////////////////////////////////////// +_0_to_1o8: + +{ .mmi + adds rAddr1 = 0x11e0, rDataPtr // Ptr 1 to coeffs + adds rAddr2 = 0x11f0, rDataPtr // Ptr 2 to coeffs + nop.i 0 +};; + +{ .mmi + ldfe fA15 = [rAddr1], 32 // Load A15 + ldfe fA13 = [rAddr2], 32 // Load A13 + nop.i 0 +};; + +{ .mmi + ldfe fA11 = [rAddr1], 32 // Load A11 + ldfe fA9 = [rAddr2], 32 // Load A9 + nop.i 0 +};; + +{ .mmi + ldfe fA7 = [rAddr1], 32 // Load A7 + ldfe fA5 = [rAddr2] // Load A5 + nop.i 0 +};; + +{ .mfi + ldfe fA3 = [rAddr1] // Load A3 + fma.s1 fA11 = fA13, fArgSqr, fA11 // Polynomial tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fArgFour = fArgSqr, fArgSqr, f0 // a^4 + nop.i 0 +};; + + +{ .mfi + nop.m 0 + fma.s1 fA3 = fA5, fArgSqr, fA3 // Polynomial tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA7 = fA9, fArgSqr, fA7 // Polynomial tail + nop.i 0 +};; + + +{ .mfi + nop.m 0 + fma.s1 fA11 = fA15, fArgFour, fA11 // Polynomial tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fA3 = fA7, fArgFour, fA3 // Polynomial tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fArgEight = fArgFour, fArgFour, f0 // a^8 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 fRes = fA11, fArgEight, fA3 //Polynomial tail result + nop.i 0 +};; + +{ .mfb + nop.m 0 + fma.s0 f8 = fRes, fArgCube, f8 // (Polynomial tail)*x^3 + br.ret.sptk b0 // [0;1/8] interval return +};; + +GLOBAL_LIBM_END(tanhl) + + + + diff --git a/sysdeps/ia64/fpu/s_tanl.S b/sysdeps/ia64/fpu/s_tanl.S new file mode 100644 index 0000000000..607a271545 --- /dev/null +++ b/sysdeps/ia64/fpu/s_tanl.S @@ -0,0 +1,3248 @@ +.file "tancotl.s" + + +// Copyright (c) 2000 - 2004, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +//********************************************************************* +// +// History: +// +// 02/02/00 (hand-optimized) +// 04/04/00 Unwind support added +// 12/28/00 Fixed false invalid flags +// 02/06/02 Improved speed +// 05/07/02 Changed interface to __libm_pi_by_2_reduce +// 05/30/02 Added cotl +// 02/10/03 Reordered header: .section, .global, .proc, .align; +// used data8 for long double table values +// 05/15/03 Reformatted data tables +// 10/26/04 Avoided using r14-31 as scratch so not clobbered by dynamic loader +// +//********************************************************************* +// +// Functions: tanl(x) = tangent(x), for double-extended precision x values +// cotl(x) = cotangent(x), for double-extended precision x values +// +//********************************************************************* +// +// Resources Used: +// +// Floating-Point Registers: f8 (Input and Return Value) +// f9-f15 +// f32-f121 +// +// General Purpose Registers: +// r32-r70 +// +// Predicate Registers: p6-p15 +// +//********************************************************************* +// +// IEEE Special Conditions for tanl: +// +// Denormal fault raised on denormal inputs +// Overflow exceptions do not occur +// Underflow exceptions raised when appropriate for tan +// (No specialized error handling for this routine) +// Inexact raised when appropriate by algorithm +// +// tanl(SNaN) = QNaN +// tanl(QNaN) = QNaN +// tanl(inf) = QNaN +// tanl(+/-0) = +/-0 +// +//********************************************************************* +// +// IEEE Special Conditions for cotl: +// +// Denormal fault raised on denormal inputs +// Overflow exceptions occur at zero and near zero +// Underflow exceptions do not occur +// Inexact raised when appropriate by algorithm +// +// cotl(SNaN) = QNaN +// cotl(QNaN) = QNaN +// cotl(inf) = QNaN +// cotl(+/-0) = +/-Inf and error handling is called +// +//********************************************************************* +// +// Below are mathematical and algorithmic descriptions for tanl. +// For cotl we use next identity cot(x) = -tan(x + Pi/2). +// So, to compute cot(x) we just need to increment N (N = N + 1) +// and invert sign of the computed result. +// +//********************************************************************* +// +// Mathematical Description +// +// We consider the computation of FPTANL of Arg. Now, given +// +// Arg = N pi/2 + alpha, |alpha| <= pi/4, +// +// basic mathematical relationship shows that +// +// tan( Arg ) = tan( alpha ) if N is even; +// = -cot( alpha ) otherwise. +// +// The value of alpha is obtained by argument reduction and +// represented by two working precision numbers r and c where +// +// alpha = r + c accurately. +// +// The reduction method is described in a previous write up. +// The argument reduction scheme identifies 4 cases. For Cases 2 +// and 4, because |alpha| is small, tan(r+c) and -cot(r+c) can be +// computed very easily by 2 or 3 terms of the Taylor series +// expansion as follows: +// +// Case 2: +// ------- +// +// tan(r + c) = r + c + r^3/3 ...accurately +// -cot(r + c) = -1/(r+c) + r/3 ...accurately +// +// Case 4: +// ------- +// +// tan(r + c) = r + c + r^3/3 + 2r^5/15 ...accurately +// -cot(r + c) = -1/(r+c) + r/3 + r^3/45 ...accurately +// +// +// The only cases left are Cases 1 and 3 of the argument reduction +// procedure. These two cases will be merged since after the +// argument is reduced in either cases, we have the reduced argument +// represented as r + c and that the magnitude |r + c| is not small +// enough to allow the usage of a very short approximation. +// +// The greatest challenge of this task is that the second terms of +// the Taylor series for tan(r) and -cot(r) +// +// r + r^3/3 + 2 r^5/15 + ... +// +// and +// +// -1/r + r/3 + r^3/45 + ... +// +// are not very small when |r| is close to pi/4 and the rounding +// errors will be a concern if simple polynomial accumulation is +// used. When |r| < 2^(-2), however, the second terms will be small +// enough (5 bits or so of right shift) that a normal Horner +// recurrence suffices. Hence there are two cases that we consider +// in the accurate computation of tan(r) and cot(r), |r| <= pi/4. +// +// Case small_r: |r| < 2^(-2) +// -------------------------- +// +// Since Arg = N pi/4 + r + c accurately, we have +// +// tan(Arg) = tan(r+c) for N even, +// = -cot(r+c) otherwise. +// +// Here for this case, both tan(r) and -cot(r) can be approximated +// by simple polynomials: +// +// tan(r) = r + P1_1 r^3 + P1_2 r^5 + ... + P1_9 r^19 +// -cot(r) = -1/r + Q1_1 r + Q1_2 r^3 + ... + Q1_7 r^13 +// +// accurately. Since |r| is relatively small, tan(r+c) and +// -cot(r+c) can be accurately approximated by replacing r with +// r+c only in the first two terms of the corresponding polynomials. +// +// Note that P1_1 (and Q1_1 for that matter) approximates 1/3 to +// almost 64 sig. bits, thus +// +// P1_1 (r+c)^3 = P1_1 r^3 + c * r^2 accurately. +// +// Hence, +// +// tan(r+c) = r + P1_1 r^3 + P1_2 r^5 + ... + P1_9 r^19 +// + c*(1 + r^2) +// +// -cot(r+c) = -1/(r+c) + Q1_1 r + Q1_2 r^3 + ... + Q1_7 r^13 +// + Q1_1*c +// +// +// Case normal_r: 2^(-2) <= |r| <= pi/4 +// ------------------------------------ +// +// This case is more likely than the previous one if one considers +// r to be uniformly distributed in [-pi/4 pi/4]. +// +// The required calculation is either +// +// tan(r + c) = tan(r) + correction, or +// -cot(r + c) = -cot(r) + correction. +// +// Specifically, +// +// tan(r + c) = tan(r) + c tan'(r) + O(c^2) +// = tan(r) + c sec^2(r) + O(c^2) +// = tan(r) + c SEC_sq ...accurately +// as long as SEC_sq approximates sec^2(r) +// to, say, 5 bits or so. +// +// Similarly, +// +// -cot(r + c) = -cot(r) - c cot'(r) + O(c^2) +// = -cot(r) + c csc^2(r) + O(c^2) +// = -cot(r) + c CSC_sq ...accurately +// as long as CSC_sq approximates csc^2(r) +// to, say, 5 bits or so. +// +// We therefore concentrate on accurately calculating tan(r) and +// cot(r) for a working-precision number r, |r| <= pi/4 to within +// 0.1% or so. +// +// We will employ a table-driven approach. Let +// +// r = sgn_r * 2^k * 1.b_1 b_2 ... b_5 ... b_63 +// = sgn_r * ( B + x ) +// +// where +// +// B = 2^k * 1.b_1 b_2 ... b_5 1 +// x = |r| - B +// +// Now, +// tan(B) + tan(x) +// tan( B + x ) = ------------------------ +// 1 - tan(B)*tan(x) +// +// / \ +// | tan(B) + tan(x) | + +// = tan(B) + | ------------------------ - tan(B) | +// | 1 - tan(B)*tan(x) | +// \ / +// +// sec^2(B) * tan(x) +// = tan(B) + ------------------------ +// 1 - tan(B)*tan(x) +// +// (1/[sin(B)*cos(B)]) * tan(x) +// = tan(B) + -------------------------------- +// cot(B) - tan(x) +// +// +// Clearly, the values of tan(B), cot(B) and 1/(sin(B)*cos(B)) are +// calculated beforehand and stored in a table. Since +// +// |x| <= 2^k * 2^(-6) <= 2^(-7) (because k = -1, -2) +// +// a very short polynomial will be sufficient to approximate tan(x) +// accurately. The details involved in computing the last expression +// will be given in the next section on algorithm description. +// +// +// Now, we turn to the case where cot( B + x ) is needed. +// +// +// 1 - tan(B)*tan(x) +// cot( B + x ) = ------------------------ +// tan(B) + tan(x) +// +// / \ +// | 1 - tan(B)*tan(x) | + +// = cot(B) + | ----------------------- - cot(B) | +// | tan(B) + tan(x) | +// \ / +// +// [tan(B) + cot(B)] * tan(x) +// = cot(B) - ---------------------------- +// tan(B) + tan(x) +// +// (1/[sin(B)*cos(B)]) * tan(x) +// = cot(B) - -------------------------------- +// tan(B) + tan(x) +// +// +// Note that the values of tan(B), cot(B) and 1/(sin(B)*cos(B)) that +// are needed are the same set of values needed in the previous +// case. +// +// Finally, we can put all the ingredients together as follows: +// +// Arg = N * pi/2 + r + c ...accurately +// +// tan(Arg) = tan(r) + correction if N is even; +// = -cot(r) + correction otherwise. +// +// For Cases 2 and 4, +// +// Case 2: +// tan(Arg) = tan(r + c) = r + c + r^3/3 N even +// = -cot(r + c) = -1/(r+c) + r/3 N odd +// Case 4: +// tan(Arg) = tan(r + c) = r + c + r^3/3 + 2r^5/15 N even +// = -cot(r + c) = -1/(r+c) + r/3 + r^3/45 N odd +// +// +// For Cases 1 and 3, +// +// Case small_r: |r| < 2^(-2) +// +// tan(Arg) = r + P1_1 r^3 + P1_2 r^5 + ... + P1_9 r^19 +// + c*(1 + r^2) N even +// +// = -1/(r+c) + Q1_1 r + Q1_2 r^3 + ... + Q1_7 r^13 +// + Q1_1*c N odd +// +// Case normal_r: 2^(-2) <= |r| <= pi/4 +// +// tan(Arg) = tan(r) + c * sec^2(r) N even +// = -cot(r) + c * csc^2(r) otherwise +// +// For N even, +// +// tan(Arg) = tan(r) + c*sec^2(r) +// = tan( sgn_r * (B+x) ) + c * sec^2(|r|) +// = sgn_r * ( tan(B+x) + sgn_r*c*sec^2(|r|) ) +// = sgn_r * ( tan(B+x) + sgn_r*c*sec^2(B) ) +// +// since B approximates |r| to 2^(-6) in relative accuracy. +// +// / (1/[sin(B)*cos(B)]) * tan(x) +// tan(Arg) = sgn_r * | tan(B) + -------------------------------- +// \ cot(B) - tan(x) +// \ +// + CORR | + +// / +// where +// +// CORR = sgn_r*c*tan(B)*SC_inv(B); SC_inv(B) = 1/(sin(B)*cos(B)). +// +// For N odd, +// +// tan(Arg) = -cot(r) + c*csc^2(r) +// = -cot( sgn_r * (B+x) ) + c * csc^2(|r|) +// = sgn_r * ( -cot(B+x) + sgn_r*c*csc^2(|r|) ) +// = sgn_r * ( -cot(B+x) + sgn_r*c*csc^2(B) ) +// +// since B approximates |r| to 2^(-6) in relative accuracy. +// +// / (1/[sin(B)*cos(B)]) * tan(x) +// tan(Arg) = sgn_r * | -cot(B) + -------------------------------- +// \ tan(B) + tan(x) +// \ +// + CORR | + +// / +// where +// +// CORR = sgn_r*c*cot(B)*SC_inv(B); SC_inv(B) = 1/(sin(B)*cos(B)). +// +// +// The actual algorithm prescribes how all the mathematical formulas +// are calculated. +// +// +// 2. Algorithmic Description +// ========================== +// +// 2.1 Computation for Cases 2 and 4. +// ---------------------------------- +// +// For Case 2, we use two-term polynomials. +// +// For N even, +// +// rsq := r * r +// Poly := c + r * rsq * P1_1 +// Result := r + Poly ...in user-defined rounding +// +// For N odd, +// S_hi := -frcpa(r) ...8 bits +// S_hi := S_hi + S_hi*(1 + S_hi*r) ...16 bits +// S_hi := S_hi + S_hi*(1 + S_hi*r) ...32 bits +// S_hi := S_hi + S_hi*(1 + S_hi*r) ...64 bits +// S_lo := S_hi*( (1 + S_hi*r) + S_hi*c ) +// ...S_hi + S_lo is -1/(r+c) to extra precision +// S_lo := S_lo + Q1_1*r +// +// Result := S_hi + S_lo ...in user-defined rounding +// +// For Case 4, we use three-term polynomials +// +// For N even, +// +// rsq := r * r +// Poly := c + r * rsq * (P1_1 + rsq * P1_2) +// Result := r + Poly ...in user-defined rounding +// +// For N odd, +// S_hi := -frcpa(r) ...8 bits +// S_hi := S_hi + S_hi*(1 + S_hi*r) ...16 bits +// S_hi := S_hi + S_hi*(1 + S_hi*r) ...32 bits +// S_hi := S_hi + S_hi*(1 + S_hi*r) ...64 bits +// S_lo := S_hi*( (1 + S_hi*r) + S_hi*c ) +// ...S_hi + S_lo is -1/(r+c) to extra precision +// rsq := r * r +// P := Q1_1 + rsq*Q1_2 +// S_lo := S_lo + r*P +// +// Result := S_hi + S_lo ...in user-defined rounding +// +// +// Note that the coefficients P1_1, P1_2, Q1_1, and Q1_2 are +// the same as those used in the small_r case of Cases 1 and 3 +// below. +// +// +// 2.2 Computation for Cases 1 and 3. +// ---------------------------------- +// This is further divided into the case of small_r, +// where |r| < 2^(-2), and the case of normal_r, where |r| lies between +// 2^(-2) and pi/4. +// +// Algorithm for the case of small_r +// --------------------------------- +// +// For N even, +// rsq := r * r +// Poly1 := rsq*(P1_1 + rsq*(P1_2 + rsq*P1_3)) +// r_to_the_8 := rsq * rsq +// r_to_the_8 := r_to_the_8 * r_to_the_8 +// Poly2 := P1_4 + rsq*(P1_5 + rsq*(P1_6 + ... rsq*P1_9)) +// CORR := c * ( 1 + rsq ) +// Poly := Poly1 + r_to_the_8*Poly2 +// Poly := r*Poly + CORR +// Result := r + Poly ...in user-defined rounding +// ...note that Poly1 and r_to_the_8 can be computed in parallel +// ...with Poly2 (Poly1 is intentionally set to be much +// ...shorter than Poly2 so that r_to_the_8 and CORR can be hidden) +// +// For N odd, +// S_hi := -frcpa(r) ...8 bits +// S_hi := S_hi + S_hi*(1 + S_hi*r) ...16 bits +// S_hi := S_hi + S_hi*(1 + S_hi*r) ...32 bits +// S_hi := S_hi + S_hi*(1 + S_hi*r) ...64 bits +// S_lo := S_hi*( (1 + S_hi*r) + S_hi*c ) +// ...S_hi + S_lo is -1/(r+c) to extra precision +// S_lo := S_lo + Q1_1*c +// +// ...S_hi and S_lo are computed in parallel with +// ...the following +// rsq := r*r +// P := Q1_1 + rsq*(Q1_2 + rsq*(Q1_3 + ... + rsq*Q1_7)) +// +// Poly := r*P + S_lo +// Result := S_hi + Poly ...in user-defined rounding +// +// +// Algorithm for the case of normal_r +// ---------------------------------- +// +// Here, we first consider the computation of tan( r + c ). As +// presented in the previous section, +// +// tan( r + c ) = tan(r) + c * sec^2(r) +// = sgn_r * [ tan(B+x) + CORR ] +// CORR = sgn_r * c * tan(B) * 1/[sin(B)*cos(B)] +// +// because sec^2(r) = sec^(|r|), and B approximate |r| to 6.5 bits. +// +// tan( r + c ) = +// / (1/[sin(B)*cos(B)]) * tan(x) +// sgn_r * | tan(B) + -------------------------------- + +// \ cot(B) - tan(x) +// \ +// CORR | + +// / +// +// The values of tan(B), cot(B) and 1/(sin(B)*cos(B)) are +// calculated beforehand and stored in a table. Specifically, +// the table values are +// +// tan(B) as T_hi + T_lo; +// cot(B) as C_hi + C_lo; +// 1/[sin(B)*cos(B)] as SC_inv +// +// T_hi, C_hi are in double-precision memory format; +// T_lo, C_lo are in single-precision memory format; +// SC_inv is in extended-precision memory format. +// +// The value of tan(x) will be approximated by a short polynomial of +// the form +// +// tan(x) as x + x * P, where +// P = x^2 * (P2_1 + x^2 * (P2_2 + x^2 * P2_3)) +// +// Because |x| <= 2^(-7), cot(B) - x approximates cot(B) - tan(x) +// to a relative accuracy better than 2^(-20). Thus, a good +// initial guess of 1/( cot(B) - tan(x) ) to initiate the iterative +// division is: +// +// 1/(cot(B) - tan(x)) is approximately +// 1/(cot(B) - x) is +// tan(B)/(1 - x*tan(B)) is approximately +// T_hi / ( 1 - T_hi * x ) is approximately +// +// T_hi * [ 1 + (Thi * x) + (T_hi * x)^2 ] +// +// The calculation of tan(r+c) therefore proceed as follows: +// +// Tx := T_hi * x +// xsq := x * x +// +// V_hi := T_hi*(1 + Tx*(1 + Tx)) +// P := xsq * (P1_1 + xsq*(P1_2 + xsq*P1_3)) +// ...V_hi serves as an initial guess of 1/(cot(B) - tan(x)) +// ...good to about 20 bits of accuracy +// +// tanx := x + x*P +// D := C_hi - tanx +// ...D is a double precision denominator: cot(B) - tan(x) +// +// V_hi := V_hi + V_hi*(1 - V_hi*D) +// ....V_hi approximates 1/(cot(B)-tan(x)) to 40 bits +// +// V_lo := V_hi * ( [ (1 - V_hi*C_hi) + V_hi*tanx ] +// - V_hi*C_lo ) ...observe all order +// ...V_hi + V_lo approximates 1/(cot(B) - tan(x)) +// ...to extra accuracy +// +// ... SC_inv(B) * (x + x*P) +// ... tan(B) + ------------------------- + CORR +// ... cot(B) - (x + x*P) +// ... +// ... = tan(B) + SC_inv(B)*(x + x*P)*(V_hi + V_lo) + CORR +// ... +// +// Sx := SC_inv * x +// CORR := sgn_r * c * SC_inv * T_hi +// +// ...put the ingredients together to compute +// ... SC_inv(B) * (x + x*P) +// ... tan(B) + ------------------------- + CORR +// ... cot(B) - (x + x*P) +// ... +// ... = tan(B) + SC_inv(B)*(x + x*P)*(V_hi + V_lo) + CORR +// ... +// ... = T_hi + T_lo + CORR + +// ... Sx * V_hi + Sx * V_lo + Sx * P *(V_hi + V_lo) +// +// CORR := CORR + T_lo +// tail := V_lo + P*(V_hi + V_lo) +// tail := Sx * tail + CORR +// tail := Sx * V_hi + tail +// T_hi := sgn_r * T_hi +// +// ...T_hi + sgn_r*tail now approximate +// ...sgn_r*(tan(B+x) + CORR) accurately +// +// Result := T_hi + sgn_r*tail ...in user-defined +// ...rounding control +// ...It is crucial that independent paths be fully +// ...exploited for performance's sake. +// +// +// Next, we consider the computation of -cot( r + c ). As +// presented in the previous section, +// +// -cot( r + c ) = -cot(r) + c * csc^2(r) +// = sgn_r * [ -cot(B+x) + CORR ] +// CORR = sgn_r * c * cot(B) * 1/[sin(B)*cos(B)] +// +// because csc^2(r) = csc^(|r|), and B approximate |r| to 6.5 bits. +// +// -cot( r + c ) = +// / (1/[sin(B)*cos(B)]) * tan(x) +// sgn_r * | -cot(B) + -------------------------------- + +// \ tan(B) + tan(x) +// \ +// CORR | + +// / +// +// The values of tan(B), cot(B) and 1/(sin(B)*cos(B)) are +// calculated beforehand and stored in a table. Specifically, +// the table values are +// +// tan(B) as T_hi + T_lo; +// cot(B) as C_hi + C_lo; +// 1/[sin(B)*cos(B)] as SC_inv +// +// T_hi, C_hi are in double-precision memory format; +// T_lo, C_lo are in single-precision memory format; +// SC_inv is in extended-precision memory format. +// +// The value of tan(x) will be approximated by a short polynomial of +// the form +// +// tan(x) as x + x * P, where +// P = x^2 * (P2_1 + x^2 * (P2_2 + x^2 * P2_3)) +// +// Because |x| <= 2^(-7), tan(B) + x approximates tan(B) + tan(x) +// to a relative accuracy better than 2^(-18). Thus, a good +// initial guess of 1/( tan(B) + tan(x) ) to initiate the iterative +// division is: +// +// 1/(tan(B) + tan(x)) is approximately +// 1/(tan(B) + x) is +// cot(B)/(1 + x*cot(B)) is approximately +// C_hi / ( 1 + C_hi * x ) is approximately +// +// C_hi * [ 1 - (C_hi * x) + (C_hi * x)^2 ] +// +// The calculation of -cot(r+c) therefore proceed as follows: +// +// Cx := C_hi * x +// xsq := x * x +// +// V_hi := C_hi*(1 - Cx*(1 - Cx)) +// P := xsq * (P1_1 + xsq*(P1_2 + xsq*P1_3)) +// ...V_hi serves as an initial guess of 1/(tan(B) + tan(x)) +// ...good to about 18 bits of accuracy +// +// tanx := x + x*P +// D := T_hi + tanx +// ...D is a double precision denominator: tan(B) + tan(x) +// +// V_hi := V_hi + V_hi*(1 - V_hi*D) +// ....V_hi approximates 1/(tan(B)+tan(x)) to 40 bits +// +// V_lo := V_hi * ( [ (1 - V_hi*T_hi) - V_hi*tanx ] +// - V_hi*T_lo ) ...observe all order +// ...V_hi + V_lo approximates 1/(tan(B) + tan(x)) +// ...to extra accuracy +// +// ... SC_inv(B) * (x + x*P) +// ... -cot(B) + ------------------------- + CORR +// ... tan(B) + (x + x*P) +// ... +// ... =-cot(B) + SC_inv(B)*(x + x*P)*(V_hi + V_lo) + CORR +// ... +// +// Sx := SC_inv * x +// CORR := sgn_r * c * SC_inv * C_hi +// +// ...put the ingredients together to compute +// ... SC_inv(B) * (x + x*P) +// ... -cot(B) + ------------------------- + CORR +// ... tan(B) + (x + x*P) +// ... +// ... =-cot(B) + SC_inv(B)*(x + x*P)*(V_hi + V_lo) + CORR +// ... +// ... =-C_hi - C_lo + CORR + +// ... Sx * V_hi + Sx * V_lo + Sx * P *(V_hi + V_lo) +// +// CORR := CORR - C_lo +// tail := V_lo + P*(V_hi + V_lo) +// tail := Sx * tail + CORR +// tail := Sx * V_hi + tail +// C_hi := -sgn_r * C_hi +// +// ...C_hi + sgn_r*tail now approximates +// ...sgn_r*(-cot(B+x) + CORR) accurately +// +// Result := C_hi + sgn_r*tail in user-defined rounding control +// ...It is crucial that independent paths be fully +// ...exploited for performance's sake. +// +// 3. Implementation Notes +// ======================= +// +// Table entries T_hi, T_lo; C_hi, C_lo; SC_inv +// +// Recall that 2^(-2) <= |r| <= pi/4; +// +// r = sgn_r * 2^k * 1.b_1 b_2 ... b_63 +// +// and +// +// B = 2^k * 1.b_1 b_2 b_3 b_4 b_5 1 +// +// Thus, for k = -2, possible values of B are +// +// B = 2^(-2) * ( 1 + index/32 + 1/64 ), +// index ranges from 0 to 31 +// +// For k = -1, however, since |r| <= pi/4 = 0.78... +// possible values of B are +// +// B = 2^(-1) * ( 1 + index/32 + 1/64 ) +// index ranges from 0 to 19. +// +// + +RODATA +.align 16 + +LOCAL_OBJECT_START(TANL_BASE_CONSTANTS) + +tanl_table_1: +data8 0xA2F9836E4E44152A, 0x00003FFE // two_by_pi +data8 0xC84D32B0CE81B9F1, 0x00004016 // P_0 +data8 0xC90FDAA22168C235, 0x00003FFF // P_1 +data8 0xECE675D1FC8F8CBB, 0x0000BFBD // P_2 +data8 0xB7ED8FBBACC19C60, 0x0000BF7C // P_3 +LOCAL_OBJECT_END(TANL_BASE_CONSTANTS) + +LOCAL_OBJECT_START(tanl_table_2) +data8 0xC90FDAA22168C234, 0x00003FFE // PI_BY_4 +data8 0xA397E5046EC6B45A, 0x00003FE7 // Inv_P_0 +data8 0x8D848E89DBD171A1, 0x0000BFBF // d_1 +data8 0xD5394C3618A66F8E, 0x0000BF7C // d_2 +data4 0x3E800000 // two**-2 +data4 0xBE800000 // -two**-2 +data4 0x00000000 // pad +data4 0x00000000 // pad +LOCAL_OBJECT_END(tanl_table_2) + +LOCAL_OBJECT_START(tanl_table_p1) +data8 0xAAAAAAAAAAAAAABD, 0x00003FFD // P1_1 +data8 0x8888888888882E6A, 0x00003FFC // P1_2 +data8 0xDD0DD0DD0F0177B6, 0x00003FFA // P1_3 +data8 0xB327A440646B8C6D, 0x00003FF9 // P1_4 +data8 0x91371B251D5F7D20, 0x00003FF8 // P1_5 +data8 0xEB69A5F161C67914, 0x00003FF6 // P1_6 +data8 0xBEDD37BE019318D2, 0x00003FF5 // P1_7 +data8 0x9979B1463C794015, 0x00003FF4 // P1_8 +data8 0x8EBD21A38C6EB58A, 0x00003FF3 // P1_9 +LOCAL_OBJECT_END(tanl_table_p1) + +LOCAL_OBJECT_START(tanl_table_q1) +data8 0xAAAAAAAAAAAAAAB4, 0x00003FFD // Q1_1 +data8 0xB60B60B60B5FC93E, 0x00003FF9 // Q1_2 +data8 0x8AB355E00C9BBFBF, 0x00003FF6 // Q1_3 +data8 0xDDEBBC89CBEE3D4C, 0x00003FF2 // Q1_4 +data8 0xB3548A685F80BBB6, 0x00003FEF // Q1_5 +data8 0x913625604CED5BF1, 0x00003FEC // Q1_6 +data8 0xF189D95A8EE92A83, 0x00003FE8 // Q1_7 +LOCAL_OBJECT_END(tanl_table_q1) + +LOCAL_OBJECT_START(tanl_table_p2) +data8 0xAAAAAAAAAAAB362F, 0x00003FFD // P2_1 +data8 0x88888886E97A6097, 0x00003FFC // P2_2 +data8 0xDD108EE025E716A1, 0x00003FFA // P2_3 +LOCAL_OBJECT_END(tanl_table_p2) + +LOCAL_OBJECT_START(tanl_table_tm2) +// +// Entries T_hi double-precision memory format +// Index = 0,1,...,31 B = 2^(-2)*(1+Index/32+1/64) +// Entries T_lo single-precision memory format +// Index = 0,1,...,31 B = 2^(-2)*(1+Index/32+1/64) +// +data8 0x3FD09BC362400794 +data4 0x23A05C32, 0x00000000 +data8 0x3FD124A9DFFBC074 +data4 0x240078B2, 0x00000000 +data8 0x3FD1AE235BD4920F +data4 0x23826B8E, 0x00000000 +data8 0x3FD2383515E2701D +data4 0x22D31154, 0x00000000 +data8 0x3FD2C2E463739C2D +data4 0x2265C9E2, 0x00000000 +data8 0x3FD34E36AFEEA48B +data4 0x245C05EB, 0x00000000 +data8 0x3FD3DA317DBB35D1 +data4 0x24749F2D, 0x00000000 +data8 0x3FD466DA67321619 +data4 0x2462CECE, 0x00000000 +data8 0x3FD4F4371F94A4D5 +data4 0x246D0DF1, 0x00000000 +data8 0x3FD5824D740C3E6D +data4 0x240A85B5, 0x00000000 +data8 0x3FD611234CB1E73D +data4 0x23F96E33, 0x00000000 +data8 0x3FD6A0BEAD9EA64B +data4 0x247C5393, 0x00000000 +data8 0x3FD73125B804FD01 +data4 0x241F3B29, 0x00000000 +data8 0x3FD7C25EAB53EE83 +data4 0x2479989B, 0x00000000 +data8 0x3FD8546FE6640EED +data4 0x23B343BC, 0x00000000 +data8 0x3FD8E75FE8AF1892 +data4 0x241454D1, 0x00000000 +data8 0x3FD97B3553928BDA +data4 0x238613D9, 0x00000000 +data8 0x3FDA0FF6EB9DE4DE +data4 0x22859FA7, 0x00000000 +data8 0x3FDAA5AB99ECF92D +data4 0x237A6D06, 0x00000000 +data8 0x3FDB3C5A6D8F1796 +data4 0x23952F6C, 0x00000000 +data8 0x3FDBD40A9CFB8BE4 +data4 0x2280FC95, 0x00000000 +data8 0x3FDC6CC387943100 +data4 0x245D2EC0, 0x00000000 +data8 0x3FDD068CB736C500 +data4 0x23C4AD7D, 0x00000000 +data8 0x3FDDA16DE1DDBC31 +data4 0x23D076E6, 0x00000000 +data8 0x3FDE3D6EEB515A93 +data4 0x244809A6, 0x00000000 +data8 0x3FDEDA97E6E9E5F1 +data4 0x220856C8, 0x00000000 +data8 0x3FDF78F11963CE69 +data4 0x244BE993, 0x00000000 +data8 0x3FE00C417D635BCE +data4 0x23D21799, 0x00000000 +data8 0x3FE05CAB1C302CD3 +data4 0x248A1B1D, 0x00000000 +data8 0x3FE0ADB9DB6A1FA0 +data4 0x23D53E33, 0x00000000 +data8 0x3FE0FF724A20BA81 +data4 0x24DB9ED5, 0x00000000 +data8 0x3FE151D9153FA6F5 +data4 0x24E9E451, 0x00000000 +LOCAL_OBJECT_END(tanl_table_tm2) + +LOCAL_OBJECT_START(tanl_table_tm1) +// +// Entries T_hi double-precision memory format +// Index = 0,1,...,19 B = 2^(-1)*(1+Index/32+1/64) +// Entries T_lo single-precision memory format +// Index = 0,1,...,19 B = 2^(-1)*(1+Index/32+1/64) +// +data8 0x3FE1CEC4BA1BE39E +data4 0x24B60F9E, 0x00000000 +data8 0x3FE277E45ABD9B2D +data4 0x248C2474, 0x00000000 +data8 0x3FE324180272B110 +data4 0x247B8311, 0x00000000 +data8 0x3FE3D38B890E2DF0 +data4 0x24C55751, 0x00000000 +data8 0x3FE4866D46236871 +data4 0x24E5BC34, 0x00000000 +data8 0x3FE53CEE45E044B0 +data4 0x24001BA4, 0x00000000 +data8 0x3FE5F74282EC06E4 +data4 0x24B973DC, 0x00000000 +data8 0x3FE6B5A125DF43F9 +data4 0x24895440, 0x00000000 +data8 0x3FE77844CAFD348C +data4 0x240021CA, 0x00000000 +data8 0x3FE83F6BCEED6B92 +data4 0x24C45372, 0x00000000 +data8 0x3FE90B58A34F3665 +data4 0x240DAD33, 0x00000000 +data8 0x3FE9DC522C1E56B4 +data4 0x24F846CE, 0x00000000 +data8 0x3FEAB2A427041578 +data4 0x2323FB6E, 0x00000000 +data8 0x3FEB8E9F9DD8C373 +data4 0x24B3090B, 0x00000000 +data8 0x3FEC709B65C9AA7B +data4 0x2449F611, 0x00000000 +data8 0x3FED58F4ACCF8435 +data4 0x23616A7E, 0x00000000 +data8 0x3FEE480F97635082 +data4 0x24C2FEAE, 0x00000000 +data8 0x3FEF3E57F0ACC544 +data4 0x242CE964, 0x00000000 +data8 0x3FF01E20F7E06E4B +data4 0x2480D3EE, 0x00000000 +data8 0x3FF0A1258A798A69 +data4 0x24DB8967, 0x00000000 +LOCAL_OBJECT_END(tanl_table_tm1) + +LOCAL_OBJECT_START(tanl_table_cm2) +// +// Entries C_hi double-precision memory format +// Index = 0,1,...,31 B = 2^(-2)*(1+Index/32+1/64) +// Entries C_lo single-precision memory format +// Index = 0,1,...,31 B = 2^(-2)*(1+Index/32+1/64) +// +data8 0x400ED3E2E63EFBD0 +data4 0x259D94D4, 0x00000000 +data8 0x400DDDB4C515DAB5 +data4 0x245F0537, 0x00000000 +data8 0x400CF57ABE19A79F +data4 0x25D4EA9F, 0x00000000 +data8 0x400C1A06D15298ED +data4 0x24AE40A0, 0x00000000 +data8 0x400B4A4C164B2708 +data4 0x25A5AAB6, 0x00000000 +data8 0x400A855A5285B068 +data4 0x25524F18, 0x00000000 +data8 0x4009CA5A3FFA549F +data4 0x24C999C0, 0x00000000 +data8 0x4009188A646AF623 +data4 0x254FD801, 0x00000000 +data8 0x40086F3C6084D0E7 +data4 0x2560F5FD, 0x00000000 +data8 0x4007CDD2A29A76EE +data4 0x255B9D19, 0x00000000 +data8 0x400733BE6C8ECA95 +data4 0x25CB021B, 0x00000000 +data8 0x4006A07E1F8DDC52 +data4 0x24AB4722, 0x00000000 +data8 0x4006139BC298AD58 +data4 0x252764E2, 0x00000000 +data8 0x40058CABBAD7164B +data4 0x24DAF5DB, 0x00000000 +data8 0x40050B4BAE31A5D3 +data4 0x25EA20F4, 0x00000000 +data8 0x40048F2189F85A8A +data4 0x2583A3E8, 0x00000000 +data8 0x400417DAA862380D +data4 0x25DCC4CC, 0x00000000 +data8 0x4003A52B1088FCFE +data4 0x2430A492, 0x00000000 +data8 0x400336CCCD3527D5 +data4 0x255F77CF, 0x00000000 +data8 0x4002CC7F5760766D +data4 0x25DA0BDA, 0x00000000 +data8 0x4002660711CE02E3 +data4 0x256FF4A2, 0x00000000 +data8 0x4002032CD37BBE04 +data4 0x25208AED, 0x00000000 +data8 0x4001A3BD7F050775 +data4 0x24B72DD6, 0x00000000 +data8 0x40014789A554848A +data4 0x24AB4DAA, 0x00000000 +data8 0x4000EE65323E81B7 +data4 0x2584C440, 0x00000000 +data8 0x4000982721CF1293 +data4 0x25C9428D, 0x00000000 +data8 0x400044A93D415EEB +data4 0x25DC8482, 0x00000000 +data8 0x3FFFE78FBD72C577 +data4 0x257F5070, 0x00000000 +data8 0x3FFF4AC375EFD28E +data4 0x23EBBF7A, 0x00000000 +data8 0x3FFEB2AF60B52DDE +data4 0x22EECA07, 0x00000000 +data8 0x3FFE1F1935204180 +data4 0x24191079, 0x00000000 +data8 0x3FFD8FCA54F7E60A +data4 0x248D3058, 0x00000000 +LOCAL_OBJECT_END(tanl_table_cm2) + +LOCAL_OBJECT_START(tanl_table_cm1) +// +// Entries C_hi double-precision memory format +// Index = 0,1,...,19 B = 2^(-1)*(1+Index/32+1/64) +// Entries C_lo single-precision memory format +// Index = 0,1,...,19 B = 2^(-1)*(1+Index/32+1/64) +// +data8 0x3FFCC06A79F6FADE +data4 0x239C7886, 0x00000000 +data8 0x3FFBB91F891662A6 +data4 0x250BD191, 0x00000000 +data8 0x3FFABFB6529F155D +data4 0x256CC3E6, 0x00000000 +data8 0x3FF9D3002E964AE9 +data4 0x250843E3, 0x00000000 +data8 0x3FF8F1EF89DCB383 +data4 0x2277C87E, 0x00000000 +data8 0x3FF81B937C87DBD6 +data4 0x256DA6CF, 0x00000000 +data8 0x3FF74F141042EDE4 +data4 0x2573D28A, 0x00000000 +data8 0x3FF68BAF1784B360 +data4 0x242E489A, 0x00000000 +data8 0x3FF5D0B57C923C4C +data4 0x2532D940, 0x00000000 +data8 0x3FF51D88F418EF20 +data4 0x253C7DD6, 0x00000000 +data8 0x3FF4719A02F88DAE +data4 0x23DB59BF, 0x00000000 +data8 0x3FF3CC6649DA0788 +data4 0x252B4756, 0x00000000 +data8 0x3FF32D770B980DB8 +data4 0x23FE585F, 0x00000000 +data8 0x3FF2945FE56C987A +data4 0x25378A63, 0x00000000 +data8 0x3FF200BDB16523F6 +data4 0x247BB2E0, 0x00000000 +data8 0x3FF172358CE27778 +data4 0x24446538, 0x00000000 +data8 0x3FF0E873FDEFE692 +data4 0x2514638F, 0x00000000 +data8 0x3FF0632C33154062 +data4 0x24A7FC27, 0x00000000 +data8 0x3FEFC42EB3EF115F +data4 0x248FD0FE, 0x00000000 +data8 0x3FEEC9E8135D26F6 +data4 0x2385C719, 0x00000000 +LOCAL_OBJECT_END(tanl_table_cm1) + +LOCAL_OBJECT_START(tanl_table_scim2) +// +// Entries SC_inv in Swapped IEEE format (extended) +// Index = 0,1,...,31 B = 2^(-2)*(1+Index/32+1/64) +// +data8 0x839D6D4A1BF30C9E, 0x00004001 +data8 0x80092804554B0EB0, 0x00004001 +data8 0xF959F94CA1CF0DE9, 0x00004000 +data8 0xF3086BA077378677, 0x00004000 +data8 0xED154515CCD4723C, 0x00004000 +data8 0xE77909441C27CF25, 0x00004000 +data8 0xE22D037D8DDACB88, 0x00004000 +data8 0xDD2B2D8A89C73522, 0x00004000 +data8 0xD86E1A23BB2C1171, 0x00004000 +data8 0xD3F0E288DFF5E0F9, 0x00004000 +data8 0xCFAF16B1283BEBD5, 0x00004000 +data8 0xCBA4AFAA0D88DD53, 0x00004000 +data8 0xC7CE03CCCA67C43D, 0x00004000 +data8 0xC427BC820CA0DDB0, 0x00004000 +data8 0xC0AECD57F13D8CAB, 0x00004000 +data8 0xBD606C3871ECE6B1, 0x00004000 +data8 0xBA3A0A96A44C4929, 0x00004000 +data8 0xB7394F6FE5CCCEC1, 0x00004000 +data8 0xB45C12039637D8BC, 0x00004000 +data8 0xB1A0552892CB051B, 0x00004000 +data8 0xAF04432B6BA2FFD0, 0x00004000 +data8 0xAC862A237221235F, 0x00004000 +data8 0xAA2478AF5F00A9D1, 0x00004000 +data8 0xA7DDBB0C81E082BF, 0x00004000 +data8 0xA5B0987D45684FEE, 0x00004000 +data8 0xA39BD0F5627A8F53, 0x00004000 +data8 0xA19E3B036EC5C8B0, 0x00004000 +data8 0x9FB6C1F091CD7C66, 0x00004000 +data8 0x9DE464101FA3DF8A, 0x00004000 +data8 0x9C263139A8F6B888, 0x00004000 +data8 0x9A7B4968C27B0450, 0x00004000 +data8 0x98E2DB7E5EE614EE, 0x00004000 +LOCAL_OBJECT_END(tanl_table_scim2) + +LOCAL_OBJECT_START(tanl_table_scim1) +// +// Entries SC_inv in Swapped IEEE format (extended) +// Index = 0,1,...,19 B = 2^(-1)*(1+Index/32+1/64) +// +data8 0x969F335C13B2B5BA, 0x00004000 +data8 0x93D446D9D4C0F548, 0x00004000 +data8 0x9147094F61B798AF, 0x00004000 +data8 0x8EF317CC758787AC, 0x00004000 +data8 0x8CD498B3B99EEFDB, 0x00004000 +data8 0x8AE82A7DDFF8BC37, 0x00004000 +data8 0x892AD546E3C55D42, 0x00004000 +data8 0x8799FEA9D15573C1, 0x00004000 +data8 0x86335F88435A4B4C, 0x00004000 +data8 0x84F4FB6E3E93A87B, 0x00004000 +data8 0x83DD195280A382FB, 0x00004000 +data8 0x82EA3D7FA4CB8C9E, 0x00004000 +data8 0x821B247C6861D0A8, 0x00004000 +data8 0x816EBED163E8D244, 0x00004000 +data8 0x80E42D9127E4CFC6, 0x00004000 +data8 0x807ABF8D28E64AFD, 0x00004000 +data8 0x8031EF26863B4FD8, 0x00004000 +data8 0x800960ADAE8C11FD, 0x00004000 +data8 0x8000E1475FDBEC21, 0x00004000 +data8 0x80186650A07791FA, 0x00004000 +LOCAL_OBJECT_END(tanl_table_scim1) + +Arg = f8 +Save_Norm_Arg = f8 // For input to reduction routine +Result = f8 +r = f8 // For output from reduction routine +c = f9 // For output from reduction routine +U_2 = f10 +rsq = f11 +C_hi = f12 +C_lo = f13 +T_hi = f14 +T_lo = f15 + +d_1 = f33 +N_0 = f34 +tail = f35 +tanx = f36 +Cx = f37 +Sx = f38 +sgn_r = f39 +CORR = f40 +P = f41 +D = f42 +ArgPrime = f43 +P_0 = f44 + +P2_1 = f45 +P2_2 = f46 +P2_3 = f47 + +P1_1 = f45 +P1_2 = f46 +P1_3 = f47 + +P1_4 = f48 +P1_5 = f49 +P1_6 = f50 +P1_7 = f51 +P1_8 = f52 +P1_9 = f53 + +x = f56 +xsq = f57 +Tx = f58 +Tx1 = f59 +Set = f60 +poly1 = f61 +poly2 = f62 +Poly = f63 +Poly1 = f64 +Poly2 = f65 +r_to_the_8 = f66 +B = f67 +SC_inv = f68 +Pos_r = f69 +N_0_fix = f70 +d_2 = f71 +PI_BY_4 = f72 +TWO_TO_NEG14 = f74 +TWO_TO_NEG33 = f75 +NEGTWO_TO_NEG14 = f76 +NEGTWO_TO_NEG33 = f77 +two_by_PI = f78 +N = f79 +N_fix = f80 +P_1 = f81 +P_2 = f82 +P_3 = f83 +s_val = f84 +w = f85 +B_mask1 = f86 +B_mask2 = f87 +w2 = f88 +A = f89 +a = f90 +t = f91 +U_1 = f92 +NEGTWO_TO_NEG2 = f93 +TWO_TO_NEG2 = f94 +Q1_1 = f95 +Q1_2 = f96 +Q1_3 = f97 +Q1_4 = f98 +Q1_5 = f99 +Q1_6 = f100 +Q1_7 = f101 +Q1_8 = f102 +S_hi = f103 +S_lo = f104 +V_hi = f105 +V_lo = f106 +U_hi = f107 +U_lo = f108 +U_hiabs = f109 +V_hiabs = f110 +V = f111 +Inv_P_0 = f112 + +FR_inv_pi_2to63 = f113 +FR_rshf_2to64 = f114 +FR_2tom64 = f115 +FR_rshf = f116 +Norm_Arg = f117 +Abs_Arg = f118 +TWO_TO_NEG65 = f119 +fp_tmp = f120 +mOne = f121 + +GR_SAVE_B0 = r33 +GR_SAVE_GP = r34 +GR_SAVE_PFS = r35 +table_base = r36 +table_ptr1 = r37 +table_ptr2 = r38 +table_ptr3 = r39 +lookup = r40 +N_fix_gr = r41 +GR_exp_2tom2 = r42 +GR_exp_2tom65 = r43 +exp_r = r44 +sig_r = r45 +bmask1 = r46 +table_offset = r47 +bmask2 = r48 +gr_tmp = r49 +cot_flag = r50 + +GR_sig_inv_pi = r51 +GR_rshf_2to64 = r52 +GR_exp_2tom64 = r53 +GR_rshf = r54 +GR_exp_2_to_63 = r55 +GR_exp_2_to_24 = r56 +GR_signexp_x = r57 +GR_exp_x = r58 +GR_exp_mask = r59 +GR_exp_2tom14 = r60 +GR_exp_m2tom14 = r61 +GR_exp_2tom33 = r62 +GR_exp_m2tom33 = r63 + +GR_SAVE_B0 = r64 +GR_SAVE_PFS = r65 +GR_SAVE_GP = r66 + +GR_Parameter_X = r67 +GR_Parameter_Y = r68 +GR_Parameter_RESULT = r69 +GR_Parameter_Tag = r70 + + +.section .text +.global __libm_tanl# +.global __libm_cotl# + +.proc __libm_cotl# +__libm_cotl: +.endp __libm_cotl# +LOCAL_LIBM_ENTRY(cotl) + +{ .mlx + alloc r32 = ar.pfs, 0,35,4,0 + movl GR_sig_inv_pi = 0xa2f9836e4e44152a // significand of 1/pi +} +{ .mlx + mov GR_exp_mask = 0x1ffff // Exponent mask + movl GR_rshf_2to64 = 0x47e8000000000000 // 1.1000 2^(63+64) +} +;; + +// Check for NatVals, Infs , NaNs, and Zeros +{ .mfi + getf.exp GR_signexp_x = Arg // Get sign and exponent of x + fclass.m p6,p0 = Arg, 0x1E7 // Test for natval, nan, inf, zero + mov cot_flag = 0x1 +} +{ .mfb + addl table_base = @ltoff(TANL_BASE_CONSTANTS), gp // Pointer to table ptr + fnorm.s1 Norm_Arg = Arg // Normalize x + br.cond.sptk COMMON_PATH +};; + +LOCAL_LIBM_END(cotl) + + +.proc __libm_tanl# +__libm_tanl: +.endp __libm_tanl# +GLOBAL_IEEE754_ENTRY(tanl) + +{ .mlx + alloc r32 = ar.pfs, 0,35,4,0 + movl GR_sig_inv_pi = 0xa2f9836e4e44152a // significand of 1/pi +} +{ .mlx + mov GR_exp_mask = 0x1ffff // Exponent mask + movl GR_rshf_2to64 = 0x47e8000000000000 // 1.1000 2^(63+64) +} +;; + +// Check for NatVals, Infs , NaNs, and Zeros +{ .mfi + getf.exp GR_signexp_x = Arg // Get sign and exponent of x + fclass.m p6,p0 = Arg, 0x1E7 // Test for natval, nan, inf, zero + mov cot_flag = 0x0 +} +{ .mfi + addl table_base = @ltoff(TANL_BASE_CONSTANTS), gp // Pointer to table ptr + fnorm.s1 Norm_Arg = Arg // Normalize x + nop.i 0 +};; + +// Common path for both tanl and cotl +COMMON_PATH: +{ .mfi + setf.sig FR_inv_pi_2to63 = GR_sig_inv_pi // Form 1/pi * 2^63 + fclass.m p9, p0 = Arg, 0x0b // Test x denormal + mov GR_exp_2tom64 = 0xffff - 64 // Scaling constant to compute N +} +{ .mlx + setf.d FR_rshf_2to64 = GR_rshf_2to64 // Form const 1.1000 * 2^(63+64) + movl GR_rshf = 0x43e8000000000000 // Form const 1.1000 * 2^63 +} +;; + +// Check for everything - if false, then must be pseudo-zero or pseudo-nan. +// Branch out to deal with special values. +{ .mfi + addl gr_tmp = -1,r0 + fclass.nm p7,p0 = Arg, 0x1FF // Test x unsupported + mov GR_exp_2_to_63 = 0xffff + 63 // Exponent of 2^63 +} +{ .mfb + ld8 table_base = [table_base] // Get pointer to constant table + fms.s1 mOne = f0, f0, f1 +(p6) br.cond.spnt TANL_SPECIAL // Branch if x natval, nan, inf, zero +} +;; + +{ .mmb + setf.sig fp_tmp = gr_tmp // Make a constant so fmpy produces inexact + mov GR_exp_2_to_24 = 0xffff + 24 // Exponent of 2^24 +(p9) br.cond.spnt TANL_DENORMAL // Branch if x denormal +} +;; + +TANL_COMMON: +// Return to here if x denormal +// +// Do fcmp to generate Denormal exception +// - can't do FNORM (will generate Underflow when U is unmasked!) +// Branch out to deal with unsupporteds values. +{ .mfi + setf.exp FR_2tom64 = GR_exp_2tom64 // Form 2^-64 for scaling N_float + fcmp.eq.s0 p0, p6 = Arg, f1 // Dummy to flag denormals + add table_ptr1 = 0, table_base // Point to tanl_table_1 +} +{ .mib + setf.d FR_rshf = GR_rshf // Form right shift const 1.1000 * 2^63 + add table_ptr2 = 80, table_base // Point to tanl_table_2 +(p7) br.cond.spnt TANL_UNSUPPORTED // Branch if x unsupported type +} +;; + +{ .mfi + and GR_exp_x = GR_exp_mask, GR_signexp_x // Get exponent of x + fmpy.s1 Save_Norm_Arg = Norm_Arg, f1 // Save x if large arg reduction + dep.z bmask1 = 0x7c, 56, 8 // Form mask to get 5 msb of r + // bmask1 = 0x7c00000000000000 +} +;; + +// +// Decide about the paths to take: +// Set PR_6 if |Arg| >= 2**63 +// Set PR_9 if |Arg| < 2**24 - CASE 1 OR 2 +// OTHERWISE Set PR_8 - CASE 3 OR 4 +// +// Branch out if the magnitude of the input argument is >= 2^63 +// - do this branch before the next. +{ .mfi + ldfe two_by_PI = [table_ptr1],16 // Load 2/pi + nop.f 999 + dep.z bmask2 = 0x41, 57, 7 // Form mask to OR to produce B + // bmask2 = 0x8200000000000000 +} +{ .mib + ldfe PI_BY_4 = [table_ptr2],16 // Load pi/4 + cmp.ge p6,p0 = GR_exp_x, GR_exp_2_to_63 // Is |x| >= 2^63 +(p6) br.cond.spnt TANL_ARG_TOO_LARGE // Branch if |x| >= 2^63 +} +;; + +{ .mmi + ldfe P_0 = [table_ptr1],16 // Load P_0 + ldfe Inv_P_0 = [table_ptr2],16 // Load Inv_P_0 + nop.i 999 +} +;; + +{ .mfi + ldfe P_1 = [table_ptr1],16 // Load P_1 + fmerge.s Abs_Arg = f0, Norm_Arg // Get |x| + mov GR_exp_m2tom33 = 0x2ffff - 33 // Form signexp of -2^-33 +} +{ .mfi + ldfe d_1 = [table_ptr2],16 // Load d_1 for 2^24 <= |x| < 2^63 + nop.f 999 + mov GR_exp_2tom33 = 0xffff - 33 // Form signexp of 2^-33 +} +;; + +{ .mmi + ldfe P_2 = [table_ptr1],16 // Load P_2 + ldfe d_2 = [table_ptr2],16 // Load d_2 for 2^24 <= |x| < 2^63 + cmp.ge p8,p0 = GR_exp_x, GR_exp_2_to_24 // Is |x| >= 2^24 +} +;; + +// Use special scaling to right shift so N=Arg * 2/pi is in rightmost bits +// Branch to Cases 3 or 4 if Arg <= -2**24 or Arg >= 2**24 +{ .mfb + ldfe P_3 = [table_ptr1],16 // Load P_3 + fma.s1 N_fix = Norm_Arg, FR_inv_pi_2to63, FR_rshf_2to64 +(p8) br.cond.spnt TANL_LARGER_ARG // Branch if 2^24 <= |x| < 2^63 +} +;; + +// Here if 0 < |x| < 2^24 +// ARGUMENT REDUCTION CODE - CASE 1 and 2 +// +{ .mmf + setf.exp TWO_TO_NEG33 = GR_exp_2tom33 // Form 2^-33 + setf.exp NEGTWO_TO_NEG33 = GR_exp_m2tom33 // Form -2^-33 + fmerge.s r = Norm_Arg,Norm_Arg // Assume r=x, ok if |x| < pi/4 +} +;; + +// +// If |Arg| < pi/4, set PR_8, else pi/4 <=|Arg| < 2^24 - set PR_9. +// +// Case 2: Convert integer N_fix back to normalized floating-point value. +{ .mfi + getf.sig sig_r = Norm_Arg // Get sig_r if 1/4 <= |x| < pi/4 + fcmp.lt.s1 p8,p9= Abs_Arg,PI_BY_4 // Test |x| < pi/4 + mov GR_exp_2tom2 = 0xffff - 2 // Form signexp of 2^-2 +} +{ .mfi + ldfps TWO_TO_NEG2, NEGTWO_TO_NEG2 = [table_ptr2] // Load 2^-2, -2^-2 + fms.s1 N = N_fix, FR_2tom64, FR_rshf // Use scaling to get N floated + mov N_fix_gr = r0 // Assume N=0, ok if |x| < pi/4 +} +;; + +// +// Case 1: Is |r| < 2**(-2). +// Arg is the same as r in this case. +// r = Arg +// c = 0 +// +// Case 2: Place integer part of N in GP register. +{ .mfi +(p9) getf.sig N_fix_gr = N_fix + fmerge.s c = f0, f0 // Assume c=0, ok if |x| < pi/4 + cmp.lt p10, p0 = GR_exp_x, GR_exp_2tom2 // Test if |x| < 1/4 +} +;; + +{ .mfi + setf.sig B_mask1 = bmask1 // Form mask to get 5 msb of r + nop.f 999 + mov exp_r = GR_exp_x // Get exp_r if 1/4 <= |x| < pi/4 +} +{ .mbb + setf.sig B_mask2 = bmask2 // Form mask to form B from r +(p10) br.cond.spnt TANL_SMALL_R // Branch if 0 < |x| < 1/4 +(p8) br.cond.spnt TANL_NORMAL_R // Branch if 1/4 <= |x| < pi/4 +} +;; + +// Here if pi/4 <= |x| < 2^24 +// +// Case 1: PR_3 is only affected when PR_1 is set. +// +// +// Case 2: w = N * P_2 +// Case 2: s_val = -N * P_1 + Arg +// + +{ .mfi + nop.m 999 + fnma.s1 s_val = N, P_1, Norm_Arg + nop.i 999 +} +{ .mfi + nop.m 999 + fmpy.s1 w = N, P_2 // w = N * P_2 for |s| >= 2^-33 + nop.i 999 +} +;; + +// Case 2_reduce: w = N * P_3 (change sign) +{ .mfi + nop.m 999 + fmpy.s1 w2 = N, P_3 // w = N * P_3 for |s| < 2^-33 + nop.i 999 +} +;; + +// Case 1_reduce: r = s + w (change sign) +{ .mfi + nop.m 999 + fsub.s1 r = s_val, w // r = s_val - w for |s| >= 2^-33 + nop.i 999 +} +;; + +// Case 2_reduce: U_1 = N * P_2 + w +{ .mfi + nop.m 999 + fma.s1 U_1 = N, P_2, w2 // U_1 = N * P_2 + w for |s| < 2^-33 + nop.i 999 +} +;; + +// +// Decide between case_1 and case_2 reduce: +// Case 1_reduce: |s| >= 2**(-33) +// Case 2_reduce: |s| < 2**(-33) +// +{ .mfi + nop.m 999 + fcmp.lt.s1 p9, p8 = s_val, TWO_TO_NEG33 + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p9) fcmp.gt.s1 p9, p8 = s_val, NEGTWO_TO_NEG33 + nop.i 999 +} +;; + +// Case 1_reduce: c = s - r +{ .mfi + nop.m 999 + fsub.s1 c = s_val, r // c = s_val - r for |s| >= 2^-33 + nop.i 999 +} +;; + +// Case 2_reduce: r is complete here - continue to calculate c . +// r = s - U_1 +{ .mfi + nop.m 999 +(p9) fsub.s1 r = s_val, U_1 + nop.i 999 +} +{ .mfi + nop.m 999 +(p9) fms.s1 U_2 = N, P_2, U_1 + nop.i 999 +} +;; + +// +// Case 1_reduce: Is |r| < 2**(-2), if so set PR_10 +// else set PR_13. +// + +{ .mfi + nop.m 999 + fand B = B_mask1, r + nop.i 999 +} +{ .mfi + nop.m 999 +(p8) fcmp.lt.unc.s1 p10, p13 = r, TWO_TO_NEG2 + nop.i 999 +} +;; + +{ .mfi +(p8) getf.sig sig_r = r // Get signif of r if |s| >= 2^-33 + nop.f 999 + nop.i 999 +} +;; + +{ .mfi +(p8) getf.exp exp_r = r // Extract signexp of r if |s| >= 2^-33 +(p10) fcmp.gt.s1 p10, p13 = r, NEGTWO_TO_NEG2 + nop.i 999 +} +;; + +// Case 1_reduce: c is complete here. +// Case 1: Branch to SMALL_R or NORMAL_R. +// c = c + w (w has not been negated.) +{ .mfi + nop.m 999 +(p8) fsub.s1 c = c, w // c = c - w for |s| >= 2^-33 + nop.i 999 +} +{ .mbb + nop.m 999 +(p10) br.cond.spnt TANL_SMALL_R // Branch if pi/4 < |x| < 2^24 and |r|<1/4 +(p13) br.cond.sptk TANL_NORMAL_R_A // Branch if pi/4 < |x| < 2^24 and |r|>=1/4 +} +;; + + +// Here if pi/4 < |x| < 2^24 and |s| < 2^-33 +// +// Is i_1 = lsb of N_fix_gr even or odd? +// if i_1 == 0, set p11, else set p12. +// +{ .mfi + nop.m 999 + fsub.s1 s_val = s_val, r + add N_fix_gr = N_fix_gr, cot_flag // N = N + 1 (for cotl) +} +{ .mfi + nop.m 999 +// +// Case 2_reduce: +// U_2 = N * P_2 - U_1 +// Not needed until later. +// + fadd.s1 U_2 = U_2, w2 +// +// Case 2_reduce: +// s = s - r +// U_2 = U_2 + w +// + nop.i 999 +} +;; + +// +// Case 2_reduce: +// c = c - U_2 +// c is complete here +// Argument reduction ends here. +// +{ .mfi + nop.m 999 + fmpy.s1 rsq = r, r + tbit.z p11, p12 = N_fix_gr, 0 ;; // Set p11 if N even, p12 if odd +} + +{ .mfi + nop.m 999 +(p12) frcpa.s1 S_hi,p0 = f1, r + nop.i 999 +} +{ .mfi + nop.m 999 + fsub.s1 c = s_val, U_1 + nop.i 999 +} +;; + +{ .mmi + add table_ptr1 = 160, table_base ;; // Point to tanl_table_p1 + ldfe P1_1 = [table_ptr1],144 + nop.i 999 ;; +} +// +// Load P1_1 and point to Q1_1 . +// +{ .mfi + ldfe Q1_1 = [table_ptr1] +// +// N even: rsq = r * Z +// N odd: S_hi = frcpa(r) +// +(p12) fmerge.ns S_hi = S_hi, S_hi + nop.i 999 +} +{ .mfi + nop.m 999 +// +// Case 2_reduce: +// c = s - U_1 +// +(p9) fsub.s1 c = c, U_2 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p12) fma.s1 poly1 = S_hi, r, f1 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N odd: Change sign of S_hi +// +(p11) fmpy.s1 rsq = rsq, P1_1 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p12) fma.s1 S_hi = S_hi, poly1, S_hi + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N even: rsq = rsq * P1_1 +// N odd: poly1 = 1.0 + S_hi * r 16 bits partial account for necessary +// +(p11) fma.s1 Poly = r, rsq, c + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N even: Poly = c + r * rsq +// N odd: S_hi = S_hi + S_hi*poly1 16 bits account for necessary +// +(p12) fma.s1 poly1 = S_hi, r, f1 +(p11) tbit.z.unc p14, p15 = cot_flag, 0 ;; // p14=1 for tanl; p15=1 for cotl +} +{ .mfi + nop.m 999 +// +// N even: Result = Poly + r +// N odd: poly1 = 1.0 + S_hi * r 32 bits partial +// +(p14) fadd.s0 Result = r, Poly // for tanl + nop.i 999 +} +{ .mfi + nop.m 999 +(p15) fms.s0 Result = r, mOne, Poly // for cotl + nop.i 999 +} +;; + +{ .mfi + nop.m 999 +(p12) fma.s1 S_hi = S_hi, poly1, S_hi + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N even: Result1 = Result + r +// N odd: S_hi = S_hi * poly1 + S_hi 32 bits +// +(p12) fma.s1 poly1 = S_hi, r, f1 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N odd: poly1 = S_hi * r + 1.0 64 bits partial +// +(p12) fma.s1 S_hi = S_hi, poly1, S_hi + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N odd: poly1 = S_hi * poly + 1.0 64 bits +// +(p12) fma.s1 poly1 = S_hi, r, f1 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N odd: poly1 = S_hi * r + 1.0 +// +(p12) fma.s1 poly1 = S_hi, c, poly1 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N odd: poly1 = S_hi * c + poly1 +// +(p12) fmpy.s1 S_lo = S_hi, poly1 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N odd: S_lo = S_hi * poly1 +// +(p12) fma.s1 S_lo = Q1_1, r, S_lo +(p12) tbit.z.unc p14, p15 = cot_flag, 0 // p14=1 for tanl; p15=1 for cotl +} +{ .mfi + nop.m 999 +// +// N odd: Result = S_hi + S_lo +// + fmpy.s0 fp_tmp = fp_tmp, fp_tmp // Dummy mult to set inexact + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N odd: S_lo = S_lo + Q1_1 * r +// +(p14) fadd.s0 Result = S_hi, S_lo // for tanl + nop.i 999 +} +{ .mfb + nop.m 999 +(p15) fms.s0 Result = S_hi, mOne, S_lo // for cotl + br.ret.sptk b0 ;; // Exit for pi/4 <= |x| < 2^24 and |s| < 2^-33 +} + + +TANL_LARGER_ARG: +// Here if 2^24 <= |x| < 2^63 +// +// ARGUMENT REDUCTION CODE - CASE 3 and 4 +// + +{ .mmf + mov GR_exp_2tom14 = 0xffff - 14 // Form signexp of 2^-14 + mov GR_exp_m2tom14 = 0x2ffff - 14 // Form signexp of -2^-14 + fmpy.s1 N_0 = Norm_Arg, Inv_P_0 +} +;; + +{ .mmi + setf.exp TWO_TO_NEG14 = GR_exp_2tom14 // Form 2^-14 + setf.exp NEGTWO_TO_NEG14 = GR_exp_m2tom14// Form -2^-14 + nop.i 999 +} +;; + + +// +// Adjust table_ptr1 to beginning of table. +// N_0 = Arg * Inv_P_0 +// +{ .mmi + add table_ptr2 = 144, table_base ;; // Point to 2^-2 + ldfps TWO_TO_NEG2, NEGTWO_TO_NEG2 = [table_ptr2] + nop.i 999 +} +;; + +// +// N_0_fix = integer part of N_0 . +// +// +// Make N_0 the integer part. +// +{ .mfi + nop.m 999 + fcvt.fx.s1 N_0_fix = N_0 + nop.i 999 ;; +} +{ .mfi + setf.sig B_mask1 = bmask1 // Form mask to get 5 msb of r + fcvt.xf N_0 = N_0_fix + nop.i 999 ;; +} +{ .mfi + setf.sig B_mask2 = bmask2 // Form mask to form B from r + fnma.s1 ArgPrime = N_0, P_0, Norm_Arg + nop.i 999 +} +{ .mfi + nop.m 999 + fmpy.s1 w = N_0, d_1 + nop.i 999 ;; +} +// +// ArgPrime = -N_0 * P_0 + Arg +// w = N_0 * d_1 +// +// +// N = ArgPrime * 2/pi +// +// fcvt.fx.s1 N_fix = N +// Use special scaling to right shift so N=Arg * 2/pi is in rightmost bits +// Branch to Cases 3 or 4 if Arg <= -2**24 or Arg >= 2**24 +{ .mfi + nop.m 999 + fma.s1 N_fix = ArgPrime, FR_inv_pi_2to63, FR_rshf_2to64 + + nop.i 999 ;; +} +// Convert integer N_fix back to normalized floating-point value. +{ .mfi + nop.m 999 + fms.s1 N = N_fix, FR_2tom64, FR_rshf // Use scaling to get N floated + nop.i 999 +} +;; + +// +// N is the integer part of the reduced-reduced argument. +// Put the integer in a GP register. +// +{ .mfi + getf.sig N_fix_gr = N_fix + nop.f 999 + nop.i 999 +} +;; + +// +// s_val = -N*P_1 + ArgPrime +// w = -N*P_2 + w +// +{ .mfi + nop.m 999 + fnma.s1 s_val = N, P_1, ArgPrime + nop.i 999 +} +{ .mfi + nop.m 999 + fnma.s1 w = N, P_2, w + nop.i 999 +} +;; + +// Case 4: V_hi = N * P_2 +// Case 4: U_hi = N_0 * d_1 +{ .mfi + nop.m 999 + fmpy.s1 V_hi = N, P_2 // V_hi = N * P_2 for |s| < 2^-14 + nop.i 999 +} +{ .mfi + nop.m 999 + fmpy.s1 U_hi = N_0, d_1 // U_hi = N_0 * d_1 for |s| < 2^-14 + nop.i 999 +} +;; + +// Case 3: r = s_val + w (Z complete) +// Case 4: w = N * P_3 +{ .mfi + nop.m 999 + fadd.s1 r = s_val, w // r = s_val + w for |s| >= 2^-14 + nop.i 999 +} +{ .mfi + nop.m 999 + fmpy.s1 w2 = N, P_3 // w = N * P_3 for |s| < 2^-14 + nop.i 999 +} +;; + +// Case 4: A = U_hi + V_hi +// Note: Worry about switched sign of V_hi, so subtract instead of add. +// Case 4: V_lo = -N * P_2 - V_hi (U_hi is in place of V_hi in writeup) +// Note: the (-) is still missing for V_hi. +{ .mfi + nop.m 999 + fsub.s1 A = U_hi, V_hi // A = U_hi - V_hi for |s| < 2^-14 + nop.i 999 +} +{ .mfi + nop.m 999 + fnma.s1 V_lo = N, P_2, V_hi // V_lo = V_hi - N * P_2 for |s| < 2^-14 + nop.i 999 +} +;; + +// Decide between case 3 and 4: +// Case 3: |s| >= 2**(-14) Set p10 +// Case 4: |s| < 2**(-14) Set p11 +// +// Case 4: U_lo = N_0 * d_1 - U_hi +{ .mfi + nop.m 999 + fms.s1 U_lo = N_0, d_1, U_hi // U_lo = N_0*d_1 - U_hi for |s| < 2^-14 + nop.i 999 +} +{ .mfi + nop.m 999 + fcmp.lt.s1 p11, p10 = s_val, TWO_TO_NEG14 + nop.i 999 +} +;; + +// Case 4: We need abs of both U_hi and V_hi - dont +// worry about switched sign of V_hi. +{ .mfi + nop.m 999 + fabs V_hiabs = V_hi // |V_hi| for |s| < 2^-14 + nop.i 999 +} +{ .mfi + nop.m 999 +(p11) fcmp.gt.s1 p11, p10 = s_val, NEGTWO_TO_NEG14 + nop.i 999 +} +;; + +// Case 3: c = s_val - r +{ .mfi + nop.m 999 + fabs U_hiabs = U_hi // |U_hi| for |s| < 2^-14 + nop.i 999 +} +{ .mfi + nop.m 999 + fsub.s1 c = s_val, r // c = s_val - r for |s| >= 2^-14 + nop.i 999 +} +;; + +// For Case 3, |s| >= 2^-14, determine if |r| < 1/4 +// +// Case 4: C_hi = s_val + A +// +{ .mfi + nop.m 999 +(p11) fadd.s1 C_hi = s_val, A // C_hi = s_val + A for |s| < 2^-14 + nop.i 999 +} +{ .mfi + nop.m 999 +(p10) fcmp.lt.unc.s1 p14, p15 = r, TWO_TO_NEG2 + nop.i 999 +} +;; + +{ .mfi + getf.sig sig_r = r // Get signif of r if |s| >= 2^-33 + fand B = B_mask1, r + nop.i 999 +} +;; + +// Case 4: t = U_lo + V_lo +{ .mfi + getf.exp exp_r = r // Extract signexp of r if |s| >= 2^-33 +(p11) fadd.s1 t = U_lo, V_lo // t = U_lo + V_lo for |s| < 2^-14 + nop.i 999 +} +{ .mfi + nop.m 999 +(p14) fcmp.gt.s1 p14, p15 = r, NEGTWO_TO_NEG2 + nop.i 999 +} +;; + +// Case 3: c = (s - r) + w (c complete) +{ .mfi + nop.m 999 +(p10) fadd.s1 c = c, w // c = c + w for |s| >= 2^-14 + nop.i 999 +} +{ .mbb + nop.m 999 +(p14) br.cond.spnt TANL_SMALL_R // Branch if 2^24 <= |x| < 2^63 and |r|< 1/4 +(p15) br.cond.sptk TANL_NORMAL_R_A // Branch if 2^24 <= |x| < 2^63 and |r|>=1/4 +} +;; + + +// Here if 2^24 <= |x| < 2^63 and |s| < 2^-14 >>>>>>> Case 4. +// +// Case 4: Set P_12 if U_hiabs >= V_hiabs +// Case 4: w = w + N_0 * d_2 +// Note: the (-) is now incorporated in w . +{ .mfi + add table_ptr1 = 160, table_base // Point to tanl_table_p1 + fcmp.ge.unc.s1 p12, p13 = U_hiabs, V_hiabs + nop.i 999 +} +{ .mfi + nop.m 999 + fms.s1 w2 = N_0, d_2, w2 + nop.i 999 +} +;; + +// Case 4: C_lo = s_val - C_hi +{ .mfi + ldfe P1_1 = [table_ptr1], 16 // Load P1_1 + fsub.s1 C_lo = s_val, C_hi + nop.i 999 +} +;; + +// +// Case 4: a = U_hi - A +// a = V_hi - A (do an add to account for missing (-) on V_hi +// +{ .mfi + ldfe P1_2 = [table_ptr1], 128 // Load P1_2 +(p12) fsub.s1 a = U_hi, A + nop.i 999 +} +{ .mfi + nop.m 999 +(p13) fadd.s1 a = V_hi, A + nop.i 999 +} +;; + +// Case 4: t = U_lo + V_lo + w +{ .mfi + ldfe Q1_1 = [table_ptr1], 16 // Load Q1_1 + fadd.s1 t = t, w2 + nop.i 999 +} +;; + +// Case 4: a = (U_hi - A) + V_hi +// a = (V_hi - A) + U_hi +// In each case account for negative missing form V_hi . +// +{ .mfi + ldfe Q1_2 = [table_ptr1], 16 // Load Q1_2 +(p12) fsub.s1 a = a, V_hi + nop.i 999 +} +{ .mfi + nop.m 999 +(p13) fsub.s1 a = U_hi, a + nop.i 999 +} +;; + +// +// Case 4: C_lo = (s_val - C_hi) + A +// +{ .mfi + nop.m 999 + fadd.s1 C_lo = C_lo, A + nop.i 999 ;; +} +// +// Case 4: t = t + a +// +{ .mfi + nop.m 999 + fadd.s1 t = t, a + nop.i 999 +} +;; + +// Case 4: C_lo = C_lo + t +// Case 4: r = C_hi + C_lo +{ .mfi + nop.m 999 + fadd.s1 C_lo = C_lo, t + nop.i 999 +} +;; + +{ .mfi + nop.m 999 + fadd.s1 r = C_hi, C_lo + nop.i 999 +} +;; + +// +// Case 4: c = C_hi - r +// +{ .mfi + nop.m 999 + fsub.s1 c = C_hi, r + nop.i 999 +} +{ .mfi + nop.m 999 + fmpy.s1 rsq = r, r + add N_fix_gr = N_fix_gr, cot_flag // N = N + 1 (for cotl) +} +;; + +// Case 4: c = c + C_lo finished. +// +// Is i_1 = lsb of N_fix_gr even or odd? +// if i_1 == 0, set PR_11, else set PR_12. +// +{ .mfi + nop.m 999 + fadd.s1 c = c , C_lo + tbit.z p11, p12 = N_fix_gr, 0 +} +;; + +// r and c have been computed. +{ .mfi + nop.m 999 +(p12) frcpa.s1 S_hi, p0 = f1, r + nop.i 999 +} +{ .mfi + nop.m 999 +// +// N odd: Change sign of S_hi +// +(p11) fma.s1 Poly = rsq, P1_2, P1_1 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p12) fma.s1 P = rsq, Q1_2, Q1_1 + nop.i 999 +} +{ .mfi + nop.m 999 +// +// N odd: Result = S_hi + S_lo (User supplied rounding mode for C1) +// + fmpy.s0 fp_tmp = fp_tmp, fp_tmp // Dummy mult to set inexact + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N even: rsq = r * r +// N odd: S_hi = frcpa(r) +// +(p12) fmerge.ns S_hi = S_hi, S_hi + nop.i 999 +} +{ .mfi + nop.m 999 +// +// N even: rsq = rsq * P1_2 + P1_1 +// N odd: poly1 = 1.0 + S_hi * r 16 bits partial account for necessary +// +(p11) fmpy.s1 Poly = rsq, Poly + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p12) fma.s1 poly1 = S_hi, r,f1 +(p11) tbit.z.unc p14, p15 = cot_flag, 0 // p14=1 for tanl; p15=1 for cotl +} +{ .mfi + nop.m 999 +// +// N even: Poly = Poly * rsq +// N odd: S_hi = S_hi + S_hi*poly1 16 bits account for necessary +// +(p11) fma.s1 Poly = r, Poly, c + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p12) fma.s1 S_hi = S_hi, poly1, S_hi + nop.i 999 +} +{ .mfi + nop.m 999 +// +// N odd: S_hi = S_hi * poly1 + S_hi 32 bits +// +(p14) fadd.s0 Result = r, Poly // for tanl + nop.i 999 ;; +} + +.pred.rel "mutex",p15,p12 +{ .mfi + nop.m 999 +(p15) fms.s0 Result = r, mOne, Poly // for cotl + nop.i 999 +} +{ .mfi + nop.m 999 +(p12) fma.s1 poly1 = S_hi, r, f1 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N even: Poly = Poly * r + c +// N odd: poly1 = 1.0 + S_hi * r 32 bits partial +// +(p12) fma.s1 S_hi = S_hi, poly1, S_hi + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p12) fma.s1 poly1 = S_hi, r, f1 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N even: Result = Poly + r (Rounding mode S0) +// N odd: poly1 = S_hi * r + 1.0 64 bits partial +// +(p12) fma.s1 S_hi = S_hi, poly1, S_hi + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N odd: poly1 = S_hi * poly + S_hi 64 bits +// +(p12) fma.s1 poly1 = S_hi, r, f1 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N odd: poly1 = S_hi * r + 1.0 +// +(p12) fma.s1 poly1 = S_hi, c, poly1 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N odd: poly1 = S_hi * c + poly1 +// +(p12) fmpy.s1 S_lo = S_hi, poly1 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N odd: S_lo = S_hi * poly1 +// +(p12) fma.s1 S_lo = P, r, S_lo +(p12) tbit.z.unc p14, p15 = cot_flag, 0 ;; // p14=1 for tanl; p15=1 for cotl +} + +{ .mfi + nop.m 999 +(p14) fadd.s0 Result = S_hi, S_lo // for tanl + nop.i 999 +} +{ .mfb + nop.m 999 +// +// N odd: S_lo = S_lo + r * P +// +(p15) fms.s0 Result = S_hi, mOne, S_lo // for cotl + br.ret.sptk b0 ;; // Exit for 2^24 <= |x| < 2^63 and |s| < 2^-14 +} + + +TANL_SMALL_R: +// Here if |r| < 1/4 +// r and c have been computed. +// ***************************************************************** +// ***************************************************************** +// ***************************************************************** +// N odd: S_hi = frcpa(r) +// Get [i_1] - lsb of N_fix_gr. Set p11 if N even, p12 if N odd. +// N even: rsq = r * r +{ .mfi + add table_ptr1 = 160, table_base // Point to tanl_table_p1 + frcpa.s1 S_hi, p0 = f1, r // S_hi for N odd + add N_fix_gr = N_fix_gr, cot_flag // N = N + 1 (for cotl) +} +{ .mfi + add table_ptr2 = 400, table_base // Point to Q1_7 + fmpy.s1 rsq = r, r + nop.i 999 +} +;; + +{ .mmi + ldfe P1_1 = [table_ptr1], 16 +;; + ldfe P1_2 = [table_ptr1], 16 + tbit.z p11, p12 = N_fix_gr, 0 +} +;; + + +{ .mfi + ldfe P1_3 = [table_ptr1], 96 + nop.f 999 + nop.i 999 +} +;; + +{ .mfi +(p11) ldfe P1_9 = [table_ptr1], -16 +(p12) fmerge.ns S_hi = S_hi, S_hi + nop.i 999 +} +{ .mfi + nop.m 999 +(p11) fmpy.s1 r_to_the_8 = rsq, rsq + nop.i 999 +} +;; + +// +// N even: Poly2 = P1_7 + Poly2 * rsq +// N odd: poly2 = Q1_5 + poly2 * rsq +// +{ .mfi +(p11) ldfe P1_8 = [table_ptr1], -16 +(p11) fadd.s1 CORR = rsq, f1 + nop.i 999 +} +;; + +// +// N even: Poly1 = P1_2 + P1_3 * rsq +// N odd: poly1 = 1.0 + S_hi * r +// 16 bits partial account for necessary (-1) +// +{ .mmi +(p11) ldfe P1_7 = [table_ptr1], -16 +;; +(p11) ldfe P1_6 = [table_ptr1], -16 + nop.i 999 +} +;; + +// +// N even: Poly1 = P1_1 + Poly1 * rsq +// N odd: S_hi = S_hi + S_hi * poly1) 16 bits account for necessary +// +// +// N even: Poly2 = P1_5 + Poly2 * rsq +// N odd: poly2 = Q1_3 + poly2 * rsq +// +{ .mfi +(p11) ldfe P1_5 = [table_ptr1], -16 +(p11) fmpy.s1 r_to_the_8 = r_to_the_8, r_to_the_8 + nop.i 999 +} +{ .mfi + nop.m 999 +(p12) fma.s1 poly1 = S_hi, r, f1 + nop.i 999 +} +;; + +// +// N even: Poly1 = Poly1 * rsq +// N odd: poly1 = 1.0 + S_hi * r 32 bits partial +// + +// +// N even: CORR = CORR * c +// N odd: S_hi = S_hi * poly1 + S_hi 32 bits +// + +// +// N even: Poly2 = P1_6 + Poly2 * rsq +// N odd: poly2 = Q1_4 + poly2 * rsq +// + +{ .mmf +(p11) ldfe P1_4 = [table_ptr1], -16 + nop.m 999 +(p11) fmpy.s1 CORR = CORR, c +} +;; + +{ .mfi + nop.m 999 +(p11) fma.s1 Poly1 = P1_3, rsq, P1_2 + nop.i 999 ;; +} +{ .mfi +(p12) ldfe Q1_7 = [table_ptr2], -16 +(p12) fma.s1 S_hi = S_hi, poly1, S_hi + nop.i 999 ;; +} +{ .mfi +(p12) ldfe Q1_6 = [table_ptr2], -16 +(p11) fma.s1 Poly2 = P1_9, rsq, P1_8 + nop.i 999 ;; +} +{ .mmi +(p12) ldfe Q1_5 = [table_ptr2], -16 ;; +(p12) ldfe Q1_4 = [table_ptr2], -16 + nop.i 999 ;; +} +{ .mfi +(p12) ldfe Q1_3 = [table_ptr2], -16 +// +// N even: Poly2 = P1_8 + P1_9 * rsq +// N odd: poly2 = Q1_6 + Q1_7 * rsq +// +(p11) fma.s1 Poly1 = Poly1, rsq, P1_1 + nop.i 999 ;; +} +{ .mfi +(p12) ldfe Q1_2 = [table_ptr2], -16 +(p12) fma.s1 poly1 = S_hi, r, f1 + nop.i 999 ;; +} +{ .mfi +(p12) ldfe Q1_1 = [table_ptr2], -16 +(p11) fma.s1 Poly2 = Poly2, rsq, P1_7 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N even: CORR = rsq + 1 +// N even: r_to_the_8 = rsq * rsq +// +(p11) fmpy.s1 Poly1 = Poly1, rsq + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p12) fma.s1 S_hi = S_hi, poly1, S_hi + nop.i 999 +} +{ .mfi + nop.m 999 +(p12) fma.s1 poly2 = Q1_7, rsq, Q1_6 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p11) fma.s1 Poly2 = Poly2, rsq, P1_6 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p12) fma.s1 poly1 = S_hi, r, f1 + nop.i 999 +} +{ .mfi + nop.m 999 +(p12) fma.s1 poly2 = poly2, rsq, Q1_5 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p11) fma.s1 Poly2= Poly2, rsq, P1_5 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p12) fma.s1 S_hi = S_hi, poly1, S_hi + nop.i 999 +} +{ .mfi + nop.m 999 +(p12) fma.s1 poly2 = poly2, rsq, Q1_4 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N even: r_to_the_8 = r_to_the_8 * r_to_the_8 +// N odd: poly1 = S_hi * r + 1.0 64 bits partial +// +(p11) fma.s1 Poly2 = Poly2, rsq, P1_4 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N even: Poly = CORR + Poly * r +// N odd: P = Q1_1 + poly2 * rsq +// +(p12) fma.s1 poly1 = S_hi, r, f1 + nop.i 999 +} +{ .mfi + nop.m 999 +(p12) fma.s1 poly2 = poly2, rsq, Q1_3 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N even: Poly2 = P1_4 + Poly2 * rsq +// N odd: poly2 = Q1_2 + poly2 * rsq +// +(p11) fma.s1 Poly = Poly2, r_to_the_8, Poly1 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p12) fma.s1 poly1 = S_hi, c, poly1 + nop.i 999 +} +{ .mfi + nop.m 999 +(p12) fma.s1 poly2 = poly2, rsq, Q1_2 + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N even: Poly = Poly1 + Poly2 * r_to_the_8 +// N odd: S_hi = S_hi * poly1 + S_hi 64 bits +// +(p11) fma.s1 Poly = Poly, r, CORR + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N even: Result = r + Poly (User supplied rounding mode) +// N odd: poly1 = S_hi * c + poly1 +// +(p12) fmpy.s1 S_lo = S_hi, poly1 +(p11) tbit.z.unc p14, p15 = cot_flag, 0 // p14=1 for tanl; p15=1 for cotl +} +{ .mfi + nop.m 999 +(p12) fma.s1 P = poly2, rsq, Q1_1 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N odd: poly1 = S_hi * r + 1.0 +// +// +// N odd: S_lo = S_hi * poly1 +// +(p14) fadd.s0 Result = Poly, r // for tanl + nop.i 999 +} +{ .mfi + nop.m 999 +(p15) fms.s0 Result = Poly, mOne, r // for cotl + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +// +// N odd: S_lo = Q1_1 * c + S_lo +// +(p12) fma.s1 S_lo = Q1_1, c, S_lo + nop.i 999 +} +{ .mfi + nop.m 999 + fmpy.s0 fp_tmp = fp_tmp, fp_tmp // Dummy mult to set inexact + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N odd: Result = S_lo + r * P +// +(p12) fma.s1 Result = P, r, S_lo +(p12) tbit.z.unc p14, p15 = cot_flag, 0 ;; // p14=1 for tanl; p15=1 for cotl +} + +// +// N odd: Result = Result + S_hi (user supplied rounding mode) +// +{ .mfi + nop.m 999 +(p14) fadd.s0 Result = Result, S_hi // for tanl + nop.i 999 +} +{ .mfb + nop.m 999 +(p15) fms.s0 Result = Result, mOne, S_hi // for cotl + br.ret.sptk b0 ;; // Exit |r| < 1/4 path +} + + +TANL_NORMAL_R: +// Here if 1/4 <= |x| < pi/4 or if |x| >= 2^63 and |r| >= 1/4 +// ******************************************************************* +// ******************************************************************* +// ******************************************************************* +// +// r and c have been computed. +// +{ .mfi + nop.m 999 + fand B = B_mask1, r + nop.i 999 +} +;; + +TANL_NORMAL_R_A: +// Enter here if pi/4 <= |x| < 2^63 and |r| >= 1/4 +// Get the 5 bits or r for the lookup. 1.xxxxx .... +{ .mmi + add table_ptr1 = 416, table_base // Point to tanl_table_p2 + mov GR_exp_2tom65 = 0xffff - 65 // Scaling constant for B + extr.u lookup = sig_r, 58, 5 +} +;; + +{ .mmi + ldfe P2_1 = [table_ptr1], 16 + setf.exp TWO_TO_NEG65 = GR_exp_2tom65 // 2^-65 for scaling B if exp_r=-2 + add N_fix_gr = N_fix_gr, cot_flag // N = N + 1 (for cotl) +} +;; + +.pred.rel "mutex",p11,p12 +// B = 2^63 * 1.xxxxx 100...0 +{ .mfi + ldfe P2_2 = [table_ptr1], 16 + for B = B_mask2, B + mov table_offset = 512 // Assume table offset is 512 +} +;; + +{ .mfi + ldfe P2_3 = [table_ptr1], 16 + fmerge.s Pos_r = f1, r + tbit.nz p8,p9 = exp_r, 0 +} +;; + +// Is B = 2** -2 or B= 2** -1? If 2**-1, then +// we want an offset of 512 for table addressing. +{ .mii + add table_ptr2 = 1296, table_base // Point to tanl_table_cm2 +(p9) shladd table_offset = lookup, 4, table_offset +(p8) shladd table_offset = lookup, 4, r0 +} +;; + +{ .mmi + add table_ptr1 = table_ptr1, table_offset // Point to T_hi + add table_ptr2 = table_ptr2, table_offset // Point to C_hi + add table_ptr3 = 2128, table_base // Point to tanl_table_scim2 +} +;; + +{ .mmi + ldfd T_hi = [table_ptr1], 8 // Load T_hi +;; + ldfd C_hi = [table_ptr2], 8 // Load C_hi + add table_ptr3 = table_ptr3, table_offset // Point to SC_inv +} +;; + +// +// x = |r| - B +// +// Convert B so it has the same exponent as Pos_r before subtracting +{ .mfi + ldfs T_lo = [table_ptr1] // Load T_lo +(p9) fnma.s1 x = B, FR_2tom64, Pos_r + nop.i 999 +} +{ .mfi + nop.m 999 +(p8) fnma.s1 x = B, TWO_TO_NEG65, Pos_r + nop.i 999 +} +;; + +{ .mfi + ldfs C_lo = [table_ptr2] // Load C_lo + nop.f 999 + nop.i 999 +} +;; + +{ .mfi + ldfe SC_inv = [table_ptr3] // Load SC_inv + fmerge.s sgn_r = r, f1 + tbit.z p11, p12 = N_fix_gr, 0 // p11 if N even, p12 if odd + +} +;; + +// +// xsq = x * x +// N even: Tx = T_hi * x +// +// N even: Tx1 = Tx + 1 +// N odd: Cx1 = 1 - Cx +// + +{ .mfi + nop.m 999 + fmpy.s1 xsq = x, x + nop.i 999 +} +{ .mfi + nop.m 999 +(p11) fmpy.s1 Tx = T_hi, x + nop.i 999 +} +;; + +// +// N odd: Cx = C_hi * x +// +{ .mfi + nop.m 999 +(p12) fmpy.s1 Cx = C_hi, x + nop.i 999 +} +;; +// +// N even and odd: P = P2_3 + P2_2 * xsq +// +{ .mfi + nop.m 999 + fma.s1 P = P2_3, xsq, P2_2 + nop.i 999 +} +{ .mfi + nop.m 999 +(p11) fadd.s1 Tx1 = Tx, f1 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N even: D = C_hi - tanx +// N odd: D = T_hi + tanx +// +(p11) fmpy.s1 CORR = SC_inv, T_hi + nop.i 999 +} +{ .mfi + nop.m 999 + fmpy.s1 Sx = SC_inv, x + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p12) fmpy.s1 CORR = SC_inv, C_hi + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p12) fsub.s1 V_hi = f1, Cx + nop.i 999 ;; +} +{ .mfi + nop.m 999 + fma.s1 P = P, xsq, P2_1 + nop.i 999 +} +{ .mfi + nop.m 999 +// +// N even and odd: P = P2_1 + P * xsq +// +(p11) fma.s1 V_hi = Tx, Tx1, f1 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N even: Result = sgn_r * tail + T_hi (user rounding mode for C1) +// N odd: Result = sgn_r * tail + C_hi (user rounding mode for C1) +// + fmpy.s0 fp_tmp = fp_tmp, fp_tmp // Dummy mult to set inexact + nop.i 999 ;; +} +{ .mfi + nop.m 999 + fmpy.s1 CORR = CORR, c + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p12) fnma.s1 V_hi = Cx,V_hi,f1 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N even: V_hi = Tx * Tx1 + 1 +// N odd: Cx1 = 1 - Cx * Cx1 +// + fmpy.s1 P = P, xsq + nop.i 999 +} +{ .mfi + nop.m 999 +// +// N even and odd: P = P * xsq +// +(p11) fmpy.s1 V_hi = V_hi, T_hi + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N even and odd: tail = P * tail + V_lo +// +(p11) fmpy.s1 T_hi = sgn_r, T_hi + nop.i 999 ;; +} +{ .mfi + nop.m 999 + fmpy.s1 CORR = CORR, sgn_r + nop.i 999 ;; +} +{ .mfi + nop.m 999 +(p12) fmpy.s1 V_hi = V_hi,C_hi + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N even: V_hi = T_hi * V_hi +// N odd: V_hi = C_hi * V_hi +// + fma.s1 tanx = P, x, x + nop.i 999 +} +{ .mfi + nop.m 999 +(p12) fnmpy.s1 C_hi = sgn_r, C_hi + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N even: V_lo = 1 - V_hi + C_hi +// N odd: V_lo = 1 - V_hi + T_hi +// +(p11) fadd.s1 CORR = CORR, T_lo + nop.i 999 +} +{ .mfi + nop.m 999 +(p12) fsub.s1 CORR = CORR, C_lo + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N even and odd: tanx = x + x * P +// N even and odd: Sx = SC_inv * x +// +(p11) fsub.s1 D = C_hi, tanx + nop.i 999 +} +{ .mfi + nop.m 999 +(p12) fadd.s1 D = T_hi, tanx + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N odd: CORR = SC_inv * C_hi +// N even: CORR = SC_inv * T_hi +// + fnma.s1 D = V_hi, D, f1 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N even and odd: D = 1 - V_hi * D +// N even and odd: CORR = CORR * c +// + fma.s1 V_hi = V_hi, D, V_hi + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N even and odd: V_hi = V_hi + V_hi * D +// N even and odd: CORR = sgn_r * CORR +// +(p11) fnma.s1 V_lo = V_hi, C_hi, f1 + nop.i 999 +} +{ .mfi + nop.m 999 +(p12) fnma.s1 V_lo = V_hi, T_hi, f1 + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N even: CORR = COOR + T_lo +// N odd: CORR = CORR - C_lo +// +(p11) fma.s1 V_lo = tanx, V_hi, V_lo + tbit.nz p15, p0 = cot_flag, 0 // p15=1 if we compute cotl +} +{ .mfi + nop.m 999 +(p12) fnma.s1 V_lo = tanx, V_hi, V_lo + nop.i 999 ;; +} + +{ .mfi + nop.m 999 +(p15) fms.s1 T_hi = f0, f0, T_hi // to correct result's sign for cotl + nop.i 999 +} +{ .mfi + nop.m 999 +(p15) fms.s1 C_hi = f0, f0, C_hi // to correct result's sign for cotl + nop.i 999 +};; + +{ .mfi + nop.m 999 +(p15) fms.s1 sgn_r = f0, f0, sgn_r // to correct result's sign for cotl + nop.i 999 +};; + +{ .mfi + nop.m 999 +// +// N even: V_lo = V_lo + V_hi * tanx +// N odd: V_lo = V_lo - V_hi * tanx +// +(p11) fnma.s1 V_lo = C_lo, V_hi, V_lo + nop.i 999 +} +{ .mfi + nop.m 999 +(p12) fnma.s1 V_lo = T_lo, V_hi, V_lo + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N even: V_lo = V_lo - V_hi * C_lo +// N odd: V_lo = V_lo - V_hi * T_lo +// + fmpy.s1 V_lo = V_hi, V_lo + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N even and odd: V_lo = V_lo * V_hi +// + fadd.s1 tail = V_hi, V_lo + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N even and odd: tail = V_hi + V_lo +// + fma.s1 tail = tail, P, V_lo + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N even: T_hi = sgn_r * T_hi +// N odd : C_hi = -sgn_r * C_hi +// + fma.s1 tail = tail, Sx, CORR + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N even and odd: tail = Sx * tail + CORR +// + fma.s1 tail = V_hi, Sx, tail + nop.i 999 ;; +} +{ .mfi + nop.m 999 +// +// N even an odd: tail = Sx * V_hi + tail +// +(p11) fma.s0 Result = sgn_r, tail, T_hi + nop.i 999 +} +{ .mfb + nop.m 999 +(p12) fma.s0 Result = sgn_r, tail, C_hi + br.ret.sptk b0 ;; // Exit for 1/4 <= |r| < pi/4 +} + +TANL_DENORMAL: +// Here if x denormal +{ .mfb + getf.exp GR_signexp_x = Norm_Arg // Get sign and exponent of x + nop.f 999 + br.cond.sptk TANL_COMMON // Return to common code +} +;; + + +TANL_SPECIAL: +TANL_UNSUPPORTED: +// +// Code for NaNs, Unsupporteds, Infs, or +/- zero ? +// Invalid raised for Infs and SNaNs. +// + +{ .mfi + nop.m 999 + fmerge.s f10 = f8, f8 // Save input for error call + tbit.nz p6, p7 = cot_flag, 0 // p6=1 if we compute cotl +} +;; + +{ .mfi + nop.m 999 +(p6) fclass.m p6, p7 = f8, 0x7 // Test for zero (cotl only) + nop.i 999 +} +;; + +.pred.rel "mutex", p6, p7 +{ .mfi +(p6) mov GR_Parameter_Tag = 225 // (cotl) +(p6) frcpa.s0 f8, p0 = f1, f8 // cotl(+-0) = +-Inf + nop.i 999 +} +{ .mfb + nop.m 999 +(p7) fmpy.s0 f8 = f8, f0 +(p7) br.ret.sptk b0 +} +;; + +GLOBAL_IEEE754_END(tanl) + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue + +// (1) +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; + +// (2) +{ .mmi + stfe [GR_Parameter_Y] = f1,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; + +.body +// (3) +{ .mib + stfe [GR_Parameter_X] = f10 // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfe [GR_Parameter_Y] = f8 // STORE Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + nop.m 0 + nop.m 0 + add GR_Parameter_RESULT = 48,sp +};; + +// (4) +{ .mmi + ldfe f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) + +.type __libm_error_support#,@function +.global __libm_error_support# + + +// ******************************************************************* +// ******************************************************************* +// ******************************************************************* +// +// Special Code to handle very large argument case. +// Call int __libm_pi_by_2_reduce(x,r,c) for |arguments| >= 2**63 +// The interface is custom: +// On input: +// (Arg or x) is in f8 +// On output: +// r is in f8 +// c is in f9 +// N is in r8 +// We know also that __libm_pi_by_2_reduce preserves f10-15, f71-127. We +// use this to eliminate save/restore of key fp registers in this calling +// function. +// +// ******************************************************************* +// ******************************************************************* +// ******************************************************************* + +LOCAL_LIBM_ENTRY(__libm_callout) +TANL_ARG_TOO_LARGE: +.prologue +{ .mfi + add table_ptr2 = 144, table_base // Point to 2^-2 + nop.f 999 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +;; + +// Load 2^-2, -2^-2 +{ .mmi + ldfps TWO_TO_NEG2, NEGTWO_TO_NEG2 = [table_ptr2] + setf.sig B_mask1 = bmask1 // Form mask to get 5 msb of r +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; + +.body +// +// Call argument reduction with x in f8 +// Returns with N in r8, r in f8, c in f9 +// Assumes f71-127 are preserved across the call +// +{ .mib + setf.sig B_mask2 = bmask2 // Form mask to form B from r + mov GR_SAVE_GP=gp // Save gp + br.call.sptk b0=__libm_pi_by_2_reduce# +} +;; + +// +// Is |r| < 2**(-2) +// +{ .mfi + getf.sig sig_r = r // Extract significand of r + fcmp.lt.s1 p6, p0 = r, TWO_TO_NEG2 + mov gp = GR_SAVE_GP // Restore gp +} +;; + +{ .mfi + getf.exp exp_r = r // Extract signexp of r + nop.f 999 + mov b0 = GR_SAVE_B0 // Restore return address +} +;; + +// +// Get N_fix_gr +// +{ .mfi + mov N_fix_gr = r8 +(p6) fcmp.gt.unc.s1 p6, p0 = r, NEGTWO_TO_NEG2 + mov ar.pfs = GR_SAVE_PFS // Restore pfs +} +;; + +{ .mbb + nop.m 999 +(p6) br.cond.spnt TANL_SMALL_R // Branch if |r| < 1/4 + br.cond.sptk TANL_NORMAL_R // Branch if 1/4 <= |r| < pi/4 +} +;; + +LOCAL_LIBM_END(__libm_callout) + +.type __libm_pi_by_2_reduce#,@function +.global __libm_pi_by_2_reduce# diff --git a/sysdeps/ia64/fpu/s_trunc.S b/sysdeps/ia64/fpu/s_trunc.S new file mode 100644 index 0000000000..b9ad03b5a8 --- /dev/null +++ b/sysdeps/ia64/fpu/s_trunc.S @@ -0,0 +1,166 @@ +.file "trunc.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 07/07/00 Created +// 05/20/02 Cleaned up namespace and sf0 syntax +// 01/20/03 Improved performance and reduced code size +//============================================================== + +// API +//============================================================== +// double trunc(double x) +//============================================================== + +// general input registers: +// r14 - r18 + +rExpBias = r14 +rSignexp = r15 +rExp = r16 +rExpMask = r17 +rBigexp = r18 + +// floating-point registers: +// f8 - f10 + +fXtruncInt = f9 +fNormX = f10 + +// predicate registers used: +// p6, p7 + +// Overview of operation +//============================================================== +// double trunc(double x) +// Return an integer value (represented as a double) less than or +// equal to x in magnitude. +// This is x rounded toward zero to an integral value. +//============================================================== + +// double_extended +// if the exponent is > 1003e => 3F(true) = 63(decimal) +// we have a significand of 64 bits 1.63-bits. +// If we multiply by 2^63, we no longer have a fractional part +// So input is an integer value already. + +// double +// if the exponent is >= 10033 => 34(true) = 52(decimal) +// 34 + 3ff = 433 +// we have a significand of 53 bits 1.52-bits. (implicit 1) +// If we multiply by 2^52, we no longer have a fractional part +// So input is an integer value already. + +// single +// if the exponent is > 10016 => 17(true) = 23(decimal) +// we have a significand of 24 bits 1.23-bits. (implicit 1) +// If we multiply by 2^23, we no longer have a fractional part +// So input is an integer value already. + +.section .text +GLOBAL_LIBM_ENTRY(trunc) + +{ .mfi + getf.exp rSignexp = f8 // Get signexp, recompute if unorm + fcvt.fx.trunc.s1 fXtruncInt = f8 // Convert to int in significand + addl rBigexp = 0x10033, r0 // Set exponent at which is integer +} +{ .mfi + mov rExpBias = 0x0FFFF // Form exponent bias + fnorm.s1 fNormX = f8 // Normalize input + mov rExpMask = 0x1FFFF // Form exponent mask +} +;; + +{ .mfi + nop.m 0 + fclass.m p7,p0 = f8, 0x0b // Test x unorm + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + fclass.m p6,p0 = f8, 0x1e3 // Test x natval, nan, inf +(p7) br.cond.spnt TRUNC_UNORM // Branch if x unorm +} +;; + +TRUNC_COMMON: +// Return here from TRUNC_UNORM +{ .mfb + and rExp = rSignexp, rExpMask // Get biased exponent +(p6) fma.d.s0 f8 = f8, f1, f0 // Result if x natval, nan, inf +(p6) br.ret.spnt b0 // Exit if x natval, nan, inf +} +;; + +{ .mfi + cmp.lt p6,p0 = rExp, rExpBias // Is |x| < 1? + fcvt.xf f8 = fXtruncInt // Result, assume 1 <= |x| < 2^52 + cmp.ge p7,p0 = rExp, rBigexp // Is |x| >= 2^52? +} +;; + +// We must correct result if |x| < 1, or |x| >= 2^52 +.pred.rel "mutex",p6,p7 +{ .mfi + nop.m 0 +(p6) fmerge.s f8 = fNormX, f0 // If |x| < 1, result sgn(x)*0 + nop.i 0 +} +{ .mfb + nop.m 0 +(p7) fma.d.s0 f8 = fNormX, f1, f0 // If |x| >= 2^52, result x + br.ret.sptk b0 // Exit main path +} +;; + + +TRUNC_UNORM: +// Here if x unorm +{ .mfb + getf.exp rSignexp = fNormX // Get signexp, recompute if unorm + fcmp.eq.s0 p7,p0 = f8, f0 // Dummy op to set denormal flag + br.cond.sptk TRUNC_COMMON // Return to main path +} +;; + +GLOBAL_LIBM_END(trunc) diff --git a/sysdeps/ia64/fpu/s_truncf.S b/sysdeps/ia64/fpu/s_truncf.S new file mode 100644 index 0000000000..ff40bc7101 --- /dev/null +++ b/sysdeps/ia64/fpu/s_truncf.S @@ -0,0 +1,166 @@ +.file "truncf.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 07/07/00 Created +// 05/20/02 Cleaned up namespace and sf0 syntax +// 01/20/03 Improved performance and reduced code size +//============================================================== + +// API +//============================================================== +// float truncf(float x) +//============================================================== + +// general input registers: +// r14 - r18 + +rExpBias = r14 +rSignexp = r15 +rExp = r16 +rExpMask = r17 +rBigexp = r18 + +// floating-point registers: +// f8 - f10 + +fXtruncInt = f9 +fNormX = f10 + +// predicate registers used: +// p6, p7 + +// Overview of operation +//============================================================== +// float truncf(float x) +// Return an integer value (represented as a float) less than or +// equal to x in magnitude. +// This is x rounded toward zero to an integral value. +//============================================================== + +// double_extended +// if the exponent is > 1003e => 3F(true) = 63(decimal) +// we have a significand of 64 bits 1.63-bits. +// If we multiply by 2^63, we no longer have a fractional part +// So input is an integer value already. + +// double +// if the exponent is >= 10033 => 34(true) = 52(decimal) +// 34 + 3ff = 433 +// we have a significand of 53 bits 1.52-bits. (implicit 1) +// If we multiply by 2^52, we no longer have a fractional part +// So input is an integer value already. + +// single +// if the exponent is > 10016 => 17(true) = 23(decimal) +// we have a significand of 24 bits 1.23-bits. (implicit 1) +// If we multiply by 2^23, we no longer have a fractional part +// So input is an integer value already. + +.section .text +GLOBAL_LIBM_ENTRY(truncf) + +{ .mfi + getf.exp rSignexp = f8 // Get signexp, recompute if unorm + fcvt.fx.trunc.s1 fXtruncInt = f8 // Convert to int in significand + addl rBigexp = 0x10016, r0 // Set exponent at which is integer +} +{ .mfi + mov rExpBias = 0x0FFFF // Form exponent bias + fnorm.s1 fNormX = f8 // Normalize input + mov rExpMask = 0x1FFFF // Form exponent mask +} +;; + +{ .mfi + nop.m 0 + fclass.m p7,p0 = f8, 0x0b // Test x unorm + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + fclass.m p6,p0 = f8, 0x1e3 // Test x natval, nan, inf +(p7) br.cond.spnt TRUNC_UNORM // Branch if x unorm +} +;; + +TRUNC_COMMON: +// Return here from TRUNC_UNORM +{ .mfb + and rExp = rSignexp, rExpMask // Get biased exponent +(p6) fma.s.s0 f8 = f8, f1, f0 // Result if x natval, nan, inf +(p6) br.ret.spnt b0 // Exit if x natval, nan, inf +} +;; + +{ .mfi + cmp.lt p6,p0 = rExp, rExpBias // Is |x| < 1? + fcvt.xf f8 = fXtruncInt // Result, assume 1 <= |x| < 2^23 + cmp.ge p7,p0 = rExp, rBigexp // Is |x| >= 2^23? +} +;; + +// We must correct result if |x| < 1, or |x| >= 2^23 +.pred.rel "mutex",p6,p7 +{ .mfi + nop.m 0 +(p6) fmerge.s f8 = fNormX, f0 // If |x| < 1, result sgn(x)*0 + nop.i 0 +} +{ .mfb + nop.m 0 +(p7) fma.s.s0 f8 = fNormX, f1, f0 // If |x| >= 2^23, result x + br.ret.sptk b0 // Exit main path +} +;; + + +TRUNC_UNORM: +// Here if x unorm +{ .mfb + getf.exp rSignexp = fNormX // Get signexp, recompute if unorm + fcmp.eq.s0 p7,p0 = f8, f0 // Dummy op to set denormal flag + br.cond.sptk TRUNC_COMMON // Return to main path +} +;; + +GLOBAL_LIBM_END(truncf) diff --git a/sysdeps/ia64/fpu/s_truncl.S b/sysdeps/ia64/fpu/s_truncl.S new file mode 100644 index 0000000000..1afa19ba2b --- /dev/null +++ b/sysdeps/ia64/fpu/s_truncl.S @@ -0,0 +1,166 @@ +.file "truncl.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 07/07/00 Created +// 05/20/02 Cleaned up namespace and sf0 syntax +// 01/20/03 Improved performance and reduced code size +//============================================================== + +// API +//============================================================== +// long double truncl(long double x) +//============================================================== + +// general input registers: +// r14 - r18 + +rExpBias = r14 +rSignexp = r15 +rExp = r16 +rExpMask = r17 +rBigexp = r18 + +// floating-point registers: +// f8 - f10 + +fXtruncInt = f9 +fNormX = f10 + +// predicate registers used: +// p6, p7 + +// Overview of operation +//============================================================== +// long double truncl(long double x) +// Return an integer value (represented as a long double) less than or +// equal to x in magnitude. +// This is x rounded toward zero to an integral value. +//============================================================== + +// double_extended +// if the exponent is > 1003e => 3F(true) = 63(decimal) +// we have a significand of 64 bits 1.63-bits. +// If we multiply by 2^63, we no longer have a fractional part +// So input is an integer value already. + +// double +// if the exponent is >= 10033 => 34(true) = 52(decimal) +// 34 + 3ff = 433 +// we have a significand of 53 bits 1.52-bits. (implicit 1) +// If we multiply by 2^52, we no longer have a fractional part +// So input is an integer value already. + +// single +// if the exponent is > 10016 => 17(true) = 23(decimal) +// we have a significand of 24 bits 1.23-bits. (implicit 1) +// If we multiply by 2^23, we no longer have a fractional part +// So input is an integer value already. + +.section .text +GLOBAL_LIBM_ENTRY(truncl) + +{ .mfi + getf.exp rSignexp = f8 // Get signexp, recompute if unorm + fcvt.fx.trunc.s1 fXtruncInt = f8 // Convert to int in significand + addl rBigexp = 0x1003e, r0 // Set exponent at which is integer +} +{ .mfi + mov rExpBias = 0x0FFFF // Form exponent bias + fnorm.s1 fNormX = f8 // Normalize input + mov rExpMask = 0x1FFFF // Form exponent mask +} +;; + +{ .mfi + nop.m 0 + fclass.m p7,p0 = f8, 0x0b // Test x unorm + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + fclass.m p6,p0 = f8, 0x1e3 // Test x natval, nan, inf +(p7) br.cond.spnt TRUNC_UNORM // Branch if x unorm +} +;; + +TRUNC_COMMON: +// Return here from TRUNC_UNORM +{ .mfb + and rExp = rSignexp, rExpMask // Get biased exponent +(p6) fma.s0 f8 = f8, f1, f0 // Result if x natval, nan, inf +(p6) br.ret.spnt b0 // Exit if x natval, nan, inf +} +;; + +{ .mfi + cmp.lt p6,p0 = rExp, rExpBias // Is |x| < 1? + fcvt.xf f8 = fXtruncInt // Result, assume 1 <= |x| < 2^63 + cmp.ge p7,p0 = rExp, rBigexp // Is |x| >= 2^63? +} +;; + +// We must correct result if |x| < 1, or |x| >= 2^63 +.pred.rel "mutex",p6,p7 +{ .mfi + nop.m 0 +(p6) fmerge.s f8 = fNormX, f0 // If |x| < 1, result sgn(x)*0 + nop.i 0 +} +{ .mfb + nop.m 0 +(p7) fma.s0 f8 = fNormX, f1, f0 // If |x| >= 2^63, result x + br.ret.sptk b0 // Exit main path +} +;; + + +TRUNC_UNORM: +// Here if x unorm +{ .mfb + getf.exp rSignexp = fNormX // Get signexp, recompute if unorm + fcmp.eq.s0 p7,p0 = f8, f0 // Dummy op to set denormal flag + br.cond.sptk TRUNC_COMMON // Return to main path +} +;; + +GLOBAL_LIBM_END(truncl) diff --git a/sysdeps/ia64/fpu/sincos32.c b/sysdeps/ia64/fpu/sincos32.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/sincos32.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/slowexp.c b/sysdeps/ia64/fpu/slowexp.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/slowexp.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/slowpow.c b/sysdeps/ia64/fpu/slowpow.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/slowpow.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/t_exp.c b/sysdeps/ia64/fpu/t_exp.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/t_exp.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_acos.c b/sysdeps/ia64/fpu/w_acos.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_acos.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_acosf.c b/sysdeps/ia64/fpu/w_acosf.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_acosf.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_acosh.c b/sysdeps/ia64/fpu/w_acosh.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_acosh.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_acoshf.c b/sysdeps/ia64/fpu/w_acoshf.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_acoshf.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_acoshl.c b/sysdeps/ia64/fpu/w_acoshl.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_acoshl.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_acosl.c b/sysdeps/ia64/fpu/w_acosl.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_acosl.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_asin.c b/sysdeps/ia64/fpu/w_asin.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_asin.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_asinf.c b/sysdeps/ia64/fpu/w_asinf.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_asinf.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_asinl.c b/sysdeps/ia64/fpu/w_asinl.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_asinl.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_atan2.c b/sysdeps/ia64/fpu/w_atan2.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_atan2.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_atan2f.c b/sysdeps/ia64/fpu/w_atan2f.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_atan2f.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_atan2l.c b/sysdeps/ia64/fpu/w_atan2l.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_atan2l.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_atanh.c b/sysdeps/ia64/fpu/w_atanh.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_atanh.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_atanhf.c b/sysdeps/ia64/fpu/w_atanhf.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_atanhf.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_atanhl.c b/sysdeps/ia64/fpu/w_atanhl.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_atanhl.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_cosh.c b/sysdeps/ia64/fpu/w_cosh.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_cosh.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_coshf.c b/sysdeps/ia64/fpu/w_coshf.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_coshf.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_coshl.c b/sysdeps/ia64/fpu/w_coshl.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_coshl.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_exp.c b/sysdeps/ia64/fpu/w_exp.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_exp.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_exp10.c b/sysdeps/ia64/fpu/w_exp10.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_exp10.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_exp10f.c b/sysdeps/ia64/fpu/w_exp10f.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_exp10f.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_exp10l.c b/sysdeps/ia64/fpu/w_exp10l.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_exp10l.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_exp2.c b/sysdeps/ia64/fpu/w_exp2.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_exp2.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_exp2f.c b/sysdeps/ia64/fpu/w_exp2f.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_exp2f.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_exp2l.c b/sysdeps/ia64/fpu/w_exp2l.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_exp2l.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_expf.c b/sysdeps/ia64/fpu/w_expf.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_expf.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_expl.c b/sysdeps/ia64/fpu/w_expl.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_expl.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_fmod.c b/sysdeps/ia64/fpu/w_fmod.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_fmod.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_fmodf.c b/sysdeps/ia64/fpu/w_fmodf.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_fmodf.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_fmodl.c b/sysdeps/ia64/fpu/w_fmodl.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_fmodl.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_hypot.c b/sysdeps/ia64/fpu/w_hypot.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_hypot.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_hypotf.c b/sysdeps/ia64/fpu/w_hypotf.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_hypotf.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_hypotl.c b/sysdeps/ia64/fpu/w_hypotl.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_hypotl.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_lgamma.c b/sysdeps/ia64/fpu/w_lgamma.c new file mode 100644 index 0000000000..2006d3e806 --- /dev/null +++ b/sysdeps/ia64/fpu/w_lgamma.c @@ -0,0 +1,80 @@ +/* file: lgamma.c */ + + +// Copyright (c) 2002 Intel Corporation +// All rights reserved. +// +// Contributed 2002 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// + +// History +//============================================================== +// 02/04/02: Initial version +// 02/22/02: Removed lgammaf/gammaf +// +/* +// FUNCTIONS: double lgamma(double x) +// double gamma(double x) +// Natural logarithm of GAMMA function +*/ + +#include "libm_support.h" + + +extern double __libm_lgamma(double /*x*/, int* /*signgam*/, int /*signgamsz*/); + + +double __ieee754_lgamma(double x) +{ +#ifdef __POSIX__ + extern int signgam; +#else + int signgam; +#endif + return __libm_lgamma(x, &signgam, sizeof(signgam)); +} +weak_alias (__ieee754_lgamma, lgamma) + +double __ieee754_gamma(double x) +{ +#ifdef __POSIX__ + extern int signgam; +#else + int signgam; +#endif + return __libm_lgamma(x, &signgam, sizeof(signgam)); +} +weak_alias (__ieee754_gamma, gamma) diff --git a/sysdeps/ia64/fpu/w_lgamma_r.c b/sysdeps/ia64/fpu/w_lgamma_r.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_lgamma_r.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_lgammaf.c b/sysdeps/ia64/fpu/w_lgammaf.c new file mode 100644 index 0000000000..cd0b4f6666 --- /dev/null +++ b/sysdeps/ia64/fpu/w_lgammaf.c @@ -0,0 +1,80 @@ +/* file: lgammaf.c */ + + +// Copyright (c) 2002 Intel Corporation +// All rights reserved. +// +// Contributed 2002 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// + +// History +//============================================================== +// 02/04/02: Initial version +// 02/22/02: Removed lgamma/gamma +// +/* +// FUNCTIONS: float lgammaf(float x) +// float gammaf(float x) +// Natural logarithm of GAMMA function +*/ + +#include "libm_support.h" + + +extern float __libm_lgammaf(float /*x*/, int* /*signgam*/, int /*signgamsz*/); + + +float __ieee754_lgammaf(float x) +{ +#ifdef __POSIX__ + extern int signgam; +#else + int signgam; +#endif + return __libm_lgammaf(x, &signgam, sizeof(signgam)); +} +weak_alias (__ieee754_lgammaf, lgammaf) + +float __ieee754_gammaf(float x) +{ +#ifdef __POSIX__ + extern int signgam; +#else + int signgam; +#endif + return __libm_lgammaf(x, &signgam, sizeof(signgam)); +} +weak_alias (__ieee754_gammaf, gammaf) diff --git a/sysdeps/ia64/fpu/w_lgammaf_r.c b/sysdeps/ia64/fpu/w_lgammaf_r.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_lgammaf_r.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_lgammal.c b/sysdeps/ia64/fpu/w_lgammal.c new file mode 100644 index 0000000000..e3885296eb --- /dev/null +++ b/sysdeps/ia64/fpu/w_lgammal.c @@ -0,0 +1,79 @@ +/* file: lgammal.c */ + + +// Copyright (c) 2002 Intel Corporation +// All rights reserved. +// +// Contributed 2002 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// + +// History +//============================================================== +// 08/15/02: Initial version +// +/* +// FUNCTIONS: long double lgammal(long double x) +// long double gammal(long double x) +// Natural logarithm of GAMMA function +*/ + +#include "libm_support.h" + + +extern double __libm_lgammal(long double /*x*/, int* /*signgam*/, int /*signgamsz*/); + + +long double __ieee754_lgammal(long double x) +{ +#ifdef __POSIX__ + extern int signgam; +#else + int signgam; +#endif + return __libm_lgammal(x, &signgam, sizeof(signgam)); +} +weak_alias (__ieee754_lgammal, lgammal) + +long double __ieee754_gammal(long double x) +{ +#ifdef __POSIX__ + extern int signgam; +#else + int signgam; +#endif + return __libm_lgammal(x, &signgam, sizeof(signgam)); +} +weak_alias (__ieee754_gammal, gammal) diff --git a/sysdeps/ia64/fpu/w_lgammal_r.c b/sysdeps/ia64/fpu/w_lgammal_r.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_lgammal_r.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_log.c b/sysdeps/ia64/fpu/w_log.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_log.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_log10.c b/sysdeps/ia64/fpu/w_log10.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_log10.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_log10f.c b/sysdeps/ia64/fpu/w_log10f.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_log10f.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_log10l.c b/sysdeps/ia64/fpu/w_log10l.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_log10l.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_log2.c b/sysdeps/ia64/fpu/w_log2.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_log2.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_log2f.c b/sysdeps/ia64/fpu/w_log2f.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_log2f.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_log2l.c b/sysdeps/ia64/fpu/w_log2l.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_log2l.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_logf.c b/sysdeps/ia64/fpu/w_logf.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_logf.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_logl.c b/sysdeps/ia64/fpu/w_logl.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_logl.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_pow.c b/sysdeps/ia64/fpu/w_pow.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_pow.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_powf.c b/sysdeps/ia64/fpu/w_powf.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_powf.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_powl.c b/sysdeps/ia64/fpu/w_powl.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_powl.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_remainder.c b/sysdeps/ia64/fpu/w_remainder.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_remainder.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_remainderf.c b/sysdeps/ia64/fpu/w_remainderf.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_remainderf.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_remainderl.c b/sysdeps/ia64/fpu/w_remainderl.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_remainderl.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_scalb.c b/sysdeps/ia64/fpu/w_scalb.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_scalb.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_scalbf.c b/sysdeps/ia64/fpu/w_scalbf.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_scalbf.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_scalbl.c b/sysdeps/ia64/fpu/w_scalbl.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_scalbl.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_sinh.c b/sysdeps/ia64/fpu/w_sinh.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_sinh.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_sinhf.c b/sysdeps/ia64/fpu/w_sinhf.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_sinhf.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_sinhl.c b/sysdeps/ia64/fpu/w_sinhl.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_sinhl.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_sqrt.c b/sysdeps/ia64/fpu/w_sqrt.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_sqrt.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_sqrtf.c b/sysdeps/ia64/fpu/w_sqrtf.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_sqrtf.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_sqrtl.c b/sysdeps/ia64/fpu/w_sqrtl.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/w_sqrtl.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_tgamma.S b/sysdeps/ia64/fpu/w_tgamma.S new file mode 100644 index 0000000000..24f3d11840 --- /dev/null +++ b/sysdeps/ia64/fpu/w_tgamma.S @@ -0,0 +1,1836 @@ +.file "tgamma.s" + + +// Copyright (c) 2001 - 2005, Intel Corporation +// All rights reserved. +// +// Contributed 2001 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,INCLUDING,BUT NOT +// LIMITED TO,THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT,INDIRECT,INCIDENTAL,SPECIAL, +// EXEMPLARY,OR CONSEQUENTIAL DAMAGES (INCLUDING,BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,DATA,OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY,WHETHER IN CONTRACT,STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE,EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code,and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +//********************************************************************* +// +// History: +// 10/12/01 Initial version +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// 04/04/03 Changed error codes for overflow and negative integers +// 04/10/03 Changed code for overflow near zero handling +// 03/31/05 Reformatted delimiters between data tables +// +//********************************************************************* +// +//********************************************************************* +// +// Function: tgamma(x) computes the principle value of the GAMMA +// function of x. +// +//********************************************************************* +// +// Resources Used: +// +// Floating-Point Registers: f8-f15 +// f33-f87 +// +// General Purpose Registers: +// r8-r11 +// r14-r28 +// r32-r36 +// r37-r40 (Used to pass arguments to error handling routine) +// +// Predicate Registers: p6-p15 +// +//********************************************************************* +// +// IEEE Special Conditions: +// +// tgamma(+inf) = +inf +// tgamma(-inf) = QNaN +// tgamma(+/-0) = +/-inf +// tgamma(x<0, x - integer) = QNaN +// tgamma(SNaN) = QNaN +// tgamma(QNaN) = QNaN +// +//********************************************************************* +// +// Overview +// +// The method consists of three cases. +// +// If 2 <= x < OVERFLOW_BOUNDARY use case tgamma_regular; +// else if 0 < x < 2 use case tgamma_from_0_to_2; +// else if -(i+1) < x < -i, i = 0...184 use case tgamma_negatives; +// +// Case 2 <= x < OVERFLOW_BOUNDARY +// ------------------------------- +// Here we use algorithm based on the recursive formula +// GAMMA(x+1) = x*GAMMA(x). For that we subdivide interval +// [2; OVERFLOW_BOUNDARY] into intervals [16*n; 16*(n+1)] and +// approximate GAMMA(x) by polynomial of 22th degree on each +// [16*n; 16*n+1], recursive formula is used to expand GAMMA(x) +// to [16*n; 16*n+1]. In other words we need to find n, i and r +// such that x = 16 * n + i + r where n and i are integer numbers +// and r is fractional part of x. So GAMMA(x) = GAMMA(16*n+i+r) = +// = (x-1)*(x-2)*...*(x-i)*GAMMA(x-i) = +// = (x-1)*(x-2)*...*(x-i)*GAMMA(16*n+r) ~ +// ~ (x-1)*(x-2)*...*(x-i)*P22n(r). +// +// Step 1: Reduction +// ----------------- +// N = [x] with truncate +// r = x - N, note 0 <= r < 1 +// +// n = N & ~0xF - index of table that contains coefficient of +// polynomial approximation +// i = N & 0xF - is used in recursive formula +// +// +// Step 2: Approximation +// --------------------- +// We use factorized minimax approximation polynomials +// P22n(r) = A22*(r^2+C01(n)*R+C00(n))* +// *(r^2+C11(n)*R+C10(n))*...*(r^2+CA1(n)*R+CA0(n)) +// +// Step 3: Recursion +// ----------------- +// In case when i > 0 we need to multiply P22n(r) by product +// R(i)=(x-1)*(x-2)*...*(x-i). To reduce number of fp-instructions +// we can calculate R as follow: +// R(i) = ((x-1)*(x-2))*((x-3)*(x-4))*...*((x-(i-1))*(x-i)) if i is +// even or R = ((x-1)*(x-2))*((x-3)*(x-4))*...*((x-(i-2))*(x-(i-1)))* +// *(i-1) if i is odd. In both cases we need to calculate +// R2(i) = (x^2-3*x+2)*(x^2-7*x+12)*...*(x^2+x+2*j*(2*j-1)) = +// = (x^2-3*x+2)*(x^2-7*x+12)*...*((x^2+x)+2*j*(2*(j-1)+(1-2*x))) = +// = (RA+2*(2-RB))*(RA+4*(4-RB))*...*(RA+2*j*(2*(j-1)+RB)) +// where j = 1..[i/2], RA = x^2+x, RB = 1-2*x. +// +// Step 4: Reconstruction +// ---------------------- +// Reconstruction is just simple multiplication i.e. +// GAMMA(x) = P22n(r)*R(i) +// +// Case 0 < x < 2 +// -------------- +// To calculate GAMMA(x) on this interval we do following +// if 1 <= x < 1.25 than GAMMA(x) = P15(x-1) +// if 1.25 <= x < 1.5 than GAMMA(x) = P15(x-x_min) where +// x_min is point of local minimum on [1; 2] interval. +// if 1.5 <= x < 2.0 than GAMMA(x) = P15(x-1.5) +// and +// if 0 < x < 1 than GAMMA(x) = GAMMA(x+1)/x +// +// Case -(i+1) < x < -i, i = 0...184 +// ---------------------------------- +// Here we use the fact that GAMMA(-x) = PI/(x*GAMMA(x)*sin(PI*x)) and +// so we need to calculate GAMMA(x), sin(PI*x)/PI. Calculation of +// GAMMA(x) is described above. +// +// Step 1: Reduction +// ----------------- +// Note that period of sin(PI*x) is 2 and range reduction for +// sin(PI*x) is like to range reduction for GAMMA(x) +// i.e r = x - [x] with exception of cases +// when r > 0.5 (in such cases r = 1 - (x - [x])). +// +// Step 2: Approximation +// --------------------- +// To approximate sin(PI*x)/PI = sin(PI*(2*n+r))/PI = +// = (-1)^n*sin(PI*r)/PI Taylor series is used. +// sin(PI*r)/PI ~ S21(r). +// +// Step 3: Division +// ---------------- +// To calculate 1/(x*GAMMA(x)*S21(r)) we use frcpa instruction +// with following Newton-Raphson interations. +// +// +//********************************************************************* + +GR_Sig = r8 +GR_TAG = r8 +GR_ad_Data = r9 +GR_SigRqLin = r10 +GR_iSig = r11 +GR_ExpOf1 = r11 +GR_ExpOf8 = r11 + + +GR_Sig2 = r14 +GR_Addr_Mask1 = r15 +GR_Sign_Exp = r16 +GR_Tbl_Offs = r17 +GR_Addr_Mask2 = r18 +GR_ad_Co = r19 +GR_Bit2 = r19 +GR_ad_Ce = r20 +GR_ad_Co7 = r21 +GR_NzOvfBound = r21 +GR_ad_Ce7 = r22 +GR_Tbl_Ind = r23 +GR_Tbl_16xInd = r24 +GR_ExpOf025 = r24 +GR_ExpOf05 = r25 +GR_0x30033 = r26 +GR_10 = r26 +GR_12 = r27 +GR_185 = r27 +GR_14 = r28 +GR_2 = r28 +GR_fpsr = r28 + +GR_SAVE_B0 = r33 +GR_SAVE_PFS = r34 +GR_SAVE_GP = r35 +GR_SAVE_SP = r36 + +GR_Parameter_X = r37 +GR_Parameter_Y = r38 +GR_Parameter_RESULT = r39 +GR_Parameter_TAG = r40 + + + +FR_X = f10 +FR_Y = f1 // tgamma is single argument function +FR_RESULT = f8 + +FR_AbsX = f9 +FR_NormX = f9 +FR_r02 = f11 +FR_AbsXp1 = f12 +FR_X2pX = f13 +FR_1m2X = f14 +FR_Rq1 = f14 +FR_Xt = f15 + +FR_r = f33 +FR_OvfBound = f34 +FR_Xmin = f35 +FR_2 = f36 +FR_Rcp1 = f36 +FR_Rcp3 = f36 +FR_4 = f37 +FR_5 = f38 +FR_6 = f39 +FR_8 = f40 +FR_10 = f41 +FR_12 = f42 +FR_14 = f43 +FR_GAMMA = f43 +FR_05 = f44 + +FR_Rq2 = f45 +FR_Rq3 = f46 +FR_Rq4 = f47 +FR_Rq5 = f48 +FR_Rq6 = f49 +FR_Rq7 = f50 +FR_RqLin = f51 + +FR_InvAn = f52 + +FR_C01 = f53 +FR_A15 = f53 +FR_C11 = f54 +FR_A14 = f54 +FR_C21 = f55 +FR_A13 = f55 +FR_C31 = f56 +FR_A12 = f56 +FR_C41 = f57 +FR_A11 = f57 +FR_C51 = f58 +FR_A10 = f58 +FR_C61 = f59 +FR_A9 = f59 +FR_C71 = f60 +FR_A8 = f60 +FR_C81 = f61 +FR_A7 = f61 +FR_C91 = f62 +FR_A6 = f62 +FR_CA1 = f63 +FR_A5 = f63 +FR_C00 = f64 +FR_A4 = f64 +FR_rs2 = f64 +FR_C10 = f65 +FR_A3 = f65 +FR_rs3 = f65 +FR_C20 = f66 +FR_A2 = f66 +FR_rs4 = f66 +FR_C30 = f67 +FR_A1 = f67 +FR_rs7 = f67 +FR_C40 = f68 +FR_A0 = f68 +FR_rs8 = f68 +FR_C50 = f69 +FR_r2 = f69 +FR_C60 = f70 +FR_r3 = f70 +FR_C70 = f71 +FR_r4 = f71 +FR_C80 = f72 +FR_r7 = f72 +FR_C90 = f73 +FR_r8 = f73 +FR_CA0 = f74 +FR_An = f75 + +FR_S21 = f76 +FR_S19 = f77 +FR_Rcp0 = f77 +FR_Rcp2 = f77 +FR_S17 = f78 +FR_S15 = f79 +FR_S13 = f80 +FR_S11 = f81 +FR_S9 = f82 +FR_S7 = f83 +FR_S5 = f84 +FR_S3 = f85 + +FR_iXt = f86 +FR_rs = f87 + + +// Data tables +//============================================================== +RODATA +.align 16 + +LOCAL_OBJECT_START(tgamma_data) +data8 0x406573FAE561F648 // overflow boundary (171.624376956302739927196) +data8 0x3FDD8B618D5AF8FE // point of local minium (0.461632144968362356785) +// +//[2; 3] +data8 0xEF0E85C9AE40ABE2,0x00004000 // C01 +data8 0xCA2049DDB4096DD8,0x00004000 // C11 +data8 0x99A203B4DC2D1A8C,0x00004000 // C21 +data8 0xBF5D9D9C0C295570,0x00003FFF // C31 +data8 0xE8DD037DEB833BAB,0x00003FFD // C41 +data8 0xB6AE39A2A36AA03A,0x0000BFFE // C51 +data8 0x804960DC2850277B,0x0000C000 // C61 +data8 0xD9F3973841C09F80,0x0000C000 // C71 +data8 0x9C198A676F8A2239,0x0000C001 // C81 +data8 0xC98B7DAE02BE3226,0x0000C001 // C91 +data8 0xE9CAF31AC69301BA,0x0000C001 // CA1 +data8 0xFBBDD58608A0D172,0x00004000 // C00 +data8 0xFDD0316D1E078301,0x00004000 // C10 +data8 0x8630B760468C15E4,0x00004001 // C20 +data8 0x93EDE20E47D9152E,0x00004001 // C30 +data8 0xA86F3A38C77D6B19,0x00004001 // C40 +//[16; 17] +data8 0xF87F757F365EE813,0x00004000 // C01 +data8 0xECA84FBA92759DA4,0x00004000 // C11 +data8 0xD4E0A55E07A8E913,0x00004000 // C21 +data8 0xB0EB45E94C8A5F7B,0x00004000 // C31 +data8 0x8050D6B4F7C8617D,0x00004000 // C41 +data8 0x8471B111AA691E5A,0x00003FFF // C51 +data8 0xADAF462AF96585C9,0x0000BFFC // C61 +data8 0xD327C7A587A8C32B,0x0000BFFF // C71 +data8 0xDEF5192B4CF5E0F1,0x0000C000 // C81 +data8 0xBADD64BB205AEF02,0x0000C001 // C91 +data8 0x9330A24AA67D6860,0x0000C002 // CA1 +data8 0xF57EEAF36D8C47BE,0x00004000 // C00 +data8 0x807092E12A251B38,0x00004001 // C10 +data8 0x8C458F80DEE7ED1C,0x00004001 // C20 +data8 0x9F30C731DC77F1A6,0x00004001 // C30 +data8 0xBAC4E7E099C3A373,0x00004001 // C40 +//[32; 33] +data8 0xC3059A415F142DEF,0x00004000 // C01 +data8 0xB9C1DAC24664587A,0x00004000 // C11 +data8 0xA7101D910992FFB2,0x00004000 // C21 +data8 0x8A9522B8E4AA0AB4,0x00004000 // C31 +data8 0xC76A271E4BA95DCC,0x00003FFF // C41 +data8 0xC5D6DE2A38DB7FF2,0x00003FFE // C51 +data8 0xDBA42086997818B2,0x0000BFFC // C61 +data8 0xB8EDDB1424C1C996,0x0000BFFF // C71 +data8 0xBF7372FB45524B5D,0x0000C000 // C81 +data8 0xA03DDE759131580A,0x0000C001 // C91 +data8 0xFDA6FC4022C1FFE3,0x0000C001 // CA1 +data8 0x9759ABF797B2533D,0x00004000 // C00 +data8 0x9FA160C6CF18CEC5,0x00004000 // C10 +data8 0xB0EFF1E3530E0FCD,0x00004000 // C20 +data8 0xCCD60D5C470165D1,0x00004000 // C30 +data8 0xF5E53F6307B0B1C1,0x00004000 // C40 +//[48; 49] +data8 0xAABE577FBCE37F5E,0x00004000 // C01 +data8 0xA274CAEEB5DF7172,0x00004000 // C11 +data8 0x91B90B6646C1B924,0x00004000 // C21 +data8 0xF06718519CA256D9,0x00003FFF // C31 +data8 0xAA9EE181C0E30263,0x00003FFF // C41 +data8 0xA07BDB5325CB28D2,0x00003FFE // C51 +data8 0x86C8B873204F9219,0x0000BFFD // C61 +data8 0xB0192C5D3E4787D6,0x0000BFFF // C71 +data8 0xB1E0A6263D4C19EF,0x0000C000 // C81 +data8 0x93BA32A118EAC9AE,0x0000C001 // C91 +data8 0xE942A39CD9BEE887,0x0000C001 // CA1 +data8 0xE838B0957B0D3D0D,0x00003FFF // C00 +data8 0xF60E0F00074FCF34,0x00003FFF // C10 +data8 0x89869936AE00C2A5,0x00004000 // C20 +data8 0xA0FE4E8AA611207F,0x00004000 // C30 +data8 0xC3B1229CFF1DDAFE,0x00004000 // C40 +//[64; 65] +data8 0x9C00DDF75CDC6183,0x00004000 // C01 +data8 0x9446AE9C0F6A833E,0x00004000 // C11 +data8 0x84ABC5083310B774,0x00004000 // C21 +data8 0xD9BA3A0977B1ED83,0x00003FFF // C31 +data8 0x989B18C99411D300,0x00003FFF // C41 +data8 0x886E66402318CE6F,0x00003FFE // C51 +data8 0x99028C2468F18F38,0x0000BFFD // C61 +data8 0xAB72D17DCD40CCE1,0x0000BFFF // C71 +data8 0xA9D9AC9BE42C2EF9,0x0000C000 // C81 +data8 0x8C11D983AA177AD2,0x0000C001 // C91 +data8 0xDC779E981C1F0F06,0x0000C001 // CA1 +data8 0xC1FD4AC85965E8D6,0x00003FFF // C00 +data8 0xCE3D2D909D389EC2,0x00003FFF // C10 +data8 0xE7F79980AD06F5D8,0x00003FFF // C20 +data8 0x88DD9F73C8680B5D,0x00004000 // C30 +data8 0xA7D6CB2CB2D46F9D,0x00004000 // C40 +//[80; 81] +data8 0x91C7FF4E993430D0,0x00004000 // C01 +data8 0x8A6E7AB83E45A7E9,0x00004000 // C11 +data8 0xF72D6382E427BEA9,0x00003FFF // C21 +data8 0xC9E2E4F9B3B23ED6,0x00003FFF // C31 +data8 0x8BEFEF56AE05D775,0x00003FFF // C41 +data8 0xEE9666AB6A185560,0x00003FFD // C51 +data8 0xA6AFAF5CEFAEE04D,0x0000BFFD // C61 +data8 0xA877EAFEF1F9C880,0x0000BFFF // C71 +data8 0xA45BD433048ECA15,0x0000C000 // C81 +data8 0x86BD1636B774CC2E,0x0000C001 // C91 +data8 0xD3721BE006E10823,0x0000C001 // CA1 +data8 0xA97EFABA91854208,0x00003FFF // C00 +data8 0xB4AF0AEBB3F97737,0x00003FFF // C10 +data8 0xCC38241936851B0B,0x00003FFF // C20 +data8 0xF282A6261006EA84,0x00003FFF // C30 +data8 0x95B8E9DB1BD45BAF,0x00004000 // C40 +//[96; 97] +data8 0x8A1FA3171B35A106,0x00004000 // C01 +data8 0x830D5B8843890F21,0x00004000 // C11 +data8 0xE98B0F1616677A23,0x00003FFF // C21 +data8 0xBDF8347F5F67D4EC,0x00003FFF // C31 +data8 0x825F15DE34EC055D,0x00003FFF // C41 +data8 0xD4846186B8AAC7BE,0x00003FFD // C51 +data8 0xB161093AB14919B1,0x0000BFFD // C61 +data8 0xA65758EEA4800EF4,0x0000BFFF // C71 +data8 0xA046B67536FA329C,0x0000C000 // C81 +data8 0x82BBEC1BCB9E9068,0x0000C001 // C91 +data8 0xCC9DE2B23BA91B0B,0x0000C001 // CA1 +data8 0x983B16148AF77F94,0x00003FFF // C00 +data8 0xA2A4D8EE90FEE5DD,0x00003FFF // C10 +data8 0xB89446FA37FF481C,0x00003FFF // C20 +data8 0xDC5572648485FB01,0x00003FFF // C30 +data8 0x88CD5D7DB976129A,0x00004000 // C40 +//[112; 113] +data8 0x8417098FD62AC5E3,0x00004000 // C01 +data8 0xFA7896486B779CBB,0x00003FFF // C11 +data8 0xDEC98B14AF5EEBD1,0x00003FFF // C21 +data8 0xB48E153C6BF0B5A3,0x00003FFF // C31 +data8 0xF597B038BC957582,0x00003FFE // C41 +data8 0xBFC6F0884A415694,0x00003FFD // C51 +data8 0xBA075A1392BDB5E5,0x0000BFFD // C61 +data8 0xA4B79E01B44C7DB4,0x0000BFFF // C71 +data8 0x9D12FA7711BFAB0F,0x0000C000 // C81 +data8 0xFF24C47C8E108AB4,0x0000C000 // C91 +data8 0xC7325EC86562606A,0x0000C001 // CA1 +data8 0x8B47DCD9E1610938,0x00003FFF // C00 +data8 0x9518B111B70F88B8,0x00003FFF // C10 +data8 0xA9CC197206F68682,0x00003FFF // C20 +data8 0xCB98294CC0D7A6A6,0x00003FFF // C30 +data8 0xFE09493EA9165181,0x00003FFF // C40 +//[128; 129] +data8 0xFE53D03442270D90,0x00003FFF // C01 +data8 0xF0F857BAEC1993E4,0x00003FFF // C11 +data8 0xD5FF6D70DBBC2FD3,0x00003FFF // C21 +data8 0xACDAA5F4988B1074,0x00003FFF // C31 +data8 0xE92E069F8AD75B54,0x00003FFE // C41 +data8 0xAEBB64645BD94234,0x00003FFD // C51 +data8 0xC13746249F39B43C,0x0000BFFD // C61 +data8 0xA36B74F5B6297A1F,0x0000BFFF // C71 +data8 0x9A77860DF180F6E5,0x0000C000 // C81 +data8 0xF9F8457D84410A0C,0x0000C000 // C91 +data8 0xC2BF44C649EB8597,0x0000C001 // CA1 +data8 0x81225E7489BCDC0E,0x00003FFF // C00 +data8 0x8A788A09CE0EED11,0x00003FFF // C10 +data8 0x9E2E6F86D1B1D89C,0x00003FFF // C20 +data8 0xBE6866B21CF6CCB5,0x00003FFF // C30 +data8 0xEE94426EC1486AAE,0x00003FFF // C40 +//[144; 145] +data8 0xF6113E09732A6497,0x00003FFF // C01 +data8 0xE900D45931B04FC8,0x00003FFF // C11 +data8 0xCE9FD58F745EBA5D,0x00003FFF // C21 +data8 0xA663A9636C864C86,0x00003FFF // C31 +data8 0xDEBF5315896CE629,0x00003FFE // C41 +data8 0xA05FEA415EBD7737,0x00003FFD // C51 +data8 0xC750F112BD9C4031,0x0000BFFD // C61 +data8 0xA2593A35C51C6F6C,0x0000BFFF // C71 +data8 0x9848E1DA7FB40C8C,0x0000C000 // C81 +data8 0xF59FEE87A5759A4B,0x0000C000 // C91 +data8 0xBF00203909E45A1D,0x0000C001 // CA1 +data8 0xF1D8E157200127E5,0x00003FFE // C00 +data8 0x81DD5397CB08D487,0x00003FFF // C10 +data8 0x94C1DC271A8B766F,0x00003FFF // C20 +data8 0xB3AFAF9B5D6EDDCF,0x00003FFF // C30 +data8 0xE1FB4C57CA81BE1E,0x00003FFF // C40 +//[160; 161] +data8 0xEEFFE5122AC72FFD,0x00003FFF // C01 +data8 0xE22F70BB52AD54B3,0x00003FFF // C11 +data8 0xC84FF021FE993EEA,0x00003FFF // C21 +data8 0xA0DA2208EB5B2752,0x00003FFF // C31 +data8 0xD5CDD2FCF8AD2DF5,0x00003FFE // C41 +data8 0x940BEC6DCD811A59,0x00003FFD // C51 +data8 0xCC954EF4FD4EBB81,0x0000BFFD // C61 +data8 0xA1712E29A8C04554,0x0000BFFF // C71 +data8 0x966B55DFB243521A,0x0000C000 // C81 +data8 0xF1E6A2B9CEDD0C4C,0x0000C000 // C91 +data8 0xBBC87BCC031012DB,0x0000C001 // CA1 +data8 0xE43974E6D2818583,0x00003FFE // C00 +data8 0xF5702A516B64C5B7,0x00003FFE // C10 +data8 0x8CEBCB1B32E19471,0x00003FFF // C20 +data8 0xAAC10F05BB77E0AF,0x00003FFF // C30 +data8 0xD776EFCAB205CC58,0x00003FFF // C40 +//[176; 177] +data8 0xE8DA614119811E5D,0x00003FFF // C01 +data8 0xDC415E0288B223D8,0x00003FFF // C11 +data8 0xC2D2243E44EC970E,0x00003FFF // C21 +data8 0x9C086664B5307BEA,0x00003FFF // C31 +data8 0xCE03D7A08B461156,0x00003FFE // C41 +data8 0x894BE3BAAAB66ADC,0x00003FFD // C51 +data8 0xD131EDD71A702D4D,0x0000BFFD // C61 +data8 0xA0A907CDDBE10898,0x0000BFFF // C71 +data8 0x94CC3CD9C765C808,0x0000C000 // C81 +data8 0xEEA85F237815FC0D,0x0000C000 // C91 +data8 0xB8FA04B023E43F91,0x0000C001 // CA1 +data8 0xD8B2C7D9FCBD7EF9,0x00003FFE // C00 +data8 0xE9566E93AAE7E38F,0x00003FFE // C10 +data8 0x8646E78AABEF0255,0x00003FFF // C20 +data8 0xA32AEDB62E304345,0x00003FFF // C30 +data8 0xCE83E40280EE7DF0,0x00003FFF // C40 +// +//[2; 3] +data8 0xC44FB47E90584083,0x00004001 // C50 +data8 0xE863EE77E1C45981,0x00004001 // C60 +data8 0x8AC15BE238B9D70E,0x00004002 // C70 +data8 0xA5D94B6592350EF4,0x00004002 // C80 +data8 0xC379DB3E20A148B3,0x00004002 // C90 +data8 0xDACA49B73974F6C9,0x00004002 // CA0 +data8 0x810E496A1AFEC895,0x00003FE1 // An +//[16; 17] +data8 0xE17C0357AAF3F817,0x00004001 // C50 +data8 0x8BA8804750FBFBFE,0x00004002 // C60 +data8 0xB18EAB3CB64BEBEE,0x00004002 // C70 +data8 0xE90AB7015AF1C28F,0x00004002 // C80 +data8 0xA0AB97CE9E259196,0x00004003 // C90 +data8 0xF5E0E0A000C2D720,0x00004003 // CA0 +data8 0xD97F0F87EC791954,0x00004005 // An +//[32; 33] +data8 0x980C293F3696040D,0x00004001 // C50 +data8 0xC0DBFFBB948A9A4E,0x00004001 // C60 +data8 0xFAB54625E9A588A2,0x00004001 // C70 +data8 0xA7E08176D6050FBF,0x00004002 // C80 +data8 0xEBAAEC4952270A9F,0x00004002 // C90 +data8 0xB7479CDAD20550FE,0x00004003 // CA0 +data8 0xAACD45931C3FF634,0x00004054 // An +//[48; 49] +data8 0xF5180F0000419AD5,0x00004000 // C50 +data8 0x9D507D07BFBB2273,0x00004001 // C60 +data8 0xCEB53F7A13A383E3,0x00004001 // C70 +data8 0x8BAFEF9E0A49128F,0x00004002 // C80 +data8 0xC58EF912D39E228C,0x00004002 // C90 +data8 0x9A88118422BA208E,0x00004003 // CA0 +data8 0xBD6C0E2477EC12CB,0x000040AC // An +//[64; 65] +data8 0xD410AC48BF7748DA,0x00004000 // C50 +data8 0x89399B90AFEBD931,0x00004001 // C60 +data8 0xB596DF8F77EB8560,0x00004001 // C70 +data8 0xF6D9445A047FB4A6,0x00004001 // C80 +data8 0xAF52F0DD65221357,0x00004002 // C90 +data8 0x8989B45BFC881989,0x00004003 // CA0 +data8 0xB7FCAE86E6E10D5A,0x0000410B // An +//[80; 81] +data8 0xBE759740E3B5AA84,0x00004000 // C50 +data8 0xF8037B1B07D27609,0x00004000 // C60 +data8 0xA4F6F6C7F0977D4F,0x00004001 // C70 +data8 0xE131960233BF02C4,0x00004001 // C80 +data8 0xA06DF43D3922BBE2,0x00004002 // C90 +data8 0xFC266AB27255A360,0x00004002 // CA0 +data8 0xD9F4B012EDAFEF2F,0x0000416F // An +//[96; 97] +data8 0xAEFC84CDA8E1EAA6,0x00004000 // C50 +data8 0xE5009110DB5F3C8A,0x00004000 // C60 +data8 0x98F5F48738E7B232,0x00004001 // C70 +data8 0xD17EE64E21FFDC6B,0x00004001 // C80 +data8 0x9596F7A7E36145CC,0x00004002 // C90 +data8 0xEB64DBE50E125CAF,0x00004002 // CA0 +data8 0xA090530D79E32D2E,0x000041D8 // An +//[112; 113] +data8 0xA33AEA22A16B2655,0x00004000 // C50 +data8 0xD682B93BD7D7945C,0x00004000 // C60 +data8 0x8FC854C6E6E30CC3,0x00004001 // C70 +data8 0xC5754D828AFFDC7A,0x00004001 // C80 +data8 0x8D41216B397139C2,0x00004002 // C90 +data8 0xDE78D746848116E5,0x00004002 // CA0 +data8 0xB8A297A2DC0630DB,0x00004244 // An +//[128; 129] +data8 0x99EB00F11D95E292,0x00004000 // C50 +data8 0xCB005CB911EB779A,0x00004000 // C60 +data8 0x8879AA2FDFF3A37A,0x00004001 // C70 +data8 0xBBDA538AD40CAC2C,0x00004001 // C80 +data8 0x8696D849D311B9DE,0x00004002 // C90 +data8 0xD41E1C041481199F,0x00004002 // CA0 +data8 0xEBA1A43D34EE61EE,0x000042B3 // An +//[144; 145] +data8 0x924F822578AA9F3D,0x00004000 // C50 +data8 0xC193FAF9D3B36960,0x00004000 // C60 +data8 0x827AE3A6B68ED0CA,0x00004001 // C70 +data8 0xB3F52A27EED23F0B,0x00004001 // C80 +data8 0x811A079FB3C94D79,0x00004002 // C90 +data8 0xCB94415470B6F8D2,0x00004002 // CA0 +data8 0x80A0260DCB3EC9AC,0x00004326 // An +//[160; 161] +data8 0x8BF24091E88B331D,0x00004000 // C50 +data8 0xB9ADE01187E65201,0x00004000 // C60 +data8 0xFAE4508F6E7625FE,0x00004000 // C70 +data8 0xAD516668AD6D7367,0x00004001 // C80 +data8 0xF8F5FF171154F637,0x00004001 // C90 +data8 0xC461321268990C82,0x00004002 // CA0 +data8 0xC3B693F344B0E6FE,0x0000439A // An +// +//[176; 177] +data8 0x868545EB42A258ED,0x00004000 // C50 +data8 0xB2EF04ACE8BA0E6E,0x00004000 // C60 +data8 0xF247D22C22E69230,0x00004000 // C70 +data8 0xA7A1AB93E3981A90,0x00004001 // C80 +data8 0xF10951733E2C697F,0x00004001 // C90 +data8 0xBE3359BFAD128322,0x00004002 // CA0 +data8 0x8000000000000000,0x00003fff +// +//[160; 161] for negatives +data8 0xA76DBD55B2E32D71,0x00003C63 // 1/An +// +// sin(pi*x)/pi +data8 0xBCBC4342112F52A2,0x00003FDE // S21 +data8 0xFAFCECB86536F655,0x0000BFE3 // S19 +data8 0x87E4C97F9CF09B92,0x00003FE9 // S17 +data8 0xEA124C68E704C5CB,0x0000BFED // S15 +data8 0x9BA38CFD59C8AA1D,0x00003FF2 // S13 +data8 0x99C0B552303D5B21,0x0000BFF6 // S11 +// +//[176; 177] for negatives +data8 0xBA5D5869211696FF,0x00003BEC // 1/An +// +// sin(pi*x)/pi +data8 0xD63402E79A853175,0x00003FF9 // S9 +data8 0xC354723906DB36BA,0x0000BFFC // S7 +data8 0xCFCE5A015E236291,0x00003FFE // S5 +data8 0xD28D3312983E9918,0x0000BFFF // S3 +// +// +// [1.0;1.25] +data8 0xA405530B067ECD3C,0x0000BFFC // A15 +data8 0xF5B5413F95E1C282,0x00003FFD // A14 +data8 0xC4DED71C782F76C8,0x0000BFFE // A13 +data8 0xECF7DDDFD27C9223,0x00003FFE // A12 +data8 0xFB73D31793068463,0x0000BFFE // A11 +data8 0xFF173B7E66FD1D61,0x00003FFE // A10 +data8 0xFFA5EF3959089E94,0x0000BFFE // A9 +data8 0xFF8153BD42E71A4F,0x00003FFE // A8 +data8 0xFEF9CAEE2CB5B533,0x0000BFFE // A7 +data8 0xFE3F02E5EDB6811E,0x00003FFE // A6 +data8 0xFB64074CED2658FB,0x0000BFFE // A5 +data8 0xFB52882A095B18A4,0x00003FFE // A4 +data8 0xE8508C7990A0DAC0,0x0000BFFE // A3 +data8 0xFD32C611D8A881D0,0x00003FFE // A2 +data8 0x93C467E37DB0C536,0x0000BFFE // A1 +data8 0x8000000000000000,0x00003FFF // A0 +// +// [1.25;1.5] +data8 0xD038092400619677,0x0000BFF7 // A15 +data8 0xEA6DE925E6EB8C8F,0x00003FF3 // A14 +data8 0xC53F83645D4597FC,0x0000BFF7 // A13 +data8 0xE366DB2FB27B7ECD,0x00003FF7 // A12 +data8 0xAC8FD5E11F6EEAD8,0x0000BFF8 // A11 +data8 0xFB14010FB3697785,0x00003FF8 // A10 +data8 0xB6F91CB5C371177B,0x0000BFF9 // A9 +data8 0x85A262C6F8FEEF71,0x00003FFA // A8 +data8 0xC038E6E3261568F9,0x0000BFFA // A7 +data8 0x8F4BDE8883232364,0x00003FFB // A6 +data8 0xBCFBBD5786537E9A,0x0000BFFB // A5 +data8 0xA4C08BAF0A559479,0x00003FFC // A4 +data8 0x85D74FA063E81476,0x0000BFFC // A3 +data8 0xDB629FB9BBDC1C4E,0x00003FFD // A2 +data8 0xF4F8FBC7C0C9D317,0x00003FC6 // A1 +data8 0xE2B6E4153A57746C,0x00003FFE // A0 +// +// [1.25;1.5] +data8 0x9533F9D3723B448C,0x0000BFF2 // A15 +data8 0xF1F75D3C561CBBAF,0x00003FF5 // A14 +data8 0xBA55A9A1FC883523,0x0000BFF8 // A13 +data8 0xB5D5E9E5104FA995,0x00003FFA // A12 +data8 0xFD84F35B70CD9AE2,0x0000BFFB // A11 +data8 0x87445235F4688CC5,0x00003FFD // A10 +data8 0xE7F236EBFB9F774E,0x0000BFFD // A9 +data8 0xA6605F2721F787CE,0x00003FFE // A8 +data8 0xCF579312AD7EAD72,0x0000BFFE // A7 +data8 0xE96254A2407A5EAC,0x00003FFE // A6 +data8 0xF41312A8572ED346,0x0000BFFE // A5 +data8 0xF9535027C1B1F795,0x00003FFE // A4 +data8 0xE7E82D0C613A8DE4,0x0000BFFE // A3 +data8 0xFD23CD9741B460B8,0x00003FFE // A2 +data8 0x93C30FD9781DBA88,0x0000BFFE // A1 +data8 0xFFFFF1781FDBEE84,0x00003FFE // A0 +LOCAL_OBJECT_END(tgamma_data) + + +//============================================================== +// Code +//============================================================== + +.section .text +GLOBAL_LIBM_ENTRY(tgamma) +{ .mfi + getf.exp GR_Sign_Exp = f8 + fma.s1 FR_1m2X = f8,f1,f8 // 2x + addl GR_ad_Data = @ltoff(tgamma_data), gp +} +{ .mfi + mov GR_ExpOf8 = 0x10002 // 8 + fcvt.fx.trunc.s1 FR_iXt = f8 // [x] + mov GR_ExpOf05 = 0xFFFE // 0.5 +};; +{ .mfi + getf.sig GR_Sig = f8 + fma.s1 FR_2 = f1,f1,f1 // 2 + mov GR_Addr_Mask1 = 0x780 +} +{ .mlx + setf.exp FR_8 = GR_ExpOf8 + movl GR_10 = 0x4024000000000000 +};; +{ .mfi + ld8 GR_ad_Data = [GR_ad_Data] + fcmp.lt.s1 p14,p15 = f8,f0 + tbit.z p12,p13 = GR_Sign_Exp,0x10 // p13 if x >= 2 +} +{ .mlx + and GR_Bit2 = 4,GR_Sign_Exp + movl GR_12 = 0x4028000000000000 +};; +{ .mfi + setf.d FR_10 = GR_10 + fma.s1 FR_r02 = f8,f1,f0 + extr.u GR_Tbl_Offs = GR_Sig,58,6 +} +{ .mfi +(p12) mov GR_Addr_Mask1 = r0 + fma.s1 FR_NormX = f8,f1,f0 + cmp.ne p8,p0 = GR_Bit2,r0 +};; +{ .mfi +(p8) shladd GR_Tbl_Offs = GR_Tbl_Offs,4,r0 + fclass.m p10,p0 = f8,0x1E7 // Test x for NaTVal, NaN, +/-0, +/-INF + tbit.nz p11,p0 = GR_Sign_Exp,1 +} +{ .mlx + add GR_Addr_Mask2 = GR_Addr_Mask1,GR_Addr_Mask1 + movl GR_14 = 0x402C000000000000 +};; +.pred.rel "mutex",p14,p15 +{ .mfi + setf.d FR_12 = GR_12 +(p14) fma.s1 FR_1m2X = f1,f1,FR_1m2X // RB=1-2|x| + tbit.nz p8,p9 = GR_Sign_Exp,0 +} +{ .mfi + ldfpd FR_OvfBound,FR_Xmin = [GR_ad_Data],16 +(p15) fms.s1 FR_1m2X = f1,f1,FR_1m2X // RB=1-2|x| +(p11) shladd GR_Tbl_Offs = GR_Tbl_Offs,2,r0 +};; +.pred.rel "mutex",p9,p8 +{ .mfi + setf.d FR_14 = GR_14 + fma.s1 FR_4 = FR_2,FR_2,f0 +(p8) and GR_Tbl_Offs = GR_Tbl_Offs, GR_Addr_Mask1 +} +{ .mfi + setf.exp FR_05 = GR_ExpOf05 + fma.s1 FR_6 = FR_2,FR_2,FR_2 +(p9) and GR_Tbl_Offs = GR_Tbl_Offs, GR_Addr_Mask2 +};; +.pred.rel "mutex",p9,p8 +{ .mfi +(p8) shladd GR_ad_Co = GR_Tbl_Offs,1,GR_ad_Data + fcvt.xf FR_Xt = FR_iXt // [x] +(p15) tbit.z.unc p11,p0 = GR_Sign_Exp,0x10 // p11 if 0 < x < 2 +} +{ .mfi +(p9) add GR_ad_Co = GR_ad_Data,GR_Tbl_Offs + fma.s1 FR_5 = FR_2,FR_2,f1 +(p15) cmp.lt.unc p7,p6 = GR_ExpOf05,GR_Sign_Exp // p7 if 0 < x < 1 +};; +{ .mfi + add GR_ad_Ce = 16,GR_ad_Co +(p11) frcpa.s1 FR_Rcp0,p0 = f1,f8 + sub GR_Tbl_Offs = GR_ad_Co,GR_ad_Data +} +{ .mfb + ldfe FR_C01 = [GR_ad_Co],32 +(p7) fms.s1 FR_r02 = FR_r02,f1,f1 + // jump if x is NaTVal, NaN, +/-0, +/-INF +(p10) br.cond.spnt tgamma_spec +};; +.pred.rel "mutex",p14,p15 +{ .mfi + ldfe FR_C11 = [GR_ad_Ce],32 +(p14) fms.s1 FR_X2pX = f8,f8,f8 // RA=x^2+|x| + shr GR_Tbl_Ind = GR_Tbl_Offs,8 +} +{ .mfb + ldfe FR_C21 = [GR_ad_Co],32 +(p15) fma.s1 FR_X2pX = f8,f8,f8 // RA=x^2+x + // jump if 0 < x < 2 +(p11) br.cond.spnt tgamma_from_0_to_2 +};; +{ .mfi + ldfe FR_C31 = [GR_ad_Ce],32 + fma.s1 FR_Rq2 = FR_2,f1,FR_1m2X // 2 + B + cmp.ltu p7,p0=0xB,GR_Tbl_Ind +} +{ .mfb + ldfe FR_C41 = [GR_ad_Co],32 + fma.s1 FR_Rq3 = FR_2,FR_2,FR_1m2X // 4 + B + // jump if GR_Tbl_Ind > 11, i.e |x| is more than 192 +(p7) br.cond.spnt tgamma_spec_res +};; +{ .mfi + ldfe FR_C51 = [GR_ad_Ce],32 + fma.s1 FR_Rq4 = FR_6,f1,FR_1m2X // 6 + B + shr GR_Tbl_Offs = GR_Tbl_Offs,1 +} +{ .mfi + ldfe FR_C61 = [GR_ad_Co],32 + fma.s1 FR_Rq5 = FR_4,FR_2,FR_1m2X // 8 + B + nop.i 0 +};; +{ .mfi + ldfe FR_C71 = [GR_ad_Ce],32 +(p14) fms.s1 FR_r = FR_Xt,f1,f8 // r = |x| - [|x|] + shr GR_Tbl_16xInd = GR_Tbl_Offs,3 +} +{ .mfi + ldfe FR_C81 = [GR_ad_Co],32 +(p15) fms.s1 FR_r = f8,f1,FR_Xt // r = x - [x] + add GR_ad_Data = 0xC00,GR_ad_Data +};; +{ .mfi + ldfe FR_C91 = [GR_ad_Ce],32 + fma.s1 FR_Rq6 = FR_5,FR_2,FR_1m2X // 10 + B +(p14) mov GR_0x30033 = 0x30033 +} +{ .mfi + ldfe FR_CA1 = [GR_ad_Co],32 + fma.s1 FR_Rq7 = FR_6,FR_2,FR_1m2X // 12 + B + sub GR_Tbl_Offs = GR_Tbl_Offs,GR_Tbl_16xInd +};; +{ .mfi + ldfe FR_C00 = [GR_ad_Ce],32 + fma.s1 FR_Rq1 = FR_Rq1,FR_2,FR_X2pX // (x-1)*(x-2) +(p13) cmp.eq.unc p8,p0 = r0,GR_Tbl_16xInd // index is 0 i.e. arg from [2;16) +} +{ .mfi + ldfe FR_C10 = [GR_ad_Co],32 +(p14) fms.s1 FR_AbsX = f0,f0,FR_NormX // absolute value of argument + add GR_ad_Co7 = GR_ad_Data,GR_Tbl_Offs +};; +{ .mfi + ldfe FR_C20 = [GR_ad_Ce],32 + fma.s1 FR_Rq2 = FR_Rq2,FR_4,FR_X2pX // (x-3)*(x-4) + add GR_ad_Ce7 = 16,GR_ad_Co7 +} +{ .mfi + ldfe FR_C30 = [GR_ad_Co],32 + fma.s1 FR_Rq3 = FR_Rq3,FR_6,FR_X2pX // (x-5)*(x-6) + nop.i 0 +};; +{ .mfi + ldfe FR_C40 = [GR_ad_Ce],32 + fma.s1 FR_Rq4 = FR_Rq4,FR_8,FR_X2pX // (x-7)*(x-8) +(p14) cmp.leu.unc p7,p0 = GR_0x30033,GR_Sign_Exp +} +{ .mfb + ldfe FR_C50 = [GR_ad_Co7],32 + fma.s1 FR_Rq5 = FR_Rq5,FR_10,FR_X2pX // (x-9)*(x-10) + // jump if x is less or equal to -2^52, i.e. x is big negative integer +(p7) br.cond.spnt tgamma_singularity +};; +{ .mfi + ldfe FR_C60 = [GR_ad_Ce7],32 + fma.s1 FR_C01 = FR_C01,f1,FR_r + add GR_ad_Ce = 0x560,GR_ad_Data +} +{ .mfi + ldfe FR_C70 = [GR_ad_Co7],32 + fma.s1 FR_rs = f0,f0,FR_r // reduced arg for sin(pi*x) + add GR_ad_Co = 0x550,GR_ad_Data +};; +{ .mfi + ldfe FR_C80 = [GR_ad_Ce7],32 + fma.s1 FR_C11 = FR_C11,f1,FR_r + nop.i 0 +} +{ .mfi + ldfe FR_C90 = [GR_ad_Co7],32 + fma.s1 FR_C21 = FR_C21,f1,FR_r + nop.i 0 +};; +.pred.rel "mutex",p12,p13 +{ .mfi +(p13) getf.sig GR_iSig = FR_iXt + fcmp.lt.s1 p11,p0 = FR_05,FR_r + mov GR_185 = 185 +} +{ .mfi + nop.m 0 + fma.s1 FR_Rq6 = FR_Rq6,FR_12,FR_X2pX // (x-11)*(x-12) + nop.i 0 +};; +{ .mfi + ldfe FR_CA0 = [GR_ad_Ce7],32 + fma.s1 FR_C31 = FR_C31,f1,FR_r +(p12) mov GR_iSig = 0 +} +{ .mfi + ldfe FR_An = [GR_ad_Co7],0x80 + fma.s1 FR_C41 = FR_C41,f1,FR_r + nop.i 0 +};; +{ .mfi +(p14) getf.sig GR_Sig = FR_r + fma.s1 FR_C51 = FR_C51,f1,FR_r +(p14) sub GR_iSig = r0,GR_iSig +} +{ .mfi + ldfe FR_S21 = [GR_ad_Co],32 + fma.s1 FR_C61 = FR_C61,f1,FR_r + nop.i 0 +};; +{ .mfi + ldfe FR_S19 = [GR_ad_Ce],32 + fma.s1 FR_C71 = FR_C71,f1,FR_r + and GR_SigRqLin = 0xF,GR_iSig +} +{ .mfi + ldfe FR_S17 = [GR_ad_Co],32 + fma.s1 FR_C81 = FR_C81,f1,FR_r + mov GR_2 = 2 +};; +{ .mfi +(p14) ldfe FR_InvAn = [GR_ad_Co7] + fma.s1 FR_C91 = FR_C91,f1,FR_r + // if significand of r is 0 tnan argument is negative integer +(p14) cmp.eq.unc p12,p0 = r0,GR_Sig +} +{ .mfb +(p8) sub GR_SigRqLin = GR_SigRqLin,GR_2 // subtract 2 if 2 <= x < 16 + fma.s1 FR_CA1 = FR_CA1,f1,FR_r + // jump if x is negative integer such that -2^52 < x < -185 +(p12) br.cond.spnt tgamma_singularity +};; +{ .mfi + setf.sig FR_Xt = GR_SigRqLin +(p11) fms.s1 FR_rs = f1,f1,FR_r +(p14) cmp.ltu.unc p7,p0 = GR_185,GR_iSig +} +{ .mfb + ldfe FR_S15 = [GR_ad_Ce],32 + fma.s1 FR_Rq7 = FR_Rq7,FR_14,FR_X2pX // (x-13)*(x-14) + // jump if x is noninteger such that -2^52 < x < -185 +(p7) br.cond.spnt tgamma_underflow +};; +{ .mfi + ldfe FR_S13 = [GR_ad_Co],48 + fma.s1 FR_C01 = FR_C01,FR_r,FR_C00 + and GR_Sig2 = 0xE,GR_SigRqLin +} +{ .mfi + ldfe FR_S11 = [GR_ad_Ce],48 + fma.s1 FR_C11 = FR_C11,FR_r,FR_C10 + nop.i 0 +};; +{ .mfi + ldfe FR_S9 = [GR_ad_Co],32 + fma.s1 FR_C21 = FR_C21,FR_r,FR_C20 + // should we mul by polynomial of recursion? + cmp.eq p13,p12 = r0,GR_SigRqLin +} +{ .mfi + ldfe FR_S7 = [GR_ad_Ce],32 + fma.s1 FR_C31 = FR_C31,FR_r,FR_C30 + nop.i 0 +};; +{ .mfi + ldfe FR_S5 = [GR_ad_Co],32 + fma.s1 FR_C41 = FR_C41,FR_r,FR_C40 + nop.i 0 +} +{ .mfi + ldfe FR_S3 = [GR_ad_Ce],32 + fma.s1 FR_C51 = FR_C51,FR_r,FR_C50 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_C61 = FR_C61,FR_r,FR_C60 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_C71 = FR_C71,FR_r,FR_C70 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_C81 = FR_C81,FR_r,FR_C80 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_C91 = FR_C91,FR_r,FR_C90 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_CA1 = FR_CA1,FR_r,FR_CA0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_C01 = FR_C01,FR_C11,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_C21 = FR_C21,FR_C31,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_rs2 = FR_rs,FR_rs,f0 +(p12) cmp.lt.unc p7,p0 = 2,GR_Sig2 // should mul by FR_Rq2? +};; +{ .mfi + nop.m 0 + fma.s1 FR_C41 = FR_C41,FR_C51,f0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p7) fma.s1 FR_Rq1 = FR_Rq1,FR_Rq2,f0 +(p12) cmp.lt.unc p9,p0 = 6,GR_Sig2 // should mul by FR_Rq4? +};; +{ .mfi + nop.m 0 + fma.s1 FR_C61 = FR_C61,FR_C71,f0 +(p15) cmp.eq p11,p0 = r0,r0 +} +{ .mfi + nop.m 0 +(p9) fma.s1 FR_Rq3 = FR_Rq3,FR_Rq4,f0 +(p12) cmp.lt.unc p8,p0 = 10,GR_Sig2 // should mul by FR_Rq6? +};; +{ .mfi + nop.m 0 + fma.s1 FR_C81 = FR_C81,FR_C91,f0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p8) fma.s1 FR_Rq5 = FR_Rq5,FR_Rq6,f0 +(p14) cmp.ltu p0,p11 = 0x9,GR_Tbl_Ind +};; +{ .mfi + nop.m 0 + fcvt.xf FR_RqLin = FR_Xt + nop.i 0 +} +{ .mfi + nop.m 0 +(p11) fma.s1 FR_CA1 = FR_CA1,FR_An,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_S21 = FR_S21,FR_rs2,FR_S19 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_S17 = FR_S17,FR_rs2,FR_S15 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_C01 = FR_C01,FR_C21,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_rs4 = FR_rs2,FR_rs2,f0 +(p12) cmp.lt.unc p8,p0 = 4,GR_Sig2 // should mul by FR_Rq3? +};; +{ .mfi + nop.m 0 +(p8) fma.s1 FR_Rq1 = FR_Rq1,FR_Rq3,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_S13 = FR_S13,FR_rs2,FR_S11 +(p12) cmp.lt.unc p9,p0 = 12,GR_Sig2 // should mul by FR_Rq7? +};; +{ .mfi + nop.m 0 + fma.s1 FR_C41 = FR_C41,FR_C61,f0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p9) fma.s1 FR_Rq5 = FR_Rq5,FR_Rq7,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_C81 = FR_C81,FR_CA1,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_S9 = FR_S9,FR_rs2,FR_S7 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_S5 = FR_S5,FR_rs2,FR_S3 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_rs3 = FR_rs2,FR_rs,f0 +(p12) tbit.nz.unc p6,p0 = GR_SigRqLin,0 +} +{ .mfi + nop.m 0 + fma.s1 FR_rs8 = FR_rs4,FR_rs4,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_S21 = FR_S21,FR_rs4,FR_S17 + mov GR_ExpOf1 = 0x2FFFF +} +{ .mfi + nop.m 0 +(p6) fms.s1 FR_RqLin = FR_AbsX,f1,FR_RqLin +(p12) cmp.lt.unc p8,p0 = 8,GR_Sig2 // should mul by FR_Rq5? +};; +{ .mfi + nop.m 0 + fma.s1 FR_C01 = FR_C01,FR_C41,f0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p8) fma.s1 FR_Rq1 = FR_Rq1,FR_Rq5,f0 +(p14) cmp.gtu.unc p7,p0 = GR_Sign_Exp,GR_ExpOf1 +};; +{ .mfi + nop.m 0 + fma.s1 FR_S13 = FR_S13,FR_rs4,FR_S9 + nop.i 0 +} +{ .mfi + nop.m 0 +(p7) fma.s1 FR_C81 = FR_C81,FR_AbsX,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p14) fma.s1 FR_AbsXp1 = f1,f1,FR_AbsX // |x|+1 + nop.i 0 +} +{ .mfi + nop.m 0 +(p15) fcmp.lt.unc.s1 p0,p10 = FR_AbsX,FR_OvfBound // x >= overflow_boundary + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_rs7 = FR_rs4,FR_rs3,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_S5 = FR_S5,FR_rs3,FR_rs + nop.i 0 +};; +{ .mib +(p14) cmp.lt p13,p0 = r0,r0 // set p13 to 0 if x < 0 +(p12) cmp.eq.unc p8,p9 = 1,GR_SigRqLin +(p10) br.cond.spnt tgamma_spec_res +};; +{ .mfi + getf.sig GR_Sig = FR_iXt +(p6) fma.s1 FR_Rq1 = FR_Rq1,FR_RqLin,f0 + // should we mul by polynomial of recursion? +(p15) cmp.eq.unc p0,p11 = r0,GR_SigRqLin +} +{ .mfb + nop.m 0 + fma.s1 FR_GAMMA = FR_C01,FR_C81,f0 +(p11) br.cond.spnt tgamma_positives +};; +{ .mfi + nop.m 0 + fma.s1 FR_S21 = FR_S21,FR_rs8,FR_S13 + nop.i 0 +} +{ .mfb + nop.m 0 +(p13) fma.d.s0 f8 = FR_C01,FR_C81,f0 +(p13) br.ret.spnt b0 +};; +.pred.rel "mutex",p8,p9 +{ .mfi + nop.m 0 +(p9) fma.s1 FR_GAMMA = FR_GAMMA,FR_Rq1,f0 + tbit.z p6,p7 = GR_Sig,0 // p6 if sin<0, p7 if sin>0 +} +{ .mfi + nop.m 0 +(p8) fma.s1 FR_GAMMA = FR_GAMMA,FR_RqLin,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_S21 = FR_S21,FR_rs7,FR_S5 + nop.i 0 +};; +.pred.rel "mutex",p6,p7 +{ .mfi + nop.m 0 +(p6) fnma.s1 FR_GAMMA = FR_GAMMA,FR_S21,f0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p7) fma.s1 FR_GAMMA = FR_GAMMA,FR_S21,f0 + mov GR_Sig2 = 1 +};; +{ .mfi + nop.m 0 + frcpa.s1 FR_Rcp0,p0 = f1,FR_GAMMA + cmp.ltu p13,p0 = GR_Sign_Exp,GR_ExpOf1 +};; +// NR method: ineration #1 +{ .mfi +(p13) getf.exp GR_Sign_Exp = FR_AbsX + fnma.s1 FR_Rcp1 = FR_Rcp0,FR_GAMMA,f1 // t = 1 - r0*x +(p13) shl GR_Sig2 = GR_Sig2,63 +};; +{ .mfi +(p13) getf.sig GR_Sig = FR_AbsX + nop.f 0 +(p13) mov GR_NzOvfBound = 0xFBFF +};; +{ .mfi +(p13) cmp.ltu.unc p8,p0 = GR_Sign_Exp,GR_NzOvfBound // p8 <- overflow + nop.f 0 +(p13) cmp.eq.unc p9,p0 = GR_Sign_Exp,GR_NzOvfBound +};; +{ .mfb + nop.m 0 +(p13) fma.d.s0 FR_X = f1,f1,f8 // set deno & inexact flags +(p8) br.cond.spnt tgamma_ovf_near_0 //tgamma_neg_overflow +};; +{ .mib + nop.m 0 +(p9) cmp.eq.unc p8,p0 = GR_Sig,GR_Sig2 +(p8) br.cond.spnt tgamma_ovf_near_0_boundary //tgamma_neg_overflow +};; +{ .mfi + nop.m 0 + fma.s1 FR_Rcp1 = FR_Rcp0,FR_Rcp1,FR_Rcp0 + nop.i 0 +};; +// NR method: ineration #2 +{ .mfi + nop.m 0 + fnma.s1 FR_Rcp2 = FR_Rcp1,FR_GAMMA,f1 // t = 1 - r1*x + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_Rcp2 = FR_Rcp1,FR_Rcp2,FR_Rcp1 + nop.i 0 +};; +// NR method: ineration #3 +{ .mfi + nop.m 0 + fnma.s1 FR_Rcp3 = FR_Rcp2,FR_GAMMA,f1 // t = 1 - r2*x + nop.i 0 +} +{ .mfi + nop.m 0 +(p13) fma.s1 FR_Rcp2 = FR_Rcp2,FR_AbsXp1,f0 +(p14) cmp.ltu p10,p11 = 0x9,GR_Tbl_Ind +};; +.pred.rel "mutex",p10,p11 +{ .mfi + nop.m 0 +(p10) fma.s1 FR_GAMMA = FR_Rcp2,FR_Rcp3,FR_Rcp2 + nop.i 0 +} +{ .mfi + nop.m 0 +(p11) fma.d.s0 f8 = FR_Rcp2,FR_Rcp3,FR_Rcp2 + nop.i 0 +};; +{ .mfb + nop.m 0 +(p10) fma.d.s0 f8 = FR_GAMMA,FR_InvAn,f0 + br.ret.sptk b0 +};; + + +// here if x >= 3 +//-------------------------------------------------------------------- +.align 32 +tgamma_positives: +.pred.rel "mutex",p8,p9 +{ .mfi + nop.m 0 +(p9) fma.d.s0 f8 = FR_GAMMA,FR_Rq1,f0 + nop.i 0 +} +{ .mfb + nop.m 0 +(p8) fma.d.s0 f8 = FR_GAMMA,FR_RqLin,f0 + br.ret.sptk b0 +};; + +// here if 0 < x < 1 +//-------------------------------------------------------------------- +.align 32 +tgamma_from_0_to_2: +{ .mfi + getf.exp GR_Sign_Exp = FR_r02 + fms.s1 FR_r = FR_r02,f1,FR_Xmin + mov GR_ExpOf025 = 0xFFFD +} +{ .mfi + add GR_ad_Co = 0x1200,GR_ad_Data +(p6) fnma.s1 FR_Rcp1 = FR_Rcp0,FR_NormX,f1 // t = 1 - r0*x +(p6) mov GR_Sig2 = 1 +};; +{ .mfi +(p6) getf.sig GR_Sig = FR_NormX + nop.f 0 +(p6) shl GR_Sig2 = GR_Sig2,63 +} +{ .mfi + add GR_ad_Ce = 0x1210,GR_ad_Data + nop.f 0 +(p6) mov GR_NzOvfBound = 0xFBFF +};; +{ .mfi + cmp.eq p8,p0 = GR_Sign_Exp,GR_ExpOf05 // r02 >= 1/2 + nop.f 0 + cmp.eq p9,p10 = GR_Sign_Exp,GR_ExpOf025 // r02 >= 1/4 +} +{ .mfi +(p6) cmp.ltu.unc p11,p0 = GR_Sign_Exp,GR_NzOvfBound // p11 <- overflow + nop.f 0 +(p6) cmp.eq.unc p12,p0 = GR_Sign_Exp,GR_NzOvfBound +};; +.pred.rel "mutex",p8,p9 +{ .mfi +(p8) add GR_ad_Co = 0x200,GR_ad_Co +(p6) fma.d.s0 FR_X = f1,f1,f8 // set deno & inexact flags +(p9) add GR_ad_Co = 0x100,GR_ad_Co +} +{ .mib +(p8) add GR_ad_Ce = 0x200,GR_ad_Ce +(p9) add GR_ad_Ce = 0x100,GR_ad_Ce +(p11) br.cond.spnt tgamma_ovf_near_0 //tgamma_spec_res +};; +{ .mfi + ldfe FR_A15 = [GR_ad_Co],32 + nop.f 0 +(p12) cmp.eq.unc p13,p0 = GR_Sig,GR_Sig2 +} +{ .mfb + ldfe FR_A14 = [GR_ad_Ce],32 + nop.f 0 +(p13) br.cond.spnt tgamma_ovf_near_0_boundary //tgamma_spec_res +};; +{ .mfi + ldfe FR_A13 = [GR_ad_Co],32 + nop.f 0 + nop.i 0 +} +{ .mfi + ldfe FR_A12 = [GR_ad_Ce],32 + nop.f 0 + nop.i 0 +};; +.pred.rel "mutex",p9,p10 +{ .mfi + ldfe FR_A11 = [GR_ad_Co],32 +(p10) fma.s1 FR_r2 = FR_r02,FR_r02,f0 + nop.i 0 +} +{ .mfi + ldfe FR_A10 = [GR_ad_Ce],32 +(p9) fma.s1 FR_r2 = FR_r,FR_r,f0 + nop.i 0 +};; +{ .mfi + ldfe FR_A9 = [GR_ad_Co],32 +(p6) fma.s1 FR_Rcp1 = FR_Rcp0,FR_Rcp1,FR_Rcp0 + nop.i 0 +} +{ .mfi + ldfe FR_A8 = [GR_ad_Ce],32 +(p10) fma.s1 FR_r = f0,f0,FR_r02 + nop.i 0 +};; +{ .mfi + ldfe FR_A7 = [GR_ad_Co],32 + nop.f 0 + nop.i 0 +} +{ .mfi + ldfe FR_A6 = [GR_ad_Ce],32 + nop.f 0 + nop.i 0 +};; +{ .mfi + ldfe FR_A5 = [GR_ad_Co],32 + nop.f 0 + nop.i 0 +} +{ .mfi + ldfe FR_A4 = [GR_ad_Ce],32 + nop.f 0 + nop.i 0 +};; +{ .mfi + ldfe FR_A3 = [GR_ad_Co],32 + nop.f 0 + nop.i 0 +} +{ .mfi + ldfe FR_A2 = [GR_ad_Ce],32 + nop.f 0 + nop.i 0 +};; +{ .mfi + ldfe FR_A1 = [GR_ad_Co],32 + fma.s1 FR_r4 = FR_r2,FR_r2,f0 + nop.i 0 +} +{ .mfi + ldfe FR_A0 = [GR_ad_Ce],32 + nop.f 0 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p6) fnma.s1 FR_Rcp2 = FR_Rcp1,FR_NormX,f1 // t = 1 - r1*x + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A15 = FR_A15,FR_r,FR_A14 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_A11 = FR_A11,FR_r,FR_A10 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_r8 = FR_r4,FR_r4,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p6) fma.s1 FR_Rcp2 = FR_Rcp1,FR_Rcp2,FR_Rcp1 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A7 = FR_A7,FR_r,FR_A6 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_A3 = FR_A3,FR_r,FR_A2 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A15 = FR_A15,FR_r,FR_A13 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_A11 = FR_A11,FR_r,FR_A9 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p6) fnma.s1 FR_Rcp3 = FR_Rcp2,FR_NormX,f1 // t = 1 - r1*x + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A7 = FR_A7,FR_r,FR_A5 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_A3 = FR_A3,FR_r,FR_A1 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A15 = FR_A15,FR_r,FR_A12 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_A11 = FR_A11,FR_r,FR_A8 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p6) fma.s1 FR_Rcp3 = FR_Rcp2,FR_Rcp3,FR_Rcp2 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A7 = FR_A7,FR_r,FR_A4 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_A3 = FR_A3,FR_r,FR_A0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A15 = FR_A15,FR_r4,FR_A11 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_A7 = FR_A7,FR_r4,FR_A3 + nop.i 0 +};; +.pred.rel "mutex",p6,p7 +{ .mfi + nop.m 0 +(p6) fma.s1 FR_A15 = FR_A15,FR_r8,FR_A7 + nop.i 0 +} +{ .mfi + nop.m 0 +(p7) fma.d.s0 f8 = FR_A15,FR_r8,FR_A7 + nop.i 0 +};; +{ .mfb + nop.m 0 +(p6) fma.d.s0 f8 = FR_A15,FR_Rcp3,f0 + br.ret.sptk b0 +};; + +// overflow +//-------------------------------------------------------------------- +.align 32 +tgamma_ovf_near_0_boundary: +.pred.rel "mutex",p14,p15 +{ .mfi + mov GR_fpsr = ar.fpsr + nop.f 0 +(p15) mov r8 = 0x7ff +} +{ .mfi + nop.m 0 + nop.f 0 +(p14) mov r8 = 0xfff +};; +{ .mfi + nop.m 0 + nop.f 0 + shl r8 = r8,52 +};; +{ .mfi + sub r8 = r8,r0,1 + nop.f 0 + extr.u GR_fpsr = GR_fpsr,10,2 // rounding mode +};; +.pred.rel "mutex",p14,p15 +{ .mfi + // set p8 to 0 in case of overflow and to 1 otherwise + // for negative arg: + // no overflow if rounding mode either Z or +Inf, i.e. + // GR_fpsr > 1 +(p14) cmp.lt p8,p0 = 1,GR_fpsr + nop.f 0 + // for positive arg: + // no overflow if rounding mode either Z or -Inf, i.e. + // (GR_fpsr & 1) == 0 +(p15) tbit.z p0,p8 = GR_fpsr,0 +};; +{ .mib +(p8) setf.d f8 = r8 // set result to 0x7fefffffffffffff without + // OVERFLOW flag raising + nop.i 0 +(p8) br.ret.sptk b0 +};; +.align 32 +tgamma_ovf_near_0: +{ .mfi + mov r8 = 0x1FFFE + nop.f 0 + nop.i 0 +};; +{ .mfi + setf.exp f9 = r8 + fmerge.s FR_X = f8,f8 + mov GR_TAG = 258 // overflow +};; +.pred.rel "mutex",p14,p15 +{ .mfi + nop.m 0 +(p15) fma.d.s0 f8 = f9,f9,f0 // Set I,O and +INF result + nop.i 0 +} +{ .mfb + nop.m 0 +(p14) fnma.d.s0 f8 = f9,f9,f0 // Set I,O and -INF result + br.cond.sptk tgamma_libm_err +};; +// overflow or absolute value of x is too big +//-------------------------------------------------------------------- +.align 32 +tgamma_spec_res: +{ .mfi + mov GR_0x30033 = 0x30033 +(p14) fcmp.eq.unc.s1 p10,p11 = f8,FR_Xt +(p15) mov r8 = 0x1FFFE +};; +{ .mfi +(p15) setf.exp f9 = r8 + nop.f 0 + nop.i 0 +};; +{ .mfb +(p11) cmp.ltu.unc p7,p8 = GR_0x30033,GR_Sign_Exp + nop.f 0 +(p10) br.cond.spnt tgamma_singularity +};; +.pred.rel "mutex",p7,p8 +{ .mbb + nop.m 0 +(p7) br.cond.spnt tgamma_singularity +(p8) br.cond.spnt tgamma_underflow +};; +{ .mfi + nop.m 0 + fmerge.s FR_X = f8,f8 + mov GR_TAG = 258 // overflow +} +{ .mfb + nop.m 0 +(p15) fma.d.s0 f8 = f9,f9,f0 // Set I,O and +INF result + br.cond.sptk tgamma_libm_err +};; + +// x is negative integer or +/-0 +//-------------------------------------------------------------------- +.align 32 +tgamma_singularity: +{ .mfi + nop.m 0 + fmerge.s FR_X = f8,f8 + mov GR_TAG = 259 // negative +} +{ .mfb + nop.m 0 + frcpa.s0 f8,p0 = f0,f0 + br.cond.sptk tgamma_libm_err +};; +// x is negative noninteger with big absolute value +//-------------------------------------------------------------------- +.align 32 +tgamma_underflow: +{ .mmi + getf.sig GR_Sig = FR_iXt + mov r11 = 0x00001 + nop.i 0 +};; +{ .mfi + setf.exp f9 = r11 + nop.f 0 + nop.i 0 +};; +{ .mfi + nop.m 0 + nop.f 0 + tbit.z p6,p7 = GR_Sig,0 +};; +.pred.rel "mutex",p6,p7 +{ .mfi + nop.m 0 +(p6) fms.d.s0 f8 = f9,f9,f9 + nop.i 0 +} +{ .mfb + nop.m 0 +(p7) fma.d.s0 f8 = f9,f9,f9 + br.ret.sptk b0 +};; + +// x for natval, nan, +/-inf or +/-0 +//-------------------------------------------------------------------- +.align 32 +tgamma_spec: +{ .mfi + nop.m 0 + fclass.m p6,p0 = f8,0x1E1 // Test x for natval, nan, +inf + nop.i 0 +};; +{ .mfi + nop.m 0 + fclass.m p7,p8 = f8,0x7 // +/-0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fmerge.s FR_X = f8,f8 + nop.i 0 +} +{ .mfb + nop.m 0 +(p6) fma.d.s0 f8 = f8,f1,f8 +(p6) br.ret.spnt b0 +};; +.pred.rel "mutex",p7,p8 +{ .mfi +(p7) mov GR_TAG = 259 // negative +(p7) frcpa.s0 f8,p0 = f1,f8 + nop.i 0 +} +{ .mib + nop.m 0 + nop.i 0 +(p8) br.cond.spnt tgamma_singularity +};; + +.align 32 +tgamma_libm_err: +{ .mfi + alloc r32 = ar.pfs,1,4,4,0 + nop.f 0 + mov GR_Parameter_TAG = GR_TAG +};; + +GLOBAL_LIBM_END(tgamma) + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfd [GR_Parameter_Y] = FR_Y,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; +.body +{ .mib + stfd [GR_Parameter_X] = FR_X // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfd [GR_Parameter_Y] = FR_RESULT // STORE Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + nop.m 0 + nop.m 0 + add GR_Parameter_RESULT = 48,sp +};; +{ .mmi + ldfd f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) +.type __libm_error_support#,@function +.global __libm_error_support# + diff --git a/sysdeps/ia64/fpu/w_tgammaf.S b/sysdeps/ia64/fpu/w_tgammaf.S new file mode 100644 index 0000000000..dda0d0fe9d --- /dev/null +++ b/sysdeps/ia64/fpu/w_tgammaf.S @@ -0,0 +1,1331 @@ +.file "tgammaf.s" + + +// Copyright (c) 2001 - 2005, Intel Corporation +// All rights reserved. +// +// Contributed 2001 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,INCLUDING,BUT NOT +// LIMITED TO,THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT,INDIRECT,INCIDENTAL,SPECIAL, +// EXEMPLARY,OR CONSEQUENTIAL DAMAGES (INCLUDING,BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,DATA,OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY,WHETHER IN CONTRACT,STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE,EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code,and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +//********************************************************************* +// +// History: +// 11/30/01 Initial version +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align +// 04/04/03 Changed error codes for overflow and negative integers +// 04/10/03 Changed code for overflow near zero handling +// 12/16/03 Fixed parameter passing to/from error handling routine +// 03/31/05 Reformatted delimiters between data tables +// +//********************************************************************* +// +//********************************************************************* +// +// Function: tgammaf(x) computes the principle value of the GAMMA +// function of x. +// +//********************************************************************* +// +// Resources Used: +// +// Floating-Point Registers: f8-f15 +// f33-f75 +// +// General Purpose Registers: +// r8-r11 +// r14-r29 +// r32-r36 +// r37-r40 (Used to pass arguments to error handling routine) +// +// Predicate Registers: p6-p15 +// +//********************************************************************* +// +// IEEE Special Conditions: +// +// tgammaf(+inf) = +inf +// tgammaf(-inf) = QNaN +// tgammaf(+/-0) = +/-inf +// tgammaf(x<0, x - integer) = QNaN +// tgammaf(SNaN) = QNaN +// tgammaf(QNaN) = QNaN +// +//********************************************************************* +// +// Overview +// +// The method consists of three cases. +// +// If 2 <= x < OVERFLOW_BOUNDARY use case tgamma_regular; +// else if 0 < x < 2 use case tgamma_from_0_to_2; +// else if -(i+1) < x < -i, i = 0...43 use case tgamma_negatives; +// +// Case 2 <= x < OVERFLOW_BOUNDARY +// ------------------------------- +// Here we use algorithm based on the recursive formula +// GAMMA(x+1) = x*GAMMA(x). For that we subdivide interval +// [2; OVERFLOW_BOUNDARY] into intervals [8*n; 8*(n+1)] and +// approximate GAMMA(x) by polynomial of 22th degree on each +// [8*n; 8*n+1], recursive formula is used to expand GAMMA(x) +// to [8*n; 8*n+1]. In other words we need to find n, i and r +// such that x = 8 * n + i + r where n and i are integer numbers +// and r is fractional part of x. So GAMMA(x) = GAMMA(8*n+i+r) = +// = (x-1)*(x-2)*...*(x-i)*GAMMA(x-i) = +// = (x-1)*(x-2)*...*(x-i)*GAMMA(8*n+r) ~ +// ~ (x-1)*(x-2)*...*(x-i)*P12n(r). +// +// Step 1: Reduction +// ----------------- +// N = [x] with truncate +// r = x - N, note 0 <= r < 1 +// +// n = N & ~0xF - index of table that contains coefficient of +// polynomial approximation +// i = N & 0xF - is used in recursive formula +// +// +// Step 2: Approximation +// --------------------- +// We use factorized minimax approximation polynomials +// P12n(r) = A12*(r^2+C01(n)*r+C00(n))* +// *(r^2+C11(n)*r+C10(n))*...*(r^2+C51(n)*r+C50(n)) +// +// Step 3: Recursion +// ----------------- +// In case when i > 0 we need to multiply P12n(r) by product +// R(i,x)=(x-1)*(x-2)*...*(x-i). To reduce number of fp-instructions +// we can calculate R as follow: +// R(i,x) = ((x-1)*(x-2))*((x-3)*(x-4))*...*((x-(i-1))*(x-i)) if i is +// even or R = ((x-1)*(x-2))*((x-3)*(x-4))*...*((x-(i-2))*(x-(i-1)))* +// *(i-1) if i is odd. In both cases we need to calculate +// R2(i,x) = (x^2-3*x+2)*(x^2-7*x+12)*...*(x^2+x+2*j*(2*j-1)) = +// = ((x^2-x)+2*(1-x))*((x^2-x)+6*(2-x))*...*((x^2-x)+2*(2*j-1)*(j-x)) = +// = (RA+2*RB)*(RA+6*(1-RB))*...*(RA+2*(2*j-1)*(j-1+RB)) +// where j = 1..[i/2], RA = x^2-x, RB = 1-x. +// +// Step 4: Reconstruction +// ---------------------- +// Reconstruction is just simple multiplication i.e. +// GAMMA(x) = P12n(r)*R(i,x) +// +// Case 0 < x < 2 +// -------------- +// To calculate GAMMA(x) on this interval we do following +// if 1.0 <= x < 1.25 than GAMMA(x) = P7(x-1) +// if 1.25 <= x < 1.5 than GAMMA(x) = P7(x-x_min) where +// x_min is point of local minimum on [1; 2] interval. +// if 1.5 <= x < 1.75 than GAMMA(x) = P7(x-1.5) +// if 1.75 <= x < 2.0 than GAMMA(x) = P7(x-1.5) +// and +// if 0 < x < 1 than GAMMA(x) = GAMMA(x+1)/x +// +// Case -(i+1) < x < -i, i = 0...43 +// ---------------------------------- +// Here we use the fact that GAMMA(-x) = PI/(x*GAMMA(x)*sin(PI*x)) and +// so we need to calculate GAMMA(x), sin(PI*x)/PI. Calculation of +// GAMMA(x) is described above. +// +// Step 1: Reduction +// ----------------- +// Note that period of sin(PI*x) is 2 and range reduction for +// sin(PI*x) is like to range reduction for GAMMA(x) +// i.e rs = x - round(x) and |rs| <= 0.5. +// +// Step 2: Approximation +// --------------------- +// To approximate sin(PI*x)/PI = sin(PI*(2*n+rs))/PI = +// = (-1)^n*sin(PI*rs)/PI Taylor series is used. +// sin(PI*rs)/PI ~ S17(rs). +// +// Step 3: Division +// ---------------- +// To calculate 1/x and 1/(GAMMA(x)*S12(rs)) we use frcpa +// instruction with following Newton-Raphson interations. +// +// +//********************************************************************* + +GR_ad_Data = r8 +GR_TAG = r8 +GR_SignExp = r9 +GR_Sig = r10 +GR_ArgNz = r10 +GR_RqDeg = r11 + +GR_NanBound = r14 +GR_ExpOf025 = r15 +GR_ExpOf05 = r16 +GR_ad_Co = r17 +GR_ad_Ce = r18 +GR_TblOffs = r19 +GR_Arg = r20 +GR_Exp2Ind = r21 +GR_TblOffsMask = r21 +GR_Offs = r22 +GR_OvfNzBound = r23 +GR_ZeroResBound = r24 +GR_ad_SinO = r25 +GR_ad_SinE = r26 +GR_Correction = r27 +GR_Tbl12Offs = r28 +GR_NzBound = r28 +GR_ExpOf1 = r29 +GR_fpsr = r29 + +GR_SAVE_B0 = r33 +GR_SAVE_PFS = r34 +GR_SAVE_GP = r35 +GR_SAVE_SP = r36 + +GR_Parameter_X = r37 +GR_Parameter_Y = r38 +GR_Parameter_RESULT = r39 +GR_Parameter_TAG = r40 + + +FR_X = f10 +FR_Y = f1 +FR_RESULT = f8 + +FR_iXt = f11 +FR_Xt = f12 +FR_r = f13 +FR_r2 = f14 +FR_r4 = f15 + +FR_C01 = f33 +FR_A7 = f33 +FR_C11 = f34 +FR_A6 = f34 +FR_C21 = f35 +FR_A5 = f35 +FR_C31 = f36 +FR_A4 = f36 +FR_C41 = f37 +FR_A3 = f37 +FR_C51 = f38 +FR_A2 = f38 + +FR_C00 = f39 +FR_A1 = f39 +FR_C10 = f40 +FR_A0 = f40 +FR_C20 = f41 +FR_C30 = f42 +FR_C40 = f43 +FR_C50 = f44 +FR_An = f45 +FR_OvfBound = f46 +FR_InvAn = f47 + +FR_Multplr = f48 +FR_NormX = f49 +FR_X2mX = f50 +FR_1mX = f51 +FR_Rq0 = f51 +FR_Rq1 = f52 +FR_Rq2 = f53 +FR_Rq3 = f54 + +FR_Rcp0 = f55 +FR_Rcp1 = f56 +FR_Rcp2 = f57 + +FR_InvNormX1 = f58 +FR_InvNormX2 = f59 + +FR_rs = f60 +FR_rs2 = f61 + +FR_LocalMin = f62 +FR_10 = f63 + +FR_05 = f64 + +FR_S32 = f65 +FR_S31 = f66 +FR_S01 = f67 +FR_S11 = f68 +FR_S21 = f69 +FR_S00 = f70 +FR_S10 = f71 +FR_S20 = f72 + +FR_GAMMA = f73 +FR_2 = f74 +FR_6 = f75 + + + + +// Data tables +//============================================================== +RODATA +.align 16 +LOCAL_OBJECT_START(tgammaf_data) +data8 0x3FDD8B618D5AF8FE // local minimum (0.461632144968362356785) +data8 0x4024000000000000 // 10.0 +data8 0x3E90FC992FF39E13 // S32 +data8 0xBEC144B2760626E2 // S31 +// +//[2; 8) +data8 0x4009EFD1BA0CB3B4 // C01 +data8 0x3FFFB35378FF4822 // C11 +data8 0xC01032270413B896 // C41 +data8 0xC01F171A4C0D6827 // C51 +data8 0x40148F8E197396AC // C20 +data8 0x401C601959F1249C // C30 +data8 0x3EE21AD881741977 // An +data8 0x4041852200000000 // overflow boundary (35.04010009765625) +data8 0x3FD9CE68F695B198 // C21 +data8 0xBFF8C30AC900DA03 // C31 +data8 0x400E17D2F0535C02 // C00 +data8 0x4010689240F7FAC8 // C10 +data8 0x402563147DDCCF8D // C40 +data8 0x4033406D0480A21C // C50 +// +//[8; 16) +data8 0x4006222BAE0B793B // C01 +data8 0x4002452733473EDA // C11 +data8 0xC0010EF3326FDDB3 // C41 +data8 0xC01492B817F99C0F // C51 +data8 0x40099C905A249B75 // C20 +data8 0x4012B972AE0E533D // C30 +data8 0x3FE6F6DB91D0D4CC // An +data8 0x4041852200000000 // overflow boundary +data8 0x3FF545828F7B73C5 // C21 +data8 0xBFBBD210578764DF // C31 +data8 0x4000542098F53CFC // C00 +data8 0x40032C1309AD6C81 // C10 +data8 0x401D7331E19BD2E1 // C40 +data8 0x402A06807295EF57 // C50 +// +//[16; 24) +data8 0x4000131002867596 // C01 +data8 0x3FFAA362D5D1B6F2 // C11 +data8 0xBFFCB6985697DB6D // C41 +data8 0xC0115BEE3BFC3B3B // C51 +data8 0x3FFE62FF83456F73 // C20 +data8 0x4007E33478A114C4 // C30 +data8 0x41E9B2B73795ED57 // An +data8 0x4041852200000000 // overflow boundary +data8 0x3FEEB1F345BC2769 // C21 +data8 0xBFC3BBE6E7F3316F // C31 +data8 0x3FF14E07DA5E9983 // C00 +data8 0x3FF53B76BF81E2C0 // C10 +data8 0x4014051E0269A3DC // C40 +data8 0x40229D4227468EDB // C50 +// +//[24; 32) +data8 0x3FFAF7BD498384DE // C01 +data8 0x3FF62AD8B4D1C3D2 // C11 +data8 0xBFFABCADCD004C32 // C41 +data8 0xC00FADE97C097EC9 // C51 +data8 0x3FF6DA9ED737707E // C20 +data8 0x4002A29E9E0C782C // C30 +data8 0x44329D5B5167C6C3 // An +data8 0x4041852200000000 // overflow boundary +data8 0x3FE8943CBBB4B727 // C21 +data8 0xBFCB39D466E11756 // C31 +data8 0x3FE879AF3243D8C1 // C00 +data8 0x3FEEC7DEBB14CE1E // C10 +data8 0x401017B79BA80BCB // C40 +data8 0x401E941DC3C4DE80 // C50 +// +//[32; 40) +data8 0x3FF7ECB3A0E8FE5C // C01 +data8 0x3FF3815A8516316B // C11 +data8 0xBFF9ABD8FCC000C3 // C41 +data8 0xC00DD89969A4195B // C51 +data8 0x3FF2E43139CBF563 // C20 +data8 0x3FFF96DC3474A606 // C30 +data8 0x46AFF4CA9B0DDDF0 // An +data8 0x4041852200000000 // overflow boundary +data8 0x3FE4CE76DA1B5783 // C21 +data8 0xBFD0524DB460BC4E // C31 +data8 0x3FE35852DF14E200 // C00 +data8 0x3FE8C7610359F642 // C10 +data8 0x400BCF750EC16173 // C40 +data8 0x401AC14E02EA701C // C50 +// +//[40; 48) +data8 0x3FF5DCE4D8193097 // C01 +data8 0x3FF1B0D8C4974FFA // C11 +data8 0xBFF8FB450194CAEA // C41 +data8 0xC00C9658E030A6C4 // C51 +data8 0x3FF068851118AB46 // C20 +data8 0x3FFBF7C7BB46BF7D // C30 +data8 0x3FF0000000000000 // An +data8 0x4041852200000000 // overflow boundary +data8 0x3FE231DEB11D847A // C21 +data8 0xBFD251ECAFD7E935 // C31 +data8 0x3FE0368AE288F6BF // C00 +data8 0x3FE513AE4215A70C // C10 +data8 0x4008F960F7141B8B // C40 +data8 0x40183BA08134397B // C50 +// +//[1.0; 1.25) +data8 0xBFD9909648921868 // A7 +data8 0x3FE96FFEEEA8520F // A6 +data8 0xBFED0800D93449B8 // A3 +data8 0x3FEFA648D144911C // A2 +data8 0xBFEE3720F7720B4D // A5 +data8 0x3FEF4857A010CA3B // A4 +data8 0xBFE2788CCD545AA4 // A1 +data8 0x3FEFFFFFFFE9209E // A0 +// +//[1.25; 1.5) +data8 0xBFB421236426936C // A7 +data8 0x3FAF237514F36691 // A6 +data8 0xBFC0BADE710A10B9 // A3 +data8 0x3FDB6C5465BBEF1F // A2 +data8 0xBFB7E7F83A546EBE // A5 +data8 0x3FC496A01A545163 // A4 +data8 0xBDEE86A39D8452EB // A1 +data8 0x3FEC56DC82A39AA2 // A0 +// +//[1.5; 1.75) +data8 0xBF94730B51795867 // A7 +data8 0x3FBF4203E3816C7B // A6 +data8 0xBFE85B427DBD23E4 // A3 +data8 0x3FEE65557AB26771 // A2 +data8 0xBFD59D31BE3AB42A // A5 +data8 0x3FE3C90CC8F09147 // A4 +data8 0xBFE245971DF735B8 // A1 +data8 0x3FEFFC613AE7FBC8 // A0 +// +//[1.75; 2.0) +data8 0xBF7746A85137617E // A7 +data8 0x3FA96E37D09735F3 // A6 +data8 0xBFE3C24AC40AC0BB // A3 +data8 0x3FEC56A80A977CA5 // A2 +data8 0xBFC6F0E707560916 // A5 +data8 0x3FDB262D949175BE // A4 +data8 0xBFE1C1AEDFB25495 // A1 +data8 0x3FEFEE1E644B2022 // A0 +// +// sin(pi*x)/pi +data8 0xC026FB0D377656CC // S01 +data8 0x3FFFB15F95A22324 // S11 +data8 0x406CE58F4A41C6E7 // S10 +data8 0x404453786302C61E // S20 +data8 0xC023D59A47DBFCD3 // S21 +data8 0x405541D7ABECEFCA // S00 +// +// 1/An for [40; 48) +data8 0xCAA7576DE621FCD5, 0x3F68 +LOCAL_OBJECT_END(tgammaf_data) + +//============================================================== +// Code +//============================================================== + +.section .text +GLOBAL_LIBM_ENTRY(tgammaf) +{ .mfi + getf.exp GR_SignExp = f8 + fma.s1 FR_NormX = f8,f1,f0 + addl GR_ad_Data = @ltoff(tgammaf_data), gp +} +{ .mfi + mov GR_ExpOf05 = 0xFFFE + fcvt.fx.trunc.s1 FR_iXt = f8 // [x] + mov GR_Offs = 0 // 2 <= x < 8 +};; +{ .mfi + getf.d GR_Arg = f8 + fcmp.lt.s1 p14,p15 = f8,f0 + mov GR_Tbl12Offs = 0 +} +{ .mfi + setf.exp FR_05 = GR_ExpOf05 + fma.s1 FR_2 = f1,f1,f1 // 2 + mov GR_Correction = 0 +};; +{ .mfi + ld8 GR_ad_Data = [GR_ad_Data] + fclass.m p10,p0 = f8,0x1E7 // is x NaTVal, NaN, +/-0 or +/-INF? + tbit.z p12,p13 = GR_SignExp,16 // p13 if |x| >= 2 +} +{ .mfi + mov GR_ExpOf1 = 0xFFFF + fcvt.fx.s1 FR_rs = f8 // round(x) + and GR_Exp2Ind = 7,GR_SignExp +};; +.pred.rel "mutex",p14,p15 +{ .mfi +(p15) cmp.eq.unc p11,p0 = GR_ExpOf1,GR_SignExp // p11 if 1 <= x < 2 +(p14) fma.s1 FR_1mX = f1,f1,f8 // 1 - |x| + mov GR_Sig = 0 // if |x| < 2 +} +{ .mfi +(p13) cmp.eq.unc p7,p0 = 2,GR_Exp2Ind +(p15) fms.s1 FR_1mX = f1,f1,f8 // 1 - |x| +(p13) cmp.eq.unc p8,p0 = 3,GR_Exp2Ind +};; +.pred.rel "mutex",p7,p8 +{ .mfi +(p7) mov GR_Offs = 0x7 // 8 <= |x| < 16 + nop.f 0 +(p8) tbit.z.unc p0,p6 = GR_Arg,51 +} +{ .mib +(p13) cmp.lt.unc p9,p0 = 3,GR_Exp2Ind +(p8) mov GR_Offs = 0xE // 16 <= |x| < 32 + // jump if x is NaTVal, NaN, +/-0 or +/-INF? +(p10) br.cond.spnt tgammaf_spec_args +};; +.pred.rel "mutex",p14,p15 +.pred.rel "mutex",p6,p9 +{ .mfi +(p9) mov GR_Offs = 0x1C // 32 <= |x| +(p14) fma.s1 FR_X2mX = FR_NormX,FR_NormX,FR_NormX // x^2-|x| +(p9) tbit.z.unc p0,p8 = GR_Arg,50 +} +{ .mfi + ldfpd FR_LocalMin,FR_10 = [GR_ad_Data],16 +(p15) fms.s1 FR_X2mX = FR_NormX,FR_NormX,FR_NormX // x^2-|x| +(p6) add GR_Offs = 0x7,GR_Offs // 24 <= x < 32 +};; +.pred.rel "mutex",p8,p12 +{ .mfi + add GR_ad_Ce = 0x50,GR_ad_Data +(p15) fcmp.lt.unc.s1 p10,p0 = f8,f1 // p10 if 0 <= x < 1 + mov GR_OvfNzBound = 2 +} +{ .mib + ldfpd FR_S32,FR_S31 = [GR_ad_Data],16 +(p8) add GR_Offs = 0x7,GR_Offs // 40 <= |x| + // jump if 1 <= x < 2 +(p11) br.cond.spnt tgammaf_from_1_to_2 +};; +{ .mfi + shladd GR_ad_Ce = GR_Offs,4,GR_ad_Ce + fcvt.xf FR_Xt = FR_iXt // [x] +(p13) cmp.eq.unc p7,p0 = r0,GR_Offs // p7 if 2 <= |x| < 8 +} +{ .mfi + shladd GR_ad_Co = GR_Offs,4,GR_ad_Data + fma.s1 FR_6 = FR_2,FR_2,FR_2 + mov GR_ExpOf05 = 0x7FC +};; +{ .mfi +(p13) getf.sig GR_Sig = FR_iXt // if |x| >= 2 + frcpa.s1 FR_Rcp0,p0 = f1,FR_NormX +(p10) shr GR_Arg = GR_Arg,51 +} +{ .mib + ldfpd FR_C01,FR_C11 = [GR_ad_Co],16 +(p7) mov GR_Correction = 2 + // jump if 0 < x < 1 +(p10) br.cond.spnt tgammaf_from_0_to_1 +};; +{ .mfi + ldfpd FR_C21,FR_C31 = [GR_ad_Ce],16 + fma.s1 FR_Rq2 = f1,f1,FR_1mX // 2 - |x| +(p14) sub GR_Correction = r0,GR_Correction +} +{ .mfi + ldfpd FR_C41,FR_C51 = [GR_ad_Co],16 +(p14) fcvt.xf FR_rs = FR_rs +(p14) add GR_ad_SinO = 0x3A0,GR_ad_Data +};; +.pred.rel "mutex",p14,p15 +{ .mfi + ldfpd FR_C00,FR_C10 = [GR_ad_Ce],16 + nop.f 0 +(p14) sub GR_Sig = GR_Correction,GR_Sig +} +{ .mfi + ldfpd FR_C20,FR_C30 = [GR_ad_Co],16 + fma.s1 FR_Rq1 = FR_1mX,FR_2,FR_X2mX // (x-1)*(x-2) +(p15) sub GR_Sig = GR_Sig,GR_Correction +};; +{ .mfi +(p14) ldfpd FR_S01,FR_S11 = [GR_ad_SinO],16 + fma.s1 FR_Rq3 = FR_2,f1,FR_1mX // 3 - |x| + and GR_RqDeg = 0x6,GR_Sig +} +{ .mfi + ldfpd FR_C40,FR_C50 = [GR_ad_Ce],16 +(p14) fma.d.s0 FR_X = f0,f0,f8 // set deno flag + mov GR_NanBound = 0x30016 // -2^23 +};; +.pred.rel "mutex",p14,p15 +{ .mfi +(p14) add GR_ad_SinE = 0x3C0,GR_ad_Data +(p15) fms.s1 FR_r = FR_NormX,f1,FR_Xt // r = x - [x] + cmp.eq p8,p0 = 2,GR_RqDeg +} +{ .mfi + ldfpd FR_An,FR_OvfBound = [GR_ad_Co] +(p14) fms.s1 FR_r = FR_Xt,f1,FR_NormX // r = |x - [x]| + cmp.eq p9,p0 = 4,GR_RqDeg +};; +.pred.rel "mutex",p8,p9 +{ .mfi +(p14) ldfpd FR_S21,FR_S00 = [GR_ad_SinE],16 +(p8) fma.s1 FR_Rq0 = FR_2,f1,FR_1mX // (3-x) + tbit.z p0,p6 = GR_Sig,0 +} +{ .mfi +(p14) ldfpd FR_S10,FR_S20 = [GR_ad_SinO],16 +(p9) fma.s1 FR_Rq0 = FR_2,FR_2,FR_1mX // (5-x) + cmp.eq p10,p0 = 6,GR_RqDeg +};; +{ .mfi +(p14) getf.s GR_Arg = f8 +(p14) fcmp.eq.unc.s1 p13,p0 = FR_NormX,FR_Xt +(p14) mov GR_ZeroResBound = 0xC22C // -43 +} +{ .mfi +(p14) ldfe FR_InvAn = [GR_ad_SinE] +(p10) fma.s1 FR_Rq0 = FR_6,f1,FR_1mX // (7-x) + cmp.eq p7,p0 = r0,GR_RqDeg +};; +{ .mfi +(p14) cmp.ge.unc p11,p0 = GR_SignExp,GR_NanBound + fma.s1 FR_Rq2 = FR_Rq2,FR_6,FR_X2mX // (x-3)*(x-4) +(p14) shl GR_ZeroResBound = GR_ZeroResBound,16 +} +{ .mfb +(p14) mov GR_OvfNzBound = 0x802 +(p14) fms.s1 FR_rs = FR_rs,f1,FR_NormX // rs = round(x) - x + // jump if x < -2^23 i.e. x is negative integer +(p11) br.cond.spnt tgammaf_singularity +};; +{ .mfi + nop.m 0 +(p7) fma.s1 FR_Rq1 = f0,f0,f1 +(p14) shl GR_OvfNzBound = GR_OvfNzBound,20 +} +{ .mfb + nop.m 0 + fma.s1 FR_Rq3 = FR_Rq3,FR_10,FR_X2mX // (x-5)*(x-6) + // jump if x is negative integer such that -2^23 < x < 0 +(p13) br.cond.spnt tgammaf_singularity +};; +{ .mfi + nop.m 0 + fma.s1 FR_C01 = FR_C01,f1,FR_r +(p14) mov GR_ExpOf05 = 0xFFFE +} +{ .mfi +(p14) cmp.eq.unc p7,p0 = GR_Arg,GR_OvfNzBound + fma.s1 FR_C11 = FR_C11,f1,FR_r +(p14) cmp.ltu.unc p11,p0 = GR_Arg,GR_OvfNzBound +};; +{ .mfi + nop.m 0 + fma.s1 FR_C21 = FR_C21,f1,FR_r +(p14) cmp.ltu.unc p9,p0 = GR_ZeroResBound,GR_Arg +} +{ .mfb + nop.m 0 + fma.s1 FR_C31 = FR_C31,f1,FR_r + // jump if argument is close to 0 negative +(p11) br.cond.spnt tgammaf_overflow +};; +{ .mfi + nop.m 0 + fma.s1 FR_C41 = FR_C41,f1,FR_r + nop.i 0 +} +{ .mfb + nop.m 0 + fma.s1 FR_C51 = FR_C51,f1,FR_r + // jump if x is negative noninteger such that -2^23 < x < -43 +(p9) br.cond.spnt tgammaf_underflow +};; +{ .mfi + nop.m 0 +(p14) fma.s1 FR_rs2 = FR_rs,FR_rs,f0 + nop.i 0 +} +{ .mfb + nop.m 0 +(p14) fma.s1 FR_S01 = FR_rs,FR_rs,FR_S01 + // jump if argument is 0x80200000 +(p7) br.cond.spnt tgammaf_overflow_near0_bound +};; +{ .mfi + nop.m 0 +(p6) fnma.s1 FR_Rq1 = FR_Rq1,FR_Rq0,f0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p10) fma.s1 FR_Rq2 = FR_Rq2,FR_Rq3,f0 + and GR_Sig = 0x7,GR_Sig +};; +{ .mfi + nop.m 0 + fma.s1 FR_C01 = FR_C01,FR_r,FR_C00 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_C11 = FR_C11,FR_r,FR_C10 + cmp.eq p6,p7 = r0,GR_Sig // p6 if |x| from one of base intervals +};; +{ .mfi + nop.m 0 + fma.s1 FR_C21 = FR_C21,FR_r,FR_C20 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_C31 = FR_C31,FR_r,FR_C30 +(p7) cmp.lt.unc p9,p0 = 2,GR_RqDeg +};; +{ .mfi + nop.m 0 +(p14) fma.s1 FR_S11 = FR_rs,FR_rs,FR_S11 + nop.i 0 +} +{ .mfi + nop.m 0 +(p14) fma.s1 FR_S21 = FR_rs,FR_rs,FR_S21 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_C41 = FR_C41,FR_r,FR_C40 + nop.i 0 +} +{ .mfi + nop.m 0 +(p14) fma.s1 FR_S32 = FR_rs2,FR_S32,FR_S31 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p9) fma.s1 FR_Rq1 = FR_Rq1,FR_Rq2,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_C51 = FR_C51,FR_r,FR_C50 + nop.i 0 +};; +{ .mfi +(p14) getf.exp GR_SignExp = FR_rs + fma.s1 FR_C01 = FR_C01,FR_C11,f0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p14) fma.s1 FR_S01 = FR_S01,FR_rs2,FR_S00 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_C21 = FR_C21,FR_C31,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + // NR-iteration +(p14) fnma.s1 FR_InvNormX1 = FR_Rcp0,FR_NormX,f1 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p14) fma.s1 FR_S11 = FR_S11,FR_rs2,FR_S10 +(p14) tbit.z.unc p11,p12 = GR_SignExp,17 +} +{ .mfi + nop.m 0 +(p14) fma.s1 FR_S21 = FR_S21,FR_rs2,FR_S20 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p15) fcmp.lt.unc.s1 p0,p13 = FR_NormX,FR_OvfBound + nop.i 0 +} +{ .mfi + nop.m 0 +(p14) fma.s1 FR_S32 = FR_rs2,FR_S32,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_C41 = FR_C41,FR_C51,f0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p7) fma.s1 FR_An = FR_Rq1,FR_An,f0 + nop.i 0 +};; +{ .mfb + nop.m 0 + nop.f 0 + // jump if x > 35.04010009765625 +(p13) br.cond.spnt tgammaf_overflow +};; +{ .mfi + nop.m 0 + // NR-iteration +(p14) fma.s1 FR_InvNormX1 = FR_Rcp0,FR_InvNormX1,FR_Rcp0 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p14) fma.s1 FR_S01 = FR_S01,FR_S11,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p14) fma.s1 FR_S21 = FR_S21,FR_S32,f0 + nop.i 0 +};; +{ .mfi +(p14) getf.exp GR_SignExp = FR_NormX + fma.s1 FR_C01 = FR_C01,FR_C21,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_C41 = FR_C41,FR_An,f0 +(p14) mov GR_ExpOf1 = 0x2FFFF +};; +{ .mfi + nop.m 0 + // NR-iteration +(p14) fnma.s1 FR_InvNormX2 = FR_InvNormX1,FR_NormX,f1 + nop.i 0 +};; +.pred.rel "mutex",p11,p12 +{ .mfi + nop.m 0 +(p12) fnma.s1 FR_S01 = FR_S01,FR_S21,f0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p11) fma.s1 FR_S01 = FR_S01,FR_S21,f0 + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p14) fma.s1 FR_GAMMA = FR_C01,FR_C41,f0 +(p14) tbit.z.unc p6,p7 = GR_Sig,0 +} +{ .mfb + nop.m 0 +(p15) fma.s.s0 f8 = FR_C01,FR_C41,f0 +(p15) br.ret.spnt b0 // exit for positives +};; +.pred.rel "mutex",p11,p12 +{ .mfi + nop.m 0 +(p12) fms.s1 FR_S01 = FR_rs,FR_S01,FR_rs + nop.i 0 +} +{ .mfi + nop.m 0 +(p11) fma.s1 FR_S01 = FR_rs,FR_S01,FR_rs + nop.i 0 +};; +{ .mfi + nop.m 0 + // NR-iteration + fma.s1 FR_InvNormX2 = FR_InvNormX1,FR_InvNormX2,FR_InvNormX1 + cmp.eq p10,p0 = 0x23,GR_Offs +};; +.pred.rel "mutex",p6,p7 +{ .mfi + nop.m 0 +(p6) fma.s1 FR_GAMMA = FR_S01,FR_GAMMA,f0 + cmp.gtu p8,p0 = GR_SignExp,GR_ExpOf1 +} +{ .mfi + nop.m 0 +(p7) fnma.s1 FR_GAMMA = FR_S01,FR_GAMMA,f0 + cmp.eq p9,p0 = GR_SignExp,GR_ExpOf1 +};; +{ .mfi + nop.m 0 + // NR-iteration + fnma.s1 FR_InvNormX1 = FR_InvNormX2,FR_NormX,f1 + nop.i 0 +} +{ .mfi + nop.m 0 +(p10) fma.s1 FR_InvNormX2 = FR_InvNormX2,FR_InvAn,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + frcpa.s1 FR_Rcp0,p0 = f1,FR_GAMMA + nop.i 0 +};; +{ .mfi + nop.m 0 + fms.s1 FR_Multplr = FR_NormX,f1,f1 // x - 1 + nop.i 0 +};; +{ .mfi + nop.m 0 + // NR-iteration + fnma.s1 FR_Rcp1 = FR_Rcp0,FR_GAMMA,f1 + nop.i 0 +};; +.pred.rel "mutex",p8,p9 +{ .mfi + nop.m 0 + // 1/x or 1/(An*x) +(p8) fma.s1 FR_Multplr = FR_InvNormX2,FR_InvNormX1,FR_InvNormX2 + nop.i 0 +} +{ .mfi + nop.m 0 +(p9) fma.s1 FR_Multplr = f1,f1,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + // NR-iteration + fma.s1 FR_Rcp1 = FR_Rcp0,FR_Rcp1,FR_Rcp0 + nop.i 0 +};; +{ .mfi + nop.m 0 + // NR-iteration + fnma.s1 FR_Rcp2 = FR_Rcp1,FR_GAMMA,f1 + nop.i 0 +} +{ .mfi + nop.m 0 + // NR-iteration + fma.s1 FR_Rcp1 = FR_Rcp1,FR_Multplr,f0 + nop.i 0 +};; +{ .mfb + nop.m 0 + fma.s.s0 f8 = FR_Rcp1,FR_Rcp2,FR_Rcp1 + br.ret.sptk b0 +};; + +// here if 0 < x < 1 +//-------------------------------------------------------------------- +.align 32 +tgammaf_from_0_to_1: +{ .mfi + cmp.lt p7,p0 = GR_Arg,GR_ExpOf05 + // NR-iteration + fnma.s1 FR_Rcp1 = FR_Rcp0,FR_NormX,f1 + cmp.eq p8,p0 = GR_Arg,GR_ExpOf05 +} +{ .mfi + cmp.gt p9,p0 = GR_Arg,GR_ExpOf05 + fma.s1 FR_r = f0,f0,FR_NormX // reduced arg for (0;1) + mov GR_ExpOf025 = 0x7FA +};; +{ .mfi + getf.s GR_ArgNz = f8 + fma.d.s0 FR_X = f0,f0,f8 // set deno flag + shl GR_OvfNzBound = GR_OvfNzBound,20 +} +{ .mfi +(p8) mov GR_Tbl12Offs = 0x80 // 0.5 <= x < 0.75 + nop.f 0 +(p7) cmp.ge.unc p6,p0 = GR_Arg,GR_ExpOf025 +};; +.pred.rel "mutex",p6,p9 +{ .mfi +(p9) mov GR_Tbl12Offs = 0xC0 // 0.75 <= x < 1 + nop.f 0 +(p6) mov GR_Tbl12Offs = 0x40 // 0.25 <= x < 0.5 +} +{ .mfi + add GR_ad_Ce = 0x2C0,GR_ad_Data + nop.f 0 + add GR_ad_Co = 0x2A0,GR_ad_Data +};; +{ .mfi + add GR_ad_Co = GR_ad_Co,GR_Tbl12Offs + nop.f 0 + cmp.lt p12,p0 = GR_ArgNz,GR_OvfNzBound +} +{ .mib + add GR_ad_Ce = GR_ad_Ce,GR_Tbl12Offs + cmp.eq p7,p0 = GR_ArgNz,GR_OvfNzBound + // jump if argument is 0x00200000 +(p7) br.cond.spnt tgammaf_overflow_near0_bound +};; +{ .mmb + ldfpd FR_A7,FR_A6 = [GR_ad_Co],16 + ldfpd FR_A5,FR_A4 = [GR_ad_Ce],16 + // jump if argument is close to 0 positive +(p12) br.cond.spnt tgammaf_overflow +};; +{ .mfi + ldfpd FR_A3,FR_A2 = [GR_ad_Co],16 + // NR-iteration + fma.s1 FR_Rcp1 = FR_Rcp0,FR_Rcp1,FR_Rcp0 + nop.i 0 +} +{ .mfb + ldfpd FR_A1,FR_A0 = [GR_ad_Ce],16 + nop.f 0 + br.cond.sptk tgamma_from_0_to_2 +};; + +// here if 1 < x < 2 +//-------------------------------------------------------------------- +.align 32 +tgammaf_from_1_to_2: +{ .mfi + add GR_ad_Co = 0x2A0,GR_ad_Data + fms.s1 FR_r = f0,f0,FR_1mX + shr GR_TblOffs = GR_Arg,47 +} +{ .mfi + add GR_ad_Ce = 0x2C0,GR_ad_Data + nop.f 0 + mov GR_TblOffsMask = 0x18 +};; +{ .mfi + nop.m 0 + nop.f 0 + and GR_TblOffs = GR_TblOffs,GR_TblOffsMask +};; +{ .mfi + shladd GR_ad_Co = GR_TblOffs,3,GR_ad_Co + nop.f 0 + nop.i 0 +} +{ .mfi + shladd GR_ad_Ce = GR_TblOffs,3,GR_ad_Ce + nop.f 0 + cmp.eq p6,p7 = 8,GR_TblOffs +};; +{ .mmi + ldfpd FR_A7,FR_A6 = [GR_ad_Co],16 + ldfpd FR_A5,FR_A4 = [GR_ad_Ce],16 + nop.i 0 +};; +{ .mmi + ldfpd FR_A3,FR_A2 = [GR_ad_Co],16 + ldfpd FR_A1,FR_A0 = [GR_ad_Ce],16 + nop.i 0 +};; + +.align 32 +tgamma_from_0_to_2: +{ .mfi + nop.m 0 +(p6) fms.s1 FR_r = FR_r,f1,FR_LocalMin + nop.i 0 +};; +{ .mfi + nop.m 0 + // NR-iteration +(p10) fnma.s1 FR_Rcp2 = FR_Rcp1,FR_NormX,f1 + nop.i 0 +};; +{ .mfi + nop.m 0 + fms.s1 FR_r2 = FR_r,FR_r,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A7 = FR_A7,FR_r,FR_A6 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_A5 = FR_A5,FR_r,FR_A4 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A3 = FR_A3,FR_r,FR_A2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_A1 = FR_A1,FR_r,FR_A0 + nop.i 0 +};; +{ .mfi + nop.m 0 + // NR-iteration +(p10) fma.s1 FR_Rcp2 = FR_Rcp1,FR_Rcp2,FR_Rcp1 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A7 = FR_A7,FR_r2,FR_A5 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r4 = FR_r2,FR_r2,f0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_A3 = FR_A3,FR_r2,FR_A1 + nop.i 0 +};; +{ .mfi + nop.m 0 +(p10) fma.s1 FR_GAMMA = FR_A7,FR_r4,FR_A3 + nop.i 0 +} +{ .mfi + nop.m 0 +(p11) fma.s.s0 f8 = FR_A7,FR_r4,FR_A3 + nop.i 0 +};; +{ .mfb + nop.m 0 +(p10) fma.s.s0 f8 = FR_GAMMA,FR_Rcp2,f0 + br.ret.sptk b0 +};; + + +// overflow +//-------------------------------------------------------------------- +.align 32 +tgammaf_overflow_near0_bound: +.pred.rel "mutex",p14,p15 +{ .mfi + mov GR_fpsr = ar.fpsr + nop.f 0 +(p15) mov r8 = 0x7f8 +} +{ .mfi + nop.m 0 + nop.f 0 +(p14) mov r8 = 0xff8 +};; +{ .mfi + nop.m 0 + nop.f 0 + shl r8 = r8,20 +};; +{ .mfi + sub r8 = r8,r0,1 + nop.f 0 + extr.u GR_fpsr = GR_fpsr,10,2 // rounding mode +};; +.pred.rel "mutex",p14,p15 +{ .mfi + // set p8 to 0 in case of overflow and to 1 otherwise + // for negative arg: + // no overflow if rounding mode either Z or +Inf, i.e. + // GR_fpsr > 1 +(p14) cmp.lt p8,p0 = 1,GR_fpsr + nop.f 0 + // for positive arg: + // no overflow if rounding mode either Z or -Inf, i.e. + // (GR_fpsr & 1) == 0 +(p15) tbit.z p0,p8 = GR_fpsr,0 +};; +{ .mib +(p8) setf.s f8 = r8 // set result to 0x7f7fffff without + // OVERFLOW flag raising + nop.i 0 +(p8) br.ret.sptk b0 +};; + +.align 32 +tgammaf_overflow: +{ .mfi + nop.m 0 + nop.f 0 + mov r8 = 0x1FFFE +};; +{ .mfi + setf.exp f9 = r8 + fmerge.s FR_X = f8,f8 + nop.i 0 +};; +.pred.rel "mutex",p14,p15 +{ .mfi + nop.m 0 +(p14) fnma.s.s0 f8 = f9,f9,f0 // set I,O and -INF result + mov GR_TAG = 261 // overflow +} +{ .mfb + nop.m 0 +(p15) fma.s.s0 f8 = f9,f9,f0 // set I,O and +INF result + br.cond.sptk tgammaf_libm_err +};; + +// x is negative integer or +/-0 +//-------------------------------------------------------------------- +.align 32 +tgammaf_singularity: +{ .mfi + nop.m 0 + fmerge.s FR_X = f8,f8 + mov GR_TAG = 262 // negative +} +{ .mfb + nop.m 0 + frcpa.s0 f8,p0 = f0,f0 + br.cond.sptk tgammaf_libm_err +};; +// x is negative noninteger with big absolute value +//-------------------------------------------------------------------- +.align 32 +tgammaf_underflow: +{ .mfi + mov r8 = 0x00001 + nop.f 0 + tbit.z p6,p7 = GR_Sig,0 +};; +{ .mfi + setf.exp f9 = r8 + nop.f 0 + nop.i 0 +};; +.pred.rel "mutex",p6,p7 +{ .mfi + nop.m 0 +(p6) fms.s.s0 f8 = f9,f9,f9 + nop.i 0 +} +{ .mfb + nop.m 0 +(p7) fma.s.s0 f8 = f9,f9,f9 + br.ret.sptk b0 +};; + +// x for natval, nan, +/-inf or +/-0 +//-------------------------------------------------------------------- +.align 32 +tgammaf_spec_args: +{ .mfi + nop.m 0 + fclass.m p6,p0 = f8,0x1E1 // Test x for natval, nan, +inf + nop.i 0 +};; +{ .mfi + nop.m 0 + fclass.m p7,p8 = f8,0x7 // +/-0 + nop.i 0 +};; +{ .mfi + nop.m 0 + fmerge.s FR_X = f8,f8 + nop.i 0 +} +{ .mfb + nop.m 0 +(p6) fma.s.s0 f8 = f8,f1,f8 +(p6) br.ret.spnt b0 +};; +.pred.rel "mutex",p7,p8 +{ .mfi +(p7) mov GR_TAG = 262 // negative +(p7) frcpa.s0 f8,p0 = f1,f8 + nop.i 0 +} +{ .mib + nop.m 0 + nop.i 0 +(p8) br.cond.spnt tgammaf_singularity +};; + +.align 32 +tgammaf_libm_err: +{ .mfi + alloc r32 = ar.pfs,1,4,4,0 + nop.f 0 + mov GR_Parameter_TAG = GR_TAG +};; + +GLOBAL_LIBM_END(tgammaf) + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfs [GR_Parameter_Y] = FR_Y,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; +.body +{ .mib + stfs [GR_Parameter_X] = FR_X // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfs [GR_Parameter_Y] = FR_RESULT // STORE Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + nop.m 0 + nop.m 0 + add GR_Parameter_RESULT = 48,sp +};; +{ .mmi + ldfs f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) +.type __libm_error_support#,@function +.global __libm_error_support# + diff --git a/sysdeps/ia64/fpu/w_tgammal.S b/sysdeps/ia64/fpu/w_tgammal.S new file mode 100644 index 0000000000..f64e213266 --- /dev/null +++ b/sysdeps/ia64/fpu/w_tgammal.S @@ -0,0 +1,4487 @@ +.file "tgammal.s" + + +// Copyright (c) 2002 - 2005, Intel Corporation +// All rights reserved. +// +// Contributed 2002 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// History +//============================================================== +// 01/16/02 Initial version +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/10/03 Reordered header: .section, .global, .proc, .align; +// used data8 for long double table values +// 03/17/03 Moved tgammal_libm_err label into .proc region +// 04/10/03 Changed error codes for overflow and negative integers +// 03/31/05 Reformatted delimiters between data tables +// +// API +//============================================================== +// long double tgammal(long double) +// +// Resources Used: +// +// Floating-Point Registers: f8-f15 +// f32-f127 +// +// General Purpose Registers: r32-r67 +// +// Predicate Registers: p6-p15 +// +//********************************************************************* +// +// IEEE Special Conditions: +// +// tgammal(+inf) = +inf +// tgammal(-inf) = QNaN +// tgammal(+/-0) = +/-inf +// tgammal(x<0, x - integer) = QNaN +// tgammal(SNaN) = QNaN +// tgammal(QNaN) = QNaN +// +//********************************************************************* +// Overview of operation +//============================================================== +// +// Algorithm description +// --------------------- +// +// There are 3 main paths in the implementation +// (and additional special values branches) +// +// 1) |X| >= 13 - Stirling formula computation +// a) Positive arguments: +// TGAMMAL(X) = exp((X-0.5)*ln(X) - X + C + S(Z)), +// where C = 0.5*ln(2*Pi) , Z = 1/Z, S(Z) - Bernulli polynomial +// (up to 'B18' term). +// Some of these calculation done in multiprecision. +// Ln returns multiprecision result too +// and exp also accepts and returns pair of values. +// +// b) Negative arguments +// TGAMMAL(-X) = PI/(X*TGAMMAL(X)*sin(PI*X)). +// (X*sin(PI*X))/PI calculated in parallel with TGAMMAL. +// Here we use polynomial of 9th degree with 2 multiprecision steps. +// Argument range reduction is: +// N = [x] with round to nearest, r = x - N, -0.5 <= r < 0.5 +// After ((X-0.5)*ln(X) - X + C + S(Z)) completed we just invert +// its result and compute exp with negative argument (1/exp(x)=exp(-x)) +// Then we multiply exp result to PI/(X*sin(PI*X)). +// +// 2) 1 <= |X| < 13 - Polynomial part +// a) Positive arguments: +// All values are splitted to such intervals as: +// #0->[2;3], #1->[3,4], #2->[5,6]... +// For even intervals we just use polynomial computation with degree 20 +// and first 6 multiprecision computations. +// Range reduction looks like +// N = [x] with truncate, r = x - N - 0.5, -0.5 <= r < 0.5 +// For odd intervals we use reccurent formula: +// TGAMMAL(X) = TGAMMA(X-1)*(X-1) +// [1;2] interval is splitted to 3 subranges: +// [1;1.25], [1.25;1.75], [1.75;2] with the same polynomial forms +// +// b) Negative arguments +// TGAMMAL(-X) = PI/(X*TGAMMAL(X)*sin(PI*X)). +// (X*sin(PI*X))/PI calculated in parallel with TGAMMAL. +// After multiplication by TGAMMAL(X) result we calculate reciprocal +// and get final result. +// +// 3) 0 < |X| < 1 - Near 0 part +// a) Here we use reccurent formula TGAMMAL(X) = TGAMMAL(X+1)/X +// TGAMMAL(X+1) calculated as shown above, +// 1/X result obtained in parallel. Then we just multiply these values. +// There is only additional separated subrange: [0;0.125] with specific +// polynomial constants set. +// +// b) Negative arguments +// TGAMMAL(-X) = PI/(TGAMMAL(X+1)*sin(PI*X)). +// There is no need to compute 1/X. + + + +RODATA + +.align 16 +LOCAL_OBJECT_START(Constants_Tgammal_log_80_Q) +// log2_hi, log2_lo, Q_6, Q_5, Q_4, Q_3, Q_2, Q_1 +data4 0x00000000,0xB1721800,0x00003FFE,0x00000000 +data4 0x4361C4C6,0x82E30865,0x0000BFE2,0x00000000 +data4 0xA51BE0AF,0x92492453,0x00003FFC,0x00000000 +data4 0xA0CFD29F,0xAAAAAB73,0x0000BFFC,0x00000000 +data4 0xCCCE3872,0xCCCCCCCC,0x00003FFC,0x00000000 +data4 0xFFFFB4FB,0xFFFFFFFF,0x0000BFFC,0x00000000 +data4 0xAAAAAAAB,0xAAAAAAAA,0x00003FFD,0x00000000 +data4 0x00000000,0x80000000,0x0000BFFE,0x00000000 +LOCAL_OBJECT_END(Constants_Tgammal_log_80_Q) + +.align 64 +LOCAL_OBJECT_START(Constants_Tgammal_log_80_Z_G_H_h1) +// Z1 - 16 bit fixed, G1 and H1 IEEE single, h1 IEEE double +data4 0x00008000,0x3F800000,0x00000000,0x00000000 +data4 0x00000000,0x00000000,0x00000000,0x00000000 +data4 0x00007879,0x3F70F0F0,0x3D785196,0x00000000 +data4 0xEBA0E0D1,0x8B1D330B,0x00003FDA,0x00000000 +data4 0x000071C8,0x3F638E38,0x3DF13843,0x00000000 +data4 0x9EADD553,0xE2AF365E,0x00003FE2,0x00000000 +data4 0x00006BCB,0x3F579430,0x3E2FF9A0,0x00000000 +data4 0x752F34A2,0xF585FEC3,0x0000BFE3,0x00000000 +data4 0x00006667,0x3F4CCCC8,0x3E647FD6,0x00000000 +data4 0x893B03F3,0xF3546435,0x00003FE2,0x00000000 +data4 0x00006187,0x3F430C30,0x3E8B3AE7,0x00000000 +data4 0x39CDD2AC,0xBABA62E0,0x00003FE4,0x00000000 +data4 0x00005D18,0x3F3A2E88,0x3EA30C68,0x00000000 +data4 0x457978A1,0x8718789F,0x00003FE2,0x00000000 +data4 0x0000590C,0x3F321640,0x3EB9CEC8,0x00000000 +data4 0x3185E56A,0x9442DF96,0x0000BFE4,0x00000000 +data4 0x00005556,0x3F2AAAA8,0x3ECF9927,0x00000000 +data4 0x2BBE2CBD,0xCBF9A4BF,0x00003FE4,0x00000000 +data4 0x000051EC,0x3F23D708,0x3EE47FC5,0x00000000 +data4 0x852D5935,0xF3537535,0x00003FE3,0x00000000 +data4 0x00004EC5,0x3F1D89D8,0x3EF8947D,0x00000000 +data4 0x46CDF32F,0xA1F1E699,0x0000BFDF,0x00000000 +data4 0x00004BDB,0x3F17B420,0x3F05F3A1,0x00000000 +data4 0xD8484CE3,0x84A61856,0x00003FE4,0x00000000 +data4 0x00004925,0x3F124920,0x3F0F4303,0x00000000 +data4 0xFF28821B,0xC7DD97E0,0x0000BFE2,0x00000000 +data4 0x0000469F,0x3F0D3DC8,0x3F183EBF,0x00000000 +data4 0xEF1FD32F,0xD3C4A887,0x00003FE3,0x00000000 +data4 0x00004445,0x3F088888,0x3F20EC80,0x00000000 +data4 0x464C76DA,0x84672BE6,0x00003FE5,0x00000000 +data4 0x00004211,0x3F042108,0x3F29516A,0x00000000 +data4 0x18835FB9,0x9A43A511,0x0000BFE5,0x00000000 +LOCAL_OBJECT_END(Constants_Tgammal_log_80_Z_G_H_h1) + +.align 64 +LOCAL_OBJECT_START(Constants_Tgammal_log_80_Z_G_H_h2) +// Z2 - 16 bit fixed, G2 and H2 IEEE single, h2 IEEE double +data4 0x00008000,0x3F800000,0x00000000,0x00000000 +data4 0x00000000,0x00000000,0x00000000,0x00000000 +data4 0x00007F81,0x3F7F00F8,0x3B7F875D,0x00000000 +data4 0x211398BF,0xAD08B116,0x00003FDB,0x00000000 +data4 0x00007F02,0x3F7E03F8,0x3BFF015B,0x00000000 +data4 0xC376958E,0xB106790F,0x00003FDE,0x00000000 +data4 0x00007E85,0x3F7D08E0,0x3C3EE393,0x00000000 +data4 0x79A7679A,0xFD03F242,0x0000BFDA,0x00000000 +data4 0x00007E08,0x3F7C0FC0,0x3C7E0586,0x00000000 +data4 0x05E7AE08,0xF03F81C3,0x0000BFDF,0x00000000 +data4 0x00007D8D,0x3F7B1880,0x3C9E75D2,0x00000000 +data4 0x049EB22F,0xD1B87D3C,0x00003FDE,0x00000000 +data4 0x00007D12,0x3F7A2328,0x3CBDC97A,0x00000000 +data4 0x3A9E81E0,0xFABC8B95,0x00003FDF,0x00000000 +data4 0x00007C98,0x3F792FB0,0x3CDCFE47,0x00000000 +data4 0x7C4B5443,0xF5F3653F,0x00003FDF,0x00000000 +data4 0x00007C20,0x3F783E08,0x3CFC15D0,0x00000000 +data4 0xF65A1773,0xE78AB204,0x00003FE0,0x00000000 +data4 0x00007BA8,0x3F774E38,0x3D0D874D,0x00000000 +data4 0x7B8EF695,0xDB7CBFFF,0x0000BFE0,0x00000000 +data4 0x00007B31,0x3F766038,0x3D1CF49B,0x00000000 +data4 0xCF773FB3,0xC0241AEA,0x0000BFE0,0x00000000 +data4 0x00007ABB,0x3F757400,0x3D2C531D,0x00000000 +data4 0xC9539FDF,0xFC8F4D48,0x00003FE1,0x00000000 +data4 0x00007A45,0x3F748988,0x3D3BA322,0x00000000 +data4 0x954665C2,0x9CD035FB,0x0000BFE1,0x00000000 +data4 0x000079D1,0x3F73A0D0,0x3D4AE46F,0x00000000 +data4 0xDD367A30,0xEC9017C7,0x00003FE1,0x00000000 +data4 0x0000795D,0x3F72B9D0,0x3D5A1756,0x00000000 +data4 0xCB11189C,0xEE6625D3,0x0000BFE1,0x00000000 +data4 0x000078EB,0x3F71D488,0x3D693B9D,0x00000000 +data4 0xBE11C424,0xA49C8DB5,0x0000BFE0,0x00000000 +LOCAL_OBJECT_END(Constants_Tgammal_log_80_Z_G_H_h2) + +.align 64 +LOCAL_OBJECT_START(Constants_Tgammal_log_80_h3_G_H) +// h3 IEEE double extended, H3 and G3 IEEE single +data4 0x112666B0,0xAAACAAB1,0x00003FD3,0x3F7FFC00 +data4 0x9B7FAD21,0x90051030,0x00003FD8,0x3F7FF400 +data4 0xF4D783C4,0xA6B46F46,0x00003FDA,0x3F7FEC00 +data4 0x11C6DDCA,0xDA148D88,0x0000BFD8,0x3F7FE400 +data4 0xCA964D95,0xCE65C1D8,0x0000BFD8,0x3F7FDC00 +data4 0x23412D13,0x883838EE,0x0000BFDB,0x3F7FD400 +data4 0x983ED687,0xB7E5CFA1,0x00003FDB,0x3F7FCC08 +data4 0xE3C3930B,0xDBE23B16,0x0000BFD9,0x3F7FC408 +data4 0x48AA4DFC,0x9B92F1FC,0x0000BFDC,0x3F7FBC10 +data4 0xCE9C8F7E,0x9A8CEB15,0x0000BFD9,0x3F7FB410 +data4 0x0DECE74A,0x8C220879,0x00003FDC,0x3F7FAC18 +data4 0x2F053150,0xB25CA912,0x0000BFDA,0x3F7FA420 +data4 0xD9A5BE20,0xA5876555,0x00003FDB,0x3F7F9C20 +data4 0x2053F087,0xC919BB6E,0x00003FD9,0x3F7F9428 +data4 0x041E9A77,0xB70BDA79,0x00003FDC,0x3F7F8C30 +data4 0xEA1C9C30,0xF18A5C08,0x00003FDA,0x3F7F8438 +data4 0x796D89E5,0xA3790D84,0x0000BFDD,0x3F7F7C40 +data4 0xA2915A3A,0xE1852369,0x0000BFDD,0x3F7F7448 +data4 0xA39ED868,0xD803858F,0x00003FDC,0x3F7F6C50 +data4 0x9417EBB7,0xB2EEE356,0x0000BFDD,0x3F7F6458 +data4 0x9BB0D07F,0xED5C1F8A,0x0000BFDC,0x3F7F5C68 +data4 0xE87C740A,0xD6D201A0,0x0000BFDD,0x3F7F5470 +data4 0x1CA74025,0xE8DEBF5E,0x00003FDC,0x3F7F4C78 +data4 0x1F34A7EB,0x9A995A97,0x0000BFDC,0x3F7F4488 +data4 0x359EED97,0x9CB0F742,0x0000BFDA,0x3F7F3C90 +data4 0xBBC6A1C8,0xD6F833C2,0x0000BFDD,0x3F7F34A0 +data4 0xE71090EC,0xE1F68F2A,0x00003FDC,0x3F7F2CA8 +data4 0xC160A74F,0xD1881CF1,0x0000BFDB,0x3F7F24B8 +data4 0xD78CB5A4,0x9AD05AE2,0x00003FD6,0x3F7F1CC8 +data4 0x9A77DC4B,0xE658CB8E,0x0000BFDD,0x3F7F14D8 +data4 0x6BD6D312,0xBA281296,0x00003FDC,0x3F7F0CE0 +data4 0xF95210D0,0xB478BBEB,0x0000BFDB,0x3F7F04F0 +data4 0x38800100,0x39400480,0x39A00640,0x39E00C41 // H's start here +data4 0x3A100A21,0x3A300F22,0x3A4FF51C,0x3A6FFC1D +data4 0x3A87F20B,0x3A97F68B,0x3AA7EB86,0x3AB7E101 +data4 0x3AC7E701,0x3AD7DD7B,0x3AE7D474,0x3AF7CBED +data4 0x3B03E1F3,0x3B0BDE2F,0x3B13DAAA,0x3B1BD766 +data4 0x3B23CC5C,0x3B2BC997,0x3B33C711,0x3B3BBCC6 +data4 0x3B43BAC0,0x3B4BB0F4,0x3B53AF6D,0x3B5BA620 +data4 0x3B639D12,0x3B6B9444,0x3B7393BC,0x3B7B8B6D +LOCAL_OBJECT_END(Constants_Tgammal_log_80_h3_G_H) + +.align 64 +LOCAL_OBJECT_START(Constants_Tgammal_stirling) +//0.5*ln(2*Pi)=9.1893853320467266954096885e-01 + 7.2239360881843238220057778e-17 +data8 0x3FED67F1C864BEB4, 0x3C94D252F2400510 +// Bernulli numbers +data8 0xAAAAAAAAAAAAAAAB, 0x00003FFB //B2 = 8.3333333333333333333333333333e-02 +data8 0xBF66C16C16C16C17 //B4 = -2.7777777777777777777777777778e-03 +data8 0x3F4A01A01A01A01A //B6 = 7.9365079365079365079365079365e-04 +data8 0xBF43813813813814 //B8 = -5.9523809523809523809523809524e-04 +data8 0x3F4B951E2B18FF23 //B10 = 8.4175084175084175084175084175e-04 +data8 0xBF5F6AB0D9993C7D //B12 = -1.9175269175269175269175269175e-03 +data8 0x3F7A41A41A41A41A //B14 = 6.4102564102564102564102564103e-03 +data8 0xBF9E4286CB0F5398 //B16 = -2.9550653594771241830065359477e-02 +data8 0x3FC6FE96381E0680 //B18 = 1.7964437236883057316493849002e-01 +data8 0x3FE0000000000000 // 0.5 +LOCAL_OBJECT_END(Constants_Tgammal_stirling) + +.align 64 +LOCAL_OBJECT_START(Constants_Tgammal_sin) +// Polynomial coefficients for the sin(Pi*x)/Pi, 0 <= |x| < 0.5 +//A2 = 8.1174242528335360802316245099e-01 + 5.1302254650266899774269946201e-18 +data8 0x3FE9F9CB402BC46C, 0x3C57A8B3819B7CEC +//A1 = -1.6449340668482264060656916627e+00 + -3.0210280454695477893051351574e-17 +data8 0xBFFA51A6625307D3, 0xBC816A402079D0EF +data8 0xF3AEF1FFCCE6C813, 0x0000BFE3 //A9 = -7.0921197799923779127089910470e-09 +data8 0x87D54408E6D4BB9D, 0x00003FE9 //A8 = 2.5300880778252693946712766029e-07 +data8 0xEA12033DCE7B8ED9, 0x0000BFED //A7 = -6.9758403885461690048189307819e-06 +data8 0x9BA38C952A59D1A8, 0x00003FF2 //A6 = 1.4842878710882320255092707181e-04 +data8 0x99C0B55178FF0E38, 0x0000BFF6 //A5 = -2.3460810348048124421268761990e-03 +data8 0xD63402E798FEC896, 0x00003FF9 //A4 = 2.6147847817611456327417812320e-02 +data8 0xC354723906D95E92, 0x0000BFFC //A3 = -1.9075182412208257558294507774e-01 +LOCAL_OBJECT_END(Constants_Tgammal_sin) + +.align 64 +LOCAL_OBJECT_START(Constants_Tgammal_exp_64_Arg) +data4 0x00000000,0xB17217F4,0x00003FF2,0x00000000 // L_hi = hi part log(2)/2^12 +data4 0xF278ECE6,0xF473DE6A,0x00003FD4,0x00000000 // L_lo = lo part log(2)/2^12 +LOCAL_OBJECT_END(Constants_Tgammal_exp_64_Arg) + +LOCAL_OBJECT_START(Constants_Tgammal_exp_64_A) +data4 0xB1B736A0,0xAAAAAAAB,0x00003FFA,0x00000000 // A3 +data4 0x90CD6327,0xAAAAAAAB,0x00003FFC,0x00000000 // A2 +data4 0xFFFFFFFF,0xFFFFFFFF,0x00003FFD,0x00000000 // A1 +LOCAL_OBJECT_END(Constants_Tgammal_exp_64_A) + +LOCAL_OBJECT_START(Constants_Tgammal_exp_64_T1) +data4 0x3F800000,0x3F8164D2,0x3F82CD87,0x3F843A29 +data4 0x3F85AAC3,0x3F871F62,0x3F88980F,0x3F8A14D5 +data4 0x3F8B95C2,0x3F8D1ADF,0x3F8EA43A,0x3F9031DC +data4 0x3F91C3D3,0x3F935A2B,0x3F94F4F0,0x3F96942D +data4 0x3F9837F0,0x3F99E046,0x3F9B8D3A,0x3F9D3EDA +data4 0x3F9EF532,0x3FA0B051,0x3FA27043,0x3FA43516 +data4 0x3FA5FED7,0x3FA7CD94,0x3FA9A15B,0x3FAB7A3A +data4 0x3FAD583F,0x3FAF3B79,0x3FB123F6,0x3FB311C4 +data4 0x3FB504F3,0x3FB6FD92,0x3FB8FBAF,0x3FBAFF5B +data4 0x3FBD08A4,0x3FBF179A,0x3FC12C4D,0x3FC346CD +data4 0x3FC5672A,0x3FC78D75,0x3FC9B9BE,0x3FCBEC15 +data4 0x3FCE248C,0x3FD06334,0x3FD2A81E,0x3FD4F35B +data4 0x3FD744FD,0x3FD99D16,0x3FDBFBB8,0x3FDE60F5 +data4 0x3FE0CCDF,0x3FE33F89,0x3FE5B907,0x3FE8396A +data4 0x3FEAC0C7,0x3FED4F30,0x3FEFE4BA,0x3FF28177 +data4 0x3FF5257D,0x3FF7D0DF,0x3FFA83B3,0x3FFD3E0C +LOCAL_OBJECT_END(Constants_Tgammal_exp_64_T1) + +LOCAL_OBJECT_START(Constants_Tgammal_exp_64_T2) +data4 0x3F800000,0x3F80058C,0x3F800B18,0x3F8010A4 +data4 0x3F801630,0x3F801BBD,0x3F80214A,0x3F8026D7 +data4 0x3F802C64,0x3F8031F2,0x3F803780,0x3F803D0E +data4 0x3F80429C,0x3F80482B,0x3F804DB9,0x3F805349 +data4 0x3F8058D8,0x3F805E67,0x3F8063F7,0x3F806987 +data4 0x3F806F17,0x3F8074A8,0x3F807A39,0x3F807FCA +data4 0x3F80855B,0x3F808AEC,0x3F80907E,0x3F809610 +data4 0x3F809BA2,0x3F80A135,0x3F80A6C7,0x3F80AC5A +data4 0x3F80B1ED,0x3F80B781,0x3F80BD14,0x3F80C2A8 +data4 0x3F80C83C,0x3F80CDD1,0x3F80D365,0x3F80D8FA +data4 0x3F80DE8F,0x3F80E425,0x3F80E9BA,0x3F80EF50 +data4 0x3F80F4E6,0x3F80FA7C,0x3F810013,0x3F8105AA +data4 0x3F810B41,0x3F8110D8,0x3F81166F,0x3F811C07 +data4 0x3F81219F,0x3F812737,0x3F812CD0,0x3F813269 +data4 0x3F813802,0x3F813D9B,0x3F814334,0x3F8148CE +data4 0x3F814E68,0x3F815402,0x3F81599C,0x3F815F37 +LOCAL_OBJECT_END(Constants_Tgammal_exp_64_T2) + +LOCAL_OBJECT_START(Constants_Tgammal_exp_64_W1) +data8 0x0000000000000000, 0xBE384454171EC4B4 +data8 0xBE6947414AA72766, 0xBE5D32B6D42518F8 +data8 0x3E68D96D3A319149, 0xBE68F4DA62415F36 +data8 0xBE6DDA2FC9C86A3B, 0x3E6B2E50F49228FE +data8 0xBE49C0C21188B886, 0x3E64BFC21A4C2F1F +data8 0xBE6A2FBB2CB98B54, 0x3E5DC5DE9A55D329 +data8 0x3E69649039A7AACE, 0x3E54728B5C66DBA5 +data8 0xBE62B0DBBA1C7D7D, 0x3E576E0409F1AF5F +data8 0x3E6125001A0DD6A1, 0xBE66A419795FBDEF +data8 0xBE5CDE8CE1BD41FC, 0xBE621376EA54964F +data8 0x3E6370BE476E76EE, 0x3E390D1A3427EB92 +data8 0x3E1336DE2BF82BF8, 0xBE5FF1CBD0F7BD9E +data8 0xBE60A3550CEB09DD, 0xBE5CA37E0980F30D +data8 0xBE5C541B4C082D25, 0xBE5BBECA3B467D29 +data8 0xBE400D8AB9D946C5, 0xBE5E2A0807ED374A +data8 0xBE66CB28365C8B0A, 0x3E3AAD5BD3403BCA +data8 0x3E526055C7EA21E0, 0xBE442C75E72880D6 +data8 0x3E58B2BB85222A43, 0xBE5AAB79522C42BF +data8 0xBE605CB4469DC2BC, 0xBE589FA7A48C40DC +data8 0xBE51C2141AA42614, 0xBE48D087C37293F4 +data8 0x3E367A1CA2D673E0, 0xBE51BEBB114F7A38 +data8 0xBE6348E5661A4B48, 0xBDF526431D3B9962 +data8 0x3E3A3B5E35A78A53, 0xBE46C46C1CECD788 +data8 0xBE60B7EC7857D689, 0xBE594D3DD14F1AD7 +data8 0xBE4F9C304C9A8F60, 0xBE52187302DFF9D2 +data8 0xBE5E4C8855E6D68F, 0xBE62140F667F3DC4 +data8 0xBE36961B3BF88747, 0x3E602861C96EC6AA +data8 0xBE3B5151D57FD718, 0x3E561CD0FC4A627B +data8 0xBE3A5217CA913FEA, 0x3E40A3CC9A5D193A +data8 0xBE5AB71310A9C312, 0x3E4FDADBC5F57719 +data8 0x3E361428DBDF59D5, 0x3E5DB5DB61B4180D +data8 0xBE42AD5F7408D856, 0x3E2A314831B2B707 +LOCAL_OBJECT_END(Constants_Tgammal_exp_64_W1) + +LOCAL_OBJECT_START(Constants_Tgammal_exp_64_W2) +data8 0x0000000000000000, 0xBE641F2537A3D7A2 +data8 0xBE68DD57AD028C40, 0xBE5C77D8F212B1B6 +data8 0x3E57878F1BA5B070, 0xBE55A36A2ECAE6FE +data8 0xBE620608569DFA3B, 0xBE53B50EA6D300A3 +data8 0x3E5B5EF2223F8F2C, 0xBE56A0D9D6DE0DF4 +data8 0xBE64EEF3EAE28F51, 0xBE5E5AE2367EA80B +data8 0x3E47CB1A5FCBC02D, 0xBE656BA09BDAFEB7 +data8 0x3E6E70C6805AFEE7, 0xBE6E0509A3415EBA +data8 0xBE56856B49BFF529, 0x3E66DD3300508651 +data8 0x3E51165FC114BC13, 0x3E53333DC453290F +data8 0x3E6A072B05539FDA, 0xBE47CD877C0A7696 +data8 0xBE668BF4EB05C6D9, 0xBE67C3E36AE86C93 +data8 0xBE533904D0B3E84B, 0x3E63E8D9556B53CE +data8 0x3E212C8963A98DC8, 0xBE33138F032A7A22 +data8 0x3E530FA9BC584008, 0xBE6ADF82CCB93C97 +data8 0x3E5F91138370EA39, 0x3E5443A4FB6A05D8 +data8 0x3E63DACD181FEE7A, 0xBE62B29DF0F67DEC +data8 0x3E65C4833DDE6307, 0x3E5BF030D40A24C1 +data8 0x3E658B8F14E437BE, 0xBE631C29ED98B6C7 +data8 0x3E6335D204CF7C71, 0x3E529EEDE954A79D +data8 0x3E5D9257F64A2FB8, 0xBE6BED1B854ED06C +data8 0x3E5096F6D71405CB, 0xBE3D4893ACB9FDF5 +data8 0xBDFEB15801B68349, 0x3E628D35C6A463B9 +data8 0xBE559725ADE45917, 0xBE68C29C042FC476 +data8 0xBE67593B01E511FA, 0xBE4A4313398801ED +data8 0x3E699571DA7C3300, 0x3E5349BE08062A9E +data8 0x3E5229C4755BB28E, 0x3E67E42677A1F80D +data8 0xBE52B33F6B69C352, 0xBE6B3550084DA57F +data8 0xBE6DB03FD1D09A20, 0xBE60CBC42161B2C1 +data8 0x3E56ED9C78A2B771, 0xBE508E319D0FA795 +data8 0xBE59482AFD1A54E9, 0xBE2A17CEB07FD23E +data8 0x3E68BF5C17365712, 0x3E3956F9B3785569 +LOCAL_OBJECT_END(Constants_Tgammal_exp_64_W2) + + + +LOCAL_OBJECT_START(Constants_Tgammal_poly) + +// Polynomial coefficients for the tgammal(x), 2 <= |x| < 3 +//A5 = 2.8360780594841213109180699803e-02 + 2.2504152891014320704380000000e-19 +data8 0x3F9D0A9BC49353D2, 0x3C109AEA0F23CE2D +//A4 = 1.0967323400216015538699565468e-01 + 9.9225166000430644587276000000e-18 +data8 0x3FBC138B89492C5B, 0x3C66E138506D5652 +//A3 = 2.5387124684114281691904579930e-01 + 2.2667777637607113205546600000e-17 +data8 0x3FD03F6D2FA4F4F8, 0x3C7A2258DA8CD8B1 +data8 0xC5866457328BC39B, 0x00003FE3 //A20 = 5.7487331964156762795056629138e-09 +data8 0xE93D9F1ACD59C929, 0x0000BFE4 //A19= -1.3576396100397317396956445658e-08 +data8 0xE33389C8F6CBA813, 0x00003FE5 //A18 = 2.6449714924964597501721434271e-08 +data8 0x8FE7B25B9CD26D2A, 0x0000BFE7 //A17= -6.7011017946055513660266853311e-08 +data8 0xB89F4721BFBC15B0, 0x00003FE8 //A16 = 1.7194280320370423615174419192e-07 +data8 0xE49CBDC1874EBABA, 0x0000BFE9 //A15= -4.2582353660153782928729466776e-07 +data8 0x913AF50A336129CA, 0x00003FEB //A14 = 1.0820500665257088283172211622e-06 +data8 0xABCF0F7313B3B332, 0x0000BFEC //A13= -2.5601510627710417669568115706e-06 +//A2 = 6.5455857798133676439533701341e-01 + 1.3292075193155190798867000000e-18 +data8 0x3FE4F224D4B7E01C, 0x3C3885014A2B8319 +//A1 = 9.3473452162608550164435428087e-01 + 3.2785154201417136611642400000e-17 +data8 0x3FEDE9585F1A7093, 0x3C82E63C1B5028BF +//A0 = 1.3293403881791368004172682049e+00 + 2.2005689328949279282607500000e-16 +data8 0x3FF544FA6D47B38F, 0x3CAFB6AA9829E81F +data8 0xF3668F799997C76D, 0x00003FED //A12 = 7.2539039479124273660331538367e-06 +data8 0xD6C6BBD54CDEAEB1, 0x0000BFEE //A11= -1.2801665282681088568639378920e-05 +data8 0x809E4763B06F6883, 0x00003FF1 //A10 = 6.1329973609906572700697893187e-05 +data8 0x8443B000F8F9A71A, 0x00003FED //A9 = 3.9417864189995544394564413428e-06 +data8 0xC5C7E6D62A6991D8, 0x00003FF4 //A8 = 7.5447412886334708803357581519e-04 +data8 0xD2AF690725C62D88, 0x00003FF5 //A7 = 1.6074004848394703022110823298e-03 +data8 0xAA44E635D4B7B682, 0x00003FF8 //A6 = 1.0392403425906843901680697839e-02 +// +// Polynomial coefficients for the tgammal(x), 4 <= |x| < 5 +//A5 = 1.1600674810589555185913468449e+00 + 3.0229979112715124660731000000e-17 +data8 0x3FF28FA2EB44D22E, 0x3C816D285234C815 +//A4 = 3.1374268565470946334983182169e+00 + 1.3694868953995008497659600000e-16 +data8 0x400919734073B1E1, 0x3CA3BC83CD7E9565 +//A3 = 7.0834593993741057360580271052e+00 + 3.3899702569039156457249800000e-16 +data8 0x401C5576617B6C1F, 0x3CB86D6431213296 +data8 0xA4A5FB49C094966B, 0x00003FDA //A20 = 9.3591760106637809309720130828e-12 +data8 0xA9260DA0F51D7ED8, 0x00003FDD //A19 = 7.6919898428091669411809372180e-11 +data8 0xA16441DFB14BD6E1, 0x00003FE0 //A18 = 5.8713933014370867331213494535e-10 +data8 0x95F098D9C2234849, 0x00003FE3 //A17 = 4.3638234584169302324461091035e-09 +data8 0x8581817400E5AD2B, 0x00003FE6 //A16 = 3.1084260332429955234755367839e-08 +data8 0xE272940E373EBE15, 0x00003FE8 //A15 = 2.1089573544273993580820317236e-07 +data8 0xB6B3391145D226FB, 0x00003FEB //A14 = 1.3612217421122787182942706259e-06 +data8 0x8B9428C4DF95FCD5, 0x00003FEE //A13 = 8.3195416382628990683949003789e-06 +//A2 = 1.2665135075272345943631080445e+01 + 9.8721896915973874255877000000e-16 +data8 0x4029548C95A76F38, 0x3CD1C8BE715B8E13 +//A1 = 1.6154969393303069580269948347e+01 + 9.6850518810678379641029000000e-16 +data8 0x403027AC12FC1E1E, 0x3CD172711C15501B +//A0 = 1.1631728396567448058362970187e+01 + 8.7078125362814179268673000000e-16 +data8 0x40274371E7866C65, 0x3CCF5F8A1A5FACA0 +data8 0xC94A903114272C03, 0x00003FF0 //A12 = 4.7991576836334427243159066630e-05 +data8 0x8844262960E04BE6, 0x00003FF3 //A11 = 2.5990716419283017929486175141e-04 +data8 0xAC5418A76767678D, 0x00003FF5 //A10 = 1.3147621245497801180184809726e-03 +data8 0xCA231B6EFE959132, 0x00003FF7 //A9 = 6.1687358811367989146517222415e-03 +data8 0xDA38E39C13819D2A, 0x00003FF9 //A8 = 2.6638454961912040754759086920e-02 +data8 0xD696DF8D8389FE53, 0x00003FFB //A7 = 1.0477995539298934056097943975e-01 +data8 0xBDD5C153048BC435, 0x00003FFD //A6 = 3.7077144754791605130056406006e-01 +// +// Polynomial coefficients for the tgammal(x), 6 <= |x| < 7 +//A5 = 6.7169398121054200601065531373e+01 + 2.9481001527213915901489600000e-15 +data8 0x4050CAD76B377BA0, 0x3CEA8DDB2B2DE93E +//A4 = 1.6115104376855398982115730178e+02 + 1.3422421925418824418257300000e-14 +data8 0x406424D559BDC687, 0x3D0E397FDB5B33DC +//A3 = 3.1812194028053562533386866562e+02 + 3.9881709875858650942409600000e-14 +data8 0x4073E1F377A6CF73, 0x3D26738F63FE9C4C +data8 0xD6E1B5FF90CAABD3, 0x00003FE1 //A20 = 1.5634700199277480081025480635e-09 +data8 0xD451987B925DD37E, 0x00003FE4 //A19 = 1.2358576813211397717382327174e-08 +data8 0xBFC151B67FA58E6B, 0x00003FE7 //A18 = 8.9292951435632759686382657901e-08 +data8 0xA9034C5E1D67572E, 0x00003FEA //A17 = 6.2962205718327848327368724720e-07 +data8 0x8E40F6EAA30A71EC, 0x00003FED //A16 = 4.2394926442967995119170095258e-06 +data8 0xE3C3541B03A1C350, 0x00003FEF //A15 = 2.7151465666109594512258841637e-05 +data8 0xACE2E58436B2DDCE, 0x00003FF2 //A14 = 1.6487723793339152877117376243e-04 +data8 0xF7EAF8D8D1CAA3D1, 0x00003FF4 //A13 = 9.4573158112768812533636022369e-04 +//A2 = 4.8664351544258869353143381886e+02 + 4.7424047995944376868895400000e-14 +data8 0x407E6A4BD6D9463B, 0x3D2AB2868D79E192 +//A1 = 5.1615277644992545447166776285e+02 + 3.0901956935588717379242200000e-14 +data8 0x40802138E2DC003B, 0x3D216570FB601AEA +//A0 = 2.8788527781504433278314536437e+02 + 2.8213174117085164944959600000e-14 +data8 0x4071FE2A1911F7D6, 0x3D1FC3E4CF4DB5AF +data8 0xA72B88E48D3D1BAB, 0x00003FF7 //A12 = 5.1016252919939028020562237471e-03 +data8 0xD2EFB1067DB4FFB2, 0x00003FF9 //A11 = 2.5749059441230515023024615917e-02 +data8 0xF788AF9522205C24, 0x00003FFB //A10 = 1.2086617635601742290221382521e-01 +data8 0x861A6CE06CB29EAF, 0x00003FFE //A9 = 5.2384071807018493367136112163e-01 +data8 0x84FBDE0947718B58, 0x00004000 //A8 = 2.0778727617851237754568261869e+00 +data8 0xEEC1371E265A2C3A, 0x00004001 //A7 = 7.4610858525146049022238037342e+00 +data8 0xBF514B9BE68ED59D, 0x00004003 //A6 = 2.3914694993947572859629197920e+01 +// +// Polynomial coefficients for the tgammal(x), 8 <= |x| < 9 +//A5 = 5.8487447114416836484451778233e+03 + 4.7365465221455983144182900000e-13 +data8 0x40B6D8BEA568B6FD, 0x3D60AA4D44C2589B +//A4 = 1.2796464063087094473303295672e+04 + 1.2373341702514898266244200000e-12 +data8 0x40C8FE3B666B532D, 0x3D75C4752C5B4783 +//A3 = 2.2837606581322281272150576115e+04 + 2.6598064610627891398831000000e-13 +data8 0x40D64D66D23A7764, 0x3D52B77B3A10EA5C +data8 0xB23418F75B0BE22A, 0x00003FE9 //A20 = 3.3192989594206801808678663868e-07 +data8 0xA984A7BC8B856ED2, 0x00003FEC //A19 = 2.5260177918662350066375115788e-06 +data8 0x921A49729416372C, 0x00003FEF //A18 = 1.7416797068239475136398213598e-05 +data8 0xF5BB9415CC399CA4, 0x00003FF1 //A17 = 1.1717449586392814601938207599e-04 +data8 0xC50B91A40B81F9DF, 0x00003FF4 //A16 = 7.5166775151159345732094429036e-04 +data8 0x96002572326DB203, 0x00003FF7 //A15 = 4.5776541559407384162139204300e-03 +data8 0xD81A1A595E4157BA, 0x00003FF9 //A14 = 2.6379634345126284099420760736e-02 +data8 0x92B700D0CFECADD8, 0x00003FFC //A13 = 1.4327622675407940907282658100e-01 +//A2 = 3.1237895525940199149772524834e+04 + 3.1280450505163186432331700000e-12 +data8 0x40DE8179504C0878, 0x3D8B83BB33FBB766 +//A1 = 2.9192841741344487672904506326e+04 + 7.9300780509779689630767000000e-13 +data8 0x40DC8235DF171691, 0x3D6BE6C780EE54DF +//A0 = 1.4034407293483411194756627083e+04 + 1.4038139346291543309253700000e-12 +data8 0x40CB693422315F90, 0x3D78B23746113FCE +data8 0xBAE50807548BC711, 0x00003FFE //A12 = 7.3005724123917935346868107005e-01 +data8 0xDE28B1F57E68CFB6, 0x00004000 //A11 = 3.4712338349724065462763671443e+00 +data8 0xF4DCA5A5FF901118, 0x00004002 //A10 = 1.5303868912154033908205911714e+01 +data8 0xF85AAA1AD5E84E5E, 0x00004004 //A9 = 6.2088539523416399361048051373e+01 +data8 0xE5AA8BB1BF02934D, 0x00004006 //A8 = 2.2966619406617480799195651466e+02 +data8 0xBF6CFEFD67F59845, 0x00004008 //A7 = 7.6570306334640770654588802417e+02 +data8 0x8DB5D2F001635C29, 0x0000400A //A6 = 2.2673639984182571062068713002e+03 +// +// Polynomial coefficients for the tgammal(x), 10 <= |x| < 11 +//A5 = 7.2546009516580589115619659424e+05 + 1.0343348865365065212891728822e-10 +data8 0x412623A830B99290, 0x3DDC6E7C157611C4 +//A4 = 1.4756292870840241666883230209e+06 + 8.1516565365333844166705674775e-11 +data8 0x4136842D497E56AF, 0x3DD66837E4C3F9EE +//A3 = 2.4356116926500420086085796356e+06 + 3.5508860076560925641351069404e-10 +data8 0x4142950DD8A8C1AF, 0x3DF866C8E3DD0980 +data8 0xB7FD0D1EEAC38EB4, 0x00003FF1 //A20 = 8.7732544640091602721643775932e-05 +data8 0xA9345C64AC750AE9, 0x00003FF4 //A19 = 6.4546407626804942279126469603e-04 +data8 0x8BEABC81BE1E93C9, 0x00003FF7 //A18 = 4.2699261134524096128048819443e-03 +data8 0xE1CD281EDD7315F8, 0x00003FF9 //A17 = 2.7563646660310313164706189622e-02 +data8 0xAD8A5BA6D0FD9758, 0x00003FFC //A16 = 1.6947310643831556048460963841e-01 +data8 0xFCDDA464AD3F182E, 0x00003FFE //A15 = 9.8775699098518676937088606052e-01 +data8 0xAE0DCE2F7B60D1AE, 0x00004001 //A14 = 5.4391852309591064073782104822e+00 +data8 0xE1745D9ABEB8D1A7, 0x00004003 //A13 = 2.8181819161363002758615770457e+01 +//A2 = 3.0619656223573554307222366333e+06 + 1.0819940302945474471259520006e-10 +data8 0x41475C66CFA967E4, 0x3DDDBDDB2A27334B +//A1 = 2.6099413018962685018777847290e+06 + 3.6851882860056025385268615240e-10 +data8 0x4143E98AA6A48974, 0x3DF9530D42589AB6 +//A0 = 1.1332783889487853739410638809e+06 + 1.9339350553312096248591829758e-10 +data8 0x41314ADE639225C9, 0x3DEA946DD6C2C8D3 +data8 0x88BCFAAE71812A1C, 0x00004006 //A12 = 1.3673820009490115307300592012e+02 +data8 0x9A770F5AB540A326, 0x00004008 //A11 = 6.1786031215382040427126476507e+02 +data8 0xA170C1D2C6B413FC, 0x0000400A //A10 = 2.5830473201524594051391525170e+03 +data8 0x9AE56061CB02EB55, 0x0000400C //A9 = 9.9133441230507404119297200255e+03 +data8 0x872390769650FBE2, 0x0000400E //A8 = 3.4595564309496661629764193479e+04 +data8 0xD3E5E8D6923910C1, 0x0000400F //A7 = 1.0849181904819284819615140521e+05 +data8 0x930D70602F50B754, 0x00004011 //A6 = 3.0116351174131169193070583741e+05 +// +// Polynomial coefficients for the tgammal(x), 12 <= |x| < 13 +//A5 = 1.2249876249976964294910430908e+08 + 6.0051348061679753770848000000e-09 +data8 0x419D34BB29FFC39D, 0x3E39CAB72E01818D +//A4 = 2.3482765927605420351028442383e+08 + 1.1874729051592862323641700000e-08 +data8 0x41ABFE5F168D56FA, 0x3E4980338AA7B04B +//A3 = 3.6407329688125067949295043945e+08 + 2.6657200942150363994658700000e-08 +data8 0x41B5B35150E199A5, 0x3E5C9F79C0EB5300 +data8 0xE89AE0F8D726329D, 0x00003FF9 //A20 = 2.8394164465429105626588451540e-02 +data8 0xCF90981F86E38013, 0x00003FFC //A19 = 2.0270002071785908652476845915e-01 +data8 0xA56C658079CA8C4A, 0x00003FFF //A18 = 1.2923704984019263122675412350e+00 +data8 0x80AEF96A67C5615A, 0x00004002 //A17 = 8.0427183300456238315262463506e+00 +data8 0xBE886D7529678931, 0x00004004 //A16 = 4.7633230047847868242503413461e+01 +data8 0x858EDBA4CE2F7508, 0x00004007 //A15 = 2.6711607799594541057655957154e+02 +data8 0xB0B0A3AF388274F0, 0x00004009 //A14 = 1.4135199810126975119809102782e+03 +data8 0xDBA87137988751EF, 0x0000400B //A13 = 7.0290552818218513870879313985e+03 +//A2 = 4.2828433593031734228134155273e+08 + 3.9760422293645854535247300000e-08 +data8 0x41B98719AFEE2947, 0x3E6558A17E0D3007 +//A1 = 3.4008253676084774732589721680e+08 + 1.2558352335001093116071000000e-09 +data8 0x41B4453F68C2C6EB, 0x3E159338C5BC7EC3 +//A0 = 1.3684336546556583046913146973e+08 + 2.6786516700381562934240300000e-08 +data8 0x41A05020CAEE5EA5, 0x3E5CC3058A858579 +data8 0xFF5E3940FB4BA576, 0x0000400D //A12 = 3.2687111823895439312116108631e+04 +data8 0x8A08C124C7F74B6C, 0x00004010 //A11 = 1.4134701786994123329786229006e+05 +data8 0x89D701953540BFFB, 0x00004012 //A10 = 5.6459209892773907605385652281e+05 +data8 0xFC46344B3116C3AD, 0x00004013 //A9 = 2.0666305367147234406757715163e+06 +data8 0xD183EBD7A400151F, 0x00004015 //A8 = 6.8653979211730981618367536737e+06 +data8 0x9C083A40742112F4, 0x00004017 //A7 = 2.0451444503543981795037456447e+07 +data8 0xCD3C475B1A8B6662, 0x00004018 //A6 = 5.3801245423495149598177886823e+07 +LOCAL_OBJECT_END(Constants_Tgammal_poly) + + +LOCAL_OBJECT_START(Constants_Tgammal_poly_splitted) + +// Polynomial coefficients for the tgammal(x), 1 <= |x| < 1.25 +//A5 = -9.8199506890310417350775651357e-01+ -3.2546247786122976510752200000e-17 +data8 0xBFEF6C80EC38B509, 0xBC82C2FA7A3DE3BD +//A4 = 9.8172808683439960475425323239e-01 + 4.4847611775298520359811400000e-17 +data8 0x3FEF6A51055096B0, 0x3C89DA56DE95EFE4 +//A3 = -9.0747907608088618225394839101e-01 +-1.0244057366544064435443970000e-16 +data8 0xBFED0A118F324B62, 0xBC9D86C7B9EBCFFF +data8 0xB8E3FDAA66CC738E, 0x00003FFB //A20 = 9.0278608095877488976217714815e-02 +data8 0xA76067AE1738699C, 0x0000BFFD //A19 =-3.2690738678103132837070881737e-01 +data8 0x9D66B13718408C44, 0x00003FFE //A18 = 6.1484820933424283818320582920e-01 +data8 0xD4AC67BBB4AE5599, 0x0000BFFE //A17 =-8.3075569470082063491389474937e-01 +data8 0xF1426ED1C1488DB3, 0x00003FFE //A16 = 9.4241993542644505594957058785e-01 +data8 0xFC12EB07AA6F4B6B, 0x0000BFFE //A15 =-9.8466366707947121954333549690e-01 +data8 0xFF2B32CFE5B0DDC8, 0x00003FFE //A14 = 9.9675290656677214804168895915e-01 +data8 0xFFD8E7E6FF3662EA, 0x0000BFFE //A13 =-9.9940347089360552383472582319e-01 +//A2 = 9.8905599532797250361682017683e-01 + 5.1760162410376024240867300000e-17 +data8 0x3FEFA658C23B1578, 0x3C8DD673A61F6FE7 +//A1 = -5.7721566490153275452712478000e-01+ -1.0607935612223465065923310000e-16 +data8 0xBFE2788CFC6FB618, 0xBC9E9346622D53B7 +//A0 = 9.9999999999999988897769753748e-01 + 1.1102230245372554544790880000e-16 +data8 0x3FEFFFFFFFFFFFFF, 0x3C9FFFFFFFF51E4E +data8 0xFFF360DF628F0BC9, 0x00003FFE //A12 = 9.9980740979895815468216470840e-01 +data8 0xFFEF8F9A72B40480, 0x0000BFFE //A11 = -9.9974916001038145045939523470e-01 +data8 0xFFE037B8C7E39952, 0x00003FFE //A10 = 9.9951504002809911822597567307e-01 +data8 0xFFC01E08F348BED2, 0x0000BFFE //A9 = -9.9902522772325406705059517941e-01 +data8 0xFF83DAC83119B52C, 0x00003FFE //A8 = 9.9810569179053383842734164901e-01 +data8 0xFEF9F8AB891ABB24, 0x0000BFFE //A7 = -9.9600176036720260345608796766e-01 +data8 0xFE3F0537573C8235, 0x00003FFE //A6 = 9.9314911461918778676646301341e-01 +// +// Polynomial coefficients for the tgammal(x), 1.25 <= |x| < 1.75 +//A5 = -7.7523052299853054125655660300e-02+ -1.2693512521686721504433600000e-17 +data8 0xBFB3D88CFE50601B, 0xBC6D44ED60EE2170 +//A4 = 1.4464535904462152982041800442e-01 + 2.5426820829345729856648800000e-17 +data8 0x3FC283BD374EB2A9, 0x3C7D50AC436187C3 +//A3 = -1.0729480456477220873257039102e-01+ -6.2429894945456418196551000000e-18 +data8 0xBFBB77AC1CA2EBA5, 0xBC5CCA6BCC422D41 +data8 0xF732D2689F323283, 0x00003FF2 //A20 = 2.3574688251652899567587145422e-04 +data8 0xB6B00E23DE89D13A, 0x0000BFF3 //A19 =-3.4844916488842618776630058875e-04 +data8 0xE98396FE4A1B2799, 0x00003FF3 //A18 =4.4539265198744452020440735977e-04 +data8 0xAF8D235A640DB1A2, 0x0000BFF4 //A17 =-6.6967514303333563295261178346e-04 +data8 0x8513B736C918B261, 0x00003FF5 //A16 = 1.0152970456990865810615917715e-03 +data8 0xC790A1A2C78D8E17, 0x0000BFF5 //A15 =-1.5225598630329403515321688394e-03 +data8 0x959706CFA638CDE2, 0x00003FF6 //A14 = 2.2825614575133879623648932383e-03 +data8 0xE050A6021E129860, 0x0000BFF6 //A13 =-3.4227757733947066666295285936e-03 +//A2 = 4.1481345368830113695679528973e-01 + 3.1252439808354284892632100000e-17 +data8 0x3FDA8C4DBA620D56, 0x3C82040BCB483C76 +//A1 = 3.2338397448885010387886751460e-02 + 3.4437825798552300531443100000e-18 +data8 0x3FA08EA88EE561B1, 0x3C4FC366D6C64806 +//A0 = 8.8622692545275794095971377828e-01 + 7.2689375867553992399219000000e-17 +data8 0x3FEC5BF891B4EF6A, 0x3C94F3877D311C0C +data8 0xA8275AADC09D16FC, 0x00003FF7 //A12 = 5.1316445128621071486146117136e-03 +data8 0xFBFE2CE9215267A2, 0x0000BFF7 //A11= -7.6902121820788373000579382408e-03 +data8 0xBCC8EEAB67ECD91D, 0x00003FF8 //A10 = 1.1522515369164312742737727262e-02 +data8 0x8D1614BB97E5E8C2, 0x0000BFF9 //A9 = -1.7222443097804730395560633583e-02 +data8 0xD3A963578BE291E3, 0x00003FF9 //A8 = 2.5837606456090186343624210891e-02 +data8 0x9BA7EAE64C42FDF7, 0x0000BFFA //A7 = -3.8001935555045161419575037512e-02 +data8 0xF0115BA1A77607E7, 0x00003FFA //A6 = 5.8610303817173477119764956736e-02 +// +// Polynomial coefficients for the tgammal(x), 1.75 <= |x| < 2.0 +//A5 = 2.6698206874501426502654943818e-04 + 3.4033756836921062797887300000e-20 +data8 0x3F317F3740FE2A68, 0x3BE417093234B06E +//A4 = 7.4249010753513894345090307070e-02 + 3.9810018444482764697014200000e-18 +data8 0x3FB301FBB0F25A92, 0x3C525BEFFABB622F +//A3 = -8.1576919247086265851720554565e-02+ -5.2716624487804746360745000000e-19 +data8 0xBFB4E239984650AC, 0xBC2372F1C4F276FF +data8 0xFEF3AEE71038E9A3, 0x00003FEB //A20 = 1.8995395865421509009969188571e-06 +data8 0xA11CFA2672BF876A, 0x0000BFEB //A19 =-1.2003868221414015771269244270e-06 +data8 0xF8E107215DAE2164, 0x00003FEC //A18 = 3.7085863210303833432006027217e-06 +data8 0xBCDDD3FC011EF7D6, 0x00003FEC //A17 = 2.8143303971756051015245433043e-06 +data8 0x8683C4687FA22E68, 0x00003FEE //A16 = 8.0177018464360416764308252462e-06 +data8 0xFDA09E5D33E32968, 0x00003FEE //A15 = 1.5117372062443781157389064848e-05 +data8 0xFFB00D0CFF4089B4, 0x00003FEF //A14 = 3.0480348961227424242198174995e-05 +data8 0xFEF6C39566785085, 0x00003FF0 //A13 = 6.0788135974125244644334004947e-05 +//A2 = 4.1184033042643969357854416558e-01 + 1.2103396182129232634761000000e-18 +data8 0x3FDA5B978B96BEBF, 0x3C3653AAD0A139E4 +//A1 = -4.2278433509846713445057275749e-01+ -4.9429151528135657430413000000e-18 +data8 0xBFDB0EE6072093CE, 0xBC56CB907027554F +//A0 = 1.0000000000000000000000000000e+00 + 1.0969171200000000000000000000e-31 +data8 0x3FF0000000000000, 0x3981CC6A5B20B4D5 +data8 0xFF2B7BA9A8D68C37, 0x00003FF1 //A12 = 1.2167446884801403650547161615e-04 +data8 0xFCA53468E3692EF1, 0x00003FF2 //A11 = 2.4094136329542400976250900707e-04 +data8 0x808D698A9C993615, 0x00003FF4 //A10 = 4.9038845704938303659791698883e-04 +data8 0xF10F8E3FB8BB4AFB, 0x00003FF4 //A9 = 9.1957383840999861214472423976e-04 +data8 0x89E224E42F93F005, 0x00003FF6 //A8 = 2.1039333407187324139473634747e-03 +data8 0xBAF374824937A323, 0x00003FF6 //A7 = 2.8526458211545152218493600470e-03 +data8 0xB6BF7564F52140C6, 0x00003FF8 //A6 = 1.1154045718131014476684982178e-02 +// +// Polynomial coefficients for the tgammal(x), 0.0 <= |x| < 0.125 +//A5 = -9.8199506890314514073736518185e-01+ -5.9363811993837985890950900000e-17 +data8 0xBFEF6C80EC38B67A, 0xBC911C46B447C81F +//A4 = 9.8172808683440015986576554496e-01 + 2.7457414262802803699834200000e-17 +data8 0x3FEF6A51055096B5, 0x3C7FA7FF90ACAD1F +//A3 = -9.0747907608088618225394839101e-01 + -1.0676255850934306734701780000e-16 +data8 0xBFED0A118F324B62, 0xBC9EC5AFB633438D +data8 0x9217E83FA207CB80, 0x00003FFD //A20 = 2.8533864762086088781083621561e-01 +data8 0xA8DABFA52FDF03EC, 0x0000BFFE //A19= -6.5958783896337186303285832783e-01 +data8 0xE331ED293AF39F9B, 0x00003FFE //A18 = 8.8748056656454687449654731184e-01 +data8 0xF9163C5DDB52419D, 0x0000BFFE //A17= -9.7299554149078295602977718525e-01 +data8 0xFEC0A1C672CB9265, 0x00003FFE //A16 = 9.9512683005268190987854104489e-01 +data8 0xFFD2D65B8EA7B5F4, 0x0000BFFE //A15= -9.9931087241443958201592847861e-01 +data8 0xFFF93AA39EE53445, 0x00003FFE //A14 = 9.9989668364186884793382816496e-01 +data8 0xFFFB99A9A3F5F480, 0x0000BFFE //A13= -9.9993286506283835663204999212e-01 +//A2 = 9.8905599532797250361682017683e-01 + 5.1778575360788420716540100000e-17 +data8 0x3FEFA658C23B1578, 0x3C8DD92B45408D07 +//A1 = -5.7721566490153275452712478000e-01+ -1.0607938730998824663273110000e-16 +data8 0xBFE2788CFC6FB618, 0xBC9E9346F8FDE55B +//A0 = 9.9999999999999988897769753748e-01 + 1.1102230246251564036631420000e-16 +data8 0x3FEFFFFFFFFFFFFF, 0x3C9FFFFFFFFFFFFF +data8 0xFFF7FEBB545812C1, 0x00003FFE //A12 = 9.9987785409425126648628395084e-01 +data8 0xFFF00C02E943A3F2, 0x0000BFFE //A11= -9.9975657530855116454438747397e-01 +data8 0xFFE0420AADC53820, 0x00003FFE //A10 = 9.9951565514290485919027183699e-01 +data8 0xFFC01EB42EF27EEB, 0x0000BFFE //A9 = -9.9902526759155739377365522320e-01 +data8 0xFF83DAD0BF23FF12, 0x00003FFE //A8 = 9.9810569378236378800364235948e-01 +data8 0xFEF9F8ABDBCDB2F3, 0x0000BFFE //A7 = -9.9600176044241699109053158187e-01 +data8 0xFE3F05375988491D, 0x00003FFE //A6 = 9.9314911462127599008937257662e-01 +LOCAL_OBJECT_END(Constants_Tgammal_poly_splitted) + +.align 64 +LOCAL_OBJECT_START(Constants_Tgammal_common) +// Positive overflow value +data8 0x3FE0000000000000 // 0.5 +data8 0x3FF8000000000000 // 1.5 +data8 0x3FD0000000000000 // 0.25 +data8 0x0000000000000000 // 0 +data8 0xDB718C066B352E21, 0x00004009 // Positive overflow value +LOCAL_OBJECT_END(Constants_Tgammal_common) + + + +//======================================================= +// Lgamma registers + +// General Purpose Registers +GR_l_Log_Table = r33 +GR_l_Log_Table1 = r34 +GR_l_BIAS = r34 +GR_l_Index1 = r35 +GR_l_Index2 = r36 +GR_l_signif_Z = r37 +GR_l_X_0 = r38 +GR_l_X_1 = r39 +GR_l_X_2 = r40 +GR_l_Z_1 = r41 +GR_l_Z_2 = r42 +GR_l_N = r43 +GR_l_Index3 = r44 +GR_l_Stirling_Table = r45 +GR_l_N_Unbiased = r46 + +// Floating Point Registers +FR_l_logl_X = f8 + +FR_l_h_3 = f10 +FR_l_poly_hi = f10 +FR_l_W = f11 +FR_l_S = f12 +FR_l_GS_hi = f13 +FR_l_Y_lo = f13 +FR_l_r_cor = f14 +FR_l_G_1 = f15 +FR_l_G = f15 +FR_l_H_1 = f32 +FR_l_H = f32 +FR_l_h = f33 +FR_l_h_1 = f33 +FR_l_N = f33 +FR_l_G_2 = f34 +FR_l_H_2 = f35 +FR_l_h_2 = f36 +FR_l_G_3 = f37 +FR_l_log2_hi = f38 +FR_l_GS_lo = f39 +FR_l_H_3 = f40 +FR_l_float_N = f41 +FR_l_Q_4 = f42 +FR_l_Q_3 = f43 +FR_l_Q_2 = f44 +FR_l_Q_1 = f45 +FR_l_Q_5 = f46 +FR_l_Q_6 = f47 +FR_l_log2_lo = f48 +FR_l_r = f49 +FR_l_poly_lo = f50 +FR_l_poly = f51 +FR_l_rsq = f52 +FR_l_Y_lo_res = f53 + +FR_l_Y0 = f55 +FR_l_Q0 = f56 +FR_l_E0 = f57 +FR_l_E2 = f58 +FR_l_E1 = f59 +FR_l_Y1 = f60 +FR_l_E3 = f61 +FR_l_Y2 = f62 + +FR_l_Z = f63 +FR_l_Z2 = f64 +FR_l_Z4 = f65 +FR_l_Z8 = f66 + +FR_l_CH = f67 +FR_l_CL = f68 + +FR_l_B2 = f69 +FR_l_B4 = f70 +FR_l_B6 = f71 +FR_l_B8 = f72 +FR_l_B10 = f73 +FR_l_B12 = f74 +FR_l_B14 = f75 +FR_l_B16 = f76 +FR_l_B18 = f77 +FR_l_Half = f78 +FR_l_SS = f79 +FR_l_AbsX_m_Half = f80 +FR_l_CXH = f81 +FR_l_CXL = f82 +FR_l_SSCXH = f83 +FR_l_SSCXL = f84 +FR_l_XYH = f85 +FR_l_XYL = f86 +FR_l_Temp = f87 + +FR_l_logl_YHi = f88 +FR_l_logl_YLo = f89 + +FR_l_SignedXYH = f123 + +FR_l_AbsX = f127 + + + +//======================================================= +// Negative part registers + +// General Purpose Registers +GR_n_sin_Table = r47 +GR_n_XN = r48 + +// Float point registers +FR_n_IXNS = f125 +FR_n_IXN = f126 + +FR_n_XNS = f90 +FR_n_XS = f91 +FR_n_XS2 = f92 +FR_n_XS2L = f93 +FR_n_XS4 = f94 +FR_n_XS7 = f95 +FR_n_XS8 = f96 +FR_n_TT = f97 +FR_n_TH = f98 +FR_n_TL = f99 + +FR_n_A2H = f100 +FR_n_A2L = f101 +FR_n_A1H = f102 +FR_n_A1L = f103 +FR_n_A9 = f104 +FR_n_A8 = f105 +FR_n_A7 = f106 +FR_n_A6 = f107 +FR_n_A5 = f108 +FR_n_A4 = f109 +FR_n_A3 = f110 + +FR_n_PolyH = f111 +FR_n_PolyL = f112 + +FR_n_Poly1H = f113 +FR_n_SinxH = f113 // the same as FR_n_Poly1H +FR_n_Poly1L = f114 +FR_n_SinxL = f114 // the same as FR_n_Poly1L + +FR_n_Tail = f115 +FR_n_NegOne = f116 + +FR_n_Y0 = f117 + +FR_n_Q0 = f118 +FR_n_E0 = f119 + +FR_n_E2 = f120 +FR_n_E1 = f121 + +FR_n_Y1 = f55 +FR_n_E3 = f56 + +FR_n_Y2 = f57 +FR_n_R0 = f58 + +FR_n_E4 = f59 +FR_n_RcpResH = f60 + +FR_n_Y3 = f61 +FR_n_R1 = f62 +FR_n_Temp = f63 + +FR_n_RcpResL = f64 + +FR_n_ResH = f65 +FR_n_ResL = f66 + + + + +//======================================================= +// Exp registers + +// General Purpose Registers +GR_e_ad_Arg = r33 +GR_e_ad_A = r34 +GR_e_signexp_x = r35 +GR_e_exp_x = r35 +GR_e_exp_mask = r36 +GR_e_ad_W1 = r37 +GR_e_ad_W2 = r38 +GR_e_M2 = r39 +GR_e_M1 = r40 +GR_e_K = r41 +GR_e_exp_2_mk = r42 +GR_e_exp_2_k = r43 +GR_e_ad_T1 = r44 +GR_e_ad_T2 = r45 +GR_e_N_fix = r46 +GR_e_one = r47 +GR_e_exp_bias = r48 +GR_e_sig_inv_ln2 = r49 +GR_e_rshf_2to51 = r50 +GR_e_exp_2tom51 = r51 +GR_e_rshf = r52 + +// Floating Point Registers +FR_e_RSHF_2TO51 = f10 +FR_e_INV_LN2_2TO63 = f11 +FR_e_W_2TO51_RSH = f12 +FR_e_2TOM51 = f13 +FR_e_RSHF = f14 +FR_e_Y_hi = f15 +FR_e_Y_lo = f32 +FR_e_scale = f33 +FR_e_float_N = f34 +FR_e_N_signif = f35 +FR_e_L_hi = f36 +FR_e_L_lo = f37 +FR_e_r = f38 +FR_e_W1 = f39 +FR_e_T1 = f40 +FR_e_W2 = f41 +FR_e_T2 = f42 +FR_e_W1_p1 = f43 +FR_e_rsq = f44 +FR_e_A2 = f45 +FR_e_r4 = f46 +FR_e_A3 = f47 +FR_e_poly = f48 +FR_e_T = f49 +FR_e_W = f50 +FR_e_Wp1 = f51 +FR_e_r6 = f52 +FR_e_2_mk = f53 +FR_e_A1 = f54 +FR_e_T_scale = f55 +FR_e_result_lo = f56 +FR_e_W_T_scale = f57 +FR_e_Wp1_T_scale = f58 + +FR_e_expl_Input_X = f123 +FR_e_expl_Input_Y = f124 +FR_e_expl_Output_X = f123 +FR_e_expl_Output_Y = f124 + + +FR_e_expl_Input_AbsX = f122 + + + +//======================================================= +// Common registers + +// General Purpose Registers +GR_c_Table = r53 +GR_c_NegUnderflow = r54 +GR_c_NegSingularity = r55 +GR_c_X = r56 +GR_c_SignBit = r57 +GR_c_13 = r58 + + +// Floating Point Registers +FR_c_PosOverflow = f123 +FR_c_XN = f124 + + +//======================================================= +// Polynomial part registers + +// General Purpose Registers +GR_p_Table = r59 +GR_p_XN = r33 +GR_p_Table2 = r34 +GR_p_Int = r35 +GR_p_Offset = r36 +GR_p_Offset2 = r38 +GR_p_X_Sgnd = GR_l_signif_Z // = r37 +GR_p_Exp = r61 +GR_p_Bias = r62 +GR_p_0p75 = r63 + +// Floating Point Registers +FR_p_AbsX = FR_l_AbsX // = f127 +FR_p_IXN = FR_n_IXN // = f126 +FR_p_XN = f32 +FR_p_0p5 = f33 +FR_p_1p5 = f34 +FR_p_AbsXM1 = f35 +FR_p_2 = f36 + +FR_p_A20 = f37 +FR_p_A19 = f38 +FR_p_A18 = f39 +FR_p_A17 = f40 +FR_p_A16 = f41 +FR_p_A15 = f42 +FR_p_A14 = f43 +FR_p_A13 = f44 +FR_p_A12 = f45 +FR_p_A11 = f46 +FR_p_A10 = f47 +FR_p_A9 = f48 +FR_p_A8 = f49 +FR_p_A7 = f50 +FR_p_A6 = f51 +FR_p_A5H = f52 +FR_p_A5L = f53 +FR_p_A4H = f54 +FR_p_A4L = f55 +FR_p_A3H = f56 +FR_p_A3L = f57 +FR_p_A2H = f58 +FR_p_A2L = f59 +FR_p_A1H = f60 +FR_p_A1L = f61 +FR_p_A0H = f62 +FR_p_A0L = f63 + +FR_p_XR = f64 +FR_p_XR2 = f65 +FR_p_XR2L = f52 + +FR_p_XR3 = f58 +FR_p_XR3L = f38 + +FR_p_XR4 = f42 +FR_p_XR6 = f40 +FR_p_XR8 = f37 + +FR_p_Poly5H = f66 +FR_p_Poly5L = f67 +FR_p_Poly4H = f53 +FR_p_Poly4L = f44 +FR_p_Poly3H = f41 +FR_p_Poly3L = f47 +FR_p_Poly2H = f68 +FR_p_Poly2L = f54 +FR_p_Poly1H = f55 +FR_p_Poly1L = f46 +FR_p_Poly0H = f39 +FR_p_Poly0L = f43 + +FR_p_Temp5H = f69 +FR_p_Temp5L = f70 +FR_p_Temp4H = f71 +FR_p_Temp4L = f60 +FR_p_Temp2H = f72 +FR_p_Temp2L = f73 +FR_p_Temp1H = f59 +FR_p_Temp1L = f61 +FR_p_Temp0H = f49 +FR_p_Temp0L = f48 +FR_p_PolyTail = f45 +FR_p_OddPoly0H = f56 +FR_p_OddPoly0L = f51 + +FR_p_0p25 = f73 + + +//======================================================= +// Negative polynomial part registers +// General Purpose Registers +GR_r_sin_Table = r47 +GR_r_sin_Table2 = r60 + +// Floating Point Registers +FR_r_IXNS = FR_n_IXNS +FR_r_IXN = FR_n_IXN + +FR_r_AbsX = FR_l_AbsX + +FR_r_A9 = f74 +FR_r_A8 = f75 +FR_r_A7 = f76 +FR_r_A6 = f77 +FR_r_A5 = f78 +FR_r_A4 = f79 +FR_r_A3 = f80 +FR_r_A2H = f81 +FR_r_A2L = f82 +FR_r_A1H = f83 +FR_r_A1L = f84 + +FR_r_XNS = f85 +FR_r_XS = f86 +FR_r_XS2 = f87 +FR_r_XS2L = f88 +FR_r_XS4 = f89 +FR_r_XS7 = f90 +FR_r_XS8 = f91 + +FR_r_Tail = f92 + +FR_r_TT = f93 +FR_r_TH = f94 +FR_r_TL = f95 + +FR_r_ResH = f96 +FR_r_ResL = f97 + +FR_r_Res3H = f98 +FR_r_Res3L = f99 + +FR_r_Res1H = f100 +FR_r_Res1L = f101 + + + +FR_r_Y0 = f102 +FR_r_Q0 = f103 +FR_r_E0 = f104 +FR_r_E2 = f105 +FR_r_E1 = f106 +FR_r_Y1 = f107 +FR_r_E3 = f108 +FR_r_Y2 = f109 +FR_r_R0 = f110 +FR_r_E4 = f111 +FR_r_ZH = f112 +FR_r_Y3 = f113 +FR_r_R1 = f114 +FR_r_ZHN = f115 +FR_r_ZL = f115 +FR_r_NegOne = f116 + +FR_z_Y0 = f102 +FR_z_Q0 = f103 +FR_z_E0 = f104 +FR_z_E2 = f105 +FR_z_E1 = f106 +FR_z_Y1 = f107 +FR_z_E3 = f108 +FR_z_Y2 = f109 +FR_z_R0 = f110 +FR_z_E4 = f111 +FR_z_ZH = f112 +FR_z_Y3 = f113 +FR_z_R1 = f114 +FR_z_ZL = f115 + + +// General Purpose Registers +GR_SAVE_PFS = r32 +GR_DenOverflow = r33 +GR_u_XN = r34 + +GR_SAVE_B0 = r35 +GR_SAVE_GP = r36 +GR_SAVE_SP = r37 + +// Floating Point Registers +FR_u_IXN = f34 + + +// ERROR HANDLER REGISTERS +GR_Parameter_X = r64 +GR_Parameter_Y = r65 +GR_Parameter_RESULT = r66 +GR_Parameter_TAG = r67 + +FR_RESULT = f8 +FR_X = f32 +FR_Y = f1 + + +.section .text +GLOBAL_LIBM_ENTRY(tgammal) +{ .mfi + alloc r32 = ar.pfs,0,32,4,0 + fabs FR_l_AbsX = f8 // Get absolute value of X + addl GR_n_sin_Table = @ltoff(Constants_Tgammal_sin), gp +} +{ .mfi + addl GR_l_Log_Table=@ltoff(Constants_Tgammal_log_80_Z_G_H_h1#),gp + nop.f 0 + addl GR_l_Stirling_Table = @ltoff(Constants_Tgammal_stirling), gp +};; + +{ .mfi + getf.sig GR_l_signif_Z = f8 // Significand of X + fcvt.fx.s1 FR_n_IXNS = f8 // Convert to fixed point + addl GR_c_Table = @ltoff(Constants_Tgammal_common), gp +} +{ .mfi + ld8 GR_l_Log_Table = [GR_l_Log_Table] + nop.f 0 + addl GR_p_Table = @ltoff(Constants_Tgammal_poly), gp +};; + +{ .mfi + ld8 GR_n_sin_Table = [GR_n_sin_Table] + fclass.m p6,p0 = f8,0x1EF // Check x for NaN, 0, INF, denorm + // NatVal. + addl GR_c_NegSingularity = 0x1003E, r0 +} +{ .mlx + ld8 GR_l_Stirling_Table = [GR_l_Stirling_Table] + movl GR_c_13 = 0x402A000000000000 // 13.0 +};; + +{ .mfi + getf.d GR_c_X = f8 // Double prec. X to general register + frcpa.s1 FR_z_Y0,p0 = f1,f8 // y = frcpa(x) (for negatives) + extr.u GR_l_Index1 = GR_l_signif_Z, 59, 4 // = High 4 bits of Z +} +{ .mlx + ld8 GR_c_Table = [GR_c_Table] + movl GR_c_SignBit = 0x8000000000000000 // High bit (sign) +};; + +{ .mfi + ld8 GR_p_Table = [GR_p_Table] + fcmp.lt.s1 p15, p14 = f8,f0 // p14 - positive arg, p15 - negative + shl GR_l_Index1 = GR_l_Index1,5 // Adjust Index1 ptr (x32) +} +{ .mfb + adds GR_c_NegUnderflow = 1765, r0 + nop.f 0 +(p6) br.cond.spnt tgammal_spec // Spec. values processing branch //////////// + // (0s, INFs, NANs, NatVals, denormals) ////// +};; + +{ .mfi + ldfpd FR_l_CH,FR_l_CL= [GR_l_Stirling_Table], 16 // Load CH, CL + fcvt.fx.trunc.s1 FR_n_IXN = FR_l_AbsX // Abs arg to int by trunc + extr.u GR_l_X_0 = GR_l_signif_Z, 49, 15 // High 15 bit of Z +} +{ .mfi + add GR_l_Index1 = GR_l_Index1,GR_l_Log_Table // Add offset + fma.s1 FR_p_2 = f1, f1, f1 // 2.0 + andcm GR_c_X = GR_c_X, GR_c_SignBit // Remove sign +};; + +{ .mfi + addl GR_l_Log_Table = @ltoff(Constants_Tgammal_log_80_Z_G_H_h2#), gp + fcmp.lt.s1 p10, p0 = FR_l_AbsX, f1 // If |X|<1 then p10 = 1 + nop.i 0 +} +{ .mlx + ld2 GR_l_Z_1 = [GR_l_Index1],4 // load Z_1 from Index1 + movl GR_l_BIAS = 0x000000000000FFFF // Bias for exponent +};; + +{ .mfi + ld8 GR_l_Log_Table = [GR_l_Log_Table] + frcpa.s1 FR_l_Y0, p0 = f1, FR_l_AbsX // y = frcpa(x) + nop.i 0 +} +{ .mfi + ldfs FR_l_G_1 = [GR_l_Index1],4 // Load G_1 + fsub.s1 FR_l_W = FR_l_AbsX, f1 // W = |X|-1 + nop.i 0 +};; + +{ .mfi + getf.exp GR_l_N_Unbiased= FR_l_AbsX // exponent of |X| + fmerge.se FR_l_S = f1, FR_l_AbsX // S = merging of X and 1.0 + cmp.gtu p11, p0 = GR_c_13, GR_c_X // If 1 <= |X| < 13 + // then p11 = 1 +} +{ .mfb + ldfs FR_l_H_1 = [GR_l_Index1],8 // Load H_1 + fcvt.xf FR_n_XNS = FR_n_IXNS // Convert to FP repr. of int X +(p10) br.cond.spnt tgamma_lt_1 // Branch to |X| < 1 path /////////////////// +};; + +{ .mfi + ldfpd FR_n_A2H, FR_n_A2L = [GR_n_sin_Table], 16 + nop.f 0 + pmpyshr2.u GR_l_X_1 = GR_l_X_0,GR_l_Z_1,15 // Adjust Index2 (x32) +} +{ .mfb + ldfe FR_l_B2 = [GR_l_Stirling_Table], 16 + nop.f 0 +(p11) br.cond.spnt tgamma_lt_13 // Branch to 1 <= |X| < 13 path /////////////// +};; + +{ .mfi + ldfe FR_l_h_1 = [GR_l_Index1],0 + nop.f 0 + sub GR_l_N = GR_l_N_Unbiased, GR_l_BIAS // N - BIAS +} +{ .mib + ldfpd FR_l_B4,FR_l_B6= [GR_l_Stirling_Table], 16 // Load C +(p15) cmp.geu.unc p8,p0 = GR_l_N_Unbiased, GR_c_NegSingularity +(p8) br.cond.spnt tgammal_singularity // Singularity for arg < to -2^63 ////// +};; + +{ .mmi +(p15) ldfpd FR_n_A1H, FR_n_A1L = [GR_n_sin_Table], 16 + ldfpd FR_l_B8, FR_l_B10 = [GR_l_Stirling_Table], 16 + add GR_c_Table = 0x20, GR_c_Table +};; + +{ .mfi +(p15) ldfe FR_n_A9 = [GR_n_sin_Table], 16 + fma.s1 FR_l_Q0 = f1,FR_l_Y0,f0 // Q0 = Y0 + nop.i 0 +} +{ .mfi + ldfpd FR_l_B12, FR_l_B14 = [GR_l_Stirling_Table], 16 + fnma.s1 FR_l_E0 = FR_l_Y0,FR_l_AbsX,f1 // e = 1-b*y + nop.i 0 +};; + +{ .mfi +(p15) ldfe FR_n_A8 = [GR_n_sin_Table], 16 + fcvt.xf FR_c_XN = FR_n_IXN // Convert to FP repr. of int X + extr.u GR_l_Index2 = GR_l_X_1, 6, 4 // Extract Index2 +} +{ .mfi + ldfpd FR_l_B16, FR_l_B18 = [GR_l_Stirling_Table], 16 + nop.f 0 + nop.i 0 +};; + +{ .mfi +(p15) ldfe FR_n_A7 = [GR_n_sin_Table], 16 + fms.s1 FR_l_CXH = FR_l_CH, f1, FR_l_AbsX // CXH = CH+|X| + shl GR_l_Index2 = GR_l_Index2,5 +} +{ .mfi + ldfd FR_l_Half = [GR_l_Stirling_Table] // Load 0.5 + nop.f 0 + nop.i 0 +};; + +{ .mfi + add GR_l_Index2 = GR_l_Index2, GR_l_Log_Table // Add offset + nop.f 0 + nop.i 0 +} +{ .mfi +(p15) ldfe FR_n_A6 = [GR_n_sin_Table], 16 +(p15) fma.s1 FR_n_XS = FR_l_AbsX , f1, FR_n_XNS // xs = x - int(x) + nop.i 0 +};; + +{ .mmi + ld2 GR_l_Z_2 = [GR_l_Index2],4 + addl GR_l_Log_Table = @ltoff(Constants_Tgammal_log_80_h3_G_H#),gp + nop.i 0 +};; + +{ .mfi + ld8 GR_l_Log_Table = [GR_l_Log_Table] + fma.s1 FR_l_E2 = FR_l_E0,FR_l_E0,FR_l_E0 // e2 = e+e^2 + nop.i 0 +} +{ .mfi + ldfs FR_l_G_2 = [GR_l_Index2],4 + fma.s1 FR_l_E1 = FR_l_E0,FR_l_E0,f0 // e1 = e^2 + nop.i 0 +};; + +{ .mmi + ldfs FR_l_H_2 = [GR_l_Index2],8 +(p15) ldfe FR_n_A5 = [GR_n_sin_Table], 16 + nop.i 0 +};; + +{ .mfi + setf.sig FR_l_float_N = GR_l_N // float_N = Make N a fp number + nop.f 0 + pmpyshr2.u GR_l_X_2 = GR_l_X_1,GR_l_Z_2,15 // X_2 = X_1 * Z_2 +} +{ .mfi + ldfe FR_l_h_2 = [GR_l_Index2],0 + fma.s1 FR_l_CXL = FR_l_AbsX, f1, FR_l_CXH // CXL = |X|+CXH + add GR_l_Log_Table1= 0x200, GR_l_Log_Table +};; + +{ .mfi +(p15) ldfe FR_n_A4 = [GR_n_sin_Table], 16 +(p15) fcmp.eq.unc.s1 p9,p0 = FR_l_AbsX, FR_c_XN //if argument is integer + // and negative + nop.i 0 +} +{ .mfi + ldfe FR_c_PosOverflow = [GR_c_Table],16 //Load pos overflow value +(p15) fma.s1 FR_n_XS2 = FR_n_XS, FR_n_XS, f0 // xs^2 = xs*xs + nop.i 0 +};; + +{ .mfi +(p15) ldfe FR_n_A3 = [GR_n_sin_Table], 16 + nop.f 0 + nop.i 0 +};; + +{ .mfi +(p15) getf.sig GR_n_XN = FR_n_IXN // int(x) to general reg + fma.s1 FR_l_Y1 = FR_l_Y0,FR_l_E2,FR_l_Y0 // y1 = y+y*e2 + nop.i 0 +} +{ .mfb + nop.m 0 + fma.s1 FR_l_E3 = FR_l_E1,FR_l_E1,FR_l_E0 // e3 = e+e1^2 +(p9) br.cond.spnt tgammal_singularity // Singularity for integer ///////////// + // and negative arguments ////////////// +};; + +{ .mfi + nop.m 0 + fms.s1 FR_l_AbsX_m_Half = FR_l_AbsX, f1, FR_l_Half // |x|-0.5 + extr.u GR_l_Index2 = GR_l_X_2, 1, 5 // Get Index3 +};; + +{ .mfi + shladd GR_l_Log_Table1= GR_l_Index2, 2, GR_l_Log_Table1 + nop.f 0 + shladd GR_l_Index3 = GR_l_Index2,4, GR_l_Log_Table // Index3 +} +{ .mfb +(p15) cmp.gtu.unc p11, p0 = GR_n_XN, GR_c_NegUnderflow // X < -1765 + fms.s1 FR_l_CXL = FR_l_CH, f1, FR_l_CXL // CXL = CH - CXL +(p11) br.cond.spnt tgammal_underflow // Singularity for negative argument ////// + // at underflow domain (X < -1765) ////// +};; + +{ .mfi + addl GR_l_Log_Table = @ltoff(Constants_Tgammal_log_80_Q#), gp +(p15) fma.s1 FR_n_TT = FR_n_A2L, FR_n_XS2, f0 // T=A2L*x^2 + tbit.nz.unc p13, p12 = GR_n_XN, 0x0 // whether [X] odd or even +} +{ .mfi + nop.m 0 +(p15) fms.s1 FR_n_XS2L = FR_n_XS, FR_n_XS, FR_n_XS2 // xs^2 Low part + nop.i 0 +};; + +{ .mfi + ld8 GR_l_Log_Table = [GR_l_Log_Table] +(p15) fma.s1 FR_n_A7 = FR_n_A8, FR_n_XS2, FR_n_A7 // poly tail + nop.i 0 +} +{ .mfi + ldfe FR_l_h_3 = [GR_l_Index3],12 +(p15) fma.s1 FR_n_XS4 = FR_n_XS2, FR_n_XS2, f0 // xs^4 = xs^2*xs^2 + nop.i 0 +};; + +{ .mfi + ldfs FR_l_H_3 = [GR_l_Log_Table1], 0 + fma.s1 FR_l_Y2 = FR_l_Y1, FR_l_E3, FR_l_Y0 // y2 = y+y1*e3 + nop.i 0 +} +{ .mfi + ldfs FR_l_G_3 = [GR_l_Index3], 0 + fnma.s1 FR_l_Z = FR_l_AbsX,FR_l_Q0,f1 // r = a-b*q + nop.i 0 +};; + +{ .mfi + nop.m 0 + fmpy.s1 FR_l_G = FR_l_G_1, FR_l_G_2 // G = G1 * G_2 + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 FR_l_H = FR_l_H_1, FR_l_H_2 // H = H_1 + H_2 + nop.i 0 +};; + +{ .mfi + ldfe FR_l_log2_hi = [GR_l_Log_Table],16 // load log2_hi part + fadd.s1 FR_l_h = FR_l_h_1, FR_l_h_2 // h = h_1 + h_2 + nop.i 0 +} +{ .mfi + nop.m 0 + fcvt.xf FR_l_float_N = FR_l_float_N // int(N) + nop.i 0 +};; + +{ .mfi + ldfe FR_l_log2_lo = [GR_l_Log_Table],16 // Load log2_lo part + fma.s1 FR_l_CXL = FR_l_CXL, f1, FR_l_CL + nop.i 0 +} +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_TT = FR_n_A2H, FR_n_XS2L, FR_n_TT // T=A2H*x2L+T + nop.i 0 +};; + +{ .mfi + ldfe FR_l_Q_6 = [GR_l_Log_Table],16 +(p15) fma.s1 FR_n_A3 = FR_n_A4, FR_n_XS2, FR_n_A3 // poly tail + nop.i 0 +} +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_A5 = FR_n_A6, FR_n_XS2, FR_n_A5 // poly tail + nop.i 0 +};; + +{ .mfi + ldfe FR_l_Q_5 = [GR_l_Log_Table],16 +(p15) fabs FR_n_XS = FR_n_XS // abs(xs) + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_l_Z = FR_l_Z,FR_l_Y2,FR_l_Q0 // x_hi = q+r*y2 + nop.i 0 +};; + +{ .mfi + ldfe FR_l_Q_4 = [GR_l_Log_Table],16 +(p15) fma.s1 FR_n_A7 = FR_n_A9, FR_n_XS4, FR_n_A7 // poly tail + nop.i 0 +} +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_XS7 = FR_n_XS4, FR_n_XS2, f0 // = x^4*x^2 + nop.i 0 +};; + +{ .mfi + ldfe FR_l_Q_3 = [GR_l_Log_Table],16 + fneg FR_n_NegOne = f1 // -1.0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_XS8 = FR_n_XS4, FR_n_XS4, f0 // xs^8 = xs^4*xs^4 + nop.i 0 +};; + +{ .mfi + ldfe FR_l_Q_2 = [GR_l_Log_Table],16 + fadd.s1 FR_l_h = FR_l_h, FR_l_h_3 // h = h_1 + h_2 + h_3 + nop.i 0 +} +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_TH = FR_n_A2H, FR_n_XS2, FR_n_TT // A2H*xs2+T + nop.i 0 +};; + +{ .mfi + ldfe FR_l_Q_1 = [GR_l_Log_Table],16 + fmpy.s1 FR_l_G = FR_l_G, FR_l_G_3 // G = G_1 * G_2 * G_3 + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 FR_l_H = FR_l_H, FR_l_H_3 // H = H_1 + H_2 + H_3 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_l_Z2 = FR_l_Z, FR_l_Z, f0 // Z^2 + nop.i 0 +} +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_A3 = FR_n_A5, FR_n_XS4, FR_n_A3 // poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p14) fcmp.gt.unc.s1 p7,p0 = FR_l_AbsX, FR_c_PosOverflow //X > 1755.5483 + // (overflow domain, result cannot be represented by normal value) + nop.i 0 +} +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_XS7 = FR_n_XS7, FR_n_XS, f0 // x^7 construction + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p15) fms.s1 FR_n_TL = FR_n_A2H, FR_n_XS2, FR_n_TH // A2H*xs2+TH + nop.i 0 +} +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_PolyH = FR_n_TH, f1, FR_n_A1H // PolyH=TH+A1H + nop.i 0 +};; + +{ .mfi + nop.m 0 + fmpy.s1 FR_l_GS_hi = FR_l_G, FR_l_S // GS_hi = G*S + nop.i 0 +} +{ .mfb + nop.m 0 + fms.s1 FR_l_r = FR_l_G, FR_l_S, f1 // r = G*S -1 +(p7) br.cond.spnt tgammal_overflow // Overflow path for arg > 1755.5483 ////// +};; + +{ .mfi + nop.m 0 + fma.s1 FR_l_B14 = FR_l_B16, FR_l_Z2, FR_l_B14// bernulli tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_l_Z4 = FR_l_Z2, FR_l_Z2, f0 // Z^4 = Z^2*Z^2 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_l_B2 = FR_l_B4, FR_l_Z2, FR_l_B2 // bernulli tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_l_B6 = FR_l_B8, FR_l_Z2, FR_l_B6 // bernulli tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_l_B10 = FR_l_B12, FR_l_Z2, FR_l_B10// bernulli tail + nop.i 0 +} +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_Tail = FR_n_A7, FR_n_XS8, FR_n_A3 // poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_TL = FR_n_TL, f1, FR_n_TT // TL = TL+T + nop.i 0 +} +{ .mfi + nop.m 0 +(p15) fms.s1 FR_n_PolyL = FR_n_A1H, f1, FR_n_PolyH // polyH+A1H + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_l_poly_lo = FR_l_r, FR_l_Q_6, FR_l_Q_5 // Q_5+r*Q_6 + nop.i 0 +} +{ .mfi + nop.m 0 + fsub.s1 FR_l_r_cor = FR_l_GS_hi, f1 // r_cor = GS_hi -1 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_l_GS_lo = FR_l_G, FR_l_S, FR_l_GS_hi // G*S-GS_hi + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_l_poly = FR_l_r, FR_l_Q_2, FR_l_Q_1 //poly=r*Q2+Q1 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fmpy.s1 FR_l_rsq = FR_l_r, FR_l_r // rsq = r * r + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_l_G = FR_l_float_N, FR_l_log2_hi, FR_l_H // Tbl = + // float_N*log2_hi + H + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_l_Y_lo = FR_l_float_N, FR_l_log2_lo, FR_l_h // Y_lo= + // float_N*log2_lo + h + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_l_B14 = FR_l_B18, FR_l_Z4, FR_l_B14 //bernulli tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_l_B2 = FR_l_B6, FR_l_Z4, FR_l_B2 //bernulli tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_l_Z8 = FR_l_Z4, FR_l_Z4, f0 //bernulli tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_l_poly_lo = FR_l_r, FR_l_poly_lo, FR_l_Q_4 // poly_lo = + // Q_4 + r * poly_lo + nop.i 0 +} +{ .mfi + nop.m 0 + fsub.s1 FR_l_r_cor = FR_l_r_cor, FR_l_r // r_cor = r_cor - r + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_PolyL = FR_n_PolyL, f1, FR_n_TH // polyL+TH + nop.i 0 +} +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_TT = FR_n_TL, f1, FR_n_A1L // TL+A1L + nop.i 0 +};; + +{ .mfi + nop.m 0 + fadd.s1 FR_l_logl_YHi = FR_l_G, FR_l_r // Y_hi = Tbl + r + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_l_B10 = FR_l_B14, FR_l_Z4, FR_l_B10 //bernulli tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_l_poly_lo = FR_l_r, FR_l_poly_lo, FR_l_Q_3 // poly_lo = + // Q_3 + r * poly_lo + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 FR_l_r_cor = FR_l_r_cor, FR_l_GS_lo // r_cor=r_cor+GS_lo + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_PolyL = FR_n_PolyL, f1, FR_n_TT // polyL+TT + nop.i 0 +};; + +{ .mfi + nop.m 0 + fsub.s1 FR_l_Y_lo_res = FR_l_G, FR_l_logl_YHi // Y_lo = Tbl - Y_hi + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_l_XYH = FR_l_logl_YHi, FR_l_AbsX_m_Half, f0 // XYH= + // YHi*|x-0.5| + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_l_SS = FR_l_B10, FR_l_Z8, FR_l_B2 // bernulli tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fadd.s1 FR_l_r_cor = FR_l_r_cor, FR_l_Y_lo // r_cor = r_cor+Y_lo + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_l_poly = FR_l_rsq, FR_l_poly_lo, FR_l_poly //poly= + // r^2*polyLo+poly + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_TT = FR_n_PolyL, FR_n_XS2, f0 // T=polyL*xs^2 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fadd.s1 FR_l_Y_lo = FR_l_Y_lo_res, FR_l_r // Y_lo = Y_lo + r + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 FR_l_XYL = FR_l_logl_YHi, FR_l_AbsX_m_Half, FR_l_XYH + // XYL = YHi*|x-0.5|-XYH + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_l_SSCXH = FR_l_SS, FR_l_Z, FR_l_CXH // SS*Z+CXH + nop.i 0 +} +{ .mfi + mov GR_e_exp_2tom51= 0xffff-51 // 2^-51 +(p15) fma.s1 FR_l_SignedXYH = FR_l_XYH, FR_n_NegOne, f0 // XYH = -XYH + // for negatives + nop.i 0 +};; + +{ .mlx + nop.m 0 + movl GR_e_rshf_2to51 = 0x4718000000000000 // 1.10000 2^(63+51) +} +{ .mlx + nop.m 0 + movl GR_e_sig_inv_ln2 = 0xb8aa3b295c17f0bc //significand of 1/ln2 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_l_poly = FR_l_rsq, FR_l_poly, FR_l_r_cor // poly = + // rsq * poly + r_cor + nop.i 0 +};; + +{ .mfi + addl GR_e_ad_Arg = @ltoff(Constants_Tgammal_exp_64_Arg#),gp +(p15) fma.s1 FR_n_TT = FR_n_PolyH, FR_n_XS2L, FR_n_TT + mov GR_e_exp_mask = 0x1FFFF // Form exponent mask +} +{ .mlx + nop.m 0 + movl GR_e_rshf = 0x43e8000000000000 // 1.10000 2^63 rshift +};; + + +{ .mmi + setf.sig FR_e_INV_LN2_2TO63 = GR_e_sig_inv_ln2 // form 1/ln2 * 2^63 + setf.d FR_e_RSHF_2TO51 = GR_e_rshf_2to51 // 1.1000 * 2^(63+51) + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_l_SSCXL = FR_l_CXH, f1, FR_l_SSCXH // CXH+SS*CXH + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_e_expl_Input_AbsX = FR_l_XYH, f1, FR_l_SSCXH // HI EXP + nop.i 0 +};; + +.pred.rel "mutex",p14,p15 +{ .mfi + nop.m 0 +(p14) fma.s1 FR_e_expl_Input_X = FR_l_XYH, f1, FR_l_SSCXH // HI EXP + mov GR_e_exp_bias = 0x0FFFF // Set exponent bias +} +{ .mfi + ld8 GR_e_ad_Arg = [GR_e_ad_Arg] // Point to Arg table +(p15) fms.s1 FR_e_expl_Input_X = FR_l_SignedXYH, f1, FR_l_SSCXH // HI EXP + nop.i 0 +};; + +{ .mfi + nop.m 0 + fadd.s1 FR_l_logl_YLo = FR_l_Y_lo, FR_l_poly // YLo = YLo+poly + nop.i 0 +};; + +{ .mfi + setf.exp FR_e_2TOM51 = GR_e_exp_2tom51 //2^-51 for scaling float_N +(p15) fma.s1 FR_n_TH = FR_n_PolyH, FR_n_XS2, FR_n_TT // TH= + // polyH*xs^2+T + nop.i 0 +} +{ .mib + setf.d FR_e_RSHF = GR_e_rshf // Right shift const 1.1000*2^63 + nop.i 0 + nop.b 0 +};; + +{ .mfi + add GR_e_ad_A = 0x20, GR_e_ad_Arg // Point to A table + nop.f 0 + add GR_e_ad_T1 = 0x50, GR_e_ad_Arg // Point to T1 table +} +{ .mfi + add GR_e_ad_T2 = 0x150, GR_e_ad_Arg // Point to T2 table + nop.f 0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_l_SSCXL = FR_l_SS, FR_l_Z, FR_l_SSCXL + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 FR_e_expl_Input_Y = FR_l_XYH, f1, FR_e_expl_Input_AbsX + nop.i 0 +};; + +{ .mfi + ldfe FR_e_L_hi = [GR_e_ad_Arg],16 // Get L_hi + nop.f 0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_l_XYL = FR_l_logl_YLo, FR_l_AbsX_m_Half, FR_l_XYL + // XYL = YLo*|x-0.5|+XYL + nop.i 0 +};; + +{ .mfi + ldfe FR_e_L_lo = [GR_e_ad_Arg],16 // Get L_lo +(p15) fms.s1 FR_n_TL = FR_n_PolyH, FR_n_XS2, FR_n_TH // TL = + // = polyH*xs^2-TH + add GR_e_ad_W1 = 0x100, GR_e_ad_T2 // Point to W1 table +} +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_Poly1H = FR_n_TH, f1, f1 // poly1H = TH+1 + add GR_e_ad_W2 = 0x300, GR_e_ad_T2 // Point to W2 table +};; + +{ .mmi + getf.exp GR_e_signexp_x = FR_e_expl_Input_X // Extract sign and exp + ldfe FR_e_A3 = [GR_e_ad_A],16 // Get A3 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_l_SSCXL = FR_l_SSCXL, f1, FR_l_CXL + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_e_expl_Input_Y = FR_e_expl_Input_Y, f1, FR_l_SSCXH + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_e_N_signif=FR_e_expl_Input_X,FR_e_INV_LN2_2TO63,FR_e_RSHF_2TO51 + and GR_e_exp_x = GR_e_signexp_x, GR_e_exp_mask +};; + +{ .mmi + sub GR_e_exp_x = GR_e_exp_x, GR_e_exp_bias // Get exponent + ldfe FR_e_A2 = [GR_e_ad_A],16 // Get A2 for main path + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_PolyH = FR_n_Poly1H, FR_n_XS, f0//sin(Pi*x) poly + nop.i 0 +} +{ .mfi + nop.m 0 +(p15) fms.s1 FR_n_Poly1L = f1, f1, FR_n_Poly1H//sin(Pi*x) poly + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_TL = FR_n_TL, f1, FR_n_TT//sin(Pi*x) poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_l_Temp = FR_l_XYL, f1, FR_l_SSCXL // XYL+SS*CXL + nop.i 0 +} +{ .mfi + nop.m 0 +(p15) fma.s1 FR_e_expl_Input_Y = FR_e_expl_Input_Y, FR_n_NegOne, f0 + // Negate lo part of exp argument for negative input values + nop.i 0 +};; + +{ .mfi + ldfe FR_e_A1 = [GR_e_ad_A],16 // Get A1 + nop.f 0 + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 FR_e_float_N = FR_e_N_signif, FR_e_2TOM51, FR_e_RSHF + // Get float N = signd*2^51-RSHIFTER + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_Poly1L = FR_n_Poly1L, f1, FR_n_TH //sin(Pi*x) poly + nop.i 0 +} +{ .mfi + nop.m 0 +(p15) fms.s1 FR_n_PolyL = FR_n_Poly1H, FR_n_XS, FR_n_PolyH//sin(Pi*x) + nop.i 0 +};; + +{ .mfi + getf.sig GR_e_N_fix = FR_e_N_signif // Get N from significand + nop.f 0 + nop.i 0 +};; + +.pred.rel "mutex",p14,p15 +{ .mfi + nop.m 0 +(p14) fma.s1 FR_e_expl_Input_Y = FR_e_expl_Input_Y, f1, FR_l_Temp + nop.i 0 +} +{ .mfi + nop.m 0 +(p15) fms.s1 FR_e_expl_Input_Y = FR_e_expl_Input_Y, f1, FR_l_Temp + // arguments for exp computation + nop.i 0 +};; + +{ .mfi + nop.m 0 + fnma.s1 FR_e_r = FR_e_L_hi, FR_e_float_N, FR_e_expl_Input_X + // r = -L_hi * float_N + x + extr.u GR_e_M1 = GR_e_N_fix, 6, 6 // Extract index M_1 +};; + +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_Poly1L = FR_n_Poly1L, f1, FR_n_TL //sin(Pi*x) poly + nop.i 0 +};; + + +{ .mmf + nop.m 0 + nop.m 0 + fma.s1 FR_e_r = FR_e_r, f1, FR_e_expl_Input_Y + // r = r + FR_e_expl_Input_Y +};; + +{ .mmi + shladd GR_e_ad_W1 = GR_e_M1,3,GR_e_ad_W1 // Point to W1 + shladd GR_e_ad_T1 = GR_e_M1,2,GR_e_ad_T1 // Point to T1 + extr.u GR_e_M2 = GR_e_N_fix, 0, 6 // Extract index M_2 +};; + + +{ .mfi + ldfs FR_e_T1 = [GR_e_ad_T1],0 // Get T1 + nop.f 0 + extr GR_e_K = GR_e_N_fix, 12, 32 //Extract limit range K +} +{ .mfi + shladd GR_e_ad_T2 = GR_e_M2,2,GR_e_ad_T2 // Point to T2 +(p15) fma.s1 FR_n_PolyL = FR_n_Poly1L, FR_n_XS, FR_n_PolyL + //sin(Pi*x) poly + shladd GR_e_ad_W2 = GR_e_M2,3,GR_e_ad_W2 // Point to W2 +};; + +{ .mfi + ldfs FR_e_T2 = [GR_e_ad_T2],0 // Get T2 + nop.f 0 + add GR_e_exp_2_k = GR_e_exp_bias, GR_e_K // exp of 2^k +} +{ .mfi + ldfd FR_e_W1 = [GR_e_ad_W1],0 // Get W1 + nop.f 0 + sub GR_e_exp_2_mk = GR_e_exp_bias, GR_e_K // exp of 2^-k +};; + +{ .mmi + ldfd FR_e_W2 = [GR_e_ad_W2],0 // Get W2 + nop.m 0 + nop.i 0 +};; + +{ .mmf + setf.exp FR_e_scale = GR_e_exp_2_k // Set scale = 2^k + setf.exp FR_e_2_mk = GR_e_exp_2_mk // Form 2^-k + fnma.s1 FR_e_r = FR_e_L_lo, FR_e_float_N, FR_e_r + // r = -L_lo * float_N + r +};; + +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_PolyL = FR_n_Tail, FR_n_XS7, FR_n_PolyL + //sin(Pi*x) poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_e_poly = FR_e_r, FR_e_A3, FR_e_A2 // poly=r*A3+A2 + nop.i 0 +} +{ .mfi + nop.m 0 + fmpy.s1 FR_e_rsq = FR_e_r, FR_e_r // rsq = r * r + nop.i 0 +};; + +{ .mfi + nop.m 0 + fmpy.s1 FR_e_T = FR_e_T1, FR_e_T2 // T = T1 * T2 + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 FR_e_W1_p1 = FR_e_W1, f1 // W1_p1 = W1 + 1.0 + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_TT = FR_n_PolyL, FR_l_AbsX, f0 //sin(Pi*x) poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_e_poly = FR_e_r, FR_e_poly, FR_e_A1 + // poly = r * poly + A1 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_e_T_scale = FR_e_T, FR_e_scale, f0 // T_scale=T*scale + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_e_W = FR_e_W2, FR_e_W1_p1, FR_e_W1 + // W = W2 * (W1+1.0) + W1 + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_SinxH = FR_n_PolyH, FR_l_AbsX, FR_n_TT + // sin(Pi*x) poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + mov FR_e_Y_hi = FR_e_T // Assume Y_hi = T + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_e_poly = FR_e_rsq, FR_e_poly, FR_e_r + // poly = rsq * poly + r + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_e_Wp1_T_scale = FR_e_W, FR_e_T_scale, FR_e_T_scale + // (W+1)*T*scale + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_e_W_T_scale = FR_e_W, FR_e_T_scale, f0 // W*T*scale + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p15) fms.s1 FR_n_SinxL = FR_n_PolyH, FR_l_AbsX, FR_n_SinxH + // Low part of sin + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p15) frcpa.s1 FR_n_Y0, p0 = f1, FR_n_SinxH // y = frcpa(b) + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_e_result_lo = FR_e_Wp1_T_scale, FR_e_poly, FR_e_W_T_scale + // Low part of exp result + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_SinxL = FR_n_SinxL, f1, FR_n_TT // sin low result + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p15) fma.s1 FR_n_Q0 = f1,FR_n_Y0,f0 // q = y + nop.i 0 +} +{ .mfi + nop.m 0 +(p15) fnma.s1 FR_n_E0 = FR_n_Y0, FR_n_SinxH, f1 // e = 1-b*y + nop.i 0 +};; + + +{ .mfb + nop.m 0 +(p14) fma.s0 f8 = FR_e_Y_hi, FR_e_scale, FR_e_result_lo +(p14) br.ret.spnt b0 // Exit for positive Stirling path ////////////////////// +};; + +{ .mfi + nop.m 0 + fma.s1 FR_e_expl_Output_X = FR_e_Y_hi, FR_e_scale, f0 // exp result + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_e_expl_Output_Y = FR_e_result_lo, f1, f0// exp lo result + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_n_E2 = FR_n_E0,FR_n_E0,FR_n_E0 // e2 = e+e^2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_n_E1 = FR_n_E0,FR_n_E0,f0 // e1 = e^2 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_n_Y1 = FR_n_Y0,FR_n_E2,FR_n_Y0 // y1 = y+y*e2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_n_E3 = FR_n_E1,FR_n_E1,FR_n_E0 // e3 = e+e1^2 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_n_Y2 = FR_n_Y1,FR_n_E3,FR_n_Y0 // y2 = y+y1*e3 + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 FR_n_R0 = FR_n_SinxH,FR_n_Q0,f1 // r = a-b*q + nop.i 0 +};; + +{ .mfi + nop.m 0 + fnma.s1 FR_n_E4 = FR_n_SinxH,FR_n_Y2,f1 // e4 = 1-b*y2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_n_RcpResH = FR_n_R0,FR_n_Y2,FR_n_Q0 // x = q+r*y2 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_n_Y3 = FR_n_Y2,FR_n_E4,FR_n_Y2 // y3 = y2+y2*e4 + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 FR_n_R1 = FR_n_SinxH,FR_n_RcpResH,f1 // r1 = a-b*x + nop.i 0 +};; + +{ .mfi + nop.m 0 + fnma.s1 FR_n_R1 = FR_n_SinxL,FR_n_RcpResH,FR_n_R1 + // r1 = r1 - b_lo*X + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_n_RcpResL = FR_n_R1,FR_n_Y3,f0 // x_lo = r1*y3 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_n_Temp = FR_n_RcpResH, FR_e_expl_Output_Y, f0 + // Multiplying exp and sin result + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_n_Temp = FR_n_RcpResL, FR_e_expl_Output_X, FR_n_Temp + // Multiplying exp and sin result + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_n_ResH = FR_n_RcpResH, FR_e_expl_Output_X, FR_n_Temp + // Multiplying exp and sin result + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_n_ResL = FR_n_RcpResH, FR_e_expl_Output_X, FR_n_ResH + // Multiplying exp and sin result + nop.i 0 +} +{ .mfi + nop.m 0 +(p12) fma.s1 FR_n_ResH = FR_n_ResH, FR_n_NegOne, f0 // Negate + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_n_ResL = FR_n_ResL, f1, FR_n_Temp + // Multiplying exp and sin result - low result obtained + nop.i 0 +};; + +.pred.rel "mutex",p12,p13 +{ .mfi + nop.m 0 +(p13) fma.s0 f8 = FR_n_ResH, f1, FR_n_ResL // For odd + nop.i 0 +} +{ .mfb + nop.m 0 +(p12) fms.s0 f8 = FR_n_ResH, f1, FR_n_ResL // For even + br.ret.sptk b0 // Exit for negative Stirling path ////////////////////// +};; + + +//////////// 1 <= |X| < 13 path //////////////////////////////////////////////// +//------------------------------------------------------------------------------ +.align 64 +tgamma_lt_13: +{ .mfi + getf.sig GR_p_XN = FR_p_IXN // Get significand + fcvt.xf FR_p_XN = FR_p_IXN // xn = [x] + add GR_r_sin_Table2= 0x40, GR_r_sin_Table // Shifted table addr. +} +{ .mfi + ldfpd FR_p_0p5, FR_p_1p5 = [GR_c_Table], 16 // 0.5 & 1.5 + fms.s1 FR_p_AbsXM1 = FR_p_AbsX, f1, f1 // X-1 + add GR_p_Table2 = 0xB0, GR_p_Table +};; + +{ .mfi + add GR_r_sin_Table = -16, GR_r_sin_Table // For compensation + fcvt.xf FR_r_XNS = FR_r_IXNS // Convert int repr to float + shr.u GR_p_X_Sgnd = GR_p_X_Sgnd, 59 // Get only 5 bit of signd +};; + +{ .mfi + ldfpd FR_r_A2H,FR_r_A2L = [GR_r_sin_Table], 16 // Load A2 + nop.f 0 + add GR_p_Int = -2, GR_p_XN // int = int - 2 +} +{ .mfi + ldfe FR_r_A6 = [GR_r_sin_Table2], 16 + nop.f 0 + cmp.gtu p11, p12 = 0x2, GR_p_XN // p11: x < 2 (splitted intervals), + // p12: x > 2 (base intervals) +};; + +{ .mfi + ldfpd FR_r_A1H, FR_r_A1L = [GR_r_sin_Table], 16 + nop.f 0 + shr GR_p_Int = GR_p_Int, 1 // int/2 +} +{ .mfi + ldfe FR_r_A5 = [GR_r_sin_Table2], 16 + nop.f 0 +(p11) cmp.gtu.unc p10, p11 = 0x1C, GR_p_X_Sgnd // sgnd(x) < 0.75 +};; + +{ .mfi + ldfe FR_r_A9 = [GR_r_sin_Table], 16 + nop.f 0 + shl GR_p_Offset = GR_p_Int, 4 // offset = int*16 +} +{ .mfi + ldfe FR_r_A4 = [GR_r_sin_Table2], 16 + nop.f 0 +(p10) cmp.gtu.unc p9, p10 = 0x14, GR_p_X_Sgnd // sgnd(x) < 0.25 +};; + + +{ .mfi + ldfe FR_r_A8 = [GR_r_sin_Table], 16 + nop.f 0 +(p12) tbit.nz.unc p13, p12 = GR_p_XN, 0x0 // p13: reccurent computations + // X is at [3;4], [5;6], [7;8]... interval +} +{ .mfi + ldfe FR_r_A3 = [GR_r_sin_Table2], 16 + nop.f 0 + shladd GR_p_Offset = GR_p_Int, 2, GR_p_Offset // +int*4 +};; + +.pred.rel "mutex",p9,p11 +{ .mfi + add GR_p_Offset = GR_p_Int, GR_p_Offset + // +int, so offset = int*21 +(p9) fms.s1 FR_p_XR = FR_p_AbsX, f1, f1 // r = x-1 + nop.i 0 +} +{ .mfi + ldfe FR_r_A7 = [GR_r_sin_Table], 16 +(p11) fms.s1 FR_p_XR = FR_p_2, f1, FR_p_AbsX + // r = 2-x for 1.75 < x < 2 + nop.i 0 +};; + +.pred.rel "mutex",p9,p10 +.pred.rel "mutex",p10,p11 +.pred.rel "mutex",p9,p11 +{ .mfi +(p9) add GR_p_Offset = 126, r0 // 1.0 < x < 1.25 table +(p15) fcmp.eq.unc.s1 p7,p0 = FR_p_AbsX, FR_p_XN + // If arg is integer and negative - singularity branch + nop.i 0 +} +{ .mfi +(p10) add GR_p_Offset = 147, r0 // 1.25 < x < 1.75 table + nop.f 0 +(p11) add GR_p_Offset = 168, r0 // 1.75 < x < 2.0 table +};; + +{ .mmf + shladd GR_p_Table = GR_p_Offset, 4, GR_p_Table + shladd GR_p_Table2 = GR_p_Offset, 4, GR_p_Table2 + fma.s1 FR_r_XS = FR_r_AbsX , f1, FR_r_XNS // xs = x - [x] +};; + +{ .mmb + ldfpd FR_p_A5H, FR_p_A5L = [GR_p_Table], 16 + ldfpd FR_p_A2H, FR_p_A2L = [GR_p_Table2], 16 +(p7) br.cond.spnt tgammal_singularity // Singularity for integer ///////////// + // and negative argument /////////////// +};; + +{ .mfi + ldfpd FR_p_A4H, FR_p_A4L = [GR_p_Table], 16 + fma.s1 FR_p_XN = FR_p_XN, f1, FR_p_0p5 // xn = xn+0.5 + nop.i 0 +} +{ .mfi + ldfpd FR_p_A1H, FR_p_A1L = [GR_p_Table2], 16 +(p10) fms.s1 FR_p_XR = FR_p_AbsX, f1, FR_p_1p5 // r = x - 1.5 + nop.i 0 +};; + +{ .mmi + ldfpd FR_p_A3H, FR_p_A3L = [GR_p_Table], 16 + ldfpd FR_p_A0H, FR_p_A0L = [GR_p_Table2], 16 + nop.i 0 +};; + +{ .mmi + ldfe FR_p_A20 = [GR_p_Table], 16 + ldfe FR_p_A12 = [GR_p_Table2], 16 + nop.i 0 +};; + +{ .mmf + ldfe FR_p_A19 = [GR_p_Table], 16 + ldfe FR_p_A11 = [GR_p_Table2], 16 + fma.s1 FR_r_XS2 = FR_r_XS, FR_r_XS, f0 // xs2 = xs*xs +};; + +{ .mmi + ldfe FR_p_A18 = [GR_p_Table], 16 + ldfe FR_p_A10 = [GR_p_Table2], 16 + nop.i 0 +};; + +.pred.rel "mutex",p12,p13 +{ .mfi + ldfe FR_p_A17 = [GR_p_Table], 16 +(p12) fms.s1 FR_p_XR = FR_p_AbsX, f1, FR_p_XN // r = x - xn + nop.i 0 +} +{ .mfi + ldfe FR_p_A9 = [GR_p_Table2], 16 +(p13) fms.s1 FR_p_XR = FR_p_AbsX, f1, FR_p_XN + nop.i 0 +};; + +{ .mmi + ldfe FR_p_A16 = [GR_p_Table], 16 + ldfe FR_p_A8 = [GR_p_Table2], 16 +(p9) cmp.eq p12, p0 = r0, r0 // clear p12 +};; + +{ .mmi + ldfe FR_p_A15 = [GR_p_Table], 16 + ldfe FR_p_A7 = [GR_p_Table2], 16 +(p10) cmp.eq p12, p0 = r0, r0 // clear p12 +};; + +{ .mfi + ldfe FR_p_A14 = [GR_p_Table], 16 + fma.s1 FR_r_TH = FR_r_A2H, FR_r_XS2, f0 // sin for neg +(p11) cmp.eq p12, p0 = r0, r0 // clear p12 +} +{ .mfi + ldfe FR_p_A6 = [GR_p_Table2], 16 + fma.s1 FR_r_TL = FR_r_A2L, FR_r_XS2, f0 // sin for neg + nop.i 0 +};; + +{ .mfi + ldfe FR_p_A13 = [GR_p_Table], 16 + fms.s1 FR_r_XS2L = FR_r_XS, FR_r_XS, FR_r_XS2 // x2Lo part + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp5H = FR_p_A5H, FR_p_XR, f0 // A5H*r + // 'Low poly' + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_XR2 = FR_p_XR, FR_p_XR, f0 // r^2 = r*r + nop.i 0 +};; + +{ .mfi + nop.m 0 + fabs FR_r_XS = FR_r_XS // abs(xs) + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp2H = FR_p_A2H, FR_p_XR, f0 // A2H*r + // 'High poly' + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_r_TT = FR_r_A2H, FR_r_XS2, FR_r_TH // sin for neg + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_ResH = FR_r_TH, f1, FR_r_A1H // sin for neg + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_TL = FR_r_A2H, FR_r_XS2L, FR_r_TL // sin for neg + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_p_Temp5L = FR_p_A5H,FR_p_XR,FR_p_Temp5H //A5H*r delta + // 'Low poly' + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly5H = FR_p_Temp5H, f1, FR_p_A4H // A5H*r+A4H + // 'Low poly' + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_p_Temp2L = FR_p_A2H, FR_p_XR, FR_p_Temp2H//A2H*r delta + //'High poly' + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly2H = FR_p_Temp2H, f1, FR_p_A1H // A2H*r+A1H + //'High poly' + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_XR3 = FR_p_XR2, FR_p_XR, f0 // r^3 = r^2*r + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 FR_p_XR2L = FR_p_XR, FR_p_XR, FR_p_XR2 // r^2 delta + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_A18 = FR_p_A19, FR_p_XR, FR_p_A18 // Poly tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_A14 = FR_p_A15, FR_p_XR, FR_p_A14 // Poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_XR4 = FR_p_XR2, FR_p_XR2, f0 // r^4 = r^2*r^2 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp5L = FR_p_A5L, FR_p_XR, FR_p_Temp5L// Low part + // of A5*r+A4 + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 FR_p_Poly5L = FR_p_A4H, f1, FR_p_Poly5H // Low part + // of A5*r+A4 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp4H = FR_p_Poly5H, FR_p_XR, f0 // (A5H*r+A4H)*r + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp2L = FR_p_A2L, FR_p_XR, FR_p_Temp2L // A2*r low + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_p_Poly2L = FR_p_A1H, f1, FR_p_Poly2H // High poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp1H = FR_p_Poly2H, FR_p_XR, f0 // High poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_p_XR3L = FR_p_XR2, FR_p_XR, FR_p_XR3 // x^3 delta + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_A16 = FR_p_A17, FR_p_XR, FR_p_A16 // Poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_r_ResL = FR_r_A1H, f1, FR_r_ResH // sin for neg + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_TL = FR_r_TL, f1, FR_r_TT // sin for neg + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp5L = FR_p_Temp5L, f1, FR_p_A4L // Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly5L = FR_p_Poly5L, f1, FR_p_Temp5H // Low poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_p_Temp4L = FR_p_Poly5H,FR_p_XR,FR_p_Temp4H //Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly4H = FR_p_Temp4H, f1, FR_p_A3H // Low poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp2L = FR_p_Temp2L, f1, FR_p_A1L // High poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly2L = FR_p_Poly2L, f1, FR_p_Temp2H // High poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_p_Temp1L = FR_p_Poly2H,FR_p_XR,FR_p_Temp1H //High poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly1H = FR_p_Temp1H, f1, FR_p_A0H // High poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_A12 = FR_p_A13, FR_p_XR, FR_p_A12 // Poly tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_XR3L = FR_p_XR2L, FR_p_XR, FR_p_XR3L // x^3 low + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly5L = FR_p_Poly5L, f1, FR_p_Temp5L // Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_A10 = FR_p_A11, FR_p_XR, FR_p_A10 // Poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_p_Poly4L = FR_p_A3H, f1, FR_p_Poly4H // Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_A6 = FR_p_A7, FR_p_XR, FR_p_A6 // Poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_A8 = FR_p_A9, FR_p_XR, FR_p_A8 // Poly tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_XR6 = FR_p_XR4, FR_p_XR2, f0 // Poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly2L = FR_p_Poly2L, f1, FR_p_Temp2L // High poly + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 FR_p_Poly1L = FR_p_A0H, f1, FR_p_Poly1H // High poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_ResL = FR_r_ResL, f1, FR_r_TH // sin for neg + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_TT = FR_r_TL, f1, FR_r_A1L // sin for neg + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp4L = FR_p_Poly5L,FR_p_XR,FR_p_Temp4L // Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_A18 = FR_p_A20, FR_p_XR2, FR_p_A18 // Poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly4L = FR_p_Poly4L, f1, FR_p_Temp4H // Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_A14 = FR_p_A16, FR_p_XR2, FR_p_A14 // Poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_A6 = FR_p_A8, FR_p_XR2, FR_p_A6 // Poly tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_A10 = FR_p_A12, FR_p_XR2, FR_p_A10 // Poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp1L = FR_p_Poly2L,FR_p_XR,FR_p_Temp1L //High poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly1L = FR_p_Poly1L, f1, FR_p_Temp1H // High poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_ResL = FR_r_ResL, f1, FR_r_TT // sin for neg + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_TH = FR_r_ResH, FR_r_XS2, f0 // sin for neg + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp4L = FR_p_Temp4L, f1, FR_p_A3L // Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly3H = FR_p_Poly4H, FR_p_XR3, f0 // Low poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_A14 = FR_p_A18, FR_p_XR4, FR_p_A14 // Poly tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_XR8 = FR_p_XR4, FR_p_XR4, f0 // Poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_TL = FR_r_ResH, FR_r_XS2L, f0 // sin for neg + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp1L = FR_p_Temp1L, f1, FR_p_A0L // High poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_A6 = FR_p_A10, FR_p_XR4, FR_p_A6 // Poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_r_TT = FR_r_ResH, FR_r_XS2, FR_r_TH // sin for neg + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_Res3H = FR_r_TH, f1, f1 // sin for neg + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly4L = FR_p_Poly4L, f1, FR_p_Temp4L // Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly3L = FR_p_Poly4H, FR_p_XR3L, f0 // Low poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly0H = FR_p_Poly3H,f1,FR_p_Poly1H //Low & High add + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_A7 = FR_r_A8, FR_r_XS2, FR_r_A7 // sin for neg + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_TL = FR_r_ResL, FR_r_XS2, FR_r_TL // sin for neg + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_XS4 = FR_r_XS2, FR_r_XS2, f0 // sin for neg + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly1L = FR_p_Poly1L, f1, FR_p_Temp1L // High poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_PolyTail = FR_p_A14, FR_p_XR8, FR_p_A6 // Poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_r_Res3L = f1, f1, FR_r_Res3H // sin for neg + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_ResH = FR_r_Res3H, FR_r_XS, f0 // sin for neg + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_p_Temp0L = FR_p_Poly4H,FR_p_XR3,FR_p_Poly3H //Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly3L = FR_p_Poly4L,FR_p_XR3,FR_p_Poly3L //Low poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_p_Poly0L = FR_p_Poly1H,f1,FR_p_Poly0H //Low & High add + nop.i 0 +} +{ .mfi + nop.m 0 +(p13) fma.s1 FR_p_OddPoly0H = FR_p_Poly0H, FR_p_AbsXM1, f0 + // Reccurent computations - multiplying by X-1 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_TL = FR_r_TL, f1, FR_r_TT // sin for neg + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_A3 = FR_r_A4, FR_r_XS2, FR_r_A3 // sin for neg + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly1L = FR_p_PolyTail,FR_p_XR6,FR_p_Poly1L//High + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_A5 = FR_r_A6, FR_r_XS2, FR_r_A5 // sin for neg + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_Res3L = FR_r_Res3L, f1, FR_r_TH // sin for neg + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 FR_r_ResL = FR_r_Res3H, FR_r_XS, FR_r_ResH//sin for neg + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly3L = FR_p_Poly3L, f1, FR_p_Temp0L // Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_A7 = FR_r_A9, FR_r_XS4, FR_r_A7 // sin for neg + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly0L = FR_p_Poly0L,f1,FR_p_Poly3H //Low & High add + nop.i 0 +} +{ .mfi + nop.m 0 +(p13) fms.s1 FR_p_OddPoly0L = FR_p_Poly0H, FR_p_AbsXM1, FR_p_OddPoly0H + // Reccurent computations - multiplying by X-1 (low part) + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_A3 = FR_r_A5, FR_r_XS4, FR_r_A3 // sin for neg + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_XS7 = FR_r_XS4, FR_r_XS2, f0 // xs^6 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_Res3L = FR_r_Res3L, f1, FR_r_TL // sin for neg + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_XS8 = FR_r_XS4, FR_r_XS4, f0 // sin for neg + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp0H = FR_p_Poly3L,f1,FR_p_Poly1L //Low & High add + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_XS7 = FR_r_XS7, FR_r_XS, f0 // xs^7 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_ResL = FR_r_Res3L, FR_r_XS, FR_r_ResL//sin for neg + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_Tail = FR_r_A7, FR_r_XS8, FR_r_A3 // sin tail res + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly0L = FR_p_Poly0L,f1,FR_p_Temp0H //Low & High add + nop.i 0 +};; + + +{ .mfi + nop.m 0 + fma.s1 FR_r_ResL = FR_r_Tail,FR_r_XS7,FR_r_ResL //sin for neg + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p13) fma.s1 FR_p_OddPoly0L = FR_p_Poly0L, FR_p_AbsXM1, FR_p_OddPoly0L + // Reccurent computations - multiplying by X-1 (low part) + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_TT = FR_r_ResL, FR_r_AbsX, f0 // X*sin + nop.i 0 +};; + +.pred.rel "mutex",p12,p13 +{ .mfi + nop.m 0 +(p12) fma.s0 f8 = FR_p_Poly0H, f1, FR_p_Poly0L // Even + nop.i 0 +} +{ .mfb + nop.m 0 +(p13) fma.s0 f8 = FR_p_OddPoly0H, f1, FR_p_OddPoly0L // Odd +(p14) br.ret.spnt b0 // Exit for 1 <= |X| < 13 path (positive arguments)///// +};; + +{ .mfi + nop.m 0 +(p13) fma.s1 FR_p_Poly0H = FR_p_OddPoly0H, f1, f0 + // Reccurent computations + nop.i 0 +} +{ .mfi + nop.m 0 +(p13) fma.s1 FR_p_Poly0L = FR_p_OddPoly0L, f1, f0 + // Reccurent computations + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_Res1H = FR_r_ResH, FR_r_AbsX, FR_r_TT // X*sin +(p11) cmp.eq p13, p12 = r0, r0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_r_Res1L = FR_r_ResH,FR_r_AbsX,FR_r_Res1H// X*sin +(p9) cmp.eq p13, p12 = r0, r0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_Res1L = FR_r_Res1L, f1, FR_r_TT // sin for neg +(p10) cmp.eq p13, p12 = r0, r0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_TL = FR_p_Poly0L, FR_r_Res1H, f0 // mult by sin + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_TL = FR_p_Poly0H,FR_r_Res1L,FR_r_TL//mult by sin + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_ResH = FR_p_Poly0H,FR_r_Res1H,FR_r_TL//mult by sin + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_r_ResL = FR_p_Poly0H,FR_r_Res1H,FR_r_ResH//sin mult + nop.i 0 +};; + +{ .mfi + nop.m 0 + frcpa.s1 FR_r_Y0,p0 = f1,FR_r_ResH // y = frcpa(b) + nop.i 0 +};; + +{ .mfi + nop.m 0 + fneg FR_r_NegOne = f1 // Form -1.0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_ResL = FR_r_ResL, f1, FR_r_TL //Low result of mult + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_Q0 = f1,FR_r_Y0,f0 // q = a*y + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 FR_r_E0 = FR_r_Y0,FR_r_ResH,f1 // e = 1-b*y + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_E2 = FR_r_E0,FR_r_E0,FR_r_E0 // e2 = e+e^2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_E1 = FR_r_E0,FR_r_E0,f0 // e1 = e^2 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_Y1 = FR_r_Y0,FR_r_E2,FR_r_Y0 // y1 = y+y*e2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_E3 = FR_r_E1,FR_r_E1,FR_r_E0 // e3 = e+e1^2 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_Y2 = FR_r_Y1,FR_r_E3,FR_r_Y0 // y2 = y+y1*e3 + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 FR_r_R0 = FR_r_ResH,FR_r_Q0,f1 // r = a-b*q + nop.i 0 +};; + +{ .mfi + nop.m 0 + fnma.s1 FR_r_E4 = FR_r_ResH,FR_r_Y2,f1 // e4 = 1-b*y2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_ZH = FR_r_R0,FR_r_Y2,FR_r_Q0 // x = q+r*y2 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_Y3 = FR_r_Y2,FR_r_E4,FR_r_Y2 // y3 = y2+y2*e4 + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 FR_r_R1 = FR_r_ResH,FR_r_ZH,f1 // r1 = a-b*x + nop.i 0 +};; + +{ .mfi + nop.m 0 + fnma.s1 FR_r_R1 = FR_r_ResL,FR_r_ZH,FR_r_R1 // r1=r1-b_lo*X + nop.i 0 +} +{ .mfi + nop.m 0 +(p12) fma.s1 FR_r_ZHN = FR_r_ZH,FR_r_NegOne, f0 // Negate for evens + nop.i 0 +};; + +.pred.rel "mutex",p13,p12 +{ .mfi + nop.m 0 +(p13) fma.s0 f8 = FR_r_R1,FR_r_Y3,FR_r_ZH // Final result + nop.i 0 +} +{ .mfb + nop.m 0 +(p12) fnma.s0 f8 = FR_r_R1,FR_r_Y3,FR_r_ZHN // Final result + br.ret.sptk b0 // Exit for 1 <= |X| < 13 path (negative arguments)////// +};; + + +//////////// |X| < 1 path ///////////////////////////////////////////////////// +//------------------------------------------------------------------------------ +.align 64 +tgamma_lt_1: +{ .mfi + getf.exp GR_p_Exp = FR_p_AbsX // exp of abs X + fma.s1 FR_z_Q0 = f1,FR_z_Y0,f0 // q = a*y + add GR_r_sin_Table2= 0x50, GR_r_sin_Table +} +{ .mfi + ldfpd FR_p_0p5, FR_p_1p5 = [GR_c_Table], 16 + fnma.s1 FR_z_E0 = FR_z_Y0,f8,f1 // e = 1-b*y + add GR_p_Table2 = 0xB0, GR_p_Table +};; + +{ .mfi + ldfd FR_p_0p25 = [GR_c_Table] + fcvt.xf FR_r_XNS = FR_r_IXNS // Convert int repr to float + shr.u GR_p_X_Sgnd = GR_p_X_Sgnd, 60 + // Obtain only 4 bits of significand +} +{ .mfi + nop.m 0 + nop.f 0 + add GR_p_Bias = 0xffff, r0 // Set bias +};; + +{ .mfi + ldfpd FR_r_A2H, FR_r_A2L = [GR_r_sin_Table], 16 + nop.f 0 + shl GR_p_XN = GR_p_Exp, 4 + // Shift exp to 4 bits left to set place for significand +} +{ .mlx + ldfe FR_r_A6 = [GR_r_sin_Table2], 16 + movl GR_p_0p75 = 0xfffec // 0.75 +};; + +{ .mfi + ldfpd FR_r_A1H, FR_r_A1L = [GR_r_sin_Table], 16 + nop.f 0 + or GR_p_XN = GR_p_XN, GR_p_X_Sgnd + // Combine exp with 4 high bits of significand +} +{ .mfi + ldfe FR_r_A5 = [GR_r_sin_Table2], 16 + nop.f 0 + sub GR_p_Exp = GR_p_Exp, GR_p_Bias // Unbiased exp +};; + +{ .mmi + ldfe FR_r_A9 = [GR_r_sin_Table], 16 + ldfe FR_r_A4 = [GR_r_sin_Table2], 16 + cmp.gtu.unc p10, p11 = GR_p_0p75, GR_p_XN // sgnd(x) < 0.75 +};; + +{ .mfi + ldfe FR_r_A8 = [GR_r_sin_Table], 16 + fma.s1 FR_z_E2 = FR_z_E0,FR_z_E0,FR_z_E0 // e2 = e+e^2 +(p10) cmp.gt.unc p9, p10 = -2, GR_p_Exp // x < 0.25 +} +{ .mfi + ldfe FR_r_A3 = [GR_r_sin_Table2], 16 + fma.s1 FR_z_E1 = FR_z_E0,FR_z_E0,f0 // e1 = e^2 +(p11) add GR_p_Offset = 168, r0 // [0.75;1] interval +};; + +{ .mmi +(p10) add GR_p_Offset = 147, r0 // [0.25;0.75] interval + ldfe FR_r_A7 = [GR_r_sin_Table], 16 +(p9) cmp.gt.unc p8, p9 = -3, GR_p_Exp // x < 0.125 +};; + +.pred.rel "mutex",p9,p8 +{ .mmi +(p9) add GR_p_Offset = 126, r0 // [0.125;0.25] interval +(p8) add GR_p_Offset = 189, r0 // [0.;0.125] interval + nop.i 0 +};; + +{ .mmf + shladd GR_p_Table = GR_p_Offset, 4, GR_p_Table //Make addresses + shladd GR_p_Table2 = GR_p_Offset, 4, GR_p_Table2 + fma.s1 FR_r_XS = FR_r_AbsX , f1, FR_r_XNS // xs = |x|-[x] +};; + +.pred.rel "mutex",p8,p11 +{ .mfi + ldfpd FR_p_A5H, FR_p_A5L = [GR_p_Table], 16 +(p11) fms.s1 FR_p_XR = f1, f1, FR_p_AbsX // r = 1 - |x| + // for [0.75;1] interval + nop.i 0 +} +{ .mfi + ldfpd FR_p_A2H, FR_p_A2L = [GR_p_Table2], 16 +(p8) fms.s1 FR_p_XR = FR_p_AbsX, f1, f0 // r = |x| + // for [0.;0.125] interval + nop.i 0 +};; + +{ .mfi + ldfpd FR_p_A4H, FR_p_A4L = [GR_p_Table], 16 + fma.s1 FR_z_Y1 = FR_z_Y0,FR_z_E2,FR_z_Y0 // y1 = y+y*e2 + nop.i 0 +} +{ .mfi + ldfpd FR_p_A1H, FR_p_A1L = [GR_p_Table2], 16 + fma.s1 FR_z_E3 = FR_z_E1,FR_z_E1,FR_z_E0 // e3 = e+e1^2 + nop.i 0 +};; + +.pred.rel "mutex",p9,p10 +{ .mfi + ldfpd FR_p_A3H, FR_p_A3L = [GR_p_Table], 16 +(p9) fms.s1 FR_p_XR = FR_p_AbsX, f1, f0 // r = |x| + // for [0.125;0.25] interval + nop.i 0 +} +{ .mfi + ldfpd FR_p_A0H, FR_p_A0L = [GR_p_Table2], 16 +(p10) fms.s1 FR_p_XR = FR_p_AbsX, f1, FR_p_0p5 // r = |x| - 0.5 + // for [0.25;0.75] interval + nop.i 0 +};; + +{ .mmi + ldfe FR_p_A20 = [GR_p_Table], 16 + ldfe FR_p_A12 = [GR_p_Table2], 16 + nop.i 0 +};; + +{ .mfi + ldfe FR_p_A19 = [GR_p_Table], 16 + fma.s1 FR_r_XS2 = FR_r_XS, FR_r_XS, f0 // xs^2 + nop.i 0 +} +{ .mfi + ldfe FR_p_A11 = [GR_p_Table2], 16 + nop.f 0 + nop.i 0 +};; + +{ .mmi + ldfe FR_p_A18 = [GR_p_Table], 16 + ldfe FR_p_A10 = [GR_p_Table2], 16 + nop.i 0 +};; + +.pred.rel "mutex",p12,p13 +{ .mfi + ldfe FR_p_A17 = [GR_p_Table], 16 + fma.s1 FR_z_Y2 = FR_z_Y1,FR_z_E3,FR_z_Y0 // y2 = y+y1*e3 + nop.i 0 +} +{ .mfi + ldfe FR_p_A9 = [GR_p_Table2], 16 + fnma.s1 FR_z_R0 = f8,FR_z_Q0,f1 // r = a-b*q + nop.i 0 +};; + +{ .mmi + ldfe FR_p_A16 = [GR_p_Table], 16 + ldfe FR_p_A8 = [GR_p_Table2], 16 + nop.i 0 +};; + +{ .mmi + ldfe FR_p_A15 = [GR_p_Table], 16 + ldfe FR_p_A7 = [GR_p_Table2], 16 + nop.i 0 +};; + +{ .mfi + ldfe FR_p_A14 = [GR_p_Table], 16 + fma.s1 FR_r_TH = FR_r_A2H, FR_r_XS2, f0 // neg sin + nop.i 0 +} +{ .mfi + ldfe FR_p_A6 = [GR_p_Table2], 16 + fma.s1 FR_r_TL = FR_r_A2L, FR_r_XS2, f0 // neg sin + nop.i 0 +};; + +{ .mfi + ldfe FR_p_A13 = [GR_p_Table], 16 + fms.s1 FR_r_XS2L = FR_r_XS, FR_r_XS, FR_r_XS2 // xs^2 delta + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp5H = FR_p_A5H, FR_p_XR, f0 // Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_XR2 = FR_p_XR, FR_p_XR, f0 // poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fabs FR_r_XS = FR_r_XS // Absolute value of xs + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp2H = FR_p_A2H, FR_p_XR, f0 // High poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fnma.s1 FR_z_E4 = f8,FR_z_Y2,f1 // e4 = 1-b*y2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_z_ZH = FR_z_R0,FR_z_Y2,FR_z_Q0 // 1/x = q+r*y2 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_r_TT = FR_r_A2H, FR_r_XS2, FR_r_TH // neg sin + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_ResH = FR_r_TH, f1, FR_r_A1H // neg sin + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_TL = FR_r_A2H, FR_r_XS2L, FR_r_TL // neg sin + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_p_Temp5L = FR_p_A5H, FR_p_XR, FR_p_Temp5H // Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly5H = FR_p_Temp5H, f1, FR_p_A4H // Low poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_p_Temp2L = FR_p_A2H, FR_p_XR, FR_p_Temp2H // High poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly2H = FR_p_Temp2H, f1, FR_p_A1H // High poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_XR3 = FR_p_XR2, FR_p_XR, f0 // r^3 + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 FR_p_XR2L = FR_p_XR, FR_p_XR, FR_p_XR2 // r^2 delta + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_A18 = FR_p_A19, FR_p_XR, FR_p_A18 // poly tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_A14 = FR_p_A15, FR_p_XR, FR_p_A14 // poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_XR4 = FR_p_XR2, FR_p_XR2, f0 // poly tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_z_Y3 = FR_z_Y2,FR_z_E4,FR_z_Y2 // y3 = y2+y2*e4 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp5L = FR_p_A5L, FR_p_XR, FR_p_Temp5L // Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 FR_p_Poly5L = FR_p_A4H, f1, FR_p_Poly5H // Low poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp4H = FR_p_Poly5H, FR_p_XR, f0 // Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp2L = FR_p_A2L, FR_p_XR, FR_p_Temp2L // High poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_p_Poly2L = FR_p_A1H, f1, FR_p_Poly2H // High poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp1H = FR_p_Poly2H, FR_p_XR, f0 // High poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_p_XR3L = FR_p_XR2, FR_p_XR, FR_p_XR3 // x^3 delta + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_A16 = FR_p_A17, FR_p_XR, FR_p_A16 //poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_r_ResL = FR_r_A1H, f1, FR_r_ResH // neg sin + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_TL = FR_r_TL, f1, FR_r_TT // neg sin + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp5L = FR_p_Temp5L, f1, FR_p_A4L // Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly5L = FR_p_Poly5L, f1, FR_p_Temp5H //Low poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_p_Temp4L = FR_p_Poly5H, FR_p_XR, FR_p_Temp4H//Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly4H = FR_p_Temp4H, f1, FR_p_A3H // Low poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp2L = FR_p_Temp2L, f1, FR_p_A1L // High poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly2L = FR_p_Poly2L, f1, FR_p_Temp2H // High poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_p_Temp1L = FR_p_Poly2H,FR_p_XR,FR_p_Temp1H //High poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly1H = FR_p_Temp1H, f1, FR_p_A0H // High poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_A12 = FR_p_A13, FR_p_XR, FR_p_A12 // poly tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_XR3L = FR_p_XR2L, FR_p_XR, FR_p_XR3L // x^3 low + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly5L = FR_p_Poly5L, f1, FR_p_Temp5L //Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_A10 = FR_p_A11, FR_p_XR, FR_p_A10 //poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_p_Poly4L = FR_p_A3H, f1, FR_p_Poly4H /// Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_A6 = FR_p_A7, FR_p_XR, FR_p_A6 // poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_A8 = FR_p_A9, FR_p_XR, FR_p_A8 // poly tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_XR6 = FR_p_XR4, FR_p_XR2, f0 // r^6 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly2L = FR_p_Poly2L, f1, FR_p_Temp2L // High poly + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 FR_p_Poly1L = FR_p_A0H, f1, FR_p_Poly1H // High poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_ResL = FR_r_ResL, f1, FR_r_TH // neg sin + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_TT = FR_r_TL, f1, FR_r_A1L // neg sin + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp4L = FR_p_Poly5L,FR_p_XR,FR_p_Temp4L //Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_A18 = FR_p_A20, FR_p_XR2, FR_p_A18 // poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly4L = FR_p_Poly4L, f1, FR_p_Temp4H // Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_A14 = FR_p_A16, FR_p_XR2, FR_p_A14 // poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_A6 = FR_p_A8, FR_p_XR2, FR_p_A6 // poly tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_A10 = FR_p_A12, FR_p_XR2, FR_p_A10 // poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp1L = FR_p_Poly2L,FR_p_XR,FR_p_Temp1L //High poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly1L = FR_p_Poly1L, f1, FR_p_Temp1H // High poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_ResL = FR_r_ResL, f1, FR_r_TT // neg sin + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_TH = FR_r_ResH, FR_r_XS2, f0 // neg sin + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp4L = FR_p_Temp4L, f1, FR_p_A3L // Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly3H = FR_p_Poly4H, FR_p_XR3, f0 // Low poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_A14 = FR_p_A18, FR_p_XR4, FR_p_A14 // poly tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_XR8 = FR_p_XR4, FR_p_XR4, f0 // r^8 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_TL = FR_r_ResH, FR_r_XS2L, f0 // neg sin + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 FR_z_R1 = f8,FR_z_ZH,f1 // r1 = a-b*x + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp1L = FR_p_Temp1L, f1, FR_p_A0L // High poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_A6 = FR_p_A10, FR_p_XR4, FR_p_A6 // poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_r_TT = FR_r_ResH, FR_r_XS2, FR_r_TH // neg sin + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_Res3H = FR_r_TH, f1, f1 // neg sin + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly4L = FR_p_Poly4L, f1, FR_p_Temp4L // Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly3L = FR_p_Poly4H, FR_p_XR3L, f0 // Low poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly0H = FR_p_Poly3H, f1, FR_p_Poly1H // Result + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_A7 = FR_r_A8, FR_r_XS2, FR_r_A7 // neg sin + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_TL = FR_r_ResL, FR_r_XS2, FR_r_TL // neg sin + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_XS4 = FR_r_XS2, FR_r_XS2, f0 // xs^4 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly1L = FR_p_Poly1L, f1, FR_p_Temp1L // High poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_PolyTail = FR_p_A14, FR_p_XR8, FR_p_A6 // poly tail + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_r_Res3L = f1, f1, FR_r_Res3H // neg sin + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_ResH = FR_r_Res3H, FR_r_XS, f0 // neg sin + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_p_Temp0L = FR_p_Poly4H,FR_p_XR3,FR_p_Poly3H //Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly3L = FR_p_Poly4L,FR_p_XR3,FR_p_Poly3L //Low poly + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_p_Poly0L = FR_p_Poly1H, f1, FR_p_Poly0H // Result + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_z_ZL = FR_z_R1,FR_z_Y3, f0 // x_lo = r1*y3 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_TL = FR_r_TL, f1, FR_r_TT // neg sin + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_A3 = FR_r_A4, FR_r_XS2, FR_r_A3 /// neg sin + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly1L = FR_p_PolyTail,FR_p_XR6,FR_p_Poly1L // High + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_A5 = FR_r_A6, FR_r_XS2, FR_r_A5 // neg sin + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_Res3L = FR_r_Res3L, f1, FR_r_TH // neg sin + nop.i 0 +} +{ .mfi + nop.m 0 + fms.s1 FR_r_ResL = FR_r_Res3H, FR_r_XS, FR_r_ResH // neg sin + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly3L = FR_p_Poly3L, f1, FR_p_Temp0L // Low poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_A7 = FR_r_A9, FR_r_XS4, FR_r_A7 // neg sin + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly0L = FR_p_Poly0L, f1, FR_p_Poly3H // result + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p14) fma.s1 f8 = FR_p_Poly0H, FR_z_ZH, f0 // z*poly + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp1L = FR_p_Poly0H, FR_z_ZL, f0 // z*poly low + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_A3 = FR_r_A5, FR_r_XS4, FR_r_A3 // sin tail + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_XS7 = FR_r_XS4, FR_r_XS2, f0 // xs^6 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_Res3L = FR_r_Res3L, f1, FR_r_TL // sin low + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_XS8 = FR_r_XS4, FR_r_XS4, f0 // xs^8 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp0H = FR_p_Poly3L, f1, FR_p_Poly1L // result + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p14) fms.s1 FR_p_Temp1H = FR_p_Poly0H, FR_z_ZH, f8 // hi result + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_XS7 = FR_r_XS7, FR_r_XS, f0 // xs^7 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_ResL = FR_r_Res3L, FR_r_XS, FR_r_ResL // lo result + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_Tail = FR_r_A7, FR_r_XS8, FR_r_A3 // tail result + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_p_Poly0L = FR_p_Poly0L, f1, FR_p_Temp0H // lo result + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_ResL = FR_r_Tail, FR_r_XS7, FR_r_ResL // lo result + nop.i 0 +};; + +{ .mfi + nop.m 0 +(p14) fma.s1 FR_p_Temp1L = FR_p_Poly0L,FR_z_ZH,FR_p_Temp1L //hi result + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_TT = FR_r_ResL, f1, f0 // for low result + nop.i 0 +};; + +.pred.rel "mutex",p12,p13 +{ .mfi + nop.m 0 +(p14) fma.s1 FR_p_Temp1L = FR_p_Temp1L, f1, FR_p_Temp1H // for lo res + nop.i 0 +};; + +{ .mfi +(p10) cmp.eq p13, p12 = r0, r0 // set p13, clear p12 + fma.s1 FR_r_Res1H = FR_r_ResH, f1, FR_r_TT // hi res + nop.i 0 +};; + +{ .mfb +(p9) cmp.eq p13, p12 = r0, r0 // set p13, clear p12 +(p14) fma.s0 f8 = f8, f1, FR_p_Temp1L // Final result +(p14) br.ret.spnt b0 // Exit for 0 < |X| < 1 path (positive arguments)/////// +};; + +{ .mfi +(p11) cmp.eq p13, p12 = r0, r0 // set p13, clear p12 + fms.s1 FR_r_Res1L = FR_r_ResH, f1, FR_r_Res1H // Low sin result + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_Res1L = FR_r_Res1L, f1, FR_r_TT // Low sin result + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_TL = FR_p_Poly0L,FR_r_Res1H,f0 //Low sin result + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_TL = FR_p_Poly0H, FR_r_Res1L, FR_r_TL //Low sin + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_ResH = FR_p_Poly0H, FR_r_Res1H, FR_r_TL //High sin + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_r_ResL = FR_p_Poly0H,FR_r_Res1H,FR_r_ResH //Low res + nop.i 0 +};; + +{ .mfi + nop.m 0 + frcpa.s1 FR_r_Y0,p0 = f1,FR_r_ResH // y = frcpa(b) + nop.i 0 +};; + +{ .mfi + nop.m 0 + fneg FR_r_NegOne = f1 // Construct -1.0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_ResL = FR_r_ResL, f1, FR_r_TL // low sin + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_Q0 = f1,FR_r_Y0,f0 // q = a*y + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 FR_r_E0 = FR_r_Y0,FR_r_ResH,f1 // e = 1-b*y + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_E2 = FR_r_E0,FR_r_E0,FR_r_E0 // e2 = e+e^2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_E1 = FR_r_E0,FR_r_E0,f0 // e1 = e^2 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_Y1 = FR_r_Y0,FR_r_E2,FR_r_Y0 // y1 = y+y*e2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_E3 = FR_r_E1,FR_r_E1,FR_r_E0 // e3 = e+e1^2 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_Y2 = FR_r_Y1,FR_r_E3,FR_r_Y0 // y2 = y+y1*e3 + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 FR_r_R0 = FR_r_ResH,FR_r_Q0,f1 // r = a-b*q + nop.i 0 +};; + +{ .mfi + nop.m 0 + fnma.s1 FR_r_E4 = FR_r_ResH,FR_r_Y2,f1 // e4 = 1-b*y2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_ZH = FR_r_R0,FR_r_Y2,FR_r_Q0 // x = q+r*y2 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_r_Y3 = FR_r_Y2,FR_r_E4,FR_r_Y2 // y3 = y2+y2*e4 + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 FR_r_R1 = FR_r_ResH,FR_r_ZH,f1 // r1 = a-b*x + nop.i 0 +};; + +{ .mfi + nop.m 0 + fnma.s1 FR_r_R1 = FR_r_ResL,FR_r_ZH,FR_r_R1 // r1=r1 - b_lo*X + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r_ZHN = FR_r_ZH,FR_r_NegOne, f0 // Negate + nop.i 0 +};; + +.pred.rel "mutex",p13,p12 +{ .mfb + nop.m 0 + fnma.s0 f8 = FR_r_R1,FR_r_Y3,FR_r_ZHN // Result for neg + br.ret.sptk b0 // Exit for 0 < |X| < 1 path (negative arguments)////// +};; + + + + +// SPECIALS (x for natval, nan, +/-inf or +/-0) /////////////////////////////// +//------------------------------------------------------------------------------ +.align 32 +tgammal_spec: +{ .mlx + nop.m 0 + movl GR_DenOverflow = 0x2000000000000001 +} +{ .mfi + nop.m 0 + fclass.m p9,p0 = f8,0xB // +/-denormals + nop.i 0 +};; +{ .mfi + nop.m 0 + fclass.m p6,p0 = f8,0x1E1 // Test x for natval, nan, +inf + nop.i 0 +};; +{ .mfi + nop.m 0 + fclass.m p7,p8 = f8,0x7 // +/-0 + nop.i 0 +} + +{ .mfi +(p9) cmp.ltu.unc p10,p11 = GR_l_signif_Z, GR_DenOverflow +(p9) fnorm.s0 f8 = f8 + nop.i 0 +};; + +{ .mfb + nop.m 0 +(p9) fcvt.fx.trunc.s1 FR_n_IXN = FR_l_AbsX // Round by truncate +(p11) br.cond.sptk tgamma_lt_1 // Return to gamma ('good' denormal)//////////// +};; + +{ .mfb + nop.m 0 + nop.f 0 +(p10) br.cond.spnt tgammal_overflow // "Bad" denormal - overflow! ///////////// +};; + +{ .mfi + nop.m 0 + mov FR_X = f8 // for error handler + nop.i 0 +} +{ .mfb + nop.m 0 +(p6) fma.s0 f8 = f8,f1,f8 // res = x + x +(p6) br.ret.spnt b0 // Exit for NAN, INF and NatVals //////////////////////// +};; +.pred.rel "mutex",p7,p8 +{ .mfi +(p7) mov GR_Parameter_TAG = 256 // negative +(p7) frcpa.s0 f8,p0 = f1,f8 // Raise V flag + nop.i 0 +} +{ .mfb + nop.m 0 + nop.f 0 +(p8) br.cond.spnt tgammal_singularity // Branch for +ZERO //////////////////// +};; + +{ .mfb + nop.m 0 + nop.f 0 + br.cond.spnt tgammal_libm_err // Branch for -ZERO /////////////////////// +};; + + + + +// SINGULARITY (x is negative integer or 0) //////////////////////////////////// +//------------------------------------------------------------------------------ +.align 32 +tgammal_singularity: +{ .mfi + nop.m 0 + mov FR_X = f8 // For error handler + mov GR_Parameter_TAG = 256 // negative +} +{ .mfb + nop.m 0 + frcpa.s0 f8,p0 = f0,f0 // Raise V flag + br.cond.sptk tgammal_libm_err // Call error handler ///////////////////// + // with singularity error ///////////////// +};; + + + + +// OVERFLOW (result is too big and cannot be represented by normal value) ////// +// ( X > 1755.54 and for denormals with abs value less than 0x2000000000000001 ) +//------------------------------------------------------------------------------ +.align 32 +tgammal_overflow: +{ .mfi + addl r8 = 0x1FFFE, r0 // Exp of INF + fcmp.lt.s1 p15,p14 = f8,f0 // p14 - pos arg, p15 - neg arg + nop.i 0 +};; + +{ .mfi + setf.exp f9 = r8 + mov FR_X = f8 // For error handler + mov GR_Parameter_TAG = 255 // overflow +};; + +.pred.rel "mutex",p14,p15 +{ .mfi + nop.m 0 +(p14) fma.s0 f8 = f9,f9,f0 // Set I,O and +INF result + nop.i 0 +} +{ .mfb + nop.m 0 +(p15) fnma.s0 f8 = f9,f9,f0 // Set I,O and -INF result + br.cond.sptk tgammal_libm_err // Call error handler ///////////////////// + // with overflow error //////////////////// +};; + + + + + +// UNDERFLOW (x is negative noninteger with big absolute value) //////////////// +//------------------------------------------------------------------------------ +.align 32 +tgammal_underflow: +{ .mfi + nop.m 0 + fcvt.fx.trunc.s1 FR_u_IXN = f8 // Convert arg to int repres. in FR + nop.i 0 +};; + +{ .mmi + getf.sig GR_u_XN = FR_u_IXN + mov r11 = 0x00001 + nop.i 0 +};; + +{ .mfi + setf.exp f9 = r11 + nop.f 0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + nop.f 0 + tbit.z p6,p7 = GR_u_XN,0 // even or odd +};; + +.pred.rel "mutex",p6,p7 +{ .mfi + nop.m 0 +(p6) fms.s0 f8 = f9,f9,f9 // for negatives + nop.i 0 +} +{ .mfb + nop.m 0 +(p7) fma.s0 f8 = f9,f9,f9 // for positives + br.ret.sptk b0 // Exit for underflow path ////////////////////////////// +};; + + +GLOBAL_LIBM_END(tgammal) + + + + +////////////////// Tgammal error handler /////////////////////////////////////// +//------------------------------------------------------------------------------ +LOCAL_LIBM_ENTRY(__libm_error_region) +tgammal_libm_err: +.prologue +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; +{ .mmi + stfe [GR_Parameter_Y] = FR_Y,16 // Save Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; +.body +{ .mib + stfe [GR_Parameter_X] = FR_X // Store Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y + nop.b 0 // Parameter 3 address +} +{ .mib + stfe [GR_Parameter_Y] = FR_RESULT // Store Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; +{ .mmi + nop.m 999 + nop.m 999 + add GR_Parameter_RESULT = 48,sp +};; +{ .mmi + ldfe f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region#) + +.type __libm_error_support#,@function +.global __libm_error_support# diff --git a/sysdeps/ia64/gccframe.h b/sysdeps/ia64/gccframe.h new file mode 100644 index 0000000000..745b50cfa4 --- /dev/null +++ b/sysdeps/ia64/gccframe.h @@ -0,0 +1,32 @@ +/* Definition of object in frame unwind info. ia64 version. + Copyright (C) 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 + 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. */ + +/* This must match what's in frame.h in gcc. */ + +struct object +{ + void *pc_base; /* This field will be set by find_fde. */ + void *pc_begin; + void *pc_end; + void *fde_begin; + void *fde_end; + void *fde_array; + __SIZE_TYPE__ count; + struct object *next; +}; diff --git a/sysdeps/ia64/hp-timing.c b/sysdeps/ia64/hp-timing.c new file mode 100644 index 0000000000..ae8680f9a7 --- /dev/null +++ b/sysdeps/ia64/hp-timing.c @@ -0,0 +1,24 @@ +/* Support for high precision, low overhead timing functions. IA-64 version. + Copyright (C) 2001, 2002 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2001. + + 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. */ + +#include + +/* We have to define the variable for the overhead. */ +hp_timing_t _dl_hp_timing_overhead; diff --git a/sysdeps/ia64/hp-timing.h b/sysdeps/ia64/hp-timing.h new file mode 100644 index 0000000000..3c2166ee56 --- /dev/null +++ b/sysdeps/ia64/hp-timing.h @@ -0,0 +1,148 @@ +/* High precision, low overhead timing functions. IA-64 version. + Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2001. + + 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 _HP_TIMING_H +#define _HP_TIMING_H 1 + +#include +#include +#include +#include + +/* The macros defined here use the timestamp counter in IA-64. They + provide a very accurate way to measure the time with very little + overhead. The time values themself have no real meaning, only + differences are interesting. + + The list of macros we need includes the following: + + - HP_TIMING_AVAIL: test for availability. + + - HP_TIMING_INLINE: this macro is non-zero if the functionality is not + implemented using function calls but instead uses some inlined code + which might simply consist of a few assembler instructions. We have to + know this since we might want to use the macros here in places where we + cannot make function calls. + + - hp_timing_t: This is the type for variables used to store the time + values. + + - HP_TIMING_ZERO: clear `hp_timing_t' object. + + - HP_TIMING_NOW: place timestamp for current time in variable given as + parameter. + + - HP_TIMING_DIFF_INIT: do whatever is necessary to be able to use the + HP_TIMING_DIFF macro. + + - HP_TIMING_DIFF: compute difference between two times and store it + in a third. Source and destination might overlap. + + - HP_TIMING_ACCUM: add time difference to another variable. This might + be a bit more complicated to implement for some platforms as the + operation should be thread-safe and 64bit arithmetic on 32bit platforms + is not. + + - HP_TIMING_ACCUM_NT: this is the variant for situations where we know + there are no threads involved. + + - HP_TIMING_PRINT: write decimal representation of the timing value into + the given string. This operation need not be inline even though + HP_TIMING_INLINE is specified. + +*/ + +/* We always assume having the timestamp register. */ +#define HP_TIMING_AVAIL (1) + +/* We indeed have inlined functions. */ +#define HP_TIMING_INLINE (1) + +/* We use 64bit values for the times. */ +typedef unsigned long int hp_timing_t; + +/* Set timestamp value to zero. */ +#define HP_TIMING_ZERO(Var) (Var) = (0) + + +/* The Itanium/Merced has a bug where the ar.itc register value read + is not correct in some situations. The solution is to read again. + For now we always do this until we know how to recognize a fixed + processor implementation. */ +#define REPEAT_READ(val) __builtin_expect ((long int) val == -1, 0) + +/* That's quite simple. Use the `ar.itc' instruction. */ +#define HP_TIMING_NOW(Var) \ + ({ unsigned long int __itc; \ + do \ + asm volatile ("mov %0=ar.itc" : "=r" (__itc) : : "memory"); \ + while (REPEAT_READ (__itc)); \ + Var = __itc; }) + +/* Use two 'ar.itc' instructions in a row to find out how long it takes. */ +#define HP_TIMING_DIFF_INIT() \ + do { \ + int __cnt = 5; \ + GLRO(dl_hp_timing_overhead) = ~0ul; \ + do \ + { \ + hp_timing_t __t1, __t2; \ + HP_TIMING_NOW (__t1); \ + HP_TIMING_NOW (__t2); \ + if (__t2 - __t1 < GLRO(dl_hp_timing_overhead)) \ + GLRO(dl_hp_timing_overhead) = __t2 - __t1; \ + } \ + while (--__cnt > 0); \ + } while (0) + +/* It's simple arithmetic for us. */ +#define HP_TIMING_DIFF(Diff, Start, End) (Diff) = ((End) - (Start)) + +/* We have to jump through hoops to get this correctly implemented. */ +#define HP_TIMING_ACCUM(Sum, Diff) \ + do { \ + hp_timing_t __oldval; \ + hp_timing_t __diff = (Diff) - GLRO(dl_hp_timing_overhead); \ + hp_timing_t __newval; \ + do \ + { \ + __oldval = (Sum); \ + __newval = __oldval + __diff; \ + } \ + while (! __sync_bool_compare_and_swap (&Sum, __oldvar, __newval)); \ + } while (0) + +/* No threads, no extra work. */ +#define HP_TIMING_ACCUM_NT(Sum, Diff) (Sum) += (Diff) + +/* Print the time value. */ +#define HP_TIMING_PRINT(Buf, Len, Val) \ + do { \ + char __buf[20]; \ + char *__cp = _itoa_word (Val, __buf + sizeof (__buf), 10, 0); \ + int __len = (Len); \ + char *__dest = (Buf); \ + while (__len-- > 0 && __cp < __buf + sizeof (__buf)) \ + *__dest++ = *__cp++; \ + memcpy (__dest, " clock cycles", MIN (__len, \ + (int) sizeof (" clock cycles"))); \ + } while (0) + +#endif /* hp-timing.h */ diff --git a/sysdeps/ia64/htonl.S b/sysdeps/ia64/htonl.S new file mode 100644 index 0000000000..92c3cae4d1 --- /dev/null +++ b/sysdeps/ia64/htonl.S @@ -0,0 +1,31 @@ +/* Change byte order in 32-bit value. ia64 version. + Copyright (C) 2000, 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Dan Pop + + 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. */ + + +#include + +ENTRY(htonl) + shl ret0 = r32, 32 + ;; + mux1 ret0 = ret0, @rev + ret +END(htonl) + +weak_alias (htonl, ntohl) diff --git a/sysdeps/ia64/htons.S b/sysdeps/ia64/htons.S new file mode 100644 index 0000000000..317ab6179b --- /dev/null +++ b/sysdeps/ia64/htons.S @@ -0,0 +1,31 @@ +/* Change byte order in 16-bit value. ia64 version. + Copyright (C) 2000, 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Dan Pop + + 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. */ + + +#include + +ENTRY(htons) + shl ret0 = r32, 48 + ;; + mux1 ret0 = ret0, @rev + ret +END(htons) + +weak_alias (htons, ntohs) diff --git a/sysdeps/ia64/ia64libgcc.S b/sysdeps/ia64/ia64libgcc.S new file mode 100644 index 0000000000..3f77b06a5a --- /dev/null +++ b/sysdeps/ia64/ia64libgcc.S @@ -0,0 +1,350 @@ +/* From the Intel IA-64 Optimization Guide, choose the minimum latency + alternative. */ + +#include +#undef ret + +#include + +#if SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_2_6) + +/* __divtf3 + Compute a 80-bit IEEE double-extended quotient. + farg0 holds the dividend. farg1 holds the divisor. */ + +ENTRY(___divtf3) + cmp.eq p7, p0 = r0, r0 + frcpa.s0 f10, p6 = farg0, farg1 + ;; +(p6) cmp.ne p7, p0 = r0, r0 + .pred.rel.mutex p6, p7 +(p6) fnma.s1 f11 = farg1, f10, f1 +(p6) fma.s1 f12 = farg0, f10, f0 + ;; +(p6) fma.s1 f13 = f11, f11, f0 +(p6) fma.s1 f14 = f11, f11, f11 + ;; +(p6) fma.s1 f11 = f13, f13, f11 +(p6) fma.s1 f13 = f14, f10, f10 + ;; +(p6) fma.s1 f10 = f13, f11, f10 +(p6) fnma.s1 f11 = farg1, f12, farg0 + ;; +(p6) fma.s1 f11 = f11, f10, f12 +(p6) fnma.s1 f12 = farg1, f10, f1 + ;; +(p6) fma.s1 f10 = f12, f10, f10 +(p6) fnma.s1 f12 = farg1, f11, farg0 + ;; +(p6) fma.s0 fret0 = f12, f10, f11 +(p7) mov fret0 = f10 + br.ret.sptk rp +END(___divtf3) + .symver ___divtf3, __divtf3@GLIBC_2.2 + +/* __divdf3 + Compute a 64-bit IEEE double quotient. + farg0 holds the dividend. farg1 holds the divisor. */ + +ENTRY(___divdf3) + cmp.eq p7, p0 = r0, r0 + frcpa.s0 f10, p6 = farg0, farg1 + ;; +(p6) cmp.ne p7, p0 = r0, r0 + .pred.rel.mutex p6, p7 +(p6) fmpy.s1 f11 = farg0, f10 +(p6) fnma.s1 f12 = farg1, f10, f1 + ;; +(p6) fma.s1 f11 = f12, f11, f11 +(p6) fmpy.s1 f13 = f12, f12 + ;; +(p6) fma.s1 f10 = f12, f10, f10 +(p6) fma.s1 f11 = f13, f11, f11 + ;; +(p6) fmpy.s1 f12 = f13, f13 +(p6) fma.s1 f10 = f13, f10, f10 + ;; +(p6) fma.d.s1 f11 = f12, f11, f11 +(p6) fma.s1 f10 = f12, f10, f10 + ;; +(p6) fnma.d.s1 f8 = farg1, f11, farg0 + ;; +(p6) fma.d fret0 = f8, f10, f11 +(p7) mov fret0 = f10 + br.ret.sptk rp + ;; +END(___divdf3) + .symver ___divdf3, __divdf3@GLIBC_2.2 + +/* __divsf3 + Compute a 32-bit IEEE float quotient. + farg0 holds the dividend. farg1 holds the divisor. */ + +ENTRY(___divsf3) + cmp.eq p7, p0 = r0, r0 + frcpa.s0 f10, p6 = farg0, farg1 + ;; +(p6) cmp.ne p7, p0 = r0, r0 + .pred.rel.mutex p6, p7 +(p6) fmpy.s1 f8 = farg0, f10 +(p6) fnma.s1 f9 = farg1, f10, f1 + ;; +(p6) fma.s1 f8 = f9, f8, f8 +(p6) fmpy.s1 f9 = f9, f9 + ;; +(p6) fma.s1 f8 = f9, f8, f8 +(p6) fmpy.s1 f9 = f9, f9 + ;; +(p6) fma.d.s1 f10 = f9, f8, f8 + ;; +(p6) fnorm.s.s0 fret0 = f10 +(p7) mov fret0 = f10 + br.ret.sptk rp + ;; +END(___divsf3) + .symver ___divsf3, __divsf3@GLIBC_2.2 + +/* __divdi3 + Compute a 64-bit integer quotient. + in0 holds the dividend. in1 holds the divisor. */ + +ENTRY(___divdi3) + .regstk 2,0,0,0 + /* Transfer inputs to FP registers. */ + setf.sig f8 = in0 + setf.sig f9 = in1 + ;; + /* Convert the inputs to FP, so that they won't be treated as + unsigned. */ + fcvt.xf f8 = f8 + fcvt.xf f9 = f9 + ;; + /* Compute the reciprocal approximation. */ + frcpa.s1 f10, p6 = f8, f9 + ;; + /* 3 Newton-Raphson iterations. */ +(p6) fnma.s1 f11 = f9, f10, f1 +(p6) fmpy.s1 f12 = f8, f10 + ;; +(p6) fmpy.s1 f13 = f11, f11 +(p6) fma.s1 f12 = f11, f12, f12 + ;; +(p6) fma.s1 f10 = f11, f10, f10 +(p6) fma.s1 f11 = f13, f12, f12 + ;; +(p6) fma.s1 f10 = f13, f10, f10 +(p6) fnma.s1 f12 = f9, f11, f8 + ;; +(p6) fma.s1 f10 = f12, f10, f11 + ;; + /* Round quotient to an integer. */ + fcvt.fx.trunc.s1 f10 = f10 + ;; + /* Transfer result to GP registers. */ + getf.sig ret0 = f10 + br.ret.sptk rp + ;; +END(___divdi3) + .symver ___divdi3, __divdi3@GLIBC_2.2 + +/* __moddi3 + Compute a 64-bit integer modulus. + in0 holds the dividend (a). in1 holds the divisor (b). */ + +ENTRY(___moddi3) + .regstk 2,0,0,0 + /* Transfer inputs to FP registers. */ + setf.sig f14 = in0 + setf.sig f9 = in1 + ;; + /* Convert the inputs to FP, so that they won't be treated as + unsigned. */ + fcvt.xf f8 = f14 + fcvt.xf f9 = f9 + ;; + /* Compute the reciprocal approximation. */ + frcpa.s1 f10, p6 = f8, f9 + ;; + /* 3 Newton-Raphson iterations. */ +(p6) fmpy.s1 f12 = f8, f10 +(p6) fnma.s1 f11 = f9, f10, f1 + ;; +(p6) fma.s1 f12 = f11, f12, f12 +(p6) fmpy.s1 f13 = f11, f11 + ;; +(p6) fma.s1 f10 = f11, f10, f10 +(p6) fma.s1 f11 = f13, f12, f12 + ;; + sub in1 = r0, in1 +(p6) fma.s1 f10 = f13, f10, f10 +(p6) fnma.s1 f12 = f9, f11, f8 + ;; + setf.sig f9 = in1 +(p6) fma.s1 f10 = f12, f10, f11 + ;; + fcvt.fx.trunc.s1 f10 = f10 + ;; + /* r = q * (-b) + a */ + xma.l f10 = f10, f9, f14 + ;; + /* Transfer result to GP registers. */ + getf.sig ret0 = f10 + br.ret.sptk rp + ;; +END(___moddi3) + .symver ___moddi3, __moddi3@GLIBC_2.2 + +/* __udivdi3 + Compute a 64-bit unsigned integer quotient. + in0 holds the dividend. in1 holds the divisor. */ + +ENTRY(___udivdi3) + .regstk 2,0,0,0 + /* Transfer inputs to FP registers. */ + setf.sig f8 = in0 + setf.sig f9 = in1 + ;; + /* Convert the inputs to FP, to avoid FP software-assist faults. */ + fcvt.xuf.s1 f8 = f8 + fcvt.xuf.s1 f9 = f9 + ;; + /* Compute the reciprocal approximation. */ + frcpa.s1 f10, p6 = f8, f9 + ;; + /* 3 Newton-Raphson iterations. */ +(p6) fnma.s1 f11 = f9, f10, f1 +(p6) fmpy.s1 f12 = f8, f10 + ;; +(p6) fmpy.s1 f13 = f11, f11 +(p6) fma.s1 f12 = f11, f12, f12 + ;; +(p6) fma.s1 f10 = f11, f10, f10 +(p6) fma.s1 f11 = f13, f12, f12 + ;; +(p6) fma.s1 f10 = f13, f10, f10 +(p6) fnma.s1 f12 = f9, f11, f8 + ;; +(p6) fma.s1 f10 = f12, f10, f11 + ;; + /* Round quotient to an unsigned integer. */ + fcvt.fxu.trunc.s1 f10 = f10 + ;; + /* Transfer result to GP registers. */ + getf.sig ret0 = f10 + br.ret.sptk rp + ;; +END(___udivdi3) + .symver ___udivdi3, __udivdi3@GLIBC_2.2 + +/* __umoddi3 + Compute a 64-bit unsigned integer modulus. + in0 holds the dividend (a). in1 holds the divisor (b). */ + +ENTRY(___umoddi3) + .regstk 2,0,0,0 + /* Transfer inputs to FP registers. */ + setf.sig f14 = in0 + setf.sig f9 = in1 + ;; + /* Convert the inputs to FP, to avoid FP software assist faults. */ + fcvt.xuf.s1 f8 = f14 + fcvt.xuf.s1 f9 = f9 + ;; + /* Compute the reciprocal approximation. */ + frcpa.s1 f10, p6 = f8, f9 + ;; + /* 3 Newton-Raphson iterations. */ +(p6) fmpy.s1 f12 = f8, f10 +(p6) fnma.s1 f11 = f9, f10, f1 + ;; +(p6) fma.s1 f12 = f11, f12, f12 +(p6) fmpy.s1 f13 = f11, f11 + ;; +(p6) fma.s1 f10 = f11, f10, f10 +(p6) fma.s1 f11 = f13, f12, f12 + ;; + sub in1 = r0, in1 +(p6) fma.s1 f10 = f13, f10, f10 +(p6) fnma.s1 f12 = f9, f11, f8 + ;; + setf.sig f9 = in1 +(p6) fma.s1 f10 = f12, f10, f11 + ;; + /* Round quotient to an unsigned integer. */ + fcvt.fxu.trunc.s1 f10 = f10 + ;; + /* r = q * (-b) + a */ + xma.l f10 = f10, f9, f14 + ;; + /* Transfer result to GP registers. */ + getf.sig ret0 = f10 + br.ret.sptk rp + ;; +END(___umoddi3) + .symver ___umoddi3, __umoddi3@GLIBC_2.2 + +/* __multi3 + Compute a 128-bit multiply of 128-bit multiplicands. + in0/in1 holds one multiplicand (a), in2/in3 holds the other one (b). */ + +ENTRY(___multi3) + .regstk 4,0,0,0 + setf.sig f6 = in1 + movl r19 = 0xffffffff + setf.sig f7 = in2 + ;; + and r14 = r19, in0 + ;; + setf.sig f10 = r14 + and r14 = r19, in2 + xmpy.l f9 = f6, f7 + ;; + setf.sig f6 = r14 + shr.u r14 = in0, 32 + ;; + setf.sig f7 = r14 + shr.u r14 = in2, 32 + ;; + setf.sig f8 = r14 + xmpy.l f11 = f10, f6 + xmpy.l f6 = f7, f6 + ;; + getf.sig r16 = f11 + xmpy.l f7 = f7, f8 + ;; + shr.u r14 = r16, 32 + and r16 = r19, r16 + getf.sig r17 = f6 + setf.sig f6 = in0 + ;; + setf.sig f11 = r14 + getf.sig r21 = f7 + setf.sig f7 = in3 + ;; + xma.l f11 = f10, f8, f11 + xma.l f6 = f6, f7, f9 + ;; + getf.sig r18 = f11 + ;; + add r18 = r18, r17 + ;; + and r15 = r19, r18 + cmp.ltu p7, p6 = r18, r17 + ;; + getf.sig r22 = f6 +(p7) adds r14 = 1, r19 + ;; +(p7) add r21 = r21, r14 + shr.u r14 = r18, 32 + shl r15 = r15, 32 + ;; + add r20 = r21, r14 + ;; + add ret0 = r15, r16 + add ret1 = r22, r20 + br.ret.sptk rp + ;; +END(___multi3) + .symver ___multi3, __multi3@GLIBC_2.2 + +#endif diff --git a/sysdeps/ia64/ieee754.h b/sysdeps/ia64/ieee754.h new file mode 100644 index 0000000000..44629430f8 --- /dev/null +++ b/sysdeps/ia64/ieee754.h @@ -0,0 +1,205 @@ +/* Copyright (C) 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 + 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 _IEEE754_H + +#define _IEEE754_H 1 +#include + +#include + +__BEGIN_DECLS + +union ieee754_float + { + float f; + + /* This is the IEEE 754 single-precision format. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:8; + unsigned int mantissa:23; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN + unsigned int mantissa:23; + unsigned int exponent:8; + unsigned int negative:1; +#endif /* Little endian. */ + } ieee; + + /* This format makes it easier to see if a NaN is a signalling NaN. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:8; + unsigned int quiet_nan:1; + unsigned int mantissa:22; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN + unsigned int mantissa:22; + unsigned int quiet_nan:1; + unsigned int exponent:8; + unsigned int negative:1; +#endif /* Little endian. */ + } ieee_nan; + }; + +#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */ + + +union ieee754_double + { + double d; + + /* This is the IEEE 754 double-precision format. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:11; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:20; + unsigned int mantissa1:32; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN +# if __FLOAT_WORD_ORDER == __BIG_ENDIAN + unsigned int mantissa0:20; + unsigned int exponent:11; + unsigned int negative:1; + unsigned int mantissa1:32; +# else + /* Together these comprise the mantissa. */ + unsigned int mantissa1:32; + unsigned int mantissa0:20; + unsigned int exponent:11; + unsigned int negative:1; +# endif +#endif /* Little endian. */ + } ieee; + + /* This format makes it easier to see if a NaN is a signalling NaN. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:11; + unsigned int quiet_nan:1; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:19; + unsigned int mantissa1:32; +#else +# if __FLOAT_WORD_ORDER == __BIG_ENDIAN + unsigned int mantissa0:19; + unsigned int quiet_nan:1; + unsigned int exponent:11; + unsigned int negative:1; + unsigned int mantissa1:32; +# else + /* Together these comprise the mantissa. */ + unsigned int mantissa1:32; + unsigned int mantissa0:19; + unsigned int quiet_nan:1; + unsigned int exponent:11; + unsigned int negative:1; +# endif +#endif + } ieee_nan; + }; + +#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */ + + +union ieee854_long_double + { + long double d; + + /* This is the IEEE 854 double-extended-precision format. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int empty0:32; + unsigned int negative:1; + unsigned int exponent:15; + unsigned int empty1:16; + unsigned int mantissa0:32; + unsigned int mantissa1:32; +#endif +#if __BYTE_ORDER == __LITTLE_ENDIAN +# if __FLOAT_WORD_ORDER == __BIG_ENDIAN + unsigned int empty0:32; + unsigned int exponent:15; + unsigned int negative:1; + unsigned int empty1:16; + unsigned int mantissa0:32; + unsigned int mantissa1:32; +# else + unsigned int mantissa1:32; + unsigned int mantissa0:32; + unsigned int exponent:15; + unsigned int negative:1; + unsigned int empty1:16; + unsigned int empty0:32; +# endif +#endif + } ieee; + + /* This is for NaNs in the IEEE 854 double-extended-precision format. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int empty0:32; + unsigned int negative:1; + unsigned int exponent:15; + unsigned int empty1:16; + unsigned int one:1; + unsigned int quiet_nan:1; + unsigned int mantissa0:30; + unsigned int mantissa1:32; +#endif +#if __BYTE_ORDER == __LITTLE_ENDIAN +# if __FLOAT_WORD_ORDER == __BIG_ENDIAN + unsigned int empty0:32; + unsigned int exponent:15; + unsigned int negative:1; + unsigned int empty1:16; + unsigned int mantissa0:30; + unsigned int quiet_nan:1; + unsigned int one:1; + unsigned int mantissa1:32; +# else + unsigned int mantissa1:32; + unsigned int mantissa0:30; + unsigned int quiet_nan:1; + unsigned int one:1; + unsigned int exponent:15; + unsigned int negative:1; + unsigned int empty1:16; + unsigned int empty0:32; +# endif +#endif + } ieee_nan; + }; + +#define IEEE854_LONG_DOUBLE_BIAS 0x3fff + +__END_DECLS + +#endif /* ieee754.h */ diff --git a/sysdeps/ia64/jmpbuf-unwind.h b/sysdeps/ia64/jmpbuf-unwind.h new file mode 100644 index 0000000000..c53447223b --- /dev/null +++ b/sysdeps/ia64/jmpbuf-unwind.h @@ -0,0 +1,44 @@ +/* Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek , 2003. + + 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. */ + +#include +#include +#include + +/* Test if longjmp to JMPBUF would unwind the frame containing a local + variable at ADDRESS. */ +#define _JMPBUF_UNWINDS(_jmpbuf, _address, _demangle) \ + ((void *) (_address) < (void *) (((long int *) _jmpbuf)[0])) + +#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \ + ({ uintptr_t _cfa = (uintptr_t) _Unwind_GetCFA (_context) - (_adj); \ + (_cfa < (uintptr_t)(((long *)(_jmpbuf))[0]) - (_adj) \ + || (_cfa == (uintptr_t)(((long *)(_jmpbuf))[0]) - (_adj) \ + && (uintptr_t) _Unwind_GetBSP (_context) - (_adj) \ + >= (uintptr_t)(((long *)(_jmpbuf))[17]) - (_adj))); \ + }) + +#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \ + ((uintptr_t)(_address) - (_adj) < (uintptr_t)(((long *)_jmpbuf)[0]) - (_adj)) + +/* We use a longjmp() which can cross from the alternate signal-stack + to the normal stack. */ +extern void __libc_unwind_longjmp (sigjmp_buf env, int val) + __attribute__ ((noreturn)); +hidden_proto (__libc_unwind_longjmp) diff --git a/sysdeps/ia64/ldbl2mpn.c b/sysdeps/ia64/ldbl2mpn.c new file mode 100644 index 0000000000..641b789cd4 --- /dev/null +++ b/sysdeps/ia64/ldbl2mpn.c @@ -0,0 +1 @@ +#include "../i386/ldbl2mpn.c" diff --git a/sysdeps/ia64/libc-tls.c b/sysdeps/ia64/libc-tls.c new file mode 100644 index 0000000000..9751284008 --- /dev/null +++ b/sysdeps/ia64/libc-tls.c @@ -0,0 +1,32 @@ +/* Thread-local storage handling in the ELF dynamic linker. IA-64 version. + Copyright (C) 2003, 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 + 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. */ + +#include + +/* On IA-64, as it lacks linker optimizations, __tls_get_addr can be + called even in statically linked binaries. + In this case module must be always 1 and PT_TLS segment + exist in the binary, otherwise it would not link. */ + +void * +__tls_get_addr (size_t m, size_t offset) +{ + dtv_t *dtv = THREAD_DTV (); + return (char *) dtv[1].pointer.val + offset; +} diff --git a/sysdeps/ia64/machine-gmon.h b/sysdeps/ia64/machine-gmon.h new file mode 100644 index 0000000000..b8d0b45596 --- /dev/null +++ b/sysdeps/ia64/machine-gmon.h @@ -0,0 +1,26 @@ +/* Machine-specific calling sequence for `mcount' profiling function. IA-64. + Copyright (C) 1995, 1996, 1997, 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 + 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. */ + +#define _MCOUNT_DECL(from, self) \ + void __mcount (u_long from, u_long self) + +/* Call __mcount with our the return PC for our caller, and the return + PC our caller will return to. Empty since we use an assembly stub + instead. */ +#define MCOUNT diff --git a/sysdeps/ia64/memccpy.S b/sysdeps/ia64/memccpy.S new file mode 100644 index 0000000000..dd638d43c8 --- /dev/null +++ b/sysdeps/ia64/memccpy.S @@ -0,0 +1,250 @@ +/* Optimized version of the memccpy() function. + This file is part of the GNU C Library. + Copyright (C) 2000,2001,2003,2006 Free Software Foundation, Inc. + Contributed by Dan Pop . + + 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. */ + +/* Return: a pointer to the next byte after char in dest or NULL + + Inputs: + in0: dest + in1: src + in2: char + in3: byte count + + This implementation assumes little endian mode (UM.be = 0). + + This implementation assumes that it is safe to do read ahead + in the src block, without getting beyond its limit. */ + +#include +#undef ret + +#define OP_T_THRES 16 +#define OPSIZ 8 + +#define saved_pr r17 +#define saved_lc r18 +#define dest r19 +#define src r20 +#define len r21 +#define asrc r22 +#define tmp r23 +#define char r24 +#define charx8 r25 +#define saved_ec r26 +#define sh2 r28 +#define sh1 r29 +#define loopcnt r30 +#define value r31 + +#ifdef GAS_ALIGN_BREAKS_UNWIND_INFO +/* Manually force proper loop-alignment. Note: be sure to + double-check the code-layout after making any changes to + this routine! */ +# define ALIGN(n) { nop 0 } +#else +# define ALIGN(n) .align n +#endif + +ENTRY(memccpy) + .prologue + alloc r2 = ar.pfs, 4, 40 - 4, 0, 40 + +#include "softpipe.h" + .rotr r[MEMLAT + 7], tmp1[4], tmp2[4], val[4], tmp3[2], pos0[2] + .rotp p[MEMLAT + 6 + 1] + + mov ret0 = r0 // return NULL if no match + .save pr, saved_pr + mov saved_pr = pr // save the predicate registers + mov dest = in0 // dest + .save ar.lc, saved_lc + mov saved_lc = ar.lc // save the loop counter + mov saved_ec = ar.ec // save the loop counter + .body + mov src = in1 // src + extr.u char = in2, 0, 8 // char + mov len = in3 // len + sub tmp = r0, in0 // tmp = -dest + cmp.ne p7, p0 = r0, r0 // clear p7 + ;; + and loopcnt = 7, tmp // loopcnt = -dest % 8 + cmp.ge p6, p0 = OP_T_THRES, len // is len <= OP_T_THRES + mov ar.ec = 0 // ec not guaranteed zero on entry +(p6) br.cond.spnt .cpyfew // copy byte by byte + ;; + cmp.eq p6, p0 = loopcnt, r0 + mux1 charx8 = char, @brcst +(p6) br.cond.sptk .dest_aligned + sub len = len, loopcnt // len -= -dest % 8 + adds loopcnt = -1, loopcnt // --loopcnt + ;; + mov ar.lc = loopcnt +.l1: // copy -dest % 8 bytes + ld1 value = [src], 1 // value = *src++ + ;; + st1 [dest] = value, 1 // *dest++ = value + cmp.eq p6, p0 = value, char +(p6) br.cond.spnt .foundit + br.cloop.dptk .l1 +.dest_aligned: + and sh1 = 7, src // sh1 = src % 8 + and tmp = -8, len // tmp = len & -OPSIZ + and asrc = -8, src // asrc = src & -OPSIZ -- align src + shr.u loopcnt = len, 3 // loopcnt = len / 8 + and len = 7, len ;; // len = len % 8 + shl sh1 = sh1, 3 // sh1 = 8 * (src % 8) + adds loopcnt = -1, loopcnt // --loopcnt + mov pr.rot = 1 << 16 ;; // set rotating predicates + sub sh2 = 64, sh1 // sh2 = 64 - sh1 + mov ar.lc = loopcnt // set LC + cmp.eq p6, p0 = sh1, r0 // is the src aligned? +(p6) br.cond.sptk .src_aligned ;; + add src = src, tmp // src += len & -OPSIZ + mov ar.ec = MEMLAT + 6 + 1 // six more passes needed + ld8 r[1] = [asrc], 8 // r[1] = w0 + cmp.ne p6, p0 = r0, r0 ;; // clear p6 + ALIGN(32) +.l2: +(p[0]) ld8.s r[0] = [asrc], 8 // r[0] = w1 +(p[MEMLAT]) shr.u tmp1[0] = r[1 + MEMLAT], sh1 // tmp1 = w0 >> sh1 +(p[MEMLAT]) shl tmp2[0] = r[0 + MEMLAT], sh2 // tmp2 = w1 << sh2 +(p[MEMLAT+4]) xor tmp3[0] = val[1], charx8 +(p[MEMLAT+5]) czx1.r pos0[0] = tmp3[1] +(p[MEMLAT+6]) chk.s r[6 + MEMLAT], .recovery1 // our data isn't + // valid - rollback! +(p[MEMLAT+6]) cmp.ne p6, p0 = 8, pos0[1] +(p6) br.cond.spnt .gotit +(p[MEMLAT+6]) st8 [dest] = val[3], 8 // store val to dest +(p[MEMLAT+3]) or val[0] = tmp1[3], tmp2[3] // val = tmp1 | tmp2 + br.ctop.sptk .l2 + br.cond.sptk .cpyfew + +.src_aligned: + cmp.ne p6, p0 = r0, r0 // clear p6 + mov ar.ec = MEMLAT + 2 + 1 ;; // set EC +.l3: +(p[0]) ld8.s r[0] = [src], 8 +(p[MEMLAT]) xor tmp3[0] = r[MEMLAT], charx8 +(p[MEMLAT+1]) czx1.r pos0[0] = tmp3[1] +(p[MEMLAT+2]) cmp.ne p7, p0 = 8, pos0[1] +(p[MEMLAT+2]) chk.s r[MEMLAT+2], .recovery2 +(p7) br.cond.spnt .gotit +.back2: +(p[MEMLAT+2]) st8 [dest] = r[MEMLAT+2], 8 + br.ctop.dptk .l3 +.cpyfew: + cmp.eq p6, p0 = len, r0 // is len == 0 ? + adds len = -1, len // --len; +(p6) br.cond.spnt .restore_and_exit ;; + mov ar.lc = len +.l4: + ld1 value = [src], 1 + ;; + st1 [dest] = value, 1 + cmp.eq p6, p0 = value, char +(p6) br.cond.spnt .foundit + br.cloop.dptk .l4 ;; +.foundit: +(p6) mov ret0 = dest +.restore_and_exit: + mov pr = saved_pr, -1 // restore the predicate registers + mov ar.lc = saved_lc // restore the loop counter + mov ar.ec = saved_ec ;; // restore the epilog counter + br.ret.sptk.many b0 +.gotit: + .pred.rel "mutex" p6, p7 +(p6) mov value = val[3] // if coming from l2 +(p7) mov value = r[MEMLAT+2] // if coming from l3 + mov ar.lc = pos0[1] ;; +.l5: + extr.u tmp = value, 0, 8 ;; + st1 [dest] = tmp, 1 + shr.u value = value, 8 + br.cloop.sptk .l5 ;; + mov ret0 = dest + mov pr = saved_pr, -1 + mov ar.lc = saved_lc + br.ret.sptk.many b0 + +.recovery1: +#if MEMLAT != 6 +# error "MEMLAT must be 6!" +#endif + adds src = -8, asrc + mov loopcnt = ar.lc + mov tmp = ar.ec + ;; +(p[0]) adds src = -8, src + ;; +(p[1]) adds src = -8, src + sub sh1 = (MEMLAT + 6 + 1), tmp + ;; +(p[2]) adds src = -8, src + ;; +(p[3]) adds src = -8, src + shl loopcnt = loopcnt, 3 + ;; +(p[4]) adds src = -8, src + ;; +(p[5]) adds src = -8, src + shl sh1 = sh1, 3 + ;; +(p[6]) adds src = -8, src + ;; +(p[7]) adds src = -8, src + shl tmp = tmp, 3 + ;; +(p[8]) adds src = -8, src + ;; +(p[9]) adds src = -8, src + shr.u sh2 = sh2, 3 + ;; +(p[10]) adds src = -8, src + ;; +(p[11]) adds src = -8, src + add len = len, loopcnt + ;; + sub src = src, sh2 + ;; + add len = tmp, len + add src = sh1, src + br.cond.sptk .cpyfew + +.recovery2: +#if MEMLAT != 6 +# error "MEMLAT must be 6!" +#endif + add tmp = -8, src +(p7) br.cond.spnt .gotit + ;; +(p[0]) add tmp = -8, tmp ;; +(p[1]) add tmp = -8, tmp ;; +(p[2]) add tmp = -8, tmp ;; +(p[3]) add tmp = -8, tmp ;; +(p[4]) add tmp = -8, tmp ;; +(p[5]) add tmp = -8, tmp ;; +(p[6]) add tmp = -8, tmp ;; +(p[7]) add tmp = -8, tmp ;; + ld8 r[MEMLAT+2] = [tmp] ;; + xor pos0[1] = r[MEMLAT+2], charx8 ;; + czx1.r pos0[1] = pos0[1] ;; + cmp.ne p7, p6 = 8, pos0[1] +(p7) br.cond.spnt .gotit + br.cond.sptk .back2 +END(memccpy) diff --git a/sysdeps/ia64/memchr.S b/sysdeps/ia64/memchr.S new file mode 100644 index 0000000000..355effe94b --- /dev/null +++ b/sysdeps/ia64/memchr.S @@ -0,0 +1,161 @@ +/* Optimized version of the standard memchr() function. + This file is part of the GNU C Library. + Copyright (C) 2000, 2001, 2003, 2010 Free Software Foundation, Inc. + Contributed by Dan Pop . + + 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. */ + +/* Return: the address of the first occurence of chr in str or NULL + + Inputs: + in0: str + in1: chr + in2: byte count + + This implementation assumes little endian mode. For big endian mode, + the instruction czx1.r should be replaced by czx1.l. + + The algorithm is fairly straightforward: search byte by byte until we + we get to a word aligned address, then search word by word as much as + possible; the remaining few bytes are searched one at a time. + + The word by word search is performed by xor-ing the word with a word + containing chr in every byte. If there is a hit, the result will + contain a zero byte in the corresponding position. The presence and + position of that zero byte is detected with a czx instruction. + + All the loops in this function could have had the internal branch removed + if br.ctop and br.cloop could be predicated :-(. */ + +#include +#undef ret + +#define saved_pr r15 +#define saved_lc r16 +#define chr r17 +#define len r18 +#define last r20 +#define val r21 +#define tmp r24 +#define chrx8 r25 +#define loopcnt r30 + +#define str in0 + +ENTRY(__memchr) + .prologue + alloc r2 = ar.pfs, 3, 0, 29, 32 +#include "softpipe.h" + .rotr value[MEMLAT+1], addr[MEMLAT+3], aux[2], poschr[2] + .rotp p[MEMLAT+3] + .save ar.lc, saved_lc + mov saved_lc = ar.lc // save the loop counter + .save pr, saved_pr + mov saved_pr = pr // save the predicates + .body + mov ret0 = str + add last = str, in2 // last byte + and tmp = 7, str // tmp = str % 8 + cmp.ne p7, p0 = r0, r0 // clear p7 + extr.u chr = in1, 0, 8 // chr = (unsigned char) in1 + mov len = in2 + cmp.gtu p6, p0 = 16, in2 // use a simple loop for short +(p6) br.cond.spnt .srchfew ;; // searches + sub loopcnt = 8, tmp // loopcnt = 8 - tmp + cmp.eq p6, p0 = tmp, r0 +(p6) br.cond.sptk .str_aligned;; + sub len = len, loopcnt + adds loopcnt = -1, loopcnt;; + mov ar.lc = loopcnt +.l1: + ld1 val = [ret0], 1 + ;; + cmp.eq p6, p0 = val, chr +(p6) br.cond.spnt .foundit + br.cloop.sptk .l1 ;; +.str_aligned: + cmp.ne p6, p0 = r0, r0 // clear p6 + shr.u loopcnt = len, 3 // loopcnt = len / 8 + and len = 7, len ;; // remaining len = len & 7 + adds loopcnt = -1, loopcnt + mov ar.ec = MEMLAT + 3 + mux1 chrx8 = chr, @brcst ;; // get a word full of chr + mov ar.lc = loopcnt + mov pr.rot = 1 << 16 ;; +.l2: +(p[0]) mov addr[0] = ret0 +(p[0]) ld8.s value[0] = [ret0], 8 // speculative load +(p[MEMLAT]) chk.s value[MEMLAT], .recovery // check and recovery +(p[MEMLAT]) xor aux[0] = value[MEMLAT], chrx8 +(p[MEMLAT+1]) czx1.r poschr[0] = aux[1] +(p[MEMLAT+2]) cmp.ne p7, p0 = 8, poschr[1] +(p7) br.cond.dpnt .foundit + br.ctop.dptk .l2 +.srchfew: + adds loopcnt = -1, len + cmp.eq p6, p0 = len, r0 +(p6) br.cond.spnt .notfound ;; + mov ar.lc = loopcnt +.l3: + ld1 val = [ret0], 1 + ;; + cmp.eq p6, p0 = val, chr +(p6) br.cond.dpnt .foundit + br.cloop.sptk .l3 ;; +.notfound: + cmp.ne p6, p0 = r0, r0 // clear p6 (p7 was already 0 when we got here) + mov ret0 = r0 ;; // return NULL +.foundit: + .pred.rel "mutex" p6, p7 +(p6) adds ret0 = -1, ret0 // if we got here from l1 or l3 +(p7) add ret0 = addr[MEMLAT+2], poschr[1] // if we got here from l2 + mov pr = saved_pr, -1 + mov ar.lc = saved_lc + br.ret.sptk.many b0 + +.recovery: +#if MEMLAT != 6 +# error "MEMLAT must be 6!" +#endif +(p[MEMLAT-6]) add ret0 = -8, ret0;; +(p[MEMLAT-5]) add ret0 = -8, ret0;; +(p[MEMLAT-4]) add ret0 = -8, ret0;; +(p[MEMLAT-3]) add ret0 = -8, ret0;; +(p[MEMLAT-2]) add ret0 = -8, ret0;; +(p[MEMLAT-1]) add ret0 = -8, ret0;; +(p[MEMLAT]) add ret0 = -8, ret0;; +(p[MEMLAT+1]) add ret0 = -8, ret0;; +(p[MEMLAT+2]) add ret0 = -8, ret0;; +.l4: + mov addr[MEMLAT+2] = ret0 + ld8 tmp = [ret0];; // load the first unchecked 8byte + xor aux[1] = tmp, chrx8;; + czx1.r poschr[1] = aux[1];; + cmp.ne p7, p0 = 8, poschr[1];; +(p7) add ret0 = addr[MEMLAT+2], poschr[1];; +(p7) cmp.geu p6, p7 = ret0, last // don't go over the last byte +(p6) br.cond.spnt .notfound;; +(p7) br.cond.spnt .foundit;; + adds ret0 = 8, ret0 // load the next unchecked 8byte + br.sptk .l4;; + +END(__memchr) + +weak_alias (__memchr, memchr) +#if !__BOUNDED_POINTERS__ +weak_alias (__memchr, __ubp_memchr) +#endif +libc_hidden_builtin_def (memchr) diff --git a/sysdeps/ia64/memcmp.S b/sysdeps/ia64/memcmp.S new file mode 100644 index 0000000000..fcc66d06a1 --- /dev/null +++ b/sysdeps/ia64/memcmp.S @@ -0,0 +1,165 @@ +/* Optimized version of the standard memcmp() function. + This file is part of the GNU C Library. + Copyright (C) 2000, 2001, 2004, 2011 Free Software Foundation, Inc. + Contributed by Dan Pop . + + 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. */ + +/* Return: the result of the comparison + + Inputs: + in0: dest (aka s1) + in1: src (aka s2) + in2: byte count + + In this form, it assumes little endian mode. For big endian mode, + the two shifts in .l2 must be inverted: + + shl tmp1[0] = r[1 + MEMLAT], sh1 // tmp1 = w0 << sh1 + shr.u tmp2[0] = r[0 + MEMLAT], sh2 // tmp2 = w1 >> sh2 + + and all the mux1 instructions should be replaced by plain mov's. */ + +#include +#undef ret + +#define OP_T_THRES 16 +#define OPSIZ 8 +#define MEMLAT 2 + +#define start r15 +#define saved_pr r17 +#define saved_lc r18 +#define dest r19 +#define src r20 +#define len r21 +#define asrc r22 +#define tmp r23 +#define value1 r24 +#define value2 r25 +#define sh2 r28 +#define sh1 r29 +#define loopcnt r30 + +ENTRY(memcmp) + .prologue + alloc r2 = ar.pfs, 3, 37, 0, 40 + + .rotr r[MEMLAT + 2], q[MEMLAT + 5], tmp1[4], tmp2[4], val[2] + .rotp p[MEMLAT + 4 + 1] + + mov ret0 = r0 // by default return value = 0 + .save pr, saved_pr + mov saved_pr = pr // save the predicate registers + .save ar.lc, saved_lc + mov saved_lc = ar.lc // save the loop counter + .body + mov dest = in0 // dest + mov src = in1 // src + mov len = in2 // len + sub tmp = r0, in0 // tmp = -dest + ;; + and loopcnt = 7, tmp // loopcnt = -dest % 8 + cmp.ge p6, p0 = OP_T_THRES, len // is len <= OP_T_THRES +(p6) br.cond.spnt .cmpfew // compare byte by byte + ;; + cmp.eq p6, p0 = loopcnt, r0 +(p6) br.cond.sptk .dest_aligned + sub len = len, loopcnt // len -= -dest % 8 + adds loopcnt = -1, loopcnt // --loopcnt + ;; + mov ar.lc = loopcnt +.l1: // copy -dest % 8 bytes + ld1 value1 = [src], 1 // value = *src++ + ld1 value2 = [dest], 1 + ;; + cmp.ne p6, p0 = value1, value2 +(p6) br.cond.spnt .done + br.cloop.dptk .l1 +.dest_aligned: + and sh1 = 7, src // sh1 = src % 8 + and tmp = -8, len // tmp = len & -OPSIZ + and asrc = -8, src // asrc = src & -OPSIZ -- align src + shr.u loopcnt = len, 3 // loopcnt = len / 8 + and len = 7, len ;; // len = len % 8 + shl sh1 = sh1, 3 // sh1 = 8 * (src % 8) + adds loopcnt = -1, loopcnt // --loopcnt + mov pr.rot = 1 << 16 ;; // set rotating predicates + sub sh2 = 64, sh1 // sh2 = 64 - sh1 + mov ar.lc = loopcnt // set LC + cmp.eq p6, p0 = sh1, r0 // is the src aligned? +(p6) br.cond.sptk .src_aligned + add src = src, tmp // src += len & -OPSIZ + mov ar.ec = MEMLAT + 4 + 1 // four more passes needed + ld8 r[1] = [asrc], 8 ;; // r[1] = w0 + .align 32 + +// We enter this loop with p6 cleared by the above comparison + +.l2: +(p[0]) ld8 r[0] = [asrc], 8 // r[0] = w1 +(p[0]) ld8 q[0] = [dest], 8 +(p[MEMLAT]) shr.u tmp1[0] = r[1 + MEMLAT], sh1 // tmp1 = w0 >> sh1 +(p[MEMLAT]) shl tmp2[0] = r[0 + MEMLAT], sh2 // tmp2 = w1 << sh2 +(p[MEMLAT+4]) cmp.ne p6, p0 = q[MEMLAT + 4], val[1] +(p[MEMLAT+3]) or val[0] = tmp1[3], tmp2[3] // val = tmp1 | tmp2 +(p6) br.cond.spnt .l2exit + br.ctop.sptk .l2 + br.cond.sptk .cmpfew +.l3exit: + mux1 value1 = r[MEMLAT], @rev + mux1 value2 = q[MEMLAT], @rev + cmp.ne p6, p0 = r0, r0 ;; // clear p6 +.l2exit: +(p6) mux1 value1 = val[1], @rev +(p6) mux1 value2 = q[MEMLAT + 4], @rev ;; + cmp.ltu p6, p7 = value2, value1 ;; +(p6) mov ret0 = -1 +(p7) mov ret0 = 1 + mov pr = saved_pr, -1 // restore the predicate registers + mov ar.lc = saved_lc // restore the loop counter + br.ret.sptk.many b0 +.src_aligned: + cmp.ne p6, p0 = r0, r0 // clear p6 + mov ar.ec = MEMLAT + 1 ;; // set EC +.l3: +(p[0]) ld8 r[0] = [src], 8 +(p[0]) ld8 q[0] = [dest], 8 +(p[MEMLAT]) cmp.ne p6, p0 = r[MEMLAT], q[MEMLAT] +(p6) br.cond.spnt .l3exit + br.ctop.dptk .l3 ;; +.cmpfew: + cmp.eq p6, p0 = len, r0 // is len == 0 ? + adds len = -1, len // --len; +(p6) br.cond.spnt .restore_and_exit ;; + mov ar.lc = len +.l4: + ld1 value1 = [src], 1 + ld1 value2 = [dest], 1 + ;; + cmp.ne p6, p0 = value1, value2 +(p6) br.cond.spnt .done + br.cloop.dptk .l4 ;; +.done: +(p6) sub ret0 = value2, value1 // don't execute it if falling thru +.restore_and_exit: + mov pr = saved_pr, -1 // restore the predicate registers + mov ar.lc = saved_lc // restore the loop counter + br.ret.sptk.many b0 +END(memcmp) + +weak_alias (memcmp, bcmp) +libc_hidden_builtin_def (memcmp) diff --git a/sysdeps/ia64/memcpy.S b/sysdeps/ia64/memcpy.S new file mode 100644 index 0000000000..a2aeea00fd --- /dev/null +++ b/sysdeps/ia64/memcpy.S @@ -0,0 +1,436 @@ +/* Optimized version of the standard memcpy() function. + This file is part of the GNU C Library. + Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. + Contributed by Dan Pop for Itanium . + Rewritten for McKinley by Sverre Jarp, HP Labs/CERN + + 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. */ + +/* Return: dest + + Inputs: + in0: dest + in1: src + in2: byte count + + An assembly implementation of the algorithm used by the generic C + version from glibc. The case when source and sest are aligned is + treated separately, for extra performance. + + In this form, memcpy assumes little endian mode. For big endian mode, + sh1 must be computed using an extra instruction: sub sh1 = 64, sh1 + and the order of r[MEMLAT] and r[MEMLAT+1] must be reverted in the + shrp instruction. */ + +#define USE_LFETCH +#define USE_FLP +#include +#undef ret + +#define LFETCH_DIST 500 + +#define ALIGN_UNROLL_no 4 // no. of elements +#define ALIGN_UNROLL_sh 2 // (shift amount) + +#define MEMLAT 8 +#define Nrot ((4*(MEMLAT+2) + 7) & ~7) + +#define OP_T_THRES 16 +#define OPSIZ 8 + +#define loopcnt r14 +#define elemcnt r15 +#define saved_pr r16 +#define saved_lc r17 +#define adest r18 +#define dest r19 +#define asrc r20 +#define src r21 +#define len r22 +#define tmp2 r23 +#define tmp3 r24 +#define tmp4 r25 +#define ptable r26 +#define ploop56 r27 +#define loopaddr r28 +#define sh1 r29 +#define ptr1 r30 +#define ptr2 r31 + +#define movi0 mov + +#define p_scr p6 +#define p_xtr p7 +#define p_nxtr p8 +#define p_few p9 + +#if defined(USE_FLP) +#define load ldf8 +#define store stf8 +#define tempreg f6 +#define the_r fr +#define the_s fs +#define the_t ft +#define the_q fq +#define the_w fw +#define the_x fx +#define the_y fy +#define the_z fz +#elif defined(USE_INT) +#define load ld8 +#define store st8 +#define tempreg tmp2 +#define the_r r +#define the_s s +#define the_t t +#define the_q q +#define the_w w +#define the_x x +#define the_y y +#define the_z z +#endif + +#ifdef GAS_ALIGN_BREAKS_UNWIND_INFO +/* Manually force proper loop-alignment. Note: be sure to + double-check the code-layout after making any changes to + this routine! */ +# define ALIGN(n) { nop 0 } +#else +# define ALIGN(n) .align n +#endif + +#if defined(USE_LFETCH) +#define LOOP(shift) \ + ALIGN(32); \ +.loop##shift##: \ +{ .mmb \ +(p[0]) ld8.nt1 r[0] = [asrc], 8 ; \ +(p[0]) lfetch.nt1 [ptr1], 16 ; \ + nop.b 0 ; \ +} { .mib \ +(p[MEMLAT+1]) st8 [dest] = tmp3, 8 ; \ +(p[MEMLAT]) shrp tmp3 = r[MEMLAT], s[MEMLAT+1], shift ; \ + nop.b 0 ;; \ + } { .mmb \ +(p[0]) ld8.nt1 s[0] = [asrc], 8 ; \ +(p[0]) lfetch.nt1 [ptr2], 16 ; \ + nop.b 0 ; \ +} { .mib \ +(p[MEMLAT+1]) st8 [dest] = tmp4, 8 ; \ +(p[MEMLAT]) shrp tmp4 = s[MEMLAT], r[MEMLAT], shift ; \ + br.ctop.sptk.many .loop##shift \ +;; } \ +{ .mib \ + br.cond.sptk.many .copy_bytes ; /* deal with the remaining bytes */ \ +} +#else +#define LOOP(shift) \ + ALIGN(32); \ +.loop##shift##: \ +{ .mmb \ +(p[0]) ld8.nt1 r[0] = [asrc], 8 ; \ + nop.b 0 ; \ +} { .mib \ +(p[MEMLAT+1]) st8 [dest] = tmp3, 8 ; \ +(p[MEMLAT]) shrp tmp3 = r[MEMLAT], s[MEMLAT+1], shift ; \ + nop.b 0 ;; \ + } { .mmb \ +(p[0]) ld8.nt1 s[0] = [asrc], 8 ; \ + nop.b 0 ; \ +} { .mib \ +(p[MEMLAT+1]) st8 [dest] = tmp4, 8 ; \ +(p[MEMLAT]) shrp tmp4 = s[MEMLAT], r[MEMLAT], shift ; \ + br.ctop.sptk.many .loop##shift \ +;; } \ +{ .mib \ + br.cond.sptk.many .copy_bytes ; /* deal with the remaining bytes */ \ +} +#endif + + +ENTRY(memcpy) +{ .mmi + .prologue + alloc r2 = ar.pfs, 3, Nrot - 3, 0, Nrot + .rotr r[MEMLAT+1], s[MEMLAT+2], q[MEMLAT+1], t[MEMLAT+1] + .rotp p[MEMLAT+2] + .rotf fr[MEMLAT+1], fq[MEMLAT+1], fs[MEMLAT+1], ft[MEMLAT+1] + mov ret0 = in0 // return tmp2 = dest + .save pr, saved_pr + movi0 saved_pr = pr // save the predicate registers +} { .mmi + and tmp4 = 7, in0 // check if destination is aligned + mov dest = in0 // dest + mov src = in1 // src +;; } +{ .mii + cmp.eq p_scr, p0 = in2, r0 // if (len == 0) + .save ar.lc, saved_lc + movi0 saved_lc = ar.lc // save the loop counter + .body + cmp.ge p_few, p0 = OP_T_THRES, in2 // is len <= OP_T_THRESH +} { .mbb + mov len = in2 // len +(p_scr) br.cond.dpnt.few .restore_and_exit // Branch no. 1: return dest +(p_few) br.cond.dpnt.many .copy_bytes // Branch no. 2: copy byte by byte +;; } +{ .mmi +#if defined(USE_LFETCH) + lfetch.nt1 [dest] // + lfetch.nt1 [src] // +#endif + shr.u elemcnt = len, 3 // elemcnt = len / 8 +} { .mib + cmp.eq p_scr, p0 = tmp4, r0 // is destination aligned? + sub loopcnt = 7, tmp4 // +(p_scr) br.cond.dptk.many .dest_aligned +;; } +{ .mmi + ld1 tmp2 = [src], 1 // + sub len = len, loopcnt, 1 // reduce len + movi0 ar.lc = loopcnt // +} { .mib + cmp.ne p_scr, p0 = 0, loopcnt // avoid loading beyond end-point +;; } + +.l0: // ---------------------------- // L0: Align src on 8-byte boundary +{ .mmi + st1 [dest] = tmp2, 1 // +(p_scr) ld1 tmp2 = [src], 1 // +} { .mib + cmp.lt p_scr, p0 = 1, loopcnt // avoid load beyond end-point + add loopcnt = -1, loopcnt + br.cloop.dptk.few .l0 // +;; } + +.dest_aligned: +{ .mmi + and tmp4 = 7, src // ready for alignment check + shr.u elemcnt = len, 3 // elemcnt = len / 8 +;; } +{ .mib + cmp.ne p_scr, p0 = tmp4, r0 // is source also aligned + tbit.nz p_xtr, p_nxtr = src, 3 // prepare a separate move if src +} { .mib // is not 16B aligned + add ptr2 = LFETCH_DIST, dest // prefetch address + add ptr1 = LFETCH_DIST, src +(p_scr) br.cond.dptk.many .src_not_aligned +;; } + +// The optimal case, when dest, and src are aligned + +.both_aligned: +{ .mmi + .pred.rel "mutex",p_xtr,p_nxtr +(p_xtr) cmp.gt p_scr, p0 = ALIGN_UNROLL_no+1, elemcnt // Need N + 1 to qualify +(p_nxtr) cmp.gt p_scr, p0 = ALIGN_UNROLL_no, elemcnt // Need only N to qualify + movi0 pr.rot = 1 << 16 // set rotating predicates +} { .mib +(p_scr) br.cond.dpnt.many .copy_full_words +;; } + +{ .mmi +(p_xtr) load tempreg = [src], 8 +(p_xtr) add elemcnt = -1, elemcnt + movi0 ar.ec = MEMLAT + 1 // set the epilog counter +;; } +{ .mmi +(p_xtr) add len = -8, len // + add asrc = 16, src // one bank apart (for USE_INT) + shr.u loopcnt = elemcnt, ALIGN_UNROLL_sh // cater for unrolling +;;} +{ .mmi + add loopcnt = -1, loopcnt +(p_xtr) store [dest] = tempreg, 8 // copy the "extra" word + nop.i 0 +;; } +{ .mib + add adest = 16, dest + movi0 ar.lc = loopcnt // set the loop counter +;; } + +#ifdef GAS_ALIGN_BREAKS_UNWIND_INFO + { nop 0 } +#else + .align 32 +#endif +#if defined(USE_FLP) +.l1: // ------------------------------- // L1: Everything a multiple of 8 +{ .mmi +#if defined(USE_LFETCH) +(p[0]) lfetch.nt1 [ptr2],32 +#endif +(p[0]) ldfp8 the_r[0],the_q[0] = [src], 16 +(p[0]) add len = -32, len +} {.mmb +(p[MEMLAT]) store [dest] = the_r[MEMLAT], 8 +(p[MEMLAT]) store [adest] = the_s[MEMLAT], 8 +;; } +{ .mmi +#if defined(USE_LFETCH) +(p[0]) lfetch.nt1 [ptr1],32 +#endif +(p[0]) ldfp8 the_s[0], the_t[0] = [src], 16 +} {.mmb +(p[MEMLAT]) store [dest] = the_q[MEMLAT], 24 +(p[MEMLAT]) store [adest] = the_t[MEMLAT], 24 + br.ctop.dptk.many .l1 +;; } +#elif defined(USE_INT) +.l1: // ------------------------------- // L1: Everything a multiple of 8 +{ .mmi +(p[0]) load the_r[0] = [src], 8 +(p[0]) load the_q[0] = [asrc], 8 +(p[0]) add len = -32, len +} {.mmb +(p[MEMLAT]) store [dest] = the_r[MEMLAT], 8 +(p[MEMLAT]) store [adest] = the_q[MEMLAT], 8 +;; } +{ .mmi +(p[0]) load the_s[0] = [src], 24 +(p[0]) load the_t[0] = [asrc], 24 +} {.mmb +(p[MEMLAT]) store [dest] = the_s[MEMLAT], 24 +(p[MEMLAT]) store [adest] = the_t[MEMLAT], 24 +#if defined(USE_LFETCH) +;; } +{ .mmb +(p[0]) lfetch.nt1 [ptr2],32 +(p[0]) lfetch.nt1 [ptr1],32 +#endif + br.ctop.dptk.many .l1 +;; } +#endif + +.copy_full_words: +{ .mib + cmp.gt p_scr, p0 = 8, len // + shr.u elemcnt = len, 3 // +(p_scr) br.cond.dpnt.many .copy_bytes +;; } +{ .mii + load tempreg = [src], 8 + add loopcnt = -1, elemcnt // +;; } +{ .mii + cmp.ne p_scr, p0 = 0, loopcnt // + mov ar.lc = loopcnt // +;; } + +.l2: // ------------------------------- // L2: Max 4 words copied separately +{ .mmi + store [dest] = tempreg, 8 +(p_scr) load tempreg = [src], 8 // + add len = -8, len +} { .mib + cmp.lt p_scr, p0 = 1, loopcnt // avoid load beyond end-point + add loopcnt = -1, loopcnt + br.cloop.dptk.few .l2 +;; } + +.copy_bytes: +{ .mib + cmp.eq p_scr, p0 = len, r0 // is len == 0 ? + add loopcnt = -1, len // len--; +(p_scr) br.cond.spnt .restore_and_exit +;; } +{ .mii + ld1 tmp2 = [src], 1 + movi0 ar.lc = loopcnt + cmp.ne p_scr, p0 = 0, loopcnt // avoid load beyond end-point +;; } + +.l3: // ------------------------------- // L3: Final byte move +{ .mmi + st1 [dest] = tmp2, 1 +(p_scr) ld1 tmp2 = [src], 1 +} { .mib + cmp.lt p_scr, p0 = 1, loopcnt // avoid load beyond end-point + add loopcnt = -1, loopcnt + br.cloop.dptk.few .l3 +;; } + +.restore_and_exit: +{ .mmi + movi0 pr = saved_pr, -1 // restore the predicate registers +;; } +{ .mib + movi0 ar.lc = saved_lc // restore the loop counter + br.ret.sptk.many b0 +;; } + + +.src_not_aligned: +{ .mmi + cmp.gt p_scr, p0 = 16, len + and sh1 = 7, src // sh1 = src % 8 + shr.u loopcnt = len, 4 // element-cnt = len / 16 +} { .mib + add tmp4 = @ltoff(.table), gp + add tmp3 = @ltoff(.loop56), gp +(p_scr) br.cond.dpnt.many .copy_bytes // do byte by byte if too few +;; } +{ .mmi + and asrc = -8, src // asrc = (-8) -- align src for loop + add loopcnt = -1, loopcnt // loopcnt-- + shl sh1 = sh1, 3 // sh1 = 8 * (src % 8) +} { .mmi + ld8 ptable = [tmp4] // ptable = &table + ld8 ploop56 = [tmp3] // ploop56 = &loop56 + and tmp2 = -16, len // tmp2 = len & -OPSIZ +;; } +{ .mmi + add tmp3 = ptable, sh1 // tmp3 = &table + sh1 + add src = src, tmp2 // src += len & (-16) + movi0 ar.lc = loopcnt // set LC +;; } +{ .mmi + ld8 tmp4 = [tmp3] // tmp4 = loop offset + sub len = len, tmp2 // len -= len & (-16) + movi0 ar.ec = MEMLAT + 2 // one more pass needed +;; } +{ .mmi + ld8 s[1] = [asrc], 8 // preload + sub loopaddr = ploop56,tmp4 // loopadd = &loop56 - loop offset + movi0 pr.rot = 1 << 16 // set rotating predicates +;; } +{ .mib + nop.m 0 + movi0 b6 = loopaddr + br b6 // jump to the appropriate loop +;; } + + LOOP(8) + LOOP(16) + LOOP(24) + LOOP(32) + LOOP(40) + LOOP(48) + LOOP(56) +END(memcpy) +libc_hidden_builtin_def (memcpy) + + .rodata + .align 8 +.table: + data8 0 // dummy entry + data8 .loop56 - .loop8 + data8 .loop56 - .loop16 + data8 .loop56 - .loop24 + data8 .loop56 - .loop32 + data8 .loop56 - .loop40 + data8 .loop56 - .loop48 + data8 .loop56 - .loop56 diff --git a/sysdeps/ia64/memmove.S b/sysdeps/ia64/memmove.S new file mode 100644 index 0000000000..7b8c86b324 --- /dev/null +++ b/sysdeps/ia64/memmove.S @@ -0,0 +1,251 @@ +/* Optimized version of the standard memmove() function. + This file is part of the GNU C Library. + Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. + Contributed by Dan Pop . + + 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. */ + +/* Return: dest + + Inputs: + in0: dest + in1: src + in2: byte count + + The core of the function is the memcpy implementation used in memcpy.S. + When bytes have to be copied backwards, only the easy case, when + all arguments are multiples of 8, is optimised. + + In this form, it assumes little endian mode. For big endian mode, + sh1 must be computed using an extra instruction: sub sh1 = 64, sh1 + or the UM.be bit should be cleared at the beginning and set at the end. */ + +#include +#undef ret + +#define OP_T_THRES 16 +#define OPSIZ 8 + +#define adest r15 +#define saved_pr r17 +#define saved_lc r18 +#define dest r19 +#define src r20 +#define len r21 +#define asrc r22 +#define tmp2 r23 +#define tmp3 r24 +#define tmp4 r25 +#define ptable r26 +#define ploop56 r27 +#define loopaddr r28 +#define sh1 r29 +#define loopcnt r30 +#define value r31 + +#ifdef GAS_ALIGN_BREAKS_UNWIND_INFO +# define ALIGN(n) { nop 0 } +#else +# define ALIGN(n) .align n +#endif + +#define LOOP(shift) \ + ALIGN(32); \ +.loop##shift##: \ +(p[0]) ld8 r[0] = [asrc], 8 ; /* w1 */ \ +(p[MEMLAT+1]) st8 [dest] = value, 8 ; \ +(p[MEMLAT]) shrp value = r[MEMLAT], r[MEMLAT+1], shift ; \ + nop.b 0 ; \ + nop.b 0 ; \ + br.ctop.sptk .loop##shift ; \ + br.cond.sptk .cpyfew ; /* deal with the remaining bytes */ + +#define MEMLAT 21 +#define Nrot (((2*MEMLAT+3) + 7) & ~7) + +ENTRY(memmove) + .prologue + alloc r2 = ar.pfs, 3, Nrot - 3, 0, Nrot + .rotr r[MEMLAT + 2], q[MEMLAT + 1] + .rotp p[MEMLAT + 2] + mov ret0 = in0 // return value = dest + .save pr, saved_pr + mov saved_pr = pr // save the predicate registers + .save ar.lc, saved_lc + mov saved_lc = ar.lc // save the loop counter + .body + or tmp3 = in0, in1 ;; // tmp3 = dest | src + or tmp3 = tmp3, in2 // tmp3 = dest | src | len + mov dest = in0 // dest + mov src = in1 // src + mov len = in2 // len + sub tmp2 = r0, in0 // tmp2 = -dest + cmp.eq p6, p0 = in2, r0 // if (len == 0) +(p6) br.cond.spnt .restore_and_exit;;// return dest; + and tmp4 = 7, tmp3 // tmp4 = (dest | src | len) & 7 + cmp.le p6, p0 = dest, src // if dest <= src it's always safe +(p6) br.cond.spnt .forward // to copy forward + add tmp3 = src, len;; + cmp.lt p6, p0 = dest, tmp3 // if dest > src && dest < src + len +(p6) br.cond.spnt .backward // we have to copy backward + +.forward: + shr.u loopcnt = len, 4 ;; // loopcnt = len / 16 + cmp.ne p6, p0 = tmp4, r0 // if ((dest | src | len) & 7 != 0) +(p6) br.cond.sptk .next // goto next; + +// The optimal case, when dest, src and len are all multiples of 8 + + and tmp3 = 0xf, len + mov pr.rot = 1 << 16 // set rotating predicates + mov ar.ec = MEMLAT + 1 ;; // set the epilog counter + cmp.ne p6, p0 = tmp3, r0 // do we have to copy an extra word? + adds loopcnt = -1, loopcnt;; // --loopcnt +(p6) ld8 value = [src], 8;; +(p6) st8 [dest] = value, 8 // copy the "odd" word + mov ar.lc = loopcnt // set the loop counter + cmp.eq p6, p0 = 8, len +(p6) br.cond.spnt .restore_and_exit;;// the one-word special case + adds adest = 8, dest // set adest one word ahead of dest + adds asrc = 8, src ;; // set asrc one word ahead of src + nop.b 0 // get the "golden" alignment for + nop.b 0 // the next loop +.l0: +(p[0]) ld8 r[0] = [src], 16 +(p[0]) ld8 q[0] = [asrc], 16 +(p[MEMLAT]) st8 [dest] = r[MEMLAT], 16 +(p[MEMLAT]) st8 [adest] = q[MEMLAT], 16 + br.ctop.dptk .l0 ;; + + mov pr = saved_pr, -1 // restore the predicate registers + mov ar.lc = saved_lc // restore the loop counter + br.ret.sptk.many b0 +.next: + cmp.ge p6, p0 = OP_T_THRES, len // is len <= OP_T_THRES + and loopcnt = 7, tmp2 // loopcnt = -dest % 8 +(p6) br.cond.spnt .cpyfew // copy byte by byte + ;; + cmp.eq p6, p0 = loopcnt, r0 +(p6) br.cond.sptk .dest_aligned + sub len = len, loopcnt // len -= -dest % 8 + adds loopcnt = -1, loopcnt // --loopcnt + ;; + mov ar.lc = loopcnt +.l1: // copy -dest % 8 bytes + ld1 value = [src], 1 // value = *src++ + ;; + st1 [dest] = value, 1 // *dest++ = value + br.cloop.dptk .l1 +.dest_aligned: + and sh1 = 7, src // sh1 = src % 8 + and tmp2 = -8, len // tmp2 = len & -OPSIZ + and asrc = -8, src // asrc = src & -OPSIZ -- align src + shr.u loopcnt = len, 3 // loopcnt = len / 8 + and len = 7, len;; // len = len % 8 + adds loopcnt = -1, loopcnt // --loopcnt + addl tmp4 = @ltoff(.table), gp + addl tmp3 = @ltoff(.loop56), gp + mov ar.ec = MEMLAT + 1 // set EC + mov pr.rot = 1 << 16;; // set rotating predicates + mov ar.lc = loopcnt // set LC + cmp.eq p6, p0 = sh1, r0 // is the src aligned? +(p6) br.cond.sptk .src_aligned + add src = src, tmp2 // src += len & -OPSIZ + shl sh1 = sh1, 3 // sh1 = 8 * (src % 8) + ld8 ploop56 = [tmp3] // ploop56 = &loop56 + ld8 ptable = [tmp4];; // ptable = &table + add tmp3 = ptable, sh1;; // tmp3 = &table + sh1 + mov ar.ec = MEMLAT + 1 + 1 // one more pass needed + ld8 tmp4 = [tmp3];; // tmp4 = loop offset + sub loopaddr = ploop56,tmp4 // loopadd = &loop56 - loop offset + ld8 r[1] = [asrc], 8;; // w0 + mov b6 = loopaddr;; + br b6 // jump to the appropriate loop + + LOOP(8) + LOOP(16) + LOOP(24) + LOOP(32) + LOOP(40) + LOOP(48) + LOOP(56) + +.src_aligned: +.l3: +(p[0]) ld8 r[0] = [src], 8 +(p[MEMLAT]) st8 [dest] = r[MEMLAT], 8 + br.ctop.dptk .l3 +.cpyfew: + cmp.eq p6, p0 = len, r0 // is len == 0 ? + adds len = -1, len // --len; +(p6) br.cond.spnt .restore_and_exit ;; + mov ar.lc = len +.l4: + ld1 value = [src], 1 + ;; + st1 [dest] = value, 1 + br.cloop.dptk .l4 ;; +.restore_and_exit: + mov pr = saved_pr, -1 // restore the predicate registers + mov ar.lc = saved_lc // restore the loop counter + br.ret.sptk.many b0 + +// In the case of a backward copy, optimise only the case when everything +// is a multiple of 8, otherwise copy byte by byte. The backward copy is +// used only when the blocks are overlapping and dest > src. + +.backward: + shr.u loopcnt = len, 3 // loopcnt = len / 8 + add src = src, len // src points one byte past the end + add dest = dest, len ;; // dest points one byte past the end + mov ar.ec = MEMLAT + 1 // set the epilog counter + mov pr.rot = 1 << 16 // set rotating predicates + adds loopcnt = -1, loopcnt // --loopcnt + cmp.ne p6, p0 = tmp4, r0 // if ((dest | src | len) & 7 != 0) +(p6) br.cond.sptk .bytecopy ;; // copy byte by byte backward + adds src = -8, src // src points to the last word + adds dest = -8, dest // dest points to the last word + mov ar.lc = loopcnt;; // set the loop counter +.l5: +(p[0]) ld8 r[0] = [src], -8 +(p[MEMLAT]) st8 [dest] = r[MEMLAT], -8 + br.ctop.dptk .l5 + br.cond.sptk .restore_and_exit +.bytecopy: + adds src = -1, src // src points to the last byte + adds dest = -1, dest // dest points to the last byte + adds loopcnt = -1, len;; // loopcnt = len - 1 + mov ar.lc = loopcnt;; // set the loop counter +.l6: +(p[0]) ld1 r[0] = [src], -1 +(p[MEMLAT]) st1 [dest] = r[MEMLAT], -1 + br.ctop.dptk .l6 + br.cond.sptk .restore_and_exit +END(memmove) + + .rodata + .align 8 +.table: + data8 0 // dummy entry + data8 .loop56 - .loop8 + data8 .loop56 - .loop16 + data8 .loop56 - .loop24 + data8 .loop56 - .loop32 + data8 .loop56 - .loop40 + data8 .loop56 - .loop48 + data8 .loop56 - .loop56 + +libc_hidden_builtin_def (memmove) diff --git a/sysdeps/ia64/memset.S b/sysdeps/ia64/memset.S new file mode 100644 index 0000000000..84d8f0a191 --- /dev/null +++ b/sysdeps/ia64/memset.S @@ -0,0 +1,400 @@ +/* Optimized version of the standard memset() function. + This file is part of the GNU C Library. + Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + Contributed by Dan Pop for Itanium . + Rewritten for McKinley by Sverre Jarp, HP Labs/CERN + + 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. */ + +/* Return: dest + + Inputs: + in0: dest + in1: value + in2: count + + The algorithm is fairly straightforward: set byte by byte until we + we get to a 16B-aligned address, then loop on 128 B chunks using an + early store as prefetching, then loop on 32B chucks, then clear remaining + words, finally clear remaining bytes. + Since a stf.spill f0 can store 16B in one go, we use this instruction + to get peak speed when value = 0. */ + +#include +#undef ret + +#define dest in0 +#define value in1 +#define cnt in2 + +#define tmp r31 +#define save_lc r30 +#define ptr0 r29 +#define ptr1 r28 +#define ptr2 r27 +#define ptr3 r26 +#define ptr9 r24 +#define loopcnt r23 +#define linecnt r22 +#define bytecnt r21 + +#define fvalue f6 + +// This routine uses only scratch predicate registers (p6 - p15) +#define p_scr p6 // default register for same-cycle branches +#define p_nz p7 +#define p_zr p8 +#define p_unalgn p9 +#define p_y p11 +#define p_n p12 +#define p_yy p13 +#define p_nn p14 + +#define movi0 mov + +#define MIN1 15 +#define MIN1P1HALF 8 +#define LINE_SIZE 128 +#define LSIZE_SH 7 // shift amount +#define PREF_AHEAD 8 + +#define USE_FLP +#if defined(USE_INT) +#define store st8 +#define myval value +#elif defined(USE_FLP) +#define store stf8 +#define myval fvalue +#endif + +.align 64 +ENTRY(memset) +{ .mmi + .prologue + alloc tmp = ar.pfs, 3, 0, 0, 0 + lfetch.nt1 [dest] + .save ar.lc, save_lc + movi0 save_lc = ar.lc +} { .mmi + .body + mov ret0 = dest // return value + cmp.ne p_nz, p_zr = value, r0 // use stf.spill if value is zero + cmp.eq p_scr, p0 = cnt, r0 +;; } +{ .mmi + and ptr2 = -(MIN1+1), dest // aligned address + and tmp = MIN1, dest // prepare to check for alignment + tbit.nz p_y, p_n = dest, 0 // Do we have an odd address? (M_B_U) +} { .mib + mov ptr1 = dest + mux1 value = value, @brcst // create 8 identical bytes in word +(p_scr) br.ret.dpnt.many rp // return immediately if count = 0 +;; } +{ .mib + cmp.ne p_unalgn, p0 = tmp, r0 +} { .mib // NB: # of bytes to move is 1 higher + sub bytecnt = (MIN1+1), tmp // than loopcnt + cmp.gt p_scr, p0 = 16, cnt // is it a minimalistic task? +(p_scr) br.cond.dptk.many .move_bytes_unaligned // go move just a few (M_B_U) +;; } +{ .mmi +(p_unalgn) add ptr1 = (MIN1+1), ptr2 // after alignment +(p_unalgn) add ptr2 = MIN1P1HALF, ptr2 // after alignment +(p_unalgn) tbit.nz.unc p_y, p_n = bytecnt, 3 // should we do a st8 ? +;; } +{ .mib +(p_y) add cnt = -8, cnt +(p_unalgn) tbit.nz.unc p_yy, p_nn = bytecnt, 2 // should we do a st4 ? +} { .mib +(p_y) st8 [ptr2] = value, -4 +(p_n) add ptr2 = 4, ptr2 +;; } +{ .mib +(p_yy) add cnt = -4, cnt +(p_unalgn) tbit.nz.unc p_y, p_n = bytecnt, 1 // should we do a st2 ? +} { .mib +(p_yy) st4 [ptr2] = value, -2 +(p_nn) add ptr2 = 2, ptr2 +;; } +{ .mmi + mov tmp = LINE_SIZE+1 // for compare +(p_y) add cnt = -2, cnt +(p_unalgn) tbit.nz.unc p_yy, p_nn = bytecnt, 0 // should we do a st1 ? +} { .mmi + setf.sig fvalue=value // transfer value to FLP side +(p_y) st2 [ptr2] = value, -1 +(p_n) add ptr2 = 1, ptr2 +;; } + +{ .mmi +(p_yy) st1 [ptr2] = value + cmp.gt p_scr, p0 = tmp, cnt // is it a minimalistic task? +} { .mbb +(p_yy) add cnt = -1, cnt +(p_scr) br.cond.dpnt.many .fraction_of_line // go move just a few +;; } + +{ .mib + nop.m 0 + shr.u linecnt = cnt, LSIZE_SH +(p_zr) br.cond.dptk.many .l1b // Jump to use stf.spill +;; } + +#ifndef GAS_ALIGN_BREAKS_UNWIND_INFO + .align 32 // -------- // L1A: store ahead into cache lines; fill later +#endif +{ .mmi + and tmp = -(LINE_SIZE), cnt // compute end of range + mov ptr9 = ptr1 // used for prefetching + and cnt = (LINE_SIZE-1), cnt // remainder +} { .mmi + mov loopcnt = PREF_AHEAD-1 // default prefetch loop + cmp.gt p_scr, p0 = PREF_AHEAD, linecnt // check against actual value +;; } +{ .mmi +(p_scr) add loopcnt = -1, linecnt // start of stores + add ptr2 = 8, ptr1 // (beyond prefetch stores) + add ptr1 = tmp, ptr1 // first address beyond total +;; } // range +{ .mmi + add tmp = -1, linecnt // next loop count + movi0 ar.lc = loopcnt +;; } +.pref_l1a: +{ .mib + store [ptr9] = myval, 128 // Do stores one cache line apart + nop.i 0 + br.cloop.dptk.few .pref_l1a +;; } +{ .mmi + add ptr0 = 16, ptr2 // Two stores in parallel + movi0 ar.lc = tmp +;; } +.l1ax: + { .mmi + store [ptr2] = myval, 8 + store [ptr0] = myval, 8 + ;; } + { .mmi + store [ptr2] = myval, 24 + store [ptr0] = myval, 24 + ;; } + { .mmi + store [ptr2] = myval, 8 + store [ptr0] = myval, 8 + ;; } + { .mmi + store [ptr2] = myval, 24 + store [ptr0] = myval, 24 + ;; } + { .mmi + store [ptr2] = myval, 8 + store [ptr0] = myval, 8 + ;; } + { .mmi + store [ptr2] = myval, 24 + store [ptr0] = myval, 24 + ;; } + { .mmi + store [ptr2] = myval, 8 + store [ptr0] = myval, 32 + cmp.lt p_scr, p0 = ptr9, ptr1 // do we need more prefetching? + ;; } +{ .mmb + store [ptr2] = myval, 24 +(p_scr) store [ptr9] = myval, 128 + br.cloop.dptk.few .l1ax +;; } +{ .mbb + cmp.le p_scr, p0 = 8, cnt // just a few bytes left ? +(p_scr) br.cond.dpnt.many .fraction_of_line // Branch no. 2 + br.cond.dpnt.many .move_bytes_from_alignment // Branch no. 3 +;; } + +#ifdef GAS_ALIGN_BREAKS_UNWIND_INFO + { nop 0 } +#else + .align 32 +#endif +.l1b: // ------------------ // L1B: store ahead into cache lines; fill later +{ .mmi + and tmp = -(LINE_SIZE), cnt // compute end of range + mov ptr9 = ptr1 // used for prefetching + and cnt = (LINE_SIZE-1), cnt // remainder +} { .mmi + mov loopcnt = PREF_AHEAD-1 // default prefetch loop + cmp.gt p_scr, p0 = PREF_AHEAD, linecnt // check against actual value +;; } +{ .mmi +(p_scr) add loopcnt = -1, linecnt + add ptr2 = 16, ptr1 // start of stores (beyond prefetch stores) + add ptr1 = tmp, ptr1 // first address beyond total range +;; } +{ .mmi + add tmp = -1, linecnt // next loop count + movi0 ar.lc = loopcnt +;; } +.pref_l1b: +{ .mib + stf.spill [ptr9] = f0, 128 // Do stores one cache line apart + nop.i 0 + br.cloop.dptk.few .pref_l1b +;; } +{ .mmi + add ptr0 = 16, ptr2 // Two stores in parallel + movi0 ar.lc = tmp +;; } +.l1bx: + { .mmi + stf.spill [ptr2] = f0, 32 + stf.spill [ptr0] = f0, 32 + ;; } + { .mmi + stf.spill [ptr2] = f0, 32 + stf.spill [ptr0] = f0, 32 + ;; } + { .mmi + stf.spill [ptr2] = f0, 32 + stf.spill [ptr0] = f0, 64 + cmp.lt p_scr, p0 = ptr9, ptr1 // do we need more prefetching? + ;; } +{ .mmb + stf.spill [ptr2] = f0, 32 +(p_scr) stf.spill [ptr9] = f0, 128 + br.cloop.dptk.few .l1bx +;; } +{ .mib + cmp.gt p_scr, p0 = 8, cnt // just a few bytes left ? +(p_scr) br.cond.dpnt.many .move_bytes_from_alignment +;; } + +.fraction_of_line: +{ .mib + add ptr2 = 16, ptr1 + shr.u loopcnt = cnt, 5 // loopcnt = cnt / 32 +;; } +{ .mib + cmp.eq p_scr, p0 = loopcnt, r0 + add loopcnt = -1, loopcnt +(p_scr) br.cond.dpnt.many store_words +;; } +{ .mib + and cnt = 0x1f, cnt // compute the remaining cnt + movi0 ar.lc = loopcnt +;; } +#ifndef GAS_ALIGN_BREAKS_UNWIND_INFO + .align 32 +#endif +.l2: // ---------------------------- // L2A: store 32B in 2 cycles +{ .mmb + store [ptr1] = myval, 8 + store [ptr2] = myval, 8 +;; } { .mmb + store [ptr1] = myval, 24 + store [ptr2] = myval, 24 + br.cloop.dptk.many .l2 +;; } +store_words: +{ .mib + cmp.gt p_scr, p0 = 8, cnt // just a few bytes left ? +(p_scr) br.cond.dpnt.many .move_bytes_from_alignment // Branch +;; } + +{ .mmi + store [ptr1] = myval, 8 // store + cmp.le p_y, p_n = 16, cnt // + add cnt = -8, cnt // subtract +;; } +{ .mmi +(p_y) store [ptr1] = myval, 8 // store +(p_y) cmp.le.unc p_yy, p_nn = 16, cnt // +(p_y) add cnt = -8, cnt // subtract +;; } +{ .mmi // store +(p_yy) store [ptr1] = myval, 8 // +(p_yy) add cnt = -8, cnt // subtract +;; } + +.move_bytes_from_alignment: +{ .mib + cmp.eq p_scr, p0 = cnt, r0 + tbit.nz.unc p_y, p0 = cnt, 2 // should we terminate with a st4 ? +(p_scr) br.cond.dpnt.few .restore_and_exit +;; } +{ .mib +(p_y) st4 [ptr1] = value, 4 + tbit.nz.unc p_yy, p0 = cnt, 1 // should we terminate with a st2 ? +;; } +{ .mib +(p_yy) st2 [ptr1] = value, 2 + tbit.nz.unc p_y, p0 = cnt, 0 +;; } + +{ .mib +(p_y) st1 [ptr1] = value +;; } +.restore_and_exit: +{ .mib + nop.m 0 + movi0 ar.lc = save_lc + br.ret.sptk.many rp +;; } + +.move_bytes_unaligned: +{ .mmi + .pred.rel "mutex",p_y, p_n + .pred.rel "mutex",p_yy, p_nn +(p_n) cmp.le p_yy, p_nn = 4, cnt +(p_y) cmp.le p_yy, p_nn = 5, cnt +(p_n) add ptr2 = 2, ptr1 +} { .mmi +(p_y) add ptr2 = 3, ptr1 +(p_y) st1 [ptr1] = value, 1 // fill 1 (odd-aligned) byte +(p_y) add cnt = -1, cnt // [15, 14 (or less) left] +;; } +{ .mmi +(p_yy) cmp.le.unc p_y, p0 = 8, cnt + add ptr3 = ptr1, cnt // prepare last store + movi0 ar.lc = save_lc +} { .mmi +(p_yy) st2 [ptr1] = value, 4 // fill 2 (aligned) bytes +(p_yy) st2 [ptr2] = value, 4 // fill 2 (aligned) bytes +(p_yy) add cnt = -4, cnt // [11, 10 (o less) left] +;; } +{ .mmi +(p_y) cmp.le.unc p_yy, p0 = 8, cnt + add ptr3 = -1, ptr3 // last store + tbit.nz p_scr, p0 = cnt, 1 // will there be a st2 at the end ? +} { .mmi +(p_y) st2 [ptr1] = value, 4 // fill 2 (aligned) bytes +(p_y) st2 [ptr2] = value, 4 // fill 2 (aligned) bytes +(p_y) add cnt = -4, cnt // [7, 6 (or less) left] +;; } +{ .mmi +(p_yy) st2 [ptr1] = value, 4 // fill 2 (aligned) bytes +(p_yy) st2 [ptr2] = value, 4 // fill 2 (aligned) bytes + // [3, 2 (or less) left] + tbit.nz p_y, p0 = cnt, 0 // will there be a st1 at the end ? +} { .mmi +(p_yy) add cnt = -4, cnt +;; } +{ .mmb +(p_scr) st2 [ptr1] = value // fill 2 (aligned) bytes +(p_y) st1 [ptr3] = value // fill last byte (using ptr3) + br.ret.sptk.many rp +;; } +END(memset) +libc_hidden_builtin_def (memset) diff --git a/sysdeps/ia64/memusage.h b/sysdeps/ia64/memusage.h new file mode 100644 index 0000000000..5f395b88d6 --- /dev/null +++ b/sysdeps/ia64/memusage.h @@ -0,0 +1,30 @@ +/* Copyright (C) 2000, 2001 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. */ + +#include + +#define GETSP() ({ register uintptr_t stack_ptr asm ("%r12"); stack_ptr; }) +#define GETTIME(low, high) \ + { \ + hp_timing_t __now; \ + HP_TIMING_NOW (__now); \ + low = __now & 0xffffffff; \ + high = __now >> 32; \ + } + +#include diff --git a/sysdeps/ia64/nptl/Makefile b/sysdeps/ia64/nptl/Makefile new file mode 100644 index 0000000000..3229d3f16d --- /dev/null +++ b/sysdeps/ia64/nptl/Makefile @@ -0,0 +1,25 @@ +# Copyright (C) 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. + +ifeq ($(subdir),csu) +gen-as-const-headers += tcb-offsets.sym +endif + +ifeq ($(subdir),nptl) +libpthread-routines += ptw-sysdep ptw-sigblock ptw-sigprocmask +endif diff --git a/sysdeps/ia64/nptl/pthread_spin_lock.c b/sysdeps/ia64/nptl/pthread_spin_lock.c new file mode 100644 index 0000000000..7d25af7c4b --- /dev/null +++ b/sysdeps/ia64/nptl/pthread_spin_lock.c @@ -0,0 +1,36 @@ +/* Copyright (C) 2003, 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek , 2003. + + 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. */ + +#include "pthreadP.h" + +int +pthread_spin_lock (lock) + pthread_spinlock_t *lock; +{ + int *p = (int *) lock; + + while (__builtin_expect (__sync_val_compare_and_swap (p, 0, 1), 0)) + { + /* Spin without using the atomic instruction. */ + do + __asm __volatile ("hint @pause" : : : "memory"); + while (*p); + } + return 0; +} diff --git a/sysdeps/ia64/nptl/pthread_spin_trylock.c b/sysdeps/ia64/nptl/pthread_spin_trylock.c new file mode 100644 index 0000000000..0fd8b99b7a --- /dev/null +++ b/sysdeps/ia64/nptl/pthread_spin_trylock.c @@ -0,0 +1,28 @@ +/* Copyright (C) 2003 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek , 2003. + + 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. */ + +#include +#include "pthreadP.h" + +int +pthread_spin_trylock (lock) + pthread_spinlock_t *lock; +{ + return __sync_val_compare_and_swap ((int *) lock, 0, 1) == 0 ? 0 : EBUSY; +} diff --git a/sysdeps/ia64/nptl/pthread_spin_unlock.c b/sysdeps/ia64/nptl/pthread_spin_unlock.c new file mode 100644 index 0000000000..50d9c5f6a8 --- /dev/null +++ b/sysdeps/ia64/nptl/pthread_spin_unlock.c @@ -0,0 +1,28 @@ +/* Copyright (C) 2003, 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek , 2003. + + 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. */ + +#include "pthreadP.h" + + +int +pthread_spin_unlock (pthread_spinlock_t *lock) +{ + __sync_lock_release ((int *) lock); + return 0; +} diff --git a/sysdeps/ia64/nptl/pthreaddef.h b/sysdeps/ia64/nptl/pthreaddef.h new file mode 100644 index 0000000000..f2539e2905 --- /dev/null +++ b/sysdeps/ia64/nptl/pthreaddef.h @@ -0,0 +1,43 @@ +/* Copyright (C) 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. */ + +/* Default stack size. */ +#define ARCH_STACK_DEFAULT_SIZE (32 * 1024 * 1024) + +/* IA-64 uses a normal stack and a register stack. */ +#define NEED_SEPARATE_REGISTER_STACK + +/* Required stack pointer alignment at beginning. */ +#define STACK_ALIGN 16 + +/* Minimal stack size after allocating thread descriptor and guard size. */ +#define MINIMAL_REST_STACK 16384 + +/* Alignment requirement for TCB. */ +#define TCB_ALIGNMENT 16 + + +/* Location of current stack frame. */ +#define CURRENT_STACK_FRAME __stack_pointer +register char *__stack_pointer __asm__ ("sp"); + +/* XXX Until we have a better place keep the definitions here. */ + +/* While there is no such syscall. */ +#define __exit_thread_inline(val) \ + INLINE_SYSCALL (exit, 1, (val)) diff --git a/sysdeps/ia64/nptl/tcb-offsets.sym b/sysdeps/ia64/nptl/tcb-offsets.sym new file mode 100644 index 0000000000..e1707ab1c8 --- /dev/null +++ b/sysdeps/ia64/nptl/tcb-offsets.sym @@ -0,0 +1,7 @@ +#include +#include + +PID offsetof (struct pthread, pid) - TLS_PRE_TCB_SIZE +TID offsetof (struct pthread, tid) - TLS_PRE_TCB_SIZE +MULTIPLE_THREADS_OFFSET offsetof (struct pthread, header.multiple_threads) - TLS_PRE_TCB_SIZE +SYSINFO_OFFSET offsetof (tcbhead_t, __private) diff --git a/sysdeps/ia64/nptl/tls.h b/sysdeps/ia64/nptl/tls.h new file mode 100644 index 0000000000..c2a092663b --- /dev/null +++ b/sysdeps/ia64/nptl/tls.h @@ -0,0 +1,186 @@ +/* Definition for thread-local data handling. nptl/IA-64 version. + Copyright (C) 2003-2007, 2011 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 _TLS_H +#define _TLS_H 1 + +#include +#ifndef __ASSEMBLER__ +# include +# include +# include +# include +# include + + +/* Type for the dtv. */ +typedef union dtv +{ + size_t counter; + struct + { + void *val; + bool is_static; + } pointer; +} dtv_t; + + +typedef struct +{ + dtv_t *dtv; + void *__private; +} tcbhead_t; + +register struct pthread *__thread_self __asm__("r13"); + +# define TLS_MULTIPLE_THREADS_IN_TCB 1 + +#else /* __ASSEMBLER__ */ +# include +#endif + + +/* Alignment requirement for the stack. */ +#define STACK_ALIGN 16 + +#ifndef __ASSEMBLER__ +/* Get system call information. */ +# include + +/* This is the size of the initial TCB. */ +# define TLS_INIT_TCB_SIZE sizeof (tcbhead_t) + +/* Alignment requirements for the initial TCB. */ +# define TLS_INIT_TCB_ALIGN __alignof__ (tcbhead_t) + +/* This is the size of the TCB. */ +# define TLS_TCB_SIZE sizeof (tcbhead_t) + +/* This is the size we need before TCB. + If there is not any room for uintptr_t stack_guard and + uintptr_t pointer_guard in struct pthread's final padding, + we need to put struct pthread 16 byte slower. */ +# define TLS_PRE_TCB_SIZE \ + (sizeof (struct pthread) \ + + (PTHREAD_STRUCT_END_PADDING < 2 * sizeof (uintptr_t) \ + ? ((2 * sizeof (uintptr_t) + __alignof__ (struct pthread) - 1) \ + & ~(__alignof__ (struct pthread) - 1)) \ + : 0)) + +/* Alignment requirements for the TCB. */ +# define TLS_TCB_ALIGN __alignof__ (struct pthread) + +/* The DTV is allocated at the TP; the TCB is placed elsewhere. */ +# define TLS_DTV_AT_TP 1 + +/* Get the thread descriptor definition. */ +# include + +/* Install the dtv pointer. The pointer passed is to the element with + index -1 which contain the length. */ +# define INSTALL_DTV(descr, dtvp) \ + ((tcbhead_t *) (descr))->dtv = (dtvp) + 1 + +/* Install new dtv for current thread. */ +# define INSTALL_NEW_DTV(DTV) \ + (((tcbhead_t *)__thread_self)->dtv = (DTV)) + +/* Return dtv of given thread descriptor. */ +# define GET_DTV(descr) \ + (((tcbhead_t *) (descr))->dtv) + +#define THREAD_SELF_SYSINFO (((tcbhead_t *) __thread_self)->__private) +#define THREAD_SYSINFO(pd) \ + (((tcbhead_t *) ((char *) (pd) + TLS_PRE_TCB_SIZE))->__private) + +#if defined NEED_DL_SYSINFO +# define INIT_SYSINFO THREAD_SELF_SYSINFO = (void *) GLRO(dl_sysinfo) +#else +# define INIT_SYSINFO NULL +#endif + +/* Code to initially initialize the thread pointer. This might need + special attention since 'errno' is not yet available and if the + operation can cause a failure 'errno' must not be touched. */ +# define TLS_INIT_TP(thrdescr, secondcall) \ + (__thread_self = (thrdescr), INIT_SYSINFO, NULL) + +/* Return the address of the dtv for the current thread. */ +# define THREAD_DTV() \ + (((tcbhead_t *)__thread_self)->dtv) + +/* Return the thread descriptor for the current thread. */ +# define THREAD_SELF \ + ((struct pthread *) ((char *) __thread_self - TLS_PRE_TCB_SIZE)) + +/* Magic for libthread_db to know how to do THREAD_SELF. */ +# define DB_THREAD_SELF REGISTER (64, 64, 13 * 8, -TLS_PRE_TCB_SIZE) + +/* Access to data in the thread descriptor is easy. */ +#define THREAD_GETMEM(descr, member) \ + descr->member +#define THREAD_GETMEM_NC(descr, member, idx) \ + descr->member[idx] +#define THREAD_SETMEM(descr, member, value) \ + descr->member = (value) +#define THREAD_SETMEM_NC(descr, member, idx, value) \ + descr->member[idx] = (value) + +/* Set the stack guard field in TCB head. */ +#define THREAD_SET_STACK_GUARD(value) \ + (((uintptr_t *) __thread_self)[-1] = (value)) +#define THREAD_COPY_STACK_GUARD(descr) \ + (((uintptr_t *) ((char *) (descr) + TLS_PRE_TCB_SIZE))[-1] \ + = ((uintptr_t *) __thread_self)[-1]) + +/* Set the pointer guard field in TCB head. */ +#define THREAD_GET_POINTER_GUARD() \ + (((uintptr_t *) __thread_self)[-2]) +#define THREAD_SET_POINTER_GUARD(value) \ + (((uintptr_t *) __thread_self)[-2] = (value)) +#define THREAD_COPY_POINTER_GUARD(descr) \ + (((uintptr_t *) ((char *) (descr) + TLS_PRE_TCB_SIZE))[-2] \ + = THREAD_GET_POINTER_GUARD ()) + +/* Get and set the global scope generation counter in struct pthread. */ +#define THREAD_GSCOPE_FLAG_UNUSED 0 +#define THREAD_GSCOPE_FLAG_USED 1 +#define THREAD_GSCOPE_FLAG_WAIT 2 +#define THREAD_GSCOPE_RESET_FLAG() \ + do \ + { int __res \ + = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \ + THREAD_GSCOPE_FLAG_UNUSED); \ + if (__res == THREAD_GSCOPE_FLAG_WAIT) \ + lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1, LLL_PRIVATE); \ + } \ + while (0) +#define THREAD_GSCOPE_SET_FLAG() \ + do \ + { \ + THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \ + atomic_write_barrier (); \ + } \ + while (0) +#define THREAD_GSCOPE_WAIT() \ + GL(dl_wait_lookup_done) () + +#endif /* __ASSEMBLER__ */ + +#endif /* tls.h */ diff --git a/sysdeps/ia64/sched_cpucount.c b/sysdeps/ia64/sched_cpucount.c new file mode 100644 index 0000000000..ff9d8cf2a8 --- /dev/null +++ b/sysdeps/ia64/sched_cpucount.c @@ -0,0 +1,21 @@ +/* Copyright (C) 2007 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. */ + +#define POPCNT(l) __builtin_popcountl (l) + +#include diff --git a/sysdeps/ia64/softpipe.h b/sysdeps/ia64/softpipe.h new file mode 100644 index 0000000000..cf0eb53559 --- /dev/null +++ b/sysdeps/ia64/softpipe.h @@ -0,0 +1,29 @@ +/* This file is part of the GNU C Library. + Copyright (C) 2000 Free Software Foundation, Inc. + + 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. */ + +/* The latency of a memory load assumed by the assembly implementation + of the mem and str functions. Since we don't have any clue about + where the data might be, let's assume it's in the L2 cache. + Assuming L3 would be too pessimistic :-) + + Some functions define MEMLAT as 2, because they expect their data + to be in the L1D cache. */ + +#ifndef MEMLAT +# define MEMLAT 6 +#endif diff --git a/sysdeps/ia64/stackinfo.h b/sysdeps/ia64/stackinfo.h new file mode 100644 index 0000000000..a7446e665d --- /dev/null +++ b/sysdeps/ia64/stackinfo.h @@ -0,0 +1,35 @@ +/* Copyright (C) 2001, 2010 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. */ + +/* This file contains a bit of information about the stack allocation + of the processor. */ + +#ifndef _STACKINFO_H +#define _STACKINFO_H 1 + +#include + +/* On IA-64 the stack grows down. The register stack is of no concern + here. */ +#define _STACK_GROWS_DOWN 1 + +/* Default to an executable stack. PF_X can be overridden if PT_GNU_STACK is + * present, but it is presumed absent. */ +#define DEFAULT_STACK_PERMS (PF_R|PF_W|PF_X) + +#endif /* stackinfo.h */ diff --git a/sysdeps/ia64/strcat.c b/sysdeps/ia64/strcat.c new file mode 100644 index 0000000000..8633aa07b9 --- /dev/null +++ b/sysdeps/ia64/strcat.c @@ -0,0 +1,27 @@ +/* Copyright (C) 2004 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. */ + +#include + +char * +strcat (char *dest, const char *src) +{ + strcpy (dest + strlen (dest), src); + return dest; +} +libc_hidden_builtin_def (strcat) diff --git a/sysdeps/ia64/strchr.S b/sysdeps/ia64/strchr.S new file mode 100644 index 0000000000..63db7ff7e5 --- /dev/null +++ b/sysdeps/ia64/strchr.S @@ -0,0 +1,112 @@ +/* Optimized version of the standard strchr() function. + This file is part of the GNU C Library. + Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. + Contributed by Dan Pop . + + 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. */ + +/* Return: the address of the first occurence of chr in str or NULL + + Inputs: + in0: str + in1: chr + + A modified version of memchr.S, the search ends when the character is + found or the terminating null character is encountered. + + This implementation assumes little endian mode. For big endian mode, + the instruction czx1.r should be replaced by czx1.l. */ + +#include +#undef ret + +#define saved_lc r18 +#define poschr r19 +#define pos0 r20 +#define val1 r21 +#define val2 r22 +#define tmp r24 +#define chrx8 r25 +#define loopcnt r30 + +#define str in0 +#define chr in1 + +ENTRY(strchr) + .prologue + alloc r2 = ar.pfs, 2, 0, 0, 0 + .save ar.lc, saved_lc + mov saved_lc = ar.lc // save the loop counter + .body + mov ret0 = str + and tmp = 7, str // tmp = str % 8 + mux1 chrx8 = chr, @brcst + extr.u chr = chr, 0, 8 // retain only the last byte + cmp.ne p8, p0 = r0, r0 // clear p8 + ;; + sub loopcnt = 8, tmp // loopcnt = 8 - tmp + cmp.eq p6, p0 = tmp, r0 +(p6) br.cond.sptk .str_aligned;; + adds loopcnt = -1, loopcnt;; + mov ar.lc = loopcnt +.l1: + ld1 val2 = [ret0], 1 + ;; + cmp.eq p6, p0 = val2, chr + cmp.eq p7, p0 = val2, r0 +(p6) br.cond.spnt .restore_and_exit +(p7) br.cond.spnt .notfound + br.cloop.sptk .l1 +.str_aligned: + ld8 val1 = [ret0], 8;; + nop.b 0 + nop.b 0 +.l2: + ld8.s val2 = [ret0], 8 // don't bomb out here + czx1.r pos0 = val1 + xor tmp = val1, chrx8 // if val1 contains chr, tmp will + ;; // contain a zero in its position + czx1.r poschr = tmp + cmp.ne p6, p0 = 8, pos0 + ;; + cmp.ne p7, p0 = 8, poschr +(p7) br.cond.spnt .foundit +(p6) br.cond.spnt .notfound + chk.s val2, .recovery +.back: + mov val1 = val2 + br.cond.dptk .l2 +.foundit: +(p6) cmp.lt p8, p0 = pos0, poschr // we found chr and null in the word +(p8) br.cond.spnt .notfound // null was found before chr + add ret0 = ret0, poschr ;; + adds ret0 = -15, ret0 ;; // should be -16, but we decrement +.restore_and_exit: // ret0 in the next instruction + adds ret0 = -1, ret0 // ret0 was pointing 1 char too far + mov ar.lc = saved_lc // restore the loop counter + br.ret.sptk.many b0 +.notfound: + mov ret0 = r0 // return NULL if null was found + mov ar.lc = saved_lc + br.ret.sptk.many b0 +.recovery: + adds ret0 = -8, ret0;; + ld8 val2 = [ret0], 8 // bomb out here + br.cond.sptk .back +END(strchr) + +weak_alias (strchr, index) +libc_hidden_builtin_def (strchr) diff --git a/sysdeps/ia64/strcmp.S b/sysdeps/ia64/strcmp.S new file mode 100644 index 0000000000..15bfeb4a7f --- /dev/null +++ b/sysdeps/ia64/strcmp.S @@ -0,0 +1,54 @@ +/* Optimized version of the standard strcmp() function. + This file is part of the GNU C Library. + Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. + Contributed by Dan Pop . + + 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. */ + +/* Return: the result of the comparison + + Inputs: + in0: s1 + in1: s2 + + Unlike memcmp(), this function is optimized for mismatches within the + first few characters. */ + +#include +#undef ret + +#define s1 in0 +#define s2 in1 + +#define val1 r15 +#define val2 r16 + + +ENTRY(strcmp) + alloc r2 = ar.pfs, 2, 0, 0, 0 +.loop: + ld1 val1 = [s1], 1 + ld1 val2 = [s2], 1 + cmp.eq p6, p0 = r0, r0 // set p6 + ;; + cmp.ne.and p6, p0 = val1, r0 + cmp.ne.and p6, p0 = val2, r0 + cmp.eq.and p6, p0 = val1, val2 +(p6) br.cond.sptk .loop + sub ret0 = val1, val2 + br.ret.sptk.many b0 +END(strcmp) +libc_hidden_builtin_def (strcmp) diff --git a/sysdeps/ia64/strcpy.S b/sysdeps/ia64/strcpy.S new file mode 100644 index 0000000000..5001f831c3 --- /dev/null +++ b/sysdeps/ia64/strcpy.S @@ -0,0 +1,145 @@ +/* Optimized version of the standard strcpy() function. + This file is part of the GNU C Library. + Copyright (C) 2000, 2001, 2003, 2011 Free Software Foundation, Inc. + Contributed by Dan Pop . + + 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. */ + +/* Return: dest + + Inputs: + in0: dest + in1: src + + In this form, it assumes little endian mode. For big endian mode, + the two shifts in .l2 must be inverted: + + shl value = r[1], sh1 // value = w0 << sh1 + shr.u tmp = r[0], sh2 // tmp = w1 >> sh2 + */ + +#include +#undef ret + +#define saved_lc r15 +#define saved_pr r16 +#define thresh r17 +#define dest r19 +#define src r20 +#define len r21 +#define asrc r22 +#define tmp r23 +#define pos r24 +#define w0 r25 +#define w1 r26 +#define c r27 +#define sh2 r28 +#define sh1 r29 +#define loopcnt r30 +#define value r31 + +ENTRY(strcpy) + .prologue + alloc r2 = ar.pfs, 2, 0, 30, 32 + +#define MEMLAT 2 + .rotr r[MEMLAT + 2] + .rotp p[MEMLAT + 1] + + mov ret0 = in0 // return value = dest + .save pr, saved_pr + mov saved_pr = pr // save the predicate registers + .save ar.lc, saved_lc + mov saved_lc = ar.lc // save the loop counter + .body + sub tmp = r0, in0 ;; // tmp = -dest + mov dest = in0 // dest + mov src = in1 // src + and loopcnt = 7, tmp ;; // loopcnt = -dest % 8 + cmp.eq p6, p0 = loopcnt, r0 + adds loopcnt = -1, loopcnt // --loopcnt +(p6) br.cond.sptk .dest_aligned ;; + mov ar.lc = loopcnt +.l1: // copy -dest % 8 bytes + ld1 c = [src], 1 // c = *src++ + ;; + st1 [dest] = c, 1 // *dest++ = c + cmp.eq p6, p0 = c, r0 +(p6) br.cond.dpnt .restore_and_exit + br.cloop.dptk .l1 ;; +.dest_aligned: + and sh1 = 7, src // sh1 = src % 8 + mov ar.lc = -1 // "infinite" loop + and asrc = -8, src ;; // asrc = src & -OPSIZ -- align src + sub thresh = 8, sh1 + mov pr.rot = 1 << 16 // set rotating predicates + cmp.ne p7, p0 = r0, r0 // clear p7 + shl sh1 = sh1, 3 ;; // sh1 = 8 * (src % 8) + sub sh2 = 64, sh1 // sh2 = 64 - sh1 + cmp.eq p6, p0 = sh1, r0 // is the src aligned? +(p6) br.cond.sptk .src_aligned ;; + ld8 r[1] = [asrc],8 ;; + + .align 32 +.l2: + ld8.s r[0] = [asrc], 8 + shr.u value = r[1], sh1 ;; // value = w0 >> sh1 + czx1.r pos = value ;; // do we have an "early" zero + cmp.lt p7, p0 = pos, thresh // in w0 >> sh1? +(p7) br.cond.dpnt .found0 + chk.s r[0], .recovery2 // it is safe to do that only +.back2: // after the previous test + shl tmp = r[0], sh2 // tmp = w1 << sh2 + ;; + or value = value, tmp ;; // value |= tmp + czx1.r pos = value ;; + cmp.ne p7, p0 = 8, pos +(p7) br.cond.dpnt .found0 + st8 [dest] = value, 8 // store val to dest + br.ctop.dptk .l2 ;; +.src_aligned: +.l3: +(p[0]) ld8.s r[0] = [src], 8 +(p[MEMLAT]) chk.s r[MEMLAT], .recovery3 +.back3: +(p[MEMLAT]) mov value = r[MEMLAT] +(p[MEMLAT]) czx1.r pos = r[MEMLAT] ;; +(p[MEMLAT]) cmp.ne p7, p0 = 8, pos +(p7) br.cond.dpnt .found0 +(p[MEMLAT]) st8 [dest] = r[MEMLAT], 8 + br.ctop.dptk .l3 ;; +.found0: + mov ar.lc = pos +.l4: + extr.u c = value, 0, 8 // c = value & 0xff + shr.u value = value, 8 + ;; + st1 [dest] = c, 1 + br.cloop.dptk .l4 ;; +.restore_and_exit: + mov ar.lc = saved_lc // restore the loop counter + mov pr = saved_pr, -1 // restore the predicate registers + br.ret.sptk.many b0 +.recovery2: + add tmp = -8, asrc ;; + ld8 r[0] = [tmp] + br.cond.sptk .back2 +.recovery3: + add tmp = -(MEMLAT + 1) * 8, src ;; + ld8 r[MEMLAT] = [tmp] + br.cond.sptk .back3 +END(strcpy) +libc_hidden_builtin_def (strcpy) diff --git a/sysdeps/ia64/strlen.S b/sysdeps/ia64/strlen.S new file mode 100644 index 0000000000..518d86b0d2 --- /dev/null +++ b/sysdeps/ia64/strlen.S @@ -0,0 +1,98 @@ +/* Optimized version of the standard strlen() function. + This file is part of the GNU C Library. + Copyright (C) 2000, 2001, 2003, 2005 Free Software Foundation, Inc. + Contributed by Dan Pop . + + 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. */ + +/* Return: the length of the input string + + Input: + in0: str + + Look for the null character byte by byte, until we reach a word aligned + address, then search word by word, using the czx instruction. We're + also doing one word of read ahead, which could cause problems if the + null character is on the last word of a page and the next page is not + mapped in the process address space. Hence the use of the speculative + load. + + This implementation assumes little endian mode. For big endian mode, + the instruction czx1.r should be replaced by czx1.l. */ + +#include +#undef ret + +#define saved_lc r18 +#define str r19 +#define pos0 r20 +#define val1 r21 +#define val2 r22 +#define origadd r23 +#define tmp r24 +#define loopcnt r30 +#define len ret0 + +ENTRY(strlen) + .prologue + alloc r2 = ar.pfs, 1, 0, 0, 0 + .save ar.lc, saved_lc + mov saved_lc = ar.lc // save the loop counter + .body + mov str = in0 + mov len = r0 // len = 0 + and tmp = 7, in0 // tmp = str % 8 + ;; + sub loopcnt = 8, tmp // loopcnt = 8 - tmp + cmp.eq p6, p0 = tmp, r0 +(p6) br.cond.sptk .str_aligned;; + adds loopcnt = -1, loopcnt;; + mov ar.lc = loopcnt +.l1: + ld1 val2 = [str], 1 + ;; + cmp.eq p6, p0 = val2, r0 +(p6) br.cond.spnt .restore_and_exit + adds len = 1, len + br.cloop.dptk .l1 +.str_aligned: + mov origadd = str // origadd = orig + ld8 val1 = [str], 8;; + nop.b 0 + nop.b 0 +.l2: ld8.s val2 = [str], 8 // don't bomb out here + czx1.r pos0 = val1 + ;; + cmp.ne p6, p0 = 8, pos0 +(p6) br.cond.spnt .foundit + chk.s val2, .recovery +.back: + mov val1 = val2 + br.cond.dptk .l2 +.foundit: + sub tmp = str, origadd // tmp = crt address - orig + add len = len, pos0;; + add len = len, tmp;; + adds len = -16, len +.restore_and_exit: + mov ar.lc = saved_lc // restore the loop counter + br.ret.sptk.many b0 +.recovery: + adds str = -8, str;; + ld8 val2 = [str], 8 // bomb out here + br.cond.sptk .back +END(strlen) +libc_hidden_builtin_def (strlen) diff --git a/sysdeps/ia64/strncmp.S b/sysdeps/ia64/strncmp.S new file mode 100644 index 0000000000..743121d88d --- /dev/null +++ b/sysdeps/ia64/strncmp.S @@ -0,0 +1,62 @@ +/* Optimized version of the standard strncmp() function. + This file is part of the GNU C Library. + Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. + Contributed by Dan Pop . + + 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. */ + +/* Return: the result of the comparison + + Inputs: + in0: s1 + in1: s2 + in2: n + + Unlike memcmp(), this function is optimized for mismatches within the + first few characters. */ + +#include +#undef ret + +#define s1 in0 +#define s2 in1 +#define n in2 + +#define val1 r15 +#define val2 r16 + + +ENTRY(strncmp) + alloc r2 = ar.pfs, 3, 0, 0, 0 + mov ret0 = r0 + cmp.eq p6, p0 = r0, r0 // set p6 + cmp.eq p7, p0 = n, r0 // return immediately if n == 0 +(p7) br.cond.spnt .restore_and_exit ;; +.loop: + ld1 val1 = [s1], 1 + ld1 val2 = [s2], 1 + adds n = -1, n // n-- + ;; + cmp.ne.and p6, p0 = val1, r0 + cmp.ne.and p6, p0 = val2, r0 + cmp.ne.and p6, p0 = n, r0 + cmp.eq.and p6, p0 = val1, val2 +(p6) br.cond.sptk .loop + sub ret0 = val1, val2 +.restore_and_exit: + br.ret.sptk.many b0 +END(strncmp) +libc_hidden_builtin_def (strncmp) diff --git a/sysdeps/ia64/strncpy.S b/sysdeps/ia64/strncpy.S new file mode 100644 index 0000000000..6706ab711b --- /dev/null +++ b/sysdeps/ia64/strncpy.S @@ -0,0 +1,232 @@ +/* Optimized version of the standard strncpy() function. + This file is part of the GNU C Library. + Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + Contributed by Dan Pop + and Jakub Jelinek . + + 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. */ + +/* Return: dest + + Inputs: + in0: dest + in1: src + in2: len + + In this form, it assumes little endian mode. + */ + +#include +#undef ret + +#define saved_lc r15 +#define saved_pr r16 +#define thresh r17 +#define dest r18 +#define dest2 r19 +#define src r20 +#define len r21 +#define asrc r22 +#define tmp r23 +#define pos r24 +#define w0 r25 +#define w1 r26 +#define c r27 +#define sh2 r28 +#define sh1 r29 +#define loopcnt r30 +#define value r31 + +ENTRY(strncpy) + .prologue + alloc r2 = ar.pfs, 3, 0, 29, 32 + +#define MEMLAT 2 + .rotr r[MEMLAT + 2] + .rotp p[MEMLAT + 1] + + mov ret0 = in0 // return value = dest + .save pr, saved_pr + mov saved_pr = pr // save the predicate registers + .save ar.lc, saved_lc + mov saved_lc = ar.lc // save the loop counter + mov ar.ec = 0 // ec is not guaranteed to + // be zero upon function entry + .body + cmp.geu p6, p5 = 24, in2 +(p6) br.cond.spnt .short_len + sub tmp = r0, in0 ;; // tmp = -dest + mov len = in2 // len + mov dest = in0 // dest + mov src = in1 // src + and tmp = 7, tmp ;; // loopcnt = -dest % 8 + cmp.eq p6, p7 = tmp, r0 + adds loopcnt = -1, tmp // --loopcnt +(p6) br.cond.sptk .dest_aligned ;; + sub len = len, tmp // len -= -dest % 8 + mov ar.lc = loopcnt +.l1: // copy -dest % 8 bytes +(p5) ld1 c = [src], 1 // c = *src++ + ;; + st1 [dest] = c, 1 // *dest++ = c + cmp.ne p5, p7 = c, r0 + br.cloop.dptk .l1 ;; +(p7) br.cond.dpnt .found0_align + +.dest_aligned: // p7 should be cleared here + shr.u c = len, 3 // c = len / 8 + and sh1 = 7, src // sh1 = src % 8 + and asrc = -8, src ;; // asrc = src & -OPSIZ -- align src + adds c = (MEMLAT-1), c // c = (len / 8) + MEMLAT - 1 + sub thresh = 8, sh1 + mov pr.rot = 1 << 16 // set rotating predicates + shl sh1 = sh1, 3 ;; // sh1 = 8 * (src % 8) + mov ar.lc = c // "infinite" loop + sub sh2 = 64, sh1 // sh2 = 64 - sh1 + cmp.eq p6, p0 = sh1, r0 // is the src aligned? +(p6) br.cond.sptk .src_aligned + adds c = -(MEMLAT-1), c ;; // c = (len / 8) + ld8 r[1] = [asrc],8 + mov ar.lc = c ;; + + .align 32 +.l2: +(p6) st8 [dest] = value, 8 // store val to dest + ld8.s r[0] = [asrc], 8 + shr.u value = r[1], sh1 ;; // value = w0 >> sh1 + czx1.r pos = value ;; // do we have an "early" zero + cmp.lt p7, p0 = pos, thresh // in w0 >> sh1? + adds len = -8, len // len -= 8 +(p7) br.cond.dpnt .nonalign_found0 + chk.s r[0], .recovery2 // it is safe to do that only +.back2: // after the previous test + shl tmp = r[0], sh2 // tmp = w1 << sh2 + ;; + or value = value, tmp ;; // value |= tmp + czx1.r pos = value ;; + cmp.ne p7, p6 = 8, pos +(p7) br.cond.dpnt .nonalign_found0 + br.ctop.dptk .l2 ;; + adds len = 8, len + br.cond.sptk .not_found0 ;; +.nonalign_found0: + cmp.gtu p6, p0 = -8, len +(p6) br.cond.dptk .found0 + adds len = 8, len + br.cond.sptk .not_found0 ;; + + .align 32 +.src_aligned: +.l3: +(p[0]) ld8.s r[0] = [src], 8 +(p[MEMLAT]) chk.s r[MEMLAT], .recovery3 +.back3: +(p[MEMLAT]) mov value = r[MEMLAT] +(p[MEMLAT]) czx1.r pos = r[MEMLAT] ;; +(p[MEMLAT]) cmp.ne p7, p0 = 8, pos +(p[MEMLAT]) adds len = -8, len // len -= 8 +(p7) br.cond.dpnt .found0 +(p[MEMLAT]) st8 [dest] = r[MEMLAT], 8 + br.ctop.dptk .l3 ;; + + chk.s r[MEMLAT-1], .recovery4 +.back4: + mov value = r[MEMLAT-1] + +.not_found0: + cmp.eq p5, p6 = len, r0 + adds len = -1, len +(p5) br.cond.dptk .restore_and_exit ;; + mov ar.lc = len +.l4: +(p6) extr.u c = value, 0, 8 // c = value & 0xff +(p6) shr.u value = value, 8 ;; + st1 [dest] = c, 1 + cmp.ne p6, p0 = c, r0 + br.cloop.dptk .l4 + br.cond.sptk .restore_and_exit + +.found0_align: + mov pos = 0 + adds len = -8, len + mov value = 0 ;; +.found0: + shl tmp = pos, 3 + shr.u loopcnt = len, 4 // loopcnt = len / 16 + mov c = -1 ;; + cmp.eq p6, p0 = loopcnt, r0 + adds loopcnt = -1, loopcnt + shl c = c, tmp ;; + and len = 0xf, len + andcm value = value, c + mov ar.lc = loopcnt ;; + cmp.le p7, p0 = 8, len + adds dest2 = 16, dest + st8 [dest] = value, 8 + and len = 0x7, len +(p6) br.cond.dpnt .l6 ;; +.l5: + st8 [dest] = r0, 16 + st8 [dest2] = r0, 16 + br.cloop.dptk .l5 ;; +.l6: +(p7) st8 [dest] = r0, 8 + cmp.eq p5, p0 = len, r0 + adds len = -1, len +(p5) br.cond.dptk .restore_and_exit ;; + mov ar.lc = len ;; +.l7: + st1 [dest] = r0, 1 + br.cloop.dptk .l7 ;; +.restore_and_exit: + mov ar.lc = saved_lc // restore the loop counter + mov pr = saved_pr, -1 // restore the predicate registers + br.ret.sptk.many b0 + +.short_len: + cmp.eq p5, p0 = in2, r0 + adds loopcnt = -1, in2 +(p5) br.cond.spnt .restore_and_exit ;; + mov ar.lc = loopcnt // p6 should be set when we get here +.l8: +(p6) ld1 c = [in1], 1 // c = *src++ + ;; + st1 [in0] = c, 1 // *dest++ = c +(p6) cmp.ne p6, p0 = c, r0 + br.cloop.dptk .l8 + ;; + mov ar.lc = saved_lc // restore the loop counter + mov pr = saved_pr, -1 // restore the predicate registers + br.ret.sptk.many b0 +.recovery2: + add c = 8, len + add tmp = -8, asrc ;; + cmp.gtu p8, p5 = c, thresh ;; +(p8) ld8 r[0] = [tmp] +(p5) mov r[0] = r0 + br.cond.sptk .back2 +.recovery3: + add tmp = -(MEMLAT + 1) * 8, src ;; + ld8 r[MEMLAT] = [tmp] + br.cond.sptk .back3 +.recovery4: + cmp.eq p5, p6 = len, r0 + add tmp = -MEMLAT * 8, src ;; +(p6) ld8 r[MEMLAT - 1] = [tmp] +(p5) mov r[MEMLAT - 1] = r0 + br.cond.sptk .back4 +END(strncpy) +libc_hidden_builtin_def (strncpy) diff --git a/sysdeps/ia64/sysdep.h b/sysdeps/ia64/sysdep.h new file mode 100644 index 0000000000..83d30a49bf --- /dev/null +++ b/sysdeps/ia64/sysdep.h @@ -0,0 +1,63 @@ +/* Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Mosberger-Tang + + 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. */ + +#include + +#ifdef __ASSEMBLER__ + +/* Macros to help writing .prologue directives in assembly code. */ +#define ASM_UNW_PRLG_RP 0x8 +#define ASM_UNW_PRLG_PFS 0x4 +#define ASM_UNW_PRLG_PSP 0x2 +#define ASM_UNW_PRLG_PR 0x1 +#define ASM_UNW_PRLG_GRSAVE(ninputs) (32+(ninputs)) + +#define ENTRY(name) \ + .text; \ + .align 32; \ + .proc C_SYMBOL_NAME(name); \ + .global C_SYMBOL_NAME(name); \ + C_LABEL(name) \ + CALL_MCOUNT + +#define LOCAL_ENTRY(name) \ + .text; \ + .align 32; \ + .proc C_SYMBOL_NAME(name); \ + C_LABEL(name) \ + CALL_MCOUNT + +#define LEAF(name) \ + .text; \ + .align 32; \ + .proc C_SYMBOL_NAME(name); \ + .global name; \ + C_LABEL(name) + +#define LOCAL_LEAF(name) \ + .text; \ + .align 32; \ + .proc C_SYMBOL_NAME(name); \ + C_LABEL(name) + +/* Mark the end of function SYM. */ +#undef END +#define END(sym) .endp C_SYMBOL_NAME(sym) + +#endif /* ASSEMBLER */ diff --git a/sysdeps/unix/sysv/linux/ia64/Implies b/sysdeps/unix/sysv/linux/ia64/Implies new file mode 100644 index 0000000000..8d91c80097 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/Implies @@ -0,0 +1 @@ +unix/sysv/linux/wordsize-64 diff --git a/sysdeps/unix/sysv/linux/ia64/Makefile b/sysdeps/unix/sysv/linux/ia64/Makefile new file mode 100644 index 0000000000..d9a35a7c67 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/Makefile @@ -0,0 +1,27 @@ +ifeq ($(subdir),misc) +sysdep_headers += sys/rse.h +endif + +ifeq ($(subdir),stdlib) +sysdep_routines += __start_context +gen-as-const-headers += sigcontext-offsets.sym +endif + +ifeq ($(subdir),misc) +sysdep_headers += sys/io.h +sysdep_routines += ioperm clone2 +endif + +ifeq ($(subdir),elf) +sysdep-dl-routines += dl-static +sysdep_routines += $(sysdep-dl-routines) +sysdep-rtld-routines += $(sysdep-dl-routines) +endif + +ifeq ($(subdir),rt) +librt-routines += rt-sysdep +endif + +# This is a crude attempt to silence the compiler which complains about +# then 'current' definition in the kernel headers. +CPPFLAGS += -D_ASM_IA64_CURRENT_H diff --git a/sysdeps/unix/sysv/linux/ia64/Versions b/sysdeps/unix/sysv/linux/ia64/Versions new file mode 100644 index 0000000000..13d710a078 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/Versions @@ -0,0 +1,25 @@ +ld { + GLIBC_PRIVATE { + _dl_var_init; + } +} +libc { + GLIBC_2.2 { + ioperm; iopl; + inb; inw; inl; + _inb; _inw; _inl; + outb; outw; _outl; + _outb; _outw; _outl; + pciconfig_read; pciconfig_write; + + # linuxthreads + __clone2; + } + GLIBC_2.2.2 { + # w* + wordexp; + } + GLIBC_2.2.6 { + getunwind; + } +} diff --git a/sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S b/sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S new file mode 100644 index 0000000000..fa87f67ebc --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S @@ -0,0 +1,42 @@ +/* Copyright (C) 2009 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. */ + + .section .rodata.str1.8,"aMS",@progbits,1 + .align 8 +.LC0: + .string "longjmp causes uninitialized stack frame" + + .section .sdata,"aws",@progbits + .align 8 + .type longjmp_msg,@object +longjmp_msg: + data8 .LC0 + .size longjmp_msg, .-longjmp_msg + +#define __longjmp ____longjmp_chk + +#define CHECK_RSP(reg) \ + cmp.ltu p0, p8 = reg, r12; \ +(p8) br.cond.dpnt .Lok;; \ + addl r28 = @ltoffx(longjmp_msg#), r1;; \ + ld8.mov r28 = [r28], longjmp_msg#;; \ + ld8 out0 = [r28]; \ + br.call.sptk.many b0 = HIDDEN_JUMPTARGET(__fortify_fail)#;; \ +.Lok: + +#include "__longjmp.S" diff --git a/sysdeps/unix/sysv/linux/ia64/__longjmp.S b/sysdeps/unix/sysv/linux/ia64/__longjmp.S new file mode 100644 index 0000000000..2e74904385 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/__longjmp.S @@ -0,0 +1,171 @@ +/* Copyright (C) 1999, 2000, 2001, 2005 Free Software Foundation, Inc. + Contributed by David Mosberger-Tang . + + 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. + + Note that __sigsetjmp() did NOT flush the register stack. Instead, + we do it here since __longjmp() is usually much less frequently + invoked than __sigsetjmp(). The only difficulty is that __sigsetjmp() + didn't (and wouldn't be able to) save ar.rnat either. This is a problem + because if we're not careful, we could end up loading random NaT bits. + There are two cases: + + (i) ar.bsp < ia64_rse_rnat_addr(jmpbuf.ar_bsp) + ar.rnat contains the desired bits---preserve ar.rnat + across loadrs and write to ar.bspstore + + (ii) ar.bsp >= ia64_rse_rnat_addr(jmpbuf.ar_bsp) + The desired ar.rnat is stored in + ia64_rse_rnat_addr(jmpbuf.ar_bsp). Load those + bits into ar.rnat after setting ar.bspstore. */ + +#include +#include + +# define pPos p6 /* is rotate count positive? */ +# define pNeg p7 /* is rotate count negative? */ + + + /* __longjmp(__jmp_buf buf, int val) */ + +LEAF(__longjmp) +#ifdef CHECK_RSP + alloc r8=ar.pfs,2,1,1,0 +#else + alloc r8=ar.pfs,2,1,0,0 +#endif + mov r27=ar.rsc + add r2=0x98,in0 // r2 <- &jmpbuf.orig_jmp_buf_addr + ;; + ld8 r8=[r2],-16 // r8 <- orig_jmp_buf_addr + mov r10=ar.bsp + and r11=~0x3,r27 // clear ar.rsc.mode + ;; + flushrs // flush dirty regs to backing store (must be first in insn grp) + ld8 r23=[r2],8 // r23 <- jmpbuf.ar_bsp + sub r8=r8,in0 // r8 <- &orig_jmpbuf - &jmpbuf + ;; + ld8 r25=[r2] // r25 <- jmpbuf.ar_unat + extr.u r8=r8,3,6 // r8 <- (&orig_jmpbuf - &jmpbuf)/8 & 0x3f + ;; + cmp.lt pNeg,pPos=r8,r0 + mov r2=in0 + ;; +(pPos) mov r16=r8 +(pNeg) add r16=64,r8 +(pPos) sub r17=64,r8 +(pNeg) sub r17=r0,r8 + ;; + mov ar.rsc=r11 // put RSE in enforced lazy mode + shr.u r8=r25,r16 + add r3=8,in0 // r3 <- &jmpbuf.r1 + shl r9=r25,r17 + ;; + ld8.fill.nta r28=[r2],16 // r28 <- jmpbuf.sp + or r25=r8,r9 + ;; + mov r26=ar.rnat + mov ar.unat=r25 // setup ar.unat (NaT bits for r1, r4-r7, and r12) + ;; +#ifdef CHECK_RSP + CHECK_RSP (r28) +#endif + ld8.fill.nta gp=[r3],16 // r1 (gp) + dep r11=-1,r23,3,6 // r11 <- ia64_rse_rnat_addr(jmpbuf.ar_bsp) + mov sp=r28 // r12 (sp) + ;; + ld8.nta r16=[r2],16 // caller's unat + ld8.nta r17=[r3],16 // fpsr + ;; + ld8.fill.nta r4=[r2],16 // r4 + ld8.fill.nta r5=[r3],16 // r5 (gp) + cmp.geu p8,p0=r10,r11 // p8 <- (ar.bsp >= jmpbuf.ar_bsp) + ;; + ld8.fill.nta r6=[r2],16 // r6 + ld8.fill.nta r7=[r3],16 // r7 + ;; + mov ar.unat=r16 // restore caller's unat + mov ar.fpsr=r17 // restore fpsr + ;; + ld8.nta r16=[r2],16 // b0 + ld8.nta r17=[r3],16 // b1 + ;; +(p8) ld8 r26=[r11] // r26 <- *ia64_rse_rnat_addr(jmpbuf.ar_bsp) + mov ar.bspstore=r23 // restore ar.bspstore + ;; + ld8.nta r18=[r2],16 // b2 + ld8.nta r19=[r3],16 // b3 + ;; +#ifdef PTR_DEMANGLE + PTR_DEMANGLE (r16, r24) +#endif + ld8.nta r20=[r2],16 // b4 + ld8.nta r21=[r3],16 // b5 + ;; + ld8.nta r11=[r2],16 // ar.pfs + ld8.nta r22=[r3],56 // ar.lc + ;; + ld8.nta r24=[r2],32 // pr + mov b0=r16 + ;; + ldf.fill.nta f2=[r2],32 + ldf.fill.nta f3=[r3],32 + mov b1=r17 + ;; + ldf.fill.nta f4=[r2],32 + ldf.fill.nta f5=[r3],32 + mov b2=r18 + ;; + ldf.fill.nta f16=[r2],32 + ldf.fill.nta f17=[r3],32 + mov b3=r19 + ;; + ldf.fill.nta f18=[r2],32 + ldf.fill.nta f19=[r3],32 + mov b4=r20 + ;; + ldf.fill.nta f20=[r2],32 + ldf.fill.nta f21=[r3],32 + mov b5=r21 + ;; + ldf.fill.nta f22=[r2],32 + ldf.fill.nta f23=[r3],32 + mov ar.lc=r22 + ;; + ldf.fill.nta f24=[r2],32 + ldf.fill.nta f25=[r3],32 + cmp.eq p8,p9=0,in1 + ;; + ldf.fill.nta f26=[r2],32 + ldf.fill.nta f27=[r3],32 + mov ar.pfs=r11 + ;; + ldf.fill.nta f28=[r2],32 + ldf.fill.nta f29=[r3],32 + ;; + ldf.fill.nta f30=[r2] + ldf.fill.nta f31=[r3] +(p8) mov r8=1 + + mov ar.rnat=r26 // restore ar.rnat + ;; + mov ar.rsc=r27 // restore ar.rsc +(p9) mov r8=in1 + + invala // virt. -> phys. regnum mapping may change + mov pr=r24,-1 + ret +END(__longjmp) diff --git a/sysdeps/unix/sysv/linux/ia64/__start_context.S b/sysdeps/unix/sysv/linux/ia64/__start_context.S new file mode 100644 index 0000000000..519bd252b1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/__start_context.S @@ -0,0 +1,52 @@ +/* Copyright (C) 2001, 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Mosberger-Tang . + + 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. */ + +#include +#include + +/* When a context set up by __makecontext() is activated, control + transfers to __start_context. When we get here: + + b1 = entry point of function to call + in0 = address of UCP to resume after function returns + in1 = global pointer for __start_context + out0 .. outN = arguments for function */ + +ENTRY(__start_context) + .prologue + alloc r2 = ar.pfs, 2, 0, 8, 0 + + .save rp, r4 // terminate call chain with a NULL rp + mov r4 = r0 + ;; + + .body + br.call.sptk rp = b1 +1: + mov gp = in1 // restore gp + cmp.ne p6,p0 = in0, r0 // uc_link != 0 ? + ;; +(p6) mov out0 = in0 +(p6) br.call.sptk rp = __setcontext +.Lexit: + mov out0 = 0 + br.call.sptk rp = HIDDEN_JUMPTARGET(exit) + +1: br.cond.sptk .Lexit +END(__start_context) diff --git a/sysdeps/unix/sysv/linux/ia64/bits/endian.h b/sysdeps/unix/sysv/linux/ia64/bits/endian.h new file mode 100644 index 0000000000..98a5e23991 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/bits/endian.h @@ -0,0 +1,7 @@ +/* Linux/ia64 is little-endian. */ + +#ifndef _ENDIAN_H +# error "Never use directly; include instead." +#endif + +#define __BYTE_ORDER __LITTLE_ENDIAN diff --git a/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h b/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h new file mode 100644 index 0000000000..72f4b6ceab --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h @@ -0,0 +1,320 @@ +/* O_*, F_*, FD_* bit values for Linux/IA64. + Copyright (C) 1999, 2000, 2004, 2006, 2007, 2009, 2010, 2011 + 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 _FCNTL_H +# error "Never use directly; include instead." +#endif + + +#include +#ifdef __USE_GNU +# include +#endif + +/* open/fcntl - O_SYNC is only implemented on blocks devices and on files + located on a few file systems. */ +#define O_ACCMODE 0003 +#define O_RDONLY 00 +#define O_WRONLY 01 +#define O_RDWR 02 +#define O_CREAT 0100 /* not fcntl */ +#define O_EXCL 0200 /* not fcntl */ +#define O_NOCTTY 0400 /* not fcntl */ +#define O_TRUNC 01000 /* not fcntl */ +#define O_APPEND 02000 +#define O_NONBLOCK 04000 +#define O_NDELAY O_NONBLOCK +#define O_SYNC 04010000 +#define O_FSYNC O_SYNC +#define O_ASYNC 020000 + +#ifdef __USE_XOPEN2K8 +# define O_DIRECTORY 0200000 /* must be a directory */ +# define O_NOFOLLOW 0400000 /* don't follow links */ +# define O_CLOEXEC 02000000 /* Set close_on_exec. */ +#endif +#ifdef __USE_GNU +# define O_DIRECT 040000 +# define O_NOATIME 01000000 /* Do not set atime. */ +# define O_PATH 010000000 /* Resolve pathname but do not open file. */ +#endif + +#ifdef __USE_LARGEFILE64 +/* Not necessary, files are always with 64bit off_t. */ +# define O_LARGEFILE 0 +#endif + +/* For now Linux has synchronisity options for data and read operations. + We define the symbols here but let them do the same as O_SYNC since + this is a superset. */ +#if defined __USE_POSIX199309 || defined __USE_UNIX98 +# define O_DSYNC 010000 /* Synchronize data. */ +# define O_RSYNC O_SYNC /* Synchronize read operations. */ +#endif + +/* Values for the second argument to `fcntl'. */ +#define F_DUPFD 0 /* Duplicate file descriptor. */ +#define F_GETFD 1 /* Get file descriptor flags. */ +#define F_SETFD 2 /* Set file descriptor flags. */ +#define F_GETFL 3 /* Get file status flags. */ +#define F_SETFL 4 /* Set file status flags. */ +#define F_GETLK 5 /* Get record locking info. */ +#define F_SETLK 6 /* Set record locking info (non-blocking). */ +#define F_SETLKW 7 /* Set record locking info (blocking). */ + +/* Not necessary, we always have 64-bit offsets. */ +#define F_GETLK64 5 /* Get record locking info. */ +#define F_SETLK64 6 /* Set record locking info (non-blocking). */ +#define F_SETLKW64 7 /* Set record locking info (blocking). */ + +#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K8 +# define F_SETOWN 8 /* Get owner (process receiving SIGIO). */ +# define F_GETOWN 9 /* Set owner (process receiving SIGIO). */ +#endif + +#ifdef __USE_GNU +# define F_SETSIG 10 /* Set number of signal to be sent. */ +# define F_GETSIG 11 /* Get number of signal to be sent. */ +# define F_SETOWN_EX 15 /* Get owner (thread receiving SIGIO). */ +# define F_GETOWN_EX 16 /* Set owner (thread receiving SIGIO). */ +#endif + +#ifdef __USE_GNU +# 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_SETPIPE_SZ 1031 /* Set pipe page size array. */ +# define F_GETPIPE_SZ 1032 /* Set pipe page size array. */ +#endif +#ifdef __USE_XOPEN2K8 +# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with + close-on-exit set. */ +#endif + +/* 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(). */ +#define F_RDLCK 0 /* Read lock. */ +#define F_WRLCK 1 /* Write lock. */ +#define F_UNLCK 2 /* Remove lock. */ + +/* for old implementation of bsd flock () */ +#define F_EXLCK 4 /* or 3 */ +#define F_SHLCK 8 /* or 4 */ + +#ifdef __USE_BSD +/* Operations for bsd flock(), also used by the kernel implementation */ +# define LOCK_SH 1 /* shared lock */ +# define LOCK_EX 2 /* exclusive lock */ +# define LOCK_NB 4 /* or'd with one of the above to prevent + blocking */ +# define LOCK_UN 8 /* remove lock */ +#endif + +#ifdef __USE_GNU +# define LOCK_MAND 32 /* This is a mandatory flock: */ +# define LOCK_READ 64 /* ... which allows concurrent read operations. */ +# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */ +# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */ +#endif + + +#ifdef __USE_GNU +/* Types of directory notifications that may be requested with F_NOTIFY. */ +# define DN_ACCESS 0x00000001 /* File accessed. */ +# define DN_MODIFY 0x00000002 /* File modified. */ +# define DN_CREATE 0x00000004 /* File created. */ +# define DN_DELETE 0x00000008 /* File removed. */ +# define DN_RENAME 0x00000010 /* File renamed. */ +# define DN_ATTRIB 0x00000020 /* File changed attibutes. */ +# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */ +#endif + +/* We don't need to support __USE_FILE_OFFSET64. */ +struct flock + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ + __off_t l_start; /* Offset where the lock begins. */ + __off_t l_len; /* Size of the locked area; zero means until EOF. */ + __pid_t l_pid; /* Process holding the lock. */ + }; + +#ifdef __USE_LARGEFILE64 +struct flock64 + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ + __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. */ + }; +#endif + +#ifdef __USE_GNU +/* Owner types. */ +enum __pid_type + { + F_OWNER_TID = 0, /* Kernel thread. */ + F_OWNER_PID, /* Process. */ + F_OWNER_PGRP, /* Process group. */ + F_OWNER_GID = F_OWNER_PGRP /* Alternative, obsolete name. */ + }; + +/* Structure to use with F_GETOWN_EX and F_SETOWN_EX. */ +struct f_owner_ex + { + enum __pid_type type; /* Owner type of ID. */ + __pid_t pid; /* ID of owner. */ + }; +#endif + + +/* Define some more compatibility macros to be backward compatible with + BSD systems which did not managed to hide these kernel macros. */ +#ifdef __USE_BSD +# define FAPPEND O_APPEND +# define FFSYNC O_FSYNC +# define FASYNC O_ASYNC +# define FNONBLOCK O_NONBLOCK +# define FNDELAY O_NDELAY +#endif /* Use BSD. */ + +/* Advise to `posix_fadvise'. */ +#ifdef __USE_XOPEN2K +# define POSIX_FADV_NORMAL 0 /* No further special treatment. */ +# define POSIX_FADV_RANDOM 1 /* Expect random page references. */ +# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */ +# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */ +# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ +#endif + + +#ifdef __USE_GNU +/* 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. */ +# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those + dirty pages in the range which are + not presently under writeback. */ +# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in + the range after performing the + write. */ + +/* 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. */ + + +/* File handle structure. */ +struct file_handle +{ + unsigned int handle_bytes; + int handle_type; + /* File identifier. */ + unsigned char f_handle[0]; +}; + +/* Maximum handle size (for now). */ +# define MAX_HANDLE_SZ 128 +#endif + +__BEGIN_DECLS + +#ifdef __USE_GNU + +/* Provide kernel hint to read ahead. */ +extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count) + __THROW; + + +/* Selective file content synch'ing. + + This function is a possible cancellation point and therefore not + marked with __THROW. */ +extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count, + unsigned int __flags); + + +/* Splice address range into a pipe. + + This function is a possible cancellation point and therefore not + marked with __THROW. */ +extern ssize_t vmsplice (int __fdout, const struct iovec *__iov, + size_t __count, unsigned int __flags); + +/* Splice two files together. + + This function is a possible cancellation point and therefore not + marked with __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. + + This function is a possible cancellation point and therefore not + marked with __THROW. */ +extern ssize_t tee (int __fdin, int __fdout, size_t __len, + unsigned int __flags); + +/* Reserve storage for the data of the file associated with FD. + + This function is a possible cancellation point and therefore not + marked with __THROW. */ +# ifndef __USE_FILE_OFFSET64 +extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len); +# else +# ifdef __REDIRECT +extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset, + __off64_t __len), + fallocate64); +# else +# define fallocate fallocate64 +# endif +# endif +# ifdef __USE_LARGEFILE64 +extern int fallocate64 (int __fd, int __mode, __off64_t __offset, + __off64_t __len); +# endif + + +/* Map file name to file handle. */ +extern int name_to_handle_at (int __dfd, const char *__name, + struct file_handle *__handle, int *__mnt_id, + int __flags) __THROW; + +/* Open file using the file handle. + + This function is a possible cancellation point and therefore not + marked with __THROW. */ +extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle, + int __flags); + +#endif + +__END_DECLS diff --git a/sysdeps/unix/sysv/linux/ia64/bits/ipc.h b/sysdeps/unix/sysv/linux/ia64/bits/ipc.h new file mode 100644 index 0000000000..858c332f1e --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/bits/ipc.h @@ -0,0 +1,54 @@ +/* Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Mosberger-Tang + + 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 _SYS_IPC_H +# error "Never use directly; include instead." +#endif + +#include + +/* Mode bits for `msgget', `semget', and `shmget'. */ +#define IPC_CREAT 01000 /* Create key if key does not exist. */ +#define IPC_EXCL 02000 /* Fail if key exists. */ +#define IPC_NOWAIT 04000 /* Return error on wait. */ + +/* Control commands for `msgctl', `semctl', and `shmctl'. */ +#define IPC_RMID 0 /* Remove identifier. */ +#define IPC_SET 1 /* Set `ipc_perm' options. */ +#define IPC_STAT 2 /* Get `ipc_perm' options. */ +#define IPC_INFO 3 /* See ipcs. */ + +/* Special key values. */ +#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ + + +/* Data structure used to pass permission information to IPC operations. */ +struct ipc_perm + { + __key_t __key; /* Key. */ + __uid_t uid; /* Owner's user ID. */ + __gid_t gid; /* Owner's group ID. */ + __uid_t cuid; /* Creator's user ID. */ + __gid_t cgid; /* Creator's group ID. */ + __mode_t mode; /* Read/write permission. */ + unsigned short int __seq; /* Sequence number. */ + unsigned short int __pad1; + unsigned long int __unused1; + unsigned long int __unused2; + }; diff --git a/sysdeps/unix/sysv/linux/ia64/bits/mman.h b/sysdeps/unix/sysv/linux/ia64/bits/mman.h new file mode 100644 index 0000000000..8b1398907f --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/bits/mman.h @@ -0,0 +1,110 @@ +/* Definitions for POSIX memory map interface. Linux/ia64 version. + Copyright (C) 1997,1998,2000,2003,2005,2006,2009,2011 + 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 _SYS_MMAN_H +# error "Never use directly; include instead." +#endif + +/* The following definitions basically come from the kernel headers. + But the kernel header is not namespace clean. */ + + +/* Protections are chosen from these bits, OR'd together. The + implementation does not necessarily support PROT_EXEC or PROT_WRITE + without PROT_READ. The only guarantees are that no writing will be + allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ + +#define PROT_READ 0x1 /* Page can be read. */ +#define PROT_WRITE 0x2 /* Page can be written. */ +#define PROT_EXEC 0x4 /* Page can be executed. */ +#define PROT_NONE 0x0 /* Page can not be accessed. */ +#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of + growsdown vma (mprotect only). */ +#define PROT_GROWSUP 0x02000000 /* Extend change to start of + growsup vma (mprotect only). */ + +/* Sharing types (must choose one and only one of these). */ +#define MAP_SHARED 0x01 /* Share changes. */ +#define MAP_PRIVATE 0x02 /* Changes are private. */ +#ifdef __USE_MISC +# define MAP_TYPE 0x0f /* Mask for type of mapping. */ +#endif + +/* Other flags. */ +#define MAP_FIXED 0x10 /* Interpret addr exactly. */ +#ifdef __USE_MISC +# define MAP_FILE 0 +# define MAP_ANONYMOUS 0x20 /* Don't use a file. */ +# define MAP_ANON MAP_ANONYMOUS +#endif + +/* These are Linux-specific. */ +#ifdef __USE_MISC +# define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */ +# define MAP_GROWSUP 0x00200 /* Register stack-like segment */ +# define MAP_DENYWRITE 0x00800 /* ETXTBSY */ +# define MAP_EXECUTABLE 0x01000 /* Mark it as an executable. */ +# define MAP_LOCKED 0x02000 /* Lock the mapping. */ +# define MAP_NORESERVE 0x04000 /* Don't check for reservations. */ +# define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */ +# define MAP_NONBLOCK 0x10000 /* Do not block on IO. */ +#endif + +/* Flags to `msync'. */ +#define MS_ASYNC 0x1 /* Sync memory asynchronously. */ +#define MS_INVALIDATE 0x2 /* Invalidate the caches. */ +#define MS_SYNC 0x4 /* Synchronous memory sync. */ + +/* Flags for `mlockall'. */ +#define MCL_CURRENT 0x1 /* Lock all currently mapped pages. */ +#define MCL_FUTURE 0x2 /* Lock all additions to address + space. */ + +/* Flags for `mremap'. */ +#ifdef __USE_GNU +# define MREMAP_MAYMOVE 1 +# define MREMAP_FIXED 2 +#endif + +/* Advice to `madvise'. */ +#ifdef __USE_BSD +# define MADV_NORMAL 0 /* No further special treatment. */ +# define MADV_RANDOM 1 /* Expect random page references. */ +# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define MADV_WILLNEED 3 /* Will need these pages. */ +# define MADV_DONTNEED 4 /* Don't need these pages. */ +# define MADV_REMOVE 9 /* Remove these pages and resources. */ +# define MADV_DONTFORK 10 /* Do not inherit across fork. */ +# define MADV_DOFORK 11 /* Do inherit across fork. */ +# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */ +# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */ +# define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */ +# define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */ +# define MADV_HWPOISON 100 /* Poison a page for testing. */ +#endif + +/* The POSIX people had to invent similar names for the same things. */ +#ifdef __USE_XOPEN2K +# define POSIX_MADV_NORMAL 0 /* No further special treatment. */ +# define POSIX_MADV_RANDOM 1 /* Expect random page references. */ +# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */ +# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */ +#endif diff --git a/sysdeps/unix/sysv/linux/ia64/bits/msq.h b/sysdeps/unix/sysv/linux/ia64/bits/msq.h new file mode 100644 index 0000000000..cd268eea30 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/bits/msq.h @@ -0,0 +1,69 @@ +/* Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contribute by David Mosberger-Tang + + 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 _SYS_MSG_H +#error "Never use directly; include instead." +#endif + +#include + +/* Define options for message queue functions. */ +#define MSG_NOERROR 010000 /* no error if message is too big */ +#define MSG_EXCEPT 020000 /* recv any msg except of specified type */ + + +/* Structure of record for one message inside the kernel. + The type `struct __msg' is opaque. */ +struct msqid_ds +{ + struct ipc_perm msg_perm; /* structure describing operation permission */ + __time_t msg_stime; /* time of last msgsnd command */ + __time_t msg_rtime; /* time of last msgrcv command */ + __time_t msg_ctime; /* time of last change */ + unsigned long int __msg_cbytes; /* current number of bytes on queue */ + unsigned long int msg_qnum; /* number of messages currently on queue */ + unsigned long int 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; +}; + +#ifdef __USE_MISC + +# define msg_cbytes __msg_cbytes + +/* ipcs ctl commands */ +# define MSG_STAT 11 +# define MSG_INFO 12 + +/* buffer for msgctl calls IPC_INFO, MSG_INFO */ +struct msginfo + { + int msgpool; + int msgmap; + int msgmax; + int msgmnb; + int msgmni; + int msgssz; + int msgtql; + unsigned short int msgseg; + }; + +#endif /* __USE_MISC */ diff --git a/sysdeps/unix/sysv/linux/ia64/bits/sem.h b/sysdeps/unix/sysv/linux/ia64/bits/sem.h new file mode 100644 index 0000000000..449f1ecc45 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/bits/sem.h @@ -0,0 +1,87 @@ +/* Copyright (C) 2000 + Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Mosberger-Tang + + 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 _SYS_SEM_H +# error "Never include directly; use instead." +#endif + +#include + +/* Flags for `semop'. */ +#define SEM_UNDO 0x1000 /* undo the operation on exit */ + +/* Commands for `semctl'. */ +#define GETPID 11 /* get sempid */ +#define GETVAL 12 /* get semval */ +#define GETALL 13 /* get all semval's */ +#define GETNCNT 14 /* get semncnt */ +#define GETZCNT 15 /* get semzcnt */ +#define SETVAL 16 /* set semval */ +#define SETALL 17 /* set all semval's */ + + +/* Data structure describing a set of semaphores. */ +struct semid_ds +{ + struct ipc_perm sem_perm; /* operation permission struct */ + __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; +}; + +/* The user should define a union like the following to use it for arguments + for `semctl'. + + union semun + { + int val; <= value for SETVAL + struct semid_ds *buf; <= buffer for IPC_STAT & IPC_SET + unsigned short int *array; <= array for GETALL & SETALL + struct seminfo *__buf; <= buffer for IPC_INFO + }; + + Previous versions of this file used to define this union but this is + incorrect. One can test the macro _SEM_SEMUN_UNDEFINED to see whether + one must define the union or not. */ +#define _SEM_SEMUN_UNDEFINED 1 + +#ifdef __USE_MISC + +/* ipcs ctl cmds */ +# define SEM_STAT 18 +# define SEM_INFO 19 + +struct seminfo +{ + int semmap; + int semmni; + int semmns; + int semmnu; + int semmsl; + int semopm; + int semume; + int semusz; + int semvmx; + int semaem; +}; + +#endif /* __USE_MISC */ diff --git a/sysdeps/unix/sysv/linux/ia64/bits/setjmp.h b/sysdeps/unix/sysv/linux/ia64/bits/setjmp.h new file mode 100644 index 0000000000..8bd675e4ec --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/bits/setjmp.h @@ -0,0 +1,35 @@ +/* Define the machine-dependent type `jmp_buf'. Linux/IA-64 version. + Copyright (C) 1999,2000,2003,2005,2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Mosberger-Tang . + + 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_SETJMP_H +#define _BITS_SETJMP_H 1 + +#if !defined _SETJMP_H && !defined _PTHREAD_H +# error "Never include directly; use instead." +#endif + +/* User code must not depend on the internal representation of jmp_buf. */ + +#define _JBLEN 70 + +/* the __jmp_buf element type should be __float80 per ABI... */ +typedef long __jmp_buf[_JBLEN] __attribute__ ((aligned (16))); /* guarantees 128-bit alignment! */ + +#endif /* bits/setjmp.h */ diff --git a/sysdeps/unix/sysv/linux/ia64/bits/shm.h b/sysdeps/unix/sysv/linux/ia64/bits/shm.h new file mode 100644 index 0000000000..71b85295c5 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/bits/shm.h @@ -0,0 +1,95 @@ +/* Copyright (C) 2000, 2002, 2005, 2009 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 _SYS_SHM_H +# error "Never include directly; use instead." +#endif + +#include + +/* Permission flag for shmget. */ +#define SHM_R 0400 /* or S_IRUGO from */ +#define SHM_W 0200 /* or S_IWUGO from */ + +/* Flags for `shmat'. */ +#define SHM_RDONLY 010000 /* attach read-only else read-write */ +#define SHM_RND 020000 /* round attach address to SHMLBA */ +#define SHM_REMAP 040000 /* take-over region on attach */ +#define SHM_EXEC 0100000 /* execution access */ + +/* Commands for `shmctl'. */ +#define SHM_LOCK 11 /* lock segment (root only) */ +#define SHM_UNLOCK 12 /* unlock segment (root only) */ + +/* Segment low boundary address multiple. */ +#define SHMLBA (1024 * 1024) + +/* Type to count number of attaches. */ +typedef unsigned long int shmatt_t; + +/* Data structure describing a shared memory segment. */ +struct shmid_ds + { + struct ipc_perm shm_perm; /* operation permission struct */ + size_t shm_segsz; /* size of segment in bytes */ + __time_t shm_atime; /* time of last shmat() */ + __time_t shm_dtime; /* time of last shmdt() */ + __time_t shm_ctime; /* time of last change by shmctl() */ + __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; + }; + +#ifdef __USE_MISC + +/* ipcs ctl commands */ +# define SHM_STAT 13 +# define SHM_INFO 14 + +/* shm_mode upper byte flags */ +# define SHM_DEST 01000 /* segment will be destroyed on last detach */ +# define SHM_LOCKED 02000 /* segment will not be swapped */ +# define SHM_HUGETLB 04000 /* segment is mapped via hugetlb */ +# define SHM_NORESERVE 010000 /* don't check for reservations */ + +struct shminfo + { + unsigned long int shmmax; + unsigned long int shmmin; + unsigned long int shmmni; + unsigned long int shmseg; + unsigned long int shmall; + unsigned long int __unused1; + unsigned long int __unused2; + unsigned long int __unused3; + unsigned long int __unused4; + }; + +struct shm_info + { + int used_ids; + unsigned long int shm_tot; /* total allocated shm */ + unsigned long int shm_rss; /* total resident shm */ + unsigned long int shm_swp; /* total swapped shm */ + unsigned long int swap_attempts; + unsigned long int swap_successes; + }; + +#endif /* __USE_MISC */ diff --git a/sysdeps/unix/sysv/linux/ia64/bits/sigaction.h b/sysdeps/unix/sysv/linux/ia64/bits/sigaction.h new file mode 100644 index 0000000000..b557eaa3e0 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/bits/sigaction.h @@ -0,0 +1,75 @@ +/* Definitions for Linux/ia64 sigaction. + Copyright (C) 1996, 1997, 2000, 2003, 2010 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 _SIGNAL_H +# error "Never include directly; use instead." +#endif + +/* Structure describing the action to be taken when a signal arrives. */ +struct sigaction + { + /* Signal handler. */ +#ifdef __USE_POSIX199309 + union + { + /* Used if SA_SIGINFO is not set. */ + __sighandler_t sa_handler; + /* Used if SA_SIGINFO is set. */ + void (*sa_sigaction) (int, siginfo_t *, void *); + } + __sigaction_handler; +# define sa_handler __sigaction_handler.sa_handler +# define sa_sigaction __sigaction_handler.sa_sigaction +#else + __sighandler_t sa_handler; +#endif + + /* Special flags. */ + unsigned long int sa_flags; + + /* Additional set of signals to be blocked. */ + __sigset_t sa_mask; + }; + +/* Bits in `sa_flags'. */ +#define SA_NOCLDSTOP 0x00000001 /* Don't send SIGCHLD when children stop. */ +#define SA_NOCLDWAIT 0x00000002 /* Don't create zombie on child death. */ +#define SA_SIGINFO 0x00000004 +#if defined __USE_UNIX98 || defined __USE_MISC +# define SA_ONSTACK 0x08000000 /* Use signal stack by using `sa_restorer'. */ +#endif +#if defined __USE_UNIX98 || defined __USE_MISC || defined __USE_XOPEN2K8 +# define SA_RESTART 0x10000000 /* Restart syscall on signal return. */ +# define SA_NODEFER 0x40000000 /* Don't automatically block the signal + when its handler is being executed. */ +# define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler. */ +#endif +#ifdef __USE_MISC +# define SA_INTERRUPT 0x20000000 /* Historic no-op. */ + +/* Some aliases for the SA_ constants. */ +# define SA_NOMASK SA_NODEFER +# define SA_ONESHOT SA_RESETHAND +# define SA_STACK SA_ONSTACK +#endif + +/* Values for the HOW argument to `sigprocmask'. */ +#define SIG_BLOCK 0 /* for blocking signals */ +#define SIG_UNBLOCK 1 /* for unblocking signals */ +#define SIG_SETMASK 2 /* for setting the signal mask */ diff --git a/sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h b/sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h new file mode 100644 index 0000000000..34bc3c26ab --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h @@ -0,0 +1,81 @@ +/* Copyright (C) 1996, 1997, 1998, 2000, 2001, 2003, 2004, 2007 + Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jes Sorensen , July 2000 + + 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. */ + +#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H +# error "Never use directly; include instead." +#endif + +#ifndef _BITS_SIGCONTEXT_H +#define _BITS_SIGCONTEXT_H 1 + +#define __need_size_t +#include +#include + +struct ia64_fpreg + { + union + { + unsigned long bits[2]; + } u; + } __attribute__ ((aligned (16))); + +struct sigcontext +{ + unsigned long int sc_flags; /* see manifest constants below */ + unsigned long int sc_nat; /* bit i == 1 iff scratch reg gr[i] is a NaT */ + stack_t sc_stack; /* previously active stack */ + + unsigned long int sc_ip; /* instruction pointer */ + unsigned long int sc_cfm; /* current frame marker */ + unsigned long int sc_um; /* user mask bits */ + unsigned long int sc_ar_rsc; /* register stack configuration register */ + unsigned long int sc_ar_bsp; /* backing store pointer */ + unsigned long int sc_ar_rnat; /* RSE NaT collection register */ + unsigned long int sc_ar_ccv; /* compare & exchange compare value register */ + unsigned long int sc_ar_unat; /* ar.unat of interrupted context */ + unsigned long int sc_ar_fpsr; /* floating-point status register */ + unsigned long int sc_ar_pfs; /* previous function state */ + unsigned long int sc_ar_lc; /* loop count register */ + unsigned long int sc_pr; /* predicate registers */ + unsigned long int sc_br[8]; /* branch registers */ + unsigned long int sc_gr[32]; /* general registers (static partition) */ + struct ia64_fpreg sc_fr[128]; /* floating-point registers */ + unsigned long int sc_rbs_base;/* NULL or new base of sighandler's rbs */ + unsigned long int sc_loadrs; /* see description above */ + unsigned long int sc_ar25; /* cmp8xchg16 uses this */ + unsigned long int sc_ar26; /* rsvd for scratch use */ + unsigned long int sc_rsvd[12];/* reserved for future use */ + + /* sc_mask is actually an sigset_t but we don't want to + * include the kernel headers here. */ + unsigned long int sc_mask; /* signal mask to restore after handler returns */ +}; + +/* sc_flag bit definitions. */ +#define IA64_SC_FLAG_ONSTACK_BIT 0 /* is handler running on signal stack? */ +#define IA64_SC_FLAG_IN_SYSCALL_BIT 1 /* did signal interrupt a syscall? */ +#define IA64_SC_FLAG_FPH_VALID_BIT 2 /* is state in f[32]-f[127] valid? */ + +#define IA64_SC_FLAG_ONSTACK (1 << IA64_SC_FLAG_ONSTACK_BIT) +#define IA64_SC_FLAG_IN_SYSCALL (1 << IA64_SC_FLAG_IN_SYSCALL_BIT) +#define IA64_SC_FLAG_FPH_VALID (1 << IA64_SC_FLAG_FPH_VALID_BIT) + +#endif /* _BITS_SIGCONTEXT_H */ diff --git a/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h b/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h new file mode 100644 index 0000000000..fea5af7fbf --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h @@ -0,0 +1,343 @@ +/* siginfo_t, sigevent and constants. Linux/ia64 version. + Copyright (C) 2000-2004, 2009, 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Mosberger-Tang . + + 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. */ + +#if !defined _SIGNAL_H && !defined __need_siginfo_t \ + && !defined __need_sigevent_t +# error "Never include this file directly. Use instead" +#endif + +#if (!defined __have_sigval_t \ + && (defined _SIGNAL_H || defined __need_siginfo_t \ + || defined __need_sigevent_t)) +# define __have_sigval_t 1 + +/* Type for data associated with a signal. */ +typedef union sigval + { + int sival_int; + void *sival_ptr; + } sigval_t; +#endif + +#if (!defined __have_siginfo_t \ + && (defined _SIGNAL_H || defined __need_siginfo_t)) +# define __have_siginfo_t 1 + +# define __SI_MAX_SIZE 128 +# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 4) + +typedef struct siginfo + { + int si_signo; /* Signal number. */ + int si_errno; /* If non-zero, an errno value associated with + this signal, as defined in . */ + int si_code; /* Signal code. */ + int __pad0; /* Explicit padding. */ + + union + { + int _pad[__SI_PAD_SIZE]; + + /* kill(). */ + struct + { + __pid_t si_pid; /* Sending process ID. */ + __uid_t si_uid; /* Real user ID of sending process. */ + } _kill; + + /* POSIX.1b timers. */ + struct + { + int si_tid; /* Timer ID. */ + int si_overrun; /* Overrun count. */ + sigval_t si_sigval; /* Signal value. */ + } _timer; + + /* POSIX.1b signals. */ + struct + { + __pid_t si_pid; /* Sending process ID. */ + __uid_t si_uid; /* Real user ID of sending process. */ + sigval_t si_sigval; /* Signal value. */ + } _rt; + + /* SIGCHLD. */ + struct + { + __pid_t si_pid; /* Which child. */ + __uid_t si_uid; /* Real user ID of sending process. */ + int si_status; /* Exit value or signal. */ + __clock_t si_utime; + __clock_t si_stime; + } _sigchld; + + /* SIGILL, SIGFPE, SIGSEGV, SIGBUS. */ + struct + { + void *si_addr; /* Faulting insn/memory ref. */ + int _si_imm; + unsigned int _si_flags; + unsigned long int _si_isr; + } _sigfault; + + /* SIGPOLL. */ + struct + { + long int si_band; /* Band event for SIGPOLL. */ + int si_fd; + } _sigpoll; + } _sifields; + } siginfo_t; + + +/* X/Open requires some more fields with fixed names. */ +# define si_pid _sifields._kill.si_pid +# define si_uid _sifields._kill.si_uid +# define si_timerid _sifields._timer.si_tid +# define si_overrun _sifields._timer.si_overrun +# define si_status _sifields._sigchld.si_status +# define si_utime _sifields._sigchld.si_utime +# define si_stime _sifields._sigchld.si_stime +# define si_value _sifields._rt.si_sigval +# define si_int _sifields._rt.si_sigval.sival_int +# define si_ptr _sifields._rt.si_sigval.sival_ptr +# define si_addr _sifields._sigfault.si_addr +# define si_band _sifields._sigpoll.si_band +# define si_fd _sifields._sigpoll.si_fd + +# ifdef __USE_GNU +# define si_imm _sifields._sigfault._si_imm +# define si_segvflags _sifields._sigfault._si_flags +# define si_isr _sifields._sigfault._si_isr +# endif + +/* Values for `si_code'. Positive values are reserved for kernel-generated + signals. */ +enum +{ + SI_ASYNCNL = -60, /* Sent by asynch name lookup completion. */ +# define SI_ASYNCNL SI_ASYNCNL + SI_TKILL = -6, /* Sent by tkill. */ +# define SI_TKILL SI_TKILL + SI_SIGIO, /* Sent by queued SIGIO. */ +# define SI_SIGIO SI_SIGIO + SI_ASYNCIO, /* Sent by AIO completion. */ +# define SI_ASYNCIO SI_ASYNCIO + SI_MESGQ, /* Sent by real time mesq state change. */ +# define SI_MESGQ SI_MESGQ + SI_TIMER, /* Sent by timer expiration. */ +# define SI_TIMER SI_TIMER + SI_QUEUE, /* Sent by sigqueue. */ +# define SI_QUEUE SI_QUEUE + SI_USER, /* Sent by kill, sigsend. */ +# define SI_USER SI_USER + SI_KERNEL = 0x80 /* Send by kernel. */ +#define SI_KERNEL SI_KERNEL +}; + + +/* `si_code' values for SIGILL signal. */ +enum +{ + ILL_ILLOPC = 1, /* Illegal opcode. */ +# define ILL_ILLOPC ILL_ILLOPC + ILL_ILLOPN, /* Illegal operand. */ +# define ILL_ILLOPN ILL_ILLOPN + ILL_ILLADR, /* Illegal addressing mode. */ +# define ILL_ILLADR ILL_ILLADR + ILL_ILLTRP, /* Illegal trap. */ +# define ILL_ILLTRP ILL_ILLTRP + ILL_PRVOPC, /* Privileged opcode. */ +# define ILL_PRVOPC ILL_PRVOPC + ILL_PRVREG, /* Privileged register. */ +# define ILL_PRVREG ILL_PRVREG + ILL_COPROC, /* Coprocessor error. */ +# define ILL_COPROC ILL_COPROC + ILL_BADSTK, /* Internal stack error. */ +# define ILL_BADSTK ILL_BADSTK + ILL_BADIADDR /* Unimplemented instruction address. */ +# define ILL_BADIADDR ILL_BADIADDR + +# ifdef __USE_GNU + , ILL_BREAK +# define ILL_BREAK ILL_BREAK +# endif +}; + +/* `si_code' values for SIGFPE signal. */ +enum +{ + FPE_INTDIV = 1, /* Integer divide by zero. */ +# define FPE_INTDIV FPE_INTDIV + FPE_INTOVF, /* Integer overflow. */ +# define FPE_INTOVF FPE_INTOVF + FPE_FLTDIV, /* Floating point divide by zero. */ +# define FPE_FLTDIV FPE_FLTDIV + FPE_FLTOVF, /* Floating point overflow. */ +# define FPE_FLTOVF FPE_FLTOVF + FPE_FLTUND, /* Floating point underflow. */ +# define FPE_FLTUND FPE_FLTUND + FPE_FLTRES, /* Floating point inexact result. */ +# define FPE_FLTRES FPE_FLTRES + FPE_FLTINV, /* Floating point invalid operation. */ +# define FPE_FLTINV FPE_FLTINV + FPE_FLTSUB /* Subscript out of range. */ +# define FPE_FLTSUB FPE_FLTSUB +# ifdef __USE_GNU + , FPE_DECOVF +# define FPE_DECOVF FPE_DECOVF + , FPE_DECDIV +# define FPE_DECDIV FPE_DECDIV + , FPE_DECERR +# define FPE_DECERR FPE_DECERR + , FPE_INVASC +# define FPE_INVASC FPE_INVASC + , FPE_INVDEC +# define FPE_INVDEC FPE_INVDEC +# endif +}; + +/* `si_code' values for SIGSEGV signal. */ +enum +{ + SEGV_MAPERR = 1, /* Address not mapped to object. */ +# define SEGV_MAPERR SEGV_MAPERR + SEGV_ACCERR /* Invalid permissions for mapped object. */ +# define SEGV_ACCERR SEGV_ACCERR +# ifdef __USE_GNU + , SEGV_PSTKOVF /* Paragraph stack overflow. */ +# define SEGV_PSTKOVF SEGV_PSTKOVF +# endif +}; + +/* `si_code' values for SIGBUS signal. */ +enum +{ + BUS_ADRALN = 1, /* Invalid address alignment. */ +# define BUS_ADRALN BUS_ADRALN + BUS_ADRERR, /* Non-existant physical address. */ +# define BUS_ADRERR BUS_ADRERR + BUS_OBJERR /* Object specific hardware error. */ +# define BUS_OBJERR BUS_OBJERR +}; + +/* `si_code' values for SIGTRAP signal. */ +enum +{ + TRAP_BRKPT = 1, /* Process breakpoint. */ +# define TRAP_BRKPT TRAP_BRKPT + TRAP_TRACE /* Process trace trap. */ +# define TRAP_TRACE TRAP_TRACE + +# ifdef __USE_GNU + , TRAP_BRANCH +# define TRAP_BRANCH TRAP_BRANCH + , TRAP_HWBKPT +# define TRAP_HWBKPT TRAP_HWBKPT +# endif +}; + +/* `si_code' values for SIGCHLD signal. */ +enum +{ + CLD_EXITED = 1, /* Child has exited. */ +# define CLD_EXITED CLD_EXITED + CLD_KILLED, /* Child was killed. */ +# define CLD_KILLED CLD_KILLED + CLD_DUMPED, /* Child terminated abnormally. */ +# define CLD_DUMPED CLD_DUMPED + CLD_TRAPPED, /* Traced child has trapped. */ +# define CLD_TRAPPED CLD_TRAPPED + CLD_STOPPED, /* Child has stopped. */ +# define CLD_STOPPED CLD_STOPPED + CLD_CONTINUED /* Stopped child has continued. */ +# define CLD_CONTINUED CLD_CONTINUED +}; + +/* `si_code' values for SIGPOLL signal. */ +enum +{ + POLL_IN = 1, /* Data input available. */ +# define POLL_IN POLL_IN + POLL_OUT, /* Output buffers available. */ +# define POLL_OUT POLL_OUT + POLL_MSG, /* Input message available. */ +# define POLL_MSG POLL_MSG + POLL_ERR, /* I/O error. */ +# define POLL_ERR POLL_ERR + POLL_PRI, /* High priority input available. */ +# define POLL_PRI POLL_PRI + POLL_HUP /* Device disconnected. */ +# define POLL_HUP POLL_HUP +}; + +# undef __need_siginfo_t +#endif /* !have siginfo_t && (have _SIGNAL_H || need siginfo_t). */ + + +#if (defined _SIGNAL_H || defined __need_sigevent_t) \ + && !defined __have_sigevent_t +# define __have_sigevent_t 1 + +/* Structure to transport application-defined values with signals. */ +# define __SIGEV_MAX_SIZE 64 +# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4) + +typedef struct sigevent + { + sigval_t sigev_value; + int sigev_signo; + int sigev_notify; + + union + { + int _pad[__SIGEV_PAD_SIZE]; + + /* When SIGEV_SIGNAL and SIGEV_THREAD_ID set, LWP ID of the + thread to receive the signal. */ + __pid_t _tid; + + struct + { + void (*_function) (sigval_t); /* Function to start. */ + void *_attribute; /* Really pthread_attr_t. */ + } _sigev_thread; + } _sigev_un; + } sigevent_t; + +/* POSIX names to access some of the members. */ +# define sigev_notify_function _sigev_un._sigev_thread._function +# define sigev_notify_attributes _sigev_un._sigev_thread._attribute + +/* `sigev_notify' values. */ +enum +{ + SIGEV_SIGNAL = 0, /* Notify via signal. */ +# define SIGEV_SIGNAL SIGEV_SIGNAL + SIGEV_NONE, /* Other notification: meaningless. */ +# define SIGEV_NONE SIGEV_NONE + SIGEV_THREAD, /* Deliver via thread creation. */ +# define SIGEV_THREAD SIGEV_THREAD + + SIGEV_THREAD_ID = 4 /* Send signal to specific thread. */ +#define SIGEV_THREAD_ID SIGEV_THREAD_ID +}; + +#endif /* have _SIGNAL_H. */ diff --git a/sysdeps/unix/sysv/linux/ia64/bits/sigstack.h b/sysdeps/unix/sysv/linux/ia64/bits/sigstack.h new file mode 100644 index 0000000000..c9c9d2fedb --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/bits/sigstack.h @@ -0,0 +1,63 @@ +/* sigstack, sigaltstack definitions. + Copyright (C) 1998, 2000, 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 _SIGNAL_H +# error "Never include this file directly. Use instead" +#endif + +#ifndef _SIGSTACK_H +#define _SIGSTACK_H 1 + +/* Structure describing a signal stack (obsolete). */ +struct sigstack + { + __ptr_t ss_sp; /* Signal stack pointer. */ + int ss_onstack; /* Nonzero if executing on this stack. */ + }; + + +/* Possible values for `ss_flags.'. */ +enum +{ + SS_ONSTACK = 1, +#define SS_ONSTACK SS_ONSTACK + SS_DISABLE +#define SS_DISABLE SS_DISABLE +}; + +/* Minimum stack size for a signal handler. + + Yes, this should be 131072 but the constant got defined incorrectly + in the kernel and we have to live with it. Users should in any case + use SIGSTKSZ as the size user-supplied buffers should have. */ +#define MINSIGSTKSZ 131027 + +/* System default stack size. */ +#define SIGSTKSZ 262144 + + +/* Alternate, preferred interface. */ +typedef struct sigaltstack + { + __ptr_t ss_sp; + int ss_flags; + size_t ss_size; + } stack_t; + +#endif /* bits/sigstack.h */ diff --git a/sysdeps/unix/sysv/linux/ia64/bits/stat.h b/sysdeps/unix/sysv/linux/ia64/bits/stat.h new file mode 100644 index 0000000000..86acd27ae2 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/bits/stat.h @@ -0,0 +1,150 @@ +/* Copyright (C) 1999-2002, 2009, 2010 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. */ + +#if !defined _SYS_STAT_H && !defined _FCNTL_H +# error "Never include directly; use instead." +#endif + +#ifndef _BITS_STAT_H +#define _BITS_STAT_H 1 + +/* Versions of the `struct stat' data structure. */ +#define _STAT_VER_KERNEL 0 +#define _STAT_VER_LINUX 1 +#define _STAT_VER _STAT_VER_LINUX + +/* Versions of the `xmknod' interface. */ +#define _MKNOD_VER_LINUX 0 + +struct stat + { + __dev_t st_dev; /* Device. */ + __ino_t st_ino; /* File serial number. */ + __nlink_t st_nlink; /* Link count. */ + __mode_t st_mode; /* File mode. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + int pad0; + __dev_t st_rdev; /* Device number, if device. */ + __off_t st_size; /* Size of file, in bytes. */ +#ifdef __USE_MISC + /* 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 + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +#else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +#endif + __blksize_t st_blksize; /* Optimal block size for I/O. */ + __blkcnt_t st_blocks; /* Nr. 512-byte blocks allocated. */ + long int __unused[3]; + }; + +#ifdef __USE_LARGEFILE64 +/* Note stat64 is the same shape as stat. */ +struct stat64 + { + __dev_t st_dev; /* Device. */ + __ino64_t st_ino; /* File serial number. */ + __nlink_t st_nlink; /* Link count. */ + __mode_t st_mode; /* File mode. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + int pad0; + __dev_t st_rdev; /* Device number, if device. */ + __off_t st_size; /* Size of file, in bytes. */ +#ifdef __USE_MISC + /* 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 + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +#else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +#endif + __blksize_t st_blksize; /* Optimal block size for I/O. */ + __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */ + long int __unused[3]; + }; +#endif + +/* Tell code we have these members. */ +#define _STATBUF_ST_BLKSIZE +#define _STATBUF_ST_RDEV +/* Nanosecond resolution time values are supported. */ +#define _STATBUF_ST_NSEC + +/* Encoding of the file mode. */ + +#define __S_IFMT 0170000 /* These bits determine file type. */ + +/* File types. */ +#define __S_IFDIR 0040000 /* Directory. */ +#define __S_IFCHR 0020000 /* Character device. */ +#define __S_IFBLK 0060000 /* Block device. */ +#define __S_IFREG 0100000 /* Regular file. */ +#define __S_IFIFO 0010000 /* FIFO. */ +#define __S_IFLNK 0120000 /* Symbolic link. */ +#define __S_IFSOCK 0140000 /* Socket. */ + +/* POSIX.1b objects. Note that these macros always evaluate to zero. But + they do it by enforcing the correct use of the macros. */ +#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode) + +/* Protection bits. */ + +#define __S_ISUID 04000 /* Set user ID on execution. */ +#define __S_ISGID 02000 /* Set group ID on execution. */ +#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ +#define __S_IREAD 0400 /* Read by owner. */ +#define __S_IWRITE 0200 /* Write by owner. */ +#define __S_IEXEC 0100 /* Execute by owner. */ + +#ifdef __USE_ATFILE +# define UTIME_NOW ((1l << 30) - 1l) +# define UTIME_OMIT ((1l << 30) - 2l) +#endif + +#endif /* bits//stat.h */ diff --git a/sysdeps/unix/sysv/linux/ia64/brk.S b/sysdeps/unix/sysv/linux/ia64/brk.S new file mode 100644 index 0000000000..0e4114a331 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/brk.S @@ -0,0 +1,52 @@ +/* brk system call for Linux/ia64 + Copyright (C) 1999,2000,2001,2003 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Written by Stephane Eranian and + Jes Sorensen, , April 1999. + + 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. */ + +#include + +#include +#include + + .global __curbrk + .type __curbrk,@object + .size __curbrk,8 + .data + .align 8 +__curbrk: + data8 0 + +weak_alias (__curbrk, ___brk_addr) + +LEAF(__brk) + .regstk 1, 0, 0, 0 + DO_CALL(__NR_brk) + cmp.ltu p6, p0 = ret0, in0 + addl r9 = @ltoff(__curbrk), gp + ;; + ld8 r9 = [r9] +(p6) mov ret0 = ENOMEM +(p6) br.cond.spnt.few __syscall_error + ;; + st8 [r9] = ret0 + mov ret0 = 0 + ret +END(__brk) + +weak_alias (__brk, brk) diff --git a/sysdeps/unix/sysv/linux/ia64/bsd-_setjmp.S b/sysdeps/unix/sysv/linux/ia64/bsd-_setjmp.S new file mode 100644 index 0000000000..4e6a2da560 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/bsd-_setjmp.S @@ -0,0 +1 @@ +/* _setjmp is in setjmp.S */ diff --git a/sysdeps/unix/sysv/linux/ia64/bsd-setjmp.S b/sysdeps/unix/sysv/linux/ia64/bsd-setjmp.S new file mode 100644 index 0000000000..1da848d2f1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/bsd-setjmp.S @@ -0,0 +1 @@ +/* setjmp is in setjmp.S */ diff --git a/sysdeps/unix/sysv/linux/ia64/clock_getcpuclockid.c b/sysdeps/unix/sysv/linux/ia64/clock_getcpuclockid.c new file mode 100644 index 0000000000..2f39851535 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/clock_getcpuclockid.c @@ -0,0 +1,32 @@ +/* clock_getcpuclockid -- Get a clockid_t for process CPU time. Linux/IA64 + Copyright (C) 2000,2001,2003,2004 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. */ + +#include +#include +#include +#include +#include +#include + + +#include "has_cpuclock.c" + +#define HAS_CPUCLOCK (has_cpuclock () > 0) + +#include diff --git a/sysdeps/unix/sysv/linux/ia64/clone.S b/sysdeps/unix/sysv/linux/ia64/clone.S new file mode 100644 index 0000000000..0cfaeab64e --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/clone.S @@ -0,0 +1 @@ +/* clone is not supported under Linux/ia64, use clone2. */ diff --git a/sysdeps/unix/sysv/linux/ia64/clone2.S b/sysdeps/unix/sysv/linux/ia64/clone2.S new file mode 100644 index 0000000000..d38eb201ad --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/clone2.S @@ -0,0 +1,106 @@ +/* Copyright (C) 2000, 2001, 2003, 2004, 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 + 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. */ + + +#include +#include + + +/* int __clone2(int (*fn) (void *arg), void *child_stack_base, */ +/* size_t child_stack_size, int flags, void *arg, */ +/* pid_t *parent_tid, void *tls, pid_t *child_tid) */ + +#define CHILD p8 +#define PARENT p9 + +ENTRY(__clone2) + .prologue + alloc r2=ar.pfs,8,1,6,0 + cmp.eq p6,p0=0,in0 + cmp.eq p7,p0=0,in1 + mov r8=EINVAL + mov out0=in3 /* Flags are first syscall argument. */ + mov out1=in1 /* Stack address. */ +(p6) br.cond.spnt.many __syscall_error /* no NULL function pointers */ +(p7) br.cond.spnt.many __syscall_error /* no NULL stack pointers */ + ;; + mov out2=in2 /* Stack size. */ + mov out3=in5 /* Parent TID Pointer */ + mov out4=in7 /* Child TID Pointer */ + mov out5=in6 /* TLS pointer */ + /* + * clone2() is special: the child cannot execute br.ret right + * after the system call returns, because it starts out + * executing on an empty stack. Because of this, we can't use + * the new (lightweight) syscall convention here. Instead, we + * just fall back on always using "break". + * + * Furthermore, since the child starts with an empty stack, we + * need to avoid unwinding past invalid memory. To that end, + * we'll pretend now that __clone2() is the end of the + * call-chain. This is wrong for the parent, but only until + * it returns from clone2() but it's better than the + * alternative. + */ + mov r15=SYS_ify (clone2) + .save rp, r0 + break __BREAK_SYSCALL + .body + cmp.eq p6,p0=-1,r10 + cmp.eq CHILD,PARENT=0,r8 /* Are we the child? */ +(p6) br.cond.spnt.many __syscall_error + ;; +(CHILD) mov loc0=gp +(PARENT) ret + ;; +#ifdef RESET_PID + tbit.nz p6,p0=in3,16 /* CLONE_THREAD */ + tbit.z p7,p10=in3,8 /* CLONE_VM */ +(p6) br.cond.dptk 1f + ;; + mov r15=SYS_ify (getpid) +(p10) addl r8=-1,r0 +(p7) break __BREAK_SYSCALL + ;; + add r9=PID,r13 + add r10=TID,r13 + ;; + st4 [r9]=r8 + st4 [r10]=r8 + ;; +#endif +1: ld8 out1=[in0],8 /* Retrieve code pointer. */ + mov out0=in4 /* Pass proper argument to fn */ + ;; + ld8 gp=[in0] /* Load function gp. */ + mov b6=out1 + br.call.dptk.many rp=b6 /* Call fn(arg) in the child */ + ;; + mov out0=r8 /* Argument to _exit */ + mov gp=loc0 + .globl HIDDEN_JUMPTARGET(_exit) + br.call.dpnt.many rp=HIDDEN_JUMPTARGET(_exit) + /* call _exit with result from fn. */ + ret /* Not reached. */ +PSEUDO_END(__clone2) + +/* For now we leave __clone undefined. This is unlikely to be a */ +/* problem, since at least the i386 __clone in glibc always failed */ +/* with a 0 sp (eventhough the kernel explicitly handled it). */ +/* Thus all such calls needed to pass an explicit sp, and as a result, */ +/* would be unlikely to work on ia64. */ diff --git a/sysdeps/unix/sysv/linux/ia64/dl-brk.S b/sysdeps/unix/sysv/linux/ia64/dl-brk.S new file mode 100644 index 0000000000..eeb96544e3 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/dl-brk.S @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/ia64/dl-cache.h b/sysdeps/unix/sysv/linux/ia64/dl-cache.h new file mode 100644 index 0000000000..b8e2790589 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/dl-cache.h @@ -0,0 +1,25 @@ +/* Support for reading /etc/ld.so.cache files written by Linux ldconfig. + Copyright (C) 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 + 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. */ + +#define _DL_CACHE_DEFAULT_ID 0x203 + +#define _dl_cache_check_flags(flags) \ + ((flags) == _DL_CACHE_DEFAULT_ID) + +#include_next diff --git a/sysdeps/unix/sysv/linux/ia64/dl-static.c b/sysdeps/unix/sysv/linux/ia64/dl-static.c new file mode 100644 index 0000000000..4efc077032 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/dl-static.c @@ -0,0 +1,69 @@ +/* Variable initialization. IA-64 version. + Copyright (C) 2001, 2002, 2003, 2004 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. */ + +#include + +#ifdef SHARED + +void +_dl_var_init (void *array[]) +{ + /* It has to match "variables" below. */ + enum + { + DL_PAGESIZE = 0, + DL_CLKTCK + }; + + GLRO(dl_pagesize) = *((size_t *) array[DL_PAGESIZE]); + GLRO(dl_clktck) = *((int *) array[DL_CLKTCK]); +} + +#else +#include + +__libc_lock_define_initialized_recursive (static, _dl_static_lock) + +static void *variables[] = +{ + &GLRO(dl_pagesize), + &GLRO(dl_clktck) +}; + +void +_dl_static_init (struct link_map *map) +{ + const ElfW(Sym) *ref = NULL; + lookup_t loadbase; + void (*f) (void *[]); + + __libc_lock_lock_recursive (_dl_static_lock); + + loadbase = _dl_lookup_symbol_x ("_dl_var_init", map, &ref, + map->l_local_scope, NULL, 0, 1, NULL); + if (ref != NULL) + { + f = (void (*) (void *[])) DL_SYMBOL_ADDRESS (loadbase, ref); + f (variables); + } + + __libc_lock_unlock_recursive (_dl_static_lock); +} + +#endif diff --git a/sysdeps/unix/sysv/linux/ia64/fork.S b/sysdeps/unix/sysv/linux/ia64/fork.S new file mode 100644 index 0000000000..0a57ab0d13 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/fork.S @@ -0,0 +1,41 @@ +/* Copyright (C) 2000, 2002 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. */ + + +#include +#define _SIGNAL_H +#include + +/* pid_t fork(void); */ +/* Implemented as a clone system call with parameters SIGCHLD and 0 */ + +ENTRY(__libc_fork) + alloc r2=ar.pfs,0,0,2,0 + mov out0=SIGCHLD /* Return SIGCHLD when child finishes */ + /* no other clone flags; nothing shared */ + mov out1=0 /* Standard sp value. */ + ;; + DO_CALL (SYS_ify (clone)) + cmp.eq p6,p0=-1,r10 +(p6) br.cond.spnt.few __syscall_error + ret +PSEUDO_END(__libc_fork) + +weak_alias (__libc_fork, __fork) +libc_hidden_def (__fork) +weak_alias (__libc_fork, fork) diff --git a/sysdeps/unix/sysv/linux/ia64/get_clockfreq.c b/sysdeps/unix/sysv/linux/ia64/get_clockfreq.c new file mode 100644 index 0000000000..48abfc13f4 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/get_clockfreq.c @@ -0,0 +1,89 @@ +/* Get frequency of the system processor. IA-64/Linux version. + Copyright (C) 2001 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. */ + +#include +#include +#include +#include +#include + + +hp_timing_t +__get_clockfreq (void) +{ + /* We read the information from the /proc filesystem. It contains at + least one line like + itc MHz : 733.390988 + We search for this line and convert the number in an integer. */ + static hp_timing_t result; + int fd; + + /* If this function was called before, we know the result. */ + if (result != 0) + return result; + + fd = open ("/proc/cpuinfo", O_RDONLY); + if (__builtin_expect (fd != -1, 1)) + { + /* XXX AFAIK the /proc filesystem can generate "files" only up + to a size of 4096 bytes. */ + char buf[4096]; + ssize_t n; + + n = read (fd, buf, sizeof buf); + if (__builtin_expect (n, 1) > 0) + { + char *mhz = memmem (buf, n, "itc MHz", 7); + + if (__builtin_expect (mhz != NULL, 1)) + { + char *endp = buf + n; + int seen_decpoint = 0; + int ndigits = 0; + + /* Search for the beginning of the string. */ + while (mhz < endp && (*mhz < '0' || *mhz > '9') && *mhz != '\n') + ++mhz; + + while (mhz < endp && *mhz != '\n') + { + if (*mhz >= '0' && *mhz <= '9') + { + result *= 10; + result += *mhz - '0'; + if (seen_decpoint) + ++ndigits; + } + else if (*mhz == '.') + seen_decpoint = 1; + + ++mhz; + } + + /* Compensate for missing digits at the end. */ + while (ndigits++ < 6) + result *= 10; + } + } + + close (fd); + } + + return result; +} diff --git a/sysdeps/unix/sysv/linux/ia64/getclktck.c b/sysdeps/unix/sysv/linux/ia64/getclktck.c new file mode 100644 index 0000000000..6636bbe689 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/getclktck.c @@ -0,0 +1,2 @@ +#define SYSTEM_CLK_TCK 1024 +#include diff --git a/sysdeps/unix/sysv/linux/ia64/getcontext.S b/sysdeps/unix/sysv/linux/ia64/getcontext.S new file mode 100644 index 0000000000..4e18bace2d --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/getcontext.S @@ -0,0 +1,158 @@ +/* Copyright (C) 2001, 2002 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Mosberger-Tang . + + 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. */ + +#include +#include + +#include "ucontext_i.h" + +/* __getcontext (ucontext_t *ucp) + + Saves the machine context in UCP such that when it is activated, + it appears as if __getcontext() returned again. The only difference + is that on a first return, r9 contains 1 and on a subsequent + return, it contains 0. + + This implementation in intended to be used for *synchronous* context + switches only. Therefore, it does not have to save anything + other than the PRESERVED state. */ + +ENTRY(__getcontext) + .prologue + .body + alloc r11 = ar.pfs, 1, 0, 4, 0 + + // sigprocmask (SIG_BLOCK, NULL, &sc->sc_mask): + + mov r3 = SC_MASK + mov out0 = SIG_BLOCK + + flushrs // save dirty partition on rbs + mov out1 = 0 + add out2 = r3, in0 + + mov out3 = 8 // sizeof kernel sigset_t + DO_CALL(__NR_rt_sigprocmask) + + mov.m rFPSR = ar.fpsr + mov.m rRSC = ar.rsc + add r2 = SC_GR+1*8, r32 + ;; + mov.m rBSP = ar.bsp + .prologue + .save ar.unat, rUNAT + mov.m rUNAT = ar.unat + .body + add r3 = SC_GR+4*8, r32 + ;; + +.mem.offset 0,0; st8.spill [r2] = r1, (5*8 - 1*8) +.mem.offset 8,0; st8.spill [r3] = r4, 16 + mov rPFS = r11 + ;; +.mem.offset 0,0; st8.spill [r2] = r5, 16 +.mem.offset 8,0; st8.spill [r3] = r6, 48 + and rTMP = ~0x3, rRSC + ;; +.mem.offset 0,0; st8.spill [r2] = r7, (SC_FR+2*16-(SC_GR+7*8)) +.mem.offset 8,0; st8.spill [r3] = sp, (SC_FR+3*16-(SC_GR+12*8)) + ;; + mov.m ar.rsc = rTMP // put RSE into enforced lazy mode + mov.m rNAT = ar.unat + mov.i rLC = ar.lc + ;; + mov.m rRNAT = ar.rnat + mov.m ar.rsc = rRSC // restore RSE mode + mov rPR = pr + + /* + * Rotate NaT bits by rPOS positions to the right: + */ + stf.spill [r2] = f2, 32 + stf.spill [r3] = f3, 32 + add rPOS = SC_GR, r32 // rPOS <- &sc_gr[0] + ;; + stf.spill [r2] = f4, (16*16-4*16) + stf.spill [r3] = f5, (17*16-5*16) + extr.u rPOS = rPOS, 3, 6 // get NaT bit number for r0 + ;; + stf.spill [r2] = f16, 32 + stf.spill [r3] = f17, 32 + sub rCPOS = 64, rPOS + ;; + stf.spill [r2] = f18, 32 + stf.spill [r3] = f19, 32 + shr.u rTMP = rNAT, rPOS + ;; + stf.spill [r2] = f20, 32 + stf.spill [r3] = f21, 32 + shl rNAT = rNAT, rCPOS + ;; + stf.spill [r2] = f22, 32 + stf.spill [r3] = f23, 32 + or rNAT = rNAT, rTMP + ;; + stf.spill [r2] = f24, 32 + stf.spill [r3] = f25, 32 + mov r8 = 0 + ;; + stf.spill [r2] = f26, 32 + stf.spill [r3] = f27, 32 + mov r9 = 1 + ;; + stf.spill [r2] = f28, 32 + stf.spill [r3] = f29, 32 + mov rB0 = b0 + ;; + stf.spill [r2] = f30, 32 + stf.spill [r3] = f31, 32 + mov rB1 = b1 + ;; + mov ar.unat = rUNAT // we're done spilling integer regs; restore caller's UNaT + add r2 = SC_NAT, r32 + add r3 = SC_BSP, r32 + ;; + st8 [r2] = rNAT, (SC_RNAT-SC_NAT) + st8 [r3] = rBSP, (SC_UNAT-SC_BSP) + mov rB2 = b2 + ;; + st8 [r2] = rRNAT, (SC_FPSR-SC_RNAT) + st8 [r3] = rUNAT, (SC_PFS-SC_UNAT) + mov rB3 = b3 + ;; + st8 [r2] = rFPSR, (SC_LC-SC_FPSR) + st8 [r3] = rPFS, (SC_PR-SC_PFS) + mov rB4 = b4 + ;; + st8 [r2] = rLC, (SC_BR+0*8-SC_LC) + st8 [r3] = rPR, (SC_BR+1*8-SC_PR) + mov rB5 = b5 + ;; + st8 [r2] = rB0, 16 + st8 [r3] = rB1, 16 + ;; + st8 [r2] = rB2, 16 + st8 [r3] = rB3, 16 + ;; + st8 [r2] = rB4 + st8 [r3] = rB5 + ret +END(__getcontext) + +weak_alias (__getcontext, getcontext) diff --git a/sysdeps/unix/sysv/linux/ia64/getpagesize.c b/sysdeps/unix/sysv/linux/ia64/getpagesize.c new file mode 100644 index 0000000000..1155dfdad1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/getpagesize.c @@ -0,0 +1,39 @@ +/* Copyright (C) 1999, 2000, 2001, 2002, 2004 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. */ + +#include +#include +#include + +#include +#include +#include + +/* Return the system page size. The return value will depend on how + the kernel is configured. A program must use this call to + determine the page size to ensure proper alignment for calls such + as mmap and friends. --davidm 99/11/30 */ + +int +__getpagesize () +{ + assert (GLRO(dl_pagesize) != 0); + return GLRO(dl_pagesize); +} +libc_hidden_def (__getpagesize) +weak_alias (__getpagesize, getpagesize) diff --git a/sysdeps/unix/sysv/linux/ia64/has_cpuclock.c b/sysdeps/unix/sysv/linux/ia64/has_cpuclock.c new file mode 100644 index 0000000000..39511cd2c5 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/has_cpuclock.c @@ -0,0 +1,52 @@ +/* Copyright (C) 2000, 2001, 2003, 2004, 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 + 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. */ + +#include +#include +#include +#include +#include +#include + +static int itc_usable; + +static int +has_cpuclock (void) +{ + if (__builtin_expect (itc_usable == 0, 0)) + { + int newval = 1; + int fd = open_not_cancel_2 ("/proc/sal/itc_drift", O_RDONLY); + if (__builtin_expect (fd != -1, 1)) + { + char buf[16]; + /* We expect the file to contain a single digit followed by + a newline. If the format changes we better not rely on + the file content. */ + if (read_not_cancel (fd, buf, sizeof buf) != 2 + || buf[0] != '0' || buf[1] != '\n') + newval = -1; + + close_not_cancel_no_status (fd); + } + + itc_usable = newval; + } + + return itc_usable; +} diff --git a/sysdeps/unix/sysv/linux/ia64/ioperm.c b/sysdeps/unix/sysv/linux/ia64/ioperm.c new file mode 100644 index 0000000000..89a0a36d3d --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/ioperm.c @@ -0,0 +1,217 @@ +/* Copyright (C) 1999, 2000, 2001, 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Mosberger-Tang . + + 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. */ + +/* I/O access is restricted to ISA port space (ports 0..65535). + Modern devices hopefully are sane enough not to put any performance + critical registers in i/o space. + + On the first call to ioperm() or iopl(), the entire (E)ISA port + space is mapped into the virtual address space at address io.base. + mprotect() calls are then used to enable/disable access to ports. + Per 4KB page, there are 4 I/O ports. */ + +#include +#include +#include +#include +#include +#include + +#include +#include + +#define MAX_PORT 0x10000 + +/* + * Memory fence w/accept. This should never be used in code that is + * not IA-64 specific. + */ +#define __ia64_mf_a() __asm__ __volatile__ ("mf.a" ::: "memory") + +static struct + { + unsigned long int base; + unsigned long int page_mask; + } +io; + +__inline__ unsigned long int +io_offset (unsigned long int port) +{ + return ((port >> 2) << 12) | (port & 0xfff); +} + +int +_ioperm (unsigned long int from, unsigned long int num, int turn_on) +{ +#if 0 + unsigned long int addr, len, base; +#endif + unsigned long int base; + int prot; + + /* this test isn't as silly as it may look like; consider overflows! */ + if (from >= MAX_PORT || from + num > MAX_PORT) + { + __set_errno (EINVAL); + return -1; + } + + if (turn_on) + { + if (!io.base) + { + unsigned long phys_io_base, len; + int fd; + + io.page_mask = ~(__getpagesize() - 1); + + /* get I/O base physical address from ar.k0 as per PRM: */ + __asm__ ("mov %0=ar.k0" : "=r"(phys_io_base)); + + /* The O_SYNC flag tells the /dev/mem driver to map the + memory uncached: */ + fd = __open ("/dev/mem", O_RDWR | O_SYNC); + if (fd < 0) + return -1; + + len = io_offset (MAX_PORT); +#if 1 + /* see comment below */ + base = (unsigned long int) __mmap (0, len, PROT_READ | PROT_WRITE, MAP_SHARED, + fd, phys_io_base); +#else + base = (unsigned long int) __mmap (0, len, PROT_NONE, MAP_SHARED, + fd, phys_io_base); +#endif + __close (fd); + + if ((long) base == -1) + return -1; + + io.base = base; + } + prot = PROT_READ | PROT_WRITE; + } + else + { + if (!io.base) + return 0; /* never was turned on... */ + + prot = PROT_NONE; + } +#if 0 + /* We can't do mprotect because that would cause us to lose the + uncached flag that the /dev/mem driver turned on. A MAP_UNCACHED + flag seems so much cleaner... */ + addr = (io.base + io_offset (from)) & io.page_mask; + len = io.base + io_offset (from + num) - addr; + return mprotect ((void *) addr, len, prot); +#else + return 0; +#endif +} + +int +_iopl (unsigned int level) +{ + if (level > 3) + { + __set_errno (EINVAL); + return -1; + } + if (level) + { + int retval = _ioperm (0, MAX_PORT, 1); + /* Match the documented error returns of the x86 version. */ + if (retval < 0 && errno == EACCES) + __set_errno (EPERM); + return retval; + } + return 0; +} + +unsigned int +_inb (unsigned long int port) +{ + volatile unsigned char *addr = (void *) io.base + io_offset (port); + unsigned char ret; + + ret = *addr; + __ia64_mf_a(); + return ret; +} + +unsigned int +_inw (unsigned long int port) +{ + volatile unsigned short *addr = (void *) io.base + io_offset (port); + unsigned short ret; + + ret = *addr; + __ia64_mf_a(); + return ret; +} + +unsigned int +_inl (unsigned long int port) +{ + volatile unsigned int *addr = (void *) io.base + io_offset (port); + unsigned int ret; + + ret = *addr; + __ia64_mf_a(); + return ret; +} + +void +_outb (unsigned char val, unsigned long int port) +{ + volatile unsigned char *addr = (void *) io.base + io_offset (port); + + *addr = val; + __ia64_mf_a(); +} + +void +_outw (unsigned short val, unsigned long int port) +{ + volatile unsigned short *addr = (void *) io.base + io_offset (port); + + *addr = val; + __ia64_mf_a(); +} + +void +_outl (unsigned int val, unsigned long int port) +{ + volatile unsigned int *addr = (void *) io.base + io_offset (port); + + *addr = val; + __ia64_mf_a(); +} + +weak_alias (_ioperm, ioperm); +weak_alias (_iopl, iopl); +weak_alias (_inb, inb); +weak_alias (_inw, inw); +weak_alias (_inl, inl); +weak_alias (_outb, outb); +weak_alias (_outw, outw); +weak_alias (_outl, outl); diff --git a/sysdeps/unix/sysv/linux/ia64/kernel_stat.h b/sysdeps/unix/sysv/linux/ia64/kernel_stat.h new file mode 100644 index 0000000000..ef11dc94d4 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/kernel_stat.h @@ -0,0 +1,21 @@ +/* Definition of `struct stat' used in the kernel. + Copyright (C) 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. */ + +#define STAT_IS_KERNEL_STAT 1 +#define XSTAT_IS_XSTAT64 1 diff --git a/sysdeps/unix/sysv/linux/ia64/ldconfig.h b/sysdeps/unix/sysv/linux/ia64/ldconfig.h new file mode 100644 index 0000000000..af194898ba --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/ldconfig.h @@ -0,0 +1,25 @@ +/* Copyright (C) 2001 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. */ + +#include + +#define SYSDEP_KNOWN_INTERPRETER_NAMES \ + { "/lib/ld-linux.so.2", FLAG_ELF_LIBC6 }, +#define SYSDEP_KNOWN_LIBRARY_NAMES \ + { "libc.so.6", FLAG_ELF_LIBC6 }, \ + { "libm.so.6", FLAG_ELF_LIBC6 }, diff --git a/sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed b/sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed new file mode 100644 index 0000000000..535d1671e3 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed @@ -0,0 +1 @@ +s_^\(RTLDLIST=\)\([^ ]*\)-ia64\(\.so\.[0-9.]*\)[ ]*$_\1"\2-ia64\3 \2\3"_ diff --git a/sysdeps/unix/sysv/linux/ia64/ldsodefs.h b/sysdeps/unix/sysv/linux/ia64/ldsodefs.h new file mode 100644 index 0000000000..31af62491e --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/ldsodefs.h @@ -0,0 +1,33 @@ +/* Run-time dynamic linker data structures for loaded ELF shared objects. IA64. + Copyright (C) 2001 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 _LDSODEFS_H + +/* Get the real definitions. */ +#include_next + +/* Now define our stuff. */ + +/* We need special support to initialize DSO loaded for statically linked + binaries. */ +extern void _dl_static_init (struct link_map *map); +#undef DL_STATIC_INIT +#define DL_STATIC_INIT(map) _dl_static_init (map) + +#endif /* ldsodefs.h */ diff --git a/sysdeps/unix/sysv/linux/ia64/makecontext.c b/sysdeps/unix/sysv/linux/ia64/makecontext.c new file mode 100644 index 0000000000..d7a2a9f15d --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/makecontext.c @@ -0,0 +1,93 @@ +/* Copyright (C) 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Mosberger-Tang . + + 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. */ + +#include +#include +#include +#include +#include +#include + + +struct fdesc + { + unsigned long ip; + unsigned long gp; + }; + +#define PUSH(val) \ +do { \ + if (ia64_rse_is_rnat_slot (rbs)) \ + *rbs++ = 0; \ + *rbs++ = (val); \ +} while (0) + + +/* This implementation can handle an ARGC value of at most 8 and + values can be passed only in integer registers (r32-r39). */ + +void +__makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...) +{ + struct sigcontext *sc = &ucp->uc_mcontext; + extern void __start_context (ucontext_t *link, long gp, ...); + unsigned long stack_start, stack_end; + va_list ap; + long *rbs; + int i; + + stack_start = (long) sc->sc_stack.ss_sp; + stack_end = (long) sc->sc_stack.ss_sp + sc->sc_stack.ss_size; + + stack_start = (stack_start + 7) & -8; + stack_end = stack_end & -16; + + if (argc > 8) + { + fprintf (stderr, _("\ +makecontext: does not know how to handle more than 8 arguments\n")); + exit (-1); + } + + /* set the entry point and global pointer: */ + sc->sc_br[0] = ((struct fdesc *) &__start_context)->ip; + sc->sc_br[1] = ((struct fdesc *) func)->ip; + sc->sc_gr[1] = ((struct fdesc *) func)->gp; + + /* set up the call frame: */ + sc->sc_ar_pfs = ((sc->sc_ar_pfs & ~0x3fffffffffUL) + | (argc + 2) | ((argc + 2) << 7)); + rbs = (long *) stack_start; + PUSH((long) ucp->uc_link); + PUSH(((struct fdesc *) &__start_context)->gp); + va_start (ap, argc); + for (i = 0; i < argc; ++i) + PUSH(va_arg (ap, long)); + va_end (ap); + + /* set the memory and register stack pointers: */ + sc->sc_ar_bsp = (long) rbs; + sc->sc_gr[12] = stack_end - 16; + + /* clear the NaT bits for r1 and r12: */ + sc->sc_nat &= ~((1 << 1) | (1 << 12)); + sc->sc_ar_rnat = 0; +} + +weak_alias (__makecontext, makecontext) diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/Makefile b/sysdeps/unix/sysv/linux/ia64/nptl/Makefile new file mode 100644 index 0000000000..ff98f1a494 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/nptl/Makefile @@ -0,0 +1,3 @@ +ifeq ($(subdir),nptl) +libpthread-sysdep_routines += __ia64_longjmp unwind_longjmp __sigstack_longjmp +endif diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/Versions b/sysdeps/unix/sysv/linux/ia64/nptl/Versions new file mode 100644 index 0000000000..437c4da28b --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/nptl/Versions @@ -0,0 +1,13 @@ +libpthread { + GLIBC_2.3.3 { + # Changed PTHREAD_STACK_MIN. + pthread_attr_setstack; pthread_attr_setstacksize; + } +} +librt { + GLIBC_2.3.3 { + # Changed timer_t. + timer_create; timer_delete; timer_getoverrun; timer_gettime; + timer_settime; + } +} diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/__ia64_longjmp.S b/sysdeps/unix/sysv/linux/ia64/nptl/__ia64_longjmp.S new file mode 100644 index 0000000000..a1120d4d72 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/nptl/__ia64_longjmp.S @@ -0,0 +1,159 @@ +/* Copyright (C) 1999, 2000, 2001, 2004, 2005 Free Software Foundation, Inc. + Contributed by David Mosberger-Tang . + + 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. */ + +#include +#include + +LEAF(__ia64_flush_rbs) + flushrs + mov r9 = ar.rsc // 12 cyc latency + ;; + mov r8 = ar.bsp // 12 cyc latency + ;; + and r16 = ~0x3, r9 // clear ar.rsc.mode + ;; + mov ar.rsc = r16 // put RSE into enforced-lazy mode + ;; + mov r10 = ar.rnat // 5 cyc latency + ret +END(__ia64_flush_rbs) + + +# define pPos p6 /* is rotate count positive? */ +# define pNeg p7 /* is rotate count negative? */ + +/* __ia64_longjmp(__jmp_buf buf, int val, long rnat, long rsc) */ + + +LEAF(__ia64_longjmp) + alloc r8=ar.pfs,4,0,0,0 + add r2=0x98,in0 // r2 <- &jmpbuf.orig_jmp_buf_addr + add r3=0x88,in0 // r3 <- &jmpbuf.ar_bsp + ;; + ld8 r8=[r2] // r8 <- orig_jmp_buf_addr + ld8 r23=[r3],8 // r23 <- jmpbuf.ar_bsp + mov r2=in0 + ;; + // + // Note: we need to redo the "flushrs" here even though it's + // already been done by __ia64_flush_rbs. It is needed to + // ensure that ar.bspstore == ar.bsp. + // + flushrs // flush dirty regs to backing store + ld8 r25=[r3] // r25 <- jmpbuf.ar_unat + sub r8=r8,in0 // r8 <- &orig_jmpbuf - &jmpbuf + ;; + add r3=8,in0 // r3 <- &jmpbuf.r1 + extr.u r8=r8,3,6 // r8 <- (&orig_jmpbuf - &jmpbuf)/8 & 0x3f + ;; + cmp.lt pNeg,pPos=r8,r0 + ;; +(pPos) mov r16=r8 +(pNeg) add r16=64,r8 +(pPos) sub r17=64,r8 +(pNeg) sub r17=r0,r8 + ;; + shr.u r8=r25,r16 + shl r9=r25,r17 + ;; + or r25=r8,r9 + ;; + mov ar.unat=r25 // setup ar.unat (NaT bits for r1, r4-r7, and r12) + ;; + ld8.fill.nta sp=[r2],16 // r12 (sp) + ld8.fill.nta gp=[r3],16 // r1 (gp) + dep r11=-1,r23,3,6 // r11 <- ia64_rse_rnat_addr(jmpbuf.ar_bsp) + ;; + ld8.nta r16=[r2],16 // caller's unat + ld8.nta r17=[r3],16 // fpsr + ;; + ld8.fill.nta r4=[r2],16 // r4 + ld8.fill.nta r5=[r3],16 // r5 (gp) + ;; + ld8.fill.nta r6=[r2],16 // r6 + ld8.fill.nta r7=[r3],16 // r7 + ;; + mov ar.unat=r16 // restore caller's unat + mov ar.fpsr=r17 // restore fpsr + ;; + ld8.nta r16=[r2],16 // b0 + ld8.nta r17=[r3],16 // b1 + ;; + mov ar.bspstore=r23 // restore ar.bspstore + ld8.nta r18=[r2],16 // b2 + ;; + mov ar.rnat=in2 // restore ar.rnat + ld8.nta r19=[r3],16 // b3 + ;; + ld8.nta r20=[r2],16 // b4 + ld8.nta r21=[r3],16 // b5 +#ifdef PTR_DEMANGLE + PTR_DEMANGLE (r16, r24) +#endif + ;; + ld8.nta r11=[r2],16 // ar.pfs + ld8.nta r22=[r3],56 // ar.lc + ;; + ld8.nta r24=[r2],32 // pr + mov ar.rsc=in3 // restore ar.rsc + mov b0=r16 + ;; + ldf.fill.nta f2=[r2],32 + ldf.fill.nta f3=[r3],32 + mov b1=r17 + ;; + ldf.fill.nta f4=[r2],32 + ldf.fill.nta f5=[r3],32 + mov b2=r18 + ;; + ldf.fill.nta f16=[r2],32 + ldf.fill.nta f17=[r3],32 + mov b3=r19 + ;; + ldf.fill.nta f18=[r2],32 + ldf.fill.nta f19=[r3],32 + mov b4=r20 + ;; + ldf.fill.nta f20=[r2],32 + ldf.fill.nta f21=[r3],32 + mov b5=r21 + ;; + ldf.fill.nta f22=[r2],32 + ldf.fill.nta f23=[r3],32 + mov ar.lc=r22 + ;; + ldf.fill.nta f24=[r2],32 + ldf.fill.nta f25=[r3],32 + cmp.eq p8,p9=0,in1 + ;; + ldf.fill.nta f26=[r2],32 + ldf.fill.nta f27=[r3],32 + mov ar.pfs=r11 + ;; + ldf.fill.nta f28=[r2],32 + ldf.fill.nta f29=[r3],32 +(p8) mov r8=1 + ;; + ldf.fill.nta f30=[r2] + ldf.fill.nta f31=[r3] +(p9) mov r8=in1 + + invala // virt. -> phys. regnum mapping may change + mov pr=r24,-1 + ret +END(__ia64_longjmp) diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/__sigstack_longjmp.c b/sysdeps/unix/sysv/linux/ia64/nptl/__sigstack_longjmp.c new file mode 100644 index 0000000000..8f552eaad4 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/nptl/__sigstack_longjmp.c @@ -0,0 +1,168 @@ +/* Copyright (C) 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Mosberger-Tang . + + 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. */ + +/* The public __longjmp() implementation is limited to jumping within + the same stack. That is, in general it is not possible to use this + __longjmp() implementation to cross from one stack to another. + In constrast, the __sigstack_longjmp() implemented here allows + crossing from the alternate signal stack to the normal stack + as a special case. */ + +#include +#include +#include +#include +#include + +#include +#include + +#define JB_SP 0 +#define JB_BSP 17 + +struct rbs_flush_values + { + unsigned long bsp; + unsigned long rsc; + unsigned long rnat; + }; + +extern struct rbs_flush_values __ia64_flush_rbs (void); +extern void __ia64_longjmp (__jmp_buf buf, int val, long rnat, long rsc) + __attribute__ ((__noreturn__)); + +static void +copy_rbs (unsigned long *dst, unsigned long *dst_end, unsigned long dst_rnat, + unsigned long *src, unsigned long *src_end, + unsigned long current_rnat) +{ + unsigned long dst_slot, src_rnat = 0, src_slot, *src_rnat_addr, nat_bit; + int first_time = 1; + + while (dst < dst_end) + { + dst_slot = ia64_rse_slot_num (dst); + if (dst_slot == 63) + { + *dst++ = dst_rnat; + dst_rnat = 0; + } + else + { + /* read source value, including NaT bit: */ + src_slot = ia64_rse_slot_num (src); + if (src_slot == 63) + { + /* skip src RNaT slot */ + ++src; + src_slot = 0; + } + if (first_time || src_slot == 0) + { + first_time = 0; + src_rnat_addr = ia64_rse_rnat_addr (src); + if (src_rnat_addr < src_end) + src_rnat = *src_rnat_addr; + else + src_rnat = current_rnat; + } + nat_bit = (src_rnat >> src_slot) & 1; + + assert (src < src_end); + + *dst++ = *src++; + if (nat_bit) + dst_rnat |= (1UL << dst_slot); + else + dst_rnat &= ~(1UL << dst_slot); + } + } + dst_slot = ia64_rse_slot_num (dst); + if (dst_slot > 0) + *ia64_rse_rnat_addr (dst) = dst_rnat; +} + +void +__sigstack_longjmp (__jmp_buf buf, int val) +{ + unsigned long *rbs_base, *bsp, *bspstore, *jb_bsp, jb_sp, ss_sp; + unsigned long ndirty, rnat, load_rnat, *jb_rnat_addr; + struct sigcontext *sc; + stack_t stk; + struct rbs_flush_values c; + + /* put RSE into enforced-lazy mode and return current bsp/rsc/rnat: */ + c = __ia64_flush_rbs (); + + jb_sp = ((unsigned long *) buf)[JB_SP]; + jb_bsp = ((unsigned long **) buf)[JB_BSP]; + + INTERNAL_SYSCALL_DECL (err); + (void) INTERNAL_SYSCALL (sigaltstack, err, 2, NULL, &stk); + + ss_sp = (unsigned long) stk.ss_sp; + jb_rnat_addr = ia64_rse_rnat_addr (jb_bsp); + + if ((stk.ss_flags & SS_ONSTACK) == 0 || jb_sp - ss_sp < stk.ss_size) + /* Normal non-stack-crossing longjmp; if the RNaT slot for the bsp + saved in the jump-buffer is the same as the one for the current + BSP, use the current AR.RNAT value, otherwise, load it from the + jump-buffer's RNaT-slot. */ + load_rnat = (ia64_rse_rnat_addr ((unsigned long *) c.bsp) != jb_rnat_addr); + else + { + /* If we are on the alternate signal-stack and the jump-buffer + lies outside the signal-stack, we may need to copy back the + dirty partition which was torn off and saved on the + signal-stack when the signal was delivered. + + Caveat: we assume that the top of the alternate signal-stack + stores the sigcontext structure of the signal that + caused the switch to the signal-stack. This should + be a fairly safe assumption but the kernel _could_ + do things differently.. */ + sc = ((struct sigcontext *) ((ss_sp + stk.ss_size) & -16) - 1); + + /* As a sanity-check, verify that the register-backing-store base + of the alternate signal-stack is where we expect it. */ + rbs_base = (unsigned long *) + ((ss_sp + sizeof (long) - 1) & -sizeof (long)); + + assert ((unsigned long) rbs_base == sc->sc_rbs_base); + + ndirty = ia64_rse_num_regs (rbs_base, rbs_base + (sc->sc_loadrs >> 19)); + bsp = (unsigned long *) sc->sc_ar_bsp; + bspstore = ia64_rse_skip_regs (bsp, -ndirty); + + if (bspstore < jb_bsp) + /* AR.BSPSTORE at the time of the signal was below the value + of AR.BSP saved in the jump-buffer => copy the missing + portion from the torn off dirty partition which got saved + on the alternate signal-stack. */ + copy_rbs (bspstore, jb_bsp, sc->sc_ar_rnat, + rbs_base, (unsigned long *) c.bsp, c.rnat); + + load_rnat = 1; + } + if (load_rnat) + rnat = *jb_rnat_addr; + else + rnat = c.rnat; + __ia64_longjmp (buf, val, rnat, c.rsc); +} diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/bits/local_lim.h b/sysdeps/unix/sysv/linux/ia64/nptl/bits/local_lim.h new file mode 100644 index 0000000000..4b8a035042 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/nptl/bits/local_lim.h @@ -0,0 +1,100 @@ +/* Minimum guaranteed maximum values for system limits. Linux/IA-64 version. + Copyright (C) 1993-1998,2000,2002-2004,2008 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* The kernel header pollutes the namespace with the NR_OPEN symbol + and defines LINK_MAX although filesystems have different maxima. A + similar thing is true for OPEN_MAX: the limit can be changed at + runtime and therefore the macro must not be defined. Remove this + after including the header if necessary. */ +#ifndef NR_OPEN +# define __undef_NR_OPEN +#endif +#ifndef LINK_MAX +# define __undef_LINK_MAX +#endif +#ifndef OPEN_MAX +# define __undef_OPEN_MAX +#endif +#ifndef ARG_MAX +# define __undef_ARG_MAX +#endif + +/* The kernel sources contain a file with all the needed information. */ +#include + +/* Have to remove NR_OPEN? */ +#ifdef __undef_NR_OPEN +# undef NR_OPEN +# undef __undef_NR_OPEN +#endif +/* Have to remove LINK_MAX? */ +#ifdef __undef_LINK_MAX +# undef LINK_MAX +# undef __undef_LINK_MAX +#endif +/* Have to remove OPEN_MAX? */ +#ifdef __undef_OPEN_MAX +# undef OPEN_MAX +# undef __undef_OPEN_MAX +#endif +/* Have to remove ARG_MAX? */ +#ifdef __undef_ARG_MAX +# undef ARG_MAX +# undef __undef_ARG_MAX +#endif + +/* The number of data keys per process. */ +#define _POSIX_THREAD_KEYS_MAX 128 +/* This is the value this implementation supports. */ +#define PTHREAD_KEYS_MAX 1024 + +/* Controlling the iterations of destructors for thread-specific data. */ +#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 +/* Number of iterations this implementation does. */ +#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS + +/* The number of threads per process. */ +#define _POSIX_THREAD_THREADS_MAX 64 +/* We have no predefined limit on the number of threads. */ +#undef PTHREAD_THREADS_MAX + +/* Maximum amount by which a process can descrease its asynchronous I/O + priority level. */ +#define AIO_PRIO_DELTA_MAX 20 + +/* Minimum size for a thread. We are free to choose a reasonable value. */ +#define PTHREAD_STACK_MIN 196608 + +/* Maximum number of timer expiration overruns. */ +#define DELAYTIMER_MAX 2147483647 + +/* Maximum tty name length. */ +#define TTY_NAME_MAX 32 + +/* Maximum login name length. This is arbitrary. */ +#define LOGIN_NAME_MAX 256 + +/* Maximum host name length. */ +#define HOST_NAME_MAX 64 + +/* Maximum message queue priority level. */ +#define MQ_PRIO_MAX 32768 + +/* Maximum value the semaphore can have. */ +#define SEM_VALUE_MAX (2147483647) diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/ia64/nptl/bits/pthreadtypes.h new file mode 100644 index 0000000000..330717f079 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/nptl/bits/pthreadtypes.h @@ -0,0 +1,169 @@ +/* Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek , 2003. + + 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_PTHREADTYPES_H +#define _BITS_PTHREADTYPES_H 1 + +#define __SIZEOF_PTHREAD_ATTR_T 56 +#define __SIZEOF_PTHREAD_MUTEX_T 40 +#define __SIZEOF_PTHREAD_MUTEXATTR_T 4 +#define __SIZEOF_PTHREAD_COND_T 48 +#define __SIZEOF_PTHREAD_CONDATTR_T 4 +#define __SIZEOF_PTHREAD_RWLOCK_T 56 +#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 +#define __SIZEOF_PTHREAD_BARRIER_T 32 +#define __SIZEOF_PTHREAD_BARRIERATTR_T 4 + + +/* Thread identifiers. The structure of the attribute type is not + exposed on purpose. */ +typedef unsigned long int pthread_t; + + +typedef union +{ + char __size[__SIZEOF_PTHREAD_ATTR_T]; + long int __align; +} pthread_attr_t; + + +typedef struct __pthread_internal_list +{ + struct __pthread_internal_list *__prev; + struct __pthread_internal_list *__next; +} __pthread_list_t; + + +/* Data structures for mutex handling. The structure of the attribute + type is not exposed on purpose. */ +typedef union +{ + struct __pthread_mutex_s + { + int __lock; + unsigned int __count; + int __owner; + unsigned int __nusers; + /* KIND must stay at this position in the structure to maintain + binary compatibility. */ + int __kind; + int __spins; + __pthread_list_t __list; +#define __PTHREAD_MUTEX_HAVE_PREV 1 + } __data; + char __size[__SIZEOF_PTHREAD_MUTEX_T]; + long int __align; +} pthread_mutex_t; + +typedef union +{ + char __size[__SIZEOF_PTHREAD_MUTEXATTR_T]; + int __align; +} pthread_mutexattr_t; + + +/* Data structure for conditional variable handling. The structure of + the attribute type is not exposed on purpose. */ +typedef union +{ + struct + { + int __lock; + unsigned int __futex; + __extension__ unsigned long long int __total_seq; + __extension__ unsigned long long int __wakeup_seq; + __extension__ unsigned long long int __woken_seq; + void *__mutex; + unsigned int __nwaiters; + unsigned int __broadcast_seq; + } __data; + char __size[__SIZEOF_PTHREAD_COND_T]; + long int __align; +} pthread_cond_t; + +typedef union +{ + char __size[__SIZEOF_PTHREAD_CONDATTR_T]; + int __align; +} pthread_condattr_t; + + +/* Keys for thread-specific data */ +typedef unsigned int pthread_key_t; + + +/* Once-only execution */ +typedef int pthread_once_t; + + +#if defined __USE_UNIX98 || defined __USE_XOPEN2K +/* Data structure for read-write lock variable handling. The + structure of the attribute type is not exposed on purpose. */ +typedef union +{ + struct + { + int __lock; + unsigned int __nr_readers; + unsigned int __readers_wakeup; + unsigned int __writer_wakeup; + unsigned int __nr_readers_queued; + unsigned int __nr_writers_queued; + int __writer; + int __shared; + unsigned long int __pad1; + unsigned long int __pad2; + /* FLAGS must stay at this position in the structure to maintain + binary compatibility. */ + unsigned int __flags; + } __data; + char __size[__SIZEOF_PTHREAD_RWLOCK_T]; + long int __align; +} pthread_rwlock_t; + +typedef union +{ + char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T]; + long int __align; +} pthread_rwlockattr_t; +#endif + + +#ifdef __USE_XOPEN2K +/* POSIX spinlock data type. */ +typedef volatile int pthread_spinlock_t; + + +/* POSIX barriers data type. The structure of the type is + deliberately not exposed. */ +typedef union +{ + char __size[__SIZEOF_PTHREAD_BARRIER_T]; + long int __align; +} pthread_barrier_t; + +typedef union +{ + char __size[__SIZEOF_PTHREAD_BARRIERATTR_T]; + int __align; +} pthread_barrierattr_t; +#endif + + +#endif /* bits/pthreadtypes.h */ diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/bits/semaphore.h b/sysdeps/unix/sysv/linux/ia64/nptl/bits/semaphore.h new file mode 100644 index 0000000000..0684aebe24 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/nptl/bits/semaphore.h @@ -0,0 +1,36 @@ +/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2002. + + 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 _SEMAPHORE_H +# error "Never use directly; include instead." +#endif + + +#define __SIZEOF_SEM_T 32 + + +/* Value returned if `sem_open' failed. */ +#define SEM_FAILED ((sem_t *) 0) + + +typedef union +{ + char __size[__SIZEOF_SEM_T]; + long int __align; +} sem_t; diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/clone2.S b/sysdeps/unix/sysv/linux/ia64/nptl/clone2.S new file mode 100644 index 0000000000..91f28bab37 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/nptl/clone2.S @@ -0,0 +1,9 @@ +/* We want an #include_next, but we are the main source file. + So, #include ourselves and in that incarnation we can use #include_next. */ +#ifndef INCLUDED_SELF +# define INCLUDED_SELF +# include +#else +# define RESET_PID +# include_next +#endif diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/createthread.c b/sysdeps/unix/sysv/linux/ia64/nptl/createthread.c new file mode 100644 index 0000000000..cd5f8137d5 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/nptl/createthread.c @@ -0,0 +1,26 @@ +/* Copyright (C) 2003, 2005 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek . + + 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. */ + +/* Value passed to 'clone' for initialization of the thread register. */ +#define TLS_VALUE ((char *) pd + TLS_PRE_TCB_SIZE) + +#define ARCH_CLONE __clone2 + +/* Get the real implementation. */ +#include diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/dl-sysdep.h b/sysdeps/unix/sysv/linux/ia64/nptl/dl-sysdep.h new file mode 100644 index 0000000000..5c16bd7aea --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/nptl/dl-sysdep.h @@ -0,0 +1,77 @@ +/* System-specific settings for dynamic linker code. IA-64 version. + Copyright (C) 2003, 2004, 2006, 2008 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 _DL_SYSDEP_H +#define _DL_SYSDEP_H 1 + +/* This macro must be defined to either 0 or 1. + + If 1, then an errno global variable hidden in ld.so will work right with + all the errno-using libc code compiled for ld.so, and there is never a + need to share the errno location with libc. This is appropriate only if + all the libc functions that ld.so uses are called without PLT and always + get the versions linked into ld.so rather than the libc ones. */ + +#ifdef IS_IN_rtld +# define RTLD_PRIVATE_ERRNO 1 +#else +# define RTLD_PRIVATE_ERRNO 0 +#endif + +/* Traditionally system calls have been made using break 0x100000. A + second method was introduced which, if possible, will use the EPC + instruction. To signal the presence and where to find the code the + kernel passes an AT_SYSINFO_EHDR pointer in the auxiliary vector to + the application. */ +#define NEED_DL_SYSINFO 1 +#define USE_DL_SYSINFO 1 + +#if defined NEED_DL_SYSINFO && !defined __ASSEMBLER__ +/* Don't declare this as a function---we want it's entry-point, not + it's function descriptor... */ +extern int _dl_sysinfo_break attribute_hidden; +# define DL_SYSINFO_DEFAULT ((uintptr_t) &_dl_sysinfo_break) +# define DL_SYSINFO_IMPLEMENTATION \ + asm (".text\n\t" \ + ".hidden _dl_sysinfo_break\n\t" \ + ".proc _dl_sysinfo_break\n\t" \ + "_dl_sysinfo_break:\n\t" \ + ".prologue\n\t" \ + ".altrp b6\n\t" \ + ".body\n\t" \ + "break 0x100000;\n\t" \ + "br.ret.sptk.many b6;\n\t" \ + ".endp _dl_sysinfo_break\n\t" \ + ".previous"); +#endif + +/* _dl_argv cannot be attribute_relro, because _dl_start_user + might write into it after _dl_start returns. */ +#define DL_ARGV_NOT_RELRO 1 + + +/* The _dl_discover_osversion function is so far only needed in sysconf + to check for kernels later than 2.6.23. */ +#if !defined __ASSEMBLER__ && __LINUX_KERNEL_VERSION < 0x020617 +/* Get version of the OS. */ +extern int _dl_discover_osversion (void) attribute_hidden; +# define HAVE_DL_DISCOVER_OSVERSION 1 +#endif + +#endif /* dl-sysdep.h */ diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/fork.c b/sysdeps/unix/sysv/linux/ia64/nptl/fork.c new file mode 100644 index 0000000000..1502310f1d --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/nptl/fork.c @@ -0,0 +1,31 @@ +/* Copyright (C) 2003 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek , 2003. + + 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. */ + +#include +#include +#include +#include + + +#define ARCH_FORK() \ + INLINE_SYSCALL (clone2, 6, \ + CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID | SIGCHLD, \ + NULL, 0, NULL, &THREAD_SELF->tid, NULL) + +#include "../fork.c" diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/ia64/nptl/lowlevellock.h new file mode 100644 index 0000000000..b419c9a5e1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/nptl/lowlevellock.h @@ -0,0 +1,295 @@ +/* Copyright (C) 2003, 2004, 2006-2008, 2009 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek , 2003. + + 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 _LOWLEVELLOCK_H +#define _LOWLEVELLOCK_H 1 + +#include +#include +#include +#include +#include +#include + +#define __NR_futex 1230 +#define FUTEX_WAIT 0 +#define FUTEX_WAKE 1 +#define FUTEX_REQUEUE 3 +#define FUTEX_CMP_REQUEUE 4 +#define FUTEX_WAKE_OP 5 +#define FUTEX_OP_CLEAR_WAKE_IF_GT_ONE ((4 << 24) | 1) +#define FUTEX_LOCK_PI 6 +#define FUTEX_UNLOCK_PI 7 +#define FUTEX_TRYLOCK_PI 8 +#define FUTEX_WAIT_BITSET 9 +#define FUTEX_WAKE_BITSET 10 +#define FUTEX_PRIVATE_FLAG 128 +#define FUTEX_CLOCK_REALTIME 256 + +#define FUTEX_BITSET_MATCH_ANY 0xffffffff + +/* Values for 'private' parameter of locking macros. Yes, the + definition seems to be backwards. But it is not. The bit will be + reversed before passing to the system call. */ +#define LLL_PRIVATE 0 +#define LLL_SHARED FUTEX_PRIVATE_FLAG + + +#if !defined NOT_IN_libc || defined IS_IN_rtld +/* In libc.so or ld.so all futexes are private. */ +# ifdef __ASSUME_PRIVATE_FUTEX +# define __lll_private_flag(fl, private) \ + ((fl) | FUTEX_PRIVATE_FLAG) +# else +# define __lll_private_flag(fl, private) \ + ((fl) | THREAD_GETMEM (THREAD_SELF, header.private_futex)) +# endif +#else +# ifdef __ASSUME_PRIVATE_FUTEX +# define __lll_private_flag(fl, private) \ + (((fl) | FUTEX_PRIVATE_FLAG) ^ (private)) +# else +# define __lll_private_flag(fl, private) \ + (__builtin_constant_p (private) \ + ? ((private) == 0 \ + ? ((fl) | THREAD_GETMEM (THREAD_SELF, header.private_futex)) \ + : (fl)) \ + : ((fl) | (((private) ^ FUTEX_PRIVATE_FLAG) \ + & THREAD_GETMEM (THREAD_SELF, header.private_futex)))) +# endif +#endif + + +/* Delay in spinlock loop. */ +#define BUSY_WAIT_NOP asm ("hint @pause") + +#define lll_futex_wait(futex, val, private) \ + lll_futex_timed_wait (futex, val, NULL, private) + +#define lll_futex_timed_wait(ftx, val, timespec, private) \ +({ \ + DO_INLINE_SYSCALL(futex, 4, (long) (ftx), \ + __lll_private_flag (FUTEX_WAIT, private), \ + (int) (val), (long) (timespec)); \ + _r10 == -1 ? -_retval : _retval; \ +}) + +#define lll_futex_wake(ftx, nr, private) \ +({ \ + DO_INLINE_SYSCALL(futex, 3, (long) (ftx), \ + __lll_private_flag (FUTEX_WAKE, private), \ + (int) (nr)); \ + _r10 == -1 ? -_retval : _retval; \ +}) + +#define lll_robust_dead(futexv, private) \ +do \ + { \ + int *__futexp = &(futexv); \ + atomic_or (__futexp, FUTEX_OWNER_DIED); \ + DO_INLINE_SYSCALL(futex, 3, (long) __futexp, \ + __lll_private_flag (FUTEX_WAKE, private), 1); \ + } \ +while (0) + +/* Returns non-zero if error happened, zero if success. */ +#define lll_futex_requeue(ftx, nr_wake, nr_move, mutex, val, private) \ +({ \ + DO_INLINE_SYSCALL(futex, 6, (long) (ftx), \ + __lll_private_flag (FUTEX_CMP_REQUEUE, private), \ + (int) (nr_wake), (int) (nr_move), (long) (mutex), \ + (int) val); \ + _r10 == -1; \ +}) + +/* Returns non-zero if error happened, zero if success. */ +#define lll_futex_wake_unlock(ftx, nr_wake, nr_wake2, ftx2, private) \ +({ \ + DO_INLINE_SYSCALL(futex, 6, (long) (ftx), \ + __lll_private_flag (FUTEX_WAKE_OP, private), \ + (int) (nr_wake), (int) (nr_wake2), (long) (ftx2), \ + FUTEX_OP_CLEAR_WAKE_IF_GT_ONE); \ + _r10 == -1; \ +}) + + +#define __lll_trylock(futex) \ + (atomic_compare_and_exchange_val_acq (futex, 1, 0) != 0) +#define lll_trylock(futex) __lll_trylock (&(futex)) + + +#define __lll_robust_trylock(futex, id) \ + (atomic_compare_and_exchange_val_acq (futex, id, 0) != 0) +#define lll_robust_trylock(futex, id) \ + __lll_robust_trylock (&(futex), id) + + +#define __lll_cond_trylock(futex) \ + (atomic_compare_and_exchange_val_acq (futex, 2, 0) != 0) +#define lll_cond_trylock(futex) __lll_cond_trylock (&(futex)) + + +extern void __lll_lock_wait_private (int *futex) attribute_hidden; +extern void __lll_lock_wait (int *futex, int private) attribute_hidden; +extern int __lll_robust_lock_wait (int *futex, int private) attribute_hidden; + + +#define __lll_lock(futex, private) \ + ((void) ({ \ + int *__futex = (futex); \ + if (__builtin_expect (atomic_compare_and_exchange_bool_acq (__futex, \ + 1, 0), 0)) \ + { \ + if (__builtin_constant_p (private) && (private) == LLL_PRIVATE) \ + __lll_lock_wait_private (__futex); \ + else \ + __lll_lock_wait (__futex, private); \ + } \ + })) +#define lll_lock(futex, private) __lll_lock (&(futex), private) + + +#define __lll_robust_lock(futex, id, private) \ + ({ \ + int *__futex = (futex); \ + int __val = 0; \ + \ + if (__builtin_expect (atomic_compare_and_exchange_bool_acq (__futex, id, \ + 0), 0)) \ + __val = __lll_robust_lock_wait (__futex, private); \ + __val; \ + }) +#define lll_robust_lock(futex, id, private) \ + __lll_robust_lock (&(futex), id, private) + + +#define __lll_cond_lock(futex, private) \ + ((void) ({ \ + int *__futex = (futex); \ + if (__builtin_expect (atomic_compare_and_exchange_bool_acq (__futex, 2, \ + 0), 0)) \ + __lll_lock_wait (__futex, private); \ + })) +#define lll_cond_lock(futex, private) __lll_cond_lock (&(futex), private) + + +#define __lll_robust_cond_lock(futex, id, private) \ + ({ \ + int *__futex = (futex); \ + int __val = 0; \ + int __id = (id) | FUTEX_WAITERS; \ + \ + if (__builtin_expect (atomic_compare_and_exchange_bool_acq (__futex, \ + __id, 0), 0)) \ + __val = __lll_robust_lock_wait (__futex, private); \ + __val; \ + }) +#define lll_robust_cond_lock(futex, id, private) \ + __lll_robust_cond_lock (&(futex), id, private) + + +extern int __lll_timedlock_wait (int *futex, const struct timespec *, + int private) attribute_hidden; +extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *, + int private) attribute_hidden; + + +#define __lll_timedlock(futex, abstime, private) \ + ({ \ + int *__futex = (futex); \ + int __val = 0; \ + \ + if (__builtin_expect (atomic_compare_and_exchange_bool_acq (__futex, 1, \ + 0), 0)) \ + __val = __lll_timedlock_wait (__futex, abstime, private); \ + __val; \ + }) +#define lll_timedlock(futex, abstime, private) \ + __lll_timedlock (&(futex), abstime, private) + + +#define __lll_robust_timedlock(futex, abstime, id, private) \ + ({ \ + int *__futex = (futex); \ + int __val = 0; \ + \ + if (__builtin_expect (atomic_compare_and_exchange_bool_acq (__futex, id, \ + 0), 0)) \ + __val = __lll_robust_timedlock_wait (__futex, abstime, private); \ + __val; \ + }) +#define lll_robust_timedlock(futex, abstime, id, private) \ + __lll_robust_timedlock (&(futex), abstime, id, private) + + +#define __lll_unlock(futex, private) \ + ((void) ({ \ + int *__futex = (futex); \ + int __val = atomic_exchange_rel (__futex, 0); \ + \ + if (__builtin_expect (__val > 1, 0)) \ + lll_futex_wake (__futex, 1, private); \ + })) +#define lll_unlock(futex, private) __lll_unlock(&(futex), private) + + +#define __lll_robust_unlock(futex, private) \ + ((void) ({ \ + int *__futex = (futex); \ + int __val = atomic_exchange_rel (__futex, 0); \ + \ + if (__builtin_expect (__val & FUTEX_WAITERS, 0)) \ + lll_futex_wake (__futex, 1, private); \ + })) +#define lll_robust_unlock(futex, private) \ + __lll_robust_unlock(&(futex), private) + + +#define lll_islocked(futex) \ + (futex != 0) + +/* Initializers for lock. */ +#define LLL_LOCK_INITIALIZER (0) +#define LLL_LOCK_INITIALIZER_LOCKED (1) + +/* The kernel notifies a process with uses CLONE_CLEARTID via futex + wakeup when the clone terminates. The memory location contains the + thread ID while the clone is running and is reset to zero + afterwards. */ +#define lll_wait_tid(tid) \ + do \ + { \ + __typeof (tid) __tid; \ + while ((__tid = (tid)) != 0) \ + lll_futex_wait (&(tid), __tid, LLL_SHARED); \ + } \ + while (0) + +extern int __lll_timedwait_tid (int *, const struct timespec *) + attribute_hidden; + +#define lll_timedwait_tid(tid, abstime) \ + ({ \ + int __res = 0; \ + if ((tid) != 0) \ + __res = __lll_timedwait_tid (&(tid), (abstime)); \ + __res; \ + }) + +#endif /* lowlevellock.h */ diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/pt-initfini.c b/sysdeps/unix/sysv/linux/ia64/nptl/pt-initfini.c new file mode 100644 index 0000000000..b6d2cec0d0 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/nptl/pt-initfini.c @@ -0,0 +1,50 @@ +/* Special .init and .fini section support for ia64. NPTL version. + Copyright (C) 2000, 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 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. + + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + 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; see the file COPYING.LIB. If not, + write to the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* This file is compiled into assembly code which is then munged by a sed + script into two files: crti.s and crtn.s. + + * crti.s puts a function prologue at the beginning of the + .init and .fini sections and defines global symbols for + those addresses, so they can be called as functions. + + * crtn.s puts the corresponding function epilogues + in the .init and .fini sections. */ + +#include + + +__asm__ ("\n\ +#include \"defs.h\"\n\ +\n\ +/*@HEADER_ENDS*/\n\ +\n\ +/*@_init_PROLOG_BEGINS*/\n\ + .xdata8 \".init_array\",@fptr(__pthread_initialize_minimal_internal)\n\ +/*@_init_PROLOG_ENDS*/\n\ +"); diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/pt-vfork.S b/sysdeps/unix/sysv/linux/ia64/nptl/pt-vfork.S new file mode 100644 index 0000000000..a285280038 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/nptl/pt-vfork.S @@ -0,0 +1,60 @@ +/* Copyright (C) 2000, 2002, 2003, 2004 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. */ + + +#include +#define _SIGNAL_H +#include +#include + +/* The following are defined in linux/sched.h, which unfortunately */ +/* is not safe for inclusion in an assembly file. */ +#define CLONE_VM 0x00000100 /* set if VM shared between processes */ +#define CLONE_VFORK 0x00004000 /* set if the parent wants the child to wake it up on mm_release */ + +/* pid_t vfork(void); */ +/* Implemented as __clone_syscall(CLONE_VFORK | CLONE_VM | SIGCHLD, 0) */ + +ENTRY(__vfork) + .prologue // work around a GAS bug which triggers if + .body // first .prologue is not at the beginning of proc. + alloc r2=ar.pfs,0,0,2,0 + adds r14=PID,r13 + ;; + ld4 r16=[r14] + ;; + sub r15=0,r16 + mov out0=CLONE_VM+CLONE_VFORK+SIGCHLD + mov out1=0 /* Standard sp value. */ + ;; + st4 [r14]=r15 + DO_CALL (SYS_ify (clone)) + cmp.eq p0,p7=0,r8 + adds r14=PID,r13 + ;; +(p7) ld4 r16=[r14] + cmp.eq p6,p0=-1,r10 + ;; +(p7) sub r15=0,r16 + ;; +(p7) st4 [r14]=r15 +(p6) br.cond.spnt.few __syscall_error + ret +PSEUDO_END(__vfork) + +weak_alias (__vfork, vfork) diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/pthread_once.c b/sysdeps/unix/sysv/linux/ia64/nptl/pthread_once.c new file mode 100644 index 0000000000..22e2dd3c0c --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/nptl/pthread_once.c @@ -0,0 +1,94 @@ +/* Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek , 2003. + + 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. */ + +#include "pthreadP.h" +#include + + +unsigned long int __fork_generation attribute_hidden; + + +static void +clear_once_control (void *arg) +{ + pthread_once_t *once_control = (pthread_once_t *) arg; + + *once_control = 0; + lll_futex_wake (once_control, INT_MAX, LLL_PRIVATE); +} + + +int +__pthread_once (once_control, init_routine) + pthread_once_t *once_control; + void (*init_routine) (void); +{ + while (1) + { + int oldval, val, newval; + + val = *once_control; + do + { + /* Check if the initialized has already been done. */ + if ((val & 2) != 0) + return 0; + + oldval = val; + newval = (oldval & 3) | __fork_generation | 1; + val = atomic_compare_and_exchange_val_acq (once_control, newval, + oldval); + } + while (__builtin_expect (val != oldval, 0)); + + /* Check if another thread already runs the initializer. */ + if ((oldval & 1) != 0) + { + /* Check whether the initializer execution was interrupted + by a fork. */ + if (((oldval ^ newval) & -4) == 0) + { + /* Same generation, some other thread was faster. Wait. */ + lll_futex_wait (once_control, newval, LLL_PRIVATE); + continue; + } + } + + /* This thread is the first here. Do the initialization. + Register a cleanup handler so that in case the thread gets + interrupted the initialization can be restarted. */ + pthread_cleanup_push (clear_once_control, once_control); + + init_routine (); + + pthread_cleanup_pop (0); + + + /* Add one to *once_control. */ + atomic_increment (once_control); + + /* Wake up all other threads. */ + lll_futex_wake (once_control, INT_MAX, LLL_PRIVATE); + break; + } + + return 0; +} +weak_alias (__pthread_once, pthread_once) +strong_alias (__pthread_once, __pthread_once_internal) diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/ia64/nptl/sysdep-cancel.h new file mode 100644 index 0000000000..8687ba46ab --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/nptl/sysdep-cancel.h @@ -0,0 +1,205 @@ +/* Copyright (C) 2002, 2003, 2004, 2006, 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek , 2002. + + 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. */ + +#include +#include +#ifndef __ASSEMBLER__ +# include +#endif + +#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt + +# undef PSEUDO + +# ifndef NOT_IN_libc +# define SYSDEP_CANCEL_ERRNO __libc_errno +# else +# define SYSDEP_CANCEL_ERRNO errno +# endif +# define SYSDEP_CANCEL_ERROR(args) \ +.section .gnu.linkonce.t.__syscall_error_##args, "ax"; \ + .align 32; \ + .proc __syscall_error_##args; \ + .global __syscall_error_##args; \ + .hidden __syscall_error_##args; \ + .size __syscall_error_##args, 64; \ +__syscall_error_##args: \ + .prologue; \ + .regstk args, 5, args, 0; \ + .save ar.pfs, loc0; \ + .save rp, loc1; \ + .body; \ + addl loc4 = @ltoff(@tprel(SYSDEP_CANCEL_ERRNO)), gp;; \ + ld8 loc4 = [loc4]; \ + mov rp = loc1;; \ + mov r8 = -1; \ + add loc4 = loc4, r13;; \ + st4 [loc4] = loc3; \ + mov ar.pfs = loc0 + +# ifndef USE_DL_SYSINFO + +# define PSEUDO(name, syscall_name, args) \ +.text; \ +ENTRY (name) \ + adds r14 = MULTIPLE_THREADS_OFFSET, r13;; \ + ld4 r14 = [r14]; \ + mov r15 = SYS_ify(syscall_name);; \ + cmp4.ne p6, p7 = 0, r14; \ +(p6) br.cond.spnt .Lpseudo_cancel;; \ + break __BREAK_SYSCALL;; \ + cmp.eq p6,p0=-1,r10; \ +(p6) br.cond.spnt.few __syscall_error; \ + ret;; \ + .endp name; \ + .proc __GC_##name; \ + .globl __GC_##name; \ + .hidden __GC_##name; \ +__GC_##name: \ +.Lpseudo_cancel: \ + .prologue; \ + .regstk args, 5, args, 0; \ + .save ar.pfs, loc0; \ + alloc loc0 = ar.pfs, args, 5, args, 0; \ + .save rp, loc1; \ + mov loc1 = rp;; \ + .body; \ + CENABLE;; \ + mov loc2 = r8; \ + COPY_ARGS_##args \ + mov r15 = SYS_ify(syscall_name); \ + break __BREAK_SYSCALL;; \ + mov loc3 = r8; \ + mov loc4 = r10; \ + mov out0 = loc2; \ + CDISABLE;; \ + cmp.eq p6,p0=-1,loc4; \ +(p6) br.cond.spnt.few __syscall_error_##args; \ + mov r8 = loc3; \ + mov rp = loc1; \ + mov ar.pfs = loc0; \ +.Lpseudo_end: \ + ret; \ + .endp __GC_##name; \ + SYSDEP_CANCEL_ERROR(args) + +# else /* USE_DL_SYSINFO */ + +# define PSEUDO(name, syscall_name, args) \ +.text; \ +ENTRY (name) \ + .prologue; \ + adds r2 = SYSINFO_OFFSET, r13; \ + adds r14 = MULTIPLE_THREADS_OFFSET, r13; \ + .save ar.pfs, r11; \ + mov r11 = ar.pfs;; \ + .body; \ + ld4 r14 = [r14]; \ + ld8 r2 = [r2]; \ + mov r15 = SYS_ify(syscall_name);; \ + cmp4.ne p6, p7 = 0, r14; \ + mov b7 = r2; \ +(p6) br.cond.spnt .Lpseudo_cancel; \ + br.call.sptk.many b6 = b7;; \ + mov ar.pfs = r11; \ + cmp.eq p6,p0 = -1, r10; \ +(p6) br.cond.spnt.few __syscall_error; \ + ret;; \ + .endp name; \ + .proc __GC_##name; \ + .globl __GC_##name; \ + .hidden __GC_##name; \ +__GC_##name: \ +.Lpseudo_cancel: \ + .prologue; \ + .regstk args, 5, args, 0; \ + .save ar.pfs, loc0; \ + alloc loc0 = ar.pfs, args, 5, args, 0; \ + adds loc4 = SYSINFO_OFFSET, r13; \ + .save rp, loc1; \ + mov loc1 = rp;; \ + .body; \ + ld8 loc4 = [loc4]; \ + CENABLE;; \ + mov loc2 = r8; \ + mov b7 = loc4; \ + COPY_ARGS_##args \ + mov r15 = SYS_ify(syscall_name); \ + br.call.sptk.many b6 = b7;; \ + mov loc3 = r8; \ + mov loc4 = r10; \ + mov out0 = loc2; \ + CDISABLE;; \ + cmp.eq p6,p0=-1,loc4; \ +(p6) br.cond.spnt.few __syscall_error_##args; \ + mov r8 = loc3; \ + mov rp = loc1; \ + mov ar.pfs = loc0; \ +.Lpseudo_end: \ + ret; \ + .endp __GC_##name; \ + SYSDEP_CANCEL_ERROR(args) + +# endif /* USE_DL_SYSINFO */ + +# undef PSEUDO_END +# define PSEUDO_END(name) .endp + +# ifdef IS_IN_libpthread +# define CENABLE br.call.sptk.many b0 = __pthread_enable_asynccancel +# define CDISABLE br.call.sptk.many b0 = __pthread_disable_asynccancel +# elif !defined NOT_IN_libc +# define CENABLE br.call.sptk.many b0 = __libc_enable_asynccancel +# define CDISABLE br.call.sptk.many b0 = __libc_disable_asynccancel +# elif defined IS_IN_librt +# define CENABLE br.call.sptk.many b0 = __librt_enable_asynccancel +# define CDISABLE br.call.sptk.many b0 = __librt_disable_asynccancel +# else +# error Unsupported library +# endif + +# define COPY_ARGS_0 /* Nothing */ +# define COPY_ARGS_1 COPY_ARGS_0 mov out0 = in0; +# define COPY_ARGS_2 COPY_ARGS_1 mov out1 = in1; +# define COPY_ARGS_3 COPY_ARGS_2 mov out2 = in2; +# define COPY_ARGS_4 COPY_ARGS_3 mov out3 = in3; +# define COPY_ARGS_5 COPY_ARGS_4 mov out4 = in4; +# define COPY_ARGS_6 COPY_ARGS_5 mov out5 = in5; +# define COPY_ARGS_7 COPY_ARGS_6 mov out6 = in6; + +# ifndef __ASSEMBLER__ +# define SINGLE_THREAD_P \ + __builtin_expect (THREAD_GETMEM (THREAD_SELF, header.multiple_threads) == 0, 1) +# else +# define SINGLE_THREAD_P \ + adds r14 = MULTIPLE_THREADS_OFFSET, r13 ;; ld4 r14 = [r14] ;; cmp4.ne p6, p7 = 0, r14 +# endif + +#elif !defined __ASSEMBLER__ + +# define SINGLE_THREAD_P (1) +# define NO_CANCELLATION 1 + +#endif + +#ifndef __ASSEMBLER__ +# define RTLD_SINGLE_THREAD_P \ + __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ + header.multiple_threads) == 0, 1) +#endif diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/timer_create.c b/sysdeps/unix/sysv/linux/ia64/nptl/timer_create.c new file mode 100644 index 0000000000..172223af3f --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/nptl/timer_create.c @@ -0,0 +1 @@ +#include "../x86_64/timer_create.c" diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/timer_delete.c b/sysdeps/unix/sysv/linux/ia64/nptl/timer_delete.c new file mode 100644 index 0000000000..537516e0aa --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/nptl/timer_delete.c @@ -0,0 +1 @@ +#include "../x86_64/timer_delete.c" diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/timer_getoverr.c b/sysdeps/unix/sysv/linux/ia64/nptl/timer_getoverr.c new file mode 100644 index 0000000000..3f21a73c98 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/nptl/timer_getoverr.c @@ -0,0 +1 @@ +#include "../x86_64/timer_getoverr.c" diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/timer_gettime.c b/sysdeps/unix/sysv/linux/ia64/nptl/timer_gettime.c new file mode 100644 index 0000000000..a50143adc5 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/nptl/timer_gettime.c @@ -0,0 +1 @@ +#include "../x86_64/timer_gettime.c" diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/timer_settime.c b/sysdeps/unix/sysv/linux/ia64/nptl/timer_settime.c new file mode 100644 index 0000000000..37baeffacc --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/nptl/timer_settime.c @@ -0,0 +1 @@ +#include "../x86_64/timer_settime.c" diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/ia64/nptl/unwind-forcedunwind.c new file mode 100644 index 0000000000..d0c77a62e6 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/nptl/unwind-forcedunwind.c @@ -0,0 +1,39 @@ +/* Copyright (C) 2003, 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek . + + 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; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include +#include + +static _Unwind_Word (*libgcc_s_getbsp) (struct _Unwind_Context *); + +#define ARCH_CANCEL_INIT(handle) \ + ((libgcc_s_getbsp = __libc_dlsym (handle, "_Unwind_GetBSP")) == NULL) + +#include + +_Unwind_Word +_Unwind_GetBSP (struct _Unwind_Context *context) +{ + if (__builtin_expect (libgcc_s_getbsp == NULL, 0)) + pthread_cancel_init (); + + return libgcc_s_getbsp (context); +} diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/unwind_longjmp.c b/sysdeps/unix/sysv/linux/ia64/nptl/unwind_longjmp.c new file mode 100644 index 0000000000..7976ff8f15 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/nptl/unwind_longjmp.c @@ -0,0 +1,44 @@ +/* Copyright (C) 1991,92,94,95,97,98,2000,02,04 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. */ + +#include +#include +#include +#include +#include + +extern void __sigstack_longjmp (__jmp_buf, int) + __attribute__ ((noreturn)); + +/* Like __libc_siglongjmp(), but safe for crossing from alternate + signal stack to normal stack. Needed by NPTL. */ +void +__libc_unwind_longjmp (sigjmp_buf env, int val) +{ + /* Perform any cleanups needed by the frames being unwound. */ + __pthread_cleanup_upto (env->__jmpbuf, CURRENT_STACK_FRAME); + + if (env[0].__mask_was_saved) + /* Restore the saved signal mask. */ + (void) __sigprocmask (SIG_SETMASK, &env[0].__saved_mask, + (sigset_t *) NULL); + + /* Call the machine-dependent function to restore machine state. */ + __sigstack_longjmp (env[0].__jmpbuf, val ?: 1); +} +hidden_def (__libc_unwind_longjmp) diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/vfork.S b/sysdeps/unix/sysv/linux/ia64/nptl/vfork.S new file mode 100644 index 0000000000..3bd721f14e --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/nptl/vfork.S @@ -0,0 +1,69 @@ +/* Copyright (C) 2000, 2002, 2004 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. */ + + +#include +#define _SIGNAL_H +#include +#include + +/* The following are defined in linux/sched.h, which unfortunately */ +/* is not safe for inclusion in an assembly file. */ +#define CLONE_VM 0x00000100 /* set if VM shared between processes */ +#define CLONE_VFORK 0x00004000 /* set if the parent wants the child to wake it up on mm_release */ + +/* pid_t vfork(void); */ +/* Implemented as __clone_syscall(CLONE_VFORK | CLONE_VM | SIGCHLD, 0) */ + +ENTRY(__vfork) + .prologue // work around a GAS bug which triggers if + .body // first .prologue is not at the beginning of proc. + alloc r2=ar.pfs,0,0,2,0 + adds r14=PID,r13 + ;; + ld4 r16=[r14] + ;; + sub r15=0,r16 + cmp.eq p6,p0=0,r16 + ;; +(p6) movl r15=0x80000000 + mov out0=CLONE_VM+CLONE_VFORK+SIGCHLD + mov out1=0 /* Standard sp value. */ + ;; + st4 [r14]=r15 + DO_CALL (SYS_ify (clone)) + cmp.eq p6,p0=0,r8 + adds r14=PID,r13 +(p6) br.cond.dptk 1f + ;; + ld4 r15=[r14] + ;; + extr.u r16=r15,0,31 + ;; + cmp.eq p0,p6=0,r16 + ;; +(p6) sub r16=0,r15 + ;; + st4 [r14]=r16 +1: + cmp.eq p6,p0=-1,r10 +(p6) br.cond.spnt.few __syscall_error + ret +PSEUDO_END(__vfork) +libc_hidden_def (__vfork) +weak_alias (__vfork, vfork) diff --git a/sysdeps/unix/sysv/linux/ia64/pipe.S b/sysdeps/unix/sysv/linux/ia64/pipe.S new file mode 100644 index 0000000000..60624df3cb --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/pipe.S @@ -0,0 +1,38 @@ +/* Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Mosberger + + 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. */ + +/* __pipe is a special syscall since it returns two values. */ + +#include + +ENTRY(__pipe) + .regstk 1,0,0,0 + DO_CALL (SYS_ify (pipe)) + cmp.ne p6,p0=-1,r10 + ;; +(p6) st4 [in0]=r8,4 +(p6) mov ret0=0 + ;; +(p6) st4 [in0]=r9 +(p6) ret + br.cond.spnt.few __syscall_error +PSEUDO_END(__pipe) + +libc_hidden_def (__pipe) +weak_alias (__pipe, pipe) diff --git a/sysdeps/unix/sysv/linux/ia64/profil-counter.h b/sysdeps/unix/sysv/linux/ia64/profil-counter.h new file mode 100644 index 0000000000..bc9a8433f1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/profil-counter.h @@ -0,0 +1,32 @@ +/* Machine-dependent SIGPROF signal handler. IA-64 version. + Copyright (C) 1996, 1997, 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 + 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. */ + +/* In many Unix systems signal handlers are called like this + and the interrupted PC is easily findable in the `struct sigcontext'. */ + +static void +profil_counter (int signr, siginfo_t *si, struct sigcontext *scp) +{ + unsigned long ip = scp->sc_ip & ~0X3ULL, slot = scp->sc_ip & 0x3ull; + + /* Note: Linux/ia64 encodes the slot number in bits 0 and 1. We + want to multiply the slot number by four so we can use bins of + width 4 to get accurate instruction-level profiling. */ + profil_count ((void *) (ip + 4*slot)); +} diff --git a/sysdeps/unix/sysv/linux/ia64/readelflib.c b/sysdeps/unix/sysv/linux/ia64/readelflib.c new file mode 100644 index 0000000000..7a10d23c90 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/readelflib.c @@ -0,0 +1,60 @@ +/* Copyright (C) 2000, 2001, 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 + 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. */ + + +int process_elf32_file (const char *file_name, const char *lib, int *flag, + unsigned int *osversion, char **soname, + void *file_contents, size_t file_length); +int process_elf64_file (const char *file_name, const char *lib, int *flag, + unsigned int *osversion, char **soname, + void *file_contents, size_t file_length); + +/* Returns 0 if everything is ok, != 0 in case of error. */ +int +process_elf_file (const char *file_name, const char *lib, int *flag, + unsigned int *osversion, char **soname, + void *file_contents, size_t file_length) +{ + ElfW(Ehdr) *elf_header = (ElfW(Ehdr) *) file_contents; + int ret; + + if (elf_header->e_ident [EI_CLASS] == ELFCLASS32) + return process_elf32_file (file_name, lib, flag, osversion, soname, + file_contents, file_length); + else + { + ret = process_elf64_file (file_name, lib, flag, osversion, soname, + file_contents, file_length); + /* Intel 64bit libraries are always libc.so.6+. */ + if (!ret) + *flag = FLAG_IA64_LIB64|FLAG_ELF_LIBC6; + return ret; + } +} + +#undef __ELF_NATIVE_CLASS +#undef process_elf_file +#define process_elf_file process_elf32_file +#define __ELF_NATIVE_CLASS 32 +#include "elf/readelflib.c" + +#undef __ELF_NATIVE_CLASS +#undef process_elf_file +#define process_elf_file process_elf64_file +#define __ELF_NATIVE_CLASS 64 +#include "elf/readelflib.c" diff --git a/sysdeps/unix/sysv/linux/ia64/register-dump.h b/sysdeps/unix/sysv/linux/ia64/register-dump.h new file mode 100644 index 0000000000..513db974f8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/register-dump.h @@ -0,0 +1,182 @@ +/* Dump registers. + Copyright (C) 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek , 2004. + + 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. */ + +#include +#include +#include + +/* We will print the register dump in this format: + + GP: XXXXXXXXXXXXXXXX R2: XXXXXXXXXXXXXXXX R3: XXXXXXXXXXXXXXXX + R8: XXXXXXXXXXXXXXXX R9: XXXXXXXXXXXXXXXX R10: XXXXXXXXXXXXXXXX + R11: XXXXXXXXXXXXXXXX SP: XXXXXXXXXXXXXXXX TP: XXXXXXXXXXXXXXXX + R14: XXXXXXXXXXXXXXXX R15: XXXXXXXXXXXXXXXX R16: XXXXXXXXXXXXXXXX + R17: XXXXXXXXXXXXXXXX R18: XXXXXXXXXXXXXXXX R19: XXXXXXXXXXXXXXXX + R20: XXXXXXXXXXXXXXXX R21: XXXXXXXXXXXXXXXX R22: XXXXXXXXXXXXXXXX + R23: XXXXXXXXXXXXXXXX R24: XXXXXXXXXXXXXXXX R25: XXXXXXXXXXXXXXXX + R26: XXXXXXXXXXXXXXXX R27: XXXXXXXXXXXXXXXX R28: XXXXXXXXXXXXXXXX + R29: XXXXXXXXXXXXXXXX R30: XXXXXXXXXXXXXXXX R31: XXXXXXXXXXXXXXXX + + RP: XXXXXXXXXXXXXXXX B6: XXXXXXXXXXXXXXXX B7: XXXXXXXXXXXXXXXX + + IP: XXXXXXXXXXXXXXXX RSC: XXXXXXXXXXXXXXXX PR: XXXXXXXXXXXXXXXX + PFS: XXXXXXXXXXXXXXXX UNAT: XXXXXXXXXXXXXXXX CFM: XXXXXXXXXXXXXXXX + CCV: XXXXXXXXXXXXXXXX FPSR: XXXXXXXXXXXXXXXX + + F32: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX F33: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + F34: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX F35: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +... + F124: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX F125: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + F126: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX F127: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + */ + +static void +hexvalue (unsigned long int value, char *buf, size_t len) +{ + char *cp = _itoa_word (value, buf + len, 16, 0); + while (cp > buf) + *--cp = '0'; +} + +static void +regvalue (unsigned long int *value, char letter, int regno, char *buf) +{ + int n = regno >= 100 ? 3 : regno >= 10 ? 2 : 1; + buf[0] = ' '; + buf[1] = letter; + _itoa_word (regno, buf + 2 + n, 10, 0); + buf[2 + n] = ':'; + for (++n; n <= 4; ++n) + buf[2 + n] = ' '; + hexvalue (value[0], buf + 7, 16); + if (letter == 'F') + { + hexvalue (value[1], buf + 7 + 16, 16); + buf[7 + 32] = '\n'; + } + else + buf[7 + 16] = '\n'; +} + +static void +register_dump (int fd, struct sigcontext *ctx) +{ + char gpregs[32 - 5][8 + 16]; + char fpregs[128 - 32][8 + 32]; + char bpregs[3][8 + 16]; + char spregs[8][16]; + struct iovec iov[146]; + size_t nr = 0; + int i; + +#define ADD_STRING(str) \ + do \ + { \ + iov[nr].iov_base = (char *) str; \ + iov[nr].iov_len = strlen (str); \ + ++nr; \ + } \ + while (0) +#define ADD_MEM(str, len) \ + do \ + { \ + iov[nr].iov_base = str; \ + iov[nr].iov_len = len; \ + ++nr; \ + } \ + while (0) + + /* Generate strings of register contents. */ + for (i = 1; i < 4; ++i) + { + regvalue (&ctx->sc_gr[i], 'R', i, gpregs[i - 1]); + if (ctx->sc_nat & (1L << i)) + memcpy (gpregs[i - 1] + 7, "NaT ", 16); + } + for (i = 8; i < 32; ++i) + { + regvalue (&ctx->sc_gr[i], 'R', i, gpregs[i - 5]); + if (ctx->sc_nat & (1L << i)) + memcpy (gpregs[i - 1] + 7, "NaT ", 16); + } + memcpy (gpregs[0] + 1, "GP:", 3); + memcpy (gpregs[7] + 1, "SP: ", 4); + memcpy (gpregs[8] + 1, "TP: ", 4); + + regvalue (&ctx->sc_br[0], 'B', 0, bpregs[0]); + regvalue (&ctx->sc_br[6], 'B', 6, bpregs[1]); + regvalue (&ctx->sc_br[7], 'B', 7, bpregs[2]); + memcpy (bpregs[0] + 1, "RP:", 3); + + if (ctx->sc_flags & IA64_SC_FLAG_FPH_VALID) + for (i = 32; i < 128; ++i) + regvalue (&ctx->sc_fr[i].u.bits[0], 'F', i, fpregs[i - 32]); + + hexvalue (ctx->sc_ip, spregs[0], sizeof (spregs[0])); + hexvalue (ctx->sc_ar_rsc, spregs[1], sizeof (spregs[1])); + hexvalue (ctx->sc_pr, spregs[2], sizeof (spregs[2])); + hexvalue (ctx->sc_ar_pfs, spregs[3], sizeof (spregs[3])); + hexvalue (ctx->sc_ar_unat, spregs[4], sizeof (spregs[4])); + hexvalue (ctx->sc_cfm, spregs[5], sizeof (spregs[5])); + hexvalue (ctx->sc_ar_ccv, spregs[6], sizeof (spregs[6])); + hexvalue (ctx->sc_ar_fpsr, spregs[7], sizeof (spregs[7])); + + /* Generate the output. */ + ADD_STRING ("Register dump:\n\n"); + + for (i = 0; i < 32 - 5; ++i) + ADD_MEM (gpregs[i], sizeof (gpregs[0]) - 1 + ((i % 3) == 2)); + ADD_STRING ("\n"); + + for (i = 0; i < 3; ++i) + ADD_MEM (bpregs[i], sizeof (bpregs[0]) - 1); + + ADD_STRING ("\n\n IP: "); + ADD_MEM (spregs[0], sizeof (spregs[0])); + ADD_STRING (" RSC: "); + ADD_MEM (spregs[1], sizeof (spregs[0])); + ADD_STRING (" PR: "); + ADD_MEM (spregs[2], sizeof (spregs[0])); + ADD_STRING ("\n PFS: "); + ADD_MEM (spregs[3], sizeof (spregs[0])); + ADD_STRING (" UNAT: "); + ADD_MEM (spregs[4], sizeof (spregs[0])); + ADD_STRING (" CFM: "); + ADD_MEM (spregs[5], sizeof (spregs[0])); + ADD_STRING ("\n CCV: "); + ADD_MEM (spregs[6], sizeof (spregs[0])); + ADD_STRING (" FPSR: "); + ADD_MEM (spregs[7], sizeof (spregs[0])); + ADD_STRING ("\n"); + + if (ctx->sc_flags & IA64_SC_FLAG_FPH_VALID) + { + ADD_STRING ("\n"); + + for (i = 0; i < 128 - 32; ++i) + ADD_MEM (fpregs[i], sizeof (fpregs[0]) - 1 + (i & 1)); + } + + /* Write the stuff out. */ + writev (fd, iov, nr); +} + + +#define REGISTER_DUMP register_dump (fd, ctx) diff --git a/sysdeps/unix/sysv/linux/ia64/rt-sysdep.S b/sysdeps/unix/sysv/linux/ia64/rt-sysdep.S new file mode 100644 index 0000000000..f966bf1e59 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/rt-sysdep.S @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/ia64/setcontext.S b/sysdeps/unix/sysv/linux/ia64/setcontext.S new file mode 100644 index 0000000000..ef0a93c0c0 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/setcontext.S @@ -0,0 +1,153 @@ +/* Copyright (C) 2001, 2003 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Mosberger-Tang . + + 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. */ + +#include +#include + +#include "ucontext_i.h" + +/* __setcontext (const ucontext_t *ucp) + + Restores the machine context in UCP and thereby resumes execution + in that context. + + This implementation in intended to be used for *synchronous* context + switches only. Therefore, it does not have to restore anything + other than the PRESERVED state. */ + +ENTRY(__setcontext) + .prologue + .body + alloc r11 = ar.pfs, 1, 0, 4, 0 + + // sigprocmask (SIG_SETMASK, &sc->sc_mask, NULL): + + mov r3 = SC_MASK + mov out0 = SIG_SETMASK + ;; + add out1 = r3, in0 + mov out2 = 0 + mov out3 = 8 // sizeof kernel sigset_t + + invala + DO_CALL(__NR_rt_sigprocmask) + add r2 = SC_NAT, r32 + + add r3 = SC_RNAT, r32 // r3 <- &sc_ar_rnat + add rPOS = SC_GR, r32 // rPOS <- &sc_gr[0] + ;; + ld8 rNAT = [r2], (SC_BSP-SC_NAT) + extr.u rPOS = rPOS, 3, 6 // get NaT bit number for r0 + ;; + ld8 rBSP = [r2], (SC_UNAT-SC_BSP) + ld8 rRNAT = [r3], (SC_FPSR-SC_RNAT) + /* + * Rotate NaT bits by rPOS positions to the left: + */ + sub rCPOS = 64, rPOS + ;; + ld8 rUNAT = [r2], (SC_PFS-SC_UNAT) + ld8 rFPSR = [r3], (SC_LC-SC_FPSR) + shl rTMP = rNAT, rPOS + ;; + ld8 rPFS = [r2], (SC_PR-SC_PFS) + ld8 rLC = [r3], (SC_BR+0*8-SC_LC) + shr.u rNAT = rNAT, rCPOS + ;; + ld8 rPR = [r2], (SC_BR+1*8-SC_PR) + ld8 rB0 = [r3], 16 + or rNAT = rNAT, rTMP + ;; + ld8 rB1 = [r2], 16 + ld8 rB2 = [r3], 16 + ;; + mov.m ar.unat = rNAT + mov.m rRSC = ar.rsc + ;; + ld8 rB3 = [r2], 16 + ld8 rB4 = [r3], (SC_GR+1*8-(SC_BR+4*8)) + ;; + ld8 rB5 = [r2], (SC_GR+4*8-(SC_BR+5*8)) + ld8.fill r1 = [r3], (5*8 - 1*8) + ;; + ld8.fill r4 = [r2], 16 + ld8.fill r5 = [r3], 16 + mov b0 = rB0 + ;; + ld8.fill r6 = [r2], 48 + ld8.fill r7 = [r3], (SC_FR+2*16-(SC_GR+7*8)) + ;; + ld8.fill sp = [r2], (SC_FR+3*16-(SC_GR+12*8)) + mov.m ar.fpsr = rFPSR + mov.i ar.pfs = rPFS + ;; + ldf.fill f3 = [r2], 16 + ldf.fill f2 = [r3], 48 + mov b1 = rB1 + ;; + ldf.fill f4 = [r2], (16*16-4*16) + ldf.fill f5 = [r3], (17*16-5*16) + mov b2 = rB2 + ;; + ldf.fill f16 = [r2], 32 + ldf.fill f17 = [r3], 32 + mov b3 = rB3 + ;; + ldf.fill f18 = [r2], 32 + ldf.fill f19 = [r3], 32 + mov b4 = rB4 + ;; + ldf.fill f20 = [r2], 32 + ldf.fill f21 = [r3], 32 + mov b5 = rB5 + ;; + ldf.fill f22 = [r2], 32 + ldf.fill f23 = [r3], 32 + mov r8 = 0 + ;; + ldf.fill f24 = [r2], 32 + ldf.fill f25 = [r3], 32 + mov r9 = 0 + ;; + ldf.fill f26 = [r2], 32 + ldf.fill f27 = [r3], 32 + dep rTMP = 0, rRSC, 16, 14 // clear ar.rsc.loadrs + ;; + ldf.fill f28 = [r2], 32 + ldf.fill f29 = [r3], 32 + and rTMP = ~0x3, rTMP // clear ar.rsc.mode + ;; + ldf.fill f30 = [r2], 32 + ldf.fill f31 = [r3], 32 + mov pr = rPR, -1 + ;; + mov.m ar.rsc = rTMP // put RSE into enforced lazy mode + ;; + loadrs // drop dirty partition + ;; + mov.m ar.bspstore = rBSP + mov.m ar.unat = rUNAT + mov.i ar.lc = rLC + ;; + mov.m ar.rnat = rRNAT + mov.m ar.rsc = rRSC + ret +END(__setcontext) + +weak_alias (__setcontext, setcontext) diff --git a/sysdeps/unix/sysv/linux/ia64/setjmp.S b/sysdeps/unix/sysv/linux/ia64/setjmp.S new file mode 100644 index 0000000000..53f80d203e --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/setjmp.S @@ -0,0 +1,199 @@ +/* Copyright (C) 1999, 2000, 2001, 2002, 2004, 2005 + Free Software Foundation, Inc. + Contributed by David Mosberger-Tang . + + 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. + + The layout of the jmp_buf is as follows. This is subject to change + and user-code should never depend on the particular layout of + jmp_buf! + + + offset: description: + ------- ------------ + 0x000 stack pointer (r12) ; unchangeable (see _JMPBUF_UNWINDS) + 0x008 r1 (gp) + 0x010 caller's unat + 0x018 fpsr + 0x020 r4 + 0x028 r5 + 0x030 r6 + 0x038 r7 + 0x040 rp (b0) + 0x048 b1 + 0x050 b2 + 0x058 b3 + 0x060 b4 + 0x068 b5 + 0x070 ar.pfs + 0x078 ar.lc + 0x080 pr + 0x088 ar.bsp ; unchangeable (see __longjmp.S) + 0x090 ar.unat + 0x098 &__jmp_buf ; address of the jmpbuf (needed to locate NaT bits in unat) + 0x0a0 f2 + 0x0b0 f3 + 0x0c0 f4 + 0x0d0 f5 + 0x0e0 f16 + 0x0f0 f17 + 0x100 f18 + 0x110 f19 + 0x120 f20 + 0x130 f21 + 0x130 f22 + 0x140 f23 + 0x150 f24 + 0x160 f25 + 0x170 f26 + 0x180 f27 + 0x190 f28 + 0x1a0 f29 + 0x1b0 f30 + 0x1c0 f31 */ + +#include +#include + + /* The following two entry points are the traditional entry points: */ + +LEAF(setjmp) + alloc r8=ar.pfs,2,0,0,0 + mov in1=1 + br.cond.sptk.many _GI___sigsetjmp +END(setjmp) + +LEAF(_setjmp) + alloc r8=ar.pfs,2,0,0,0 + mov in1=0 + br.cond.sptk.many _GI___sigsetjmp +END(_setjmp) +libc_hidden_def (_setjmp) + + /* __sigsetjmp(__jmp_buf buf, int savemask) */ + +ENTRY(__sigsetjmp) + .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(2) + alloc loc1=ar.pfs,2,5,2,0 + .save ar.unat, loc2 + mov loc2=ar.unat + ;; + mov r17=ar.fpsr + mov r2=in0 + add r3=8,in0 + ;; +.mem.offset 8,0; st8.spill.nta [r2]=sp,16 // r12 (sp) +.mem.offset 0,0; st8.spill.nta [r3]=gp,16 // r1 (gp) + ;; + st8.nta [r2]=loc2,16 // save caller's unat + st8.nta [r3]=r17,16 // save fpsr + add r8=0xa0,in0 + ;; +.mem.offset 8,0; st8.spill.nta [r2]=r4,16 // r4 +.mem.offset 0,0; st8.spill.nta [r3]=r5,16 // r5 + add r9=0xb0,in0 + ;; + stf.spill.nta [r8]=f2,32 + stf.spill.nta [r9]=f3,32 + mov loc0=rp + .body + ;; + stf.spill.nta [r8]=f4,32 + stf.spill.nta [r9]=f5,32 + mov r17=b1 + ;; + stf.spill.nta [r8]=f16,32 + stf.spill.nta [r9]=f17,32 + mov r18=b2 + ;; + stf.spill.nta [r8]=f18,32 + stf.spill.nta [r9]=f19,32 + mov r19=b3 + ;; + stf.spill.nta [r8]=f20,32 + stf.spill.nta [r9]=f21,32 + mov r20=b4 + ;; + stf.spill.nta [r8]=f22,32 + stf.spill.nta [r9]=f23,32 + mov r21=b5 + ;; + stf.spill.nta [r8]=f24,32 + stf.spill.nta [r9]=f25,32 + mov r22=ar.lc + ;; + stf.spill.nta [r8]=f26,32 + stf.spill.nta [r9]=f27,32 + mov r24=pr + ;; + stf.spill.nta [r8]=f28,32 + stf.spill.nta [r9]=f29,32 +#ifdef PTR_MANGLE + mov loc3=loc0 + ;; + PTR_MANGLE (loc3, loc4) +#else + ;; +#endif + stf.spill.nta [r8]=f30 + stf.spill.nta [r9]=f31 + +.mem.offset 8,0; st8.spill.nta [r2]=r6,16 // r6 +.mem.offset 0,0; st8.spill.nta [r3]=r7,16 // r7 + ;; + mov r23=ar.bsp + mov r25=ar.unat + mov out0=in0 + +#ifdef PTR_MANGLE + st8.nta [r2]=loc3,16 // b0 +#else + st8.nta [r2]=loc0,16 // b0 +#endif + st8.nta [r3]=r17,16 // b1 + mov out1=in1 + ;; + st8.nta [r2]=r18,16 // b2 + st8.nta [r3]=r19,16 // b3 + ;; + st8.nta [r2]=r20,16 // b4 + st8.nta [r3]=r21,16 // b5 + ;; + st8.nta [r2]=loc1,16 // ar.pfs + st8.nta [r3]=r22,16 // ar.lc + ;; + st8.nta [r2]=r24,16 // pr + st8.nta [r3]=r23,16 // ar.bsp + ;; + st8.nta [r2]=r25 // ar.unat + st8.nta [r3]=in0 // &__jmp_buf +#if defined NOT_IN_libc && defined IS_IN_rtld + /* In ld.so we never save the signal mask. */ + ;; +#else + br.call.dpnt.few rp=__sigjmp_save +#endif +.ret0: // force a new bundle ::q + mov.m ar.unat=loc2 // restore caller's unat + mov rp=loc0 + mov ar.pfs=loc1 + mov r8=0 + ret +END(__sigsetjmp) +strong_alias(__sigsetjmp, _GI___sigsetjmp) + +weak_extern(_setjmp) +weak_extern(setjmp) diff --git a/sysdeps/unix/sysv/linux/ia64/sigaction.c b/sysdeps/unix/sysv/linux/ia64/sigaction.c new file mode 100644 index 0000000000..fdbc93f0ed --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/sigaction.c @@ -0,0 +1,59 @@ +/* Copyright (C) 1997-2000,2002,2003,2005 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Linux/IA64 specific sigaction + Written by Jes Sorensen, , April 1999. + + 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. */ + +/* Linux/ia64 only has rt signals, thus we do not even want to try falling + back to the old style signals as the default Linux handler does. */ + +#include +#include +#include + +#include +#include +#include + +/* The variable is shared between all wrappers around signal handling + functions which have RT equivalents. This is the definition. */ + + +/* If ACT is not NULL, change the action for SIG to *ACT. + If OACT is not NULL, put the old action for SIG in *OACT. */ +int +__libc_sigaction (sig, act, oact) + int sig; + const struct sigaction *act; + struct sigaction *oact; +{ + /* XXX The size argument hopefully will have to be changed to the + real size of the user-level sigset_t. */ + return INLINE_SYSCALL (rt_sigaction, 4, sig, + CHECK_1_NULL_OK (act), CHECK_1_NULL_OK (oact), _NSIG / 8); +} +libc_hidden_def (__libc_sigaction) + +#ifdef WRAPPER_INCLUDE +# include WRAPPER_INCLUDE +#endif + +#ifndef LIBC_SIGACTION +weak_alias (__libc_sigaction, __sigaction) +libc_hidden_def (__sigaction) +weak_alias (__libc_sigaction, sigaction) +#endif diff --git a/sysdeps/unix/sysv/linux/ia64/sigcontext-offsets.sym b/sysdeps/unix/sysv/linux/ia64/sigcontext-offsets.sym new file mode 100644 index 0000000000..943e68a667 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/sigcontext-offsets.sym @@ -0,0 +1,16 @@ +#include +#include + +-- +SC_NAT offsetof (struct sigcontext, sc_nat) +SC_BSP offsetof (struct sigcontext, sc_ar_bsp) +SC_RNAT offsetof (struct sigcontext, sc_ar_rnat) +SC_UNAT offsetof (struct sigcontext, sc_ar_unat) +SC_FPSR offsetof (struct sigcontext, sc_ar_fpsr) +SC_PFS offsetof (struct sigcontext, sc_ar_pfs) +SC_LC offsetof (struct sigcontext, sc_ar_lc) +SC_PR offsetof (struct sigcontext, sc_pr) +SC_BR offsetof (struct sigcontext, sc_br) +SC_GR offsetof (struct sigcontext, sc_gr) +SC_FR offsetof (struct sigcontext, sc_fr) +SC_MASK offsetof (struct sigcontext, sc_mask) diff --git a/sysdeps/unix/sysv/linux/ia64/sigcontextinfo.h b/sysdeps/unix/sysv/linux/ia64/sigcontextinfo.h new file mode 100644 index 0000000000..51c11e6b46 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/sigcontextinfo.h @@ -0,0 +1,26 @@ +/* Copyright (C) 2002, 2004 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. */ + +#define SIGCONTEXT siginfo_t *_si, struct sigcontext * +#define SIGCONTEXT_EXTRA_ARGS _si, +#define GET_PC(ctx) ((ctx)->sc_ip) +#define GET_FRAME(ctx) ((void *) 0) +#define GET_STACK(ctx) ((void *) 0) + +#define CALL_SIGHANDLER(handler, signo, ctx) \ + (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx)) diff --git a/sysdeps/unix/sysv/linux/ia64/sigpending.c b/sysdeps/unix/sysv/linux/ia64/sigpending.c new file mode 100644 index 0000000000..ae75a55161 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/sigpending.c @@ -0,0 +1,39 @@ +/* Copyright (C) 1997, 1998, 1999, 2000, 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. */ + +/* Linux/ia64 only has rt signals, thus we do not even want to try falling + back to the old style signals as the default Linux handler does. */ + +#include +#include +#include + +#include +#include +#include + +/* Change the set of blocked signals to SET, + wait until a signal arrives, and restore the set of blocked signals. */ +int +sigpending (set) + sigset_t *set; +{ + /* XXX The size argument hopefully will have to be changed to the + real size of the user-level sigset_t. */ + return INLINE_SYSCALL (rt_sigpending, 2, CHECK_SIGSET (set), _NSIG / 8); +} diff --git a/sysdeps/unix/sysv/linux/ia64/sigprocmask.c b/sysdeps/unix/sysv/linux/ia64/sigprocmask.c new file mode 100644 index 0000000000..ba8b053869 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/sigprocmask.c @@ -0,0 +1,45 @@ +/* Copyright (C) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Linux/IA64 specific sigprocmask + Written by Jes Sorensen, , April 1999. + + 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. */ + +/* Linux/ia64 only has rt signals, thus we do not even want to try falling + back to the old style signals as the default Linux handler does. */ + +#include +#include +#include + +#include +#include +#include + +/* Get and/or change the set of blocked signals. */ +int +__sigprocmask (how, set, oset) + int how; + const sigset_t *set; + sigset_t *oset; +{ + + /* XXX The size argument hopefully will have to be changed to the + real size of the user-level sigset_t. */ + return INLINE_SYSCALL (rt_sigprocmask, 4, how, CHECK_SIGSET (set), + CHECK_SIGSET_NULL_OK (oset), _NSIG / 8); +} +weak_alias (__sigprocmask, sigprocmask) diff --git a/sysdeps/unix/sysv/linux/ia64/swapcontext.c b/sysdeps/unix/sysv/linux/ia64/swapcontext.c new file mode 100644 index 0000000000..1b9fbdb6a0 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/swapcontext.c @@ -0,0 +1,40 @@ +/* Copyright (C) 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Mosberger-Tang . + + 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. */ + +#include + +struct rv + { + long retval; + long first_return; + }; + +extern struct rv __getcontext (ucontext_t *__ucp) __THROW; +extern int __setcontext (__const ucontext_t *__ucp) __THROW; + +int +__swapcontext (ucontext_t *oucp, const ucontext_t *ucp) +{ + struct rv rv = __getcontext (oucp); + if (rv.first_return) + __setcontext (ucp); + return 0; +} + +weak_alias (__swapcontext, swapcontext) diff --git a/sysdeps/unix/sysv/linux/ia64/sys/io.h b/sysdeps/unix/sysv/linux/ia64/sys/io.h new file mode 100644 index 0000000000..14736ff1c6 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/sys/io.h @@ -0,0 +1,68 @@ +/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Mosberger-Tang + + 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 _SYS_IO_H +#define _SYS_IO_H 1 + +#include + +__BEGIN_DECLS + +/* If TURN_ON is TRUE, request for permission to do direct i/o on the + port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O + permission off for that range. This call requires root privileges. + + Portability note: not all Linux platforms support this call. Most + platforms based on the PC I/O architecture probably will, however. + E.g., Linux/Alpha for Alpha PCs supports this. */ +extern int ioperm (unsigned long int __from, unsigned long int __num, + int __turn_on); + +/* Set the I/O privilege level to LEVEL. If LEVEL>3, permission to + access any I/O port is granted. This call requires root + privileges. */ +extern int iopl (int __level); + +extern unsigned int _inb (unsigned long int __port); +extern unsigned int _inb (unsigned long int __port); +extern unsigned int _inw (unsigned long int __port); +extern unsigned int _inl (unsigned long int __port); +extern void _outb (unsigned char __val, unsigned long int __port); +extern void _outw (unsigned short __val, unsigned long int __port); +extern void _outl (unsigned int __val, unsigned long int __port); + +#define inb _inb +#define inw _inw +#define inl _inl +#define outb _outb +#define outw _outw +#define outl _outl + +/* Access PCI space protected from machine checks. */ +extern int pciconfig_read (unsigned long int __bus, unsigned long int __dfn, + unsigned long int __off, unsigned long int __len, + unsigned char *__buf); + +extern int pciconfig_write (unsigned long int __bus, unsigned long int __dfn, + unsigned long int __off, unsigned long int __len, + unsigned char *__buf); + +__END_DECLS + +#endif /* _SYS_IO_H */ diff --git a/sysdeps/unix/sysv/linux/ia64/sys/procfs.h b/sysdeps/unix/sysv/linux/ia64/sys/procfs.h new file mode 100644 index 0000000000..b5196b997c --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/sys/procfs.h @@ -0,0 +1,130 @@ +/* Copyright (C) 1999, 2000, 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 _SYS_PROCFS_H +#define _SYS_PROCFS_H 1 + +/* This is somehow modelled after the file of the same name on SysVr4 + systems. It provides a definition of the core file format for ELF + used on Linux. */ + +#include +#include +#include +#include +#include +#include + +__BEGIN_DECLS + +struct elf_siginfo + { + int si_signo; /* Signal number. */ + int si_code; /* Extra code. */ + int si_errno; /* Errno. */ + }; + +/* We really need just 72 but let's leave some headroom... */ +#define ELF_NGREG 128 +/* f0 and f1 could be omitted, but so what... */ +#define ELF_NFPREG 128 + +typedef unsigned long elf_greg_t; +typedef elf_greg_t elf_gregset_t[ELF_NGREG]; + +typedef struct ia64_fpreg elf_fpreg_t; +typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; + +typedef elf_greg_t greg_t; +typedef elf_gregset_t gregset_t; +typedef elf_fpregset_t fpregset_t; +#define NGREG ELF_NGREG + +/* Definitions to generate Intel SVR4-like core files. These mostly + have the same names as the SVR4 types with "elf_" tacked on the + front to prevent clashes with linux definitions, and the typedef + forms have been avoided. This is mostly like the SVR4 structure, + but more Linuxy, with things that Linux does not support and which + gdb doesn't really use excluded. Fields present but not used are + marked with "XXX". */ +struct elf_prstatus + { +#if 0 + long int pr_flags; /* XXX Process flags. */ + short int pr_why; /* XXX Reason for process halt. */ + short int pr_what; /* XXX More detailed reason. */ +#endif + struct elf_siginfo pr_info; /* Info associated with signal. */ + short int pr_cursig; /* Current signal. */ + unsigned long int pr_sigpend; /* Set of pending signals. */ + unsigned long int pr_sighold; /* Set of held signals. */ +#if 0 + struct sigaltstack pr_altstack; /* Alternate stack info. */ + struct sigaction pr_action; /* Signal action for current sig. */ +#endif + __pid_t pr_pid; + __pid_t pr_ppid; + __pid_t pr_pgrp; + __pid_t pr_sid; + struct timeval pr_utime; /* User time. */ + struct timeval pr_stime; /* System time. */ + struct timeval pr_cutime; /* Cumulative user time. */ + struct timeval pr_cstime; /* Cumulative system time. */ +#if 0 + long int pr_instr; /* Current instruction. */ +#endif + elf_gregset_t pr_reg; /* GP registers. */ + int pr_fpvalid; /* True if math copro being used. */ + }; + + +#define ELF_PRARGSZ (80) /* Number of chars for args */ + +struct elf_prpsinfo + { + char pr_state; /* Numeric process state. */ + char pr_sname; /* Char for pr_state. */ + char pr_zomb; /* Zombie. */ + char pr_nice; /* Nice val. */ + unsigned long int pr_flag; /* Flags. */ + unsigned int pr_uid; + unsigned int pr_gid; + int pr_pid, pr_ppid, pr_pgrp, pr_sid; + /* Lots missing */ + char pr_fname[16]; /* Filename of executable. */ + char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ + }; + +/* Addresses. */ +typedef void *psaddr_t; + +/* Register sets. Linux has different names. */ +typedef gregset_t prgregset_t; +typedef fpregset_t prfpregset_t; + +/* We don't have any differences between processes and threads, + therefore habe only ine PID type. */ +typedef __pid_t lwpid_t; + + +typedef struct elf_prstatus prstatus_t; +typedef struct elf_prpsinfo prpsinfo_t; + +__END_DECLS + +#endif /* sys/procfs.h */ diff --git a/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h b/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h new file mode 100644 index 0000000000..82d8843ce8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h @@ -0,0 +1,192 @@ +/* `ptrace' debugger support interface. Linux/ia64 version. + Copyright (C) 2001, 2006, 2007, 2011 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 _SYS_PTRACE_H +#define _SYS_PTRACE_H 1 + +#include +#include + +__BEGIN_DECLS + +/* Type of the REQUEST argument to `ptrace.' */ +enum __ptrace_request +{ + /* Indicate that the process making this request should be traced. + All signals received by this process can be intercepted by its + parent, and its parent can use the other `ptrace' requests. */ + PTRACE_TRACEME = 0, +#define PT_TRACE_ME PTRACE_TRACEME + + /* Return the word in the process's text space at address ADDR. */ + PTRACE_PEEKTEXT = 1, +#define PT_READ_I PTRACE_PEEKTEXT + + /* Return the word in the process's data space at address ADDR. */ + PTRACE_PEEKDATA = 2, +#define PT_READ_D PTRACE_PEEKDATA + + /* Return the word in the process's user area at offset ADDR. */ + PTRACE_PEEKUSER = 3, +#define PT_READ_U PTRACE_PEEKUSER + + /* Write the word DATA into the process's text space at address ADDR. */ + PTRACE_POKETEXT = 4, +#define PT_WRITE_I PTRACE_POKETEXT + + /* Write the word DATA into the process's data space at address ADDR. */ + PTRACE_POKEDATA = 5, +#define PT_WRITE_D PTRACE_POKEDATA + + /* Write the word DATA into the process's user area at offset ADDR. */ + PTRACE_POKEUSER = 6, +#define PT_WRITE_U PTRACE_POKEUSER + + /* Continue the process. */ + PTRACE_CONT = 7, +#define PT_CONTINUE PTRACE_CONT + + /* Kill the process. */ + PTRACE_KILL = 8, +#define PT_KILL PTRACE_KILL + + /* Single step the process. + This is not supported on all machines. */ + PTRACE_SINGLESTEP = 9, +#define PT_STEP PTRACE_SINGLESTEP + + /* Execute process until next taken branch. */ + PTRACE_SINGLEBLOCK = 12, +#define PT_STEPBLOCK PTRACE_SINGLEBLOCK + + /* Attach to a process that is already running. */ + PTRACE_ATTACH = 16, +#define PT_ATTACH PTRACE_ATTACH + + /* Detach from a process attached to with PTRACE_ATTACH. */ + PTRACE_DETACH = 17, +#define PT_DETACH PTRACE_DETACH + + /* Get all registers (pt_all_user_regs) in one shot */ + PTRACE_GETREGS = 18, +#define PT_GETREGS PTRACE_GETREGS + + /* Set all registers (pt_all_user_regs) in one shot */ + PTRACE_SETREGS = 19, +#define PT_SETREGS PTRACE_SETREGS + + /* Continue and stop at the next (return from) syscall. */ + PTRACE_SYSCALL = 24, +#define PT_SYSCALL PTRACE_SYSCALL + + /* Set ptrace filter options. */ + PTRACE_SETOPTIONS = 0x4200, +#define PT_SETOPTIONS PTRACE_SETOPTIONS + + /* Get last ptrace message. */ + PTRACE_GETEVENTMSG = 0x4201, +#define PT_GETEVENTMSG PTRACE_GETEVENTMSG + + /* Get siginfo for process. */ + PTRACE_GETSIGINFO = 0x4202, +#define PT_GETSIGINFO PTRACE_GETSIGINFO + + /* Set new siginfo for process. */ + PTRACE_SETSIGINFO = 0x4203, +#define PT_SETSIGINFO PTRACE_SETSIGINFO + + /* Get register content. */ + PTRACE_GETREGSET = 0x4204, +#define PTRACE_GETREGSET PTRACE_GETREGSET + + /* Set register content. */ + PTRACE_SETREGSET = 0x4205, +#define PTRACE_SETREGSET PTRACE_SETREGSET + + /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect + signal or group stop state. */ + PTRACE_SEIZE = 0x4206, +#define PTRACE_SEIZE PTRACE_SEIZE + + /* Trap seized tracee. */ + PTRACE_INTERRUPT = 0x4207, +#define PTRACE_INTERRUPT PTRACE_INTERRUPT + + /* Wait for next group event. */ + PTRACE_LISTEN = 0x4208 +}; + + +/* Flag for PTRACE_LISTEN. */ +enum __ptrace_flags +{ + PTRACE_SEIZE_DEVEL = 0x80000000 +}; + +/* pt_all_user_regs is used for PTRACE_GETREGS/PTRACE_SETREGS. */ +struct pt_all_user_regs + { + unsigned long nat; + unsigned long cr_iip; + unsigned long cfm; + unsigned long cr_ipsr; + unsigned long pr; + + unsigned long gr[32]; + unsigned long br[8]; + unsigned long ar[128]; + struct ia64_fpreg fr[128]; + }; + +/* Options set using PTRACE_SETOPTIONS. */ +enum __ptrace_setoptions { + PTRACE_O_TRACESYSGOOD = 0x00000001, + PTRACE_O_TRACEFORK = 0x00000002, + PTRACE_O_TRACEVFORK = 0x00000004, + PTRACE_O_TRACECLONE = 0x00000008, + PTRACE_O_TRACEEXEC = 0x00000010, + PTRACE_O_TRACEVFORKDONE = 0x00000020, + PTRACE_O_TRACEEXIT = 0x00000040, + PTRACE_O_MASK = 0x0000007f +}; + +/* Wait extended result codes for the above trace options. */ +enum __ptrace_eventcodes { + PTRACE_EVENT_FORK = 1, + PTRACE_EVENT_VFORK = 2, + PTRACE_EVENT_CLONE = 3, + PTRACE_EVENT_EXEC = 4, + PTRACE_EVENT_VFORK_DONE = 5, + PTRACE_EVENT_EXIT = 6 +}; + +/* Perform process tracing functions. REQUEST is one of the values + above, and determines the action to be taken. + For all requests except PTRACE_TRACEME, PID specifies the process to be + traced. + + PID and the other arguments described above for the various requests should + appear (those that are used for the particular request) as: + pid_t PID, void *ADDR, int DATA, void *ADDR2 + after REQUEST. */ +extern long int ptrace (enum __ptrace_request __request, ...) __THROW; + +__END_DECLS + +#endif /* _SYS_PTRACE_H */ diff --git a/sysdeps/unix/sysv/linux/ia64/sys/rse.h b/sysdeps/unix/sysv/linux/ia64/sys/rse.h new file mode 100644 index 0000000000..1d1c803d3c --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/sys/rse.h @@ -0,0 +1,78 @@ +/* Copyright (C) 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Mosberger-Tang . + + 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 _ia64_rse_h +#define _ia64_rse_h + +#include + +/* Register stack engine related helper functions. This file may be + used in applications, so be careful about the name-space and give + some consideration to non-GNU C compilers (though __inline is + fine). */ + +static __inline unsigned long +ia64_rse_slot_num (unsigned long *addr) +{ + return (((unsigned long) addr) >> 3) & 0x3f; +} + +/* Return TRUE if ADDR is the address of an RNAT slot. */ + +static __inline unsigned long +ia64_rse_is_rnat_slot (unsigned long *addr) +{ + return ia64_rse_slot_num (addr) == 0x3f; +} + +/* Returns the address of the RNAT slot that covers the slot at + address SLOT_ADDR. */ + +static __inline unsigned long * +ia64_rse_rnat_addr (unsigned long *slot_addr) +{ + return (unsigned long *) ((unsigned long) slot_addr | (0x3f << 3)); +} + +/* Calcuate the number of registers in the dirty partition starting at + BSPSTORE with a size of DIRTY bytes. This isn't simply DIRTY + divided by eight because the 64th slot is used to store ar.rnat. */ + +static __inline unsigned long +ia64_rse_num_regs (unsigned long *bspstore, unsigned long *bsp) +{ + unsigned long slots = (bsp - bspstore); + + return slots - (ia64_rse_slot_num(bspstore) + slots)/0x40; +} + +/* The inverse of the above: given bspstore and the number of + registers, calculate ar.bsp. */ + +static __inline unsigned long * +ia64_rse_skip_regs (unsigned long *addr, long num_regs) +{ + long delta = ia64_rse_slot_num(addr) + num_regs; + + if (num_regs < 0) + delta -= 0x3e; + return addr + num_regs + delta/0x3f; +} + +#endif /* _ia64_rse_h */ diff --git a/sysdeps/unix/sysv/linux/ia64/sys/ucontext.h b/sysdeps/unix/sysv/linux/ia64/sys/ucontext.h new file mode 100644 index 0000000000..17dc85f997 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/sys/ucontext.h @@ -0,0 +1,66 @@ +/* Copyright (C) 1998, 2000, 2001, 2002, 2004 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 _SYS_UCONTEXT_H +#define _SYS_UCONTEXT_H 1 + +#include +#include + +#include + +/* + * These are here mostly for backwards compatibility with older Unices. + * IA-64 Linux does not distinguish between "struct sigcontext" and + * "ucontext_t" as all the necessary info is inside the former. + */ + +typedef struct sigcontext mcontext_t; + +#if defined __cplusplus && __GNUC_PREREQ (3, 5) +# define _SC_GR0_OFFSET \ + __builtin_offsetof (struct sigcontext, sc_gr[0]) +#elif defined __GNUC__ +# define _SC_GR0_OFFSET \ + (((char *) &((struct sigcontext *) 0)->sc_gr[0]) - (char *) 0) +#else +# define _SC_GR0_OFFSET 0xc8 /* pray that this is correct... */ +#endif + +typedef struct ucontext + { + union + { + mcontext_t _mc; + struct + { + unsigned long _pad[_SC_GR0_OFFSET/8]; + struct ucontext *_link; /* this should overlay sc_gr[0] */ + } + _uc; + } + _u; + } +ucontext_t; + +#define uc_mcontext _u._mc +#define uc_sigmask _u._mc.sc_mask +#define uc_stack _u._mc.sc_stack +#define uc_link _u._uc._link + +#endif /* sys/ucontext.h */ diff --git a/sysdeps/unix/sysv/linux/ia64/sys/user.h b/sysdeps/unix/sysv/linux/ia64/sys/user.h new file mode 100644 index 0000000000..039218761b --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/sys/user.h @@ -0,0 +1,54 @@ +/* Copyright (C) 2002 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 _SYS_USER_H +#define _SYS_USER_H 1 + +#include +#include + +/* This definition comes directly from the kernel headers. If + anything changes in them this header has to be changed, too. */ + + +/* The definition in the kernel has the comment "XXX fix me". */ +#define EF_SIZE 3072 + + +struct user +{ + unsigned long int regs[EF_SIZE / 8 + 32]; /* Integer and fp regs. */ + size_t u_tsize; /* Text size (pages). */ + size_t u_dsize; /* Data size (pages). */ + size_t u_ssize; /* Stack size (pages). */ + unsigned long int start_code; /* Text starting address. */ + unsigned long int start_data; /* Data starting address. */ + unsigned long int start_stack; /* Stack starting address. */ + long int signal; /* Signal causing core dump. */ + struct regs *u_ar0; /* Help gdb find registers. */ + unsigned long int magic; /* Identifies a core file. */ + char u_comm[32]; /* User command name. */ +}; + +#define NBPG PAGE_SIZE +#define UPAGES 1 +#define HOST_TEXT_START_ADDR (u.start_code) +#define HOST_DATA_START_ADDR (u.start_data) +#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) + +#endif /* sys/user.h */ diff --git a/sysdeps/unix/sysv/linux/ia64/syscall.S b/sysdeps/unix/sysv/linux/ia64/syscall.S new file mode 100644 index 0000000000..c638cc865f --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/syscall.S @@ -0,0 +1,30 @@ +/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jes Sorensen . + + 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. */ + +#include + +ENTRY(syscall) + alloc r2=ar.pfs,1,0,8,0 + mov r15=r32 /* syscall number */ + break __BREAK_SYSCALL + ;; + cmp.ne p6,p0=-1,r10 /* r10 = -1 on error */ +(p6) ret + br.cond.spnt.few __syscall_error +PSEUDO_END(syscall) diff --git a/sysdeps/unix/sysv/linux/ia64/syscalls.list b/sysdeps/unix/sysv/linux/ia64/syscalls.list new file mode 100644 index 0000000000..c55c70ef54 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/syscalls.list @@ -0,0 +1,50 @@ +# File name Caller Syscall name # args Strong name Weak names + +umount2 - umount 2 __umount2 umount2 + +getpriority - getpriority i:ii __getpriority getpriority + +# semaphore and shm system calls +msgctl - msgctl i:iip __msgctl msgctl +msgget - msgget i:ii __msgget msgget +msgrcv - msgrcv Ci:ibnii __msgrcv msgrcv +msgsnd - msgsnd Ci:ibni __msgsnd msgsnd +shmat - shmat i:ipi __shmat shmat +shmctl - shmctl i:iip __shmctl shmctl +shmdt - shmdt i:s __shmdt shmdt +shmget - shmget i:iii __shmget shmget +semop - semop i:ipi __semop semop +semtimedop - semtimedop i:ipip semtimedop +semget - semget i:iii __semget semget +semctl - semctl i:iiii __semctl semctl + +# proper socket implementations: +accept - accept Ci:iBN __libc_accept __accept accept +bind - bind i:ipi __bind bind +connect - connect Ci:ipi __libc_connect __connect_internal __connect connect +getpeername - getpeername i:ipp __getpeername getpeername +getsockname - getsockname i:ipp __getsockname getsockname +getsockopt - getsockopt i:iiiBN __getsockopt getsockopt +listen - listen i:ii __listen listen +recv - recv Ci:ibni __libc_recv __recv recv +recvfrom - recvfrom Ci:ibniBN __libc_recvfrom __recvfrom recvfrom +recvmsg - recvmsg Ci:ipi __libc_recvmsg __recvmsg recvmsg +send - send Ci:ibni __libc_send __send send +sendmsg - sendmsg Ci:ipi __libc_sendmsg __sendmsg sendmsg +sendto - sendto Ci:ibnibn __libc_sendto __sendto sendto +setsockopt - setsockopt i:iiibn __setsockopt setsockopt +shutdown - shutdown i:ii __shutdown shutdown +socket - socket i:iii __socket socket +socketpair - socketpair i:iiif __socketpair socketpair + +# DIG-compliant access to PCI configuration space: +pciconfig_read EXTRA pciconfig_read 5 pciconfig_read +pciconfig_write EXTRA pciconfig_write 5 pciconfig_write + +ptrace - ptrace 4 __ptrace ptrace + + +# System calls with wrappers. + +# IA-64 specific +getunwind EXTRA getunwind i:pi getunwind diff --git a/sysdeps/unix/sysv/linux/ia64/sysconf.c b/sysdeps/unix/sysv/linux/ia64/sysconf.c new file mode 100644 index 0000000000..732cc68efd --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/sysconf.c @@ -0,0 +1,31 @@ +/* Get file-specific information about a file. Linux/ia64 version. + Copyright (C) 2003, 2004, 2011 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. */ + +#include +#include +#include +#include + + +#include "has_cpuclock.c" +#define HAS_CPUCLOCK(name) (has_cpuclock () ? _POSIX_VERSION : -1) + + +/* Now the generic Linux version. */ +#include "../sysconf.c" diff --git a/sysdeps/unix/sysv/linux/ia64/sysdep.S b/sysdeps/unix/sysv/linux/ia64/sysdep.S new file mode 100644 index 0000000000..3271857d61 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/sysdep.S @@ -0,0 +1,59 @@ +/* Copyright (C) 1999-2001, 2003, 2004, 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Mosberger-Tang . + + 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. */ + +#include +#include +#include + +ENTRY(__syscall_error) +#if RTLD_PRIVATE_ERRNO + /* + * Note that the gp has to be set properly for this to work. + * As long as all syscalls are in the same load unit + * (executable or shared library) as this routine, we should + * be fine. Otherwise, we would have to first load the global + * pointer register from __gp. + */ + addl r2=@gprel(rtld_errno),gp + ;; + st4 [r2]=r8 + mov r8=-1 +#else +# ifndef NOT_IN_libc +# define SYSCALL_ERROR_ERRNO __libc_errno +# else +# define SYSCALL_ERROR_ERRNO errno +# endif + addl r2=@ltoff(@tprel(SYSCALL_ERROR_ERRNO)), gp;; + ld8 r2=[r2] + mov r3=r8;; + mov r8=-1 + add r2=r2,r13;; + st4 [r2]=r3 +#endif + ret // ret is #define'd in syscall.h! +END(__syscall_error) + +ENTRY(__ia64_syscall) + mov r15=r37 /* syscall number */ + break __BREAK_SYSCALL + cmp.eq p6,p0=-1,r10 /* r10 = -1 on error */ +(p6) br.cond.spnt.few __syscall_error + ret +PSEUDO_END(__ia64_syscall) diff --git a/sysdeps/unix/sysv/linux/ia64/sysdep.h b/sysdeps/unix/sysv/linux/ia64/sysdep.h new file mode 100644 index 0000000000..dd7a5b1b1d --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/sysdep.h @@ -0,0 +1,384 @@ +/* Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. + This file is part of the GNU C Library. + Written by Jes Sorensen, , April 1999. + Based on code originally written by David Mosberger-Tang + + 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 _LINUX_IA64_SYSDEP_H +#define _LINUX_IA64_SYSDEP_H 1 + +#include +#include +#include +#include + +/* As of GAS v2.4.90.0.7, including a ".align" directive inside a + function will cause bad unwind info to be emitted (GAS doesn't know + how to account for the padding introduced by the .align directive). + Turning on this macro will work around this bug by introducing the + necessary padding explicitly. */ +#define GAS_ALIGN_BREAKS_UNWIND_INFO + +/* For Linux we can use the system call table in the header file + /usr/include/asm/unistd.h + of the kernel. But these symbols do not follow the SYS_* syntax + so we have to redefine the `SYS_ify' macro here. */ +#undef SYS_ify +#ifdef __STDC__ +# define SYS_ify(syscall_name) __NR_##syscall_name +#else +# define SYS_ify(syscall_name) __NR_/**/syscall_name +#endif + +/* This is a kludge to make syscalls.list find these under the names + pread and pwrite, since some kernel headers define those names + and some define the *64 names for the same system calls. */ +#if !defined __NR_pread && defined __NR_pread64 +# define __NR_pread __NR_pread64 +#endif +#if !defined __NR_pwrite && defined __NR_pwrite64 +# define __NR_pwrite __NR_pwrite64 +#endif + +/* This is to help the old kernel headers where __NR_semtimedop is not + available. */ +#ifndef __NR_semtimedop +# define __NR_semtimedop 1247 +#endif + +#if defined USE_DL_SYSINFO \ + && (!defined NOT_IN_libc \ + || defined IS_IN_libpthread || defined IS_IN_librt) +# define IA64_USE_NEW_STUB +#else +# undef IA64_USE_NEW_STUB +#endif + +#ifdef __ASSEMBLER__ + +#undef CALL_MCOUNT +#ifdef PROF +# define CALL_MCOUNT \ + .data; \ +1: data8 0; /* XXX fixme: use .xdata8 once labels work */ \ + .previous; \ + .prologue; \ + .save ar.pfs, r40; \ + alloc out0 = ar.pfs, 8, 0, 4, 0; \ + mov out1 = gp; \ + .save rp, out2; \ + mov out2 = rp; \ + .body; \ + ;; \ + addl out3 = @ltoff(1b), gp; \ + br.call.sptk.many rp = _mcount \ + ;; +#else +# define CALL_MCOUNT /* Do nothing. */ +#endif + +/* Linux uses a negative return value to indicate syscall errors, unlike + most Unices, which use the condition codes' carry flag. + + Since version 2.1 the return value of a system call might be negative + even if the call succeeded. E.g., the `lseek' system call might return + a large offset. Therefore we must not anymore test for < 0, but test + for a real error by making sure the value in %d0 is a real error + number. Linus said he will make sure the no syscall returns a value + in -1 .. -4095 as a valid result so we can savely test with -4095. */ + +/* We don't want the label for the error handler to be visible in the symbol + table when we define it here. */ +#define SYSCALL_ERROR_LABEL __syscall_error + +#undef PSEUDO +#define PSEUDO(name, syscall_name, args) \ + ENTRY(name) \ + DO_CALL (SYS_ify(syscall_name)); \ + cmp.eq p6,p0=-1,r10; \ +(p6) br.cond.spnt.few __syscall_error; + +#define DO_CALL_VIA_BREAK(num) \ + mov r15=num; \ + break __BREAK_SYSCALL + +#ifdef IA64_USE_NEW_STUB +# ifdef SHARED +# define DO_CALL(num) \ + .prologue; \ + adds r2 = SYSINFO_OFFSET, r13;; \ + ld8 r2 = [r2]; \ + .save ar.pfs, r11; \ + mov r11 = ar.pfs;; \ + .body; \ + mov r15 = num; \ + mov b7 = r2; \ + br.call.sptk.many b6 = b7;; \ + .restore sp; \ + mov ar.pfs = r11; \ + .prologue; \ + .body +# else /* !SHARED */ +# define DO_CALL(num) \ + .prologue; \ + mov r15 = num; \ + movl r2 = _dl_sysinfo;; \ + ld8 r2 = [r2]; \ + .save ar.pfs, r11; \ + mov r11 = ar.pfs;; \ + .body; \ + mov b7 = r2; \ + br.call.sptk.many b6 = b7;; \ + .restore sp; \ + mov ar.pfs = r11; \ + .prologue; \ + .body +# endif +#else +# define DO_CALL(num) DO_CALL_VIA_BREAK(num) +#endif + +#undef PSEUDO_END +#define PSEUDO_END(name) .endp C_SYMBOL_NAME(name); + +#undef PSEUDO_NOERRNO +#define PSEUDO_NOERRNO(name, syscall_name, args) \ + ENTRY(name) \ + DO_CALL (SYS_ify(syscall_name)); + +#undef PSEUDO_END_NOERRNO +#define PSEUDO_END_NOERRNO(name) .endp C_SYMBOL_NAME(name); + +#undef PSEUDO_ERRVAL +#define PSEUDO_ERRVAL(name, syscall_name, args) \ + ENTRY(name) \ + DO_CALL (SYS_ify(syscall_name)); \ + cmp.eq p6,p0=-1,r10; \ +(p6) mov r10=r8; + + +#undef PSEUDO_END_ERRVAL +#define PSEUDO_END_ERRVAL(name) .endp C_SYMBOL_NAME(name); + +#undef END +#define END(name) \ + .size C_SYMBOL_NAME(name), . - C_SYMBOL_NAME(name) ; \ + .endp C_SYMBOL_NAME(name) + +#define ret br.ret.sptk.few b0 +#define ret_NOERRNO ret +#define ret_ERRVAL ret + +#else /* not __ASSEMBLER__ */ + +#define BREAK_INSN_1(num) "break " #num ";;\n\t" +#define BREAK_INSN(num) BREAK_INSN_1(num) + +/* On IA-64 we have stacked registers for passing arguments. The + "out" registers end up being the called function's "in" + registers. + + Also, since we have plenty of registers we have two return values + from a syscall. r10 is set to -1 on error, whilst r8 contains the + (non-negative) errno on error or the return value on success. + */ + +#ifdef IA64_USE_NEW_STUB + +# define DO_INLINE_SYSCALL_NCS(name, nr, args...) \ + LOAD_ARGS_##nr (args) \ + register long _r8 __asm ("r8"); \ + register long _r10 __asm ("r10"); \ + register long _r15 __asm ("r15") = name; \ + register void *_b7 __asm ("b7") = ((tcbhead_t *)__thread_self)->__private;\ + long _retval; \ + LOAD_REGS_##nr \ + /* \ + * Don't specify any unwind info here. We mark ar.pfs as \ + * clobbered. This will force the compiler to save ar.pfs \ + * somewhere and emit appropriate unwind info for that save. \ + */ \ + __asm __volatile ("br.call.sptk.many b6=%0;;\n" \ + : "=b"(_b7), "=r" (_r8), "=r" (_r10), "=r" (_r15) \ + ASM_OUTARGS_##nr \ + : "0" (_b7), "3" (_r15) ASM_ARGS_##nr \ + : "memory", "ar.pfs" ASM_CLOBBERS_##nr); \ + _retval = _r8; + +#else /* !IA64_USE_NEW_STUB */ + +# define DO_INLINE_SYSCALL_NCS(name, nr, args...) \ + LOAD_ARGS_##nr (args) \ + register long _r8 asm ("r8"); \ + register long _r10 asm ("r10"); \ + register long _r15 asm ("r15") = name; \ + long _retval; \ + LOAD_REGS_##nr \ + __asm __volatile (BREAK_INSN (__BREAK_SYSCALL) \ + : "=r" (_r8), "=r" (_r10), "=r" (_r15) \ + ASM_OUTARGS_##nr \ + : "2" (_r15) ASM_ARGS_##nr \ + : "memory" ASM_CLOBBERS_##nr); \ + _retval = _r8; + +#endif /* !IA64_USE_NEW_STUB */ + +#define DO_INLINE_SYSCALL(name, nr, args...) \ + DO_INLINE_SYSCALL_NCS (__NR_##name, nr, ##args) + +#undef INLINE_SYSCALL +#define INLINE_SYSCALL(name, nr, args...) \ + ({ \ + DO_INLINE_SYSCALL_NCS (__NR_##name, nr, args) \ + if (_r10 == -1) \ + { \ + __set_errno (_retval); \ + _retval = -1; \ + } \ + _retval; }) + +#undef INTERNAL_SYSCALL_DECL +#define INTERNAL_SYSCALL_DECL(err) long int err + +#undef INTERNAL_SYSCALL +#define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \ + ({ \ + DO_INLINE_SYSCALL_NCS (name, nr, args) \ + err = _r10; \ + _retval; }) +#define INTERNAL_SYSCALL(name, err, nr, args...) \ + INTERNAL_SYSCALL_NCS (__NR_##name, err, nr, ##args) + +#undef INTERNAL_SYSCALL_ERROR_P +#define INTERNAL_SYSCALL_ERROR_P(val, err) (err == -1) + +#undef INTERNAL_SYSCALL_ERRNO +#define INTERNAL_SYSCALL_ERRNO(val, err) (val) + +#define LOAD_ARGS_0() +#define LOAD_REGS_0 +#define LOAD_ARGS_1(a1) \ + long _arg1 = (long) (a1); \ + LOAD_ARGS_0 () +#define LOAD_REGS_1 \ + register long _out0 asm ("out0") = _arg1; \ + LOAD_REGS_0 +#define LOAD_ARGS_2(a1, a2) \ + long _arg2 = (long) (a2); \ + LOAD_ARGS_1 (a1) +#define LOAD_REGS_2 \ + register long _out1 asm ("out1") = _arg2; \ + LOAD_REGS_1 +#define LOAD_ARGS_3(a1, a2, a3) \ + long _arg3 = (long) (a3); \ + LOAD_ARGS_2 (a1, a2) +#define LOAD_REGS_3 \ + register long _out2 asm ("out2") = _arg3; \ + LOAD_REGS_2 +#define LOAD_ARGS_4(a1, a2, a3, a4) \ + long _arg4 = (long) (a4); \ + LOAD_ARGS_3 (a1, a2, a3) +#define LOAD_REGS_4 \ + register long _out3 asm ("out3") = _arg4; \ + LOAD_REGS_3 +#define LOAD_ARGS_5(a1, a2, a3, a4, a5) \ + long _arg5 = (long) (a5); \ + LOAD_ARGS_4 (a1, a2, a3, a4) +#define LOAD_REGS_5 \ + register long _out4 asm ("out4") = _arg5; \ + LOAD_REGS_4 +#define LOAD_ARGS_6(a1, a2, a3, a4, a5, a6) \ + long _arg6 = (long) (a6); \ + LOAD_ARGS_5 (a1, a2, a3, a4, a5) +#define LOAD_REGS_6 \ + register long _out5 asm ("out5") = _arg6; \ + LOAD_REGS_5 + +#define ASM_OUTARGS_0 +#define ASM_OUTARGS_1 ASM_OUTARGS_0, "=r" (_out0) +#define ASM_OUTARGS_2 ASM_OUTARGS_1, "=r" (_out1) +#define ASM_OUTARGS_3 ASM_OUTARGS_2, "=r" (_out2) +#define ASM_OUTARGS_4 ASM_OUTARGS_3, "=r" (_out3) +#define ASM_OUTARGS_5 ASM_OUTARGS_4, "=r" (_out4) +#define ASM_OUTARGS_6 ASM_OUTARGS_5, "=r" (_out5) + +#ifdef IA64_USE_NEW_STUB +#define ASM_ARGS_0 +#define ASM_ARGS_1 ASM_ARGS_0, "4" (_out0) +#define ASM_ARGS_2 ASM_ARGS_1, "5" (_out1) +#define ASM_ARGS_3 ASM_ARGS_2, "6" (_out2) +#define ASM_ARGS_4 ASM_ARGS_3, "7" (_out3) +#define ASM_ARGS_5 ASM_ARGS_4, "8" (_out4) +#define ASM_ARGS_6 ASM_ARGS_5, "9" (_out5) +#else +#define ASM_ARGS_0 +#define ASM_ARGS_1 ASM_ARGS_0, "3" (_out0) +#define ASM_ARGS_2 ASM_ARGS_1, "4" (_out1) +#define ASM_ARGS_3 ASM_ARGS_2, "5" (_out2) +#define ASM_ARGS_4 ASM_ARGS_3, "6" (_out3) +#define ASM_ARGS_5 ASM_ARGS_4, "7" (_out4) +#define ASM_ARGS_6 ASM_ARGS_5, "8" (_out5) +#endif + +#define ASM_CLOBBERS_0 ASM_CLOBBERS_1, "out0" +#define ASM_CLOBBERS_1 ASM_CLOBBERS_2, "out1" +#define ASM_CLOBBERS_2 ASM_CLOBBERS_3, "out2" +#define ASM_CLOBBERS_3 ASM_CLOBBERS_4, "out3" +#define ASM_CLOBBERS_4 ASM_CLOBBERS_5, "out4" +#define ASM_CLOBBERS_5 ASM_CLOBBERS_6, "out5" +#define ASM_CLOBBERS_6_COMMON , "out6", "out7", \ + /* Non-stacked integer registers, minus r8, r10, r15. */ \ + "r2", "r3", "r9", "r11", "r12", "r13", "r14", "r16", "r17", "r18", \ + "r19", "r20", "r21", "r22", "r23", "r24", "r25", "r26", "r27", \ + "r28", "r29", "r30", "r31", \ + /* Predicate registers. */ \ + "p6", "p7", "p8", "p9", "p10", "p11", "p12", "p13", "p14", "p15", \ + /* Non-rotating fp registers. */ \ + "f6", "f7", "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", \ + /* Branch registers. */ \ + "b6" + +#ifdef IA64_USE_NEW_STUB +# define ASM_CLOBBERS_6 ASM_CLOBBERS_6_COMMON +#else +# define ASM_CLOBBERS_6 ASM_CLOBBERS_6_COMMON , "b7" +#endif + +#endif /* not __ASSEMBLER__ */ + +/* Pointer mangling support. */ +#if defined NOT_IN_libc && defined IS_IN_rtld +/* We cannot use the thread descriptor because in ld.so we use setjmp + earlier than the descriptor is initialized. */ +#else +# ifdef __ASSEMBLER__ +# define PTR_MANGLE(reg, tmpreg) \ + add tmpreg=-16,r13 \ + ;; \ + ld8 tmpreg=[tmpreg] \ + ;; \ + xor reg=reg, tmpreg +# define PTR_DEMANGLE(reg, tmpreg) PTR_MANGLE (reg, tmpreg) +# else +# define PTR_MANGLE(var) \ + (var) = (void *) ((uintptr_t) (var) ^ THREAD_GET_POINTER_GUARD ()) +# define PTR_DEMANGLE(var) PTR_MANGLE (var) +# endif +#endif + +#endif /* linux/ia64/sysdep.h */ diff --git a/sysdeps/unix/sysv/linux/ia64/system.c b/sysdeps/unix/sysv/linux/ia64/system.c new file mode 100644 index 0000000000..413ff27b39 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/system.c @@ -0,0 +1,35 @@ +/* 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. */ + +#include + +/* We have to and actually can handle cancelable system(). The big + problem: we have to kill the child process if necessary. To do + this a cleanup handler has to be registered and is has to be able + to find the PID of the child. The main problem is to reliable have + the PID when needed. It is not necessary for the parent thread to + return. It might still be in the kernel when the cancellation + request comes. Therefore we have to use the clone() calls ability + to have the kernel write the PID into the user-level variable. */ +#ifdef __ASSUME_CLONE_THREAD_FLAGS +# define FORK() \ + INLINE_SYSCALL (clone2, 6, CLONE_PARENT_SETTID | SIGCHLD, NULL, 0, \ + &pid, NULL, NULL) +#endif + +#include "../system.c" diff --git a/sysdeps/unix/sysv/linux/ia64/ucontext_i.h b/sysdeps/unix/sysv/linux/ia64/ucontext_i.h new file mode 100644 index 0000000000..e2a4d3c2b8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/ucontext_i.h @@ -0,0 +1,47 @@ +/* Copyright (C) 2001, 2003 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David Mosberger-Tang . + + 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. */ + +/* Constants shared between setcontext() and getcontext(). Don't + install this header file. */ + +#define SIG_BLOCK 0 +#define SIG_UNBLOCK 1 +#define SIG_SETMASK 2 + +#include + +#define rTMP r16 +#define rPOS r16 +#define rCPOS r17 +#define rNAT r18 + +#define rB5 r18 +#define rB4 r19 +#define rB3 r20 +#define rB2 r21 +#define rB1 r22 +#define rB0 r23 +#define rRSC r24 +#define rBSP r25 +#define rRNAT r26 +#define rUNAT r27 +#define rFPSR r28 +#define rPFS r29 +#define rLC r30 +#define rPR r31 diff --git a/sysdeps/unix/sysv/linux/ia64/umount.c b/sysdeps/unix/sysv/linux/ia64/umount.c new file mode 100644 index 0000000000..462ace3258 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/umount.c @@ -0,0 +1,31 @@ +/* umount system call for Linux/ia64. + Copyright (C) 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. */ + +#include +#include + +#include +#include + +/* Unmount a filesystem. */ +int +umount (const char *special_file) +{ + return INLINE_SYSCALL (umount, 2, CHECK_STRING (special_file), 0); +} diff --git a/sysdeps/unix/sysv/linux/ia64/unwind-dw2-fde.c b/sysdeps/unix/sysv/linux/ia64/unwind-dw2-fde.c new file mode 100644 index 0000000000..15d12abfce --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/unwind-dw2-fde.c @@ -0,0 +1 @@ +/* Linux/ia64 does not need unwind table registry. */ diff --git a/sysdeps/unix/sysv/linux/ia64/vfork.S b/sysdeps/unix/sysv/linux/ia64/vfork.S new file mode 100644 index 0000000000..086fce9387 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/vfork.S @@ -0,0 +1,44 @@ +/* Copyright (C) 2000, 2002 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. */ + + +#include +#define _SIGNAL_H +#include + +/* The following are defined in linux/sched.h, which unfortunately */ +/* is not safe for inclusion in an assembly file. */ +#define CLONE_VM 0x00000100 /* set if VM shared between processes */ +#define CLONE_VFORK 0x00004000 /* set if the parent wants the child to wake it up on mm_release */ + +/* pid_t vfork(void); */ +/* Implemented as __clone_syscall(CLONE_VFORK | CLONE_VM | SIGCHLD, 0) */ + +ENTRY(__vfork) + alloc r2=ar.pfs,0,0,2,0 + mov out0=CLONE_VM+CLONE_VFORK+SIGCHLD + mov out1=0 /* Standard sp value. */ + ;; + DO_CALL_VIA_BREAK (SYS_ify (clone)) + cmp.eq p6,p0=-1,r10 +(p6) br.cond.spnt.few __syscall_error + ret +PSEUDO_END(__vfork) +libc_hidden_def (__vfork) + +weak_alias (__vfork, vfork) diff --git a/sysdeps/unix/sysv/linux/ia64/wordexp.c b/sysdeps/unix/sysv/linux/ia64/wordexp.c new file mode 100644 index 0000000000..c2972e40c2 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/wordexp.c @@ -0,0 +1,60 @@ +/* Copyright (C) 2001, 2004, 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 + 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. */ + +#include + +/* For Linux/Alpha we have to make the wordexp symbols versioned. */ +#define wordexp(words, pwordexp, flags) \ + __new_wordexp (words, pwordexp, flags) + +#include + +versioned_symbol (libc, __new_wordexp, wordexp, GLIBC_2_2_2); + + +#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2_2) +/* The old, incorrect wordexp_t definition. */ +typedef struct + { + int we_wordc; /* Count of words matched. */ + char **we_wordv; /* List of expanded words. */ + int we_offs; /* Slots to reserve in `we_wordv'. */ + } old_wordexp_t; + + +int +attribute_compat_text_section +__old_wordexp (const char *words, old_wordexp_t *pwordexp, int flags) +{ + wordexp_t we; + int result; + + we.we_wordc = pwordexp->we_wordc; + we.we_wordv = pwordexp->we_wordv; + we.we_offs = pwordexp->we_offs; + + result = __new_wordexp (words, &we, flags); + + pwordexp->we_wordc = we.we_wordc; + pwordexp->we_wordv = we.we_wordv; + pwordexp->we_offs = we.we_offs; + + return result; +} +compat_symbol (libc, __old_wordexp, wordexp, GLIBC_2_1); +#endif From 0347518d6326846cd5fdbe4b472dfc85a2dfc78c Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 16 Apr 2012 22:08:04 -0400 Subject: [PATCH 4295/4487] ia64: strip trailing whitespace Many ia64 files have trailing whitespace which gets in the way and annoys me. So strip it away: find `find sysdeps/ -name ia64` -type f -exec sed -i 's:[[:space:]]*$::' {} + Signed-off-by: Mike Frysinger --- ChangeLog.ia64 | 107 + sysdeps/ia64/fpu/e_acosf.S | 238 +- sysdeps/ia64/fpu/e_acoshl.S | 482 +-- sysdeps/ia64/fpu/e_acosl.S | 126 +- sysdeps/ia64/fpu/e_asinf.S | 254 +- sysdeps/ia64/fpu/e_asinl.S | 126 +- sysdeps/ia64/fpu/e_atan2f.S | 256 +- sysdeps/ia64/fpu/e_atanhl.S | 130 +- sysdeps/ia64/fpu/e_coshl.S | 108 +- sysdeps/ia64/fpu/e_exp.S | 2 +- sysdeps/ia64/fpu/e_expf.S | 4 +- sysdeps/ia64/fpu/e_fmodl.S | 4 +- sysdeps/ia64/fpu/e_hypot.S | 46 +- sysdeps/ia64/fpu/e_hypotf.S | 52 +- sysdeps/ia64/fpu/e_hypotl.S | 44 +- sysdeps/ia64/fpu/e_log.S | 6 +- sysdeps/ia64/fpu/e_log2.S | 78 +- sysdeps/ia64/fpu/e_log2f.S | 78 +- sysdeps/ia64/fpu/e_log2l.S | 92 +- sysdeps/ia64/fpu/e_logl.S | 226 +- sysdeps/ia64/fpu/e_powf.S | 6 +- sysdeps/ia64/fpu/e_remainder.S | 134 +- sysdeps/ia64/fpu/e_remainderf.S | 148 +- sysdeps/ia64/fpu/e_remainderl.S | 140 +- sysdeps/ia64/fpu/e_scalb.S | 2 +- sysdeps/ia64/fpu/e_scalbf.S | 2 +- sysdeps/ia64/fpu/e_scalbl.S | 2 +- sysdeps/ia64/fpu/e_sinhl.S | 110 +- sysdeps/ia64/fpu/e_sqrt.S | 32 +- sysdeps/ia64/fpu/e_sqrtf.S | 38 +- sysdeps/ia64/fpu/e_sqrtl.S | 26 +- sysdeps/ia64/fpu/libm_cpu_defs.h | 4 +- sysdeps/ia64/fpu/libm_error_codes.h | 10 +- sysdeps/ia64/fpu/libm_frexp.S | 34 +- sysdeps/ia64/fpu/libm_frexpf.S | 34 +- sysdeps/ia64/fpu/libm_frexpl.S | 34 +- sysdeps/ia64/fpu/libm_scalblnf.S | 4 +- sysdeps/ia64/fpu/libm_tan.S | 94 +- sysdeps/ia64/fpu/s_asinhl.S | 194 +- sysdeps/ia64/fpu/s_atanf.S | 248 +- sysdeps/ia64/fpu/s_atanl.S | 150 +- sysdeps/ia64/fpu/s_cbrtl.S | 14 +- sysdeps/ia64/fpu/s_cos.S | 46 +- sysdeps/ia64/fpu/s_cosf.S | 36 +- sysdeps/ia64/fpu/s_erf.S | 114 +- sysdeps/ia64/fpu/s_erfc.S | 256 +- sysdeps/ia64/fpu/s_erfcf.S | 186 +- sysdeps/ia64/fpu/s_erfcl.S | 448 +-- sysdeps/ia64/fpu/s_erff.S | 66 +- sysdeps/ia64/fpu/s_erfl.S | 236 +- sysdeps/ia64/fpu/s_expm1.S | 2 +- sysdeps/ia64/fpu/s_expm1f.S | 6 +- sysdeps/ia64/fpu/s_expm1l.S | 186 +- sysdeps/ia64/fpu/s_fabs.S | 30 +- sysdeps/ia64/fpu/s_fabsf.S | 30 +- sysdeps/ia64/fpu/s_fabsl.S | 30 +- sysdeps/ia64/fpu/s_finite.S | 2 +- sysdeps/ia64/fpu/s_fma.S | 24 +- sysdeps/ia64/fpu/s_fmaf.S | 24 +- sysdeps/ia64/fpu/s_fmal.S | 24 +- sysdeps/ia64/fpu/s_fmax.S | 28 +- sysdeps/ia64/fpu/s_fmaxf.S | 28 +- sysdeps/ia64/fpu/s_fmaxl.S | 28 +- sysdeps/ia64/fpu/s_fpclassify.S | 2 +- sysdeps/ia64/fpu/s_frexp.c | 10 +- sysdeps/ia64/fpu/s_frexpf.c | 10 +- sysdeps/ia64/fpu/s_frexpl.c | 10 +- sysdeps/ia64/fpu/s_ldexp.c | 12 +- sysdeps/ia64/fpu/s_ldexpf.c | 12 +- sysdeps/ia64/fpu/s_ldexpl.c | 12 +- sysdeps/ia64/fpu/s_log1pl.S | 236 +- sysdeps/ia64/fpu/s_modf.S | 42 +- sysdeps/ia64/fpu/s_modff.S | 42 +- sysdeps/ia64/fpu/s_modfl.S | 42 +- sysdeps/ia64/fpu/s_nextafter.S | 66 +- sysdeps/ia64/fpu/s_nextafterf.S | 66 +- sysdeps/ia64/fpu/s_nextafterl.S | 66 +- sysdeps/ia64/fpu/s_nexttoward.S | 66 +- sysdeps/ia64/fpu/s_nexttowardf.S | 66 +- sysdeps/ia64/fpu/s_nexttowardl.S | 64 +- sysdeps/ia64/fpu/s_round.S | 2 +- sysdeps/ia64/fpu/s_roundf.S | 2 +- sysdeps/ia64/fpu/s_roundl.S | 2 +- sysdeps/ia64/fpu/s_scalblnf.c | 12 +- sysdeps/ia64/fpu/s_scalbn.c | 12 +- sysdeps/ia64/fpu/s_scalbnf.c | 12 +- sysdeps/ia64/fpu/s_scalbnl.c | 12 +- sysdeps/ia64/fpu/s_signbit.S | 2 +- sysdeps/ia64/fpu/s_significand.S | 34 +- sysdeps/ia64/fpu/s_significandf.S | 32 +- sysdeps/ia64/fpu/s_significandl.S | 38 +- sysdeps/ia64/fpu/s_tan.S | 18 +- sysdeps/ia64/fpu/s_tanf.S | 18 +- sysdeps/ia64/fpu/s_tanh.S | 130 +- sysdeps/ia64/fpu/s_tanhf.S | 70 +- sysdeps/ia64/fpu/s_tanhl.S | 234 +- sysdeps/ia64/fpu/s_tanl.S | 22 +- sysdeps/ia64/fpu/w_tgamma.S | 196 +- sysdeps/ia64/fpu/w_tgammaf.S | 112 +- sysdeps/ia64/fpu/w_tgammal.S | 3094 +++++++++--------- sysdeps/ia64/softpipe.h | 2 +- sysdeps/ia64/strchr.S | 8 +- sysdeps/ia64/strlen.S | 6 +- sysdeps/ia64/strncmp.S | 2 +- sysdeps/unix/sysv/linux/ia64/register-dump.h | 2 +- 105 files changed, 5377 insertions(+), 5270 deletions(-) diff --git a/ChangeLog.ia64 b/ChangeLog.ia64 index 198dd0be0b..4c9b9f136b 100644 --- a/ChangeLog.ia64 +++ b/ChangeLog.ia64 @@ -1,3 +1,110 @@ +2012-04-22 Mike Frysinger + + * sysdeps/ia64/fpu/e_acosf.S: Trim trailing whitespace. + * sysdeps/ia64/fpu/e_acoshl.S: Likewise. + * sysdeps/ia64/fpu/e_acosl.S: Likewise. + * sysdeps/ia64/fpu/e_asinf.S: Likewise. + * sysdeps/ia64/fpu/e_asinl.S: Likewise. + * sysdeps/ia64/fpu/e_atan2f.S: Likewise. + * sysdeps/ia64/fpu/e_atanhl.S: Likewise. + * sysdeps/ia64/fpu/e_coshl.S: Likewise. + * sysdeps/ia64/fpu/e_exp.S: Likewise. + * sysdeps/ia64/fpu/e_expf.S: Likewise. + * sysdeps/ia64/fpu/e_fmodl.S: Likewise. + * sysdeps/ia64/fpu/e_hypot.S: Likewise. + * sysdeps/ia64/fpu/e_hypotf.S: Likewise. + * sysdeps/ia64/fpu/e_hypotl.S: Likewise. + * sysdeps/ia64/fpu/e_log.S: Likewise. + * sysdeps/ia64/fpu/e_log2.S: Likewise. + * sysdeps/ia64/fpu/e_log2f.S: Likewise. + * sysdeps/ia64/fpu/e_log2l.S: Likewise. + * sysdeps/ia64/fpu/e_logl.S: Likewise. + * sysdeps/ia64/fpu/e_powf.S: Likewise. + * sysdeps/ia64/fpu/e_remainder.S: Likewise. + * sysdeps/ia64/fpu/e_remainderf.S: Likewise. + * sysdeps/ia64/fpu/e_remainderl.S: Likewise. + * sysdeps/ia64/fpu/e_scalb.S: Likewise. + * sysdeps/ia64/fpu/e_scalbf.S: Likewise. + * sysdeps/ia64/fpu/e_scalbl.S: Likewise. + * sysdeps/ia64/fpu/e_sinhl.S: Likewise. + * sysdeps/ia64/fpu/e_sqrt.S: Likewise. + * sysdeps/ia64/fpu/e_sqrtf.S: Likewise. + * sysdeps/ia64/fpu/e_sqrtl.S: Likewise. + * sysdeps/ia64/fpu/libm_cpu_defs.h: Likewise. + * sysdeps/ia64/fpu/libm_error_codes.h: Likewise. + * sysdeps/ia64/fpu/libm_frexp.S: Likewise. + * sysdeps/ia64/fpu/libm_frexpf.S: Likewise. + * sysdeps/ia64/fpu/libm_frexpl.S: Likewise. + * sysdeps/ia64/fpu/libm_scalblnf.S: Likewise. + * sysdeps/ia64/fpu/libm_tan.S: Likewise. + * sysdeps/ia64/fpu/s_asinhl.S: Likewise. + * sysdeps/ia64/fpu/s_atanf.S: Likewise. + * sysdeps/ia64/fpu/s_atanl.S: Likewise. + * sysdeps/ia64/fpu/s_cbrtl.S: Likewise. + * sysdeps/ia64/fpu/s_cos.S: Likewise. + * sysdeps/ia64/fpu/s_cosf.S: Likewise. + * sysdeps/ia64/fpu/s_erf.S: Likewise. + * sysdeps/ia64/fpu/s_erfc.S: Likewise. + * sysdeps/ia64/fpu/s_erfcf.S: Likewise. + * sysdeps/ia64/fpu/s_erfcl.S: Likewise. + * sysdeps/ia64/fpu/s_erff.S: Likewise. + * sysdeps/ia64/fpu/s_erfl.S: Likewise. + * sysdeps/ia64/fpu/s_expm1.S: Likewise. + * sysdeps/ia64/fpu/s_expm1f.S: Likewise. + * sysdeps/ia64/fpu/s_expm1l.S: Likewise. + * sysdeps/ia64/fpu/s_fabs.S: Likewise. + * sysdeps/ia64/fpu/s_fabsf.S: Likewise. + * sysdeps/ia64/fpu/s_fabsl.S: Likewise. + * sysdeps/ia64/fpu/s_finite.S: Likewise. + * sysdeps/ia64/fpu/s_fma.S: Likewise. + * sysdeps/ia64/fpu/s_fmaf.S: Likewise. + * sysdeps/ia64/fpu/s_fmal.S: Likewise. + * sysdeps/ia64/fpu/s_fmax.S: Likewise. + * sysdeps/ia64/fpu/s_fmaxf.S: Likewise. + * sysdeps/ia64/fpu/s_fmaxl.S: Likewise. + * sysdeps/ia64/fpu/s_fpclassify.S: Likewise. + * sysdeps/ia64/fpu/s_frexp.c: Likewise. + * sysdeps/ia64/fpu/s_frexpf.c: Likewise. + * sysdeps/ia64/fpu/s_frexpl.c: Likewise. + * sysdeps/ia64/fpu/s_ldexp.c: Likewise. + * sysdeps/ia64/fpu/s_ldexpf.c: Likewise. + * sysdeps/ia64/fpu/s_ldexpl.c: Likewise. + * sysdeps/ia64/fpu/s_log1pl.S: Likewise. + * sysdeps/ia64/fpu/s_modf.S: Likewise. + * sysdeps/ia64/fpu/s_modff.S: Likewise. + * sysdeps/ia64/fpu/s_modfl.S: Likewise. + * sysdeps/ia64/fpu/s_nextafter.S: Likewise. + * sysdeps/ia64/fpu/s_nextafterf.S: Likewise. + * sysdeps/ia64/fpu/s_nextafterl.S: Likewise. + * sysdeps/ia64/fpu/s_nexttoward.S: Likewise. + * sysdeps/ia64/fpu/s_nexttowardf.S: Likewise. + * sysdeps/ia64/fpu/s_nexttowardl.S: Likewise. + * sysdeps/ia64/fpu/s_round.S: Likewise. + * sysdeps/ia64/fpu/s_roundf.S: Likewise. + * sysdeps/ia64/fpu/s_roundl.S: Likewise. + * sysdeps/ia64/fpu/s_scalblnf.c: Likewise. + * sysdeps/ia64/fpu/s_scalbn.c: Likewise. + * sysdeps/ia64/fpu/s_scalbnf.c: Likewise. + * sysdeps/ia64/fpu/s_scalbnl.c: Likewise. + * sysdeps/ia64/fpu/s_signbit.S: Likewise. + * sysdeps/ia64/fpu/s_significand.S: Likewise. + * sysdeps/ia64/fpu/s_significandf.S: Likewise. + * sysdeps/ia64/fpu/s_significandl.S: Likewise. + * sysdeps/ia64/fpu/s_tan.S: Likewise. + * sysdeps/ia64/fpu/s_tanf.S: Likewise. + * sysdeps/ia64/fpu/s_tanh.S: Likewise. + * sysdeps/ia64/fpu/s_tanhf.S: Likewise. + * sysdeps/ia64/fpu/s_tanhl.S: Likewise. + * sysdeps/ia64/fpu/s_tanl.S: Likewise. + * sysdeps/ia64/fpu/w_tgamma.S: Likewise. + * sysdeps/ia64/fpu/w_tgammaf.S: Likewise. + * sysdeps/ia64/fpu/w_tgammal.S: Likewise. + * sysdeps/ia64/softpipe.h: Likewise. + * sysdeps/ia64/strchr.S: Likewise. + * sysdeps/ia64/strlen.S: Likewise. + * sysdeps/ia64/strncmp.S: Likewise. + * sysdeps/unix/sysv/linux/ia64/register-dump.h: Likewise. + 2012-04-22 Mike Frysinger * sysdeps/ia64/Implies: Copied from the main tree. diff --git a/sysdeps/ia64/fpu/e_acosf.S b/sysdeps/ia64/fpu/e_acosf.S index 68b0b2ee8d..bdcac59d22 100644 --- a/sysdeps/ia64/fpu/e_acosf.S +++ b/sysdeps/ia64/fpu/e_acosf.S @@ -61,7 +61,7 @@ // The acosf function returns the arc cosine in the range [0, +pi] radians. // acos(1) returns +0 -// acos(x) returns a Nan and raises the invalid exception for |x| >1 +// acos(x) returns a Nan and raises the invalid exception for |x| >1 // |x| <= sqrt(2)/2. get Ax and Bx @@ -249,355 +249,355 @@ LOCAL_OBJECT_END(acosf_coeff_2_table) .section .text GLOBAL_LIBM_ENTRY(acosf) - + // Load the addresses of the two tables. // Then, load the coefficients and other constants. -{ .mfi +{ .mfi alloc r32 = ar.pfs,1,8,4,0 fnma.s1 acosf_t = f8,f8,f1 dep.z ACOSF_GR_1by2 = 0x3f,24,8 // 0x3f000000 -} -{ .mfi +} +{ .mfi addl ACOSF_Addr1 = @ltoff(acosf_coeff_1_table),gp fma.s1 acosf_x2 = f8,f8,f0 addl ACOSF_Addr2 = @ltoff(acosf_coeff_2_table),gp ;; } - -{ .mfi + +{ .mfi ld8 ACOSF_Addr1 = [ACOSF_Addr1] fmerge.s acosf_abs_x = f1,f8 dep ACOSF_GR_3by2 = -1,r0,22,8 // 0x3fc00000 -} -{ .mlx +} +{ .mlx nop.m 999 movl ACOSF_GR_5by2 = 0x40200000;; } - -{ .mfi + +{ .mfi setf.s acosf_1by2 = ACOSF_GR_1by2 fmerge.s acosf_sgn_x = f8,f1 nop.i 999 -} -{ .mfi +} +{ .mfi ld8 ACOSF_Addr2 = [ACOSF_Addr2] nop.f 0 nop.i 999;; } - -{ .mfi + +{ .mfi setf.s acosf_5by2 = ACOSF_GR_5by2 fcmp.lt.s1 p11,p12 = f8,f0 nop.i 999;; } -{ .mmf +{ .mmf ldfpd acosf_coeff_P1,acosf_coeff_P4 = [ACOSF_Addr1],16 setf.s acosf_3by2 = ACOSF_GR_3by2 fclass.m.unc p8,p0 = f8, 0xc3 ;; //@qnan | @snan } - -{ .mfi + +{ .mfi ldfpd acosf_coeff_P7,acosf_coeff_P6 = [ACOSF_Addr1],16 fma.s1 acosf_t2 = acosf_t,acosf_t,f0 nop.i 999 -} -{ .mfi +} +{ .mfi ldfpd acosf_coeff_P3,acosf_coeff_P8 = [ACOSF_Addr2],16 fma.s1 acosf_x4 = acosf_x2,acosf_x2,f0 nop.i 999;; } - -{ .mfi + +{ .mfi ldfpd acosf_coeff_P9,acosf_const_sqrt2by2 = [ACOSF_Addr1] fclass.m.unc p10,p0 = f8, 0x07 //@zero nop.i 999 -} -{ .mfi +} +{ .mfi ldfpd acosf_coeff_P5,acosf_coeff_P2 = [ACOSF_Addr2],16 fma.s1 acosf_x3 = f8,acosf_x2,f0 nop.i 999;; } - -{ .mfi + +{ .mfi ldfd acosf_const_piby2 = [ACOSF_Addr2] frsqrta.s1 acosf_B,p0 = acosf_t nop.i 999 -} -{ .mfb +} +{ .mfb nop.m 999 (p8) fma.s.s0 f8 = f8,f1,f0 (p8) br.ret.spnt b0 ;; // Exit if x=nan } - -{ .mfb + +{ .mfb nop.m 999 fcmp.eq.s1 p6,p0 = acosf_abs_x,f1 (p10) br.cond.spnt ACOSF_ZERO ;; // Branch if x=0 -} - -{ .mfi +} + +{ .mfi nop.m 999 fcmp.gt.s1 p9,p0 = acosf_abs_x,f1 nop.i 999;; -} - -{ .mfi +} + +{ .mfi nop.m 999 fma.s1 acosf_x8 = acosf_x4,acosf_x4,f0 nop.i 999 -} -{ .mfb +} +{ .mfb nop.m 999 fma.s1 acosf_t4 = acosf_t2,acosf_t2,f0 (p6) br.cond.spnt ACOSF_ABS_ONE ;; // Branch if |x|=1 -} +} -{ .mfi +{ .mfi nop.m 999 fma.s1 acosf_x5 = acosf_x2,acosf_x3,f0 nop.i 999 } -{ .mfb +{ .mfb (p9) mov GR_Parameter_TAG = 59 fma.s1 acosf_yby2 = acosf_t,acosf_1by2,f0 (p9) br.cond.spnt __libm_error_region ;; // Branch if |x|>1 } -{ .mfi +{ .mfi nop.m 999 fma.s1 acosf_Az = acosf_t,acosf_B,f0 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 fma.s1 acosf_B2 = acosf_B,acosf_B,f0 nop.i 999;; } - -{ .mfi + +{ .mfi nop.m 999 fma.s1 acosf_poly_p1 = f8,acosf_coeff_P1,f0 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 fma.s1 acosf_2poly_p1 = acosf_coeff_P1,acosf_t,f1 nop.i 999;; } -{ .mfi +{ .mfi nop.m 999 fma.s1 acosf_poly_p3 = acosf_coeff_P4,acosf_x2,acosf_coeff_P3 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 fma.s1 acosf_2poly_p6 = acosf_coeff_P7,acosf_t,acosf_coeff_P6 nop.i 999;; -} +} -{ .mfi +{ .mfi nop.m 999 fma.s1 acosf_poly_p7 = acosf_x2,acosf_coeff_P8,acosf_coeff_P7 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 fma.s1 acosf_2poly_p2 = acosf_coeff_P3,acosf_t,acosf_coeff_P2 nop.i 999;; } - -{ .mfi + +{ .mfi nop.m 999 fma.s1 acosf_poly_p5 = acosf_x2,acosf_coeff_P6,acosf_coeff_P5 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 fma.s1 acosf_2poly_p4 = acosf_coeff_P5,acosf_t,acosf_coeff_P4 nop.i 999;; } - -{ .mfi + +{ .mfi nop.m 999 fma.s1 acosf_x11 = acosf_x8,acosf_x3,f0 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 fnma.s1 acosf_dz = acosf_B2,acosf_yby2,acosf_1by2 nop.i 999;; } - -{ .mfi + +{ .mfi nop.m 999 fma.s1 acosf_poly_p1a = acosf_x2,acosf_poly_p1,f8 nop.i 999 } -{ .mfi +{ .mfi nop.m 999 fma.s1 acosf_2poly_p8 = acosf_coeff_P9,acosf_t,acosf_coeff_P8 nop.i 999;; } - + // Get the absolute value of x and determine the region in which x lies -{ .mfi +{ .mfi nop.m 999 fcmp.le.s1 p7,p8 = acosf_abs_x,acosf_const_sqrt2by2 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 fma.s1 acosf_poly_p2 = acosf_x2,acosf_poly_p3,acosf_coeff_P2 nop.i 999;; } - -{ .mfi + +{ .mfi nop.m 999 fma.s1 acosf_poly_p7a = acosf_x4,acosf_coeff_P9,acosf_poly_p7 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 fma.s1 acosf_2poly_p2a = acosf_2poly_p2,acosf_t2,acosf_2poly_p1 nop.i 999;; } - -{ .mfi + +{ .mfi nop.m 999 (p8) fma.s1 acosf_sgnx_t4 = acosf_sgn_x,acosf_t4,f0 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 (p8) fma.s1 acosf_2poly_p4a = acosf_2poly_p6,acosf_t2,acosf_2poly_p4 nop.i 999;; } - -{ .mfi + +{ .mfi nop.m 999 (p8) fma.s1 acosf_Sz = acosf_5by2,acosf_dz,acosf_3by2 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 (p8) fma.s1 acosf_d2z = acosf_dz,acosf_dz,f0 nop.i 999;; } - -{ .mfi + +{ .mfi nop.m 999 (p8) fnma.d.s1 acosf_sgn_x_piby2 = acosf_sgn_x,acosf_const_piby2,acosf_const_piby2 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 (p7) fma.s1 acosf_poly_Ax = acosf_x5,acosf_poly_p2,acosf_poly_p1a nop.i 999;; -} - -{ .mfi +} + +{ .mfi nop.m 999 (p7) fma.s1 acosf_poly_Bx = acosf_x4,acosf_poly_p7a,acosf_poly_p5 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 (p8) fma.s1 acosf_sgnx_2poly_p2 = acosf_sgn_x,acosf_2poly_p2a,f0 nop.i 999;; -} - -{ .mfi +} + +{ .mfi nop.m 999 fcmp.eq.s0 p6,p0 = f8,f0 // Only purpose is to set D if x denormal nop.i 999 } -{ .mfi +{ .mfi nop.m 999 (p8) fma.s1 acosf_2poly_p4b = acosf_2poly_p8,acosf_t4,acosf_2poly_p4a nop.i 999;; } - -{ .mfi + +{ .mfi nop.m 999 (p8) fma.s1 acosf_Fz = acosf_d2z,acosf_Sz,acosf_dz nop.i 999;; -} +} - -{ .mfi + +{ .mfi nop.m 999 (p8) fma.d.s1 acosf_Pt = acosf_2poly_p4b,acosf_sgnx_t4,acosf_sgnx_2poly_p2 nop.i 999;; -} - -{ .mfi +} + +{ .mfi nop.m 999 (p8) fma.d.s1 acosf_z = acosf_Az,acosf_Fz,acosf_Az nop.i 999 ;; -} - -{ .mfi +} + +{ .mfi nop.m 999 (p7) fma.d.s1 acosf_sinf1 = acosf_x11,acosf_poly_Bx,acosf_poly_Ax nop.i 999;; -} - +} + .pred.rel "mutex",p8,p7 //acosf_pred_GTsqrt2by2,acosf_pred_LEsqrt2by2 -{ .mfi +{ .mfi nop.m 999 (p8) fma.s.s0 f8 = acosf_z,acosf_Pt,acosf_sgn_x_piby2 nop.i 999 -} - -{ .mfb +} + +{ .mfb nop.m 999 (p7) fms.s.s0 f8 = acosf_const_piby2,f1,acosf_sinf1 br.ret.sptk b0 ;; -} +} ACOSF_ZERO: // Here if x=0 -{ .mfb +{ .mfb nop.m 999 fma.s.s0 f8 = acosf_const_piby2,f1,f0 // acosf(0)=pi/2 br.ret.sptk b0 ;; -} +} ACOSF_ABS_ONE: .pred.rel "mutex",p11,p12 // Here if |x|=1 -{ .mfi +{ .mfi nop.m 999 (p11) fma.s.s0 f8 = acosf_const_piby2,f1,acosf_const_piby2 // acosf(-1)=pi nop.i 999 -} -{ .mfb +} +{ .mfb nop.m 999 (p12) fma.s.s0 f8 = f1,f0,f0 // acosf(1)=0 br.ret.sptk b0 ;; -} +} GLOBAL_LIBM_END(acosf) diff --git a/sysdeps/ia64/fpu/e_acoshl.S b/sysdeps/ia64/fpu/e_acoshl.S index 42e1f394ef..1ce292c88e 100644 --- a/sysdeps/ia64/fpu/e_acoshl.S +++ b/sysdeps/ia64/fpu/e_acoshl.S @@ -21,25 +21,25 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // //********************************************************************* // -// History: +// History: // 10/01/01 Initial version // 10/10/01 Performance inproved // 12/11/01 Changed huges_logp to not be global @@ -57,7 +57,7 @@ // // Overview of operation //============================================================== -// +// // There are 6 paths: // 1. x = 1 // Return acoshl(x) = 0; @@ -67,37 +67,37 @@ // // 3. x = [S,Q]Nan or +INF // Return acoshl(x) = x + x; -// +// // 4. 'Near 1': 1 < x < 1+1/8 -// Return acoshl(x) = sqrtl(2*y)*(1-P(y)/Q(y)), +// Return acoshl(x) = sqrtl(2*y)*(1-P(y)/Q(y)), // where y = 1, P(y)/Q(y) - rational approximation // // 5. 'Huges': x > 0.5*2^64 // Return acoshl(x) = (logl(2*x-1)); -// +// // 6. 'Main path': 1+1/8 < x < 0.5*2^64 // b_hi + b_lo = x + sqrt(x^2 - 1); // acoshl(x) = logl_special(b_hi, b_lo); -// -// Algorithm description +// +// Algorithm description //============================================================== // // I. Near 1 path algorithm // ************************************************************** -// The formula is acoshl(x) = sqrtl(2*y)*(1-P(y)/Q(y)), +// The formula is acoshl(x) = sqrtl(2*y)*(1-P(y)/Q(y)), // where y = 1, P(y)/Q(y) - rational approximation // // 1) y = x - 1, y2 = 2 * y // // 2) Compute in parallel sqrtl(2*y) and P(y)/Q(y) // a) sqrtl computation method described below (main path algorithm, item 2)) -// As result we obtain (gg+gl) - multiprecision result +// As result we obtain (gg+gl) - multiprecision result // as pair of double extended values // b) P(y) and Q(y) calculated without any extra precision manipulations // c) P/Q division: // y = frcpa(Q) initial approximation of 1/Q // z = P*y initial approximation of P/Q -// +// // e = 1 - b*y // e2 = e + e^2 // e1 = e^2 @@ -121,7 +121,7 @@ // b) res = ((((gl + ll) + lh) + hl) + hh) + gg; // (exactly in this order) // -// II. Main path algorithm +// II. Main path algorithm // ( thanks to Peter Markstein for the idea of sqrt(x^2+1) computation! ) // ********************************************************************** // @@ -130,19 +130,19 @@ // 1) m2 = (m2_hi+m2_lo) = x^2-1 obtaining // ------------------------------------ // m2_hi = x2_hi - 1, where x2_hi = x * x; -// m2_lo = x2_lo + p1_lo, where -// x2_lo = FMS(x*x-x2_hi), +// m2_lo = x2_lo + p1_lo, where +// x2_lo = FMS(x*x-x2_hi), // p1_lo = (1 + m2_hi) - x2_hi; // // 2) g = (g_hi+g_lo) = sqrt(m2) = sqrt(m2_hi+m2_lo) // ---------------------------------------------- // r = invsqrt(m2_hi) (8-bit reciprocal square root approximation); // g = m2_hi * r (first 8 bit-approximation of sqrt); -// +// // h = 0.5 * r; // e = 0.5 - g * h; // g = g * e + g (second 16 bit-approximation of sqrt); -// +// // h = h * e + h; // e = 0.5 - g * h; // g = g * e + g (third 32 bit-approximation of sqrt); @@ -150,7 +150,7 @@ // h = h * e + h; // e = 0.5 - g * h; // g_hi = g * e + g (fourth 64 bit-approximation of sqrt); -// +// // Remainder computation: // h = h * e + h; // d = (m2_hi - g_hi * g_hi) + m2_lo; @@ -160,15 +160,15 @@ // ------------------------------------------------------------------- // b_hi = (g_hi + x) + gl; // b_lo = (x - b_hi) + g_hi + gl; -// +// // Now we pass b presented as sum b_hi + b_lo to special version // of logl function which accept a pair of arguments as -// mutiprecision value. -// +// mutiprecision value. +// // Special log algorithm overview // ================================ // Here we use a table lookup method. The basic idea is that in -// order to compute logl(Arg) for an argument Arg in [1,2), +// order to compute logl(Arg) for an argument Arg in [1,2), // we construct a value G such that G*Arg is close to 1 and that // logl(1/G) is obtainable easily from a table of values calculated // beforehand. Thus @@ -198,7 +198,7 @@ // G := G_1 * G_2 * G_3 // r := (G * S_hi - 1) + G * S_lo // -// These G_j's have the property that the product is exactly +// These G_j's have the property that the product is exactly // representable and that |r| < 2^(-12) as a result. // // Step 2: Approximation @@ -217,11 +217,11 @@ // // Registers used //============================================================== -// Floating Point registers used: +// Floating Point registers used: // f8, input // f32 -> f95 (64 registers) -// General registers used: +// General registers used: // r32 -> r67 (36 registers) // Predicate registers used: @@ -229,15 +229,15 @@ // p7 for 'NaNs, Inf' path // p8 for 'near 1' path // p9 for 'huges' path -// p10 for x = 1 +// p10 for x = 1 // p11 for x < 1 // //********************************************************************* // IEEE Special Conditions: // // acoshl(+inf) = +inf -// acoshl(-inf) = QNaN -// acoshl(1) = 0 +// acoshl(-inf) = QNaN +// acoshl(1) = 0 // acoshl(x<1) = QNaN // acoshl(SNaN) = QNaN // acoshl(QNaN) = QNaN @@ -245,38 +245,38 @@ // Data tables //============================================================== - + RODATA .align 64 // Near 1 path rational aproximation coefficients LOCAL_OBJECT_START(Poly_P) -data8 0xB0978143F695D40F, 0x3FF1 // .84205539791447100108478906277453574946e-4 -data8 0xB9800D841A8CAD29, 0x3FF6 // .28305085180397409672905983082168721069e-2 -data8 0xC889F455758C1725, 0x3FF9 // .24479844297887530847660233111267222945e-1 -data8 0x9BE1DFF006F45F12, 0x3FFB // .76114415657565879842941751209926938306e-1 -data8 0x9E34AF4D372861E0, 0x3FFB // .77248925727776366270605984806795850504e-1 -data8 0xF3DC502AEE14C4AE, 0x3FA6 // .3077953476682583606615438814166025592e-26 +data8 0xB0978143F695D40F, 0x3FF1 // .84205539791447100108478906277453574946e-4 +data8 0xB9800D841A8CAD29, 0x3FF6 // .28305085180397409672905983082168721069e-2 +data8 0xC889F455758C1725, 0x3FF9 // .24479844297887530847660233111267222945e-1 +data8 0x9BE1DFF006F45F12, 0x3FFB // .76114415657565879842941751209926938306e-1 +data8 0x9E34AF4D372861E0, 0x3FFB // .77248925727776366270605984806795850504e-1 +data8 0xF3DC502AEE14C4AE, 0x3FA6 // .3077953476682583606615438814166025592e-26 LOCAL_OBJECT_END(Poly_P) // LOCAL_OBJECT_START(Poly_Q) -data8 0xF76E3FD3C7680357, 0x3FF1 // .11798413344703621030038719253730708525e-3 -data8 0xD107D2E7273263AE, 0x3FF7 // .63791065024872525660782716786703188820e-2 -data8 0xB609BE5CDE206AEF, 0x3FFB // .88885771950814004376363335821980079985e-1 -data8 0xF7DEACAC28067C8A, 0x3FFD // .48412074662702495416825113623936037072302 -data8 0x8F9BE5890CEC7E38, 0x3FFF // 1.1219450873557867470217771071068369729526 -data8 0xED4F06F3D2BC92D1, 0x3FFE // .92698710873331639524734537734804056798748 +data8 0xF76E3FD3C7680357, 0x3FF1 // .11798413344703621030038719253730708525e-3 +data8 0xD107D2E7273263AE, 0x3FF7 // .63791065024872525660782716786703188820e-2 +data8 0xB609BE5CDE206AEF, 0x3FFB // .88885771950814004376363335821980079985e-1 +data8 0xF7DEACAC28067C8A, 0x3FFD // .48412074662702495416825113623936037072302 +data8 0x8F9BE5890CEC7E38, 0x3FFF // 1.1219450873557867470217771071068369729526 +data8 0xED4F06F3D2BC92D1, 0x3FFE // .92698710873331639524734537734804056798748 LOCAL_OBJECT_END(Poly_Q) -// Q coeffs +// Q coeffs LOCAL_OBJECT_START(Constants_Q) -data4 0x00000000,0xB1721800,0x00003FFE,0x00000000 +data4 0x00000000,0xB1721800,0x00003FFE,0x00000000 data4 0x4361C4C6,0x82E30865,0x0000BFE2,0x00000000 data4 0x328833CB,0xCCCCCAF2,0x00003FFC,0x00000000 data4 0xA9D4BAFB,0x80000077,0x0000BFFD,0x00000000 data4 0xAAABE3D2,0xAAAAAAAA,0x00003FFD,0x00000000 -data4 0xFFFFDAB7,0xFFFFFFFF,0x0000BFFD,0x00000000 +data4 0xFFFFDAB7,0xFFFFFFFF,0x0000BFFD,0x00000000 LOCAL_OBJECT_END(Constants_Q) // Z1 - 16 bit fixed @@ -391,7 +391,7 @@ data4 0x3F71D488,0x3D693B9D data8 0xBE049391B6B7C239 LOCAL_OBJECT_END(Constants_G_H_h2) -// G3 and H3 - IEEE single and h3 - IEEE double +// G3 and H3 - IEEE single and h3 - IEEE double LOCAL_OBJECT_START(Constants_G_H_h3) data4 0x3F7FFC00,0x38800100 data8 0x3D355595562224CD @@ -481,16 +481,16 @@ FR_QQ3 = f41 FR_QQ4 = f42 FR_QQ5 = f43 -FR_Q1 = f44 -FR_Q2 = f45 -FR_Q3 = f46 -FR_Q4 = f47 +FR_Q1 = f44 +FR_Q2 = f45 +FR_Q3 = f46 +FR_Q4 = f47 FR_Half = f48 FR_Two = f49 -FR_log2_hi = f50 -FR_log2_lo = f51 +FR_log2_hi = f50 +FR_log2_lo = f51 FR_X2 = f52 @@ -512,14 +512,14 @@ FR_XM12 = f64 // Special logl registers -FR_XLog_Hi = f65 -FR_XLog_Lo = f66 +FR_XLog_Hi = f65 +FR_XLog_Lo = f66 -FR_Y_hi = f67 +FR_Y_hi = f67 FR_Y_lo = f68 -FR_S_hi = f69 -FR_S_lo = f70 +FR_S_hi = f69 +FR_S_lo = f70 FR_poly_lo = f71 FR_poly_hi = f72 @@ -530,19 +530,19 @@ FR_h = f75 FR_G2 = f76 FR_H2 = f77 -FR_h2 = f78 +FR_h2 = f78 -FR_r = f79 -FR_rsq = f80 -FR_rcub = f81 +FR_r = f79 +FR_rsq = f80 +FR_rcub = f81 -FR_float_N = f82 +FR_float_N = f82 -FR_G3 = f83 -FR_H3 = f84 -FR_h3 = f85 +FR_G3 = f83 +FR_H3 = f84 +FR_h3 = f85 -FR_2_to_minus_N = f86 +FR_2_to_minus_N = f86 // Near 1 registers @@ -561,7 +561,7 @@ FR_QV3 = f75 FR_QV2 = f76 FR_Y0 = f77 -FR_Q0 = f78 +FR_Q0 = f78 FR_E0 = f79 FR_E2 = f80 FR_E1 = f81 @@ -601,23 +601,23 @@ GR_Poly_P = r37 GR_Poly_Q = r38 // Special logl registers -GR_Index1 = r39 -GR_Index2 = r40 -GR_signif = r41 -GR_X_0 = r42 -GR_X_1 = r43 -GR_X_2 = r44 +GR_Index1 = r39 +GR_Index2 = r40 +GR_signif = r41 +GR_X_0 = r42 +GR_X_1 = r43 +GR_X_2 = r44 GR_minus_N = r45 -GR_Z_1 = r46 -GR_Z_2 = r47 -GR_N = r48 -GR_Bias = r49 -GR_M = r50 -GR_Index3 = r51 -GR_exp_2tom80 = r52 -GR_exp_mask = r53 -GR_exp_2tom7 = r54 -GR_ad_ln10 = r55 +GR_Z_1 = r46 +GR_Z_2 = r47 +GR_N = r48 +GR_Bias = r49 +GR_M = r50 +GR_Index3 = r51 +GR_exp_2tom80 = r52 +GR_exp_mask = r53 +GR_exp_2tom7 = r54 +GR_ad_ln10 = r55 GR_ad_tbl_1 = r56 GR_ad_tbl_2 = r57 GR_ad_tbl_3 = r58 @@ -652,29 +652,29 @@ GLOBAL_LIBM_ENTRY(acoshl) addl GR_Poly_Q = @ltoff(Poly_Q), gp // Address of Q-coeff table fma.s1 FR_X2 = FR_Arg, FR_Arg, f0 // Obtain x^2 addl GR_Poly_P = @ltoff(Poly_P), gp // Address of P-coeff table -};; +};; -{ .mfi +{ .mfi getf.d GR_Arg = FR_Arg // get arument as double (int64) fma.s0 FR_Two = f1, f1, f1 // construct 2.0 addl GR_ad_z_1 = @ltoff(Constants_Z_1#),gp // logl tables } -{ .mlx - nop.m 0 +{ .mlx + nop.m 0 movl GR_TwoP63 = 0x43E8000000000000 // 0.5*2^63 (huge arguments) -};; +};; -{ .mfi +{ .mfi ld8 GR_Poly_P = [GR_Poly_P] // get actual P-coeff table address fcmp.eq.s1 p10, p0 = FR_Arg, f1 // if arg == 1 (return 0) nop.i 0 } -{ .mlx +{ .mlx ld8 GR_Poly_Q = [GR_Poly_Q] // get actual Q-coeff table address movl GR_OneP125 = 0x3FF2000000000000 // 1.125 (near 1 path bound) };; -{ .mfi +{ .mfi ld8 GR_ad_z_1 = [GR_ad_z_1] // Get pointer to Constants_Z_1 fclass.m p7,p0 = FR_Arg, 0xe3 // if arg NaN inf cmp.le p9, p0 = GR_TwoP63, GR_Arg // if arg > 0.5*2^63 ('huges') @@ -683,31 +683,31 @@ GLOBAL_LIBM_ENTRY(acoshl) cmp.ge p8, p0 = GR_OneP125, GR_Arg // if arg<1.125 -near 1 path fms.s1 FR_XM1 = FR_Arg, f1, f1 // X0 = X-1 (for near 1 path) (p11) br.cond.spnt acoshl_lt_pone // error branch (less than 1) -};; +};; -{ .mmi +{ .mmi setf.exp FR_Half = GR_Half // construct 0.5 (p9) setf.s FR_XLog_Lo = r0 // Low of logl arg=0 (Huges path) mov GR_exp_mask = 0x1FFFF // Create exponent mask -};; +};; -{ .mmf +{ .mmf (p8) ldfe FR_PP5 = [GR_Poly_P],16 // Load P5 (p8) ldfe FR_QQ5 = [GR_Poly_Q],16 // Load Q5 fms.s1 FR_M2 = FR_X2, f1, f1 // m2 = x^2 - 1 };; -{ .mfi +{ .mfi (p8) ldfe FR_QQ4 = [GR_Poly_Q],16 // Load Q4 - fms.s1 FR_M2L = FR_Arg, FR_Arg, FR_X2 // low part of + fms.s1 FR_M2L = FR_Arg, FR_Arg, FR_X2 // low part of // m2 = fma(X*X - m2) add GR_ad_tbl_1 = 0x040, GR_ad_z_1 // Point to Constants_G_H_h1 } { .mfb -(p8) ldfe FR_PP4 = [GR_Poly_P],16 // Load P4 +(p8) ldfe FR_PP4 = [GR_Poly_P],16 // Load P4 (p7) fma.s0 FR_Res = FR_Arg,f1,FR_Arg // r = a + a (Nan, Inf) (p7) br.ret.spnt b0 // return (Nan, Inf) -};; +};; { .mfi (p8) ldfe FR_PP3 = [GR_Poly_P],16 // Load P3 @@ -719,9 +719,9 @@ GLOBAL_LIBM_ENTRY(acoshl) (p9) fms.s1 FR_XLog_Hi = FR_Two, FR_Arg, f1 // Hi of log arg = 2*X-1 (p9) br.cond.spnt huges_logl // special version of log } -;; +;; -{ .mfi +{ .mfi (p8) ldfe FR_PP2 = [GR_Poly_P],16 // Load P2 (p8) fma.s1 FR_2XM1 = FR_Two, FR_XM1, f0 // 2X0 = 2 * X0 add GR_ad_z_2 = 0x140, GR_ad_z_1 // Point to Constants_Z_2 @@ -729,18 +729,18 @@ GLOBAL_LIBM_ENTRY(acoshl) { .mfb (p8) ldfe FR_QQ2 = [GR_Poly_Q],16 // Load Q2 (p10) fma.s0 FR_Res = f0,f1,f0 // r = 0 (arg = 1) -(p10) br.ret.spnt b0 // return (arg = 1) -};; +(p10) br.ret.spnt b0 // return (arg = 1) +};; -{ .mmi +{ .mmi (p8) ldfe FR_PP1 = [GR_Poly_P],16 // Load P1 (p8) ldfe FR_QQ1 = [GR_Poly_Q],16 // Load Q1 add GR_ad_tbl_2 = 0x180, GR_ad_z_1 // Point to Constants_G_H_h2 } ;; -{ .mfi -(p8) ldfe FR_PP0 = [GR_Poly_P] // Load P0 +{ .mfi +(p8) ldfe FR_PP0 = [GR_Poly_P] // Load P0 fma.s1 FR_Tmp = f1, f1, FR_M2 // Tmp = 1 + m2 add GR_ad_tbl_3 = 0x280, GR_ad_z_1 // Point to Constants_G_H_h3 } @@ -748,17 +748,17 @@ GLOBAL_LIBM_ENTRY(acoshl) (p8) ldfe FR_QQ0 = [GR_Poly_Q] nop.f 0 (p8) br.cond.spnt near_1 // near 1 path -};; -{ .mfi +};; +{ .mfi ldfe FR_log2_hi = [GR_ad_q],16 // Load log2_hi nop.f 0 mov GR_Bias = 0x0FFFF // Create exponent bias };; -{ .mfi +{ .mfi nop.m 0 frsqrta.s1 FR_Rcp, p0 = FR_M2 // Rcp = 1/m2 reciprocal appr. nop.i 0 -};; +};; { .mfi ldfe FR_log2_lo = [GR_ad_q],16 // Load log2_lo @@ -773,7 +773,7 @@ GLOBAL_LIBM_ENTRY(acoshl) nop.i 0 } { .mfi - nop.m 0 + nop.m 0 fma.s1 FR_HH = FR_Half, FR_Rcp, f0 // h = 0.5 * Rcp nop.i 0 };; @@ -783,14 +783,14 @@ GLOBAL_LIBM_ENTRY(acoshl) nop.i 0 } { .mfi - nop.m 0 + nop.m 0 fma.s1 FR_M2L = FR_Tmp, f1, FR_M2L // low part of m2 = Tmp+m2l nop.i 0 };; { .mfi ldfe FR_Q2 = [GR_ad_q],16 // Load Q2 - fma.s1 FR_GG = FR_GG, FR_EE, FR_GG // g = g * e + g + fma.s1 FR_GG = FR_GG, FR_EE, FR_GG // g = g * e + g // 16 bit Newton Raphson iteration nop.i 0 } @@ -807,7 +807,7 @@ GLOBAL_LIBM_ENTRY(acoshl) };; { .mfi nop.m 0 - fma.s1 FR_GG = FR_GG, FR_EE, FR_GG // g = g * e + g + fma.s1 FR_GG = FR_GG, FR_EE, FR_GG // g = g * e + g // 32 bit Newton Raphson iteration nop.i 0 } @@ -825,7 +825,7 @@ GLOBAL_LIBM_ENTRY(acoshl) { .mfi nop.m 0 - fma.s1 FR_GG = FR_GG, FR_EE, FR_GG // g = g * e + g + fma.s1 FR_GG = FR_GG, FR_EE, FR_GG // g = g * e + g // 64 bit Newton Raphson iteration nop.i 0 } @@ -920,7 +920,7 @@ GLOBAL_LIBM_ENTRY(acoshl) { .mfi nop.m 0 nop.f 0 - extr.u GR_Index2 = GR_X_1, 6, 4 // Extract bits 6-9 of X_1 + extr.u GR_Index2 = GR_X_1, 6, 4 // Extract bits 6-9 of X_1 };; { .mfi @@ -952,7 +952,7 @@ GLOBAL_LIBM_ENTRY(acoshl) pmpyshr2.u GR_X_2 = GR_X_1,GR_Z_2,15 // Get bits 30-15 of X_1 * Z_2 };; -// WE CANNOT USE GR_X_2 IN NEXT 3 CYCLES ("DEAD" ZONE!) +// WE CANNOT USE GR_X_2 IN NEXT 3 CYCLES ("DEAD" ZONE!) // BECAUSE OF POSSIBLE 10 CLOCKS STALL! // (Just nops added - nothing to do here) @@ -1093,7 +1093,7 @@ GLOBAL_LIBM_ENTRY(acoshl) { .mfi nop.m 0 - fadd.s0 FR_Y_lo = FR_poly_hi, FR_poly_lo + fadd.s0 FR_Y_lo = FR_poly_hi, FR_poly_lo // Y_lo=poly_hi+poly_lo nop.i 0 };; @@ -1166,7 +1166,7 @@ huges_logl: { .mmi ldfe FR_log2_lo = [GR_ad_q],16 // Load log2_lo - sub GR_N = GR_N, GR_Bias + sub GR_N = GR_N, GR_Bias mov GR_exp_2tom80 = 0x0ffaf // Exponent of 2^-80 };; @@ -1185,7 +1185,7 @@ huges_logl: { .mmi ldfe FR_Q2 = [GR_ad_q],16 // Load Q2 nop.m 0 - extr.u GR_Index2 = GR_X_1, 6, 4 // Extract bits 6-9 of X_1 + extr.u GR_Index2 = GR_X_1, 6, 4 // Extract bits 6-9 of X_1 };; { .mmi @@ -1218,7 +1218,7 @@ huges_logl: pmpyshr2.u GR_X_2 = GR_X_1,GR_Z_2,15 // Get bits 30-15 of X_1*Z_2 };; -// WE CANNOT USE GR_X_2 IN NEXT 3 CYCLES ("DEAD" ZONE!) +// WE CANNOT USE GR_X_2 IN NEXT 3 CYCLES ("DEAD" ZONE!) // BECAUSE OF POSSIBLE 10 CLOCKS STALL! // (Just nops added - nothing to do here) @@ -1344,7 +1344,7 @@ huges_logl: };; { .mfi nop.m 0 - fadd.s0 FR_Y_lo = FR_poly_hi, FR_poly_lo // Y_lo=poly_hi+poly_lo + fadd.s0 FR_Y_lo = FR_poly_hi, FR_poly_lo // Y_lo=poly_hi+poly_lo nop.i 0 };; { .mfb @@ -1356,279 +1356,279 @@ huges_logl: // NEAR ONE INTERVAL near_1: -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 frsqrta.s1 FR_Rcp, p0 = FR_2XM1 // Rcp = 1/x reciprocal appr. &SQRT& - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_PV6 = FR_PP5, FR_XM1, FR_PP4 // pv6 = P5*xm1+P4 $POLY$ - nop.i 0 + nop.i 0 } { .mfi - nop.m 0 + nop.m 0 fma.s1 FR_QV6 = FR_QQ5, FR_XM1, FR_QQ4 // qv6 = Q5*xm1+Q4 $POLY$ - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_PV4 = FR_PP3, FR_XM1, FR_PP2 // pv4 = P3*xm1+P2 $POLY$ - nop.i 0 + nop.i 0 } { .mfi - nop.m 0 + nop.m 0 fma.s1 FR_QV4 = FR_QQ3, FR_XM1, FR_QQ2 // qv4 = Q3*xm1+Q2 $POLY$ - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_XM12 = FR_XM1, FR_XM1, f0 // xm1^2 = xm1 * xm1 $POLY$ - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_PV2 = FR_PP1, FR_XM1, FR_PP0 // pv2 = P1*xm1+P0 $POLY$ - nop.i 0 + nop.i 0 } { .mfi - nop.m 0 + nop.m 0 fma.s1 FR_QV2 = FR_QQ1, FR_XM1, FR_QQ0 // qv2 = Q1*xm1+Q0 $POLY$ - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 - fma.s1 FR_GG = FR_Rcp, FR_2XM1, f0 // g = Rcp * x &SQRT& - nop.i 0 +{ .mfi + nop.m 0 + fma.s1 FR_GG = FR_Rcp, FR_2XM1, f0 // g = Rcp * x &SQRT& + nop.i 0 } { .mfi - nop.m 0 + nop.m 0 fma.s1 FR_HH = FR_Half, FR_Rcp, f0 // h = 0.5 * Rcp &SQRT& - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_PV3 = FR_XM12, FR_PV6, FR_PV4//pv3=pv6*xm1^2+pv4 $POLY$ - nop.i 0 + nop.i 0 } { .mfi - nop.m 0 + nop.m 0 fma.s1 FR_QV3 = FR_XM12, FR_QV6, FR_QV4//qv3=qv6*xm1^2+qv4 $POLY$ - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fnma.s1 FR_EE = FR_GG, FR_HH, FR_Half // e = 0.5 - g * h &SQRT& - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_PP = FR_XM12, FR_PV3, FR_PV2 //pp=pv3*xm1^2+pv2 $POLY$ - nop.i 0 + nop.i 0 } { .mfi - nop.m 0 + nop.m 0 fma.s1 FR_QQ = FR_XM12, FR_QV3, FR_QV2 //qq=qv3*xm1^2+qv2 $POLY$ - nop.i 0 + nop.i 0 };; { .mfi - nop.m 0 + nop.m 0 fma.s1 FR_GG = FR_GG, FR_EE, FR_GG // g = g * e + g &SQRT& - nop.i 0 + nop.i 0 } { .mfi - nop.m 0 + nop.m 0 fma.s1 FR_HH = FR_HH, FR_EE, FR_HH // h = h * e + h &SQRT& - nop.i 0 + nop.i 0 };; { .mfi - nop.m 0 + nop.m 0 frcpa.s1 FR_Y0,p0 = f1,FR_QQ // y = frcpa(b) #DIV# - nop.i 0 + nop.i 0 } { .mfi - nop.m 0 + nop.m 0 fnma.s1 FR_EE = FR_GG, FR_HH, FR_Half // e = 0.5 - g*h &SQRT& - nop.i 0 + nop.i 0 };; { .mfi - nop.m 0 + nop.m 0 fma.s1 FR_Q0 = FR_PP,FR_Y0,f0 // q = a*y #DIV# - nop.i 0 + nop.i 0 } { .mfi - nop.m 0 + nop.m 0 fnma.s1 FR_E0 = FR_Y0,FR_QQ,f1 // e = 1 - b*y #DIV# - nop.i 0 + nop.i 0 };; { .mfi - nop.m 0 - fma.s1 FR_GG = FR_GG, FR_EE, FR_GG // g = g * e + g &SQRT& - nop.i 0 + nop.m 0 + fma.s1 FR_GG = FR_GG, FR_EE, FR_GG // g = g * e + g &SQRT& + nop.i 0 } { .mfi - nop.m 0 + nop.m 0 fma.s1 FR_HH = FR_HH, FR_EE, FR_HH // h = h * e + h &SQRT& - nop.i 0 + nop.i 0 };; { .mfi - nop.m 0 + nop.m 0 fma.s1 FR_E2 = FR_E0,FR_E0,FR_E0 // e2 = e+e^2 #DIV# - nop.i 0 + nop.i 0 } { .mfi - nop.m 0 + nop.m 0 fma.s1 FR_E1 = FR_E0,FR_E0,f0 // e1 = e^2 #DIV# - nop.i 0 + nop.i 0 };; { .mfi - nop.m 0 + nop.m 0 fnma.s1 FR_EE = FR_GG, FR_HH, FR_Half // e = 0.5 - g * h &SQRT& - nop.i 0 + nop.i 0 } { .mfi - nop.m 0 + nop.m 0 fnma.s1 FR_DD = FR_GG, FR_GG, FR_2XM1 // d = x - g * g &SQRT& - nop.i 0 + nop.i 0 };; { .mfi - nop.m 0 + nop.m 0 fma.s1 FR_Y1 = FR_Y0,FR_E2,FR_Y0 // y1 = y+y*e2 #DIV# - nop.i 0 + nop.i 0 } { .mfi - nop.m 0 + nop.m 0 fma.s1 FR_E3 = FR_E1,FR_E1,FR_E0 // e3 = e+e1^2 #DIV# - nop.i 0 + nop.i 0 };; { .mfi - nop.m 0 + nop.m 0 fma.s1 FR_GG = FR_DD, FR_HH, FR_GG // g = d * h + g &SQRT& - nop.i 0 + nop.i 0 } { .mfi - nop.m 0 + nop.m 0 fma.s1 FR_HH = FR_HH, FR_EE, FR_HH // h = h * e + h &SQRT& - nop.i 0 + nop.i 0 };; { .mfi - nop.m 0 + nop.m 0 fma.s1 FR_Y2 = FR_Y1,FR_E3,FR_Y0 // y2 = y+y1*e3 #DIV# - nop.i 0 + nop.i 0 } { .mfi - nop.m 0 + nop.m 0 fnma.s1 FR_R0 = FR_QQ,FR_Q0,FR_PP // r = a-b*q #DIV# - nop.i 0 + nop.i 0 };; { .mfi - nop.m 0 - fnma.s1 FR_DD = FR_GG, FR_GG, FR_2XM1 // d = x - g * g &SQRT& - nop.i 0 + nop.m 0 + fnma.s1 FR_DD = FR_GG, FR_GG, FR_2XM1 // d = x - g * g &SQRT& + nop.i 0 };; { .mfi - nop.m 0 + nop.m 0 fnma.s1 FR_E4 = FR_QQ,FR_Y2,f1 // e4 = 1-b*y2 #DIV# - nop.i 0 + nop.i 0 } { .mfi - nop.m 0 + nop.m 0 fma.s1 FR_X_Hi = FR_R0,FR_Y2,FR_Q0 // x = q+r*y2 #DIV# - nop.i 0 + nop.i 0 };; { .mfi - nop.m 0 + nop.m 0 fma.s1 FR_GL = FR_DD, FR_HH, f0 // gl = d * h &SQRT& - nop.i 0 + nop.i 0 };; { .mfi - nop.m 0 + nop.m 0 fma.s1 FR_Y3 = FR_Y2,FR_E4,FR_Y2 // y3 = y2+y2*e4 #DIV# - nop.i 0 + nop.i 0 } { .mfi - nop.m 0 + nop.m 0 fnma.s1 FR_R1 = FR_QQ,FR_X_Hi,FR_PP // r1 = a-b*x #DIV# - nop.i 0 + nop.i 0 };; { .mfi - nop.m 0 + nop.m 0 fma.s1 FR_HH = FR_GG, FR_X_Hi, f0 // hh = gg * x_hi - nop.i 0 + nop.i 0 } { .mfi - nop.m 0 + nop.m 0 fma.s1 FR_LH = FR_GL, FR_X_Hi, f0 // lh = gl * x_hi - nop.i 0 + nop.i 0 };; { .mfi - nop.m 0 + nop.m 0 fma.s1 FR_X_lo = FR_R1,FR_Y3,f0 // x_lo = r1*y3 #DIV# - nop.i 0 + nop.i 0 };; { .mfi - nop.m 0 + nop.m 0 fma.s1 FR_LL = FR_GL, FR_X_lo, f0 // ll = gl*x_lo - nop.i 0 + nop.i 0 } { .mfi - nop.m 0 + nop.m 0 fma.s1 FR_HL = FR_GG, FR_X_lo, f0 // hl = gg * x_lo - nop.i 0 + nop.i 0 };; { .mfi - nop.m 0 + nop.m 0 fms.s1 FR_Res = FR_GL, f1, FR_LL // res = gl + ll - nop.i 0 + nop.i 0 };; { .mfi - nop.m 0 + nop.m 0 fms.s1 FR_Res = FR_Res, f1, FR_LH // res = res + lh - nop.i 0 + nop.i 0 };; { .mfi - nop.m 0 + nop.m 0 fms.s1 FR_Res = FR_Res, f1, FR_HL // res = res + hl - nop.i 0 + nop.i 0 };; { .mfi - nop.m 0 + nop.m 0 fms.s1 FR_Res = FR_Res, f1, FR_HH // res = res + hh - nop.i 0 + nop.i 0 };; { .mfb - nop.m 0 + nop.m 0 fma.s0 FR_Res = FR_Res, f1, FR_GG // result = res + gg br.ret.sptk b0 // Exit for near 1 path };; @@ -1639,9 +1639,9 @@ near_1: acoshl_lt_pone: { .mfi - nop.m 0 + nop.m 0 fmerge.s FR_Arg_X = FR_Arg, FR_Arg - nop.i 0 + nop.i 0 };; { .mfb mov GR_Parameter_TAG = 135 @@ -1679,7 +1679,7 @@ LOCAL_LIBM_ENTRY(__libm_error_region) { .mib stfe [GR_Parameter_X] = FR_Arg_X // Parameter 1 to stack add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address - nop.b 0 + nop.b 0 } { .mib stfe [GR_Parameter_Y] = FR_Res // Parameter 3 to stack diff --git a/sysdeps/ia64/fpu/e_acosl.S b/sysdeps/ia64/fpu/e_acosl.S index 4fd345bedd..0983bc42ef 100644 --- a/sysdeps/ia64/fpu/e_acosl.S +++ b/sysdeps/ia64/fpu/e_acosl.S @@ -690,70 +690,70 @@ F_CS6 = f36 F_CS7 = f37 F_CS8 = f38 F_CS9 = f39 -F_S23 = f40 -F_S45 = f41 -F_S67 = f42 -F_S89 = f43 -F_S25 = f44 -F_S69 = f45 -F_S29 = f46 -F_X2 = f47 -F_X4 = f48 -F_TSQRT = f49 -F_DTX = f50 -F_R = f51 -F_R2 = f52 -F_R3 = f53 -F_R4 = f54 - -F_C3 = f55 -F_C5 = f56 -F_C7 = f57 -F_C9 = f58 -F_P79 = f59 -F_P35 = f60 -F_P39 = f61 - -F_ATHI = f62 -F_ATLO = f63 - -F_T1 = f64 -F_Y = f65 -F_Y2 = f66 -F_ANDMASK = f67 -F_ORMASK = f68 -F_S = f69 -F_05 = f70 -F_SQRT_1S2 = f71 -F_DS = f72 -F_Z = f73 -F_1T2 = f74 -F_DZ = f75 -F_ZE = f76 -F_YZ = f77 -F_Y1S2 = f78 -F_Y1S2X = f79 -F_1X = f80 -F_ST = f81 -F_1T2_ST = f82 -F_TSS = f83 -F_Y1S2X2 = f84 -F_DZ_TERM = f85 -F_DTS = f86 -F_DS2X = f87 -F_T2 = f88 -F_ZY1S2S = f89 -F_Y1S2_1X = f90 +F_S23 = f40 +F_S45 = f41 +F_S67 = f42 +F_S89 = f43 +F_S25 = f44 +F_S69 = f45 +F_S29 = f46 +F_X2 = f47 +F_X4 = f48 +F_TSQRT = f49 +F_DTX = f50 +F_R = f51 +F_R2 = f52 +F_R3 = f53 +F_R4 = f54 + +F_C3 = f55 +F_C5 = f56 +F_C7 = f57 +F_C9 = f58 +F_P79 = f59 +F_P35 = f60 +F_P39 = f61 + +F_ATHI = f62 +F_ATLO = f63 + +F_T1 = f64 +F_Y = f65 +F_Y2 = f66 +F_ANDMASK = f67 +F_ORMASK = f68 +F_S = f69 +F_05 = f70 +F_SQRT_1S2 = f71 +F_DS = f72 +F_Z = f73 +F_1T2 = f74 +F_DZ = f75 +F_ZE = f76 +F_YZ = f77 +F_Y1S2 = f78 +F_Y1S2X = f79 +F_1X = f80 +F_ST = f81 +F_1T2_ST = f82 +F_TSS = f83 +F_Y1S2X2 = f84 +F_DZ_TERM = f85 +F_DTS = f86 +F_DS2X = f87 +F_T2 = f88 +F_ZY1S2S = f89 +F_Y1S2_1X = f90 F_TS = f91 -F_PI2_LO = f92 -F_PI2_HI = f93 -F_S19 = f94 -F_INV1T2_2 = f95 -F_CORR = f96 -F_DZ0 = f97 - -F_C11 = f98 -F_C13 = f99 +F_PI2_LO = f92 +F_PI2_HI = f93 +F_S19 = f94 +F_INV1T2_2 = f95 +F_CORR = f96 +F_DZ0 = f97 + +F_C11 = f98 +F_C13 = f99 F_C15 = f100 F_C17 = f101 F_P1113 = f102 diff --git a/sysdeps/ia64/fpu/e_asinf.S b/sysdeps/ia64/fpu/e_asinf.S index af24165d8e..74a18dd24a 100644 --- a/sysdeps/ia64/fpu/e_asinf.S +++ b/sysdeps/ia64/fpu/e_asinf.S @@ -40,9 +40,9 @@ // History //============================================================== // 02/02/00 Initial version -// 06/28/00 Improved speed +// 06/28/00 Improved speed // 06/31/00 Changed register allocation because of some duplicate macros -// moved nan exit bundle up to gain a cycle. +// moved nan exit bundle up to gain a cycle. // 08/08/00 Improved speed by avoiding SIR flush. // 08/15/00 Bundle added after call to __libm_error_support to properly // set [the previously overwritten] GR_Parameter_RESULT. @@ -53,13 +53,13 @@ // 05/20/02 Cleaned up namespace and sf0 syntax // 02/06/03 Reordered header: .section, .global, .proc, .align - + // Description //========================================= // The asinf function computes the arc sine of x in the range [-pi,+pi]. // A doman error occurs for arguments not in the range [-1,+1]. // asinf(+-0) returns +-0 -// asinf(x) returns a Nan and raises the invalid exception for |x| >1 +// asinf(x) returns a Nan and raises the invalid exception for |x| >1 // The acosf function returns the arc cosine in the range [0, +pi] radians. // A doman error occurs for arguments not in the range [-1,+1]. @@ -252,351 +252,351 @@ LOCAL_OBJECT_END(asinf_coeff_2_table) .section .text GLOBAL_LIBM_ENTRY(asinf) - + // Load the addresses of the two tables. // Then, load the coefficients and other constants. -{ .mfi +{ .mfi alloc r32 = ar.pfs,1,8,4,0 fnma.s1 asinf_t = f8,f8,f1 dep.z ASINF_GR_1by2 = 0x3f,24,8 // 0x3f000000 -} -{ .mfi +} +{ .mfi addl ASINF_Addr1 = @ltoff(asinf_coeff_1_table),gp fma.s1 asinf_x2 = f8,f8,f0 addl ASINF_Addr2 = @ltoff(asinf_coeff_2_table),gp ;; } - -{ .mfi + +{ .mfi ld8 ASINF_Addr1 = [ASINF_Addr1] fmerge.s asinf_abs_x = f1,f8 dep ASINF_GR_3by2 = -1,r0,22,8 // 0x3fc00000 -} -{ .mlx +} +{ .mlx nop.m 999 movl ASINF_GR_5by2 = 0x40200000;; } - -{ .mfi + +{ .mfi setf.s asinf_1by2 = ASINF_GR_1by2 fmerge.s asinf_sgn_x = f8,f1 nop.i 999 -} -{ .mfi +} +{ .mfi ld8 ASINF_Addr2 = [ASINF_Addr2] nop.f 0 nop.i 999;; } - -{ .mfi + +{ .mfi setf.s asinf_5by2 = ASINF_GR_5by2 fcmp.lt.s1 p11,p12 = f8,f0 nop.i 999;; } -{ .mmf +{ .mmf ldfpd asinf_coeff_P1,asinf_coeff_P4 = [ASINF_Addr1],16 setf.s asinf_3by2 = ASINF_GR_3by2 fclass.m.unc p8,p0 = f8, 0xc3 ;; //@qnan | @snan } - -{ .mfi + +{ .mfi ldfpd asinf_coeff_P7,asinf_coeff_P6 = [ASINF_Addr1],16 fma.s1 asinf_t2 = asinf_t,asinf_t,f0 nop.i 999 -} -{ .mfi +} +{ .mfi ldfpd asinf_coeff_P3,asinf_coeff_P8 = [ASINF_Addr2],16 fma.s1 asinf_x4 = asinf_x2,asinf_x2,f0 nop.i 999;; } - -{ .mfi + +{ .mfi ldfpd asinf_coeff_P9,asinf_const_sqrt2by2 = [ASINF_Addr1] fclass.m.unc p10,p0 = f8, 0x07 //@zero nop.i 999 -} -{ .mfi +} +{ .mfi ldfpd asinf_coeff_P5,asinf_coeff_P2 = [ASINF_Addr2],16 fma.s1 asinf_x3 = f8,asinf_x2,f0 nop.i 999;; } - -{ .mfi + +{ .mfi ldfd asinf_const_piby2 = [ASINF_Addr2] frsqrta.s1 asinf_B,p0 = asinf_t nop.i 999 -} -{ .mfb +} +{ .mfb nop.m 999 (p8) fma.s.s0 f8 = f8,f1,f0 (p8) br.ret.spnt b0 ;; // Exit if x=nan } - -{ .mfb + +{ .mfb nop.m 999 fcmp.eq.s1 p6,p0 = asinf_abs_x,f1 (p10) br.ret.spnt b0 ;; // Exit if x=0 -} - -{ .mfi +} + +{ .mfi nop.m 999 fcmp.gt.s1 p9,p0 = asinf_abs_x,f1 nop.i 999;; -} - -{ .mfi +} + +{ .mfi nop.m 999 fma.s1 asinf_x8 = asinf_x4,asinf_x4,f0 nop.i 999 -} -{ .mfb +} +{ .mfb nop.m 999 fma.s1 asinf_t4 = asinf_t2,asinf_t2,f0 (p6) br.cond.spnt ASINF_ABS_ONE ;; // Branch if |x|=1 -} +} -{ .mfi +{ .mfi nop.m 999 fma.s1 asinf_x5 = asinf_x2,asinf_x3,f0 nop.i 999 } -{ .mfb +{ .mfb (p9) mov GR_Parameter_TAG = 62 fma.s1 asinf_yby2 = asinf_t,asinf_1by2,f0 (p9) br.cond.spnt __libm_error_region ;; // Branch if |x|>1 } -{ .mfi +{ .mfi nop.m 999 fma.s1 asinf_Az = asinf_t,asinf_B,f0 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 fma.s1 asinf_B2 = asinf_B,asinf_B,f0 nop.i 999;; } - -{ .mfi + +{ .mfi nop.m 999 fma.s1 asinf_poly_p1 = f8,asinf_coeff_P1,f0 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 fma.s1 asinf_2poly_p1 = asinf_coeff_P1,asinf_t,f1 nop.i 999;; } -{ .mfi +{ .mfi nop.m 999 fma.s1 asinf_poly_p3 = asinf_coeff_P4,asinf_x2,asinf_coeff_P3 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 fma.s1 asinf_2poly_p6 = asinf_coeff_P7,asinf_t,asinf_coeff_P6 nop.i 999;; -} +} -{ .mfi +{ .mfi nop.m 999 fma.s1 asinf_poly_p7 = asinf_x2,asinf_coeff_P8,asinf_coeff_P7 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 fma.s1 asinf_2poly_p2 = asinf_coeff_P3,asinf_t,asinf_coeff_P2 nop.i 999;; } - -{ .mfi + +{ .mfi nop.m 999 fma.s1 asinf_poly_p5 = asinf_x2,asinf_coeff_P6,asinf_coeff_P5 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 fma.s1 asinf_2poly_p4 = asinf_coeff_P5,asinf_t,asinf_coeff_P4 nop.i 999;; } - -{ .mfi + +{ .mfi nop.m 999 fma.d.s1 asinf_x11 = asinf_x8,asinf_x3,f0 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 fnma.s1 asinf_dz = asinf_B2,asinf_yby2,asinf_1by2 nop.i 999;; } - -{ .mfi + +{ .mfi nop.m 999 fma.s1 asinf_poly_p1a = asinf_x2,asinf_poly_p1,f8 nop.i 999 } -{ .mfi +{ .mfi nop.m 999 fma.s1 asinf_2poly_p8 = asinf_coeff_P9,asinf_t,asinf_coeff_P8 nop.i 999;; } - + // Get the absolute value of x and determine the region in which x lies -{ .mfi +{ .mfi nop.m 999 fcmp.le.s1 p7,p8 = asinf_abs_x,asinf_const_sqrt2by2 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 fma.s1 asinf_poly_p2 = asinf_x2,asinf_poly_p3,asinf_coeff_P2 nop.i 999;; } - -{ .mfi + +{ .mfi nop.m 999 fma.s1 asinf_poly_p7a = asinf_x4,asinf_coeff_P9,asinf_poly_p7 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 fma.s1 asinf_2poly_p2a = asinf_2poly_p2,asinf_t2,asinf_2poly_p1 nop.i 999;; } - -{ .mfi + +{ .mfi nop.m 999 (p8) fma.s1 asinf_sgnx_t4 = asinf_sgn_x,asinf_t4,f0 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 (p8) fma.s1 asinf_2poly_p4a = asinf_2poly_p6,asinf_t2,asinf_2poly_p4 nop.i 999;; } - -{ .mfi + +{ .mfi nop.m 999 (p8) fma.s1 asinf_Sz = asinf_5by2,asinf_dz,asinf_3by2 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 (p8) fma.s1 asinf_d2z = asinf_dz,asinf_dz,f0 nop.i 999;; } - -{ .mfi + +{ .mfi nop.m 999 (p8) fma.s1 asinf_sgn_x_piby2 = asinf_sgn_x,asinf_const_piby2,f0 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 (p7) fma.d.s1 asinf_poly_Ax = asinf_x5,asinf_poly_p2,asinf_poly_p1a nop.i 999;; -} - -{ .mfi +} + +{ .mfi nop.m 999 (p7) fma.d.s1 asinf_poly_Bx = asinf_x4,asinf_poly_p7a,asinf_poly_p5 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 (p8) fma.s1 asinf_sgnx_2poly_p2 = asinf_sgn_x,asinf_2poly_p2a,f0 nop.i 999;; -} - -{ .mfi +} + +{ .mfi nop.m 999 fcmp.eq.s0 p6,p0 = f8,f0 // Only purpose is to set D if x denormal nop.i 999 } -{ .mfi +{ .mfi nop.m 999 (p8) fma.s1 asinf_2poly_p4b = asinf_2poly_p8,asinf_t4,asinf_2poly_p4a nop.i 999;; } - -{ .mfi + +{ .mfi nop.m 999 (p8) fma.s1 asinf_Fz = asinf_d2z,asinf_Sz,asinf_dz nop.i 999;; -} +} + - -{ .mfi +{ .mfi nop.m 999 (p8) fma.d.s1 asinf_Pt = asinf_2poly_p4b,asinf_sgnx_t4,asinf_sgnx_2poly_p2 nop.i 999;; -} - -{ .mfi +} + +{ .mfi nop.m 999 (p8) fma.d.s1 asinf_z = asinf_Az,asinf_Fz,asinf_Az nop.i 999;; -} - +} + .pred.rel "mutex",p8,p7 //asinf_pred_GTsqrt2by2,asinf_pred_LEsqrt2by2 -{ .mfi +{ .mfi nop.m 999 (p8) fnma.s.s0 f8 = asinf_z,asinf_Pt,asinf_sgn_x_piby2 nop.i 999 -} - -{ .mfb +} + +{ .mfb nop.m 999 (p7) fma.s.s0 f8 = asinf_x11,asinf_poly_Bx,asinf_poly_Ax br.ret.sptk b0 ;; -} +} ASINF_ABS_ONE: // Here for short exit if |x|=1 -{ .mfb +{ .mfb nop.m 999 fma.s.s0 f8 = asinf_sgn_x,asinf_const_piby2,f0 br.ret.sptk b0 -} +} ;; GLOBAL_LIBM_END(asinf) // Stack operations when calling error support. -// (1) (2) -// sp -> + psp -> + -// | | -// | | <- GR_Y -// | | -// | <-GR_Y Y2->| -// | | -// | | <- GR_X -// | | -// sp-64 -> + sp -> + -// save ar.pfs save b0 -// save gp +// (1) (2) +// sp -> + psp -> + +// | | +// | | <- GR_Y +// | | +// | <-GR_Y Y2->| +// | | +// | | <- GR_X +// | | +// sp-64 -> + sp -> + +// save ar.pfs save b0 +// save gp // Stack operations when calling error support. diff --git a/sysdeps/ia64/fpu/e_asinl.S b/sysdeps/ia64/fpu/e_asinl.S index ad65a731fc..50e03e3581 100644 --- a/sysdeps/ia64/fpu/e_asinl.S +++ b/sysdeps/ia64/fpu/e_asinl.S @@ -687,70 +687,70 @@ F_CS6 = f36 F_CS7 = f37 F_CS8 = f38 F_CS9 = f39 -F_S23 = f40 -F_S45 = f41 -F_S67 = f42 -F_S89 = f43 -F_S25 = f44 -F_S69 = f45 -F_S29 = f46 -F_X2 = f47 -F_X4 = f48 -F_TSQRT = f49 -F_DTX = f50 -F_R = f51 -F_R2 = f52 -F_R3 = f53 -F_R4 = f54 - -F_C3 = f55 -F_C5 = f56 -F_C7 = f57 -F_C9 = f58 -F_P79 = f59 -F_P35 = f60 -F_P39 = f61 - -F_ATHI = f62 -F_ATLO = f63 - -F_T1 = f64 -F_Y = f65 -F_Y2 = f66 -F_ANDMASK = f67 -F_ORMASK = f68 -F_S = f69 -F_05 = f70 -F_SQRT_1S2 = f71 -F_DS = f72 -F_Z = f73 -F_1T2 = f74 -F_DZ = f75 -F_ZE = f76 -F_YZ = f77 -F_Y1S2 = f78 -F_Y1S2X = f79 -F_1X = f80 -F_ST = f81 -F_1T2_ST = f82 -F_TSS = f83 -F_Y1S2X2 = f84 -F_DZ_TERM = f85 -F_DTS = f86 -F_DS2X = f87 -F_T2 = f88 -F_ZY1S2S = f89 -F_Y1S2_1X = f90 +F_S23 = f40 +F_S45 = f41 +F_S67 = f42 +F_S89 = f43 +F_S25 = f44 +F_S69 = f45 +F_S29 = f46 +F_X2 = f47 +F_X4 = f48 +F_TSQRT = f49 +F_DTX = f50 +F_R = f51 +F_R2 = f52 +F_R3 = f53 +F_R4 = f54 + +F_C3 = f55 +F_C5 = f56 +F_C7 = f57 +F_C9 = f58 +F_P79 = f59 +F_P35 = f60 +F_P39 = f61 + +F_ATHI = f62 +F_ATLO = f63 + +F_T1 = f64 +F_Y = f65 +F_Y2 = f66 +F_ANDMASK = f67 +F_ORMASK = f68 +F_S = f69 +F_05 = f70 +F_SQRT_1S2 = f71 +F_DS = f72 +F_Z = f73 +F_1T2 = f74 +F_DZ = f75 +F_ZE = f76 +F_YZ = f77 +F_Y1S2 = f78 +F_Y1S2X = f79 +F_1X = f80 +F_ST = f81 +F_1T2_ST = f82 +F_TSS = f83 +F_Y1S2X2 = f84 +F_DZ_TERM = f85 +F_DTS = f86 +F_DS2X = f87 +F_T2 = f88 +F_ZY1S2S = f89 +F_Y1S2_1X = f90 F_TS = f91 -F_PI2_LO = f92 -F_PI2_HI = f93 -F_S19 = f94 -F_INV1T2_2 = f95 -F_CORR = f96 -F_DZ0 = f97 - -F_C11 = f98 -F_C13 = f99 +F_PI2_LO = f92 +F_PI2_HI = f93 +F_S19 = f94 +F_INV1T2_2 = f95 +F_CORR = f96 +F_DZ0 = f97 + +F_C11 = f98 +F_C13 = f99 F_C15 = f100 F_C17 = f101 F_P1113 = f102 diff --git a/sysdeps/ia64/fpu/e_atan2f.S b/sysdeps/ia64/fpu/e_atan2f.S index 67618f0437..5ff561d7ca 100644 --- a/sysdeps/ia64/fpu/e_atan2f.S +++ b/sysdeps/ia64/fpu/e_atan2f.S @@ -80,9 +80,9 @@ //.. //..Suppose (v,u) = (y,x), we calculate atan(v/u) as follows: //..A = y * frcpa(x) (so A = (y/x)(1 - beta)) -//..atan(y/x) = atan(A) + atan( ((y/x)-A))/(1 + (y/x)A) ), the second term is +//..atan(y/x) = atan(A) + atan( ((y/x)-A))/(1 + (y/x)A) ), the second term is //..a correction. -//..atan(A) is approximated by a polynomial +//..atan(A) is approximated by a polynomial //..A + p1 A^3 + p2 A^5 + ... + p10 A^21, //..atan(G) is approximated as follows: //..Let G = (y - Ax)/(x + Ay), atan(G) can be approximated by G + g * p1 @@ -90,9 +90,9 @@ //.. //..Suppose (v,u) = (x,y), we calculate atan(v/u) as follows: //..Z = x * frcpa(y) (so Z = (x/y)(1 - beta)) -//..atan(x/y) = atan(Z) + atan( ((x/y)-Z))/(1 + (x/y)Z) ), the second term is +//..atan(x/y) = atan(Z) + atan( ((x/y)-Z))/(1 + (x/y)Z) ), the second term is //..a correction. -//..atan(Z) is approximated by a polynomial +//..atan(Z) is approximated by a polynomial //..Z + p1 Z^3 + p2 Z^5 + ... + p10 Z^21, //..atan(T) is approximated as follows: //..Let T = (x - Ay)/(y + Ax), atan(T) can be approximated by T + t * p1 @@ -103,7 +103,7 @@ //..atan(A) ~=~ A + p1 A^3 + ... + P10 A^21 //.. //..This polynomial is computed as follows: -//..Asq = A*A; Acub = A*Asq, A4 = Asq*Asq +//..Asq = A*A; Acub = A*Asq, A4 = Asq*Asq //..A5 = Asq*Acub, A6 = Asq*A4; A11 = A5 * A6 //.. //..poly_A1 = p9 + Asq*p10, poly_A2 = p7 + Asq*p8, poly_A3 = p5 + Asq*p6 @@ -112,7 +112,7 @@ //.. //..poly_A4 = p1 * A //,,poly_A5 = p3 + Asq * p4, poly_A4 = A + Asq*poly_A4 -//..poly_A5 = p2 + Asq * poly_A5 +//..poly_A5 = p2 + Asq * poly_A5 //..poly_A4 = poly_A4 + A5 * poly_A5 //.. //..atan_A = poly_A4 + A11 * poly_A1 @@ -132,7 +132,7 @@ //..atan(A) ~=~ A + p1 A^3 + ... + P10 A^21 //.. //..This polynomial is computed as follows: -//..Asq = A*A; Acub = A*Asq, A4 = Asq*Asq +//..Asq = A*A; Acub = A*Asq, A4 = Asq*Asq //..A5 = Asq*Acub, A6 = Asq*A4; A11 = A5 * A6 //.. //..poly_A1 = p9 + Asq*p10, poly_A2 = p7 + Asq*p8, poly_A3 = p5 + Asq*p6 @@ -141,7 +141,7 @@ //.. //..poly_A4 = p1 * A //,,poly_A5 = p3 + Asq * p4, poly_A4 = A + Asq*poly_A4 -//..poly_A5 = p2 + Asq * poly_A5 +//..poly_A5 = p2 + Asq * poly_A5 //..poly_A4 = poly_A4 + A5 * poly_A5 //.. //..atan_A = poly_A4 + A11 * poly_A1 @@ -154,34 +154,34 @@ //coef_pj, j = 1,2,...,10; atan(A) ~=~ A + p1 A^3 + p2 A^5 + ... + p10 A^21 // // coef_p1 = -.3333332707155439167401311806315789E+00 -// coef_p1 in dbl = BFD5 5555 1219 1621 +// coef_p1 in dbl = BFD5 5555 1219 1621 // // coef_p2 = .1999967670926658391827857030875748E+00 -// coef_p2 in dbl = 3FC9 997E 7AFB FF4E +// coef_p2 in dbl = 3FC9 997E 7AFB FF4E // // coef_p3 = -.1427989384500152360161563301087296E+00 -// coef_p3 in dbl = BFC2 473C 5145 EE38 +// coef_p3 in dbl = BFC2 473C 5145 EE38 // // coef_p4 = .1105852823460720770079031213661163E+00 -// coef_p4 in dbl = 3FBC 4F51 2B18 65F5 +// coef_p4 in dbl = 3FBC 4F51 2B18 65F5 // // coef_p5 = -.8811839915595312348625710228448363E-01 -// coef_p5 in dbl = BFB6 8EED 6A8C FA32 +// coef_p5 in dbl = BFB6 8EED 6A8C FA32 // // coef_p6 = .6742329836955067042153645159059714E-01 -// coef_p6 in dbl = 3FB1 42A7 3D7C 54E3 +// coef_p6 in dbl = 3FB1 42A7 3D7C 54E3 // // coef_p7 = -.4468571068774672908561591262231909E-01 -// coef_p7 in dbl = BFA6 E10B A401 393F +// coef_p7 in dbl = BFA6 E10B A401 393F // // coef_p8 = .2252333246746511135532726960586493E-01 -// coef_p8 in dbl = 3F97 105B 4160 F86B +// coef_p8 in dbl = 3F97 105B 4160 F86B // // coef_p9 = -.7303884867007574742501716845542314E-02 -// coef_p9 in dbl = BF7D EAAD AA33 6451 +// coef_p9 in dbl = BF7D EAAD AA33 6451 // // coef_p10 = .1109686868355312093949039454619058E-02 -// coef_p10 in dbl = 3F52 2E5D 33BC 9BAA +// coef_p10 in dbl = 3F52 2E5D 33BC 9BAA // // Special values @@ -354,333 +354,333 @@ LOCAL_OBJECT_END(atan2f_coef_table2) .section .text GLOBAL_IEEE754_ENTRY(atan2f) - -{ .mfi + +{ .mfi alloc r32 = ar.pfs,1,5,4,0 frcpa.s1 atan2f_Z0,p0 = f1,f8 // Approx to 1/y nop.i 999 -} -{ .mfi +} +{ .mfi addl atan2f_GR_Addr_1 = @ltoff(atan2f_coef_table1),gp fma.s1 atan2f_xsq = f9,f9,f0 nop.i 999 ;; } - -{ .mfi + +{ .mfi ld8 atan2f_GR_Addr_1 = [atan2f_GR_Addr_1] frcpa.s1 atan2f_A0,p0 = f1,f9 // Approx to 1/x nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 fma.s1 atan2f_ysq = f8,f8,f0 nop.i 999 ;; } - -{ .mfi + +{ .mfi nop.m 999 fcmp.ge.s1 p8,p9 = f9,f0 // Set p8 if x>=0, p9 if x<0 nop.i 999 } -{ .mfi +{ .mfi nop.m 999 fma.s1 atan2f_xy = f9,f8,f0 nop.i 999 ;; } - - -{ .mfi + + +{ .mfi add atan2f_GR_Addr_2 = 0x30, atan2f_GR_Addr_1 fmerge.s atan2f_sgn_Y = f8,f1 nop.i 999 ;; -} - -{ .mmf +} + +{ .mmf ldfpd atan2f_coef_p1,atan2f_coef_p10 = [atan2f_GR_Addr_1],16 ldfpd atan2f_coef_p9,atan2f_coef_p8 = [atan2f_GR_Addr_2],16 fclass.m p10,p0 = f9,0xe7 // Test x @inf|@snan|@qnan|@zero -} +} ;; - -{ .mfi + +{ .mfi ldfpd atan2f_coef_p7,atan2f_coef_p6 = [atan2f_GR_Addr_1],16 fma.s1 atan2f_T_denom = atan2f_Z0,atan2f_xsq,f8 nop.i 999 -} -{ .mfi +} +{ .mfi ldfpd atan2f_coef_p5,atan2f_coef_p4 = [atan2f_GR_Addr_2],16 fma.s1 atan2f_Z = atan2f_Z0,f9,f0 nop.i 999 ;; } - -{ .mfi + +{ .mfi ldfpd atan2f_coef_p3,atan2f_coef_p2 = [atan2f_GR_Addr_1],16 fma.s1 atan2f_G_denom = atan2f_A0,atan2f_ysq,f9 nop.i 999 -} -{ .mfi +} +{ .mfi ldfpd atan2f_const_piby2,atan2f_const_pi = [atan2f_GR_Addr_2],16 fma.s1 atan2f_A = atan2f_A0,f8,f0 nop.i 999 ;; } -{ .mfi +{ .mfi ldfpd atan2f_const_piby4,atan2f_const_3piby4 = [atan2f_GR_Addr_2] fclass.m p11,p0 = f8,0xe7 // Test y @inf|@snan|@qnan|@zero nop.i 999 -} -{ .mfb +} +{ .mfb nop.m 999 fnma.s1 atan2f_T_numer = atan2f_Z0,atan2f_xy,f9 (p10) br.cond.spnt ATAN2F_XY_INF_NAN_ZERO ;; // Branch on x nan,inf,zero -} +} // p6 if |y|>|x|, p7 if |x|>=|y| , use xsq and ysq for test -{ .mfi +{ .mfi nop.m 999 fcmp.gt.s1 p6,p7 = atan2f_ysq,atan2f_xsq nop.i 999 } -{ .mfb +{ .mfb nop.m 999 fnma.s1 atan2f_G_numer = atan2f_A0,atan2f_xy,f8 (p11) br.cond.spnt ATAN2F_XY_INF_NAN_ZERO ;; // Branch on y nan,inf,zero } - -{ .mfi + +{ .mfi nop.m 999 (p8) fma.s1 atan2f_const_1 = atan2f_sgn_Y,f0,f0 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 (p9) fma.s1 atan2f_const_1 = atan2f_sgn_Y,f1,f0 nop.i 999 ;; } - -{ .mfi + +{ .mfi nop.m 999 (p6) fnma.s1 atan2f_U = atan2f_Z,f1,f0 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 (p6) fma.s1 atan2f_Usq = atan2f_Z,atan2f_Z,f0 nop.i 999 ;; -} +} + - -{ .mfi +{ .mfi nop.m 999 (p7) fma.s1 atan2f_U = atan2f_A,f1,f0 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 (p7) fma.s1 atan2f_Usq = atan2f_A,atan2f_A,f0 nop.i 999 ;; } -{ .mfi +{ .mfi nop.m 999 (p6) frcpa.s1 atan2f_Q1,p0 = f1,atan2f_T_denom nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 (p6) fma.s1 atan2f_R_denom = atan2f_T_denom,f1,f0 nop.i 999 ;; -} +} -{ .mfi +{ .mfi nop.m 999 (p7) frcpa.s1 atan2f_Q1,p0 = f1,atan2f_G_denom nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 (p7) fma.s1 atan2f_R_denom = atan2f_G_denom,f1,f0 nop.i 999 ;; -} +} -{ .mfi +{ .mfi nop.m 999 (p6) fnma.s1 atan2f_R_numer = atan2f_T_numer,f1,f0 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 (p7) fma.s1 atan2f_R_numer = atan2f_G_numer,f1,f0 nop.i 999 ;; -} +} + - -{ .mfi +{ .mfi nop.m 999 (p6) fnma.s1 atan2f_p1rnum = atan2f_T_numer,atan2f_coef_p1,f0 nop.i 999 ;; -} -{ .mfi +} +{ .mfi nop.m 999 (p7) fma.s1 atan2f_p1rnum = atan2f_G_numer,atan2f_coef_p1,f0 nop.i 999 ;; -} +} + - -{ .mfi +{ .mfi nop.m 999 fma.s1 atan2f_U4 = atan2f_Usq,atan2f_Usq,f0 nop.i 999 } -{ .mfi +{ .mfi nop.m 999 fma.s1 atan2f_poly_u109 = atan2f_Usq,atan2f_coef_p10,atan2f_coef_p9 nop.i 999 ;; -} - -{ .mfi +} + +{ .mfi nop.m 999 fma.s1 atan2f_poly_u87 = atan2f_Usq,atan2f_coef_p8,atan2f_coef_p7 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 fma.s1 atan2f_poly_u65 = atan2f_Usq,atan2f_coef_p6,atan2f_coef_p5 nop.i 999 ;; } - - -{ .mfi + + +{ .mfi nop.m 999 fma.s1 atan2f_poly_u43 = atan2f_Usq,atan2f_coef_p4,atan2f_coef_p3 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 fnma.s1 atan2f_Q_beta = atan2f_Q1,atan2f_R_denom,f1 nop.i 999 ;; } -{ .mfi +{ .mfi nop.m 999 fma.s1 atan2f_poly_u21 = atan2f_Usq,atan2f_coef_p2,atan2f_coef_p1 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 fma.s1 atan2f_r = atan2f_Q1,atan2f_R_numer,f0 nop.i 999 ;; } -{ .mfi +{ .mfi nop.m 999 (p6) fma.s1 atan2f_C = atan2f_sgn_Y,atan2f_const_piby2,f0 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 (p7) fma.s1 atan2f_C = atan2f_const_1,atan2f_const_pi,f0 nop.i 999 ;; -} +} -{ .mfi +{ .mfi nop.m 999 fma.s1 atan2f_U6 = atan2f_U4,atan2f_Usq,f0 nop.i 999 } -{ .mfi +{ .mfi nop.m 999 fma.s1 atan2f_U8 = atan2f_U4,atan2f_U4,f0 nop.i 999 ;; } -{ .mfi +{ .mfi nop.m 999 fma.s1 atan2f_poly_u10to7 = atan2f_U4,atan2f_poly_u109,atan2f_poly_u87 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 fma.s1 atan2f_pR = atan2f_p1rnum,atan2f_Q1,f0 nop.i 999 ;; -} +} -{ .mfi +{ .mfi nop.m 999 fma.s1 atan2f_poly_u6to3 = atan2f_U4,atan2f_poly_u65,atan2f_poly_u43 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 fma.s1 atan2f_Q2 = atan2f_Q1,atan2f_Q_beta,atan2f_Q1 nop.i 999 ;; } -{ .mfi +{ .mfi nop.m 999 fma.s1 atan2f_Q_beta2 = atan2f_Q_beta,atan2f_Q_beta,f0 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 fma.s1 atan2f_rsq = atan2f_r,atan2f_r,f0 nop.i 999 ;; } -{ .mfi +{ .mfi nop.m 999 fma.s1 atan2f_poly_u210 = atan2f_Usq,atan2f_poly_u21,f1 nop.i 999 ;; -} - +} + { .mfi nop.m 999 fcmp.eq.s0 p8,p0 = f8,f9 // Dummy op to set flag on denormal inputs nop.i 999 } -{ .mfi +{ .mfi nop.m 999 fma.s1 atan2f_poly_u10to3 = atan2f_U8,atan2f_poly_u10to7,atan2f_poly_u6to3 nop.i 999 ;; -} +} -{ .mfi +{ .mfi nop.m 999 fma.s1 atan2f_Q3 = atan2f_Q2,atan2f_Q_beta2,atan2f_Q2 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 fma.s1 atan2f_pRC = atan2f_rsq,atan2f_pR,atan2f_C nop.i 999 ;; -} - -{ .mfi +} + +{ .mfi nop.m 999 fma.s1 atan2f_poly_u10to0 = atan2f_U6,atan2f_poly_u10to3,atan2f_poly_u210 nop.i 999 ;; -} +} -{ .mfi +{ .mfi nop.m 999 fma.s1 atan2f_pQRC = atan2f_R_numer,atan2f_Q3,atan2f_pRC nop.i 999 ;; -} +} -{ .mfb +{ .mfb nop.m 999 fma.s.s0 f8 = atan2f_U,atan2f_poly_u10to0,atan2f_pQRC br.ret.sptk b0 ;; -} +} diff --git a/sysdeps/ia64/fpu/e_atanhl.S b/sysdeps/ia64/fpu/e_atanhl.S index cee1ba17b1..846a89ec3a 100644 --- a/sysdeps/ia64/fpu/e_atanhl.S +++ b/sysdeps/ia64/fpu/e_atanhl.S @@ -1,4 +1,4 @@ -.file "atanhl.s" +.file "atanhl.s" // Copyright (c) 2001 - 2003, Intel Corporation @@ -21,25 +21,25 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,INCLUDING,BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,INCLUDING,BUT NOT // LIMITED TO,THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT,INDIRECT,INCIDENTAL,SPECIAL, // EXEMPLARY,OR CONSEQUENTIAL DAMAGES (INCLUDING,BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,DATA,OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,DATA,OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY,WHETHER IN CONTRACT,STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE,EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE,EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code,and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // //********************************************************************* // -// History: +// History: // 09/10/01 Initial version // 12/11/01 Corrected .restore syntax // 05/20/02 Cleaned up namespace and sf0 syntax @@ -50,7 +50,7 @@ // //********************************************************************* // -// Function: atanhl(x) computes the principle value of the inverse +// Function: atanhl(x) computes the principle value of the inverse // hyperbolic tangent of x. // //********************************************************************* @@ -71,10 +71,10 @@ // IEEE Special Conditions: // // atanhl(inf) = QNaN -// atanhl(-inf) = QNaN -// atanhl(+/-0) = +/-0 -// atanhl(1) = +inf -// atanhl(-1) = -inf +// atanhl(-inf) = QNaN +// atanhl(+/-0) = +/-0 +// atanhl(1) = +inf +// atanhl(-1) = -inf // atanhl(|x|>1) = QNaN // atanhl(SNaN) = QNaN // atanhl(QNaN) = QNaN @@ -96,8 +96,8 @@ // Case atanhl_regular: // // Here we use formula atanhl(x) = sign(x)*log1pl(2*|x|/(1-|x|))/2 and -// calculation is subdivided into two stages. The first stage is -// calculating of X = 2*|x|/(1-|x|). The second one is calculating of +// calculation is subdivided into two stages. The first stage is +// calculating of X = 2*|x|/(1-|x|). The second one is calculating of // sign(x)*log1pl(X)/2. To obtain required accuracy we use precise division // algorythm output of which is a pair of two extended precision values those // approximate result of division with accuracy higher than working @@ -114,7 +114,7 @@ // // y = frcpa(b) initial approximation of 1/b // q = a*y initial approximation of a/b -// +// // e = 1 - b*y // e2 = e + e^2 // e1 = e^2 @@ -131,12 +131,12 @@ // r1 = a - b*X // r1 = r1 - b_lo*X // X_lo = r1*y3 low part of a/b -// +// // 2. special log1p algorithm overview // *********************************** // // Here we use a table lookup method. The basic idea is that in -// order to compute logl(Arg) = log1pl (Arg-1) for an argument Arg in [1,2), +// order to compute logl(Arg) = log1pl (Arg-1) for an argument Arg in [1,2), // we construct a value G such that G*Arg is close to 1 and that // logl(1/G) is obtainable easily from a table of values calculated // beforehand. Thus @@ -167,7 +167,7 @@ // G := G_1 * G_2 * G_3 // r := (G * S_hi - 1) + G * S_lo // -// These G_j's have the property that the product is exactly +// These G_j's have the property that the product is exactly // representable and that |r| < 2^(-12) as a result. // // Step 2: Approximation @@ -201,7 +201,7 @@ data8 0x9249249249249249,0x00003FFC // C7 data8 0xCCCCCCCCCCCCCCCD,0x00003FFC // C5 data8 0xAAAAAAAAAAAAAAAA,0x00003FFD // C3 data4 0x3f000000 // 1/2 -data4 0x00000000 // pad +data4 0x00000000 // pad data4 0x00000000 data4 0x00000000 LOCAL_OBJECT_END(Constants_TaylorSeries) @@ -328,7 +328,7 @@ data4 0x3F71D488,0x3D693B9D data8 0xBE049391B6B7C239 LOCAL_OBJECT_END(Constants_G_H_h2) -// G3 and H3 - IEEE single and h3 - IEEE double +// G3 and H3 - IEEE single and h3 - IEEE double LOCAL_OBJECT_START(Constants_G_H_h3) data4 0x3F7FFC00,0x38800100 data8 0x3D355595562224CD @@ -538,78 +538,78 @@ GLOBAL_LIBM_ENTRY(atanhl) alloc r32 = ar.pfs,0,17,4,0 fnma.s1 FR_Bp = f8,f1,f1 // b = 1 - |arg| (for x>0) mov GR_ExpMask = 0x1ffff -} -{ .mfi +} +{ .mfi addl GR_ad_taylor = @ltoff(Constants_TaylorSeries),gp fma.s1 FR_Bn = f8,f1,f1 // b = 1 - |arg| (for x<0) mov GR_NearZeroBound = 0xfffa // biased exp of 1/32 -};; -{ .mfi +};; +{ .mfi getf.exp GR_ArgExp = f8 fcmp.lt.s1 p6,p7 = f8,f0 // is negative? nop.i 0 -} -{ .mfi +} +{ .mfi ld8 GR_ad_taylor = [GR_ad_taylor] fmerge.s FR_abs_x = f1,f8 nop.i 0 -};; -{ .mfi +};; +{ .mfi nop.m 0 fclass.m p8,p0 = f8,0x1C7 // is arg NaT,Q/SNaN or +/-0 ? nop.i 0 } -{ .mfi +{ .mfi nop.m 0 fma.s1 FR_x2 = f8,f8,f0 nop.i 0 -};; -{ .mfi +};; +{ .mfi add GR_ad_z_1 = 0x0F0,GR_ad_taylor fclass.m p9,p0 = f8,0x0a // is arg -denormal ? add GR_ad_taylor_2 = 0x010,GR_ad_taylor -} -{ .mfi +} +{ .mfi add GR_ad_05 = 0x080,GR_ad_taylor nop.f 0 nop.i 0 -};; -{ .mfi +};; +{ .mfi ldfe FR_C17 = [GR_ad_taylor],32 fclass.m p10,p0 = f8,0x09 // is arg +denormal ? add GR_ad_tbl_1 = 0x040,GR_ad_z_1 // point to Constants_G_H_h1 -} -{ .mfb +} +{ .mfb add GR_ad_z_2 = 0x140,GR_ad_z_1 // point to Constants_Z_2 (p8) fma.s0 f8 = f8,f1,f0 // NaN or +/-0 (p8) br.ret.spnt b0 // exit for Nan or +/-0 -};; -{ .mfi +};; +{ .mfi ldfe FR_C15 = [GR_ad_taylor_2],32 fclass.m p15,p0 = f8,0x23 // is +/-INF ? add GR_ad_tbl_2 = 0x180,GR_ad_z_1 // point to Constants_G_H_h2 -} -{ .mfb +} +{ .mfb ldfe FR_C13 = [GR_ad_taylor],32 (p9) fnma.s0 f8 = f8,f8,f8 // -denormal (p9) br.ret.spnt b0 // exit for -denormal -};; -{ .mfi +};; +{ .mfi ldfe FR_C11 = [GR_ad_taylor_2],32 fcmp.eq.s0 p13,p0 = FR_abs_x,f1 // is |arg| = 1? nop.i 0 -} -{ .mfb +} +{ .mfb ldfe FR_C9 = [GR_ad_taylor],32 (p10) fma.s0 f8 = f8,f8,f8 // +denormal (p10) br.ret.spnt b0 // exit for +denormal -};; -{ .mfi +};; +{ .mfi ldfe FR_C7 = [GR_ad_taylor_2],32 (p6) frcpa.s1 FR_Yn,p11 = f1,FR_Bn // y = frcpa(b) and GR_ArgExp = GR_ArgExp,GR_ExpMask // biased exponent -} -{ .mfb +} +{ .mfb ldfe FR_C5 = [GR_ad_taylor],32 fnma.s1 FR_B = FR_abs_x,f1,f1 // b = 1 - |arg| (p15) br.cond.spnt atanhl_gt_one // |arg| > 1 @@ -639,20 +639,20 @@ GLOBAL_LIBM_ENTRY(atanhl) ldfs FR_Half = [GR_ad_05] (p7) fnma.s1 FR_B_lo = FR_Bp,f1,f1 nop.i 0 -};; +};; { .mfi nop.m 0 - (p6) fnma.s1 FR_E0 = FR_Yn,FR_Bn,f1 // e = 1-b*y + (p6) fnma.s1 FR_E0 = FR_Yn,FR_Bn,f1 // e = 1-b*y nop.i 0 -} -{ .mfb +} +{ .mfb nop.m 0 (p6) fma.s1 FR_Y0 = FR_Yn,f1,f0 (p8) br.cond.spnt atanhl_gt_one // |arg| > 1 };; { .mfi nop.m 0 - (p7) fnma.s1 FR_E0 = FR_Yp,FR_Bp,f1 + (p7) fnma.s1 FR_E0 = FR_Yp,FR_Bp,f1 nop.i 0 } { .mfi @@ -804,11 +804,11 @@ GLOBAL_LIBM_ENTRY(atanhl) { .mfi ldfe FR_log2_lo = [GR_ad_q],16 // load log2_lo nop.f 0 - sub GR_N = GR_N,GR_Bias + sub GR_N = GR_N,GR_Bias };; { .mfi ldfe FR_Q4 = [GR_ad_q],16 // load Q4 - fms.s1 FR_S_lo = FR_AA,f1,FR_Z // form S_lo = AA - Z + fms.s1 FR_S_lo = FR_AA,f1,FR_Z // form S_lo = AA - Z sub GR_minus_N = GR_Bias,GR_N // form exponent of 2^(-N) };; { .mmf @@ -820,7 +820,7 @@ GLOBAL_LIBM_ENTRY(atanhl) { .mfi ldfe FR_Q2 = [GR_ad_q],16 // load Q2 nop.f 0 - extr.u GR_Index2 = GR_X_1,6,4 // extract bits 6-9 of X_1 + extr.u GR_Index2 = GR_X_1,6,4 // extract bits 6-9 of X_1 };; { .mmi ldfe FR_Q1 = [GR_ad_q] // load Q1 @@ -862,17 +862,17 @@ GLOBAL_LIBM_ENTRY(atanhl) } { .mfi nop.m 0 - nop.f 0 + nop.f 0 nop.i 0 };; { .mfi nop.m 0 - nop.f 0 + nop.f 0 nop.i 0 };; { .mfi nop.m 0 - nop.f 0 + nop.f 0 nop.i 0 };; @@ -1068,7 +1068,7 @@ atanhl_near_zero: { .mfb nop.m 0 fma.s0 f8 = FR_C17,FR_x3,f8 - br.ret.sptk b0 + br.ret.sptk b0 };; atanhl_eq_one: diff --git a/sysdeps/ia64/fpu/e_coshl.S b/sysdeps/ia64/fpu/e_coshl.S index b5872d0b24..43da1ab04d 100644 --- a/sysdeps/ia64/fpu/e_coshl.S +++ b/sysdeps/ia64/fpu/e_coshl.S @@ -21,25 +21,25 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // // History //============================================================== -// 02/02/00 Initial version +// 02/02/00 Initial version // 04/04/00 Unwind support added // 08/15/00 Bundle added after call to __libm_error_support to properly // set [the previously overwritten] GR_Parameter_RESULT. @@ -56,12 +56,12 @@ // // Registers used //============================================================== -// general registers: +// general registers: // r14 -> r40 // predicate registers used: // p6 -> p11 // floating-point registers used: -// f9 -> f15; f32 -> f90; +// f9 -> f15; f32 -> f90; // f8 has input, then output // // Overview of operation @@ -82,7 +82,7 @@ // 1. COSH_BY_POLY 0 < |x| < 0.25 // =============== // Evaluate cosh(x) by a 12th order polynomial -// Care is take for the order of multiplication; and P2 is not exactly 1/4!, +// Care is take for the order of multiplication; and P2 is not exactly 1/4!, // P3 is not exactly 1/6!, etc. // cosh(x) = 1 + (P1*x^2 + P2*x^4 + P3*x^6 + P4*x^8 + P5*x^10 + P6*x^12) // @@ -90,18 +90,18 @@ // ============= // cosh(x) = cosh(B+R) // = cosh(B)cosh(R) + sinh(B)sinh(R) -// +// // ax = |x| = M*log2/64 + R // B = M*log2/64 -// M = 64*N + j +// M = 64*N + j // We will calculate M and get N as (M-j)/64 // The division is a shift. // exp(B) = exp(N*log2 + j*log2/64) // = 2^N * 2^(j*log2/64) // cosh(B) = 1/2(e^B + e^-B) -// = 1/2(2^N * 2^(j*log2/64) + 2^-N * 2^(-j*log2/64)) -// cosh(B) = (2^(N-1) * 2^(j*log2/64) + 2^(-N-1) * 2^(-j*log2/64)) -// sinh(B) = (2^(N-1) * 2^(j*log2/64) - 2^(-N-1) * 2^(-j*log2/64)) +// = 1/2(2^N * 2^(j*log2/64) + 2^-N * 2^(-j*log2/64)) +// cosh(B) = (2^(N-1) * 2^(j*log2/64) + 2^(-N-1) * 2^(-j*log2/64)) +// sinh(B) = (2^(N-1) * 2^(j*log2/64) - 2^(-N-1) * 2^(-j*log2/64)) // 2^(j*log2/64) is stored as Tjhi + Tjlo , j= -32,....,32 // Tjhi is double-extended (80-bit) and Tjlo is single(32-bit) // @@ -109,7 +109,7 @@ // R = ax - M*log2_by_64_hi - M*log2_by_64_lo // exp(R) = 1 + R +R^2(1/2! + R(1/3! + R(1/4! + ... + R(1/n!)...) // = 1 + p_odd + p_even -// where the p_even uses the A coefficients and the p_even uses +// where the p_even uses the A coefficients and the p_even uses // the B coefficients // // So sinh(R) = 1 + p_odd + p_even -(1 -p_odd -p_even)/2 = p_odd @@ -173,7 +173,7 @@ GR_Parameter_RESULT = r39 GR_Parameter_TAG = r40 -f_ABS_X = f9 +f_ABS_X = f9 f_X2 = f10 f_X4 = f11 f_tmp = f14 @@ -228,16 +228,16 @@ f_Tmjlo = f68 f_S_hi = f69 f_SC_hi_temp = f70 -f_C_lo_temp1 = f71 -f_C_lo_temp2 = f72 -f_C_lo_temp3 = f73 -f_C_lo_temp4 = f73 +f_C_lo_temp1 = f71 +f_C_lo_temp2 = f72 +f_C_lo_temp3 = f73 +f_C_lo_temp4 = f73 f_C_lo = f74 f_C_hi = f75 -f_Y_hi = f77 -f_Y_lo_temp = f78 -f_Y_lo = f79 +f_Y_hi = f77 +f_Y_lo_temp = f78 +f_Y_lo = f79 f_NORM_X = f80 f_P1 = f81 @@ -442,7 +442,7 @@ GLOBAL_IEEE754_ENTRY(coshl) } { .mfi nop.m 0 - fnorm.s1 f_NORM_X = f8 + fnorm.s1 f_NORM_X = f8 mov r_exp_2tom57 = 0xffff-57 } ;; @@ -450,7 +450,7 @@ GLOBAL_IEEE754_ENTRY(coshl) { .mfi setf.d f_RSHF_2TO57 = r_rshf_2to57 // Form const 1.100 * 2^120 fclass.m p10,p0 = f8, 0x0b // Test for denorm - mov r_exp_mask = 0x1ffff + mov r_exp_mask = 0x1ffff } { .mlx setf.sig f_INV_LN2_2TO63 = r_sig_inv_ln2 // Form 1/ln2 * 2^63 @@ -490,7 +490,7 @@ COSH_COMMON: add r_ad5 = 0x580, r_ad1 // Point to j_lo_table midpoint } { .mib - ldfe f_log2by64_hi = [r_ad1],16 + ldfe f_log2by64_hi = [r_ad1],16 and r_exp_x = r_exp_mask, r_signexp_x (p7) br.ret.spnt b0 // Exit if x=0 } @@ -498,36 +498,36 @@ COSH_COMMON: // Get the A coefficients for COSH_BY_TBL { .mfi - ldfe f_A1 = [r_ad3],16 + ldfe f_A1 = [r_ad3],16 fcmp.lt.s1 p8,p9 = f8,f0 // Test for x<0 cmp.lt p7,p0 = r_exp_x, r_exp_0_25 // Test x < 0.25 } { .mfb add r_ad2o = 0x30, r_ad2e // Point to p_table odd coeffs -(p6) fma.s0 f8 = f8,f8,f0 // Result for x nan, inf +(p6) fma.s0 f8 = f8,f8,f0 // Result for x nan, inf (p6) br.ret.spnt b0 // Exit for x nan, inf } ;; // Calculate X2 = ax*ax for COSH_BY_POLY { .mfi - ldfe f_log2by64_lo = [r_ad1],16 + ldfe f_log2by64_lo = [r_ad1],16 nop.f 0 nop.i 0 } { .mfb - ldfe f_A2 = [r_ad3],16 + ldfe f_A2 = [r_ad3],16 fma.s1 f_X2 = f_NORM_X, f_NORM_X, f0 (p7) br.cond.spnt COSH_BY_POLY } ;; // Here if |x| >= 0.25 -COSH_BY_TBL: +COSH_BY_TBL: // ****************************************************** // STEP 1 (TBL and EXP) - Argument reduction // ****************************************************** -// Get the following constants. +// Get the following constants. // Inv_log2by64 // log2by64_hi // log2by64_lo @@ -581,20 +581,20 @@ COSH_BY_TBL: // Subtract RSHF constant to get rounded M as a floating point value // M_temp * 2^(63-6) - 2^63 { .mfb - ldfe f_B3 = [r_ad3],16 + ldfe f_B3 = [r_ad3],16 fms.s1 f_M = f_M_temp, f_2TOM57, f_RSHF (p6) br.cond.spnt COSH_HUGE // Branch if result will overflow } ;; { .mfi - getf.sig r_M = f_M_temp + getf.sig r_M = f_M_temp nop.f 0 cmp.ge p7,p6 = r_exp_x, r_exp_32 // Test if x >= 32 } ;; -// Calculate j. j is the signed extension of the six lsb of M. It +// Calculate j. j is the signed extension of the six lsb of M. It // has a range of -32 thru 31. // Calculate R @@ -637,8 +637,8 @@ COSH_BY_TBL: // N = (M-j)/64 { .mfi ldfe f_Tjhi = [r_ad_J_hi] - fnma.s1 f_R = f_M, f_log2by64_lo, f_R_temp - shr r_N = r_Mmj, 0x6 // N = (M-j)/64 + fnma.s1 f_R = f_M, f_log2by64_lo, f_R_temp + shr r_N = r_Mmj, 0x6 // N = (M-j)/64 } { .mfi shladd r_ad_mJ_hi = r_mj, 4, r_ad4 // pointer to Tmjhi @@ -713,8 +713,8 @@ COSH_BY_TBL: } ;; -// -// If TBL, +// +// If TBL, // Calculate S_hi and S_lo, and C_hi // SC_hi_temp = sneg * Tmjhi // S_hi = spos * Tjhi - SC_hi_temp @@ -724,12 +724,12 @@ COSH_BY_TBL: { .mfi nop.m 0 -(p6) fma.s1 f_SC_hi_temp = f_sneg, f_Tmjhi, f0 +(p6) fma.s1 f_SC_hi_temp = f_sneg, f_Tmjhi, f0 nop.i 0 } ;; -// If TBL, +// If TBL, // C_lo_temp3 = sneg * Tmjlo // C_lo_temp4 = spos * Tjlo + C_lo_temp3 // C_lo_temp4 = spos * Tjlo + (sneg * Tmjlo) @@ -752,7 +752,7 @@ COSH_BY_TBL: } ;; -// If EXP, +// If EXP, // Compute 2^(N-1) * Tjhi and 2^(N-1) * Tjlo { .mfi nop.m 0 @@ -811,7 +811,7 @@ COSH_BY_TBL: { .mfi nop.m 0 -(p6) fma.s1 f_C_lo_temp2 = f_sneg, f_Tmjhi, f_C_lo_temp1 +(p6) fma.s1 f_C_lo_temp2 = f_sneg, f_Tmjhi, f_C_lo_temp1 nop.i 0 } ;; @@ -836,7 +836,7 @@ COSH_BY_TBL: ;; // If TBL, -// Y_hi = C_hi +// Y_hi = C_hi // Y_lo = S_hi*p_odd + (C_hi*p_even + C_lo) { .mfi nop.m 0 @@ -883,7 +883,7 @@ COSH_BY_TBL: // Here if 0 < |x| < 0.25 -COSH_BY_POLY: +COSH_BY_POLY: { .mmf ldfe f_P6 = [r_ad2e],16 ldfe f_P5 = [r_ad2o],16 @@ -900,7 +900,7 @@ COSH_BY_POLY: { .mmi ldfe f_P2 = [r_ad2e],16 - ldfe f_P1 = [r_ad2o],16 + ldfe f_P1 = [r_ad2o],16 nop.i 0 } ;; @@ -1007,7 +1007,7 @@ COSH_DENORM: // Here if |x| >= overflow limit -COSH_HUGE: +COSH_HUGE: // for COSH_HUGE, put 24000 in exponent; take sign from input { .mmi mov r_exp_huge = 0x15dbf @@ -1018,7 +1018,7 @@ COSH_HUGE: ;; { .mfi - alloc r32 = ar.pfs,0,5,4,0 + alloc r32 = ar.pfs,0,5,4,0 fma.s1 f_signed_hi_lo = f_huge, f1, f1 nop.i 0 } @@ -1061,7 +1061,7 @@ LOCAL_LIBM_ENTRY(__libm_error_region) { .mib stfe [GR_Parameter_X] = f8 // STORE Parameter 1 on stack add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address - nop.b 0 + nop.b 0 } { .mib stfe [GR_Parameter_Y] = f_pre_result // STORE Parameter 3 on stack diff --git a/sysdeps/ia64/fpu/e_exp.S b/sysdeps/ia64/fpu/e_exp.S index fcc247fb1a..f17bc26081 100644 --- a/sysdeps/ia64/fpu/e_exp.S +++ b/sysdeps/ia64/fpu/e_exp.S @@ -693,7 +693,7 @@ EXP_CERTAIN_UNDERFLOW: nop.i 0 } ;; - + { .mfb nop.m 0 fma.d.s0 f8 = fTmp, fTmp, f0 // Set I,U, tiny (+0.0) result diff --git a/sysdeps/ia64/fpu/e_expf.S b/sysdeps/ia64/fpu/e_expf.S index 6fe0a833e2..75f918f78e 100644 --- a/sysdeps/ia64/fpu/e_expf.S +++ b/sysdeps/ia64/fpu/e_expf.S @@ -257,7 +257,7 @@ LOCAL_OBJECT_END(_expf_table) .section .text GLOBAL_IEEE754_ENTRY(expf) - + { .mlx addl rTblAddr = @ltoff(_expf_table),gp movl r64DivLn2 = 0x40571547652B82FE // 64/ln(2) @@ -612,7 +612,7 @@ EXP_CERTAIN_UNDERFLOW: nop.i 0 } ;; - + { .mfb nop.m 0 fma.s.s0 f8 = fTmp, fTmp, f0 // Set I,U, tiny (+0.0) result diff --git a/sysdeps/ia64/fpu/e_fmodl.S b/sysdeps/ia64/fpu/e_fmodl.S index 3e87eb090f..258e4ef8a6 100644 --- a/sysdeps/ia64/fpu/e_fmodl.S +++ b/sysdeps/ia64/fpu/e_fmodl.S @@ -366,7 +366,7 @@ loop64: { .mfi nop.m 0 - // Final iteration (p8): is FR_ABS_A the correct remainder + // Final iteration (p8): is FR_ABS_A the correct remainder // (quotient was not overestimated) ? (p8) fcmp.lt.unc.s1 p6, p10 = FR_QREM, f0 nop.i 0 @@ -392,7 +392,7 @@ loop64: nop.m 0 // add b to estimated remainder (to cover the case when the quotient was // overestimated) - // also set correct sign by using + // also set correct sign by using // FR_B_SGN_A = |b|*sgn(a), FR_ROUNDCONST = sgn(a) (p6) fma.s0 f8 = FR_QREM, FR_ROUNDCONST, FR_B_SGN_A nop.b 0 diff --git a/sysdeps/ia64/fpu/e_hypot.S b/sysdeps/ia64/fpu/e_hypot.S index 36cfd1e667..1df1f6419e 100644 --- a/sysdeps/ia64/fpu/e_hypot.S +++ b/sysdeps/ia64/fpu/e_hypot.S @@ -21,25 +21,25 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // //********************************************************************* // -// History: +// History: // 02/02/00 hand-optimized // 04/04/00 Unwind support added // 06/20/00 new version @@ -86,7 +86,7 @@ // x2 = x * x in double-extended // y2 = y * y in double-extended // temp = x2 + y2 in double-extended -// sqrt(temp) rounded to double +// sqrt(temp) rounded to double // //********************************************************************* @@ -114,7 +114,7 @@ GLOBAL_IEEE754_ENTRY(hypot) // Compute x*x fma.s1 f10=f8,f8,f0 // r2=bias-1 - mov r2=0xfffe + mov r2=0xfffe } {.mfi // 63/8 @@ -135,8 +135,8 @@ GLOBAL_IEEE754_ENTRY(hypot) {.mfi nop.m 0 // if possible overflow, copy f8 to f32 - // set Denormal, if necessary - // (p8) + // set Denormal, if necessary + // (p8) fma.d.s0 f32=f8,f1,f0 nop.i 0;; } @@ -235,11 +235,11 @@ GLOBAL_IEEE754_ENTRY(hypot) { .mfi nop.m 0 -// Identify Natvals, Infs, NaNs, and Zeros +// Identify Natvals, Infs, NaNs, and Zeros // and return result fclass.m.unc p7, p0 = f12, 0x1E7 nop.i 0;; -} +} {.mfb // get exponent of x^2+y^2 getf.exp r3=f12 @@ -260,7 +260,7 @@ GLOBAL_IEEE754_ENTRY(hypot) // H0=0.5*z0 (p6) fma.s1 f15=f8,f7,f0 nop.i 0;; -} +} {.mfi @@ -334,7 +334,7 @@ GLOBAL_IEEE754_ENTRY(hypot) nop.i 0 } {.mfi - // Is x^2 + y^2 well less than the overflow + // Is x^2 + y^2 well less than the overflow // threshold? (p6) cmp.lt.unc p7, p8 = r3,r2 // P=P13+d3*P47 @@ -351,8 +351,8 @@ GLOBAL_IEEE754_ENTRY(hypot) } { .mfi - nop.m 0 -(p8) fsetc.s2 0x7F,0x42 + nop.m 0 +(p8) fsetc.s2 0x7F,0x42 // Possible overflow path, must detect by // Setting widest range exponent with prevailing // rounding mode. @@ -374,7 +374,7 @@ GLOBAL_IEEE754_ENTRY(hypot) nop.i 0 ;; } { .mfi - nop.m 0 + nop.m 0 (p8) fcmp.lt.unc.s1 p9, p10 = f12, f11 nop.i 0 ;; } @@ -382,7 +382,7 @@ GLOBAL_IEEE754_ENTRY(hypot) nop.m 0 mov GR_Parameter_TAG = 46 // No overflow -(p9) br.ret.sptk b0;; +(p9) br.ret.sptk b0;; } GLOBAL_IEEE754_END(hypot) diff --git a/sysdeps/ia64/fpu/e_hypotf.S b/sysdeps/ia64/fpu/e_hypotf.S index d6fcbd1a01..f9d5c07571 100644 --- a/sysdeps/ia64/fpu/e_hypotf.S +++ b/sysdeps/ia64/fpu/e_hypotf.S @@ -21,25 +21,25 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // //********************************************************************* // -// History: +// History: // 02/02/00 hand-optimized // 04/04/00 Unwind support added // 06/26/00 new version @@ -86,7 +86,7 @@ // x2 = x * x in double-extended // y2 = y * y in double-extended // temp = x2 + y2 in double-extended -// sqrt(temp) rounded to single precision +// sqrt(temp) rounded to single precision // //********************************************************************* @@ -113,7 +113,7 @@ GLOBAL_IEEE754_ENTRY(hypotf) // Compute x*x fma.s1 f10=f8,f8,f0 // r2=bias-1 - mov r2=0xfffe + mov r2=0xfffe } {.mfi nop.m 0 @@ -132,8 +132,8 @@ GLOBAL_IEEE754_ENTRY(hypotf) {.mfi nop.m 0 // if possible overflow, copy f8 to f14 - // set Denormal, if necessary - // (p8) + // set Denormal, if necessary + // (p8) fma.s.s0 f14=f8,f1,f0 nop.i 0;; } @@ -211,11 +211,11 @@ GLOBAL_IEEE754_ENTRY(hypotf) { .mfi nop.m 0 -// Identify Natvals, Infs, NaNs, and Zeros +// Identify Natvals, Infs, NaNs, and Zeros // and return result fclass.m.unc p7, p0 = f12, 0x1E7 nop.i 0 -} +} {.mfi nop.m 0 // z0=frsqrta(a) @@ -243,7 +243,7 @@ GLOBAL_IEEE754_ENTRY(hypotf) // H0=0.5*z0 (p6) fma.s1 f10=f8,f7,f0 nop.i 0;; -} +} {.mfi @@ -287,7 +287,7 @@ GLOBAL_IEEE754_ENTRY(hypotf) {.mfi - // Is x^2 + y^2 well less than the overflow + // Is x^2 + y^2 well less than the overflow // threshold? (p6) cmp.lt.unc p7, p8 = r3,r2 // P=P01+d2*P23 @@ -304,8 +304,8 @@ GLOBAL_IEEE754_ENTRY(hypotf) } { .mfi - nop.m 0 -(p8) fsetc.s2 0x7F,0x42 + nop.m 0 +(p8) fsetc.s2 0x7F,0x42 // Possible overflow path, must detect by // Setting widest range exponent with prevailing // rounding mode. @@ -327,7 +327,7 @@ GLOBAL_IEEE754_ENTRY(hypotf) nop.i 0 ;; } { .mfi - nop.m 0 + nop.m 0 (p8) fcmp.lt.unc.s1 p9, p10 = f12, f11 nop.i 0 ;; } @@ -335,7 +335,7 @@ GLOBAL_IEEE754_ENTRY(hypotf) nop.m 0 mov GR_Parameter_TAG = 47 // No overflow -(p9) br.ret.sptk b0;; +(p9) br.ret.sptk b0;; } GLOBAL_IEEE754_END(hypotf) @@ -343,7 +343,7 @@ LOCAL_LIBM_ENTRY(__libm_error_region) .prologue { .mii add GR_Parameter_Y=-32,sp // Parameter 2 value - mov GR_Parameter_TAG = 47 + mov GR_Parameter_TAG = 47 .save ar.pfs,GR_SAVE_PFS mov GR_SAVE_PFS=ar.pfs // Save ar.pfs } @@ -382,10 +382,10 @@ LOCAL_LIBM_ENTRY(__libm_error_region) mov b0 = GR_SAVE_B0 // Restore return address };; { .mib - mov gp = GR_SAVE_GP // Restore gp + mov gp = GR_SAVE_GP // Restore gp mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs br.ret.sptk b0 // Return -};; +};; LOCAL_LIBM_END(__libm_error_region) diff --git a/sysdeps/ia64/fpu/e_hypotl.S b/sysdeps/ia64/fpu/e_hypotl.S index 988b86e761..a1716fd16a 100644 --- a/sysdeps/ia64/fpu/e_hypotl.S +++ b/sysdeps/ia64/fpu/e_hypotl.S @@ -21,25 +21,25 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // //********************************************************************* // -// History: +// History: // 02/02/00 hand-optimized // 04/04/00 Unwind support added // 06/20/00 new version @@ -112,7 +112,7 @@ GLOBAL_IEEE754_ENTRY(hypotl) // Compute x*x fma.s1 f10=f8,f8,f0 // r2=bias-1 - mov r2=0xfffe + mov r2=0xfffe } {.mfi nop.m 0 @@ -131,8 +131,8 @@ GLOBAL_IEEE754_ENTRY(hypotl) {.mfi nop.m 0 // if possible overflow, copy f8 to f32 - // set Denormal, if necessary - // (p8) + // set Denormal, if necessary + // (p8) fma.s0 f32=f8,f1,f0 nop.i 0;; } @@ -233,11 +233,11 @@ GLOBAL_IEEE754_ENTRY(hypotl) } { .mfi nop.m 0 -// Identify Natvals, Infs, NaNs, and Zeros +// Identify Natvals, Infs, NaNs, and Zeros // and return result fclass.m.unc p7, p0 = f12, 0x1E7 nop.i 0 -} +} {.mfi // get exponent of x^2+y^2 getf.exp r3=f12 @@ -271,7 +271,7 @@ GLOBAL_IEEE754_ENTRY(hypotl) // H0=0.5*z0 (p6) fma.s1 f15=f8,f7,f0 nop.i 0;; -} +} {.mfb nop.m 0 @@ -364,7 +364,7 @@ GLOBAL_IEEE754_ENTRY(hypotl) nop.i 0 } {.mfi - // Is x^2 + y^2 well less than the overflow + // Is x^2 + y^2 well less than the overflow // threshold? (p6) cmp.lt.unc p7, p8 = r3,r2 // c=dxy+da @@ -388,8 +388,8 @@ GLOBAL_IEEE754_ENTRY(hypotl) } { .mfi - nop.m 0 -(p8) fsetc.s2 0x7F,0x42 + nop.m 0 +(p8) fsetc.s2 0x7F,0x42 // Possible overflow path, must detect by // Setting widest range exponent with prevailing // rounding mode. @@ -411,7 +411,7 @@ GLOBAL_IEEE754_ENTRY(hypotl) nop.i 0 ;; } { .mfi - nop.m 0 + nop.m 0 (p8) fcmp.lt.unc.s1 p9, p10 = f12, f11 nop.i 0 ;; } @@ -419,7 +419,7 @@ GLOBAL_IEEE754_ENTRY(hypotl) nop.m 0 mov GR_Parameter_TAG = 45; // No overflow -(p9) br.ret.sptk b0;; +(p9) br.ret.sptk b0;; } GLOBAL_IEEE754_END(hypotl) diff --git a/sysdeps/ia64/fpu/e_log.S b/sysdeps/ia64/fpu/e_log.S index c644c6f8f7..3c5ebc2f07 100644 --- a/sysdeps/ia64/fpu/e_log.S +++ b/sysdeps/ia64/fpu/e_log.S @@ -1425,11 +1425,11 @@ log_log10_common: fnorm.s1 FR_NormX = f8 mov GR_bias = 0xffff };; - + { .mfi setf.d FR_A3 = GR_A3 // create A3 fcmp.eq.s1 p12,p0 = f1,f8 // is x equal to 1.0? - dep.z GR_xorg = GR_xorg, 44, 19 // 0x3fefe00000000000 + dep.z GR_xorg = GR_xorg, 44, 19 // 0x3fefe00000000000 // double precision memory // representation of 255/256 } @@ -1519,7 +1519,7 @@ log_core: { .mfi (p6) getf.exp GR_rexp = FR_r // Get signexp of x-1 (p7) fcvt.xf FR_N = FR_N -(p8) cmp.eq p9,p6 = r0,r0 // Also set p9 and clear p6 if log10 +(p8) cmp.eq p9,p6 = r0,r0 // Also set p9 and clear p6 if log10 // and arg near 1 };; diff --git a/sysdeps/ia64/fpu/e_log2.S b/sysdeps/ia64/fpu/e_log2.S index 660a9526b6..0edf8adf2f 100644 --- a/sysdeps/ia64/fpu/e_log2.S +++ b/sysdeps/ia64/fpu/e_log2.S @@ -21,25 +21,25 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // // History //================================================================= -// 09/11/00 Initial version +// 09/11/00 Initial version // 03/19/01 Added one polynomial coefficient, to improve accuracy // 05/20/02 Cleaned up namespace and sf0 syntax // 02/10/03 Reordered header: .section, .global, .proc, .align @@ -60,19 +60,19 @@ // j=0 if f<128; j=1 if f>=128 // T is a table that stores log2(1/y) (in entries 1..255) rounded to // double extended precision; f is used as an index; T[255]=0 -// +// // If f=0 and b9=0, r is set to 2^{-8}* 0.b9 b10 ... b52 = m-1 (fractional part of m), -// and 0 is used instead of T[0] +// and 0 is used instead of T[0] // (polynomial evaluation only, for m=1+r, 0<=r<2^{-9}) // If f=255, r is set to (m-2)/2 (T[255]=0, and only polynomial evaluation is used // for m=2(1-r'), 0<=r'<2^{-9}) // // log2(x) is approximated as // (l-j) + T[f] + (c1*r+c2*r^2+...+c7*r^7), if f>0 -// +// -// Special values +// Special values //================================================================= // log2(0)=-inf, raises Divide by Zero // log2(+inf)=inf @@ -90,7 +90,7 @@ GR_SAVE_B0 = r33 GR_SAVE_PFS = r34 -GR_SAVE_GP = r35 // This reg. can safely be used +GR_SAVE_GP = r35 // This reg. can safely be used GR_SAVE_SP = r36 GR_Parameter_X = r37 @@ -388,15 +388,15 @@ LOCAL_OBJECT_END(T_table) GLOBAL_LIBM_ENTRY(log2) { .mfi - alloc r32=ar.pfs,1,4,4,0 - // y=frcpa(x) + alloc r32=ar.pfs,1,4,4,0 + // y=frcpa(x) frcpa.s1 f6,p0=f1,f8 - // will form significand of 1.5 (to test whether the index is 128 or above) + // will form significand of 1.5 (to test whether the index is 128 or above) mov r24=0xc } {.mfi nop.m 0 - // normalize x + // normalize x fma.s1 f7=f8,f1,f0 // r2 = pointer to C_1...C_6 followed by T_table addl r2 = @ltoff(poly_coeffs), gp;; @@ -406,7 +406,7 @@ GLOBAL_LIBM_ENTRY(log2) getf.sig r25=f8 // f8 denormal ? fclass.m p8,p10=f8,0x9 - // will form significand of 1.5 (to test whether the index is 128 or above) + // will form significand of 1.5 (to test whether the index is 128 or above) shl r24=r24,60 } {.mfi @@ -420,7 +420,7 @@ GLOBAL_LIBM_ENTRY(log2) getf.exp r29=f8 // load start address for C_1...C_6 followed by T_table ld8 r2=[r2] - // will continue only for positive normal/denormal numbers + // will continue only for positive normal/denormal numbers fclass.nm.unc p12,p7 = f8, 0x19 ;; } @@ -465,7 +465,7 @@ GLOBAL_LIBM_ENTRY(log2) {.mmi // load C_6, C_7 ldfpd f12,f13=[r2],16 - // r27=bias-1 (if index >=128, will add exponent+1) + // r27=bias-1 (if index >=128, will add exponent+1) (p12) mov r27=0xfffe (p8) shr.u r28=r25,63-8;; } @@ -513,7 +513,7 @@ GLOBAL_LIBM_ENTRY(log2) {.mmf // load T (unless first 9 bits after leading 1 are 0) (p12) ldfe f33=[r2] - // f8=expon - bias + // f8=expon - bias setf.sig f8=r29 // set T=0 (if first 9 bits after leading 1 are 0) (p8) fma.s1 f33=f0,f0,f0;; @@ -602,7 +602,7 @@ GLOBAL_LIBM_ENTRY(log2) SPECIAL_LOG2: -{.mfi +{.mfi nop.m 0 // x=+Infinity ? fclass.m p7,p0=f8,0x21 @@ -627,7 +627,7 @@ SPECIAL_LOG2: (p7) br.ret.spnt b0;; } {.mfi - (p8) mov GR_Parameter_TAG = 170 + (p8) mov GR_Parameter_TAG = 170 // log2(+/-0)=-infinity, raises Divide by Zero // set f8=-0 (p8) fmerge.ns f8=f0,f8 @@ -639,12 +639,12 @@ SPECIAL_LOG2: (p8) br.cond.sptk __libm_error_region;; } {.mfb - (p6) mov GR_Parameter_TAG = 171 + (p6) mov GR_Parameter_TAG = 171 // x<0: return NaN, raise Invalid (p6) frcpa.s0 f8,p0=f0,f0 (p6) br.cond.sptk __libm_error_region;; -} - +} + {.mfb nop.m 0 @@ -662,10 +662,10 @@ LOCAL_LIBM_ENTRY(__libm_error_region) add GR_Parameter_Y=-32,sp // Parameter 2 value nop.f 0 .save ar.pfs,GR_SAVE_PFS - mov GR_SAVE_PFS=ar.pfs // Save ar.pfs + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs } { .mfi -.fframe 64 +.fframe 64 add sp=-64,sp // Create new stack nop.f 0 mov GR_SAVE_GP=gp // Save gp @@ -673,18 +673,18 @@ LOCAL_LIBM_ENTRY(__libm_error_region) { .mmi stfd [GR_Parameter_Y] = FR_Y,16 // STORE Parameter 2 on stack add GR_Parameter_X = 16,sp // Parameter 1 address -.save b0, GR_SAVE_B0 - mov GR_SAVE_B0=b0 // Save b0 +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 };; .body { .mib - stfd [GR_Parameter_X] = FR_X // STORE Parameter 1 on stack - add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address - nop.b 0 + stfd [GR_Parameter_X] = FR_X // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 } { .mib stfd [GR_Parameter_Y] = FR_RESULT // STORE Parameter 3 on stack - add GR_Parameter_Y = -16,GR_Parameter_Y + add GR_Parameter_Y = -16,GR_Parameter_Y br.call.sptk b0=__libm_error_support# // Call error handling function };; { .mmi @@ -699,10 +699,10 @@ LOCAL_LIBM_ENTRY(__libm_error_region) mov b0 = GR_SAVE_B0 // Restore return address };; { .mib - mov gp = GR_SAVE_GP // Restore gp + mov gp = GR_SAVE_GP // Restore gp mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs br.ret.sptk b0 // Return -};; +};; LOCAL_LIBM_END(__libm_error_region) .type __libm_error_support#,@function diff --git a/sysdeps/ia64/fpu/e_log2f.S b/sysdeps/ia64/fpu/e_log2f.S index 17d710a951..cb25fb0d93 100644 --- a/sysdeps/ia64/fpu/e_log2f.S +++ b/sysdeps/ia64/fpu/e_log2f.S @@ -21,25 +21,25 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // // History //============================================================== -// 09/11/00 Initial version +// 09/11/00 Initial version // 05/20/02 Cleaned up namespace and sf0 syntax // 02/10/03 Reordered header: .section, .global, .proc, .align // @@ -58,19 +58,19 @@ // j=0 if f<128; j=1 if f>=128 // T is a table that stores log2(1/y) (in entries 1..255) rounded to // double extended precision; f is used as an index; T[255]=0 -// +// // If f=0 and b9=0, r is set to 2^{-8}* 0.b9 b10 ... b52 = m-1 (fractional part of m), -// and 0 is used instead of T[0] +// and 0 is used instead of T[0] // (polynomial evaluation only, for m=1+r, 0<=r<2^{-9}) // If f=255, r is set to (m-2)/2 (T[255]=0, and only polynomial evaluation is used // for m=2(1-r'), 0<=r'<2^{-9}) // // log2f(x) is approximated as // (l-j) + T[f] + (c1*r+c2*r^2+...+c6*r^6), if f>0 -// +// -// Special values +// Special values //============================================================== // log2f(0)=-inf, raises Divide by Zero // log2f(+inf)=inf @@ -88,7 +88,7 @@ GR_SAVE_B0 = r33 GR_SAVE_PFS = r34 -GR_SAVE_GP = r35 // This reg. can safely be used +GR_SAVE_GP = r35 // This reg. can safely be used GR_SAVE_SP = r36 GR_Parameter_X = r37 @@ -255,15 +255,15 @@ LOCAL_OBJECT_END(T_table) GLOBAL_LIBM_ENTRY(log2f) { .mfi - alloc r32=ar.pfs,1,4,4,0 - // y=frcpa(x) + alloc r32=ar.pfs,1,4,4,0 + // y=frcpa(x) frcpa.s1 f6,p0=f1,f8 - // will form significand of 1.5 (to test whether the index is 128 or above) + // will form significand of 1.5 (to test whether the index is 128 or above) mov r24=0xc } {.mfi nop.m 0 - // normalize x + // normalize x fma.s1 f7=f8,f1,f0 // r2 = pointer to C_1...C_6 followed by T_table addl r2 = @ltoff(poly_coeffs), gp;; @@ -273,7 +273,7 @@ GLOBAL_LIBM_ENTRY(log2f) getf.sig r25=f8 // f8 denormal ? fclass.m p8,p10=f8,0x9 - // will form significand of 1.5 (to test whether the index is 128 or above) + // will form significand of 1.5 (to test whether the index is 128 or above) shl r24=r24,60 } {.mfi @@ -287,7 +287,7 @@ GLOBAL_LIBM_ENTRY(log2f) getf.exp r29=f8 // load start address for C_1...C_6 followed by T_table ld8 r2=[r2] - // will continue only for positive normal/denormal numbers + // will continue only for positive normal/denormal numbers fclass.nm.unc p12,p7 = f8, 0x19 ;; } @@ -331,7 +331,7 @@ GLOBAL_LIBM_ENTRY(log2f) // load C_3, C_4 ldfpd f10,f11=[r2],16 nop.f 0 - // r27=bias-1 (if index >=128, will add exponent+1) + // r27=bias-1 (if index >=128, will add exponent+1) (p12) mov r27=0xfffe;; } @@ -360,7 +360,7 @@ GLOBAL_LIBM_ENTRY(log2f) cmp.ltu p8,p12=r25,r26;; } {.mfi - // f8=expon - bias + // f8=expon - bias setf.sig f8=r29 nop.f 0 // get T address @@ -440,7 +440,7 @@ GLOBAL_LIBM_ENTRY(log2f) SPECIAL_log2f: -{.mfi +{.mfi nop.m 0 // x=+Infinity ? fclass.m p7,p0=f8,0x21 @@ -465,7 +465,7 @@ SPECIAL_log2f: (p7) br.ret.spnt b0;; } {.mfi - (p8) mov GR_Parameter_TAG = 172 + (p8) mov GR_Parameter_TAG = 172 // log2f(+/-0)=-infinity, raises Divide by Zero // set f8=-0 (p8) fmerge.ns f8=f0,f8 @@ -477,12 +477,12 @@ SPECIAL_log2f: (p8) br.cond.sptk __libm_error_region;; } {.mfb - (p6) mov GR_Parameter_TAG = 173 + (p6) mov GR_Parameter_TAG = 173 // x<0: return NaN, raise Invalid (p6) frcpa.s0 f8,p0=f0,f0 (p6) br.cond.sptk __libm_error_region;; -} - +} + {.mfb nop.m 0 @@ -500,10 +500,10 @@ LOCAL_LIBM_ENTRY(__libm_error_region) add GR_Parameter_Y=-32,sp // Parameter 2 value nop.f 0 .save ar.pfs,GR_SAVE_PFS - mov GR_SAVE_PFS=ar.pfs // Save ar.pfs + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs } { .mfi -.fframe 64 +.fframe 64 add sp=-64,sp // Create new stack nop.f 0 mov GR_SAVE_GP=gp // Save gp @@ -511,18 +511,18 @@ LOCAL_LIBM_ENTRY(__libm_error_region) { .mmi stfs [GR_Parameter_Y] = FR_Y,16 // STORE Parameter 2 on stack add GR_Parameter_X = 16,sp // Parameter 1 address -.save b0, GR_SAVE_B0 - mov GR_SAVE_B0=b0 // Save b0 +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 };; .body { .mib - stfs [GR_Parameter_X] = FR_X // STORE Parameter 1 on stack - add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address - nop.b 0 + stfs [GR_Parameter_X] = FR_X // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 } { .mib stfs [GR_Parameter_Y] = FR_RESULT // STORE Parameter 3 on stack - add GR_Parameter_Y = -16,GR_Parameter_Y + add GR_Parameter_Y = -16,GR_Parameter_Y br.call.sptk b0=__libm_error_support# // Call error handling function };; { .mmi @@ -537,10 +537,10 @@ LOCAL_LIBM_ENTRY(__libm_error_region) mov b0 = GR_SAVE_B0 // Restore return address };; { .mib - mov gp = GR_SAVE_GP // Restore gp + mov gp = GR_SAVE_GP // Restore gp mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs br.ret.sptk b0 // Return -};; +};; LOCAL_LIBM_END(__libm_error_region) .type __libm_error_support#,@function diff --git a/sysdeps/ia64/fpu/e_log2l.S b/sysdeps/ia64/fpu/e_log2l.S index b3fe63f182..837c55d294 100644 --- a/sysdeps/ia64/fpu/e_log2l.S +++ b/sysdeps/ia64/fpu/e_log2l.S @@ -21,27 +21,27 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // // History //============================================================== -// 09/25/00 Initial version +// 09/25/00 Initial version // 11/22/00 Fixed accuracy bug (for mantissas near 1, 2) -// 12/07/00 Fixed C_1l constant, eliminated rounding errors in +// 12/07/00 Fixed C_1l constant, eliminated rounding errors in // reduced argument (x*frcpa(x)-1) // 05/20/02 Cleaned up namespace and sf0 syntax // 02/10/03 Reordered header: .section, .global, .proc, .align @@ -57,16 +57,16 @@ // Implementation // // Let x = 2^l * m, where m=1.b1 b2 ... b8 b9 ... b52 -// y=frcpa(m), r=m*y-1, f=b1 b2 .. b8 -// T_hi is a table that stores the 24 most significant bits of log2(1/y) +// y=frcpa(m), r=m*y-1, f=b1 b2 .. b8 +// T_hi is a table that stores the 24 most significant bits of log2(1/y) // (in entries 1..255) in single precision format // T_low is a table that stores (log2(1/y)-T_high), rounded to double -// precision +// precision // // f is used as an index; T_high[255]=T_low[255]=0 -// +// // If f=0 and b9=0, r is set to 2^{-8}* 0.b9 b10 ... b52 = m-1 (fractional part of m), -// and 0 is used instead of T_high[0], T_low[0] +// and 0 is used instead of T_high[0], T_low[0] // (polynomial evaluation only, for m=1+r, 0<=r<2^{-9}) // If f=255, r is set to (m-2)/2 (T[255]=0, and only polynomial evaluation is used // for m=2(1-r'), 0<=r'<2^{-9}) @@ -80,10 +80,10 @@ // // log2l(x) is approximated as // (l+T_high[f]+C1r) + (D+r*(c1+c2*r+c3*r^2...+c8*r^7)+(T_low[f]+C_1*E)) -// +// -// Special values +// Special values //============================================================== // log2l(0)=-inf, raises Divide by Zero // log2l(+inf)=inf @@ -101,7 +101,7 @@ GR_SAVE_B0 = r33 GR_SAVE_PFS = r34 -GR_SAVE_GP = r35 // This reg. can safely be used +GR_SAVE_GP = r35 // This reg. can safely be used GR_SAVE_SP = r36 GR_Parameter_X = r37 @@ -127,7 +127,7 @@ LOCAL_OBJECT_START(poly_coeffs) data8 0xb8aa3b295c17f0bc, 0x00003fff // C_1 data8 0x3fca61762a7aded9, 0xbfc71547652b82fe // C_7, C_8 -data8 0x3fd2776c50ef9bfe, 0xbfcec709dc3a03fd // C_5, C_6 +data8 0x3fd2776c50ef9bfe, 0xbfcec709dc3a03fd // C_5, C_6 data8 0x3fdec709dc3a03fd, 0xbfd71547652b82fe // C_3, C_4 //data8 0xd871319ff0342580, 0x0000bfbd // C_1l (low part of C1) data8 0x82f0025f2dc582ee, 0x0000bfbe // C_1l (low part of C1) @@ -345,9 +345,9 @@ LOCAL_OBJECT_END(T_low) GLOBAL_IEEE754_ENTRY(log2l) { .mfi - alloc r32=ar.pfs,1,4,4,0 - // normalize x - // y=frcpa(x) + alloc r32=ar.pfs,1,4,4,0 + // normalize x + // y=frcpa(x) frcpa.s1 f41,p0=f1,f8 // r26=bias-1 mov r26=0xfffe @@ -378,8 +378,8 @@ GLOBAL_IEEE754_ENTRY(log2l) getf.exp r29=f8 // load start address for C_1...C_7 followed by T_table ld8 r2=[r2] - // will continue only for positive normal/unnormal numbers - fclass.m.unc p0,p12 = f8, 0x19;; + // will continue only for positive normal/unnormal numbers + fclass.m.unc p0,p12 = f8, 0x19;; } @@ -409,7 +409,7 @@ GLOBAL_IEEE754_ENTRY(log2l) } {.mfb - add r3=16,r2 + add r3=16,r2 // r=x*y-1 fms.s1 f6=f41,f8,f1 (p12) br.cond.spnt SPECIAL_log2l @@ -468,10 +468,10 @@ GLOBAL_IEEE754_ENTRY(log2l) // add 1 to the exponent additive term, and estimate log2(1-r) (p10) add r29=1,r29 nop.f 0 - (p7) br.cond.spnt LOG2_PSEUDO_ZERO + (p7) br.cond.spnt LOG2_PSEUDO_ZERO } {.mfi - // get T_low adress + // get T_low adress shladd r3=r28,3,r3 // if first 8 bits after leading 1 are all ones, use polynomial approx. only (p10) fms.s1 f6=f7,f36,f1 @@ -514,7 +514,7 @@ GLOBAL_IEEE754_ENTRY(log2l) .pred.rel "mutex",p8,p12 {.mfi - // f8=expon - bias + // f8=expon - bias setf.sig f8=r29 // general case: 2^{16}+C1*r (p12) fma.s1 f33=f6,f14,f32 @@ -687,7 +687,7 @@ SPECIAL_log2l: mov FR_X=f8 nop.i 0 } -{.mfi +{.mfi nop.m 0 // x=+Infinity ? fclass.m p7,p0=f8,0x21 @@ -712,7 +712,7 @@ SPECIAL_log2l: (p7) br.ret.spnt b0;; } {.mfi - (p8) mov GR_Parameter_TAG = 168 + (p8) mov GR_Parameter_TAG = 168 // log2l(+/-0)=-infinity, raises Divide by Zero // set f8=-0 (p8) fmerge.ns f8=f0,f8 @@ -724,12 +724,12 @@ SPECIAL_log2l: (p8) br.cond.sptk __libm_error_region;; } {.mfb - (p6) mov GR_Parameter_TAG = 169 + (p6) mov GR_Parameter_TAG = 169 // x<0: return NaN, raise Invalid (p6) frcpa.s0 f8,p0=f0,f0 (p6) br.cond.sptk __libm_error_region;; -} - +} + {.mfb nop.m 0 @@ -746,7 +746,7 @@ LOG2_PSEUDO_ZERO: nop.i 0 } {.mfi - mov GR_Parameter_TAG = 168 + mov GR_Parameter_TAG = 168 // log2l(+/-0)=-infinity, raises Divide by Zero // set f8=-0 fmerge.ns f8=f0,f8 @@ -768,10 +768,10 @@ LOCAL_LIBM_ENTRY(__libm_error_region) add GR_Parameter_Y=-32,sp // Parameter 2 value nop.f 0 .save ar.pfs,GR_SAVE_PFS - mov GR_SAVE_PFS=ar.pfs // Save ar.pfs + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs } { .mfi -.fframe 64 +.fframe 64 add sp=-64,sp // Create new stack nop.f 0 mov GR_SAVE_GP=gp // Save gp @@ -779,18 +779,18 @@ LOCAL_LIBM_ENTRY(__libm_error_region) { .mmi stfe [GR_Parameter_Y] = FR_Y,16 // STORE Parameter 2 on stack add GR_Parameter_X = 16,sp // Parameter 1 address -.save b0, GR_SAVE_B0 - mov GR_SAVE_B0=b0 // Save b0 +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 };; .body { .mib - stfe [GR_Parameter_X] = FR_X // STORE Parameter 1 on stack - add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address - nop.b 0 + stfe [GR_Parameter_X] = FR_X // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 } { .mib stfe [GR_Parameter_Y] = FR_RESULT // STORE Parameter 3 on stack - add GR_Parameter_Y = -16,GR_Parameter_Y + add GR_Parameter_Y = -16,GR_Parameter_Y br.call.sptk b0=__libm_error_support# // Call error handling function };; { .mmi @@ -805,10 +805,10 @@ LOCAL_LIBM_ENTRY(__libm_error_region) mov b0 = GR_SAVE_B0 // Restore return address };; { .mib - mov gp = GR_SAVE_GP // Restore gp + mov gp = GR_SAVE_GP // Restore gp mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs br.ret.sptk b0 // Return -};; +};; LOCAL_LIBM_END(__libm_error_region) .type __libm_error_support#,@function diff --git a/sysdeps/ia64/fpu/e_logl.S b/sysdeps/ia64/fpu/e_logl.S index 3ebb20a632..e12c65d51e 100644 --- a/sysdeps/ia64/fpu/e_logl.S +++ b/sysdeps/ia64/fpu/e_logl.S @@ -1,4 +1,4 @@ -.file "logl.s" +.file "logl.s" // Copyright (c) 2000 - 2003, Intel Corporation @@ -21,26 +21,26 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // //********************************************************************* // -// History: -// 05/21/01 Extracted logl and log10l from log1pl.s file, and optimized +// History: +// 05/21/01 Extracted logl and log10l from log1pl.s file, and optimized // all paths. // 06/20/01 Fixed error tag for x=-inf. // 05/20/02 Cleaned up namespace and sf0 syntax @@ -74,20 +74,20 @@ // IEEE Special Conditions: // // Denormal fault raised on denormal inputs -// Overflow exceptions cannot occur -// Underflow exceptions raised when appropriate for log1p +// Overflow exceptions cannot occur +// Underflow exceptions raised when appropriate for log1p // (Error Handling Routine called for underflow) // Inexact raised when appropriate by algorithm // // logl(inf) = inf -// logl(-inf) = QNaN -// logl(+/-0) = -inf +// logl(-inf) = QNaN +// logl(+/-0) = -inf // logl(SNaN) = QNaN // logl(QNaN) = QNaN // logl(EM_special Values) = QNaN // log10l(inf) = inf -// log10l(-inf) = QNaN -// log10l(+/-0) = -inf +// log10l(-inf) = QNaN +// log10l(+/-0) = -inf // log10l(SNaN) = QNaN // log10l(QNaN) = QNaN // log10l(EM_special Values) = QNaN @@ -106,11 +106,11 @@ // logl( 1 + X ) can be approximated by a simple polynomial // in W = X-1. This polynomial resembles the truncated Taylor // series W - W^/2 + W^3/3 - ... -// +// // Case log_regular: // // Here we use a table lookup method. The basic idea is that in -// order to compute logl(Arg) for an argument Arg in [1,2), we +// order to compute logl(Arg) for an argument Arg in [1,2), we // construct a value G such that G*Arg is close to 1 and that // logl(1/G) is obtainable easily from a table of values calculated // beforehand. Thus @@ -128,7 +128,7 @@ // // X = 2^N * S_hi exactly // -// where S_hi in [1,2) +// where S_hi in [1,2) // // Step 1: Argument Reduction // @@ -137,7 +137,7 @@ // G := G_1 * G_2 * G_3 // r := (G * S_hi - 1) // -// These G_j's have the property that the product is exactly +// These G_j's have the property that the product is exactly // representable and that |r| < 2^(-12) as a result. // // Step 2: Approximation @@ -160,7 +160,7 @@ // // Here we compute a simple polynomial. To exploit parallelism, we split // the polynomial into two portions. -// +// // W := X - 1 // Wsq := W * W // W4 := Wsq*Wsq @@ -175,7 +175,7 @@ // Step 0. Initialization // ---------------------- // -// Z := X +// Z := X // N := unbaised exponent of Z // S_hi := 2^(-N) * Z // @@ -216,7 +216,7 @@ // with 1.0000 in fixed point. // // -// Define A_2 := 1.0 0 0 0 d_5 d_6 d_7 d_8. This is X_1 +// Define A_2 := 1.0 0 0 0 d_5 d_6 d_7 d_8. This is X_1 // truncated to lsb = 2^(-8). Similar to A_1, // A_2 is not needed in actual implementation. It // helps explain how some of the values are defined. @@ -245,13 +245,13 @@ // Fetch G_3 := (1/A_3) truncated to 21 sig. bits. // floating pt. Fetch is done using index_3. // -// Compute G := G_1 * G_2 * G_3. +// Compute G := G_1 * G_2 * G_3. // // This is done exactly since each of G_j only has 21 sig. bits. // -// Compute +// Compute // -// r := (G*S_hi - 1) +// r := (G*S_hi - 1) // // // Step 2. Approximation @@ -285,7 +285,7 @@ // Finally // // Y_hi := N*log2_hi + SUM ( log1byGj_hi ) -// Y_lo := poly_hi + [ poly_lo + +// Y_lo := poly_hi + [ poly_lo + // ( SUM ( log1byGj_lo ) + N*log2_lo ) ] // @@ -294,7 +294,7 @@ RODATA // ************* DO NOT CHANGE THE ORDER OF THESE TABLES ************* -// P_8, P_7, P_6, P_5, P_4, P_3, P_2, and P_1 +// P_8, P_7, P_6, P_5, P_4, P_3, P_2, and P_1 LOCAL_OBJECT_START(Constants_P) data8 0xE3936754EFD62B15,0x00003FFB @@ -307,7 +307,7 @@ data8 0xAAAAAAAAAAAAAAAA,0x00003FFD data8 0xFFFFFFFFFFFFFFFE,0x0000BFFD LOCAL_OBJECT_END(Constants_P) -// log2_hi, log2_lo, Q_4, Q_3, Q_2, and Q_1 +// log2_hi, log2_lo, Q_4, Q_3, Q_2, and Q_1 LOCAL_OBJECT_START(Constants_Q) data8 0xB172180000000000,0x00003FFE @@ -327,7 +327,7 @@ LOCAL_OBJECT_END(Constants_1_by_LN10) // Z1 - 16 bit fixed - + LOCAL_OBJECT_START(Constants_Z_1) data4 0x00008000 data4 0x00007879 @@ -442,7 +442,7 @@ data4 0x3F71D488,0x3D693B9D data8 0xBE049391B6B7C239 LOCAL_OBJECT_END(Constants_G_H_h2) -// G3 and H3 - IEEE single and h3 - IEEE double +// G3 and H3 - IEEE single and h3 - IEEE double LOCAL_OBJECT_START(Constants_G_H_h3) data4 0x3F7FFC00,0x38800100 @@ -514,64 +514,64 @@ LOCAL_OBJECT_END(Constants_G_H_h3) // Floating Point Registers -FR_Input_X = f8 +FR_Input_X = f8 -FR_Y_hi = f34 +FR_Y_hi = f34 FR_Y_lo = f35 FR_Scale = f36 -FR_X_Prime = f37 -FR_S_hi = f38 +FR_X_Prime = f37 +FR_S_hi = f38 FR_W = f39 FR_G = f40 FR_H = f41 -FR_wsq = f42 +FR_wsq = f42 FR_w4 = f43 FR_h = f44 -FR_w6 = f45 +FR_w6 = f45 FR_G2 = f46 FR_H2 = f47 FR_poly_lo = f48 -FR_P8 = f49 +FR_P8 = f49 FR_poly_hi = f50 -FR_P7 = f51 -FR_h2 = f52 -FR_rsq = f53 +FR_P7 = f51 +FR_h2 = f52 +FR_rsq = f53 FR_P6 = f54 -FR_r = f55 - -FR_log2_hi = f56 -FR_log2_lo = f57 -FR_p87 = f58 -FR_p876 = f58 -FR_p8765 = f58 -FR_float_N = f59 -FR_Q4 = f60 - -FR_p43 = f61 -FR_p432 = f61 -FR_p4321 = f61 -FR_P4 = f62 -FR_G3 = f63 -FR_H3 = f64 -FR_h3 = f65 - -FR_Q3 = f66 -FR_P3 = f67 -FR_Q2 = f68 -FR_P2 = f69 -FR_1LN10_hi = f70 - -FR_Q1 = f71 -FR_P1 = f72 -FR_1LN10_lo = f73 -FR_P5 = f74 -FR_rcub = f75 - -FR_Output_X_tmp = f76 +FR_r = f55 + +FR_log2_hi = f56 +FR_log2_lo = f57 +FR_p87 = f58 +FR_p876 = f58 +FR_p8765 = f58 +FR_float_N = f59 +FR_Q4 = f60 + +FR_p43 = f61 +FR_p432 = f61 +FR_p4321 = f61 +FR_P4 = f62 +FR_G3 = f63 +FR_H3 = f64 +FR_h3 = f65 + +FR_Q3 = f66 +FR_P3 = f67 +FR_Q2 = f68 +FR_P2 = f69 +FR_1LN10_hi = f70 + +FR_Q1 = f71 +FR_P1 = f72 +FR_1LN10_lo = f73 +FR_P5 = f74 +FR_rcub = f75 + +FR_Output_X_tmp = f76 FR_X = f8 FR_Y = f0 @@ -581,22 +581,22 @@ FR_RESULT = f76 // General Purpose Registers GR_ad_p = r33 -GR_Index1 = r34 -GR_Index2 = r35 -GR_signif = r36 -GR_X_0 = r37 -GR_X_1 = r38 -GR_X_2 = r39 -GR_Z_1 = r40 -GR_Z_2 = r41 -GR_N = r42 -GR_Bias = r43 -GR_M = r44 -GR_Index3 = r45 +GR_Index1 = r34 +GR_Index2 = r35 +GR_signif = r36 +GR_X_0 = r37 +GR_X_1 = r38 +GR_X_2 = r39 +GR_Z_1 = r40 +GR_Z_2 = r41 +GR_N = r42 +GR_Bias = r43 +GR_M = r44 +GR_Index3 = r45 GR_ad_p2 = r46 -GR_exp_mask = r47 -GR_exp_2tom7 = r48 -GR_ad_ln10 = r49 +GR_exp_mask = r47 +GR_exp_2tom7 = r48 +GR_ad_ln10 = r49 GR_ad_tbl_1 = r50 GR_ad_tbl_2 = r51 GR_ad_tbl_3 = r52 @@ -650,7 +650,7 @@ GLOBAL_IEEE754_ENTRY(log10l) // Common code for logl and log10 -LOGL_BEGIN: +LOGL_BEGIN: { .mfi ld8 GR_ad_z_1 = [GR_ad_z_1] // Get pointer to Constants_Z_1 fclass.m p10, p0 = FR_Input_X, 0x0b // Test for denormal @@ -741,7 +741,7 @@ LOGL_64_COMMON: { .mmi ldfe FR_log2_lo = [GR_ad_q],16 // Load log2_lo (p14) ldfe FR_1LN10_hi = [GR_ad_ln10],16 // If log10l, load 1/ln10_hi - sub GR_N = GR_N, GR_Bias + sub GR_N = GR_N, GR_Bias } ;; @@ -762,7 +762,7 @@ LOGL_64_COMMON: { .mmi getf.exp GR_M = FR_W // Get signexp of w = x - 1 ldfe FR_Q2 = [GR_ad_q],16 // Load Q2 - extr.u GR_Index2 = GR_X_1, 6, 4 // Extract bits 6-9 of X_1 + extr.u GR_Index2 = GR_X_1, 6, 4 // Extract bits 6-9 of X_1 } ;; @@ -1007,7 +1007,7 @@ LOGL_64_COMMON: { .mfi nop.m 999 -(p9) fadd.s1 FR_Y_lo = FR_poly_hi, FR_poly_lo // Y_lo = poly_hi + poly_lo +(p9) fadd.s1 FR_Y_lo = FR_poly_hi, FR_poly_lo // Y_lo = poly_hi + poly_lo nop.i 999 } ;; @@ -1041,25 +1041,25 @@ LOGL_64_COMMON: // Here if x=+-0 -LOGL_64_zero: +LOGL_64_zero: // // If x=+-0 raise divide by zero and return -inf -// +// { .mfi (p7) mov GR_Parameter_TAG = 0 - fsub.s1 FR_Output_X_tmp = f0, f1 + fsub.s1 FR_Output_X_tmp = f0, f1 nop.i 999 } ;; { .mfb -(p14) mov GR_Parameter_TAG = 6 - frcpa.s0 FR_Output_X_tmp, p8 = FR_Output_X_tmp, f0 +(p14) mov GR_Parameter_TAG = 6 + frcpa.s0 FR_Output_X_tmp, p8 = FR_Output_X_tmp, f0 br.cond.sptk __libm_error_region } ;; -LOGL_64_special: +LOGL_64_special: { .mfi nop.m 999 fclass.m.unc p8, p0 = FR_Input_X, 0x1E1 // Test for natval, nan, +inf @@ -1067,21 +1067,21 @@ LOGL_64_special: } ;; -// +// // For SNaN raise invalid and return QNaN. // For QNaN raise invalid and return QNaN. // For +Inf return +Inf. -// +// { .mfb nop.m 999 -(p8) fmpy.s0 f8 = FR_Input_X, f1 +(p8) fmpy.s0 f8 = FR_Input_X, f1 (p8) br.ret.sptk b0 // Return for natval, nan, +inf } ;; -// +// // For -Inf raise invalid and return QNaN. -// +// { .mmi (p7) mov GR_Parameter_TAG = 1 nop.m 999 @@ -1091,7 +1091,7 @@ LOGL_64_special: { .mfb (p14) mov GR_Parameter_TAG = 7 - fmpy.s0 FR_Output_X_tmp = FR_Input_X, f0 + fmpy.s0 FR_Output_X_tmp = FR_Input_X, f0 br.cond.sptk __libm_error_region } ;; @@ -1112,23 +1112,23 @@ LOGL_64_denormal: } ;; -LOGL_64_unsupported: -// +LOGL_64_unsupported: +// // Return generated NaN or other value. -// +// { .mfb nop.m 999 - fmpy.s0 f8 = FR_Input_X, f0 + fmpy.s0 f8 = FR_Input_X, f0 br.ret.sptk b0 } ;; // Here if -inf < x < 0 -LOGL_64_negative: -// +LOGL_64_negative: +// // Deal with x < 0 in a special way - raise // invalid and produce QNaN indefinite. -// +// { .mfi (p7) mov GR_Parameter_TAG = 1 frcpa.s0 FR_Output_X_tmp, p8 = f0, f0 diff --git a/sysdeps/ia64/fpu/e_powf.S b/sysdeps/ia64/fpu/e_powf.S index 1406a94b65..5585f9df78 100644 --- a/sysdeps/ia64/fpu/e_powf.S +++ b/sysdeps/ia64/fpu/e_powf.S @@ -1471,7 +1471,7 @@ POW_POSSIBLE_UNDER: // 0.1...11 2^-3ffe (biased, 1) // largest dn smallest normal -// Form small constant (2^-170) to correct underflow result near region of +// Form small constant (2^-170) to correct underflow result near region of // smallest denormal in round-nearest. // Put in s2 (td set, ftz set) @@ -1482,9 +1482,9 @@ POW_POSSIBLE_UNDER: mov pow_GR_rcs0_mask = 0x0c00 // Set mask for rc.s0 } { .mfi -(p12) mov pow_GR_tmp = 0x2ffff - 170 +(p12) mov pow_GR_tmp = 0x2ffff - 170 nop.f 999 -(p13) mov pow_GR_tmp = 0x0ffff - 170 +(p13) mov pow_GR_tmp = 0x0ffff - 170 } ;; diff --git a/sysdeps/ia64/fpu/e_remainder.S b/sysdeps/ia64/fpu/e_remainder.S index f655567f52..d3bf707b38 100644 --- a/sysdeps/ia64/fpu/e_remainder.S +++ b/sysdeps/ia64/fpu/e_remainder.S @@ -51,12 +51,12 @@ // // API //==================================================================== -// double remainder(double,double); +// double remainder(double,double); // // Overview of operation //==================================================================== // remainder(a,b)=a-i*b, -// where i is an integer such that, if b!=0 and a is finite, +// where i is an integer such that, if b!=0 and a is finite, // |a/b-i|<=1/2. If |a/b-i|=1/2, i is even. // // Algorithm @@ -64,16 +64,16 @@ // a). eliminate special cases // b). if |a/b|<0.25 (first quotient estimate), return a // c). use single precision divide algorithm to get quotient q -// rounded to 24 bits of precision -// d). calculate partial remainders (using both q and q-ulp); -// select one and RZ(a/b) based on the sign of |a|-|b|*q +// rounded to 24 bits of precision +// d). calculate partial remainders (using both q and q-ulp); +// select one and RZ(a/b) based on the sign of |a|-|b|*q // e). if the exponent difference (exponent(a)-exponent(b)) -// is less than 24 (quotient estimate<2^{24}-2), use RZ(a/b) +// is less than 24 (quotient estimate<2^{24}-2), use RZ(a/b) // and sticky bits to round to integer; exit loop and // calculate final remainder // f). if exponent(a)-exponent(b)>=24, select new value of a as -// the partial remainder calculated using RZ(a/b); -// repeat from c). +// the partial remainder calculated using RZ(a/b); +// repeat from c). // // Special cases //==================================================================== @@ -88,7 +88,7 @@ GR_SAVE_B0 = r33 GR_SAVE_PFS = r34 -GR_SAVE_GP = r35 +GR_SAVE_GP = r35 GR_SAVE_SP = r36 GR_Parameter_X = r37 @@ -128,7 +128,7 @@ GLOBAL_IEEE754_ENTRY(remainder) // Y +-NAN, +-inf, +-0? p11 { .mfi setf.exp f32=r28 - fclass.m.unc p11,p0 = f9, 0xe7 + fclass.m.unc p11,p0 = f9, 0xe7 nop.i 999 } // qnan snan inf norm unorm 0 -+ @@ -137,8 +137,8 @@ GLOBAL_IEEE754_ENTRY(remainder) // X +-NAN, +-inf, ? p9 { .mfi nop.m 999 - fclass.m.unc p9,p0 = f8, 0xe3 - nop.i 999;; + fclass.m.unc p9,p0 = f8, 0xe3 + nop.i 999;; } {.mfi @@ -153,7 +153,7 @@ GLOBAL_IEEE754_ENTRY(remainder) // y0 = 1 / b in f10 frcpa.s1 f10,p6=f13,f14 nop.i 0;; -} +} {.bbb (p9) br.cond.spnt FREM_X_NAN_INF @@ -164,10 +164,10 @@ GLOBAL_IEEE754_ENTRY(remainder) // set D flag if a (f8) is denormal fnma.s0 f6=f8,f1,f8 nop.i 0;; -} +} -remloop24: +remloop24: { .mfi nop.m 0 // Step (2) @@ -184,7 +184,7 @@ remloop24: nop.m 0 // r2=1.25*2^{-24} movl r2=0x33a00000;; -} +} {.mfi nop.m 0 @@ -217,12 +217,12 @@ remloop24: // q2 = q1 + e1 * q1 in f6 (p6) fma.s1 f6=f7,f15,f15 nop.i 0;; -} +} {.mmi // f15=1.25*2^{-24} setf.s f15=r2 - // q<1/4 ? (i.e. expon< -2) + // q<1/4 ? (i.e. expon< -2) (p7) cmp.gt p7,p0=r28,r29 nop.i 0;; } @@ -230,7 +230,7 @@ remloop24: {.mfb // r29= -32+bias mov r29=0xffdf - // if |a/b|<1/4, set D flag before returning + // if |a/b|<1/4, set D flag before returning (p7) fma.d.s0 f9=f9,f0,f8 nop.b 0;; } @@ -248,7 +248,7 @@ remloop24: // set f8 to current a value | sign fmerge.s f8=f8,f13 nop.i 0;; -} +} {.mfi @@ -273,7 +273,7 @@ remloop24: nop.m 0 cmp.eq p11,p14=r2,r28 nop.i 0;; -} +} .pred.rel "mutex",p11,p14 {.mfi @@ -281,7 +281,7 @@ remloop24: // if exp_q=2^23, then r=a-b*2^{23} (p11) fnma.s1 f13=f12,f14,f13 nop.i 0 -} +} {.mfi nop.m 0 // r2=a-b*q' @@ -302,7 +302,7 @@ remloop24: .pred.rel "mutex",p8,p9 {.mfi - nop.m 0 + nop.m 0 // (p8) Q=q+(last iteration ? sticky bits:0) // i.e. Q=q+q*x (x=2^{-32} or 0) (p8) fma.s1 f11=f11,f7,f11 @@ -321,7 +321,7 @@ remloop24: // (p10) new a =r (p10) mov f13=f6 (p12) br.cond.sptk remloop24;; -} +} // last iteration {.mfi @@ -341,15 +341,15 @@ remloop24: // save sign of a fmerge.s f7=f8,f8 nop.i 0 -} {.mfi +} {.mfi nop.m 0 // normalize fcvt.xf f11=f11 nop.i 0;; -} +} {.mfi nop.m 0 - // This can be removed if sign of 0 is not important + // This can be removed if sign of 0 is not important // get remainder using sf1 fnma.d.s1 f12=f9,f11,f8 nop.i 0 @@ -363,24 +363,24 @@ remloop24: {.mfi nop.m 0 // f12=0? - // This can be removed if sign of 0 is not important + // This can be removed if sign of 0 is not important fcmp.eq.unc.s1 p8,p0=f12,f0 nop.i 0;; } {.mfb nop.m 0 // if f8=0, set sign correctly - // This can be removed if sign of 0 is not important + // This can be removed if sign of 0 is not important (p8) fmerge.s f8=f7,f8 // return br.ret.sptk b0;; } -FREM_X_NAN_INF: +FREM_X_NAN_INF: // Y zero ? -{.mfi +{.mfi nop.m 0 fma.s1 f10=f9,f1,f0 nop.i 0;; @@ -394,20 +394,20 @@ FREM_X_NAN_INF: nop.m 0 nop.i 0 // if Y zero - (p11) br.cond.spnt FREM_Y_ZERO;; + (p11) br.cond.spnt FREM_Y_ZERO;; } // X infinity? Return QNAN indefinite { .mfi nop.m 999 - fclass.m.unc p8,p0 = f8, 0x23 + fclass.m.unc p8,p0 = f8, 0x23 nop.i 999 } // X infinity? Return QNAN indefinite { .mfi nop.m 999 - fclass.m.unc p11,p0 = f8, 0x23 - nop.i 999;; + fclass.m.unc p11,p0 = f8, 0x23 + nop.i 999;; } // Y NaN ? {.mfi @@ -420,10 +420,10 @@ FREM_X_NAN_INF: // also set Denormal flag if necessary (p8) fma.s0 f9=f9,f1,f0 nop.i 0 -} +} { .mfi nop.m 999 -(p8) frcpa.s0 f8,p7 = f8,f8 +(p8) frcpa.s0 f8,p7 = f8,f8 nop.i 999 ;; } @@ -434,48 +434,48 @@ FREM_X_NAN_INF: } { .mfi nop.m 999 -(p8) fma.d.s0 f8=f8,f1,f0 - nop.i 0 ;; +(p8) fma.d.s0 f8=f8,f1,f0 + nop.i 0 ;; } { .mfb nop.m 999 - frcpa.s0 f8,p7=f8,f9 - (p11) br.cond.spnt EXP_ERROR_RETURN;; + frcpa.s0 f8,p7=f8,f9 + (p11) br.cond.spnt EXP_ERROR_RETURN;; } { .mib nop.m 0 nop.i 0 - br.ret.spnt b0 ;; + br.ret.spnt b0 ;; } -FREM_Y_NAN_INF_ZERO: +FREM_Y_NAN_INF_ZERO: // Y INF { .mfi nop.m 999 - fclass.m.unc p7,p0 = f9, 0x23 + fclass.m.unc p7,p0 = f9, 0x23 nop.i 999 ;; } { .mfb nop.m 999 -(p7) fma.d.s0 f8=f8,f1,f0 -(p7) br.ret.spnt b0 ;; +(p7) fma.d.s0 f8=f8,f1,f0 +(p7) br.ret.spnt b0 ;; } // Y NAN? { .mfi nop.m 999 - fclass.m.unc p9,p0 = f9, 0xc3 + fclass.m.unc p9,p0 = f9, 0xc3 nop.i 999 ;; } { .mfb nop.m 999 -(p9) fma.d.s0 f8=f9,f1,f0 -(p9) br.ret.spnt b0 ;; +(p9) fma.d.s0 f8=f9,f1,f0 +(p9) br.ret.spnt b0 ;; } FREM_Y_ZERO: @@ -486,12 +486,12 @@ FREM_Y_ZERO: // X NAN? { .mfi nop.m 999 - fclass.m.unc p9,p10 = f8, 0xc3 + fclass.m.unc p9,p10 = f8, 0xc3 nop.i 999 ;; } { .mfi nop.m 999 -(p10) fclass.nm p9,p10 = f8, 0xff +(p10) fclass.nm p9,p10 = f8, 0xff nop.i 999 ;; } @@ -503,29 +503,29 @@ FREM_Y_ZERO: { .mfi nop.m 999 -(p10) frcpa.s0 f11,p7 = f0,f0 - nop.i 999;; +(p10) frcpa.s0 f11,p7 = f0,f0 + nop.i 999;; } { .mfi nop.m 999 - fmerge.s f10 = f8, f8 + fmerge.s f10 = f8, f8 nop.i 999 } { .mfi nop.m 999 - fma.d.s0 f8=f11,f1,f0 + fma.d.s0 f8=f11,f1,f0 nop.i 999 } -EXP_ERROR_RETURN: +EXP_ERROR_RETURN: { .mib - mov GR_Parameter_TAG = 124 + mov GR_Parameter_TAG = 124 nop.i 999 - br.sptk __libm_error_region;; + br.sptk __libm_error_region;; } GLOBAL_IEEE754_END(remainder) @@ -538,10 +538,10 @@ LOCAL_LIBM_ENTRY(__libm_error_region) add GR_Parameter_Y=-32,sp // Parameter 2 value nop.f 0 .save ar.pfs,GR_SAVE_PFS - mov GR_SAVE_PFS=ar.pfs // Save ar.pfs + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs } { .mfi -.fframe 64 +.fframe 64 add sp=-64,sp // Create new stack nop.f 0 mov GR_SAVE_GP=gp // Save gp @@ -549,18 +549,18 @@ LOCAL_LIBM_ENTRY(__libm_error_region) { .mmi stfd [GR_Parameter_Y] = FR_Y,16 // Save Parameter 2 on stack add GR_Parameter_X = 16,sp // Parameter 1 address -.save b0, GR_SAVE_B0 - mov GR_SAVE_B0=b0 // Save b0 +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 };; .body { .mib - stfd [GR_Parameter_X] = FR_X // Store Parameter 1 on stack - add GR_Parameter_RESULT = 0,GR_Parameter_Y + stfd [GR_Parameter_X] = FR_X // Store Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y nop.b 0 // Parameter 3 address } { .mib stfd [GR_Parameter_Y] = FR_RESULT // Store Parameter 3 on stack - add GR_Parameter_Y = -16,GR_Parameter_Y + add GR_Parameter_Y = -16,GR_Parameter_Y br.call.sptk b0=__libm_error_support# // Call error handling function };; { .mmi @@ -575,10 +575,10 @@ LOCAL_LIBM_ENTRY(__libm_error_region) mov b0 = GR_SAVE_B0 // Restore return address };; { .mib - mov gp = GR_SAVE_GP // Restore gp + mov gp = GR_SAVE_GP // Restore gp mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs br.ret.sptk b0 // Return -};; +};; LOCAL_LIBM_END(__libm_error_region) diff --git a/sysdeps/ia64/fpu/e_remainderf.S b/sysdeps/ia64/fpu/e_remainderf.S index 0e9bedd652..efc5a8dcc3 100644 --- a/sysdeps/ia64/fpu/e_remainderf.S +++ b/sysdeps/ia64/fpu/e_remainderf.S @@ -40,7 +40,7 @@ // History //==================================================================== // 02/02/00 Initial version -// 03/02/00 New algorithm +// 03/02/00 New algorithm // 04/04/00 Unwind support added // 07/21/00 Fixed quotient=2^{24*m+23} bug // 08/15/00 Bundle added after call to __libm_error_support to properly @@ -51,12 +51,12 @@ // // API //==================================================================== -// float remainderf(float,float); +// float remainderf(float,float); // // Overview of operation //==================================================================== // remainder(a,b)=a-i*b, -// where i is an integer such that, if b!=0 and a is finite, +// where i is an integer such that, if b!=0 and a is finite, // |a/b-i|<=1/2. If |a/b-i|=1/2, i is even. // // Algorithm @@ -64,16 +64,16 @@ // a). eliminate special cases // b). if |a/b|<0.25 (first quotient estimate), return a // c). use single precision divide algorithm to get quotient q -// rounded to 24 bits of precision -// d). calculate partial remainders (using both q and q-ulp); -// select one and RZ(a/b) based on the sign of |a|-|b|*q +// rounded to 24 bits of precision +// d). calculate partial remainders (using both q and q-ulp); +// select one and RZ(a/b) based on the sign of |a|-|b|*q // e). if the exponent difference (exponent(a)-exponent(b)) -// is less than 24 (quotient estimate<2^{24}-2), use RZ(a/b) +// is less than 24 (quotient estimate<2^{24}-2), use RZ(a/b) // and sticky bits to round to integer; exit loop and // calculate final remainder // f). if exponent(a)-exponent(b)>=24, select new value of a as -// the partial remainder calculated using RZ(a/b); -// repeat from c). +// the partial remainder calculated using RZ(a/b); +// repeat from c). // // Special cases //==================================================================== @@ -89,7 +89,7 @@ GR_SAVE_B0 = r33 GR_SAVE_PFS = r34 -GR_SAVE_GP = r35 +GR_SAVE_GP = r35 GR_SAVE_SP = r36 GR_Parameter_X = r37 @@ -129,7 +129,7 @@ GLOBAL_IEEE754_ENTRY(remainderf) // Y +-NAN, +-inf, +-0? p11 { .mfi nop.m 999 - fclass.m.unc p11,p0 = f9, 0xe7 + fclass.m.unc p11,p0 = f9, 0xe7 nop.i 999 } // qnan snan inf norm unorm 0 -+ @@ -138,8 +138,8 @@ GLOBAL_IEEE754_ENTRY(remainderf) // X +-NAN, +-inf, ? p9 { .mfi nop.m 999 - fclass.m.unc p9,p0 = f8, 0xe3 - nop.i 999;; + fclass.m.unc p9,p0 = f8, 0xe3 + nop.i 999;; } {.mfi @@ -154,7 +154,7 @@ GLOBAL_IEEE754_ENTRY(remainderf) // y0 = 1 / b in f10 frcpa.s1 f10,p6=f13,f14 nop.i 0;; -} +} {.bbb (p9) br.cond.spnt FREM_X_NAN_INF (p11) br.cond.spnt FREM_Y_NAN_INF_ZERO @@ -164,10 +164,10 @@ GLOBAL_IEEE754_ENTRY(remainderf) // set D flag if a (f8) is denormal fnma.s0 f6=f8,f1,f8 nop.i 0;; -} +} .align 32 -remloop24: +remloop24: { .mfi // f12=2^{24}-2 setf.s f12=r3 @@ -175,26 +175,26 @@ remloop24: // q0 = a * y0 in f15 (p6) fma.s1 f15=f13,f10,f0 nop.i 0 -} +} { .mfi nop.m 0 // Step (3) // e0 = 1 - b * y0 in f7 (p6) fnma.s1 f7=f14,f10,f1 nop.i 0;; -} +} {.mlx nop.m 0 // r2=1.25*2^{-24} movl r2=0x33a00000;; -} +} { .mfi nop.m 0 // Step (4) // q1 = q0 + e0 * q0 in f6 (p6) fma.s1 f6=f7,f15,f15 nop.i 0 -} +} { .mfi nop.m 0 // Step (5) @@ -215,17 +215,17 @@ remloop24: // q2 = q1 + e1 * q1 in f6 (p6) fma.s1 f6=f7,f6,f6 nop.i 0 -} +} { .mfi mov r2=0x3e7 // Step (7) // e2 = e1 * e1 in f7 (p6) fma.s1 f7=f7,f7,f0 nop.i 0;; -} +} {.mmi - // q<1/4 ? (i.e. expon< -2) + // q<1/4 ? (i.e. expon< -2) (p7) cmp.gt.unc p7,p0=r28,r29 nop.m 0 // r2=0x3e7000000 @@ -235,7 +235,7 @@ remloop24: {.mfb // r2=0x3e7000001 add r2=1,r2 - // if |a/b|<1/4, set D flag before returning + // if |a/b|<1/4, set D flag before returning (p7) fma.s.s0 f9=f9,f0,f8 nop.b 0;; } @@ -253,7 +253,7 @@ remloop24: fmerge.s f8=f8,f13 // r2=2^{-24}+2^{-48} (double prec.) shl r2=r2,28;; -} +} { .mfi @@ -263,14 +263,14 @@ remloop24: // q3 = q2 + e2 * q2 in f6 (p6) fma.d.s1 f6=f7,f6,f6 nop.i 0;; -} +} { .mfi nop.m 0 // Step (9) // q = q3 in f11 (p6) fma.s.s1 f11=f6,f1,f0 nop.i 0;; -} +} {.mfi // f7=2^{-24} setf.d f7=r2 @@ -288,7 +288,7 @@ remloop24: // r=a-b*q fnma.s1 f6=f14,f11,f13 nop.i 0 -} +} {.mfi nop.m 0 // q'=q-q*(1.25*2^{-24}) (q'=q-ulp) @@ -307,7 +307,7 @@ remloop24: // r>0 iff q=RZ(a/b) and inexact fcmp.gt.unc.s1 p8,p0=f6,f0 nop.i 0 -} +} {.mfi nop.m 0 // r<0 iff q'=RZ(a/b) and inexact @@ -321,7 +321,7 @@ remloop24: // i.e. Q=q+q*x (x=2^{-32} or 0) (p8) fma.s1 f11=f11,f12,f11 nop.i 0 -} +} {.mfi nop.m 0 // (p9) Q=q'+(last iteration ? sticky bits:0) @@ -336,7 +336,7 @@ remloop24: // (p10) new a =r (p10) mov f13=f6 (p12) br.cond.sptk remloop24;; -} +} // last iteration {.mfi @@ -356,16 +356,16 @@ remloop24: // save sign of a fmerge.s f7=f8,f8 nop.i 0 -} -{.mfi +} +{.mfi nop.m 0 // normalize fcvt.xf f11=f11 nop.i 0;; -} +} {.mfi nop.m 0 - // This can be removed if sign of 0 is not important + // This can be removed if sign of 0 is not important // get remainder using sf1 fnma.s.s1 f12=f9,f11,f8 nop.i 0 @@ -382,24 +382,24 @@ remloop24: {.mfi nop.m 0 // f12=0? - // This can be removed if sign of 0 is not important + // This can be removed if sign of 0 is not important fcmp.eq.unc.s1 p8,p0=f12,f0 nop.i 0;; } {.mfb nop.m 0 // if f8=0, set sign correctly - // This can be removed if sign of 0 is not important + // This can be removed if sign of 0 is not important (p8) fmerge.s f8=f7,f8 // return br.ret.sptk b0;; } -FREM_X_NAN_INF: +FREM_X_NAN_INF: // Y zero ? -{.mfi +{.mfi nop.m 0 fma.s1 f10=f9,f1,f0 nop.i 0;; @@ -413,20 +413,20 @@ FREM_X_NAN_INF: nop.m 0 nop.i 0 // if Y zero - (p11) br.cond.spnt FREM_Y_ZERO;; + (p11) br.cond.spnt FREM_Y_ZERO;; } // X infinity? Return QNAN indefinite { .mfi nop.m 999 - fclass.m.unc p8,p0 = f8, 0x23 + fclass.m.unc p8,p0 = f8, 0x23 nop.i 999 } // X infinity? Return QNAN indefinite { .mfi nop.m 999 - fclass.m.unc p11,p0 = f8, 0x23 - nop.i 999;; + fclass.m.unc p11,p0 = f8, 0x23 + nop.i 999;; } // Y NaN ? {.mfi @@ -439,10 +439,10 @@ FREM_X_NAN_INF: // also set Denormal flag if necessary (p8) fma.s0 f9=f9,f1,f0 nop.i 0 -} +} { .mfi nop.m 999 -(p8) frcpa.s0 f8,p7 = f8,f8 +(p8) frcpa.s0 f8,p7 = f8,f8 nop.i 999 ;; } @@ -453,48 +453,48 @@ FREM_X_NAN_INF: } { .mfi nop.m 999 -(p8) fma.s.s0 f8=f8,f1,f0 - nop.i 0 ;; +(p8) fma.s.s0 f8=f8,f1,f0 + nop.i 0 ;; } { .mfb nop.m 999 - frcpa.s0 f8,p7=f8,f9 - (p11) br.cond.spnt EXP_ERROR_RETURN;; + frcpa.s0 f8,p7=f8,f9 + (p11) br.cond.spnt EXP_ERROR_RETURN;; } { .mib nop.m 0 nop.i 0 - br.ret.spnt b0 ;; + br.ret.spnt b0 ;; } -FREM_Y_NAN_INF_ZERO: +FREM_Y_NAN_INF_ZERO: // Y INF { .mfi nop.m 999 - fclass.m.unc p7,p0 = f9, 0x23 + fclass.m.unc p7,p0 = f9, 0x23 nop.i 999 ;; } { .mfb nop.m 999 -(p7) fma.s.s0 f8=f8,f1,f0 -(p7) br.ret.spnt b0 ;; +(p7) fma.s.s0 f8=f8,f1,f0 +(p7) br.ret.spnt b0 ;; } // Y NAN? { .mfi nop.m 999 - fclass.m.unc p9,p0 = f9, 0xc3 + fclass.m.unc p9,p0 = f9, 0xc3 nop.i 999 ;; } { .mfb nop.m 999 -(p9) fma.s.s0 f8=f9,f1,f0 -(p9) br.ret.spnt b0 ;; +(p9) fma.s.s0 f8=f9,f1,f0 +(p9) br.ret.spnt b0 ;; } FREM_Y_ZERO: @@ -505,12 +505,12 @@ FREM_Y_ZERO: // X NAN? { .mfi nop.m 999 - fclass.m.unc p9,p10 = f8, 0xc3 + fclass.m.unc p9,p10 = f8, 0xc3 nop.i 999 ;; } { .mfi nop.m 999 -(p10) fclass.nm p9,p10 = f8, 0xff +(p10) fclass.nm p9,p10 = f8, 0xff nop.i 999 ;; } @@ -522,29 +522,29 @@ FREM_Y_ZERO: { .mfi nop.m 999 -(p10) frcpa.s0 f11,p7 = f0,f0 +(p10) frcpa.s0 f11,p7 = f0,f0 nop.i 999;; } { .mfi nop.m 999 - fmerge.s f10 = f8, f8 + fmerge.s f10 = f8, f8 nop.i 999 } { .mfi nop.m 999 - fma.s.s0 f8=f11,f1,f0 + fma.s.s0 f8=f11,f1,f0 nop.i 999 } -EXP_ERROR_RETURN: +EXP_ERROR_RETURN: { .mib - mov GR_Parameter_TAG = 125 + mov GR_Parameter_TAG = 125 nop.i 999 - br.sptk __libm_error_region;; + br.sptk __libm_error_region;; } GLOBAL_IEEE754_END(remainderf) @@ -557,10 +557,10 @@ LOCAL_LIBM_ENTRY(__libm_error_region) add GR_Parameter_Y=-32,sp // Parameter 2 value nop.f 0 .save ar.pfs,GR_SAVE_PFS - mov GR_SAVE_PFS=ar.pfs // Save ar.pfs + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs } { .mfi -.fframe 64 +.fframe 64 add sp=-64,sp // Create new stack nop.f 0 mov GR_SAVE_GP=gp // Save gp @@ -568,18 +568,18 @@ LOCAL_LIBM_ENTRY(__libm_error_region) { .mmi stfs [GR_Parameter_Y] = FR_Y,16 // Save Parameter 2 on stack add GR_Parameter_X = 16,sp // Parameter 1 address -.save b0, GR_SAVE_B0 - mov GR_SAVE_B0=b0 // Save b0 +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 };; .body { .mib - stfs [GR_Parameter_X] = FR_X // Store Parameter 1 on stack - add GR_Parameter_RESULT = 0,GR_Parameter_Y + stfs [GR_Parameter_X] = FR_X // Store Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y nop.b 0 // Parameter 3 address } { .mib stfs [GR_Parameter_Y] = FR_RESULT // Store Parameter 3 on stack - add GR_Parameter_Y = -16,GR_Parameter_Y + add GR_Parameter_Y = -16,GR_Parameter_Y br.call.sptk b0=__libm_error_support#;; // Call error handling function } { .mmi @@ -594,10 +594,10 @@ LOCAL_LIBM_ENTRY(__libm_error_region) mov b0 = GR_SAVE_B0 // Restore return address };; { .mib - mov gp = GR_SAVE_GP // Restore gp + mov gp = GR_SAVE_GP // Restore gp mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs br.ret.sptk b0 // Return -};; +};; LOCAL_LIBM_END(__libm_error_region) diff --git a/sysdeps/ia64/fpu/e_remainderl.S b/sysdeps/ia64/fpu/e_remainderl.S index 8c1630e3ab..97271999ba 100644 --- a/sysdeps/ia64/fpu/e_remainderl.S +++ b/sysdeps/ia64/fpu/e_remainderl.S @@ -40,7 +40,7 @@ // History //==================================================================== // 02/02/00 Initial version -// 03/02/00 New algorithm +// 03/02/00 New algorithm // 04/04/00 Unwind support added // 07/21/00 Fixed quotient=2^{24*m+23}*1.q1...q23 1 bug // 08/15/00 Bundle added after call to __libm_error_support to properly @@ -51,12 +51,12 @@ // // API //==================================================================== -// long double remainderl(long double,long double); +// long double remainderl(long double,long double); // // Overview of operation //==================================================================== // remainder(a,b)=a-i*b, -// where i is an integer such that, if b!=0 and a is finite, +// where i is an integer such that, if b!=0 and a is finite, // |a/b-i|<=1/2. If |a/b-i|=1/2, i is even. // // Algorithm @@ -64,16 +64,16 @@ // a). eliminate special cases // b). if |a/b|<0.25 (first quotient estimate), return a // c). use single precision divide algorithm to get quotient q -// rounded to 24 bits of precision -// d). calculate partial remainders (using both q and q-ulp); -// select one and RZ(a/b) based on the sign of |a|-|b|*q +// rounded to 24 bits of precision +// d). calculate partial remainders (using both q and q-ulp); +// select one and RZ(a/b) based on the sign of |a|-|b|*q // e). if the exponent difference (exponent(a)-exponent(b)) -// is less than 24 (quotient estimate<2^{24}-2), use RZ(a/b) +// is less than 24 (quotient estimate<2^{24}-2), use RZ(a/b) // and sticky bits to round to integer; exit loop and // calculate final remainder // f). if exponent(a)-exponent(b)>=24, select new value of a as -// the partial remainder calculated using RZ(a/b); -// repeat from c). +// the partial remainder calculated using RZ(a/b); +// repeat from c). // // Special cases //==================================================================== @@ -89,7 +89,7 @@ GR_SAVE_B0 = r33 GR_SAVE_PFS = r34 -GR_SAVE_GP = r35 +GR_SAVE_GP = r35 GR_SAVE_SP = r36 GR_Parameter_X = r37 @@ -137,7 +137,7 @@ cmp.eq p11,p10=r29,r0;; // Y +-NAN, +-inf, +-0? p11 { .mfi nop.m 999 -(p10) fclass.m p11,p10 = f9, 0xe7 +(p10) fclass.m p11,p10 = f9, 0xe7 nop.i 999 } // qnan snan inf norm unorm 0 -+ @@ -146,8 +146,8 @@ cmp.eq p11,p10=r29,r0;; // X +-NAN, +-inf, ? p9 { .mfi nop.m 999 - fclass.m.unc p9,p8 = f8, 0xe3 - nop.i 999;; + fclass.m.unc p9,p8 = f8, 0xe3 + nop.i 999;; } {.mfi @@ -162,12 +162,12 @@ cmp.eq p11,p10=r29,r0;; // y0 = 1 / b in f10 frcpa.s1 f10,p6=f13,f14 nop.i 0;; -} +} // Y +-NAN, +-inf, +-0? p11 { .mfi nop.m 999 // pseudo-NaN ? -(p10) fclass.nm p11,p0 = f9, 0xff +(p10) fclass.nm p11,p0 = f9, 0xff nop.i 999 } @@ -178,7 +178,7 @@ cmp.eq p11,p10=r29,r0;; { .mfi nop.m 999 -(p8) fclass.nm p9,p0 = f8, 0xff +(p8) fclass.nm p9,p0 = f8, 0xff nop.i 999;; } @@ -191,9 +191,9 @@ cmp.eq p11,p10=r29,r0;; // set D flag if a (f8) is denormal fnma.s0 f6=f8,f1,f8 nop.i 0;; -} +} -remloop24: +remloop24: { .mfi nop.m 0 // Step (2) @@ -210,7 +210,7 @@ remloop24: nop.m 0 // r2=1.25*2^{-24} movl r2=0x33a00000;; -} +} {.mfi nop.m 0 @@ -244,12 +244,12 @@ remloop24: // q2 = q1 + e1 * q1 in f6 (p6) fma.s1 f6=f7,f15,f15 nop.i 0;; -} +} {.mmi // f15=1.25*2^{-24} setf.s f15=r2 - // q<1/4 ? (i.e. expon< -2) + // q<1/4 ? (i.e. expon< -2) (p7) cmp.gt p7,p0=r28,r29 nop.i 0;; } @@ -257,7 +257,7 @@ remloop24: {.mfb // r29= -32+bias mov r29=0xffdf - // if |a/b|<1/4, set D flag before returning + // if |a/b|<1/4, set D flag before returning (p7) fma.s0 f9=f9,f0,f8 nop.b 0;; } @@ -275,7 +275,7 @@ remloop24: // set f8 to current a value | sign fmerge.s f8=f8,f13 nop.i 0;; -} +} {.mfi getf.exp r28=f6 // last step ? (q<2^{23}) @@ -298,7 +298,7 @@ remloop24: nop.m 0 cmp.eq p11,p14=r2,r28 nop.i 0;; -} +} .pred.rel "mutex",p11,p14 {.mfi @@ -306,7 +306,7 @@ remloop24: // if exp_q=2^23, then r=a-b*2^{23} (p11) fnma.s1 f13=f12,f14,f13 nop.i 0 -} +} {.mfi nop.m 0 // r2=a-b*q' @@ -327,7 +327,7 @@ remloop24: .pred.rel "mutex",p8,p9 {.mfi - nop.m 0 + nop.m 0 // (p8) Q=q+(last iteration ? sticky bits:0) // i.e. Q=q+q*x (x=2^{-32} or 0) (p8) fma.s1 f11=f11,f7,f11 @@ -346,7 +346,7 @@ remloop24: // (p10) new a =r (p10) mov f13=f6 (p12) br.cond.sptk remloop24;; -} +} // last iteration {.mfi @@ -366,15 +366,15 @@ remloop24: // save sign of a fmerge.s f7=f8,f8 nop.i 0 -} {.mfi +} {.mfi nop.m 0 // normalize fcvt.xf f11=f11 nop.i 0;; -} +} {.mfi nop.m 0 - // This can be removed if sign of 0 is not important + // This can be removed if sign of 0 is not important // get remainder using sf1 fnma.s1 f12=f9,f11,f8 nop.i 0 @@ -388,14 +388,14 @@ remloop24: {.mfi nop.m 0 // f12=0? - // This can be removed if sign of 0 is not important + // This can be removed if sign of 0 is not important fcmp.eq.unc.s1 p8,p0=f12,f0 nop.i 0;; } {.mfb nop.m 0 // if f8=0, set sign correctly - // This can be removed if sign of 0 is not important + // This can be removed if sign of 0 is not important (p8) fmerge.s f8=f7,f8 // return br.ret.sptk b0;; @@ -403,10 +403,10 @@ remloop24: -FREM_X_NAN_INF: +FREM_X_NAN_INF: // Y zero ? -{.mfi +{.mfi nop.m 0 fma.s1 f10=f9,f1,f0 nop.i 0;; @@ -420,20 +420,20 @@ FREM_X_NAN_INF: nop.m 0 nop.i 0 // if Y zero - (p11) br.cond.spnt FREM_Y_ZERO;; + (p11) br.cond.spnt FREM_Y_ZERO;; } // X infinity? Return QNAN indefinite { .mfi nop.m 999 - fclass.m.unc p8,p0 = f8, 0x23 + fclass.m.unc p8,p0 = f8, 0x23 nop.i 999 } // X infinity? Return QNAN indefinite { .mfi nop.m 999 - fclass.m.unc p11,p0 = f8, 0x23 - nop.i 999;; + fclass.m.unc p11,p0 = f8, 0x23 + nop.i 999;; } // Y NaN ? {.mfi @@ -446,10 +446,10 @@ FREM_X_NAN_INF: // also set Denormal flag if necessary (p8) fnma.s0 f9=f9,f1,f9 nop.i 0 -} +} { .mfi nop.m 999 -(p8) frcpa.s0 f8,p7 = f8,f8 +(p8) frcpa.s0 f8,p7 = f8,f8 nop.i 999 ;; } @@ -460,52 +460,52 @@ FREM_X_NAN_INF: } { .mfi nop.m 999 -(p8) fma.s0 f8=f8,f1,f0 - nop.i 0 ;; +(p8) fma.s0 f8=f8,f1,f0 + nop.i 0 ;; } { .mfb nop.m 999 - frcpa.s0 f8,p7=f8,f9 - (p11) br.cond.spnt EXP_ERROR_RETURN;; + frcpa.s0 f8,p7=f8,f9 + (p11) br.cond.spnt EXP_ERROR_RETURN;; } { .mib nop.m 0 nop.i 0 - br.ret.spnt b0 ;; + br.ret.spnt b0 ;; } -FREM_Y_NAN_INF_ZERO: +FREM_Y_NAN_INF_ZERO: // Y INF { .mfi nop.m 999 - fclass.m.unc p7,p0 = f9, 0x23 + fclass.m.unc p7,p0 = f9, 0x23 nop.i 999 ;; } { .mfb nop.m 999 -(p7) fma.s0 f8=f8,f1,f0 -(p7) br.ret.spnt b0 ;; +(p7) fma.s0 f8=f8,f1,f0 +(p7) br.ret.spnt b0 ;; } // Y NAN? { .mfi nop.m 999 - fclass.m.unc p9,p10 = f9, 0xc3 + fclass.m.unc p9,p10 = f9, 0xc3 nop.i 999 ;; } { .mfi nop.m 999 -(p10) fclass.nm p9,p0 = f9, 0xff +(p10) fclass.nm p9,p0 = f9, 0xff nop.i 999 ;; } { .mfb nop.m 999 -(p9) fma.s0 f8=f9,f1,f0 -(p9) br.ret.spnt b0 ;; +(p9) fma.s0 f8=f9,f1,f0 +(p9) br.ret.spnt b0 ;; } FREM_Y_ZERO: @@ -516,12 +516,12 @@ FREM_Y_ZERO: // X NAN? { .mfi nop.m 999 - fclass.m.unc p9,p10 = f8, 0xc3 + fclass.m.unc p9,p10 = f8, 0xc3 nop.i 999 ;; } { .mfi nop.m 999 -(p10) fclass.nm p9,p10 = f8, 0xff +(p10) fclass.nm p9,p10 = f8, 0xff nop.i 999 ;; } @@ -532,28 +532,28 @@ FREM_Y_ZERO: } { .mfi nop.m 999 -(p10) frcpa.s0 f11,p7 = f0,f0 +(p10) frcpa.s0 f11,p7 = f0,f0 nop.i 999;; } { .mfi nop.m 999 - fmerge.s f10 = f8, f8 + fmerge.s f10 = f8, f8 nop.i 999 } { .mfi nop.m 999 - fma.s0 f8=f11,f1,f0 + fma.s0 f8=f11,f1,f0 nop.i 999;; } -EXP_ERROR_RETURN: +EXP_ERROR_RETURN: { .mib - mov GR_Parameter_TAG = 123 + mov GR_Parameter_TAG = 123 nop.i 999 - br.sptk __libm_error_region;; + br.sptk __libm_error_region;; } GLOBAL_IEEE754_END(remainderl) @@ -564,10 +564,10 @@ LOCAL_LIBM_ENTRY(__libm_error_region) add GR_Parameter_Y=-32,sp // Parameter 2 value nop.f 0 .save ar.pfs,GR_SAVE_PFS - mov GR_SAVE_PFS=ar.pfs // Save ar.pfs + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs } { .mfi -.fframe 64 +.fframe 64 add sp=-64,sp // Create new stack nop.f 0 mov GR_SAVE_GP=gp // Save gp @@ -575,18 +575,18 @@ LOCAL_LIBM_ENTRY(__libm_error_region) { .mmi stfe [GR_Parameter_Y] = FR_Y,16 // Save Parameter 2 on stack add GR_Parameter_X = 16,sp // Parameter 1 address -.save b0, GR_SAVE_B0 - mov GR_SAVE_B0=b0 // Save b0 +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 };; .body { .mib - stfe [GR_Parameter_X] = FR_X // Store Parameter 1 on stack - add GR_Parameter_RESULT = 0,GR_Parameter_Y + stfe [GR_Parameter_X] = FR_X // Store Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y nop.b 0 // Parameter 3 address } { .mib stfe [GR_Parameter_Y] = FR_RESULT // Store Parameter 3 on stack - add GR_Parameter_Y = -16,GR_Parameter_Y + add GR_Parameter_Y = -16,GR_Parameter_Y br.call.sptk b0=__libm_error_support# // Call error handling function };; { .mmi @@ -601,10 +601,10 @@ LOCAL_LIBM_ENTRY(__libm_error_region) mov b0 = GR_SAVE_B0 // Restore return address };; { .mib - mov gp = GR_SAVE_GP // Restore gp + mov gp = GR_SAVE_GP // Restore gp mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs br.ret.sptk b0 // Return -};; +};; LOCAL_LIBM_END(__libm_error_region) diff --git a/sysdeps/ia64/fpu/e_scalb.S b/sysdeps/ia64/fpu/e_scalb.S index 3d48aab189..c25d8ab671 100644 --- a/sysdeps/ia64/fpu/e_scalb.S +++ b/sysdeps/ia64/fpu/e_scalb.S @@ -378,7 +378,7 @@ SCALB_UNDERFLOW: SCALB_NAN_INF_ZERO: // -// Before entry, N has been converted to a fp integer in significand of +// Before entry, N has been converted to a fp integer in significand of // FR_N_float_int // // Convert N_float_int to floating point value diff --git a/sysdeps/ia64/fpu/e_scalbf.S b/sysdeps/ia64/fpu/e_scalbf.S index e965667d7a..2dde9788fc 100644 --- a/sysdeps/ia64/fpu/e_scalbf.S +++ b/sysdeps/ia64/fpu/e_scalbf.S @@ -378,7 +378,7 @@ SCALBF_UNDERFLOW: SCALBF_NAN_INF_ZERO: // -// Before entry, N has been converted to a fp integer in significand of +// Before entry, N has been converted to a fp integer in significand of // FR_N_float_int // // Convert N_float_int to floating point value diff --git a/sysdeps/ia64/fpu/e_scalbl.S b/sysdeps/ia64/fpu/e_scalbl.S index 9b6467ff20..8aa3d0cccf 100644 --- a/sysdeps/ia64/fpu/e_scalbl.S +++ b/sysdeps/ia64/fpu/e_scalbl.S @@ -378,7 +378,7 @@ SCALBL_UNDERFLOW: SCALBL_NAN_INF_ZERO: // -// Before entry, N has been converted to a fp integer in significand of +// Before entry, N has been converted to a fp integer in significand of // FR_N_float_int // // Convert N_float_int to floating point value diff --git a/sysdeps/ia64/fpu/e_sinhl.S b/sysdeps/ia64/fpu/e_sinhl.S index 5b4a4addc2..b560999514 100644 --- a/sysdeps/ia64/fpu/e_sinhl.S +++ b/sysdeps/ia64/fpu/e_sinhl.S @@ -21,20 +21,20 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // // History @@ -44,7 +44,7 @@ // 08/15/00 Bundle added after call to __libm_error_support to properly // set [the previously overwritten] GR_Parameter_RESULT. // 10/12/00 Update to set denormal operand and underflow flags -// 01/22/01 Fixed to set inexact flag for small args. Fixed incorrect +// 01/22/01 Fixed to set inexact flag for small args. Fixed incorrect // call to __libm_error_support for 710.476 < x < 11357.2166. // 05/02/01 Reworked to improve speed of all paths // 05/20/02 Cleaned up namespace and sf0 syntax @@ -58,12 +58,12 @@ // // Registers used //============================================================== -// general registers: +// general registers: // r14 -> r40 // predicate registers used: // p6 -> p11 // floating-point registers used: -// f9 -> f15; f32 -> f90; +// f9 -> f15; f32 -> f90; // f8 has input, then output // // Overview of operation @@ -84,7 +84,7 @@ // 1. SINH_BY_POLY 0 < |x| < 0.25 // =============== // Evaluate sinh(x) by a 13th order polynomial -// Care is take for the order of multiplication; and P_1 is not exactly 1/3!, +// Care is take for the order of multiplication; and P_1 is not exactly 1/3!, // P_2 is not exactly 1/5!, etc. // sinh(x) = sign * (series(e^x) - series(e^-x))/2 // = sign * (ax + ax^3/3! + ax^5/5! + ax^7/7! + ax^9/9! + ax^11/11! @@ -100,18 +100,18 @@ // ============= // sinh(x) = sinh(B+R) // = sinh(B)cosh(R) + cosh(B)sinh(R) -// +// // ax = |x| = M*log2/64 + R // B = M*log2/64 -// M = 64*N + j +// M = 64*N + j // We will calculate M and get N as (M-j)/64 // The division is a shift. // exp(B) = exp(N*log2 + j*log2/64) // = 2^N * 2^(j*log2/64) // sinh(B) = 1/2(e^B -e^-B) -// = 1/2(2^N * 2^(j*log2/64) - 2^-N * 2^(-j*log2/64)) -// sinh(B) = (2^(N-1) * 2^(j*log2/64) - 2^(-N-1) * 2^(-j*log2/64)) -// cosh(B) = (2^(N-1) * 2^(j*log2/64) + 2^(-N-1) * 2^(-j*log2/64)) +// = 1/2(2^N * 2^(j*log2/64) - 2^-N * 2^(-j*log2/64)) +// sinh(B) = (2^(N-1) * 2^(j*log2/64) - 2^(-N-1) * 2^(-j*log2/64)) +// cosh(B) = (2^(N-1) * 2^(j*log2/64) + 2^(-N-1) * 2^(-j*log2/64)) // 2^(j*log2/64) is stored as Tjhi + Tjlo , j= -32,....,32 // Tjhi is double-extended (80-bit) and Tjlo is single(32-bit) // @@ -119,7 +119,7 @@ // R = ax - M*log2_by_64_hi - M*log2_by_64_lo // exp(R) = 1 + R +R^2(1/2! + R(1/3! + R(1/4! + ... + R(1/n!)...) // = 1 + p_odd + p_even -// where the p_even uses the A coefficients and the p_even uses +// where the p_even uses the A coefficients and the p_even uses // the B coefficients // // So sinh(R) = 1 + p_odd + p_even -(1 -p_odd -p_even)/2 = p_odd @@ -183,7 +183,7 @@ GR_Parameter_RESULT = r39 GR_Parameter_TAG = r40 -f_ABS_X = f9 +f_ABS_X = f9 f_X2 = f10 f_X4 = f11 f_tmp = f14 @@ -238,16 +238,16 @@ f_Tmjlo = f68 f_S_hi = f69 f_SC_hi_temp = f70 -f_S_lo_temp1 = f71 -f_S_lo_temp2 = f72 -f_S_lo_temp3 = f73 -f_S_lo_temp4 = f73 +f_S_lo_temp1 = f71 +f_S_lo_temp2 = f72 +f_S_lo_temp3 = f73 +f_S_lo_temp4 = f73 f_S_lo = f74 f_C_hi = f75 -f_Y_hi = f77 -f_Y_lo_temp = f78 -f_Y_lo = f79 +f_Y_hi = f77 +f_Y_lo_temp = f78 +f_Y_lo = f79 f_NORM_X = f80 f_P1 = f81 @@ -452,7 +452,7 @@ GLOBAL_IEEE754_ENTRY(sinhl) } { .mfi nop.m 0 - fnorm.s1 f_NORM_X = f8 + fnorm.s1 f_NORM_X = f8 mov r_exp_2tom57 = 0xffff-57 } ;; @@ -460,7 +460,7 @@ GLOBAL_IEEE754_ENTRY(sinhl) { .mfi setf.d f_RSHF_2TO57 = r_rshf_2to57 // Form const 1.100 * 2^120 fclass.m p10,p0 = f8, 0x0b // Test for denorm - mov r_exp_mask = 0x1ffff + mov r_exp_mask = 0x1ffff } { .mlx setf.sig f_INV_LN2_2TO63 = r_sig_inv_ln2 // Form 1/ln2 * 2^63 @@ -500,7 +500,7 @@ SINH_COMMON: add r_ad5 = 0x580, r_ad1 // Point to j_lo_table midpoint } { .mib - ldfe f_log2by64_hi = [r_ad1],16 + ldfe f_log2by64_hi = [r_ad1],16 and r_exp_x = r_exp_mask, r_signexp_x (p7) br.ret.spnt b0 // Exit if x=0 } @@ -508,36 +508,36 @@ SINH_COMMON: // Get the A coefficients for SINH_BY_TBL { .mfi - ldfe f_A1 = [r_ad3],16 + ldfe f_A1 = [r_ad3],16 fcmp.lt.s1 p8,p9 = f8,f0 // Test for x<0 cmp.lt p7,p0 = r_exp_x, r_exp_0_25 // Test x < 0.25 } { .mfb add r_ad2o = 0x30, r_ad2e // Point to p_table odd coeffs -(p6) fma.s0 f8 = f8,f1,f0 // Result for x nan, inf +(p6) fma.s0 f8 = f8,f1,f0 // Result for x nan, inf (p6) br.ret.spnt b0 // Exit for x nan, inf } ;; // Calculate X2 = ax*ax for SINH_BY_POLY { .mfi - ldfe f_log2by64_lo = [r_ad1],16 + ldfe f_log2by64_lo = [r_ad1],16 nop.f 0 nop.i 0 } { .mfb - ldfe f_A2 = [r_ad3],16 + ldfe f_A2 = [r_ad3],16 fma.s1 f_X2 = f_NORM_X, f_NORM_X, f0 (p7) br.cond.spnt SINH_BY_POLY } ;; // Here if |x| >= 0.25 -SINH_BY_TBL: +SINH_BY_TBL: // ****************************************************** // STEP 1 (TBL and EXP) - Argument reduction // ****************************************************** -// Get the following constants. +// Get the following constants. // Inv_log2by64 // log2by64_hi // log2by64_lo @@ -592,20 +592,20 @@ SINH_BY_TBL: // Subtract RSHF constant to get rounded M as a floating point value // M_temp * 2^(63-6) - 2^63 { .mfb - ldfe f_B3 = [r_ad3],16 + ldfe f_B3 = [r_ad3],16 fms.s1 f_M = f_M_temp, f_2TOM57, f_RSHF (p6) br.cond.spnt SINH_HUGE // Branch if result will overflow } ;; { .mfi - getf.sig r_M = f_M_temp + getf.sig r_M = f_M_temp nop.f 0 cmp.ge p7,p6 = r_exp_x, r_exp_32 // Test if x >= 32 } ;; -// Calculate j. j is the signed extension of the six lsb of M. It +// Calculate j. j is the signed extension of the six lsb of M. It // has a range of -32 thru 31. // Calculate R @@ -648,8 +648,8 @@ SINH_BY_TBL: // N = (M-j)/64 { .mfi ldfe f_Tjhi = [r_ad_J_hi] - fnma.s1 f_R = f_M, f_log2by64_lo, f_R_temp - shr r_N = r_Mmj, 0x6 // N = (M-j)/64 + fnma.s1 f_R = f_M, f_log2by64_lo, f_R_temp + shr r_N = r_Mmj, 0x6 // N = (M-j)/64 } { .mfi shladd r_ad_mJ_hi = r_mj, 4, r_ad4 // pointer to Tmjhi @@ -724,8 +724,8 @@ SINH_BY_TBL: } ;; -// -// If TBL, +// +// If TBL, // Calculate S_hi and S_lo, and C_hi // SC_hi_temp = sneg * Tmjhi // S_hi = spos * Tjhi - SC_hi_temp @@ -735,12 +735,12 @@ SINH_BY_TBL: { .mfi nop.m 0 -(p6) fma.s1 f_SC_hi_temp = f_sneg, f_Tmjhi, f0 +(p6) fma.s1 f_SC_hi_temp = f_sneg, f_Tmjhi, f0 nop.i 0 } ;; -// If TBL, +// If TBL, // S_lo_temp3 = sneg * Tmjlo // S_lo_temp4 = spos * Tjlo - S_lo_temp3 // S_lo_temp4 = spos * Tjlo -(sneg * Tmjlo) @@ -763,7 +763,7 @@ SINH_BY_TBL: } ;; -// If EXP, +// If EXP, // Compute sgnx * 2^(N-1) * Tjhi and sgnx * 2^(N-1) * Tjlo { .mfi nop.m 0 @@ -822,7 +822,7 @@ SINH_BY_TBL: { .mfi nop.m 0 -(p6) fnma.s1 f_S_lo_temp2 = f_sneg, f_Tmjhi, f_S_lo_temp1 +(p6) fnma.s1 f_S_lo_temp2 = f_sneg, f_Tmjhi, f_S_lo_temp1 nop.i 0 } ;; @@ -847,7 +847,7 @@ SINH_BY_TBL: ;; // If TBL, -// Y_hi = S_hi +// Y_hi = S_hi // Y_lo = C_hi*p_odd + (S_hi*p_even + S_lo) { .mfi nop.m 0 @@ -894,7 +894,7 @@ SINH_BY_TBL: // Here if 0 < |x| < 0.25 -SINH_BY_POLY: +SINH_BY_POLY: { .mmf ldfe f_P6 = [r_ad2e],16 ldfe f_P5 = [r_ad2o],16 @@ -911,7 +911,7 @@ SINH_BY_POLY: { .mmi ldfe f_P2 = [r_ad2e],16 - ldfe f_P1 = [r_ad2o],16 + ldfe f_P1 = [r_ad2o],16 nop.i 0 } ;; @@ -1012,7 +1012,7 @@ SINH_DENORM: { .mfi nop.m 0 (p6) fma.s0 f8 = f8,f8,f8 // If x +denorm, result=x+x^2 - nop.i 0 + nop.i 0 } { .mfb nop.m 0 @@ -1023,7 +1023,7 @@ SINH_DENORM: // Here if |x| >= overflow limit -SINH_HUGE: +SINH_HUGE: // for SINH_HUGE, put 24000 in exponent; take sign from input { .mmi mov r_exp_huge = 0x15dbf @@ -1035,7 +1035,7 @@ SINH_HUGE: .pred.rel "mutex",p8,p9 { .mfi - alloc r32 = ar.pfs,0,5,4,0 + alloc r32 = ar.pfs,0,5,4,0 (p8) fnma.s1 f_signed_hi_lo = f_huge, f1, f1 nop.i 0 } @@ -1083,7 +1083,7 @@ LOCAL_LIBM_ENTRY(__libm_error_region) { .mib stfe [GR_Parameter_X] = f8 // STORE Parameter 1 on stack add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address - nop.b 0 + nop.b 0 } { .mib stfe [GR_Parameter_Y] = f_pre_result // STORE Parameter 3 on stack diff --git a/sysdeps/ia64/fpu/e_sqrt.S b/sysdeps/ia64/fpu/e_sqrt.S index 53e60ef23f..da4e8ccb6d 100644 --- a/sysdeps/ia64/fpu/e_sqrt.S +++ b/sysdeps/ia64/fpu/e_sqrt.S @@ -3,9 +3,9 @@ // Copyright (c) 2000 - 2003, Intel Corporation // All rights reserved. -// +// // Contributed 2000 by the Intel Numerics Group, Intel Corporation -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -21,20 +21,20 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // //******************************************************************** @@ -120,7 +120,7 @@ GLOBAL_IEEE754_ENTRY(sqrt) setf.s f10=r3 // Step (1) // y0 = 1/sqrt(a) in f7 - fclass.m.unc p7,p8 = f8,0x3A + fclass.m.unc p7,p8 = f8,0x3A nop.i 0;; } { .mlx nop.m 0 @@ -238,7 +238,7 @@ GLOBAL_IEEE754_ENTRY(sqrt) // g2 = g1 + d * h1 in f7 (p6) fma.d.s0 f8=f9,f6,f7 (p6) br.ret.sptk b0 ;; -} +} { .mfb nop.m 0 @@ -273,7 +273,7 @@ LOCAL_LIBM_ENTRY(__libm_error_region) // // This branch includes all those special values that are not negative, // with the result equal to frcpa(x) -// +// .prologue // We are distinguishing between over(under)flow and letting @@ -307,7 +307,7 @@ LOCAL_LIBM_ENTRY(__libm_error_region) { .mib stfd [GR_Parameter_X] = f15 // STORE Parameter 1 on stack add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address - nop.b 0 + nop.b 0 } { .mib stfd [GR_Parameter_Y] = f8 // STORE Parameter 3 on stack diff --git a/sysdeps/ia64/fpu/e_sqrtf.S b/sysdeps/ia64/fpu/e_sqrtf.S index daa20454d7..d50ff012e4 100644 --- a/sysdeps/ia64/fpu/e_sqrtf.S +++ b/sysdeps/ia64/fpu/e_sqrtf.S @@ -21,20 +21,20 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // //********************************************************************* @@ -55,7 +55,7 @@ // //******************************************************************** // -// Accuracy: Correctly Rounded +// Accuracy: Correctly Rounded // //******************************************************************** // @@ -77,7 +77,7 @@ // All faults and exceptions should be raised correctly. // sqrtf(QNaN) = QNaN // sqrtf(SNaN) = QNaN -// sqrtf(+/-0) = +/-0 +// sqrtf(+/-0) = +/-0 // sqrtf(negative) = QNaN and error handling is called // //******************************************************************** @@ -91,7 +91,7 @@ GR_SAVE_B0 = r34 GR_SAVE_PFS = r33 -GR_SAVE_GP = r35 +GR_SAVE_GP = r35 GR_Parameter_X = r37 GR_Parameter_Y = r38 @@ -119,12 +119,12 @@ GLOBAL_IEEE754_ENTRY(sqrtf) setf.exp f12 = r2 // Step (1) // y0 = 1/sqrt(a) in f7 - fclass.m.unc p7,p8 = f8,0x3A + fclass.m.unc p7,p8 = f8,0x3A nop.i 0 } { .mfi nop.m 0 - // Make a copy of x just in case - mov f13 = f8 + // Make a copy of x just in case + mov f13 = f8 nop.i 0;; } { .mfi nop.m 0 @@ -209,7 +209,7 @@ LOCAL_LIBM_ENTRY(__libm_error_region) .prologue { .mii add GR_Parameter_Y=-32,sp // Parameter 2 value - mov GR_Parameter_TAG = 50 + mov GR_Parameter_TAG = 50 .save ar.pfs,GR_SAVE_PFS mov GR_SAVE_PFS=ar.pfs // Save ar.pfs } @@ -248,10 +248,10 @@ LOCAL_LIBM_ENTRY(__libm_error_region) mov b0 = GR_SAVE_B0 // Restore return address };; { .mib - mov gp = GR_SAVE_GP // Restore gp + mov gp = GR_SAVE_GP // Restore gp mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs br.ret.sptk b0 // Return -};; +};; LOCAL_LIBM_END(__libm_error_region) diff --git a/sysdeps/ia64/fpu/e_sqrtl.S b/sysdeps/ia64/fpu/e_sqrtl.S index 6a5735d45a..6aa402150f 100644 --- a/sysdeps/ia64/fpu/e_sqrtl.S +++ b/sysdeps/ia64/fpu/e_sqrtl.S @@ -21,20 +21,20 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // //******************************************************************** @@ -123,8 +123,8 @@ alloc r32= ar.pfs,0,5,4,0 nop.i 0;; } { .mfi nop.m 0 - // Make copy input x - mov f13=f8 + // Make copy input x + mov f13=f8 nop.i 0 } { .mfi nop.m 0 @@ -136,7 +136,7 @@ alloc r32= ar.pfs,0,5,4,0 // d0 = 1/2 - S0 * H0 in f10 (p6) fnma.s1 f10=f7,f9,f12 nop.i 0;; -} +} { .mfi nop.m 0 mov f15=f8 diff --git a/sysdeps/ia64/fpu/libm_cpu_defs.h b/sysdeps/ia64/fpu/libm_cpu_defs.h index 516128c404..810c683ee8 100644 --- a/sysdeps/ia64/fpu/libm_cpu_defs.h +++ b/sysdeps/ia64/fpu/libm_cpu_defs.h @@ -1,6 +1,6 @@ /* file: libm_cpu_defs.h */ - - + + // Copyright (c) 2000 - 2004, Intel Corporation // All rights reserved. // diff --git a/sysdeps/ia64/fpu/libm_error_codes.h b/sysdeps/ia64/fpu/libm_error_codes.h index 4f0945ea1c..f196b33a10 100644 --- a/sysdeps/ia64/fpu/libm_error_codes.h +++ b/sysdeps/ia64/fpu/libm_error_codes.h @@ -1,7 +1,7 @@ /* file: libm_error_codes.h */ - -/* + +/* // Copyright (c) 2000 - 2004, Intel Corporation // All rights reserved. // @@ -52,7 +52,7 @@ */ #if !defined(__LIBM_ERROR_CODES_H__) -#define __LIBM_ERROR_CODES_H__ +#define __LIBM_ERROR_CODES_H__ typedef enum { @@ -192,9 +192,9 @@ typedef enum tgamma_overflow, tgamma_negative, tgamma_reserve, /* 258, 259, 260 */ tgammaf_overflow, tgammaf_negative, tgammaf_reserve, /* 261, 262, 263 */ exp10l_underflow, exp10_underflow, exp10f_underflow, /* 264, 265, 266 */ - nextafterl_underflow, nextafter_underflow, + nextafterl_underflow, nextafter_underflow, nextafterf_underflow, /* 267, 268, 269 */ - nexttowardl_underflow, nexttoward_underflow, + nexttowardl_underflow, nexttoward_underflow, nexttowardf_underflow /* 270, 271, 272 */ } error_types; diff --git a/sysdeps/ia64/fpu/libm_frexp.S b/sysdeps/ia64/fpu/libm_frexp.S index c6bd676a40..51bb268dda 100644 --- a/sysdeps/ia64/fpu/libm_frexp.S +++ b/sysdeps/ia64/fpu/libm_frexp.S @@ -21,20 +21,20 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // // History @@ -74,7 +74,7 @@ // Registers used //============================================================== // -// general registers: +// general registers: // r14 exponent bias for x negative // r15 exponent bias for x positive // r16 signexp of x @@ -119,7 +119,7 @@ GLOBAL_LIBM_ENTRY(__libm_frexp) // The normalization also sets fault flags and takes faults if necessary { .mfi mov r20 = 0x1003f - fnorm.s0 f9 = f8 + fnorm.s0 f9 = f8 nop.i 999 ;; } @@ -137,7 +137,7 @@ GLOBAL_LIBM_ENTRY(__libm_frexp) { .mfi setf.exp f11 = r14 (p7) fcmp.lt.s0 p7,p8 = f8,f0 -(p6) cmp.eq.unc p10,p11 = r34, r0 ;; +(p6) cmp.eq.unc p10,p11 = r34, r0 ;; } // If x NAN, ZERO, INFINITY, set *y=0 and exit @@ -161,16 +161,16 @@ GLOBAL_LIBM_ENTRY(__libm_frexp) { .mfi (p9) add r15 = 64, r15 (p9) fmpy.s0 f9 = f9, f12 - cmp.eq p10,p11 = r34, r0 ;; + cmp.eq p10,p11 = r34, r0 ;; } // true exponent stored to int pointer -// the bias is treated as 0xfffe instead of +// the bias is treated as 0xfffe instead of // normal 0xffff because we want the significand // to be in the range <=0.5 sig < 1.0 // Store the value of the exponent at the pointer in r33 -// If x>0 form significand result +// If x>0 form significand result { .mfi nop.m 999 (p8) fmerge.se f8 = f10,f9 @@ -178,7 +178,7 @@ GLOBAL_LIBM_ENTRY(__libm_frexp) } // Get signexp of normalized x -// If x<0 form significand result +// If x<0 form significand result { .mfi getf.exp r16 = f9 (p7) fmerge.se f8 = f11,f9 diff --git a/sysdeps/ia64/fpu/libm_frexpf.S b/sysdeps/ia64/fpu/libm_frexpf.S index dde2d09b4b..bf34524cd0 100644 --- a/sysdeps/ia64/fpu/libm_frexpf.S +++ b/sysdeps/ia64/fpu/libm_frexpf.S @@ -21,20 +21,20 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // // History @@ -74,7 +74,7 @@ // Registers used //============================================================== // -// general registers: +// general registers: // r14 exponent bias for x negative // r15 exponent bias for x positive // r16 signexp of x @@ -119,7 +119,7 @@ GLOBAL_LIBM_ENTRY(__libm_frexpf) // The normalization also sets fault flags and takes faults if necessary { .mfi mov r20 = 0x1003f - fnorm.s0 f9 = f8 + fnorm.s0 f9 = f8 nop.i 999 ;; } @@ -137,7 +137,7 @@ GLOBAL_LIBM_ENTRY(__libm_frexpf) { .mfi setf.exp f11 = r14 (p7) fcmp.lt.s0 p7,p8 = f8,f0 -(p6) cmp.eq.unc p10,p11 = r34, r0 ;; +(p6) cmp.eq.unc p10,p11 = r34, r0 ;; } // If x NAN, ZERO, INFINITY, set *y=0 and exit @@ -161,16 +161,16 @@ GLOBAL_LIBM_ENTRY(__libm_frexpf) { .mfi (p9) add r15 = 64, r15 (p9) fmpy.s0 f9 = f9, f12 - cmp.eq p10,p11 = r34, r0 ;; + cmp.eq p10,p11 = r34, r0 ;; } // true exponent stored to int pointer -// the bias is treated as 0xfffe instead of +// the bias is treated as 0xfffe instead of // normal 0xffff because we want the significand // to be in the range <=0.5 sig < 1.0 // Store the value of the exponent at the pointer in r33 -// If x>0 form significand result +// If x>0 form significand result { .mfi nop.m 999 (p8) fmerge.se f8 = f10,f9 @@ -178,7 +178,7 @@ GLOBAL_LIBM_ENTRY(__libm_frexpf) } // Get signexp of normalized x -// If x<0 form significand result +// If x<0 form significand result { .mfi getf.exp r16 = f9 (p7) fmerge.se f8 = f11,f9 diff --git a/sysdeps/ia64/fpu/libm_frexpl.S b/sysdeps/ia64/fpu/libm_frexpl.S index 64f30b6364..3c3bba0822 100644 --- a/sysdeps/ia64/fpu/libm_frexpl.S +++ b/sysdeps/ia64/fpu/libm_frexpl.S @@ -21,20 +21,20 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // // History @@ -74,7 +74,7 @@ // Registers used //============================================================== // -// general registers: +// general registers: // r14 exponent bias for x negative // r15 exponent bias for x positive // r16 signexp of x @@ -119,7 +119,7 @@ GLOBAL_LIBM_ENTRY(__libm_frexpl) // The normalization also sets fault flags and takes faults if necessary { .mfi mov r20 = 0x1003f - fnorm.s0 f9 = f8 + fnorm.s0 f9 = f8 nop.i 999 ;; } @@ -137,7 +137,7 @@ GLOBAL_LIBM_ENTRY(__libm_frexpl) { .mfi setf.exp f11 = r14 (p7) fcmp.lt.s0 p7,p8 = f8,f0 -(p6) cmp.eq.unc p10,p11 = r35, r0 ;; +(p6) cmp.eq.unc p10,p11 = r35, r0 ;; } // If x NAN, ZERO, INFINITY, set *y=0 and exit @@ -161,16 +161,16 @@ GLOBAL_LIBM_ENTRY(__libm_frexpl) { .mfi (p9) add r15 = 64, r15 (p9) fmpy.s0 f9 = f9, f12 - cmp.eq p10,p11 = r35, r0 ;; + cmp.eq p10,p11 = r35, r0 ;; } // true exponent stored to int pointer -// the bias is treated as 0xfffe instead of +// the bias is treated as 0xfffe instead of // normal 0xffff because we want the significand // to be in the range <=0.5 sig < 1.0 // Store the value of the exponent at the pointer in r34 -// If x>0 form significand result +// If x>0 form significand result { .mfi nop.m 999 (p8) fmerge.se f8 = f10,f9 @@ -178,7 +178,7 @@ GLOBAL_LIBM_ENTRY(__libm_frexpl) } // Get signexp of normalized x -// If x<0 form significand result +// If x<0 form significand result { .mfi getf.exp r16 = f9 (p7) fmerge.se f8 = f11,f9 diff --git a/sysdeps/ia64/fpu/libm_scalblnf.S b/sysdeps/ia64/fpu/libm_scalblnf.S index af620d45f8..56de44a0c4 100644 --- a/sysdeps/ia64/fpu/libm_scalblnf.S +++ b/sysdeps/ia64/fpu/libm_scalblnf.S @@ -48,8 +48,8 @@ // // API //============================================================== -// float __libm_scalblnf (float x, long int n, int long_int_type) -// input floating point f8 and long int n (r33) +// float __libm_scalblnf (float x, long int n, int long_int_type) +// input floating point f8 and long int n (r33) // input long_int_type = 0 if long int defined as 32 bits, = 1 if 64 bits // output floating point f8 // diff --git a/sysdeps/ia64/fpu/libm_tan.S b/sysdeps/ia64/fpu/libm_tan.S index 179ea9c323..655a864552 100644 --- a/sysdeps/ia64/fpu/libm_tan.S +++ b/sysdeps/ia64/fpu/libm_tan.S @@ -2,7 +2,7 @@ // Copyright (C) 2000, 2001, Intel Corporation // All rights reserved. -// +// // Contributed 2/2/2000 by John Harrison, Ted Kubaska, Bob Norin, Shane Story, // and Ping Tak Peter Tang of the Computational Software Lab, Intel Corporation. // @@ -21,26 +21,26 @@ // products derived from this software without specific prior written // permission. // -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://developer.intel.com/opensource. // // ********************************************************************* // -// History: -// 02/02/00 Initial Version +// History: +// 02/02/00 Initial Version // 4/04/00 Unwind support added // 12/28/00 Fixed false invalid flags // @@ -50,7 +50,7 @@ // // ********************************************************************* // -// Accuracy: Very accurate for double-precision values +// Accuracy: Very accurate for double-precision values // // ********************************************************************* // @@ -72,7 +72,7 @@ // // Denormal fault raised on denormal inputs // Overflow exceptions do not occur -// Underflow exceptions raised when appropriate for tan +// Underflow exceptions raised when appropriate for tan // (No specialized error handling for this routine) // Inexact raised when appropriate by algorithm // @@ -218,7 +218,7 @@ // tan( B + x ) = ------------------------ // 1 - tan(B)*tan(x) // -// / \ +// / \ // | tan(B) + tan(x) | // = tan(B) + | ------------------------ - tan(B) | @@ -251,7 +251,7 @@ // cot( B + x ) = ------------------------ // tan(B) + tan(x) // -// / \ +// / \ // | 1 - tan(B)*tan(x) | // = cot(B) + | ----------------------- - cot(B) | @@ -315,7 +315,7 @@ // / (1/[sin(B)*cos(B)]) * tan(x) // tan(Arg) = sgn_r * | tan(B) + -------------------------------- // \ cot(B) - tan(x) -// \ +// \ // + CORR | // / @@ -335,7 +335,7 @@ // / (1/[sin(B)*cos(B)]) * tan(x) // tan(Arg) = sgn_r * | -cot(B) + -------------------------------- // \ tan(B) + tan(x) -// \ +// \ // + CORR | // / @@ -457,7 +457,7 @@ // / (1/[sin(B)*cos(B)]) * tan(x) // sgn_r * | tan(B) + -------------------------------- + // \ cot(B) - tan(x) -// \ +// \ // CORR | // / @@ -562,7 +562,7 @@ // / (1/[sin(B)*cos(B)]) * tan(x) // sgn_r * | -cot(B) + -------------------------------- + // \ tan(B) + tan(x) -// \ +// \ // CORR | // / @@ -913,7 +913,7 @@ data4 0xAE8C11FD, 0x800960AD, 0x00004000, 0x00000000 data4 0x5FDBEC21, 0x8000E147, 0x00004000, 0x00000000 data4 0xA07791FA, 0x80186650, 0x00004000, 0x00000000 -Arg = f8 +Arg = f8 Result = f8 fp_tmp = f9 U_2 = f10 @@ -1021,15 +1021,15 @@ delta1 = r36 table_ptr1 = r37 table_ptr2 = r38 i_0 = r39 -i_1 = r40 -N_fix_gr = r41 -N_inc = r42 -exp_Arg = r43 -exp_r = r44 -sig_r = r45 -lookup = r46 -table_offset = r47 -Create_B = r48 +i_1 = r40 +N_fix_gr = r41 +N_inc = r42 +exp_Arg = r43 +exp_r = r44 +sig_r = r45 +lookup = r46 +table_offset = r47 +Create_B = r48 gr_tmp = r49 GR_Parameter_X = r49 @@ -1042,12 +1042,12 @@ GR_Parameter_r = r50 .proc __libm_tan -__libm_tan: +__libm_tan: { .mfi alloc r32 = ar.pfs, 0,17,2,0 (p0) fclass.m.unc p6,p0 = Arg, 0x1E7 - addl gr_tmp = -1,r0 + addl gr_tmp = -1,r0 } ;; @@ -1073,7 +1073,7 @@ alloc r32 = ar.pfs, 0,17,2,0 ;; // -// Check for NatVals, Infs , NaNs, and Zeros +// Check for NatVals, Infs , NaNs, and Zeros // Check for everything - if false, then must be pseudo-zero // or pseudo-nan. // Local table pointer @@ -1081,12 +1081,12 @@ alloc r32 = ar.pfs, 0,17,2,0 { .mbb (p0) add table_ptr2 = 96, table_ptr1 -(p6) br.cond.spnt __libm_TAN_SPECIAL +(p6) br.cond.spnt __libm_TAN_SPECIAL (p7) br.cond.spnt __libm_TAN_SPECIAL ;; } // // Point to Inv_P_0 -// Branch out to deal with unsupporteds and special values. +// Branch out to deal with unsupporteds and special values. // { .mmf @@ -1110,7 +1110,7 @@ alloc r32 = ar.pfs, 0,17,2,0 { .mmi (p0) ldfs NEGTWO_TO_24 = [table_ptr1],12 ;; // -// Do fcmp to generate Denormal exception +// Do fcmp to generate Denormal exception // - can't do FNORM (will generate Underflow when U is unmasked!) // Normalize input argument. // @@ -1668,12 +1668,12 @@ alloc r32 = ar.pfs, 0,17,2,0 } -TAN_LARGER_ARG: +TAN_LARGER_ARG: { .mmf (p0) addl table_ptr1 = @ltoff(TAN_BASE_CONSTANTS), gp nop.m 999 -(p0) fmpy.s1 N_0 = Arg, Inv_P_0 +(p0) fmpy.s1 N_0 = Arg, Inv_P_0 } ;; @@ -2307,7 +2307,7 @@ TAN_LARGER_ARG: } -TAN_SMALL_R: +TAN_SMALL_R: { .mii nop.m 999 @@ -2394,7 +2394,7 @@ TAN_SMALL_R: (p11) ldfe P1_8 = [table_ptr1], -16 ;; // // N even: Poly1 = P1_2 + P1_3 * rsq -// N odd: poly1 = 1.0 + S_hi * r +// N odd: poly1 = 1.0 + S_hi * r // 16 bits partial account for necessary (-1) // (p11) ldfe P1_7 = [table_ptr1], -16 @@ -2679,7 +2679,7 @@ TAN_SMALL_R: } -TAN_NORMAL_R: +TAN_NORMAL_R: { .mfi (p0) getf.sig sig_r = r @@ -2847,7 +2847,7 @@ TAN_NORMAL_R: // xsq = x * x // N even: Tx = T_hi * x // Load T_lo. -// Load C_lo - increment pointer to get SC_inv +// Load C_lo - increment pointer to get SC_inv // - cant get all the way, do an add later. // (p0) add table_ptr2 = 569, table_ptr2 ;; @@ -3216,7 +3216,7 @@ ASM_SIZE_DIRECTIVE(__libm_tan) .proc __libm_callout __libm_callout: -TAN_ARG_TOO_LARGE: +TAN_ARG_TOO_LARGE: .prologue // (1) { .mfi @@ -3258,7 +3258,7 @@ TAN_ARG_TOO_LARGE: // (4) { .mmi mov gp = GR_SAVE_GP // Restore gp -(p0) mov N_fix_gr = r8 +(p0) mov N_fix_gr = r8 nop.i 999 } ;; @@ -3304,7 +3304,7 @@ TAN_ARG_TOO_LARGE: .restore sp add sp = 64,sp // Restore stack pointer (p6) br.cond.spnt TAN_SMALL_R -(p0) br.cond.sptk TAN_NORMAL_R +(p0) br.cond.sptk TAN_NORMAL_R } ;; .endp __libm_callout @@ -3322,7 +3322,7 @@ __libm_TAN_SPECIAL: { .mfb nop.m 999 (p0) fmpy.s0 Arg = Arg, f0 -(p0) br.ret.sptk b0 +(p0) br.ret.sptk b0 } .endp __libm_TAN_SPECIAL ASM_SIZE_DIRECTIVE(__libm_TAN_SPECIAL) diff --git a/sysdeps/ia64/fpu/s_asinhl.S b/sysdeps/ia64/fpu/s_asinhl.S index d3a5507a32..2d4d7a246e 100644 --- a/sysdeps/ia64/fpu/s_asinhl.S +++ b/sysdeps/ia64/fpu/s_asinhl.S @@ -21,25 +21,25 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // //********************************************************************* // -// History: +// History: // 09/04/01 Initial version // 09/13/01 Performance improved, symmetry problems fixed // 10/10/01 Performance improved, split issues removed @@ -56,31 +56,31 @@ // // Overview of operation //============================================================== -// +// // There are 6 paths: // 1. x = 0, [S,Q]Nan or +/-INF // Return asinhl(x) = x + x; -// +// // 2. x = + denormal // Return asinhl(x) = x - x^2; -// +// // 3. x = - denormal // Return asinhl(x) = x + x^2; -// +// // 4. 'Near 0': max denormal < |x| < 1/128 // Return asinhl(x) = sign(x)*(x+x^3*(c3+x^2*(c5+x^2*(c7+x^2*(c9))))); // // 5. 'Huges': |x| > 2^63 // Return asinhl(x) = sign(x)*(logl(2*x)); -// +// // 6. 'Main path': 1/128 < |x| < 2^63 // b_hi + b_lo = x + sqrt(x^2 + 1); // asinhl(x) = sign(x)*(log_special(b_hi, b_lo)); -// -// Algorithm description +// +// Algorithm description //============================================================== // -// Main path algorithm +// Main path algorithm // ( thanks to Peter Markstein for the idea of sqrt(x^2+1) computation! ) // ************************************************************************* // @@ -89,19 +89,19 @@ // 1) p2 = (p2_hi+p2_lo) = x^2+1 obtaining // ------------------------------------ // p2_hi = x2_hi + 1, where x2_hi = x * x; -// p2_lo = x2_lo + p1_lo, where -// x2_lo = FMS(x*x-x2_hi), +// p2_lo = x2_lo + p1_lo, where +// x2_lo = FMS(x*x-x2_hi), // p1_lo = (1 - p2_hi) + x2_hi; // // 2) g = (g_hi+g_lo) = sqrt(p2) = sqrt(p2_hi+p2_lo) // ---------------------------------------------- // r = invsqrt(p2_hi) (8-bit reciprocal square root approximation); // g = p2_hi * r (first 8 bit-approximation of sqrt); -// +// // h = 0.5 * r; // e = 0.5 - g * h; // g = g * e + g (second 16 bit-approximation of sqrt); -// +// // h = h * e + h; // e = 0.5 - g * h; // g = g * e + g (third 32 bit-approximation of sqrt); @@ -109,7 +109,7 @@ // h = h * e + h; // e = 0.5 - g * h; // g_hi = g * e + g (fourth 64 bit-approximation of sqrt); -// +// // Remainder computation: // h = h * e + h; // d = (p2_hi - g_hi * g_hi) + p2_lo; @@ -119,15 +119,15 @@ // ------------------------------------------------------------------- // b_hi = (g_hi + x) + gl; // b_lo = (g_hi - b_hi) + x + gl; -// +// // Now we pass b presented as sum b_hi + b_lo to special version // of logl function which accept a pair of arguments as -// 'mutiprecision' value. -// +// 'mutiprecision' value. +// // Special log algorithm overview // ================================ // Here we use a table lookup method. The basic idea is that in -// order to compute logl(Arg) = logl (Arg-1) for an argument Arg in [1,2), +// order to compute logl(Arg) = logl (Arg-1) for an argument Arg in [1,2), // we construct a value G such that G*Arg is close to 1 and that // logl(1/G) is obtainable easily from a table of values calculated // beforehand. Thus @@ -157,7 +157,7 @@ // G := G_1 * G_2 * G_3 // r := (G * S_hi - 1) + G * S_lo // -// These G_j's have the property that the product is exactly +// These G_j's have the property that the product is exactly // representable and that |r| < 2^(-12) as a result. // // Step 2: Approximation @@ -166,7 +166,7 @@ // // Step 3: Reconstruction // -// Finally, +// Finally, // // logl( X ) = logl( 2^N * (S_hi + S_lo) ) // ~=~ N*logl(2) + logl(1/G) + logl(1 + r) @@ -176,25 +176,25 @@ // // Registers used //============================================================== -// Floating Point registers used: +// Floating Point registers used: // f8, input // f32 -> f101 (70 registers) -// General registers used: +// General registers used: // r32 -> r57 (26 registers) // Predicate registers used: // p6 -> p11 // p6 for '0, NaNs, Inf' path -// p7 for '+ denormals' path +// p7 for '+ denormals' path // p8 for 'near 0' path // p9 for 'huges' path -// p10 for '- denormals' path +// p10 for '- denormals' path // p11 for negative values // // Data tables //============================================================== - + RODATA .align 64 @@ -210,14 +210,14 @@ data8 0x999999999991D582, 0x00003FFB data8 0xAAAAAAAAAAAAAAA9, 0x0000BFFC LOCAL_OBJECT_END(Poly_C_near_0_35) -// Q coeffs +// Q coeffs LOCAL_OBJECT_START(Constants_Q) -data4 0x00000000,0xB1721800,0x00003FFE,0x00000000 +data4 0x00000000,0xB1721800,0x00003FFE,0x00000000 data4 0x4361C4C6,0x82E30865,0x0000BFE2,0x00000000 data4 0x328833CB,0xCCCCCAF2,0x00003FFC,0x00000000 data4 0xA9D4BAFB,0x80000077,0x0000BFFD,0x00000000 data4 0xAAABE3D2,0xAAAAAAAA,0x00003FFD,0x00000000 -data4 0xFFFFDAB7,0xFFFFFFFF,0x0000BFFD,0x00000000 +data4 0xFFFFDAB7,0xFFFFFFFF,0x0000BFFD,0x00000000 LOCAL_OBJECT_END(Constants_Q) // Z1 - 16 bit fixed @@ -332,7 +332,7 @@ data4 0x3F71D488,0x3D693B9D data8 0xBE049391B6B7C239 LOCAL_OBJECT_END(Constants_G_H_h2) -// G3 and H3 - IEEE single and h3 - IEEE double +// G3 and H3 - IEEE single and h3 - IEEE double LOCAL_OBJECT_START(Constants_G_H_h3) data4 0x3F7FFC00,0x38800100 data8 0x3D355595562224CD @@ -408,62 +408,62 @@ LOCAL_OBJECT_END(Constants_G_H_h3) FR_Arg = f8 FR_Res = f8 FR_AX = f32 -FR_XLog_Hi = f33 -FR_XLog_Lo = f34 +FR_XLog_Hi = f33 +FR_XLog_Lo = f34 // Special logl registers -FR_Y_hi = f35 +FR_Y_hi = f35 FR_Y_lo = f36 FR_Scale = f37 -FR_X_Prime = f38 -FR_S_hi = f39 +FR_X_Prime = f38 +FR_S_hi = f39 FR_W = f40 FR_G = f41 FR_H = f42 -FR_wsq = f43 +FR_wsq = f43 FR_w4 = f44 FR_h = f45 -FR_w6 = f46 +FR_w6 = f46 FR_G2 = f47 FR_H2 = f48 FR_poly_lo = f49 -FR_P8 = f50 +FR_P8 = f50 FR_poly_hi = f51 -FR_P7 = f52 -FR_h2 = f53 -FR_rsq = f54 +FR_P7 = f52 +FR_h2 = f53 +FR_rsq = f54 FR_P6 = f55 -FR_r = f56 +FR_r = f56 + +FR_log2_hi = f57 +FR_log2_lo = f58 -FR_log2_hi = f57 -FR_log2_lo = f58 - -FR_float_N = f59 -FR_Q4 = f60 +FR_float_N = f59 +FR_Q4 = f60 -FR_G3 = f61 -FR_H3 = f62 -FR_h3 = f63 +FR_G3 = f61 +FR_H3 = f62 +FR_h3 = f63 -FR_Q3 = f64 -FR_Q2 = f65 -FR_1LN10_hi = f66 +FR_Q3 = f64 +FR_Q2 = f65 +FR_1LN10_hi = f66 -FR_Q1 = f67 -FR_1LN10_lo = f68 -FR_P5 = f69 -FR_rcub = f70 +FR_Q1 = f67 +FR_1LN10_lo = f68 +FR_P5 = f69 +FR_rcub = f70 -FR_Neg_One = f71 -FR_Z = f72 -FR_AA = f73 -FR_BB = f74 -FR_S_lo = f75 -FR_2_to_minus_N = f76 +FR_Neg_One = f71 +FR_Z = f72 +FR_AA = f73 +FR_BB = f74 +FR_S_lo = f75 +FR_2_to_minus_N = f76 // Huge & Main path prolog registers @@ -512,22 +512,22 @@ GR_Poly_C_35 = r45 GR_Poly_C_79 = r46 // Special logl registers -GR_Index1 = r34 -GR_Index2 = r35 -GR_signif = r36 -GR_X_0 = r37 -GR_X_1 = r38 -GR_X_2 = r39 -GR_Z_1 = r40 -GR_Z_2 = r41 -GR_N = r42 -GR_Bias = r43 -GR_M = r44 -GR_Index3 = r45 -GR_exp_2tom80 = r45 -GR_exp_mask = r47 -GR_exp_2tom7 = r48 -GR_ad_ln10 = r49 +GR_Index1 = r34 +GR_Index2 = r35 +GR_signif = r36 +GR_X_0 = r37 +GR_X_1 = r38 +GR_X_2 = r39 +GR_Z_1 = r40 +GR_Z_2 = r41 +GR_N = r42 +GR_Bias = r43 +GR_M = r44 +GR_Index3 = r45 +GR_exp_2tom80 = r45 +GR_exp_mask = r47 +GR_exp_2tom7 = r48 +GR_ad_ln10 = r49 GR_ad_tbl_1 = r50 GR_ad_tbl_2 = r51 GR_ad_tbl_3 = r52 @@ -593,7 +593,7 @@ GLOBAL_LIBM_ENTRY(asinhl) { .mfb cmp.le p9, p0 = GR_TwoP63, GR_ArgExp // if arg > 2^63 ('huges') (p6) fma.s0 FR_Res = FR_Arg,f1,FR_Arg // r = a + a -(p6) br.ret.spnt b0 // return +(p6) br.ret.spnt b0 // return };; // (X^2 + 1) computation { .mfi @@ -677,7 +677,7 @@ GLOBAL_LIBM_ENTRY(asinhl) { .mfi ldfe FR_Q1 = [GR_ad_q] // Load Q1 - fma.s1 FR_GG = FR_GG, FR_EE, FR_GG // g = g * e + g + fma.s1 FR_GG = FR_GG, FR_EE, FR_GG // g = g * e + g // 16 bit Newton Raphson iteration nop.i 0 } @@ -695,7 +695,7 @@ GLOBAL_LIBM_ENTRY(asinhl) { .mfi nop.m 0 - fma.s1 FR_GG = FR_GG, FR_EE, FR_GG // g = g * e + g + fma.s1 FR_GG = FR_GG, FR_EE, FR_GG // g = g * e + g // 32 bit Newton Raphson iteration nop.i 0 } @@ -713,7 +713,7 @@ GLOBAL_LIBM_ENTRY(asinhl) { .mfi nop.m 0 - fma.s1 FR_GG = FR_GG, FR_EE, FR_GG // g = g * e + g + fma.s1 FR_GG = FR_GG, FR_EE, FR_GG // g = g * e + g // 64 bit Newton Raphson iteration nop.i 0 } @@ -806,7 +806,7 @@ GLOBAL_LIBM_ENTRY(asinhl) { .mfi nop.m 0 nop.f 0 - extr.u GR_Index2 = GR_X_1, 6, 4 // Extract bits 6-9 of X_1 + extr.u GR_Index2 = GR_X_1, 6, 4 // Extract bits 6-9 of X_1 };; @@ -839,7 +839,7 @@ GLOBAL_LIBM_ENTRY(asinhl) pmpyshr2.u GR_X_2 = GR_X_1,GR_Z_2,15 // Get bits 30-15 of X_1 * Z_2 };; -// WE CANNOT USE GR_X_2 IN NEXT 3 CYCLES ("DEAD" ZONE!) +// WE CANNOT USE GR_X_2 IN NEXT 3 CYCLES ("DEAD" ZONE!) // BECAUSE OF POSSIBLE 10 CLOCKS STALL! // So we can negate Q coefficients there for negative values @@ -1001,7 +1001,7 @@ GLOBAL_LIBM_ENTRY(asinhl) { .mfi nop.m 0 - fadd.s0 FR_Y_lo = FR_poly_hi, FR_poly_lo + fadd.s0 FR_Y_lo = FR_poly_hi, FR_poly_lo // Y_lo=poly_hi+poly_lo nop.i 0 } @@ -1088,7 +1088,7 @@ huges_logl: { .mmi ldfe FR_log2_lo = [GR_ad_q],16 // Load log2_lo - sub GR_N = GR_N, GR_Bias + sub GR_N = GR_N, GR_Bias mov GR_exp_2tom80 = 0x0ffaf // Exponent of 2^-80 };; @@ -1107,7 +1107,7 @@ huges_logl: { .mmi nop.m 0 ldfe FR_Q2 = [GR_ad_q],16 // Load Q2 - extr.u GR_Index2 = GR_X_1, 6, 4 // Extract bits 6-9 of X_1 + extr.u GR_Index2 = GR_X_1, 6, 4 // Extract bits 6-9 of X_1 };; { .mmi diff --git a/sysdeps/ia64/fpu/s_atanf.S b/sysdeps/ia64/fpu/s_atanf.S index 4da68c7f08..74d7340b17 100644 --- a/sysdeps/ia64/fpu/s_atanf.S +++ b/sysdeps/ia64/fpu/s_atanf.S @@ -183,351 +183,351 @@ LOCAL_OBJECT_END(atanf_coeff_2_table) .section .text GLOBAL_LIBM_ENTRY(atanf) -{ .mfi +{ .mfi alloc r32 = ar.pfs,1,2,0,0 frcpa.s1 atanf_z,p0 = f1,f8 addl EXP_Addr2 = @ltoff(atanf_coeff_2_table),gp -} -{ .mfi +} +{ .mfi addl EXP_Addr1 = @ltoff(atanf_coeff_1_table),gp fma.s1 atanf_t = f8,f8,f0 nop.i 999;; } - -{ .mfi + +{ .mfi nop.m 999 fmerge.s atanf_sgn_x = f8,f1 nop.i 999;; -} - -{ .mfi +} + +{ .mfi ld8 EXP_Addr1 = [EXP_Addr1] fmerge.s atanf_abs_x = f1,f8 nop.i 999 -} -{ .mfi +} +{ .mfi ld8 EXP_Addr2 = [EXP_Addr2] nop.f 999 nop.i 999;; } - -{ .mfi + +{ .mfi nop.m 999 fclass.m p8,p0 = f8,0x7 // @zero nop.i 999;; -} - -{ .mfi +} + +{ .mfi nop.m 999 fcmp.eq.unc.s0 p9,p10 = f8,f1 nop.i 999;; -} - -{ .mfi +} + +{ .mfi ldfpd atanf_coeff_R4,atanf_coeff_R5 = [EXP_Addr1],16 fnma.s1 atanf_b = f8,atanf_z,f1 nop.i 999 -} -{ .mfi +} +{ .mfi ldfpd atanf_coeff_R1,atanf_coeff_R2 = [EXP_Addr2],16 fma.s1 atanf_zsq = atanf_z,atanf_z,f0 nop.i 999;; } - -{ .mfi + +{ .mfi ldfpd atanf_coeff_R3,atanf_coeff_P1 = [EXP_Addr1],16 fma.s1 atanf_xcub = f8,atanf_t,f0 nop.i 999 -} -{ .mfi +} +{ .mfi ldfpd atanf_coeff_Q6,atanf_coeff_Q7 = [EXP_Addr2],16 fma.s1 atanf_tsq = atanf_t,atanf_t,f0 nop.i 999;; } - -{ .mfi + +{ .mfi ldfpd atanf_coeff_Q8,atanf_coeff_Q9 = [EXP_Addr1],16 // fcmp.le.s1 atanf_pred_LE1,atanf_pred_GT1 = atanf_abs_x,f1 fcmp.le.s1 p6,p7 = atanf_abs_x,f1 nop.i 999 -} -{ .mfi +} +{ .mfi ldfpd atanf_coeff_Q4,atanf_coeff_Q5 = [EXP_Addr2],16 nop.f 999 nop.i 999;; } - -{ .mfi + +{ .mfi ldfpd atanf_coeff_Q2,atanf_coeff_Q3 = [EXP_Addr1],16 fclass.m p8,p0 = f8,0xe7 // @inf|@qnan|@snan|@zero nop.i 999 -} -{ .mfi +} +{ .mfi ldfpd atanf_coeff_P5,atanf_coeff_P6 = [EXP_Addr2],16 nop.f 999 nop.i 999;; } - -{ .mfi + +{ .mfi ldfpd atanf_coeff_Q0,atanf_coeff_Q1 = [EXP_Addr1],16 nop.f 999 nop.i 999 -} -{ .mfi +} +{ .mfi ldfpd atanf_coeff_P7,atanf_coeff_P8 = [EXP_Addr2],16 nop.f 999 nop.i 999;; } - -{ .mfi + +{ .mfi ldfpd atanf_coeff_P3,atanf_coeff_P4 = [EXP_Addr1],16 fma.s1 atanf_bsq = atanf_b,atanf_b,f0 nop.i 999 -} -{ .mfi +} +{ .mfi ldfpd atanf_coeff_P9,atanf_coeff_P10 = [EXP_Addr2] fma.s1 atanf_z4 = atanf_zsq,atanf_zsq,f0 nop.i 999;; } - -{ .mfi + +{ .mfi ldfpd atanf_coeff_P2,atanf_piby2 = [EXP_Addr1] fma.s1 atanf_x6 = atanf_t,atanf_tsq,f0 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 fma.s1 atanf_t4 = atanf_tsq,atanf_tsq,f0 nop.i 999;; } - -{ .mfb + +{ .mfb nop.m 999 fma.s1 atanf_x5 = atanf_t,atanf_xcub,f0 (p8) br.cond.spnt ATANF_X_INF_NAN_ZERO -} +} ;; - -{ .mfi + +{ .mfi nop.m 999 fma.s1 atanf_poly_r1 = atanf_b,atanf_coeff_R1,f1 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 fma.s1 atanf_poly_r3 = atanf_b,atanf_coeff_R5,atanf_coeff_R4 nop.i 999;; } - -{ .mfi + +{ .mfi nop.m 999 fma.s1 atanf_poly_r2 = atanf_b,atanf_coeff_R3,atanf_coeff_R2 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 fma.s1 atanf_z8 = atanf_z4,atanf_z4,f0 nop.i 999;; } - -{ .mfi + +{ .mfi nop.m 999 fma.s1 atanf_poly_q2 = atanf_t,atanf_coeff_Q5,atanf_coeff_Q4 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 fma.s1 atanf_poly_q3 = atanf_t,atanf_coeff_Q7,atanf_coeff_Q6 nop.i 999;; } - -{ .mfi + +{ .mfi nop.m 999 fma.s1 atanf_z5 = atanf_z,atanf_z4,f0 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 fma.s1 atanf_poly_q1 = atanf_t,atanf_coeff_Q9,atanf_coeff_Q8 nop.i 999;; } - -{ .mfi + +{ .mfi nop.m 999 fma.s1 atanf_poly_q4 = atanf_t,atanf_coeff_Q1,atanf_coeff_Q0 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 fma.s1 atanf_poly_q5 = atanf_t,atanf_coeff_Q3,atanf_coeff_Q2 nop.i 999;; } - -{ .mfi + +{ .mfi nop.m 999 fma.s1 atanf_poly_p4 = f8,atanf_coeff_P1,f0 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 fma.s1 atanf_poly_p5 = atanf_t,atanf_coeff_P4,atanf_coeff_P3 nop.i 999;; } - -{ .mfi + +{ .mfi nop.m 999 fma.s1 atanf_poly_r1 = atanf_z8,atanf_poly_r1,f0 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 fma.s1 atanf_z8_bsq = atanf_z8,atanf_bsq,f0 nop.i 999;; } - -{ .mfi + +{ .mfi nop.m 999 fma.s1 atanf_poly_q2 = atanf_tsq,atanf_poly_q3,atanf_poly_q2 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 fma.s1 atanf_poly_r2 = atanf_bsq,atanf_poly_r3,atanf_poly_r2 nop.i 999;; } - -{ .mfi + +{ .mfi nop.m 999 fma.s1 atanf_poly_p2 = atanf_t,atanf_coeff_P8,atanf_coeff_P7 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 fma.s1 atanf_poly_q1 = atanf_poly_q1,f1,atanf_tsq nop.i 999;; } - -{ .mfi + +{ .mfi nop.m 999 fma.s1 atanf_z13 = atanf_z5,atanf_z8,f0 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 fma.s1 atanf_poly_p1 = atanf_t,atanf_coeff_P10,atanf_coeff_P9 nop.i 999;; } - -{ .mfi + +{ .mfi nop.m 999 fma.s1 atanf_poly_p4 = atanf_t,atanf_poly_p4,f8 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 fma.s1 atanf_poly_q4 = atanf_tsq,atanf_poly_q5,atanf_poly_q4 nop.i 999;; } - -{ .mfi + +{ .mfi nop.m 999 fma.s1 atanf_poly_p3 = atanf_t,atanf_coeff_P6,atanf_coeff_P5 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 fma.s1 atanf_poly_p5 = atanf_t,atanf_poly_p5,atanf_coeff_P2 nop.i 999;; } - -{ .mfi + +{ .mfi nop.m 999 fma.s1 atanf_x11 = atanf_x5,atanf_x6,f0 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 fma.s1 atanf_poly_r = atanf_z8_bsq,atanf_poly_r2,atanf_poly_r1 nop.i 999;; } - -{ .mfi + +{ .mfi nop.m 999 fma.s0 atanf_sgnx_piby2 = atanf_sgn_x,atanf_piby2,f0 nop.i 999 -} -{ .mfi +} +{ .mfi nop.m 999 fma.s1 atanf_poly_q2 = atanf_t4,atanf_poly_q1,atanf_poly_q2 nop.i 999;; } - -{ .mfi + +{ .mfi nop.m 999 fma.s1 atanf_poly_p1 = atanf_tsq,atanf_poly_p1,atanf_poly_p2 nop.i 999;; -} - -{ .mfi +} + +{ .mfi nop.m 999 fma.s1 atanf_poly_p4 = atanf_x5,atanf_poly_p5,atanf_poly_p4 nop.i 999;; -} - -{ .mfi +} + +{ .mfi nop.m 999 fma.s1 atanf_z21_poly_r = atanf_z13,atanf_poly_r,f0 nop.i 999;; -} - -{ .mfi +} + +{ .mfi nop.m 999 fma.s1 atanf_poly_q = atanf_t4,atanf_poly_q2,atanf_poly_q4 nop.i 999;; -} - -{ .mfi +} + +{ .mfi nop.m 999 fma.s1 atanf_poly_p1 = atanf_tsq,atanf_poly_p1,atanf_poly_p3 nop.i 999;; -} - -{ .mfi +} + +{ .mfi nop.m 999 //(atanf_pred_GT1) fnma.s atanf_answer = atanf_poly_q,atanf_z21_poly_r,atanf_sgnx_piby2 (p7) fnma.s.s0 atanf_answer = atanf_poly_q,atanf_z21_poly_r,atanf_sgnx_piby2 nop.i 999;; -} - -{ .mfb +} + +{ .mfb nop.m 999 //(atanf_pred_LE1) fma.s atanf_answer = atanf_x11,atanf_poly_p1,atanf_poly_p4 (p6) fma.s.s0 atanf_answer = atanf_x11,atanf_poly_p1,atanf_poly_p4 br.ret.sptk b0 -} +} diff --git a/sysdeps/ia64/fpu/s_atanl.S b/sysdeps/ia64/fpu/s_atanl.S index 1a23611307..fea68abfde 100644 --- a/sysdeps/ia64/fpu/s_atanl.S +++ b/sysdeps/ia64/fpu/s_atanl.S @@ -21,20 +21,20 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // // @@ -82,25 +82,25 @@ // IEEE Special Conditions: // // Denormal fault raised on denormal inputs -// Underflow exceptions may occur +// Underflow exceptions may occur // Special error handling for the y=0 and x=0 case // Inexact raised when appropriate by algorithm // // atanl(SNaN) = QNaN // atanl(QNaN) = QNaN // atanl(+/-0) = +/- 0 -// atanl(+/-Inf) = +/-pi/2 +// atanl(+/-Inf) = +/-pi/2 // // atan2l(Any NaN for x or y) = QNaN -// atan2l(+/-0,x) = +/-0 for x > 0 -// atan2l(+/-0,x) = +/-pi for x < 0 -// atan2l(+/-0,+0) = +/-0 -// atan2l(+/-0,-0) = +/-pi +// atan2l(+/-0,x) = +/-0 for x > 0 +// atan2l(+/-0,x) = +/-pi for x < 0 +// atan2l(+/-0,+0) = +/-0 +// atan2l(+/-0,-0) = +/-pi // atan2l(y,+/-0) = pi/2 y > 0 // atan2l(y,+/-0) = -pi/2 y < 0 // atan2l(+/-y, Inf) = +/-0 for finite y > 0 -// atan2l(+/-Inf, x) = +/-pi/2 for finite x -// atan2l(+/-y, -Inf) = +/-pi for finite y > 0 +// atan2l(+/-Inf, x) = +/-pi/2 for finite x +// atan2l(+/-y, -Inf) = +/-pi for finite y > 0 // atan2l(+/-Inf, Inf) = +/-pi/4 // atan2l(+/-Inf, -Inf) = +/-3pi/4 // @@ -549,20 +549,20 @@ GR_SAVE_PFS = r33 GR_SAVE_B0 = r34 GR_SAVE_GP = r35 sign_X = r36 -sign_Y = r37 -swap = r38 -table_ptr1 = r39 -table_ptr2 = r40 -k = r41 -lookup = r42 -exp_ArgX = r43 -exp_ArgY = r44 -exponent_Q = r45 -significand_Q = r46 -special = r47 -sp_exp_Q = r48 -sp_exp_4sig_Q = r49 -table_base = r50 +sign_Y = r37 +swap = r38 +table_ptr1 = r39 +table_ptr2 = r40 +k = r41 +lookup = r42 +exp_ArgX = r43 +exp_ArgY = r44 +exponent_Q = r45 +significand_Q = r46 +special = r47 +sp_exp_Q = r48 +sp_exp_4sig_Q = r49 +table_base = r50 int_temp = r51 GR_Parameter_X = r49 @@ -572,7 +572,7 @@ GR_Parameter_TAG = r52 GR_temp = r52 RODATA -.align 16 +.align 16 LOCAL_OBJECT_START(Constants_atan) // double pi/2 @@ -597,7 +597,7 @@ data8 0xE36F716D2A5F89BD, 0x3FFB // Q_4 // Entries Tbl_lo (single precision) // B = 1+Index/16+1/32 Index = 0 // -data8 0x3FE9A000A935BD8E +data8 0x3FE9A000A935BD8E data4 0x23ACA08F, 0x00000000 // // Entries Tbl_hi (double precision) Index = 0,1,...,15 @@ -605,37 +605,37 @@ data4 0x23ACA08F, 0x00000000 // Entries Tbl_lo (single precision) // Index = 0,1,...,15 B = 2^(-1)*(1+Index/16+1/32) // -data8 0x3FDE77EB7F175A34 +data8 0x3FDE77EB7F175A34 data4 0x238729EE, 0x00000000 -data8 0x3FE0039C73C1A40B +data8 0x3FE0039C73C1A40B data4 0x249334DB, 0x00000000 -data8 0x3FE0C6145B5B43DA +data8 0x3FE0C6145B5B43DA data4 0x22CBA7D1, 0x00000000 -data8 0x3FE1835A88BE7C13 +data8 0x3FE1835A88BE7C13 data4 0x246310E7, 0x00000000 -data8 0x3FE23B71E2CC9E6A +data8 0x3FE23B71E2CC9E6A data4 0x236210E5, 0x00000000 -data8 0x3FE2EE628406CBCA +data8 0x3FE2EE628406CBCA data4 0x2462EAF5, 0x00000000 -data8 0x3FE39C391CD41719 +data8 0x3FE39C391CD41719 data4 0x24B73EF3, 0x00000000 -data8 0x3FE445065B795B55 +data8 0x3FE445065B795B55 data4 0x24C11260, 0x00000000 -data8 0x3FE4E8DE5BB6EC04 +data8 0x3FE4E8DE5BB6EC04 data4 0x242519EE, 0x00000000 -data8 0x3FE587D81F732FBA +data8 0x3FE587D81F732FBA data4 0x24D4346C, 0x00000000 -data8 0x3FE6220D115D7B8D +data8 0x3FE6220D115D7B8D data4 0x24ED487B, 0x00000000 -data8 0x3FE6B798920B3D98 +data8 0x3FE6B798920B3D98 data4 0x2495FF1E, 0x00000000 -data8 0x3FE748978FBA8E0F +data8 0x3FE748978FBA8E0F data4 0x223D9531, 0x00000000 -data8 0x3FE7D528289FA093 +data8 0x3FE7D528289FA093 data4 0x242B0411, 0x00000000 -data8 0x3FE85D69576CC2C5 +data8 0x3FE85D69576CC2C5 data4 0x2335B374, 0x00000000 -data8 0x3FE8E17AA99CC05D +data8 0x3FE8E17AA99CC05D data4 0x24C27CFB, 0x00000000 // // Entries Tbl_hi (double precision) Index = 0,1,...,15 @@ -643,7 +643,7 @@ data4 0x24C27CFB, 0x00000000 // Entries Tbl_lo (single precision) // Index = 0,1,...,15 B = 2^(-2)*(1+Index/16+1/32) // -data8 0x3FD025FA510665B5 +data8 0x3FD025FA510665B5 data4 0x24263482, 0x00000000 data8 0x3FD1151A362431C9 data4 0x242C8DC9, 0x00000000 @@ -771,19 +771,19 @@ GLOBAL_IEEE754_ENTRY(atanl) { .mfi ldfd P_hi = [table_ptr1],8 // Load double precision hi part of pi fclass.m p8,p0 = ArgY_orig, 0x1e7 // Test y natval, nan, inf, zero - nop.i 999 + nop.i 999 } ;; { .mfi ldfps P_lo, TWO_TO_NEG3 = [table_ptr1], 8 // Load P_lo and constant 2^-3 - nop.f 999 - nop.i 999 + nop.f 999 + nop.i 999 } { .mfi nop.m 999 fma.s1 M = f1, f1, f0 // Set M = 1.0 - nop.i 999 + nop.i 999 } ;; @@ -803,7 +803,7 @@ GLOBAL_IEEE754_ENTRY(atanl) { .mfi nop.m 999 fcmp.ge.s1 p6,p7 = Xsq, Ysq // Test for |x| >= |y| using squares - nop.i 999 + nop.i 999 } { .mfb nop.m 999 @@ -857,19 +857,19 @@ GLOBAL_IEEE754_ENTRY(atan2l) { .mfi ldfd P_hi = [table_ptr1],8 // Load double precision hi part of pi fclass.m p8,p0 = ArgY_orig, 0x1e7 // Test y natval, nan, inf, zero - nop.i 999 + nop.i 999 } ;; { .mfi ldfps P_lo, TWO_TO_NEG3 = [table_ptr1], 8 // Load P_lo and constant 2^-3 fclass.m p9,p0 = ArgX_orig, 0x1e7 // Test x natval, nan, inf, zero - nop.i 999 + nop.i 999 } { .mfi nop.m 999 fma.s1 M = f1, f1, f0 // Set M = 1.0 - nop.i 999 + nop.i 999 } ;; @@ -889,7 +889,7 @@ GLOBAL_IEEE754_ENTRY(atan2l) { .mfi nop.m 999 fcmp.ge.s1 p6,p7 = Xsq, Ysq // Test for |x| >= |y| using squares - nop.i 999 + nop.i 999 } { .mfb nop.m 999 @@ -995,7 +995,7 @@ ATANL_COMMON: } ;; -// Create a single precision representation of the signexp of Q with the +// Create a single precision representation of the signexp of Q with the // 4 most significant bits of the significand followed by a 1 and then 18 0's { .mfi nop.m 999 @@ -1071,7 +1071,7 @@ ATANL_COMMON: ;; // -// Generate sign_exp_Q b_1 b_2 b_3 b_4 1 0 0 0 ... 0 in single precision +// Generate sign_exp_Q b_1 b_2 b_3 b_4 1 0 0 0 ... 0 in single precision // representation. Note sign of Q is always 0. // { .mfi @@ -1185,7 +1185,7 @@ ATANL_COMMON: // C_hi_hold = 1 - C_hi * U_prime_hi (1) { .mfi nop.m 999 - fnma.s1 C_hi_hold = C_hi, U_prime_hi, f1 + fnma.s1 C_hi_hold = C_hi, U_prime_hi, f1 nop.i 999 } ;; @@ -1222,7 +1222,7 @@ ATANL_COMMON: // C_hi_hold = 1 - C_hi * U_prime_hi (3) { .mfi nop.m 999 - fnma.s1 C_hi_hold = C_hi, U_prime_hi, f1 + fnma.s1 C_hi_hold = C_hi, U_prime_hi, f1 nop.i 999 } ;; @@ -1342,7 +1342,7 @@ ATANL_COMMON: ;; -ATANL_POLY: +ATANL_POLY: // Here if 0 < V/U < 2^-3 // // *********************************************** @@ -1523,7 +1523,7 @@ ATANL_POLY: // Create small double in case need to raise underflow { .mfi - setf.d FR_temp = GR_temp + setf.d FR_temp = GR_temp fma.s1 poly = z8, poly1, poly2 // poly = poly2 + z8 * poly1 nop.i 999 } @@ -1635,9 +1635,9 @@ ATANL_POLY: } ;; -// +// // If Res_lo is denormal test if Result equals zero -// +// { .mfi nop.m 999 (p14) fclass.m.unc p14, p0 = Result, 0x07 @@ -1657,10 +1657,10 @@ ATANL_POLY: ;; -ATANL_UNSUPPORTED: +ATANL_UNSUPPORTED: { .mfb nop.m 999 - fmpy.s0 Result = ArgX,ArgY + fmpy.s0 Result = ArgX,ArgY br.ret.sptk b0 } ;; @@ -1713,7 +1713,7 @@ ATANL_X_SPECIAL: // Here if x or y inf or zero -ATANL_SPECIAL_HANDLING: +ATANL_SPECIAL_HANDLING: { .mfi nop.m 999 fclass.m p6, p7 = ArgY_orig, 0x007 // Test y zero @@ -1809,7 +1809,7 @@ ATANL_SPECIAL_HANDLING: ;; // Here if y not zero -ATANL_ArgY_Not_ZERO: +ATANL_ArgY_Not_ZERO: { .mfi nop.m 999 fclass.m p0, p10 = ArgY, 0x023 // Test y inf @@ -1841,7 +1841,7 @@ ATANL_ArgY_Not_ZERO: ;; { .mfi -(p6) add table_ptr1 = 16, table_ptr1 // Point to pi/2, if x finite +(p6) add table_ptr1 = 16, table_ptr1 // Point to pi/2, if x finite fclass.m p8, p0 = ArgX, 0x022 // Test for x=-inf nop.i 999 } @@ -1886,7 +1886,7 @@ ATANL_ArgY_Not_ZERO: ;; // Here if y not INF, and x=0 or INF -ATANL_ArgY_Not_INF: +ATANL_ArgY_Not_INF: // // Return +PI/2 when ArgY NOT Inf, ArgY > 0 and ArgX = +/-0 // Return -PI/2 when ArgY NOT Inf, ArgY < 0 and ArgX = +/-0 @@ -1953,7 +1953,7 @@ ATANL_ArgY_Not_INF: ;; GLOBAL_IEEE754_END(atan2l) - + LOCAL_LIBM_ENTRY(__libm_error_region) .prologue { .mfi diff --git a/sysdeps/ia64/fpu/s_cbrtl.S b/sysdeps/ia64/fpu/s_cbrtl.S index 76ef12f334..00d1aede6d 100644 --- a/sysdeps/ia64/fpu/s_cbrtl.S +++ b/sysdeps/ia64/fpu/s_cbrtl.S @@ -56,7 +56,7 @@ // // The result is computed as // cbrt(x)= cbrt(1 - (1 - x*y)) * (1/cbrt(y)) -// where y = frcpa(x) = (-1)^sgn_y * 2^(3*k+j) * m_y, +// where y = frcpa(x) = (-1)^sgn_y * 2^(3*k+j) * m_y, // m_y in [1,2), j in {0,1,2} // // cbrt(1 - (1 - x*y)) is approximated by a degree-6 polynomial @@ -68,13 +68,13 @@ // (double-extended precision) and D (single precision) as follows: // T_hi (1 + D)= 1/cbrt(y) to about 80 bits of accuracy // -// The tables are only stored for three exponent values (i.e. +// The tables are only stored for three exponent values (i.e. // only for 2^j * m_y, where j in {0,1,2} and m_y covers the 256 // possible mantissas for an frcpa result); the index is formed // by the 8 leading mantissa bits of x, which is the same index used // by the hardware to get frcpa(x). // -// The table values are multiplied by 2^k where e is the exponent of +// The table values are multiplied by 2^k where e is the exponent of // the input number. This multiplication is carried out in parallel with // the polynomial evaluation: // T= 2^(k) * T_hi @@ -127,7 +127,7 @@ GR_TMP1 = r21 GR_SGNMASK = r22 GR_T_INDEX = r23 - GR_IX_T = r23 + GR_IX_T = r23 GR_IX_D = r24 GR_D_INDEX = r24 GR_TMP2 = r25 @@ -817,7 +817,7 @@ GLOBAL_LIBM_ENTRY(cbrtl) and GR_SIGN = GR_NORMEXPSGN, GR_SGNMASK // eliminate leading 1 from GR_NORMSIG = 2nd table index shl GR_INDEX2 = GR_NORMSIG, 1 - // eliminate sign from exponent + // eliminate sign from exponent andcm GR_NORMEXP = GR_NORMEXPSGN, GR_SGNMASK } ;; @@ -829,8 +829,8 @@ GLOBAL_LIBM_ENTRY(cbrtl) (p6) fnma.s1 FR_R = FR_RCP, FR_XNORM, f1 // Start computation of floor(exponent/3) by // computing (2^20+2)/3*exponent = exponent*0x55556 - // 1: exponent* = 5; - // (2^{16}-1)/3 = 0x5555: + // 1: exponent* = 5; + // (2^{16}-1)/3 = 0x5555: // will form 0x5555*exponent by using shladd's shladd GR_EXP5 = GR_NORMEXP, 2, GR_NORMEXP } diff --git a/sysdeps/ia64/fpu/s_cos.S b/sysdeps/ia64/fpu/s_cos.S index fc121fce19..d27843613e 100644 --- a/sysdeps/ia64/fpu/s_cos.S +++ b/sysdeps/ia64/fpu/s_cos.S @@ -52,7 +52,7 @@ // 09/05/02 Work range is widened by reduction strengthen (3 parts of Pi/16) // 02/10/03 Reordered header: .section, .global, .proc, .align // 08/08/03 Improved performance -// 10/28/04 Saved sincos_r_sincos to avoid clobber by dynamic loader +// 10/28/04 Saved sincos_r_sincos to avoid clobber by dynamic loader // 03/31/05 Reformatted delimiters between data tables // API @@ -71,12 +71,12 @@ // nfloat = Round result to integer (round-to-nearest) // // r = x - nfloat * pi/2^k -// Do this as ((((x - nfloat * HIGH(pi/2^k))) - -// nfloat * LOW(pi/2^k)) - +// Do this as ((((x - nfloat * HIGH(pi/2^k))) - +// nfloat * LOW(pi/2^k)) - // nfloat * LOWEST(pi/2^k) for increased accuracy. // pi/2^k is stored as two numbers that when added make pi/2^k. // pi/2^k = HIGH(pi/2^k) + LOW(pi/2^k) -// HIGH and LOW parts are rounded to zero values, +// HIGH and LOW parts are rounded to zero values, // and LOWEST is rounded to nearest one. // // x = (nfloat * pi/2^k) + r @@ -508,7 +508,7 @@ _SINCOS_COMMON2: { .mfi ldfe sincos_Pi_by_16_3 = [sincos_AD_1],16 nop.f 999 - dep.z sincos_r_exp = sincos_r_signexp, 0, 17 + dep.z sincos_r_exp = sincos_r_signexp, 0, 17 };; // Polynomial coefficients (Q4, P4, Q3, P3, Q2, Q1, P2, P1) loading @@ -516,7 +516,7 @@ _SINCOS_COMMON2: // p10 is true if f8 exp is >= 0x1001a (2^27) { .mmb ldfpd sincos_P4,sincos_Q4 = [sincos_AD_1],16 - cmp.ge p10,p0 = sincos_r_exp,sincos_exp_limit + cmp.ge p10,p0 = sincos_r_exp,sincos_exp_limit (p10) br.cond.spnt _SINCOS_LARGE_ARGS // Go to "large args" routine };; @@ -542,7 +542,7 @@ _SINCOS_COMMON2: { .mfi ldfpd sincos_P1,sincos_Q1 = [sincos_AD_1],16 fnma.s1 sincos_r = sincos_NFLOAT, sincos_Pi_by_16_1, sincos_NORM_f8 - nop.i 999 + nop.i 999 };; // Add 2^(k-1) (which is in sincos_r_sincos) to N @@ -551,7 +551,7 @@ _SINCOS_COMMON2: ;; // Get M (least k+1 bits of N) and sincos_GR_m = 0x1f,sincos_GR_n - nop.i 999 + nop.i 999 };; // sincos_r = sincos_r -sincos_Nfloat * sincos_Pi_by_16_2 @@ -566,14 +566,14 @@ _SINCOS_COMMON2: { .mfi add sincos_AD_2 = sincos_GR_32m, sincos_AD_1 (p8) fclass.m.unc p10,p0 = f8,0x0b - nop.i 999 + nop.i 999 };; // Load Sin and Cos table value using obtained index m (sincosf_AD_2) { .mfi ldfe sincos_Sm = [sincos_AD_2],16 - nop.f 999 - nop.i 999 + nop.f 999 + nop.i 999 };; // get rsq = r*r @@ -585,17 +585,17 @@ _SINCOS_COMMON2: { .mfi nop.m 999 fmpy.s0 fp_tmp = fp_tmp,fp_tmp // forces inexact flag - nop.i 999 + nop.i 999 };; // sincos_r_exact = sincos_r -sincos_Nfloat * sincos_Pi_by_16_3 { .mfi nop.m 999 fnma.s1 sincos_r_exact = sincos_NFLOAT, sincos_Pi_by_16_3, sincos_r - nop.i 999 + nop.i 999 };; -// Polynomials calculation +// Polynomials calculation // P_1 = P4*r^2 + P3 // Q_2 = Q4*r^2 + Q3 { .mfi @@ -606,7 +606,7 @@ _SINCOS_COMMON2: { .mfi nop.m 999 fma.s1 sincos_Q_temp1 = sincos_rsq, sincos_Q4, sincos_Q3 - nop.i 999 + nop.i 999 };; // get rcube = r^3 and S[m]*r^2 @@ -618,10 +618,10 @@ _SINCOS_COMMON2: { .mfi nop.m 999 fmpy.s1 sincos_rcub = sincos_r_exact, sincos_rsq - nop.i 999 + nop.i 999 };; -// Polynomials calculation +// Polynomials calculation // Q_2 = Q_1*r^2 + Q2 // P_1 = P_1*r^2 + P2 { .mfi @@ -632,10 +632,10 @@ _SINCOS_COMMON2: { .mfi nop.m 999 fma.s1 sincos_P_temp2 = sincos_rsq, sincos_P_temp1, sincos_P2 - nop.i 999 + nop.i 999 };; -// Polynomials calculation +// Polynomials calculation // Q = Q_2*r^2 + Q1 // P = P_2*r^2 + P1 { .mfi @@ -646,7 +646,7 @@ _SINCOS_COMMON2: { .mfi nop.m 999 fma.s1 sincos_P = sincos_rsq, sincos_P_temp2, sincos_P1 - nop.i 999 + nop.i 999 };; // Get final P and Q @@ -660,7 +660,7 @@ _SINCOS_COMMON2: { .mfi nop.m 999 fma.s1 sincos_P = sincos_rcub,sincos_P, sincos_r_exact - nop.i 999 + nop.i 999 };; // If sin(denormal), force underflow to be set @@ -701,7 +701,7 @@ _SINCOS_SPECIAL_ARGS: _SINCOS_UNORM: // Here if x=unorm { .mfb - getf.exp sincos_r_signexp = sincos_NORM_f8 // Get signexp of x + getf.exp sincos_r_signexp = sincos_NORM_f8 // Get signexp of x fcmp.eq.s0 p11,p0 = f8, f0 // Dummy op to set denorm flag br.cond.sptk _SINCOS_COMMON2 // Return to main path };; @@ -750,7 +750,7 @@ _SINCOS_LARGE_ARGS: { .mfi nop.m 999 fmpy.s0 sincos_save_tmp = sincos_save_tmp, sincos_save_tmp - nop.i 999 + nop.i 999 };; { .mib diff --git a/sysdeps/ia64/fpu/s_cosf.S b/sysdeps/ia64/fpu/s_cosf.S index bcdf1b0c02..6e1c420bf8 100644 --- a/sysdeps/ia64/fpu/s_cosf.S +++ b/sysdeps/ia64/fpu/s_cosf.S @@ -69,7 +69,7 @@ // nfloat = Round result to integer (round-to-nearest) // // r = x - nfloat * pi/2^k -// Do this as (x - nfloat * HIGH(pi/2^k)) - nfloat * LOW(pi/2^k) +// Do this as (x - nfloat * HIGH(pi/2^k)) - nfloat * LOW(pi/2^k) // for increased accuracy. // pi/2^k is stored as two numbers that when added make pi/2^k. @@ -484,14 +484,14 @@ _SINCOSF_COMMON: // Polynomial coefficients (Q2, Q1, P2, P1) loading { .mmi ldfpd sincosf_P2,sincosf_Q2 = [sincosf_AD_1],16 - nop.m 999 - nop.i 999 + nop.m 999 + nop.i 999 };; // Select exponent (17 lsb) { .mmi ldfpd sincosf_P1,sincosf_Q1 = [sincosf_AD_1],16 - nop.m 999 + nop.m 999 dep.z sincosf_r_exp = sincosf_r_signexp, 0, 17 };; @@ -507,9 +507,9 @@ _SINCOSF_COMMON: // Multiply x by scaled 16/pi and add large const to shift integer part of W to // rightmost bits of significand { .mfi - nop.m 999 + nop.m 999 fma.s1 sincosf_W_2TO61_RSH = sincosf_NORM_f8, sincosf_SIG_INV_PI_BY_16_2TO61, sincosf_RSHF_2TO61 - nop.i 999 + nop.i 999 };; // sincosf_NFLOAT = Round_Int_Nearest(sincosf_W) @@ -517,14 +517,14 @@ _SINCOSF_COMMON: { .mfi nop.m 999 fms.s1 sincosf_NFLOAT = sincosf_W_2TO61_RSH,sincosf_2TOM61,sincosf_RSHF - nop.i 999 + nop.i 999 };; // get N = (int)sincosf_int_Nfloat { .mfi getf.sig sincosf_GR_n = sincosf_W_2TO61_RSH // integer N value nop.f 999 - nop.i 999 + nop.i 999 };; // Add 2^(k-1) (which is in sincosf_r_sincos=8) to N @@ -532,12 +532,12 @@ _SINCOSF_COMMON: { .mfi add sincosf_GR_n = sincosf_GR_n, sincosf_r_sincos fnma.s1 sincosf_r = sincosf_NFLOAT, sincosf_Pi_by_16_1, sincosf_NORM_f8 - nop.i 999 + nop.i 999 };; // Get M (least k+1 bits of N) { .mmi - and sincosf_GR_m = 0x1f,sincosf_GR_n // Put mask 0x1F - + and sincosf_GR_m = 0x1f,sincosf_GR_n // Put mask 0x1F - nop.m 999 // - select k+1 bits nop.i 999 };; @@ -546,7 +546,7 @@ _SINCOSF_COMMON: { .mfi shladd sincosf_AD_2 = sincosf_GR_32m, 4, sincosf_AD_1 (p8) fclass.m.unc p10,p0 = f8,0x0b // If sin denormal input - - nop.i 999 + nop.i 999 };; // Load Sin and Cos table value using obtained index m (sincosf_AD_2) @@ -572,10 +572,10 @@ _SINCOSF_COMMON: { .mfi nop.m 999 fmpy.s0 fp_tmp = fp_tmp, fp_tmp // forces inexact flag - nop.i 999 + nop.i 999 };; -// Polynomials calculation +// Polynomials calculation // Q = Q2*r^2 + Q1 // P = P2*r^2 + P1 { .mfi @@ -586,7 +586,7 @@ _SINCOSF_COMMON: { .mfi nop.m 999 fma.s1 sincosf_P = sincosf_rsq, sincosf_P2, sincosf_P1 - nop.i 999 + nop.i 999 };; // get rcube and S[m]*r^2 @@ -598,7 +598,7 @@ _SINCOSF_COMMON: { .mfi nop.m 999 fmpy.s1 sincosf_rcub = sincosf_r_exact, sincosf_rsq - nop.i 999 + nop.i 999 };; // Get final P and Q @@ -612,7 +612,7 @@ _SINCOSF_COMMON: { .mfi nop.m 999 fma.s1 sincosf_P = sincosf_rcub,sincosf_P,sincosf_r_exact - nop.i 999 + nop.i 999 };; // If sinf(denormal) - force underflow to be set @@ -699,8 +699,8 @@ _SINCOSF_LARGE_ARGS: } { .mfi // force inexact set nop.m 999 - fmpy.s0 sincosf_save_tmp = sincosf_save_tmp, sincosf_save_tmp - nop.i 999 + fmpy.s0 sincosf_save_tmp = sincosf_save_tmp, sincosf_save_tmp + nop.i 999 };; { .mib diff --git a/sysdeps/ia64/fpu/s_erf.S b/sysdeps/ia64/fpu/s_erf.S index 7174a197fb..47fdea1c05 100644 --- a/sysdeps/ia64/fpu/s_erf.S +++ b/sysdeps/ia64/fpu/s_erf.S @@ -21,20 +21,20 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // // History @@ -61,7 +61,7 @@ // Return erf(x) = x *Pol9(x^2) // // 3. For several subranges of 0.5 <= |x| < 5.90625 -// Return erf(x) = sign(x)*Pol19(y), +// Return erf(x) = sign(x)*Pol19(y), // where y = (|x|-b)/a, Pol19(y) = A0 + A1*y^1 + A2*y^2 + ... + A19*y^19 // // For each subrange there is particular set of coefficients. @@ -80,7 +80,7 @@ // 6. |x| = INF // Return erf(x) = sign(x) * 1.0 // -// 7. x = [S,Q]NaN +// 7. x = [S,Q]NaN // Return erf(x) = QNaN // // 8. x is positive denormal @@ -93,11 +93,11 @@ // // Registers used //============================================================== -// Floating Point registers used: +// Floating Point registers used: // f8, input, output // f32 -> f63 -// General registers used: +// General registers used: // r32 -> r48, r2, r3 // Predicate registers used: @@ -106,7 +106,7 @@ // p6 to filter out case when x = denormal // p7 to filter out case when x = [Q,S]NaN or +/-0, // used also to process denormals -// p8 to filter out case when 3.25 <= |x| < 4.0, +// p8 to filter out case when 3.25 <= |x| < 4.0, // used also to process denormals // p9 to filter out case when |x| = inf // p10 to filter out case when |x| < 0.5 @@ -169,7 +169,7 @@ fTSqr = f58 fTQuadr = f59 fTDeg3 = f60 fTDeg7 = f61 -fArgAbsNormSgn = f62 +fArgAbsNormSgn = f62 fTQuadrSgn = f63 // Data tables @@ -180,7 +180,7 @@ RODATA LOCAL_OBJECT_START(erf_data) // Coefficients ##0..15 -// Polynomial coefficients for the erf(x), 0.5 <= |x| < 1.0 +// Polynomial coefficients for the erf(x), 0.5 <= |x| < 1.0 data8 0xB69AC40646D1F6C1, 0x00003FD2 //A19 data8 0x90AD48C0118FA10C, 0x00003FD7 //A18 data8 0x826FBAD055EA4AB8, 0x0000BFDB //A17 @@ -197,7 +197,7 @@ data8 0xB11E30BE912617D3, 0x00003FF0 //A7 data8 0xCCF89D9351CE26E3, 0x0000BFF4 //A6 data8 0xEFF75AD1F0F22809, 0x00003FF2 //A5 data8 0xBB793EF404C09A22, 0x00003FF8 //A4 -// Polynomial coefficients for the erf(x), 1.0 <= |x| < 2.0 +// Polynomial coefficients for the erf(x), 1.0 <= |x| < 2.0 data8 0xBAE93FF4174EA59B, 0x00003FE6 //A19 data8 0x8A0FD46092F95D44, 0x0000BFEA //A18 data8 0xA37B3242B7809E12, 0x00003FEC //A17 @@ -214,7 +214,7 @@ data8 0xF84B80EFCA43895D, 0x00003FF8 //A7 data8 0x9722D22DA628A17B, 0x00003FF7 //A6 data8 0x8DB0A586F8F3381F, 0x0000BFFB //A5 data8 0x8DB0A5879F87E5BE, 0x00003FFB //A4 -// Polynomial coefficients for the erf(x), 2.0 <= |x| < 3.25 +// Polynomial coefficients for the erf(x), 2.0 <= |x| < 3.25 data8 0x9C4AF1F3A4B21AFC, 0x00003FF6 //A19 data8 0x8D40D5D5DB741AB8, 0x0000BFF9 //A18 data8 0xDEBE7099E0A75BA4, 0x00003FFA //A17 @@ -231,7 +231,7 @@ data8 0xDD704DEFFB21B7E7, 0x0000BFFD //A7 data8 0xF0C9A6BBDE469115, 0x00003FF9 //A6 data8 0xD673A02CB5766633, 0x00003FFD //A5 data8 0x8D162CBAD8A12649, 0x0000BFFE //A4 -// Polynomial coefficients for the erf(x), 4.0 <= |x| < 6.0 +// Polynomial coefficients for the erf(x), 4.0 <= |x| < 6.0 data8 0xD4428B75C6FE8FD1, 0x0000BFFC //A19 data8 0xF76BE1935675D5C8, 0x00003FFE //A18 data8 0xFD6BB3B14AA7A8E6, 0x0000BFFF //A17 @@ -250,12 +250,12 @@ data8 0xED3003E477A53EE7, 0x00003FF6 //A5 data8 0xA4C07E9BB3FCB0F3, 0x0000BFF4 //A4 // // Coefficients ##16..19 -// Polynomial coefficients for the erf(x), 0.5 <= |x| < 1.0 +// Polynomial coefficients for the erf(x), 0.5 <= |x| < 1.0 data8 0x95FA98C337005D13, 0x0000BFF9 //A3 data8 0xE0F7E524D2808A97, 0x0000BFFB //A2 data8 0xE0F7E524D2808A98, 0x00003FFD //A1 data8 0x853F7AE0C76E915F, 0x00003FFE //A0 -// Polynomial coefficients for the erf(x), 1.0 <= |x| < 2.0 +// Polynomial coefficients for the erf(x), 1.0 <= |x| < 2.0 data8 0x8DB0A587A96ABCF0, 0x00003FFC //A3 data8 0xD488F84B7DE18DA8, 0x0000BFFD //A2 data8 0xD488F84B7DE12E9C, 0x00003FFD //A1 @@ -264,13 +264,13 @@ data8 0xD7BB3D3A08445636, 0x00003FFE //A0 data8 0xC58571D23D5C4B3A, 0x00003FFD //A3 data8 0xA94DCF467CD6AFF3, 0x0000BFFC //A2 data8 0xA94DCF467CD10A16, 0x00003FFA //A1 -data8 0xFECD70A13CAF1997, 0x00003FFE //A0 -// Polynomial coefficients for the erf(x), 4.0 <= |x| < 6.0 +data8 0xFECD70A13CAF1997, 0x00003FFE //A0 +// Polynomial coefficients for the erf(x), 4.0 <= |x| < 6.0 data8 0xB01D2B4F0D5AB8B0, 0x00003FF1 //A3 data8 0x8858A465CE594BD1, 0x0000BFEE //A2 data8 0x8858A447456DE61D, 0x00003FEA //A1 data8 0xFFFFFFBDC88BB107, 0x00003FFE //A0 -// Polynomial coefficients for the erf(x), 0.0 <= |x| < 0.5 +// Polynomial coefficients for the erf(x), 0.0 <= |x| < 0.5 data8 0xBE839EDBB36C7FCE //A9 data8 0x3EBB7745A18DD242 //A8 data8 0xBF4C02DB238F2AFC //A5 @@ -282,8 +282,8 @@ data8 0xBF9B82CE3127F4E4 //A3 data8 0x3FBCE2F21A042B25 //A2 data8 0x906EBA8214DB688D, 0x00003FFF //A0 // 1.0 - 2^(-63) -data8 0xFFFFFFFFFFFFFFFF, 0x00003FFE -// Polynomial coefficients for the erf(x), 3.25 <= |x| < 4.0 +data8 0xFFFFFFFFFFFFFFFF, 0x00003FFE +// Polynomial coefficients for the erf(x), 3.25 <= |x| < 4.0 data8 0x95E91576C7A12250, 0x00003FE7 //A14 data8 0x8E5E0D0E1F5D3CB5, 0x0000BFEA //A13 data8 0xED761DAFAF814DE9, 0x00003FEB //A12 @@ -300,7 +300,7 @@ data8 0xC6F1E695363BCB26, 0x0000BFF1 //A2 data8 0xF4DAF4680DA54C02, 0x00003FEF //A1 data8 0xFFFFB7CFB3F2ABBE, 0x00003FFE //A0 // A = 2.0/sqrt(Pi) -data8 0x906EBA8214DB688D, 0x00003FFF +data8 0x906EBA8214DB688D, 0x00003FFF LOCAL_OBJECT_END(erf_data) @@ -319,7 +319,7 @@ GLOBAL_LIBM_ENTRY(erf) } ;; { .mfi - getf.d rArg = f8 // x in GR + getf.d rArg = f8 // x in GR fclass.m p6,p0 = f8, 0x0b // is x denormal ? shl rThreeAndQ = rThreeAndQ, 44 // bits of 3.25 } @@ -350,7 +350,7 @@ GLOBAL_LIBM_ENTRY(erf) nop.f 0 (p6) br.cond.spnt erf_denormal // branch out if x is denormal } -;; +;; { .mfi and rShiftedArgMasked = rShiftedArg, rMask // bias of x << 8 fmerge.s fArgAbs = f1, f8 // |x| @@ -361,15 +361,15 @@ GLOBAL_LIBM_ENTRY(erf) (p7) fma.d.s0 f8 = f8,f1,f8 // NaN or +/-0 (p7) br.ret.spnt b0 // exit for x = NaN or +/-0 } -;; +;; { .mfi sub rIndex = rShiftedArgMasked, rBias // index << 8 - nop.f 0 - cmp.lt p10, p0 = rShiftedArgMasked, rBias // p10 = 1 if |x| < 0.5 + nop.f 0 + cmp.lt p10, p0 = rShiftedArgMasked, rBias // p10 = 1 if |x| < 0.5 } { .mfb - // p8 = 1 if 3.25 <= |x| < 4.0 -(p8) cmp.lt p8, p11 = rShiftedAbsArg, rBiasedExpOf4 + // p8 = 1 if 3.25 <= |x| < 4.0 +(p8) cmp.lt p8, p11 = rShiftedAbsArg, rBiasedExpOf4 fms.s1 fArgAbsNorm = fArgAbsNorm, f1, f1 (p10) br.cond.spnt erf_near_zero // branch out if |x| < 0.5 } @@ -387,10 +387,10 @@ GLOBAL_LIBM_ENTRY(erf) } ;; { .mfi - adds rCoeffAddr2 = 16, rCoeffAddr1 + adds rCoeffAddr2 = 16, rCoeffAddr1 fmerge.s fSignumX = f8, f1 // signum(x) nop.i 0 -} +} { .mfb cmp.lt p12, p0 = rSaturation, rShiftedAbsArg // |x| > 5.90625? nop.f 0 @@ -436,7 +436,7 @@ GLOBAL_LIBM_ENTRY(erf) ldfe fA13 = [rCoeffAddr1], 32 nop.f 0 // address of coefficients ##16..23 - add rCoeffAddr3 = rCoeffAddr3, rIndex + add rCoeffAddr3 = rCoeffAddr3, rIndex } {.mfi ldfe fA12 = [rCoeffAddr2], 32 @@ -475,7 +475,7 @@ GLOBAL_LIBM_ENTRY(erf) ldfe fA6 = [rCoeffAddr2], 32 nop.f 0 (p8) br.cond.spnt erf_3q_4 // branch out if 3.25 < |x| < 4.0 -} +} ;; {.mfi ldfe fA5 = [rCoeffAddr1], 32 @@ -565,7 +565,7 @@ GLOBAL_LIBM_ENTRY(erf) ;; { .mfi nop.m 0 - fma.s1 fA15 = fA15, fTSqr, fA13 + fma.s1 fA15 = fA15, fTSqr, fA13 nop.i 0 } { .mfi @@ -587,19 +587,19 @@ GLOBAL_LIBM_ENTRY(erf) } ;; { .mfi - nop.m 0 + nop.m 0 fma.s1 fA7 = fA7, fTSqr, fA5 nop.i 0 } ;; { .mfi - nop.m 0 + nop.m 0 fma.s1 fRes = fRes, fTQuadr, fA15 nop.i 0 } ;; { .mfi - nop.m 0 + nop.m 0 fma.s1 fA4 = fA4, fTSqr, fA2 nop.i 0 } @@ -611,7 +611,7 @@ GLOBAL_LIBM_ENTRY(erf) } ;; { .mfi - nop.m 0 + nop.m 0 fma.s1 fA4 = fA7, fTDeg3, fA4 nop.i 0 } @@ -637,7 +637,7 @@ GLOBAL_LIBM_ENTRY(erf) // Here if 3.25 < |x| < 4.0 .align 32 -erf_3q_4: +erf_3q_4: .pred.rel "mutex", p14, p15 { .mfi ldfe fA5 = [rCoeffAddr1], 32 @@ -660,7 +660,7 @@ erf_3q_4: fma.s1 fA15 = fA15, fArgAbs, fA14 nop.i 0 } -;; +;; { .mfi nop.m 0 fma.s1 fA13 = fA13, fArgAbs, fA12 @@ -671,7 +671,7 @@ erf_3q_4: fma.s1 fA11 = fA11, fArgAbs, fA10 nop.i 0 } -;; +;; { .mfi nop.m 0 fma.s1 fA9 = fA9, fArgAbs, fA8 @@ -682,7 +682,7 @@ erf_3q_4: fma.s1 fArgAbsNormSgn = fArgAbs, fSignumX, f0 nop.i 0 } -;; +;; { .mfi nop.m 0 fma.s1 fTQuadr = fTSqr, fTSqr, f0 @@ -694,24 +694,24 @@ erf_3q_4: fma.s1 fRes = fRes, fTSqr, fA17 nop.i 0 } -;; +;; { .mfi nop.m 0 fma.s1 fA15 = fA15, fTSqr, fA13 nop.i 0 } -;; +;; { .mfi nop.m 0 fma.s1 fA11 = fA11, fTSqr, fA9 nop.i 0 -} +} { .mfi nop.m 0 fma.s1 fA7 = fA7, fArgAbs, fA6 nop.i 0 } -;; +;; { .mfi nop.m 0 fma.s1 fTDeg7 = fTQuadr, fTSqr, f0 @@ -722,10 +722,10 @@ erf_3q_4: fma.s1 fRes = fRes, fTQuadr, fA15 nop.i 0 } -;; +;; { .mfi nop.m 0 - fma.s1 fA11 = fA11, fTSqr, fA7 + fma.s1 fA11 = fA11, fTSqr, fA7 nop.i 0 } ;; @@ -734,7 +734,7 @@ erf_3q_4: fma.s1 fRes = fRes, fTDeg7, fA11 nop.i 0 } -;; +;; { .mfi nop.m 0 // result for negative argument @@ -754,7 +754,7 @@ erf_3q_4: erf_near_zero: { .mfi adds rCoeffAddr1 = 1280, rDataPtr // address of A9 - fma.s1 fTSqr = fArgSqr, fArgSqr, f0 // x^4 + fma.s1 fTSqr = fArgSqr, fArgSqr, f0 // x^4 nop.i 0 } { .mfi @@ -887,7 +887,7 @@ erf_saturation: br.ret.sptk b0 // Exit for 5.90625 <=|x|< +inf } ;; - + // Here if x is double precision denormal .align 32 erf_denormal: diff --git a/sysdeps/ia64/fpu/s_erfc.S b/sysdeps/ia64/fpu/s_erfc.S index addfef44c2..c67c61abef 100644 --- a/sysdeps/ia64/fpu/s_erfc.S +++ b/sysdeps/ia64/fpu/s_erfc.S @@ -21,20 +21,20 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // // History @@ -51,7 +51,7 @@ // Overview of operation //============================================================== // 1. 0 <= x <= 28.0 -// +// // erfc(x) = P14(z) * exp( -x^2 ), z = x - x(i). // // Comment: @@ -59,38 +59,38 @@ // Let x(i) = -1.0 + 2^(i/4),i=0,...19. So we have 20 unequal // argument intervals [x(i),x(i+1)] with length ratio q = 2^(1/4). // Values x(i) we have in the table erfc_xb_table. -// +// // Let x(i)<= x < x(i+1). // We can find i as exponent of number (x + 1)^4. -// +// // Let P14(z) - polynomial approximation of degree 14 for function // erfc(z+x(i)) * exp( (z+x(i))^2) and 0 <= z <= x(i+1)-x(i). // Polynomial coeffitients we have in the table erfc_p_table. // // So we can find result for erfc(x) as above. -// Algorithm description for exp function see below. -// +// Algorithm description for exp function see below. +// // 2. -6 <= x < 0 // // erfc(x) = 2.0 - erfc(-x) // // 3. x > 28.0 -// erfc(x) ~=~ 0.0 +// erfc(x) ~=~ 0.0 // -// 4. x < -6.0 -// erfc(x) ~=~ 2.0 +// 4. x < -6.0 +// erfc(x) ~=~ 2.0 -// Special values +// Special values //============================================================== // erfc(+0) = 1.0 // erfc(-0) = 1.0 -// erfc(+qnan) = +qnan -// erfc(-qnan) = -qnan -// erfc(+snan) = +qnan -// erfc(-snan) = -qnan +// erfc(+qnan) = +qnan +// erfc(-qnan) = -qnan +// erfc(+snan) = +qnan +// erfc(-snan) = -qnan -// erfc(-inf) = 2.0 +// erfc(-inf) = 2.0 // erfc(+inf) = +0 //============================================================== @@ -118,16 +118,16 @@ // Comment for exp for erfc: // // We use quad precision for calculate input argument -x^2 and add -// result low bits to value delta in exp. +// result low bits to value delta in exp. // Registers used //============================================================== -// Floating Point registers used: +// Floating Point registers used: // f8, input // f9 -> f15, f32 -> f93 -// General registers used: -// r32 -> r68 +// General registers used: +// r32 -> r68 // Predicate registers used: // p6 -> p15 @@ -201,15 +201,15 @@ EXP_INV_LN2_2TO63 = f7 EXP_W_2TO56_RSH = f9 EXP_RSHF_2TO56 = f10 -exp_P4 = f11 -exp_P3 = f12 -exp_P2 = f13 -exp_P1 = f14 +exp_P4 = f11 +exp_P3 = f12 +exp_P2 = f13 +exp_P1 = f14 exp_ln2_by_128_hi = f15 - -exp_ln2_by_128_lo = f32 + +exp_ln2_by_128_lo = f32 EXP_RSHF = f33 -EXP_Nfloat = f34 +EXP_Nfloat = f34 exp_r = f35 exp_f = f36 exp_rsq = f37 @@ -222,7 +222,7 @@ exp_P_lo = f43 exp_P_hi = f44 exp_P = f45 exp_S = f46 -EXP_NORM_f8 = f47 +EXP_NORM_f8 = f47 exp_S2 = f48 exp_T2 = f49 @@ -355,7 +355,7 @@ LOCAL_OBJECT_END(erfc_xb_table) LOCAL_OBJECT_START(erfc_p_table) -// Pol0 +// Pol0 data8 0x8000000000000000, 0x00003FFF //A0 = +1.00000000000000000000e+00L data8 0x906EBA8214DB688D, 0x0000BFFF //A1 = -1.12837916709551257389e+00L data8 0xFFFFFFFFFFFFFFEB, 0x00003FFE //A2 = +9.99999999999999998841e-01L @@ -371,7 +371,7 @@ data8 0xE36112A686F5165B, 0x0000BFF6 //A11 = -3.46953111013788405745e-03L data8 0xB3DD6B2DB3307D2E, 0x00003FF5 //A12 = +1.37226041156280127011e-03L data8 0x8018A34267FED226, 0x0000BFF4 //A13 = -4.88648380816410282971e-04L data8 0xFBBA6A7AEBD3ABD9, 0x00003FF1 //A14 = +1.20033353451879025825e-04L -// Pol1 +// Pol1 data8 0xD15A1EF03BB91E71, 0x00003FFE //A0 = +8.17781385088640600540e-01L data8 0xD1A4ADDAC3337118, 0x0000BFFE //A1 = -8.18919053944410683867e-01L data8 0xA9AF9FFA2AD18CB0, 0x00003FFE //A2 = +6.62836073471060947628e-01L @@ -387,7 +387,7 @@ data8 0xBA821A59FC05FBAD, 0x0000BFF5 //A11 = -1.42294475244146555952e-03L data8 0x8D535042E11A0D89, 0x00003FF4 //A12 = +5.39113782651680545599e-04L data8 0xBE589447DB26564E, 0x0000BFF2 //A13 = -1.81528103431449706486e-04L data8 0xABC8C7EF636F5B0A, 0x00003FF0 //A14 = +4.09565689009869217620e-05L -// Pol2 +// Pol2 data8 0xA9973ABB272898B2, 0x00003FFE //A0 = +6.62463827792779356910e-01L data8 0x945F1A7993F7AADD, 0x0000BFFE //A1 = -5.79576162988785154930e-01L data8 0xD84439C6609A8A62, 0x00003FFD //A2 = +4.22395520654665085222e-01L @@ -403,7 +403,7 @@ data8 0x86FAEBB4438A20FA, 0x0000BFF4 //A11 = -5.14908443679775343409e-04L data8 0xC2503856CE48A657, 0x00003FF2 //A12 = +1.85311660448280465934e-04L data8 0xF52642F22A26965B, 0x0000BFF0 //A13 = -5.84481856856861454591e-05L data8 0xC98588E1A95FFDBD, 0x00003FEE //A14 = +1.20116245684500489648e-05L -// Pol3 +// Pol3 data8 0x887CBA2C47B1E2B5, 0x00003FFE //A0 = +5.33153186617432643784e-01L data8 0xCD81909CF194328E, 0x0000BFFD //A1 = -4.01379126699602646289e-01L data8 0x84DCA15C52122372, 0x00003FFD //A2 = +2.59495775718310530164e-01L @@ -419,7 +419,7 @@ data8 0xAAE3CAAB9D117591, 0x0000BFF2 //A11 = -1.62973223928790256249e-04L data8 0xE7704D06A3080C19, 0x00003FF0 //A12 = +5.51792801195012080688e-05L data8 0x875A5B53E510F305, 0x0000BFEF //A13 = -1.61353297293572230995e-05L data8 0xC8F10CDDB9CC9A42, 0x00003FEC //A14 = +2.99426321046583353559e-06L -// Pol4 +// Pol4 data8 0xDAEC3C07CAB590C1, 0x00003FFD //A0 = +4.27583576155807004411e-01L data8 0x8BE271F8BE0280AC, 0x0000BFFD //A1 = -2.73212014783898564863e-01L data8 0x9E13941E19661429, 0x00003FFC //A2 = +1.54371561371908397882e-01L @@ -435,7 +435,7 @@ data8 0xBC17A73E9CA51313, 0x0000BFF0 //A11 = -4.48447217225392170834e-05L data8 0xED10FE8FC0E44CAD, 0x00003FEE //A12 = +1.41302576244352578317e-05L data8 0xFE49912328516F81, 0x0000BFEC //A13 = -3.78917710289305330220e-06L data8 0xA8F6077E25DAFD33, 0x00003FEA //A14 = +6.29428967202166402369e-07L -// Pol5 +// Pol5 data8 0xAF72220985BED710, 0x00003FFD //A0 = +3.42667640364081975844e-01L data8 0xBC1CB559042410AB, 0x0000BFFC //A1 = -1.83703263815036934677e-01L data8 0xB730BF62E0B63A3C, 0x00003FFB //A2 = +8.94484474229911741150e-02L @@ -451,7 +451,7 @@ data8 0xB3911863705825F6, 0x0000BFEE //A11 = -1.07030140392753204852e-05L data8 0xD023CF5C3F915685, 0x00003FEC //A12 = +3.10152594473606007552e-06L data8 0xCA7016FADFF584F5, 0x0000BFEA //A13 = -7.54139761055503416594e-07L data8 0xEEBB5CC0901D2BB0, 0x00003FE7 //A14 = +1.11168196441717301549e-07L -// Pol6 +// Pol6 data8 0x8CD1160326A754AF, 0x00003FFD //A0 = +2.75032699474947383325e-01L data8 0xFB22A4C657119388, 0x0000BFFB //A1 = -1.22624671271190511269e-01L data8 0xD02B2CA872A774E9, 0x00003FFA //A2 = +5.08224243596176920409e-02L @@ -467,7 +467,7 @@ data8 0x950CBA5D80D8125E, 0x0000BFEC //A11 = -2.22101388436550539151e-06L data8 0x9CE72C0409A3E800, 0x00003FEA //A12 = +5.84509280984781223375e-07L data8 0x88CCD7A000D1C213, 0x0000BFE8 //A13 = -1.27405082040077425019e-07L data8 0x8DF4EC84F093B1C0, 0x00003FE5 //A14 = +1.65259388738830506389e-08L -// Pol7 +// Pol7 data8 0xE2BF82A153B1B82E, 0x00003FFC //A0 = +2.21433678719152843912e-01L data8 0xA72A9AE0BD7F29D5, 0x0000BFFB //A1 = -8.16242313227913578068e-02L data8 0xE98939292289EDBE, 0x00003FF9 //A2 = +2.85078159732432477516e-02L @@ -483,7 +483,7 @@ data8 0xD8D0ED030032926D, 0x0000BFE9 //A11 = -4.03851487695924456733e-07L data8 0xCCA1CA2AC3EB8973, 0x00003FE7 //A12 = +9.52891963880517988726e-08L data8 0x9E26A080F9DA39DE, 0x0000BFE5 //A13 = -1.84111863600343741644e-08L data8 0x8F3DC58F64A92C62, 0x00003FE2 //A14 = +2.08443519336792003049e-09L -// Pol8 +// Pol8 data8 0xB74C13E914E9666F, 0x00003FFC //A0 = +1.79001151181389950418e-01L data8 0xDEB57268A58B763B, 0x0000BFFA //A1 = -5.43722600071728705200e-02L data8 0x821FF0D4C605A4CD, 0x00003FF9 //A2 = +1.58843711598712515609e-02L @@ -499,7 +499,7 @@ data8 0x8BFE95FCD7B92763, 0x0000BFE7 //A11 = -6.51900079707465044843e-08L data8 0xE9F15C8E7F58CF90, 0x00003FE4 //A12 = +1.36172642554216769522e-08L data8 0x9E90F22B11FAF8B5, 0x0000BFE2 //A13 = -2.30744183054978535129e-09L data8 0xF8CF74F1A138FBBA, 0x00003FDE //A14 = +2.26291720693360003233e-10L -// Pol9 +// Pol9 data8 0x94D45274A831ED57, 0x00003FFC //A0 = +1.45341194505862183128e-01L data8 0x94D4518B699A4A68, 0x0000BFFA //A1 = -3.63352952323113355459e-02L data8 0x90C3B59FF403A916, 0x00003FF8 //A2 = +8.83572327421709216515e-03L @@ -515,7 +515,7 @@ data8 0xA34CD3DFAC12AA45, 0x0000BFE4 //A11 = -9.50531730989412282035e-09L data8 0xEEBB49645DE0E34C, 0x00003FE1 //A12 = +1.73700091999434388879e-09L data8 0x8C86D8677DEACFBA, 0x0000BFDF //A13 = -2.55616650187281815453e-10L data8 0xBDB223D0FE2A7D6B, 0x00003FDB //A14 = +2.15659223402509415592e-11L -// Pol10 +// Pol10 data8 0xF2C1812715E4050A, 0x00003FFB //A0 = +1.18533143048567888157e-01L data8 0xC7DA2C565ADAEE57, 0x0000BFF9 //A1 = -2.43960252726894623056e-02L data8 0xA15CEFFD632F697D, 0x00003FF7 //A2 = +4.92440908672041077933e-03L @@ -531,7 +531,7 @@ data8 0xAF86504D78D35E89, 0x0000BFE1 //A11 = -1.27711000692808421573e-09L data8 0xDE1CE78ADB6DDF04, 0x00003FDE //A12 = +2.02010513073041015283e-10L data8 0xE124FFAA267301A5, 0x0000BFDB //A13 = -2.55959692063871343080e-11L data8 0x81F1BEBEFBE168D2, 0x00003FD8 //A14 = +1.84661980716000872722e-12L -// Pol11 +// Pol11 data8 0xC6CE5D7D18203EAA, 0x00003FFB //A0 = +9.70732978630764996752e-02L data8 0x86E8A30A76923C88, 0x0000BFF9 //A1 = -1.64683517829920230086e-02L data8 0xB4A1CBB7576B4183, 0x00003FF6 //A2 = +2.75622581042760461528e-03L @@ -547,7 +547,7 @@ data8 0xB16A6CC5A3AE6E01, 0x0000BFDE //A11 = -1.61358659378896671620e-10L data8 0xC0970F2551C52F96, 0x00003FDB //A12 = +2.18949565869759698947e-11L data8 0xA6E029ABB3BB500C, 0x0000BFD8 //A13 = -2.37144541649446501026e-12L data8 0xA3E43F3857D1B6A5, 0x00003FD4 //A14 = +1.45564973108152568130e-13L -// Pol12 +// Pol12 data8 0xA36E35FC807B3E64, 0x00003FFB //A0 = +7.98000543291529334886e-02L data8 0xB725A29237C8F94F, 0x0000BFF8 //A1 = -1.11784064873715046550e-02L data8 0xCB51EF23EAD5F327, 0x00003FF5 //A2 = +1.55120891755237931425e-03L @@ -563,7 +563,7 @@ data8 0xABD305A38349EAEB, 0x0000BFDB //A11 = -1.95341618552982314342e-11L data8 0x9EDB00104DB66DD9, 0x00003FD8 //A12 = +2.25747200093121867690e-12L data8 0xE9F80AF513F2B8AB, 0x0000BFD4 //A13 = -2.07806143133802417637e-13L data8 0xC2B840C3859AB166, 0x00003FD0 //A14 = +1.08091168358477817812e-14L -// Pol13 +// Pol13 data8 0x86CD0BF01914407A, 0x00003FFB //A0 = +6.58207829138836028568e-02L data8 0xF9F4A17FA70807C3, 0x0000BFF7 //A1 = -7.62803922344113067603e-03L data8 0xE63BF84EDE20EDAA, 0x00003FF4 //A2 = +8.78273993036530088653e-04L @@ -579,7 +579,7 @@ data8 0xA1FB98FA19E62A4F, 0x0000BFD8 //A11 = -2.30191407969654156362e-12L data8 0xFDB2E0599016AD1E, 0x00003FD4 //A12 = +2.25329742249079975388e-13L data8 0x9E179A99CDD4BF4B, 0x0000BFD1 //A13 = -1.75517603530017718494e-14L data8 0xDE4DE992A707C7BC, 0x00003FCC //A14 = +7.71273133169032472595e-16L -// Pol14 +// Pol14 data8 0xDF0639E60CF6E96C, 0x00003FFA //A0 = +5.44492971101228988138e-02L data8 0xAB6737B6065BD1C2, 0x0000BFF7 //A1 = -5.23081035867078490333e-03L data8 0x8322CC0765FD9C27, 0x00003FF4 //A2 = +5.00243857322493802503e-04L @@ -595,7 +595,7 @@ data8 0x967A0ECC142382D9, 0x0000BFD5 //A11 = -2.67300472044743953909e-13L data8 0xC6D8869855133985, 0x00003FD1 //A12 = +2.20763189681614758000e-14L data8 0xD10AC0B228ABCECC, 0x0000BFCD //A13 = -1.45052027893524847250e-15L data8 0xF7C6DEB4522487A3, 0x00003FC8 //A14 = +5.37280367113168366711e-17L -// Pol15 +// Pol15 data8 0xB8F57DECFAC3B255, 0x00003FFA //A0 = +4.51559943173131409760e-02L data8 0xEC1B8A6C822C036F, 0x0000BFF6 //A1 = -3.60271577347565115947e-03L data8 0x963A6DD66951B72E, 0x00003FF3 //A2 = +2.86537625289770759336e-04L @@ -611,7 +611,7 @@ data8 0x8AF8F1E3FED32CEC, 0x0000BFD2 //A11 = -3.08580807479307213059e-14L data8 0x9A88033A08842BEA, 0x00003FCE //A12 = +2.14455258045503137285e-15L data8 0x88BCF775B7B3A939, 0x0000BFCA //A13 = -1.18601440246395438386e-16L data8 0x88687B63A5B7135E, 0x00003FC5 //A14 = +3.69734984736162880476e-18L -// Pol16 +// Pol16 data8 0x99B8A501204BF3E7, 0x00003FFA //A0 = +3.75296063885057657456e-02L data8 0xA33FA20D2867C79C, 0x0000BFF6 //A1 = -2.49097544033960143953e-03L data8 0xACFD14CA6AA55829, 0x00003FF2 //A2 = +1.64974783411741182991e-04L @@ -627,7 +627,7 @@ data8 0x805C040421E7A098, 0x0000BFCF //A11 = -3.56269003968981157635e-15L data8 0xEFCCD20DE93A138E, 0x00003FCA //A12 = +2.07993414310230172191e-16L data8 0xB259764466732080, 0x0000BFC6 //A13 = -9.66834364652262630640e-18L data8 0x9597C1DB6AF830E4, 0x00003FC1 //A14 = +2.53420063550355940811e-19L -// Pol17 +// Pol17 data8 0xFFFCBD66BAA4368C, 0x00003FF9 //A0 = +3.12484454387527380657e-02L data8 0xE28174723762D197, 0x0000BFF5 //A1 = -1.72810121976742793952e-03L data8 0xC81D832836019EC4, 0x00003FF1 //A2 = +9.54224026432644399736e-05L @@ -643,7 +643,7 @@ data8 0xEE034E350C65D2D9, 0x0000BFCB //A11 = -4.12886586201102092942e-16L data8 0xBA94473E52495304, 0x00003FC7 //A12 = +2.02289587087169937807e-17L data8 0xE913D34CBB853CEE, 0x0000BFC2 //A13 = -7.89697093687557412061e-19L data8 0xA44576A85E8CAB59, 0x00003FBD //A14 = +1.73929048516879172258e-20L -// Pol18 +// Pol18 data8 0xD579A3FE4622DED2, 0x00003FF9 //A0 = +2.60589793198885278242e-02L data8 0x9D97EB84E7CD89C8, 0x0000BFF5 //A1 = -1.20234251012583627659e-03L data8 0xE86EFDC2CCA5C47B, 0x00003FF0 //A2 = +5.54164790116744315389e-05L @@ -659,7 +659,7 @@ data8 0xDDF6F1B79F50E3C4, 0x0000BFC8 //A11 = -4.81309059042573202592e-17L data8 0x91F283C0351A9ACA, 0x00003FC4 //A12 = +1.97795505638619048412e-18L data8 0x990BC4FAFA9C7542, 0x0000BFBF //A13 = -6.48174913943425248713e-20L data8 0xB536865B89676892, 0x00003FB9 //A14 = +1.19916696090758913485e-21L -// Pol19 +// Pol19 data8 0xB241CEB1B7C953F1, 0x00003FF9 //A0 = +2.17598950382519671244e-02L data8 0xDBD6FBA9B11B85E1, 0x0000BFF4 //A1 = -8.38622198373701898430e-04L data8 0x877605B1AD082441, 0x00003FF0 //A2 = +3.22964249573360786077e-05L @@ -698,7 +698,7 @@ GLOBAL_LIBM_ENTRY(erfc) mov exp_GR_rshf_2to56 = 0x4768 // begin 1.1 2^(63+56) } { .mlx - mov exp_TB1_size = 0x100 + mov exp_TB1_size = 0x100 movl exp_GR_sig_inv_ln2 = 0xb8aa3b295c17f0bc //signif. of 1/ln2 };; @@ -710,7 +710,7 @@ GLOBAL_LIBM_ENTRY(erfc) { .mfi mov exp_GR_exp_2tom56 = 0xffff-56 fnma.s1 EXP_NORM_f8 = f8, f8, f0 // high bits for -x^2 - nop.i 0 + nop.i 0 };; @@ -718,7 +718,7 @@ GLOBAL_LIBM_ENTRY(erfc) { .mfi setf.sig EXP_INV_LN2_2TO63 = exp_GR_sig_inv_ln2 // form 1/ln2 * 2^63 (p6) fma.s1 FR_AbsArg = f1, f0, f8 // |x|, if x >= 0 - mov GR_POS_ARG_ASYMP = 0x403C + mov GR_POS_ARG_ASYMP = 0x403C } { .mfi mov GR_NEG_ARG_ASYMP = 0x4018 @@ -729,11 +729,11 @@ GLOBAL_LIBM_ENTRY(erfc) { .mfi setf.exp EXP_2TOM56 = exp_GR_exp_2tom56 // 2^-56 for scaling Nfloat fclass.m p10,p0 = f8, 0x21 // p10: x = +inf - mov exp_GR_17ones = 0x1FFFF + mov exp_GR_17ones = 0x1FFFF } -{ .mlx +{ .mlx setf.d EXP_RSHF_2TO56 = exp_GR_rshf_2to56 // const 1.10*2^(63+56) - movl GR_ERFC_XB_TB = 0x1A0 + movl GR_ERFC_XB_TB = 0x1A0 };; @@ -744,9 +744,9 @@ GLOBAL_LIBM_ENTRY(erfc) shl exp_GR_rshf = exp_GR_rshf, 48 //end 1.1 2^63 for right shift } { .mfi - nop.m 0 + nop.m 0 (p7) fma.s1 FR_Tmp = FR_Tmp1, FR_Tmp1, f0 // (|x|+1)^2, x<0 - mov GR_0x1 = 0x1 + mov GR_0x1 = 0x1 };; { .mfi @@ -763,7 +763,7 @@ GLOBAL_LIBM_ENTRY(erfc) { .mfi nop.m 0 fclass.m p11,p0 = f8, 0xc3 // p11: x = nan - nop.i 0 + nop.i 0 } { .mfi setf.d EXP_RSHF = exp_GR_rshf //Form right shift const 1.100 * 2^63 @@ -772,8 +772,8 @@ GLOBAL_LIBM_ENTRY(erfc) };; { .mfi - setf.d FR_EpsNorm = GR_EpsNorm - nop.f 0 + setf.d FR_EpsNorm = GR_EpsNorm + nop.f 0 (p6) shl GR_ARG_ASYMP = GR_POS_ARG_ASYMP, 48//p6:ARG_ASYMP= 28.0,x>=0 } { .mfi @@ -789,18 +789,18 @@ GLOBAL_LIBM_ENTRY(erfc) };; { .mfi - sub GR_mBIAS = r0, GR_BIAS + sub GR_mBIAS = r0, GR_BIAS fma.s1 FR_Tmp = FR_Tmp, FR_Tmp, f0 // (|x|+1)^4 nop.i 0 } { .mfi ldfe exp_ln2_by_128_lo = [EXP_AD_TB1], 16 nop.f 0 - nop.i 0 + nop.i 0 };; { .mfi - getf.d GR_AbsArg = FR_AbsArg + getf.d GR_AbsArg = FR_AbsArg nop.f 0 add GR_ERFC_XB_TB = GR_ERFC_XB_TB, EXP_AD_TB1//pointer to XB_TBL } @@ -815,7 +815,7 @@ GLOBAL_LIBM_ENTRY(erfc) fma.s1 EXP_W_2TO56_RSH = EXP_NORM_f8,EXP_INV_LN2_2TO63,EXP_RSHF_2TO56 shladd GR_ShftPi_bias = GR_ShftPi_bias, 4, r0 // BIAS * 240 } -{ .mfb +{ .mfb nop.m 0 (p10) fma.d.s0 f8 = f0, f1, f0 // p10: y = 0 for x = +inf (p10) br.ret.spnt b0 // p10: quick exit for x = +inf @@ -825,7 +825,7 @@ GLOBAL_LIBM_ENTRY(erfc) .pred.rel "mutex",p6,p7 { .mfi (p6) cmp.gt.unc p15,p0 = GR_AbsArg,GR_ARG_ASYMP //p15: x > 28.0,p6: x >= 0 - nop.f 0 + nop.f 0 (p7) cmp.gt.unc p14,p0 = GR_AbsArg, GR_ARG_ASYMP //p14: x < - 6.0,p7: x < 0 } { .mfb @@ -833,9 +833,9 @@ GLOBAL_LIBM_ENTRY(erfc) (p11) fma.d.s0 f8 = f8, f1, f0 //p11: y = x for x = nan (p11) br.ret.spnt b0 //p11: quick exit for x = nan };; - -{ .mfi - add EXP_AD_P = exp_TB2_size, EXP_AD_TB2 + +{ .mfi + add EXP_AD_P = exp_TB2_size, EXP_AD_TB2 fms.s1 f8_sq_lo = f1, f1, f8_sq_lo // 1 - low bits for -x^2 nop.i 0 };; @@ -844,14 +844,14 @@ GLOBAL_LIBM_ENTRY(erfc) ldfpd exp_P4, exp_P3 = [EXP_AD_P], 16 fmerge.s FR_X = f8,f8 shladd GR_ShftXBi_bias = GR_mBIAS, 4, r0 -} +} { .mfb nop.m 0 (p14) fnma.d.s0 FR_RESULT = FR_EpsNorm,FR_EpsNorm,FR_2 //p14:y ~=~ 2,x< -6.0 (p14) br.ret.spnt b0 //p14: quick exit for x < -6.0 };; -//p15: y ~=~ 0.0(result with underflow error), x > ARG_ASYMP = 28, +//p15: y ~=~ 0.0(result with underflow error), x > ARG_ASYMP = 28, { .mfi ldfpd exp_P2, exp_P1 = [EXP_AD_P] fma.d.s0 FR_Tmpf = f1, f1, FR_EpsNorm // flag i @@ -859,14 +859,14 @@ GLOBAL_LIBM_ENTRY(erfc) } { .mfb (p15) mov GR_Parameter_TAG = 208 -(p15) fma.d.s0 FR_RESULT = FR_EpsNorm,FR_EpsNorm,f0 +(p15) fma.d.s0 FR_RESULT = FR_EpsNorm,FR_EpsNorm,f0 (p15) br.cond.spnt __libm_error_region };; //p8: x < 27.0, result without ungerflow error { .mfi getf.exp GR_IndxPlusBias = FR_Tmp // exp + bias for (|x|+1)^4 - fcmp.lt.s1 p8,p0 = FR_NormX,FR_UnfBound + fcmp.lt.s1 p8,p0 = FR_NormX,FR_UnfBound nop.i 0 } { .mfi @@ -878,11 +878,11 @@ GLOBAL_LIBM_ENTRY(erfc) { .mmi shladd GR_ShftXBi = GR_IndxPlusBias, 4, GR_ShftXBi_bias shladd GR_ShftPi = GR_IndxPlusBias, 4, GR_ShftPi_bias - shl GR_ShftPi_8 = GR_IndxPlusBias, 8 + shl GR_ShftPi_8 = GR_IndxPlusBias, 8 };; { .mmi - getf.sig exp_GR_N = EXP_W_2TO56_RSH + getf.sig exp_GR_N = EXP_W_2TO56_RSH add GR_ERFC_XB_TB = GR_ERFC_XB_TB, GR_ShftXBi// pointer to XB[i] sub GR_ShftPi = GR_ShftPi_8, GR_ShftPi // (256-16)*i };; @@ -890,13 +890,13 @@ GLOBAL_LIBM_ENTRY(erfc) { .mmi ldfe FR_Xb = [GR_ERFC_XB_TB] add GR_ShftA12 = 0xC0, GR_ShftPi // pointer shift for A12 - add GR_ShftA13 = 0xD0, GR_ShftPi // pointer shift for A13 + add GR_ShftA13 = 0xD0, GR_ShftPi // pointer shift for A13 };; { .mfi add GR_P_A13 = GR_ERFC_P_TB, GR_ShftA13 // pointer to A13 nop.f 0 - and exp_GR_index_1 = 0x0f, exp_GR_N + and exp_GR_index_1 = 0x0f, exp_GR_N } { .mfi add GR_P_A12 = GR_ERFC_P_TB, GR_ShftA12 // pointer to A12 @@ -905,52 +905,52 @@ GLOBAL_LIBM_ENTRY(erfc) };; { .mfi - ldfe FR_A12 = [GR_P_A12], -64 + ldfe FR_A12 = [GR_P_A12], -64 nop.f 0 - and exp_GR_index_2_16 = 0x70, exp_GR_N + and exp_GR_index_2_16 = 0x70, exp_GR_N } { .mfi - ldfe FR_A13 = [GR_P_A13], -64 + ldfe FR_A13 = [GR_P_A13], -64 nop.f 0 - shladd EXP_AD_T1 = exp_GR_index_1, 4, EXP_AD_TB1 -};; + shladd EXP_AD_T1 = exp_GR_index_1, 4, EXP_AD_TB1 +};; -{ .mmi +{ .mmi ldfe FR_A8 = [GR_P_A12], 32 - ldfe FR_A9 = [GR_P_A13], 32 + ldfe FR_A9 = [GR_P_A13], 32 add EXP_AD_T2 = EXP_AD_TB2, exp_GR_index_2_16 };; { .mmi ldfe FR_A10 = [GR_P_A12], -96 ldfe FR_A11 = [GR_P_A13], -96 - nop.i 0 + nop.i 0 };; { .mmi ldfe FR_A4 = [GR_P_A12], 32 - ldfe FR_A5 = [GR_P_A13], 32 + ldfe FR_A5 = [GR_P_A13], 32 shr r2 = exp_GR_N, 0x7 };; -{ .mfi - ldfe FR_A6 = [GR_P_A12], -64 +{ .mfi + ldfe FR_A6 = [GR_P_A12], -64 fma.s1 exp_rP4pP3 = exp_r, exp_P4, exp_P3 nop.i 0 } -{ .mfi - ldfe FR_A7 = [GR_P_A13], -64 +{ .mfi + ldfe FR_A7 = [GR_P_A13], -64 fma.s1 exp_rsq = exp_r, exp_r, f0 nop.i 0 };; { .mmi ldfe FR_A2 = [GR_P_A12], -32 - ldfe FR_A3 = [GR_P_A13], -32 + ldfe FR_A3 = [GR_P_A13], -32 addl exp_GR_biased_M = 0xffff, r2 };; -{ .mmi +{ .mmi ldfe FR_A0 = [GR_P_A12], 224 ldfe FR_A1 = [GR_P_A13] nop.i 0 @@ -975,12 +975,12 @@ GLOBAL_LIBM_ENTRY(erfc) };; { .mfi - nop.m 0 + nop.m 0 fma.s1 exp_rcube = exp_r, exp_rsq, f0 nop.i 0 -} -{ .mfi - nop.m 0 +} +{ .mfi + nop.m 0 fma.s1 exp_P_lo = exp_r, exp_rP4pP3, exp_P2 nop.i 0 };; @@ -988,41 +988,41 @@ GLOBAL_LIBM_ENTRY(erfc) { .mfi nop.m 0 fnma.s1 exp_f = EXP_Nfloat, exp_ln2_by_128_lo, f8_sq_lo - nop.i 0 -};; + nop.i 0 +};; { .mfi nop.m 0 fma.s1 FR_P14_0_1 = FR_LocArg, FR_LocArg, f0 // xloc ^2 - nop.i 0 + nop.i 0 } { .mfi - nop.m 0 + nop.m 0 fma.s1 FR_P14_0_2 = FR_A13, FR_LocArg, FR_A12 - nop.i 0 + nop.i 0 };; { .mfi nop.m 0 - fma.s1 FR_P14_1_1 = FR_A9, FR_LocArg, FR_A8 + fma.s1 FR_P14_1_1 = FR_A9, FR_LocArg, FR_A8 nop.i 0 } { .mfi nop.m 0 - fma.s1 FR_P14_1_2 = FR_A11, FR_LocArg, FR_A10 + fma.s1 FR_P14_1_2 = FR_A11, FR_LocArg, FR_A10 nop.i 0 };; { .mfi nop.m 0 fma.s1 FR_P14_2_1 = FR_A5, FR_LocArg, FR_A4 - nop.i 0 + nop.i 0 } { .mfi nop.m 0 fma.s1 FR_P14_2_2 = FR_A7, FR_LocArg, FR_A6 nop.i 0 -};; +};; { .mfi nop.m 0 @@ -1057,7 +1057,7 @@ GLOBAL_LIBM_ENTRY(erfc) nop.i 0 };; { .mfi - nop.m 0 + nop.m 0 fma.s1 exp_S1 = EXP_2M, exp_T1, f0 nop.i 0 };; @@ -1080,9 +1080,9 @@ GLOBAL_LIBM_ENTRY(erfc) };; { .mfi - nop.m 0 - fma.s1 exp_S = exp_S1, exp_S2, f0 - nop.i 0 + nop.m 0 + fma.s1 exp_S = exp_S1, exp_S2, f0 + nop.i 0 } { .mfi nop.m 0 @@ -1105,34 +1105,34 @@ GLOBAL_LIBM_ENTRY(erfc) { .mfi nop.m 0 fma.s1 FR_Exp = exp_S, exp_P, exp_S // exp(-x^2) - nop.i 0 + nop.i 0 } { .mfi nop.m 0 - fma.s1 FR_Pol = FR_P14_13_2, FR_P14_12_1, FR_P14_13_1 + fma.s1 FR_Pol = FR_P14_13_2, FR_P14_12_1, FR_P14_13_1 nop.i 0 };; { .mfi nop.m 0 fma.d.s0 FR_Tmpf = f8, f1, f0 // flag d - nop.i 0 + nop.i 0 };; //p6: result for 0 < x < = 28.0, //p7: result for -6.0 <= x < 0, //p8: exit for - 6.0 <= x < UnfBound ~=~ 26.54.. - + .pred.rel "mutex",p6,p7 { .mfi nop.m 0 -(p6) fma.d.s0 f8 = FR_Exp, FR_Pol, f0 - nop.i 0 +(p6) fma.d.s0 f8 = FR_Exp, FR_Pol, f0 + nop.i 0 } { .mfb mov GR_Parameter_TAG = 208 -(p7) fnma.d.s0 f8 = FR_Exp, FR_Pol, FR_2 -(p8) br.ret.sptk b0 +(p7) fnma.d.s0 f8 = FR_Exp, FR_Pol, FR_2 +(p8) br.ret.sptk b0 };; GLOBAL_LIBM_END(erfc) @@ -1152,7 +1152,7 @@ LOCAL_LIBM_ENTRY(__libm_error_region) mov GR_SAVE_PFS=ar.pfs // Save ar.pfs } { .mfi -.fframe 64 +.fframe 64 add sp=-64,sp // Create new stack nop.f 0 mov GR_SAVE_GP=gp // Save gp @@ -1160,18 +1160,18 @@ LOCAL_LIBM_ENTRY(__libm_error_region) { .mmi stfd [GR_Parameter_Y] = FR_Y,16 // STORE Parameter 2 on stack add GR_Parameter_X = 16,sp // Parameter 1 address -.save b0, GR_SAVE_B0 +.save b0, GR_SAVE_B0 mov GR_SAVE_B0=b0 // Save b0 };; .body { .mib stfd [GR_Parameter_X] = FR_X // STORE Parameter 1 on stack add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address - nop.b 0 + nop.b 0 } { .mib stfd [GR_Parameter_Y] = FR_RESULT // STORE Parameter 3 on stack - add GR_Parameter_Y = -16,GR_Parameter_Y + add GR_Parameter_Y = -16,GR_Parameter_Y br.call.sptk b0=__libm_error_support# // Call error handling function };; { .mmi @@ -1189,7 +1189,7 @@ LOCAL_LIBM_ENTRY(__libm_error_region) mov gp = GR_SAVE_GP // Restore gp mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs br.ret.sptk b0 // Return -};; +};; LOCAL_LIBM_END(__libm_error_region) .type __libm_error_support#,@function diff --git a/sysdeps/ia64/fpu/s_erfcf.S b/sysdeps/ia64/fpu/s_erfcf.S index 2e3eeab3c7..ce6be8db62 100644 --- a/sysdeps/ia64/fpu/s_erfcf.S +++ b/sysdeps/ia64/fpu/s_erfcf.S @@ -21,20 +21,20 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // // History @@ -51,23 +51,23 @@ // Overview of operation //============================================================== // 1. 0 <= x <= 10.06 -// +// // erfcf(x) = P15(x) * exp( -x^2 ) // // Comment: // // Let x(0)=0, x(i) = 2^(i), i=1,...3, x(4)= 10.06 -// +// // Let x(i)<= x < x(i+1). // We can find i as exponent of argument x (let i = 0 for 0<= x < 2 ) -// +// // Let P15(x) - polynomial approximation of degree 15 for function // erfcf(x) * exp( x^2) and x(i) <= x <= x(i+1), i = 0,1,2,3 // Polynomial coeffitients we have in the table erfc_p_table. // // So we can find result for erfcf(x) as above. // Algorithm description for exp function see below. -// +// // 2. -4.4 <= x < 0 // // erfcf(x) = 2.0 - erfcf(-x) @@ -77,20 +77,20 @@ // erfcf(x) ~=~ 0.0 // // 4. x < -4.4 -// +// // erfcf(x) ~=~ 2.0 -// Special values +// Special values //============================================================== // erfcf(+0) = 1.0 // erfcf(-0) = 1.0 -// erfcf(+qnan) = +qnan -// erfcf(-qnan) = -qnan -// erfcf(+snan) = +qnan -// erfcf(-snan) = -qnan +// erfcf(+qnan) = +qnan +// erfcf(-qnan) = -qnan +// erfcf(+snan) = +qnan +// erfcf(-snan) = -qnan -// erfcf(-inf) = 2.0 +// erfcf(-inf) = 2.0 // erfcf(+inf) = +0 //============================================================== @@ -123,12 +123,12 @@ // // Registers used //============================================================== -// Floating Point registers used: +// Floating Point registers used: // f8, input // f6,f7,f9 -> f11, f32 -> f92 -// General registers used: -// r14 -> r22,r32 -> r50 +// General registers used: +// r14 -> r22,r32 -> r50 // Predicate registers used: // p6 -> p15 @@ -195,10 +195,10 @@ EXP_INV_LN2_2TO63 = f7 EXP_W_2TO56_RSH = f9 exp_ln2_by_128_hi = f11 -EXP_RSHF_2TO56 = f32 -exp_ln2_by_128_lo = f33 +EXP_RSHF_2TO56 = f32 +exp_ln2_by_128_lo = f33 EXP_RSHF = f34 -EXP_Nfloat = f35 +EXP_Nfloat = f35 exp_r = f36 exp_rsq = f37 EXP_2M = f38 @@ -206,7 +206,7 @@ exp_S1 = f39 exp_T1 = f40 exp_P = f41 exp_S = f42 -EXP_NORM_f8 = f43 +EXP_NORM_f8 = f43 exp_S2 = f44 exp_T2 = f45 @@ -281,19 +281,19 @@ RODATA // double-extended 1/ln(2) // 3fff b8aa 3b29 5c17 f0bb be87fed0691d3e88 -// 3fff b8aa 3b29 5c17 f0bc +// 3fff b8aa 3b29 5c17 f0bc // For speed the significand will be loaded directly with a movl and setf.sig // and the exponent will be bias+63 instead of bias+0. Thus subsequent // computations need to scale appropriately. -// The constant 128/ln(2) is needed for the computation of w. This is also +// The constant 128/ln(2) is needed for the computation of w. This is also // obtained by scaling the computations. // -// Two shifting constants are loaded directly with movl and setf.d. -// 1. EXP_RSHF_2TO56 = 1.1000..00 * 2^(63-7) +// Two shifting constants are loaded directly with movl and setf.d. +// 1. EXP_RSHF_2TO56 = 1.1000..00 * 2^(63-7) // This constant is added to x*1/ln2 to shift the integer part of // x*128/ln2 into the rightmost bits of the significand. // The result of this fma is EXP_W_2TO56_RSH. -// 2. EXP_RSHF = 1.1000..00 * 2^(63) +// 2. EXP_RSHF = 1.1000..00 * 2^(63) // This constant is subtracted from EXP_W_2TO56_RSH * 2^(-56) to give // the integer part of w, n, as a floating-point number. // The result of this fms is EXP_Nfloat. @@ -345,7 +345,7 @@ LOCAL_OBJECT_END(exp_table_2) LOCAL_OBJECT_START(erfc_p_table) -// Pol_0 +// Pol_0 data8 0xBEA3260C63CB0446 //A15 = -5.70673541831883454676e-07 data8 0x3EE63D6178077654 //A14 = +1.06047480138940182343e-05 data8 0xBF18646BC5FC70A7 //A13 = -9.30491237309283694347e-05 @@ -362,7 +362,7 @@ data8 0xBFE81270C361852B //A3 = -7.52251035312075583309e-01 data8 0x3FEFFFFFC67295FC //A2 = +9.99999892800303301771e-01 data8 0xBFF20DD74F8CD2BF //A1 = -1.12837916445020868099e+00 data8 0x3FEFFFFFFFFE7C1D //A0 = +9.99999999988975570714e-01 -// Pol_1 +// Pol_1 data8 0xBDE8EC4BDD953B56 //A15 = -1.81338928934942767144e-10 data8 0x3E43607F269E2A1C //A14 = +9.02309090272196442358e-09 data8 0xBE8C4D9E69C10E02 //A13 = -2.10875261143659275328e-07 @@ -379,7 +379,7 @@ data8 0xBFE547BFE39AE2EA //A3 = -6.65008492032112467310e-01 data8 0x3FEE7C91BDF13578 //A2 = +9.52706213932898128515e-01 data8 0xBFF1CB5B61F8C589 //A1 = -1.11214769621105541214e+00 data8 0x3FEFEA56BC81FD37 //A0 = +9.97355812243688815239e-01 -// Pol_2 +// Pol_2 data8 0xBD302724A12F46E0 //A15 = -5.73866382814058809406e-14 data8 0x3D98889B75D3102E //A14 = +5.57829983681360947356e-12 data8 0xBDF16EA15074A1E9 //A13 = -2.53671153922423457844e-10 @@ -396,7 +396,7 @@ data8 0xBFD224DE9F62C258 //A3 = -2.83500342989133623476e-01 data8 0x3FE28A95CB8C6D3E //A2 = +5.79417131000276437708e-01 data8 0xBFEC21205D358672 //A1 = -8.79043752717008257224e-01 data8 0x3FEDAE44D5EDFE5B //A0 = +9.27523057776805771830e-01 -// Pol_3 +// Pol_3 data8 0xBCA3BCA734AC82F1 //A15 = -1.36952437983096410260e-16 data8 0x3D16740DC3990612 //A14 = +1.99425676175410093285e-14 data8 0xBD77F4353812C46A //A13 = -1.36162367755616790260e-12 @@ -419,8 +419,8 @@ LOCAL_OBJECT_END(erfc_p_table) .section .text GLOBAL_LIBM_ENTRY(erfcf) -// Form index i for table erfc_p_table as exponent of x -// We use i + bias in real calculations +// Form index i for table erfc_p_table as exponent of x +// We use i + bias in real calculations { .mlx getf.exp GR_IndxPlusBias = f8 // (sign + exp + bias) of x movl exp_GR_sig_inv_ln2 = 0xb8aa3b295c17f0bc //signif.of 1/ln2 @@ -445,14 +445,14 @@ GLOBAL_LIBM_ENTRY(erfcf) ;; // Form two constants we need -// 1/ln2 * 2^63 to compute w = x * 1/ln2 * 128 +// 1/ln2 * 2^63 to compute w = x * 1/ln2 * 128 // 1.1000..000 * 2^(63+63-7) to right shift int(w) into the significand // p9: x = 0,+inf,-inf,nan,unnorm. // p10: x!= 0,+inf,-inf,nan,unnorm. { .mfi setf.sig EXP_INV_LN2_2TO63 = exp_GR_sig_inv_ln2 // Form 1/ln2*2^63 - fclass.m p9,p10 = f8,0xef + fclass.m p9,p10 = f8,0xef shl GR_ShftPi_bias = GR_BIAS, 7 } { .mfi @@ -484,7 +484,7 @@ GLOBAL_LIBM_ENTRY(erfcf) } ;; -// Form shift GR_ShftPi from the beginning of erfc_p_table +// Form shift GR_ShftPi from the beginning of erfc_p_table // to the polynomial with number i { .mfi ldfps FR_UnfBound, FR_EpsNorm = [EXP_AD_TB1],8 @@ -494,11 +494,11 @@ GLOBAL_LIBM_ENTRY(erfcf) { .mfi setf.d EXP_RSHF = exp_GR_rshf // Form right shift 1.100 * 2^63 (p7) fms.s1 FR_AbsArg = f1, f0, f8 // |x| if x < 0 - mov exp_TB1_size = 0x100 + mov exp_TB1_size = 0x100 } ;; -// Form pointer GR_P_POINT_3 to the beginning of erfc_p_table +// Form pointer GR_P_POINT_3 to the beginning of erfc_p_table { .mfi setf.d FR_05 = GR_05 nop.f 0 @@ -517,7 +517,7 @@ GLOBAL_LIBM_ENTRY(erfcf) add GR_P_POINT_2 = GR_P_POINT_3, GR_ShftPi } { .mfi - ldfe exp_ln2_by_128_hi = [EXP_AD_TB1],16 + ldfe exp_ln2_by_128_hi = [EXP_AD_TB1],16 fma.s1 FR_NormX = f8,f1,f0 add GR_P_POINT_3 = GR_P_POINT_3, GR_ShftPi } @@ -526,19 +526,19 @@ GLOBAL_LIBM_ENTRY(erfcf) // Load coefficients for polynomial P15(x) { .mfi ldfpd FR_A15, FR_A14 = [GR_P_POINT_1], 16 - nop.f 0 + nop.f 0 add GR_P_POINT_3 = 0x30, GR_P_POINT_3 } { .mfi ldfe exp_ln2_by_128_lo = [EXP_AD_TB1], 16 - nop.f 0 - add GR_P_POINT_2 = 0x20, GR_P_POINT_2 + nop.f 0 + add GR_P_POINT_2 = 0x20, GR_P_POINT_2 } ;; // Now EXP_AD_TB1 points to the beginning of table 1 { .mlx - ldfpd FR_A13, FR_A12 = [GR_P_POINT_1] + ldfpd FR_A13, FR_A12 = [GR_P_POINT_1] movl GR_1_by_6 = 0x3FC5555555555555 } { .mfi @@ -564,10 +564,10 @@ GLOBAL_LIBM_ENTRY(erfcf) // By adding 1.10...0*2^63 we shift and get round_int(W) in significand. // We actually add 1.10...0*2^56 to X * Inv_log2 to do the same thing. { .mfi - ldfpd FR_A7, FR_A6 = [GR_P_POINT_3] + ldfpd FR_A7, FR_A6 = [GR_P_POINT_3] fma.s1 EXP_W_2TO56_RSH = EXP_NORM_f8,EXP_INV_LN2_2TO63,EXP_RSHF_2TO56 add EXP_AD_TB2 = exp_TB1_size, EXP_AD_TB1 - + } { .mfi ldfpd FR_A5, FR_A4 = [GR_P_POINT_4], 16 @@ -581,7 +581,7 @@ GLOBAL_LIBM_ENTRY(erfcf) fmerge.s FR_X = f8,f8 nop.i 0 } -{ .mfi +{ .mfi ldfpd FR_A1, FR_A0 = [GR_P_POINT_1] nop.f 0 nop.i 0 @@ -601,7 +601,7 @@ GLOBAL_LIBM_ENTRY(erfcf) nop.m 0 (p6) fcmp.gt.unc.s1 p15,p0 = FR_AbsArg, FR_POS_ARG_ASYMP //p6: x > 0 nop.i 0 -} +} ;; { .mfi @@ -616,7 +616,7 @@ GLOBAL_LIBM_ENTRY(erfcf) } ;; -// Nfloat = round_int(W) +// Nfloat = round_int(W) // The signficand of EXP_W_2TO56_RSH contains the rounded integer part of W, // as a twos complement number in the lower bits (that is, it may be negative). // That twos complement number (called N) is put into exp_GR_N. @@ -629,12 +629,12 @@ GLOBAL_LIBM_ENTRY(erfcf) nop.m 0 fms.s1 EXP_Nfloat = EXP_W_2TO56_RSH, EXP_2TOM56, EXP_RSHF nop.i 0 -} +} { .mfb (p15) mov GR_Parameter_TAG = 209 (p15) fma.s.s0 FR_RESULT = FR_EpsNorm,FR_EpsNorm,f0 //Result.for x>10.06 (p15) br.cond.spnt __libm_error_region -} +} ;; // Now we can calculate polynomial P15(x) @@ -652,19 +652,19 @@ GLOBAL_LIBM_ENTRY(erfcf) { .mfi nop.m 0 - fma.s1 FR_P15_1_2 = FR_A13, FR_AbsArg, FR_A12 - nop.i 0 + fma.s1 FR_P15_1_2 = FR_A13, FR_AbsArg, FR_A12 + nop.i 0 } ;; { .mfi - getf.sig exp_GR_N = EXP_W_2TO56_RSH - fma.s1 FR_P15_2_1 = FR_A9, FR_AbsArg, FR_A8 - nop.i 0 + getf.sig exp_GR_N = EXP_W_2TO56_RSH + fma.s1 FR_P15_2_1 = FR_A9, FR_AbsArg, FR_A8 + nop.i 0 } { .mfi nop.m 0 - fma.s1 FR_P15_2_2 = FR_A11, FR_AbsArg, FR_A10 + fma.s1 FR_P15_2_2 = FR_A11, FR_AbsArg, FR_A10 nop.i 0 } ;; @@ -672,7 +672,7 @@ GLOBAL_LIBM_ENTRY(erfcf) { .mfi nop.m 0 fma.s1 FR_P15_3_1 = FR_A5, FR_AbsArg, FR_A4 - nop.i 0 + nop.i 0 } { .mfi nop.m 0 @@ -691,7 +691,7 @@ GLOBAL_LIBM_ENTRY(erfcf) and exp_GR_index_1 = 0x0f, exp_GR_N fma.s1 FR_P15_4_1 = FR_A1, FR_AbsArg, FR_A0 shr r2 = exp_GR_N, 0x7 - + } { .mfi and exp_GR_index_2_16 = 0x70, exp_GR_N @@ -700,12 +700,12 @@ GLOBAL_LIBM_ENTRY(erfcf) } ;; -// EXP_AD_T1 has address of T1 -// EXP_AD_T2 has address if T2 +// EXP_AD_T1 has address of T1 +// EXP_AD_T2 has address if T2 { .mfi add EXP_AD_T2 = EXP_AD_TB2, exp_GR_index_2_16 - nop.f 0 + nop.f 0 shladd EXP_AD_T1 = exp_GR_index_1, 4, EXP_AD_TB1 } { .mfi @@ -716,15 +716,15 @@ GLOBAL_LIBM_ENTRY(erfcf) ;; // Create Scale = 2^M -// r = x - Nfloat * ln2_by_128_hi - +// r = x - Nfloat * ln2_by_128_hi + { .mfi setf.exp EXP_2M = exp_GR_biased_M fma.s1 FR_P15_7_1 = FR_P15_0_1, FR_P15_1_1, FR_P15_1_2 nop.i 0 } { .mfi - ldfe exp_T2 = [EXP_AD_T2] + ldfe exp_T2 = [EXP_AD_T2] nop.f 0 nop.i 0 } @@ -739,45 +739,45 @@ GLOBAL_LIBM_ENTRY(erfcf) } { .mfi nop.m 0 - fma.s1 FR_P15_8_1 = FR_P15_1_1, FR_P15_2_2, FR_P15_2_1 + fma.s1 FR_P15_8_1 = FR_P15_1_1, FR_P15_2_2, FR_P15_2_1 nop.i 0 } ;; { .mfi nop.m 0 - fma.s1 FR_P15_9_1 = FR_P15_1_1, FR_P15_4_2, FR_P15_4_1 + fma.s1 FR_P15_9_1 = FR_P15_1_1, FR_P15_4_2, FR_P15_4_1 nop.i 0 } { .mfi nop.m 0 - fma.s1 FR_P15_9_2 = FR_P15_1_1, FR_P15_3_2, FR_P15_3_1 + fma.s1 FR_P15_9_2 = FR_P15_1_1, FR_P15_3_2, FR_P15_3_1 nop.i 0 } ;; { .mfi nop.m 0 - fma.s1 exp_P = FR_1_by_6, exp_r, FR_05 + fma.s1 exp_P = FR_1_by_6, exp_r, FR_05 nop.i 0 } { .mfi nop.m 0 - fma.s1 exp_rsq = exp_r, exp_r, f0 + fma.s1 exp_rsq = exp_r, exp_r, f0 nop.i 0 } ;; { .mfi nop.m 0 - fma.s1 FR_P15_13_1 = FR_P15_7_2, FR_P15_7_1, FR_P15_8_1 + fma.s1 FR_P15_13_1 = FR_P15_7_2, FR_P15_7_1, FR_P15_8_1 nop.i 0 } ;; { .mfi nop.m 0 - fma.s1 FR_P15_14_1 = FR_P15_7_2, FR_P15_9_2, FR_P15_9_1 + fma.s1 FR_P15_14_1 = FR_P15_7_2, FR_P15_9_2, FR_P15_9_1 nop.i 0 } { .mfi @@ -794,7 +794,7 @@ GLOBAL_LIBM_ENTRY(erfcf) } { .mfi nop.m 0 - fma.s1 exp_S1 = EXP_2M, exp_T2, f0 + fma.s1 exp_S1 = EXP_2M, exp_T2, f0 nop.i 0 } ;; @@ -816,30 +816,30 @@ GLOBAL_LIBM_ENTRY(erfcf) { .mfi nop.m 0 fma.s1 FR_Exp = exp_S, exp_P, exp_S // exp(-x^2) - nop.i 0 + nop.i 0 } -;; +;; { .mfi nop.m 0 fma.s.s0 FR_Tmpf = f8, f1, f0 // Flag d - nop.i 0 + nop.i 0 } ;; -//p6: result for 0 < x < = POS_ARG_ASYMP +//p6: result for 0 < x < = POS_ARG_ASYMP //p7: result for - NEG_ARG_ASYMP <= x < 0 //p8: exit for - NEG_ARG_ASYMP <= x <= UnfBound, x!=0 .pred.rel "mutex",p6,p7 { .mfi nop.m 0 -(p6) fma.s.s0 f8 = FR_Exp, FR_Pol, f0 - nop.i 0 +(p6) fma.s.s0 f8 = FR_Exp, FR_Pol, f0 + nop.i 0 } { .mfb mov GR_Parameter_TAG = 209 (p7) fnma.s.s0 f8 = FR_Exp, FR_Pol, FR_2 -(p8) br.ret.sptk b0 +(p8) br.ret.sptk b0 } ;; @@ -847,7 +847,7 @@ GLOBAL_LIBM_ENTRY(erfcf) { .mfb nop.m 0 nop.f 0 -(p10) br.cond.spnt __libm_error_region +(p10) br.cond.spnt __libm_error_region } ;; @@ -921,9 +921,9 @@ GLOBAL_LIBM_END(erfcf) // Call via (p10) br.cond.spnt __libm_error_region -// for UnfBound < x < = POS_ARG_ASYMP +// for UnfBound < x < = POS_ARG_ASYMP // and -// +// // call via (p15) br.cond.spnt __libm_error_region // for x > POS_ARG_ASYMP @@ -936,7 +936,7 @@ LOCAL_LIBM_ENTRY(__libm_error_region) mov GR_SAVE_PFS=ar.pfs // Save ar.pfs } { .mfi -.fframe 64 +.fframe 64 add sp=-64,sp // Create new stack nop.f 0 mov GR_SAVE_GP=gp // Save gp @@ -944,18 +944,18 @@ LOCAL_LIBM_ENTRY(__libm_error_region) { .mmi stfs [GR_Parameter_Y] = FR_Y,16 // STORE Parameter 2 on stack add GR_Parameter_X = 16,sp // Parameter 1 address -.save b0, GR_SAVE_B0 +.save b0, GR_SAVE_B0 mov GR_SAVE_B0=b0 // Save b0 };; .body { .mib stfs [GR_Parameter_X] = FR_X // STORE Parameter 1 on stack add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address - nop.b 0 + nop.b 0 } { .mib stfs [GR_Parameter_Y] = FR_RESULT // STORE Parameter 3 on stack - add GR_Parameter_Y = -16,GR_Parameter_Y + add GR_Parameter_Y = -16,GR_Parameter_Y br.call.sptk b0=__libm_error_support# // Call error handling function };; { .mmi @@ -973,7 +973,7 @@ LOCAL_LIBM_ENTRY(__libm_error_region) mov gp = GR_SAVE_GP // Restore gp mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs br.ret.sptk b0 // Return -};; +};; LOCAL_LIBM_END(__libm_error_region) .type __libm_error_support#,@function diff --git a/sysdeps/ia64/fpu/s_erfcl.S b/sysdeps/ia64/fpu/s_erfcl.S index 31ffc2db12..b9f7004aad 100644 --- a/sysdeps/ia64/fpu/s_erfcl.S +++ b/sysdeps/ia64/fpu/s_erfcl.S @@ -21,20 +21,20 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // // History @@ -53,7 +53,7 @@ // Implementation and Algorithm Notes: //============================================================== // 1. 0 <= x <= 107.0 -// +// // erfcl(x) ~=~ P15(z) * expl( -x^2 )/(dx + x), z = x - xc(i). // // Comment: @@ -62,28 +62,28 @@ // argument intervals [x(i),x(i+1)] with length ratio q = 2^(1/4). // Values xc(i) we have in the table erfc_xc_table,xc(i)=x(i)for i = 0 // and xc(i)= 0.5*( x(i)+x(i+1) ) for i>0. -// +// // Let x(i)<= x < x(i+1). // We can find i as exponent of number (x + 1)^4. -// +// // Let P15(z)= a0+ a1*z +..+a15*z^15 - polynomial approximation of degree 15 -// for function erfcl(z+xc(i)) * expl( (z+xc(i))^2)* (dx+z+xc(i)) and +// for function erfcl(z+xc(i)) * expl( (z+xc(i))^2)* (dx+z+xc(i)) and // -0.5*[x(i+1)-x(i)] <= z <= 0.5*[x(i+1)-x(i)]. // // Let Q(z)= (P(z)- S)/S, S = a0, rounded to 16 bits. // Polynomial coeffitients for Q(z) we have in the table erfc_Q_table as // long double values // -// We use multi precision to calculate input argument -x^2 for expl and -// for u = 1/(dx + x). +// We use multi precision to calculate input argument -x^2 for expl and +// for u = 1/(dx + x). // // Algorithm description for expl function see below. In accordance with // denotation of this algorithm we have for expl: // -// expl(X) ~=~ 2^K*T_1*(1+W_1)*T_2*(1+W_2)*(1+ poly(r)), X = -x^2. +// expl(X) ~=~ 2^K*T_1*(1+W_1)*T_2*(1+W_2)*(1+ poly(r)), X = -x^2. // // Final calculations for erfcl: -// +// // erfcl(x) ~=~ // // 2^K*T_1*(1+W_1)*T_2*(1+W_2)*(1+ poly(r))*(1-dy)*S*(1+Q(z))*u*(1+du), @@ -95,35 +95,35 @@ // 1) M = 2^K*T_1*T_2*S without rounding error, // 2) W = W_1 + (W_2 + W_1*W_2), where 1+W ~=~ (1+W_1)(1+W_2), // 3) H = W - dy, where 1+H ~=~ (1+W )(1-dy), -// 4) R = poly(r)*H + poly(r), +// 4) R = poly(r)*H + poly(r), // 5) R = H + R , where 1+R ~=~ (1+H )(1+poly(r)), // 6) G = Q(z)*R + Q(z), // 7) R1 = R + du, where 1+R1 ~=~ (1+R)(1+du), // 8) G1 = R1 + G, where 1+G1 ~=~ (1+R1)(1+Q(z)), // 9) V = G1*M*u, -// 10) erfcl(x) ~=~ M*u + V -// +// 10) erfcl(x) ~=~ M*u + V +// // 2. -6.5 <= x < 0 // // erfcl(x) = 2.0 - erfl(-x) // // 3. x > 107.0 -// erfcl(x) ~=~ 0.0 +// erfcl(x) ~=~ 0.0 // -// 4. x < -6.5 -// erfcl(x) ~=~ 2.0 +// 4. x < -6.5 +// erfcl(x) ~=~ 2.0 -// Special values +// Special values //============================================================== // erfcl(+0) = 1.0 // erfcl(-0) = 1.0 -// erfcl(+qnan) = +qnan -// erfcl(-qnan) = -qnan -// erfcl(+snan) = +qnan -// erfcl(-snan) = -qnan +// erfcl(+qnan) = +qnan +// erfcl(-qnan) = -qnan +// erfcl(+snan) = +qnan +// erfcl(-snan) = -qnan -// erfcl(-inf) = 2.0 +// erfcl(-inf) = 2.0 // erfcl(+inf) = +0 //============================================================== @@ -139,35 +139,35 @@ // // On input, X is in register format // -// On output, +// On output, // // scale*(Y_hi + Y_lo) approximates exp(X) // // The accuracy is sufficient for a highly accurate 64 sig. -// bit implementation. Safe is set if there is no danger of -// overflow/underflow when the result is composed from scale, -// Y_hi and Y_lo. Thus, we can have a fast return if Safe is set. -// Otherwise, one must prepare to handle the possible exception -// appropriately. Note that SAFE not set (false) does not mean +// bit implementation. Safe is set if there is no danger of +// overflow/underflow when the result is composed from scale, +// Y_hi and Y_lo. Thus, we can have a fast return if Safe is set. +// Otherwise, one must prepare to handle the possible exception +// appropriately. Note that SAFE not set (false) does not mean // that overflow/underflow will occur; only the setting of SAFE // guarantees the opposite. // -// **** High Level Overview **** +// **** High Level Overview **** // // The method consists of three cases. -// +// // If |X| < Tiny use case exp_tiny; // else if |X| < 2^(-6) use case exp_small; // else use case exp_regular; // // Case exp_tiny: // -// 1 + X can be used to approximate exp(X) +// 1 + X can be used to approximate exp(X) // X + X^2/2 can be used to approximate exp(X) - 1 // // Case exp_small: // -// Here, exp(X) and exp(X) - 1 can all be +// Here, exp(X) and exp(X) - 1 can all be // approximated by a relatively simple polynomial. // // This polynomial resembles the truncated Taylor series @@ -204,9 +204,9 @@ // r := (X - N*L_hi) - N*L_lo // // We pick L_hi such that N*L_hi is representable in 64 sig. bits -// and thus the FMA X - N*L_hi is error free. So r is the -// 1 rounding error from an exact reduction with respect to -// +// and thus the FMA X - N*L_hi is error free. So r is the +// 1 rounding error from an exact reduction with respect to +// // L_hi + L_lo. // // In particular, L_hi has 30 significant bit and can be stored @@ -216,10 +216,10 @@ // Step 2: Approximation // // exp(r) - 1 is approximated by a short polynomial of the form -// +// // r + A_1 r^2 + A_2 r^3 + A_3 r^4 . // -// Step 3: Composition from Table Values +// Step 3: Composition from Table Values // // The value 2^( N / 2^12 ) can be composed from a couple of tables // of precalculated values. First, express N as three integers @@ -232,8 +232,8 @@ // lsb's, M_1 is the next 6, and K is simply N shifted right // arithmetically (sign extended) by 12 bits. // -// Now, 2^( N / 2^12 ) is simply -// +// Now, 2^( N / 2^12 ) is simply +// // 2^K * 2^( M_1 / 2^6 ) * 2^( M_2 / 2^12 ) // // Clearly, 2^K needs no tabulation. The other two values are less @@ -244,14 +244,14 @@ // Define two mathematical values, delta_1 and delta_2, implicitly // such that // -// T_1 = exp( [M_1 log(2)/2^6] - delta_1 ) +// T_1 = exp( [M_1 log(2)/2^6] - delta_1 ) // T_2 = exp( [M_2 log(2)/2^12] - delta_2 ) // // are representable as 24 significant bits. To illustrate the idea, -// we show how we define delta_1: +// we show how we define delta_1: // // T_1 := round_to_24_bits( exp( M_1 log(2)/2^6 ) ) -// delta_1 = (M_1 log(2)/2^6) - log( T_1 ) +// delta_1 = (M_1 log(2)/2^6) - log( T_1 ) // // The last equality means mathematical equality. We then tabulate // @@ -264,7 +264,7 @@ // T and W via // // T := T_1 * T_2 ...exactly -// W := W_1 + (1 + W_1)*W_2 +// W := W_1 + (1 + W_1)*W_2 // // W approximates exp( delta ) - 1 where delta = delta_1 + delta_2. // The mathematical product of T and (W+1) is an accurate representation @@ -272,17 +272,17 @@ // // Step 4. Reconstruction // -// Finally, we can reconstruct exp(X), exp(X) - 1. +// Finally, we can reconstruct exp(X), exp(X) - 1. // Because // -// X = K * log(2) + (M_1*log(2)/2^6 - delta_1) +// X = K * log(2) + (M_1*log(2)/2^6 - delta_1) // + (M_2*log(2)/2^12 - delta_2) // + delta_1 + delta_2 + r ...accurately // We have // // exp(X) ~=~ 2^K * ( T + T*[exp(delta_1+delta_2+r) - 1] ) // ~=~ 2^K * ( T + T*[exp(delta + r) - 1] ) -// ~=~ 2^K * ( T + T*[(exp(delta)-1) +// ~=~ 2^K * ( T + T*[(exp(delta)-1) // + exp(delta)*(exp(r)-1)] ) // ~=~ 2^K * ( T + T*( W + (1+W)*poly(r) ) ) // ~=~ 2^K * ( Y_hi + Y_lo ) @@ -294,7 +294,7 @@ // exp(X)-1 ~=~ 2^K * ( Y_hi + Y_lo ) - 1 // ~=~ 2^K * ( Y_hi + Y_lo - 2^(-K) ) // -// and we combine Y_hi + Y_lo - 2^(-N) into the form of two +// and we combine Y_hi + Y_lo - 2^(-N) into the form of two // numbers Y_hi + Y_lo carefully. // // **** Algorithm Details **** @@ -305,8 +305,8 @@ // // Case exp_tiny: // -// The important points are to ensure an accurate result under -// different rounding directions and a correct setting of the SAFE +// The important points are to ensure an accurate result under +// different rounding directions and a correct setting of the SAFE // flag. // // If expm1 is 1, then @@ -325,11 +325,11 @@ // Here we compute a simple polynomial. To exploit parallelism, we split // the polynomial into several portions. // -// Let r = X +// Let r = X // // If exp ...i.e. exp( argument ) // -// rsq := r * r; +// rsq := r * r; // r4 := rsq*rsq // poly_lo := P_3 + r*(P_4 + r*(P_5 + r*P_6)) // poly_hi := r + rsq*(P_1 + r*P_2) @@ -381,12 +381,12 @@ // Registers used //============================================================== -// Floating Point registers used: +// Floating Point registers used: // f8, input // f9 -> f14, f36 -> f126 -// General registers used: -// r32 -> r71 +// General registers used: +// r32 -> r71 // Predicate registers used: // p6 -> p15 @@ -590,8 +590,8 @@ data8 0xFFFFFFFFFFFFFFFF,0x00003FFD // C1 LOCAL_OBJECT_END(Constants_exp_64_C) LOCAL_OBJECT_START(Constants_exp_64_T1) -data4 0x3F800000,0x3F8164D2,0x3F82CD87,0x3F843A29 -data4 0x3F85AAC3,0x3F871F62,0x3F88980F,0x3F8A14D5 +data4 0x3F800000,0x3F8164D2,0x3F82CD87,0x3F843A29 +data4 0x3F85AAC3,0x3F871F62,0x3F88980F,0x3F8A14D5 data4 0x3F8B95C2,0x3F8D1ADF,0x3F8EA43A,0x3F9031DC data4 0x3F91C3D3,0x3F935A2B,0x3F94F4F0,0x3F96942D data4 0x3F9837F0,0x3F99E046,0x3F9B8D3A,0x3F9D3EDA @@ -609,21 +609,21 @@ data4 0x3FF5257D,0x3FF7D0DF,0x3FFA83B3,0x3FFD3E0C LOCAL_OBJECT_END(Constants_exp_64_T1) LOCAL_OBJECT_START(Constants_exp_64_T2) -data4 0x3F800000,0x3F80058C,0x3F800B18,0x3F8010A4 -data4 0x3F801630,0x3F801BBD,0x3F80214A,0x3F8026D7 -data4 0x3F802C64,0x3F8031F2,0x3F803780,0x3F803D0E -data4 0x3F80429C,0x3F80482B,0x3F804DB9,0x3F805349 -data4 0x3F8058D8,0x3F805E67,0x3F8063F7,0x3F806987 -data4 0x3F806F17,0x3F8074A8,0x3F807A39,0x3F807FCA -data4 0x3F80855B,0x3F808AEC,0x3F80907E,0x3F809610 -data4 0x3F809BA2,0x3F80A135,0x3F80A6C7,0x3F80AC5A -data4 0x3F80B1ED,0x3F80B781,0x3F80BD14,0x3F80C2A8 -data4 0x3F80C83C,0x3F80CDD1,0x3F80D365,0x3F80D8FA -data4 0x3F80DE8F,0x3F80E425,0x3F80E9BA,0x3F80EF50 -data4 0x3F80F4E6,0x3F80FA7C,0x3F810013,0x3F8105AA -data4 0x3F810B41,0x3F8110D8,0x3F81166F,0x3F811C07 -data4 0x3F81219F,0x3F812737,0x3F812CD0,0x3F813269 -data4 0x3F813802,0x3F813D9B,0x3F814334,0x3F8148CE +data4 0x3F800000,0x3F80058C,0x3F800B18,0x3F8010A4 +data4 0x3F801630,0x3F801BBD,0x3F80214A,0x3F8026D7 +data4 0x3F802C64,0x3F8031F2,0x3F803780,0x3F803D0E +data4 0x3F80429C,0x3F80482B,0x3F804DB9,0x3F805349 +data4 0x3F8058D8,0x3F805E67,0x3F8063F7,0x3F806987 +data4 0x3F806F17,0x3F8074A8,0x3F807A39,0x3F807FCA +data4 0x3F80855B,0x3F808AEC,0x3F80907E,0x3F809610 +data4 0x3F809BA2,0x3F80A135,0x3F80A6C7,0x3F80AC5A +data4 0x3F80B1ED,0x3F80B781,0x3F80BD14,0x3F80C2A8 +data4 0x3F80C83C,0x3F80CDD1,0x3F80D365,0x3F80D8FA +data4 0x3F80DE8F,0x3F80E425,0x3F80E9BA,0x3F80EF50 +data4 0x3F80F4E6,0x3F80FA7C,0x3F810013,0x3F8105AA +data4 0x3F810B41,0x3F8110D8,0x3F81166F,0x3F811C07 +data4 0x3F81219F,0x3F812737,0x3F812CD0,0x3F813269 +data4 0x3F813802,0x3F813D9B,0x3F814334,0x3F8148CE data4 0x3F814E68,0x3F815402,0x3F81599C,0x3F815F37 LOCAL_OBJECT_END(Constants_exp_64_T2) @@ -765,7 +765,7 @@ LOCAL_OBJECT_END(erfc_s_table) LOCAL_OBJECT_START(erfc_Q_table) // Q(z)= (P(z)- S)/S // -// Pol0 +// Pol0 data8 0x98325D50F9DC3499, 0x0000BFAA //A0 = +3.07358861423101280650e-26L data8 0xED35081A2494DDD9, 0x00003FF8 //A1 = +1.44779757616302832466e-02L data8 0x9443549BCD0F94CE, 0x0000BFFD //A2 = -2.89576190966300084405e-01L @@ -782,7 +782,7 @@ data8 0xA8DEC641AACEB600, 0x0000BFF6 //A12 = -2.57675495383156581601e-03L data8 0x87F0E77BA914FBEB, 0x00003FF5 //A13 = +1.03714776726541296794e-03L data8 0xC306C2894C5CEF2D, 0x0000BFF3 //A14 = -3.71983348634136412407e-04L data8 0xBDAB416A989D0697, 0x00003FF1 //A15 = +9.04412111877987292294e-05L -// Pol1 +// Pol1 data8 0x82808893DA2DD83F, 0x00003FEE //A0 = +7.77853035974467145290e-06L data8 0xAE9CD9DCADC86113, 0x0000BFFB //A1 = -8.52601070853077921197e-02L data8 0x9D429743E312AD9F, 0x0000BFFB //A2 = -7.67871682732076080494e-02L @@ -799,7 +799,7 @@ data8 0x9078BC61927671C6, 0x0000BFF4 //A12 = -5.51115510818844954547e-04L data8 0xDF67AC6287A63B03, 0x00003FF2 //A13 = +2.13055585989529858265e-04L data8 0xA719CFEE67FCE1CE, 0x0000BFF1 //A14 = -7.96798844477905965933e-05L data8 0xEF926367BABBB029, 0x00003FEF //A15 = +2.85591875675765038065e-05L -// Pol2 +// Pol2 data8 0x82B5E5A93B059C50, 0x00003FEF //A0 = +1.55819100856330860049e-05L data8 0xDC856BC2542B1938, 0x0000BFFB //A1 = -1.07676355235999875911e-01L data8 0xDF225EF5694F14AE, 0x0000BFF8 //A2 = -1.36190345125628043277e-02L @@ -816,7 +816,7 @@ data8 0xB05949F947FA7AEF, 0x0000BFF2 //A12 = -1.68179306983868501372e-04L data8 0x82901D055A0D5CB6, 0x00003FF1 //A13 = +6.22572626227726684168e-05L data8 0xBB957698542D6FD0, 0x0000BFEF //A14 = -2.23617364009159182821e-05L data8 0x810740E1DF572394, 0x00003FEE //A15 = +7.69068800065192940487e-06L -// Pol3 +// Pol3 data8 0x9526D1C87655AFA8, 0x00003FEC //A0 = +2.22253260814242012255e-06L data8 0xA47E21EBFE73F72F, 0x0000BFF8 //A1 = -1.00398379581527733314e-02L data8 0xDE65685FCDF7A913, 0x0000BFFA //A2 = -5.42959286802879105148e-02L @@ -833,7 +833,7 @@ data8 0x8179C36354571747, 0x0000BFF1 //A12 = -6.17387951061077132522e-05L data8 0xB40F241C01C907E9, 0x00003FEF //A13 = +2.14647227210702861416e-05L data8 0xF436D84AD7D4D316, 0x0000BFED //A14 = -7.27815144835213913238e-06L data8 0x9EB432503FB0B7BC, 0x00003FEC //A15 = +2.36487228755136968792e-06L -// Pol4 +// Pol4 data8 0xE0BA539E4AFC4741, 0x00003FED //A0 = +6.69741148991838024429e-06L data8 0x8583BF71139452CF, 0x0000BFFA //A1 = -3.25963476363756051657e-02L data8 0x8384FEF6D08AD6CE, 0x0000BFF9 //A2 = -1.60546283500634200479e-02L @@ -850,7 +850,7 @@ data8 0xE2DCC5750FD769BA, 0x0000BFEE //A12 = -1.35220520471857266339e-05L data8 0x9459160B1E6F1F8D, 0x00003FED //A13 = +4.42111470121432700283e-06L data8 0xBE0A05701BD0DD42, 0x0000BFEB //A14 = -1.41590196994052764542e-06L data8 0xE905D729105081BF, 0x00003FE9 //A15 = +4.34038814785401120999e-07L -// Pol5 +// Pol5 data8 0xA33649C3AB459832, 0x00003FEE //A0 = +9.72819704141525206634e-06L data8 0x9E4EA2F44C9A24BD, 0x0000BFFA //A1 = -3.86492123987296806210e-02L data8 0xE80C0B1280F357BF, 0x0000BFF2 //A2 = -2.21297306012713370124e-04L @@ -867,7 +867,7 @@ data8 0xA878D338E6E6A079, 0x0000BFEC //A12 = -2.51042802626063073967e-06L data8 0xCD2C2F079D2FCB36, 0x00003FEA //A13 = +7.64327468786076941271e-07L data8 0xF5EF4A4B2EA426F2, 0x0000BFE8 //A14 = -2.29044563492386125272e-07L data8 0x8CE52181393820FC, 0x00003FE7 //A15 = +6.56093668622712763489e-08L -// Pol6 +// Pol6 data8 0xB2015D7F1864B7CF, 0x00003FEC //A0 = +2.65248615880090351276e-06L data8 0x954EA7A861B4462A, 0x0000BFFA //A1 = -3.64519642954351295215e-02L data8 0x9E46F2A4D9157E69, 0x00003FF7 //A2 = +4.83023498390681965101e-03L @@ -884,7 +884,7 @@ data8 0xD34EA4D283EC33FA, 0x0000BFE9 //A12 = -3.93590335713880681528e-07L data8 0xED209EBD68E1145F, 0x00003FE7 //A13 = +1.10421060667544991323e-07L data8 0x83A126E22A17568D, 0x0000BFE6 //A14 = -3.06473811074239684132e-08L data8 0x8B778496EDE9F415, 0x00003FE4 //A15 = +8.11804009754249175736e-09L -// Pol7 +// Pol7 data8 0x8E152F522501B7B9, 0x00003FEE //A0 = +8.46879203970927626532e-06L data8 0xFD22F92EE21F491E, 0x0000BFF9 //A1 = -3.09004656656418947425e-02L data8 0xAF0C41847D89EC14, 0x00003FF7 //A2 = +5.34203719233189217519e-03L @@ -901,7 +901,7 @@ data8 0xE03A81F2C976D11A, 0x0000BFE6 //A12 = -5.22072765405802337371e-08L data8 0xE56A19A67DD66100, 0x00003FE4 //A13 = +1.33536787408751203998e-08L data8 0xE964D255CB31DFFA, 0x0000BFE2 //A14 = -3.39632729387679010008e-09L data8 0xE22E62E932B704D4, 0x00003FE0 //A15 = +8.22842400379225526299e-10L -// Pol8 +// Pol8 data8 0xB8B835882D46A6C8, 0x00003FEF //A0 = +2.20202883282415435401e-05L data8 0xC9D1F63F89B74E90, 0x0000BFF9 //A1 = -2.46362504515706189782e-02L data8 0x8E376748B1274F30, 0x00003FF7 //A2 = +4.34010070001387441657e-03L @@ -918,7 +918,7 @@ data8 0xCA87133235F1F495, 0x0000BFE3 //A12 = -5.89433000014933371980e-09L data8 0xBB15B0021581C8B6, 0x00003FE1 //A13 = +1.36122047057936849125e-09L data8 0xAC9D6585D4AF505E, 0x0000BFDF //A14 = -3.13984547328132268695e-10L data8 0x975A1439C3795183, 0x00003FDD //A15 = +6.88268624429648826457e-11L -// Pol9 +// Pol9 data8 0x99A7676284CDC9FE, 0x00003FEF //A0 = +1.83169747921764176475e-05L data8 0x9AD0AE249A02896C, 0x0000BFF9 //A1 = -1.88983346204739151909e-02L data8 0xCB89B4AEC19898BE, 0x00003FF6 //A2 = +3.10574208447745576452e-03L @@ -935,7 +935,7 @@ data8 0x9CC6C178AD3F96AD, 0x0000BFE0 //A12 = -5.70349182959704086428e-10L data8 0x81D0E2AA27DEB74A, 0x00003FDE //A13 = +1.18066926578104076645e-10L data8 0xD75FB9049190BEFD, 0x0000BFDB //A14 = -2.44851795398843967972e-11L data8 0xA9384A51D48C8703, 0x00003FD9 //A15 = +4.80951837368635202609e-12L -// Pol10 +// Pol10 data8 0xD2B3482EE449C535, 0x00003FEE //A0 = +1.25587177382575655080e-05L data8 0xE7939B2D0607DFCF, 0x0000BFF8 //A1 = -1.41343131436717436429e-02L data8 0x8810EB4AC5F0F1CE, 0x00003FF6 //A2 = +2.07620377002350121270e-03L @@ -952,7 +952,7 @@ data8 0xD02658BF31411F4C, 0x0000BFDC //A12 = -4.73277831746128372261e-11L data8 0x9A4A95EE59127779, 0x00003FDA //A13 = +8.77044784978207256260e-12L data8 0xE518330AF013C2F6, 0x0000BFD7 //A14 = -1.62781453276882333209e-12L data8 0xA036A9DF71BD108A, 0x00003FD5 //A15 = +2.84596398987114375607e-13L -// Pol11 +// Pol11 data8 0x9191CFBF001F3BB3, 0x00003FEE //A0 = +8.67662287973472452343e-06L data8 0xAA47E0CF01AE9730, 0x0000BFF8 //A1 = -1.03931136509584404513e-02L data8 0xAEABE7F17B01D18F, 0x00003FF5 //A2 = +1.33263784731775399430e-03L @@ -969,7 +969,7 @@ data8 0xE7977BC1342D19BF, 0x0000BFD8 //A12 = -3.29111645807102123274e-12L data8 0x9BC3A7D6396C6756, 0x00003FD6 //A13 = +5.53385887288503961220e-13L data8 0xD0110D5683740B8C, 0x0000BFD3 //A14 = -9.24001363293241428519e-14L data8 0x81786D7856A5CC92, 0x00003FD1 //A15 = +1.43741041714595023996e-14L -// Pol12 +// Pol12 data8 0xB85654F6033B3372, 0x00003FEF //A0 = +2.19747106911869287049e-05L data8 0xF78B40078736B406, 0x0000BFF7 //A1 = -7.55444170413862312647e-03L data8 0xDA8FDE84D88E5D5D, 0x00003FF4 //A2 = +8.33747822263358628569e-04L @@ -986,7 +986,7 @@ data8 0xC0F093DEC2B019A1, 0x0000BFD4 //A12 = -1.71364927865227509533e-13L data8 0xFC1441C4CD105981, 0x00003FD1 //A13 = +2.79864052545369490865e-14L data8 0x9CC959853267F026, 0x0000BFCF //A14 = -4.35170017302700609509e-15L data8 0xB06BA14016154F1E, 0x00003FCC //A15 = +6.12081320471295704631e-16L -// Pol13 +// Pol13 data8 0xA59E74BF544F2422, 0x00003FEF //A0 = +1.97433196215210145261e-05L data8 0xB2814F4EDAE15330, 0x0000BFF7 //A1 = -5.44754383528015875700e-03L data8 0x867C249D378F0A23, 0x00003FF4 //A2 = +5.13019308804593120161e-04L @@ -1003,7 +1003,7 @@ data8 0xA90EC851E91C3319, 0x0000BFCE //A12 = -2.34614750044359490986e-15L data8 0xEC9CAF64237B5060, 0x00003FCC //A13 = +8.20912960028437475035e-16L data8 0xA9156668FCF01479, 0x0000BFCA //A14 = -1.46656639874123613261e-16L data8 0xBAEF58D8118DD5D4, 0x00003FC7 //A15 = +2.02675278255254907493e-17L -// Pol14 +// Pol14 data8 0xC698952E9CEAA800, 0x00003FEF //A0 = +2.36744912073515619263e-05L data8 0x800395F8C7B4FA00, 0x0000BFF7 //A1 = -3.90667746392883642897e-03L data8 0xA3B2467B6B391831, 0x00003FF3 //A2 = +3.12226081793919541155e-04L @@ -1020,7 +1020,7 @@ data8 0x95352E5597EACC23, 0x00003FCD //A12 = +1.03533666540077850452e-15L data8 0xCCEBE3043B689428, 0x0000BFC8 //A13 = -4.44352525147076912166e-17L data8 0xA779DAB4BE1F80BB, 0x0000BFBC //A14 = -8.86610526981738255206e-21L data8 0xB171271F3517282C, 0x00003FC1 //A15 = +3.00598445879282370850e-19L -// Pol15 +// Pol15 data8 0xB7AC727D1C3FEB05, 0x00003FEE //A0 = +1.09478009914822049780e-05L data8 0xB6E6274485C10B0A, 0x0000BFF6 //A1 = -2.79081782038927199588e-03L data8 0xC5CAE2122D009506, 0x00003FF2 //A2 = +1.88629638738336219173e-04L @@ -1037,7 +1037,7 @@ data8 0xEF402CCB4D29FAF8, 0x00003FCA //A12 = +2.07516888659313950588e-16L data8 0xD6B789E01141231B, 0x0000BFC6 //A13 = -1.16398290506765191078e-17L data8 0xB5EEE343E9CFE3EC, 0x00003FC2 //A14 = +6.16413506924643419723e-19L data8 0x859B41A39D600346, 0x0000BFBE //A15 = -2.82922705825870414438e-20L -// Pol16 +// Pol16 data8 0x85708B69FD184E11, 0x00003FED //A0 = +3.97681079176353356199e-06L data8 0x824D92BC60A1F70A, 0x0000BFF6 //A1 = -1.98826630037499070532e-03L data8 0xEDCF7D3576BB5258, 0x00003FF1 //A2 = +1.13396885054265675352e-04L @@ -1054,7 +1054,7 @@ data8 0x863A04008E12867C, 0x00003FC8 //A12 = +2.91057593756148904838e-17L data8 0xDF62F9F44F5C7170, 0x0000BFC3 //A13 = -1.51372666097522872780e-18L data8 0xBA4E118E88CFDD31, 0x00003FBF //A14 = +7.89032177282079635722e-20L data8 0x942AD897FC4D2F2A, 0x0000BFBB //A15 = -3.92195756076319409245e-21L -// Pol17 +// Pol17 data8 0xCB8514540566C717, 0x00003FEF //A0 = +2.42614557068144130848e-05L data8 0xB94F08D6816E0CD4, 0x0000BFF5 //A1 = -1.41379340061829929314e-03L data8 0x8E7C342C2DABB51B, 0x00003FF1 //A2 = +6.79422240687700109911e-05L @@ -1071,7 +1071,7 @@ data8 0x8435328C80940126, 0x00003FC5 //A12 = +3.58349966898667910204e-18L data8 0xC0D22F655BA5EF39, 0x0000BFC0 //A13 = -1.63325770165403860181e-19L data8 0x8F14B9EBD5A9AB25, 0x00003FBC //A14 = +7.57464305512080733773e-21L data8 0xCD4804BBF6DC1B6F, 0x0000BFB7 //A15 = -3.39609459750208886298e-22L -// Pol18 +// Pol18 data8 0xE251DFE45AB0C22E, 0x00003FEE //A0 = +1.34897126299700418200e-05L data8 0x83943CC7D59D4215, 0x0000BFF5 //A1 = -1.00386850310061655307e-03L data8 0xAA57896951134BCA, 0x00003FF0 //A2 = +4.06126834109940757047e-05L @@ -1088,7 +1088,7 @@ data8 0xF41FBBA6B343960F, 0x00003FC1 //A12 = +4.13562069721140021224e-19L data8 0x98F194AEE31D188D, 0x0000BFBD //A13 = -1.61935414722333263347e-20L data8 0xC42F5029BB622157, 0x00003FB8 //A14 = +6.49121108201931196678e-22L data8 0xF43BD08079E50E0F, 0x0000BFB3 //A15 = -2.52531675510242468317e-23L -// Pol19 +// Pol19 data8 0x82557B149A04D08E, 0x00003FEF //A0 = +1.55370127331027842820e-05L data8 0xBAAB433307CE614B, 0x0000BFF4 //A1 = -7.12085701486669872724e-04L data8 0xCB52D9DBAC16FE82, 0x00003FEF //A2 = +2.42380662859334411743e-05L @@ -1105,7 +1105,7 @@ data8 0xD959E428A62B1B6C, 0x00003FBE //A12 = +4.60258936838597812582e-20L data8 0xE7D49EC23F1A16A0, 0x0000BFB9 //A13 = -1.53412587409583783059e-21L data8 0xFDE429BC9947B2BE, 0x00003FB4 //A14 = +5.25034823750902928092e-23L data8 0x872137A062C042EF, 0x0000BFB0 //A15 = -1.74651114923000080365e-24L -// Pol20 +// Pol20 data8 0x8B9B185C6A2659AC, 0x00003FEF //A0 = +1.66423130594825442963e-05L data8 0x84503AD52588A1E8, 0x0000BFF4 //A1 = -5.04735556466270303549e-04L data8 0xF26C7C2B566388E1, 0x00003FEE //A2 = +1.44495826764677427386e-05L @@ -1122,7 +1122,7 @@ data8 0xBD5A7FAA548CC749, 0x00003FBB //A12 = +5.01214569023722089225e-21L data8 0xAB15D69425373A67, 0x0000BFB6 //A13 = -1.41518447770061562822e-22L data8 0x9EF95456F75B4DF4, 0x00003FB1 //A14 = +4.10938011540250142351e-24L data8 0x8FADCC45E81433E7, 0x0000BFAC //A15 = -1.16062889679749879834e-25L -// Pol21 +// Pol21 data8 0xB47A917B0F7B50AE, 0x00003FEF //A0 = +2.15147474240529518138e-05L data8 0xBB77DC3BA0C937B3, 0x0000BFF3 //A1 = -3.57567223048598672970e-04L data8 0x90694DFF4EBF7370, 0x00003FEE //A2 = +8.60758700336677694536e-06L @@ -1139,7 +1139,7 @@ data8 0xA2C1C5E19CC79E6F, 0x00003FB8 //A12 = +5.38517493921589837361e-22L data8 0xF86F9772306F56C1, 0x0000BFB2 //A13 = -1.28438352359240135735e-23L data8 0xC32F6FEEDE86528E, 0x00003FAD //A14 = +3.15338862172962186458e-25L data8 0x9534ED189744D7D4, 0x0000BFA8 //A15 = -7.53301543611470014315e-27L -// Pol22 +// Pol22 data8 0xCBA0A2DB94A2C494, 0x00003FEF //A0 = +2.42742878212752702946e-05L data8 0x84C089154A49E0E8, 0x0000BFF3 //A1 = -2.53204520651046300034e-04L data8 0xABF5665BD0D8B0CD, 0x00003FED //A2 = +5.12476542947092361490e-06L @@ -1156,7 +1156,7 @@ data8 0x8AB627E09CF45997, 0x00003FB5 //A12 = +5.73697507862703019314e-23L data8 0xB28C15C117CC604F, 0x0000BFAF //A13 = -1.15383428132352407085e-24L data8 0xECB8428626DA072C, 0x00003FA9 //A14 = +2.39025879246942839796e-26L data8 0x98B731BCFA2CE2B2, 0x0000BFA4 //A15 = -4.81885474332093262902e-28L -// Pol23 +// Pol23 data8 0xC6D013811314D31B, 0x00003FED //A0 = +5.92508308918577687876e-06L data8 0xBBF3057B8DBACBCF, 0x0000BFF2 //A1 = -1.79242422493281965934e-04L data8 0xCCADECA501162313, 0x00003FEC //A2 = +3.04996061562356504918e-06L @@ -1173,7 +1173,7 @@ data8 0xEB27A61B1D5C7697, 0x00003FB1 //A12 = +6.07861113430709162243e-24L data8 0xFEF9ED74D4F4C9B0, 0x0000BFAB //A13 = -1.02984099170876754831e-25L data8 0x8E6F410068C12043, 0x00003FA6 //A14 = +1.79777721804459361762e-27L data8 0x9AE2F6705481630E, 0x0000BFA0 //A15 = -3.05459905177379058768e-29L -// Pol24 +// Pol24 data8 0xD2D858D5B01C9434, 0x00003FEE //A0 = +1.25673476165670766128e-05L data8 0x8505330F8B4FDE49, 0x0000BFF2 //A1 = -1.26858053564784963985e-04L data8 0xF39171C8B1D418C2, 0x00003FEB //A2 = +1.81472407620770441249e-06L @@ -1190,7 +1190,7 @@ data8 0xC6A4DCACC554911E, 0x00003FAE //A12 = +6.41853356148678957077e-25L data8 0xB550CEA09DA96F44, 0x0000BFA8 //A13 = -9.15410112414783078242e-27L data8 0xAA9149317996F32F, 0x00003FA2 //A14 = +1.34554050666508391264e-28L data8 0x9C3008EFE3F52F19, 0x0000BF9C //A15 = -1.92516125328592532359e-30L -// Pol25 +// Pol25 data8 0xA68E78218806283F, 0x00003FEF //A0 = +1.98550844852103406280e-05L data8 0xBC41423996DC8A37, 0x0000BFF1 //A1 = -8.97669395268764751516e-05L data8 0x90E55AE31A2F8271, 0x00003FEB //A2 = +1.07955871580069359702e-06L @@ -1207,7 +1207,7 @@ data8 0xA76F391095A9563A, 0x00003FAB //A12 = +6.76262416498584003290e-26L data8 0x8098FA125C18D8DB, 0x0000BFA5 //A13 = -8.11564737276592661642e-28L data8 0xCB9E4D5C08923227, 0x00003F9E //A14 = +1.00391606269366059664e-29L data8 0x9CEC3BF7A0BE2CAF, 0x0000BF98 //A15 = -1.20888920108938909316e-31L -// Pol26 +// Pol26 data8 0xC17AB25E269272F7, 0x00003FEE //A0 = +1.15322640047234590651e-05L data8 0x85310509E633FEF2, 0x0000BFF1 //A1 = -6.35106483144690768696e-05L data8 0xAC5E4C4DCB2D940C, 0x00003FEA //A2 = +6.42122148740412561597e-07L @@ -1224,7 +1224,7 @@ data8 0x8CEEACB790B5F374, 0x00003FA8 //A12 = +7.11526399101774993883e-27L data8 0xB61C8A29D98F24C0, 0x0000BFA1 //A13 = -7.18303147470398859453e-29L data8 0xF296F69FE45BDA7D, 0x00003F9A //A14 = +7.47537230021540031251e-31L data8 0x9D4B25BF6FB7234B, 0x0000BF94 //A15 = -7.57340869663212138051e-33L -// Pol27 +// Pol27 data8 0xC7772CC326D6FBB8, 0x00003FEE //A0 = +1.18890718679826004395e-05L data8 0xE0F9D5410565D55D, 0x0000BFF0 //A1 = -5.36384368533203585378e-05L data8 0x85C0BE825680E148, 0x00003FEA //A2 = +4.98268406609692971520e-07L @@ -1246,7 +1246,7 @@ LOCAL_OBJECT_END(erfc_Q_table) .section .text GLOBAL_LIBM_ENTRY(erfcl) - + { .mfi alloc r32 = ar.pfs, 0, 36, 4, 0 fma.s1 FR_Tmp = f1, f1, f8 // |x|+1, if x >= 0 @@ -1278,7 +1278,7 @@ GLOBAL_LIBM_ENTRY(erfcl) { .mfi nop.m 0 fnma.s1 FR_norm_x = f8, f8, f0 //high bits for -x^2 - nop.i 0 + nop.i 0 } ;; @@ -1286,7 +1286,7 @@ GLOBAL_LIBM_ENTRY(erfcl) { .mfi setf.sig FR_INV_LN2_2TO63 = GR_sig_inv_ln2 // form 1/ln2 * 2^63 (p6) fma.s1 FR_AbsArg = f1, f0, f8 // |x|, if x >= 0 - nop.i 0 + nop.i 0 } { .mfi setf.d FR_RSHF_2TO51 = GR_rshf_2to51 //const 1.10 * 2^(63+51) @@ -1300,9 +1300,9 @@ GLOBAL_LIBM_ENTRY(erfcl) fclass.m p10,p0 = f8, 0x21 // p10: x = +inf mov GR_exp_bias = 0x0FFFF // Set exponent bias } -{ .mlx +{ .mlx setf.d FR_RSHF = GR_rshf // Right shift const 1.1000 * 2^63 - movl GR_ERFC_XC_TB = 0x650 + movl GR_ERFC_XC_TB = 0x650 } ;; @@ -1315,11 +1315,11 @@ GLOBAL_LIBM_ENTRY(erfcl) { .mfi ldfpd FR_POS_ARG_ASYMP,FR_NEG_ARG_ASYMP = [GR_ad_Arg], 16 (p7) fma.s1 FR_Tmp = FR_Tmp1, FR_Tmp1, f0 // (|x|+1)^2, x<0 - mov GR_0x1 = 0x1 + mov GR_0x1 = 0x1 } ;; -//p8: y = 1.0, x = 0.0,quick exit +//p8: y = 1.0, x = 0.0,quick exit { .mfi ldfpd FR_dx,FR_dx1 = [GR_ad_Arg], 16 fclass.m p9,p0 = f8, 0x22 // p9: x = -inf @@ -1327,16 +1327,16 @@ GLOBAL_LIBM_ENTRY(erfcl) } { .mfb - nop.m 0 -(p8) fma.s0 f8 = f1, f1, f0 -(p8) br.ret.spnt b0 + nop.m 0 +(p8) fma.s0 f8 = f1, f1, f0 +(p8) br.ret.spnt b0 } ;; { .mfi - ldfe FR_UnfBound = [GR_ad_Arg], 16 + ldfe FR_UnfBound = [GR_ad_Arg], 16 fclass.m p11,p0 = f8, 0xc3 // p11: x = nan - mov GR_BIAS = 0x0FFFF + mov GR_BIAS = 0x0FFFF } { .mfi nop.m 0 @@ -1359,12 +1359,12 @@ GLOBAL_LIBM_ENTRY(erfcl) { .mfi add GR_ad_C = 0x20, GR_ad_Arg // Point to C table - nop.f 0 + nop.f 0 add GR_ad_T1 = 0x50, GR_ad_Arg // Point to T1 table } { .mfi add GR_ad_T2 = 0x150, GR_ad_Arg // Point to T2 table - nop.f 0 + nop.f 0 add GR_ERFC_XC_TB = GR_ERFC_XC_TB, GR_ad_Arg //poin.to XB_TBL } ;; @@ -1383,14 +1383,14 @@ GLOBAL_LIBM_ENTRY(erfcl) // p9: y = 2.0, x = -inf, quick exit { .mfi - sub GR_mBIAS = r0, GR_BIAS + sub GR_mBIAS = r0, GR_BIAS fma.s1 FR_2 = f1, f1, f1 - nop.i 0 + nop.i 0 } { .mfb ldfe FR_L_lo = [GR_ad_Arg],16 // Get L_lo -(p9) fma.s0 f8 = f1, f1, f1 -(p9) br.ret.spnt b0 +(p9) fma.s0 f8 = f1, f1, f1 +(p9) br.ret.spnt b0 } ;; @@ -1400,10 +1400,10 @@ GLOBAL_LIBM_ENTRY(erfcl) fma.s1 FR_N_signif = FR_norm_x, FR_INV_LN2_2TO63, FR_RSHF_2TO51 and GR_exp_x = GR_signexp_x, GR_exp_mask } -{ .mfb +{ .mfb adds GR_ERFC_S_TB = 0x1C0, GR_ERFC_XC_TB // pointer to S_TBL -(p10) fma.s0 f8 = f0, f1, f0 -(p10) br.ret.spnt b0 +(p10) fma.s0 f8 = f0, f1, f0 +(p10) br.ret.spnt b0 } ;; @@ -1411,13 +1411,13 @@ GLOBAL_LIBM_ENTRY(erfcl) // p11: y = x, x = nan, quick exit { .mfi ldfe FR_C3 = [GR_ad_C],16 // Get C3 for normal path - fcmp.lt.s1 p12,p0 = FR_AbsArg, FR_ch_dx + fcmp.lt.s1 p12,p0 = FR_AbsArg, FR_ch_dx shl GR_ShftPi_bias = GR_BIAS, 8 // BIAS * 256 } { .mfb sub GR_exp_x = GR_exp_x, GR_exp_bias // Get exponent (p11) fma.s0 f8 = f8, f1, f0 -(p11) br.ret.spnt b0 +(p11) br.ret.spnt b0 } ;; @@ -1433,7 +1433,7 @@ GLOBAL_LIBM_ENTRY(erfcl) { .mfi ldfe FR_C1 = [GR_ad_C],16 // Get C1 for main path (p6) fcmp.gt.unc.s1 p15,p0 = FR_AbsArg, FR_POS_ARG_ASYMP // p6: x >= 0 - nop.i 0 + nop.i 0 } { .mfb nop.m 0 @@ -1448,7 +1448,7 @@ GLOBAL_LIBM_ENTRY(erfcl) (p7) fcmp.gt.unc.s1 p14,p0 = FR_AbsArg,FR_NEG_ARG_ASYMP // p7: x < 0 shladd GR_ShftXBi_bias = GR_mBIAS, 4, r0 } -;; +;; { .mfi nop.m 0 @@ -1457,7 +1457,7 @@ GLOBAL_LIBM_ENTRY(erfcl) } { .mfi nop.m 0 - fms.s1 FR_float_N = FR_N_signif, FR_2TOM51, FR_RSHF + fms.s1 FR_float_N = FR_N_signif, FR_2TOM51, FR_RSHF nop.i 0 } ;; @@ -1466,23 +1466,23 @@ GLOBAL_LIBM_ENTRY(erfcl) // p14: y ~=~ 2, x < -6.5,quick exit { .mfi getf.exp GR_IndxPlusBias = FR_Tmp // exp + bias for (|x|+1)^4 - fcmp.lt.s1 p8,p0 = FR_NormX,FR_UnfBound + fcmp.lt.s1 p8,p0 = FR_NormX,FR_UnfBound nop.i 0 } { .mfb nop.m 0 (p14) fnma.s0 FR_RESULT = FR_EpsNorm,FR_EpsNorm,FR_2 -(p14) br.ret.spnt b0 +(p14) br.ret.spnt b0 } ;; // p15: y ~=~ 0.0 (result with underflow error), x > POS_ARG_ASYMP = 107.0, -// call __libm_error_region +// call __libm_error_region { .mfb (p15) mov GR_Parameter_TAG = 207 -(p15) fma.s0 FR_RESULT = FR_EpsNorm,FR_EpsNorm,f0 -(p15) br.cond.spnt __libm_error_region +(p15) fma.s0 FR_RESULT = FR_EpsNorm,FR_EpsNorm,f0 +(p15) br.cond.spnt __libm_error_region } ;; @@ -1490,7 +1490,7 @@ GLOBAL_LIBM_ENTRY(erfcl) getf.sig GR_N_fix = FR_N_signif // Get N from significand nop.f 0 shl GR_ShftPi = GR_IndxPlusBias, 8 - + } { .mfi shladd GR_ShftXBi = GR_IndxPlusBias, 4, GR_ShftXBi_bias @@ -1511,7 +1511,7 @@ GLOBAL_LIBM_ENTRY(erfcl) fma.s1 FR_Xpdx_hi = FR_AbsArg, f1, FR_dx // x + dx add GR_ShftA14 = 0xE0, GR_ShftPi // pointer shift for A14 - + } { .mfi ldfe FR_S = [GR_ERFC_S_TB] @@ -1533,14 +1533,14 @@ GLOBAL_LIBM_ENTRY(erfcl) } ;; -{ .mfi +{ .mfi ldfe FR_A14 = [GR_P_POINT_1], -32 - nop.f 0 + nop.f 0 extr.u GR_M2 = GR_N_fix, 0, 6 // Extract index M_2 } -{ .mfi +{ .mfi ldfe FR_A15 = [GR_P_POINT_2], -32 - nop.f 0 + nop.f 0 shladd GR_ad_W1 = GR_M1,3,GR_ad_W1 // Point to W1 } ;; @@ -1555,7 +1555,7 @@ GLOBAL_LIBM_ENTRY(erfcl) nop.f 0 shladd GR_ad_T1 = GR_M1,2,GR_ad_T1 // Point to T1 } -;; +;; { .mfi ldfe FR_A8 = [GR_P_POINT_1], 32 @@ -1568,38 +1568,38 @@ GLOBAL_LIBM_ENTRY(erfcl) shladd GR_ad_W2 = GR_M2,3,GR_ad_W2 // Point to W2 } ;; - + { .mfi - ldfe FR_A10 = [GR_P_POINT_1], -96 + ldfe FR_A10 = [GR_P_POINT_1], -96 nop.f 0 shladd GR_ad_T2 = GR_M2,2,GR_ad_T2 // Point to T2 } { .mfi - ldfe FR_A11 = [GR_P_POINT_2], -96 + ldfe FR_A11 = [GR_P_POINT_2], -96 fnma.s1 FR_r = FR_L_lo, FR_float_N, FR_r //r = -L_lo*float_N + r nop.i 0 } -;; +;; -{ .mfi +{ .mfi ldfe FR_A4 = [GR_P_POINT_1], 32 (p10) fms.s1 FR_Tmp = FR_dx,f1, FR_Xpdx_hi //for lo of x+dx, x<=dx nop.i 0 } -{ .mfi +{ .mfi ldfe FR_A5 = [GR_P_POINT_2], 32 (p9) fms.s1 FR_Tmp = FR_AbsArg, f1, FR_Xpdx_hi //for lo of x+dx, x>dx nop.i 0 } ;; -{ .mfi - ldfe FR_A6 = [GR_P_POINT_1], -64 +{ .mfi + ldfe FR_A6 = [GR_P_POINT_1], -64 frcpa.s1 FR_U,p11 = f1, FR_Xpdx_hi // hi of 1 /(x + dx) nop.i 0 } -{ .mfi - ldfe FR_A7 = [GR_P_POINT_2], -64 +{ .mfi + ldfe FR_A7 = [GR_P_POINT_2], -64 nop.f 0 nop.i 0 } @@ -1607,17 +1607,17 @@ GLOBAL_LIBM_ENTRY(erfcl) { .mfi ldfe FR_A2 = [GR_P_POINT_1], -32 - nop.f 0 - nop.i 0 + nop.f 0 + nop.i 0 } { .mfi ldfe FR_A3 = [GR_P_POINT_2], -32 - nop.f 0 - nop.i 0 + nop.f 0 + nop.i 0 } ;; -{ .mfi +{ .mfi ldfe FR_A0 = [GR_P_POINT_1], 224 nop.f 0 nop.i 0 @@ -1631,37 +1631,37 @@ GLOBAL_LIBM_ENTRY(erfcl) { .mfi ldfd FR_W1 = [GR_ad_W1],0 // Get W1 - nop.f 0 - nop.i 0 + nop.f 0 + nop.i 0 } { .mfi ldfd FR_W2 = [GR_ad_W2],0 // Get W2 fma.s1 FR_poly = FR_r, FR_C3, FR_C2 // poly = r * A3 + A2 - nop.i 0 + nop.i 0 } ;; { .mfi ldfs FR_T1 = [GR_ad_T1],0 // Get T1 (p10) fma.s1 FR_Xpdx_lo = FR_AbsArg,f1, FR_Tmp//lo of x + dx , x <= dx - nop.i 0 + nop.i 0 } { .mfi ldfs FR_T2 = [GR_ad_T2],0 // Get T2 (p9) fma.s1 FR_Xpdx_lo = FR_dx,f1, FR_Tmp // lo of x + dx, x > dx - nop.i 0 + nop.i 0 } ;; { .mfi nop.m 0 fnma.s1 FR_Tmp1 = FR_Xpdx_hi, FR_U, FR_2 // N-R, iter. N1 - nop.i 0 + nop.i 0 } { .mfi nop.m 0 fmpy.s1 FR_rsq = FR_r, FR_r // rsq = r * r - nop.i 0 + nop.i 0 } ;; @@ -1671,32 +1671,32 @@ GLOBAL_LIBM_ENTRY(erfcl) nop.i 0 } { .mfi - nop.m 0 - fma.s1 FR_P15_0_1 = FR_A15, FR_LocArg, FR_A14 - nop.i 0 + nop.m 0 + fma.s1 FR_P15_0_1 = FR_A15, FR_LocArg, FR_A14 + nop.i 0 } ;; { .mfi nop.m 0 - fma.s1 FR_P15_1_2 = FR_A13, FR_LocArg, FR_A12 - nop.i 0 + fma.s1 FR_P15_1_2 = FR_A13, FR_LocArg, FR_A12 + nop.i 0 } { .mfi nop.m 0 fma.s1 FR_poly = FR_r, FR_poly, FR_C1 // poly = r * poly + A1 - nop.i 0 + nop.i 0 } ;; { .mfi nop.m 0 - fma.s1 FR_P15_2_1 = FR_A9, FR_LocArg, FR_A8 - nop.i 0 + fma.s1 FR_P15_2_1 = FR_A9, FR_LocArg, FR_A8 + nop.i 0 } { .mfi nop.m 0 - fma.s1 FR_P15_2_2 = FR_A11, FR_LocArg, FR_A10 + fma.s1 FR_P15_2_2 = FR_A11, FR_LocArg, FR_A10 nop.i 0 } ;; @@ -1711,7 +1711,7 @@ GLOBAL_LIBM_ENTRY(erfcl) { .mfi nop.m 0 fma.s1 FR_P15_3_1 = FR_A5, FR_LocArg, FR_A4 - nop.i 0 + nop.i 0 } { .mfi nop.m 0 @@ -1730,8 +1730,8 @@ GLOBAL_LIBM_ENTRY(erfcl) fma.s1 FR_W = FR_W1, FR_W2, FR_W2 // W = W1 * W2 + W2 nop.i 0 } -;; - +;; + { .mfi nop.m 0 fmpy.s1 FR_T = FR_T1, FR_T2 // T = T1 * T2 @@ -1791,7 +1791,7 @@ GLOBAL_LIBM_ENTRY(erfcl) { .mfi nop.m 0 fma.s1 FR_T_scale = FR_T, FR_scale, f0 // T_scale = T * scale - nop.i 0 + nop.i 0 } ;; @@ -1805,7 +1805,7 @@ GLOBAL_LIBM_ENTRY(erfcl) { .mfi nop.m 0 fma.s1 FR_U = FR_U, FR_Tmp, f0 // N-R, iter. N2 - nop.i 0 + nop.i 0 } ;; @@ -1823,15 +1823,15 @@ GLOBAL_LIBM_ENTRY(erfcl) { .mfi nop.m 0 - fma.s1 FR_M = FR_T_scale, FR_S, f0 - nop.i 0 + fma.s1 FR_M = FR_T_scale, FR_S, f0 + nop.i 0 } ;; { .mfi nop.m 0 fnma.s1 FR_Tmp = FR_Xpdx_hi, FR_U, FR_2 // N-R, iter. N3 - nop.i 0 + nop.i 0 } ;; @@ -1845,20 +1845,20 @@ GLOBAL_LIBM_ENTRY(erfcl) { .mfi nop.m 0 fms.s1 FR_H = FR_W, f1, FR_xsq_lo // H = W - xsq_lo - nop.i 0 + nop.i 0 } ;; { .mfi nop.m 0 fma.s1 FR_U = FR_U, FR_Tmp, f0 // N-R, iter. N3 - nop.i 0 + nop.i 0 } ;; { .mfi nop.m 0 - fma.s1 FR_Q = FR_A1, FR_LocArg, FR_Q + fma.s1 FR_Q = FR_A1, FR_LocArg, FR_Q nop.i 0 } ;; @@ -1866,12 +1866,12 @@ GLOBAL_LIBM_ENTRY(erfcl) { .mfi nop.m 0 fnma.s1 FR_Tmp = FR_Xpdx_hi, FR_U, f1 // for du - nop.i 0 + nop.i 0 } { .mfi nop.m 0 - fma.s1 FR_R = FR_H, FR_poly, FR_poly - nop.i 0 + fma.s1 FR_R = FR_H, FR_poly, FR_poly + nop.i 0 } ;; @@ -1879,28 +1879,28 @@ GLOBAL_LIBM_ENTRY(erfcl) nop.m 0 fma.s1 FR_res_pos_x_hi = FR_M, FR_U, f0 // M *U nop.i 0 - + } -;; +;; { .mfi nop.m 0 fma.s1 FR_R = FR_R, f1, FR_H // R = H + P(r) + H*P(r) - nop.i 0 + nop.i 0 } ;; { .mfi nop.m 0 fma.s0 FR_Tmpf = f8, f1, f0 // flag d - nop.i 0 + nop.i 0 } ;; { .mfi nop.m 0 - fnma.s1 FR_dU = FR_Xpdx_lo, FR_U, FR_Tmp - nop.i 0 + fnma.s1 FR_dU = FR_Xpdx_lo, FR_U, FR_Tmp + nop.i 0 } ;; @@ -1908,23 +1908,23 @@ GLOBAL_LIBM_ENTRY(erfcl) // for -6.5 <= x < 0 { .mfi nop.m 0 - fms.s1 FR_res_pos_x_lo = FR_M, FR_U, FR_res_pos_x_hi - nop.i 0 - + fms.s1 FR_res_pos_x_lo = FR_M, FR_U, FR_res_pos_x_hi + nop.i 0 + } { .mfi nop.m 0 (p7) fnma.s1 FR_Tmp1 = FR_res_pos_x_hi, f1, FR_2 //p7: x < 0 - nop.i 0 - + nop.i 0 + } ;; { .mfi nop.m 0 - fma.s1 FR_G = FR_R, FR_Q, FR_Q + fma.s1 FR_G = FR_R, FR_Q, FR_Q nop.i 0 - + } ;; @@ -1932,31 +1932,31 @@ GLOBAL_LIBM_ENTRY(erfcl) nop.m 0 fma.s1 FR_Tmp = FR_R, f1, FR_dU // R + du nop.i 0 - + } ;; { .mfi nop.m 0 (p7) fnma.s1 FR_Tmp2 = FR_Tmp1, f1, FR_2 //p7: x < 0 - nop.i 0 - + nop.i 0 + } ;; { .mfi nop.m 0 - fma.s1 FR_G = FR_G, f1, FR_Tmp + fma.s1 FR_G = FR_G, f1, FR_Tmp nop.i 0 - + } ;; { .mfi nop.m 0 (p7) fnma.s1 FR_Tmp2 = FR_res_pos_x_hi, f1, FR_Tmp2 //p7: x < 0 - nop.i 0 - + nop.i 0 + } ;; @@ -1964,42 +1964,42 @@ GLOBAL_LIBM_ENTRY(erfcl) nop.m 0 fma.s1 FR_V = FR_G, FR_res_pos_x_hi, f0 // V = G * M *U nop.i 0 - + } ;; { .mfi nop.m 0 (p7) fma.s1 FR_res_pos_x_lo = FR_res_pos_x_lo, f1, FR_V //p7: x < 0 - nop.i 0 - + nop.i 0 + } ;; { .mfi nop.m 0 (p7) fnma.s1 FR_Tmp2 = FR_res_pos_x_lo, f1, FR_Tmp2 //p7: x < 0 - nop.i 0 - + nop.i 0 + } ;; -//p6: result for 0 < x < = POS_ARG_ASYMP +//p6: result for 0 < x < = POS_ARG_ASYMP //p7: result for - NEG_ARG_ASYMP <= x < 0 //p8: exit for - NEG_ARG_ASYMP <= x < UnfBound -ERFC_RESULT: +ERFC_RESULT: .pred.rel "mutex",p6,p7 { .mfi nop.m 0 (p6) fma.s0 f8 = FR_M, FR_U, FR_V // p6: x >= 0 - nop.i 0 + nop.i 0 } { .mfb mov GR_Parameter_TAG = 207 (p7) fma.s0 f8 = FR_Tmp2, f1, FR_Tmp1 // p7: x < 0 -(p8) br.ret.sptk b0 +(p8) br.ret.sptk b0 };; GLOBAL_LIBM_END(erfcl) @@ -2019,7 +2019,7 @@ LOCAL_LIBM_ENTRY(__libm_error_region) mov GR_SAVE_PFS=ar.pfs // Save ar.pfs } { .mfi -.fframe 64 +.fframe 64 add sp=-64,sp // Create new stack nop.f 0 mov GR_SAVE_GP=gp // Save gp @@ -2027,18 +2027,18 @@ LOCAL_LIBM_ENTRY(__libm_error_region) { .mmi stfe [GR_Parameter_Y] = FR_Y,16 // STORE Parameter 2 on stack add GR_Parameter_X = 16,sp // Parameter 1 address -.save b0, GR_SAVE_B0 +.save b0, GR_SAVE_B0 mov GR_SAVE_B0=b0 // Save b0 };; .body { .mib stfe [GR_Parameter_X] = FR_X // STORE Parameter 1 on stack add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address - nop.b 0 + nop.b 0 } { .mib stfe [GR_Parameter_Y] = FR_RESULT // STORE Parameter 3 on stack - add GR_Parameter_Y = -16,GR_Parameter_Y + add GR_Parameter_Y = -16,GR_Parameter_Y br.call.sptk b0=__libm_error_support# // Call error handling function };; { .mmi @@ -2056,7 +2056,7 @@ LOCAL_LIBM_ENTRY(__libm_error_region) mov gp = GR_SAVE_GP // Restore gp mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs br.ret.sptk b0 // Return -};; +};; LOCAL_LIBM_END(__libm_error_region) .type __libm_error_support#,@function diff --git a/sysdeps/ia64/fpu/s_erff.S b/sysdeps/ia64/fpu/s_erff.S index ed0aaac488..a5cde66d5d 100644 --- a/sysdeps/ia64/fpu/s_erff.S +++ b/sysdeps/ia64/fpu/s_erff.S @@ -21,20 +21,20 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // // History @@ -82,7 +82,7 @@ // 5. |x| = INF // Return erff(x) = sign(x) * 1.0 // -// 6. x = [S,Q]NaN +// 6. x = [S,Q]NaN // Return erff(x) = QNaN // // 7. x is positive denormal @@ -95,11 +95,11 @@ // // Registers used //============================================================== -// Floating Point registers used: +// Floating Point registers used: // f8, input // f32 -> f59 -// General registers used: +// General registers used: // r32 -> r45, r2, r3 // Predicate registers used: @@ -180,7 +180,7 @@ data8 0xBF468D71CF4F0918 // C3 data8 0x40312115B0932F24 // D0 data8 0xC0160D6CD0991EA3 // D1 data8 0xBFE04A567A6DBE4A // D2 -data8 0xBF4207BC640D1509 // B0 +data8 0xBF4207BC640D1509 // B0 // Polynomial coefficients for the erf(x), 0.25 <= |x| < 0.5 data8 0x3F90849356383F58 // C0 data8 0x3F830BD5BA240F09 // C1 @@ -217,7 +217,7 @@ data8 0xC08A5C9D5FE8B9F6 // D0 data8 0x406EFF5F088CEC4B // D1 data8 0xC03A5743DF38FDE0 // D2 data8 0xBEE397A9FA5686A2 // B0 -// Polynomial coefficients for the erf(x), -0.125 < x < 0.125 +// Polynomial coefficients for the erf(x), -0.125 < x < 0.125 data8 0x3FF20DD7504270CB // C0 data8 0xBFD8127465AFE719 // C1 data8 0x3FBCE2D77791DD77 // C2 @@ -269,10 +269,10 @@ GLOBAL_LIBM_ENTRY(erff) ;; { .mfi - getf.s rArg = f8 // x in GR + getf.s rArg = f8 // x in GR fclass.m p7,p0 = f8, 0x0b // is x denormal ? // sign bit and 2 most bits in significand - shl rMask = rMask, 20 + shl rMask = rMask, 20 } { .mfi ld8 rDataPtr = [rDataPtr] @@ -296,7 +296,7 @@ GLOBAL_LIBM_ENTRY(erff) { .mfi andcm rOffset2 = rArg, rMask fclass.m p6,p0 = f8, 0xc7 // is x [S,Q]NaN or +/-0 ? - shl rBound = rBound, 20 // 0.125f in GR + shl rBound = rBound, 20 // 0.125f in GR } { .mfb andcm rAbsArg = rArg, rSignBit // |x| in GR @@ -311,7 +311,7 @@ GLOBAL_LIBM_ENTRY(erff) shr rOffset2 = rOffset2, 21 } { .mfi - cmp.lt p10, p8 = rAbsArg, rBound // |x| < 0.125? + cmp.lt p10, p8 = rAbsArg, rBound // |x| < 0.125? nop.f 0 adds rCoeffAddr3 = 16, rDataPtr } @@ -332,8 +332,8 @@ GLOBAL_LIBM_ENTRY(erff) { .mfi shladd rCoeffAddr1 = rBias, 4, rDataPtr fma.s1 fArg3Sgn = fArgSqr, f8, f0 // sign(x)*|x|^3 - // is |x| < 4.0? - cmp.lt p11, p12 = rAbsArg, rSaturation + // is |x| < 4.0? + cmp.lt p11, p12 = rAbsArg, rSaturation } { .mfi shladd rCoeffAddr3 = rBias, 4, rCoeffAddr3 @@ -345,7 +345,7 @@ GLOBAL_LIBM_ENTRY(erff) { .mfi (p11) ldfpd fC0, fC1 = [rCoeffAddr1] (p9) fmerge.s f8 = f8,f1 // +/- inf -(p12) adds rDataPtr = 512, rDataPtr +(p12) adds rDataPtr = 512, rDataPtr } { .mfb (p11) ldfpd fC2, fC3 = [rCoeffAddr3], 16 @@ -434,7 +434,7 @@ GLOBAL_LIBM_ENTRY(erff) { .mfi nop.m 0 - fma.s1 fPolATmp = fA3, fAbsArg, fA2 // A3*|x| + A2 + fma.s1 fPolATmp = fA3, fAbsArg, fA2 // A3*|x| + A2 nop.i 0 } { .mfi @@ -446,7 +446,7 @@ GLOBAL_LIBM_ENTRY(erff) { .mfi nop.m 0 // C3*|x|^3 + C2*x^2 + C1*|x| + C0 - fma.s1 fPolC = fPolC, fArgSqr, fPolCTmp + fma.s1 fPolC = fPolC, fArgSqr, fPolCTmp nop.i 0 } ;; @@ -454,31 +454,31 @@ GLOBAL_LIBM_ENTRY(erff) { .mfi nop.m 0 // PolD = sign(x)*(|x|^7 + D2*x^6 + D1*|x|^5 + D0*x^4) - fma.d.s1 fPolD = fPolD, fArg4Sgn, fPolDTmp + fma.d.s1 fPolD = fPolD, fArg4Sgn, fPolDTmp nop.i 0 } ;; { .mfi nop.m 0 - // PolA = A3|x|^3 + A2*x^2 + A1*|x| + A0 - fma.d.s1 fPolA = fPolATmp, fArgSqr, fPolA + // PolA = A3|x|^3 + A2*x^2 + A1*|x| + A0 + fma.d.s1 fPolA = fPolATmp, fArgSqr, fPolA nop.i 0 } -;; +;; { .mfi nop.m 0 - // PolC = B0*x^4 + C3*|x|^3 + C2*|x|^2 + C1*|x| + C0 - fma.d.s1 fPolC = fPolC, f1, fB0 + // PolC = B0*x^4 + C3*|x|^3 + C2*|x|^2 + C1*|x| + C0 + fma.d.s1 fPolC = fPolC, f1, fB0 nop.i 0 } -;; +;; { .mfi nop.m 0 (p14) fma.s.s0 f8 = fPolC, fPolD, fPolA // for positive x - nop.i 0 + nop.i 0 } { .mfb nop.m 0 @@ -522,7 +522,7 @@ erff_saturation: br.ret.sptk b0 // Exit for 4.0 <=|x|< +inf } ;; - + // Here if x is single precision denormal erff_denormal: { .mfi diff --git a/sysdeps/ia64/fpu/s_erfl.S b/sysdeps/ia64/fpu/s_erfl.S index 10da22ce36..ebb1bed444 100644 --- a/sysdeps/ia64/fpu/s_erfl.S +++ b/sysdeps/ia64/fpu/s_erfl.S @@ -21,20 +21,20 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // // History @@ -68,7 +68,7 @@ // // 3. Main path: 1/8 <= |x| < 6.53 // For several ranges of 1/8 <= |x| < 6.53 -// Return erfl(x) = sign(x)*((A0H+A0L) + y*(A1H+A1L) + y^2*(A2H+A2L) + +// Return erfl(x) = sign(x)*((A0H+A0L) + y*(A1H+A1L) + y^2*(A2H+A2L) + // + y^3*A3 + y^4*A4 + ... + y^25*A25 ) // where y = (|x|/a) - b // @@ -83,7 +83,7 @@ // 4.0 <= |x| < 6.53 a = 4.0, b = 1.5 // ( [3.25;4.0] subrange separated for monotonicity issues resolve ) // -// 4. Saturation path: 6.53 <= |x| < +INF +// 4. Saturation path: 6.53 <= |x| < +INF // Return erfl(x) = sign(x)*(1.0 - tiny_value) // (tiny_value ~ 1e-1233) // @@ -109,10 +109,10 @@ // Multiprecision have to be performed only for first few // polynomial iterations (up to 3-rd x degree) // Here we use the same parallelisation way as above: -// Split whole polynomial to first, "multiprecision" part, and second, +// Split whole polynomial to first, "multiprecision" part, and second, // so called "tail", native precision part. // -// 1) Multiprecision part: +// 1) Multiprecision part: // [v1=(A0H+A0L)+y*(A1H+A1L)] + [v2=y^2*((A2H+A2L)+y*A3)] // v1 and v2 terms calculated in parallel // @@ -120,23 +120,23 @@ // v3 = x^4 * ( A4 + x*A5 + ... + x^21*A25 ) // v3 is splitted to 2 even parts (10 coefficient in each one). // These 2 parts are also factorized using binary tree technique. -// +// // So Multiprecision and Tail parts cost is almost the same // and we have both results ready before final summation. // -// 4. Saturation path: 6.53 <= |x| < +INF +// 4. Saturation path: 6.53 <= |x| < +INF // // We use formula sign(x)*(1.0 - tiny_value) instead of simple sign(x)*1.0 // just to meet IEEE requirements for different rounding modes in this case. // // Registers used //============================================================== -// Floating Point registers used: +// Floating Point registers used: // f8 - input & output // f32 -> f90 -// General registers used: -// r2, r3, r32 -> r52 +// General registers used: +// r2, r3, r32 -> r52 // Predicate registers used: // p0, p6 -> p11, p14, p15 @@ -201,9 +201,9 @@ fA16 = f51 fA17 = f52 fA18 = f53 fA19 = f54 -fA20 = f55 -fA21 = f56 -fA22 = f57 +fA20 = f55 +fA21 = f56 +fA22 = f57 fA23 = f58 fA24 = f59 fA25 = f60 @@ -232,10 +232,10 @@ fRes3H = f79 fRes3L = f80 fRes4 = f81 -fTT = f82 +fTT = f82 fTH = f83 fTL = f84 -fTT2 = f85 +fTT2 = f85 fTH2 = f86 fTL2 = f87 @@ -252,7 +252,7 @@ RODATA LOCAL_OBJECT_START(erfl_data) ////////// Main tables /////////// _0p125_to_0p25_data: // exp = 2^-3 -// Polynomial coefficients for the erf(x), 1/8 <= |x| < 1/4 +// Polynomial coefficients for the erf(x), 1/8 <= |x| < 1/4 data8 0xACD9ED470F0BB048, 0x0000BFF4 //A3 = -6.5937529303909561891162915809e-04 data8 0xBF6A254428DDB452 //A2H = -3.1915980570631852578089571182e-03 data8 0xBC131B3BE3AC5079 //A2L = -2.5893976889070198978842231134e-19 @@ -275,7 +275,7 @@ data8 0x92E992C58B7C3847, 0x0000BFC6 //A14 = -7.9641369349930600223371163611e-18 LOCAL_OBJECT_END(erfl_data) LOCAL_OBJECT_START(_0p25_to_0p5_data) -// Polynomial coefficients for the erf(x), 1/4 <= |x| < 1/2 +// Polynomial coefficients for the erf(x), 1/4 <= |x| < 1/2 data8 0xF083628E8F7CE71D, 0x0000BFF6 //A3 = -3.6699405305266733332335619531e-03 data8 0xBF978749A434FE4E //A2H = -2.2977018973732214746075186440e-02 data8 0xBC30B3FAFBC21107 //A2L = -9.0547407100537663337591537643e-19 @@ -298,7 +298,7 @@ data8 0x9CC8FFFBDDCF9853, 0x0000BFD4 //A14 = -1.3925319209173383944263942226e-13 LOCAL_OBJECT_END(_0p25_to_0p5_data) LOCAL_OBJECT_START(_0p5_to_1_data) -// Polynomial coefficients for the erf(x), 1/2 <= |x| < 1 +// Polynomial coefficients for the erf(x), 1/2 <= |x| < 1 data8 0xDB742C8FB372DBE0, 0x00003FF6 //A3 = 3.3485993187250381721535255963e-03 data8 0xBFBEDC5644353C26 //A2H = -1.2054957547410136142751468924e-01 data8 0xBC6D7215B023455F //A2L = -1.2770012232203569059818773287e-17 @@ -321,7 +321,7 @@ data8 0xB989FDB3795165C7, 0x00003FE1 //A14 = 1.3499740992928183247608593000e-09 LOCAL_OBJECT_END(_0p5_to_1_data) LOCAL_OBJECT_START(_1_to_2_data) -// Polynomial coefficients for the erf(x), 1 <= |x| < 2.0 +// Polynomial coefficients for the erf(x), 1 <= |x| < 2.0 data8 0x8E15015F5B55BEAC, 0x00003FFC //A3 = 1.3875200409423426678618977531e-01 data8 0xBFC6D5A95D0A1B7E //A2H = -1.7839543383544403942764233761e-01 data8 0xBC7499F704C80E02 //A2L = -1.7868888188464394090788198634e-17 @@ -344,7 +344,7 @@ data8 0xEC6E63BB4507B585, 0x0000BFEE //A14 = -1.4092398243085031882423746824e-05 LOCAL_OBJECT_END(_1_to_2_data) LOCAL_OBJECT_START(_2_to_3p25_data) -// Polynomial coefficients for the erf(x), 2 <= |x| < 3.25 +// Polynomial coefficients for the erf(x), 2 <= |x| < 3.25 data8 0xCEDBA58E8EE6F055, 0x00003FF7 //A3 = 6.3128050215859026984338771121e-03 data8 0xBF5B60D5E974CBBD //A2H = -1.6710366233609740427984435840e-03 data8 0xBC0E11E2AEC18AF6 //A2L = -2.0376133202996259839305825162e-19 @@ -367,7 +367,7 @@ data8 0xF2F3D8D21E8762E0, 0x0000BFF7 //A14 = -7.4143227286535936033409745884e-03 LOCAL_OBJECT_END(_2_to_3p25_data) LOCAL_OBJECT_START(_4_to_6p53_data) -// Polynomial coefficients for the erf(x), 4 <= |x| < 6.53 +// Polynomial coefficients for the erf(x), 4 <= |x| < 6.53 data8 0xDF3151BE8652827E, 0x00003FD5 //A3 = 3.9646979666953349095427642209e-13 data8 0xBD1C4A9787DF888B //A2H = -2.5127788450714750484839908889e-14 data8 0xB99B35483E4603FD //A2L = -3.3536613901268985626466020210e-31 @@ -390,7 +390,7 @@ data8 0x965DA4A80008B7BC, 0x0000BFEE //A14 = -8.9624997201558650125662820562e-06 LOCAL_OBJECT_END(_4_to_6p53_data) LOCAL_OBJECT_START(_3p25_to_4_data) -// Polynomial coefficients for the erf(x), 3.25 <= |x| < 4 +// Polynomial coefficients for the erf(x), 3.25 <= |x| < 4 data8 0xB01D29846286CE08, 0x00003FEE //A3 = 1.0497207328743021499800978059e-05 data8 0xBEC10B1488AEB234 //A2H = -2.0317175474986489113480084279e-06 data8 0xBB7F19701B8B74F9 //A2L = -4.1159669348226960337518214996e-22 @@ -415,7 +415,7 @@ LOCAL_OBJECT_END(_3p25_to_4_data) //////// "Tail" tables ////////// LOCAL_OBJECT_START(_0p125_to_0p25_data_tail) -// Polynomial coefficients for the erf(x), 1/8 <= |x| < 1/4 +// Polynomial coefficients for the erf(x), 1/8 <= |x| < 1/4 data8 0x93086CBD21ED3962, 0x00003FCA //A13 = 1.2753071968462837024755878679e-16 data8 0x83CB5045A6D4B419, 0x00003FCF //A12 = 3.6580237062957773626379648530e-15 data8 0x8FCDB723209690EB, 0x0000BFD3 //A11 = -6.3861616307180801527566117146e-14 @@ -429,7 +429,7 @@ data8 0xCC43247F4410C54A, 0x00003FEF //A4 = 2.4349960762505993017186935493e-05 LOCAL_OBJECT_END(_0p125_to_0p25_data_tail) LOCAL_OBJECT_START(_0p25_to_0p5_data_tail) -// Polynomial coefficients for the erf(x), 1/4 <= |x| < 1/2 +// Polynomial coefficients for the erf(x), 1/4 <= |x| < 1/2 data8 0x8CEAC59AF361B78A, 0x0000BFD6 //A13 = -5.0063802958258679384986669123e-13 data8 0x9BC67404F348C0CE, 0x00003FDB //A12 = 1.7709590771868743572061278273e-11 data8 0xF4B5D0348AFAAC7A, 0x00003FDB //A11 = 2.7820329729584630464848160970e-11 @@ -443,7 +443,7 @@ data8 0xAA94D5E68033B764, 0x00003FF4 //A4 = 6.5071635765452563856926608000e-04 LOCAL_OBJECT_END(_0p25_to_0p5_data_tail) LOCAL_OBJECT_START(_0p5_to_1_data_tail) -// Polynomial coefficients for the erf(x), 1/2 <= |x| < 1 +// Polynomial coefficients for the erf(x), 1/2 <= |x| < 1 data8 0x9ED99EDF111CB785, 0x0000BFE4 //A13 = -9.2462916180079278241704711522e-09 data8 0xDEAF7539AE2FB062, 0x0000BFE5 //A12 = -2.5923990465973151101298441139e-08 data8 0xA392D5E5CC9DB1A7, 0x00003FE9 //A11 = 3.0467952847327075747032372101e-07 @@ -457,7 +457,7 @@ data8 0x9A4DAF550A2CC29A, 0x00003FF8 //A4 = 9.4179355839141698591817907680e-03 LOCAL_OBJECT_END(_0p5_to_1_data_tail) LOCAL_OBJECT_START(_1_to_2_data_tail) -// Polynomial coefficients for the erf(x), 1 <= |x| < 2.0 +// Polynomial coefficients for the erf(x), 1 <= |x| < 2.0 data8 0x969EAC5C7B46CAB9, 0x00003FEF //A13 = 1.7955281439310148162059582795e-05 data8 0xA2ED832912E9FCD9, 0x00003FF1 //A12 = 7.7690020847111408916570845775e-05 data8 0x85677C39C48E43E7, 0x0000BFF3 //A11 = -2.5444839340796031538582511806e-04 @@ -471,7 +471,7 @@ data8 0xB6AD4AE850DBF526, 0x0000BFFA //A4 = -4.4598858458861014323191919669e-02 LOCAL_OBJECT_END(_1_to_2_data_tail) LOCAL_OBJECT_START(_2_to_3p25_data_tail) -// Polynomial coefficients for the erf(x), 2 <= |x| < 3.25 +// Polynomial coefficients for the erf(x), 2 <= |x| < 3.25 data8 0x847C24DAC7C7558B, 0x00003FF5 //A13 = 1.0107798565424606512130100541e-03 data8 0xCB6340EAF02C3DF8, 0x00003FF8 //A12 = 1.2413800617425931997420375435e-02 data8 0xB5163D252DBBC107, 0x0000BFF9 //A11 = -2.2105330871844825370020459523e-02 @@ -485,7 +485,7 @@ data8 0x88E42D8F47FAB60E, 0x0000BFF9 //A4 = -1.6710366233609742619461063050e-02 LOCAL_OBJECT_END(_2_to_3p25_data_tail) LOCAL_OBJECT_START(_4_to_6p53_data_tail) -// Polynomial coefficients for the erf(x), 4 <= |x| < 6.53 +// Polynomial coefficients for the erf(x), 4 <= |x| < 6.53 data8 0xD8235ABF08B8A6D1, 0x00003FEE //A13 = 1.2882834877224764938429832586e-05 data8 0xAEDF44F9C77844C2, 0x0000BFEC //A12 = -2.6057980393716019511497492890e-06 data8 0xCCD5490956A4FCFD, 0x00003FEA //A11 = 7.6306293047300300284923464089e-07 @@ -499,7 +499,7 @@ data8 0xA29C398F83F8A0D1, 0x0000BFD9 //A4 = -4.6216613698438694005327544047e-12 LOCAL_OBJECT_END(_4_to_6p53_data_tail) LOCAL_OBJECT_START(_3p25_to_4_data_tail) -// Polynomial coefficients for the erf(x), 3.25 <= |x| < 4 +// Polynomial coefficients for the erf(x), 3.25 <= |x| < 4 data8 0x95BE1BEAD738160F, 0x00003FF2 //A13 = 1.4280568455209843005829620687e-04 data8 0x8108C8FFAC0F0B21, 0x0000BFF4 //A12 = -4.9222685622046459346377033307e-04 data8 0xD72A7FAEE7832BBE, 0x00003FF4 //A11 = 8.2079319302109644436194651098e-04 @@ -514,7 +514,7 @@ LOCAL_OBJECT_END(_3p25_to_4_data_tail) LOCAL_OBJECT_START(_0_to_1o8_data) -// Polynomial coefficients for the erf(x), 0.0 <= |x| < 0.125 +// Polynomial coefficients for the erf(x), 0.0 <= |x| < 0.125 data8 0x3FF20DD750429B6D, 0x3C71AE3A8DDFFEDE //A1H, A1L data8 0xF8B0DACE42525CC2, 0x0000BFEE //A15 data8 0xFCD02E1BF0EC2C37, 0x00003FF1 //A13 @@ -536,7 +536,7 @@ LOCAL_OBJECT_END(_denorm_data) GLOBAL_LIBM_ENTRY(erfl) { .mfi - alloc r32 = ar.pfs, 0, 21, 0, 0 + alloc r32 = ar.pfs, 0, 21, 0, 0 fmerge.se fArgAbsNorm = f1, f8 // normalized x (1.0 <= x < 2.0) addl rSignBit = 0x20000, r0 // Set sign bit for exponent } @@ -547,26 +547,26 @@ GLOBAL_LIBM_ENTRY(erfl) { .mfi getf.exp rArgExp = f8 // Get arg exponent - fclass.m p6,p0 = f8, 0xEF // Filter 0, denormals and specials + fclass.m p6,p0 = f8, 0xEF // Filter 0, denormals and specials // 0xEF = @qnan|@snan|@pos|@neg|@zero|@unorm|@inf - addl rBias = 0xfffc, r0 // Value to subtract from exp + addl rBias = 0xfffc, r0 // Value to subtract from exp // to get actual interval number } { .mfi ld8 rDataPtr = [rDataPtr] // Get real common data pointer fma.s1 fArgSqr = f8, f8, f0 // x^2 (for [0;1/8] path) - addl r2to4 = 0x10000, r0 // unbiased exponent + addl r2to4 = 0x10000, r0 // unbiased exponent // for [2;4] binary interval };; { .mfi - getf.sig rArgSig = f8 // Get arg significand + getf.sig rArgSig = f8 // Get arg significand fcmp.lt.s1 p15, p14 = f8, f0 // Is arg negative/positive? addl rSaturation = 0xd0e, r0 // First 12 bits of // saturation value signif. } { .mfi - setf.d f1p5 = r1p5 // 1.5 construction + setf.d f1p5 = r1p5 // 1.5 construction fma.s1 f2p0 = f1,f1,f1 // 2.0 construction addl r3p25Sign = 0xd00, r0 // First 12 bits of // 3.25 value signif. @@ -586,7 +586,7 @@ GLOBAL_LIBM_ENTRY(erfl) { .mfi sub rInterval = rArgExp, rBias // Get actual interval number nop.f 0 - shr.u rArgSig = rArgSig, 52 // Leave only 12 bits of sign. + shr.u rArgSig = rArgSig, 52 // Leave only 12 bits of sign. } { .mfi adds rShiftedDataPtr = 0x10, rDataPtr // Second ptr to data @@ -595,10 +595,10 @@ GLOBAL_LIBM_ENTRY(erfl) };; { .mfi -(p8) cmp.le p8, p10 = r3p25Sign, rArgSig // If sign. is greater +(p8) cmp.le p8, p10 = r3p25Sign, rArgSig // If sign. is greater // than 1.25? (means arg is in [3.25;4] interval) nop.f 0 - shl rOffset = rInterval, 8 // Make offset from + shl rOffset = rInterval, 8 // Make offset from // interval number } { .mfi @@ -609,30 +609,30 @@ GLOBAL_LIBM_ENTRY(erfl) };; { .mfi -(p8) adds rOffset = 0x200, rOffset // Add additional offset +(p8) adds rOffset = 0x200, rOffset // Add additional offset // if arg is in [3.25;4] (another data set) fma.s1 fArgCube = fArgSqr, f8, f0 // x^3 (for [0;1/8] path) shl rTailOffset = rInterval, 7 // Make offset to "tail" data // from interval number } { .mib - setf.exp fTiny = rTiny // Construct "tiny" value + setf.exp fTiny = rTiny // Construct "tiny" value // for saturation path cmp.ltu p11, p0 = 0x5, rInterval // if arg > 8 -(p9) br.cond.spnt _0_to_1o8 +(p9) br.cond.spnt _0_to_1o8 };; { .mfi - add rAddr1 = rDataPtr, rOffset // Get address for - // interval data + add rAddr1 = rDataPtr, rOffset // Get address for + // interval data nop.f 0 shl rTailAddOffset = rInterval, 5 // Offset to interval - // "tail" data + // "tail" data } { .mib add rAddr2 = rShiftedDataPtr, rOffset // Get second - // address for interval data -(p7) cmp.leu p11, p0 = rSaturation, rArgSig // if arg is + // address for interval data +(p7) cmp.leu p11, p0 = rSaturation, rArgSig // if arg is // in [6.53;8] interval (p11) br.cond.spnt _saturation // Branch to Saturation path };; @@ -660,14 +660,14 @@ GLOBAL_LIBM_ENTRY(erfl) .pred.rel "mutex",p8,p10 { .mfi ldfe fA18 = [rAddr1], 16 // Load A18 -(p8) fms.s1 fArgAbsNorm = fArgAbsNorm, f1, f2p0 // Add 2.0 +(p8) fms.s1 fArgAbsNorm = fArgAbsNorm, f1, f2p0 // Add 2.0 // to normalized arg (for [3.24;4] interval) adds rTailAddr2 = 0x10, rTailAddr1 // First tail // data address } { .mfi - ldfe fA25 = [rAddr2], 16 // Load A25 -(p10) fms.s1 fArgAbsNorm = fArgAbsNorm, f1, f1p5 // Add 1.5 + ldfe fA25 = [rAddr2], 16 // Load A25 +(p10) fms.s1 fArgAbsNorm = fArgAbsNorm, f1, f1p5 // Add 1.5 // to normalized arg nop.i 0 };; @@ -775,9 +775,9 @@ GLOBAL_LIBM_ENTRY(erfl) fma.s1 fA23 = fA24, fArgAbsNorm, fA23 // Polynomial tail nop.i 0 } -{ .mfi +{ .mfi nop.m 0 - fma.s1 fA21 = fA22, fArgAbsNorm, fA21 // Polynomial tail + fma.s1 fA21 = fA22, fArgAbsNorm, fA21 // Polynomial tail nop.i 0 };; @@ -793,7 +793,7 @@ GLOBAL_LIBM_ENTRY(erfl) fma.s1 fRes3L = fRes3L, f1, fTH // (A3*x+A2)*x^2 nop.i 0 } -{ .mfi +{ .mfi nop.m 0 fma.s1 fA19 = fA20, fArgAbsNorm, fA19 // Polynomial tail nop.i 0 @@ -804,7 +804,7 @@ GLOBAL_LIBM_ENTRY(erfl) fma.s1 fRes1H = fTH2, f1, fA0H // A1*x+A0 nop.i 0 } -{ .mfi +{ .mfi nop.m 0 fms.s1 fTL2 = fA1H, fArgAbsNorm, fTH2 // A1*x+A0 nop.i 0 @@ -815,7 +815,7 @@ GLOBAL_LIBM_ENTRY(erfl) fma.s1 fA8 = fA9, fArgAbsNorm, fA8 // Polynomial tail nop.i 0 } -{ .mfi +{ .mfi nop.m 0 fma.s1 fA10 = fA11, fArgAbsNorm, fA10 // Polynomial tail nop.i 0 @@ -835,7 +835,7 @@ GLOBAL_LIBM_ENTRY(erfl) fms.s1 fArgAbsNorm11 = fArgAbsNorm4, fArgAbsNorm4, f0 // x^8 nop.i 0 } -{ .mfi +{ .mfi nop.m 0 fma.s1 fA4 = fA5, fArgAbsNorm, fA4 // Polynomial tail nop.i 0 @@ -846,7 +846,7 @@ GLOBAL_LIBM_ENTRY(erfl) fma.s1 fRes3L = fRes3L, f1, fA2L // (A3*x+A2)*x^2 nop.i 0 } -{ .mfi +{ .mfi nop.m 0 fma.s1 fA6 = fA7, fArgAbsNorm, fA6 // Polynomial tail nop.i 0 @@ -857,7 +857,7 @@ GLOBAL_LIBM_ENTRY(erfl) fma.s1 fTL2 = fTL2, f1, fTT2 // A1*x+A0 nop.i 0 } -{ .mfi +{ .mfi nop.m 0 fms.s1 fRes1L = fA0H, f1, fRes1H // A1*x+A0 nop.i 0 @@ -868,7 +868,7 @@ GLOBAL_LIBM_ENTRY(erfl) fma.s1 fA23 = fA25, fArgAbsNorm2, fA23 // Polynomial tail nop.i 0 } -{ .mfi +{ .mfi nop.m 0 fma.s1 fA12 = fA14, fArgAbsNorm2, fA12 // Polynomial tail nop.i 0 @@ -879,7 +879,7 @@ GLOBAL_LIBM_ENTRY(erfl) fma.s1 fA19 = fA21, fArgAbsNorm2, fA19 // Polynomial tail nop.i 0 } -{ .mfi +{ .mfi nop.m 0 fma.s1 fA8 = fA10, fArgAbsNorm2, fA8 // Polynomial tail nop.i 0 @@ -890,7 +890,7 @@ GLOBAL_LIBM_ENTRY(erfl) fma.s1 fA15 = fA17, fArgAbsNorm2, fA15 // Polynomial tail nop.i 0 } -{ .mfi +{ .mfi nop.m 0 fms.s1 fArgAbsNorm11 = fArgAbsNorm11, fArgAbsNorm3, f0 // x^11 nop.i 0 @@ -901,7 +901,7 @@ GLOBAL_LIBM_ENTRY(erfl) fma.s1 fTT = fRes3L, fArgAbsNorm2, f0 // (A3*x+A2)*x^2 nop.i 0 } -{ .mfi +{ .mfi nop.m 0 fma.s1 fA4 = fA6, fArgAbsNorm2, fA4 // Polynomial tail nop.i 0 @@ -918,7 +918,7 @@ GLOBAL_LIBM_ENTRY(erfl) fma.s1 fA19 = fA23, fArgAbsNorm4, fA19 // Polynomial tail nop.i 0 } -{ .mfi +{ .mfi nop.m 0 fma.s1 fA8 = fA12, fArgAbsNorm4, fA8 // Polynomial tail nop.i 0 @@ -961,7 +961,7 @@ GLOBAL_LIBM_ENTRY(erfl) { .mfi nop.m 0 - fma.s1 fRes4 = fA15, fArgAbsNorm11, fA4 // Result of + fma.s1 fRes4 = fA15, fArgAbsNorm11, fA4 // Result of // polynomial tail nop.i 0 };; @@ -971,7 +971,7 @@ GLOBAL_LIBM_ENTRY(erfl) fms.s1 fRes2L = fRes3H, fArgAbsNorm2, fRes2H // (A3*x+A2)*x^2 nop.i 0 } -{ .mfi +{ .mfi nop.m 0 fma.s1 fResH = fRes2H, f1, fRes1H // High result nop.i 0 @@ -983,12 +983,12 @@ GLOBAL_LIBM_ENTRY(erfl) nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fma.s1 fRes2L = fRes2L, f1, fTT // (A3*x+A2)*x^2 nop.i 0 } -{ .mfi +{ .mfi nop.m 0 fms.s1 fResL = fRes1H, f1, fResH // Low result nop.i 0 @@ -999,13 +999,13 @@ GLOBAL_LIBM_ENTRY(erfl) fma.s1 fRes1L = fRes1L, f1, fRes2L // Low result nop.i 0 } -{ .mfi +{ .mfi nop.m 0 fma.s1 fResL = fResL, f1, fRes2H // Low result nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 (p15) fneg fResH = fResH // Invert high result if arg is neg. nop.i 0 @@ -1018,12 +1018,12 @@ GLOBAL_LIBM_ENTRY(erfl) };; .pred.rel "mutex",p14,p15 -{ .mfi +{ .mfi nop.m 0 (p14) fma.s0 f8 = fResH, f1, fResL // Add high and low results nop.i 0 } -{ .mfb +{ .mfb nop.m 0 (p15) fms.s0 f8 = fResH, f1, fResL // Add high and low results br.ret.sptk b0 // Main path return @@ -1033,12 +1033,12 @@ GLOBAL_LIBM_ENTRY(erfl) _saturation: .pred.rel "mutex",p14,p15 -{ .mfi +{ .mfi nop.m 0 (p14) fms.s0 f8 = f1, f1, fTiny // Saturation result r = 1-tiny nop.i 0 };; -{ .mfb +{ .mfb nop.m 0 (p15) fnma.s0 f8 = f1, f1, fTiny // Saturation result r = tiny-1 br.ret.sptk b0 // Saturation path return @@ -1048,69 +1048,69 @@ _saturation: // 0, denormals and special IEEE numbers path ///////////////////////////////// erfl_spec: -{ .mfi +{ .mfi addl rDataPtr = 0xBE0, rDataPtr // Ptr to denormals coeffs fclass.m p6,p0 = f8, 0x23 // To filter infinities - // 0x23 = @pos|@neg|@inf + // 0x23 = @pos|@neg|@inf nop.i 0 };; -{ .mfi +{ .mfi ldfpd fA1H, fA1L = [rDataPtr] // Load denormals coeffs A1H, A1L fclass.m p7,p0 = f8, 0xC7 // To filter NaNs & Zeros // 0xC7 = @pos|@neg|@zero|@qnan|@snan nop.i 0 };; -{ .mfb +{ .mfb nop.m 0 -(p6) fmerge.s f8 = f8, f1 // +/-1 for INF args +(p6) fmerge.s f8 = f8, f1 // +/-1 for INF args (p6) br.ret.spnt b0 // exit for x = INF };; -{ .mfb +{ .mfb nop.m 0 -(p7) fma.s0 f8 = f8, f1, f8 // +/-0 for 0 args +(p7) fma.s0 f8 = f8, f1, f8 // +/-0 for 0 args // and NaNs for NaNs (p7) br.ret.spnt b0 // exit for x = NaN or +/-0 };; -{ .mfi +{ .mfi nop.m 0 fnorm.s0 f8 = f8 // Normalize arg nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fms.s1 fRes1H = f8, fA1H, f0 // HighRes nop.i 0 } -{ .mfi +{ .mfi nop.m 0 fms.s1 fRes1L = f8, fA1L, f0 // LowRes nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fms.s1 fRes1Hd = f8, fA1H, fRes1H // HighRes delta nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fma.s1 fRes = fRes1L, f1, fRes1Hd // LowRes+HighRes delta nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fma.s1 fRes = f8, f8, fRes // r=x^2+r nop.i 0 };; -{ .mfb +{ .mfb nop.m 0 fma.s0 f8 = fRes, f1, fRes1H // res = r+ResHigh br.ret.sptk b0 // 0, denormals, specials return @@ -1120,120 +1120,120 @@ erfl_spec: // 0 < |x| < 1/8 path ///////////////////////////////////////////////////////// _0_to_1o8: -{ .mmi +{ .mmi adds rAddr1 = 0xB60, rDataPtr // Ptr 1 to coeffs adds rAddr2 = 0xB80, rDataPtr // Ptr 2 to coeffs nop.i 0 };; -{ .mmi +{ .mmi ldfpd fA1H, fA1L = [rAddr1], 16 // Load A1High, A1Low ldfe fA13 = [rAddr2], 16 // Load A13 nop.i 0 };; -{ .mmi +{ .mmi ldfe fA15 = [rAddr1], 48 // Load A15 ldfe fA11 = [rAddr2], 32 // Load A11 nop.i 0 };; -{ .mmi +{ .mmi ldfe fA9 = [rAddr1], 32 // Load A9 ldfe fA7 = [rAddr2], 32 // Load A7 nop.i 0 };; -{ .mmi +{ .mmi ldfe fA5 = [rAddr1] // Load A5 ldfe fA3 = [rAddr2] // Load A3 nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fms.s1 fRes1H = f8, fA1H, f0 // x*(A1H+A1L) nop.i 0 } -{ .mfi +{ .mfi nop.m 0 fms.s1 fRes1L = f8, fA1L, f0 // x*(A1H+A1L) nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fma.s1 fA11 = fA13, fArgSqr, fA11 // Polynomial tail nop.i 0 } -{ .mfi +{ .mfi nop.m 0 - fma.s1 fArgFour = fArgSqr, fArgSqr, f0 // a^4 + fma.s1 fArgFour = fArgSqr, fArgSqr, f0 // a^4 nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fma.s1 fA3 = fA5, fArgSqr, fA3 // Polynomial tail nop.i 0 } -{ .mfi +{ .mfi nop.m 0 fma.s1 fA7 = fA9, fArgSqr, fA7 // Polynomial tail nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fms.s1 fRes1Hd = f8, fA1H, fRes1H // x*(A1H+A1L) delta nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fma.s1 fA11 = fA15, fArgFour, fA11 // Polynomial tail nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fma.s1 fA3 = fA7, fArgFour, fA3 // Polynomial tail nop.i 0 } -{ .mfi +{ .mfi nop.m 0 fma.s1 fArgEight = fArgFour, fArgFour, f0 // a^8 nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fma.s1 f8 = fRes1L, f1, fRes1Hd // x*(A1H+A1L) nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fma.s1 fRes = fA11, fArgEight, fA3 //Polynomial tail result nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fma.s1 f8 = fRes, fArgCube, f8 // (Polynomial tail)*x^3 nop.i 0 };; -{ .mfb +{ .mfb nop.m 0 - fma.s0 f8 = f8, f1, fRes1H // (Polynomial tail)*x^3 + + fma.s0 f8 = f8, f1, fRes1H // (Polynomial tail)*x^3 + // + x*(A1H+A1L) br.ret.sptk b0 // [0;1/8] interval return };; - + GLOBAL_LIBM_END(erfl) diff --git a/sysdeps/ia64/fpu/s_expm1.S b/sysdeps/ia64/fpu/s_expm1.S index 09a22bbbdd..f0b911e295 100644 --- a/sysdeps/ia64/fpu/s_expm1.S +++ b/sysdeps/ia64/fpu/s_expm1.S @@ -70,7 +70,7 @@ // 5. x >= 709.7827 // Result overflows. Set I, O, and call error support // -// 6. 2^-2 <= x < 709.7827 or -48.0 <= x < -2^-2 +// 6. 2^-2 <= x < 709.7827 or -48.0 <= x < -2^-2 // This is the main path. The algorithm is described below: // Take the input x. w is "how many log2/128 in x?" diff --git a/sysdeps/ia64/fpu/s_expm1f.S b/sysdeps/ia64/fpu/s_expm1f.S index 8996977ddb..55264a9875 100644 --- a/sysdeps/ia64/fpu/s_expm1f.S +++ b/sysdeps/ia64/fpu/s_expm1f.S @@ -68,10 +68,10 @@ // Here we know result is essentially -1 + eps, where eps only affects // rounded result. Set I. // -// 5. x >= 88.7228 +// 5. x >= 88.7228 // Result overflows. Set I, O, and call error support // -// 6. 2^-2 <= x < 88.7228 or -24.0 <= x < -2^-2 +// 6. 2^-2 <= x < 88.7228 or -24.0 <= x < -2^-2 // This is the main path. The algorithm is described below: // Take the input x. w is "how many log2/128 in x?" @@ -491,7 +491,7 @@ EXPM1_COMMON: { .mfb nop.m 0 -(p7) fma.s.s0 f8 = fA8765432, fXsq, fNormX // Small path, +(p7) fma.s.s0 f8 = fA8765432, fXsq, fNormX // Small path, // result=xsq*A8765432+x (p7) br.ret.spnt b0 // Exit if 2^-40 <= |x| < 2^-2 } diff --git a/sysdeps/ia64/fpu/s_expm1l.S b/sysdeps/ia64/fpu/s_expm1l.S index a3a6e401e8..63bf39a3c1 100644 --- a/sysdeps/ia64/fpu/s_expm1l.S +++ b/sysdeps/ia64/fpu/s_expm1l.S @@ -21,20 +21,20 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // // History @@ -51,36 +51,36 @@ // 04/17/03 Eliminated misplaced and unused data label // 12/15/03 Eliminated call to error support on expm1l underflow // -//********************************************************************* +//********************************************************************* // // Function: Combined expl(x) and expm1l(x), where -// x +// x // expl(x) = e , for double-extended precision x values // x // expm1l(x) = e - 1 for double-extended precision x values // -//********************************************************************* +//********************************************************************* // // Resources Used: // -// Floating-Point Registers: f8 (Input and Return Value) -// f9-f15,f32-f77 +// Floating-Point Registers: f8 (Input and Return Value) +// f9-f15,f32-f77 // -// General Purpose Registers: +// General Purpose Registers: // r14-r38 // r35-r38 (Used to pass arguments to error handling routine) -// +// // Predicate Registers: p6-p15 // -//********************************************************************* +//********************************************************************* // // IEEE Special Conditions: // -// Denormal fault raised on denormal inputs +// Denormal fault raised on denormal inputs // Overflow exceptions raised when appropriate for exp and expm1 // Underflow exceptions raised when appropriate for exp and expm1 // (Error Handling Routine called for overflow and Underflow) -// Inexact raised when appropriate by algorithm +// Inexact raised when appropriate by algorithm // // exp(inf) = inf // exp(-inf) = +0 @@ -89,13 +89,13 @@ // exp(0) = 1 // exp(EM_special Values) = QNaN // exp(inf) = inf -// expm1(-inf) = -1 +// expm1(-inf) = -1 // expm1(SNaN) = QNaN // expm1(QNaN) = QNaN // expm1(0) = 0 // expm1(EM_special Values) = QNaN -// -//********************************************************************* +// +//********************************************************************* // // Implementation and Algorithm Notes: // @@ -109,36 +109,36 @@ // p6 for exp, // p7 for expm1, // -// On output, +// On output, // // scale*(Y_hi + Y_lo) approximates exp(X) if exp // scale*(Y_hi + Y_lo) approximates exp(X)-1 if expm1 // // The accuracy is sufficient for a highly accurate 64 sig. -// bit implementation. Safe is set if there is no danger of -// overflow/underflow when the result is composed from scale, -// Y_hi and Y_lo. Thus, we can have a fast return if Safe is set. -// Otherwise, one must prepare to handle the possible exception -// appropriately. Note that SAFE not set (false) does not mean +// bit implementation. Safe is set if there is no danger of +// overflow/underflow when the result is composed from scale, +// Y_hi and Y_lo. Thus, we can have a fast return if Safe is set. +// Otherwise, one must prepare to handle the possible exception +// appropriately. Note that SAFE not set (false) does not mean // that overflow/underflow will occur; only the setting of SAFE // guarantees the opposite. // -// **** High Level Overview **** +// **** High Level Overview **** // // The method consists of three cases. -// +// // If |X| < Tiny use case exp_tiny; // else if |X| < 2^(-m) use case exp_small; m=12 for exp, m=7 for expm1 // else use case exp_regular; // // Case exp_tiny: // -// 1 + X can be used to approximate exp(X) +// 1 + X can be used to approximate exp(X) // X + X^2/2 can be used to approximate exp(X) - 1 // // Case exp_small: // -// Here, exp(X) and exp(X) - 1 can all be +// Here, exp(X) and exp(X) - 1 can all be // approximated by a relatively simple polynomial. // // This polynomial resembles the truncated Taylor series @@ -175,9 +175,9 @@ // r := (X - N*L_hi) - N*L_lo // // We pick L_hi such that N*L_hi is representable in 64 sig. bits -// and thus the FMA X - N*L_hi is error free. So r is the -// 1 rounding error from an exact reduction with respect to -// +// and thus the FMA X - N*L_hi is error free. So r is the +// 1 rounding error from an exact reduction with respect to +// // L_hi + L_lo. // // In particular, L_hi has 30 significant bit and can be stored @@ -187,10 +187,10 @@ // Step 2: Approximation // // exp(r) - 1 is approximated by a short polynomial of the form -// +// // r + A_1 r^2 + A_2 r^3 + A_3 r^4 . // -// Step 3: Composition from Table Values +// Step 3: Composition from Table Values // // The value 2^( N / 2^12 ) can be composed from a couple of tables // of precalculated values. First, express N as three integers @@ -203,8 +203,8 @@ // lsb's, M_1 is the next 6, and K is simply N shifted right // arithmetically (sign extended) by 12 bits. // -// Now, 2^( N / 2^12 ) is simply -// +// Now, 2^( N / 2^12 ) is simply +// // 2^K * 2^( M_1 / 2^6 ) * 2^( M_2 / 2^12 ) // // Clearly, 2^K needs no tabulation. The other two values are less @@ -215,14 +215,14 @@ // Define two mathematical values, delta_1 and delta_2, implicitly // such that // -// T_1 = exp( [M_1 log(2)/2^6] - delta_1 ) +// T_1 = exp( [M_1 log(2)/2^6] - delta_1 ) // T_2 = exp( [M_2 log(2)/2^12] - delta_2 ) // // are representable as 24 significant bits. To illustrate the idea, -// we show how we define delta_1: +// we show how we define delta_1: // // T_1 := round_to_24_bits( exp( M_1 log(2)/2^6 ) ) -// delta_1 = (M_1 log(2)/2^6) - log( T_1 ) +// delta_1 = (M_1 log(2)/2^6) - log( T_1 ) // // The last equality means mathematical equality. We then tabulate // @@ -235,7 +235,7 @@ // T and W via // // T := T_1 * T_2 ...exactly -// W := W_1 + (1 + W_1)*W_2 +// W := W_1 + (1 + W_1)*W_2 // // W approximates exp( delta ) - 1 where delta = delta_1 + delta_2. // The mathematical product of T and (W+1) is an accurate representation @@ -243,17 +243,17 @@ // // Step 4. Reconstruction // -// Finally, we can reconstruct exp(X), exp(X) - 1. +// Finally, we can reconstruct exp(X), exp(X) - 1. // Because // -// X = K * log(2) + (M_1*log(2)/2^6 - delta_1) +// X = K * log(2) + (M_1*log(2)/2^6 - delta_1) // + (M_2*log(2)/2^12 - delta_2) // + delta_1 + delta_2 + r ...accurately // We have // // exp(X) ~=~ 2^K * ( T + T*[exp(delta_1+delta_2+r) - 1] ) // ~=~ 2^K * ( T + T*[exp(delta + r) - 1] ) -// ~=~ 2^K * ( T + T*[(exp(delta)-1) +// ~=~ 2^K * ( T + T*[(exp(delta)-1) // + exp(delta)*(exp(r)-1)] ) // ~=~ 2^K * ( T + T*( W + (1+W)*poly(r) ) ) // ~=~ 2^K * ( Y_hi + Y_lo ) @@ -265,7 +265,7 @@ // exp(X)-1 ~=~ 2^K * ( Y_hi + Y_lo ) - 1 // ~=~ 2^K * ( Y_hi + Y_lo - 2^(-K) ) // -// and we combine Y_hi + Y_lo - 2^(-N) into the form of two +// and we combine Y_hi + Y_lo - 2^(-N) into the form of two // numbers Y_hi + Y_lo carefully. // // **** Algorithm Details **** @@ -276,8 +276,8 @@ // // Case exp_tiny: // -// The important points are to ensure an accurate result under -// different rounding directions and a correct setting of the SAFE +// The important points are to ensure an accurate result under +// different rounding directions and a correct setting of the SAFE // flag. // // If expm1 is 1, then @@ -296,11 +296,11 @@ // Here we compute a simple polynomial. To exploit parallelism, we split // the polynomial into several portions. // -// Let r = X +// Let r = X // // If exp ...i.e. exp( argument ) // -// rsq := r * r; +// rsq := r * r; // r4 := rsq*rsq // poly_lo := P_3 + r*(P_4 + r*(P_5 + r*P_6)) // poly_hi := r + rsq*(P_1 + r*P_2) @@ -390,7 +390,7 @@ GR_SAVE_GP = r34 GR_Parameter_X = r35 GR_Parameter_Y = r36 GR_Parameter_RESULT = r37 -GR_Parameter_TAG = r38 +GR_Parameter_TAG = r38 // Floating Point Registers // @@ -480,25 +480,25 @@ FR_RESULT = f15 // double-extended 1/ln(2) // 3fff b8aa 3b29 5c17 f0bb be87fed0691d3e88 -// 3fff b8aa 3b29 5c17 f0bc +// 3fff b8aa 3b29 5c17 f0bc // For speed the significand will be loaded directly with a movl and setf.sig // and the exponent will be bias+63 instead of bias+0. Thus subsequent // computations need to scale appropriately. -// The constant 2^12/ln(2) is needed for the computation of N. This is also +// The constant 2^12/ln(2) is needed for the computation of N. This is also // obtained by scaling the computations. // -// Two shifting constants are loaded directly with movl and setf.d. -// 1. RSHF_2TO51 = 1.1000..00 * 2^(63-12) +// Two shifting constants are loaded directly with movl and setf.d. +// 1. RSHF_2TO51 = 1.1000..00 * 2^(63-12) // This constant is added to x*1/ln2 to shift the integer part of // x*2^12/ln2 into the rightmost bits of the significand. // The result of this fma is N_signif. -// 2. RSHF = 1.1000..00 * 2^(63) +// 2. RSHF = 1.1000..00 * 2^(63) // This constant is subtracted from N_signif * 2^(-51) to give // the integer part of N, N_fix, as a floating-point number. // The result of this fms is float_N. RODATA -.align 64 +.align 64 LOCAL_OBJECT_START(Constants_exp_64_Arg) //data8 0xB8AA3B295C17F0BC,0x0000400B // Inv_L = 2^12/log(2) data8 0xB17217F400000000,0x00003FF2 // L_hi = hi part log(2)/2^12 @@ -538,8 +538,8 @@ data8 0x8000000000000000, 0x00003FFE // Q1 LOCAL_OBJECT_END(Constants_exp_64_Q) LOCAL_OBJECT_START(Constants_exp_64_T1) -data4 0x3F800000,0x3F8164D2,0x3F82CD87,0x3F843A29 -data4 0x3F85AAC3,0x3F871F62,0x3F88980F,0x3F8A14D5 +data4 0x3F800000,0x3F8164D2,0x3F82CD87,0x3F843A29 +data4 0x3F85AAC3,0x3F871F62,0x3F88980F,0x3F8A14D5 data4 0x3F8B95C2,0x3F8D1ADF,0x3F8EA43A,0x3F9031DC data4 0x3F91C3D3,0x3F935A2B,0x3F94F4F0,0x3F96942D data4 0x3F9837F0,0x3F99E046,0x3F9B8D3A,0x3F9D3EDA @@ -557,21 +557,21 @@ data4 0x3FF5257D,0x3FF7D0DF,0x3FFA83B3,0x3FFD3E0C LOCAL_OBJECT_END(Constants_exp_64_T1) LOCAL_OBJECT_START(Constants_exp_64_T2) -data4 0x3F800000,0x3F80058C,0x3F800B18,0x3F8010A4 -data4 0x3F801630,0x3F801BBD,0x3F80214A,0x3F8026D7 -data4 0x3F802C64,0x3F8031F2,0x3F803780,0x3F803D0E -data4 0x3F80429C,0x3F80482B,0x3F804DB9,0x3F805349 -data4 0x3F8058D8,0x3F805E67,0x3F8063F7,0x3F806987 -data4 0x3F806F17,0x3F8074A8,0x3F807A39,0x3F807FCA -data4 0x3F80855B,0x3F808AEC,0x3F80907E,0x3F809610 -data4 0x3F809BA2,0x3F80A135,0x3F80A6C7,0x3F80AC5A -data4 0x3F80B1ED,0x3F80B781,0x3F80BD14,0x3F80C2A8 -data4 0x3F80C83C,0x3F80CDD1,0x3F80D365,0x3F80D8FA -data4 0x3F80DE8F,0x3F80E425,0x3F80E9BA,0x3F80EF50 -data4 0x3F80F4E6,0x3F80FA7C,0x3F810013,0x3F8105AA -data4 0x3F810B41,0x3F8110D8,0x3F81166F,0x3F811C07 -data4 0x3F81219F,0x3F812737,0x3F812CD0,0x3F813269 -data4 0x3F813802,0x3F813D9B,0x3F814334,0x3F8148CE +data4 0x3F800000,0x3F80058C,0x3F800B18,0x3F8010A4 +data4 0x3F801630,0x3F801BBD,0x3F80214A,0x3F8026D7 +data4 0x3F802C64,0x3F8031F2,0x3F803780,0x3F803D0E +data4 0x3F80429C,0x3F80482B,0x3F804DB9,0x3F805349 +data4 0x3F8058D8,0x3F805E67,0x3F8063F7,0x3F806987 +data4 0x3F806F17,0x3F8074A8,0x3F807A39,0x3F807FCA +data4 0x3F80855B,0x3F808AEC,0x3F80907E,0x3F809610 +data4 0x3F809BA2,0x3F80A135,0x3F80A6C7,0x3F80AC5A +data4 0x3F80B1ED,0x3F80B781,0x3F80BD14,0x3F80C2A8 +data4 0x3F80C83C,0x3F80CDD1,0x3F80D365,0x3F80D8FA +data4 0x3F80DE8F,0x3F80E425,0x3F80E9BA,0x3F80EF50 +data4 0x3F80F4E6,0x3F80FA7C,0x3F810013,0x3F8105AA +data4 0x3F810B41,0x3F8110D8,0x3F81166F,0x3F811C07 +data4 0x3F81219F,0x3F812737,0x3F812CD0,0x3F813269 +data4 0x3F813802,0x3F813D9B,0x3F814334,0x3F8148CE data4 0x3F814E68,0x3F815402,0x3F81599C,0x3F815F37 LOCAL_OBJECT_END(Constants_exp_64_T2) @@ -652,14 +652,14 @@ GLOBAL_IEEE754_ENTRY(expm1l) // // Set p7 true for expm1, p6 false -// +// { .mlx getf.exp GR_signexp_x = f8 // Get sign and exponent of x, redo if unorm movl GR_sig_inv_ln2 = 0xb8aa3b295c17f0bc // significand of 1/ln2 } { .mlx - addl GR_ad_Arg = @ltoff(Constants_exp_64_Arg#),gp + addl GR_ad_Arg = @ltoff(Constants_exp_64_Arg#),gp movl GR_rshf_2to51 = 0x4718000000000000 // 1.10000 2^(63+51) } ;; @@ -667,12 +667,12 @@ GLOBAL_IEEE754_ENTRY(expm1l) { .mfi ld8 GR_ad_Arg = [GR_ad_Arg] // Point to Arg table fclass.m p8, p0 = f8, 0x1E7 // Test x for natval, nan, inf, zero - cmp.eq p7, p6 = r0, r0 + cmp.eq p7, p6 = r0, r0 } { .mfb mov GR_exp_half = 0x0FFFE // Exponent of 0.5, for very small path fnorm.s1 FR_norm_x = f8 // Normalize x - br.cond.sptk exp_continue + br.cond.sptk exp_continue } ;; @@ -682,13 +682,13 @@ GLOBAL_IEEE754_END(expm1l) GLOBAL_IEEE754_ENTRY(expl) // // Set p7 false for exp, p6 true -// +// { .mlx getf.exp GR_signexp_x = f8 // Get sign and exponent of x, redo if unorm movl GR_sig_inv_ln2 = 0xb8aa3b295c17f0bc // significand of 1/ln2 } { .mlx - addl GR_ad_Arg = @ltoff(Constants_exp_64_Arg#),gp + addl GR_ad_Arg = @ltoff(Constants_exp_64_Arg#),gp movl GR_rshf_2to51 = 0x4718000000000000 // 1.10000 2^(63+51) } ;; @@ -705,9 +705,9 @@ GLOBAL_IEEE754_ENTRY(expl) } ;; -exp_continue: +exp_continue: // Form two constants we need -// 1/ln2 * 2^63 to compute w = x * 1/ln2 * 128 +// 1/ln2 * 2^63 to compute w = x * 1/ln2 * 128 // 1.1000..000 * 2^(63+63-12) to right shift int(N) into the significand { .mfi @@ -832,7 +832,7 @@ exp_continue: // Now we are on the main path for |x| >= 2^-m, m=12 for exp, m=7 for expm1 // -// float_N = round_int(N_signif) +// float_N = round_int(N_signif) // The signficand of N_signif contains the rounded integer part of X * 2^12/ln2, // as a twos complement number in the lower bits (that is, it may be negative). // That twos complement number (called N) is put into GR_N. @@ -934,7 +934,7 @@ exp_continue: ;; { .mfi -(p7) cmp.lt.unc p8, p9 = 10, GR_K // If expm1, set p8 if K > 10 +(p7) cmp.lt.unc p8, p9 = 10, GR_K // If expm1, set p8 if K > 10 fma.s1 FR_poly = FR_r, FR_poly, FR_A1 // poly = r * poly + A1 nop.i 999 } @@ -1033,8 +1033,8 @@ exp_continue: } ;; - -EXP_SMALL: + +EXP_SMALL: // Here if 2^-60 < |x| < 2^-m, m=12 for exp, m=7 for expm1 { .mfi (p7) ldfe FR_Q3 = [GR_ad_Q],16 // Get Q3 for small path, if expm1 @@ -1146,7 +1146,7 @@ EXP_SMALL: ;; -EXP_VERY_SMALL: +EXP_VERY_SMALL: // // Here if 0 < |x| < 2^-60 // If exp, result = 1.0 + x @@ -1224,8 +1224,8 @@ EXP_CERTAIN_UNDERFLOW_ZERO: (p7) br.ret.sptk b0 // If expm1, exit } ;; - - + + EXP_OVERFLOW: // Here if x >= min_oflow_x { .mmi @@ -1309,7 +1309,7 @@ EXP_POSSIBLE_UNDERFLOW: ;; -EXP_64_SPECIAL: +EXP_64_SPECIAL: // Here if x natval, nan, inf, zero // If x natval, +inf, or if expm1 and x zero, just return x. // The other cases must be tested for, and results set. @@ -1367,7 +1367,7 @@ EXP_64_SPECIAL: ;; -EXP_64_UNSUPPORTED: +EXP_64_UNSUPPORTED: // Here if x unsupported type { .mfb nop.m 999 diff --git a/sysdeps/ia64/fpu/s_fabs.S b/sysdeps/ia64/fpu/s_fabs.S index 3434389a3c..8bbdf9b084 100644 --- a/sysdeps/ia64/fpu/s_fabs.S +++ b/sysdeps/ia64/fpu/s_fabs.S @@ -21,25 +21,25 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // // History //============================================================== -// 02/02/00 Initial version +// 02/02/00 Initial version // 02/07/02 Added __libm_fabs entry point to test in case compiler inlines // 05/20/02 Cleaned up namespace and sf0 syntax // 02/10/03 Reordered header: .section, .global, .proc, .align @@ -50,7 +50,7 @@ // // Overview of operation //============================================================== -// returns absolute value of x +// returns absolute value of x // floating-point registers used: 1 // f8, input @@ -69,14 +69,14 @@ GLOBAL_IEEE754_ENTRY(fabs) { .mfi nop.m 999 - fcmp.eq.unc.s0 p6,p7 = f8,f1 + fcmp.eq.unc.s0 p6,p7 = f8,f1 nop.i 999 ;; } { .mfb nop.m 999 - fmerge.s f8 = f0,f8 - br.ret.sptk b0 ;; + fmerge.s f8 = f0,f8 + br.ret.sptk b0 ;; } GLOBAL_IEEE754_END(fabs) diff --git a/sysdeps/ia64/fpu/s_fabsf.S b/sysdeps/ia64/fpu/s_fabsf.S index 71bb6da882..546865fadc 100644 --- a/sysdeps/ia64/fpu/s_fabsf.S +++ b/sysdeps/ia64/fpu/s_fabsf.S @@ -21,25 +21,25 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // // History //============================================================== -// 02/02/00 Initial version +// 02/02/00 Initial version // 02/07/02 Added __libm_fabsf entry point to test in case compiler inlines // 05/20/02 Cleaned up namespace and sf0 syntax // 02/10/03 Reordered header: .section, .global, .proc, .align @@ -50,7 +50,7 @@ // // Overview of operation //============================================================== -// returns absolute value of x +// returns absolute value of x // floating-point registers used: 1 // f8, input @@ -69,14 +69,14 @@ GLOBAL_IEEE754_ENTRY(fabsf) { .mfi nop.m 999 - fcmp.eq.unc.s0 p6,p7 = f8,f1 + fcmp.eq.unc.s0 p6,p7 = f8,f1 nop.i 999 ;; } { .mfb nop.m 999 - fmerge.s f8 = f0,f8 - br.ret.sptk b0 ;; + fmerge.s f8 = f0,f8 + br.ret.sptk b0 ;; } GLOBAL_IEEE754_END(fabsf) diff --git a/sysdeps/ia64/fpu/s_fabsl.S b/sysdeps/ia64/fpu/s_fabsl.S index a048949147..3794d19a8a 100644 --- a/sysdeps/ia64/fpu/s_fabsl.S +++ b/sysdeps/ia64/fpu/s_fabsl.S @@ -21,25 +21,25 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // // History //============================================================== -// 02/02/00 Initial version +// 02/02/00 Initial version // 02/07/02 Added __libm_fabsl entry point to test in case compiler inlines // 05/20/02 Cleaned up namespace and sf0 syntax // 02/10/03 Reordered header: .section, .global, .proc, .align @@ -50,7 +50,7 @@ // // Overview of operation //============================================================== -// returns absolute value of x +// returns absolute value of x // floating-point registers used: 1 // f8, input @@ -69,14 +69,14 @@ GLOBAL_IEEE754_ENTRY(fabsl) { .mfi nop.m 999 - fcmp.eq.unc.s0 p6,p7 = f8,f1 + fcmp.eq.unc.s0 p6,p7 = f8,f1 nop.i 999 ;; } { .mfb nop.m 999 - fmerge.s f8 = f0,f8 - br.ret.sptk b0 ;; + fmerge.s f8 = f0,f8 + br.ret.sptk b0 ;; } GLOBAL_IEEE754_END(fabsl) diff --git a/sysdeps/ia64/fpu/s_finite.S b/sysdeps/ia64/fpu/s_finite.S index 78d3db5035..664f815426 100644 --- a/sysdeps/ia64/fpu/s_finite.S +++ b/sysdeps/ia64/fpu/s_finite.S @@ -30,7 +30,7 @@ ENTRY (__finite) (p6) mov ret0 = 0 (p7) mov ret0 = 1 br.ret.sptk.many rp -} +} END (__finite) strong_alias (__finite, __finitef) diff --git a/sysdeps/ia64/fpu/s_fma.S b/sysdeps/ia64/fpu/s_fma.S index 7798790d50..556f82a0d0 100644 --- a/sysdeps/ia64/fpu/s_fma.S +++ b/sysdeps/ia64/fpu/s_fma.S @@ -21,25 +21,25 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // // History //============================================================== -// 06/07/01 Initial version +// 06/07/01 Initial version // 05/20/02 Cleaned up namespace and sf0 syntax // 02/10/03 Reordered header: .section, .global, .proc, .align // @@ -64,7 +64,7 @@ GLOBAL_LIBM_ENTRY(fma) { .mfb nop.m 999 fma.d.s0 f8 = f8, f9, f10 // Result = x * y + z - br.ret.sptk b0 + br.ret.sptk b0 } ;; diff --git a/sysdeps/ia64/fpu/s_fmaf.S b/sysdeps/ia64/fpu/s_fmaf.S index db112b2a6c..132467593a 100644 --- a/sysdeps/ia64/fpu/s_fmaf.S +++ b/sysdeps/ia64/fpu/s_fmaf.S @@ -21,25 +21,25 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // // History //============================================================== -// 06/07/01 Initial version +// 06/07/01 Initial version // 05/20/02 Cleaned up namespace and sf0 syntax // 02/10/03 Reordered header: .section, .global, .proc, .align // @@ -64,7 +64,7 @@ GLOBAL_LIBM_ENTRY(fmaf) { .mfb nop.m 999 fma.s.s0 f8 = f8, f9, f10 // Result = x * y + z - br.ret.sptk b0 + br.ret.sptk b0 } ;; diff --git a/sysdeps/ia64/fpu/s_fmal.S b/sysdeps/ia64/fpu/s_fmal.S index 2bdef0b3ed..979fa9fb16 100644 --- a/sysdeps/ia64/fpu/s_fmal.S +++ b/sysdeps/ia64/fpu/s_fmal.S @@ -21,25 +21,25 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // // History //============================================================== -// 06/07/01 Initial version +// 06/07/01 Initial version // 05/20/02 Cleaned up namespace and sf0 syntax // 02/10/03 Reordered header: .section, .global, .proc, .align // @@ -64,7 +64,7 @@ GLOBAL_LIBM_ENTRY(fmal) { .mfb nop.m 999 fma.s0 f8 = f8, f9, f10 // Result = x * y + z - br.ret.sptk b0 + br.ret.sptk b0 } ;; diff --git a/sysdeps/ia64/fpu/s_fmax.S b/sysdeps/ia64/fpu/s_fmax.S index 6fd38dfe9d..bf0897457b 100644 --- a/sysdeps/ia64/fpu/s_fmax.S +++ b/sysdeps/ia64/fpu/s_fmax.S @@ -21,25 +21,25 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // // History //============================================================== -// 05/31/01 Initial version +// 05/31/01 Initial version // 05/20/02 Cleaned up namespace and sf0 syntax // 02/10/03 Reordered header: .section, .global, .proc, .align // @@ -50,7 +50,7 @@ // Overview of operation //============================================================== // returns the algebraic maximum of 2 input values -// +// // Special cases: // fmax(x, nan) returns x if x is numeric // Must special case this one // fmax(nan, y) returns y if y is numeric @@ -59,7 +59,7 @@ // fmax(-0,+0) returns +0 // fmax(-0,-0) returns -0 // fmax(+0,-0) returns +0 // Must special case this one -// +// // SNaN causes invalid to be set // floating-point registers used: 2 @@ -107,7 +107,7 @@ GLOBAL_LIBM_ENTRY(fmax) { .mfb nop.m 999 (p10) fmerge.s f8 = f9, f9 // If x nan, return y, else do nothing (returns x) - br.ret.sptk b0 + br.ret.sptk b0 } ;; diff --git a/sysdeps/ia64/fpu/s_fmaxf.S b/sysdeps/ia64/fpu/s_fmaxf.S index cac283c66a..30a78c708b 100644 --- a/sysdeps/ia64/fpu/s_fmaxf.S +++ b/sysdeps/ia64/fpu/s_fmaxf.S @@ -21,25 +21,25 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // // History //============================================================== -// 05/31/01 Initial version +// 05/31/01 Initial version // 05/20/02 Cleaned up namespace and sf0 syntax // 02/10/03 Reordered header: .section, .global, .proc, .align // @@ -50,7 +50,7 @@ // Overview of operation //============================================================== // returns the algebraic maximum of 2 input values -// +// // Special cases: // fmaxf(x, nan) returns x if x is numeric // Must special case this one // fmaxf(nan, y) returns y if y is numeric @@ -59,7 +59,7 @@ // fmaxf(-0,+0) returns +0 // fmaxf(-0,-0) returns -0 // fmaxf(+0,-0) returns +0 // Must special case this one -// +// // SNaN causes invalid to be set // floating-point registers used: 2 @@ -107,7 +107,7 @@ GLOBAL_LIBM_ENTRY(fmaxf) { .mfb nop.m 999 (p10) fmerge.s f8 = f9, f9 // If x nan, return y, else do nothing (returns x) - br.ret.sptk b0 + br.ret.sptk b0 } ;; diff --git a/sysdeps/ia64/fpu/s_fmaxl.S b/sysdeps/ia64/fpu/s_fmaxl.S index fb8861dcdf..a575cf00eb 100644 --- a/sysdeps/ia64/fpu/s_fmaxl.S +++ b/sysdeps/ia64/fpu/s_fmaxl.S @@ -21,25 +21,25 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // // History //============================================================== -// 05/31/01 Initial version +// 05/31/01 Initial version // 05/20/02 Cleaned up namespace and sf0 syntax // 02/10/03 Reordered header: .section, .global, .proc, .align // @@ -50,7 +50,7 @@ // Overview of operation //============================================================== // returns the algebraic maximum of 2 input values -// +// // Special cases: // fmaxl(x, nan) returns x if x is numeric // Must special case this one // fmaxl(nan, y) returns y if y is numeric @@ -59,7 +59,7 @@ // fmaxl(-0,+0) returns +0 // fmaxl(-0,-0) returns -0 // fmaxl(+0,-0) returns +0 // Must special case this one -// +// // SNaN causes invalid to be set // floating-point registers used: 2 @@ -107,7 +107,7 @@ GLOBAL_LIBM_ENTRY(fmaxl) { .mfb nop.m 999 (p10) fmerge.s f8 = f9, f9 // If x nan, return y, else do nothing (returns x) - br.ret.sptk b0 + br.ret.sptk b0 } ;; diff --git a/sysdeps/ia64/fpu/s_fpclassify.S b/sysdeps/ia64/fpu/s_fpclassify.S index a9df24a57f..eeab32d6c0 100644 --- a/sysdeps/ia64/fpu/s_fpclassify.S +++ b/sysdeps/ia64/fpu/s_fpclassify.S @@ -32,7 +32,7 @@ ENTRY (__fpclassify) (p7) fclass.m p7, p8 = farg0, @inf (p6) br.ret.sptk.many rp ;; -} +} { .mfb (p7) mov ret0 = 1 diff --git a/sysdeps/ia64/fpu/s_frexp.c b/sysdeps/ia64/fpu/s_frexp.c index 7d90213d63..95421eafdd 100644 --- a/sysdeps/ia64/fpu/s_frexp.c +++ b/sysdeps/ia64/fpu/s_frexp.c @@ -23,12 +23,12 @@ // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS @@ -53,12 +53,12 @@ double __libm_frexp(double, int*, int); double frexp(double x, int *y) { -#ifdef SIZE_INT_64 +#ifdef SIZE_INT_64 return( __libm_frexp(x, y, 1) ); #else -#ifdef SIZE_INT_32 +#ifdef SIZE_INT_32 return( __libm_frexp(x, y, 0) ); #endif diff --git a/sysdeps/ia64/fpu/s_frexpf.c b/sysdeps/ia64/fpu/s_frexpf.c index 920f09d4a4..03290b2846 100644 --- a/sysdeps/ia64/fpu/s_frexpf.c +++ b/sysdeps/ia64/fpu/s_frexpf.c @@ -23,12 +23,12 @@ // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS @@ -53,12 +53,12 @@ float __libm_frexpf(float, int*, int); float frexpf(float x, int *y) { -#ifdef SIZE_INT_64 +#ifdef SIZE_INT_64 return( __libm_frexpf(x, y, 1) ); #else -#ifdef SIZE_INT_32 +#ifdef SIZE_INT_32 return( __libm_frexpf(x, y, 0) ); #endif diff --git a/sysdeps/ia64/fpu/s_frexpl.c b/sysdeps/ia64/fpu/s_frexpl.c index 968cc3269c..f999e20361 100644 --- a/sysdeps/ia64/fpu/s_frexpl.c +++ b/sysdeps/ia64/fpu/s_frexpl.c @@ -23,12 +23,12 @@ // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS @@ -53,12 +53,12 @@ long double __libm_frexpl(long double, int*, int); long double frexpl(long double x, int *y) { -#ifdef SIZE_INT_64 +#ifdef SIZE_INT_64 return( __libm_frexpl(x, y, 1) ); #else -#ifdef SIZE_INT_32 +#ifdef SIZE_INT_32 return( __libm_frexpl(x, y, 0) ); #endif diff --git a/sysdeps/ia64/fpu/s_ldexp.c b/sysdeps/ia64/fpu/s_ldexp.c index a0bc14c295..6cf0ffc083 100644 --- a/sysdeps/ia64/fpu/s_ldexp.c +++ b/sysdeps/ia64/fpu/s_ldexp.c @@ -23,12 +23,12 @@ // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS @@ -48,11 +48,11 @@ double __libm_ldexp(double, int, int); double ldexp(double x, int n) { -#ifdef SIZE_INT_64 - return __libm_ldexp(x,n,1); +#ifdef SIZE_INT_64 + return __libm_ldexp(x,n,1); #else -#ifdef SIZE_INT_32 +#ifdef SIZE_INT_32 return __libm_ldexp(x,n,0); #endif diff --git a/sysdeps/ia64/fpu/s_ldexpf.c b/sysdeps/ia64/fpu/s_ldexpf.c index ad083fa1c5..64e335b0ec 100644 --- a/sysdeps/ia64/fpu/s_ldexpf.c +++ b/sysdeps/ia64/fpu/s_ldexpf.c @@ -23,12 +23,12 @@ // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS @@ -48,11 +48,11 @@ float __libm_ldexpf(float, int, int); float ldexpf(float x, int n) { -#ifdef SIZE_INT_64 - return __libm_ldexpf(x,n,1); +#ifdef SIZE_INT_64 + return __libm_ldexpf(x,n,1); #else -#ifdef SIZE_INT_32 +#ifdef SIZE_INT_32 return __libm_ldexpf(x,n,0); #endif diff --git a/sysdeps/ia64/fpu/s_ldexpl.c b/sysdeps/ia64/fpu/s_ldexpl.c index 61dfd21f13..aa6f2d7642 100644 --- a/sysdeps/ia64/fpu/s_ldexpl.c +++ b/sysdeps/ia64/fpu/s_ldexpl.c @@ -23,12 +23,12 @@ // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS @@ -48,11 +48,11 @@ long double __libm_ldexpl(long double, int, int); long double ldexpl(long double x, int n) { -#ifdef SIZE_INT_64 - return __libm_ldexpl(x,n,1); +#ifdef SIZE_INT_64 + return __libm_ldexpl(x,n,1); #else -#ifdef SIZE_INT_32 +#ifdef SIZE_INT_32 return __libm_ldexpl(x,n,0); #endif diff --git a/sysdeps/ia64/fpu/s_log1pl.S b/sysdeps/ia64/fpu/s_log1pl.S index 9654265004..f60ce1268f 100644 --- a/sysdeps/ia64/fpu/s_log1pl.S +++ b/sysdeps/ia64/fpu/s_log1pl.S @@ -1,4 +1,4 @@ -.file "log1pl.s" +.file "log1pl.s" // Copyright (c) 2000 - 2003, Intel Corporation @@ -21,25 +21,25 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // //********************************************************************* // -// History: +// History: // 02/02/00 Initial version // 04/04/00 Unwind support added // 08/15/00 Bundle added after call to __libm_error_support to properly @@ -74,14 +74,14 @@ // IEEE Special Conditions: // // Denormal fault raised on denormal inputs -// Overflow exceptions cannot occur -// Underflow exceptions raised when appropriate for log1p +// Overflow exceptions cannot occur +// Underflow exceptions raised when appropriate for log1p // Inexact raised when appropriate by algorithm // // log1pl(inf) = inf -// log1pl(-inf) = QNaN -// log1pl(+/-0) = +/-0 -// log1pl(-1) = -inf +// log1pl(-inf) = QNaN +// log1pl(+/-0) = +/-0 +// log1pl(-1) = -inf // log1pl(SNaN) = QNaN // log1pl(QNaN) = QNaN // log1pl(EM_special Values) = QNaN @@ -105,11 +105,11 @@ // log1pl( X ) = log( X+1 ) can be approximated by a simple polynomial // in W = X. This polynomial resembles the truncated Taylor // series W - W^/2 + W^3/3 - ... -// +// // Case log_regular: // // Here we use a table lookup method. The basic idea is that in -// order to compute logl(Arg) = log1pl (Arg-1) for an argument Arg in [1,2), +// order to compute logl(Arg) = log1pl (Arg-1) for an argument Arg in [1,2), // we construct a value G such that G*Arg is close to 1 and that // logl(1/G) is obtainable easily from a table of values calculated // beforehand. Thus @@ -137,7 +137,7 @@ // G := G_1 * G_2 * G_3 // r := (G * S_hi - 1) + G * S_lo // -// These G_j's have the property that the product is exactly +// These G_j's have the property that the product is exactly // representable and that |r| < 2^(-12) as a result. // // Step 2: Approximation @@ -160,8 +160,8 @@ // // Although log1pl(X) is basically X, we would like to preserve the inexactness // nature as well as consistent behavior under different rounding modes. -// We can do this by computing the result as -// +// We can do this by computing the result as +// // log1pl(X) = X - X*X // // @@ -169,7 +169,7 @@ // // Here we compute a simple polynomial. To exploit parallelism, we split // the polynomial into two portions. -// +// // W := X // Wsq := W * W // W4 := Wsq*Wsq @@ -226,7 +226,7 @@ // with 1.0000 in fixed point. // // -// Define A_2 := 1.0 0 0 0 d_5 d_6 d_7 d_8. This is X_1 +// Define A_2 := 1.0 0 0 0 d_5 d_6 d_7 d_8. This is X_1 // truncated to lsb = 2^(-8). Similar to A_1, // A_2 is not needed in actual implementation. It // helps explain how some of the values are defined. @@ -255,11 +255,11 @@ // Fetch G_3 := (1/A_3) truncated to 21 sig. bits. // floating pt. Fetch is done using index_3. // -// Compute G := G_1 * G_2 * G_3. +// Compute G := G_1 * G_2 * G_3. // // This is done exactly since each of G_j only has 21 sig. bits. // -// Compute +// Compute // // r := (G*S_hi - 1) + G*S_lo using 2 FMA operations. // @@ -298,7 +298,7 @@ // Finally // // Y_hi := N*log2_hi + SUM ( log1byGj_hi ) -// Y_lo := poly_hi + [ poly_lo + +// Y_lo := poly_hi + [ poly_lo + // ( SUM ( log1byGj_lo ) + N*log2_lo ) ] // @@ -307,7 +307,7 @@ RODATA // ************* DO NOT CHANGE THE ORDER OF THESE TABLES ************* -// P_8, P_7, P_6, P_5, P_4, P_3, P_2, and P_1 +// P_8, P_7, P_6, P_5, P_4, P_3, P_2, and P_1 LOCAL_OBJECT_START(Constants_P) //data4 0xEFD62B15,0xE3936754,0x00003FFB,0x00000000 @@ -328,15 +328,15 @@ data8 0xAAAAAAAAAAAAAAAA,0x00003FFD data8 0xFFFFFFFFFFFFFFFE,0x0000BFFD LOCAL_OBJECT_END(Constants_P) -// log2_hi, log2_lo, Q_4, Q_3, Q_2, and Q_1 +// log2_hi, log2_lo, Q_4, Q_3, Q_2, and Q_1 LOCAL_OBJECT_START(Constants_Q) -//data4 0x00000000,0xB1721800,0x00003FFE,0x00000000 +//data4 0x00000000,0xB1721800,0x00003FFE,0x00000000 //data4 0x4361C4C6,0x82E30865,0x0000BFE2,0x00000000 //data4 0x328833CB,0xCCCCCAF2,0x00003FFC,0x00000000 //data4 0xA9D4BAFB,0x80000077,0x0000BFFD,0x00000000 //data4 0xAAABE3D2,0xAAAAAAAA,0x00003FFD,0x00000000 -//data4 0xFFFFDAB7,0xFFFFFFFF,0x0000BFFD,0x00000000 +//data4 0xFFFFDAB7,0xFFFFFFFF,0x0000BFFD,0x00000000 data8 0xB172180000000000,0x00003FFE data8 0x82E308654361C4C6,0x0000BFE2 data8 0xCCCCCAF2328833CB,0x00003FFC @@ -356,7 +356,7 @@ LOCAL_OBJECT_END(Constants_1_by_LN10) // Z1 - 16 bit fixed - + LOCAL_OBJECT_START(Constants_Z_1) data4 0x00008000 data4 0x00007879 @@ -471,7 +471,7 @@ data4 0x3F71D488,0x3D693B9D data8 0xBE049391B6B7C239 LOCAL_OBJECT_END(Constants_G_H_h2) -// G3 and H3 - IEEE single and h3 - IEEE double +// G3 and H3 - IEEE single and h3 - IEEE double LOCAL_OBJECT_START(Constants_G_H_h3) data4 0x3F7FFC00,0x38800100 @@ -543,70 +543,70 @@ LOCAL_OBJECT_END(Constants_G_H_h3) // Floating Point Registers -FR_Input_X = f8 +FR_Input_X = f8 -FR_Y_hi = f34 +FR_Y_hi = f34 FR_Y_lo = f35 FR_Scale = f36 -FR_X_Prime = f37 -FR_S_hi = f38 +FR_X_Prime = f37 +FR_S_hi = f38 FR_W = f39 FR_G = f40 FR_H = f41 -FR_wsq = f42 +FR_wsq = f42 FR_w4 = f43 FR_h = f44 -FR_w6 = f45 +FR_w6 = f45 FR_G2 = f46 FR_H2 = f47 FR_poly_lo = f48 -FR_P8 = f49 +FR_P8 = f49 FR_poly_hi = f50 -FR_P7 = f51 -FR_h2 = f52 -FR_rsq = f53 +FR_P7 = f51 +FR_h2 = f52 +FR_rsq = f53 FR_P6 = f54 -FR_r = f55 - -FR_log2_hi = f56 -FR_log2_lo = f57 -FR_p87 = f58 -FR_p876 = f58 -FR_p8765 = f58 -FR_float_N = f59 -FR_Q4 = f60 - -FR_p43 = f61 -FR_p432 = f61 -FR_p4321 = f61 -FR_P4 = f62 -FR_G3 = f63 -FR_H3 = f64 -FR_h3 = f65 - -FR_Q3 = f66 -FR_P3 = f67 -FR_Q2 = f68 -FR_P2 = f69 -FR_1LN10_hi = f70 - -FR_Q1 = f71 -FR_P1 = f72 -FR_1LN10_lo = f73 -FR_P5 = f74 -FR_rcub = f75 - -FR_Output_X_tmp = f76 -FR_Neg_One = f77 -FR_Z = f78 -FR_AA = f79 -FR_BB = f80 -FR_S_lo = f81 -FR_2_to_minus_N = f82 +FR_r = f55 + +FR_log2_hi = f56 +FR_log2_lo = f57 +FR_p87 = f58 +FR_p876 = f58 +FR_p8765 = f58 +FR_float_N = f59 +FR_Q4 = f60 + +FR_p43 = f61 +FR_p432 = f61 +FR_p4321 = f61 +FR_P4 = f62 +FR_G3 = f63 +FR_H3 = f64 +FR_h3 = f65 + +FR_Q3 = f66 +FR_P3 = f67 +FR_Q2 = f68 +FR_P2 = f69 +FR_1LN10_hi = f70 + +FR_Q1 = f71 +FR_P1 = f72 +FR_1LN10_lo = f73 +FR_P5 = f74 +FR_rcub = f75 + +FR_Output_X_tmp = f76 +FR_Neg_One = f77 +FR_Z = f78 +FR_AA = f79 +FR_BB = f80 +FR_S_lo = f81 +FR_2_to_minus_N = f82 FR_X = f8 FR_Y = f0 @@ -616,24 +616,24 @@ FR_RESULT = f76 // General Purpose Registers GR_ad_p = r33 -GR_Index1 = r34 -GR_Index2 = r35 -GR_signif = r36 -GR_X_0 = r37 -GR_X_1 = r38 -GR_X_2 = r39 +GR_Index1 = r34 +GR_Index2 = r35 +GR_signif = r36 +GR_X_0 = r37 +GR_X_1 = r38 +GR_X_2 = r39 GR_minus_N = r39 -GR_Z_1 = r40 -GR_Z_2 = r41 -GR_N = r42 -GR_Bias = r43 -GR_M = r44 -GR_Index3 = r45 -GR_exp_2tom80 = r45 +GR_Z_1 = r40 +GR_Z_2 = r41 +GR_N = r42 +GR_Bias = r43 +GR_M = r44 +GR_Index3 = r45 +GR_exp_2tom80 = r45 GR_ad_p2 = r46 -GR_exp_mask = r47 -GR_exp_2tom7 = r48 -GR_ad_ln10 = r49 +GR_exp_mask = r47 +GR_exp_2tom7 = r48 +GR_ad_ln10 = r49 GR_ad_tbl_1 = r50 GR_ad_tbl_2 = r51 GR_ad_tbl_3 = r52 @@ -769,14 +769,14 @@ GLOBAL_IEEE754_ENTRY(log1pl) // { .mmi ldfe FR_log2_lo = [GR_ad_q],16 // Load log2_lo - sub GR_N = GR_N, GR_Bias + sub GR_N = GR_N, GR_Bias mov GR_exp_2tom80 = 0x0ffaf // Exponent of 2^-80 } ;; { .mfi ldfe FR_Q4 = [GR_ad_q],16 // Load Q4 - fms.s1 FR_S_lo = FR_AA, f1, FR_Z // Form S_lo = AA - Z + fms.s1 FR_S_lo = FR_AA, f1, FR_Z // Form S_lo = AA - Z sub GR_minus_N = GR_Bias, GR_N // Form exponent of 2^(-N) } ;; @@ -791,7 +791,7 @@ GLOBAL_IEEE754_ENTRY(log1pl) { .mmi getf.exp GR_M = FR_W // Get signexp of w = x ldfe FR_Q2 = [GR_ad_q],16 // Load Q2 - extr.u GR_Index2 = GR_X_1, 6, 4 // Extract bits 6-9 of X_1 + extr.u GR_Index2 = GR_X_1, 6, 4 // Extract bits 6-9 of X_1 } ;; @@ -1055,7 +1055,7 @@ GLOBAL_IEEE754_ENTRY(log1pl) { .mfi nop.m 999 -(p9) fadd.s1 FR_Y_lo = FR_poly_hi, FR_poly_lo // Y_lo = poly_hi + poly_lo +(p9) fadd.s1 FR_Y_lo = FR_poly_hi, FR_poly_lo // Y_lo = poly_hi + poly_lo nop.i 999 } ;; @@ -1070,25 +1070,25 @@ GLOBAL_IEEE754_ENTRY(log1pl) // Here if x=-1 -LOG1P_EQ_Minus_1: +LOG1P_EQ_Minus_1: // // If x=-1 raise divide by zero and return -inf -// +// { .mfi mov GR_Parameter_TAG = 138 - fsub.s1 FR_Output_X_tmp = f0, f1 + fsub.s1 FR_Output_X_tmp = f0, f1 nop.i 999 } ;; { .mfb nop.m 999 - frcpa.s0 FR_Output_X_tmp, p8 = FR_Output_X_tmp, f0 + frcpa.s0 FR_Output_X_tmp, p8 = FR_Output_X_tmp, f0 br.cond.sptk __libm_error_region } ;; -LOG1P_special: +LOG1P_special: { .mfi nop.m 999 fclass.m.unc p8, p0 = FR_Input_X, 0x1E1 // Test for natval, nan, +inf @@ -1096,46 +1096,46 @@ LOG1P_special: } ;; -// +// // For SNaN raise invalid and return QNaN. // For QNaN raise invalid and return QNaN. // For +Inf return +Inf. -// +// { .mfb nop.m 999 -(p8) fmpy.s0 f8 = FR_Input_X, f1 +(p8) fmpy.s0 f8 = FR_Input_X, f1 (p8) br.ret.sptk b0 // Return for natval, nan, +inf } ;; -// +// // For -Inf raise invalid and return QNaN. -// +// { .mfb mov GR_Parameter_TAG = 139 - fmpy.s0 FR_Output_X_tmp = FR_Input_X, f0 + fmpy.s0 FR_Output_X_tmp = FR_Input_X, f0 br.cond.sptk __libm_error_region } ;; -LOG1P_unsupported: -// +LOG1P_unsupported: +// // Return generated NaN or other value. -// +// { .mfb nop.m 999 - fmpy.s0 f8 = FR_Input_X, f0 + fmpy.s0 f8 = FR_Input_X, f0 br.ret.sptk b0 } ;; // Here if -inf < x < -1 -LOG1P_LT_Minus_1: -// +LOG1P_LT_Minus_1: +// // Deal with x < -1 in a special way - raise // invalid and produce QNaN indefinite. -// +// { .mfb mov GR_Parameter_TAG = 139 frcpa.s0 FR_Output_X_tmp, p8 = f0, f0 diff --git a/sysdeps/ia64/fpu/s_modf.S b/sysdeps/ia64/fpu/s_modf.S index 2008bbfc5c..4634acfb0d 100644 --- a/sysdeps/ia64/fpu/s_modf.S +++ b/sysdeps/ia64/fpu/s_modf.S @@ -21,27 +21,27 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // // History //============================================================== // 02/02/00 Initial version // 04/04/00 Improved speed, corrected result for NaN input -// 12/22/00 Fixed so inexact flag is never set, and invalid is not set for +// 12/22/00 Fixed so inexact flag is never set, and invalid is not set for // qnans nor for inputs larger than 2^63. // 05/20/02 Cleaned up namespace and sf0 syntax // 02/10/03 Reordered header: .section, .global, .proc, .align @@ -78,17 +78,17 @@ // CALCULATION: NOT HUGE, NOT SMALL // To get the integer part -// Take the floating-point input and truncate +// Take the floating-point input and truncate // then convert this integer to fp Call it MODF_INTEGER_PART // Subtract MODF_INTEGER_PART from MODF_NORM_F8 to get fraction part -// Then put fraction part in f8 +// Then put fraction part in f8 // put integer part MODF_INTEGER_PART into *iptr // Registers used //============================================================== -// predicate registers used: +// predicate registers used: // p6 - p13 // 0xFFFF 0x10033 @@ -99,21 +99,21 @@ // p13 --------------------------------------------------->| // -// floating-point registers used: +// floating-point registers used: MODF_NORM_F8 = f9 MODF_FRACTION_PART = f10 MODF_INTEGER_PART = f11 MODF_INT_INTEGER_PART = f12 -// general registers used +// general registers used modf_signexp = r14 modf_GR_no_frac = r15 modf_GR_FFFF = r16 -modf_17_ones = r17 +modf_17_ones = r17 modf_exp = r18 // r33 = iptr - + .section .text GLOBAL_LIBM_ENTRY(modf) @@ -122,7 +122,7 @@ GLOBAL_LIBM_ENTRY(modf) // Assume input is normalized and get signexp // Normalize input just in case -// Form exponent bias +// Form exponent bias { .mfi getf.exp modf_signexp = f8 fnorm.s0 MODF_NORM_F8 = f8 @@ -150,9 +150,9 @@ GLOBAL_LIBM_ENTRY(modf) // Is x unnorm? // qnan snan inf norm unorm 0 -+ // 0 0 0 0 1 0 11 = 0x0b UNORM -// Set p13 to indicate calculation path, else p6 if nan or inf +// Set p13 to indicate calculation path, else p6 if nan or inf { .mfi - and modf_exp = modf_17_ones, modf_signexp + and modf_exp = modf_17_ones, modf_signexp fclass.m.unc p8,p0 = f8, 0x0b nop.i 999 ;; } diff --git a/sysdeps/ia64/fpu/s_modff.S b/sysdeps/ia64/fpu/s_modff.S index edc1120971..36e02be81b 100644 --- a/sysdeps/ia64/fpu/s_modff.S +++ b/sysdeps/ia64/fpu/s_modff.S @@ -21,27 +21,27 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // // History //============================================================== // 02/02/00 Initial version // 04/04/00 Improved speed, corrected result for NaN input -// 12/22/00 Fixed so inexact flag is never set, and invalid is not set for +// 12/22/00 Fixed so inexact flag is never set, and invalid is not set for // qnans nor for inputs larger than 2^63. // 05/20/02 Cleaned up namespace and sf0 syntax // 02/10/03 Reordered header: .section, .global, .proc, .align @@ -78,17 +78,17 @@ // CALCULATION: NOT HUGE, NOT SMALL // To get the integer part -// Take the floating-point input and truncate +// Take the floating-point input and truncate // then convert this integer to fp Call it MODF_INTEGER_PART // Subtract MODF_INTEGER_PART from MODF_NORM_F8 to get fraction part -// Then put fraction part in f8 +// Then put fraction part in f8 // put integer part MODF_INTEGER_PART into *iptr // Registers used //============================================================== -// predicate registers used: +// predicate registers used: // p6 - p13 // 0xFFFF 0x10016 @@ -99,21 +99,21 @@ // p13 --------------------------------------------------->| // -// floating-point registers used: +// floating-point registers used: MODF_NORM_F8 = f9 MODF_FRACTION_PART = f10 MODF_INTEGER_PART = f11 MODF_INT_INTEGER_PART = f12 -// general registers used +// general registers used modf_signexp = r14 modf_GR_no_frac = r15 modf_GR_FFFF = r16 -modf_17_ones = r17 +modf_17_ones = r17 modf_exp = r18 // r33 = iptr - + .section .text GLOBAL_LIBM_ENTRY(modff) @@ -122,7 +122,7 @@ GLOBAL_LIBM_ENTRY(modff) // Assume input is normalized and get signexp // Normalize input just in case -// Form exponent bias +// Form exponent bias { .mfi getf.exp modf_signexp = f8 fnorm.s0 MODF_NORM_F8 = f8 @@ -150,9 +150,9 @@ GLOBAL_LIBM_ENTRY(modff) // Is x unnorm? // qnan snan inf norm unorm 0 -+ // 0 0 0 0 1 0 11 = 0x0b UNORM -// Set p13 to indicate calculation path, else p6 if nan or inf +// Set p13 to indicate calculation path, else p6 if nan or inf { .mfi - and modf_exp = modf_17_ones, modf_signexp + and modf_exp = modf_17_ones, modf_signexp fclass.m.unc p8,p0 = f8, 0x0b nop.i 999 ;; } diff --git a/sysdeps/ia64/fpu/s_modfl.S b/sysdeps/ia64/fpu/s_modfl.S index eaf410cb6c..e95d520b4b 100644 --- a/sysdeps/ia64/fpu/s_modfl.S +++ b/sysdeps/ia64/fpu/s_modfl.S @@ -21,20 +21,20 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // // History @@ -42,7 +42,7 @@ // 02/02/00 Initial version // 04/04/00 Improved speed, corrected result for NaN input // 05/30/00 Fixed bug for exponent 0x1003e -// 12/22/00 Fixed so inexact flag is never set, and invalid is not set for +// 12/22/00 Fixed so inexact flag is never set, and invalid is not set for // qnans nor for inputs larger than 2^63. // 05/20/02 Cleaned up namespace and sf0 syntax // 02/10/03 Reordered header: .section, .global, .proc, .align @@ -73,17 +73,17 @@ // CALCULATION: NOT HUGE, NOT SMALL // To get the integer part -// Take the floating-point input and truncate +// Take the floating-point input and truncate // then convert this integer to fp Call it MODF_INTEGER_PART // Subtract MODF_INTEGER_PART from MODF_NORM_F8 to get fraction part -// Then put fraction part in f8 +// Then put fraction part in f8 // put integer part MODF_INTEGER_PART into *iptr // Registers used //============================================================== -// predicate registers used: +// predicate registers used: // p6 - p13 // 0xFFFF 0x1003e @@ -94,21 +94,21 @@ // p13 --------------------------------------------------->| // -// floating-point registers used: +// floating-point registers used: MODF_NORM_F8 = f9 MODF_FRACTION_PART = f10 MODF_INTEGER_PART = f11 MODF_INT_INTEGER_PART = f12 -// general registers used +// general registers used modf_signexp = r14 modf_GR_no_frac = r15 modf_GR_FFFF = r16 -modf_17_ones = r17 +modf_17_ones = r17 modf_exp = r18 // r34 = iptr - + .section .text GLOBAL_LIBM_ENTRY(modfl) @@ -117,7 +117,7 @@ GLOBAL_LIBM_ENTRY(modfl) // Assume input is normalized and get signexp // Normalize input just in case -// Form exponent bias +// Form exponent bias { .mfi getf.exp modf_signexp = f8 fnorm.s0 MODF_NORM_F8 = f8 @@ -145,9 +145,9 @@ GLOBAL_LIBM_ENTRY(modfl) // Is x unnorm? // qnan snan inf norm unorm 0 -+ // 0 0 0 0 1 0 11 = 0x0b UNORM -// Set p13 to indicate calculation path, else p6 if nan or inf +// Set p13 to indicate calculation path, else p6 if nan or inf { .mfi - and modf_exp = modf_17_ones, modf_signexp + and modf_exp = modf_17_ones, modf_signexp fclass.m.unc p8,p0 = f8, 0x0b nop.i 999 ;; } diff --git a/sysdeps/ia64/fpu/s_nextafter.S b/sysdeps/ia64/fpu/s_nextafter.S index 6635a31df6..ec8afce21c 100644 --- a/sysdeps/ia64/fpu/s_nextafter.S +++ b/sysdeps/ia64/fpu/s_nextafter.S @@ -21,25 +21,25 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // // History //============================================================== -// 02/02/00 Initial version +// 02/02/00 Initial version // 03/03/00 Modified to conform to C9X, and improve speed of main path // 03/14/00 Fixed case where x is a power of 2, and x > y, improved speed // 04/04/00 Unwind support added @@ -104,8 +104,8 @@ FR_tmp = f39 // // Overview of operation //============================================================== -// nextafter determines the next representable value -// after x in the direction of y. +// nextafter determines the next representable value +// after x in the direction of y. .section .text @@ -116,7 +116,7 @@ GLOBAL_LIBM_ENTRY(nextafter) // Form smallest denormal significand = ulp size { .mfi getf.exp GR_exp = f8 - fcmp.lt.s1 p10,p11 = f8, f9 + fcmp.lt.s1 p10,p11 = f8, f9 addl GR_sden_sig = 0x800, r0 } // Form largest normal significand 0xfffffffffffff800 @@ -131,7 +131,7 @@ GLOBAL_LIBM_ENTRY(nextafter) // Form largest normal exponent { .mfi getf.sig GR_sig = f8 - fcmp.eq.s0 p6,p0 = f8, f9 + fcmp.eq.s0 p6,p0 = f8, f9 addl GR_max_pexp = 0x103fe, r0 } // Move largest normal significand to fp reg for special cases @@ -148,7 +148,7 @@ GLOBAL_LIBM_ENTRY(nextafter) // It decreases (p13 set) if xy and x>=0 { .mfi setf.sig FR_sden_sig = GR_sden_sig - fclass.m p8,p0 = f8, 0xc3 + fclass.m p8,p0 = f8, 0xc3 (p10) cmp.lt p12,p13 = GR_exp, GR_sign_mask } { .mfi @@ -176,7 +176,7 @@ GLOBAL_LIBM_ENTRY(nextafter) // Form new exponent in case result exponent needs incrementing or decrementing { .mfi setf.exp FR_new_exp = GR_exp - fclass.m p9,p0 = f9, 0xc3 + fclass.m p9,p0 = f9, 0xc3 (p12) add GR_exp1 = 1, GR_exp } { .mib @@ -194,7 +194,7 @@ GLOBAL_LIBM_ENTRY(nextafter) } { .mfb nop.m 999 -(p8) fma.s0 f8 = f8,f1,f9 +(p8) fma.s0 f8 = f8,f1,f9 (p8) br.ret.spnt b0 ;; // Exit if x=nan } @@ -202,12 +202,12 @@ GLOBAL_LIBM_ENTRY(nextafter) // Is x=inf? { .mfi setf.exp FR_exp1 = GR_exp1 - fclass.m p6,p0 = f8, 0x23 + fclass.m p6,p0 = f8, 0x23 addl GR_exp_mask = 0x1ffff, r0 } { .mfb setf.sig FR_snorm_sig = GR_snorm_sig -(p9) fma.s0 f8 = f8,f1,f9 +(p9) fma.s0 f8 = f8,f1,f9 (p9) br.ret.spnt b0 ;; // Exit if y=nan } @@ -216,14 +216,14 @@ GLOBAL_LIBM_ENTRY(nextafter) { .mfb setf.sig FR_lden_sig = GR_lden_sig mov FR_save_f8 = f8 -(p7) br.cond.spnt NEXT_ZERO ;; // Exit if x=0 +(p7) br.cond.spnt NEXT_ZERO ;; // Exit if x=0 } // Mask off the sign to get x_exp { .mfb and GR_x_exp = GR_exp_mask, GR_exp nop.f 999 -(p6) br.cond.spnt NEXT_INF ;; // Exit if x=inf +(p6) br.cond.spnt NEXT_INF ;; // Exit if x=inf } // Check 6 special cases when significand rolls over: @@ -237,7 +237,7 @@ GLOBAL_LIBM_ENTRY(nextafter) // Set p9, result is sig=max_den_sig, exp same, signal underflow and inexact // 5 sig size decr, x_sig=min_den_sig, x_exp = min_exp // Set p10, result is zero, sign of x, signal underflow and inexact -// 6 sig size decr, x_sig=min_sig, x_exp < min_exp +// 6 sig size decr, x_sig=min_sig, x_exp < min_exp // Set p14, result is zero, sign of x, signal underflow and inexact // // Form exponent of smallest double denormal (if normalized register format) @@ -343,7 +343,7 @@ NEXT_UNDERFLOW_TO_ZERO: br.cond.sptk NEXT_COMMON_FINISH ;; } -NEXT_INF: +NEXT_INF: // Here if f8 is +- infinity // INF // if f8 is +inf, no matter what y is return largest double @@ -357,16 +357,16 @@ NEXT_INF: { .mfb nop.m 999 - fmerge.s f8 = f8,FR_lnorm - br.ret.sptk b0 ;; + fmerge.s f8 = f8,FR_lnorm + br.ret.sptk b0 ;; } -NEXT_ZERO: +NEXT_ZERO: // Here if f8 is +- zero // ZERO -// if f8 is zero and y is +, return + smallest double denormal -// if f8 is zero and y is -, return - smallest double denormal +// if f8 is zero and y is +, return + smallest double denormal +// if f8 is zero and y is -, return - smallest double denormal { .mfi nop.m 999 @@ -384,7 +384,7 @@ NEXT_ZERO: // Add correct sign from direction arg { .mfi nop.m 999 - fmerge.s f8 = f9,FR_sden + fmerge.s f8 = f9,FR_sden nop.i 999 ;; } @@ -395,7 +395,7 @@ NEXT_ZERO: br.cond.sptk NEXT_UNDERFLOW ;; } -NEXT_UNDERFLOW: +NEXT_UNDERFLOW: // Here if result is a denorm, or input is finite and result is zero // Call error support to report possible range error { .mib @@ -405,7 +405,7 @@ NEXT_UNDERFLOW: } ;; -NEXT_OVERFLOW: +NEXT_OVERFLOW: // Here if input is finite, but result will be infinite // Use frcpa to generate infinity of correct sign // Call error support to report possible range error @@ -464,7 +464,7 @@ LOCAL_LIBM_ENTRY(__libm_error_region) { .mib stfd [GR_Parameter_X] = FR_save_f8 // STORE Parameter 1 on stack add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address - nop.b 0 + nop.b 0 } { .mib stfd [GR_Parameter_Y] = f8 // STORE Parameter 3 on stack diff --git a/sysdeps/ia64/fpu/s_nextafterf.S b/sysdeps/ia64/fpu/s_nextafterf.S index 0c269eca9e..6470091c2f 100644 --- a/sysdeps/ia64/fpu/s_nextafterf.S +++ b/sysdeps/ia64/fpu/s_nextafterf.S @@ -21,25 +21,25 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // // History //============================================================== -// 02/02/00 Initial version +// 02/02/00 Initial version // 03/03/00 Modified to conform to C9X, and improve speed of main path // 03/14/00 Fixed case where x is a power of 2, and x > y, improved speed // 04/04/00 Unwind support added @@ -104,8 +104,8 @@ FR_tmp = f39 // // Overview of operation //============================================================== -// nextafterf determines the next representable value -// after x in the direction of y. +// nextafterf determines the next representable value +// after x in the direction of y. .section .text @@ -135,14 +135,14 @@ GLOBAL_LIBM_ENTRY(nextafterf) // Extract significand from x // Form largest normal significand { .mlx - nop.m 0 + nop.m 0 movl GR_lnorm_sig = 0xffffff0000000000 ;; } // Move largest normal significand to fp reg for special cases { .mfi setf.sig FR_lnorm_sig = GR_lnorm_sig - nop.f 0 + nop.f 0 addl GR_sign_mask = 0x20000, r0 ;; } @@ -153,7 +153,7 @@ GLOBAL_LIBM_ENTRY(nextafterf) // It decreases (p13 set) if xy and x>=0 { .mfi setf.sig FR_sden_sig = GR_sden_sig - fclass.m p8,p0 = f8, 0xc3 + fclass.m p8,p0 = f8, 0xc3 (p10) cmp.lt p12,p13 = GR_exp, GR_sign_mask } { .mfi @@ -182,7 +182,7 @@ GLOBAL_LIBM_ENTRY(nextafterf) // Form new exponent in case result exponent needs incrementing or decrementing { .mfi setf.exp FR_new_exp = GR_exp - fclass.m p9,p0 = f9, 0xc3 + fclass.m p9,p0 = f9, 0xc3 (p12) add GR_exp1 = 1, GR_exp } { .mib @@ -200,7 +200,7 @@ GLOBAL_LIBM_ENTRY(nextafterf) } { .mfb nop.m 999 -(p8) fma.s0 f8 = f8,f1,f9 +(p8) fma.s0 f8 = f8,f1,f9 (p8) br.ret.spnt b0 ;; // Exit if x=nan } @@ -208,12 +208,12 @@ GLOBAL_LIBM_ENTRY(nextafterf) // Is x=inf? { .mfi setf.exp FR_exp1 = GR_exp1 - fclass.m p6,p0 = f8, 0x23 + fclass.m p6,p0 = f8, 0x23 addl GR_exp_mask = 0x1ffff, r0 } { .mfb setf.sig FR_snorm_sig = GR_snorm_sig -(p9) fma.s0 f8 = f8,f1,f9 +(p9) fma.s0 f8 = f8,f1,f9 (p9) br.ret.spnt b0 ;; // Exit if y=nan } @@ -222,14 +222,14 @@ GLOBAL_LIBM_ENTRY(nextafterf) { .mfb setf.sig FR_lden_sig = GR_lden_sig mov FR_save_f8 = f8 -(p7) br.cond.spnt NEXT_ZERO ;; // Exit if x=0 +(p7) br.cond.spnt NEXT_ZERO ;; // Exit if x=0 } // Mask off the sign to get x_exp { .mfb and GR_x_exp = GR_exp_mask, GR_exp nop.f 999 -(p6) br.cond.spnt NEXT_INF ;; // Exit if x=inf +(p6) br.cond.spnt NEXT_INF ;; // Exit if x=inf } // Check 6 special cases when significand rolls over: @@ -243,7 +243,7 @@ GLOBAL_LIBM_ENTRY(nextafterf) // Set p9, result is sig=max_den_sig, exp same, signal underflow and inexact // 5 sig size decr, x_sig=min_den_sig, x_exp = min_exp // Set p10, result is zero, sign of x, signal underflow and inexact -// 6 sig size decr, x_sig=min_sig, x_exp < min_exp +// 6 sig size decr, x_sig=min_sig, x_exp < min_exp // Set p14, result is zero, sign of x, signal underflow and inexact // // Form exponent of smallest float denormal (if normalized register format) @@ -349,7 +349,7 @@ NEXT_UNDERFLOW_TO_ZERO: br.cond.sptk NEXT_COMMON_FINISH ;; } -NEXT_INF: +NEXT_INF: // Here if f8 is +- infinity // INF // if f8 is +inf, no matter what y is return largest float @@ -363,16 +363,16 @@ NEXT_INF: { .mfb nop.m 999 - fmerge.s f8 = f8,FR_lnorm - br.ret.sptk b0 ;; + fmerge.s f8 = f8,FR_lnorm + br.ret.sptk b0 ;; } -NEXT_ZERO: +NEXT_ZERO: // Here if f8 is +- zero // ZERO -// if f8 is zero and y is +, return + smallest float denormal -// if f8 is zero and y is -, return - smallest float denormal +// if f8 is zero and y is +, return + smallest float denormal +// if f8 is zero and y is -, return - smallest float denormal { .mfi nop.m 999 @@ -390,7 +390,7 @@ NEXT_ZERO: // Add correct sign from direction arg { .mfi nop.m 999 - fmerge.s f8 = f9,FR_sden + fmerge.s f8 = f9,FR_sden nop.i 999 ;; } @@ -401,7 +401,7 @@ NEXT_ZERO: br.cond.sptk NEXT_UNDERFLOW ;; } -NEXT_UNDERFLOW: +NEXT_UNDERFLOW: // Here if result is a denorm, or input is finite and result is zero // Call error support to report possible range error { .mib @@ -411,7 +411,7 @@ NEXT_UNDERFLOW: } ;; -NEXT_OVERFLOW: +NEXT_OVERFLOW: // Here if input is finite, but result will be infinite // Use frcpa to generate infinity of correct sign // Call error support to report possible range error @@ -470,7 +470,7 @@ LOCAL_LIBM_ENTRY(__libm_error_region) { .mib stfs [GR_Parameter_X] = FR_save_f8 // STORE Parameter 1 on stack add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address - nop.b 0 + nop.b 0 } { .mib stfs [GR_Parameter_Y] = f8 // STORE Parameter 3 on stack diff --git a/sysdeps/ia64/fpu/s_nextafterl.S b/sysdeps/ia64/fpu/s_nextafterl.S index 20c927b1cc..5ba50302c6 100644 --- a/sysdeps/ia64/fpu/s_nextafterl.S +++ b/sysdeps/ia64/fpu/s_nextafterl.S @@ -21,25 +21,25 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // // History //============================================================== -// 02/02/00 Initial version +// 02/02/00 Initial version // 03/03/00 Modified to conform to C9X, and improve speed of main path // 03/14/00 Fixed case where x is a power of 2, and x > y, improved speed // 04/04/00 Unwind support added @@ -48,7 +48,7 @@ // set [the previously overwritten] GR_Parameter_RESULT. // 09/09/00 Updated fcmp so that qnans do not raise invalid. // 12/15/00 Fixed case of smallest long double normal to largest denormal, -// now adhere to C99 for two zero args, and fixed flag settings +// now adhere to C99 for two zero args, and fixed flag settings // for several cases // 05/20/02 Cleaned up namespace and sf0 syntax // 02/10/03 Reordered header: .section, .global, .proc, .align @@ -105,8 +105,8 @@ FR_tmp = f39 // // Overview of operation //============================================================== -// nextafterl determines the next representable value -// after x in the direction of y. +// nextafterl determines the next representable value +// after x in the direction of y. .section .text @@ -117,7 +117,7 @@ GLOBAL_LIBM_ENTRY(nextafterl) // Form smallest denormal significand = ulp size { .mfi getf.exp GR_exp = f8 - fcmp.lt.s1 p10,p11 = f8, f9 + fcmp.lt.s1 p10,p11 = f8, f9 addl GR_sden_sig = 0x1, r0 } // Form largest normal significand 0xffffffffffffffff @@ -150,7 +150,7 @@ GLOBAL_LIBM_ENTRY(nextafterl) // It decreases (p13 set) if xy and x>=0 { .mfi setf.sig FR_sden_sig = GR_sden_sig - fclass.m p8,p0 = f8, 0xc3 + fclass.m p8,p0 = f8, 0xc3 (p10) cmp.lt p12,p13 = GR_exp, GR_sign_mask } // Move smallest normal exp to fp regs @@ -180,7 +180,7 @@ GLOBAL_LIBM_ENTRY(nextafterl) // Form new exponent in case result exponent needs incrementing or decrementing { .mfi setf.exp FR_new_exp = GR_exp - fclass.m p9,p0 = f9, 0xc3 + fclass.m p9,p0 = f9, 0xc3 (p12) add GR_exp1 = 1, GR_exp } { .mib @@ -198,7 +198,7 @@ GLOBAL_LIBM_ENTRY(nextafterl) } { .mfb setf.exp FR_den_exp = GR_min_pexp -(p8) fma.s0 f8 = f8,f1,f9 +(p8) fma.s0 f8 = f8,f1,f9 (p8) br.ret.spnt b0 ;; // Exit if x=nan } @@ -206,12 +206,12 @@ GLOBAL_LIBM_ENTRY(nextafterl) // Is x=inf? { .mfi setf.exp FR_exp1 = GR_exp1 - fclass.m p6,p0 = f8, 0x23 + fclass.m p6,p0 = f8, 0x23 addl GR_exp_mask = 0x1ffff, r0 } { .mfb setf.sig FR_snorm_sig = GR_snorm_sig -(p9) fma.s0 f8 = f8,f1,f9 +(p9) fma.s0 f8 = f8,f1,f9 (p9) br.ret.spnt b0 ;; // Exit if y=nan } @@ -220,14 +220,14 @@ GLOBAL_LIBM_ENTRY(nextafterl) { .mfb setf.sig FR_lden_sig = GR_lden_sig mov FR_save_f8 = f8 -(p7) br.cond.spnt NEXT_ZERO ;; // Exit if x=0 +(p7) br.cond.spnt NEXT_ZERO ;; // Exit if x=0 } // Mask off the sign to get x_exp { .mfb and GR_x_exp = GR_exp_mask, GR_exp nop.f 999 -(p6) br.cond.spnt NEXT_INF ;; // Exit if x=inf +(p6) br.cond.spnt NEXT_INF ;; // Exit if x=inf } // Check 5 special cases when significand rolls over: @@ -252,7 +252,7 @@ GLOBAL_LIBM_ENTRY(nextafterl) { .mmi (p6) cmp.lt.unc p6,p7 = GR_x_exp, GR_max_pexp (p10) cmp.eq.unc p10,p0 = GR_new_sig, r0 -(p9) cmp.le.unc p9,p8 = GR_x_exp, GR_min_pexp +(p9) cmp.le.unc p9,p8 = GR_x_exp, GR_min_pexp ;; } @@ -347,7 +347,7 @@ NEXT_UNDERFLOW_TO_ZERO: br.cond.sptk NEXT_COMMON_FINISH ;; } -NEXT_INF: +NEXT_INF: // Here if f8 is +- infinity // INF // if f8 is +inf, no matter what y is return largest long double @@ -362,16 +362,16 @@ NEXT_INF: { .mfb nop.m 999 - fmerge.s f8 = f8,FR_lnorm - br.ret.sptk b0 ;; + fmerge.s f8 = f8,FR_lnorm + br.ret.sptk b0 ;; } -NEXT_ZERO: +NEXT_ZERO: // Here if f8 is +- zero // ZERO -// if f8 is zero and y is +, return + smallest long double denormal -// if f8 is zero and y is -, return - smallest long double denormal +// if f8 is zero and y is +, return + smallest long double denormal +// if f8 is zero and y is -, return - smallest long double denormal { .mfi nop.m 999 @@ -389,7 +389,7 @@ NEXT_ZERO: // Add correct sign from direction arg { .mfi nop.m 999 - fmerge.s f8 = f9,FR_sden + fmerge.s f8 = f9,FR_sden nop.i 999 ;; } @@ -400,7 +400,7 @@ NEXT_ZERO: br.cond.sptk NEXT_UNDERFLOW ;; } -NEXT_UNDERFLOW: +NEXT_UNDERFLOW: // Here if result is a denorm, or input is finite and result is zero // Call error support to report possible range error { .mib @@ -410,7 +410,7 @@ NEXT_UNDERFLOW: } ;; -NEXT_OVERFLOW: +NEXT_OVERFLOW: // Here if input is finite, but result will be infinite // Use frcpa to generate infinity of correct sign // Call error support to report possible range error @@ -469,7 +469,7 @@ LOCAL_LIBM_ENTRY(__libm_error_region) { .mib stfe [GR_Parameter_X] = FR_save_f8 // STORE Parameter 1 on stack add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address - nop.b 0 + nop.b 0 } { .mib stfe [GR_Parameter_Y] = f8 // STORE Parameter 3 on stack diff --git a/sysdeps/ia64/fpu/s_nexttoward.S b/sysdeps/ia64/fpu/s_nexttoward.S index 741fea02b0..a0e697506c 100644 --- a/sysdeps/ia64/fpu/s_nexttoward.S +++ b/sysdeps/ia64/fpu/s_nexttoward.S @@ -21,25 +21,25 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // // History //============================================================== -// 08/15/01 Initial version +// 08/15/01 Initial version // 08/23/01 Corrected error tag number // 05/20/02 Cleaned up namespace and sf0 syntax // 02/10/03 Reordered header: .section, .global, .proc, .align @@ -96,8 +96,8 @@ FR_tmp = f39 // // Overview of operation //============================================================== -// nexttoward determines the next representable value -// after x in the direction of y. +// nexttoward determines the next representable value +// after x in the direction of y. .section .text @@ -108,7 +108,7 @@ GLOBAL_LIBM_ENTRY(nexttoward) // Form smallest denormal significand = ulp size { .mfi getf.exp GR_exp = f8 - fcmp.lt.s1 p10,p11 = f8, f9 + fcmp.lt.s1 p10,p11 = f8, f9 addl GR_sden_sig = 0x800, r0 } // Form largest normal significand 0xfffffffffffff800 @@ -123,7 +123,7 @@ GLOBAL_LIBM_ENTRY(nexttoward) // Form largest normal exponent { .mfi getf.sig GR_sig = f8 - fcmp.eq.s0 p6,p0 = f8, f9 + fcmp.eq.s0 p6,p0 = f8, f9 addl GR_max_pexp = 0x103fe, r0 } // Move largest normal significand to fp reg for special cases @@ -140,7 +140,7 @@ GLOBAL_LIBM_ENTRY(nexttoward) // It decreases (p13 set) if xy and x>=0 { .mfi setf.sig FR_sden_sig = GR_sden_sig - fclass.m p8,p0 = f8, 0xc3 + fclass.m p8,p0 = f8, 0xc3 (p10) cmp.lt p12,p13 = GR_exp, GR_sign_mask } { .mfi @@ -168,7 +168,7 @@ GLOBAL_LIBM_ENTRY(nexttoward) // Form new exponent in case result exponent needs incrementing or decrementing { .mfi setf.exp FR_new_exp = GR_exp - fclass.m p9,p0 = f9, 0xc3 + fclass.m p9,p0 = f9, 0xc3 (p12) add GR_exp1 = 1, GR_exp } { .mib @@ -186,7 +186,7 @@ GLOBAL_LIBM_ENTRY(nexttoward) } { .mfb nop.m 999 -(p8) fma.s0 f8 = f8,f1,f9 +(p8) fma.s0 f8 = f8,f1,f9 (p8) br.ret.spnt b0 ;; // Exit if x=nan } @@ -194,12 +194,12 @@ GLOBAL_LIBM_ENTRY(nexttoward) // Is x=inf? { .mfi setf.exp FR_exp1 = GR_exp1 - fclass.m p6,p0 = f8, 0x23 + fclass.m p6,p0 = f8, 0x23 addl GR_exp_mask = 0x1ffff, r0 } { .mfb setf.sig FR_snorm_sig = GR_snorm_sig -(p9) fma.s0 f8 = f8,f1,f9 +(p9) fma.s0 f8 = f8,f1,f9 (p9) br.ret.spnt b0 ;; // Exit if y=nan } @@ -208,14 +208,14 @@ GLOBAL_LIBM_ENTRY(nexttoward) { .mfb setf.sig FR_lden_sig = GR_lden_sig mov FR_save_f8 = f8 -(p7) br.cond.spnt NEXT_ZERO ;; // Exit if x=0 +(p7) br.cond.spnt NEXT_ZERO ;; // Exit if x=0 } // Mask off the sign to get x_exp { .mfb and GR_x_exp = GR_exp_mask, GR_exp nop.f 999 -(p6) br.cond.spnt NEXT_INF ;; // Exit if x=inf +(p6) br.cond.spnt NEXT_INF ;; // Exit if x=inf } // Check 6 special cases when significand rolls over: @@ -229,7 +229,7 @@ GLOBAL_LIBM_ENTRY(nexttoward) // Set p9, result is sig=max_den_sig, exp same, signal underflow and inexact // 5 sig size decr, x_sig=min_den_sig, x_exp = min_exp // Set p10, result is zero, sign of x, signal underflow and inexact -// 6 sig size decr, x_sig=min_sig, x_exp < min_exp +// 6 sig size decr, x_sig=min_sig, x_exp < min_exp // Set p14, result is zero, sign of x, signal underflow and inexact // // Form exponent of smallest double denormal (if normalized register format) @@ -335,7 +335,7 @@ NEXT_UNDERFLOW_TO_ZERO: br.cond.sptk NEXT_COMMON_FINISH ;; } -NEXT_INF: +NEXT_INF: // Here if f8 is +- infinity // INF // if f8 is +inf, no matter what y is return largest double @@ -349,16 +349,16 @@ NEXT_INF: { .mfb nop.m 999 - fmerge.s f8 = f8,FR_lnorm - br.ret.sptk b0 ;; + fmerge.s f8 = f8,FR_lnorm + br.ret.sptk b0 ;; } -NEXT_ZERO: +NEXT_ZERO: // Here if f8 is +- zero // ZERO -// if f8 is zero and y is +, return + smallest double denormal -// if f8 is zero and y is -, return - smallest double denormal +// if f8 is zero and y is +, return + smallest double denormal +// if f8 is zero and y is -, return - smallest double denormal { .mfi nop.m 999 @@ -376,7 +376,7 @@ NEXT_ZERO: // Add correct sign from direction arg { .mfi nop.m 999 - fmerge.s f8 = f9,FR_sden + fmerge.s f8 = f9,FR_sden nop.i 999 ;; } @@ -387,7 +387,7 @@ NEXT_ZERO: br.cond.sptk NEXT_UNDERFLOW ;; } -NEXT_UNDERFLOW: +NEXT_UNDERFLOW: // Here if result is a denorm, or input is finite and result is zero // Call error support to report possible range error { .mib @@ -397,7 +397,7 @@ NEXT_UNDERFLOW: } ;; -NEXT_OVERFLOW: +NEXT_OVERFLOW: // Here if input is finite, but result will be infinite // Use frcpa to generate infinity of correct sign // Call error support to report possible range error @@ -456,7 +456,7 @@ LOCAL_LIBM_ENTRY(__libm_error_region) { .mib stfd [GR_Parameter_X] = FR_save_f8 // STORE Parameter 1 on stack add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address - nop.b 0 + nop.b 0 } { .mib stfd [GR_Parameter_Y] = f8 // STORE Parameter 3 on stack diff --git a/sysdeps/ia64/fpu/s_nexttowardf.S b/sysdeps/ia64/fpu/s_nexttowardf.S index b8b976271a..d224951ffe 100644 --- a/sysdeps/ia64/fpu/s_nexttowardf.S +++ b/sysdeps/ia64/fpu/s_nexttowardf.S @@ -21,25 +21,25 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // // History //============================================================== -// 08/15/01 Initial version +// 08/15/01 Initial version // 08/23/01 Corrected error tag number // 05/20/02 Cleaned up namespace and sf0 syntax // 02/10/03 Reordered header: .section, .global, .proc, .align @@ -96,8 +96,8 @@ FR_tmp = f39 // // Overview of operation //============================================================== -// nexttowardf determines the next representable value -// after x in the direction of y. +// nexttowardf determines the next representable value +// after x in the direction of y. .section .text @@ -127,14 +127,14 @@ GLOBAL_LIBM_ENTRY(nexttowardf) // Extract significand from x // Form largest normal significand { .mlx - nop.m 0 + nop.m 0 movl GR_lnorm_sig = 0xffffff0000000000 ;; } // Move largest normal significand to fp reg for special cases { .mfi setf.sig FR_lnorm_sig = GR_lnorm_sig - nop.f 0 + nop.f 0 addl GR_sign_mask = 0x20000, r0 ;; } @@ -145,7 +145,7 @@ GLOBAL_LIBM_ENTRY(nexttowardf) // It decreases (p13 set) if xy and x>=0 { .mfi setf.sig FR_sden_sig = GR_sden_sig - fclass.m p8,p0 = f8, 0xc3 + fclass.m p8,p0 = f8, 0xc3 (p10) cmp.lt p12,p13 = GR_exp, GR_sign_mask } { .mfi @@ -174,7 +174,7 @@ GLOBAL_LIBM_ENTRY(nexttowardf) // Form new exponent in case result exponent needs incrementing or decrementing { .mfi setf.exp FR_new_exp = GR_exp - fclass.m p9,p0 = f9, 0xc3 + fclass.m p9,p0 = f9, 0xc3 (p12) add GR_exp1 = 1, GR_exp } { .mib @@ -192,7 +192,7 @@ GLOBAL_LIBM_ENTRY(nexttowardf) } { .mfb nop.m 999 -(p8) fma.s0 f8 = f8,f1,f9 +(p8) fma.s0 f8 = f8,f1,f9 (p8) br.ret.spnt b0 ;; // Exit if x=nan } @@ -200,12 +200,12 @@ GLOBAL_LIBM_ENTRY(nexttowardf) // Is x=inf? { .mfi setf.exp FR_exp1 = GR_exp1 - fclass.m p6,p0 = f8, 0x23 + fclass.m p6,p0 = f8, 0x23 addl GR_exp_mask = 0x1ffff, r0 } { .mfb setf.sig FR_snorm_sig = GR_snorm_sig -(p9) fma.s0 f8 = f8,f1,f9 +(p9) fma.s0 f8 = f8,f1,f9 (p9) br.ret.spnt b0 ;; // Exit if y=nan } @@ -214,14 +214,14 @@ GLOBAL_LIBM_ENTRY(nexttowardf) { .mfb setf.sig FR_lden_sig = GR_lden_sig mov FR_save_f8 = f8 -(p7) br.cond.spnt NEXT_ZERO ;; // Exit if x=0 +(p7) br.cond.spnt NEXT_ZERO ;; // Exit if x=0 } // Mask off the sign to get x_exp { .mfb and GR_x_exp = GR_exp_mask, GR_exp nop.f 999 -(p6) br.cond.spnt NEXT_INF ;; // Exit if x=inf +(p6) br.cond.spnt NEXT_INF ;; // Exit if x=inf } // Check 6 special cases when significand rolls over: @@ -235,7 +235,7 @@ GLOBAL_LIBM_ENTRY(nexttowardf) // Set p9, result is sig=max_den_sig, exp same, signal underflow and inexact // 5 sig size decr, x_sig=min_den_sig, x_exp = min_exp // Set p10, result is zero, sign of x, signal underflow and inexact -// 6 sig size decr, x_sig=min_sig, x_exp < min_exp +// 6 sig size decr, x_sig=min_sig, x_exp < min_exp // Set p14, result is zero, sign of x, signal underflow and inexact // // Form exponent of smallest float denormal (if normalized register format) @@ -341,7 +341,7 @@ NEXT_UNDERFLOW_TO_ZERO: br.cond.sptk NEXT_COMMON_FINISH ;; } -NEXT_INF: +NEXT_INF: // Here if f8 is +- infinity // INF // if f8 is +inf, no matter what y is return largest float @@ -355,16 +355,16 @@ NEXT_INF: { .mfb nop.m 999 - fmerge.s f8 = f8,FR_lnorm - br.ret.sptk b0 ;; + fmerge.s f8 = f8,FR_lnorm + br.ret.sptk b0 ;; } -NEXT_ZERO: +NEXT_ZERO: // Here if f8 is +- zero // ZERO -// if f8 is zero and y is +, return + smallest float denormal -// if f8 is zero and y is -, return - smallest float denormal +// if f8 is zero and y is +, return + smallest float denormal +// if f8 is zero and y is -, return - smallest float denormal { .mfi nop.m 999 @@ -382,7 +382,7 @@ NEXT_ZERO: // Add correct sign from direction arg { .mfi nop.m 999 - fmerge.s f8 = f9,FR_sden + fmerge.s f8 = f9,FR_sden nop.i 999 ;; } @@ -393,7 +393,7 @@ NEXT_ZERO: br.cond.sptk NEXT_UNDERFLOW ;; } -NEXT_UNDERFLOW: +NEXT_UNDERFLOW: // Here if result is a denorm, or input is finite and result is zero // Call error support to report possible range error { .mib @@ -403,7 +403,7 @@ NEXT_UNDERFLOW: } ;; -NEXT_OVERFLOW: +NEXT_OVERFLOW: // Here if input is finite, but result will be infinite // Use frcpa to generate infinity of correct sign // Call error support to report possible range error @@ -462,7 +462,7 @@ LOCAL_LIBM_ENTRY(__libm_error_region) { .mib stfs [GR_Parameter_X] = FR_save_f8 // STORE Parameter 1 on stack add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address - nop.b 0 + nop.b 0 } { .mib stfs [GR_Parameter_Y] = f8 // STORE Parameter 3 on stack diff --git a/sysdeps/ia64/fpu/s_nexttowardl.S b/sysdeps/ia64/fpu/s_nexttowardl.S index fa2db125a8..7d38e3be07 100644 --- a/sysdeps/ia64/fpu/s_nexttowardl.S +++ b/sysdeps/ia64/fpu/s_nexttowardl.S @@ -21,25 +21,25 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // // History //============================================================== -// 08/15/01 Initial version +// 08/15/01 Initial version // 08/23/01 Corrected error tag number // 05/20/02 Cleaned up namespace and sf0 syntax // 02/10/03 Reordered header: .section, .global, .proc, .align @@ -96,8 +96,8 @@ FR_tmp = f39 // // Overview of operation //============================================================== -// nexttowardl determines the next representable value -// after x in the direction of y. +// nexttowardl determines the next representable value +// after x in the direction of y. .section .text @@ -108,7 +108,7 @@ GLOBAL_LIBM_ENTRY(nexttowardl) // Form smallest denormal significand = ulp size { .mfi getf.exp GR_exp = f8 - fcmp.lt.s1 p10,p11 = f8, f9 + fcmp.lt.s1 p10,p11 = f8, f9 addl GR_sden_sig = 0x1, r0 } // Form largest normal significand 0xffffffffffffffff @@ -141,7 +141,7 @@ GLOBAL_LIBM_ENTRY(nexttowardl) // It decreases (p13 set) if xy and x>=0 { .mfi setf.sig FR_sden_sig = GR_sden_sig - fclass.m p8,p0 = f8, 0xc3 + fclass.m p8,p0 = f8, 0xc3 (p10) cmp.lt p12,p13 = GR_exp, GR_sign_mask } // Move smallest normal exp to fp regs @@ -171,7 +171,7 @@ GLOBAL_LIBM_ENTRY(nexttowardl) // Form new exponent in case result exponent needs incrementing or decrementing { .mfi setf.exp FR_new_exp = GR_exp - fclass.m p9,p0 = f9, 0xc3 + fclass.m p9,p0 = f9, 0xc3 (p12) add GR_exp1 = 1, GR_exp } { .mib @@ -189,7 +189,7 @@ GLOBAL_LIBM_ENTRY(nexttowardl) } { .mfb setf.exp FR_den_exp = GR_min_pexp -(p8) fma.s0 f8 = f8,f1,f9 +(p8) fma.s0 f8 = f8,f1,f9 (p8) br.ret.spnt b0 ;; // Exit if x=nan } @@ -197,12 +197,12 @@ GLOBAL_LIBM_ENTRY(nexttowardl) // Is x=inf? { .mfi setf.exp FR_exp1 = GR_exp1 - fclass.m p6,p0 = f8, 0x23 + fclass.m p6,p0 = f8, 0x23 addl GR_exp_mask = 0x1ffff, r0 } { .mfb setf.sig FR_snorm_sig = GR_snorm_sig -(p9) fma.s0 f8 = f8,f1,f9 +(p9) fma.s0 f8 = f8,f1,f9 (p9) br.ret.spnt b0 ;; // Exit if y=nan } @@ -211,14 +211,14 @@ GLOBAL_LIBM_ENTRY(nexttowardl) { .mfb setf.sig FR_lden_sig = GR_lden_sig mov FR_save_f8 = f8 -(p7) br.cond.spnt NEXT_ZERO ;; // Exit if x=0 +(p7) br.cond.spnt NEXT_ZERO ;; // Exit if x=0 } // Mask off the sign to get x_exp { .mfb and GR_x_exp = GR_exp_mask, GR_exp nop.f 999 -(p6) br.cond.spnt NEXT_INF ;; // Exit if x=inf +(p6) br.cond.spnt NEXT_INF ;; // Exit if x=inf } // Check 5 special cases when significand rolls over: @@ -243,7 +243,7 @@ GLOBAL_LIBM_ENTRY(nexttowardl) { .mmi (p6) cmp.lt.unc p6,p7 = GR_x_exp, GR_max_pexp (p10) cmp.eq.unc p10,p0 = GR_new_sig, r0 -(p9) cmp.le.unc p9,p8 = GR_x_exp, GR_min_pexp +(p9) cmp.le.unc p9,p8 = GR_x_exp, GR_min_pexp ;; } @@ -338,7 +338,7 @@ NEXT_UNDERFLOW_TO_ZERO: br.cond.sptk NEXT_COMMON_FINISH ;; } -NEXT_INF: +NEXT_INF: // Here if f8 is +- infinity // INF // if f8 is +inf, no matter what y is return largest long double @@ -353,16 +353,16 @@ NEXT_INF: { .mfb nop.m 999 - fmerge.s f8 = f8,FR_lnorm - br.ret.sptk b0 ;; + fmerge.s f8 = f8,FR_lnorm + br.ret.sptk b0 ;; } -NEXT_ZERO: +NEXT_ZERO: // Here if f8 is +- zero // ZERO -// if f8 is zero and y is +, return + smallest long double denormal -// if f8 is zero and y is -, return - smallest long double denormal +// if f8 is zero and y is +, return + smallest long double denormal +// if f8 is zero and y is -, return - smallest long double denormal { .mfi nop.m 999 @@ -380,7 +380,7 @@ NEXT_ZERO: // Add correct sign from direction arg { .mfi nop.m 999 - fmerge.s f8 = f9,FR_sden + fmerge.s f8 = f9,FR_sden nop.i 999 ;; } @@ -391,7 +391,7 @@ NEXT_ZERO: br.cond.sptk NEXT_UNDERFLOW ;; } -NEXT_UNDERFLOW: +NEXT_UNDERFLOW: // Here if result is a denorm, or input is finite and result is zero // Call error support to report possible range error { .mib @@ -401,7 +401,7 @@ NEXT_UNDERFLOW: } ;; -NEXT_OVERFLOW: +NEXT_OVERFLOW: // Here if input is finite, but result will be infinite // Use frcpa to generate infinity of correct sign // Call error support to report possible range error @@ -460,7 +460,7 @@ LOCAL_LIBM_ENTRY(__libm_error_region) { .mib stfe [GR_Parameter_X] = FR_save_f8 // STORE Parameter 1 on stack add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address - nop.b 0 + nop.b 0 } { .mib stfe [GR_Parameter_Y] = f8 // STORE Parameter 3 on stack diff --git a/sysdeps/ia64/fpu/s_round.S b/sysdeps/ia64/fpu/s_round.S index ed5ffae205..821187522b 100644 --- a/sysdeps/ia64/fpu/s_round.S +++ b/sysdeps/ia64/fpu/s_round.S @@ -159,7 +159,7 @@ ROUND_COMMON: { .mmi cmp.lt p6,p0 = rExp, rExpHalf // Is |x| < 0.5? cmp.ge p7,p0 = rExp, rBigexp // Is |x| >= 2^52? - cmp.lt p10,p0 = rExp, rExpHalf // Is |x| < 0.5? + cmp.lt p10,p0 = rExp, rExpHalf // Is |x| < 0.5? } ;; diff --git a/sysdeps/ia64/fpu/s_roundf.S b/sysdeps/ia64/fpu/s_roundf.S index 7cec860aa1..c0351b4a4d 100644 --- a/sysdeps/ia64/fpu/s_roundf.S +++ b/sysdeps/ia64/fpu/s_roundf.S @@ -159,7 +159,7 @@ ROUND_COMMON: { .mmi cmp.lt p6,p0 = rExp, rExpHalf // Is |x| < 0.5? cmp.ge p7,p0 = rExp, rBigexp // Is |x| >= 2^23? - cmp.lt p10,p0 = rExp, rExpHalf // Is |x| < 0.5? + cmp.lt p10,p0 = rExp, rExpHalf // Is |x| < 0.5? } ;; diff --git a/sysdeps/ia64/fpu/s_roundl.S b/sysdeps/ia64/fpu/s_roundl.S index da6cbfe228..355eaf5057 100644 --- a/sysdeps/ia64/fpu/s_roundl.S +++ b/sysdeps/ia64/fpu/s_roundl.S @@ -159,7 +159,7 @@ ROUND_COMMON: { .mmi cmp.lt p6,p0 = rExp, rExpHalf // Is |x| < 0.5? cmp.ge p7,p0 = rExp, rBigexp // Is |x| >= 2^63? - cmp.lt p10,p0 = rExp, rExpHalf // Is |x| < 0.5? + cmp.lt p10,p0 = rExp, rExpHalf // Is |x| < 0.5? } ;; diff --git a/sysdeps/ia64/fpu/s_scalblnf.c b/sysdeps/ia64/fpu/s_scalblnf.c index 2fa51ba11b..ed92bfd989 100644 --- a/sysdeps/ia64/fpu/s_scalblnf.c +++ b/sysdeps/ia64/fpu/s_scalblnf.c @@ -23,12 +23,12 @@ // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS @@ -48,11 +48,11 @@ float __libm_scalblnf(float, long int, int); float scalblnf(float x, long int n) { -#ifdef SIZE_LONG_INT_64 - return __libm_scalblnf(x,n,1); +#ifdef SIZE_LONG_INT_64 + return __libm_scalblnf(x,n,1); #else -#ifdef SIZE_LONG_INT_32 +#ifdef SIZE_LONG_INT_32 return __libm_scalblnf(x,n,0); #endif diff --git a/sysdeps/ia64/fpu/s_scalbn.c b/sysdeps/ia64/fpu/s_scalbn.c index 1f57141310..25cfad32ad 100644 --- a/sysdeps/ia64/fpu/s_scalbn.c +++ b/sysdeps/ia64/fpu/s_scalbn.c @@ -23,12 +23,12 @@ // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS @@ -48,11 +48,11 @@ double __libm_scalbn(double, int, int); double scalbn(double x, int n) { -#ifdef SIZE_INT_64 - return __libm_scalbn(x,n,1); +#ifdef SIZE_INT_64 + return __libm_scalbn(x,n,1); #else -#ifdef SIZE_INT_32 +#ifdef SIZE_INT_32 return __libm_scalbn(x,n,0); #endif diff --git a/sysdeps/ia64/fpu/s_scalbnf.c b/sysdeps/ia64/fpu/s_scalbnf.c index 97c06da08a..deab018a3e 100644 --- a/sysdeps/ia64/fpu/s_scalbnf.c +++ b/sysdeps/ia64/fpu/s_scalbnf.c @@ -23,12 +23,12 @@ // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS @@ -48,11 +48,11 @@ float __libm_scalbnf(float, int, int); float scalbnf(float x, int n) { -#ifdef SIZE_INT_64 - return __libm_scalbnf(x,n,1); +#ifdef SIZE_INT_64 + return __libm_scalbnf(x,n,1); #else -#ifdef SIZE_INT_32 +#ifdef SIZE_INT_32 return __libm_scalbnf(x,n,0); #endif diff --git a/sysdeps/ia64/fpu/s_scalbnl.c b/sysdeps/ia64/fpu/s_scalbnl.c index d7a81dfc55..cfd078bfc9 100644 --- a/sysdeps/ia64/fpu/s_scalbnl.c +++ b/sysdeps/ia64/fpu/s_scalbnl.c @@ -23,12 +23,12 @@ // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS @@ -48,11 +48,11 @@ long double __libm_scalbnl(long double, int, int); long double scalbnl(long double x, int n) { -#ifdef SIZE_INT_64 - return __libm_scalbnl(x,n,1); +#ifdef SIZE_INT_64 + return __libm_scalbnl(x,n,1); #else -#ifdef SIZE_INT_32 +#ifdef SIZE_INT_32 return __libm_scalbnl(x,n,0); #endif diff --git a/sysdeps/ia64/fpu/s_signbit.S b/sysdeps/ia64/fpu/s_signbit.S index 5703080fd8..a6ed929fa2 100644 --- a/sysdeps/ia64/fpu/s_signbit.S +++ b/sysdeps/ia64/fpu/s_signbit.S @@ -30,7 +30,7 @@ ENTRY (__signbit) (p6) mov ret0 = 1 (p7) mov ret0 = 0 br.ret.sptk.many rp -} +} END (__signbit) strong_alias (__signbit, __signbitf) diff --git a/sysdeps/ia64/fpu/s_significand.S b/sysdeps/ia64/fpu/s_significand.S index 720e043e5c..c3f921f820 100644 --- a/sysdeps/ia64/fpu/s_significand.S +++ b/sysdeps/ia64/fpu/s_significand.S @@ -21,20 +21,20 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // // History @@ -54,11 +54,11 @@ // If x = sig * 2**n with 1 <= sig < 2 // significand returns sig // -// predicate registers used: +// predicate registers used: // p6, p7 // -// floating-point registers used: -// f8, f9, f10 +// floating-point registers used: +// f8, f9, f10 .section .text GLOBAL_LIBM_ENTRY(significand) @@ -69,12 +69,12 @@ GLOBAL_LIBM_ENTRY(significand) // f10 gets f8(sign) with f1(exp,significand) { .mfi nop.m 999 - fmerge.s f10 = f8,f1 + fmerge.s f10 = f8,f1 nop.i 999 } { .mfi nop.m 999 - fnorm.s0 f9 = f8 + fnorm.s0 f9 = f8 nop.i 999 ;; } @@ -91,7 +91,7 @@ GLOBAL_LIBM_ENTRY(significand) // return sign(f8) exp(f8) significand(f8), normalized. { .mfi nop.m 999 - fclass.m.unc p0,p6 = f8, 0xe7 + fclass.m.unc p0,p6 = f8, 0xe7 nop.i 999 ;; } @@ -109,7 +109,7 @@ GLOBAL_LIBM_ENTRY(significand) { .mfb nop.m 999 - fnorm.d.s0 f8 = f8 + fnorm.d.s0 f8 = f8 br.ret.sptk b0 ;; } diff --git a/sysdeps/ia64/fpu/s_significandf.S b/sysdeps/ia64/fpu/s_significandf.S index 5c8299b944..5ae4c74ab5 100644 --- a/sysdeps/ia64/fpu/s_significandf.S +++ b/sysdeps/ia64/fpu/s_significandf.S @@ -21,20 +21,20 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // // History @@ -53,11 +53,11 @@ // If x = sig * 2**n with 1 <= sig < 2 // significandf returns sig // -// predicate registers used: +// predicate registers used: // p6, p7 // -// floating-point registers used: -// f8, f9, f10 +// floating-point registers used: +// f8, f9, f10 .section .text GLOBAL_LIBM_ENTRY(significandf) @@ -68,12 +68,12 @@ GLOBAL_LIBM_ENTRY(significandf) // f10 gets f8(sign) with f1(exp,significand) { .mfi nop.m 999 - fmerge.s f10 = f8,f1 + fmerge.s f10 = f8,f1 nop.i 999 } { .mfi nop.m 999 - fnorm.s0 f9 = f8 + fnorm.s0 f9 = f8 nop.i 999 ;; } @@ -90,7 +90,7 @@ GLOBAL_LIBM_ENTRY(significandf) // return sign(f8) exp(f8) significand(f8), normalized. { .mfi nop.m 999 - fclass.m.unc p0,p6 = f8, 0xe7 + fclass.m.unc p0,p6 = f8, 0xe7 nop.i 999 ;; } diff --git a/sysdeps/ia64/fpu/s_significandl.S b/sysdeps/ia64/fpu/s_significandl.S index f62df4310c..e30c83cb72 100644 --- a/sysdeps/ia64/fpu/s_significandl.S +++ b/sysdeps/ia64/fpu/s_significandl.S @@ -21,20 +21,20 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // // History @@ -54,11 +54,11 @@ // If x = sig * 2**n with 1 <= sig < 2 // significandl returns sig // -// predicate registers used: +// predicate registers used: // p6, p7 // -// floating-point registers used: -// f8, f9, f10 +// floating-point registers used: +// f8, f9, f10 .section .text GLOBAL_LIBM_ENTRY(significandl) @@ -69,12 +69,12 @@ GLOBAL_LIBM_ENTRY(significandl) // f10 gets f8(sign) with f1(exp,significand) { .mfi nop.m 999 - fmerge.s f10 = f8,f1 + fmerge.s f10 = f8,f1 nop.i 999 } { .mfi nop.m 999 - fnorm.s0 f9 = f8 + fnorm.s0 f9 = f8 nop.i 999 ;; } @@ -84,14 +84,14 @@ GLOBAL_LIBM_ENTRY(significandl) fclass.m.unc p7,p0 = f8, 0x0b nop.i 999 ;; } - + // p6 = TRUE ==> x is not (nan,inf,0) // return sign(f8) exp(f1) significand(f8) // else x is (nan,inf,0) // return sign(f8) exp(f8) significand(f8), normalized. { .mfi nop.m 999 - fclass.m.unc p0,p6 = f8, 0xe7 + fclass.m.unc p0,p6 = f8, 0xe7 nop.i 999 ;; } @@ -131,7 +131,7 @@ SIGNIFICAND_DENORM: // This will be the final result unless x double-extended denormal { .mfi nop.m 999 - fnorm.s0 f8 = f8 + fnorm.s0 f8 = f8 nop.i 999 ;; } @@ -146,7 +146,7 @@ SIGNIFICAND_DENORM: // Final normalization if x double-extended denorm { .mfb nop.m 999 -(p7) fnorm.s0 f8 = f8 +(p7) fnorm.s0 f8 = f8 br.ret.sptk b0 ;; } diff --git a/sysdeps/ia64/fpu/s_tan.S b/sysdeps/ia64/fpu/s_tan.S index a2f80c8858..0a13d60d3a 100644 --- a/sysdeps/ia64/fpu/s_tan.S +++ b/sysdeps/ia64/fpu/s_tan.S @@ -21,20 +21,20 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // // History diff --git a/sysdeps/ia64/fpu/s_tanf.S b/sysdeps/ia64/fpu/s_tanf.S index 193d7568a5..f14cdff61b 100644 --- a/sysdeps/ia64/fpu/s_tanf.S +++ b/sysdeps/ia64/fpu/s_tanf.S @@ -21,20 +21,20 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // // History diff --git a/sysdeps/ia64/fpu/s_tanh.S b/sysdeps/ia64/fpu/s_tanh.S index 9adbc9c461..0a0b807127 100644 --- a/sysdeps/ia64/fpu/s_tanh.S +++ b/sysdeps/ia64/fpu/s_tanh.S @@ -21,20 +21,20 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // // History @@ -71,10 +71,10 @@ // // 3. Main path: 0.25 <= |x| < 19.0625 // For several ranges of 0.25 <= |x| < 19.0625 -// Return tanh(x) = sign(x)*(A0 + y*A1 + y^2*A2 + +// Return tanh(x) = sign(x)*(A0 + y*A1 + y^2*A2 + // + y^3*A3 + ... + y^19*A19) // where y = (|x|/a) - b -// +// // For each range there is particular set of coefficients. // Below is the list of ranges: // 1/4 <= |x| < 1/2 a = 0.25, b = 1.0 @@ -87,28 +87,28 @@ // 8.0 <= |x| < 13.0 a = 8.0, b = 1.0 // 13.0 <= |x| < 16.0 a = 8.0, b = 2.0 // 16.0 <= |x| < 19.0625 a = 16.0, b = 1.0 -// ( [3.25;4.0], [6.5;8.0], [13.0;16.0] subranges separated +// ( [3.25;4.0], [6.5;8.0], [13.0;16.0] subranges separated // for monotonicity issues resolve ) // -// 4. Saturation path: 19.0625 <= |x| < +INF +// 4. Saturation path: 19.0625 <= |x| < +INF // Return tanh(x) = sign(x)*(1.0 - tiny_value) // (tiny_value ~ 2^(-63)) // // Registers used //============================================================================== -// Floating Point registers used: +// Floating Point registers used: // f8 = input, output // f32 -> f64 // -// General registers used: +// General registers used: // r32 -> r51, r2, r3 // // Predicate registers used: // p6, p8, p10, p11, p12, p14, p15 // p6 arg is zero, denormal or special IEEE -// p8 to filter out case when signd(x) > 1.625 +// p8 to filter out case when signd(x) > 1.625 // p10 to filter out case when |x| < 0.25 -// p11 to filter out case when signd(x) <= 1.625 +// p11 to filter out case when signd(x) <= 1.625 // p12 to filter out case when |x| >= 19.0625 // p14 set to 1 for positive x // p15 set to 1 for negative x @@ -169,7 +169,7 @@ fTSqr = f58 fTQuadr = f59 fTDeg3 = f60 fTDeg7 = f61 -fArgAbsNormSgn = f62 +fArgAbsNormSgn = f62 fTQuadrSgn = f63 fTwo = f64 @@ -184,7 +184,7 @@ LOCAL_OBJECT_START(tanh_data) // Main path coefficients: // Coefficients ##0..15 ("main" coefficient tables) -// Polynomial coefficients for the tanh(x), 0.25 <= |x| < 0.5 +// Polynomial coefficients for the tanh(x), 0.25 <= |x| < 0.5 data8 0xE9D218BC9A3FB55A, 0x00003FC7 //A19 data8 0xC8C0D38687F36EBA, 0x00003FCE //A18 data8 0xA2663E519FAC8A43, 0x0000BFD2 //A17 @@ -202,7 +202,7 @@ data8 0x8E1C15876AA589AD, 0x0000BFEF //A6 data8 0x942226246A8C2A86, 0x00003FF1 //A5 data8 0x8F06D9FF7DB47261, 0x00003FF4 //A4 // -// Polynomial coefficients for the tanh(x), 0.5 <= |x| < 1.0 +// Polynomial coefficients for the tanh(x), 0.5 <= |x| < 1.0 data8 0xC4A7B8FB672A8520, 0x00003FDC //A19 data8 0xA20724B847E13499, 0x0000BFE0 //A18 data8 0xE17DB53F02E4D340, 0x00003FE2 //A17 @@ -220,7 +220,7 @@ data8 0xCE63E8FA6B96480B, 0x0000BFF4 //A6 data8 0xDF017BE0D4FE45D8, 0x0000BFF4 //A5 data8 0xA8A0C6E2226DF3CD, 0x00003FF8 //A4 // -// Polynomial coefficients for the tanh(x), 1.0 <= |x| < 2.0 +// Polynomial coefficients for the tanh(x), 1.0 <= |x| < 2.0 data8 0x8E89D2EBFDAA160B, 0x00003FE9 //A19 data8 0xDD9226310A272046, 0x0000BFEC //A18 data8 0xA038042D28B0D665, 0x00003FEF //A17 @@ -238,7 +238,7 @@ data8 0x9B02FE0DAF42C08F, 0x00003FF9 //A6 data8 0xBDACE06F531D9491, 0x0000BFFA //A5 data8 0xE3048AD1DB2F648C, 0x00003FF9 //A4 // -// Polynomial coefficients for the tanh(x), 2.0 <= |x| < 3.25 +// Polynomial coefficients for the tanh(x), 2.0 <= |x| < 3.25 data8 0x856EC3B0330A385A, 0x00003FEB //A19 data8 0xC641D69DAE2D429C, 0x0000BFF2 //A18 data8 0xC683EB0BE1343FFF, 0x00003FF5 //A17 @@ -256,7 +256,7 @@ data8 0xA6CAAD4A3E31A7D5, 0x0000BFF8 //A6 data8 0x9CABD76D1D5C3878, 0x00003FFC //A5 data8 0x92906D077941CAA9, 0x0000BFFD //A4 // -// Polynomial coefficients for the tanh(x), 4.0 <= |x| < 6.5 +// Polynomial coefficients for the tanh(x), 4.0 <= |x| < 6.5 data8 0x9232D19F71709AC9, 0x0000BFF5 //A19 data8 0x819E31323F5DD3F8, 0x00003FF8 //A18 data8 0xDA8E1CDB8D23DC29, 0x0000BFF9 //A17 @@ -274,7 +274,7 @@ data8 0xF4CA0B968AF2DDE2, 0x0000BFFC //A6 data8 0xB99874B482BD17EE, 0x00003FFC //A5 data8 0xE93FB2F99431DC1D, 0x0000BFFB //A4 // -// Polynomial coefficients for the tanh(x), 8.0 <= |x| < 13.0 +// Polynomial coefficients for the tanh(x), 8.0 <= |x| < 13.0 data8 0xAAA9EB7EADA85CEC, 0x00003FF5 //A19 data8 0x980C80EE05A6BE78, 0x0000BFF8 //A18 data8 0x818DA9F5396390A5, 0x00003FFA //A17 @@ -292,7 +292,7 @@ data8 0xABD91DCE40D5EECB, 0x0000BFF7 //A6 data8 0x80E375C1B847B72F, 0x00003FF6 //A5 data8 0xA11C7DD978CF700A, 0x0000BFF4 //A4 // -// Polynomial coefficients for the tanh(x), 16.0 <= |x| < 19.0625 +// Polynomial coefficients for the tanh(x), 16.0 <= |x| < 19.0625 data8 0xE29D17C510F86F6B, 0x00003FF3 //A19 data8 0x88FE52EB39A3A98C, 0x0000BFF5 //A18 data8 0xA406547E50360693, 0x00003FF5 //A17 @@ -311,7 +311,7 @@ data8 0xF358B2C46F10CBAF, 0x00003FE3 //A5 data8 0x98176FD06229A385, 0x0000BFE1 //A4 // // Binary subranges -// Polynomial coefficients for the tanh(x), 3.25 <= |x| < 4.0 +// Polynomial coefficients for the tanh(x), 3.25 <= |x| < 4.0 data8 0xEF2EE841288F6706, 0x00003FE9 //A19 data8 0xE65D5B74B85F82A6, 0x00003FEB //A18 data8 0xE495FC21E42A79FF, 0x00003FEA //A17 @@ -329,7 +329,7 @@ data8 0xF4CA0661307243C7, 0x0000BFF6 //A6 data8 0xB998746D57061F74, 0x00003FF7 //A5 data8 0xE93FB2F482327C19, 0x0000BFF7 //A4 // -// Polynomial coefficients for the tanh(x), 6.5 <= |x| < 8.0 +// Polynomial coefficients for the tanh(x), 6.5 <= |x| < 8.0 data8 0xEB189B71ADC40BE2, 0x00003FEA //A19 data8 0xA60B46F9FF6DC2DF, 0x00003FEA //A18 data8 0xBB061CDD9F368B9D, 0x00003FEC //A17 @@ -347,7 +347,7 @@ data8 0xABD9E63CA575B950, 0x0000BFF1 //A6 data8 0x80E38B18E8D0F460, 0x00003FF1 //A5 data8 0xA11C80E20AAFDD3C, 0x0000BFF0 //A4 // -// Polynomial coefficients for the tanh(x), 13.0 <= |x| < 16.0 +// Polynomial coefficients for the tanh(x), 13.0 <= |x| < 16.0 data8 0xBECD0AF7E22E5594, 0x00003FE9 //A19 data8 0xE2834E2D68C1128C, 0x00003FEA //A18 data8 0x97B117611B317379, 0x00003FEB //A17 @@ -366,19 +366,19 @@ data8 0xF358D8A7FC012D5D, 0x00003FDE //A5 data8 0x98176E2309B7C73A, 0x0000BFDD //A4 // // Coefficients ##16..19 ("tail" coefficient tables) -// Polynomial coefficients for the tanh(x), 0.25 <= |x| < 0.5 +// Polynomial coefficients for the tanh(x), 0.25 <= |x| < 0.5 data8 0x838F209ABB9BA7B3, 0x0000BFF7 //A3 data8 0xEBC0AC78DA4FC500, 0x0000BFF8 //A2 data8 0xF0A4D02960B60E69, 0x00003FFC //A1 data8 0xFACBF534D0E42F8A, 0x00003FFC //A0 // -// Polynomial coefficients for the tanh(x), 0.5 <= |x| < 1.0 +// Polynomial coefficients for the tanh(x), 0.5 <= |x| < 1.0 data8 0xC0ECBDC0A0D133A6, 0x0000BFF8 //A3 data8 0xBA13A076BF8E812F, 0x0000BFFB //A2 data8 0xC954A37D1A1CA070, 0x00003FFD //A1 data8 0xEC9A9EBAB4579B29, 0x00003FFD //A0 // -// Polynomial coefficients for the tanh(x), 1.0 <= |x| < 2.0 +// Polynomial coefficients for the tanh(x), 1.0 <= |x| < 2.0 data8 0xD42E9175A6EA1397, 0x00003FFB //A3 data8 0xA3C361378A55CF56, 0x0000BFFD //A2 data8 0xD706E07CC8622983, 0x00003FFD //A1 @@ -427,7 +427,7 @@ data8 0xE42327B9B0D7202F, 0x0000BFD8 //A2 data8 0xE42327BB13076BD6, 0x00003FD5 //A1 data8 0xFFFFFFFFFFF8DEE7, 0x00003FFE //A0 // -// Polynomial coefficients for the tanh(x), 0.0 <= |x| < 0.25 +// Polynomial coefficients for the tanh(x), 0.0 <= |x| < 0.25 // ('tanh_near_zero' path) data8 0xBF2BA5D26E479D0C //A9 data8 0x3F4336D96F81EE26 //A8 @@ -441,7 +441,7 @@ data8 0x3FC1111111111108 //A2 // // 1.0 - 2^(-63) // ('tanh_saturation' path) -data8 0xFFFFFFFFFFFFFFFF, 0x00003FFE +data8 0xFFFFFFFFFFFFFFFF, 0x00003FFE LOCAL_OBJECT_END(tanh_data) // CAUTION: The order of table coefficients shouldn't be changed! @@ -461,8 +461,8 @@ GLOBAL_LIBM_ENTRY(tanh) };; { .mfi - getf.d rArg = f8 // x in GR - fclass.m p6,p0 = f8, 0xEF // Filter 0, denormals and specials + getf.d rArg = f8 // x in GR + fclass.m p6,p0 = f8, 0xEF // Filter 0, denormals and specials // 0xEF = @qnan|@snan|@pos|@neg|@zero|@unorm|@inf shl rArgSgnd = rArgSgnd, 52 // mask for exponent } @@ -493,11 +493,11 @@ GLOBAL_LIBM_ENTRY(tanh) nop.f 0 (p6) br.cond.spnt _tanh_spec // Branch to zero, denorm & specs };; - + { .mfi and rShiftedArgMasked = rShiftedArg, rMask // bias of x << 8 fmerge.s fArgAbs = f1, f8 // |x| - shr rShiftedAbsArg = rAbsArg, 44 // Select only necessary + shr rShiftedAbsArg = rAbsArg, 44 // Select only necessary // bits of absolute arg } { .mfi @@ -509,28 +509,28 @@ GLOBAL_LIBM_ENTRY(tanh) { .mfi sub rIndex = rShiftedArgMasked, rBias // index << 8 - nop.f 0 + nop.f 0 cmp.lt p10, p0 = rShiftedArgMasked, rBias // p10=1 if |x|<0.25 } { .mfb (p8) cmp.gt p8, p11 = rAbsArg, rTwo // If arg is greater than 2.0? // (then we should use binary subranges) - nop.f 0 + nop.f 0 (p10) br.cond.spnt tanh_near_zero // branch out if |x| < 0.25 };; .pred.rel "mutex",p8,p11 { .mfi -(p8) add rIndex = 0x400, rIndex // Make pointer to binary +(p8) add rIndex = 0x400, rIndex // Make pointer to binary // subranges (p11) fms.s1 fArgAbsNorm = fArgAbsNorm, f1, f1 // |x|/b - 1.0 addl rSaturation = 0x40331, r0 // shifted bits of 19.0625 } { .mfi - nop.m 0 + nop.m 0 (p8) fms.s1 fArgAbsNorm = fArgAbsNorm, f1, fTwo // |x|/b - 2.0 // this is only for binary subranges [3.25;4], [6.5;8], [13.0;16] - nop.i 0 + nop.i 0 } ;; @@ -544,7 +544,7 @@ GLOBAL_LIBM_ENTRY(tanh) adds rCoeffAddr2 = 16, rCoeffAddr1 // Shifted pointer to coeffs fmerge.s fSignumX = f8, f1 // signum(x) nop.i 0 -} +} { .mfb cmp.le p12, p0 = rSaturation, rShiftedAbsArg // |x|>=19.0625? nop.f 0 @@ -595,15 +595,15 @@ GLOBAL_LIBM_ENTRY(tanh) {.mfi ldfe fA12 = [rCoeffAddr2], 32 // Load A12 nop.f 0 - cmp.lt p15, p14 = rArg, r0 // Arg positive (p14) + cmp.lt p15, p14 = rArg, r0 // Arg positive (p14) // or negative (p15)? };; {.mfi ldfe fA11 = [rCoeffAddr1], 32 // Load A11 nop.f 0 - add rCoeffAddr4 = rCoeffAddr3, rCoeffAddr4 // shifted "tail" - // coeffs to load + add rCoeffAddr4 = rCoeffAddr3, rCoeffAddr4 // shifted "tail" + // coeffs to load } {.mfi ldfe fA10 = [rCoeffAddr2], 32 // Load A10 @@ -721,7 +721,7 @@ GLOBAL_LIBM_ENTRY(tanh) { .mfi nop.m 0 - fma.s1 fA15 = fA15, fTSqr, fA13 // Polynomial + fma.s1 fA15 = fA15, fTSqr, fA13 // Polynomial nop.i 0 } { .mfi @@ -743,19 +743,19 @@ GLOBAL_LIBM_ENTRY(tanh) };; { .mfi - nop.m 0 + nop.m 0 fma.s1 fA7 = fA7, fTSqr, fA5 // Polynomial nop.i 0 };; { .mfi - nop.m 0 + nop.m 0 fma.s1 fRes = fRes, fTQuadr, fA15 // Polynomial nop.i 0 };; { .mfi - nop.m 0 + nop.m 0 fma.s1 fA4 = fA4, fTSqr, fA2 // Polynomial nop.i 0 };; @@ -767,7 +767,7 @@ GLOBAL_LIBM_ENTRY(tanh) };; { .mfi - nop.m 0 + nop.m 0 fma.s1 fA4 = fA7, fTDeg3, fA4 // Polynomial nop.i 0 };; @@ -797,7 +797,7 @@ GLOBAL_LIBM_ENTRY(tanh) tanh_near_zero: { .mfi adds rCoeffAddr1 = 0xC80, rDataPtr // address of A9 - fma.s0 fTSqr = fArgSqr, fArgSqr, f0 // x^4 + fma.s0 fTSqr = fArgSqr, fArgSqr, f0 // x^4 nop.i 0 } { .mfi @@ -931,51 +931,51 @@ tanh_saturation: - + // 0, denormals and special IEEE numbers path ///////////////////////////////// _tanh_spec: -{ .mfi - cmp.lt p15, p14 = rArg, r0 // Is arg negative (p15) +{ .mfi + cmp.lt p15, p14 = rArg, r0 // Is arg negative (p15) // or positive p14) fclass.m p6,p0 = f8, 0x23 // To filter infinities - // 0x23 = @pos|@neg|@inf + // 0x23 = @pos|@neg|@inf nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fclass.m p7,p0 = f8, 0xC7 // To filter NaNs & Zeros // 0xC7 = @pos|@neg|@zero|@qnan|@snan nop.i 0 };; -{ .mfb +{ .mfb nop.m 0 -(p6) fmerge.s f8 = f8, f1 // +/-1 for INF args +(p6) fmerge.s f8 = f8, f1 // +/-1 for INF args (p6) br.ret.spnt b0 // exit for x = INF };; -{ .mfb +{ .mfb nop.m 0 -(p7) fma.d.s0 f8 = f8, f1, f8 // +/-0 for 0 args +(p7) fma.d.s0 f8 = f8, f1, f8 // +/-0 for 0 args // and NaNs for NaNs (p7) br.ret.spnt b0 // exit for x = NaN or +/-0 };; -{ .mfi +{ .mfi nop.m 0 fnorm.s0 f8 = f8 // Normalize arg nop.i 0 };; .pred.rel "mutex",p14,p15 -{ .mfi +{ .mfi nop.m 0 (p14) fnma.d.s0 f8 = f8, f8, f8 // res = r-r^2 nop.i 0 } -{ .mfb +{ .mfb nop.m 0 (p15) fma.d.s0 f8 = f8, f8, f8 // res = r+r^2 br.ret.sptk b0 // 0, denormals, specials return diff --git a/sysdeps/ia64/fpu/s_tanhf.S b/sysdeps/ia64/fpu/s_tanhf.S index e4e91cfe63..4749477b40 100644 --- a/sysdeps/ia64/fpu/s_tanhf.S +++ b/sysdeps/ia64/fpu/s_tanhf.S @@ -21,20 +21,20 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // // History @@ -85,7 +85,7 @@ // 6. |x| = INF // Return tanhf(x) = sign(x) * 1.0 // -// 7. x = [S,Q]NaN +// 7. x = [S,Q]NaN // Return tanhf(x) = QNaN // // 8. x is positive denormal @@ -96,11 +96,11 @@ // // Registers used //============================================================== -// Floating Point registers used: +// Floating Point registers used: // f8, input // f32 -> f59 -// General registers used: +// General registers used: // r32 -> r46, r2, r3 // Predicate registers used: @@ -220,7 +220,7 @@ data8 0xC0BE48CFADE2431E // D0 data8 0x4090E74249760FDD // D1 data8 0xC04B6F537FCF2F1E // D2 data8 0x3E0DCD879C91ADEA // B0 -// Polynomial coefficients for the tanh(x), -0.3125 < x < 0.3125 +// Polynomial coefficients for the tanh(x), -0.3125 < x < 0.3125 data8 0xBFD555551E8245B7 // A0 data8 0x3FC110E63F52E689 // A1 data8 0xBFAB8CD6A5B7BAFA // A2 @@ -250,7 +250,7 @@ data8 0xBFB1DEA49A831CBC // A0 data8 0x3FFA729FC7085674 // A1 data8 0xBFF2F44D923A8FA4 // A2 data8 0x3FE092FC5712227E // A3 -// Polynomial coefficients for the tanh(x), 8.0 <= |x| <= 9.125 +// Polynomial coefficients for the tanh(x), 8.0 <= |x| <= 9.125 data8 0x3FEFFF5769EE3041 // A0 data8 0x3EFBBF148D850891 // A1 data8 0xBEC86BCEF0F5C2FE // A2 @@ -275,10 +275,10 @@ GLOBAL_LIBM_ENTRY(tanhf) ;; { .mfi - getf.s rArg = f8 // x in GR + getf.s rArg = f8 // x in GR fclass.m p7,p0 = f8, 0x0b // is x denormal ? // sign bit and 2 most bits in significand - shl rMask = rMask, 20 + shl rMask = rMask, 20 } { .mfi ld8 rDataPtr = [rDataPtr] @@ -317,7 +317,7 @@ GLOBAL_LIBM_ENTRY(tanhf) shr rOffset2 = rOffset2, 21 } { .mfi - cmp.lt p10, p8 = rAbsArg, rBound // |x| < 0.3125? + cmp.lt p10, p8 = rAbsArg, rBound // |x| < 0.3125? nop.f 0 adds rCoeffAddr3 = 16, rDataPtr } @@ -338,8 +338,8 @@ GLOBAL_LIBM_ENTRY(tanhf) { .mfi shladd rCoeffAddr1 = rBias, 4, rDataPtr fma.s1 fArg3Sgn = fArgSqr, f8, f0 // sign(x)*|x|^3 - // is |x| < 9.125? - cmp.lt p11, p12 = rAbsArg, rSaturation + // is |x| < 9.125? + cmp.lt p11, p12 = rAbsArg, rSaturation } { .mfi shladd rCoeffAddr3 = rBias, 4, rCoeffAddr3 @@ -351,7 +351,7 @@ GLOBAL_LIBM_ENTRY(tanhf) { .mfi (p11) ldfpd fC0, fC1 = [rCoeffAddr1] (p9) fmerge.s f8 = f8,f1 // +/- inf -(p12) adds rDataPtr = 544, rDataPtr +(p12) adds rDataPtr = 544, rDataPtr } { .mfb (p11) ldfpd fC2, fC3 = [rCoeffAddr3], 16 @@ -404,7 +404,7 @@ GLOBAL_LIBM_ENTRY(tanhf) { .mfb nop.m 0 fma.s1 fArg6Sgn = fArg3, fArg3Sgn, f0 // sign(x)*|x|^6 -(p13) br.cond.spnt tanhf_close_to_saturation +(p13) br.cond.spnt tanhf_close_to_saturation } ;; @@ -440,7 +440,7 @@ GLOBAL_LIBM_ENTRY(tanhf) { .mfi nop.m 0 - fma.s1 fPolATmp = fA3, fAbsArg, fA2 // A3*|x| + A2 + fma.s1 fPolATmp = fA3, fAbsArg, fA2 // A3*|x| + A2 nop.i 0 } { .mfi @@ -452,7 +452,7 @@ GLOBAL_LIBM_ENTRY(tanhf) { .mfi nop.m 0 // C3*|x|^3 + C2*x^2 + C1*|x| + C0 - fma.s1 fPolC = fPolC, fArgSqr, fPolCTmp + fma.s1 fPolC = fPolC, fArgSqr, fPolCTmp nop.i 0 } ;; @@ -460,31 +460,31 @@ GLOBAL_LIBM_ENTRY(tanhf) { .mfi nop.m 0 // PolD = sign(x)*(|x|^7 + D2*x^6 + D1*|x|^5 + D0*x^4) - fma.d.s1 fPolD = fPolD, fArg4Sgn, fPolDTmp + fma.d.s1 fPolD = fPolD, fArg4Sgn, fPolDTmp nop.i 0 } ;; { .mfi nop.m 0 - // PolA = A3|x|^3 + A2*x^2 + A1*|x| + A0 - fma.d.s1 fPolA = fPolATmp, fArgSqr, fPolA + // PolA = A3|x|^3 + A2*x^2 + A1*|x| + A0 + fma.d.s1 fPolA = fPolATmp, fArgSqr, fPolA nop.i 0 } -;; +;; { .mfi nop.m 0 - // PolC = B0*x^4 + C3*|x|^3 + C2*|x|^2 + C1*|x| + C0 - fma.d.s1 fPolC = fPolC, f1, fB0 + // PolC = B0*x^4 + C3*|x|^3 + C2*|x|^2 + C1*|x| + C0 + fma.d.s1 fPolC = fPolC, f1, fB0 nop.i 0 } -;; +;; { .mfi nop.m 0 (p14) fma.s.s0 f8 = fPolC, fPolD, fPolA // for positive x - nop.i 0 + nop.i 0 } { .mfb nop.m 0 @@ -528,7 +528,7 @@ tanhf_saturation: br.ret.sptk b0 // Exit for 9.125 <=|x|< +inf } ;; - + // Here if 8.0 <= |x| < 9.125 tanhf_close_to_saturation: { .mfi @@ -540,7 +540,7 @@ tanhf_close_to_saturation: nop.m 0 fma.s1 fPolA = fA3, fAbsArg, fA2 // A3*|x| + A2 nop.i 0 -} +} ;; .pred.rel "mutex", p14, p15 @@ -548,7 +548,7 @@ tanhf_close_to_saturation: nop.m 0 // for positive x (p14) fma.s.s0 f8 = fPolA, fArgSqr, fPolATmp - nop.i 0 + nop.i 0 } { .mfb nop.m 0 diff --git a/sysdeps/ia64/fpu/s_tanhl.S b/sysdeps/ia64/fpu/s_tanhl.S index 3435f4313e..8da6afb378 100644 --- a/sysdeps/ia64/fpu/s_tanhl.S +++ b/sysdeps/ia64/fpu/s_tanhl.S @@ -21,20 +21,20 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // // History @@ -68,7 +68,7 @@ // // 3. Main path: 1/8 <= |x| < 22.8 // For several ranges of 1/8 <= |x| < 22.8 -// Return tanhl(x) = sign(x)*((A0H+A0L) + y*(A1H+A1L) + y^2*(A2H+A2L) + +// Return tanhl(x) = sign(x)*((A0H+A0L) + y*(A1H+A1L) + y^2*(A2H+A2L) + // + y^3*A3 + y^4*A4 + ... + y^25*A25 ) // where y = (|x|/a) - b // @@ -85,10 +85,10 @@ // 8.0 <= |x| < 13.0 a = 8.0, b = 1.5 // 13.0 <= |x| < 16.0 a = 8.0, b = 2.0 // 16.0 <= |x| < 22.8 a = 16.0, b = 1.5 -// ( [3.25;4.0], [6.5;8.0], [13.9;16.0] subranges separated +// ( [3.25;4.0], [6.5;8.0], [13.9;16.0] subranges separated // for monotonicity issues resolve ) // -// 4. Saturation path: 22.8 <= |x| < +INF +// 4. Saturation path: 22.8 <= |x| < +INF // Return tanhl(x) = sign(x)*(1.0 - tiny_value) // (tiny_value ~ 1e-1233) // @@ -112,10 +112,10 @@ // Multiprecision have to be performed only for first few // polynomial iterations (up to 3-rd x degree) // Here we use the same parallelisation way as above: -// Split whole polynomial to first, "multiprecision" part, and second, +// Split whole polynomial to first, "multiprecision" part, and second, // so called "tail", native precision part. // -// 1) Multiprecision part: +// 1) Multiprecision part: // [v1=(A0H+A0L)+y*(A1H+A1L)] + [v2=y^2*((A2H+A2L)+y*A3)] // v1 and v2 terms calculated in parallel // @@ -123,7 +123,7 @@ // v3 = x^4 * ( A4 + x*A5 + ... + x^21*A25 ) // v3 is splitted to 2 even parts (10 coefficient in each one). // These 2 parts are also factorized using binary tree technique. -// +// // So Multiprecision and Tail parts cost is almost the same // and we have both results ready before final summation. // @@ -132,29 +132,29 @@ // not at the last operation but much more earlier and at // several places. // -// 4. Saturation path: 22.8 <= |x| < +INF +// 4. Saturation path: 22.8 <= |x| < +INF // // We use formula sign(x)*(1.0 - tiny_value) instead of simple sign(x)*1.0 // just to meet IEEE requirements for different rounding modes in this case. // // Registers used //============================================================== -// Floating Point registers used: +// Floating Point registers used: // f8 - input & output // f32 -> f92 -// General registers used: -// r2, r3, r32 -> r52 +// General registers used: +// r2, r3, r32 -> r52 // Predicate registers used: // p0, p6 -> p11, p14, p15 // p6 - arg is zero, denormal or special IEEE // p7 - arg is in [16;32] binary interval -// p8 - arg is in one of subranges +// p8 - arg is in one of subranges // [3.25;4.0], [6.5;8.0], [13.9;16.0] // p9 - arg < 1/8 -// p10 - arg is NOT in one of subranges +// p10 - arg is NOT in one of subranges // [3.25;4.0], [6.5;8.0], [13.9;16.0] // p11 - arg in saturation domain // p14 - arg is positive @@ -211,9 +211,9 @@ fA16 = f51 fA17 = f52 fA18 = f53 fA19 = f54 -fA20 = f55 -fA21 = f56 -fA22 = f57 +fA20 = f55 +fA21 = f56 +fA22 = f57 fA23 = f58 fA24 = f59 fA25 = f60 @@ -242,10 +242,10 @@ fRes3H = f79 fRes3L = f80 fRes4 = f81 -fTT = f82 +fTT = f82 fTH = f83 fTL = f84 -fTT2 = f85 +fTT2 = f85 fTH2 = f86 fTL2 = f87 @@ -264,7 +264,7 @@ LOCAL_OBJECT_START(tanhl_data) ////////// Main tables /////////// _0p125_to_0p25_data: // exp = 2^-3 -// Polynomial coefficients for the tanh(x), 1/8 <= |x| < 1/4 +// Polynomial coefficients for the tanh(x), 1/8 <= |x| < 1/4 data8 0x93D27D6AE7E835F8, 0x0000BFF4 //A3 = -5.6389704216278164626050408239e-04 data8 0xBF66E8668A78A8BC //A2H = -2.7963640930198357253955165902e-03 data8 0xBBD5384EFD0E7A54 //A2L = -1.7974001252014762983581666453e-20 @@ -287,7 +287,7 @@ data8 0x83C8DDF213711381, 0x0000BFCC //A14 = -4.5721980583985311263109531319e-16 LOCAL_OBJECT_END(tanhl_data) LOCAL_OBJECT_START(_0p25_to_0p5_data) -// Polynomial coefficients for the tanh(x), 1/4 <= |x| < 1/2 +// Polynomial coefficients for the tanh(x), 1/4 <= |x| < 1/2 data8 0xB6E27B747C47C8AD, 0x0000BFF6 //A3 = -2.7905990032063258105302045572e-03 data8 0xBF93FD54E226F8F7 //A2H = -1.9521070769536099515084615064e-02 data8 0xBC491BC884F6F18A //A2L = -2.7222721075104525371410300625e-18 @@ -310,7 +310,7 @@ data8 0x905F6F124AF956B1, 0x00003FD8 //A14 = 2.0516607231389483452611375485e-12 LOCAL_OBJECT_END(_0p25_to_0p5_data) LOCAL_OBJECT_START(_0p5_to_1_data) -// Polynomial coefficients for the tanh(x), 1/2 <= |x| < 1 +// Polynomial coefficients for the tanh(x), 1/2 <= |x| < 1 data8 0xAB402BE491EE72A7, 0x00003FF7 //A3 = 5.2261556931080934657023772945e-03 data8 0xBFB8403D3DDA87BE //A2H = -9.4730212784752659826992271519e-02 data8 0xBC6FF7BC2AB71A8B //A2L = -1.3863786398568460929625760740e-17 @@ -333,7 +333,7 @@ data8 0xC78363FF929EFF62, 0x0000BFE4 //A14 = -1.1613199289622686725595739572e-08 LOCAL_OBJECT_END(_0p5_to_1_data) LOCAL_OBJECT_START(_1_to_2_data) -// Polynomial coefficients for the tanh(x), 1 <= |x| < 2.0 +// Polynomial coefficients for the tanh(x), 1 <= |x| < 2.0 data8 0xB3D8FB48A548D99A, 0x00003FFB //A3 = 8.7816203264683800892441646129e-02 data8 0xBFC4EFBD8FB38E3B //A2H = -1.6356629864377389416141284073e-01 data8 0xBC77687FD8087B23 //A2L = -2.0303377679446772162287121190e-17 @@ -356,7 +356,7 @@ data8 0x8672AF27EB0823B7, 0x00003FEF //A14 = 1.6027448793338500004496520337e-05 LOCAL_OBJECT_END(_1_to_2_data) LOCAL_OBJECT_START(_2_to_3p25_data) -// Polynomial coefficients for the tanh(x), 2 <= |x| < 3.25 +// Polynomial coefficients for the tanh(x), 2 <= |x| < 3.25 data8 0xD45657BEC559E366, 0x00003FFA //A3 = 5.1840155367548909799883161889e-02 data8 0xBFA41B109CA6AB81 //A2H = -3.9268988726084870510835145296e-02 data8 0xBC2C3D708A4E56C5 //A2L = -7.6544669252238280132415018518e-19 @@ -379,7 +379,7 @@ data8 0xE1851A2D00737A5D, 0x00003FF2 //A14 = 2.1507256570895163202182573369e-04 LOCAL_OBJECT_END(_2_to_3p25_data) LOCAL_OBJECT_START(_4_to_6p5_data) -// Polynomial coefficients for the tanh(x), 4 <= |x| < 6.5 +// Polynomial coefficients for the tanh(x), 4 <= |x| < 6.5 data8 0x896FDBD321A0BE58, 0x00003FF5 //A3 = 1.0485606995331904734870550114e-03 data8 0xBF39C522B95A37D6 //A2H = -3.9321992640217512306882730044e-04 data8 0xBBA9B3EC39A45338 //A2L = -2.7213922673282819034134988241e-21 @@ -402,7 +402,7 @@ data8 0x922EC6F3CFE0496E, 0x0000BFF4 //A14 = -5.5764283474946207558456581668e-04 LOCAL_OBJECT_END(_4_to_6p5_data) LOCAL_OBJECT_START(_8_to_13_data) -// Polynomial coefficients for the tanh(x), 8 <= |x| < 13 +// Polynomial coefficients for the tanh(x), 8 <= |x| < 13 data8 0xDD6050A898303460, 0x00003FE6 //A3 = 5.1543170295688189081352133793e-08 data8 0xBE44C1078FDBADC0 //A2H = -9.6643444318955652627581125180e-09 data8 0xBAF95FCAA6DBBA6F //A2L = -1.3118146684038113473094275420e-24 @@ -425,7 +425,7 @@ data8 0x82DEDAA539A3A3F1, 0x0000BFF1 //A14 = -6.2403928644276709411156885292e-05 LOCAL_OBJECT_END(_8_to_13_data) LOCAL_OBJECT_START(_16_to_22p8_data) -// Polynomial coefficients for the tanh(x), 16 <= |x| < 22.88 +// Polynomial coefficients for the tanh(x), 16 <= |x| < 22.88 data8 0x992C00F33DDE804D, 0x00003FCE //A3 = 2.1256869805798788337547274131e-15 data8 0x3C8D42EA28102760 //A2H = 5.0760412270332007485198379096e-17 data8 0x391A747B43B072DD //A2L = 1.2737621993898125881520341053e-33 @@ -448,7 +448,7 @@ data8 0xDA2470DE110B293E, 0x00003FF1 //A14 = 1.0401837693241806604296821650e-04 LOCAL_OBJECT_END(_16_to_22p8_data) LOCAL_OBJECT_START(_3p25_to_4_data) -// Polynomial coefficients for the tanh(x), 3.25 <= |x| < 4 +// Polynomial coefficients for the tanh(x), 3.25 <= |x| < 4 data8 0xE9E07240432926E6, 0x00003FF7 //A3 = 7.1373517862636557382403555215e-03 data8 0xBF75F495227AF306 //A2H = -5.3602052282115727338540622782e-03 data8 0xBBBE92D355A6B716 //A2L = -6.4741983326810209847018826624e-21 @@ -471,7 +471,7 @@ data8 0x8987DF26A6789CCF, 0x00003FEE //A14 = 8.1974714257536543772040700977e-06 LOCAL_OBJECT_END(_3p25_to_4_data) LOCAL_OBJECT_START(_6p5_to_8_data) -// Polynomial coefficients for the tanh(x), 6.5 <= |x| < 8.0 +// Polynomial coefficients for the tanh(x), 6.5 <= |x| < 8.0 data8 0xA11C8A63815E5657, 0x00003FEF //A3 = 1.9205985861286093001394561449e-05 data8 0xBEDE355AD6CB61D8 //A2H = -7.2022479400070228499307345427e-06 data8 0xBB8E6B50B8468A63 //A2L = -8.0518953122203408718779840543e-22 @@ -494,7 +494,7 @@ data8 0xBE25D0FD069D0A93, 0x0000BFEE //A14 = -1.1333687314965721384777951065e-05 LOCAL_OBJECT_END(_6p5_to_8_data) LOCAL_OBJECT_START(_13_to_16_data) -// Polynomial coefficients for the tanh(x), 13 <= |x| < 16 +// Polynomial coefficients for the tanh(x), 13 <= |x| < 16 data8 0x98176FD2075BDBD5, 0x00003FDB //A3 = 1.7290807363028159200235264756e-11 data8 0xBD8C8464F76162D1 //A2H = -3.2420263805679445515400340441e-12 data8 0xBA2D56B508E0F1FD //A2L = -1.8515322669984580704502445180e-28 @@ -519,7 +519,7 @@ LOCAL_OBJECT_END(_13_to_16_data) //////// "Tail" tables ////////// LOCAL_OBJECT_START(_0p125_to_0p25_data_tail) -// Polynomial coefficients for the erf(x), 1/8 <= |x| < 1/4 +// Polynomial coefficients for the erf(x), 1/8 <= |x| < 1/4 data8 0x9D7D206E97ADC83A, 0x0000BFCC //A13 = -5.4639895428711257047470806445e-16 data8 0xA8972B666A845810, 0x00003FD3 //A12 = 7.4869224589947988668562043110e-14 data8 0x9A5B31511C9F4698, 0x0000BFD4 //A11 = -1.3709586467430093373657009487e-13 @@ -533,7 +533,7 @@ data8 0xE7C2AE92CB36769B, 0x00003FEF //A4 = 2.7628001723157068127646694830e-05 LOCAL_OBJECT_END(_0p125_to_0p25_data_tail) LOCAL_OBJECT_START(_0p25_to_0p5_data_tail) -// Polynomial coefficients for the tanh(x), 1/4 <= |x| < 1/2 +// Polynomial coefficients for the tanh(x), 1/4 <= |x| < 1/2 data8 0x9E2972C008B9965E, 0x0000BFDC //A13 = -3.5961854154738002253192260213e-11 data8 0xC3EABA3D219BEA8A, 0x00003FDB //A12 = 2.2273173303628274478819473067e-11 data8 0xC50FB68D960D5CD9, 0x00003FE1 //A11 = 1.4338102430978399800743148719e-09 @@ -547,7 +547,7 @@ data8 0xAC262F3F8CF49C02, 0x00003FF4 //A4 = 6.5669692402266433496312492412e-04 LOCAL_OBJECT_END(_0p25_to_0p5_data_tail) LOCAL_OBJECT_START(_0p5_to_1_data_tail) -// Polynomial coefficients for the tanh(x), 1/2 <= |x| < 1 +// Polynomial coefficients for the tanh(x), 1/2 <= |x| < 1 data8 0xDF67FB36FFA2A538, 0x00003FE7 //A13 = 1.0403160796697495720021114635e-07 data8 0xB7FB80FB5AFA63A4, 0x0000BFE8 //A12 = -1.7134699677764282023124981753e-07 data8 0xC87625A0BA7D6C5F, 0x0000BFEA //A11 = -7.4677732458471897291461679095e-07 @@ -561,7 +561,7 @@ data8 0xCC4AB2EC0965499B, 0x00003FF7 //A4 = 6.2344907419841579664122448353e-03 LOCAL_OBJECT_END(_0p5_to_1_data_tail) LOCAL_OBJECT_START(_1_to_2_data_tail) -// Polynomial coefficients for the tanh(x), 1 <= |x| < 2.0 +// Polynomial coefficients for the tanh(x), 1 <= |x| < 2.0 data8 0xCCAEE174EAC17F78, 0x0000BFEE //A13 = -1.2200065117856038355953618829e-05 data8 0xA39DD0981D1A2776, 0x0000BFF0 //A12 = -3.9009204899026604074167603200e-05 data8 0xB7104FA27FAF80D0, 0x00003FF2 //A11 = 1.7458316338540792661905876072e-04 @@ -575,7 +575,7 @@ data8 0xCC8286B331BD8AAA, 0x0000BFF9 //A4 = -2.4964583478826523250880337777e-02 LOCAL_OBJECT_END(_1_to_2_data_tail) LOCAL_OBJECT_START(_2_to_3p25_data_tail) -// Polynomial coefficients for the tanh(x), 2 <= |x| < 3.25 +// Polynomial coefficients for the tanh(x), 2 <= |x| < 3.25 data8 0x92E1711A3BD6408B, 0x0000BFF4 //A13 = -5.6030514548041036913731470443e-04 data8 0x8B9BD885FF3E98C5, 0x00003FF5 //A12 = 1.0651304064581604055612602669e-03 data8 0xD041356C7FA26A22, 0x0000BFF5 //A11 = -1.5888574328066952147023520244e-03 @@ -589,7 +589,7 @@ data8 0xD01D077B42E7ED76, 0x0000BFFA //A4 = -5.0808934425896607486919526567e-02 LOCAL_OBJECT_END(_2_to_3p25_data_tail) LOCAL_OBJECT_START(_4_to_6p5_data_tail) -// Polynomial coefficients for the tanh(x), 4 <= |x| < 6.5 +// Polynomial coefficients for the tanh(x), 4 <= |x| < 6.5 data8 0x870CCE8C76C52C7E, 0x00003FF5 //A13 = 1.0303499350193060915603525934e-03 data8 0xE1431E54AD2A738B, 0x0000BFF5 //A12 = -1.7186140560972621669872002486e-03 data8 0xAB20056533E28734, 0x00003FF6 //A11 = 2.6111615345168277554841545330e-03 @@ -603,7 +603,7 @@ data8 0x896E211733AD9D40, 0x0000BFF6 //A4 = -2.0970183170010094667442967500e-03 LOCAL_OBJECT_END(_4_to_6p5_data_tail) LOCAL_OBJECT_START(_8_to_13_data_tail) -// Polynomial coefficients for the tanh(x), 8 <= |x| < 13 +// Polynomial coefficients for the tanh(x), 8 <= |x| < 13 data8 0xE50C3476BED020AA, 0x00003FF0 //A13 = 5.4609221347524272615754239857e-05 data8 0xBA16F5F4EDC0EABC, 0x0000BFF0 //A12 = -4.4367239594986428539386662937e-05 data8 0x8B916C2F002C3D91, 0x00003FF0 //A11 = 3.3275617838067362533536610680e-05 @@ -617,7 +617,7 @@ data8 0xDD6050A7761D67BB, 0x0000BFE8 //A4 = -2.0617268111985310661707082242e-07 LOCAL_OBJECT_END(_8_to_13_data_tail) LOCAL_OBJECT_START(_16_to_22p8_data_tail) -// Polynomial coefficients for the tanh(x), 16 <= |x| < 22.88 +// Polynomial coefficients for the tanh(x), 16 <= |x| < 22.88 data8 0xEAF4AF87336E81B1, 0x00003FEF //A13 = 2.8008914392791730186582989654e-05 data8 0xD5B309EA768E2711, 0x00003FED //A12 = 6.3687375204024238267961143128e-06 data8 0xA4048CA537113538, 0x00003FEB //A11 = 1.2220276227448617951538196845e-06 @@ -631,7 +631,7 @@ data8 0x86BC347939478174, 0x00003FD3 //A4 = 5.9834437707863962671883176163e-14 LOCAL_OBJECT_END(_16_to_22p8_data_tail) LOCAL_OBJECT_START(_3p25_to_4_data_tail) -// Polynomial coefficients for the tanh(x), 3.25 <= |x| < 4 +// Polynomial coefficients for the tanh(x), 3.25 <= |x| < 4 data8 0xBE9A2BE19F21BA1C, 0x0000BFEE //A13 = -1.1360778336288065244475976873e-05 data8 0xF84910F515BDB014, 0x00003FED //A12 = 7.3994819819577018481862729782e-06 data8 0xC4C84FB788AA4007, 0x00003FEF //A11 = 2.3458298013663976251972482656e-05 @@ -645,7 +645,7 @@ data8 0xE93FB2F48233275B, 0x0000BFF7 //A4 = -7.1181892208343798194003322900e-03 LOCAL_OBJECT_END(_3p25_to_4_data_tail) LOCAL_OBJECT_START(_6p5_to_8_data_tail) -// Polynomial coefficients for the tanh(x), 6.5 <= |x| < 8.0 +// Polynomial coefficients for the tanh(x), 6.5 <= |x| < 8.0 data8 0xA6881D7D21774BFD, 0x00003FEF //A13 = 1.9852125640303530752913966680e-05 data8 0x875E983AA042E605, 0x0000BFF0 //A12 = -3.2274606306629334402383651599e-05 data8 0xCB19E01E94FC133C, 0x00003FF0 //A11 = 4.8423069963831314927026982707e-05 @@ -659,7 +659,7 @@ data8 0xA11C80E20ADA5A64, 0x0000BFF0 //A4 = -3.8411937140983728563216440713e-05 LOCAL_OBJECT_END(_6p5_to_8_data_tail) LOCAL_OBJECT_START(_13_to_16_data_tail) -// Polynomial coefficients for the tanh(x), 13 <= |x| < 16 +// Polynomial coefficients for the tanh(x), 13 <= |x| < 16 data8 0x9D6CCDA4767CA6D9, 0x00003FE5 //A13 = 1.8326683535066775712253572575e-08 data8 0xFFAF154F334BF403, 0x0000BFE4 //A12 = -1.4882762852665077172347508377e-08 data8 0xBFC68FA7C61B6C17, 0x00003FE4 //A11 = 1.1162810813806544919835662888e-08 @@ -673,7 +673,7 @@ data8 0x98176FD2074C1D77, 0x0000BFDD //A4 = -6.9163229452106125388824134881e-11 LOCAL_OBJECT_END(_13_to_16_data_tail) LOCAL_OBJECT_START(_0_to_1o8_data) -// Polynomial coefficients for the tanh(x), 0.0 <= |x| < 0.125 +// Polynomial coefficients for the tanh(x), 0.0 <= |x| < 0.125 data8 0xBA0EC1879495150B, 0x0000BFF5 // A15 = -1.4195071451378679802688367813e-03 data8 0xEB5A82898D1BCBA4, 0x00003FF6 // A13 = 3.5912102408030526706365632879e-03 data8 0x91370DAFE0B64438, 0x0000BFF8 // A11 = -8.8632234251336964576640807982e-03 @@ -688,7 +688,7 @@ LOCAL_OBJECT_END(_0_to_1o8_data) GLOBAL_LIBM_ENTRY(tanhl) { .mfi - alloc r32 = ar.pfs, 0, 21, 0, 0 + alloc r32 = ar.pfs, 0, 21, 0, 0 fmerge.se fArgAbsNorm = f1, f8 // normalized x (1.0 <= x < 2.0) addl rSignBit = 0x20000, r0 // Set sign bit for exponent } @@ -699,26 +699,26 @@ GLOBAL_LIBM_ENTRY(tanhl) { .mfi getf.exp rArgExp = f8 // Get arg exponent - fclass.m p6,p0 = f8, 0xEF // Filter 0, denormals and specials + fclass.m p6,p0 = f8, 0xEF // Filter 0, denormals and specials // 0xEF = @qnan|@snan|@pos|@neg|@zero|@unorm|@inf - addl rBias = 0xfffc, r0 // Value to subtract from exp + addl rBias = 0xfffc, r0 // Value to subtract from exp // to get actual interval number } { .mfi ld8 rDataPtr = [rDataPtr] // Get real common data pointer fma.s1 fArgSqr = f8, f8, f0 // x^2 (for [0;1/8] path) - addl r2to4 = 0x10000, r0 // unbiased exponent + addl r2to4 = 0x10000, r0 // unbiased exponent // for [2;4] binary interval };; { .mfi - getf.sig rArgSig = f8 // Get arg significand + getf.sig rArgSig = f8 // Get arg significand fcmp.lt.s1 p15, p14 = f8, f0 // Is arg negative/positive? addl rSaturation = 0xb70, r0 // First 12 bits of // saturation value signif. } { .mfi - setf.d f1p5 = r1p5 // 1.5 construction + setf.d f1p5 = r1p5 // 1.5 construction fma.s1 f2p0 = f1,f1,f1 // 2.0 construction addl r1625Sign = 0xd01, r0 // First 12 bits of // 1.625 value signif. @@ -733,13 +733,13 @@ GLOBAL_LIBM_ENTRY(tanhl) { .mfb addl rTiny = 0xf000, r0 // Tiny value for saturation path nop.f 0 -(p6) br.cond.spnt tanhl_spec // Branch to zero, denorm & specs +(p6) br.cond.spnt tanhl_spec // Branch to zero, denorm & specs };; { .mfi sub rInterval = rArgExp, rBias // Get actual interval number nop.f 0 - shr.u rArgSig = rArgSig, 52 // Leave only 12 bits of sign. + shr.u rArgSig = rArgSig, 52 // Leave only 12 bits of sign. } { .mfi adds rShiftedDataPtr = 0x10, rDataPtr // Second ptr to data @@ -748,10 +748,10 @@ GLOBAL_LIBM_ENTRY(tanhl) };; { .mfi -(p8) cmp.le p8, p10 = r1625Sign, rArgSig // If signd is greater +(p8) cmp.le p8, p10 = r1625Sign, rArgSig // If signd is greater // than 1.625? (arg is at one of binary subranges) nop.f 0 - shl rOffset = rInterval, 8 // Make offset from + shl rOffset = rInterval, 8 // Make offset from // interval number } { .mfi @@ -762,30 +762,30 @@ GLOBAL_LIBM_ENTRY(tanhl) };; { .mfi -(p8) adds rOffset = 0x400, rOffset // Add additional offset +(p8) adds rOffset = 0x400, rOffset // Add additional offset // (arg is at one of binary subranges) fma.s1 fArgCube = fArgSqr, f8, f0 // x^3 (for [0;1/8] path) shl rTailOffset = rInterval, 7 // Make offset to "tail" data // from interval number } { .mib - setf.exp fTiny = rTiny // Construct "tiny" value + setf.exp fTiny = rTiny // Construct "tiny" value // for saturation path cmp.ltu p11, p0 = 0x7, rInterval // if arg > 32 -(p9) br.cond.spnt _0_to_1o8 +(p9) br.cond.spnt _0_to_1o8 };; { .mfi - add rAddr1 = rDataPtr, rOffset // Get address for - // interval data + add rAddr1 = rDataPtr, rOffset // Get address for + // interval data nop.f 0 shl rTailAddOffset = rInterval, 5 // Offset to interval - // "tail" data + // "tail" data } { .mib add rAddr2 = rShiftedDataPtr, rOffset // Get second - // address for interval data -(p7) cmp.leu p11, p0 = rSaturation, rArgSig // if arg is + // address for interval data +(p7) cmp.leu p11, p0 = rSaturation, rArgSig // if arg is // in [22.8;32] interval (p11) br.cond.spnt _saturation // Branch to Saturation path };; @@ -813,14 +813,14 @@ GLOBAL_LIBM_ENTRY(tanhl) .pred.rel "mutex",p8,p10 { .mfi ldfe fA18 = [rAddr1], 16 // Load A18 -(p8) fms.s1 fArgAbsNorm = fArgAbsNorm, f1, f2p0 // Add 2.0 +(p8) fms.s1 fArgAbsNorm = fArgAbsNorm, f1, f2p0 // Add 2.0 // (arg is at one of binary subranges) adds rTailAddr2 = 0x10, rTailAddr1 // First tail // data address } { .mfi - ldfe fA25 = [rAddr2], 16 // Load A25 -(p10) fms.s1 fArgAbsNorm = fArgAbsNorm, f1, f1p5 // Add 1.5 + ldfe fA25 = [rAddr2], 16 // Load A25 +(p10) fms.s1 fArgAbsNorm = fArgAbsNorm, f1, f1p5 // Add 1.5 // to normalized arg nop.i 0 };; @@ -928,9 +928,9 @@ GLOBAL_LIBM_ENTRY(tanhl) fma.s1 fA23 = fA24, fArgAbsNorm, fA23 // Polynomial tail nop.i 0 } -{ .mfi +{ .mfi nop.m 0 - fma.s1 fA21 = fA22, fArgAbsNorm, fA21 // Polynomial tail + fma.s1 fA21 = fA22, fArgAbsNorm, fA21 // Polynomial tail nop.i 0 };; @@ -946,7 +946,7 @@ GLOBAL_LIBM_ENTRY(tanhl) fma.s1 fRes3L = fRes3L, f1, fTH // (A3*x+A2)*x^2 nop.i 0 } -{ .mfi +{ .mfi nop.m 0 fma.s1 fA19 = fA20, fArgAbsNorm, fA19 // Polynomial tail nop.i 0 @@ -957,7 +957,7 @@ GLOBAL_LIBM_ENTRY(tanhl) fma.s1 fRes1H = fTH2, f1, fA0H // A1*x+A0 nop.i 0 } -{ .mfi +{ .mfi nop.m 0 fms.s1 fTL2 = fA1H, fArgAbsNorm, fTH2 // A1*x+A0 nop.i 0 @@ -968,7 +968,7 @@ GLOBAL_LIBM_ENTRY(tanhl) fma.s1 fA8 = fA9, fArgAbsNorm, fA8 // Polynomial tail nop.i 0 } -{ .mfi +{ .mfi nop.m 0 fma.s1 fA10 = fA11, fArgAbsNorm, fA10 // Polynomial tail nop.i 0 @@ -990,7 +990,7 @@ GLOBAL_LIBM_ENTRY(tanhl) fms.s1 fArgAbsNorm11 = fArgAbsNorm4, fArgAbsNorm4, f0 // x^8 nop.i 0 } -{ .mfi +{ .mfi nop.m 0 fma.s1 fA4 = fA5, fArgAbsNorm, fA4 // Polynomial tail nop.i 0 @@ -1001,7 +1001,7 @@ GLOBAL_LIBM_ENTRY(tanhl) fma.s1 fRes3L = fRes3L, f1, fA2L // (A3*x+A2)*x^2 nop.i 0 } -{ .mfi +{ .mfi nop.m 0 fma.s1 fA6 = fA7, fArgAbsNorm, fA6 // Polynomial tail nop.i 0 @@ -1012,7 +1012,7 @@ GLOBAL_LIBM_ENTRY(tanhl) fma.s1 fTL2 = fTL2, f1, fTT2 // A1*x+A0 nop.i 0 } -{ .mfi +{ .mfi nop.m 0 fms.s1 fRes1L = fA0H, f1, fRes1H // A1*x+A0 nop.i 0 @@ -1023,7 +1023,7 @@ GLOBAL_LIBM_ENTRY(tanhl) fma.s1 fA23 = fA25, fArgAbsNorm2, fA23 // Polynomial tail nop.i 0 } -{ .mfi +{ .mfi nop.m 0 fma.s1 fA12 = fA14, fArgAbsNorm2, fA12 // Polynomial tail nop.i 0 @@ -1034,7 +1034,7 @@ GLOBAL_LIBM_ENTRY(tanhl) fma.s1 fA19 = fA21, fArgAbsNorm2, fA19 // Polynomial tail nop.i 0 } -{ .mfi +{ .mfi nop.m 0 fma.s1 fA8 = fA10, fArgAbsNorm2, fA8 // Polynomial tail nop.i 0 @@ -1045,7 +1045,7 @@ GLOBAL_LIBM_ENTRY(tanhl) fma.s1 fA15 = fA17, fArgAbsNorm2, fA15 // Polynomial tail nop.i 0 } -{ .mfi +{ .mfi nop.m 0 fms.s1 fArgAbsNorm11 = fArgAbsNorm11, fArgAbsNorm3, f0 // x^11 nop.i 0 @@ -1056,7 +1056,7 @@ GLOBAL_LIBM_ENTRY(tanhl) fma.s1 fTT = fRes3L, fArgAbsNorm2, f0 // (A3*x+A2)*x^2 nop.i 0 } -{ .mfi +{ .mfi nop.m 0 fma.s1 fA4 = fA6, fArgAbsNorm2, fA4 // Polynomial tail nop.i 0 @@ -1078,7 +1078,7 @@ GLOBAL_LIBM_ENTRY(tanhl) fma.s1 fA19 = fA23, fArgAbsNorm4, fA19 // Polynomial tail nop.i 0 } -{ .mfi +{ .mfi nop.m 0 fma.s1 fA8 = fA12, fArgAbsNorm4, fA8 // Polynomial tail nop.i 0 @@ -1131,7 +1131,7 @@ GLOBAL_LIBM_ENTRY(tanhl) fms.s1 fRes2L = fRes3H, fArgAbsNorm2, fRes2H // (A3*x+A2)*x^2 nop.i 0 } -{ .mfi +{ .mfi nop.m 0 fma.s1 fResH = fRes2H, f1, fRes1H // High result nop.i 0 @@ -1148,12 +1148,12 @@ GLOBAL_LIBM_ENTRY(tanhl) nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fma.s1 fRes2L = fRes2L, f1, fTT // (A3*x+A2)*x^2 nop.i 0 } -{ .mfi +{ .mfi nop.m 0 fms.s1 fResL = fRes1H, f1, fResH // Low result nop.i 0 @@ -1165,7 +1165,7 @@ GLOBAL_LIBM_ENTRY(tanhl) // .s0 - for symmetry issue resolving at +/-inf rounding mode nop.i 0 } -{ .mfi +{ .mfi nop.m 0 fma.s1 fResL = fResL, f1, fRes2H // Low result nop.i 0 @@ -1185,12 +1185,12 @@ GLOBAL_LIBM_ENTRY(tanhl) };; .pred.rel "mutex",p14,p15 -{ .mfi +{ .mfi nop.m 0 (p14) fma.s0 f8 = fResL, f1, fResH// Add high and low results nop.i 0 } -{ .mfb +{ .mfb nop.m 0 (p15) fms.s0 f8 = fResL, f1, fResH // Add high and low results br.ret.sptk b0 // Main path return @@ -1200,12 +1200,12 @@ GLOBAL_LIBM_ENTRY(tanhl) _saturation: .pred.rel "mutex",p14,p15 -{ .mfi +{ .mfi nop.m 0 (p14) fms.s0 f8 = f1, f1, fTiny // Saturation result r = 1-tiny nop.i 0 };; -{ .mfb +{ .mfb nop.m 0 (p15) fnma.s0 f8 = f1, f1, fTiny // Saturation result r = tiny-1 br.ret.sptk b0 // Saturation path return @@ -1215,46 +1215,46 @@ _saturation: // 0, denormals and special IEEE numbers path ///////////////////////////////// tanhl_spec: -{ .mfi +{ .mfi nop.m 0 fclass.m p6,p0 = f8, 0x23 // To filter infinities - // 0x23 = @pos|@neg|@inf + // 0x23 = @pos|@neg|@inf nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fclass.m p7,p0 = f8, 0xC7 // To filter NaNs & Zeros // 0xC7 = @pos|@neg|@zero|@qnan|@snan nop.i 0 };; -{ .mfb +{ .mfb nop.m 0 -(p6) fmerge.s f8 = f8, f1 // +/-1 for INF args +(p6) fmerge.s f8 = f8, f1 // +/-1 for INF args (p6) br.ret.spnt b0 // exit for x = INF };; -{ .mfb +{ .mfb nop.m 0 -(p7) fma.s0 f8 = f8, f1, f8 // +/-0 for 0 args +(p7) fma.s0 f8 = f8, f1, f8 // +/-0 for 0 args // and NaNs for NaNs (p7) br.ret.spnt b0 // exit for x = NaN or +/-0 };; -{ .mfi +{ .mfi nop.m 0 fnorm.s0 f8 = f8 // Normalize arg nop.i 0 };; .pred.rel "mutex",p14,p15 -{ .mfi +{ .mfi nop.m 0 (p14) fnma.s0 f8 = f8, f8, f8 // res = r-r^2 nop.i 0 } -{ .mfb +{ .mfb nop.m 0 (p15) fma.s0 f8 = f8, f8, f8 // res = r+r^2 br.ret.sptk b0 // 0, denormals, IEEE specials return @@ -1264,83 +1264,83 @@ tanhl_spec: // 0 < |x| < 1/8 path ///////////////////////////////////////////////////////// _0_to_1o8: -{ .mmi +{ .mmi adds rAddr1 = 0x11e0, rDataPtr // Ptr 1 to coeffs adds rAddr2 = 0x11f0, rDataPtr // Ptr 2 to coeffs nop.i 0 };; -{ .mmi +{ .mmi ldfe fA15 = [rAddr1], 32 // Load A15 ldfe fA13 = [rAddr2], 32 // Load A13 nop.i 0 };; -{ .mmi +{ .mmi ldfe fA11 = [rAddr1], 32 // Load A11 ldfe fA9 = [rAddr2], 32 // Load A9 nop.i 0 };; -{ .mmi +{ .mmi ldfe fA7 = [rAddr1], 32 // Load A7 ldfe fA5 = [rAddr2] // Load A5 nop.i 0 };; -{ .mfi +{ .mfi ldfe fA3 = [rAddr1] // Load A3 fma.s1 fA11 = fA13, fArgSqr, fA11 // Polynomial tail nop.i 0 } -{ .mfi +{ .mfi nop.m 0 - fma.s1 fArgFour = fArgSqr, fArgSqr, f0 // a^4 + fma.s1 fArgFour = fArgSqr, fArgSqr, f0 // a^4 nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fma.s1 fA3 = fA5, fArgSqr, fA3 // Polynomial tail nop.i 0 } -{ .mfi +{ .mfi nop.m 0 fma.s1 fA7 = fA9, fArgSqr, fA7 // Polynomial tail nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fma.s1 fA11 = fA15, fArgFour, fA11 // Polynomial tail nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fma.s1 fA3 = fA7, fArgFour, fA3 // Polynomial tail nop.i 0 } -{ .mfi +{ .mfi nop.m 0 fma.s1 fArgEight = fArgFour, fArgFour, f0 // a^8 nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fma.s1 fRes = fA11, fArgEight, fA3 //Polynomial tail result nop.i 0 };; -{ .mfb +{ .mfb nop.m 0 fma.s0 f8 = fRes, fArgCube, f8 // (Polynomial tail)*x^3 br.ret.sptk b0 // [0;1/8] interval return };; - + GLOBAL_LIBM_END(tanhl) diff --git a/sysdeps/ia64/fpu/s_tanl.S b/sysdeps/ia64/fpu/s_tanl.S index 607a271545..b59936c4a1 100644 --- a/sysdeps/ia64/fpu/s_tanl.S +++ b/sysdeps/ia64/fpu/s_tanl.S @@ -21,25 +21,25 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // //********************************************************************* // -// History: +// History: // // 02/02/00 (hand-optimized) // 04/04/00 Unwind support added diff --git a/sysdeps/ia64/fpu/w_tgamma.S b/sysdeps/ia64/fpu/w_tgamma.S index 24f3d11840..e4b39cc62c 100644 --- a/sysdeps/ia64/fpu/w_tgamma.S +++ b/sysdeps/ia64/fpu/w_tgamma.S @@ -21,25 +21,25 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,INCLUDING,BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,INCLUDING,BUT NOT // LIMITED TO,THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT,INDIRECT,INCIDENTAL,SPECIAL, // EXEMPLARY,OR CONSEQUENTIAL DAMAGES (INCLUDING,BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,DATA,OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,DATA,OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY,WHETHER IN CONTRACT,STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE,EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE,EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code,and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // //********************************************************************* // -// History: +// History: // 10/12/01 Initial version // 05/20/02 Cleaned up namespace and sf0 syntax // 02/10/03 Reordered header: .section, .global, .proc, .align @@ -74,8 +74,8 @@ // IEEE Special Conditions: // // tgamma(+inf) = +inf -// tgamma(-inf) = QNaN -// tgamma(+/-0) = +/-inf +// tgamma(-inf) = QNaN +// tgamma(+/-0) = +/-inf // tgamma(x<0, x - integer) = QNaN // tgamma(SNaN) = QNaN // tgamma(QNaN) = QNaN @@ -85,7 +85,7 @@ // Overview // // The method consists of three cases. -// +// // If 2 <= x < OVERFLOW_BOUNDARY use case tgamma_regular; // else if 0 < x < 2 use case tgamma_from_0_to_2; // else if -(i+1) < x < -i, i = 0...184 use case tgamma_negatives; @@ -110,9 +110,9 @@ // r = x - N, note 0 <= r < 1 // // n = N & ~0xF - index of table that contains coefficient of -// polynomial approximation +// polynomial approximation // i = N & 0xF - is used in recursive formula -// +// // // Step 2: Approximation // --------------------- @@ -124,7 +124,7 @@ // ----------------- // In case when i > 0 we need to multiply P22n(r) by product // R(i)=(x-1)*(x-2)*...*(x-i). To reduce number of fp-instructions -// we can calculate R as follow: +// we can calculate R as follow: // R(i) = ((x-1)*(x-2))*((x-3)*(x-4))*...*((x-(i-1))*(x-i)) if i is // even or R = ((x-1)*(x-2))*((x-3)*(x-4))*...*((x-(i-2))*(x-(i-1)))* // *(i-1) if i is odd. In both cases we need to calculate @@ -145,7 +145,7 @@ // if 1.25 <= x < 1.5 than GAMMA(x) = P15(x-x_min) where // x_min is point of local minimum on [1; 2] interval. // if 1.5 <= x < 2.0 than GAMMA(x) = P15(x-1.5) -// and +// and // if 0 < x < 1 than GAMMA(x) = GAMMA(x+1)/x // // Case -(i+1) < x < -i, i = 0...184 @@ -156,14 +156,14 @@ // // Step 1: Reduction // ----------------- -// Note that period of sin(PI*x) is 2 and range reduction for -// sin(PI*x) is like to range reduction for GAMMA(x) +// Note that period of sin(PI*x) is 2 and range reduction for +// sin(PI*x) is like to range reduction for GAMMA(x) // i.e r = x - [x] with exception of cases // when r > 0.5 (in such cases r = 1 - (x - [x])). // // Step 2: Approximation // --------------------- -// To approximate sin(PI*x)/PI = sin(PI*(2*n+r))/PI = +// To approximate sin(PI*x)/PI = sin(PI*(2*n+r))/PI = // = (-1)^n*sin(PI*r)/PI Taylor series is used. // sin(PI*r)/PI ~ S21(r). // @@ -171,7 +171,7 @@ // ---------------- // To calculate 1/(x*GAMMA(x)*S21(r)) we use frcpa instruction // with following Newton-Raphson interations. -// +// // //********************************************************************* @@ -807,7 +807,7 @@ GLOBAL_LIBM_ENTRY(tgamma) } { .mfb ldfe FR_C01 = [GR_ad_Co],32 -(p7) fms.s1 FR_r02 = FR_r02,f1,f1 +(p7) fms.s1 FR_r02 = FR_r02,f1,f1 // jump if x is NaTVal, NaN, +/-0, +/-INF (p10) br.cond.spnt tgamma_spec };; @@ -882,7 +882,7 @@ GLOBAL_LIBM_ENTRY(tgamma) { .mfi ldfe FR_C30 = [GR_ad_Co],32 fma.s1 FR_Rq3 = FR_Rq3,FR_6,FR_X2pX // (x-5)*(x-6) - nop.i 0 + nop.i 0 };; { .mfi ldfe FR_C40 = [GR_ad_Ce],32 @@ -902,7 +902,7 @@ GLOBAL_LIBM_ENTRY(tgamma) } { .mfi ldfe FR_C70 = [GR_ad_Co7],32 - fma.s1 FR_rs = f0,f0,FR_r // reduced arg for sin(pi*x) + fma.s1 FR_rs = f0,f0,FR_r // reduced arg for sin(pi*x) add GR_ad_Co = 0x550,GR_ad_Data };; { .mfi @@ -1036,12 +1036,12 @@ GLOBAL_LIBM_ENTRY(tgamma) nop.i 0 } { .mfi - nop.m 0 + nop.m 0 fma.s1 FR_C01 = FR_C01,FR_C11,f0 nop.i 0 };; { .mfi - nop.m 0 + nop.m 0 fma.s1 FR_C21 = FR_C21,FR_C31,f0 nop.i 0 } @@ -1051,9 +1051,9 @@ GLOBAL_LIBM_ENTRY(tgamma) (p12) cmp.lt.unc p7,p0 = 2,GR_Sig2 // should mul by FR_Rq2? };; { .mfi - nop.m 0 + nop.m 0 fma.s1 FR_C41 = FR_C41,FR_C51,f0 - nop.i 0 + nop.i 0 } { .mfi nop.m 0 @@ -1061,7 +1061,7 @@ GLOBAL_LIBM_ENTRY(tgamma) (p12) cmp.lt.unc p9,p0 = 6,GR_Sig2 // should mul by FR_Rq4? };; { .mfi - nop.m 0 + nop.m 0 fma.s1 FR_C61 = FR_C61,FR_C71,f0 (p15) cmp.eq p11,p0 = r0,r0 } @@ -1071,7 +1071,7 @@ GLOBAL_LIBM_ENTRY(tgamma) (p12) cmp.lt.unc p8,p0 = 10,GR_Sig2 // should mul by FR_Rq6? };; { .mfi - nop.m 0 + nop.m 0 fma.s1 FR_C81 = FR_C81,FR_C91,f0 nop.i 0 } @@ -1081,8 +1081,8 @@ GLOBAL_LIBM_ENTRY(tgamma) (p14) cmp.ltu p0,p11 = 0x9,GR_Tbl_Ind };; { .mfi - nop.m 0 - fcvt.xf FR_RqLin = FR_Xt + nop.m 0 + fcvt.xf FR_RqLin = FR_Xt nop.i 0 } { .mfi @@ -1101,12 +1101,12 @@ GLOBAL_LIBM_ENTRY(tgamma) nop.i 0 };; { .mfi - nop.m 0 + nop.m 0 fma.s1 FR_C01 = FR_C01,FR_C21,f0 nop.i 0 } { .mfi - nop.m 0 + nop.m 0 fma.s1 FR_rs4 = FR_rs2,FR_rs2,f0 (p12) cmp.lt.unc p8,p0 = 4,GR_Sig2 // should mul by FR_Rq3? };; @@ -1121,19 +1121,19 @@ GLOBAL_LIBM_ENTRY(tgamma) (p12) cmp.lt.unc p9,p0 = 12,GR_Sig2 // should mul by FR_Rq7? };; { .mfi - nop.m 0 + nop.m 0 fma.s1 FR_C41 = FR_C41,FR_C61,f0 nop.i 0 } { .mfi - nop.m 0 + nop.m 0 (p9) fma.s1 FR_Rq5 = FR_Rq5,FR_Rq7,f0 - nop.i 0 + nop.i 0 };; { .mfi - nop.m 0 + nop.m 0 fma.s1 FR_C81 = FR_C81,FR_CA1,f0 - nop.i 0 + nop.i 0 } { .mfi nop.m 0 @@ -1161,12 +1161,12 @@ GLOBAL_LIBM_ENTRY(tgamma) mov GR_ExpOf1 = 0x2FFFF } { .mfi - nop.m 0 + nop.m 0 (p6) fms.s1 FR_RqLin = FR_AbsX,f1,FR_RqLin (p12) cmp.lt.unc p8,p0 = 8,GR_Sig2 // should mul by FR_Rq5? };; { .mfi - nop.m 0 + nop.m 0 fma.s1 FR_C01 = FR_C01,FR_C41,f0 nop.i 0 } @@ -1192,7 +1192,7 @@ GLOBAL_LIBM_ENTRY(tgamma) } { .mfi nop.m 0 -(p15) fcmp.lt.unc.s1 p0,p10 = FR_AbsX,FR_OvfBound // x >= overflow_boundary +(p15) fcmp.lt.unc.s1 p0,p10 = FR_AbsX,FR_OvfBound // x >= overflow_boundary nop.i 0 };; { .mfi @@ -1217,7 +1217,7 @@ GLOBAL_LIBM_ENTRY(tgamma) (p15) cmp.eq.unc p0,p11 = r0,GR_SigRqLin } { .mfb - nop.m 0 + nop.m 0 fma.s1 FR_GAMMA = FR_C01,FR_C81,f0 (p11) br.cond.spnt tgamma_positives };; @@ -1233,12 +1233,12 @@ GLOBAL_LIBM_ENTRY(tgamma) };; .pred.rel "mutex",p8,p9 { .mfi - nop.m 0 + nop.m 0 (p9) fma.s1 FR_GAMMA = FR_GAMMA,FR_Rq1,f0 tbit.z p6,p7 = GR_Sig,0 // p6 if sin<0, p7 if sin>0 } { .mfi - nop.m 0 + nop.m 0 (p8) fma.s1 FR_GAMMA = FR_GAMMA,FR_RqLin,f0 nop.i 0 };; @@ -1249,12 +1249,12 @@ GLOBAL_LIBM_ENTRY(tgamma) };; .pred.rel "mutex",p6,p7 { .mfi - nop.m 0 -(p6) fnma.s1 FR_GAMMA = FR_GAMMA,FR_S21,f0 - nop.i 0 + nop.m 0 +(p6) fnma.s1 FR_GAMMA = FR_GAMMA,FR_S21,f0 + nop.i 0 } { .mfi - nop.m 0 + nop.m 0 (p7) fma.s1 FR_GAMMA = FR_GAMMA,FR_S21,f0 mov GR_Sig2 = 1 };; @@ -1292,7 +1292,7 @@ GLOBAL_LIBM_ENTRY(tgamma) { .mfi nop.m 0 fma.s1 FR_Rcp1 = FR_Rcp0,FR_Rcp1,FR_Rcp0 - nop.i 0 + nop.i 0 };; // NR method: ineration #2 { .mfi @@ -1340,12 +1340,12 @@ GLOBAL_LIBM_ENTRY(tgamma) tgamma_positives: .pred.rel "mutex",p8,p9 { .mfi - nop.m 0 + nop.m 0 (p9) fma.d.s0 f8 = FR_GAMMA,FR_Rq1,f0 nop.i 0 } { .mfb - nop.m 0 + nop.m 0 (p8) fma.d.s0 f8 = FR_GAMMA,FR_RqLin,f0 br.ret.sptk b0 };; @@ -1366,7 +1366,7 @@ tgamma_from_0_to_2: };; { .mfi (p6) getf.sig GR_Sig = FR_NormX - nop.f 0 + nop.f 0 (p6) shl GR_Sig2 = GR_Sig2,63 } { .mfi @@ -1375,9 +1375,9 @@ tgamma_from_0_to_2: (p6) mov GR_NzOvfBound = 0xFBFF };; { .mfi - cmp.eq p8,p0 = GR_Sign_Exp,GR_ExpOf05 // r02 >= 1/2 + cmp.eq p8,p0 = GR_Sign_Exp,GR_ExpOf05 // r02 >= 1/2 nop.f 0 - cmp.eq p9,p10 = GR_Sign_Exp,GR_ExpOf025 // r02 >= 1/4 + cmp.eq p9,p10 = GR_Sign_Exp,GR_ExpOf025 // r02 >= 1/4 } { .mfi (p6) cmp.ltu.unc p11,p0 = GR_Sign_Exp,GR_NzOvfBound // p11 <- overflow @@ -1396,83 +1396,83 @@ tgamma_from_0_to_2: (p11) br.cond.spnt tgamma_ovf_near_0 //tgamma_spec_res };; { .mfi - ldfe FR_A15 = [GR_ad_Co],32 + ldfe FR_A15 = [GR_ad_Co],32 nop.f 0 (p12) cmp.eq.unc p13,p0 = GR_Sig,GR_Sig2 } { .mfb - ldfe FR_A14 = [GR_ad_Ce],32 + ldfe FR_A14 = [GR_ad_Ce],32 nop.f 0 (p13) br.cond.spnt tgamma_ovf_near_0_boundary //tgamma_spec_res };; { .mfi - ldfe FR_A13 = [GR_ad_Co],32 + ldfe FR_A13 = [GR_ad_Co],32 nop.f 0 nop.i 0 } { .mfi - ldfe FR_A12 = [GR_ad_Ce],32 + ldfe FR_A12 = [GR_ad_Ce],32 nop.f 0 nop.i 0 };; .pred.rel "mutex",p9,p10 { .mfi - ldfe FR_A11 = [GR_ad_Co],32 -(p10) fma.s1 FR_r2 = FR_r02,FR_r02,f0 + ldfe FR_A11 = [GR_ad_Co],32 +(p10) fma.s1 FR_r2 = FR_r02,FR_r02,f0 nop.i 0 } { .mfi - ldfe FR_A10 = [GR_ad_Ce],32 -(p9) fma.s1 FR_r2 = FR_r,FR_r,f0 + ldfe FR_A10 = [GR_ad_Ce],32 +(p9) fma.s1 FR_r2 = FR_r,FR_r,f0 nop.i 0 };; { .mfi - ldfe FR_A9 = [GR_ad_Co],32 + ldfe FR_A9 = [GR_ad_Co],32 (p6) fma.s1 FR_Rcp1 = FR_Rcp0,FR_Rcp1,FR_Rcp0 nop.i 0 } { .mfi - ldfe FR_A8 = [GR_ad_Ce],32 + ldfe FR_A8 = [GR_ad_Ce],32 (p10) fma.s1 FR_r = f0,f0,FR_r02 nop.i 0 };; { .mfi - ldfe FR_A7 = [GR_ad_Co],32 + ldfe FR_A7 = [GR_ad_Co],32 nop.f 0 nop.i 0 } { .mfi - ldfe FR_A6 = [GR_ad_Ce],32 - nop.f 0 + ldfe FR_A6 = [GR_ad_Ce],32 + nop.f 0 nop.i 0 };; { .mfi - ldfe FR_A5 = [GR_ad_Co],32 + ldfe FR_A5 = [GR_ad_Co],32 nop.f 0 nop.i 0 } { .mfi - ldfe FR_A4 = [GR_ad_Ce],32 + ldfe FR_A4 = [GR_ad_Ce],32 nop.f 0 nop.i 0 };; { .mfi - ldfe FR_A3 = [GR_ad_Co],32 + ldfe FR_A3 = [GR_ad_Co],32 nop.f 0 nop.i 0 } { .mfi - ldfe FR_A2 = [GR_ad_Ce],32 + ldfe FR_A2 = [GR_ad_Ce],32 nop.f 0 nop.i 0 };; { .mfi - ldfe FR_A1 = [GR_ad_Co],32 - fma.s1 FR_r4 = FR_r2,FR_r2,f0 + ldfe FR_A1 = [GR_ad_Co],32 + fma.s1 FR_r4 = FR_r2,FR_r2,f0 nop.i 0 } { .mfi - ldfe FR_A0 = [GR_ad_Ce],32 + ldfe FR_A0 = [GR_ad_Ce],32 nop.f 0 nop.i 0 };; @@ -1493,7 +1493,7 @@ tgamma_from_0_to_2: };; { .mfi nop.m 0 - fma.s1 FR_r8 = FR_r4,FR_r4,f0 + fma.s1 FR_r8 = FR_r4,FR_r4,f0 nop.i 0 };; { .mfi @@ -1573,17 +1573,17 @@ tgamma_from_0_to_2: };; .pred.rel "mutex",p6,p7 { .mfi - nop.m 0 + nop.m 0 (p6) fma.s1 FR_A15 = FR_A15,FR_r8,FR_A7 nop.i 0 } { .mfi - nop.m 0 + nop.m 0 (p7) fma.d.s0 f8 = FR_A15,FR_r8,FR_A7 nop.i 0 };; { .mfb - nop.m 0 + nop.m 0 (p6) fma.d.s0 f8 = FR_A15,FR_Rcp3,f0 br.ret.sptk b0 };; @@ -1606,7 +1606,7 @@ tgamma_ovf_near_0_boundary: { .mfi nop.m 0 nop.f 0 - shl r8 = r8,52 + shl r8 = r8,52 };; { .mfi sub r8 = r8,r0,1 @@ -1616,12 +1616,12 @@ tgamma_ovf_near_0_boundary: .pred.rel "mutex",p14,p15 { .mfi // set p8 to 0 in case of overflow and to 1 otherwise - // for negative arg: + // for negative arg: // no overflow if rounding mode either Z or +Inf, i.e. // GR_fpsr > 1 (p14) cmp.lt p8,p0 = 1,GR_fpsr nop.f 0 - // for positive arg: + // for positive arg: // no overflow if rounding mode either Z or -Inf, i.e. // (GR_fpsr & 1) == 0 (p15) tbit.z p0,p8 = GR_fpsr,0 @@ -1636,7 +1636,7 @@ tgamma_ovf_near_0_boundary: tgamma_ovf_near_0: { .mfi mov r8 = 0x1FFFE - nop.f 0 + nop.f 0 nop.i 0 };; { .mfi @@ -1646,12 +1646,12 @@ tgamma_ovf_near_0: };; .pred.rel "mutex",p14,p15 { .mfi - nop.m 0 + nop.m 0 (p15) fma.d.s0 f8 = f9,f9,f0 // Set I,O and +INF result - nop.i 0 + nop.i 0 } { .mfb - nop.m 0 + nop.m 0 (p14) fnma.d.s0 f8 = f9,f9,f0 // Set I,O and -INF result br.cond.sptk tgamma_libm_err };; @@ -1671,7 +1671,7 @@ tgamma_spec_res: };; { .mfb (p11) cmp.ltu.unc p7,p8 = GR_0x30033,GR_Sign_Exp - nop.f 0 + nop.f 0 (p10) br.cond.spnt tgamma_singularity };; .pred.rel "mutex",p7,p8 @@ -1686,7 +1686,7 @@ tgamma_spec_res: mov GR_TAG = 258 // overflow } { .mfb - nop.m 0 + nop.m 0 (p15) fma.d.s0 f8 = f9,f9,f0 // Set I,O and +INF result br.cond.sptk tgamma_libm_err };; @@ -1764,7 +1764,7 @@ tgamma_spec: { .mfi (p7) mov GR_TAG = 259 // negative (p7) frcpa.s0 f8,p0 = f1,f8 - nop.i 0 + nop.i 0 } { .mib nop.m 0 @@ -1788,10 +1788,10 @@ LOCAL_LIBM_ENTRY(__libm_error_region) add GR_Parameter_Y=-32,sp // Parameter 2 value nop.f 0 .save ar.pfs,GR_SAVE_PFS - mov GR_SAVE_PFS=ar.pfs // Save ar.pfs + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs } { .mfi -.fframe 64 +.fframe 64 add sp=-64,sp // Create new stack nop.f 0 mov GR_SAVE_GP=gp // Save gp @@ -1799,18 +1799,18 @@ LOCAL_LIBM_ENTRY(__libm_error_region) { .mmi stfd [GR_Parameter_Y] = FR_Y,16 // STORE Parameter 2 on stack add GR_Parameter_X = 16,sp // Parameter 1 address -.save b0, GR_SAVE_B0 - mov GR_SAVE_B0=b0 // Save b0 +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 };; .body { .mib - stfd [GR_Parameter_X] = FR_X // STORE Parameter 1 on stack - add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + stfd [GR_Parameter_X] = FR_X // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address nop.b 0 } { .mib stfd [GR_Parameter_Y] = FR_RESULT // STORE Parameter 3 on stack - add GR_Parameter_Y = -16,GR_Parameter_Y + add GR_Parameter_Y = -16,GR_Parameter_Y br.call.sptk b0=__libm_error_support# // Call error handling function };; { .mmi @@ -1825,10 +1825,10 @@ LOCAL_LIBM_ENTRY(__libm_error_region) mov b0 = GR_SAVE_B0 // Restore return address };; { .mib - mov gp = GR_SAVE_GP // Restore gp + mov gp = GR_SAVE_GP // Restore gp mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs br.ret.sptk b0 // Return -};; +};; LOCAL_LIBM_END(__libm_error_region) .type __libm_error_support#,@function diff --git a/sysdeps/ia64/fpu/w_tgammaf.S b/sysdeps/ia64/fpu/w_tgammaf.S index dda0d0fe9d..ffd7daa2d2 100644 --- a/sysdeps/ia64/fpu/w_tgammaf.S +++ b/sysdeps/ia64/fpu/w_tgammaf.S @@ -21,25 +21,25 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,INCLUDING,BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,INCLUDING,BUT NOT // LIMITED TO,THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT,INDIRECT,INCIDENTAL,SPECIAL, // EXEMPLARY,OR CONSEQUENTIAL DAMAGES (INCLUDING,BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,DATA,OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,DATA,OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY,WHETHER IN CONTRACT,STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE,EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE,EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code,and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // //********************************************************************* // -// History: +// History: // 11/30/01 Initial version // 05/20/02 Cleaned up namespace and sf0 syntax // 02/10/03 Reordered header: .section, .global, .proc, .align @@ -75,8 +75,8 @@ // IEEE Special Conditions: // // tgammaf(+inf) = +inf -// tgammaf(-inf) = QNaN -// tgammaf(+/-0) = +/-inf +// tgammaf(-inf) = QNaN +// tgammaf(+/-0) = +/-inf // tgammaf(x<0, x - integer) = QNaN // tgammaf(SNaN) = QNaN // tgammaf(QNaN) = QNaN @@ -86,7 +86,7 @@ // Overview // // The method consists of three cases. -// +// // If 2 <= x < OVERFLOW_BOUNDARY use case tgamma_regular; // else if 0 < x < 2 use case tgamma_from_0_to_2; // else if -(i+1) < x < -i, i = 0...43 use case tgamma_negatives; @@ -111,9 +111,9 @@ // r = x - N, note 0 <= r < 1 // // n = N & ~0xF - index of table that contains coefficient of -// polynomial approximation +// polynomial approximation // i = N & 0xF - is used in recursive formula -// +// // // Step 2: Approximation // --------------------- @@ -125,7 +125,7 @@ // ----------------- // In case when i > 0 we need to multiply P12n(r) by product // R(i,x)=(x-1)*(x-2)*...*(x-i). To reduce number of fp-instructions -// we can calculate R as follow: +// we can calculate R as follow: // R(i,x) = ((x-1)*(x-2))*((x-3)*(x-4))*...*((x-(i-1))*(x-i)) if i is // even or R = ((x-1)*(x-2))*((x-3)*(x-4))*...*((x-(i-2))*(x-(i-1)))* // *(i-1) if i is odd. In both cases we need to calculate @@ -147,7 +147,7 @@ // x_min is point of local minimum on [1; 2] interval. // if 1.5 <= x < 1.75 than GAMMA(x) = P7(x-1.5) // if 1.75 <= x < 2.0 than GAMMA(x) = P7(x-1.5) -// and +// and // if 0 < x < 1 than GAMMA(x) = GAMMA(x+1)/x // // Case -(i+1) < x < -i, i = 0...43 @@ -158,13 +158,13 @@ // // Step 1: Reduction // ----------------- -// Note that period of sin(PI*x) is 2 and range reduction for -// sin(PI*x) is like to range reduction for GAMMA(x) +// Note that period of sin(PI*x) is 2 and range reduction for +// sin(PI*x) is like to range reduction for GAMMA(x) // i.e rs = x - round(x) and |rs| <= 0.5. // // Step 2: Approximation // --------------------- -// To approximate sin(PI*x)/PI = sin(PI*(2*n+rs))/PI = +// To approximate sin(PI*x)/PI = sin(PI*(2*n+rs))/PI = // = (-1)^n*sin(PI*rs)/PI Taylor series is used. // sin(PI*rs)/PI ~ S17(rs). // @@ -172,7 +172,7 @@ // ---------------- // To calculate 1/x and 1/(GAMMA(x)*S12(rs)) we use frcpa // instruction with following Newton-Raphson interations. -// +// // //********************************************************************* @@ -218,7 +218,7 @@ FR_X = f10 FR_Y = f1 FR_RESULT = f8 -FR_iXt = f11 +FR_iXt = f11 FR_Xt = f12 FR_r = f13 FR_r2 = f14 @@ -671,7 +671,7 @@ GLOBAL_LIBM_ENTRY(tgammaf) { .mfi nop.m 0 (p14) fma.s1 FR_rs2 = FR_rs,FR_rs,f0 - nop.i 0 + nop.i 0 } { .mfb nop.m 0 @@ -680,12 +680,12 @@ GLOBAL_LIBM_ENTRY(tgammaf) (p7) br.cond.spnt tgammaf_overflow_near0_bound };; { .mfi - nop.m 0 + nop.m 0 (p6) fnma.s1 FR_Rq1 = FR_Rq1,FR_Rq0,f0 - nop.i 0 + nop.i 0 } { .mfi - nop.m 0 + nop.m 0 (p10) fma.s1 FR_Rq2 = FR_Rq2,FR_Rq3,f0 and GR_Sig = 0x7,GR_Sig };; @@ -730,24 +730,24 @@ GLOBAL_LIBM_ENTRY(tgammaf) nop.i 0 };; { .mfi - nop.m 0 + nop.m 0 (p9) fma.s1 FR_Rq1 = FR_Rq1,FR_Rq2,f0 nop.i 0 } { .mfi nop.m 0 fma.s1 FR_C51 = FR_C51,FR_r,FR_C50 - nop.i 0 + nop.i 0 };; { .mfi (p14) getf.exp GR_SignExp = FR_rs fma.s1 FR_C01 = FR_C01,FR_C11,f0 - nop.i 0 + nop.i 0 } { .mfi nop.m 0 (p14) fma.s1 FR_S01 = FR_S01,FR_rs2,FR_S00 - nop.i 0 + nop.i 0 };; { .mfi nop.m 0 @@ -763,7 +763,7 @@ GLOBAL_LIBM_ENTRY(tgammaf) { .mfi nop.m 0 (p14) fma.s1 FR_S11 = FR_S11,FR_rs2,FR_S10 -(p14) tbit.z.unc p11,p12 = GR_SignExp,17 +(p14) tbit.z.unc p11,p12 = GR_SignExp,17 } { .mfi nop.m 0 @@ -788,7 +788,7 @@ GLOBAL_LIBM_ENTRY(tgammaf) { .mfi nop.m 0 (p7) fma.s1 FR_An = FR_Rq1,FR_An,f0 - nop.i 0 + nop.i 0 };; { .mfb nop.m 0 @@ -841,7 +841,7 @@ GLOBAL_LIBM_ENTRY(tgammaf) };; { .mfi - nop.m 0 + nop.m 0 (p14) fma.s1 FR_GAMMA = FR_C01,FR_C41,f0 (p14) tbit.z.unc p6,p7 = GR_Sig,0 } @@ -954,7 +954,7 @@ tgammaf_from_0_to_1: { .mfi cmp.gt p9,p0 = GR_Arg,GR_ExpOf05 fma.s1 FR_r = f0,f0,FR_NormX // reduced arg for (0;1) - mov GR_ExpOf025 = 0x7FA + mov GR_ExpOf025 = 0x7FA };; { .mfi getf.s GR_ArgNz = f8 @@ -973,7 +973,7 @@ tgammaf_from_0_to_1: (p6) mov GR_Tbl12Offs = 0x40 // 0.25 <= x < 0.5 } { .mfi - add GR_ad_Ce = 0x2C0,GR_ad_Data + add GR_ad_Ce = 0x2C0,GR_ad_Data nop.f 0 add GR_ad_Co = 0x2A0,GR_ad_Data };; @@ -992,7 +992,7 @@ tgammaf_from_0_to_1: ldfpd FR_A7,FR_A6 = [GR_ad_Co],16 ldfpd FR_A5,FR_A4 = [GR_ad_Ce],16 // jump if argument is close to 0 positive -(p12) br.cond.spnt tgammaf_overflow +(p12) br.cond.spnt tgammaf_overflow };; { .mfi ldfpd FR_A3,FR_A2 = [GR_ad_Co],16 @@ -1003,7 +1003,7 @@ tgammaf_from_0_to_1: { .mfb ldfpd FR_A1,FR_A0 = [GR_ad_Ce],16 nop.f 0 - br.cond.sptk tgamma_from_0_to_2 + br.cond.sptk tgamma_from_0_to_2 };; // here if 1 < x < 2 @@ -1023,7 +1023,7 @@ tgammaf_from_1_to_2: { .mfi nop.m 0 nop.f 0 - and GR_TblOffs = GR_TblOffs,GR_TblOffsMask + and GR_TblOffs = GR_TblOffs,GR_TblOffsMask };; { .mfi shladd GR_ad_Co = GR_TblOffs,3,GR_ad_Co @@ -1106,17 +1106,17 @@ tgamma_from_0_to_2: nop.i 0 };; { .mfi - nop.m 0 + nop.m 0 (p10) fma.s1 FR_GAMMA = FR_A7,FR_r4,FR_A3 nop.i 0 } { .mfi - nop.m 0 + nop.m 0 (p11) fma.s.s0 f8 = FR_A7,FR_r4,FR_A3 nop.i 0 };; { .mfb - nop.m 0 + nop.m 0 (p10) fma.s.s0 f8 = FR_GAMMA,FR_Rcp2,f0 br.ret.sptk b0 };; @@ -1140,7 +1140,7 @@ tgammaf_overflow_near0_bound: { .mfi nop.m 0 nop.f 0 - shl r8 = r8,20 + shl r8 = r8,20 };; { .mfi sub r8 = r8,r0,1 @@ -1150,12 +1150,12 @@ tgammaf_overflow_near0_bound: .pred.rel "mutex",p14,p15 { .mfi // set p8 to 0 in case of overflow and to 1 otherwise - // for negative arg: + // for negative arg: // no overflow if rounding mode either Z or +Inf, i.e. // GR_fpsr > 1 (p14) cmp.lt p8,p0 = 1,GR_fpsr nop.f 0 - // for positive arg: + // for positive arg: // no overflow if rounding mode either Z or -Inf, i.e. // (GR_fpsr & 1) == 0 (p15) tbit.z p0,p8 = GR_fpsr,0 @@ -1186,7 +1186,7 @@ tgammaf_overflow: mov GR_TAG = 261 // overflow } { .mfb - nop.m 0 + nop.m 0 (p15) fma.s.s0 f8 = f9,f9,f0 // set I,O and +INF result br.cond.sptk tgammaf_libm_err };; @@ -1259,7 +1259,7 @@ tgammaf_spec_args: { .mfi (p7) mov GR_TAG = 262 // negative (p7) frcpa.s0 f8,p0 = f1,f8 - nop.i 0 + nop.i 0 } { .mib nop.m 0 @@ -1283,10 +1283,10 @@ LOCAL_LIBM_ENTRY(__libm_error_region) add GR_Parameter_Y=-32,sp // Parameter 2 value nop.f 0 .save ar.pfs,GR_SAVE_PFS - mov GR_SAVE_PFS=ar.pfs // Save ar.pfs + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs } { .mfi -.fframe 64 +.fframe 64 add sp=-64,sp // Create new stack nop.f 0 mov GR_SAVE_GP=gp // Save gp @@ -1294,18 +1294,18 @@ LOCAL_LIBM_ENTRY(__libm_error_region) { .mmi stfs [GR_Parameter_Y] = FR_Y,16 // STORE Parameter 2 on stack add GR_Parameter_X = 16,sp // Parameter 1 address -.save b0, GR_SAVE_B0 - mov GR_SAVE_B0=b0 // Save b0 +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 };; .body { .mib - stfs [GR_Parameter_X] = FR_X // STORE Parameter 1 on stack - add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address - nop.b 0 + stfs [GR_Parameter_X] = FR_X // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 } { .mib stfs [GR_Parameter_Y] = FR_RESULT // STORE Parameter 3 on stack - add GR_Parameter_Y = -16,GR_Parameter_Y + add GR_Parameter_Y = -16,GR_Parameter_Y br.call.sptk b0=__libm_error_support# // Call error handling function };; { .mmi @@ -1320,10 +1320,10 @@ LOCAL_LIBM_ENTRY(__libm_error_region) mov b0 = GR_SAVE_B0 // Restore return address };; { .mib - mov gp = GR_SAVE_GP // Restore gp + mov gp = GR_SAVE_GP // Restore gp mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs br.ret.sptk b0 // Return -};; +};; LOCAL_LIBM_END(__libm_error_region) .type __libm_error_support#,@function diff --git a/sysdeps/ia64/fpu/w_tgammal.S b/sysdeps/ia64/fpu/w_tgammal.S index f64e213266..ca60eed877 100644 --- a/sysdeps/ia64/fpu/w_tgammal.S +++ b/sysdeps/ia64/fpu/w_tgammal.S @@ -21,20 +21,20 @@ // products derived from this software without specific prior written // permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at +// problem reports or change requests be submitted to it directly at // http://www.intel.com/software/products/opensource/libraries/num.htm. // // History @@ -56,7 +56,7 @@ // Floating-Point Registers: f8-f15 // f32-f127 // -// General Purpose Registers: r32-r67 +// General Purpose Registers: r32-r67 // // Predicate Registers: p6-p15 // @@ -65,8 +65,8 @@ // IEEE Special Conditions: // // tgammal(+inf) = +inf -// tgammal(-inf) = QNaN -// tgammal(+/-0) = +/-inf +// tgammal(-inf) = QNaN +// tgammal(+/-0) = +/-inf // tgammal(x<0, x - integer) = QNaN // tgammal(SNaN) = QNaN // tgammal(QNaN) = QNaN @@ -78,23 +78,23 @@ // Algorithm description // --------------------- // -// There are 3 main paths in the implementation +// There are 3 main paths in the implementation // (and additional special values branches) // // 1) |X| >= 13 - Stirling formula computation // a) Positive arguments: -// TGAMMAL(X) = exp((X-0.5)*ln(X) - X + C + S(Z)), -// where C = 0.5*ln(2*Pi) , Z = 1/Z, S(Z) - Bernulli polynomial +// TGAMMAL(X) = exp((X-0.5)*ln(X) - X + C + S(Z)), +// where C = 0.5*ln(2*Pi) , Z = 1/Z, S(Z) - Bernulli polynomial // (up to 'B18' term). -// Some of these calculation done in multiprecision. -// Ln returns multiprecision result too +// Some of these calculation done in multiprecision. +// Ln returns multiprecision result too // and exp also accepts and returns pair of values. -// +// // b) Negative arguments // TGAMMAL(-X) = PI/(X*TGAMMAL(X)*sin(PI*X)). // (X*sin(PI*X))/PI calculated in parallel with TGAMMAL. // Here we use polynomial of 9th degree with 2 multiprecision steps. -// Argument range reduction is: +// Argument range reduction is: // N = [x] with round to nearest, r = x - N, -0.5 <= r < 0.5 // After ((X-0.5)*ln(X) - X + C + S(Z)) completed we just invert // its result and compute exp with negative argument (1/exp(x)=exp(-x)) @@ -108,9 +108,9 @@ // and first 6 multiprecision computations. // Range reduction looks like // N = [x] with truncate, r = x - N - 0.5, -0.5 <= r < 0.5 -// For odd intervals we use reccurent formula: +// For odd intervals we use reccurent formula: // TGAMMAL(X) = TGAMMA(X-1)*(X-1) -// [1;2] interval is splitted to 3 subranges: +// [1;2] interval is splitted to 3 subranges: // [1;1.25], [1.25;1.75], [1.75;2] with the same polynomial forms // // b) Negative arguments @@ -121,7 +121,7 @@ // // 3) 0 < |X| < 1 - Near 0 part // a) Here we use reccurent formula TGAMMAL(X) = TGAMMAL(X+1)/X -// TGAMMAL(X+1) calculated as shown above, +// TGAMMAL(X+1) calculated as shown above, // 1/X result obtained in parallel. Then we just multiply these values. // There is only additional separated subrange: [0;0.125] with specific // polynomial constants set. @@ -136,7 +136,7 @@ RODATA .align 16 LOCAL_OBJECT_START(Constants_Tgammal_log_80_Q) -// log2_hi, log2_lo, Q_6, Q_5, Q_4, Q_3, Q_2, Q_1 +// log2_hi, log2_lo, Q_6, Q_5, Q_4, Q_3, Q_2, Q_1 data4 0x00000000,0xB1721800,0x00003FFE,0x00000000 data4 0x4361C4C6,0x82E30865,0x0000BFE2,0x00000000 data4 0xA51BE0AF,0x92492453,0x00003FFC,0x00000000 @@ -144,133 +144,133 @@ data4 0xA0CFD29F,0xAAAAAB73,0x0000BFFC,0x00000000 data4 0xCCCE3872,0xCCCCCCCC,0x00003FFC,0x00000000 data4 0xFFFFB4FB,0xFFFFFFFF,0x0000BFFC,0x00000000 data4 0xAAAAAAAB,0xAAAAAAAA,0x00003FFD,0x00000000 -data4 0x00000000,0x80000000,0x0000BFFE,0x00000000 +data4 0x00000000,0x80000000,0x0000BFFE,0x00000000 LOCAL_OBJECT_END(Constants_Tgammal_log_80_Q) .align 64 LOCAL_OBJECT_START(Constants_Tgammal_log_80_Z_G_H_h1) -// Z1 - 16 bit fixed, G1 and H1 IEEE single, h1 IEEE double +// Z1 - 16 bit fixed, G1 and H1 IEEE single, h1 IEEE double data4 0x00008000,0x3F800000,0x00000000,0x00000000 -data4 0x00000000,0x00000000,0x00000000,0x00000000 +data4 0x00000000,0x00000000,0x00000000,0x00000000 data4 0x00007879,0x3F70F0F0,0x3D785196,0x00000000 data4 0xEBA0E0D1,0x8B1D330B,0x00003FDA,0x00000000 data4 0x000071C8,0x3F638E38,0x3DF13843,0x00000000 data4 0x9EADD553,0xE2AF365E,0x00003FE2,0x00000000 data4 0x00006BCB,0x3F579430,0x3E2FF9A0,0x00000000 -data4 0x752F34A2,0xF585FEC3,0x0000BFE3,0x00000000 +data4 0x752F34A2,0xF585FEC3,0x0000BFE3,0x00000000 data4 0x00006667,0x3F4CCCC8,0x3E647FD6,0x00000000 -data4 0x893B03F3,0xF3546435,0x00003FE2,0x00000000 -data4 0x00006187,0x3F430C30,0x3E8B3AE7,0x00000000 -data4 0x39CDD2AC,0xBABA62E0,0x00003FE4,0x00000000 -data4 0x00005D18,0x3F3A2E88,0x3EA30C68,0x00000000 +data4 0x893B03F3,0xF3546435,0x00003FE2,0x00000000 +data4 0x00006187,0x3F430C30,0x3E8B3AE7,0x00000000 +data4 0x39CDD2AC,0xBABA62E0,0x00003FE4,0x00000000 +data4 0x00005D18,0x3F3A2E88,0x3EA30C68,0x00000000 data4 0x457978A1,0x8718789F,0x00003FE2,0x00000000 -data4 0x0000590C,0x3F321640,0x3EB9CEC8,0x00000000 -data4 0x3185E56A,0x9442DF96,0x0000BFE4,0x00000000 -data4 0x00005556,0x3F2AAAA8,0x3ECF9927,0x00000000 -data4 0x2BBE2CBD,0xCBF9A4BF,0x00003FE4,0x00000000 -data4 0x000051EC,0x3F23D708,0x3EE47FC5,0x00000000 -data4 0x852D5935,0xF3537535,0x00003FE3,0x00000000 -data4 0x00004EC5,0x3F1D89D8,0x3EF8947D,0x00000000 -data4 0x46CDF32F,0xA1F1E699,0x0000BFDF,0x00000000 -data4 0x00004BDB,0x3F17B420,0x3F05F3A1,0x00000000 -data4 0xD8484CE3,0x84A61856,0x00003FE4,0x00000000 +data4 0x0000590C,0x3F321640,0x3EB9CEC8,0x00000000 +data4 0x3185E56A,0x9442DF96,0x0000BFE4,0x00000000 +data4 0x00005556,0x3F2AAAA8,0x3ECF9927,0x00000000 +data4 0x2BBE2CBD,0xCBF9A4BF,0x00003FE4,0x00000000 +data4 0x000051EC,0x3F23D708,0x3EE47FC5,0x00000000 +data4 0x852D5935,0xF3537535,0x00003FE3,0x00000000 +data4 0x00004EC5,0x3F1D89D8,0x3EF8947D,0x00000000 +data4 0x46CDF32F,0xA1F1E699,0x0000BFDF,0x00000000 +data4 0x00004BDB,0x3F17B420,0x3F05F3A1,0x00000000 +data4 0xD8484CE3,0x84A61856,0x00003FE4,0x00000000 data4 0x00004925,0x3F124920,0x3F0F4303,0x00000000 -data4 0xFF28821B,0xC7DD97E0,0x0000BFE2,0x00000000 -data4 0x0000469F,0x3F0D3DC8,0x3F183EBF,0x00000000 -data4 0xEF1FD32F,0xD3C4A887,0x00003FE3,0x00000000 -data4 0x00004445,0x3F088888,0x3F20EC80,0x00000000 -data4 0x464C76DA,0x84672BE6,0x00003FE5,0x00000000 +data4 0xFF28821B,0xC7DD97E0,0x0000BFE2,0x00000000 +data4 0x0000469F,0x3F0D3DC8,0x3F183EBF,0x00000000 +data4 0xEF1FD32F,0xD3C4A887,0x00003FE3,0x00000000 +data4 0x00004445,0x3F088888,0x3F20EC80,0x00000000 +data4 0x464C76DA,0x84672BE6,0x00003FE5,0x00000000 data4 0x00004211,0x3F042108,0x3F29516A,0x00000000 -data4 0x18835FB9,0x9A43A511,0x0000BFE5,0x00000000 +data4 0x18835FB9,0x9A43A511,0x0000BFE5,0x00000000 LOCAL_OBJECT_END(Constants_Tgammal_log_80_Z_G_H_h1) .align 64 LOCAL_OBJECT_START(Constants_Tgammal_log_80_Z_G_H_h2) // Z2 - 16 bit fixed, G2 and H2 IEEE single, h2 IEEE double -data4 0x00008000,0x3F800000,0x00000000,0x00000000 -data4 0x00000000,0x00000000,0x00000000,0x00000000 -data4 0x00007F81,0x3F7F00F8,0x3B7F875D,0x00000000 +data4 0x00008000,0x3F800000,0x00000000,0x00000000 +data4 0x00000000,0x00000000,0x00000000,0x00000000 +data4 0x00007F81,0x3F7F00F8,0x3B7F875D,0x00000000 data4 0x211398BF,0xAD08B116,0x00003FDB,0x00000000 -data4 0x00007F02,0x3F7E03F8,0x3BFF015B,0x00000000 -data4 0xC376958E,0xB106790F,0x00003FDE,0x00000000 -data4 0x00007E85,0x3F7D08E0,0x3C3EE393,0x00000000 -data4 0x79A7679A,0xFD03F242,0x0000BFDA,0x00000000 -data4 0x00007E08,0x3F7C0FC0,0x3C7E0586,0x00000000 -data4 0x05E7AE08,0xF03F81C3,0x0000BFDF,0x00000000 -data4 0x00007D8D,0x3F7B1880,0x3C9E75D2,0x00000000 +data4 0x00007F02,0x3F7E03F8,0x3BFF015B,0x00000000 +data4 0xC376958E,0xB106790F,0x00003FDE,0x00000000 +data4 0x00007E85,0x3F7D08E0,0x3C3EE393,0x00000000 +data4 0x79A7679A,0xFD03F242,0x0000BFDA,0x00000000 +data4 0x00007E08,0x3F7C0FC0,0x3C7E0586,0x00000000 +data4 0x05E7AE08,0xF03F81C3,0x0000BFDF,0x00000000 +data4 0x00007D8D,0x3F7B1880,0x3C9E75D2,0x00000000 data4 0x049EB22F,0xD1B87D3C,0x00003FDE,0x00000000 -data4 0x00007D12,0x3F7A2328,0x3CBDC97A,0x00000000 -data4 0x3A9E81E0,0xFABC8B95,0x00003FDF,0x00000000 +data4 0x00007D12,0x3F7A2328,0x3CBDC97A,0x00000000 +data4 0x3A9E81E0,0xFABC8B95,0x00003FDF,0x00000000 data4 0x00007C98,0x3F792FB0,0x3CDCFE47,0x00000000 -data4 0x7C4B5443,0xF5F3653F,0x00003FDF,0x00000000 -data4 0x00007C20,0x3F783E08,0x3CFC15D0,0x00000000 -data4 0xF65A1773,0xE78AB204,0x00003FE0,0x00000000 -data4 0x00007BA8,0x3F774E38,0x3D0D874D,0x00000000 -data4 0x7B8EF695,0xDB7CBFFF,0x0000BFE0,0x00000000 -data4 0x00007B31,0x3F766038,0x3D1CF49B,0x00000000 -data4 0xCF773FB3,0xC0241AEA,0x0000BFE0,0x00000000 -data4 0x00007ABB,0x3F757400,0x3D2C531D,0x00000000 -data4 0xC9539FDF,0xFC8F4D48,0x00003FE1,0x00000000 -data4 0x00007A45,0x3F748988,0x3D3BA322,0x00000000 -data4 0x954665C2,0x9CD035FB,0x0000BFE1,0x00000000 -data4 0x000079D1,0x3F73A0D0,0x3D4AE46F,0x00000000 -data4 0xDD367A30,0xEC9017C7,0x00003FE1,0x00000000 -data4 0x0000795D,0x3F72B9D0,0x3D5A1756,0x00000000 -data4 0xCB11189C,0xEE6625D3,0x0000BFE1,0x00000000 -data4 0x000078EB,0x3F71D488,0x3D693B9D,0x00000000 -data4 0xBE11C424,0xA49C8DB5,0x0000BFE0,0x00000000 +data4 0x7C4B5443,0xF5F3653F,0x00003FDF,0x00000000 +data4 0x00007C20,0x3F783E08,0x3CFC15D0,0x00000000 +data4 0xF65A1773,0xE78AB204,0x00003FE0,0x00000000 +data4 0x00007BA8,0x3F774E38,0x3D0D874D,0x00000000 +data4 0x7B8EF695,0xDB7CBFFF,0x0000BFE0,0x00000000 +data4 0x00007B31,0x3F766038,0x3D1CF49B,0x00000000 +data4 0xCF773FB3,0xC0241AEA,0x0000BFE0,0x00000000 +data4 0x00007ABB,0x3F757400,0x3D2C531D,0x00000000 +data4 0xC9539FDF,0xFC8F4D48,0x00003FE1,0x00000000 +data4 0x00007A45,0x3F748988,0x3D3BA322,0x00000000 +data4 0x954665C2,0x9CD035FB,0x0000BFE1,0x00000000 +data4 0x000079D1,0x3F73A0D0,0x3D4AE46F,0x00000000 +data4 0xDD367A30,0xEC9017C7,0x00003FE1,0x00000000 +data4 0x0000795D,0x3F72B9D0,0x3D5A1756,0x00000000 +data4 0xCB11189C,0xEE6625D3,0x0000BFE1,0x00000000 +data4 0x000078EB,0x3F71D488,0x3D693B9D,0x00000000 +data4 0xBE11C424,0xA49C8DB5,0x0000BFE0,0x00000000 LOCAL_OBJECT_END(Constants_Tgammal_log_80_Z_G_H_h2) .align 64 LOCAL_OBJECT_START(Constants_Tgammal_log_80_h3_G_H) -// h3 IEEE double extended, H3 and G3 IEEE single -data4 0x112666B0,0xAAACAAB1,0x00003FD3,0x3F7FFC00 +// h3 IEEE double extended, H3 and G3 IEEE single +data4 0x112666B0,0xAAACAAB1,0x00003FD3,0x3F7FFC00 data4 0x9B7FAD21,0x90051030,0x00003FD8,0x3F7FF400 -data4 0xF4D783C4,0xA6B46F46,0x00003FDA,0x3F7FEC00 -data4 0x11C6DDCA,0xDA148D88,0x0000BFD8,0x3F7FE400 +data4 0xF4D783C4,0xA6B46F46,0x00003FDA,0x3F7FEC00 +data4 0x11C6DDCA,0xDA148D88,0x0000BFD8,0x3F7FE400 data4 0xCA964D95,0xCE65C1D8,0x0000BFD8,0x3F7FDC00 -data4 0x23412D13,0x883838EE,0x0000BFDB,0x3F7FD400 -data4 0x983ED687,0xB7E5CFA1,0x00003FDB,0x3F7FCC08 -data4 0xE3C3930B,0xDBE23B16,0x0000BFD9,0x3F7FC408 -data4 0x48AA4DFC,0x9B92F1FC,0x0000BFDC,0x3F7FBC10 -data4 0xCE9C8F7E,0x9A8CEB15,0x0000BFD9,0x3F7FB410 -data4 0x0DECE74A,0x8C220879,0x00003FDC,0x3F7FAC18 +data4 0x23412D13,0x883838EE,0x0000BFDB,0x3F7FD400 +data4 0x983ED687,0xB7E5CFA1,0x00003FDB,0x3F7FCC08 +data4 0xE3C3930B,0xDBE23B16,0x0000BFD9,0x3F7FC408 +data4 0x48AA4DFC,0x9B92F1FC,0x0000BFDC,0x3F7FBC10 +data4 0xCE9C8F7E,0x9A8CEB15,0x0000BFD9,0x3F7FB410 +data4 0x0DECE74A,0x8C220879,0x00003FDC,0x3F7FAC18 data4 0x2F053150,0xB25CA912,0x0000BFDA,0x3F7FA420 -data4 0xD9A5BE20,0xA5876555,0x00003FDB,0x3F7F9C20 -data4 0x2053F087,0xC919BB6E,0x00003FD9,0x3F7F9428 -data4 0x041E9A77,0xB70BDA79,0x00003FDC,0x3F7F8C30 -data4 0xEA1C9C30,0xF18A5C08,0x00003FDA,0x3F7F8438 -data4 0x796D89E5,0xA3790D84,0x0000BFDD,0x3F7F7C40 -data4 0xA2915A3A,0xE1852369,0x0000BFDD,0x3F7F7448 -data4 0xA39ED868,0xD803858F,0x00003FDC,0x3F7F6C50 -data4 0x9417EBB7,0xB2EEE356,0x0000BFDD,0x3F7F6458 -data4 0x9BB0D07F,0xED5C1F8A,0x0000BFDC,0x3F7F5C68 -data4 0xE87C740A,0xD6D201A0,0x0000BFDD,0x3F7F5470 -data4 0x1CA74025,0xE8DEBF5E,0x00003FDC,0x3F7F4C78 +data4 0xD9A5BE20,0xA5876555,0x00003FDB,0x3F7F9C20 +data4 0x2053F087,0xC919BB6E,0x00003FD9,0x3F7F9428 +data4 0x041E9A77,0xB70BDA79,0x00003FDC,0x3F7F8C30 +data4 0xEA1C9C30,0xF18A5C08,0x00003FDA,0x3F7F8438 +data4 0x796D89E5,0xA3790D84,0x0000BFDD,0x3F7F7C40 +data4 0xA2915A3A,0xE1852369,0x0000BFDD,0x3F7F7448 +data4 0xA39ED868,0xD803858F,0x00003FDC,0x3F7F6C50 +data4 0x9417EBB7,0xB2EEE356,0x0000BFDD,0x3F7F6458 +data4 0x9BB0D07F,0xED5C1F8A,0x0000BFDC,0x3F7F5C68 +data4 0xE87C740A,0xD6D201A0,0x0000BFDD,0x3F7F5470 +data4 0x1CA74025,0xE8DEBF5E,0x00003FDC,0x3F7F4C78 data4 0x1F34A7EB,0x9A995A97,0x0000BFDC,0x3F7F4488 -data4 0x359EED97,0x9CB0F742,0x0000BFDA,0x3F7F3C90 -data4 0xBBC6A1C8,0xD6F833C2,0x0000BFDD,0x3F7F34A0 -data4 0xE71090EC,0xE1F68F2A,0x00003FDC,0x3F7F2CA8 -data4 0xC160A74F,0xD1881CF1,0x0000BFDB,0x3F7F24B8 -data4 0xD78CB5A4,0x9AD05AE2,0x00003FD6,0x3F7F1CC8 -data4 0x9A77DC4B,0xE658CB8E,0x0000BFDD,0x3F7F14D8 -data4 0x6BD6D312,0xBA281296,0x00003FDC,0x3F7F0CE0 -data4 0xF95210D0,0xB478BBEB,0x0000BFDB,0x3F7F04F0 -data4 0x38800100,0x39400480,0x39A00640,0x39E00C41 // H's start here -data4 0x3A100A21,0x3A300F22,0x3A4FF51C,0x3A6FFC1D +data4 0x359EED97,0x9CB0F742,0x0000BFDA,0x3F7F3C90 +data4 0xBBC6A1C8,0xD6F833C2,0x0000BFDD,0x3F7F34A0 +data4 0xE71090EC,0xE1F68F2A,0x00003FDC,0x3F7F2CA8 +data4 0xC160A74F,0xD1881CF1,0x0000BFDB,0x3F7F24B8 +data4 0xD78CB5A4,0x9AD05AE2,0x00003FD6,0x3F7F1CC8 +data4 0x9A77DC4B,0xE658CB8E,0x0000BFDD,0x3F7F14D8 +data4 0x6BD6D312,0xBA281296,0x00003FDC,0x3F7F0CE0 +data4 0xF95210D0,0xB478BBEB,0x0000BFDB,0x3F7F04F0 +data4 0x38800100,0x39400480,0x39A00640,0x39E00C41 // H's start here +data4 0x3A100A21,0x3A300F22,0x3A4FF51C,0x3A6FFC1D data4 0x3A87F20B,0x3A97F68B,0x3AA7EB86,0x3AB7E101 -data4 0x3AC7E701,0x3AD7DD7B,0x3AE7D474,0x3AF7CBED -data4 0x3B03E1F3,0x3B0BDE2F,0x3B13DAAA,0x3B1BD766 -data4 0x3B23CC5C,0x3B2BC997,0x3B33C711,0x3B3BBCC6 -data4 0x3B43BAC0,0x3B4BB0F4,0x3B53AF6D,0x3B5BA620 -data4 0x3B639D12,0x3B6B9444,0x3B7393BC,0x3B7B8B6D +data4 0x3AC7E701,0x3AD7DD7B,0x3AE7D474,0x3AF7CBED +data4 0x3B03E1F3,0x3B0BDE2F,0x3B13DAAA,0x3B1BD766 +data4 0x3B23CC5C,0x3B2BC997,0x3B33C711,0x3B3BBCC6 +data4 0x3B43BAC0,0x3B4BB0F4,0x3B53AF6D,0x3B5BA620 +data4 0x3B639D12,0x3B6B9444,0x3B7393BC,0x3B7B8B6D LOCAL_OBJECT_END(Constants_Tgammal_log_80_h3_G_H) -.align 64 +.align 64 LOCAL_OBJECT_START(Constants_Tgammal_stirling) //0.5*ln(2*Pi)=9.1893853320467266954096885e-01 + 7.2239360881843238220057778e-17 data8 0x3FED67F1C864BEB4, 0x3C94D252F2400510 -// Bernulli numbers +// Bernulli numbers data8 0xAAAAAAAAAAAAAAAB, 0x00003FFB //B2 = 8.3333333333333333333333333333e-02 data8 0xBF66C16C16C16C17 //B4 = -2.7777777777777777777777777778e-03 data8 0x3F4A01A01A01A01A //B6 = 7.9365079365079365079365079365e-04 @@ -283,9 +283,9 @@ data8 0x3FC6FE96381E0680 //B18 = 1.7964437236883057316493849002e-01 data8 0x3FE0000000000000 // 0.5 LOCAL_OBJECT_END(Constants_Tgammal_stirling) -.align 64 +.align 64 LOCAL_OBJECT_START(Constants_Tgammal_sin) -// Polynomial coefficients for the sin(Pi*x)/Pi, 0 <= |x| < 0.5 +// Polynomial coefficients for the sin(Pi*x)/Pi, 0 <= |x| < 0.5 //A2 = 8.1174242528335360802316245099e-01 + 5.1302254650266899774269946201e-18 data8 0x3FE9F9CB402BC46C, 0x3C57A8B3819B7CEC //A1 = -1.6449340668482264060656916627e+00 + -3.0210280454695477893051351574e-17 @@ -299,7 +299,7 @@ data8 0xD63402E798FEC896, 0x00003FF9 //A4 = 2.6147847817611456327417812320e-02 data8 0xC354723906D95E92, 0x0000BFFC //A3 = -1.9075182412208257558294507774e-01 LOCAL_OBJECT_END(Constants_Tgammal_sin) -.align 64 +.align 64 LOCAL_OBJECT_START(Constants_Tgammal_exp_64_Arg) data4 0x00000000,0xB17217F4,0x00003FF2,0x00000000 // L_hi = hi part log(2)/2^12 data4 0xF278ECE6,0xF473DE6A,0x00003FD4,0x00000000 // L_lo = lo part log(2)/2^12 @@ -312,8 +312,8 @@ data4 0xFFFFFFFF,0xFFFFFFFF,0x00003FFD,0x00000000 // A1 LOCAL_OBJECT_END(Constants_Tgammal_exp_64_A) LOCAL_OBJECT_START(Constants_Tgammal_exp_64_T1) -data4 0x3F800000,0x3F8164D2,0x3F82CD87,0x3F843A29 -data4 0x3F85AAC3,0x3F871F62,0x3F88980F,0x3F8A14D5 +data4 0x3F800000,0x3F8164D2,0x3F82CD87,0x3F843A29 +data4 0x3F85AAC3,0x3F871F62,0x3F88980F,0x3F8A14D5 data4 0x3F8B95C2,0x3F8D1ADF,0x3F8EA43A,0x3F9031DC data4 0x3F91C3D3,0x3F935A2B,0x3F94F4F0,0x3F96942D data4 0x3F9837F0,0x3F99E046,0x3F9B8D3A,0x3F9D3EDA @@ -331,21 +331,21 @@ data4 0x3FF5257D,0x3FF7D0DF,0x3FFA83B3,0x3FFD3E0C LOCAL_OBJECT_END(Constants_Tgammal_exp_64_T1) LOCAL_OBJECT_START(Constants_Tgammal_exp_64_T2) -data4 0x3F800000,0x3F80058C,0x3F800B18,0x3F8010A4 -data4 0x3F801630,0x3F801BBD,0x3F80214A,0x3F8026D7 -data4 0x3F802C64,0x3F8031F2,0x3F803780,0x3F803D0E -data4 0x3F80429C,0x3F80482B,0x3F804DB9,0x3F805349 -data4 0x3F8058D8,0x3F805E67,0x3F8063F7,0x3F806987 -data4 0x3F806F17,0x3F8074A8,0x3F807A39,0x3F807FCA -data4 0x3F80855B,0x3F808AEC,0x3F80907E,0x3F809610 -data4 0x3F809BA2,0x3F80A135,0x3F80A6C7,0x3F80AC5A -data4 0x3F80B1ED,0x3F80B781,0x3F80BD14,0x3F80C2A8 -data4 0x3F80C83C,0x3F80CDD1,0x3F80D365,0x3F80D8FA -data4 0x3F80DE8F,0x3F80E425,0x3F80E9BA,0x3F80EF50 -data4 0x3F80F4E6,0x3F80FA7C,0x3F810013,0x3F8105AA -data4 0x3F810B41,0x3F8110D8,0x3F81166F,0x3F811C07 -data4 0x3F81219F,0x3F812737,0x3F812CD0,0x3F813269 -data4 0x3F813802,0x3F813D9B,0x3F814334,0x3F8148CE +data4 0x3F800000,0x3F80058C,0x3F800B18,0x3F8010A4 +data4 0x3F801630,0x3F801BBD,0x3F80214A,0x3F8026D7 +data4 0x3F802C64,0x3F8031F2,0x3F803780,0x3F803D0E +data4 0x3F80429C,0x3F80482B,0x3F804DB9,0x3F805349 +data4 0x3F8058D8,0x3F805E67,0x3F8063F7,0x3F806987 +data4 0x3F806F17,0x3F8074A8,0x3F807A39,0x3F807FCA +data4 0x3F80855B,0x3F808AEC,0x3F80907E,0x3F809610 +data4 0x3F809BA2,0x3F80A135,0x3F80A6C7,0x3F80AC5A +data4 0x3F80B1ED,0x3F80B781,0x3F80BD14,0x3F80C2A8 +data4 0x3F80C83C,0x3F80CDD1,0x3F80D365,0x3F80D8FA +data4 0x3F80DE8F,0x3F80E425,0x3F80E9BA,0x3F80EF50 +data4 0x3F80F4E6,0x3F80FA7C,0x3F810013,0x3F8105AA +data4 0x3F810B41,0x3F8110D8,0x3F81166F,0x3F811C07 +data4 0x3F81219F,0x3F812737,0x3F812CD0,0x3F813269 +data4 0x3F813802,0x3F813D9B,0x3F814334,0x3F8148CE data4 0x3F814E68,0x3F815402,0x3F81599C,0x3F815F37 LOCAL_OBJECT_END(Constants_Tgammal_exp_64_T2) @@ -423,7 +423,7 @@ LOCAL_OBJECT_END(Constants_Tgammal_exp_64_W2) LOCAL_OBJECT_START(Constants_Tgammal_poly) -// Polynomial coefficients for the tgammal(x), 2 <= |x| < 3 +// Polynomial coefficients for the tgammal(x), 2 <= |x| < 3 //A5 = 2.8360780594841213109180699803e-02 + 2.2504152891014320704380000000e-19 data8 0x3F9D0A9BC49353D2, 0x3C109AEA0F23CE2D //A4 = 1.0967323400216015538699565468e-01 + 9.9225166000430644587276000000e-18 @@ -452,7 +452,7 @@ data8 0xC5C7E6D62A6991D8, 0x00003FF4 //A8 = 7.5447412886334708803357581519e-04 data8 0xD2AF690725C62D88, 0x00003FF5 //A7 = 1.6074004848394703022110823298e-03 data8 0xAA44E635D4B7B682, 0x00003FF8 //A6 = 1.0392403425906843901680697839e-02 // -// Polynomial coefficients for the tgammal(x), 4 <= |x| < 5 +// Polynomial coefficients for the tgammal(x), 4 <= |x| < 5 //A5 = 1.1600674810589555185913468449e+00 + 3.0229979112715124660731000000e-17 data8 0x3FF28FA2EB44D22E, 0x3C816D285234C815 //A4 = 3.1374268565470946334983182169e+00 + 1.3694868953995008497659600000e-16 @@ -481,7 +481,7 @@ data8 0xDA38E39C13819D2A, 0x00003FF9 //A8 = 2.6638454961912040754759086920e-02 data8 0xD696DF8D8389FE53, 0x00003FFB //A7 = 1.0477995539298934056097943975e-01 data8 0xBDD5C153048BC435, 0x00003FFD //A6 = 3.7077144754791605130056406006e-01 // -// Polynomial coefficients for the tgammal(x), 6 <= |x| < 7 +// Polynomial coefficients for the tgammal(x), 6 <= |x| < 7 //A5 = 6.7169398121054200601065531373e+01 + 2.9481001527213915901489600000e-15 data8 0x4050CAD76B377BA0, 0x3CEA8DDB2B2DE93E //A4 = 1.6115104376855398982115730178e+02 + 1.3422421925418824418257300000e-14 @@ -510,7 +510,7 @@ data8 0x84FBDE0947718B58, 0x00004000 //A8 = 2.0778727617851237754568261869e+00 data8 0xEEC1371E265A2C3A, 0x00004001 //A7 = 7.4610858525146049022238037342e+00 data8 0xBF514B9BE68ED59D, 0x00004003 //A6 = 2.3914694993947572859629197920e+01 // -// Polynomial coefficients for the tgammal(x), 8 <= |x| < 9 +// Polynomial coefficients for the tgammal(x), 8 <= |x| < 9 //A5 = 5.8487447114416836484451778233e+03 + 4.7365465221455983144182900000e-13 data8 0x40B6D8BEA568B6FD, 0x3D60AA4D44C2589B //A4 = 1.2796464063087094473303295672e+04 + 1.2373341702514898266244200000e-12 @@ -539,7 +539,7 @@ data8 0xE5AA8BB1BF02934D, 0x00004006 //A8 = 2.2966619406617480799195651466e+02 data8 0xBF6CFEFD67F59845, 0x00004008 //A7 = 7.6570306334640770654588802417e+02 data8 0x8DB5D2F001635C29, 0x0000400A //A6 = 2.2673639984182571062068713002e+03 // -// Polynomial coefficients for the tgammal(x), 10 <= |x| < 11 +// Polynomial coefficients for the tgammal(x), 10 <= |x| < 11 //A5 = 7.2546009516580589115619659424e+05 + 1.0343348865365065212891728822e-10 data8 0x412623A830B99290, 0x3DDC6E7C157611C4 //A4 = 1.4756292870840241666883230209e+06 + 8.1516565365333844166705674775e-11 @@ -568,7 +568,7 @@ data8 0x872390769650FBE2, 0x0000400E //A8 = 3.4595564309496661629764193479e+04 data8 0xD3E5E8D6923910C1, 0x0000400F //A7 = 1.0849181904819284819615140521e+05 data8 0x930D70602F50B754, 0x00004011 //A6 = 3.0116351174131169193070583741e+05 // -// Polynomial coefficients for the tgammal(x), 12 <= |x| < 13 +// Polynomial coefficients for the tgammal(x), 12 <= |x| < 13 //A5 = 1.2249876249976964294910430908e+08 + 6.0051348061679753770848000000e-09 data8 0x419D34BB29FFC39D, 0x3E39CAB72E01818D //A4 = 2.3482765927605420351028442383e+08 + 1.1874729051592862323641700000e-08 @@ -601,7 +601,7 @@ LOCAL_OBJECT_END(Constants_Tgammal_poly) LOCAL_OBJECT_START(Constants_Tgammal_poly_splitted) -// Polynomial coefficients for the tgammal(x), 1 <= |x| < 1.25 +// Polynomial coefficients for the tgammal(x), 1 <= |x| < 1.25 //A5 = -9.8199506890310417350775651357e-01+ -3.2546247786122976510752200000e-17 data8 0xBFEF6C80EC38B509, 0xBC82C2FA7A3DE3BD //A4 = 9.8172808683439960475425323239e-01 + 4.4847611775298520359811400000e-17 @@ -630,7 +630,7 @@ data8 0xFF83DAC83119B52C, 0x00003FFE //A8 = 9.9810569179053383842734164901e-01 data8 0xFEF9F8AB891ABB24, 0x0000BFFE //A7 = -9.9600176036720260345608796766e-01 data8 0xFE3F0537573C8235, 0x00003FFE //A6 = 9.9314911461918778676646301341e-01 // -// Polynomial coefficients for the tgammal(x), 1.25 <= |x| < 1.75 +// Polynomial coefficients for the tgammal(x), 1.25 <= |x| < 1.75 //A5 = -7.7523052299853054125655660300e-02+ -1.2693512521686721504433600000e-17 data8 0xBFB3D88CFE50601B, 0xBC6D44ED60EE2170 //A4 = 1.4464535904462152982041800442e-01 + 2.5426820829345729856648800000e-17 @@ -659,7 +659,7 @@ data8 0xD3A963578BE291E3, 0x00003FF9 //A8 = 2.5837606456090186343624210891e-02 data8 0x9BA7EAE64C42FDF7, 0x0000BFFA //A7 = -3.8001935555045161419575037512e-02 data8 0xF0115BA1A77607E7, 0x00003FFA //A6 = 5.8610303817173477119764956736e-02 // -// Polynomial coefficients for the tgammal(x), 1.75 <= |x| < 2.0 +// Polynomial coefficients for the tgammal(x), 1.75 <= |x| < 2.0 //A5 = 2.6698206874501426502654943818e-04 + 3.4033756836921062797887300000e-20 data8 0x3F317F3740FE2A68, 0x3BE417093234B06E //A4 = 7.4249010753513894345090307070e-02 + 3.9810018444482764697014200000e-18 @@ -688,7 +688,7 @@ data8 0x89E224E42F93F005, 0x00003FF6 //A8 = 2.1039333407187324139473634747e-03 data8 0xBAF374824937A323, 0x00003FF6 //A7 = 2.8526458211545152218493600470e-03 data8 0xB6BF7564F52140C6, 0x00003FF8 //A6 = 1.1154045718131014476684982178e-02 // -// Polynomial coefficients for the tgammal(x), 0.0 <= |x| < 0.125 +// Polynomial coefficients for the tgammal(x), 0.0 <= |x| < 0.125 //A5 = -9.8199506890314514073736518185e-01+ -5.9363811993837985890950900000e-17 data8 0xBFEF6C80EC38B67A, 0xBC911C46B447C81F //A4 = 9.8172808683440015986576554496e-01 + 2.7457414262802803699834200000e-17 @@ -739,7 +739,7 @@ GR_l_Log_Table1 = r34 GR_l_BIAS = r34 GR_l_Index1 = r35 GR_l_Index2 = r36 -GR_l_signif_Z = r37 +GR_l_signif_Z = r37 GR_l_X_0 = r38 GR_l_X_1 = r39 GR_l_X_2 = r40 @@ -788,33 +788,33 @@ FR_l_poly = f51 FR_l_rsq = f52 FR_l_Y_lo_res = f53 -FR_l_Y0 = f55 -FR_l_Q0 = f56 -FR_l_E0 = f57 -FR_l_E2 = f58 -FR_l_E1 = f59 -FR_l_Y1 = f60 -FR_l_E3 = f61 -FR_l_Y2 = f62 - -FR_l_Z = f63 -FR_l_Z2 = f64 -FR_l_Z4 = f65 -FR_l_Z8 = f66 - -FR_l_CH = f67 -FR_l_CL = f68 - -FR_l_B2 = f69 -FR_l_B4 = f70 -FR_l_B6 = f71 -FR_l_B8 = f72 -FR_l_B10 = f73 -FR_l_B12 = f74 -FR_l_B14 = f75 -FR_l_B16 = f76 -FR_l_B18 = f77 -FR_l_Half = f78 +FR_l_Y0 = f55 +FR_l_Q0 = f56 +FR_l_E0 = f57 +FR_l_E2 = f58 +FR_l_E1 = f59 +FR_l_Y1 = f60 +FR_l_E3 = f61 +FR_l_Y2 = f62 + +FR_l_Z = f63 +FR_l_Z2 = f64 +FR_l_Z4 = f65 +FR_l_Z8 = f66 + +FR_l_CH = f67 +FR_l_CL = f68 + +FR_l_B2 = f69 +FR_l_B4 = f70 +FR_l_B6 = f71 +FR_l_B8 = f72 +FR_l_B10 = f73 +FR_l_B12 = f74 +FR_l_B14 = f75 +FR_l_B16 = f76 +FR_l_B18 = f77 +FR_l_Half = f78 FR_l_SS = f79 FR_l_AbsX_m_Half = f80 FR_l_CXH = f81 @@ -856,17 +856,17 @@ FR_n_TT = f97 FR_n_TH = f98 FR_n_TL = f99 -FR_n_A2H = f100 -FR_n_A2L = f101 -FR_n_A1H = f102 -FR_n_A1L = f103 -FR_n_A9 = f104 -FR_n_A8 = f105 -FR_n_A7 = f106 -FR_n_A6 = f107 -FR_n_A5 = f108 -FR_n_A4 = f109 -FR_n_A3 = f110 +FR_n_A2H = f100 +FR_n_A2L = f101 +FR_n_A1H = f102 +FR_n_A1L = f103 +FR_n_A9 = f104 +FR_n_A8 = f105 +FR_n_A7 = f106 +FR_n_A6 = f107 +FR_n_A5 = f108 +FR_n_A4 = f109 +FR_n_A3 = f110 FR_n_PolyH = f111 FR_n_PolyL = f112 @@ -881,17 +881,17 @@ FR_n_NegOne = f116 FR_n_Y0 = f117 -FR_n_Q0 = f118 -FR_n_E0 = f119 - -FR_n_E2 = f120 -FR_n_E1 = f121 - -FR_n_Y1 = f55 -FR_n_E3 = f56 - -FR_n_Y2 = f57 -FR_n_R0 = f58 +FR_n_Q0 = f118 +FR_n_E0 = f119 + +FR_n_E2 = f120 +FR_n_E1 = f121 + +FR_n_Y1 = f55 +FR_n_E3 = f56 + +FR_n_Y2 = f57 +FR_n_R0 = f58 FR_n_E4 = f59 FR_n_RcpResH = f60 @@ -1020,71 +1020,71 @@ FR_p_1p5 = f34 FR_p_AbsXM1 = f35 FR_p_2 = f36 -FR_p_A20 = f37 -FR_p_A19 = f38 -FR_p_A18 = f39 -FR_p_A17 = f40 -FR_p_A16 = f41 -FR_p_A15 = f42 -FR_p_A14 = f43 -FR_p_A13 = f44 -FR_p_A12 = f45 -FR_p_A11 = f46 -FR_p_A10 = f47 -FR_p_A9 = f48 -FR_p_A8 = f49 -FR_p_A7 = f50 -FR_p_A6 = f51 -FR_p_A5H = f52 -FR_p_A5L = f53 -FR_p_A4H = f54 -FR_p_A4L = f55 -FR_p_A3H = f56 -FR_p_A3L = f57 -FR_p_A2H = f58 -FR_p_A2L = f59 -FR_p_A1H = f60 -FR_p_A1L = f61 -FR_p_A0H = f62 -FR_p_A0L = f63 +FR_p_A20 = f37 +FR_p_A19 = f38 +FR_p_A18 = f39 +FR_p_A17 = f40 +FR_p_A16 = f41 +FR_p_A15 = f42 +FR_p_A14 = f43 +FR_p_A13 = f44 +FR_p_A12 = f45 +FR_p_A11 = f46 +FR_p_A10 = f47 +FR_p_A9 = f48 +FR_p_A8 = f49 +FR_p_A7 = f50 +FR_p_A6 = f51 +FR_p_A5H = f52 +FR_p_A5L = f53 +FR_p_A4H = f54 +FR_p_A4L = f55 +FR_p_A3H = f56 +FR_p_A3L = f57 +FR_p_A2H = f58 +FR_p_A2L = f59 +FR_p_A1H = f60 +FR_p_A1L = f61 +FR_p_A0H = f62 +FR_p_A0L = f63 FR_p_XR = f64 -FR_p_XR2 = f65 -FR_p_XR2L = f52 - -FR_p_XR3 = f58 -FR_p_XR3L = f38 - -FR_p_XR4 = f42 -FR_p_XR6 = f40 -FR_p_XR8 = f37 - -FR_p_Poly5H = f66 -FR_p_Poly5L = f67 -FR_p_Poly4H = f53 -FR_p_Poly4L = f44 -FR_p_Poly3H = f41 -FR_p_Poly3L = f47 -FR_p_Poly2H = f68 -FR_p_Poly2L = f54 -FR_p_Poly1H = f55 -FR_p_Poly1L = f46 -FR_p_Poly0H = f39 -FR_p_Poly0L = f43 - -FR_p_Temp5H = f69 -FR_p_Temp5L = f70 -FR_p_Temp4H = f71 -FR_p_Temp4L = f60 -FR_p_Temp2H = f72 -FR_p_Temp2L = f73 -FR_p_Temp1H = f59 -FR_p_Temp1L = f61 -FR_p_Temp0H = f49 -FR_p_Temp0L = f48 -FR_p_PolyTail = f45 -FR_p_OddPoly0H = f56 -FR_p_OddPoly0L = f51 +FR_p_XR2 = f65 +FR_p_XR2L = f52 + +FR_p_XR3 = f58 +FR_p_XR3L = f38 + +FR_p_XR4 = f42 +FR_p_XR6 = f40 +FR_p_XR8 = f37 + +FR_p_Poly5H = f66 +FR_p_Poly5L = f67 +FR_p_Poly4H = f53 +FR_p_Poly4L = f44 +FR_p_Poly3H = f41 +FR_p_Poly3L = f47 +FR_p_Poly2H = f68 +FR_p_Poly2L = f54 +FR_p_Poly1H = f55 +FR_p_Poly1L = f46 +FR_p_Poly0H = f39 +FR_p_Poly0L = f43 + +FR_p_Temp5H = f69 +FR_p_Temp5L = f70 +FR_p_Temp4H = f71 +FR_p_Temp4L = f60 +FR_p_Temp2H = f72 +FR_p_Temp2L = f73 +FR_p_Temp1H = f59 +FR_p_Temp1L = f61 +FR_p_Temp0H = f49 +FR_p_Temp0L = f48 +FR_p_PolyTail = f45 +FR_p_OddPoly0H = f56 +FR_p_OddPoly0L = f51 FR_p_0p25 = f73 @@ -1092,83 +1092,83 @@ FR_p_0p25 = f73 //======================================================= // Negative polynomial part registers // General Purpose Registers -GR_r_sin_Table = r47 -GR_r_sin_Table2 = r60 +GR_r_sin_Table = r47 +GR_r_sin_Table2 = r60 // Floating Point Registers -FR_r_IXNS = FR_n_IXNS -FR_r_IXN = FR_n_IXN +FR_r_IXNS = FR_n_IXNS +FR_r_IXN = FR_n_IXN FR_r_AbsX = FR_l_AbsX -FR_r_A9 = f74 -FR_r_A8 = f75 -FR_r_A7 = f76 -FR_r_A6 = f77 -FR_r_A5 = f78 -FR_r_A4 = f79 -FR_r_A3 = f80 -FR_r_A2H = f81 -FR_r_A2L = f82 -FR_r_A1H = f83 -FR_r_A1L = f84 - -FR_r_XNS = f85 -FR_r_XS = f86 -FR_r_XS2 = f87 -FR_r_XS2L = f88 -FR_r_XS4 = f89 -FR_r_XS7 = f90 -FR_r_XS8 = f91 +FR_r_A9 = f74 +FR_r_A8 = f75 +FR_r_A7 = f76 +FR_r_A6 = f77 +FR_r_A5 = f78 +FR_r_A4 = f79 +FR_r_A3 = f80 +FR_r_A2H = f81 +FR_r_A2L = f82 +FR_r_A1H = f83 +FR_r_A1L = f84 + +FR_r_XNS = f85 +FR_r_XS = f86 +FR_r_XS2 = f87 +FR_r_XS2L = f88 +FR_r_XS4 = f89 +FR_r_XS7 = f90 +FR_r_XS8 = f91 FR_r_Tail = f92 -FR_r_TT = f93 -FR_r_TH = f94 -FR_r_TL = f95 +FR_r_TT = f93 +FR_r_TH = f94 +FR_r_TL = f95 FR_r_ResH = f96 FR_r_ResL = f97 -FR_r_Res3H = f98 -FR_r_Res3L = f99 - -FR_r_Res1H = f100 -FR_r_Res1L = f101 - - - -FR_r_Y0 = f102 -FR_r_Q0 = f103 -FR_r_E0 = f104 -FR_r_E2 = f105 -FR_r_E1 = f106 -FR_r_Y1 = f107 -FR_r_E3 = f108 -FR_r_Y2 = f109 -FR_r_R0 = f110 -FR_r_E4 = f111 -FR_r_ZH = f112 -FR_r_Y3 = f113 -FR_r_R1 = f114 +FR_r_Res3H = f98 +FR_r_Res3L = f99 + +FR_r_Res1H = f100 +FR_r_Res1L = f101 + + + +FR_r_Y0 = f102 +FR_r_Q0 = f103 +FR_r_E0 = f104 +FR_r_E2 = f105 +FR_r_E1 = f106 +FR_r_Y1 = f107 +FR_r_E3 = f108 +FR_r_Y2 = f109 +FR_r_R0 = f110 +FR_r_E4 = f111 +FR_r_ZH = f112 +FR_r_Y3 = f113 +FR_r_R1 = f114 FR_r_ZHN = f115 FR_r_ZL = f115 FR_r_NegOne = f116 -FR_z_Y0 = f102 -FR_z_Q0 = f103 -FR_z_E0 = f104 -FR_z_E2 = f105 -FR_z_E1 = f106 -FR_z_Y1 = f107 -FR_z_E3 = f108 -FR_z_Y2 = f109 -FR_z_R0 = f110 -FR_z_E4 = f111 -FR_z_ZH = f112 -FR_z_Y3 = f113 -FR_z_R1 = f114 -FR_z_ZL = f115 +FR_z_Y0 = f102 +FR_z_Q0 = f103 +FR_z_E0 = f104 +FR_z_E2 = f105 +FR_z_E1 = f106 +FR_z_Y1 = f107 +FR_z_E3 = f108 +FR_z_Y2 = f109 +FR_z_R0 = f110 +FR_z_E4 = f111 +FR_z_ZH = f112 +FR_z_Y3 = f113 +FR_z_R1 = f114 +FR_z_ZL = f115 // General Purpose Registers @@ -1176,9 +1176,9 @@ GR_SAVE_PFS = r32 GR_DenOverflow = r33 GR_u_XN = r34 -GR_SAVE_B0 = r35 -GR_SAVE_GP = r36 -GR_SAVE_SP = r37 +GR_SAVE_B0 = r35 +GR_SAVE_GP = r36 +GR_SAVE_SP = r37 // Floating Point Registers FR_u_IXN = f34 @@ -1191,7 +1191,7 @@ GR_Parameter_RESULT = r66 GR_Parameter_TAG = r67 FR_RESULT = f8 -FR_X = f32 +FR_X = f32 FR_Y = f1 @@ -1200,9 +1200,9 @@ GLOBAL_LIBM_ENTRY(tgammal) { .mfi alloc r32 = ar.pfs,0,32,4,0 fabs FR_l_AbsX = f8 // Get absolute value of X - addl GR_n_sin_Table = @ltoff(Constants_Tgammal_sin), gp + addl GR_n_sin_Table = @ltoff(Constants_Tgammal_sin), gp } -{ .mfi +{ .mfi addl GR_l_Log_Table=@ltoff(Constants_Tgammal_log_80_Z_G_H_h1#),gp nop.f 0 addl GR_l_Stirling_Table = @ltoff(Constants_Tgammal_stirling), gp @@ -1220,7 +1220,7 @@ GLOBAL_LIBM_ENTRY(tgammal) };; { .mfi - ld8 GR_n_sin_Table = [GR_n_sin_Table] + ld8 GR_n_sin_Table = [GR_n_sin_Table] fclass.m p6,p0 = f8,0x1EF // Check x for NaN, 0, INF, denorm // NatVal. addl GR_c_NegSingularity = 0x1003E, r0 @@ -1241,9 +1241,9 @@ GLOBAL_LIBM_ENTRY(tgammal) };; { .mfi - ld8 GR_p_Table = [GR_p_Table] + ld8 GR_p_Table = [GR_p_Table] fcmp.lt.s1 p15, p14 = f8,f0 // p14 - positive arg, p15 - negative - shl GR_l_Index1 = GR_l_Index1,5 // Adjust Index1 ptr (x32) + shl GR_l_Index1 = GR_l_Index1,5 // Adjust Index1 ptr (x32) } { .mfb adds GR_c_NegUnderflow = 1765, r0 @@ -1263,7 +1263,7 @@ GLOBAL_LIBM_ENTRY(tgammal) andcm GR_c_X = GR_c_X, GR_c_SignBit // Remove sign };; -{ .mfi +{ .mfi addl GR_l_Log_Table = @ltoff(Constants_Tgammal_log_80_Z_G_H_h2#), gp fcmp.lt.s1 p10, p0 = FR_l_AbsX, f1 // If |X|<1 then p10 = 1 nop.i 0 @@ -1273,21 +1273,21 @@ GLOBAL_LIBM_ENTRY(tgammal) movl GR_l_BIAS = 0x000000000000FFFF // Bias for exponent };; -{ .mfi +{ .mfi ld8 GR_l_Log_Table = [GR_l_Log_Table] frcpa.s1 FR_l_Y0, p0 = f1, FR_l_AbsX // y = frcpa(x) nop.i 0 } { .mfi - ldfs FR_l_G_1 = [GR_l_Index1],4 // Load G_1 + ldfs FR_l_G_1 = [GR_l_Index1],4 // Load G_1 fsub.s1 FR_l_W = FR_l_AbsX, f1 // W = |X|-1 nop.i 0 };; -{ .mfi +{ .mfi getf.exp GR_l_N_Unbiased= FR_l_AbsX // exponent of |X| fmerge.se FR_l_S = f1, FR_l_AbsX // S = merging of X and 1.0 - cmp.gtu p11, p0 = GR_c_13, GR_c_X // If 1 <= |X| < 13 + cmp.gtu p11, p0 = GR_c_13, GR_c_X // If 1 <= |X| < 13 // then p11 = 1 } { .mfb @@ -1296,150 +1296,150 @@ GLOBAL_LIBM_ENTRY(tgammal) (p10) br.cond.spnt tgamma_lt_1 // Branch to |X| < 1 path /////////////////// };; -{ .mfi - ldfpd FR_n_A2H, FR_n_A2L = [GR_n_sin_Table], 16 +{ .mfi + ldfpd FR_n_A2H, FR_n_A2L = [GR_n_sin_Table], 16 nop.f 0 pmpyshr2.u GR_l_X_1 = GR_l_X_0,GR_l_Z_1,15 // Adjust Index2 (x32) } -{ .mfb - ldfe FR_l_B2 = [GR_l_Stirling_Table], 16 +{ .mfb + ldfe FR_l_B2 = [GR_l_Stirling_Table], 16 nop.f 0 (p11) br.cond.spnt tgamma_lt_13 // Branch to 1 <= |X| < 13 path /////////////// };; -{ .mfi - ldfe FR_l_h_1 = [GR_l_Index1],0 +{ .mfi + ldfe FR_l_h_1 = [GR_l_Index1],0 nop.f 0 sub GR_l_N = GR_l_N_Unbiased, GR_l_BIAS // N - BIAS } -{ .mib +{ .mib ldfpd FR_l_B4,FR_l_B6= [GR_l_Stirling_Table], 16 // Load C (p15) cmp.geu.unc p8,p0 = GR_l_N_Unbiased, GR_c_NegSingularity (p8) br.cond.spnt tgammal_singularity // Singularity for arg < to -2^63 ////// };; -{ .mmi -(p15) ldfpd FR_n_A1H, FR_n_A1L = [GR_n_sin_Table], 16 +{ .mmi +(p15) ldfpd FR_n_A1H, FR_n_A1L = [GR_n_sin_Table], 16 ldfpd FR_l_B8, FR_l_B10 = [GR_l_Stirling_Table], 16 - add GR_c_Table = 0x20, GR_c_Table + add GR_c_Table = 0x20, GR_c_Table };; { .mfi -(p15) ldfe FR_n_A9 = [GR_n_sin_Table], 16 - fma.s1 FR_l_Q0 = f1,FR_l_Y0,f0 // Q0 = Y0 +(p15) ldfe FR_n_A9 = [GR_n_sin_Table], 16 + fma.s1 FR_l_Q0 = f1,FR_l_Y0,f0 // Q0 = Y0 nop.i 0 } -{ .mfi - ldfpd FR_l_B12, FR_l_B14 = [GR_l_Stirling_Table], 16 - fnma.s1 FR_l_E0 = FR_l_Y0,FR_l_AbsX,f1 // e = 1-b*y +{ .mfi + ldfpd FR_l_B12, FR_l_B14 = [GR_l_Stirling_Table], 16 + fnma.s1 FR_l_E0 = FR_l_Y0,FR_l_AbsX,f1 // e = 1-b*y nop.i 0 };; -{ .mfi -(p15) ldfe FR_n_A8 = [GR_n_sin_Table], 16 +{ .mfi +(p15) ldfe FR_n_A8 = [GR_n_sin_Table], 16 fcvt.xf FR_c_XN = FR_n_IXN // Convert to FP repr. of int X - extr.u GR_l_Index2 = GR_l_X_1, 6, 4 // Extract Index2 + extr.u GR_l_Index2 = GR_l_X_1, 6, 4 // Extract Index2 } -{ .mfi +{ .mfi ldfpd FR_l_B16, FR_l_B18 = [GR_l_Stirling_Table], 16 nop.f 0 nop.i 0 };; -{ .mfi -(p15) ldfe FR_n_A7 = [GR_n_sin_Table], 16 +{ .mfi +(p15) ldfe FR_n_A7 = [GR_n_sin_Table], 16 fms.s1 FR_l_CXH = FR_l_CH, f1, FR_l_AbsX // CXH = CH+|X| shl GR_l_Index2 = GR_l_Index2,5 } -{ .mfi +{ .mfi ldfd FR_l_Half = [GR_l_Stirling_Table] // Load 0.5 nop.f 0 nop.i 0 };; -{ .mfi +{ .mfi add GR_l_Index2 = GR_l_Index2, GR_l_Log_Table // Add offset nop.f 0 nop.i 0 } -{ .mfi -(p15) ldfe FR_n_A6 = [GR_n_sin_Table], 16 +{ .mfi +(p15) ldfe FR_n_A6 = [GR_n_sin_Table], 16 (p15) fma.s1 FR_n_XS = FR_l_AbsX , f1, FR_n_XNS // xs = x - int(x) nop.i 0 };; -{ .mmi - ld2 GR_l_Z_2 = [GR_l_Index2],4 +{ .mmi + ld2 GR_l_Z_2 = [GR_l_Index2],4 addl GR_l_Log_Table = @ltoff(Constants_Tgammal_log_80_h3_G_H#),gp nop.i 0 };; -{ .mfi +{ .mfi ld8 GR_l_Log_Table = [GR_l_Log_Table] fma.s1 FR_l_E2 = FR_l_E0,FR_l_E0,FR_l_E0 // e2 = e+e^2 nop.i 0 } -{ .mfi - ldfs FR_l_G_2 = [GR_l_Index2],4 +{ .mfi + ldfs FR_l_G_2 = [GR_l_Index2],4 fma.s1 FR_l_E1 = FR_l_E0,FR_l_E0,f0 // e1 = e^2 nop.i 0 };; -{ .mmi - ldfs FR_l_H_2 = [GR_l_Index2],8 -(p15) ldfe FR_n_A5 = [GR_n_sin_Table], 16 +{ .mmi + ldfs FR_l_H_2 = [GR_l_Index2],8 +(p15) ldfe FR_n_A5 = [GR_n_sin_Table], 16 nop.i 0 };; -{ .mfi +{ .mfi setf.sig FR_l_float_N = GR_l_N // float_N = Make N a fp number nop.f 0 - pmpyshr2.u GR_l_X_2 = GR_l_X_1,GR_l_Z_2,15 // X_2 = X_1 * Z_2 + pmpyshr2.u GR_l_X_2 = GR_l_X_1,GR_l_Z_2,15 // X_2 = X_1 * Z_2 } -{ .mfi - ldfe FR_l_h_2 = [GR_l_Index2],0 +{ .mfi + ldfe FR_l_h_2 = [GR_l_Index2],0 fma.s1 FR_l_CXL = FR_l_AbsX, f1, FR_l_CXH // CXL = |X|+CXH add GR_l_Log_Table1= 0x200, GR_l_Log_Table };; -{ .mfi -(p15) ldfe FR_n_A4 = [GR_n_sin_Table], 16 +{ .mfi +(p15) ldfe FR_n_A4 = [GR_n_sin_Table], 16 (p15) fcmp.eq.unc.s1 p9,p0 = FR_l_AbsX, FR_c_XN //if argument is integer // and negative nop.i 0 } -{ .mfi +{ .mfi ldfe FR_c_PosOverflow = [GR_c_Table],16 //Load pos overflow value (p15) fma.s1 FR_n_XS2 = FR_n_XS, FR_n_XS, f0 // xs^2 = xs*xs nop.i 0 };; -{ .mfi -(p15) ldfe FR_n_A3 = [GR_n_sin_Table], 16 - nop.f 0 +{ .mfi +(p15) ldfe FR_n_A3 = [GR_n_sin_Table], 16 + nop.f 0 nop.i 0 };; -{ .mfi +{ .mfi (p15) getf.sig GR_n_XN = FR_n_IXN // int(x) to general reg fma.s1 FR_l_Y1 = FR_l_Y0,FR_l_E2,FR_l_Y0 // y1 = y+y*e2 - nop.i 0 + nop.i 0 } -{ .mfb - nop.m 0 +{ .mfb + nop.m 0 fma.s1 FR_l_E3 = FR_l_E1,FR_l_E1,FR_l_E0 // e3 = e+e1^2 (p9) br.cond.spnt tgammal_singularity // Singularity for integer ///////////// // and negative arguments ////////////// };; -{ .mfi +{ .mfi nop.m 0 fms.s1 FR_l_AbsX_m_Half = FR_l_AbsX, f1, FR_l_Half // |x|-0.5 extr.u GR_l_Index2 = GR_l_X_2, 1, 5 // Get Index3 };; -{ .mfi - shladd GR_l_Log_Table1= GR_l_Index2, 2, GR_l_Log_Table1 +{ .mfi + shladd GR_l_Log_Table1= GR_l_Index2, 2, GR_l_Log_Table1 nop.f 0 shladd GR_l_Index3 = GR_l_Index2,4, GR_l_Log_Table // Index3 } @@ -1450,10 +1450,10 @@ GLOBAL_LIBM_ENTRY(tgammal) // at underflow domain (X < -1765) ////// };; -{ .mfi - addl GR_l_Log_Table = @ltoff(Constants_Tgammal_log_80_Q#), gp +{ .mfi + addl GR_l_Log_Table = @ltoff(Constants_Tgammal_log_80_Q#), gp (p15) fma.s1 FR_n_TT = FR_n_A2L, FR_n_XS2, f0 // T=A2L*x^2 - tbit.nz.unc p13, p12 = GR_n_XN, 0x0 // whether [X] odd or even + tbit.nz.unc p13, p12 = GR_n_XN, 0x0 // whether [X] odd or even } { .mfi nop.m 0 @@ -1461,128 +1461,128 @@ GLOBAL_LIBM_ENTRY(tgammal) nop.i 0 };; -{ .mfi - ld8 GR_l_Log_Table = [GR_l_Log_Table] +{ .mfi + ld8 GR_l_Log_Table = [GR_l_Log_Table] (p15) fma.s1 FR_n_A7 = FR_n_A8, FR_n_XS2, FR_n_A7 // poly tail - nop.i 0 + nop.i 0 } -{ .mfi - ldfe FR_l_h_3 = [GR_l_Index3],12 +{ .mfi + ldfe FR_l_h_3 = [GR_l_Index3],12 (p15) fma.s1 FR_n_XS4 = FR_n_XS2, FR_n_XS2, f0 // xs^4 = xs^2*xs^2 - nop.i 0 + nop.i 0 };; -{ .mfi - ldfs FR_l_H_3 = [GR_l_Log_Table1], 0 +{ .mfi + ldfs FR_l_H_3 = [GR_l_Log_Table1], 0 fma.s1 FR_l_Y2 = FR_l_Y1, FR_l_E3, FR_l_Y0 // y2 = y+y1*e3 - nop.i 0 + nop.i 0 } -{ .mfi - ldfs FR_l_G_3 = [GR_l_Index3], 0 +{ .mfi + ldfs FR_l_G_3 = [GR_l_Index3], 0 fnma.s1 FR_l_Z = FR_l_AbsX,FR_l_Q0,f1 // r = a-b*q - nop.i 0 + nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fmpy.s1 FR_l_G = FR_l_G_1, FR_l_G_2 // G = G1 * G_2 nop.i 0 } -{ .mfi +{ .mfi nop.m 0 fadd.s1 FR_l_H = FR_l_H_1, FR_l_H_2 // H = H_1 + H_2 nop.i 0 };; -{ .mfi +{ .mfi ldfe FR_l_log2_hi = [GR_l_Log_Table],16 // load log2_hi part - fadd.s1 FR_l_h = FR_l_h_1, FR_l_h_2 // h = h_1 + h_2 + fadd.s1 FR_l_h = FR_l_h_1, FR_l_h_2 // h = h_1 + h_2 nop.i 0 } { .mfi - nop.m 0 + nop.m 0 fcvt.xf FR_l_float_N = FR_l_float_N // int(N) - nop.i 0 + nop.i 0 };; -{ .mfi +{ .mfi ldfe FR_l_log2_lo = [GR_l_Log_Table],16 // Load log2_lo part fma.s1 FR_l_CXL = FR_l_CXL, f1, FR_l_CL - nop.i 0 + nop.i 0 } { .mfi - nop.m 0 + nop.m 0 (p15) fma.s1 FR_n_TT = FR_n_A2H, FR_n_XS2L, FR_n_TT // T=A2H*x2L+T - nop.i 0 + nop.i 0 };; -{ .mfi - ldfe FR_l_Q_6 = [GR_l_Log_Table],16 +{ .mfi + ldfe FR_l_Q_6 = [GR_l_Log_Table],16 (p15) fma.s1 FR_n_A3 = FR_n_A4, FR_n_XS2, FR_n_A3 // poly tail - nop.i 0 + nop.i 0 } { .mfi - nop.m 0 + nop.m 0 (p15) fma.s1 FR_n_A5 = FR_n_A6, FR_n_XS2, FR_n_A5 // poly tail - nop.i 0 + nop.i 0 };; -{ .mfi - ldfe FR_l_Q_5 = [GR_l_Log_Table],16 +{ .mfi + ldfe FR_l_Q_5 = [GR_l_Log_Table],16 (p15) fabs FR_n_XS = FR_n_XS // abs(xs) - nop.i 0 + nop.i 0 } { .mfi - nop.m 0 + nop.m 0 fma.s1 FR_l_Z = FR_l_Z,FR_l_Y2,FR_l_Q0 // x_hi = q+r*y2 - nop.i 0 + nop.i 0 };; -{ .mfi - ldfe FR_l_Q_4 = [GR_l_Log_Table],16 +{ .mfi + ldfe FR_l_Q_4 = [GR_l_Log_Table],16 (p15) fma.s1 FR_n_A7 = FR_n_A9, FR_n_XS4, FR_n_A7 // poly tail - nop.i 0 + nop.i 0 } { .mfi - nop.m 0 + nop.m 0 (p15) fma.s1 FR_n_XS7 = FR_n_XS4, FR_n_XS2, f0 // = x^4*x^2 - nop.i 0 + nop.i 0 };; -{ .mfi - ldfe FR_l_Q_3 = [GR_l_Log_Table],16 +{ .mfi + ldfe FR_l_Q_3 = [GR_l_Log_Table],16 fneg FR_n_NegOne = f1 // -1.0 - nop.i 0 + nop.i 0 } { .mfi - nop.m 0 + nop.m 0 (p15) fma.s1 FR_n_XS8 = FR_n_XS4, FR_n_XS4, f0 // xs^8 = xs^4*xs^4 - nop.i 0 + nop.i 0 };; -{ .mfi - ldfe FR_l_Q_2 = [GR_l_Log_Table],16 - fadd.s1 FR_l_h = FR_l_h, FR_l_h_3 // h = h_1 + h_2 + h_3 - nop.i 0 +{ .mfi + ldfe FR_l_Q_2 = [GR_l_Log_Table],16 + fadd.s1 FR_l_h = FR_l_h, FR_l_h_3 // h = h_1 + h_2 + h_3 + nop.i 0 } { .mfi - nop.m 0 + nop.m 0 (p15) fma.s1 FR_n_TH = FR_n_A2H, FR_n_XS2, FR_n_TT // A2H*xs2+T - nop.i 0 + nop.i 0 };; -{ .mfi - ldfe FR_l_Q_1 = [GR_l_Log_Table],16 - fmpy.s1 FR_l_G = FR_l_G, FR_l_G_3 // G = G_1 * G_2 * G_3 - nop.i 0 +{ .mfi + ldfe FR_l_Q_1 = [GR_l_Log_Table],16 + fmpy.s1 FR_l_G = FR_l_G, FR_l_G_3 // G = G_1 * G_2 * G_3 + nop.i 0 } { .mfi nop.m 0 - fadd.s1 FR_l_H = FR_l_H, FR_l_H_3 // H = H_1 + H_2 + H_3 - nop.i 0 + fadd.s1 FR_l_H = FR_l_H, FR_l_H_3 // H = H_1 + H_2 + H_3 + nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fma.s1 FR_l_Z2 = FR_l_Z, FR_l_Z, f0 // Z^2 nop.i 0 @@ -1593,19 +1593,19 @@ GLOBAL_LIBM_ENTRY(tgammal) nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 (p14) fcmp.gt.unc.s1 p7,p0 = FR_l_AbsX, FR_c_PosOverflow //X > 1755.5483 // (overflow domain, result cannot be represented by normal value) nop.i 0 } -{ .mfi +{ .mfi nop.m 0 (p15) fma.s1 FR_n_XS7 = FR_n_XS7, FR_n_XS, f0 // x^7 construction nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 (p15) fms.s1 FR_n_TL = FR_n_A2H, FR_n_XS2, FR_n_TH // A2H*xs2+TH nop.i 0 @@ -1613,10 +1613,10 @@ GLOBAL_LIBM_ENTRY(tgammal) { .mfi nop.m 0 (p15) fma.s1 FR_n_PolyH = FR_n_TH, f1, FR_n_A1H // PolyH=TH+A1H - nop.i 0 + nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fmpy.s1 FR_l_GS_hi = FR_l_G, FR_l_S // GS_hi = G*S nop.i 0 @@ -1627,18 +1627,18 @@ GLOBAL_LIBM_ENTRY(tgammal) (p7) br.cond.spnt tgammal_overflow // Overflow path for arg > 1755.5483 ////// };; -{ .mfi +{ .mfi nop.m 0 fma.s1 FR_l_B14 = FR_l_B16, FR_l_Z2, FR_l_B14// bernulli tail nop.i 0 } -{ .mfi +{ .mfi nop.m 0 fma.s1 FR_l_Z4 = FR_l_Z2, FR_l_Z2, f0 // Z^4 = Z^2*Z^2 nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fma.s1 FR_l_B2 = FR_l_B4, FR_l_Z2, FR_l_B2 // bernulli tail nop.i 0 @@ -1649,7 +1649,7 @@ GLOBAL_LIBM_ENTRY(tgammal) nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fma.s1 FR_l_B10 = FR_l_B12, FR_l_Z2, FR_l_B10// bernulli tail nop.i 0 @@ -1660,7 +1660,7 @@ GLOBAL_LIBM_ENTRY(tgammal) nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 (p15) fma.s1 FR_n_TL = FR_n_TL, f1, FR_n_TT // TL = TL+T nop.i 0 @@ -1671,7 +1671,7 @@ GLOBAL_LIBM_ENTRY(tgammal) nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fma.s1 FR_l_poly_lo = FR_l_r, FR_l_Q_6, FR_l_Q_5 // Q_5+r*Q_6 nop.i 0 @@ -1679,10 +1679,10 @@ GLOBAL_LIBM_ENTRY(tgammal) { .mfi nop.m 0 fsub.s1 FR_l_r_cor = FR_l_GS_hi, f1 // r_cor = GS_hi -1 - nop.i 0 + nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fms.s1 FR_l_GS_lo = FR_l_G, FR_l_S, FR_l_GS_hi // G*S-GS_hi nop.i 0 @@ -1690,10 +1690,10 @@ GLOBAL_LIBM_ENTRY(tgammal) { .mfi nop.m 0 fma.s1 FR_l_poly = FR_l_r, FR_l_Q_2, FR_l_Q_1 //poly=r*Q2+Q1 - nop.i 0 + nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fmpy.s1 FR_l_rsq = FR_l_r, FR_l_r // rsq = r * r nop.i 0 @@ -1702,33 +1702,33 @@ GLOBAL_LIBM_ENTRY(tgammal) nop.m 0 fma.s1 FR_l_G = FR_l_float_N, FR_l_log2_hi, FR_l_H // Tbl = // float_N*log2_hi + H - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_l_Y_lo = FR_l_float_N, FR_l_log2_lo, FR_l_h // Y_lo= // float_N*log2_lo + h - nop.i 0 + nop.i 0 } { .mfi - nop.m 0 + nop.m 0 fma.s1 FR_l_B14 = FR_l_B18, FR_l_Z4, FR_l_B14 //bernulli tail - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_l_B2 = FR_l_B6, FR_l_Z4, FR_l_B2 //bernulli tail - nop.i 0 + nop.i 0 } { .mfi - nop.m 0 + nop.m 0 fma.s1 FR_l_Z8 = FR_l_Z4, FR_l_Z4, f0 //bernulli tail - nop.i 0 + nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fma.s1 FR_l_poly_lo = FR_l_r, FR_l_poly_lo, FR_l_Q_4 // poly_lo = // Q_4 + r * poly_lo @@ -1737,10 +1737,10 @@ GLOBAL_LIBM_ENTRY(tgammal) { .mfi nop.m 0 fsub.s1 FR_l_r_cor = FR_l_r_cor, FR_l_r // r_cor = r_cor - r - nop.i 0 + nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 (p15) fma.s1 FR_n_PolyL = FR_n_PolyL, f1, FR_n_TH // polyL+TH nop.i 0 @@ -1751,19 +1751,19 @@ GLOBAL_LIBM_ENTRY(tgammal) nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 - fadd.s1 FR_l_logl_YHi = FR_l_G, FR_l_r // Y_hi = Tbl + r - nop.i 0 + fadd.s1 FR_l_logl_YHi = FR_l_G, FR_l_r // Y_hi = Tbl + r + nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fma.s1 FR_l_B10 = FR_l_B14, FR_l_Z4, FR_l_B10 //bernulli tail - nop.i 0 + nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fma.s1 FR_l_poly_lo = FR_l_r, FR_l_poly_lo, FR_l_Q_3 // poly_lo = // Q_3 + r * poly_lo @@ -1772,18 +1772,18 @@ GLOBAL_LIBM_ENTRY(tgammal) { .mfi nop.m 0 fadd.s1 FR_l_r_cor = FR_l_r_cor, FR_l_GS_lo // r_cor=r_cor+GS_lo - nop.i 0 + nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 (p15) fma.s1 FR_n_PolyL = FR_n_PolyL, f1, FR_n_TT // polyL+TT nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 - fsub.s1 FR_l_Y_lo_res = FR_l_G, FR_l_logl_YHi // Y_lo = Tbl - Y_hi + fsub.s1 FR_l_Y_lo_res = FR_l_G, FR_l_logl_YHi // Y_lo = Tbl - Y_hi nop.i 0 } { .mfi @@ -1793,13 +1793,13 @@ GLOBAL_LIBM_ENTRY(tgammal) nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fma.s1 FR_l_SS = FR_l_B10, FR_l_Z8, FR_l_B2 // bernulli tail nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fadd.s1 FR_l_r_cor = FR_l_r_cor, FR_l_Y_lo // r_cor = r_cor+Y_lo nop.i 0 @@ -1808,16 +1808,16 @@ GLOBAL_LIBM_ENTRY(tgammal) nop.m 0 fma.s1 FR_l_poly = FR_l_rsq, FR_l_poly_lo, FR_l_poly //poly= // r^2*polyLo+poly - nop.i 0 + nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 (p15) fma.s1 FR_n_TT = FR_n_PolyL, FR_n_XS2, f0 // T=polyL*xs^2 - nop.i 0 + nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fadd.s1 FR_l_Y_lo = FR_l_Y_lo_res, FR_l_r // Y_lo = Y_lo + r nop.i 0 @@ -1829,7 +1829,7 @@ GLOBAL_LIBM_ENTRY(tgammal) nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fma.s1 FR_l_SSCXH = FR_l_SS, FR_l_Z, FR_l_CXH // SS*Z+CXH nop.i 0 @@ -1841,7 +1841,7 @@ GLOBAL_LIBM_ENTRY(tgammal) nop.i 0 };; -{ .mlx +{ .mlx nop.m 0 movl GR_e_rshf_2to51 = 0x4718000000000000 // 1.10000 2^(63+51) } @@ -1852,14 +1852,14 @@ GLOBAL_LIBM_ENTRY(tgammal) { .mfi nop.m 0 - fma.s1 FR_l_poly = FR_l_rsq, FR_l_poly, FR_l_r_cor // poly = + fma.s1 FR_l_poly = FR_l_rsq, FR_l_poly, FR_l_r_cor // poly = // rsq * poly + r_cor - nop.i 0 + nop.i 0 };; -{ .mfi +{ .mfi addl GR_e_ad_Arg = @ltoff(Constants_Tgammal_exp_64_Arg#),gp -(p15) fma.s1 FR_n_TT = FR_n_PolyH, FR_n_XS2L, FR_n_TT +(p15) fma.s1 FR_n_TT = FR_n_PolyH, FR_n_XS2L, FR_n_TT mov GR_e_exp_mask = 0x1FFFF // Form exponent mask } { .mlx @@ -1868,25 +1868,25 @@ GLOBAL_LIBM_ENTRY(tgammal) };; -{ .mmi +{ .mmi setf.sig FR_e_INV_LN2_2TO63 = GR_e_sig_inv_ln2 // form 1/ln2 * 2^63 setf.d FR_e_RSHF_2TO51 = GR_e_rshf_2to51 // 1.1000 * 2^(63+51) nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fms.s1 FR_l_SSCXL = FR_l_CXH, f1, FR_l_SSCXH // CXH+SS*CXH nop.i 0 } { .mfi nop.m 0 - fma.s1 FR_e_expl_Input_AbsX = FR_l_XYH, f1, FR_l_SSCXH // HI EXP + fma.s1 FR_e_expl_Input_AbsX = FR_l_XYH, f1, FR_l_SSCXH // HI EXP nop.i 0 };; .pred.rel "mutex",p14,p15 -{ .mfi +{ .mfi nop.m 0 (p14) fma.s1 FR_e_expl_Input_X = FR_l_XYH, f1, FR_l_SSCXH // HI EXP mov GR_e_exp_bias = 0x0FFFF // Set exponent bias @@ -1897,13 +1897,13 @@ GLOBAL_LIBM_ENTRY(tgammal) nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fadd.s1 FR_l_logl_YLo = FR_l_Y_lo, FR_l_poly // YLo = YLo+poly nop.i 0 };; -{ .mfi +{ .mfi setf.exp FR_e_2TOM51 = GR_e_exp_2tom51 //2^-51 for scaling float_N (p15) fma.s1 FR_n_TH = FR_n_PolyH, FR_n_XS2, FR_n_TT // TH= // polyH*xs^2+T @@ -1915,7 +1915,7 @@ GLOBAL_LIBM_ENTRY(tgammal) nop.b 0 };; -{ .mfi +{ .mfi add GR_e_ad_A = 0x20, GR_e_ad_Arg // Point to A table nop.f 0 add GR_e_ad_T1 = 0x50, GR_e_ad_Arg // Point to T1 table @@ -1926,7 +1926,7 @@ GLOBAL_LIBM_ENTRY(tgammal) nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fma.s1 FR_l_SSCXL = FR_l_SS, FR_l_Z, FR_l_SSCXL nop.i 0 @@ -1937,22 +1937,22 @@ GLOBAL_LIBM_ENTRY(tgammal) nop.i 0 };; -{ .mfi +{ .mfi ldfe FR_e_L_hi = [GR_e_ad_Arg],16 // Get L_hi nop.f 0 nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fma.s1 FR_l_XYL = FR_l_logl_YLo, FR_l_AbsX_m_Half, FR_l_XYL // XYL = YLo*|x-0.5|+XYL nop.i 0 };; -{ .mfi +{ .mfi ldfe FR_e_L_lo = [GR_e_ad_Arg],16 // Get L_lo -(p15) fms.s1 FR_n_TL = FR_n_PolyH, FR_n_XS2, FR_n_TH // TL = +(p15) fms.s1 FR_n_TL = FR_n_PolyH, FR_n_XS2, FR_n_TH // TL = // = polyH*xs^2-TH add GR_e_ad_W1 = 0x100, GR_e_ad_T2 // Point to W1 table } @@ -1962,13 +1962,13 @@ GLOBAL_LIBM_ENTRY(tgammal) add GR_e_ad_W2 = 0x300, GR_e_ad_T2 // Point to W2 table };; -{ .mmi +{ .mmi getf.exp GR_e_signexp_x = FR_e_expl_Input_X // Extract sign and exp - ldfe FR_e_A3 = [GR_e_ad_A],16 // Get A3 + ldfe FR_e_A3 = [GR_e_ad_A],16 // Get A3 nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fma.s1 FR_l_SSCXL = FR_l_SSCXL, f1, FR_l_CXL nop.i 0 @@ -1979,19 +1979,19 @@ GLOBAL_LIBM_ENTRY(tgammal) nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fma.s1 FR_e_N_signif=FR_e_expl_Input_X,FR_e_INV_LN2_2TO63,FR_e_RSHF_2TO51 and GR_e_exp_x = GR_e_signexp_x, GR_e_exp_mask };; -{ .mmi +{ .mmi sub GR_e_exp_x = GR_e_exp_x, GR_e_exp_bias // Get exponent ldfe FR_e_A2 = [GR_e_ad_A],16 // Get A2 for main path nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 (p15) fma.s1 FR_n_PolyH = FR_n_Poly1H, FR_n_XS, f0//sin(Pi*x) poly nop.i 0 @@ -2002,13 +2002,13 @@ GLOBAL_LIBM_ENTRY(tgammal) nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 (p15) fma.s1 FR_n_TL = FR_n_TL, f1, FR_n_TT//sin(Pi*x) poly nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fma.s1 FR_l_Temp = FR_l_XYL, f1, FR_l_SSCXL // XYL+SS*CXL nop.i 0 @@ -2020,19 +2020,19 @@ GLOBAL_LIBM_ENTRY(tgammal) nop.i 0 };; -{ .mfi +{ .mfi ldfe FR_e_A1 = [GR_e_ad_A],16 // Get A1 nop.f 0 nop.i 0 } { .mfi nop.m 0 - fms.s1 FR_e_float_N = FR_e_N_signif, FR_e_2TOM51, FR_e_RSHF + fms.s1 FR_e_float_N = FR_e_N_signif, FR_e_2TOM51, FR_e_RSHF // Get float N = signd*2^51-RSHIFTER nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 (p15) fma.s1 FR_n_Poly1L = FR_n_Poly1L, f1, FR_n_TH //sin(Pi*x) poly nop.i 0 @@ -2043,54 +2043,54 @@ GLOBAL_LIBM_ENTRY(tgammal) nop.i 0 };; -{ .mfi +{ .mfi getf.sig GR_e_N_fix = FR_e_N_signif // Get N from significand nop.f 0 nop.i 0 };; .pred.rel "mutex",p14,p15 -{ .mfi +{ .mfi nop.m 0 -(p14) fma.s1 FR_e_expl_Input_Y = FR_e_expl_Input_Y, f1, FR_l_Temp +(p14) fma.s1 FR_e_expl_Input_Y = FR_e_expl_Input_Y, f1, FR_l_Temp nop.i 0 } -{ .mfi +{ .mfi nop.m 0 -(p15) fms.s1 FR_e_expl_Input_Y = FR_e_expl_Input_Y, f1, FR_l_Temp +(p15) fms.s1 FR_e_expl_Input_Y = FR_e_expl_Input_Y, f1, FR_l_Temp // arguments for exp computation nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fnma.s1 FR_e_r = FR_e_L_hi, FR_e_float_N, FR_e_expl_Input_X // r = -L_hi * float_N + x extr.u GR_e_M1 = GR_e_N_fix, 6, 6 // Extract index M_1 };; -{ .mfi +{ .mfi nop.m 0 (p15) fma.s1 FR_n_Poly1L = FR_n_Poly1L, f1, FR_n_TL //sin(Pi*x) poly nop.i 0 };; -{ .mmf +{ .mmf nop.m 0 nop.m 0 - fma.s1 FR_e_r = FR_e_r, f1, FR_e_expl_Input_Y + fma.s1 FR_e_r = FR_e_r, f1, FR_e_expl_Input_Y // r = r + FR_e_expl_Input_Y };; -{ .mmi +{ .mmi shladd GR_e_ad_W1 = GR_e_M1,3,GR_e_ad_W1 // Point to W1 shladd GR_e_ad_T1 = GR_e_M1,2,GR_e_ad_T1 // Point to T1 extr.u GR_e_M2 = GR_e_N_fix, 0, 6 // Extract index M_2 };; -{ .mfi +{ .mfi ldfs FR_e_T1 = [GR_e_ad_T1],0 // Get T1 nop.f 0 extr GR_e_K = GR_e_N_fix, 12, 32 //Extract limit range K @@ -2102,7 +2102,7 @@ GLOBAL_LIBM_ENTRY(tgammal) shladd GR_e_ad_W2 = GR_e_M2,3,GR_e_ad_W2 // Point to W2 };; -{ .mfi +{ .mfi ldfs FR_e_T2 = [GR_e_ad_T2],0 // Get T2 nop.f 0 add GR_e_exp_2_k = GR_e_exp_bias, GR_e_K // exp of 2^k @@ -2113,27 +2113,27 @@ GLOBAL_LIBM_ENTRY(tgammal) sub GR_e_exp_2_mk = GR_e_exp_bias, GR_e_K // exp of 2^-k };; -{ .mmi +{ .mmi ldfd FR_e_W2 = [GR_e_ad_W2],0 // Get W2 nop.m 0 nop.i 0 };; -{ .mmf +{ .mmf setf.exp FR_e_scale = GR_e_exp_2_k // Set scale = 2^k setf.exp FR_e_2_mk = GR_e_exp_2_mk // Form 2^-k - fnma.s1 FR_e_r = FR_e_L_lo, FR_e_float_N, FR_e_r + fnma.s1 FR_e_r = FR_e_L_lo, FR_e_float_N, FR_e_r // r = -L_lo * float_N + r };; -{ .mfi +{ .mfi nop.m 0 -(p15) fma.s1 FR_n_PolyL = FR_n_Tail, FR_n_XS7, FR_n_PolyL +(p15) fma.s1 FR_n_PolyL = FR_n_Tail, FR_n_XS7, FR_n_PolyL //sin(Pi*x) poly nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fma.s1 FR_e_poly = FR_e_r, FR_e_A3, FR_e_A2 // poly=r*A3+A2 nop.i 0 @@ -2144,7 +2144,7 @@ GLOBAL_LIBM_ENTRY(tgammal) nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fmpy.s1 FR_e_T = FR_e_T1, FR_e_T2 // T = T1 * T2 nop.i 0 @@ -2155,54 +2155,54 @@ GLOBAL_LIBM_ENTRY(tgammal) nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 (p15) fma.s1 FR_n_TT = FR_n_PolyL, FR_l_AbsX, f0 //sin(Pi*x) poly nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 - fma.s1 FR_e_poly = FR_e_r, FR_e_poly, FR_e_A1 + fma.s1 FR_e_poly = FR_e_r, FR_e_poly, FR_e_A1 // poly = r * poly + A1 nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fma.s1 FR_e_T_scale = FR_e_T, FR_e_scale, f0 // T_scale=T*scale nop.i 0 } { .mfi nop.m 0 - fma.s1 FR_e_W = FR_e_W2, FR_e_W1_p1, FR_e_W1 + fma.s1 FR_e_W = FR_e_W2, FR_e_W1_p1, FR_e_W1 // W = W2 * (W1+1.0) + W1 nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 -(p15) fma.s1 FR_n_SinxH = FR_n_PolyH, FR_l_AbsX, FR_n_TT +(p15) fma.s1 FR_n_SinxH = FR_n_PolyH, FR_l_AbsX, FR_n_TT // sin(Pi*x) poly nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 mov FR_e_Y_hi = FR_e_T // Assume Y_hi = T nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 - fma.s1 FR_e_poly = FR_e_rsq, FR_e_poly, FR_e_r + fma.s1 FR_e_poly = FR_e_rsq, FR_e_poly, FR_e_r // poly = rsq * poly + r nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 - fma.s1 FR_e_Wp1_T_scale = FR_e_W, FR_e_T_scale, FR_e_T_scale + fma.s1 FR_e_Wp1_T_scale = FR_e_W, FR_e_T_scale, FR_e_T_scale // (W+1)*T*scale nop.i 0 } @@ -2212,51 +2212,51 @@ GLOBAL_LIBM_ENTRY(tgammal) nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 (p15) fms.s1 FR_n_SinxL = FR_n_PolyH, FR_l_AbsX, FR_n_SinxH // Low part of sin nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 (p15) frcpa.s1 FR_n_Y0, p0 = f1, FR_n_SinxH // y = frcpa(b) nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fma.s1 FR_e_result_lo = FR_e_Wp1_T_scale, FR_e_poly, FR_e_W_T_scale // Low part of exp result nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 (p15) fma.s1 FR_n_SinxL = FR_n_SinxL, f1, FR_n_TT // sin low result nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 (p15) fma.s1 FR_n_Q0 = f1,FR_n_Y0,f0 // q = y nop.i 0 } -{ .mfi +{ .mfi nop.m 0 -(p15) fnma.s1 FR_n_E0 = FR_n_Y0, FR_n_SinxH, f1 // e = 1-b*y +(p15) fnma.s1 FR_n_E0 = FR_n_Y0, FR_n_SinxH, f1 // e = 1-b*y nop.i 0 };; -{ .mfb +{ .mfb nop.m 0 (p14) fma.s0 f8 = FR_e_Y_hi, FR_e_scale, FR_e_result_lo (p14) br.ret.spnt b0 // Exit for positive Stirling path ////////////////////// };; -{ .mfi +{ .mfi nop.m 0 fma.s1 FR_e_expl_Output_X = FR_e_Y_hi, FR_e_scale, f0 // exp result nop.i 0 @@ -2267,107 +2267,107 @@ GLOBAL_LIBM_ENTRY(tgammal) nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fma.s1 FR_n_E2 = FR_n_E0,FR_n_E0,FR_n_E0 // e2 = e+e^2 nop.i 0 } -{ .mfi +{ .mfi nop.m 0 fma.s1 FR_n_E1 = FR_n_E0,FR_n_E0,f0 // e1 = e^2 nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fma.s1 FR_n_Y1 = FR_n_Y0,FR_n_E2,FR_n_Y0 // y1 = y+y*e2 nop.i 0 } -{ .mfi +{ .mfi nop.m 0 fma.s1 FR_n_E3 = FR_n_E1,FR_n_E1,FR_n_E0 // e3 = e+e1^2 nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fma.s1 FR_n_Y2 = FR_n_Y1,FR_n_E3,FR_n_Y0 // y2 = y+y1*e3 nop.i 0 } -{ .mfi +{ .mfi nop.m 0 fnma.s1 FR_n_R0 = FR_n_SinxH,FR_n_Q0,f1 // r = a-b*q nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fnma.s1 FR_n_E4 = FR_n_SinxH,FR_n_Y2,f1 // e4 = 1-b*y2 nop.i 0 } -{ .mfi +{ .mfi nop.m 0 fma.s1 FR_n_RcpResH = FR_n_R0,FR_n_Y2,FR_n_Q0 // x = q+r*y2 nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fma.s1 FR_n_Y3 = FR_n_Y2,FR_n_E4,FR_n_Y2 // y3 = y2+y2*e4 nop.i 0 } -{ .mfi +{ .mfi nop.m 0 fnma.s1 FR_n_R1 = FR_n_SinxH,FR_n_RcpResH,f1 // r1 = a-b*x nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 - fnma.s1 FR_n_R1 = FR_n_SinxL,FR_n_RcpResH,FR_n_R1 + fnma.s1 FR_n_R1 = FR_n_SinxL,FR_n_RcpResH,FR_n_R1 // r1 = r1 - b_lo*X nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fma.s1 FR_n_RcpResL = FR_n_R1,FR_n_Y3,f0 // x_lo = r1*y3 nop.i 0 } -{ .mfi +{ .mfi nop.m 0 fma.s1 FR_n_Temp = FR_n_RcpResH, FR_e_expl_Output_Y, f0 // Multiplying exp and sin result nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fma.s1 FR_n_Temp = FR_n_RcpResL, FR_e_expl_Output_X, FR_n_Temp // Multiplying exp and sin result nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fma.s1 FR_n_ResH = FR_n_RcpResH, FR_e_expl_Output_X, FR_n_Temp // Multiplying exp and sin result nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fms.s1 FR_n_ResL = FR_n_RcpResH, FR_e_expl_Output_X, FR_n_ResH // Multiplying exp and sin result nop.i 0 } -{ .mfi +{ .mfi nop.m 0 (p12) fma.s1 FR_n_ResH = FR_n_ResH, FR_n_NegOne, f0 // Negate nop.i 0 };; -{ .mfi +{ .mfi nop.m 0 fma.s1 FR_n_ResL = FR_n_ResL, f1, FR_n_Temp // Multiplying exp and sin result - low result obtained @@ -2375,12 +2375,12 @@ GLOBAL_LIBM_ENTRY(tgammal) };; .pred.rel "mutex",p12,p13 -{ .mfi +{ .mfi nop.m 0 (p13) fma.s0 f8 = FR_n_ResH, f1, FR_n_ResL // For odd nop.i 0 } -{ .mfb +{ .mfb nop.m 0 (p12) fms.s0 f8 = FR_n_ResH, f1, FR_n_ResL // For even br.ret.sptk b0 // Exit for negative Stirling path ////////////////////// @@ -2391,928 +2391,928 @@ GLOBAL_LIBM_ENTRY(tgammal) //------------------------------------------------------------------------------ .align 64 tgamma_lt_13: -{ .mfi +{ .mfi getf.sig GR_p_XN = FR_p_IXN // Get significand fcvt.xf FR_p_XN = FR_p_IXN // xn = [x] add GR_r_sin_Table2= 0x40, GR_r_sin_Table // Shifted table addr. -} +} { .mfi ldfpd FR_p_0p5, FR_p_1p5 = [GR_c_Table], 16 // 0.5 & 1.5 fms.s1 FR_p_AbsXM1 = FR_p_AbsX, f1, f1 // X-1 add GR_p_Table2 = 0xB0, GR_p_Table -};; +};; -{ .mfi +{ .mfi add GR_r_sin_Table = -16, GR_r_sin_Table // For compensation fcvt.xf FR_r_XNS = FR_r_IXNS // Convert int repr to float shr.u GR_p_X_Sgnd = GR_p_X_Sgnd, 59 // Get only 5 bit of signd -};; +};; -{ .mfi +{ .mfi ldfpd FR_r_A2H,FR_r_A2L = [GR_r_sin_Table], 16 // Load A2 nop.f 0 - add GR_p_Int = -2, GR_p_XN // int = int - 2 -} + add GR_p_Int = -2, GR_p_XN // int = int - 2 +} { .mfi - ldfe FR_r_A6 = [GR_r_sin_Table2], 16 + ldfe FR_r_A6 = [GR_r_sin_Table2], 16 nop.f 0 cmp.gtu p11, p12 = 0x2, GR_p_XN // p11: x < 2 (splitted intervals), // p12: x > 2 (base intervals) -};; +};; -{ .mfi - ldfpd FR_r_A1H, FR_r_A1L = [GR_r_sin_Table], 16 +{ .mfi + ldfpd FR_r_A1H, FR_r_A1L = [GR_r_sin_Table], 16 nop.f 0 shr GR_p_Int = GR_p_Int, 1 // int/2 -} +} { .mfi - ldfe FR_r_A5 = [GR_r_sin_Table2], 16 + ldfe FR_r_A5 = [GR_r_sin_Table2], 16 nop.f 0 (p11) cmp.gtu.unc p10, p11 = 0x1C, GR_p_X_Sgnd // sgnd(x) < 0.75 -};; +};; -{ .mfi - ldfe FR_r_A9 = [GR_r_sin_Table], 16 +{ .mfi + ldfe FR_r_A9 = [GR_r_sin_Table], 16 nop.f 0 shl GR_p_Offset = GR_p_Int, 4 // offset = int*16 -} +} { .mfi - ldfe FR_r_A4 = [GR_r_sin_Table2], 16 + ldfe FR_r_A4 = [GR_r_sin_Table2], 16 nop.f 0 (p10) cmp.gtu.unc p9, p10 = 0x14, GR_p_X_Sgnd // sgnd(x) < 0.25 -};; +};; -{ .mfi - ldfe FR_r_A8 = [GR_r_sin_Table], 16 +{ .mfi + ldfe FR_r_A8 = [GR_r_sin_Table], 16 nop.f 0 (p12) tbit.nz.unc p13, p12 = GR_p_XN, 0x0 // p13: reccurent computations // X is at [3;4], [5;6], [7;8]... interval -} +} { .mfi - ldfe FR_r_A3 = [GR_r_sin_Table2], 16 + ldfe FR_r_A3 = [GR_r_sin_Table2], 16 nop.f 0 shladd GR_p_Offset = GR_p_Int, 2, GR_p_Offset // +int*4 -};; +};; .pred.rel "mutex",p9,p11 -{ .mfi - add GR_p_Offset = GR_p_Int, GR_p_Offset +{ .mfi + add GR_p_Offset = GR_p_Int, GR_p_Offset // +int, so offset = int*21 (p9) fms.s1 FR_p_XR = FR_p_AbsX, f1, f1 // r = x-1 - nop.i 0 -} + nop.i 0 +} { .mfi - ldfe FR_r_A7 = [GR_r_sin_Table], 16 -(p11) fms.s1 FR_p_XR = FR_p_2, f1, FR_p_AbsX + ldfe FR_r_A7 = [GR_r_sin_Table], 16 +(p11) fms.s1 FR_p_XR = FR_p_2, f1, FR_p_AbsX // r = 2-x for 1.75 < x < 2 - nop.i 0 -};; + nop.i 0 +};; .pred.rel "mutex",p9,p10 .pred.rel "mutex",p10,p11 .pred.rel "mutex",p9,p11 -{ .mfi +{ .mfi (p9) add GR_p_Offset = 126, r0 // 1.0 < x < 1.25 table -(p15) fcmp.eq.unc.s1 p7,p0 = FR_p_AbsX, FR_p_XN +(p15) fcmp.eq.unc.s1 p7,p0 = FR_p_AbsX, FR_p_XN // If arg is integer and negative - singularity branch - nop.i 0 + nop.i 0 } -{ .mfi +{ .mfi (p10) add GR_p_Offset = 147, r0 // 1.25 < x < 1.75 table nop.f 0 (p11) add GR_p_Offset = 168, r0 // 1.75 < x < 2.0 table -};; +};; -{ .mmf - shladd GR_p_Table = GR_p_Offset, 4, GR_p_Table +{ .mmf + shladd GR_p_Table = GR_p_Offset, 4, GR_p_Table shladd GR_p_Table2 = GR_p_Offset, 4, GR_p_Table2 fma.s1 FR_r_XS = FR_r_AbsX , f1, FR_r_XNS // xs = x - [x] -};; +};; -{ .mmb - ldfpd FR_p_A5H, FR_p_A5L = [GR_p_Table], 16 - ldfpd FR_p_A2H, FR_p_A2L = [GR_p_Table2], 16 +{ .mmb + ldfpd FR_p_A5H, FR_p_A5L = [GR_p_Table], 16 + ldfpd FR_p_A2H, FR_p_A2L = [GR_p_Table2], 16 (p7) br.cond.spnt tgammal_singularity // Singularity for integer ///////////// // and negative argument /////////////// };; -{ .mfi - ldfpd FR_p_A4H, FR_p_A4L = [GR_p_Table], 16 +{ .mfi + ldfpd FR_p_A4H, FR_p_A4L = [GR_p_Table], 16 fma.s1 FR_p_XN = FR_p_XN, f1, FR_p_0p5 // xn = xn+0.5 - nop.i 0 + nop.i 0 } -{ .mfi - ldfpd FR_p_A1H, FR_p_A1L = [GR_p_Table2], 16 +{ .mfi + ldfpd FR_p_A1H, FR_p_A1L = [GR_p_Table2], 16 (p10) fms.s1 FR_p_XR = FR_p_AbsX, f1, FR_p_1p5 // r = x - 1.5 - nop.i 0 + nop.i 0 };; -{ .mmi - ldfpd FR_p_A3H, FR_p_A3L = [GR_p_Table], 16 - ldfpd FR_p_A0H, FR_p_A0L = [GR_p_Table2], 16 +{ .mmi + ldfpd FR_p_A3H, FR_p_A3L = [GR_p_Table], 16 + ldfpd FR_p_A0H, FR_p_A0L = [GR_p_Table2], 16 nop.i 0 };; -{ .mmi - ldfe FR_p_A20 = [GR_p_Table], 16 - ldfe FR_p_A12 = [GR_p_Table2], 16 +{ .mmi + ldfe FR_p_A20 = [GR_p_Table], 16 + ldfe FR_p_A12 = [GR_p_Table2], 16 nop.i 0 };; -{ .mmf - ldfe FR_p_A19 = [GR_p_Table], 16 - ldfe FR_p_A11 = [GR_p_Table2], 16 +{ .mmf + ldfe FR_p_A19 = [GR_p_Table], 16 + ldfe FR_p_A11 = [GR_p_Table2], 16 fma.s1 FR_r_XS2 = FR_r_XS, FR_r_XS, f0 // xs2 = xs*xs };; -{ .mmi - ldfe FR_p_A18 = [GR_p_Table], 16 - ldfe FR_p_A10 = [GR_p_Table2], 16 +{ .mmi + ldfe FR_p_A18 = [GR_p_Table], 16 + ldfe FR_p_A10 = [GR_p_Table2], 16 nop.i 0 };; .pred.rel "mutex",p12,p13 -{ .mfi - ldfe FR_p_A17 = [GR_p_Table], 16 +{ .mfi + ldfe FR_p_A17 = [GR_p_Table], 16 (p12) fms.s1 FR_p_XR = FR_p_AbsX, f1, FR_p_XN // r = x - xn - nop.i 0 + nop.i 0 } -{ .mfi +{ .mfi ldfe FR_p_A9 = [GR_p_Table2], 16 (p13) fms.s1 FR_p_XR = FR_p_AbsX, f1, FR_p_XN - nop.i 0 + nop.i 0 };; -{ .mmi - ldfe FR_p_A16 = [GR_p_Table], 16 - ldfe FR_p_A8 = [GR_p_Table2], 16 +{ .mmi + ldfe FR_p_A16 = [GR_p_Table], 16 + ldfe FR_p_A8 = [GR_p_Table2], 16 (p9) cmp.eq p12, p0 = r0, r0 // clear p12 };; -{ .mmi - ldfe FR_p_A15 = [GR_p_Table], 16 - ldfe FR_p_A7 = [GR_p_Table2], 16 +{ .mmi + ldfe FR_p_A15 = [GR_p_Table], 16 + ldfe FR_p_A7 = [GR_p_Table2], 16 (p10) cmp.eq p12, p0 = r0, r0 // clear p12 };; -{ .mfi - ldfe FR_p_A14 = [GR_p_Table], 16 +{ .mfi + ldfe FR_p_A14 = [GR_p_Table], 16 fma.s1 FR_r_TH = FR_r_A2H, FR_r_XS2, f0 // sin for neg (p11) cmp.eq p12, p0 = r0, r0 // clear p12 } -{ .mfi +{ .mfi ldfe FR_p_A6 = [GR_p_Table2], 16 fma.s1 FR_r_TL = FR_r_A2L, FR_r_XS2, f0 // sin for neg - nop.i 0 + nop.i 0 };; -{ .mfi +{ .mfi ldfe FR_p_A13 = [GR_p_Table], 16 fms.s1 FR_r_XS2L = FR_r_XS, FR_r_XS, FR_r_XS2 // x2Lo part - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Temp5H = FR_p_A5H, FR_p_XR, f0 // A5H*r // 'Low poly' - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_XR2 = FR_p_XR, FR_p_XR, f0 // r^2 = r*r - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fabs FR_r_XS = FR_r_XS // abs(xs) - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 - fma.s1 FR_p_Temp2H = FR_p_A2H, FR_p_XR, f0 // A2H*r +{ .mfi + nop.m 0 + fma.s1 FR_p_Temp2H = FR_p_A2H, FR_p_XR, f0 // A2H*r // 'High poly' - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fms.s1 FR_r_TT = FR_r_A2H, FR_r_XS2, FR_r_TH // sin for neg - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_ResH = FR_r_TH, f1, FR_r_A1H // sin for neg - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_TL = FR_r_A2H, FR_r_XS2L, FR_r_TL // sin for neg - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fms.s1 FR_p_Temp5L = FR_p_A5H,FR_p_XR,FR_p_Temp5H //A5H*r delta // 'Low poly' - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Poly5H = FR_p_Temp5H, f1, FR_p_A4H // A5H*r+A4H // 'Low poly' - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fms.s1 FR_p_Temp2L = FR_p_A2H, FR_p_XR, FR_p_Temp2H//A2H*r delta //'High poly' - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Poly2H = FR_p_Temp2H, f1, FR_p_A1H // A2H*r+A1H //'High poly' - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_XR3 = FR_p_XR2, FR_p_XR, f0 // r^3 = r^2*r - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fms.s1 FR_p_XR2L = FR_p_XR, FR_p_XR, FR_p_XR2 // r^2 delta - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_A18 = FR_p_A19, FR_p_XR, FR_p_A18 // Poly tail - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_A14 = FR_p_A15, FR_p_XR, FR_p_A14 // Poly tail - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_XR4 = FR_p_XR2, FR_p_XR2, f0 // r^4 = r^2*r^2 - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Temp5L = FR_p_A5L, FR_p_XR, FR_p_Temp5L// Low part // of A5*r+A4 - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fms.s1 FR_p_Poly5L = FR_p_A4H, f1, FR_p_Poly5H // Low part // of A5*r+A4 - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Temp4H = FR_p_Poly5H, FR_p_XR, f0 // (A5H*r+A4H)*r - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Temp2L = FR_p_A2L, FR_p_XR, FR_p_Temp2L // A2*r low - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fms.s1 FR_p_Poly2L = FR_p_A1H, f1, FR_p_Poly2H // High poly - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Temp1H = FR_p_Poly2H, FR_p_XR, f0 // High poly - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fms.s1 FR_p_XR3L = FR_p_XR2, FR_p_XR, FR_p_XR3 // x^3 delta - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_A16 = FR_p_A17, FR_p_XR, FR_p_A16 // Poly tail - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fms.s1 FR_r_ResL = FR_r_A1H, f1, FR_r_ResH // sin for neg - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_TL = FR_r_TL, f1, FR_r_TT // sin for neg - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Temp5L = FR_p_Temp5L, f1, FR_p_A4L // Low poly - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Poly5L = FR_p_Poly5L, f1, FR_p_Temp5H // Low poly - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fms.s1 FR_p_Temp4L = FR_p_Poly5H,FR_p_XR,FR_p_Temp4H //Low poly - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Poly4H = FR_p_Temp4H, f1, FR_p_A3H // Low poly - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Temp2L = FR_p_Temp2L, f1, FR_p_A1L // High poly - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Poly2L = FR_p_Poly2L, f1, FR_p_Temp2H // High poly - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fms.s1 FR_p_Temp1L = FR_p_Poly2H,FR_p_XR,FR_p_Temp1H //High poly - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Poly1H = FR_p_Temp1H, f1, FR_p_A0H // High poly - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_A12 = FR_p_A13, FR_p_XR, FR_p_A12 // Poly tail - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_XR3L = FR_p_XR2L, FR_p_XR, FR_p_XR3L // x^3 low - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Poly5L = FR_p_Poly5L, f1, FR_p_Temp5L // Low poly - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_A10 = FR_p_A11, FR_p_XR, FR_p_A10 // Poly tail - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fms.s1 FR_p_Poly4L = FR_p_A3H, f1, FR_p_Poly4H // Low poly - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_A6 = FR_p_A7, FR_p_XR, FR_p_A6 // Poly tail - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_A8 = FR_p_A9, FR_p_XR, FR_p_A8 // Poly tail - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_XR6 = FR_p_XR4, FR_p_XR2, f0 // Poly tail - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Poly2L = FR_p_Poly2L, f1, FR_p_Temp2L // High poly - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fms.s1 FR_p_Poly1L = FR_p_A0H, f1, FR_p_Poly1H // High poly - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_ResL = FR_r_ResL, f1, FR_r_TH // sin for neg - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_TT = FR_r_TL, f1, FR_r_A1L // sin for neg - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Temp4L = FR_p_Poly5L,FR_p_XR,FR_p_Temp4L // Low poly - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_A18 = FR_p_A20, FR_p_XR2, FR_p_A18 // Poly tail - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Poly4L = FR_p_Poly4L, f1, FR_p_Temp4H // Low poly - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_A14 = FR_p_A16, FR_p_XR2, FR_p_A14 // Poly tail - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_A6 = FR_p_A8, FR_p_XR2, FR_p_A6 // Poly tail - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_A10 = FR_p_A12, FR_p_XR2, FR_p_A10 // Poly tail - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Temp1L = FR_p_Poly2L,FR_p_XR,FR_p_Temp1L //High poly - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Poly1L = FR_p_Poly1L, f1, FR_p_Temp1H // High poly - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_ResL = FR_r_ResL, f1, FR_r_TT // sin for neg - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_TH = FR_r_ResH, FR_r_XS2, f0 // sin for neg - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Temp4L = FR_p_Temp4L, f1, FR_p_A3L // Low poly - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Poly3H = FR_p_Poly4H, FR_p_XR3, f0 // Low poly - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_A14 = FR_p_A18, FR_p_XR4, FR_p_A14 // Poly tail - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_XR8 = FR_p_XR4, FR_p_XR4, f0 // Poly tail - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_TL = FR_r_ResH, FR_r_XS2L, f0 // sin for neg - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Temp1L = FR_p_Temp1L, f1, FR_p_A0L // High poly - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_A6 = FR_p_A10, FR_p_XR4, FR_p_A6 // Poly tail - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fms.s1 FR_r_TT = FR_r_ResH, FR_r_XS2, FR_r_TH // sin for neg - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_Res3H = FR_r_TH, f1, f1 // sin for neg - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Poly4L = FR_p_Poly4L, f1, FR_p_Temp4L // Low poly - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Poly3L = FR_p_Poly4H, FR_p_XR3L, f0 // Low poly - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Poly0H = FR_p_Poly3H,f1,FR_p_Poly1H //Low & High add - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_A7 = FR_r_A8, FR_r_XS2, FR_r_A7 // sin for neg - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_TL = FR_r_ResL, FR_r_XS2, FR_r_TL // sin for neg - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_XS4 = FR_r_XS2, FR_r_XS2, f0 // sin for neg - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Poly1L = FR_p_Poly1L, f1, FR_p_Temp1L // High poly - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_PolyTail = FR_p_A14, FR_p_XR8, FR_p_A6 // Poly tail - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fms.s1 FR_r_Res3L = f1, f1, FR_r_Res3H // sin for neg - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_ResH = FR_r_Res3H, FR_r_XS, f0 // sin for neg - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fms.s1 FR_p_Temp0L = FR_p_Poly4H,FR_p_XR3,FR_p_Poly3H //Low poly - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Poly3L = FR_p_Poly4L,FR_p_XR3,FR_p_Poly3L //Low poly - nop.i 0 + nop.i 0 };; { .mfi - nop.m 0 + nop.m 0 fms.s1 FR_p_Poly0L = FR_p_Poly1H,f1,FR_p_Poly0H //Low & High add - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 -(p13) fma.s1 FR_p_OddPoly0H = FR_p_Poly0H, FR_p_AbsXM1, f0 +{ .mfi + nop.m 0 +(p13) fma.s1 FR_p_OddPoly0H = FR_p_Poly0H, FR_p_AbsXM1, f0 // Reccurent computations - multiplying by X-1 - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_TL = FR_r_TL, f1, FR_r_TT // sin for neg - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_A3 = FR_r_A4, FR_r_XS2, FR_r_A3 // sin for neg - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Poly1L = FR_p_PolyTail,FR_p_XR6,FR_p_Poly1L//High - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_A5 = FR_r_A6, FR_r_XS2, FR_r_A5 // sin for neg - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_Res3L = FR_r_Res3L, f1, FR_r_TH // sin for neg - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fms.s1 FR_r_ResL = FR_r_Res3H, FR_r_XS, FR_r_ResH//sin for neg - nop.i 0 + nop.i 0 };; { .mfi - nop.m 0 + nop.m 0 fma.s1 FR_p_Poly3L = FR_p_Poly3L, f1, FR_p_Temp0L // Low poly - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_A7 = FR_r_A9, FR_r_XS4, FR_r_A7 // sin for neg - nop.i 0 + nop.i 0 };; { .mfi - nop.m 0 + nop.m 0 fma.s1 FR_p_Poly0L = FR_p_Poly0L,f1,FR_p_Poly3H //Low & High add - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 (p13) fms.s1 FR_p_OddPoly0L = FR_p_Poly0H, FR_p_AbsXM1, FR_p_OddPoly0H // Reccurent computations - multiplying by X-1 (low part) - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_A3 = FR_r_A5, FR_r_XS4, FR_r_A3 // sin for neg - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_XS7 = FR_r_XS4, FR_r_XS2, f0 // xs^6 - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_Res3L = FR_r_Res3L, f1, FR_r_TL // sin for neg - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_XS8 = FR_r_XS4, FR_r_XS4, f0 // sin for neg - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Temp0H = FR_p_Poly3L,f1,FR_p_Poly1L //Low & High add - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_XS7 = FR_r_XS7, FR_r_XS, f0 // xs^7 - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_ResL = FR_r_Res3L, FR_r_XS, FR_r_ResL//sin for neg - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_Tail = FR_r_A7, FR_r_XS8, FR_r_A3 // sin tail res - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Poly0L = FR_p_Poly0L,f1,FR_p_Temp0H //Low & High add - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_ResL = FR_r_Tail,FR_r_XS7,FR_r_ResL //sin for neg - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 (p13) fma.s1 FR_p_OddPoly0L = FR_p_Poly0L, FR_p_AbsXM1, FR_p_OddPoly0L // Reccurent computations - multiplying by X-1 (low part) - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_TT = FR_r_ResL, FR_r_AbsX, f0 // X*sin - nop.i 0 + nop.i 0 };; .pred.rel "mutex",p12,p13 -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 (p12) fma.s0 f8 = FR_p_Poly0H, f1, FR_p_Poly0L // Even - nop.i 0 + nop.i 0 } -{ .mfb - nop.m 0 +{ .mfb + nop.m 0 (p13) fma.s0 f8 = FR_p_OddPoly0H, f1, FR_p_OddPoly0L // Odd (p14) br.ret.spnt b0 // Exit for 1 <= |X| < 13 path (positive arguments)///// };; -{ .mfi - nop.m 0 -(p13) fma.s1 FR_p_Poly0H = FR_p_OddPoly0H, f1, f0 +{ .mfi + nop.m 0 +(p13) fma.s1 FR_p_Poly0H = FR_p_OddPoly0H, f1, f0 // Reccurent computations - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 -(p13) fma.s1 FR_p_Poly0L = FR_p_OddPoly0L, f1, f0 +{ .mfi + nop.m 0 +(p13) fma.s1 FR_p_Poly0L = FR_p_OddPoly0L, f1, f0 // Reccurent computations - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_Res1H = FR_r_ResH, FR_r_AbsX, FR_r_TT // X*sin (p11) cmp.eq p13, p12 = r0, r0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fms.s1 FR_r_Res1L = FR_r_ResH,FR_r_AbsX,FR_r_Res1H// X*sin (p9) cmp.eq p13, p12 = r0, r0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_Res1L = FR_r_Res1L, f1, FR_r_TT // sin for neg (p10) cmp.eq p13, p12 = r0, r0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_TL = FR_p_Poly0L, FR_r_Res1H, f0 // mult by sin - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_TL = FR_p_Poly0H,FR_r_Res1L,FR_r_TL//mult by sin - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_ResH = FR_p_Poly0H,FR_r_Res1H,FR_r_TL//mult by sin - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fms.s1 FR_r_ResL = FR_p_Poly0H,FR_r_Res1H,FR_r_ResH//sin mult - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 frcpa.s1 FR_r_Y0,p0 = f1,FR_r_ResH // y = frcpa(b) - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fneg FR_r_NegOne = f1 // Form -1.0 - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_ResL = FR_r_ResL, f1, FR_r_TL //Low result of mult - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_Q0 = f1,FR_r_Y0,f0 // q = a*y - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 - fnma.s1 FR_r_E0 = FR_r_Y0,FR_r_ResH,f1 // e = 1-b*y - nop.i 0 +{ .mfi + nop.m 0 + fnma.s1 FR_r_E0 = FR_r_Y0,FR_r_ResH,f1 // e = 1-b*y + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_E2 = FR_r_E0,FR_r_E0,FR_r_E0 // e2 = e+e^2 - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_E1 = FR_r_E0,FR_r_E0,f0 // e1 = e^2 - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_Y1 = FR_r_Y0,FR_r_E2,FR_r_Y0 // y1 = y+y*e2 - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_E3 = FR_r_E1,FR_r_E1,FR_r_E0 // e3 = e+e1^2 - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_Y2 = FR_r_Y1,FR_r_E3,FR_r_Y0 // y2 = y+y1*e3 - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fnma.s1 FR_r_R0 = FR_r_ResH,FR_r_Q0,f1 // r = a-b*q - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fnma.s1 FR_r_E4 = FR_r_ResH,FR_r_Y2,f1 // e4 = 1-b*y2 - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_ZH = FR_r_R0,FR_r_Y2,FR_r_Q0 // x = q+r*y2 - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_Y3 = FR_r_Y2,FR_r_E4,FR_r_Y2 // y3 = y2+y2*e4 - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fnma.s1 FR_r_R1 = FR_r_ResH,FR_r_ZH,f1 // r1 = a-b*x - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fnma.s1 FR_r_R1 = FR_r_ResL,FR_r_ZH,FR_r_R1 // r1=r1-b_lo*X - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 (p12) fma.s1 FR_r_ZHN = FR_r_ZH,FR_r_NegOne, f0 // Negate for evens - nop.i 0 + nop.i 0 };; .pred.rel "mutex",p13,p12 -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 (p13) fma.s0 f8 = FR_r_R1,FR_r_Y3,FR_r_ZH // Final result - nop.i 0 + nop.i 0 } -{ .mfb - nop.m 0 +{ .mfb + nop.m 0 (p12) fnma.s0 f8 = FR_r_R1,FR_r_Y3,FR_r_ZHN // Final result br.ret.sptk b0 // Exit for 1 <= |X| < 13 path (negative arguments)////// };; @@ -3322,935 +3322,935 @@ tgamma_lt_13: //------------------------------------------------------------------------------ .align 64 tgamma_lt_1: -{ .mfi +{ .mfi getf.exp GR_p_Exp = FR_p_AbsX // exp of abs X fma.s1 FR_z_Q0 = f1,FR_z_Y0,f0 // q = a*y add GR_r_sin_Table2= 0x50, GR_r_sin_Table -} +} { .mfi - ldfpd FR_p_0p5, FR_p_1p5 = [GR_c_Table], 16 - fnma.s1 FR_z_E0 = FR_z_Y0,f8,f1 // e = 1-b*y + ldfpd FR_p_0p5, FR_p_1p5 = [GR_c_Table], 16 + fnma.s1 FR_z_E0 = FR_z_Y0,f8,f1 // e = 1-b*y add GR_p_Table2 = 0xB0, GR_p_Table -};; +};; -{ .mfi +{ .mfi ldfd FR_p_0p25 = [GR_c_Table] fcvt.xf FR_r_XNS = FR_r_IXNS // Convert int repr to float - shr.u GR_p_X_Sgnd = GR_p_X_Sgnd, 60 + shr.u GR_p_X_Sgnd = GR_p_X_Sgnd, 60 // Obtain only 4 bits of significand } -{ .mfi +{ .mfi nop.m 0 nop.f 0 add GR_p_Bias = 0xffff, r0 // Set bias -};; +};; -{ .mfi - ldfpd FR_r_A2H, FR_r_A2L = [GR_r_sin_Table], 16 +{ .mfi + ldfpd FR_r_A2H, FR_r_A2L = [GR_r_sin_Table], 16 nop.f 0 shl GR_p_XN = GR_p_Exp, 4 // Shift exp to 4 bits left to set place for significand -} +} { .mlx ldfe FR_r_A6 = [GR_r_sin_Table2], 16 movl GR_p_0p75 = 0xfffec // 0.75 -};; +};; -{ .mfi - ldfpd FR_r_A1H, FR_r_A1L = [GR_r_sin_Table], 16 +{ .mfi + ldfpd FR_r_A1H, FR_r_A1L = [GR_r_sin_Table], 16 nop.f 0 - or GR_p_XN = GR_p_XN, GR_p_X_Sgnd + or GR_p_XN = GR_p_XN, GR_p_X_Sgnd // Combine exp with 4 high bits of significand -} +} { .mfi - ldfe FR_r_A5 = [GR_r_sin_Table2], 16 + ldfe FR_r_A5 = [GR_r_sin_Table2], 16 nop.f 0 sub GR_p_Exp = GR_p_Exp, GR_p_Bias // Unbiased exp -};; +};; -{ .mmi - ldfe FR_r_A9 = [GR_r_sin_Table], 16 - ldfe FR_r_A4 = [GR_r_sin_Table2], 16 +{ .mmi + ldfe FR_r_A9 = [GR_r_sin_Table], 16 + ldfe FR_r_A4 = [GR_r_sin_Table2], 16 cmp.gtu.unc p10, p11 = GR_p_0p75, GR_p_XN // sgnd(x) < 0.75 -};; +};; -{ .mfi - ldfe FR_r_A8 = [GR_r_sin_Table], 16 +{ .mfi + ldfe FR_r_A8 = [GR_r_sin_Table], 16 fma.s1 FR_z_E2 = FR_z_E0,FR_z_E0,FR_z_E0 // e2 = e+e^2 (p10) cmp.gt.unc p9, p10 = -2, GR_p_Exp // x < 0.25 -} +} { .mfi - ldfe FR_r_A3 = [GR_r_sin_Table2], 16 + ldfe FR_r_A3 = [GR_r_sin_Table2], 16 fma.s1 FR_z_E1 = FR_z_E0,FR_z_E0,f0 // e1 = e^2 (p11) add GR_p_Offset = 168, r0 // [0.75;1] interval -};; +};; -{ .mmi +{ .mmi (p10) add GR_p_Offset = 147, r0 // [0.25;0.75] interval - ldfe FR_r_A7 = [GR_r_sin_Table], 16 + ldfe FR_r_A7 = [GR_r_sin_Table], 16 (p9) cmp.gt.unc p8, p9 = -3, GR_p_Exp // x < 0.125 -};; +};; .pred.rel "mutex",p9,p8 -{ .mmi +{ .mmi (p9) add GR_p_Offset = 126, r0 // [0.125;0.25] interval (p8) add GR_p_Offset = 189, r0 // [0.;0.125] interval - nop.i 0 -};; + nop.i 0 +};; -{ .mmf +{ .mmf shladd GR_p_Table = GR_p_Offset, 4, GR_p_Table //Make addresses shladd GR_p_Table2 = GR_p_Offset, 4, GR_p_Table2 fma.s1 FR_r_XS = FR_r_AbsX , f1, FR_r_XNS // xs = |x|-[x] -};; +};; .pred.rel "mutex",p8,p11 -{ .mfi - ldfpd FR_p_A5H, FR_p_A5L = [GR_p_Table], 16 +{ .mfi + ldfpd FR_p_A5H, FR_p_A5L = [GR_p_Table], 16 (p11) fms.s1 FR_p_XR = f1, f1, FR_p_AbsX // r = 1 - |x| // for [0.75;1] interval - nop.i 0 + nop.i 0 } -{ .mfi - ldfpd FR_p_A2H, FR_p_A2L = [GR_p_Table2], 16 +{ .mfi + ldfpd FR_p_A2H, FR_p_A2L = [GR_p_Table2], 16 (p8) fms.s1 FR_p_XR = FR_p_AbsX, f1, f0 // r = |x| // for [0.;0.125] interval - nop.i 0 + nop.i 0 };; -{ .mfi - ldfpd FR_p_A4H, FR_p_A4L = [GR_p_Table], 16 +{ .mfi + ldfpd FR_p_A4H, FR_p_A4L = [GR_p_Table], 16 fma.s1 FR_z_Y1 = FR_z_Y0,FR_z_E2,FR_z_Y0 // y1 = y+y*e2 - nop.i 0 + nop.i 0 } -{ .mfi - ldfpd FR_p_A1H, FR_p_A1L = [GR_p_Table2], 16 +{ .mfi + ldfpd FR_p_A1H, FR_p_A1L = [GR_p_Table2], 16 fma.s1 FR_z_E3 = FR_z_E1,FR_z_E1,FR_z_E0 // e3 = e+e1^2 - nop.i 0 + nop.i 0 };; .pred.rel "mutex",p9,p10 -{ .mfi - ldfpd FR_p_A3H, FR_p_A3L = [GR_p_Table], 16 +{ .mfi + ldfpd FR_p_A3H, FR_p_A3L = [GR_p_Table], 16 (p9) fms.s1 FR_p_XR = FR_p_AbsX, f1, f0 // r = |x| // for [0.125;0.25] interval - nop.i 0 + nop.i 0 } -{ .mfi - ldfpd FR_p_A0H, FR_p_A0L = [GR_p_Table2], 16 +{ .mfi + ldfpd FR_p_A0H, FR_p_A0L = [GR_p_Table2], 16 (p10) fms.s1 FR_p_XR = FR_p_AbsX, f1, FR_p_0p5 // r = |x| - 0.5 // for [0.25;0.75] interval - nop.i 0 + nop.i 0 };; -{ .mmi - ldfe FR_p_A20 = [GR_p_Table], 16 - ldfe FR_p_A12 = [GR_p_Table2], 16 +{ .mmi + ldfe FR_p_A20 = [GR_p_Table], 16 + ldfe FR_p_A12 = [GR_p_Table2], 16 nop.i 0 };; -{ .mfi - ldfe FR_p_A19 = [GR_p_Table], 16 +{ .mfi + ldfe FR_p_A19 = [GR_p_Table], 16 fma.s1 FR_r_XS2 = FR_r_XS, FR_r_XS, f0 // xs^2 - nop.i 0 + nop.i 0 } -{ .mfi - ldfe FR_p_A11 = [GR_p_Table2], 16 +{ .mfi + ldfe FR_p_A11 = [GR_p_Table2], 16 nop.f 0 - nop.i 0 + nop.i 0 };; -{ .mmi - ldfe FR_p_A18 = [GR_p_Table], 16 - ldfe FR_p_A10 = [GR_p_Table2], 16 +{ .mmi + ldfe FR_p_A18 = [GR_p_Table], 16 + ldfe FR_p_A10 = [GR_p_Table2], 16 nop.i 0 };; .pred.rel "mutex",p12,p13 -{ .mfi - ldfe FR_p_A17 = [GR_p_Table], 16 +{ .mfi + ldfe FR_p_A17 = [GR_p_Table], 16 fma.s1 FR_z_Y2 = FR_z_Y1,FR_z_E3,FR_z_Y0 // y2 = y+y1*e3 - nop.i 0 + nop.i 0 } -{ .mfi - ldfe FR_p_A9 = [GR_p_Table2], 16 +{ .mfi + ldfe FR_p_A9 = [GR_p_Table2], 16 fnma.s1 FR_z_R0 = f8,FR_z_Q0,f1 // r = a-b*q - nop.i 0 + nop.i 0 };; -{ .mmi - ldfe FR_p_A16 = [GR_p_Table], 16 - ldfe FR_p_A8 = [GR_p_Table2], 16 - nop.i 0 +{ .mmi + ldfe FR_p_A16 = [GR_p_Table], 16 + ldfe FR_p_A8 = [GR_p_Table2], 16 + nop.i 0 };; -{ .mmi - ldfe FR_p_A15 = [GR_p_Table], 16 - ldfe FR_p_A7 = [GR_p_Table2], 16 +{ .mmi + ldfe FR_p_A15 = [GR_p_Table], 16 + ldfe FR_p_A7 = [GR_p_Table2], 16 nop.i 0 };; -{ .mfi - ldfe FR_p_A14 = [GR_p_Table], 16 +{ .mfi + ldfe FR_p_A14 = [GR_p_Table], 16 fma.s1 FR_r_TH = FR_r_A2H, FR_r_XS2, f0 // neg sin - nop.i 0 + nop.i 0 } -{ .mfi - ldfe FR_p_A6 = [GR_p_Table2], 16 +{ .mfi + ldfe FR_p_A6 = [GR_p_Table2], 16 fma.s1 FR_r_TL = FR_r_A2L, FR_r_XS2, f0 // neg sin - nop.i 0 + nop.i 0 };; -{ .mfi - ldfe FR_p_A13 = [GR_p_Table], 16 +{ .mfi + ldfe FR_p_A13 = [GR_p_Table], 16 fms.s1 FR_r_XS2L = FR_r_XS, FR_r_XS, FR_r_XS2 // xs^2 delta - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Temp5H = FR_p_A5H, FR_p_XR, f0 // Low poly - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_XR2 = FR_p_XR, FR_p_XR, f0 // poly tail - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fabs FR_r_XS = FR_r_XS // Absolute value of xs - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Temp2H = FR_p_A2H, FR_p_XR, f0 // High poly - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fnma.s1 FR_z_E4 = f8,FR_z_Y2,f1 // e4 = 1-b*y2 - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_z_ZH = FR_z_R0,FR_z_Y2,FR_z_Q0 // 1/x = q+r*y2 - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fms.s1 FR_r_TT = FR_r_A2H, FR_r_XS2, FR_r_TH // neg sin - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_ResH = FR_r_TH, f1, FR_r_A1H // neg sin - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_TL = FR_r_A2H, FR_r_XS2L, FR_r_TL // neg sin - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fms.s1 FR_p_Temp5L = FR_p_A5H, FR_p_XR, FR_p_Temp5H // Low poly - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Poly5H = FR_p_Temp5H, f1, FR_p_A4H // Low poly - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fms.s1 FR_p_Temp2L = FR_p_A2H, FR_p_XR, FR_p_Temp2H // High poly - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Poly2H = FR_p_Temp2H, f1, FR_p_A1H // High poly - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_XR3 = FR_p_XR2, FR_p_XR, f0 // r^3 - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fms.s1 FR_p_XR2L = FR_p_XR, FR_p_XR, FR_p_XR2 // r^2 delta - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_A18 = FR_p_A19, FR_p_XR, FR_p_A18 // poly tail - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_A14 = FR_p_A15, FR_p_XR, FR_p_A14 // poly tail - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_XR4 = FR_p_XR2, FR_p_XR2, f0 // poly tail - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_z_Y3 = FR_z_Y2,FR_z_E4,FR_z_Y2 // y3 = y2+y2*e4 - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Temp5L = FR_p_A5L, FR_p_XR, FR_p_Temp5L // Low poly - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fms.s1 FR_p_Poly5L = FR_p_A4H, f1, FR_p_Poly5H // Low poly - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Temp4H = FR_p_Poly5H, FR_p_XR, f0 // Low poly - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Temp2L = FR_p_A2L, FR_p_XR, FR_p_Temp2L // High poly - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fms.s1 FR_p_Poly2L = FR_p_A1H, f1, FR_p_Poly2H // High poly - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Temp1H = FR_p_Poly2H, FR_p_XR, f0 // High poly - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fms.s1 FR_p_XR3L = FR_p_XR2, FR_p_XR, FR_p_XR3 // x^3 delta - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_A16 = FR_p_A17, FR_p_XR, FR_p_A16 //poly tail - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fms.s1 FR_r_ResL = FR_r_A1H, f1, FR_r_ResH // neg sin - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_TL = FR_r_TL, f1, FR_r_TT // neg sin - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Temp5L = FR_p_Temp5L, f1, FR_p_A4L // Low poly - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Poly5L = FR_p_Poly5L, f1, FR_p_Temp5H //Low poly - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fms.s1 FR_p_Temp4L = FR_p_Poly5H, FR_p_XR, FR_p_Temp4H//Low poly - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Poly4H = FR_p_Temp4H, f1, FR_p_A3H // Low poly - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Temp2L = FR_p_Temp2L, f1, FR_p_A1L // High poly - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Poly2L = FR_p_Poly2L, f1, FR_p_Temp2H // High poly - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fms.s1 FR_p_Temp1L = FR_p_Poly2H,FR_p_XR,FR_p_Temp1H //High poly - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Poly1H = FR_p_Temp1H, f1, FR_p_A0H // High poly - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_A12 = FR_p_A13, FR_p_XR, FR_p_A12 // poly tail - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_XR3L = FR_p_XR2L, FR_p_XR, FR_p_XR3L // x^3 low - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Poly5L = FR_p_Poly5L, f1, FR_p_Temp5L //Low poly - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_A10 = FR_p_A11, FR_p_XR, FR_p_A10 //poly tail - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fms.s1 FR_p_Poly4L = FR_p_A3H, f1, FR_p_Poly4H /// Low poly - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_A6 = FR_p_A7, FR_p_XR, FR_p_A6 // poly tail - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_A8 = FR_p_A9, FR_p_XR, FR_p_A8 // poly tail - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_XR6 = FR_p_XR4, FR_p_XR2, f0 // r^6 - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Poly2L = FR_p_Poly2L, f1, FR_p_Temp2L // High poly - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fms.s1 FR_p_Poly1L = FR_p_A0H, f1, FR_p_Poly1H // High poly - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_ResL = FR_r_ResL, f1, FR_r_TH // neg sin - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_TT = FR_r_TL, f1, FR_r_A1L // neg sin - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Temp4L = FR_p_Poly5L,FR_p_XR,FR_p_Temp4L //Low poly - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_A18 = FR_p_A20, FR_p_XR2, FR_p_A18 // poly tail - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Poly4L = FR_p_Poly4L, f1, FR_p_Temp4H // Low poly - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_A14 = FR_p_A16, FR_p_XR2, FR_p_A14 // poly tail - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_A6 = FR_p_A8, FR_p_XR2, FR_p_A6 // poly tail - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_A10 = FR_p_A12, FR_p_XR2, FR_p_A10 // poly tail - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Temp1L = FR_p_Poly2L,FR_p_XR,FR_p_Temp1L //High poly - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Poly1L = FR_p_Poly1L, f1, FR_p_Temp1H // High poly - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_ResL = FR_r_ResL, f1, FR_r_TT // neg sin - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_TH = FR_r_ResH, FR_r_XS2, f0 // neg sin - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Temp4L = FR_p_Temp4L, f1, FR_p_A3L // Low poly - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Poly3H = FR_p_Poly4H, FR_p_XR3, f0 // Low poly - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_A14 = FR_p_A18, FR_p_XR4, FR_p_A14 // poly tail - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_XR8 = FR_p_XR4, FR_p_XR4, f0 // r^8 - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_TL = FR_r_ResH, FR_r_XS2L, f0 // neg sin - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fnma.s1 FR_z_R1 = f8,FR_z_ZH,f1 // r1 = a-b*x - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Temp1L = FR_p_Temp1L, f1, FR_p_A0L // High poly - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_A6 = FR_p_A10, FR_p_XR4, FR_p_A6 // poly tail - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fms.s1 FR_r_TT = FR_r_ResH, FR_r_XS2, FR_r_TH // neg sin - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_Res3H = FR_r_TH, f1, f1 // neg sin - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Poly4L = FR_p_Poly4L, f1, FR_p_Temp4L // Low poly - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Poly3L = FR_p_Poly4H, FR_p_XR3L, f0 // Low poly - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Poly0H = FR_p_Poly3H, f1, FR_p_Poly1H // Result - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_A7 = FR_r_A8, FR_r_XS2, FR_r_A7 // neg sin - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_TL = FR_r_ResL, FR_r_XS2, FR_r_TL // neg sin - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_XS4 = FR_r_XS2, FR_r_XS2, f0 // xs^4 - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Poly1L = FR_p_Poly1L, f1, FR_p_Temp1L // High poly - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_PolyTail = FR_p_A14, FR_p_XR8, FR_p_A6 // poly tail - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fms.s1 FR_r_Res3L = f1, f1, FR_r_Res3H // neg sin - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_ResH = FR_r_Res3H, FR_r_XS, f0 // neg sin - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fms.s1 FR_p_Temp0L = FR_p_Poly4H,FR_p_XR3,FR_p_Poly3H //Low poly - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Poly3L = FR_p_Poly4L,FR_p_XR3,FR_p_Poly3L //Low poly - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fms.s1 FR_p_Poly0L = FR_p_Poly1H, f1, FR_p_Poly0H // Result - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_z_ZL = FR_z_R1,FR_z_Y3, f0 // x_lo = r1*y3 - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_TL = FR_r_TL, f1, FR_r_TT // neg sin - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_A3 = FR_r_A4, FR_r_XS2, FR_r_A3 /// neg sin - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Poly1L = FR_p_PolyTail,FR_p_XR6,FR_p_Poly1L // High - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_A5 = FR_r_A6, FR_r_XS2, FR_r_A5 // neg sin - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_Res3L = FR_r_Res3L, f1, FR_r_TH // neg sin - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fms.s1 FR_r_ResL = FR_r_Res3H, FR_r_XS, FR_r_ResH // neg sin - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Poly3L = FR_p_Poly3L, f1, FR_p_Temp0L // Low poly - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_A7 = FR_r_A9, FR_r_XS4, FR_r_A7 // neg sin - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Poly0L = FR_p_Poly0L, f1, FR_p_Poly3H // result - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 (p14) fma.s1 f8 = FR_p_Poly0H, FR_z_ZH, f0 // z*poly - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Temp1L = FR_p_Poly0H, FR_z_ZL, f0 // z*poly low - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_A3 = FR_r_A5, FR_r_XS4, FR_r_A3 // sin tail - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_XS7 = FR_r_XS4, FR_r_XS2, f0 // xs^6 - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_Res3L = FR_r_Res3L, f1, FR_r_TL // sin low - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_XS8 = FR_r_XS4, FR_r_XS4, f0 // xs^8 - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Temp0H = FR_p_Poly3L, f1, FR_p_Poly1L // result - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 (p14) fms.s1 FR_p_Temp1H = FR_p_Poly0H, FR_z_ZH, f8 // hi result - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_XS7 = FR_r_XS7, FR_r_XS, f0 // xs^7 - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_ResL = FR_r_Res3L, FR_r_XS, FR_r_ResL // lo result - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_Tail = FR_r_A7, FR_r_XS8, FR_r_A3 // tail result - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_p_Poly0L = FR_p_Poly0L, f1, FR_p_Temp0H // lo result - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_ResL = FR_r_Tail, FR_r_XS7, FR_r_ResL // lo result - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 (p14) fma.s1 FR_p_Temp1L = FR_p_Poly0L,FR_z_ZH,FR_p_Temp1L //hi result - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_TT = FR_r_ResL, f1, f0 // for low result - nop.i 0 + nop.i 0 };; .pred.rel "mutex",p12,p13 -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 (p14) fma.s1 FR_p_Temp1L = FR_p_Temp1L, f1, FR_p_Temp1H // for lo res - nop.i 0 + nop.i 0 };; -{ .mfi +{ .mfi (p10) cmp.eq p13, p12 = r0, r0 // set p13, clear p12 fma.s1 FR_r_Res1H = FR_r_ResH, f1, FR_r_TT // hi res - nop.i 0 + nop.i 0 };; -{ .mfb +{ .mfb (p9) cmp.eq p13, p12 = r0, r0 // set p13, clear p12 (p14) fma.s0 f8 = f8, f1, FR_p_Temp1L // Final result (p14) br.ret.spnt b0 // Exit for 0 < |X| < 1 path (positive arguments)/////// };; -{ .mfi +{ .mfi (p11) cmp.eq p13, p12 = r0, r0 // set p13, clear p12 fms.s1 FR_r_Res1L = FR_r_ResH, f1, FR_r_Res1H // Low sin result - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_Res1L = FR_r_Res1L, f1, FR_r_TT // Low sin result - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_TL = FR_p_Poly0L,FR_r_Res1H,f0 //Low sin result - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_TL = FR_p_Poly0H, FR_r_Res1L, FR_r_TL //Low sin - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_ResH = FR_p_Poly0H, FR_r_Res1H, FR_r_TL //High sin - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fms.s1 FR_r_ResL = FR_p_Poly0H,FR_r_Res1H,FR_r_ResH //Low res - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 frcpa.s1 FR_r_Y0,p0 = f1,FR_r_ResH // y = frcpa(b) - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fneg FR_r_NegOne = f1 // Construct -1.0 - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_ResL = FR_r_ResL, f1, FR_r_TL // low sin - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_Q0 = f1,FR_r_Y0,f0 // q = a*y - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 - fnma.s1 FR_r_E0 = FR_r_Y0,FR_r_ResH,f1 // e = 1-b*y - nop.i 0 +{ .mfi + nop.m 0 + fnma.s1 FR_r_E0 = FR_r_Y0,FR_r_ResH,f1 // e = 1-b*y + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_E2 = FR_r_E0,FR_r_E0,FR_r_E0 // e2 = e+e^2 - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_E1 = FR_r_E0,FR_r_E0,f0 // e1 = e^2 - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_Y1 = FR_r_Y0,FR_r_E2,FR_r_Y0 // y1 = y+y*e2 - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_E3 = FR_r_E1,FR_r_E1,FR_r_E0 // e3 = e+e1^2 - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_Y2 = FR_r_Y1,FR_r_E3,FR_r_Y0 // y2 = y+y1*e3 - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fnma.s1 FR_r_R0 = FR_r_ResH,FR_r_Q0,f1 // r = a-b*q - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fnma.s1 FR_r_E4 = FR_r_ResH,FR_r_Y2,f1 // e4 = 1-b*y2 - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_ZH = FR_r_R0,FR_r_Y2,FR_r_Q0 // x = q+r*y2 - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_Y3 = FR_r_Y2,FR_r_E4,FR_r_Y2 // y3 = y2+y2*e4 - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fnma.s1 FR_r_R1 = FR_r_ResH,FR_r_ZH,f1 // r1 = a-b*x - nop.i 0 + nop.i 0 };; -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fnma.s1 FR_r_R1 = FR_r_ResL,FR_r_ZH,FR_r_R1 // r1=r1 - b_lo*X - nop.i 0 + nop.i 0 } -{ .mfi - nop.m 0 +{ .mfi + nop.m 0 fma.s1 FR_r_ZHN = FR_r_ZH,FR_r_NegOne, f0 // Negate - nop.i 0 + nop.i 0 };; .pred.rel "mutex",p13,p12 -{ .mfb - nop.m 0 +{ .mfb + nop.m 0 fnma.s0 f8 = FR_r_R1,FR_r_Y3,FR_r_ZHN // Result for neg br.ret.sptk b0 // Exit for 0 < |X| < 1 path (negative arguments)////// };; @@ -4263,7 +4263,7 @@ tgamma_lt_1: .align 32 tgammal_spec: { .mlx - nop.m 0 + nop.m 0 movl GR_DenOverflow = 0x2000000000000001 } { .mfi @@ -4283,20 +4283,20 @@ tgammal_spec: } { .mfi -(p9) cmp.ltu.unc p10,p11 = GR_l_signif_Z, GR_DenOverflow +(p9) cmp.ltu.unc p10,p11 = GR_l_signif_Z, GR_DenOverflow (p9) fnorm.s0 f8 = f8 - nop.i 0 + nop.i 0 };; { .mfb - nop.m 0 + nop.m 0 (p9) fcvt.fx.trunc.s1 FR_n_IXN = FR_l_AbsX // Round by truncate (p11) br.cond.sptk tgamma_lt_1 // Return to gamma ('good' denormal)//////////// };; { .mfb - nop.m 0 - nop.f 0 + nop.m 0 + nop.f 0 (p10) br.cond.spnt tgammal_overflow // "Bad" denormal - overflow! ///////////// };; @@ -4314,17 +4314,17 @@ tgammal_spec: { .mfi (p7) mov GR_Parameter_TAG = 256 // negative (p7) frcpa.s0 f8,p0 = f1,f8 // Raise V flag - nop.i 0 + nop.i 0 } { .mfb nop.m 0 - nop.f 0 + nop.f 0 (p8) br.cond.spnt tgammal_singularity // Branch for +ZERO //////////////////// };; { .mfb - nop.m 0 - nop.f 0 + nop.m 0 + nop.f 0 br.cond.spnt tgammal_libm_err // Branch for -ZERO /////////////////////// };; @@ -4358,7 +4358,7 @@ tgammal_overflow: { .mfi addl r8 = 0x1FFFE, r0 // Exp of INF fcmp.lt.s1 p15,p14 = f8,f0 // p14 - pos arg, p15 - neg arg - nop.i 0 + nop.i 0 };; { .mfi @@ -4369,12 +4369,12 @@ tgammal_overflow: .pred.rel "mutex",p14,p15 { .mfi - nop.m 0 + nop.m 0 (p14) fma.s0 f8 = f9,f9,f0 // Set I,O and +INF result - nop.i 0 + nop.i 0 } { .mfb - nop.m 0 + nop.m 0 (p15) fnma.s0 f8 = f9,f9,f0 // Set I,O and -INF result br.cond.sptk tgammal_libm_err // Call error handler ///////////////////// // with overflow error //////////////////// @@ -4389,9 +4389,9 @@ tgammal_overflow: .align 32 tgammal_underflow: { .mfi - nop.m 0 + nop.m 0 fcvt.fx.trunc.s1 FR_u_IXN = f8 // Convert arg to int repres. in FR - nop.i 0 + nop.i 0 };; { .mmi diff --git a/sysdeps/ia64/softpipe.h b/sysdeps/ia64/softpipe.h index cf0eb53559..d71af735eb 100644 --- a/sysdeps/ia64/softpipe.h +++ b/sysdeps/ia64/softpipe.h @@ -18,7 +18,7 @@ /* The latency of a memory load assumed by the assembly implementation of the mem and str functions. Since we don't have any clue about - where the data might be, let's assume it's in the L2 cache. + where the data might be, let's assume it's in the L2 cache. Assuming L3 would be too pessimistic :-) Some functions define MEMLAT as 2, because they expect their data diff --git a/sysdeps/ia64/strchr.S b/sysdeps/ia64/strchr.S index 63db7ff7e5..fc55ad1871 100644 --- a/sysdeps/ia64/strchr.S +++ b/sysdeps/ia64/strchr.S @@ -51,7 +51,7 @@ ENTRY(strchr) .save ar.lc, saved_lc mov saved_lc = ar.lc // save the loop counter .body - mov ret0 = str + mov ret0 = str and tmp = 7, str // tmp = str % 8 mux1 chrx8 = chr, @brcst extr.u chr = chr, 0, 8 // retain only the last byte @@ -74,9 +74,9 @@ ENTRY(strchr) ld8 val1 = [ret0], 8;; nop.b 0 nop.b 0 -.l2: +.l2: ld8.s val2 = [ret0], 8 // don't bomb out here - czx1.r pos0 = val1 + czx1.r pos0 = val1 xor tmp = val1, chrx8 // if val1 contains chr, tmp will ;; // contain a zero in its position czx1.r poschr = tmp @@ -87,7 +87,7 @@ ENTRY(strchr) (p6) br.cond.spnt .notfound chk.s val2, .recovery .back: - mov val1 = val2 + mov val1 = val2 br.cond.dptk .l2 .foundit: (p6) cmp.lt p8, p0 = pos0, poschr // we found chr and null in the word diff --git a/sysdeps/ia64/strlen.S b/sysdeps/ia64/strlen.S index 518d86b0d2..ad6a7fbacc 100644 --- a/sysdeps/ia64/strlen.S +++ b/sysdeps/ia64/strlen.S @@ -52,7 +52,7 @@ ENTRY(strlen) .save ar.lc, saved_lc mov saved_lc = ar.lc // save the loop counter .body - mov str = in0 + mov str = in0 mov len = r0 // len = 0 and tmp = 7, in0 // tmp = str % 8 ;; @@ -74,13 +74,13 @@ ENTRY(strlen) nop.b 0 nop.b 0 .l2: ld8.s val2 = [str], 8 // don't bomb out here - czx1.r pos0 = val1 + czx1.r pos0 = val1 ;; cmp.ne p6, p0 = 8, pos0 (p6) br.cond.spnt .foundit chk.s val2, .recovery .back: - mov val1 = val2 + mov val1 = val2 br.cond.dptk .l2 .foundit: sub tmp = str, origadd // tmp = crt address - orig diff --git a/sysdeps/ia64/strncmp.S b/sysdeps/ia64/strncmp.S index 743121d88d..faa0d10d21 100644 --- a/sysdeps/ia64/strncmp.S +++ b/sysdeps/ia64/strncmp.S @@ -58,5 +58,5 @@ ENTRY(strncmp) sub ret0 = val1, val2 .restore_and_exit: br.ret.sptk.many b0 -END(strncmp) +END(strncmp) libc_hidden_builtin_def (strncmp) diff --git a/sysdeps/unix/sysv/linux/ia64/register-dump.h b/sysdeps/unix/sysv/linux/ia64/register-dump.h index 513db974f8..dad3451b1a 100644 --- a/sysdeps/unix/sysv/linux/ia64/register-dump.h +++ b/sysdeps/unix/sysv/linux/ia64/register-dump.h @@ -147,7 +147,7 @@ register_dump (int fd, struct sigcontext *ctx) for (i = 0; i < 3; ++i) ADD_MEM (bpregs[i], sizeof (bpregs[0]) - 1); - + ADD_STRING ("\n\n IP: "); ADD_MEM (spregs[0], sizeof (spregs[0])); ADD_STRING (" RSC: "); From 75efb01851855be7cce7989f8c054118e83d5d66 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 16 Apr 2012 22:10:24 -0400 Subject: [PATCH 4296/4487] ia64: update FSF license address to URL Processed with a simple sed script: find `find sysdeps/ -name ia64` -type f -exec sed -i \ -e '/Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA/d' \ -e 's:License along with the GNU C Library; if not, write to the Free:License along with the GNU C Library; if not, see:' \ -e 's|02111-1307 USA.|.|' {} + Signed-off-by: Mike Frysinger --- ChangeLog.ia64 | 147 ++++++++++++++++++ sysdeps/ia64/_mcount.S | 5 +- sysdeps/ia64/backtrace.c | 5 +- sysdeps/ia64/bits/atomic.h | 5 +- sysdeps/ia64/bits/byteswap.h | 5 +- sysdeps/ia64/bits/fenv.h | 5 +- sysdeps/ia64/bits/huge_vall.h | 5 +- sysdeps/ia64/bits/link.h | 5 +- sysdeps/ia64/bits/mathdef.h | 5 +- sysdeps/ia64/bits/xtitypes.h | 5 +- sysdeps/ia64/bzero.S | 5 +- sysdeps/ia64/dl-dtprocnum.h | 5 +- sysdeps/ia64/dl-fptr.h | 5 +- sysdeps/ia64/dl-lookupcfg.h | 5 +- sysdeps/ia64/dl-machine.h | 5 +- sysdeps/ia64/dl-sysdep.h | 5 +- sysdeps/ia64/dl-tls.h | 5 +- sysdeps/ia64/dl-trampoline.S | 5 +- sysdeps/ia64/elf/initfini.c | 5 +- sysdeps/ia64/elf/start.S | 5 +- sysdeps/ia64/fpu/bits/math-finite.h | 5 +- sysdeps/ia64/fpu/bits/mathinline.h | 5 +- sysdeps/ia64/fpu/fclrexcpt.c | 5 +- sysdeps/ia64/fpu/fedisblxcpt.c | 5 +- sysdeps/ia64/fpu/feenablxcpt.c | 5 +- sysdeps/ia64/fpu/fegetenv.c | 5 +- sysdeps/ia64/fpu/fegetexcept.c | 5 +- sysdeps/ia64/fpu/fegetround.c | 5 +- sysdeps/ia64/fpu/feholdexcpt.c | 5 +- sysdeps/ia64/fpu/fesetenv.c | 5 +- sysdeps/ia64/fpu/fesetround.c | 5 +- sysdeps/ia64/fpu/feupdateenv.c | 5 +- sysdeps/ia64/fpu/fgetexcptflg.c | 5 +- sysdeps/ia64/fpu/fraiseexcpt.c | 5 +- sysdeps/ia64/fpu/fsetexcptflg.c | 5 +- sysdeps/ia64/fpu/ftestexcept.c | 5 +- sysdeps/ia64/fpu/printf_fphex.c | 5 +- sysdeps/ia64/fpu/s_copysign.S | 5 +- sysdeps/ia64/fpu/s_finite.S | 5 +- sysdeps/ia64/fpu/s_fpclassify.S | 5 +- sysdeps/ia64/fpu/s_isinf.S | 5 +- sysdeps/ia64/fpu/s_isnan.S | 5 +- sysdeps/ia64/fpu/s_signbit.S | 5 +- sysdeps/ia64/gccframe.h | 5 +- sysdeps/ia64/hp-timing.c | 5 +- sysdeps/ia64/hp-timing.h | 5 +- sysdeps/ia64/htonl.S | 5 +- sysdeps/ia64/htons.S | 5 +- sysdeps/ia64/ieee754.h | 5 +- sysdeps/ia64/jmpbuf-unwind.h | 5 +- sysdeps/ia64/libc-tls.c | 5 +- sysdeps/ia64/machine-gmon.h | 5 +- sysdeps/ia64/memccpy.S | 5 +- sysdeps/ia64/memchr.S | 5 +- sysdeps/ia64/memcmp.S | 5 +- sysdeps/ia64/memcpy.S | 5 +- sysdeps/ia64/memmove.S | 5 +- sysdeps/ia64/memset.S | 5 +- sysdeps/ia64/memusage.h | 5 +- sysdeps/ia64/nptl/Makefile | 5 +- sysdeps/ia64/nptl/pthread_spin_lock.c | 5 +- sysdeps/ia64/nptl/pthread_spin_trylock.c | 5 +- sysdeps/ia64/nptl/pthread_spin_unlock.c | 5 +- sysdeps/ia64/nptl/pthreaddef.h | 5 +- sysdeps/ia64/nptl/tls.h | 5 +- sysdeps/ia64/sched_cpucount.c | 5 +- sysdeps/ia64/softpipe.h | 5 +- sysdeps/ia64/stackinfo.h | 5 +- sysdeps/ia64/strcat.c | 5 +- sysdeps/ia64/strchr.S | 5 +- sysdeps/ia64/strcmp.S | 5 +- sysdeps/ia64/strcpy.S | 5 +- sysdeps/ia64/strlen.S | 5 +- sysdeps/ia64/strncmp.S | 5 +- sysdeps/ia64/strncpy.S | 5 +- sysdeps/ia64/sysdep.h | 5 +- .../unix/sysv/linux/ia64/____longjmp_chk.S | 5 +- sysdeps/unix/sysv/linux/ia64/__longjmp.S | 5 +- .../unix/sysv/linux/ia64/__start_context.S | 5 +- sysdeps/unix/sysv/linux/ia64/bits/fcntl.h | 5 +- sysdeps/unix/sysv/linux/ia64/bits/ipc.h | 5 +- sysdeps/unix/sysv/linux/ia64/bits/mman.h | 5 +- sysdeps/unix/sysv/linux/ia64/bits/msq.h | 5 +- sysdeps/unix/sysv/linux/ia64/bits/sem.h | 5 +- sysdeps/unix/sysv/linux/ia64/bits/setjmp.h | 5 +- sysdeps/unix/sysv/linux/ia64/bits/shm.h | 5 +- sysdeps/unix/sysv/linux/ia64/bits/sigaction.h | 5 +- .../unix/sysv/linux/ia64/bits/sigcontext.h | 5 +- sysdeps/unix/sysv/linux/ia64/bits/siginfo.h | 5 +- sysdeps/unix/sysv/linux/ia64/bits/sigstack.h | 5 +- sysdeps/unix/sysv/linux/ia64/bits/stat.h | 5 +- sysdeps/unix/sysv/linux/ia64/brk.S | 5 +- .../sysv/linux/ia64/clock_getcpuclockid.c | 5 +- sysdeps/unix/sysv/linux/ia64/clone2.S | 5 +- sysdeps/unix/sysv/linux/ia64/dl-cache.h | 5 +- sysdeps/unix/sysv/linux/ia64/dl-static.c | 5 +- sysdeps/unix/sysv/linux/ia64/fork.S | 5 +- sysdeps/unix/sysv/linux/ia64/get_clockfreq.c | 5 +- sysdeps/unix/sysv/linux/ia64/getcontext.S | 5 +- sysdeps/unix/sysv/linux/ia64/getpagesize.c | 5 +- sysdeps/unix/sysv/linux/ia64/has_cpuclock.c | 5 +- sysdeps/unix/sysv/linux/ia64/ioperm.c | 5 +- sysdeps/unix/sysv/linux/ia64/kernel_stat.h | 5 +- sysdeps/unix/sysv/linux/ia64/ldconfig.h | 5 +- sysdeps/unix/sysv/linux/ia64/ldsodefs.h | 5 +- sysdeps/unix/sysv/linux/ia64/makecontext.c | 5 +- .../sysv/linux/ia64/nptl/__ia64_longjmp.S | 5 +- .../sysv/linux/ia64/nptl/__sigstack_longjmp.c | 5 +- .../sysv/linux/ia64/nptl/bits/pthreadtypes.h | 5 +- .../sysv/linux/ia64/nptl/bits/semaphore.h | 5 +- .../unix/sysv/linux/ia64/nptl/createthread.c | 5 +- sysdeps/unix/sysv/linux/ia64/nptl/dl-sysdep.h | 5 +- sysdeps/unix/sysv/linux/ia64/nptl/fork.c | 5 +- .../unix/sysv/linux/ia64/nptl/lowlevellock.h | 5 +- sysdeps/unix/sysv/linux/ia64/nptl/pt-vfork.S | 5 +- .../unix/sysv/linux/ia64/nptl/pthread_once.c | 5 +- .../unix/sysv/linux/ia64/nptl/sysdep-cancel.h | 5 +- .../sysv/linux/ia64/nptl/unwind_longjmp.c | 5 +- sysdeps/unix/sysv/linux/ia64/nptl/vfork.S | 5 +- sysdeps/unix/sysv/linux/ia64/pipe.S | 5 +- sysdeps/unix/sysv/linux/ia64/profil-counter.h | 5 +- sysdeps/unix/sysv/linux/ia64/readelflib.c | 5 +- sysdeps/unix/sysv/linux/ia64/register-dump.h | 5 +- sysdeps/unix/sysv/linux/ia64/setcontext.S | 5 +- sysdeps/unix/sysv/linux/ia64/setjmp.S | 5 +- sysdeps/unix/sysv/linux/ia64/sigaction.c | 5 +- sysdeps/unix/sysv/linux/ia64/sigcontextinfo.h | 5 +- sysdeps/unix/sysv/linux/ia64/sigpending.c | 5 +- sysdeps/unix/sysv/linux/ia64/sigprocmask.c | 5 +- sysdeps/unix/sysv/linux/ia64/swapcontext.c | 5 +- sysdeps/unix/sysv/linux/ia64/sys/io.h | 5 +- sysdeps/unix/sysv/linux/ia64/sys/procfs.h | 5 +- sysdeps/unix/sysv/linux/ia64/sys/ptrace.h | 5 +- sysdeps/unix/sysv/linux/ia64/sys/rse.h | 5 +- sysdeps/unix/sysv/linux/ia64/sys/ucontext.h | 5 +- sysdeps/unix/sysv/linux/ia64/sys/user.h | 5 +- sysdeps/unix/sysv/linux/ia64/syscall.S | 5 +- sysdeps/unix/sysv/linux/ia64/sysconf.c | 5 +- sysdeps/unix/sysv/linux/ia64/sysdep.S | 5 +- sysdeps/unix/sysv/linux/ia64/sysdep.h | 5 +- sysdeps/unix/sysv/linux/ia64/system.c | 5 +- sysdeps/unix/sysv/linux/ia64/ucontext_i.h | 5 +- sysdeps/unix/sysv/linux/ia64/umount.c | 5 +- sysdeps/unix/sysv/linux/ia64/vfork.S | 5 +- sysdeps/unix/sysv/linux/ia64/wordexp.c | 5 +- 145 files changed, 435 insertions(+), 432 deletions(-) diff --git a/ChangeLog.ia64 b/ChangeLog.ia64 index 4c9b9f136b..e212e10eec 100644 --- a/ChangeLog.ia64 +++ b/ChangeLog.ia64 @@ -1,3 +1,150 @@ +2012-04-22 Mike Frysinger + + * sysdeps/ia64/_mcount.S: Replace FSF snail mail address with URL. + * sysdeps/ia64/backtrace.c: Likewise. + * sysdeps/ia64/bits/atomic.h: Likewise. + * sysdeps/ia64/bits/byteswap.h: Likewise. + * sysdeps/ia64/bits/fenv.h: Likewise. + * sysdeps/ia64/bits/huge_vall.h: Likewise. + * sysdeps/ia64/bits/link.h: Likewise. + * sysdeps/ia64/bits/mathdef.h: Likewise. + * sysdeps/ia64/bits/xtitypes.h: Likewise. + * sysdeps/ia64/bzero.S: Likewise. + * sysdeps/ia64/dl-dtprocnum.h: Likewise. + * sysdeps/ia64/dl-fptr.h: Likewise. + * sysdeps/ia64/dl-lookupcfg.h: Likewise. + * sysdeps/ia64/dl-machine.h: Likewise. + * sysdeps/ia64/dl-sysdep.h: Likewise. + * sysdeps/ia64/dl-tls.h: Likewise. + * sysdeps/ia64/dl-trampoline.S: Likewise. + * sysdeps/ia64/elf/initfini.c: Likewise. + * sysdeps/ia64/elf/start.S: Likewise. + * sysdeps/ia64/fpu/bits/math-finite.h: Likewise. + * sysdeps/ia64/fpu/bits/mathinline.h: Likewise. + * sysdeps/ia64/fpu/fclrexcpt.c: Likewise. + * sysdeps/ia64/fpu/fedisblxcpt.c: Likewise. + * sysdeps/ia64/fpu/feenablxcpt.c: Likewise. + * sysdeps/ia64/fpu/fegetenv.c: Likewise. + * sysdeps/ia64/fpu/fegetexcept.c: Likewise. + * sysdeps/ia64/fpu/fegetround.c: Likewise. + * sysdeps/ia64/fpu/feholdexcpt.c: Likewise. + * sysdeps/ia64/fpu/fesetenv.c: Likewise. + * sysdeps/ia64/fpu/fesetround.c: Likewise. + * sysdeps/ia64/fpu/feupdateenv.c: Likewise. + * sysdeps/ia64/fpu/fgetexcptflg.c: Likewise. + * sysdeps/ia64/fpu/fraiseexcpt.c: Likewise. + * sysdeps/ia64/fpu/fsetexcptflg.c: Likewise. + * sysdeps/ia64/fpu/ftestexcept.c: Likewise. + * sysdeps/ia64/fpu/printf_fphex.c: Likewise. + * sysdeps/ia64/fpu/s_copysign.S: Likewise. + * sysdeps/ia64/fpu/s_finite.S: Likewise. + * sysdeps/ia64/fpu/s_fpclassify.S: Likewise. + * sysdeps/ia64/fpu/s_isinf.S: Likewise. + * sysdeps/ia64/fpu/s_isnan.S: Likewise. + * sysdeps/ia64/fpu/s_signbit.S: Likewise. + * sysdeps/ia64/gccframe.h: Likewise. + * sysdeps/ia64/hp-timing.c: Likewise. + * sysdeps/ia64/hp-timing.h: Likewise. + * sysdeps/ia64/htonl.S: Likewise. + * sysdeps/ia64/htons.S: Likewise. + * sysdeps/ia64/ieee754.h: Likewise. + * sysdeps/ia64/jmpbuf-unwind.h: Likewise. + * sysdeps/ia64/libc-tls.c: Likewise. + * sysdeps/ia64/machine-gmon.h: Likewise. + * sysdeps/ia64/memccpy.S: Likewise. + * sysdeps/ia64/memchr.S: Likewise. + * sysdeps/ia64/memcmp.S: Likewise. + * sysdeps/ia64/memcpy.S: Likewise. + * sysdeps/ia64/memmove.S: Likewise. + * sysdeps/ia64/memset.S: Likewise. + * sysdeps/ia64/memusage.h: Likewise. + * sysdeps/ia64/nptl/Makefile: Likewise. + * sysdeps/ia64/nptl/pthread_spin_lock.c: Likewise. + * sysdeps/ia64/nptl/pthread_spin_trylock.c: Likewise. + * sysdeps/ia64/nptl/pthread_spin_unlock.c: Likewise. + * sysdeps/ia64/nptl/pthreaddef.h: Likewise. + * sysdeps/ia64/nptl/tls.h: Likewise. + * sysdeps/ia64/sched_cpucount.c: Likewise. + * sysdeps/ia64/softpipe.h: Likewise. + * sysdeps/ia64/stackinfo.h: Likewise. + * sysdeps/ia64/strcat.c: Likewise. + * sysdeps/ia64/strchr.S: Likewise. + * sysdeps/ia64/strcmp.S: Likewise. + * sysdeps/ia64/strcpy.S: Likewise. + * sysdeps/ia64/strlen.S: Likewise. + * sysdeps/ia64/strncmp.S: Likewise. + * sysdeps/ia64/strncpy.S: Likewise. + * sysdeps/ia64/sysdep.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S: Likewise. + * sysdeps/unix/sysv/linux/ia64/__longjmp.S: Likewise. + * sysdeps/unix/sysv/linux/ia64/__start_context.S: Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/fcntl.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/ipc.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/mman.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/msq.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/sem.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/setjmp.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/shm.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/sigaction.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/siginfo.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/sigstack.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/stat.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/brk.S: Likewise. + * sysdeps/unix/sysv/linux/ia64/clock_getcpuclockid.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise. + * sysdeps/unix/sysv/linux/ia64/dl-cache.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/dl-static.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/fork.S: Likewise. + * sysdeps/unix/sysv/linux/ia64/get_clockfreq.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/getcontext.S: Likewise. + * sysdeps/unix/sysv/linux/ia64/getpagesize.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/has_cpuclock.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/ioperm.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/kernel_stat.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/ldconfig.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/ldsodefs.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/makecontext.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/__ia64_longjmp.S: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/__sigstack_longjmp.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/bits/pthreadtypes.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/bits/semaphore.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/createthread.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/dl-sysdep.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/fork.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/lowlevellock.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/pt-vfork.S: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/pthread_once.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/sysdep-cancel.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/unwind_longjmp.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/vfork.S: Likewise. + * sysdeps/unix/sysv/linux/ia64/pipe.S: Likewise. + * sysdeps/unix/sysv/linux/ia64/profil-counter.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/readelflib.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/register-dump.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/setcontext.S: Likewise. + * sysdeps/unix/sysv/linux/ia64/setjmp.S: Likewise. + * sysdeps/unix/sysv/linux/ia64/sigaction.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/sigcontextinfo.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/sigpending.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/sigprocmask.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/swapcontext.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/sys/io.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/sys/procfs.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/sys/ptrace.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/sys/rse.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/sys/ucontext.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/sys/user.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/syscall.S: Likewise. + * sysdeps/unix/sysv/linux/ia64/sysconf.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/sysdep.S: Likewise. + * sysdeps/unix/sysv/linux/ia64/sysdep.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/system.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/ucontext_i.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/umount.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/vfork.S: Likewise. + * sysdeps/unix/sysv/linux/ia64/wordexp.c: Likewise. + 2012-04-22 Mike Frysinger * sysdeps/ia64/fpu/e_acosf.S: Trim trailing whitespace. diff --git a/sysdeps/ia64/_mcount.S b/sysdeps/ia64/_mcount.S index 8720a9c104..1c7f445014 100644 --- a/sysdeps/ia64/_mcount.S +++ b/sysdeps/ia64/_mcount.S @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ /* Assembly stub to invoke _mcount(). Compiler generated code calls this stub before executing a function's prologue and without saving diff --git a/sysdeps/ia64/backtrace.c b/sysdeps/ia64/backtrace.c index d4ff291022..7c1f33ff0d 100644 --- a/sysdeps/ia64/backtrace.c +++ b/sysdeps/ia64/backtrace.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include #include diff --git a/sysdeps/ia64/bits/atomic.h b/sysdeps/ia64/bits/atomic.h index 1020c2f229..d719f0eaca 100644 --- a/sysdeps/ia64/bits/atomic.h +++ b/sysdeps/ia64/bits/atomic.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include #include diff --git a/sysdeps/ia64/bits/byteswap.h b/sysdeps/ia64/bits/byteswap.h index 29d0e37d12..db7824a42f 100644 --- a/sysdeps/ia64/bits/byteswap.h +++ b/sysdeps/ia64/bits/byteswap.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #if !defined _BYTESWAP_H && !defined _NETINET_IN_H && !defined _ENDIAN_H # error "Never use directly; include instead." diff --git a/sysdeps/ia64/bits/fenv.h b/sysdeps/ia64/bits/fenv.h index 32515f0796..0422a95d7e 100644 --- a/sysdeps/ia64/bits/fenv.h +++ b/sysdeps/ia64/bits/fenv.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #ifndef _FENV_H # error "Never use directly; include instead." diff --git a/sysdeps/ia64/bits/huge_vall.h b/sysdeps/ia64/bits/huge_vall.h index a1f583b34c..a043f88b00 100644 --- a/sysdeps/ia64/bits/huge_vall.h +++ b/sysdeps/ia64/bits/huge_vall.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #ifndef _MATH_H # error "Never use directly; include instead." diff --git a/sysdeps/ia64/bits/link.h b/sysdeps/ia64/bits/link.h index f522ab340b..834ec14705 100644 --- a/sysdeps/ia64/bits/link.h +++ b/sysdeps/ia64/bits/link.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #ifndef _LINK_H # error "Never include directly; use instead." diff --git a/sysdeps/ia64/bits/mathdef.h b/sysdeps/ia64/bits/mathdef.h index 3dc2860223..e7f629e945 100644 --- a/sysdeps/ia64/bits/mathdef.h +++ b/sysdeps/ia64/bits/mathdef.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #if !defined _MATH_H && !defined _COMPLEX_H # error "Never use directly; include instead" diff --git a/sysdeps/ia64/bits/xtitypes.h b/sysdeps/ia64/bits/xtitypes.h index 54c85ba901..4142f70912 100644 --- a/sysdeps/ia64/bits/xtitypes.h +++ b/sysdeps/ia64/bits/xtitypes.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #ifndef _STROPTS_H # error "Never include directly; use instead." diff --git a/sysdeps/ia64/bzero.S b/sysdeps/ia64/bzero.S index bcca41d5e9..84e5d5ce1d 100644 --- a/sysdeps/ia64/bzero.S +++ b/sysdeps/ia64/bzero.S @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ /* Return: dest diff --git a/sysdeps/ia64/dl-dtprocnum.h b/sysdeps/ia64/dl-dtprocnum.h index fc31589623..8c33f03bac 100644 --- a/sysdeps/ia64/dl-dtprocnum.h +++ b/sysdeps/ia64/dl-dtprocnum.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ /* Number of extra dynamic section entries for this architecture. By default there are none. */ diff --git a/sysdeps/ia64/dl-fptr.h b/sysdeps/ia64/dl-fptr.h index 43907b9bf7..58f77d73a8 100644 --- a/sysdeps/ia64/dl-fptr.h +++ b/sysdeps/ia64/dl-fptr.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #ifndef dl_ia64_fptr_h #define dl_ia64_fptr_h 1 diff --git a/sysdeps/ia64/dl-lookupcfg.h b/sysdeps/ia64/dl-lookupcfg.h index b50030ebd2..b22f4232d7 100644 --- a/sysdeps/ia64/dl-lookupcfg.h +++ b/sysdeps/ia64/dl-lookupcfg.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #define ELF_FUNCTION_PTR_IS_SPECIAL #define DL_UNMAP_IS_SPECIAL diff --git a/sysdeps/ia64/dl-machine.h b/sysdeps/ia64/dl-machine.h index 6053b3b786..1ec69d7591 100644 --- a/sysdeps/ia64/dl-machine.h +++ b/sysdeps/ia64/dl-machine.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #ifndef dl_machine_h #define dl_machine_h 1 diff --git a/sysdeps/ia64/dl-sysdep.h b/sysdeps/ia64/dl-sysdep.h index e4040efc4c..0ca8b4541a 100644 --- a/sysdeps/ia64/dl-sysdep.h +++ b/sysdeps/ia64/dl-sysdep.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include_next diff --git a/sysdeps/ia64/dl-tls.h b/sysdeps/ia64/dl-tls.h index 5e9a165d7a..9e7e7bc50d 100644 --- a/sysdeps/ia64/dl-tls.h +++ b/sysdeps/ia64/dl-tls.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ /* On IA-64 the __tls_get_addr function take the module ID and the diff --git a/sysdeps/ia64/dl-trampoline.S b/sysdeps/ia64/dl-trampoline.S index 1b31dc7c9c..6c26cbf1b3 100644 --- a/sysdeps/ia64/dl-trampoline.S +++ b/sysdeps/ia64/dl-trampoline.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include #undef ret diff --git a/sysdeps/ia64/elf/initfini.c b/sysdeps/ia64/elf/initfini.c index d0a65ece80..3cae895147 100644 --- a/sysdeps/ia64/elf/initfini.c +++ b/sysdeps/ia64/elf/initfini.c @@ -30,9 +30,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ /* This file is compiled into assembly code which is then munged by a sed script into two files: crti.s and crtn.s. diff --git a/sysdeps/ia64/elf/start.S b/sysdeps/ia64/elf/start.S index 1c41a6517d..badfea07a3 100644 --- a/sysdeps/ia64/elf/start.S +++ b/sysdeps/ia64/elf/start.S @@ -30,9 +30,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include diff --git a/sysdeps/ia64/fpu/bits/math-finite.h b/sysdeps/ia64/fpu/bits/math-finite.h index 8901b2dc4d..c6a30d309b 100644 --- a/sysdeps/ia64/fpu/bits/math-finite.h +++ b/sysdeps/ia64/fpu/bits/math-finite.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #ifndef _MATH_H # error "Never use directly; include instead." diff --git a/sysdeps/ia64/fpu/bits/mathinline.h b/sysdeps/ia64/fpu/bits/mathinline.h index cd90b06d3a..b6fd7dbc8a 100644 --- a/sysdeps/ia64/fpu/bits/mathinline.h +++ b/sysdeps/ia64/fpu/bits/mathinline.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #ifndef _MATH_H # error "Never use directly; include instead." diff --git a/sysdeps/ia64/fpu/fclrexcpt.c b/sysdeps/ia64/fpu/fclrexcpt.c index aa815fc789..84f83277b9 100644 --- a/sysdeps/ia64/fpu/fclrexcpt.c +++ b/sysdeps/ia64/fpu/fclrexcpt.c @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include diff --git a/sysdeps/ia64/fpu/fedisblxcpt.c b/sysdeps/ia64/fpu/fedisblxcpt.c index 9e809a67df..cacb4b58d8 100644 --- a/sysdeps/ia64/fpu/fedisblxcpt.c +++ b/sysdeps/ia64/fpu/fedisblxcpt.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include diff --git a/sysdeps/ia64/fpu/feenablxcpt.c b/sysdeps/ia64/fpu/feenablxcpt.c index 4775395c72..4b06c426b3 100644 --- a/sysdeps/ia64/fpu/feenablxcpt.c +++ b/sysdeps/ia64/fpu/feenablxcpt.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include diff --git a/sysdeps/ia64/fpu/fegetenv.c b/sysdeps/ia64/fpu/fegetenv.c index e240f75e43..f73039bb66 100644 --- a/sysdeps/ia64/fpu/fegetenv.c +++ b/sysdeps/ia64/fpu/fegetenv.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include diff --git a/sysdeps/ia64/fpu/fegetexcept.c b/sysdeps/ia64/fpu/fegetexcept.c index 243dc535f8..6a1e5c7fc1 100644 --- a/sysdeps/ia64/fpu/fegetexcept.c +++ b/sysdeps/ia64/fpu/fegetexcept.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include diff --git a/sysdeps/ia64/fpu/fegetround.c b/sysdeps/ia64/fpu/fegetround.c index dca98e7b7a..e672f61922 100644 --- a/sysdeps/ia64/fpu/fegetround.c +++ b/sysdeps/ia64/fpu/fegetround.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include diff --git a/sysdeps/ia64/fpu/feholdexcpt.c b/sysdeps/ia64/fpu/feholdexcpt.c index e50fbfada5..813cae6652 100644 --- a/sysdeps/ia64/fpu/feholdexcpt.c +++ b/sysdeps/ia64/fpu/feholdexcpt.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include diff --git a/sysdeps/ia64/fpu/fesetenv.c b/sysdeps/ia64/fpu/fesetenv.c index 4c5c2edbbf..4520bfdae5 100644 --- a/sysdeps/ia64/fpu/fesetenv.c +++ b/sysdeps/ia64/fpu/fesetenv.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include diff --git a/sysdeps/ia64/fpu/fesetround.c b/sysdeps/ia64/fpu/fesetround.c index 13801c848b..b8a7ffca1e 100644 --- a/sysdeps/ia64/fpu/fesetround.c +++ b/sysdeps/ia64/fpu/fesetround.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include diff --git a/sysdeps/ia64/fpu/feupdateenv.c b/sysdeps/ia64/fpu/feupdateenv.c index f961fdca38..60320ad235 100644 --- a/sysdeps/ia64/fpu/feupdateenv.c +++ b/sysdeps/ia64/fpu/feupdateenv.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include diff --git a/sysdeps/ia64/fpu/fgetexcptflg.c b/sysdeps/ia64/fpu/fgetexcptflg.c index 13c84ed258..a4430467b0 100644 --- a/sysdeps/ia64/fpu/fgetexcptflg.c +++ b/sysdeps/ia64/fpu/fgetexcptflg.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include diff --git a/sysdeps/ia64/fpu/fraiseexcpt.c b/sysdeps/ia64/fpu/fraiseexcpt.c index 12b29ee5a6..0a41320532 100644 --- a/sysdeps/ia64/fpu/fraiseexcpt.c +++ b/sysdeps/ia64/fpu/fraiseexcpt.c @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include #include diff --git a/sysdeps/ia64/fpu/fsetexcptflg.c b/sysdeps/ia64/fpu/fsetexcptflg.c index b3994827fa..8591219faa 100644 --- a/sysdeps/ia64/fpu/fsetexcptflg.c +++ b/sysdeps/ia64/fpu/fsetexcptflg.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include diff --git a/sysdeps/ia64/fpu/ftestexcept.c b/sysdeps/ia64/fpu/ftestexcept.c index 0d8190b46e..d26da0e313 100644 --- a/sysdeps/ia64/fpu/ftestexcept.c +++ b/sysdeps/ia64/fpu/ftestexcept.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include diff --git a/sysdeps/ia64/fpu/printf_fphex.c b/sysdeps/ia64/fpu/printf_fphex.c index 5def1905d8..231b69d6e3 100644 --- a/sysdeps/ia64/fpu/printf_fphex.c +++ b/sysdeps/ia64/fpu/printf_fphex.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #ifndef LONG_DOUBLE_DENORM_BIAS # define LONG_DOUBLE_DENORM_BIAS (IEEE854_LONG_DOUBLE_BIAS - 1) diff --git a/sysdeps/ia64/fpu/s_copysign.S b/sysdeps/ia64/fpu/s_copysign.S index 0903565ff3..dd912b4b95 100644 --- a/sysdeps/ia64/fpu/s_copysign.S +++ b/sysdeps/ia64/fpu/s_copysign.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include #undef ret diff --git a/sysdeps/ia64/fpu/s_finite.S b/sysdeps/ia64/fpu/s_finite.S index 664f815426..00cf788258 100644 --- a/sysdeps/ia64/fpu/s_finite.S +++ b/sysdeps/ia64/fpu/s_finite.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include #undef ret diff --git a/sysdeps/ia64/fpu/s_fpclassify.S b/sysdeps/ia64/fpu/s_fpclassify.S index eeab32d6c0..bdc982fee0 100644 --- a/sysdeps/ia64/fpu/s_fpclassify.S +++ b/sysdeps/ia64/fpu/s_fpclassify.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include #undef ret diff --git a/sysdeps/ia64/fpu/s_isinf.S b/sysdeps/ia64/fpu/s_isinf.S index e435edf110..95ebc1a49d 100644 --- a/sysdeps/ia64/fpu/s_isinf.S +++ b/sysdeps/ia64/fpu/s_isinf.S @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ /* * isinf(x) returns 1 if x is inf, -1 for x == -inf, else 0; diff --git a/sysdeps/ia64/fpu/s_isnan.S b/sysdeps/ia64/fpu/s_isnan.S index 83fd54f356..79589e5c22 100644 --- a/sysdeps/ia64/fpu/s_isnan.S +++ b/sysdeps/ia64/fpu/s_isnan.S @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ /* * isnan(x) returns 1 is x is nan, else 0; diff --git a/sysdeps/ia64/fpu/s_signbit.S b/sysdeps/ia64/fpu/s_signbit.S index a6ed929fa2..00fdcfd9c8 100644 --- a/sysdeps/ia64/fpu/s_signbit.S +++ b/sysdeps/ia64/fpu/s_signbit.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include #undef ret diff --git a/sysdeps/ia64/gccframe.h b/sysdeps/ia64/gccframe.h index 745b50cfa4..9288f5cbf2 100644 --- a/sysdeps/ia64/gccframe.h +++ b/sysdeps/ia64/gccframe.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ /* This must match what's in frame.h in gcc. */ diff --git a/sysdeps/ia64/hp-timing.c b/sysdeps/ia64/hp-timing.c index ae8680f9a7..1782c43a02 100644 --- a/sysdeps/ia64/hp-timing.c +++ b/sysdeps/ia64/hp-timing.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include diff --git a/sysdeps/ia64/hp-timing.h b/sysdeps/ia64/hp-timing.h index 3c2166ee56..2ee6237e8c 100644 --- a/sysdeps/ia64/hp-timing.h +++ b/sysdeps/ia64/hp-timing.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #ifndef _HP_TIMING_H #define _HP_TIMING_H 1 diff --git a/sysdeps/ia64/htonl.S b/sysdeps/ia64/htonl.S index 92c3cae4d1..b21d881394 100644 --- a/sysdeps/ia64/htonl.S +++ b/sysdeps/ia64/htonl.S @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include diff --git a/sysdeps/ia64/htons.S b/sysdeps/ia64/htons.S index 317ab6179b..965246e805 100644 --- a/sysdeps/ia64/htons.S +++ b/sysdeps/ia64/htons.S @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include diff --git a/sysdeps/ia64/ieee754.h b/sysdeps/ia64/ieee754.h index 44629430f8..f21d20f0ca 100644 --- a/sysdeps/ia64/ieee754.h +++ b/sysdeps/ia64/ieee754.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #ifndef _IEEE754_H diff --git a/sysdeps/ia64/jmpbuf-unwind.h b/sysdeps/ia64/jmpbuf-unwind.h index c53447223b..1a8ff804aa 100644 --- a/sysdeps/ia64/jmpbuf-unwind.h +++ b/sysdeps/ia64/jmpbuf-unwind.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include #include diff --git a/sysdeps/ia64/libc-tls.c b/sysdeps/ia64/libc-tls.c index 9751284008..e898b823c7 100644 --- a/sysdeps/ia64/libc-tls.c +++ b/sysdeps/ia64/libc-tls.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include diff --git a/sysdeps/ia64/machine-gmon.h b/sysdeps/ia64/machine-gmon.h index b8d0b45596..fb161a3143 100644 --- a/sysdeps/ia64/machine-gmon.h +++ b/sysdeps/ia64/machine-gmon.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #define _MCOUNT_DECL(from, self) \ void __mcount (u_long from, u_long self) diff --git a/sysdeps/ia64/memccpy.S b/sysdeps/ia64/memccpy.S index dd638d43c8..aef2780953 100644 --- a/sysdeps/ia64/memccpy.S +++ b/sysdeps/ia64/memccpy.S @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ /* Return: a pointer to the next byte after char in dest or NULL diff --git a/sysdeps/ia64/memchr.S b/sysdeps/ia64/memchr.S index 355effe94b..6836571599 100644 --- a/sysdeps/ia64/memchr.S +++ b/sysdeps/ia64/memchr.S @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ /* Return: the address of the first occurence of chr in str or NULL diff --git a/sysdeps/ia64/memcmp.S b/sysdeps/ia64/memcmp.S index fcc66d06a1..ad7d4fb9e9 100644 --- a/sysdeps/ia64/memcmp.S +++ b/sysdeps/ia64/memcmp.S @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ /* Return: the result of the comparison diff --git a/sysdeps/ia64/memcpy.S b/sysdeps/ia64/memcpy.S index a2aeea00fd..d10190b1fc 100644 --- a/sysdeps/ia64/memcpy.S +++ b/sysdeps/ia64/memcpy.S @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ /* Return: dest diff --git a/sysdeps/ia64/memmove.S b/sysdeps/ia64/memmove.S index 7b8c86b324..be29a15f31 100644 --- a/sysdeps/ia64/memmove.S +++ b/sysdeps/ia64/memmove.S @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ /* Return: dest diff --git a/sysdeps/ia64/memset.S b/sysdeps/ia64/memset.S index 84d8f0a191..afd39010a1 100644 --- a/sysdeps/ia64/memset.S +++ b/sysdeps/ia64/memset.S @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ /* Return: dest diff --git a/sysdeps/ia64/memusage.h b/sysdeps/ia64/memusage.h index 5f395b88d6..a7b1d8acd1 100644 --- a/sysdeps/ia64/memusage.h +++ b/sysdeps/ia64/memusage.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include diff --git a/sysdeps/ia64/nptl/Makefile b/sysdeps/ia64/nptl/Makefile index 3229d3f16d..6cbd8d3c9a 100644 --- a/sysdeps/ia64/nptl/Makefile +++ b/sysdeps/ia64/nptl/Makefile @@ -12,9 +12,8 @@ # 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. +# License along with the GNU C Library; if not, see +# . ifeq ($(subdir),csu) gen-as-const-headers += tcb-offsets.sym diff --git a/sysdeps/ia64/nptl/pthread_spin_lock.c b/sysdeps/ia64/nptl/pthread_spin_lock.c index 7d25af7c4b..42b37882f5 100644 --- a/sysdeps/ia64/nptl/pthread_spin_lock.c +++ b/sysdeps/ia64/nptl/pthread_spin_lock.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include "pthreadP.h" diff --git a/sysdeps/ia64/nptl/pthread_spin_trylock.c b/sysdeps/ia64/nptl/pthread_spin_trylock.c index 0fd8b99b7a..9efd3b586b 100644 --- a/sysdeps/ia64/nptl/pthread_spin_trylock.c +++ b/sysdeps/ia64/nptl/pthread_spin_trylock.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include #include "pthreadP.h" diff --git a/sysdeps/ia64/nptl/pthread_spin_unlock.c b/sysdeps/ia64/nptl/pthread_spin_unlock.c index 50d9c5f6a8..e5a7d06600 100644 --- a/sysdeps/ia64/nptl/pthread_spin_unlock.c +++ b/sysdeps/ia64/nptl/pthread_spin_unlock.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include "pthreadP.h" diff --git a/sysdeps/ia64/nptl/pthreaddef.h b/sysdeps/ia64/nptl/pthreaddef.h index f2539e2905..b2e8d0a369 100644 --- a/sysdeps/ia64/nptl/pthreaddef.h +++ b/sysdeps/ia64/nptl/pthreaddef.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ /* Default stack size. */ #define ARCH_STACK_DEFAULT_SIZE (32 * 1024 * 1024) diff --git a/sysdeps/ia64/nptl/tls.h b/sysdeps/ia64/nptl/tls.h index c2a092663b..77574e55db 100644 --- a/sysdeps/ia64/nptl/tls.h +++ b/sysdeps/ia64/nptl/tls.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #ifndef _TLS_H #define _TLS_H 1 diff --git a/sysdeps/ia64/sched_cpucount.c b/sysdeps/ia64/sched_cpucount.c index ff9d8cf2a8..472a22760d 100644 --- a/sysdeps/ia64/sched_cpucount.c +++ b/sysdeps/ia64/sched_cpucount.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #define POPCNT(l) __builtin_popcountl (l) diff --git a/sysdeps/ia64/softpipe.h b/sysdeps/ia64/softpipe.h index d71af735eb..a9a9dc679a 100644 --- a/sysdeps/ia64/softpipe.h +++ b/sysdeps/ia64/softpipe.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ /* The latency of a memory load assumed by the assembly implementation of the mem and str functions. Since we don't have any clue about diff --git a/sysdeps/ia64/stackinfo.h b/sysdeps/ia64/stackinfo.h index a7446e665d..94570eb931 100644 --- a/sysdeps/ia64/stackinfo.h +++ b/sysdeps/ia64/stackinfo.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ /* This file contains a bit of information about the stack allocation of the processor. */ diff --git a/sysdeps/ia64/strcat.c b/sysdeps/ia64/strcat.c index 8633aa07b9..53cd4d19ca 100644 --- a/sysdeps/ia64/strcat.c +++ b/sysdeps/ia64/strcat.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include diff --git a/sysdeps/ia64/strchr.S b/sysdeps/ia64/strchr.S index fc55ad1871..f80f131167 100644 --- a/sysdeps/ia64/strchr.S +++ b/sysdeps/ia64/strchr.S @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ /* Return: the address of the first occurence of chr in str or NULL diff --git a/sysdeps/ia64/strcmp.S b/sysdeps/ia64/strcmp.S index 15bfeb4a7f..c27b6c229b 100644 --- a/sysdeps/ia64/strcmp.S +++ b/sysdeps/ia64/strcmp.S @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ /* Return: the result of the comparison diff --git a/sysdeps/ia64/strcpy.S b/sysdeps/ia64/strcpy.S index 5001f831c3..842f06bf7d 100644 --- a/sysdeps/ia64/strcpy.S +++ b/sysdeps/ia64/strcpy.S @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ /* Return: dest diff --git a/sysdeps/ia64/strlen.S b/sysdeps/ia64/strlen.S index ad6a7fbacc..64f8d9d739 100644 --- a/sysdeps/ia64/strlen.S +++ b/sysdeps/ia64/strlen.S @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ /* Return: the length of the input string diff --git a/sysdeps/ia64/strncmp.S b/sysdeps/ia64/strncmp.S index faa0d10d21..014937159f 100644 --- a/sysdeps/ia64/strncmp.S +++ b/sysdeps/ia64/strncmp.S @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ /* Return: the result of the comparison diff --git a/sysdeps/ia64/strncpy.S b/sysdeps/ia64/strncpy.S index 6706ab711b..89b56c6ecd 100644 --- a/sysdeps/ia64/strncpy.S +++ b/sysdeps/ia64/strncpy.S @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ /* Return: dest diff --git a/sysdeps/ia64/sysdep.h b/sysdeps/ia64/sysdep.h index 83d30a49bf..a35ec959bb 100644 --- a/sysdeps/ia64/sysdep.h +++ b/sysdeps/ia64/sysdep.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S b/sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S index fa87f67ebc..75e6951370 100644 --- a/sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S +++ b/sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ .section .rodata.str1.8,"aMS",@progbits,1 .align 8 diff --git a/sysdeps/unix/sysv/linux/ia64/__longjmp.S b/sysdeps/unix/sysv/linux/ia64/__longjmp.S index 2e74904385..c5244194b5 100644 --- a/sysdeps/unix/sysv/linux/ia64/__longjmp.S +++ b/sysdeps/unix/sysv/linux/ia64/__longjmp.S @@ -12,9 +12,8 @@ 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. + License along with the GNU C Library; if not, see + . Note that __sigsetjmp() did NOT flush the register stack. Instead, we do it here since __longjmp() is usually much less frequently diff --git a/sysdeps/unix/sysv/linux/ia64/__start_context.S b/sysdeps/unix/sysv/linux/ia64/__start_context.S index 519bd252b1..6c9afc1aff 100644 --- a/sysdeps/unix/sysv/linux/ia64/__start_context.S +++ b/sysdeps/unix/sysv/linux/ia64/__start_context.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h b/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h index 72f4b6ceab..51965b7108 100644 --- a/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #ifndef _FCNTL_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/ia64/bits/ipc.h b/sysdeps/unix/sysv/linux/ia64/bits/ipc.h index 858c332f1e..eb014d7b97 100644 --- a/sysdeps/unix/sysv/linux/ia64/bits/ipc.h +++ b/sysdeps/unix/sysv/linux/ia64/bits/ipc.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #ifndef _SYS_IPC_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/ia64/bits/mman.h b/sysdeps/unix/sysv/linux/ia64/bits/mman.h index 8b1398907f..7afb2e9f5f 100644 --- a/sysdeps/unix/sysv/linux/ia64/bits/mman.h +++ b/sysdeps/unix/sysv/linux/ia64/bits/mman.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #ifndef _SYS_MMAN_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/ia64/bits/msq.h b/sysdeps/unix/sysv/linux/ia64/bits/msq.h index cd268eea30..2dea986270 100644 --- a/sysdeps/unix/sysv/linux/ia64/bits/msq.h +++ b/sysdeps/unix/sysv/linux/ia64/bits/msq.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #ifndef _SYS_MSG_H #error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/ia64/bits/sem.h b/sysdeps/unix/sysv/linux/ia64/bits/sem.h index 449f1ecc45..aa56e155d8 100644 --- a/sysdeps/unix/sysv/linux/ia64/bits/sem.h +++ b/sysdeps/unix/sysv/linux/ia64/bits/sem.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #ifndef _SYS_SEM_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/ia64/bits/setjmp.h b/sysdeps/unix/sysv/linux/ia64/bits/setjmp.h index 8bd675e4ec..4ebc5565d1 100644 --- a/sysdeps/unix/sysv/linux/ia64/bits/setjmp.h +++ b/sysdeps/unix/sysv/linux/ia64/bits/setjmp.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #ifndef _BITS_SETJMP_H #define _BITS_SETJMP_H 1 diff --git a/sysdeps/unix/sysv/linux/ia64/bits/shm.h b/sysdeps/unix/sysv/linux/ia64/bits/shm.h index 71b85295c5..a8783e23ee 100644 --- a/sysdeps/unix/sysv/linux/ia64/bits/shm.h +++ b/sysdeps/unix/sysv/linux/ia64/bits/shm.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #ifndef _SYS_SHM_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/ia64/bits/sigaction.h b/sysdeps/unix/sysv/linux/ia64/bits/sigaction.h index b557eaa3e0..ee589f6f41 100644 --- a/sysdeps/unix/sysv/linux/ia64/bits/sigaction.h +++ b/sysdeps/unix/sysv/linux/ia64/bits/sigaction.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #ifndef _SIGNAL_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h b/sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h index 34bc3c26ab..18e347748c 100644 --- a/sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h +++ b/sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h b/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h index fea5af7fbf..40f486209c 100644 --- a/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h +++ b/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #if !defined _SIGNAL_H && !defined __need_siginfo_t \ && !defined __need_sigevent_t diff --git a/sysdeps/unix/sysv/linux/ia64/bits/sigstack.h b/sysdeps/unix/sysv/linux/ia64/bits/sigstack.h index c9c9d2fedb..f9662e452b 100644 --- a/sysdeps/unix/sysv/linux/ia64/bits/sigstack.h +++ b/sysdeps/unix/sysv/linux/ia64/bits/sigstack.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #ifndef _SIGNAL_H # error "Never include this file directly. Use instead" diff --git a/sysdeps/unix/sysv/linux/ia64/bits/stat.h b/sysdeps/unix/sysv/linux/ia64/bits/stat.h index 86acd27ae2..63c202be07 100644 --- a/sysdeps/unix/sysv/linux/ia64/bits/stat.h +++ b/sysdeps/unix/sysv/linux/ia64/bits/stat.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include directly; use instead." diff --git a/sysdeps/unix/sysv/linux/ia64/brk.S b/sysdeps/unix/sysv/linux/ia64/brk.S index 0e4114a331..0e011ff5a3 100644 --- a/sysdeps/unix/sysv/linux/ia64/brk.S +++ b/sysdeps/unix/sysv/linux/ia64/brk.S @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/ia64/clock_getcpuclockid.c b/sysdeps/unix/sysv/linux/ia64/clock_getcpuclockid.c index 2f39851535..1289d1f740 100644 --- a/sysdeps/unix/sysv/linux/ia64/clock_getcpuclockid.c +++ b/sysdeps/unix/sysv/linux/ia64/clock_getcpuclockid.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/ia64/clone2.S b/sysdeps/unix/sysv/linux/ia64/clone2.S index d38eb201ad..d97c927e92 100644 --- a/sysdeps/unix/sysv/linux/ia64/clone2.S +++ b/sysdeps/unix/sysv/linux/ia64/clone2.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/ia64/dl-cache.h b/sysdeps/unix/sysv/linux/ia64/dl-cache.h index b8e2790589..9d1bd6ac77 100644 --- a/sysdeps/unix/sysv/linux/ia64/dl-cache.h +++ b/sysdeps/unix/sysv/linux/ia64/dl-cache.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #define _DL_CACHE_DEFAULT_ID 0x203 diff --git a/sysdeps/unix/sysv/linux/ia64/dl-static.c b/sysdeps/unix/sysv/linux/ia64/dl-static.c index 4efc077032..f7fa57eedf 100644 --- a/sysdeps/unix/sysv/linux/ia64/dl-static.c +++ b/sysdeps/unix/sysv/linux/ia64/dl-static.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/ia64/fork.S b/sysdeps/unix/sysv/linux/ia64/fork.S index 0a57ab0d13..7949a7b619 100644 --- a/sysdeps/unix/sysv/linux/ia64/fork.S +++ b/sysdeps/unix/sysv/linux/ia64/fork.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/ia64/get_clockfreq.c b/sysdeps/unix/sysv/linux/ia64/get_clockfreq.c index 48abfc13f4..4c1777a516 100644 --- a/sysdeps/unix/sysv/linux/ia64/get_clockfreq.c +++ b/sysdeps/unix/sysv/linux/ia64/get_clockfreq.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/ia64/getcontext.S b/sysdeps/unix/sysv/linux/ia64/getcontext.S index 4e18bace2d..a4a403fc6d 100644 --- a/sysdeps/unix/sysv/linux/ia64/getcontext.S +++ b/sysdeps/unix/sysv/linux/ia64/getcontext.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/ia64/getpagesize.c b/sysdeps/unix/sysv/linux/ia64/getpagesize.c index 1155dfdad1..ade9123a3a 100644 --- a/sysdeps/unix/sysv/linux/ia64/getpagesize.c +++ b/sysdeps/unix/sysv/linux/ia64/getpagesize.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/ia64/has_cpuclock.c b/sysdeps/unix/sysv/linux/ia64/has_cpuclock.c index 39511cd2c5..7889cdbe13 100644 --- a/sysdeps/unix/sysv/linux/ia64/has_cpuclock.c +++ b/sysdeps/unix/sysv/linux/ia64/has_cpuclock.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/ia64/ioperm.c b/sysdeps/unix/sysv/linux/ia64/ioperm.c index 89a0a36d3d..9753d56944 100644 --- a/sysdeps/unix/sysv/linux/ia64/ioperm.c +++ b/sysdeps/unix/sysv/linux/ia64/ioperm.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ /* I/O access is restricted to ISA port space (ports 0..65535). Modern devices hopefully are sane enough not to put any performance diff --git a/sysdeps/unix/sysv/linux/ia64/kernel_stat.h b/sysdeps/unix/sysv/linux/ia64/kernel_stat.h index ef11dc94d4..2f979f2d63 100644 --- a/sysdeps/unix/sysv/linux/ia64/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/ia64/kernel_stat.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #define STAT_IS_KERNEL_STAT 1 #define XSTAT_IS_XSTAT64 1 diff --git a/sysdeps/unix/sysv/linux/ia64/ldconfig.h b/sysdeps/unix/sysv/linux/ia64/ldconfig.h index af194898ba..dce65b4ffc 100644 --- a/sysdeps/unix/sysv/linux/ia64/ldconfig.h +++ b/sysdeps/unix/sysv/linux/ia64/ldconfig.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/ia64/ldsodefs.h b/sysdeps/unix/sysv/linux/ia64/ldsodefs.h index 31af62491e..729aa54813 100644 --- a/sysdeps/unix/sysv/linux/ia64/ldsodefs.h +++ b/sysdeps/unix/sysv/linux/ia64/ldsodefs.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #ifndef _LDSODEFS_H diff --git a/sysdeps/unix/sysv/linux/ia64/makecontext.c b/sysdeps/unix/sysv/linux/ia64/makecontext.c index d7a2a9f15d..af29bc3d65 100644 --- a/sysdeps/unix/sysv/linux/ia64/makecontext.c +++ b/sysdeps/unix/sysv/linux/ia64/makecontext.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/__ia64_longjmp.S b/sysdeps/unix/sysv/linux/ia64/nptl/__ia64_longjmp.S index a1120d4d72..7f3648d98b 100644 --- a/sysdeps/unix/sysv/linux/ia64/nptl/__ia64_longjmp.S +++ b/sysdeps/unix/sysv/linux/ia64/nptl/__ia64_longjmp.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/__sigstack_longjmp.c b/sysdeps/unix/sysv/linux/ia64/nptl/__sigstack_longjmp.c index 8f552eaad4..b7b1558652 100644 --- a/sysdeps/unix/sysv/linux/ia64/nptl/__sigstack_longjmp.c +++ b/sysdeps/unix/sysv/linux/ia64/nptl/__sigstack_longjmp.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ /* The public __longjmp() implementation is limited to jumping within the same stack. That is, in general it is not possible to use this diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/ia64/nptl/bits/pthreadtypes.h index 330717f079..4f87f8b61e 100644 --- a/sysdeps/unix/sysv/linux/ia64/nptl/bits/pthreadtypes.h +++ b/sysdeps/unix/sysv/linux/ia64/nptl/bits/pthreadtypes.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #ifndef _BITS_PTHREADTYPES_H #define _BITS_PTHREADTYPES_H 1 diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/bits/semaphore.h b/sysdeps/unix/sysv/linux/ia64/nptl/bits/semaphore.h index 0684aebe24..3a49ee4e3f 100644 --- a/sysdeps/unix/sysv/linux/ia64/nptl/bits/semaphore.h +++ b/sysdeps/unix/sysv/linux/ia64/nptl/bits/semaphore.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #ifndef _SEMAPHORE_H # error "Never use directly; include instead." diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/createthread.c b/sysdeps/unix/sysv/linux/ia64/nptl/createthread.c index cd5f8137d5..7d19235c47 100644 --- a/sysdeps/unix/sysv/linux/ia64/nptl/createthread.c +++ b/sysdeps/unix/sysv/linux/ia64/nptl/createthread.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ /* Value passed to 'clone' for initialization of the thread register. */ #define TLS_VALUE ((char *) pd + TLS_PRE_TCB_SIZE) diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/dl-sysdep.h b/sysdeps/unix/sysv/linux/ia64/nptl/dl-sysdep.h index 5c16bd7aea..e30e33d2bc 100644 --- a/sysdeps/unix/sysv/linux/ia64/nptl/dl-sysdep.h +++ b/sysdeps/unix/sysv/linux/ia64/nptl/dl-sysdep.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #ifndef _DL_SYSDEP_H #define _DL_SYSDEP_H 1 diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/fork.c b/sysdeps/unix/sysv/linux/ia64/nptl/fork.c index 1502310f1d..6770dd24c9 100644 --- a/sysdeps/unix/sysv/linux/ia64/nptl/fork.c +++ b/sysdeps/unix/sysv/linux/ia64/nptl/fork.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/ia64/nptl/lowlevellock.h index b419c9a5e1..24ed47e226 100644 --- a/sysdeps/unix/sysv/linux/ia64/nptl/lowlevellock.h +++ b/sysdeps/unix/sysv/linux/ia64/nptl/lowlevellock.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #ifndef _LOWLEVELLOCK_H #define _LOWLEVELLOCK_H 1 diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/pt-vfork.S b/sysdeps/unix/sysv/linux/ia64/nptl/pt-vfork.S index a285280038..1e82b2322d 100644 --- a/sysdeps/unix/sysv/linux/ia64/nptl/pt-vfork.S +++ b/sysdeps/unix/sysv/linux/ia64/nptl/pt-vfork.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/pthread_once.c b/sysdeps/unix/sysv/linux/ia64/nptl/pthread_once.c index 22e2dd3c0c..1f22a8b9ec 100644 --- a/sysdeps/unix/sysv/linux/ia64/nptl/pthread_once.c +++ b/sysdeps/unix/sysv/linux/ia64/nptl/pthread_once.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include "pthreadP.h" #include diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/ia64/nptl/sysdep-cancel.h index 8687ba46ab..b54408812e 100644 --- a/sysdeps/unix/sysv/linux/ia64/nptl/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/ia64/nptl/sysdep-cancel.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/unwind_longjmp.c b/sysdeps/unix/sysv/linux/ia64/nptl/unwind_longjmp.c index 7976ff8f15..5582fcd947 100644 --- a/sysdeps/unix/sysv/linux/ia64/nptl/unwind_longjmp.c +++ b/sysdeps/unix/sysv/linux/ia64/nptl/unwind_longjmp.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/vfork.S b/sysdeps/unix/sysv/linux/ia64/nptl/vfork.S index 3bd721f14e..a79e2de705 100644 --- a/sysdeps/unix/sysv/linux/ia64/nptl/vfork.S +++ b/sysdeps/unix/sysv/linux/ia64/nptl/vfork.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/ia64/pipe.S b/sysdeps/unix/sysv/linux/ia64/pipe.S index 60624df3cb..6bcc6ffc67 100644 --- a/sysdeps/unix/sysv/linux/ia64/pipe.S +++ b/sysdeps/unix/sysv/linux/ia64/pipe.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ /* __pipe is a special syscall since it returns two values. */ diff --git a/sysdeps/unix/sysv/linux/ia64/profil-counter.h b/sysdeps/unix/sysv/linux/ia64/profil-counter.h index bc9a8433f1..f634ccc846 100644 --- a/sysdeps/unix/sysv/linux/ia64/profil-counter.h +++ b/sysdeps/unix/sysv/linux/ia64/profil-counter.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ /* In many Unix systems signal handlers are called like this and the interrupted PC is easily findable in the `struct sigcontext'. */ diff --git a/sysdeps/unix/sysv/linux/ia64/readelflib.c b/sysdeps/unix/sysv/linux/ia64/readelflib.c index 7a10d23c90..e286c3c80e 100644 --- a/sysdeps/unix/sysv/linux/ia64/readelflib.c +++ b/sysdeps/unix/sysv/linux/ia64/readelflib.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ int process_elf32_file (const char *file_name, const char *lib, int *flag, diff --git a/sysdeps/unix/sysv/linux/ia64/register-dump.h b/sysdeps/unix/sysv/linux/ia64/register-dump.h index dad3451b1a..42b99c3bf5 100644 --- a/sysdeps/unix/sysv/linux/ia64/register-dump.h +++ b/sysdeps/unix/sysv/linux/ia64/register-dump.h @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/ia64/setcontext.S b/sysdeps/unix/sysv/linux/ia64/setcontext.S index ef0a93c0c0..14091fefa8 100644 --- a/sysdeps/unix/sysv/linux/ia64/setcontext.S +++ b/sysdeps/unix/sysv/linux/ia64/setcontext.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/ia64/setjmp.S b/sysdeps/unix/sysv/linux/ia64/setjmp.S index 53f80d203e..95e8cc8093 100644 --- a/sysdeps/unix/sysv/linux/ia64/setjmp.S +++ b/sysdeps/unix/sysv/linux/ia64/setjmp.S @@ -13,9 +13,8 @@ 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. + License along with the GNU C Library; if not, see + . The layout of the jmp_buf is as follows. This is subject to change and user-code should never depend on the particular layout of diff --git a/sysdeps/unix/sysv/linux/ia64/sigaction.c b/sysdeps/unix/sysv/linux/ia64/sigaction.c index fdbc93f0ed..bb0d53d54c 100644 --- a/sysdeps/unix/sysv/linux/ia64/sigaction.c +++ b/sysdeps/unix/sysv/linux/ia64/sigaction.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ /* Linux/ia64 only has rt signals, thus we do not even want to try falling back to the old style signals as the default Linux handler does. */ diff --git a/sysdeps/unix/sysv/linux/ia64/sigcontextinfo.h b/sysdeps/unix/sysv/linux/ia64/sigcontextinfo.h index 51c11e6b46..6771fa24b4 100644 --- a/sysdeps/unix/sysv/linux/ia64/sigcontextinfo.h +++ b/sysdeps/unix/sysv/linux/ia64/sigcontextinfo.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #define SIGCONTEXT siginfo_t *_si, struct sigcontext * #define SIGCONTEXT_EXTRA_ARGS _si, diff --git a/sysdeps/unix/sysv/linux/ia64/sigpending.c b/sysdeps/unix/sysv/linux/ia64/sigpending.c index ae75a55161..8d02643a15 100644 --- a/sysdeps/unix/sysv/linux/ia64/sigpending.c +++ b/sysdeps/unix/sysv/linux/ia64/sigpending.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ /* Linux/ia64 only has rt signals, thus we do not even want to try falling back to the old style signals as the default Linux handler does. */ diff --git a/sysdeps/unix/sysv/linux/ia64/sigprocmask.c b/sysdeps/unix/sysv/linux/ia64/sigprocmask.c index ba8b053869..8776c2000a 100644 --- a/sysdeps/unix/sysv/linux/ia64/sigprocmask.c +++ b/sysdeps/unix/sysv/linux/ia64/sigprocmask.c @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ /* Linux/ia64 only has rt signals, thus we do not even want to try falling back to the old style signals as the default Linux handler does. */ diff --git a/sysdeps/unix/sysv/linux/ia64/swapcontext.c b/sysdeps/unix/sysv/linux/ia64/swapcontext.c index 1b9fbdb6a0..2ccc2eea96 100644 --- a/sysdeps/unix/sysv/linux/ia64/swapcontext.c +++ b/sysdeps/unix/sysv/linux/ia64/swapcontext.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/ia64/sys/io.h b/sysdeps/unix/sysv/linux/ia64/sys/io.h index 14736ff1c6..d29e7e95c2 100644 --- a/sysdeps/unix/sysv/linux/ia64/sys/io.h +++ b/sysdeps/unix/sysv/linux/ia64/sys/io.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #ifndef _SYS_IO_H #define _SYS_IO_H 1 diff --git a/sysdeps/unix/sysv/linux/ia64/sys/procfs.h b/sysdeps/unix/sysv/linux/ia64/sys/procfs.h index b5196b997c..51c3f7ecb2 100644 --- a/sysdeps/unix/sysv/linux/ia64/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/ia64/sys/procfs.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #ifndef _SYS_PROCFS_H #define _SYS_PROCFS_H 1 diff --git a/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h b/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h index 82d8843ce8..ae94464b20 100644 --- a/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h +++ b/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #ifndef _SYS_PTRACE_H #define _SYS_PTRACE_H 1 diff --git a/sysdeps/unix/sysv/linux/ia64/sys/rse.h b/sysdeps/unix/sysv/linux/ia64/sys/rse.h index 1d1c803d3c..62fcaba036 100644 --- a/sysdeps/unix/sysv/linux/ia64/sys/rse.h +++ b/sysdeps/unix/sysv/linux/ia64/sys/rse.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #ifndef _ia64_rse_h #define _ia64_rse_h diff --git a/sysdeps/unix/sysv/linux/ia64/sys/ucontext.h b/sysdeps/unix/sysv/linux/ia64/sys/ucontext.h index 17dc85f997..852500750d 100644 --- a/sysdeps/unix/sysv/linux/ia64/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/ia64/sys/ucontext.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #ifndef _SYS_UCONTEXT_H #define _SYS_UCONTEXT_H 1 diff --git a/sysdeps/unix/sysv/linux/ia64/sys/user.h b/sysdeps/unix/sysv/linux/ia64/sys/user.h index 039218761b..b998f63f02 100644 --- a/sysdeps/unix/sysv/linux/ia64/sys/user.h +++ b/sysdeps/unix/sysv/linux/ia64/sys/user.h @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #ifndef _SYS_USER_H #define _SYS_USER_H 1 diff --git a/sysdeps/unix/sysv/linux/ia64/syscall.S b/sysdeps/unix/sysv/linux/ia64/syscall.S index c638cc865f..0308a3c09a 100644 --- a/sysdeps/unix/sysv/linux/ia64/syscall.S +++ b/sysdeps/unix/sysv/linux/ia64/syscall.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/ia64/sysconf.c b/sysdeps/unix/sysv/linux/ia64/sysconf.c index 732cc68efd..2ff8324dc8 100644 --- a/sysdeps/unix/sysv/linux/ia64/sysconf.c +++ b/sysdeps/unix/sysv/linux/ia64/sysconf.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/ia64/sysdep.S b/sysdeps/unix/sysv/linux/ia64/sysdep.S index 3271857d61..8a6d8fe0e4 100644 --- a/sysdeps/unix/sysv/linux/ia64/sysdep.S +++ b/sysdeps/unix/sysv/linux/ia64/sysdep.S @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/ia64/sysdep.h b/sysdeps/unix/sysv/linux/ia64/sysdep.h index dd7a5b1b1d..2927634377 100644 --- a/sysdeps/unix/sysv/linux/ia64/sysdep.h +++ b/sysdeps/unix/sysv/linux/ia64/sysdep.h @@ -15,9 +15,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #ifndef _LINUX_IA64_SYSDEP_H #define _LINUX_IA64_SYSDEP_H 1 diff --git a/sysdeps/unix/sysv/linux/ia64/system.c b/sysdeps/unix/sysv/linux/ia64/system.c index 413ff27b39..d029cdfc72 100644 --- a/sysdeps/unix/sysv/linux/ia64/system.c +++ b/sysdeps/unix/sysv/linux/ia64/system.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/ia64/ucontext_i.h b/sysdeps/unix/sysv/linux/ia64/ucontext_i.h index e2a4d3c2b8..dd46a4cfd4 100644 --- a/sysdeps/unix/sysv/linux/ia64/ucontext_i.h +++ b/sysdeps/unix/sysv/linux/ia64/ucontext_i.h @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ /* Constants shared between setcontext() and getcontext(). Don't install this header file. */ diff --git a/sysdeps/unix/sysv/linux/ia64/umount.c b/sysdeps/unix/sysv/linux/ia64/umount.c index 462ace3258..ae0c03659f 100644 --- a/sysdeps/unix/sysv/linux/ia64/umount.c +++ b/sysdeps/unix/sysv/linux/ia64/umount.c @@ -13,9 +13,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include #include diff --git a/sysdeps/unix/sysv/linux/ia64/vfork.S b/sysdeps/unix/sysv/linux/ia64/vfork.S index 086fce9387..16c763dc4b 100644 --- a/sysdeps/unix/sysv/linux/ia64/vfork.S +++ b/sysdeps/unix/sysv/linux/ia64/vfork.S @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include diff --git a/sysdeps/unix/sysv/linux/ia64/wordexp.c b/sysdeps/unix/sysv/linux/ia64/wordexp.c index c2972e40c2..1ddece8c3a 100644 --- a/sysdeps/unix/sysv/linux/ia64/wordexp.c +++ b/sysdeps/unix/sysv/linux/ia64/wordexp.c @@ -12,9 +12,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #include From 9f2b22d5fc886942b00be5b56148df3ad50eb8c2 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 16 Apr 2012 21:49:06 -0400 Subject: [PATCH 4297/4487] mips: use $dir for path to ldd-rewrite.sed The $dest variable is based on the top build dir but we need the ldd rewrite variable to be based on the top source dir, so use $dir. Signed-off-by: Mike Frysinger --- ChangeLog.mips | 6 ++++++ sysdeps/unix/sysv/linux/mips/mips64/configure | 2 +- sysdeps/unix/sysv/linux/mips/mips64/configure.in | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 6e0523de80..14ce773c98 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,9 @@ +2012-04-24 Mike Frysinger + + * sysdeps/unix/sysv/linux/mips/mips64/configure.in + (ldd_rewrite_script): Change $dest to $dir. + * sysdeps/unix/sysv/linux/mips/mips64/configure: Regenerate. + 2012-04-21 Joseph Myers * sysdeps/unix/sysv/linux/mips/mips32/readahead.c: Include diff --git a/sysdeps/unix/sysv/linux/mips/mips64/configure b/sysdeps/unix/sysv/linux/mips/mips64/configure index c331f98299..f86f3276a5 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/configure +++ b/sysdeps/unix/sysv/linux/mips/mips64/configure @@ -1,4 +1,4 @@ # This file is generated from configure.in by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/unix/sysv/linux/mips/mips64. -ldd_rewrite_script=$dest/ldd-rewrite.sed +ldd_rewrite_script=$dir/ldd-rewrite.sed diff --git a/sysdeps/unix/sysv/linux/mips/mips64/configure.in b/sysdeps/unix/sysv/linux/mips/mips64/configure.in index a28638ad88..c137ec5552 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/configure.in +++ b/sysdeps/unix/sysv/linux/mips/mips64/configure.in @@ -2,4 +2,4 @@ sinclude(./aclocal.m4)dnl Autoconf lossage GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. # Local configure fragment for sysdeps/unix/sysv/linux/mips/mips64. -ldd_rewrite_script=$dest/ldd-rewrite.sed +ldd_rewrite_script=$dir/ldd-rewrite.sed From f959aa148cf650035ecad4c46ff6643b151cdbfb Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 24 Apr 2012 23:04:58 +0000 Subject: [PATCH 4298/4487] Remove unused sysdeps/unix/arm/fork.S. --- ChangeLog.arm | 4 ++++ sysdeps/unix/arm/fork.S | 33 --------------------------------- 2 files changed, 4 insertions(+), 33 deletions(-) delete mode 100644 sysdeps/unix/arm/fork.S diff --git a/ChangeLog.arm b/ChangeLog.arm index 908d0bd27c..3d0e3ccf6b 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,7 @@ +2012-04-24 Joseph Myers + + * sysdeps/unix/arm/fork.S: Remove file. + 2012-04-21 Joseph Myers [BZ #13556] diff --git a/sysdeps/unix/arm/fork.S b/sysdeps/unix/arm/fork.S deleted file mode 100644 index cd156876a4..0000000000 --- a/sysdeps/unix/arm/fork.S +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (C) 1991,92,94,95,97,2002 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, see - . */ - -#include - -/* ARM version. */ - -SYSCALL__ (fork, 0) - /* R1 is now 0 for the parent and 1 for the child. Decrement it to - make it -1 (all bits set) for the parent, and 0 (no bits set) - for the child. Then AND it with R0, so the parent gets - R0&-1==R0, and the child gets R0&0==0. */ - sub r1, r1, $1 - and r0, r0, r1 - DO_RET (r14) -PSEUDO_END (__fork) -libc_hidden_def (__fork) - -weak_alias (__fork, fork) From f2f7d65a864561ef3406cfa82364dde70aedb6b5 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 24 Apr 2012 23:05:20 +0000 Subject: [PATCH 4299/4487] Remove unused sysdeps/unix/mips/fork.S. --- ChangeLog.mips | 4 ++++ sysdeps/unix/mips/fork.S | 31 ------------------------------- 2 files changed, 4 insertions(+), 31 deletions(-) delete mode 100644 sysdeps/unix/mips/fork.S diff --git a/ChangeLog.mips b/ChangeLog.mips index 14ce773c98..5f5b3b7fd6 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,7 @@ +2012-04-24 Joseph Myers + + * sysdeps/unix/mips/fork.S: Remove file. + 2012-04-24 Mike Frysinger * sysdeps/unix/sysv/linux/mips/mips64/configure.in diff --git a/sysdeps/unix/mips/fork.S b/sysdeps/unix/mips/fork.S deleted file mode 100644 index 3e1e76b733..0000000000 --- a/sysdeps/unix/mips/fork.S +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (C) 1992, 1995, 1997, 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@zen.org). - - 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, see - . */ - -#include - -SYSCALL__ (fork, 0) - beq v1, zero, parent /* Branch if parent. */ - nop - /* We are the child. Return zero. */ - move v0, zero -parent: - ret -PSEUDO_END(__fork) - -libc_hidden_def (__fork) -weak_alias (__fork, fork) From 928501fb7bc7b1464a9cbdd7335b69c16ea8bd3b Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 16 Apr 2012 22:15:13 -0400 Subject: [PATCH 4300/4487] ia64: fix license text to "Lesser" not "Library" Looks like these two files got the wrong boiler plate text. Convert them over to the right one. Signed-off-by: Mike Frysinger --- ChangeLog.ia64 | 6 ++++++ .../unix/sysv/linux/ia64/nptl/bits/local_lim.h | 15 +++++++-------- .../sysv/linux/ia64/nptl/unwind-forcedunwind.c | 11 +++++------ 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/ChangeLog.ia64 b/ChangeLog.ia64 index e212e10eec..456360e591 100644 --- a/ChangeLog.ia64 +++ b/ChangeLog.ia64 @@ -1,3 +1,9 @@ +2012-04-25 Mike Frysinger + + * sysdeps/unix/sysv/linux/ia64/nptl/bits/local_lim.h: Replace + boiler license text with standard GNU Lesser General Public. + * sysdeps/unix/sysv/linux/ia64/nptl/unwind-forcedunwind.c: Likewise. + 2012-04-22 Mike Frysinger * sysdeps/ia64/_mcount.S: Replace FSF snail mail address with URL. diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/bits/local_lim.h b/sysdeps/unix/sysv/linux/ia64/nptl/bits/local_lim.h index 4b8a035042..2ae2ef2e49 100644 --- a/sysdeps/unix/sysv/linux/ia64/nptl/bits/local_lim.h +++ b/sysdeps/unix/sysv/linux/ia64/nptl/bits/local_lim.h @@ -3,19 +3,18 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ /* The kernel header pollutes the namespace with the NR_OPEN symbol and defines LINK_MAX although filesystems have different maxima. A diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/ia64/nptl/unwind-forcedunwind.c index d0c77a62e6..ad6890428b 100644 --- a/sysdeps/unix/sysv/linux/ia64/nptl/unwind-forcedunwind.c +++ b/sysdeps/unix/sysv/linux/ia64/nptl/unwind-forcedunwind.c @@ -3,9 +3,9 @@ Contributed by Jakub Jelinek . 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. + 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 @@ -13,9 +13,8 @@ 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; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + License along with the GNU C Library; if not, see + . */ #include #include From 3cad7dc5f09b847bc3883b5003ed73189f6c4f6d Mon Sep 17 00:00:00 2001 From: Siddhesh Poyarekar Date: Thu, 26 Apr 2012 17:08:17 +0200 Subject: [PATCH 4301/4487] m68k: move definition of libgcc_s soname to shlib-versions --- ChangeLog.m68k | 5 +++++ sysdeps/m68k/libgcc_s.h | 2 -- sysdeps/m68k/shlib-versions | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) delete mode 100644 sysdeps/m68k/libgcc_s.h create mode 100644 sysdeps/m68k/shlib-versions diff --git a/ChangeLog.m68k b/ChangeLog.m68k index dda687edd5..d6e2dd6f67 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2012-04-26 Siddhesh Poyarekar + + * sysdeps/m68k/libgcc_s.h: Remove. + * sysdeps/m68k/shlib-versions: Add libgcc_s. + 2012-04-18 Andreas Schwab * sysdeps/m68k/m680x0/fpu/libm-test-ulps: Update. diff --git a/sysdeps/m68k/libgcc_s.h b/sysdeps/m68k/libgcc_s.h deleted file mode 100644 index 8523ad135d..0000000000 --- a/sysdeps/m68k/libgcc_s.h +++ /dev/null @@ -1,2 +0,0 @@ -/* Name of libgcc_s library provided by gcc, m68k version. */ -#define LIBGCC_S_SO "libgcc_s.so.2" diff --git a/sysdeps/m68k/shlib-versions b/sysdeps/m68k/shlib-versions new file mode 100644 index 0000000000..b65b00b212 --- /dev/null +++ b/sysdeps/m68k/shlib-versions @@ -0,0 +1 @@ +m68k-.*-linux.* libgcc_s=2 From 95b28a6cc809339fcf8d29700226ea0a99c06877 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 26 Apr 2012 18:17:08 +0000 Subject: [PATCH 4302/4487] Remove unused sysdeps/arm files. --- ChangeLog.arm | 5 ++++ sysdeps/unix/arm/brk.S | 55 --------------------------------------- sysdeps/unix/arm/dl-brk.S | 1 - 3 files changed, 5 insertions(+), 56 deletions(-) delete mode 100644 sysdeps/unix/arm/brk.S delete mode 100644 sysdeps/unix/arm/dl-brk.S diff --git a/ChangeLog.arm b/ChangeLog.arm index 3d0e3ccf6b..16be7574cc 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2012-04-26 Joseph Myers + + * sysdeps/unix/arm/brk.S: Remove file. + * sysdeps/unix/arm/dl-brk.S: Likewise. + 2012-04-24 Joseph Myers * sysdeps/unix/arm/fork.S: Remove file. diff --git a/sysdeps/unix/arm/brk.S b/sysdeps/unix/arm/brk.S deleted file mode 100644 index 56acda1cce..0000000000 --- a/sysdeps/unix/arm/brk.S +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright (C) 1991, 92, 93, 95, 97, 98 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, see - . */ - -#include - -#ifndef SYS_brk -#define SYS_brk 17 -#endif - -.data -.globl C_SYMBOL_NAME(__curbrk) -C_LABEL(__curbrk) -#ifdef HAVE_GNU_LD - .long C_SYMBOL_NAME(_end) -#else - .long C_SYMBOL_NAME(end) -#endif - -.text -SYSCALL__ (brk, 1) -#ifdef PIC - ldr r1, 1f - ldr r2, _cb_addr -2: add r1, pc, r1 - add r1, r1, r2 -#else - ldr r1, _cb_addr -#endif - str r0, [r1] - mov r0, $0 - DO_RET (r14) -#ifdef PIC -1: .long _GLOBAL_OFFSET_TABLE_ - 2b - 8 -_cb_addr: - .long C_SYMBOL_NAME(__curbrk)(GOTOFF) -#else -_cb_addr: - .long C_SYMBOL_NAME(__curbrk) -#endif - -weak_alias (__brk, brk) diff --git a/sysdeps/unix/arm/dl-brk.S b/sysdeps/unix/arm/dl-brk.S deleted file mode 100644 index eeb96544e3..0000000000 --- a/sysdeps/unix/arm/dl-brk.S +++ /dev/null @@ -1 +0,0 @@ -#include From 8dc2363998e2c13c6e36626fc47844ced976ba4e Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 26 Apr 2012 19:20:45 +0000 Subject: [PATCH 4303/4487] Use siginfo_t instead of struct siginfo for MIPS kernel_rt_sigframe. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/kernel_rt_sigframe.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 5f5b3b7fd6..0b4a4935dc 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2012-04-26 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/kernel_rt_sigframe.h (struct + kernel_rt_sigframe): Use siginfo_t instead of struct siginfo. + 2012-04-24 Joseph Myers * sysdeps/unix/mips/fork.S: Remove file. diff --git a/sysdeps/unix/sysv/linux/mips/kernel_rt_sigframe.h b/sysdeps/unix/sysv/linux/mips/kernel_rt_sigframe.h index edf8d455c9..77ffaf68df 100644 --- a/sysdeps/unix/sysv/linux/mips/kernel_rt_sigframe.h +++ b/sysdeps/unix/sysv/linux/mips/kernel_rt_sigframe.h @@ -3,7 +3,7 @@ typedef struct kernel_rt_sigframe { uint32_t rs_ass[4]; uint32_t rs_code[2]; - struct siginfo rs_info; + siginfo_t rs_info; struct ucontext rs_uc; uint32_t rs_altcode[8] __attribute__ ((__aligned__ (1 << 7))); } From 8b2b11271ea68567fbc3262691583bea753d44e3 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 26 Apr 2012 19:23:08 +0000 Subject: [PATCH 4304/4487] Avoid endian.h include in MIPS string functions. --- ChangeLog.mips | 4 ++++ sysdeps/mips/memcpy.S | 5 ++--- sysdeps/mips/memset.S | 5 ++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 0b4a4935dc..3d3678bdb8 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,5 +1,9 @@ 2012-04-26 Joseph Myers + * sysdeps/mips/memcpy.S: Don't include . Test __MIPSEB + instead of __BYTE_ORDER. + * sysdeps/mips/memset.S: Likewise. + * sysdeps/unix/sysv/linux/mips/kernel_rt_sigframe.h (struct kernel_rt_sigframe): Use siginfo_t instead of struct siginfo. diff --git a/sysdeps/mips/memcpy.S b/sysdeps/mips/memcpy.S index ec1b98a721..753f67ca17 100644 --- a/sysdeps/mips/memcpy.S +++ b/sysdeps/mips/memcpy.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2002-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Hartvig Ekner , 2002. @@ -17,12 +17,11 @@ . */ #include -#include /* void *memcpy(void *s1, const void *s2, size_t n); */ -#if __BYTE_ORDER == __BIG_ENDIAN +#if __MIPSEB # define LWHI lwl /* high part is left in big-endian */ # define SWHI swl /* high part is left in big-endian */ # define LWLO lwr /* low part is right in big-endian */ diff --git a/sysdeps/mips/memset.S b/sysdeps/mips/memset.S index 1df79815c0..30a0ba44e7 100644 --- a/sysdeps/mips/memset.S +++ b/sysdeps/mips/memset.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2002-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Hartvig Ekner , 2002. @@ -17,12 +17,11 @@ . */ #include -#include /* void *memset(void *s, int c, size_t n). */ -#if __BYTE_ORDER == __BIG_ENDIAN +#if __MIPSEB # define SWHI swl /* high part is left in big-endian */ #else # define SWHI swr /* high part is right in little-endian */ From d473fb8905f0eab64acb9c48aed5665fb1c1826c Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 26 Apr 2012 19:39:33 +0000 Subject: [PATCH 4305/4487] Remove unused sysdeps/unix/mips files. --- ChangeLog.mips | 7 ++++++ sysdeps/unix/mips/brk.S | 47 ----------------------------------- sysdeps/unix/mips/dl-brk.S | 1 - sysdeps/unix/mips/sigreturn.S | 30 ---------------------- sysdeps/unix/mips/wait.S | 46 ---------------------------------- 5 files changed, 7 insertions(+), 124 deletions(-) delete mode 100644 sysdeps/unix/mips/brk.S delete mode 100644 sysdeps/unix/mips/dl-brk.S delete mode 100644 sysdeps/unix/mips/sigreturn.S delete mode 100644 sysdeps/unix/mips/wait.S diff --git a/ChangeLog.mips b/ChangeLog.mips index 3d3678bdb8..45409a0bb2 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,10 @@ +2012-04-26 Joseph Myers + + * sysdeps/unix/mips/brk.S: Remove file. + * sysdeps/unix/mips/dl-brk.S: Likewise. + * sysdeps/unix/mips/sigreturn.S: Likewise. + * sysdeps/unix/mips/wait.S: Likewise. + 2012-04-26 Joseph Myers * sysdeps/mips/memcpy.S: Don't include . Test __MIPSEB diff --git a/sysdeps/unix/mips/brk.S b/sysdeps/unix/mips/brk.S deleted file mode 100644 index f8cc1779a1..0000000000 --- a/sysdeps/unix/mips/brk.S +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (C) 1992, 1995, 1997, 2002, 2003 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@zen.org). - - 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, see - . */ - -#include -#include - -#ifndef SYS_brk -#define SYS_brk 17 -#endif - -#ifndef HAVE_GNU_LD -#define _end end -#endif - - .data -ENTRY(__curbrk) - .word 0 - .end __curbrk - - .text -SYSCALL__(brk, 1) - .set reorder - /* Handle the query case. */ - bnez a0, 1f - move a0, v0 -1: /* Update __curbrk and exit cleanly. */ - PTR_S a0, __curbrk - move v0, zero - jr ra -PSEUDO_END(__brk) - -weak_alias (__brk, brk) diff --git a/sysdeps/unix/mips/dl-brk.S b/sysdeps/unix/mips/dl-brk.S deleted file mode 100644 index eeb96544e3..0000000000 --- a/sysdeps/unix/mips/dl-brk.S +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/mips/sigreturn.S b/sysdeps/unix/mips/sigreturn.S deleted file mode 100644 index 34b6662659..0000000000 --- a/sysdeps/unix/mips/sigreturn.S +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright (C) 1992, 1994, 1995, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@zen.org). - - 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, see - . */ - -#include - -#ifndef SYS_sigreturn -#define SYS_sigreturn 103 -#endif - -ENTRY(__sigreturn) - li v0, SYS_sigreturn - syscall - .end __sigreturn - -weak_alias (__sigreturn, sigreturn) diff --git a/sysdeps/unix/mips/wait.S b/sysdeps/unix/mips/wait.S deleted file mode 100644 index cabd2409c1..0000000000 --- a/sysdeps/unix/mips/wait.S +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (C) 1992, 1994, 1995, 1997, 2002, 2003 - Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@zen.org). - - 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, see - . */ - -#include - -.set noreorder - -ENTRY(__wait) - /* Prep it for wait. */ - move a1, zero - move a2, zero - - li v0, SYS_wait - syscall - beqz a3, L(noerror) - nop - j __syscall_error - nop - -L(noerror): - /* If the arg is not NULL, store v1 there. */ - beqz a0, L(noarg) - nop - sw v1, 0(a0) - nop -L(noarg): - ret - .end __wait - -weak_alias (__wait, wait) From b44167c02addd63d5ad5bec5c5566d0e0278f01a Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Thu, 26 Apr 2012 22:07:51 -0400 Subject: [PATCH 4306/4487] alpha: Define O_PATH. --- ChangeLog.alpha | 4 ++++ sysdeps/unix/sysv/linux/alpha/bits/fcntl.h | 1 + 2 files changed, 5 insertions(+) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index c25d3f1f61..086faba5ef 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,7 @@ +2012-04-26 Matt Turner + + * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h (O_PATH): Define. + 2012-03-27 Richard Henderson * sysdeps/alpha/elf/configure.in: Move to ... diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h index d6b7b4dfe2..4c55071146 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h @@ -52,6 +52,7 @@ #ifdef __USE_GNU # define O_DIRECT 02000000 /* Direct disk access. */ # define O_NOATIME 04000000 /* Do not set atime. */ +# define O_PATH 040000000 /* Resolve pathname but do not open file. */ #endif #ifdef __USE_LARGEFILE64 From 24d6e175c26a3be163f088b52762f9d64ebb8ea3 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Thu, 26 Apr 2012 22:07:52 -0400 Subject: [PATCH 4307/4487] alpha: Use const instead of __const. --- ChangeLog.alpha | 6 ++++++ sysdeps/alpha/fpu/bits/fenv.h | 8 ++++---- sysdeps/unix/sysv/linux/alpha/oldglob.c | 8 ++++---- sysdeps/unix/sysv/linux/alpha/sys/acct.h | 4 ++-- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 086faba5ef..096fe9af26 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,9 @@ +2012-04-26 Matt Turner + + * sysdeps/alpha/fpu/bits/fenv.h: Use const instead of __const. + * sysdeps/unix/sysv/linux/alpha/oldglob.c: Likewise. + * sysdeps/unix/sysv/linux/alpha/sys/acct.h: Likewise. + 2012-04-26 Matt Turner * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h (O_PATH): Define. diff --git a/sysdeps/alpha/fpu/bits/fenv.h b/sysdeps/alpha/fpu/bits/fenv.h index bab54a790b..2ddbaa15f8 100644 --- a/sysdeps/alpha/fpu/bits/fenv.h +++ b/sysdeps/alpha/fpu/bits/fenv.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1997-2012 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 @@ -106,15 +106,15 @@ typedef unsigned long int fenv_t; /* If the default argument is used we use this value. Note that due to architecture-specified page mappings, no user-space pointer will ever have its two high bits set. Co-opt one. */ -#define FE_DFL_ENV ((__const fenv_t *) 0x8800000000000000UL) +#define FE_DFL_ENV ((const fenv_t *) 0x8800000000000000UL) #ifdef __USE_GNU /* Floating-point environment where none of the exceptions are masked. */ -# define FE_NOMASK_ENV ((__const fenv_t *) 0x880000000000003eUL) +# define FE_NOMASK_ENV ((const fenv_t *) 0x880000000000003eUL) /* Floating-point environment with (processor-dependent) non-IEEE floating point. In this case, mapping denormals to zero. */ -# define FE_NONIEEE_ENV ((__const fenv_t *) 0x8800000000003000UL) +# define FE_NONIEEE_ENV ((const fenv_t *) 0x8800000000003000UL) #endif /* The system calls to talk to the kernel's FP code. */ diff --git a/sysdeps/unix/sysv/linux/alpha/oldglob.c b/sysdeps/unix/sysv/linux/alpha/oldglob.c index 1b9bbe0d94..11fd4a00c4 100644 --- a/sysdeps/unix/sysv/linux/alpha/oldglob.c +++ b/sysdeps/unix/sysv/linux/alpha/oldglob.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2000, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1998-2012 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 @@ -36,9 +36,9 @@ typedef struct are used instead of the normal file access functions. */ void (*gl_closedir) (void *); struct dirent *(*gl_readdir) (void *); - __ptr_t (*gl_opendir) (__const char *); - int (*gl_lstat) (__const char *, struct stat *); - int (*gl_stat) (__const char *, struct stat *); + __ptr_t (*gl_opendir) (const char *); + int (*gl_lstat) (const char *, struct stat *); + int (*gl_stat) (const char *, struct stat *); } old_glob_t; diff --git a/sysdeps/unix/sysv/linux/alpha/sys/acct.h b/sysdeps/unix/sysv/linux/alpha/sys/acct.h index c22f7bab4c..9645029662 100644 --- a/sysdeps/unix/sysv/linux/alpha/sys/acct.h +++ b/sysdeps/unix/sysv/linux/alpha/sys/acct.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1996-2012 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 @@ -58,7 +58,7 @@ enum /* Switch process accounting on and off. */ -extern int acct (__const char *__filename) __THROW; +extern int acct (const char *__filename) __THROW; __END_DECLS From 4ca39b2a40d81a4951e3a009ab60bdc8e5160a3f Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Thu, 26 Apr 2012 22:07:53 -0400 Subject: [PATCH 4308/4487] alpha: Remove __STDC__ conditionals. --- ChangeLog.alpha | 6 ++++++ sysdeps/alpha/bits/mathdef.h | 11 +---------- sysdeps/unix/alpha/sysdep.h | 7 +------ sysdeps/unix/sysv/linux/alpha/sysdep.h | 9 ++------- 4 files changed, 10 insertions(+), 23 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 096fe9af26..72eb5afe5d 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,9 @@ +2012-04-26 Matt Turner + + * sysdeps/alpha/bits/mathdef.h: Remove __STDC__ conditionals. + * sysdeps/unix/alpha/sysdep.h: Likewise. + * sysdeps/unix/sysv/linux/alpha/sysdep.h: Likewise. + 2012-04-26 Matt Turner * sysdeps/alpha/fpu/bits/fenv.h: Use const instead of __const. diff --git a/sysdeps/alpha/bits/mathdef.h b/sysdeps/alpha/bits/mathdef.h index 7648a9ec40..ae0049ade3 100644 --- a/sysdeps/alpha/bits/mathdef.h +++ b/sysdeps/alpha/bits/mathdef.h @@ -1,5 +1,4 @@ -/* Copyright (C) 1997,1998,1999,2000,2003,2004,2006 - Free Software Foundation, Inc. +/* Copyright (C) 1997-2012 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 @@ -27,19 +26,11 @@ # define _MATH_H_MATHDEF 1 # ifdef __GNUC__ -# if __STDC__ == 1 /* In GNU or ANSI mode, gcc leaves `float' expressions as-is. */ typedef float float_t; typedef double double_t; -# else - -/* For `gcc -traditional', `float' expressions are evaluated as `double'. */ -typedef double float_t; -typedef double double_t; - -# endif # else /* Wild guess at types for float_t and double_t. */ diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h index 4cc88942c8..e17bf211bd 100644 --- a/sysdeps/unix/alpha/sysdep.h +++ b/sysdeps/unix/alpha/sysdep.h @@ -1,5 +1,4 @@ -/* Copyright (C) 1992, 1995, 1996, 2000, 2003, 2004, 2006, 2010, 2012 - Free Software Foundation, Inc. +/* Copyright (C) 1992-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -32,11 +31,7 @@ #endif -#ifdef __STDC__ #define __LABEL(x) x##: -#else -#define __LABEL(x) x/**/: -#endif #define LEAF(name, framesize) \ .globl name; \ diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h index 7616ba980d..329fdbd082 100644 --- a/sysdeps/unix/sysv/linux/alpha/sysdep.h +++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h @@ -1,5 +1,4 @@ -/* Copyright (C) 1992, 1993, 1995, 1996, 1997, 2002, 2003, 2004, 2007 - Free Software Foundation, Inc. +/* Copyright (C) 1992-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, , August 1995. @@ -35,11 +34,7 @@ of the kernel. But these symbols do not follow the SYS_* syntax so we have to redefine the `SYS_ify' macro here. */ #undef SYS_ify -#ifdef __STDC__ -# define SYS_ify(syscall_name) __NR_##syscall_name -#else -# define SYS_ify(syscall_name) __NR_/**/syscall_name -#endif +#define SYS_ify(syscall_name) __NR_##syscall_name /* Define some aliases to make automatic syscall generation work properly. The SYS_* variants are for the benefit of the files in From cdf73ff5b6723430d6e403688abbbcbeadaa723a Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Thu, 26 Apr 2012 22:07:54 -0400 Subject: [PATCH 4309/4487] alpha: Update bits/mman.h. --- ChangeLog.alpha | 5 +++++ sysdeps/unix/sysv/linux/alpha/bits/mman.h | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 72eb5afe5d..e908e27790 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,8 @@ +2012-04-26 Matt Turner + + * sysdeps/unix/sysv/linux/alpha/bits/mman.h (MAP_STACK): Define. + (MAP_HUGETLB): Likewise. + 2012-04-26 Matt Turner * sysdeps/alpha/bits/mathdef.h: Remove __STDC__ conditionals. diff --git a/sysdeps/unix/sysv/linux/alpha/bits/mman.h b/sysdeps/unix/sysv/linux/alpha/bits/mman.h index 5724e5f294..6635bd44e7 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/mman.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/mman.h @@ -1,6 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/Alpha version. - Copyright (C) 1997, 1998, 2000, 2003, 2006, 2009 - Free Software Foundation, Inc. + Copyright (C) 1997-2012 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 @@ -71,6 +70,8 @@ # define MAP_NORESERVE 0x10000 /* Don't check for reservations. */ # define MAP_POPULATE 0x20000 /* Populate (prefault) pagetables. */ # define MAP_NONBLOCK 0x40000 /* Do not block on IO. */ +# define MAP_STACK 0x80000 /* Allocation is for a stack. */ +# define MAP_HUGETLB 0x100000 /* Create huge page mapping. */ #endif /* Flags to `msync'. */ From 99449c154fad30b695c4151095873d4e994bce4d Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Thu, 26 Apr 2012 22:22:59 -0400 Subject: [PATCH 4310/4487] alpha: Use fopen "rce" in ioperm --- ChangeLog.alpha | 5 +++++ sysdeps/unix/sysv/linux/alpha/ioperm.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index e908e27790..065930d839 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,8 @@ +2012-04-26 Matt Turner + + * sysdeps/unix/sysv/linux/alpha/ioperm.c (process_cpuinfo): Use "c" + and "e" in fopen. + 2012-04-26 Matt Turner * sysdeps/unix/sysv/linux/alpha/bits/mman.h (MAP_STACK): Define. diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c index 4055c5d564..8b6c8309f8 100644 --- a/sysdeps/unix/sysv/linux/alpha/ioperm.c +++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1996-1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1992-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger. @@ -496,7 +496,7 @@ process_cpuinfo(struct cpuinfo_data *data) return 1; } - fp = fopen (PATH_CPUINFO, "r"); + fp = fopen (PATH_CPUINFO, "rce"); if (!fp) return 0; From ee6cb8adf29d2b9925c7b3522d1fbe8ec4d1f27c Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Thu, 26 Apr 2012 22:40:14 -0400 Subject: [PATCH 4311/4487] alpha: Correct kernel version needed to define __ASSUME_ACCEPT4. --- ChangeLog.alpha | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 065930d839..0caabdb4f6 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,27 +1,22 @@ 2012-04-26 Matt Turner + * sysdeps/unix/sysv/linux/alpha/kernel-features.h: Correct kernel + version needed to define __ASSUME_ACCEPT4. + * sysdeps/unix/sysv/linux/alpha/ioperm.c (process_cpuinfo): Use "c" and "e" in fopen. -2012-04-26 Matt Turner - * sysdeps/unix/sysv/linux/alpha/bits/mman.h (MAP_STACK): Define. (MAP_HUGETLB): Likewise. -2012-04-26 Matt Turner - * sysdeps/alpha/bits/mathdef.h: Remove __STDC__ conditionals. * sysdeps/unix/alpha/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/alpha/sysdep.h: Likewise. -2012-04-26 Matt Turner - * sysdeps/alpha/fpu/bits/fenv.h: Use const instead of __const. * sysdeps/unix/sysv/linux/alpha/oldglob.c: Likewise. * sysdeps/unix/sysv/linux/alpha/sys/acct.h: Likewise. -2012-04-26 Matt Turner - * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h (O_PATH): Define. 2012-03-27 Richard Henderson From 4053d054cd15f9dd7cf60d19f72d143582f0b81a Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 27 Apr 2012 20:52:33 +0000 Subject: [PATCH 4312/4487] Increase minimum MIPS kernel version to 2.6.12. --- ChangeLog.mips | 6 ++++++ sysdeps/unix/sysv/linux/mips/configure | 2 +- sysdeps/unix/sysv/linux/mips/configure.in | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 45409a0bb2..65ff19d0a1 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,9 @@ +2012-04-27 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/configure.in (arch_minimum_kernel): + Change to 2.6.12. + * sysdeps/unix/sysv/linux/mips/configure: Regenerated. + 2012-04-26 Joseph Myers * sysdeps/unix/mips/brk.S: Remove file. diff --git a/sysdeps/unix/sysv/linux/mips/configure b/sysdeps/unix/sysv/linux/mips/configure index d8f1304484..099014fdc7 100644 --- a/sysdeps/unix/sysv/linux/mips/configure +++ b/sysdeps/unix/sysv/linux/mips/configure @@ -31,6 +31,6 @@ case "$prefix" in esac if test -z "$arch_minimum_kernel"; then - arch_minimum_kernel=2.4.1 + arch_minimum_kernel=2.6.12 libc_cv_gcc_unwind_find_fde=yes fi diff --git a/sysdeps/unix/sysv/linux/mips/configure.in b/sysdeps/unix/sysv/linux/mips/configure.in index 4871382100..466a349fc5 100644 --- a/sysdeps/unix/sysv/linux/mips/configure.in +++ b/sysdeps/unix/sysv/linux/mips/configure.in @@ -32,6 +32,6 @@ case "$prefix" in esac if test -z "$arch_minimum_kernel"; then - arch_minimum_kernel=2.4.1 + arch_minimum_kernel=2.6.12 libc_cv_gcc_unwind_find_fde=yes fi From 5f870869a601ea2c5d25d4560187c82722806a32 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 16 Apr 2012 22:46:52 -0400 Subject: [PATCH 4313/4487] ia64: update include paths We need to update the file paths after the ia64 code was moved from the main tree to ports/. In the case of backtrace.c, the main tree actually copied the ia64 version to the x86_64 code, so we can go ahead and drop the ia64 version. Signed-off-by: Mike Frysinger --- ChangeLog.ia64 | 14 ++ sysdeps/ia64/backtrace.c | 133 +----------------- sysdeps/unix/sysv/linux/ia64/nptl/fork.c | 4 +- .../unix/sysv/linux/ia64/nptl/timer_create.c | 2 +- .../unix/sysv/linux/ia64/nptl/timer_delete.c | 2 +- .../sysv/linux/ia64/nptl/timer_getoverr.c | 2 +- .../unix/sysv/linux/ia64/nptl/timer_gettime.c | 2 +- .../unix/sysv/linux/ia64/nptl/timer_settime.c | 2 +- sysdeps/unix/sysv/linux/ia64/sysconf.c | 4 +- sysdeps/unix/sysv/linux/ia64/system.c | 4 +- 10 files changed, 26 insertions(+), 143 deletions(-) diff --git a/ChangeLog.ia64 b/ChangeLog.ia64 index 456360e591..07dc47c0a6 100644 --- a/ChangeLog.ia64 +++ b/ChangeLog.ia64 @@ -1,3 +1,17 @@ +2012-04-27 Mike Frysinger + + * sysdeps/ia64/backtrace.c: Replace all contents with a single + include of sysdeps/x86_64/backtrace.c. + * sysdeps/unix/sysv/linux/ia64/nptl/fork.c: Change include path + prefix from ../ to sysdeps/unix/sysv/linux/, and "..." to <...>. + * sysdeps/unix/sysv/linux/ia64/nptl/timer_create.c, + sysdeps/unix/sysv/linux/ia64/nptl/timer_delete.c, + sysdeps/unix/sysv/linux/ia64/nptl/timer_getoverr.c, + sysdeps/unix/sysv/linux/ia64/nptl/timer_gettime.c, + sysdeps/unix/sysv/linux/ia64/nptl/timer_settime.c, + sysdeps/unix/sysv/linux/ia64/sysconf.c, + sysdeps/unix/sysv/linux/ia64/system.c: Likewise. + 2012-04-25 Mike Frysinger * sysdeps/unix/sysv/linux/ia64/nptl/bits/local_lim.h: Replace diff --git a/sysdeps/ia64/backtrace.c b/sysdeps/ia64/backtrace.c index 7c1f33ff0d..27ce597b39 100644 --- a/sysdeps/ia64/backtrace.c +++ b/sysdeps/ia64/backtrace.c @@ -1,132 +1 @@ -/* Return backtrace of current program state. - Copyright (C) 2003-2005, 2007, 2009, 2011 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Jakub Jelinek , 2003. - - 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, see - . */ - -#include -#include -#include -#include -#include - -struct trace_arg -{ - void **array; - _Unwind_Word cfa; - int cnt; - int size; -}; - -#ifdef SHARED -static _Unwind_Reason_Code (*unwind_backtrace) (_Unwind_Trace_Fn, void *); -static _Unwind_Ptr (*unwind_getip) (struct _Unwind_Context *); -static _Unwind_Word (*unwind_getcfa) (struct _Unwind_Context *); -static void *libgcc_handle; - - -/* Dummy version in case libgcc_s does not contain the real code. */ -static _Unwind_Word -dummy_getcfa (struct _Unwind_Context *ctx __attribute__ ((unused))) -{ - return 0; -} - - -static void -init (void) -{ - libgcc_handle = __libc_dlopen ("libgcc_s.so.1"); - - if (libgcc_handle == NULL) - return; - - unwind_backtrace = __libc_dlsym (libgcc_handle, "_Unwind_Backtrace"); - unwind_getip = __libc_dlsym (libgcc_handle, "_Unwind_GetIP"); - if (unwind_getip == NULL) - unwind_backtrace = NULL; - unwind_getcfa = (__libc_dlsym (libgcc_handle, "_Unwind_GetCFA") - ?: dummy_getcfa); -} -#else -# define unwind_backtrace _Unwind_Backtrace -# define unwind_getip _Unwind_GetIP -# define unwind_getcfa _Unwind_GetCFA -#endif - -static _Unwind_Reason_Code -backtrace_helper (struct _Unwind_Context *ctx, void *a) -{ - struct trace_arg *arg = a; - - /* We are first called with address in the __backtrace function. - Skip it. */ - if (arg->cnt != -1) - { - arg->array[arg->cnt] = (void *) unwind_getip (ctx); - - /* Check whether we make any progress. */ - _Unwind_Word cfa = unwind_getcfa (ctx); - - if (arg->cnt > 0 && arg->array[arg->cnt - 1] == arg->array[arg->cnt] - && cfa == arg->cfa) - return _URC_END_OF_STACK; - arg->cfa = cfa; - } - if (++arg->cnt == arg->size) - return _URC_END_OF_STACK; - return _URC_NO_REASON; -} - -int -__backtrace (array, size) - void **array; - int size; -{ - struct trace_arg arg = { .array = array, .cfa = 0, .size = size, .cnt = -1 }; -#ifdef SHARED - __libc_once_define (static, once); - - __libc_once (once, init); - if (unwind_backtrace == NULL) - return 0; -#endif - - if (size >= 1) - unwind_backtrace (backtrace_helper, &arg); - - /* _Unwind_Backtrace on IA-64 seems to put NULL address above - _start. Fix it up here. */ - if (arg.cnt > 1 && arg.array[arg.cnt - 1] == NULL) - --arg.cnt; - return arg.cnt != -1 ? arg.cnt : 0; -} -weak_alias (__backtrace, backtrace) -libc_hidden_def (__backtrace) - - -#ifdef SHARED -/* Free all resources if necessary. */ -libc_freeres_fn (free_mem) -{ - unwind_backtrace = NULL; - if (libgcc_handle != NULL) - { - __libc_dlclose (libgcc_handle); - libgcc_handle = NULL; - } -} -#endif +#include diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/fork.c b/sysdeps/unix/sysv/linux/ia64/nptl/fork.c index 6770dd24c9..9767d2a9dc 100644 --- a/sysdeps/unix/sysv/linux/ia64/nptl/fork.c +++ b/sysdeps/unix/sysv/linux/ia64/nptl/fork.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 Free Software Foundation, Inc. +/* Copyright (C) 2003-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek , 2003. @@ -27,4 +27,4 @@ CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID | SIGCHLD, \ NULL, 0, NULL, &THREAD_SELF->tid, NULL) -#include "../fork.c" +#include diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/timer_create.c b/sysdeps/unix/sysv/linux/ia64/nptl/timer_create.c index 172223af3f..1ac4c6a6b0 100644 --- a/sysdeps/unix/sysv/linux/ia64/nptl/timer_create.c +++ b/sysdeps/unix/sysv/linux/ia64/nptl/timer_create.c @@ -1 +1 @@ -#include "../x86_64/timer_create.c" +#include diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/timer_delete.c b/sysdeps/unix/sysv/linux/ia64/nptl/timer_delete.c index 537516e0aa..9bffef3488 100644 --- a/sysdeps/unix/sysv/linux/ia64/nptl/timer_delete.c +++ b/sysdeps/unix/sysv/linux/ia64/nptl/timer_delete.c @@ -1 +1 @@ -#include "../x86_64/timer_delete.c" +#include diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/timer_getoverr.c b/sysdeps/unix/sysv/linux/ia64/nptl/timer_getoverr.c index 3f21a73c98..24533a0c31 100644 --- a/sysdeps/unix/sysv/linux/ia64/nptl/timer_getoverr.c +++ b/sysdeps/unix/sysv/linux/ia64/nptl/timer_getoverr.c @@ -1 +1 @@ -#include "../x86_64/timer_getoverr.c" +#include diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/timer_gettime.c b/sysdeps/unix/sysv/linux/ia64/nptl/timer_gettime.c index a50143adc5..c1106695e7 100644 --- a/sysdeps/unix/sysv/linux/ia64/nptl/timer_gettime.c +++ b/sysdeps/unix/sysv/linux/ia64/nptl/timer_gettime.c @@ -1 +1 @@ -#include "../x86_64/timer_gettime.c" +#include diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/timer_settime.c b/sysdeps/unix/sysv/linux/ia64/nptl/timer_settime.c index 37baeffacc..93d4ad9344 100644 --- a/sysdeps/unix/sysv/linux/ia64/nptl/timer_settime.c +++ b/sysdeps/unix/sysv/linux/ia64/nptl/timer_settime.c @@ -1 +1 @@ -#include "../x86_64/timer_settime.c" +#include diff --git a/sysdeps/unix/sysv/linux/ia64/sysconf.c b/sysdeps/unix/sysv/linux/ia64/sysconf.c index 2ff8324dc8..3cfb0a9cc5 100644 --- a/sysdeps/unix/sysv/linux/ia64/sysconf.c +++ b/sysdeps/unix/sysv/linux/ia64/sysconf.c @@ -1,5 +1,5 @@ /* Get file-specific information about a file. Linux/ia64 version. - Copyright (C) 2003, 2004, 2011 Free Software Foundation, Inc. + Copyright (C) 2003-2012 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 @@ -27,4 +27,4 @@ /* Now the generic Linux version. */ -#include "../sysconf.c" +#include diff --git a/sysdeps/unix/sysv/linux/ia64/system.c b/sysdeps/unix/sysv/linux/ia64/system.c index d029cdfc72..f02a99e9eb 100644 --- a/sysdeps/unix/sysv/linux/ia64/system.c +++ b/sysdeps/unix/sysv/linux/ia64/system.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2002-2012 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 @@ -31,4 +31,4 @@ &pid, NULL, NULL) #endif -#include "../system.c" +#include From 15be91c2a0f89940d6d6dc69fa698a32f6ee3078 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 16 Apr 2012 22:52:56 -0400 Subject: [PATCH 4314/4487] ia64: add split-out settings into dedicated files Logic specific to ia64 used to live in the main tree in common files. Now that we can't do that (with #ifdef and such), we need to add that logic into dedicated overriding files. Signed-off-by: Mike Frysinger --- ChangeLog.ia64 | 19 ++++++ sysdeps/ia64/elf/stackguard-macros.h | 3 + sysdeps/ia64/ldsodefs.h | 42 ++++++++++++ sysdeps/ia64/nptl/shlib-versions | 1 + sysdeps/ia64/preconfigure | 3 + sysdeps/ia64/shlib-versions | 6 ++ sysdeps/ia64/stackguard-macros.h | 4 ++ sysdeps/ia64/tls-macros.h | 66 +++++++++++++++++++ sysdeps/ia64/tst-audit.h | 25 +++++++ sysdeps/unix/sysv/linux/ia64/configure | 10 +++ sysdeps/unix/sysv/linux/ia64/configure.in | 10 +++ .../unix/sysv/linux/ia64/kernel-features.h | 58 ++++++++++++++++ 12 files changed, 247 insertions(+) create mode 100644 sysdeps/ia64/elf/stackguard-macros.h create mode 100644 sysdeps/ia64/ldsodefs.h create mode 100644 sysdeps/ia64/nptl/shlib-versions create mode 100644 sysdeps/ia64/preconfigure create mode 100644 sysdeps/ia64/shlib-versions create mode 100644 sysdeps/ia64/stackguard-macros.h create mode 100644 sysdeps/ia64/tls-macros.h create mode 100644 sysdeps/ia64/tst-audit.h create mode 100644 sysdeps/unix/sysv/linux/ia64/configure create mode 100644 sysdeps/unix/sysv/linux/ia64/configure.in create mode 100644 sysdeps/unix/sysv/linux/ia64/kernel-features.h diff --git a/ChangeLog.ia64 b/ChangeLog.ia64 index 07dc47c0a6..24f310ad42 100644 --- a/ChangeLog.ia64 +++ b/ChangeLog.ia64 @@ -1,3 +1,22 @@ +2012-04-27 Mike Frysinger + + * sysdeps/ia64/elf/stackguard-macros.h: New stub include file. + * sysdeps/ia64/ldsodefs.h: Move ia64 logic from + sysdeps/generic/ldsodefs.h. + * sysdeps/ia64/nptl/shlib-versions: Move ia64 logic from + nptl/shlib-versions. + * sysdeps/ia64/preconfigure: Move ia64 logic from configure.in. + * sysdeps/ia64/shlib-versions: Move ia64 logic from shlib-versions. + * sysdeps/ia64/stackguard-macros.h: Move ia64 logic from + elf/stackguard-macros.h. + * sysdeps/ia64/tls-macros.h: Move ia64 logic from elf/tls-macros.h. + * sysdeps/ia64/tst-audit.h: Move ia64 logic from elf/tst-auditmod1.c. + * sysdeps/unix/sysv/linux/ia64/configure.in: Move ia64 logic from + sysdeps/unix/sysv/linux/configure. + * sysdeps/unix/sysv/linux/ia64/configure: Generate. + * sysdeps/unix/sysv/linux/ia64/kernel-features.h: Move ia64 logic + from sysdeps/unix/sysv/linux/kernel-features.h. + 2012-04-27 Mike Frysinger * sysdeps/ia64/backtrace.c: Replace all contents with a single diff --git a/sysdeps/ia64/elf/stackguard-macros.h b/sysdeps/ia64/elf/stackguard-macros.h new file mode 100644 index 0000000000..606ad58596 --- /dev/null +++ b/sysdeps/ia64/elf/stackguard-macros.h @@ -0,0 +1,3 @@ +/* Tests in nptl/ look for while tests + in elf/ look for . Provide both. */ +#include "../stackguard-macros.h" diff --git a/sysdeps/ia64/ldsodefs.h b/sysdeps/ia64/ldsodefs.h new file mode 100644 index 0000000000..269319e841 --- /dev/null +++ b/sysdeps/ia64/ldsodefs.h @@ -0,0 +1,42 @@ +/* Run-time dynamic linker data structures for loaded ELF shared objects. + Copyright (C) 2012 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, see + . */ + +#ifndef __LDSODEFS_H + +#include + +struct La_ia64_regs; +struct La_ia64_retval; + +#define ARCH_PLTENTER_MEMBERS \ + Elf64_Addr (*ia64_gnu_pltenter) (Elf64_Sym *, unsigned int, \ + uintptr_t *, uintptr_t *, \ + const struct La_ia64_regs *, \ + unsigned int *, const char *name, \ + long int *framesizep); + +#define ARCH_PLTEXIT_MEMBERS \ + unsigned int (*ia64_gnu_pltexit) (Elf64_Sym *, unsigned int, \ + uintptr_t *, uintptr_t *, \ + const struct La_ia64_regs *, \ + struct La_ia64_retval *, \ + const char *); + +#include_next + +#endif diff --git a/sysdeps/ia64/nptl/shlib-versions b/sysdeps/ia64/nptl/shlib-versions new file mode 100644 index 0000000000..90015eb151 --- /dev/null +++ b/sysdeps/ia64/nptl/shlib-versions @@ -0,0 +1 @@ +ia64.*-.*-linux.* libpthread=0 GLIBC_2.2 diff --git a/sysdeps/ia64/preconfigure b/sysdeps/ia64/preconfigure new file mode 100644 index 0000000000..76cb729fcf --- /dev/null +++ b/sysdeps/ia64/preconfigure @@ -0,0 +1,3 @@ +case "$machine" in +ia64*) libc_commonpagesize=0x4000 ;; +esac diff --git a/sysdeps/ia64/shlib-versions b/sysdeps/ia64/shlib-versions new file mode 100644 index 0000000000..b41f6c2aa3 --- /dev/null +++ b/sysdeps/ia64/shlib-versions @@ -0,0 +1,6 @@ +ia64-.*-linux.* libc=6.1 GLIBC_2.2 +ia64-.*-linux.* libm=6.1 GLIBC_2.2 + +ia64-.*-linux.* ld=ld-linux-ia64.so.2 GLIBC_2.2 + +ia64-.*-.* libBrokenLocale=1 GLIBC_2.2 diff --git a/sysdeps/ia64/stackguard-macros.h b/sysdeps/ia64/stackguard-macros.h new file mode 100644 index 0000000000..dc683c28c5 --- /dev/null +++ b/sysdeps/ia64/stackguard-macros.h @@ -0,0 +1,4 @@ +#include + +#define STACK_CHK_GUARD \ + ({ uintptr_t x; asm ("adds %0 = -8, r13;; ld8 %0 = [%0]" : "=r" (x)); x; }) diff --git a/sysdeps/ia64/tls-macros.h b/sysdeps/ia64/tls-macros.h new file mode 100644 index 0000000000..13b216d85d --- /dev/null +++ b/sysdeps/ia64/tls-macros.h @@ -0,0 +1,66 @@ +/* Macros to support TLS testing in times of missing compiler support. */ + +extern void *__tls_get_addr (void *); + +# define TLS_LE(x) \ + ({ void *__l; \ + asm ("mov r2=r13\n\t" \ + ";;\n\t" \ + "addl %0=@tprel(" #x "),r2\n\t" \ + : "=r" (__l) : : "r2" ); __l; }) + +# define TLS_IE(x) \ + ({ void *__l; \ + register long __gp asm ("gp"); \ + asm (";;\n\t" \ + "addl r16=@ltoff(@tprel(" #x ")),gp\n\t" \ + ";;\n\t" \ + "ld8 r17=[r16]\n\t" \ + ";;\n\t" \ + "add %0=r13,r17\n\t" \ + ";;\n\t" \ + : "=r" (__l) : "r" (__gp) : "r16", "r17" ); __l; }) + +# define __TLS_CALL_CLOBBERS \ + "r2", "r3", "r8", "r9", "r10", "r11", "r14", "r15", "r16", "r17", \ + "r18", "r19", "r20", "r21", "r22", "r23", "r24", "r25", "r26", \ + "r27", "r28", "r29", "r30", "r31", \ + "p6", "p7", "p8", "p9", "p10", "p11", "p12", "p13", "p14", "p15", \ + "f6", "f7", "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", \ + "b6", "b7", \ + "out0", "out1", "out2", "out3", "out4", "out5", "out6", "out7" + +# define TLS_LD(x) \ + ({ void *__l; \ + register long __gp asm ("gp"); \ + asm (";;\n\t" \ + "mov loc0=gp\n\t" \ + "addl r16=@ltoff(@dtpmod(" #x ")),gp\n\t" \ + "addl out1=@dtprel(" #x "),r0\n\t" \ + ";;\n\t" \ + "ld8 out0=[r16]\n\t" \ + "br.call.sptk.many b0=__tls_get_addr" \ + ";;\n\t" \ + "mov gp=loc0\n\t" \ + "mov %0=r8\n\t" \ + ";;\n\t" \ + : "=r" (__l) : "r" (__gp) : "loc0", __TLS_CALL_CLOBBERS); \ + __l; }) + +# define TLS_GD(x) \ + ({ void *__l; \ + register long __gp asm ("gp"); \ + asm (";;\n\t" \ + "mov loc0=gp\n\t" \ + "addl r16=@ltoff(@dtpmod(" #x ")),gp\n\t" \ + "addl r17=@ltoff(@dtprel(" #x ")),gp\n\t" \ + ";;\n\t" \ + "ld8 out0=[r16]\n\t" \ + "ld8 out1=[r17]\n\t" \ + "br.call.sptk.many b0=__tls_get_addr" \ + ";;\n\t" \ + "mov gp=loc0\n\t" \ + "mov %0=r8\n\t" \ + ";;\n\t" \ + : "=r" (__l) : "r" (__gp) : "loc0", __TLS_CALL_CLOBBERS); \ + __l; }) diff --git a/sysdeps/ia64/tst-audit.h b/sysdeps/ia64/tst-audit.h new file mode 100644 index 0000000000..cb4af25711 --- /dev/null +++ b/sysdeps/ia64/tst-audit.h @@ -0,0 +1,25 @@ +/* Definitions for testing PLT entry/exit auditing. IA64 version. + + Copyright (C) 2012 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, see + . */ + +#define pltenter la_ia64_gnu_pltenter +#define pltexit la_ia64_gnu_pltexit +#define La_regs La_ia64_regs +#define La_retval La_ia64_retval +#define int_retval lrv_r8 diff --git a/sysdeps/unix/sysv/linux/ia64/configure b/sysdeps/unix/sysv/linux/ia64/configure new file mode 100644 index 0000000000..3d025f9dda --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/configure @@ -0,0 +1,10 @@ +# This file is generated from configure.in by Autoconf. DO NOT EDIT! + # Local configure fragment for sysdeps/unix/sysv/linux/ia64 + +# There are several bits that no longer compile cleanly without +# realtime signal support (ver 2.2.0). Given that we also now +# require TLS (ver 2.6.0), it seems pointless to fix them. +# ??? Surely this should now be the generic default. +arch_minimum_kernel=2.6.0 + +ldd_rewrite_script=$dir/ldd-rewrite.sed diff --git a/sysdeps/unix/sysv/linux/ia64/configure.in b/sysdeps/unix/sysv/linux/ia64/configure.in new file mode 100644 index 0000000000..99057b8bd1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/configure.in @@ -0,0 +1,10 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/unix/sysv/linux/ia64 + +# There are several bits that no longer compile cleanly without +# realtime signal support (ver 2.2.0). Given that we also now +# require TLS (ver 2.6.0), it seems pointless to fix them. +# ??? Surely this should now be the generic default. +arch_minimum_kernel=2.6.0 + +ldd_rewrite_script=$dir/ldd-rewrite.sed diff --git a/sysdeps/unix/sysv/linux/ia64/kernel-features.h b/sysdeps/unix/sysv/linux/ia64/kernel-features.h new file mode 100644 index 0000000000..3e972602a1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/kernel-features.h @@ -0,0 +1,58 @@ +/* Set flags signalling availability of kernel features based on given + kernel version number. + Copyright (C) 2010-2012 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, see + . */ + +#ifndef _KERNEL_FEATURES_H +#define _KERNEL_FEATURES_H 1 + +/* The late 2.5 kernels saw a lot of new CLONE_* flags. Summarize + their availability with one define. */ +#if __LINUX_KERNEL_VERSION >= 132416 +# define __ASSUME_CLONE_THREAD_FLAGS 1 +#endif + +/* The utimes syscall has been available for some architectures + forever. */ +#define __ASSUME_UTIMES 1 + +/* pselect/ppoll were introduced just after 2.6.16-rc1. Due to the way + the kernel versions are advertised we can only rely on 2.6.17 to have + the code. */ +#if __LINUX_KERNEL_VERSION >= 0x020616 +# define __ASSUME_PSELECT 1 +# define __ASSUME_PPOLL 1 +#endif + +/* Support for various CLOEXEC and NONBLOCK flags was added in 2.6.23. */ +#if __LINUX_KERNEL_VERSION >= 0x020617 +# define __ASSUME_O_CLOEXEC 1 +#endif + +/* Support for various CLOEXEC and NONBLOCK flags was added in 2.6.27. */ +#if __LINUX_KERNEL_VERSION >= 0x02061b +# define __ASSUME_SOCK_CLOEXEC 1 +# define __ASSUME_IN_NONBLOCK 1 +# define __ASSUME_PIPE2 1 +# define __ASSUME_EVENTFD2 1 +# define __ASSUME_SIGNALFD4 1 +# define __ASSUME_DUP3 1 +#endif + +#include_next + +#endif /* _KERNEL_FEATURES_H */ From fd916d779be7ffa3e69c125dadf194e7ddd91cbc Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 16 Apr 2012 22:30:43 -0400 Subject: [PATCH 4315/4487] ia64: merge sysdeps/ia64/elf/ into sysdeps/ia64/ Moved the files, and then pasted the configure.in contents into the parent file. Signed-off-by: Mike Frysinger --- ChangeLog.ia64 | 11 +++ sysdeps/ia64/configure | 146 ++++++++++++++++++++++++++++++--- sysdeps/ia64/configure.in | 32 ++++++++ sysdeps/ia64/elf/configure | 126 ---------------------------- sysdeps/ia64/elf/configure.in | 34 -------- sysdeps/ia64/{elf => }/entry.h | 0 sysdeps/ia64/{elf => }/start.S | 0 7 files changed, 177 insertions(+), 172 deletions(-) delete mode 100644 sysdeps/ia64/elf/configure delete mode 100644 sysdeps/ia64/elf/configure.in rename sysdeps/ia64/{elf => }/entry.h (100%) rename sysdeps/ia64/{elf => }/start.S (100%) diff --git a/ChangeLog.ia64 b/ChangeLog.ia64 index 24f310ad42..cb07ff59e7 100644 --- a/ChangeLog.ia64 +++ b/ChangeLog.ia64 @@ -1,3 +1,14 @@ +2012-04-27 Mike Frysinger + + * sysdeps/ia64/elf/configure.in: Merge contents to ... + * sysdeps/ia64/configure.in: ... here. + * sysdeps/ia64/elf/configure: Delete. + * sysdeps/ia64/configure: Regenerate. + * sysdeps/ia64/elf/entry.h: Move to ... + * sysdeps/ia64/entry.h: ... here. + * sysdeps/ia64/elf/start.S: Move to ... + * sysdeps/ia64/start.S: ... here. + 2012-04-27 Mike Frysinger * sysdeps/ia64/elf/stackguard-macros.h: New stub include file. diff --git a/sysdeps/ia64/configure b/sysdeps/ia64/configure index 67a4b7e620..a3a1137132 100644 --- a/sysdeps/ia64/configure +++ b/sysdeps/ia64/configure @@ -1,9 +1,91 @@ + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + # This file is generated from configure.in by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/ia64. -{ $as_echo "$as_me:$LINENO: checking if -g produces usable source locations for assembler-with-cpp" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if -g produces usable source locations for assembler-with-cpp" >&5 $as_echo_n "checking if -g produces usable source locations for assembler-with-cpp... " >&6; } -if test "${libc_cv_cpp_asm_debuginfo+set}" = set; then +if ${libc_cv_cpp_asm_debuginfo+:} false; then : $as_echo_n "(cached) " >&6 else cat > conftest.S <&5 + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } && { ac_pattern='conftest\.S' { ac_try='readelf --debug-dump=line conftest.o | grep $ac_pattern 1>&5' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } }; then libc_cv_cpp_asm_debuginfo=yes else @@ -44,11 +126,51 @@ else fi rm -f conftest* fi -{ $as_echo "$as_me:$LINENO: result: $libc_cv_cpp_asm_debuginfo" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cpp_asm_debuginfo" >&5 $as_echo "$libc_cv_cpp_asm_debuginfo" >&6; } if test $libc_cv_cpp_asm_debuginfo = yes; then - cat >>confdefs.h <<\_ACEOF -#define HAVE_CPP_ASM_DEBUGINFO 1 -_ACEOF + $as_echo "#define HAVE_CPP_ASM_DEBUGINFO 1" >>confdefs.h fi + +# Check for support of thread-local storage handling in assembler and +# linker. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ia64 TLS support" >&5 +$as_echo_n "checking for ia64 TLS support... " >&6; } +if ${libc_cv_ia64_tls+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.s <<\EOF + .section ".tdata","awT",@progbits +foo: data8 25 + .text + addl r16 = @ltoff(@dtpmod(foo#)), gp + addl r17 = @ltoff(@dtprel(foo#)), gp + addl r18 = @ltoff(@tprel(foo#)), gp + addl r19 = @dtprel(foo#), gp + adds r21 = @dtprel(foo#), r13 + movl r23 = @dtprel(foo#) + addl r20 = @tprel(foo#), gp + adds r22 = @tprel(foo#), r13 + movl r24 = @tprel(foo#) +EOF +if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + libc_cv_ia64_tls=yes +else + libc_cv_ia64_tls=no +fi +rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ia64_tls" >&5 +$as_echo "$libc_cv_ia64_tls" >&6; } +if test $libc_cv_ia64_tls = no; then + as_fn_error $? "the assembler must support TLS" "$LINENO" 5 +fi + +$as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h + diff --git a/sysdeps/ia64/configure.in b/sysdeps/ia64/configure.in index 887b4cb2ed..5f1b1123f9 100644 --- a/sysdeps/ia64/configure.in +++ b/sysdeps/ia64/configure.in @@ -33,3 +33,35 @@ rm -f conftest*])AC_SUBST(libc_cv_cpp_asm_debuginfo) if test $libc_cv_cpp_asm_debuginfo = yes; then AC_DEFINE(HAVE_CPP_ASM_DEBUGINFO) fi + +# Check for support of thread-local storage handling in assembler and +# linker. +AC_CACHE_CHECK(for ia64 TLS support, libc_cv_ia64_tls, [dnl +cat > conftest.s <<\EOF + .section ".tdata","awT",@progbits +foo: data8 25 + .text + addl r16 = @ltoff(@dtpmod(foo#)), gp + addl r17 = @ltoff(@dtprel(foo#)), gp + addl r18 = @ltoff(@tprel(foo#)), gp + addl r19 = @dtprel(foo#), gp + adds r21 = @dtprel(foo#), r13 + movl r23 = @dtprel(foo#) + addl r20 = @tprel(foo#), gp + adds r22 = @tprel(foo#), r13 + movl r24 = @tprel(foo#) +EOF +dnl +if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then + libc_cv_ia64_tls=yes +else + libc_cv_ia64_tls=no +fi +rm -f conftest*]) +if test $libc_cv_ia64_tls = no; then + AC_MSG_ERROR([the assembler must support TLS]) +fi + +dnl It is always possible to access static and hidden symbols in an +dnl position independent way. +AC_DEFINE(PI_STATIC_AND_HIDDEN) diff --git a/sysdeps/ia64/elf/configure b/sysdeps/ia64/elf/configure deleted file mode 100644 index aa30dd0870..0000000000 --- a/sysdeps/ia64/elf/configure +++ /dev/null @@ -1,126 +0,0 @@ - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -# This file is generated from configure.in by Autoconf. DO NOT EDIT! - # Local configure fragment for sysdeps/ia64/elf. - -# Check for support of thread-local storage handling in assembler and -# linker. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ia64 TLS support" >&5 -$as_echo_n "checking for ia64 TLS support... " >&6; } -if ${libc_cv_ia64_tls+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.s <<\EOF - .section ".tdata","awT",@progbits -foo: data8 25 - .text - addl r16 = @ltoff(@dtpmod(foo#)), gp - addl r17 = @ltoff(@dtprel(foo#)), gp - addl r18 = @ltoff(@tprel(foo#)), gp - addl r19 = @dtprel(foo#), gp - adds r21 = @dtprel(foo#), r13 - movl r23 = @dtprel(foo#) - addl r20 = @tprel(foo#), gp - adds r22 = @tprel(foo#), r13 - movl r24 = @tprel(foo#) -EOF -if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - libc_cv_ia64_tls=yes -else - libc_cv_ia64_tls=no -fi -rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ia64_tls" >&5 -$as_echo "$libc_cv_ia64_tls" >&6; } -if test $libc_cv_ia64_tls = no; then - as_fn_error $? "the assembler must support TLS" "$LINENO" 5 -fi - -$as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h - diff --git a/sysdeps/ia64/elf/configure.in b/sysdeps/ia64/elf/configure.in deleted file mode 100644 index 396b9c49cf..0000000000 --- a/sysdeps/ia64/elf/configure.in +++ /dev/null @@ -1,34 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/ia64/elf. - -# Check for support of thread-local storage handling in assembler and -# linker. -AC_CACHE_CHECK(for ia64 TLS support, libc_cv_ia64_tls, [dnl -cat > conftest.s <<\EOF - .section ".tdata","awT",@progbits -foo: data8 25 - .text - addl r16 = @ltoff(@dtpmod(foo#)), gp - addl r17 = @ltoff(@dtprel(foo#)), gp - addl r18 = @ltoff(@tprel(foo#)), gp - addl r19 = @dtprel(foo#), gp - adds r21 = @dtprel(foo#), r13 - movl r23 = @dtprel(foo#) - addl r20 = @tprel(foo#), gp - adds r22 = @tprel(foo#), r13 - movl r24 = @tprel(foo#) -EOF -dnl -if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then - libc_cv_ia64_tls=yes -else - libc_cv_ia64_tls=no -fi -rm -f conftest*]) -if test $libc_cv_ia64_tls = no; then - AC_MSG_ERROR([the assembler must support TLS]) -fi - -dnl It is always possible to access static and hidden symbols in an -dnl position independent way. -AC_DEFINE(PI_STATIC_AND_HIDDEN) diff --git a/sysdeps/ia64/elf/entry.h b/sysdeps/ia64/entry.h similarity index 100% rename from sysdeps/ia64/elf/entry.h rename to sysdeps/ia64/entry.h diff --git a/sysdeps/ia64/elf/start.S b/sysdeps/ia64/start.S similarity index 100% rename from sysdeps/ia64/elf/start.S rename to sysdeps/ia64/start.S From d928ab870ea298961db30cb348e7f89b6225ff1b Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 16 Apr 2012 22:28:03 -0400 Subject: [PATCH 4316/4487] ia64: initfini.c -> crt{i,n}.S split This was done mostly by looking at the processed crt{i,n}.S files in glibc-2.15, and then added the required update for using in either csu/ or nptl/. Seems to work -- when an earlier version didn't call the initializers, many tests (pthread related) failed. Signed-off-by: Mike Frysinger --- ChangeLog.ia64 | 7 + sysdeps/ia64/crti.S | 160 ++++++++++++++++++ sysdeps/ia64/crtn.S | 69 ++++++++ sysdeps/ia64/elf/initfini.c | 151 ----------------- .../unix/sysv/linux/ia64/nptl/pt-initfini.c | 50 ------ 5 files changed, 236 insertions(+), 201 deletions(-) create mode 100644 sysdeps/ia64/crti.S create mode 100644 sysdeps/ia64/crtn.S delete mode 100644 sysdeps/ia64/elf/initfini.c delete mode 100644 sysdeps/unix/sysv/linux/ia64/nptl/pt-initfini.c diff --git a/ChangeLog.ia64 b/ChangeLog.ia64 index cb07ff59e7..b8fb1ce06d 100644 --- a/ChangeLog.ia64 +++ b/ChangeLog.ia64 @@ -1,3 +1,10 @@ +2012-04-27 Mike Frysinger + + * sysdeps/ia64/crti.S: New file. + * sysdeps/ia64/crtn.S: Likewise. + * sysdeps/ia64/elf/initfini.c: Delete. + * sysdeps/unix/sysv/linux/ia64/nptl/pt-initfini.c: Likewise. + 2012-04-27 Mike Frysinger * sysdeps/ia64/elf/configure.in: Merge contents to ... diff --git a/sysdeps/ia64/crti.S b/sysdeps/ia64/crti.S new file mode 100644 index 0000000000..ce13046345 --- /dev/null +++ b/sysdeps/ia64/crti.S @@ -0,0 +1,160 @@ +/* Special .init and .fini section support for IA64. + Copyright (C) 2000-2012 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. + + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + + 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, see + . */ + +/* crti.S puts a function prologue at the beginning of the .init and + .fini sections and defines global symbols for those addresses, so + they can be called as functions. The symbols _init and _fini are + magic and cause the linker to emit DT_INIT and DT_FINI. */ + +#include +#include +#undef ret + +#ifndef PREINIT_FUNCTION +# define PREINIT_FUNCTION __gmon_start__ +#endif + +#ifndef PREINIT_FUNCTION_WEAK +# define PREINIT_FUNCTION_WEAK 1 +#endif + +#if PREINIT_FUNCTION_WEAK + weak_extern (PREINIT_FUNCTION) +#else + .hidden PREINIT_FUNCTION +#endif + +/* If we have working .init_array support, we want to keep the .init + section empty (apart from the mandatory prologue/epilogue. This + ensures that the default unwind conventions (return-pointer in b0, + frame state in ar.pfs, etc.) will do the Right Thing. To ensure + an empty .init section, we register gmon_initializer() via the + .init_array. + + --davidm 02/10/29 */ + +#if PREINIT_FUNCTION_WEAK +/* This blob of assembly code is one simple C function: + +static void +__attribute__ ((used)) +gmon_initializer (void) +{ + extern void weak_function __gmon_start__ (void); + + if (__gmon_start__) + (*__gmon_start__)(); +} + */ + .text + .align 64 + .proc gmon_initializer# +gmon_initializer: + .prologue 12, 32 + .mmi + .save ar.pfs, r33 + alloc r33 = ar.pfs, 0, 3, 0, 0 + addl r14 = @ltoff(@fptr(PREINIT_FUNCTION#)), gp + .save rp, r32 + mov r32 = b0 + .mmi + mov r34 = r1 + .body + ;; + ld8 r14 = [r14] + nop 0 + ;; + .mib + cmp.eq p6, p7 = 0, r14 + nop 0 + (p6) br.cond.spnt .L1 + ;; + .mib + nop 0 + nop 0 + br.call.sptk.many b0 = PREINIT_FUNCTION# + ;; + .mmi + mov r1 = r34 + nop 0 + nop 0 +.L1: + .mii + nop 0 + mov ar.pfs = r33 + nop 0 + ;; + .mib + nop 0 + mov b0 = r32 + br.ret.sptk.many b0 + .endp gmon_initializer# +# undef PREINIT_FUNCTION +# define PREINIT_FUNCTION gmon_initializer +#endif + .section .init_array, "aw" + data8 @fptr(PREINIT_FUNCTION) + + .section .init,"ax",@progbits + .global _init# + .proc _init# +_init: + .prologue + .save ar.pfs, r34 + alloc r34 = ar.pfs, 0, 3, 0, 0 + .vframe r32 + mov r32 = r12 + .save rp, r33 + mov r33 = b0 + .body + adds r12 = -16, r12 + ;; /* see gmon_initializer() above */ + .endp _init# + + .section .fini,"ax",@progbits + .global _fini# + .proc _fini# +_fini: + .prologue + .save ar.pfs, r34 + alloc r34 = ar.pfs, 0, 3, 0, 0 + .vframe r32 + mov r32 = r12 + .save rp, r33 + mov r33 = b0 + .body + adds r12 = -16, r12 + ;; + .endp _fini# diff --git a/sysdeps/ia64/crtn.S b/sysdeps/ia64/crtn.S new file mode 100644 index 0000000000..89b44d1f38 --- /dev/null +++ b/sysdeps/ia64/crtn.S @@ -0,0 +1,69 @@ +/* Special .init and .fini section support for ARM. + Copyright (C) 2000-2012 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. + + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + + 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, see + . */ + +#include +#undef ret + +/* crtn.S puts function epilogues in the .init and .fini sections + corresponding to the prologues in crti.S. */ + + .section .init,"ax",@progbits + .proc _init# +_init: + .prologue + .save ar.pfs, r34 + .vframe r32 + .save rp, r33 + .body + .regstk 0,2,0,0 + mov r12 = r32 + mov ar.pfs = r34 + mov b0 = r33 + br.ret.sptk.many b0 + .endp _init# + + .section .fini,"ax",@progbits + .proc _fini# +_fini: + .prologue + .save ar.pfs, r34 + .vframe r32 + .save rp, r33 + .body + mov r12 = r32 + mov ar.pfs = r34 + mov b0 = r33 + br.ret.sptk.many b0 + .endp _fini# diff --git a/sysdeps/ia64/elf/initfini.c b/sysdeps/ia64/elf/initfini.c deleted file mode 100644 index 3cae895147..0000000000 --- a/sysdeps/ia64/elf/initfini.c +++ /dev/null @@ -1,151 +0,0 @@ -/* Special .init and .fini section support for ia64. - Copyright (C) 2000, 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 - 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. - - In addition to the permissions in the GNU Lesser General Public - License, the Free Software Foundation gives you unlimited - permission to link the compiled version of this file with other - programs, and to distribute those programs without any restriction - coming from the use of this file. (The GNU Lesser General Public - License restrictions do apply in other respects; for example, they - cover modification of the file, and distribution when not linked - into another program.) - - Note that people who make modified versions of this file are not - obligated to grant this special exception for their modified - versions; it is their choice whether to do so. The GNU Lesser - General Public License gives permission to release a modified - version without this exception; this exception also makes it - possible to release a modified version which carries forward this - exception. - - 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, see - . */ - -/* This file is compiled into assembly code which is then munged by a sed - script into two files: crti.s and crtn.s. - - * crti.s puts a function prologue at the beginning of the - .init and .fini sections and defines global symbols for - those addresses, so they can be called as functions. - - * crtn.s puts the corresponding function epilogues - in the .init and .fini sections. */ - -__asm__ ("\n\n" -"#include \"defs.h\"\n" -"\n" -"/*@HEADER_ENDS*/\n" -"\n" -"/*@_init_PROLOG_BEGINS*/\n"); - - -/* If we have working .init_array support, we want to keep the .init - section empty (apart from the mandatory prologue/epilogue. This - ensures that the default unwind conventions (return-pointer in b0, - frame state in ar.pfs, etc.) will do the Right Thing. To ensure - an empty .init section, we register gmon_initializer() via the - .init_array. - - --davidm 02/10/29 */ - -static void -__attribute__ ((used)) -gmon_initializer (void) -{ - extern void weak_function __gmon_start__ (void); - - if (__gmon_start__) - (*__gmon_start__)(); -} - -__asm__ (".section .init_array, \"aw\"\n" - "\tdata8 @fptr(gmon_initializer)\n"); - - -__asm__ (".section .init\n" -" .global _init#\n" -" .proc _init#\n" -"_init:\n" -" .prologue\n" -" .save ar.pfs, r34\n" -" alloc r34 = ar.pfs, 0, 3, 0, 0\n" -" .vframe r32\n" -" mov r32 = r12\n" -" .save rp, r33\n" -" mov r33 = b0\n" -" .body\n" -" adds r12 = -16, r12\n" -" ;;\n" /* see gmon_initializer() above */ -" .endp _init#\n" -"\n" -"/*@_init_PROLOG_ENDS*/\n" -"\n" -"/*@_init_EPILOG_BEGINS*/\n" -" .section .init\n" -" .proc _init#\n" -"_init:\n" -" .prologue\n" -" .save ar.pfs, r34\n" -" .vframe r32\n" -" .save rp, r33\n" -" .body\n" -" .regstk 0,2,0,0\n" -" mov r12 = r32\n" -" mov ar.pfs = r34\n" -" mov b0 = r33\n" -" br.ret.sptk.many b0\n" -" .endp _init#\n" -"/*@_init_EPILOG_ENDS*/\n" -"\n" -"/*@_fini_PROLOG_BEGINS*/\n" -" .section .fini\n" -" .global _fini#\n" -" .proc _fini#\n" -"_fini:\n" -" .prologue\n" -" .save ar.pfs, r34\n" -" alloc r34 = ar.pfs, 0, 3, 0, 0\n" -" .vframe r32\n" -" mov r32 = r12\n" -" .save rp, r33\n" -" mov r33 = b0\n" -" .body\n" -" adds r12 = -16, r12\n" -" ;;\n" -" .endp _fini#\n" -"\n" -"/*@_fini_PROLOG_ENDS*/\n" -" br.call.sptk.many b0 = i_am_not_a_leaf# ;;\n" -" ;;\n" -"\n" -"/*@_fini_EPILOG_BEGINS*/\n" -" .section .fini\n" -" .proc _fini#\n" -"_fini:\n" -" .prologue\n" -" .save ar.pfs, r34\n" -" .vframe r32\n" -" .save rp, r33\n" -" .body\n" -" mov r12 = r32\n" -" mov ar.pfs = r34\n" -" mov b0 = r33\n" -" br.ret.sptk.many b0\n" -" .endp _fini#\n" -"\n" -"/*@_fini_EPILOG_ENDS*/\n" -"\n" -"/*@TRAILER_BEGINS*/\n" -); diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/pt-initfini.c b/sysdeps/unix/sysv/linux/ia64/nptl/pt-initfini.c deleted file mode 100644 index b6d2cec0d0..0000000000 --- a/sysdeps/unix/sysv/linux/ia64/nptl/pt-initfini.c +++ /dev/null @@ -1,50 +0,0 @@ -/* Special .init and .fini section support for ia64. NPTL version. - Copyright (C) 2000, 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 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. - - In addition to the permissions in the GNU Lesser General Public - License, the Free Software Foundation gives you unlimited - permission to link the compiled version of this file with other - programs, and to distribute those programs without any restriction - coming from the use of this file. (The Lesser General Public - License restrictions do apply in other respects; for example, they - cover modification of the file, and distribution when not linked - into another program.) - - 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; see the file COPYING.LIB. If not, - write to the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* This file is compiled into assembly code which is then munged by a sed - script into two files: crti.s and crtn.s. - - * crti.s puts a function prologue at the beginning of the - .init and .fini sections and defines global symbols for - those addresses, so they can be called as functions. - - * crtn.s puts the corresponding function epilogues - in the .init and .fini sections. */ - -#include - - -__asm__ ("\n\ -#include \"defs.h\"\n\ -\n\ -/*@HEADER_ENDS*/\n\ -\n\ -/*@_init_PROLOG_BEGINS*/\n\ - .xdata8 \".init_array\",@fptr(__pthread_initialize_minimal_internal)\n\ -/*@_init_PROLOG_ENDS*/\n\ -"); From 6eeb0e8f7fc7c725a4605220c3f706b9eebdd83e Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 16 Apr 2012 22:16:47 -0400 Subject: [PATCH 4317/4487] ia64: convert to <_itoa.h> The main tree relocated the _itoa.h header, so update our include paths to match. Processed with a simple sed script: find `find sysdeps/ -name ia64` -type f -exec sed -i \ '//s::<_itoa.h>:' {} + Signed-off-by: Mike Frysinger --- ChangeLog.ia64 | 5 +++++ sysdeps/ia64/hp-timing.h | 4 ++-- sysdeps/unix/sysv/linux/ia64/register-dump.h | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog.ia64 b/ChangeLog.ia64 index b8fb1ce06d..85a3129d01 100644 --- a/ChangeLog.ia64 +++ b/ChangeLog.ia64 @@ -1,3 +1,8 @@ +2012-04-27 Mike Frysinger + + * sysdeps/ia64/hp-timing.h: Change stdio-common/_itoa.h to _itoa.h. + * sysdeps/unix/sysv/linux/ia64/register-dump.h: Likewise. + 2012-04-27 Mike Frysinger * sysdeps/ia64/crti.S: New file. diff --git a/sysdeps/ia64/hp-timing.h b/sysdeps/ia64/hp-timing.h index 2ee6237e8c..93f091a349 100644 --- a/sysdeps/ia64/hp-timing.h +++ b/sysdeps/ia64/hp-timing.h @@ -1,5 +1,5 @@ /* High precision, low overhead timing functions. IA-64 version. - Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 2001-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2001. @@ -22,7 +22,7 @@ #include #include -#include +#include <_itoa.h> #include /* The macros defined here use the timestamp counter in IA-64. They diff --git a/sysdeps/unix/sysv/linux/ia64/register-dump.h b/sysdeps/unix/sysv/linux/ia64/register-dump.h index 42b99c3bf5..ac34a81fa2 100644 --- a/sysdeps/unix/sysv/linux/ia64/register-dump.h +++ b/sysdeps/unix/sysv/linux/ia64/register-dump.h @@ -1,5 +1,5 @@ /* Dump registers. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek , 2004. @@ -19,7 +19,7 @@ #include #include -#include +#include <_itoa.h> /* We will print the register dump in this format: From 60318997b84ab88b1a89f649a9c7dd832439091e Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 16 Apr 2012 22:19:02 -0400 Subject: [PATCH 4318/4487] ia64: convert "math{,_private}.h" to The main tree decided to change all these includes to <...>, so update the ia64 code accordingly. Processed with a simple sed script: find `find sysdeps/ -name ia64` -type f -exec sed -i \ -r '/include/s:"(math.h|math_private.h)":<\1>:' {} + Signed-off-by: Mike Frysinger --- ChangeLog.ia64 | 6 ++++++ sysdeps/ia64/fpu/s_matherrf.c | 4 ++-- sysdeps/ia64/fpu/s_matherrl.c | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog.ia64 b/ChangeLog.ia64 index 85a3129d01..f48cbf9072 100644 --- a/ChangeLog.ia64 +++ b/ChangeLog.ia64 @@ -1,3 +1,9 @@ +2012-04-27 Mike Frysinger + + * sysdeps/ia64/fpu/s_matherrf.c: Change "math.h" and "math_private.h" + to and . + * sysdeps/ia64/fpu/s_matherrl.c: Likewise. + 2012-04-27 Mike Frysinger * sysdeps/ia64/hp-timing.h: Change stdio-common/_itoa.h to _itoa.h. diff --git a/sysdeps/ia64/fpu/s_matherrf.c b/sysdeps/ia64/fpu/s_matherrf.c index 4b3033ecc3..31f52aa408 100644 --- a/sysdeps/ia64/fpu/s_matherrf.c +++ b/sysdeps/ia64/fpu/s_matherrf.c @@ -11,8 +11,8 @@ */ -#include "math.h" -#include "math_private.h" +#include +#include #include "libm_support.h" #ifdef __STDC__ diff --git a/sysdeps/ia64/fpu/s_matherrl.c b/sysdeps/ia64/fpu/s_matherrl.c index 751cc6b51e..e0bf638342 100644 --- a/sysdeps/ia64/fpu/s_matherrl.c +++ b/sysdeps/ia64/fpu/s_matherrl.c @@ -11,8 +11,8 @@ */ -#include "math.h" -#include "math_private.h" +#include +#include #include "libm_support.h" #ifdef __STDC__ From 293432b4af0862e35d74c1dc84cec496b6611daf Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 16 Apr 2012 22:21:32 -0400 Subject: [PATCH 4319/4487] ia64: convert __const to const The main tree decided to drop support for pre-ISO C code, so we can use "const" instead of "__const". Processed with a simple sed script: find `find sysdeps/ -name ia64` -type f -exec sed -i \ 's:\<__const\>:const:' {} + Signed-off-by: Mike Frysinger --- ChangeLog.ia64 | 5 +++++ sysdeps/ia64/bits/fenv.h | 8 ++++---- sysdeps/unix/sysv/linux/ia64/swapcontext.c | 4 ++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/ChangeLog.ia64 b/ChangeLog.ia64 index f48cbf9072..6bdca2cf0b 100644 --- a/ChangeLog.ia64 +++ b/ChangeLog.ia64 @@ -1,3 +1,8 @@ +2012-04-27 Mike Frysinger + + * sysdeps/ia64/bits/fenv.h: Change __const to const. + * sysdeps/unix/sysv/linux/ia64/swapcontext.c: Likewise. + 2012-04-27 Mike Frysinger * sysdeps/ia64/fpu/s_matherrf.c: Change "math.h" and "math_private.h" diff --git a/sysdeps/ia64/bits/fenv.h b/sysdeps/ia64/bits/fenv.h index 0422a95d7e..342605d8ce 100644 --- a/sysdeps/ia64/bits/fenv.h +++ b/sysdeps/ia64/bits/fenv.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1999-2012 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 @@ -72,15 +72,15 @@ typedef unsigned long int fexcept_t; typedef unsigned long int fenv_t; /* If the default argument is used we use this value. */ -#define FE_DFL_ENV ((__const fenv_t *) 0xc009804c0270033fUL) +#define FE_DFL_ENV ((const fenv_t *) 0xc009804c0270033fUL) #ifdef __USE_GNU /* Floating-point environment where only FE_UNNORMAL is masked since this exception is not generally supported by glibc. */ -# define FE_NOMASK_ENV ((__const fenv_t *) 0xc009804c02700302UL) +# define FE_NOMASK_ENV ((const fenv_t *) 0xc009804c02700302UL) /* Floating-point environment with (processor-dependent) non-IEEE floating point. In this case, turning on flush-to-zero mode for s0, s2, and s3. */ -# define FE_NONIEEE_ENV ((__const fenv_t *) 0xc009a04d0270037fUL) +# define FE_NONIEEE_ENV ((const fenv_t *) 0xc009a04d0270037fUL) #endif diff --git a/sysdeps/unix/sysv/linux/ia64/swapcontext.c b/sysdeps/unix/sysv/linux/ia64/swapcontext.c index 2ccc2eea96..20a20ac2ba 100644 --- a/sysdeps/unix/sysv/linux/ia64/swapcontext.c +++ b/sysdeps/unix/sysv/linux/ia64/swapcontext.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001 Free Software Foundation, Inc. +/* Copyright (C) 2001-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger-Tang . @@ -25,7 +25,7 @@ struct rv }; extern struct rv __getcontext (ucontext_t *__ucp) __THROW; -extern int __setcontext (__const ucontext_t *__ucp) __THROW; +extern int __setcontext (const ucontext_t *__ucp) __THROW; int __swapcontext (ucontext_t *oucp, const ucontext_t *ucp) From 421ff1c38d42f98a9a0922991c57639d66dbf144 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 16 Apr 2012 22:36:02 -0400 Subject: [PATCH 4320/4487] ia64: math: stub out new e_rem_pio2l func The ia64 math code stubs out the existing [er]_rem_*.c files, but the main tree has added a new one since its removal. Stub out that new file too. Signed-off-by: Mike Frysinger --- ChangeLog.ia64 | 4 ++++ sysdeps/ia64/fpu/e_rem_pio2l.c | 1 + 2 files changed, 5 insertions(+) create mode 100644 sysdeps/ia64/fpu/e_rem_pio2l.c diff --git a/ChangeLog.ia64 b/ChangeLog.ia64 index 6bdca2cf0b..3d7abe5a85 100644 --- a/ChangeLog.ia64 +++ b/ChangeLog.ia64 @@ -1,3 +1,7 @@ +2012-04-27 Mike Frysinger + + * sysdeps/ia64/fpu/e_rem_pio2l.c: New file. + 2012-04-27 Mike Frysinger * sysdeps/ia64/bits/fenv.h: Change __const to const. diff --git a/sysdeps/ia64/fpu/e_rem_pio2l.c b/sysdeps/ia64/fpu/e_rem_pio2l.c new file mode 100644 index 0000000000..41254ae60a --- /dev/null +++ b/sysdeps/ia64/fpu/e_rem_pio2l.c @@ -0,0 +1 @@ +/* Not needed. */ From 16aca1f7711898a516c63b78528d33afa46213a2 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 16 Apr 2012 22:39:07 -0400 Subject: [PATCH 4321/4487] ia64: drop __STDC__ handlings The main tree dropped support for !__STDC__ code, so drop it from the few places in the ia64 code too. Signed-off-by: Mike Frysinger --- ChangeLog.ia64 | 6 ++++++ sysdeps/ia64/fpu/s_matherrf.c | 13 +++---------- sysdeps/ia64/fpu/s_matherrl.c | 13 +++---------- sysdeps/unix/sysv/linux/ia64/sysdep.h | 9 ++------- 4 files changed, 14 insertions(+), 27 deletions(-) diff --git a/ChangeLog.ia64 b/ChangeLog.ia64 index 3d7abe5a85..83ae6bf57d 100644 --- a/ChangeLog.ia64 +++ b/ChangeLog.ia64 @@ -1,3 +1,9 @@ +2012-04-27 Mike Frysinger + + * sysdeps/ia64/fpu/s_matherrf.c: Delete __STDC__. + * sysdeps/ia64/fpu/s_matherrl.c, + sysdeps/unix/sysv/linux/ia64/sysdep.h: Likewise. + 2012-04-27 Mike Frysinger * sysdeps/ia64/fpu/e_rem_pio2l.c: New file. diff --git a/sysdeps/ia64/fpu/s_matherrf.c b/sysdeps/ia64/fpu/s_matherrf.c index 31f52aa408..a47d4b89a2 100644 --- a/sysdeps/ia64/fpu/s_matherrf.c +++ b/sysdeps/ia64/fpu/s_matherrf.c @@ -15,16 +15,9 @@ #include #include "libm_support.h" -#ifdef __STDC__ - int - weak_function - __matherrf(struct exceptionf *x) -#else - int - weak_function - __matherrf(x) - struct exceptionf *x; -#endif +int +weak_function +__matherrf(struct exceptionf *x) { int n=0; if(x->arg1!=x->arg1) return 0; diff --git a/sysdeps/ia64/fpu/s_matherrl.c b/sysdeps/ia64/fpu/s_matherrl.c index e0bf638342..6fe92d7739 100644 --- a/sysdeps/ia64/fpu/s_matherrl.c +++ b/sysdeps/ia64/fpu/s_matherrl.c @@ -15,16 +15,9 @@ #include #include "libm_support.h" -#ifdef __STDC__ - int - weak_function - __matherrl(struct exceptionl *x) -#else - int - weak_function - __matherrl(x) - struct exceptionl *x; -#endif +int +weak_function +__matherrl(struct exceptionl *x) { int n=0; if(x->arg1!=x->arg1) return 0; diff --git a/sysdeps/unix/sysv/linux/ia64/sysdep.h b/sysdeps/unix/sysv/linux/ia64/sysdep.h index 2927634377..ebaec95279 100644 --- a/sysdeps/unix/sysv/linux/ia64/sysdep.h +++ b/sysdeps/unix/sysv/linux/ia64/sysdep.h @@ -1,5 +1,4 @@ -/* Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005, 2006 - Free Software Foundation, Inc. +/* Copyright (C) 1999-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Jes Sorensen, , April 1999. Based on code originally written by David Mosberger-Tang @@ -38,11 +37,7 @@ of the kernel. But these symbols do not follow the SYS_* syntax so we have to redefine the `SYS_ify' macro here. */ #undef SYS_ify -#ifdef __STDC__ -# define SYS_ify(syscall_name) __NR_##syscall_name -#else -# define SYS_ify(syscall_name) __NR_/**/syscall_name -#endif +#define SYS_ify(syscall_name) __NR_##syscall_name /* This is a kludge to make syscalls.list find these under the names pread and pwrite, since some kernel headers define those names From 413a8f40ecad7b78ceed0c098832004d4f3cb16e Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 16 Apr 2012 22:43:09 -0400 Subject: [PATCH 4322/4487] ia64: math: add __scalbn* aliases All other ports have __scalbn* aliases pointing back to scalbn*, but the ia64 code had omitted them. This didn't really matter as none of the common code called them, but after a recent update, that's no longer true. Add the aliases needed by some common code to fix link errors with libm due to them missing. Signed-off-by: Mike Frysinger --- ChangeLog.ia64 | 9 +++++++++ sysdeps/ia64/fpu/s_scalbn.c | 4 +++- sysdeps/ia64/fpu/s_scalbnf.c | 4 +++- sysdeps/ia64/fpu/s_scalbnl.c | 4 +++- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/ChangeLog.ia64 b/ChangeLog.ia64 index 83ae6bf57d..0d81ccdea4 100644 --- a/ChangeLog.ia64 +++ b/ChangeLog.ia64 @@ -1,3 +1,12 @@ +2012-04-27 Mike Frysinger + + * sysdeps/ia64/fpu/s_scalbn.c (__scalbn): Rename from scalbn. + Add weak alias from scalbn to __scalbn. + * sysdeps/ia64/fpu/s_scalbnf.c (__scalbnf): Rename from scalbnf. + Add weak alias from scalbnf to __scalbnf. + * sysdeps/ia64/fpu/s_scalbnl.c (__scalbnl): Rename from scalbnl. + Add weak alias from scalbnl to __scalbnl. + 2012-04-27 Mike Frysinger * sysdeps/ia64/fpu/s_matherrf.c: Delete __STDC__. diff --git a/sysdeps/ia64/fpu/s_scalbn.c b/sysdeps/ia64/fpu/s_scalbn.c index 25cfad32ad..23e8d818b2 100644 --- a/sysdeps/ia64/fpu/s_scalbn.c +++ b/sysdeps/ia64/fpu/s_scalbn.c @@ -45,7 +45,7 @@ double __libm_scalbn(double, int, int); -double scalbn(double x, int n) +double __scalbn(double x, int n) { #ifdef SIZE_INT_64 @@ -59,3 +59,5 @@ double scalbn(double x, int n) #endif } + +weak_alias (__scalbn, scalbn) diff --git a/sysdeps/ia64/fpu/s_scalbnf.c b/sysdeps/ia64/fpu/s_scalbnf.c index deab018a3e..ec2582cddc 100644 --- a/sysdeps/ia64/fpu/s_scalbnf.c +++ b/sysdeps/ia64/fpu/s_scalbnf.c @@ -45,7 +45,7 @@ float __libm_scalbnf(float, int, int); -float scalbnf(float x, int n) +float __scalbnf(float x, int n) { #ifdef SIZE_INT_64 @@ -59,3 +59,5 @@ float scalbnf(float x, int n) #endif } + +weak_alias (__scalbnf, scalbnf) diff --git a/sysdeps/ia64/fpu/s_scalbnl.c b/sysdeps/ia64/fpu/s_scalbnl.c index cfd078bfc9..73ffb904b7 100644 --- a/sysdeps/ia64/fpu/s_scalbnl.c +++ b/sysdeps/ia64/fpu/s_scalbnl.c @@ -45,7 +45,7 @@ long double __libm_scalbnl(long double, int, int); -long double scalbnl(long double x, int n) +long double __scalbnl(long double x, int n) { #ifdef SIZE_INT_64 @@ -59,3 +59,5 @@ long double scalbnl(long double x, int n) #endif } + +weak_alias (__scalbnl, scalbnl) From 7e4fc5890e07549e5ad98b4244e3e0ed5c709e6a Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 16 Apr 2012 22:44:23 -0400 Subject: [PATCH 4323/4487] ia64: add MAP_{STACK,HUGETLB} to bits/mman.h Just adding new bit flags that newer kernels define. Signed-off-by: Mike Frysinger --- ChangeLog.ia64 | 5 +++++ sysdeps/unix/sysv/linux/ia64/bits/mman.h | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog.ia64 b/ChangeLog.ia64 index 0d81ccdea4..111cb5b456 100644 --- a/ChangeLog.ia64 +++ b/ChangeLog.ia64 @@ -1,3 +1,8 @@ +2012-04-27 Mike Frysinger + + * sysdeps/unix/sysv/linux/ia64/bits/mman.h (MAP_STACK): Define. + (MAP_HUGETLB): Likewise. + 2012-04-27 Mike Frysinger * sysdeps/ia64/fpu/s_scalbn.c (__scalbn): Rename from scalbn. diff --git a/sysdeps/unix/sysv/linux/ia64/bits/mman.h b/sysdeps/unix/sysv/linux/ia64/bits/mman.h index 7afb2e9f5f..01c6b8ac2b 100644 --- a/sysdeps/unix/sysv/linux/ia64/bits/mman.h +++ b/sysdeps/unix/sysv/linux/ia64/bits/mman.h @@ -1,6 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/ia64 version. - Copyright (C) 1997,1998,2000,2003,2005,2006,2009,2011 - Free Software Foundation, Inc. + Copyright (C) 1997-2012 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 @@ -64,6 +63,8 @@ # define MAP_NORESERVE 0x04000 /* Don't check for reservations. */ # define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */ # define MAP_NONBLOCK 0x10000 /* Do not block on IO. */ +# define MAP_STACK 0x20000 /* Allocation is for a stack. */ +# define MAP_HUGETLB 0x40000 /* Create huge page mapping. */ #endif /* Flags to `msync'. */ From e43013840b7e68e2f725b0d689bcd1d0f688de15 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 16 Apr 2012 22:44:55 -0400 Subject: [PATCH 4324/4487] ia64: pthread_attr_t type mangling This applies the same updates that already exist in the main tree for making the pthread_attr_t union more standards compliant. Signed-off-by: Mike Frysinger --- ChangeLog.ia64 | 6 ++++++ sysdeps/unix/sysv/linux/ia64/nptl/bits/pthreadtypes.h | 10 +++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ChangeLog.ia64 b/ChangeLog.ia64 index 111cb5b456..fea858230b 100644 --- a/ChangeLog.ia64 +++ b/ChangeLog.ia64 @@ -1,3 +1,9 @@ +2012-04-27 Mike Frysinger + + * sysdeps/unix/sysv/linux/ia64/nptl/bits/pthreadtypes.h + (pthread_attr_t): Change union tag to pthread_attr_t. Only define + typedef if not already defined. + 2012-04-27 Mike Frysinger * sysdeps/unix/sysv/linux/ia64/bits/mman.h (MAP_STACK): Define. diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/ia64/nptl/bits/pthreadtypes.h index 4f87f8b61e..5b30713069 100644 --- a/sysdeps/unix/sysv/linux/ia64/nptl/bits/pthreadtypes.h +++ b/sysdeps/unix/sysv/linux/ia64/nptl/bits/pthreadtypes.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. +/* Copyright (C) 2003-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek , 2003. @@ -35,11 +35,15 @@ typedef unsigned long int pthread_t; -typedef union +union pthread_attr_t { char __size[__SIZEOF_PTHREAD_ATTR_T]; long int __align; -} pthread_attr_t; +}; +#ifndef __have_pthread_attr_t +typedef union pthread_attr_t pthread_attr_t; +# define __have_pthread_attr_t 1 +#endif typedef struct __pthread_internal_list From 91e5f2e441de61f8a2130b9eb5bf5ae0ada00357 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 16 Apr 2012 22:45:14 -0400 Subject: [PATCH 4325/4487] ia64: ucontext.h: drop __cplusplus Building a lot of glibc files trigger warnings like so: .../ucontext.h:52:25: warning: variably modified '_pad' at file scope The ia64 header protects the use of __builtin_offsetof by a C++ compiler, but this builtin works just fine with C compilers, so allow it to be used there too. Signed-off-by: Mike Frysinger --- ChangeLog.ia64 | 5 +++++ sysdeps/unix/sysv/linux/ia64/sys/ucontext.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog.ia64 b/ChangeLog.ia64 index fea858230b..803a24857f 100644 --- a/ChangeLog.ia64 +++ b/ChangeLog.ia64 @@ -1,3 +1,8 @@ +2012-04-27 Mike Frysinger + + * sysdeps/unix/sysv/linux/ia64/sys/ucontext.h: Delete __cplusplus + define check. + 2012-04-27 Mike Frysinger * sysdeps/unix/sysv/linux/ia64/nptl/bits/pthreadtypes.h diff --git a/sysdeps/unix/sysv/linux/ia64/sys/ucontext.h b/sysdeps/unix/sysv/linux/ia64/sys/ucontext.h index 852500750d..e1fa8c609d 100644 --- a/sysdeps/unix/sysv/linux/ia64/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/ia64/sys/ucontext.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2000, 2001, 2002, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1998-2012 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 @@ -31,7 +31,7 @@ typedef struct sigcontext mcontext_t; -#if defined __cplusplus && __GNUC_PREREQ (3, 5) +#if __GNUC_PREREQ (3, 5) # define _SC_GR0_OFFSET \ __builtin_offsetof (struct sigcontext, sc_gr[0]) #elif defined __GNUC__ From 756b23ec1b8c32fc8355beaecbdddada8b1b4402 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 16 Apr 2012 22:47:48 -0400 Subject: [PATCH 4326/4487] ia64: split 16bit funcs out of byteswap.h and into byteswap-16.h The main tree split the 16bit byteswap funcs out into a dedicated header. Do the same for ia64. Signed-off-by: Mike Frysinger --- ChangeLog.ia64 | 6 +++++ sysdeps/ia64/bits/byteswap-16.h | 42 +++++++++++++++++++++++++++++++++ sysdeps/ia64/bits/byteswap.h | 26 +++----------------- 3 files changed, 51 insertions(+), 23 deletions(-) create mode 100644 sysdeps/ia64/bits/byteswap-16.h diff --git a/ChangeLog.ia64 b/ChangeLog.ia64 index 803a24857f..f9469b2a11 100644 --- a/ChangeLog.ia64 +++ b/ChangeLog.ia64 @@ -1,3 +1,9 @@ +2012-04-27 Mike Frysinger + + * sysdeps/ia64/bits/byteswap.h (__bswap_16): Removed. + Include to get __bswap_16. + * sysdeps/ia64/bits/byteswap-16.h: New file. + 2012-04-27 Mike Frysinger * sysdeps/unix/sysv/linux/ia64/sys/ucontext.h: Delete __cplusplus diff --git a/sysdeps/ia64/bits/byteswap-16.h b/sysdeps/ia64/bits/byteswap-16.h new file mode 100644 index 0000000000..0a85909276 --- /dev/null +++ b/sysdeps/ia64/bits/byteswap-16.h @@ -0,0 +1,42 @@ +/* Macros to swap the order of bytes in 16-bit integer values. + Copyright (C) 1997-2012 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, see + . */ + +#ifndef _BITS_BYTESWAP_H +# error "Never use directly; include instead." +#endif + +#if defined __GNUC__ && __GNUC__ >= 2 +# define __bswap_16(x) \ + (__extension__ \ + ({ register unsigned short int __v, __x = (x); \ + if (__builtin_constant_p (x)) \ + __v = __bswap_constant_16 (__x); \ + else \ + __asm__ __volatile__ ("shl %0 = %1, 48 ;;" \ + "mux1 %0 = %0, @rev ;;" \ + : "=r" (__v) \ + : "r" ((unsigned short int) (__x))); \ + __v; })) +#else +/* This is better than nothing. */ +static __inline unsigned short int +__bswap_16 (unsigned short int __bsx) +{ + return __bswap_constant_16 (__bsx); +} +#endif diff --git a/sysdeps/ia64/bits/byteswap.h b/sysdeps/ia64/bits/byteswap.h index db7824a42f..68612487d3 100644 --- a/sysdeps/ia64/bits/byteswap.h +++ b/sysdeps/ia64/bits/byteswap.h @@ -1,6 +1,5 @@ /* Macros to swap the order of bytes in integer values. - Copyright (C) 1997,1998,2000,2002,2003,2008,2011 - Free Software Foundation, Inc. + Copyright (C) 1997-2012 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,27 +27,8 @@ #define __bswap_constant_16(x) \ ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)) -#if defined __GNUC__ && __GNUC__ >= 2 -# define __bswap_16(x) \ - (__extension__ \ - ({ register unsigned short int __v, __x = (x); \ - if (__builtin_constant_p (x)) \ - __v = __bswap_constant_16 (__x); \ - else \ - __asm__ __volatile__ ("shl %0 = %1, 48 ;;" \ - "mux1 %0 = %0, @rev ;;" \ - : "=r" (__v) \ - : "r" ((unsigned short int) (__x))); \ - __v; })) -#else -/* This is better than nothing. */ -static __inline unsigned short int -__bswap_16 (unsigned short int __bsx) -{ - return __bswap_constant_16 (__bsx); -} -#endif - +/* Get __bswap_16. */ +#include /* Swap bytes in 32 bit value. */ #define __bswap_constant_32(x) \ From 4723e427b515fdc8d05033474d12b06bb8e65404 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 16 Apr 2012 22:51:44 -0400 Subject: [PATCH 4327/4487] ia64: add new GET_ADDR_PARAM define The main tree updated the dl-tls code to use a new GET_ADDR_PARAM macro. We need to define that to fix a build error due to it missing. Signed-off-by: Mike Frysinger --- ChangeLog.ia64 | 4 ++++ sysdeps/ia64/dl-tls.h | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.ia64 b/ChangeLog.ia64 index f9469b2a11..1e570b254c 100644 --- a/ChangeLog.ia64 +++ b/ChangeLog.ia64 @@ -1,3 +1,7 @@ +2012-04-27 Mike Frysinger + + * sysdeps/ia64/dl-tls.h (GET_ADDR_PARAM): Define. + 2012-04-27 Mike Frysinger * sysdeps/ia64/bits/byteswap.h (__bswap_16): Removed. diff --git a/sysdeps/ia64/dl-tls.h b/sysdeps/ia64/dl-tls.h index 9e7e7bc50d..1fc35bc7ef 100644 --- a/sysdeps/ia64/dl-tls.h +++ b/sysdeps/ia64/dl-tls.h @@ -1,5 +1,5 @@ /* Thread-local storage handling in the ELF dynamic linker. IA-64 version. - Copyright (C) 2002, 2003, 2011 Free Software Foundation, Inc. + Copyright (C) 2002-2012 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,6 +20,7 @@ /* On IA-64 the __tls_get_addr function take the module ID and the offset as parameters. */ #define GET_ADDR_ARGS size_t m, size_t offset +#define GET_ADDR_PARAM m, offset #define GET_ADDR_MODULE m #define GET_ADDR_OFFSET offset From 4625d0ae8d5b2862c7ff8989cc8fd39320f4110c Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 16 Apr 2012 22:55:11 -0400 Subject: [PATCH 4328/4487] ia64: define __ASSUME_ACCEPT4 The latest kernels finally added accept4() to the ia64 kernel. Define __ASSUME_ACCEPT4 accordingly. Signed-off-by: Mike Frysinger --- ChangeLog.ia64 | 5 +++++ sysdeps/unix/sysv/linux/ia64/kernel-features.h | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog.ia64 b/ChangeLog.ia64 index 1e570b254c..b1c2537ce4 100644 --- a/ChangeLog.ia64 +++ b/ChangeLog.ia64 @@ -1,3 +1,8 @@ +2012-04-27 Mike Frysinger + + * sysdeps/unix/sysv/linux/ia64/kernel-features.h (__ASSUME_ACCEPT4): + Define. + 2012-04-27 Mike Frysinger * sysdeps/ia64/dl-tls.h (GET_ADDR_PARAM): Define. diff --git a/sysdeps/unix/sysv/linux/ia64/kernel-features.h b/sysdeps/unix/sysv/linux/ia64/kernel-features.h index 3e972602a1..f8dc4812cf 100644 --- a/sysdeps/unix/sysv/linux/ia64/kernel-features.h +++ b/sysdeps/unix/sysv/linux/ia64/kernel-features.h @@ -53,6 +53,11 @@ # define __ASSUME_DUP3 1 #endif +/* Support for the accept4 syscall was added in 3.3. */ +#if __LINUX_KERNEL_VERSION >= 0x030300 +# define __ASSUME_ACCEPT4 1 +#endif + #include_next #endif /* _KERNEL_FEATURES_H */ From f0984e264ed663c66151f759bb30118d08c4b619 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 17 Apr 2012 23:31:26 -0400 Subject: [PATCH 4329/4487] ia64: math: rename s_ilogbl.S to e_ilogbl.S The main tree renamed these files as well as the symbols. Update ia64 accordingly. Signed-off-by: Mike Frysinger --- ChangeLog.ia64 | 6 ++++++ sysdeps/ia64/fpu/{s_ilogbl.S => e_ilogbl.S} | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) rename sysdeps/ia64/fpu/{s_ilogbl.S => e_ilogbl.S} (99%) diff --git a/ChangeLog.ia64 b/ChangeLog.ia64 index b1c2537ce4..4467e3c509 100644 --- a/ChangeLog.ia64 +++ b/ChangeLog.ia64 @@ -1,3 +1,9 @@ +2012-04-27 Mike Frysinger + + * sysdeps/ia64/fpu/s_ilogbl.S: Move to ... + * sysdeps/ia64/fpu/e_ilogbl.S: ... here. + (__ieee754_ilogbl): Rename from ilogbl. + 2012-04-27 Mike Frysinger * sysdeps/unix/sysv/linux/ia64/kernel-features.h (__ASSUME_ACCEPT4): diff --git a/sysdeps/ia64/fpu/s_ilogbl.S b/sysdeps/ia64/fpu/e_ilogbl.S similarity index 99% rename from sysdeps/ia64/fpu/s_ilogbl.S rename to sysdeps/ia64/fpu/e_ilogbl.S index 8a6c9dc710..8d67d4fb31 100644 --- a/sysdeps/ia64/fpu/s_ilogbl.S +++ b/sysdeps/ia64/fpu/e_ilogbl.S @@ -103,7 +103,7 @@ fNorm_x = f10 f2to64 = f11 .section .text -GLOBAL_LIBM_ENTRY(ilogbl) +GLOBAL_LIBM_ENTRY(__ieee754_ilogbl) // X NORMAL // TrueExp_x = exp(f8) - 0xffff @@ -204,7 +204,7 @@ ILOGB_ZERO: } ;; -GLOBAL_LIBM_END(ilogbl) +GLOBAL_LIBM_END(__ieee754_ilogbl) LOCAL_LIBM_ENTRY(__libm_error_region) From 7a886e6fb15313170075792728ac45603c7e7c69 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sat, 28 Apr 2012 03:04:28 -0700 Subject: [PATCH 4330/4487] Add abilist data for ARM. --- ChangeLog.arm | 18 + sysdeps/unix/sysv/linux/arm/nptl/ld.abilist | 12 + .../linux/arm/nptl/libBrokenLocale.abilist | 3 + .../unix/sysv/linux/arm/nptl/libanl.abilist | 6 + sysdeps/unix/sysv/linux/arm/nptl/libc.abilist | 2131 +++++++++++++++++ .../unix/sysv/linux/arm/nptl/libcrypt.abilist | 9 + .../unix/sysv/linux/arm/nptl/libdl.abilist | 11 + sysdeps/unix/sysv/linux/arm/nptl/libm.abilist | 370 +++ .../unix/sysv/linux/arm/nptl/libnsl.abilist | 123 + .../sysv/linux/arm/nptl/libpthread.abilist | 229 ++ .../sysv/linux/arm/nptl/libresolv.abilist | 95 + .../unix/sysv/linux/arm/nptl/librt.abilist | 44 + .../sysv/linux/arm/nptl/libthread_db.abilist | 42 + .../unix/sysv/linux/arm/nptl/libutil.abilist | 8 + 14 files changed, 3101 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arm/nptl/ld.abilist create mode 100644 sysdeps/unix/sysv/linux/arm/nptl/libBrokenLocale.abilist create mode 100644 sysdeps/unix/sysv/linux/arm/nptl/libanl.abilist create mode 100644 sysdeps/unix/sysv/linux/arm/nptl/libc.abilist create mode 100644 sysdeps/unix/sysv/linux/arm/nptl/libcrypt.abilist create mode 100644 sysdeps/unix/sysv/linux/arm/nptl/libdl.abilist create mode 100644 sysdeps/unix/sysv/linux/arm/nptl/libm.abilist create mode 100644 sysdeps/unix/sysv/linux/arm/nptl/libnsl.abilist create mode 100644 sysdeps/unix/sysv/linux/arm/nptl/libpthread.abilist create mode 100644 sysdeps/unix/sysv/linux/arm/nptl/libresolv.abilist create mode 100644 sysdeps/unix/sysv/linux/arm/nptl/librt.abilist create mode 100644 sysdeps/unix/sysv/linux/arm/nptl/libthread_db.abilist create mode 100644 sysdeps/unix/sysv/linux/arm/nptl/libutil.abilist diff --git a/ChangeLog.arm b/ChangeLog.arm index 16be7574cc..facddbb4d1 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,21 @@ +2012-04-28 Joseph Myers + + [BZ #13986] + * sysdeps/unix/sysv/linux/arm/nptl/ld.abilist: New file. + * sysdeps/unix/sysv/linux/arm/nptl/libBrokenLocale.abilist: + Likewise. + * sysdeps/unix/sysv/linux/arm/nptl/libanl.abilist: Likewise. + * sysdeps/unix/sysv/linux/arm/nptl/libc.abilist: Likewise. + * sysdeps/unix/sysv/linux/arm/nptl/libcrypt.abilist: Likewise. + * sysdeps/unix/sysv/linux/arm/nptl/libdl.abilist: Likewise. + * sysdeps/unix/sysv/linux/arm/nptl/libm.abilist: Likewise. + * sysdeps/unix/sysv/linux/arm/nptl/libnsl.abilist: Likewise. + * sysdeps/unix/sysv/linux/arm/nptl/libpthread.abilist: Likewise. + * sysdeps/unix/sysv/linux/arm/nptl/libresolv.abilist: Likewise. + * sysdeps/unix/sysv/linux/arm/nptl/librt.abilist: Likewise. + * sysdeps/unix/sysv/linux/arm/nptl/libthread_db.abilist: Likewise. + * sysdeps/unix/sysv/linux/arm/nptl/libutil.abilist: Likewise. + 2012-04-26 Joseph Myers * sysdeps/unix/arm/brk.S: Remove file. diff --git a/sysdeps/unix/sysv/linux/arm/nptl/ld.abilist b/sysdeps/unix/sysv/linux/arm/nptl/ld.abilist new file mode 100644 index 0000000000..8eac745dd1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/nptl/ld.abilist @@ -0,0 +1,12 @@ +GLIBC_2.4 + GLIBC_2.4 A + __libc_memalign F + __libc_stack_end D 0x4 + __stack_chk_guard D 0x4 + __tls_get_addr F + _dl_mcount F + _r_debug D 0x14 + calloc F + free F + malloc F + realloc F diff --git a/sysdeps/unix/sysv/linux/arm/nptl/libBrokenLocale.abilist b/sysdeps/unix/sysv/linux/arm/nptl/libBrokenLocale.abilist new file mode 100644 index 0000000000..9c795c6e96 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/nptl/libBrokenLocale.abilist @@ -0,0 +1,3 @@ +GLIBC_2.4 + GLIBC_2.4 A + __ctype_get_mb_cur_max F diff --git a/sysdeps/unix/sysv/linux/arm/nptl/libanl.abilist b/sysdeps/unix/sysv/linux/arm/nptl/libanl.abilist new file mode 100644 index 0000000000..e10833ed25 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/nptl/libanl.abilist @@ -0,0 +1,6 @@ +GLIBC_2.4 + GLIBC_2.4 A + gai_cancel F + gai_error F + gai_suspend F + getaddrinfo_a F diff --git a/sysdeps/unix/sysv/linux/arm/nptl/libc.abilist b/sysdeps/unix/sysv/linux/arm/nptl/libc.abilist new file mode 100644 index 0000000000..1f25c37890 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/nptl/libc.abilist @@ -0,0 +1,2131 @@ +GLIBC_2.10 + GLIBC_2.10 A + __cxa_at_quick_exit F + __posix_getopt F + accept4 F + endsgent F + fallocate F + fgetsgent F + fgetsgent_r F + getsgent F + getsgent_r F + getsgnam F + getsgnam_r F + malloc_info F + preadv F + preadv64 F + psiginfo F + putsgent F + pwritev F + pwritev64 F + quick_exit F + register_printf_modifier F + register_printf_specifier F + register_printf_type F + setsgent F + sgetsgent F + sgetsgent_r F +GLIBC_2.11 + GLIBC_2.11 A + __longjmp_chk F + execvpe F + fallocate64 F + mkostemps F + mkostemps64 F + mkstemps F + mkstemps64 F +GLIBC_2.12 + GLIBC_2.12 A + _sys_errlist D 0x21c + _sys_nerr D 0x4 + ntp_gettimex F + recvmmsg F + sys_errlist D 0x21c + sys_nerr D 0x4 +GLIBC_2.13 + GLIBC_2.13 A + fanotify_init F + fanotify_mark F + prlimit F + prlimit64 F +GLIBC_2.14 + GLIBC_2.14 A + clock_adjtime F + name_to_handle_at F + open_by_handle_at F + sendmmsg F + setns F + syncfs F +GLIBC_2.15 + GLIBC_2.15 A + __fdelt_chk F + __fdelt_warn F + posix_spawn F + posix_spawnp F + process_vm_readv F + process_vm_writev F + scandirat F + scandirat64 F +GLIBC_2.16 + GLIBC_2.16 A + __poll_chk F + __ppoll_chk F + aligned_alloc F + c16rtomb F + c32rtomb F + mbrtoc16 F + mbrtoc32 F + timespec_get F +GLIBC_2.4 + GLIBC_2.4 A + _Exit F + _IO_2_1_stderr_ D 0xa0 + _IO_2_1_stdin_ D 0xa0 + _IO_2_1_stdout_ D 0xa0 + _IO_adjust_column F + _IO_adjust_wcolumn F + _IO_default_doallocate F + _IO_default_finish F + _IO_default_pbackfail F + _IO_default_uflow F + _IO_default_xsgetn F + _IO_default_xsputn F + _IO_do_write F + _IO_doallocbuf F + _IO_fclose F + _IO_fdopen F + _IO_feof F + _IO_ferror F + _IO_fflush F + _IO_fgetpos F + _IO_fgetpos64 F + _IO_fgets F + _IO_file_attach F + _IO_file_close F + _IO_file_close_it F + _IO_file_doallocate F + _IO_file_finish F + _IO_file_fopen F + _IO_file_init F + _IO_file_jumps D 0x54 + _IO_file_open F + _IO_file_overflow F + _IO_file_read F + _IO_file_seek F + _IO_file_seekoff F + _IO_file_setbuf F + _IO_file_stat F + _IO_file_sync F + _IO_file_underflow F + _IO_file_write F + _IO_file_xsputn F + _IO_flockfile F + _IO_flush_all F + _IO_flush_all_linebuffered F + _IO_fopen F + _IO_fprintf F + _IO_fputs F + _IO_fread F + _IO_free_backup_area F + _IO_free_wbackup_area F + _IO_fsetpos F + _IO_fsetpos64 F + _IO_ftell F + _IO_ftrylockfile F + _IO_funlockfile F + _IO_fwrite F + _IO_getc F + _IO_getline F + _IO_getline_info F + _IO_gets F + _IO_init F + _IO_init_marker F + _IO_init_wmarker F + _IO_iter_begin F + _IO_iter_end F + _IO_iter_file F + _IO_iter_next F + _IO_least_wmarker F + _IO_link_in F + _IO_list_all D 0x4 + _IO_list_lock F + _IO_list_resetlock F + _IO_list_unlock F + _IO_marker_delta F + _IO_marker_difference F + _IO_padn F + _IO_peekc_locked F + _IO_popen F + _IO_printf F + _IO_proc_close F + _IO_proc_open F + _IO_putc F + _IO_puts F + _IO_remove_marker F + _IO_seekmark F + _IO_seekoff F + _IO_seekpos F + _IO_seekwmark F + _IO_setb F + _IO_setbuffer F + _IO_setvbuf F + _IO_sgetn F + _IO_sprintf F + _IO_sputbackc F + _IO_sputbackwc F + _IO_sscanf F + _IO_str_init_readonly F + _IO_str_init_static F + _IO_str_overflow F + _IO_str_pbackfail F + _IO_str_seekoff F + _IO_str_underflow F + _IO_sungetc F + _IO_sungetwc F + _IO_switch_to_get_mode F + _IO_switch_to_main_wget_area F + _IO_switch_to_wbackup_area F + _IO_switch_to_wget_mode F + _IO_un_link F + _IO_ungetc F + _IO_unsave_markers F + _IO_unsave_wmarkers F + _IO_vfprintf F + _IO_vfscanf F + _IO_vsprintf F + _IO_wdefault_doallocate F + _IO_wdefault_finish F + _IO_wdefault_pbackfail F + _IO_wdefault_uflow F + _IO_wdefault_xsgetn F + _IO_wdefault_xsputn F + _IO_wdo_write F + _IO_wdoallocbuf F + _IO_wfile_jumps D 0x54 + _IO_wfile_overflow F + _IO_wfile_seekoff F + _IO_wfile_sync F + _IO_wfile_underflow F + _IO_wfile_xsputn F + _IO_wmarker_delta F + _IO_wsetb F + __adjtimex F + __aeabi_MB_CUR_MAX F + __aeabi_assert F + __aeabi_atexit F + __aeabi_errno_addr F + __aeabi_localeconv F + __aeabi_memclr F + __aeabi_memclr4 F + __aeabi_memclr8 F + __aeabi_memcpy F + __aeabi_memcpy4 F + __aeabi_memcpy8 F + __aeabi_memmove F + __aeabi_memmove4 F + __aeabi_memmove8 F + __aeabi_memset F + __aeabi_memset4 F + __aeabi_memset8 F + __after_morecore_hook D 0x4 + __argz_count F + __argz_next F + __argz_stringify F + __asprintf F + __assert F + __assert_fail F + __assert_perror_fail F + __backtrace F + __backtrace_symbols F + __backtrace_symbols_fd F + __bsd_getpgrp F + __bzero F + __check_rhosts_file D 0x4 + __chk_fail F + __clone F + __close F + __cmsg_nxthdr F + __confstr_chk F + __connect F + __ctype_b_loc F + __ctype_get_mb_cur_max F + __ctype_tolower_loc F + __ctype_toupper_loc F + __curbrk D 0x4 + __cxa_atexit F + __cxa_finalize F + __cyg_profile_func_enter F + __cyg_profile_func_exit F + __daylight D 0x4 + __dcgettext F + __default_morecore F + __dgettext F + __dup2 F + __duplocale F + __endmntent F + __environ D 0x4 + __errno_location F + __fbufsize F + __fcntl F + __ffs F + __fgets_chk F + __fgets_unlocked_chk F + __fgetws_chk F + __fgetws_unlocked_chk F + __finite F + __finitef F + __finitel F + __flbf F + __fork F + __fpending F + __fprintf_chk F + __fpu_control D 0x4 + __fpurge F + __freadable F + __freading F + __free_hook D 0x4 + __freelocale F + __fsetlocking F + __fwprintf_chk F + __fwritable F + __fwriting F + __fxstat F + __fxstat64 F + __fxstatat F + __fxstatat64 F + __getcwd_chk F + __getdelim F + __getdomainname_chk F + __getgroups_chk F + __gethostname_chk F + __getlogin_r_chk F + __getmntent_r F + __getpagesize F + __getpgid F + __getpid F + __gets_chk F + __gettimeofday F + __getwd_chk F + __gmtime_r F + __gnu_Unwind_Find_exidx F + __h_errno_location F + __isalnum_l F + __isalpha_l F + __isascii_l F + __isblank_l F + __iscntrl_l F + __isctype F + __isdigit_l F + __isgraph_l F + __isinf F + __isinff F + __isinfl F + __islower_l F + __isnan F + __isnanf F + __isnanl F + __isprint_l F + __ispunct_l F + __isspace_l F + __isupper_l F + __iswalnum_l F + __iswalpha_l F + __iswblank_l F + __iswcntrl_l F + __iswctype F + __iswctype_l F + __iswdigit_l F + __iswgraph_l F + __iswlower_l F + __iswprint_l F + __iswpunct_l F + __iswspace_l F + __iswupper_l F + __iswxdigit_l F + __isxdigit_l F + __ivaliduser F + __key_decryptsession_pk_LOCAL D 0x4 + __key_encryptsession_pk_LOCAL D 0x4 + __key_gendes_LOCAL D 0x4 + __libc_allocate_rtsig F + __libc_calloc F + __libc_current_sigrtmax F + __libc_current_sigrtmin F + __libc_free F + __libc_freeres F + __libc_init_first F + __libc_mallinfo F + __libc_malloc F + __libc_mallopt F + __libc_memalign F + __libc_pvalloc F + __libc_realloc F + __libc_sa_len F + __libc_start_main F + __libc_valloc F + __lseek F + __lxstat F + __lxstat64 F + __malloc_hook D 0x4 + __malloc_initialize_hook D 0x4 + __mbrlen F + __mbrtowc F + __mbsnrtowcs_chk F + __mbsrtowcs_chk F + __mbstowcs_chk F + __memalign_hook D 0x4 + __memcpy_chk F + __memmove_chk F + __mempcpy F + __mempcpy_chk F + __mempcpy_small F + __memset_chk F + __monstartup F + __morecore D 0x4 + __nanosleep F + __newlocale F + __nl_langinfo_l F + __nss_configure_lookup F + __nss_database_lookup F + __nss_group_lookup F + __nss_hostname_digits_dots F + __nss_hosts_lookup F + __nss_next F + __nss_passwd_lookup F + __open F + __open64 F + __overflow F + __pipe F + __poll F + __pread64 F + __pread64_chk F + __pread_chk F + __printf_chk F + __printf_fp F + __profile_frequency F + __progname D 0x4 + __progname_full D 0x4 + __ptsname_r_chk F + __pwrite64 F + __rawmemchr F + __rcmd_errstr D 0x4 + __read F + __read_chk F + __readlink_chk F + __realloc_hook D 0x4 + __realpath_chk F + __recv_chk F + __recvfrom_chk F + __register_atfork F + __res_init F + __res_nclose F + __res_ninit F + __res_randomid F + __res_state F + __rpc_thread_createerr F + __rpc_thread_svc_fdset F + __rpc_thread_svc_max_pollfd F + __rpc_thread_svc_pollfd F + __sbrk F + __sched_get_priority_max F + __sched_get_priority_min F + __sched_getparam F + __sched_getscheduler F + __sched_setscheduler F + __sched_yield F + __secure_getenv F + __select F + __send F + __setmntent F + __setpgid F + __sigaction F + __sigaddset F + __sigdelset F + __sigismember F + __signbit F + __signbitf F + __sigpause F + __sigsetjmp F + __sigsuspend F + __snprintf_chk F + __sprintf_chk F + __stack_chk_fail F + __statfs F + __stpcpy F + __stpcpy_chk F + __stpcpy_small F + __stpncpy F + __stpncpy_chk F + __strcasecmp F + __strcasecmp_l F + __strcasestr F + __strcat_chk F + __strcoll_l F + __strcpy_chk F + __strcpy_small F + __strcspn_c1 F + __strcspn_c2 F + __strcspn_c3 F + __strdup F + __strerror_r F + __strfmon_l F + __strftime_l F + __strncasecmp_l F + __strncat_chk F + __strncpy_chk F + __strndup F + __strpbrk_c2 F + __strpbrk_c3 F + __strsep_1c F + __strsep_2c F + __strsep_3c F + __strsep_g F + __strspn_c1 F + __strspn_c2 F + __strspn_c3 F + __strtod_internal F + __strtod_l F + __strtof_internal F + __strtof_l F + __strtok_r F + __strtok_r_1c F + __strtol_internal F + __strtol_l F + __strtold_internal F + __strtold_l F + __strtoll_internal F + __strtoll_l F + __strtoul_internal F + __strtoul_l F + __strtoull_internal F + __strtoull_l F + __strverscmp F + __strxfrm_l F + __swprintf_chk F + __sysconf F + __sysctl F + __syslog_chk F + __sysv_signal F + __timezone D 0x4 + __toascii_l F + __tolower_l F + __toupper_l F + __towctrans F + __towctrans_l F + __towlower_l F + __towupper_l F + __ttyname_r_chk F + __tzname D 0x8 + __uflow F + __underflow F + __uselocale F + __vfork F + __vfprintf_chk F + __vfscanf F + __vfwprintf_chk F + __vprintf_chk F + __vsnprintf F + __vsnprintf_chk F + __vsprintf_chk F + __vsscanf F + __vswprintf_chk F + __vsyslog_chk F + __vwprintf_chk F + __wait F + __waitpid F + __wcpcpy_chk F + __wcpncpy_chk F + __wcrtomb_chk F + __wcscasecmp_l F + __wcscat_chk F + __wcscoll_l F + __wcscpy_chk F + __wcsftime_l F + __wcsncasecmp_l F + __wcsncat_chk F + __wcsncpy_chk F + __wcsnrtombs_chk F + __wcsrtombs_chk F + __wcstod_internal F + __wcstod_l F + __wcstof_internal F + __wcstof_l F + __wcstol_internal F + __wcstol_l F + __wcstold_internal F + __wcstold_l F + __wcstoll_internal F + __wcstoll_l F + __wcstombs_chk F + __wcstoul_internal F + __wcstoul_l F + __wcstoull_internal F + __wcstoull_l F + __wcsxfrm_l F + __wctomb_chk F + __wctrans_l F + __wctype_l F + __wmemcpy_chk F + __wmemmove_chk F + __wmempcpy_chk F + __wmemset_chk F + __woverflow F + __wprintf_chk F + __write F + __wuflow F + __wunderflow F + __xmknod F + __xmknodat F + __xpg_basename F + __xpg_sigpause F + __xpg_strerror_r F + __xstat F + __xstat64 F + _authenticate F + _dl_mcount_wrapper F + _dl_mcount_wrapper_check F + _environ D 0x4 + _exit F + _flushlbf F + _libc_intl_domainname D 0x5 + _longjmp F + _mcleanup F + _mcount F + _nl_default_dirname D 0x12 + _nl_domain_bindings D 0x4 + _nl_msg_cat_cntr D 0x4 + _null_auth D 0xc + _obstack_allocated_p F + _obstack_begin F + _obstack_begin_1 F + _obstack_free F + _obstack_memory_used F + _obstack_newchunk F + _res D 0x200 + _res_hconf D 0x30 + _rpc_dtablesize F + _seterr_reply F + _setjmp F + _sys_errlist D 0x210 + _sys_nerr D 0x4 + _sys_siglist D 0x104 + _tolower F + _toupper F + a64l F + abort F + abs F + accept F + access F + acct F + addmntent F + addseverity F + adjtime F + adjtimex F + advance F + alarm F + alphasort F + alphasort64 F + argp_err_exit_status D 0x4 + argp_error F + argp_failure F + argp_help F + argp_parse F + argp_program_bug_address D 0x4 + argp_program_version D 0x4 + argp_program_version_hook D 0x4 + argp_state_help F + argp_usage F + argz_add F + argz_add_sep F + argz_append F + argz_count F + argz_create F + argz_create_sep F + argz_delete F + argz_extract F + argz_insert F + argz_next F + argz_replace F + argz_stringify F + asctime F + asctime_r F + asprintf F + atof F + atoi F + atol F + atoll F + authdes_create F + authdes_getucred F + authdes_pk_create F + authnone_create F + authunix_create F + authunix_create_default F + backtrace F + backtrace_symbols F + backtrace_symbols_fd F + basename F + bcmp F + bcopy F + bdflush F + bind F + bind_textdomain_codeset F + bindresvport F + bindtextdomain F + brk F + bsd_signal F + bsearch F + btowc F + bzero F + calloc F + callrpc F + canonicalize_file_name F + capget F + capset F + catclose F + catgets F + catopen F + cbc_crypt F + cfgetispeed F + cfgetospeed F + cfmakeraw F + cfree F + cfsetispeed F + cfsetospeed F + cfsetspeed F + chdir F + chflags F + chmod F + chown F + chroot F + clearenv F + clearerr F + clearerr_unlocked F + clnt_broadcast F + clnt_create F + clnt_pcreateerror F + clnt_perrno F + clnt_perror F + clnt_spcreateerror F + clnt_sperrno F + clnt_sperror F + clntraw_create F + clnttcp_create F + clntudp_bufcreate F + clntudp_create F + clntunix_create F + clock F + clone F + close F + closedir F + closelog F + confstr F + connect F + copysign F + copysignf F + copysignl F + creat F + creat64 F + create_module F + ctermid F + ctime F + ctime_r F + cuserid F + daemon F + daylight D 0x4 + dcgettext F + dcngettext F + delete_module F + des_setparity F + dgettext F + difftime F + dirfd F + dirname F + div F + dl_iterate_phdr F + dngettext F + dprintf F + drand48 F + drand48_r F + dup F + dup2 F + duplocale F + dysize F + eaccess F + ecb_crypt F + ecvt F + ecvt_r F + endaliasent F + endfsent F + endgrent F + endhostent F + endmntent F + endnetent F + endnetgrent F + endprotoent F + endpwent F + endrpcent F + endservent F + endspent F + endttyent F + endusershell F + endutent F + endutxent F + environ D 0x4 + envz_add F + envz_entry F + envz_get F + envz_merge F + envz_remove F + envz_strip F + epoll_create F + epoll_ctl F + epoll_wait F + erand48 F + erand48_r F + err F + error F + error_at_line F + error_message_count D 0x4 + error_one_per_line D 0x4 + error_print_progname D 0x4 + errx F + ether_aton F + ether_aton_r F + ether_hostton F + ether_line F + ether_ntoa F + ether_ntoa_r F + ether_ntohost F + euidaccess F + execl F + execle F + execlp F + execv F + execve F + execvp F + exit F + faccessat F + fattach F + fchdir F + fchflags F + fchmod F + fchmodat F + fchown F + fchownat F + fclose F + fcloseall F + fcntl F + fcvt F + fcvt_r F + fdatasync F + fdetach F + fdopen F + fdopendir F + feof F + feof_unlocked F + ferror F + ferror_unlocked F + fexecve F + fflush F + fflush_unlocked F + ffs F + ffsl F + ffsll F + fgetc F + fgetc_unlocked F + fgetgrent F + fgetgrent_r F + fgetpos F + fgetpos64 F + fgetpwent F + fgetpwent_r F + fgets F + fgets_unlocked F + fgetspent F + fgetspent_r F + fgetwc F + fgetwc_unlocked F + fgetws F + fgetws_unlocked F + fgetxattr F + fileno F + fileno_unlocked F + finite F + finitef F + finitel F + flistxattr F + flock F + flockfile F + fmemopen F + fmtmsg F + fnmatch F + fopen F + fopen64 F + fopencookie F + fork F + fpathconf F + fprintf F + fputc F + fputc_unlocked F + fputs F + fputs_unlocked F + fputwc F + fputwc_unlocked F + fputws F + fputws_unlocked F + fread F + fread_unlocked F + free F + freeaddrinfo F + freeifaddrs F + freelocale F + fremovexattr F + freopen F + freopen64 F + frexp F + frexpf F + frexpl F + fscanf F + fseek F + fseeko F + fseeko64 F + fsetpos F + fsetpos64 F + fsetxattr F + fstatfs F + fstatfs64 F + fstatvfs F + fstatvfs64 F + fsync F + ftell F + ftello F + ftello64 F + ftime F + ftok F + ftruncate F + ftruncate64 F + ftrylockfile F + fts_children F + fts_close F + fts_open F + fts_read F + fts_set F + ftw F + ftw64 F + funlockfile F + futimes F + futimesat F + fwide F + fwprintf F + fwrite F + fwrite_unlocked F + fwscanf F + gai_strerror F + gcvt F + get_avphys_pages F + get_current_dir_name F + get_kernel_syms F + get_myaddress F + get_nprocs F + get_nprocs_conf F + get_phys_pages F + getaddrinfo F + getaliasbyname F + getaliasbyname_r F + getaliasent F + getaliasent_r F + getc F + getc_unlocked F + getchar F + getchar_unlocked F + getcontext F + getcwd F + getdate F + getdate_err D 0x4 + getdate_r F + getdelim F + getdirentries F + getdirentries64 F + getdomainname F + getdtablesize F + getegid F + getenv F + geteuid F + getfsent F + getfsfile F + getfsspec F + getgid F + getgrent F + getgrent_r F + getgrgid F + getgrgid_r F + getgrnam F + getgrnam_r F + getgrouplist F + getgroups F + gethostbyaddr F + gethostbyaddr_r F + gethostbyname F + gethostbyname2 F + gethostbyname2_r F + gethostbyname_r F + gethostent F + gethostent_r F + gethostid F + gethostname F + getifaddrs F + getipv4sourcefilter F + getitimer F + getline F + getloadavg F + getlogin F + getlogin_r F + getmntent F + getmntent_r F + getmsg F + getnameinfo F + getnetbyaddr F + getnetbyaddr_r F + getnetbyname F + getnetbyname_r F + getnetent F + getnetent_r F + getnetgrent F + getnetgrent_r F + getnetname F + getopt F + getopt_long F + getopt_long_only F + getpagesize F + getpass F + getpeername F + getpgid F + getpgrp F + getpid F + getpmsg F + getppid F + getpriority F + getprotobyname F + getprotobyname_r F + getprotobynumber F + getprotobynumber_r F + getprotoent F + getprotoent_r F + getpt F + getpublickey F + getpw F + getpwent F + getpwent_r F + getpwnam F + getpwnam_r F + getpwuid F + getpwuid_r F + getresgid F + getresuid F + getrlimit F + getrlimit64 F + getrpcbyname F + getrpcbyname_r F + getrpcbynumber F + getrpcbynumber_r F + getrpcent F + getrpcent_r F + getrpcport F + getrusage F + gets F + getsecretkey F + getservbyname F + getservbyname_r F + getservbyport F + getservbyport_r F + getservent F + getservent_r F + getsid F + getsockname F + getsockopt F + getsourcefilter F + getspent F + getspent_r F + getspnam F + getspnam_r F + getsubopt F + gettext F + gettimeofday F + getttyent F + getttynam F + getuid F + getusershell F + getutent F + getutent_r F + getutid F + getutid_r F + getutline F + getutline_r F + getutmp F + getutmpx F + getutxent F + getutxid F + getutxline F + getw F + getwc F + getwc_unlocked F + getwchar F + getwchar_unlocked F + getwd F + getxattr F + glob F + glob64 F + glob_pattern_p F + globfree F + globfree64 F + gmtime F + gmtime_r F + gnu_dev_major F + gnu_dev_makedev F + gnu_dev_minor F + gnu_get_libc_release F + gnu_get_libc_version F + grantpt F + group_member F + gsignal F + gtty F + h_errlist D 0x14 + h_nerr D 0x4 + hasmntopt F + hcreate F + hcreate_r F + hdestroy F + hdestroy_r F + herror F + host2netname F + hsearch F + hsearch_r F + hstrerror F + htonl F + htons F + iconv F + iconv_close F + iconv_open F + if_freenameindex F + if_indextoname F + if_nameindex F + if_nametoindex F + imaxabs F + imaxdiv F + in6addr_any D 0x10 + in6addr_loopback D 0x10 + inb F + index F + inet6_option_alloc F + inet6_option_append F + inet6_option_find F + inet6_option_init F + inet6_option_next F + inet6_option_space F + inet_addr F + inet_aton F + inet_lnaof F + inet_makeaddr F + inet_netof F + inet_network F + inet_nsap_addr F + inet_nsap_ntoa F + inet_ntoa F + inet_ntop F + inet_pton F + init_module F + initgroups F + initstate F + initstate_r F + inl F + innetgr F + inotify_add_watch F + inotify_init F + inotify_rm_watch F + insque F + inw F + ioctl F + ioperm F + iopl F + iruserok F + iruserok_af F + isalnum F + isalnum_l F + isalpha F + isalpha_l F + isascii F + isastream F + isatty F + isblank F + isblank_l F + iscntrl F + iscntrl_l F + isctype F + isdigit F + isdigit_l F + isfdtype F + isgraph F + isgraph_l F + isinf F + isinff F + isinfl F + islower F + islower_l F + isnan F + isnanf F + isnanl F + isprint F + isprint_l F + ispunct F + ispunct_l F + isspace F + isspace_l F + isupper F + isupper_l F + iswalnum F + iswalnum_l F + iswalpha F + iswalpha_l F + iswblank F + iswblank_l F + iswcntrl F + iswcntrl_l F + iswctype F + iswctype_l F + iswdigit F + iswdigit_l F + iswgraph F + iswgraph_l F + iswlower F + iswlower_l F + iswprint F + iswprint_l F + iswpunct F + iswpunct_l F + iswspace F + iswspace_l F + iswupper F + iswupper_l F + iswxdigit F + iswxdigit_l F + isxdigit F + isxdigit_l F + jrand48 F + jrand48_r F + key_decryptsession F + key_decryptsession_pk F + key_encryptsession F + key_encryptsession_pk F + key_gendes F + key_get_conv F + key_secretkey_is_set F + key_setnet F + key_setsecret F + kill F + killpg F + klogctl F + l64a F + labs F + lchmod F + lchown F + lckpwdf F + lcong48 F + lcong48_r F + ldexp F + ldexpf F + ldexpl F + ldiv F + lfind F + lgetxattr F + link F + linkat F + listen F + listxattr F + llabs F + lldiv F + llistxattr F + llseek F + loc1 D 0x4 + loc2 D 0x4 + localeconv F + localtime F + localtime_r F + lockf F + lockf64 F + locs D 0x4 + longjmp F + lrand48 F + lrand48_r F + lremovexattr F + lsearch F + lseek F + lseek64 F + lsetxattr F + lutimes F + madvise F + makecontext F + mallinfo F + malloc F + malloc_get_state F + malloc_set_state F + malloc_stats F + malloc_trim F + malloc_usable_size F + mallopt F + mallwatch D 0x4 + mblen F + mbrlen F + mbrtowc F + mbsinit F + mbsnrtowcs F + mbsrtowcs F + mbstowcs F + mbtowc F + mcheck F + mcheck_check_all F + mcheck_pedantic F + mcount F + memalign F + memccpy F + memchr F + memcmp F + memcpy F + memfrob F + memmem F + memmove F + mempcpy F + memrchr F + memset F + mincore F + mkdir F + mkdirat F + mkdtemp F + mkfifo F + mkfifoat F + mkstemp F + mkstemp64 F + mktemp F + mktime F + mlock F + mlockall F + mmap F + mmap64 F + modf F + modff F + modfl F + moncontrol F + monstartup F + mount F + mprobe F + mprotect F + mrand48 F + mrand48_r F + mremap F + msgctl F + msgget F + msgrcv F + msgsnd F + msync F + mtrace F + munlock F + munlockall F + munmap F + muntrace F + nanosleep F + netname2host F + netname2user F + newlocale F + nfsservctl F + nftw F + nftw64 F + ngettext F + nice F + nl_langinfo F + nl_langinfo_l F + nrand48 F + nrand48_r F + ntohl F + ntohs F + ntp_adjtime F + ntp_gettime F + obstack_alloc_failed_handler D 0x4 + obstack_exit_failure D 0x4 + obstack_free F + obstack_printf F + obstack_vprintf F + on_exit F + open F + open64 F + open_memstream F + open_wmemstream F + openat F + openat64 F + opendir F + openlog F + optarg D 0x4 + opterr D 0x4 + optind D 0x4 + optopt D 0x4 + outb F + outl F + outw F + parse_printf_format F + passwd2des F + pathconf F + pause F + pclose F + perror F + personality F + pipe F + pivot_root F + pmap_getmaps F + pmap_getport F + pmap_rmtcall F + pmap_set F + pmap_unset F + poll F + popen F + posix_fadvise F + posix_fadvise64 F + posix_fallocate F + posix_fallocate64 F + posix_madvise F + posix_memalign F + posix_openpt F + posix_spawn F + posix_spawn_file_actions_addclose F + posix_spawn_file_actions_adddup2 F + posix_spawn_file_actions_addopen F + posix_spawn_file_actions_destroy F + posix_spawn_file_actions_init F + posix_spawnattr_destroy F + posix_spawnattr_getflags F + posix_spawnattr_getpgroup F + posix_spawnattr_getschedparam F + posix_spawnattr_getschedpolicy F + posix_spawnattr_getsigdefault F + posix_spawnattr_getsigmask F + posix_spawnattr_init F + posix_spawnattr_setflags F + posix_spawnattr_setpgroup F + posix_spawnattr_setschedparam F + posix_spawnattr_setschedpolicy F + posix_spawnattr_setsigdefault F + posix_spawnattr_setsigmask F + posix_spawnp F + ppoll F + prctl F + pread F + pread64 F + printf F + printf_size F + printf_size_info F + profil F + program_invocation_name D 0x4 + program_invocation_short_name D 0x4 + pselect F + psignal F + pthread_attr_destroy F + pthread_attr_getdetachstate F + pthread_attr_getinheritsched F + pthread_attr_getschedparam F + pthread_attr_getschedpolicy F + pthread_attr_getscope F + pthread_attr_init F + pthread_attr_setdetachstate F + pthread_attr_setinheritsched F + pthread_attr_setschedparam F + pthread_attr_setschedpolicy F + pthread_attr_setscope F + pthread_cond_broadcast F + pthread_cond_destroy F + pthread_cond_init F + pthread_cond_signal F + pthread_cond_timedwait F + pthread_cond_wait F + pthread_condattr_destroy F + pthread_condattr_init F + pthread_equal F + pthread_exit F + pthread_getschedparam F + pthread_mutex_destroy F + pthread_mutex_init F + pthread_mutex_lock F + pthread_mutex_unlock F + pthread_self F + pthread_setcancelstate F + pthread_setcanceltype F + pthread_setschedparam F + ptrace F + ptsname F + ptsname_r F + putc F + putc_unlocked F + putchar F + putchar_unlocked F + putenv F + putgrent F + putmsg F + putpmsg F + putpwent F + puts F + putspent F + pututline F + pututxline F + putw F + putwc F + putwc_unlocked F + putwchar F + putwchar_unlocked F + pvalloc F + pwrite F + pwrite64 F + qecvt F + qecvt_r F + qfcvt F + qfcvt_r F + qgcvt F + qsort F + query_module F + quotactl F + raise F + rand F + rand_r F + random F + random_r F + rawmemchr F + rcmd F + rcmd_af F + re_comp F + re_compile_fastmap F + re_compile_pattern F + re_exec F + re_match F + re_match_2 F + re_search F + re_search_2 F + re_set_registers F + re_set_syntax F + re_syntax_options D 0x4 + read F + readahead F + readdir F + readdir64 F + readdir64_r F + readdir_r F + readlink F + readlinkat F + readv F + realloc F + realpath F + reboot F + recv F + recvfrom F + recvmsg F + regcomp F + regerror F + regexec F + regfree F + register_printf_function F + registerrpc F + remap_file_pages F + remove F + removexattr F + remque F + rename F + renameat F + revoke F + rewind F + rewinddir F + rexec F + rexec_af F + rexecoptions D 0x4 + rindex F + rmdir F + rpc_createerr D 0x10 + rpmatch F + rresvport F + rresvport_af F + rtime F + ruserok F + ruserok_af F + ruserpass F + sbrk F + scalbn F + scalbnf F + scalbnl F + scandir F + scandir64 F + scanf F + sched_get_priority_max F + sched_get_priority_min F + sched_getaffinity F + sched_getparam F + sched_getscheduler F + sched_rr_get_interval F + sched_setaffinity F + sched_setparam F + sched_setscheduler F + sched_yield F + seed48 F + seed48_r F + seekdir F + select F + semctl F + semget F + semop F + semtimedop F + send F + sendfile F + sendfile64 F + sendmsg F + sendto F + setaliasent F + setbuf F + setbuffer F + setcontext F + setdomainname F + setegid F + setenv F + seteuid F + setfsent F + setfsgid F + setfsuid F + setgid F + setgrent F + setgroups F + sethostent F + sethostid F + sethostname F + setipv4sourcefilter F + setitimer F + setjmp F + setlinebuf F + setlocale F + setlogin F + setlogmask F + setmntent F + setnetent F + setnetgrent F + setpgid F + setpgrp F + setpriority F + setprotoent F + setpwent F + setregid F + setresgid F + setresuid F + setreuid F + setrlimit F + setrlimit64 F + setrpcent F + setservent F + setsid F + setsockopt F + setsourcefilter F + setspent F + setstate F + setstate_r F + settimeofday F + setttyent F + setuid F + setusershell F + setutent F + setutxent F + setvbuf F + setxattr F + sgetspent F + sgetspent_r F + shmat F + shmctl F + shmdt F + shmget F + shutdown F + sigaction F + sigaddset F + sigaltstack F + sigandset F + sigblock F + sigdelset F + sigemptyset F + sigfillset F + siggetmask F + sighold F + sigignore F + siginterrupt F + sigisemptyset F + sigismember F + siglongjmp F + signal F + sigorset F + sigpause F + sigpending F + sigprocmask F + sigqueue F + sigrelse F + sigreturn F + sigset F + sigsetmask F + sigstack F + sigsuspend F + sigtimedwait F + sigvec F + sigwait F + sigwaitinfo F + sleep F + snprintf F + sockatmark F + socket F + socketpair F + sprintf F + sprofil F + srand F + srand48 F + srand48_r F + srandom F + srandom_r F + sscanf F + ssignal F + sstk F + statfs F + statfs64 F + statvfs F + statvfs64 F + stderr D 0x4 + stdin D 0x4 + stdout D 0x4 + step F + stime F + stpcpy F + stpncpy F + strcasecmp F + strcasecmp_l F + strcasestr F + strcat F + strchr F + strchrnul F + strcmp F + strcoll F + strcoll_l F + strcpy F + strcspn F + strdup F + strerror F + strerror_r F + strfmon F + strfmon_l F + strfry F + strftime F + strftime_l F + strlen F + strncasecmp F + strncasecmp_l F + strncat F + strncmp F + strncpy F + strndup F + strnlen F + strpbrk F + strptime F + strptime_l F + strrchr F + strsep F + strsignal F + strspn F + strstr F + strtod F + strtod_l F + strtof F + strtof_l F + strtoimax F + strtok F + strtok_r F + strtol F + strtol_l F + strtold F + strtold_l F + strtoll F + strtoll_l F + strtoq F + strtoul F + strtoul_l F + strtoull F + strtoull_l F + strtoumax F + strtouq F + strverscmp F + strxfrm F + strxfrm_l F + stty F + svc_exit F + svc_fdset D 0x80 + svc_getreq F + svc_getreq_common F + svc_getreq_poll F + svc_getreqset F + svc_max_pollfd D 0x4 + svc_pollfd D 0x4 + svc_register F + svc_run F + svc_sendreply F + svc_unregister F + svcauthdes_stats D 0xc + svcerr_auth F + svcerr_decode F + svcerr_noproc F + svcerr_noprog F + svcerr_progvers F + svcerr_systemerr F + svcerr_weakauth F + svcfd_create F + svcraw_create F + svctcp_create F + svcudp_bufcreate F + svcudp_create F + svcudp_enablecache F + svcunix_create F + svcunixfd_create F + swab F + swapcontext F + swapoff F + swapon F + swprintf F + swscanf F + symlink F + symlinkat F + sync F + sys_errlist D 0x210 + sys_nerr D 0x4 + sys_sigabbrev D 0x104 + sys_siglist D 0x104 + syscall F + sysconf F + sysctl F + sysinfo F + syslog F + system F + sysv_signal F + tcdrain F + tcflow F + tcflush F + tcgetattr F + tcgetpgrp F + tcgetsid F + tcsendbreak F + tcsetattr F + tcsetpgrp F + tdelete F + tdestroy F + telldir F + tempnam F + textdomain F + tfind F + time F + timegm F + timelocal F + times F + timezone D 0x4 + tmpfile F + tmpfile64 F + tmpnam F + tmpnam_r F + toascii F + tolower F + tolower_l F + toupper F + toupper_l F + towctrans F + towctrans_l F + towlower F + towlower_l F + towupper F + towupper_l F + tr_break F + truncate F + truncate64 F + tsearch F + ttyname F + ttyname_r F + ttyslot F + twalk F + tzname D 0x8 + tzset F + ualarm F + ulckpwdf F + ulimit F + umask F + umount F + umount2 F + uname F + ungetc F + ungetwc F + unlink F + unlinkat F + unlockpt F + unsetenv F + unshare F + updwtmp F + updwtmpx F + uselib F + uselocale F + user2netname F + usleep F + ustat F + utime F + utimes F + utmpname F + utmpxname F + valloc F + vasprintf F + vdprintf F + verr F + verrx F + versionsort F + versionsort64 F + vfork F + vfprintf F + vfscanf F + vfwprintf F + vfwscanf F + vhangup F + vlimit F + vprintf F + vscanf F + vsnprintf F + vsprintf F + vsscanf F + vswprintf F + vswscanf F + vsyslog F + vtimes F + vwarn F + vwarnx F + vwprintf F + vwscanf F + wait F + wait3 F + wait4 F + waitid F + waitpid F + warn F + warnx F + wcpcpy F + wcpncpy F + wcrtomb F + wcscasecmp F + wcscasecmp_l F + wcscat F + wcschr F + wcschrnul F + wcscmp F + wcscoll F + wcscoll_l F + wcscpy F + wcscspn F + wcsdup F + wcsftime F + wcsftime_l F + wcslen F + wcsncasecmp F + wcsncasecmp_l F + wcsncat F + wcsncmp F + wcsncpy F + wcsnlen F + wcsnrtombs F + wcspbrk F + wcsrchr F + wcsrtombs F + wcsspn F + wcsstr F + wcstod F + wcstod_l F + wcstof F + wcstof_l F + wcstoimax F + wcstok F + wcstol F + wcstol_l F + wcstold F + wcstold_l F + wcstoll F + wcstoll_l F + wcstombs F + wcstoq F + wcstoul F + wcstoul_l F + wcstoull F + wcstoull_l F + wcstoumax F + wcstouq F + wcswcs F + wcswidth F + wcsxfrm F + wcsxfrm_l F + wctob F + wctomb F + wctrans F + wctrans_l F + wctype F + wctype_l F + wcwidth F + wmemchr F + wmemcmp F + wmemcpy F + wmemmove F + wmempcpy F + wmemset F + wordexp F + wordfree F + wprintf F + write F + writev F + wscanf F + xdecrypt F + xdr_accepted_reply F + xdr_array F + xdr_authdes_cred F + xdr_authdes_verf F + xdr_authunix_parms F + xdr_bool F + xdr_bytes F + xdr_callhdr F + xdr_callmsg F + xdr_char F + xdr_cryptkeyarg F + xdr_cryptkeyarg2 F + xdr_cryptkeyres F + xdr_des_block F + xdr_double F + xdr_enum F + xdr_float F + xdr_free F + xdr_getcredres F + xdr_hyper F + xdr_int F + xdr_int16_t F + xdr_int32_t F + xdr_int64_t F + xdr_int8_t F + xdr_key_netstarg F + xdr_key_netstres F + xdr_keybuf F + xdr_keystatus F + xdr_long F + xdr_longlong_t F + xdr_netnamestr F + xdr_netobj F + xdr_opaque F + xdr_opaque_auth F + xdr_pmap F + xdr_pmaplist F + xdr_pointer F + xdr_quad_t F + xdr_reference F + xdr_rejected_reply F + xdr_replymsg F + xdr_rmtcall_args F + xdr_rmtcallres F + xdr_short F + xdr_sizeof F + xdr_string F + xdr_u_char F + xdr_u_hyper F + xdr_u_int F + xdr_u_long F + xdr_u_longlong_t F + xdr_u_quad_t F + xdr_u_short F + xdr_uint16_t F + xdr_uint32_t F + xdr_uint64_t F + xdr_uint8_t F + xdr_union F + xdr_unixcred F + xdr_vector F + xdr_void F + xdr_wrapstring F + xdrmem_create F + xdrrec_create F + xdrrec_endofrecord F + xdrrec_eof F + xdrrec_skiprecord F + xdrstdio_create F + xencrypt F + xprt_register F + xprt_unregister F +GLIBC_2.5 + GLIBC_2.5 A + __readlinkat_chk F + inet6_opt_append F + inet6_opt_find F + inet6_opt_finish F + inet6_opt_get_val F + inet6_opt_init F + inet6_opt_next F + inet6_opt_set_val F + inet6_rth_add F + inet6_rth_getaddr F + inet6_rth_init F + inet6_rth_reverse F + inet6_rth_segments F + inet6_rth_space F + splice F + tee F + vmsplice F +GLIBC_2.6 + GLIBC_2.6 A + __sched_cpucount F + epoll_pwait F + futimens F + sched_getcpu F + strerror_l F + sync_file_range F + utimensat F +GLIBC_2.7 + GLIBC_2.7 A + __fread_chk F + __fread_unlocked_chk F + __isoc99_fscanf F + __isoc99_fwscanf F + __isoc99_scanf F + __isoc99_sscanf F + __isoc99_swscanf F + __isoc99_vfscanf F + __isoc99_vfwscanf F + __isoc99_vscanf F + __isoc99_vsscanf F + __isoc99_vswscanf F + __isoc99_vwscanf F + __isoc99_wscanf F + __open64_2 F + __open_2 F + __openat64_2 F + __openat_2 F + __sched_cpualloc F + __sched_cpufree F + eventfd F + eventfd_read F + eventfd_write F + mkostemp F + mkostemp64 F + signalfd F +GLIBC_2.8 + GLIBC_2.8 A + __asprintf_chk F + __dprintf_chk F + __gnu_mcount_nc F + __obstack_printf_chk F + __obstack_vprintf_chk F + __vasprintf_chk F + __vdprintf_chk F + qsort_r F + timerfd_create F + timerfd_gettime F + timerfd_settime F +GLIBC_2.9 + GLIBC_2.9 A + dup3 F + epoll_create1 F + inotify_init1 F + pipe2 F diff --git a/sysdeps/unix/sysv/linux/arm/nptl/libcrypt.abilist b/sysdeps/unix/sysv/linux/arm/nptl/libcrypt.abilist new file mode 100644 index 0000000000..8c874edffe --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/nptl/libcrypt.abilist @@ -0,0 +1,9 @@ +GLIBC_2.4 + GLIBC_2.4 A + crypt F + crypt_r F + encrypt F + encrypt_r F + fcrypt F + setkey F + setkey_r F diff --git a/sysdeps/unix/sysv/linux/arm/nptl/libdl.abilist b/sysdeps/unix/sysv/linux/arm/nptl/libdl.abilist new file mode 100644 index 0000000000..7f3ebed31d --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/nptl/libdl.abilist @@ -0,0 +1,11 @@ +GLIBC_2.4 + GLIBC_2.4 A + dladdr F + dladdr1 F + dlclose F + dlerror F + dlinfo F + dlmopen F + dlopen F + dlsym F + dlvsym F diff --git a/sysdeps/unix/sysv/linux/arm/nptl/libm.abilist b/sysdeps/unix/sysv/linux/arm/nptl/libm.abilist new file mode 100644 index 0000000000..cee34728d8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/nptl/libm.abilist @@ -0,0 +1,370 @@ +GLIBC_2.15 + GLIBC_2.15 A + __acos_finite F + __acosf_finite F + __acosh_finite F + __acoshf_finite F + __asin_finite F + __asinf_finite F + __atan2_finite F + __atan2f_finite F + __atanh_finite F + __atanhf_finite F + __cosh_finite F + __coshf_finite F + __exp10_finite F + __exp10f_finite F + __exp2_finite F + __exp2f_finite F + __exp_finite F + __expf_finite F + __fmod_finite F + __fmodf_finite F + __gamma_r_finite F + __gammaf_r_finite F + __hypot_finite F + __hypotf_finite F + __j0_finite F + __j0f_finite F + __j1_finite F + __j1f_finite F + __jn_finite F + __jnf_finite F + __lgamma_r_finite F + __lgammaf_r_finite F + __log10_finite F + __log10f_finite F + __log2_finite F + __log2f_finite F + __log_finite F + __logf_finite F + __pow_finite F + __powf_finite F + __remainder_finite F + __remainderf_finite F + __scalb_finite F + __scalbf_finite F + __sinh_finite F + __sinhf_finite F + __sqrt_finite F + __sqrtf_finite F + __y0_finite F + __y0f_finite F + __y1_finite F + __y1f_finite F + __yn_finite F + __ynf_finite F +GLIBC_2.4 + GLIBC_2.4 A + _LIB_VERSION D 0x4 + __clog10 F + __clog10f F + __clog10l F + __finite F + __finitef F + __finitel F + __fpclassify F + __fpclassifyf F + __signbit F + __signbitf F + acos F + acosf F + acosh F + acoshf F + acoshl F + acosl F + asin F + asinf F + asinh F + asinhf F + asinhl F + asinl F + atan F + atan2 F + atan2f F + atan2l F + atanf F + atanh F + atanhf F + atanhl F + atanl F + cabs F + cabsf F + cabsl F + cacos F + cacosf F + cacosh F + cacoshf F + cacoshl F + cacosl F + carg F + cargf F + cargl F + casin F + casinf F + casinh F + casinhf F + casinhl F + casinl F + catan F + catanf F + catanh F + catanhf F + catanhl F + catanl F + cbrt F + cbrtf F + cbrtl F + ccos F + ccosf F + ccosh F + ccoshf F + ccoshl F + ccosl F + ceil F + ceilf F + ceill F + cexp F + cexpf F + cexpl F + cimag F + cimagf F + cimagl F + clog F + clog10 F + clog10f F + clog10l F + clogf F + clogl F + conj F + conjf F + conjl F + copysign F + copysignf F + copysignl F + cos F + cosf F + cosh F + coshf F + coshl F + cosl F + cpow F + cpowf F + cpowl F + cproj F + cprojf F + cprojl F + creal F + crealf F + creall F + csin F + csinf F + csinh F + csinhf F + csinhl F + csinl F + csqrt F + csqrtf F + csqrtl F + ctan F + ctanf F + ctanh F + ctanhf F + ctanhl F + ctanl F + drem F + dremf F + dreml F + erf F + erfc F + erfcf F + erfcl F + erff F + erfl F + exp F + exp10 F + exp10f F + exp10l F + exp2 F + exp2f F + exp2l F + expf F + expl F + expm1 F + expm1f F + expm1l F + fabs F + fabsf F + fabsl F + fdim F + fdimf F + fdiml F + feclearexcept F + fedisableexcept F + feenableexcept F + fegetenv F + fegetexcept F + fegetexceptflag F + fegetround F + feholdexcept F + feraiseexcept F + fesetenv F + fesetexceptflag F + fesetround F + fetestexcept F + feupdateenv F + finite F + finitef F + finitel F + floor F + floorf F + floorl F + fma F + fmaf F + fmal F + fmax F + fmaxf F + fmaxl F + fmin F + fminf F + fminl F + fmod F + fmodf F + fmodl F + frexp F + frexpf F + frexpl F + gamma F + gammaf F + gammal F + hypot F + hypotf F + hypotl F + ilogb F + ilogbf F + ilogbl F + j0 F + j0f F + j0l F + j1 F + j1f F + j1l F + jn F + jnf F + jnl F + ldexp F + ldexpf F + ldexpl F + lgamma F + lgamma_r F + lgammaf F + lgammaf_r F + lgammal F + lgammal_r F + llrint F + llrintf F + llrintl F + llround F + llroundf F + llroundl F + log F + log10 F + log10f F + log10l F + log1p F + log1pf F + log1pl F + log2 F + log2f F + log2l F + logb F + logbf F + logbl F + logf F + logl F + lrint F + lrintf F + lrintl F + lround F + lroundf F + lroundl F + matherr F + modf F + modff F + modfl F + nan F + nanf F + nanl F + nearbyint F + nearbyintf F + nearbyintl F + nextafter F + nextafterf F + nextafterl F + nexttoward F + nexttowardf F + nexttowardl F + pow F + pow10 F + pow10f F + pow10l F + powf F + powl F + remainder F + remainderf F + remainderl F + remquo F + remquof F + remquol F + rint F + rintf F + rintl F + round F + roundf F + roundl F + scalb F + scalbf F + scalbl F + scalbln F + scalblnf F + scalblnl F + scalbn F + scalbnf F + scalbnl F + signgam D 0x4 + significand F + significandf F + significandl F + sin F + sincos F + sincosf F + sincosl F + sinf F + sinh F + sinhf F + sinhl F + sinl F + sqrt F + sqrtf F + sqrtl F + tan F + tanf F + tanh F + tanhf F + tanhl F + tanl F + tgamma F + tgammaf F + tgammal F + trunc F + truncf F + truncl F + y0 F + y0f F + y0l F + y1 F + y1f F + y1l F + yn F + ynf F + ynl F diff --git a/sysdeps/unix/sysv/linux/arm/nptl/libnsl.abilist b/sysdeps/unix/sysv/linux/arm/nptl/libnsl.abilist new file mode 100644 index 0000000000..1d2670c444 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/nptl/libnsl.abilist @@ -0,0 +1,123 @@ +GLIBC_2.4 + GLIBC_2.4 A + __free_fdresult F + __nis_default_access F + __nis_default_group F + __nis_default_owner F + __nis_default_ttl F + __nis_finddirectory F + __nis_hash F + __nisbind_connect F + __nisbind_create F + __nisbind_destroy F + __nisbind_next F + __yp_check F + nis_add F + nis_add_entry F + nis_addmember F + nis_checkpoint F + nis_clone_directory F + nis_clone_object F + nis_clone_result F + nis_creategroup F + nis_destroy_object F + nis_destroygroup F + nis_dir_cmp F + nis_domain_of F + nis_domain_of_r F + nis_first_entry F + nis_free_directory F + nis_free_object F + nis_free_request F + nis_freenames F + nis_freeresult F + nis_freeservlist F + nis_freetags F + nis_getnames F + nis_getservlist F + nis_ismember F + nis_leaf_of F + nis_leaf_of_r F + nis_lerror F + nis_list F + nis_local_directory F + nis_local_group F + nis_local_host F + nis_local_principal F + nis_lookup F + nis_mkdir F + nis_modify F + nis_modify_entry F + nis_name_of F + nis_name_of_r F + nis_next_entry F + nis_perror F + nis_ping F + nis_print_directory F + nis_print_entry F + nis_print_group F + nis_print_group_entry F + nis_print_link F + nis_print_object F + nis_print_result F + nis_print_rights F + nis_print_table F + nis_read_obj F + nis_remove F + nis_remove_entry F + nis_removemember F + nis_rmdir F + nis_servstate F + nis_sperrno F + nis_sperror F + nis_sperror_r F + nis_stats F + nis_verifygroup F + nis_write_obj F + readColdStartFile F + writeColdStartFile F + xdr_cback_data F + xdr_domainname F + xdr_keydat F + xdr_mapname F + xdr_obj_p F + xdr_peername F + xdr_valdat F + xdr_yp_buf F + xdr_ypall F + xdr_ypbind_binding F + xdr_ypbind_resp F + xdr_ypbind_resptype F + xdr_ypbind_setdom F + xdr_ypdelete_args F + xdr_ypmap_parms F + xdr_ypmaplist F + xdr_yppush_status F + xdr_yppushresp_xfr F + xdr_ypreq_key F + xdr_ypreq_nokey F + xdr_ypreq_xfr F + xdr_ypresp_all F + xdr_ypresp_key_val F + xdr_ypresp_maplist F + xdr_ypresp_master F + xdr_ypresp_order F + xdr_ypresp_val F + xdr_ypresp_xfr F + xdr_ypstat F + xdr_ypupdate_args F + xdr_ypxfrstat F + yp_all F + yp_bind F + yp_first F + yp_get_default_domain F + yp_maplist F + yp_master F + yp_match F + yp_next F + yp_order F + yp_unbind F + yp_update F + ypbinderr_string F + yperr_string F + ypprot_err F diff --git a/sysdeps/unix/sysv/linux/arm/nptl/libpthread.abilist b/sysdeps/unix/sysv/linux/arm/nptl/libpthread.abilist new file mode 100644 index 0000000000..6c0bbde672 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/nptl/libpthread.abilist @@ -0,0 +1,229 @@ +GLIBC_2.11 + GLIBC_2.11 A + pthread_sigqueue F +GLIBC_2.12 + GLIBC_2.12 A + pthread_getname_np F + pthread_mutex_consistent F + pthread_mutexattr_getrobust F + pthread_mutexattr_setrobust F + pthread_setname_np F +GLIBC_2.4 + GLIBC_2.4 A + _IO_flockfile F + _IO_ftrylockfile F + _IO_funlockfile F + __close F + __connect F + __errno_location F + __fcntl F + __fork F + __h_errno_location F + __libc_allocate_rtsig F + __libc_current_sigrtmax F + __libc_current_sigrtmin F + __lseek F + __nanosleep F + __open F + __open64 F + __pread64 F + __pthread_cleanup_routine F + __pthread_getspecific F + __pthread_key_create F + __pthread_mutex_destroy F + __pthread_mutex_init F + __pthread_mutex_lock F + __pthread_mutex_trylock F + __pthread_mutex_unlock F + __pthread_mutexattr_destroy F + __pthread_mutexattr_init F + __pthread_mutexattr_settype F + __pthread_once F + __pthread_register_cancel F + __pthread_register_cancel_defer F + __pthread_rwlock_destroy F + __pthread_rwlock_init F + __pthread_rwlock_rdlock F + __pthread_rwlock_tryrdlock F + __pthread_rwlock_trywrlock F + __pthread_rwlock_unlock F + __pthread_rwlock_wrlock F + __pthread_setspecific F + __pthread_unregister_cancel F + __pthread_unregister_cancel_restore F + __pthread_unwind_next F + __pwrite64 F + __read F + __res_state F + __send F + __sigaction F + __vfork F + __wait F + __write F + _pthread_cleanup_pop F + _pthread_cleanup_pop_restore F + _pthread_cleanup_push F + _pthread_cleanup_push_defer F + accept F + close F + connect F + fcntl F + flockfile F + fork F + fsync F + ftrylockfile F + funlockfile F + longjmp F + lseek F + lseek64 F + msync F + nanosleep F + open F + open64 F + pause F + pread F + pread64 F + pthread_atfork F + pthread_attr_destroy F + pthread_attr_getaffinity_np F + pthread_attr_getdetachstate F + pthread_attr_getguardsize F + pthread_attr_getinheritsched F + pthread_attr_getschedparam F + pthread_attr_getschedpolicy F + pthread_attr_getscope F + pthread_attr_getstack F + pthread_attr_getstackaddr F + pthread_attr_getstacksize F + pthread_attr_init F + pthread_attr_setaffinity_np F + pthread_attr_setdetachstate F + pthread_attr_setguardsize F + pthread_attr_setinheritsched F + pthread_attr_setschedparam F + pthread_attr_setschedpolicy F + pthread_attr_setscope F + pthread_attr_setstack F + pthread_attr_setstackaddr F + pthread_attr_setstacksize F + pthread_barrier_destroy F + pthread_barrier_init F + pthread_barrier_wait F + pthread_barrierattr_destroy F + pthread_barrierattr_getpshared F + pthread_barrierattr_init F + pthread_barrierattr_setpshared F + pthread_cancel F + pthread_cond_broadcast F + pthread_cond_destroy F + pthread_cond_init F + pthread_cond_signal F + pthread_cond_timedwait F + pthread_cond_wait F + pthread_condattr_destroy F + pthread_condattr_getclock F + pthread_condattr_getpshared F + pthread_condattr_init F + pthread_condattr_setclock F + pthread_condattr_setpshared F + pthread_create F + pthread_detach F + pthread_equal F + pthread_exit F + pthread_getaffinity_np F + pthread_getattr_np F + pthread_getconcurrency F + pthread_getcpuclockid F + pthread_getschedparam F + pthread_getspecific F + pthread_join F + pthread_key_create F + pthread_key_delete F + pthread_kill F + pthread_kill_other_threads_np F + pthread_mutex_consistent_np F + pthread_mutex_destroy F + pthread_mutex_getprioceiling F + pthread_mutex_init F + pthread_mutex_lock F + pthread_mutex_setprioceiling F + pthread_mutex_timedlock F + pthread_mutex_trylock F + pthread_mutex_unlock F + pthread_mutexattr_destroy F + pthread_mutexattr_getkind_np F + pthread_mutexattr_getprioceiling F + pthread_mutexattr_getprotocol F + pthread_mutexattr_getpshared F + pthread_mutexattr_getrobust_np F + pthread_mutexattr_gettype F + pthread_mutexattr_init F + pthread_mutexattr_setkind_np F + pthread_mutexattr_setprioceiling F + pthread_mutexattr_setprotocol F + pthread_mutexattr_setpshared F + pthread_mutexattr_setrobust_np F + pthread_mutexattr_settype F + pthread_once F + pthread_rwlock_destroy F + pthread_rwlock_init F + pthread_rwlock_rdlock F + pthread_rwlock_timedrdlock F + pthread_rwlock_timedwrlock F + pthread_rwlock_tryrdlock F + pthread_rwlock_trywrlock F + pthread_rwlock_unlock F + pthread_rwlock_wrlock F + pthread_rwlockattr_destroy F + pthread_rwlockattr_getkind_np F + pthread_rwlockattr_getpshared F + pthread_rwlockattr_init F + pthread_rwlockattr_setkind_np F + pthread_rwlockattr_setpshared F + pthread_self F + pthread_setaffinity_np F + pthread_setcancelstate F + pthread_setcanceltype F + pthread_setconcurrency F + pthread_setschedparam F + pthread_setschedprio F + pthread_setspecific F + pthread_sigmask F + pthread_spin_destroy F + pthread_spin_init F + pthread_spin_lock F + pthread_spin_trylock F + pthread_spin_unlock F + pthread_testcancel F + pthread_timedjoin_np F + pthread_tryjoin_np F + pthread_yield F + pwrite F + pwrite64 F + raise F + read F + recv F + recvfrom F + recvmsg F + sem_close F + sem_destroy F + sem_getvalue F + sem_init F + sem_open F + sem_post F + sem_timedwait F + sem_trywait F + sem_unlink F + sem_wait F + send F + sendmsg F + sendto F + sigaction F + siglongjmp F + sigwait F + system F + tcdrain F + vfork F + wait F + waitpid F + write F diff --git a/sysdeps/unix/sysv/linux/arm/nptl/libresolv.abilist b/sysdeps/unix/sysv/linux/arm/nptl/libresolv.abilist new file mode 100644 index 0000000000..e781f2f822 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/nptl/libresolv.abilist @@ -0,0 +1,95 @@ +GLIBC_2.4 + GLIBC_2.4 A + __b64_ntop F + __b64_pton F + __dn_comp F + __dn_count_labels F + __dn_expand F + __dn_skipname F + __fp_nquery F + __fp_query F + __fp_resstat F + __hostalias F + __loc_aton F + __loc_ntoa F + __p_cdname F + __p_cdnname F + __p_class F + __p_class_syms D 0x54 + __p_fqname F + __p_fqnname F + __p_option F + __p_query F + __p_rcode F + __p_secstodate F + __p_time F + __p_type F + __p_type_syms D 0x228 + __putlong F + __putshort F + __res_close F + __res_dnok F + __res_hnok F + __res_hostalias F + __res_isourserver F + __res_mailok F + __res_mkquery F + __res_nameinquery F + __res_nmkquery F + __res_nquery F + __res_nquerydomain F + __res_nsearch F + __res_nsend F + __res_ownok F + __res_queriesmatch F + __res_query F + __res_querydomain F + __res_search F + __res_send F + __sym_ntop F + __sym_ntos F + __sym_ston F + _gethtbyaddr F + _gethtbyname F + _gethtbyname2 F + _gethtent F + _getlong F + _getshort F + _res_opcodes D 0x40 + _sethtent F + inet_net_ntop F + inet_net_pton F + inet_neta F + res_gethostbyaddr F + res_gethostbyname F + res_gethostbyname2 F + res_send_setqhook F + res_send_setrhook F +GLIBC_2.9 + GLIBC_2.9 A + ns_datetosecs F + ns_format_ttl F + ns_get16 F + ns_get32 F + ns_initparse F + ns_makecanon F + ns_msg_getflag F + ns_name_compress F + ns_name_ntol F + ns_name_ntop F + ns_name_pack F + ns_name_pton F + ns_name_rollback F + ns_name_skip F + ns_name_uncompress F + ns_name_unpack F + ns_parse_ttl F + ns_parserr F + ns_put16 F + ns_put32 F + ns_samedomain F + ns_samename F + ns_skiprr F + ns_sprintrr F + ns_sprintrrf F + ns_subdomain F diff --git a/sysdeps/unix/sysv/linux/arm/nptl/librt.abilist b/sysdeps/unix/sysv/linux/arm/nptl/librt.abilist new file mode 100644 index 0000000000..466df4d93b --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/nptl/librt.abilist @@ -0,0 +1,44 @@ +GLIBC_2.4 + GLIBC_2.4 A + aio_cancel F + aio_cancel64 F + aio_error F + aio_error64 F + aio_fsync F + aio_fsync64 F + aio_init F + aio_read F + aio_read64 F + aio_return F + aio_return64 F + aio_suspend F + aio_suspend64 F + aio_write F + aio_write64 F + clock_getcpuclockid F + clock_getres F + clock_gettime F + clock_nanosleep F + clock_settime F + lio_listio F + lio_listio64 F + mq_close F + mq_getattr F + mq_notify F + mq_open F + mq_receive F + mq_send F + mq_setattr F + mq_timedreceive F + mq_timedsend F + mq_unlink F + shm_open F + shm_unlink F + timer_create F + timer_delete F + timer_getoverrun F + timer_gettime F + timer_settime F +GLIBC_2.7 + GLIBC_2.7 A + __mq_open_2 F diff --git a/sysdeps/unix/sysv/linux/arm/nptl/libthread_db.abilist b/sysdeps/unix/sysv/linux/arm/nptl/libthread_db.abilist new file mode 100644 index 0000000000..523772441b --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/nptl/libthread_db.abilist @@ -0,0 +1,42 @@ +GLIBC_2.4 + GLIBC_2.4 A + td_init F + td_log F + td_symbol_list F + td_ta_clear_event F + td_ta_delete F + td_ta_enable_stats F + td_ta_event_addr F + td_ta_event_getmsg F + td_ta_get_nthreads F + td_ta_get_ph F + td_ta_get_stats F + td_ta_map_id2thr F + td_ta_map_lwp2thr F + td_ta_new F + td_ta_reset_stats F + td_ta_set_event F + td_ta_setconcurrency F + td_ta_thr_iter F + td_ta_tsd_iter F + td_thr_clear_event F + td_thr_dbresume F + td_thr_dbsuspend F + td_thr_event_enable F + td_thr_event_getmsg F + td_thr_get_info F + td_thr_getfpregs F + td_thr_getgregs F + td_thr_getxregs F + td_thr_getxregsize F + td_thr_set_event F + td_thr_setfpregs F + td_thr_setgregs F + td_thr_setprio F + td_thr_setsigpending F + td_thr_setxregs F + td_thr_sigsetmask F + td_thr_tls_get_addr F + td_thr_tlsbase F + td_thr_tsd F + td_thr_validate F diff --git a/sysdeps/unix/sysv/linux/arm/nptl/libutil.abilist b/sysdeps/unix/sysv/linux/arm/nptl/libutil.abilist new file mode 100644 index 0000000000..6cb71966a1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/nptl/libutil.abilist @@ -0,0 +1,8 @@ +GLIBC_2.4 + GLIBC_2.4 A + forkpty F + login F + login_tty F + logout F + logwtmp F + openpty F From 896216ffd10dda92c9e71d260205a3cd98fb230f Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sat, 28 Apr 2012 03:41:29 -0700 Subject: [PATCH 4331/4487] Avoid endian.h include in MIPS64 string functions. --- ChangeLog.mips | 6 ++++++ sysdeps/mips/mips64/memcpy.S | 5 ++--- sysdeps/mips/mips64/memset.S | 5 ++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 65ff19d0a1..7b89f08a0d 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,9 @@ +2012-04-28 Joseph Myers + + * sysdeps/mips/mips64/memcpy.S: Don't include . Test + __MIPSEB instead of __BYTE_ORDER. + * sysdeps/mips/mips64/memset.S: Likewise. + 2012-04-27 Joseph Myers * sysdeps/unix/sysv/linux/mips/configure.in (arch_minimum_kernel): diff --git a/sysdeps/mips/mips64/memcpy.S b/sysdeps/mips/mips64/memcpy.S index ae819f6d4f..49ef34d0c6 100644 --- a/sysdeps/mips/mips64/memcpy.S +++ b/sysdeps/mips/mips64/memcpy.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2002-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Hartvig Ekner , 2002. Ported to mips3 n32/n64 by Alexandre Oliva @@ -18,7 +18,6 @@ . */ #include -#include #include @@ -26,7 +25,7 @@ This could probably be optimized further. */ -#if __BYTE_ORDER == __BIG_ENDIAN +#if __MIPSEB # define LDHI ldl /* high part is left in big-endian */ # define SDHI sdl /* high part is left in big-endian */ # define LDLO ldr /* low part is right in big-endian */ diff --git a/sysdeps/mips/mips64/memset.S b/sysdeps/mips/mips64/memset.S index 9800ed3b91..a2f9120e86 100644 --- a/sysdeps/mips/mips64/memset.S +++ b/sysdeps/mips/mips64/memset.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2002-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Hartvig Ekner , 2002. Ported to mips3 n32/n64 by Alexandre Oliva @@ -18,7 +18,6 @@ . */ #include -#include #include @@ -26,7 +25,7 @@ This could probably be optimized further. */ -#if __BYTE_ORDER == __BIG_ENDIAN +#if __MIPSEB # define SDHI sdl /* high part is left in big-endian */ #else # define SDHI sdr /* high part is right in little-endian */ From 8689e8776e53bd3ad034b16972104a5474dbc7c9 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sat, 28 Apr 2012 04:29:32 -0700 Subject: [PATCH 4332/4487] Add abilist data for MIPS. --- ChangeLog.mips | 59 + .../sysv/linux/mips/mips32/nptl/ld.abilist | 20 + .../mips/mips32/nptl/libBrokenLocale.abilist | 5 + .../linux/mips/mips32/nptl/libanl.abilist | 8 + .../sysv/linux/mips/mips32/nptl/libc.abilist | 2242 +++++++++++++++++ .../linux/mips/mips32/nptl/libcrypt.abilist | 11 + .../sysv/linux/mips/mips32/nptl/libdl.abilist | 20 + .../sysv/linux/mips/mips32/nptl/libm.abilist | 376 +++ .../linux/mips/mips32/nptl/libnsl.abilist | 127 + .../linux/mips/mips32/nptl/libpthread.abilist | 265 ++ .../linux/mips/mips32/nptl/libresolv.abilist | 106 + .../sysv/linux/mips/mips32/nptl/librt.abilist | 52 + .../mips/mips32/nptl/libthread_db.abilist | 50 + .../linux/mips/mips32/nptl/libutil.abilist | 10 + .../linux/mips/mips64/n32/nptl/ld.abilist | 18 + .../mips64/n32/nptl/libBrokenLocale.abilist | 3 + .../linux/mips/mips64/n32/nptl/libanl.abilist | 6 + .../linux/mips/mips64/n32/nptl/libc.abilist | 2238 ++++++++++++++++ .../mips/mips64/n32/nptl/libcrypt.abilist | 9 + .../linux/mips/mips64/n32/nptl/libdl.abilist | 18 + .../linux/mips/mips64/n32/nptl/libm.abilist | 403 +++ .../linux/mips/mips64/n32/nptl/libnsl.abilist | 125 + .../mips/mips64/n32/nptl/libpthread.abilist | 263 ++ .../mips/mips64/n32/nptl/libresolv.abilist | 104 + .../linux/mips/mips64/n32/nptl/librt.abilist | 50 + .../mips/mips64/n32/nptl/libthread_db.abilist | 48 + .../mips/mips64/n32/nptl/libutil.abilist | 8 + .../linux/mips/mips64/n64/nptl/ld.abilist | 18 + .../mips64/n64/nptl/libBrokenLocale.abilist | 3 + .../linux/mips/mips64/n64/nptl/libanl.abilist | 6 + .../linux/mips/mips64/n64/nptl/libc.abilist | 2234 ++++++++++++++++ .../mips/mips64/n64/nptl/libcrypt.abilist | 9 + .../linux/mips/mips64/n64/nptl/libdl.abilist | 18 + .../linux/mips/mips64/n64/nptl/libm.abilist | 403 +++ .../linux/mips/mips64/n64/nptl/libnsl.abilist | 125 + .../mips/mips64/n64/nptl/libpthread.abilist | 263 ++ .../mips/mips64/n64/nptl/libresolv.abilist | 104 + .../linux/mips/mips64/n64/nptl/librt.abilist | 50 + .../mips/mips64/n64/nptl/libthread_db.abilist | 48 + .../mips/mips64/n64/nptl/libutil.abilist | 8 + 40 files changed, 9933 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/mips/mips32/nptl/ld.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips32/nptl/libBrokenLocale.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips32/nptl/libanl.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips32/nptl/libcrypt.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips32/nptl/libdl.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips32/nptl/libm.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips32/nptl/libnsl.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips32/nptl/libpthread.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips32/nptl/libresolv.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips32/nptl/librt.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips32/nptl/libthread_db.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips32/nptl/libutil.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/ld.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libBrokenLocale.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libanl.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libc.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libcrypt.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libdl.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libm.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libnsl.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libpthread.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libresolv.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/librt.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libthread_db.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libutil.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/ld.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libBrokenLocale.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libanl.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libcrypt.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libdl.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libm.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libnsl.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libpthread.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libresolv.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/librt.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libthread_db.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libutil.abilist diff --git a/ChangeLog.mips b/ChangeLog.mips index 7b89f08a0d..f487d391af 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,5 +1,64 @@ 2012-04-28 Joseph Myers + * sysdeps/unix/sysv/linux/mips/mips32/nptl/ld.abilist: New file. + * sysdeps/unix/sysv/linux/mips/mips32/nptl/libBrokenLocale.abilist: + Likewise. + * sysdeps/unix/sysv/linux/mips/mips32/nptl/libanl.abilist: Likewise. + * sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist: Likewise. + * sysdeps/unix/sysv/linux/mips/mips32/nptl/libcrypt.abilist: Likewise. + * sysdeps/unix/sysv/linux/mips/mips32/nptl/libdl.abilist: Likewise. + * sysdeps/unix/sysv/linux/mips/mips32/nptl/libm.abilist: Likewise. + * sysdeps/unix/sysv/linux/mips/mips32/nptl/libnsl.abilist: Likewise. + * sysdeps/unix/sysv/linux/mips/mips32/nptl/libpthread.abilist: + Likewise. + * sysdeps/unix/sysv/linux/mips/mips32/nptl/libresolv.abilist: Likewise. + * sysdeps/unix/sysv/linux/mips/mips32/nptl/librt.abilist: Likewise. + * sysdeps/unix/sysv/linux/mips/mips32/nptl/libthread_db.abilist: + Likewise. + * sysdeps/unix/sysv/linux/mips/mips32/nptl/libutil.abilist: Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/ld.abilist: Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libBrokenLocale.abilist: + Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libanl.abilist: + Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libc.abilist: Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libcrypt.abilist: + Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libdl.abilist: Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libm.abilist: Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libnsl.abilist: + Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libpthread.abilist: + Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libresolv.abilist: + Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/librt.abilist: Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libthread_db.abilist: + Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libutil.abilist: + Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/ld.abilist: Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libBrokenLocale.abilist: + Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libanl.abilist: + Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilist: Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libcrypt.abilist: + Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libdl.abilist: Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libm.abilist: Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libnsl.abilist: + Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libpthread.abilist: + Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libresolv.abilist: + Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/librt.abilist: Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libthread_db.abilist: + Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libutil.abilist: + Likewise. + * sysdeps/mips/mips64/memcpy.S: Don't include . Test __MIPSEB instead of __BYTE_ORDER. * sysdeps/mips/mips64/memset.S: Likewise. diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/ld.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nptl/ld.abilist new file mode 100644 index 0000000000..507115565b --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips32/nptl/ld.abilist @@ -0,0 +1,20 @@ +GLIBC_2.0 + GLIBC_2.0 A + __libc_memalign F + _r_debug D 0x14 + calloc F + free F + malloc F + realloc F +GLIBC_2.2 + GLIBC_2.2 A + __libc_stack_end D 0x4 + _dl_mcount F +GLIBC_2.3 + GLIBC_2.3 A + __tls_get_addr F +GLIBC_2.4 + GLIBC_2.4 A + __stack_chk_guard D 0x4 +_gp_disp + A diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libBrokenLocale.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libBrokenLocale.abilist new file mode 100644 index 0000000000..6951abb98e --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libBrokenLocale.abilist @@ -0,0 +1,5 @@ +GLIBC_2.0 + GLIBC_2.0 A + __ctype_get_mb_cur_max F +_gp_disp + A diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libanl.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libanl.abilist new file mode 100644 index 0000000000..14555a7127 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libanl.abilist @@ -0,0 +1,8 @@ +GLIBC_2.2.3 + GLIBC_2.2.3 A + gai_cancel F + gai_error F + gai_suspend F + getaddrinfo_a F +_gp_disp + A diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist new file mode 100644 index 0000000000..56e75a5f5e --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist @@ -0,0 +1,2242 @@ +GCC_3.0 + GCC_3.0 A + _Unwind_Find_FDE F + __deregister_frame_info_bases F + __register_frame_info_bases F + __register_frame_info_table_bases F +GLIBC_2.0 + GLIBC_2.0 A + _IO_adjust_column F + _IO_default_doallocate F + _IO_default_finish F + _IO_default_pbackfail F + _IO_default_uflow F + _IO_default_xsgetn F + _IO_default_xsputn F + _IO_do_write F + _IO_doallocbuf F + _IO_fclose F + _IO_fdopen F + _IO_feof F + _IO_ferror F + _IO_fflush F + _IO_fgetpos F + _IO_fgets F + _IO_file_attach F + _IO_file_close F + _IO_file_close_it F + _IO_file_doallocate F + _IO_file_fopen F + _IO_file_init F + _IO_file_jumps D 0x54 + _IO_file_open F + _IO_file_overflow F + _IO_file_read F + _IO_file_seek F + _IO_file_seekoff F + _IO_file_setbuf F + _IO_file_stat F + _IO_file_sync F + _IO_file_underflow F + _IO_file_write F + _IO_file_xsputn F + _IO_flockfile F + _IO_flush_all F + _IO_flush_all_linebuffered F + _IO_fopen F + _IO_fprintf F + _IO_fputs F + _IO_fread F + _IO_free_backup_area F + _IO_fsetpos F + _IO_ftell F + _IO_ftrylockfile F + _IO_funlockfile F + _IO_fwrite F + _IO_getc F + _IO_getline F + _IO_gets F + _IO_init F + _IO_init_marker F + _IO_link_in F + _IO_list_all D 0x4 + _IO_marker_delta F + _IO_marker_difference F + _IO_padn F + _IO_peekc_locked F + _IO_popen F + _IO_printf F + _IO_proc_close F + _IO_proc_open F + _IO_putc F + _IO_puts F + _IO_remove_marker F + _IO_seekmark F + _IO_seekoff F + _IO_seekpos F + _IO_setb F + _IO_setbuffer F + _IO_setvbuf F + _IO_sgetn F + _IO_sprintf F + _IO_sputbackc F + _IO_sscanf F + _IO_stderr_ D 0x50 + _IO_stdin_ D 0x50 + _IO_stdout_ D 0x50 + _IO_str_init_readonly F + _IO_str_init_static F + _IO_str_overflow F + _IO_str_pbackfail F + _IO_str_seekoff F + _IO_str_underflow F + _IO_sungetc F + _IO_switch_to_get_mode F + _IO_un_link F + _IO_ungetc F + _IO_unsave_markers F + _IO_vfprintf F + _IO_vfscanf F + _IO_vsprintf F + ___brk_addr D 0x4 + __adjtimex F + __after_morecore_hook D 0x4 + __argz_count F + __argz_next F + __argz_stringify F + __assert_fail F + __assert_perror_fail F + __bsd_getpgrp F + __bzero F + __check_rhosts_file D 0x4 + __clone F + __close F + __cmsg_nxthdr F + __connect F + __ctype32_b D 0x4 + __ctype_b D 0x4 + __ctype_get_mb_cur_max F + __ctype_tolower D 0x4 + __ctype_toupper D 0x4 + __curbrk D 0x4 + __daylight D 0x4 + __dcgettext F + __default_morecore F + __deregister_frame F + __deregister_frame_info F + __dgettext F + __dup2 F + __environ D 0x4 + __errno_location F + __fcntl F + __ffs F + __finite F + __finitef F + __finitel F + __fork F + __fpu_control D 0x4 + __frame_state_for F + __free_hook D 0x4 + __fxstat F + __getdelim F + __getpagesize F + __getpgid F + __getpid F + __gettimeofday F + __gmtime_r F + __h_errno_location F + __isinf F + __isinff F + __isinfl F + __isnan F + __isnanf F + __isnanl F + __iswctype F + __ivaliduser F + __libc_calloc F + __libc_free F + __libc_init_first F + __libc_mallinfo F + __libc_malloc F + __libc_mallopt F + __libc_memalign F + __libc_pvalloc F + __libc_realloc F + __libc_start_main F + __libc_valloc F + __lseek F + __lxstat F + __malloc_hook D 0x4 + __malloc_initialize_hook D 0x4 + __mbrlen F + __mbrtowc F + __memalign_hook D 0x4 + __mempcpy F + __monstartup F + __morecore D 0x4 + __nss_configure_lookup F + __nss_database_lookup F + __nss_group_lookup F + __nss_hosts_lookup F + __nss_next F + __nss_passwd_lookup F + __open F + __overflow F + __pipe F + __printf_fp F + __profile_frequency F + __progname D 0x4 + __progname_full D 0x4 + __rcmd_errstr D 0x4 + __read F + __realloc_hook D 0x4 + __register_frame F + __register_frame_info F + __register_frame_info_table F + __register_frame_table F + __res_randomid F + __sbrk F + __sched_get_priority_max F + __sched_get_priority_min F + __sched_getparam F + __sched_getscheduler F + __sched_setscheduler F + __sched_yield F + __secure_getenv F + __select F + __send F + __setpgid F + __sigaction F + __sigaddset F + __sigdelset F + __sigismember F + __sigpause F + __sigsetjmp F + __stpcpy F + __stpncpy F + __strcasecmp F + __strdup F + __strerror_r F + __strtod_internal F + __strtof_internal F + __strtok_r F + __strtol_internal F + __strtold_internal F + __strtoll_internal F + __strtoq_internal F + __strtoul_internal F + __strtoull_internal F + __strtouq_internal F + __sysv_signal F + __timezone D 0x4 + __tzname D 0x8 + __uflow F + __underflow F + __vfscanf F + __vsnprintf F + __vsscanf F + __wait F + __waitpid F + __wcstod_internal F + __wcstof_internal F + __wcstol_internal F + __wcstold_internal F + __wcstoll_internal F + __wcstoul_internal F + __wcstoull_internal F + __write F + __xmknod F + __xpg_basename F + __xstat F + _environ D 0x4 + _exit F + _flush_cache F + _libc_intl_domainname D 0x5 + _longjmp F + _mcleanup F + _mcount F + _nl_default_dirname D 0x12 + _nl_domain_bindings D 0x4 + _nl_msg_cat_cntr D 0x4 + _null_auth D 0xc + _obstack D 0x4 + _obstack_allocated_p F + _obstack_begin F + _obstack_begin_1 F + _obstack_free F + _obstack_memory_used F + _obstack_newchunk F + _res D 0x200 + _rpc_dtablesize F + _seterr_reply F + _setjmp F + _sys_errlist D 0x1ec + _sys_nerr D 0x4 + _sys_siglist D 0x80 + _tolower F + _toupper F + a64l F + abort F + abs F + accept F + access F + acct F + addmntent F + adjtime F + adjtimex F + advance F + alarm F + alphasort F + argz_add F + argz_add_sep F + argz_append F + argz_count F + argz_create F + argz_create_sep F + argz_delete F + argz_extract F + argz_insert F + argz_next F + argz_replace F + argz_stringify F + asctime F + asctime_r F + asprintf F + atexit F + atof F + atoi F + atol F + atoll F + authnone_create F + authunix_create F + authunix_create_default F + basename F + bcmp F + bcopy F + bdflush F + bind F + bindresvport F + bindtextdomain F + brk F + bsd_signal F + bsearch F + btowc F + bzero F + cachectl F + cacheflush F + calloc F + callrpc F + canonicalize_file_name F + catclose F + catgets F + catopen F + cfgetispeed F + cfgetospeed F + cfmakeraw F + cfree F + cfsetispeed F + cfsetospeed F + cfsetspeed F + chdir F + chflags F + chmod F + chown F + chroot F + clearenv F + clearerr F + clearerr_unlocked F + clnt_broadcast F + clnt_create F + clnt_pcreateerror F + clnt_perrno F + clnt_perror F + clnt_spcreateerror F + clnt_sperrno F + clnt_sperror F + clntraw_create F + clnttcp_create F + clntudp_bufcreate F + clntudp_create F + clock F + clone F + close F + closedir F + closelog F + confstr F + connect F + copysign F + copysignf F + copysignl F + creat F + create_module F + ctermid F + ctime F + ctime_r F + cuserid F + daemon F + daylight D 0x4 + dcgettext F + delete_module F + dgettext F + difftime F + dirfd F + dirname F + div F + dprintf F + drand48 F + drand48_r F + dup F + dup2 F + dysize F + ecvt F + ecvt_r F + endaliasent F + endfsent F + endgrent F + endhostent F + endmntent F + endnetent F + endnetgrent F + endprotoent F + endpwent F + endrpcent F + endservent F + endspent F + endttyent F + endusershell F + endutent F + environ D 0x4 + envz_add F + envz_entry F + envz_get F + envz_merge F + envz_remove F + envz_strip F + erand48 F + erand48_r F + err F + error F + error_at_line F + error_message_count D 0x4 + error_one_per_line D 0x4 + error_print_progname D 0x4 + errx F + ether_aton F + ether_aton_r F + ether_hostton F + ether_line F + ether_ntoa F + ether_ntoa_r F + ether_ntohost F + euidaccess F + execl F + execle F + execlp F + execv F + execve F + execvp F + exit F + fchdir F + fchflags F + fchmod F + fchown F + fclose F + fcloseall F + fcntl F + fcvt F + fcvt_r F + fdatasync F + fdopen F + feof F + feof_unlocked F + ferror F + ferror_unlocked F + fexecve F + fflush F + fflush_unlocked F + ffs F + fgetc F + fgetgrent F + fgetgrent_r F + fgetpos F + fgetpwent F + fgetpwent_r F + fgets F + fgetspent F + fgetspent_r F + fileno F + fileno_unlocked F + finite F + finitef F + finitel F + flock F + flockfile F + fnmatch F + fopen F + fopencookie F + fork F + fpathconf F + fprintf F + fputc F + fputc_unlocked F + fputs F + fread F + free F + freeaddrinfo F + freopen F + frexp F + frexpf F + frexpl F + fscanf F + fseek F + fsetpos F + fstatfs F + fsync F + ftell F + ftime F + ftok F + ftruncate F + ftrylockfile F + fts_children F + fts_close F + fts_open F + fts_read F + fts_set F + ftw F + funlockfile F + fwrite F + gcvt F + get_avphys_pages F + get_current_dir_name F + get_kernel_syms F + get_myaddress F + get_nprocs F + get_nprocs_conf F + get_phys_pages F + getaddrinfo F + getaliasbyname F + getaliasbyname_r F + getaliasent F + getaliasent_r F + getc F + getc_unlocked F + getchar F + getchar_unlocked F + getcwd F + getdelim F + getdirentries F + getdomainname F + getdtablesize F + getegid F + getenv F + geteuid F + getfsent F + getfsfile F + getfsspec F + getgid F + getgrent F + getgrent_r F + getgrgid F + getgrgid_r F + getgrnam F + getgrnam_r F + getgroups F + gethostbyaddr F + gethostbyaddr_r F + gethostbyname F + gethostbyname2 F + gethostbyname2_r F + gethostbyname_r F + gethostent F + gethostent_r F + gethostid F + gethostname F + getitimer F + getline F + getlogin F + getlogin_r F + getmntent F + getmntent_r F + getnetbyaddr F + getnetbyaddr_r F + getnetbyname F + getnetbyname_r F + getnetent F + getnetent_r F + getnetgrent F + getnetgrent_r F + getopt F + getopt_long F + getopt_long_only F + getpagesize F + getpass F + getpeername F + getpgid F + getpgrp F + getpid F + getppid F + getpriority F + getprotobyname F + getprotobyname_r F + getprotobynumber F + getprotobynumber_r F + getprotoent F + getprotoent_r F + getpublickey F + getpw F + getpwent F + getpwent_r F + getpwnam F + getpwnam_r F + getpwuid F + getpwuid_r F + getresgid F + getresuid F + getrlimit F + getrpcbyname F + getrpcbyname_r F + getrpcbynumber F + getrpcbynumber_r F + getrpcent F + getrpcent_r F + getrpcport F + getrusage F + gets F + getsecretkey F + getservbyname F + getservbyname_r F + getservbyport F + getservbyport_r F + getservent F + getservent_r F + getsid F + getsockname F + getsockopt F + getspent F + getspent_r F + getspnam F + getspnam_r F + getsubopt F + gettext F + gettimeofday F + getttyent F + getttynam F + getuid F + getusershell F + getutent F + getutent_r F + getutid F + getutid_r F + getutline F + getutline_r F + getw F + getwd F + glob F + glob_pattern_p F + globfree F + gmtime F + gmtime_r F + group_member F + gsignal F + gtty F + h_errlist D 0x14 + h_nerr D 0x4 + hasmntopt F + hcreate F + hcreate_r F + hdestroy F + hdestroy_r F + herror F + hsearch F + hsearch_r F + hstrerror F + htonl F + htons F + index F + inet_addr F + inet_aton F + inet_lnaof F + inet_makeaddr F + inet_netof F + inet_network F + inet_nsap_addr F + inet_nsap_ntoa F + inet_ntoa F + inet_ntop F + inet_pton F + init_module F + initgroups F + initstate F + initstate_r F + innetgr F + insque F + ioctl F + iruserok F + isalnum F + isalpha F + isascii F + isatty F + isblank F + iscntrl F + isdigit F + isfdtype F + isgraph F + isinf F + isinff F + isinfl F + islower F + isnan F + isnanf F + isnanl F + isprint F + ispunct F + isspace F + isupper F + iswalnum F + iswalpha F + iswcntrl F + iswctype F + iswdigit F + iswgraph F + iswlower F + iswprint F + iswpunct F + iswspace F + iswupper F + iswxdigit F + isxdigit F + jrand48 F + jrand48_r F + kill F + killpg F + klogctl F + l64a F + labs F + lchown F + lckpwdf F + lcong48 F + lcong48_r F + ldexp F + ldexpf F + ldexpl F + ldiv F + lfind F + link F + listen F + llabs F + lldiv F + llseek F + loc1 D 0x4 + loc2 D 0x4 + localeconv F + localtime F + localtime_r F + lockf F + locs D 0x4 + longjmp F + lrand48 F + lrand48_r F + lsearch F + lseek F + madvise F + mallinfo F + malloc F + malloc_get_state F + malloc_set_state F + malloc_stats F + malloc_trim F + malloc_usable_size F + mallopt F + mallwatch D 0x4 + mblen F + mbrlen F + mbrtowc F + mbsinit F + mbsnrtowcs F + mbsrtowcs F + mbstowcs F + mbtowc F + mcheck F + memalign F + memccpy F + memchr F + memcmp F + memcpy F + memfrob F + memmem F + memmove F + memset F + mkdir F + mkfifo F + mkstemp F + mktemp F + mktime F + mlock F + mlockall F + mmap F + modf F + modff F + modfl F + monstartup F + mount F + mprobe F + mprotect F + mrand48 F + mrand48_r F + mremap F + msgctl F + msgget F + msgrcv F + msgsnd F + msync F + mtrace F + munlock F + munlockall F + munmap F + muntrace F + nanosleep F + nfsservctl F + nice F + nl_langinfo F + nrand48 F + nrand48_r F + ntohl F + ntohs F + obstack_alloc_failed_handler D 0x4 + obstack_exit_failure D 0x4 + obstack_free F + obstack_printf F + obstack_vprintf F + on_exit F + open F + open_memstream F + opendir F + openlog F + optarg D 0x4 + opterr D 0x4 + optind D 0x4 + optopt D 0x4 + parse_printf_format F + pathconf F + pause F + pclose F + perror F + personality F + pipe F + pmap_getmaps F + pmap_getport F + pmap_rmtcall F + pmap_set F + pmap_unset F + poll F + popen F + prctl F + printf F + profil F + program_invocation_name D 0x4 + program_invocation_short_name D 0x4 + pselect F + psignal F + pthread_attr_destroy F + pthread_attr_getdetachstate F + pthread_attr_getinheritsched F + pthread_attr_getschedparam F + pthread_attr_getschedpolicy F + pthread_attr_getscope F + pthread_attr_init F + pthread_attr_setdetachstate F + pthread_attr_setinheritsched F + pthread_attr_setschedparam F + pthread_attr_setschedpolicy F + pthread_attr_setscope F + pthread_cond_broadcast F + pthread_cond_destroy F + pthread_cond_init F + pthread_cond_signal F + pthread_cond_timedwait F + pthread_cond_wait F + pthread_condattr_destroy F + pthread_condattr_init F + pthread_equal F + pthread_exit F + pthread_getschedparam F + pthread_mutex_destroy F + pthread_mutex_init F + pthread_mutex_lock F + pthread_mutex_unlock F + pthread_self F + pthread_setcancelstate F + pthread_setcanceltype F + pthread_setschedparam F + ptrace F + putc F + putc_unlocked F + putchar F + putchar_unlocked F + putenv F + putpwent F + puts F + putspent F + pututline F + putw F + pvalloc F + qecvt F + qecvt_r F + qfcvt F + qfcvt_r F + qgcvt F + qsort F + query_module F + quotactl F + raise F + rand F + rand_r F + random F + random_r F + rcmd F + re_comp F + re_compile_fastmap F + re_compile_pattern F + re_exec F + re_match F + re_match_2 F + re_max_failures D 0x4 + re_search F + re_search_2 F + re_set_registers F + re_set_syntax F + re_syntax_options D 0x4 + read F + readdir F + readdir_r F + readlink F + readv F + realloc F + realpath F + reboot F + recv F + recvfrom F + recvmsg F + regcomp F + regerror F + regexec F + regfree F + register_printf_function F + registerrpc F + remove F + remque F + rename F + res_init F + revoke F + rewind F + rewinddir F + rexec F + rexecoptions D 0x4 + rindex F + rmdir F + rpc_createerr D 0x10 + rpmatch F + rresvport F + ruserok F + ruserpass F + sbrk F + scalbn F + scalbnf F + scalbnl F + scandir F + scanf F + sched_get_priority_max F + sched_get_priority_min F + sched_getparam F + sched_getscheduler F + sched_rr_get_interval F + sched_setparam F + sched_setscheduler F + sched_yield F + seed48 F + seed48_r F + seekdir F + select F + semctl F + semget F + semop F + send F + sendmsg F + sendto F + setaliasent F + setbuf F + setbuffer F + setcontext F + setdomainname F + setegid F + setenv F + seteuid F + setfsent F + setfsgid F + setfsuid F + setgid F + setgrent F + setgroups F + sethostent F + sethostid F + sethostname F + setitimer F + setjmp F + setlinebuf F + setlocale F + setlogin F + setlogmask F + setmntent F + setnetent F + setnetgrent F + setpgid F + setpgrp F + setpriority F + setprotoent F + setpwent F + setregid F + setresgid F + setresuid F + setreuid F + setrlimit F + setrpcent F + setservent F + setsid F + setsockopt F + setspent F + setstate F + setstate_r F + settimeofday F + setttyent F + setuid F + setusershell F + setutent F + setvbuf F + sgetspent F + sgetspent_r F + shmat F + shmctl F + shmdt F + shmget F + shutdown F + sigaction F + sigaddset F + sigaltstack F + sigandset F + sigblock F + sigdelset F + sigemptyset F + sigfillset F + siggetmask F + siginterrupt F + sigisemptyset F + sigismember F + siglongjmp F + signal F + sigorset F + sigpause F + sigpending F + sigprocmask F + sigreturn F + sigsetmask F + sigstack F + sigsuspend F + sigvec F + sigwait F + sleep F + snprintf F + socket F + socketpair F + sprintf F + srand F + srand48 F + srand48_r F + srandom F + srandom_r F + sscanf F + ssignal F + sstk F + statfs F + stderr D 0x4 + stdin D 0x4 + stdout D 0x4 + step F + stime F + stpcpy F + stpncpy F + strcasecmp F + strcat F + strchr F + strcmp F + strcoll F + strcpy F + strcspn F + strdup F + strerror F + strerror_r F + strfmon F + strfry F + strftime F + strlen F + strncasecmp F + strncat F + strncmp F + strncpy F + strndup F + strnlen F + strpbrk F + strptime F + strrchr F + strsep F + strsignal F + strspn F + strstr F + strtod F + strtof F + strtok F + strtok_r F + strtol F + strtold F + strtoll F + strtoq F + strtoul F + strtoull F + strtouq F + strxfrm F + stty F + svc_exit F + svc_fdset D 0x80 + svc_getreq F + svc_getreqset F + svc_register F + svc_run F + svc_sendreply F + svc_unregister F + svcauthdes_stats D 0xc + svcerr_auth F + svcerr_decode F + svcerr_noproc F + svcerr_noprog F + svcerr_progvers F + svcerr_systemerr F + svcerr_weakauth F + svcfd_create F + svcraw_create F + svctcp_create F + svcudp_bufcreate F + svcudp_create F + svcudp_enablecache F + swab F + swapoff F + swapon F + symlink F + sync F + sys_errlist D 0x1ec + sys_nerr D 0x4 + sys_sigabbrev D 0x80 + sys_siglist D 0x80 + syscall F + sysconf F + sysctl F + sysinfo F + syslog F + sysmips F + system F + tcdrain F + tcflow F + tcflush F + tcgetattr F + tcgetpgrp F + tcsendbreak F + tcsetattr F + tcsetpgrp F + tdelete F + telldir F + tempnam F + textdomain F + tfind F + time F + timegm F + timelocal F + times F + timezone D 0x4 + tmpfile F + tmpnam F + tmpnam_r F + toascii F + tolower F + toupper F + towctrans F + towlower F + towupper F + tr_break F + truncate F + tsearch F + ttyname F + ttyname_r F + ttyslot F + twalk F + tzname D 0x8 + tzset F + ualarm F + ulckpwdf F + ulimit F + umask F + umount F + uname F + ungetc F + unlink F + unsetenv F + updwtmp F + uselib F + usleep F + ustat F + utime F + utimes F + utmpname F + valloc F + vasprintf F + vdprintf F + verr F + verrx F + vfork F + vfprintf F + vfscanf F + vhangup F + vlimit F + vprintf F + vscanf F + vsnprintf F + vsprintf F + vsscanf F + vsyslog F + vtimes F + vwarn F + vwarnx F + wait F + wait3 F + wait4 F + waitpid F + warn F + warnx F + wcpcpy F + wcpncpy F + wcrtomb F + wcscat F + wcschr F + wcscmp F + wcscoll F + wcscpy F + wcscspn F + wcsdup F + wcslen F + wcsncat F + wcsncmp F + wcsncpy F + wcsnrtombs F + wcspbrk F + wcsrchr F + wcsrtombs F + wcsspn F + wcsstr F + wcstod F + wcstof F + wcstok F + wcstol F + wcstold F + wcstombs F + wcstoq F + wcstoul F + wcstouq F + wcswidth F + wcsxfrm F + wctob F + wctomb F + wctrans F + wctype F + wcwidth F + wmemchr F + wmemcmp F + wmemcpy F + wmemmove F + wmemset F + write F + writev F + xdr_accepted_reply F + xdr_array F + xdr_authunix_parms F + xdr_bool F + xdr_bytes F + xdr_callhdr F + xdr_callmsg F + xdr_char F + xdr_cryptkeyarg F + xdr_cryptkeyarg2 F + xdr_cryptkeyres F + xdr_des_block F + xdr_double F + xdr_enum F + xdr_float F + xdr_free F + xdr_int F + xdr_key_netstarg F + xdr_key_netstres F + xdr_keybuf F + xdr_keystatus F + xdr_long F + xdr_netobj F + xdr_opaque F + xdr_opaque_auth F + xdr_pmap F + xdr_pmaplist F + xdr_pointer F + xdr_reference F + xdr_rejected_reply F + xdr_replymsg F + xdr_rmtcall_args F + xdr_rmtcallres F + xdr_short F + xdr_string F + xdr_u_char F + xdr_u_int F + xdr_u_long F + xdr_u_short F + xdr_union F + xdr_vector F + xdr_void F + xdr_wrapstring F + xdrmem_create F + xdrrec_create F + xdrrec_endofrecord F + xdrrec_eof F + xdrrec_skiprecord F + xdrstdio_create F + xencrypt F + xprt_register F + xprt_unregister F +GLIBC_2.10 + GLIBC_2.10 A + __cxa_at_quick_exit F + __posix_getopt F + accept4 F + endsgent F + fallocate F + fgetsgent F + fgetsgent_r F + getsgent F + getsgent_r F + getsgnam F + getsgnam_r F + malloc_info F + preadv F + preadv64 F + psiginfo F + putsgent F + pwritev F + pwritev64 F + quick_exit F + register_printf_modifier F + register_printf_specifier F + register_printf_type F + setsgent F + sgetsgent F + sgetsgent_r F +GLIBC_2.11 + GLIBC_2.11 A + __longjmp_chk F + execvpe F + fallocate64 F + mkostemps F + mkostemps64 F + mkstemps F + mkstemps64 F +GLIBC_2.12 + GLIBC_2.12 A + ntp_gettimex F + recvmmsg F +GLIBC_2.13 + GLIBC_2.13 A + fanotify_init F + fanotify_mark F + prlimit F + prlimit64 F +GLIBC_2.14 + GLIBC_2.14 A + clock_adjtime F + name_to_handle_at F + open_by_handle_at F + sendmmsg F + setns F + syncfs F +GLIBC_2.15 + GLIBC_2.15 A + __fdelt_chk F + __fdelt_warn F + posix_spawn F + posix_spawnp F + process_vm_readv F + process_vm_writev F + scandirat F + scandirat64 F +GLIBC_2.16 + GLIBC_2.16 A + __poll_chk F + __ppoll_chk F + aligned_alloc F + c16rtomb F + c32rtomb F + mbrtoc16 F + mbrtoc32 F + timespec_get F +GLIBC_2.2 + GLIBC_2.2 A + _Exit F + _IO_2_1_stderr_ D 0xa0 + _IO_2_1_stdin_ D 0xa0 + _IO_2_1_stdout_ D 0xa0 + _IO_adjust_wcolumn F + _IO_do_write F + _IO_fclose F + _IO_fdopen F + _IO_fgetpos F + _IO_fgetpos64 F + _IO_file_attach F + _IO_file_close_it F + _IO_file_finish F + _IO_file_fopen F + _IO_file_init F + _IO_file_overflow F + _IO_file_seekoff F + _IO_file_setbuf F + _IO_file_sync F + _IO_file_underflow F + _IO_file_write F + _IO_file_xsputn F + _IO_fopen F + _IO_free_wbackup_area F + _IO_fsetpos F + _IO_fsetpos64 F + _IO_getline_info F + _IO_init_wmarker F + _IO_iter_begin F + _IO_iter_end F + _IO_iter_file F + _IO_iter_next F + _IO_least_wmarker F + _IO_list_lock F + _IO_list_resetlock F + _IO_list_unlock F + _IO_popen F + _IO_proc_close F + _IO_proc_open F + _IO_seekwmark F + _IO_sputbackwc F + _IO_sungetwc F + _IO_switch_to_main_wget_area F + _IO_switch_to_wbackup_area F + _IO_switch_to_wget_mode F + _IO_unsave_wmarkers F + _IO_wdefault_doallocate F + _IO_wdefault_finish F + _IO_wdefault_pbackfail F + _IO_wdefault_uflow F + _IO_wdefault_xsgetn F + _IO_wdefault_xsputn F + _IO_wdo_write F + _IO_wdoallocbuf F + _IO_wfile_jumps D 0x54 + _IO_wfile_overflow F + _IO_wfile_seekoff F + _IO_wfile_sync F + _IO_wfile_underflow F + _IO_wfile_xsputn F + _IO_wmarker_delta F + _IO_wsetb F + __asprintf F + __assert F + __backtrace F + __backtrace_symbols F + __backtrace_symbols_fd F + __ctype32_tolower D 0x4 + __ctype32_toupper D 0x4 + __cxa_atexit F + __cxa_finalize F + __cyg_profile_func_enter F + __cyg_profile_func_exit F + __duplocale F + __endmntent F + __fbufsize F + __flbf F + __fpending F + __fpurge F + __freadable F + __freading F + __freelocale F + __fsetlocking F + __fwritable F + __fwriting F + __fxstat64 F + __getmntent_r F + __isalnum_l F + __isalpha_l F + __isascii_l F + __isblank_l F + __iscntrl_l F + __isdigit_l F + __isgraph_l F + __islower_l F + __isprint_l F + __ispunct_l F + __isspace_l F + __isupper_l F + __iswalnum_l F + __iswalpha_l F + __iswblank_l F + __iswcntrl_l F + __iswctype_l F + __iswdigit_l F + __iswgraph_l F + __iswlower_l F + __iswprint_l F + __iswpunct_l F + __iswspace_l F + __iswupper_l F + __iswxdigit_l F + __isxdigit_l F + __key_decryptsession_pk_LOCAL D 0x4 + __key_encryptsession_pk_LOCAL D 0x4 + __key_gendes_LOCAL D 0x4 + __libc_allocate_rtsig F + __libc_current_sigrtmax F + __libc_current_sigrtmin F + __libc_freeres F + __libc_sa_len F + __lxstat64 F + __mempcpy_small F + __newlocale F + __nl_langinfo_l F + __open64 F + __poll F + __pread64 F + __pwrite64 F + __rawmemchr F + __res_init F + __res_nclose F + __res_ninit F + __res_state F + __setmntent F + __signbit F + __signbitf F + __sigsuspend F + __statfs F + __stpcpy_small F + __strcasecmp_l F + __strcasestr F + __strcoll_l F + __strcpy_small F + __strcspn_c1 F + __strcspn_c2 F + __strcspn_c3 F + __strfmon_l F + __strncasecmp_l F + __strndup F + __strpbrk_c2 F + __strpbrk_c3 F + __strsep_1c F + __strsep_2c F + __strsep_3c F + __strsep_g F + __strspn_c1 F + __strspn_c2 F + __strspn_c3 F + __strtod_l F + __strtof_l F + __strtok_r_1c F + __strtol_l F + __strtold_l F + __strtoll_l F + __strtoul_l F + __strtoull_l F + __strverscmp F + __strxfrm_l F + __sysconf F + __sysctl F + __toascii_l F + __tolower_l F + __toupper_l F + __towctrans F + __towctrans_l F + __towlower_l F + __towupper_l F + __vfork F + __wcscasecmp_l F + __wcscoll_l F + __wcsncasecmp_l F + __wcstod_l F + __wcstof_l F + __wcstol_l F + __wcstold_l F + __wcstoll_l F + __wcstoul_l F + __wcstoull_l F + __wcsxfrm_l F + __wctrans_l F + __wctype_l F + __woverflow F + __wuflow F + __wunderflow F + __xpg_sigpause F + __xstat64 F + _authenticate F + _dl_mcount_wrapper F + _dl_mcount_wrapper_check F + _flushlbf F + _res_hconf D 0x30 + _sys_errlist D 0x11b8 + _sys_nerr D 0x4 + _sys_siglist D 0x100 + _test_and_set F + addseverity F + alphasort64 F + argp_err_exit_status D 0x4 + argp_error F + argp_failure F + argp_help F + argp_parse F + argp_program_bug_address D 0x4 + argp_program_version D 0x4 + argp_program_version_hook D 0x4 + argp_state_help F + argp_usage F + authdes_create F + authdes_getucred F + authdes_pk_create F + backtrace F + backtrace_symbols F + backtrace_symbols_fd F + bind_textdomain_codeset F + capget F + capset F + cbc_crypt F + clntunix_create F + creat64 F + dcngettext F + des_setparity F + dngettext F + ecb_crypt F + endutxent F + fattach F + fclose F + fdetach F + fdopen F + ffsl F + ffsll F + fgetc_unlocked F + fgetpos F + fgetpos64 F + fgets_unlocked F + fgetwc F + fgetwc_unlocked F + fgetws F + fgetws_unlocked F + fmemopen F + fmtmsg F + fopen F + fopen64 F + fopencookie F + fputs_unlocked F + fputwc F + fputwc_unlocked F + fputws F + fputws_unlocked F + fread_unlocked F + freopen64 F + fseeko F + fseeko64 F + fsetpos F + fsetpos64 F + fstatfs64 F + fstatvfs F + fstatvfs64 F + ftello F + ftello64 F + ftruncate64 F + ftw64 F + fwide F + fwprintf F + fwrite_unlocked F + fwscanf F + gai_strerror F + getaliasbyname_r F + getaliasent_r F + getcontext F + getdate F + getdate_err D 0x4 + getdate_r F + getdirentries64 F + getgrent_r F + getgrgid_r F + getgrnam_r F + gethostbyaddr_r F + gethostbyname2_r F + gethostbyname_r F + gethostent_r F + getloadavg F + getmsg F + getnameinfo F + getnetbyaddr_r F + getnetbyname_r F + getnetent_r F + getnetname F + getpmsg F + getprotobyname_r F + getprotobynumber_r F + getprotoent_r F + getpt F + getpwent_r F + getpwnam_r F + getpwuid_r F + getrlimit64 F + getrpcbyname_r F + getrpcbynumber_r F + getrpcent_r F + getservbyname_r F + getservbyport_r F + getservent_r F + getspent_r F + getspnam_r F + getutmp F + getutmpx F + getutxent F + getutxid F + getutxline F + getwc F + getwc_unlocked F + getwchar F + getwchar_unlocked F + glob64 F + globfree64 F + gnu_get_libc_release F + gnu_get_libc_version F + grantpt F + host2netname F + iconv F + iconv_close F + iconv_open F + if_freenameindex F + if_indextoname F + if_nameindex F + if_nametoindex F + imaxabs F + imaxdiv F + in6addr_any D 0x10 + in6addr_loopback D 0x10 + iruserok_af F + isastream F + iswblank F + key_decryptsession F + key_decryptsession_pk F + key_encryptsession F + key_encryptsession_pk F + key_gendes F + key_get_conv F + key_secretkey_is_set F + key_setnet F + key_setsecret F + localeconv F + lockf64 F + lseek64 F + makecontext F + mcheck_check_all F + mcheck_pedantic F + mempcpy F + memrchr F + mincore F + mkdtemp F + mkstemp64 F + mmap64 F + moncontrol F + msgctl F + netname2host F + netname2user F + nftw F + nftw64 F + ngettext F + ntp_adjtime F + ntp_gettime F + open64 F + passwd2des F + pclose F + popen F + posix_fadvise F + posix_fadvise64 F + posix_fallocate F + posix_fallocate64 F + posix_madvise F + posix_memalign F + posix_spawn F + posix_spawn_file_actions_addclose F + posix_spawn_file_actions_adddup2 F + posix_spawn_file_actions_addopen F + posix_spawn_file_actions_destroy F + posix_spawn_file_actions_init F + posix_spawnattr_destroy F + posix_spawnattr_getflags F + posix_spawnattr_getpgroup F + posix_spawnattr_getschedparam F + posix_spawnattr_getschedpolicy F + posix_spawnattr_getsigdefault F + posix_spawnattr_getsigmask F + posix_spawnattr_init F + posix_spawnattr_setflags F + posix_spawnattr_setpgroup F + posix_spawnattr_setschedparam F + posix_spawnattr_setschedpolicy F + posix_spawnattr_setsigdefault F + posix_spawnattr_setsigmask F + posix_spawnp F + pread F + pread64 F + printf_size F + printf_size_info F + pthread_attr_init F + ptsname F + ptsname_r F + putgrent F + putmsg F + putpmsg F + pututxline F + putwc F + putwc_unlocked F + putwchar F + putwchar_unlocked F + pwrite F + pwrite64 F + rawmemchr F + rcmd_af F + readdir64 F + readdir64_r F + rexec_af F + rresvport_af F + rtime F + ruserok_af F + scandir64 F + semctl F + sendfile F + setrlimit64 F + setutxent F + shmctl F + sighold F + sigignore F + sigqueue F + sigrelse F + sigset F + sigtimedwait F + sigwaitinfo F + statfs64 F + statvfs F + statvfs64 F + strcasestr F + strchrnul F + strtoimax F + strtoumax F + strverscmp F + svc_getreq_common F + svc_getreq_poll F + svc_max_pollfd D 0x4 + svc_pollfd D 0x4 + svcunix_create F + svcunixfd_create F + swapcontext F + swprintf F + swscanf F + sys_errlist D 0x11b8 + sys_nerr D 0x4 + sys_sigabbrev D 0x100 + sys_siglist D 0x100 + sysv_signal F + tcgetsid F + tdestroy F + tmpfile F + tmpfile64 F + truncate64 F + umount2 F + ungetwc F + unlockpt F + updwtmpx F + user2netname F + utmpxname F + versionsort F + versionsort64 F + vfwprintf F + vfwscanf F + vswprintf F + vswscanf F + vwprintf F + vwscanf F + waitid F + wcscasecmp F + wcschrnul F + wcsftime F + wcsncasecmp F + wcsnlen F + wcstoimax F + wcstoll F + wcstoull F + wcstoumax F + wcswcs F + wmempcpy F + wordexp F + wordfree F + wprintf F + wscanf F + xdecrypt F + xdr_authdes_cred F + xdr_authdes_verf F + xdr_getcredres F + xdr_hyper F + xdr_int16_t F + xdr_int32_t F + xdr_int64_t F + xdr_int8_t F + xdr_longlong_t F + xdr_netnamestr F + xdr_sizeof F + xdr_u_hyper F + xdr_u_longlong_t F + xdr_uint16_t F + xdr_uint32_t F + xdr_uint64_t F + xdr_uint8_t F + xdr_unixcred F +GLIBC_2.2.1 + GLIBC_2.2.1 A + pivot_root F + posix_openpt F +GLIBC_2.2.2 + GLIBC_2.2.2 A + __nss_hostname_digits_dots F +GLIBC_2.2.3 + GLIBC_2.2.3 A + __rpc_thread_createerr F + __rpc_thread_svc_fdset F + __rpc_thread_svc_max_pollfd F + __rpc_thread_svc_pollfd F + fnmatch F + sprofil F +GLIBC_2.2.4 + GLIBC_2.2.4 A + dl_iterate_phdr F + getgrouplist F + sockatmark F +GLIBC_2.2.6 + GLIBC_2.2.6 A + __nanosleep F +GLIBC_2.3 + GLIBC_2.3 A + __ctype_b_loc F + __ctype_tolower_loc F + __ctype_toupper_loc F + __isctype F + __strftime_l F + __uselocale F + __wcsftime_l F + duplocale F + fgetxattr F + flistxattr F + freeifaddrs F + freelocale F + fremovexattr F + fsetxattr F + futimes F + getifaddrs F + getxattr F + isalnum_l F + isalpha_l F + isblank_l F + iscntrl_l F + isctype F + isdigit_l F + isgraph_l F + islower_l F + isprint_l F + ispunct_l F + isspace_l F + isupper_l F + iswalnum_l F + iswalpha_l F + iswblank_l F + iswcntrl_l F + iswctype_l F + iswdigit_l F + iswgraph_l F + iswlower_l F + iswprint_l F + iswpunct_l F + iswspace_l F + iswupper_l F + iswxdigit_l F + isxdigit_l F + lgetxattr F + listxattr F + llistxattr F + lremovexattr F + lsetxattr F + lutimes F + newlocale F + nl_langinfo_l F + readahead F + realpath F + removexattr F + sendfile64 F + setxattr F + strcasecmp_l F + strcoll_l F + strfmon_l F + strftime_l F + strncasecmp_l F + strtod_l F + strtof_l F + strtol_l F + strtold_l F + strtoll_l F + strtoul_l F + strtoull_l F + strxfrm_l F + tolower_l F + toupper_l F + towctrans_l F + towlower_l F + towupper_l F + uselocale F + wcscasecmp_l F + wcscoll_l F + wcsftime_l F + wcsncasecmp_l F + wcstod_l F + wcstof_l F + wcstol_l F + wcstold_l F + wcstoll_l F + wcstoul_l F + wcstoull_l F + wcsxfrm_l F + wctrans_l F + wctype_l F +GLIBC_2.3.2 + GLIBC_2.3.2 A + __register_atfork F + epoll_create F + epoll_ctl F + epoll_wait F + lchmod F + pthread_cond_broadcast F + pthread_cond_destroy F + pthread_cond_init F + pthread_cond_signal F + pthread_cond_timedwait F + pthread_cond_wait F + strptime_l F +GLIBC_2.3.3 + GLIBC_2.3.3 A + _sys_siglist D 0x200 + gnu_dev_major F + gnu_dev_makedev F + gnu_dev_minor F + inet6_option_alloc F + inet6_option_append F + inet6_option_find F + inet6_option_init F + inet6_option_next F + inet6_option_space F + nftw F + nftw64 F + posix_fadvise64 F + posix_fallocate64 F + remap_file_pages F + sched_getaffinity F + sched_setaffinity F + semtimedop F + sys_sigabbrev D 0x200 + sys_siglist D 0x200 +GLIBC_2.3.4 + GLIBC_2.3.4 A + __chk_fail F + __fprintf_chk F + __gets_chk F + __memcpy_chk F + __memmove_chk F + __mempcpy_chk F + __memset_chk F + __printf_chk F + __snprintf_chk F + __sprintf_chk F + __stpcpy_chk F + __strcat_chk F + __strcpy_chk F + __strncat_chk F + __strncpy_chk F + __vfprintf_chk F + __vprintf_chk F + __vsnprintf_chk F + __vsprintf_chk F + __xpg_strerror_r F + getipv4sourcefilter F + getsourcefilter F + regexec F + sched_getaffinity F + sched_setaffinity F + setipv4sourcefilter F + setsourcefilter F + xdr_quad_t F + xdr_u_quad_t F +GLIBC_2.4 + GLIBC_2.4 A + __confstr_chk F + __fgets_chk F + __fgets_unlocked_chk F + __fgetws_chk F + __fgetws_unlocked_chk F + __fwprintf_chk F + __fxstatat F + __fxstatat64 F + __getcwd_chk F + __getdomainname_chk F + __getgroups_chk F + __gethostname_chk F + __getlogin_r_chk F + __getwd_chk F + __mbsnrtowcs_chk F + __mbsrtowcs_chk F + __mbstowcs_chk F + __pread64_chk F + __pread_chk F + __ptsname_r_chk F + __read_chk F + __readlink_chk F + __realpath_chk F + __recv_chk F + __recvfrom_chk F + __stack_chk_fail F + __stpncpy_chk F + __swprintf_chk F + __syslog_chk F + __ttyname_r_chk F + __vfwprintf_chk F + __vswprintf_chk F + __vsyslog_chk F + __vwprintf_chk F + __wcpcpy_chk F + __wcpncpy_chk F + __wcrtomb_chk F + __wcscat_chk F + __wcscpy_chk F + __wcsncat_chk F + __wcsncpy_chk F + __wcsnrtombs_chk F + __wcsrtombs_chk F + __wcstombs_chk F + __wctomb_chk F + __wmemcpy_chk F + __wmemmove_chk F + __wmempcpy_chk F + __wmemset_chk F + __wprintf_chk F + __xmknodat F + eaccess F + faccessat F + fchmodat F + fchownat F + fdopendir F + futimesat F + inotify_add_watch F + inotify_init F + inotify_rm_watch F + linkat F + mkdirat F + mkfifoat F + open_wmemstream F + openat F + openat64 F + ppoll F + readlinkat F + renameat F + symlinkat F + unlinkat F + unshare F +GLIBC_2.5 + GLIBC_2.5 A + __readlinkat_chk F + inet6_opt_append F + inet6_opt_find F + inet6_opt_finish F + inet6_opt_get_val F + inet6_opt_init F + inet6_opt_next F + inet6_opt_set_val F + inet6_rth_add F + inet6_rth_getaddr F + inet6_rth_init F + inet6_rth_reverse F + inet6_rth_segments F + inet6_rth_space F + splice F + tee F + vmsplice F +GLIBC_2.6 + GLIBC_2.6 A + __sched_cpucount F + epoll_pwait F + futimens F + sched_getcpu F + strerror_l F + sync_file_range F + utimensat F +GLIBC_2.7 + GLIBC_2.7 A + __fread_chk F + __fread_unlocked_chk F + __isoc99_fscanf F + __isoc99_fwscanf F + __isoc99_scanf F + __isoc99_sscanf F + __isoc99_swscanf F + __isoc99_vfscanf F + __isoc99_vfwscanf F + __isoc99_vscanf F + __isoc99_vsscanf F + __isoc99_vswscanf F + __isoc99_vwscanf F + __isoc99_wscanf F + __open64_2 F + __open_2 F + __openat64_2 F + __openat_2 F + __sched_cpualloc F + __sched_cpufree F + eventfd F + eventfd_read F + eventfd_write F + mkostemp F + mkostemp64 F + signalfd F +GLIBC_2.8 + GLIBC_2.8 A + __asprintf_chk F + __dprintf_chk F + __obstack_printf_chk F + __obstack_vprintf_chk F + __vasprintf_chk F + __vdprintf_chk F + qsort_r F + timerfd_create F + timerfd_gettime F + timerfd_settime F +GLIBC_2.9 + GLIBC_2.9 A + dup3 F + epoll_create1 F + inotify_init1 F + pipe2 F +_gp_disp + A diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libcrypt.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libcrypt.abilist new file mode 100644 index 0000000000..26399f96cc --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libcrypt.abilist @@ -0,0 +1,11 @@ +GLIBC_2.0 + GLIBC_2.0 A + crypt F + crypt_r F + encrypt F + encrypt_r F + fcrypt F + setkey F + setkey_r F +_gp_disp + A diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libdl.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libdl.abilist new file mode 100644 index 0000000000..d7e86d0447 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libdl.abilist @@ -0,0 +1,20 @@ +GLIBC_2.0 + GLIBC_2.0 A + dladdr F + dlclose F + dlerror F + dlopen F + dlsym F +GLIBC_2.2 + GLIBC_2.2 A + dlopen F + dlvsym F +GLIBC_2.3.3 + GLIBC_2.3.3 A + dladdr1 F + dlinfo F +GLIBC_2.3.4 + GLIBC_2.3.4 A + dlmopen F +_gp_disp + A diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libm.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libm.abilist new file mode 100644 index 0000000000..6361c9d59a --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libm.abilist @@ -0,0 +1,376 @@ +GLIBC_2.0 + GLIBC_2.0 A + _LIB_VERSION D 0x4 + acos F + acosf F + acosh F + acoshf F + acoshl F + acosl F + asin F + asinf F + asinh F + asinhf F + asinhl F + asinl F + atan F + atan2 F + atan2f F + atan2l F + atanf F + atanh F + atanhf F + atanhl F + atanl F + cbrt F + cbrtf F + cbrtl F + ceil F + ceilf F + ceill F + copysign F + copysignf F + copysignl F + cos F + cosf F + cosh F + coshf F + coshl F + cosl F + drem F + dremf F + dreml F + erf F + erfc F + erfcf F + erfcl F + erff F + erfl F + exp F + expf F + expl F + expm1 F + expm1f F + expm1l F + fabs F + fabsf F + fabsl F + finite F + finitef F + finitel F + floor F + floorf F + floorl F + fmod F + fmodf F + fmodl F + frexp F + frexpf F + frexpl F + gamma F + gammaf F + gammal F + hypot F + hypotf F + hypotl F + ilogb F + ilogbf F + ilogbl F + j0 F + j0f F + j0l F + j1 F + j1f F + j1l F + jn F + jnf F + jnl F + ldexp F + ldexpf F + ldexpl F + lgamma F + lgamma_r F + lgammaf F + lgammaf_r F + lgammal F + lgammal_r F + log F + log10 F + log10f F + log10l F + log1p F + log1pf F + log1pl F + logb F + logbf F + logbl F + logf F + logl F + matherr F + modf F + modff F + modfl F + nextafter F + nextafterf F + nextafterl F + pow F + powf F + powl F + remainder F + remainderf F + remainderl F + rint F + rintf F + rintl F + scalb F + scalbf F + scalbl F + scalbn F + scalbnf F + scalbnl F + signgam D 0x4 + significand F + significandf F + significandl F + sin F + sinf F + sinh F + sinhf F + sinhl F + sinl F + sqrt F + sqrtf F + sqrtl F + tan F + tanf F + tanh F + tanhf F + tanhl F + tanl F + y0 F + y0f F + y0l F + y1 F + y1f F + y1l F + yn F + ynf F + ynl F +GLIBC_2.15 + GLIBC_2.15 A + __acos_finite F + __acosf_finite F + __acosh_finite F + __acoshf_finite F + __asin_finite F + __asinf_finite F + __atan2_finite F + __atan2f_finite F + __atanh_finite F + __atanhf_finite F + __cosh_finite F + __coshf_finite F + __exp10_finite F + __exp10f_finite F + __exp2_finite F + __exp2f_finite F + __exp_finite F + __expf_finite F + __fmod_finite F + __fmodf_finite F + __gamma_r_finite F + __gammaf_r_finite F + __hypot_finite F + __hypotf_finite F + __j0_finite F + __j0f_finite F + __j1_finite F + __j1f_finite F + __jn_finite F + __jnf_finite F + __lgamma_r_finite F + __lgammaf_r_finite F + __log10_finite F + __log10f_finite F + __log2_finite F + __log2f_finite F + __log_finite F + __logf_finite F + __pow_finite F + __powf_finite F + __remainder_finite F + __remainderf_finite F + __scalb_finite F + __scalbf_finite F + __sinh_finite F + __sinhf_finite F + __sqrt_finite F + __sqrtf_finite F + __y0_finite F + __y0f_finite F + __y1_finite F + __y1f_finite F + __yn_finite F + __ynf_finite F +GLIBC_2.2 + GLIBC_2.2 A + __clog10 F + __clog10f F + __clog10l F + __finite F + __finitef F + __finitel F + __fpclassify F + __fpclassifyf F + __signbit F + __signbitf F + cabs F + cabsf F + cabsl F + cacos F + cacosf F + cacosh F + cacoshf F + cacoshl F + cacosl F + carg F + cargf F + cargl F + casin F + casinf F + casinh F + casinhf F + casinhl F + casinl F + catan F + catanf F + catanh F + catanhf F + catanhl F + catanl F + ccos F + ccosf F + ccosh F + ccoshf F + ccoshl F + ccosl F + cexp F + cexpf F + cexpl F + cimag F + cimagf F + cimagl F + clog F + clog10 F + clog10f F + clog10l F + clogf F + clogl F + conj F + conjf F + conjl F + cpow F + cpowf F + cpowl F + cproj F + cprojf F + cprojl F + creal F + crealf F + creall F + csin F + csinf F + csinh F + csinhf F + csinhl F + csinl F + csqrt F + csqrtf F + csqrtl F + ctan F + ctanf F + ctanh F + ctanhf F + ctanhl F + ctanl F + exp10 F + exp10f F + exp10l F + exp2 F + exp2f F + fdim F + fdimf F + fdiml F + feclearexcept F + fedisableexcept F + feenableexcept F + fegetenv F + fegetexcept F + fegetexceptflag F + fegetround F + feholdexcept F + feraiseexcept F + fesetenv F + fesetexceptflag F + fesetround F + fetestexcept F + feupdateenv F + fma F + fmaf F + fmal F + fmax F + fmaxf F + fmaxl F + fmin F + fminf F + fminl F + llrint F + llrintf F + llrintl F + llround F + llroundf F + llroundl F + log2 F + log2f F + log2l F + lrint F + lrintf F + lrintl F + lround F + lroundf F + lroundl F + nan F + nanf F + nanl F + nearbyint F + nearbyintf F + nearbyintl F + nexttoward F + nexttowardf F + nexttowardl F + pow10 F + pow10f F + pow10l F + remquo F + remquof F + remquol F + round F + roundf F + roundl F + scalbln F + scalblnf F + scalblnl F + sincos F + sincosf F + sincosl F + tgamma F + tgammaf F + tgammal F + trunc F + truncf F + truncl F +GLIBC_2.4 + GLIBC_2.4 A + exp2l F +_gp_disp + A diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnsl.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnsl.abilist new file mode 100644 index 0000000000..d230db86ca --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnsl.abilist @@ -0,0 +1,127 @@ +GLIBC_2.0 + GLIBC_2.0 A + __yp_check F + xdr_domainname F + xdr_keydat F + xdr_mapname F + xdr_peername F + xdr_valdat F + xdr_yp_buf F + xdr_ypbind_binding F + xdr_ypbind_resp F + xdr_ypbind_resptype F + xdr_ypbind_setdom F + xdr_ypdelete_args F + xdr_ypmap_parms F + xdr_ypmaplist F + xdr_yppush_status F + xdr_yppushresp_xfr F + xdr_ypreq_key F + xdr_ypreq_nokey F + xdr_ypreq_xfr F + xdr_ypresp_all F + xdr_ypresp_key_val F + xdr_ypresp_maplist F + xdr_ypresp_master F + xdr_ypresp_order F + xdr_ypresp_val F + xdr_ypresp_xfr F + xdr_ypstat F + xdr_ypupdate_args F + xdr_ypxfrstat F + yp_all F + yp_bind F + yp_first F + yp_get_default_domain F + yp_maplist F + yp_master F + yp_match F + yp_next F + yp_order F + yp_unbind F + yp_update F + ypbinderr_string F + yperr_string F + ypprot_err F +GLIBC_2.2 + GLIBC_2.2 A + __free_fdresult F + __nis_default_access F + __nis_default_group F + __nis_default_owner F + __nis_default_ttl F + __nis_finddirectory F + __nis_hash F + __nisbind_connect F + __nisbind_create F + __nisbind_destroy F + __nisbind_next F + nis_add F + nis_add_entry F + nis_addmember F + nis_checkpoint F + nis_clone_directory F + nis_clone_object F + nis_clone_result F + nis_creategroup F + nis_destroy_object F + nis_destroygroup F + nis_dir_cmp F + nis_domain_of F + nis_domain_of_r F + nis_first_entry F + nis_free_directory F + nis_free_object F + nis_free_request F + nis_freenames F + nis_freeresult F + nis_freeservlist F + nis_freetags F + nis_getnames F + nis_getservlist F + nis_ismember F + nis_leaf_of F + nis_leaf_of_r F + nis_lerror F + nis_list F + nis_local_directory F + nis_local_group F + nis_local_host F + nis_local_principal F + nis_lookup F + nis_mkdir F + nis_modify F + nis_modify_entry F + nis_name_of F + nis_name_of_r F + nis_next_entry F + nis_perror F + nis_ping F + nis_print_directory F + nis_print_entry F + nis_print_group F + nis_print_group_entry F + nis_print_link F + nis_print_object F + nis_print_result F + nis_print_rights F + nis_print_table F + nis_read_obj F + nis_remove F + nis_remove_entry F + nis_removemember F + nis_rmdir F + nis_servstate F + nis_sperrno F + nis_sperror F + nis_sperror_r F + nis_stats F + nis_verifygroup F + nis_write_obj F + readColdStartFile F + writeColdStartFile F + xdr_cback_data F + xdr_obj_p F + xdr_ypall F +_gp_disp + A diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libpthread.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libpthread.abilist new file mode 100644 index 0000000000..2280889f7f --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libpthread.abilist @@ -0,0 +1,265 @@ +GLIBC_2.0 + GLIBC_2.0 A + _IO_flockfile F + _IO_ftrylockfile F + _IO_funlockfile F + __close F + __connect F + __errno_location F + __fcntl F + __fork F + __h_errno_location F + __lseek F + __open F + __pthread_getspecific F + __pthread_key_create F + __pthread_mutex_destroy F + __pthread_mutex_init F + __pthread_mutex_lock F + __pthread_mutex_trylock F + __pthread_mutex_unlock F + __pthread_mutexattr_destroy F + __pthread_mutexattr_init F + __pthread_mutexattr_settype F + __pthread_once F + __pthread_setspecific F + __read F + __send F + __sigaction F + __wait F + __write F + _pthread_cleanup_pop F + _pthread_cleanup_pop_restore F + _pthread_cleanup_push F + _pthread_cleanup_push_defer F + accept F + close F + connect F + fcntl F + flockfile F + fork F + fsync F + ftrylockfile F + funlockfile F + longjmp F + lseek F + msync F + nanosleep F + open F + pause F + pthread_atfork F + pthread_attr_destroy F + pthread_attr_getdetachstate F + pthread_attr_getinheritsched F + pthread_attr_getschedparam F + pthread_attr_getschedpolicy F + pthread_attr_getscope F + pthread_attr_init F + pthread_attr_setdetachstate F + pthread_attr_setinheritsched F + pthread_attr_setschedparam F + pthread_attr_setschedpolicy F + pthread_attr_setscope F + pthread_cancel F + pthread_cond_broadcast F + pthread_cond_destroy F + pthread_cond_init F + pthread_cond_signal F + pthread_cond_timedwait F + pthread_cond_wait F + pthread_condattr_destroy F + pthread_condattr_init F + pthread_create F + pthread_detach F + pthread_equal F + pthread_exit F + pthread_getschedparam F + pthread_getspecific F + pthread_join F + pthread_key_create F + pthread_key_delete F + pthread_kill F + pthread_kill_other_threads_np F + pthread_mutex_destroy F + pthread_mutex_init F + pthread_mutex_lock F + pthread_mutex_trylock F + pthread_mutex_unlock F + pthread_mutexattr_destroy F + pthread_mutexattr_getkind_np F + pthread_mutexattr_init F + pthread_mutexattr_setkind_np F + pthread_once F + pthread_self F + pthread_setcancelstate F + pthread_setcanceltype F + pthread_setschedparam F + pthread_setspecific F + pthread_sigmask F + pthread_testcancel F + raise F + read F + recv F + recvfrom F + recvmsg F + sem_destroy F + sem_getvalue F + sem_init F + sem_post F + sem_trywait F + sem_wait F + send F + sendmsg F + sendto F + sigaction F + siglongjmp F + sigwait F + system F + tcdrain F + vfork F + wait F + waitpid F + write F +GLIBC_2.11 + GLIBC_2.11 A + pthread_sigqueue F +GLIBC_2.12 + GLIBC_2.12 A + pthread_getname_np F + pthread_mutex_consistent F + pthread_mutexattr_getrobust F + pthread_mutexattr_setrobust F + pthread_setname_np F +GLIBC_2.2 + GLIBC_2.2 A + __libc_allocate_rtsig F + __libc_current_sigrtmax F + __libc_current_sigrtmin F + __open64 F + __pread64 F + __pthread_rwlock_destroy F + __pthread_rwlock_init F + __pthread_rwlock_rdlock F + __pthread_rwlock_tryrdlock F + __pthread_rwlock_trywrlock F + __pthread_rwlock_unlock F + __pthread_rwlock_wrlock F + __pwrite64 F + __res_state F + __vfork F + lseek64 F + open64 F + pread F + pread64 F + pthread_attr_getguardsize F + pthread_attr_getstack F + pthread_attr_getstackaddr F + pthread_attr_getstacksize F + pthread_attr_init F + pthread_attr_setguardsize F + pthread_attr_setstack F + pthread_attr_setstackaddr F + pthread_attr_setstacksize F + pthread_barrier_destroy F + pthread_barrier_init F + pthread_barrier_wait F + pthread_barrierattr_destroy F + pthread_barrierattr_init F + pthread_barrierattr_setpshared F + pthread_condattr_getpshared F + pthread_condattr_setpshared F + pthread_create F + pthread_getconcurrency F + pthread_getcpuclockid F + pthread_mutex_timedlock F + pthread_mutexattr_getpshared F + pthread_mutexattr_gettype F + pthread_mutexattr_setpshared F + pthread_mutexattr_settype F + pthread_rwlock_destroy F + pthread_rwlock_init F + pthread_rwlock_rdlock F + pthread_rwlock_timedrdlock F + pthread_rwlock_timedwrlock F + pthread_rwlock_tryrdlock F + pthread_rwlock_trywrlock F + pthread_rwlock_unlock F + pthread_rwlock_wrlock F + pthread_rwlockattr_destroy F + pthread_rwlockattr_getkind_np F + pthread_rwlockattr_getpshared F + pthread_rwlockattr_init F + pthread_rwlockattr_setkind_np F + pthread_rwlockattr_setpshared F + pthread_setconcurrency F + pthread_spin_destroy F + pthread_spin_init F + pthread_spin_lock F + pthread_spin_trylock F + pthread_spin_unlock F + pthread_yield F + pwrite F + pwrite64 F + sem_close F + sem_destroy F + sem_getvalue F + sem_init F + sem_open F + sem_post F + sem_timedwait F + sem_trywait F + sem_unlink F + sem_wait F +GLIBC_2.2.3 + GLIBC_2.2.3 A + pthread_getattr_np F +GLIBC_2.2.6 + GLIBC_2.2.6 A + __nanosleep F +GLIBC_2.3.2 + GLIBC_2.3.2 A + pthread_cond_broadcast F + pthread_cond_destroy F + pthread_cond_init F + pthread_cond_signal F + pthread_cond_timedwait F + pthread_cond_wait F +GLIBC_2.3.3 + GLIBC_2.3.3 A + __pthread_cleanup_routine F + __pthread_register_cancel F + __pthread_register_cancel_defer F + __pthread_unregister_cancel F + __pthread_unregister_cancel_restore F + __pthread_unwind_next F + pthread_attr_getaffinity_np F + pthread_attr_setaffinity_np F + pthread_attr_setstack F + pthread_attr_setstacksize F + pthread_barrierattr_getpshared F + pthread_condattr_getclock F + pthread_condattr_setclock F + pthread_getaffinity_np F + pthread_setaffinity_np F + pthread_timedjoin_np F + pthread_tryjoin_np F +GLIBC_2.3.4 + GLIBC_2.3.4 A + pthread_attr_getaffinity_np F + pthread_attr_setaffinity_np F + pthread_getaffinity_np F + pthread_setaffinity_np F + pthread_setschedprio F +GLIBC_2.4 + GLIBC_2.4 A + pthread_mutex_consistent_np F + pthread_mutex_getprioceiling F + pthread_mutex_setprioceiling F + pthread_mutexattr_getprioceiling F + pthread_mutexattr_getprotocol F + pthread_mutexattr_getrobust_np F + pthread_mutexattr_setprioceiling F + pthread_mutexattr_setprotocol F + pthread_mutexattr_setrobust_np F +_gp_disp + A diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libresolv.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libresolv.abilist new file mode 100644 index 0000000000..2cd54d8d2f --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libresolv.abilist @@ -0,0 +1,106 @@ +GLIBC_2.0 + GLIBC_2.0 A + __b64_ntop F + __b64_pton F + __dn_comp F + __dn_count_labels F + __dn_skipname F + __fp_nquery F + __fp_query F + __fp_resstat F + __hostalias F + __loc_aton F + __loc_ntoa F + __p_cdname F + __p_cdnname F + __p_class F + __p_class_syms D 0x54 + __p_fqname F + __p_fqnname F + __p_option F + __p_query F + __p_secstodate F + __p_time F + __p_type F + __p_type_syms D 0x228 + __putlong F + __putshort F + __res_close F + __res_dnok F + __res_hnok F + __res_isourserver F + __res_mailok F + __res_nameinquery F + __res_ownok F + __res_queriesmatch F + __res_send F + __sym_ntop F + __sym_ntos F + __sym_ston F + _gethtbyaddr F + _gethtbyname F + _gethtbyname2 F + _gethtent F + _getlong F + _getshort F + _res_opcodes D 0x40 + _sethtent F + dn_expand F + inet_net_ntop F + inet_net_pton F + inet_neta F + res_gethostbyaddr F + res_gethostbyname F + res_gethostbyname2 F + res_mkquery F + res_query F + res_querydomain F + res_search F + res_send_setqhook F + res_send_setrhook F +GLIBC_2.2 + GLIBC_2.2 A + __dn_expand F + __res_hostalias F + __res_mkquery F + __res_nmkquery F + __res_nquery F + __res_nquerydomain F + __res_nsearch F + __res_nsend F + __res_query F + __res_querydomain F + __res_search F +GLIBC_2.3.2 + GLIBC_2.3.2 A + __p_rcode F +GLIBC_2.9 + GLIBC_2.9 A + ns_datetosecs F + ns_format_ttl F + ns_get16 F + ns_get32 F + ns_initparse F + ns_makecanon F + ns_msg_getflag F + ns_name_compress F + ns_name_ntol F + ns_name_ntop F + ns_name_pack F + ns_name_pton F + ns_name_rollback F + ns_name_skip F + ns_name_uncompress F + ns_name_unpack F + ns_parse_ttl F + ns_parserr F + ns_put16 F + ns_put32 F + ns_samedomain F + ns_samename F + ns_skiprr F + ns_sprintrr F + ns_sprintrrf F + ns_subdomain F +_gp_disp + A diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/librt.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nptl/librt.abilist new file mode 100644 index 0000000000..63fdc10e6f --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips32/nptl/librt.abilist @@ -0,0 +1,52 @@ +GLIBC_2.2 + GLIBC_2.2 A + aio_cancel F + aio_cancel64 F + aio_error F + aio_error64 F + aio_fsync F + aio_fsync64 F + aio_init F + aio_read F + aio_read64 F + aio_return F + aio_return64 F + aio_suspend F + aio_suspend64 F + aio_write F + aio_write64 F + clock_getcpuclockid F + clock_getres F + clock_gettime F + clock_nanosleep F + clock_settime F + lio_listio F + lio_listio64 F + shm_open F + shm_unlink F + timer_create F + timer_delete F + timer_getoverrun F + timer_gettime F + timer_settime F +GLIBC_2.3.4 + GLIBC_2.3.4 A + mq_close F + mq_getattr F + mq_notify F + mq_open F + mq_receive F + mq_send F + mq_setattr F + mq_timedreceive F + mq_timedsend F + mq_unlink F +GLIBC_2.4 + GLIBC_2.4 A + lio_listio F + lio_listio64 F +GLIBC_2.7 + GLIBC_2.7 A + __mq_open_2 F +_gp_disp + A diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libthread_db.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libthread_db.abilist new file mode 100644 index 0000000000..9f4cadb78a --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libthread_db.abilist @@ -0,0 +1,50 @@ +GLIBC_2.1.3 + GLIBC_2.1.3 A + td_init F + td_log F + td_ta_clear_event F + td_ta_delete F + td_ta_enable_stats F + td_ta_event_addr F + td_ta_event_getmsg F + td_ta_get_nthreads F + td_ta_get_ph F + td_ta_get_stats F + td_ta_map_id2thr F + td_ta_map_lwp2thr F + td_ta_new F + td_ta_reset_stats F + td_ta_set_event F + td_ta_setconcurrency F + td_ta_thr_iter F + td_ta_tsd_iter F + td_thr_clear_event F + td_thr_dbresume F + td_thr_dbsuspend F + td_thr_event_enable F + td_thr_event_getmsg F + td_thr_get_info F + td_thr_getfpregs F + td_thr_getgregs F + td_thr_getxregs F + td_thr_getxregsize F + td_thr_set_event F + td_thr_setfpregs F + td_thr_setgregs F + td_thr_setprio F + td_thr_setsigpending F + td_thr_setxregs F + td_thr_sigsetmask F + td_thr_tsd F + td_thr_validate F +GLIBC_2.2.3 + GLIBC_2.2.3 A + td_symbol_list F +GLIBC_2.3 + GLIBC_2.3 A + td_thr_tls_get_addr F +GLIBC_2.3.3 + GLIBC_2.3.3 A + td_thr_tlsbase F +_gp_disp + A diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libutil.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libutil.abilist new file mode 100644 index 0000000000..8f3d9336eb --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libutil.abilist @@ -0,0 +1,10 @@ +GLIBC_2.0 + GLIBC_2.0 A + forkpty F + login F + login_tty F + logout F + logwtmp F + openpty F +_gp_disp + A diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/ld.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/ld.abilist new file mode 100644 index 0000000000..72180cced8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/ld.abilist @@ -0,0 +1,18 @@ +GLIBC_2.0 + GLIBC_2.0 A + __libc_memalign F + _r_debug D 0x14 + calloc F + free F + malloc F + realloc F +GLIBC_2.2 + GLIBC_2.2 A + __libc_stack_end D 0x4 + _dl_mcount F +GLIBC_2.3 + GLIBC_2.3 A + __tls_get_addr F +GLIBC_2.4 + GLIBC_2.4 A + __stack_chk_guard D 0x4 diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libBrokenLocale.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libBrokenLocale.abilist new file mode 100644 index 0000000000..f4ca37f44b --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libBrokenLocale.abilist @@ -0,0 +1,3 @@ +GLIBC_2.0 + GLIBC_2.0 A + __ctype_get_mb_cur_max F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libanl.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libanl.abilist new file mode 100644 index 0000000000..c9755d8a33 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libanl.abilist @@ -0,0 +1,6 @@ +GLIBC_2.2.3 + GLIBC_2.2.3 A + gai_cancel F + gai_error F + gai_suspend F + getaddrinfo_a F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libc.abilist new file mode 100644 index 0000000000..293fb96347 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libc.abilist @@ -0,0 +1,2238 @@ +GCC_3.0 + GCC_3.0 A + _Unwind_Find_FDE F + __deregister_frame_info_bases F + __register_frame_info_bases F + __register_frame_info_table_bases F +GLIBC_2.0 + GLIBC_2.0 A + _IO_adjust_column F + _IO_default_doallocate F + _IO_default_finish F + _IO_default_pbackfail F + _IO_default_uflow F + _IO_default_xsgetn F + _IO_default_xsputn F + _IO_do_write F + _IO_doallocbuf F + _IO_fclose F + _IO_fdopen F + _IO_feof F + _IO_ferror F + _IO_fflush F + _IO_fgetpos F + _IO_fgets F + _IO_file_attach F + _IO_file_close F + _IO_file_close_it F + _IO_file_doallocate F + _IO_file_fopen F + _IO_file_init F + _IO_file_jumps D 0x54 + _IO_file_open F + _IO_file_overflow F + _IO_file_read F + _IO_file_seek F + _IO_file_seekoff F + _IO_file_setbuf F + _IO_file_stat F + _IO_file_sync F + _IO_file_underflow F + _IO_file_write F + _IO_file_xsputn F + _IO_flockfile F + _IO_flush_all F + _IO_flush_all_linebuffered F + _IO_fopen F + _IO_fprintf F + _IO_fputs F + _IO_fread F + _IO_free_backup_area F + _IO_fsetpos F + _IO_ftell F + _IO_ftrylockfile F + _IO_funlockfile F + _IO_fwrite F + _IO_getc F + _IO_getline F + _IO_gets F + _IO_init F + _IO_init_marker F + _IO_link_in F + _IO_list_all D 0x4 + _IO_marker_delta F + _IO_marker_difference F + _IO_padn F + _IO_peekc_locked F + _IO_popen F + _IO_printf F + _IO_proc_close F + _IO_proc_open F + _IO_putc F + _IO_puts F + _IO_remove_marker F + _IO_seekmark F + _IO_seekoff F + _IO_seekpos F + _IO_setb F + _IO_setbuffer F + _IO_setvbuf F + _IO_sgetn F + _IO_sprintf F + _IO_sputbackc F + _IO_sscanf F + _IO_stderr_ D 0x50 + _IO_stdin_ D 0x50 + _IO_stdout_ D 0x50 + _IO_str_init_readonly F + _IO_str_init_static F + _IO_str_overflow F + _IO_str_pbackfail F + _IO_str_seekoff F + _IO_str_underflow F + _IO_sungetc F + _IO_switch_to_get_mode F + _IO_un_link F + _IO_ungetc F + _IO_unsave_markers F + _IO_vfprintf F + _IO_vfscanf F + _IO_vsprintf F + ___brk_addr D 0x4 + __adjtimex F + __after_morecore_hook D 0x4 + __argz_count F + __argz_next F + __argz_stringify F + __assert_fail F + __assert_perror_fail F + __bsd_getpgrp F + __bzero F + __check_rhosts_file D 0x4 + __clone F + __close F + __cmsg_nxthdr F + __connect F + __ctype32_b D 0x4 + __ctype_b D 0x4 + __ctype_get_mb_cur_max F + __ctype_tolower D 0x4 + __ctype_toupper D 0x4 + __curbrk D 0x4 + __daylight D 0x4 + __dcgettext F + __default_morecore F + __deregister_frame F + __deregister_frame_info F + __dgettext F + __dup2 F + __environ D 0x4 + __errno_location F + __fcntl F + __ffs F + __finite F + __finitef F + __finitel F + __fork F + __fpu_control D 0x4 + __frame_state_for F + __free_hook D 0x4 + __fxstat F + __getdelim F + __getpagesize F + __getpgid F + __getpid F + __gettimeofday F + __gmtime_r F + __h_errno_location F + __isinf F + __isinff F + __isinfl F + __isnan F + __isnanf F + __isnanl F + __iswctype F + __ivaliduser F + __libc_calloc F + __libc_free F + __libc_init_first F + __libc_mallinfo F + __libc_malloc F + __libc_mallopt F + __libc_memalign F + __libc_pvalloc F + __libc_realloc F + __libc_start_main F + __libc_valloc F + __lseek F + __lxstat F + __malloc_hook D 0x4 + __malloc_initialize_hook D 0x4 + __mbrlen F + __mbrtowc F + __memalign_hook D 0x4 + __mempcpy F + __monstartup F + __morecore D 0x4 + __nss_configure_lookup F + __nss_database_lookup F + __nss_group_lookup F + __nss_hosts_lookup F + __nss_next F + __nss_passwd_lookup F + __open F + __overflow F + __pipe F + __printf_fp F + __profile_frequency F + __progname D 0x4 + __progname_full D 0x4 + __rcmd_errstr D 0x4 + __read F + __realloc_hook D 0x4 + __register_frame F + __register_frame_info F + __register_frame_info_table F + __register_frame_table F + __res_randomid F + __sbrk F + __sched_get_priority_max F + __sched_get_priority_min F + __sched_getparam F + __sched_getscheduler F + __sched_setscheduler F + __sched_yield F + __secure_getenv F + __select F + __send F + __setpgid F + __sigaction F + __sigaddset F + __sigdelset F + __sigismember F + __sigpause F + __sigsetjmp F + __stpcpy F + __stpncpy F + __strcasecmp F + __strdup F + __strerror_r F + __strtod_internal F + __strtof_internal F + __strtok_r F + __strtol_internal F + __strtold_internal F + __strtoll_internal F + __strtoq_internal F + __strtoul_internal F + __strtoull_internal F + __strtouq_internal F + __sysv_signal F + __timezone D 0x4 + __tzname D 0x8 + __uflow F + __underflow F + __vfscanf F + __vsnprintf F + __vsscanf F + __wait F + __waitpid F + __wcstod_internal F + __wcstof_internal F + __wcstol_internal F + __wcstold_internal F + __wcstoll_internal F + __wcstoul_internal F + __wcstoull_internal F + __write F + __xmknod F + __xpg_basename F + __xstat F + _environ D 0x4 + _exit F + _flush_cache F + _libc_intl_domainname D 0x5 + _longjmp F + _mcleanup F + _mcount F + _nl_default_dirname D 0x12 + _nl_domain_bindings D 0x4 + _nl_msg_cat_cntr D 0x4 + _null_auth D 0xc + _obstack D 0x4 + _obstack_allocated_p F + _obstack_begin F + _obstack_begin_1 F + _obstack_free F + _obstack_memory_used F + _obstack_newchunk F + _res D 0x200 + _rpc_dtablesize F + _seterr_reply F + _setjmp F + _sys_errlist D 0x1ec + _sys_nerr D 0x4 + _sys_siglist D 0x80 + _tolower F + _toupper F + a64l F + abort F + abs F + accept F + access F + acct F + addmntent F + adjtime F + adjtimex F + advance F + alarm F + alphasort F + argz_add F + argz_add_sep F + argz_append F + argz_count F + argz_create F + argz_create_sep F + argz_delete F + argz_extract F + argz_insert F + argz_next F + argz_replace F + argz_stringify F + asctime F + asctime_r F + asprintf F + atexit F + atof F + atoi F + atol F + atoll F + authnone_create F + authunix_create F + authunix_create_default F + basename F + bcmp F + bcopy F + bdflush F + bind F + bindresvport F + bindtextdomain F + brk F + bsd_signal F + bsearch F + btowc F + bzero F + cachectl F + cacheflush F + calloc F + callrpc F + canonicalize_file_name F + catclose F + catgets F + catopen F + cfgetispeed F + cfgetospeed F + cfmakeraw F + cfree F + cfsetispeed F + cfsetospeed F + cfsetspeed F + chdir F + chflags F + chmod F + chown F + chroot F + clearenv F + clearerr F + clearerr_unlocked F + clnt_broadcast F + clnt_create F + clnt_pcreateerror F + clnt_perrno F + clnt_perror F + clnt_spcreateerror F + clnt_sperrno F + clnt_sperror F + clntraw_create F + clnttcp_create F + clntudp_bufcreate F + clntudp_create F + clock F + clone F + close F + closedir F + closelog F + confstr F + connect F + copysign F + copysignf F + copysignl F + creat F + create_module F + ctermid F + ctime F + ctime_r F + cuserid F + daemon F + daylight D 0x4 + dcgettext F + delete_module F + dgettext F + difftime F + dirfd F + dirname F + div F + dprintf F + drand48 F + drand48_r F + dup F + dup2 F + dysize F + ecvt F + ecvt_r F + endaliasent F + endfsent F + endgrent F + endhostent F + endmntent F + endnetent F + endnetgrent F + endprotoent F + endpwent F + endrpcent F + endservent F + endspent F + endttyent F + endusershell F + endutent F + environ D 0x4 + envz_add F + envz_entry F + envz_get F + envz_merge F + envz_remove F + envz_strip F + erand48 F + erand48_r F + err F + error F + error_at_line F + error_message_count D 0x4 + error_one_per_line D 0x4 + error_print_progname D 0x4 + errx F + ether_aton F + ether_aton_r F + ether_hostton F + ether_line F + ether_ntoa F + ether_ntoa_r F + ether_ntohost F + euidaccess F + execl F + execle F + execlp F + execv F + execve F + execvp F + exit F + fchdir F + fchflags F + fchmod F + fchown F + fclose F + fcloseall F + fcntl F + fcvt F + fcvt_r F + fdatasync F + fdopen F + feof F + feof_unlocked F + ferror F + ferror_unlocked F + fexecve F + fflush F + fflush_unlocked F + ffs F + fgetc F + fgetgrent F + fgetgrent_r F + fgetpos F + fgetpwent F + fgetpwent_r F + fgets F + fgetspent F + fgetspent_r F + fileno F + fileno_unlocked F + finite F + finitef F + finitel F + flock F + flockfile F + fnmatch F + fopen F + fopencookie F + fork F + fpathconf F + fprintf F + fputc F + fputc_unlocked F + fputs F + fread F + free F + freeaddrinfo F + freopen F + frexp F + frexpf F + frexpl F + fscanf F + fseek F + fsetpos F + fstatfs F + fsync F + ftell F + ftime F + ftok F + ftruncate F + ftrylockfile F + fts_children F + fts_close F + fts_open F + fts_read F + fts_set F + ftw F + funlockfile F + fwrite F + gcvt F + get_avphys_pages F + get_current_dir_name F + get_kernel_syms F + get_myaddress F + get_nprocs F + get_nprocs_conf F + get_phys_pages F + getaddrinfo F + getaliasbyname F + getaliasbyname_r F + getaliasent F + getaliasent_r F + getc F + getc_unlocked F + getchar F + getchar_unlocked F + getcwd F + getdelim F + getdirentries F + getdomainname F + getdtablesize F + getegid F + getenv F + geteuid F + getfsent F + getfsfile F + getfsspec F + getgid F + getgrent F + getgrent_r F + getgrgid F + getgrgid_r F + getgrnam F + getgrnam_r F + getgroups F + gethostbyaddr F + gethostbyaddr_r F + gethostbyname F + gethostbyname2 F + gethostbyname2_r F + gethostbyname_r F + gethostent F + gethostent_r F + gethostid F + gethostname F + getitimer F + getline F + getlogin F + getlogin_r F + getmntent F + getmntent_r F + getnetbyaddr F + getnetbyaddr_r F + getnetbyname F + getnetbyname_r F + getnetent F + getnetent_r F + getnetgrent F + getnetgrent_r F + getopt F + getopt_long F + getopt_long_only F + getpagesize F + getpass F + getpeername F + getpgid F + getpgrp F + getpid F + getppid F + getpriority F + getprotobyname F + getprotobyname_r F + getprotobynumber F + getprotobynumber_r F + getprotoent F + getprotoent_r F + getpublickey F + getpw F + getpwent F + getpwent_r F + getpwnam F + getpwnam_r F + getpwuid F + getpwuid_r F + getresgid F + getresuid F + getrlimit F + getrpcbyname F + getrpcbyname_r F + getrpcbynumber F + getrpcbynumber_r F + getrpcent F + getrpcent_r F + getrpcport F + getrusage F + gets F + getsecretkey F + getservbyname F + getservbyname_r F + getservbyport F + getservbyport_r F + getservent F + getservent_r F + getsid F + getsockname F + getsockopt F + getspent F + getspent_r F + getspnam F + getspnam_r F + getsubopt F + gettext F + gettimeofday F + getttyent F + getttynam F + getuid F + getusershell F + getutent F + getutent_r F + getutid F + getutid_r F + getutline F + getutline_r F + getw F + getwd F + glob F + glob_pattern_p F + globfree F + gmtime F + gmtime_r F + group_member F + gsignal F + gtty F + h_errlist D 0x14 + h_nerr D 0x4 + hasmntopt F + hcreate F + hcreate_r F + hdestroy F + hdestroy_r F + herror F + hsearch F + hsearch_r F + hstrerror F + htonl F + htons F + index F + inet_addr F + inet_aton F + inet_lnaof F + inet_makeaddr F + inet_netof F + inet_network F + inet_nsap_addr F + inet_nsap_ntoa F + inet_ntoa F + inet_ntop F + inet_pton F + init_module F + initgroups F + initstate F + initstate_r F + innetgr F + insque F + ioctl F + iruserok F + isalnum F + isalpha F + isascii F + isatty F + isblank F + iscntrl F + isdigit F + isfdtype F + isgraph F + isinf F + isinff F + isinfl F + islower F + isnan F + isnanf F + isnanl F + isprint F + ispunct F + isspace F + isupper F + iswalnum F + iswalpha F + iswcntrl F + iswctype F + iswdigit F + iswgraph F + iswlower F + iswprint F + iswpunct F + iswspace F + iswupper F + iswxdigit F + isxdigit F + jrand48 F + jrand48_r F + kill F + killpg F + klogctl F + l64a F + labs F + lchown F + lckpwdf F + lcong48 F + lcong48_r F + ldexp F + ldexpf F + ldexpl F + ldiv F + lfind F + link F + listen F + llabs F + lldiv F + llseek F + loc1 D 0x4 + loc2 D 0x4 + localeconv F + localtime F + localtime_r F + lockf F + locs D 0x4 + longjmp F + lrand48 F + lrand48_r F + lsearch F + lseek F + madvise F + mallinfo F + malloc F + malloc_get_state F + malloc_set_state F + malloc_stats F + malloc_trim F + malloc_usable_size F + mallopt F + mallwatch D 0x4 + mblen F + mbrlen F + mbrtowc F + mbsinit F + mbsnrtowcs F + mbsrtowcs F + mbstowcs F + mbtowc F + mcheck F + memalign F + memccpy F + memchr F + memcmp F + memcpy F + memfrob F + memmem F + memmove F + memset F + mkdir F + mkfifo F + mkstemp F + mktemp F + mktime F + mlock F + mlockall F + mmap F + modf F + modff F + modfl F + monstartup F + mount F + mprobe F + mprotect F + mrand48 F + mrand48_r F + mremap F + msgctl F + msgget F + msgrcv F + msgsnd F + msync F + mtrace F + munlock F + munlockall F + munmap F + muntrace F + nanosleep F + nfsservctl F + nice F + nl_langinfo F + nrand48 F + nrand48_r F + ntohl F + ntohs F + obstack_alloc_failed_handler D 0x4 + obstack_exit_failure D 0x4 + obstack_free F + obstack_printf F + obstack_vprintf F + on_exit F + open F + open_memstream F + opendir F + openlog F + optarg D 0x4 + opterr D 0x4 + optind D 0x4 + optopt D 0x4 + parse_printf_format F + pathconf F + pause F + pclose F + perror F + personality F + pipe F + pmap_getmaps F + pmap_getport F + pmap_rmtcall F + pmap_set F + pmap_unset F + poll F + popen F + prctl F + printf F + profil F + program_invocation_name D 0x4 + program_invocation_short_name D 0x4 + pselect F + psignal F + pthread_attr_destroy F + pthread_attr_getdetachstate F + pthread_attr_getinheritsched F + pthread_attr_getschedparam F + pthread_attr_getschedpolicy F + pthread_attr_getscope F + pthread_attr_init F + pthread_attr_setdetachstate F + pthread_attr_setinheritsched F + pthread_attr_setschedparam F + pthread_attr_setschedpolicy F + pthread_attr_setscope F + pthread_cond_broadcast F + pthread_cond_destroy F + pthread_cond_init F + pthread_cond_signal F + pthread_cond_timedwait F + pthread_cond_wait F + pthread_condattr_destroy F + pthread_condattr_init F + pthread_equal F + pthread_exit F + pthread_getschedparam F + pthread_mutex_destroy F + pthread_mutex_init F + pthread_mutex_lock F + pthread_mutex_unlock F + pthread_self F + pthread_setcancelstate F + pthread_setcanceltype F + pthread_setschedparam F + ptrace F + putc F + putc_unlocked F + putchar F + putchar_unlocked F + putenv F + putpwent F + puts F + putspent F + pututline F + putw F + pvalloc F + qecvt F + qecvt_r F + qfcvt F + qfcvt_r F + qgcvt F + qsort F + query_module F + quotactl F + raise F + rand F + rand_r F + random F + random_r F + rcmd F + re_comp F + re_compile_fastmap F + re_compile_pattern F + re_exec F + re_match F + re_match_2 F + re_max_failures D 0x4 + re_search F + re_search_2 F + re_set_registers F + re_set_syntax F + re_syntax_options D 0x4 + read F + readdir F + readdir_r F + readlink F + readv F + realloc F + realpath F + reboot F + recv F + recvfrom F + recvmsg F + regcomp F + regerror F + regexec F + regfree F + register_printf_function F + registerrpc F + remove F + remque F + rename F + res_init F + revoke F + rewind F + rewinddir F + rexec F + rexecoptions D 0x4 + rindex F + rmdir F + rpc_createerr D 0x10 + rpmatch F + rresvport F + ruserok F + ruserpass F + sbrk F + scalbn F + scalbnf F + scalbnl F + scandir F + scanf F + sched_get_priority_max F + sched_get_priority_min F + sched_getparam F + sched_getscheduler F + sched_rr_get_interval F + sched_setparam F + sched_setscheduler F + sched_yield F + seed48 F + seed48_r F + seekdir F + select F + semctl F + semget F + semop F + send F + sendmsg F + sendto F + setaliasent F + setbuf F + setbuffer F + setcontext F + setdomainname F + setegid F + setenv F + seteuid F + setfsent F + setfsgid F + setfsuid F + setgid F + setgrent F + setgroups F + sethostent F + sethostid F + sethostname F + setitimer F + setjmp F + setlinebuf F + setlocale F + setlogin F + setlogmask F + setmntent F + setnetent F + setnetgrent F + setpgid F + setpgrp F + setpriority F + setprotoent F + setpwent F + setregid F + setresgid F + setresuid F + setreuid F + setrlimit F + setrpcent F + setservent F + setsid F + setsockopt F + setspent F + setstate F + setstate_r F + settimeofday F + setttyent F + setuid F + setusershell F + setutent F + setvbuf F + sgetspent F + sgetspent_r F + shmat F + shmctl F + shmdt F + shmget F + shutdown F + sigaction F + sigaddset F + sigaltstack F + sigandset F + sigblock F + sigdelset F + sigemptyset F + sigfillset F + siggetmask F + siginterrupt F + sigisemptyset F + sigismember F + siglongjmp F + signal F + sigorset F + sigpause F + sigpending F + sigprocmask F + sigreturn F + sigsetmask F + sigstack F + sigsuspend F + sigvec F + sigwait F + sleep F + snprintf F + socket F + socketpair F + sprintf F + srand F + srand48 F + srand48_r F + srandom F + srandom_r F + sscanf F + ssignal F + sstk F + statfs F + stderr D 0x4 + stdin D 0x4 + stdout D 0x4 + step F + stime F + stpcpy F + stpncpy F + strcasecmp F + strcat F + strchr F + strcmp F + strcoll F + strcpy F + strcspn F + strdup F + strerror F + strerror_r F + strfmon F + strfry F + strftime F + strlen F + strncasecmp F + strncat F + strncmp F + strncpy F + strndup F + strnlen F + strpbrk F + strptime F + strrchr F + strsep F + strsignal F + strspn F + strstr F + strtod F + strtof F + strtok F + strtok_r F + strtol F + strtold F + strtoll F + strtoq F + strtoul F + strtoull F + strtouq F + strxfrm F + stty F + svc_exit F + svc_fdset D 0x80 + svc_getreq F + svc_getreqset F + svc_register F + svc_run F + svc_sendreply F + svc_unregister F + svcauthdes_stats D 0xc + svcerr_auth F + svcerr_decode F + svcerr_noproc F + svcerr_noprog F + svcerr_progvers F + svcerr_systemerr F + svcerr_weakauth F + svcfd_create F + svcraw_create F + svctcp_create F + svcudp_bufcreate F + svcudp_create F + svcudp_enablecache F + swab F + swapoff F + swapon F + symlink F + sync F + sys_errlist D 0x1ec + sys_nerr D 0x4 + sys_sigabbrev D 0x80 + sys_siglist D 0x80 + syscall F + sysconf F + sysctl F + sysinfo F + syslog F + sysmips F + system F + tcdrain F + tcflow F + tcflush F + tcgetattr F + tcgetpgrp F + tcsendbreak F + tcsetattr F + tcsetpgrp F + tdelete F + telldir F + tempnam F + textdomain F + tfind F + time F + timegm F + timelocal F + times F + timezone D 0x4 + tmpfile F + tmpnam F + tmpnam_r F + toascii F + tolower F + toupper F + towctrans F + towlower F + towupper F + tr_break F + truncate F + tsearch F + ttyname F + ttyname_r F + ttyslot F + twalk F + tzname D 0x8 + tzset F + ualarm F + ulckpwdf F + ulimit F + umask F + umount F + uname F + ungetc F + unlink F + unsetenv F + updwtmp F + uselib F + usleep F + ustat F + utime F + utimes F + utmpname F + valloc F + vasprintf F + vdprintf F + verr F + verrx F + vfork F + vfprintf F + vfscanf F + vhangup F + vlimit F + vprintf F + vscanf F + vsnprintf F + vsprintf F + vsscanf F + vsyslog F + vtimes F + vwarn F + vwarnx F + wait F + wait3 F + wait4 F + waitpid F + warn F + warnx F + wcpcpy F + wcpncpy F + wcrtomb F + wcscat F + wcschr F + wcscmp F + wcscoll F + wcscpy F + wcscspn F + wcsdup F + wcslen F + wcsncat F + wcsncmp F + wcsncpy F + wcsnrtombs F + wcspbrk F + wcsrchr F + wcsrtombs F + wcsspn F + wcsstr F + wcstod F + wcstof F + wcstok F + wcstol F + wcstold F + wcstombs F + wcstoq F + wcstoul F + wcstouq F + wcswidth F + wcsxfrm F + wctob F + wctomb F + wctrans F + wctype F + wcwidth F + wmemchr F + wmemcmp F + wmemcpy F + wmemmove F + wmemset F + write F + writev F + xdr_accepted_reply F + xdr_array F + xdr_authunix_parms F + xdr_bool F + xdr_bytes F + xdr_callhdr F + xdr_callmsg F + xdr_char F + xdr_cryptkeyarg F + xdr_cryptkeyarg2 F + xdr_cryptkeyres F + xdr_des_block F + xdr_double F + xdr_enum F + xdr_float F + xdr_free F + xdr_int F + xdr_key_netstarg F + xdr_key_netstres F + xdr_keybuf F + xdr_keystatus F + xdr_long F + xdr_netobj F + xdr_opaque F + xdr_opaque_auth F + xdr_pmap F + xdr_pmaplist F + xdr_pointer F + xdr_reference F + xdr_rejected_reply F + xdr_replymsg F + xdr_rmtcall_args F + xdr_rmtcallres F + xdr_short F + xdr_string F + xdr_u_char F + xdr_u_int F + xdr_u_long F + xdr_u_short F + xdr_union F + xdr_vector F + xdr_void F + xdr_wrapstring F + xdrmem_create F + xdrrec_create F + xdrrec_endofrecord F + xdrrec_eof F + xdrrec_skiprecord F + xdrstdio_create F + xencrypt F + xprt_register F + xprt_unregister F +GLIBC_2.10 + GLIBC_2.10 A + __cxa_at_quick_exit F + __posix_getopt F + accept4 F + endsgent F + fallocate F + fgetsgent F + fgetsgent_r F + getsgent F + getsgent_r F + getsgnam F + getsgnam_r F + malloc_info F + preadv F + preadv64 F + psiginfo F + putsgent F + pwritev F + pwritev64 F + quick_exit F + register_printf_modifier F + register_printf_specifier F + register_printf_type F + setsgent F + sgetsgent F + sgetsgent_r F +GLIBC_2.11 + GLIBC_2.11 A + __longjmp_chk F + execvpe F + fallocate64 F + mkostemps F + mkostemps64 F + mkstemps F + mkstemps64 F +GLIBC_2.12 + GLIBC_2.12 A + ntp_gettimex F + recvmmsg F +GLIBC_2.13 + GLIBC_2.13 A + fanotify_init F + fanotify_mark F + prlimit F + prlimit64 F +GLIBC_2.14 + GLIBC_2.14 A + clock_adjtime F + name_to_handle_at F + open_by_handle_at F + sendmmsg F + setns F + syncfs F +GLIBC_2.15 + GLIBC_2.15 A + __fdelt_chk F + __fdelt_warn F + posix_spawn F + posix_spawnp F + process_vm_readv F + process_vm_writev F + scandirat F + scandirat64 F +GLIBC_2.16 + GLIBC_2.16 A + __poll_chk F + __ppoll_chk F + aligned_alloc F + c16rtomb F + c32rtomb F + mbrtoc16 F + mbrtoc32 F + timespec_get F +GLIBC_2.2 + GLIBC_2.2 A + _Exit F + _IO_2_1_stderr_ D 0xa0 + _IO_2_1_stdin_ D 0xa0 + _IO_2_1_stdout_ D 0xa0 + _IO_adjust_wcolumn F + _IO_do_write F + _IO_fclose F + _IO_fdopen F + _IO_fgetpos F + _IO_fgetpos64 F + _IO_file_attach F + _IO_file_close_it F + _IO_file_finish F + _IO_file_fopen F + _IO_file_init F + _IO_file_overflow F + _IO_file_seekoff F + _IO_file_setbuf F + _IO_file_sync F + _IO_file_underflow F + _IO_file_write F + _IO_file_xsputn F + _IO_fopen F + _IO_free_wbackup_area F + _IO_fsetpos F + _IO_fsetpos64 F + _IO_getline_info F + _IO_init_wmarker F + _IO_iter_begin F + _IO_iter_end F + _IO_iter_file F + _IO_iter_next F + _IO_least_wmarker F + _IO_list_lock F + _IO_list_resetlock F + _IO_list_unlock F + _IO_popen F + _IO_proc_close F + _IO_proc_open F + _IO_seekwmark F + _IO_sputbackwc F + _IO_sungetwc F + _IO_switch_to_main_wget_area F + _IO_switch_to_wbackup_area F + _IO_switch_to_wget_mode F + _IO_unsave_wmarkers F + _IO_wdefault_doallocate F + _IO_wdefault_finish F + _IO_wdefault_pbackfail F + _IO_wdefault_uflow F + _IO_wdefault_xsgetn F + _IO_wdefault_xsputn F + _IO_wdo_write F + _IO_wdoallocbuf F + _IO_wfile_jumps D 0x54 + _IO_wfile_overflow F + _IO_wfile_seekoff F + _IO_wfile_sync F + _IO_wfile_underflow F + _IO_wfile_xsputn F + _IO_wmarker_delta F + _IO_wsetb F + __asprintf F + __assert F + __backtrace F + __backtrace_symbols F + __backtrace_symbols_fd F + __ctype32_tolower D 0x4 + __ctype32_toupper D 0x4 + __cxa_atexit F + __cxa_finalize F + __cyg_profile_func_enter F + __cyg_profile_func_exit F + __duplocale F + __endmntent F + __fbufsize F + __flbf F + __fpending F + __fpurge F + __freadable F + __freading F + __freelocale F + __fsetlocking F + __fwritable F + __fwriting F + __fxstat64 F + __getmntent_r F + __isalnum_l F + __isalpha_l F + __isascii_l F + __isblank_l F + __iscntrl_l F + __isdigit_l F + __isgraph_l F + __islower_l F + __isprint_l F + __ispunct_l F + __isspace_l F + __isupper_l F + __iswalnum_l F + __iswalpha_l F + __iswblank_l F + __iswcntrl_l F + __iswctype_l F + __iswdigit_l F + __iswgraph_l F + __iswlower_l F + __iswprint_l F + __iswpunct_l F + __iswspace_l F + __iswupper_l F + __iswxdigit_l F + __isxdigit_l F + __key_decryptsession_pk_LOCAL D 0x4 + __key_encryptsession_pk_LOCAL D 0x4 + __key_gendes_LOCAL D 0x4 + __libc_allocate_rtsig F + __libc_current_sigrtmax F + __libc_current_sigrtmin F + __libc_freeres F + __libc_sa_len F + __lxstat64 F + __mempcpy_small F + __newlocale F + __nl_langinfo_l F + __open64 F + __poll F + __pread64 F + __pwrite64 F + __rawmemchr F + __res_init F + __res_nclose F + __res_ninit F + __res_state F + __setmntent F + __signbit F + __signbitf F + __signbitl F + __sigsuspend F + __statfs F + __stpcpy_small F + __strcasecmp_l F + __strcasestr F + __strcoll_l F + __strcpy_small F + __strcspn_c1 F + __strcspn_c2 F + __strcspn_c3 F + __strfmon_l F + __strncasecmp_l F + __strndup F + __strpbrk_c2 F + __strpbrk_c3 F + __strsep_1c F + __strsep_2c F + __strsep_3c F + __strsep_g F + __strspn_c1 F + __strspn_c2 F + __strspn_c3 F + __strtod_l F + __strtof_l F + __strtok_r_1c F + __strtol_l F + __strtold_l F + __strtoll_l F + __strtoul_l F + __strtoull_l F + __strverscmp F + __strxfrm_l F + __sysconf F + __sysctl F + __toascii_l F + __tolower_l F + __toupper_l F + __towctrans F + __towctrans_l F + __towlower_l F + __towupper_l F + __vfork F + __wcscasecmp_l F + __wcscoll_l F + __wcsncasecmp_l F + __wcstod_l F + __wcstof_l F + __wcstol_l F + __wcstold_l F + __wcstoll_l F + __wcstoul_l F + __wcstoull_l F + __wcsxfrm_l F + __wctrans_l F + __wctype_l F + __woverflow F + __wuflow F + __wunderflow F + __xpg_sigpause F + __xstat64 F + _authenticate F + _dl_mcount_wrapper F + _dl_mcount_wrapper_check F + _flushlbf F + _res_hconf D 0x30 + _sys_errlist D 0x11b8 + _sys_nerr D 0x4 + _sys_siglist D 0x100 + _test_and_set F + addseverity F + alphasort64 F + argp_err_exit_status D 0x4 + argp_error F + argp_failure F + argp_help F + argp_parse F + argp_program_bug_address D 0x4 + argp_program_version D 0x4 + argp_program_version_hook D 0x4 + argp_state_help F + argp_usage F + authdes_create F + authdes_getucred F + authdes_pk_create F + backtrace F + backtrace_symbols F + backtrace_symbols_fd F + bind_textdomain_codeset F + capget F + capset F + cbc_crypt F + clntunix_create F + creat64 F + dcngettext F + des_setparity F + dngettext F + ecb_crypt F + endutxent F + fattach F + fclose F + fdetach F + fdopen F + ffsl F + ffsll F + fgetc_unlocked F + fgetpos F + fgetpos64 F + fgets_unlocked F + fgetwc F + fgetwc_unlocked F + fgetws F + fgetws_unlocked F + fmemopen F + fmtmsg F + fopen F + fopen64 F + fopencookie F + fputs_unlocked F + fputwc F + fputwc_unlocked F + fputws F + fputws_unlocked F + fread_unlocked F + freopen64 F + fseeko F + fseeko64 F + fsetpos F + fsetpos64 F + fstatfs64 F + fstatvfs F + fstatvfs64 F + ftello F + ftello64 F + ftruncate64 F + ftw64 F + fwide F + fwprintf F + fwrite_unlocked F + fwscanf F + gai_strerror F + getaliasbyname_r F + getaliasent_r F + getcontext F + getdate F + getdate_err D 0x4 + getdate_r F + getdirentries64 F + getgrent_r F + getgrgid_r F + getgrnam_r F + gethostbyaddr_r F + gethostbyname2_r F + gethostbyname_r F + gethostent_r F + getloadavg F + getmsg F + getnameinfo F + getnetbyaddr_r F + getnetbyname_r F + getnetent_r F + getnetname F + getpmsg F + getprotobyname_r F + getprotobynumber_r F + getprotoent_r F + getpt F + getpwent_r F + getpwnam_r F + getpwuid_r F + getrlimit64 F + getrpcbyname_r F + getrpcbynumber_r F + getrpcent_r F + getservbyname_r F + getservbyport_r F + getservent_r F + getspent_r F + getspnam_r F + getutmp F + getutmpx F + getutxent F + getutxid F + getutxline F + getwc F + getwc_unlocked F + getwchar F + getwchar_unlocked F + glob64 F + globfree64 F + gnu_get_libc_release F + gnu_get_libc_version F + grantpt F + host2netname F + iconv F + iconv_close F + iconv_open F + if_freenameindex F + if_indextoname F + if_nameindex F + if_nametoindex F + imaxabs F + imaxdiv F + in6addr_any D 0x10 + in6addr_loopback D 0x10 + iruserok_af F + isastream F + iswblank F + key_decryptsession F + key_decryptsession_pk F + key_encryptsession F + key_encryptsession_pk F + key_gendes F + key_get_conv F + key_secretkey_is_set F + key_setnet F + key_setsecret F + localeconv F + lockf64 F + lseek64 F + makecontext F + mcheck_check_all F + mcheck_pedantic F + mempcpy F + memrchr F + mincore F + mkdtemp F + mkstemp64 F + mmap64 F + moncontrol F + netname2host F + netname2user F + nftw F + nftw64 F + ngettext F + ntp_adjtime F + ntp_gettime F + open64 F + passwd2des F + pclose F + popen F + posix_fadvise F + posix_fadvise64 F + posix_fallocate F + posix_fallocate64 F + posix_madvise F + posix_memalign F + posix_spawn F + posix_spawn_file_actions_addclose F + posix_spawn_file_actions_adddup2 F + posix_spawn_file_actions_addopen F + posix_spawn_file_actions_destroy F + posix_spawn_file_actions_init F + posix_spawnattr_destroy F + posix_spawnattr_getflags F + posix_spawnattr_getpgroup F + posix_spawnattr_getschedparam F + posix_spawnattr_getschedpolicy F + posix_spawnattr_getsigdefault F + posix_spawnattr_getsigmask F + posix_spawnattr_init F + posix_spawnattr_setflags F + posix_spawnattr_setpgroup F + posix_spawnattr_setschedparam F + posix_spawnattr_setschedpolicy F + posix_spawnattr_setsigdefault F + posix_spawnattr_setsigmask F + posix_spawnp F + pread F + pread64 F + printf_size F + printf_size_info F + pthread_attr_init F + ptsname F + ptsname_r F + putgrent F + putmsg F + putpmsg F + pututxline F + putwc F + putwc_unlocked F + putwchar F + putwchar_unlocked F + pwrite F + pwrite64 F + rawmemchr F + rcmd_af F + readdir64 F + readdir64_r F + rexec_af F + rresvport_af F + rtime F + ruserok_af F + scandir64 F + sendfile F + setrlimit64 F + setutxent F + sighold F + sigignore F + sigqueue F + sigrelse F + sigset F + sigtimedwait F + sigwaitinfo F + statfs64 F + statvfs F + statvfs64 F + strcasestr F + strchrnul F + strtoimax F + strtoumax F + strverscmp F + svc_getreq_common F + svc_getreq_poll F + svc_max_pollfd D 0x4 + svc_pollfd D 0x4 + svcunix_create F + svcunixfd_create F + swapcontext F + swprintf F + swscanf F + sys_errlist D 0x11b8 + sys_nerr D 0x4 + sys_sigabbrev D 0x100 + sys_siglist D 0x100 + sysv_signal F + tcgetsid F + tdestroy F + tmpfile F + tmpfile64 F + truncate64 F + umount2 F + ungetwc F + unlockpt F + updwtmpx F + user2netname F + utmpxname F + versionsort F + versionsort64 F + vfwprintf F + vfwscanf F + vswprintf F + vswscanf F + vwprintf F + vwscanf F + waitid F + wcscasecmp F + wcschrnul F + wcsftime F + wcsncasecmp F + wcsnlen F + wcstoimax F + wcstoll F + wcstoull F + wcstoumax F + wcswcs F + wmempcpy F + wordexp F + wordfree F + wprintf F + wscanf F + xdecrypt F + xdr_authdes_cred F + xdr_authdes_verf F + xdr_getcredres F + xdr_hyper F + xdr_int16_t F + xdr_int32_t F + xdr_int64_t F + xdr_int8_t F + xdr_longlong_t F + xdr_netnamestr F + xdr_sizeof F + xdr_u_hyper F + xdr_u_longlong_t F + xdr_uint16_t F + xdr_uint32_t F + xdr_uint64_t F + xdr_uint8_t F + xdr_unixcred F +GLIBC_2.2.1 + GLIBC_2.2.1 A + pivot_root F + posix_openpt F +GLIBC_2.2.2 + GLIBC_2.2.2 A + __nss_hostname_digits_dots F +GLIBC_2.2.3 + GLIBC_2.2.3 A + __rpc_thread_createerr F + __rpc_thread_svc_fdset F + __rpc_thread_svc_max_pollfd F + __rpc_thread_svc_pollfd F + fnmatch F + sprofil F +GLIBC_2.2.4 + GLIBC_2.2.4 A + dl_iterate_phdr F + getgrouplist F + sockatmark F +GLIBC_2.2.6 + GLIBC_2.2.6 A + __nanosleep F +GLIBC_2.3 + GLIBC_2.3 A + __ctype_b_loc F + __ctype_tolower_loc F + __ctype_toupper_loc F + __isctype F + __strftime_l F + __uselocale F + __wcsftime_l F + duplocale F + fgetxattr F + flistxattr F + freeifaddrs F + freelocale F + fremovexattr F + fsetxattr F + futimes F + getifaddrs F + getxattr F + isalnum_l F + isalpha_l F + isblank_l F + iscntrl_l F + isctype F + isdigit_l F + isgraph_l F + islower_l F + isprint_l F + ispunct_l F + isspace_l F + isupper_l F + iswalnum_l F + iswalpha_l F + iswblank_l F + iswcntrl_l F + iswctype_l F + iswdigit_l F + iswgraph_l F + iswlower_l F + iswprint_l F + iswpunct_l F + iswspace_l F + iswupper_l F + iswxdigit_l F + isxdigit_l F + lgetxattr F + listxattr F + llistxattr F + lremovexattr F + lsetxattr F + lutimes F + newlocale F + nl_langinfo_l F + readahead F + realpath F + removexattr F + sendfile64 F + setxattr F + strcasecmp_l F + strcoll_l F + strfmon_l F + strftime_l F + strncasecmp_l F + strtod_l F + strtof_l F + strtol_l F + strtold_l F + strtoll_l F + strtoul_l F + strtoull_l F + strxfrm_l F + tolower_l F + toupper_l F + towctrans_l F + towlower_l F + towupper_l F + uselocale F + wcscasecmp_l F + wcscoll_l F + wcsftime_l F + wcsncasecmp_l F + wcstod_l F + wcstof_l F + wcstol_l F + wcstold_l F + wcstoll_l F + wcstoul_l F + wcstoull_l F + wcsxfrm_l F + wctrans_l F + wctype_l F +GLIBC_2.3.2 + GLIBC_2.3.2 A + __register_atfork F + epoll_create F + epoll_ctl F + epoll_wait F + lchmod F + pthread_cond_broadcast F + pthread_cond_destroy F + pthread_cond_init F + pthread_cond_signal F + pthread_cond_timedwait F + pthread_cond_wait F + strptime_l F +GLIBC_2.3.3 + GLIBC_2.3.3 A + _sys_siglist D 0x200 + gnu_dev_major F + gnu_dev_makedev F + gnu_dev_minor F + inet6_option_alloc F + inet6_option_append F + inet6_option_find F + inet6_option_init F + inet6_option_next F + inet6_option_space F + nftw F + nftw64 F + posix_fadvise64 F + posix_fallocate64 F + remap_file_pages F + sched_getaffinity F + sched_setaffinity F + semtimedop F + sys_sigabbrev D 0x200 + sys_siglist D 0x200 +GLIBC_2.3.4 + GLIBC_2.3.4 A + __chk_fail F + __fprintf_chk F + __gets_chk F + __memcpy_chk F + __memmove_chk F + __mempcpy_chk F + __memset_chk F + __printf_chk F + __snprintf_chk F + __sprintf_chk F + __stpcpy_chk F + __strcat_chk F + __strcpy_chk F + __strncat_chk F + __strncpy_chk F + __vfprintf_chk F + __vprintf_chk F + __vsnprintf_chk F + __vsprintf_chk F + __xpg_strerror_r F + getipv4sourcefilter F + getsourcefilter F + regexec F + sched_getaffinity F + sched_setaffinity F + setipv4sourcefilter F + setsourcefilter F + xdr_quad_t F + xdr_u_quad_t F +GLIBC_2.4 + GLIBC_2.4 A + __confstr_chk F + __fgets_chk F + __fgets_unlocked_chk F + __fgetws_chk F + __fgetws_unlocked_chk F + __fwprintf_chk F + __fxstatat F + __fxstatat64 F + __getcwd_chk F + __getdomainname_chk F + __getgroups_chk F + __gethostname_chk F + __getlogin_r_chk F + __getwd_chk F + __mbsnrtowcs_chk F + __mbsrtowcs_chk F + __mbstowcs_chk F + __pread64_chk F + __pread_chk F + __ptsname_r_chk F + __read_chk F + __readlink_chk F + __realpath_chk F + __recv_chk F + __recvfrom_chk F + __stack_chk_fail F + __stpncpy_chk F + __swprintf_chk F + __syslog_chk F + __ttyname_r_chk F + __vfwprintf_chk F + __vswprintf_chk F + __vsyslog_chk F + __vwprintf_chk F + __wcpcpy_chk F + __wcpncpy_chk F + __wcrtomb_chk F + __wcscat_chk F + __wcscpy_chk F + __wcsncat_chk F + __wcsncpy_chk F + __wcsnrtombs_chk F + __wcsrtombs_chk F + __wcstombs_chk F + __wctomb_chk F + __wmemcpy_chk F + __wmemmove_chk F + __wmempcpy_chk F + __wmemset_chk F + __wprintf_chk F + __xmknodat F + eaccess F + faccessat F + fchmodat F + fchownat F + fdopendir F + futimesat F + inotify_add_watch F + inotify_init F + inotify_rm_watch F + linkat F + mkdirat F + mkfifoat F + open_wmemstream F + openat F + openat64 F + ppoll F + readlinkat F + renameat F + symlinkat F + unlinkat F + unshare F +GLIBC_2.5 + GLIBC_2.5 A + __readlinkat_chk F + inet6_opt_append F + inet6_opt_find F + inet6_opt_finish F + inet6_opt_get_val F + inet6_opt_init F + inet6_opt_next F + inet6_opt_set_val F + inet6_rth_add F + inet6_rth_getaddr F + inet6_rth_init F + inet6_rth_reverse F + inet6_rth_segments F + inet6_rth_space F + splice F + tee F + vmsplice F +GLIBC_2.6 + GLIBC_2.6 A + __sched_cpucount F + epoll_pwait F + futimens F + sched_getcpu F + strerror_l F + sync_file_range F + utimensat F +GLIBC_2.7 + GLIBC_2.7 A + __fread_chk F + __fread_unlocked_chk F + __isoc99_fscanf F + __isoc99_fwscanf F + __isoc99_scanf F + __isoc99_sscanf F + __isoc99_swscanf F + __isoc99_vfscanf F + __isoc99_vfwscanf F + __isoc99_vscanf F + __isoc99_vsscanf F + __isoc99_vswscanf F + __isoc99_vwscanf F + __isoc99_wscanf F + __open64_2 F + __open_2 F + __openat64_2 F + __openat_2 F + __sched_cpualloc F + __sched_cpufree F + eventfd F + eventfd_read F + eventfd_write F + mkostemp F + mkostemp64 F + signalfd F +GLIBC_2.8 + GLIBC_2.8 A + __asprintf_chk F + __dprintf_chk F + __obstack_printf_chk F + __obstack_vprintf_chk F + __vasprintf_chk F + __vdprintf_chk F + qsort_r F + timerfd_create F + timerfd_gettime F + timerfd_settime F +GLIBC_2.9 + GLIBC_2.9 A + dup3 F + epoll_create1 F + inotify_init1 F + pipe2 F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libcrypt.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libcrypt.abilist new file mode 100644 index 0000000000..1df145f260 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libcrypt.abilist @@ -0,0 +1,9 @@ +GLIBC_2.0 + GLIBC_2.0 A + crypt F + crypt_r F + encrypt F + encrypt_r F + fcrypt F + setkey F + setkey_r F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libdl.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libdl.abilist new file mode 100644 index 0000000000..57c2492e1f --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libdl.abilist @@ -0,0 +1,18 @@ +GLIBC_2.0 + GLIBC_2.0 A + dladdr F + dlclose F + dlerror F + dlopen F + dlsym F +GLIBC_2.2 + GLIBC_2.2 A + dlopen F + dlvsym F +GLIBC_2.3.3 + GLIBC_2.3.3 A + dladdr1 F + dlinfo F +GLIBC_2.3.4 + GLIBC_2.3.4 A + dlmopen F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libm.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libm.abilist new file mode 100644 index 0000000000..064eeba0b1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libm.abilist @@ -0,0 +1,403 @@ +GLIBC_2.0 + GLIBC_2.0 A + _LIB_VERSION D 0x4 + acos F + acosf F + acosh F + acoshf F + acoshl F + acosl F + asin F + asinf F + asinh F + asinhf F + asinhl F + asinl F + atan F + atan2 F + atan2f F + atan2l F + atanf F + atanh F + atanhf F + atanhl F + atanl F + cbrt F + cbrtf F + cbrtl F + ceil F + ceilf F + ceill F + copysign F + copysignf F + copysignl F + cos F + cosf F + cosh F + coshf F + coshl F + cosl F + drem F + dremf F + dreml F + erf F + erfc F + erfcf F + erfcl F + erff F + erfl F + exp F + expf F + expl F + expm1 F + expm1f F + expm1l F + fabs F + fabsf F + fabsl F + finite F + finitef F + finitel F + floor F + floorf F + floorl F + fmod F + fmodf F + fmodl F + frexp F + frexpf F + frexpl F + gamma F + gammaf F + gammal F + hypot F + hypotf F + hypotl F + ilogb F + ilogbf F + ilogbl F + j0 F + j0f F + j0l F + j1 F + j1f F + j1l F + jn F + jnf F + jnl F + ldexp F + ldexpf F + ldexpl F + lgamma F + lgamma_r F + lgammaf F + lgammaf_r F + lgammal F + lgammal_r F + log F + log10 F + log10f F + log10l F + log1p F + log1pf F + log1pl F + logb F + logbf F + logbl F + logf F + logl F + matherr F + modf F + modff F + modfl F + nextafter F + nextafterf F + nextafterl F + pow F + powf F + powl F + remainder F + remainderf F + remainderl F + rint F + rintf F + rintl F + scalb F + scalbf F + scalbl F + scalbn F + scalbnf F + scalbnl F + signgam D 0x4 + significand F + significandf F + significandl F + sin F + sinf F + sinh F + sinhf F + sinhl F + sinl F + sqrt F + sqrtf F + sqrtl F + tan F + tanf F + tanh F + tanhf F + tanhl F + tanl F + y0 F + y0f F + y0l F + y1 F + y1f F + y1l F + yn F + ynf F + ynl F +GLIBC_2.15 + GLIBC_2.15 A + __acos_finite F + __acosf_finite F + __acosh_finite F + __acoshf_finite F + __acoshl_finite F + __acosl_finite F + __asin_finite F + __asinf_finite F + __asinl_finite F + __atan2_finite F + __atan2f_finite F + __atan2l_finite F + __atanh_finite F + __atanhf_finite F + __atanhl_finite F + __cosh_finite F + __coshf_finite F + __coshl_finite F + __exp10_finite F + __exp10f_finite F + __exp10l_finite F + __exp2_finite F + __exp2f_finite F + __exp2l_finite F + __exp_finite F + __expf_finite F + __expl_finite F + __fmod_finite F + __fmodf_finite F + __fmodl_finite F + __gamma_r_finite F + __gammaf_r_finite F + __gammal_r_finite F + __hypot_finite F + __hypotf_finite F + __hypotl_finite F + __j0_finite F + __j0f_finite F + __j0l_finite F + __j1_finite F + __j1f_finite F + __j1l_finite F + __jn_finite F + __jnf_finite F + __jnl_finite F + __lgamma_r_finite F + __lgammaf_r_finite F + __lgammal_r_finite F + __log10_finite F + __log10f_finite F + __log10l_finite F + __log2_finite F + __log2f_finite F + __log2l_finite F + __log_finite F + __logf_finite F + __logl_finite F + __pow_finite F + __powf_finite F + __powl_finite F + __remainder_finite F + __remainderf_finite F + __remainderl_finite F + __scalb_finite F + __scalbf_finite F + __scalbl_finite F + __sinh_finite F + __sinhf_finite F + __sinhl_finite F + __sqrt_finite F + __sqrtf_finite F + __sqrtl_finite F + __y0_finite F + __y0f_finite F + __y0l_finite F + __y1_finite F + __y1f_finite F + __y1l_finite F + __yn_finite F + __ynf_finite F + __ynl_finite F +GLIBC_2.2 + GLIBC_2.2 A + __clog10 F + __clog10f F + __clog10l F + __finite F + __finitef F + __finitel F + __fpclassify F + __fpclassifyf F + __fpclassifyl F + __signbit F + __signbitf F + __signbitl F + cabs F + cabsf F + cabsl F + cacos F + cacosf F + cacosh F + cacoshf F + cacoshl F + cacosl F + carg F + cargf F + cargl F + casin F + casinf F + casinh F + casinhf F + casinhl F + casinl F + catan F + catanf F + catanh F + catanhf F + catanhl F + catanl F + ccos F + ccosf F + ccosh F + ccoshf F + ccoshl F + ccosl F + cexp F + cexpf F + cexpl F + cimag F + cimagf F + cimagl F + clog F + clog10 F + clog10f F + clog10l F + clogf F + clogl F + conj F + conjf F + conjl F + cpow F + cpowf F + cpowl F + cproj F + cprojf F + cprojl F + creal F + crealf F + creall F + csin F + csinf F + csinh F + csinhf F + csinhl F + csinl F + csqrt F + csqrtf F + csqrtl F + ctan F + ctanf F + ctanh F + ctanhf F + ctanhl F + ctanl F + exp10 F + exp10f F + exp10l F + exp2 F + exp2f F + exp2l F + fdim F + fdimf F + fdiml F + feclearexcept F + fedisableexcept F + feenableexcept F + fegetenv F + fegetexcept F + fegetexceptflag F + fegetround F + feholdexcept F + feraiseexcept F + fesetenv F + fesetexceptflag F + fesetround F + fetestexcept F + feupdateenv F + fma F + fmaf F + fmal F + fmax F + fmaxf F + fmaxl F + fmin F + fminf F + fminl F + llrint F + llrintf F + llrintl F + llround F + llroundf F + llroundl F + log2 F + log2f F + log2l F + lrint F + lrintf F + lrintl F + lround F + lroundf F + lroundl F + nan F + nanf F + nanl F + nearbyint F + nearbyintf F + nearbyintl F + nexttoward F + nexttowardf F + nexttowardl F + pow10 F + pow10f F + pow10l F + remquo F + remquof F + remquol F + round F + roundf F + roundl F + scalbln F + scalblnf F + scalblnl F + sincos F + sincosf F + sincosl F + tgamma F + tgammaf F + tgammal F + trunc F + truncf F + truncl F +GLIBC_2.4 + GLIBC_2.4 A diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libnsl.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libnsl.abilist new file mode 100644 index 0000000000..b38ad63e0d --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libnsl.abilist @@ -0,0 +1,125 @@ +GLIBC_2.0 + GLIBC_2.0 A + __yp_check F + xdr_domainname F + xdr_keydat F + xdr_mapname F + xdr_peername F + xdr_valdat F + xdr_yp_buf F + xdr_ypbind_binding F + xdr_ypbind_resp F + xdr_ypbind_resptype F + xdr_ypbind_setdom F + xdr_ypdelete_args F + xdr_ypmap_parms F + xdr_ypmaplist F + xdr_yppush_status F + xdr_yppushresp_xfr F + xdr_ypreq_key F + xdr_ypreq_nokey F + xdr_ypreq_xfr F + xdr_ypresp_all F + xdr_ypresp_key_val F + xdr_ypresp_maplist F + xdr_ypresp_master F + xdr_ypresp_order F + xdr_ypresp_val F + xdr_ypresp_xfr F + xdr_ypstat F + xdr_ypupdate_args F + xdr_ypxfrstat F + yp_all F + yp_bind F + yp_first F + yp_get_default_domain F + yp_maplist F + yp_master F + yp_match F + yp_next F + yp_order F + yp_unbind F + yp_update F + ypbinderr_string F + yperr_string F + ypprot_err F +GLIBC_2.2 + GLIBC_2.2 A + __free_fdresult F + __nis_default_access F + __nis_default_group F + __nis_default_owner F + __nis_default_ttl F + __nis_finddirectory F + __nis_hash F + __nisbind_connect F + __nisbind_create F + __nisbind_destroy F + __nisbind_next F + nis_add F + nis_add_entry F + nis_addmember F + nis_checkpoint F + nis_clone_directory F + nis_clone_object F + nis_clone_result F + nis_creategroup F + nis_destroy_object F + nis_destroygroup F + nis_dir_cmp F + nis_domain_of F + nis_domain_of_r F + nis_first_entry F + nis_free_directory F + nis_free_object F + nis_free_request F + nis_freenames F + nis_freeresult F + nis_freeservlist F + nis_freetags F + nis_getnames F + nis_getservlist F + nis_ismember F + nis_leaf_of F + nis_leaf_of_r F + nis_lerror F + nis_list F + nis_local_directory F + nis_local_group F + nis_local_host F + nis_local_principal F + nis_lookup F + nis_mkdir F + nis_modify F + nis_modify_entry F + nis_name_of F + nis_name_of_r F + nis_next_entry F + nis_perror F + nis_ping F + nis_print_directory F + nis_print_entry F + nis_print_group F + nis_print_group_entry F + nis_print_link F + nis_print_object F + nis_print_result F + nis_print_rights F + nis_print_table F + nis_read_obj F + nis_remove F + nis_remove_entry F + nis_removemember F + nis_rmdir F + nis_servstate F + nis_sperrno F + nis_sperror F + nis_sperror_r F + nis_stats F + nis_verifygroup F + nis_write_obj F + readColdStartFile F + writeColdStartFile F + xdr_cback_data F + xdr_obj_p F + xdr_ypall F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libpthread.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libpthread.abilist new file mode 100644 index 0000000000..4e0b07f698 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libpthread.abilist @@ -0,0 +1,263 @@ +GLIBC_2.0 + GLIBC_2.0 A + _IO_flockfile F + _IO_ftrylockfile F + _IO_funlockfile F + __close F + __connect F + __errno_location F + __fcntl F + __fork F + __h_errno_location F + __lseek F + __open F + __pthread_getspecific F + __pthread_key_create F + __pthread_mutex_destroy F + __pthread_mutex_init F + __pthread_mutex_lock F + __pthread_mutex_trylock F + __pthread_mutex_unlock F + __pthread_mutexattr_destroy F + __pthread_mutexattr_init F + __pthread_mutexattr_settype F + __pthread_once F + __pthread_setspecific F + __read F + __send F + __sigaction F + __wait F + __write F + _pthread_cleanup_pop F + _pthread_cleanup_pop_restore F + _pthread_cleanup_push F + _pthread_cleanup_push_defer F + accept F + close F + connect F + fcntl F + flockfile F + fork F + fsync F + ftrylockfile F + funlockfile F + longjmp F + lseek F + msync F + nanosleep F + open F + pause F + pthread_atfork F + pthread_attr_destroy F + pthread_attr_getdetachstate F + pthread_attr_getinheritsched F + pthread_attr_getschedparam F + pthread_attr_getschedpolicy F + pthread_attr_getscope F + pthread_attr_init F + pthread_attr_setdetachstate F + pthread_attr_setinheritsched F + pthread_attr_setschedparam F + pthread_attr_setschedpolicy F + pthread_attr_setscope F + pthread_cancel F + pthread_cond_broadcast F + pthread_cond_destroy F + pthread_cond_init F + pthread_cond_signal F + pthread_cond_timedwait F + pthread_cond_wait F + pthread_condattr_destroy F + pthread_condattr_init F + pthread_create F + pthread_detach F + pthread_equal F + pthread_exit F + pthread_getschedparam F + pthread_getspecific F + pthread_join F + pthread_key_create F + pthread_key_delete F + pthread_kill F + pthread_kill_other_threads_np F + pthread_mutex_destroy F + pthread_mutex_init F + pthread_mutex_lock F + pthread_mutex_trylock F + pthread_mutex_unlock F + pthread_mutexattr_destroy F + pthread_mutexattr_getkind_np F + pthread_mutexattr_init F + pthread_mutexattr_setkind_np F + pthread_once F + pthread_self F + pthread_setcancelstate F + pthread_setcanceltype F + pthread_setschedparam F + pthread_setspecific F + pthread_sigmask F + pthread_testcancel F + raise F + read F + recv F + recvfrom F + recvmsg F + sem_destroy F + sem_getvalue F + sem_init F + sem_post F + sem_trywait F + sem_wait F + send F + sendmsg F + sendto F + sigaction F + siglongjmp F + sigwait F + system F + tcdrain F + vfork F + wait F + waitpid F + write F +GLIBC_2.11 + GLIBC_2.11 A + pthread_sigqueue F +GLIBC_2.12 + GLIBC_2.12 A + pthread_getname_np F + pthread_mutex_consistent F + pthread_mutexattr_getrobust F + pthread_mutexattr_setrobust F + pthread_setname_np F +GLIBC_2.2 + GLIBC_2.2 A + __libc_allocate_rtsig F + __libc_current_sigrtmax F + __libc_current_sigrtmin F + __open64 F + __pread64 F + __pthread_rwlock_destroy F + __pthread_rwlock_init F + __pthread_rwlock_rdlock F + __pthread_rwlock_tryrdlock F + __pthread_rwlock_trywrlock F + __pthread_rwlock_unlock F + __pthread_rwlock_wrlock F + __pwrite64 F + __res_state F + __vfork F + lseek64 F + open64 F + pread F + pread64 F + pthread_attr_getguardsize F + pthread_attr_getstack F + pthread_attr_getstackaddr F + pthread_attr_getstacksize F + pthread_attr_init F + pthread_attr_setguardsize F + pthread_attr_setstack F + pthread_attr_setstackaddr F + pthread_attr_setstacksize F + pthread_barrier_destroy F + pthread_barrier_init F + pthread_barrier_wait F + pthread_barrierattr_destroy F + pthread_barrierattr_init F + pthread_barrierattr_setpshared F + pthread_condattr_getpshared F + pthread_condattr_setpshared F + pthread_create F + pthread_getconcurrency F + pthread_getcpuclockid F + pthread_mutex_timedlock F + pthread_mutexattr_getpshared F + pthread_mutexattr_gettype F + pthread_mutexattr_setpshared F + pthread_mutexattr_settype F + pthread_rwlock_destroy F + pthread_rwlock_init F + pthread_rwlock_rdlock F + pthread_rwlock_timedrdlock F + pthread_rwlock_timedwrlock F + pthread_rwlock_tryrdlock F + pthread_rwlock_trywrlock F + pthread_rwlock_unlock F + pthread_rwlock_wrlock F + pthread_rwlockattr_destroy F + pthread_rwlockattr_getkind_np F + pthread_rwlockattr_getpshared F + pthread_rwlockattr_init F + pthread_rwlockattr_setkind_np F + pthread_rwlockattr_setpshared F + pthread_setconcurrency F + pthread_spin_destroy F + pthread_spin_init F + pthread_spin_lock F + pthread_spin_trylock F + pthread_spin_unlock F + pthread_yield F + pwrite F + pwrite64 F + sem_close F + sem_destroy F + sem_getvalue F + sem_init F + sem_open F + sem_post F + sem_timedwait F + sem_trywait F + sem_unlink F + sem_wait F +GLIBC_2.2.3 + GLIBC_2.2.3 A + pthread_getattr_np F +GLIBC_2.2.6 + GLIBC_2.2.6 A + __nanosleep F +GLIBC_2.3.2 + GLIBC_2.3.2 A + pthread_cond_broadcast F + pthread_cond_destroy F + pthread_cond_init F + pthread_cond_signal F + pthread_cond_timedwait F + pthread_cond_wait F +GLIBC_2.3.3 + GLIBC_2.3.3 A + __pthread_cleanup_routine F + __pthread_register_cancel F + __pthread_register_cancel_defer F + __pthread_unregister_cancel F + __pthread_unregister_cancel_restore F + __pthread_unwind_next F + pthread_attr_getaffinity_np F + pthread_attr_setaffinity_np F + pthread_attr_setstack F + pthread_attr_setstacksize F + pthread_barrierattr_getpshared F + pthread_condattr_getclock F + pthread_condattr_setclock F + pthread_getaffinity_np F + pthread_setaffinity_np F + pthread_timedjoin_np F + pthread_tryjoin_np F +GLIBC_2.3.4 + GLIBC_2.3.4 A + pthread_attr_getaffinity_np F + pthread_attr_setaffinity_np F + pthread_getaffinity_np F + pthread_setaffinity_np F + pthread_setschedprio F +GLIBC_2.4 + GLIBC_2.4 A + pthread_mutex_consistent_np F + pthread_mutex_getprioceiling F + pthread_mutex_setprioceiling F + pthread_mutexattr_getprioceiling F + pthread_mutexattr_getprotocol F + pthread_mutexattr_getrobust_np F + pthread_mutexattr_setprioceiling F + pthread_mutexattr_setprotocol F + pthread_mutexattr_setrobust_np F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libresolv.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libresolv.abilist new file mode 100644 index 0000000000..f68333d4a4 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libresolv.abilist @@ -0,0 +1,104 @@ +GLIBC_2.0 + GLIBC_2.0 A + __b64_ntop F + __b64_pton F + __dn_comp F + __dn_count_labels F + __dn_skipname F + __fp_nquery F + __fp_query F + __fp_resstat F + __hostalias F + __loc_aton F + __loc_ntoa F + __p_cdname F + __p_cdnname F + __p_class F + __p_class_syms D 0x54 + __p_fqname F + __p_fqnname F + __p_option F + __p_query F + __p_secstodate F + __p_time F + __p_type F + __p_type_syms D 0x228 + __putlong F + __putshort F + __res_close F + __res_dnok F + __res_hnok F + __res_isourserver F + __res_mailok F + __res_nameinquery F + __res_ownok F + __res_queriesmatch F + __res_send F + __sym_ntop F + __sym_ntos F + __sym_ston F + _gethtbyaddr F + _gethtbyname F + _gethtbyname2 F + _gethtent F + _getlong F + _getshort F + _res_opcodes D 0x40 + _sethtent F + dn_expand F + inet_net_ntop F + inet_net_pton F + inet_neta F + res_gethostbyaddr F + res_gethostbyname F + res_gethostbyname2 F + res_mkquery F + res_query F + res_querydomain F + res_search F + res_send_setqhook F + res_send_setrhook F +GLIBC_2.2 + GLIBC_2.2 A + __dn_expand F + __res_hostalias F + __res_mkquery F + __res_nmkquery F + __res_nquery F + __res_nquerydomain F + __res_nsearch F + __res_nsend F + __res_query F + __res_querydomain F + __res_search F +GLIBC_2.3.2 + GLIBC_2.3.2 A + __p_rcode F +GLIBC_2.9 + GLIBC_2.9 A + ns_datetosecs F + ns_format_ttl F + ns_get16 F + ns_get32 F + ns_initparse F + ns_makecanon F + ns_msg_getflag F + ns_name_compress F + ns_name_ntol F + ns_name_ntop F + ns_name_pack F + ns_name_pton F + ns_name_rollback F + ns_name_skip F + ns_name_uncompress F + ns_name_unpack F + ns_parse_ttl F + ns_parserr F + ns_put16 F + ns_put32 F + ns_samedomain F + ns_samename F + ns_skiprr F + ns_sprintrr F + ns_sprintrrf F + ns_subdomain F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/librt.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/librt.abilist new file mode 100644 index 0000000000..e091de0638 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/librt.abilist @@ -0,0 +1,50 @@ +GLIBC_2.2 + GLIBC_2.2 A + aio_cancel F + aio_cancel64 F + aio_error F + aio_error64 F + aio_fsync F + aio_fsync64 F + aio_init F + aio_read F + aio_read64 F + aio_return F + aio_return64 F + aio_suspend F + aio_suspend64 F + aio_write F + aio_write64 F + clock_getcpuclockid F + clock_getres F + clock_gettime F + clock_nanosleep F + clock_settime F + lio_listio F + lio_listio64 F + shm_open F + shm_unlink F + timer_create F + timer_delete F + timer_getoverrun F + timer_gettime F + timer_settime F +GLIBC_2.3.4 + GLIBC_2.3.4 A + mq_close F + mq_getattr F + mq_notify F + mq_open F + mq_receive F + mq_send F + mq_setattr F + mq_timedreceive F + mq_timedsend F + mq_unlink F +GLIBC_2.4 + GLIBC_2.4 A + lio_listio F + lio_listio64 F +GLIBC_2.7 + GLIBC_2.7 A + __mq_open_2 F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libthread_db.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libthread_db.abilist new file mode 100644 index 0000000000..f33138067c --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libthread_db.abilist @@ -0,0 +1,48 @@ +GLIBC_2.1.3 + GLIBC_2.1.3 A + td_init F + td_log F + td_ta_clear_event F + td_ta_delete F + td_ta_enable_stats F + td_ta_event_addr F + td_ta_event_getmsg F + td_ta_get_nthreads F + td_ta_get_ph F + td_ta_get_stats F + td_ta_map_id2thr F + td_ta_map_lwp2thr F + td_ta_new F + td_ta_reset_stats F + td_ta_set_event F + td_ta_setconcurrency F + td_ta_thr_iter F + td_ta_tsd_iter F + td_thr_clear_event F + td_thr_dbresume F + td_thr_dbsuspend F + td_thr_event_enable F + td_thr_event_getmsg F + td_thr_get_info F + td_thr_getfpregs F + td_thr_getgregs F + td_thr_getxregs F + td_thr_getxregsize F + td_thr_set_event F + td_thr_setfpregs F + td_thr_setgregs F + td_thr_setprio F + td_thr_setsigpending F + td_thr_setxregs F + td_thr_sigsetmask F + td_thr_tsd F + td_thr_validate F +GLIBC_2.2.3 + GLIBC_2.2.3 A + td_symbol_list F +GLIBC_2.3 + GLIBC_2.3 A + td_thr_tls_get_addr F +GLIBC_2.3.3 + GLIBC_2.3.3 A + td_thr_tlsbase F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libutil.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libutil.abilist new file mode 100644 index 0000000000..7422687e3c --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libutil.abilist @@ -0,0 +1,8 @@ +GLIBC_2.0 + GLIBC_2.0 A + forkpty F + login F + login_tty F + logout F + logwtmp F + openpty F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/ld.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/ld.abilist new file mode 100644 index 0000000000..ea78cdb80e --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/ld.abilist @@ -0,0 +1,18 @@ +GLIBC_2.0 + GLIBC_2.0 A + __libc_memalign F + _r_debug D 0x28 + calloc F + free F + malloc F + realloc F +GLIBC_2.2 + GLIBC_2.2 A + __libc_stack_end D 0x8 + _dl_mcount F +GLIBC_2.3 + GLIBC_2.3 A + __tls_get_addr F +GLIBC_2.4 + GLIBC_2.4 A + __stack_chk_guard D 0x8 diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libBrokenLocale.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libBrokenLocale.abilist new file mode 100644 index 0000000000..f4ca37f44b --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libBrokenLocale.abilist @@ -0,0 +1,3 @@ +GLIBC_2.0 + GLIBC_2.0 A + __ctype_get_mb_cur_max F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libanl.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libanl.abilist new file mode 100644 index 0000000000..c9755d8a33 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libanl.abilist @@ -0,0 +1,6 @@ +GLIBC_2.2.3 + GLIBC_2.2.3 A + gai_cancel F + gai_error F + gai_suspend F + getaddrinfo_a F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilist new file mode 100644 index 0000000000..1deec226f7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilist @@ -0,0 +1,2234 @@ +GCC_3.0 + GCC_3.0 A + _Unwind_Find_FDE F + __deregister_frame_info_bases F + __register_frame_info_bases F + __register_frame_info_table_bases F +GLIBC_2.0 + GLIBC_2.0 A + _IO_adjust_column F + _IO_default_doallocate F + _IO_default_finish F + _IO_default_pbackfail F + _IO_default_uflow F + _IO_default_xsgetn F + _IO_default_xsputn F + _IO_do_write F + _IO_doallocbuf F + _IO_fclose F + _IO_fdopen F + _IO_feof F + _IO_ferror F + _IO_fflush F + _IO_fgetpos F + _IO_fgets F + _IO_file_attach F + _IO_file_close F + _IO_file_close_it F + _IO_file_doallocate F + _IO_file_fopen F + _IO_file_init F + _IO_file_jumps D 0xa8 + _IO_file_open F + _IO_file_overflow F + _IO_file_read F + _IO_file_seek F + _IO_file_seekoff F + _IO_file_setbuf F + _IO_file_stat F + _IO_file_sync F + _IO_file_underflow F + _IO_file_write F + _IO_file_xsputn F + _IO_flockfile F + _IO_flush_all F + _IO_flush_all_linebuffered F + _IO_fopen F + _IO_fprintf F + _IO_fputs F + _IO_fread F + _IO_free_backup_area F + _IO_fsetpos F + _IO_ftell F + _IO_ftrylockfile F + _IO_funlockfile F + _IO_fwrite F + _IO_getc F + _IO_getline F + _IO_gets F + _IO_init F + _IO_init_marker F + _IO_link_in F + _IO_list_all D 0x8 + _IO_marker_delta F + _IO_marker_difference F + _IO_padn F + _IO_peekc_locked F + _IO_popen F + _IO_printf F + _IO_proc_close F + _IO_proc_open F + _IO_putc F + _IO_puts F + _IO_remove_marker F + _IO_seekmark F + _IO_seekoff F + _IO_seekpos F + _IO_setb F + _IO_setbuffer F + _IO_setvbuf F + _IO_sgetn F + _IO_sprintf F + _IO_sputbackc F + _IO_sscanf F + _IO_stderr_ D 0x98 + _IO_stdin_ D 0x98 + _IO_stdout_ D 0x98 + _IO_str_init_readonly F + _IO_str_init_static F + _IO_str_overflow F + _IO_str_pbackfail F + _IO_str_seekoff F + _IO_str_underflow F + _IO_sungetc F + _IO_switch_to_get_mode F + _IO_un_link F + _IO_ungetc F + _IO_unsave_markers F + _IO_vfprintf F + _IO_vfscanf F + _IO_vsprintf F + ___brk_addr D 0x8 + __adjtimex F + __after_morecore_hook D 0x8 + __argz_count F + __argz_next F + __argz_stringify F + __assert_fail F + __assert_perror_fail F + __bsd_getpgrp F + __bzero F + __check_rhosts_file D 0x4 + __clone F + __close F + __cmsg_nxthdr F + __connect F + __ctype32_b D 0x8 + __ctype_b D 0x8 + __ctype_get_mb_cur_max F + __ctype_tolower D 0x8 + __ctype_toupper D 0x8 + __curbrk D 0x8 + __daylight D 0x4 + __dcgettext F + __default_morecore F + __deregister_frame F + __deregister_frame_info F + __dgettext F + __dup2 F + __environ D 0x8 + __errno_location F + __fcntl F + __ffs F + __finite F + __finitef F + __finitel F + __fork F + __fpu_control D 0x4 + __frame_state_for F + __free_hook D 0x8 + __fxstat F + __getdelim F + __getpagesize F + __getpgid F + __getpid F + __gettimeofday F + __gmtime_r F + __h_errno_location F + __isinf F + __isinff F + __isinfl F + __isnan F + __isnanf F + __isnanl F + __iswctype F + __ivaliduser F + __libc_calloc F + __libc_free F + __libc_init_first F + __libc_mallinfo F + __libc_malloc F + __libc_mallopt F + __libc_memalign F + __libc_pvalloc F + __libc_realloc F + __libc_start_main F + __libc_valloc F + __lseek F + __lxstat F + __malloc_hook D 0x8 + __malloc_initialize_hook D 0x8 + __mbrlen F + __mbrtowc F + __memalign_hook D 0x8 + __mempcpy F + __monstartup F + __morecore D 0x8 + __nss_configure_lookup F + __nss_database_lookup F + __nss_group_lookup F + __nss_hosts_lookup F + __nss_next F + __nss_passwd_lookup F + __open F + __overflow F + __pipe F + __printf_fp F + __profile_frequency F + __progname D 0x8 + __progname_full D 0x8 + __rcmd_errstr D 0x8 + __read F + __realloc_hook D 0x8 + __register_frame F + __register_frame_info F + __register_frame_info_table F + __register_frame_table F + __res_randomid F + __sbrk F + __sched_get_priority_max F + __sched_get_priority_min F + __sched_getparam F + __sched_getscheduler F + __sched_setscheduler F + __sched_yield F + __secure_getenv F + __select F + __send F + __setpgid F + __sigaction F + __sigaddset F + __sigdelset F + __sigismember F + __sigpause F + __sigsetjmp F + __stpcpy F + __stpncpy F + __strcasecmp F + __strdup F + __strerror_r F + __strtod_internal F + __strtof_internal F + __strtok_r F + __strtol_internal F + __strtold_internal F + __strtoll_internal F + __strtoul_internal F + __strtoull_internal F + __sysv_signal F + __timezone D 0x8 + __tzname D 0x10 + __uflow F + __underflow F + __vfscanf F + __vsnprintf F + __vsscanf F + __wait F + __waitpid F + __wcstod_internal F + __wcstof_internal F + __wcstol_internal F + __wcstold_internal F + __wcstoll_internal F + __wcstoul_internal F + __wcstoull_internal F + __write F + __xmknod F + __xpg_basename F + __xstat F + _environ D 0x8 + _exit F + _flush_cache F + _libc_intl_domainname D 0x5 + _longjmp F + _mcleanup F + _mcount F + _nl_default_dirname D 0x12 + _nl_domain_bindings D 0x8 + _nl_msg_cat_cntr D 0x4 + _null_auth D 0x18 + _obstack D 0x8 + _obstack_allocated_p F + _obstack_begin F + _obstack_begin_1 F + _obstack_free F + _obstack_memory_used F + _obstack_newchunk F + _res D 0x238 + _rpc_dtablesize F + _seterr_reply F + _setjmp F + _sys_errlist D 0x3d8 + _sys_nerr D 0x4 + _sys_siglist D 0x100 + _tolower F + _toupper F + a64l F + abort F + abs F + accept F + access F + acct F + addmntent F + adjtime F + adjtimex F + advance F + alarm F + alphasort F + argz_add F + argz_add_sep F + argz_append F + argz_count F + argz_create F + argz_create_sep F + argz_delete F + argz_extract F + argz_insert F + argz_next F + argz_replace F + argz_stringify F + asctime F + asctime_r F + asprintf F + atexit F + atof F + atoi F + atol F + atoll F + authnone_create F + authunix_create F + authunix_create_default F + basename F + bcmp F + bcopy F + bdflush F + bind F + bindresvport F + bindtextdomain F + brk F + bsd_signal F + bsearch F + btowc F + bzero F + cachectl F + cacheflush F + calloc F + callrpc F + canonicalize_file_name F + catclose F + catgets F + catopen F + cfgetispeed F + cfgetospeed F + cfmakeraw F + cfree F + cfsetispeed F + cfsetospeed F + cfsetspeed F + chdir F + chflags F + chmod F + chown F + chroot F + clearenv F + clearerr F + clearerr_unlocked F + clnt_broadcast F + clnt_create F + clnt_pcreateerror F + clnt_perrno F + clnt_perror F + clnt_spcreateerror F + clnt_sperrno F + clnt_sperror F + clntraw_create F + clnttcp_create F + clntudp_bufcreate F + clntudp_create F + clock F + clone F + close F + closedir F + closelog F + confstr F + connect F + copysign F + copysignf F + copysignl F + creat F + create_module F + ctermid F + ctime F + ctime_r F + cuserid F + daemon F + daylight D 0x4 + dcgettext F + delete_module F + dgettext F + difftime F + dirfd F + dirname F + div F + dprintf F + drand48 F + drand48_r F + dup F + dup2 F + dysize F + ecvt F + ecvt_r F + endaliasent F + endfsent F + endgrent F + endhostent F + endmntent F + endnetent F + endnetgrent F + endprotoent F + endpwent F + endrpcent F + endservent F + endspent F + endttyent F + endusershell F + endutent F + environ D 0x8 + envz_add F + envz_entry F + envz_get F + envz_merge F + envz_remove F + envz_strip F + erand48 F + erand48_r F + err F + error F + error_at_line F + error_message_count D 0x4 + error_one_per_line D 0x4 + error_print_progname D 0x8 + errx F + ether_aton F + ether_aton_r F + ether_hostton F + ether_line F + ether_ntoa F + ether_ntoa_r F + ether_ntohost F + euidaccess F + execl F + execle F + execlp F + execv F + execve F + execvp F + exit F + fchdir F + fchflags F + fchmod F + fchown F + fclose F + fcloseall F + fcntl F + fcvt F + fcvt_r F + fdatasync F + fdopen F + feof F + feof_unlocked F + ferror F + ferror_unlocked F + fexecve F + fflush F + fflush_unlocked F + ffs F + fgetc F + fgetgrent F + fgetgrent_r F + fgetpos F + fgetpwent F + fgetpwent_r F + fgets F + fgetspent F + fgetspent_r F + fileno F + fileno_unlocked F + finite F + finitef F + finitel F + flock F + flockfile F + fnmatch F + fopen F + fopencookie F + fork F + fpathconf F + fprintf F + fputc F + fputc_unlocked F + fputs F + fread F + free F + freeaddrinfo F + freopen F + frexp F + frexpf F + frexpl F + fscanf F + fseek F + fsetpos F + fstatfs F + fsync F + ftell F + ftime F + ftok F + ftruncate F + ftrylockfile F + fts_children F + fts_close F + fts_open F + fts_read F + fts_set F + ftw F + funlockfile F + fwrite F + gcvt F + get_avphys_pages F + get_current_dir_name F + get_kernel_syms F + get_myaddress F + get_nprocs F + get_nprocs_conf F + get_phys_pages F + getaddrinfo F + getaliasbyname F + getaliasbyname_r F + getaliasent F + getaliasent_r F + getc F + getc_unlocked F + getchar F + getchar_unlocked F + getcwd F + getdelim F + getdirentries F + getdomainname F + getdtablesize F + getegid F + getenv F + geteuid F + getfsent F + getfsfile F + getfsspec F + getgid F + getgrent F + getgrent_r F + getgrgid F + getgrgid_r F + getgrnam F + getgrnam_r F + getgroups F + gethostbyaddr F + gethostbyaddr_r F + gethostbyname F + gethostbyname2 F + gethostbyname2_r F + gethostbyname_r F + gethostent F + gethostent_r F + gethostid F + gethostname F + getitimer F + getline F + getlogin F + getlogin_r F + getmntent F + getmntent_r F + getnetbyaddr F + getnetbyaddr_r F + getnetbyname F + getnetbyname_r F + getnetent F + getnetent_r F + getnetgrent F + getnetgrent_r F + getopt F + getopt_long F + getopt_long_only F + getpagesize F + getpass F + getpeername F + getpgid F + getpgrp F + getpid F + getppid F + getpriority F + getprotobyname F + getprotobyname_r F + getprotobynumber F + getprotobynumber_r F + getprotoent F + getprotoent_r F + getpublickey F + getpw F + getpwent F + getpwent_r F + getpwnam F + getpwnam_r F + getpwuid F + getpwuid_r F + getresgid F + getresuid F + getrlimit F + getrpcbyname F + getrpcbyname_r F + getrpcbynumber F + getrpcbynumber_r F + getrpcent F + getrpcent_r F + getrpcport F + getrusage F + gets F + getsecretkey F + getservbyname F + getservbyname_r F + getservbyport F + getservbyport_r F + getservent F + getservent_r F + getsid F + getsockname F + getsockopt F + getspent F + getspent_r F + getspnam F + getspnam_r F + getsubopt F + gettext F + gettimeofday F + getttyent F + getttynam F + getuid F + getusershell F + getutent F + getutent_r F + getutid F + getutid_r F + getutline F + getutline_r F + getw F + getwd F + glob F + glob_pattern_p F + globfree F + gmtime F + gmtime_r F + group_member F + gsignal F + gtty F + h_errlist D 0x28 + h_nerr D 0x4 + hasmntopt F + hcreate F + hcreate_r F + hdestroy F + hdestroy_r F + herror F + hsearch F + hsearch_r F + hstrerror F + htonl F + htons F + index F + inet_addr F + inet_aton F + inet_lnaof F + inet_makeaddr F + inet_netof F + inet_network F + inet_nsap_addr F + inet_nsap_ntoa F + inet_ntoa F + inet_ntop F + inet_pton F + init_module F + initgroups F + initstate F + initstate_r F + innetgr F + insque F + ioctl F + iruserok F + isalnum F + isalpha F + isascii F + isatty F + isblank F + iscntrl F + isdigit F + isfdtype F + isgraph F + isinf F + isinff F + isinfl F + islower F + isnan F + isnanf F + isnanl F + isprint F + ispunct F + isspace F + isupper F + iswalnum F + iswalpha F + iswcntrl F + iswctype F + iswdigit F + iswgraph F + iswlower F + iswprint F + iswpunct F + iswspace F + iswupper F + iswxdigit F + isxdigit F + jrand48 F + jrand48_r F + kill F + killpg F + klogctl F + l64a F + labs F + lchown F + lckpwdf F + lcong48 F + lcong48_r F + ldexp F + ldexpf F + ldexpl F + ldiv F + lfind F + link F + listen F + llabs F + lldiv F + llseek F + loc1 D 0x8 + loc2 D 0x8 + localeconv F + localtime F + localtime_r F + lockf F + locs D 0x8 + longjmp F + lrand48 F + lrand48_r F + lsearch F + lseek F + madvise F + mallinfo F + malloc F + malloc_get_state F + malloc_set_state F + malloc_stats F + malloc_trim F + malloc_usable_size F + mallopt F + mallwatch D 0x8 + mblen F + mbrlen F + mbrtowc F + mbsinit F + mbsnrtowcs F + mbsrtowcs F + mbstowcs F + mbtowc F + mcheck F + memalign F + memccpy F + memchr F + memcmp F + memcpy F + memfrob F + memmem F + memmove F + memset F + mkdir F + mkfifo F + mkstemp F + mktemp F + mktime F + mlock F + mlockall F + mmap F + modf F + modff F + modfl F + monstartup F + mount F + mprobe F + mprotect F + mrand48 F + mrand48_r F + mremap F + msgctl F + msgget F + msgrcv F + msgsnd F + msync F + mtrace F + munlock F + munlockall F + munmap F + muntrace F + nanosleep F + nfsservctl F + nice F + nl_langinfo F + nrand48 F + nrand48_r F + ntohl F + ntohs F + obstack_alloc_failed_handler D 0x8 + obstack_exit_failure D 0x4 + obstack_free F + obstack_printf F + obstack_vprintf F + on_exit F + open F + open_memstream F + opendir F + openlog F + optarg D 0x8 + opterr D 0x4 + optind D 0x4 + optopt D 0x4 + parse_printf_format F + pathconf F + pause F + pclose F + perror F + personality F + pipe F + pmap_getmaps F + pmap_getport F + pmap_rmtcall F + pmap_set F + pmap_unset F + poll F + popen F + prctl F + printf F + profil F + program_invocation_name D 0x8 + program_invocation_short_name D 0x8 + pselect F + psignal F + pthread_attr_destroy F + pthread_attr_getdetachstate F + pthread_attr_getinheritsched F + pthread_attr_getschedparam F + pthread_attr_getschedpolicy F + pthread_attr_getscope F + pthread_attr_init F + pthread_attr_setdetachstate F + pthread_attr_setinheritsched F + pthread_attr_setschedparam F + pthread_attr_setschedpolicy F + pthread_attr_setscope F + pthread_cond_broadcast F + pthread_cond_destroy F + pthread_cond_init F + pthread_cond_signal F + pthread_cond_timedwait F + pthread_cond_wait F + pthread_condattr_destroy F + pthread_condattr_init F + pthread_equal F + pthread_exit F + pthread_getschedparam F + pthread_mutex_destroy F + pthread_mutex_init F + pthread_mutex_lock F + pthread_mutex_unlock F + pthread_self F + pthread_setcancelstate F + pthread_setcanceltype F + pthread_setschedparam F + ptrace F + putc F + putc_unlocked F + putchar F + putchar_unlocked F + putenv F + putpwent F + puts F + putspent F + pututline F + putw F + pvalloc F + qecvt F + qecvt_r F + qfcvt F + qfcvt_r F + qgcvt F + qsort F + query_module F + quotactl F + raise F + rand F + rand_r F + random F + random_r F + rcmd F + re_comp F + re_compile_fastmap F + re_compile_pattern F + re_exec F + re_match F + re_match_2 F + re_max_failures D 0x4 + re_search F + re_search_2 F + re_set_registers F + re_set_syntax F + re_syntax_options D 0x8 + read F + readdir F + readdir_r F + readlink F + readv F + realloc F + realpath F + reboot F + recv F + recvfrom F + recvmsg F + regcomp F + regerror F + regexec F + regfree F + register_printf_function F + registerrpc F + remove F + remque F + rename F + res_init F + revoke F + rewind F + rewinddir F + rexec F + rexecoptions D 0x4 + rindex F + rmdir F + rpc_createerr D 0x20 + rpmatch F + rresvport F + ruserok F + ruserpass F + sbrk F + scalbn F + scalbnf F + scalbnl F + scandir F + scanf F + sched_get_priority_max F + sched_get_priority_min F + sched_getparam F + sched_getscheduler F + sched_rr_get_interval F + sched_setparam F + sched_setscheduler F + sched_yield F + seed48 F + seed48_r F + seekdir F + select F + semctl F + semget F + semop F + send F + sendmsg F + sendto F + setaliasent F + setbuf F + setbuffer F + setcontext F + setdomainname F + setegid F + setenv F + seteuid F + setfsent F + setfsgid F + setfsuid F + setgid F + setgrent F + setgroups F + sethostent F + sethostid F + sethostname F + setitimer F + setjmp F + setlinebuf F + setlocale F + setlogin F + setlogmask F + setmntent F + setnetent F + setnetgrent F + setpgid F + setpgrp F + setpriority F + setprotoent F + setpwent F + setregid F + setresgid F + setresuid F + setreuid F + setrlimit F + setrpcent F + setservent F + setsid F + setsockopt F + setspent F + setstate F + setstate_r F + settimeofday F + setttyent F + setuid F + setusershell F + setutent F + setvbuf F + sgetspent F + sgetspent_r F + shmat F + shmctl F + shmdt F + shmget F + shutdown F + sigaction F + sigaddset F + sigaltstack F + sigandset F + sigblock F + sigdelset F + sigemptyset F + sigfillset F + siggetmask F + siginterrupt F + sigisemptyset F + sigismember F + siglongjmp F + signal F + sigorset F + sigpause F + sigpending F + sigprocmask F + sigreturn F + sigsetmask F + sigstack F + sigsuspend F + sigvec F + sigwait F + sleep F + snprintf F + socket F + socketpair F + sprintf F + srand F + srand48 F + srand48_r F + srandom F + srandom_r F + sscanf F + ssignal F + sstk F + statfs F + stderr D 0x8 + stdin D 0x8 + stdout D 0x8 + step F + stime F + stpcpy F + stpncpy F + strcasecmp F + strcat F + strchr F + strcmp F + strcoll F + strcpy F + strcspn F + strdup F + strerror F + strerror_r F + strfmon F + strfry F + strftime F + strlen F + strncasecmp F + strncat F + strncmp F + strncpy F + strndup F + strnlen F + strpbrk F + strptime F + strrchr F + strsep F + strsignal F + strspn F + strstr F + strtod F + strtof F + strtok F + strtok_r F + strtol F + strtold F + strtoll F + strtoq F + strtoul F + strtoull F + strtouq F + strxfrm F + stty F + svc_exit F + svc_fdset D 0x80 + svc_getreq F + svc_getreqset F + svc_register F + svc_run F + svc_sendreply F + svc_unregister F + svcauthdes_stats D 0x18 + svcerr_auth F + svcerr_decode F + svcerr_noproc F + svcerr_noprog F + svcerr_progvers F + svcerr_systemerr F + svcerr_weakauth F + svcfd_create F + svcraw_create F + svctcp_create F + svcudp_bufcreate F + svcudp_create F + svcudp_enablecache F + swab F + swapoff F + swapon F + symlink F + sync F + sys_errlist D 0x3d8 + sys_nerr D 0x4 + sys_sigabbrev D 0x100 + sys_siglist D 0x100 + syscall F + sysconf F + sysctl F + sysinfo F + syslog F + sysmips F + system F + tcdrain F + tcflow F + tcflush F + tcgetattr F + tcgetpgrp F + tcsendbreak F + tcsetattr F + tcsetpgrp F + tdelete F + telldir F + tempnam F + textdomain F + tfind F + time F + timegm F + timelocal F + times F + timezone D 0x8 + tmpfile F + tmpnam F + tmpnam_r F + toascii F + tolower F + toupper F + towctrans F + towlower F + towupper F + tr_break F + truncate F + tsearch F + ttyname F + ttyname_r F + ttyslot F + twalk F + tzname D 0x10 + tzset F + ualarm F + ulckpwdf F + ulimit F + umask F + umount F + uname F + ungetc F + unlink F + unsetenv F + updwtmp F + uselib F + usleep F + ustat F + utime F + utimes F + utmpname F + valloc F + vasprintf F + vdprintf F + verr F + verrx F + vfork F + vfprintf F + vfscanf F + vhangup F + vlimit F + vprintf F + vscanf F + vsnprintf F + vsprintf F + vsscanf F + vsyslog F + vtimes F + vwarn F + vwarnx F + wait F + wait3 F + wait4 F + waitpid F + warn F + warnx F + wcpcpy F + wcpncpy F + wcrtomb F + wcscat F + wcschr F + wcscmp F + wcscoll F + wcscpy F + wcscspn F + wcsdup F + wcslen F + wcsncat F + wcsncmp F + wcsncpy F + wcsnrtombs F + wcspbrk F + wcsrchr F + wcsrtombs F + wcsspn F + wcsstr F + wcstod F + wcstof F + wcstok F + wcstol F + wcstold F + wcstombs F + wcstoq F + wcstoul F + wcstouq F + wcswidth F + wcsxfrm F + wctob F + wctomb F + wctrans F + wctype F + wcwidth F + wmemchr F + wmemcmp F + wmemcpy F + wmemmove F + wmemset F + write F + writev F + xdr_accepted_reply F + xdr_array F + xdr_authunix_parms F + xdr_bool F + xdr_bytes F + xdr_callhdr F + xdr_callmsg F + xdr_char F + xdr_cryptkeyarg F + xdr_cryptkeyarg2 F + xdr_cryptkeyres F + xdr_des_block F + xdr_double F + xdr_enum F + xdr_float F + xdr_free F + xdr_int F + xdr_key_netstarg F + xdr_key_netstres F + xdr_keybuf F + xdr_keystatus F + xdr_long F + xdr_netobj F + xdr_opaque F + xdr_opaque_auth F + xdr_pmap F + xdr_pmaplist F + xdr_pointer F + xdr_reference F + xdr_rejected_reply F + xdr_replymsg F + xdr_rmtcall_args F + xdr_rmtcallres F + xdr_short F + xdr_string F + xdr_u_char F + xdr_u_int F + xdr_u_long F + xdr_u_short F + xdr_union F + xdr_vector F + xdr_void F + xdr_wrapstring F + xdrmem_create F + xdrrec_create F + xdrrec_endofrecord F + xdrrec_eof F + xdrrec_skiprecord F + xdrstdio_create F + xencrypt F + xprt_register F + xprt_unregister F +GLIBC_2.10 + GLIBC_2.10 A + __cxa_at_quick_exit F + __posix_getopt F + accept4 F + endsgent F + fallocate F + fgetsgent F + fgetsgent_r F + getsgent F + getsgent_r F + getsgnam F + getsgnam_r F + malloc_info F + preadv F + preadv64 F + psiginfo F + putsgent F + pwritev F + pwritev64 F + quick_exit F + register_printf_modifier F + register_printf_specifier F + register_printf_type F + setsgent F + sgetsgent F + sgetsgent_r F +GLIBC_2.11 + GLIBC_2.11 A + __longjmp_chk F + execvpe F + fallocate64 F + mkostemps F + mkostemps64 F + mkstemps F + mkstemps64 F +GLIBC_2.12 + GLIBC_2.12 A + ntp_gettimex F + recvmmsg F +GLIBC_2.13 + GLIBC_2.13 A + fanotify_init F + fanotify_mark F + prlimit F + prlimit64 F +GLIBC_2.14 + GLIBC_2.14 A + clock_adjtime F + name_to_handle_at F + open_by_handle_at F + sendmmsg F + setns F + syncfs F +GLIBC_2.15 + GLIBC_2.15 A + __fdelt_chk F + __fdelt_warn F + posix_spawn F + posix_spawnp F + process_vm_readv F + process_vm_writev F + scandirat F + scandirat64 F +GLIBC_2.16 + GLIBC_2.16 A + __poll_chk F + __ppoll_chk F + aligned_alloc F + c16rtomb F + c32rtomb F + mbrtoc16 F + mbrtoc32 F + timespec_get F +GLIBC_2.2 + GLIBC_2.2 A + _Exit F + _IO_2_1_stderr_ D 0xe0 + _IO_2_1_stdin_ D 0xe0 + _IO_2_1_stdout_ D 0xe0 + _IO_adjust_wcolumn F + _IO_do_write F + _IO_fclose F + _IO_fdopen F + _IO_fgetpos F + _IO_fgetpos64 F + _IO_file_attach F + _IO_file_close_it F + _IO_file_finish F + _IO_file_fopen F + _IO_file_init F + _IO_file_overflow F + _IO_file_seekoff F + _IO_file_setbuf F + _IO_file_sync F + _IO_file_underflow F + _IO_file_write F + _IO_file_xsputn F + _IO_fopen F + _IO_free_wbackup_area F + _IO_fsetpos F + _IO_fsetpos64 F + _IO_getline_info F + _IO_init_wmarker F + _IO_iter_begin F + _IO_iter_end F + _IO_iter_file F + _IO_iter_next F + _IO_least_wmarker F + _IO_list_lock F + _IO_list_resetlock F + _IO_list_unlock F + _IO_popen F + _IO_proc_close F + _IO_proc_open F + _IO_seekwmark F + _IO_sputbackwc F + _IO_sungetwc F + _IO_switch_to_main_wget_area F + _IO_switch_to_wbackup_area F + _IO_switch_to_wget_mode F + _IO_unsave_wmarkers F + _IO_wdefault_doallocate F + _IO_wdefault_finish F + _IO_wdefault_pbackfail F + _IO_wdefault_uflow F + _IO_wdefault_xsgetn F + _IO_wdefault_xsputn F + _IO_wdo_write F + _IO_wdoallocbuf F + _IO_wfile_jumps D 0xa8 + _IO_wfile_overflow F + _IO_wfile_seekoff F + _IO_wfile_sync F + _IO_wfile_underflow F + _IO_wfile_xsputn F + _IO_wmarker_delta F + _IO_wsetb F + __asprintf F + __assert F + __backtrace F + __backtrace_symbols F + __backtrace_symbols_fd F + __ctype32_tolower D 0x8 + __ctype32_toupper D 0x8 + __cxa_atexit F + __cxa_finalize F + __cyg_profile_func_enter F + __cyg_profile_func_exit F + __duplocale F + __endmntent F + __fbufsize F + __flbf F + __fpending F + __fpurge F + __freadable F + __freading F + __freelocale F + __fsetlocking F + __fwritable F + __fwriting F + __fxstat64 F + __getmntent_r F + __isalnum_l F + __isalpha_l F + __isascii_l F + __isblank_l F + __iscntrl_l F + __isdigit_l F + __isgraph_l F + __islower_l F + __isprint_l F + __ispunct_l F + __isspace_l F + __isupper_l F + __iswalnum_l F + __iswalpha_l F + __iswblank_l F + __iswcntrl_l F + __iswctype_l F + __iswdigit_l F + __iswgraph_l F + __iswlower_l F + __iswprint_l F + __iswpunct_l F + __iswspace_l F + __iswupper_l F + __iswxdigit_l F + __isxdigit_l F + __key_decryptsession_pk_LOCAL D 0x8 + __key_encryptsession_pk_LOCAL D 0x8 + __key_gendes_LOCAL D 0x8 + __libc_allocate_rtsig F + __libc_current_sigrtmax F + __libc_current_sigrtmin F + __libc_freeres F + __libc_sa_len F + __lxstat64 F + __mempcpy_small F + __newlocale F + __nl_langinfo_l F + __open64 F + __poll F + __pread64 F + __pwrite64 F + __rawmemchr F + __res_init F + __res_nclose F + __res_ninit F + __res_state F + __setmntent F + __signbit F + __signbitf F + __signbitl F + __sigsuspend F + __statfs F + __stpcpy_small F + __strcasecmp_l F + __strcasestr F + __strcoll_l F + __strcpy_small F + __strcspn_c1 F + __strcspn_c2 F + __strcspn_c3 F + __strfmon_l F + __strncasecmp_l F + __strndup F + __strpbrk_c2 F + __strpbrk_c3 F + __strsep_1c F + __strsep_2c F + __strsep_3c F + __strsep_g F + __strspn_c1 F + __strspn_c2 F + __strspn_c3 F + __strtod_l F + __strtof_l F + __strtok_r_1c F + __strtol_l F + __strtold_l F + __strtoll_l F + __strtoul_l F + __strtoull_l F + __strverscmp F + __strxfrm_l F + __sysconf F + __sysctl F + __toascii_l F + __tolower_l F + __toupper_l F + __towctrans F + __towctrans_l F + __towlower_l F + __towupper_l F + __vfork F + __wcscasecmp_l F + __wcscoll_l F + __wcsncasecmp_l F + __wcstod_l F + __wcstof_l F + __wcstol_l F + __wcstold_l F + __wcstoll_l F + __wcstoul_l F + __wcstoull_l F + __wcsxfrm_l F + __wctrans_l F + __wctype_l F + __woverflow F + __wuflow F + __wunderflow F + __xpg_sigpause F + __xstat64 F + _authenticate F + _dl_mcount_wrapper F + _dl_mcount_wrapper_check F + _flushlbf F + _res_hconf D 0x48 + _sys_errlist D 0x2370 + _sys_nerr D 0x4 + _sys_siglist D 0x200 + _test_and_set F + addseverity F + alphasort64 F + argp_err_exit_status D 0x4 + argp_error F + argp_failure F + argp_help F + argp_parse F + argp_program_bug_address D 0x8 + argp_program_version D 0x8 + argp_program_version_hook D 0x8 + argp_state_help F + argp_usage F + authdes_create F + authdes_getucred F + authdes_pk_create F + backtrace F + backtrace_symbols F + backtrace_symbols_fd F + bind_textdomain_codeset F + capget F + capset F + cbc_crypt F + clntunix_create F + creat64 F + dcngettext F + des_setparity F + dngettext F + ecb_crypt F + endutxent F + fattach F + fclose F + fdetach F + fdopen F + ffsl F + ffsll F + fgetc_unlocked F + fgetpos F + fgetpos64 F + fgets_unlocked F + fgetwc F + fgetwc_unlocked F + fgetws F + fgetws_unlocked F + fmemopen F + fmtmsg F + fopen F + fopen64 F + fopencookie F + fputs_unlocked F + fputwc F + fputwc_unlocked F + fputws F + fputws_unlocked F + fread_unlocked F + freopen64 F + fseeko F + fseeko64 F + fsetpos F + fsetpos64 F + fstatfs64 F + fstatvfs F + fstatvfs64 F + ftello F + ftello64 F + ftruncate64 F + ftw64 F + fwide F + fwprintf F + fwrite_unlocked F + fwscanf F + gai_strerror F + getaliasbyname_r F + getaliasent_r F + getcontext F + getdate F + getdate_err D 0x4 + getdate_r F + getdirentries64 F + getgrent_r F + getgrgid_r F + getgrnam_r F + gethostbyaddr_r F + gethostbyname2_r F + gethostbyname_r F + gethostent_r F + getloadavg F + getmsg F + getnameinfo F + getnetbyaddr_r F + getnetbyname_r F + getnetent_r F + getnetname F + getpmsg F + getprotobyname_r F + getprotobynumber_r F + getprotoent_r F + getpt F + getpwent_r F + getpwnam_r F + getpwuid_r F + getrlimit64 F + getrpcbyname_r F + getrpcbynumber_r F + getrpcent_r F + getservbyname_r F + getservbyport_r F + getservent_r F + getspent_r F + getspnam_r F + getutmp F + getutmpx F + getutxent F + getutxid F + getutxline F + getwc F + getwc_unlocked F + getwchar F + getwchar_unlocked F + glob64 F + globfree64 F + gnu_get_libc_release F + gnu_get_libc_version F + grantpt F + host2netname F + iconv F + iconv_close F + iconv_open F + if_freenameindex F + if_indextoname F + if_nameindex F + if_nametoindex F + imaxabs F + imaxdiv F + in6addr_any D 0x10 + in6addr_loopback D 0x10 + iruserok_af F + isastream F + iswblank F + key_decryptsession F + key_decryptsession_pk F + key_encryptsession F + key_encryptsession_pk F + key_gendes F + key_get_conv F + key_secretkey_is_set F + key_setnet F + key_setsecret F + localeconv F + lockf64 F + lseek64 F + makecontext F + mcheck_check_all F + mcheck_pedantic F + mempcpy F + memrchr F + mincore F + mkdtemp F + mkstemp64 F + mmap64 F + moncontrol F + netname2host F + netname2user F + nftw F + nftw64 F + ngettext F + ntp_adjtime F + ntp_gettime F + open64 F + passwd2des F + pclose F + popen F + posix_fadvise F + posix_fadvise64 F + posix_fallocate F + posix_fallocate64 F + posix_madvise F + posix_memalign F + posix_spawn F + posix_spawn_file_actions_addclose F + posix_spawn_file_actions_adddup2 F + posix_spawn_file_actions_addopen F + posix_spawn_file_actions_destroy F + posix_spawn_file_actions_init F + posix_spawnattr_destroy F + posix_spawnattr_getflags F + posix_spawnattr_getpgroup F + posix_spawnattr_getschedparam F + posix_spawnattr_getschedpolicy F + posix_spawnattr_getsigdefault F + posix_spawnattr_getsigmask F + posix_spawnattr_init F + posix_spawnattr_setflags F + posix_spawnattr_setpgroup F + posix_spawnattr_setschedparam F + posix_spawnattr_setschedpolicy F + posix_spawnattr_setsigdefault F + posix_spawnattr_setsigmask F + posix_spawnp F + pread F + pread64 F + printf_size F + printf_size_info F + pthread_attr_init F + ptsname F + ptsname_r F + putgrent F + putmsg F + putpmsg F + pututxline F + putwc F + putwc_unlocked F + putwchar F + putwchar_unlocked F + pwrite F + pwrite64 F + rawmemchr F + rcmd_af F + readdir64 F + readdir64_r F + rexec_af F + rresvport_af F + rtime F + ruserok_af F + scandir64 F + sendfile F + setrlimit64 F + setutxent F + sighold F + sigignore F + sigqueue F + sigrelse F + sigset F + sigtimedwait F + sigwaitinfo F + statfs64 F + statvfs F + statvfs64 F + strcasestr F + strchrnul F + strtoimax F + strtoumax F + strverscmp F + svc_getreq_common F + svc_getreq_poll F + svc_max_pollfd D 0x4 + svc_pollfd D 0x8 + svcunix_create F + svcunixfd_create F + swapcontext F + swprintf F + swscanf F + sys_errlist D 0x2370 + sys_nerr D 0x4 + sys_sigabbrev D 0x200 + sys_siglist D 0x200 + sysv_signal F + tcgetsid F + tdestroy F + tmpfile F + tmpfile64 F + truncate64 F + umount2 F + ungetwc F + unlockpt F + updwtmpx F + user2netname F + utmpxname F + versionsort F + versionsort64 F + vfwprintf F + vfwscanf F + vswprintf F + vswscanf F + vwprintf F + vwscanf F + waitid F + wcscasecmp F + wcschrnul F + wcsftime F + wcsncasecmp F + wcsnlen F + wcstoimax F + wcstoll F + wcstoull F + wcstoumax F + wcswcs F + wmempcpy F + wordexp F + wordfree F + wprintf F + wscanf F + xdecrypt F + xdr_authdes_cred F + xdr_authdes_verf F + xdr_getcredres F + xdr_hyper F + xdr_int16_t F + xdr_int32_t F + xdr_int64_t F + xdr_int8_t F + xdr_longlong_t F + xdr_netnamestr F + xdr_sizeof F + xdr_u_hyper F + xdr_u_longlong_t F + xdr_uint16_t F + xdr_uint32_t F + xdr_uint64_t F + xdr_uint8_t F + xdr_unixcred F +GLIBC_2.2.1 + GLIBC_2.2.1 A + pivot_root F + posix_openpt F +GLIBC_2.2.2 + GLIBC_2.2.2 A + __nss_hostname_digits_dots F +GLIBC_2.2.3 + GLIBC_2.2.3 A + __rpc_thread_createerr F + __rpc_thread_svc_fdset F + __rpc_thread_svc_max_pollfd F + __rpc_thread_svc_pollfd F + fnmatch F + sprofil F +GLIBC_2.2.4 + GLIBC_2.2.4 A + dl_iterate_phdr F + getgrouplist F + sockatmark F +GLIBC_2.2.6 + GLIBC_2.2.6 A + __nanosleep F +GLIBC_2.3 + GLIBC_2.3 A + __ctype_b_loc F + __ctype_tolower_loc F + __ctype_toupper_loc F + __isctype F + __strftime_l F + __uselocale F + __wcsftime_l F + duplocale F + fgetxattr F + flistxattr F + freeifaddrs F + freelocale F + fremovexattr F + fsetxattr F + futimes F + getifaddrs F + getxattr F + isalnum_l F + isalpha_l F + isblank_l F + iscntrl_l F + isctype F + isdigit_l F + isgraph_l F + islower_l F + isprint_l F + ispunct_l F + isspace_l F + isupper_l F + iswalnum_l F + iswalpha_l F + iswblank_l F + iswcntrl_l F + iswctype_l F + iswdigit_l F + iswgraph_l F + iswlower_l F + iswprint_l F + iswpunct_l F + iswspace_l F + iswupper_l F + iswxdigit_l F + isxdigit_l F + lgetxattr F + listxattr F + llistxattr F + lremovexattr F + lsetxattr F + lutimes F + newlocale F + nl_langinfo_l F + readahead F + realpath F + removexattr F + sendfile64 F + setxattr F + strcasecmp_l F + strcoll_l F + strfmon_l F + strftime_l F + strncasecmp_l F + strtod_l F + strtof_l F + strtol_l F + strtold_l F + strtoul_l F + strxfrm_l F + tolower_l F + toupper_l F + towctrans_l F + towlower_l F + towupper_l F + uselocale F + wcscasecmp_l F + wcscoll_l F + wcsftime_l F + wcsncasecmp_l F + wcstod_l F + wcstof_l F + wcstol_l F + wcstold_l F + wcstoll_l F + wcstoul_l F + wcstoull_l F + wcsxfrm_l F + wctrans_l F + wctype_l F +GLIBC_2.3.2 + GLIBC_2.3.2 A + __register_atfork F + epoll_create F + epoll_ctl F + epoll_wait F + lchmod F + pthread_cond_broadcast F + pthread_cond_destroy F + pthread_cond_init F + pthread_cond_signal F + pthread_cond_timedwait F + pthread_cond_wait F + strptime_l F +GLIBC_2.3.3 + GLIBC_2.3.3 A + _sys_siglist D 0x400 + gnu_dev_major F + gnu_dev_makedev F + gnu_dev_minor F + inet6_option_alloc F + inet6_option_append F + inet6_option_find F + inet6_option_init F + inet6_option_next F + inet6_option_space F + nftw F + nftw64 F + remap_file_pages F + sched_getaffinity F + sched_setaffinity F + semtimedop F + strtoll_l F + strtoull_l F + sys_sigabbrev D 0x400 + sys_siglist D 0x400 +GLIBC_2.3.4 + GLIBC_2.3.4 A + __chk_fail F + __fprintf_chk F + __gets_chk F + __memcpy_chk F + __memmove_chk F + __mempcpy_chk F + __memset_chk F + __printf_chk F + __snprintf_chk F + __sprintf_chk F + __stpcpy_chk F + __strcat_chk F + __strcpy_chk F + __strncat_chk F + __strncpy_chk F + __vfprintf_chk F + __vprintf_chk F + __vsnprintf_chk F + __vsprintf_chk F + __xpg_strerror_r F + getipv4sourcefilter F + getsourcefilter F + regexec F + sched_getaffinity F + sched_setaffinity F + setipv4sourcefilter F + setsourcefilter F + xdr_quad_t F + xdr_u_quad_t F +GLIBC_2.4 + GLIBC_2.4 A + __confstr_chk F + __fgets_chk F + __fgets_unlocked_chk F + __fgetws_chk F + __fgetws_unlocked_chk F + __fwprintf_chk F + __fxstatat F + __fxstatat64 F + __getcwd_chk F + __getdomainname_chk F + __getgroups_chk F + __gethostname_chk F + __getlogin_r_chk F + __getwd_chk F + __mbsnrtowcs_chk F + __mbsrtowcs_chk F + __mbstowcs_chk F + __pread64_chk F + __pread_chk F + __ptsname_r_chk F + __read_chk F + __readlink_chk F + __realpath_chk F + __recv_chk F + __recvfrom_chk F + __stack_chk_fail F + __stpncpy_chk F + __swprintf_chk F + __syslog_chk F + __ttyname_r_chk F + __vfwprintf_chk F + __vswprintf_chk F + __vsyslog_chk F + __vwprintf_chk F + __wcpcpy_chk F + __wcpncpy_chk F + __wcrtomb_chk F + __wcscat_chk F + __wcscpy_chk F + __wcsncat_chk F + __wcsncpy_chk F + __wcsnrtombs_chk F + __wcsrtombs_chk F + __wcstombs_chk F + __wctomb_chk F + __wmemcpy_chk F + __wmemmove_chk F + __wmempcpy_chk F + __wmemset_chk F + __wprintf_chk F + __xmknodat F + eaccess F + faccessat F + fchmodat F + fchownat F + fdopendir F + futimesat F + inotify_add_watch F + inotify_init F + inotify_rm_watch F + linkat F + mkdirat F + mkfifoat F + open_wmemstream F + openat F + openat64 F + ppoll F + readlinkat F + renameat F + symlinkat F + unlinkat F + unshare F +GLIBC_2.5 + GLIBC_2.5 A + __readlinkat_chk F + inet6_opt_append F + inet6_opt_find F + inet6_opt_finish F + inet6_opt_get_val F + inet6_opt_init F + inet6_opt_next F + inet6_opt_set_val F + inet6_rth_add F + inet6_rth_getaddr F + inet6_rth_init F + inet6_rth_reverse F + inet6_rth_segments F + inet6_rth_space F + splice F + tee F + vmsplice F +GLIBC_2.6 + GLIBC_2.6 A + __sched_cpucount F + epoll_pwait F + futimens F + sched_getcpu F + strerror_l F + sync_file_range F + utimensat F +GLIBC_2.7 + GLIBC_2.7 A + __fread_chk F + __fread_unlocked_chk F + __isoc99_fscanf F + __isoc99_fwscanf F + __isoc99_scanf F + __isoc99_sscanf F + __isoc99_swscanf F + __isoc99_vfscanf F + __isoc99_vfwscanf F + __isoc99_vscanf F + __isoc99_vsscanf F + __isoc99_vswscanf F + __isoc99_vwscanf F + __isoc99_wscanf F + __open64_2 F + __open_2 F + __openat64_2 F + __openat_2 F + __sched_cpualloc F + __sched_cpufree F + eventfd F + eventfd_read F + eventfd_write F + mkostemp F + mkostemp64 F + signalfd F +GLIBC_2.8 + GLIBC_2.8 A + __asprintf_chk F + __dprintf_chk F + __obstack_printf_chk F + __obstack_vprintf_chk F + __vasprintf_chk F + __vdprintf_chk F + qsort_r F + timerfd_create F + timerfd_gettime F + timerfd_settime F +GLIBC_2.9 + GLIBC_2.9 A + dup3 F + epoll_create1 F + inotify_init1 F + pipe2 F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libcrypt.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libcrypt.abilist new file mode 100644 index 0000000000..1df145f260 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libcrypt.abilist @@ -0,0 +1,9 @@ +GLIBC_2.0 + GLIBC_2.0 A + crypt F + crypt_r F + encrypt F + encrypt_r F + fcrypt F + setkey F + setkey_r F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libdl.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libdl.abilist new file mode 100644 index 0000000000..57c2492e1f --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libdl.abilist @@ -0,0 +1,18 @@ +GLIBC_2.0 + GLIBC_2.0 A + dladdr F + dlclose F + dlerror F + dlopen F + dlsym F +GLIBC_2.2 + GLIBC_2.2 A + dlopen F + dlvsym F +GLIBC_2.3.3 + GLIBC_2.3.3 A + dladdr1 F + dlinfo F +GLIBC_2.3.4 + GLIBC_2.3.4 A + dlmopen F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libm.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libm.abilist new file mode 100644 index 0000000000..064eeba0b1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libm.abilist @@ -0,0 +1,403 @@ +GLIBC_2.0 + GLIBC_2.0 A + _LIB_VERSION D 0x4 + acos F + acosf F + acosh F + acoshf F + acoshl F + acosl F + asin F + asinf F + asinh F + asinhf F + asinhl F + asinl F + atan F + atan2 F + atan2f F + atan2l F + atanf F + atanh F + atanhf F + atanhl F + atanl F + cbrt F + cbrtf F + cbrtl F + ceil F + ceilf F + ceill F + copysign F + copysignf F + copysignl F + cos F + cosf F + cosh F + coshf F + coshl F + cosl F + drem F + dremf F + dreml F + erf F + erfc F + erfcf F + erfcl F + erff F + erfl F + exp F + expf F + expl F + expm1 F + expm1f F + expm1l F + fabs F + fabsf F + fabsl F + finite F + finitef F + finitel F + floor F + floorf F + floorl F + fmod F + fmodf F + fmodl F + frexp F + frexpf F + frexpl F + gamma F + gammaf F + gammal F + hypot F + hypotf F + hypotl F + ilogb F + ilogbf F + ilogbl F + j0 F + j0f F + j0l F + j1 F + j1f F + j1l F + jn F + jnf F + jnl F + ldexp F + ldexpf F + ldexpl F + lgamma F + lgamma_r F + lgammaf F + lgammaf_r F + lgammal F + lgammal_r F + log F + log10 F + log10f F + log10l F + log1p F + log1pf F + log1pl F + logb F + logbf F + logbl F + logf F + logl F + matherr F + modf F + modff F + modfl F + nextafter F + nextafterf F + nextafterl F + pow F + powf F + powl F + remainder F + remainderf F + remainderl F + rint F + rintf F + rintl F + scalb F + scalbf F + scalbl F + scalbn F + scalbnf F + scalbnl F + signgam D 0x4 + significand F + significandf F + significandl F + sin F + sinf F + sinh F + sinhf F + sinhl F + sinl F + sqrt F + sqrtf F + sqrtl F + tan F + tanf F + tanh F + tanhf F + tanhl F + tanl F + y0 F + y0f F + y0l F + y1 F + y1f F + y1l F + yn F + ynf F + ynl F +GLIBC_2.15 + GLIBC_2.15 A + __acos_finite F + __acosf_finite F + __acosh_finite F + __acoshf_finite F + __acoshl_finite F + __acosl_finite F + __asin_finite F + __asinf_finite F + __asinl_finite F + __atan2_finite F + __atan2f_finite F + __atan2l_finite F + __atanh_finite F + __atanhf_finite F + __atanhl_finite F + __cosh_finite F + __coshf_finite F + __coshl_finite F + __exp10_finite F + __exp10f_finite F + __exp10l_finite F + __exp2_finite F + __exp2f_finite F + __exp2l_finite F + __exp_finite F + __expf_finite F + __expl_finite F + __fmod_finite F + __fmodf_finite F + __fmodl_finite F + __gamma_r_finite F + __gammaf_r_finite F + __gammal_r_finite F + __hypot_finite F + __hypotf_finite F + __hypotl_finite F + __j0_finite F + __j0f_finite F + __j0l_finite F + __j1_finite F + __j1f_finite F + __j1l_finite F + __jn_finite F + __jnf_finite F + __jnl_finite F + __lgamma_r_finite F + __lgammaf_r_finite F + __lgammal_r_finite F + __log10_finite F + __log10f_finite F + __log10l_finite F + __log2_finite F + __log2f_finite F + __log2l_finite F + __log_finite F + __logf_finite F + __logl_finite F + __pow_finite F + __powf_finite F + __powl_finite F + __remainder_finite F + __remainderf_finite F + __remainderl_finite F + __scalb_finite F + __scalbf_finite F + __scalbl_finite F + __sinh_finite F + __sinhf_finite F + __sinhl_finite F + __sqrt_finite F + __sqrtf_finite F + __sqrtl_finite F + __y0_finite F + __y0f_finite F + __y0l_finite F + __y1_finite F + __y1f_finite F + __y1l_finite F + __yn_finite F + __ynf_finite F + __ynl_finite F +GLIBC_2.2 + GLIBC_2.2 A + __clog10 F + __clog10f F + __clog10l F + __finite F + __finitef F + __finitel F + __fpclassify F + __fpclassifyf F + __fpclassifyl F + __signbit F + __signbitf F + __signbitl F + cabs F + cabsf F + cabsl F + cacos F + cacosf F + cacosh F + cacoshf F + cacoshl F + cacosl F + carg F + cargf F + cargl F + casin F + casinf F + casinh F + casinhf F + casinhl F + casinl F + catan F + catanf F + catanh F + catanhf F + catanhl F + catanl F + ccos F + ccosf F + ccosh F + ccoshf F + ccoshl F + ccosl F + cexp F + cexpf F + cexpl F + cimag F + cimagf F + cimagl F + clog F + clog10 F + clog10f F + clog10l F + clogf F + clogl F + conj F + conjf F + conjl F + cpow F + cpowf F + cpowl F + cproj F + cprojf F + cprojl F + creal F + crealf F + creall F + csin F + csinf F + csinh F + csinhf F + csinhl F + csinl F + csqrt F + csqrtf F + csqrtl F + ctan F + ctanf F + ctanh F + ctanhf F + ctanhl F + ctanl F + exp10 F + exp10f F + exp10l F + exp2 F + exp2f F + exp2l F + fdim F + fdimf F + fdiml F + feclearexcept F + fedisableexcept F + feenableexcept F + fegetenv F + fegetexcept F + fegetexceptflag F + fegetround F + feholdexcept F + feraiseexcept F + fesetenv F + fesetexceptflag F + fesetround F + fetestexcept F + feupdateenv F + fma F + fmaf F + fmal F + fmax F + fmaxf F + fmaxl F + fmin F + fminf F + fminl F + llrint F + llrintf F + llrintl F + llround F + llroundf F + llroundl F + log2 F + log2f F + log2l F + lrint F + lrintf F + lrintl F + lround F + lroundf F + lroundl F + nan F + nanf F + nanl F + nearbyint F + nearbyintf F + nearbyintl F + nexttoward F + nexttowardf F + nexttowardl F + pow10 F + pow10f F + pow10l F + remquo F + remquof F + remquol F + round F + roundf F + roundl F + scalbln F + scalblnf F + scalblnl F + sincos F + sincosf F + sincosl F + tgamma F + tgammaf F + tgammal F + trunc F + truncf F + truncl F +GLIBC_2.4 + GLIBC_2.4 A diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libnsl.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libnsl.abilist new file mode 100644 index 0000000000..b38ad63e0d --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libnsl.abilist @@ -0,0 +1,125 @@ +GLIBC_2.0 + GLIBC_2.0 A + __yp_check F + xdr_domainname F + xdr_keydat F + xdr_mapname F + xdr_peername F + xdr_valdat F + xdr_yp_buf F + xdr_ypbind_binding F + xdr_ypbind_resp F + xdr_ypbind_resptype F + xdr_ypbind_setdom F + xdr_ypdelete_args F + xdr_ypmap_parms F + xdr_ypmaplist F + xdr_yppush_status F + xdr_yppushresp_xfr F + xdr_ypreq_key F + xdr_ypreq_nokey F + xdr_ypreq_xfr F + xdr_ypresp_all F + xdr_ypresp_key_val F + xdr_ypresp_maplist F + xdr_ypresp_master F + xdr_ypresp_order F + xdr_ypresp_val F + xdr_ypresp_xfr F + xdr_ypstat F + xdr_ypupdate_args F + xdr_ypxfrstat F + yp_all F + yp_bind F + yp_first F + yp_get_default_domain F + yp_maplist F + yp_master F + yp_match F + yp_next F + yp_order F + yp_unbind F + yp_update F + ypbinderr_string F + yperr_string F + ypprot_err F +GLIBC_2.2 + GLIBC_2.2 A + __free_fdresult F + __nis_default_access F + __nis_default_group F + __nis_default_owner F + __nis_default_ttl F + __nis_finddirectory F + __nis_hash F + __nisbind_connect F + __nisbind_create F + __nisbind_destroy F + __nisbind_next F + nis_add F + nis_add_entry F + nis_addmember F + nis_checkpoint F + nis_clone_directory F + nis_clone_object F + nis_clone_result F + nis_creategroup F + nis_destroy_object F + nis_destroygroup F + nis_dir_cmp F + nis_domain_of F + nis_domain_of_r F + nis_first_entry F + nis_free_directory F + nis_free_object F + nis_free_request F + nis_freenames F + nis_freeresult F + nis_freeservlist F + nis_freetags F + nis_getnames F + nis_getservlist F + nis_ismember F + nis_leaf_of F + nis_leaf_of_r F + nis_lerror F + nis_list F + nis_local_directory F + nis_local_group F + nis_local_host F + nis_local_principal F + nis_lookup F + nis_mkdir F + nis_modify F + nis_modify_entry F + nis_name_of F + nis_name_of_r F + nis_next_entry F + nis_perror F + nis_ping F + nis_print_directory F + nis_print_entry F + nis_print_group F + nis_print_group_entry F + nis_print_link F + nis_print_object F + nis_print_result F + nis_print_rights F + nis_print_table F + nis_read_obj F + nis_remove F + nis_remove_entry F + nis_removemember F + nis_rmdir F + nis_servstate F + nis_sperrno F + nis_sperror F + nis_sperror_r F + nis_stats F + nis_verifygroup F + nis_write_obj F + readColdStartFile F + writeColdStartFile F + xdr_cback_data F + xdr_obj_p F + xdr_ypall F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libpthread.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libpthread.abilist new file mode 100644 index 0000000000..4e0b07f698 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libpthread.abilist @@ -0,0 +1,263 @@ +GLIBC_2.0 + GLIBC_2.0 A + _IO_flockfile F + _IO_ftrylockfile F + _IO_funlockfile F + __close F + __connect F + __errno_location F + __fcntl F + __fork F + __h_errno_location F + __lseek F + __open F + __pthread_getspecific F + __pthread_key_create F + __pthread_mutex_destroy F + __pthread_mutex_init F + __pthread_mutex_lock F + __pthread_mutex_trylock F + __pthread_mutex_unlock F + __pthread_mutexattr_destroy F + __pthread_mutexattr_init F + __pthread_mutexattr_settype F + __pthread_once F + __pthread_setspecific F + __read F + __send F + __sigaction F + __wait F + __write F + _pthread_cleanup_pop F + _pthread_cleanup_pop_restore F + _pthread_cleanup_push F + _pthread_cleanup_push_defer F + accept F + close F + connect F + fcntl F + flockfile F + fork F + fsync F + ftrylockfile F + funlockfile F + longjmp F + lseek F + msync F + nanosleep F + open F + pause F + pthread_atfork F + pthread_attr_destroy F + pthread_attr_getdetachstate F + pthread_attr_getinheritsched F + pthread_attr_getschedparam F + pthread_attr_getschedpolicy F + pthread_attr_getscope F + pthread_attr_init F + pthread_attr_setdetachstate F + pthread_attr_setinheritsched F + pthread_attr_setschedparam F + pthread_attr_setschedpolicy F + pthread_attr_setscope F + pthread_cancel F + pthread_cond_broadcast F + pthread_cond_destroy F + pthread_cond_init F + pthread_cond_signal F + pthread_cond_timedwait F + pthread_cond_wait F + pthread_condattr_destroy F + pthread_condattr_init F + pthread_create F + pthread_detach F + pthread_equal F + pthread_exit F + pthread_getschedparam F + pthread_getspecific F + pthread_join F + pthread_key_create F + pthread_key_delete F + pthread_kill F + pthread_kill_other_threads_np F + pthread_mutex_destroy F + pthread_mutex_init F + pthread_mutex_lock F + pthread_mutex_trylock F + pthread_mutex_unlock F + pthread_mutexattr_destroy F + pthread_mutexattr_getkind_np F + pthread_mutexattr_init F + pthread_mutexattr_setkind_np F + pthread_once F + pthread_self F + pthread_setcancelstate F + pthread_setcanceltype F + pthread_setschedparam F + pthread_setspecific F + pthread_sigmask F + pthread_testcancel F + raise F + read F + recv F + recvfrom F + recvmsg F + sem_destroy F + sem_getvalue F + sem_init F + sem_post F + sem_trywait F + sem_wait F + send F + sendmsg F + sendto F + sigaction F + siglongjmp F + sigwait F + system F + tcdrain F + vfork F + wait F + waitpid F + write F +GLIBC_2.11 + GLIBC_2.11 A + pthread_sigqueue F +GLIBC_2.12 + GLIBC_2.12 A + pthread_getname_np F + pthread_mutex_consistent F + pthread_mutexattr_getrobust F + pthread_mutexattr_setrobust F + pthread_setname_np F +GLIBC_2.2 + GLIBC_2.2 A + __libc_allocate_rtsig F + __libc_current_sigrtmax F + __libc_current_sigrtmin F + __open64 F + __pread64 F + __pthread_rwlock_destroy F + __pthread_rwlock_init F + __pthread_rwlock_rdlock F + __pthread_rwlock_tryrdlock F + __pthread_rwlock_trywrlock F + __pthread_rwlock_unlock F + __pthread_rwlock_wrlock F + __pwrite64 F + __res_state F + __vfork F + lseek64 F + open64 F + pread F + pread64 F + pthread_attr_getguardsize F + pthread_attr_getstack F + pthread_attr_getstackaddr F + pthread_attr_getstacksize F + pthread_attr_init F + pthread_attr_setguardsize F + pthread_attr_setstack F + pthread_attr_setstackaddr F + pthread_attr_setstacksize F + pthread_barrier_destroy F + pthread_barrier_init F + pthread_barrier_wait F + pthread_barrierattr_destroy F + pthread_barrierattr_init F + pthread_barrierattr_setpshared F + pthread_condattr_getpshared F + pthread_condattr_setpshared F + pthread_create F + pthread_getconcurrency F + pthread_getcpuclockid F + pthread_mutex_timedlock F + pthread_mutexattr_getpshared F + pthread_mutexattr_gettype F + pthread_mutexattr_setpshared F + pthread_mutexattr_settype F + pthread_rwlock_destroy F + pthread_rwlock_init F + pthread_rwlock_rdlock F + pthread_rwlock_timedrdlock F + pthread_rwlock_timedwrlock F + pthread_rwlock_tryrdlock F + pthread_rwlock_trywrlock F + pthread_rwlock_unlock F + pthread_rwlock_wrlock F + pthread_rwlockattr_destroy F + pthread_rwlockattr_getkind_np F + pthread_rwlockattr_getpshared F + pthread_rwlockattr_init F + pthread_rwlockattr_setkind_np F + pthread_rwlockattr_setpshared F + pthread_setconcurrency F + pthread_spin_destroy F + pthread_spin_init F + pthread_spin_lock F + pthread_spin_trylock F + pthread_spin_unlock F + pthread_yield F + pwrite F + pwrite64 F + sem_close F + sem_destroy F + sem_getvalue F + sem_init F + sem_open F + sem_post F + sem_timedwait F + sem_trywait F + sem_unlink F + sem_wait F +GLIBC_2.2.3 + GLIBC_2.2.3 A + pthread_getattr_np F +GLIBC_2.2.6 + GLIBC_2.2.6 A + __nanosleep F +GLIBC_2.3.2 + GLIBC_2.3.2 A + pthread_cond_broadcast F + pthread_cond_destroy F + pthread_cond_init F + pthread_cond_signal F + pthread_cond_timedwait F + pthread_cond_wait F +GLIBC_2.3.3 + GLIBC_2.3.3 A + __pthread_cleanup_routine F + __pthread_register_cancel F + __pthread_register_cancel_defer F + __pthread_unregister_cancel F + __pthread_unregister_cancel_restore F + __pthread_unwind_next F + pthread_attr_getaffinity_np F + pthread_attr_setaffinity_np F + pthread_attr_setstack F + pthread_attr_setstacksize F + pthread_barrierattr_getpshared F + pthread_condattr_getclock F + pthread_condattr_setclock F + pthread_getaffinity_np F + pthread_setaffinity_np F + pthread_timedjoin_np F + pthread_tryjoin_np F +GLIBC_2.3.4 + GLIBC_2.3.4 A + pthread_attr_getaffinity_np F + pthread_attr_setaffinity_np F + pthread_getaffinity_np F + pthread_setaffinity_np F + pthread_setschedprio F +GLIBC_2.4 + GLIBC_2.4 A + pthread_mutex_consistent_np F + pthread_mutex_getprioceiling F + pthread_mutex_setprioceiling F + pthread_mutexattr_getprioceiling F + pthread_mutexattr_getprotocol F + pthread_mutexattr_getrobust_np F + pthread_mutexattr_setprioceiling F + pthread_mutexattr_setprotocol F + pthread_mutexattr_setrobust_np F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libresolv.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libresolv.abilist new file mode 100644 index 0000000000..808d0f2f74 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libresolv.abilist @@ -0,0 +1,104 @@ +GLIBC_2.0 + GLIBC_2.0 A + __b64_ntop F + __b64_pton F + __dn_comp F + __dn_count_labels F + __dn_skipname F + __fp_nquery F + __fp_query F + __fp_resstat F + __hostalias F + __loc_aton F + __loc_ntoa F + __p_cdname F + __p_cdnname F + __p_class F + __p_class_syms D 0xa8 + __p_fqname F + __p_fqnname F + __p_option F + __p_query F + __p_secstodate F + __p_time F + __p_type F + __p_type_syms D 0x450 + __putlong F + __putshort F + __res_close F + __res_dnok F + __res_hnok F + __res_isourserver F + __res_mailok F + __res_nameinquery F + __res_ownok F + __res_queriesmatch F + __res_send F + __sym_ntop F + __sym_ntos F + __sym_ston F + _gethtbyaddr F + _gethtbyname F + _gethtbyname2 F + _gethtent F + _getlong F + _getshort F + _res_opcodes D 0x80 + _sethtent F + dn_expand F + inet_net_ntop F + inet_net_pton F + inet_neta F + res_gethostbyaddr F + res_gethostbyname F + res_gethostbyname2 F + res_mkquery F + res_query F + res_querydomain F + res_search F + res_send_setqhook F + res_send_setrhook F +GLIBC_2.2 + GLIBC_2.2 A + __dn_expand F + __res_hostalias F + __res_mkquery F + __res_nmkquery F + __res_nquery F + __res_nquerydomain F + __res_nsearch F + __res_nsend F + __res_query F + __res_querydomain F + __res_search F +GLIBC_2.3.2 + GLIBC_2.3.2 A + __p_rcode F +GLIBC_2.9 + GLIBC_2.9 A + ns_datetosecs F + ns_format_ttl F + ns_get16 F + ns_get32 F + ns_initparse F + ns_makecanon F + ns_msg_getflag F + ns_name_compress F + ns_name_ntol F + ns_name_ntop F + ns_name_pack F + ns_name_pton F + ns_name_rollback F + ns_name_skip F + ns_name_uncompress F + ns_name_unpack F + ns_parse_ttl F + ns_parserr F + ns_put16 F + ns_put32 F + ns_samedomain F + ns_samename F + ns_skiprr F + ns_sprintrr F + ns_sprintrrf F + ns_subdomain F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/librt.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/librt.abilist new file mode 100644 index 0000000000..e091de0638 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/librt.abilist @@ -0,0 +1,50 @@ +GLIBC_2.2 + GLIBC_2.2 A + aio_cancel F + aio_cancel64 F + aio_error F + aio_error64 F + aio_fsync F + aio_fsync64 F + aio_init F + aio_read F + aio_read64 F + aio_return F + aio_return64 F + aio_suspend F + aio_suspend64 F + aio_write F + aio_write64 F + clock_getcpuclockid F + clock_getres F + clock_gettime F + clock_nanosleep F + clock_settime F + lio_listio F + lio_listio64 F + shm_open F + shm_unlink F + timer_create F + timer_delete F + timer_getoverrun F + timer_gettime F + timer_settime F +GLIBC_2.3.4 + GLIBC_2.3.4 A + mq_close F + mq_getattr F + mq_notify F + mq_open F + mq_receive F + mq_send F + mq_setattr F + mq_timedreceive F + mq_timedsend F + mq_unlink F +GLIBC_2.4 + GLIBC_2.4 A + lio_listio F + lio_listio64 F +GLIBC_2.7 + GLIBC_2.7 A + __mq_open_2 F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libthread_db.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libthread_db.abilist new file mode 100644 index 0000000000..f33138067c --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libthread_db.abilist @@ -0,0 +1,48 @@ +GLIBC_2.1.3 + GLIBC_2.1.3 A + td_init F + td_log F + td_ta_clear_event F + td_ta_delete F + td_ta_enable_stats F + td_ta_event_addr F + td_ta_event_getmsg F + td_ta_get_nthreads F + td_ta_get_ph F + td_ta_get_stats F + td_ta_map_id2thr F + td_ta_map_lwp2thr F + td_ta_new F + td_ta_reset_stats F + td_ta_set_event F + td_ta_setconcurrency F + td_ta_thr_iter F + td_ta_tsd_iter F + td_thr_clear_event F + td_thr_dbresume F + td_thr_dbsuspend F + td_thr_event_enable F + td_thr_event_getmsg F + td_thr_get_info F + td_thr_getfpregs F + td_thr_getgregs F + td_thr_getxregs F + td_thr_getxregsize F + td_thr_set_event F + td_thr_setfpregs F + td_thr_setgregs F + td_thr_setprio F + td_thr_setsigpending F + td_thr_setxregs F + td_thr_sigsetmask F + td_thr_tsd F + td_thr_validate F +GLIBC_2.2.3 + GLIBC_2.2.3 A + td_symbol_list F +GLIBC_2.3 + GLIBC_2.3 A + td_thr_tls_get_addr F +GLIBC_2.3.3 + GLIBC_2.3.3 A + td_thr_tlsbase F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libutil.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libutil.abilist new file mode 100644 index 0000000000..7422687e3c --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libutil.abilist @@ -0,0 +1,8 @@ +GLIBC_2.0 + GLIBC_2.0 A + forkpty F + login F + login_tty F + logout F + logwtmp F + openpty F From cae2bdf1f3bdfc901279c5d5ca0c696eb666d9a3 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 28 Apr 2012 15:09:57 +0200 Subject: [PATCH 4333/4487] m68k: add abilist files --- ChangeLog.m68k | 49 + .../sysv/linux/m68k/coldfire/nptl/ld.abilist | 12 + .../coldfire/nptl/libBrokenLocale.abilist | 3 + .../linux/m68k/coldfire/nptl/libanl.abilist | 6 + .../linux/m68k/coldfire/nptl/libc.abilist | 2111 +++++++++++++++ .../linux/m68k/coldfire/nptl/libcrypt.abilist | 9 + .../linux/m68k/coldfire/nptl/libdl.abilist | 11 + .../linux/m68k/coldfire/nptl/libm.abilist | 370 +++ .../linux/m68k/coldfire/nptl/libnsl.abilist | 123 + .../m68k/coldfire/nptl/libpthread.abilist | 229 ++ .../m68k/coldfire/nptl/libresolv.abilist | 95 + .../linux/m68k/coldfire/nptl/librt.abilist | 44 + .../m68k/coldfire/nptl/libthread_db.abilist | 42 + .../linux/m68k/coldfire/nptl/libutil.abilist | 8 + .../sysv/linux/m68k/m680x0/nptl/ld.abilist | 18 + .../m68k/m680x0/nptl/libBrokenLocale.abilist | 3 + .../linux/m68k/m680x0/nptl/libanl.abilist | 6 + .../sysv/linux/m68k/m680x0/nptl/libc.abilist | 2282 +++++++++++++++++ .../linux/m68k/m680x0/nptl/libcrypt.abilist | 9 + .../sysv/linux/m68k/m680x0/nptl/libdl.abilist | 18 + .../sysv/linux/m68k/m680x0/nptl/libm.abilist | 412 +++ .../linux/m68k/m680x0/nptl/libnsl.abilist | 127 + .../linux/m68k/m680x0/nptl/libpthread.abilist | 267 ++ .../linux/m68k/m680x0/nptl/libresolv.abilist | 104 + .../sysv/linux/m68k/m680x0/nptl/librt.abilist | 52 + .../m68k/m680x0/nptl/libthread_db.abilist | 48 + .../linux/m68k/m680x0/nptl/libutil.abilist | 8 + 27 files changed, 6466 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/m68k/coldfire/nptl/ld.abilist create mode 100644 sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libBrokenLocale.abilist create mode 100644 sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libanl.abilist create mode 100644 sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libc.abilist create mode 100644 sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libcrypt.abilist create mode 100644 sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libdl.abilist create mode 100644 sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libm.abilist create mode 100644 sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libnsl.abilist create mode 100644 sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libpthread.abilist create mode 100644 sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libresolv.abilist create mode 100644 sysdeps/unix/sysv/linux/m68k/coldfire/nptl/librt.abilist create mode 100644 sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libthread_db.abilist create mode 100644 sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libutil.abilist create mode 100644 sysdeps/unix/sysv/linux/m68k/m680x0/nptl/ld.abilist create mode 100644 sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libBrokenLocale.abilist create mode 100644 sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libanl.abilist create mode 100644 sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libc.abilist create mode 100644 sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libcrypt.abilist create mode 100644 sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libdl.abilist create mode 100644 sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libm.abilist create mode 100644 sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libnsl.abilist create mode 100644 sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libpthread.abilist create mode 100644 sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libresolv.abilist create mode 100644 sysdeps/unix/sysv/linux/m68k/m680x0/nptl/librt.abilist create mode 100644 sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libthread_db.abilist create mode 100644 sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libutil.abilist diff --git a/ChangeLog.m68k b/ChangeLog.m68k index d6e2dd6f67..613a8408f9 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,52 @@ +2012-04-28 Andreas Schwab + + * sysdeps/unix/sysv/linux/m68k/coldfire/nptl/ld.abilist: New file. + * sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libBrokenLocale.abilist: + * sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libanl.abilist: New + file. + * sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libc.abilist: New + file. + * sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libcrypt.abilist: New + file. + * sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libdl.abilist: New + file. + * sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libm.abilist: New + file. + * sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libnsl.abilist: New + file. + * sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libpthread.abilist: + New file. + * sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libresolv.abilist: + New file. + * sysdeps/unix/sysv/linux/m68k/coldfire/nptl/librt.abilist: New + file. + * sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libthread_db.abilist: + New file. + * sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libutil.abilist: New + file. + * sysdeps/unix/sysv/linux/m68k/m680x0/nptl/ld.abilist: New file. + * sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libBrokenLocale.abilist: + * sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libanl.abilist: New + file. + * sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libc.abilist: New file. + * sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libcrypt.abilist: New + file. + * sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libdl.abilist: New + file. + * sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libm.abilist: New file. + * sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libnsl.abilist: New + file. + * sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libpthread.abilist: New + file. + * sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libresolv.abilist: New + file. + * sysdeps/unix/sysv/linux/m68k/m680x0/nptl/librt.abilist: New + file. + * sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libthread_db.abilist: + New file. + * sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libutil.abilist: New + file. + 2012-04-26 Siddhesh Poyarekar * sysdeps/m68k/libgcc_s.h: Remove. diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/ld.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/ld.abilist new file mode 100644 index 0000000000..8eac745dd1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/ld.abilist @@ -0,0 +1,12 @@ +GLIBC_2.4 + GLIBC_2.4 A + __libc_memalign F + __libc_stack_end D 0x4 + __stack_chk_guard D 0x4 + __tls_get_addr F + _dl_mcount F + _r_debug D 0x14 + calloc F + free F + malloc F + realloc F diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libBrokenLocale.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libBrokenLocale.abilist new file mode 100644 index 0000000000..9c795c6e96 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libBrokenLocale.abilist @@ -0,0 +1,3 @@ +GLIBC_2.4 + GLIBC_2.4 A + __ctype_get_mb_cur_max F diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libanl.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libanl.abilist new file mode 100644 index 0000000000..e10833ed25 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libanl.abilist @@ -0,0 +1,6 @@ +GLIBC_2.4 + GLIBC_2.4 A + gai_cancel F + gai_error F + gai_suspend F + getaddrinfo_a F diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libc.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libc.abilist new file mode 100644 index 0000000000..8eeac7b5fc --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libc.abilist @@ -0,0 +1,2111 @@ +GLIBC_2.10 + GLIBC_2.10 A + __cxa_at_quick_exit F + __posix_getopt F + accept4 F + endsgent F + fallocate F + fgetsgent F + fgetsgent_r F + getsgent F + getsgent_r F + getsgnam F + getsgnam_r F + malloc_info F + preadv F + preadv64 F + psiginfo F + putsgent F + pwritev F + pwritev64 F + quick_exit F + register_printf_modifier F + register_printf_specifier F + register_printf_type F + setsgent F + sgetsgent F + sgetsgent_r F +GLIBC_2.11 + GLIBC_2.11 A + __longjmp_chk F + execvpe F + fallocate64 F + mkostemps F + mkostemps64 F + mkstemps F + mkstemps64 F +GLIBC_2.12 + GLIBC_2.12 A + __m68k_read_tp F + _sys_errlist D 0x21c + _sys_nerr D 0x4 + ntp_gettimex F + recvmmsg F + sys_errlist D 0x21c + sys_nerr D 0x4 +GLIBC_2.13 + GLIBC_2.13 A + fanotify_init F + fanotify_mark F + prlimit F + prlimit64 F +GLIBC_2.14 + GLIBC_2.14 A + clock_adjtime F + name_to_handle_at F + open_by_handle_at F + sendmmsg F + setns F + syncfs F +GLIBC_2.15 + GLIBC_2.15 A + __fdelt_chk F + __fdelt_warn F + posix_spawn F + posix_spawnp F + process_vm_readv F + process_vm_writev F + scandirat F + scandirat64 F +GLIBC_2.16 + GLIBC_2.16 A + __poll_chk F + __ppoll_chk F + aligned_alloc F + c16rtomb F + c32rtomb F + mbrtoc16 F + mbrtoc32 F + timespec_get F +GLIBC_2.4 + GLIBC_2.4 A + _Exit F + _IO_2_1_stderr_ D 0x98 + _IO_2_1_stdin_ D 0x98 + _IO_2_1_stdout_ D 0x98 + _IO_adjust_column F + _IO_adjust_wcolumn F + _IO_default_doallocate F + _IO_default_finish F + _IO_default_pbackfail F + _IO_default_uflow F + _IO_default_xsgetn F + _IO_default_xsputn F + _IO_do_write F + _IO_doallocbuf F + _IO_fclose F + _IO_fdopen F + _IO_feof F + _IO_ferror F + _IO_fflush F + _IO_fgetpos F + _IO_fgetpos64 F + _IO_fgets F + _IO_file_attach F + _IO_file_close F + _IO_file_close_it F + _IO_file_doallocate F + _IO_file_finish F + _IO_file_fopen F + _IO_file_init F + _IO_file_jumps D 0x54 + _IO_file_open F + _IO_file_overflow F + _IO_file_read F + _IO_file_seek F + _IO_file_seekoff F + _IO_file_setbuf F + _IO_file_stat F + _IO_file_sync F + _IO_file_underflow F + _IO_file_write F + _IO_file_xsputn F + _IO_flockfile F + _IO_flush_all F + _IO_flush_all_linebuffered F + _IO_fopen F + _IO_fprintf F + _IO_fputs F + _IO_fread F + _IO_free_backup_area F + _IO_free_wbackup_area F + _IO_fsetpos F + _IO_fsetpos64 F + _IO_ftell F + _IO_ftrylockfile F + _IO_funlockfile F + _IO_fwrite F + _IO_getc F + _IO_getline F + _IO_getline_info F + _IO_gets F + _IO_init F + _IO_init_marker F + _IO_init_wmarker F + _IO_iter_begin F + _IO_iter_end F + _IO_iter_file F + _IO_iter_next F + _IO_least_wmarker F + _IO_link_in F + _IO_list_all D 0x4 + _IO_list_lock F + _IO_list_resetlock F + _IO_list_unlock F + _IO_marker_delta F + _IO_marker_difference F + _IO_padn F + _IO_peekc_locked F + _IO_popen F + _IO_printf F + _IO_proc_close F + _IO_proc_open F + _IO_putc F + _IO_puts F + _IO_remove_marker F + _IO_seekmark F + _IO_seekoff F + _IO_seekpos F + _IO_seekwmark F + _IO_setb F + _IO_setbuffer F + _IO_setvbuf F + _IO_sgetn F + _IO_sprintf F + _IO_sputbackc F + _IO_sputbackwc F + _IO_sscanf F + _IO_str_init_readonly F + _IO_str_init_static F + _IO_str_overflow F + _IO_str_pbackfail F + _IO_str_seekoff F + _IO_str_underflow F + _IO_sungetc F + _IO_sungetwc F + _IO_switch_to_get_mode F + _IO_switch_to_main_wget_area F + _IO_switch_to_wbackup_area F + _IO_switch_to_wget_mode F + _IO_un_link F + _IO_ungetc F + _IO_unsave_markers F + _IO_unsave_wmarkers F + _IO_vfprintf F + _IO_vfscanf F + _IO_vsprintf F + _IO_wdefault_doallocate F + _IO_wdefault_finish F + _IO_wdefault_pbackfail F + _IO_wdefault_uflow F + _IO_wdefault_xsgetn F + _IO_wdefault_xsputn F + _IO_wdo_write F + _IO_wdoallocbuf F + _IO_wfile_jumps D 0x54 + _IO_wfile_overflow F + _IO_wfile_seekoff F + _IO_wfile_sync F + _IO_wfile_underflow F + _IO_wfile_xsputn F + _IO_wmarker_delta F + _IO_wsetb F + ___brk_addr D 0x4 + __adjtimex F + __after_morecore_hook D 0x4 + __argz_count F + __argz_next F + __argz_stringify F + __asprintf F + __assert F + __assert_fail F + __assert_perror_fail F + __backtrace F + __backtrace_symbols F + __backtrace_symbols_fd F + __bsd_getpgrp F + __bzero F + __check_rhosts_file D 0x4 + __chk_fail F + __clone F + __close F + __cmsg_nxthdr F + __confstr_chk F + __connect F + __ctype_b_loc F + __ctype_get_mb_cur_max F + __ctype_tolower_loc F + __ctype_toupper_loc F + __curbrk D 0x4 + __cxa_atexit F + __cxa_finalize F + __cyg_profile_func_enter F + __cyg_profile_func_exit F + __daylight D 0x4 + __dcgettext F + __default_morecore F + __dgettext F + __divdi3 F + __dup2 F + __duplocale F + __endmntent F + __environ D 0x4 + __errno_location F + __fbufsize F + __fcntl F + __ffs F + __fgets_chk F + __fgets_unlocked_chk F + __fgetws_chk F + __fgetws_unlocked_chk F + __finite F + __finitef F + __finitel F + __flbf F + __fork F + __fpending F + __fprintf_chk F + __fpu_control D 0x4 + __fpurge F + __freadable F + __freading F + __free_hook D 0x4 + __freelocale F + __fsetlocking F + __fwprintf_chk F + __fwritable F + __fwriting F + __fxstat F + __fxstat64 F + __fxstatat F + __fxstatat64 F + __getcwd_chk F + __getdelim F + __getdomainname_chk F + __getgroups_chk F + __gethostname_chk F + __getlogin_r_chk F + __getmntent_r F + __getpagesize F + __getpgid F + __getpid F + __gets_chk F + __gettimeofday F + __getwd_chk F + __gmtime_r F + __h_errno_location F + __isalnum_l F + __isalpha_l F + __isascii_l F + __isblank_l F + __iscntrl_l F + __isctype F + __isdigit_l F + __isgraph_l F + __isinf F + __isinff F + __isinfl F + __islower_l F + __isnan F + __isnanf F + __isnanl F + __isprint_l F + __ispunct_l F + __isspace_l F + __isupper_l F + __iswalnum_l F + __iswalpha_l F + __iswblank_l F + __iswcntrl_l F + __iswctype F + __iswctype_l F + __iswdigit_l F + __iswgraph_l F + __iswlower_l F + __iswprint_l F + __iswpunct_l F + __iswspace_l F + __iswupper_l F + __iswxdigit_l F + __isxdigit_l F + __ivaliduser F + __key_decryptsession_pk_LOCAL D 0x4 + __key_encryptsession_pk_LOCAL D 0x4 + __key_gendes_LOCAL D 0x4 + __libc_allocate_rtsig F + __libc_calloc F + __libc_current_sigrtmax F + __libc_current_sigrtmin F + __libc_free F + __libc_freeres F + __libc_init_first F + __libc_mallinfo F + __libc_malloc F + __libc_mallopt F + __libc_memalign F + __libc_pvalloc F + __libc_realloc F + __libc_sa_len F + __libc_start_main F + __libc_valloc F + __lseek F + __lxstat F + __lxstat64 F + __malloc_hook D 0x4 + __malloc_initialize_hook D 0x4 + __mbrlen F + __mbrtowc F + __mbsnrtowcs_chk F + __mbsrtowcs_chk F + __mbstowcs_chk F + __memalign_hook D 0x4 + __memcpy_chk F + __memmove_chk F + __mempcpy F + __mempcpy_chk F + __mempcpy_small F + __memset_chk F + __moddi3 F + __monstartup F + __morecore D 0x4 + __nanosleep F + __newlocale F + __nl_langinfo_l F + __nss_configure_lookup F + __nss_database_lookup F + __nss_group_lookup F + __nss_hostname_digits_dots F + __nss_hosts_lookup F + __nss_next F + __nss_passwd_lookup F + __open F + __open64 F + __overflow F + __pipe F + __poll F + __pread64 F + __pread64_chk F + __pread_chk F + __printf_chk F + __printf_fp F + __profile_frequency F + __progname D 0x4 + __progname_full D 0x4 + __ptsname_r_chk F + __pwrite64 F + __rawmemchr F + __rcmd_errstr D 0x4 + __read F + __read_chk F + __readlink_chk F + __realloc_hook D 0x4 + __realpath_chk F + __recv_chk F + __recvfrom_chk F + __register_atfork F + __res_init F + __res_nclose F + __res_ninit F + __res_randomid F + __res_state F + __rpc_thread_createerr F + __rpc_thread_svc_fdset F + __rpc_thread_svc_max_pollfd F + __rpc_thread_svc_pollfd F + __sbrk F + __sched_get_priority_max F + __sched_get_priority_min F + __sched_getparam F + __sched_getscheduler F + __sched_setscheduler F + __sched_yield F + __secure_getenv F + __select F + __send F + __setmntent F + __setpgid F + __sigaction F + __sigaddset F + __sigdelset F + __sigismember F + __signbit F + __signbitf F + __sigpause F + __sigsetjmp F + __sigsuspend F + __snprintf_chk F + __sprintf_chk F + __stack_chk_fail F + __statfs F + __stpcpy F + __stpcpy_chk F + __stpcpy_small F + __stpncpy F + __stpncpy_chk F + __strcasecmp F + __strcasecmp_l F + __strcasestr F + __strcat_chk F + __strcoll_l F + __strcpy_chk F + __strcpy_small F + __strcspn_c1 F + __strcspn_c2 F + __strcspn_c3 F + __strdup F + __strerror_r F + __strfmon_l F + __strftime_l F + __strncasecmp_l F + __strncat_chk F + __strncpy_chk F + __strndup F + __strpbrk_c2 F + __strpbrk_c3 F + __strsep_1c F + __strsep_2c F + __strsep_3c F + __strsep_g F + __strspn_c1 F + __strspn_c2 F + __strspn_c3 F + __strtod_internal F + __strtod_l F + __strtof_internal F + __strtof_l F + __strtok_r F + __strtok_r_1c F + __strtol_internal F + __strtol_l F + __strtold_internal F + __strtold_l F + __strtoll_internal F + __strtoll_l F + __strtoul_internal F + __strtoul_l F + __strtoull_internal F + __strtoull_l F + __strverscmp F + __strxfrm_l F + __swprintf_chk F + __sysconf F + __sysctl F + __syslog_chk F + __sysv_signal F + __timezone D 0x4 + __toascii_l F + __tolower_l F + __toupper_l F + __towctrans F + __towctrans_l F + __towlower_l F + __towupper_l F + __ttyname_r_chk F + __tzname D 0x8 + __udivdi3 F + __uflow F + __umoddi3 F + __underflow F + __uselocale F + __vfork F + __vfprintf_chk F + __vfscanf F + __vfwprintf_chk F + __vprintf_chk F + __vsnprintf F + __vsnprintf_chk F + __vsprintf_chk F + __vsscanf F + __vswprintf_chk F + __vsyslog_chk F + __vwprintf_chk F + __wait F + __waitpid F + __wcpcpy_chk F + __wcpncpy_chk F + __wcrtomb_chk F + __wcscasecmp_l F + __wcscat_chk F + __wcscoll_l F + __wcscpy_chk F + __wcsftime_l F + __wcsncasecmp_l F + __wcsncat_chk F + __wcsncpy_chk F + __wcsnrtombs_chk F + __wcsrtombs_chk F + __wcstod_internal F + __wcstod_l F + __wcstof_internal F + __wcstof_l F + __wcstol_internal F + __wcstol_l F + __wcstold_internal F + __wcstold_l F + __wcstoll_internal F + __wcstoll_l F + __wcstombs_chk F + __wcstoul_internal F + __wcstoul_l F + __wcstoull_internal F + __wcstoull_l F + __wcsxfrm_l F + __wctomb_chk F + __wctrans_l F + __wctype_l F + __wmemcpy_chk F + __wmemmove_chk F + __wmempcpy_chk F + __wmemset_chk F + __woverflow F + __wprintf_chk F + __write F + __wuflow F + __wunderflow F + __xmknod F + __xmknodat F + __xpg_basename F + __xpg_sigpause F + __xpg_strerror_r F + __xstat F + __xstat64 F + _authenticate F + _dl_mcount_wrapper F + _dl_mcount_wrapper_check F + _environ D 0x4 + _exit F + _flushlbf F + _libc_intl_domainname D 0x5 + _longjmp F + _mcleanup F + _mcount F + _nl_default_dirname D 0x12 + _nl_domain_bindings D 0x4 + _nl_msg_cat_cntr D 0x4 + _null_auth D 0xc + _obstack_allocated_p F + _obstack_begin F + _obstack_begin_1 F + _obstack_free F + _obstack_memory_used F + _obstack_newchunk F + _res D 0x1fe + _res_hconf D 0x30 + _rpc_dtablesize F + _seterr_reply F + _setjmp F + _sys_errlist D 0x210 + _sys_nerr D 0x4 + _sys_siglist D 0x104 + _tolower F + _toupper F + a64l F + abort F + abs F + accept F + access F + acct F + addmntent F + addseverity F + adjtime F + adjtimex F + advance F + alarm F + alphasort F + alphasort64 F + argp_err_exit_status D 0x4 + argp_error F + argp_failure F + argp_help F + argp_parse F + argp_program_bug_address D 0x4 + argp_program_version D 0x4 + argp_program_version_hook D 0x4 + argp_state_help F + argp_usage F + argz_add F + argz_add_sep F + argz_append F + argz_count F + argz_create F + argz_create_sep F + argz_delete F + argz_extract F + argz_insert F + argz_next F + argz_replace F + argz_stringify F + asctime F + asctime_r F + asprintf F + atof F + atoi F + atol F + atoll F + authdes_create F + authdes_getucred F + authdes_pk_create F + authnone_create F + authunix_create F + authunix_create_default F + backtrace F + backtrace_symbols F + backtrace_symbols_fd F + basename F + bcmp F + bcopy F + bdflush F + bind F + bind_textdomain_codeset F + bindresvport F + bindtextdomain F + brk F + bsd_signal F + bsearch F + btowc F + bzero F + cacheflush F + calloc F + callrpc F + canonicalize_file_name F + capget F + capset F + catclose F + catgets F + catopen F + cbc_crypt F + cfgetispeed F + cfgetospeed F + cfmakeraw F + cfree F + cfsetispeed F + cfsetospeed F + cfsetspeed F + chdir F + chflags F + chmod F + chown F + chroot F + clearenv F + clearerr F + clearerr_unlocked F + clnt_broadcast F + clnt_create F + clnt_pcreateerror F + clnt_perrno F + clnt_perror F + clnt_spcreateerror F + clnt_sperrno F + clnt_sperror F + clntraw_create F + clnttcp_create F + clntudp_bufcreate F + clntudp_create F + clntunix_create F + clock F + clone F + close F + closedir F + closelog F + confstr F + connect F + copysign F + copysignf F + copysignl F + creat F + creat64 F + create_module F + ctermid F + ctime F + ctime_r F + cuserid F + daemon F + daylight D 0x4 + dcgettext F + dcngettext F + delete_module F + des_setparity F + dgettext F + difftime F + dirfd F + dirname F + div F + dl_iterate_phdr F + dngettext F + dprintf F + drand48 F + drand48_r F + dup F + dup2 F + duplocale F + dysize F + eaccess F + ecb_crypt F + ecvt F + ecvt_r F + endaliasent F + endfsent F + endgrent F + endhostent F + endmntent F + endnetent F + endnetgrent F + endprotoent F + endpwent F + endrpcent F + endservent F + endspent F + endttyent F + endusershell F + endutent F + endutxent F + environ D 0x4 + envz_add F + envz_entry F + envz_get F + envz_merge F + envz_remove F + envz_strip F + epoll_create F + epoll_ctl F + epoll_wait F + erand48 F + erand48_r F + err F + error F + error_at_line F + error_message_count D 0x4 + error_one_per_line D 0x4 + error_print_progname D 0x4 + errx F + ether_aton F + ether_aton_r F + ether_hostton F + ether_line F + ether_ntoa F + ether_ntoa_r F + ether_ntohost F + euidaccess F + execl F + execle F + execlp F + execv F + execve F + execvp F + exit F + faccessat F + fattach F + fchdir F + fchflags F + fchmod F + fchmodat F + fchown F + fchownat F + fclose F + fcloseall F + fcntl F + fcvt F + fcvt_r F + fdatasync F + fdetach F + fdopen F + fdopendir F + feof F + feof_unlocked F + ferror F + ferror_unlocked F + fexecve F + fflush F + fflush_unlocked F + ffs F + ffsl F + ffsll F + fgetc F + fgetc_unlocked F + fgetgrent F + fgetgrent_r F + fgetpos F + fgetpos64 F + fgetpwent F + fgetpwent_r F + fgets F + fgets_unlocked F + fgetspent F + fgetspent_r F + fgetwc F + fgetwc_unlocked F + fgetws F + fgetws_unlocked F + fgetxattr F + fileno F + fileno_unlocked F + finite F + finitef F + finitel F + flistxattr F + flock F + flockfile F + fmemopen F + fmtmsg F + fnmatch F + fopen F + fopen64 F + fopencookie F + fork F + fpathconf F + fprintf F + fputc F + fputc_unlocked F + fputs F + fputs_unlocked F + fputwc F + fputwc_unlocked F + fputws F + fputws_unlocked F + fread F + fread_unlocked F + free F + freeaddrinfo F + freeifaddrs F + freelocale F + fremovexattr F + freopen F + freopen64 F + frexp F + frexpf F + frexpl F + fscanf F + fseek F + fseeko F + fseeko64 F + fsetpos F + fsetpos64 F + fsetxattr F + fstatfs F + fstatfs64 F + fstatvfs F + fstatvfs64 F + fsync F + ftell F + ftello F + ftello64 F + ftime F + ftok F + ftruncate F + ftruncate64 F + ftrylockfile F + fts_children F + fts_close F + fts_open F + fts_read F + fts_set F + ftw F + ftw64 F + funlockfile F + futimes F + futimesat F + fwide F + fwprintf F + fwrite F + fwrite_unlocked F + fwscanf F + gai_strerror F + gcvt F + get_avphys_pages F + get_current_dir_name F + get_kernel_syms F + get_myaddress F + get_nprocs F + get_nprocs_conf F + get_phys_pages F + getaddrinfo F + getaliasbyname F + getaliasbyname_r F + getaliasent F + getaliasent_r F + getc F + getc_unlocked F + getchar F + getchar_unlocked F + getcontext F + getcwd F + getdate F + getdate_err D 0x4 + getdate_r F + getdelim F + getdirentries F + getdirentries64 F + getdomainname F + getdtablesize F + getegid F + getenv F + geteuid F + getfsent F + getfsfile F + getfsspec F + getgid F + getgrent F + getgrent_r F + getgrgid F + getgrgid_r F + getgrnam F + getgrnam_r F + getgrouplist F + getgroups F + gethostbyaddr F + gethostbyaddr_r F + gethostbyname F + gethostbyname2 F + gethostbyname2_r F + gethostbyname_r F + gethostent F + gethostent_r F + gethostid F + gethostname F + getifaddrs F + getipv4sourcefilter F + getitimer F + getline F + getloadavg F + getlogin F + getlogin_r F + getmntent F + getmntent_r F + getmsg F + getnameinfo F + getnetbyaddr F + getnetbyaddr_r F + getnetbyname F + getnetbyname_r F + getnetent F + getnetent_r F + getnetgrent F + getnetgrent_r F + getnetname F + getopt F + getopt_long F + getopt_long_only F + getpagesize F + getpass F + getpeername F + getpgid F + getpgrp F + getpid F + getpmsg F + getppid F + getpriority F + getprotobyname F + getprotobyname_r F + getprotobynumber F + getprotobynumber_r F + getprotoent F + getprotoent_r F + getpt F + getpublickey F + getpw F + getpwent F + getpwent_r F + getpwnam F + getpwnam_r F + getpwuid F + getpwuid_r F + getresgid F + getresuid F + getrlimit F + getrlimit64 F + getrpcbyname F + getrpcbyname_r F + getrpcbynumber F + getrpcbynumber_r F + getrpcent F + getrpcent_r F + getrpcport F + getrusage F + gets F + getsecretkey F + getservbyname F + getservbyname_r F + getservbyport F + getservbyport_r F + getservent F + getservent_r F + getsid F + getsockname F + getsockopt F + getsourcefilter F + getspent F + getspent_r F + getspnam F + getspnam_r F + getsubopt F + gettext F + gettimeofday F + getttyent F + getttynam F + getuid F + getusershell F + getutent F + getutent_r F + getutid F + getutid_r F + getutline F + getutline_r F + getutmp F + getutmpx F + getutxent F + getutxid F + getutxline F + getw F + getwc F + getwc_unlocked F + getwchar F + getwchar_unlocked F + getwd F + getxattr F + glob F + glob64 F + glob_pattern_p F + globfree F + globfree64 F + gmtime F + gmtime_r F + gnu_dev_major F + gnu_dev_makedev F + gnu_dev_minor F + gnu_get_libc_release F + gnu_get_libc_version F + grantpt F + group_member F + gsignal F + gtty F + h_errlist D 0x14 + h_nerr D 0x4 + hasmntopt F + hcreate F + hcreate_r F + hdestroy F + hdestroy_r F + herror F + host2netname F + hsearch F + hsearch_r F + hstrerror F + htonl F + htons F + iconv F + iconv_close F + iconv_open F + if_freenameindex F + if_indextoname F + if_nameindex F + if_nametoindex F + imaxabs F + imaxdiv F + in6addr_any D 0x10 + in6addr_loopback D 0x10 + index F + inet6_option_alloc F + inet6_option_append F + inet6_option_find F + inet6_option_init F + inet6_option_next F + inet6_option_space F + inet_addr F + inet_aton F + inet_lnaof F + inet_makeaddr F + inet_netof F + inet_network F + inet_nsap_addr F + inet_nsap_ntoa F + inet_ntoa F + inet_ntop F + inet_pton F + init_module F + initgroups F + initstate F + initstate_r F + innetgr F + inotify_add_watch F + inotify_init F + inotify_rm_watch F + insque F + ioctl F + iruserok F + iruserok_af F + isalnum F + isalnum_l F + isalpha F + isalpha_l F + isascii F + isastream F + isatty F + isblank F + isblank_l F + iscntrl F + iscntrl_l F + isctype F + isdigit F + isdigit_l F + isfdtype F + isgraph F + isgraph_l F + isinf F + isinff F + isinfl F + islower F + islower_l F + isnan F + isnanf F + isnanl F + isprint F + isprint_l F + ispunct F + ispunct_l F + isspace F + isspace_l F + isupper F + isupper_l F + iswalnum F + iswalnum_l F + iswalpha F + iswalpha_l F + iswblank F + iswblank_l F + iswcntrl F + iswcntrl_l F + iswctype F + iswctype_l F + iswdigit F + iswdigit_l F + iswgraph F + iswgraph_l F + iswlower F + iswlower_l F + iswprint F + iswprint_l F + iswpunct F + iswpunct_l F + iswspace F + iswspace_l F + iswupper F + iswupper_l F + iswxdigit F + iswxdigit_l F + isxdigit F + isxdigit_l F + jrand48 F + jrand48_r F + key_decryptsession F + key_decryptsession_pk F + key_encryptsession F + key_encryptsession_pk F + key_gendes F + key_get_conv F + key_secretkey_is_set F + key_setnet F + key_setsecret F + kill F + killpg F + klogctl F + l64a F + labs F + lchmod F + lchown F + lckpwdf F + lcong48 F + lcong48_r F + ldexp F + ldexpf F + ldexpl F + ldiv F + lfind F + lgetxattr F + link F + linkat F + listen F + listxattr F + llabs F + lldiv F + llistxattr F + llseek F + loc1 D 0x4 + loc2 D 0x4 + localeconv F + localtime F + localtime_r F + lockf F + lockf64 F + locs D 0x4 + longjmp F + lrand48 F + lrand48_r F + lremovexattr F + lsearch F + lseek F + lseek64 F + lsetxattr F + lutimes F + madvise F + makecontext F + mallinfo F + malloc F + malloc_get_state F + malloc_set_state F + malloc_stats F + malloc_trim F + malloc_usable_size F + mallopt F + mallwatch D 0x4 + mblen F + mbrlen F + mbrtowc F + mbsinit F + mbsnrtowcs F + mbsrtowcs F + mbstowcs F + mbtowc F + mcheck F + mcheck_check_all F + mcheck_pedantic F + mcount F + memalign F + memccpy F + memchr F + memcmp F + memcpy F + memfrob F + memmem F + memmove F + mempcpy F + memrchr F + memset F + mincore F + mkdir F + mkdirat F + mkdtemp F + mkfifo F + mkfifoat F + mkstemp F + mkstemp64 F + mktemp F + mktime F + mlock F + mlockall F + mmap F + mmap64 F + modf F + modff F + modfl F + moncontrol F + monstartup F + mount F + mprobe F + mprotect F + mrand48 F + mrand48_r F + mremap F + msgctl F + msgget F + msgrcv F + msgsnd F + msync F + mtrace F + munlock F + munlockall F + munmap F + muntrace F + nanosleep F + netname2host F + netname2user F + newlocale F + nfsservctl F + nftw F + nftw64 F + ngettext F + nice F + nl_langinfo F + nl_langinfo_l F + nrand48 F + nrand48_r F + ntohl F + ntohs F + ntp_adjtime F + ntp_gettime F + obstack_alloc_failed_handler D 0x4 + obstack_exit_failure D 0x4 + obstack_free F + obstack_printf F + obstack_vprintf F + on_exit F + open F + open64 F + open_memstream F + open_wmemstream F + openat F + openat64 F + opendir F + openlog F + optarg D 0x4 + opterr D 0x4 + optind D 0x4 + optopt D 0x4 + parse_printf_format F + passwd2des F + pathconf F + pause F + pclose F + perror F + personality F + pipe F + pivot_root F + pmap_getmaps F + pmap_getport F + pmap_rmtcall F + pmap_set F + pmap_unset F + poll F + popen F + posix_fadvise F + posix_fadvise64 F + posix_fallocate F + posix_fallocate64 F + posix_madvise F + posix_memalign F + posix_openpt F + posix_spawn F + posix_spawn_file_actions_addclose F + posix_spawn_file_actions_adddup2 F + posix_spawn_file_actions_addopen F + posix_spawn_file_actions_destroy F + posix_spawn_file_actions_init F + posix_spawnattr_destroy F + posix_spawnattr_getflags F + posix_spawnattr_getpgroup F + posix_spawnattr_getschedparam F + posix_spawnattr_getschedpolicy F + posix_spawnattr_getsigdefault F + posix_spawnattr_getsigmask F + posix_spawnattr_init F + posix_spawnattr_setflags F + posix_spawnattr_setpgroup F + posix_spawnattr_setschedparam F + posix_spawnattr_setschedpolicy F + posix_spawnattr_setsigdefault F + posix_spawnattr_setsigmask F + posix_spawnp F + ppoll F + prctl F + pread F + pread64 F + printf F + printf_size F + printf_size_info F + profil F + program_invocation_name D 0x4 + program_invocation_short_name D 0x4 + pselect F + psignal F + pthread_attr_destroy F + pthread_attr_getdetachstate F + pthread_attr_getinheritsched F + pthread_attr_getschedparam F + pthread_attr_getschedpolicy F + pthread_attr_getscope F + pthread_attr_init F + pthread_attr_setdetachstate F + pthread_attr_setinheritsched F + pthread_attr_setschedparam F + pthread_attr_setschedpolicy F + pthread_attr_setscope F + pthread_cond_broadcast F + pthread_cond_destroy F + pthread_cond_init F + pthread_cond_signal F + pthread_cond_timedwait F + pthread_cond_wait F + pthread_condattr_destroy F + pthread_condattr_init F + pthread_equal F + pthread_exit F + pthread_getschedparam F + pthread_mutex_destroy F + pthread_mutex_init F + pthread_mutex_lock F + pthread_mutex_unlock F + pthread_self F + pthread_setcancelstate F + pthread_setcanceltype F + pthread_setschedparam F + ptrace F + ptsname F + ptsname_r F + putc F + putc_unlocked F + putchar F + putchar_unlocked F + putenv F + putgrent F + putmsg F + putpmsg F + putpwent F + puts F + putspent F + pututline F + pututxline F + putw F + putwc F + putwc_unlocked F + putwchar F + putwchar_unlocked F + pvalloc F + pwrite F + pwrite64 F + qecvt F + qecvt_r F + qfcvt F + qfcvt_r F + qgcvt F + qsort F + query_module F + quotactl F + raise F + rand F + rand_r F + random F + random_r F + rawmemchr F + rcmd F + rcmd_af F + re_comp F + re_compile_fastmap F + re_compile_pattern F + re_exec F + re_match F + re_match_2 F + re_search F + re_search_2 F + re_set_registers F + re_set_syntax F + re_syntax_options D 0x4 + read F + readahead F + readdir F + readdir64 F + readdir64_r F + readdir_r F + readlink F + readlinkat F + readv F + realloc F + realpath F + reboot F + recv F + recvfrom F + recvmsg F + regcomp F + regerror F + regexec F + regfree F + register_printf_function F + registerrpc F + remap_file_pages F + remove F + removexattr F + remque F + rename F + renameat F + revoke F + rewind F + rewinddir F + rexec F + rexec_af F + rexecoptions D 0x4 + rindex F + rmdir F + rpc_createerr D 0x10 + rpmatch F + rresvport F + rresvport_af F + rtime F + ruserok F + ruserok_af F + ruserpass F + sbrk F + scalbn F + scalbnf F + scalbnl F + scandir F + scandir64 F + scanf F + sched_get_priority_max F + sched_get_priority_min F + sched_getaffinity F + sched_getparam F + sched_getscheduler F + sched_rr_get_interval F + sched_setaffinity F + sched_setparam F + sched_setscheduler F + sched_yield F + seed48 F + seed48_r F + seekdir F + select F + semctl F + semget F + semop F + semtimedop F + send F + sendfile F + sendfile64 F + sendmsg F + sendto F + setaliasent F + setbuf F + setbuffer F + setcontext F + setdomainname F + setegid F + setenv F + seteuid F + setfsent F + setfsgid F + setfsuid F + setgid F + setgrent F + setgroups F + sethostent F + sethostid F + sethostname F + setipv4sourcefilter F + setitimer F + setjmp F + setlinebuf F + setlocale F + setlogin F + setlogmask F + setmntent F + setnetent F + setnetgrent F + setpgid F + setpgrp F + setpriority F + setprotoent F + setpwent F + setregid F + setresgid F + setresuid F + setreuid F + setrlimit F + setrlimit64 F + setrpcent F + setservent F + setsid F + setsockopt F + setsourcefilter F + setspent F + setstate F + setstate_r F + settimeofday F + setttyent F + setuid F + setusershell F + setutent F + setutxent F + setvbuf F + setxattr F + sgetspent F + sgetspent_r F + shmat F + shmctl F + shmdt F + shmget F + shutdown F + sigaction F + sigaddset F + sigaltstack F + sigandset F + sigblock F + sigdelset F + sigemptyset F + sigfillset F + siggetmask F + sighold F + sigignore F + siginterrupt F + sigisemptyset F + sigismember F + siglongjmp F + signal F + sigorset F + sigpause F + sigpending F + sigprocmask F + sigqueue F + sigrelse F + sigreturn F + sigset F + sigsetmask F + sigstack F + sigsuspend F + sigtimedwait F + sigvec F + sigwait F + sigwaitinfo F + sleep F + snprintf F + sockatmark F + socket F + socketpair F + sprintf F + sprofil F + srand F + srand48 F + srand48_r F + srandom F + srandom_r F + sscanf F + ssignal F + sstk F + statfs F + statfs64 F + statvfs F + statvfs64 F + stderr D 0x4 + stdin D 0x4 + stdout D 0x4 + step F + stime F + stpcpy F + stpncpy F + strcasecmp F + strcasecmp_l F + strcasestr F + strcat F + strchr F + strchrnul F + strcmp F + strcoll F + strcoll_l F + strcpy F + strcspn F + strdup F + strerror F + strerror_r F + strfmon F + strfmon_l F + strfry F + strftime F + strftime_l F + strlen F + strncasecmp F + strncasecmp_l F + strncat F + strncmp F + strncpy F + strndup F + strnlen F + strpbrk F + strptime F + strptime_l F + strrchr F + strsep F + strsignal F + strspn F + strstr F + strtod F + strtod_l F + strtof F + strtof_l F + strtoimax F + strtok F + strtok_r F + strtol F + strtol_l F + strtold F + strtold_l F + strtoll F + strtoll_l F + strtoq F + strtoul F + strtoul_l F + strtoull F + strtoull_l F + strtoumax F + strtouq F + strverscmp F + strxfrm F + strxfrm_l F + stty F + svc_exit F + svc_fdset D 0x80 + svc_getreq F + svc_getreq_common F + svc_getreq_poll F + svc_getreqset F + svc_max_pollfd D 0x4 + svc_pollfd D 0x4 + svc_register F + svc_run F + svc_sendreply F + svc_unregister F + svcauthdes_stats D 0xc + svcerr_auth F + svcerr_decode F + svcerr_noproc F + svcerr_noprog F + svcerr_progvers F + svcerr_systemerr F + svcerr_weakauth F + svcfd_create F + svcraw_create F + svctcp_create F + svcudp_bufcreate F + svcudp_create F + svcudp_enablecache F + svcunix_create F + svcunixfd_create F + swab F + swapcontext F + swapoff F + swapon F + swprintf F + swscanf F + symlink F + symlinkat F + sync F + sys_errlist D 0x210 + sys_nerr D 0x4 + sys_sigabbrev D 0x104 + sys_siglist D 0x104 + syscall F + sysconf F + sysctl F + sysinfo F + syslog F + system F + sysv_signal F + tcdrain F + tcflow F + tcflush F + tcgetattr F + tcgetpgrp F + tcgetsid F + tcsendbreak F + tcsetattr F + tcsetpgrp F + tdelete F + tdestroy F + telldir F + tempnam F + textdomain F + tfind F + time F + timegm F + timelocal F + times F + timezone D 0x4 + tmpfile F + tmpfile64 F + tmpnam F + tmpnam_r F + toascii F + tolower F + tolower_l F + toupper F + toupper_l F + towctrans F + towctrans_l F + towlower F + towlower_l F + towupper F + towupper_l F + tr_break F + truncate F + truncate64 F + tsearch F + ttyname F + ttyname_r F + ttyslot F + twalk F + tzname D 0x8 + tzset F + ualarm F + ulckpwdf F + ulimit F + umask F + umount F + umount2 F + uname F + ungetc F + ungetwc F + unlink F + unlinkat F + unlockpt F + unsetenv F + unshare F + updwtmp F + updwtmpx F + uselib F + uselocale F + user2netname F + usleep F + ustat F + utime F + utimes F + utmpname F + utmpxname F + valloc F + vasprintf F + vdprintf F + verr F + verrx F + versionsort F + versionsort64 F + vfork F + vfprintf F + vfscanf F + vfwprintf F + vfwscanf F + vhangup F + vlimit F + vprintf F + vscanf F + vsnprintf F + vsprintf F + vsscanf F + vswprintf F + vswscanf F + vsyslog F + vtimes F + vwarn F + vwarnx F + vwprintf F + vwscanf F + wait F + wait3 F + wait4 F + waitid F + waitpid F + warn F + warnx F + wcpcpy F + wcpncpy F + wcrtomb F + wcscasecmp F + wcscasecmp_l F + wcscat F + wcschr F + wcschrnul F + wcscmp F + wcscoll F + wcscoll_l F + wcscpy F + wcscspn F + wcsdup F + wcsftime F + wcsftime_l F + wcslen F + wcsncasecmp F + wcsncasecmp_l F + wcsncat F + wcsncmp F + wcsncpy F + wcsnlen F + wcsnrtombs F + wcspbrk F + wcsrchr F + wcsrtombs F + wcsspn F + wcsstr F + wcstod F + wcstod_l F + wcstof F + wcstof_l F + wcstoimax F + wcstok F + wcstol F + wcstol_l F + wcstold F + wcstold_l F + wcstoll F + wcstoll_l F + wcstombs F + wcstoq F + wcstoul F + wcstoul_l F + wcstoull F + wcstoull_l F + wcstoumax F + wcstouq F + wcswcs F + wcswidth F + wcsxfrm F + wcsxfrm_l F + wctob F + wctomb F + wctrans F + wctrans_l F + wctype F + wctype_l F + wcwidth F + wmemchr F + wmemcmp F + wmemcpy F + wmemmove F + wmempcpy F + wmemset F + wordexp F + wordfree F + wprintf F + write F + writev F + wscanf F + xdecrypt F + xdr_accepted_reply F + xdr_array F + xdr_authdes_cred F + xdr_authdes_verf F + xdr_authunix_parms F + xdr_bool F + xdr_bytes F + xdr_callhdr F + xdr_callmsg F + xdr_char F + xdr_cryptkeyarg F + xdr_cryptkeyarg2 F + xdr_cryptkeyres F + xdr_des_block F + xdr_double F + xdr_enum F + xdr_float F + xdr_free F + xdr_getcredres F + xdr_hyper F + xdr_int F + xdr_int16_t F + xdr_int32_t F + xdr_int64_t F + xdr_int8_t F + xdr_key_netstarg F + xdr_key_netstres F + xdr_keybuf F + xdr_keystatus F + xdr_long F + xdr_longlong_t F + xdr_netnamestr F + xdr_netobj F + xdr_opaque F + xdr_opaque_auth F + xdr_pmap F + xdr_pmaplist F + xdr_pointer F + xdr_quad_t F + xdr_reference F + xdr_rejected_reply F + xdr_replymsg F + xdr_rmtcall_args F + xdr_rmtcallres F + xdr_short F + xdr_sizeof F + xdr_string F + xdr_u_char F + xdr_u_hyper F + xdr_u_int F + xdr_u_long F + xdr_u_longlong_t F + xdr_u_quad_t F + xdr_u_short F + xdr_uint16_t F + xdr_uint32_t F + xdr_uint64_t F + xdr_uint8_t F + xdr_union F + xdr_unixcred F + xdr_vector F + xdr_void F + xdr_wrapstring F + xdrmem_create F + xdrrec_create F + xdrrec_endofrecord F + xdrrec_eof F + xdrrec_skiprecord F + xdrstdio_create F + xencrypt F + xprt_register F + xprt_unregister F +GLIBC_2.5 + GLIBC_2.5 A + __readlinkat_chk F + inet6_opt_append F + inet6_opt_find F + inet6_opt_finish F + inet6_opt_get_val F + inet6_opt_init F + inet6_opt_next F + inet6_opt_set_val F + inet6_rth_add F + inet6_rth_getaddr F + inet6_rth_init F + inet6_rth_reverse F + inet6_rth_segments F + inet6_rth_space F + splice F + tee F + vmsplice F +GLIBC_2.6 + GLIBC_2.6 A + __sched_cpucount F + epoll_pwait F + futimens F + sched_getcpu F + strerror_l F + sync_file_range F + utimensat F +GLIBC_2.7 + GLIBC_2.7 A + __fread_chk F + __fread_unlocked_chk F + __isoc99_fscanf F + __isoc99_fwscanf F + __isoc99_scanf F + __isoc99_sscanf F + __isoc99_swscanf F + __isoc99_vfscanf F + __isoc99_vfwscanf F + __isoc99_vscanf F + __isoc99_vsscanf F + __isoc99_vswscanf F + __isoc99_vwscanf F + __isoc99_wscanf F + __open64_2 F + __open_2 F + __openat64_2 F + __openat_2 F + __sched_cpualloc F + __sched_cpufree F + eventfd F + eventfd_read F + eventfd_write F + mkostemp F + mkostemp64 F + signalfd F +GLIBC_2.8 + GLIBC_2.8 A + __asprintf_chk F + __dprintf_chk F + __obstack_printf_chk F + __obstack_vprintf_chk F + __vasprintf_chk F + __vdprintf_chk F + qsort_r F + timerfd_create F + timerfd_gettime F + timerfd_settime F +GLIBC_2.9 + GLIBC_2.9 A + dup3 F + epoll_create1 F + inotify_init1 F + pipe2 F diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libcrypt.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libcrypt.abilist new file mode 100644 index 0000000000..8c874edffe --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libcrypt.abilist @@ -0,0 +1,9 @@ +GLIBC_2.4 + GLIBC_2.4 A + crypt F + crypt_r F + encrypt F + encrypt_r F + fcrypt F + setkey F + setkey_r F diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libdl.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libdl.abilist new file mode 100644 index 0000000000..7f3ebed31d --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libdl.abilist @@ -0,0 +1,11 @@ +GLIBC_2.4 + GLIBC_2.4 A + dladdr F + dladdr1 F + dlclose F + dlerror F + dlinfo F + dlmopen F + dlopen F + dlsym F + dlvsym F diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libm.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libm.abilist new file mode 100644 index 0000000000..cee34728d8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libm.abilist @@ -0,0 +1,370 @@ +GLIBC_2.15 + GLIBC_2.15 A + __acos_finite F + __acosf_finite F + __acosh_finite F + __acoshf_finite F + __asin_finite F + __asinf_finite F + __atan2_finite F + __atan2f_finite F + __atanh_finite F + __atanhf_finite F + __cosh_finite F + __coshf_finite F + __exp10_finite F + __exp10f_finite F + __exp2_finite F + __exp2f_finite F + __exp_finite F + __expf_finite F + __fmod_finite F + __fmodf_finite F + __gamma_r_finite F + __gammaf_r_finite F + __hypot_finite F + __hypotf_finite F + __j0_finite F + __j0f_finite F + __j1_finite F + __j1f_finite F + __jn_finite F + __jnf_finite F + __lgamma_r_finite F + __lgammaf_r_finite F + __log10_finite F + __log10f_finite F + __log2_finite F + __log2f_finite F + __log_finite F + __logf_finite F + __pow_finite F + __powf_finite F + __remainder_finite F + __remainderf_finite F + __scalb_finite F + __scalbf_finite F + __sinh_finite F + __sinhf_finite F + __sqrt_finite F + __sqrtf_finite F + __y0_finite F + __y0f_finite F + __y1_finite F + __y1f_finite F + __yn_finite F + __ynf_finite F +GLIBC_2.4 + GLIBC_2.4 A + _LIB_VERSION D 0x4 + __clog10 F + __clog10f F + __clog10l F + __finite F + __finitef F + __finitel F + __fpclassify F + __fpclassifyf F + __signbit F + __signbitf F + acos F + acosf F + acosh F + acoshf F + acoshl F + acosl F + asin F + asinf F + asinh F + asinhf F + asinhl F + asinl F + atan F + atan2 F + atan2f F + atan2l F + atanf F + atanh F + atanhf F + atanhl F + atanl F + cabs F + cabsf F + cabsl F + cacos F + cacosf F + cacosh F + cacoshf F + cacoshl F + cacosl F + carg F + cargf F + cargl F + casin F + casinf F + casinh F + casinhf F + casinhl F + casinl F + catan F + catanf F + catanh F + catanhf F + catanhl F + catanl F + cbrt F + cbrtf F + cbrtl F + ccos F + ccosf F + ccosh F + ccoshf F + ccoshl F + ccosl F + ceil F + ceilf F + ceill F + cexp F + cexpf F + cexpl F + cimag F + cimagf F + cimagl F + clog F + clog10 F + clog10f F + clog10l F + clogf F + clogl F + conj F + conjf F + conjl F + copysign F + copysignf F + copysignl F + cos F + cosf F + cosh F + coshf F + coshl F + cosl F + cpow F + cpowf F + cpowl F + cproj F + cprojf F + cprojl F + creal F + crealf F + creall F + csin F + csinf F + csinh F + csinhf F + csinhl F + csinl F + csqrt F + csqrtf F + csqrtl F + ctan F + ctanf F + ctanh F + ctanhf F + ctanhl F + ctanl F + drem F + dremf F + dreml F + erf F + erfc F + erfcf F + erfcl F + erff F + erfl F + exp F + exp10 F + exp10f F + exp10l F + exp2 F + exp2f F + exp2l F + expf F + expl F + expm1 F + expm1f F + expm1l F + fabs F + fabsf F + fabsl F + fdim F + fdimf F + fdiml F + feclearexcept F + fedisableexcept F + feenableexcept F + fegetenv F + fegetexcept F + fegetexceptflag F + fegetround F + feholdexcept F + feraiseexcept F + fesetenv F + fesetexceptflag F + fesetround F + fetestexcept F + feupdateenv F + finite F + finitef F + finitel F + floor F + floorf F + floorl F + fma F + fmaf F + fmal F + fmax F + fmaxf F + fmaxl F + fmin F + fminf F + fminl F + fmod F + fmodf F + fmodl F + frexp F + frexpf F + frexpl F + gamma F + gammaf F + gammal F + hypot F + hypotf F + hypotl F + ilogb F + ilogbf F + ilogbl F + j0 F + j0f F + j0l F + j1 F + j1f F + j1l F + jn F + jnf F + jnl F + ldexp F + ldexpf F + ldexpl F + lgamma F + lgamma_r F + lgammaf F + lgammaf_r F + lgammal F + lgammal_r F + llrint F + llrintf F + llrintl F + llround F + llroundf F + llroundl F + log F + log10 F + log10f F + log10l F + log1p F + log1pf F + log1pl F + log2 F + log2f F + log2l F + logb F + logbf F + logbl F + logf F + logl F + lrint F + lrintf F + lrintl F + lround F + lroundf F + lroundl F + matherr F + modf F + modff F + modfl F + nan F + nanf F + nanl F + nearbyint F + nearbyintf F + nearbyintl F + nextafter F + nextafterf F + nextafterl F + nexttoward F + nexttowardf F + nexttowardl F + pow F + pow10 F + pow10f F + pow10l F + powf F + powl F + remainder F + remainderf F + remainderl F + remquo F + remquof F + remquol F + rint F + rintf F + rintl F + round F + roundf F + roundl F + scalb F + scalbf F + scalbl F + scalbln F + scalblnf F + scalblnl F + scalbn F + scalbnf F + scalbnl F + signgam D 0x4 + significand F + significandf F + significandl F + sin F + sincos F + sincosf F + sincosl F + sinf F + sinh F + sinhf F + sinhl F + sinl F + sqrt F + sqrtf F + sqrtl F + tan F + tanf F + tanh F + tanhf F + tanhl F + tanl F + tgamma F + tgammaf F + tgammal F + trunc F + truncf F + truncl F + y0 F + y0f F + y0l F + y1 F + y1f F + y1l F + yn F + ynf F + ynl F diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libnsl.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libnsl.abilist new file mode 100644 index 0000000000..1d2670c444 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libnsl.abilist @@ -0,0 +1,123 @@ +GLIBC_2.4 + GLIBC_2.4 A + __free_fdresult F + __nis_default_access F + __nis_default_group F + __nis_default_owner F + __nis_default_ttl F + __nis_finddirectory F + __nis_hash F + __nisbind_connect F + __nisbind_create F + __nisbind_destroy F + __nisbind_next F + __yp_check F + nis_add F + nis_add_entry F + nis_addmember F + nis_checkpoint F + nis_clone_directory F + nis_clone_object F + nis_clone_result F + nis_creategroup F + nis_destroy_object F + nis_destroygroup F + nis_dir_cmp F + nis_domain_of F + nis_domain_of_r F + nis_first_entry F + nis_free_directory F + nis_free_object F + nis_free_request F + nis_freenames F + nis_freeresult F + nis_freeservlist F + nis_freetags F + nis_getnames F + nis_getservlist F + nis_ismember F + nis_leaf_of F + nis_leaf_of_r F + nis_lerror F + nis_list F + nis_local_directory F + nis_local_group F + nis_local_host F + nis_local_principal F + nis_lookup F + nis_mkdir F + nis_modify F + nis_modify_entry F + nis_name_of F + nis_name_of_r F + nis_next_entry F + nis_perror F + nis_ping F + nis_print_directory F + nis_print_entry F + nis_print_group F + nis_print_group_entry F + nis_print_link F + nis_print_object F + nis_print_result F + nis_print_rights F + nis_print_table F + nis_read_obj F + nis_remove F + nis_remove_entry F + nis_removemember F + nis_rmdir F + nis_servstate F + nis_sperrno F + nis_sperror F + nis_sperror_r F + nis_stats F + nis_verifygroup F + nis_write_obj F + readColdStartFile F + writeColdStartFile F + xdr_cback_data F + xdr_domainname F + xdr_keydat F + xdr_mapname F + xdr_obj_p F + xdr_peername F + xdr_valdat F + xdr_yp_buf F + xdr_ypall F + xdr_ypbind_binding F + xdr_ypbind_resp F + xdr_ypbind_resptype F + xdr_ypbind_setdom F + xdr_ypdelete_args F + xdr_ypmap_parms F + xdr_ypmaplist F + xdr_yppush_status F + xdr_yppushresp_xfr F + xdr_ypreq_key F + xdr_ypreq_nokey F + xdr_ypreq_xfr F + xdr_ypresp_all F + xdr_ypresp_key_val F + xdr_ypresp_maplist F + xdr_ypresp_master F + xdr_ypresp_order F + xdr_ypresp_val F + xdr_ypresp_xfr F + xdr_ypstat F + xdr_ypupdate_args F + xdr_ypxfrstat F + yp_all F + yp_bind F + yp_first F + yp_get_default_domain F + yp_maplist F + yp_master F + yp_match F + yp_next F + yp_order F + yp_unbind F + yp_update F + ypbinderr_string F + yperr_string F + ypprot_err F diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libpthread.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libpthread.abilist new file mode 100644 index 0000000000..6c0bbde672 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libpthread.abilist @@ -0,0 +1,229 @@ +GLIBC_2.11 + GLIBC_2.11 A + pthread_sigqueue F +GLIBC_2.12 + GLIBC_2.12 A + pthread_getname_np F + pthread_mutex_consistent F + pthread_mutexattr_getrobust F + pthread_mutexattr_setrobust F + pthread_setname_np F +GLIBC_2.4 + GLIBC_2.4 A + _IO_flockfile F + _IO_ftrylockfile F + _IO_funlockfile F + __close F + __connect F + __errno_location F + __fcntl F + __fork F + __h_errno_location F + __libc_allocate_rtsig F + __libc_current_sigrtmax F + __libc_current_sigrtmin F + __lseek F + __nanosleep F + __open F + __open64 F + __pread64 F + __pthread_cleanup_routine F + __pthread_getspecific F + __pthread_key_create F + __pthread_mutex_destroy F + __pthread_mutex_init F + __pthread_mutex_lock F + __pthread_mutex_trylock F + __pthread_mutex_unlock F + __pthread_mutexattr_destroy F + __pthread_mutexattr_init F + __pthread_mutexattr_settype F + __pthread_once F + __pthread_register_cancel F + __pthread_register_cancel_defer F + __pthread_rwlock_destroy F + __pthread_rwlock_init F + __pthread_rwlock_rdlock F + __pthread_rwlock_tryrdlock F + __pthread_rwlock_trywrlock F + __pthread_rwlock_unlock F + __pthread_rwlock_wrlock F + __pthread_setspecific F + __pthread_unregister_cancel F + __pthread_unregister_cancel_restore F + __pthread_unwind_next F + __pwrite64 F + __read F + __res_state F + __send F + __sigaction F + __vfork F + __wait F + __write F + _pthread_cleanup_pop F + _pthread_cleanup_pop_restore F + _pthread_cleanup_push F + _pthread_cleanup_push_defer F + accept F + close F + connect F + fcntl F + flockfile F + fork F + fsync F + ftrylockfile F + funlockfile F + longjmp F + lseek F + lseek64 F + msync F + nanosleep F + open F + open64 F + pause F + pread F + pread64 F + pthread_atfork F + pthread_attr_destroy F + pthread_attr_getaffinity_np F + pthread_attr_getdetachstate F + pthread_attr_getguardsize F + pthread_attr_getinheritsched F + pthread_attr_getschedparam F + pthread_attr_getschedpolicy F + pthread_attr_getscope F + pthread_attr_getstack F + pthread_attr_getstackaddr F + pthread_attr_getstacksize F + pthread_attr_init F + pthread_attr_setaffinity_np F + pthread_attr_setdetachstate F + pthread_attr_setguardsize F + pthread_attr_setinheritsched F + pthread_attr_setschedparam F + pthread_attr_setschedpolicy F + pthread_attr_setscope F + pthread_attr_setstack F + pthread_attr_setstackaddr F + pthread_attr_setstacksize F + pthread_barrier_destroy F + pthread_barrier_init F + pthread_barrier_wait F + pthread_barrierattr_destroy F + pthread_barrierattr_getpshared F + pthread_barrierattr_init F + pthread_barrierattr_setpshared F + pthread_cancel F + pthread_cond_broadcast F + pthread_cond_destroy F + pthread_cond_init F + pthread_cond_signal F + pthread_cond_timedwait F + pthread_cond_wait F + pthread_condattr_destroy F + pthread_condattr_getclock F + pthread_condattr_getpshared F + pthread_condattr_init F + pthread_condattr_setclock F + pthread_condattr_setpshared F + pthread_create F + pthread_detach F + pthread_equal F + pthread_exit F + pthread_getaffinity_np F + pthread_getattr_np F + pthread_getconcurrency F + pthread_getcpuclockid F + pthread_getschedparam F + pthread_getspecific F + pthread_join F + pthread_key_create F + pthread_key_delete F + pthread_kill F + pthread_kill_other_threads_np F + pthread_mutex_consistent_np F + pthread_mutex_destroy F + pthread_mutex_getprioceiling F + pthread_mutex_init F + pthread_mutex_lock F + pthread_mutex_setprioceiling F + pthread_mutex_timedlock F + pthread_mutex_trylock F + pthread_mutex_unlock F + pthread_mutexattr_destroy F + pthread_mutexattr_getkind_np F + pthread_mutexattr_getprioceiling F + pthread_mutexattr_getprotocol F + pthread_mutexattr_getpshared F + pthread_mutexattr_getrobust_np F + pthread_mutexattr_gettype F + pthread_mutexattr_init F + pthread_mutexattr_setkind_np F + pthread_mutexattr_setprioceiling F + pthread_mutexattr_setprotocol F + pthread_mutexattr_setpshared F + pthread_mutexattr_setrobust_np F + pthread_mutexattr_settype F + pthread_once F + pthread_rwlock_destroy F + pthread_rwlock_init F + pthread_rwlock_rdlock F + pthread_rwlock_timedrdlock F + pthread_rwlock_timedwrlock F + pthread_rwlock_tryrdlock F + pthread_rwlock_trywrlock F + pthread_rwlock_unlock F + pthread_rwlock_wrlock F + pthread_rwlockattr_destroy F + pthread_rwlockattr_getkind_np F + pthread_rwlockattr_getpshared F + pthread_rwlockattr_init F + pthread_rwlockattr_setkind_np F + pthread_rwlockattr_setpshared F + pthread_self F + pthread_setaffinity_np F + pthread_setcancelstate F + pthread_setcanceltype F + pthread_setconcurrency F + pthread_setschedparam F + pthread_setschedprio F + pthread_setspecific F + pthread_sigmask F + pthread_spin_destroy F + pthread_spin_init F + pthread_spin_lock F + pthread_spin_trylock F + pthread_spin_unlock F + pthread_testcancel F + pthread_timedjoin_np F + pthread_tryjoin_np F + pthread_yield F + pwrite F + pwrite64 F + raise F + read F + recv F + recvfrom F + recvmsg F + sem_close F + sem_destroy F + sem_getvalue F + sem_init F + sem_open F + sem_post F + sem_timedwait F + sem_trywait F + sem_unlink F + sem_wait F + send F + sendmsg F + sendto F + sigaction F + siglongjmp F + sigwait F + system F + tcdrain F + vfork F + wait F + waitpid F + write F diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libresolv.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libresolv.abilist new file mode 100644 index 0000000000..e781f2f822 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libresolv.abilist @@ -0,0 +1,95 @@ +GLIBC_2.4 + GLIBC_2.4 A + __b64_ntop F + __b64_pton F + __dn_comp F + __dn_count_labels F + __dn_expand F + __dn_skipname F + __fp_nquery F + __fp_query F + __fp_resstat F + __hostalias F + __loc_aton F + __loc_ntoa F + __p_cdname F + __p_cdnname F + __p_class F + __p_class_syms D 0x54 + __p_fqname F + __p_fqnname F + __p_option F + __p_query F + __p_rcode F + __p_secstodate F + __p_time F + __p_type F + __p_type_syms D 0x228 + __putlong F + __putshort F + __res_close F + __res_dnok F + __res_hnok F + __res_hostalias F + __res_isourserver F + __res_mailok F + __res_mkquery F + __res_nameinquery F + __res_nmkquery F + __res_nquery F + __res_nquerydomain F + __res_nsearch F + __res_nsend F + __res_ownok F + __res_queriesmatch F + __res_query F + __res_querydomain F + __res_search F + __res_send F + __sym_ntop F + __sym_ntos F + __sym_ston F + _gethtbyaddr F + _gethtbyname F + _gethtbyname2 F + _gethtent F + _getlong F + _getshort F + _res_opcodes D 0x40 + _sethtent F + inet_net_ntop F + inet_net_pton F + inet_neta F + res_gethostbyaddr F + res_gethostbyname F + res_gethostbyname2 F + res_send_setqhook F + res_send_setrhook F +GLIBC_2.9 + GLIBC_2.9 A + ns_datetosecs F + ns_format_ttl F + ns_get16 F + ns_get32 F + ns_initparse F + ns_makecanon F + ns_msg_getflag F + ns_name_compress F + ns_name_ntol F + ns_name_ntop F + ns_name_pack F + ns_name_pton F + ns_name_rollback F + ns_name_skip F + ns_name_uncompress F + ns_name_unpack F + ns_parse_ttl F + ns_parserr F + ns_put16 F + ns_put32 F + ns_samedomain F + ns_samename F + ns_skiprr F + ns_sprintrr F + ns_sprintrrf F + ns_subdomain F diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/librt.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/librt.abilist new file mode 100644 index 0000000000..466df4d93b --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/librt.abilist @@ -0,0 +1,44 @@ +GLIBC_2.4 + GLIBC_2.4 A + aio_cancel F + aio_cancel64 F + aio_error F + aio_error64 F + aio_fsync F + aio_fsync64 F + aio_init F + aio_read F + aio_read64 F + aio_return F + aio_return64 F + aio_suspend F + aio_suspend64 F + aio_write F + aio_write64 F + clock_getcpuclockid F + clock_getres F + clock_gettime F + clock_nanosleep F + clock_settime F + lio_listio F + lio_listio64 F + mq_close F + mq_getattr F + mq_notify F + mq_open F + mq_receive F + mq_send F + mq_setattr F + mq_timedreceive F + mq_timedsend F + mq_unlink F + shm_open F + shm_unlink F + timer_create F + timer_delete F + timer_getoverrun F + timer_gettime F + timer_settime F +GLIBC_2.7 + GLIBC_2.7 A + __mq_open_2 F diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libthread_db.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libthread_db.abilist new file mode 100644 index 0000000000..523772441b --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libthread_db.abilist @@ -0,0 +1,42 @@ +GLIBC_2.4 + GLIBC_2.4 A + td_init F + td_log F + td_symbol_list F + td_ta_clear_event F + td_ta_delete F + td_ta_enable_stats F + td_ta_event_addr F + td_ta_event_getmsg F + td_ta_get_nthreads F + td_ta_get_ph F + td_ta_get_stats F + td_ta_map_id2thr F + td_ta_map_lwp2thr F + td_ta_new F + td_ta_reset_stats F + td_ta_set_event F + td_ta_setconcurrency F + td_ta_thr_iter F + td_ta_tsd_iter F + td_thr_clear_event F + td_thr_dbresume F + td_thr_dbsuspend F + td_thr_event_enable F + td_thr_event_getmsg F + td_thr_get_info F + td_thr_getfpregs F + td_thr_getgregs F + td_thr_getxregs F + td_thr_getxregsize F + td_thr_set_event F + td_thr_setfpregs F + td_thr_setgregs F + td_thr_setprio F + td_thr_setsigpending F + td_thr_setxregs F + td_thr_sigsetmask F + td_thr_tls_get_addr F + td_thr_tlsbase F + td_thr_tsd F + td_thr_validate F diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libutil.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libutil.abilist new file mode 100644 index 0000000000..6cb71966a1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libutil.abilist @@ -0,0 +1,8 @@ +GLIBC_2.4 + GLIBC_2.4 A + forkpty F + login F + login_tty F + logout F + logwtmp F + openpty F diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/ld.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/ld.abilist new file mode 100644 index 0000000000..fc11e36345 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/ld.abilist @@ -0,0 +1,18 @@ +GLIBC_2.0 + GLIBC_2.0 A + __libc_memalign F + _r_debug D 0x14 + calloc F + free F + malloc F + realloc F +GLIBC_2.1 + GLIBC_2.1 A + __libc_stack_end D 0x4 + _dl_mcount F +GLIBC_2.3 + GLIBC_2.3 A + __tls_get_addr F +GLIBC_2.4 + GLIBC_2.4 A + __stack_chk_guard D 0x4 diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libBrokenLocale.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libBrokenLocale.abilist new file mode 100644 index 0000000000..f4ca37f44b --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libBrokenLocale.abilist @@ -0,0 +1,3 @@ +GLIBC_2.0 + GLIBC_2.0 A + __ctype_get_mb_cur_max F diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libanl.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libanl.abilist new file mode 100644 index 0000000000..c9755d8a33 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libanl.abilist @@ -0,0 +1,6 @@ +GLIBC_2.2.3 + GLIBC_2.2.3 A + gai_cancel F + gai_error F + gai_suspend F + getaddrinfo_a F diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libc.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libc.abilist new file mode 100644 index 0000000000..71bd0eb523 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libc.abilist @@ -0,0 +1,2282 @@ +GCC_3.0 + GCC_3.0 A + _Unwind_Find_FDE F + __deregister_frame_info_bases F + __register_frame_info_bases F + __register_frame_info_table_bases F +GLIBC_2.0 + GLIBC_2.0 A + _IO_adjust_column F + _IO_default_doallocate F + _IO_default_finish F + _IO_default_pbackfail F + _IO_default_uflow F + _IO_default_xsgetn F + _IO_default_xsputn F + _IO_do_write F + _IO_doallocbuf F + _IO_fclose F + _IO_fdopen F + _IO_feof F + _IO_ferror F + _IO_fflush F + _IO_fgetpos F + _IO_fgets F + _IO_file_attach F + _IO_file_close F + _IO_file_close_it F + _IO_file_doallocate F + _IO_file_fopen F + _IO_file_init F + _IO_file_jumps D 0x54 + _IO_file_open F + _IO_file_overflow F + _IO_file_read F + _IO_file_seek F + _IO_file_seekoff F + _IO_file_setbuf F + _IO_file_stat F + _IO_file_sync F + _IO_file_underflow F + _IO_file_write F + _IO_file_xsputn F + _IO_flockfile F + _IO_flush_all F + _IO_flush_all_linebuffered F + _IO_fopen F + _IO_fprintf F + _IO_fputs F + _IO_fread F + _IO_free_backup_area F + _IO_fsetpos F + _IO_ftell F + _IO_ftrylockfile F + _IO_funlockfile F + _IO_fwrite F + _IO_getc F + _IO_getline F + _IO_gets F + _IO_init F + _IO_init_marker F + _IO_link_in F + _IO_list_all D 0x4 + _IO_marker_delta F + _IO_marker_difference F + _IO_padn F + _IO_peekc_locked F + _IO_popen F + _IO_printf F + _IO_proc_close F + _IO_proc_open F + _IO_putc F + _IO_puts F + _IO_remove_marker F + _IO_seekmark F + _IO_seekoff F + _IO_seekpos F + _IO_setb F + _IO_setbuffer F + _IO_setvbuf F + _IO_sgetn F + _IO_sprintf F + _IO_sputbackc F + _IO_sscanf F + _IO_stderr_ D 0x50 + _IO_stdin_ D 0x50 + _IO_stdout_ D 0x50 + _IO_str_init_readonly F + _IO_str_init_static F + _IO_str_overflow F + _IO_str_pbackfail F + _IO_str_seekoff F + _IO_str_underflow F + _IO_sungetc F + _IO_switch_to_get_mode F + _IO_un_link F + _IO_ungetc F + _IO_unsave_markers F + _IO_vfprintf F + _IO_vfscanf F + _IO_vsprintf F + ___brk_addr D 0x4 + __adjtimex F + __after_morecore_hook D 0x4 + __argz_count F + __argz_next F + __argz_stringify F + __assert_fail F + __assert_perror_fail F + __bsd_getpgrp F + __bzero F + __check_rhosts_file D 0x4 + __clone F + __close F + __cmsg_nxthdr F + __connect F + __ctype32_b D 0x4 + __ctype_b D 0x4 + __ctype_get_mb_cur_max F + __ctype_tolower D 0x4 + __ctype_toupper D 0x4 + __curbrk D 0x4 + __daylight D 0x4 + __dcgettext F + __default_morecore F + __deregister_frame F + __deregister_frame_info F + __dgettext F + __divdi3 F + __dup2 F + __environ D 0x4 + __errno_location F + __fcntl F + __ffs F + __finite F + __finitef F + __finitel F + __fork F + __fpu_control D 0x4 + __frame_state_for F + __free_hook D 0x4 + __fxstat F + __getdelim F + __getpagesize F + __getpgid F + __getpid F + __gettimeofday F + __gmtime_r F + __h_errno_location F + __isinf F + __isinff F + __isinfl F + __isnan F + __isnanf F + __isnanl F + __iswctype F + __ivaliduser F + __libc_calloc F + __libc_free F + __libc_init_first F + __libc_mallinfo F + __libc_malloc F + __libc_mallopt F + __libc_memalign F + __libc_pvalloc F + __libc_realloc F + __libc_start_main F + __libc_valloc F + __lseek F + __lxstat F + __malloc_hook D 0x4 + __malloc_initialize_hook D 0x4 + __mbrlen F + __mbrtowc F + __memalign_hook D 0x4 + __mempcpy F + __moddi3 F + __monstartup F + __morecore D 0x4 + __nss_configure_lookup F + __nss_database_lookup F + __nss_group_lookup F + __nss_hosts_lookup F + __nss_next F + __nss_passwd_lookup F + __open F + __overflow F + __pipe F + __printf_fp F + __profile_frequency F + __progname D 0x4 + __progname_full D 0x4 + __rcmd_errstr D 0x4 + __read F + __realloc_hook D 0x4 + __register_frame F + __register_frame_info F + __register_frame_info_table F + __register_frame_table F + __res_randomid F + __sbrk F + __sched_get_priority_max F + __sched_get_priority_min F + __sched_getparam F + __sched_getscheduler F + __sched_setscheduler F + __sched_yield F + __secure_getenv F + __select F + __send F + __setpgid F + __sigaction F + __sigaddset F + __sigdelset F + __sigismember F + __sigpause F + __sigsetjmp F + __stpcpy F + __stpncpy F + __strcasecmp F + __strdup F + __strerror_r F + __strtod_internal F + __strtof_internal F + __strtok_r F + __strtol_internal F + __strtold_internal F + __strtoll_internal F + __strtoq_internal F + __strtoul_internal F + __strtoull_internal F + __strtouq_internal F + __sysv_signal F + __timezone D 0x4 + __tzname D 0x8 + __udivdi3 F + __uflow F + __umoddi3 F + __underflow F + __vfscanf F + __vsnprintf F + __vsscanf F + __wait F + __waitpid F + __wcstod_internal F + __wcstof_internal F + __wcstol_internal F + __wcstold_internal F + __wcstoll_internal F + __wcstoul_internal F + __wcstoull_internal F + __write F + __xmknod F + __xpg_basename F + __xstat F + _environ D 0x4 + _exit F + _libc_intl_domainname D 0x5 + _longjmp F + _mcleanup F + _mcount F + _nl_default_dirname D 0x12 + _nl_domain_bindings D 0x4 + _nl_msg_cat_cntr D 0x4 + _null_auth D 0xc + _obstack D 0x4 + _obstack_allocated_p F + _obstack_begin F + _obstack_begin_1 F + _obstack_free F + _obstack_memory_used F + _obstack_newchunk F + _res D 0x1fe + _rpc_dtablesize F + _seterr_reply F + _setjmp F + _sys_errlist D 0x1ec + _sys_nerr D 0x4 + _sys_siglist D 0x80 + _tolower F + _toupper F + a64l F + abort F + abs F + accept F + access F + acct F + addmntent F + adjtime F + adjtimex F + advance F + alarm F + alphasort F + argz_add F + argz_add_sep F + argz_append F + argz_count F + argz_create F + argz_create_sep F + argz_delete F + argz_extract F + argz_insert F + argz_next F + argz_replace F + argz_stringify F + asctime F + asctime_r F + asprintf F + atexit F + atof F + atoi F + atol F + atoll F + authnone_create F + authunix_create F + authunix_create_default F + basename F + bcmp F + bcopy F + bdflush F + bind F + bindresvport F + bindtextdomain F + brk F + bsd_signal F + bsearch F + btowc F + bzero F + cacheflush F + calloc F + callrpc F + canonicalize_file_name F + catclose F + catgets F + catopen F + cfgetispeed F + cfgetospeed F + cfmakeraw F + cfree F + cfsetispeed F + cfsetospeed F + cfsetspeed F + chdir F + chflags F + chmod F + chown F + chroot F + clearenv F + clearerr F + clearerr_unlocked F + clnt_broadcast F + clnt_create F + clnt_pcreateerror F + clnt_perrno F + clnt_perror F + clnt_spcreateerror F + clnt_sperrno F + clnt_sperror F + clntraw_create F + clnttcp_create F + clntudp_bufcreate F + clntudp_create F + clock F + clone F + close F + closedir F + closelog F + confstr F + connect F + copysign F + copysignf F + copysignl F + creat F + create_module F + ctermid F + ctime F + ctime_r F + cuserid F + daemon F + daylight D 0x4 + dcgettext F + delete_module F + dgettext F + difftime F + dirfd F + dirname F + div F + dprintf F + drand48 F + drand48_r F + dup F + dup2 F + dysize F + ecvt F + ecvt_r F + endaliasent F + endfsent F + endgrent F + endhostent F + endmntent F + endnetent F + endnetgrent F + endprotoent F + endpwent F + endrpcent F + endservent F + endspent F + endttyent F + endusershell F + endutent F + environ D 0x4 + envz_add F + envz_entry F + envz_get F + envz_merge F + envz_remove F + envz_strip F + erand48 F + erand48_r F + err F + error F + error_at_line F + error_message_count D 0x4 + error_one_per_line D 0x4 + error_print_progname D 0x4 + errx F + ether_aton F + ether_aton_r F + ether_hostton F + ether_line F + ether_ntoa F + ether_ntoa_r F + ether_ntohost F + euidaccess F + execl F + execle F + execlp F + execv F + execve F + execvp F + exit F + fchdir F + fchflags F + fchmod F + fchown F + fclose F + fcloseall F + fcntl F + fcvt F + fcvt_r F + fdatasync F + fdopen F + feof F + feof_unlocked F + ferror F + ferror_unlocked F + fexecve F + fflush F + fflush_unlocked F + ffs F + fgetc F + fgetgrent F + fgetgrent_r F + fgetpos F + fgetpwent F + fgetpwent_r F + fgets F + fgetspent F + fgetspent_r F + fileno F + fileno_unlocked F + finite F + finitef F + finitel F + flock F + flockfile F + fnmatch F + fopen F + fopencookie F + fork F + fpathconf F + fprintf F + fputc F + fputc_unlocked F + fputs F + fread F + free F + freeaddrinfo F + freopen F + frexp F + frexpf F + frexpl F + fscanf F + fseek F + fsetpos F + fstatfs F + fsync F + ftell F + ftime F + ftok F + ftruncate F + ftrylockfile F + fts_children F + fts_close F + fts_open F + fts_read F + fts_set F + ftw F + funlockfile F + fwrite F + gcvt F + get_avphys_pages F + get_current_dir_name F + get_kernel_syms F + get_myaddress F + get_nprocs F + get_nprocs_conf F + get_phys_pages F + getaddrinfo F + getaliasbyname F + getaliasbyname_r F + getaliasent F + getaliasent_r F + getc F + getc_unlocked F + getchar F + getchar_unlocked F + getcwd F + getdelim F + getdirentries F + getdomainname F + getdtablesize F + getegid F + getenv F + geteuid F + getfsent F + getfsfile F + getfsspec F + getgid F + getgrent F + getgrent_r F + getgrgid F + getgrgid_r F + getgrnam F + getgrnam_r F + getgroups F + gethostbyaddr F + gethostbyaddr_r F + gethostbyname F + gethostbyname2 F + gethostbyname2_r F + gethostbyname_r F + gethostent F + gethostent_r F + gethostid F + gethostname F + getitimer F + getline F + getlogin F + getlogin_r F + getmntent F + getmntent_r F + getnetbyaddr F + getnetbyaddr_r F + getnetbyname F + getnetbyname_r F + getnetent F + getnetent_r F + getnetgrent F + getnetgrent_r F + getopt F + getopt_long F + getopt_long_only F + getpagesize F + getpass F + getpeername F + getpgid F + getpgrp F + getpid F + getppid F + getpriority F + getprotobyname F + getprotobyname_r F + getprotobynumber F + getprotobynumber_r F + getprotoent F + getprotoent_r F + getpublickey F + getpw F + getpwent F + getpwent_r F + getpwnam F + getpwnam_r F + getpwuid F + getpwuid_r F + getresgid F + getresuid F + getrlimit F + getrpcbyname F + getrpcbyname_r F + getrpcbynumber F + getrpcbynumber_r F + getrpcent F + getrpcent_r F + getrpcport F + getrusage F + gets F + getsecretkey F + getservbyname F + getservbyname_r F + getservbyport F + getservbyport_r F + getservent F + getservent_r F + getsid F + getsockname F + getsockopt F + getspent F + getspent_r F + getspnam F + getspnam_r F + getsubopt F + gettext F + gettimeofday F + getttyent F + getttynam F + getuid F + getusershell F + getutent F + getutent_r F + getutid F + getutid_r F + getutline F + getutline_r F + getw F + getwd F + glob F + glob_pattern_p F + globfree F + gmtime F + gmtime_r F + group_member F + gsignal F + gtty F + h_errlist D 0x14 + h_nerr D 0x4 + hasmntopt F + hcreate F + hcreate_r F + hdestroy F + hdestroy_r F + herror F + hsearch F + hsearch_r F + hstrerror F + htonl F + htons F + index F + inet_addr F + inet_aton F + inet_lnaof F + inet_makeaddr F + inet_netof F + inet_network F + inet_nsap_addr F + inet_nsap_ntoa F + inet_ntoa F + inet_ntop F + inet_pton F + init_module F + initgroups F + initstate F + initstate_r F + innetgr F + insque F + ioctl F + iruserok F + isalnum F + isalpha F + isascii F + isatty F + isblank F + iscntrl F + isdigit F + isfdtype F + isgraph F + isinf F + isinff F + isinfl F + islower F + isnan F + isnanf F + isnanl F + isprint F + ispunct F + isspace F + isupper F + iswalnum F + iswalpha F + iswcntrl F + iswctype F + iswdigit F + iswgraph F + iswlower F + iswprint F + iswpunct F + iswspace F + iswupper F + iswxdigit F + isxdigit F + jrand48 F + jrand48_r F + kill F + killpg F + klogctl F + l64a F + labs F + lchown F + lckpwdf F + lcong48 F + lcong48_r F + ldexp F + ldexpf F + ldexpl F + ldiv F + lfind F + link F + listen F + llabs F + lldiv F + llseek F + loc1 D 0x4 + loc2 D 0x4 + localeconv F + localtime F + localtime_r F + lockf F + locs D 0x4 + longjmp F + lrand48 F + lrand48_r F + lsearch F + lseek F + madvise F + mallinfo F + malloc F + malloc_get_state F + malloc_set_state F + malloc_stats F + malloc_trim F + malloc_usable_size F + mallopt F + mallwatch D 0x4 + mblen F + mbrlen F + mbrtowc F + mbsinit F + mbsnrtowcs F + mbsrtowcs F + mbstowcs F + mbtowc F + mcheck F + mcount F + memalign F + memccpy F + memchr F + memcmp F + memcpy F + memfrob F + memmem F + memmove F + memset F + mkdir F + mkfifo F + mkstemp F + mktemp F + mktime F + mlock F + mlockall F + mmap F + modf F + modff F + modfl F + monstartup F + mount F + mprobe F + mprotect F + mrand48 F + mrand48_r F + mremap F + msgctl F + msgget F + msgrcv F + msgsnd F + msync F + mtrace F + munlock F + munlockall F + munmap F + muntrace F + nanosleep F + nfsservctl F + nice F + nl_langinfo F + nrand48 F + nrand48_r F + ntohl F + ntohs F + obstack_alloc_failed_handler D 0x4 + obstack_exit_failure D 0x4 + obstack_free F + obstack_printf F + obstack_vprintf F + on_exit F + open F + open_memstream F + opendir F + openlog F + optarg D 0x4 + opterr D 0x4 + optind D 0x4 + optopt D 0x4 + parse_printf_format F + pathconf F + pause F + pclose F + perror F + personality F + pipe F + pmap_getmaps F + pmap_getport F + pmap_rmtcall F + pmap_set F + pmap_unset F + poll F + popen F + prctl F + printf F + profil F + program_invocation_name D 0x4 + program_invocation_short_name D 0x4 + pselect F + psignal F + pthread_attr_destroy F + pthread_attr_getdetachstate F + pthread_attr_getinheritsched F + pthread_attr_getschedparam F + pthread_attr_getschedpolicy F + pthread_attr_getscope F + pthread_attr_init F + pthread_attr_setdetachstate F + pthread_attr_setinheritsched F + pthread_attr_setschedparam F + pthread_attr_setschedpolicy F + pthread_attr_setscope F + pthread_cond_broadcast F + pthread_cond_destroy F + pthread_cond_init F + pthread_cond_signal F + pthread_cond_timedwait F + pthread_cond_wait F + pthread_condattr_destroy F + pthread_condattr_init F + pthread_equal F + pthread_exit F + pthread_getschedparam F + pthread_mutex_destroy F + pthread_mutex_init F + pthread_mutex_lock F + pthread_mutex_unlock F + pthread_self F + pthread_setcancelstate F + pthread_setcanceltype F + pthread_setschedparam F + ptrace F + putc F + putc_unlocked F + putchar F + putchar_unlocked F + putenv F + putpwent F + puts F + putspent F + pututline F + putw F + pvalloc F + qecvt F + qecvt_r F + qfcvt F + qfcvt_r F + qgcvt F + qsort F + query_module F + quotactl F + raise F + rand F + rand_r F + random F + random_r F + rcmd F + re_comp F + re_compile_fastmap F + re_compile_pattern F + re_exec F + re_match F + re_match_2 F + re_max_failures D 0x4 + re_search F + re_search_2 F + re_set_registers F + re_set_syntax F + re_syntax_options D 0x4 + read F + readdir F + readdir_r F + readlink F + readv F + realloc F + realpath F + reboot F + recv F + recvfrom F + recvmsg F + regcomp F + regerror F + regexec F + regfree F + register_printf_function F + registerrpc F + remove F + remque F + rename F + res_init F + revoke F + rewind F + rewinddir F + rexec F + rexecoptions D 0x4 + rindex F + rmdir F + rpc_createerr D 0x10 + rpmatch F + rresvport F + ruserok F + ruserpass F + sbrk F + scalbn F + scalbnf F + scalbnl F + scandir F + scanf F + sched_get_priority_max F + sched_get_priority_min F + sched_getparam F + sched_getscheduler F + sched_rr_get_interval F + sched_setparam F + sched_setscheduler F + sched_yield F + seed48 F + seed48_r F + seekdir F + select F + semctl F + semget F + semop F + send F + sendmsg F + sendto F + setaliasent F + setbuf F + setbuffer F + setcontext F + setdomainname F + setegid F + setenv F + seteuid F + setfsent F + setfsgid F + setfsuid F + setgid F + setgrent F + setgroups F + sethostent F + sethostid F + sethostname F + setitimer F + setjmp F + setlinebuf F + setlocale F + setlogin F + setlogmask F + setmntent F + setnetent F + setnetgrent F + setpgid F + setpgrp F + setpriority F + setprotoent F + setpwent F + setregid F + setresgid F + setresuid F + setreuid F + setrlimit F + setrpcent F + setservent F + setsid F + setsockopt F + setspent F + setstate F + setstate_r F + settimeofday F + setttyent F + setuid F + setusershell F + setutent F + setvbuf F + sgetspent F + sgetspent_r F + shmat F + shmctl F + shmdt F + shmget F + shutdown F + sigaction F + sigaddset F + sigaltstack F + sigandset F + sigblock F + sigdelset F + sigemptyset F + sigfillset F + siggetmask F + siginterrupt F + sigisemptyset F + sigismember F + siglongjmp F + signal F + sigorset F + sigpause F + sigpending F + sigprocmask F + sigreturn F + sigsetmask F + sigstack F + sigsuspend F + sigvec F + sigwait F + sleep F + snprintf F + socket F + socketpair F + sprintf F + srand F + srand48 F + srand48_r F + srandom F + srandom_r F + sscanf F + ssignal F + sstk F + statfs F + stderr D 0x4 + stdin D 0x4 + stdout D 0x4 + step F + stime F + stpcpy F + stpncpy F + strcasecmp F + strcat F + strchr F + strcmp F + strcoll F + strcpy F + strcspn F + strdup F + strerror F + strerror_r F + strfmon F + strfry F + strftime F + strlen F + strncasecmp F + strncat F + strncmp F + strncpy F + strndup F + strnlen F + strpbrk F + strptime F + strrchr F + strsep F + strsignal F + strspn F + strstr F + strtod F + strtof F + strtok F + strtok_r F + strtol F + strtold F + strtoll F + strtoq F + strtoul F + strtoull F + strtouq F + strxfrm F + stty F + svc_exit F + svc_fdset D 0x80 + svc_getreq F + svc_getreqset F + svc_register F + svc_run F + svc_sendreply F + svc_unregister F + svcauthdes_stats D 0xc + svcerr_auth F + svcerr_decode F + svcerr_noproc F + svcerr_noprog F + svcerr_progvers F + svcerr_systemerr F + svcerr_weakauth F + svcfd_create F + svcraw_create F + svctcp_create F + svcudp_bufcreate F + svcudp_create F + svcudp_enablecache F + swab F + swapoff F + swapon F + symlink F + sync F + sys_errlist D 0x1ec + sys_nerr D 0x4 + sys_sigabbrev D 0x80 + sys_siglist D 0x80 + syscall F + sysconf F + sysctl F + sysinfo F + syslog F + system F + tcdrain F + tcflow F + tcflush F + tcgetattr F + tcgetpgrp F + tcsendbreak F + tcsetattr F + tcsetpgrp F + tdelete F + telldir F + tempnam F + textdomain F + tfind F + time F + timegm F + timelocal F + times F + timezone D 0x4 + tmpfile F + tmpnam F + tmpnam_r F + toascii F + tolower F + toupper F + towctrans F + towlower F + towupper F + tr_break F + truncate F + tsearch F + ttyname F + ttyname_r F + ttyslot F + twalk F + tzname D 0x8 + tzset F + ualarm F + ulckpwdf F + ulimit F + umask F + umount F + uname F + ungetc F + unlink F + unsetenv F + updwtmp F + uselib F + usleep F + ustat F + utime F + utimes F + utmpname F + valloc F + vasprintf F + vdprintf F + verr F + verrx F + vfork F + vfprintf F + vfscanf F + vhangup F + vlimit F + vprintf F + vscanf F + vsnprintf F + vsprintf F + vsscanf F + vsyslog F + vtimes F + vwarn F + vwarnx F + wait F + wait3 F + wait4 F + waitpid F + warn F + warnx F + wcpcpy F + wcpncpy F + wcrtomb F + wcscat F + wcschr F + wcscmp F + wcscoll F + wcscpy F + wcscspn F + wcsdup F + wcslen F + wcsncat F + wcsncmp F + wcsncpy F + wcsnrtombs F + wcspbrk F + wcsrchr F + wcsrtombs F + wcsspn F + wcsstr F + wcstod F + wcstof F + wcstok F + wcstol F + wcstold F + wcstombs F + wcstoq F + wcstoul F + wcstouq F + wcswidth F + wcsxfrm F + wctob F + wctomb F + wctrans F + wctype F + wcwidth F + wmemchr F + wmemcmp F + wmemcpy F + wmemmove F + wmemset F + write F + writev F + xdr_accepted_reply F + xdr_array F + xdr_authunix_parms F + xdr_bool F + xdr_bytes F + xdr_callhdr F + xdr_callmsg F + xdr_char F + xdr_cryptkeyarg F + xdr_cryptkeyarg2 F + xdr_cryptkeyres F + xdr_des_block F + xdr_double F + xdr_enum F + xdr_float F + xdr_free F + xdr_int F + xdr_key_netstarg F + xdr_key_netstres F + xdr_keybuf F + xdr_keystatus F + xdr_long F + xdr_netobj F + xdr_opaque F + xdr_opaque_auth F + xdr_pmap F + xdr_pmaplist F + xdr_pointer F + xdr_reference F + xdr_rejected_reply F + xdr_replymsg F + xdr_rmtcall_args F + xdr_rmtcallres F + xdr_short F + xdr_string F + xdr_u_char F + xdr_u_int F + xdr_u_long F + xdr_u_short F + xdr_union F + xdr_vector F + xdr_void F + xdr_wrapstring F + xdrmem_create F + xdrrec_create F + xdrrec_endofrecord F + xdrrec_eof F + xdrrec_skiprecord F + xdrstdio_create F + xencrypt F + xprt_register F + xprt_unregister F +GLIBC_2.1 + GLIBC_2.1 A + _IO_2_1_stderr_ D 0x98 + _IO_2_1_stdin_ D 0x98 + _IO_2_1_stdout_ D 0x98 + _IO_do_write F + _IO_fclose F + _IO_fdopen F + _IO_fgetpos64 F + _IO_file_attach F + _IO_file_close_it F + _IO_file_finish F + _IO_file_fopen F + _IO_file_init F + _IO_file_overflow F + _IO_file_seekoff F + _IO_file_setbuf F + _IO_file_sync F + _IO_file_underflow F + _IO_file_write F + _IO_file_xsputn F + _IO_fopen F + _IO_fsetpos64 F + _IO_getline_info F + _IO_popen F + _IO_proc_close F + _IO_proc_open F + __asprintf F + __backtrace F + __backtrace_symbols F + __backtrace_symbols_fd F + __duplocale F + __freelocale F + __fxstat64 F + __isalnum_l F + __isalpha_l F + __isascii_l F + __isblank_l F + __iscntrl_l F + __isdigit_l F + __isgraph_l F + __islower_l F + __isprint_l F + __ispunct_l F + __isspace_l F + __isupper_l F + __iswalnum_l F + __iswalpha_l F + __iswblank_l F + __iswcntrl_l F + __iswctype_l F + __iswdigit_l F + __iswgraph_l F + __iswlower_l F + __iswprint_l F + __iswpunct_l F + __iswspace_l F + __iswupper_l F + __iswxdigit_l F + __isxdigit_l F + __key_decryptsession_pk_LOCAL D 0x4 + __key_encryptsession_pk_LOCAL D 0x4 + __key_gendes_LOCAL D 0x4 + __libc_allocate_rtsig F + __libc_current_sigrtmax F + __libc_current_sigrtmin F + __libc_freeres F + __libc_sa_len F + __lxstat64 F + __newlocale F + __poll F + __pread64 F + __pwrite64 F + __rawmemchr F + __signbit F + __signbitf F + __signbitl F + __strcasecmp_l F + __strcasestr F + __strcoll_l F + __strfmon_l F + __strncasecmp_l F + __strtod_l F + __strtof_l F + __strtol_l F + __strtold_l F + __strtoll_l F + __strtoul_l F + __strtoull_l F + __strxfrm_l F + __toascii_l F + __tolower_l F + __toupper_l F + __towctrans F + __towctrans_l F + __towlower_l F + __towupper_l F + __wcscasecmp_l F + __wcscoll_l F + __wcsncasecmp_l F + __wcstod_l F + __wcstof_l F + __wcstol_l F + __wcstold_l F + __wcstoll_l F + __wcstoul_l F + __wcstoull_l F + __wcsxfrm_l F + __wctype_l F + __xstat64 F + _authenticate F + _dl_mcount_wrapper F + _dl_mcount_wrapper_check F + _sys_errlist D 0x1f4 + _sys_nerr D 0x4 + _sys_siglist D 0x100 + addseverity F + alphasort64 F + argp_err_exit_status D 0x4 + argp_error F + argp_failure F + argp_help F + argp_parse F + argp_program_bug_address D 0x4 + argp_program_version D 0x4 + argp_program_version_hook D 0x4 + argp_state_help F + argp_usage F + authdes_create F + authdes_getucred F + authdes_pk_create F + backtrace F + backtrace_symbols F + backtrace_symbols_fd F + capget F + capset F + cbc_crypt F + clntunix_create F + creat64 F + des_setparity F + ecb_crypt F + endutxent F + fattach F + fclose F + fdetach F + fdopen F + ffsl F + ffsll F + fgetc_unlocked F + fgetpos64 F + fgets_unlocked F + fmtmsg F + fopen F + fopen64 F + fputs_unlocked F + fread_unlocked F + freopen64 F + fseeko F + fseeko64 F + fsetpos64 F + fstatfs64 F + fstatvfs F + fstatvfs64 F + ftello F + ftello64 F + ftruncate64 F + ftw64 F + fwrite_unlocked F + gai_strerror F + getcontext F + getdate F + getdate_err D 0x4 + getdate_r F + getmsg F + getnameinfo F + getnetname F + getpmsg F + getpt F + getrlimit64 F + getutxent F + getutxid F + getutxline F + glob64 F + globfree64 F + gnu_get_libc_release F + gnu_get_libc_version F + grantpt F + host2netname F + iconv F + iconv_close F + iconv_open F + if_freenameindex F + if_indextoname F + if_nameindex F + if_nametoindex F + in6addr_any D 0x10 + in6addr_loopback D 0x10 + isastream F + iswblank F + key_decryptsession F + key_decryptsession_pk F + key_encryptsession F + key_encryptsession_pk F + key_gendes F + key_get_conv F + key_secretkey_is_set F + key_setnet F + key_setsecret F + lockf64 F + lseek64 F + makecontext F + mempcpy F + mmap64 F + netname2host F + netname2user F + nftw F + nftw64 F + ntp_adjtime F + ntp_gettime F + open64 F + passwd2des F + pclose F + popen F + pread F + pread64 F + printf_size F + printf_size_info F + pthread_attr_init F + ptsname F + ptsname_r F + putgrent F + putmsg F + putpmsg F + pututxline F + pwrite F + pwrite64 F + rawmemchr F + readdir64 F + readdir64_r F + rtime F + scalbln F + scalblnf F + scalblnl F + scandir64 F + sendfile F + setrlimit64 F + setutxent F + sighold F + sigignore F + sigqueue F + sigrelse F + sigset F + sigtimedwait F + sigwaitinfo F + statfs64 F + statvfs F + statvfs64 F + strcasestr F + strtoimax F + strtoumax F + strverscmp F + svcunix_create F + svcunixfd_create F + swapcontext F + sys_errlist D 0x1f4 + sys_nerr D 0x4 + sys_sigabbrev D 0x100 + sys_siglist D 0x100 + sysv_signal F + tcgetsid F + tdestroy F + tmpfile F + tmpfile64 F + truncate64 F + umount2 F + unlockpt F + updwtmpx F + user2netname F + utmpxname F + versionsort F + versionsort64 F + waitid F + wcscasecmp F + wcsncasecmp F + wcsnlen F + wcstoimax F + wcstoll F + wcstoull F + wcstoumax F + wcswcs F + wordexp F + wordfree F + xdecrypt F + xdr_authdes_cred F + xdr_authdes_verf F + xdr_getcredres F + xdr_int16_t F + xdr_int32_t F + xdr_int8_t F + xdr_netnamestr F + xdr_sizeof F + xdr_uint16_t F + xdr_uint32_t F + xdr_uint8_t F + xdr_unixcred F +GLIBC_2.1.1 + GLIBC_2.1.1 A + _Exit F + __mempcpy_small F + __stpcpy_small F + __strcpy_small F + __strcspn_c1 F + __strcspn_c2 F + __strcspn_c3 F + __strpbrk_c2 F + __strpbrk_c3 F + __strsep_1c F + __strsep_2c F + __strsep_3c F + __strsep_g F + __strspn_c1 F + __strspn_c2 F + __strspn_c3 F + __strtok_r_1c F + __strverscmp F + getutmp F + getutmpx F + imaxabs F + imaxdiv F + strchrnul F + xdr_hyper F + xdr_int64_t F + xdr_longlong_t F + xdr_u_hyper F + xdr_u_longlong_t F + xdr_uint64_t F +GLIBC_2.1.2 + GLIBC_2.1.2 A + __vfork F + getaliasbyname_r F + getaliasent_r F + getgrent_r F + getgrgid_r F + getgrnam_r F + gethostbyaddr_r F + gethostbyname2_r F + gethostbyname_r F + gethostent_r F + getnetbyaddr_r F + getnetbyname_r F + getnetent_r F + getprotobyname_r F + getprotobynumber_r F + getprotoent_r F + getpwent_r F + getpwnam_r F + getpwuid_r F + getrpcbyname_r F + getrpcbynumber_r F + getrpcent_r F + getservbyname_r F + getservbyport_r F + getservent_r F + getspent_r F + getspnam_r F +GLIBC_2.1.3 + GLIBC_2.1.3 A + __cxa_atexit F + __cxa_finalize F + __sigsuspend F +GLIBC_2.10 + GLIBC_2.10 A + __cxa_at_quick_exit F + __posix_getopt F + accept4 F + endsgent F + fallocate F + fgetsgent F + fgetsgent_r F + getsgent F + getsgent_r F + getsgnam F + getsgnam_r F + malloc_info F + preadv F + preadv64 F + psiginfo F + putsgent F + pwritev F + pwritev64 F + quick_exit F + register_printf_modifier F + register_printf_specifier F + register_printf_type F + setsgent F + sgetsgent F + sgetsgent_r F +GLIBC_2.11 + GLIBC_2.11 A + __longjmp_chk F + execvpe F + fallocate64 F + mkostemps F + mkostemps64 F + mkstemps F + mkstemps64 F +GLIBC_2.12 + GLIBC_2.12 A + __m68k_read_tp F + _sys_errlist D 0x21c + _sys_nerr D 0x4 + ntp_gettimex F + recvmmsg F + sys_errlist D 0x21c + sys_nerr D 0x4 +GLIBC_2.13 + GLIBC_2.13 A + fanotify_init F + fanotify_mark F + prlimit F + prlimit64 F +GLIBC_2.14 + GLIBC_2.14 A + clock_adjtime F + name_to_handle_at F + open_by_handle_at F + sendmmsg F + setns F + syncfs F +GLIBC_2.15 + GLIBC_2.15 A + __fdelt_chk F + __fdelt_warn F + posix_spawn F + posix_spawnp F + process_vm_readv F + process_vm_writev F + scandirat F + scandirat64 F +GLIBC_2.16 + GLIBC_2.16 A + __poll_chk F + __ppoll_chk F + aligned_alloc F + c16rtomb F + c32rtomb F + mbrtoc16 F + mbrtoc32 F + timespec_get F +GLIBC_2.2 + GLIBC_2.2 A + _IO_adjust_wcolumn F + _IO_fgetpos F + _IO_fgetpos64 F + _IO_free_wbackup_area F + _IO_fsetpos F + _IO_fsetpos64 F + _IO_init_wmarker F + _IO_iter_begin F + _IO_iter_end F + _IO_iter_file F + _IO_iter_next F + _IO_least_wmarker F + _IO_list_lock F + _IO_list_resetlock F + _IO_list_unlock F + _IO_seekwmark F + _IO_sputbackwc F + _IO_sungetwc F + _IO_switch_to_main_wget_area F + _IO_switch_to_wbackup_area F + _IO_switch_to_wget_mode F + _IO_unsave_wmarkers F + _IO_wdefault_doallocate F + _IO_wdefault_finish F + _IO_wdefault_pbackfail F + _IO_wdefault_uflow F + _IO_wdefault_xsgetn F + _IO_wdefault_xsputn F + _IO_wdo_write F + _IO_wdoallocbuf F + _IO_wfile_jumps D 0x54 + _IO_wfile_overflow F + _IO_wfile_seekoff F + _IO_wfile_sync F + _IO_wfile_underflow F + _IO_wfile_xsputn F + _IO_wmarker_delta F + _IO_wsetb F + __assert F + __ctype32_tolower D 0x4 + __ctype32_toupper D 0x4 + __cyg_profile_func_enter F + __cyg_profile_func_exit F + __endmntent F + __fbufsize F + __flbf F + __fpending F + __fpurge F + __freadable F + __freading F + __fsetlocking F + __fwritable F + __fwriting F + __fxstat64 F + __getmntent_r F + __lxstat64 F + __nl_langinfo_l F + __open64 F + __res_init F + __res_nclose F + __res_ninit F + __res_state F + __setmntent F + __statfs F + __strndup F + __sysconf F + __sysctl F + __wctrans_l F + __woverflow F + __wuflow F + __wunderflow F + __xpg_sigpause F + __xstat64 F + _flushlbf F + _res_hconf D 0x30 + alphasort64 F + bind_textdomain_codeset F + dcngettext F + dngettext F + fgetpos F + fgetpos64 F + fgetwc F + fgetwc_unlocked F + fgetws F + fgetws_unlocked F + fmemopen F + fopencookie F + fputwc F + fputwc_unlocked F + fputws F + fputws_unlocked F + fsetpos F + fsetpos64 F + fwide F + fwprintf F + fwscanf F + getdirentries64 F + getloadavg F + getrlimit F + getrlimit64 F + getwc F + getwc_unlocked F + getwchar F + getwchar_unlocked F + glob64 F + iruserok_af F + localeconv F + mcheck_check_all F + mcheck_pedantic F + memrchr F + mincore F + mkdtemp F + mkstemp64 F + moncontrol F + msgctl F + ngettext F + posix_fadvise F + posix_fadvise64 F + posix_fallocate F + posix_fallocate64 F + posix_madvise F + posix_memalign F + posix_spawn F + posix_spawn_file_actions_addclose F + posix_spawn_file_actions_adddup2 F + posix_spawn_file_actions_addopen F + posix_spawn_file_actions_destroy F + posix_spawn_file_actions_init F + posix_spawnattr_destroy F + posix_spawnattr_getflags F + posix_spawnattr_getpgroup F + posix_spawnattr_getschedparam F + posix_spawnattr_getschedpolicy F + posix_spawnattr_getsigdefault F + posix_spawnattr_getsigmask F + posix_spawnattr_init F + posix_spawnattr_setflags F + posix_spawnattr_setpgroup F + posix_spawnattr_setschedparam F + posix_spawnattr_setschedpolicy F + posix_spawnattr_setsigdefault F + posix_spawnattr_setsigmask F + posix_spawnp F + putwc F + putwc_unlocked F + putwchar F + putwchar_unlocked F + rcmd_af F + readdir64 F + readdir64_r F + rexec_af F + rresvport_af F + ruserok_af F + scandir64 F + semctl F + setrlimit F + shmctl F + svc_getreq_common F + svc_getreq_poll F + svc_max_pollfd D 0x4 + svc_pollfd D 0x4 + swprintf F + swscanf F + ungetwc F + versionsort64 F + vfwprintf F + vfwscanf F + vswprintf F + vswscanf F + vwprintf F + vwscanf F + wcschrnul F + wcsftime F + wmempcpy F + wprintf F + wscanf F +GLIBC_2.2.1 + GLIBC_2.2.1 A + pivot_root F + posix_openpt F +GLIBC_2.2.2 + GLIBC_2.2.2 A + __nss_hostname_digits_dots F +GLIBC_2.2.3 + GLIBC_2.2.3 A + __rpc_thread_createerr F + __rpc_thread_svc_fdset F + __rpc_thread_svc_max_pollfd F + __rpc_thread_svc_pollfd F + fnmatch F + sprofil F +GLIBC_2.2.4 + GLIBC_2.2.4 A + dl_iterate_phdr F + getgrouplist F + sockatmark F +GLIBC_2.2.6 + GLIBC_2.2.6 A + __nanosleep F +GLIBC_2.3 + GLIBC_2.3 A + __ctype_b_loc F + __ctype_tolower_loc F + __ctype_toupper_loc F + __isctype F + __strftime_l F + __uselocale F + __wcsftime_l F + _sys_errlist D 0x1f8 + _sys_nerr D 0x4 + duplocale F + fgetxattr F + flistxattr F + freeifaddrs F + freelocale F + fremovexattr F + fsetxattr F + futimes F + getifaddrs F + getxattr F + isalnum_l F + isalpha_l F + isblank_l F + iscntrl_l F + isctype F + isdigit_l F + isgraph_l F + islower_l F + isprint_l F + ispunct_l F + isspace_l F + isupper_l F + iswalnum_l F + iswalpha_l F + iswblank_l F + iswcntrl_l F + iswctype_l F + iswdigit_l F + iswgraph_l F + iswlower_l F + iswprint_l F + iswpunct_l F + iswspace_l F + iswupper_l F + iswxdigit_l F + isxdigit_l F + lgetxattr F + listxattr F + llistxattr F + lremovexattr F + lsetxattr F + lutimes F + newlocale F + nl_langinfo_l F + readahead F + realpath F + removexattr F + sendfile64 F + setxattr F + strcasecmp_l F + strcoll_l F + strfmon_l F + strftime_l F + strncasecmp_l F + strtod_l F + strtof_l F + strtol_l F + strtold_l F + strtoll_l F + strtoul_l F + strtoull_l F + strxfrm_l F + sys_errlist D 0x1f8 + sys_nerr D 0x4 + tolower_l F + toupper_l F + towctrans_l F + towlower_l F + towupper_l F + uselocale F + wcscasecmp_l F + wcscoll_l F + wcsftime_l F + wcsncasecmp_l F + wcstod_l F + wcstof_l F + wcstol_l F + wcstold_l F + wcstoll_l F + wcstoul_l F + wcstoull_l F + wcsxfrm_l F + wctrans_l F + wctype_l F +GLIBC_2.3.2 + GLIBC_2.3.2 A + __register_atfork F + epoll_create F + epoll_ctl F + epoll_wait F + lchmod F + pthread_cond_broadcast F + pthread_cond_destroy F + pthread_cond_init F + pthread_cond_signal F + pthread_cond_timedwait F + pthread_cond_wait F + strptime_l F +GLIBC_2.3.3 + GLIBC_2.3.3 A + _sys_siglist D 0x104 + gnu_dev_major F + gnu_dev_makedev F + gnu_dev_minor F + inet6_option_alloc F + inet6_option_append F + inet6_option_find F + inet6_option_init F + inet6_option_next F + inet6_option_space F + nftw F + nftw64 F + posix_fadvise64 F + posix_fallocate64 F + remap_file_pages F + sched_getaffinity F + sched_setaffinity F + semtimedop F + sys_sigabbrev D 0x104 + sys_siglist D 0x104 +GLIBC_2.3.4 + GLIBC_2.3.4 A + __chk_fail F + __fprintf_chk F + __gets_chk F + __memcpy_chk F + __memmove_chk F + __mempcpy_chk F + __memset_chk F + __printf_chk F + __snprintf_chk F + __sprintf_chk F + __stpcpy_chk F + __strcat_chk F + __strcpy_chk F + __strncat_chk F + __strncpy_chk F + __vfprintf_chk F + __vprintf_chk F + __vsnprintf_chk F + __vsprintf_chk F + __xpg_strerror_r F + getipv4sourcefilter F + getsourcefilter F + regexec F + sched_getaffinity F + sched_setaffinity F + setipv4sourcefilter F + setsourcefilter F + xdr_quad_t F + xdr_u_quad_t F +GLIBC_2.4 + GLIBC_2.4 A + __confstr_chk F + __fgets_chk F + __fgets_unlocked_chk F + __fgetws_chk F + __fgetws_unlocked_chk F + __fwprintf_chk F + __fxstatat F + __fxstatat64 F + __getcwd_chk F + __getdomainname_chk F + __getgroups_chk F + __gethostname_chk F + __getlogin_r_chk F + __getwd_chk F + __mbsnrtowcs_chk F + __mbsrtowcs_chk F + __mbstowcs_chk F + __pread64_chk F + __pread_chk F + __ptsname_r_chk F + __read_chk F + __readlink_chk F + __realpath_chk F + __recv_chk F + __recvfrom_chk F + __stack_chk_fail F + __stpncpy_chk F + __swprintf_chk F + __syslog_chk F + __ttyname_r_chk F + __vfwprintf_chk F + __vswprintf_chk F + __vsyslog_chk F + __vwprintf_chk F + __wcpcpy_chk F + __wcpncpy_chk F + __wcrtomb_chk F + __wcscat_chk F + __wcscpy_chk F + __wcsncat_chk F + __wcsncpy_chk F + __wcsnrtombs_chk F + __wcsrtombs_chk F + __wcstombs_chk F + __wctomb_chk F + __wmemcpy_chk F + __wmemmove_chk F + __wmempcpy_chk F + __wmemset_chk F + __wprintf_chk F + __xmknodat F + _sys_errlist D 0x210 + _sys_nerr D 0x4 + eaccess F + faccessat F + fchmodat F + fchownat F + fdopendir F + futimesat F + inotify_add_watch F + inotify_init F + inotify_rm_watch F + linkat F + mkdirat F + mkfifoat F + open_wmemstream F + openat F + openat64 F + ppoll F + readlinkat F + renameat F + symlinkat F + sys_errlist D 0x210 + sys_nerr D 0x4 + unlinkat F + unshare F +GLIBC_2.5 + GLIBC_2.5 A + __readlinkat_chk F + inet6_opt_append F + inet6_opt_find F + inet6_opt_finish F + inet6_opt_get_val F + inet6_opt_init F + inet6_opt_next F + inet6_opt_set_val F + inet6_rth_add F + inet6_rth_getaddr F + inet6_rth_init F + inet6_rth_reverse F + inet6_rth_segments F + inet6_rth_space F + splice F + tee F + vmsplice F +GLIBC_2.6 + GLIBC_2.6 A + __sched_cpucount F + epoll_pwait F + futimens F + sched_getcpu F + strerror_l F + sync_file_range F + utimensat F +GLIBC_2.7 + GLIBC_2.7 A + __fread_chk F + __fread_unlocked_chk F + __isoc99_fscanf F + __isoc99_fwscanf F + __isoc99_scanf F + __isoc99_sscanf F + __isoc99_swscanf F + __isoc99_vfscanf F + __isoc99_vfwscanf F + __isoc99_vscanf F + __isoc99_vsscanf F + __isoc99_vswscanf F + __isoc99_vwscanf F + __isoc99_wscanf F + __open64_2 F + __open_2 F + __openat64_2 F + __openat_2 F + __sched_cpualloc F + __sched_cpufree F + eventfd F + eventfd_read F + eventfd_write F + mkostemp F + mkostemp64 F + signalfd F +GLIBC_2.8 + GLIBC_2.8 A + __asprintf_chk F + __dprintf_chk F + __obstack_printf_chk F + __obstack_vprintf_chk F + __vasprintf_chk F + __vdprintf_chk F + qsort_r F + timerfd_create F + timerfd_gettime F + timerfd_settime F +GLIBC_2.9 + GLIBC_2.9 A + dup3 F + epoll_create1 F + inotify_init1 F + pipe2 F diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libcrypt.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libcrypt.abilist new file mode 100644 index 0000000000..1df145f260 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libcrypt.abilist @@ -0,0 +1,9 @@ +GLIBC_2.0 + GLIBC_2.0 A + crypt F + crypt_r F + encrypt F + encrypt_r F + fcrypt F + setkey F + setkey_r F diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libdl.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libdl.abilist new file mode 100644 index 0000000000..62e6b41edb --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libdl.abilist @@ -0,0 +1,18 @@ +GLIBC_2.0 + GLIBC_2.0 A + dladdr F + dlclose F + dlerror F + dlopen F + dlsym F +GLIBC_2.1 + GLIBC_2.1 A + dlopen F + dlvsym F +GLIBC_2.3.3 + GLIBC_2.3.3 A + dladdr1 F + dlinfo F +GLIBC_2.3.4 + GLIBC_2.3.4 A + dlmopen F diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libm.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libm.abilist new file mode 100644 index 0000000000..35fc1e3d72 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libm.abilist @@ -0,0 +1,412 @@ +GLIBC_2.0 + GLIBC_2.0 A + _LIB_VERSION D 0x4 + acos F + acosf F + acosh F + acoshf F + acoshl F + acosl F + asin F + asinf F + asinh F + asinhf F + asinhl F + asinl F + atan F + atan2 F + atan2f F + atan2l F + atanf F + atanh F + atanhf F + atanhl F + atanl F + cbrt F + cbrtf F + cbrtl F + ceil F + ceilf F + ceill F + copysign F + copysignf F + copysignl F + cos F + cosf F + cosh F + coshf F + coshl F + cosl F + drem F + dremf F + dreml F + erf F + erfc F + erfcf F + erfcl F + erff F + erfl F + exp F + expf F + expl F + expm1 F + expm1f F + expm1l F + fabs F + fabsf F + fabsl F + finite F + finitef F + finitel F + floor F + floorf F + floorl F + fmod F + fmodf F + fmodl F + frexp F + frexpf F + frexpl F + gamma F + gammaf F + gammal F + hypot F + hypotf F + hypotl F + ilogb F + ilogbf F + ilogbl F + j0 F + j0f F + j0l F + j1 F + j1f F + j1l F + jn F + jnf F + jnl F + ldexp F + ldexpf F + ldexpl F + lgamma F + lgamma_r F + lgammaf F + lgammaf_r F + lgammal F + lgammal_r F + log F + log10 F + log10f F + log10l F + log1p F + log1pf F + log1pl F + logb F + logbf F + logbl F + logf F + logl F + matherr F + modf F + modff F + modfl F + nextafter F + nextafterf F + nextafterl F + pow F + powf F + powl F + remainder F + remainderf F + remainderl F + rint F + rintf F + rintl F + scalb F + scalbf F + scalbl F + scalbn F + scalbnf F + scalbnl F + signgam D 0x4 + significand F + significandf F + significandl F + sin F + sinf F + sinh F + sinhf F + sinhl F + sinl F + sqrt F + sqrtf F + sqrtl F + tan F + tanf F + tanh F + tanhf F + tanhl F + tanl F + y0 F + y0f F + y0l F + y1 F + y1f F + y1l F + yn F + ynf F + ynl F +GLIBC_2.1 + GLIBC_2.1 A + __clog10 F + __clog10f F + __clog10l F + __finite F + __finitef F + __finitel F + __fpclassify F + __fpclassifyf F + __fpclassifyl F + __signbit F + __signbitf F + __signbitl F + cabs F + cabsf F + cabsl F + cacos F + cacosf F + cacosh F + cacoshf F + cacoshl F + cacosl F + carg F + cargf F + cargl F + casin F + casinf F + casinh F + casinhf F + casinhl F + casinl F + catan F + catanf F + catanh F + catanhf F + catanhl F + catanl F + ccos F + ccosf F + ccosh F + ccoshf F + ccoshl F + ccosl F + cexp F + cexpf F + cexpl F + cimag F + cimagf F + cimagl F + clog F + clog10 F + clog10f F + clog10l F + clogf F + clogl F + conj F + conjf F + conjl F + cpow F + cpowf F + cpowl F + cproj F + cprojf F + cprojl F + creal F + crealf F + creall F + csin F + csinf F + csinh F + csinhf F + csinhl F + csinl F + csqrt F + csqrtf F + csqrtl F + ctan F + ctanf F + ctanh F + ctanhf F + ctanhl F + ctanl F + exp10 F + exp10f F + exp10l F + exp2 F + exp2f F + exp2l F + fdim F + fdimf F + fdiml F + feclearexcept F + fegetenv F + fegetexceptflag F + fegetround F + feholdexcept F + feraiseexcept F + fesetenv F + fesetexceptflag F + fesetround F + fetestexcept F + feupdateenv F + fma F + fmaf F + fmal F + fmax F + fmaxf F + fmaxl F + fmin F + fminf F + fminl F + llrint F + llrintf F + llrintl F + llround F + llroundf F + llroundl F + log2 F + log2f F + log2l F + lrint F + lrintf F + lrintl F + lround F + lroundf F + lroundl F + nan F + nanf F + nanl F + nearbyint F + nearbyintf F + nearbyintl F + nexttoward F + nexttowardf F + nexttowardl F + pow10 F + pow10f F + pow10l F + remquo F + remquof F + remquol F + round F + roundf F + roundl F + scalbln F + scalblnf F + scalblnl F + sincos F + sincosf F + sincosl F + tgamma F + tgammaf F + tgammal F + trunc F + truncf F + truncl F +GLIBC_2.15 + GLIBC_2.15 A + __acos_finite F + __acosf_finite F + __acosh_finite F + __acoshf_finite F + __acoshl_finite F + __acosl_finite F + __asin_finite F + __asinf_finite F + __asinl_finite F + __atan2_finite F + __atan2f_finite F + __atan2l_finite F + __atanh_finite F + __atanhf_finite F + __atanhl_finite F + __cosh_finite F + __coshf_finite F + __coshl_finite F + __exp10_finite F + __exp10f_finite F + __exp10l_finite F + __exp2_finite F + __exp2f_finite F + __exp2l_finite F + __exp_finite F + __expf_finite F + __expl_finite F + __fmod_finite F + __fmodf_finite F + __fmodl_finite F + __gamma_r_finite F + __gammaf_r_finite F + __gammal_r_finite F + __hypot_finite F + __hypotf_finite F + __hypotl_finite F + __j0_finite F + __j0f_finite F + __j0l_finite F + __j1_finite F + __j1f_finite F + __j1l_finite F + __jn_finite F + __jnf_finite F + __jnl_finite F + __lgamma_r_finite F + __lgammaf_r_finite F + __lgammal_r_finite F + __log10_finite F + __log10f_finite F + __log10l_finite F + __log2_finite F + __log2f_finite F + __log2l_finite F + __log_finite F + __logf_finite F + __logl_finite F + __pow_finite F + __powf_finite F + __powl_finite F + __remainder_finite F + __remainderf_finite F + __remainderl_finite F + __scalb_finite F + __scalbf_finite F + __scalbl_finite F + __sinh_finite F + __sinhf_finite F + __sinhl_finite F + __sqrt_finite F + __sqrtf_finite F + __sqrtl_finite F + __y0_finite F + __y0f_finite F + __y0l_finite F + __y1_finite F + __y1f_finite F + __y1l_finite F + __yn_finite F + __ynf_finite F + __ynl_finite F +GLIBC_2.2 + GLIBC_2.2 A + feclearexcept F + fedisableexcept F + feenableexcept F + fegetenv F + fegetexcept F + fegetexceptflag F + feraiseexcept F + fesetenv F + fesetexceptflag F + feupdateenv F +GLIBC_2.4 + GLIBC_2.4 A diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libnsl.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libnsl.abilist new file mode 100644 index 0000000000..4241e2d887 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libnsl.abilist @@ -0,0 +1,127 @@ +GLIBC_2.0 + GLIBC_2.0 A + __yp_check F + xdr_domainname F + xdr_keydat F + xdr_mapname F + xdr_peername F + xdr_valdat F + xdr_yp_buf F + xdr_ypbind_binding F + xdr_ypbind_resp F + xdr_ypbind_resptype F + xdr_ypbind_setdom F + xdr_ypdelete_args F + xdr_ypmap_parms F + xdr_ypmaplist F + xdr_yppush_status F + xdr_yppushresp_xfr F + xdr_ypreq_key F + xdr_ypreq_nokey F + xdr_ypreq_xfr F + xdr_ypresp_all F + xdr_ypresp_key_val F + xdr_ypresp_maplist F + xdr_ypresp_master F + xdr_ypresp_order F + xdr_ypresp_val F + xdr_ypresp_xfr F + xdr_ypstat F + xdr_ypupdate_args F + xdr_ypxfrstat F + yp_all F + yp_bind F + yp_first F + yp_get_default_domain F + yp_maplist F + yp_master F + yp_match F + yp_next F + yp_order F + yp_unbind F + yp_update F + ypbinderr_string F + yperr_string F + ypprot_err F +GLIBC_2.1 + GLIBC_2.1 A + __free_fdresult F + __nis_default_access F + __nis_default_group F + __nis_default_owner F + __nis_default_ttl F + __nis_finddirectory F + __nis_hash F + __nisbind_connect F + __nisbind_create F + __nisbind_destroy F + __nisbind_next F + nis_add F + nis_add_entry F + nis_addmember F + nis_checkpoint F + nis_clone_directory F + nis_clone_object F + nis_clone_result F + nis_creategroup F + nis_destroy_object F + nis_destroygroup F + nis_dir_cmp F + nis_domain_of F + nis_domain_of_r F + nis_first_entry F + nis_free_directory F + nis_free_object F + nis_free_request F + nis_freenames F + nis_freeresult F + nis_freeservlist F + nis_freetags F + nis_getnames F + nis_getservlist F + nis_ismember F + nis_leaf_of F + nis_leaf_of_r F + nis_lerror F + nis_list F + nis_local_directory F + nis_local_group F + nis_local_host F + nis_local_principal F + nis_lookup F + nis_mkdir F + nis_modify F + nis_modify_entry F + nis_name_of F + nis_name_of_r F + nis_next_entry F + nis_perror F + nis_ping F + nis_print_directory F + nis_print_entry F + nis_print_group F + nis_print_group_entry F + nis_print_link F + nis_print_object F + nis_print_result F + nis_print_rights F + nis_print_table F + nis_read_obj F + nis_remove F + nis_remove_entry F + nis_removemember F + nis_rmdir F + nis_servstate F + nis_sperrno F + nis_sperror F + nis_sperror_r F + nis_stats F + nis_verifygroup F + nis_write_obj F + readColdStartFile F + writeColdStartFile F + xdr_cback_data F + xdr_obj_p F +GLIBC_2.2 + GLIBC_2.2 A + xdr_ypall F diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libpthread.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libpthread.abilist new file mode 100644 index 0000000000..827114f896 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libpthread.abilist @@ -0,0 +1,267 @@ +GLIBC_2.0 + GLIBC_2.0 A + _IO_flockfile F + _IO_ftrylockfile F + _IO_funlockfile F + __close F + __connect F + __errno_location F + __fcntl F + __fork F + __h_errno_location F + __lseek F + __open F + __pthread_getspecific F + __pthread_key_create F + __pthread_mutex_destroy F + __pthread_mutex_init F + __pthread_mutex_lock F + __pthread_mutex_trylock F + __pthread_mutex_unlock F + __pthread_mutexattr_destroy F + __pthread_mutexattr_init F + __pthread_mutexattr_settype F + __pthread_once F + __pthread_setspecific F + __read F + __send F + __sigaction F + __wait F + __write F + _pthread_cleanup_pop F + _pthread_cleanup_pop_restore F + _pthread_cleanup_push F + _pthread_cleanup_push_defer F + accept F + close F + connect F + fcntl F + flockfile F + fork F + fsync F + ftrylockfile F + funlockfile F + longjmp F + lseek F + msync F + nanosleep F + open F + pause F + pthread_atfork F + pthread_attr_destroy F + pthread_attr_getdetachstate F + pthread_attr_getinheritsched F + pthread_attr_getschedparam F + pthread_attr_getschedpolicy F + pthread_attr_getscope F + pthread_attr_init F + pthread_attr_setdetachstate F + pthread_attr_setinheritsched F + pthread_attr_setschedparam F + pthread_attr_setschedpolicy F + pthread_attr_setscope F + pthread_cancel F + pthread_cond_broadcast F + pthread_cond_destroy F + pthread_cond_init F + pthread_cond_signal F + pthread_cond_timedwait F + pthread_cond_wait F + pthread_condattr_destroy F + pthread_condattr_init F + pthread_create F + pthread_detach F + pthread_equal F + pthread_exit F + pthread_getschedparam F + pthread_getspecific F + pthread_join F + pthread_key_create F + pthread_key_delete F + pthread_kill F + pthread_kill_other_threads_np F + pthread_mutex_destroy F + pthread_mutex_init F + pthread_mutex_lock F + pthread_mutex_trylock F + pthread_mutex_unlock F + pthread_mutexattr_destroy F + pthread_mutexattr_getkind_np F + pthread_mutexattr_init F + pthread_mutexattr_setkind_np F + pthread_once F + pthread_self F + pthread_setcancelstate F + pthread_setcanceltype F + pthread_setschedparam F + pthread_setspecific F + pthread_sigmask F + pthread_testcancel F + raise F + read F + recv F + recvfrom F + recvmsg F + sem_destroy F + sem_getvalue F + sem_init F + sem_post F + sem_trywait F + sem_wait F + send F + sendmsg F + sendto F + sigaction F + siglongjmp F + sigwait F + system F + tcdrain F + vfork F + wait F + waitpid F + write F +GLIBC_2.1 + GLIBC_2.1 A + __libc_allocate_rtsig F + __libc_current_sigrtmax F + __libc_current_sigrtmin F + pthread_attr_getguardsize F + pthread_attr_getstackaddr F + pthread_attr_getstacksize F + pthread_attr_init F + pthread_attr_setguardsize F + pthread_attr_setstackaddr F + pthread_attr_setstacksize F + pthread_create F + pthread_getconcurrency F + pthread_mutexattr_gettype F + pthread_mutexattr_settype F + pthread_rwlock_destroy F + pthread_rwlock_init F + pthread_rwlock_rdlock F + pthread_rwlock_tryrdlock F + pthread_rwlock_trywrlock F + pthread_rwlock_unlock F + pthread_rwlock_wrlock F + pthread_rwlockattr_destroy F + pthread_rwlockattr_getkind_np F + pthread_rwlockattr_getpshared F + pthread_rwlockattr_init F + pthread_rwlockattr_setkind_np F + pthread_rwlockattr_setpshared F + pthread_setconcurrency F + sem_destroy F + sem_getvalue F + sem_init F + sem_post F + sem_trywait F + sem_wait F +GLIBC_2.1.1 + GLIBC_2.1.1 A + sem_close F + sem_open F + sem_unlink F +GLIBC_2.1.2 + GLIBC_2.1.2 A + __vfork F +GLIBC_2.11 + GLIBC_2.11 A + pthread_sigqueue F +GLIBC_2.12 + GLIBC_2.12 A + pthread_getname_np F + pthread_mutex_consistent F + pthread_mutexattr_getrobust F + pthread_mutexattr_setrobust F + pthread_setname_np F +GLIBC_2.2 + GLIBC_2.2 A + __open64 F + __pread64 F + __pthread_rwlock_destroy F + __pthread_rwlock_init F + __pthread_rwlock_rdlock F + __pthread_rwlock_tryrdlock F + __pthread_rwlock_trywrlock F + __pthread_rwlock_unlock F + __pthread_rwlock_wrlock F + __pwrite64 F + __res_state F + lseek64 F + open64 F + pread F + pread64 F + pthread_attr_getstack F + pthread_attr_setstack F + pthread_barrier_destroy F + pthread_barrier_init F + pthread_barrier_wait F + pthread_barrierattr_destroy F + pthread_barrierattr_init F + pthread_barrierattr_setpshared F + pthread_condattr_getpshared F + pthread_condattr_setpshared F + pthread_getcpuclockid F + pthread_mutex_timedlock F + pthread_mutexattr_getpshared F + pthread_mutexattr_setpshared F + pthread_rwlock_timedrdlock F + pthread_rwlock_timedwrlock F + pthread_spin_destroy F + pthread_spin_init F + pthread_spin_lock F + pthread_spin_trylock F + pthread_spin_unlock F + pthread_yield F + pwrite F + pwrite64 F + sem_timedwait F +GLIBC_2.2.3 + GLIBC_2.2.3 A + pthread_getattr_np F +GLIBC_2.2.6 + GLIBC_2.2.6 A + __nanosleep F +GLIBC_2.3.2 + GLIBC_2.3.2 A + pthread_cond_broadcast F + pthread_cond_destroy F + pthread_cond_init F + pthread_cond_signal F + pthread_cond_timedwait F + pthread_cond_wait F +GLIBC_2.3.3 + GLIBC_2.3.3 A + __pthread_cleanup_routine F + __pthread_register_cancel F + __pthread_register_cancel_defer F + __pthread_unregister_cancel F + __pthread_unregister_cancel_restore F + __pthread_unwind_next F + pthread_attr_getaffinity_np F + pthread_attr_setaffinity_np F + pthread_barrierattr_getpshared F + pthread_condattr_getclock F + pthread_condattr_setclock F + pthread_getaffinity_np F + pthread_setaffinity_np F + pthread_timedjoin_np F + pthread_tryjoin_np F +GLIBC_2.3.4 + GLIBC_2.3.4 A + pthread_attr_getaffinity_np F + pthread_attr_setaffinity_np F + pthread_getaffinity_np F + pthread_setaffinity_np F + pthread_setschedprio F +GLIBC_2.4 + GLIBC_2.4 A + pthread_mutex_consistent_np F + pthread_mutex_getprioceiling F + pthread_mutex_setprioceiling F + pthread_mutexattr_getprioceiling F + pthread_mutexattr_getprotocol F + pthread_mutexattr_getrobust_np F + pthread_mutexattr_setprioceiling F + pthread_mutexattr_setprotocol F + pthread_mutexattr_setrobust_np F diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libresolv.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libresolv.abilist new file mode 100644 index 0000000000..f68333d4a4 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libresolv.abilist @@ -0,0 +1,104 @@ +GLIBC_2.0 + GLIBC_2.0 A + __b64_ntop F + __b64_pton F + __dn_comp F + __dn_count_labels F + __dn_skipname F + __fp_nquery F + __fp_query F + __fp_resstat F + __hostalias F + __loc_aton F + __loc_ntoa F + __p_cdname F + __p_cdnname F + __p_class F + __p_class_syms D 0x54 + __p_fqname F + __p_fqnname F + __p_option F + __p_query F + __p_secstodate F + __p_time F + __p_type F + __p_type_syms D 0x228 + __putlong F + __putshort F + __res_close F + __res_dnok F + __res_hnok F + __res_isourserver F + __res_mailok F + __res_nameinquery F + __res_ownok F + __res_queriesmatch F + __res_send F + __sym_ntop F + __sym_ntos F + __sym_ston F + _gethtbyaddr F + _gethtbyname F + _gethtbyname2 F + _gethtent F + _getlong F + _getshort F + _res_opcodes D 0x40 + _sethtent F + dn_expand F + inet_net_ntop F + inet_net_pton F + inet_neta F + res_gethostbyaddr F + res_gethostbyname F + res_gethostbyname2 F + res_mkquery F + res_query F + res_querydomain F + res_search F + res_send_setqhook F + res_send_setrhook F +GLIBC_2.2 + GLIBC_2.2 A + __dn_expand F + __res_hostalias F + __res_mkquery F + __res_nmkquery F + __res_nquery F + __res_nquerydomain F + __res_nsearch F + __res_nsend F + __res_query F + __res_querydomain F + __res_search F +GLIBC_2.3.2 + GLIBC_2.3.2 A + __p_rcode F +GLIBC_2.9 + GLIBC_2.9 A + ns_datetosecs F + ns_format_ttl F + ns_get16 F + ns_get32 F + ns_initparse F + ns_makecanon F + ns_msg_getflag F + ns_name_compress F + ns_name_ntol F + ns_name_ntop F + ns_name_pack F + ns_name_pton F + ns_name_rollback F + ns_name_skip F + ns_name_uncompress F + ns_name_unpack F + ns_parse_ttl F + ns_parserr F + ns_put16 F + ns_put32 F + ns_samedomain F + ns_samename F + ns_skiprr F + ns_sprintrr F + ns_sprintrrf F + ns_subdomain F diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/librt.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/librt.abilist new file mode 100644 index 0000000000..af7df27cb3 --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/librt.abilist @@ -0,0 +1,52 @@ +GLIBC_2.1 + GLIBC_2.1 A + aio_cancel F + aio_cancel64 F + aio_error F + aio_error64 F + aio_fsync F + aio_fsync64 F + aio_init F + aio_read F + aio_read64 F + aio_return F + aio_return64 F + aio_suspend F + aio_suspend64 F + aio_write F + aio_write64 F + lio_listio F + lio_listio64 F +GLIBC_2.2 + GLIBC_2.2 A + clock_getcpuclockid F + clock_getres F + clock_gettime F + clock_nanosleep F + clock_settime F + shm_open F + shm_unlink F + timer_create F + timer_delete F + timer_getoverrun F + timer_gettime F + timer_settime F +GLIBC_2.3.4 + GLIBC_2.3.4 A + mq_close F + mq_getattr F + mq_notify F + mq_open F + mq_receive F + mq_send F + mq_setattr F + mq_timedreceive F + mq_timedsend F + mq_unlink F +GLIBC_2.4 + GLIBC_2.4 A + lio_listio F + lio_listio64 F +GLIBC_2.7 + GLIBC_2.7 A + __mq_open_2 F diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libthread_db.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libthread_db.abilist new file mode 100644 index 0000000000..f33138067c --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libthread_db.abilist @@ -0,0 +1,48 @@ +GLIBC_2.1.3 + GLIBC_2.1.3 A + td_init F + td_log F + td_ta_clear_event F + td_ta_delete F + td_ta_enable_stats F + td_ta_event_addr F + td_ta_event_getmsg F + td_ta_get_nthreads F + td_ta_get_ph F + td_ta_get_stats F + td_ta_map_id2thr F + td_ta_map_lwp2thr F + td_ta_new F + td_ta_reset_stats F + td_ta_set_event F + td_ta_setconcurrency F + td_ta_thr_iter F + td_ta_tsd_iter F + td_thr_clear_event F + td_thr_dbresume F + td_thr_dbsuspend F + td_thr_event_enable F + td_thr_event_getmsg F + td_thr_get_info F + td_thr_getfpregs F + td_thr_getgregs F + td_thr_getxregs F + td_thr_getxregsize F + td_thr_set_event F + td_thr_setfpregs F + td_thr_setgregs F + td_thr_setprio F + td_thr_setsigpending F + td_thr_setxregs F + td_thr_sigsetmask F + td_thr_tsd F + td_thr_validate F +GLIBC_2.2.3 + GLIBC_2.2.3 A + td_symbol_list F +GLIBC_2.3 + GLIBC_2.3 A + td_thr_tls_get_addr F +GLIBC_2.3.3 + GLIBC_2.3.3 A + td_thr_tlsbase F diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libutil.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libutil.abilist new file mode 100644 index 0000000000..7422687e3c --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libutil.abilist @@ -0,0 +1,8 @@ +GLIBC_2.0 + GLIBC_2.0 A + forkpty F + login F + login_tty F + logout F + logwtmp F + openpty F From d353499456b30ef7b8e3b020f310ee0eef40d2e1 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 1 May 2012 07:22:52 -0700 Subject: [PATCH 4334/4487] Restore ARM profil_counter export (bug 14043). --- ChangeLog.arm | 8 +++++ sysdeps/unix/sysv/linux/arm/nptl/libc.abilist | 1 + sysdeps/unix/sysv/linux/arm/profil-counter.h | 33 +++++++++++++++++-- 3 files changed, 40 insertions(+), 2 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index facddbb4d1..cdbed7b0a9 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,11 @@ +2012-05-01 Joseph Myers + + [BZ #14043] + * sysdeps/unix/sysv/linux/arm/profil-counter.h: New file. Based + on i386 version but without "static". + * sysdeps/unix/sysv/linux/arm/nptl/libc.abilist (GLIBC_2.4): Add + profil_counter. + 2012-04-28 Joseph Myers [BZ #13986] diff --git a/sysdeps/unix/sysv/linux/arm/nptl/libc.abilist b/sysdeps/unix/sysv/linux/arm/nptl/libc.abilist index 1f25c37890..6322dcf983 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/libc.abilist +++ b/sysdeps/unix/sysv/linux/arm/nptl/libc.abilist @@ -1421,6 +1421,7 @@ GLIBC_2.4 printf_size F printf_size_info F profil F + profil_counter F program_invocation_name D 0x4 program_invocation_short_name D 0x4 pselect F diff --git a/sysdeps/unix/sysv/linux/arm/profil-counter.h b/sysdeps/unix/sysv/linux/arm/profil-counter.h index 8a6a0bcf3d..f305674379 100644 --- a/sysdeps/unix/sysv/linux/arm/profil-counter.h +++ b/sysdeps/unix/sysv/linux/arm/profil-counter.h @@ -1,2 +1,31 @@ -/* We can use the ix86 version. */ -#include +/* Low-level statistical profiling support function. Linux/ARM version. + Copyright (C) 1996-2012 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, see + . */ + +#include +#include + +void +profil_counter (int signo, const SIGCONTEXT scp) +{ + profil_count ((void *) GET_PC (scp)); + + /* This is a hack to prevent the compiler from implementing the + above function call as a sibcall. The sibcall would overwrite + the signal context. */ + asm volatile (""); +} From 360f4e6880362153c3ded923b59c6f421ab4b4da Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 1 May 2012 08:48:54 -0700 Subject: [PATCH 4335/4487] Restore MIPS n64 posix_fadvise64 export at GLIBC_2.3.3 (bug 14044). --- ChangeLog.mips | 8 +++ .../linux/mips/mips64/n64/nptl/libc.abilist | 1 + .../linux/mips/mips64/n64/posix_fadvise.c | 51 ++++++++++++++++++- 3 files changed, 59 insertions(+), 1 deletion(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index f487d391af..21d48cf168 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,11 @@ +2012-05-01 Joseph Myers + + [BZ #14044] + * sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise.c: Copy + from libc version and add symbol versions. + * sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilis + (GLIBC_2.3.3): Add posix_fadvise64. + 2012-04-28 Joseph Myers * sysdeps/unix/sysv/linux/mips/mips32/nptl/ld.abilist: New file. diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilist index 1deec226f7..12c15d382c 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilist @@ -2045,6 +2045,7 @@ GLIBC_2.3.3 inet6_option_space F nftw F nftw64 F + posix_fadvise64 F remap_file_pages F sched_getaffinity F sched_setaffinity F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise.c index 0287b833b8..2b7c0e21bc 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise.c +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise.c @@ -1 +1,50 @@ -#include +/* Copyright (C) 2003-2012 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, see + . */ + +#define posix_fadvise64 __no_posix_fadvise64 +#include +#include +#include +#undef posix_fadvise64 + +/* Advice the system about the expected behaviour of the application with + respect to the file associated with FD. */ + +int +posix_fadvise (int fd, off_t offset, off_t len, int advise) +{ +#ifdef __NR_fadvise64 + INTERNAL_SYSCALL_DECL (err); + int ret = INTERNAL_SYSCALL (fadvise64, err, 4, fd, offset, len, advise); + if (INTERNAL_SYSCALL_ERROR_P (ret, err)) + return INTERNAL_SYSCALL_ERRNO (ret, err); + return 0; +#else + return ENOSYS; +#endif +} + +#include + +#if SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_3_3) +strong_alias (posix_fadvise, __posix_fadvise64_l32); +compat_symbol (libc, __posix_fadvise64_l32, posix_fadvise64, GLIBC_2_2); +strong_alias (posix_fadvise, __posix_fadvise64_l64); +versioned_symbol (libc, __posix_fadvise64_l64, posix_fadvise64, GLIBC_2_3_3); +#else +strong_alias (posix_fadvise, posix_fadvise64); +#endif From 064b706950c357b326d691b043b86be99c9f0b3a Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 6 May 2012 04:49:52 -0400 Subject: [PATCH 4336/4487] ia64: restore abilist files These are the abilists as ia64 had them before being removed from the main tree. Most libs pass, but a bunch need updating. That'll be done in a follow up commit. Signed-off-by: Mike Frysinger --- ChangeLog.ia64 | 17 + sysdeps/unix/sysv/linux/ia64/nptl/ld.abilist | 12 + .../linux/ia64/nptl/libBrokenLocale.abilist | 3 + .../unix/sysv/linux/ia64/nptl/libanl.abilist | 6 + .../unix/sysv/linux/ia64/nptl/libc.abilist | 1909 +++++++++++++++++ .../sysv/linux/ia64/nptl/libcrypt.abilist | 9 + .../unix/sysv/linux/ia64/nptl/libdl.abilist | 15 + .../unix/sysv/linux/ia64/nptl/libm.abilist | 320 +++ .../unix/sysv/linux/ia64/nptl/libnsl.abilist | 127 ++ .../sysv/linux/ia64/nptl/libpthread.abilist | 206 ++ .../sysv/linux/ia64/nptl/libresolv.abilist | 76 + .../unix/sysv/linux/ia64/nptl/librt.abilist | 33 + .../sysv/linux/ia64/nptl/libthread_db.abilist | 48 + .../unix/sysv/linux/ia64/nptl/libutil.abilist | 8 + 14 files changed, 2789 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/ia64/nptl/ld.abilist create mode 100644 sysdeps/unix/sysv/linux/ia64/nptl/libBrokenLocale.abilist create mode 100644 sysdeps/unix/sysv/linux/ia64/nptl/libanl.abilist create mode 100644 sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist create mode 100644 sysdeps/unix/sysv/linux/ia64/nptl/libcrypt.abilist create mode 100644 sysdeps/unix/sysv/linux/ia64/nptl/libdl.abilist create mode 100644 sysdeps/unix/sysv/linux/ia64/nptl/libm.abilist create mode 100644 sysdeps/unix/sysv/linux/ia64/nptl/libnsl.abilist create mode 100644 sysdeps/unix/sysv/linux/ia64/nptl/libpthread.abilist create mode 100644 sysdeps/unix/sysv/linux/ia64/nptl/libresolv.abilist create mode 100644 sysdeps/unix/sysv/linux/ia64/nptl/librt.abilist create mode 100644 sysdeps/unix/sysv/linux/ia64/nptl/libthread_db.abilist create mode 100644 sysdeps/unix/sysv/linux/ia64/nptl/libutil.abilist diff --git a/ChangeLog.ia64 b/ChangeLog.ia64 index 4467e3c509..396cd194bc 100644 --- a/ChangeLog.ia64 +++ b/ChangeLog.ia64 @@ -1,3 +1,20 @@ +2012-05-06 Mike Frysinger + + * sysdeps/unix/sysv/linux/ia64/nptl/ld.abilist: Generated from + files found in glibc-2.15. + * sysdeps/unix/sysv/linux/ia64/nptl/libBrokenLocale.abilist: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/libanl.abilist: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/libcrypt.abilist: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/libdl.abilist: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/libm.abilist: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/libnsl.abilist: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/libpthread.abilist: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/libresolv.abilist: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/librt.abilist: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/libthread_db.abilist: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/libutil.abilist: Likewise. + 2012-04-27 Mike Frysinger * sysdeps/ia64/fpu/s_ilogbl.S: Move to ... diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/ld.abilist b/sysdeps/unix/sysv/linux/ia64/nptl/ld.abilist new file mode 100644 index 0000000000..74997efbb9 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/nptl/ld.abilist @@ -0,0 +1,12 @@ +GLIBC_2.2 + GLIBC_2.2 A + __libc_memalign F + _dl_mcount F + _r_debug D 0x28 + calloc F + free F + malloc F + realloc F +GLIBC_2.3 + GLIBC_2.3 A + __tls_get_addr F diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/libBrokenLocale.abilist b/sysdeps/unix/sysv/linux/ia64/nptl/libBrokenLocale.abilist new file mode 100644 index 0000000000..b7aa242c86 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/nptl/libBrokenLocale.abilist @@ -0,0 +1,3 @@ +GLIBC_2.2 + GLIBC_2.2 A + __ctype_get_mb_cur_max F diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/libanl.abilist b/sysdeps/unix/sysv/linux/ia64/nptl/libanl.abilist new file mode 100644 index 0000000000..c9755d8a33 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/nptl/libanl.abilist @@ -0,0 +1,6 @@ +GLIBC_2.2.3 + GLIBC_2.2.3 A + gai_cancel F + gai_error F + gai_suspend F + getaddrinfo_a F diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist b/sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist new file mode 100644 index 0000000000..225a27dbf5 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist @@ -0,0 +1,1909 @@ +GLIBC_2.2 + GLIBC_2.2 A + _Exit F + _IO_2_1_stderr_ D 0xe0 + _IO_2_1_stdin_ D 0xe0 + _IO_2_1_stdout_ D 0xe0 + _IO_adjust_column F + _IO_adjust_wcolumn F + _IO_default_doallocate F + _IO_default_finish F + _IO_default_pbackfail F + _IO_default_uflow F + _IO_default_xsgetn F + _IO_default_xsputn F + _IO_do_write F + _IO_doallocbuf F + _IO_fclose F + _IO_fdopen F + _IO_feof F + _IO_ferror F + _IO_fflush F + _IO_fgetpos F + _IO_fgetpos64 F + _IO_fgets F + _IO_file_attach F + _IO_file_close F + _IO_file_close_it F + _IO_file_doallocate F + _IO_file_finish F + _IO_file_fopen F + _IO_file_init F + _IO_file_jumps D 0xa8 + _IO_file_open F + _IO_file_overflow F + _IO_file_read F + _IO_file_seek F + _IO_file_seekoff F + _IO_file_setbuf F + _IO_file_stat F + _IO_file_sync F + _IO_file_underflow F + _IO_file_write F + _IO_file_xsputn F + _IO_flockfile F + _IO_flush_all F + _IO_flush_all_linebuffered F + _IO_fopen F + _IO_fprintf F + _IO_fputs F + _IO_fread F + _IO_free_backup_area F + _IO_free_wbackup_area F + _IO_fsetpos F + _IO_fsetpos64 F + _IO_ftell F + _IO_ftrylockfile F + _IO_funlockfile F + _IO_fwrite F + _IO_getc F + _IO_getline F + _IO_getline_info F + _IO_gets F + _IO_init F + _IO_init_marker F + _IO_init_wmarker F + _IO_iter_begin F + _IO_iter_end F + _IO_iter_file F + _IO_iter_next F + _IO_least_wmarker F + _IO_link_in F + _IO_list_all D 0x8 + _IO_list_lock F + _IO_list_resetlock F + _IO_list_unlock F + _IO_marker_delta F + _IO_marker_difference F + _IO_padn F + _IO_peekc_locked F + _IO_popen F + _IO_printf F + _IO_proc_close F + _IO_proc_open F + _IO_putc F + _IO_puts F + _IO_remove_marker F + _IO_seekmark F + _IO_seekoff F + _IO_seekpos F + _IO_seekwmark F + _IO_setb F + _IO_setbuffer F + _IO_setvbuf F + _IO_sgetn F + _IO_sprintf F + _IO_sputbackc F + _IO_sputbackwc F + _IO_sscanf F + _IO_str_init_readonly F + _IO_str_init_static F + _IO_str_overflow F + _IO_str_pbackfail F + _IO_str_seekoff F + _IO_str_underflow F + _IO_sungetc F + _IO_sungetwc F + _IO_switch_to_get_mode F + _IO_switch_to_main_wget_area F + _IO_switch_to_wbackup_area F + _IO_switch_to_wget_mode F + _IO_un_link F + _IO_ungetc F + _IO_unsave_markers F + _IO_unsave_wmarkers F + _IO_vfprintf F + _IO_vfscanf F + _IO_vsprintf F + _IO_wdefault_doallocate F + _IO_wdefault_finish F + _IO_wdefault_pbackfail F + _IO_wdefault_uflow F + _IO_wdefault_xsgetn F + _IO_wdefault_xsputn F + _IO_wdo_write F + _IO_wdoallocbuf F + _IO_wfile_jumps D 0xa8 + _IO_wfile_overflow F + _IO_wfile_seekoff F + _IO_wfile_sync F + _IO_wfile_underflow F + _IO_wfile_xsputn F + _IO_wmarker_delta F + _IO_wsetb F + ___brk_addr D 0x8 + __adjtimex F + __after_morecore_hook D 0x8 + __argz_count F + __argz_next F + __argz_stringify F + __asprintf F + __assert F + __assert_fail F + __assert_perror_fail F + __backtrace F + __backtrace_symbols F + __backtrace_symbols_fd F + __bsd_getpgrp F + __check_rhosts_file D 0x4 + __clone2 F + __close F + __cmsg_nxthdr F + __connect F + __ctype32_b D 0x8 + __ctype32_tolower D 0x8 + __ctype32_toupper D 0x8 + __ctype_b D 0x8 + __ctype_get_mb_cur_max F + __ctype_tolower D 0x8 + __ctype_toupper D 0x8 + __curbrk D 0x8 + __cxa_atexit F + __cxa_finalize F + __cyg_profile_func_enter F + __cyg_profile_func_exit F + __daylight D 0x4 + __dcgettext F + __default_morecore F + __dgettext F + __divdf3 F + __divdi3 F + __divsf3 F + __divtf3 F + __dup2 F + __duplocale F + __endmntent F + __environ D 0x8 + __errno_location F + __fbufsize F + __fcntl F + __ffs F + __finite F + __finitef F + __finitel F + __flbf F + __fork F + __fpending F + __fpu_control D 0x4 + __fpurge F + __freadable F + __freading F + __free_hook D 0x8 + __freelocale F + __fsetlocking F + __fwritable F + __fwriting F + __fxstat F + __fxstat64 F + __getdelim F + __getmntent_r F + __getpagesize F + __getpgid F + __getpid F + __gettimeofday F + __gmtime_r F + __h_errno_location F + __isalnum_l F + __isalpha_l F + __isascii_l F + __isblank_l F + __iscntrl_l F + __isdigit_l F + __isgraph_l F + __isinf F + __isinff F + __isinfl F + __islower_l F + __isnan F + __isnanf F + __isnanl F + __isprint_l F + __ispunct_l F + __isspace_l F + __isupper_l F + __iswalnum_l F + __iswalpha_l F + __iswblank_l F + __iswcntrl_l F + __iswctype F + __iswctype_l F + __iswdigit_l F + __iswgraph_l F + __iswlower_l F + __iswprint_l F + __iswpunct_l F + __iswspace_l F + __iswupper_l F + __iswxdigit_l F + __isxdigit_l F + __ivaliduser F + __key_decryptsession_pk_LOCAL D 0x8 + __key_encryptsession_pk_LOCAL D 0x8 + __key_gendes_LOCAL D 0x8 + __libc_allocate_rtsig F + __libc_calloc F + __libc_current_sigrtmax F + __libc_current_sigrtmin F + __libc_free F + __libc_freeres F + __libc_init_first F + __libc_mallinfo F + __libc_malloc F + __libc_mallopt F + __libc_memalign F + __libc_pvalloc F + __libc_realloc F + __libc_sa_len F + __libc_start_main F + __libc_valloc F + __lseek F + __lxstat F + __lxstat64 F + __malloc_hook D 0x8 + __malloc_initialize_hook D 0x8 + __mbrlen F + __mbrtowc F + __memalign_hook D 0x8 + __mempcpy F + __mempcpy_small F + __moddi3 F + __monstartup F + __morecore D 0x8 + __multi3 F + __newlocale F + __nl_langinfo_l F + __nss_configure_lookup F + __nss_database_lookup F + __nss_group_lookup F + __nss_hosts_lookup F + __nss_next F + __nss_passwd_lookup F + __open F + __open64 F + __overflow F + __pipe F + __poll F + __pread64 F + __printf_fp F + __profile_frequency F + __progname D 0x8 + __progname_full D 0x8 + __pwrite64 F + __rawmemchr F + __rcmd_errstr D 0x8 + __read F + __realloc_hook D 0x8 + __res_init F + __res_nclose F + __res_ninit F + __res_randomid F + __res_state F + __sbrk F + __sched_get_priority_max F + __sched_get_priority_min F + __sched_getparam F + __sched_getscheduler F + __sched_setscheduler F + __sched_yield F + __secure_getenv F + __select F + __send F + __setmntent F + __setpgid F + __sigaction F + __sigaddset F + __sigdelset F + __sigismember F + __signbit F + __signbitf F + __signbitl F + __sigpause F + __sigsetjmp F + __sigsuspend F + __statfs F + __stpcpy F + __stpcpy_small F + __stpncpy F + __strcasecmp F + __strcasecmp_l F + __strcasestr F + __strcoll_l F + __strcpy_small F + __strcspn_c1 F + __strcspn_c2 F + __strcspn_c3 F + __strdup F + __strerror_r F + __strfmon_l F + __strncasecmp_l F + __strndup F + __strpbrk_c2 F + __strpbrk_c3 F + __strsep_1c F + __strsep_2c F + __strsep_3c F + __strsep_g F + __strspn_c1 F + __strspn_c2 F + __strspn_c3 F + __strtod_internal F + __strtod_l F + __strtof_internal F + __strtof_l F + __strtok_r F + __strtok_r_1c F + __strtol_internal F + __strtol_l F + __strtold_internal F + __strtold_l F + __strtoll_internal F + __strtoll_l F + __strtoul_internal F + __strtoul_l F + __strtoull_internal F + __strtoull_l F + __strverscmp F + __strxfrm_l F + __sysconf F + __sysctl F + __sysv_signal F + __timezone D 0x8 + __toascii_l F + __tolower_l F + __toupper_l F + __towctrans F + __towctrans_l F + __towlower_l F + __towupper_l F + __tzname D 0x10 + __udivdi3 F + __uflow F + __umoddi3 F + __underflow F + __vfork F + __vfscanf F + __vsnprintf F + __vsscanf F + __wait F + __waitpid F + __wcscasecmp_l F + __wcscoll_l F + __wcsncasecmp_l F + __wcstod_internal F + __wcstod_l F + __wcstof_internal F + __wcstof_l F + __wcstol_internal F + __wcstol_l F + __wcstold_internal F + __wcstold_l F + __wcstoll_internal F + __wcstoll_l F + __wcstoul_internal F + __wcstoul_l F + __wcstoull_internal F + __wcstoull_l F + __wcsxfrm_l F + __wctrans_l F + __wctype_l F + __woverflow F + __write F + __wuflow F + __wunderflow F + __xmknod F + __xpg_basename F + __xpg_sigpause F + __xstat F + __xstat64 F + _argp_unlock_xxx F + _authenticate F + _dl_mcount_wrapper F + _dl_mcount_wrapper_check F + _environ D 0x8 + _errno D 0x4 + _exit F + _flushlbf F + _h_errno D 0x4 + _inb F + _inl F + _inw F + _libc_intl_domainname D 0x5 + _longjmp F + _mcleanup F + _mcount F + _nl_default_dirname D 0x12 + _nl_domain_bindings D 0x8 + _nl_msg_cat_cntr D 0x4 + _null_auth D 0x18 + _obstack D 0x8 + _obstack_allocated_p F + _obstack_begin F + _obstack_begin_1 F + _obstack_free F + _obstack_memory_used F + _obstack_newchunk F + _outb F + _outl F + _outw F + _res D 0x238 + _res_hconf D 0x48 + _rpc_dtablesize F + _seterr_reply F + _setjmp F + _sys_errlist D 0x3e8 + _sys_nerr D 0x4 + _sys_siglist D 0x200 + _tolower F + _toupper F + a64l F + abort F + abs F + accept F + access F + acct F + addmntent F + addseverity F + adjtime F + adjtimex F + advance F + alarm F + alphasort F + alphasort64 F + argp_err_exit_status D 0x4 + argp_error F + argp_failure F + argp_help F + argp_parse F + argp_program_bug_address D 0x8 + argp_program_version D 0x8 + argp_program_version_hook D 0x8 + argp_state_help F + argp_usage F + argz_add F + argz_add_sep F + argz_append F + argz_count F + argz_create F + argz_create_sep F + argz_delete F + argz_extract F + argz_insert F + argz_next F + argz_replace F + argz_stringify F + asctime F + asctime_r F + asprintf F + atexit F + atof F + atoi F + atol F + atoll F + authdes_create F + authdes_getucred F + authdes_pk_create F + authnone_create F + authunix_create F + authunix_create_default F + backtrace F + backtrace_symbols F + backtrace_symbols_fd F + basename F + bcmp F + bcopy F + bdflush F + bind F + bind_textdomain_codeset F + bindresvport F + bindtextdomain F + brk F + bsd_signal F + bsearch F + btowc F + bzero F + calloc F + callrpc F + canonicalize_file_name F + capget F + capset F + catclose F + catgets F + catopen F + cbc_crypt F + cfgetispeed F + cfgetospeed F + cfmakeraw F + cfree F + cfsetispeed F + cfsetospeed F + cfsetspeed F + chdir F + chflags F + chmod F + chown F + chroot F + clearenv F + clearerr F + clearerr_unlocked F + clnt_broadcast F + clnt_create F + clnt_pcreateerror F + clnt_perrno F + clnt_perror F + clnt_spcreateerror F + clnt_sperrno F + clnt_sperror F + clntraw_create F + clnttcp_create F + clntudp_bufcreate F + clntudp_create F + clntunix_create F + clock F + close F + closedir F + closelog F + confstr F + connect F + copysign F + copysignf F + copysignl F + creat F + creat64 F + create_module F + ctermid F + ctime F + ctime_r F + cuserid F + daemon F + daylight D 0x4 + dcgettext F + dcngettext F + delete_module F + des_setparity F + dgettext F + difftime F + dirfd F + dirname F + div F + dngettext F + dprintf F + drand48 F + drand48_r F + dup F + dup2 F + dysize F + ecb_crypt F + ecvt F + ecvt_r F + endaliasent F + endfsent F + endgrent F + endhostent F + endmntent F + endnetent F + endnetgrent F + endprotoent F + endpwent F + endrpcent F + endservent F + endspent F + endttyent F + endusershell F + endutent F + endutxent F + environ D 0x8 + envz_add F + envz_entry F + envz_get F + envz_merge F + envz_remove F + envz_strip F + erand48 F + erand48_r F + err F + errno D 0x4 + error F + error_at_line F + error_message_count D 0x4 + error_one_per_line D 0x4 + error_print_progname D 0x8 + errx F + ether_aton F + ether_aton_r F + ether_hostton F + ether_line F + ether_ntoa F + ether_ntoa_r F + ether_ntohost F + euidaccess F + execl F + execle F + execlp F + execv F + execve F + execvp F + exit F + fattach F + fchdir F + fchflags F + fchmod F + fchown F + fclose F + fcloseall F + fcntl F + fcvt F + fcvt_r F + fdatasync F + fdetach F + fdopen F + feof F + feof_unlocked F + ferror F + ferror_unlocked F + fexecve F + fflush F + fflush_unlocked F + ffs F + ffsl F + ffsll F + fgetc F + fgetc_unlocked F + fgetgrent F + fgetgrent_r F + fgetpos F + fgetpos64 F + fgetpwent F + fgetpwent_r F + fgets F + fgets_unlocked F + fgetspent F + fgetspent_r F + fgetwc F + fgetwc_unlocked F + fgetws F + fgetws_unlocked F + fileno F + fileno_unlocked F + finite F + finitef F + finitel F + flock F + flockfile F + fmemopen F + fmtmsg F + fnmatch F + fopen F + fopen64 F + fopencookie F + fork F + fpathconf F + fprintf F + fputc F + fputc_unlocked F + fputs F + fputs_unlocked F + fputwc F + fputwc_unlocked F + fputws F + fputws_unlocked F + fread F + fread_unlocked F + free F + freeaddrinfo F + freopen F + freopen64 F + frexp F + frexpf F + frexpl F + fscanf F + fseek F + fseeko F + fseeko64 F + fsetpos F + fsetpos64 F + fstatfs F + fstatfs64 F + fstatvfs F + fstatvfs64 F + fsync F + ftell F + ftello F + ftello64 F + ftime F + ftok F + ftruncate F + ftruncate64 F + ftrylockfile F + fts_children F + fts_close F + fts_open F + fts_read F + fts_set F + ftw F + ftw64 F + funlockfile F + fwide F + fwprintf F + fwrite F + fwrite_unlocked F + fwscanf F + gai_strerror F + gcvt F + get_avphys_pages F + get_current_dir_name F + get_kernel_syms F + get_myaddress F + get_nprocs F + get_nprocs_conf F + get_phys_pages F + getaddrinfo F + getaliasbyname F + getaliasbyname_r F + getaliasent F + getaliasent_r F + getc F + getc_unlocked F + getchar F + getchar_unlocked F + getcontext F + getcwd F + getdate F + getdate_err D 0x4 + getdate_r F + getdelim F + getdirentries F + getdirentries64 F + getdomainname F + getdtablesize F + getegid F + getenv F + geteuid F + getfsent F + getfsfile F + getfsspec F + getgid F + getgrent F + getgrent_r F + getgrgid F + getgrgid_r F + getgrnam F + getgrnam_r F + getgroups F + gethostbyaddr F + gethostbyaddr_r F + gethostbyname F + gethostbyname2 F + gethostbyname2_r F + gethostbyname_r F + gethostent F + gethostent_r F + gethostid F + gethostname F + getitimer F + getline F + getloadavg F + getlogin F + getlogin_r F + getmntent F + getmntent_r F + getmsg F + getnameinfo F + getnetbyaddr F + getnetbyaddr_r F + getnetbyname F + getnetbyname_r F + getnetent F + getnetent_r F + getnetgrent F + getnetgrent_r F + getnetname F + getopt F + getopt_long F + getopt_long_only F + getpagesize F + getpass F + getpeername F + getpgid F + getpgrp F + getpid F + getpmsg F + getppid F + getpriority F + getprotobyname F + getprotobyname_r F + getprotobynumber F + getprotobynumber_r F + getprotoent F + getprotoent_r F + getpt F + getpublickey F + getpw F + getpwent F + getpwent_r F + getpwnam F + getpwnam_r F + getpwuid F + getpwuid_r F + getresgid F + getresuid F + getrlimit F + getrlimit64 F + getrpcbyname F + getrpcbyname_r F + getrpcbynumber F + getrpcbynumber_r F + getrpcent F + getrpcent_r F + getrpcport F + getrusage F + gets F + getsecretkey F + getservbyname F + getservbyname_r F + getservbyport F + getservbyport_r F + getservent F + getservent_r F + getsid F + getsockname F + getsockopt F + getspent F + getspent_r F + getspnam F + getspnam_r F + getsubopt F + gettext F + gettimeofday F + getttyent F + getttynam F + getuid F + getusershell F + getutent F + getutent_r F + getutid F + getutid_r F + getutline F + getutline_r F + getutmp F + getutmpx F + getutxent F + getutxid F + getutxline F + getw F + getwc F + getwc_unlocked F + getwchar F + getwchar_unlocked F + getwd F + glob F + glob64 F + glob_pattern_p F + globfree F + globfree64 F + gmtime F + gmtime_r F + gnu_get_libc_release F + gnu_get_libc_version F + grantpt F + group_member F + gsignal F + gtty F + h_errlist D 0x28 + h_errno D 0x4 + h_nerr D 0x4 + hasmntopt F + hcreate F + hcreate_r F + hdestroy F + hdestroy_r F + herror F + host2netname F + hsearch F + hsearch_r F + hstrerror F + htonl F + htons F + iconv F + iconv_close F + iconv_open F + if_freenameindex F + if_indextoname F + if_nameindex F + if_nametoindex F + imaxabs F + imaxdiv F + in6addr_any D 0x10 + in6addr_loopback D 0x10 + inb F + index F + inet_addr F + inet_aton F + inet_lnaof F + inet_makeaddr F + inet_netof F + inet_network F + inet_nsap_addr F + inet_nsap_ntoa F + inet_ntoa F + inet_ntop F + inet_pton F + init_module F + initgroups F + initstate F + initstate_r F + inl F + innetgr F + insque F + inw F + ioctl F + ioperm F + iopl F + iruserok F + iruserok_af F + isalnum F + isalpha F + isascii F + isastream F + isatty F + isblank F + iscntrl F + isdigit F + isfdtype F + isgraph F + isinf F + isinff F + isinfl F + islower F + isnan F + isnanf F + isnanl F + isprint F + ispunct F + isspace F + isupper F + iswalnum F + iswalpha F + iswblank F + iswcntrl F + iswctype F + iswdigit F + iswgraph F + iswlower F + iswprint F + iswpunct F + iswspace F + iswupper F + iswxdigit F + isxdigit F + jrand48 F + jrand48_r F + key_decryptsession F + key_decryptsession_pk F + key_encryptsession F + key_encryptsession_pk F + key_gendes F + key_get_conv F + key_secretkey_is_set F + key_setnet F + key_setsecret F + kill F + killpg F + klogctl F + l64a F + labs F + lchown F + lckpwdf F + lcong48 F + lcong48_r F + ldexp F + ldexpf F + ldexpl F + ldiv F + lfind F + link F + listen F + llabs F + lldiv F + llseek F + loc1 D 0x8 + loc2 D 0x8 + localeconv F + localtime F + localtime_r F + lockf F + lockf64 F + locs D 0x8 + longjmp F + lrand48 F + lrand48_r F + lsearch F + lseek F + lseek64 F + madvise F + makecontext F + mallinfo F + malloc F + malloc_get_state F + malloc_set_state F + malloc_stats F + malloc_trim F + malloc_usable_size F + mallopt F + mallwatch D 0x8 + mblen F + mbrlen F + mbrtowc F + mbsinit F + mbsnrtowcs F + mbsrtowcs F + mbstowcs F + mbtowc F + mcheck F + mcheck_check_all F + mcheck_pedantic F + mcount F + memalign F + memccpy F + memchr F + memcmp F + memcpy F + memfrob F + memmem F + memmove F + mempcpy F + memrchr F + memset F + mincore F + mkdir F + mkdtemp F + mkfifo F + mkstemp F + mkstemp64 F + mktemp F + mktime F + mlock F + mlockall F + mmap F + mmap64 F + modf F + modff F + modfl F + moncontrol F + monstartup F + mount F + mprobe F + mprotect F + mrand48 F + mrand48_r F + mremap F + msgctl F + msgget F + msgrcv F + msgsnd F + msync F + mtrace F + munlock F + munlockall F + munmap F + muntrace F + nanosleep F + netname2host F + netname2user F + nfsservctl F + nftw F + nftw64 F + ngettext F + nice F + nl_langinfo F + nrand48 F + nrand48_r F + ntohl F + ntohs F + ntp_adjtime F + ntp_gettime F + obstack_alloc_failed_handler D 0x8 + obstack_exit_failure D 0x4 + obstack_free F + obstack_printf F + obstack_vprintf F + on_exit F + open F + open64 F + open_memstream F + opendir F + openlog F + optarg D 0x8 + opterr D 0x4 + optind D 0x4 + optopt D 0x4 + outb F + outw F + parse_printf_format F + passwd2des F + pathconf F + pause F + pciconfig_read F + pciconfig_write F + pclose F + perror F + personality F + pipe F + pmap_getmaps F + pmap_getport F + pmap_rmtcall F + pmap_set F + pmap_unset F + poll F + popen F + posix_fadvise F + posix_fadvise64 F + posix_fallocate F + posix_fallocate64 F + posix_madvise F + posix_memalign F + posix_spawn F + posix_spawn_file_actions_addclose F + posix_spawn_file_actions_adddup2 F + posix_spawn_file_actions_addopen F + posix_spawn_file_actions_destroy F + posix_spawn_file_actions_init F + posix_spawnattr_destroy F + posix_spawnattr_getflags F + posix_spawnattr_getpgroup F + posix_spawnattr_getschedparam F + posix_spawnattr_getschedpolicy F + posix_spawnattr_getsigdefault F + posix_spawnattr_getsigmask F + posix_spawnattr_init F + posix_spawnattr_setflags F + posix_spawnattr_setpgroup F + posix_spawnattr_setschedparam F + posix_spawnattr_setschedpolicy F + posix_spawnattr_setsigdefault F + posix_spawnattr_setsigmask F + posix_spawnp F + prctl F + pread F + pread64 F + printf F + printf_size F + printf_size_info F + profil F + program_invocation_name D 0x8 + program_invocation_short_name D 0x8 + pselect F + psignal F + pthread_attr_destroy F + pthread_attr_getdetachstate F + pthread_attr_getinheritsched F + pthread_attr_getschedparam F + pthread_attr_getschedpolicy F + pthread_attr_getscope F + pthread_attr_init F + pthread_attr_setdetachstate F + pthread_attr_setinheritsched F + pthread_attr_setschedparam F + pthread_attr_setschedpolicy F + pthread_attr_setscope F + pthread_cond_broadcast F + pthread_cond_destroy F + pthread_cond_init F + pthread_cond_signal F + pthread_cond_wait F + pthread_condattr_destroy F + pthread_condattr_init F + pthread_equal F + pthread_exit F + pthread_getschedparam F + pthread_mutex_destroy F + pthread_mutex_init F + pthread_mutex_lock F + pthread_mutex_unlock F + pthread_self F + pthread_setcancelstate F + pthread_setcanceltype F + pthread_setschedparam F + ptrace F + ptsname F + ptsname_r F + putc F + putc_unlocked F + putchar F + putchar_unlocked F + putenv F + putgrent F + putmsg F + putpmsg F + putpwent F + puts F + putspent F + pututline F + pututxline F + putw F + putwc F + putwc_unlocked F + putwchar F + putwchar_unlocked F + pvalloc F + pwrite F + pwrite64 F + qecvt F + qecvt_r F + qfcvt F + qfcvt_r F + qgcvt F + qsort F + query_module F + quotactl F + raise F + rand F + rand_r F + random F + random_r F + rawmemchr F + rcmd F + rcmd_af F + re_comp F + re_compile_fastmap F + re_compile_pattern F + re_exec F + re_match F + re_match_2 F + re_max_failures D 0x4 + re_search F + re_search_2 F + re_set_registers F + re_set_syntax F + re_syntax_options D 0x8 + read F + readdir F + readdir64 F + readdir64_r F + readdir_r F + readlink F + readv F + realloc F + realpath F + reboot F + recv F + recvfrom F + recvmsg F + regcomp F + regerror F + regexec F + regfree F + register_printf_function F + registerrpc F + remove F + remque F + rename F + revoke F + rewind F + rewinddir F + rexec F + rexec_af F + rexecoptions D 0x4 + rindex F + rmdir F + rpc_createerr D 0x20 + rpmatch F + rresvport F + rresvport_af F + rtime F + ruserok F + ruserok_af F + ruserpass F + sbrk F + scalbn F + scalbnf F + scalbnl F + scandir F + scandir64 F + scanf F + sched_get_priority_max F + sched_get_priority_min F + sched_getparam F + sched_getscheduler F + sched_rr_get_interval F + sched_setparam F + sched_setscheduler F + sched_yield F + seed48 F + seed48_r F + seekdir F + select F + semctl F + semget F + semop F + send F + sendfile F + sendmsg F + sendto F + setaliasent F + setbuf F + setbuffer F + setcontext F + setdomainname F + setegid F + setenv F + seteuid F + setfsent F + setfsgid F + setfsuid F + setgid F + setgrent F + setgroups F + sethostent F + sethostid F + sethostname F + setitimer F + setjmp F + setlinebuf F + setlocale F + setlogin F + setlogmask F + setmntent F + setnetent F + setnetgrent F + setpgid F + setpgrp F + setpriority F + setprotoent F + setpwent F + setregid F + setresgid F + setresuid F + setreuid F + setrlimit F + setrlimit64 F + setrpcent F + setservent F + setsid F + setsockopt F + setspent F + setstate F + setstate_r F + settimeofday F + setttyent F + setuid F + setusershell F + setutent F + setutxent F + setvbuf F + sgetspent F + sgetspent_r F + shmat F + shmctl F + shmdt F + shmget F + shutdown F + sigaction F + sigaddset F + sigaltstack F + sigandset F + sigblock F + sigdelset F + sigemptyset F + sigfillset F + siggetmask F + sighold F + sigignore F + siginterrupt F + sigisemptyset F + sigismember F + siglongjmp F + signal F + sigorset F + sigpause F + sigpending F + sigprocmask F + sigqueue F + sigrelse F + sigreturn F + sigset F + sigsetmask F + sigstack F + sigsuspend F + sigtimedwait F + sigvec F + sigwait F + sigwaitinfo F + sleep F + snprintf F + socket F + socketpair F + sprintf F + srand F + srand48 F + srand48_r F + srandom F + srandom_r F + sscanf F + ssignal F + sstk F + statfs F + statfs64 F + statvfs F + statvfs64 F + stderr D 0x8 + stdin D 0x8 + stdout D 0x8 + step F + stime F + stpcpy F + stpncpy F + strcasecmp F + strcasestr F + strcat F + strchr F + strchrnul F + strcmp F + strcoll F + strcpy F + strcspn F + strdup F + strerror F + strerror_r F + strfmon F + strfry F + strftime F + strlen F + strncasecmp F + strncat F + strncmp F + strncpy F + strndup F + strnlen F + strpbrk F + strptime F + strrchr F + strsep F + strsignal F + strspn F + strstr F + strtod F + strtof F + strtoimax F + strtok F + strtok_r F + strtol F + strtold F + strtoll F + strtoq F + strtoul F + strtoull F + strtoumax F + strtouq F + strverscmp F + strxfrm F + stty F + svc_exit F + svc_fdset D 0x80 + svc_getreq F + svc_getreq_common F + svc_getreq_poll F + svc_getreqset F + svc_max_pollfd D 0x4 + svc_pollfd D 0x8 + svc_register F + svc_run F + svc_sendreply F + svc_unregister F + svcauthdes_stats D 0x18 + svcerr_auth F + svcerr_decode F + svcerr_noproc F + svcerr_noprog F + svcerr_progvers F + svcerr_systemerr F + svcerr_weakauth F + svcfd_create F + svcraw_create F + svctcp_create F + svcudp_bufcreate F + svcudp_create F + svcudp_enablecache F + svcunix_create F + svcunixfd_create F + swab F + swapcontext F + swapoff F + swapon F + swprintf F + swscanf F + symlink F + sync F + sys_errlist D 0x3e8 + sys_nerr D 0x4 + sys_sigabbrev D 0x200 + sys_siglist D 0x200 + syscall F + sysconf F + sysctl F + sysinfo F + syslog F + system F + sysv_signal F + tcdrain F + tcflow F + tcflush F + tcgetattr F + tcgetpgrp F + tcgetsid F + tcsendbreak F + tcsetattr F + tcsetpgrp F + tdelete F + tdestroy F + telldir F + tempnam F + textdomain F + tfind F + time F + timegm F + timelocal F + times F + timezone D 0x8 + tmpfile F + tmpfile64 F + tmpnam F + tmpnam_r F + toascii F + tolower F + toupper F + towctrans F + towlower F + towupper F + tr_break F + truncate F + truncate64 F + tsearch F + ttyname F + ttyname_r F + ttyslot F + twalk F + tzname D 0x10 + tzset F + ualarm F + ulckpwdf F + ulimit F + umask F + umount F + umount2 F + uname F + ungetc F + ungetwc F + unlink F + unlockpt F + unsetenv F + updwtmp F + updwtmpx F + uselib F + user2netname F + usleep F + ustat F + utime F + utimes F + utmpname F + utmpxname F + valloc F + vasprintf F + vdprintf F + verr F + verrx F + versionsort F + versionsort64 F + vfork F + vfprintf F + vfscanf F + vfwprintf F + vfwscanf F + vhangup F + vlimit F + vprintf F + vscanf F + vsnprintf F + vsprintf F + vsscanf F + vswprintf F + vswscanf F + vsyslog F + vtimes F + vwarn F + vwarnx F + vwprintf F + vwscanf F + wait F + wait3 F + wait4 F + waitid F + waitpid F + warn F + warnx F + wcpcpy F + wcpncpy F + wcrtomb F + wcscasecmp F + wcscat F + wcschr F + wcschrnul F + wcscmp F + wcscoll F + wcscpy F + wcscspn F + wcsdup F + wcsftime F + wcslen F + wcsncasecmp F + wcsncat F + wcsncmp F + wcsncpy F + wcsnlen F + wcsnrtombs F + wcspbrk F + wcsrchr F + wcsrtombs F + wcsspn F + wcsstr F + wcstod F + wcstof F + wcstoimax F + wcstok F + wcstol F + wcstold F + wcstoll F + wcstombs F + wcstoq F + wcstoul F + wcstoull F + wcstoumax F + wcstouq F + wcswcs F + wcswidth F + wcsxfrm F + wctob F + wctomb F + wctrans F + wctype F + wcwidth F + wmemchr F + wmemcmp F + wmemcpy F + wmemmove F + wmempcpy F + wmemset F + wordexp F + wordfree F + wprintf F + write F + writev F + wscanf F + xdecrypt F + xdr_accepted_reply F + xdr_array F + xdr_authdes_cred F + xdr_authdes_verf F + xdr_authunix_parms F + xdr_bool F + xdr_bytes F + xdr_callhdr F + xdr_callmsg F + xdr_char F + xdr_cryptkeyarg F + xdr_cryptkeyarg2 F + xdr_cryptkeyres F + xdr_des_block F + xdr_double F + xdr_enum F + xdr_float F + xdr_free F + xdr_getcredres F + xdr_hyper F + xdr_int F + xdr_int16_t F + xdr_int32_t F + xdr_int64_t F + xdr_int8_t F + xdr_key_netstarg F + xdr_key_netstres F + xdr_keybuf F + xdr_keystatus F + xdr_long F + xdr_longlong_t F + xdr_netnamestr F + xdr_netobj F + xdr_opaque F + xdr_opaque_auth F + xdr_pmap F + xdr_pmaplist F + xdr_pointer F + xdr_reference F + xdr_rejected_reply F + xdr_replymsg F + xdr_rmtcall_args F + xdr_rmtcallres F + xdr_short F + xdr_sizeof F + xdr_string F + xdr_u_char F + xdr_u_hyper F + xdr_u_int F + xdr_u_long F + xdr_u_longlong_t F + xdr_u_short F + xdr_uint16_t F + xdr_uint32_t F + xdr_uint64_t F + xdr_uint8_t F + xdr_union F + xdr_unixcred F + xdr_vector F + xdr_void F + xdr_wrapstring F + xdrmem_create F + xdrrec_create F + xdrrec_endofrecord F + xdrrec_eof F + xdrrec_skiprecord F + xdrstdio_create F + xencrypt F + xprt_register F + xprt_unregister F +GLIBC_2.2.1 + GLIBC_2.2.1 A + pivot_root F + posix_openpt F +GLIBC_2.2.2 + GLIBC_2.2.2 A + __nss_hostname_digits_dots F + wordexp F +GLIBC_2.2.3 + GLIBC_2.2.3 A + __rpc_thread_createerr F + __rpc_thread_svc_fdset F + __rpc_thread_svc_max_pollfd F + __rpc_thread_svc_pollfd F + fnmatch F + sprofil F +GLIBC_2.2.4 + GLIBC_2.2.4 A + dl_iterate_phdr F + getgrouplist F + sockatmark F +GLIBC_2.2.6 + GLIBC_2.2.6 A + __nanosleep F + getunwind F +GLIBC_2.3 + GLIBC_2.3 A + __ctype_b_loc F + __ctype_tolower_loc F + __ctype_toupper_loc F + __isctype F + __strftime_l F + __uselocale F + __wcsftime_l F + _sys_errlist D 0x3f0 + _sys_nerr D 0x4 + duplocale F + fgetxattr F + flistxattr F + freeifaddrs F + freelocale F + fremovexattr F + fsetxattr F + futimes F + getifaddrs F + getxattr F + isalnum_l F + isalpha_l F + isblank_l F + iscntrl_l F + isctype F + isdigit_l F + isgraph_l F + islower_l F + isprint_l F + ispunct_l F + isspace_l F + isupper_l F + iswalnum_l F + iswalpha_l F + iswblank_l F + iswcntrl_l F + iswctype_l F + iswdigit_l F + iswgraph_l F + iswlower_l F + iswprint_l F + iswpunct_l F + iswspace_l F + iswupper_l F + iswxdigit_l F + isxdigit_l F + lgetxattr F + listxattr F + llistxattr F + lremovexattr F + lsetxattr F + lutimes F + newlocale F + nl_langinfo_l F + readahead F + realpath F + removexattr F + sendfile64 F + setxattr F + strcasecmp_l F + strcoll_l F + strfmon_l F + strftime_l F + strncasecmp_l F + strtod_l F + strtof_l F + strtol_l F + strtold_l F + strtoul_l F + strxfrm_l F + sys_errlist D 0x3f0 + sys_nerr D 0x4 + tolower_l F + toupper_l F + towctrans_l F + towlower_l F + towupper_l F + uselocale F + wcscasecmp_l F + wcscoll_l F + wcsftime_l F + wcsncasecmp_l F + wcstod_l F + wcstof_l F + wcstol_l F + wcstold_l F + wcstoll_l F + wcstoul_l F + wcstoull_l F + wcsxfrm_l F + wctrans_l F + wctype_l F +GLIBC_2.3.2 + GLIBC_2.3.2 A + __register_atfork F + epoll_create F + epoll_ctl F + epoll_wait F + lchmod F + pthread_cond_broadcast F + pthread_cond_destroy F + pthread_cond_init F + pthread_cond_signal F + pthread_cond_wait F + sched_getaffinity F + sched_setaffinity F + strptime_l F +GLIBC_2.3.3 + GLIBC_2.3.3 A + remap_file_pages F + strtoll_l F + strtoull_l F diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/libcrypt.abilist b/sysdeps/unix/sysv/linux/ia64/nptl/libcrypt.abilist new file mode 100644 index 0000000000..1df145f260 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/nptl/libcrypt.abilist @@ -0,0 +1,9 @@ +GLIBC_2.0 + GLIBC_2.0 A + crypt F + crypt_r F + encrypt F + encrypt_r F + fcrypt F + setkey F + setkey_r F diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/libdl.abilist b/sysdeps/unix/sysv/linux/ia64/nptl/libdl.abilist new file mode 100644 index 0000000000..647e6025fd --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/nptl/libdl.abilist @@ -0,0 +1,15 @@ +GLIBC_2.0 + GLIBC_2.0 A + dladdr F + dlclose F + dlerror F + dlopen F + dlsym F +GLIBC_2.1 + GLIBC_2.1 A + dlopen F + dlvsym F +GLIBC_2.3.3 + GLIBC_2.3.3 A + dladdr1 F + dlinfo F diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/libm.abilist b/sysdeps/unix/sysv/linux/ia64/nptl/libm.abilist new file mode 100644 index 0000000000..9e18c87176 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/nptl/libm.abilist @@ -0,0 +1,320 @@ +GLIBC_2.2 + GLIBC_2.2 A + _LIB_VERSION D 0x4 + __clog10 F + __clog10f F + __clog10l F + __finite F + __finitef F + __finitel F + __fpclassify F + __fpclassifyf F + __fpclassifyl F + __signbit F + __signbitf F + __signbitl F + acos F + acosf F + acosh F + acoshf F + acoshl F + acosl F + asin F + asinf F + asinh F + asinhf F + asinhl F + asinl F + atan F + atan2 F + atan2f F + atan2l F + atanf F + atanh F + atanhf F + atanhl F + atanl F + cabs F + cabsf F + cabsl F + cacos F + cacosf F + cacosh F + cacoshf F + cacoshl F + cacosl F + carg F + cargf F + cargl F + casin F + casinf F + casinh F + casinhf F + casinhl F + casinl F + catan F + catanf F + catanh F + catanhf F + catanhl F + catanl F + cbrt F + cbrtf F + cbrtl F + ccos F + ccosf F + ccosh F + ccoshf F + ccoshl F + ccosl F + ceil F + ceilf F + ceill F + cexp F + cexpf F + cexpl F + cimag F + cimagf F + cimagl F + clog F + clog10 F + clog10f F + clog10l F + clogf F + clogl F + conj F + conjf F + conjl F + copysign F + copysignf F + copysignl F + cos F + cosf F + cosh F + coshf F + coshl F + cosl F + cpow F + cpowf F + cpowl F + cproj F + cprojf F + cprojl F + creal F + crealf F + creall F + csin F + csinf F + csinh F + csinhf F + csinhl F + csinl F + csqrt F + csqrtf F + csqrtl F + ctan F + ctanf F + ctanh F + ctanhf F + ctanhl F + ctanl F + drem F + dremf F + dreml F + erf F + erfc F + erfcf F + erfcl F + erff F + erfl F + exp F + exp10 F + exp10f F + exp10l F + exp2 F + exp2f F + exp2l F + expf F + expl F + expm1 F + expm1f F + expm1l F + fabs F + fabsf F + fabsl F + fdim F + fdimf F + fdiml F + feclearexcept F + fedisableexcept F + feenableexcept F + fegetenv F + fegetexcept F + fegetexceptflag F + fegetround F + feholdexcept F + feraiseexcept F + fesetenv F + fesetexceptflag F + fesetround F + fetestexcept F + feupdateenv F + finite F + finitef F + finitel F + floor F + floorf F + floorl F + fma F + fmaf F + fmal F + fmax F + fmaxf F + fmaxl F + fmin F + fminf F + fminl F + fmod F + fmodf F + fmodl F + frexp F + frexpf F + frexpl F + gamma F + gammaf F + gammal F + hypot F + hypotf F + hypotl F + ilogb F + ilogbf F + ilogbl F + j0 F + j0f F + j0l F + j1 F + j1f F + j1l F + jn F + jnf F + jnl F + ldexp F + ldexpf F + ldexpl F + lgamma F + lgamma_r F + lgammaf F + lgammaf_r F + lgammal F + lgammal_r F + llrint F + llrintf F + llrintl F + llround F + llroundf F + llroundl F + log F + log10 F + log10f F + log10l F + log1p F + log1pf F + log1pl F + log2 F + log2f F + log2l F + logb F + logbf F + logbl F + logf F + logl F + lrint F + lrintf F + lrintl F + lround F + lroundf F + lroundl F + matherr F + modf F + modff F + modfl F + nan F + nanf F + nanl F + nearbyint F + nearbyintf F + nearbyintl F + nextafter F + nextafterf F + nextafterl F + nexttoward F + nexttowardf F + nexttowardl F + pow F + pow10 F + pow10f F + pow10l F + powf F + powl F + remainder F + remainderf F + remainderl F + remquo F + remquof F + remquol F + rint F + rintf F + rintl F + round F + roundf F + roundl F + scalb F + scalbf F + scalbl F + scalbln F + scalblnf F + scalblnl F + scalbn F + scalbnf F + scalbnl F + signgam D 0x4 + significand F + significandf F + significandl F + sin F + sincos F + sincosf F + sincosl F + sinf F + sinh F + sinhf F + sinhl F + sinl F + sqrt F + sqrtf F + sqrtl F + tan F + tanf F + tanh F + tanhf F + tanhl F + tanl F + tgamma F + tgammaf F + tgammal F + trunc F + truncf F + truncl F + y0 F + y0f F + y0l F + y1 F + y1f F + y1l F + yn F + ynf F + ynl F +GLIBC_2.2.3 + GLIBC_2.2.3 A + matherrf F + matherrl F diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/libnsl.abilist b/sysdeps/unix/sysv/linux/ia64/nptl/libnsl.abilist new file mode 100644 index 0000000000..4241e2d887 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/nptl/libnsl.abilist @@ -0,0 +1,127 @@ +GLIBC_2.0 + GLIBC_2.0 A + __yp_check F + xdr_domainname F + xdr_keydat F + xdr_mapname F + xdr_peername F + xdr_valdat F + xdr_yp_buf F + xdr_ypbind_binding F + xdr_ypbind_resp F + xdr_ypbind_resptype F + xdr_ypbind_setdom F + xdr_ypdelete_args F + xdr_ypmap_parms F + xdr_ypmaplist F + xdr_yppush_status F + xdr_yppushresp_xfr F + xdr_ypreq_key F + xdr_ypreq_nokey F + xdr_ypreq_xfr F + xdr_ypresp_all F + xdr_ypresp_key_val F + xdr_ypresp_maplist F + xdr_ypresp_master F + xdr_ypresp_order F + xdr_ypresp_val F + xdr_ypresp_xfr F + xdr_ypstat F + xdr_ypupdate_args F + xdr_ypxfrstat F + yp_all F + yp_bind F + yp_first F + yp_get_default_domain F + yp_maplist F + yp_master F + yp_match F + yp_next F + yp_order F + yp_unbind F + yp_update F + ypbinderr_string F + yperr_string F + ypprot_err F +GLIBC_2.1 + GLIBC_2.1 A + __free_fdresult F + __nis_default_access F + __nis_default_group F + __nis_default_owner F + __nis_default_ttl F + __nis_finddirectory F + __nis_hash F + __nisbind_connect F + __nisbind_create F + __nisbind_destroy F + __nisbind_next F + nis_add F + nis_add_entry F + nis_addmember F + nis_checkpoint F + nis_clone_directory F + nis_clone_object F + nis_clone_result F + nis_creategroup F + nis_destroy_object F + nis_destroygroup F + nis_dir_cmp F + nis_domain_of F + nis_domain_of_r F + nis_first_entry F + nis_free_directory F + nis_free_object F + nis_free_request F + nis_freenames F + nis_freeresult F + nis_freeservlist F + nis_freetags F + nis_getnames F + nis_getservlist F + nis_ismember F + nis_leaf_of F + nis_leaf_of_r F + nis_lerror F + nis_list F + nis_local_directory F + nis_local_group F + nis_local_host F + nis_local_principal F + nis_lookup F + nis_mkdir F + nis_modify F + nis_modify_entry F + nis_name_of F + nis_name_of_r F + nis_next_entry F + nis_perror F + nis_ping F + nis_print_directory F + nis_print_entry F + nis_print_group F + nis_print_group_entry F + nis_print_link F + nis_print_object F + nis_print_result F + nis_print_rights F + nis_print_table F + nis_read_obj F + nis_remove F + nis_remove_entry F + nis_removemember F + nis_rmdir F + nis_servstate F + nis_sperrno F + nis_sperror F + nis_sperror_r F + nis_stats F + nis_verifygroup F + nis_write_obj F + readColdStartFile F + writeColdStartFile F + xdr_cback_data F + xdr_obj_p F +GLIBC_2.2 + GLIBC_2.2 A + xdr_ypall F diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/libpthread.abilist b/sysdeps/unix/sysv/linux/ia64/nptl/libpthread.abilist new file mode 100644 index 0000000000..dcaef350a5 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/nptl/libpthread.abilist @@ -0,0 +1,206 @@ +GLIBC_2.2 + GLIBC_2.2 A + _IO_flockfile F + _IO_ftrylockfile F + _IO_funlockfile F + __close F + __connect F + __errno_location F + __fcntl F + __fork F + __h_errno_location F + __libc_allocate_rtsig F + __libc_current_sigrtmax F + __libc_current_sigrtmin F + __lseek F + __open F + __open64 F + __pread64 F + __pthread_getspecific F + __pthread_key_create F + __pthread_mutex_destroy F + __pthread_mutex_init F + __pthread_mutex_lock F + __pthread_mutex_trylock F + __pthread_mutex_unlock F + __pthread_mutexattr_destroy F + __pthread_mutexattr_init F + __pthread_mutexattr_settype F + __pthread_once F + __pthread_rwlock_destroy F + __pthread_rwlock_init F + __pthread_rwlock_rdlock F + __pthread_rwlock_tryrdlock F + __pthread_rwlock_trywrlock F + __pthread_rwlock_unlock F + __pthread_rwlock_wrlock F + __pthread_setspecific F + __pwrite64 F + __read F + __res_state F + __send F + __sigaction F + __vfork F + __wait F + __write F + _pthread_cleanup_pop F + _pthread_cleanup_pop_restore F + _pthread_cleanup_push F + _pthread_cleanup_push_defer F + accept F + close F + connect F + fcntl F + flockfile F + fork F + fsync F + ftrylockfile F + funlockfile F + longjmp F + lseek F + lseek64 F + msync F + nanosleep F + open F + open64 F + pause F + pread F + pread64 F + pthread_atfork F + pthread_attr_destroy F + pthread_attr_getdetachstate F + pthread_attr_getguardsize F + pthread_attr_getinheritsched F + pthread_attr_getschedparam F + pthread_attr_getschedpolicy F + pthread_attr_getscope F + pthread_attr_getstack F + pthread_attr_getstackaddr F + pthread_attr_getstacksize F + pthread_attr_init F + pthread_attr_setdetachstate F + pthread_attr_setguardsize F + pthread_attr_setinheritsched F + pthread_attr_setschedparam F + pthread_attr_setschedpolicy F + pthread_attr_setscope F + pthread_attr_setstack F + pthread_attr_setstackaddr F + pthread_attr_setstacksize F + pthread_barrier_destroy F + pthread_barrier_init F + pthread_barrier_wait F + pthread_barrierattr_destroy F + pthread_barrierattr_init F + pthread_barrierattr_setpshared F + pthread_cancel F + pthread_cond_broadcast F + pthread_cond_destroy F + pthread_cond_init F + pthread_cond_signal F + pthread_cond_timedwait F + pthread_cond_wait F + pthread_condattr_destroy F + pthread_condattr_getpshared F + pthread_condattr_init F + pthread_condattr_setpshared F + pthread_create F + pthread_detach F + pthread_equal F + pthread_exit F + pthread_getconcurrency F + pthread_getcpuclockid F + pthread_getschedparam F + pthread_getspecific F + pthread_join F + pthread_key_create F + pthread_key_delete F + pthread_kill F + pthread_kill_other_threads_np F + pthread_mutex_destroy F + pthread_mutex_init F + pthread_mutex_lock F + pthread_mutex_timedlock F + pthread_mutex_trylock F + pthread_mutex_unlock F + pthread_mutexattr_destroy F + pthread_mutexattr_getkind_np F + pthread_mutexattr_getpshared F + pthread_mutexattr_gettype F + pthread_mutexattr_init F + pthread_mutexattr_setkind_np F + pthread_mutexattr_setpshared F + pthread_mutexattr_settype F + pthread_once F + pthread_rwlock_destroy F + pthread_rwlock_init F + pthread_rwlock_rdlock F + pthread_rwlock_timedrdlock F + pthread_rwlock_timedwrlock F + pthread_rwlock_tryrdlock F + pthread_rwlock_trywrlock F + pthread_rwlock_unlock F + pthread_rwlock_wrlock F + pthread_rwlockattr_destroy F + pthread_rwlockattr_getkind_np F + pthread_rwlockattr_getpshared F + pthread_rwlockattr_init F + pthread_rwlockattr_setkind_np F + pthread_rwlockattr_setpshared F + pthread_self F + pthread_setcancelstate F + pthread_setcanceltype F + pthread_setconcurrency F + pthread_setschedparam F + pthread_setspecific F + pthread_sigmask F + pthread_spin_destroy F + pthread_spin_init F + pthread_spin_lock F + pthread_spin_trylock F + pthread_spin_unlock F + pthread_testcancel F + pthread_yield F + pwrite F + pwrite64 F + raise F + read F + recv F + recvfrom F + recvmsg F + sem_close F + sem_destroy F + sem_getvalue F + sem_init F + sem_open F + sem_post F + sem_timedwait F + sem_trywait F + sem_unlink F + sem_wait F + send F + sendmsg F + sendto F + sigaction F + siglongjmp F + sigwait F + system F + tcdrain F + vfork F + wait F + waitpid F + write F +GLIBC_2.2.3 + GLIBC_2.2.3 A + pthread_getattr_np F +GLIBC_2.2.6 + GLIBC_2.2.6 A + __nanosleep F +GLIBC_2.3.2 + GLIBC_2.3.2 A + pthread_cond_broadcast F + pthread_cond_destroy F + pthread_cond_init F + pthread_cond_signal F + pthread_cond_timedwait F + pthread_cond_wait F diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/libresolv.abilist b/sysdeps/unix/sysv/linux/ia64/nptl/libresolv.abilist new file mode 100644 index 0000000000..f762bc2a70 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/nptl/libresolv.abilist @@ -0,0 +1,76 @@ +GLIBC_2.0 + GLIBC_2.0 A + __b64_ntop F + __b64_pton F + __dn_comp F + __dn_count_labels F + __dn_skipname F + __fp_nquery F + __fp_query F + __fp_resstat F + __hostalias F + __loc_aton F + __loc_ntoa F + __p_cdname F + __p_cdnname F + __p_class F + __p_class_syms D 0xa8 + __p_fqname F + __p_fqnname F + __p_option F + __p_query F + __p_secstodate F + __p_time F + __p_type F + __p_type_syms D 0x438 + __putlong F + __putshort F + __res_close F + __res_dnok F + __res_hnok F + __res_isourserver F + __res_mailok F + __res_nameinquery F + __res_ownok F + __res_queriesmatch F + __res_send F + __sym_ntop F + __sym_ntos F + __sym_ston F + _gethtbyaddr F + _gethtbyname F + _gethtbyname2 F + _gethtent F + _getlong F + _getshort F + _res_opcodes D 0x80 + _sethtent F + dn_expand F + inet_net_ntop F + inet_net_pton F + inet_neta F + res_gethostbyaddr F + res_gethostbyname F + res_gethostbyname2 F + res_mkquery F + res_query F + res_querydomain F + res_search F + res_send_setqhook F + res_send_setrhook F +GLIBC_2.2 + GLIBC_2.2 A + __dn_expand F + __res_hostalias F + __res_mkquery F + __res_nmkquery F + __res_nquery F + __res_nquerydomain F + __res_nsearch F + __res_nsend F + __res_query F + __res_querydomain F + __res_search F +GLIBC_2.3.2 + GLIBC_2.3.2 A + __p_rcode F diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/librt.abilist b/sysdeps/unix/sysv/linux/ia64/nptl/librt.abilist new file mode 100644 index 0000000000..3bb5aabbe8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/nptl/librt.abilist @@ -0,0 +1,33 @@ +GLIBC_2.1 + GLIBC_2.1 A + aio_cancel F + aio_cancel64 F + aio_error F + aio_error64 F + aio_fsync F + aio_fsync64 F + aio_init F + aio_read F + aio_read64 F + aio_return F + aio_return64 F + aio_suspend F + aio_suspend64 F + aio_write F + aio_write64 F + lio_listio F + lio_listio64 F +GLIBC_2.2 + GLIBC_2.2 A + clock_getcpuclockid F + clock_getres F + clock_gettime F + clock_nanosleep F + clock_settime F + shm_open F + shm_unlink F + timer_create F + timer_delete F + timer_getoverrun F + timer_gettime F + timer_settime F diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/libthread_db.abilist b/sysdeps/unix/sysv/linux/ia64/nptl/libthread_db.abilist new file mode 100644 index 0000000000..f33138067c --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/nptl/libthread_db.abilist @@ -0,0 +1,48 @@ +GLIBC_2.1.3 + GLIBC_2.1.3 A + td_init F + td_log F + td_ta_clear_event F + td_ta_delete F + td_ta_enable_stats F + td_ta_event_addr F + td_ta_event_getmsg F + td_ta_get_nthreads F + td_ta_get_ph F + td_ta_get_stats F + td_ta_map_id2thr F + td_ta_map_lwp2thr F + td_ta_new F + td_ta_reset_stats F + td_ta_set_event F + td_ta_setconcurrency F + td_ta_thr_iter F + td_ta_tsd_iter F + td_thr_clear_event F + td_thr_dbresume F + td_thr_dbsuspend F + td_thr_event_enable F + td_thr_event_getmsg F + td_thr_get_info F + td_thr_getfpregs F + td_thr_getgregs F + td_thr_getxregs F + td_thr_getxregsize F + td_thr_set_event F + td_thr_setfpregs F + td_thr_setgregs F + td_thr_setprio F + td_thr_setsigpending F + td_thr_setxregs F + td_thr_sigsetmask F + td_thr_tsd F + td_thr_validate F +GLIBC_2.2.3 + GLIBC_2.2.3 A + td_symbol_list F +GLIBC_2.3 + GLIBC_2.3 A + td_thr_tls_get_addr F +GLIBC_2.3.3 + GLIBC_2.3.3 A + td_thr_tlsbase F diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/libutil.abilist b/sysdeps/unix/sysv/linux/ia64/nptl/libutil.abilist new file mode 100644 index 0000000000..7422687e3c --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/nptl/libutil.abilist @@ -0,0 +1,8 @@ +GLIBC_2.0 + GLIBC_2.0 A + forkpty F + login F + login_tty F + logout F + logwtmp F + openpty F From e44af88e6a9bd006b1597c0dabdc4c0b73f379ba Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 6 May 2012 05:39:09 -0400 Subject: [PATCH 4337/4487] ia64: update abilist For the most part, these are adding symbols from newer glibc releases that should have been added to ia64 in the first place, but no one noticed. There were also adding symbols from older versions, but that appears to be an oversight in the old abilist files where the ia64 tuple wasn't added to the symbol block. A few symbols did get deleted, but that looks normal as no other arch has them, and comparing to an old glibc-2.7 build, things have been this way for quite a while. After this, `make check-abi` now passes for ia6. Signed-off-by: Mike Frysinger --- ChangeLog.ia64 | 10 + sysdeps/unix/sysv/linux/ia64/nptl/ld.abilist | 3 + .../unix/sysv/linux/ia64/nptl/libc.abilist | 287 +++++++++++++++++- .../unix/sysv/linux/ia64/nptl/libdl.abilist | 3 + .../unix/sysv/linux/ia64/nptl/libm.abilist | 22 ++ .../sysv/linux/ia64/nptl/libpthread.abilist | 47 +++ .../sysv/linux/ia64/nptl/libresolv.abilist | 30 +- .../unix/sysv/linux/ia64/nptl/librt.abilist | 26 ++ 8 files changed, 420 insertions(+), 8 deletions(-) diff --git a/ChangeLog.ia64 b/ChangeLog.ia64 index 396cd194bc..da57406fe6 100644 --- a/ChangeLog.ia64 +++ b/ChangeLog.ia64 @@ -1,3 +1,13 @@ +2012-05-06 Mike Frysinger + + * sysdeps/unix/sysv/linux/ia64/nptl/ld.abilist: Update symbol list. + * sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/libdl.abilist: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/libm.abilist: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/libpthread.abilist: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/libresolv.abilist: Likewise. + * sysdeps/unix/sysv/linux/ia64/nptl/librt.abilist: Likewise. + 2012-05-06 Mike Frysinger * sysdeps/unix/sysv/linux/ia64/nptl/ld.abilist: Generated from diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/ld.abilist b/sysdeps/unix/sysv/linux/ia64/nptl/ld.abilist index 74997efbb9..9ad04eddad 100644 --- a/sysdeps/unix/sysv/linux/ia64/nptl/ld.abilist +++ b/sysdeps/unix/sysv/linux/ia64/nptl/ld.abilist @@ -1,6 +1,7 @@ GLIBC_2.2 GLIBC_2.2 A __libc_memalign F + __libc_stack_end D 0x8 _dl_mcount F _r_debug D 0x28 calloc F @@ -10,3 +11,5 @@ GLIBC_2.2 GLIBC_2.3 GLIBC_2.3 A __tls_get_addr F +GLIBC_2.4 + GLIBC_2.4 A diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist b/sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist index 225a27dbf5..a8cf65c85b 100644 --- a/sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist +++ b/sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist @@ -1,3 +1,81 @@ +GLIBC_2.10 + GLIBC_2.10 A + __cxa_at_quick_exit F + __posix_getopt F + accept4 F + endsgent F + fallocate F + fallocate64 F + fgetsgent F + fgetsgent_r F + getsgent F + getsgent_r F + getsgnam F + getsgnam_r F + malloc_info F + preadv F + preadv64 F + psiginfo F + putsgent F + pwritev F + pwritev64 F + quick_exit F + register_printf_modifier F + register_printf_specifier F + register_printf_type F + setsgent F + sgetsgent F + sgetsgent_r F +GLIBC_2.11 + GLIBC_2.11 A + __longjmp_chk F + execvpe F + mkostemps F + mkostemps64 F + mkstemps F + mkstemps64 F +GLIBC_2.12 + GLIBC_2.12 A + _sys_errlist D 0x438 + _sys_nerr D 0x4 + ntp_gettimex F + recvmmsg F + sys_errlist D 0x438 + sys_nerr D 0x4 +GLIBC_2.13 + GLIBC_2.13 A + fanotify_init F + fanotify_mark F + prlimit F + prlimit64 F +GLIBC_2.14 + GLIBC_2.14 A + clock_adjtime F + name_to_handle_at F + open_by_handle_at F + sendmmsg F + setns F + syncfs F +GLIBC_2.15 + GLIBC_2.15 A + __fdelt_chk F + __fdelt_warn F + posix_spawn F + posix_spawnp F + process_vm_readv F + process_vm_writev F + scandirat F + scandirat64 F +GLIBC_2.16 + GLIBC_2.16 A + __poll_chk F + __ppoll_chk F + aligned_alloc F + c16rtomb F + c32rtomb F + mbrtoc16 F + mbrtoc32 F + timespec_get F GLIBC_2.2 GLIBC_2.2 A _Exit F @@ -415,15 +493,12 @@ GLIBC_2.2 __xpg_sigpause F __xstat F __xstat64 F - _argp_unlock_xxx F _authenticate F _dl_mcount_wrapper F _dl_mcount_wrapper_check F _environ D 0x8 - _errno D 0x4 _exit F _flushlbf F - _h_errno D 0x4 _inb F _inl F _inw F @@ -621,7 +696,6 @@ GLIBC_2.2 erand48 F erand48_r F err F - errno D 0x4 error F error_at_line F error_message_count D 0x4 @@ -909,7 +983,6 @@ GLIBC_2.2 gsignal F gtty F h_errlist D 0x28 - h_errno D 0x4 h_nerr D 0x4 hasmntopt F hcreate F @@ -1209,6 +1282,7 @@ GLIBC_2.2 pthread_cond_destroy F pthread_cond_init F pthread_cond_signal F + pthread_cond_timedwait F pthread_cond_wait F pthread_condattr_destroy F pthread_condattr_init F @@ -1898,12 +1972,211 @@ GLIBC_2.3.2 pthread_cond_destroy F pthread_cond_init F pthread_cond_signal F + pthread_cond_timedwait F pthread_cond_wait F - sched_getaffinity F - sched_setaffinity F strptime_l F GLIBC_2.3.3 GLIBC_2.3.3 A + _sys_siglist D 0x208 + gnu_dev_major F + gnu_dev_makedev F + gnu_dev_minor F + inet6_option_alloc F + inet6_option_append F + inet6_option_find F + inet6_option_init F + inet6_option_next F + inet6_option_space F + nftw F + nftw64 F remap_file_pages F + sched_getaffinity F + sched_setaffinity F + semtimedop F strtoll_l F strtoull_l F + sys_sigabbrev D 0x208 + sys_siglist D 0x208 +GLIBC_2.3.4 + GLIBC_2.3.4 A + __chk_fail F + __fprintf_chk F + __gets_chk F + __memcpy_chk F + __memmove_chk F + __mempcpy_chk F + __memset_chk F + __printf_chk F + __snprintf_chk F + __sprintf_chk F + __stpcpy_chk F + __strcat_chk F + __strcpy_chk F + __strncat_chk F + __strncpy_chk F + __vfprintf_chk F + __vprintf_chk F + __vsnprintf_chk F + __vsprintf_chk F + __xpg_strerror_r F + getipv4sourcefilter F + getsourcefilter F + regexec F + sched_getaffinity F + sched_setaffinity F + setipv4sourcefilter F + setsourcefilter F + xdr_quad_t F + xdr_u_quad_t F +GLIBC_2.4 + GLIBC_2.4 A + __confstr_chk F + __fgets_chk F + __fgets_unlocked_chk F + __fgetws_chk F + __fgetws_unlocked_chk F + __fwprintf_chk F + __fxstatat F + __fxstatat64 F + __getcwd_chk F + __getdomainname_chk F + __getgroups_chk F + __gethostname_chk F + __getlogin_r_chk F + __getwd_chk F + __mbsnrtowcs_chk F + __mbsrtowcs_chk F + __mbstowcs_chk F + __pread64_chk F + __pread_chk F + __ptsname_r_chk F + __read_chk F + __readlink_chk F + __realpath_chk F + __recv_chk F + __recvfrom_chk F + __stack_chk_fail F + __stpncpy_chk F + __swprintf_chk F + __syslog_chk F + __ttyname_r_chk F + __vfwprintf_chk F + __vswprintf_chk F + __vsyslog_chk F + __vwprintf_chk F + __wcpcpy_chk F + __wcpncpy_chk F + __wcrtomb_chk F + __wcscat_chk F + __wcscpy_chk F + __wcsncat_chk F + __wcsncpy_chk F + __wcsnrtombs_chk F + __wcsrtombs_chk F + __wcstombs_chk F + __wctomb_chk F + __wmemcpy_chk F + __wmemmove_chk F + __wmempcpy_chk F + __wmemset_chk F + __wprintf_chk F + __xmknodat F + _sys_errlist D 0x420 + _sys_nerr D 0x4 + eaccess F + faccessat F + fchmodat F + fchownat F + fdopendir F + futimesat F + inotify_add_watch F + inotify_init F + inotify_rm_watch F + linkat F + mkdirat F + mkfifoat F + open_wmemstream F + openat F + openat64 F + ppoll F + readlinkat F + renameat F + symlinkat F + sys_errlist D 0x420 + sys_nerr D 0x4 + unlinkat F + unshare F +GLIBC_2.5 + GLIBC_2.5 A + __readlinkat_chk F + inet6_opt_append F + inet6_opt_find F + inet6_opt_finish F + inet6_opt_get_val F + inet6_opt_init F + inet6_opt_next F + inet6_opt_set_val F + inet6_rth_add F + inet6_rth_getaddr F + inet6_rth_init F + inet6_rth_reverse F + inet6_rth_segments F + inet6_rth_space F + splice F + tee F + vmsplice F +GLIBC_2.6 + GLIBC_2.6 A + __sched_cpucount F + epoll_pwait F + futimens F + sched_getcpu F + strerror_l F + sync_file_range F + utimensat F +GLIBC_2.7 + GLIBC_2.7 A + __fread_chk F + __fread_unlocked_chk F + __isoc99_fscanf F + __isoc99_fwscanf F + __isoc99_scanf F + __isoc99_sscanf F + __isoc99_swscanf F + __isoc99_vfscanf F + __isoc99_vfwscanf F + __isoc99_vscanf F + __isoc99_vsscanf F + __isoc99_vswscanf F + __isoc99_vwscanf F + __isoc99_wscanf F + __open64_2 F + __open_2 F + __openat64_2 F + __openat_2 F + __sched_cpualloc F + __sched_cpufree F + eventfd F + eventfd_read F + eventfd_write F + mkostemp F + mkostemp64 F + signalfd F +GLIBC_2.8 + GLIBC_2.8 A + __asprintf_chk F + __dprintf_chk F + __obstack_printf_chk F + __obstack_vprintf_chk F + __vasprintf_chk F + __vdprintf_chk F + qsort_r F + timerfd_create F + timerfd_gettime F + timerfd_settime F +GLIBC_2.9 + GLIBC_2.9 A + dup3 F + epoll_create1 F + inotify_init1 F + pipe2 F diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/libdl.abilist b/sysdeps/unix/sysv/linux/ia64/nptl/libdl.abilist index 647e6025fd..62e6b41edb 100644 --- a/sysdeps/unix/sysv/linux/ia64/nptl/libdl.abilist +++ b/sysdeps/unix/sysv/linux/ia64/nptl/libdl.abilist @@ -13,3 +13,6 @@ GLIBC_2.3.3 GLIBC_2.3.3 A dladdr1 F dlinfo F +GLIBC_2.3.4 + GLIBC_2.3.4 A + dlmopen F diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/libm.abilist b/sysdeps/unix/sysv/linux/ia64/nptl/libm.abilist index 9e18c87176..1fb51a118d 100644 --- a/sysdeps/unix/sysv/linux/ia64/nptl/libm.abilist +++ b/sysdeps/unix/sysv/linux/ia64/nptl/libm.abilist @@ -1,3 +1,23 @@ +GLIBC_2.15 + GLIBC_2.15 A + __j0_finite F + __j0f_finite F + __j0l_finite F + __j1_finite F + __j1f_finite F + __j1l_finite F + __jn_finite F + __jnf_finite F + __jnl_finite F + __y0_finite F + __y0f_finite F + __y0l_finite F + __y1_finite F + __y1f_finite F + __y1l_finite F + __yn_finite F + __ynf_finite F + __ynl_finite F GLIBC_2.2 GLIBC_2.2 A _LIB_VERSION D 0x4 @@ -318,3 +338,5 @@ GLIBC_2.2.3 GLIBC_2.2.3 A matherrf F matherrl F +GLIBC_2.4 + GLIBC_2.4 A diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/libpthread.abilist b/sysdeps/unix/sysv/linux/ia64/nptl/libpthread.abilist index dcaef350a5..b7749e2840 100644 --- a/sysdeps/unix/sysv/linux/ia64/nptl/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/ia64/nptl/libpthread.abilist @@ -1,3 +1,13 @@ +GLIBC_2.11 + GLIBC_2.11 A + pthread_sigqueue F +GLIBC_2.12 + GLIBC_2.12 A + pthread_getname_np F + pthread_mutex_consistent F + pthread_mutexattr_getrobust F + pthread_mutexattr_setrobust F + pthread_setname_np F GLIBC_2.2 GLIBC_2.2 A _IO_flockfile F @@ -204,3 +214,40 @@ GLIBC_2.3.2 pthread_cond_signal F pthread_cond_timedwait F pthread_cond_wait F +GLIBC_2.3.3 + GLIBC_2.3.3 A + __pthread_cleanup_routine F + __pthread_register_cancel F + __pthread_register_cancel_defer F + __pthread_unregister_cancel F + __pthread_unregister_cancel_restore F + __pthread_unwind_next F + pthread_attr_getaffinity_np F + pthread_attr_setaffinity_np F + pthread_attr_setstack F + pthread_attr_setstacksize F + pthread_barrierattr_getpshared F + pthread_condattr_getclock F + pthread_condattr_setclock F + pthread_getaffinity_np F + pthread_setaffinity_np F + pthread_timedjoin_np F + pthread_tryjoin_np F +GLIBC_2.3.4 + GLIBC_2.3.4 A + pthread_attr_getaffinity_np F + pthread_attr_setaffinity_np F + pthread_getaffinity_np F + pthread_setaffinity_np F + pthread_setschedprio F +GLIBC_2.4 + GLIBC_2.4 A + pthread_mutex_consistent_np F + pthread_mutex_getprioceiling F + pthread_mutex_setprioceiling F + pthread_mutexattr_getprioceiling F + pthread_mutexattr_getprotocol F + pthread_mutexattr_getrobust_np F + pthread_mutexattr_setprioceiling F + pthread_mutexattr_setprotocol F + pthread_mutexattr_setrobust_np F diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/libresolv.abilist b/sysdeps/unix/sysv/linux/ia64/nptl/libresolv.abilist index f762bc2a70..808d0f2f74 100644 --- a/sysdeps/unix/sysv/linux/ia64/nptl/libresolv.abilist +++ b/sysdeps/unix/sysv/linux/ia64/nptl/libresolv.abilist @@ -22,7 +22,7 @@ GLIBC_2.0 __p_secstodate F __p_time F __p_type F - __p_type_syms D 0x438 + __p_type_syms D 0x450 __putlong F __putshort F __res_close F @@ -74,3 +74,31 @@ GLIBC_2.2 GLIBC_2.3.2 GLIBC_2.3.2 A __p_rcode F +GLIBC_2.9 + GLIBC_2.9 A + ns_datetosecs F + ns_format_ttl F + ns_get16 F + ns_get32 F + ns_initparse F + ns_makecanon F + ns_msg_getflag F + ns_name_compress F + ns_name_ntol F + ns_name_ntop F + ns_name_pack F + ns_name_pton F + ns_name_rollback F + ns_name_skip F + ns_name_uncompress F + ns_name_unpack F + ns_parse_ttl F + ns_parserr F + ns_put16 F + ns_put32 F + ns_samedomain F + ns_samename F + ns_skiprr F + ns_sprintrr F + ns_sprintrrf F + ns_subdomain F diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/librt.abilist b/sysdeps/unix/sysv/linux/ia64/nptl/librt.abilist index 3bb5aabbe8..371d135c8d 100644 --- a/sysdeps/unix/sysv/linux/ia64/nptl/librt.abilist +++ b/sysdeps/unix/sysv/linux/ia64/nptl/librt.abilist @@ -31,3 +31,29 @@ GLIBC_2.2 timer_getoverrun F timer_gettime F timer_settime F +GLIBC_2.3.3 + GLIBC_2.3.3 A + timer_create F + timer_delete F + timer_getoverrun F + timer_gettime F + timer_settime F +GLIBC_2.3.4 + GLIBC_2.3.4 A + mq_close F + mq_getattr F + mq_notify F + mq_open F + mq_receive F + mq_send F + mq_setattr F + mq_timedreceive F + mq_timedsend F + mq_unlink F +GLIBC_2.4 + GLIBC_2.4 A + lio_listio F + lio_listio64 F +GLIBC_2.7 + GLIBC_2.7 A + __mq_open_2 F From d2d3d79732e7bfbcc59885e116e7b46e4fbf4dae Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 6 May 2012 18:24:32 -0400 Subject: [PATCH 4338/4487] ia64: add matherr[fl] to libm.so plt whitelist The ia64 math code has extra matherr functions (f and l variants), so add them to the libm.so plt whitelist like the existing matherr in the main code. The check-localplt test now passes. Signed-off-by: Mike Frysinger --- ChangeLog.ia64 | 4 ++++ data/localplt-ia64-linux-gnu.data | 8 ++++++++ 2 files changed, 12 insertions(+) create mode 100644 data/localplt-ia64-linux-gnu.data diff --git a/ChangeLog.ia64 b/ChangeLog.ia64 index da57406fe6..307fac353d 100644 --- a/ChangeLog.ia64 +++ b/ChangeLog.ia64 @@ -1,3 +1,7 @@ +2012-05-06 Mike Frysinger + + * data/localplt-ia64-linux-gnu.data: New file. + 2012-05-06 Mike Frysinger * sysdeps/unix/sysv/linux/ia64/nptl/ld.abilist: Update symbol list. diff --git a/data/localplt-ia64-linux-gnu.data b/data/localplt-ia64-linux-gnu.data new file mode 100644 index 0000000000..ba488163bb --- /dev/null +++ b/data/localplt-ia64-linux-gnu.data @@ -0,0 +1,8 @@ +libc.so: calloc +libc.so: free +libc.so: malloc +libc.so: memalign +libc.so: realloc +libm.so: matherr +libm.so: matherrf +libm.so: matherrl From f5cf58f7947db6681b0084afd248e5f601434fb3 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 7 May 2012 23:17:48 -0400 Subject: [PATCH 4339/4487] ia64: include errno.h in sysdep.h This header uses __set_errno(), so make sure we include errno.h for it. Otherwise, if INLINE_SYSCALL() is used and errno.h isn't included, we hit warnings like so: In file included from libc-start.c:36:0: ../sysdeps/unix/sysv/linux/dl-osinfo.h: In function '_dl_setup_stack_chk_guard': ../sysdeps/unix/sysv/linux/dl-osinfo.h:79:7: warning: implicit declaration of function '__set_errno' Which culminate in errors like so: libc-start.c:(.text+0x692): undefined reference to '__set_errno' libc-start.c:(.text+0x752): undefined reference to '__set_errno' collect2: ld returned 1 exit status Reported-by: Dennis Schridde Signed-off-by: Mike Frysinger --- ChangeLog.ia64 | 4 ++++ sysdeps/unix/sysv/linux/ia64/sysdep.h | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog.ia64 b/ChangeLog.ia64 index 307fac353d..11ba030450 100644 --- a/ChangeLog.ia64 +++ b/ChangeLog.ia64 @@ -1,3 +1,7 @@ +2012-05-07 Mike Frysinger + + * sysdeps/unix/sysv/linux/ia64/sysdep.h: Include errno.h. + 2012-05-06 Mike Frysinger * data/localplt-ia64-linux-gnu.data: New file. diff --git a/sysdeps/unix/sysv/linux/ia64/sysdep.h b/sysdeps/unix/sysv/linux/ia64/sysdep.h index ebaec95279..5d02429e05 100644 --- a/sysdeps/unix/sysv/linux/ia64/sysdep.h +++ b/sysdeps/unix/sysv/linux/ia64/sysdep.h @@ -25,6 +25,11 @@ #include #include +/* In order to get __set_errno() definition in INLINE_SYSCALL. */ +#ifndef __ASSEMBLER__ +#include +#endif + /* As of GAS v2.4.90.0.7, including a ".align" directive inside a function will cause bad unwind info to be emitted (GAS doesn't know how to account for the padding introduced by the .align directive). From 567ce24cd1d571bff17850e43d93171c35b8879c Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 8 May 2012 14:45:14 +0000 Subject: [PATCH 4340/4487] Rearrange MIPS libm-test-ulps files. --- ChangeLog.mips | 8 + sysdeps/mips/{fpu => mips32}/libm-test-ulps | 0 sysdeps/mips/mips64/{n32 => }/libm-test-ulps | 0 sysdeps/mips/mips64/n64/libm-test-ulps | 1283 ------------------ 4 files changed, 8 insertions(+), 1283 deletions(-) rename sysdeps/mips/{fpu => mips32}/libm-test-ulps (100%) rename sysdeps/mips/mips64/{n32 => }/libm-test-ulps (100%) delete mode 100644 sysdeps/mips/mips64/n64/libm-test-ulps diff --git a/ChangeLog.mips b/ChangeLog.mips index 21d48cf168..89422839c2 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,11 @@ +2012-05-08 Joseph Myers + + * sysdeps/mips/fpu/libm-test-ulps: Move to ... + * sysdeps/mips/mips32/libm-test-ulps: ... here. + * sysdeps/mips/mips64/n32/libm-test-ulps: Move to ... + * sysdeps/mips/mips64/libm-test-ulps: ... here. + * sysdeps/mips/mips64/n64/libm-test-ulps: Remove file. + 2012-05-01 Joseph Myers [BZ #14044] diff --git a/sysdeps/mips/fpu/libm-test-ulps b/sysdeps/mips/mips32/libm-test-ulps similarity index 100% rename from sysdeps/mips/fpu/libm-test-ulps rename to sysdeps/mips/mips32/libm-test-ulps diff --git a/sysdeps/mips/mips64/n32/libm-test-ulps b/sysdeps/mips/mips64/libm-test-ulps similarity index 100% rename from sysdeps/mips/mips64/n32/libm-test-ulps rename to sysdeps/mips/mips64/libm-test-ulps diff --git a/sysdeps/mips/mips64/n64/libm-test-ulps b/sysdeps/mips/mips64/n64/libm-test-ulps deleted file mode 100644 index f66e4cb6b1..0000000000 --- a/sysdeps/mips/mips64/n64/libm-test-ulps +++ /dev/null @@ -1,1283 +0,0 @@ -# Begin of automatic generation - -# atan2 -Test "atan2 (-0.00756827042671106339, -.001792735857538728036) == -1.80338464113663849327153994379639112": -ildouble: 1 -ldouble: 1 -Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -# atanh -Test "atanh (0.75) == 0.972955074527656652552676371721589865": -float: 1 -ifloat: 1 - -# cacos -Test "Imaginary part of: cacos (0.75 + 1.25 i) == 1.11752014915610270578240049553777969 - 1.13239363160530819522266333696834467 i": -ildouble: 1 -ldouble: 1 - -# cacosh -Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -# casin -Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": -ildouble: 1 -ldouble: 1 - -# casinh -Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": -double: 5 -float: 1 -idouble: 5 -ifloat: 1 -ildouble: 4 -ldouble: 4 -Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": -double: 3 -float: 6 -idouble: 3 -ifloat: 6 -ildouble: 2 -ldouble: 2 -Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -# catan -Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: catan (0.75 + 1.25 i) == 1.10714871779409050301706546017853704 + 0.549306144334054845697622618461262852 i": -ildouble: 1 -ldouble: 1 - -# catanh -Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": -double: 4 -idouble: 4 -Test "Real part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i": -double: 1 -idouble: 1 -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i": -ildouble: 1 -ldouble: 1 - -# cbrt -Test "cbrt (-0.001) == -0.1": -ildouble: 1 -ldouble: 1 -Test "cbrt (-27.0) == -3.0": -double: 1 -idouble: 1 -Test "cbrt (0.75) == 0.908560296416069829445605878163630251": -double: 1 -idouble: 1 -Test "cbrt (0.9921875) == 0.997389022060725270579075195353955217": -double: 1 -idouble: 1 - -# ccos -Test "Real part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i": -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": -float: 1 -ifloat: 1 - -# ccosh -Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": -float: 1 -ifloat: 1 - -# cexp -Test "Real part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": -float: 1 -ifloat: 1 -Test "Imaginary part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": -ildouble: 1 -ldouble: 1 - -# clog -Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -# clog10 -Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Real part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i": -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i": -double: 1 -idouble: 1 -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (-inf + inf i) == inf + 3/4 pi*log10(e) i": -double: 1 -idouble: 1 -Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i": -float: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i": -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - -# cos -Test "cos (M_PI_6l * 2.0) == 0.5": -double: 1 -idouble: 1 -ildouble: 1 -ldouble: 1 -Test "cos (M_PI_6l * 4.0) == -0.5": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -# cpow -Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": -float: 1 -ifloat: 1 -Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": -float: 1 -ifloat: 1 -Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i": -double: 1 -float: 4 -idouble: 1 -ifloat: 4 -ildouble: 4 -ldouble: 4 -Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i": -ildouble: 2 -ldouble: 2 -Test "Imaginary part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i": -ildouble: 1 -ldouble: 1 -Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i": -double: 2 -float: 3 -idouble: 2 -ifloat: 3 -ildouble: 10 -ldouble: 10 -Test "Real part of: cpow (2 + 0 i, 10 + 0 i) == 1024.0 + 0.0 i": -ildouble: 2 -ldouble: 2 -Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": -double: 1 -float: 4 -idouble: 1 -ifloat: 4 -ildouble: 3 -ldouble: 3 -Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": -float: 2 -ifloat: 2 -Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i": -double: 2 -float: 2 -idouble: 2 -ifloat: 2 -ildouble: 1 -ldouble: 1 - -# csin -Test "Imaginary part of: csin (-2 - 3 i) == -9.15449914691142957346729954460983256 + 4.16890695996656435075481305885375484 i": -ildouble: 1 -ldouble: 1 -Test "Real part of: csin (0.75 + 1.25 i) == 1.28722291002649188575873510790565441 + 1.17210635989270256101081285116138863 i": -ildouble: 1 -ldouble: 1 - -# csinh -Test "Real part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i": -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i": -double: 1 -idouble: 1 -Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": -float: 1 -ifloat: 1 -Test "Imaginary part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": -float: 1 -ifloat: 1 - -# csqrt -Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: csqrt (0.75 + 1.25 i) == 1.05065169626078392338656675760808326 + 0.594868882070379067881984030639932657 i": -ildouble: 1 -ldouble: 1 - -# ctan -Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i": -double: 1 -idouble: 1 -ildouble: 2 -ldouble: 2 - -# ctanh -Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i": -float: 1 -ifloat: 1 -Test "Real part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i": -double: 1 -idouble: 1 - -# erf -Test "erf (1.25) == 0.922900128256458230136523481197281140": -double: 1 -idouble: 1 - -# erfc -Test "erfc (2.0) == 0.00467773498104726583793074363274707139": -double: 1 -idouble: 1 -Test "erfc (27.0) == 0.523704892378925568501606768284954709e-318": -ildouble: 1 -ldouble: 1 -Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8": -double: 1 -idouble: 1 - -# exp10 -Test "exp10 (-1) == 0.1": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -Test "exp10 (0.75) == 5.62341325190349080394951039776481231": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "exp10 (3) == 1000": -double: 6 -float: 2 -idouble: 6 -ifloat: 2 -ildouble: 1 -ldouble: 1 - -# exp2 -Test "exp2 (10) == 1024": -ildouble: 2 -ldouble: 2 - -# expm1 -Test "expm1 (0.75) == 1.11700001661267466854536981983709561": -double: 1 -idouble: 1 -Test "expm1 (1) == M_El - 1.0": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -# gamma -Test "gamma (-0.5) == log(2*sqrt(pi))": -ildouble: 1 -ldouble: 1 - -# hypot -Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 - -# j0 -Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "j0 (0.75) == 0.864242275166648623555731103820923211": -float: 1 -ifloat: 1 -Test "j0 (10.0) == -0.245935764451348335197760862485328754": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -ildouble: 2 -ldouble: 2 -Test "j0 (2.0) == 0.223890779141235668051827454649948626": -float: 2 -ifloat: 2 -ildouble: 2 -ldouble: 2 -Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "j0 (8.0) == 0.171650807137553906090869407851972001": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -# j1 -Test "j1 (-1.0) == -0.440050585744933515959682203718914913": -ildouble: 1 -ldouble: 1 -Test "j1 (0.75) == 0.349243602174862192523281016426251335": -ildouble: 1 -ldouble: 1 -Test "j1 (1.0) == 0.440050585744933515959682203718914913": -ildouble: 1 -ldouble: 1 -Test "j1 (10.0) == 0.0434727461688614366697487680258592883": -float: 2 -ifloat: 2 -ildouble: 2 -ldouble: 2 -Test "j1 (2.0) == 0.576724807756873387202448242269137087": -double: 1 -idouble: 1 -Test "j1 (8.0) == 0.234636346853914624381276651590454612": -double: 1 -idouble: 1 -ildouble: 4 -ldouble: 4 - -# jn -Test "jn (0, -4.0) == -3.9714980986384737228659076845169804197562E-1": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "jn (0, 0.75) == 0.864242275166648623555731103820923211": -float: 1 -ifloat: 1 -Test "jn (0, 10.0) == -0.245935764451348335197760862485328754": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -ildouble: 2 -ldouble: 2 -Test "jn (0, 2.0) == 0.223890779141235668051827454649948626": -float: 2 -ifloat: 2 -ildouble: 2 -ldouble: 2 -Test "jn (0, 4.0) == -3.9714980986384737228659076845169804197562E-1": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "jn (0, 8.0) == 0.171650807137553906090869407851972001": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "jn (1, -1.0) == -0.440050585744933515959682203718914913": -ildouble: 1 -ldouble: 1 -Test "jn (1, 0.75) == 0.349243602174862192523281016426251335": -ildouble: 1 -ldouble: 1 -Test "jn (1, 1.0) == 0.440050585744933515959682203718914913": -ildouble: 1 -ldouble: 1 -Test "jn (1, 10.0) == 0.0434727461688614366697487680258592883": -float: 2 -ifloat: 2 -ildouble: 2 -ldouble: 2 -Test "jn (1, 2.0) == 0.576724807756873387202448242269137087": -double: 1 -idouble: 1 -Test "jn (1, 8.0) == 0.234636346853914624381276651590454612": -double: 1 -idouble: 1 -ildouble: 4 -ldouble: 4 -Test "jn (10, -1.0) == 0.263061512368745320699785368779050294e-9": -ildouble: 1 -ldouble: 1 -Test "jn (10, 0.125) == 0.250543369809369890173993791865771547e-18": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "jn (10, 0.75) == 0.149621713117596814698712483621682835e-10": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "jn (10, 1.0) == 0.263061512368745320699785368779050294e-9": -ildouble: 1 -ldouble: 1 -Test "jn (10, 10.0) == 0.207486106633358857697278723518753428": -double: 4 -float: 3 -idouble: 4 -ifloat: 3 -ildouble: 2 -ldouble: 2 -Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6": -double: 1 -float: 4 -idouble: 1 -ifloat: 4 -Test "jn (2, 2.4048255576957729) == 0.43175480701968038399746111312430703": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -Test "jn (3, 0.125) == 0.406503832554912875023029337653442868e-4": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "jn (3, 0.75) == 0.848438342327410884392755236884386804e-2": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "jn (3, 10.0) == 0.0583793793051868123429354784103409563": -double: 3 -float: 1 -idouble: 3 -ifloat: 1 -ildouble: 2 -ldouble: 2 -Test "jn (3, 2.0) == 0.128943249474402051098793332969239835": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -Test "jn (3, 2.4048255576957729) == 0.19899990535769083404042146764530813": -double: 3 -idouble: 3 -Test "jn (4, 2.4048255576957729) == 0.647466661641779720084932282551219891E-1": -double: 1 -idouble: 1 -Test "jn (5, 2.4048255576957729) == 0.163892432048058525099230549946147698E-1": -double: 3 -float: 1 -idouble: 3 -ifloat: 1 -Test "jn (6, 2.4048255576957729) == 0.34048184720278336646673682895929161E-2": -double: 4 -float: 3 -idouble: 4 -ifloat: 3 -Test "jn (7, 2.4048255576957729) == 0.60068836573295394221291569249883076E-3": -double: 3 -float: 5 -idouble: 3 -ifloat: 5 -Test "jn (8, 2.4048255576957729) == 0.92165786705344923232879022467054148E-4": -double: 3 -float: 2 -idouble: 3 -ifloat: 2 -Test "jn (9, 2.4048255576957729) == 0.12517270977961513005428966643852564E-4": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 - -# lgamma -Test "lgamma (-0.5) == log(2*sqrt(pi))": -ildouble: 1 -ldouble: 1 -Test "lgamma (0.7) == 0.260867246531666514385732417016759578": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -ildouble: 1 -ldouble: 1 - -# log10 -Test "log10 (0.75) == -0.124938736608299953132449886193870744": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -Test "log10 (e) == log10(e)": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -# log1p -Test "log1p (-0.25) == -0.287682072451780927439219005993827432": -float: 1 -ifloat: 1 - -# log2 -Test "log2 (0.75) == -.415037499278843818546261056052183492": -ildouble: 1 -ldouble: 1 - -# sincos -Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": -double: 1 -idouble: 1 -ildouble: 1 -ldouble: 1 -Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res": -float: 1 -ifloat: 1 - -# sqrt -Test "sqrt (2) == M_SQRT2l": -ildouble: 1 -ldouble: 1 - -# tanh -Test "tanh (-0.75) == -0.635148952387287319214434357312496495": -ildouble: 1 -ldouble: 1 -Test "tanh (-1.0) == -0.7615941559557648881194582826047935904": -ildouble: 1 -ldouble: 1 -Test "tanh (0.75) == 0.635148952387287319214434357312496495": -ildouble: 1 -ldouble: 1 -Test "tanh (1.0) == 0.7615941559557648881194582826047935904": -ildouble: 1 -ldouble: 1 - -# tgamma -Test "tgamma (-0.5) == -2 sqrt (pi)": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "tgamma (0.5) == sqrt (pi)": -float: 1 -ifloat: 1 -Test "tgamma (0.7) == 1.29805533264755778568117117915281162": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "tgamma (4) == 6": -ildouble: 1 -ldouble: 1 - -# y0 -Test "y0 (1.0) == 0.0882569642156769579829267660235151628": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -Test "y0 (1.5) == 0.382448923797758843955068554978089862": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -Test "y0 (10.0) == 0.0556711672835993914244598774101900481": -float: 1 -ifloat: 1 -ildouble: 3 -ldouble: 3 -Test "y0 (8.0) == 0.223521489387566220527323400498620359": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 3 -ldouble: 3 - -# y1 -Test "y1 (0.125) == -5.19993611253477499595928744876579921": -double: 1 -idouble: 1 -Test "y1 (0.75) == -1.03759455076928541973767132140642198": -ildouble: 1 -ldouble: 1 -Test "y1 (1.5) == -0.412308626973911295952829820633445323": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "y1 (10.0) == 0.249015424206953883923283474663222803": -double: 3 -float: 1 -idouble: 3 -ifloat: 1 -Test "y1 (2.0) == -0.107032431540937546888370772277476637": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "y1 (8.0) == -0.158060461731247494255555266187483550": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -ildouble: 1 -ldouble: 1 - -# yn -Test "yn (0, 1.0) == 0.0882569642156769579829267660235151628": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -Test "yn (0, 1.5) == 0.382448923797758843955068554978089862": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -Test "yn (0, 10.0) == 0.0556711672835993914244598774101900481": -float: 1 -ifloat: 1 -ildouble: 3 -ldouble: 3 -Test "yn (0, 8.0) == 0.223521489387566220527323400498620359": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 3 -ldouble: 3 -Test "yn (1, 0.125) == -5.19993611253477499595928744876579921": -double: 1 -idouble: 1 -Test "yn (1, 0.75) == -1.03759455076928541973767132140642198": -ildouble: 1 -ldouble: 1 -Test "yn (1, 1.5) == -0.412308626973911295952829820633445323": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "yn (1, 10.0) == 0.249015424206953883923283474663222803": -double: 3 -float: 1 -idouble: 3 -ifloat: 1 -Test "yn (1, 2.0) == -0.107032431540937546888370772277476637": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "yn (1, 8.0) == -0.158060461731247494255555266187483550": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -ildouble: 1 -ldouble: 1 -Test "yn (10, 0.125) == -127057845771019398.252538486899753195": -double: 1 -idouble: 1 -ildouble: 2 -ldouble: 2 -Test "yn (10, 0.75) == -2133501638.90573424452445412893839236": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 5 -ldouble: 5 -Test "yn (10, 1.0) == -121618014.278689189288130426667971145": -double: 1 -idouble: 1 -ildouble: 1 -ldouble: 1 -Test "yn (10, 10.0) == -0.359814152183402722051986577343560609": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 2 -ldouble: 2 -Test "yn (10, 2.0) == -129184.542208039282635913145923304214": -double: 2 -idouble: 2 -ildouble: 2 -ldouble: 2 -Test "yn (3, 0.125) == -2612.69757350066712600220955744091741": -double: 1 -idouble: 1 -Test "yn (3, 0.75) == -12.9877176234475433186319774484809207": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 2 -ldouble: 2 -Test "yn (3, 10.0) == -0.251362657183837329779204747654240998": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "yn (3, 2.0) == -1.12778377684042778608158395773179238": -double: 1 -idouble: 1 - -# Maximal error of functions: -Function: "atan2": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: "atanh": -float: 1 -ifloat: 1 - -Function: Imaginary part of "cacos": -ildouble: 1 -ldouble: 1 - -Function: Imaginary part of "cacosh": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Real part of "casin": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - -Function: Imaginary part of "casin": -ildouble: 1 -ldouble: 1 - -Function: Real part of "casinh": -double: 5 -float: 1 -idouble: 5 -ifloat: 1 -ildouble: 4 -ldouble: 4 - -Function: Imaginary part of "casinh": -double: 3 -float: 6 -idouble: 3 -ifloat: 6 -ildouble: 2 -ldouble: 2 - -Function: Imaginary part of "catan": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Real part of "catanh": -double: 4 -idouble: 4 -ildouble: 1 -ldouble: 1 - -Function: Imaginary part of "catanh": -ildouble: 1 -ldouble: 1 - -Function: "cbrt": -double: 1 -idouble: 1 -ildouble: 1 -ldouble: 1 - -Function: Real part of "ccos": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Imaginary part of "ccos": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Real part of "ccosh": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Imaginary part of "ccosh": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Real part of "cexp": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Imaginary part of "cexp": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Real part of "clog": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Real part of "clog10": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Imaginary part of "clog10": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: "cos": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Real part of "cpow": -double: 2 -float: 4 -idouble: 2 -ifloat: 4 -ildouble: 10 -ldouble: 10 - -Function: Imaginary part of "cpow": -double: 2 -float: 2 -idouble: 2 -ifloat: 2 -ildouble: 1 -ldouble: 1 - -Function: Real part of "csin": -ildouble: 1 -ldouble: 1 - -Function: Imaginary part of "csin": -ildouble: 1 -ldouble: 1 - -Function: Real part of "csinh": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Imaginary part of "csinh": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - -Function: Real part of "csqrt": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Imaginary part of "csqrt": -ildouble: 1 -ldouble: 1 - -Function: Real part of "ctan": -ildouble: 1 -ldouble: 1 - -Function: Imaginary part of "ctan": -double: 1 -idouble: 1 -ildouble: 2 -ldouble: 2 - -Function: Real part of "ctanh": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -ildouble: 1 -ldouble: 1 - -Function: Imaginary part of "ctanh": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: "erf": -double: 1 -idouble: 1 - -Function: "erfc": -double: 1 -idouble: 1 -ildouble: 1 -ldouble: 1 - -Function: "exp10": -double: 6 -float: 2 -idouble: 6 -ifloat: 2 -ildouble: 1 -ldouble: 1 - -Function: "exp2": -ildouble: 2 -ldouble: 2 - -Function: "expm1": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: "gamma": -ildouble: 1 -ldouble: 1 - -Function: "hypot": -float: 1 -ifloat: 1 - -Function: "j0": -double: 2 -float: 2 -idouble: 2 -ifloat: 2 -ildouble: 2 -ldouble: 2 - -Function: "j1": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -ildouble: 4 -ldouble: 4 - -Function: "jn": -double: 4 -float: 5 -idouble: 4 -ifloat: 5 -ildouble: 4 -ldouble: 4 - -Function: "lgamma": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -ildouble: 1 -ldouble: 1 - -Function: "log10": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -ildouble: 1 -ldouble: 1 - -Function: "log1p": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: "log2": -ildouble: 1 -ldouble: 1 - -Function: "sincos": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: "sqrt": -ildouble: 1 -ldouble: 1 - -Function: "tan": -double: 1 -idouble: 1 - -Function: "tanh": -ildouble: 1 -ldouble: 1 - -Function: "tgamma": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: "y0": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -ildouble: 3 -ldouble: 3 - -Function: "y1": -double: 3 -float: 2 -idouble: 3 -ifloat: 2 -ildouble: 1 -ldouble: 1 - -Function: "yn": -double: 3 -float: 2 -idouble: 3 -ifloat: 2 -ildouble: 5 -ldouble: 5 - -# end of automatic generation From d3b36017d43af570ca7f79e711749dd4ade76979 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Mon, 7 May 2012 22:14:44 -0400 Subject: [PATCH 4341/4487] ARM: Use /lib/ld-linux-armhf.so.3 for the hard-float ABI. The hard-float ABI will now use /lib/ld-linux-armhf.so.3. We detect the use of the hard-float ABI and select the appropriate dynamic linker name. You must have a new or patched compiler which also uses the new dynamic loader name when the hard-float ABI is selected. --- ChangeLog.arm | 8 ++ sysdeps/arm/configure | 184 +++++++++++++++++++++++++++++++++++++ sysdeps/arm/configure.in | 17 ++++ sysdeps/arm/shlib-versions | 8 +- 4 files changed, 216 insertions(+), 1 deletion(-) mode change 100644 => 100755 sysdeps/arm/configure diff --git a/ChangeLog.arm b/ChangeLog.arm index cdbed7b0a9..cf88eda65a 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,11 @@ +2012-05-07 Carlos O'Donell + + * sysdeps/arm/configure.in: Set libc_cv_arm_pcs_vfp. + If libc_cv_arm_pcs_vfp equals yes then define HAVE_ARM_PCS_VFP. + * sysdeps/arm/configure: Regenerate. + * sysdeps/arm/shlib-versions: If HAVE_ARM_PCS_VFP is defined + then use ld=/lib/ld-linux-armhf.so.3. + 2012-05-01 Joseph Myers [BZ #14043] diff --git a/sysdeps/arm/configure b/sysdeps/arm/configure old mode 100644 new mode 100755 index 651d46a344..665151fead --- a/sysdeps/arm/configure +++ b/sysdeps/arm/configure @@ -16,6 +16,23 @@ as_fn_exit () as_fn_set_status $1 exit $1 } # as_fn_exit +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -149,3 +166,170 @@ $as_echo "$libc_cv_asm_cfi_directive_sections" >&6; } if test $libc_cv_asm_cfi_directive_sections != yes; then as_fn_error $? "need .cfi_sections in this configuration" "$LINENO" 5 fi + +# We check to see if the compiler and flags are +# selecting the hard-float ABI and if they are then +# we set libc_cv_arm_pcs_vfp to yes which causes +# HAVE_ARM_PCS_VFP to be defined in config.h and +# in include/libc-symbols.h and thus available to +# shlib-versions to select the appropriate name for +# the dynamic linker via %ifdef. + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler is using the ARM hard-float ABI" >&5 +$as_echo_n "checking whether the compiler is using the ARM hard-float ABI... " >&6; } +if ${libc_cv_arm_pcs_vfp+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __ARM_PCS_VFP + yes + #endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + libc_cv_arm_pcs_vfp=yes +else + libc_cv_arm_pcs_vfp=no +fi +rm -f conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_arm_pcs_vfp" >&5 +$as_echo "$libc_cv_arm_pcs_vfp" >&6; } +if test $libc_cv_arm_pcs_vfp = yes; then + $as_echo "#define HAVE_ARM_PCS_VFP 1" >>confdefs.h + +fi diff --git a/sysdeps/arm/configure.in b/sysdeps/arm/configure.in index 706add2d64..64cef5f94e 100644 --- a/sysdeps/arm/configure.in +++ b/sysdeps/arm/configure.in @@ -49,3 +49,20 @@ EOF if test $libc_cv_asm_cfi_directive_sections != yes; then AC_MSG_ERROR([need .cfi_sections in this configuration]) fi + +# We check to see if the compiler and flags are +# selecting the hard-float ABI and if they are then +# we set libc_cv_arm_pcs_vfp to yes which causes +# HAVE_ARM_PCS_VFP to be defined in config.h and +# in include/libc-symbols.h and thus available to +# shlib-versions to select the appropriate name for +# the dynamic linker via %ifdef. +AC_CACHE_CHECK([whether the compiler is using the ARM hard-float ABI], + [libc_cv_arm_pcs_vfp], + [AC_EGREP_CPP(yes,[#ifdef __ARM_PCS_VFP + yes + #endif + ], libc_cv_arm_pcs_vfp=yes, libc_cv_arm_pcs_vfp=no)]) +if test $libc_cv_arm_pcs_vfp = yes; then + AC_DEFINE(HAVE_ARM_PCS_VFP) +fi diff --git a/sysdeps/arm/shlib-versions b/sysdeps/arm/shlib-versions index 626d58bdaa..1ac597abbb 100644 --- a/sysdeps/arm/shlib-versions +++ b/sysdeps/arm/shlib-versions @@ -1,3 +1,9 @@ arm.*-.*-linux-gnueabi.* DEFAULT GLIBC_2.4 -arm.*-.*-linux-gnueabi.* ld=ld-linux.so.3 +%ifdef HAVE_ARM_PCS_VFP +# The EABI-derived hard-float ABI uses a new dynamic linker. +arm.*-.*-linux-gnueabi.* ld=ld-linux-armhf.so.3 +%else +# The EABI-derived soft-float ABI continues to use ld-linux.so.3. +arm.*-.*-linux-gnueabi.* ld=ld-linux.so.3 +%endif From 6c1fa9ca3d1c507377fefb10ed7e7bb32295bfd1 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Thu, 10 May 2012 17:37:38 +0200 Subject: [PATCH 4342/4487] Update Changelog.m68k --- ChangeLog.m68k | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 613a8408f9..6aa3a2b984 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -2,6 +2,7 @@ * sysdeps/unix/sysv/linux/m68k/coldfire/nptl/ld.abilist: New file. * sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libBrokenLocale.abilist: + New file. * sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libanl.abilist: New file. * sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libc.abilist: New @@ -26,6 +27,7 @@ file. * sysdeps/unix/sysv/linux/m68k/m680x0/nptl/ld.abilist: New file. * sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libBrokenLocale.abilist: + New file. * sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libanl.abilist: New file. * sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libc.abilist: New file. From 8173ecfb055e3708993dd78dcb031c522c2d6d76 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Thu, 10 May 2012 17:38:20 +0200 Subject: [PATCH 4343/4487] m68k: update libm test ULPs --- ChangeLog.m68k | 4 + sysdeps/m68k/m680x0/fpu/libm-test-ulps | 183 +++++++++++++++++++++++++ 2 files changed, 187 insertions(+) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 6aa3a2b984..2a44afe8b9 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,7 @@ +2012-05-10 Andreas Schwab + + * sysdeps/m68k/m680x0/fpu/libm-test-ulps: Update. + 2012-04-28 Andreas Schwab * sysdeps/unix/sysv/linux/m68k/coldfire/nptl/ld.abilist: New file. diff --git a/sysdeps/m68k/m680x0/fpu/libm-test-ulps b/sysdeps/m68k/m680x0/fpu/libm-test-ulps index 9344b512bd..9c011e629c 100644 --- a/sysdeps/m68k/m680x0/fpu/libm-test-ulps +++ b/sysdeps/m68k/m680x0/fpu/libm-test-ulps @@ -1,10 +1,139 @@ # Begin of automatic generation +# acos_downward +Test "acos_downward (-0) == pi/2": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "acos_downward (-0.5) == M_PI_6l*4.0": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "acos_downward (-1) == pi": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "acos_downward (0) == pi/2": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "acos_downward (0.5) == M_PI_6l*2.0": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# acos_towardzero +Test "acos_towardzero (-0) == pi/2": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "acos_towardzero (-0.5) == M_PI_6l*4.0": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "acos_towardzero (-1) == pi": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "acos_towardzero (0) == pi/2": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "acos_towardzero (0.5) == M_PI_6l*2.0": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# acos_upward +Test "acos_upward (-0) == pi/2": +double: 1 +idouble: 1 +Test "acos_upward (-0.5) == M_PI_6l*4.0": +ildouble: 1 +ldouble: 1 +Test "acos_upward (-1) == pi": +double: 1 +idouble: 1 +Test "acos_upward (0) == pi/2": +double: 1 +idouble: 1 +Test "acos_upward (0.5) == M_PI_6l*2.0": +ildouble: 1 +ldouble: 1 + # acosh Test "acosh (7) == 2.63391579384963341725009269461593689": ildouble: 1 ldouble: 1 +# asin_downward +Test "asin_downward (-0.5) == -pi/6": +ildouble: 1 +ldouble: 1 +Test "asin_downward (-1.0) == -pi/2": +double: 1 +idouble: 1 +Test "asin_downward (0.5) == pi/6": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "asin_downward (1.0) == pi/2": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# asin_towardzero +Test "asin_towardzero (-0.5) == -pi/6": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "asin_towardzero (-1.0) == -pi/2": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "asin_towardzero (0.5) == pi/6": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "asin_towardzero (1.0) == pi/2": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# asin_upward +Test "asin_upward (-0.5) == -pi/6": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "asin_upward (-1.0) == -pi/2": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "asin_upward (0.5) == pi/6": +ildouble: 1 +ldouble: 1 +Test "asin_upward (1.0) == pi/2": +double: 1 +idouble: 1 + # asinh Test "asinh (0.75) == 0.693147180559945309417232121458176568": ildouble: 1 @@ -911,6 +1040,9 @@ ldouble: 1 Test "Real part of: ctan (1 + 47 i) == 2.729321264492904590777293425576722354636e-41 + 1.0 i": ildouble: 2 ldouble: 2 +Test "Real part of: ctan (1 + 5680 i) == 4.725214596136812019616700920476949798307e-4934 + 1.0 i": +ildouble: 1 +ldouble: 1 # ctanh Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": @@ -959,6 +1091,9 @@ ldouble: 1 Test "Imaginary part of: ctanh (47 + 1 i) == 1.0 + 2.729321264492904590777293425576722354636e-41 i": ildouble: 2 ldouble: 2 +Test "Imaginary part of: ctanh (5680 + 1 i) == 1.0 + 4.725214596136812019616700920476949798307e-4934 i": +ildouble: 1 +ldouble: 1 # erfc Test "erfc (0.75) == 0.288844366346484868401062165408589223": @@ -1894,7 +2029,55 @@ float: 1 ifloat: 1 # Maximal error of functions: +Function: "acos_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "acos_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "acos_upward": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + Function: "acosh": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +Function: "asin_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "asin_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "asin_upward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 ildouble: 1 ldouble: 1 From 332d091eba65d819723cce5ffee19075b1890e9d Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 11 May 2012 20:47:51 +0000 Subject: [PATCH 4344/4487] Update sysdeps/mips/dl-lookup.c from generic version. --- ChangeLog.mips | 4 ++++ sysdeps/mips/dl-lookup.c | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 89422839c2..eb61f047c5 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,7 @@ +2012-05-11 Joseph Myers + + * sysdeps/mips/dl-lookup.c: Update from generic version. + 2012-05-08 Joseph Myers * sysdeps/mips/fpu/libm-test-ulps: Move to ... diff --git a/sysdeps/mips/dl-lookup.c b/sysdeps/mips/dl-lookup.c index c39a2b06de..f7e98b7f53 100644 --- a/sysdeps/mips/dl-lookup.c +++ b/sysdeps/mips/dl-lookup.c @@ -14,7 +14,7 @@ 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, see + License along with the GNU C Library; if not, see . */ #include @@ -786,7 +786,8 @@ _dl_lookup_symbol_x (const char *undef_name, struct link_map *undef_map, if (__builtin_expect (current_value.s == NULL, 0)) { if ((*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK) - && skip_map == NULL) + && skip_map == NULL + && !(GLRO(dl_debug_mask) & DL_DEBUG_UNUSED)) { /* We could find no value for a strong reference. */ const char *reference_name = undef_map ? undef_map->l_name : ""; From ec0001e175dc37a9097bf8b33dea66597701ec0e Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Fri, 11 May 2012 14:03:30 -0400 Subject: [PATCH 4345/4487] Add _SNSECONDS_T_TYPE for linux-generic --- ChangeLog.linux-generic | 5 +++++ sysdeps/unix/sysv/linux/generic/bits/typesizes.h | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog.linux-generic b/ChangeLog.linux-generic index 73b03847d9..5892ad7e0f 100644 --- a/ChangeLog.linux-generic +++ b/ChangeLog.linux-generic @@ -1,3 +1,8 @@ +2012-05-12 Chris Metcalf + + * sysdeps/unix/sysv/linux/generic/bits/typesizes.h + (__SNSECONDS_T_TYPE): New macro. + 2012-03-09 Paul Eggert [BZ #13673] diff --git a/sysdeps/unix/sysv/linux/generic/bits/typesizes.h b/sysdeps/unix/sysv/linux/generic/bits/typesizes.h index cd166fcae8..b6541bbe27 100644 --- a/sysdeps/unix/sysv/linux/generic/bits/typesizes.h +++ b/sysdeps/unix/sysv/linux/generic/bits/typesizes.h @@ -1,5 +1,5 @@ /* bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Chris Metcalf , 2011. @@ -58,6 +58,7 @@ #define __BLKSIZE_T_TYPE __S32_TYPE #define __FSID_T_TYPE struct { int __val[2]; } #define __SSIZE_T_TYPE __SWORD_TYPE +#define __SNSECONDS_T_TYPE __SLONGWORD_TYPE /* Number of descriptors that can fit in an `fd_set'. */ #define __FD_SETSIZE 1024 From b9564c38ea4aa7415b472d5d58760930a616ca3d Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 13 May 2012 15:09:05 -0400 Subject: [PATCH 4346/4487] ia64: delete __ELF__ check in libm-symbols.h We assume ELF everywhere now, so drop support for non-ELF. Reported-by: Joseph S. Myers Signed-off-by: Mike Frysinger --- ChangeLog.ia64 | 4 ++++ sysdeps/ia64/fpu/libm-symbols.h | 9 ++------- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/ChangeLog.ia64 b/ChangeLog.ia64 index 11ba030450..fd90f34143 100644 --- a/ChangeLog.ia64 +++ b/ChangeLog.ia64 @@ -1,3 +1,7 @@ +2012-05-14 Mike Frysinger + + * sysdeps/ia64/fpu/libm-symbols.h: Delete __ELF__ checks. + 2012-05-07 Mike Frysinger * sysdeps/unix/sysv/linux/ia64/sysdep.h: Include errno.h. diff --git a/sysdeps/ia64/fpu/libm-symbols.h b/sysdeps/ia64/fpu/libm-symbols.h index 5b5e4b7d7b..81084bd62e 100644 --- a/sysdeps/ia64/fpu/libm-symbols.h +++ b/sysdeps/ia64/fpu/libm-symbols.h @@ -3,13 +3,8 @@ /* Support for compatible assembler handling. */ -#ifdef __ELF__ -# define ASM_SIZE_DIRECTIVE(name) .size name,.-name -# define ASM_TYPE_DIRECTIVE(name,T) .type name,T -#else -# define ASM_SIZE_DIRECTIVE(name) -# define ASM_TYPE_DIRECTIVE(name,T) -#endif +#define ASM_SIZE_DIRECTIVE(name) .size name,.-name +#define ASM_TYPE_DIRECTIVE(name,T) .type name,T #define LOCAL_LIBM_ENTRY(name) \ .proc name; \ From c5754569dd2c2c4ddf92674ba78ef7bbef7b56f8 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 14 May 2012 14:16:40 +0000 Subject: [PATCH 4347/4487] Remove pre-2.2 Linux kernel support for ARM. --- ChangeLog.arm | 6 ++ sysdeps/unix/sysv/linux/arm/sigaction.c | 105 ++++++------------------ 2 files changed, 29 insertions(+), 82 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index cf88eda65a..53359c63aa 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,9 @@ +2012-05-14 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/sigaction.c + [!__ASSUME_REALTIME_SIGNALS]: Remove conditional code. + [__ASSUME_REALTIME_SIGNALS]: Make code unconditional. + 2012-05-07 Carlos O'Donell * sysdeps/arm/configure.in: Set libc_cv_arm_pcs_vfp. diff --git a/sysdeps/unix/sysv/linux/arm/sigaction.c b/sysdeps/unix/sysv/linux/arm/sigaction.c index e7b51c6275..76037cb468 100644 --- a/sysdeps/unix/sysv/linux/arm/sigaction.c +++ b/sysdeps/unix/sysv/linux/arm/sigaction.c @@ -28,10 +28,6 @@ translate it here. */ #include -/* The variable is shared between all wrappers around signal handling - functions which have RT equivalents. */ -int __libc_missing_rt_sigs; - #define SA_RESTORER 0x04000000 extern void __default_sa_restorer_v1(void); @@ -69,97 +65,42 @@ __libc_sigaction (sig, act, oact) const struct sigaction *act; struct sigaction *oact; { -#ifndef __ASSUME_REALTIME_SIGNALS - struct old_kernel_sigaction k_sigact, k_osigact; -#endif int result; -#ifdef __NR_rt_sigaction - /* First try the RT signals. */ -# ifndef __ASSUME_REALTIME_SIGNALS - if (!__libc_missing_rt_sigs) -# endif - { - struct kernel_sigaction kact, koact; -# ifndef __ASSUME_REALTIME_SIGNALS - int saved_errno = errno; -# endif - - if (act) - { - kact.k_sa_handler = act->sa_handler; - memcpy (&kact.sa_mask, &act->sa_mask, sizeof (sigset_t)); - kact.sa_flags = act->sa_flags; -# ifdef HAVE_SA_RESTORER - if (kact.sa_flags & SA_RESTORER) - kact.sa_restorer = act->sa_restorer; - else - { - kact.sa_restorer = choose_restorer (kact.sa_flags); - kact.sa_flags |= SA_RESTORER; - } -# endif - } - - /* XXX The size argument hopefully will have to be changed to the - real size of the user-level sigset_t. */ - result = INLINE_SYSCALL (rt_sigaction, 4, sig, - act ? __ptrvalue (&kact) : NULL, - oact ? __ptrvalue (&koact) : NULL, _NSIG / 8); - -# ifndef __ASSUME_REALTIME_SIGNALS - if (result >= 0 || errno != ENOSYS) -# endif - { - if (oact && result >= 0) - { - oact->sa_handler = koact.k_sa_handler; - memcpy (&oact->sa_mask, &koact.sa_mask, sizeof (sigset_t)); - oact->sa_flags = koact.sa_flags; -# ifdef HAVE_SA_RESTORER - oact->sa_restorer = koact.sa_restorer; -# endif - } - return result; - } - -# ifndef __ASSUME_REALTIME_SIGNALS - __set_errno (saved_errno); - __libc_missing_rt_sigs = 1; -# endif - } -#endif + struct kernel_sigaction kact, koact; -#ifndef __ASSUME_REALTIME_SIGNALS if (act) { - k_sigact.k_sa_handler = act->sa_handler; - k_sigact.sa_mask = act->sa_mask.__val[0]; - k_sigact.sa_flags = act->sa_flags; -# ifdef HAVE_SA_RESTORER - if (k_sigact.sa_flags & SA_RESTORER) - k_sigact.sa_restorer = act->sa_restorer; + kact.k_sa_handler = act->sa_handler; + memcpy (&kact.sa_mask, &act->sa_mask, sizeof (sigset_t)); + kact.sa_flags = act->sa_flags; +#ifdef HAVE_SA_RESTORER + if (kact.sa_flags & SA_RESTORER) + kact.sa_restorer = act->sa_restorer; else { - k_sigact.sa_restorer = choose_restorer (k_sigact.sa_flags); - k_sigact.sa_flags |= SA_RESTORER; + kact.sa_restorer = choose_restorer (kact.sa_flags); + kact.sa_flags |= SA_RESTORER; } -# endif +#endif } - result = INLINE_SYSCALL (sigaction, 3, sig, - act ? __ptrvalue (&k_sigact) : NULL, - oact ? __ptrvalue (&k_osigact) : NULL); + + /* XXX The size argument hopefully will have to be changed to the + real size of the user-level sigset_t. */ + result = INLINE_SYSCALL (rt_sigaction, 4, sig, + act ? __ptrvalue (&kact) : NULL, + oact ? __ptrvalue (&koact) : NULL, _NSIG / 8); + if (oact && result >= 0) { - oact->sa_handler = k_osigact.k_sa_handler; - oact->sa_mask.__val[0] = k_osigact.sa_mask; - oact->sa_flags = k_osigact.sa_flags; -# ifdef HAVE_SA_RESTORER - oact->sa_restorer = k_osigact.sa_restorer; -# endif + oact->sa_handler = koact.k_sa_handler; + memcpy (&oact->sa_mask, &koact.sa_mask, sizeof (sigset_t)); + oact->sa_flags = koact.sa_flags; +#ifdef HAVE_SA_RESTORER + oact->sa_restorer = koact.sa_restorer; +#endif } return result; -#endif } libc_hidden_def (__libc_sigaction) From a7375c94a819e4c97d66e33d344f847f1218f090 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 14 May 2012 14:17:16 +0000 Subject: [PATCH 4348/4487] Remove pre-2.2 kernel support for MIPS. --- ChangeLog.mips | 18 ++++ sysdeps/unix/sysv/linux/mips/pread.c | 29 +----- sysdeps/unix/sysv/linux/mips/pread64.c | 29 +----- sysdeps/unix/sysv/linux/mips/pwrite.c | 29 +----- sysdeps/unix/sysv/linux/mips/pwrite64.c | 29 +----- sysdeps/unix/sysv/linux/mips/sigaction.c | 115 +++++------------------ 6 files changed, 48 insertions(+), 201 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index eb61f047c5..db20a788ae 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,21 @@ +2012-05-14 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/pread.c [!__ASSUME_PREAD_SYSCALL]: + Remove conditional code. + [__ASSUME_PREAD_SYSCALL]: Make code unconditional. + * sysdeps/unix/sysv/linux/mips/pread64.c + [!__ASSUME_PREAD_SYSCALL]: Remove conditional code. + [__ASSUME_PREAD_SYSCALL]: Make code unconditional. + * sysdeps/unix/sysv/linux/mips/pwrite.c + [!__ASSUME_PWRITE_SYSCALL]: Remove conditional code. + [__ASSUME_PWRITE_SYSCALL]: Make code unconditional. + * sysdeps/unix/sysv/linux/mips/pwrite64.c + [!__ASSUME_PWRITE_SYSCALL]: Remove conditional code. + [__ASSUME_PWRITE_SYSCALL]: Make code unconditional. + * sysdeps/unix/sysv/linux/mips/sigaction.c + [!__ASSUME_REALTIME_SIGNALS]: Remove conditional code. + [__ASSUME_REALTIME_SIGNALS]: Make code unconditional. + 2012-05-11 Joseph Myers * sysdeps/mips/dl-lookup.c: Update from generic version. diff --git a/sysdeps/unix/sysv/linux/mips/pread.c b/sysdeps/unix/sysv/linux/mips/pread.c index ff83498caf..a868130ea1 100644 --- a/sysdeps/unix/sysv/linux/mips/pread.c +++ b/sysdeps/unix/sysv/linux/mips/pread.c @@ -1,5 +1,4 @@ -/* Copyright (C) 1997, 1998, 2000, 2002, 2003, 2004 - Free Software Foundation, Inc. +/* Copyright (C) 1997-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -38,12 +37,6 @@ # define __NR_pread __NR_pread64 #endif -#if defined __NR_pread || __ASSUME_PREAD_SYSCALL > 0 - -# if __ASSUME_PREAD_SYSCALL == 0 -static ssize_t __emulate_pread (int fd, void *buf, size_t count, - off_t offset) internal_function; -# endif ssize_t __libc_pread (fd, buf, count, offset) @@ -60,7 +53,6 @@ __libc_pread (fd, buf, count, offset) if (SINGLE_THREAD_P) { - /* First try the syscall. */ #if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64 result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count, offset); @@ -68,28 +60,17 @@ __libc_pread (fd, buf, count, offset) result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, __LONG_LONG_PAIR (offset >> 31, offset)); #endif -# if __ASSUME_PREAD_SYSCALL == 0 - if (result == -1 && errno == ENOSYS) - /* No system call available. Use the emulation. */ - result = __emulate_pread (fd, buf, count, offset); -# endif return result; } int oldtype = LIBC_CANCEL_ASYNC (); - /* First try the syscall. */ #if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64 result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count, offset); #else result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, __LONG_LONG_PAIR (offset >> 31, offset)); #endif -# if __ASSUME_PREAD_SYSCALL == 0 - if (result == -1 && errno == ENOSYS) - /* No system call available. Use the emulation. */ - result = __emulate_pread (fd, buf, count, offset); -# endif LIBC_CANCEL_RESET (oldtype); @@ -98,11 +79,3 @@ __libc_pread (fd, buf, count, offset) strong_alias (__libc_pread, __pread) weak_alias (__libc_pread, pread) - -# define __libc_pread(fd, buf, count, offset) \ - static internal_function __emulate_pread (fd, buf, count, offset) -#endif - -#if __ASSUME_PREAD_SYSCALL == 0 -# include -#endif diff --git a/sysdeps/unix/sysv/linux/mips/pread64.c b/sysdeps/unix/sysv/linux/mips/pread64.c index 05c7c14ead..6f9b0054a5 100644 --- a/sysdeps/unix/sysv/linux/mips/pread64.c +++ b/sysdeps/unix/sysv/linux/mips/pread64.c @@ -1,5 +1,4 @@ -/* Copyright (C) 1997, 1998, 2000, 2002, 2003, 2004 - Free Software Foundation, Inc. +/* Copyright (C) 1997-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -37,12 +36,6 @@ # define __NR_pread __NR_pread64 #endif -#if defined __NR_pread || __ASSUME_PREAD_SYSCALL > 0 - -# if __ASSUME_PREAD_SYSCALL == 0 -static ssize_t __emulate_pread64 (int fd, void *buf, size_t count, - off64_t offset) internal_function; -# endif ssize_t __libc_pread64 (fd, buf, count, offset) @@ -56,7 +49,6 @@ __libc_pread64 (fd, buf, count, offset) if (SINGLE_THREAD_P) { - /* First try the syscall. */ #if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64 result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count, offset); @@ -65,17 +57,11 @@ __libc_pread64 (fd, buf, count, offset) __LONG_LONG_PAIR ((off_t) (offset >> 32), (off_t) (offset & 0xffffffff))); #endif -# if __ASSUME_PREAD_SYSCALL == 0 - if (result == -1 && errno == ENOSYS) - /* No system call available. Use the emulation. */ - result = __emulate_pread64 (fd, buf, count, offset); -# endif return result; } int oldtype = LIBC_CANCEL_ASYNC (); - /* First try the syscall. */ #if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64 result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count, offset); #else @@ -83,11 +69,6 @@ __libc_pread64 (fd, buf, count, offset) __LONG_LONG_PAIR ((off_t) (offset >> 32), (off_t) (offset & 0xffffffff))); #endif -# if __ASSUME_PREAD_SYSCALL == 0 - if (result == -1 && errno == ENOSYS) - /* No system call available. Use the emulation. */ - result = __emulate_pread64 (fd, buf, count, offset); -# endif LIBC_CANCEL_RESET (oldtype); @@ -96,11 +77,3 @@ __libc_pread64 (fd, buf, count, offset) weak_alias (__libc_pread64, __pread64) weak_alias (__libc_pread64, pread64) - -# define __libc_pread64(fd, buf, count, offset) \ - static internal_function __emulate_pread64 (fd, buf, count, offset) -#endif - -#if __ASSUME_PREAD_SYSCALL == 0 -# include -#endif diff --git a/sysdeps/unix/sysv/linux/mips/pwrite.c b/sysdeps/unix/sysv/linux/mips/pwrite.c index 07331f0654..cc0c3b7c22 100644 --- a/sysdeps/unix/sysv/linux/mips/pwrite.c +++ b/sysdeps/unix/sysv/linux/mips/pwrite.c @@ -1,5 +1,4 @@ -/* Copyright (C) 1997, 1998, 2000, 2002, 2003, 2004 - Free Software Foundation, Inc. +/* Copyright (C) 1997-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -38,12 +37,6 @@ # define __NR_pwrite __NR_pwrite64 #endif -#if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0 - -# if __ASSUME_PWRITE_SYSCALL == 0 -static ssize_t __emulate_pwrite (int fd, const void *buf, size_t count, - off_t offset) internal_function; -# endif ssize_t __libc_pwrite (fd, buf, count, offset) @@ -60,7 +53,6 @@ __libc_pwrite (fd, buf, count, offset) if (SINGLE_THREAD_P) { - /* First try the syscall. */ #if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64 result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count, offset); @@ -68,28 +60,17 @@ __libc_pwrite (fd, buf, count, offset) result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0, __LONG_LONG_PAIR (offset >> 31, offset)); #endif -# if __ASSUME_PWRITE_SYSCALL == 0 - if (result == -1 && errno == ENOSYS) - /* No system call available. Use the emulation. */ - result = __emulate_pwrite (fd, buf, count, offset); -# endif return result; } int oldtype = LIBC_CANCEL_ASYNC (); - /* First try the syscall. */ #if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64 result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count, offset); #else result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0, __LONG_LONG_PAIR (offset >> 31, offset)); #endif -# if __ASSUME_PWRITE_SYSCALL == 0 - if (result == -1 && errno == ENOSYS) - /* No system call available. Use the emulation. */ - result = __emulate_pwrite (fd, buf, count, offset); -# endif LIBC_CANCEL_RESET (oldtype); @@ -98,11 +79,3 @@ __libc_pwrite (fd, buf, count, offset) strong_alias (__libc_pwrite, __pwrite) weak_alias (__libc_pwrite, pwrite) - -# define __libc_pwrite(fd, buf, count, offset) \ - static internal_function __emulate_pwrite (fd, buf, count, offset) -#endif - -#if __ASSUME_PWRITE_SYSCALL == 0 -# include -#endif diff --git a/sysdeps/unix/sysv/linux/mips/pwrite64.c b/sysdeps/unix/sysv/linux/mips/pwrite64.c index 39bbda8f0e..d60accd57f 100644 --- a/sysdeps/unix/sysv/linux/mips/pwrite64.c +++ b/sysdeps/unix/sysv/linux/mips/pwrite64.c @@ -1,5 +1,4 @@ -/* Copyright (C) 1997, 1998, 2000, 2002, 2003, 2004 - Free Software Foundation, Inc. +/* Copyright (C) 1997-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ralf Baechle , 1998. @@ -37,12 +36,6 @@ # define __NR_pwrite __NR_pwrite64 #endif -#if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0 - -# if __ASSUME_PWRITE_SYSCALL == 0 -static ssize_t __emulate_pwrite64 (int fd, const void *buf, size_t count, - off64_t offset) internal_function; -# endif ssize_t __libc_pwrite64 (fd, buf, count, offset) @@ -55,7 +48,6 @@ __libc_pwrite64 (fd, buf, count, offset) if (SINGLE_THREAD_P) { - /* First try the syscall. */ #if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64 result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count, offset); @@ -64,18 +56,12 @@ __libc_pwrite64 (fd, buf, count, offset) __LONG_LONG_PAIR ((off_t) (offset >> 32), (off_t) (offset & 0xffffffff))); #endif -# if __ASSUME_PWRITE_SYSCALL == 0 - if (result == -1 && errno == ENOSYS) - /* No system call available. Use the emulation. */ - result = __emulate_pwrite64 (fd, buf, count, offset); -# endif return result; } int oldtype = LIBC_CANCEL_ASYNC (); - /* First try the syscall. */ #if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64 result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count, offset); #else @@ -83,11 +69,6 @@ __libc_pwrite64 (fd, buf, count, offset) __LONG_LONG_PAIR ((off_t) (offset >> 32), (off_t) (offset & 0xffffffff))); #endif -# if __ASSUME_PWRITE_SYSCALL == 0 - if (result == -1 && errno == ENOSYS) - /* No system call available. Use the emulation. */ - result = __emulate_pwrite64 (fd, buf, count, offset); -# endif LIBC_CANCEL_RESET (oldtype); @@ -97,11 +78,3 @@ __libc_pwrite64 (fd, buf, count, offset) weak_alias (__libc_pwrite64, __pwrite64) libc_hidden_weak (__pwrite64) weak_alias (__libc_pwrite64, pwrite64) - -# define __libc_pwrite64(fd, buf, count, offset) \ - static internal_function __emulate_pwrite64 (fd, buf, count, offset) -#endif - -#if __ASSUME_PWRITE_SYSCALL == 0 -# include -#endif diff --git a/sysdeps/unix/sysv/linux/mips/sigaction.c b/sysdeps/unix/sysv/linux/mips/sigaction.c index c3a467003a..d646af3f22 100644 --- a/sysdeps/unix/sysv/linux/mips/sigaction.c +++ b/sysdeps/unix/sysv/linux/mips/sigaction.c @@ -1,5 +1,4 @@ -/* Copyright (C) 1997,1998,1999,2000,2002,2003,2004,2006 - Free Software Foundation, Inc. +/* Copyright (C) 1997-2012 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 @@ -33,13 +32,6 @@ translate it here. */ #include -#if __ASSUME_REALTIME_SIGNALS == 0 -/* The variable is shared between all wrappers around signal handling - functions which have RT equivalents. This is the definition. */ -int __libc_missing_rt_sigs; - -#endif - #if _MIPS_SIM != _ABIO32 # ifdef __NR_rt_sigreturn @@ -58,97 +50,42 @@ __libc_sigaction (sig, act, oact) const struct sigaction *act; struct sigaction *oact; { -#if __ASSUME_REALTIME_SIGNALS == 0 - struct old_kernel_sigaction k_sigact, k_osigact; -#endif int result; -#if defined __NR_rt_sigaction || __ASSUME_REALTIME_SIGNALS > 0 - /* First try the RT signals. */ -# if __ASSUME_REALTIME_SIGNALS == 0 - if (!__libc_missing_rt_sigs) -# endif - { - struct kernel_sigaction kact, koact; - /* Save the current error value for later. We need not do this - if we are guaranteed to have realtime signals. */ -# if __ASSUME_REALTIME_SIGNALS == 0 - int saved_errno = errno; -# endif - - if (act) - { - kact.k_sa_handler = act->sa_handler; - memcpy (&kact.sa_mask, &act->sa_mask, sizeof (kernel_sigset_t)); - kact.sa_flags = act->sa_flags; -# ifdef HAVE_SA_RESTORER -# if _MIPS_SIM == _ABIO32 - kact.sa_restorer = act->sa_restorer; -# else - kact.sa_restorer = &restore_rt; -# endif -# endif - } - - /* XXX The size argument hopefully will have to be changed to the - real size of the user-level sigset_t. */ - result = INLINE_SYSCALL (rt_sigaction, 4, sig, - act ? __ptrvalue (&kact) : NULL, - oact ? __ptrvalue (&koact) : NULL, - sizeof (kernel_sigset_t)); + struct kernel_sigaction kact, koact; -# if __ASSUME_REALTIME_SIGNALS == 0 - if (result >= 0 || errno != ENOSYS) -# endif - { - if (oact && result >= 0) - { - oact->sa_handler = koact.k_sa_handler; - memcpy (&oact->sa_mask, &koact.sa_mask, - sizeof (kernel_sigset_t)); - oact->sa_flags = koact.sa_flags; -# ifdef HAVE_SA_RESTORER - oact->sa_restorer = koact.sa_restorer; -# endif - } - return result; - } - -# if __ASSUME_REALTIME_SIGNALS == 0 - __set_errno (saved_errno); - __libc_missing_rt_sigs = 1; -# endif - } -#endif - -#if __ASSUME_REALTIME_SIGNALS == 0 if (act) { - k_sigact.k_sa_handler = act->sa_handler; - k_sigact.sa_mask = act->sa_mask.__val[0]; - k_sigact.sa_flags = act->sa_flags; -# ifdef HAVE_SA_RESTORER - k_sigact.sa_restorer = act->sa_restorer; + kact.k_sa_handler = act->sa_handler; + memcpy (&kact.sa_mask, &act->sa_mask, sizeof (kernel_sigset_t)); + kact.sa_flags = act->sa_flags; +#ifdef HAVE_SA_RESTORER +# if _MIPS_SIM == _ABIO32 + kact.sa_restorer = act->sa_restorer; +# else + kact.sa_restorer = &restore_rt; # endif +#endif } - result = INLINE_SYSCALL (sigaction, 3, sig, - act ? __ptrvalue (&k_sigact) : NULL, - oact ? __ptrvalue (&k_osigact) : NULL); + + /* XXX The size argument hopefully will have to be changed to the + real size of the user-level sigset_t. */ + result = INLINE_SYSCALL (rt_sigaction, 4, sig, + act ? __ptrvalue (&kact) : NULL, + oact ? __ptrvalue (&koact) : NULL, + sizeof (kernel_sigset_t)); + if (oact && result >= 0) { - oact->sa_handler = k_osigact.k_sa_handler; - oact->sa_mask.__val[0] = k_osigact.sa_mask; - oact->sa_flags = k_osigact.sa_flags; -# ifdef HAVE_SA_RESTORER -# if _MIPS_SIM == _ABIO32 - oact->sa_restorer = k_osigact.sa_restorer; -# else - oact->sa_restorer = &restore; -# endif -# endif + oact->sa_handler = koact.k_sa_handler; + memcpy (&oact->sa_mask, &koact.sa_mask, + sizeof (kernel_sigset_t)); + oact->sa_flags = koact.sa_flags; +#ifdef HAVE_SA_RESTORER + oact->sa_restorer = koact.sa_restorer; +#endif } return result; -#endif } libc_hidden_def (__libc_sigaction) From 3f753e3ad5f100bb3ccdd109d4856457aebdea60 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 14 May 2012 17:02:00 +0200 Subject: [PATCH 4349/4487] m68k: use default minimum kernel version for m680x0 --- ChangeLog.m68k | 5 +++++ sysdeps/unix/sysv/linux/m68k/configure | 1 - sysdeps/unix/sysv/linux/m68k/configure.in | 1 - 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 2a44afe8b9..3c912da2f7 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2012-05-14 Andreas Schwab + + * sysdeps/unix/sysv/linux/m68k/configure.in (arch_minimum_kernel) + [$machine != m68k/coldfire]: Don't set. + 2012-05-10 Andreas Schwab * sysdeps/m68k/m680x0/fpu/libm-test-ulps: Update. diff --git a/sysdeps/unix/sysv/linux/m68k/configure b/sysdeps/unix/sysv/linux/m68k/configure index 708b7a1a3c..a2fd833321 100644 --- a/sysdeps/unix/sysv/linux/m68k/configure +++ b/sysdeps/unix/sysv/linux/m68k/configure @@ -4,7 +4,6 @@ m68k/coldfire) arch_minimum_kernel=2.6.10 ;; *) - arch_minimum_kernel=2.0.10 libc_cv_gcc_unwind_find_fde=yes ;; esac diff --git a/sysdeps/unix/sysv/linux/m68k/configure.in b/sysdeps/unix/sysv/linux/m68k/configure.in index b25f4dbb7f..6e91ef96f3 100644 --- a/sysdeps/unix/sysv/linux/m68k/configure.in +++ b/sysdeps/unix/sysv/linux/m68k/configure.in @@ -5,7 +5,6 @@ m68k/coldfire) arch_minimum_kernel=2.6.10 ;; *) - arch_minimum_kernel=2.0.10 libc_cv_gcc_unwind_find_fde=yes ;; esac From 5b86315c81c9dfc2937c5d2ee9cbd5329b706db3 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 14 May 2012 17:06:47 +0200 Subject: [PATCH 4350/4487] m68k: remove duplicate __ASSUME_VFORK_SYSCALL --- sysdeps/unix/sysv/linux/m68k/kernel-features.h | 1 - 1 file changed, 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/m68k/kernel-features.h b/sysdeps/unix/sysv/linux/m68k/kernel-features.h index 3fffa0801b..2d8882e556 100644 --- a/sysdeps/unix/sysv/linux/m68k/kernel-features.h +++ b/sysdeps/unix/sysv/linux/m68k/kernel-features.h @@ -25,7 +25,6 @@ # define __ASSUME_FCNTL64 1 # define __ASSUME_VFORK_SYSCALL 1 # define __ASSUME_NEW_GETRLIMIT_SYSCALL 1 -# define __ASSUME_VFORK_SYSCALL 1 #endif /* Many syscalls were added in 2.6.10 for m68k. */ From 538c451b2bbbcb258640b0e0ea0c74f9da005beb Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Fri, 11 May 2012 14:27:57 -0400 Subject: [PATCH 4351/4487] tile: Remove elf/ and create crti.S/crtn.S This patches fixes up the tile startup files, moving elf/start.S up a directory level and implementing the required crti.S and crtn.S files based on the old initfini.c compiler output (hand-optimized to bum a couple of cycles). --- ChangeLog.tile | 11 ++ sysdeps/tile/Makefile | 5 - sysdeps/tile/crti.S | 111 +++++++++++++++++++++ sysdeps/tile/crtn.S | 55 ++++++++++ sysdeps/tile/{elf => }/start.S | 0 sysdeps/unix/sysv/linux/tile/nptl/Makefile | 5 - 6 files changed, 177 insertions(+), 10 deletions(-) create mode 100644 sysdeps/tile/crti.S create mode 100644 sysdeps/tile/crtn.S rename sysdeps/tile/{elf => }/start.S (100%) diff --git a/ChangeLog.tile b/ChangeLog.tile index 77e03b58fe..a8b24588da 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,3 +1,14 @@ +2012-05-12 Chris Metcalf + + * sysdeps/tile/crti.S: New file, based on compiler output + for sysdeps/generic/initfini.c. + * sysdeps/tile/crtn.S: Likewise. + * sysdeps/tile/Makefile (CFLAGS-initfini.s): Remove variable. + * sysdeps/unix/sysv/linux/tile/nptl/Makefile + (CFLAGS-pt-initfini.s): Likewise. + * sysdeps/tile/elf/start.S: Moved to ... + * sysdeps/tile/start.S: ...here. + 2012-04-15 Mike Frysinger * sysdeps/unix/sysv/linux/tile/tilegx/register-dump.h: Include diff --git a/sysdeps/tile/Makefile b/sysdeps/tile/Makefile index 08c3385502..3cd4d1e752 100644 --- a/sysdeps/tile/Makefile +++ b/sysdeps/tile/Makefile @@ -11,8 +11,3 @@ ifeq ($(subdir),elf) # Extra shared linker files to link only into dl-allobjs.so. sysdep-rtld-routines += dl-start __tls_get_addr endif - -ifeq ($(subdir),csu) -# Avoid .cfi_startproc/endproc markers when creating init and fini pieces. -CFLAGS-initfini.s += -fno-asynchronous-unwind-tables -endif diff --git a/sysdeps/tile/crti.S b/sysdeps/tile/crti.S new file mode 100644 index 0000000000..ccb4464bb7 --- /dev/null +++ b/sysdeps/tile/crti.S @@ -0,0 +1,111 @@ +/* Special .init and .fini section support for tile. + Copyright (C) 2012 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. + + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + + 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, see + . */ + +/* crti.S puts a function prologue at the beginning of the .init and + .fini sections and defines global symbols for those addresses, so + they can be called as functions. The symbols _init and _fini are + magic and cause the linker to emit DT_INIT and DT_FINI. */ + +#include +#include + +#ifndef PREINIT_FUNCTION +# define PREINIT_FUNCTION __gmon_start__ +#endif + +#ifndef PREINIT_FUNCTION_WEAK +# define PREINIT_FUNCTION_WEAK 1 +#endif + +#if PREINIT_FUNCTION_WEAK + weak_extern (PREINIT_FUNCTION) +#else + .hidden PREINIT_FUNCTION +#endif + + .section .init,"ax",@progbits + .align 8 + .globl _init + .type _init, @function +_init: + { + move r29, sp + ADDI_PTR r28, sp, -REGSIZE + ST sp, lr + } + ADDI_PTR sp, sp, -(2 * REGSIZE) + ST r28, r29 +#if PREINIT_FUNCTION_WEAK + lnk r2 +0: +#ifdef __tilegx__ + { + moveli r1, hw1_last(_GLOBAL_OFFSET_TABLE_ - 0b) + moveli r0, hw1_last_got(PREINIT_FUNCTION) + } + { + shl16insli r1, r1, hw0(_GLOBAL_OFFSET_TABLE_ - 0b) + shl16insli r0, r0, hw0_got(PREINIT_FUNCTION) + } +#else + { + moveli r1, lo16(_GLOBAL_OFFSET_TABLE_ - 0b) + moveli r0, got_lo16(PREINIT_FUNCTION) + } + { + auli r1, r1, ha16(_GLOBAL_OFFSET_TABLE_ - 0b) + auli r0, r0, got_ha16(PREINIT_FUNCTION) + } +#endif + ADD_PTR r0, r0, r1 + ADD_PTR r0, r0, r2 + LD_PTR r0, r0 + BEQZ r0, .Lno_weak_fn +#endif + jal plt(PREINIT_FUNCTION) +.Lno_weak_fn: + + .section .fini,"ax",@progbits + .align 8 + .globl _fini + .type _fini, @function +_fini: + { + move r29, sp + ADDI_PTR r28, sp, -REGSIZE + ST sp, lr + } + ADDI_PTR sp, sp, -(2 * REGSIZE) + ST r28, r29 diff --git a/sysdeps/tile/crtn.S b/sysdeps/tile/crtn.S new file mode 100644 index 0000000000..06931a119e --- /dev/null +++ b/sysdeps/tile/crtn.S @@ -0,0 +1,55 @@ +/* Special .init and .fini section support for tile. + Copyright (C) 2012 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. + + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + + 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, see + . */ + +/* crtn.S puts function epilogues in the .init and .fini sections + corresponding to the prologues in crti.S. */ + +#include + + .section .init,"ax",@progbits + ADDI_PTR r29, sp, (2 * REGSIZE) + { + ADDI_PTR sp, sp, (2 * REGSIZE) + LD lr, r29 + } + jrp lr + + .section .fini,"ax",@progbits + ADDI_PTR r29, sp, (2 * REGSIZE) + { + ADDI_PTR sp, sp, (2 * REGSIZE) + LD lr, r29 + } + jrp lr diff --git a/sysdeps/tile/elf/start.S b/sysdeps/tile/start.S similarity index 100% rename from sysdeps/tile/elf/start.S rename to sysdeps/tile/start.S diff --git a/sysdeps/unix/sysv/linux/tile/nptl/Makefile b/sysdeps/unix/sysv/linux/tile/nptl/Makefile index 79e03546fc..e98c9bd866 100644 --- a/sysdeps/unix/sysv/linux/tile/nptl/Makefile +++ b/sysdeps/unix/sysv/linux/tile/nptl/Makefile @@ -1,7 +1,2 @@ # pull in __syscall_error routine libpthread-routines += sysdep - -ifeq ($(subdir),nptl) -# Avoid .cfi_startproc/endproc markers when creating init and fini pieces. -CFLAGS-pt-initfini.s += -fno-asynchronous-unwind-tables -endif From 87df4a4b09abdb1b1af41c9c398b86ecdedcb635 Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Fri, 11 May 2012 14:42:46 -0400 Subject: [PATCH 4352/4487] tile: update pthread_attr_t and struct siginfo names This adds a tag to the pthread_attr_t underlying type so we can forward-declare it, and removes the siginfo_t type, to match changes in the main tree. --- ChangeLog.tile | 8 ++++++++ sysdeps/unix/sysv/linux/tile/bits/siginfo.h | 12 +++++++++--- .../unix/sysv/linux/tile/nptl/bits/pthreadtypes.h | 11 +++++++---- 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/ChangeLog.tile b/ChangeLog.tile index a8b24588da..4846802658 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,3 +1,11 @@ +2012-05-12 Chris Metcalf + + * sysdeps/unix/sysv/linux/tile/bits/siginfo.h: Don't name + siginfo_t struct. Add forward declaration of pthread_attr_t and + use it in sigevent. + * sysdeps/unix/sysv/linux/tile/nptl/bits/pthreadtypes.h: Name + pthread_attr_t union. + 2012-05-12 Chris Metcalf * sysdeps/tile/crti.S: New file, based on compiler output diff --git a/sysdeps/unix/sysv/linux/tile/bits/siginfo.h b/sysdeps/unix/sysv/linux/tile/bits/siginfo.h index aeecd1960f..44ffcc04d1 100644 --- a/sysdeps/unix/sysv/linux/tile/bits/siginfo.h +++ b/sysdeps/unix/sysv/linux/tile/bits/siginfo.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011 Free Software Foundation, Inc. +/* Copyright (C) 2011-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Chris Metcalf , 2011. @@ -47,7 +47,7 @@ typedef union sigval # define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3) # endif -typedef struct siginfo +typedef struct { int si_signo; /* Signal number. */ int si_errno; /* If non-zero, an errno value associated with @@ -275,6 +275,12 @@ enum # define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3) # endif +/* Forward declaration. */ +# ifndef __have_pthread_attr_t +typedef union pthread_attr_t pthread_attr_t; +# define __have_pthread_attr_t 1 +# endif + typedef struct sigevent { sigval_t sigev_value; @@ -292,7 +298,7 @@ typedef struct sigevent struct { void (*_function) (sigval_t); /* Function to start. */ - void *_attribute; /* Really pthread_attr_t. */ + pthread_attr_t *_attribute; /* Thread attributes. */ } _sigev_thread; } _sigev_un; } sigevent_t; diff --git a/sysdeps/unix/sysv/linux/tile/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/tile/nptl/bits/pthreadtypes.h index d840ce5837..ac51e3b93c 100644 --- a/sysdeps/unix/sysv/linux/tile/nptl/bits/pthreadtypes.h +++ b/sysdeps/unix/sysv/linux/tile/nptl/bits/pthreadtypes.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011 Free Software Foundation, Inc. +/* Copyright (C) 2011-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Based on work contributed by Ulrich Drepper , 2002. Contributed by Chris Metcalf , 2011. @@ -50,12 +50,15 @@ typedef unsigned long int pthread_t; -typedef union +union pthread_attr_t { char __size[__SIZEOF_PTHREAD_ATTR_T]; long int __align; -} pthread_attr_t; - +}; +#ifndef __have_pthread_attr_t +typedef union pthread_attr_t pthread_attr_t; +# define __have_pthread_attr_t 1 +#endif #if __WORDSIZE == 64 typedef struct __pthread_internal_list From 2a99f85fe31634fd8633e167a7d25028b827a90f Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Fri, 11 May 2012 15:42:04 -0400 Subject: [PATCH 4353/4487] tile: remove stale #define of ELF_MACHINE_PLTREL_OVERLAP --- ChangeLog.tile | 5 +++++ sysdeps/tile/dl-machine.h | 5 +---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ChangeLog.tile b/ChangeLog.tile index 4846802658..46336a51bf 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,3 +1,8 @@ +2012-05-12 Chris Metcalf + + * sysdeps/tile/Makefile (ELF_MACHINE_PLTREL_OVERLAP): + Remove variable no longer used by core. + 2012-05-12 Chris Metcalf * sysdeps/unix/sysv/linux/tile/bits/siginfo.h: Don't name diff --git a/sysdeps/tile/dl-machine.h b/sysdeps/tile/dl-machine.h index 178b33efca..c4413f9e8a 100644 --- a/sysdeps/tile/dl-machine.h +++ b/sysdeps/tile/dl-machine.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011 Free Software Foundation, Inc. +/* Copyright (C) 2011-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Chris Metcalf , 2011. Based on work contributed by by Carl Pederson & Martin Schwidefsky. @@ -224,9 +224,6 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) /* TILE never uses Elf32_Rel relocations. */ #define ELF_MACHINE_NO_REL 1 -/* TILE overlaps DT_RELA and DT_PLTREL. */ -#define ELF_MACHINE_PLTREL_OVERLAP 1 - /* We define an initialization functions. This is called very early in _dl_sysdep_start. */ #define DL_PLATFORM_INIT dl_platform_init () From 3c19868059809171740f3f71ec0e950582b3b23b Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Fri, 11 May 2012 15:57:05 -0400 Subject: [PATCH 4354/4487] linux-generic: add wordsize-32 version of prlimit64/fanotify syscalls --- ChangeLog.linux-generic | 5 +++++ sysdeps/unix/sysv/linux/generic/wordsize-32/syscalls.list | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog.linux-generic b/ChangeLog.linux-generic index 5892ad7e0f..4b39e61f51 100644 --- a/ChangeLog.linux-generic +++ b/ChangeLog.linux-generic @@ -1,3 +1,8 @@ +2012-05-12 Chris Metcalf + + * sysdeps/unix/sysv/linux/generic/wordsize-32/syscalls.list: + Add entries for prlimit64 and fanotify_mark. + 2012-05-12 Chris Metcalf * sysdeps/unix/sysv/linux/generic/bits/typesizes.h diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/syscalls.list b/sysdeps/unix/sysv/linux/generic/wordsize-32/syscalls.list index d1ae0290f5..58b4057f4b 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/syscalls.list +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/syscalls.list @@ -3,3 +3,5 @@ # rlimit APIs getrlimit - getrlimit i:ip __getrlimit getrlimit setrlimit - setrlimit i:ip __setrlimit setrlimit +prlimit64 EXTRA prlimit64 i:iipp prlimit64 +fanotify_mark EXTRA fanotify_mark i:iiiiis fanotify_mark From 9b7108251ca46ae7f8d8edfac7224f279704960c Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Fri, 11 May 2012 16:11:04 -0400 Subject: [PATCH 4355/4487] tile: support stackguard-macros.h header --- ChangeLog.tile | 5 +++++ sysdeps/tile/elf/stackguard-macros.h | 3 +++ sysdeps/tile/stackguard-macros.h | 7 +++++++ 3 files changed, 15 insertions(+) create mode 100644 sysdeps/tile/elf/stackguard-macros.h create mode 100644 sysdeps/tile/stackguard-macros.h diff --git a/ChangeLog.tile b/ChangeLog.tile index 46336a51bf..2ce98e971b 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,3 +1,8 @@ +2012-05-12 Chris Metcalf + + * sysdeps/tile/stackguard-macros.h: New file. + * sysdeps/tile/elf/stackguard-macros.h: New stub include file. + 2012-05-12 Chris Metcalf * sysdeps/tile/Makefile (ELF_MACHINE_PLTREL_OVERLAP): diff --git a/sysdeps/tile/elf/stackguard-macros.h b/sysdeps/tile/elf/stackguard-macros.h new file mode 100644 index 0000000000..606ad58596 --- /dev/null +++ b/sysdeps/tile/elf/stackguard-macros.h @@ -0,0 +1,3 @@ +/* Tests in nptl/ look for while tests + in elf/ look for . Provide both. */ +#include "../stackguard-macros.h" diff --git a/sysdeps/tile/stackguard-macros.h b/sysdeps/tile/stackguard-macros.h new file mode 100644 index 0000000000..7679c0ac00 --- /dev/null +++ b/sysdeps/tile/stackguard-macros.h @@ -0,0 +1,7 @@ +#ifdef __tilegx__ +# define STACK_CHK_GUARD \ + ({ uintptr_t x; asm ("addi %0, tp, -16; ld %0, %0" : "=r" (x)); x; }) +#else +# define STACK_CHK_GUARD \ + ({ uintptr_t x; asm ("addi %0, tp, -8; lw %0, %0" : "=r" (x)); x; }) +#endif From cbf92fc46644e084315e3fbe7e5ccb7cb499284e Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Fri, 11 May 2012 16:53:19 -0400 Subject: [PATCH 4356/4487] tile: avoid using _LP64 The convention is to use __WORDSIZE everywhere. I happened to notice that we weren't doing this in __tls_get_addr.S. --- ChangeLog.tile | 4 ++++ sysdeps/tile/__tls_get_addr.S | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog.tile b/ChangeLog.tile index 2ce98e971b..5cdc293f8e 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,3 +1,7 @@ +2012-05-12 Chris Metcalf + + * sysdeps/tile/__tls_get_addr.S: Use __WORDSIZE, not _LP64. + 2012-05-12 Chris Metcalf * sysdeps/tile/stackguard-macros.h: New file. diff --git a/sysdeps/tile/__tls_get_addr.S b/sysdeps/tile/__tls_get_addr.S index 8cf49f0b2b..74e4fa2c26 100644 --- a/sysdeps/tile/__tls_get_addr.S +++ b/sysdeps/tile/__tls_get_addr.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2011 Free Software Foundation, Inc. +/* Copyright (C) 2011-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Chris Metcalf , 2011. @@ -18,8 +18,9 @@ #include #include +#include -#ifdef _LP64 +#if __WORDSIZE == 64 #define LOG_SIZEOF_DTV_T 4 #else #define LOG_SIZEOF_DTV_T 3 From 575298fcd298bb3ff7d7ba0d0bceac9429ae2b5d Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Fri, 11 May 2012 17:59:23 -0400 Subject: [PATCH 4357/4487] tile: allow memcpy(p, p, n) without corrupting memory at "p" Although this is not required by the definition of memcpy(), in practice this sort of thing does happen, and it's easy to make the code robust by doing nothing in this case. (Since structure copy causes the compiler to emit a memcpy, in the case where the target structure is the same as the destination, we were seeing corruption.) --- ChangeLog.tile | 5 +++++ sysdeps/tile/tilegx/memcpy.c | 13 ++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ChangeLog.tile b/ChangeLog.tile index 5cdc293f8e..83136aa6c3 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,3 +1,8 @@ +2012-05-12 Chris Metcalf + + * sysdeps/tile/tilegx/memcpy.c: Allow memcpy(p, p, n) + without corrupting memory at "p". + 2012-05-12 Chris Metcalf * sysdeps/tile/__tls_get_addr.S: Use __WORDSIZE, not _LP64. diff --git a/sysdeps/tile/tilegx/memcpy.c b/sysdeps/tile/tilegx/memcpy.c index 9cfb283c82..dd6e30dd60 100644 --- a/sysdeps/tile/tilegx/memcpy.c +++ b/sysdeps/tile/tilegx/memcpy.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2011 Free Software Foundation, Inc. +/* Copyright (C) 2011-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Chris Metcalf , 2011. @@ -107,6 +107,17 @@ __memcpy (void *__restrict dstv, const void *__restrict srcv, size_t n) n -= sizeof (word_t)) *dst8++ = *src8++; + /* If copying to self, return. The test is cheap enough + that we do it despite the fact that the memcpy() contract + doesn't require us to support overlapping dst and src. + This is the most common case of overlap, and any close + overlap will cause corruption due to the wh64 below. + This case is particularly important since the compiler + will emit memcpy() calls for aggregate copies even if it + can't prove that src != dst. */ + if (__builtin_expect (dst8 == src8, 0)) + return dstv; + for (; n >= CHIP_L2_LINE_SIZE ();) { __insn_wh64 (dst8); From 64d76ca0647fc8f2a8709be957a551e9b92f5b1b Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Fri, 11 May 2012 18:03:58 -0400 Subject: [PATCH 4358/4487] tilegx: small performance fix for string routines We were multiplying a byte by 0x0101010101010101ULL to create a constant for SIMD ops, but the compiler isn't good at optimizing this case (the fact that one operand is a byte is lost by the time it would be possible to do the optimization). So instead we add a helper routine that explicitly uses SIMD ops to create the constant. --- ChangeLog.tile | 11 +++++++++++ sysdeps/tile/tilegx/memchr.c | 4 ++-- sysdeps/tile/tilegx/memset.c | 5 +++-- sysdeps/tile/tilegx/rawmemchr.c | 4 ++-- sysdeps/tile/tilegx/strchr.c | 4 ++-- sysdeps/tile/tilegx/strchrnul.c | 4 ++-- sysdeps/tile/tilegx/string-endian.h | 12 +++++++++++- sysdeps/tile/tilegx/strrchr.c | 4 ++-- 8 files changed, 35 insertions(+), 13 deletions(-) diff --git a/ChangeLog.tile b/ChangeLog.tile index 83136aa6c3..3c192e908a 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,3 +1,14 @@ +2012-05-12 Chris Metcalf + + * sysdeps/tile/tilegx/memchr.c: Use new copy_byte() function + to efficiently generate a large constant for masking. + * sysdeps/tile/tilegx/memset.c: Likewise. + * sysdeps/tile/tilegx/rawmemchr.c: Likewise. + * sysdeps/tile/tilegx/strchr.c: Likewise. + * sysdeps/tile/tilegx/strchrnul.c: Likewise. + * sysdeps/tile/tilegx/strrchr.c: Likewise. + * sysdeps/tile/tilegx/string-endian.h (copy_byte): New function. + 2012-05-12 Chris Metcalf * sysdeps/tile/tilegx/memcpy.c: Allow memcpy(p, p, n) diff --git a/sysdeps/tile/tilegx/memchr.c b/sysdeps/tile/tilegx/memchr.c index aea25ff303..32f24ec43e 100644 --- a/sysdeps/tile/tilegx/memchr.c +++ b/sysdeps/tile/tilegx/memchr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2011 Free Software Foundation, Inc. +/* Copyright (C) 2011-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Chris Metcalf , 2011. @@ -41,7 +41,7 @@ __memchr (const void *s, int c, size_t n) p = (const uint64_t *) (s_int & -8); /* Create eight copies of the byte for which we are looking. */ - goal = 0x0101010101010101ULL * (uint8_t) c; + goal = copy_byte(c); /* Read the first word, but munge it so that bytes before the array will not match goal. */ diff --git a/sysdeps/tile/tilegx/memset.c b/sysdeps/tile/tilegx/memset.c index 8083abf5cb..dad3eadc5a 100644 --- a/sysdeps/tile/tilegx/memset.c +++ b/sysdeps/tile/tilegx/memset.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2011 Free Software Foundation, Inc. +/* Copyright (C) 2011-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Chris Metcalf , 2011. @@ -19,6 +19,7 @@ #include #include #include +#include "string-endian.h" void * __memset (void *s, int c, size_t n) @@ -71,7 +72,7 @@ __memset (void *s, int c, size_t n) n64 = n >> 3; /* Tile input byte out to 64 bits. */ - v64 = 0x0101010101010101ULL * (uint8_t) c; + v64 = copy_byte(c); /* This must be at least 8 or the following loop doesn't work. */ #define CACHE_LINE_SIZE_IN_DOUBLEWORDS (CHIP_L2_LINE_SIZE() / 8) diff --git a/sysdeps/tile/tilegx/rawmemchr.c b/sysdeps/tile/tilegx/rawmemchr.c index ed9162d1c1..70b5928ebc 100644 --- a/sysdeps/tile/tilegx/rawmemchr.c +++ b/sysdeps/tile/tilegx/rawmemchr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2011 Free Software Foundation, Inc. +/* Copyright (C) 2011-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Chris Metcalf , 2011. @@ -28,7 +28,7 @@ __rawmemchr (const void *s, int c) const uint64_t *p = (const uint64_t *) (s_int & -8); /* Create eight copies of the byte for which we are looking. */ - const uint64_t goal = 0x0101010101010101ULL * (uint8_t) c; + const uint64_t goal = copy_byte(c); /* Read the first word, but munge it so that bytes before the array will not match goal. */ diff --git a/sysdeps/tile/tilegx/strchr.c b/sysdeps/tile/tilegx/strchr.c index 8ef4fdc04d..c6a741b37d 100644 --- a/sysdeps/tile/tilegx/strchr.c +++ b/sysdeps/tile/tilegx/strchr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2011 Free Software Foundation, Inc. +/* Copyright (C) 2011-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Chris Metcalf , 2011. @@ -32,7 +32,7 @@ strchr (const char *s, int c) const uint64_t *p = (const uint64_t *) (s_int & -8); /* Create eight copies of the byte for which we are looking. */ - const uint64_t goal = 0x0101010101010101ULL * (uint8_t) c; + const uint64_t goal = copy_byte(c); /* Read the first aligned word, but force bytes before the string to match neither zero nor goal (we make sure the high bit of each byte diff --git a/sysdeps/tile/tilegx/strchrnul.c b/sysdeps/tile/tilegx/strchrnul.c index 11814431b5..4251598dca 100644 --- a/sysdeps/tile/tilegx/strchrnul.c +++ b/sysdeps/tile/tilegx/strchrnul.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2011 Free Software Foundation, Inc. +/* Copyright (C) 2011-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Chris Metcalf , 2011. @@ -30,7 +30,7 @@ __strchrnul (const char *s, int c) const uint64_t *p = (const uint64_t *) (s_int & -8); /* Create eight copies of the byte for which we are looking. */ - const uint64_t goal = 0x0101010101010101ULL * (uint8_t) c; + const uint64_t goal = copy_byte(c); /* Read the first aligned word, but force bytes before the string to match neither zero nor goal (we make sure the high bit of each byte diff --git a/sysdeps/tile/tilegx/string-endian.h b/sysdeps/tile/tilegx/string-endian.h index 280efd3776..c2e40ecd4f 100644 --- a/sysdeps/tile/tilegx/string-endian.h +++ b/sysdeps/tile/tilegx/string-endian.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011 Free Software Foundation, Inc. +/* Copyright (C) 2011-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Chris Metcalf , 2011. @@ -33,3 +33,13 @@ #define CFZ(x) __insn_clz(x) #define REVCZ(x) __insn_ctz(x) #endif + +/* Create eight copies of the byte in a uint64_t. */ +static inline uint64_t copy_byte(uint8_t byte) +{ + uint64_t word = byte; + word = __insn_bfins(word, word, 8, 15); + word = __insn_bfins(word, word, 16, 31); + word = __insn_bfins(word, word, 32, 63); + return word; +} diff --git a/sysdeps/tile/tilegx/strrchr.c b/sysdeps/tile/tilegx/strrchr.c index 223c59dd4c..b6e43a6832 100644 --- a/sysdeps/tile/tilegx/strrchr.c +++ b/sysdeps/tile/tilegx/strrchr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2011 Free Software Foundation, Inc. +/* Copyright (C) 2011-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Chris Metcalf , 2011. @@ -28,7 +28,7 @@ strrchr (const char *s, int c) const uint64_t *p = (const uint64_t *) (s_int & -8); /* Create eight copies of the byte for which we are looking. */ - const uint64_t goal = 0x0101010101010101ULL * (uint8_t) c; + const uint64_t goal = copy_byte(c); /* Read the first aligned word, but force bytes before the string to match neither zero nor goal (we make sure the high bit of each byte From 8daa704ea4c8936eb033317bf2d20d82b3226553 Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Fri, 11 May 2012 18:06:42 -0400 Subject: [PATCH 4359/4487] tile: fix broken TLS_GD macros These still corresponded to an older version of the TLS code in the compiler. Now they match the code in gcc 4.7. --- ChangeLog.tile | 4 +++ sysdeps/tile/tls-macros.h | 58 +++++++++++++++++++++++++++++---------- 2 files changed, 47 insertions(+), 15 deletions(-) diff --git a/ChangeLog.tile b/ChangeLog.tile index 3c192e908a..f2eb35a7f9 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,3 +1,7 @@ +2012-05-12 Chris Metcalf + + * sysdeps/tile/tls-macros.h: Fix buggy TLS_GD, etc., macros. + 2012-05-12 Chris Metcalf * sysdeps/tile/tilegx/memchr.c: Use new copy_byte() function diff --git a/sysdeps/tile/tls-macros.h b/sysdeps/tile/tls-macros.h index 9a7e2799d2..25e5375a95 100644 --- a/sysdeps/tile/tls-macros.h +++ b/sysdeps/tile/tls-macros.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011 Free Software Foundation, Inc. +/* Copyright (C) 2011-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Chris Metcalf , 2011. @@ -17,13 +17,14 @@ . */ #ifdef __tilegx__ -#define TLS_GD_REL "hw0_last_tls_gd" -#define TLS_IE_REL "hw0_last_tls_ie" -#define LD_TLS "ld_tls" +#define TLS_GD_OFFSET(x) \ + "moveli r0, hw1_last_tls_gd(" #x ")\n\t" \ + "shl16insli r0, r0, hw0_tls_gd(" #x ")\n\t" \ + "addi r0, %1, tls_add(" #x ")\n\t" #else -#define TLS_GD_REL "tls_gd_lo16" -#define TLS_IE_REL "tls_ie_lo16" -#define LD_TLS "lw_tls" +#define TLS_GD_OFFSET(x) \ + "auli r0, %1, tls_gd_ha16(" #x ")\n\t" \ + "addli r0, r0, tls_gd_lo16(" #x ")\n\t" #endif #define TLS_GD(x) \ @@ -31,26 +32,53 @@ int *__retval; \ extern char _GLOBAL_OFFSET_TABLE_[]; \ \ - asm ("addli r0, %1, " TLS_GD_REL "(" #x ")\n\t" \ + asm (TLS_GD_OFFSET(x) \ "jal tls_gd_call(" #x ")\n\t" \ "addi %0, r0, tls_gd_add(" #x ")" : \ - "=r" (__retval) : "r" (_GLOBAL_OFFSET_TABLE_) : \ - "r25", "r26", "r27", "r28", "r29"); \ + "=&r" (__retval) : "r" (_GLOBAL_OFFSET_TABLE_) : \ + "r0", "r25", "r26", "r27", "r28", "r29"); \ __retval; }) /* No special support for LD mode. */ #define TLS_LD TLS_GD +#ifdef __tilegx__ +#define TLS_IE_OFFSET(x) \ + "moveli %0, hw1_last_tls_ie(" #x ")\n\t" \ + "shl16insli %0, %0, hw0_tls_ie(" #x ")\n\t" \ + "addi %0, %1, tls_add(" #x ")\n\t" +#define LD_TLS "ld_tls" +#else +#define TLS_IE_OFFSET(x) \ + "auli %0, %1, tls_ie_ha16(" #x ")\n\t" \ + "addli %0, %0, tls_ie_lo16(" #x ")\n\t" +#define LD_TLS "lw_tls" +#endif + #define TLS_IE(x) \ ({ \ int *__retval; \ extern char _GLOBAL_OFFSET_TABLE_[]; \ \ - asm ("addli %0, %1, " TLS_IE_REL "(" #x ")\n\t" \ - LD_TLS " %0, %0, tls_ie_load(" #x ")\n\t" \ + asm (TLS_IE_OFFSET(x) \ + LD_TLS " %0, %0, tls_ie_load(" #x ")\n\t" \ "add %0, %0, tp" : \ - "=r" (__retval) : "r" (_GLOBAL_OFFSET_TABLE_)); \ + "=&r" (__retval) : "r" (_GLOBAL_OFFSET_TABLE_)); \ __retval; }) -/* No special support for LE mode. */ -#define TLS_LE TLS_IE +#ifdef __tilegx__ +#define _TLS_LE(x) \ + "moveli %0, hw1_last_tls_le(" #x ")\n\t" \ + "shl16insli %0, %0, hw0_tls_le(" #x ")\n\t" \ + "add %0, %0, tp" +#else +#define _TLS_LE(x) \ + "auli %0, tp, tls_le_ha16(" #x ")\n\t" \ + "addli %0, %0, tls_le_lo16(" #x ")\n\t" +#endif + +#define TLS_LE(x) \ + ({ \ + int *__retval; \ + asm (_TLS_LE(x) : "=r" (__retval)); \ + __retval; }) From 024bb7b4a22e62faf932a7b9f071322716727d2d Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Fri, 11 May 2012 18:08:03 -0400 Subject: [PATCH 4360/4487] tile: fix bug in CFI definitions for clone.S We were missing a critical cfi_def_cfa_offset call in .Lthread_start which caused backtracing to get badly confused for threads. --- ChangeLog.tile | 4 ++++ sysdeps/unix/sysv/linux/tile/nptl/clone.S | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.tile b/ChangeLog.tile index f2eb35a7f9..ae048ddd34 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,3 +1,7 @@ +2012-05-12 Chris Metcalf + + * sysdeps/unix/sysv/linux/tile/nptl/clone.S: Add missing CFI. + 2012-05-12 Chris Metcalf * sysdeps/tile/tls-macros.h: Fix buggy TLS_GD, etc., macros. diff --git a/sysdeps/unix/sysv/linux/tile/nptl/clone.S b/sysdeps/unix/sysv/linux/tile/nptl/clone.S index eaa2fd65a5..de4fa136d3 100644 --- a/sysdeps/unix/sysv/linux/tile/nptl/clone.S +++ b/sysdeps/unix/sysv/linux/tile/nptl/clone.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2011 Free Software Foundation, Inc. +/* Copyright (C) 2011-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Chris Metcalf , 2011. @@ -167,6 +167,7 @@ ENTRY (__clone) in getpid(). Otherwise (if CLONE_VM isn't set), it's a fork-like clone, and we go ahead and write the cached values from the true system pid (retrieved via __NR_getpid syscall). */ + cfi_def_cfa_offset (FRAME_SIZE) #ifdef __tilegx__ { moveli r0, hw1_last(CLONE_VM) From 8927be2b217ad44682efd987e32320ee80c4dbe1 Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Fri, 11 May 2012 18:10:00 -0400 Subject: [PATCH 4361/4487] tile: add include to We were using __BEGIN_DECLS without and it just happened to mostly work, but of course we should include it here. --- ChangeLog.tile | 4 ++++ sysdeps/unix/sysv/linux/tile/sys/dataplane.h | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog.tile b/ChangeLog.tile index ae048ddd34..6bde1689a7 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,3 +1,7 @@ +2012-05-12 Chris Metcalf + + * sysdeps/unix/sysv/linux/tile/sys/dataplane.h: Add . + 2012-05-12 Chris Metcalf * sysdeps/unix/sysv/linux/tile/nptl/clone.S: Add missing CFI. diff --git a/sysdeps/unix/sysv/linux/tile/sys/dataplane.h b/sysdeps/unix/sysv/linux/tile/sys/dataplane.h index cae17b0933..fcea96ed1e 100644 --- a/sysdeps/unix/sysv/linux/tile/sys/dataplane.h +++ b/sysdeps/unix/sysv/linux/tile/sys/dataplane.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011 Free Software Foundation, Inc. +/* Copyright (C) 2011-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Chris Metcalf , 2011. @@ -19,6 +19,8 @@ #ifndef _SYS_DATAPLANE_H #define _SYS_DATAPLANE_H 1 +#include + /* Get the kernel definition for the flag bits. */ #include From bcfe09d24161bdf3b734da2f2fc4692bd26b7f52 Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Mon, 14 May 2012 15:03:46 -0400 Subject: [PATCH 4362/4487] tile: align stack for tilegx32 Previously we weren't re-aligning the stack pointer during the call to _dl_init(), so for tilegx32 and an odd value in _dl_skip_args and kernel unaligned access fixups disabled, we would die with SIGBUS. We now handle this case properly by aligning before calling _dl_init(). --- ChangeLog.tile | 4 ++++ sysdeps/tile/dl-start.S | 1 + 2 files changed, 5 insertions(+) diff --git a/ChangeLog.tile b/ChangeLog.tile index 6bde1689a7..9e75826e93 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,3 +1,7 @@ +2012-05-14 Chris Metcalf + + * sysdeps/tile/dl-start.S: Align stack for tilegx32. + 2012-05-12 Chris Metcalf * sysdeps/unix/sysv/linux/tile/sys/dataplane.h: Add . diff --git a/sysdeps/tile/dl-start.S b/sysdeps/tile/dl-start.S index 94025a544b..97cdac3fce 100644 --- a/sysdeps/tile/dl-start.S +++ b/sysdeps/tile/dl-start.S @@ -77,6 +77,7 @@ ENTRY (_start) ST_PTR r52, r0 SHL_PTR_ADD sp, r4, sp } + andi sp, sp, -8 .Lno_skip: /* Call_dl_init (_dl_loaded, argc, argv, envp). See elf/start.s From b55e1c1e812f1898795ac27227381f2f9442e174 Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Mon, 14 May 2012 15:33:00 -0400 Subject: [PATCH 4363/4487] tile: add abilist files --- ChangeLog.tile | 72 + .../tile/tilegx/tilegx32/nptl/ld.abilist | 11 + .../tilegx32/nptl/libBrokenLocale.abilist | 3 + .../tile/tilegx/tilegx32/nptl/libanl.abilist | 6 + .../tile/tilegx/tilegx32/nptl/libc.abilist | 2080 +++++++++++++++++ .../tilegx/tilegx32/nptl/libcrypt.abilist | 9 + .../tile/tilegx/tilegx32/nptl/libdl.abilist | 11 + .../tile/tilegx/tilegx32/nptl/libm.abilist | 368 +++ .../tile/tilegx/tilegx32/nptl/libnsl.abilist | 123 + .../tilegx/tilegx32/nptl/libpthread.abilist | 225 ++ .../tilegx/tilegx32/nptl/libresolv.abilist | 93 + .../tile/tilegx/tilegx32/nptl/librt.abilist | 42 + .../tilegx/tilegx32/nptl/libthread_db.abilist | 42 + .../tile/tilegx/tilegx32/nptl/libutil.abilist | 8 + .../tile/tilegx/tilegx64/nptl/ld.abilist | 11 + .../tilegx64/nptl/libBrokenLocale.abilist | 3 + .../tile/tilegx/tilegx64/nptl/libanl.abilist | 6 + .../tile/tilegx/tilegx64/nptl/libc.abilist | 2080 +++++++++++++++++ .../tilegx/tilegx64/nptl/libcrypt.abilist | 9 + .../tile/tilegx/tilegx64/nptl/libdl.abilist | 11 + .../tile/tilegx/tilegx64/nptl/libm.abilist | 368 +++ .../tile/tilegx/tilegx64/nptl/libnsl.abilist | 123 + .../tilegx/tilegx64/nptl/libpthread.abilist | 225 ++ .../tilegx/tilegx64/nptl/libresolv.abilist | 93 + .../tile/tilegx/tilegx64/nptl/librt.abilist | 42 + .../tilegx/tilegx64/nptl/libthread_db.abilist | 42 + .../tile/tilegx/tilegx64/nptl/libutil.abilist | 8 + .../sysv/linux/tile/tilepro/nptl/ld.abilist | 11 + .../tile/tilepro/nptl/libBrokenLocale.abilist | 3 + .../linux/tile/tilepro/nptl/libanl.abilist | 6 + .../sysv/linux/tile/tilepro/nptl/libc.abilist | 2080 +++++++++++++++++ .../linux/tile/tilepro/nptl/libcrypt.abilist | 9 + .../linux/tile/tilepro/nptl/libdl.abilist | 11 + .../sysv/linux/tile/tilepro/nptl/libm.abilist | 368 +++ .../linux/tile/tilepro/nptl/libnsl.abilist | 123 + .../tile/tilepro/nptl/libpthread.abilist | 225 ++ .../linux/tile/tilepro/nptl/libresolv.abilist | 93 + .../linux/tile/tilepro/nptl/librt.abilist | 42 + .../tile/tilepro/nptl/libthread_db.abilist | 42 + .../linux/tile/tilepro/nptl/libutil.abilist | 8 + 40 files changed, 9135 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/ld.abilist create mode 100644 sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libBrokenLocale.abilist create mode 100644 sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libanl.abilist create mode 100644 sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libc.abilist create mode 100644 sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libcrypt.abilist create mode 100644 sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libdl.abilist create mode 100644 sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libm.abilist create mode 100644 sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libnsl.abilist create mode 100644 sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libpthread.abilist create mode 100644 sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libresolv.abilist create mode 100644 sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/librt.abilist create mode 100644 sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libthread_db.abilist create mode 100644 sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libutil.abilist create mode 100644 sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/ld.abilist create mode 100644 sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libBrokenLocale.abilist create mode 100644 sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libanl.abilist create mode 100644 sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libc.abilist create mode 100644 sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libcrypt.abilist create mode 100644 sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libdl.abilist create mode 100644 sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libm.abilist create mode 100644 sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libnsl.abilist create mode 100644 sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libpthread.abilist create mode 100644 sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libresolv.abilist create mode 100644 sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/librt.abilist create mode 100644 sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libthread_db.abilist create mode 100644 sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libutil.abilist create mode 100644 sysdeps/unix/sysv/linux/tile/tilepro/nptl/ld.abilist create mode 100644 sysdeps/unix/sysv/linux/tile/tilepro/nptl/libBrokenLocale.abilist create mode 100644 sysdeps/unix/sysv/linux/tile/tilepro/nptl/libanl.abilist create mode 100644 sysdeps/unix/sysv/linux/tile/tilepro/nptl/libc.abilist create mode 100644 sysdeps/unix/sysv/linux/tile/tilepro/nptl/libcrypt.abilist create mode 100644 sysdeps/unix/sysv/linux/tile/tilepro/nptl/libdl.abilist create mode 100644 sysdeps/unix/sysv/linux/tile/tilepro/nptl/libm.abilist create mode 100644 sysdeps/unix/sysv/linux/tile/tilepro/nptl/libnsl.abilist create mode 100644 sysdeps/unix/sysv/linux/tile/tilepro/nptl/libpthread.abilist create mode 100644 sysdeps/unix/sysv/linux/tile/tilepro/nptl/libresolv.abilist create mode 100644 sysdeps/unix/sysv/linux/tile/tilepro/nptl/librt.abilist create mode 100644 sysdeps/unix/sysv/linux/tile/tilepro/nptl/libthread_db.abilist create mode 100644 sysdeps/unix/sysv/linux/tile/tilepro/nptl/libutil.abilist diff --git a/ChangeLog.tile b/ChangeLog.tile index 9e75826e93..a6ab6073ef 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,3 +1,75 @@ +2012-05-14 Chris Metcalf + + * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/ld.abilist: + New file. + * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libBrokenLocale.abilist: + Likewise. + * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libanl.abilist: + Likewise. + * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libc.abilist: + Likewise. + * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libcrypt.abilist: + Likewise. + * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libdl.abilist: + Likewise. + * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libm.abilist: + Likewise. + * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libnsl.abilist: + Likewise. + * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libpthread.abilist: + Likewise. + * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libresolv.abilist: + Likewise. + * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/librt.abilist: + Likewise. + * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libthread_db.abilist: + Likewise. + * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libutil.abilist: + Likewise. + * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/ld.abilist: + Likewise. + * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libBrokenLocale.abilist: + Likewise. + * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libanl.abilist: + Likewise. + * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libc.abilist: + Likewise. + * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libcrypt.abilist: + Likewise. + * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libdl.abilist: + Likewise. + * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libm.abilist: + Likewise. + * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libnsl.abilist: + Likewise. + * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libpthread.abilist: + Likewise. + * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libresolv.abilist: + Likewise. + * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/librt.abilist: + Likewise. + * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libthread_db.abilist: + Likewise. + * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libutil.abilist: + Likewise. + * sysdeps/unix/sysv/linux/tile/tilepro/nptl/ld.abilist: Likewise. + * sysdeps/unix/sysv/linux/tile/tilepro/nptl/libBrokenLocale.abilist: + Likewise. + * sysdeps/unix/sysv/linux/tile/tilepro/nptl/libanl.abilist: Likewise. + * sysdeps/unix/sysv/linux/tile/tilepro/nptl/libc.abilist: Likewise. + * sysdeps/unix/sysv/linux/tile/tilepro/nptl/libcrypt.abilist: Likewise. + * sysdeps/unix/sysv/linux/tile/tilepro/nptl/libdl.abilist: Likewise. + * sysdeps/unix/sysv/linux/tile/tilepro/nptl/libm.abilist: Likewise. + * sysdeps/unix/sysv/linux/tile/tilepro/nptl/libnsl.abilist: Likewise. + * sysdeps/unix/sysv/linux/tile/tilepro/nptl/libpthread.abilist: + Likewise. + * sysdeps/unix/sysv/linux/tile/tilepro/nptl/libresolv.abilist: + Likewise. + * sysdeps/unix/sysv/linux/tile/tilepro/nptl/librt.abilist: Likewise. + * sysdeps/unix/sysv/linux/tile/tilepro/nptl/libthread_db.abilist: + Likewise. + * sysdeps/unix/sysv/linux/tile/tilepro/nptl/libutil.abilist: Likewise. + 2012-05-14 Chris Metcalf * sysdeps/tile/dl-start.S: Align stack for tilegx32. diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/ld.abilist b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/ld.abilist new file mode 100644 index 0000000000..4367346594 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/ld.abilist @@ -0,0 +1,11 @@ +GLIBC_2.12 + GLIBC_2.12 A + __libc_memalign F + __libc_stack_end D 0x4 + __tls_get_addr F + _dl_mcount F + _r_debug D 0x14 + calloc F + free F + malloc F + realloc F diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libBrokenLocale.abilist b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libBrokenLocale.abilist new file mode 100644 index 0000000000..4af9128544 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libBrokenLocale.abilist @@ -0,0 +1,3 @@ +GLIBC_2.12 + GLIBC_2.12 A + __ctype_get_mb_cur_max F diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libanl.abilist b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libanl.abilist new file mode 100644 index 0000000000..29e602a75a --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libanl.abilist @@ -0,0 +1,6 @@ +GLIBC_2.12 + GLIBC_2.12 A + gai_cancel F + gai_error F + gai_suspend F + getaddrinfo_a F diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libc.abilist b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libc.abilist new file mode 100644 index 0000000000..e2e20be0b1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libc.abilist @@ -0,0 +1,2080 @@ +GLIBC_2.12 + GLIBC_2.12 A + _Exit F + _IO_2_1_stderr_ D 0xa0 + _IO_2_1_stdin_ D 0xa0 + _IO_2_1_stdout_ D 0xa0 + _IO_adjust_column F + _IO_adjust_wcolumn F + _IO_default_doallocate F + _IO_default_finish F + _IO_default_pbackfail F + _IO_default_uflow F + _IO_default_xsgetn F + _IO_default_xsputn F + _IO_do_write F + _IO_doallocbuf F + _IO_fclose F + _IO_fdopen F + _IO_feof F + _IO_ferror F + _IO_fflush F + _IO_fgetpos F + _IO_fgetpos64 F + _IO_fgets F + _IO_file_attach F + _IO_file_close F + _IO_file_close_it F + _IO_file_doallocate F + _IO_file_finish F + _IO_file_fopen F + _IO_file_init F + _IO_file_jumps D 0x54 + _IO_file_open F + _IO_file_overflow F + _IO_file_read F + _IO_file_seek F + _IO_file_seekoff F + _IO_file_setbuf F + _IO_file_stat F + _IO_file_sync F + _IO_file_underflow F + _IO_file_write F + _IO_file_xsputn F + _IO_flockfile F + _IO_flush_all F + _IO_flush_all_linebuffered F + _IO_fopen F + _IO_fprintf F + _IO_fputs F + _IO_fread F + _IO_free_backup_area F + _IO_free_wbackup_area F + _IO_fsetpos F + _IO_fsetpos64 F + _IO_ftell F + _IO_ftrylockfile F + _IO_funlockfile F + _IO_fwrite F + _IO_getc F + _IO_getline F + _IO_getline_info F + _IO_gets F + _IO_init F + _IO_init_marker F + _IO_init_wmarker F + _IO_iter_begin F + _IO_iter_end F + _IO_iter_file F + _IO_iter_next F + _IO_least_wmarker F + _IO_link_in F + _IO_list_all D 0x4 + _IO_list_lock F + _IO_list_resetlock F + _IO_list_unlock F + _IO_marker_delta F + _IO_marker_difference F + _IO_padn F + _IO_peekc_locked F + _IO_popen F + _IO_printf F + _IO_proc_close F + _IO_proc_open F + _IO_putc F + _IO_puts F + _IO_remove_marker F + _IO_seekmark F + _IO_seekoff F + _IO_seekpos F + _IO_seekwmark F + _IO_setb F + _IO_setbuffer F + _IO_setvbuf F + _IO_sgetn F + _IO_sprintf F + _IO_sputbackc F + _IO_sputbackwc F + _IO_sscanf F + _IO_str_init_readonly F + _IO_str_init_static F + _IO_str_overflow F + _IO_str_pbackfail F + _IO_str_seekoff F + _IO_str_underflow F + _IO_sungetc F + _IO_sungetwc F + _IO_switch_to_get_mode F + _IO_switch_to_main_wget_area F + _IO_switch_to_wbackup_area F + _IO_switch_to_wget_mode F + _IO_un_link F + _IO_ungetc F + _IO_unsave_markers F + _IO_unsave_wmarkers F + _IO_vfprintf F + _IO_vfscanf F + _IO_vsprintf F + _IO_wdefault_doallocate F + _IO_wdefault_finish F + _IO_wdefault_pbackfail F + _IO_wdefault_uflow F + _IO_wdefault_xsgetn F + _IO_wdefault_xsputn F + _IO_wdo_write F + _IO_wdoallocbuf F + _IO_wfile_jumps D 0x54 + _IO_wfile_overflow F + _IO_wfile_seekoff F + _IO_wfile_sync F + _IO_wfile_underflow F + _IO_wfile_xsputn F + _IO_wmarker_delta F + _IO_wsetb F + ___brk_addr D 0x4 + __adjtimex F + __after_morecore_hook D 0x4 + __argz_count F + __argz_next F + __argz_stringify F + __asprintf F + __asprintf_chk F + __assert F + __assert_fail F + __assert_perror_fail F + __backtrace F + __backtrace_symbols F + __backtrace_symbols_fd F + __bsd_getpgrp F + __bzero F + __check_rhosts_file D 0x4 + __chk_fail F + __clone F + __close F + __cmsg_nxthdr F + __confstr_chk F + __connect F + __ctype_b_loc F + __ctype_get_mb_cur_max F + __ctype_tolower_loc F + __ctype_toupper_loc F + __curbrk D 0x4 + __cxa_at_quick_exit F + __cxa_atexit F + __cxa_finalize F + __cyg_profile_func_enter F + __cyg_profile_func_exit F + __daylight D 0x4 + __dcgettext F + __default_morecore F + __dgettext F + __dprintf_chk F + __dup2 F + __duplocale F + __endmntent F + __environ D 0x4 + __errno_location F + __fbufsize F + __fcntl F + __ffs F + __fgets_chk F + __fgets_unlocked_chk F + __fgetws_chk F + __fgetws_unlocked_chk F + __finite F + __finitef F + __flbf F + __fork F + __fpending F + __fprintf_chk F + __fpu_control D 0x4 + __fpurge F + __fread_chk F + __fread_unlocked_chk F + __freadable F + __freading F + __free_hook D 0x4 + __freelocale F + __fsetlocking F + __fwprintf_chk F + __fwritable F + __fwriting F + __fxstat F + __fxstat64 F + __fxstatat F + __fxstatat64 F + __getcwd_chk F + __getdelim F + __getdomainname_chk F + __getgroups_chk F + __gethostname_chk F + __getlogin_r_chk F + __getmntent_r F + __getpagesize F + __getpgid F + __getpid F + __gets_chk F + __gettimeofday F + __getwd_chk F + __gmtime_r F + __h_errno_location F + __isalnum_l F + __isalpha_l F + __isascii_l F + __isblank_l F + __iscntrl_l F + __isctype F + __isdigit_l F + __isgraph_l F + __isinf F + __isinff F + __islower_l F + __isnan F + __isnanf F + __isoc99_fscanf F + __isoc99_fwscanf F + __isoc99_scanf F + __isoc99_sscanf F + __isoc99_swscanf F + __isoc99_vfscanf F + __isoc99_vfwscanf F + __isoc99_vscanf F + __isoc99_vsscanf F + __isoc99_vswscanf F + __isoc99_vwscanf F + __isoc99_wscanf F + __isprint_l F + __ispunct_l F + __isspace_l F + __isupper_l F + __iswalnum_l F + __iswalpha_l F + __iswblank_l F + __iswcntrl_l F + __iswctype F + __iswctype_l F + __iswdigit_l F + __iswgraph_l F + __iswlower_l F + __iswprint_l F + __iswpunct_l F + __iswspace_l F + __iswupper_l F + __iswxdigit_l F + __isxdigit_l F + __ivaliduser F + __key_decryptsession_pk_LOCAL D 0x4 + __key_encryptsession_pk_LOCAL D 0x4 + __key_gendes_LOCAL D 0x4 + __libc_allocate_rtsig F + __libc_calloc F + __libc_current_sigrtmax F + __libc_current_sigrtmin F + __libc_free F + __libc_freeres F + __libc_init_first F + __libc_mallinfo F + __libc_malloc F + __libc_mallopt F + __libc_memalign F + __libc_pvalloc F + __libc_realloc F + __libc_sa_len F + __libc_start_main F + __libc_valloc F + __longjmp_chk F + __lseek F + __lxstat F + __lxstat64 F + __malloc_hook D 0x4 + __malloc_initialize_hook D 0x4 + __mbrlen F + __mbrtowc F + __mbsnrtowcs_chk F + __mbsrtowcs_chk F + __mbstowcs_chk F + __mcount F + __memalign_hook D 0x4 + __memcpy_chk F + __memmove_chk F + __mempcpy F + __mempcpy_chk F + __mempcpy_small F + __memset_chk F + __monstartup F + __morecore D 0x4 + __nanosleep F + __newlocale F + __nl_langinfo_l F + __nss_configure_lookup F + __nss_database_lookup F + __nss_group_lookup F + __nss_hostname_digits_dots F + __nss_hosts_lookup F + __nss_next F + __nss_passwd_lookup F + __obstack_printf_chk F + __obstack_vprintf_chk F + __open F + __open64 F + __open64_2 F + __open_2 F + __openat64_2 F + __openat_2 F + __overflow F + __pipe F + __poll F + __posix_getopt F + __pread64 F + __pread64_chk F + __pread_chk F + __printf_chk F + __printf_fp F + __profile_frequency F + __progname D 0x4 + __progname_full D 0x4 + __ptsname_r_chk F + __pwrite64 F + __rawmemchr F + __rcmd_errstr D 0x4 + __read F + __read_chk F + __readlink_chk F + __readlinkat_chk F + __realloc_hook D 0x4 + __realpath_chk F + __recv_chk F + __recvfrom_chk F + __register_atfork F + __res_init F + __res_nclose F + __res_ninit F + __res_randomid F + __res_state F + __rpc_thread_createerr F + __rpc_thread_svc_fdset F + __rpc_thread_svc_max_pollfd F + __rpc_thread_svc_pollfd F + __sbrk F + __sched_cpualloc F + __sched_cpucount F + __sched_cpufree F + __sched_get_priority_max F + __sched_get_priority_min F + __sched_getparam F + __sched_getscheduler F + __sched_setscheduler F + __sched_yield F + __secure_getenv F + __select F + __setmntent F + __setpgid F + __sigaction F + __sigaddset F + __sigdelset F + __sigismember F + __signbit F + __signbitf F + __sigpause F + __sigsetjmp F + __sigsuspend F + __snprintf_chk F + __sprintf_chk F + __stack_chk_fail F + __statfs F + __stpcpy F + __stpcpy_chk F + __stpcpy_small F + __stpncpy F + __stpncpy_chk F + __strcasecmp F + __strcasecmp_l F + __strcasestr F + __strcat_chk F + __strcoll_l F + __strcpy_chk F + __strcpy_small F + __strcspn_c1 F + __strcspn_c2 F + __strcspn_c3 F + __strdup F + __strerror_r F + __strfmon_l F + __strftime_l F + __strncasecmp_l F + __strncat_chk F + __strncpy_chk F + __strndup F + __strpbrk_c2 F + __strpbrk_c3 F + __strsep_1c F + __strsep_2c F + __strsep_3c F + __strsep_g F + __strspn_c1 F + __strspn_c2 F + __strspn_c3 F + __strtod_internal F + __strtod_l F + __strtof_internal F + __strtof_l F + __strtok_r F + __strtok_r_1c F + __strtol_internal F + __strtol_l F + __strtold_internal F + __strtold_l F + __strtoll_internal F + __strtoll_l F + __strtoul_internal F + __strtoul_l F + __strtoull_internal F + __strtoull_l F + __strverscmp F + __strxfrm_l F + __swprintf_chk F + __sysconf F + __syslog_chk F + __sysv_signal F + __timezone D 0x4 + __toascii_l F + __tolower_l F + __toupper_l F + __towctrans F + __towctrans_l F + __towlower_l F + __towupper_l F + __ttyname_r_chk F + __tzname D 0x8 + __uflow F + __underflow F + __uselocale F + __vasprintf_chk F + __vdprintf_chk F + __vfork F + __vfprintf_chk F + __vfscanf F + __vfwprintf_chk F + __vprintf_chk F + __vsnprintf F + __vsnprintf_chk F + __vsprintf_chk F + __vsscanf F + __vswprintf_chk F + __vsyslog_chk F + __vwprintf_chk F + __wait F + __waitpid F + __wcpcpy_chk F + __wcpncpy_chk F + __wcrtomb_chk F + __wcscasecmp_l F + __wcscat_chk F + __wcscoll_l F + __wcscpy_chk F + __wcsftime_l F + __wcsncasecmp_l F + __wcsncat_chk F + __wcsncpy_chk F + __wcsnrtombs_chk F + __wcsrtombs_chk F + __wcstod_internal F + __wcstod_l F + __wcstof_internal F + __wcstof_l F + __wcstol_internal F + __wcstol_l F + __wcstold_internal F + __wcstold_l F + __wcstoll_internal F + __wcstoll_l F + __wcstombs_chk F + __wcstoul_internal F + __wcstoul_l F + __wcstoull_internal F + __wcstoull_l F + __wcsxfrm_l F + __wctomb_chk F + __wctrans_l F + __wctype_l F + __wmemcpy_chk F + __wmemmove_chk F + __wmempcpy_chk F + __wmemset_chk F + __woverflow F + __wprintf_chk F + __write F + __wuflow F + __wunderflow F + __xmknod F + __xmknodat F + __xpg_basename F + __xpg_sigpause F + __xpg_strerror_r F + __xstat F + __xstat64 F + _authenticate F + _dl_mcount_wrapper F + _dl_mcount_wrapper_check F + _environ D 0x4 + _exit F + _flush_cache F + _flushlbf F + _libc_intl_domainname D 0x5 + _longjmp F + _mcleanup F + _mcount F + _nl_default_dirname D 0x12 + _nl_domain_bindings D 0x4 + _nl_msg_cat_cntr D 0x4 + _null_auth D 0xc + _obstack_allocated_p F + _obstack_begin F + _obstack_begin_1 F + _obstack_free F + _obstack_memory_used F + _obstack_newchunk F + _res D 0x200 + _res_hconf D 0x30 + _rpc_dtablesize F + _seterr_reply F + _setjmp F + _sys_errlist D 0x21c + _sys_nerr D 0x4 + _sys_siglist D 0x104 + _tolower F + _toupper F + a64l F + abort F + abs F + accept F + accept4 F + access F + acct F + addmntent F + addseverity F + adjtime F + adjtimex F + advance F + alarm F + alphasort F + alphasort64 F + argp_err_exit_status D 0x4 + argp_error F + argp_failure F + argp_help F + argp_parse F + argp_program_bug_address D 0x4 + argp_program_version D 0x4 + argp_program_version_hook D 0x4 + argp_state_help F + argp_usage F + argz_add F + argz_add_sep F + argz_append F + argz_count F + argz_create F + argz_create_sep F + argz_delete F + argz_extract F + argz_insert F + argz_next F + argz_replace F + argz_stringify F + asctime F + asctime_r F + asprintf F + atof F + atoi F + atol F + atoll F + authdes_create F + authdes_getucred F + authdes_pk_create F + authnone_create F + authunix_create F + authunix_create_default F + backtrace F + backtrace_symbols F + backtrace_symbols_fd F + basename F + bcmp F + bcopy F + bdflush F + bind F + bind_textdomain_codeset F + bindresvport F + bindtextdomain F + brk F + bsd_signal F + bsearch F + btowc F + bzero F + cacheflush F + calloc F + callrpc F + canonicalize_file_name F + capget F + capset F + catclose F + catgets F + catopen F + cbc_crypt F + cfgetispeed F + cfgetospeed F + cfmakeraw F + cfree F + cfsetispeed F + cfsetospeed F + cfsetspeed F + chdir F + chflags F + chmod F + chown F + chroot F + clearenv F + clearerr F + clearerr_unlocked F + clnt_broadcast F + clnt_create F + clnt_pcreateerror F + clnt_perrno F + clnt_perror F + clnt_spcreateerror F + clnt_sperrno F + clnt_sperror F + clntraw_create F + clnttcp_create F + clntudp_bufcreate F + clntudp_create F + clntunix_create F + clock F + clone F + close F + closedir F + closelog F + confstr F + connect F + copysign F + copysignf F + copysignl F + creat F + creat64 F + create_module F + ctermid F + ctime F + ctime_r F + cuserid F + daemon F + daylight D 0x4 + dcgettext F + dcngettext F + delete_module F + des_setparity F + dgettext F + difftime F + dirfd F + dirname F + div F + dl_iterate_phdr F + dngettext F + dprintf F + drand48 F + drand48_r F + dup F + dup2 F + dup3 F + duplocale F + dysize F + eaccess F + ecb_crypt F + ecvt F + ecvt_r F + endaliasent F + endfsent F + endgrent F + endhostent F + endmntent F + endnetent F + endnetgrent F + endprotoent F + endpwent F + endrpcent F + endservent F + endsgent F + endspent F + endttyent F + endusershell F + endutent F + endutxent F + environ D 0x4 + envz_add F + envz_entry F + envz_get F + envz_merge F + envz_remove F + envz_strip F + epoll_create F + epoll_create1 F + epoll_ctl F + epoll_pwait F + epoll_wait F + erand48 F + erand48_r F + err F + error F + error_at_line F + error_message_count D 0x4 + error_one_per_line D 0x4 + error_print_progname D 0x4 + errx F + ether_aton F + ether_aton_r F + ether_hostton F + ether_line F + ether_ntoa F + ether_ntoa_r F + ether_ntohost F + euidaccess F + eventfd F + eventfd_read F + eventfd_write F + execl F + execle F + execlp F + execv F + execve F + execvp F + execvpe F + exit F + faccessat F + fallocate F + fallocate64 F + fattach F + fchdir F + fchflags F + fchmod F + fchmodat F + fchown F + fchownat F + fclose F + fcloseall F + fcntl F + fcvt F + fcvt_r F + fdatasync F + fdetach F + fdopen F + fdopendir F + feof F + feof_unlocked F + ferror F + ferror_unlocked F + fexecve F + fflush F + fflush_unlocked F + ffs F + ffsl F + ffsll F + fgetc F + fgetc_unlocked F + fgetgrent F + fgetgrent_r F + fgetpos F + fgetpos64 F + fgetpwent F + fgetpwent_r F + fgets F + fgets_unlocked F + fgetsgent F + fgetsgent_r F + fgetspent F + fgetspent_r F + fgetwc F + fgetwc_unlocked F + fgetws F + fgetws_unlocked F + fgetxattr F + fileno F + fileno_unlocked F + finite F + finitef F + finitel F + flistxattr F + flock F + flockfile F + fmemopen F + fmtmsg F + fnmatch F + fopen F + fopen64 F + fopencookie F + fork F + fpathconf F + fprintf F + fputc F + fputc_unlocked F + fputs F + fputs_unlocked F + fputwc F + fputwc_unlocked F + fputws F + fputws_unlocked F + fread F + fread_unlocked F + free F + freeaddrinfo F + freeifaddrs F + freelocale F + fremovexattr F + freopen F + freopen64 F + frexp F + frexpf F + frexpl F + fscanf F + fseek F + fseeko F + fseeko64 F + fsetpos F + fsetpos64 F + fsetxattr F + fstatfs F + fstatfs64 F + fstatvfs F + fstatvfs64 F + fsync F + ftell F + ftello F + ftello64 F + ftime F + ftok F + ftruncate F + ftruncate64 F + ftrylockfile F + fts_children F + fts_close F + fts_open F + fts_read F + fts_set F + ftw F + ftw64 F + funlockfile F + futimens F + futimes F + futimesat F + fwide F + fwprintf F + fwrite F + fwrite_unlocked F + fwscanf F + gai_strerror F + gcvt F + get_avphys_pages F + get_current_dir_name F + get_kernel_syms F + get_myaddress F + get_nprocs F + get_nprocs_conf F + get_phys_pages F + getaddrinfo F + getaliasbyname F + getaliasbyname_r F + getaliasent F + getaliasent_r F + getc F + getc_unlocked F + getchar F + getchar_unlocked F + getcontext F + getcwd F + getdate F + getdate_err D 0x4 + getdate_r F + getdelim F + getdirentries F + getdirentries64 F + getdomainname F + getdtablesize F + getegid F + getenv F + geteuid F + getfsent F + getfsfile F + getfsspec F + getgid F + getgrent F + getgrent_r F + getgrgid F + getgrgid_r F + getgrnam F + getgrnam_r F + getgrouplist F + getgroups F + gethostbyaddr F + gethostbyaddr_r F + gethostbyname F + gethostbyname2 F + gethostbyname2_r F + gethostbyname_r F + gethostent F + gethostent_r F + gethostid F + gethostname F + getifaddrs F + getipv4sourcefilter F + getitimer F + getline F + getloadavg F + getlogin F + getlogin_r F + getmntent F + getmntent_r F + getmsg F + getnameinfo F + getnetbyaddr F + getnetbyaddr_r F + getnetbyname F + getnetbyname_r F + getnetent F + getnetent_r F + getnetgrent F + getnetgrent_r F + getnetname F + getopt F + getopt_long F + getopt_long_only F + getpagesize F + getpass F + getpeername F + getpgid F + getpgrp F + getpid F + getpmsg F + getppid F + getpriority F + getprotobyname F + getprotobyname_r F + getprotobynumber F + getprotobynumber_r F + getprotoent F + getprotoent_r F + getpt F + getpublickey F + getpw F + getpwent F + getpwent_r F + getpwnam F + getpwnam_r F + getpwuid F + getpwuid_r F + getresgid F + getresuid F + getrlimit F + getrlimit64 F + getrpcbyname F + getrpcbyname_r F + getrpcbynumber F + getrpcbynumber_r F + getrpcent F + getrpcent_r F + getrpcport F + getrusage F + gets F + getsecretkey F + getservbyname F + getservbyname_r F + getservbyport F + getservbyport_r F + getservent F + getservent_r F + getsgent F + getsgent_r F + getsgnam F + getsgnam_r F + getsid F + getsockname F + getsockopt F + getsourcefilter F + getspent F + getspent_r F + getspnam F + getspnam_r F + getsubopt F + gettext F + gettimeofday F + getttyent F + getttynam F + getuid F + getusershell F + getutent F + getutent_r F + getutid F + getutid_r F + getutline F + getutline_r F + getutmp F + getutmpx F + getutxent F + getutxid F + getutxline F + getw F + getwc F + getwc_unlocked F + getwchar F + getwchar_unlocked F + getwd F + getxattr F + glob F + glob64 F + glob_pattern_p F + globfree F + globfree64 F + gmtime F + gmtime_r F + gnu_dev_major F + gnu_dev_makedev F + gnu_dev_minor F + gnu_get_libc_release F + gnu_get_libc_version F + grantpt F + group_member F + gsignal F + gtty F + h_errlist D 0x14 + h_nerr D 0x4 + hasmntopt F + hcreate F + hcreate_r F + hdestroy F + hdestroy_r F + herror F + host2netname F + hsearch F + hsearch_r F + hstrerror F + htonl F + htons F + iconv F + iconv_close F + iconv_open F + if_freenameindex F + if_indextoname F + if_nameindex F + if_nametoindex F + imaxabs F + imaxdiv F + in6addr_any D 0x10 + in6addr_loopback D 0x10 + index F + inet6_opt_append F + inet6_opt_find F + inet6_opt_finish F + inet6_opt_get_val F + inet6_opt_init F + inet6_opt_next F + inet6_opt_set_val F + inet6_option_alloc F + inet6_option_append F + inet6_option_find F + inet6_option_init F + inet6_option_next F + inet6_option_space F + inet6_rth_add F + inet6_rth_getaddr F + inet6_rth_init F + inet6_rth_reverse F + inet6_rth_segments F + inet6_rth_space F + inet_addr F + inet_aton F + inet_lnaof F + inet_makeaddr F + inet_netof F + inet_network F + inet_nsap_addr F + inet_nsap_ntoa F + inet_ntoa F + inet_ntop F + inet_pton F + init_module F + initgroups F + initstate F + initstate_r F + innetgr F + inotify_add_watch F + inotify_init F + inotify_init1 F + inotify_rm_watch F + insque F + ioctl F + iruserok F + iruserok_af F + isalnum F + isalnum_l F + isalpha F + isalpha_l F + isascii F + isastream F + isatty F + isblank F + isblank_l F + iscntrl F + iscntrl_l F + isctype F + isdigit F + isdigit_l F + isfdtype F + isgraph F + isgraph_l F + isinf F + isinff F + isinfl F + islower F + islower_l F + isnan F + isnanf F + isnanl F + isprint F + isprint_l F + ispunct F + ispunct_l F + isspace F + isspace_l F + isupper F + isupper_l F + iswalnum F + iswalnum_l F + iswalpha F + iswalpha_l F + iswblank F + iswblank_l F + iswcntrl F + iswcntrl_l F + iswctype F + iswctype_l F + iswdigit F + iswdigit_l F + iswgraph F + iswgraph_l F + iswlower F + iswlower_l F + iswprint F + iswprint_l F + iswpunct F + iswpunct_l F + iswspace F + iswspace_l F + iswupper F + iswupper_l F + iswxdigit F + iswxdigit_l F + isxdigit F + isxdigit_l F + jrand48 F + jrand48_r F + key_decryptsession F + key_decryptsession_pk F + key_encryptsession F + key_encryptsession_pk F + key_gendes F + key_get_conv F + key_secretkey_is_set F + key_setnet F + key_setsecret F + kill F + killpg F + klogctl F + l64a F + labs F + lchmod F + lchown F + lckpwdf F + lcong48 F + lcong48_r F + ldexp F + ldexpf F + ldexpl F + ldiv F + lfind F + lgetxattr F + link F + linkat F + listen F + listxattr F + llabs F + lldiv F + llistxattr F + llseek F + loc1 D 0x4 + loc2 D 0x4 + localeconv F + localtime F + localtime_r F + lockf F + lockf64 F + locs D 0x4 + longjmp F + lrand48 F + lrand48_r F + lremovexattr F + lsearch F + lseek F + lseek64 F + lsetxattr F + lutimes F + madvise F + makecontext F + mallinfo F + malloc F + malloc_get_state F + malloc_info F + malloc_set_state F + malloc_stats F + malloc_trim F + malloc_usable_size F + mallopt F + mallwatch D 0x4 + mblen F + mbrlen F + mbrtowc F + mbsinit F + mbsnrtowcs F + mbsrtowcs F + mbstowcs F + mbtowc F + mcheck F + mcheck_check_all F + mcheck_pedantic F + mcount F + memalign F + memccpy F + memchr F + memcmp F + memcpy F + memfrob F + memmem F + memmove F + mempcpy F + memrchr F + memset F + mincore F + mkdir F + mkdirat F + mkdtemp F + mkfifo F + mkfifoat F + mkostemp F + mkostemp64 F + mkostemps F + mkostemps64 F + mkstemp F + mkstemp64 F + mkstemps F + mkstemps64 F + mktemp F + mktime F + mlock F + mlockall F + mmap F + mmap64 F + modf F + modff F + modfl F + moncontrol F + monstartup F + mount F + mprobe F + mprotect F + mrand48 F + mrand48_r F + mremap F + msgctl F + msgget F + msgrcv F + msgsnd F + msync F + mtrace F + munlock F + munlockall F + munmap F + muntrace F + nanosleep F + netname2host F + netname2user F + newlocale F + nfsservctl F + nftw F + nftw64 F + ngettext F + nice F + nl_langinfo F + nl_langinfo_l F + nrand48 F + nrand48_r F + ntohl F + ntohs F + ntp_adjtime F + ntp_gettime F + ntp_gettimex F + obstack_alloc_failed_handler D 0x4 + obstack_exit_failure D 0x4 + obstack_free F + obstack_printf F + obstack_vprintf F + on_exit F + open F + open64 F + open_memstream F + open_wmemstream F + openat F + openat64 F + opendir F + openlog F + optarg D 0x4 + opterr D 0x4 + optind D 0x4 + optopt D 0x4 + parse_printf_format F + passwd2des F + pathconf F + pause F + pclose F + perror F + personality F + pipe F + pipe2 F + pivot_root F + pmap_getmaps F + pmap_getport F + pmap_rmtcall F + pmap_set F + pmap_unset F + poll F + popen F + posix_fadvise F + posix_fadvise64 F + posix_fallocate F + posix_fallocate64 F + posix_madvise F + posix_memalign F + posix_openpt F + posix_spawn F + posix_spawn_file_actions_addclose F + posix_spawn_file_actions_adddup2 F + posix_spawn_file_actions_addopen F + posix_spawn_file_actions_destroy F + posix_spawn_file_actions_init F + posix_spawnattr_destroy F + posix_spawnattr_getflags F + posix_spawnattr_getpgroup F + posix_spawnattr_getschedparam F + posix_spawnattr_getschedpolicy F + posix_spawnattr_getsigdefault F + posix_spawnattr_getsigmask F + posix_spawnattr_init F + posix_spawnattr_setflags F + posix_spawnattr_setpgroup F + posix_spawnattr_setschedparam F + posix_spawnattr_setschedpolicy F + posix_spawnattr_setsigdefault F + posix_spawnattr_setsigmask F + posix_spawnp F + ppoll F + prctl F + pread F + pread64 F + preadv F + preadv64 F + printf F + printf_size F + printf_size_info F + profil F + program_invocation_name D 0x4 + program_invocation_short_name D 0x4 + pselect F + psiginfo F + psignal F + pthread_attr_destroy F + pthread_attr_getdetachstate F + pthread_attr_getinheritsched F + pthread_attr_getschedparam F + pthread_attr_getschedpolicy F + pthread_attr_getscope F + pthread_attr_init F + pthread_attr_setdetachstate F + pthread_attr_setinheritsched F + pthread_attr_setschedparam F + pthread_attr_setschedpolicy F + pthread_attr_setscope F + pthread_cond_broadcast F + pthread_cond_destroy F + pthread_cond_init F + pthread_cond_signal F + pthread_cond_timedwait F + pthread_cond_wait F + pthread_condattr_destroy F + pthread_condattr_init F + pthread_equal F + pthread_exit F + pthread_getschedparam F + pthread_mutex_destroy F + pthread_mutex_init F + pthread_mutex_lock F + pthread_mutex_unlock F + pthread_self F + pthread_setcancelstate F + pthread_setcanceltype F + pthread_setschedparam F + ptrace F + ptsname F + ptsname_r F + putc F + putc_unlocked F + putchar F + putchar_unlocked F + putenv F + putgrent F + putmsg F + putpmsg F + putpwent F + puts F + putsgent F + putspent F + pututline F + pututxline F + putw F + putwc F + putwc_unlocked F + putwchar F + putwchar_unlocked F + pvalloc F + pwrite F + pwrite64 F + pwritev F + pwritev64 F + qecvt F + qecvt_r F + qfcvt F + qfcvt_r F + qgcvt F + qsort F + qsort_r F + query_module F + quick_exit F + quotactl F + raise F + rand F + rand_r F + random F + random_r F + rawmemchr F + rcmd F + rcmd_af F + re_comp F + re_compile_fastmap F + re_compile_pattern F + re_exec F + re_match F + re_match_2 F + re_search F + re_search_2 F + re_set_registers F + re_set_syntax F + re_syntax_options D 0x4 + read F + readahead F + readdir F + readdir64 F + readdir64_r F + readdir_r F + readlink F + readlinkat F + readv F + realloc F + realpath F + reboot F + recv F + recvfrom F + recvmmsg F + recvmsg F + regcomp F + regerror F + regexec F + regfree F + register_printf_function F + register_printf_modifier F + register_printf_specifier F + register_printf_type F + registerrpc F + remap_file_pages F + remove F + removexattr F + remque F + rename F + renameat F + revoke F + rewind F + rewinddir F + rexec F + rexec_af F + rexecoptions D 0x4 + rindex F + rmdir F + rpc_createerr D 0x10 + rpmatch F + rresvport F + rresvport_af F + rtime F + ruserok F + ruserok_af F + ruserpass F + sbrk F + scalbn F + scalbnf F + scalbnl F + scandir F + scandir64 F + scanf F + sched_get_priority_max F + sched_get_priority_min F + sched_getaffinity F + sched_getcpu F + sched_getparam F + sched_getscheduler F + sched_rr_get_interval F + sched_setaffinity F + sched_setparam F + sched_setscheduler F + sched_yield F + seed48 F + seed48_r F + seekdir F + select F + semctl F + semget F + semop F + semtimedop F + send F + sendfile F + sendfile64 F + sendmsg F + sendto F + set_dataplane F + setaliasent F + setbuf F + setbuffer F + setcontext F + setdomainname F + setegid F + setenv F + seteuid F + setfsent F + setfsgid F + setfsuid F + setgid F + setgrent F + setgroups F + sethostent F + sethostid F + sethostname F + setipv4sourcefilter F + setitimer F + setjmp F + setlinebuf F + setlocale F + setlogin F + setlogmask F + setmntent F + setnetent F + setnetgrent F + setpgid F + setpgrp F + setpriority F + setprotoent F + setpwent F + setregid F + setresgid F + setresuid F + setreuid F + setrlimit F + setrlimit64 F + setrpcent F + setservent F + setsgent F + setsid F + setsockopt F + setsourcefilter F + setspent F + setstate F + setstate_r F + settimeofday F + setttyent F + setuid F + setusershell F + setutent F + setutxent F + setvbuf F + setxattr F + sgetsgent F + sgetsgent_r F + sgetspent F + sgetspent_r F + shmat F + shmctl F + shmdt F + shmget F + shutdown F + sigaction F + sigaddset F + sigaltstack F + sigandset F + sigblock F + sigdelset F + sigemptyset F + sigfillset F + siggetmask F + sighold F + sigignore F + siginterrupt F + sigisemptyset F + sigismember F + siglongjmp F + signal F + signalfd F + sigorset F + sigpause F + sigpending F + sigprocmask F + sigqueue F + sigrelse F + sigreturn F + sigset F + sigsetmask F + sigstack F + sigsuspend F + sigtimedwait F + sigvec F + sigwait F + sigwaitinfo F + sleep F + snprintf F + sockatmark F + socket F + socketpair F + splice F + sprintf F + sprofil F + srand F + srand48 F + srand48_r F + srandom F + srandom_r F + sscanf F + ssignal F + sstk F + statfs F + statfs64 F + statvfs F + statvfs64 F + stderr D 0x4 + stdin D 0x4 + stdout D 0x4 + step F + stime F + stpcpy F + stpncpy F + strcasecmp F + strcasecmp_l F + strcasestr F + strcat F + strchr F + strchrnul F + strcmp F + strcoll F + strcoll_l F + strcpy F + strcspn F + strdup F + strerror F + strerror_l F + strerror_r F + strfmon F + strfmon_l F + strfry F + strftime F + strftime_l F + strlen F + strncasecmp F + strncasecmp_l F + strncat F + strncmp F + strncpy F + strndup F + strnlen F + strpbrk F + strptime F + strptime_l F + strrchr F + strsep F + strsignal F + strspn F + strstr F + strtod F + strtod_l F + strtof F + strtof_l F + strtoimax F + strtok F + strtok_r F + strtol F + strtol_l F + strtold F + strtold_l F + strtoll F + strtoll_l F + strtoq F + strtoul F + strtoul_l F + strtoull F + strtoull_l F + strtoumax F + strtouq F + strverscmp F + strxfrm F + strxfrm_l F + stty F + svc_exit F + svc_fdset D 0x80 + svc_getreq F + svc_getreq_common F + svc_getreq_poll F + svc_getreqset F + svc_max_pollfd D 0x4 + svc_pollfd D 0x4 + svc_register F + svc_run F + svc_sendreply F + svc_unregister F + svcauthdes_stats D 0xc + svcerr_auth F + svcerr_decode F + svcerr_noproc F + svcerr_noprog F + svcerr_progvers F + svcerr_systemerr F + svcerr_weakauth F + svcfd_create F + svcraw_create F + svctcp_create F + svcudp_bufcreate F + svcudp_create F + svcudp_enablecache F + svcunix_create F + svcunixfd_create F + swab F + swapcontext F + swapoff F + swapon F + swprintf F + swscanf F + symlink F + symlinkat F + sync F + sync_file_range F + sys_errlist D 0x21c + sys_nerr D 0x4 + sys_sigabbrev D 0x104 + sys_siglist D 0x104 + syscall F + sysconf F + sysctl F + sysinfo F + syslog F + system F + sysv_signal F + tcdrain F + tcflow F + tcflush F + tcgetattr F + tcgetpgrp F + tcgetsid F + tcsendbreak F + tcsetattr F + tcsetpgrp F + tdelete F + tdestroy F + tee F + telldir F + tempnam F + textdomain F + tfind F + time F + timegm F + timelocal F + timerfd_create F + timerfd_gettime F + timerfd_settime F + times F + timezone D 0x4 + tmpfile F + tmpfile64 F + tmpnam F + tmpnam_r F + toascii F + tolower F + tolower_l F + toupper F + toupper_l F + towctrans F + towctrans_l F + towlower F + towlower_l F + towupper F + towupper_l F + tr_break F + truncate F + truncate64 F + tsearch F + ttyname F + ttyname_r F + ttyslot F + twalk F + tzname D 0x8 + tzset F + ualarm F + ulckpwdf F + ulimit F + umask F + umount F + umount2 F + uname F + ungetc F + ungetwc F + unlink F + unlinkat F + unlockpt F + unsetenv F + unshare F + updwtmp F + updwtmpx F + uselib F + uselocale F + user2netname F + usleep F + ustat F + utime F + utimensat F + utimes F + utmpname F + utmpxname F + valloc F + vasprintf F + vdprintf F + verr F + verrx F + versionsort F + versionsort64 F + vfork F + vfprintf F + vfscanf F + vfwprintf F + vfwscanf F + vhangup F + vlimit F + vmsplice F + vprintf F + vscanf F + vsnprintf F + vsprintf F + vsscanf F + vswprintf F + vswscanf F + vsyslog F + vtimes F + vwarn F + vwarnx F + vwprintf F + vwscanf F + wait F + wait3 F + wait4 F + waitid F + waitpid F + warn F + warnx F + wcpcpy F + wcpncpy F + wcrtomb F + wcscasecmp F + wcscasecmp_l F + wcscat F + wcschr F + wcschrnul F + wcscmp F + wcscoll F + wcscoll_l F + wcscpy F + wcscspn F + wcsdup F + wcsftime F + wcsftime_l F + wcslen F + wcsncasecmp F + wcsncasecmp_l F + wcsncat F + wcsncmp F + wcsncpy F + wcsnlen F + wcsnrtombs F + wcspbrk F + wcsrchr F + wcsrtombs F + wcsspn F + wcsstr F + wcstod F + wcstod_l F + wcstof F + wcstof_l F + wcstoimax F + wcstok F + wcstol F + wcstol_l F + wcstold F + wcstold_l F + wcstoll F + wcstoll_l F + wcstombs F + wcstoq F + wcstoul F + wcstoul_l F + wcstoull F + wcstoull_l F + wcstoumax F + wcstouq F + wcswcs F + wcswidth F + wcsxfrm F + wcsxfrm_l F + wctob F + wctomb F + wctrans F + wctrans_l F + wctype F + wctype_l F + wcwidth F + wmemchr F + wmemcmp F + wmemcpy F + wmemmove F + wmempcpy F + wmemset F + wordexp F + wordfree F + wprintf F + write F + writev F + wscanf F + xdecrypt F + xdr_accepted_reply F + xdr_array F + xdr_authdes_cred F + xdr_authdes_verf F + xdr_authunix_parms F + xdr_bool F + xdr_bytes F + xdr_callhdr F + xdr_callmsg F + xdr_char F + xdr_cryptkeyarg F + xdr_cryptkeyarg2 F + xdr_cryptkeyres F + xdr_des_block F + xdr_double F + xdr_enum F + xdr_float F + xdr_free F + xdr_getcredres F + xdr_hyper F + xdr_int F + xdr_int16_t F + xdr_int32_t F + xdr_int64_t F + xdr_int8_t F + xdr_key_netstarg F + xdr_key_netstres F + xdr_keybuf F + xdr_keystatus F + xdr_long F + xdr_longlong_t F + xdr_netnamestr F + xdr_netobj F + xdr_opaque F + xdr_opaque_auth F + xdr_pmap F + xdr_pmaplist F + xdr_pointer F + xdr_quad_t F + xdr_reference F + xdr_rejected_reply F + xdr_replymsg F + xdr_rmtcall_args F + xdr_rmtcallres F + xdr_short F + xdr_sizeof F + xdr_string F + xdr_u_char F + xdr_u_hyper F + xdr_u_int F + xdr_u_long F + xdr_u_longlong_t F + xdr_u_quad_t F + xdr_u_short F + xdr_uint16_t F + xdr_uint32_t F + xdr_uint64_t F + xdr_uint8_t F + xdr_union F + xdr_unixcred F + xdr_vector F + xdr_void F + xdr_wrapstring F + xdrmem_create F + xdrrec_create F + xdrrec_endofrecord F + xdrrec_eof F + xdrrec_skiprecord F + xdrstdio_create F + xencrypt F + xprt_register F + xprt_unregister F +GLIBC_2.15 + GLIBC_2.15 A + __fdelt_chk F + __fdelt_warn F + clock_adjtime F + fanotify_init F + fanotify_mark F + name_to_handle_at F + open_by_handle_at F + posix_spawn F + posix_spawnp F + prlimit F + prlimit64 F + process_vm_readv F + process_vm_writev F + scandirat F + scandirat64 F + sendmmsg F + setns F + syncfs F +GLIBC_2.16 + GLIBC_2.16 A + __poll_chk F + __ppoll_chk F + aligned_alloc F + c16rtomb F + c32rtomb F + mbrtoc16 F + mbrtoc32 F + timespec_get F diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libcrypt.abilist b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libcrypt.abilist new file mode 100644 index 0000000000..608e5df0b1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libcrypt.abilist @@ -0,0 +1,9 @@ +GLIBC_2.12 + GLIBC_2.12 A + crypt F + crypt_r F + encrypt F + encrypt_r F + fcrypt F + setkey F + setkey_r F diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libdl.abilist b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libdl.abilist new file mode 100644 index 0000000000..27a72281b7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libdl.abilist @@ -0,0 +1,11 @@ +GLIBC_2.12 + GLIBC_2.12 A + dladdr F + dladdr1 F + dlclose F + dlerror F + dlinfo F + dlmopen F + dlopen F + dlsym F + dlvsym F diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libm.abilist b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libm.abilist new file mode 100644 index 0000000000..ab2a40f202 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libm.abilist @@ -0,0 +1,368 @@ +GLIBC_2.12 + GLIBC_2.12 A + _LIB_VERSION D 0x4 + __clog10 F + __clog10f F + __clog10l F + __finite F + __finitef F + __fpclassify F + __fpclassifyf F + __signbit F + __signbitf F + acos F + acosf F + acosh F + acoshf F + acoshl F + acosl F + asin F + asinf F + asinh F + asinhf F + asinhl F + asinl F + atan F + atan2 F + atan2f F + atan2l F + atanf F + atanh F + atanhf F + atanhl F + atanl F + cabs F + cabsf F + cabsl F + cacos F + cacosf F + cacosh F + cacoshf F + cacoshl F + cacosl F + carg F + cargf F + cargl F + casin F + casinf F + casinh F + casinhf F + casinhl F + casinl F + catan F + catanf F + catanh F + catanhf F + catanhl F + catanl F + cbrt F + cbrtf F + cbrtl F + ccos F + ccosf F + ccosh F + ccoshf F + ccoshl F + ccosl F + ceil F + ceilf F + ceill F + cexp F + cexpf F + cexpl F + cimag F + cimagf F + cimagl F + clog F + clog10 F + clog10f F + clog10l F + clogf F + clogl F + conj F + conjf F + conjl F + copysign F + copysignf F + copysignl F + cos F + cosf F + cosh F + coshf F + coshl F + cosl F + cpow F + cpowf F + cpowl F + cproj F + cprojf F + cprojl F + creal F + crealf F + creall F + csin F + csinf F + csinh F + csinhf F + csinhl F + csinl F + csqrt F + csqrtf F + csqrtl F + ctan F + ctanf F + ctanh F + ctanhf F + ctanhl F + ctanl F + drem F + dremf F + dreml F + erf F + erfc F + erfcf F + erfcl F + erff F + erfl F + exp F + exp10 F + exp10f F + exp10l F + exp2 F + exp2f F + exp2l F + expf F + expl F + expm1 F + expm1f F + expm1l F + fabs F + fabsf F + fabsl F + fdim F + fdimf F + fdiml F + feclearexcept F + fedisableexcept F + feenableexcept F + fegetexcept F + fegetexceptflag F + fegetround F + feholdexcept F + feraiseexcept F + fesetenv F + fesetexceptflag F + fesetround F + fetestexcept F + feupdateenv F + finite F + finitef F + finitel F + floor F + floorf F + floorl F + fma F + fmaf F + fmal F + fmax F + fmaxf F + fmaxl F + fmin F + fminf F + fminl F + fmod F + fmodf F + fmodl F + frexp F + frexpf F + frexpl F + gamma F + gammaf F + gammal F + hypot F + hypotf F + hypotl F + ilogb F + ilogbf F + ilogbl F + j0 F + j0f F + j0l F + j1 F + j1f F + j1l F + jn F + jnf F + jnl F + ldexp F + ldexpf F + ldexpl F + lgamma F + lgamma_r F + lgammaf F + lgammaf_r F + lgammal F + lgammal_r F + llrint F + llrintf F + llrintl F + llround F + llroundf F + llroundl F + log F + log10 F + log10f F + log10l F + log1p F + log1pf F + log1pl F + log2 F + log2f F + log2l F + logb F + logbf F + logbl F + logf F + logl F + lrint F + lrintf F + lrintl F + lround F + lroundf F + lroundl F + matherr F + modf F + modff F + modfl F + nan F + nanf F + nanl F + nearbyint F + nearbyintf F + nearbyintl F + nextafter F + nextafterf F + nextafterl F + nexttoward F + nexttowardf F + nexttowardl F + pow F + pow10 F + pow10f F + pow10l F + powf F + powl F + remainder F + remainderf F + remainderl F + remquo F + remquof F + remquol F + rint F + rintf F + rintl F + round F + roundf F + roundl F + scalb F + scalbf F + scalbl F + scalbln F + scalblnf F + scalblnl F + scalbn F + scalbnf F + scalbnl F + signgam D 0x4 + significand F + significandf F + significandl F + sin F + sincos F + sincosf F + sincosl F + sinf F + sinh F + sinhf F + sinhl F + sinl F + sqrt F + sqrtf F + sqrtl F + tan F + tanf F + tanh F + tanhf F + tanhl F + tanl F + tgamma F + tgammaf F + tgammal F + trunc F + truncf F + truncl F + y0 F + y0f F + y0l F + y1 F + y1f F + y1l F + yn F + ynf F + ynl F +GLIBC_2.15 + GLIBC_2.15 A + __acos_finite F + __acosf_finite F + __acosh_finite F + __acoshf_finite F + __asin_finite F + __asinf_finite F + __atan2_finite F + __atan2f_finite F + __atanh_finite F + __atanhf_finite F + __cosh_finite F + __coshf_finite F + __exp10_finite F + __exp10f_finite F + __exp2_finite F + __exp2f_finite F + __exp_finite F + __expf_finite F + __fmod_finite F + __fmodf_finite F + __gamma_r_finite F + __gammaf_r_finite F + __hypot_finite F + __hypotf_finite F + __j0_finite F + __j0f_finite F + __j1_finite F + __j1f_finite F + __jn_finite F + __jnf_finite F + __lgamma_r_finite F + __lgammaf_r_finite F + __log10_finite F + __log10f_finite F + __log2_finite F + __log2f_finite F + __log_finite F + __logf_finite F + __pow_finite F + __powf_finite F + __remainder_finite F + __remainderf_finite F + __scalb_finite F + __scalbf_finite F + __sinh_finite F + __sinhf_finite F + __sqrt_finite F + __sqrtf_finite F + __y0_finite F + __y0f_finite F + __y1_finite F + __y1f_finite F + __yn_finite F + __ynf_finite F diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libnsl.abilist b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libnsl.abilist new file mode 100644 index 0000000000..e4217934c8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libnsl.abilist @@ -0,0 +1,123 @@ +GLIBC_2.12 + GLIBC_2.12 A + __free_fdresult F + __nis_default_access F + __nis_default_group F + __nis_default_owner F + __nis_default_ttl F + __nis_finddirectory F + __nis_hash F + __nisbind_connect F + __nisbind_create F + __nisbind_destroy F + __nisbind_next F + __yp_check F + nis_add F + nis_add_entry F + nis_addmember F + nis_checkpoint F + nis_clone_directory F + nis_clone_object F + nis_clone_result F + nis_creategroup F + nis_destroy_object F + nis_destroygroup F + nis_dir_cmp F + nis_domain_of F + nis_domain_of_r F + nis_first_entry F + nis_free_directory F + nis_free_object F + nis_free_request F + nis_freenames F + nis_freeresult F + nis_freeservlist F + nis_freetags F + nis_getnames F + nis_getservlist F + nis_ismember F + nis_leaf_of F + nis_leaf_of_r F + nis_lerror F + nis_list F + nis_local_directory F + nis_local_group F + nis_local_host F + nis_local_principal F + nis_lookup F + nis_mkdir F + nis_modify F + nis_modify_entry F + nis_name_of F + nis_name_of_r F + nis_next_entry F + nis_perror F + nis_ping F + nis_print_directory F + nis_print_entry F + nis_print_group F + nis_print_group_entry F + nis_print_link F + nis_print_object F + nis_print_result F + nis_print_rights F + nis_print_table F + nis_read_obj F + nis_remove F + nis_remove_entry F + nis_removemember F + nis_rmdir F + nis_servstate F + nis_sperrno F + nis_sperror F + nis_sperror_r F + nis_stats F + nis_verifygroup F + nis_write_obj F + readColdStartFile F + writeColdStartFile F + xdr_cback_data F + xdr_domainname F + xdr_keydat F + xdr_mapname F + xdr_obj_p F + xdr_peername F + xdr_valdat F + xdr_yp_buf F + xdr_ypall F + xdr_ypbind_binding F + xdr_ypbind_resp F + xdr_ypbind_resptype F + xdr_ypbind_setdom F + xdr_ypdelete_args F + xdr_ypmap_parms F + xdr_ypmaplist F + xdr_yppush_status F + xdr_yppushresp_xfr F + xdr_ypreq_key F + xdr_ypreq_nokey F + xdr_ypreq_xfr F + xdr_ypresp_all F + xdr_ypresp_key_val F + xdr_ypresp_maplist F + xdr_ypresp_master F + xdr_ypresp_order F + xdr_ypresp_val F + xdr_ypresp_xfr F + xdr_ypstat F + xdr_ypupdate_args F + xdr_ypxfrstat F + yp_all F + yp_bind F + yp_first F + yp_get_default_domain F + yp_maplist F + yp_master F + yp_match F + yp_next F + yp_order F + yp_unbind F + yp_update F + ypbinderr_string F + yperr_string F + ypprot_err F diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libpthread.abilist b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libpthread.abilist new file mode 100644 index 0000000000..3ab004605a --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libpthread.abilist @@ -0,0 +1,225 @@ +GLIBC_2.12 + GLIBC_2.12 A + _IO_flockfile F + _IO_ftrylockfile F + _IO_funlockfile F + __close F + __connect F + __errno_location F + __fcntl F + __fork F + __h_errno_location F + __libc_allocate_rtsig F + __libc_current_sigrtmax F + __libc_current_sigrtmin F + __lseek F + __nanosleep F + __open F + __open64 F + __pread64 F + __pthread_cleanup_routine F + __pthread_getspecific F + __pthread_key_create F + __pthread_mutex_destroy F + __pthread_mutex_init F + __pthread_mutex_lock F + __pthread_mutex_trylock F + __pthread_mutex_unlock F + __pthread_mutexattr_destroy F + __pthread_mutexattr_init F + __pthread_mutexattr_settype F + __pthread_once F + __pthread_register_cancel F + __pthread_register_cancel_defer F + __pthread_rwlock_destroy F + __pthread_rwlock_init F + __pthread_rwlock_rdlock F + __pthread_rwlock_tryrdlock F + __pthread_rwlock_trywrlock F + __pthread_rwlock_unlock F + __pthread_rwlock_wrlock F + __pthread_setspecific F + __pthread_unregister_cancel F + __pthread_unregister_cancel_restore F + __pthread_unwind_next F + __pwrite64 F + __read F + __res_state F + __send F + __sigaction F + __vfork F + __wait F + __write F + _pthread_cleanup_pop F + _pthread_cleanup_pop_restore F + _pthread_cleanup_push F + _pthread_cleanup_push_defer F + accept F + close F + connect F + fcntl F + flockfile F + fork F + fsync F + ftrylockfile F + funlockfile F + longjmp F + lseek F + lseek64 F + msync F + nanosleep F + open F + open64 F + pause F + pread F + pread64 F + pthread_atfork F + pthread_attr_destroy F + pthread_attr_getaffinity_np F + pthread_attr_getdetachstate F + pthread_attr_getguardsize F + pthread_attr_getinheritsched F + pthread_attr_getschedparam F + pthread_attr_getschedpolicy F + pthread_attr_getscope F + pthread_attr_getstack F + pthread_attr_getstackaddr F + pthread_attr_getstacksize F + pthread_attr_init F + pthread_attr_setaffinity_np F + pthread_attr_setdetachstate F + pthread_attr_setguardsize F + pthread_attr_setinheritsched F + pthread_attr_setschedparam F + pthread_attr_setschedpolicy F + pthread_attr_setscope F + pthread_attr_setstack F + pthread_attr_setstackaddr F + pthread_attr_setstacksize F + pthread_barrier_destroy F + pthread_barrier_init F + pthread_barrier_wait F + pthread_barrierattr_destroy F + pthread_barrierattr_getpshared F + pthread_barrierattr_init F + pthread_barrierattr_setpshared F + pthread_cancel F + pthread_cond_broadcast F + pthread_cond_destroy F + pthread_cond_init F + pthread_cond_signal F + pthread_cond_timedwait F + pthread_cond_wait F + pthread_condattr_destroy F + pthread_condattr_getclock F + pthread_condattr_getpshared F + pthread_condattr_init F + pthread_condattr_setclock F + pthread_condattr_setpshared F + pthread_create F + pthread_detach F + pthread_equal F + pthread_exit F + pthread_getaffinity_np F + pthread_getattr_np F + pthread_getconcurrency F + pthread_getcpuclockid F + pthread_getname_np F + pthread_getschedparam F + pthread_getspecific F + pthread_join F + pthread_key_create F + pthread_key_delete F + pthread_kill F + pthread_kill_other_threads_np F + pthread_mutex_consistent F + pthread_mutex_consistent_np F + pthread_mutex_destroy F + pthread_mutex_getprioceiling F + pthread_mutex_init F + pthread_mutex_lock F + pthread_mutex_setprioceiling F + pthread_mutex_timedlock F + pthread_mutex_trylock F + pthread_mutex_unlock F + pthread_mutexattr_destroy F + pthread_mutexattr_getkind_np F + pthread_mutexattr_getprioceiling F + pthread_mutexattr_getprotocol F + pthread_mutexattr_getpshared F + pthread_mutexattr_getrobust F + pthread_mutexattr_getrobust_np F + pthread_mutexattr_gettype F + pthread_mutexattr_init F + pthread_mutexattr_setkind_np F + pthread_mutexattr_setprioceiling F + pthread_mutexattr_setprotocol F + pthread_mutexattr_setpshared F + pthread_mutexattr_setrobust F + pthread_mutexattr_setrobust_np F + pthread_mutexattr_settype F + pthread_once F + pthread_rwlock_destroy F + pthread_rwlock_init F + pthread_rwlock_rdlock F + pthread_rwlock_timedrdlock F + pthread_rwlock_timedwrlock F + pthread_rwlock_tryrdlock F + pthread_rwlock_trywrlock F + pthread_rwlock_unlock F + pthread_rwlock_wrlock F + pthread_rwlockattr_destroy F + pthread_rwlockattr_getkind_np F + pthread_rwlockattr_getpshared F + pthread_rwlockattr_init F + pthread_rwlockattr_setkind_np F + pthread_rwlockattr_setpshared F + pthread_self F + pthread_setaffinity_np F + pthread_setcancelstate F + pthread_setcanceltype F + pthread_setconcurrency F + pthread_setname_np F + pthread_setschedparam F + pthread_setschedprio F + pthread_setspecific F + pthread_sigmask F + pthread_sigqueue F + pthread_spin_destroy F + pthread_spin_init F + pthread_spin_lock F + pthread_spin_trylock F + pthread_spin_unlock F + pthread_testcancel F + pthread_timedjoin_np F + pthread_tryjoin_np F + pthread_yield F + pwrite F + pwrite64 F + raise F + read F + recv F + recvfrom F + recvmsg F + sem_close F + sem_destroy F + sem_getvalue F + sem_init F + sem_open F + sem_post F + sem_timedwait F + sem_trywait F + sem_unlink F + sem_wait F + send F + sendmsg F + sendto F + sigaction F + siglongjmp F + sigwait F + system F + tcdrain F + vfork F + wait F + waitpid F + write F diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libresolv.abilist b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libresolv.abilist new file mode 100644 index 0000000000..64826160a1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libresolv.abilist @@ -0,0 +1,93 @@ +GLIBC_2.12 + GLIBC_2.12 A + __b64_ntop F + __b64_pton F + __dn_comp F + __dn_count_labels F + __dn_expand F + __dn_skipname F + __fp_nquery F + __fp_query F + __fp_resstat F + __hostalias F + __loc_aton F + __loc_ntoa F + __p_cdname F + __p_cdnname F + __p_class F + __p_class_syms D 0x54 + __p_fqname F + __p_fqnname F + __p_option F + __p_query F + __p_rcode F + __p_secstodate F + __p_time F + __p_type F + __p_type_syms D 0x228 + __putlong F + __putshort F + __res_close F + __res_dnok F + __res_hnok F + __res_hostalias F + __res_isourserver F + __res_mailok F + __res_mkquery F + __res_nameinquery F + __res_nmkquery F + __res_nquery F + __res_nquerydomain F + __res_nsearch F + __res_nsend F + __res_ownok F + __res_queriesmatch F + __res_query F + __res_querydomain F + __res_search F + __res_send F + __sym_ntop F + __sym_ntos F + __sym_ston F + _gethtbyaddr F + _gethtbyname F + _gethtbyname2 F + _gethtent F + _getlong F + _getshort F + _res_opcodes D 0x40 + _sethtent F + inet_net_ntop F + inet_net_pton F + inet_neta F + ns_datetosecs F + ns_format_ttl F + ns_get16 F + ns_get32 F + ns_initparse F + ns_makecanon F + ns_msg_getflag F + ns_name_compress F + ns_name_ntol F + ns_name_ntop F + ns_name_pack F + ns_name_pton F + ns_name_rollback F + ns_name_skip F + ns_name_uncompress F + ns_name_unpack F + ns_parse_ttl F + ns_parserr F + ns_put16 F + ns_put32 F + ns_samedomain F + ns_samename F + ns_skiprr F + ns_sprintrr F + ns_sprintrrf F + ns_subdomain F + res_gethostbyaddr F + res_gethostbyname F + res_gethostbyname2 F + res_send_setqhook F + res_send_setrhook F diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/librt.abilist b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/librt.abilist new file mode 100644 index 0000000000..87fec065af --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/librt.abilist @@ -0,0 +1,42 @@ +GLIBC_2.12 + GLIBC_2.12 A + __mq_open_2 F + aio_cancel F + aio_cancel64 F + aio_error F + aio_error64 F + aio_fsync F + aio_fsync64 F + aio_init F + aio_read F + aio_read64 F + aio_return F + aio_return64 F + aio_suspend F + aio_suspend64 F + aio_write F + aio_write64 F + clock_getcpuclockid F + clock_getres F + clock_gettime F + clock_nanosleep F + clock_settime F + lio_listio F + lio_listio64 F + mq_close F + mq_getattr F + mq_notify F + mq_open F + mq_receive F + mq_send F + mq_setattr F + mq_timedreceive F + mq_timedsend F + mq_unlink F + shm_open F + shm_unlink F + timer_create F + timer_delete F + timer_getoverrun F + timer_gettime F + timer_settime F diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libthread_db.abilist b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libthread_db.abilist new file mode 100644 index 0000000000..934ce9acd6 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libthread_db.abilist @@ -0,0 +1,42 @@ +GLIBC_2.12 + GLIBC_2.12 A + td_init F + td_log F + td_symbol_list F + td_ta_clear_event F + td_ta_delete F + td_ta_enable_stats F + td_ta_event_addr F + td_ta_event_getmsg F + td_ta_get_nthreads F + td_ta_get_ph F + td_ta_get_stats F + td_ta_map_id2thr F + td_ta_map_lwp2thr F + td_ta_new F + td_ta_reset_stats F + td_ta_set_event F + td_ta_setconcurrency F + td_ta_thr_iter F + td_ta_tsd_iter F + td_thr_clear_event F + td_thr_dbresume F + td_thr_dbsuspend F + td_thr_event_enable F + td_thr_event_getmsg F + td_thr_get_info F + td_thr_getfpregs F + td_thr_getgregs F + td_thr_getxregs F + td_thr_getxregsize F + td_thr_set_event F + td_thr_setfpregs F + td_thr_setgregs F + td_thr_setprio F + td_thr_setsigpending F + td_thr_setxregs F + td_thr_sigsetmask F + td_thr_tls_get_addr F + td_thr_tlsbase F + td_thr_tsd F + td_thr_validate F diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libutil.abilist b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libutil.abilist new file mode 100644 index 0000000000..50c312a7c6 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libutil.abilist @@ -0,0 +1,8 @@ +GLIBC_2.12 + GLIBC_2.12 A + forkpty F + login F + login_tty F + logout F + logwtmp F + openpty F diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/ld.abilist b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/ld.abilist new file mode 100644 index 0000000000..f914e4b82d --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/ld.abilist @@ -0,0 +1,11 @@ +GLIBC_2.12 + GLIBC_2.12 A + __libc_memalign F + __libc_stack_end D 0x8 + __tls_get_addr F + _dl_mcount F + _r_debug D 0x28 + calloc F + free F + malloc F + realloc F diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libBrokenLocale.abilist b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libBrokenLocale.abilist new file mode 100644 index 0000000000..4af9128544 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libBrokenLocale.abilist @@ -0,0 +1,3 @@ +GLIBC_2.12 + GLIBC_2.12 A + __ctype_get_mb_cur_max F diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libanl.abilist b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libanl.abilist new file mode 100644 index 0000000000..29e602a75a --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libanl.abilist @@ -0,0 +1,6 @@ +GLIBC_2.12 + GLIBC_2.12 A + gai_cancel F + gai_error F + gai_suspend F + getaddrinfo_a F diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libc.abilist b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libc.abilist new file mode 100644 index 0000000000..4ab0f8c1d8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libc.abilist @@ -0,0 +1,2080 @@ +GLIBC_2.12 + GLIBC_2.12 A + _Exit F + _IO_2_1_stderr_ D 0xe0 + _IO_2_1_stdin_ D 0xe0 + _IO_2_1_stdout_ D 0xe0 + _IO_adjust_column F + _IO_adjust_wcolumn F + _IO_default_doallocate F + _IO_default_finish F + _IO_default_pbackfail F + _IO_default_uflow F + _IO_default_xsgetn F + _IO_default_xsputn F + _IO_do_write F + _IO_doallocbuf F + _IO_fclose F + _IO_fdopen F + _IO_feof F + _IO_ferror F + _IO_fflush F + _IO_fgetpos F + _IO_fgetpos64 F + _IO_fgets F + _IO_file_attach F + _IO_file_close F + _IO_file_close_it F + _IO_file_doallocate F + _IO_file_finish F + _IO_file_fopen F + _IO_file_init F + _IO_file_jumps D 0xa8 + _IO_file_open F + _IO_file_overflow F + _IO_file_read F + _IO_file_seek F + _IO_file_seekoff F + _IO_file_setbuf F + _IO_file_stat F + _IO_file_sync F + _IO_file_underflow F + _IO_file_write F + _IO_file_xsputn F + _IO_flockfile F + _IO_flush_all F + _IO_flush_all_linebuffered F + _IO_fopen F + _IO_fprintf F + _IO_fputs F + _IO_fread F + _IO_free_backup_area F + _IO_free_wbackup_area F + _IO_fsetpos F + _IO_fsetpos64 F + _IO_ftell F + _IO_ftrylockfile F + _IO_funlockfile F + _IO_fwrite F + _IO_getc F + _IO_getline F + _IO_getline_info F + _IO_gets F + _IO_init F + _IO_init_marker F + _IO_init_wmarker F + _IO_iter_begin F + _IO_iter_end F + _IO_iter_file F + _IO_iter_next F + _IO_least_wmarker F + _IO_link_in F + _IO_list_all D 0x8 + _IO_list_lock F + _IO_list_resetlock F + _IO_list_unlock F + _IO_marker_delta F + _IO_marker_difference F + _IO_padn F + _IO_peekc_locked F + _IO_popen F + _IO_printf F + _IO_proc_close F + _IO_proc_open F + _IO_putc F + _IO_puts F + _IO_remove_marker F + _IO_seekmark F + _IO_seekoff F + _IO_seekpos F + _IO_seekwmark F + _IO_setb F + _IO_setbuffer F + _IO_setvbuf F + _IO_sgetn F + _IO_sprintf F + _IO_sputbackc F + _IO_sputbackwc F + _IO_sscanf F + _IO_str_init_readonly F + _IO_str_init_static F + _IO_str_overflow F + _IO_str_pbackfail F + _IO_str_seekoff F + _IO_str_underflow F + _IO_sungetc F + _IO_sungetwc F + _IO_switch_to_get_mode F + _IO_switch_to_main_wget_area F + _IO_switch_to_wbackup_area F + _IO_switch_to_wget_mode F + _IO_un_link F + _IO_ungetc F + _IO_unsave_markers F + _IO_unsave_wmarkers F + _IO_vfprintf F + _IO_vfscanf F + _IO_vsprintf F + _IO_wdefault_doallocate F + _IO_wdefault_finish F + _IO_wdefault_pbackfail F + _IO_wdefault_uflow F + _IO_wdefault_xsgetn F + _IO_wdefault_xsputn F + _IO_wdo_write F + _IO_wdoallocbuf F + _IO_wfile_jumps D 0xa8 + _IO_wfile_overflow F + _IO_wfile_seekoff F + _IO_wfile_sync F + _IO_wfile_underflow F + _IO_wfile_xsputn F + _IO_wmarker_delta F + _IO_wsetb F + ___brk_addr D 0x8 + __adjtimex F + __after_morecore_hook D 0x8 + __argz_count F + __argz_next F + __argz_stringify F + __asprintf F + __asprintf_chk F + __assert F + __assert_fail F + __assert_perror_fail F + __backtrace F + __backtrace_symbols F + __backtrace_symbols_fd F + __bsd_getpgrp F + __bzero F + __check_rhosts_file D 0x4 + __chk_fail F + __clone F + __close F + __cmsg_nxthdr F + __confstr_chk F + __connect F + __ctype_b_loc F + __ctype_get_mb_cur_max F + __ctype_tolower_loc F + __ctype_toupper_loc F + __curbrk D 0x8 + __cxa_at_quick_exit F + __cxa_atexit F + __cxa_finalize F + __cyg_profile_func_enter F + __cyg_profile_func_exit F + __daylight D 0x4 + __dcgettext F + __default_morecore F + __dgettext F + __dprintf_chk F + __dup2 F + __duplocale F + __endmntent F + __environ D 0x8 + __errno_location F + __fbufsize F + __fcntl F + __ffs F + __fgets_chk F + __fgets_unlocked_chk F + __fgetws_chk F + __fgetws_unlocked_chk F + __finite F + __finitef F + __flbf F + __fork F + __fpending F + __fprintf_chk F + __fpu_control D 0x4 + __fpurge F + __fread_chk F + __fread_unlocked_chk F + __freadable F + __freading F + __free_hook D 0x8 + __freelocale F + __fsetlocking F + __fwprintf_chk F + __fwritable F + __fwriting F + __fxstat F + __fxstat64 F + __fxstatat F + __fxstatat64 F + __getcwd_chk F + __getdelim F + __getdomainname_chk F + __getgroups_chk F + __gethostname_chk F + __getlogin_r_chk F + __getmntent_r F + __getpagesize F + __getpgid F + __getpid F + __gets_chk F + __gettimeofday F + __getwd_chk F + __gmtime_r F + __h_errno_location F + __isalnum_l F + __isalpha_l F + __isascii_l F + __isblank_l F + __iscntrl_l F + __isctype F + __isdigit_l F + __isgraph_l F + __isinf F + __isinff F + __islower_l F + __isnan F + __isnanf F + __isoc99_fscanf F + __isoc99_fwscanf F + __isoc99_scanf F + __isoc99_sscanf F + __isoc99_swscanf F + __isoc99_vfscanf F + __isoc99_vfwscanf F + __isoc99_vscanf F + __isoc99_vsscanf F + __isoc99_vswscanf F + __isoc99_vwscanf F + __isoc99_wscanf F + __isprint_l F + __ispunct_l F + __isspace_l F + __isupper_l F + __iswalnum_l F + __iswalpha_l F + __iswblank_l F + __iswcntrl_l F + __iswctype F + __iswctype_l F + __iswdigit_l F + __iswgraph_l F + __iswlower_l F + __iswprint_l F + __iswpunct_l F + __iswspace_l F + __iswupper_l F + __iswxdigit_l F + __isxdigit_l F + __ivaliduser F + __key_decryptsession_pk_LOCAL D 0x8 + __key_encryptsession_pk_LOCAL D 0x8 + __key_gendes_LOCAL D 0x8 + __libc_allocate_rtsig F + __libc_calloc F + __libc_current_sigrtmax F + __libc_current_sigrtmin F + __libc_free F + __libc_freeres F + __libc_init_first F + __libc_mallinfo F + __libc_malloc F + __libc_mallopt F + __libc_memalign F + __libc_pvalloc F + __libc_realloc F + __libc_sa_len F + __libc_start_main F + __libc_valloc F + __longjmp_chk F + __lseek F + __lxstat F + __lxstat64 F + __malloc_hook D 0x8 + __malloc_initialize_hook D 0x8 + __mbrlen F + __mbrtowc F + __mbsnrtowcs_chk F + __mbsrtowcs_chk F + __mbstowcs_chk F + __mcount F + __memalign_hook D 0x8 + __memcpy_chk F + __memmove_chk F + __mempcpy F + __mempcpy_chk F + __mempcpy_small F + __memset_chk F + __monstartup F + __morecore D 0x8 + __nanosleep F + __newlocale F + __nl_langinfo_l F + __nss_configure_lookup F + __nss_database_lookup F + __nss_group_lookup F + __nss_hostname_digits_dots F + __nss_hosts_lookup F + __nss_next F + __nss_passwd_lookup F + __obstack_printf_chk F + __obstack_vprintf_chk F + __open F + __open64 F + __open64_2 F + __open_2 F + __openat64_2 F + __openat_2 F + __overflow F + __pipe F + __poll F + __posix_getopt F + __pread64 F + __pread64_chk F + __pread_chk F + __printf_chk F + __printf_fp F + __profile_frequency F + __progname D 0x8 + __progname_full D 0x8 + __ptsname_r_chk F + __pwrite64 F + __rawmemchr F + __rcmd_errstr D 0x8 + __read F + __read_chk F + __readlink_chk F + __readlinkat_chk F + __realloc_hook D 0x8 + __realpath_chk F + __recv_chk F + __recvfrom_chk F + __register_atfork F + __res_init F + __res_nclose F + __res_ninit F + __res_randomid F + __res_state F + __rpc_thread_createerr F + __rpc_thread_svc_fdset F + __rpc_thread_svc_max_pollfd F + __rpc_thread_svc_pollfd F + __sbrk F + __sched_cpualloc F + __sched_cpucount F + __sched_cpufree F + __sched_get_priority_max F + __sched_get_priority_min F + __sched_getparam F + __sched_getscheduler F + __sched_setscheduler F + __sched_yield F + __secure_getenv F + __select F + __setmntent F + __setpgid F + __sigaction F + __sigaddset F + __sigdelset F + __sigismember F + __signbit F + __signbitf F + __sigpause F + __sigsetjmp F + __sigsuspend F + __snprintf_chk F + __sprintf_chk F + __stack_chk_fail F + __statfs F + __stpcpy F + __stpcpy_chk F + __stpcpy_small F + __stpncpy F + __stpncpy_chk F + __strcasecmp F + __strcasecmp_l F + __strcasestr F + __strcat_chk F + __strcoll_l F + __strcpy_chk F + __strcpy_small F + __strcspn_c1 F + __strcspn_c2 F + __strcspn_c3 F + __strdup F + __strerror_r F + __strfmon_l F + __strftime_l F + __strncasecmp_l F + __strncat_chk F + __strncpy_chk F + __strndup F + __strpbrk_c2 F + __strpbrk_c3 F + __strsep_1c F + __strsep_2c F + __strsep_3c F + __strsep_g F + __strspn_c1 F + __strspn_c2 F + __strspn_c3 F + __strtod_internal F + __strtod_l F + __strtof_internal F + __strtof_l F + __strtok_r F + __strtok_r_1c F + __strtol_internal F + __strtol_l F + __strtold_internal F + __strtold_l F + __strtoll_internal F + __strtoll_l F + __strtoul_internal F + __strtoul_l F + __strtoull_internal F + __strtoull_l F + __strverscmp F + __strxfrm_l F + __swprintf_chk F + __sysconf F + __syslog_chk F + __sysv_signal F + __timezone D 0x8 + __toascii_l F + __tolower_l F + __toupper_l F + __towctrans F + __towctrans_l F + __towlower_l F + __towupper_l F + __ttyname_r_chk F + __tzname D 0x10 + __uflow F + __underflow F + __uselocale F + __vasprintf_chk F + __vdprintf_chk F + __vfork F + __vfprintf_chk F + __vfscanf F + __vfwprintf_chk F + __vprintf_chk F + __vsnprintf F + __vsnprintf_chk F + __vsprintf_chk F + __vsscanf F + __vswprintf_chk F + __vsyslog_chk F + __vwprintf_chk F + __wait F + __waitpid F + __wcpcpy_chk F + __wcpncpy_chk F + __wcrtomb_chk F + __wcscasecmp_l F + __wcscat_chk F + __wcscoll_l F + __wcscpy_chk F + __wcsftime_l F + __wcsncasecmp_l F + __wcsncat_chk F + __wcsncpy_chk F + __wcsnrtombs_chk F + __wcsrtombs_chk F + __wcstod_internal F + __wcstod_l F + __wcstof_internal F + __wcstof_l F + __wcstol_internal F + __wcstol_l F + __wcstold_internal F + __wcstold_l F + __wcstoll_internal F + __wcstoll_l F + __wcstombs_chk F + __wcstoul_internal F + __wcstoul_l F + __wcstoull_internal F + __wcstoull_l F + __wcsxfrm_l F + __wctomb_chk F + __wctrans_l F + __wctype_l F + __wmemcpy_chk F + __wmemmove_chk F + __wmempcpy_chk F + __wmemset_chk F + __woverflow F + __wprintf_chk F + __write F + __wuflow F + __wunderflow F + __xmknod F + __xmknodat F + __xpg_basename F + __xpg_sigpause F + __xpg_strerror_r F + __xstat F + __xstat64 F + _authenticate F + _dl_mcount_wrapper F + _dl_mcount_wrapper_check F + _environ D 0x8 + _exit F + _flush_cache F + _flushlbf F + _libc_intl_domainname D 0x5 + _longjmp F + _mcleanup F + _mcount F + _nl_default_dirname D 0x12 + _nl_domain_bindings D 0x8 + _nl_msg_cat_cntr D 0x4 + _null_auth D 0x18 + _obstack_allocated_p F + _obstack_begin F + _obstack_begin_1 F + _obstack_free F + _obstack_memory_used F + _obstack_newchunk F + _res D 0x238 + _res_hconf D 0x48 + _rpc_dtablesize F + _seterr_reply F + _setjmp F + _sys_errlist D 0x438 + _sys_nerr D 0x4 + _sys_siglist D 0x208 + _tolower F + _toupper F + a64l F + abort F + abs F + accept F + accept4 F + access F + acct F + addmntent F + addseverity F + adjtime F + adjtimex F + advance F + alarm F + alphasort F + alphasort64 F + argp_err_exit_status D 0x4 + argp_error F + argp_failure F + argp_help F + argp_parse F + argp_program_bug_address D 0x8 + argp_program_version D 0x8 + argp_program_version_hook D 0x8 + argp_state_help F + argp_usage F + argz_add F + argz_add_sep F + argz_append F + argz_count F + argz_create F + argz_create_sep F + argz_delete F + argz_extract F + argz_insert F + argz_next F + argz_replace F + argz_stringify F + asctime F + asctime_r F + asprintf F + atof F + atoi F + atol F + atoll F + authdes_create F + authdes_getucred F + authdes_pk_create F + authnone_create F + authunix_create F + authunix_create_default F + backtrace F + backtrace_symbols F + backtrace_symbols_fd F + basename F + bcmp F + bcopy F + bdflush F + bind F + bind_textdomain_codeset F + bindresvport F + bindtextdomain F + brk F + bsd_signal F + bsearch F + btowc F + bzero F + cacheflush F + calloc F + callrpc F + canonicalize_file_name F + capget F + capset F + catclose F + catgets F + catopen F + cbc_crypt F + cfgetispeed F + cfgetospeed F + cfmakeraw F + cfree F + cfsetispeed F + cfsetospeed F + cfsetspeed F + chdir F + chflags F + chmod F + chown F + chroot F + clearenv F + clearerr F + clearerr_unlocked F + clnt_broadcast F + clnt_create F + clnt_pcreateerror F + clnt_perrno F + clnt_perror F + clnt_spcreateerror F + clnt_sperrno F + clnt_sperror F + clntraw_create F + clnttcp_create F + clntudp_bufcreate F + clntudp_create F + clntunix_create F + clock F + clone F + close F + closedir F + closelog F + confstr F + connect F + copysign F + copysignf F + copysignl F + creat F + creat64 F + create_module F + ctermid F + ctime F + ctime_r F + cuserid F + daemon F + daylight D 0x4 + dcgettext F + dcngettext F + delete_module F + des_setparity F + dgettext F + difftime F + dirfd F + dirname F + div F + dl_iterate_phdr F + dngettext F + dprintf F + drand48 F + drand48_r F + dup F + dup2 F + dup3 F + duplocale F + dysize F + eaccess F + ecb_crypt F + ecvt F + ecvt_r F + endaliasent F + endfsent F + endgrent F + endhostent F + endmntent F + endnetent F + endnetgrent F + endprotoent F + endpwent F + endrpcent F + endservent F + endsgent F + endspent F + endttyent F + endusershell F + endutent F + endutxent F + environ D 0x8 + envz_add F + envz_entry F + envz_get F + envz_merge F + envz_remove F + envz_strip F + epoll_create F + epoll_create1 F + epoll_ctl F + epoll_pwait F + epoll_wait F + erand48 F + erand48_r F + err F + error F + error_at_line F + error_message_count D 0x4 + error_one_per_line D 0x4 + error_print_progname D 0x8 + errx F + ether_aton F + ether_aton_r F + ether_hostton F + ether_line F + ether_ntoa F + ether_ntoa_r F + ether_ntohost F + euidaccess F + eventfd F + eventfd_read F + eventfd_write F + execl F + execle F + execlp F + execv F + execve F + execvp F + execvpe F + exit F + faccessat F + fallocate F + fallocate64 F + fattach F + fchdir F + fchflags F + fchmod F + fchmodat F + fchown F + fchownat F + fclose F + fcloseall F + fcntl F + fcvt F + fcvt_r F + fdatasync F + fdetach F + fdopen F + fdopendir F + feof F + feof_unlocked F + ferror F + ferror_unlocked F + fexecve F + fflush F + fflush_unlocked F + ffs F + ffsl F + ffsll F + fgetc F + fgetc_unlocked F + fgetgrent F + fgetgrent_r F + fgetpos F + fgetpos64 F + fgetpwent F + fgetpwent_r F + fgets F + fgets_unlocked F + fgetsgent F + fgetsgent_r F + fgetspent F + fgetspent_r F + fgetwc F + fgetwc_unlocked F + fgetws F + fgetws_unlocked F + fgetxattr F + fileno F + fileno_unlocked F + finite F + finitef F + finitel F + flistxattr F + flock F + flockfile F + fmemopen F + fmtmsg F + fnmatch F + fopen F + fopen64 F + fopencookie F + fork F + fpathconf F + fprintf F + fputc F + fputc_unlocked F + fputs F + fputs_unlocked F + fputwc F + fputwc_unlocked F + fputws F + fputws_unlocked F + fread F + fread_unlocked F + free F + freeaddrinfo F + freeifaddrs F + freelocale F + fremovexattr F + freopen F + freopen64 F + frexp F + frexpf F + frexpl F + fscanf F + fseek F + fseeko F + fseeko64 F + fsetpos F + fsetpos64 F + fsetxattr F + fstatfs F + fstatfs64 F + fstatvfs F + fstatvfs64 F + fsync F + ftell F + ftello F + ftello64 F + ftime F + ftok F + ftruncate F + ftruncate64 F + ftrylockfile F + fts_children F + fts_close F + fts_open F + fts_read F + fts_set F + ftw F + ftw64 F + funlockfile F + futimens F + futimes F + futimesat F + fwide F + fwprintf F + fwrite F + fwrite_unlocked F + fwscanf F + gai_strerror F + gcvt F + get_avphys_pages F + get_current_dir_name F + get_kernel_syms F + get_myaddress F + get_nprocs F + get_nprocs_conf F + get_phys_pages F + getaddrinfo F + getaliasbyname F + getaliasbyname_r F + getaliasent F + getaliasent_r F + getc F + getc_unlocked F + getchar F + getchar_unlocked F + getcontext F + getcwd F + getdate F + getdate_err D 0x4 + getdate_r F + getdelim F + getdirentries F + getdirentries64 F + getdomainname F + getdtablesize F + getegid F + getenv F + geteuid F + getfsent F + getfsfile F + getfsspec F + getgid F + getgrent F + getgrent_r F + getgrgid F + getgrgid_r F + getgrnam F + getgrnam_r F + getgrouplist F + getgroups F + gethostbyaddr F + gethostbyaddr_r F + gethostbyname F + gethostbyname2 F + gethostbyname2_r F + gethostbyname_r F + gethostent F + gethostent_r F + gethostid F + gethostname F + getifaddrs F + getipv4sourcefilter F + getitimer F + getline F + getloadavg F + getlogin F + getlogin_r F + getmntent F + getmntent_r F + getmsg F + getnameinfo F + getnetbyaddr F + getnetbyaddr_r F + getnetbyname F + getnetbyname_r F + getnetent F + getnetent_r F + getnetgrent F + getnetgrent_r F + getnetname F + getopt F + getopt_long F + getopt_long_only F + getpagesize F + getpass F + getpeername F + getpgid F + getpgrp F + getpid F + getpmsg F + getppid F + getpriority F + getprotobyname F + getprotobyname_r F + getprotobynumber F + getprotobynumber_r F + getprotoent F + getprotoent_r F + getpt F + getpublickey F + getpw F + getpwent F + getpwent_r F + getpwnam F + getpwnam_r F + getpwuid F + getpwuid_r F + getresgid F + getresuid F + getrlimit F + getrlimit64 F + getrpcbyname F + getrpcbyname_r F + getrpcbynumber F + getrpcbynumber_r F + getrpcent F + getrpcent_r F + getrpcport F + getrusage F + gets F + getsecretkey F + getservbyname F + getservbyname_r F + getservbyport F + getservbyport_r F + getservent F + getservent_r F + getsgent F + getsgent_r F + getsgnam F + getsgnam_r F + getsid F + getsockname F + getsockopt F + getsourcefilter F + getspent F + getspent_r F + getspnam F + getspnam_r F + getsubopt F + gettext F + gettimeofday F + getttyent F + getttynam F + getuid F + getusershell F + getutent F + getutent_r F + getutid F + getutid_r F + getutline F + getutline_r F + getutmp F + getutmpx F + getutxent F + getutxid F + getutxline F + getw F + getwc F + getwc_unlocked F + getwchar F + getwchar_unlocked F + getwd F + getxattr F + glob F + glob64 F + glob_pattern_p F + globfree F + globfree64 F + gmtime F + gmtime_r F + gnu_dev_major F + gnu_dev_makedev F + gnu_dev_minor F + gnu_get_libc_release F + gnu_get_libc_version F + grantpt F + group_member F + gsignal F + gtty F + h_errlist D 0x28 + h_nerr D 0x4 + hasmntopt F + hcreate F + hcreate_r F + hdestroy F + hdestroy_r F + herror F + host2netname F + hsearch F + hsearch_r F + hstrerror F + htonl F + htons F + iconv F + iconv_close F + iconv_open F + if_freenameindex F + if_indextoname F + if_nameindex F + if_nametoindex F + imaxabs F + imaxdiv F + in6addr_any D 0x10 + in6addr_loopback D 0x10 + index F + inet6_opt_append F + inet6_opt_find F + inet6_opt_finish F + inet6_opt_get_val F + inet6_opt_init F + inet6_opt_next F + inet6_opt_set_val F + inet6_option_alloc F + inet6_option_append F + inet6_option_find F + inet6_option_init F + inet6_option_next F + inet6_option_space F + inet6_rth_add F + inet6_rth_getaddr F + inet6_rth_init F + inet6_rth_reverse F + inet6_rth_segments F + inet6_rth_space F + inet_addr F + inet_aton F + inet_lnaof F + inet_makeaddr F + inet_netof F + inet_network F + inet_nsap_addr F + inet_nsap_ntoa F + inet_ntoa F + inet_ntop F + inet_pton F + init_module F + initgroups F + initstate F + initstate_r F + innetgr F + inotify_add_watch F + inotify_init F + inotify_init1 F + inotify_rm_watch F + insque F + ioctl F + iruserok F + iruserok_af F + isalnum F + isalnum_l F + isalpha F + isalpha_l F + isascii F + isastream F + isatty F + isblank F + isblank_l F + iscntrl F + iscntrl_l F + isctype F + isdigit F + isdigit_l F + isfdtype F + isgraph F + isgraph_l F + isinf F + isinff F + isinfl F + islower F + islower_l F + isnan F + isnanf F + isnanl F + isprint F + isprint_l F + ispunct F + ispunct_l F + isspace F + isspace_l F + isupper F + isupper_l F + iswalnum F + iswalnum_l F + iswalpha F + iswalpha_l F + iswblank F + iswblank_l F + iswcntrl F + iswcntrl_l F + iswctype F + iswctype_l F + iswdigit F + iswdigit_l F + iswgraph F + iswgraph_l F + iswlower F + iswlower_l F + iswprint F + iswprint_l F + iswpunct F + iswpunct_l F + iswspace F + iswspace_l F + iswupper F + iswupper_l F + iswxdigit F + iswxdigit_l F + isxdigit F + isxdigit_l F + jrand48 F + jrand48_r F + key_decryptsession F + key_decryptsession_pk F + key_encryptsession F + key_encryptsession_pk F + key_gendes F + key_get_conv F + key_secretkey_is_set F + key_setnet F + key_setsecret F + kill F + killpg F + klogctl F + l64a F + labs F + lchmod F + lchown F + lckpwdf F + lcong48 F + lcong48_r F + ldexp F + ldexpf F + ldexpl F + ldiv F + lfind F + lgetxattr F + link F + linkat F + listen F + listxattr F + llabs F + lldiv F + llistxattr F + llseek F + loc1 D 0x8 + loc2 D 0x8 + localeconv F + localtime F + localtime_r F + lockf F + lockf64 F + locs D 0x8 + longjmp F + lrand48 F + lrand48_r F + lremovexattr F + lsearch F + lseek F + lseek64 F + lsetxattr F + lutimes F + madvise F + makecontext F + mallinfo F + malloc F + malloc_get_state F + malloc_info F + malloc_set_state F + malloc_stats F + malloc_trim F + malloc_usable_size F + mallopt F + mallwatch D 0x8 + mblen F + mbrlen F + mbrtowc F + mbsinit F + mbsnrtowcs F + mbsrtowcs F + mbstowcs F + mbtowc F + mcheck F + mcheck_check_all F + mcheck_pedantic F + mcount F + memalign F + memccpy F + memchr F + memcmp F + memcpy F + memfrob F + memmem F + memmove F + mempcpy F + memrchr F + memset F + mincore F + mkdir F + mkdirat F + mkdtemp F + mkfifo F + mkfifoat F + mkostemp F + mkostemp64 F + mkostemps F + mkostemps64 F + mkstemp F + mkstemp64 F + mkstemps F + mkstemps64 F + mktemp F + mktime F + mlock F + mlockall F + mmap F + mmap64 F + modf F + modff F + modfl F + moncontrol F + monstartup F + mount F + mprobe F + mprotect F + mrand48 F + mrand48_r F + mremap F + msgctl F + msgget F + msgrcv F + msgsnd F + msync F + mtrace F + munlock F + munlockall F + munmap F + muntrace F + nanosleep F + netname2host F + netname2user F + newlocale F + nfsservctl F + nftw F + nftw64 F + ngettext F + nice F + nl_langinfo F + nl_langinfo_l F + nrand48 F + nrand48_r F + ntohl F + ntohs F + ntp_adjtime F + ntp_gettime F + ntp_gettimex F + obstack_alloc_failed_handler D 0x8 + obstack_exit_failure D 0x4 + obstack_free F + obstack_printf F + obstack_vprintf F + on_exit F + open F + open64 F + open_memstream F + open_wmemstream F + openat F + openat64 F + opendir F + openlog F + optarg D 0x8 + opterr D 0x4 + optind D 0x4 + optopt D 0x4 + parse_printf_format F + passwd2des F + pathconf F + pause F + pclose F + perror F + personality F + pipe F + pipe2 F + pivot_root F + pmap_getmaps F + pmap_getport F + pmap_rmtcall F + pmap_set F + pmap_unset F + poll F + popen F + posix_fadvise F + posix_fadvise64 F + posix_fallocate F + posix_fallocate64 F + posix_madvise F + posix_memalign F + posix_openpt F + posix_spawn F + posix_spawn_file_actions_addclose F + posix_spawn_file_actions_adddup2 F + posix_spawn_file_actions_addopen F + posix_spawn_file_actions_destroy F + posix_spawn_file_actions_init F + posix_spawnattr_destroy F + posix_spawnattr_getflags F + posix_spawnattr_getpgroup F + posix_spawnattr_getschedparam F + posix_spawnattr_getschedpolicy F + posix_spawnattr_getsigdefault F + posix_spawnattr_getsigmask F + posix_spawnattr_init F + posix_spawnattr_setflags F + posix_spawnattr_setpgroup F + posix_spawnattr_setschedparam F + posix_spawnattr_setschedpolicy F + posix_spawnattr_setsigdefault F + posix_spawnattr_setsigmask F + posix_spawnp F + ppoll F + prctl F + pread F + pread64 F + preadv F + preadv64 F + printf F + printf_size F + printf_size_info F + profil F + program_invocation_name D 0x8 + program_invocation_short_name D 0x8 + pselect F + psiginfo F + psignal F + pthread_attr_destroy F + pthread_attr_getdetachstate F + pthread_attr_getinheritsched F + pthread_attr_getschedparam F + pthread_attr_getschedpolicy F + pthread_attr_getscope F + pthread_attr_init F + pthread_attr_setdetachstate F + pthread_attr_setinheritsched F + pthread_attr_setschedparam F + pthread_attr_setschedpolicy F + pthread_attr_setscope F + pthread_cond_broadcast F + pthread_cond_destroy F + pthread_cond_init F + pthread_cond_signal F + pthread_cond_timedwait F + pthread_cond_wait F + pthread_condattr_destroy F + pthread_condattr_init F + pthread_equal F + pthread_exit F + pthread_getschedparam F + pthread_mutex_destroy F + pthread_mutex_init F + pthread_mutex_lock F + pthread_mutex_unlock F + pthread_self F + pthread_setcancelstate F + pthread_setcanceltype F + pthread_setschedparam F + ptrace F + ptsname F + ptsname_r F + putc F + putc_unlocked F + putchar F + putchar_unlocked F + putenv F + putgrent F + putmsg F + putpmsg F + putpwent F + puts F + putsgent F + putspent F + pututline F + pututxline F + putw F + putwc F + putwc_unlocked F + putwchar F + putwchar_unlocked F + pvalloc F + pwrite F + pwrite64 F + pwritev F + pwritev64 F + qecvt F + qecvt_r F + qfcvt F + qfcvt_r F + qgcvt F + qsort F + qsort_r F + query_module F + quick_exit F + quotactl F + raise F + rand F + rand_r F + random F + random_r F + rawmemchr F + rcmd F + rcmd_af F + re_comp F + re_compile_fastmap F + re_compile_pattern F + re_exec F + re_match F + re_match_2 F + re_search F + re_search_2 F + re_set_registers F + re_set_syntax F + re_syntax_options D 0x8 + read F + readahead F + readdir F + readdir64 F + readdir64_r F + readdir_r F + readlink F + readlinkat F + readv F + realloc F + realpath F + reboot F + recv F + recvfrom F + recvmmsg F + recvmsg F + regcomp F + regerror F + regexec F + regfree F + register_printf_function F + register_printf_modifier F + register_printf_specifier F + register_printf_type F + registerrpc F + remap_file_pages F + remove F + removexattr F + remque F + rename F + renameat F + revoke F + rewind F + rewinddir F + rexec F + rexec_af F + rexecoptions D 0x4 + rindex F + rmdir F + rpc_createerr D 0x20 + rpmatch F + rresvport F + rresvport_af F + rtime F + ruserok F + ruserok_af F + ruserpass F + sbrk F + scalbn F + scalbnf F + scalbnl F + scandir F + scandir64 F + scanf F + sched_get_priority_max F + sched_get_priority_min F + sched_getaffinity F + sched_getcpu F + sched_getparam F + sched_getscheduler F + sched_rr_get_interval F + sched_setaffinity F + sched_setparam F + sched_setscheduler F + sched_yield F + seed48 F + seed48_r F + seekdir F + select F + semctl F + semget F + semop F + semtimedop F + send F + sendfile F + sendfile64 F + sendmsg F + sendto F + set_dataplane F + setaliasent F + setbuf F + setbuffer F + setcontext F + setdomainname F + setegid F + setenv F + seteuid F + setfsent F + setfsgid F + setfsuid F + setgid F + setgrent F + setgroups F + sethostent F + sethostid F + sethostname F + setipv4sourcefilter F + setitimer F + setjmp F + setlinebuf F + setlocale F + setlogin F + setlogmask F + setmntent F + setnetent F + setnetgrent F + setpgid F + setpgrp F + setpriority F + setprotoent F + setpwent F + setregid F + setresgid F + setresuid F + setreuid F + setrlimit F + setrlimit64 F + setrpcent F + setservent F + setsgent F + setsid F + setsockopt F + setsourcefilter F + setspent F + setstate F + setstate_r F + settimeofday F + setttyent F + setuid F + setusershell F + setutent F + setutxent F + setvbuf F + setxattr F + sgetsgent F + sgetsgent_r F + sgetspent F + sgetspent_r F + shmat F + shmctl F + shmdt F + shmget F + shutdown F + sigaction F + sigaddset F + sigaltstack F + sigandset F + sigblock F + sigdelset F + sigemptyset F + sigfillset F + siggetmask F + sighold F + sigignore F + siginterrupt F + sigisemptyset F + sigismember F + siglongjmp F + signal F + signalfd F + sigorset F + sigpause F + sigpending F + sigprocmask F + sigqueue F + sigrelse F + sigreturn F + sigset F + sigsetmask F + sigstack F + sigsuspend F + sigtimedwait F + sigvec F + sigwait F + sigwaitinfo F + sleep F + snprintf F + sockatmark F + socket F + socketpair F + splice F + sprintf F + sprofil F + srand F + srand48 F + srand48_r F + srandom F + srandom_r F + sscanf F + ssignal F + sstk F + statfs F + statfs64 F + statvfs F + statvfs64 F + stderr D 0x8 + stdin D 0x8 + stdout D 0x8 + step F + stime F + stpcpy F + stpncpy F + strcasecmp F + strcasecmp_l F + strcasestr F + strcat F + strchr F + strchrnul F + strcmp F + strcoll F + strcoll_l F + strcpy F + strcspn F + strdup F + strerror F + strerror_l F + strerror_r F + strfmon F + strfmon_l F + strfry F + strftime F + strftime_l F + strlen F + strncasecmp F + strncasecmp_l F + strncat F + strncmp F + strncpy F + strndup F + strnlen F + strpbrk F + strptime F + strptime_l F + strrchr F + strsep F + strsignal F + strspn F + strstr F + strtod F + strtod_l F + strtof F + strtof_l F + strtoimax F + strtok F + strtok_r F + strtol F + strtol_l F + strtold F + strtold_l F + strtoll F + strtoll_l F + strtoq F + strtoul F + strtoul_l F + strtoull F + strtoull_l F + strtoumax F + strtouq F + strverscmp F + strxfrm F + strxfrm_l F + stty F + svc_exit F + svc_fdset D 0x80 + svc_getreq F + svc_getreq_common F + svc_getreq_poll F + svc_getreqset F + svc_max_pollfd D 0x4 + svc_pollfd D 0x8 + svc_register F + svc_run F + svc_sendreply F + svc_unregister F + svcauthdes_stats D 0x18 + svcerr_auth F + svcerr_decode F + svcerr_noproc F + svcerr_noprog F + svcerr_progvers F + svcerr_systemerr F + svcerr_weakauth F + svcfd_create F + svcraw_create F + svctcp_create F + svcudp_bufcreate F + svcudp_create F + svcudp_enablecache F + svcunix_create F + svcunixfd_create F + swab F + swapcontext F + swapoff F + swapon F + swprintf F + swscanf F + symlink F + symlinkat F + sync F + sync_file_range F + sys_errlist D 0x438 + sys_nerr D 0x4 + sys_sigabbrev D 0x208 + sys_siglist D 0x208 + syscall F + sysconf F + sysctl F + sysinfo F + syslog F + system F + sysv_signal F + tcdrain F + tcflow F + tcflush F + tcgetattr F + tcgetpgrp F + tcgetsid F + tcsendbreak F + tcsetattr F + tcsetpgrp F + tdelete F + tdestroy F + tee F + telldir F + tempnam F + textdomain F + tfind F + time F + timegm F + timelocal F + timerfd_create F + timerfd_gettime F + timerfd_settime F + times F + timezone D 0x8 + tmpfile F + tmpfile64 F + tmpnam F + tmpnam_r F + toascii F + tolower F + tolower_l F + toupper F + toupper_l F + towctrans F + towctrans_l F + towlower F + towlower_l F + towupper F + towupper_l F + tr_break F + truncate F + truncate64 F + tsearch F + ttyname F + ttyname_r F + ttyslot F + twalk F + tzname D 0x10 + tzset F + ualarm F + ulckpwdf F + ulimit F + umask F + umount F + umount2 F + uname F + ungetc F + ungetwc F + unlink F + unlinkat F + unlockpt F + unsetenv F + unshare F + updwtmp F + updwtmpx F + uselib F + uselocale F + user2netname F + usleep F + ustat F + utime F + utimensat F + utimes F + utmpname F + utmpxname F + valloc F + vasprintf F + vdprintf F + verr F + verrx F + versionsort F + versionsort64 F + vfork F + vfprintf F + vfscanf F + vfwprintf F + vfwscanf F + vhangup F + vlimit F + vmsplice F + vprintf F + vscanf F + vsnprintf F + vsprintf F + vsscanf F + vswprintf F + vswscanf F + vsyslog F + vtimes F + vwarn F + vwarnx F + vwprintf F + vwscanf F + wait F + wait3 F + wait4 F + waitid F + waitpid F + warn F + warnx F + wcpcpy F + wcpncpy F + wcrtomb F + wcscasecmp F + wcscasecmp_l F + wcscat F + wcschr F + wcschrnul F + wcscmp F + wcscoll F + wcscoll_l F + wcscpy F + wcscspn F + wcsdup F + wcsftime F + wcsftime_l F + wcslen F + wcsncasecmp F + wcsncasecmp_l F + wcsncat F + wcsncmp F + wcsncpy F + wcsnlen F + wcsnrtombs F + wcspbrk F + wcsrchr F + wcsrtombs F + wcsspn F + wcsstr F + wcstod F + wcstod_l F + wcstof F + wcstof_l F + wcstoimax F + wcstok F + wcstol F + wcstol_l F + wcstold F + wcstold_l F + wcstoll F + wcstoll_l F + wcstombs F + wcstoq F + wcstoul F + wcstoul_l F + wcstoull F + wcstoull_l F + wcstoumax F + wcstouq F + wcswcs F + wcswidth F + wcsxfrm F + wcsxfrm_l F + wctob F + wctomb F + wctrans F + wctrans_l F + wctype F + wctype_l F + wcwidth F + wmemchr F + wmemcmp F + wmemcpy F + wmemmove F + wmempcpy F + wmemset F + wordexp F + wordfree F + wprintf F + write F + writev F + wscanf F + xdecrypt F + xdr_accepted_reply F + xdr_array F + xdr_authdes_cred F + xdr_authdes_verf F + xdr_authunix_parms F + xdr_bool F + xdr_bytes F + xdr_callhdr F + xdr_callmsg F + xdr_char F + xdr_cryptkeyarg F + xdr_cryptkeyarg2 F + xdr_cryptkeyres F + xdr_des_block F + xdr_double F + xdr_enum F + xdr_float F + xdr_free F + xdr_getcredres F + xdr_hyper F + xdr_int F + xdr_int16_t F + xdr_int32_t F + xdr_int64_t F + xdr_int8_t F + xdr_key_netstarg F + xdr_key_netstres F + xdr_keybuf F + xdr_keystatus F + xdr_long F + xdr_longlong_t F + xdr_netnamestr F + xdr_netobj F + xdr_opaque F + xdr_opaque_auth F + xdr_pmap F + xdr_pmaplist F + xdr_pointer F + xdr_quad_t F + xdr_reference F + xdr_rejected_reply F + xdr_replymsg F + xdr_rmtcall_args F + xdr_rmtcallres F + xdr_short F + xdr_sizeof F + xdr_string F + xdr_u_char F + xdr_u_hyper F + xdr_u_int F + xdr_u_long F + xdr_u_longlong_t F + xdr_u_quad_t F + xdr_u_short F + xdr_uint16_t F + xdr_uint32_t F + xdr_uint64_t F + xdr_uint8_t F + xdr_union F + xdr_unixcred F + xdr_vector F + xdr_void F + xdr_wrapstring F + xdrmem_create F + xdrrec_create F + xdrrec_endofrecord F + xdrrec_eof F + xdrrec_skiprecord F + xdrstdio_create F + xencrypt F + xprt_register F + xprt_unregister F +GLIBC_2.15 + GLIBC_2.15 A + __fdelt_chk F + __fdelt_warn F + clock_adjtime F + fanotify_init F + fanotify_mark F + name_to_handle_at F + open_by_handle_at F + posix_spawn F + posix_spawnp F + prlimit F + prlimit64 F + process_vm_readv F + process_vm_writev F + scandirat F + scandirat64 F + sendmmsg F + setns F + syncfs F +GLIBC_2.16 + GLIBC_2.16 A + __poll_chk F + __ppoll_chk F + aligned_alloc F + c16rtomb F + c32rtomb F + mbrtoc16 F + mbrtoc32 F + timespec_get F diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libcrypt.abilist b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libcrypt.abilist new file mode 100644 index 0000000000..608e5df0b1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libcrypt.abilist @@ -0,0 +1,9 @@ +GLIBC_2.12 + GLIBC_2.12 A + crypt F + crypt_r F + encrypt F + encrypt_r F + fcrypt F + setkey F + setkey_r F diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libdl.abilist b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libdl.abilist new file mode 100644 index 0000000000..27a72281b7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libdl.abilist @@ -0,0 +1,11 @@ +GLIBC_2.12 + GLIBC_2.12 A + dladdr F + dladdr1 F + dlclose F + dlerror F + dlinfo F + dlmopen F + dlopen F + dlsym F + dlvsym F diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libm.abilist b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libm.abilist new file mode 100644 index 0000000000..ab2a40f202 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libm.abilist @@ -0,0 +1,368 @@ +GLIBC_2.12 + GLIBC_2.12 A + _LIB_VERSION D 0x4 + __clog10 F + __clog10f F + __clog10l F + __finite F + __finitef F + __fpclassify F + __fpclassifyf F + __signbit F + __signbitf F + acos F + acosf F + acosh F + acoshf F + acoshl F + acosl F + asin F + asinf F + asinh F + asinhf F + asinhl F + asinl F + atan F + atan2 F + atan2f F + atan2l F + atanf F + atanh F + atanhf F + atanhl F + atanl F + cabs F + cabsf F + cabsl F + cacos F + cacosf F + cacosh F + cacoshf F + cacoshl F + cacosl F + carg F + cargf F + cargl F + casin F + casinf F + casinh F + casinhf F + casinhl F + casinl F + catan F + catanf F + catanh F + catanhf F + catanhl F + catanl F + cbrt F + cbrtf F + cbrtl F + ccos F + ccosf F + ccosh F + ccoshf F + ccoshl F + ccosl F + ceil F + ceilf F + ceill F + cexp F + cexpf F + cexpl F + cimag F + cimagf F + cimagl F + clog F + clog10 F + clog10f F + clog10l F + clogf F + clogl F + conj F + conjf F + conjl F + copysign F + copysignf F + copysignl F + cos F + cosf F + cosh F + coshf F + coshl F + cosl F + cpow F + cpowf F + cpowl F + cproj F + cprojf F + cprojl F + creal F + crealf F + creall F + csin F + csinf F + csinh F + csinhf F + csinhl F + csinl F + csqrt F + csqrtf F + csqrtl F + ctan F + ctanf F + ctanh F + ctanhf F + ctanhl F + ctanl F + drem F + dremf F + dreml F + erf F + erfc F + erfcf F + erfcl F + erff F + erfl F + exp F + exp10 F + exp10f F + exp10l F + exp2 F + exp2f F + exp2l F + expf F + expl F + expm1 F + expm1f F + expm1l F + fabs F + fabsf F + fabsl F + fdim F + fdimf F + fdiml F + feclearexcept F + fedisableexcept F + feenableexcept F + fegetexcept F + fegetexceptflag F + fegetround F + feholdexcept F + feraiseexcept F + fesetenv F + fesetexceptflag F + fesetround F + fetestexcept F + feupdateenv F + finite F + finitef F + finitel F + floor F + floorf F + floorl F + fma F + fmaf F + fmal F + fmax F + fmaxf F + fmaxl F + fmin F + fminf F + fminl F + fmod F + fmodf F + fmodl F + frexp F + frexpf F + frexpl F + gamma F + gammaf F + gammal F + hypot F + hypotf F + hypotl F + ilogb F + ilogbf F + ilogbl F + j0 F + j0f F + j0l F + j1 F + j1f F + j1l F + jn F + jnf F + jnl F + ldexp F + ldexpf F + ldexpl F + lgamma F + lgamma_r F + lgammaf F + lgammaf_r F + lgammal F + lgammal_r F + llrint F + llrintf F + llrintl F + llround F + llroundf F + llroundl F + log F + log10 F + log10f F + log10l F + log1p F + log1pf F + log1pl F + log2 F + log2f F + log2l F + logb F + logbf F + logbl F + logf F + logl F + lrint F + lrintf F + lrintl F + lround F + lroundf F + lroundl F + matherr F + modf F + modff F + modfl F + nan F + nanf F + nanl F + nearbyint F + nearbyintf F + nearbyintl F + nextafter F + nextafterf F + nextafterl F + nexttoward F + nexttowardf F + nexttowardl F + pow F + pow10 F + pow10f F + pow10l F + powf F + powl F + remainder F + remainderf F + remainderl F + remquo F + remquof F + remquol F + rint F + rintf F + rintl F + round F + roundf F + roundl F + scalb F + scalbf F + scalbl F + scalbln F + scalblnf F + scalblnl F + scalbn F + scalbnf F + scalbnl F + signgam D 0x4 + significand F + significandf F + significandl F + sin F + sincos F + sincosf F + sincosl F + sinf F + sinh F + sinhf F + sinhl F + sinl F + sqrt F + sqrtf F + sqrtl F + tan F + tanf F + tanh F + tanhf F + tanhl F + tanl F + tgamma F + tgammaf F + tgammal F + trunc F + truncf F + truncl F + y0 F + y0f F + y0l F + y1 F + y1f F + y1l F + yn F + ynf F + ynl F +GLIBC_2.15 + GLIBC_2.15 A + __acos_finite F + __acosf_finite F + __acosh_finite F + __acoshf_finite F + __asin_finite F + __asinf_finite F + __atan2_finite F + __atan2f_finite F + __atanh_finite F + __atanhf_finite F + __cosh_finite F + __coshf_finite F + __exp10_finite F + __exp10f_finite F + __exp2_finite F + __exp2f_finite F + __exp_finite F + __expf_finite F + __fmod_finite F + __fmodf_finite F + __gamma_r_finite F + __gammaf_r_finite F + __hypot_finite F + __hypotf_finite F + __j0_finite F + __j0f_finite F + __j1_finite F + __j1f_finite F + __jn_finite F + __jnf_finite F + __lgamma_r_finite F + __lgammaf_r_finite F + __log10_finite F + __log10f_finite F + __log2_finite F + __log2f_finite F + __log_finite F + __logf_finite F + __pow_finite F + __powf_finite F + __remainder_finite F + __remainderf_finite F + __scalb_finite F + __scalbf_finite F + __sinh_finite F + __sinhf_finite F + __sqrt_finite F + __sqrtf_finite F + __y0_finite F + __y0f_finite F + __y1_finite F + __y1f_finite F + __yn_finite F + __ynf_finite F diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libnsl.abilist b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libnsl.abilist new file mode 100644 index 0000000000..e4217934c8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libnsl.abilist @@ -0,0 +1,123 @@ +GLIBC_2.12 + GLIBC_2.12 A + __free_fdresult F + __nis_default_access F + __nis_default_group F + __nis_default_owner F + __nis_default_ttl F + __nis_finddirectory F + __nis_hash F + __nisbind_connect F + __nisbind_create F + __nisbind_destroy F + __nisbind_next F + __yp_check F + nis_add F + nis_add_entry F + nis_addmember F + nis_checkpoint F + nis_clone_directory F + nis_clone_object F + nis_clone_result F + nis_creategroup F + nis_destroy_object F + nis_destroygroup F + nis_dir_cmp F + nis_domain_of F + nis_domain_of_r F + nis_first_entry F + nis_free_directory F + nis_free_object F + nis_free_request F + nis_freenames F + nis_freeresult F + nis_freeservlist F + nis_freetags F + nis_getnames F + nis_getservlist F + nis_ismember F + nis_leaf_of F + nis_leaf_of_r F + nis_lerror F + nis_list F + nis_local_directory F + nis_local_group F + nis_local_host F + nis_local_principal F + nis_lookup F + nis_mkdir F + nis_modify F + nis_modify_entry F + nis_name_of F + nis_name_of_r F + nis_next_entry F + nis_perror F + nis_ping F + nis_print_directory F + nis_print_entry F + nis_print_group F + nis_print_group_entry F + nis_print_link F + nis_print_object F + nis_print_result F + nis_print_rights F + nis_print_table F + nis_read_obj F + nis_remove F + nis_remove_entry F + nis_removemember F + nis_rmdir F + nis_servstate F + nis_sperrno F + nis_sperror F + nis_sperror_r F + nis_stats F + nis_verifygroup F + nis_write_obj F + readColdStartFile F + writeColdStartFile F + xdr_cback_data F + xdr_domainname F + xdr_keydat F + xdr_mapname F + xdr_obj_p F + xdr_peername F + xdr_valdat F + xdr_yp_buf F + xdr_ypall F + xdr_ypbind_binding F + xdr_ypbind_resp F + xdr_ypbind_resptype F + xdr_ypbind_setdom F + xdr_ypdelete_args F + xdr_ypmap_parms F + xdr_ypmaplist F + xdr_yppush_status F + xdr_yppushresp_xfr F + xdr_ypreq_key F + xdr_ypreq_nokey F + xdr_ypreq_xfr F + xdr_ypresp_all F + xdr_ypresp_key_val F + xdr_ypresp_maplist F + xdr_ypresp_master F + xdr_ypresp_order F + xdr_ypresp_val F + xdr_ypresp_xfr F + xdr_ypstat F + xdr_ypupdate_args F + xdr_ypxfrstat F + yp_all F + yp_bind F + yp_first F + yp_get_default_domain F + yp_maplist F + yp_master F + yp_match F + yp_next F + yp_order F + yp_unbind F + yp_update F + ypbinderr_string F + yperr_string F + ypprot_err F diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libpthread.abilist b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libpthread.abilist new file mode 100644 index 0000000000..3ab004605a --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libpthread.abilist @@ -0,0 +1,225 @@ +GLIBC_2.12 + GLIBC_2.12 A + _IO_flockfile F + _IO_ftrylockfile F + _IO_funlockfile F + __close F + __connect F + __errno_location F + __fcntl F + __fork F + __h_errno_location F + __libc_allocate_rtsig F + __libc_current_sigrtmax F + __libc_current_sigrtmin F + __lseek F + __nanosleep F + __open F + __open64 F + __pread64 F + __pthread_cleanup_routine F + __pthread_getspecific F + __pthread_key_create F + __pthread_mutex_destroy F + __pthread_mutex_init F + __pthread_mutex_lock F + __pthread_mutex_trylock F + __pthread_mutex_unlock F + __pthread_mutexattr_destroy F + __pthread_mutexattr_init F + __pthread_mutexattr_settype F + __pthread_once F + __pthread_register_cancel F + __pthread_register_cancel_defer F + __pthread_rwlock_destroy F + __pthread_rwlock_init F + __pthread_rwlock_rdlock F + __pthread_rwlock_tryrdlock F + __pthread_rwlock_trywrlock F + __pthread_rwlock_unlock F + __pthread_rwlock_wrlock F + __pthread_setspecific F + __pthread_unregister_cancel F + __pthread_unregister_cancel_restore F + __pthread_unwind_next F + __pwrite64 F + __read F + __res_state F + __send F + __sigaction F + __vfork F + __wait F + __write F + _pthread_cleanup_pop F + _pthread_cleanup_pop_restore F + _pthread_cleanup_push F + _pthread_cleanup_push_defer F + accept F + close F + connect F + fcntl F + flockfile F + fork F + fsync F + ftrylockfile F + funlockfile F + longjmp F + lseek F + lseek64 F + msync F + nanosleep F + open F + open64 F + pause F + pread F + pread64 F + pthread_atfork F + pthread_attr_destroy F + pthread_attr_getaffinity_np F + pthread_attr_getdetachstate F + pthread_attr_getguardsize F + pthread_attr_getinheritsched F + pthread_attr_getschedparam F + pthread_attr_getschedpolicy F + pthread_attr_getscope F + pthread_attr_getstack F + pthread_attr_getstackaddr F + pthread_attr_getstacksize F + pthread_attr_init F + pthread_attr_setaffinity_np F + pthread_attr_setdetachstate F + pthread_attr_setguardsize F + pthread_attr_setinheritsched F + pthread_attr_setschedparam F + pthread_attr_setschedpolicy F + pthread_attr_setscope F + pthread_attr_setstack F + pthread_attr_setstackaddr F + pthread_attr_setstacksize F + pthread_barrier_destroy F + pthread_barrier_init F + pthread_barrier_wait F + pthread_barrierattr_destroy F + pthread_barrierattr_getpshared F + pthread_barrierattr_init F + pthread_barrierattr_setpshared F + pthread_cancel F + pthread_cond_broadcast F + pthread_cond_destroy F + pthread_cond_init F + pthread_cond_signal F + pthread_cond_timedwait F + pthread_cond_wait F + pthread_condattr_destroy F + pthread_condattr_getclock F + pthread_condattr_getpshared F + pthread_condattr_init F + pthread_condattr_setclock F + pthread_condattr_setpshared F + pthread_create F + pthread_detach F + pthread_equal F + pthread_exit F + pthread_getaffinity_np F + pthread_getattr_np F + pthread_getconcurrency F + pthread_getcpuclockid F + pthread_getname_np F + pthread_getschedparam F + pthread_getspecific F + pthread_join F + pthread_key_create F + pthread_key_delete F + pthread_kill F + pthread_kill_other_threads_np F + pthread_mutex_consistent F + pthread_mutex_consistent_np F + pthread_mutex_destroy F + pthread_mutex_getprioceiling F + pthread_mutex_init F + pthread_mutex_lock F + pthread_mutex_setprioceiling F + pthread_mutex_timedlock F + pthread_mutex_trylock F + pthread_mutex_unlock F + pthread_mutexattr_destroy F + pthread_mutexattr_getkind_np F + pthread_mutexattr_getprioceiling F + pthread_mutexattr_getprotocol F + pthread_mutexattr_getpshared F + pthread_mutexattr_getrobust F + pthread_mutexattr_getrobust_np F + pthread_mutexattr_gettype F + pthread_mutexattr_init F + pthread_mutexattr_setkind_np F + pthread_mutexattr_setprioceiling F + pthread_mutexattr_setprotocol F + pthread_mutexattr_setpshared F + pthread_mutexattr_setrobust F + pthread_mutexattr_setrobust_np F + pthread_mutexattr_settype F + pthread_once F + pthread_rwlock_destroy F + pthread_rwlock_init F + pthread_rwlock_rdlock F + pthread_rwlock_timedrdlock F + pthread_rwlock_timedwrlock F + pthread_rwlock_tryrdlock F + pthread_rwlock_trywrlock F + pthread_rwlock_unlock F + pthread_rwlock_wrlock F + pthread_rwlockattr_destroy F + pthread_rwlockattr_getkind_np F + pthread_rwlockattr_getpshared F + pthread_rwlockattr_init F + pthread_rwlockattr_setkind_np F + pthread_rwlockattr_setpshared F + pthread_self F + pthread_setaffinity_np F + pthread_setcancelstate F + pthread_setcanceltype F + pthread_setconcurrency F + pthread_setname_np F + pthread_setschedparam F + pthread_setschedprio F + pthread_setspecific F + pthread_sigmask F + pthread_sigqueue F + pthread_spin_destroy F + pthread_spin_init F + pthread_spin_lock F + pthread_spin_trylock F + pthread_spin_unlock F + pthread_testcancel F + pthread_timedjoin_np F + pthread_tryjoin_np F + pthread_yield F + pwrite F + pwrite64 F + raise F + read F + recv F + recvfrom F + recvmsg F + sem_close F + sem_destroy F + sem_getvalue F + sem_init F + sem_open F + sem_post F + sem_timedwait F + sem_trywait F + sem_unlink F + sem_wait F + send F + sendmsg F + sendto F + sigaction F + siglongjmp F + sigwait F + system F + tcdrain F + vfork F + wait F + waitpid F + write F diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libresolv.abilist b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libresolv.abilist new file mode 100644 index 0000000000..dcb82acc01 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libresolv.abilist @@ -0,0 +1,93 @@ +GLIBC_2.12 + GLIBC_2.12 A + __b64_ntop F + __b64_pton F + __dn_comp F + __dn_count_labels F + __dn_expand F + __dn_skipname F + __fp_nquery F + __fp_query F + __fp_resstat F + __hostalias F + __loc_aton F + __loc_ntoa F + __p_cdname F + __p_cdnname F + __p_class F + __p_class_syms D 0xa8 + __p_fqname F + __p_fqnname F + __p_option F + __p_query F + __p_rcode F + __p_secstodate F + __p_time F + __p_type F + __p_type_syms D 0x450 + __putlong F + __putshort F + __res_close F + __res_dnok F + __res_hnok F + __res_hostalias F + __res_isourserver F + __res_mailok F + __res_mkquery F + __res_nameinquery F + __res_nmkquery F + __res_nquery F + __res_nquerydomain F + __res_nsearch F + __res_nsend F + __res_ownok F + __res_queriesmatch F + __res_query F + __res_querydomain F + __res_search F + __res_send F + __sym_ntop F + __sym_ntos F + __sym_ston F + _gethtbyaddr F + _gethtbyname F + _gethtbyname2 F + _gethtent F + _getlong F + _getshort F + _res_opcodes D 0x80 + _sethtent F + inet_net_ntop F + inet_net_pton F + inet_neta F + ns_datetosecs F + ns_format_ttl F + ns_get16 F + ns_get32 F + ns_initparse F + ns_makecanon F + ns_msg_getflag F + ns_name_compress F + ns_name_ntol F + ns_name_ntop F + ns_name_pack F + ns_name_pton F + ns_name_rollback F + ns_name_skip F + ns_name_uncompress F + ns_name_unpack F + ns_parse_ttl F + ns_parserr F + ns_put16 F + ns_put32 F + ns_samedomain F + ns_samename F + ns_skiprr F + ns_sprintrr F + ns_sprintrrf F + ns_subdomain F + res_gethostbyaddr F + res_gethostbyname F + res_gethostbyname2 F + res_send_setqhook F + res_send_setrhook F diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/librt.abilist b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/librt.abilist new file mode 100644 index 0000000000..87fec065af --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/librt.abilist @@ -0,0 +1,42 @@ +GLIBC_2.12 + GLIBC_2.12 A + __mq_open_2 F + aio_cancel F + aio_cancel64 F + aio_error F + aio_error64 F + aio_fsync F + aio_fsync64 F + aio_init F + aio_read F + aio_read64 F + aio_return F + aio_return64 F + aio_suspend F + aio_suspend64 F + aio_write F + aio_write64 F + clock_getcpuclockid F + clock_getres F + clock_gettime F + clock_nanosleep F + clock_settime F + lio_listio F + lio_listio64 F + mq_close F + mq_getattr F + mq_notify F + mq_open F + mq_receive F + mq_send F + mq_setattr F + mq_timedreceive F + mq_timedsend F + mq_unlink F + shm_open F + shm_unlink F + timer_create F + timer_delete F + timer_getoverrun F + timer_gettime F + timer_settime F diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libthread_db.abilist b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libthread_db.abilist new file mode 100644 index 0000000000..934ce9acd6 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libthread_db.abilist @@ -0,0 +1,42 @@ +GLIBC_2.12 + GLIBC_2.12 A + td_init F + td_log F + td_symbol_list F + td_ta_clear_event F + td_ta_delete F + td_ta_enable_stats F + td_ta_event_addr F + td_ta_event_getmsg F + td_ta_get_nthreads F + td_ta_get_ph F + td_ta_get_stats F + td_ta_map_id2thr F + td_ta_map_lwp2thr F + td_ta_new F + td_ta_reset_stats F + td_ta_set_event F + td_ta_setconcurrency F + td_ta_thr_iter F + td_ta_tsd_iter F + td_thr_clear_event F + td_thr_dbresume F + td_thr_dbsuspend F + td_thr_event_enable F + td_thr_event_getmsg F + td_thr_get_info F + td_thr_getfpregs F + td_thr_getgregs F + td_thr_getxregs F + td_thr_getxregsize F + td_thr_set_event F + td_thr_setfpregs F + td_thr_setgregs F + td_thr_setprio F + td_thr_setsigpending F + td_thr_setxregs F + td_thr_sigsetmask F + td_thr_tls_get_addr F + td_thr_tlsbase F + td_thr_tsd F + td_thr_validate F diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libutil.abilist b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libutil.abilist new file mode 100644 index 0000000000..50c312a7c6 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libutil.abilist @@ -0,0 +1,8 @@ +GLIBC_2.12 + GLIBC_2.12 A + forkpty F + login F + login_tty F + logout F + logwtmp F + openpty F diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/nptl/ld.abilist b/sysdeps/unix/sysv/linux/tile/tilepro/nptl/ld.abilist new file mode 100644 index 0000000000..4367346594 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilepro/nptl/ld.abilist @@ -0,0 +1,11 @@ +GLIBC_2.12 + GLIBC_2.12 A + __libc_memalign F + __libc_stack_end D 0x4 + __tls_get_addr F + _dl_mcount F + _r_debug D 0x14 + calloc F + free F + malloc F + realloc F diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libBrokenLocale.abilist b/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libBrokenLocale.abilist new file mode 100644 index 0000000000..4af9128544 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libBrokenLocale.abilist @@ -0,0 +1,3 @@ +GLIBC_2.12 + GLIBC_2.12 A + __ctype_get_mb_cur_max F diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libanl.abilist b/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libanl.abilist new file mode 100644 index 0000000000..29e602a75a --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libanl.abilist @@ -0,0 +1,6 @@ +GLIBC_2.12 + GLIBC_2.12 A + gai_cancel F + gai_error F + gai_suspend F + getaddrinfo_a F diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libc.abilist b/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libc.abilist new file mode 100644 index 0000000000..e2e20be0b1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libc.abilist @@ -0,0 +1,2080 @@ +GLIBC_2.12 + GLIBC_2.12 A + _Exit F + _IO_2_1_stderr_ D 0xa0 + _IO_2_1_stdin_ D 0xa0 + _IO_2_1_stdout_ D 0xa0 + _IO_adjust_column F + _IO_adjust_wcolumn F + _IO_default_doallocate F + _IO_default_finish F + _IO_default_pbackfail F + _IO_default_uflow F + _IO_default_xsgetn F + _IO_default_xsputn F + _IO_do_write F + _IO_doallocbuf F + _IO_fclose F + _IO_fdopen F + _IO_feof F + _IO_ferror F + _IO_fflush F + _IO_fgetpos F + _IO_fgetpos64 F + _IO_fgets F + _IO_file_attach F + _IO_file_close F + _IO_file_close_it F + _IO_file_doallocate F + _IO_file_finish F + _IO_file_fopen F + _IO_file_init F + _IO_file_jumps D 0x54 + _IO_file_open F + _IO_file_overflow F + _IO_file_read F + _IO_file_seek F + _IO_file_seekoff F + _IO_file_setbuf F + _IO_file_stat F + _IO_file_sync F + _IO_file_underflow F + _IO_file_write F + _IO_file_xsputn F + _IO_flockfile F + _IO_flush_all F + _IO_flush_all_linebuffered F + _IO_fopen F + _IO_fprintf F + _IO_fputs F + _IO_fread F + _IO_free_backup_area F + _IO_free_wbackup_area F + _IO_fsetpos F + _IO_fsetpos64 F + _IO_ftell F + _IO_ftrylockfile F + _IO_funlockfile F + _IO_fwrite F + _IO_getc F + _IO_getline F + _IO_getline_info F + _IO_gets F + _IO_init F + _IO_init_marker F + _IO_init_wmarker F + _IO_iter_begin F + _IO_iter_end F + _IO_iter_file F + _IO_iter_next F + _IO_least_wmarker F + _IO_link_in F + _IO_list_all D 0x4 + _IO_list_lock F + _IO_list_resetlock F + _IO_list_unlock F + _IO_marker_delta F + _IO_marker_difference F + _IO_padn F + _IO_peekc_locked F + _IO_popen F + _IO_printf F + _IO_proc_close F + _IO_proc_open F + _IO_putc F + _IO_puts F + _IO_remove_marker F + _IO_seekmark F + _IO_seekoff F + _IO_seekpos F + _IO_seekwmark F + _IO_setb F + _IO_setbuffer F + _IO_setvbuf F + _IO_sgetn F + _IO_sprintf F + _IO_sputbackc F + _IO_sputbackwc F + _IO_sscanf F + _IO_str_init_readonly F + _IO_str_init_static F + _IO_str_overflow F + _IO_str_pbackfail F + _IO_str_seekoff F + _IO_str_underflow F + _IO_sungetc F + _IO_sungetwc F + _IO_switch_to_get_mode F + _IO_switch_to_main_wget_area F + _IO_switch_to_wbackup_area F + _IO_switch_to_wget_mode F + _IO_un_link F + _IO_ungetc F + _IO_unsave_markers F + _IO_unsave_wmarkers F + _IO_vfprintf F + _IO_vfscanf F + _IO_vsprintf F + _IO_wdefault_doallocate F + _IO_wdefault_finish F + _IO_wdefault_pbackfail F + _IO_wdefault_uflow F + _IO_wdefault_xsgetn F + _IO_wdefault_xsputn F + _IO_wdo_write F + _IO_wdoallocbuf F + _IO_wfile_jumps D 0x54 + _IO_wfile_overflow F + _IO_wfile_seekoff F + _IO_wfile_sync F + _IO_wfile_underflow F + _IO_wfile_xsputn F + _IO_wmarker_delta F + _IO_wsetb F + ___brk_addr D 0x4 + __adjtimex F + __after_morecore_hook D 0x4 + __argz_count F + __argz_next F + __argz_stringify F + __asprintf F + __asprintf_chk F + __assert F + __assert_fail F + __assert_perror_fail F + __backtrace F + __backtrace_symbols F + __backtrace_symbols_fd F + __bsd_getpgrp F + __bzero F + __check_rhosts_file D 0x4 + __chk_fail F + __clone F + __close F + __cmsg_nxthdr F + __confstr_chk F + __connect F + __ctype_b_loc F + __ctype_get_mb_cur_max F + __ctype_tolower_loc F + __ctype_toupper_loc F + __curbrk D 0x4 + __cxa_at_quick_exit F + __cxa_atexit F + __cxa_finalize F + __cyg_profile_func_enter F + __cyg_profile_func_exit F + __daylight D 0x4 + __dcgettext F + __default_morecore F + __dgettext F + __dprintf_chk F + __dup2 F + __duplocale F + __endmntent F + __environ D 0x4 + __errno_location F + __fbufsize F + __fcntl F + __ffs F + __fgets_chk F + __fgets_unlocked_chk F + __fgetws_chk F + __fgetws_unlocked_chk F + __finite F + __finitef F + __flbf F + __fork F + __fpending F + __fprintf_chk F + __fpu_control D 0x4 + __fpurge F + __fread_chk F + __fread_unlocked_chk F + __freadable F + __freading F + __free_hook D 0x4 + __freelocale F + __fsetlocking F + __fwprintf_chk F + __fwritable F + __fwriting F + __fxstat F + __fxstat64 F + __fxstatat F + __fxstatat64 F + __getcwd_chk F + __getdelim F + __getdomainname_chk F + __getgroups_chk F + __gethostname_chk F + __getlogin_r_chk F + __getmntent_r F + __getpagesize F + __getpgid F + __getpid F + __gets_chk F + __gettimeofday F + __getwd_chk F + __gmtime_r F + __h_errno_location F + __isalnum_l F + __isalpha_l F + __isascii_l F + __isblank_l F + __iscntrl_l F + __isctype F + __isdigit_l F + __isgraph_l F + __isinf F + __isinff F + __islower_l F + __isnan F + __isnanf F + __isoc99_fscanf F + __isoc99_fwscanf F + __isoc99_scanf F + __isoc99_sscanf F + __isoc99_swscanf F + __isoc99_vfscanf F + __isoc99_vfwscanf F + __isoc99_vscanf F + __isoc99_vsscanf F + __isoc99_vswscanf F + __isoc99_vwscanf F + __isoc99_wscanf F + __isprint_l F + __ispunct_l F + __isspace_l F + __isupper_l F + __iswalnum_l F + __iswalpha_l F + __iswblank_l F + __iswcntrl_l F + __iswctype F + __iswctype_l F + __iswdigit_l F + __iswgraph_l F + __iswlower_l F + __iswprint_l F + __iswpunct_l F + __iswspace_l F + __iswupper_l F + __iswxdigit_l F + __isxdigit_l F + __ivaliduser F + __key_decryptsession_pk_LOCAL D 0x4 + __key_encryptsession_pk_LOCAL D 0x4 + __key_gendes_LOCAL D 0x4 + __libc_allocate_rtsig F + __libc_calloc F + __libc_current_sigrtmax F + __libc_current_sigrtmin F + __libc_free F + __libc_freeres F + __libc_init_first F + __libc_mallinfo F + __libc_malloc F + __libc_mallopt F + __libc_memalign F + __libc_pvalloc F + __libc_realloc F + __libc_sa_len F + __libc_start_main F + __libc_valloc F + __longjmp_chk F + __lseek F + __lxstat F + __lxstat64 F + __malloc_hook D 0x4 + __malloc_initialize_hook D 0x4 + __mbrlen F + __mbrtowc F + __mbsnrtowcs_chk F + __mbsrtowcs_chk F + __mbstowcs_chk F + __mcount F + __memalign_hook D 0x4 + __memcpy_chk F + __memmove_chk F + __mempcpy F + __mempcpy_chk F + __mempcpy_small F + __memset_chk F + __monstartup F + __morecore D 0x4 + __nanosleep F + __newlocale F + __nl_langinfo_l F + __nss_configure_lookup F + __nss_database_lookup F + __nss_group_lookup F + __nss_hostname_digits_dots F + __nss_hosts_lookup F + __nss_next F + __nss_passwd_lookup F + __obstack_printf_chk F + __obstack_vprintf_chk F + __open F + __open64 F + __open64_2 F + __open_2 F + __openat64_2 F + __openat_2 F + __overflow F + __pipe F + __poll F + __posix_getopt F + __pread64 F + __pread64_chk F + __pread_chk F + __printf_chk F + __printf_fp F + __profile_frequency F + __progname D 0x4 + __progname_full D 0x4 + __ptsname_r_chk F + __pwrite64 F + __rawmemchr F + __rcmd_errstr D 0x4 + __read F + __read_chk F + __readlink_chk F + __readlinkat_chk F + __realloc_hook D 0x4 + __realpath_chk F + __recv_chk F + __recvfrom_chk F + __register_atfork F + __res_init F + __res_nclose F + __res_ninit F + __res_randomid F + __res_state F + __rpc_thread_createerr F + __rpc_thread_svc_fdset F + __rpc_thread_svc_max_pollfd F + __rpc_thread_svc_pollfd F + __sbrk F + __sched_cpualloc F + __sched_cpucount F + __sched_cpufree F + __sched_get_priority_max F + __sched_get_priority_min F + __sched_getparam F + __sched_getscheduler F + __sched_setscheduler F + __sched_yield F + __secure_getenv F + __select F + __setmntent F + __setpgid F + __sigaction F + __sigaddset F + __sigdelset F + __sigismember F + __signbit F + __signbitf F + __sigpause F + __sigsetjmp F + __sigsuspend F + __snprintf_chk F + __sprintf_chk F + __stack_chk_fail F + __statfs F + __stpcpy F + __stpcpy_chk F + __stpcpy_small F + __stpncpy F + __stpncpy_chk F + __strcasecmp F + __strcasecmp_l F + __strcasestr F + __strcat_chk F + __strcoll_l F + __strcpy_chk F + __strcpy_small F + __strcspn_c1 F + __strcspn_c2 F + __strcspn_c3 F + __strdup F + __strerror_r F + __strfmon_l F + __strftime_l F + __strncasecmp_l F + __strncat_chk F + __strncpy_chk F + __strndup F + __strpbrk_c2 F + __strpbrk_c3 F + __strsep_1c F + __strsep_2c F + __strsep_3c F + __strsep_g F + __strspn_c1 F + __strspn_c2 F + __strspn_c3 F + __strtod_internal F + __strtod_l F + __strtof_internal F + __strtof_l F + __strtok_r F + __strtok_r_1c F + __strtol_internal F + __strtol_l F + __strtold_internal F + __strtold_l F + __strtoll_internal F + __strtoll_l F + __strtoul_internal F + __strtoul_l F + __strtoull_internal F + __strtoull_l F + __strverscmp F + __strxfrm_l F + __swprintf_chk F + __sysconf F + __syslog_chk F + __sysv_signal F + __timezone D 0x4 + __toascii_l F + __tolower_l F + __toupper_l F + __towctrans F + __towctrans_l F + __towlower_l F + __towupper_l F + __ttyname_r_chk F + __tzname D 0x8 + __uflow F + __underflow F + __uselocale F + __vasprintf_chk F + __vdprintf_chk F + __vfork F + __vfprintf_chk F + __vfscanf F + __vfwprintf_chk F + __vprintf_chk F + __vsnprintf F + __vsnprintf_chk F + __vsprintf_chk F + __vsscanf F + __vswprintf_chk F + __vsyslog_chk F + __vwprintf_chk F + __wait F + __waitpid F + __wcpcpy_chk F + __wcpncpy_chk F + __wcrtomb_chk F + __wcscasecmp_l F + __wcscat_chk F + __wcscoll_l F + __wcscpy_chk F + __wcsftime_l F + __wcsncasecmp_l F + __wcsncat_chk F + __wcsncpy_chk F + __wcsnrtombs_chk F + __wcsrtombs_chk F + __wcstod_internal F + __wcstod_l F + __wcstof_internal F + __wcstof_l F + __wcstol_internal F + __wcstol_l F + __wcstold_internal F + __wcstold_l F + __wcstoll_internal F + __wcstoll_l F + __wcstombs_chk F + __wcstoul_internal F + __wcstoul_l F + __wcstoull_internal F + __wcstoull_l F + __wcsxfrm_l F + __wctomb_chk F + __wctrans_l F + __wctype_l F + __wmemcpy_chk F + __wmemmove_chk F + __wmempcpy_chk F + __wmemset_chk F + __woverflow F + __wprintf_chk F + __write F + __wuflow F + __wunderflow F + __xmknod F + __xmknodat F + __xpg_basename F + __xpg_sigpause F + __xpg_strerror_r F + __xstat F + __xstat64 F + _authenticate F + _dl_mcount_wrapper F + _dl_mcount_wrapper_check F + _environ D 0x4 + _exit F + _flush_cache F + _flushlbf F + _libc_intl_domainname D 0x5 + _longjmp F + _mcleanup F + _mcount F + _nl_default_dirname D 0x12 + _nl_domain_bindings D 0x4 + _nl_msg_cat_cntr D 0x4 + _null_auth D 0xc + _obstack_allocated_p F + _obstack_begin F + _obstack_begin_1 F + _obstack_free F + _obstack_memory_used F + _obstack_newchunk F + _res D 0x200 + _res_hconf D 0x30 + _rpc_dtablesize F + _seterr_reply F + _setjmp F + _sys_errlist D 0x21c + _sys_nerr D 0x4 + _sys_siglist D 0x104 + _tolower F + _toupper F + a64l F + abort F + abs F + accept F + accept4 F + access F + acct F + addmntent F + addseverity F + adjtime F + adjtimex F + advance F + alarm F + alphasort F + alphasort64 F + argp_err_exit_status D 0x4 + argp_error F + argp_failure F + argp_help F + argp_parse F + argp_program_bug_address D 0x4 + argp_program_version D 0x4 + argp_program_version_hook D 0x4 + argp_state_help F + argp_usage F + argz_add F + argz_add_sep F + argz_append F + argz_count F + argz_create F + argz_create_sep F + argz_delete F + argz_extract F + argz_insert F + argz_next F + argz_replace F + argz_stringify F + asctime F + asctime_r F + asprintf F + atof F + atoi F + atol F + atoll F + authdes_create F + authdes_getucred F + authdes_pk_create F + authnone_create F + authunix_create F + authunix_create_default F + backtrace F + backtrace_symbols F + backtrace_symbols_fd F + basename F + bcmp F + bcopy F + bdflush F + bind F + bind_textdomain_codeset F + bindresvport F + bindtextdomain F + brk F + bsd_signal F + bsearch F + btowc F + bzero F + cacheflush F + calloc F + callrpc F + canonicalize_file_name F + capget F + capset F + catclose F + catgets F + catopen F + cbc_crypt F + cfgetispeed F + cfgetospeed F + cfmakeraw F + cfree F + cfsetispeed F + cfsetospeed F + cfsetspeed F + chdir F + chflags F + chmod F + chown F + chroot F + clearenv F + clearerr F + clearerr_unlocked F + clnt_broadcast F + clnt_create F + clnt_pcreateerror F + clnt_perrno F + clnt_perror F + clnt_spcreateerror F + clnt_sperrno F + clnt_sperror F + clntraw_create F + clnttcp_create F + clntudp_bufcreate F + clntudp_create F + clntunix_create F + clock F + clone F + close F + closedir F + closelog F + confstr F + connect F + copysign F + copysignf F + copysignl F + creat F + creat64 F + create_module F + ctermid F + ctime F + ctime_r F + cuserid F + daemon F + daylight D 0x4 + dcgettext F + dcngettext F + delete_module F + des_setparity F + dgettext F + difftime F + dirfd F + dirname F + div F + dl_iterate_phdr F + dngettext F + dprintf F + drand48 F + drand48_r F + dup F + dup2 F + dup3 F + duplocale F + dysize F + eaccess F + ecb_crypt F + ecvt F + ecvt_r F + endaliasent F + endfsent F + endgrent F + endhostent F + endmntent F + endnetent F + endnetgrent F + endprotoent F + endpwent F + endrpcent F + endservent F + endsgent F + endspent F + endttyent F + endusershell F + endutent F + endutxent F + environ D 0x4 + envz_add F + envz_entry F + envz_get F + envz_merge F + envz_remove F + envz_strip F + epoll_create F + epoll_create1 F + epoll_ctl F + epoll_pwait F + epoll_wait F + erand48 F + erand48_r F + err F + error F + error_at_line F + error_message_count D 0x4 + error_one_per_line D 0x4 + error_print_progname D 0x4 + errx F + ether_aton F + ether_aton_r F + ether_hostton F + ether_line F + ether_ntoa F + ether_ntoa_r F + ether_ntohost F + euidaccess F + eventfd F + eventfd_read F + eventfd_write F + execl F + execle F + execlp F + execv F + execve F + execvp F + execvpe F + exit F + faccessat F + fallocate F + fallocate64 F + fattach F + fchdir F + fchflags F + fchmod F + fchmodat F + fchown F + fchownat F + fclose F + fcloseall F + fcntl F + fcvt F + fcvt_r F + fdatasync F + fdetach F + fdopen F + fdopendir F + feof F + feof_unlocked F + ferror F + ferror_unlocked F + fexecve F + fflush F + fflush_unlocked F + ffs F + ffsl F + ffsll F + fgetc F + fgetc_unlocked F + fgetgrent F + fgetgrent_r F + fgetpos F + fgetpos64 F + fgetpwent F + fgetpwent_r F + fgets F + fgets_unlocked F + fgetsgent F + fgetsgent_r F + fgetspent F + fgetspent_r F + fgetwc F + fgetwc_unlocked F + fgetws F + fgetws_unlocked F + fgetxattr F + fileno F + fileno_unlocked F + finite F + finitef F + finitel F + flistxattr F + flock F + flockfile F + fmemopen F + fmtmsg F + fnmatch F + fopen F + fopen64 F + fopencookie F + fork F + fpathconf F + fprintf F + fputc F + fputc_unlocked F + fputs F + fputs_unlocked F + fputwc F + fputwc_unlocked F + fputws F + fputws_unlocked F + fread F + fread_unlocked F + free F + freeaddrinfo F + freeifaddrs F + freelocale F + fremovexattr F + freopen F + freopen64 F + frexp F + frexpf F + frexpl F + fscanf F + fseek F + fseeko F + fseeko64 F + fsetpos F + fsetpos64 F + fsetxattr F + fstatfs F + fstatfs64 F + fstatvfs F + fstatvfs64 F + fsync F + ftell F + ftello F + ftello64 F + ftime F + ftok F + ftruncate F + ftruncate64 F + ftrylockfile F + fts_children F + fts_close F + fts_open F + fts_read F + fts_set F + ftw F + ftw64 F + funlockfile F + futimens F + futimes F + futimesat F + fwide F + fwprintf F + fwrite F + fwrite_unlocked F + fwscanf F + gai_strerror F + gcvt F + get_avphys_pages F + get_current_dir_name F + get_kernel_syms F + get_myaddress F + get_nprocs F + get_nprocs_conf F + get_phys_pages F + getaddrinfo F + getaliasbyname F + getaliasbyname_r F + getaliasent F + getaliasent_r F + getc F + getc_unlocked F + getchar F + getchar_unlocked F + getcontext F + getcwd F + getdate F + getdate_err D 0x4 + getdate_r F + getdelim F + getdirentries F + getdirentries64 F + getdomainname F + getdtablesize F + getegid F + getenv F + geteuid F + getfsent F + getfsfile F + getfsspec F + getgid F + getgrent F + getgrent_r F + getgrgid F + getgrgid_r F + getgrnam F + getgrnam_r F + getgrouplist F + getgroups F + gethostbyaddr F + gethostbyaddr_r F + gethostbyname F + gethostbyname2 F + gethostbyname2_r F + gethostbyname_r F + gethostent F + gethostent_r F + gethostid F + gethostname F + getifaddrs F + getipv4sourcefilter F + getitimer F + getline F + getloadavg F + getlogin F + getlogin_r F + getmntent F + getmntent_r F + getmsg F + getnameinfo F + getnetbyaddr F + getnetbyaddr_r F + getnetbyname F + getnetbyname_r F + getnetent F + getnetent_r F + getnetgrent F + getnetgrent_r F + getnetname F + getopt F + getopt_long F + getopt_long_only F + getpagesize F + getpass F + getpeername F + getpgid F + getpgrp F + getpid F + getpmsg F + getppid F + getpriority F + getprotobyname F + getprotobyname_r F + getprotobynumber F + getprotobynumber_r F + getprotoent F + getprotoent_r F + getpt F + getpublickey F + getpw F + getpwent F + getpwent_r F + getpwnam F + getpwnam_r F + getpwuid F + getpwuid_r F + getresgid F + getresuid F + getrlimit F + getrlimit64 F + getrpcbyname F + getrpcbyname_r F + getrpcbynumber F + getrpcbynumber_r F + getrpcent F + getrpcent_r F + getrpcport F + getrusage F + gets F + getsecretkey F + getservbyname F + getservbyname_r F + getservbyport F + getservbyport_r F + getservent F + getservent_r F + getsgent F + getsgent_r F + getsgnam F + getsgnam_r F + getsid F + getsockname F + getsockopt F + getsourcefilter F + getspent F + getspent_r F + getspnam F + getspnam_r F + getsubopt F + gettext F + gettimeofday F + getttyent F + getttynam F + getuid F + getusershell F + getutent F + getutent_r F + getutid F + getutid_r F + getutline F + getutline_r F + getutmp F + getutmpx F + getutxent F + getutxid F + getutxline F + getw F + getwc F + getwc_unlocked F + getwchar F + getwchar_unlocked F + getwd F + getxattr F + glob F + glob64 F + glob_pattern_p F + globfree F + globfree64 F + gmtime F + gmtime_r F + gnu_dev_major F + gnu_dev_makedev F + gnu_dev_minor F + gnu_get_libc_release F + gnu_get_libc_version F + grantpt F + group_member F + gsignal F + gtty F + h_errlist D 0x14 + h_nerr D 0x4 + hasmntopt F + hcreate F + hcreate_r F + hdestroy F + hdestroy_r F + herror F + host2netname F + hsearch F + hsearch_r F + hstrerror F + htonl F + htons F + iconv F + iconv_close F + iconv_open F + if_freenameindex F + if_indextoname F + if_nameindex F + if_nametoindex F + imaxabs F + imaxdiv F + in6addr_any D 0x10 + in6addr_loopback D 0x10 + index F + inet6_opt_append F + inet6_opt_find F + inet6_opt_finish F + inet6_opt_get_val F + inet6_opt_init F + inet6_opt_next F + inet6_opt_set_val F + inet6_option_alloc F + inet6_option_append F + inet6_option_find F + inet6_option_init F + inet6_option_next F + inet6_option_space F + inet6_rth_add F + inet6_rth_getaddr F + inet6_rth_init F + inet6_rth_reverse F + inet6_rth_segments F + inet6_rth_space F + inet_addr F + inet_aton F + inet_lnaof F + inet_makeaddr F + inet_netof F + inet_network F + inet_nsap_addr F + inet_nsap_ntoa F + inet_ntoa F + inet_ntop F + inet_pton F + init_module F + initgroups F + initstate F + initstate_r F + innetgr F + inotify_add_watch F + inotify_init F + inotify_init1 F + inotify_rm_watch F + insque F + ioctl F + iruserok F + iruserok_af F + isalnum F + isalnum_l F + isalpha F + isalpha_l F + isascii F + isastream F + isatty F + isblank F + isblank_l F + iscntrl F + iscntrl_l F + isctype F + isdigit F + isdigit_l F + isfdtype F + isgraph F + isgraph_l F + isinf F + isinff F + isinfl F + islower F + islower_l F + isnan F + isnanf F + isnanl F + isprint F + isprint_l F + ispunct F + ispunct_l F + isspace F + isspace_l F + isupper F + isupper_l F + iswalnum F + iswalnum_l F + iswalpha F + iswalpha_l F + iswblank F + iswblank_l F + iswcntrl F + iswcntrl_l F + iswctype F + iswctype_l F + iswdigit F + iswdigit_l F + iswgraph F + iswgraph_l F + iswlower F + iswlower_l F + iswprint F + iswprint_l F + iswpunct F + iswpunct_l F + iswspace F + iswspace_l F + iswupper F + iswupper_l F + iswxdigit F + iswxdigit_l F + isxdigit F + isxdigit_l F + jrand48 F + jrand48_r F + key_decryptsession F + key_decryptsession_pk F + key_encryptsession F + key_encryptsession_pk F + key_gendes F + key_get_conv F + key_secretkey_is_set F + key_setnet F + key_setsecret F + kill F + killpg F + klogctl F + l64a F + labs F + lchmod F + lchown F + lckpwdf F + lcong48 F + lcong48_r F + ldexp F + ldexpf F + ldexpl F + ldiv F + lfind F + lgetxattr F + link F + linkat F + listen F + listxattr F + llabs F + lldiv F + llistxattr F + llseek F + loc1 D 0x4 + loc2 D 0x4 + localeconv F + localtime F + localtime_r F + lockf F + lockf64 F + locs D 0x4 + longjmp F + lrand48 F + lrand48_r F + lremovexattr F + lsearch F + lseek F + lseek64 F + lsetxattr F + lutimes F + madvise F + makecontext F + mallinfo F + malloc F + malloc_get_state F + malloc_info F + malloc_set_state F + malloc_stats F + malloc_trim F + malloc_usable_size F + mallopt F + mallwatch D 0x4 + mblen F + mbrlen F + mbrtowc F + mbsinit F + mbsnrtowcs F + mbsrtowcs F + mbstowcs F + mbtowc F + mcheck F + mcheck_check_all F + mcheck_pedantic F + mcount F + memalign F + memccpy F + memchr F + memcmp F + memcpy F + memfrob F + memmem F + memmove F + mempcpy F + memrchr F + memset F + mincore F + mkdir F + mkdirat F + mkdtemp F + mkfifo F + mkfifoat F + mkostemp F + mkostemp64 F + mkostemps F + mkostemps64 F + mkstemp F + mkstemp64 F + mkstemps F + mkstemps64 F + mktemp F + mktime F + mlock F + mlockall F + mmap F + mmap64 F + modf F + modff F + modfl F + moncontrol F + monstartup F + mount F + mprobe F + mprotect F + mrand48 F + mrand48_r F + mremap F + msgctl F + msgget F + msgrcv F + msgsnd F + msync F + mtrace F + munlock F + munlockall F + munmap F + muntrace F + nanosleep F + netname2host F + netname2user F + newlocale F + nfsservctl F + nftw F + nftw64 F + ngettext F + nice F + nl_langinfo F + nl_langinfo_l F + nrand48 F + nrand48_r F + ntohl F + ntohs F + ntp_adjtime F + ntp_gettime F + ntp_gettimex F + obstack_alloc_failed_handler D 0x4 + obstack_exit_failure D 0x4 + obstack_free F + obstack_printf F + obstack_vprintf F + on_exit F + open F + open64 F + open_memstream F + open_wmemstream F + openat F + openat64 F + opendir F + openlog F + optarg D 0x4 + opterr D 0x4 + optind D 0x4 + optopt D 0x4 + parse_printf_format F + passwd2des F + pathconf F + pause F + pclose F + perror F + personality F + pipe F + pipe2 F + pivot_root F + pmap_getmaps F + pmap_getport F + pmap_rmtcall F + pmap_set F + pmap_unset F + poll F + popen F + posix_fadvise F + posix_fadvise64 F + posix_fallocate F + posix_fallocate64 F + posix_madvise F + posix_memalign F + posix_openpt F + posix_spawn F + posix_spawn_file_actions_addclose F + posix_spawn_file_actions_adddup2 F + posix_spawn_file_actions_addopen F + posix_spawn_file_actions_destroy F + posix_spawn_file_actions_init F + posix_spawnattr_destroy F + posix_spawnattr_getflags F + posix_spawnattr_getpgroup F + posix_spawnattr_getschedparam F + posix_spawnattr_getschedpolicy F + posix_spawnattr_getsigdefault F + posix_spawnattr_getsigmask F + posix_spawnattr_init F + posix_spawnattr_setflags F + posix_spawnattr_setpgroup F + posix_spawnattr_setschedparam F + posix_spawnattr_setschedpolicy F + posix_spawnattr_setsigdefault F + posix_spawnattr_setsigmask F + posix_spawnp F + ppoll F + prctl F + pread F + pread64 F + preadv F + preadv64 F + printf F + printf_size F + printf_size_info F + profil F + program_invocation_name D 0x4 + program_invocation_short_name D 0x4 + pselect F + psiginfo F + psignal F + pthread_attr_destroy F + pthread_attr_getdetachstate F + pthread_attr_getinheritsched F + pthread_attr_getschedparam F + pthread_attr_getschedpolicy F + pthread_attr_getscope F + pthread_attr_init F + pthread_attr_setdetachstate F + pthread_attr_setinheritsched F + pthread_attr_setschedparam F + pthread_attr_setschedpolicy F + pthread_attr_setscope F + pthread_cond_broadcast F + pthread_cond_destroy F + pthread_cond_init F + pthread_cond_signal F + pthread_cond_timedwait F + pthread_cond_wait F + pthread_condattr_destroy F + pthread_condattr_init F + pthread_equal F + pthread_exit F + pthread_getschedparam F + pthread_mutex_destroy F + pthread_mutex_init F + pthread_mutex_lock F + pthread_mutex_unlock F + pthread_self F + pthread_setcancelstate F + pthread_setcanceltype F + pthread_setschedparam F + ptrace F + ptsname F + ptsname_r F + putc F + putc_unlocked F + putchar F + putchar_unlocked F + putenv F + putgrent F + putmsg F + putpmsg F + putpwent F + puts F + putsgent F + putspent F + pututline F + pututxline F + putw F + putwc F + putwc_unlocked F + putwchar F + putwchar_unlocked F + pvalloc F + pwrite F + pwrite64 F + pwritev F + pwritev64 F + qecvt F + qecvt_r F + qfcvt F + qfcvt_r F + qgcvt F + qsort F + qsort_r F + query_module F + quick_exit F + quotactl F + raise F + rand F + rand_r F + random F + random_r F + rawmemchr F + rcmd F + rcmd_af F + re_comp F + re_compile_fastmap F + re_compile_pattern F + re_exec F + re_match F + re_match_2 F + re_search F + re_search_2 F + re_set_registers F + re_set_syntax F + re_syntax_options D 0x4 + read F + readahead F + readdir F + readdir64 F + readdir64_r F + readdir_r F + readlink F + readlinkat F + readv F + realloc F + realpath F + reboot F + recv F + recvfrom F + recvmmsg F + recvmsg F + regcomp F + regerror F + regexec F + regfree F + register_printf_function F + register_printf_modifier F + register_printf_specifier F + register_printf_type F + registerrpc F + remap_file_pages F + remove F + removexattr F + remque F + rename F + renameat F + revoke F + rewind F + rewinddir F + rexec F + rexec_af F + rexecoptions D 0x4 + rindex F + rmdir F + rpc_createerr D 0x10 + rpmatch F + rresvport F + rresvport_af F + rtime F + ruserok F + ruserok_af F + ruserpass F + sbrk F + scalbn F + scalbnf F + scalbnl F + scandir F + scandir64 F + scanf F + sched_get_priority_max F + sched_get_priority_min F + sched_getaffinity F + sched_getcpu F + sched_getparam F + sched_getscheduler F + sched_rr_get_interval F + sched_setaffinity F + sched_setparam F + sched_setscheduler F + sched_yield F + seed48 F + seed48_r F + seekdir F + select F + semctl F + semget F + semop F + semtimedop F + send F + sendfile F + sendfile64 F + sendmsg F + sendto F + set_dataplane F + setaliasent F + setbuf F + setbuffer F + setcontext F + setdomainname F + setegid F + setenv F + seteuid F + setfsent F + setfsgid F + setfsuid F + setgid F + setgrent F + setgroups F + sethostent F + sethostid F + sethostname F + setipv4sourcefilter F + setitimer F + setjmp F + setlinebuf F + setlocale F + setlogin F + setlogmask F + setmntent F + setnetent F + setnetgrent F + setpgid F + setpgrp F + setpriority F + setprotoent F + setpwent F + setregid F + setresgid F + setresuid F + setreuid F + setrlimit F + setrlimit64 F + setrpcent F + setservent F + setsgent F + setsid F + setsockopt F + setsourcefilter F + setspent F + setstate F + setstate_r F + settimeofday F + setttyent F + setuid F + setusershell F + setutent F + setutxent F + setvbuf F + setxattr F + sgetsgent F + sgetsgent_r F + sgetspent F + sgetspent_r F + shmat F + shmctl F + shmdt F + shmget F + shutdown F + sigaction F + sigaddset F + sigaltstack F + sigandset F + sigblock F + sigdelset F + sigemptyset F + sigfillset F + siggetmask F + sighold F + sigignore F + siginterrupt F + sigisemptyset F + sigismember F + siglongjmp F + signal F + signalfd F + sigorset F + sigpause F + sigpending F + sigprocmask F + sigqueue F + sigrelse F + sigreturn F + sigset F + sigsetmask F + sigstack F + sigsuspend F + sigtimedwait F + sigvec F + sigwait F + sigwaitinfo F + sleep F + snprintf F + sockatmark F + socket F + socketpair F + splice F + sprintf F + sprofil F + srand F + srand48 F + srand48_r F + srandom F + srandom_r F + sscanf F + ssignal F + sstk F + statfs F + statfs64 F + statvfs F + statvfs64 F + stderr D 0x4 + stdin D 0x4 + stdout D 0x4 + step F + stime F + stpcpy F + stpncpy F + strcasecmp F + strcasecmp_l F + strcasestr F + strcat F + strchr F + strchrnul F + strcmp F + strcoll F + strcoll_l F + strcpy F + strcspn F + strdup F + strerror F + strerror_l F + strerror_r F + strfmon F + strfmon_l F + strfry F + strftime F + strftime_l F + strlen F + strncasecmp F + strncasecmp_l F + strncat F + strncmp F + strncpy F + strndup F + strnlen F + strpbrk F + strptime F + strptime_l F + strrchr F + strsep F + strsignal F + strspn F + strstr F + strtod F + strtod_l F + strtof F + strtof_l F + strtoimax F + strtok F + strtok_r F + strtol F + strtol_l F + strtold F + strtold_l F + strtoll F + strtoll_l F + strtoq F + strtoul F + strtoul_l F + strtoull F + strtoull_l F + strtoumax F + strtouq F + strverscmp F + strxfrm F + strxfrm_l F + stty F + svc_exit F + svc_fdset D 0x80 + svc_getreq F + svc_getreq_common F + svc_getreq_poll F + svc_getreqset F + svc_max_pollfd D 0x4 + svc_pollfd D 0x4 + svc_register F + svc_run F + svc_sendreply F + svc_unregister F + svcauthdes_stats D 0xc + svcerr_auth F + svcerr_decode F + svcerr_noproc F + svcerr_noprog F + svcerr_progvers F + svcerr_systemerr F + svcerr_weakauth F + svcfd_create F + svcraw_create F + svctcp_create F + svcudp_bufcreate F + svcudp_create F + svcudp_enablecache F + svcunix_create F + svcunixfd_create F + swab F + swapcontext F + swapoff F + swapon F + swprintf F + swscanf F + symlink F + symlinkat F + sync F + sync_file_range F + sys_errlist D 0x21c + sys_nerr D 0x4 + sys_sigabbrev D 0x104 + sys_siglist D 0x104 + syscall F + sysconf F + sysctl F + sysinfo F + syslog F + system F + sysv_signal F + tcdrain F + tcflow F + tcflush F + tcgetattr F + tcgetpgrp F + tcgetsid F + tcsendbreak F + tcsetattr F + tcsetpgrp F + tdelete F + tdestroy F + tee F + telldir F + tempnam F + textdomain F + tfind F + time F + timegm F + timelocal F + timerfd_create F + timerfd_gettime F + timerfd_settime F + times F + timezone D 0x4 + tmpfile F + tmpfile64 F + tmpnam F + tmpnam_r F + toascii F + tolower F + tolower_l F + toupper F + toupper_l F + towctrans F + towctrans_l F + towlower F + towlower_l F + towupper F + towupper_l F + tr_break F + truncate F + truncate64 F + tsearch F + ttyname F + ttyname_r F + ttyslot F + twalk F + tzname D 0x8 + tzset F + ualarm F + ulckpwdf F + ulimit F + umask F + umount F + umount2 F + uname F + ungetc F + ungetwc F + unlink F + unlinkat F + unlockpt F + unsetenv F + unshare F + updwtmp F + updwtmpx F + uselib F + uselocale F + user2netname F + usleep F + ustat F + utime F + utimensat F + utimes F + utmpname F + utmpxname F + valloc F + vasprintf F + vdprintf F + verr F + verrx F + versionsort F + versionsort64 F + vfork F + vfprintf F + vfscanf F + vfwprintf F + vfwscanf F + vhangup F + vlimit F + vmsplice F + vprintf F + vscanf F + vsnprintf F + vsprintf F + vsscanf F + vswprintf F + vswscanf F + vsyslog F + vtimes F + vwarn F + vwarnx F + vwprintf F + vwscanf F + wait F + wait3 F + wait4 F + waitid F + waitpid F + warn F + warnx F + wcpcpy F + wcpncpy F + wcrtomb F + wcscasecmp F + wcscasecmp_l F + wcscat F + wcschr F + wcschrnul F + wcscmp F + wcscoll F + wcscoll_l F + wcscpy F + wcscspn F + wcsdup F + wcsftime F + wcsftime_l F + wcslen F + wcsncasecmp F + wcsncasecmp_l F + wcsncat F + wcsncmp F + wcsncpy F + wcsnlen F + wcsnrtombs F + wcspbrk F + wcsrchr F + wcsrtombs F + wcsspn F + wcsstr F + wcstod F + wcstod_l F + wcstof F + wcstof_l F + wcstoimax F + wcstok F + wcstol F + wcstol_l F + wcstold F + wcstold_l F + wcstoll F + wcstoll_l F + wcstombs F + wcstoq F + wcstoul F + wcstoul_l F + wcstoull F + wcstoull_l F + wcstoumax F + wcstouq F + wcswcs F + wcswidth F + wcsxfrm F + wcsxfrm_l F + wctob F + wctomb F + wctrans F + wctrans_l F + wctype F + wctype_l F + wcwidth F + wmemchr F + wmemcmp F + wmemcpy F + wmemmove F + wmempcpy F + wmemset F + wordexp F + wordfree F + wprintf F + write F + writev F + wscanf F + xdecrypt F + xdr_accepted_reply F + xdr_array F + xdr_authdes_cred F + xdr_authdes_verf F + xdr_authunix_parms F + xdr_bool F + xdr_bytes F + xdr_callhdr F + xdr_callmsg F + xdr_char F + xdr_cryptkeyarg F + xdr_cryptkeyarg2 F + xdr_cryptkeyres F + xdr_des_block F + xdr_double F + xdr_enum F + xdr_float F + xdr_free F + xdr_getcredres F + xdr_hyper F + xdr_int F + xdr_int16_t F + xdr_int32_t F + xdr_int64_t F + xdr_int8_t F + xdr_key_netstarg F + xdr_key_netstres F + xdr_keybuf F + xdr_keystatus F + xdr_long F + xdr_longlong_t F + xdr_netnamestr F + xdr_netobj F + xdr_opaque F + xdr_opaque_auth F + xdr_pmap F + xdr_pmaplist F + xdr_pointer F + xdr_quad_t F + xdr_reference F + xdr_rejected_reply F + xdr_replymsg F + xdr_rmtcall_args F + xdr_rmtcallres F + xdr_short F + xdr_sizeof F + xdr_string F + xdr_u_char F + xdr_u_hyper F + xdr_u_int F + xdr_u_long F + xdr_u_longlong_t F + xdr_u_quad_t F + xdr_u_short F + xdr_uint16_t F + xdr_uint32_t F + xdr_uint64_t F + xdr_uint8_t F + xdr_union F + xdr_unixcred F + xdr_vector F + xdr_void F + xdr_wrapstring F + xdrmem_create F + xdrrec_create F + xdrrec_endofrecord F + xdrrec_eof F + xdrrec_skiprecord F + xdrstdio_create F + xencrypt F + xprt_register F + xprt_unregister F +GLIBC_2.15 + GLIBC_2.15 A + __fdelt_chk F + __fdelt_warn F + clock_adjtime F + fanotify_init F + fanotify_mark F + name_to_handle_at F + open_by_handle_at F + posix_spawn F + posix_spawnp F + prlimit F + prlimit64 F + process_vm_readv F + process_vm_writev F + scandirat F + scandirat64 F + sendmmsg F + setns F + syncfs F +GLIBC_2.16 + GLIBC_2.16 A + __poll_chk F + __ppoll_chk F + aligned_alloc F + c16rtomb F + c32rtomb F + mbrtoc16 F + mbrtoc32 F + timespec_get F diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libcrypt.abilist b/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libcrypt.abilist new file mode 100644 index 0000000000..608e5df0b1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libcrypt.abilist @@ -0,0 +1,9 @@ +GLIBC_2.12 + GLIBC_2.12 A + crypt F + crypt_r F + encrypt F + encrypt_r F + fcrypt F + setkey F + setkey_r F diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libdl.abilist b/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libdl.abilist new file mode 100644 index 0000000000..27a72281b7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libdl.abilist @@ -0,0 +1,11 @@ +GLIBC_2.12 + GLIBC_2.12 A + dladdr F + dladdr1 F + dlclose F + dlerror F + dlinfo F + dlmopen F + dlopen F + dlsym F + dlvsym F diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libm.abilist b/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libm.abilist new file mode 100644 index 0000000000..ab2a40f202 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libm.abilist @@ -0,0 +1,368 @@ +GLIBC_2.12 + GLIBC_2.12 A + _LIB_VERSION D 0x4 + __clog10 F + __clog10f F + __clog10l F + __finite F + __finitef F + __fpclassify F + __fpclassifyf F + __signbit F + __signbitf F + acos F + acosf F + acosh F + acoshf F + acoshl F + acosl F + asin F + asinf F + asinh F + asinhf F + asinhl F + asinl F + atan F + atan2 F + atan2f F + atan2l F + atanf F + atanh F + atanhf F + atanhl F + atanl F + cabs F + cabsf F + cabsl F + cacos F + cacosf F + cacosh F + cacoshf F + cacoshl F + cacosl F + carg F + cargf F + cargl F + casin F + casinf F + casinh F + casinhf F + casinhl F + casinl F + catan F + catanf F + catanh F + catanhf F + catanhl F + catanl F + cbrt F + cbrtf F + cbrtl F + ccos F + ccosf F + ccosh F + ccoshf F + ccoshl F + ccosl F + ceil F + ceilf F + ceill F + cexp F + cexpf F + cexpl F + cimag F + cimagf F + cimagl F + clog F + clog10 F + clog10f F + clog10l F + clogf F + clogl F + conj F + conjf F + conjl F + copysign F + copysignf F + copysignl F + cos F + cosf F + cosh F + coshf F + coshl F + cosl F + cpow F + cpowf F + cpowl F + cproj F + cprojf F + cprojl F + creal F + crealf F + creall F + csin F + csinf F + csinh F + csinhf F + csinhl F + csinl F + csqrt F + csqrtf F + csqrtl F + ctan F + ctanf F + ctanh F + ctanhf F + ctanhl F + ctanl F + drem F + dremf F + dreml F + erf F + erfc F + erfcf F + erfcl F + erff F + erfl F + exp F + exp10 F + exp10f F + exp10l F + exp2 F + exp2f F + exp2l F + expf F + expl F + expm1 F + expm1f F + expm1l F + fabs F + fabsf F + fabsl F + fdim F + fdimf F + fdiml F + feclearexcept F + fedisableexcept F + feenableexcept F + fegetexcept F + fegetexceptflag F + fegetround F + feholdexcept F + feraiseexcept F + fesetenv F + fesetexceptflag F + fesetround F + fetestexcept F + feupdateenv F + finite F + finitef F + finitel F + floor F + floorf F + floorl F + fma F + fmaf F + fmal F + fmax F + fmaxf F + fmaxl F + fmin F + fminf F + fminl F + fmod F + fmodf F + fmodl F + frexp F + frexpf F + frexpl F + gamma F + gammaf F + gammal F + hypot F + hypotf F + hypotl F + ilogb F + ilogbf F + ilogbl F + j0 F + j0f F + j0l F + j1 F + j1f F + j1l F + jn F + jnf F + jnl F + ldexp F + ldexpf F + ldexpl F + lgamma F + lgamma_r F + lgammaf F + lgammaf_r F + lgammal F + lgammal_r F + llrint F + llrintf F + llrintl F + llround F + llroundf F + llroundl F + log F + log10 F + log10f F + log10l F + log1p F + log1pf F + log1pl F + log2 F + log2f F + log2l F + logb F + logbf F + logbl F + logf F + logl F + lrint F + lrintf F + lrintl F + lround F + lroundf F + lroundl F + matherr F + modf F + modff F + modfl F + nan F + nanf F + nanl F + nearbyint F + nearbyintf F + nearbyintl F + nextafter F + nextafterf F + nextafterl F + nexttoward F + nexttowardf F + nexttowardl F + pow F + pow10 F + pow10f F + pow10l F + powf F + powl F + remainder F + remainderf F + remainderl F + remquo F + remquof F + remquol F + rint F + rintf F + rintl F + round F + roundf F + roundl F + scalb F + scalbf F + scalbl F + scalbln F + scalblnf F + scalblnl F + scalbn F + scalbnf F + scalbnl F + signgam D 0x4 + significand F + significandf F + significandl F + sin F + sincos F + sincosf F + sincosl F + sinf F + sinh F + sinhf F + sinhl F + sinl F + sqrt F + sqrtf F + sqrtl F + tan F + tanf F + tanh F + tanhf F + tanhl F + tanl F + tgamma F + tgammaf F + tgammal F + trunc F + truncf F + truncl F + y0 F + y0f F + y0l F + y1 F + y1f F + y1l F + yn F + ynf F + ynl F +GLIBC_2.15 + GLIBC_2.15 A + __acos_finite F + __acosf_finite F + __acosh_finite F + __acoshf_finite F + __asin_finite F + __asinf_finite F + __atan2_finite F + __atan2f_finite F + __atanh_finite F + __atanhf_finite F + __cosh_finite F + __coshf_finite F + __exp10_finite F + __exp10f_finite F + __exp2_finite F + __exp2f_finite F + __exp_finite F + __expf_finite F + __fmod_finite F + __fmodf_finite F + __gamma_r_finite F + __gammaf_r_finite F + __hypot_finite F + __hypotf_finite F + __j0_finite F + __j0f_finite F + __j1_finite F + __j1f_finite F + __jn_finite F + __jnf_finite F + __lgamma_r_finite F + __lgammaf_r_finite F + __log10_finite F + __log10f_finite F + __log2_finite F + __log2f_finite F + __log_finite F + __logf_finite F + __pow_finite F + __powf_finite F + __remainder_finite F + __remainderf_finite F + __scalb_finite F + __scalbf_finite F + __sinh_finite F + __sinhf_finite F + __sqrt_finite F + __sqrtf_finite F + __y0_finite F + __y0f_finite F + __y1_finite F + __y1f_finite F + __yn_finite F + __ynf_finite F diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libnsl.abilist b/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libnsl.abilist new file mode 100644 index 0000000000..e4217934c8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libnsl.abilist @@ -0,0 +1,123 @@ +GLIBC_2.12 + GLIBC_2.12 A + __free_fdresult F + __nis_default_access F + __nis_default_group F + __nis_default_owner F + __nis_default_ttl F + __nis_finddirectory F + __nis_hash F + __nisbind_connect F + __nisbind_create F + __nisbind_destroy F + __nisbind_next F + __yp_check F + nis_add F + nis_add_entry F + nis_addmember F + nis_checkpoint F + nis_clone_directory F + nis_clone_object F + nis_clone_result F + nis_creategroup F + nis_destroy_object F + nis_destroygroup F + nis_dir_cmp F + nis_domain_of F + nis_domain_of_r F + nis_first_entry F + nis_free_directory F + nis_free_object F + nis_free_request F + nis_freenames F + nis_freeresult F + nis_freeservlist F + nis_freetags F + nis_getnames F + nis_getservlist F + nis_ismember F + nis_leaf_of F + nis_leaf_of_r F + nis_lerror F + nis_list F + nis_local_directory F + nis_local_group F + nis_local_host F + nis_local_principal F + nis_lookup F + nis_mkdir F + nis_modify F + nis_modify_entry F + nis_name_of F + nis_name_of_r F + nis_next_entry F + nis_perror F + nis_ping F + nis_print_directory F + nis_print_entry F + nis_print_group F + nis_print_group_entry F + nis_print_link F + nis_print_object F + nis_print_result F + nis_print_rights F + nis_print_table F + nis_read_obj F + nis_remove F + nis_remove_entry F + nis_removemember F + nis_rmdir F + nis_servstate F + nis_sperrno F + nis_sperror F + nis_sperror_r F + nis_stats F + nis_verifygroup F + nis_write_obj F + readColdStartFile F + writeColdStartFile F + xdr_cback_data F + xdr_domainname F + xdr_keydat F + xdr_mapname F + xdr_obj_p F + xdr_peername F + xdr_valdat F + xdr_yp_buf F + xdr_ypall F + xdr_ypbind_binding F + xdr_ypbind_resp F + xdr_ypbind_resptype F + xdr_ypbind_setdom F + xdr_ypdelete_args F + xdr_ypmap_parms F + xdr_ypmaplist F + xdr_yppush_status F + xdr_yppushresp_xfr F + xdr_ypreq_key F + xdr_ypreq_nokey F + xdr_ypreq_xfr F + xdr_ypresp_all F + xdr_ypresp_key_val F + xdr_ypresp_maplist F + xdr_ypresp_master F + xdr_ypresp_order F + xdr_ypresp_val F + xdr_ypresp_xfr F + xdr_ypstat F + xdr_ypupdate_args F + xdr_ypxfrstat F + yp_all F + yp_bind F + yp_first F + yp_get_default_domain F + yp_maplist F + yp_master F + yp_match F + yp_next F + yp_order F + yp_unbind F + yp_update F + ypbinderr_string F + yperr_string F + ypprot_err F diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libpthread.abilist b/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libpthread.abilist new file mode 100644 index 0000000000..3ab004605a --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libpthread.abilist @@ -0,0 +1,225 @@ +GLIBC_2.12 + GLIBC_2.12 A + _IO_flockfile F + _IO_ftrylockfile F + _IO_funlockfile F + __close F + __connect F + __errno_location F + __fcntl F + __fork F + __h_errno_location F + __libc_allocate_rtsig F + __libc_current_sigrtmax F + __libc_current_sigrtmin F + __lseek F + __nanosleep F + __open F + __open64 F + __pread64 F + __pthread_cleanup_routine F + __pthread_getspecific F + __pthread_key_create F + __pthread_mutex_destroy F + __pthread_mutex_init F + __pthread_mutex_lock F + __pthread_mutex_trylock F + __pthread_mutex_unlock F + __pthread_mutexattr_destroy F + __pthread_mutexattr_init F + __pthread_mutexattr_settype F + __pthread_once F + __pthread_register_cancel F + __pthread_register_cancel_defer F + __pthread_rwlock_destroy F + __pthread_rwlock_init F + __pthread_rwlock_rdlock F + __pthread_rwlock_tryrdlock F + __pthread_rwlock_trywrlock F + __pthread_rwlock_unlock F + __pthread_rwlock_wrlock F + __pthread_setspecific F + __pthread_unregister_cancel F + __pthread_unregister_cancel_restore F + __pthread_unwind_next F + __pwrite64 F + __read F + __res_state F + __send F + __sigaction F + __vfork F + __wait F + __write F + _pthread_cleanup_pop F + _pthread_cleanup_pop_restore F + _pthread_cleanup_push F + _pthread_cleanup_push_defer F + accept F + close F + connect F + fcntl F + flockfile F + fork F + fsync F + ftrylockfile F + funlockfile F + longjmp F + lseek F + lseek64 F + msync F + nanosleep F + open F + open64 F + pause F + pread F + pread64 F + pthread_atfork F + pthread_attr_destroy F + pthread_attr_getaffinity_np F + pthread_attr_getdetachstate F + pthread_attr_getguardsize F + pthread_attr_getinheritsched F + pthread_attr_getschedparam F + pthread_attr_getschedpolicy F + pthread_attr_getscope F + pthread_attr_getstack F + pthread_attr_getstackaddr F + pthread_attr_getstacksize F + pthread_attr_init F + pthread_attr_setaffinity_np F + pthread_attr_setdetachstate F + pthread_attr_setguardsize F + pthread_attr_setinheritsched F + pthread_attr_setschedparam F + pthread_attr_setschedpolicy F + pthread_attr_setscope F + pthread_attr_setstack F + pthread_attr_setstackaddr F + pthread_attr_setstacksize F + pthread_barrier_destroy F + pthread_barrier_init F + pthread_barrier_wait F + pthread_barrierattr_destroy F + pthread_barrierattr_getpshared F + pthread_barrierattr_init F + pthread_barrierattr_setpshared F + pthread_cancel F + pthread_cond_broadcast F + pthread_cond_destroy F + pthread_cond_init F + pthread_cond_signal F + pthread_cond_timedwait F + pthread_cond_wait F + pthread_condattr_destroy F + pthread_condattr_getclock F + pthread_condattr_getpshared F + pthread_condattr_init F + pthread_condattr_setclock F + pthread_condattr_setpshared F + pthread_create F + pthread_detach F + pthread_equal F + pthread_exit F + pthread_getaffinity_np F + pthread_getattr_np F + pthread_getconcurrency F + pthread_getcpuclockid F + pthread_getname_np F + pthread_getschedparam F + pthread_getspecific F + pthread_join F + pthread_key_create F + pthread_key_delete F + pthread_kill F + pthread_kill_other_threads_np F + pthread_mutex_consistent F + pthread_mutex_consistent_np F + pthread_mutex_destroy F + pthread_mutex_getprioceiling F + pthread_mutex_init F + pthread_mutex_lock F + pthread_mutex_setprioceiling F + pthread_mutex_timedlock F + pthread_mutex_trylock F + pthread_mutex_unlock F + pthread_mutexattr_destroy F + pthread_mutexattr_getkind_np F + pthread_mutexattr_getprioceiling F + pthread_mutexattr_getprotocol F + pthread_mutexattr_getpshared F + pthread_mutexattr_getrobust F + pthread_mutexattr_getrobust_np F + pthread_mutexattr_gettype F + pthread_mutexattr_init F + pthread_mutexattr_setkind_np F + pthread_mutexattr_setprioceiling F + pthread_mutexattr_setprotocol F + pthread_mutexattr_setpshared F + pthread_mutexattr_setrobust F + pthread_mutexattr_setrobust_np F + pthread_mutexattr_settype F + pthread_once F + pthread_rwlock_destroy F + pthread_rwlock_init F + pthread_rwlock_rdlock F + pthread_rwlock_timedrdlock F + pthread_rwlock_timedwrlock F + pthread_rwlock_tryrdlock F + pthread_rwlock_trywrlock F + pthread_rwlock_unlock F + pthread_rwlock_wrlock F + pthread_rwlockattr_destroy F + pthread_rwlockattr_getkind_np F + pthread_rwlockattr_getpshared F + pthread_rwlockattr_init F + pthread_rwlockattr_setkind_np F + pthread_rwlockattr_setpshared F + pthread_self F + pthread_setaffinity_np F + pthread_setcancelstate F + pthread_setcanceltype F + pthread_setconcurrency F + pthread_setname_np F + pthread_setschedparam F + pthread_setschedprio F + pthread_setspecific F + pthread_sigmask F + pthread_sigqueue F + pthread_spin_destroy F + pthread_spin_init F + pthread_spin_lock F + pthread_spin_trylock F + pthread_spin_unlock F + pthread_testcancel F + pthread_timedjoin_np F + pthread_tryjoin_np F + pthread_yield F + pwrite F + pwrite64 F + raise F + read F + recv F + recvfrom F + recvmsg F + sem_close F + sem_destroy F + sem_getvalue F + sem_init F + sem_open F + sem_post F + sem_timedwait F + sem_trywait F + sem_unlink F + sem_wait F + send F + sendmsg F + sendto F + sigaction F + siglongjmp F + sigwait F + system F + tcdrain F + vfork F + wait F + waitpid F + write F diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libresolv.abilist b/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libresolv.abilist new file mode 100644 index 0000000000..64826160a1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libresolv.abilist @@ -0,0 +1,93 @@ +GLIBC_2.12 + GLIBC_2.12 A + __b64_ntop F + __b64_pton F + __dn_comp F + __dn_count_labels F + __dn_expand F + __dn_skipname F + __fp_nquery F + __fp_query F + __fp_resstat F + __hostalias F + __loc_aton F + __loc_ntoa F + __p_cdname F + __p_cdnname F + __p_class F + __p_class_syms D 0x54 + __p_fqname F + __p_fqnname F + __p_option F + __p_query F + __p_rcode F + __p_secstodate F + __p_time F + __p_type F + __p_type_syms D 0x228 + __putlong F + __putshort F + __res_close F + __res_dnok F + __res_hnok F + __res_hostalias F + __res_isourserver F + __res_mailok F + __res_mkquery F + __res_nameinquery F + __res_nmkquery F + __res_nquery F + __res_nquerydomain F + __res_nsearch F + __res_nsend F + __res_ownok F + __res_queriesmatch F + __res_query F + __res_querydomain F + __res_search F + __res_send F + __sym_ntop F + __sym_ntos F + __sym_ston F + _gethtbyaddr F + _gethtbyname F + _gethtbyname2 F + _gethtent F + _getlong F + _getshort F + _res_opcodes D 0x40 + _sethtent F + inet_net_ntop F + inet_net_pton F + inet_neta F + ns_datetosecs F + ns_format_ttl F + ns_get16 F + ns_get32 F + ns_initparse F + ns_makecanon F + ns_msg_getflag F + ns_name_compress F + ns_name_ntol F + ns_name_ntop F + ns_name_pack F + ns_name_pton F + ns_name_rollback F + ns_name_skip F + ns_name_uncompress F + ns_name_unpack F + ns_parse_ttl F + ns_parserr F + ns_put16 F + ns_put32 F + ns_samedomain F + ns_samename F + ns_skiprr F + ns_sprintrr F + ns_sprintrrf F + ns_subdomain F + res_gethostbyaddr F + res_gethostbyname F + res_gethostbyname2 F + res_send_setqhook F + res_send_setrhook F diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/nptl/librt.abilist b/sysdeps/unix/sysv/linux/tile/tilepro/nptl/librt.abilist new file mode 100644 index 0000000000..87fec065af --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilepro/nptl/librt.abilist @@ -0,0 +1,42 @@ +GLIBC_2.12 + GLIBC_2.12 A + __mq_open_2 F + aio_cancel F + aio_cancel64 F + aio_error F + aio_error64 F + aio_fsync F + aio_fsync64 F + aio_init F + aio_read F + aio_read64 F + aio_return F + aio_return64 F + aio_suspend F + aio_suspend64 F + aio_write F + aio_write64 F + clock_getcpuclockid F + clock_getres F + clock_gettime F + clock_nanosleep F + clock_settime F + lio_listio F + lio_listio64 F + mq_close F + mq_getattr F + mq_notify F + mq_open F + mq_receive F + mq_send F + mq_setattr F + mq_timedreceive F + mq_timedsend F + mq_unlink F + shm_open F + shm_unlink F + timer_create F + timer_delete F + timer_getoverrun F + timer_gettime F + timer_settime F diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libthread_db.abilist b/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libthread_db.abilist new file mode 100644 index 0000000000..934ce9acd6 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libthread_db.abilist @@ -0,0 +1,42 @@ +GLIBC_2.12 + GLIBC_2.12 A + td_init F + td_log F + td_symbol_list F + td_ta_clear_event F + td_ta_delete F + td_ta_enable_stats F + td_ta_event_addr F + td_ta_event_getmsg F + td_ta_get_nthreads F + td_ta_get_ph F + td_ta_get_stats F + td_ta_map_id2thr F + td_ta_map_lwp2thr F + td_ta_new F + td_ta_reset_stats F + td_ta_set_event F + td_ta_setconcurrency F + td_ta_thr_iter F + td_ta_tsd_iter F + td_thr_clear_event F + td_thr_dbresume F + td_thr_dbsuspend F + td_thr_event_enable F + td_thr_event_getmsg F + td_thr_get_info F + td_thr_getfpregs F + td_thr_getgregs F + td_thr_getxregs F + td_thr_getxregsize F + td_thr_set_event F + td_thr_setfpregs F + td_thr_setgregs F + td_thr_setprio F + td_thr_setsigpending F + td_thr_setxregs F + td_thr_sigsetmask F + td_thr_tls_get_addr F + td_thr_tlsbase F + td_thr_tsd F + td_thr_validate F diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libutil.abilist b/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libutil.abilist new file mode 100644 index 0000000000..50c312a7c6 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libutil.abilist @@ -0,0 +1,8 @@ +GLIBC_2.12 + GLIBC_2.12 A + forkpty F + login F + login_tty F + logout F + logwtmp F + openpty F From d45ba2bc2674697e58fb4ad618acec75a7332559 Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Mon, 14 May 2012 16:01:44 -0400 Subject: [PATCH 4364/4487] linux-generic: use "__aligned__", not "aligned", in public headers --- ChangeLog.linux-generic | 6 ++++++ sysdeps/unix/sysv/linux/generic/bits/stat.h | 4 ++-- sysdeps/unix/sysv/linux/generic/bits/statfs.h | 8 ++++---- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/ChangeLog.linux-generic b/ChangeLog.linux-generic index 4b39e61f51..9f563e3ff2 100644 --- a/ChangeLog.linux-generic +++ b/ChangeLog.linux-generic @@ -1,3 +1,9 @@ +2012-05-14 Chris Metcalf + + * sysdeps/unix/sysv/linux/generic/bits/stat.h, + sysdeps/unix/sysv/linux/generic/bits/statfs.h: + Use "__aligned__" instead of "aligned" in public headers. + 2012-05-12 Chris Metcalf * sysdeps/unix/sysv/linux/generic/wordsize-32/syscalls.list: diff --git a/sysdeps/unix/sysv/linux/generic/bits/stat.h b/sysdeps/unix/sysv/linux/generic/bits/stat.h index f9aa66ebc7..5de1bd0514 100644 --- a/sysdeps/unix/sysv/linux/generic/bits/stat.h +++ b/sysdeps/unix/sysv/linux/generic/bits/stat.h @@ -46,10 +46,10 @@ # define __field64(type, type64, name) type name #elif __BYTE_ORDER == __LITTLE_ENDIAN # define __field64(type, type64, name) \ - type name __attribute__((aligned(8))); int __##name##_pad + type name __attribute__((__aligned__(8))); int __##name##_pad #else # define __field64(type, type64, name) \ - int __##name##_pad __attribute__((aligned(8))); type name + int __##name##_pad __attribute__((__aligned__(8))); type name #endif struct stat diff --git a/sysdeps/unix/sysv/linux/generic/bits/statfs.h b/sysdeps/unix/sysv/linux/generic/bits/statfs.h index bbc5da786e..bf479e875e 100644 --- a/sysdeps/unix/sysv/linux/generic/bits/statfs.h +++ b/sysdeps/unix/sysv/linux/generic/bits/statfs.h @@ -38,10 +38,10 @@ # define __field64(type, type64, name) type name #elif __BYTE_ORDER == __LITTLE_ENDIAN # define __field64(type, type64, name) \ - type name __attribute__((aligned(8))); int __##name##_pad + type name __attribute__((__aligned__(8))); int __##name##_pad #else # define __field64(type, type64, name) \ - int __##name##_pad __attribute__((aligned(8))); type name + int __##name##_pad __attribute__((__aligned__(8))); type name #endif struct statfs @@ -58,7 +58,7 @@ struct statfs __SWORD_TYPE f_frsize; __SWORD_TYPE f_flags; __SWORD_TYPE f_spare[4]; - } __attribute__((aligned(8))); + } __attribute__((__aligned__(8))); #undef __field64 @@ -77,7 +77,7 @@ struct statfs64 __SWORD_TYPE f_frsize; __SWORD_TYPE f_flags; __SWORD_TYPE f_spare[4]; - } __attribute__((aligned(8))); + } __attribute__((__aligned__(8))); #endif /* Tell code we have these members. */ From c757085ec8323cdfa1598c084c638ecc0855fbf9 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 14 May 2012 20:39:30 -0400 Subject: [PATCH 4365/4487] ia64: use __aligned__ inside of attributes Installed headers should always use the forms of attributes with __ prefixes and suffixes, so __attribute__ ((__aligned__ (8))) instead of the plain "aligned" form, to avoid taking identifiers from the user's namespace. URL: http://sourceware.org/bugzilla/show_bug.cgi?id=14109 Reported-by: Joseph Myers Signed-off-by: Mike Frysinger --- ChangeLog.ia64 | 8 ++++++++ sysdeps/unix/sysv/linux/ia64/bits/setjmp.h | 4 ++-- sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h | 5 ++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ChangeLog.ia64 b/ChangeLog.ia64 index fd90f34143..756be7ed25 100644 --- a/ChangeLog.ia64 +++ b/ChangeLog.ia64 @@ -1,3 +1,11 @@ +2012-05-14 Mike Frysinger + + [BZ #14109] + * sysdeps/unix/sysv/linux/ia64/bits/setjmp.h (__jmp_buf): Use + __aligned__ in attribute. + * sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h (ia64_fpreg): + Likewise. + 2012-05-14 Mike Frysinger * sysdeps/ia64/fpu/libm-symbols.h: Delete __ELF__ checks. diff --git a/sysdeps/unix/sysv/linux/ia64/bits/setjmp.h b/sysdeps/unix/sysv/linux/ia64/bits/setjmp.h index 4ebc5565d1..fc91bafb1d 100644 --- a/sysdeps/unix/sysv/linux/ia64/bits/setjmp.h +++ b/sysdeps/unix/sysv/linux/ia64/bits/setjmp.h @@ -1,5 +1,5 @@ /* Define the machine-dependent type `jmp_buf'. Linux/IA-64 version. - Copyright (C) 1999,2000,2003,2005,2006 Free Software Foundation, Inc. + Copyright (C) 1999-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger-Tang . @@ -29,6 +29,6 @@ #define _JBLEN 70 /* the __jmp_buf element type should be __float80 per ABI... */ -typedef long __jmp_buf[_JBLEN] __attribute__ ((aligned (16))); /* guarantees 128-bit alignment! */ +typedef long __jmp_buf[_JBLEN] __attribute__ ((__aligned__ (16))); /* guarantees 128-bit alignment! */ #endif /* bits/setjmp.h */ diff --git a/sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h b/sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h index 18e347748c..d6e7ce8fc1 100644 --- a/sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h +++ b/sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h @@ -1,5 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998, 2000, 2001, 2003, 2004, 2007 - Free Software Foundation, Inc. +/* Copyright (C) 1996-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jes Sorensen , July 2000 @@ -34,7 +33,7 @@ struct ia64_fpreg { unsigned long bits[2]; } u; - } __attribute__ ((aligned (16))); + } __attribute__ ((__aligned__ (16))); struct sigcontext { From 37f1c9e6b3ceb46686f3e689f2e88d43a0647742 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 15 May 2012 23:55:46 -0400 Subject: [PATCH 4366/4487] ia64: delete now unused file The latest main tree has split out stackguard-macros.h so we no longer have to override it with a stub. Signed-off-by: Mike Frysinger --- ChangeLog.ia64 | 4 ++++ sysdeps/ia64/elf/stackguard-macros.h | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) delete mode 100644 sysdeps/ia64/elf/stackguard-macros.h diff --git a/ChangeLog.ia64 b/ChangeLog.ia64 index 756be7ed25..3130214e47 100644 --- a/ChangeLog.ia64 +++ b/ChangeLog.ia64 @@ -1,3 +1,7 @@ +2012-05-15 Mike Frysinger + + * sysdeps/ia64/elf/stackguard-macros.h: Delete unused file. + 2012-05-14 Mike Frysinger [BZ #14109] diff --git a/sysdeps/ia64/elf/stackguard-macros.h b/sysdeps/ia64/elf/stackguard-macros.h deleted file mode 100644 index 606ad58596..0000000000 --- a/sysdeps/ia64/elf/stackguard-macros.h +++ /dev/null @@ -1,3 +0,0 @@ -/* Tests in nptl/ look for while tests - in elf/ look for . Provide both. */ -#include "../stackguard-macros.h" From 8ae9fa0ec7be4302e1a6b42f30fc207cec5c922a Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 16 May 2012 10:38:40 +0000 Subject: [PATCH 4367/4487] Assume accept4 on ARM for kernels 2.6.36 and later. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/kernel-features.h | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 53359c63aa..b75bd860b4 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2012-05-16 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/kernel-features.h + [__LINUX_KERNEL_VERSION >= 0x020624] (__ASSUME_ACCEPT4): Define. + 2012-05-14 Joseph Myers * sysdeps/unix/sysv/linux/arm/sigaction.c diff --git a/sysdeps/unix/sysv/linux/arm/kernel-features.h b/sysdeps/unix/sysv/linux/arm/kernel-features.h index 0d235e4534..644d9ff103 100644 --- a/sysdeps/unix/sysv/linux/arm/kernel-features.h +++ b/sysdeps/unix/sysv/linux/arm/kernel-features.h @@ -1,6 +1,6 @@ /* Set flags signalling availability of kernel features based on given kernel version number. - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006-2012 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 @@ -56,6 +56,11 @@ # define __ASSUME_SIGNALFD4 1 #endif +/* Support for the accept4 syscall was added in 2.6.36. */ +#if __LINUX_KERNEL_VERSION >= 0x020624 +# define __ASSUME_ACCEPT4 1 +#endif + #include_next /* Support for pselect6, ppoll and epoll_pwait was added in 2.6.32. */ From dbeb70630bdaf3145153412057df2e79cd18c854 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 16 May 2012 10:53:31 +0000 Subject: [PATCH 4368/4487] Declare MIPS stat nanoseconds fields similarly to other architectures. --- ChangeLog.mips | 8 ++++ sysdeps/unix/sysv/linux/mips/bits/stat.h | 51 ++++++++++++------------ 2 files changed, 33 insertions(+), 26 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index db20a788ae..db16b4bc41 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,11 @@ +2012-05-16 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/stat.h (struct stat) + [!__USE_MISC && !__USE_XOPEN2K8]: Declare nanoseconds fields with + type unsigned long and names st_atimensec, st_mtimensec and + st_ctimensec. + (struct stat64) [!__USE_MISC && !__USE_XOPEN2K8]: Likewise. + 2012-05-14 Joseph Myers * sysdeps/unix/sysv/linux/mips/pread.c [!__ASSUME_PREAD_SYSCALL]: diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h index 7c30b4d6b9..f65bae47f6 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/stat.h +++ b/sysdeps/unix/sysv/linux/mips/bits/stat.h @@ -1,5 +1,4 @@ -/* Copyright (C) 1992, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, - 2007, 2009, 2010 Free Software Foundation, Inc. +/* Copyright (C) 1992-2012 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 @@ -77,12 +76,12 @@ struct stat # define st_mtime st_mtim.tv_sec # define st_ctime st_ctim.tv_sec #else - __time_t st_atime; /* Time of last access. */ - long int __reserved0; - __time_t st_mtime; /* Time of last modification. */ - long int __reserved1; - __time_t st_ctime; /* Time of last status change. */ - long int __reserved2; + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ #endif __blksize_t st_blksize; /* Optimal block size for I/O. */ #ifndef __USE_FILE_OFFSET64 @@ -118,12 +117,12 @@ struct stat64 struct timespec st_mtim; /* Time of last modification. */ struct timespec st_ctim; /* Time of last status change. */ # else - __time_t st_atime; /* Time of last access. */ - long int __reserved0; - __time_t st_mtime; /* Time of last modification. */ - long int __reserved1; - __time_t st_ctime; /* Time of last status change. */ - long int __reserved2; + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ # endif __blksize_t st_blksize; /* Optimal block size for I/O. */ long int st_pad3; @@ -168,12 +167,12 @@ struct stat # define st_mtime st_mtim.tv_sec # define st_ctime st_ctim.tv_sec #else - __time_t st_atime; - int __reserved0; - __time_t st_mtime; - int __reserved1; - __time_t st_ctime; - int __reserved2; + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ #endif __blksize_t st_blksize; unsigned int st_pad4; @@ -209,12 +208,12 @@ struct stat64 struct timespec st_mtim; /* Time of last modification. */ struct timespec st_ctim; /* Time of last status change. */ # else - __time_t st_atime; - int __reserved0; - __time_t st_mtime; - int __reserved1; - __time_t st_ctime; - int __reserved2; + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ # endif __blksize_t st_blksize; unsigned int st_pad3; From f136e4df5df88a6ccb9d5e75635cfe00f4b449b5 Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Wed, 16 May 2012 09:24:31 -0400 Subject: [PATCH 4369/4487] tile: delete now unused file The latest main tree has split out stackguard-macros.h so we no longer have to override it with a stub. --- ChangeLog.tile | 4 ++++ sysdeps/tile/elf/stackguard-macros.h | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) delete mode 100644 sysdeps/tile/elf/stackguard-macros.h diff --git a/ChangeLog.tile b/ChangeLog.tile index a6ab6073ef..2a538177e8 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,3 +1,7 @@ +2012-05-16 Chris Metcalf + + * sysdeps/tile/elf/stackguard-macros.h: Delete unused file. + 2012-05-14 Chris Metcalf * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/ld.abilist: diff --git a/sysdeps/tile/elf/stackguard-macros.h b/sysdeps/tile/elf/stackguard-macros.h deleted file mode 100644 index 606ad58596..0000000000 --- a/sysdeps/tile/elf/stackguard-macros.h +++ /dev/null @@ -1,3 +0,0 @@ -/* Tests in nptl/ look for while tests - in elf/ look for . Provide both. */ -#include "../stackguard-macros.h" From a110b27ee293d9973c60e3f46c53b75e8c77f2b2 Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Wed, 16 May 2012 09:28:31 -0400 Subject: [PATCH 4370/4487] linux-generic: fix typesizes.h to match recent core changes Remove __SNSECONDS_T_TYPE; add __SYSCALL_{S,U}LONG_TYPE. --- ChangeLog.linux-generic | 6 ++++++ sysdeps/unix/sysv/linux/generic/bits/typesizes.h | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog.linux-generic b/ChangeLog.linux-generic index 9f563e3ff2..811b6c6145 100644 --- a/ChangeLog.linux-generic +++ b/ChangeLog.linux-generic @@ -1,3 +1,9 @@ +2012-05-16 Chris Metcalf + + * sysdeps/unix/sysv/linux/generic/bits/typesizes.h: + Remove now-unused __SNSECONDS_T_TYPE, and add new + __SYSCALL_ULONG_TYPE and __SYSCALL_SLONG_TYPE types. + 2012-05-14 Chris Metcalf * sysdeps/unix/sysv/linux/generic/bits/stat.h, diff --git a/sysdeps/unix/sysv/linux/generic/bits/typesizes.h b/sysdeps/unix/sysv/linux/generic/bits/typesizes.h index b6541bbe27..b280c9b1e9 100644 --- a/sysdeps/unix/sysv/linux/generic/bits/typesizes.h +++ b/sysdeps/unix/sysv/linux/generic/bits/typesizes.h @@ -58,7 +58,8 @@ #define __BLKSIZE_T_TYPE __S32_TYPE #define __FSID_T_TYPE struct { int __val[2]; } #define __SSIZE_T_TYPE __SWORD_TYPE -#define __SNSECONDS_T_TYPE __SLONGWORD_TYPE +#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE +#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE /* Number of descriptors that can fit in an `fd_set'. */ #define __FD_SETSIZE 1024 From 32e8667947c67298608e1b5bee496e3f310170fe Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Wed, 16 May 2012 09:32:04 -0400 Subject: [PATCH 4371/4487] tile: add proper const qualifier for pltexit function pointer field --- ChangeLog.tile | 5 +++++ sysdeps/tile/ldsodefs.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.tile b/ChangeLog.tile index 2a538177e8..183118a690 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,3 +1,8 @@ +2012-05-15 Chris Metcalf + + * sysdeps/tile/ldsodefs.h (ARCH_PLTEXIT_MEMBERS): Add proper + const qualifier to "inregs" argument. + 2012-05-16 Chris Metcalf * sysdeps/tile/elf/stackguard-macros.h: Delete unused file. diff --git a/sysdeps/tile/ldsodefs.h b/sysdeps/tile/ldsodefs.h index bbe04090a7..393252dad4 100644 --- a/sysdeps/tile/ldsodefs.h +++ b/sysdeps/tile/ldsodefs.h @@ -32,7 +32,7 @@ struct La_tile_retval; #define ARCH_PLTEXIT_MEMBERS \ ElfW(Addr) (*tile_gnu_pltexit) (ElfW(Sym) *, unsigned int, uintptr_t *, \ - uintptr_t *, struct La_tile_regs *, \ + uintptr_t *, const struct La_tile_regs *, \ struct La_tile_retval *, const char *) #include_next From 981416291cd4bd63e6f0e4b0b3e237ee85756ede Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Wed, 16 May 2012 09:34:38 -0400 Subject: [PATCH 4372/4487] linux-generic: add header guard for In general we just try to include once, thus avoiding any issues with multiple inclusion. However, the getaddrinfo sources are somewhat tangled, and .c files include each other to get the final result. Each .c file currently has its own include of . While you could properly re-factor this for the case of gai.c, the posix/tst-rfc3484.c tests directly include one of the sub-files (sysdeps/posix/getaddrinfo.c), and it starts to feel fragile. --- ChangeLog.linux-generic | 5 +++++ sysdeps/unix/sysv/linux/generic/not-cancel.h | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog.linux-generic b/ChangeLog.linux-generic index 811b6c6145..f74df7c84f 100644 --- a/ChangeLog.linux-generic +++ b/ChangeLog.linux-generic @@ -1,3 +1,8 @@ +2012-05-16 Chris Metcalf + + * sysdeps/unix/sysv/linux/generic/not-cancel.h: Add + multiple-inclusion guard. + 2012-05-16 Chris Metcalf * sysdeps/unix/sysv/linux/generic/bits/typesizes.h: diff --git a/sysdeps/unix/sysv/linux/generic/not-cancel.h b/sysdeps/unix/sysv/linux/generic/not-cancel.h index ae46e168fe..512252a8d0 100644 --- a/sysdeps/unix/sysv/linux/generic/not-cancel.h +++ b/sysdeps/unix/sysv/linux/generic/not-cancel.h @@ -17,6 +17,9 @@ License along with the GNU C Library. If not, see . */ +#ifndef _LINUX_GENERIC_NOT_CANCEL_H +#define _LINUX_GENERIC_NOT_CANCEL_H + #include #include @@ -27,3 +30,5 @@ #undef open_not_cancel_2 #define open_not_cancel_2(name, flags) \ INLINE_SYSCALL (openat, 3, AT_FDCWD, (const char *) (name), (flags)) + +#endif From 7fbf19e1fdc525aaa92d61c6d2c334600ba7f1b6 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 16 May 2012 21:19:06 +0000 Subject: [PATCH 4373/4487] Add powerpc-nofpu ABI baselines. --- ChangeLog.powerpc | 29 + .../powerpc/powerpc32/nofpu/nptl/ld.abilist | 17 + .../nofpu/nptl/libBrokenLocale.abilist | 3 + .../powerpc32/nofpu/nptl/libanl.abilist | 6 + .../powerpc/powerpc32/nofpu/nptl/libc.abilist | 2508 +++++++++++++++++ .../powerpc32/nofpu/nptl/libcrypt.abilist | 9 + .../powerpc32/nofpu/nptl/libdl.abilist | 18 + .../powerpc/powerpc32/nofpu/nptl/libm.abilist | 515 ++++ .../powerpc32/nofpu/nptl/libnsl.abilist | 127 + .../powerpc32/nofpu/nptl/libpthread.abilist | 273 ++ .../powerpc32/nofpu/nptl/libresolv.abilist | 104 + .../powerpc32/nofpu/nptl/librt.abilist | 52 + .../powerpc32/nofpu/nptl/libthread_db.abilist | 48 + .../powerpc32/nofpu/nptl/libutil.abilist | 8 + 14 files changed, 3717 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/ld.abilist create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libBrokenLocale.abilist create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libanl.abilist create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libcrypt.abilist create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libdl.abilist create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libm.abilist create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libnsl.abilist create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libpthread.abilist create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libresolv.abilist create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/librt.abilist create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libthread_db.abilist create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libutil.abilist diff --git a/ChangeLog.powerpc b/ChangeLog.powerpc index 802044f51a..1935a40920 100644 --- a/ChangeLog.powerpc +++ b/ChangeLog.powerpc @@ -1,3 +1,32 @@ +2012-05-16 Joseph Myers + + * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/ld.abilist: + New file. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libBrokenLocale.abilist: + Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libanl.abilist: + Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist: + Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libcrypt.abilist: + Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libdl.abilist: + Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libm.abilist: + Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libnsl.abilist: + Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libpthread.abilist: + Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libresolv.abilist: + Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/librt.abilist: + Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libthread_db.abilist: + Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libutil.abilist: + Likewise. + 2012-03-09 Paul Eggert [BZ #13673] diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/ld.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/ld.abilist new file mode 100644 index 0000000000..d71611f027 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/ld.abilist @@ -0,0 +1,17 @@ +GLIBC_2.0 + GLIBC_2.0 A + __libc_memalign F + _r_debug D 0x14 + calloc F + free F + malloc F + realloc F +GLIBC_2.1 + GLIBC_2.1 A + __libc_stack_end D 0x4 + _dl_mcount F +GLIBC_2.3 + GLIBC_2.3 A + __tls_get_addr F +GLIBC_2.4 + GLIBC_2.4 A diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libBrokenLocale.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libBrokenLocale.abilist new file mode 100644 index 0000000000..f4ca37f44b --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libBrokenLocale.abilist @@ -0,0 +1,3 @@ +GLIBC_2.0 + GLIBC_2.0 A + __ctype_get_mb_cur_max F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libanl.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libanl.abilist new file mode 100644 index 0000000000..c9755d8a33 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libanl.abilist @@ -0,0 +1,6 @@ +GLIBC_2.2.3 + GLIBC_2.2.3 A + gai_cancel F + gai_error F + gai_suspend F + getaddrinfo_a F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist new file mode 100644 index 0000000000..dc01353ec3 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist @@ -0,0 +1,2508 @@ +GCC_3.0 + GCC_3.0 A + _Unwind_Find_FDE F + __deregister_frame_info_bases F + __register_frame_info_bases F + __register_frame_info_table_bases F +GLIBC_2.0 + GLIBC_2.0 A + _IO_adjust_column F + _IO_default_doallocate F + _IO_default_finish F + _IO_default_pbackfail F + _IO_default_uflow F + _IO_default_xsgetn F + _IO_default_xsputn F + _IO_do_write F + _IO_doallocbuf F + _IO_fclose F + _IO_fdopen F + _IO_feof F + _IO_ferror F + _IO_fflush F + _IO_fgetpos F + _IO_fgets F + _IO_file_attach F + _IO_file_close F + _IO_file_close_it F + _IO_file_doallocate F + _IO_file_fopen F + _IO_file_init F + _IO_file_jumps D 0x54 + _IO_file_open F + _IO_file_overflow F + _IO_file_read F + _IO_file_seek F + _IO_file_seekoff F + _IO_file_setbuf F + _IO_file_stat F + _IO_file_sync F + _IO_file_underflow F + _IO_file_write F + _IO_file_xsputn F + _IO_flockfile F + _IO_flush_all F + _IO_flush_all_linebuffered F + _IO_fopen F + _IO_fprintf F + _IO_fputs F + _IO_fread F + _IO_free_backup_area F + _IO_fsetpos F + _IO_ftell F + _IO_ftrylockfile F + _IO_funlockfile F + _IO_fwrite F + _IO_getc F + _IO_getline F + _IO_gets F + _IO_init F + _IO_init_marker F + _IO_link_in F + _IO_list_all D 0x4 + _IO_marker_delta F + _IO_marker_difference F + _IO_padn F + _IO_peekc_locked F + _IO_popen F + _IO_printf F + _IO_proc_close F + _IO_proc_open F + _IO_putc F + _IO_puts F + _IO_remove_marker F + _IO_seekmark F + _IO_seekoff F + _IO_seekpos F + _IO_setb F + _IO_setbuffer F + _IO_setvbuf F + _IO_sgetn F + _IO_sprintf F + _IO_sputbackc F + _IO_sscanf F + _IO_stderr_ D 0x50 + _IO_stdin_ D 0x50 + _IO_stdout_ D 0x50 + _IO_str_init_readonly F + _IO_str_init_static F + _IO_str_overflow F + _IO_str_pbackfail F + _IO_str_seekoff F + _IO_str_underflow F + _IO_sungetc F + _IO_switch_to_get_mode F + _IO_un_link F + _IO_ungetc F + _IO_unsave_markers F + _IO_vfprintf F + _IO_vfscanf F + _IO_vsprintf F + __adjtimex F + __after_morecore_hook D 0x4 + __argz_count F + __argz_next F + __argz_stringify F + __ashldi3 F + __ashrdi3 F + __assert_fail F + __assert_perror_fail F + __bsd_getpgrp F + __bzero F + __check_rhosts_file D 0x4 + __clone F + __close F + __cmpdi2 F + __cmsg_nxthdr F + __connect F + __ctype32_b D 0x4 + __ctype_b D 0x4 + __ctype_get_mb_cur_max F + __ctype_tolower D 0x4 + __ctype_toupper D 0x4 + __curbrk D 0x4 + __daylight D 0x4 + __dcgettext F + __default_morecore F + __deregister_frame F + __deregister_frame_info F + __dgettext F + __divdi3 F + __dup2 F + __environ D 0x4 + __errno_location F + __fcntl F + __ffs F + __finite F + __finitef F + __finitel F + __fixdfdi F + __fixsfdi F + __fixunsdfdi F + __fixunssfdi F + __floatdidf F + __floatdisf F + __fork F + __fpu_control D 0x4 + __frame_state_for F + __free_hook D 0x4 + __fxstat F + __getdelim F + __getpagesize F + __getpgid F + __getpid F + __gettimeofday F + __gmtime_r F + __h_errno_location F + __isinf F + __isinff F + __isinfl F + __isnan F + __isnanf F + __isnanl F + __iswctype F + __ivaliduser F + __libc_calloc F + __libc_free F + __libc_init_first F + __libc_mallinfo F + __libc_malloc F + __libc_mallopt F + __libc_memalign F + __libc_pvalloc F + __libc_realloc F + __libc_start_main F + __libc_valloc F + __lseek F + __lshrdi3 F + __lxstat F + __malloc_hook D 0x4 + __malloc_initialize_hook D 0x4 + __mbrlen F + __mbrtowc F + __memalign_hook D 0x4 + __mempcpy F + __moddi3 F + __monstartup F + __morecore D 0x4 + __nss_configure_lookup F + __nss_database_lookup F + __nss_group_lookup F + __nss_hosts_lookup F + __nss_next F + __nss_passwd_lookup F + __open F + __overflow F + __pipe F + __printf_fp F + __profile_frequency F + __progname D 0x4 + __progname_full D 0x4 + __rcmd_errstr D 0x4 + __read F + __realloc_hook D 0x4 + __register_frame F + __register_frame_info F + __register_frame_info_table F + __register_frame_table F + __res_randomid F + __sbrk F + __sched_get_priority_max F + __sched_get_priority_min F + __sched_getparam F + __sched_getscheduler F + __sched_setscheduler F + __sched_yield F + __secure_getenv F + __select F + __send F + __setpgid F + __sigaction F + __sigaddset F + __sigdelset F + __sigismember F + __sigpause F + __sigsetjmp F + __stpcpy F + __stpncpy F + __strcasecmp F + __strdup F + __strerror_r F + __strtod_internal F + __strtof_internal F + __strtok_r F + __strtol_internal F + __strtold_internal F + __strtoll_internal F + __strtoq_internal F + __strtoul_internal F + __strtoull_internal F + __strtouq_internal F + __sysv_signal F + __timezone D 0x4 + __tzname D 0x8 + __ucmpdi2 F + __udivdi3 F + __uflow F + __umoddi3 F + __underflow F + __vfscanf F + __vsnprintf F + __vsscanf F + __wait F + __waitpid F + __wcstod_internal F + __wcstof_internal F + __wcstol_internal F + __wcstold_internal F + __wcstoll_internal F + __wcstoul_internal F + __wcstoull_internal F + __write F + __xmknod F + __xpg_basename F + __xstat F + _environ D 0x4 + _exit F + _libc_intl_domainname D 0x5 + _longjmp F + _mcleanup F + _mcount F + _nl_default_dirname D 0x12 + _nl_domain_bindings D 0x4 + _nl_msg_cat_cntr D 0x4 + _null_auth D 0xc + _obstack D 0x4 + _obstack_allocated_p F + _obstack_begin F + _obstack_begin_1 F + _obstack_free F + _obstack_memory_used F + _obstack_newchunk F + _res D 0x200 + _rpc_dtablesize F + _seterr_reply F + _setjmp F + _sys_errlist D 0x1ec + _sys_nerr D 0x4 + _sys_siglist D 0x80 + _tolower F + _toupper F + a64l F + abort F + abs F + accept F + access F + acct F + addmntent F + adjtime F + adjtimex F + advance F + alarm F + alphasort F + argz_add F + argz_add_sep F + argz_append F + argz_count F + argz_create F + argz_create_sep F + argz_delete F + argz_extract F + argz_insert F + argz_next F + argz_replace F + argz_stringify F + asctime F + asctime_r F + asprintf F + atexit F + atof F + atoi F + atol F + atoll F + authnone_create F + authunix_create F + authunix_create_default F + basename F + bcmp F + bcopy F + bdflush F + bind F + bindresvport F + bindtextdomain F + brk F + bsd_signal F + bsearch F + btowc F + bzero F + calloc F + callrpc F + canonicalize_file_name F + catclose F + catgets F + catopen F + cfgetispeed F + cfgetospeed F + cfmakeraw F + cfree F + cfsetispeed F + cfsetospeed F + cfsetspeed F + chdir F + chflags F + chmod F + chown F + chroot F + clearenv F + clearerr F + clearerr_unlocked F + clnt_broadcast F + clnt_create F + clnt_pcreateerror F + clnt_perrno F + clnt_perror F + clnt_spcreateerror F + clnt_sperrno F + clnt_sperror F + clntraw_create F + clnttcp_create F + clntudp_bufcreate F + clntudp_create F + clock F + clone F + close F + closedir F + closelog F + confstr F + connect F + copysign F + copysignf F + copysignl F + creat F + create_module F + ctermid F + ctime F + ctime_r F + cuserid F + daemon F + daylight D 0x4 + dcgettext F + delete_module F + dgettext F + difftime F + dirfd F + dirname F + div F + dprintf F + drand48 F + drand48_r F + dup F + dup2 F + dysize F + ecvt F + ecvt_r F + endaliasent F + endfsent F + endgrent F + endhostent F + endmntent F + endnetent F + endnetgrent F + endprotoent F + endpwent F + endrpcent F + endservent F + endspent F + endttyent F + endusershell F + endutent F + environ D 0x4 + envz_add F + envz_entry F + envz_get F + envz_merge F + envz_remove F + envz_strip F + erand48 F + erand48_r F + err F + error F + error_at_line F + error_message_count D 0x4 + error_one_per_line D 0x4 + error_print_progname D 0x4 + errx F + ether_aton F + ether_aton_r F + ether_hostton F + ether_line F + ether_ntoa F + ether_ntoa_r F + ether_ntohost F + euidaccess F + execl F + execle F + execlp F + execv F + execve F + execvp F + exit F + fchdir F + fchflags F + fchmod F + fchown F + fclose F + fcloseall F + fcntl F + fcvt F + fcvt_r F + fdatasync F + fdopen F + feof F + feof_unlocked F + ferror F + ferror_unlocked F + fexecve F + fflush F + fflush_unlocked F + ffs F + fgetc F + fgetgrent F + fgetgrent_r F + fgetpos F + fgetpwent F + fgetpwent_r F + fgets F + fgetspent F + fgetspent_r F + fileno F + fileno_unlocked F + finite F + finitef F + finitel F + flock F + flockfile F + fnmatch F + fopen F + fopencookie F + fork F + fpathconf F + fprintf F + fputc F + fputc_unlocked F + fputs F + fread F + free F + freeaddrinfo F + freopen F + frexp F + frexpf F + frexpl F + fscanf F + fseek F + fsetpos F + fstatfs F + fsync F + ftell F + ftime F + ftok F + ftruncate F + ftrylockfile F + fts_children F + fts_close F + fts_open F + fts_read F + fts_set F + ftw F + funlockfile F + fwrite F + gcvt F + get_avphys_pages F + get_current_dir_name F + get_kernel_syms F + get_myaddress F + get_nprocs F + get_nprocs_conf F + get_phys_pages F + getaddrinfo F + getaliasbyname F + getaliasbyname_r F + getaliasent F + getaliasent_r F + getc F + getc_unlocked F + getchar F + getchar_unlocked F + getcwd F + getdelim F + getdirentries F + getdomainname F + getdtablesize F + getegid F + getenv F + geteuid F + getfsent F + getfsfile F + getfsspec F + getgid F + getgrent F + getgrent_r F + getgrgid F + getgrgid_r F + getgrnam F + getgrnam_r F + getgroups F + gethostbyaddr F + gethostbyaddr_r F + gethostbyname F + gethostbyname2 F + gethostbyname2_r F + gethostbyname_r F + gethostent F + gethostent_r F + gethostid F + gethostname F + getitimer F + getline F + getlogin F + getlogin_r F + getmntent F + getmntent_r F + getnetbyaddr F + getnetbyaddr_r F + getnetbyname F + getnetbyname_r F + getnetent F + getnetent_r F + getnetgrent F + getnetgrent_r F + getopt F + getopt_long F + getopt_long_only F + getpagesize F + getpass F + getpeername F + getpgid F + getpgrp F + getpid F + getppid F + getpriority F + getprotobyname F + getprotobyname_r F + getprotobynumber F + getprotobynumber_r F + getprotoent F + getprotoent_r F + getpublickey F + getpw F + getpwent F + getpwent_r F + getpwnam F + getpwnam_r F + getpwuid F + getpwuid_r F + getresgid F + getresuid F + getrlimit F + getrpcbyname F + getrpcbyname_r F + getrpcbynumber F + getrpcbynumber_r F + getrpcent F + getrpcent_r F + getrpcport F + getrusage F + gets F + getsecretkey F + getservbyname F + getservbyname_r F + getservbyport F + getservbyport_r F + getservent F + getservent_r F + getsid F + getsockname F + getsockopt F + getspent F + getspent_r F + getspnam F + getspnam_r F + getsubopt F + gettext F + gettimeofday F + getttyent F + getttynam F + getuid F + getusershell F + getutent F + getutent_r F + getutid F + getutid_r F + getutline F + getutline_r F + getw F + getwd F + glob F + glob_pattern_p F + globfree F + gmtime F + gmtime_r F + group_member F + gsignal F + gtty F + h_errlist D 0x14 + h_nerr D 0x4 + hasmntopt F + hcreate F + hcreate_r F + hdestroy F + hdestroy_r F + herror F + hsearch F + hsearch_r F + hstrerror F + htonl F + htons F + index F + inet_addr F + inet_aton F + inet_lnaof F + inet_makeaddr F + inet_netof F + inet_network F + inet_nsap_addr F + inet_nsap_ntoa F + inet_ntoa F + inet_ntop F + inet_pton F + init_module F + initgroups F + initstate F + initstate_r F + innetgr F + insque F + ioctl F + iruserok F + isalnum F + isalpha F + isascii F + isatty F + isblank F + iscntrl F + isdigit F + isfdtype F + isgraph F + isinf F + isinff F + isinfl F + islower F + isnan F + isnanf F + isnanl F + isprint F + ispunct F + isspace F + isupper F + iswalnum F + iswalpha F + iswcntrl F + iswctype F + iswdigit F + iswgraph F + iswlower F + iswprint F + iswpunct F + iswspace F + iswupper F + iswxdigit F + isxdigit F + jrand48 F + jrand48_r F + kill F + killpg F + klogctl F + l64a F + labs F + lchown F + lckpwdf F + lcong48 F + lcong48_r F + ldexp F + ldexpf F + ldexpl F + ldiv F + lfind F + link F + listen F + llabs F + lldiv F + llseek F + loc1 D 0x4 + loc2 D 0x4 + localeconv F + localtime F + localtime_r F + lockf F + locs D 0x4 + longjmp F + lrand48 F + lrand48_r F + lsearch F + lseek F + madvise F + mallinfo F + malloc F + malloc_get_state F + malloc_set_state F + malloc_stats F + malloc_trim F + malloc_usable_size F + mallopt F + mallwatch D 0x4 + mblen F + mbrlen F + mbrtowc F + mbsinit F + mbsnrtowcs F + mbsrtowcs F + mbstowcs F + mbtowc F + mcheck F + memalign F + memccpy F + memchr F + memcmp F + memcpy F + memfrob F + memmem F + memmove F + memset F + mkdir F + mkfifo F + mkstemp F + mktemp F + mktime F + mlock F + mlockall F + mmap F + modf F + modff F + modfl F + monstartup F + mount F + mprobe F + mprotect F + mrand48 F + mrand48_r F + mremap F + msgctl F + msgget F + msgrcv F + msgsnd F + msync F + mtrace F + munlock F + munlockall F + munmap F + muntrace F + nanosleep F + nfsservctl F + nice F + nl_langinfo F + nrand48 F + nrand48_r F + ntohl F + ntohs F + obstack_alloc_failed_handler D 0x4 + obstack_exit_failure D 0x4 + obstack_free F + obstack_printf F + obstack_vprintf F + on_exit F + open F + open_memstream F + opendir F + openlog F + optarg D 0x4 + opterr D 0x4 + optind D 0x4 + optopt D 0x4 + parse_printf_format F + pathconf F + pause F + pclose F + perror F + personality F + pipe F + pmap_getmaps F + pmap_getport F + pmap_rmtcall F + pmap_set F + pmap_unset F + poll F + popen F + prctl F + printf F + profil F + program_invocation_name D 0x4 + program_invocation_short_name D 0x4 + pselect F + psignal F + pthread_attr_destroy F + pthread_attr_getdetachstate F + pthread_attr_getinheritsched F + pthread_attr_getschedparam F + pthread_attr_getschedpolicy F + pthread_attr_getscope F + pthread_attr_init F + pthread_attr_setdetachstate F + pthread_attr_setinheritsched F + pthread_attr_setschedparam F + pthread_attr_setschedpolicy F + pthread_attr_setscope F + pthread_cond_broadcast F + pthread_cond_destroy F + pthread_cond_init F + pthread_cond_signal F + pthread_cond_timedwait F + pthread_cond_wait F + pthread_condattr_destroy F + pthread_condattr_init F + pthread_equal F + pthread_exit F + pthread_getschedparam F + pthread_mutex_destroy F + pthread_mutex_init F + pthread_mutex_lock F + pthread_mutex_unlock F + pthread_self F + pthread_setcancelstate F + pthread_setcanceltype F + pthread_setschedparam F + ptrace F + putc F + putc_unlocked F + putchar F + putchar_unlocked F + putenv F + putpwent F + puts F + putspent F + pututline F + putw F + pvalloc F + qecvt F + qecvt_r F + qfcvt F + qfcvt_r F + qgcvt F + qsort F + query_module F + quotactl F + raise F + rand F + rand_r F + random F + random_r F + rcmd F + re_comp F + re_compile_fastmap F + re_compile_pattern F + re_exec F + re_match F + re_match_2 F + re_max_failures D 0x4 + re_search F + re_search_2 F + re_set_registers F + re_set_syntax F + re_syntax_options D 0x4 + read F + readdir F + readdir_r F + readlink F + readv F + realloc F + realpath F + reboot F + recv F + recvfrom F + recvmsg F + regcomp F + regerror F + regexec F + regfree F + register_printf_function F + registerrpc F + remove F + remque F + rename F + res_init F + revoke F + rewind F + rewinddir F + rexec F + rexecoptions D 0x4 + rindex F + rmdir F + rpc_createerr D 0x10 + rpmatch F + rresvport F + ruserok F + ruserpass F + sbrk F + scalbn F + scalbnf F + scalbnl F + scandir F + scanf F + sched_get_priority_max F + sched_get_priority_min F + sched_getparam F + sched_getscheduler F + sched_rr_get_interval F + sched_setparam F + sched_setscheduler F + sched_yield F + seed48 F + seed48_r F + seekdir F + select F + semctl F + semget F + semop F + send F + sendmsg F + sendto F + setaliasent F + setbuf F + setbuffer F + setcontext F + setdomainname F + setegid F + setenv F + seteuid F + setfsent F + setfsgid F + setfsuid F + setgid F + setgrent F + setgroups F + sethostent F + sethostid F + sethostname F + setitimer F + setjmp F + setlinebuf F + setlocale F + setlogin F + setlogmask F + setmntent F + setnetent F + setnetgrent F + setpgid F + setpgrp F + setpriority F + setprotoent F + setpwent F + setregid F + setresgid F + setresuid F + setreuid F + setrlimit F + setrpcent F + setservent F + setsid F + setsockopt F + setspent F + setstate F + setstate_r F + settimeofday F + setttyent F + setuid F + setusershell F + setutent F + setvbuf F + sgetspent F + sgetspent_r F + shmat F + shmctl F + shmdt F + shmget F + shutdown F + sigaction F + sigaddset F + sigaltstack F + sigandset F + sigblock F + sigdelset F + sigemptyset F + sigfillset F + siggetmask F + siginterrupt F + sigisemptyset F + sigismember F + siglongjmp F + signal F + sigorset F + sigpause F + sigpending F + sigprocmask F + sigreturn F + sigsetmask F + sigstack F + sigsuspend F + sigvec F + sigwait F + sleep F + snprintf F + socket F + socketpair F + sprintf F + srand F + srand48 F + srand48_r F + srandom F + srandom_r F + sscanf F + ssignal F + sstk F + statfs F + stderr D 0x4 + stdin D 0x4 + stdout D 0x4 + step F + stime F + stpcpy F + stpncpy F + strcasecmp F + strcat F + strchr F + strcmp F + strcoll F + strcpy F + strcspn F + strdup F + strerror F + strerror_r F + strfmon F + strfry F + strftime F + strlen F + strncasecmp F + strncat F + strncmp F + strncpy F + strndup F + strnlen F + strpbrk F + strptime F + strrchr F + strsep F + strsignal F + strspn F + strstr F + strtod F + strtof F + strtok F + strtok_r F + strtol F + strtold F + strtoll F + strtoq F + strtoul F + strtoull F + strtouq F + strxfrm F + stty F + svc_exit F + svc_fdset D 0x80 + svc_getreq F + svc_getreqset F + svc_register F + svc_run F + svc_sendreply F + svc_unregister F + svcauthdes_stats D 0xc + svcerr_auth F + svcerr_decode F + svcerr_noproc F + svcerr_noprog F + svcerr_progvers F + svcerr_systemerr F + svcerr_weakauth F + svcfd_create F + svcraw_create F + svctcp_create F + svcudp_bufcreate F + svcudp_create F + svcudp_enablecache F + swab F + swapoff F + swapon F + symlink F + sync F + sys_errlist D 0x1ec + sys_nerr D 0x4 + sys_sigabbrev D 0x80 + sys_siglist D 0x80 + syscall F + sysconf F + sysctl F + sysinfo F + syslog F + system F + tcdrain F + tcflow F + tcflush F + tcgetattr F + tcgetpgrp F + tcsendbreak F + tcsetattr F + tcsetpgrp F + tdelete F + telldir F + tempnam F + textdomain F + tfind F + time F + timegm F + timelocal F + times F + timezone D 0x4 + tmpfile F + tmpnam F + tmpnam_r F + toascii F + tolower F + toupper F + towctrans F + towlower F + towupper F + tr_break F + truncate F + tsearch F + ttyname F + ttyname_r F + ttyslot F + twalk F + tzname D 0x8 + tzset F + ualarm F + ulckpwdf F + ulimit F + umask F + umount F + uname F + ungetc F + unlink F + unsetenv F + updwtmp F + uselib F + usleep F + ustat F + utime F + utimes F + utmpname F + valloc F + vasprintf F + vdprintf F + verr F + verrx F + vfork F + vfprintf F + vfscanf F + vhangup F + vlimit F + vprintf F + vscanf F + vsnprintf F + vsprintf F + vsscanf F + vsyslog F + vtimes F + vwarn F + vwarnx F + wait F + wait3 F + wait4 F + waitpid F + warn F + warnx F + wcpcpy F + wcpncpy F + wcrtomb F + wcscat F + wcschr F + wcscmp F + wcscoll F + wcscpy F + wcscspn F + wcsdup F + wcslen F + wcsncat F + wcsncmp F + wcsncpy F + wcsnrtombs F + wcspbrk F + wcsrchr F + wcsrtombs F + wcsspn F + wcsstr F + wcstod F + wcstof F + wcstok F + wcstol F + wcstold F + wcstombs F + wcstoq F + wcstoul F + wcstouq F + wcswidth F + wcsxfrm F + wctob F + wctomb F + wctrans F + wctype F + wcwidth F + wmemchr F + wmemcmp F + wmemcpy F + wmemmove F + wmemset F + write F + writev F + xdr_accepted_reply F + xdr_array F + xdr_authunix_parms F + xdr_bool F + xdr_bytes F + xdr_callhdr F + xdr_callmsg F + xdr_char F + xdr_cryptkeyarg F + xdr_cryptkeyarg2 F + xdr_cryptkeyres F + xdr_des_block F + xdr_double F + xdr_enum F + xdr_float F + xdr_free F + xdr_int F + xdr_key_netstarg F + xdr_key_netstres F + xdr_keybuf F + xdr_keystatus F + xdr_long F + xdr_netobj F + xdr_opaque F + xdr_opaque_auth F + xdr_pmap F + xdr_pmaplist F + xdr_pointer F + xdr_reference F + xdr_rejected_reply F + xdr_replymsg F + xdr_rmtcall_args F + xdr_rmtcallres F + xdr_short F + xdr_string F + xdr_u_char F + xdr_u_int F + xdr_u_long F + xdr_u_short F + xdr_union F + xdr_vector F + xdr_void F + xdr_wrapstring F + xdrmem_create F + xdrrec_create F + xdrrec_endofrecord F + xdrrec_eof F + xdrrec_skiprecord F + xdrstdio_create F + xencrypt F + xprt_register F + xprt_unregister F +GLIBC_2.1 + GLIBC_2.1 A + _IO_2_1_stderr_ D 0xa0 + _IO_2_1_stdin_ D 0xa0 + _IO_2_1_stdout_ D 0xa0 + _IO_do_write F + _IO_fclose F + _IO_fdopen F + _IO_fgetpos64 F + _IO_file_attach F + _IO_file_close_it F + _IO_file_finish F + _IO_file_fopen F + _IO_file_init F + _IO_file_overflow F + _IO_file_seekoff F + _IO_file_setbuf F + _IO_file_sync F + _IO_file_underflow F + _IO_file_write F + _IO_file_xsputn F + _IO_fopen F + _IO_fsetpos64 F + _IO_getline_info F + _IO_popen F + _IO_proc_close F + _IO_proc_open F + __asprintf F + __backtrace F + __backtrace_symbols F + __backtrace_symbols_fd F + __duplocale F + __freelocale F + __fxstat64 F + __isalnum_l F + __isalpha_l F + __isascii_l F + __isblank_l F + __iscntrl_l F + __isdigit_l F + __isgraph_l F + __islower_l F + __isprint_l F + __ispunct_l F + __isspace_l F + __isupper_l F + __iswalnum_l F + __iswalpha_l F + __iswblank_l F + __iswcntrl_l F + __iswctype_l F + __iswdigit_l F + __iswgraph_l F + __iswlower_l F + __iswprint_l F + __iswpunct_l F + __iswspace_l F + __iswupper_l F + __iswxdigit_l F + __isxdigit_l F + __key_decryptsession_pk_LOCAL D 0x4 + __key_encryptsession_pk_LOCAL D 0x4 + __key_gendes_LOCAL D 0x4 + __libc_allocate_rtsig F + __libc_current_sigrtmax F + __libc_current_sigrtmin F + __libc_freeres F + __libc_sa_len F + __lxstat64 F + __newlocale F + __poll F + __pread64 F + __pwrite64 F + __rawmemchr F + __signbit F + __signbitf F + __strcasecmp_l F + __strcasestr F + __strcoll_l F + __strfmon_l F + __strncasecmp_l F + __strtod_l F + __strtof_l F + __strtol_l F + __strtold_l F + __strtoll_l F + __strtoul_l F + __strtoull_l F + __strxfrm_l F + __toascii_l F + __tolower_l F + __toupper_l F + __towctrans F + __towctrans_l F + __towlower_l F + __towupper_l F + __wcscasecmp_l F + __wcscoll_l F + __wcsncasecmp_l F + __wcstod_l F + __wcstof_l F + __wcstol_l F + __wcstold_l F + __wcstoll_l F + __wcstoul_l F + __wcstoull_l F + __wcsxfrm_l F + __wctype_l F + __xstat64 F + _authenticate F + _dl_mcount_wrapper F + _dl_mcount_wrapper_check F + _sys_errlist D 0x1f4 + _sys_nerr D 0x4 + _sys_siglist D 0x100 + addseverity F + alphasort64 F + argp_err_exit_status D 0x4 + argp_error F + argp_failure F + argp_help F + argp_parse F + argp_program_bug_address D 0x4 + argp_program_version D 0x4 + argp_program_version_hook D 0x4 + argp_state_help F + argp_usage F + authdes_create F + authdes_getucred F + authdes_pk_create F + backtrace F + backtrace_symbols F + backtrace_symbols_fd F + capget F + capset F + cbc_crypt F + chown F + clntunix_create F + creat64 F + des_setparity F + ecb_crypt F + endutxent F + fattach F + fclose F + fdetach F + fdopen F + ffsl F + ffsll F + fgetc_unlocked F + fgetpos64 F + fgets_unlocked F + fmtmsg F + fopen F + fopen64 F + fputs_unlocked F + fread_unlocked F + freopen64 F + fseeko F + fseeko64 F + fsetpos64 F + fstatfs64 F + fstatvfs F + fstatvfs64 F + ftello F + ftello64 F + ftruncate64 F + ftw64 F + fwrite_unlocked F + gai_strerror F + getcontext F + getdate F + getdate_err D 0x4 + getdate_r F + getmsg F + getnameinfo F + getnetname F + getpmsg F + getpt F + getrlimit64 F + getutxent F + getutxid F + getutxline F + glob64 F + globfree64 F + gnu_get_libc_release F + gnu_get_libc_version F + grantpt F + host2netname F + iconv F + iconv_close F + iconv_open F + if_freenameindex F + if_indextoname F + if_nameindex F + if_nametoindex F + in6addr_any D 0x10 + in6addr_loopback D 0x10 + isastream F + iswblank F + key_decryptsession F + key_decryptsession_pk F + key_encryptsession F + key_encryptsession_pk F + key_gendes F + key_get_conv F + key_secretkey_is_set F + key_setnet F + key_setsecret F + lockf64 F + lseek64 F + makecontext F + mempcpy F + mmap64 F + netname2host F + netname2user F + nftw F + nftw64 F + ntp_adjtime F + ntp_gettime F + open64 F + passwd2des F + pclose F + popen F + pread F + pread64 F + printf_size F + printf_size_info F + pthread_attr_init F + ptsname F + ptsname_r F + putgrent F + putmsg F + putpmsg F + pututxline F + pwrite F + pwrite64 F + rawmemchr F + readdir64 F + readdir64_r F + rtime F + scandir64 F + sendfile F + setrlimit64 F + setutxent F + sighold F + sigignore F + sigqueue F + sigrelse F + sigset F + sigtimedwait F + sigwaitinfo F + statfs64 F + statvfs F + statvfs64 F + strcasestr F + strtoimax F + strtoumax F + strverscmp F + svcunix_create F + svcunixfd_create F + swapcontext F + sys_errlist D 0x1f4 + sys_nerr D 0x4 + sys_sigabbrev D 0x100 + sys_siglist D 0x100 + sysv_signal F + tcgetsid F + tdestroy F + tmpfile F + tmpfile64 F + truncate64 F + umount2 F + unlockpt F + updwtmpx F + user2netname F + utmpxname F + versionsort F + versionsort64 F + waitid F + wcscasecmp F + wcsncasecmp F + wcsnlen F + wcstoimax F + wcstoll F + wcstoull F + wcstoumax F + wcswcs F + wordexp F + wordfree F + xdecrypt F + xdr_authdes_cred F + xdr_authdes_verf F + xdr_getcredres F + xdr_int16_t F + xdr_int32_t F + xdr_int8_t F + xdr_netnamestr F + xdr_sizeof F + xdr_uint16_t F + xdr_uint32_t F + xdr_uint8_t F + xdr_unixcred F +GLIBC_2.1.1 + GLIBC_2.1.1 A + _Exit F + __mempcpy_small F + __stpcpy_small F + __strcpy_small F + __strcspn_c1 F + __strcspn_c2 F + __strcspn_c3 F + __strpbrk_c2 F + __strpbrk_c3 F + __strsep_1c F + __strsep_2c F + __strsep_3c F + __strsep_g F + __strspn_c1 F + __strspn_c2 F + __strspn_c3 F + __strtok_r_1c F + __strverscmp F + getutmp F + getutmpx F + imaxabs F + imaxdiv F + strchrnul F + xdr_hyper F + xdr_int64_t F + xdr_longlong_t F + xdr_u_hyper F + xdr_u_longlong_t F + xdr_uint64_t F +GLIBC_2.1.2 + GLIBC_2.1.2 A + __vfork F + getaliasbyname_r F + getaliasent_r F + getgrent_r F + getgrgid_r F + getgrnam_r F + gethostbyaddr_r F + gethostbyname2_r F + gethostbyname_r F + gethostent_r F + getnetbyaddr_r F + getnetbyname_r F + getnetent_r F + getprotobyname_r F + getprotobynumber_r F + getprotoent_r F + getpwent_r F + getpwnam_r F + getpwuid_r F + getrpcbyname_r F + getrpcbynumber_r F + getrpcent_r F + getservbyname_r F + getservbyport_r F + getservent_r F + getspent_r F + getspnam_r F +GLIBC_2.1.3 + GLIBC_2.1.3 A + __cxa_atexit F + __cxa_finalize F + __sigsuspend F +GLIBC_2.10 + GLIBC_2.10 A + __cxa_at_quick_exit F + __posix_getopt F + accept4 F + endsgent F + fallocate F + fgetsgent F + fgetsgent_r F + getsgent F + getsgent_r F + getsgnam F + getsgnam_r F + malloc_info F + preadv F + preadv64 F + psiginfo F + putsgent F + pwritev F + pwritev64 F + quick_exit F + register_printf_modifier F + register_printf_specifier F + register_printf_type F + setsgent F + sgetsgent F + sgetsgent_r F +GLIBC_2.11 + GLIBC_2.11 A + __longjmp_chk F + execvpe F + fallocate64 F + mkostemps F + mkostemps64 F + mkstemps F + mkstemps64 F +GLIBC_2.12 + GLIBC_2.12 A + _sys_errlist D 0x21c + _sys_nerr D 0x4 + ntp_gettimex F + recvmmsg F + sys_errlist D 0x21c + sys_nerr D 0x4 +GLIBC_2.13 + GLIBC_2.13 A + fanotify_init F + fanotify_mark F + prlimit F + prlimit64 F +GLIBC_2.14 + GLIBC_2.14 A + clock_adjtime F + name_to_handle_at F + open_by_handle_at F + sendmmsg F + setns F + syncfs F +GLIBC_2.15 + GLIBC_2.15 A + __fdelt_chk F + __fdelt_warn F + posix_spawn F + posix_spawnp F + process_vm_readv F + process_vm_writev F + scandirat F + scandirat64 F +GLIBC_2.16 + GLIBC_2.16 A + __poll_chk F + __ppoll_chk F + aligned_alloc F + c16rtomb F + c32rtomb F + mbrtoc16 F + mbrtoc32 F + timespec_get F +GLIBC_2.2 + GLIBC_2.2 A + _IO_adjust_wcolumn F + _IO_fgetpos F + _IO_fgetpos64 F + _IO_free_wbackup_area F + _IO_fsetpos F + _IO_fsetpos64 F + _IO_init_wmarker F + _IO_iter_begin F + _IO_iter_end F + _IO_iter_file F + _IO_iter_next F + _IO_least_wmarker F + _IO_list_lock F + _IO_list_resetlock F + _IO_list_unlock F + _IO_seekwmark F + _IO_sputbackwc F + _IO_sungetwc F + _IO_switch_to_main_wget_area F + _IO_switch_to_wbackup_area F + _IO_switch_to_wget_mode F + _IO_unsave_wmarkers F + _IO_wdefault_doallocate F + _IO_wdefault_finish F + _IO_wdefault_pbackfail F + _IO_wdefault_uflow F + _IO_wdefault_xsgetn F + _IO_wdefault_xsputn F + _IO_wdo_write F + _IO_wdoallocbuf F + _IO_wfile_jumps D 0x54 + _IO_wfile_overflow F + _IO_wfile_seekoff F + _IO_wfile_sync F + _IO_wfile_underflow F + _IO_wfile_xsputn F + _IO_wmarker_delta F + _IO_wsetb F + __assert F + __ctype32_tolower D 0x4 + __ctype32_toupper D 0x4 + __cyg_profile_func_enter F + __cyg_profile_func_exit F + __endmntent F + __fbufsize F + __flbf F + __fpending F + __fpurge F + __freadable F + __freading F + __fsetlocking F + __fwritable F + __fwriting F + __fxstat64 F + __getmntent_r F + __lxstat64 F + __nl_langinfo_l F + __open64 F + __res_init F + __res_nclose F + __res_ninit F + __res_state F + __setmntent F + __statfs F + __strndup F + __sysconf F + __sysctl F + __wctrans_l F + __woverflow F + __wuflow F + __wunderflow F + __xpg_sigpause F + __xstat64 F + _flushlbf F + _res_hconf D 0x30 + bind_textdomain_codeset F + dcngettext F + dngettext F + fgetpos F + fgetpos64 F + fgetwc F + fgetwc_unlocked F + fgetws F + fgetws_unlocked F + fmemopen F + fopencookie F + fputwc F + fputwc_unlocked F + fputws F + fputws_unlocked F + fsetpos F + fsetpos64 F + fwide F + fwprintf F + fwscanf F + getdirentries64 F + getloadavg F + getrlimit F + getrlimit64 F + getwc F + getwc_unlocked F + getwchar F + getwchar_unlocked F + glob64 F + iruserok_af F + localeconv F + mcheck_check_all F + mcheck_pedantic F + memrchr F + mincore F + mkdtemp F + mkstemp64 F + moncontrol F + msgctl F + ngettext F + posix_fadvise F + posix_fadvise64 F + posix_fallocate F + posix_fallocate64 F + posix_madvise F + posix_memalign F + posix_spawn F + posix_spawn_file_actions_addclose F + posix_spawn_file_actions_adddup2 F + posix_spawn_file_actions_addopen F + posix_spawn_file_actions_destroy F + posix_spawn_file_actions_init F + posix_spawnattr_destroy F + posix_spawnattr_getflags F + posix_spawnattr_getpgroup F + posix_spawnattr_getschedparam F + posix_spawnattr_getschedpolicy F + posix_spawnattr_getsigdefault F + posix_spawnattr_getsigmask F + posix_spawnattr_init F + posix_spawnattr_setflags F + posix_spawnattr_setpgroup F + posix_spawnattr_setschedparam F + posix_spawnattr_setschedpolicy F + posix_spawnattr_setsigdefault F + posix_spawnattr_setsigmask F + posix_spawnp F + putwc F + putwc_unlocked F + putwchar F + putwchar_unlocked F + rcmd_af F + readdir64 F + readdir64_r F + rexec_af F + rresvport_af F + ruserok_af F + scandir64 F + semctl F + setrlimit F + shmctl F + svc_getreq_common F + svc_getreq_poll F + svc_max_pollfd D 0x4 + svc_pollfd D 0x4 + swprintf F + swscanf F + ungetwc F + vfwprintf F + vfwscanf F + vswprintf F + vswscanf F + vwprintf F + vwscanf F + wcschrnul F + wcsftime F + wmempcpy F + wprintf F + wscanf F +GLIBC_2.2.1 + GLIBC_2.2.1 A + pivot_root F + posix_openpt F +GLIBC_2.2.2 + GLIBC_2.2.2 A + __nss_hostname_digits_dots F +GLIBC_2.2.3 + GLIBC_2.2.3 A + __rpc_thread_createerr F + __rpc_thread_svc_fdset F + __rpc_thread_svc_max_pollfd F + __rpc_thread_svc_pollfd F + fnmatch F + sprofil F +GLIBC_2.2.4 + GLIBC_2.2.4 A + dl_iterate_phdr F + getgrouplist F + sockatmark F +GLIBC_2.2.6 + GLIBC_2.2.6 A + __nanosleep F +GLIBC_2.3 + GLIBC_2.3 A + __ctype_b_loc F + __ctype_tolower_loc F + __ctype_toupper_loc F + __isctype F + __strftime_l F + __uselocale F + __wcsftime_l F + _sys_errlist D 0x1f8 + _sys_nerr D 0x4 + duplocale F + fgetxattr F + flistxattr F + freeifaddrs F + freelocale F + fremovexattr F + fsetxattr F + futimes F + getifaddrs F + getxattr F + isalnum_l F + isalpha_l F + isblank_l F + iscntrl_l F + isctype F + isdigit_l F + isgraph_l F + islower_l F + isprint_l F + ispunct_l F + isspace_l F + isupper_l F + iswalnum_l F + iswalpha_l F + iswblank_l F + iswcntrl_l F + iswctype_l F + iswdigit_l F + iswgraph_l F + iswlower_l F + iswprint_l F + iswpunct_l F + iswspace_l F + iswupper_l F + iswxdigit_l F + isxdigit_l F + lgetxattr F + listxattr F + llistxattr F + lremovexattr F + lsetxattr F + lutimes F + newlocale F + nl_langinfo_l F + readahead F + realpath F + removexattr F + sendfile64 F + setxattr F + strcasecmp_l F + strcoll_l F + strfmon_l F + strftime_l F + strncasecmp_l F + strtod_l F + strtof_l F + strtol_l F + strtold_l F + strtoll_l F + strtoul_l F + strtoull_l F + strxfrm_l F + sys_errlist D 0x1f8 + sys_nerr D 0x4 + tolower_l F + toupper_l F + towctrans_l F + towlower_l F + towupper_l F + uselocale F + wcscasecmp_l F + wcscoll_l F + wcsftime_l F + wcsncasecmp_l F + wcstod_l F + wcstof_l F + wcstol_l F + wcstold_l F + wcstoll_l F + wcstoul_l F + wcstoull_l F + wcsxfrm_l F + wctrans_l F + wctype_l F +GLIBC_2.3.2 + GLIBC_2.3.2 A + __adddf3 F + __addsf3 F + __divdf3 F + __divsf3 F + __eqdf2 F + __eqsf2 F + __extendsfdf2 F + __fixdfsi F + __fixsfsi F + __fixunsdfsi F + __fixunssfsi F + __floatsidf F + __floatsisf F + __gedf2 F + __gesf2 F + __ledf2 F + __lesf2 F + __muldf3 F + __mulsf3 F + __negdf2 F + __negsf2 F + __register_atfork F + __sim_disabled_exceptions D 0x4 + __sim_exceptions D 0x4 + __sim_round_mode D 0x4 + __sqrtdf2 F + __sqrtsf2 F + __subdf3 F + __subsf3 F + __truncdfsf2 F + epoll_create F + epoll_ctl F + epoll_wait F + lchmod F + pthread_cond_broadcast F + pthread_cond_destroy F + pthread_cond_init F + pthread_cond_signal F + pthread_cond_timedwait F + pthread_cond_wait F + strptime_l F +GLIBC_2.3.3 + GLIBC_2.3.3 A + _sys_siglist D 0x104 + getcontext F + gnu_dev_major F + gnu_dev_makedev F + gnu_dev_minor F + inet6_option_alloc F + inet6_option_append F + inet6_option_find F + inet6_option_init F + inet6_option_next F + inet6_option_space F + makecontext F + nftw F + nftw64 F + posix_fadvise64 F + posix_fallocate64 F + remap_file_pages F + sched_getaffinity F + sched_setaffinity F + semtimedop F + setcontext F + swapcontext F + sys_sigabbrev D 0x104 + sys_siglist D 0x104 +GLIBC_2.3.4 + GLIBC_2.3.4 A + __chk_fail F + __fprintf_chk F + __gets_chk F + __memcpy_chk F + __memmove_chk F + __mempcpy_chk F + __memset_chk F + __printf_chk F + __sigsetjmp F + __snprintf_chk F + __sprintf_chk F + __stpcpy_chk F + __strcat_chk F + __strcpy_chk F + __strncat_chk F + __strncpy_chk F + __vfprintf_chk F + __vprintf_chk F + __vsnprintf_chk F + __vsprintf_chk F + __xpg_strerror_r F + _longjmp F + _setjmp F + getcontext F + getipv4sourcefilter F + getsourcefilter F + longjmp F + makecontext F + regexec F + sched_getaffinity F + sched_setaffinity F + setcontext F + setipv4sourcefilter F + setjmp F + setsourcefilter F + siglongjmp F + swapcontext F + xdr_quad_t F + xdr_u_quad_t F +GLIBC_2.4 + GLIBC_2.4 A + _IO_fprintf F + _IO_printf F + _IO_sprintf F + _IO_sscanf F + _IO_vfprintf F + _IO_vfscanf F + _IO_vsprintf F + __asprintf F + __confstr_chk F + __fgets_chk F + __fgets_unlocked_chk F + __fgetws_chk F + __fgetws_unlocked_chk F + __finitel F + __floatundidf F + __floatundisf F + __floatunsidf F + __floatunsisf F + __fprintf_chk F + __fwprintf_chk F + __fxstatat F + __fxstatat64 F + __getcwd_chk F + __getdomainname_chk F + __getgroups_chk F + __gethostname_chk F + __getlogin_r_chk F + __getwd_chk F + __gtdf2 F + __gtsf2 F + __isinfl F + __isnanl F + __ltdf2 F + __ltsf2 F + __mbsnrtowcs_chk F + __mbsrtowcs_chk F + __mbstowcs_chk F + __nedf2 F + __nesf2 F + __nldbl__IO_fprintf F + __nldbl__IO_printf F + __nldbl__IO_sprintf F + __nldbl__IO_sscanf F + __nldbl__IO_vfprintf F + __nldbl__IO_vfscanf F + __nldbl__IO_vsprintf F + __nldbl___asprintf F + __nldbl___fprintf_chk F + __nldbl___fwprintf_chk F + __nldbl___printf_chk F + __nldbl___printf_fp F + __nldbl___snprintf_chk F + __nldbl___sprintf_chk F + __nldbl___strfmon_l F + __nldbl___swprintf_chk F + __nldbl___syslog_chk F + __nldbl___vfprintf_chk F + __nldbl___vfscanf F + __nldbl___vfwprintf_chk F + __nldbl___vprintf_chk F + __nldbl___vsnprintf F + __nldbl___vsnprintf_chk F + __nldbl___vsprintf_chk F + __nldbl___vsscanf F + __nldbl___vstrfmon F + __nldbl___vstrfmon_l F + __nldbl___vswprintf_chk F + __nldbl___vsyslog_chk F + __nldbl___vwprintf_chk F + __nldbl___wprintf_chk F + __nldbl_asprintf F + __nldbl_dprintf F + __nldbl_fprintf F + __nldbl_fscanf F + __nldbl_fwprintf F + __nldbl_fwscanf F + __nldbl_obstack_printf F + __nldbl_obstack_vprintf F + __nldbl_printf F + __nldbl_printf_size F + __nldbl_scanf F + __nldbl_snprintf F + __nldbl_sprintf F + __nldbl_sscanf F + __nldbl_strfmon F + __nldbl_strfmon_l F + __nldbl_swprintf F + __nldbl_swscanf F + __nldbl_syslog F + __nldbl_vasprintf F + __nldbl_vdprintf F + __nldbl_vfprintf F + __nldbl_vfscanf F + __nldbl_vfwprintf F + __nldbl_vfwscanf F + __nldbl_vprintf F + __nldbl_vscanf F + __nldbl_vsnprintf F + __nldbl_vsprintf F + __nldbl_vsscanf F + __nldbl_vswprintf F + __nldbl_vswscanf F + __nldbl_vsyslog F + __nldbl_vwprintf F + __nldbl_vwscanf F + __nldbl_wprintf F + __nldbl_wscanf F + __pread64_chk F + __pread_chk F + __printf_chk F + __printf_fp F + __ptsname_r_chk F + __read_chk F + __readlink_chk F + __realpath_chk F + __recv_chk F + __recvfrom_chk F + __signbitl F + __snprintf_chk F + __sprintf_chk F + __stack_chk_fail F + __stpncpy_chk F + __strfmon_l F + __strtold_internal F + __strtold_l F + __swprintf_chk F + __syslog_chk F + __ttyname_r_chk F + __unorddf2 F + __unordsf2 F + __vfprintf_chk F + __vfscanf F + __vfwprintf_chk F + __vprintf_chk F + __vsnprintf F + __vsnprintf_chk F + __vsprintf_chk F + __vsscanf F + __vswprintf_chk F + __vsyslog_chk F + __vwprintf_chk F + __wcpcpy_chk F + __wcpncpy_chk F + __wcrtomb_chk F + __wcscat_chk F + __wcscpy_chk F + __wcsncat_chk F + __wcsncpy_chk F + __wcsnrtombs_chk F + __wcsrtombs_chk F + __wcstold_internal F + __wcstold_l F + __wcstombs_chk F + __wctomb_chk F + __wmemcpy_chk F + __wmemmove_chk F + __wmempcpy_chk F + __wmemset_chk F + __wprintf_chk F + __xmknodat F + _sys_errlist D 0x210 + _sys_nerr D 0x4 + asprintf F + copysignl F + dprintf F + eaccess F + faccessat F + fchmodat F + fchownat F + fdopendir F + finitel F + fprintf F + frexpl F + fscanf F + futimesat F + fwprintf F + fwscanf F + inotify_add_watch F + inotify_init F + inotify_rm_watch F + isinfl F + isnanl F + ldexpl F + linkat F + mkdirat F + mkfifoat F + modfl F + obstack_printf F + obstack_vprintf F + open_wmemstream F + openat F + openat64 F + ppoll F + printf F + printf_size F + qecvt F + qecvt_r F + qfcvt F + qfcvt_r F + qgcvt F + readlinkat F + renameat F + scalbnl F + scanf F + snprintf F + sprintf F + sscanf F + strfmon F + strfmon_l F + strtold F + strtold_l F + swprintf F + swscanf F + symlinkat F + sys_errlist D 0x210 + sys_nerr D 0x4 + syslog F + unlinkat F + unshare F + vasprintf F + vdprintf F + vfprintf F + vfscanf F + vfwprintf F + vfwscanf F + vprintf F + vscanf F + vsnprintf F + vsprintf F + vsscanf F + vswprintf F + vswscanf F + vsyslog F + vwprintf F + vwscanf F + wcstold F + wcstold_l F + wprintf F + wscanf F +GLIBC_2.5 + GLIBC_2.5 A + __readlinkat_chk F + inet6_opt_append F + inet6_opt_find F + inet6_opt_finish F + inet6_opt_get_val F + inet6_opt_init F + inet6_opt_next F + inet6_opt_set_val F + inet6_rth_add F + inet6_rth_getaddr F + inet6_rth_init F + inet6_rth_reverse F + inet6_rth_segments F + inet6_rth_space F + splice F + tee F + vmsplice F +GLIBC_2.6 + GLIBC_2.6 A + __sched_cpucount F + epoll_pwait F + futimens F + sched_getcpu F + strerror_l F + sync_file_range F + utimensat F +GLIBC_2.7 + GLIBC_2.7 A + __fread_chk F + __fread_unlocked_chk F + __isoc99_fscanf F + __isoc99_fwscanf F + __isoc99_scanf F + __isoc99_sscanf F + __isoc99_swscanf F + __isoc99_vfscanf F + __isoc99_vfwscanf F + __isoc99_vscanf F + __isoc99_vsscanf F + __isoc99_vswscanf F + __isoc99_vwscanf F + __isoc99_wscanf F + __nldbl___isoc99_fscanf F + __nldbl___isoc99_fwscanf F + __nldbl___isoc99_scanf F + __nldbl___isoc99_sscanf F + __nldbl___isoc99_swscanf F + __nldbl___isoc99_vfscanf F + __nldbl___isoc99_vfwscanf F + __nldbl___isoc99_vscanf F + __nldbl___isoc99_vsscanf F + __nldbl___isoc99_vswscanf F + __nldbl___isoc99_vwscanf F + __nldbl___isoc99_wscanf F + __open64_2 F + __open_2 F + __openat64_2 F + __openat_2 F + __sched_cpualloc F + __sched_cpufree F + eventfd F + eventfd_read F + eventfd_write F + mkostemp F + mkostemp64 F + signalfd F +GLIBC_2.8 + GLIBC_2.8 A + __asprintf_chk F + __dprintf_chk F + __nldbl___asprintf_chk F + __nldbl___dprintf_chk F + __nldbl___obstack_printf_chk F + __nldbl___obstack_vprintf_chk F + __nldbl___vasprintf_chk F + __nldbl___vdprintf_chk F + __obstack_printf_chk F + __obstack_vprintf_chk F + __vasprintf_chk F + __vdprintf_chk F + qsort_r F + timerfd_create F + timerfd_gettime F + timerfd_settime F +GLIBC_2.9 + GLIBC_2.9 A + dup3 F + epoll_create1 F + inotify_init1 F + pipe2 F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libcrypt.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libcrypt.abilist new file mode 100644 index 0000000000..1df145f260 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libcrypt.abilist @@ -0,0 +1,9 @@ +GLIBC_2.0 + GLIBC_2.0 A + crypt F + crypt_r F + encrypt F + encrypt_r F + fcrypt F + setkey F + setkey_r F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libdl.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libdl.abilist new file mode 100644 index 0000000000..62e6b41edb --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libdl.abilist @@ -0,0 +1,18 @@ +GLIBC_2.0 + GLIBC_2.0 A + dladdr F + dlclose F + dlerror F + dlopen F + dlsym F +GLIBC_2.1 + GLIBC_2.1 A + dlopen F + dlvsym F +GLIBC_2.3.3 + GLIBC_2.3.3 A + dladdr1 F + dlinfo F +GLIBC_2.3.4 + GLIBC_2.3.4 A + dlmopen F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libm.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libm.abilist new file mode 100644 index 0000000000..620aff9e94 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libm.abilist @@ -0,0 +1,515 @@ +GLIBC_2.0 + GLIBC_2.0 A + _LIB_VERSION D 0x4 + acos F + acosf F + acosh F + acoshf F + acoshl F + acosl F + asin F + asinf F + asinh F + asinhf F + asinhl F + asinl F + atan F + atan2 F + atan2f F + atan2l F + atanf F + atanh F + atanhf F + atanhl F + atanl F + cbrt F + cbrtf F + cbrtl F + ceil F + ceilf F + ceill F + copysign F + copysignf F + copysignl F + cos F + cosf F + cosh F + coshf F + coshl F + cosl F + drem F + dremf F + dreml F + erf F + erfc F + erfcf F + erfcl F + erff F + erfl F + exp F + expf F + expl F + expm1 F + expm1f F + expm1l F + fabs F + fabsf F + fabsl F + finite F + finitef F + finitel F + floor F + floorf F + floorl F + fmod F + fmodf F + fmodl F + frexp F + frexpf F + frexpl F + gamma F + gammaf F + gammal F + hypot F + hypotf F + hypotl F + ilogb F + ilogbf F + ilogbl F + j0 F + j0f F + j0l F + j1 F + j1f F + j1l F + jn F + jnf F + jnl F + ldexp F + ldexpf F + ldexpl F + lgamma F + lgamma_r F + lgammaf F + lgammaf_r F + lgammal F + lgammal_r F + log F + log10 F + log10f F + log10l F + log1p F + log1pf F + log1pl F + logb F + logbf F + logbl F + logf F + logl F + matherr F + modf F + modff F + modfl F + nextafter F + nextafterf F + nextafterl F + pow F + powf F + powl F + remainder F + remainderf F + remainderl F + rint F + rintf F + rintl F + scalb F + scalbf F + scalbl F + scalbn F + scalbnf F + scalbnl F + signgam D 0x4 + significand F + significandf F + significandl F + sin F + sinf F + sinh F + sinhf F + sinhl F + sinl F + sqrt F + sqrtf F + sqrtl F + tan F + tanf F + tanh F + tanhf F + tanhl F + tanl F + y0 F + y0f F + y0l F + y1 F + y1f F + y1l F + yn F + ynf F + ynl F +GLIBC_2.1 + GLIBC_2.1 A + __clog10 F + __clog10f F + __clog10l F + __fe_dfl_env D 0x8 + __fe_enabled_env D 0x8 + __fe_nomask_env F + __fe_nonieee_env D 0x8 + __finite F + __finitef F + __finitel F + __fpclassify F + __fpclassifyf F + __signbit F + __signbitf F + cabs F + cabsf F + cabsl F + cacos F + cacosf F + cacosh F + cacoshf F + cacoshl F + cacosl F + carg F + cargf F + cargl F + casin F + casinf F + casinh F + casinhf F + casinhl F + casinl F + catan F + catanf F + catanh F + catanhf F + catanhl F + catanl F + ccos F + ccosf F + ccosh F + ccoshf F + ccoshl F + ccosl F + cexp F + cexpf F + cexpl F + cimag F + cimagf F + cimagl F + clog F + clog10 F + clog10f F + clog10l F + clogf F + clogl F + conj F + conjf F + conjl F + cpow F + cpowf F + cpowl F + cproj F + cprojf F + cprojl F + creal F + crealf F + creall F + csin F + csinf F + csinh F + csinhf F + csinhl F + csinl F + csqrt F + csqrtf F + csqrtl F + ctan F + ctanf F + ctanh F + ctanhf F + ctanhl F + ctanl F + exp10 F + exp10f F + exp10l F + exp2 F + exp2f F + fdim F + fdimf F + fdiml F + feclearexcept F + fegetenv F + fegetexceptflag F + fegetround F + feholdexcept F + feraiseexcept F + fesetenv F + fesetexceptflag F + fesetround F + fetestexcept F + feupdateenv F + fma F + fmaf F + fmal F + fmax F + fmaxf F + fmaxl F + fmin F + fminf F + fminl F + llrint F + llrintf F + llrintl F + llround F + llroundf F + llroundl F + log2 F + log2f F + log2l F + lrint F + lrintf F + lrintl F + lround F + lroundf F + lroundl F + nan F + nanf F + nanl F + nearbyint F + nearbyintf F + nearbyintl F + nexttoward F + nexttowardf F + nexttowardl F + pow10 F + pow10f F + pow10l F + remquo F + remquof F + remquol F + round F + roundf F + roundl F + scalbln F + scalblnf F + scalblnl F + sincos F + sincosf F + sincosl F + tgamma F + tgammaf F + tgammal F + trunc F + truncf F + truncl F +GLIBC_2.15 + GLIBC_2.15 A + __acos_finite F + __acosf_finite F + __acosh_finite F + __acoshf_finite F + __acoshl_finite F + __acosl_finite F + __asin_finite F + __asinf_finite F + __asinl_finite F + __atan2_finite F + __atan2f_finite F + __atan2l_finite F + __atanh_finite F + __atanhf_finite F + __atanhl_finite F + __cosh_finite F + __coshf_finite F + __coshl_finite F + __exp10_finite F + __exp10f_finite F + __exp10l_finite F + __exp2_finite F + __exp2f_finite F + __exp2l_finite F + __exp_finite F + __expf_finite F + __expl_finite F + __fmod_finite F + __fmodf_finite F + __fmodl_finite F + __gamma_r_finite F + __gammaf_r_finite F + __gammal_r_finite F + __hypot_finite F + __hypotf_finite F + __hypotl_finite F + __j0_finite F + __j0f_finite F + __j0l_finite F + __j1_finite F + __j1f_finite F + __j1l_finite F + __jn_finite F + __jnf_finite F + __jnl_finite F + __lgamma_r_finite F + __lgammaf_r_finite F + __lgammal_r_finite F + __log10_finite F + __log10f_finite F + __log10l_finite F + __log2_finite F + __log2f_finite F + __log2l_finite F + __log_finite F + __logf_finite F + __logl_finite F + __pow_finite F + __powf_finite F + __powl_finite F + __remainder_finite F + __remainderf_finite F + __remainderl_finite F + __scalb_finite F + __scalbf_finite F + __scalbl_finite F + __sinh_finite F + __sinhf_finite F + __sinhl_finite F + __sqrt_finite F + __sqrtf_finite F + __sqrtl_finite F + __y0_finite F + __y0f_finite F + __y0l_finite F + __y1_finite F + __y1f_finite F + __y1l_finite F + __yn_finite F + __ynf_finite F + __ynl_finite F +GLIBC_2.2 + GLIBC_2.2 A + feclearexcept F + fedisableexcept F + feenableexcept F + fegetenv F + fegetexcept F + fegetexceptflag F + feraiseexcept F + fesetenv F + fesetexceptflag F + feupdateenv F +GLIBC_2.4 + GLIBC_2.4 A + __clog10l F + __finitel F + __fpclassifyl F + __nldbl_nexttowardf F + __signbitl F + acoshl F + acosl F + asinhl F + asinl F + atan2l F + atanhl F + atanl F + cabsl F + cacoshl F + cacosl F + cargl F + casinhl F + casinl F + catanhl F + catanl F + cbrtl F + ccoshl F + ccosl F + ceill F + cexpl F + cimagl F + clog10l F + clogl F + conjl F + copysignl F + coshl F + cosl F + cpowl F + cprojl F + creall F + csinhl F + csinl F + csqrtl F + ctanhl F + ctanl F + dreml F + erfcl F + erfl F + exp10l F + exp2l F + expl F + expm1l F + fabsl F + fdiml F + finitel F + floorl F + fmal F + fmaxl F + fminl F + fmodl F + frexpl F + gammal F + hypotl F + ilogbl F + j0l F + j1l F + jnl F + ldexpl F + lgammal F + lgammal_r F + llrintl F + llroundl F + log10l F + log1pl F + log2l F + logbl F + logl F + lrintl F + lroundl F + modfl F + nanl F + nearbyintl F + nextafterl F + nexttoward F + nexttowardf F + nexttowardl F + pow10l F + powl F + remainderl F + remquol F + rintl F + roundl F + scalbl F + scalblnl F + scalbnl F + significandl F + sincosl F + sinhl F + sinl F + sqrtl F + tanhl F + tanl F + tgammal F + truncl F + y0l F + y1l F + ynl F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libnsl.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libnsl.abilist new file mode 100644 index 0000000000..4241e2d887 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libnsl.abilist @@ -0,0 +1,127 @@ +GLIBC_2.0 + GLIBC_2.0 A + __yp_check F + xdr_domainname F + xdr_keydat F + xdr_mapname F + xdr_peername F + xdr_valdat F + xdr_yp_buf F + xdr_ypbind_binding F + xdr_ypbind_resp F + xdr_ypbind_resptype F + xdr_ypbind_setdom F + xdr_ypdelete_args F + xdr_ypmap_parms F + xdr_ypmaplist F + xdr_yppush_status F + xdr_yppushresp_xfr F + xdr_ypreq_key F + xdr_ypreq_nokey F + xdr_ypreq_xfr F + xdr_ypresp_all F + xdr_ypresp_key_val F + xdr_ypresp_maplist F + xdr_ypresp_master F + xdr_ypresp_order F + xdr_ypresp_val F + xdr_ypresp_xfr F + xdr_ypstat F + xdr_ypupdate_args F + xdr_ypxfrstat F + yp_all F + yp_bind F + yp_first F + yp_get_default_domain F + yp_maplist F + yp_master F + yp_match F + yp_next F + yp_order F + yp_unbind F + yp_update F + ypbinderr_string F + yperr_string F + ypprot_err F +GLIBC_2.1 + GLIBC_2.1 A + __free_fdresult F + __nis_default_access F + __nis_default_group F + __nis_default_owner F + __nis_default_ttl F + __nis_finddirectory F + __nis_hash F + __nisbind_connect F + __nisbind_create F + __nisbind_destroy F + __nisbind_next F + nis_add F + nis_add_entry F + nis_addmember F + nis_checkpoint F + nis_clone_directory F + nis_clone_object F + nis_clone_result F + nis_creategroup F + nis_destroy_object F + nis_destroygroup F + nis_dir_cmp F + nis_domain_of F + nis_domain_of_r F + nis_first_entry F + nis_free_directory F + nis_free_object F + nis_free_request F + nis_freenames F + nis_freeresult F + nis_freeservlist F + nis_freetags F + nis_getnames F + nis_getservlist F + nis_ismember F + nis_leaf_of F + nis_leaf_of_r F + nis_lerror F + nis_list F + nis_local_directory F + nis_local_group F + nis_local_host F + nis_local_principal F + nis_lookup F + nis_mkdir F + nis_modify F + nis_modify_entry F + nis_name_of F + nis_name_of_r F + nis_next_entry F + nis_perror F + nis_ping F + nis_print_directory F + nis_print_entry F + nis_print_group F + nis_print_group_entry F + nis_print_link F + nis_print_object F + nis_print_result F + nis_print_rights F + nis_print_table F + nis_read_obj F + nis_remove F + nis_remove_entry F + nis_removemember F + nis_rmdir F + nis_servstate F + nis_sperrno F + nis_sperror F + nis_sperror_r F + nis_stats F + nis_verifygroup F + nis_write_obj F + readColdStartFile F + writeColdStartFile F + xdr_cback_data F + xdr_obj_p F +GLIBC_2.2 + GLIBC_2.2 A + xdr_ypall F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libpthread.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libpthread.abilist new file mode 100644 index 0000000000..77190991dd --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libpthread.abilist @@ -0,0 +1,273 @@ +GLIBC_2.0 + GLIBC_2.0 A + _IO_flockfile F + _IO_ftrylockfile F + _IO_funlockfile F + __close F + __connect F + __errno_location F + __fcntl F + __fork F + __h_errno_location F + __lseek F + __open F + __pthread_getspecific F + __pthread_key_create F + __pthread_mutex_destroy F + __pthread_mutex_init F + __pthread_mutex_lock F + __pthread_mutex_trylock F + __pthread_mutex_unlock F + __pthread_mutexattr_destroy F + __pthread_mutexattr_init F + __pthread_mutexattr_settype F + __pthread_once F + __pthread_setspecific F + __read F + __send F + __sigaction F + __wait F + __write F + _pthread_cleanup_pop F + _pthread_cleanup_pop_restore F + _pthread_cleanup_push F + _pthread_cleanup_push_defer F + accept F + close F + connect F + fcntl F + flockfile F + fork F + fsync F + ftrylockfile F + funlockfile F + longjmp F + lseek F + msync F + nanosleep F + open F + pause F + pthread_atfork F + pthread_attr_destroy F + pthread_attr_getdetachstate F + pthread_attr_getinheritsched F + pthread_attr_getschedparam F + pthread_attr_getschedpolicy F + pthread_attr_getscope F + pthread_attr_init F + pthread_attr_setdetachstate F + pthread_attr_setinheritsched F + pthread_attr_setschedparam F + pthread_attr_setschedpolicy F + pthread_attr_setscope F + pthread_cancel F + pthread_cond_broadcast F + pthread_cond_destroy F + pthread_cond_init F + pthread_cond_signal F + pthread_cond_timedwait F + pthread_cond_wait F + pthread_condattr_destroy F + pthread_condattr_init F + pthread_create F + pthread_detach F + pthread_equal F + pthread_exit F + pthread_getschedparam F + pthread_getspecific F + pthread_join F + pthread_key_create F + pthread_key_delete F + pthread_kill F + pthread_kill_other_threads_np F + pthread_mutex_destroy F + pthread_mutex_init F + pthread_mutex_lock F + pthread_mutex_trylock F + pthread_mutex_unlock F + pthread_mutexattr_destroy F + pthread_mutexattr_getkind_np F + pthread_mutexattr_init F + pthread_mutexattr_setkind_np F + pthread_once F + pthread_self F + pthread_setcancelstate F + pthread_setcanceltype F + pthread_setschedparam F + pthread_setspecific F + pthread_sigmask F + pthread_testcancel F + raise F + read F + recv F + recvfrom F + recvmsg F + sem_destroy F + sem_getvalue F + sem_init F + sem_post F + sem_trywait F + sem_wait F + send F + sendmsg F + sendto F + sigaction F + siglongjmp F + sigwait F + system F + tcdrain F + vfork F + wait F + waitpid F + write F +GLIBC_2.1 + GLIBC_2.1 A + __libc_allocate_rtsig F + __libc_current_sigrtmax F + __libc_current_sigrtmin F + pthread_attr_getguardsize F + pthread_attr_getstackaddr F + pthread_attr_getstacksize F + pthread_attr_init F + pthread_attr_setguardsize F + pthread_attr_setstackaddr F + pthread_attr_setstacksize F + pthread_create F + pthread_getconcurrency F + pthread_mutexattr_gettype F + pthread_mutexattr_settype F + pthread_rwlock_destroy F + pthread_rwlock_init F + pthread_rwlock_rdlock F + pthread_rwlock_tryrdlock F + pthread_rwlock_trywrlock F + pthread_rwlock_unlock F + pthread_rwlock_wrlock F + pthread_rwlockattr_destroy F + pthread_rwlockattr_getkind_np F + pthread_rwlockattr_getpshared F + pthread_rwlockattr_init F + pthread_rwlockattr_setkind_np F + pthread_rwlockattr_setpshared F + pthread_setconcurrency F + sem_destroy F + sem_getvalue F + sem_init F + sem_post F + sem_trywait F + sem_wait F +GLIBC_2.1.1 + GLIBC_2.1.1 A + sem_close F + sem_open F + sem_unlink F +GLIBC_2.1.2 + GLIBC_2.1.2 A + __vfork F +GLIBC_2.11 + GLIBC_2.11 A + pthread_sigqueue F +GLIBC_2.12 + GLIBC_2.12 A + pthread_getname_np F + pthread_mutex_consistent F + pthread_mutexattr_getrobust F + pthread_mutexattr_setrobust F + pthread_setname_np F +GLIBC_2.2 + GLIBC_2.2 A + __open64 F + __pread64 F + __pthread_rwlock_destroy F + __pthread_rwlock_init F + __pthread_rwlock_rdlock F + __pthread_rwlock_tryrdlock F + __pthread_rwlock_trywrlock F + __pthread_rwlock_unlock F + __pthread_rwlock_wrlock F + __pwrite64 F + __res_state F + lseek64 F + open64 F + pread F + pread64 F + pthread_attr_getstack F + pthread_attr_setstack F + pthread_barrier_destroy F + pthread_barrier_init F + pthread_barrier_wait F + pthread_barrierattr_destroy F + pthread_barrierattr_init F + pthread_barrierattr_setpshared F + pthread_condattr_getpshared F + pthread_condattr_setpshared F + pthread_getcpuclockid F + pthread_mutex_timedlock F + pthread_mutexattr_getpshared F + pthread_mutexattr_setpshared F + pthread_rwlock_timedrdlock F + pthread_rwlock_timedwrlock F + pthread_spin_destroy F + pthread_spin_init F + pthread_spin_lock F + pthread_spin_trylock F + pthread_spin_unlock F + pthread_yield F + pwrite F + pwrite64 F + sem_timedwait F +GLIBC_2.2.3 + GLIBC_2.2.3 A + pthread_getattr_np F +GLIBC_2.2.6 + GLIBC_2.2.6 A + __nanosleep F +GLIBC_2.3.2 + GLIBC_2.3.2 A + pthread_cond_broadcast F + pthread_cond_destroy F + pthread_cond_init F + pthread_cond_signal F + pthread_cond_timedwait F + pthread_cond_wait F +GLIBC_2.3.3 + GLIBC_2.3.3 A + __pthread_cleanup_routine F + __pthread_register_cancel F + __pthread_register_cancel_defer F + __pthread_unregister_cancel F + __pthread_unregister_cancel_restore F + __pthread_unwind_next F + pthread_attr_getaffinity_np F + pthread_attr_setaffinity_np F + pthread_barrierattr_getpshared F + pthread_condattr_getclock F + pthread_condattr_setclock F + pthread_getaffinity_np F + pthread_setaffinity_np F + pthread_timedjoin_np F + pthread_tryjoin_np F +GLIBC_2.3.4 + GLIBC_2.3.4 A + longjmp F + pthread_attr_getaffinity_np F + pthread_attr_setaffinity_np F + pthread_getaffinity_np F + pthread_setaffinity_np F + pthread_setschedprio F + siglongjmp F +GLIBC_2.4 + GLIBC_2.4 A + pthread_mutex_consistent_np F + pthread_mutex_getprioceiling F + pthread_mutex_setprioceiling F + pthread_mutexattr_getprioceiling F + pthread_mutexattr_getprotocol F + pthread_mutexattr_getrobust_np F + pthread_mutexattr_setprioceiling F + pthread_mutexattr_setprotocol F + pthread_mutexattr_setrobust_np F +GLIBC_2.6 + GLIBC_2.6 A + pthread_attr_setstack F + pthread_attr_setstacksize F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libresolv.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libresolv.abilist new file mode 100644 index 0000000000..f68333d4a4 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libresolv.abilist @@ -0,0 +1,104 @@ +GLIBC_2.0 + GLIBC_2.0 A + __b64_ntop F + __b64_pton F + __dn_comp F + __dn_count_labels F + __dn_skipname F + __fp_nquery F + __fp_query F + __fp_resstat F + __hostalias F + __loc_aton F + __loc_ntoa F + __p_cdname F + __p_cdnname F + __p_class F + __p_class_syms D 0x54 + __p_fqname F + __p_fqnname F + __p_option F + __p_query F + __p_secstodate F + __p_time F + __p_type F + __p_type_syms D 0x228 + __putlong F + __putshort F + __res_close F + __res_dnok F + __res_hnok F + __res_isourserver F + __res_mailok F + __res_nameinquery F + __res_ownok F + __res_queriesmatch F + __res_send F + __sym_ntop F + __sym_ntos F + __sym_ston F + _gethtbyaddr F + _gethtbyname F + _gethtbyname2 F + _gethtent F + _getlong F + _getshort F + _res_opcodes D 0x40 + _sethtent F + dn_expand F + inet_net_ntop F + inet_net_pton F + inet_neta F + res_gethostbyaddr F + res_gethostbyname F + res_gethostbyname2 F + res_mkquery F + res_query F + res_querydomain F + res_search F + res_send_setqhook F + res_send_setrhook F +GLIBC_2.2 + GLIBC_2.2 A + __dn_expand F + __res_hostalias F + __res_mkquery F + __res_nmkquery F + __res_nquery F + __res_nquerydomain F + __res_nsearch F + __res_nsend F + __res_query F + __res_querydomain F + __res_search F +GLIBC_2.3.2 + GLIBC_2.3.2 A + __p_rcode F +GLIBC_2.9 + GLIBC_2.9 A + ns_datetosecs F + ns_format_ttl F + ns_get16 F + ns_get32 F + ns_initparse F + ns_makecanon F + ns_msg_getflag F + ns_name_compress F + ns_name_ntol F + ns_name_ntop F + ns_name_pack F + ns_name_pton F + ns_name_rollback F + ns_name_skip F + ns_name_uncompress F + ns_name_unpack F + ns_parse_ttl F + ns_parserr F + ns_put16 F + ns_put32 F + ns_samedomain F + ns_samename F + ns_skiprr F + ns_sprintrr F + ns_sprintrrf F + ns_subdomain F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/librt.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/librt.abilist new file mode 100644 index 0000000000..af7df27cb3 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/librt.abilist @@ -0,0 +1,52 @@ +GLIBC_2.1 + GLIBC_2.1 A + aio_cancel F + aio_cancel64 F + aio_error F + aio_error64 F + aio_fsync F + aio_fsync64 F + aio_init F + aio_read F + aio_read64 F + aio_return F + aio_return64 F + aio_suspend F + aio_suspend64 F + aio_write F + aio_write64 F + lio_listio F + lio_listio64 F +GLIBC_2.2 + GLIBC_2.2 A + clock_getcpuclockid F + clock_getres F + clock_gettime F + clock_nanosleep F + clock_settime F + shm_open F + shm_unlink F + timer_create F + timer_delete F + timer_getoverrun F + timer_gettime F + timer_settime F +GLIBC_2.3.4 + GLIBC_2.3.4 A + mq_close F + mq_getattr F + mq_notify F + mq_open F + mq_receive F + mq_send F + mq_setattr F + mq_timedreceive F + mq_timedsend F + mq_unlink F +GLIBC_2.4 + GLIBC_2.4 A + lio_listio F + lio_listio64 F +GLIBC_2.7 + GLIBC_2.7 A + __mq_open_2 F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libthread_db.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libthread_db.abilist new file mode 100644 index 0000000000..f33138067c --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libthread_db.abilist @@ -0,0 +1,48 @@ +GLIBC_2.1.3 + GLIBC_2.1.3 A + td_init F + td_log F + td_ta_clear_event F + td_ta_delete F + td_ta_enable_stats F + td_ta_event_addr F + td_ta_event_getmsg F + td_ta_get_nthreads F + td_ta_get_ph F + td_ta_get_stats F + td_ta_map_id2thr F + td_ta_map_lwp2thr F + td_ta_new F + td_ta_reset_stats F + td_ta_set_event F + td_ta_setconcurrency F + td_ta_thr_iter F + td_ta_tsd_iter F + td_thr_clear_event F + td_thr_dbresume F + td_thr_dbsuspend F + td_thr_event_enable F + td_thr_event_getmsg F + td_thr_get_info F + td_thr_getfpregs F + td_thr_getgregs F + td_thr_getxregs F + td_thr_getxregsize F + td_thr_set_event F + td_thr_setfpregs F + td_thr_setgregs F + td_thr_setprio F + td_thr_setsigpending F + td_thr_setxregs F + td_thr_sigsetmask F + td_thr_tsd F + td_thr_validate F +GLIBC_2.2.3 + GLIBC_2.2.3 A + td_symbol_list F +GLIBC_2.3 + GLIBC_2.3 A + td_thr_tls_get_addr F +GLIBC_2.3.3 + GLIBC_2.3.3 A + td_thr_tlsbase F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libutil.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libutil.abilist new file mode 100644 index 0000000000..7422687e3c --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libutil.abilist @@ -0,0 +1,8 @@ +GLIBC_2.0 + GLIBC_2.0 A + forkpty F + login F + login_tty F + logout F + logwtmp F + openpty F From 15caa1c0c93c71cc3c7fa6c6678007bf072e9cf8 Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Wed, 16 May 2012 09:37:21 -0400 Subject: [PATCH 4374/4487] tile: provide __FE_UNDEFINED in --- ChangeLog.tile | 4 ++++ sysdeps/tile/bits/fenv.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/ChangeLog.tile b/ChangeLog.tile index 183118a690..dbc6611b26 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,3 +1,7 @@ +2012-05-15 Chris Metcalf + + * sysdeps/tile/bits/fenv.h (__FE_UNDEFINED): New symbol. + 2012-05-15 Chris Metcalf * sysdeps/tile/ldsodefs.h (ARCH_PLTEXIT_MEMBERS): Add proper diff --git a/sysdeps/tile/bits/fenv.h b/sysdeps/tile/bits/fenv.h index a6e0233f1a..7638e8cc50 100644 --- a/sysdeps/tile/bits/fenv.h +++ b/sysdeps/tile/bits/fenv.h @@ -28,6 +28,8 @@ floating-point support also acts this way. */ enum { + __FE_UNDEFINED = 0, + FE_TONEAREST = 1, #define FE_TONEAREST FE_TONEAREST }; From d22d562a4843180476f0978947ab24066633dda4 Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Wed, 16 May 2012 09:38:13 -0400 Subject: [PATCH 4375/4487] tile: add libm-test-ulps --- ChangeLog.tile | 4 + sysdeps/tile/libm-test-ulps | 1336 +++++++++++++++++++++++++++++++++++ 2 files changed, 1340 insertions(+) create mode 100644 sysdeps/tile/libm-test-ulps diff --git a/ChangeLog.tile b/ChangeLog.tile index dbc6611b26..3dcd1a5992 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,3 +1,7 @@ +2012-05-15 Chris Metcalf + + * sysdeps/tile/libm-test-ulps: New file. + 2012-05-15 Chris Metcalf * sysdeps/tile/bits/fenv.h (__FE_UNDEFINED): New symbol. diff --git a/sysdeps/tile/libm-test-ulps b/sysdeps/tile/libm-test-ulps new file mode 100644 index 0000000000..1912f440e3 --- /dev/null +++ b/sysdeps/tile/libm-test-ulps @@ -0,0 +1,1336 @@ +# Begin of automatic generation + +# atan2 +Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025": +float: 1 +ifloat: 1 +Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025": +float: 1 +ifloat: 1 +Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772": +float: 1 +ifloat: 1 + +# atanh +Test "atanh (0.75) == 0.972955074527656652552676371721589865": +float: 1 +ifloat: 1 + +# cacos +Test "Imaginary part of: cacos (+0 + 0.5 i) == pi/2 - 0.4812118250596034474977589134243684231352 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Imaginary part of: cacos (+0 + 1.0 i) == pi/2 - 0.8813735870195430252326093249797923090282 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Imaginary part of: cacos (+0 + 1.5 i) == pi/2 - 1.194763217287109304111930828519090523536 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Imaginary part of: cacos (+0 - 0.5 i) == pi/2 + 0.4812118250596034474977589134243684231352 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (+0 - 1.0 i) == pi/2 + 0.8813735870195430252326093249797923090282 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: cacos (+0 - 1.5 i) == pi/2 + 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cacos (-0 + 0.5 i) == pi/2 - 0.4812118250596034474977589134243684231352 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Imaginary part of: cacos (-0 + 1.0 i) == pi/2 - 0.8813735870195430252326093249797923090282 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Imaginary part of: cacos (-0 + 1.5 i) == pi/2 - 1.194763217287109304111930828519090523536 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Imaginary part of: cacos (-0 - 0.5 i) == pi/2 + 0.4812118250596034474977589134243684231352 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-0 - 1.0 i) == pi/2 + 0.8813735870195430252326093249797923090282 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-0 - 1.5 i) == pi/2 + 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cacos (-1.5 + +0 i) == pi - 0.9624236501192068949955178268487368462704 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: cacos (0.5 + +0 i) == 1.047197551196597746154214461093167628066 - 0 i": +double: 1 +idouble: 1 +Test "Real part of: cacos (0.5 - 0 i) == 1.047197551196597746154214461093167628066 + +0 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cacos (1.5 + +0 i) == +0 - 0.9624236501192068949955178268487368462704 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# cacosh +Test "Real part of: cacosh (+0 + 0.5 i) == 0.4812118250596034474977589134243684231352 + pi/2 i": +float: 1 +ifloat: 1 +Test "Real part of: cacosh (+0 + 1.0 i) == 0.8813735870195430252326093249797923090282 + pi/2 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: cacosh (+0 + 1.5 i) == 1.194763217287109304111930828519090523536 + pi/2 i": +double: 1 +idouble: 1 +Test "Real part of: cacosh (+0 - 0.5 i) == 0.4812118250596034474977589134243684231352 - pi/2 i": +float: 1 +ifloat: 1 +Test "Real part of: cacosh (+0 - 1.0 i) == 0.8813735870195430252326093249797923090282 - pi/2 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: cacosh (+0 - 1.5 i) == 1.194763217287109304111930828519090523536 - pi/2 i": +double: 1 +idouble: 1 +Test "Real part of: cacosh (-0 + 0.5 i) == 0.4812118250596034474977589134243684231352 + pi/2 i": +float: 1 +ifloat: 1 +Test "Real part of: cacosh (-0 + 1.0 i) == 0.8813735870195430252326093249797923090282 + pi/2 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: cacosh (-0 + 1.5 i) == 1.194763217287109304111930828519090523536 + pi/2 i": +double: 1 +idouble: 1 +Test "Real part of: cacosh (-0 - 0.5 i) == 0.4812118250596034474977589134243684231352 - pi/2 i": +float: 1 +ifloat: 1 +Test "Real part of: cacosh (-0 - 1.0 i) == 0.8813735870195430252326093249797923090282 - pi/2 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: cacosh (-0 - 1.5 i) == 1.194763217287109304111930828519090523536 - pi/2 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cacosh (-0.5 + +0 i) == +0 + 2.094395102393195492308428922186335256131 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cacosh (-0.5 - 0 i) == +0 - 2.094395102393195492308428922186335256131 i": +double: 1 +idouble: 1 +Test "Real part of: cacosh (-1.5 + +0 i) == 0.9624236501192068949955178268487368462704 + pi i": +float: 1 +ifloat: 1 +Test "Real part of: cacosh (-1.5 - 0 i) == 0.9624236501192068949955178268487368462704 - pi i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": +float: 1 +ifloat: 1 +Test "Real part of: cacosh (1.5 + +0 i) == 0.9624236501192068949955178268487368462704 + +0 i": +float: 1 +ifloat: 1 +Test "Real part of: cacosh (1.5 - 0 i) == 0.9624236501192068949955178268487368462704 - 0 i": +float: 1 +ifloat: 1 + +# casin +Test "Imaginary part of: casin (+0 + 0.5 i) == +0 + 0.4812118250596034474977589134243684231352 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Imaginary part of: casin (+0 + 1.0 i) == +0 + 0.8813735870195430252326093249797923090282 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Imaginary part of: casin (+0 + 1.5 i) == +0 + 1.194763217287109304111930828519090523536 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Imaginary part of: casin (+0 - 0.5 i) == +0 - 0.4812118250596034474977589134243684231352 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: casin (+0 - 1.0 i) == +0 - 0.8813735870195430252326093249797923090282 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: casin (+0 - 1.5 i) == +0 - 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +Test "Imaginary part of: casin (-0 + 0.5 i) == -0 + 0.4812118250596034474977589134243684231352 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Imaginary part of: casin (-0 + 1.0 i) == -0 + 0.8813735870195430252326093249797923090282 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Imaginary part of: casin (-0 + 1.5 i) == -0 + 1.194763217287109304111930828519090523536 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Imaginary part of: casin (-0 - 0.5 i) == -0 - 0.4812118250596034474977589134243684231352 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: casin (-0 - 1.0 i) == -0 - 0.8813735870195430252326093249797923090282 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: casin (-0 - 1.5 i) == -0 - 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +Test "Imaginary part of: casin (-1.5 + +0 i) == -pi/2 + 0.9624236501192068949955178268487368462704 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: casin (1.5 + +0 i) == pi/2 + 0.9624236501192068949955178268487368462704 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# casinh +Test "Real part of: casinh (-0 + 1.5 i) == -0.9624236501192068949955178268487368462704 + pi/2 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casinh (-0 - 1.5 i) == -0.9624236501192068949955178268487368462704 - pi/2 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casinh (-0.5 + +0 i) == -0.4812118250596034474977589134243684231352 + +0 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Real part of: casinh (-0.5 - 0 i) == -0.4812118250596034474977589134243684231352 - 0 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Real part of: casinh (-1.0 + +0 i) == -0.8813735870195430252326093249797923090282 + +0 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Real part of: casinh (-1.0 - 0 i) == -0.8813735870195430252326093249797923090282 - 0 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Real part of: casinh (-1.5 + +0 i) == -1.194763217287109304111930828519090523536 + +0 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Real part of: casinh (-1.5 - 0 i) == -1.194763217287109304111930828519090523536 - 0 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": +double: 5 +float: 1 +idouble: 5 +ifloat: 1 +Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": +double: 3 +float: 6 +idouble: 3 +ifloat: 6 +Test "Real part of: casinh (0.5 + +0 i) == 0.4812118250596034474977589134243684231352 + +0 i": +float: 1 +ifloat: 1 +Test "Real part of: casinh (0.5 - 0 i) == 0.4812118250596034474977589134243684231352 - 0 i": +float: 1 +ifloat: 1 +Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casinh (1.0 + +0 i) == 0.8813735870195430252326093249797923090282 + +0 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casinh (1.0 - 0 i) == 0.8813735870195430252326093249797923090282 - 0 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casinh (1.5 + +0 i) == 1.194763217287109304111930828519090523536 + +0 i": +double: 1 +idouble: 1 +Test "Real part of: casinh (1.5 - 0 i) == 1.194763217287109304111930828519090523536 - 0 i": +double: 1 +idouble: 1 + +# catan +Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# catanh +Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": +double: 4 +idouble: 4 +Test "Real part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i": +double: 1 +idouble: 1 + +# cbrt +Test "cbrt (-27.0) == -3.0": +double: 1 +idouble: 1 +Test "cbrt (0.75) == 0.908560296416069829445605878163630251": +double: 1 +idouble: 1 +Test "cbrt (0.9921875) == 0.997389022060725270579075195353955217": +double: 1 +idouble: 1 + +# ccos +Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i": +float: 1 +ifloat: 1 +Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": +float: 1 +ifloat: 1 + +# ccosh +Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": +float: 1 +ifloat: 1 +Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": +float: 1 +ifloat: 1 + +# cexp +Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cexp (-95 + 0.75 i) == 4.039714446238306526889476684000081624047e-42 + 3.763383677300535390271646960780570275931e-42 i": +double: 1 +idouble: 1 +Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cexp (1440 + 0x1p-1074 i) == inf + 1.196295853897226111293303155636183216483e302 i plus overflow exception": +double: 1 +idouble: 1 +Test "Real part of: cexp (50 + 0x1p127 i) == 4.053997150228616856622417636046265337193e21 + 3.232070315463388524466674772633810238819e21 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Imaginary part of: cexp (50 + 0x1p127 i) == 4.053997150228616856622417636046265337193e21 + 3.232070315463388524466674772633810238819e21 i": +double: 1 +idouble: 1 +Test "Real part of: cexp (500 + 0x1p1023 i) == -1.159886268932754433233243794561351783426e217 + 7.904017694554466595359379965081774849708e216 i": +double: 1 +idouble: 1 +Test "Real part of: cexp (709.8125 + 0.75 i) == 1.355121963080879535248452862759108365762e308 + 1.262426823598609432507811340856186873507e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cexp (709.8125 + 0.75 i) == 1.355121963080879535248452862759108365762e308 + 1.262426823598609432507811340856186873507e308 i": +double: 1 +idouble: 1 +Test "Real part of: cexp (88.75 + 0.75 i) == 2.558360358486542817001900410314204322891e38 + 2.383359453227311447654736314679677655100e38 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cexp (88.75 + 0.75 i) == 2.558360358486542817001900410314204322891e38 + 2.383359453227311447654736314679677655100e38 i": +float: 2 +ifloat: 2 + +# clog +Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i": +float: 1 +ifloat: 1 +Test "Real part of: clog (0x1p-1074 + 0x1p-1074 i) == -744.0934983311012896593986823853525458290 + pi/4 i": +double: 1 +idouble: 1 +Test "Real part of: clog (0x1p-147 + 0x1p-147 i) == -101.5460619520319878296245057936228672231 + pi/4 i": +float: 1 +ifloat: 1 + +# clog10 +Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i": +double: 1 +idouble: 1 +Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0x1.fffffep+127 + 0x1.fffffep+127 i) == 38.68235441693561449174780668781319348761 + pi/4*log10(e) i": +float: 1 +ifloat: 1 +Test "Real part of: clog10 (0x1.fffffep+127 + 1.0 i) == 38.53183941910362389414093724045094697423 + 1.276276851248440096917018665609900318458e-39 i": +float: 1 +ifloat: 1 +Test "Real part of: clog10 (0x1p-1074 + 0x1p-1074 i) == -323.1557003452838130619487034867432642357 + pi/4*log10(e) i": +double: 1 +idouble: 1 +Test "Imaginary part of: clog10 (0x1p-147 + 0x1p-147 i) == -44.10089436477324509881274807713822842154 + pi/4*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0x1p-149 + 0x1p-149 i) == -44.70295435610120748924022586658721447508 + pi/4*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i": +float: 1 +ifloat: 1 + +# cos +Test "cos (M_PI_6l * 2.0) == 0.5": +double: 1 +idouble: 1 +Test "cos (M_PI_6l * 4.0) == -0.5": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + +# cos_tonearest +Test "cos_tonearest (7) == 0.7539022543433046381411975217191820122183": +float: 1 +ifloat: 1 + +# cpow +Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": +float: 1 +ifloat: 1 +Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i": +double: 1 +float: 4 +idouble: 1 +ifloat: 4 +Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i": +double: 2 +float: 3 +idouble: 2 +ifloat: 3 +Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": +double: 1 +float: 4 +idouble: 1 +ifloat: 4 +Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": +float: 2 +ifloat: 2 +Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + +# csinh +Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i": +double: 1 +idouble: 1 +Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": +float: 1 +ifloat: 1 + +# csqrt +Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": +float: 1 +ifloat: 1 +Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: csqrt (0x1.fffffep+127 + 1.0 i) == 1.844674352395372953599975585936590505260e+19 + 2.710505511993121390769065968615872097053e-20 i": +float: 1 +ifloat: 1 +Test "Real part of: csqrt (0x1.fffffffffffffp+1023 + 0x1.fffffffffffffp+1023 i) == 1.473094556905565378990473658199034571917e+154 + 6.101757441282702188537080005372547713595e+153 i": +double: 1 +idouble: 1 +Test "Imaginary part of: csqrt (0x1.fffffffffffffp+1023 + 0x1.fffffffffffffp+1023 i) == 1.473094556905565378990473658199034571917e+154 + 6.101757441282702188537080005372547713595e+153 i": +double: 1 +idouble: 1 +Test "Imaginary part of: csqrt (0x1.fffffffffffffp+1023 + 0x1p+1023 i) == 1.379778091031440685006200821918878702861e+154 + 3.257214233483129514781233066898042490248e+153 i": +double: 1 +idouble: 1 + +# ctan +Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i": +double: 1 +idouble: 1 +Test "Real part of: ctan (0x1p1023 + 1 i) == -0.2254627924997545057926782581695274244229 + 0.8786063118883068695462540226219865087189 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ctan (0x1p127 + 1 i) == 0.2446359391192790896381501310437708987204 + 0.9101334047676183761532873794426475906201 i": +double: 1 +idouble: 1 +Test "Real part of: ctan (0x3.243f6cp-1 + 0 i) == -2.287733242885645987394874673945769518150e7 + 0.0 i": +float: 1 +ifloat: 1 + +# ctanh +Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: ctanh (0 + 0x3.243f6cp-1 i) == 0.0 - 2.287733242885645987394874673945769518150e7 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i": +float: 2 +ifloat: 2 +Test "Imaginary part of: ctanh (1 + 0x1p1023 i) == 0.8786063118883068695462540226219865087189 - 0.2254627924997545057926782581695274244229 i": +double: 1 +idouble: 1 +Test "Real part of: ctanh (1 + 0x1p127 i) == 0.9101334047676183761532873794426475906201 + 0.2446359391192790896381501310437708987204 i": +double: 1 +idouble: 1 + +# erf +Test "erf (1.25) == 0.922900128256458230136523481197281140": +double: 1 +idouble: 1 + +# erfc +Test "erfc (0x1.f7303cp+1) == 2.705500297238986897105236321218861842255e-8": +double: 1 +idouble: 1 +Test "erfc (0x1.ffa002p+2) == 1.233585992097580296336099501489175967033e-29": +float: 1 +ifloat: 1 +Test "erfc (2.0) == 0.00467773498104726583793074363274707139": +double: 1 +idouble: 1 +Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8": +double: 1 +idouble: 1 + +# exp10 +Test "exp10 (-1) == 0.1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "exp10 (-305) == 1.0e-305": +double: 1 +idouble: 1 +Test "exp10 (-36) == 1.0e-36": +double: 1 +idouble: 1 +Test "exp10 (0.75) == 5.62341325190349080394951039776481231": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "exp10 (3) == 1000": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +Test "exp10 (36) == 1.0e36": +double: 1 +idouble: 1 + +# expm1 +Test "expm1 (0.75) == 1.11700001661267466854536981983709561": +double: 1 +idouble: 1 +Test "expm1 (1) == M_El - 1.0": +float: 1 +ifloat: 1 +Test "expm1 (500.0) == 1.4035922178528374107397703328409120821806e+217": +double: 1 +idouble: 1 + +# hypot +Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 + +# j0 +Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "j0 (0.75) == 0.864242275166648623555731103820923211": +float: 1 +ifloat: 1 +Test "j0 (0x1.d7ce3ap+107) == 2.775523647291230802651040996274861694514e-17": +float: 2 +ifloat: 2 +Test "j0 (10.0) == -0.245935764451348335197760862485328754": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "j0 (2.0) == 0.223890779141235668051827454649948626": +float: 2 +ifloat: 2 +Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "j0 (8.0) == 0.171650807137553906090869407851972001": +float: 1 +ifloat: 1 + +# j1 +Test "j1 (0x1.3ffp+74) == 1.818984347516051243459364437186082741567e-12": +double: 1 +idouble: 1 +Test "j1 (0x1.ff00000000002p+840) == 1.846591691699331493194965158699937660696e-127": +double: 1 +idouble: 1 +Test "j1 (10.0) == 0.0434727461688614366697487680258592883": +float: 2 +ifloat: 2 +Test "j1 (2.0) == 0.576724807756873387202448242269137087": +double: 1 +idouble: 1 +Test "j1 (8.0) == 0.234636346853914624381276651590454612": +double: 1 +idouble: 1 + +# jn +Test "jn (0, -4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (0, 0.75) == 0.864242275166648623555731103820923211": +float: 1 +ifloat: 1 +Test "jn (0, 10.0) == -0.245935764451348335197760862485328754": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "jn (0, 2.0) == 0.223890779141235668051827454649948626": +float: 2 +ifloat: 2 +Test "jn (0, 4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (0, 8.0) == 0.171650807137553906090869407851972001": +float: 1 +ifloat: 1 +Test "jn (1, 10.0) == 0.0434727461688614366697487680258592883": +float: 2 +ifloat: 2 +Test "jn (1, 2.0) == 0.576724807756873387202448242269137087": +double: 1 +idouble: 1 +Test "jn (1, 8.0) == 0.234636346853914624381276651590454612": +double: 1 +idouble: 1 +Test "jn (10, 0.125) == 0.250543369809369890173993791865771547e-18": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (10, 0.75) == 0.149621713117596814698712483621682835e-10": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (10, 10.0) == 0.207486106633358857697278723518753428": +double: 4 +float: 3 +idouble: 4 +ifloat: 3 +Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +Test "jn (2, 0x1.ffff62p+99) == -4.43860668048170034334926693188979974489e-16": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +Test "jn (2, 2.4048255576957729) == 0.43175480701968038399746111312430703": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "jn (3, 0.125) == 0.406503832554912875023029337653442868e-4": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (3, 0.75) == 0.848438342327410884392755236884386804e-2": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (3, 10.0) == 0.0583793793051868123429354784103409563": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "jn (3, 2.0) == 0.128943249474402051098793332969239835": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (3, 2.4048255576957729) == 0.19899990535769083404042146764530813": +double: 3 +idouble: 3 +Test "jn (4, 2.4048255576957729) == 0.647466661641779720084932282551219891E-1": +double: 1 +idouble: 1 +Test "jn (5, 2.4048255576957729) == 0.163892432048058525099230549946147698E-1": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "jn (6, 2.4048255576957729) == 0.34048184720278336646673682895929161E-2": +double: 4 +float: 3 +idouble: 4 +ifloat: 3 +Test "jn (7, 2.4048255576957729) == 0.60068836573295394221291569249883076E-3": +double: 3 +float: 5 +idouble: 3 +ifloat: 5 +Test "jn (8, 2.4048255576957729) == 0.92165786705344923232879022467054148E-4": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 +Test "jn (9, 2.4048255576957729) == 0.12517270977961513005428966643852564E-4": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +# lgamma +Test "lgamma (0.7) == 0.260867246531666514385732417016759578": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +# log10 +Test "log10 (0.75) == -0.124938736608299953132449886193870744": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +Test "log10 (e) == log10(e)": +float: 1 +ifloat: 1 + +# log1p +Test "log1p (-0.25) == -0.287682072451780927439219005993827432": +float: 1 +ifloat: 1 + +# pow +Test "pow (0x0.ffffffp0, -0x1p24) == 2.7182819094701610539628664526874952929416": +float: 1 +ifloat: 1 +Test "pow (0x0.ffffffp0, 0x1p24) == 0.3678794302077803437135155590023422899744": +float: 1 +ifloat: 1 +Test "pow (0x1.000002p0, 0x1p24) == 7.3890552180866447284268641248075832310141": +float: 1 +ifloat: 1 + +# sin_tonearest +Test "sin_tonearest (1) == 0.8414709848078965066525023216302989996226": +float: 1 +ifloat: 1 + +# sincos +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": +double: 1 +idouble: 1 +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res": +float: 1 +ifloat: 1 + +# tgamma +Test "tgamma (-0.5) == -2 sqrt (pi)": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "tgamma (0.5) == sqrt (pi)": +float: 1 +ifloat: 1 +Test "tgamma (0.7) == 1.29805533264755778568117117915281162": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# y0 +Test "y0 (0x1.3ffp+74) == 1.818984347516051243459467456433028748678e-12": +double: 1 +idouble: 1 +Test "y0 (0x1.ff00000000002p+840) == 1.846591691699331493194965158699937660696e-127": +double: 1 +idouble: 1 +Test "y0 (1.0) == 0.0882569642156769579829267660235151628": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "y0 (1.5) == 0.382448923797758843955068554978089862": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "y0 (10.0) == 0.0556711672835993914244598774101900481": +float: 1 +ifloat: 1 +Test "y0 (8.0) == 0.223521489387566220527323400498620359": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# y1 +Test "y1 (0.125) == -5.19993611253477499595928744876579921": +double: 1 +idouble: 1 +Test "y1 (0x1.27e204p+99) == -8.881610148467797208469612080785210013461e-16": +double: 1 +idouble: 1 +Test "y1 (1.5) == -0.412308626973911295952829820633445323": +float: 1 +ifloat: 1 +Test "y1 (10.0) == 0.249015424206953883923283474663222803": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "y1 (2.0) == -0.107032431540937546888370772277476637": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "y1 (8.0) == -0.158060461731247494255555266187483550": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +# yn +Test "yn (0, 1.0) == 0.0882569642156769579829267660235151628": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "yn (0, 1.5) == 0.382448923797758843955068554978089862": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "yn (0, 10.0) == 0.0556711672835993914244598774101900481": +float: 1 +ifloat: 1 +Test "yn (0, 8.0) == 0.223521489387566220527323400498620359": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (1, 0.125) == -5.19993611253477499595928744876579921": +double: 1 +idouble: 1 +Test "yn (1, 1.5) == -0.412308626973911295952829820633445323": +float: 1 +ifloat: 1 +Test "yn (1, 10.0) == 0.249015424206953883923283474663222803": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "yn (1, 2.0) == -0.107032431540937546888370772277476637": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (1, 8.0) == -0.158060461731247494255555266187483550": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +Test "yn (10, 0.125) == -127057845771019398.252538486899753195": +double: 1 +idouble: 1 +Test "yn (10, 0.75) == -2133501638.90573424452445412893839236": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (10, 1.0) == -121618014.278689189288130426667971145": +double: 1 +idouble: 1 +Test "yn (10, 10.0) == -0.359814152183402722051986577343560609": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (10, 2.0) == -129184.542208039282635913145923304214": +double: 2 +idouble: 2 +Test "yn (3, 0.125) == -2612.69757350066712600220955744091741": +double: 1 +idouble: 1 +Test "yn (3, 0.75) == -12.9877176234475433186319774484809207": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (3, 10.0) == -0.251362657183837329779204747654240998": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (3, 2.0) == -1.12778377684042778608158395773179238": +double: 1 +idouble: 1 + +# Maximal error of functions: +Function: "atan2": +float: 1 +ifloat: 1 + +Function: "atanh": +float: 1 +ifloat: 1 + +Function: Real part of "cacos": +double: 1 +idouble: 1 + +Function: Imaginary part of "cacos": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + +Function: Real part of "cacosh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "cacosh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "casin": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "casin": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + +Function: Real part of "casinh": +double: 5 +float: 1 +idouble: 5 +ifloat: 1 + +Function: Imaginary part of "casinh": +double: 3 +float: 6 +idouble: 3 +ifloat: 6 + +Function: Imaginary part of "catan": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "catanh": +double: 4 +idouble: 4 + +Function: "cbrt": +double: 1 +idouble: 1 + +Function: Real part of "ccos": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "ccos": +float: 1 +ifloat: 1 + +Function: Real part of "ccosh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "ccosh": +float: 1 +ifloat: 1 + +Function: Real part of "cexp": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + +Function: Imaginary part of "cexp": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +Function: Real part of "clog": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "clog10": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "clog10": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "cos": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + +Function: "cos_tonearest": +float: 1 +ifloat: 1 + +Function: Real part of "cpow": +double: 2 +float: 4 +idouble: 2 +ifloat: 4 + +Function: Imaginary part of "cpow": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + +Function: Real part of "csinh": +float: 1 +ifloat: 1 + +Function: Imaginary part of "csinh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "csqrt": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "csqrt": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "ctan": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "ctan": +double: 1 +idouble: 1 + +Function: Real part of "ctanh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "ctanh": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +Function: "erf": +double: 1 +idouble: 1 + +Function: "erfc": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "exp10": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +Function: "expm1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "hypot": +float: 1 +ifloat: 1 + +Function: "j0": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + +Function: "j1": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +Function: "jn": +double: 4 +float: 5 +idouble: 4 +ifloat: 5 + +Function: "lgamma": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +Function: "log10": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +Function: "log1p": +float: 1 +ifloat: 1 + +Function: "pow": +float: 1 +ifloat: 1 + +Function: "sin_tonearest": +float: 1 +ifloat: 1 + +Function: "sincos": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "tan": +double: 1 +idouble: 1 + +Function: "tgamma": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "y0": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + +Function: "y1": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 + +Function: "yn": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 + +# end of automatic generation From fa12ed1f6126db0f52d4145d29094c4013829ce3 Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Wed, 16 May 2012 09:38:48 -0400 Subject: [PATCH 4376/4487] tile: avoid compiler warning in feraiseexcept() math_private override --- ChangeLog.tile | 5 +++++ sysdeps/tile/math_private.h | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog.tile b/ChangeLog.tile index 3dcd1a5992..e9180cf07d 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,3 +1,8 @@ +2012-05-15 Chris Metcalf + + * sysdeps/tile/math_private.h (feraiseexcept): Use statement + expression syntax to avoid compiler warning. + 2012-05-15 Chris Metcalf * sysdeps/tile/libm-test-ulps: New file. diff --git a/sysdeps/tile/math_private.h b/sysdeps/tile/math_private.h index 2dab42b9bf..858db4a051 100644 --- a/sysdeps/tile/math_private.h +++ b/sysdeps/tile/math_private.h @@ -6,7 +6,8 @@ And since we don't define FE_INVALID, FE_DIVBYZERO, etc., we must ignore the argument of feraiseexcept() as well. we return "1" to indicate we failed to raise an exception, though none of - the callers in glibc actually care. */ -#define feraiseexcept(excepts) 1 + the callers in glibc actually care. The extra level of statement + expression wrapping avoids "statement with no effect" warnings. */ +#define feraiseexcept(excepts) ({ 1; }) #endif From 26624de5a2632608b3dd7e30e151024e372b408c Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Wed, 16 May 2012 09:39:28 -0400 Subject: [PATCH 4377/4487] tile: provide a tile-specific sotruss-lib.c override --- ChangeLog.tile | 4 ++++ sysdeps/tile/sotruss-lib.c | 49 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 sysdeps/tile/sotruss-lib.c diff --git a/ChangeLog.tile b/ChangeLog.tile index e9180cf07d..733d49ead5 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,3 +1,7 @@ +2012-05-15 Chris Metcalf + + * sysdeps/tile/sotruss-lib.c: New file. + 2012-05-15 Chris Metcalf * sysdeps/tile/math_private.h (feraiseexcept): Use statement diff --git a/sysdeps/tile/sotruss-lib.c b/sysdeps/tile/sotruss-lib.c new file mode 100644 index 0000000000..6ad99f3d1d --- /dev/null +++ b/sysdeps/tile/sotruss-lib.c @@ -0,0 +1,49 @@ +/* Override generic sotruss-lib.c to define actual functions for tile. + Copyright (C) 2012 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, see + . */ + +#define HAVE_ARCH_PLTENTER +#define HAVE_ARCH_PLTEXIT + +#include + +ElfW(Addr) +la_tile_gnu_pltenter (ElfW(Sym) *sym __attribute__ ((unused)), + unsigned int ndx __attribute__ ((unused)), + uintptr_t *refcook, uintptr_t *defcook, + La_tile_regs *regs, unsigned int *flags, + const char *symname, long int *framesizep) +{ + print_enter (refcook, defcook, symname, + regs->lr_reg[0], regs->lr_reg[1], regs->lr_reg[2], + *flags); + + /* No need to copy anything, we will not need the parameters in any case. */ + *framesizep = 0; + + return sym->st_value; +} + +unsigned int +la_tile_gnu_pltexit (ElfW(Sym) *sym, unsigned int ndx, uintptr_t *refcook, + uintptr_t *defcook, const struct La_tile_regs *inregs, + struct La_tile_retval *outregs, const char *symname) +{ + print_exit (refcook, defcook, symname, outregs->lrv_reg[0]); + + return 0; +} From 0adc5f3892fee6fc6221691e3f269fcc3b386965 Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Wed, 16 May 2012 13:52:36 -0400 Subject: [PATCH 4378/4487] tilegx32: fix various bugs in setcontext/getcontext/swapcontext --- ChangeLog.tile | 10 ++++++++++ sysdeps/unix/sysv/linux/tile/getcontext.S | 2 +- sysdeps/unix/sysv/linux/tile/setcontext.S | 12 ++++++------ sysdeps/unix/sysv/linux/tile/swapcontext.S | 11 +++++++---- sysdeps/unix/sysv/linux/tile/ucontext_i.h | 3 ++- 5 files changed, 26 insertions(+), 12 deletions(-) diff --git a/ChangeLog.tile b/ChangeLog.tile index 733d49ead5..3bad4d34db 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,3 +1,13 @@ +2012-05-16 Chris Metcalf + + * sysdeps/unix/sysv/linux/tile/ucontext_i: Fix tilegx32 offset bug. + * sysdeps/unix/sysv/linux/tile/getcontext.S: Fix tilegx32 bug + where we accessed "uc_flags" as an 8-byte field. + * sysdeps/unix/sysv/linux/tile/setcontext.S: Likewise, + and also fix frame code not to access stack below "sp". + * sysdeps/unix/sysv/linux/tile/swapcontext.S: Fix frame code not + to access stack below "sp", and add frame unwind to error path. + 2012-05-15 Chris Metcalf * sysdeps/tile/sotruss-lib.c: New file. diff --git a/sysdeps/unix/sysv/linux/tile/getcontext.S b/sysdeps/unix/sysv/linux/tile/getcontext.S index 572780b88c..24163c28ce 100644 --- a/sysdeps/unix/sysv/linux/tile/getcontext.S +++ b/sysdeps/unix/sysv/linux/tile/getcontext.S @@ -32,7 +32,7 @@ ENTRY (__getcontext) swapcontext() will assume those registers are all dead. Save value "1" to uc_flags to later recognize getcontext(). */ { movei r11, 1; ADDI_PTR r10, r0, UC_FLAGS_OFFSET } - { ST r10, r11; addli r10, r0, UC_REG(30) } + { ST_PTR r10, r11; addli r10, r0, UC_REG(30) } { ST r10, r30; ADDI_PTR r10, r10, REGSIZE } { ST r10, r31; ADDI_PTR r10, r10, REGSIZE } { ST r10, r32; ADDI_PTR r10, r10, REGSIZE } diff --git a/sysdeps/unix/sysv/linux/tile/setcontext.S b/sysdeps/unix/sysv/linux/tile/setcontext.S index 319031b31d..f95ad7ccaa 100644 --- a/sysdeps/unix/sysv/linux/tile/setcontext.S +++ b/sysdeps/unix/sysv/linux/tile/setcontext.S @@ -37,7 +37,7 @@ ENTRY (__setcontext) #if UC_FLAGS_OFFSET != 0 # error "Add offset to r0 prior to load." #endif - LD r10, r0 + LD_PTR r10, r0 { BEQZ r10, .Lsigreturn addi r10, r10, -1 /* Confirm that it has value "1". */ @@ -51,13 +51,13 @@ ENTRY (__setcontext) ADDI_PTR r11, sp, -(2 * REGSIZE) move r10, sp } + ADDI_PTR sp, sp, -(3 * REGSIZE) + cfi_def_cfa_offset (3 * REGSIZE) cfi_offset (lr, 0) { ST r11, r10 - ADDI_PTR r10, sp, -REGSIZE - ADDI_PTR sp, sp, -(3 * REGSIZE) + ADDI_PTR r10, sp, (2 * REGSIZE) } - cfi_def_cfa_offset (3 * REGSIZE) { ST r10, r0 ADDLI_PTR r1, r0, UC_SIGMASK_OFFSET @@ -72,13 +72,13 @@ ENTRY (__setcontext) moveli TREG_SYSCALL_NR_NAME, __NR_rt_sigprocmask } swint1 + ADDI_PTR r11, sp, 2 * REGSIZE /* Restore uc_context to r11. */ { + LD r11, r11 ADDI_PTR sp, sp, 3 * REGSIZE - ADDI_PTR r11, sp, 2 * REGSIZE /* Restore uc_context to r11. */ } cfi_def_cfa_offset (0) LD lr, sp - LD r11, r11 { ADDI_PTR r10, r11, UC_REG(0) BNEZ r1, .Lsyscall_error diff --git a/sysdeps/unix/sysv/linux/tile/swapcontext.S b/sysdeps/unix/sysv/linux/tile/swapcontext.S index 6d3ad7fd1d..e2b3d70709 100644 --- a/sysdeps/unix/sysv/linux/tile/swapcontext.S +++ b/sysdeps/unix/sysv/linux/tile/swapcontext.S @@ -31,17 +31,17 @@ ENTRY (__swapcontext) ADDI_PTR r11, sp, -(3 * REGSIZE) move r10, sp } + ADDI_PTR sp, sp, -(4 * REGSIZE) + cfi_def_cfa_offset (4 * REGSIZE) cfi_offset (lr, 0) { ST r11, r10 - ADDI_PTR r10, sp, -(2 * REGSIZE) + ADDI_PTR r10, sp, (2 * REGSIZE) } { ST r10, r0 - ADDI_PTR r10, sp, -REGSIZE - ADDI_PTR sp, sp, -(4 * REGSIZE) + ADDI_PTR r10, sp, (3 * REGSIZE) } - cfi_def_cfa_offset (4 * REGSIZE) ST r10, r1 /* Save the current context. */ @@ -80,6 +80,9 @@ ENTRY (__swapcontext) } .Lerror: + ADDI_PTR sp, sp, 4 * REGSIZE + cfi_def_cfa_offset (0) + LD lr, sp jrp lr END (__swapcontext) diff --git a/sysdeps/unix/sysv/linux/tile/ucontext_i.h b/sysdeps/unix/sysv/linux/tile/ucontext_i.h index bdcfa258dc..f8ae9c9f16 100644 --- a/sysdeps/unix/sysv/linux/tile/ucontext_i.h +++ b/sysdeps/unix/sysv/linux/tile/ucontext_i.h @@ -25,7 +25,8 @@ #define UC_STACK_SP_OFFSET (UC_LINK_OFFSET + __SIZEOF_POINTER__) #define UC_STACK_FLAGS_OFFSET (UC_STACK_SP_OFFSET + __SIZEOF_POINTER__) #define UC_STACK_SIZE_OFFSET (UC_STACK_FLAGS_OFFSET + __SIZEOF_POINTER__) -#define UC_STACK_MCONTEXT_OFFSET (UC_STACK_SIZE_OFFSET + __SIZEOF_POINTER__) +#define UC_STACK_MCONTEXT_OFFSET \ + ((UC_STACK_SIZE_OFFSET + __SIZEOF_POINTER__ + REGSIZE - 1) & -REGSIZE) #define UC_REG(i) (UC_STACK_MCONTEXT_OFFSET + ((i) * REGSIZE)) #define UC_NREGS 64 #define UC_SIGMASK_OFFSET UC_REG(UC_NREGS) From 342a78ccd537e6abd917eacac21ae2064ef39df9 Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Thu, 17 May 2012 09:04:23 -0400 Subject: [PATCH 4379/4487] Changelog.tile: fix up some formatting issues Change leading spaces to tab, and merge runs of ChangeLog messages that were from cmetcalf@tilera.com on the same date. --- ChangeLog.tile | 72 +++++++++++++++----------------------------------- 1 file changed, 21 insertions(+), 51 deletions(-) diff --git a/ChangeLog.tile b/ChangeLog.tile index 3bad4d34db..b800112196 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -12,82 +12,72 @@ * sysdeps/tile/sotruss-lib.c: New file. -2012-05-15 Chris Metcalf - * sysdeps/tile/math_private.h (feraiseexcept): Use statement expression syntax to avoid compiler warning. -2012-05-15 Chris Metcalf - * sysdeps/tile/libm-test-ulps: New file. -2012-05-15 Chris Metcalf - * sysdeps/tile/bits/fenv.h (__FE_UNDEFINED): New symbol. -2012-05-15 Chris Metcalf - * sysdeps/tile/ldsodefs.h (ARCH_PLTEXIT_MEMBERS): Add proper - const qualifier to "inregs" argument. - -2012-05-16 Chris Metcalf + const qualifier to "inregs" argument. * sysdeps/tile/elf/stackguard-macros.h: Delete unused file. 2012-05-14 Chris Metcalf * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/ld.abilist: - New file. + New file. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libBrokenLocale.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libanl.abilist: - Likewise. + Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libc.abilist: - Likewise. + Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libcrypt.abilist: - Likewise. + Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libdl.abilist: - Likewise. + Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libm.abilist: - Likewise. + Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libnsl.abilist: - Likewise. + Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libpthread.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libresolv.abilist: - Likewise. + Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/librt.abilist: - Likewise. + Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libthread_db.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libutil.abilist: - Likewise. + Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/ld.abilist: - Likewise. + Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libBrokenLocale.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libanl.abilist: - Likewise. + Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libc.abilist: - Likewise. + Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libcrypt.abilist: - Likewise. + Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libdl.abilist: - Likewise. + Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libm.abilist: - Likewise. + Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libnsl.abilist: - Likewise. + Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libpthread.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libresolv.abilist: - Likewise. + Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/librt.abilist: - Likewise. + Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libthread_db.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libutil.abilist: - Likewise. + Likewise. * sysdeps/unix/sysv/linux/tile/tilepro/nptl/ld.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilepro/nptl/libBrokenLocale.abilist: Likewise. @@ -106,24 +96,16 @@ Likewise. * sysdeps/unix/sysv/linux/tile/tilepro/nptl/libutil.abilist: Likewise. -2012-05-14 Chris Metcalf - * sysdeps/tile/dl-start.S: Align stack for tilegx32. 2012-05-12 Chris Metcalf * sysdeps/unix/sysv/linux/tile/sys/dataplane.h: Add . -2012-05-12 Chris Metcalf - * sysdeps/unix/sysv/linux/tile/nptl/clone.S: Add missing CFI. -2012-05-12 Chris Metcalf - * sysdeps/tile/tls-macros.h: Fix buggy TLS_GD, etc., macros. -2012-05-12 Chris Metcalf - * sysdeps/tile/tilegx/memchr.c: Use new copy_byte() function to efficiently generate a large constant for masking. * sysdeps/tile/tilegx/memset.c: Likewise. @@ -133,35 +115,23 @@ * sysdeps/tile/tilegx/strrchr.c: Likewise. * sysdeps/tile/tilegx/string-endian.h (copy_byte): New function. -2012-05-12 Chris Metcalf - * sysdeps/tile/tilegx/memcpy.c: Allow memcpy(p, p, n) without corrupting memory at "p". -2012-05-12 Chris Metcalf - * sysdeps/tile/__tls_get_addr.S: Use __WORDSIZE, not _LP64. -2012-05-12 Chris Metcalf - * sysdeps/tile/stackguard-macros.h: New file. * sysdeps/tile/elf/stackguard-macros.h: New stub include file. -2012-05-12 Chris Metcalf - * sysdeps/tile/Makefile (ELF_MACHINE_PLTREL_OVERLAP): Remove variable no longer used by core. -2012-05-12 Chris Metcalf - * sysdeps/unix/sysv/linux/tile/bits/siginfo.h: Don't name siginfo_t struct. Add forward declaration of pthread_attr_t and use it in sigevent. * sysdeps/unix/sysv/linux/tile/nptl/bits/pthreadtypes.h: Name pthread_attr_t union. -2012-05-12 Chris Metcalf - * sysdeps/tile/crti.S: New file, based on compiler output for sysdeps/generic/initfini.c. * sysdeps/tile/crtn.S: Likewise. From ac9182e7532b7a903afa1b86545dd9f1cc308a74 Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Thu, 17 May 2012 11:27:36 -0400 Subject: [PATCH 4380/4487] tile: use ieee754/dbl-64 version of fma() and fmaf() It turns out that even if you stub out the rounding and exception support and use the ieee754 version, it's still much better than the generic version that just uses normal multiply and add. The resulting functions have only 1 ULP of error according to the tests. --- ChangeLog.tile | 5 +++++ sysdeps/tile/s_fma.c | 11 ++++++++--- sysdeps/tile/s_fmaf.c | 11 ++++++++--- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/ChangeLog.tile b/ChangeLog.tile index b800112196..7d3c7bde7e 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,3 +1,8 @@ +2012-05-17 Chris Metcalf + + * sysdeps/tile/s_fma.c: Use ieee754/dbl-64 without rounding or + exception support; it's still much better than the generic version. + 2012-05-16 Chris Metcalf * sysdeps/unix/sysv/linux/tile/ucontext_i: Fix tilegx32 offset bug. diff --git a/sysdeps/tile/s_fma.c b/sysdeps/tile/s_fma.c index 355b4edf6a..5be586562e 100644 --- a/sysdeps/tile/s_fma.c +++ b/sysdeps/tile/s_fma.c @@ -1,3 +1,8 @@ -/* Although tile uses ieee754/dbl-64, it does not support the - rounding modes required to use the standard dbl-64 s_fma.c. */ -#include +/* tile does not support the rounding modes required by the ieee754/dbl-64 + implementation, but it's still better than the generic implementation. */ + +#define libc_feholdexcept_setround(e, x) do { (void) (e); } while (0) +#define libc_feupdateenv_test(e, x) ((void) (e), 0) +#define libc_fetestexcept(x) 0 + +#include diff --git a/sysdeps/tile/s_fmaf.c b/sysdeps/tile/s_fmaf.c index caa8e40654..92d66b2578 100644 --- a/sysdeps/tile/s_fmaf.c +++ b/sysdeps/tile/s_fmaf.c @@ -1,3 +1,8 @@ -/* Although tile uses ieee754/dbl-64, it does not support the - rounding modes required to use the standard dbl-64 s_fmaf.c. */ -#include +/* tile does not support the rounding modes required by the ieee754/dbl-64 + implementation, but it's still better than the generic implementation. */ + +#define libc_feholdexcept_setround(e, x) do { (void) (e); } while (0) +#define libc_feupdateenv_test(e, x) ((void) (e), 0) +#define libc_fetestexcept(x) 0 + +#include From 61a52130e8736d13059cdd090d3c8b2ac42f292b Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Thu, 17 May 2012 11:31:07 -0400 Subject: [PATCH 4381/4487] tile: update libm-test-ulps for improved fma() and exp10() --- ChangeLog.tile | 2 ++ sysdeps/tile/libm-test-ulps | 39 ++++++++++++++++++++++++------------- 2 files changed, 28 insertions(+), 13 deletions(-) diff --git a/ChangeLog.tile b/ChangeLog.tile index 7d3c7bde7e..24da151bbf 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,5 +1,7 @@ 2012-05-17 Chris Metcalf + * sysdeps/tile/libm-test-ulps: Improved fma() and exp10(). + * sysdeps/tile/s_fma.c: Use ieee754/dbl-64 without rounding or exception support; it's still much better than the generic version. diff --git a/sysdeps/tile/libm-test-ulps b/sysdeps/tile/libm-test-ulps index 1912f440e3..b5e01795f6 100644 --- a/sysdeps/tile/libm-test-ulps +++ b/sysdeps/tile/libm-test-ulps @@ -625,25 +625,16 @@ idouble: 1 # exp10 Test "exp10 (-1) == 0.1": double: 1 -float: 1 idouble: 1 -ifloat: 1 Test "exp10 (-305) == 1.0e-305": double: 1 idouble: 1 Test "exp10 (-36) == 1.0e-36": double: 1 idouble: 1 -Test "exp10 (0.75) == 5.62341325190349080394951039776481231": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 Test "exp10 (3) == 1000": double: 1 -float: 2 idouble: 1 -ifloat: 2 Test "exp10 (36) == 1.0e36": double: 1 idouble: 1 @@ -659,6 +650,26 @@ Test "expm1 (500.0) == 1.4035922178528374107397703328409120821806e+217": double: 1 idouble: 1 +# fma +Test "fma (-0x1.fffffffffffffp-711, 0x1.fffffffffffffp-275, 0x1.fffffe00007ffp-983) == 0x1.7ffffe00007ffp-983": +double: 1 +idouble: 1 +Test "fma (0x1.0000002p+0, 0x1.ffffffcp-1, -0x1p-300) == 0x1.fffffffffffffp-1": +double: 1 +idouble: 1 +Test "fma (0x1.153d650bb9f06p-907, 0x1.2d01230d48407p-125, -0x0.b278d5acfc3cp-1022) == -0x0.b22757123bbe9p-1022": +double: 1 +idouble: 1 +Test "fma (0x1.4000004p-967, 0x1p-106, 0x0.000001p-1022) == 0x0.0000010000003p-1022": +double: 1 +idouble: 1 +Test "fma (0x1.7ff8p+13, 0x1.000002p+0, 0x1.ffffp-24) == 0x1.7ff802p+13": +float: 1 +ifloat: 1 +Test "fma (0x1.7fffff8p-968, 0x1p-106, 0x0.000001p-1022) == 0x0.0000010000001p-1022": +double: 1 +idouble: 1 + # hypot Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271": float: 1 @@ -811,9 +822,7 @@ float: 1 idouble: 3 ifloat: 1 Test "jn (3, 2.0) == 0.128943249474402051098793332969239835": -double: 1 float: 1 -idouble: 1 ifloat: 1 Test "jn (3, 2.4048255576957729) == 0.19899990535769083404042146764530813": double: 3 @@ -1243,9 +1252,7 @@ ifloat: 1 Function: "exp10": double: 1 -float: 2 idouble: 1 -ifloat: 2 Function: "expm1": double: 1 @@ -1253,6 +1260,12 @@ float: 1 idouble: 1 ifloat: 1 +Function: "fma": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + Function: "hypot": float: 1 ifloat: 1 From 69d8348e5e3da19e8f98c9ea063c45dc72ef7407 Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Thu, 17 May 2012 14:14:07 -0400 Subject: [PATCH 4382/4487] tile: fork tilepro and tilegx copies of c++-types-tile-linux-gnu.data --- ChangeLog.tile | 4 ++ data/c++-types-tilegx-linux-gnu.data | 67 +++++++++++++++++++ ....data => c++-types-tilepro-linux-gnu.data} | 0 3 files changed, 71 insertions(+) create mode 100644 data/c++-types-tilegx-linux-gnu.data rename data/{c++-types-tile-linux-gnu.data => c++-types-tilepro-linux-gnu.data} (100%) diff --git a/ChangeLog.tile b/ChangeLog.tile index 24da151bbf..51acbc660b 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,5 +1,9 @@ 2012-05-17 Chris Metcalf + * data/c++-types-tilepro-linux-gnu.data: Renamed from + data/c++-types-tile-linux-gnu.data. + * data/c++-types-tilegx-linux-gnu.data: New file. + * sysdeps/tile/libm-test-ulps: Improved fma() and exp10(). * sysdeps/tile/s_fma.c: Use ieee754/dbl-64 without rounding or diff --git a/data/c++-types-tilegx-linux-gnu.data b/data/c++-types-tilegx-linux-gnu.data new file mode 100644 index 0000000000..ac925ccb36 --- /dev/null +++ b/data/c++-types-tilegx-linux-gnu.data @@ -0,0 +1,67 @@ +blkcnt64_t:l +blkcnt_t:l +blksize_t:i +caddr_t:Pc +clockid_t:i +clock_t:l +daddr_t:i +dev_t:m +fd_mask:l +fsblkcnt64_t:m +fsblkcnt_t:m +fsfilcnt64_t:m +fsfilcnt_t:m +fsid_t:8__fsid_t +gid_t:j +id_t:j +ino64_t:m +ino_t:m +int16_t:s +int32_t:i +int64_t:l +int8_t:a +intptr_t:l +key_t:i +loff_t:l +mode_t:j +nlink_t:j +off64_t:l +off_t:l +pid_t:i +pthread_attr_t:14pthread_attr_t +pthread_barrier_t:17pthread_barrier_t +pthread_barrierattr_t:21pthread_barrierattr_t +pthread_cond_t:14pthread_cond_t +pthread_condattr_t:18pthread_condattr_t +pthread_key_t:j +pthread_mutex_t:15pthread_mutex_t +pthread_mutexattr_t:19pthread_mutexattr_t +pthread_once_t:i +pthread_rwlock_t:16pthread_rwlock_t +pthread_rwlockattr_t:20pthread_rwlockattr_t +pthread_spinlock_t:i +pthread_t:m +quad_t:l +register_t:l +rlim64_t:m +rlim_t:m +sigset_t:10__sigset_t +size_t:m +socklen_t:j +ssize_t:l +suseconds_t:l +time_t:l +u_char:h +uid_t:j +uint:j +u_int:j +u_int16_t:t +u_int32_t:j +u_int64_t:m +u_int8_t:h +ulong:m +u_long:m +u_quad_t:m +useconds_t:j +ushort:t +u_short:t diff --git a/data/c++-types-tile-linux-gnu.data b/data/c++-types-tilepro-linux-gnu.data similarity index 100% rename from data/c++-types-tile-linux-gnu.data rename to data/c++-types-tilepro-linux-gnu.data From 3f83552f2ca9b2f2ec311d91570146ca51f99809 Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Thu, 17 May 2012 18:51:36 +0000 Subject: [PATCH 4383/4487] tile: support tilegx32 in stackguard-macros.h --- ChangeLog.tile | 2 ++ sysdeps/tile/stackguard-macros.h | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog.tile b/ChangeLog.tile index 51acbc660b..52b38b4a7d 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,5 +1,7 @@ 2012-05-17 Chris Metcalf + * sysdeps/tile/stackguard-macros.h: Support tilegx32. + * data/c++-types-tilepro-linux-gnu.data: Renamed from data/c++-types-tile-linux-gnu.data. * data/c++-types-tilegx-linux-gnu.data: New file. diff --git a/sysdeps/tile/stackguard-macros.h b/sysdeps/tile/stackguard-macros.h index 7679c0ac00..589ea2b0d8 100644 --- a/sysdeps/tile/stackguard-macros.h +++ b/sysdeps/tile/stackguard-macros.h @@ -1,6 +1,13 @@ +#include + #ifdef __tilegx__ -# define STACK_CHK_GUARD \ +# if __WORDSIZE == 64 +# define STACK_CHK_GUARD \ ({ uintptr_t x; asm ("addi %0, tp, -16; ld %0, %0" : "=r" (x)); x; }) +# else +# define STACK_CHK_GUARD \ + ({ uintptr_t x; asm ("addi %0, tp, -8; ld4s %0, %0" : "=r" (x)); x; }) +# endif #else # define STACK_CHK_GUARD \ ({ uintptr_t x; asm ("addi %0, tp, -8; lw %0, %0" : "=r" (x)); x; }) From 30aa747c6895cfb6ae7c9655375c1d0c87acdc41 Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Thu, 17 May 2012 15:18:45 -0400 Subject: [PATCH 4384/4487] tile: add proper versioning for fegetenv() --- ChangeLog.tile | 7 +++++++ sysdeps/tile/fegetenv.c | 2 ++ .../unix/sysv/linux/tile/tilegx/tilegx32/nptl/libm.abilist | 1 + .../unix/sysv/linux/tile/tilegx/tilegx64/nptl/libm.abilist | 1 + sysdeps/unix/sysv/linux/tile/tilepro/nptl/libm.abilist | 1 + 5 files changed, 12 insertions(+) diff --git a/ChangeLog.tile b/ChangeLog.tile index 52b38b4a7d..0befa86af0 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,5 +1,12 @@ 2012-05-17 Chris Metcalf + * sysdeps/tile/fegetenv.c: Version fegetenv() like fesetenv(). + * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libm.abilist: + Add fegetenv. + * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libm.abilist: + Likewise. + * sysdeps/unix/sysv/linux/tile/tilepro/nptl/libm.abilist: Likewise. + * sysdeps/tile/stackguard-macros.h: Support tilegx32. * data/c++-types-tilepro-linux-gnu.data: Renamed from diff --git a/sysdeps/tile/fegetenv.c b/sysdeps/tile/fegetenv.c index 55e30981f0..f9ccc206dd 100644 --- a/sysdeps/tile/fegetenv.c +++ b/sysdeps/tile/fegetenv.c @@ -17,6 +17,7 @@ . */ #include +#include int __fegetenv (fenv_t *envp) @@ -25,3 +26,4 @@ __fegetenv (fenv_t *envp) return 0; } libm_hidden_ver (__fegetenv, fegetenv) +versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2); diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libm.abilist b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libm.abilist index ab2a40f202..601b505ead 100644 --- a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libm.abilist +++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libm.abilist @@ -145,6 +145,7 @@ GLIBC_2.12 feclearexcept F fedisableexcept F feenableexcept F + fegetenv F fegetexcept F fegetexceptflag F fegetround F diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libm.abilist b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libm.abilist index ab2a40f202..601b505ead 100644 --- a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libm.abilist +++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libm.abilist @@ -145,6 +145,7 @@ GLIBC_2.12 feclearexcept F fedisableexcept F feenableexcept F + fegetenv F fegetexcept F fegetexceptflag F fegetround F diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libm.abilist b/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libm.abilist index ab2a40f202..601b505ead 100644 --- a/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libm.abilist +++ b/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libm.abilist @@ -145,6 +145,7 @@ GLIBC_2.12 feclearexcept F fedisableexcept F feenableexcept F + fegetenv F fegetexcept F fegetexceptflag F fegetround F From 1d3b830192823b715901350b495d1357a4d951c2 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 18 May 2012 11:35:03 -0700 Subject: [PATCH 4385/4487] alpha: Add __SYSCALL_SLONG_TYPE, __SYSCALL_ULONG_TYPE, __FSWORD_T_TYPE --- ChangeLog.alpha | 5 +++++ sysdeps/unix/sysv/linux/alpha/bits/typesizes.h | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 0caabdb4f6..cf036d1ba3 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,8 @@ +2012-05-18 Richard Henderson + + * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h (__FSWORD_T_TYPE, + __SYSCALL_SLONG_TYPE, __SYSCALL_ULONG_TYPE): New. + 2012-04-26 Matt Turner * sysdeps/unix/sysv/linux/alpha/kernel-features.h: Correct kernel diff --git a/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h b/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h index 958bbf1425..2dbeb42a17 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h @@ -57,6 +57,10 @@ #define __BLKSIZE_T_TYPE __U32_TYPE #define __FSID_T_TYPE struct { int __val[2]; } #define __SSIZE_T_TYPE __SWORD_TYPE +#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE +#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE +#define __FSWORD_T_TYPE __S32_TYPE + /* Number of descriptors that can fit in an `fd_set'. */ #define __FD_SETSIZE 1024 From c6c5422a5db1449c89fcb80fabab6f1f367510be Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 18 May 2012 11:47:36 -0700 Subject: [PATCH 4386/4487] alpha: Add localplt data file --- data/localplt-alpha-linux-gnu.data | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 data/localplt-alpha-linux-gnu.data diff --git a/data/localplt-alpha-linux-gnu.data b/data/localplt-alpha-linux-gnu.data new file mode 100644 index 0000000000..00700d1e02 --- /dev/null +++ b/data/localplt-alpha-linux-gnu.data @@ -0,0 +1,20 @@ +libc.so: _OtsAddX ? +libc.so: _OtsConvertFloatXT ? +libc.so: _OtsCvtQX ? +libc.so: _OtsDivX ? +libc.so: _OtsEqlX ? +libc.so: _OtsGeqX ? +libc.so: _OtsLssX ? +libc.so: _OtsMulX ? +libc.so: _OtsNeqX ? +libc.so: _OtsSubX ? +libc.so: _Unwind_Find_FDE +libc.so: calloc ? +libc.so: free ? +libc.so: malloc ? +libc.so: memalign ? +libc.so: realloc ? +libm.so: matherr +# We used to offer inline functions that used this, so it must be exported. +# Ought to reorg things such that carg isn't thus forced to use a plt. +libm.so: __atan2 From fa6da45c1199f3e61b38485cc4d79d47d8a07dc6 Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Fri, 18 May 2012 13:15:53 -0400 Subject: [PATCH 4387/4487] linux-generic: add __FSWORD_T_TYPE to --- ChangeLog.linux-generic | 5 +++++ sysdeps/unix/sysv/linux/generic/bits/typesizes.h | 1 + 2 files changed, 6 insertions(+) diff --git a/ChangeLog.linux-generic b/ChangeLog.linux-generic index f74df7c84f..821270f0fb 100644 --- a/ChangeLog.linux-generic +++ b/ChangeLog.linux-generic @@ -1,3 +1,8 @@ +2012-05-18 Chris Metcalf + + * sysdeps/unix/sysv/linux/generic/bits/typesizes.h + (__FSWORD_T_TYPE): New macro. + 2012-05-16 Chris Metcalf * sysdeps/unix/sysv/linux/generic/not-cancel.h: Add diff --git a/sysdeps/unix/sysv/linux/generic/bits/typesizes.h b/sysdeps/unix/sysv/linux/generic/bits/typesizes.h index b280c9b1e9..948edeb96b 100644 --- a/sysdeps/unix/sysv/linux/generic/bits/typesizes.h +++ b/sysdeps/unix/sysv/linux/generic/bits/typesizes.h @@ -45,6 +45,7 @@ #define __FSBLKCNT64_T_TYPE __UQUAD_TYPE #define __FSFILCNT_T_TYPE __ULONGWORD_TYPE #define __FSFILCNT64_T_TYPE __UQUAD_TYPE +#define __FSWORD_T_TYPE __SWORD_TYPE #define __ID_T_TYPE __U32_TYPE #define __CLOCK_T_TYPE __SLONGWORD_TYPE #define __TIME_T_TYPE __SLONGWORD_TYPE From 0d9130fc21ef5b396190125fff6ab612c50119f1 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Thu, 17 May 2012 05:50:08 +0200 Subject: [PATCH 4388/4487] hppa: Use new libgcc_so in shlib-versions. The version of libcc.so used is now controlled via shlib-versions. --- ChangeLog.hppa | 5 +++++ sysdeps/hppa/libgcc_s.h | 2 -- sysdeps/hppa/shlib-versions | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) delete mode 100644 sysdeps/hppa/libgcc_s.h diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 0c7446e924..68eb6faf47 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,8 @@ +2012-05-17 Siddhesh Poyarekar + + * sysdeps/hppa/libgcc_s.h: Remove. + * sysdeps/hppa/shlib-versions: Add libgcc_s. + 2012-04-17 Carlos O'Donell * sysdeps/hppa/dl-irel.h: New file. diff --git a/sysdeps/hppa/libgcc_s.h b/sysdeps/hppa/libgcc_s.h deleted file mode 100644 index 8dd1d72de0..0000000000 --- a/sysdeps/hppa/libgcc_s.h +++ /dev/null @@ -1,2 +0,0 @@ -/* Name of libgcc_s library provided by gcc. */ -#define LIBGCC_S_SO "libgcc_s.so.4" diff --git a/sysdeps/hppa/shlib-versions b/sysdeps/hppa/shlib-versions index 5a1a865a21..6b9225c925 100644 --- a/sysdeps/hppa/shlib-versions +++ b/sysdeps/hppa/shlib-versions @@ -5,3 +5,5 @@ hppa.*-.*-.* libc=6 GLIBC_2.2 hppa.*-.*-.* ld=ld.so.1 GLIBC_2.2 hppa-.*-.* libBrokenLocale=1 GLIBC_2.2 + +hppa.*-.*-.* libgcc_s=4 From 18bbce4028351206e06e4cf8bda1395760d71d25 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Sat, 19 May 2012 18:53:28 +0200 Subject: [PATCH 4389/4487] hppa: Rename all *.s to *.S. Top-level is removing the rule for *.s, therefore we change all of our files to *.S. There was no reason not to use *.S. --- ChangeLog.hppa | 21 +++++++++++++++++++ sysdeps/hppa/{add_n.s => add_n.S} | 0 .../hppa/hppa1.1/{addmul_1.s => addmul_1.S} | 0 sysdeps/hppa/hppa1.1/{mul_1.s => mul_1.S} | 0 .../hppa/hppa1.1/{submul_1.s => submul_1.S} | 0 .../hppa1.1/{udiv_qrnnd.s => udiv_qrnnd.S} | 0 sysdeps/hppa/{lshift.s => lshift.S} | 0 sysdeps/hppa/{rshift.s => rshift.S} | 0 sysdeps/hppa/{sub_n.s => sub_n.S} | 0 sysdeps/hppa/{udiv_qrnnd.s => udiv_qrnnd.S} | 0 10 files changed, 21 insertions(+) rename sysdeps/hppa/{add_n.s => add_n.S} (100%) rename sysdeps/hppa/hppa1.1/{addmul_1.s => addmul_1.S} (100%) rename sysdeps/hppa/hppa1.1/{mul_1.s => mul_1.S} (100%) rename sysdeps/hppa/hppa1.1/{submul_1.s => submul_1.S} (100%) rename sysdeps/hppa/hppa1.1/{udiv_qrnnd.s => udiv_qrnnd.S} (100%) rename sysdeps/hppa/{lshift.s => lshift.S} (100%) rename sysdeps/hppa/{rshift.s => rshift.S} (100%) rename sysdeps/hppa/{sub_n.s => sub_n.S} (100%) rename sysdeps/hppa/{udiv_qrnnd.s => udiv_qrnnd.S} (100%) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 68eb6faf47..e588a7853f 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,24 @@ +2012-05-19 Carlos O'Donell + + * sysdeps/hppa/add_n.s: Rename this... + * sysdeps/hppa/add_n.S: ... to this. + * sysdeps/hppa/hppa1.1/addmul_1.s: Rename this... + * sysdeps/hppa/hppa1.1/addmul_1.S: ... to this. + * sysdeps/hppa/hppa1.1/mul_1.s: Rename this... + * sysdeps/hppa/hppa1.1/mul_1.S ... to this. + * sysdeps/hppa/hppa1.1/submul_1.s: Rename this... + * sysdeps/hppa/hppa1.1/submul_1.S: ... to this. + * sysdeps/hppa/hppa1.1/udiv_qrnnd.s: Rname this... + * sysdeps/hppa/hppa1.1/udiv_qrnnd.S: ... to this. + * sysdeps/hppa/lshift.s: Rename this... + * sysdeps/hppa/lshift.S: ... to this. + * sysdeps/hppa/rshift.s: Rename this... + * sysdeps/hppa/rshift.S: ... to this. + * sysdeps/hppa/sub_n.s: Rename this... + * sysdeps/hppa/sub_n.S: ... to this. + * sysdeps/hppa/udiv_qrnnd.s: Rename this... + * sysdeps/hppa/udiv_qrnnd.S: ... to this. + 2012-05-17 Siddhesh Poyarekar * sysdeps/hppa/libgcc_s.h: Remove. diff --git a/sysdeps/hppa/add_n.s b/sysdeps/hppa/add_n.S similarity index 100% rename from sysdeps/hppa/add_n.s rename to sysdeps/hppa/add_n.S diff --git a/sysdeps/hppa/hppa1.1/addmul_1.s b/sysdeps/hppa/hppa1.1/addmul_1.S similarity index 100% rename from sysdeps/hppa/hppa1.1/addmul_1.s rename to sysdeps/hppa/hppa1.1/addmul_1.S diff --git a/sysdeps/hppa/hppa1.1/mul_1.s b/sysdeps/hppa/hppa1.1/mul_1.S similarity index 100% rename from sysdeps/hppa/hppa1.1/mul_1.s rename to sysdeps/hppa/hppa1.1/mul_1.S diff --git a/sysdeps/hppa/hppa1.1/submul_1.s b/sysdeps/hppa/hppa1.1/submul_1.S similarity index 100% rename from sysdeps/hppa/hppa1.1/submul_1.s rename to sysdeps/hppa/hppa1.1/submul_1.S diff --git a/sysdeps/hppa/hppa1.1/udiv_qrnnd.s b/sysdeps/hppa/hppa1.1/udiv_qrnnd.S similarity index 100% rename from sysdeps/hppa/hppa1.1/udiv_qrnnd.s rename to sysdeps/hppa/hppa1.1/udiv_qrnnd.S diff --git a/sysdeps/hppa/lshift.s b/sysdeps/hppa/lshift.S similarity index 100% rename from sysdeps/hppa/lshift.s rename to sysdeps/hppa/lshift.S diff --git a/sysdeps/hppa/rshift.s b/sysdeps/hppa/rshift.S similarity index 100% rename from sysdeps/hppa/rshift.s rename to sysdeps/hppa/rshift.S diff --git a/sysdeps/hppa/sub_n.s b/sysdeps/hppa/sub_n.S similarity index 100% rename from sysdeps/hppa/sub_n.s rename to sysdeps/hppa/sub_n.S diff --git a/sysdeps/hppa/udiv_qrnnd.s b/sysdeps/hppa/udiv_qrnnd.S similarity index 100% rename from sysdeps/hppa/udiv_qrnnd.s rename to sysdeps/hppa/udiv_qrnnd.S From 21ed706977cedab44cc7edd99bc7a6da53a5a4f0 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sat, 19 May 2012 17:56:01 +0000 Subject: [PATCH 4390/4487] Remove compatibility code for old ARM kernels. --- ChangeLog.arm | 28 ++++++++++ sysdeps/unix/sysv/linux/arm/ftruncate64.c | 52 +++---------------- sysdeps/unix/sysv/linux/arm/mmap.S | 42 +-------------- sysdeps/unix/sysv/linux/arm/posix_fadvise64.c | 26 +--------- sysdeps/unix/sysv/linux/arm/truncate64.c | 50 +++--------------- sysdeps/unix/sysv/linux/arm/vfork.S | 21 -------- 6 files changed, 43 insertions(+), 176 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index b75bd860b4..bfb87aa2e0 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,31 @@ +2012-05-19 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/ftruncate64.c (kernel-features.h): + Don't include. + [__NR_ftruncate64]: Make code unconditional. + [!__NR_ftruncate64]: Remove conditional code. + [!__ASSUME_TRUNCATE64_SYSCALL]: Likewise. + * sysdeps/unix/sysv/linux/arm/mmap.S (kernel-features.h): Don't + include. + [__ASSUME_MMAP2_SYSCALL]: + Make code unconditional. + [!__ASSUME_MMAP2_SYSCALL]: Remove conditional code. + * sysdeps/unix/sysv/linux/arm/posix_fadvise64.c + (kernel-features.h): Don't include. + [__NR_arm_fadvise64_64]: Make code unconditional. + [!__ASSUME_FADVISE64_64_SYSCALL]: Remove conditional code. + * sysdeps/unix/sysv/linux/arm/truncate64.c (kernel-features.h): + Don't include. + [__NR_truncate64]: Make code unconditional. + [!__NR_truncate64]: Remove conditional code. + [!__ASSUME_TRUNCATE64_SYSCALL]: Likewise. + * sysdeps/unix/sysv/linux/arm/vfork.S (kernel-features.h): Don't + include. + [__NR_vfork]: Make code unconditional. + [__ASSUME_VFORK_SYSCALL]: Likewise. + [!__ASSUME_VFORK_SYSCALL]: Remove conditional code. + [!__NR_vfork]: Likewise. + 2012-05-16 Joseph Myers * sysdeps/unix/sysv/linux/arm/kernel-features.h diff --git a/sysdeps/unix/sysv/linux/arm/ftruncate64.c b/sysdeps/unix/sysv/linux/arm/ftruncate64.c index ad5eb186c2..9838182c39 100644 --- a/sysdeps/unix/sysv/linux/arm/ftruncate64.c +++ b/sysdeps/unix/sysv/linux/arm/ftruncate64.c @@ -1,5 +1,4 @@ -/* Copyright (C) 1997,1998,1999,2000,2001,2003, 2005 - Free Software Foundation, Inc. +/* Copyright (C) 1997-2012 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 @@ -24,53 +23,14 @@ #include #include -#include "kernel-features.h" - -#ifdef __NR_ftruncate64 -#ifndef __ASSUME_TRUNCATE64_SYSCALL -/* The variable is shared between all wrappers around *truncate64 calls. */ -extern int __have_no_truncate64; -#endif - - /* Truncate the file FD refers to to LENGTH bytes. */ int __ftruncate64 (int fd, off64_t length) { -#ifndef __ASSUME_TRUNCATE64_SYSCALL - if (! __have_no_truncate64) -#endif - { - unsigned int low = length & 0xffffffff; - unsigned int high = length >> 32; -#ifndef __ASSUME_TRUNCATE64_SYSCALL - int saved_errno = errno; -#endif - int result = INLINE_SYSCALL (ftruncate64, 4, fd, 0, - __LONG_LONG_PAIR (high, low)); -#ifndef __ASSUME_TRUNCATE64_SYSCALL - if (result != -1 || errno != ENOSYS) -#endif - return result; - -#ifndef __ASSUME_TRUNCATE64_SYSCALL - __set_errno (saved_errno); - __have_no_truncate64 = 1; -#endif - } - -#ifndef __ASSUME_TRUNCATE64_SYSCALL - if ((off_t) length != length) - { - __set_errno (EINVAL); - return -1; - } - return __ftruncate (fd, (off_t) length); -#endif + unsigned int low = length & 0xffffffff; + unsigned int high = length >> 32; + int result = INLINE_SYSCALL (ftruncate64, 4, fd, 0, + __LONG_LONG_PAIR (high, low)); + return result; } weak_alias (__ftruncate64, ftruncate64) - -#else -/* Use the generic implementation. */ -# include -#endif diff --git a/sysdeps/unix/sysv/linux/arm/mmap.S b/sysdeps/unix/sysv/linux/arm/mmap.S index 62bf8ee1f8..3276a3b475 100644 --- a/sysdeps/unix/sysv/linux/arm/mmap.S +++ b/sysdeps/unix/sysv/linux/arm/mmap.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2000, 2003, 2005, 2009 Free Software Foundation, Inc. +/* Copyright (C) 1998-2012 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 @@ -16,20 +16,12 @@ . */ #include -#include #define EINVAL 22 .text ENTRY (__mmap) -# ifdef __ASSUME_MMAP2_SYSCALL - /* This code is actually a couple of cycles slower than the - sys_mmap version below, so it might seem like a loss. But the - code path inside the kernel is sufficiently much shorter to - make it a net gain to use mmap2 when it's known to be - available. */ - /* shuffle args */ str r5, [sp, #-4]! cfi_adjust_cfa_offset (4) @@ -66,38 +58,6 @@ ENTRY (__mmap) .Linval: mov r0, #-EINVAL b 2b -# else - /* Because we can only get five args through the syscall interface, and - mmap() takes six, we need to build a parameter block and pass its - address instead. The 386 port does a similar trick. */ - - /* This code previously moved sp into ip and stored the args using - stmdb ip!, {a1-a4}. It did not modify sp, so the stack never had - to be restored after the syscall completed. It saved an - instruction and meant no stack cleanup work was required. - - This will not work in the case of a mmap call being interrupted - by a signal. If the signal handler uses any stack the arguments - to mmap will be trashed. The results of a restart of mmap are - then unpredictable. */ - - /* store args on the stack */ - stmdb sp!, {a1-a4} - cfi_adjust_cfa_offset (16) - - /* do the syscall */ - mov a1, sp - DO_CALL (mmap, 0) - - /* pop args off the stack. */ - add sp, sp, #16 - cfi_adjust_cfa_offset (-16) - - cmn r0, $4096 - RETINSTR(cc, lr) - b PLTJMP(syscall_error); -#endif - PSEUDO_END (__mmap) weak_alias (__mmap, mmap) diff --git a/sysdeps/unix/sysv/linux/arm/posix_fadvise64.c b/sysdeps/unix/sysv/linux/arm/posix_fadvise64.c index 174c3bb290..75b06abf2e 100644 --- a/sysdeps/unix/sysv/linux/arm/posix_fadvise64.c +++ b/sysdeps/unix/sysv/linux/arm/posix_fadvise64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2003-2012 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 @@ -18,7 +18,6 @@ #include #include #include -#include int __posix_fadvise64_l64 (int fd, off64_t offset, off64_t len, int advise); int __posix_fadvise64_l32 (int fd, off64_t offset, size_t len, int advise); @@ -29,34 +28,13 @@ int __posix_fadvise64_l32 (int fd, off64_t offset, size_t len, int advise); int __posix_fadvise64_l64 (int fd, off64_t offset, off64_t len, int advise) { -#ifdef __NR_arm_fadvise64_64 INTERNAL_SYSCALL_DECL (err); int ret = INTERNAL_SYSCALL (arm_fadvise64_64, err, 6, fd, advise, __LONG_LONG_PAIR ((long)(offset >> 32), (long)offset), __LONG_LONG_PAIR ((long)(len >> 32), (long)len)); if (!INTERNAL_SYSCALL_ERROR_P (ret, err)) return 0; -# ifndef __ASSUME_FADVISE64_64_SYSCALL - if (INTERNAL_SYSCALL_ERRNO (ret, err) != ENOSYS) -# endif - return INTERNAL_SYSCALL_ERRNO (ret, err); -#endif -#ifndef __ASSUME_FADVISE64_64_SYSCALL -# ifdef __NR_fadvise64 - if (len != (off_t) len) - return EOVERFLOW; - - INTERNAL_SYSCALL_DECL (err2); - int ret2 = INTERNAL_SYSCALL (fadvise64, err2, 6, fd, 0, - __LONG_LONG_PAIR ((long)(offset >> 32), (long)offset), - (off_t) len, advise); - if (!INTERNAL_SYSCALL_ERROR_P (ret2, err2)) - return 0; - return INTERNAL_SYSCALL_ERRNO (ret2, err2); -# else - return ENOSYS; -# endif -#endif + return INTERNAL_SYSCALL_ERRNO (ret, err); } #include diff --git a/sysdeps/unix/sysv/linux/arm/truncate64.c b/sysdeps/unix/sysv/linux/arm/truncate64.c index 409bf19333..3fad93f50e 100644 --- a/sysdeps/unix/sysv/linux/arm/truncate64.c +++ b/sysdeps/unix/sysv/linux/arm/truncate64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2000, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1997-2012 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 @@ -24,51 +24,13 @@ #include #include -#include "kernel-features.h" - -#ifdef __NR_truncate64 -#ifndef __ASSUME_TRUNCATE64_SYSCALL -/* The variable is shared between all wrappers around *truncate64 calls. */ -int __have_no_truncate64; -#endif - /* Truncate the file FD refers to to LENGTH bytes. */ int truncate64 (const char *path, off64_t length) { -#ifndef __ASSUME_TRUNCATE64_SYSCALL - if (! __have_no_truncate64) -#endif - { - unsigned int low = length & 0xffffffff; - unsigned int high = length >> 32; -#ifndef __ASSUME_TRUNCATE64_SYSCALL - int saved_errno = errno; -#endif - int result = INLINE_SYSCALL (truncate64, 4, CHECK_STRING (path), 0, - __LONG_LONG_PAIR (high, low)); -#ifndef __ASSUME_TRUNCATE64_SYSCALL - if (result != -1 || errno != ENOSYS) -#endif - return result; - -#ifndef __ASSUME_TRUNCATE64_SYSCALL - __set_errno (saved_errno); - __have_no_truncate64 = 1; -#endif - } - -#ifndef __ASSUME_TRUNCATE64_SYSCALL - if ((off_t) length != length) - { - __set_errno (EINVAL); - return -1; - } - return __truncate (path, (off_t) length); -#endif + unsigned int low = length & 0xffffffff; + unsigned int high = length >> 32; + int result = INLINE_SYSCALL (truncate64, 4, CHECK_STRING (path), 0, + __LONG_LONG_PAIR (high, low)); + return result; } - -#else -/* Use the generic implementation. */ -# include -#endif diff --git a/sysdeps/unix/sysv/linux/arm/vfork.S b/sysdeps/unix/sysv/linux/arm/vfork.S index 99c366d2b2..abd46c1c3b 100644 --- a/sysdeps/unix/sysv/linux/arm/vfork.S +++ b/sysdeps/unix/sysv/linux/arm/vfork.S @@ -19,7 +19,6 @@ #include #define _ERRNO_H 1 #include -#include /* Clone the calling process, but without copying the whole address space. The calling process is suspended until the new process exits or is @@ -27,8 +26,6 @@ and the process ID of the new process to the old process. */ ENTRY (__vfork) - -#ifdef __NR_vfork #ifdef SAVE_PID SAVE_PID #endif @@ -56,25 +53,7 @@ ENTRY (__vfork) cmn a1, #4096 RETINSTR(cc, lr) -# ifdef __ASSUME_VFORK_SYSCALL b PLTJMP(SYSCALL_ERROR) -# else - /* Check if vfork syscall is known at all. */ - cmn a1, #ENOSYS - bne PLTJMP(SYSCALL_ERROR) -# endif -#endif - -#ifndef __ASSUME_VFORK_SYSCALL - /* If we don't have vfork, fork is close enough. */ - DO_CALL (fork, 0) - cmn a1, #4096 - RETINSTR(cc, lr) - b PLTJMP(SYSCALL_ERROR) -#elif !defined __NR_vfork -# error "__NR_vfork not available and __ASSUME_VFORK_SYSCALL defined" -#endif - PSEUDO_END (__vfork) libc_hidden_def (__vfork) From dc2a97c6eda5fd6ed87b15f7eda3c923260cdee1 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sat, 19 May 2012 19:10:13 +0000 Subject: [PATCH 4391/4487] Clean up MIPS ftruncate64/truncate64. --- ChangeLog.mips | 25 +++++++ sysdeps/unix/sysv/linux/mips/ftruncate64.c | 75 ------------------- .../unix/sysv/linux/mips/mips32/ftruncate64.c | 36 +++++++++ .../unix/sysv/linux/mips/mips32/truncate64.c | 36 +++++++++ .../linux/mips/mips64/{n32 => }/ftruncate64.c | 0 .../sysv/linux/mips/mips64/n32/syscalls.list | 2 - .../unix/sysv/linux/mips/mips64/syscalls.list | 3 + .../linux/mips/mips64/{n32 => }/truncate64.c | 0 sysdeps/unix/sysv/linux/mips/truncate64.c | 75 ------------------- 9 files changed, 100 insertions(+), 152 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/mips/ftruncate64.c create mode 100644 sysdeps/unix/sysv/linux/mips/mips32/ftruncate64.c create mode 100644 sysdeps/unix/sysv/linux/mips/mips32/truncate64.c rename sysdeps/unix/sysv/linux/mips/mips64/{n32 => }/ftruncate64.c (100%) rename sysdeps/unix/sysv/linux/mips/mips64/{n32 => }/truncate64.c (100%) delete mode 100644 sysdeps/unix/sysv/linux/mips/truncate64.c diff --git a/ChangeLog.mips b/ChangeLog.mips index db16b4bc41..b5fdbda7e4 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,28 @@ +2012-05-19 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/ftruncate64.c: Move to ... + * sysdeps/unix/sysv/linux/mips/mips32/ftruncate64.c: ... here. + (kernel-features.h): Don't include. + [__NR_ftruncate64]: Make code unconditional. + [!__NR_ftruncate64]: Remove conditional code. + [!__ASSUME_TRUNCATE64_SYSCALL]: Likewise. + * sysdeps/unix/sysv/linux/mips/truncate64.c: Move to ... + * sysdeps/unix/sysv/linux/mips/mips32/truncate64.c: ... here. + (kernel-features.h): Don't include. + [__NR_truncate64]: Make code unconditional. + [!__NR_truncate64]: Remove conditional code. + [!__ASSUME_TRUNCATE64_SYSCALL]: Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/syscalls.list (ftruncate): + Add syscall. + (truncate): Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list + (ftruncate): Remove syscall. + (truncate): Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/n32/ftruncate64.c: Move to ... + * sysdeps/unix/sysv/linux/mips/mips64/ftruncate64.c: ... here. + * sysdeps/unix/sysv/linux/mips/mips64/n32/truncate64.c: Move to ... + * sysdeps/unix/sysv/linux/mips/mips64/truncate64.c: ... here. + 2012-05-16 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/stat.h (struct stat) diff --git a/sysdeps/unix/sysv/linux/mips/ftruncate64.c b/sysdeps/unix/sysv/linux/mips/ftruncate64.c deleted file mode 100644 index 982650c87f..0000000000 --- a/sysdeps/unix/sysv/linux/mips/ftruncate64.c +++ /dev/null @@ -1,75 +0,0 @@ -/* Copyright (C) 1997,1998,1999,2000,2001,2002,2003,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 - 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, see - . */ - -#include -#include -#include -#include - -#include -#include - -#include - -#ifdef __NR_ftruncate64 -#ifndef __ASSUME_TRUNCATE64_SYSCALL -/* The variable is shared between all wrappers around *truncate64 calls. */ -extern int __have_no_truncate64; -#endif - -/* Truncate the file FD refers to to LENGTH bytes. */ -int -__ftruncate64 (int fd, off64_t length) -{ -#ifndef __ASSUME_TRUNCATE64_SYSCALL - if (! __have_no_truncate64) -#endif - { - unsigned int low = length & 0xffffffff; - unsigned int high = length >> 32; -#ifndef __ASSUME_TRUNCATE64_SYSCALL - int saved_errno = errno; -#endif - int result = INLINE_SYSCALL (ftruncate64, 4, fd, 0, - __LONG_LONG_PAIR (high, low)); -#ifndef __ASSUME_TRUNCATE64_SYSCALL - if (result != -1 || errno != ENOSYS) -#endif - return result; - -#ifndef __ASSUME_TRUNCATE64_SYSCALL - __set_errno (saved_errno); - __have_no_truncate64 = 1; -#endif - } - -#ifndef __ASSUME_TRUNCATE64_SYSCALL - if ((off_t) length != length) - { - __set_errno (EINVAL); - return -1; - } - return __ftruncate (fd, (off_t) length); -#endif -} -weak_alias (__ftruncate64, ftruncate64) - -#else -/* Use the generic implementation. */ -# include -#endif diff --git a/sysdeps/unix/sysv/linux/mips/mips32/ftruncate64.c b/sysdeps/unix/sysv/linux/mips/mips32/ftruncate64.c new file mode 100644 index 0000000000..9838182c39 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips32/ftruncate64.c @@ -0,0 +1,36 @@ +/* Copyright (C) 1997-2012 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, see + . */ + +#include +#include +#include +#include + +#include +#include + +/* Truncate the file FD refers to to LENGTH bytes. */ +int +__ftruncate64 (int fd, off64_t length) +{ + unsigned int low = length & 0xffffffff; + unsigned int high = length >> 32; + int result = INLINE_SYSCALL (ftruncate64, 4, fd, 0, + __LONG_LONG_PAIR (high, low)); + return result; +} +weak_alias (__ftruncate64, ftruncate64) diff --git a/sysdeps/unix/sysv/linux/mips/mips32/truncate64.c b/sysdeps/unix/sysv/linux/mips/mips32/truncate64.c new file mode 100644 index 0000000000..3fad93f50e --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips32/truncate64.c @@ -0,0 +1,36 @@ +/* Copyright (C) 1997-2012 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, see + . */ + +#include +#include +#include +#include + +#include +#include +#include + +/* Truncate the file FD refers to to LENGTH bytes. */ +int +truncate64 (const char *path, off64_t length) +{ + unsigned int low = length & 0xffffffff; + unsigned int high = length >> 32; + int result = INLINE_SYSCALL (truncate64, 4, CHECK_STRING (path), 0, + __LONG_LONG_PAIR (high, low)); + return result; +} diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/ftruncate64.c b/sysdeps/unix/sysv/linux/mips/mips64/ftruncate64.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n32/ftruncate64.c rename to sysdeps/unix/sysv/linux/mips/mips64/ftruncate64.c diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list b/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list index 0d37a9b48d..7ad55231f6 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list @@ -2,8 +2,6 @@ readahead - readahead i:iii __readahead readahead sync_file_range - sync_file_range Ci:iiii sync_file_range -ftruncate - ftruncate i:ii __ftruncate ftruncate ftruncate64 __ftruncate64 -truncate - truncate i:si truncate truncate64 prlimit64 EXTRA prlimit64 i:iipp prlimit64 diff --git a/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list b/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list index cac273cc90..867323a96b 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list @@ -2,6 +2,9 @@ lseek - lseek Ci:iii __libc_lseek __lseek lseek __llseek llseek __libc_lseek64 __lseek64 lseek64 +ftruncate - ftruncate i:ii __ftruncate ftruncate ftruncate64 __ftruncate64 +truncate - truncate i:si truncate truncate64 + # Semaphore and shm system calls. msgctl, shmctl, and semctl have C # wrappers (to set __IPC_64). msgget - msgget i:ii __msgget msgget diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/truncate64.c b/sysdeps/unix/sysv/linux/mips/mips64/truncate64.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n32/truncate64.c rename to sysdeps/unix/sysv/linux/mips/mips64/truncate64.c diff --git a/sysdeps/unix/sysv/linux/mips/truncate64.c b/sysdeps/unix/sysv/linux/mips/truncate64.c deleted file mode 100644 index 7c11b63f59..0000000000 --- a/sysdeps/unix/sysv/linux/mips/truncate64.c +++ /dev/null @@ -1,75 +0,0 @@ -/* Copyright (C) 1997,1998,1999,2000,2002,2003,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 - 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, see - . */ - -#include -#include -#include -#include - -#include -#include -#include - -#include - -#ifdef __NR_truncate64 -#ifndef __ASSUME_TRUNCATE64_SYSCALL -/* The variable is shared between all wrappers around *truncate64 calls. */ -int __have_no_truncate64; -#endif - -/* Truncate the file FD refers to to LENGTH bytes. */ -int -truncate64 (const char *path, off64_t length) -{ -#ifndef __ASSUME_TRUNCATE64_SYSCALL - if (! __have_no_truncate64) -#endif - { - unsigned int low = length & 0xffffffff; - unsigned int high = length >> 32; -#ifndef __ASSUME_TRUNCATE64_SYSCALL - int saved_errno = errno; -#endif - int result = INLINE_SYSCALL (truncate64, 4, CHECK_STRING (path), 0, - __LONG_LONG_PAIR (high, low)); -#ifndef __ASSUME_TRUNCATE64_SYSCALL - if (result != -1 || errno != ENOSYS) -#endif - return result; - -#ifndef __ASSUME_TRUNCATE64_SYSCALL - __set_errno (saved_errno); - __have_no_truncate64 = 1; -#endif - } - -#ifndef __ASSUME_TRUNCATE64_SYSCALL - if ((off_t) length != length) - { - __set_errno (EINVAL); - return -1; - } - return truncate (path, (off_t) length); -#endif -} - -#else -/* Use the generic implementation. */ -# include -#endif From d8d270711da37c3d8cb9724a5b6a466d11c8529f Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sat, 19 May 2012 21:24:17 +0000 Subject: [PATCH 4392/4487] Remove more obsolete ARM code. --- ChangeLog.arm | 18 ++++++++ sysdeps/arm/bits/endian.h | 9 ---- sysdeps/arm/bits/huge_val.h | 54 ----------------------- sysdeps/arm/bits/string.h | 30 ------------- sysdeps/unix/sysv/linux/arm/readahead.c | 15 +------ sysdeps/unix/sysv/linux/arm/sigaction.c | 5 --- sysdeps/unix/sysv/linux/arm/sigrestorer.S | 6 +-- sysdeps/unix/sysv/linux/arm/sysdep.h | 11 ----- 8 files changed, 20 insertions(+), 128 deletions(-) delete mode 100644 sysdeps/arm/bits/huge_val.h delete mode 100644 sysdeps/arm/bits/string.h diff --git a/ChangeLog.arm b/ChangeLog.arm index bfb87aa2e0..a12823ba7c 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,5 +1,23 @@ 2012-05-19 Joseph Myers + * sysdeps/arm/bits/endian.h (__FLOAT_WORD_ORDER): Remove + definitions. + * sysdeps/arm/bits/huge_val.h: Remove file. + * sysdeps/arm/bits/string.h: Remove file. + * sysdeps/unix/sysv/linux/arm/readahead.c [__NR_readahead]: Make + code unconditional. + [!__NR_readahead]: Remove conditional code. + * sysdeps/unix/sysv/linux/arm/sigaction.c [__NR_rt_sigreturn]: + Make code unconditional. + [!__NR_rt_sigreturn]: Remove conditional code. + * sysdeps/unix/sysv/linux/arm/sigrestorer.S [__NR_rt_sigreturn]: + Make code unconditional. + * sysdeps/unix/sysv/linux/arm/sysdep.h [__NR_SYSCALL_BASE != 0]: + Remove conditional #error. + (__NR_stime): Remove #undef. + (__NR_alarm): Likewise. + (SWI_BASE): Remove. + * sysdeps/unix/sysv/linux/arm/ftruncate64.c (kernel-features.h): Don't include. [__NR_ftruncate64]: Make code unconditional. diff --git a/sysdeps/arm/bits/endian.h b/sysdeps/arm/bits/endian.h index dc909c33e0..f49f6ab1c9 100644 --- a/sysdeps/arm/bits/endian.h +++ b/sysdeps/arm/bits/endian.h @@ -8,12 +8,3 @@ #else #define __BYTE_ORDER __LITTLE_ENDIAN #endif - -/* FPA floating point units are always big-endian, irrespective of the - CPU endianness. VFP floating point units use the same endianness - as the rest of the system. */ -#ifdef __VFP_FP__ -#define __FLOAT_WORD_ORDER __BYTE_ORDER -#else -#define __FLOAT_WORD_ORDER __BIG_ENDIAN -#endif diff --git a/sysdeps/arm/bits/huge_val.h b/sysdeps/arm/bits/huge_val.h deleted file mode 100644 index 6008b1008b..0000000000 --- a/sysdeps/arm/bits/huge_val.h +++ /dev/null @@ -1,54 +0,0 @@ -/* `HUGE_VAL' constant for IEEE 754 machines (where it is infinity). - Used by and functions for overflow. - Copyright (C) 1992, 1995, 1996, 1997, 1999, 2000, 2004 - 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, see - . */ - -#ifndef _MATH_H -# error "Never use directly; include instead." -#endif - -/* IEEE positive infinity (-HUGE_VAL is negative infinity). */ - -#if __GNUC_PREREQ(3,3) -# define HUGE_VAL (__builtin_huge_val()) -#elif __GNUC_PREREQ(2,96) -# define HUGE_VAL (__extension__ 0x1.0p2047) -#elif defined __GNUC__ - -# define HUGE_VAL \ - (__extension__ \ - ((union { unsigned __l __attribute__((__mode__(__DI__))); double __d; }) \ - { __l: 0x7ff0000000000000ULL }).__d) - -#else /* not GCC */ - -# include - -typedef union { unsigned char __c[8]; double __d; } __huge_val_t; - -# if __BYTE_ORDER == __BIG_ENDIAN -# define __HUGE_VAL_bytes { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 } -# endif -# if __BYTE_ORDER == __LITTLE_ENDIAN -# define __HUGE_VAL_bytes { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f } -# endif - -static __huge_val_t __huge_val = { __HUGE_VAL_bytes }; -# define HUGE_VAL (__huge_val.__d) - -#endif /* GCC. */ diff --git a/sysdeps/arm/bits/string.h b/sysdeps/arm/bits/string.h deleted file mode 100644 index 21b5f44299..0000000000 --- a/sysdeps/arm/bits/string.h +++ /dev/null @@ -1,30 +0,0 @@ -/* Optimized, inlined string functions. ARM version. - Copyright (C) 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 - 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, see - . */ - -#ifndef _STRING_H -# error "Never use directly; include instead." -#endif - -/* We must defeat the generic optimized versions of these functions in - since they don't work on the ARM. This is because - the games they play with the __STRING2_COPY_ARR# structures fail - when structs are always 32-bit aligned. - XXX Should provide suitably optimal replacements. */ -#define _HAVE_STRING_ARCH_strcpy 1 -#define _HAVE_STRING_ARCH_stpcpy 1 -#define _HAVE_STRING_ARCH_mempcpy 1 diff --git a/sysdeps/unix/sysv/linux/arm/readahead.c b/sysdeps/unix/sysv/linux/arm/readahead.c index 2d15b09c4a..647a3d7aff 100644 --- a/sysdeps/unix/sysv/linux/arm/readahead.c +++ b/sysdeps/unix/sysv/linux/arm/readahead.c @@ -1,5 +1,5 @@ /* Provide kernel hint to read ahead. - Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2002-2012 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,8 +25,6 @@ #include -#ifdef __NR_readahead - ssize_t __readahead (int fd, off64_t offset, size_t count) { @@ -35,16 +33,5 @@ __readahead (int fd, off64_t offset, size_t count) (off_t) (offset & 0xffffffff)), count); } -#else -ssize_t -__readahead (int fd, off64_t offset, size_t count) -{ - __set_errno (ENOSYS); - return -1; -} -stub_warning (readahead) - -# include -#endif weak_alias (__readahead, readahead) diff --git a/sysdeps/unix/sysv/linux/arm/sigaction.c b/sysdeps/unix/sysv/linux/arm/sigaction.c index 76037cb468..fe036c1bdc 100644 --- a/sysdeps/unix/sysv/linux/arm/sigaction.c +++ b/sysdeps/unix/sysv/linux/arm/sigaction.c @@ -48,14 +48,9 @@ extern void __default_rt_sa_restorer_v2(void); #endif /* When RT signals are in use we need to use a different return stub. */ -#ifdef __NR_rt_sigreturn #define choose_restorer(flags) \ (flags & SA_SIGINFO) ? __default_rt_sa_restorer \ : __default_sa_restorer -#else -#define choose_restorer(flags) \ - __default_sa_restorer -#endif /* If ACT is not NULL, change the action for SIG to *ACT. If OACT is not NULL, put the old action for SIG in *OACT. */ diff --git a/sysdeps/unix/sysv/linux/arm/sigrestorer.S b/sysdeps/unix/sysv/linux/arm/sigrestorer.S index b8ae839f5d..63d83b8a65 100644 --- a/sysdeps/unix/sysv/linux/arm/sigrestorer.S +++ b/sysdeps/unix/sysv/linux/arm/sigrestorer.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2005, 2009, 2010 Free Software Foundation, Inc. +/* Copyright (C) 1999-2012 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 @@ -88,8 +88,6 @@ ENTRY(__default_sa_restorer_v2) END(__default_sa_restorer_v2) #undef OFFSET -#ifdef __NR_rt_sigreturn - #ifndef __ASSUME_SIGFRAME_V2 #define OFFSET 168 .fnstart @@ -117,5 +115,3 @@ ENTRY(__default_rt_sa_restorer_v2) .fnend END(__default_rt_sa_restorer_v2) #undef OFFSET - -#endif /* __NR_rt_sigreturn */ diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index be67c211d7..ef83ec2488 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -28,16 +28,6 @@ #include -#if __NR_SYSCALL_BASE != 0 -# error Kernel headers are too old -#endif - -/* Don't use stime, even if the kernel headers define it. We have - settimeofday, and some EABI kernels have removed stime. Similarly - use setitimer to implement alarm. */ -#undef __NR_stime -#undef __NR_alarm - /* In order to get __set_errno() definition in INLINE_SYSCALL. */ #ifndef __ASSEMBLER__ #include @@ -48,7 +38,6 @@ of the kernel. But these symbols do not follow the SYS_* syntax so we have to redefine the `SYS_ify' macro here. */ #undef SYS_ify -#define SWI_BASE (0x900000) #define SYS_ify(syscall_name) (__NR_##syscall_name) From 4645e9784675a4f37221971d4c9c22f39d507230 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sun, 20 May 2012 10:45:51 -0700 Subject: [PATCH 4393/4487] alpha: Rename *.s to *.S --- ChangeLog.alpha | 17 +++++++++++++++++ sysdeps/alpha/{add_n.s => add_n.S} | 0 sysdeps/alpha/{addmul_1.s => addmul_1.S} | 0 sysdeps/alpha/alphaev5/{add_n.s => add_n.S} | 0 sysdeps/alpha/alphaev5/{lshift.s => lshift.S} | 0 sysdeps/alpha/alphaev5/{rshift.s => rshift.S} | 0 sysdeps/alpha/alphaev5/{sub_n.s => sub_n.S} | 0 .../alpha/alphaev6/{addmul_1.s => addmul_1.S} | 0 sysdeps/alpha/{lshift.s => lshift.S} | 0 sysdeps/alpha/{mul_1.s => mul_1.S} | 0 sysdeps/alpha/{rshift.s => rshift.S} | 0 sysdeps/alpha/{sub_n.s => sub_n.S} | 0 sysdeps/alpha/{submul_1.s => submul_1.S} | 0 13 files changed, 17 insertions(+) rename sysdeps/alpha/{add_n.s => add_n.S} (100%) rename sysdeps/alpha/{addmul_1.s => addmul_1.S} (100%) rename sysdeps/alpha/alphaev5/{add_n.s => add_n.S} (100%) rename sysdeps/alpha/alphaev5/{lshift.s => lshift.S} (100%) rename sysdeps/alpha/alphaev5/{rshift.s => rshift.S} (100%) rename sysdeps/alpha/alphaev5/{sub_n.s => sub_n.S} (100%) rename sysdeps/alpha/alphaev6/{addmul_1.s => addmul_1.S} (100%) rename sysdeps/alpha/{lshift.s => lshift.S} (100%) rename sysdeps/alpha/{mul_1.s => mul_1.S} (100%) rename sysdeps/alpha/{rshift.s => rshift.S} (100%) rename sysdeps/alpha/{sub_n.s => sub_n.S} (100%) rename sysdeps/alpha/{submul_1.s => submul_1.S} (100%) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index cf036d1ba3..dee153d617 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,5 +1,22 @@ +2012-05-20 Richard Henderson + + * sysdeps/alpha/add_n.S: Rename from add_n.s. + * sysdeps/alpha/addmul_1.S: Rename from addmul_1.s. + * sysdeps/alpha/alphaev5/add_n.S: Rename from add_n.s. + * sysdeps/alpha/alphaev5/lshift.S: Rename from lshift.s. + * sysdeps/alpha/alphaev5/rshift.S: Rename from rshift.s. + * sysdeps/alpha/alphaev5/sub_n.S: Rename from sub_n.s. + * sysdeps/alpha/alphaev6/addmul_1.S: Rename from addmul_1.s. + * sysdeps/alpha/lshift.S: Rename from lshift.s. + * sysdeps/alpha/mul_1.S: Rename from mul_1.s. + * sysdeps/alpha/rshift.S: Rename from rshift.s. + * sysdeps/alpha/sub_n.S: Rename from sub_n.s. + * sysdeps/alpha/submul_1.S: Rename from submul_1.s. + 2012-05-18 Richard Henderson + * data/localplt-alpha-linux-gnu.data: New file. + * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h (__FSWORD_T_TYPE, __SYSCALL_SLONG_TYPE, __SYSCALL_ULONG_TYPE): New. diff --git a/sysdeps/alpha/add_n.s b/sysdeps/alpha/add_n.S similarity index 100% rename from sysdeps/alpha/add_n.s rename to sysdeps/alpha/add_n.S diff --git a/sysdeps/alpha/addmul_1.s b/sysdeps/alpha/addmul_1.S similarity index 100% rename from sysdeps/alpha/addmul_1.s rename to sysdeps/alpha/addmul_1.S diff --git a/sysdeps/alpha/alphaev5/add_n.s b/sysdeps/alpha/alphaev5/add_n.S similarity index 100% rename from sysdeps/alpha/alphaev5/add_n.s rename to sysdeps/alpha/alphaev5/add_n.S diff --git a/sysdeps/alpha/alphaev5/lshift.s b/sysdeps/alpha/alphaev5/lshift.S similarity index 100% rename from sysdeps/alpha/alphaev5/lshift.s rename to sysdeps/alpha/alphaev5/lshift.S diff --git a/sysdeps/alpha/alphaev5/rshift.s b/sysdeps/alpha/alphaev5/rshift.S similarity index 100% rename from sysdeps/alpha/alphaev5/rshift.s rename to sysdeps/alpha/alphaev5/rshift.S diff --git a/sysdeps/alpha/alphaev5/sub_n.s b/sysdeps/alpha/alphaev5/sub_n.S similarity index 100% rename from sysdeps/alpha/alphaev5/sub_n.s rename to sysdeps/alpha/alphaev5/sub_n.S diff --git a/sysdeps/alpha/alphaev6/addmul_1.s b/sysdeps/alpha/alphaev6/addmul_1.S similarity index 100% rename from sysdeps/alpha/alphaev6/addmul_1.s rename to sysdeps/alpha/alphaev6/addmul_1.S diff --git a/sysdeps/alpha/lshift.s b/sysdeps/alpha/lshift.S similarity index 100% rename from sysdeps/alpha/lshift.s rename to sysdeps/alpha/lshift.S diff --git a/sysdeps/alpha/mul_1.s b/sysdeps/alpha/mul_1.S similarity index 100% rename from sysdeps/alpha/mul_1.s rename to sysdeps/alpha/mul_1.S diff --git a/sysdeps/alpha/rshift.s b/sysdeps/alpha/rshift.S similarity index 100% rename from sysdeps/alpha/rshift.s rename to sysdeps/alpha/rshift.S diff --git a/sysdeps/alpha/sub_n.s b/sysdeps/alpha/sub_n.S similarity index 100% rename from sysdeps/alpha/sub_n.s rename to sysdeps/alpha/sub_n.S diff --git a/sysdeps/alpha/submul_1.s b/sysdeps/alpha/submul_1.S similarity index 100% rename from sysdeps/alpha/submul_1.s rename to sysdeps/alpha/submul_1.S From 2e86403f775c55b61e728a7da99fc7d2d88ad67f Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 21 May 2012 09:51:16 +0000 Subject: [PATCH 4394/4487] Update ARM ABI baseline for getauxval. --- ChangeLog.arm | 4 ++++ sysdeps/unix/sysv/linux/arm/nptl/libc.abilist | 2 ++ 2 files changed, 6 insertions(+) diff --git a/ChangeLog.arm b/ChangeLog.arm index a12823ba7c..c87595225e 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,7 @@ +2012-05-21 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/nptl/libc.abilist: Update. + 2012-05-19 Joseph Myers * sysdeps/arm/bits/endian.h (__FLOAT_WORD_ORDER): Remove diff --git a/sysdeps/unix/sysv/linux/arm/nptl/libc.abilist b/sysdeps/unix/sysv/linux/arm/nptl/libc.abilist index 6322dcf983..1f496fb61c 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/libc.abilist +++ b/sysdeps/unix/sysv/linux/arm/nptl/libc.abilist @@ -68,11 +68,13 @@ GLIBC_2.15 scandirat64 F GLIBC_2.16 GLIBC_2.16 A + __getauxval F __poll_chk F __ppoll_chk F aligned_alloc F c16rtomb F c32rtomb F + getauxval F mbrtoc16 F mbrtoc32 F timespec_get F From 533a8b31d8e7571e8b22d761649f5237a825300f Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 21 May 2012 09:51:58 +0000 Subject: [PATCH 4395/4487] Update MIPS ABI baselines for getauxval. --- ChangeLog.mips | 6 ++++++ sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist | 2 ++ sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libc.abilist | 2 ++ sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilist | 2 ++ 4 files changed, 12 insertions(+) diff --git a/ChangeLog.mips b/ChangeLog.mips index b5fdbda7e4..070cb5798a 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,9 @@ +2012-05-21 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist: Update. + * sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libc.abilist: Update. + * sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilist: Update. + 2012-05-19 Joseph Myers * sysdeps/unix/sysv/linux/mips/ftruncate64.c: Move to ... diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist index 56e75a5f5e..c780ca60fd 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist @@ -1380,11 +1380,13 @@ GLIBC_2.15 scandirat64 F GLIBC_2.16 GLIBC_2.16 A + __getauxval F __poll_chk F __ppoll_chk F aligned_alloc F c16rtomb F c32rtomb F + getauxval F mbrtoc16 F mbrtoc32 F timespec_get F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libc.abilist index 293fb96347..6d64e1d238 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libc.abilist @@ -1380,11 +1380,13 @@ GLIBC_2.15 scandirat64 F GLIBC_2.16 GLIBC_2.16 A + __getauxval F __poll_chk F __ppoll_chk F aligned_alloc F c16rtomb F c32rtomb F + getauxval F mbrtoc16 F mbrtoc32 F timespec_get F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilist index 12c15d382c..701152eeb5 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilist @@ -1378,11 +1378,13 @@ GLIBC_2.15 scandirat64 F GLIBC_2.16 GLIBC_2.16 A + __getauxval F __poll_chk F __ppoll_chk F aligned_alloc F c16rtomb F c32rtomb F + getauxval F mbrtoc16 F mbrtoc32 F timespec_get F From fae5c74027614edfa46cc40f7569a494ba773516 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 21 May 2012 09:52:18 +0000 Subject: [PATCH 4396/4487] Update powerpc-nofpu ABI baselines for getauxval. --- ChangeLog.powerpc | 5 +++++ .../sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog.powerpc b/ChangeLog.powerpc index 1935a40920..42b71b6df7 100644 --- a/ChangeLog.powerpc +++ b/ChangeLog.powerpc @@ -1,3 +1,8 @@ +2012-05-21 Joseph Myers + + * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist: + Update. + 2012-05-16 Joseph Myers * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/ld.abilist: diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist index dc01353ec3..eb54f653a6 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist @@ -1761,11 +1761,13 @@ GLIBC_2.15 scandirat64 F GLIBC_2.16 GLIBC_2.16 A + __getauxval F __poll_chk F __ppoll_chk F aligned_alloc F c16rtomb F c32rtomb F + getauxval F mbrtoc16 F mbrtoc32 F timespec_get F From c0ddea5a1ff43f59d10a754ba89d1007e0c03bb1 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 21 May 2012 10:45:52 +0000 Subject: [PATCH 4397/4487] Update ARM hwcap code. --- ChangeLog.arm | 27 +++++++++++++++ sysdeps/unix/sysv/linux/arm/bits/hwcap.h | 42 +++++++++++++++++++++++ sysdeps/unix/sysv/linux/arm/dl-procinfo.c | 5 +-- sysdeps/unix/sysv/linux/arm/dl-procinfo.h | 4 +-- sysdeps/unix/sysv/linux/arm/sysdep.h | 19 ++-------- 5 files changed, 76 insertions(+), 21 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/arm/bits/hwcap.h diff --git a/ChangeLog.arm b/ChangeLog.arm index c87595225e..bb1bab7ee2 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,5 +1,32 @@ 2012-05-21 Joseph Myers + * sysdeps/unix/sysv/linux/arm/bits/hwcap.h: New file. Macros + taken from sysdeps/unix/sysv/linux/arm/sysdep.h. + (HWCAP_ARM_TLS): New macro. + (HWCAP_ARM_VFPv4): Likewise. + (HWCAP_ARM_IDIVA): Likewise. + (HWCAP_ARM_IDIVT): Likewise. + * sysdeps/unix/sysv/linux/arm/sysdep.h: Include . + (HWCAP_ARM_SWP): Remove macro. Moved to . + (HWCAP_ARM_HALF): Likewise. + (HWCAP_ARM_THUMB): Likewise. + (HWCAP_ARM_26BIT): Likewise. + (HWCAP_ARM_FAST_MULT): Likewise. + (HWCAP_ARM_FPA): Likewise. + (HWCAP_ARM_VFP): Likewise. + (HWCAP_ARM_EDSP): Likewise. + (HWCAP_ARM_JAVA): Likewise. + (HWCAP_ARM_IWMMXT): Likewise. + (HWCAP_ARM_CRUNCH): Likewise. + (HWCAP_ARM_THUMBEE): Likewise. + (HWCAP_ARM_NEON): Likewise. + (HWCAP_ARM_VFPv3): Likewise. + (HWCAP_ARM_VFPv3D16): Likewise. + * sysdeps/unix/sysv/linux/arm/dl-procinfo.c (_dl_arm_cap_flags): + Add "tls", "vfpv4", "idiva" and "idivt". + * sysdeps/unix/sysv/linux/arm/dl-procinfo.h (_DL_HWCAP_COUNT): + Increase to 19. + * sysdeps/unix/sysv/linux/arm/nptl/libc.abilist: Update. 2012-05-19 Joseph Myers diff --git a/sysdeps/unix/sysv/linux/arm/bits/hwcap.h b/sysdeps/unix/sysv/linux/arm/bits/hwcap.h new file mode 100644 index 0000000000..ddfed85053 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/bits/hwcap.h @@ -0,0 +1,42 @@ +/* Defines for bits in AT_HWCAP. ARM Linux version. + Copyright (C) 2012 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, see + . */ + +#ifndef _SYS_AUXV_H +# error "Never include directly; use instead." +#endif + +/* The following must match the kernel's . */ +#define HWCAP_ARM_SWP 1 +#define HWCAP_ARM_HALF 2 +#define HWCAP_ARM_THUMB 4 +#define HWCAP_ARM_26BIT 8 +#define HWCAP_ARM_FAST_MULT 16 +#define HWCAP_ARM_FPA 32 +#define HWCAP_ARM_VFP 64 +#define HWCAP_ARM_EDSP 128 +#define HWCAP_ARM_JAVA 256 +#define HWCAP_ARM_IWMMXT 512 +#define HWCAP_ARM_CRUNCH 1024 +#define HWCAP_ARM_THUMBEE 2048 +#define HWCAP_ARM_NEON 4096 +#define HWCAP_ARM_VFPv3 8192 +#define HWCAP_ARM_VFPv3D16 16384 +#define HWCAP_ARM_TLS 32768 +#define HWCAP_ARM_VFPv4 65536 +#define HWCAP_ARM_IDIVA 131072 +#define HWCAP_ARM_IDIVT 262144 diff --git a/sysdeps/unix/sysv/linux/arm/dl-procinfo.c b/sysdeps/unix/sysv/linux/arm/dl-procinfo.c index 64a444482a..227492ef90 100644 --- a/sysdeps/unix/sysv/linux/arm/dl-procinfo.c +++ b/sysdeps/unix/sysv/linux/arm/dl-procinfo.c @@ -1,5 +1,5 @@ /* Data for Linux/ARM version of processor capability information. - Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc. + Copyright (C) 2001-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Philip Blundell , 2001. @@ -46,12 +46,13 @@ #if !defined PROCINFO_DECL && defined SHARED ._dl_arm_cap_flags #else -PROCINFO_CLASS const char _dl_arm_cap_flags[15][10] +PROCINFO_CLASS const char _dl_arm_cap_flags[19][10] #endif #ifndef PROCINFO_DECL = { "swp", "half", "thumb", "26bit", "fastmult", "fpa", "vfp", "edsp", "java", "iwmmxt", "crunch", "thumbee", "neon", "vfpv3", "vfpv3d16", + "tls", "vfpv4", "idiva", "idivt", } #endif #if !defined SHARED || defined PROCINFO_DECL diff --git a/sysdeps/unix/sysv/linux/arm/dl-procinfo.h b/sysdeps/unix/sysv/linux/arm/dl-procinfo.h index 7fe6674d49..bea7100e13 100644 --- a/sysdeps/unix/sysv/linux/arm/dl-procinfo.h +++ b/sysdeps/unix/sysv/linux/arm/dl-procinfo.h @@ -1,5 +1,5 @@ /* Linux/ARM version of processor capability information handling macros. - Copyright (C) 2001, 2002, 2004, 2006 Free Software Foundation, Inc. + Copyright (C) 2001-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Philip Blundell , 2001. @@ -23,7 +23,7 @@ #include #include -#define _DL_HWCAP_COUNT 15 +#define _DL_HWCAP_COUNT 19 /* The kernel provides platform data but it is not interesting. */ #define _DL_HWCAP_PLATFORM 0 diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index ef83ec2488..30fa599e05 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -40,23 +40,8 @@ #undef SYS_ify #define SYS_ify(syscall_name) (__NR_##syscall_name) - -/* The following must match the kernel's . */ -#define HWCAP_ARM_SWP 1 -#define HWCAP_ARM_HALF 2 -#define HWCAP_ARM_THUMB 4 -#define HWCAP_ARM_26BIT 8 -#define HWCAP_ARM_FAST_MULT 16 -#define HWCAP_ARM_FPA 32 -#define HWCAP_ARM_VFP 64 -#define HWCAP_ARM_EDSP 128 -#define HWCAP_ARM_JAVA 256 -#define HWCAP_ARM_IWMMXT 512 -#define HWCAP_ARM_CRUNCH 1024 -#define HWCAP_ARM_THUMBEE 2048 -#define HWCAP_ARM_NEON 4096 -#define HWCAP_ARM_VFPv3 8192 -#define HWCAP_ARM_VFPv3D16 16384 +#define _SYS_AUXV_H 1 +#include #ifdef __ASSEMBLER__ From da5bcd28eebe5234062c4383ad983781cb0ea0f0 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 21 May 2012 18:56:03 +0000 Subject: [PATCH 4398/4487] Remove __fe_nomask_env from powerpc-nofpu ABI. --- ChangeLog.powerpc | 3 +++ .../unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libm.abilist | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog.powerpc b/ChangeLog.powerpc index 42b71b6df7..5e32abd390 100644 --- a/ChangeLog.powerpc +++ b/ChangeLog.powerpc @@ -1,5 +1,8 @@ 2012-05-21 Joseph Myers + * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libm.abilist + (__fe_nomask_env): Remove. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist: Update. diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libm.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libm.abilist index 620aff9e94..ddc8576866 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libm.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libm.abilist @@ -163,7 +163,6 @@ GLIBC_2.1 __clog10l F __fe_dfl_env D 0x8 __fe_enabled_env D 0x8 - __fe_nomask_env F __fe_nonieee_env D 0x8 __finite F __finitef F From 2eaac3387763387bbcf1a02601d65d1d8584f4ce Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 21 May 2012 17:37:13 +0200 Subject: [PATCH 4399/4487] m68k: update libc.abilist --- ChangeLog.m68k | 5 +++++ sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libc.abilist | 2 ++ sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libc.abilist | 2 ++ 3 files changed, 9 insertions(+) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 3c912da2f7..393f3978df 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2012-05-21 Andreas Schwab + + * sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libc.abilist: Update. + * sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libc.abilist: Update. + 2012-05-14 Andreas Schwab * sysdeps/unix/sysv/linux/m68k/configure.in (arch_minimum_kernel) diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libc.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libc.abilist index 8eeac7b5fc..ca31ead95f 100644 --- a/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libc.abilist +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libc.abilist @@ -69,11 +69,13 @@ GLIBC_2.15 scandirat64 F GLIBC_2.16 GLIBC_2.16 A + __getauxval F __poll_chk F __ppoll_chk F aligned_alloc F c16rtomb F c32rtomb F + getauxval F mbrtoc16 F mbrtoc32 F timespec_get F diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libc.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libc.abilist index 71bd0eb523..c2706f1e14 100644 --- a/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libc.abilist +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libc.abilist @@ -1757,11 +1757,13 @@ GLIBC_2.15 scandirat64 F GLIBC_2.16 GLIBC_2.16 A + __getauxval F __poll_chk F __ppoll_chk F aligned_alloc F c16rtomb F c32rtomb F + getauxval F mbrtoc16 F mbrtoc32 F timespec_get F From 41ddd7da3c04e8426f9b0220324a893dafacb95a Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 21 May 2012 21:18:45 +0200 Subject: [PATCH 4400/4487] m68k: properly implement logbl for Motorola extended float --- ChangeLog.m68k | 2 ++ sysdeps/m68k/m680x0/fpu/s_logbl.c | 49 +++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 sysdeps/m68k/m680x0/fpu/s_logbl.c diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 393f3978df..a6f1871200 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,5 +1,7 @@ 2012-05-21 Andreas Schwab + * sysdeps/m68k/m680x0/fpu/s_logbl.c: New file. + * sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libc.abilist: Update. * sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libc.abilist: Update. diff --git a/sysdeps/m68k/m680x0/fpu/s_logbl.c b/sysdeps/m68k/m680x0/fpu/s_logbl.c new file mode 100644 index 0000000000..2586622bf7 --- /dev/null +++ b/sysdeps/m68k/m680x0/fpu/s_logbl.c @@ -0,0 +1,49 @@ +/* s_logbl.c -- long double version of s_logb.c. + * Conversion to long double by Ulrich Drepper, + * Cygnus Support, drepper@cygnus.com. + */ + +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* + * long double logbl(x) + * IEEE 754 logb. Included to pass IEEE test suite. Not recommend. + * Use ilogb instead. + */ + +#include +#include + +long double +__logbl (long double x) +{ + int32_t es, lx, ix; + + GET_LDOUBLE_WORDS (es, ix, lx, x); + es &= 0x7fff; /* exponent */ + if ((es | ix | lx) == 0) + return -1.0 / fabsl (x); + if (es == 0x7fff) + return x * x; + if (es == 0) /* IEEE 754 logb */ + { + /* POSIX specifies that denormal number is treated as + though it were normalized. */ + if (ix == 0) + es = -(__builtin_clz (lx) + 32); + else + es = -__builtin_clz (ix); + } + return (long double) (es - 16383); +} + +weak_alias (__logbl, logbl) From df0f68a0464d25bd6826ba38309f149a87e62033 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 21 May 2012 21:23:10 +0000 Subject: [PATCH 4401/4487] Rename __WORDSIZE_COMPAT32 to __WORDSIZE_TIME64_COMPAT32 for MIPS. --- ChangeLog.mips | 3 +++ sysdeps/mips/bits/wordsize.h | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 070cb5798a..8542552131 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,5 +1,8 @@ 2012-05-21 Joseph Myers + * sysdeps/mips/bits/wordsize.h (__WORDSIZE_COMPAT32): Rename to + __WORDSIZE_TIME64_COMPAT32. + * sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist: Update. * sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libc.abilist: Update. * sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilist: Update. diff --git a/sysdeps/mips/bits/wordsize.h b/sysdeps/mips/bits/wordsize.h index c738d28e92..2b3549b9e5 100644 --- a/sysdeps/mips/bits/wordsize.h +++ b/sysdeps/mips/bits/wordsize.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2002-2012 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 @@ -17,5 +17,5 @@ #define __WORDSIZE _MIPS_SZPTR #if _MIPS_SIM == _ABI64 -# define __WORDSIZE_COMPAT32 1 +# define __WORDSIZE_TIME64_COMPAT32 1 #endif From f711d080efeab73f250d75fffdb71bd7e614e759 Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Tue, 22 May 2012 09:19:53 -0400 Subject: [PATCH 4402/4487] tile: Update ABI baselines for getauxval --- ChangeLog.tile | 8 ++++++++ .../sysv/linux/tile/tilegx/tilegx32/nptl/libc.abilist | 2 ++ .../sysv/linux/tile/tilegx/tilegx64/nptl/libc.abilist | 2 ++ sysdeps/unix/sysv/linux/tile/tilepro/nptl/libc.abilist | 2 ++ 4 files changed, 14 insertions(+) diff --git a/ChangeLog.tile b/ChangeLog.tile index 0befa86af0..008404c58a 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,3 +1,11 @@ +2012-05-22 Chris Metcalf + + * sysdeps/unix/sysv/linux/tile/tilepro/nptl/libc.abilist: Update. + * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libc.abilist: + Update. + * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libc.abilist: + Update. + 2012-05-17 Chris Metcalf * sysdeps/tile/fegetenv.c: Version fegetenv() like fesetenv(). diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libc.abilist b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libc.abilist index e2e20be0b1..eed3b4937f 100644 --- a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libc.abilist +++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libc.abilist @@ -2070,11 +2070,13 @@ GLIBC_2.15 syncfs F GLIBC_2.16 GLIBC_2.16 A + __getauxval F __poll_chk F __ppoll_chk F aligned_alloc F c16rtomb F c32rtomb F + getauxval F mbrtoc16 F mbrtoc32 F timespec_get F diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libc.abilist b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libc.abilist index 4ab0f8c1d8..2dbce23ec9 100644 --- a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libc.abilist +++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libc.abilist @@ -2070,11 +2070,13 @@ GLIBC_2.15 syncfs F GLIBC_2.16 GLIBC_2.16 A + __getauxval F __poll_chk F __ppoll_chk F aligned_alloc F c16rtomb F c32rtomb F + getauxval F mbrtoc16 F mbrtoc32 F timespec_get F diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libc.abilist b/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libc.abilist index e2e20be0b1..eed3b4937f 100644 --- a/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libc.abilist +++ b/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libc.abilist @@ -2070,11 +2070,13 @@ GLIBC_2.15 syncfs F GLIBC_2.16 GLIBC_2.16 A + __getauxval F __poll_chk F __ppoll_chk F aligned_alloc F c16rtomb F c32rtomb F + getauxval F mbrtoc16 F mbrtoc32 F timespec_get F From 7c49b18b2f47d58d6ab3b528d61926b19439175a Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Tue, 22 May 2012 09:20:35 -0400 Subject: [PATCH 4403/4487] tile: Rename __WORDSIZE_COMPAT32 to __WORDSIZE_TIME64_COMPAT32 --- ChangeLog.tile | 3 +++ sysdeps/tile/tilegx/bits/wordsize.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog.tile b/ChangeLog.tile index 008404c58a..6b6f5c0eec 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,5 +1,8 @@ 2012-05-22 Chris Metcalf + * sysdeps/tile/bits/wordsize.h (__WORDSIZE_COMPAT32): Rename to + __WORDSIZE_TIME64_COMPAT32. + * sysdeps/unix/sysv/linux/tile/tilepro/nptl/libc.abilist: Update. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libc.abilist: Update. diff --git a/sysdeps/tile/tilegx/bits/wordsize.h b/sysdeps/tile/tilegx/bits/wordsize.h index 78f34817d5..5d4e4b4470 100644 --- a/sysdeps/tile/tilegx/bits/wordsize.h +++ b/sysdeps/tile/tilegx/bits/wordsize.h @@ -2,7 +2,7 @@ #ifdef __LP64__ # define __WORDSIZE 64 -# define __WORDSIZE_COMPAT32 1 +# define __WORDSIZE_TIME64_COMPAT32 1 #else # define __WORDSIZE 32 #endif From 8dd88391bb21227f074668653ec043e0f6c207c9 Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Tue, 22 May 2012 09:54:21 -0400 Subject: [PATCH 4404/4487] tile: Update ULPs for ccos, csin, ccosh, csinh tests --- ChangeLog.tile | 2 + sysdeps/tile/libm-test-ulps | 120 ++++++++++++++++++++++++++++++++++++ 2 files changed, 122 insertions(+) diff --git a/ChangeLog.tile b/ChangeLog.tile index 6b6f5c0eec..12030be231 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,5 +1,7 @@ 2012-05-22 Chris Metcalf + * sysdeps/tile/bits/libm-test-ulps: Update. + * sysdeps/tile/bits/wordsize.h (__WORDSIZE_COMPAT32): Rename to __WORDSIZE_TIME64_COMPAT32. diff --git a/sysdeps/tile/libm-test-ulps b/sysdeps/tile/libm-test-ulps index b5e01795f6..6ce0bf0ad6 100644 --- a/sysdeps/tile/libm-test-ulps +++ b/sysdeps/tile/libm-test-ulps @@ -331,6 +331,18 @@ double: 1 idouble: 1 # ccos +Test "Imaginary part of: ccos (-0.75 + 710.5 i) == 1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ccos (-0.75 + 89.5 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: ccos (-0.75 - 710.5 i) == 1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ccos (-0.75 - 89.5 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i": float: 1 ifloat: 1 @@ -342,6 +354,21 @@ ifloat: 1 Test "Imaginary part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": float: 1 ifloat: 1 +Test "Imaginary part of: ccos (0.75 + 710.5 i) == 1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ccos (0.75 + 89.5 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: ccos (0.75 - 710.5 i) == 1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ccos (0.75 - 89.5 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: ccos (0x1p-1074 + 1440 i) == inf - 5.981479269486130556466515778180916082415e301 i plus overflow exception": +double: 1 +idouble: 1 # ccosh Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": @@ -350,6 +377,18 @@ ifloat: 1 Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": float: 1 ifloat: 1 +Test "Imaginary part of: ccosh (-710.5 + 0.75 i) == 1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ccosh (-710.5 - 0.75 i) == 1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ccosh (-89.5 + 0.75 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: ccosh (-89.5 - 0.75 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": double: 1 float: 1 @@ -358,6 +397,21 @@ ifloat: 1 Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": float: 1 ifloat: 1 +Test "Imaginary part of: ccosh (1440 + 0x1p-1074 i) == inf + 5.981479269486130556466515778180916082415e301 i plus overflow exception": +double: 1 +idouble: 1 +Test "Imaginary part of: ccosh (710.5 + 0.75 i) == 1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ccosh (710.5 - 0.75 i) == 1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ccosh (89.5 + 0.75 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: ccosh (89.5 - 0.75 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 # cexp Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": @@ -518,16 +572,72 @@ float: 2 idouble: 2 ifloat: 2 +# csin +Test "Real part of: csin (-0.75 + 710.5 i) == -1.255317763348154410745082950806112487736e308 + 1.347490911916428129246890157395342279438e308 i": +double: 1 +idouble: 1 +Test "Real part of: csin (-0.75 + 89.5 i) == -2.522786001038096774676288412995370563339e38 + 2.708024460708609732016532185663087200560e38 i": +float: 1 +ifloat: 1 +Test "Real part of: csin (-0.75 - 710.5 i) == -1.255317763348154410745082950806112487736e308 - 1.347490911916428129246890157395342279438e308 i": +double: 1 +idouble: 1 +Test "Real part of: csin (-0.75 - 89.5 i) == -2.522786001038096774676288412995370563339e38 - 2.708024460708609732016532185663087200560e38 i": +float: 1 +ifloat: 1 +Test "Real part of: csin (0.75 + 710.5 i) == 1.255317763348154410745082950806112487736e308 + 1.347490911916428129246890157395342279438e308 i": +double: 1 +idouble: 1 +Test "Real part of: csin (0.75 + 89.5 i) == 2.522786001038096774676288412995370563339e38 + 2.708024460708609732016532185663087200560e38 i": +float: 1 +ifloat: 1 +Test "Real part of: csin (0.75 - 710.5 i) == 1.255317763348154410745082950806112487736e308 - 1.347490911916428129246890157395342279438e308 i": +double: 1 +idouble: 1 +Test "Real part of: csin (0.75 - 89.5 i) == 2.522786001038096774676288412995370563339e38 - 2.708024460708609732016532185663087200560e38 i": +float: 1 +ifloat: 1 +Test "Real part of: csin (0x1p-1074 + 1440 i) == 5.981479269486130556466515778180916082415e301 + inf i plus overflow exception": +double: 1 +idouble: 1 + # csinh Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i": double: 1 idouble: 1 +Test "Imaginary part of: csinh (-710.5 + 0.75 i) == -1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: csinh (-710.5 - 0.75 i) == -1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: csinh (-89.5 + 0.75 i) == -2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: csinh (-89.5 - 0.75 i) == -2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": float: 1 ifloat: 1 Test "Imaginary part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": float: 1 ifloat: 1 +Test "Imaginary part of: csinh (1440 + 0x1p-1074 i) == inf + 5.981479269486130556466515778180916082415e301 i plus overflow exception": +double: 1 +idouble: 1 +Test "Imaginary part of: csinh (710.5 + 0.75 i) == 1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: csinh (710.5 - 0.75 i) == 1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: csinh (89.5 + 0.75 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: csinh (89.5 - 0.75 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 # csqrt Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": @@ -1131,7 +1241,9 @@ idouble: 1 ifloat: 1 Function: Imaginary part of "ccos": +double: 1 float: 1 +idouble: 1 ifloat: 1 Function: Real part of "ccosh": @@ -1141,7 +1253,9 @@ idouble: 1 ifloat: 1 Function: Imaginary part of "ccosh": +double: 1 float: 1 +idouble: 1 ifloat: 1 Function: Real part of "cexp": @@ -1196,6 +1310,12 @@ float: 2 idouble: 2 ifloat: 2 +Function: Real part of "csin": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + Function: Real part of "csinh": float: 1 ifloat: 1 From 2def71058eb4df553026d6b3e4419d30a2f82c9b Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 23 May 2012 10:22:42 +0000 Subject: [PATCH 4405/4487] Define MADV_DONTDUMP and MADV_DODUMP for ARM. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/bits/mman.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog.arm b/ChangeLog.arm index bb1bab7ee2..f6eac63fed 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2012-05-23 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/bits/mman.h (MADV_DONTDUMP): Define. + (MADV_DODUMP): Likewise. + 2012-05-21 Joseph Myers * sysdeps/unix/sysv/linux/arm/bits/hwcap.h: New file. Macros diff --git a/sysdeps/unix/sysv/linux/arm/bits/mman.h b/sysdeps/unix/sysv/linux/arm/bits/mman.h index 46c7249f75..09b9c4561f 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/mman.h +++ b/sysdeps/unix/sysv/linux/arm/bits/mman.h @@ -96,6 +96,9 @@ # define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */ # define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */ # define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */ +# define MADV_DONTDUMP 16 /* Explicity exclude from the core dump, + overrides the coredump filter bits. */ +# define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag. */ # define MADV_HWPOISON 100 /* Poison a page for testing. */ #endif From ec55b2167a48417126a0ea50840916b9ee49b5bb Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 23 May 2012 10:23:26 +0000 Subject: [PATCH 4406/4487] Define MADV_DONTDUMP and MADV_DODUMP for MIPS. --- ChangeLog.mips | 6 ++++++ sysdeps/unix/sysv/linux/mips/bits/mman.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog.mips b/ChangeLog.mips index 8542552131..493514bb99 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,9 @@ +2012-05-23 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/mman.h (MADV_DONTDUMP): + Define. + (MADV_DODUMP): Likewise. + 2012-05-21 Joseph Myers * sysdeps/mips/bits/wordsize.h (__WORDSIZE_COMPAT32): Rename to diff --git a/sysdeps/unix/sysv/linux/mips/bits/mman.h b/sysdeps/unix/sysv/linux/mips/bits/mman.h index e9c919b8cd..26b6502c4f 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/mman.h +++ b/sysdeps/unix/sysv/linux/mips/bits/mman.h @@ -98,6 +98,9 @@ # define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */ # define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */ # define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */ +# define MADV_DONTDUMP 16 /* Explicity exclude from the core dump, + overrides the coredump filter bits. */ +# define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag. */ # define MADV_HWPOISON 100 /* Poison a page for testing. */ #endif From bf144a4fae5507bda46ffa1e8a88a531a215fd79 Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Wed, 23 May 2012 08:20:12 -0400 Subject: [PATCH 4407/4487] tile: Define MADV_DONTDUMP and MADV_DODUMP --- ChangeLog.tile | 5 +++++ sysdeps/unix/sysv/linux/tile/bits/mman.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog.tile b/ChangeLog.tile index 12030be231..141d6273c7 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,3 +1,8 @@ +2012-05-23 Chris Metcalf + + * sysdeps/unix/sysv/linux/tile/bits/mman.h (MADV_DONTDUMP): Define. + (MADV_DODUMP): Likewise. + 2012-05-22 Chris Metcalf * sysdeps/tile/bits/libm-test-ulps: Update. diff --git a/sysdeps/unix/sysv/linux/tile/bits/mman.h b/sysdeps/unix/sysv/linux/tile/bits/mman.h index 87c938d367..8287823d0a 100644 --- a/sysdeps/unix/sysv/linux/tile/bits/mman.h +++ b/sysdeps/unix/sysv/linux/tile/bits/mman.h @@ -96,6 +96,9 @@ # define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */ # define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */ # define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */ +# define MADV_DONTDUMP 16 /* Explicity exclude from the core dump, + overrides the coredump filter bits. */ +# define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag. */ # define MADV_HWPOISON 100 /* Poison a page for testing. */ #endif From d44f3a3855f710a968006c95bc10e38a7b968fb2 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 23 May 2012 18:13:29 +0200 Subject: [PATCH 4408/4487] m68k: define MADV_DONTDUMP and MADV_DODUMP --- ChangeLog.m68k | 5 +++++ sysdeps/unix/sysv/linux/m68k/bits/mman.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index a6f1871200..80557cb3b7 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2012-05-23 Andreas Schwab + + * sysdeps/unix/sysv/linux/m68k/bits/mman.h (MADV_DONTDUMP) + (MADV_DODUMP): Define. + 2012-05-21 Andreas Schwab * sysdeps/m68k/m680x0/fpu/s_logbl.c: New file. diff --git a/sysdeps/unix/sysv/linux/m68k/bits/mman.h b/sysdeps/unix/sysv/linux/m68k/bits/mman.h index f361932229..2d7769e7cd 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/mman.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/mman.h @@ -96,6 +96,9 @@ # define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */ # define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */ # define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */ +# define MADV_DONTDUMP 16 /* Explicity exclude from the core dump, + overrides the coredump filter bits. */ +# define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag. */ # define MADV_HWPOISON 100 /* Poison a page for testing. */ #endif From 46bd63802a11d40bc0201091c203a28935e76aa8 Mon Sep 17 00:00:00 2001 From: Steve Ellcey Date: Wed, 23 May 2012 18:48:24 +0000 Subject: [PATCH 4409/4487] Use -D options in building MIPS syscall.h. --- ChangeLog.mips | 7 +++++++ sysdeps/unix/sysv/linux/mips/Makefile | 7 ++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 493514bb99..c341c74b4e 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,10 @@ +2012-05-23 Steve Ellcey + + * sysdeps/unix/sysv/linux/mips/Makefile + (syscall-list-o32-options): Use -D_MIPS_SIM=1. + (syscall-list-n32-options): Use -D_MIPS_SIM=2. + (syscall-list-n64-options): Use -D_MIPS_SIM=3. + 2012-05-23 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/mman.h (MADV_DONTDUMP): diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile index 41e92581a7..2aaf63c3e3 100644 --- a/sysdeps/unix/sysv/linux/mips/Makefile +++ b/sysdeps/unix/sysv/linux/mips/Makefile @@ -7,13 +7,14 @@ sysdep_routines += cachectl cacheflush sysmips _test_and_set sysdep_headers += sys/cachectl.h sys/sysmips.h sys/tas.h +# _MIPS_SIM_ABI32 == 1, _MIPS_SIM_ABIN32 == 2, _MIPS_SIM_ABI64 == 3 syscall-list-variants := o32 n32 n64 syscall-list-includes := sgidefs.h -syscall-list-o32-options := -mabi=32 +syscall-list-o32-options := -D_MIPS_SIM=1 syscall-list-o32-condition := _MIPS_SIM == _MIPS_SIM_ABI32 -syscall-list-n32-options := -mabi=n32 +syscall-list-n32-options := -D_MIPS_SIM=2 syscall-list-n32-condition := _MIPS_SIM == _MIPS_SIM_ABIN32 -syscall-list-n64-options := -mabi=64 +syscall-list-n64-options := -D_MIPS_SIM=3 syscall-list-n64-condition := _MIPS_SIM == _MIPS_SIM_ABI64 endif From df7fe5c7ef2b928efe80d27572732da497b9aa89 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 16 May 2012 00:46:38 -0400 Subject: [PATCH 4410/4487] ia64: update pthread_attr_t handling in bits/siginfo.h This matches the changes made to the common bits/siginfo.h file. Reported-by: Joseph Myers Signed-off-by: Mike Frysinger --- ChangeLog.ia64 | 5 +++++ sysdeps/unix/sysv/linux/ia64/bits/siginfo.h | 10 ++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ChangeLog.ia64 b/ChangeLog.ia64 index 3130214e47..fc0befbabd 100644 --- a/ChangeLog.ia64 +++ b/ChangeLog.ia64 @@ -1,3 +1,8 @@ +2012-05-23 Mike Frysinger + + * sysdeps/unix/sysv/linux/ia64/bits/siginfo.h: Add forward + declaration of pthread_attr_t and use it in sigevent. + 2012-05-15 Mike Frysinger * sysdeps/ia64/elf/stackguard-macros.h: Delete unused file. diff --git a/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h b/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h index 40f486209c..fbb07b5bc6 100644 --- a/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h +++ b/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h @@ -1,5 +1,5 @@ /* siginfo_t, sigevent and constants. Linux/ia64 version. - Copyright (C) 2000-2004, 2009, 2011 Free Software Foundation, Inc. + Copyright (C) 2000-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger-Tang . @@ -299,6 +299,12 @@ enum # define __SIGEV_MAX_SIZE 64 # define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4) +/* Forward declaration. */ +# ifndef __have_pthread_attr_t +typedef union pthread_attr_t pthread_attr_t; +# define __have_pthread_attr_t 1 +# endif + typedef struct sigevent { sigval_t sigev_value; @@ -316,7 +322,7 @@ typedef struct sigevent struct { void (*_function) (sigval_t); /* Function to start. */ - void *_attribute; /* Really pthread_attr_t. */ + pthread_attr_t *_attribute; /* Thread attributes. */ } _sigev_thread; } _sigev_un; } sigevent_t; From 18c2f1c0758a6ea632de323c2ffca5e04f5dc316 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Thu, 24 May 2012 08:59:42 -0700 Subject: [PATCH 4411/4487] alpha: Update bits/mman.h. --- ChangeLog.alpha | 5 +++++ sysdeps/unix/sysv/linux/alpha/bits/mman.h | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index dee153d617..f1561a6a04 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,8 @@ +2012-05-24 Richard Henderson + + * sysdeps/unix/sysv/linux/alpha/bits/mman.h (MADV_HUGEPAGE): New. + (MADV_NOHUGEPAGE, MADV_DONTDUMP, MADV_DODUMP): New. + 2012-05-20 Richard Henderson * sysdeps/alpha/add_n.S: Rename from add_n.s. diff --git a/sysdeps/unix/sysv/linux/alpha/bits/mman.h b/sysdeps/unix/sysv/linux/alpha/bits/mman.h index 6635bd44e7..419cc5cbdb 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/mman.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/mman.h @@ -102,6 +102,10 @@ # define MADV_DOFORK 11 /* Do inherit across fork. */ # define MADV_MERGEABLE 12 /* KSM may merge identical pages. */ # define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */ +# define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */ +# define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */ +# define MADV_DONTDUMP 16 /* Exclude from the core dump. */ +# define MADV_DODUMP 17 /* Clear MADV_DONTDUMP. */ # define MADV_HWPOISON 100 /* Poison a page for testing. */ #endif From f7616d449a72ca0b4028f6d7377f49c066fe6ca6 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Thu, 24 May 2012 11:45:13 -0700 Subject: [PATCH 4412/4487] alpha: Remove __ASSUME_32BITUIDS. --- ChangeLog.alpha | 4 + sysdeps/unix/sysv/linux/alpha/msgctl.c | 88 +-------------------- sysdeps/unix/sysv/linux/alpha/semctl.c | 81 +------------------- sysdeps/unix/sysv/linux/alpha/shmctl.c | 101 +------------------------ 4 files changed, 8 insertions(+), 266 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index f1561a6a04..b3511418cf 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,5 +1,9 @@ 2012-05-24 Richard Henderson + * sysdeps/unix/sysv/linux/alpha/msgctl.c: Remove __ASSUME_32BITUIDS. + * sysdeps/unix/sysv/linux/alpha/semctl.c: Likewise. + * sysdeps/unix/sysv/linux/alpha/shmctl.c: Likewise. + * sysdeps/unix/sysv/linux/alpha/bits/mman.h (MADV_HUGEPAGE): New. (MADV_NOHUGEPAGE, MADV_DONTDUMP, MADV_DODUMP): New. diff --git a/sysdeps/unix/sysv/linux/alpha/msgctl.c b/sysdeps/unix/sysv/linux/alpha/msgctl.c index d606aa0bf0..82c734b9a0 100644 --- a/sysdeps/unix/sysv/linux/alpha/msgctl.c +++ b/sysdeps/unix/sysv/linux/alpha/msgctl.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1997,1998,2000,2003,2006 Free Software Foundation, Inc. +/* Copyright (C) 1995-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , August 1995. @@ -19,101 +19,15 @@ #include #include #include - #include -#include #include #include -#include - -struct __old_msqid_ds -{ - struct __old_ipc_perm msg_perm; /* structure describing operation permission */ - struct msg *__unbounded __msg_first; /* pointer to first message on queue */ - struct msg *__unbounded __msg_last; /* pointer to last message on queue */ - __time_t msg_stime; /* time of last msgsnd command */ - __time_t msg_rtime; /* time of last msgrcv command */ - __time_t msg_ctime; /* time of last change */ - struct wait_queue *__unbounded __wwait; /* ??? */ - struct wait_queue *__unbounded __rwait; /* ??? */ - unsigned short int __msg_cbytes; /* current number of bytes on queue */ - unsigned short int msg_qnum; /* number of messages currently on queue */ - unsigned short int msg_qbytes; /* max number of bytes allowed on queue */ - __ipc_pid_t msg_lspid; /* pid of last msgsnd() */ - __ipc_pid_t msg_lrpid; /* pid of last msgrcv() */ -}; - -/* Allows to control internal state and destruction of message queue - objects. */ -int __new_msgctl (int, int, struct msqid_ds *); int __new_msgctl (int msqid, int cmd, struct msqid_ds *buf) { - /* This is a misnomer -- Alpha had 32-bit uids at the beginning - of time. However, msg_qnum and msg_qbytes changed size at - the same time the size of uid changed elsewhere. */ -#if __ASSUME_32BITUIDS > 0 return INLINE_SYSCALL (msgctl, 3, msqid, cmd | __IPC_64, CHECK_1 (buf)); -#else - switch (cmd) { - case MSG_STAT: - case IPC_STAT: - case IPC_SET: - break; - default: - return INLINE_SYSCALL (msgctl, 3, msqid, cmd, CHECK_1 (buf)); - } - - { - int save_errno = errno, result; - struct __old_msqid_ds old; - - /* Unfortunately there is no way how to find out for sure whether - we should use old or new msgctl. */ - result = INLINE_SYSCALL (msgctl, 3, msqid, cmd | __IPC_64, CHECK_1 (buf)); - if (result != -1 || errno != EINVAL) - return result; - - __set_errno(save_errno); - if (cmd == IPC_SET) - { - old.msg_perm.uid = buf->msg_perm.uid; - old.msg_perm.gid = buf->msg_perm.gid; - old.msg_perm.mode = buf->msg_perm.mode; - old.msg_qbytes = buf->msg_qbytes; - if (old.msg_perm.uid != buf->msg_perm.uid || - old.msg_perm.gid != buf->msg_perm.gid || - old.msg_qbytes != buf->msg_qbytes) - { - __set_errno (EINVAL); - return -1; - } - } - result = INLINE_SYSCALL (msgctl, 3, msqid, cmd, __ptrvalue (&old)); - if (result != -1 && cmd != IPC_SET) - { - memset(buf, 0, sizeof(*buf)); - buf->msg_perm.__key = old.msg_perm.__key; - buf->msg_perm.uid = old.msg_perm.uid; - buf->msg_perm.gid = old.msg_perm.gid; - buf->msg_perm.cuid = old.msg_perm.cuid; - buf->msg_perm.cgid = old.msg_perm.cgid; - buf->msg_perm.mode = old.msg_perm.mode; - buf->msg_perm.__seq = old.msg_perm.__seq; - buf->msg_stime = old.msg_stime; - buf->msg_rtime = old.msg_rtime; - buf->msg_ctime = old.msg_ctime; - buf->__msg_cbytes = old.__msg_cbytes; - buf->msg_qnum = old.msg_qnum; - buf->msg_qbytes = old.msg_qbytes; - buf->msg_lspid = old.msg_lspid; - buf->msg_lrpid = old.msg_lrpid; - } - return result; - } -#endif } #include diff --git a/sysdeps/unix/sysv/linux/alpha/semctl.c b/sysdeps/unix/sysv/linux/alpha/semctl.c index d783c5b419..0e59ee27af 100644 --- a/sysdeps/unix/sysv/linux/alpha/semctl.c +++ b/sysdeps/unix/sysv/linux/alpha/semctl.c @@ -1,5 +1,4 @@ -/* Copyright (C) 1995,1997,1998,2000,2003,2006 - Free Software Foundation, Inc. +/* Copyright (C) 1995-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , August 1995. @@ -21,24 +20,9 @@ #include #include #include - #include -#include #include -#include - -struct __old_semid_ds -{ - struct __old_ipc_perm sem_perm; /* operation permission struct */ - __time_t sem_otime; /* last semop() time */ - __time_t sem_ctime; /* last time changed by semctl() */ - struct sem *__sembase; /* ptr to first semaphore in array */ - struct sem_queue *__sem_pending; /* pending operations */ - struct sem_queue *__sem_pending_last; /* last pending operation */ - struct sem_undo *__undo; /* ondo requests on this array */ - unsigned short int sem_nsems; /* number of semaphores in set */ -}; /* Define a `union semun' suitable for Linux here. */ union semun @@ -50,11 +34,8 @@ union semun }; #include -#include /* definition of CHECK_SEMCTL needs union semum */ +#include -/* Return identifier for array of NSEMS semaphores associated with - KEY. */ -int __new_semctl (int semid, int semnum, int cmd, ...); int __new_semctl (int semid, int semnum, int cmd, ...) @@ -69,66 +50,8 @@ __new_semctl (int semid, int semnum, int cmd, ...) va_end (ap); -#if __ASSUME_32BITUIDS > 0 return INLINE_SYSCALL (semctl, 4, semid, semnum, cmd | __IPC_64, CHECK_SEMCTL (&arg, semid, cmd | __IPC_64)->array); -#else - switch (cmd) { - case SEM_STAT: - case IPC_STAT: - case IPC_SET: - break; - default: - return INLINE_SYSCALL (semctl, 4, semid, semnum, cmd, - CHECK_SEMCTL (&arg, semid, cmd)->array); - } - - { - int save_errno = errno, result; - struct __old_semid_ds old; - struct semid_ds *buf; - - /* Unfortunately there is no way how to find out for sure whether - we should use old or new semctl. */ - result = INLINE_SYSCALL (semctl, 4, semid, semnum, cmd | __IPC_64, - CHECK_SEMCTL (&arg, semid, cmd | __IPC_64)->array); - if (result != -1 || errno != EINVAL) - return result; - - __set_errno(save_errno); - buf = arg.buf; - arg.buf = (void *)&old; - if (cmd == IPC_SET) - { - old.sem_perm.uid = buf->sem_perm.uid; - old.sem_perm.gid = buf->sem_perm.gid; - old.sem_perm.mode = buf->sem_perm.mode; - if (old.sem_perm.uid != buf->sem_perm.uid || - old.sem_perm.gid != buf->sem_perm.gid) - { - __set_errno (EINVAL); - return -1; - } - } - result = INLINE_SYSCALL (semctl, 4, semid, semnum, cmd, - CHECK_SEMCTL (&arg, semid, cmd)->array); - if (result != -1 && cmd != IPC_SET) - { - memset(buf, 0, sizeof(*buf)); - buf->sem_perm.__key = old.sem_perm.__key; - buf->sem_perm.uid = old.sem_perm.uid; - buf->sem_perm.gid = old.sem_perm.gid; - buf->sem_perm.cuid = old.sem_perm.cuid; - buf->sem_perm.cgid = old.sem_perm.cgid; - buf->sem_perm.mode = old.sem_perm.mode; - buf->sem_perm.__seq = old.sem_perm.__seq; - buf->sem_otime = old.sem_otime; - buf->sem_ctime = old.sem_ctime; - buf->sem_nsems = old.sem_nsems; - } - return result; - } -#endif } #include diff --git a/sysdeps/unix/sysv/linux/alpha/shmctl.c b/sysdeps/unix/sysv/linux/alpha/shmctl.c index b911bd1357..fb825a80de 100644 --- a/sysdeps/unix/sysv/linux/alpha/shmctl.c +++ b/sysdeps/unix/sysv/linux/alpha/shmctl.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1997,1998,2000,2003,2006 Free Software Foundation, Inc. +/* Copyright (C) 1995-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , August 1995. @@ -19,115 +19,16 @@ #include #include #include - #include -#include #include #include #include -#include - -struct __old_shmid_ds -{ - struct __old_ipc_perm shm_perm; /* operation permission struct */ - int shm_segsz; /* size of segment in bytes */ - __time_t shm_atime; /* time of last shmat() */ - __time_t shm_dtime; /* time of last shmdt() */ - __time_t shm_ctime; /* time of last change by shmctl() */ - __ipc_pid_t shm_cpid; /* pid of creator */ - __ipc_pid_t shm_lpid; /* pid of last shmop */ - unsigned short int shm_nattch; /* number of current attaches */ - unsigned short int __shm_npages; /* size of segment (pages) */ - unsigned long int *__unbounded __shm_pages; /* array of ptrs to frames -> SHMMAX */ - struct vm_area_struct *__unbounded __attaches; /* descriptors for attaches */ -}; - -struct __old_shminfo -{ - int shmmax; - int shmmin; - int shmmni; - int shmseg; - int shmall; -}; - -/* Provide operations to control over shared memory segments. */ -int __new_shmctl (int, int, struct shmid_ds *); int __new_shmctl (int shmid, int cmd, struct shmid_ds *buf) { -#if __ASSUME_32BITUIDS > 0 return INLINE_SYSCALL (shmctl, 3, shmid, cmd | __IPC_64, CHECK_1 (buf)); -#else - switch (cmd) { - case SHM_STAT: - case IPC_STAT: - case IPC_SET: - case IPC_INFO: - break; - default: - return INLINE_SYSCALL (shmctl, 3, shmid, cmd, CHECK_1 (buf)); - } - - { - int save_errno = errno, result; - struct __old_shmid_ds old; - - /* Unfortunately there is no way how to find out for sure whether - we should use old or new shmctl. */ - result = INLINE_SYSCALL (shmctl, 3, shmid, cmd | __IPC_64, CHECK_1 (buf)); - if (result != -1 || errno != EINVAL) - return result; - - __set_errno(save_errno); - if (cmd == IPC_SET) - { - old.shm_perm.uid = buf->shm_perm.uid; - old.shm_perm.gid = buf->shm_perm.gid; - old.shm_perm.mode = buf->shm_perm.mode; - if (old.shm_perm.uid != buf->shm_perm.uid || - old.shm_perm.gid != buf->shm_perm.gid) - { - __set_errno (EINVAL); - return -1; - } - } - result = INLINE_SYSCALL (shmctl, 3, shmid, cmd, __ptrvalue (&old)); - if (result != -1 && (cmd == SHM_STAT || cmd == IPC_STAT)) - { - memset(buf, 0, sizeof(*buf)); - buf->shm_perm.__key = old.shm_perm.__key; - buf->shm_perm.uid = old.shm_perm.uid; - buf->shm_perm.gid = old.shm_perm.gid; - buf->shm_perm.cuid = old.shm_perm.cuid; - buf->shm_perm.cgid = old.shm_perm.cgid; - buf->shm_perm.mode = old.shm_perm.mode; - buf->shm_perm.__seq = old.shm_perm.__seq; - buf->shm_atime = old.shm_atime; - buf->shm_dtime = old.shm_dtime; - buf->shm_ctime = old.shm_ctime; - buf->shm_segsz = old.shm_segsz; - buf->shm_nattch = old.shm_nattch; - buf->shm_cpid = old.shm_cpid; - buf->shm_lpid = old.shm_lpid; - } - else if (result != -1 && cmd == IPC_INFO) - { - struct __old_shminfo *oldi = (void *)&old; - struct shminfo *i = (struct shminfo *)buf; - - memset(i, 0, sizeof(*i)); - i->shmmax = oldi->shmmax; - i->shmmin = oldi->shmmin; - i->shmmni = oldi->shmmni; - i->shmseg = oldi->shmseg; - i->shmall = oldi->shmall; - } - return result; - } -#endif } #include From dc0c31fbe95fc0cfcc1f6c20672d8308829afc10 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Thu, 24 May 2012 13:20:56 -0700 Subject: [PATCH 4413/4487] alpha: Re-add imaxdiv. --- ChangeLog.alpha | 2 ++ sysdeps/alpha/ldiv.S | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index b3511418cf..3e225c7813 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,5 +1,7 @@ 2012-05-24 Richard Henderson + * sysdeps/alpha/ldiv.S (imaxdiv): Re-add alias. + * sysdeps/unix/sysv/linux/alpha/msgctl.c: Remove __ASSUME_32BITUIDS. * sysdeps/unix/sysv/linux/alpha/semctl.c: Likewise. * sysdeps/unix/sysv/linux/alpha/shmctl.c: Likewise. diff --git a/sysdeps/alpha/ldiv.S b/sysdeps/alpha/ldiv.S index d77e59b239..bf31b81e9d 100644 --- a/sysdeps/alpha/ldiv.S +++ b/sysdeps/alpha/ldiv.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 2001, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1996-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson . @@ -215,3 +215,4 @@ $divbyzero: .end ldiv weak_alias (ldiv, lldiv) +weak_alias (ldiv, imaxdiv) From 4458fa0167a40f56e610d6afcf9912856f6e22e3 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Thu, 24 May 2012 13:43:53 -0700 Subject: [PATCH 4414/4487] alpha: Add abilist files. --- ChangeLog.alpha | 14 + sysdeps/unix/sysv/linux/alpha/nptl/ld.abilist | 20 + .../linux/alpha/nptl/libBrokenLocale.abilist | 3 + .../unix/sysv/linux/alpha/nptl/libanl.abilist | 6 + .../unix/sysv/linux/alpha/nptl/libc.abilist | 2502 +++++++++++++++++ .../sysv/linux/alpha/nptl/libcrypt.abilist | 9 + .../unix/sysv/linux/alpha/nptl/libdl.abilist | 18 + .../unix/sysv/linux/alpha/nptl/libm.abilist | 557 ++++ .../unix/sysv/linux/alpha/nptl/libnsl.abilist | 127 + .../sysv/linux/alpha/nptl/libpthread.abilist | 269 ++ .../sysv/linux/alpha/nptl/libresolv.abilist | 104 + .../unix/sysv/linux/alpha/nptl/librt.abilist | 63 + .../linux/alpha/nptl/libthread_db.abilist | 48 + .../sysv/linux/alpha/nptl/libutil.abilist | 8 + 14 files changed, 3748 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/alpha/nptl/ld.abilist create mode 100644 sysdeps/unix/sysv/linux/alpha/nptl/libBrokenLocale.abilist create mode 100644 sysdeps/unix/sysv/linux/alpha/nptl/libanl.abilist create mode 100644 sysdeps/unix/sysv/linux/alpha/nptl/libc.abilist create mode 100644 sysdeps/unix/sysv/linux/alpha/nptl/libcrypt.abilist create mode 100644 sysdeps/unix/sysv/linux/alpha/nptl/libdl.abilist create mode 100644 sysdeps/unix/sysv/linux/alpha/nptl/libm.abilist create mode 100644 sysdeps/unix/sysv/linux/alpha/nptl/libnsl.abilist create mode 100644 sysdeps/unix/sysv/linux/alpha/nptl/libpthread.abilist create mode 100644 sysdeps/unix/sysv/linux/alpha/nptl/libresolv.abilist create mode 100644 sysdeps/unix/sysv/linux/alpha/nptl/librt.abilist create mode 100644 sysdeps/unix/sysv/linux/alpha/nptl/libthread_db.abilist create mode 100644 sysdeps/unix/sysv/linux/alpha/nptl/libutil.abilist diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 3e225c7813..8096fb70d5 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,5 +1,19 @@ 2012-05-24 Richard Henderson + * sysdeps/unix/sysv/linux/alpha/nptl/ld.abilist: New file. + * sysdeps/unix/sysv/linux/alpha/nptl/libBrokenLocale.abilist: New file. + * sysdeps/unix/sysv/linux/alpha/nptl/libanl.abilist: New file. + * sysdeps/unix/sysv/linux/alpha/nptl/libc.abilist: New file. + * sysdeps/unix/sysv/linux/alpha/nptl/libcrypt.abilist: New file. + * sysdeps/unix/sysv/linux/alpha/nptl/libdl.abilist: New file. + * sysdeps/unix/sysv/linux/alpha/nptl/libm.abilist: New file. + * sysdeps/unix/sysv/linux/alpha/nptl/libnsl.abilist: New file. + * sysdeps/unix/sysv/linux/alpha/nptl/libpthread.abilist: New file. + * sysdeps/unix/sysv/linux/alpha/nptl/libresolv.abilist: New file. + * sysdeps/unix/sysv/linux/alpha/nptl/librt.abilist: New file. + * sysdeps/unix/sysv/linux/alpha/nptl/libthread_db.abilist: New file. + * sysdeps/unix/sysv/linux/alpha/nptl/libutil.abilist: New file. + * sysdeps/alpha/ldiv.S (imaxdiv): Re-add alias. * sysdeps/unix/sysv/linux/alpha/msgctl.c: Remove __ASSUME_32BITUIDS. diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/ld.abilist b/sysdeps/unix/sysv/linux/alpha/nptl/ld.abilist new file mode 100644 index 0000000000..d0dbb988c3 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/nptl/ld.abilist @@ -0,0 +1,20 @@ +GLIBC_2.0 + GLIBC_2.0 A + __libc_memalign F + _r_debug D 0x28 + calloc F + free F + malloc F + realloc F +GLIBC_2.1 + GLIBC_2.1 A + __libc_stack_end D 0x8 + __setitimer F + _dl_mcount F + setitimer F +GLIBC_2.3 + GLIBC_2.3 A + __tls_get_addr F +GLIBC_2.4 + GLIBC_2.4 A + __stack_chk_guard D 0x8 diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/libBrokenLocale.abilist b/sysdeps/unix/sysv/linux/alpha/nptl/libBrokenLocale.abilist new file mode 100644 index 0000000000..f4ca37f44b --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/nptl/libBrokenLocale.abilist @@ -0,0 +1,3 @@ +GLIBC_2.0 + GLIBC_2.0 A + __ctype_get_mb_cur_max F diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/libanl.abilist b/sysdeps/unix/sysv/linux/alpha/nptl/libanl.abilist new file mode 100644 index 0000000000..c9755d8a33 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/nptl/libanl.abilist @@ -0,0 +1,6 @@ +GLIBC_2.2.3 + GLIBC_2.2.3 A + gai_cancel F + gai_error F + gai_suspend F + getaddrinfo_a F diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/libc.abilist b/sysdeps/unix/sysv/linux/alpha/nptl/libc.abilist new file mode 100644 index 0000000000..5ece28f5a2 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/nptl/libc.abilist @@ -0,0 +1,2502 @@ +GCC_3.0 + GCC_3.0 A + _Unwind_Find_FDE F + __deregister_frame_info_bases F + __register_frame_info_bases F + __register_frame_info_table_bases F +GLIBC_2.0 + GLIBC_2.0 A + _IO_adjust_column F + _IO_default_doallocate F + _IO_default_finish F + _IO_default_pbackfail F + _IO_default_uflow F + _IO_default_xsgetn F + _IO_default_xsputn F + _IO_do_write F + _IO_doallocbuf F + _IO_fclose F + _IO_fdopen F + _IO_feof F + _IO_ferror F + _IO_fflush F + _IO_fgetpos F + _IO_fgets F + _IO_file_attach F + _IO_file_close F + _IO_file_close_it F + _IO_file_doallocate F + _IO_file_fopen F + _IO_file_init F + _IO_file_jumps D 0xa8 + _IO_file_open F + _IO_file_overflow F + _IO_file_read F + _IO_file_seek F + _IO_file_seekoff F + _IO_file_setbuf F + _IO_file_stat F + _IO_file_sync F + _IO_file_underflow F + _IO_file_write F + _IO_file_xsputn F + _IO_flockfile F + _IO_flush_all F + _IO_flush_all_linebuffered F + _IO_fopen F + _IO_fprintf F + _IO_fputs F + _IO_fread F + _IO_free_backup_area F + _IO_fsetpos F + _IO_ftell F + _IO_ftrylockfile F + _IO_funlockfile F + _IO_fwrite F + _IO_getc F + _IO_getline F + _IO_gets F + _IO_init F + _IO_init_marker F + _IO_link_in F + _IO_list_all D 0x8 + _IO_marker_delta F + _IO_marker_difference F + _IO_padn F + _IO_peekc_locked F + _IO_popen F + _IO_printf F + _IO_proc_close F + _IO_proc_open F + _IO_putc F + _IO_puts F + _IO_remove_marker F + _IO_seekmark F + _IO_seekoff F + _IO_seekpos F + _IO_setb F + _IO_setbuffer F + _IO_setvbuf F + _IO_sgetn F + _IO_sprintf F + _IO_sputbackc F + _IO_sscanf F + _IO_stderr_ D 0x98 + _IO_stdin_ D 0x98 + _IO_stdout_ D 0x98 + _IO_str_init_readonly F + _IO_str_init_static F + _IO_str_overflow F + _IO_str_pbackfail F + _IO_str_seekoff F + _IO_str_underflow F + _IO_sungetc F + _IO_switch_to_get_mode F + _IO_un_link F + _IO_ungetc F + _IO_unsave_markers F + _IO_vfprintf F + _IO_vfscanf F + _IO_vsprintf F + __adjtimex F + __after_morecore_hook D 0x8 + __argz_count F + __argz_next F + __argz_stringify F + __assert_fail F + __assert_perror_fail F + __bsd_getpgrp F + __bzero F + __check_rhosts_file D 0x4 + __clone F + __close F + __cmsg_nxthdr F + __connect F + __ctype32_b D 0x8 + __ctype_b D 0x8 + __ctype_get_mb_cur_max F + __ctype_tolower D 0x8 + __ctype_toupper D 0x8 + __curbrk D 0x8 + __daylight D 0x4 + __dcgettext F + __default_morecore F + __deregister_frame F + __deregister_frame_info F + __dgettext F + __dup2 F + __environ D 0x8 + __errno_location F + __fcntl F + __ffs F + __finite F + __finitef F + __finitel F + __fork F + __fpu_control D 0x4 + __frame_state_for F + __free_hook D 0x8 + __fxstat F + __getdelim F + __getpagesize F + __getpgid F + __getpid F + __gettimeofday F + __gmtime_r F + __h_errno_location F + __ieee_get_fp_control F + __ieee_set_fp_control F + __isinf F + __isinff F + __isinfl F + __isnan F + __isnanf F + __isnanl F + __iswctype F + __ivaliduser F + __libc_calloc F + __libc_free F + __libc_init_first F + __libc_mallinfo F + __libc_malloc F + __libc_mallopt F + __libc_memalign F + __libc_pvalloc F + __libc_realloc F + __libc_start_main F + __libc_valloc F + __lseek F + __lxstat F + __malloc_hook D 0x8 + __malloc_initialize_hook D 0x8 + __mbrlen F + __mbrtowc F + __memalign_hook D 0x8 + __mempcpy F + __monstartup F + __morecore D 0x8 + __nss_configure_lookup F + __nss_database_lookup F + __nss_group_lookup F + __nss_hosts_lookup F + __nss_next F + __nss_passwd_lookup F + __open F + __overflow F + __pipe F + __printf_fp F + __profile_frequency F + __progname D 0x8 + __progname_full D 0x8 + __rcmd_errstr D 0x8 + __read F + __realloc_hook D 0x8 + __register_frame F + __register_frame_info F + __register_frame_info_table F + __register_frame_table F + __res_randomid F + __sbrk F + __sched_get_priority_max F + __sched_get_priority_min F + __sched_getparam F + __sched_getscheduler F + __sched_setscheduler F + __sched_yield F + __secure_getenv F + __select F + __send F + __setpgid F + __sigaction F + __sigaddset F + __sigdelset F + __sigismember F + __sigpause F + __sigsetjmp F + __stpcpy F + __stpncpy F + __strcasecmp F + __strdup F + __strerror_r F + __strtod_internal F + __strtof_internal F + __strtok_r F + __strtol_internal F + __strtold_internal F + __strtoll_internal F + __strtoul_internal F + __strtoull_internal F + __sysv_signal F + __timezone D 0x8 + __tzname D 0x10 + __uflow F + __underflow F + __vfscanf F + __vsnprintf F + __vsscanf F + __wait F + __waitpid F + __wcstod_internal F + __wcstof_internal F + __wcstol_internal F + __wcstold_internal F + __wcstoll_internal F + __wcstoul_internal F + __wcstoull_internal F + __write F + __xmknod F + __xpg_basename F + __xstat F + _bus_base F + _bus_base_sparse F + _environ D 0x8 + _exit F + _hae_shift F + _inb F + _inl F + _inw F + _libc_intl_domainname D 0x5 + _longjmp F + _mcleanup F + _mcount F + _nl_default_dirname D 0x12 + _nl_domain_bindings D 0x8 + _nl_msg_cat_cntr D 0x4 + _null_auth D 0x18 + _obstack D 0x8 + _obstack_allocated_p F + _obstack_begin F + _obstack_begin_1 F + _obstack_free F + _obstack_memory_used F + _obstack_newchunk F + _outb F + _outl F + _outw F + _res D 0x238 + _rpc_dtablesize F + _seterr_reply F + _setjmp F + _sys_errlist D 0x418 + _sys_nerr D 0x4 + _sys_siglist D 0x100 + _tolower F + _toupper F + a64l F + abort F + abs F + accept F + access F + acct F + addmntent F + adjtime F + adjtimex F + advance F + alarm F + alphasort F + argz_add F + argz_add_sep F + argz_append F + argz_count F + argz_create F + argz_create_sep F + argz_delete F + argz_extract F + argz_insert F + argz_next F + argz_replace F + argz_stringify F + asctime F + asctime_r F + asprintf F + atexit F + atof F + atoi F + atol F + atoll F + authnone_create F + authunix_create F + authunix_create_default F + basename F + bcmp F + bcopy F + bdflush F + bind F + bindresvport F + bindtextdomain F + brk F + bsd_signal F + bsearch F + btowc F + bus_base F + bus_base_sparse F + bzero F + calloc F + callrpc F + canonicalize_file_name F + catclose F + catgets F + catopen F + cfgetispeed F + cfgetospeed F + cfmakeraw F + cfree F + cfsetispeed F + cfsetospeed F + cfsetspeed F + chdir F + chflags F + chmod F + chown F + chroot F + clearenv F + clearerr F + clearerr_unlocked F + clnt_broadcast F + clnt_create F + clnt_pcreateerror F + clnt_perrno F + clnt_perror F + clnt_spcreateerror F + clnt_sperrno F + clnt_sperror F + clntraw_create F + clnttcp_create F + clntudp_bufcreate F + clntudp_create F + clock F + clone F + close F + closedir F + closelog F + confstr F + connect F + copysign F + copysignf F + copysignl F + creat F + create_module F + ctermid F + ctime F + ctime_r F + cuserid F + daemon F + daylight D 0x4 + dcgettext F + delete_module F + dgettext F + difftime F + dirfd F + dirname F + div F + dprintf F + drand48 F + drand48_r F + dup F + dup2 F + dysize F + ecvt F + ecvt_r F + endaliasent F + endfsent F + endgrent F + endhostent F + endmntent F + endnetent F + endnetgrent F + endprotoent F + endpwent F + endrpcent F + endservent F + endspent F + endttyent F + endusershell F + endutent F + environ D 0x8 + envz_add F + envz_entry F + envz_get F + envz_merge F + envz_remove F + envz_strip F + erand48 F + erand48_r F + err F + error F + error_at_line F + error_message_count D 0x4 + error_one_per_line D 0x4 + error_print_progname D 0x8 + errx F + ether_aton F + ether_aton_r F + ether_hostton F + ether_line F + ether_ntoa F + ether_ntoa_r F + ether_ntohost F + euidaccess F + execl F + execle F + execlp F + execv F + execve F + execvp F + exit F + fchdir F + fchflags F + fchmod F + fchown F + fclose F + fcloseall F + fcntl F + fcvt F + fcvt_r F + fdatasync F + fdopen F + feof F + feof_unlocked F + ferror F + ferror_unlocked F + fexecve F + fflush F + fflush_unlocked F + ffs F + fgetc F + fgetgrent F + fgetgrent_r F + fgetpos F + fgetpwent F + fgetpwent_r F + fgets F + fgetspent F + fgetspent_r F + fileno F + fileno_unlocked F + finite F + finitef F + finitel F + flock F + flockfile F + fnmatch F + fopen F + fopencookie F + fork F + fpathconf F + fprintf F + fputc F + fputc_unlocked F + fputs F + fread F + free F + freeaddrinfo F + freopen F + frexp F + frexpf F + frexpl F + fscanf F + fseek F + fsetpos F + fstatfs F + fsync F + ftell F + ftime F + ftok F + ftruncate F + ftrylockfile F + fts_children F + fts_close F + fts_open F + fts_read F + fts_set F + ftw F + funlockfile F + fwrite F + gcvt F + get_avphys_pages F + get_current_dir_name F + get_kernel_syms F + get_myaddress F + get_nprocs F + get_nprocs_conf F + get_phys_pages F + getaddrinfo F + getaliasbyname F + getaliasbyname_r F + getaliasent F + getaliasent_r F + getc F + getc_unlocked F + getchar F + getchar_unlocked F + getcwd F + getdelim F + getdirentries F + getdomainname F + getdtablesize F + getegid F + getenv F + geteuid F + getfsent F + getfsfile F + getfsspec F + getgid F + getgrent F + getgrent_r F + getgrgid F + getgrgid_r F + getgrnam F + getgrnam_r F + getgroups F + gethostbyaddr F + gethostbyaddr_r F + gethostbyname F + gethostbyname2 F + gethostbyname2_r F + gethostbyname_r F + gethostent F + gethostent_r F + gethostid F + gethostname F + getitimer F + getline F + getlogin F + getlogin_r F + getmntent F + getmntent_r F + getnetbyaddr F + getnetbyaddr_r F + getnetbyname F + getnetbyname_r F + getnetent F + getnetent_r F + getnetgrent F + getnetgrent_r F + getopt F + getopt_long F + getopt_long_only F + getpagesize F + getpass F + getpeername F + getpgid F + getpgrp F + getpid F + getppid F + getpriority F + getprotobyname F + getprotobyname_r F + getprotobynumber F + getprotobynumber_r F + getprotoent F + getprotoent_r F + getpublickey F + getpw F + getpwent F + getpwent_r F + getpwnam F + getpwnam_r F + getpwuid F + getpwuid_r F + getresgid F + getresuid F + getrlimit F + getrpcbyname F + getrpcbyname_r F + getrpcbynumber F + getrpcbynumber_r F + getrpcent F + getrpcent_r F + getrpcport F + getrusage F + gets F + getsecretkey F + getservbyname F + getservbyname_r F + getservbyport F + getservbyport_r F + getservent F + getservent_r F + getsid F + getsockname F + getsockopt F + getspent F + getspent_r F + getspnam F + getspnam_r F + getsubopt F + gettext F + gettimeofday F + getttyent F + getttynam F + getuid F + getusershell F + getutent F + getutent_r F + getutid F + getutid_r F + getutline F + getutline_r F + getw F + getwd F + glob F + glob_pattern_p F + globfree F + gmtime F + gmtime_r F + group_member F + gsignal F + gtty F + h_errlist D 0x28 + h_nerr D 0x4 + hae_shift F + hasmntopt F + hcreate F + hcreate_r F + hdestroy F + hdestroy_r F + herror F + hsearch F + hsearch_r F + hstrerror F + htonl F + htons F + inb F + index F + inet_addr F + inet_aton F + inet_lnaof F + inet_makeaddr F + inet_netof F + inet_network F + inet_nsap_addr F + inet_nsap_ntoa F + inet_ntoa F + inet_ntop F + inet_pton F + init_module F + initgroups F + initstate F + initstate_r F + inl F + innetgr F + insque F + inw F + ioctl F + ioperm F + iopl F + iruserok F + isalnum F + isalpha F + isascii F + isatty F + isblank F + iscntrl F + isdigit F + isfdtype F + isgraph F + isinf F + isinff F + isinfl F + islower F + isnan F + isnanf F + isnanl F + isprint F + ispunct F + isspace F + isupper F + iswalnum F + iswalpha F + iswcntrl F + iswctype F + iswdigit F + iswgraph F + iswlower F + iswprint F + iswpunct F + iswspace F + iswupper F + iswxdigit F + isxdigit F + jrand48 F + jrand48_r F + kill F + killpg F + klogctl F + l64a F + labs F + lchown F + lckpwdf F + lcong48 F + lcong48_r F + ldexp F + ldexpf F + ldexpl F + ldiv F + lfind F + link F + listen F + llabs F + lldiv F + llseek F + loc1 D 0x8 + loc2 D 0x8 + localeconv F + localtime F + localtime_r F + lockf F + locs D 0x8 + longjmp F + lrand48 F + lrand48_r F + lsearch F + lseek F + madvise F + mallinfo F + malloc F + malloc_get_state F + malloc_set_state F + malloc_stats F + malloc_trim F + malloc_usable_size F + mallopt F + mallwatch D 0x8 + mblen F + mbrlen F + mbrtowc F + mbsinit F + mbsnrtowcs F + mbsrtowcs F + mbstowcs F + mbtowc F + mcheck F + mcount F + memalign F + memccpy F + memchr F + memcmp F + memcpy F + memfrob F + memmem F + memmove F + memset F + mkdir F + mkfifo F + mkstemp F + mktemp F + mktime F + mlock F + mlockall F + mmap F + modf F + modff F + modfl F + monstartup F + mount F + mprobe F + mprotect F + mrand48 F + mrand48_r F + mremap F + msgctl F + msgget F + msgrcv F + msgsnd F + msync F + mtrace F + munlock F + munlockall F + munmap F + muntrace F + nanosleep F + nfsservctl F + nice F + nl_langinfo F + nrand48 F + nrand48_r F + ntohl F + ntohs F + obstack_alloc_failed_handler D 0x8 + obstack_exit_failure D 0x4 + obstack_free F + obstack_printf F + obstack_vprintf F + on_exit F + open F + open_memstream F + opendir F + openlog F + optarg D 0x8 + opterr D 0x4 + optind D 0x4 + optopt D 0x4 + outb F + outl F + outw F + parse_printf_format F + pathconf F + pause F + pciconfig_read F + pciconfig_write F + pclose F + perror F + personality F + pipe F + pmap_getmaps F + pmap_getport F + pmap_rmtcall F + pmap_set F + pmap_unset F + poll F + popen F + prctl F + printf F + profil F + program_invocation_name D 0x8 + program_invocation_short_name D 0x8 + pselect F + psignal F + pthread_attr_destroy F + pthread_attr_getdetachstate F + pthread_attr_getinheritsched F + pthread_attr_getschedparam F + pthread_attr_getschedpolicy F + pthread_attr_getscope F + pthread_attr_init F + pthread_attr_setdetachstate F + pthread_attr_setinheritsched F + pthread_attr_setschedparam F + pthread_attr_setschedpolicy F + pthread_attr_setscope F + pthread_cond_broadcast F + pthread_cond_destroy F + pthread_cond_init F + pthread_cond_signal F + pthread_cond_timedwait F + pthread_cond_wait F + pthread_condattr_destroy F + pthread_condattr_init F + pthread_equal F + pthread_exit F + pthread_getschedparam F + pthread_mutex_destroy F + pthread_mutex_init F + pthread_mutex_lock F + pthread_mutex_unlock F + pthread_self F + pthread_setcancelstate F + pthread_setcanceltype F + pthread_setschedparam F + ptrace F + putc F + putc_unlocked F + putchar F + putchar_unlocked F + putenv F + putpwent F + puts F + putspent F + pututline F + putw F + pvalloc F + qecvt F + qecvt_r F + qfcvt F + qfcvt_r F + qgcvt F + qsort F + query_module F + quotactl F + raise F + rand F + rand_r F + random F + random_r F + rcmd F + re_comp F + re_compile_fastmap F + re_compile_pattern F + re_exec F + re_match F + re_match_2 F + re_max_failures D 0x4 + re_search F + re_search_2 F + re_set_registers F + re_set_syntax F + re_syntax_options D 0x8 + read F + readdir F + readdir_r F + readlink F + readv F + realloc F + realpath F + reboot F + recv F + recvfrom F + recvmsg F + regcomp F + regerror F + regexec F + regfree F + register_printf_function F + registerrpc F + remove F + remque F + rename F + res_init F + revoke F + rewind F + rewinddir F + rexec F + rexecoptions D 0x4 + rindex F + rmdir F + rpc_createerr D 0x20 + rpmatch F + rresvport F + ruserok F + ruserpass F + sbrk F + scalbn F + scalbnf F + scalbnl F + scandir F + scanf F + sched_get_priority_max F + sched_get_priority_min F + sched_getparam F + sched_getscheduler F + sched_rr_get_interval F + sched_setparam F + sched_setscheduler F + sched_yield F + seed48 F + seed48_r F + seekdir F + select F + semctl F + semget F + semop F + send F + sendmsg F + sendto F + setaliasent F + setbuf F + setbuffer F + setcontext F + setdomainname F + setegid F + setenv F + seteuid F + setfsent F + setfsgid F + setfsuid F + setgid F + setgrent F + setgroups F + sethae F + sethostent F + sethostid F + sethostname F + setitimer F + setjmp F + setlinebuf F + setlocale F + setlogin F + setlogmask F + setmntent F + setnetent F + setnetgrent F + setpgid F + setpgrp F + setpriority F + setprotoent F + setpwent F + setregid F + setresgid F + setresuid F + setreuid F + setrlimit F + setrpcent F + setservent F + setsid F + setsockopt F + setspent F + setstate F + setstate_r F + settimeofday F + setttyent F + setuid F + setusershell F + setutent F + setvbuf F + sgetspent F + sgetspent_r F + shmat F + shmctl F + shmdt F + shmget F + shutdown F + sigaction F + sigaddset F + sigaltstack F + sigandset F + sigblock F + sigdelset F + sigemptyset F + sigfillset F + siggetmask F + siginterrupt F + sigisemptyset F + sigismember F + siglongjmp F + signal F + sigorset F + sigpause F + sigpending F + sigprocmask F + sigreturn F + sigsetmask F + sigstack F + sigsuspend F + sigvec F + sigwait F + sleep F + snprintf F + socket F + socketpair F + sprintf F + srand F + srand48 F + srand48_r F + srandom F + srandom_r F + sscanf F + ssignal F + sstk F + statfs F + stderr D 0x8 + stdin D 0x8 + stdout D 0x8 + step F + stime F + stpcpy F + stpncpy F + strcasecmp F + strcat F + strchr F + strcmp F + strcoll F + strcpy F + strcspn F + strdup F + strerror F + strerror_r F + strfmon F + strfry F + strftime F + strlen F + strncasecmp F + strncat F + strncmp F + strncpy F + strndup F + strnlen F + strpbrk F + strptime F + strrchr F + strsep F + strsignal F + strspn F + strstr F + strtod F + strtof F + strtok F + strtok_r F + strtol F + strtold F + strtoll F + strtoq F + strtoul F + strtoull F + strtouq F + strxfrm F + stty F + svc_exit F + svc_fdset D 0x80 + svc_getreq F + svc_getreqset F + svc_register F + svc_run F + svc_sendreply F + svc_unregister F + svcauthdes_stats D 0x18 + svcerr_auth F + svcerr_decode F + svcerr_noproc F + svcerr_noprog F + svcerr_progvers F + svcerr_systemerr F + svcerr_weakauth F + svcfd_create F + svcraw_create F + svctcp_create F + svcudp_bufcreate F + svcudp_create F + svcudp_enablecache F + swab F + swapoff F + swapon F + symlink F + sync F + sys_errlist D 0x418 + sys_nerr D 0x4 + sys_sigabbrev D 0x100 + sys_siglist D 0x100 + syscall F + sysconf F + sysctl F + sysinfo F + syslog F + system F + tcdrain F + tcflow F + tcflush F + tcgetattr F + tcgetpgrp F + tcsendbreak F + tcsetattr F + tcsetpgrp F + tdelete F + telldir F + tempnam F + textdomain F + tfind F + time F + timegm F + timelocal F + times F + timezone D 0x8 + tmpfile F + tmpnam F + tmpnam_r F + toascii F + tolower F + toupper F + towctrans F + towlower F + towupper F + tr_break F + truncate F + tsearch F + ttyname F + ttyname_r F + ttyslot F + twalk F + tzname D 0x10 + tzset F + ualarm F + ulckpwdf F + ulimit F + umask F + umount F + uname F + ungetc F + unlink F + unsetenv F + updwtmp F + uselib F + usleep F + ustat F + utime F + utimes F + utmpname F + valloc F + vasprintf F + vdprintf F + verr F + verrx F + vfork F + vfprintf F + vfscanf F + vhangup F + vlimit F + vprintf F + vscanf F + vsnprintf F + vsprintf F + vsscanf F + vsyslog F + vtimes F + vwarn F + vwarnx F + wait F + wait3 F + wait4 F + waitpid F + warn F + warnx F + wcpcpy F + wcpncpy F + wcrtomb F + wcscat F + wcschr F + wcscmp F + wcscoll F + wcscpy F + wcscspn F + wcsdup F + wcslen F + wcsncat F + wcsncmp F + wcsncpy F + wcsnrtombs F + wcspbrk F + wcsrchr F + wcsrtombs F + wcsspn F + wcsstr F + wcstod F + wcstof F + wcstok F + wcstol F + wcstold F + wcstombs F + wcstoq F + wcstoul F + wcstouq F + wcswidth F + wcsxfrm F + wctob F + wctomb F + wctrans F + wctype F + wcwidth F + wmemchr F + wmemcmp F + wmemcpy F + wmemmove F + wmemset F + write F + writev F + xdr_accepted_reply F + xdr_array F + xdr_authunix_parms F + xdr_bool F + xdr_bytes F + xdr_callhdr F + xdr_callmsg F + xdr_char F + xdr_cryptkeyarg F + xdr_cryptkeyarg2 F + xdr_cryptkeyres F + xdr_des_block F + xdr_double F + xdr_enum F + xdr_float F + xdr_free F + xdr_int F + xdr_key_netstarg F + xdr_key_netstres F + xdr_keybuf F + xdr_keystatus F + xdr_long F + xdr_netobj F + xdr_opaque F + xdr_opaque_auth F + xdr_pmap F + xdr_pmaplist F + xdr_pointer F + xdr_reference F + xdr_rejected_reply F + xdr_replymsg F + xdr_rmtcall_args F + xdr_rmtcallres F + xdr_short F + xdr_string F + xdr_u_char F + xdr_u_int F + xdr_u_long F + xdr_u_short F + xdr_union F + xdr_vector F + xdr_void F + xdr_wrapstring F + xdrmem_create F + xdrrec_create F + xdrrec_endofrecord F + xdrrec_eof F + xdrrec_skiprecord F + xdrstdio_create F + xencrypt F + xprt_register F + xprt_unregister F +__divl GLIBC_2.0 g ? D .text 0000000000000060 +__divlu GLIBC_2.0 g ? D .text 0000000000000060 +__divq GLIBC_2.0 g ? D .text 00000000000001c4 +__divqu GLIBC_2.0 g ? D .text 000000000000018c +__reml GLIBC_2.0 g ? D .text 0000000000000064 +__remlu GLIBC_2.0 g ? D .text 0000000000000064 +__remq GLIBC_2.0 g ? D .text 00000000000001c0 +__remqu GLIBC_2.0 g ? D .text 00000000000001b4 +GLIBC_2.1 + GLIBC_2.1 A + _IO_2_1_stderr_ D 0xe0 + _IO_2_1_stdin_ D 0xe0 + _IO_2_1_stdout_ D 0xe0 + _IO_do_write F + _IO_fclose F + _IO_fdopen F + _IO_fgetpos64 F + _IO_file_attach F + _IO_file_close_it F + _IO_file_finish F + _IO_file_fopen F + _IO_file_init F + _IO_file_overflow F + _IO_file_seekoff F + _IO_file_setbuf F + _IO_file_sync F + _IO_file_underflow F + _IO_file_write F + _IO_file_xsputn F + _IO_fopen F + _IO_fsetpos64 F + _IO_getline_info F + _IO_popen F + _IO_proc_close F + _IO_proc_open F + __adjtimex F + __asprintf F + __backtrace F + __backtrace_symbols F + __backtrace_symbols_fd F + __duplocale F + __freelocale F + __fxstat64 F + __gettimeofday F + __isalnum_l F + __isalpha_l F + __isascii_l F + __isblank_l F + __iscntrl_l F + __isdigit_l F + __isgraph_l F + __islower_l F + __isprint_l F + __ispunct_l F + __isspace_l F + __isupper_l F + __iswalnum_l F + __iswalpha_l F + __iswblank_l F + __iswcntrl_l F + __iswctype_l F + __iswdigit_l F + __iswgraph_l F + __iswlower_l F + __iswprint_l F + __iswpunct_l F + __iswspace_l F + __iswupper_l F + __iswxdigit_l F + __isxdigit_l F + __key_decryptsession_pk_LOCAL D 0x8 + __key_encryptsession_pk_LOCAL D 0x8 + __key_gendes_LOCAL D 0x8 + __libc_allocate_rtsig F + __libc_current_sigrtmax F + __libc_current_sigrtmin F + __libc_freeres F + __libc_sa_len F + __lxstat64 F + __newlocale F + __poll F + __pread64 F + __pwrite64 F + __rawmemchr F + __select F + __signbit F + __signbitf F + __strcasecmp_l F + __strcasestr F + __strcoll_l F + __strfmon_l F + __strncasecmp_l F + __strtod_l F + __strtof_l F + __strtol_l F + __strtold_l F + __strtoll_l F + __strtoul_l F + __strtoull_l F + __strxfrm_l F + __toascii_l F + __tolower_l F + __toupper_l F + __towctrans F + __towctrans_l F + __towlower_l F + __towupper_l F + __utimes F + __wait4 F + __wcscasecmp_l F + __wcscoll_l F + __wcsncasecmp_l F + __wcstod_l F + __wcstof_l F + __wcstol_l F + __wcstold_l F + __wcstoll_l F + __wcstoul_l F + __wcstoull_l F + __wcsxfrm_l F + __wctype_l F + __xstat64 F + _authenticate F + _dl_mcount_wrapper F + _dl_mcount_wrapper_check F + _sys_errlist D 0x418 + _sys_nerr D 0x4 + _sys_siglist D 0x200 + addseverity F + adjtime F + adjtimex F + alphasort64 F + argp_err_exit_status D 0x4 + argp_error F + argp_failure F + argp_help F + argp_parse F + argp_program_bug_address D 0x8 + argp_program_version D 0x8 + argp_program_version_hook D 0x8 + argp_state_help F + argp_usage F + authdes_create F + authdes_getucred F + authdes_pk_create F + backtrace F + backtrace_symbols F + backtrace_symbols_fd F + capget F + capset F + cbc_crypt F + clntunix_create F + creat64 F + des_setparity F + ecb_crypt F + endutxent F + fattach F + fclose F + fdetach F + fdopen F + ffsl F + ffsll F + fgetc_unlocked F + fgetpos64 F + fgets_unlocked F + fmtmsg F + fopen F + fopen64 F + fputs_unlocked F + fread_unlocked F + freopen64 F + fseeko F + fseeko64 F + fsetpos64 F + fstatfs64 F + fstatvfs F + fstatvfs64 F + ftello F + ftello64 F + ftruncate64 F + ftw64 F + fwrite_unlocked F + gai_strerror F + getcontext F + getdate F + getdate_err D 0x4 + getdate_r F + getitimer F + getmsg F + getnameinfo F + getnetname F + getpmsg F + getpt F + getrlimit64 F + getrusage F + gettimeofday F + getutxent F + getutxid F + getutxline F + glob F + glob64 F + globfree F + globfree64 F + gnu_get_libc_release F + gnu_get_libc_version F + grantpt F + host2netname F + iconv F + iconv_close F + iconv_open F + ieee_get_fp_control F + ieee_set_fp_control F + if_freenameindex F + if_indextoname F + if_nameindex F + if_nametoindex F + in6addr_any D 0x10 + in6addr_loopback D 0x10 + isastream F + iswblank F + key_decryptsession F + key_decryptsession_pk F + key_encryptsession F + key_encryptsession_pk F + key_gendes F + key_get_conv F + key_secretkey_is_set F + key_setnet F + key_setsecret F + lockf64 F + lseek64 F + makecontext F + mempcpy F + mmap64 F + netname2host F + netname2user F + nftw F + nftw64 F + ntp_adjtime F + ntp_gettime F + open64 F + passwd2des F + pclose F + popen F + pread F + pread64 F + printf_size F + printf_size_info F + pthread_attr_init F + ptsname F + ptsname_r F + putgrent F + putmsg F + putpmsg F + pututxline F + pwrite F + pwrite64 F + rawmemchr F + readdir64 F + readdir64_r F + rtime F + scandir64 F + select F + sendfile F + setitimer F + setrlimit64 F + settimeofday F + setutxent F + sighold F + sigignore F + sigqueue F + sigrelse F + sigset F + sigtimedwait F + sigwaitinfo F + statfs64 F + statvfs F + statvfs64 F + strcasestr F + strtoimax F + strtoumax F + strverscmp F + svcunix_create F + svcunixfd_create F + swapcontext F + sys_errlist D 0x418 + sys_nerr D 0x4 + sys_sigabbrev D 0x200 + sys_siglist D 0x200 + sysv_signal F + tcgetsid F + tdestroy F + tmpfile F + tmpfile64 F + truncate64 F + umount2 F + unlockpt F + updwtmpx F + user2netname F + utimes F + utmpxname F + versionsort F + versionsort64 F + wait4 F + waitid F + wcscasecmp F + wcsncasecmp F + wcsnlen F + wcstoimax F + wcstoll F + wcstoull F + wcstoumax F + wcswcs F + wordexp F + wordfree F + xdecrypt F + xdr_authdes_cred F + xdr_authdes_verf F + xdr_getcredres F + xdr_int16_t F + xdr_int32_t F + xdr_int8_t F + xdr_netnamestr F + xdr_sizeof F + xdr_uint16_t F + xdr_uint32_t F + xdr_uint8_t F + xdr_unixcred F +GLIBC_2.1.1 + GLIBC_2.1.1 A + _Exit F + __mempcpy_small F + __stpcpy_small F + __strcpy_small F + __strcspn_c1 F + __strcspn_c2 F + __strcspn_c3 F + __strpbrk_c2 F + __strpbrk_c3 F + __strsep_1c F + __strsep_2c F + __strsep_3c F + __strsep_g F + __strspn_c1 F + __strspn_c2 F + __strspn_c3 F + __strtok_r_1c F + __strverscmp F + getutmp F + getutmpx F + imaxabs F + imaxdiv F + strchrnul F + xdr_hyper F + xdr_int64_t F + xdr_longlong_t F + xdr_u_hyper F + xdr_u_longlong_t F + xdr_uint64_t F +GLIBC_2.1.2 + GLIBC_2.1.2 A + __vfork F + getaliasbyname_r F + getaliasent_r F + getgrent_r F + getgrgid_r F + getgrnam_r F + gethostbyaddr_r F + gethostbyname2_r F + gethostbyname_r F + gethostent_r F + getnetbyaddr_r F + getnetbyname_r F + getnetent_r F + getprotobyname_r F + getprotobynumber_r F + getprotoent_r F + getpwent_r F + getpwnam_r F + getpwuid_r F + getrpcbyname_r F + getrpcbynumber_r F + getrpcent_r F + getservbyname_r F + getservbyport_r F + getservent_r F + getspent_r F + getspnam_r F +GLIBC_2.1.3 + GLIBC_2.1.3 A + __cxa_atexit F + __cxa_finalize F + __sigsuspend F +GLIBC_2.1.4 + GLIBC_2.1.4 A + pciconfig_iobase F +GLIBC_2.10 + GLIBC_2.10 A + __cxa_at_quick_exit F + __posix_getopt F + accept4 F + endsgent F + fallocate F + fallocate64 F + fgetsgent F + fgetsgent_r F + getsgent F + getsgent_r F + getsgnam F + getsgnam_r F + malloc_info F + preadv F + preadv64 F + psiginfo F + putsgent F + pwritev F + pwritev64 F + quick_exit F + register_printf_modifier F + register_printf_specifier F + register_printf_type F + setsgent F + sgetsgent F + sgetsgent_r F +GLIBC_2.11 + GLIBC_2.11 A + __longjmp_chk F + execvpe F + mkostemps F + mkostemps64 F + mkstemps F + mkstemps64 F +GLIBC_2.12 + GLIBC_2.12 A + _sys_errlist D 0x458 + _sys_nerr D 0x4 + ntp_gettimex F + recvmmsg F + sys_errlist D 0x458 + sys_nerr D 0x4 +GLIBC_2.13 + GLIBC_2.13 A + fanotify_init F + fanotify_mark F + prlimit F + prlimit64 F +GLIBC_2.14 + GLIBC_2.14 A + clock_adjtime F + name_to_handle_at F + open_by_handle_at F + sendmmsg F + setns F + syncfs F +GLIBC_2.15 + GLIBC_2.15 A + __fdelt_chk F + __fdelt_warn F + posix_spawn F + posix_spawnp F + process_vm_readv F + process_vm_writev F + scandirat F + scandirat64 F +GLIBC_2.16 + GLIBC_2.16 A + __getauxval F + __poll_chk F + __ppoll_chk F + _sys_errlist D 0x460 + _sys_nerr D 0x4 + aligned_alloc F + c16rtomb F + c32rtomb F + getauxval F + mbrtoc16 F + mbrtoc32 F + sys_errlist D 0x460 + sys_nerr D 0x4 + timespec_get F +GLIBC_2.2 + GLIBC_2.2 A + _IO_adjust_wcolumn F + _IO_fgetpos F + _IO_fgetpos64 F + _IO_free_wbackup_area F + _IO_fsetpos F + _IO_fsetpos64 F + _IO_init_wmarker F + _IO_iter_begin F + _IO_iter_end F + _IO_iter_file F + _IO_iter_next F + _IO_least_wmarker F + _IO_list_lock F + _IO_list_resetlock F + _IO_list_unlock F + _IO_seekwmark F + _IO_sputbackwc F + _IO_sungetwc F + _IO_switch_to_main_wget_area F + _IO_switch_to_wbackup_area F + _IO_switch_to_wget_mode F + _IO_unsave_wmarkers F + _IO_wdefault_doallocate F + _IO_wdefault_finish F + _IO_wdefault_pbackfail F + _IO_wdefault_uflow F + _IO_wdefault_xsgetn F + _IO_wdefault_xsputn F + _IO_wdo_write F + _IO_wdoallocbuf F + _IO_wfile_jumps D 0xa8 + _IO_wfile_overflow F + _IO_wfile_seekoff F + _IO_wfile_sync F + _IO_wfile_underflow F + _IO_wfile_xsputn F + _IO_wmarker_delta F + _IO_wsetb F + __assert F + __ctype32_tolower D 0x8 + __ctype32_toupper D 0x8 + __cyg_profile_func_enter F + __cyg_profile_func_exit F + __endmntent F + __fbufsize F + __flbf F + __fpending F + __fpurge F + __freadable F + __freading F + __fsetlocking F + __fwritable F + __fwriting F + __getmntent_r F + __nl_langinfo_l F + __open64 F + __res_init F + __res_nclose F + __res_ninit F + __res_state F + __setmntent F + __statfs F + __strndup F + __sysconf F + __sysctl F + __wctrans_l F + __woverflow F + __wuflow F + __wunderflow F + __xpg_sigpause F + _flushlbf F + _res_hconf D 0x48 + bind_textdomain_codeset F + dcngettext F + dngettext F + fgetpos F + fgetpos64 F + fgetwc F + fgetwc_unlocked F + fgetws F + fgetws_unlocked F + fmemopen F + fopencookie F + fputwc F + fputwc_unlocked F + fputws F + fputws_unlocked F + fsetpos F + fsetpos64 F + fwide F + fwprintf F + fwscanf F + getdirentries64 F + getloadavg F + getwc F + getwc_unlocked F + getwchar F + getwchar_unlocked F + iruserok_af F + localeconv F + mcheck_check_all F + mcheck_pedantic F + memrchr F + mincore F + mkdtemp F + mkstemp64 F + moncontrol F + msgctl F + ngettext F + posix_fadvise F + posix_fadvise64 F + posix_fallocate F + posix_fallocate64 F + posix_madvise F + posix_memalign F + posix_spawn F + posix_spawn_file_actions_addclose F + posix_spawn_file_actions_adddup2 F + posix_spawn_file_actions_addopen F + posix_spawn_file_actions_destroy F + posix_spawn_file_actions_init F + posix_spawnattr_destroy F + posix_spawnattr_getflags F + posix_spawnattr_getpgroup F + posix_spawnattr_getschedparam F + posix_spawnattr_getschedpolicy F + posix_spawnattr_getsigdefault F + posix_spawnattr_getsigmask F + posix_spawnattr_init F + posix_spawnattr_setflags F + posix_spawnattr_setpgroup F + posix_spawnattr_setschedparam F + posix_spawnattr_setschedpolicy F + posix_spawnattr_setsigdefault F + posix_spawnattr_setsigmask F + posix_spawnp F + putwc F + putwc_unlocked F + putwchar F + putwchar_unlocked F + rcmd_af F + rexec_af F + rresvport_af F + ruserok_af F + semctl F + shmctl F + svc_getreq_common F + svc_getreq_poll F + svc_max_pollfd D 0x4 + svc_pollfd D 0x8 + swprintf F + swscanf F + ungetwc F + vfwprintf F + vfwscanf F + vswprintf F + vswscanf F + vwprintf F + vwscanf F + wcschrnul F + wcsftime F + wmempcpy F + wprintf F + wscanf F +GLIBC_2.2.1 + GLIBC_2.2.1 A + pivot_root F + posix_openpt F +GLIBC_2.2.2 + GLIBC_2.2.2 A + __nss_hostname_digits_dots F + wordexp F +GLIBC_2.2.3 + GLIBC_2.2.3 A + __rpc_thread_createerr F + __rpc_thread_svc_fdset F + __rpc_thread_svc_max_pollfd F + __rpc_thread_svc_pollfd F + fnmatch F + sprofil F +GLIBC_2.2.4 + GLIBC_2.2.4 A + dl_iterate_phdr F + getgrouplist F + sockatmark F +GLIBC_2.2.6 + GLIBC_2.2.6 A + __nanosleep F +GLIBC_2.3 + GLIBC_2.3 A + __ctype_b_loc F + __ctype_tolower_loc F + __ctype_toupper_loc F + __isctype F + __strftime_l F + __uselocale F + __wcsftime_l F + _sys_errlist D 0x420 + _sys_nerr D 0x4 + duplocale F + fgetxattr F + flistxattr F + freeifaddrs F + freelocale F + fremovexattr F + fsetxattr F + futimes F + getifaddrs F + getxattr F + isalnum_l F + isalpha_l F + isblank_l F + iscntrl_l F + isctype F + isdigit_l F + isgraph_l F + islower_l F + isprint_l F + ispunct_l F + isspace_l F + isupper_l F + iswalnum_l F + iswalpha_l F + iswblank_l F + iswcntrl_l F + iswctype_l F + iswdigit_l F + iswgraph_l F + iswlower_l F + iswprint_l F + iswpunct_l F + iswspace_l F + iswupper_l F + iswxdigit_l F + isxdigit_l F + lgetxattr F + listxattr F + llistxattr F + lremovexattr F + lsetxattr F + lutimes F + newlocale F + nl_langinfo_l F + readahead F + realpath F + removexattr F + sendfile64 F + setxattr F + strcasecmp_l F + strcoll_l F + strfmon_l F + strftime_l F + strncasecmp_l F + strtod_l F + strtof_l F + strtol_l F + strtold_l F + strtoul_l F + strxfrm_l F + sys_errlist D 0x420 + sys_nerr D 0x4 + tolower_l F + toupper_l F + towctrans_l F + towlower_l F + towupper_l F + uselocale F + wcscasecmp_l F + wcscoll_l F + wcsftime_l F + wcsncasecmp_l F + wcstod_l F + wcstof_l F + wcstol_l F + wcstold_l F + wcstoll_l F + wcstoul_l F + wcstoull_l F + wcsxfrm_l F + wctrans_l F + wctype_l F +GLIBC_2.3.2 + GLIBC_2.3.2 A + __register_atfork F + epoll_create F + epoll_ctl F + epoll_wait F + lchmod F + pthread_cond_broadcast F + pthread_cond_destroy F + pthread_cond_init F + pthread_cond_signal F + pthread_cond_timedwait F + pthread_cond_wait F + strptime_l F +GLIBC_2.3.3 + GLIBC_2.3.3 A + _sys_siglist D 0x208 + gnu_dev_major F + gnu_dev_makedev F + gnu_dev_minor F + inet6_option_alloc F + inet6_option_append F + inet6_option_find F + inet6_option_init F + inet6_option_next F + inet6_option_space F + nftw F + nftw64 F + remap_file_pages F + sched_getaffinity F + sched_setaffinity F + semtimedop F + strtoll_l F + strtoull_l F + sys_sigabbrev D 0x208 + sys_siglist D 0x208 +GLIBC_2.3.4 + GLIBC_2.3.4 A + _OtsAddX F + _OtsConvertFloatTX F + _OtsConvertFloatXT F + _OtsCvtQUX F + _OtsCvtQX F + _OtsCvtXQ F + _OtsDivX F + _OtsEqlX F + _OtsGeqX F + _OtsGtrX F + _OtsLeqX F + _OtsLssX F + _OtsMulX F + _OtsNeqX F + _OtsNintXQ F + _OtsSubX F + __chk_fail F + __fprintf_chk F + __gets_chk F + __memcpy_chk F + __memmove_chk F + __mempcpy_chk F + __memset_chk F + __printf_chk F + __snprintf_chk F + __sprintf_chk F + __stpcpy_chk F + __strcat_chk F + __strcpy_chk F + __strncat_chk F + __strncpy_chk F + __vfprintf_chk F + __vprintf_chk F + __vsnprintf_chk F + __vsprintf_chk F + __xpg_strerror_r F + getipv4sourcefilter F + getsourcefilter F + regexec F + sched_getaffinity F + sched_setaffinity F + setipv4sourcefilter F + setsourcefilter F + xdr_quad_t F + xdr_u_quad_t F +GLIBC_2.4 + GLIBC_2.4 A + _IO_fprintf F + _IO_printf F + _IO_sprintf F + _IO_sscanf F + _IO_vfprintf F + _IO_vfscanf F + _IO_vsprintf F + __asprintf F + __confstr_chk F + __fgets_chk F + __fgets_unlocked_chk F + __fgetws_chk F + __fgetws_unlocked_chk F + __finitel F + __fprintf_chk F + __fwprintf_chk F + __fxstatat F + __fxstatat64 F + __getcwd_chk F + __getdomainname_chk F + __getgroups_chk F + __gethostname_chk F + __getlogin_r_chk F + __getwd_chk F + __isinfl F + __isnanl F + __mbsnrtowcs_chk F + __mbsrtowcs_chk F + __mbstowcs_chk F + __nldbl__IO_fprintf F + __nldbl__IO_printf F + __nldbl__IO_sprintf F + __nldbl__IO_sscanf F + __nldbl__IO_vfprintf F + __nldbl__IO_vfscanf F + __nldbl__IO_vsprintf F + __nldbl___asprintf F + __nldbl___fprintf_chk F + __nldbl___fwprintf_chk F + __nldbl___printf_chk F + __nldbl___printf_fp F + __nldbl___snprintf_chk F + __nldbl___sprintf_chk F + __nldbl___strfmon_l F + __nldbl___swprintf_chk F + __nldbl___syslog_chk F + __nldbl___vfprintf_chk F + __nldbl___vfscanf F + __nldbl___vfwprintf_chk F + __nldbl___vprintf_chk F + __nldbl___vsnprintf F + __nldbl___vsnprintf_chk F + __nldbl___vsprintf_chk F + __nldbl___vsscanf F + __nldbl___vstrfmon F + __nldbl___vstrfmon_l F + __nldbl___vswprintf_chk F + __nldbl___vsyslog_chk F + __nldbl___vwprintf_chk F + __nldbl___wprintf_chk F + __nldbl_asprintf F + __nldbl_dprintf F + __nldbl_fprintf F + __nldbl_fscanf F + __nldbl_fwprintf F + __nldbl_fwscanf F + __nldbl_obstack_printf F + __nldbl_obstack_vprintf F + __nldbl_printf F + __nldbl_printf_size F + __nldbl_scanf F + __nldbl_snprintf F + __nldbl_sprintf F + __nldbl_sscanf F + __nldbl_strfmon F + __nldbl_strfmon_l F + __nldbl_swprintf F + __nldbl_swscanf F + __nldbl_syslog F + __nldbl_vasprintf F + __nldbl_vdprintf F + __nldbl_vfprintf F + __nldbl_vfscanf F + __nldbl_vfwprintf F + __nldbl_vfwscanf F + __nldbl_vprintf F + __nldbl_vscanf F + __nldbl_vsnprintf F + __nldbl_vsprintf F + __nldbl_vsscanf F + __nldbl_vswprintf F + __nldbl_vswscanf F + __nldbl_vsyslog F + __nldbl_vwprintf F + __nldbl_vwscanf F + __nldbl_wprintf F + __nldbl_wscanf F + __pread64_chk F + __pread_chk F + __printf_chk F + __printf_fp F + __ptsname_r_chk F + __read_chk F + __readlink_chk F + __realpath_chk F + __recv_chk F + __recvfrom_chk F + __signbitl F + __snprintf_chk F + __sprintf_chk F + __stack_chk_fail F + __stpncpy_chk F + __strfmon_l F + __strtold_internal F + __strtold_l F + __swprintf_chk F + __syslog_chk F + __ttyname_r_chk F + __vfprintf_chk F + __vfscanf F + __vfwprintf_chk F + __vprintf_chk F + __vsnprintf F + __vsnprintf_chk F + __vsprintf_chk F + __vsscanf F + __vswprintf_chk F + __vsyslog_chk F + __vwprintf_chk F + __wcpcpy_chk F + __wcpncpy_chk F + __wcrtomb_chk F + __wcscat_chk F + __wcscpy_chk F + __wcsncat_chk F + __wcsncpy_chk F + __wcsnrtombs_chk F + __wcsrtombs_chk F + __wcstold_internal F + __wcstold_l F + __wcstombs_chk F + __wctomb_chk F + __wmemcpy_chk F + __wmemmove_chk F + __wmempcpy_chk F + __wmemset_chk F + __wprintf_chk F + __xmknodat F + _sys_errlist D 0x450 + _sys_nerr D 0x4 + asprintf F + copysignl F + dprintf F + eaccess F + faccessat F + fchmodat F + fchownat F + fdopendir F + finitel F + fprintf F + frexpl F + fscanf F + futimesat F + fwprintf F + fwscanf F + inotify_add_watch F + inotify_init F + inotify_rm_watch F + isinfl F + isnanl F + ldexpl F + linkat F + mkdirat F + mkfifoat F + modfl F + obstack_printf F + obstack_vprintf F + open_wmemstream F + openat F + openat64 F + ppoll F + printf F + printf_size F + qecvt F + qecvt_r F + qfcvt F + qfcvt_r F + qgcvt F + readlinkat F + renameat F + scalbnl F + scanf F + snprintf F + sprintf F + sscanf F + strfmon F + strfmon_l F + strtold F + strtold_l F + swprintf F + swscanf F + symlinkat F + sys_errlist D 0x450 + sys_nerr D 0x4 + syslog F + unlinkat F + unshare F + vasprintf F + vdprintf F + vfprintf F + vfscanf F + vfwprintf F + vfwscanf F + vprintf F + vscanf F + vsnprintf F + vsprintf F + vsscanf F + vswprintf F + vswscanf F + vsyslog F + vwprintf F + vwscanf F + wcstold F + wcstold_l F + wprintf F + wscanf F +GLIBC_2.5 + GLIBC_2.5 A + __readlinkat_chk F + inet6_opt_append F + inet6_opt_find F + inet6_opt_finish F + inet6_opt_get_val F + inet6_opt_init F + inet6_opt_next F + inet6_opt_set_val F + inet6_rth_add F + inet6_rth_getaddr F + inet6_rth_init F + inet6_rth_reverse F + inet6_rth_segments F + inet6_rth_space F + splice F + tee F + vmsplice F +GLIBC_2.6 + GLIBC_2.6 A + __sched_cpucount F + epoll_pwait F + futimens F + sched_getcpu F + strerror_l F + sync_file_range F + utimensat F +GLIBC_2.7 + GLIBC_2.7 A + __fread_chk F + __fread_unlocked_chk F + __isoc99_fscanf F + __isoc99_fwscanf F + __isoc99_scanf F + __isoc99_sscanf F + __isoc99_swscanf F + __isoc99_vfscanf F + __isoc99_vfwscanf F + __isoc99_vscanf F + __isoc99_vsscanf F + __isoc99_vswscanf F + __isoc99_vwscanf F + __isoc99_wscanf F + __nldbl___isoc99_fscanf F + __nldbl___isoc99_fwscanf F + __nldbl___isoc99_scanf F + __nldbl___isoc99_sscanf F + __nldbl___isoc99_swscanf F + __nldbl___isoc99_vfscanf F + __nldbl___isoc99_vfwscanf F + __nldbl___isoc99_vscanf F + __nldbl___isoc99_vsscanf F + __nldbl___isoc99_vswscanf F + __nldbl___isoc99_vwscanf F + __nldbl___isoc99_wscanf F + __open64_2 F + __open_2 F + __openat64_2 F + __openat_2 F + __sched_cpualloc F + __sched_cpufree F + eventfd F + eventfd_read F + eventfd_write F + mkostemp F + mkostemp64 F + signalfd F +GLIBC_2.8 + GLIBC_2.8 A + __asprintf_chk F + __dprintf_chk F + __nldbl___asprintf_chk F + __nldbl___dprintf_chk F + __nldbl___obstack_printf_chk F + __nldbl___obstack_vprintf_chk F + __nldbl___vasprintf_chk F + __nldbl___vdprintf_chk F + __obstack_printf_chk F + __obstack_vprintf_chk F + __vasprintf_chk F + __vdprintf_chk F + qsort_r F + timerfd_create F + timerfd_gettime F + timerfd_settime F +GLIBC_2.9 + GLIBC_2.9 A + dup3 F + epoll_create1 F + inotify_init1 F + pipe2 F diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/libcrypt.abilist b/sysdeps/unix/sysv/linux/alpha/nptl/libcrypt.abilist new file mode 100644 index 0000000000..1df145f260 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/nptl/libcrypt.abilist @@ -0,0 +1,9 @@ +GLIBC_2.0 + GLIBC_2.0 A + crypt F + crypt_r F + encrypt F + encrypt_r F + fcrypt F + setkey F + setkey_r F diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/libdl.abilist b/sysdeps/unix/sysv/linux/alpha/nptl/libdl.abilist new file mode 100644 index 0000000000..62e6b41edb --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/nptl/libdl.abilist @@ -0,0 +1,18 @@ +GLIBC_2.0 + GLIBC_2.0 A + dladdr F + dlclose F + dlerror F + dlopen F + dlsym F +GLIBC_2.1 + GLIBC_2.1 A + dlopen F + dlvsym F +GLIBC_2.3.3 + GLIBC_2.3.3 A + dladdr1 F + dlinfo F +GLIBC_2.3.4 + GLIBC_2.3.4 A + dlmopen F diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/libm.abilist b/sysdeps/unix/sysv/linux/alpha/nptl/libm.abilist new file mode 100644 index 0000000000..9c4170dbe4 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/nptl/libm.abilist @@ -0,0 +1,557 @@ +GLIBC_2.0 + GLIBC_2.0 A + _LIB_VERSION D 0x4 + __atan2 F + acos F + acosf F + acosh F + acoshf F + acoshl F + acosl F + asin F + asinf F + asinh F + asinhf F + asinhl F + asinl F + atan F + atan2 F + atan2f F + atan2l F + atanf F + atanh F + atanhf F + atanhl F + atanl F + cbrt F + cbrtf F + cbrtl F + ceil F + ceilf F + ceill F + copysign F + copysignf F + copysignl F + cos F + cosf F + cosh F + coshf F + coshl F + cosl F + drem F + dremf F + dreml F + erf F + erfc F + erfcf F + erfcl F + erff F + erfl F + exp F + expf F + expl F + expm1 F + expm1f F + expm1l F + fabs F + fabsf F + fabsl F + finite F + finitef F + finitel F + floor F + floorf F + floorl F + fmod F + fmodf F + fmodl F + frexp F + frexpf F + frexpl F + gamma F + gammaf F + gammal F + hypot F + hypotf F + hypotl F + ilogb F + ilogbf F + ilogbl F + j0 F + j0f F + j0l F + j1 F + j1f F + j1l F + jn F + jnf F + jnl F + ldexp F + ldexpf F + ldexpl F + lgamma F + lgamma_r F + lgammaf F + lgammaf_r F + lgammal F + lgammal_r F + log F + log10 F + log10f F + log10l F + log1p F + log1pf F + log1pl F + logb F + logbf F + logbl F + logf F + logl F + matherr F + modf F + modff F + modfl F + nextafter F + nextafterf F + nextafterl F + pow F + powf F + powl F + remainder F + remainderf F + remainderl F + rint F + rintf F + rintl F + scalb F + scalbf F + scalbl F + scalbn F + scalbnf F + scalbnl F + signgam D 0x4 + significand F + significandf F + significandl F + sin F + sinf F + sinh F + sinhf F + sinhl F + sinl F + sqrt F + sqrtf F + sqrtl F + tan F + tanf F + tanh F + tanhf F + tanhl F + tanl F + y0 F + y0f F + y0l F + y1 F + y1f F + y1l F + yn F + ynf F + ynl F +GLIBC_2.1 + GLIBC_2.1 A + __clog10 F + __clog10f F + __clog10l F + __finite F + __finitef F + __finitel F + __fpclassify F + __fpclassifyf F + __signbit F + __signbitf F + cabs F + cabsf F + cabsl F + cacos F + cacosf F + cacosh F + cacoshf F + cacoshl F + cacosl F + carg F + cargf F + cargl F + casin F + casinf F + casinh F + casinhf F + casinhl F + casinl F + catan F + catanf F + catanh F + catanhf F + catanhl F + catanl F + ccos F + ccosf F + ccosh F + ccoshf F + ccoshl F + ccosl F + cexp F + cexpf F + cexpl F + cimag F + cimagf F + cimagl F + clog F + clog10 F + clog10f F + clog10l F + clogf F + clogl F + conj F + conjf F + conjl F + cpow F + cpowf F + cpowl F + cproj F + cprojf F + cprojl F + creal F + crealf F + creall F + csin F + csinf F + csinh F + csinhf F + csinhl F + csinl F + csqrt F + csqrtf F + csqrtl F + ctan F + ctanf F + ctanh F + ctanhf F + ctanhl F + ctanl F + exp10 F + exp10f F + exp10l F + exp2 F + exp2f F + fdim F + fdimf F + fdiml F + feclearexcept F + fegetenv F + fegetexceptflag F + fegetround F + feholdexcept F + feraiseexcept F + fesetenv F + fesetexceptflag F + fesetround F + fetestexcept F + feupdateenv F + fma F + fmaf F + fmal F + fmax F + fmaxf F + fmaxl F + fmin F + fminf F + fminl F + llrint F + llrintf F + llrintl F + llround F + llroundf F + llroundl F + log2 F + log2f F + log2l F + lrint F + lrintf F + lrintl F + lround F + lroundf F + lroundl F + nan F + nanf F + nanl F + nearbyint F + nearbyintf F + nearbyintl F + nexttoward F + nexttowardf F + nexttowardl F + pow10 F + pow10f F + pow10l F + remquo F + remquof F + remquol F + round F + roundf F + roundl F + scalbln F + scalblnf F + scalblnl F + sincos F + sincosf F + sincosl F + tgamma F + tgammaf F + tgammal F + trunc F + truncf F + truncl F +GLIBC_2.15 + GLIBC_2.15 A + __acos_finite F + __acosf_finite F + __acosh_finite F + __acoshf_finite F + __acoshl_finite F + __acosl_finite F + __asin_finite F + __asinf_finite F + __asinl_finite F + __atan2_finite F + __atan2f_finite F + __atan2l_finite F + __atanh_finite F + __atanhf_finite F + __atanhl_finite F + __cosh_finite F + __coshf_finite F + __coshl_finite F + __exp10_finite F + __exp10f_finite F + __exp10l_finite F + __exp2_finite F + __exp2f_finite F + __exp2l_finite F + __exp_finite F + __expf_finite F + __expl_finite F + __fmod_finite F + __fmodf_finite F + __fmodl_finite F + __gamma_r_finite F + __gammaf_r_finite F + __gammal_r_finite F + __hypot_finite F + __hypotf_finite F + __hypotl_finite F + __j0_finite F + __j0f_finite F + __j0l_finite F + __j1_finite F + __j1f_finite F + __j1l_finite F + __jn_finite F + __jnf_finite F + __jnl_finite F + __lgamma_r_finite F + __lgammaf_r_finite F + __lgammal_r_finite F + __log10_finite F + __log10f_finite F + __log10l_finite F + __log2_finite F + __log2f_finite F + __log2l_finite F + __log_finite F + __logf_finite F + __logl_finite F + __pow_finite F + __powf_finite F + __powl_finite F + __remainder_finite F + __remainderf_finite F + __remainderl_finite F + __scalb_finite F + __scalbf_finite F + __scalbl_finite F + __sinh_finite F + __sinhf_finite F + __sinhl_finite F + __y0_finite F + __y0f_finite F + __y0l_finite F + __y1_finite F + __y1f_finite F + __y1l_finite F + __yn_finite F + __ynf_finite F + __ynl_finite F +GLIBC_2.2 + GLIBC_2.2 A + feclearexcept F + fedisableexcept F + feenableexcept F + fegetenv F + fegetexcept F + fegetexceptflag F + feraiseexcept F + fesetenv F + fesetexceptflag F + feupdateenv F +GLIBC_2.3.4 + GLIBC_2.3.4 A + __c1_cabsf F + __c1_cacosf F + __c1_cacoshf F + __c1_cargf F + __c1_casinf F + __c1_casinhf F + __c1_catanf F + __c1_catanhf F + __c1_ccosf F + __c1_ccoshf F + __c1_cexpf F + __c1_cimagf F + __c1_clog10f F + __c1_clogf F + __c1_conjf F + __c1_cpowf F + __c1_cprojf F + __c1_crealf F + __c1_csinf F + __c1_csinhf F + __c1_csqrtf F + __c1_ctanf F + __c1_ctanhf F + cabsf F + cacosf F + cacoshf F + cargf F + casinf F + casinhf F + catanf F + catanhf F + ccosf F + ccoshf F + cexpf F + cimagf F + clog10f F + clogf F + conjf F + cpowf F + cprojf F + crealf F + csinf F + csinhf F + csqrtf F + ctanf F + ctanhf F +GLIBC_2.4 + GLIBC_2.4 A + __clog10l F + __finitel F + __fpclassifyl F + __nldbl_nexttowardf F + __signbitl F + acoshl F + acosl F + asinhl F + asinl F + atan2l F + atanhl F + atanl F + cabsl F + cacoshl F + cacosl F + cargl F + casinhl F + casinl F + catanhl F + catanl F + cbrtl F + ccoshl F + ccosl F + ceill F + cexpl F + cimagl F + clog10l F + clogl F + conjl F + copysignl F + coshl F + cosl F + cpowl F + cprojl F + creall F + csinhl F + csinl F + csqrtl F + ctanhl F + ctanl F + dreml F + erfcl F + erfl F + exp10l F + exp2l F + expl F + expm1l F + fabsl F + fdiml F + finitel F + floorl F + fmal F + fmaxl F + fminl F + fmodl F + frexpl F + gammal F + hypotl F + ilogbl F + j0l F + j1l F + jnl F + ldexpl F + lgammal F + lgammal_r F + llrintl F + llroundl F + log10l F + log1pl F + log2l F + logbl F + logl F + lrintl F + lroundl F + modfl F + nanl F + nearbyintl F + nextafterl F + nexttoward F + nexttowardf F + nexttowardl F + pow10l F + powl F + remainderl F + remquol F + rintl F + roundl F + scalbl F + scalblnl F + scalbnl F + significandl F + sincosl F + sinhl F + sinl F + sqrtl F + tanhl F + tanl F + tgammal F + truncl F + y0l F + y1l F + ynl F diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/libnsl.abilist b/sysdeps/unix/sysv/linux/alpha/nptl/libnsl.abilist new file mode 100644 index 0000000000..4241e2d887 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/nptl/libnsl.abilist @@ -0,0 +1,127 @@ +GLIBC_2.0 + GLIBC_2.0 A + __yp_check F + xdr_domainname F + xdr_keydat F + xdr_mapname F + xdr_peername F + xdr_valdat F + xdr_yp_buf F + xdr_ypbind_binding F + xdr_ypbind_resp F + xdr_ypbind_resptype F + xdr_ypbind_setdom F + xdr_ypdelete_args F + xdr_ypmap_parms F + xdr_ypmaplist F + xdr_yppush_status F + xdr_yppushresp_xfr F + xdr_ypreq_key F + xdr_ypreq_nokey F + xdr_ypreq_xfr F + xdr_ypresp_all F + xdr_ypresp_key_val F + xdr_ypresp_maplist F + xdr_ypresp_master F + xdr_ypresp_order F + xdr_ypresp_val F + xdr_ypresp_xfr F + xdr_ypstat F + xdr_ypupdate_args F + xdr_ypxfrstat F + yp_all F + yp_bind F + yp_first F + yp_get_default_domain F + yp_maplist F + yp_master F + yp_match F + yp_next F + yp_order F + yp_unbind F + yp_update F + ypbinderr_string F + yperr_string F + ypprot_err F +GLIBC_2.1 + GLIBC_2.1 A + __free_fdresult F + __nis_default_access F + __nis_default_group F + __nis_default_owner F + __nis_default_ttl F + __nis_finddirectory F + __nis_hash F + __nisbind_connect F + __nisbind_create F + __nisbind_destroy F + __nisbind_next F + nis_add F + nis_add_entry F + nis_addmember F + nis_checkpoint F + nis_clone_directory F + nis_clone_object F + nis_clone_result F + nis_creategroup F + nis_destroy_object F + nis_destroygroup F + nis_dir_cmp F + nis_domain_of F + nis_domain_of_r F + nis_first_entry F + nis_free_directory F + nis_free_object F + nis_free_request F + nis_freenames F + nis_freeresult F + nis_freeservlist F + nis_freetags F + nis_getnames F + nis_getservlist F + nis_ismember F + nis_leaf_of F + nis_leaf_of_r F + nis_lerror F + nis_list F + nis_local_directory F + nis_local_group F + nis_local_host F + nis_local_principal F + nis_lookup F + nis_mkdir F + nis_modify F + nis_modify_entry F + nis_name_of F + nis_name_of_r F + nis_next_entry F + nis_perror F + nis_ping F + nis_print_directory F + nis_print_entry F + nis_print_group F + nis_print_group_entry F + nis_print_link F + nis_print_object F + nis_print_result F + nis_print_rights F + nis_print_table F + nis_read_obj F + nis_remove F + nis_remove_entry F + nis_removemember F + nis_rmdir F + nis_servstate F + nis_sperrno F + nis_sperror F + nis_sperror_r F + nis_stats F + nis_verifygroup F + nis_write_obj F + readColdStartFile F + writeColdStartFile F + xdr_cback_data F + xdr_obj_p F +GLIBC_2.2 + GLIBC_2.2 A + xdr_ypall F diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/libpthread.abilist b/sysdeps/unix/sysv/linux/alpha/nptl/libpthread.abilist new file mode 100644 index 0000000000..96267302de --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/nptl/libpthread.abilist @@ -0,0 +1,269 @@ +GLIBC_2.0 + GLIBC_2.0 A + _IO_flockfile F + _IO_ftrylockfile F + _IO_funlockfile F + __close F + __connect F + __errno_location F + __fcntl F + __fork F + __h_errno_location F + __lseek F + __open F + __pthread_getspecific F + __pthread_key_create F + __pthread_mutex_destroy F + __pthread_mutex_init F + __pthread_mutex_lock F + __pthread_mutex_trylock F + __pthread_mutex_unlock F + __pthread_mutexattr_destroy F + __pthread_mutexattr_init F + __pthread_mutexattr_settype F + __pthread_once F + __pthread_setspecific F + __read F + __send F + __sigaction F + __wait F + __write F + _pthread_cleanup_pop F + _pthread_cleanup_pop_restore F + _pthread_cleanup_push F + _pthread_cleanup_push_defer F + accept F + close F + connect F + fcntl F + flockfile F + fork F + fsync F + ftrylockfile F + funlockfile F + longjmp F + lseek F + msync F + nanosleep F + open F + pause F + pthread_atfork F + pthread_attr_destroy F + pthread_attr_getdetachstate F + pthread_attr_getinheritsched F + pthread_attr_getschedparam F + pthread_attr_getschedpolicy F + pthread_attr_getscope F + pthread_attr_init F + pthread_attr_setdetachstate F + pthread_attr_setinheritsched F + pthread_attr_setschedparam F + pthread_attr_setschedpolicy F + pthread_attr_setscope F + pthread_cancel F + pthread_cond_broadcast F + pthread_cond_destroy F + pthread_cond_init F + pthread_cond_signal F + pthread_cond_timedwait F + pthread_cond_wait F + pthread_condattr_destroy F + pthread_condattr_init F + pthread_create F + pthread_detach F + pthread_equal F + pthread_exit F + pthread_getschedparam F + pthread_getspecific F + pthread_join F + pthread_key_create F + pthread_key_delete F + pthread_kill F + pthread_kill_other_threads_np F + pthread_mutex_destroy F + pthread_mutex_init F + pthread_mutex_lock F + pthread_mutex_trylock F + pthread_mutex_unlock F + pthread_mutexattr_destroy F + pthread_mutexattr_getkind_np F + pthread_mutexattr_init F + pthread_mutexattr_setkind_np F + pthread_once F + pthread_self F + pthread_setcancelstate F + pthread_setcanceltype F + pthread_setschedparam F + pthread_setspecific F + pthread_sigmask F + pthread_testcancel F + raise F + read F + recv F + recvfrom F + recvmsg F + sem_destroy F + sem_getvalue F + sem_init F + sem_post F + sem_trywait F + sem_wait F + send F + sendmsg F + sendto F + sigaction F + siglongjmp F + sigwait F + system F + tcdrain F + vfork F + wait F + waitpid F + write F +GLIBC_2.1 + GLIBC_2.1 A + __libc_allocate_rtsig F + __libc_current_sigrtmax F + __libc_current_sigrtmin F + pthread_attr_getguardsize F + pthread_attr_getstackaddr F + pthread_attr_getstacksize F + pthread_attr_init F + pthread_attr_setguardsize F + pthread_attr_setstackaddr F + pthread_attr_setstacksize F + pthread_create F + pthread_getconcurrency F + pthread_mutexattr_gettype F + pthread_mutexattr_settype F + pthread_rwlock_destroy F + pthread_rwlock_init F + pthread_rwlock_rdlock F + pthread_rwlock_tryrdlock F + pthread_rwlock_trywrlock F + pthread_rwlock_unlock F + pthread_rwlock_wrlock F + pthread_rwlockattr_destroy F + pthread_rwlockattr_getkind_np F + pthread_rwlockattr_getpshared F + pthread_rwlockattr_init F + pthread_rwlockattr_setkind_np F + pthread_rwlockattr_setpshared F + pthread_setconcurrency F + sem_destroy F + sem_getvalue F + sem_init F + sem_post F + sem_trywait F + sem_wait F +GLIBC_2.1.1 + GLIBC_2.1.1 A + sem_close F + sem_open F + sem_unlink F +GLIBC_2.1.2 + GLIBC_2.1.2 A + __vfork F +GLIBC_2.11 + GLIBC_2.11 A + pthread_sigqueue F +GLIBC_2.12 + GLIBC_2.12 A + pthread_getname_np F + pthread_mutex_consistent F + pthread_mutexattr_getrobust F + pthread_mutexattr_setrobust F + pthread_setname_np F +GLIBC_2.2 + GLIBC_2.2 A + __open64 F + __pread64 F + __pthread_rwlock_destroy F + __pthread_rwlock_init F + __pthread_rwlock_rdlock F + __pthread_rwlock_tryrdlock F + __pthread_rwlock_trywrlock F + __pthread_rwlock_unlock F + __pthread_rwlock_wrlock F + __pwrite64 F + __res_state F + lseek64 F + open64 F + pread F + pread64 F + pthread_attr_getstack F + pthread_attr_setstack F + pthread_barrier_destroy F + pthread_barrier_init F + pthread_barrier_wait F + pthread_barrierattr_destroy F + pthread_barrierattr_init F + pthread_barrierattr_setpshared F + pthread_condattr_getpshared F + pthread_condattr_setpshared F + pthread_getcpuclockid F + pthread_mutex_timedlock F + pthread_mutexattr_getpshared F + pthread_mutexattr_setpshared F + pthread_rwlock_timedrdlock F + pthread_rwlock_timedwrlock F + pthread_spin_destroy F + pthread_spin_init F + pthread_spin_lock F + pthread_spin_trylock F + pthread_spin_unlock F + pthread_yield F + pwrite F + pwrite64 F + sem_timedwait F +GLIBC_2.2.3 + GLIBC_2.2.3 A + pthread_getattr_np F +GLIBC_2.2.6 + GLIBC_2.2.6 A + __nanosleep F +GLIBC_2.3.2 + GLIBC_2.3.2 A + pthread_cond_broadcast F + pthread_cond_destroy F + pthread_cond_init F + pthread_cond_signal F + pthread_cond_timedwait F + pthread_cond_wait F +GLIBC_2.3.3 + GLIBC_2.3.3 A + __pthread_cleanup_routine F + __pthread_register_cancel F + __pthread_register_cancel_defer F + __pthread_unregister_cancel F + __pthread_unregister_cancel_restore F + __pthread_unwind_next F + pthread_attr_getaffinity_np F + pthread_attr_setaffinity_np F + pthread_attr_setstack F + pthread_attr_setstacksize F + pthread_barrierattr_getpshared F + pthread_condattr_getclock F + pthread_condattr_setclock F + pthread_getaffinity_np F + pthread_setaffinity_np F + pthread_timedjoin_np F + pthread_tryjoin_np F +GLIBC_2.3.4 + GLIBC_2.3.4 A + pthread_attr_getaffinity_np F + pthread_attr_setaffinity_np F + pthread_getaffinity_np F + pthread_setaffinity_np F + pthread_setschedprio F +GLIBC_2.4 + GLIBC_2.4 A + pthread_mutex_consistent_np F + pthread_mutex_getprioceiling F + pthread_mutex_setprioceiling F + pthread_mutexattr_getprioceiling F + pthread_mutexattr_getprotocol F + pthread_mutexattr_getrobust_np F + pthread_mutexattr_setprioceiling F + pthread_mutexattr_setprotocol F + pthread_mutexattr_setrobust_np F diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/libresolv.abilist b/sysdeps/unix/sysv/linux/alpha/nptl/libresolv.abilist new file mode 100644 index 0000000000..808d0f2f74 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/nptl/libresolv.abilist @@ -0,0 +1,104 @@ +GLIBC_2.0 + GLIBC_2.0 A + __b64_ntop F + __b64_pton F + __dn_comp F + __dn_count_labels F + __dn_skipname F + __fp_nquery F + __fp_query F + __fp_resstat F + __hostalias F + __loc_aton F + __loc_ntoa F + __p_cdname F + __p_cdnname F + __p_class F + __p_class_syms D 0xa8 + __p_fqname F + __p_fqnname F + __p_option F + __p_query F + __p_secstodate F + __p_time F + __p_type F + __p_type_syms D 0x450 + __putlong F + __putshort F + __res_close F + __res_dnok F + __res_hnok F + __res_isourserver F + __res_mailok F + __res_nameinquery F + __res_ownok F + __res_queriesmatch F + __res_send F + __sym_ntop F + __sym_ntos F + __sym_ston F + _gethtbyaddr F + _gethtbyname F + _gethtbyname2 F + _gethtent F + _getlong F + _getshort F + _res_opcodes D 0x80 + _sethtent F + dn_expand F + inet_net_ntop F + inet_net_pton F + inet_neta F + res_gethostbyaddr F + res_gethostbyname F + res_gethostbyname2 F + res_mkquery F + res_query F + res_querydomain F + res_search F + res_send_setqhook F + res_send_setrhook F +GLIBC_2.2 + GLIBC_2.2 A + __dn_expand F + __res_hostalias F + __res_mkquery F + __res_nmkquery F + __res_nquery F + __res_nquerydomain F + __res_nsearch F + __res_nsend F + __res_query F + __res_querydomain F + __res_search F +GLIBC_2.3.2 + GLIBC_2.3.2 A + __p_rcode F +GLIBC_2.9 + GLIBC_2.9 A + ns_datetosecs F + ns_format_ttl F + ns_get16 F + ns_get32 F + ns_initparse F + ns_makecanon F + ns_msg_getflag F + ns_name_compress F + ns_name_ntol F + ns_name_ntop F + ns_name_pack F + ns_name_pton F + ns_name_rollback F + ns_name_skip F + ns_name_uncompress F + ns_name_unpack F + ns_parse_ttl F + ns_parserr F + ns_put16 F + ns_put32 F + ns_samedomain F + ns_samename F + ns_skiprr F + ns_sprintrr F + ns_sprintrrf F + ns_subdomain F diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/librt.abilist b/sysdeps/unix/sysv/linux/alpha/nptl/librt.abilist new file mode 100644 index 0000000000..d710117080 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/nptl/librt.abilist @@ -0,0 +1,63 @@ +GLIBC_2.1 + GLIBC_2.1 A + aio_cancel F + aio_cancel64 F + aio_error F + aio_error64 F + aio_fsync F + aio_fsync64 F + aio_init F + aio_read F + aio_read64 F + aio_return F + aio_return64 F + aio_suspend F + aio_suspend64 F + aio_write F + aio_write64 F + lio_listio F + lio_listio64 F +GLIBC_2.2 + GLIBC_2.2 A + clock_getcpuclockid F + clock_getres F + clock_gettime F + clock_nanosleep F + clock_settime F + shm_open F + shm_unlink F + timer_create F + timer_delete F + timer_getoverrun F + timer_gettime F + timer_settime F +GLIBC_2.3 + GLIBC_2.3 A + aio_cancel F + aio_cancel64 F +GLIBC_2.3.3 + GLIBC_2.3.3 A + timer_create F + timer_delete F + timer_getoverrun F + timer_gettime F + timer_settime F +GLIBC_2.3.4 + GLIBC_2.3.4 A + mq_close F + mq_getattr F + mq_notify F + mq_open F + mq_receive F + mq_send F + mq_setattr F + mq_timedreceive F + mq_timedsend F + mq_unlink F +GLIBC_2.4 + GLIBC_2.4 A + lio_listio F + lio_listio64 F +GLIBC_2.7 + GLIBC_2.7 A + __mq_open_2 F diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/libthread_db.abilist b/sysdeps/unix/sysv/linux/alpha/nptl/libthread_db.abilist new file mode 100644 index 0000000000..f33138067c --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/nptl/libthread_db.abilist @@ -0,0 +1,48 @@ +GLIBC_2.1.3 + GLIBC_2.1.3 A + td_init F + td_log F + td_ta_clear_event F + td_ta_delete F + td_ta_enable_stats F + td_ta_event_addr F + td_ta_event_getmsg F + td_ta_get_nthreads F + td_ta_get_ph F + td_ta_get_stats F + td_ta_map_id2thr F + td_ta_map_lwp2thr F + td_ta_new F + td_ta_reset_stats F + td_ta_set_event F + td_ta_setconcurrency F + td_ta_thr_iter F + td_ta_tsd_iter F + td_thr_clear_event F + td_thr_dbresume F + td_thr_dbsuspend F + td_thr_event_enable F + td_thr_event_getmsg F + td_thr_get_info F + td_thr_getfpregs F + td_thr_getgregs F + td_thr_getxregs F + td_thr_getxregsize F + td_thr_set_event F + td_thr_setfpregs F + td_thr_setgregs F + td_thr_setprio F + td_thr_setsigpending F + td_thr_setxregs F + td_thr_sigsetmask F + td_thr_tsd F + td_thr_validate F +GLIBC_2.2.3 + GLIBC_2.2.3 A + td_symbol_list F +GLIBC_2.3 + GLIBC_2.3 A + td_thr_tls_get_addr F +GLIBC_2.3.3 + GLIBC_2.3.3 A + td_thr_tlsbase F diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/libutil.abilist b/sysdeps/unix/sysv/linux/alpha/nptl/libutil.abilist new file mode 100644 index 0000000000..7422687e3c --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/nptl/libutil.abilist @@ -0,0 +1,8 @@ +GLIBC_2.0 + GLIBC_2.0 A + forkpty F + login F + login_tty F + logout F + logwtmp F + openpty F From 23e9f8631f00a80a1e65dcc77acb5791f3789094 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 24 May 2012 20:23:18 -0400 Subject: [PATCH 4415/4487] ia64: mman.h: define MADV_DO{,NT}DUMP Add new types from linux-3.4. Signed-off-by: Mike Frysinger --- ChangeLog.ia64 | 5 +++++ sysdeps/unix/sysv/linux/ia64/bits/mman.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog.ia64 b/ChangeLog.ia64 index fc0befbabd..29c8799fe5 100644 --- a/ChangeLog.ia64 +++ b/ChangeLog.ia64 @@ -1,3 +1,8 @@ +2012-05-24 Mike Frysinger + + * sysdeps/unix/sysv/linux/ia64/bits/mman.h (MADV_DONTDUMP): Define. + (MADV_DODUMP): Likewise. + 2012-05-23 Mike Frysinger * sysdeps/unix/sysv/linux/ia64/bits/siginfo.h: Add forward diff --git a/sysdeps/unix/sysv/linux/ia64/bits/mman.h b/sysdeps/unix/sysv/linux/ia64/bits/mman.h index 01c6b8ac2b..59285fef85 100644 --- a/sysdeps/unix/sysv/linux/ia64/bits/mman.h +++ b/sysdeps/unix/sysv/linux/ia64/bits/mman.h @@ -97,6 +97,9 @@ # define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */ # define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */ # define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */ +# define MADV_DONTDUMP 16 /* Explicity exclude from the core dump, + overrides the coredump filter bits. */ +# define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag. */ # define MADV_HWPOISON 100 /* Poison a page for testing. */ #endif From 5b0ef573d2ee116009b324d442cb74b9a9c62bdf Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Fri, 25 May 2012 01:16:04 -0400 Subject: [PATCH 4416/4487] ia64: add getauxval to abilist Signed-off-by: Mike Frysinger --- ChangeLog.ia64 | 4 ++++ sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist | 2 ++ 2 files changed, 6 insertions(+) diff --git a/ChangeLog.ia64 b/ChangeLog.ia64 index 29c8799fe5..429cdfbcb6 100644 --- a/ChangeLog.ia64 +++ b/ChangeLog.ia64 @@ -1,3 +1,7 @@ +2012-05-25 Mike Frysinger + + * sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist: Update. + 2012-05-24 Mike Frysinger * sysdeps/unix/sysv/linux/ia64/bits/mman.h (MADV_DONTDUMP): Define. diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist b/sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist index a8cf65c85b..6939ad73bc 100644 --- a/sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist +++ b/sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist @@ -68,11 +68,13 @@ GLIBC_2.15 scandirat64 F GLIBC_2.16 GLIBC_2.16 A + __getauxval F __poll_chk F __ppoll_chk F aligned_alloc F c16rtomb F c32rtomb F + getauxval F mbrtoc16 F mbrtoc32 F timespec_get F From 73da6bacfd1647612a51e1b67d6bc93c4f7436cd Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 25 May 2012 12:07:05 -0400 Subject: [PATCH 4417/4487] arm: Pass hwcap to ifuncs. * sysdeps/arm/dl-irel.h (elf_ifunc_invoke): Pass dl_hwcap. * sysdeps/arm/dl-machine.h (elf_machine_rel): Use elf_ifunc_invoke. (elf_machine_rela): Likewise. --- ChangeLog.arm | 6 ++++++ sysdeps/arm/dl-irel.h | 2 +- sysdeps/arm/dl-machine.h | 5 +++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index f6eac63fed..778b4d7822 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,9 @@ +2012-05-25 Richard Henderson + + * sysdeps/arm/dl-irel.h (elf_ifunc_invoke): Pass dl_hwcap. + * sysdeps/arm/dl-machine.h (elf_machine_rel): Use elf_ifunc_invoke. + (elf_machine_rela): Likewise. + 2012-05-23 Joseph Myers * sysdeps/unix/sysv/linux/arm/bits/mman.h (MADV_DONTDUMP): Define. diff --git a/sysdeps/arm/dl-irel.h b/sysdeps/arm/dl-irel.h index 5141031cef..5b1964e90e 100644 --- a/sysdeps/arm/dl-irel.h +++ b/sysdeps/arm/dl-irel.h @@ -29,7 +29,7 @@ static inline Elf32_Addr __attribute ((always_inline)) elf_ifunc_invoke (Elf32_Addr addr) { - return ((Elf32_Addr (*) (void)) (addr)) (); + return ((Elf32_Addr (*) (unsigned long int)) (addr)) (GLRO(dl_hwcap)); } static inline void diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 58cf418c09..8d905e8ad9 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -25,6 +25,7 @@ #include #include #include +#include #define CLEAR_CACHE(BEG,END) \ INTERNAL_SYSCALL_ARM (cacheflush, , 3, (BEG), (END), 0) @@ -377,7 +378,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, && __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, 0) && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1) && __builtin_expect (!skip_ifunc, 1)) - value = ((Elf32_Addr (*) (void)) value) (); + value = elf_ifunc_invoke (value); switch (r_type) { @@ -551,7 +552,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, && __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, 0) && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1) && __builtin_expect (!skip_ifunc, 1)) - value = ((Elf32_Addr (*) (void)) value) (); + value = elf_ifunc_invoke (value); switch (r_type) { From 089d856f77a2383ef483e9905116e56c37009262 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 25 May 2012 19:21:15 +0000 Subject: [PATCH 4418/4487] Update MIPS kernel-features.h for removal of __ASSUME_32BITUIDS. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/kernel-features.h | 6 +----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index c341c74b4e..1fcbce5beb 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2012-05-25 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/kernel-features.h + (__ASSUME_32BITUIDS): Remove. + 2012-05-23 Steve Ellcey * sysdeps/unix/sysv/linux/mips/Makefile diff --git a/sysdeps/unix/sysv/linux/mips/kernel-features.h b/sysdeps/unix/sysv/linux/mips/kernel-features.h index 226b449ee1..70f1fc1ed4 100644 --- a/sysdeps/unix/sysv/linux/mips/kernel-features.h +++ b/sysdeps/unix/sysv/linux/mips/kernel-features.h @@ -1,6 +1,6 @@ /* Set flags signalling availability of kernel features based on given kernel version number. - Copyright (C) 1999-2003, 2004, 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 1999-2012 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 @@ -19,10 +19,6 @@ #include -/* Linux 2.3.39 introduced 32bit UID/GIDs. Some platforms had 32 - bit type all along. */ -#define __ASSUME_32BITUIDS 1 - /* MIPS platforms had IPC64 all along. */ #define __ASSUME_IPC64 1 From 4b5466f188c2a90a013e7339053826c655bd1f32 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 25 May 2012 22:31:59 +0000 Subject: [PATCH 4419/4487] Remove __ASSUME_NEW_GETRLIMIT_SYSCALL for ARM. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/kernel-features.h | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 778b4d7822..7b253dbdb3 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2012-05-25 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/kernel-features.h + (__ASSUME_NEW_GETRLIMIT_SYSCALL): Remove. + 2012-05-25 Richard Henderson * sysdeps/arm/dl-irel.h (elf_ifunc_invoke): Pass dl_hwcap. diff --git a/sysdeps/unix/sysv/linux/arm/kernel-features.h b/sysdeps/unix/sysv/linux/arm/kernel-features.h index 644d9ff103..3eeb075ea3 100644 --- a/sysdeps/unix/sysv/linux/arm/kernel-features.h +++ b/sysdeps/unix/sysv/linux/arm/kernel-features.h @@ -22,11 +22,6 @@ # define __ASSUME_UTIMES 1 #endif -/* The new getrlimit syscall was added sometime before 2.4.6. */ -#if __LINUX_KERNEL_VERSION >= 132102 -#define __ASSUME_NEW_GETRLIMIT_SYSCALL 1 -#endif - /* On ARM the truncate64/ftruncate64/mmap2/stat64/lstat64/fstat64 syscalls were introduced in 2.3.35. */ #if __LINUX_KERNEL_VERSION >= 131875 From 2a4c76a69243f4107d40a5bc669f7f229798956b Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 25 May 2012 23:57:48 +0200 Subject: [PATCH 4420/4487] m68k: remove pre-2.4 Linux kernel support for chown --- ChangeLog.m68k | 5 ++ sysdeps/unix/sysv/linux/m68k/chown.c | 68 ---------------------- sysdeps/unix/sysv/linux/m68k/syscalls.list | 2 + 3 files changed, 7 insertions(+), 68 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/m68k/chown.c diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 80557cb3b7..a97e3b4c34 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2012-05-26 Andreas Schwab + + * sysdeps/unix/sysv/linux/m68k/syscalls.list: Add chown. + * sysdeps/unix/sysv/linux/m68k/chown.c: Remove file. + 2012-05-23 Andreas Schwab * sysdeps/unix/sysv/linux/m68k/bits/mman.h (MADV_DONTDUMP) diff --git a/sysdeps/unix/sysv/linux/m68k/chown.c b/sysdeps/unix/sysv/linux/m68k/chown.c deleted file mode 100644 index 18d838ec8e..0000000000 --- a/sysdeps/unix/sysv/linux/m68k/chown.c +++ /dev/null @@ -1,68 +0,0 @@ -/* Copyright (C) 1998,2000,2002,2003,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 - 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, see - . */ - -#include -#include - -#include -#include -#include - -#include -#include - -#ifdef __NR_chown32 -# if __ASSUME_32BITUIDS == 0 -/* This variable is shared with all files that need to check for 32bit - uids. */ -extern int __libc_missing_32bit_uids; -# endif -#endif /* __NR_chown32 */ - -int -__chown (const char *file, uid_t owner, gid_t group) -{ -#if __ASSUME_32BITUIDS > 0 - return INLINE_SYSCALL (chown32, 3, CHECK_STRING (file), owner, group); -#else -# ifdef __NR_chown32 - if (__libc_missing_32bit_uids <= 0) - { - int result; - int saved_errno = errno; - - result = INLINE_SYSCALL (chown32, 3, CHECK_STRING (file), owner, group); - if (result == 0 || errno != ENOSYS) - return result; - - __set_errno (saved_errno); - __libc_missing_32bit_uids = 1; - } -# endif /* __NR_chown32 */ - - if (((owner + 1) > (gid_t) ((__kernel_uid_t) -1U)) - || ((group + 1) > (gid_t) ((__kernel_gid_t) -1U))) - { - __set_errno (EINVAL); - return -1; - } - - return INLINE_SYSCALL (chown, 3, CHECK_STRING (file), owner, group); -#endif -} -libc_hidden_def (__chown) -weak_alias (__chown, chown) diff --git a/sysdeps/unix/sysv/linux/m68k/syscalls.list b/sysdeps/unix/sysv/linux/m68k/syscalls.list index 3a1b7dbf89..1e27d8de71 100644 --- a/sysdeps/unix/sysv/linux/m68k/syscalls.list +++ b/sysdeps/unix/sysv/linux/m68k/syscalls.list @@ -1,5 +1,7 @@ # File name Caller Syscall name Args Strong name Weak names +chown - chown32 i:sii __chown chown + cacheflush EXTRA cacheflush i:iiii __cacheflush cacheflush prlimit64 EXTRA prlimit64 i:iipp prlimit64 fanotify_mark EXTRA fanotify_mark i:iiiiis fanotify_mark From 9aaedac0c8ace478f1686c2be64e1800aa9f305c Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 26 May 2012 01:01:25 +0200 Subject: [PATCH 4421/4487] m68k: remove __ASSUME_NEW_GETRLIMIT_SYSCALL --- ChangeLog.m68k | 3 +++ sysdeps/unix/sysv/linux/m68k/kernel-features.h | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index a97e3b4c34..21191a812c 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,5 +1,8 @@ 2012-05-26 Andreas Schwab + * sysdeps/unix/sysv/linux/m68k/kernel-features.h + (__ASSUME_NEW_GETRLIMIT_SYSCALL): Remove. + * sysdeps/unix/sysv/linux/m68k/syscalls.list: Add chown. * sysdeps/unix/sysv/linux/m68k/chown.c: Remove file. diff --git a/sysdeps/unix/sysv/linux/m68k/kernel-features.h b/sysdeps/unix/sysv/linux/m68k/kernel-features.h index 2d8882e556..cfaf8b7deb 100644 --- a/sysdeps/unix/sysv/linux/m68k/kernel-features.h +++ b/sysdeps/unix/sysv/linux/m68k/kernel-features.h @@ -24,7 +24,6 @@ # define __ASSUME_STAT64_SYSCALL 1 # define __ASSUME_FCNTL64 1 # define __ASSUME_VFORK_SYSCALL 1 -# define __ASSUME_NEW_GETRLIMIT_SYSCALL 1 #endif /* Many syscalls were added in 2.6.10 for m68k. */ From 331239ed6372554fa633d4128f538ea90e8d2246 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sat, 26 May 2012 19:06:08 +0000 Subject: [PATCH 4422/4487] Update ARM for removal of m68k chown.c. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/chown.c | 1 - sysdeps/unix/sysv/linux/arm/syscalls.list | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) delete mode 100644 sysdeps/unix/sysv/linux/arm/chown.c diff --git a/ChangeLog.arm b/ChangeLog.arm index 7b253dbdb3..ec63edbfcd 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2012-05-26 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/syscalls.list (chown): New. + * sysdeps/unix/sysv/linux/arm/chown.c: Remove. + 2012-05-25 Joseph Myers * sysdeps/unix/sysv/linux/arm/kernel-features.h diff --git a/sysdeps/unix/sysv/linux/arm/chown.c b/sysdeps/unix/sysv/linux/arm/chown.c deleted file mode 100644 index 1961622564..0000000000 --- a/sysdeps/unix/sysv/linux/arm/chown.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/arm/syscalls.list b/sysdeps/unix/sysv/linux/arm/syscalls.list index b8852d9406..c5b1fe725f 100644 --- a/sysdeps/unix/sysv/linux/arm/syscalls.list +++ b/sysdeps/unix/sysv/linux/arm/syscalls.list @@ -1,5 +1,7 @@ # File name Caller Syscall name # args Strong name Weak names +chown - chown32 i:sii __chown chown + prlimit64 EXTRA prlimit64 i:iipp prlimit64 fanotify_mark EXTRA fanotify_mark i:iiiiis fanotify_mark From 0387d09372bfd3ee335c95de99a1c6dbea320af0 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sat, 26 May 2012 20:13:48 +0000 Subject: [PATCH 4423/4487] Add mips32 versions of otherwise empty ABI baselines. --- ChangeLog.mips | 19 +++++++++++++++++++ .../linux/mips/mips32/nptl/libcidn.abilist | 2 ++ .../mips/mips32/nptl/libnss_compat.abilist | 2 ++ .../linux/mips/mips32/nptl/libnss_db.abilist | 2 ++ .../linux/mips/mips32/nptl/libnss_dns.abilist | 2 ++ .../mips/mips32/nptl/libnss_files.abilist | 2 ++ .../mips/mips32/nptl/libnss_hesiod.abilist | 2 ++ .../linux/mips/mips32/nptl/libnss_nis.abilist | 2 ++ .../mips/mips32/nptl/libnss_nisplus.abilist | 2 ++ 9 files changed, 35 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/mips/mips32/nptl/libcidn.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_compat.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_db.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_dns.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_files.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_hesiod.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_nis.abilist create mode 100644 sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_nisplus.abilist diff --git a/ChangeLog.mips b/ChangeLog.mips index 1fcbce5beb..b7c1ff32b5 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,22 @@ +2012-05-26 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/mips32/nptl/libcidn.abilist: New + file. + * sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_compat.abilist: + Likewise. + * sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_db.abilist: + Likewise. + * sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_dns.abilist: + Likewise. + * sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_files.abilist: + Likewise. + * sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_hesiod.abilist: + Likewise. + * sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_nis.abilist: + Likewise. + * sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_nisplus.abilist: + Likewise. + 2012-05-25 Joseph Myers * sysdeps/unix/sysv/linux/mips/kernel-features.h diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libcidn.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libcidn.abilist new file mode 100644 index 0000000000..426f583bab --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libcidn.abilist @@ -0,0 +1,2 @@ +_gp_disp + A diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_compat.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_compat.abilist new file mode 100644 index 0000000000..426f583bab --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_compat.abilist @@ -0,0 +1,2 @@ +_gp_disp + A diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_db.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_db.abilist new file mode 100644 index 0000000000..426f583bab --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_db.abilist @@ -0,0 +1,2 @@ +_gp_disp + A diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_dns.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_dns.abilist new file mode 100644 index 0000000000..426f583bab --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_dns.abilist @@ -0,0 +1,2 @@ +_gp_disp + A diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_files.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_files.abilist new file mode 100644 index 0000000000..426f583bab --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_files.abilist @@ -0,0 +1,2 @@ +_gp_disp + A diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_hesiod.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_hesiod.abilist new file mode 100644 index 0000000000..426f583bab --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_hesiod.abilist @@ -0,0 +1,2 @@ +_gp_disp + A diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_nis.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_nis.abilist new file mode 100644 index 0000000000..426f583bab --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_nis.abilist @@ -0,0 +1,2 @@ +_gp_disp + A diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_nisplus.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_nisplus.abilist new file mode 100644 index 0000000000..426f583bab --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_nisplus.abilist @@ -0,0 +1,2 @@ +_gp_disp + A From d7a10f9610f4a1ef8abd678f85fbcbc05874b856 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 30 May 2012 09:57:22 +0000 Subject: [PATCH 4424/4487] Replace __pthread_once_internal alias by hidden_def for ARM. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index ec63edbfcd..1d684d2050 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2012-05-30 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c: Replace + _internal alias by hidden_def. + 2012-05-26 Joseph Myers * sysdeps/unix/sysv/linux/arm/syscalls.list (chown): New. diff --git a/sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c b/sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c index 5c6d26d3e2..eea1287fd1 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c +++ b/sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2004-2012 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 @@ -86,7 +86,7 @@ __pthread_once (pthread_once_t *once_control, void (*init_routine) (void)) return 0; } weak_alias (__pthread_once, pthread_once) -strong_alias (__pthread_once, __pthread_once_internal) +hidden_def (__pthread_once) #if defined(__USING_SJLJ_EXCEPTIONS__) && !defined(__PIC__) /* When statically linked, if pthread_create is used, this file From cc824a2e80511684f8637aacba784e7c57ac3b8b Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 30 May 2012 09:58:18 +0000 Subject: [PATCH 4425/4487] Replace __pthread_once_internal alias by hidden_def for MIPS. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/nptl/pthread_once.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index b7c1ff32b5..d0585892bd 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2012-05-30 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/nptl/pthread_once.c: Replace + _internal alias by hidden_def. + 2012-05-26 Joseph Myers * sysdeps/unix/sysv/linux/mips/mips32/nptl/libcidn.abilist: New diff --git a/sysdeps/unix/sysv/linux/mips/nptl/pthread_once.c b/sysdeps/unix/sysv/linux/mips/nptl/pthread_once.c index 0b62076eff..308da8bbce 100644 --- a/sysdeps/unix/sysv/linux/mips/nptl/pthread_once.c +++ b/sysdeps/unix/sysv/linux/mips/nptl/pthread_once.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2003-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek , 2003. @@ -90,4 +90,4 @@ __pthread_once (once_control, init_routine) return 0; } weak_alias (__pthread_once, pthread_once) -strong_alias (__pthread_once, __pthread_once_internal) +hidden_def (__pthread_once) From 17cb6fe2a41f91e518c6feaac766252afa2d5467 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 30 May 2012 10:07:11 +0000 Subject: [PATCH 4426/4487] Remove SJLJ exceptions conditionals for ARM. --- ChangeLog.arm | 5 +++++ sysdeps/arm/start.S | 5 ----- sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c | 9 --------- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 1d684d2050..1737284c16 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,5 +1,10 @@ 2012-05-30 Joseph Myers + * sysdeps/arm/start.S [!__USING_SJLJ_EXCEPTIONS__]: Make code + unconditional. + * sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c + [__USING_SJLJ_EXCEPTIONS__ && !__PIC__]: Remove conditional code. + * sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c: Replace _internal alias by hidden_def. diff --git a/sysdeps/arm/start.S b/sysdeps/arm/start.S index 7f3de8c209..245d7aa571 100644 --- a/sysdeps/arm/start.S +++ b/sysdeps/arm/start.S @@ -73,10 +73,8 @@ .globl _start .type _start,#function _start: -#if !defined(__USING_SJLJ_EXCEPTIONS__) /* Protect against unhandled exceptions. */ .fnstart -#endif /* Clear the frame pointer and link register since this is the outermost frame. */ mov fp, #0 mov lr, #0 @@ -138,11 +136,8 @@ _start: .word main(GOT) #endif - -#if !defined(__USING_SJLJ_EXCEPTIONS__) .cantunwind .fnend -#endif /* Define a symbol for the first piece of initialized data. */ .data diff --git a/sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c b/sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c index eea1287fd1..0c03f1c816 100644 --- a/sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c +++ b/sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c @@ -87,12 +87,3 @@ __pthread_once (pthread_once_t *once_control, void (*init_routine) (void)) } weak_alias (__pthread_once, pthread_once) hidden_def (__pthread_once) - -#if defined(__USING_SJLJ_EXCEPTIONS__) && !defined(__PIC__) -/* When statically linked, if pthread_create is used, this file - will be brought in. The exception handling code in GCC assumes - that if pthread_create is available, so are these. */ -const void *include_pthread_getspecific attribute_hidden = pthread_getspecific; -const void *include_pthread_setspecific attribute_hidden = pthread_setspecific; -const void *include_pthread_key_create attribute_hidden = pthread_key_create; -#endif From 6042a7c296e387498f7e96df5e1f93e50d18a88d Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 30 May 2012 14:53:56 +0000 Subject: [PATCH 4427/4487] Remove __ASSUME_TRUNCATE64_SYSCALL for ARM. --- ChangeLog.arm | 3 +++ sysdeps/unix/sysv/linux/arm/kernel-features.h | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 1737284c16..9a3962e74c 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,5 +1,8 @@ 2012-05-30 Joseph Myers + * sysdeps/unix/sysv/linux/arm/kernel-features.h + (__ASSUME_TRUNCATE64_SYSCALL): Remove. + * sysdeps/arm/start.S [!__USING_SJLJ_EXCEPTIONS__]: Make code unconditional. * sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c diff --git a/sysdeps/unix/sysv/linux/arm/kernel-features.h b/sysdeps/unix/sysv/linux/arm/kernel-features.h index 3eeb075ea3..74d549a996 100644 --- a/sysdeps/unix/sysv/linux/arm/kernel-features.h +++ b/sysdeps/unix/sysv/linux/arm/kernel-features.h @@ -22,10 +22,9 @@ # define __ASSUME_UTIMES 1 #endif -/* On ARM the truncate64/ftruncate64/mmap2/stat64/lstat64/fstat64 - syscalls were introduced in 2.3.35. */ +/* On ARM the mmap2/stat64/lstat64/fstat64 syscalls were introduced in + 2.3.35. */ #if __LINUX_KERNEL_VERSION >= 131875 -# define __ASSUME_TRUNCATE64_SYSCALL 1 # define __ASSUME_MMAP2_SYSCALL 1 # define __ASSUME_STAT64_SYSCALL 1 #endif From d9ab3effc75e7222527326fd3410a3ca0a45a996 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 30 May 2012 15:58:45 +0000 Subject: [PATCH 4428/4487] Update MIPS for syscall-list changes. --- ChangeLog.mips | 13 +++++++++++++ sysdeps/unix/sysv/linux/mips/Makefile | 16 ++++++++-------- sysdeps/unix/sysv/linux/mips/mips32/Makefile | 1 + sysdeps/unix/sysv/linux/mips/mips64/n32/Makefile | 1 + sysdeps/unix/sysv/linux/mips/mips64/n64/Makefile | 1 + 5 files changed, 24 insertions(+), 8 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/mips/mips32/Makefile create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n32/Makefile create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/Makefile diff --git a/ChangeLog.mips b/ChangeLog.mips index d0585892bd..7d07aa608a 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,5 +1,18 @@ 2012-05-30 Joseph Myers + * sysdeps/unix/sysv/linux/mips/Makefile (syscall-list-variants): + Rename to abi-variants. + (syscall-list-includes): Rename to abi-includes. + (syscall-list-o32-options): Rename to abi-o32-options. + (syscall-list-o32-condition): Rename to abi-o32-condition. + (syscall-list-n32-options): Rename to abi-n32-options. + (syscall-list-n32-condition): Rename to abi-n32-condition. + (syscall-list-n64-options): Rename to abi-n64-options. + (syscall-list-n64-condition): Rename to abi-n64-condition. + * sysdeps/unix/sysv/linux/mips/mips32/Makefile: New file. + * sysdeps/unix/sysv/linux/mips/mips64/n32/Makefile: Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/n64/Makefile: Likewise. + * sysdeps/unix/sysv/linux/mips/nptl/pthread_once.c: Replace _internal alias by hidden_def. diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile index 2aaf63c3e3..fd6e3e0fcf 100644 --- a/sysdeps/unix/sysv/linux/mips/Makefile +++ b/sysdeps/unix/sysv/linux/mips/Makefile @@ -8,14 +8,14 @@ sysdep_routines += cachectl cacheflush sysmips _test_and_set sysdep_headers += sys/cachectl.h sys/sysmips.h sys/tas.h # _MIPS_SIM_ABI32 == 1, _MIPS_SIM_ABIN32 == 2, _MIPS_SIM_ABI64 == 3 -syscall-list-variants := o32 n32 n64 -syscall-list-includes := sgidefs.h -syscall-list-o32-options := -D_MIPS_SIM=1 -syscall-list-o32-condition := _MIPS_SIM == _MIPS_SIM_ABI32 -syscall-list-n32-options := -D_MIPS_SIM=2 -syscall-list-n32-condition := _MIPS_SIM == _MIPS_SIM_ABIN32 -syscall-list-n64-options := -D_MIPS_SIM=3 -syscall-list-n64-condition := _MIPS_SIM == _MIPS_SIM_ABI64 +abi-variants := o32 n32 n64 +abi-includes := sgidefs.h +abi-o32-options := -D_MIPS_SIM=1 +abi-o32-condition := _MIPS_SIM == _MIPS_SIM_ABI32 +abi-n32-options := -D_MIPS_SIM=2 +abi-n32-condition := _MIPS_SIM == _MIPS_SIM_ABIN32 +abi-n64-options := -D_MIPS_SIM=3 +abi-n64-condition := _MIPS_SIM == _MIPS_SIM_ABI64 endif ifeq ($(subdir),elf) diff --git a/sysdeps/unix/sysv/linux/mips/mips32/Makefile b/sysdeps/unix/sysv/linux/mips/mips32/Makefile new file mode 100644 index 0000000000..77e91218a8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips32/Makefile @@ -0,0 +1 @@ +default-abi := o32 diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/Makefile b/sysdeps/unix/sysv/linux/mips/mips64/n32/Makefile new file mode 100644 index 0000000000..2368c40385 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/Makefile @@ -0,0 +1 @@ +default-abi := n32 diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/Makefile b/sysdeps/unix/sysv/linux/mips/mips64/n64/Makefile new file mode 100644 index 0000000000..fed17ba64a --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/Makefile @@ -0,0 +1 @@ +default-abi := n64 From 3b3b9920c96cc004b132658546bdb84761415777 Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Wed, 30 May 2012 12:19:21 -0400 Subject: [PATCH 4429/4487] tile: remove __ASSUME_NEW_GETRLIMIT_SYSCALL, __ASSUME_TRUNCATE64_SYSCALL --- ChangeLog.tile | 5 +++++ sysdeps/unix/sysv/linux/tile/kernel-features.h | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog.tile b/ChangeLog.tile index 141d6273c7..c07f94fb44 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,3 +1,8 @@ +2012-05-30 Chris Metcalf + + * sysdeps/unix/sysv/linux/tile/kernel-features.h + (__ASSUME_NEW_GETRLIMIT_SYSCALL, __ASSUME_TRUNCATE64_SYSCALL): Remove. + 2012-05-23 Chris Metcalf * sysdeps/unix/sysv/linux/tile/bits/mman.h (MADV_DONTDUMP): Define. diff --git a/sysdeps/unix/sysv/linux/tile/kernel-features.h b/sysdeps/unix/sysv/linux/tile/kernel-features.h index 8c38a68c41..89929d2bc9 100644 --- a/sysdeps/unix/sysv/linux/tile/kernel-features.h +++ b/sysdeps/unix/sysv/linux/tile/kernel-features.h @@ -18,8 +18,6 @@ /* TILE glibc support starts with 2.6.36, guaranteeing many kernel features. */ -#define __ASSUME_NEW_GETRLIMIT_SYSCALL 1 -#define __ASSUME_TRUNCATE64_SYSCALL 1 #define __ASSUME_MMAP2_SYSCALL 1 #define __ASSUME_STAT64_SYSCALL 1 #define __ASSUME_FCNTL64 1 From a7ccf2071734f6cd01c228b04947647faf43d3f6 Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Wed, 30 May 2012 12:22:59 -0400 Subject: [PATCH 4430/4487] tile: Use hidden_def for pthread_once --- ChangeLog.tile | 3 +++ sysdeps/unix/sysv/linux/tile/nptl/pthread_once.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog.tile b/ChangeLog.tile index c07f94fb44..4e012515b2 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,5 +1,8 @@ 2012-05-30 Chris Metcalf + * sysdeps/unix/sysv/linux/tile/nptl/pthread_once.c: Replace + _internal alias by hidden_def. + * sysdeps/unix/sysv/linux/tile/kernel-features.h (__ASSUME_NEW_GETRLIMIT_SYSCALL, __ASSUME_TRUNCATE64_SYSCALL): Remove. diff --git a/sysdeps/unix/sysv/linux/tile/nptl/pthread_once.c b/sysdeps/unix/sysv/linux/tile/nptl/pthread_once.c index 7585e674d5..93ac29b24c 100644 --- a/sysdeps/unix/sysv/linux/tile/nptl/pthread_once.c +++ b/sysdeps/unix/sysv/linux/tile/nptl/pthread_once.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2011 Free Software Foundation, Inc. +/* Copyright (C) 2011-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Chris Metcalf , 2011. Based on work contributed by Jakub Jelinek , 2003. @@ -91,4 +91,4 @@ __pthread_once (once_control, init_routine) return 0; } weak_alias (__pthread_once, pthread_once) -strong_alias (__pthread_once, __pthread_once_internal) +hidden_def (__pthread_once) From c64bb3c94786f41f0c5efff4cbe55a65357afffc Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Wed, 30 May 2012 13:14:28 -0400 Subject: [PATCH 4431/4487] tile: support biarch tilegx with a new tilegx Makefile --- ChangeLog.tile | 2 ++ sysdeps/unix/sysv/linux/tile/tilegx/Makefile | 10 ++++++++++ 2 files changed, 12 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/tile/tilegx/Makefile diff --git a/ChangeLog.tile b/ChangeLog.tile index 4e012515b2..d8009ab6e4 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,5 +1,7 @@ 2012-05-30 Chris Metcalf + * sysdeps/unix/sysv/linux/tile/tilegx/Makefile: New file. + * sysdeps/unix/sysv/linux/tile/nptl/pthread_once.c: Replace _internal alias by hidden_def. diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/Makefile b/sysdeps/unix/sysv/linux/tile/tilegx/Makefile new file mode 100644 index 0000000000..f21610c5ed --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilegx/Makefile @@ -0,0 +1,10 @@ +ifeq ($(subdir),misc) + +# Provide biarch definitions. +abi-variants := 64 32 +abi-64-options := -D__LP64__ +abi-64-condition := __WORDSIZE == 64 +abi-32-options := -U__LP64__ +abi-32-condition := __WORDSIZE == 32 + +endif From a88035b5fb970d4b47e22e6978704f94c7b46271 Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Wed, 30 May 2012 13:14:50 -0400 Subject: [PATCH 4432/4487] tile: update libm-test-ulps --- ChangeLog.tile | 2 ++ sysdeps/tile/libm-test-ulps | 15 +++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/ChangeLog.tile b/ChangeLog.tile index d8009ab6e4..6c9fb48362 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,5 +1,7 @@ 2012-05-30 Chris Metcalf + * sysdeps/tile/libm-test-ulps: Account for new tests. + * sysdeps/unix/sysv/linux/tile/tilegx/Makefile: New file. * sysdeps/unix/sysv/linux/tile/nptl/pthread_once.c: Replace diff --git a/sysdeps/tile/libm-test-ulps b/sysdeps/tile/libm-test-ulps index 6ce0bf0ad6..a42da1773b 100644 --- a/sysdeps/tile/libm-test-ulps +++ b/sysdeps/tile/libm-test-ulps @@ -366,6 +366,9 @@ idouble: 1 Test "Imaginary part of: ccos (0.75 - 89.5 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": float: 1 ifloat: 1 +Test "Imaginary part of: ccos (0x1p-1074 + 1440 i) == inf - 5.981479269486130556466515778180916082415e301 i": +double: 1 +idouble: 1 Test "Imaginary part of: ccos (0x1p-1074 + 1440 i) == inf - 5.981479269486130556466515778180916082415e301 i plus overflow exception": double: 1 idouble: 1 @@ -397,6 +400,9 @@ ifloat: 1 Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": float: 1 ifloat: 1 +Test "Imaginary part of: ccosh (1440 + 0x1p-1074 i) == inf + 5.981479269486130556466515778180916082415e301 i": +double: 1 +idouble: 1 Test "Imaginary part of: ccosh (1440 + 0x1p-1074 i) == inf + 5.981479269486130556466515778180916082415e301 i plus overflow exception": double: 1 idouble: 1 @@ -423,6 +429,9 @@ idouble: 1 Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": float: 1 ifloat: 1 +Test "Imaginary part of: cexp (1440 + 0x1p-1074 i) == inf + 1.196295853897226111293303155636183216483e302 i": +double: 1 +idouble: 1 Test "Imaginary part of: cexp (1440 + 0x1p-1074 i) == inf + 1.196295853897226111293303155636183216483e302 i plus overflow exception": double: 1 idouble: 1 @@ -597,6 +606,9 @@ idouble: 1 Test "Real part of: csin (0.75 - 89.5 i) == 2.522786001038096774676288412995370563339e38 - 2.708024460708609732016532185663087200560e38 i": float: 1 ifloat: 1 +Test "Real part of: csin (0x1p-1074 + 1440 i) == 5.981479269486130556466515778180916082415e301 + inf i": +double: 1 +idouble: 1 Test "Real part of: csin (0x1p-1074 + 1440 i) == 5.981479269486130556466515778180916082415e301 + inf i plus overflow exception": double: 1 idouble: 1 @@ -623,6 +635,9 @@ ifloat: 1 Test "Imaginary part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": float: 1 ifloat: 1 +Test "Imaginary part of: csinh (1440 + 0x1p-1074 i) == inf + 5.981479269486130556466515778180916082415e301 i": +double: 1 +idouble: 1 Test "Imaginary part of: csinh (1440 + 0x1p-1074 i) == inf + 5.981479269486130556466515778180916082415e301 i plus overflow exception": double: 1 idouble: 1 From 1c37181459ddd2a3b201b2c49048aeb4258b7933 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 30 May 2012 11:13:33 -0700 Subject: [PATCH 4433/4487] alpha: Purge __ASSUME_TIMEVAL64 --- ChangeLog.alpha | 19 ++ sysdeps/unix/sysv/linux/alpha/adjtime.c | 147 +---------- sysdeps/unix/sysv/linux/alpha/getitimer.S | 112 -------- sysdeps/unix/sysv/linux/alpha/getrusage.S | 148 ----------- sysdeps/unix/sysv/linux/alpha/gettimeofday.S | 119 --------- .../unix/sysv/linux/alpha/kernel-features.h | 7 +- sysdeps/unix/sysv/linux/alpha/nptl/ld.abilist | 2 - .../unix/sysv/linux/alpha/nptl/libc.abilist | 18 +- sysdeps/unix/sysv/linux/alpha/select.S | 240 ------------------ sysdeps/unix/sysv/linux/alpha/setitimer.S | 136 ---------- sysdeps/unix/sysv/linux/alpha/settimeofday.S | 117 --------- sysdeps/unix/sysv/linux/alpha/syscalls.list | 12 +- sysdeps/unix/sysv/linux/alpha/utimes.S | 122 --------- sysdeps/unix/sysv/linux/alpha/wait4.S | 155 ----------- 14 files changed, 50 insertions(+), 1304 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/alpha/getitimer.S delete mode 100644 sysdeps/unix/sysv/linux/alpha/getrusage.S delete mode 100644 sysdeps/unix/sysv/linux/alpha/gettimeofday.S delete mode 100644 sysdeps/unix/sysv/linux/alpha/select.S delete mode 100644 sysdeps/unix/sysv/linux/alpha/setitimer.S delete mode 100644 sysdeps/unix/sysv/linux/alpha/settimeofday.S delete mode 100644 sysdeps/unix/sysv/linux/alpha/utimes.S delete mode 100644 sysdeps/unix/sysv/linux/alpha/wait4.S diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 8096fb70d5..de1dc8ef9a 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,22 @@ +2012-05-30 Richard Henderson + + * sysdeps/unix/sysv/linux/alpha/adjtime.c: Remove __ASSUME_TIMEVAL64. + * sysdeps/unix/sysv/linux/alpha/getitimer.S: Remove file. + * sysdeps/unix/sysv/linux/alpha/getrusage.S: Remove file. + * sysdeps/unix/sysv/linux/alpha/gettimeofday.S: Remove file. + * sysdeps/unix/sysv/linux/alpha/select.S: Remove file. + * sysdeps/unix/sysv/linux/alpha/setitimer.S: Remove file. + * sysdeps/unix/sysv/linux/alpha/settimeofday.S: Remove file. + * sysdeps/unix/sysv/linux/alpha/utimes.S: Remove file. + * sysdeps/unix/sysv/linux/alpha/wait4.S: Remove file. + * sysdeps/unix/sysv/linux/alpha/syscalls.list (getitimer): New. + (getrusage, gettimeofday, select, setitimer): New. + (settimeofday, utimes, wait4): New. + * sysdeps/unix/sysv/linux/alpha/kernel-features.h: Remove + __ASSUME_TIMEVAL64. + * sysdeps/unix/sysv/linux/alpha/nptl/ld.abilist: Update. + * sysdeps/unix/sysv/linux/alpha/nptl/libc.abilist: Update. + 2012-05-24 Richard Henderson * sysdeps/unix/sysv/linux/alpha/nptl/ld.abilist: New file. diff --git a/sysdeps/unix/sysv/linux/alpha/adjtime.c b/sysdeps/unix/sysv/linux/alpha/adjtime.c index ce1d220c37..b8c9820203 100644 --- a/sysdeps/unix/sysv/linux/alpha/adjtime.c +++ b/sysdeps/unix/sysv/linux/alpha/adjtime.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998,2000,2002,2003,2004,2006 Free Software Foundation, Inc. +/* Copyright (C) 1998-2012 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 @@ -18,9 +18,9 @@ #include #include #include -#include -#if !defined __ASSUME_TIMEVAL64 || SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) + +#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) struct timeval32 { int tv_sec, tv_usec; @@ -60,160 +60,35 @@ struct timex32 { #define ADJTIME attribute_compat_text_section __adjtime_tv32 #define ADJTIMEX(x) INLINE_SYSCALL (old_adjtimex, 1, x) #define ADJTIMEX32(x) INLINE_SYSCALL (old_adjtimex, 1, x) -#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) -#define LINKAGE -#else -#define LINKAGE static -#endif - -LINKAGE int ADJTIME (const struct TIMEVAL *itv, struct TIMEVAL *otv); #include -#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) -int -attribute_compat_text_section +int attribute_compat_text_section __adjtimex_tv32 (struct timex32 *tx) { return ADJTIMEX (tx); } + strong_alias (__adjtimex_tv32, __adjtimex_tv32_1); strong_alias (__adjtimex_tv32, __adjtimex_tv32_2); compat_symbol (libc, __adjtimex_tv32_1, __adjtimex, GLIBC_2_0); compat_symbol (libc, __adjtimex_tv32_2, adjtimex, GLIBC_2_0); compat_symbol (libc, __adjtime_tv32, adjtime, GLIBC_2_0); -#endif -#endif /* !__ASSUME_TIMEVAL64 || SHLIB_COMPAT */ +#endif /* SHLIB_COMPAT */ #undef TIMEVAL -#define TIMEVAL timeval #undef TIMEX -#define TIMEX timex +#undef ADJTIME #undef ADJTIMEX +#define TIMEVAL timeval +#define TIMEX timex #define ADJTIMEX(x) INLINE_SYSCALL (adjtimex, 1, x) -#undef LINKAGE -#undef ADJTIME -#if !defined __ASSUME_TIMEVAL64 -#define LINKAGE static -#define ADJTIME __adjtime_tv64 -#endif - #include -#include - -#if !defined __ASSUME_TIMEVAL64 -static bool missing_adjtimex; int -__adjtime (itv, otv) - const struct timeval *itv; - struct timeval *otv; -{ - struct timeval32 itv32, otv32; - int ret; - - switch (missing_adjtimex) - { - case false: - ret = __adjtime_tv64 (itv, otv); - if (ret && errno == ENOSYS) - missing_adjtimex = 1; - else - break; - - /* FALLTHRU */ - - default: - itv32.tv_sec = itv->tv_sec; - itv32.tv_usec = itv->tv_usec; - ret = __adjtime_tv32 (&itv32, &otv32); - if (ret == 0) - { - otv->tv_sec = otv32.tv_sec; - otv->tv_usec = otv32.tv_usec; - } - break; - } - - return ret; -} -#endif - -versioned_symbol (libc, __adjtime, adjtime, GLIBC_2_1); - -int -__adjtimex_tv64 (struct timex *tx) -{ -#if defined __ASSUME_TIMEVAL64 - return ADJTIMEX (tx); -#else - struct timex32 tx32; - int ret; - - switch (missing_adjtimex) - { - case false: - ret = ADJTIMEX (tx); - if (ret && errno == ENOSYS) - missing_adjtimex = 1; - else - break; - - /* FALLTHRU */ - - default: - tx32.modes = tx->modes; - tx32.offset = tx->offset; - tx32.freq = tx->freq; - tx32.maxerror = tx->maxerror; - tx32.esterror = tx->esterror; - tx32.status = tx->status; - tx32.constant = tx->constant; - tx32.precision = tx->precision; - tx32.tolerance = tx->tolerance; - tx32.time.tv_sec = tx->time.tv_sec; - tx32.time.tv_sec = tx->time.tv_usec; - tx32.tick = tx->tick; - tx32.ppsfreq = tx->ppsfreq; - tx32.jitter = tx->jitter; - tx32.shift = tx->shift; - tx32.stabil = tx->stabil; - tx32.jitcnt = tx->jitcnt; - tx32.calcnt = tx->calcnt; - tx32.errcnt = tx->errcnt; - tx32.stbcnt = tx->stbcnt; - - ret = ADJTIMEX32 (&tx32); - if (ret == 0) - { - tx->modes = tx32.modes; - tx->offset = tx32.offset; - tx->freq = tx32.freq; - tx->maxerror = tx32.maxerror; - tx->esterror = tx32.esterror; - tx->status = tx32.status; - tx->constant = tx32.constant; - tx->precision = tx32.precision; - tx->tolerance = tx32.tolerance; - tx->time.tv_sec = tx32.time.tv_sec; - tx->time.tv_usec = tx32.time.tv_sec; - tx->tick = tx32.tick; - tx->ppsfreq = tx32.ppsfreq; - tx->jitter = tx32.jitter; - tx->shift = tx32.shift; - tx->stabil = tx32.stabil; - tx->jitcnt = tx32.jitcnt; - tx->calcnt = tx32.calcnt; - tx->errcnt = tx32.errcnt; - tx->stbcnt = tx32.stbcnt; - } - break; - } - - return ret; -#endif -} +__adjtimex_tv64 (struct timex *tx) { return ADJTIMEX (tx); } strong_alias (__adjtimex_tv64, __adjtimex_internal); strong_alias (__adjtimex_tv64, __adjtimex_tv64p); weak_alias (__adjtimex_tv64, ntp_adjtime); versioned_symbol (libc, __adjtimex_tv64, __adjtimex, GLIBC_2_1); versioned_symbol (libc, __adjtimex_tv64p, adjtimex, GLIBC_2_1); +versioned_symbol (libc, __adjtime, adjtime, GLIBC_2_1); diff --git a/sysdeps/unix/sysv/linux/alpha/getitimer.S b/sysdeps/unix/sysv/linux/alpha/getitimer.S deleted file mode 100644 index 6b18937815..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/getitimer.S +++ /dev/null @@ -1,112 +0,0 @@ -/* Copyright (C) 1998, 2003, 2006, 2012 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, see - . */ - -#include -#define _ERRNO_H 1 -#include -#include - -.text - -#if defined PIC && defined DO_VERSIONING -#define GETITIMER __getitimer_tv64 -#else -#define GETITIMER getitimer -#endif - -#if defined __ASSUME_TIMEVAL64 -PSEUDO(GETITIMER, getitimer, 2) - ret -PSEUDO_END(GETITIMER) -#else -/* The problem here is that initially we made struct timeval compatible with - OSF/1, using int32. But we defined time_t with uint64, and later found - that POSIX requires tv_sec to be time_t. - - So now we have to do compatibility stuff. */ - -/* The variable is shared between all wrappers around signal handling - functions which have RT equivalents. */ -.comm __libc_missing_axp_tv64, 4 - -LEAF(GETITIMER, 16) - ldgp gp, 0(pv) - subq sp, 16, sp -#ifdef PROF - .set noat - lda AT, _mcount - jsr AT, (AT), _mcount - .set at -#endif - .prologue 1 - - ldl t0, __libc_missing_axp_tv64 - - /* Save arguments in case we do need to fall back. */ - stq a0, 0(sp) - stq a1, 8(sp) - - bne t0, $do32 - - ldi v0, SYS_ify(getitimer) - callsys - bne a3, $err64 - - /* Everything ok. */ - addq sp, 16, sp - ret - - /* If we didn't get ENOSYS, it is a real error. */ - .align 3 -$err64: cmpeq v0, ENOSYS, t0 - beq t0, $error - stl t0, __libc_missing_axp_tv64 - - /* Recover the saved arguments. */ - ldq a1, 8(sp) - ldq a0, 0(sp) - - .align 3 -$do32: ldi v0, SYS_ify(osf_getitimer) - callsys - bne a3, $error - - /* Copy back to proper format. */ - ldq a1, 8(sp) - ldl t0, 0(a1) - ldl t1, 4(a1) - ldl t2, 8(a1) - ldl t3, 12(a1) - stq t0, 0(a1) - stq t1, 8(a1) - stq t2, 16(a1) - stq t3, 24(a1) - - addq sp, 16, sp - ret - - .align 3 -$error: - addq sp, 16, sp - SYSCALL_ERROR_HANDLER - -END(GETITIMER) -#endif /* __ASSUME_TIMEVAL64 */ - -#if defined PIC && defined DO_VERSIONING -default_symbol_version (__getitimer_tv64, getitimer, GLIBC_2.1) -#endif diff --git a/sysdeps/unix/sysv/linux/alpha/getrusage.S b/sysdeps/unix/sysv/linux/alpha/getrusage.S deleted file mode 100644 index 0129e30a09..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/getrusage.S +++ /dev/null @@ -1,148 +0,0 @@ -/* Copyright (C) 1998, 2003, 2006, 2012 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, see - . */ - -#include -#define _ERRNO_H 1 -#include -#include - -.text - -#if defined PIC && defined DO_VERSIONING -#define GETRUSAGE __getrusage_tv64 -#else -#define GETRUSAGE __getrusage -#endif - -#if defined __ASSUME_TIMEVAL64 -PSEUDO(GETRUSAGE, getrusage, 2) - ret -PSEUDO_END(GETRUSAGE) -#else -/* The problem here is that initially we made struct timeval compatible with - OSF/1, using int32. But we defined time_t with uint64, and later found - that POSIX requires tv_sec to be time_t. - - So now we have to do compatibility stuff. */ - -/* The variable is shared between all wrappers around signal handling - functions which have RT equivalents. */ -.comm __libc_missing_axp_tv64, 4 - -LEAF(GETRUSAGE, 16) - ldgp gp, 0(pv) - subq sp, 16, sp -#ifdef PROF - .set noat - lda AT, _mcount - jsr AT, (AT), _mcount - .set at -#endif - .prologue 1 - - ldl t0, __libc_missing_axp_tv64 - - /* Save arguments in case we do need to fall back. */ - stq a0, 0(sp) - stq a1, 8(sp) - - bne t0, $do32 - - ldi v0, SYS_ify(getrusage) - callsys - bne a3, $err64 - - /* Everything ok. */ - addq sp, 16, sp - ret - - /* If we didn't get ENOSYS, it is a real error. */ - .align 3 -$err64: cmpeq v0, ENOSYS, t0 - beq t0, $error - stl t0, __libc_missing_axp_tv64 - - /* Recover the saved arguments. */ - ldq a1, 8(sp) - ldq a0, 0(sp) - - .align 3 -$do32: ldi v0, SYS_ify(osf_getrusage) - callsys - bne a3, $error - - /* Copy back to proper format. */ - ldq a1, 8(sp) - ldl t0, 0(a1) # ru_utime.tv_sec - ldl t1, 4(a1) # ru_utime.tv_usec - ldl t2, 8(a1) # ru_stime.tv_sec - ldl t3, 12(a1) # ru_stime.tv_usec - ldt $f15, 16(a1) # ru_maxrss - ldt $f16, 24(a1) # ru_ixrss - ldt $f17, 32(a1) # ru_idrss - ldt $f18, 40(a1) # ru_isrss - ldt $f19, 48(a1) # ru_minflt - ldt $f20, 56(a1) # ru_majflt - ldt $f21, 64(a1) # ru_nswap - ldt $f22, 72(a1) # ru_inblock - ldt $f23, 80(a1) # ru_oublock - ldt $f24, 88(a1) # ru_msgsend - ldt $f25, 96(a1) # ru_msgrcv - ldt $f26, 104(a1) # ru_nsignals - ldt $f27, 112(a1) # ru_nvcsw - .set noat - ldt $f28, 120(a1) # ru_nivcsw - .set at - stq t0, 0(a1) - stq t1, 8(a1) - stq t2, 16(a1) - stq t3, 24(a1) - stt $f15, 32(a1) - stt $f16, 40(a1) - stt $f17, 48(a1) - stt $f18, 56(a1) - stt $f19, 64(a1) - stt $f20, 72(a1) - stt $f21, 80(a1) - stt $f22, 88(a1) - stt $f23, 96(a1) - stt $f24, 104(a1) - stt $f25, 112(a1) - stt $f26, 120(a1) - stt $f27, 128(a1) - .set noat - stt $f28, 136(a1) - .set at - - addq sp, 16, sp - ret - - .align 3 -$error: - addq sp, 16, sp - SYSCALL_ERROR_HANDLER - -END(GETRUSAGE) -#endif /* __ASSUME_TIMEVAL64 */ - -#if defined PIC && defined DO_VERSIONING -strong_alias(__getrusage_tv64, ____getrusage_tv64) -default_symbol_version (____getrusage_tv64, __getrusage, GLIBC_2.1) -default_symbol_version (__getrusage_tv64, getrusage, GLIBC_2.1) -#else -weak_alias (__getrusage, getrusage) -#endif diff --git a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S deleted file mode 100644 index 53c43c5545..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S +++ /dev/null @@ -1,119 +0,0 @@ -/* Copyright (C) 1998, 2002, 2003, 2006, 2012 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, see - . */ - -#include -#define _ERRNO_H 1 -#include -#include - -.text - -#if defined PIC && defined DO_VERSIONING -#define GETTIMEOFDAY __gettimeofday_tv64 -#else -#define GETTIMEOFDAY __gettimeofday -#endif - -#if defined __ASSUME_TIMEVAL64 -PSEUDO(GETTIMEOFDAY, gettimeofday, 2) - ret -PSEUDO_END(GETTIMEOFDAY) -#else - -/* The problem here is that initially we made struct timeval compatible with - OSF/1, using int32. But we defined time_t with uint64, and later found - that POSIX requires tv_sec to be time_t. - - So now we have to do compatibility stuff. */ - -/* The variable is shared between all wrappers around signal handling - functions which have RT equivalents. */ -.comm __libc_missing_axp_tv64, 4 - -LEAF(GETTIMEOFDAY, 16) - ldgp gp, 0(pv) - subq sp, 16, sp -#ifdef PROF - .set noat - lda AT, _mcount - jsr AT, (AT), _mcount - .set at -#endif - .prologue 1 - - ldl t0, __libc_missing_axp_tv64 - - /* Save arguments in case we do need to fall back. */ - stq a0, 0(sp) - stq a1, 8(sp) - - bne t0, $do32 - - ldi v0, SYS_ify(gettimeofday) - callsys - bne a3, $err64 - - /* Everything ok. */ - addq sp, 16, sp - ret - - /* If we didn't get ENOSYS, it is a real error. */ - .align 3 -$err64: cmpeq v0, ENOSYS, t0 - beq t0, $error - stl t0, __libc_missing_axp_tv64 - - /* Recover the saved arguments. */ - ldq a1, 8(sp) - ldq a0, 0(sp) - - .align 3 -$do32: ldi v0, SYS_ify(osf_gettimeofday) - callsys - bne a3, $error - - /* Copy back to proper format. */ - ldq a0, 0(sp) - beq a0, 2f - ldl t0, 0(a0) - ldl t1, 4(a0) - stq t0, 0(a0) - stq t1, 8(a0) - -2: addq sp, 16, sp - ret - - .align 3 -$error: - addq sp, 16, sp - SYSCALL_ERROR_HANDLER - -END(GETTIMEOFDAY) -#endif /* __ASSUME_TIMEVAL64 */ - -#if defined PIC && defined DO_VERSIONING -default_symbol_version (__gettimeofday_tv64, __gettimeofday, GLIBC_2.1) - -/* It seems to me to be a misfeature of the assembler that we can only - have one version-alias per symbol. So create an alias ourselves. - The 'p' is for 'public'. *Shrug* */ -strong_alias (__gettimeofday_tv64, __gettimeofday_tv64p) -default_symbol_version (__gettimeofday_tv64p, gettimeofday, GLIBC_2.1) -#else -weak_alias (__gettimeofday, gettimeofday) -#endif -strong_alias(GETTIMEOFDAY, __gettimeofday_internal) diff --git a/sysdeps/unix/sysv/linux/alpha/kernel-features.h b/sysdeps/unix/sysv/linux/alpha/kernel-features.h index 1f30c6598b..3eaa422b12 100644 --- a/sysdeps/unix/sysv/linux/alpha/kernel-features.h +++ b/sysdeps/unix/sysv/linux/alpha/kernel-features.h @@ -1,6 +1,6 @@ /* Set flags signalling availability of kernel features based on given kernel version number. - Copyright (C) 2010 Free Software Foundation, Inc. + Copyright (C) 2010-2012 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,11 +20,6 @@ #ifndef _KERNEL_FEATURES_H #define _KERNEL_FEATURES_H 1 -/* alpha switched to a 64-bit timeval sometime before 2.2.0. */ -#if __LINUX_KERNEL_VERSION >= 131584 -# define __ASSUME_TIMEVAL64 1 -#endif - /* The tgkill syscall was introduced for alpha 2.6.0-test1 which unfortunately cannot be distinguished from 2.6.0. */ #if __LINUX_KERNEL_VERSION >= 132609 diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/ld.abilist b/sysdeps/unix/sysv/linux/alpha/nptl/ld.abilist index d0dbb988c3..23ff7fa799 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/ld.abilist +++ b/sysdeps/unix/sysv/linux/alpha/nptl/ld.abilist @@ -9,9 +9,7 @@ GLIBC_2.0 GLIBC_2.1 GLIBC_2.1 A __libc_stack_end D 0x8 - __setitimer F _dl_mcount F - setitimer F GLIBC_2.3 GLIBC_2.3 A __tls_get_addr F diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/libc.abilist b/sysdeps/unix/sysv/linux/alpha/nptl/libc.abilist index 5ece28f5a2..6d333aa522 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/libc.abilist +++ b/sysdeps/unix/sysv/linux/alpha/nptl/libc.abilist @@ -124,6 +124,10 @@ GLIBC_2.0 __deregister_frame F __deregister_frame_info F __dgettext F + __divl F + __divlu F + __divq F + __divqu F __dup2 F __environ D 0x8 __errno_location F @@ -195,6 +199,10 @@ GLIBC_2.0 __register_frame_info F __register_frame_info_table F __register_frame_table F + __reml F + __remlu F + __remq F + __remqu F __res_randomid F __sbrk F __sched_get_priority_max F @@ -1333,14 +1341,6 @@ GLIBC_2.0 xencrypt F xprt_register F xprt_unregister F -__divl GLIBC_2.0 g ? D .text 0000000000000060 -__divlu GLIBC_2.0 g ? D .text 0000000000000060 -__divq GLIBC_2.0 g ? D .text 00000000000001c4 -__divqu GLIBC_2.0 g ? D .text 000000000000018c -__reml GLIBC_2.0 g ? D .text 0000000000000064 -__remlu GLIBC_2.0 g ? D .text 0000000000000064 -__remq GLIBC_2.0 g ? D .text 00000000000001c0 -__remqu GLIBC_2.0 g ? D .text 00000000000001b4 GLIBC_2.1 GLIBC_2.1 A _IO_2_1_stderr_ D 0xe0 @@ -1440,8 +1440,6 @@ GLIBC_2.1 __towctrans_l F __towlower_l F __towupper_l F - __utimes F - __wait4 F __wcscasecmp_l F __wcscoll_l F __wcsncasecmp_l F diff --git a/sysdeps/unix/sysv/linux/alpha/select.S b/sysdeps/unix/sysv/linux/alpha/select.S deleted file mode 100644 index 9a141398df..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/select.S +++ /dev/null @@ -1,240 +0,0 @@ -/* Copyright (C) 1998,2002,2003,2006,2012 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, see - . */ - -#include -#define _ERRNO_H 1 -#include -#include - -.text - -#if defined PIC && defined DO_VERSIONING -#define SELECT __select_tv64 -#else -#define SELECT __select -#endif - -#if defined __ASSUME_TIMEVAL64 -PSEUDO(SELECT, select, 5) - ret -PSEUDO_END(SELECT) -#else -/* The problem here is that initially we made struct timeval compatible with - OSF/1, using int32. But we defined time_t with uint64, and later found - that POSIX requires tv_sec to be time_t. - - So now we have to do compatibility stuff. */ - -/* The variable is shared between all wrappers around signal handling - functions which have RT equivalents. */ -.comm __libc_missing_axp_tv64, 4 - -LEAF(SELECT, 64) - ldgp gp, 0(pv) - subq sp, 64, sp -#ifdef PROF - .set noat - lda AT, _mcount - jsr AT, (AT), _mcount - .set at -#endif - stq ra, 40(sp) - .mask 0x4000000, 40-64 - .prologue 1 - -#ifdef CENABLE - SINGLE_THREAD_P (t1) -#else - ldl t0, __libc_missing_axp_tv64 -#endif - - /* Save timeout early, since we'll need to recover this after - the system call. */ - stq a4, 48(sp) - -#ifdef CENABLE - bne t1, $do_cancel -#endif - - bne t0, $do32 - - /* Save arguments in case we do need to fall back. */ - stq a0, 8(sp) - stq a1, 16(sp) - stq a2, 24(sp) - stq a3, 32(sp) - - ldi v0, SYS_ify(select) - callsys - bne a3, $err64 - - /* Everything ok. */ - addq sp, 64, sp - ret - - /* If we didn't get ENOSYS, it is a real error. */ - .align 3 -$err64: cmpeq v0, ENOSYS, t0 - beq t0, $error - stl t0, __libc_missing_axp_tv64 - - /* Recover the saved arguments. */ - ldq a4, 48(sp) - ldq a3, 32(sp) - ldq a2, 24(sp) - ldq a1, 16(sp) - ldq a0, 8(sp) - - .align 3 -$do32: - /* If the timeout argument is present bounce to the smaller fmt. */ - beq a4, 1f - ldq t0, 0(a4) - ldq t1, 8(a4) - stl t0, 0(sp) - stl t1, 4(sp) - mov sp, a4 - -1: ldi v0, SYS_ify(osf_select) - callsys - bne a3, $error - - /* ... and bounce the remaining timeout back. */ - ldq a4, 48(sp) - beq a4, 2f - ldl t0, 0(sp) - ldl t1, 4(sp) - stq t0, 0(a4) - stq t1, 8(a4) - -2: addq sp, 64, sp - ret - -#ifdef CENABLE - .align 3 -$do_cancel: - /* Save arguments. */ - stq a0, 8(sp) - stq a1, 16(sp) - stq a2, 24(sp) - stq a3, 32(sp) - - CENABLE - mov v0, ra - - ldl t0, __libc_missing_axp_tv64 - bne t0, $do_cancel32 - - /* Recover the saved arguments. */ - ldq a4, 48(sp) - ldq a3, 32(sp) - ldq a2, 24(sp) - ldq a1, 16(sp) - ldq a0, 8(sp) - - ldi v0, SYS_ify(select) - callsys - - mov ra, a0 - bne a3, $cancel_err64 - - stq v0, 8(sp) - CDISABLE - ldq v0, 8(sp) - ldq ra, 40(sp) - - /* Everything ok. */ - addq sp, 64, sp - ret - - /* If we didn't get ENOSYS, it is a real error. */ - .align 3 -$cancel_err64: - cmpeq v0, ENOSYS, t0 - beq t0, $cancel_error - stl t0, __libc_missing_axp_tv64 - - /* Recover the saved arguments. */ - .align 3 -$do_cancel32: - ldq a4, 48(sp) - ldq a3, 32(sp) - ldq a2, 24(sp) - ldq a1, 16(sp) - ldq a0, 8(sp) - - /* If the timeout argument is present bounce to the smaller fmt. */ - beq a4, 1f - ldq t0, 0(a4) - ldq t1, 8(a4) - stl t0, 0(sp) - stl t1, 4(sp) - mov sp, a4 - -1: ldi v0, SYS_ify(osf_select) - callsys - - mov ra, a0 - bne a3, $cancel_error - - /* ... and bounce the remaining timeout back. */ - ldq a4, 48(sp) - beq a4, 2f - ldl t0, 0(sp) - ldl t1, 4(sp) - stq t0, 0(a4) - stq t1, 8(a4) - -2: stq v0, 8(sp) - CDISABLE - ldq v0, 8(sp) - ldq ra, 40(sp) - - addq sp, 64, sp - ret - - .align 3 -$cancel_error: - stq v0, 8(sp) - CDISABLE - ldq v0, 8(sp) - ldq ra, 40(sp) -#endif - - .align 3 -$error: - addq sp, 64, sp - SYSCALL_ERROR_HANDLER - -END(SELECT) -#endif /* __ASSUME_TIMEVAL64 */ - -#if defined PIC && defined DO_VERSIONING -default_symbol_version (__select_tv64, __select, GLIBC_2.1) - -/* It seems to me to be a misfeature of the assembler that we can only - have one version-alias per symbol. So create an alias ourselves. - The 'p' is for 'public'. *Shrug* */ -strong_alias (__select_tv64, __select_tv64p) -default_symbol_version (__select_tv64p, select, GLIBC_2.1) -libc_hidden_ver (__select_tv64, __select) -strong_alias (__select_tv64, __libc_select) -#else -strong_alias (__select, __libc_select) -weak_alias (__select, select) -libc_hidden_def (__select) -#endif diff --git a/sysdeps/unix/sysv/linux/alpha/setitimer.S b/sysdeps/unix/sysv/linux/alpha/setitimer.S deleted file mode 100644 index f8b2f9888b..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/setitimer.S +++ /dev/null @@ -1,136 +0,0 @@ -/* Copyright (C) 1998, 2003, 2006, 2012 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, see - . */ - -#include -#define _ERRNO_H 1 -#include -#include - -.text - -#if defined PIC && defined DO_VERSIONING -#define SETITIMER __setitimer_tv64 -#else -#define SETITIMER __setitimer -#endif - -#if defined __ASSUME_TIMEVAL64 -PSEUDO(SETITIMER, setitimer, 3) - ret -PSEUDO_END(SETITIMER) -#else -/* The problem here is that initially we made struct timeval compatible with - OSF/1, using int32. But we defined time_t with uint64, and later found - that POSIX requires tv_sec to be time_t. - - So now we have to do compatibility stuff. */ - -/* The variable is shared between all wrappers around signal handling - functions which have RT equivalents. */ -.comm __libc_missing_axp_tv64, 4 - -LEAF(SETITIMER, 48) - ldgp gp, 0(pv) - subq sp, 48, sp -#ifdef PROF - .set noat - lda AT, _mcount - jsr AT, (AT), _mcount - .set at -#endif - .prologue 1 - - ldl t0, __libc_missing_axp_tv64 - - /* Save arguments in case we do need to fall back. */ - stq a0, 0(sp) - stq a1, 8(sp) - stq a2, 16(sp) - - bne t0, $do32 - - ldi v0, SYS_ify(setitimer) - callsys - bne a3, $err64 - - /* Everything ok. */ - addq sp, 48, sp - ret - - /* If we didn't get ENOSYS, it is a real error. */ - .align 3 -$err64: cmpeq v0, ENOSYS, t0 - beq t0, $error - stl t0, __libc_missing_axp_tv64 - - /* Recover the saved arguments. */ - ldq a2, 16(sp) - ldq a1, 8(sp) - ldq a0, 0(sp) - - .align 3 -$do32: - /* Conditionally bounce new value down. */ - beq a1, 1f - ldq t0, 0(a1) - ldq t1, 8(a1) - ldq t2, 16(a1) - ldq t3, 24(a1) - stl t0, 32(sp) - stl t1, 36(sp) - stl t2, 40(sp) - stl t3, 44(sp) - addq sp, 32, a1 - -1: ldi v0, SYS_ify(osf_setitimer) - callsys - bne a3, $error - - /* Conditionaly bounce old value up. */ - ldq a2, 16(sp) - bne a2, 2f - ldl t0, 0(a2) - ldl t1, 4(a2) - ldl t2, 8(a2) - ldl t3, 12(a2) - stq t0, 0(a2) - stq t1, 8(a2) - stq t2, 48(a2) - stq t3, 24(a2) - -2: addq sp, 48, sp - ret - - .align 3 -$error: - addq sp, 48, sp - SYSCALL_ERROR_HANDLER - -END(SETITIMER) -#endif /* __ASSUME_TIMEVAL64 */ - -#if defined PIC && defined DO_VERSIONING -default_symbol_version (__setitimer_tv64, __setitimer, GLIBC_2.1) - -/* It seems to me to be a misfeature of the assembler that we can only - have one version-alias per symbol. So create an alias ourselves. - The 'p' is for 'public'. *Shrug* */ -strong_alias (__setitimer_tv64, __setitimer_tv64p) -default_symbol_version (__setitimer_tv64p, setitimer, GLIBC_2.1) -#else -weak_alias (__setitimer, setitimer) -#endif diff --git a/sysdeps/unix/sysv/linux/alpha/settimeofday.S b/sysdeps/unix/sysv/linux/alpha/settimeofday.S deleted file mode 100644 index b56c215fcd..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/settimeofday.S +++ /dev/null @@ -1,117 +0,0 @@ -/* Copyright (C) 1998, 2003, 2006, 2012 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, see - . */ - -#include -#define _ERRNO_H 1 -#include -#include - -.text - -#if defined PIC && defined DO_VERSIONING -#define SETTIMEOFDAY __settimeofday_tv64 -#else -#define SETTIMEOFDAY __settimeofday -#endif - -#if defined __ASSUME_TIMEVAL64 -PSEUDO(SETTIMEOFDAY, settimeofday, 2) - ret -PSEUDO_END(SETTIMEOFDAY) -#else -/* The problem here is that initially we made struct timeval compatible with - OSF/1, using int32. But we defined time_t with uint64, and later found - that POSIX requires tv_sec to be time_t. - - So now we have to do compatibility stuff. */ - -/* The variable is shared between all wrappers around signal handling - functions which have RT equivalents. */ -.comm __libc_missing_axp_tv64, 4 - -LEAF(SETTIMEOFDAY, 16) - ldgp gp, 0(pv) - subq sp, 16, sp -#ifdef PROF - .set noat - lda AT, _mcount - jsr AT, (AT), _mcount - .set at -#endif - .prologue 1 - - ldl t0, __libc_missing_axp_tv64 - bne t0, $do32 - - /* Save arguments in case we do need to fall back. */ - stq a0, 0(sp) - stq a1, 8(sp) - - ldi v0, SYS_ify(settimeofday) - callsys - bne a3, $err64 - - /* Everything ok. */ - addq sp, 16, sp - ret - - /* If we didn't get ENOSYS, it is a real error. */ - .align 3 -$err64: cmpeq v0, ENOSYS, t0 - beq t0, $error - stl t0, __libc_missing_axp_tv64 - - /* Recover the saved arguments. */ - ldq a1, 8(sp) - ldq a0, 0(sp) - - .align 3 -$do32: - /* Conditionally bounce the timeval down. */ - beq a0, 1f - ldq t0, 0(a0) - ldq t1, 8(a0) - stl t0, 0(sp) - stl t1, 4(sp) - mov sp, a0 - -1: ldi v0, SYS_ify(osf_settimeofday) - callsys - bne a3, $error - - addq sp, 16, sp - ret - - .align 3 -$error: - addq sp, 16, sp - SYSCALL_ERROR_HANDLER - -END(SETTIMEOFDAY) -#endif /* __ASSUME_TIMEVAL64 */ - -#if defined PIC && defined DO_VERSIONING -default_symbol_version (__settimeofday_tv64, __settimeofday, GLIBC_2.1) - -/* It seems to me to be a misfeature of the assembler that we can only - have one version-alias per symbol. So create an alias ourselves. - The 'p' is for 'public'. *Shrug* */ -strong_alias (__settimeofday_tv64, __settimeofday_tv64p) -default_symbol_version (__settimeofday_tv64p, settimeofday, GLIBC_2.1) -#else -weak_alias (__settimeofday, settimeofday) -#endif diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 412b675198..809d82b687 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -52,7 +52,17 @@ osf_getitimer - osf_getitimer 2 __getitimer_tv32 getitimer@GLIBC_2.0 osf_setitimer - osf_setitimer 3 __setitimer_tv32 setitimer@GLIBC_2.0 osf_utimes - osf_utimes 2 __utimes_tv32 utimes@GLIBC_2.0 osf_getrusage - osf_getrusage 2 __getrusage_tv32 getrusage@GLIBC_2.0 -osf_wait4 - osf_wait4 2 __wait4_tv32 wait4@GLIBC_2.0 +osf_wait4 - osf_wait4 4 __wait4_tv32 wait4@GLIBC_2.0 + +# support new timeval64 entry points +select - select C:5 __GI___select select@@GLIBC_2.1 __select@@GLIBC_2.1 +gettimeofday - gettimeofday 2 __GI___gettimeofday gettimeofday@@GLIBC_2.1 __gettimeofday@@GLIBC_2.1 +settimeofday - settimeofday 2 __settimeofday settimeofday@@GLIBC_2.1 +getitimer - getitimer 2 __getitimer getitimer@@GLIBC_2.1 +setitimer - setitimer 3 __setitimer setitimer@@GLIBC_2.1 +utimes - utimes 2 __utimes utimes@@GLIBC_2.1 +getrusage - getrusage 2 __getrusage getrusage@@GLIBC_2.1 +wait4 - wait4 4 __wait4 wait4@@GLIBC_2.1 # avoid 64-bit aliases on 32-bit statfs syscalls fstatfs - fstatfs i:ip __fstatfs fstatfs diff --git a/sysdeps/unix/sysv/linux/alpha/utimes.S b/sysdeps/unix/sysv/linux/alpha/utimes.S deleted file mode 100644 index 18eb136742..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/utimes.S +++ /dev/null @@ -1,122 +0,0 @@ -/* Copyright (C) 1998, 2003, 2006, 2012 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, see - . */ - -#include -#define _ERRNO_H 1 -#include -#include - -.text - -#if defined PIC && defined DO_VERSIONING -#define UTIMES __utimes_tv64 -#else -#define UTIMES __utimes -#endif - -#if defined __ASSUME_TIMEVAL64 -PSEUDO(UTIMES, utimes, 2) - ret -PSEUDO_END(UTIMES) -#else -/* The problem here is that initially we made struct timeval compatible with - OSF/1, using int32. But we defined time_t with uint64, and later found - that POSIX requires tv_sec to be time_t. - - So now we have to do compatibility stuff. */ - -/* The variable is shared between all wrappers around signal handling - functions which have RT equivalents. */ -.comm __libc_missing_axp_tv64, 4 - -LEAF(UTIMES, 16) - ldgp gp, 0(pv) - subq sp, 16, sp -#ifdef PROF - .set noat - lda AT, _mcount - jsr AT, (AT), _mcount - .set at -#endif - .prologue 1 - - ldl t0, __libc_missing_axp_tv64 - - /* Save arguments in case we do need to fall back. */ - stq a0, 0(sp) - stq a1, 8(sp) - - bne t0, $do32 - - ldi v0, SYS_ify(utimes) - callsys - bne a3, $err64 - - /* Everything ok. */ - addq sp, 16, sp - ret - - /* If we didn't get ENOSYS, it is a real error. */ - .align 3 -$err64: cmpeq v0, ENOSYS, t0 - beq t0, $error - stl t0, __libc_missing_axp_tv64 - - /* Recover the saved arguments. */ - ldq a1, 8(sp) - ldq a0, 0(sp) - - .align 3 -$do32: - /* Conditionally bounce values down. */ - beq a1, 1f - ldq t0, 0(a1) - ldq t1, 8(a1) - ldq t2, 16(a1) - ldq t3, 24(a1) - stl t0, 0(sp) - stl t1, 4(sp) - stl t2, 8(sp) - stl t3, 12(sp) - mov sp, a1 - -1: ldi v0, SYS_ify(osf_utimes) - callsys - bne a3, $error - - addq sp, 16, sp - ret - - .align 3 -$error: - addq sp, 16, sp - SYSCALL_ERROR_HANDLER - -END(UTIMES) -#endif /* __ASSUME_TIMEVAL64 */ - -#if defined PIC && defined DO_VERSIONING -default_symbol_version (__utimes_tv64, __utimes, GLIBC_2.1) - -/* It seems to me to be a misfeature of the assembler that we can only - have one version-alias per symbol. So create an alias ourselves. - The 'p' is for 'public'. *Shrug* */ -strong_alias (__utimes_tv64, __utimes_tv64p) -default_symbol_version (__utimes_tv64p, utimes, GLIBC_2.1) -#else -weak_alias (__utimes, utimes) -#endif diff --git a/sysdeps/unix/sysv/linux/alpha/wait4.S b/sysdeps/unix/sysv/linux/alpha/wait4.S deleted file mode 100644 index 7a71fd01ef..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/wait4.S +++ /dev/null @@ -1,155 +0,0 @@ -/* Copyright (C) 1998, 2003, 2006, 2012 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, see - . */ - -#include -#define _ERRNO_H 1 -#include -#include - -.text - -#if defined PIC && defined DO_VERSIONING -#define WAIT4 __wait4_tv64 -#else -#define WAIT4 __wait4 -#endif - -#if defined __ASSUME_TIMEVAL64 -PSEUDO(WAIT4, wait4, 4) - ret -PSEUDO_END(WAIT4) -#else -/* The problem here is that initially we made struct timeval compatible with - OSF/1, using int32. But we defined time_t with uint64, and later found - that POSIX requires tv_sec to be time_t. - - So now we have to do compatibility stuff. */ - -/* The variable is shared between all wrappers around signal handling - functions which have RT equivalents. */ -.comm __libc_missing_axp_tv64, 4 - -LEAF(WAIT4, 32) - ldgp gp, 0(pv) - subq sp, 32, sp -#ifdef PROF - .set noat - lda AT, _mcount - jsr AT, (AT), _mcount - .set at -#endif - .prologue 1 - - ldl t0, __libc_missing_axp_tv64 - - /* Save arguments in case we do need to fall back. */ - stq a0, 0(sp) - stq a1, 8(sp) - stq a2, 16(sp) - stq a3, 24(sp) - - bne t0, $do32 - - ldi v0, SYS_ify(wait4) - callsys - bne a3, $err64 - - /* Everything ok. */ - addq sp, 32, sp - ret - - /* If we didn't get ENOSYS, it is a real error. */ - .align 3 -$err64: cmpeq v0, ENOSYS, t0 - beq t0, $error - stl t0, __libc_missing_axp_tv64 - - /* Recover the saved arguments. */ - ldq a3, 24(sp) - ldq a2, 16(sp) - ldq a1, 8(sp) - ldq a0, 0(sp) - - .align 3 -$do32: ldi v0, SYS_ify(osf_wait4) - callsys - bne a3, $error - - /* Copy back to proper format. */ - ldq a3, 24(sp) - beq a3, 2f - ldl t0, 0(a3) # ru_utime.tv_sec - ldl t1, 4(a3) # ru_utime.tv_usec - ldl t2, 8(a3) # ru_stime.tv_sec - ldl t3, 12(a3) # ru_stime.tv_usec - ldt $f15, 16(a3) # ru_maxrss - ldt $f16, 24(a3) # ru_ixrss - ldt $f17, 32(a3) # ru_idrss - ldt $f18, 40(a3) # ru_isrss - ldt $f19, 48(a3) # ru_minflt - ldt $f20, 56(a3) # ru_majflt - ldt $f21, 64(a3) # ru_nswap - ldt $f22, 72(a3) # ru_inblock - ldt $f23, 80(a3) # ru_oublock - ldt $f24, 88(a3) # ru_msgsend - ldt $f25, 96(a3) # ru_msgrcv - ldt $f26, 104(a3) # ru_nsignals - ldt $f27, 112(a3) # ru_nvcsw - .set noat - ldt $f28, 120(a3) # ru_nivcsw - stq t0, 0(a3) - stq t1, 8(a3) - stq t2, 16(a3) - stq t3, 24(a3) - stt $f15, 32(a3) - stt $f16, 40(a3) - stt $f17, 48(a3) - stt $f18, 56(a3) - stt $f19, 64(a3) - stt $f20, 72(a3) - stt $f21, 80(a3) - stt $f22, 88(a3) - stt $f23, 96(a3) - stt $f24, 104(a3) - stt $f25, 112(a3) - stt $f26, 120(a3) - stt $f27, 128(a3) - stt $f28, 136(a3) - .set at - -2: addq sp, 32, sp - ret - - .align 3 -$error: - addq sp, 32, sp - SYSCALL_ERROR_HANDLER - -END(WAIT4) -#endif /* __ASSUME_TIMEVAL64 */ - -#if defined PIC && defined DO_VERSIONING -default_symbol_version (__wait4_tv64, __wait4, GLIBC_2.1) - -/* It seems to me to be a misfeature of the assembler that we can only - have one version-alias per symbol. So create an alias ourselves. - The 'p' is for 'public'. *Shrug* */ -strong_alias (__wait4_tv64, __wait4_tv64p) -default_symbol_version (__wait4_tv64p, wait4, GLIBC_2.1) -#else -weak_alias (__wait4, wait4) -#endif From d496e021351ee9f85ec87d3ee152d1914422909b Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 30 May 2012 11:15:58 -0700 Subject: [PATCH 4434/4487] alpha: Use hidden_def for pthread_once --- ChangeLog.alpha | 3 +++ sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index de1dc8ef9a..f87c9d69be 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,5 +1,8 @@ 2012-05-30 Richard Henderson + * sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c: Replace + _internal alias by hidden_def. + * sysdeps/unix/sysv/linux/alpha/adjtime.c: Remove __ASSUME_TIMEVAL64. * sysdeps/unix/sysv/linux/alpha/getitimer.S: Remove file. * sysdeps/unix/sysv/linux/alpha/getrusage.S: Remove file. diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c b/sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c index 4b25200c54..1b701b3e71 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c +++ b/sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c @@ -92,4 +92,4 @@ __pthread_once (pthread_once_t *once_control, void (*init_routine) (void)) return 0; } weak_alias (__pthread_once, pthread_once) -strong_alias (__pthread_once, __pthread_once_internal) +hidden_def (__pthread_once) From 317f883716e7eb968fc0b123296e736d62e311a0 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 30 May 2012 11:21:12 -0700 Subject: [PATCH 4435/4487] alpha: Update copyright dates --- sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c b/sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c index 1b701b3e71..c342e0a7a0 100644 --- a/sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c +++ b/sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc. +/* Copyright (C) 2003-2012 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 From 66625b24f2f2f1ae451552a289213ec297e8a3c2 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 30 May 2012 18:55:55 +0000 Subject: [PATCH 4436/4487] Support sharing ARM headers for hard and soft float. --- ChangeLog.arm | 12 ++++++++++++ sysdeps/unix/sysv/linux/arm/Makefile | 26 ++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/ChangeLog.arm b/ChangeLog.arm index 9a3962e74c..f57a2e1bc0 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,5 +1,17 @@ 2012-05-30 Joseph Myers + * sysdeps/unix/sysv/linux/arm/Makefile (default-abi-prog): New + variable. + (default-abi): Likewise. + (abi-includes): Likewise. + (abi-variants): Likewise. + (abi-soft-options): Likewise. + (abi-soft-condition): Likewise. + (abi-soft-ld-soname): Likewise. + (abi-hard-options): Likewise. + (abi-hard-condition): Likewise. + (abi-hard-ld-soname): Likewise. + * sysdeps/unix/sysv/linux/arm/kernel-features.h (__ASSUME_TRUNCATE64_SYSCALL): Remove. diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile index fb1e3a5b99..d9eb10c9ae 100644 --- a/sysdeps/unix/sysv/linux/arm/Makefile +++ b/sysdeps/unix/sysv/linux/arm/Makefile @@ -65,3 +65,29 @@ LDFLAGS-tst-rfc3484 += $(common-objpfx)csu/libc-do-syscall.o LDFLAGS-tst-rfc3484-2 += $(common-objpfx)csu/libc-do-syscall.o LDFLAGS-tst-rfc3484-3 += $(common-objpfx)csu/libc-do-syscall.o endif + +define default-abi-prog +echo '#ifdef __ARM_PCS_VFP'; +echo 'hard'; +echo '#else'; +echo 'soft'; +echo '#endif' +endef +default-abi := $(strip $(shell \ + ($(default-abi-prog)) | $(CC) $(CFLAGS) $(CPPFLAGS) -E -P -)) +ifeq ($(default-abi),hard) +# OK. +else +ifneq ($(default-abi),soft) +Unknown ABI, must be "hard" or "soft". +endif +endif + +abi-includes := +abi-variants := soft hard +abi-soft-options := -U__ARM_PCS_VFP +abi-soft-condition := !defined __ARM_PCS_VFP +abi-soft-ld-soname := ld-linux.so.3 +abi-hard-options := -D__ARM_PCS_VFP +abi-hard-condition := defined __ARM_PCS_VFP +abi-hard-ld-soname := ld-linux-armhf.so.3 From 93b7ebc23d406564c04b240dc11b0dc8bfa0dc58 Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Wed, 30 May 2012 14:56:14 -0400 Subject: [PATCH 4437/4487] tile: add default-abi variables for tilegx --- ChangeLog.tile | 3 +++ sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/Makefile | 1 + sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/Makefile | 1 + 3 files changed, 5 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/Makefile create mode 100644 sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/Makefile diff --git a/ChangeLog.tile b/ChangeLog.tile index 6c9fb48362..3d52040c4e 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,5 +1,8 @@ 2012-05-30 Chris Metcalf + * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/Makefile: New file. + * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/Makefile: New file. + * sysdeps/tile/libm-test-ulps: Account for new tests. * sysdeps/unix/sysv/linux/tile/tilegx/Makefile: New file. diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/Makefile b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/Makefile new file mode 100644 index 0000000000..1e9d29be31 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/Makefile @@ -0,0 +1 @@ +default-abi := 32 diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/Makefile b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/Makefile new file mode 100644 index 0000000000..c8991d31e4 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/Makefile @@ -0,0 +1 @@ +default-abi := 64 From 710056450bac46f3623f401151c3b91c8152a4eb Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Wed, 30 May 2012 16:52:36 -0400 Subject: [PATCH 4438/4487] tile: don't guard setting abi- variables with ifeq ($(subdir),misc) --- ChangeLog.tile | 3 +++ sysdeps/unix/sysv/linux/tile/tilegx/Makefile | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ChangeLog.tile b/ChangeLog.tile index 3d52040c4e..ce8c3e07c6 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,5 +1,8 @@ 2012-05-30 Chris Metcalf + * sysdeps/unix/sysv/linux/tile/tilegx/Makefile: Remove test + that $(subdir) is "misc" when setting abi- variables. + * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/Makefile: New file. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/Makefile: New file. diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/Makefile b/sysdeps/unix/sysv/linux/tile/tilegx/Makefile index f21610c5ed..4f101f334a 100644 --- a/sysdeps/unix/sysv/linux/tile/tilegx/Makefile +++ b/sysdeps/unix/sysv/linux/tile/tilegx/Makefile @@ -1,10 +1,6 @@ -ifeq ($(subdir),misc) - # Provide biarch definitions. abi-variants := 64 32 abi-64-options := -D__LP64__ abi-64-condition := __WORDSIZE == 64 abi-32-options := -U__LP64__ abi-32-condition := __WORDSIZE == 32 - -endif From b9f936973547cb6d944723be4795980527a0c82c Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 30 May 2012 21:16:52 +0000 Subject: [PATCH 4439/4487] Regenerate ARM libm-test-ulps. --- ChangeLog.arm | 2 + sysdeps/arm/libm-test-ulps | 1414 +++++++++++++++++++++++------------- 2 files changed, 892 insertions(+), 524 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index f57a2e1bc0..1a6f23752b 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,5 +1,7 @@ 2012-05-30 Joseph Myers + * sysdeps/arm/libm-test-ulps: Regenerate. + * sysdeps/unix/sysv/linux/arm/Makefile (default-abi-prog): New variable. (default-abi): Likewise. diff --git a/sysdeps/arm/libm-test-ulps b/sysdeps/arm/libm-test-ulps index ba025fdc49..51356dddb6 100644 --- a/sysdeps/arm/libm-test-ulps +++ b/sysdeps/arm/libm-test-ulps @@ -1,17 +1,72 @@ # Begin of automatic generation -# asin -Test "asin (-0.5) == -pi/6": -float: 2 -ifloat: 2 -Test "asin (0.5) == pi/6": -float: 2 -ifloat: 2 -Test "asin (0.7) == 0.77539749661075306374035335271498708": +# acos_downward +Test "acos_downward (-0) == pi/2": +float: 1 +ifloat: 1 +Test "acos_downward (-0.5) == M_PI_6l*4.0": double: 1 -float: 2 idouble: 1 -ifloat: 2 +Test "acos_downward (-1) == pi": +float: 1 +ifloat: 1 +Test "acos_downward (0) == pi/2": +float: 1 +ifloat: 1 +Test "acos_downward (0.5) == M_PI_6l*2.0": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# acos_towardzero +Test "acos_towardzero (-0) == pi/2": +float: 1 +ifloat: 1 +Test "acos_towardzero (-0.5) == M_PI_6l*4.0": +double: 1 +idouble: 1 +Test "acos_towardzero (-1) == pi": +float: 1 +ifloat: 1 +Test "acos_towardzero (0) == pi/2": +float: 1 +ifloat: 1 +Test "acos_towardzero (0.5) == M_PI_6l*2.0": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# asin_downward +Test "asin_downward (-0.5) == -pi/6": +double: 1 +idouble: 1 +Test "asin_downward (0.5) == pi/6": +double: 1 +idouble: 1 +Test "asin_downward (1.0) == pi/2": +float: 1 +ifloat: 1 + +# asin_towardzero +Test "asin_towardzero (-0.5) == -pi/6": +double: 1 +idouble: 1 +Test "asin_towardzero (-1.0) == -pi/2": +float: 1 +ifloat: 1 +Test "asin_towardzero (0.5) == pi/6": +double: 1 +idouble: 1 +Test "asin_towardzero (1.0) == pi/2": +float: 1 +ifloat: 1 + +# asin_upward +Test "asin_upward (-1.0) == -pi/2": +float: 1 +ifloat: 1 # atan2 Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025": @@ -25,79 +80,257 @@ float: 1 ifloat: 1 # atanh -Test "atanh (0.7) == 0.8673005276940531944": -double: 1 -idouble: 1 Test "atanh (0.75) == 0.972955074527656652552676371721589865": float: 1 ifloat: 1 -# cabs -Test "cabs (-0.7 + 12.4 i) == 12.419742348374220601176836866763271": +# cacos +Test "Imaginary part of: cacos (+0 + 0.5 i) == pi/2 - 0.4812118250596034474977589134243684231352 i": +double: 2 float: 1 +idouble: 2 ifloat: 1 -Test "cabs (-0.7 - 12.4 i) == 12.419742348374220601176836866763271": +Test "Imaginary part of: cacos (+0 + 1.0 i) == pi/2 - 0.8813735870195430252326093249797923090282 i": +double: 2 float: 1 +idouble: 2 ifloat: 1 -Test "cabs (-12.4 + 0.7 i) == 12.419742348374220601176836866763271": +Test "Imaginary part of: cacos (+0 + 1.5 i) == pi/2 - 1.194763217287109304111930828519090523536 i": +double: 2 float: 1 +idouble: 2 ifloat: 1 -Test "cabs (-12.4 - 0.7 i) == 12.419742348374220601176836866763271": +Test "Imaginary part of: cacos (+0 - 0.5 i) == pi/2 + 0.4812118250596034474977589134243684231352 i": float: 1 ifloat: 1 -Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508432547041028554": +Test "Imaginary part of: cacos (+0 - 1.0 i) == pi/2 + 0.8813735870195430252326093249797923090282 i": double: 1 +float: 1 idouble: 1 -Test "cabs (0.7 + 12.4 i) == 12.419742348374220601176836866763271": +ifloat: 1 +Test "Imaginary part of: cacos (+0 - 1.5 i) == pi/2 + 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cacos (-0 + 0.5 i) == pi/2 - 0.4812118250596034474977589134243684231352 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Imaginary part of: cacos (-0 + 1.0 i) == pi/2 - 0.8813735870195430252326093249797923090282 i": +double: 2 float: 1 +idouble: 2 ifloat: 1 - -# cacos -Test "Real part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i": +Test "Imaginary part of: cacos (-0 + 1.5 i) == pi/2 - 1.194763217287109304111930828519090523536 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Imaginary part of: cacos (-0 - 0.5 i) == pi/2 + 0.4812118250596034474977589134243684231352 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-0 - 1.0 i) == pi/2 + 0.8813735870195430252326093249797923090282 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Imaginary part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i": +Test "Imaginary part of: cacos (-0 - 1.5 i) == pi/2 + 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cacos (-1.5 + +0 i) == pi - 0.9624236501192068949955178268487368462704 i": +double: 1 float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: cacos (0.5 + +0 i) == 1.047197551196597746154214461093167628066 - 0 i": +double: 1 +idouble: 1 +Test "Real part of: cacos (0.5 - 0 i) == 1.047197551196597746154214461093167628066 + +0 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cacos (1.5 + +0 i) == +0 - 0.9624236501192068949955178268487368462704 i": +double: 1 +float: 1 +idouble: 1 ifloat: 1 # cacosh -Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i": +Test "Real part of: cacosh (+0 + 0.5 i) == 0.4812118250596034474977589134243684231352 + pi/2 i": +float: 1 +ifloat: 1 +Test "Real part of: cacosh (+0 + 1.0 i) == 0.8813735870195430252326093249797923090282 + pi/2 i": double: 1 -float: 7 +float: 1 idouble: 1 -ifloat: 7 -Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i": +ifloat: 1 +Test "Real part of: cacosh (+0 + 1.5 i) == 1.194763217287109304111930828519090523536 + pi/2 i": double: 1 -float: 3 idouble: 1 -ifloat: 3 -Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": +Test "Real part of: cacosh (+0 - 0.5 i) == 0.4812118250596034474977589134243684231352 - pi/2 i": float: 1 ifloat: 1 -Test "Real part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459105272080819308 + 1.1351827477151551088992008271819053 i": +Test "Real part of: cacosh (+0 - 1.0 i) == 0.8813735870195430252326093249797923090282 - pi/2 i": double: 1 float: 1 idouble: 1 ifloat: 1 +Test "Real part of: cacosh (+0 - 1.5 i) == 1.194763217287109304111930828519090523536 - pi/2 i": +double: 1 +idouble: 1 +Test "Real part of: cacosh (-0 + 0.5 i) == 0.4812118250596034474977589134243684231352 + pi/2 i": +float: 1 +ifloat: 1 +Test "Real part of: cacosh (-0 + 1.0 i) == 0.8813735870195430252326093249797923090282 + pi/2 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: cacosh (-0 + 1.5 i) == 1.194763217287109304111930828519090523536 + pi/2 i": +double: 1 +idouble: 1 +Test "Real part of: cacosh (-0 - 0.5 i) == 0.4812118250596034474977589134243684231352 - pi/2 i": +float: 1 +ifloat: 1 +Test "Real part of: cacosh (-0 - 1.0 i) == 0.8813735870195430252326093249797923090282 - pi/2 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: cacosh (-0 - 1.5 i) == 1.194763217287109304111930828519090523536 - pi/2 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cacosh (-0.5 + +0 i) == +0 + 2.094395102393195492308428922186335256131 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cacosh (-0.5 - 0 i) == +0 - 2.094395102393195492308428922186335256131 i": +double: 1 +idouble: 1 +Test "Real part of: cacosh (-1.5 + +0 i) == 0.9624236501192068949955178268487368462704 + pi i": +float: 1 +ifloat: 1 +Test "Real part of: cacosh (-1.5 - 0 i) == 0.9624236501192068949955178268487368462704 - pi i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": +float: 1 +ifloat: 1 +Test "Real part of: cacosh (1.5 + +0 i) == 0.9624236501192068949955178268487368462704 + +0 i": +float: 1 +ifloat: 1 +Test "Real part of: cacosh (1.5 - 0 i) == 0.9624236501192068949955178268487368462704 - 0 i": +float: 1 +ifloat: 1 # casin -Test "Real part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i": -double: 3 -float: 2 -idouble: 3 -ifloat: 2 -Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i": +Test "Imaginary part of: casin (+0 + 0.5 i) == +0 + 0.4812118250596034474977589134243684231352 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Imaginary part of: casin (+0 + 1.0 i) == +0 + 0.8813735870195430252326093249797923090282 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Imaginary part of: casin (+0 + 1.5 i) == +0 + 1.194763217287109304111930828519090523536 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Imaginary part of: casin (+0 - 0.5 i) == +0 - 0.4812118250596034474977589134243684231352 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: casin (+0 - 1.0 i) == +0 - 0.8813735870195430252326093249797923090282 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: casin (+0 - 1.5 i) == +0 - 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +Test "Imaginary part of: casin (-0 + 0.5 i) == -0 + 0.4812118250596034474977589134243684231352 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Imaginary part of: casin (-0 + 1.0 i) == -0 + 0.8813735870195430252326093249797923090282 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Imaginary part of: casin (-0 + 1.5 i) == -0 + 1.194763217287109304111930828519090523536 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Imaginary part of: casin (-0 - 0.5 i) == -0 - 0.4812118250596034474977589134243684231352 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: casin (-0 - 1.0 i) == -0 - 0.8813735870195430252326093249797923090282 i": +double: 1 float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: casin (-0 - 1.5 i) == -0 - 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +Test "Imaginary part of: casin (-1.5 + +0 i) == -pi/2 + 0.9624236501192068949955178268487368462704 i": +double: 1 +float: 1 +idouble: 1 ifloat: 1 Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": double: 1 float: 1 idouble: 1 ifloat: 1 +Test "Imaginary part of: casin (1.5 + +0 i) == pi/2 + 0.9624236501192068949955178268487368462704 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 # casinh +Test "Real part of: casinh (-0 + 1.5 i) == -0.9624236501192068949955178268487368462704 + pi/2 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casinh (-0 - 1.5 i) == -0.9624236501192068949955178268487368462704 - pi/2 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casinh (-0.5 + +0 i) == -0.4812118250596034474977589134243684231352 + +0 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Real part of: casinh (-0.5 - 0 i) == -0.4812118250596034474977589134243684231352 - 0 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Real part of: casinh (-1.0 + +0 i) == -0.8813735870195430252326093249797923090282 + +0 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Real part of: casinh (-1.0 - 0 i) == -0.8813735870195430252326093249797923090282 - 0 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Real part of: casinh (-1.5 + +0 i) == -1.194763217287109304111930828519090523536 + +0 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Real part of: casinh (-1.5 - 0 i) == -1.194763217287109304111930828519090523536 - 0 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": double: 5 float: 1 @@ -108,10 +341,10 @@ double: 3 float: 6 idouble: 3 ifloat: 6 -Test "Real part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i": -double: 1 -idouble: 1 -Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i": +Test "Real part of: casinh (0.5 + +0 i) == 0.4812118250596034474977589134243684231352 + +0 i": +float: 1 +ifloat: 1 +Test "Real part of: casinh (0.5 - 0 i) == 0.4812118250596034474977589134243684231352 - 0 i": float: 1 ifloat: 1 Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": @@ -122,38 +355,34 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +Test "Real part of: casinh (1.0 + +0 i) == 0.8813735870195430252326093249797923090282 + +0 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casinh (1.0 - 0 i) == 0.8813735870195430252326093249797923090282 - 0 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casinh (1.5 + +0 i) == 1.194763217287109304111930828519090523536 + +0 i": +double: 1 +idouble: 1 +Test "Real part of: casinh (1.5 - 0 i) == 1.194763217287109304111930828519090523536 - 0 i": +double: 1 +idouble: 1 # catan -Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": -float: 3 -ifloat: 3 Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Real part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i": -float: 4 -ifloat: 4 -Test "Imaginary part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i": -double: 1 -idouble: 1 # catanh Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": double: 4 idouble: 4 -Test "Imaginary part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": -float: 4 -ifloat: 4 -Test "Real part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i": -float: 1 -ifloat: 1 -Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i": -double: 1 -float: 6 -idouble: 1 -ifloat: 6 Test "Real part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i": double: 1 idouble: 1 @@ -165,23 +394,26 @@ idouble: 1 Test "cbrt (0.75) == 0.908560296416069829445605878163630251": double: 1 idouble: 1 -Test "cbrt (0.970299) == 0.99": -double: 1 -idouble: 1 Test "cbrt (0.9921875) == 0.997389022060725270579075195353955217": double: 1 idouble: 1 # ccos -Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i": -float: 1 -ifloat: 1 -Test "Real part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i": +Test "Imaginary part of: ccos (-0.75 + 710.5 i) == 1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i": double: 1 idouble: 1 -Test "Imaginary part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i": +Test "Imaginary part of: ccos (-0.75 + 89.5 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: ccos (-0.75 - 710.5 i) == 1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i": double: 1 idouble: 1 +Test "Imaginary part of: ccos (-0.75 - 89.5 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i": +float: 1 +ifloat: 1 Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": double: 1 float: 1 @@ -190,6 +422,21 @@ ifloat: 1 Test "Imaginary part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": float: 1 ifloat: 1 +Test "Imaginary part of: ccos (0.75 + 710.5 i) == 1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ccos (0.75 + 89.5 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: ccos (0.75 - 710.5 i) == 1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ccos (0.75 - 89.5 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: ccos (0x1p-1074 + 1440 i) == inf - 5.981479269486130556466515778180916082415e301 i": +double: 1 +idouble: 1 # ccosh Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": @@ -198,14 +445,18 @@ ifloat: 1 Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": float: 1 ifloat: 1 -Test "Real part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i": +Test "Imaginary part of: ccosh (-710.5 + 0.75 i) == 1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i": double: 1 -float: 1 idouble: 1 -ifloat: 1 -Test "Imaginary part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i": +Test "Imaginary part of: ccosh (-710.5 - 0.75 i) == 1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i": double: 1 idouble: 1 +Test "Imaginary part of: ccosh (-89.5 + 0.75 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: ccosh (-89.5 - 0.75 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": double: 1 float: 1 @@ -214,30 +465,67 @@ ifloat: 1 Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": float: 1 ifloat: 1 +Test "Imaginary part of: ccosh (1440 + 0x1p-1074 i) == inf + 5.981479269486130556466515778180916082415e301 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ccosh (710.5 + 0.75 i) == 1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ccosh (710.5 - 0.75 i) == 1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ccosh (89.5 + 0.75 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: ccosh (89.5 - 0.75 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 # cexp Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": float: 1 ifloat: 1 -Test "Real part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i": +Test "Imaginary part of: cexp (-95 + 0.75 i) == 4.039714446238306526889476684000081624047e-42 + 3.763383677300535390271646960780570275931e-42 i": double: 1 -float: 1 idouble: 1 +Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": +float: 1 ifloat: 1 -Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i": +Test "Imaginary part of: cexp (1440 + 0x1p-1074 i) == inf + 1.196295853897226111293303155636183216483e302 i": +double: 1 +idouble: 1 +Test "Real part of: cexp (50 + 0x1p127 i) == 4.053997150228616856622417636046265337193e21 + 3.232070315463388524466674772633810238819e21 i": +double: 2 float: 1 +idouble: 2 ifloat: 1 -Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": +Test "Imaginary part of: cexp (50 + 0x1p127 i) == 4.053997150228616856622417636046265337193e21 + 3.232070315463388524466674772633810238819e21 i": +double: 1 +idouble: 1 +Test "Real part of: cexp (500 + 0x1p1023 i) == -1.159886268932754433233243794561351783426e217 + 7.904017694554466595359379965081774849708e216 i": +double: 1 +idouble: 1 +Test "Real part of: cexp (709.8125 + 0.75 i) == 1.355121963080879535248452862759108365762e308 + 1.262426823598609432507811340856186873507e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cexp (709.8125 + 0.75 i) == 1.355121963080879535248452862759108365762e308 + 1.262426823598609432507811340856186873507e308 i": +double: 1 +idouble: 1 +Test "Real part of: cexp (88.75 + 0.75 i) == 2.558360358486542817001900410314204322891e38 + 2.383359453227311447654736314679677655100e38 i": float: 1 ifloat: 1 +Test "Imaginary part of: cexp (88.75 + 0.75 i) == 2.558360358486542817001900410314204322891e38 + 2.383359453227311447654736314679677655100e38 i": +float: 2 +ifloat: 2 # clog -Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i": +Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i": +float: 1 +ifloat: 1 +Test "Real part of: clog (0x1p-1074 + 0x1p-1074 i) == -744.0934983311012896593986823853525458290 + pi/4 i": double: 1 -float: 3 idouble: 1 -ifloat: 3 -Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i": +Test "Real part of: clog (0x1p-147 + 0x1p-147 i) == -101.5460619520319878296245057936228672231 + pi/4 i": float: 1 ifloat: 1 @@ -250,9 +538,7 @@ float: 1 ifloat: 1 Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i": double: 1 -float: 5 idouble: 1 -ifloat: 5 Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i": float: 1 ifloat: 1 @@ -277,15 +563,22 @@ ifloat: 1 Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i": float: 1 ifloat: 1 -Test "Real part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i": -double: 1 +Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0x1.fffffep+127 + 0x1.fffffep+127 i) == 38.68235441693561449174780668781319348761 + pi/4*log10(e) i": float: 1 -idouble: 1 ifloat: 1 -Test "Imaginary part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i": +Test "Real part of: clog10 (0x1.fffffep+127 + 1.0 i) == 38.53183941910362389414093724045094697423 + 1.276276851248440096917018665609900318458e-39 i": +float: 1 +ifloat: 1 +Test "Real part of: clog10 (0x1p-1074 + 0x1p-1074 i) == -323.1557003452838130619487034867432642357 + pi/4*log10(e) i": double: 1 idouble: 1 -Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i": +Test "Imaginary part of: clog10 (0x1p-147 + 0x1p-147 i) == -44.10089436477324509881274807713822842154 + pi/4*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0x1p-149 + 0x1p-149 i) == -44.70295435610120748924022586658721447508 + pi/4*log10(e) i": float: 1 ifloat: 1 Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i": @@ -302,26 +595,95 @@ float: 1 ifloat: 1 # cos -Test "cos (0.7) == 0.76484218728448842625585999019186495": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 Test "cos (M_PI_6l * 2.0) == 0.5": double: 1 -float: 0.5 idouble: 1 -ifloat: 0.5 Test "cos (M_PI_6l * 4.0) == -0.5": double: 2 float: 1 idouble: 2 ifloat: 1 -Test "cos (pi/2) == 0": -double: 0.2758 -float: 0.3667 -idouble: 0.2758 -ifloat: 0.3667 + +# cos_downward +Test "cos_downward (1) == 0.5403023058681397174009366074429766037323": +float: 1 +ifloat: 1 +Test "cos_downward (2) == -0.4161468365471423869975682295007621897660": +float: 1 +ifloat: 1 +Test "cos_downward (3) == -0.9899924966004454572715727947312613023937": +float: 1 +ifloat: 1 +Test "cos_downward (4) == -0.6536436208636119146391681830977503814241": +float: 1 +ifloat: 1 +Test "cos_downward (5) == 0.2836621854632262644666391715135573083344": +float: 1 +ifloat: 1 +Test "cos_downward (7) == 0.7539022543433046381411975217191820122183": +float: 1 +ifloat: 1 +Test "cos_downward (8) == -0.1455000338086135258688413818311946826093": +float: 1 +ifloat: 1 + +# cos_tonearest +Test "cos_tonearest (7) == 0.7539022543433046381411975217191820122183": +float: 1 +ifloat: 1 + +# cos_towardzero +Test "cos_towardzero (2) == -0.4161468365471423869975682295007621897660": +float: 1 +ifloat: 1 +Test "cos_towardzero (3) == -0.9899924966004454572715727947312613023937": +float: 1 +ifloat: 1 +Test "cos_towardzero (5) == 0.2836621854632262644666391715135573083344": +float: 1 +ifloat: 1 +Test "cos_towardzero (7) == 0.7539022543433046381411975217191820122183": +float: 1 +ifloat: 1 +Test "cos_towardzero (8) == -0.1455000338086135258688413818311946826093": +float: 1 +ifloat: 1 + +# cos_upward +Test "cos_upward (10) == -0.8390715290764524522588639478240648345199": +float: 1 +ifloat: 1 +Test "cos_upward (6) == 0.9601702866503660205456522979229244054519": +float: 1 +ifloat: 1 +Test "cos_upward (7) == 0.7539022543433046381411975217191820122183": +float: 1 +ifloat: 1 +Test "cos_upward (9) == -0.9111302618846769883682947111811653112463": +float: 2 +ifloat: 2 + +# cosh_downward +Test "cosh_downward (22) == 1792456423.065795780980053377632656584997": +float: 1 +ifloat: 1 +Test "cosh_downward (23) == 4872401723.124451300068625740569997090344": +float: 1 +ifloat: 1 +Test "cosh_downward (24) == 13244561064.92173614708845674912733665919": +float: 1 +ifloat: 1 + +# cosh_towardzero +Test "cosh_towardzero (22) == 1792456423.065795780980053377632656584997": +float: 1 +ifloat: 1 +Test "cosh_towardzero (23) == 4872401723.124451300068625740569997090344": +float: 1 +ifloat: 1 +Test "cosh_towardzero (24) == 13244561064.92173614708845674912733665919": +float: 1 +ifloat: 1 # cpow Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": @@ -349,24 +711,54 @@ Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": float: 2 ifloat: 2 Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i": -double: 1.1031 -float: 1.5 -idouble: 1.1031 -ifloat: 1.5 +double: 2 +float: 2 +idouble: 2 +ifloat: 2 # csin -Test "Imaginary part of: csin (0.7 + 1.2 i) == 1.1664563419657581376 + 1.1544997246948547371 i": +Test "Real part of: csin (-0.75 + 710.5 i) == -1.255317763348154410745082950806112487736e308 + 1.347490911916428129246890157395342279438e308 i": +double: 1 +idouble: 1 +Test "Real part of: csin (-0.75 + 89.5 i) == -2.522786001038096774676288412995370563339e38 + 2.708024460708609732016532185663087200560e38 i": +float: 1 +ifloat: 1 +Test "Real part of: csin (-0.75 - 710.5 i) == -1.255317763348154410745082950806112487736e308 - 1.347490911916428129246890157395342279438e308 i": +double: 1 +idouble: 1 +Test "Real part of: csin (-0.75 - 89.5 i) == -2.522786001038096774676288412995370563339e38 - 2.708024460708609732016532185663087200560e38 i": +float: 1 +ifloat: 1 +Test "Real part of: csin (0.75 + 710.5 i) == 1.255317763348154410745082950806112487736e308 + 1.347490911916428129246890157395342279438e308 i": +double: 1 +idouble: 1 +Test "Real part of: csin (0.75 + 89.5 i) == 2.522786001038096774676288412995370563339e38 + 2.708024460708609732016532185663087200560e38 i": +float: 1 +ifloat: 1 +Test "Real part of: csin (0.75 - 710.5 i) == 1.255317763348154410745082950806112487736e308 - 1.347490911916428129246890157395342279438e308 i": +double: 1 +idouble: 1 +Test "Real part of: csin (0.75 - 89.5 i) == 2.522786001038096774676288412995370563339e38 - 2.708024460708609732016532185663087200560e38 i": float: 1 ifloat: 1 +Test "Real part of: csin (0x1p-1074 + 1440 i) == 5.981479269486130556466515778180916082415e301 + inf i": +double: 1 +idouble: 1 # csinh Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i": double: 1 idouble: 1 -Test "Real part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i": +Test "Imaginary part of: csinh (-710.5 + 0.75 i) == -1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: csinh (-710.5 - 0.75 i) == -1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: csinh (-89.5 + 0.75 i) == -2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": float: 1 ifloat: 1 -Test "Imaginary part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i": +Test "Imaginary part of: csinh (-89.5 - 0.75 i) == -2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": float: 1 ifloat: 1 Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": @@ -375,6 +767,21 @@ ifloat: 1 Test "Imaginary part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": float: 1 ifloat: 1 +Test "Imaginary part of: csinh (1440 + 0x1p-1074 i) == inf + 5.981479269486130556466515778180916082415e301 i": +double: 1 +idouble: 1 +Test "Imaginary part of: csinh (710.5 + 0.75 i) == 1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: csinh (710.5 - 0.75 i) == 1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: csinh (89.5 + 0.75 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: csinh (89.5 - 0.75 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 # csqrt Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": @@ -383,52 +790,71 @@ ifloat: 1 Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i": float: 1 ifloat: 1 -Test "Real part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i": +Test "Imaginary part of: csqrt (0x1.fffffep+127 + 1.0 i) == 1.844674352395372953599975585936590505260e+19 + 2.710505511993121390769065968615872097053e-20 i": float: 1 ifloat: 1 +Test "Real part of: csqrt (0x1.fffffffffffffp+1023 + 0x1.fffffffffffffp+1023 i) == 1.473094556905565378990473658199034571917e+154 + 6.101757441282702188537080005372547713595e+153 i": +double: 1 +idouble: 1 +Test "Imaginary part of: csqrt (0x1.fffffffffffffp+1023 + 0x1.fffffffffffffp+1023 i) == 1.473094556905565378990473658199034571917e+154 + 6.101757441282702188537080005372547713595e+153 i": +double: 1 +idouble: 1 +Test "Imaginary part of: csqrt (0x1.fffffffffffffp+1023 + 0x1p+1023 i) == 1.379778091031440685006200821918878702861e+154 + 3.257214233483129514781233066898042490248e+153 i": +double: 1 +idouble: 1 # ctan Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": -double: 1 -idouble: 1 -Test "Real part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i": float: 1 ifloat: 1 -Test "Imaginary part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i": +Test "Imaginary part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": double: 1 -float: 1 idouble: 1 -ifloat: 1 Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i": double: 1 idouble: 1 +Test "Real part of: ctan (0x1p1023 + 1 i) == -0.2254627924997545057926782581695274244229 + 0.8786063118883068695462540226219865087189 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ctan (0x1p127 + 1 i) == 0.2446359391192790896381501310437708987204 + 0.9101334047676183761532873794426475906201 i": +double: 1 +idouble: 1 +Test "Real part of: ctan (0x3.243f6cp-1 + 0 i) == -2.287733242885645987394874673945769518150e7 + 0.0 i": +float: 1 +ifloat: 1 # ctanh Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": double: 1 -float: 2 +float: 1 idouble: 1 -ifloat: 2 -Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i": +ifloat: 1 +Test "Imaginary part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": +double: 1 float: 1 +idouble: 1 ifloat: 1 -Test "Real part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i": -double: 2 +Test "Imaginary part of: ctanh (0 + 0x3.243f6cp-1 i) == 0.0 - 2.287733242885645987394874673945769518150e7 i": float: 1 -idouble: 2 ifloat: 1 -Test "Imaginary part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i": -double: 2 +Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i": +double: 1 float: 1 -idouble: 2 +idouble: 1 ifloat: 1 Test "Real part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i": double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i": +float: 2 +ifloat: 2 +Test "Imaginary part of: ctanh (1 + 0x1p1023 i) == 0.8786063118883068695462540226219865087189 - 0.2254627924997545057926782581695274244229 i": +double: 1 +idouble: 1 +Test "Real part of: ctanh (1 + 0x1p127 i) == 0.9101334047676183761532873794426475906201 + 0.2446359391192790896381501310437708987204 i": +double: 1 idouble: 1 # erf @@ -437,78 +863,67 @@ double: 1 idouble: 1 # erfc -Test "erfc (0.7) == 0.32219880616258152702": -double: 1 -idouble: 1 -Test "erfc (1.2) == 0.089686021770364619762": -double: 2 -float: 2 -idouble: 2 -ifloat: 2 -Test "erfc (2.0) == 0.0046777349810472658379": +Test "erfc (0x1.f7303cp+1) == 2.705500297238986897105236321218861842255e-8": double: 1 idouble: 1 +Test "erfc (0x1.ffa002p+2) == 1.233585992097580296336099501489175967033e-29": +float: 1 +ifloat: 1 Test "erfc (2.0) == 0.00467773498104726583793074363274707139": double: 1 idouble: 1 -Test "erfc (4.1) == 0.67000276540848983727e-8": -double: 24 -float: 12 -idouble: 24 -ifloat: 12 Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8": double: 1 idouble: 1 # exp10 Test "exp10 (-1) == 0.1": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -Test "exp10 (0.7) == 5.0118723362727228500155418688494574": -float: 1 -ifloat: 1 -Test "exp10 (0.75) == 5.62341325190349080394951039776481231": double: 1 -float: 1 idouble: 1 -ifloat: 1 +Test "exp10 (-305) == 1.0e-305": +double: 1 +idouble: 1 +Test "exp10 (-36) == 1.0e-36": +double: 1 +idouble: 1 Test "exp10 (3) == 1000": -double: 6 -float: 2 -idouble: 6 -ifloat: 2 - -# expm1 -Test "expm1 (0.75) == 1.11700001661267466854536981983709561": double: 1 idouble: 1 -Test "expm1 (1) == M_El - 1.0": +Test "exp10 (36) == 1.0e36": +double: 1 +idouble: 1 + +# exp_downward +Test "exp_downward (2) == e^2": +float: 1 +ifloat: 1 +Test "exp_downward (3) == e^3": float: 1 ifloat: 1 -# fmod -Test "fmod (-6.5, -2.3) == -1.9": -double: 2 +# exp_towardzero +Test "exp_towardzero (2) == e^2": float: 1 -idouble: 2 ifloat: 1 -Test "fmod (-6.5, 2.3) == -1.9": -double: 2 +Test "exp_towardzero (3) == e^3": float: 1 -idouble: 2 ifloat: 1 -Test "fmod (6.5, -2.3) == 1.9": -double: 2 + +# exp_upward +Test "exp_upward (1) == e": float: 1 -idouble: 2 ifloat: 1 -Test "fmod (6.5, 2.3) == 1.9": -double: 2 + +# expm1 +Test "expm1 (0.75) == 1.11700001661267466854536981983709561": +double: 1 +idouble: 1 +Test "expm1 (1) == M_El - 1.0": float: 1 -idouble: 2 ifloat: 1 +Test "expm1 (500.0) == 1.4035922178528374107397703328409120821806e+217": +double: 1 +idouble: 1 # hypot Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271": @@ -526,9 +941,6 @@ ifloat: 1 Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (0.7, 1.2) == 1.3892443989449804508432547041028554": -double: 1 -idouble: 1 Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 @@ -548,19 +960,14 @@ ifloat: 1 Test "j0 (0.75) == 0.864242275166648623555731103820923211": float: 1 ifloat: 1 +Test "j0 (0x1.d7ce3ap+107) == 2.775523647291230802651040996274861694514e-17": +float: 2 +ifloat: 2 Test "j0 (10.0) == -0.245935764451348335197760862485328754": double: 2 float: 1 idouble: 2 ifloat: 1 -Test "j0 (10.0) == -0.24593576445134833520": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -Test "j0 (2.0) == 0.22389077914123566805": -float: 2 -ifloat: 2 Test "j0 (2.0) == 0.223890779141235668051827454649948626": float: 2 ifloat: 2 @@ -569,27 +976,21 @@ double: 1 float: 1 idouble: 1 ifloat: 1 -Test "j0 (8.0) == 0.17165080713755390609": -float: 1 -ifloat: 1 Test "j0 (8.0) == 0.171650807137553906090869407851972001": float: 1 ifloat: 1 # j1 -Test "j1 (10.0) == 0.0434727461688614366697487680258592883": -float: 2 -ifloat: 2 -Test "j1 (10.0) == 0.043472746168861436670": -float: 2 -ifloat: 2 -Test "j1 (2.0) == 0.57672480775687338720": +Test "j1 (0x1.3ffp+74) == 1.818984347516051243459364437186082741567e-12": double: 1 idouble: 1 -Test "j1 (2.0) == 0.576724807756873387202448242269137087": +Test "j1 (0x1.ff00000000002p+840) == 1.846591691699331493194965158699937660696e-127": double: 1 idouble: 1 -Test "j1 (8.0) == 0.23463634685391462438": +Test "j1 (10.0) == 0.0434727461688614366697487680258592883": +float: 2 +ifloat: 2 +Test "j1 (2.0) == 0.576724807756873387202448242269137087": double: 1 idouble: 1 Test "j1 (8.0) == 0.234636346853914624381276651590454612": @@ -610,14 +1011,6 @@ double: 2 float: 1 idouble: 2 ifloat: 1 -Test "jn (0, 10.0) == -0.24593576445134833520": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -Test "jn (0, 2.0) == 0.22389077914123566805": -float: 2 -ifloat: 2 Test "jn (0, 2.0) == 0.223890779141235668051827454649948626": float: 2 ifloat: 2 @@ -626,45 +1019,23 @@ double: 1 float: 1 idouble: 1 ifloat: 1 -Test "jn (0, 8.0) == 0.17165080713755390609": -float: 1 -ifloat: 1 Test "jn (0, 8.0) == 0.171650807137553906090869407851972001": float: 1 ifloat: 1 Test "jn (1, 10.0) == 0.0434727461688614366697487680258592883": float: 2 ifloat: 2 -Test "jn (1, 10.0) == 0.043472746168861436670": -float: 2 -ifloat: 2 -Test "jn (1, 2.0) == 0.57672480775687338720": -double: 1 -idouble: 1 Test "jn (1, 2.0) == 0.576724807756873387202448242269137087": double: 1 idouble: 1 -Test "jn (1, 8.0) == 0.23463634685391462438": -double: 1 -idouble: 1 Test "jn (1, 8.0) == 0.234636346853914624381276651590454612": double: 1 idouble: 1 -Test "jn (10, 0.1) == 0.26905328954342155795e-19": -double: 6 -float: 4 -idouble: 6 -ifloat: 4 Test "jn (10, 0.125) == 0.250543369809369890173993791865771547e-18": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "jn (10, 0.7) == 0.75175911502153953928e-11": -double: 3 -float: 1 -idouble: 3 -ifloat: 1 Test "jn (10, 0.75) == 0.149621713117596814698712483621682835e-10": double: 1 float: 1 @@ -675,35 +1046,26 @@ double: 4 float: 3 idouble: 4 ifloat: 3 -Test "jn (10, 10.0) == 0.20748610663335885770": -double: 4 -float: 3 -idouble: 4 -ifloat: 3 Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6": double: 1 -float: 4 +float: 2 idouble: 1 -ifloat: 4 -Test "jn (10, 2.0) == 0.25153862827167367096e-6": -float: 4 -ifloat: 4 +ifloat: 2 +Test "jn (2, 0x1.ffff62p+99) == -4.43860668048170034334926693188979974489e-16": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 Test "jn (2, 2.4048255576957729) == 0.43175480701968038399746111312430703": double: 2 float: 1 idouble: 2 ifloat: 1 -Test "jn (3, 0.1) == 0.000020820315754756261429": -double: 1 -idouble: 1 Test "jn (3, 0.125) == 0.406503832554912875023029337653442868e-4": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "jn (3, 0.7) == 0.0069296548267508408077": -float: 1 -ifloat: 1 Test "jn (3, 0.75) == 0.848438342327410884392755236884386804e-2": double: 1 float: 1 @@ -714,21 +1076,9 @@ double: 3 float: 1 idouble: 3 ifloat: 1 -Test "jn (3, 10.0) == 0.058379379305186812343": -double: 3 +Test "jn (3, 2.0) == 0.128943249474402051098793332969239835": float: 1 -idouble: 3 ifloat: 1 -Test "jn (3, 2.0) == 0.128943249474402051098793332969239835": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -Test "jn (3, 2.0) == 0.12894324947440205110": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 Test "jn (3, 2.4048255576957729) == 0.19899990535769083404042146764530813": double: 3 idouble: 3 @@ -773,19 +1123,7 @@ float: 2 idouble: 1 ifloat: 2 -# log -Test "log (0.7) == -0.35667494393873237891263871124118447": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - # log10 -Test "log10 (0.7) == -0.15490195998574316929": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 Test "log10 (0.75) == -0.124938736608299953132449886193870744": double: 1 float: 2 @@ -799,69 +1137,167 @@ ifloat: 1 Test "log1p (-0.25) == -0.287682072451780927439219005993827432": float: 1 ifloat: 1 -Test "log1p (-0.3) == -0.35667494393873237891263871124118447": -double: 1 + +# pow +Test "pow (0x0.ffffffp0, -0x1p24) == 2.7182819094701610539628664526874952929416": +float: 1 +ifloat: 1 +Test "pow (0x0.ffffffp0, 0x1p24) == 0.3678794302077803437135155590023422899744": +float: 1 +ifloat: 1 +Test "pow (0x1.000002p0, 0x1p24) == 7.3890552180866447284268641248075832310141": float: 1 -idouble: 1 ifloat: 1 -# log2 -Test "log2 (0.7) == -0.51457317282975824043": -double: 1 +# pow_downward +Test "pow_downward (1.5, 1.03125) == 1.519127098714743184071644334163037684948": float: 1 -idouble: 1 ifloat: 1 -# sincos -Test "sincos (0.7, &sin_res, &cos_res) puts 0.76484218728448842625585999019186495 in cos_res": -double: 1 +# pow_towardzero +Test "pow_towardzero (1.5, 1.03125) == 1.519127098714743184071644334163037684948": +float: 1 +ifloat: 1 + +# pow_upward +Test "pow_upward (1.0625, 1.125) == 1.070582293028761362162622578677070098674": +float: 1 +ifloat: 1 + +# sin_downward +Test "sin_downward (10) == -0.5440211108893698134047476618513772816836": +float: 1 +ifloat: 1 +Test "sin_downward (3) == 0.1411200080598672221007448028081102798469": +float: 1 +ifloat: 1 +Test "sin_downward (5) == -0.9589242746631384688931544061559939733525": +float: 1 +ifloat: 1 +Test "sin_downward (6) == -0.2794154981989258728115554466118947596280": +float: 1 +ifloat: 1 + +# sin_tonearest +Test "sin_tonearest (1) == 0.8414709848078965066525023216302989996226": +float: 1 +ifloat: 1 + +# sin_towardzero +Test "sin_towardzero (1) == 0.8414709848078965066525023216302989996226": +float: 1 +ifloat: 1 +Test "sin_towardzero (10) == -0.5440211108893698134047476618513772816836": +float: 1 +ifloat: 1 +Test "sin_towardzero (4) == -0.7568024953079282513726390945118290941359": +float: 1 +ifloat: 1 +Test "sin_towardzero (5) == -0.9589242746631384688931544061559939733525": +float: 1 +ifloat: 1 +Test "sin_towardzero (9) == 0.4121184852417565697562725663524351793439": +float: 1 +ifloat: 1 + +# sin_upward +Test "sin_upward (1) == 0.8414709848078965066525023216302989996226": +float: 1 +ifloat: 1 +Test "sin_upward (2) == 0.9092974268256816953960198659117448427023": +float: 2 +ifloat: 2 +Test "sin_upward (4) == -0.7568024953079282513726390945118290941359": +float: 1 +ifloat: 1 +Test "sin_upward (9) == 0.4121184852417565697562725663524351793439": float: 1 -idouble: 1 ifloat: 1 + +# sincos Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": double: 1 -float: 0.5 -idouble: 1 -ifloat: 0.5 -Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res": -double: 1 -float: 1 idouble: 1 -ifloat: 1 Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res": -double: 0.2758 -float: 0.3667 -idouble: 0.2758 -ifloat: 0.3667 Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res": float: 1 ifloat: 1 -Test "sincos (pi/6, &sin_res, &cos_res) puts 0.866025403784438646764 in cos_res": + +# sinh_downward +Test "sinh_downward (22) == 1792456423.065795780701106568345764104225": +float: 1 +ifloat: 1 +Test "sinh_downward (23) == 4872401723.124451299966006944252978187305": +float: 1 +ifloat: 1 +Test "sinh_downward (24) == 13244561064.92173614705070540368454568168": float: 1 ifloat: 1 -# sinh -Test "sinh (0.7) == 0.75858370183953350346": -double: 1 +# sinh_towardzero +Test "sinh_towardzero (22) == 1792456423.065795780701106568345764104225": +float: 1 +ifloat: 1 +Test "sinh_towardzero (23) == 4872401723.124451299966006944252978187305": +float: 1 +ifloat: 1 +Test "sinh_towardzero (24) == 13244561064.92173614705070540368454568168": +float: 1 +ifloat: 1 + +# tan_downward +Test "tan_downward (1) == 1.5574077246549022305069748074583601730873": +float: 1 +ifloat: 1 +Test "tan_downward (10) == 0.6483608274590866712591249330098086768169": +float: 1 +ifloat: 1 +Test "tan_downward (2) == -2.1850398632615189916433061023136825434320": +float: 1 +ifloat: 1 +Test "tan_downward (6) == -0.2910061913847491570536995888681755428312": +float: 1 +ifloat: 1 +Test "tan_downward (8) == -6.7997114552203786999252627596086333648814": +float: 1 +ifloat: 1 +Test "tan_downward (9) == -0.4523156594418098405903708757987855343087": float: 1 -idouble: 1 ifloat: 1 -# tan -Test "tan (pi/4) == 1": -double: 0.5 -idouble: 0.5 +# tan_towardzero +Test "tan_towardzero (10) == 0.6483608274590866712591249330098086768169": +float: 1 +ifloat: 1 +Test "tan_towardzero (3) == -0.1425465430742778052956354105339134932261": +float: 1 +ifloat: 1 +Test "tan_towardzero (4) == 1.1578212823495775831373424182673239231198": +float: 1 +ifloat: 1 +Test "tan_towardzero (5) == -3.3805150062465856369827058794473439087096": +float: 1 +ifloat: 1 +Test "tan_towardzero (9) == -0.4523156594418098405903708757987855343087": +float: 1 +ifloat: 1 -# tanh -Test "tanh (0.7) == 0.60436777711716349631": -double: 1 +# tan_upward +Test "tan_upward (1) == 1.5574077246549022305069748074583601730873": +float: 1 +ifloat: 1 +Test "tan_upward (10) == 0.6483608274590866712591249330098086768169": +float: 1 +ifloat: 1 +Test "tan_upward (3) == -0.1425465430742778052956354105339134932261": +float: 1 +ifloat: 1 +Test "tan_upward (5) == -3.3805150062465856369827058794473439087096": float: 1 -idouble: 1 ifloat: 1 # tgamma @@ -880,34 +1316,22 @@ idouble: 1 ifloat: 1 # y0 -Test "y0 (0.7) == -0.19066492933739506743": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 +Test "y0 (0x1.3ffp+74) == 1.818984347516051243459467456433028748678e-12": +double: 1 +idouble: 1 +Test "y0 (0x1.ff00000000002p+840) == 1.846591691699331493194965158699937660696e-127": +double: 1 +idouble: 1 Test "y0 (1.0) == 0.0882569642156769579829267660235151628": double: 2 float: 1 idouble: 2 ifloat: 1 -Test "y0 (1.0) == 0.088256964215676957983": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 Test "y0 (1.5) == 0.382448923797758843955068554978089862": double: 2 float: 1 idouble: 2 ifloat: 1 -Test "y0 (1.5) == 0.38244892379775884396": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -Test "y0 (10.0) == 0.055671167283599391424": -float: 1 -ifloat: 1 Test "y0 (10.0) == 0.0556711672835993914244598774101900481": float: 1 ifloat: 1 @@ -916,35 +1340,17 @@ double: 1 float: 1 idouble: 1 ifloat: 1 -Test "y0 (8.0) == 0.22352148938756622053": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 # y1 -Test "y1 (0.1) == -6.4589510947020269877": -double: 1 -idouble: 1 Test "y1 (0.125) == -5.19993611253477499595928744876579921": double: 1 idouble: 1 -Test "y1 (0.7) == -1.1032498719076333697": +Test "y1 (0x1.27e204p+99) == -8.881610148467797208469612080785210013461e-16": double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "y1 (1.5) == -0.41230862697391129595": -float: 1 -ifloat: 1 +idouble: 1 Test "y1 (1.5) == -0.412308626973911295952829820633445323": float: 1 ifloat: 1 -Test "y1 (10.0) == 0.24901542420695388392": -double: 3 -float: 1 -idouble: 3 -ifloat: 1 Test "y1 (10.0) == 0.249015424206953883923283474663222803": double: 3 float: 1 @@ -955,51 +1361,23 @@ double: 1 float: 1 idouble: 1 ifloat: 1 -Test "y1 (2.0) == -0.10703243154093754689": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 Test "y1 (8.0) == -0.158060461731247494255555266187483550": double: 1 float: 2 idouble: 1 ifloat: 2 -Test "y1 (8.0) == -0.15806046173124749426": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 # yn -Test "yn (0, 0.7) == -0.19066492933739506743": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 Test "yn (0, 1.0) == 0.0882569642156769579829267660235151628": double: 2 float: 1 idouble: 2 ifloat: 1 -Test "yn (0, 1.0) == 0.088256964215676957983": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 Test "yn (0, 1.5) == 0.382448923797758843955068554978089862": double: 2 float: 1 idouble: 2 ifloat: 1 -Test "yn (0, 1.5) == 0.38244892379775884396": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -Test "yn (0, 10.0) == 0.055671167283599391424": -float: 1 -ifloat: 1 Test "yn (0, 10.0) == 0.0556711672835993914244598774101900481": float: 1 ifloat: 1 @@ -1008,33 +1386,12 @@ double: 1 float: 1 idouble: 1 ifloat: 1 -Test "yn (0, 8.0) == 0.22352148938756622053": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "yn (1, 0.1) == -6.4589510947020269877": -double: 1 -idouble: 1 Test "yn (1, 0.125) == -5.19993611253477499595928744876579921": double: 1 idouble: 1 -Test "yn (1, 0.7) == -1.1032498719076333697": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "yn (1, 1.5) == -0.41230862697391129595": -float: 1 -ifloat: 1 Test "yn (1, 1.5) == -0.412308626973911295952829820633445323": float: 1 ifloat: 1 -Test "yn (1, 10.0) == 0.24901542420695388392": -double: 3 -float: 1 -idouble: 3 -ifloat: 1 Test "yn (1, 10.0) == 0.249015424206953883923283474663222803": double: 3 float: 1 @@ -1045,48 +1402,22 @@ double: 1 float: 1 idouble: 1 ifloat: 1 -Test "yn (1, 2.0) == -0.10703243154093754689": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 Test "yn (1, 8.0) == -0.158060461731247494255555266187483550": double: 1 float: 2 idouble: 1 ifloat: 2 -Test "yn (1, 8.0) == -0.15806046173124749426": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -Test "yn (10, 0.1) == -0.11831335132045197885e19": -double: 2 -float: 2 -idouble: 2 -ifloat: 2 Test "yn (10, 0.125) == -127057845771019398.252538486899753195": double: 1 idouble: 1 -Test "yn (10, 0.7) == -0.42447194260703866924e10": -double: 3 -idouble: 3 Test "yn (10, 0.75) == -2133501638.90573424452445412893839236": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "yn (10, 1.0) == -0.12161801427868918929e9": -double: 1 -idouble: 1 Test "yn (10, 1.0) == -121618014.278689189288130426667971145": double: 1 idouble: 1 -Test "yn (10, 10.0) == -0.35981415218340272205": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 Test "yn (10, 10.0) == -0.359814152183402722051986577343560609": double: 1 float: 1 @@ -1095,22 +1426,9 @@ ifloat: 1 Test "yn (10, 2.0) == -129184.542208039282635913145923304214": double: 2 idouble: 2 -Test "yn (10, 2.0) == -129184.54220803928264": -double: 2 -idouble: 2 -Test "yn (3, 0.1) == -5099.3323786129048894": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 Test "yn (3, 0.125) == -2612.69757350066712600220955744091741": double: 1 idouble: 1 -Test "yn (3, 0.7) == -15.819479052819633505": -double: 3 -float: 1 -idouble: 3 -ifloat: 1 Test "yn (3, 0.75) == -12.9877176234475433186319774484809207": double: 1 float: 1 @@ -1121,71 +1439,79 @@ double: 1 float: 1 idouble: 1 ifloat: 1 -Test "yn (3, 10.0) == -0.25136265718383732978": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 Test "yn (3, 2.0) == -1.12778377684042778608158395773179238": double: 1 idouble: 1 -Test "yn (3, 2.0) == -1.1277837768404277861": -double: 1 -idouble: 1 # Maximal error of functions: -Function: "asin": +Function: "acos_downward": double: 1 -float: 2 +float: 1 idouble: 1 -ifloat: 2 +ifloat: 1 -Function: "atan2": +Function: "acos_towardzero": +double: 1 float: 1 +idouble: 1 ifloat: 1 -Function: "atanh": +Function: "asin_downward": double: 1 float: 1 idouble: 1 ifloat: 1 -Function: "cabs": +Function: "asin_towardzero": double: 1 float: 1 idouble: 1 ifloat: 1 +Function: "asin_upward": +float: 1 +ifloat: 1 + +Function: "atan2": +float: 1 +ifloat: 1 + +Function: "atanh": +float: 1 +ifloat: 1 + Function: Real part of "cacos": double: 1 -float: 1 idouble: 1 -ifloat: 1 Function: Imaginary part of "cacos": +double: 2 float: 1 +idouble: 2 ifloat: 1 Function: Real part of "cacosh": double: 1 -float: 7 +float: 1 idouble: 1 -ifloat: 7 +ifloat: 1 Function: Imaginary part of "cacosh": double: 1 -float: 3 +float: 1 idouble: 1 -ifloat: 3 +ifloat: 1 Function: Real part of "casin": -double: 3 -float: 2 -idouble: 3 -ifloat: 2 +double: 1 +float: 1 +idouble: 1 +ifloat: 1 Function: Imaginary part of "casin": +double: 2 float: 1 +idouble: 2 ifloat: 1 Function: Real part of "casinh": @@ -1200,10 +1526,6 @@ float: 6 idouble: 3 ifloat: 6 -Function: Real part of "catan": -float: 4 -ifloat: 4 - Function: Imaginary part of "catan": double: 1 float: 1 @@ -1212,15 +1534,7 @@ ifloat: 1 Function: Real part of "catanh": double: 4 -float: 1 idouble: 4 -ifloat: 1 - -Function: Imaginary part of "catanh": -double: 1 -float: 6 -idouble: 1 -ifloat: 6 Function: "cbrt": double: 1 @@ -1251,24 +1565,22 @@ idouble: 1 ifloat: 1 Function: Real part of "cexp": -double: 1 +double: 2 float: 1 -idouble: 1 +idouble: 2 ifloat: 1 Function: Imaginary part of "cexp": -float: 1 -ifloat: 1 +double: 1 +float: 2 +idouble: 1 +ifloat: 2 Function: Real part of "clog": -float: 1 -ifloat: 1 - -Function: Imaginary part of "clog": double: 1 -float: 3 +float: 1 idouble: 1 -ifloat: 3 +ifloat: 1 Function: Real part of "clog10": double: 1 @@ -1278,9 +1590,9 @@ ifloat: 1 Function: Imaginary part of "clog10": double: 1 -float: 5 +float: 1 idouble: 1 -ifloat: 5 +ifloat: 1 Function: "cos": double: 2 @@ -1288,6 +1600,30 @@ float: 1 idouble: 2 ifloat: 1 +Function: "cos_downward": +float: 1 +ifloat: 1 + +Function: "cos_tonearest": +float: 1 +ifloat: 1 + +Function: "cos_towardzero": +float: 1 +ifloat: 1 + +Function: "cos_upward": +float: 2 +ifloat: 2 + +Function: "cosh_downward": +float: 1 +ifloat: 1 + +Function: "cosh_towardzero": +float: 1 +ifloat: 1 + Function: Real part of "cpow": double: 2 float: 4 @@ -1300,8 +1636,10 @@ float: 2 idouble: 2 ifloat: 2 -Function: Imaginary part of "csin": +Function: Real part of "csin": +double: 1 float: 1 +idouble: 1 ifloat: 1 Function: Real part of "csinh": @@ -1321,7 +1659,9 @@ idouble: 1 ifloat: 1 Function: Imaginary part of "csqrt": +double: 1 float: 1 +idouble: 1 ifloat: 1 Function: Real part of "ctan": @@ -1332,56 +1672,56 @@ ifloat: 1 Function: Imaginary part of "ctan": double: 1 +idouble: 1 + +Function: Real part of "ctanh": +double: 1 float: 1 idouble: 1 ifloat: 1 -Function: Real part of "ctanh": -double: 2 +Function: Imaginary part of "ctanh": +double: 1 float: 2 -idouble: 2 +idouble: 1 ifloat: 2 -Function: Imaginary part of "ctanh": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 - Function: "erf": double: 1 idouble: 1 Function: "erfc": -double: 24 -float: 12 -idouble: 24 -ifloat: 12 +double: 1 +float: 1 +idouble: 1 +ifloat: 1 Function: "exp10": -double: 6 -float: 2 -idouble: 6 -ifloat: 2 - -Function: "expm1": double: 1 -float: 1 idouble: 1 + +Function: "exp_downward": +float: 1 ifloat: 1 -Function: "fmod": -double: 2 +Function: "exp_towardzero": float: 1 -idouble: 2 ifloat: 1 -Function: "hypot": +Function: "exp_upward": +float: 1 +ifloat: 1 + +Function: "expm1": double: 1 float: 1 idouble: 1 ifloat: 1 +Function: "hypot": +float: 1 +ifloat: 1 + Function: "j0": double: 2 float: 2 @@ -1395,9 +1735,9 @@ idouble: 1 ifloat: 2 Function: "jn": -double: 6 +double: 4 float: 5 -idouble: 6 +idouble: 4 ifloat: 5 Function: "lgamma": @@ -1406,12 +1746,6 @@ float: 2 idouble: 1 ifloat: 2 -Function: "log": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - Function: "log10": double: 1 float: 2 @@ -1419,37 +1753,69 @@ idouble: 1 ifloat: 2 Function: "log1p": -double: 1 float: 1 -idouble: 1 ifloat: 1 -Function: "log2": -double: 1 +Function: "pow": +float: 1 +ifloat: 1 + +Function: "pow_downward": +float: 1 +ifloat: 1 + +Function: "pow_towardzero": +float: 1 +ifloat: 1 + +Function: "pow_upward": +float: 1 +ifloat: 1 + +Function: "sin_downward": float: 1 -idouble: 1 ifloat: 1 +Function: "sin_tonearest": +float: 1 +ifloat: 1 + +Function: "sin_towardzero": +float: 1 +ifloat: 1 + +Function: "sin_upward": +float: 2 +ifloat: 2 + Function: "sincos": double: 1 float: 1 idouble: 1 ifloat: 1 -Function: "sinh": -double: 1 +Function: "sinh_downward": float: 1 -idouble: 1 ifloat: 1 -Function: "tan": -double: 0.5 -idouble: 0.5 +Function: "sinh_towardzero": +float: 1 +ifloat: 1 -Function: "tanh": +Function: "tan": double: 1 -float: 1 idouble: 1 + +Function: "tan_downward": +float: 1 +ifloat: 1 + +Function: "tan_towardzero": +float: 1 +ifloat: 1 + +Function: "tan_upward": +float: 1 ifloat: 1 Function: "tgamma": From 6334191e7f34f5fd4d12e034bcb46f68f89bd20e Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 30 May 2012 21:35:11 +0000 Subject: [PATCH 4440/4487] Define FP_TRAPPING_EXCEPTIONS for MIPS. --- ChangeLog.mips | 3 +++ sysdeps/mips/mips64/soft-fp/sfp-machine.h | 1 + 2 files changed, 4 insertions(+) diff --git a/ChangeLog.mips b/ChangeLog.mips index 7d07aa608a..a63f05177b 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,5 +1,8 @@ 2012-05-30 Joseph Myers + * sysdeps/mips/mips64/soft-fp/sfp-machine.h + (FP_TRAPPING_EXCEPTIONS): Define. + * sysdeps/unix/sysv/linux/mips/Makefile (syscall-list-variants): Rename to abi-variants. (syscall-list-includes): Rename to abi-includes. diff --git a/sysdeps/mips/mips64/soft-fp/sfp-machine.h b/sysdeps/mips/mips64/soft-fp/sfp-machine.h index 9c1ee3b2a4..c81067dfd7 100644 --- a/sysdeps/mips/mips64/soft-fp/sfp-machine.h +++ b/sysdeps/mips/mips64/soft-fp/sfp-machine.h @@ -69,6 +69,7 @@ do { \ if (__builtin_expect (_fex, 0)) \ _FPU_SETCW (_fcw | _fex | (_fex << 10)); \ } while (0) +#define FP_TRAPPING_EXCEPTIONS ((_fcw >> 5) & 0x7c) #else #define FP_INIT_ROUNDMODE _fcw = FP_RND_NEAREST #endif From a97386ac1dda0f73043715539b131b630dd5854b Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 30 May 2012 21:35:48 +0000 Subject: [PATCH 4441/4487] Define FP_TRAPPING_EXCEPTIONS and remove FP_EX_DENORM for powerpc-nofpu. --- ChangeLog.powerpc | 5 +++++ sysdeps/powerpc/soft-fp/sfp-machine.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.powerpc b/ChangeLog.powerpc index 5e32abd390..1f7ac977a0 100644 --- a/ChangeLog.powerpc +++ b/ChangeLog.powerpc @@ -1,3 +1,8 @@ +2012-05-30 Joseph Myers + + * sysdeps/powerpc/soft-fp/sfp-machine.h (FP_EX_DENORM): Remove. + (FP_TRAPPING_EXCEPTIONS): Define. + 2012-05-21 Joseph Myers * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libm.abilist diff --git a/sysdeps/powerpc/soft-fp/sfp-machine.h b/sysdeps/powerpc/soft-fp/sfp-machine.h index e7eafe21fd..8a9afad3e6 100644 --- a/sysdeps/powerpc/soft-fp/sfp-machine.h +++ b/sysdeps/powerpc/soft-fp/sfp-machine.h @@ -46,12 +46,12 @@ #define FP_EX_INVALID (1 << (31 - 2)) #define FP_EX_OVERFLOW (1 << (31 - 3)) #define FP_EX_UNDERFLOW (1 << (31 - 4)) -#define FP_EX_DENORM FP_EX_UNDERFLOW #define FP_EX_DIVZERO (1 << (31 - 5)) #define FP_EX_INEXACT (1 << (31 - 6)) #define FP_HANDLE_EXCEPTIONS __simulate_exceptions (_fex) #define FP_ROUNDMODE __sim_round_mode +#define FP_TRAPPING_EXCEPTIONS (~__sim_disabled_exceptions & 0x3e000000) extern int __sim_exceptions; libc_hidden_proto (__sim_exceptions); From 7fce2e265599aa1146d92357e4551e7f2e37fb2e Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 30 May 2012 22:52:35 +0200 Subject: [PATCH 4442/4487] m68k: use hidden_def for __pthread_once --- ChangeLog.m68k | 5 +++++ sysdeps/unix/sysv/linux/m68k/nptl/pthread_once.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 21191a812c..c184e5b9bb 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2012-05-30 Andreas Schwab + + * sysdeps/unix/sysv/linux/m68k/nptl/pthread_once.c: Use + hidden_def instead of adding _internal alias. + 2012-05-26 Andreas Schwab * sysdeps/unix/sysv/linux/m68k/kernel-features.h diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/pthread_once.c b/sysdeps/unix/sysv/linux/m68k/nptl/pthread_once.c index 0ac9e03976..8d81db602e 100644 --- a/sysdeps/unix/sysv/linux/m68k/nptl/pthread_once.c +++ b/sysdeps/unix/sysv/linux/m68k/nptl/pthread_once.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010 Free Software Foundation, Inc. +/* Copyright (C) 2010-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Maxim Kuvyrkov , 2010. @@ -87,4 +87,4 @@ __pthread_once (pthread_once_t *once_control, void (*init_routine) (void)) return 0; } weak_alias (__pthread_once, pthread_once) -strong_alias (__pthread_once, __pthread_once_internal) +hidden_def (__pthread_once) From 28a45d133e20abd757d5386f2c215ce70e462804 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 30 May 2012 22:54:28 +0200 Subject: [PATCH 4443/4487] m68k: remove __ASSUME_TRUNCATE64_SYSCALL --- ChangeLog.m68k | 3 +++ sysdeps/unix/sysv/linux/m68k/kernel-features.h | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index c184e5b9bb..ddc9115683 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,5 +1,8 @@ 2012-05-30 Andreas Schwab + * sysdeps/unix/sysv/linux/m68k/kernel-features.h + (__ASSUME_TRUNCATE64_SYSCALL): Remove. + * sysdeps/unix/sysv/linux/m68k/nptl/pthread_once.c: Use hidden_def instead of adding _internal alias. diff --git a/sysdeps/unix/sysv/linux/m68k/kernel-features.h b/sysdeps/unix/sysv/linux/m68k/kernel-features.h index cfaf8b7deb..c12be9e07c 100644 --- a/sysdeps/unix/sysv/linux/m68k/kernel-features.h +++ b/sysdeps/unix/sysv/linux/m68k/kernel-features.h @@ -20,7 +20,6 @@ /* These features were surely available with 2.4.12. */ #if __LINUX_KERNEL_VERSION >= 132108 # define __ASSUME_MMAP2_SYSCALL 1 -# define __ASSUME_TRUNCATE64_SYSCALL 1 # define __ASSUME_STAT64_SYSCALL 1 # define __ASSUME_FCNTL64 1 # define __ASSUME_VFORK_SYSCALL 1 From ad5bfebf0ca074708cb19bd748d7dfd4a4b63d2b Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 30 May 2012 23:03:16 +0000 Subject: [PATCH 4444/4487] Remove __connect_internal alias for ARM. --- ChangeLog.arm | 3 +++ sysdeps/unix/sysv/linux/arm/syscalls.list | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 1a6f23752b..20664aa19c 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,5 +1,8 @@ 2012-05-30 Joseph Myers + * sysdeps/unix/sysv/linux/arm/syscalls.list: Remove + __connect_internal alias. + * sysdeps/arm/libm-test-ulps: Regenerate. * sysdeps/unix/sysv/linux/arm/Makefile (default-abi-prog): New diff --git a/sysdeps/unix/sysv/linux/arm/syscalls.list b/sysdeps/unix/sysv/linux/arm/syscalls.list index c5b1fe725f..ba8cdd7e65 100644 --- a/sysdeps/unix/sysv/linux/arm/syscalls.list +++ b/sysdeps/unix/sysv/linux/arm/syscalls.list @@ -21,7 +21,7 @@ semget - semget i:iii __semget semget # proper socket implementations: accept - accept Ci:iBN __libc_accept __accept accept bind - bind i:ipi __bind bind -connect - connect Ci:ipi __libc_connect __connect_internal __connect connect +connect - connect Ci:ipi __libc_connect __connect connect getpeername - getpeername i:ipp __getpeername getpeername getsockname - getsockname i:ipp __getsockname getsockname getsockopt - getsockopt i:iiiBN __getsockopt getsockopt From 6863adc8f9d57fc8fe690edc3f535a6804556481 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 30 May 2012 23:03:43 +0000 Subject: [PATCH 4445/4487] Remove __connect_internal alias for MIPS. --- ChangeLog.mips | 3 +++ sysdeps/unix/sysv/linux/mips/syscalls.list | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index a63f05177b..ced2d36d3d 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,5 +1,8 @@ 2012-05-30 Joseph Myers + * sysdeps/unix/sysv/linux/mips/syscalls.list: Remove + __connect_internal alias. + * sysdeps/mips/mips64/soft-fp/sfp-machine.h (FP_TRAPPING_EXCEPTIONS): Define. diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index 518f2a2522..db731b149a 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -14,7 +14,7 @@ sysmips - sysmips i:iiii __sysmips sysmips # accept - accept Ci:iBN __libc_accept __accept accept bind - bind i:ipi __bind bind -connect - connect Ci:ipi __libc_connect __connect_internal __connect connect +connect - connect Ci:ipi __libc_connect __connect connect getpeername - getpeername i:ipp __getpeername getpeername getsockname - getsockname i:ipp __getsockname getsockname getsockopt - getsockopt i:iiiBN __getsockopt getsockopt From 268f6dda11e8afc861cbd964b2f209eb0ff816a3 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 30 May 2012 15:49:01 -0700 Subject: [PATCH 4446/4487] alpha: Use dynamic rounding with sqrt insn --- ChangeLog.alpha | 5 +++++ sysdeps/alpha/alphaev6/fpu/e_sqrt.S | 6 +++--- sysdeps/alpha/alphaev6/fpu/e_sqrtf.S | 6 +++--- sysdeps/alpha/fpu/math_private.h | 26 ++++++++++++++++++++++++++ 4 files changed, 37 insertions(+), 6 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index f87c9d69be..44ffdc74e3 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,5 +1,10 @@ 2012-05-30 Richard Henderson + * sysdeps/alpha/alphaev6/fpu/e_sqrt.S: Use dynamic rounding. + * sysdeps/alpha/alphaev6/fpu/e_sqrtf.S: Likewise. + * sysdeps/alpha/fpu/math_private.h (__ieee754_sqrt): New. + (__ieee754_sqrtf): New. + * sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c: Replace _internal alias by hidden_def. diff --git a/sysdeps/alpha/alphaev6/fpu/e_sqrt.S b/sysdeps/alpha/alphaev6/fpu/e_sqrt.S index eae1fb4e4c..c4625d0eca 100644 --- a/sysdeps/alpha/alphaev6/fpu/e_sqrt.S +++ b/sysdeps/alpha/alphaev6/fpu/e_sqrt.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000-2012 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 @@ -33,9 +33,9 @@ ENTRY(__ieee754_sqrt) .align 4 #ifdef _IEEE_FP_INEXACT - sqrtt/sui $f16, $f0 + sqrtt/suid $f16, $f0 #else - sqrtt/su $f16, $f0 + sqrtt/sud $f16, $f0 #endif ret nop diff --git a/sysdeps/alpha/alphaev6/fpu/e_sqrtf.S b/sysdeps/alpha/alphaev6/fpu/e_sqrtf.S index c8217e5454..5681f3a947 100644 --- a/sysdeps/alpha/alphaev6/fpu/e_sqrtf.S +++ b/sysdeps/alpha/alphaev6/fpu/e_sqrtf.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000-2012 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 @@ -33,9 +33,9 @@ ENTRY(__ieee754_sqrtf) .align 4 #ifdef _IEEE_FP_INEXACT - sqrts/sui $f16, $f0 + sqrts/suid $f16, $f0 #else - sqrts/su $f16, $f0 + sqrts/sud $f16, $f0 #endif ret nop diff --git a/sysdeps/alpha/fpu/math_private.h b/sysdeps/alpha/fpu/math_private.h index eb2177d78d..4f270f7a3f 100644 --- a/sysdeps/alpha/fpu/math_private.h +++ b/sysdeps/alpha/fpu/math_private.h @@ -18,4 +18,30 @@ #include_next +#ifdef __alpha_fix__ +extern __always_inline double +__ieee754_sqrt (double d) +{ + double ret; +# ifdef _IEEE_FP_INEXACT + asm ("sqrtt/suid %1,%0" : "=f"(ret) : "f"(d)); +# else + asm ("sqrtt/sud %1,%0" : "=f"(ret) : "f"(d)); +# endif + return ret; +} + +extern __always_inline float +__ieee754_sqrtf (float d) +{ + float ret; +# ifdef _IEEE_FP_INEXACT + asm ("sqrts/suid %1,%0" : "=f"(ret) : "f"(d)); +# else + asm ("sqrts/sud %1,%0" : "=f"(ret) : "f"(d)); +# endif + return ret; +} +#endif /* FIX */ + #endif /* ALPHA_MATH_PRIVATE_H */ From 91c0abeda12bff60bebee81b944a235d219f9157 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 30 May 2012 15:52:06 -0700 Subject: [PATCH 4447/4487] alpha: Use dbl-64/wordsize-64 --- ChangeLog.alpha | 2 ++ sysdeps/alpha/Implies | 1 + 2 files changed, 3 insertions(+) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 44ffdc74e3..e327242f9d 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,5 +1,7 @@ 2012-05-30 Richard Henderson + * sysdeps/alpha/Implies: Include ieee754/dbl-64/wordsize-64. + * sysdeps/alpha/alphaev6/fpu/e_sqrt.S: Use dynamic rounding. * sysdeps/alpha/alphaev6/fpu/e_sqrtf.S: Likewise. * sysdeps/alpha/fpu/math_private.h (__ieee754_sqrt): New. diff --git a/sysdeps/alpha/Implies b/sysdeps/alpha/Implies index 18c35908c4..d03783b127 100644 --- a/sysdeps/alpha/Implies +++ b/sysdeps/alpha/Implies @@ -1,6 +1,7 @@ wordsize-64 # Alpha uses IEEE 754 single, double and quad precision floating point. ieee754/ldbl-128 +ieee754/dbl-64/wordsize-64 ieee754/dbl-64 ieee754/flt-32 alpha/soft-fp From a797e1734c8d91a6d6df8c07e1b47ac5291425c6 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 30 May 2012 15:54:49 -0700 Subject: [PATCH 4448/4487] alpha: Avoid fgets plt entry And since the FILE is function local, avoid locking too. --- ChangeLog.alpha | 3 +++ sysdeps/unix/sysv/linux/alpha/ioperm.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index e327242f9d..246345a777 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,5 +1,8 @@ 2012-05-30 Richard Henderson + * sysdeps/unix/sysv/linux/alpha/ioperm.c (process_cpuinfo): Use + fgets_unlocked. + * sysdeps/alpha/Implies: Include ieee754/dbl-64/wordsize-64. * sysdeps/alpha/alphaev6/fpu/e_sqrt.S: Use dynamic rounding. diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c index 8b6c8309f8..686c7ed237 100644 --- a/sysdeps/unix/sysv/linux/alpha/ioperm.c +++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c @@ -504,7 +504,7 @@ process_cpuinfo(struct cpuinfo_data *data) while (1) { - if (fgets (dummy, 256, fp) == NULL) + if (fgets_unlocked (dummy, 256, fp) == NULL) break; if (!got_type && sscanf (dummy, "system type : %256[^\n]\n", data->systype) == 1) From 9cafd5de0d918b3846a0c755aad6ed4d36d20104 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 30 May 2012 16:09:11 -0700 Subject: [PATCH 4449/4487] alpha: Remove __connect_internal alias --- ChangeLog.alpha | 3 +++ sysdeps/unix/sysv/linux/alpha/syscalls.list | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 246345a777..bce8601536 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,5 +1,8 @@ 2012-05-30 Richard Henderson + * sysdeps/unix/sysv/linux/alpha/syscalls.list: Remove + __connect_internal alias. + * sysdeps/unix/sysv/linux/alpha/ioperm.c (process_cpuinfo): Use fgets_unlocked. diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 809d82b687..de368801af 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -21,7 +21,7 @@ getpriority - getpriority i:ii __getpriority getpriority # proper socket implementations: accept - accept Ci:iBN __libc_accept __accept accept bind - bind i:ipi __bind bind -connect - connect Ci:ipi __libc_connect __connect_internal __connect connect +connect - connect Ci:ipi __libc_connect __connect connect getpeername - getpeername i:ipp __getpeername getpeername getsockname - getsockname i:ipp __getsockname getsockname getsockopt - getsockopt i:iiiBN __getsockopt getsockopt From dbdf1bdc1fbfb064d7f3041de07055eb21457423 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 30 May 2012 16:37:43 -0700 Subject: [PATCH 4450/4487] alpha: Update libm-test-ulps --- ChangeLog.alpha | 2 + sysdeps/alpha/fpu/libm-test-ulps | 2155 +++++++++++++++++++++++++++--- 2 files changed, 1964 insertions(+), 193 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index bce8601536..3366261d1c 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,5 +1,7 @@ 2012-05-30 Richard Henderson + * sysdeps/alpha/fpu/libm-test-ulps: Regenerate. + * sysdeps/unix/sysv/linux/alpha/syscalls.list: Remove __connect_internal alias. diff --git a/sysdeps/alpha/fpu/libm-test-ulps b/sysdeps/alpha/fpu/libm-test-ulps index d9df631d7c..39884260a8 100644 --- a/sysdeps/alpha/fpu/libm-test-ulps +++ b/sysdeps/alpha/fpu/libm-test-ulps @@ -1,73 +1,40 @@ # Begin of automatic generation -# atan2 -Test "atan2 (-0.00756827042671106339, -.001792735857538728036) == -1.80338464113663849327153994379639112": -ildouble: 1 -ldouble: 1 -Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025": +# acos_downward +Test "acos_downward (-0) == pi/2": float: 1 ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025": +Test "acos_downward (-0.5) == M_PI_6l*4.0": +double: 1 +idouble: 1 +Test "acos_downward (-1) == pi": float: 1 ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772": +Test "acos_downward (0) == pi/2": float: 1 ifloat: 1 -ildouble: 1 -ldouble: 1 - -# atanh -Test "atanh (0.75) == 0.972955074527656652552676371721589865": +Test "acos_downward (0.5) == M_PI_6l*2.0": +double: 1 float: 1 +idouble: 1 ifloat: 1 - -# cacos -Test "Imaginary part of: cacos (0.75 + 1.25 i) == 1.11752014915610270578240049553777969 - 1.13239363160530819522266333696834467 i": ildouble: 1 ldouble: 1 -# cacosh -Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": +# acos_towardzero +Test "acos_towardzero (-0) == pi/2": float: 1 ifloat: 1 -ildouble: 1 -ldouble: 1 - -# casin -Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": +Test "acos_towardzero (-0.5) == M_PI_6l*4.0": double: 1 -float: 1 idouble: 1 -ifloat: 1 -Test "Imaginary part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": -ildouble: 1 -ldouble: 1 - -# casinh -Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": -double: 5 +Test "acos_towardzero (-1) == pi": float: 1 -idouble: 5 ifloat: 1 -ildouble: 4 -ldouble: 4 -Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": -double: 3 -float: 6 -idouble: 3 -ifloat: 6 -ildouble: 2 -ldouble: 2 -Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": +Test "acos_towardzero (0) == pi/2": float: 1 ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": +Test "acos_towardzero (0.5) == M_PI_6l*2.0": double: 1 float: 1 idouble: 1 @@ -75,219 +42,1099 @@ ifloat: 1 ildouble: 1 ldouble: 1 -# catan -Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: catan (0.75 + 1.25 i) == 1.10714871779409050301706546017853704 + 0.549306144334054845697622618461262852 i": +# acos_upward +Test "acos_upward (-0) == pi/2": ildouble: 1 ldouble: 1 - -# catanh -Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": -double: 4 -idouble: 4 -Test "Real part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i": -double: 1 -idouble: 1 +Test "acos_upward (-1) == pi": ildouble: 1 ldouble: 1 -Test "Imaginary part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i": +Test "acos_upward (0) == pi/2": ildouble: 1 ldouble: 1 -# cbrt -Test "cbrt (-0.001) == -0.1": +# asin_downward +Test "asin_downward (-0.5) == -pi/6": +double: 1 +idouble: 1 ildouble: 1 ldouble: 1 -Test "cbrt (-27.0) == -3.0": +Test "asin_downward (-1.0) == -pi/2": +ildouble: 1 +ldouble: 1 +Test "asin_downward (0.5) == pi/6": double: 1 idouble: 1 -Test "cbrt (0.75) == 0.908560296416069829445605878163630251": +ildouble: 1 +ldouble: 1 +Test "asin_downward (1.0) == pi/2": +float: 1 +ifloat: 1 + +# asin_towardzero +Test "asin_towardzero (-0.5) == -pi/6": double: 1 idouble: 1 -Test "cbrt (0.9921875) == 0.997389022060725270579075195353955217": +Test "asin_towardzero (-1.0) == -pi/2": +float: 1 +ifloat: 1 +Test "asin_towardzero (0.5) == pi/6": double: 1 idouble: 1 +Test "asin_towardzero (1.0) == pi/2": +float: 1 +ifloat: 1 -# ccos -Test "Real part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i": +# asin_upward +Test "asin_upward (-1.0) == -pi/2": +float: 1 +ifloat: 1 +Test "asin_upward (1.0) == pi/2": ildouble: 1 ldouble: 1 -Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i": + +# atan2 +Test "atan2 (-0.00756827042671106339, -.001792735857538728036) == -1.80338464113663849327153994379639112": +ildouble: 1 +ldouble: 1 +Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025": float: 1 ifloat: 1 ildouble: 1 ldouble: 1 -Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": -double: 1 +Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025": float: 1 -idouble: 1 ifloat: 1 -Test "Imaginary part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": +ildouble: 1 +ldouble: 1 +Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 -# ccosh -Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": +# atanh +Test "atanh (0.75) == 0.972955074527656652552676371721589865": float: 1 ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": + +# cacos +Test "Imaginary part of: cacos (+0 + 0.5 i) == pi/2 - 0.4812118250596034474977589134243684231352 i": +double: 2 float: 1 +idouble: 2 ifloat: 1 ildouble: 1 ldouble: 1 -Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": -double: 1 +Test "Imaginary part of: cacos (+0 + 1.0 i) == pi/2 - 0.8813735870195430252326093249797923090282 i": +double: 2 float: 1 -idouble: 1 +idouble: 2 ifloat: 1 -Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": +ildouble: 3 +ldouble: 3 +Test "Imaginary part of: cacos (+0 + 1.5 i) == pi/2 - 1.194763217287109304111930828519090523536 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: cacos (+0 - 0.5 i) == pi/2 + 0.4812118250596034474977589134243684231352 i": float: 1 ifloat: 1 - -# cexp -Test "Real part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": ildouble: 1 ldouble: 1 -Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": +Test "Imaginary part of: cacos (+0 - 1.0 i) == pi/2 + 0.8813735870195430252326093249797923090282 i": +double: 1 float: 1 +idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 -Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": +Test "Imaginary part of: cacos (+0 - 1.5 i) == pi/2 + 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0 + 0.5 i) == pi/2 - 0.4812118250596034474977589134243684231352 i": +double: 2 float: 1 +idouble: 2 ifloat: 1 -Test "Imaginary part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": ildouble: 1 ldouble: 1 - -# clog -Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i": +Test "Imaginary part of: cacos (-0 + 1.0 i) == pi/2 - 0.8813735870195430252326093249797923090282 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 3 +ldouble: 3 +Test "Imaginary part of: cacos (-0 + 1.5 i) == pi/2 - 1.194763217287109304111930828519090523536 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: cacos (-0 - 0.5 i) == pi/2 + 0.4812118250596034474977589134243684231352 i": float: 1 ifloat: 1 ildouble: 1 ldouble: 1 - -# clog10 -Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i": +Test "Imaginary part of: cacos (-0 - 1.0 i) == pi/2 + 0.8813735870195430252326093249797923090282 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0 - 1.5 i) == pi/2 + 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-1.5 + +0 i) == pi - 0.9624236501192068949955178268487368462704 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Real part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i": ildouble: 1 ldouble: 1 -Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i": +Test "Real part of: cacos (0.5 + +0 i) == 1.047197551196597746154214461093167628066 - 0 i": double: 1 idouble: 1 ildouble: 1 ldouble: 1 -Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i": +Test "Real part of: cacos (0.5 - 0 i) == 1.047197551196597746154214461093167628066 + +0 i": double: 1 -float: 1 idouble: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0.75 + 1.25 i) == 1.11752014915610270578240049553777969 - 1.13239363160530819522266333696834467 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (1.5 + +0 i) == +0 - 0.9624236501192068949955178268487368462704 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i": -double: 1 +ildouble: 1 +ldouble: 1 + +# cacosh +Test "Real part of: cacosh (+0 + 0.5 i) == 0.4812118250596034474977589134243684231352 + pi/2 i": float: 1 -idouble: 1 ifloat: 1 -Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cacosh (+0 + 1.0 i) == 0.8813735870195430252326093249797923090282 + pi/2 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Imaginary part of: clog10 (-inf + inf i) == inf + 3/4 pi*log10(e) i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cacosh (+0 + 1.5 i) == 1.194763217287109304111930828519090523536 + pi/2 i": double: 1 idouble: 1 -Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i": -double: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: cacosh (+0 - 0.5 i) == 0.4812118250596034474977589134243684231352 - pi/2 i": float: 1 -idouble: 1 ifloat: 1 -Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cacosh (+0 - 1.0 i) == 0.8813735870195430252326093249797923090282 - pi/2 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cacosh (+0 - 1.5 i) == 1.194763217287109304111930828519090523536 - pi/2 i": double: 1 -float: 1 idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: cacosh (-0 + 0.5 i) == 0.4812118250596034474977589134243684231352 + pi/2 i": +float: 1 ifloat: 1 -Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cacosh (-0 + 1.0 i) == 0.8813735870195430252326093249797923090282 + pi/2 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i": -float: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i": ildouble: 1 ldouble: 1 -Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i": +Test "Real part of: cacosh (-0 + 1.5 i) == 1.194763217287109304111930828519090523536 + pi/2 i": double: 1 -float: 1 idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: cacosh (-0 - 0.5 i) == 0.4812118250596034474977589134243684231352 - pi/2 i": +float: 1 ifloat: 1 -Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cacosh (-0 - 1.0 i) == 0.8813735870195430252326093249797923090282 - pi/2 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cacosh (-0 - 1.5 i) == 1.194763217287109304111930828519090523536 - pi/2 i": double: 1 -float: 1 idouble: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacosh (-0.5 + +0 i) == +0 + 2.094395102393195492308428922186335256131 i": double: 1 -float: 1 idouble: 1 -ifloat: 1 - -# cos -Test "cos (M_PI_6l * 2.0) == 0.5": +Test "Imaginary part of: cacosh (-0.5 - 0 i) == +0 - 2.094395102393195492308428922186335256131 i": double: 1 idouble: 1 +Test "Real part of: cacosh (-1.5 + +0 i) == 0.9624236501192068949955178268487368462704 + pi i": +float: 1 +ifloat: 1 ildouble: 1 ldouble: 1 -Test "cos (M_PI_6l * 4.0) == -0.5": -double: 2 +Test "Real part of: cacosh (-1.5 - 0 i) == 0.9624236501192068949955178268487368462704 - pi i": float: 1 -idouble: 2 ifloat: 1 ildouble: 1 ldouble: 1 - -# cpow -Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": +Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": float: 1 ifloat: 1 -Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cacosh (1.5 + +0 i) == 0.9624236501192068949955178268487368462704 + +0 i": float: 1 ifloat: 1 -Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i": -double: 1 -float: 4 -idouble: 1 -ifloat: 4 +ildouble: 1 +ldouble: 1 +Test "Real part of: cacosh (1.5 - 0 i) == 0.9624236501192068949955178268487368462704 - 0 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# casin +Test "Imaginary part of: casin (+0 + 0.5 i) == +0 + 0.4812118250596034474977589134243684231352 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (+0 + 1.0 i) == +0 + 0.8813735870195430252326093249797923090282 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 3 +ldouble: 3 +Test "Imaginary part of: casin (+0 + 1.5 i) == +0 + 1.194763217287109304111930828519090523536 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: casin (+0 - 0.5 i) == +0 - 0.4812118250596034474977589134243684231352 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (+0 - 1.0 i) == +0 - 0.8813735870195430252326093249797923090282 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (+0 - 1.5 i) == +0 - 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0 + 0.5 i) == -0 + 0.4812118250596034474977589134243684231352 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0 + 1.0 i) == -0 + 0.8813735870195430252326093249797923090282 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 3 +ldouble: 3 +Test "Imaginary part of: casin (-0 + 1.5 i) == -0 + 1.194763217287109304111930828519090523536 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: casin (-0 - 0.5 i) == -0 - 0.4812118250596034474977589134243684231352 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0 - 1.0 i) == -0 - 0.8813735870195430252326093249797923090282 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0 - 1.5 i) == -0 - 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-1.5 + +0 i) == -pi/2 + 0.9624236501192068949955178268487368462704 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (1.5 + +0 i) == pi/2 + 0.9624236501192068949955178268487368462704 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# casinh +Test "Real part of: casinh (-0 + 1.5 i) == -0.9624236501192068949955178268487368462704 + pi/2 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-0 - 1.5 i) == -0.9624236501192068949955178268487368462704 - pi/2 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-0.5 + +0 i) == -0.4812118250596034474977589134243684231352 + +0 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-0.5 - 0 i) == -0.4812118250596034474977589134243684231352 - 0 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-1.0 + +0 i) == -0.8813735870195430252326093249797923090282 + +0 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 3 +ldouble: 3 +Test "Real part of: casinh (-1.0 - 0 i) == -0.8813735870195430252326093249797923090282 - 0 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 3 +ldouble: 3 +Test "Real part of: casinh (-1.5 + +0 i) == -1.194763217287109304111930828519090523536 + +0 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "Real part of: casinh (-1.5 - 0 i) == -1.194763217287109304111930828519090523536 - 0 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": +double: 5 +float: 1 +idouble: 5 +ifloat: 1 +ildouble: 4 +ldouble: 4 +Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": +double: 3 +float: 6 +idouble: 3 +ifloat: 6 +ildouble: 2 +ldouble: 2 +Test "Real part of: casinh (0.5 + +0 i) == 0.4812118250596034474977589134243684231352 + +0 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (0.5 - 0 i) == 0.4812118250596034474977589134243684231352 - 0 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.0 + +0 i) == 0.8813735870195430252326093249797923090282 + +0 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.0 - 0 i) == 0.8813735870195430252326093249797923090282 - 0 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.5 + +0 i) == 1.194763217287109304111930828519090523536 + +0 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.5 - 0 i) == 1.194763217287109304111930828519090523536 - 0 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +# catan +Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: catan (0.75 + 1.25 i) == 1.10714871779409050301706546017853704 + 0.549306144334054845697622618461262852 i": +ildouble: 1 +ldouble: 1 + +# catanh +Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": +double: 4 +idouble: 4 +Test "Real part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i": +ildouble: 1 +ldouble: 1 + +# cbrt +Test "cbrt (-0.001) == -0.1": +ildouble: 1 +ldouble: 1 +Test "cbrt (-27.0) == -3.0": +double: 1 +idouble: 1 +Test "cbrt (0.75) == 0.908560296416069829445605878163630251": +double: 1 +idouble: 1 +Test "cbrt (0.9921875) == 0.997389022060725270579075195353955217": +double: 1 +idouble: 1 + +# ccos +Test "Imaginary part of: ccos (-0.75 + 11357.25 i) == 9.001213196851067077465606717616495588201e4931 + 8.385498349388321535962327491346664141020e4931 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccos (-0.75 + 710.5 i) == 1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: ccos (-0.75 + 89.5 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccos (-0.75 + 89.5 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccos (-0.75 - 11357.25 i) == 9.001213196851067077465606717616495588201e4931 - 8.385498349388321535962327491346664141020e4931 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccos (-0.75 - 710.5 i) == 1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: ccos (-0.75 - 89.5 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccos (-0.75 - 89.5 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: ccos (0.75 + 11357.25 i) == 9.001213196851067077465606717616495588201e4931 - 8.385498349388321535962327491346664141020e4931 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccos (0.75 + 710.5 i) == 1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: ccos (0.75 + 89.5 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccos (0.75 + 89.5 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccos (0.75 - 11357.25 i) == 9.001213196851067077465606717616495588201e4931 + 8.385498349388321535962327491346664141020e4931 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccos (0.75 - 710.5 i) == 1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: ccos (0.75 - 89.5 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccos (0.75 - 89.5 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccos (0x1p-1074 + 1440 i) == inf - 5.981479269486130556466515778180916082415e301 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ccos (0x1p-16434 + 22730 i) == inf - 1.217853148905605987081057582351152052687e4924 i": +ildouble: 1 +ldouble: 1 + +# ccosh +Test "Imaginary part of: ccosh (-11357.25 + 0.75 i) == 9.001213196851067077465606717616495588201e4931 - 8.385498349388321535962327491346664141020e4931 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccosh (-11357.25 - 0.75 i) == 9.001213196851067077465606717616495588201e4931 + 8.385498349388321535962327491346664141020e4931 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccosh (-710.5 + 0.75 i) == 1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccosh (-710.5 - 0.75 i) == 1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: ccosh (-89.5 + 0.75 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccosh (-89.5 + 0.75 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: ccosh (-89.5 - 0.75 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccosh (-89.5 - 0.75 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: ccosh (11357.25 + 0.75 i) == 9.001213196851067077465606717616495588201e4931 + 8.385498349388321535962327491346664141020e4931 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccosh (11357.25 - 0.75 i) == 9.001213196851067077465606717616495588201e4931 - 8.385498349388321535962327491346664141020e4931 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccosh (1440 + 0x1p-1074 i) == inf + 5.981479269486130556466515778180916082415e301 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ccosh (22730 + 0x1p-16434 i) == inf + 1.217853148905605987081057582351152052687e4924 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccosh (710.5 + 0.75 i) == 1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccosh (710.5 - 0.75 i) == 1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: ccosh (89.5 + 0.75 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccosh (89.5 + 0.75 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: ccosh (89.5 - 0.75 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccosh (89.5 - 0.75 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# cexp +Test "Imaginary part of: cexp (-10000 + 0x1p16383 i) == 1.045876464564882298442774542991176546722e-4343 + 4.421154026488516836023811173959413420548e-4344 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cexp (-720 + 0.75 i) == 1.486960657116368433685753325516638551722e-313 + 1.385247284245720590980701226843815229385e-313 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cexp (-95 + 0.75 i) == 4.039714446238306526889476684000081624047e-42 + 3.763383677300535390271646960780570275931e-42 i": +double: 1 +idouble: 1 +Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cexp (1440 + 0x1p-1074 i) == inf + 1.196295853897226111293303155636183216483e302 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cexp (22730 + 0x1p-16434 i) == inf + 2.435706297811211974162115164702304105374e4924 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cexp (50 + 0x1p127 i) == 4.053997150228616856622417636046265337193e21 + 3.232070315463388524466674772633810238819e21 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cexp (50 + 0x1p127 i) == 4.053997150228616856622417636046265337193e21 + 3.232070315463388524466674772633810238819e21 i": +double: 1 +idouble: 1 +Test "Real part of: cexp (500 + 0x1p1023 i) == -1.159886268932754433233243794561351783426e217 + 7.904017694554466595359379965081774849708e216 i": +double: 1 +idouble: 1 +Test "Real part of: cexp (709.8125 + 0.75 i) == 1.355121963080879535248452862759108365762e308 + 1.262426823598609432507811340856186873507e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cexp (709.8125 + 0.75 i) == 1.355121963080879535248452862759108365762e308 + 1.262426823598609432507811340856186873507e308 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: cexp (88.75 + 0.75 i) == 2.558360358486542817001900410314204322891e38 + 2.383359453227311447654736314679677655100e38 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cexp (88.75 + 0.75 i) == 2.558360358486542817001900410314204322891e38 + 2.383359453227311447654736314679677655100e38 i": +float: 2 +ifloat: 2 +ildouble: 1 +ldouble: 1 + +# clog +Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: clog (0x1.fp+16383 + 0x1.fp+16383 i) == 11356.83823118610934184548269774874545400 + pi/4 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: clog (0x1p-1074 + 0x1p-1074 i) == -744.0934983311012896593986823853525458290 + pi/4 i": +double: 1 +idouble: 1 +Test "Real part of: clog (0x1p-147 + 0x1p-147 i) == -101.5460619520319878296245057936228672231 + pi/4 i": +float: 1 +ifloat: 1 + +# clog10 +Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf + inf i) == inf + 3/4 pi*log10(e) i": +double: 1 +idouble: 1 +Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: clog10 (0x1.fffffep+127 + 0x1.fffffep+127 i) == 38.68235441693561449174780668781319348761 + pi/4*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: clog10 (0x1.fffffep+127 + 1.0 i) == 38.53183941910362389414093724045094697423 + 1.276276851248440096917018665609900318458e-39 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0x1.fffffffffffffp+1023 + 0x1.fffffffffffffp+1023 i) == 308.4052305577487344482591243175787477115 + pi/4*log10(e) i": +double: 1 +idouble: 1 +Test "Real part of: clog10 (0x1.fp+16383 + 0x1.fp+16383 i) == 4932.212175672014259683102930239951947672 + pi/4*log10(e) i": +ildouble: 1 +ldouble: 1 +Test "Real part of: clog10 (0x1.fp+16383 + 0x1p+16383 i) == 4932.112944269463028900262609694408579449 + 0.2069271710841128115912940666587802677383 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: clog10 (0x1p-1073 + 0x1p-1073 i) == -322.8546703496198318667349645920187712089 + pi/4*log10(e) i": +double: 1 +idouble: 1 +Test "Real part of: clog10 (0x1p-1074 + 0x1p-1074 i) == -323.1557003452838130619487034867432642357 + pi/4*log10(e) i": +double: 1 +idouble: 1 +Test "Imaginary part of: clog10 (0x1p-1074 + 0x1p-1074 i) == -323.1557003452838130619487034867432642357 + pi/4*log10(e) i": +double: 1 +idouble: 1 +Test "Imaginary part of: clog10 (0x1p-147 + 0x1p-147 i) == -44.10089436477324509881274807713822842154 + pi/4*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0x1p-149 + 0x1p-149 i) == -44.70295435610120748924022586658721447508 + pi/4*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# cos +Test "cos (M_PI_6l * 2.0) == 0.5": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "cos (M_PI_6l * 4.0) == -0.5": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# cos_downward +Test "cos_downward (1) == 0.5403023058681397174009366074429766037323": +float: 1 +ifloat: 1 +Test "cos_downward (10) == -0.8390715290764524522588639478240648345199": +ildouble: 1 +ldouble: 1 +Test "cos_downward (2) == -0.4161468365471423869975682295007621897660": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_downward (3) == -0.9899924966004454572715727947312613023937": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_downward (4) == -0.6536436208636119146391681830977503814241": +float: 1 +ifloat: 1 +Test "cos_downward (5) == 0.2836621854632262644666391715135573083344": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_downward (6) == 0.9601702866503660205456522979229244054519": +ildouble: 1 +ldouble: 1 +Test "cos_downward (7) == 0.7539022543433046381411975217191820122183": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_downward (8) == -0.1455000338086135258688413818311946826093": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +# cos_tonearest +Test "cos_tonearest (7) == 0.7539022543433046381411975217191820122183": +float: 1 +ifloat: 1 + +# cos_towardzero +Test "cos_towardzero (10) == -0.8390715290764524522588639478240648345199": +ildouble: 1 +ldouble: 1 +Test "cos_towardzero (2) == -0.4161468365471423869975682295007621897660": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_towardzero (3) == -0.9899924966004454572715727947312613023937": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_towardzero (5) == 0.2836621854632262644666391715135573083344": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_towardzero (6) == 0.9601702866503660205456522979229244054519": +ildouble: 1 +ldouble: 1 +Test "cos_towardzero (7) == 0.7539022543433046381411975217191820122183": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_towardzero (8) == -0.1455000338086135258688413818311946826093": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +# cos_upward +Test "cos_upward (1) == 0.5403023058681397174009366074429766037323": +ildouble: 1 +ldouble: 1 +Test "cos_upward (10) == -0.8390715290764524522588639478240648345199": +float: 1 +ifloat: 1 +Test "cos_upward (4) == -0.6536436208636119146391681830977503814241": +ildouble: 1 +ldouble: 1 +Test "cos_upward (6) == 0.9601702866503660205456522979229244054519": +float: 1 +ifloat: 1 +Test "cos_upward (7) == 0.7539022543433046381411975217191820122183": +float: 1 +ifloat: 1 +Test "cos_upward (9) == -0.9111302618846769883682947111811653112463": +float: 2 +ifloat: 2 +ildouble: 1 +ldouble: 1 + +# cosh_downward +Test "cosh_downward (22) == 1792456423.065795780980053377632656584997": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cosh_downward (23) == 4872401723.124451300068625740569997090344": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cosh_downward (24) == 13244561064.92173614708845674912733665919": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# cosh_tonearest +Test "cosh_tonearest (22) == 1792456423.065795780980053377632656584997": +ildouble: 1 +ldouble: 1 + +# cosh_towardzero +Test "cosh_towardzero (22) == 1792456423.065795780980053377632656584997": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cosh_towardzero (23) == 4872401723.124451300068625740569997090344": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cosh_towardzero (24) == 13244561064.92173614708845674912733665919": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# cosh_upward +Test "cosh_upward (22) == 1792456423.065795780980053377632656584997": +ildouble: 1 +ldouble: 1 +Test "cosh_upward (23) == 4872401723.124451300068625740569997090344": +ildouble: 1 +ldouble: 1 +Test "cosh_upward (24) == 13244561064.92173614708845674912733665919": +ildouble: 1 +ldouble: 1 + +# cpow +Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": +float: 1 +ifloat: 1 +Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i": +double: 1 +float: 4 +idouble: 1 +ifloat: 4 ildouble: 4 ldouble: 4 Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i": @@ -308,43 +1155,183 @@ ildouble: 2 ldouble: 2 Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": double: 1 -float: 4 +float: 4 +idouble: 1 +ifloat: 4 +ildouble: 3 +ldouble: 3 +Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": +float: 2 +ifloat: 2 +Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +ildouble: 1 +ldouble: 1 + +# csin +Test "Real part of: csin (-0.75 + 11357.25 i) == -8.385498349388321535962327491346664141020e4931 + 9.001213196851067077465606717616495588201e4931 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: csin (-0.75 + 710.5 i) == -1.255317763348154410745082950806112487736e308 + 1.347490911916428129246890157395342279438e308 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: csin (-0.75 + 89.5 i) == -2.522786001038096774676288412995370563339e38 + 2.708024460708609732016532185663087200560e38 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csin (-0.75 + 89.5 i) == -2.522786001038096774676288412995370563339e38 + 2.708024460708609732016532185663087200560e38 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: csin (-0.75 - 11357.25 i) == -8.385498349388321535962327491346664141020e4931 - 9.001213196851067077465606717616495588201e4931 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: csin (-0.75 - 710.5 i) == -1.255317763348154410745082950806112487736e308 - 1.347490911916428129246890157395342279438e308 i": +double: 1 idouble: 1 -ifloat: 4 -ildouble: 3 -ldouble: 3 -Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": -float: 2 -ifloat: 2 -Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i": -double: 2 -float: 2 -idouble: 2 -ifloat: 2 ildouble: 1 ldouble: 1 - -# csin +Test "Real part of: csin (-0.75 - 89.5 i) == -2.522786001038096774676288412995370563339e38 - 2.708024460708609732016532185663087200560e38 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csin (-0.75 - 89.5 i) == -2.522786001038096774676288412995370563339e38 - 2.708024460708609732016532185663087200560e38 i": +ildouble: 1 +ldouble: 1 Test "Imaginary part of: csin (-2 - 3 i) == -9.15449914691142957346729954460983256 + 4.16890695996656435075481305885375484 i": ildouble: 1 ldouble: 1 Test "Real part of: csin (0.75 + 1.25 i) == 1.28722291002649188575873510790565441 + 1.17210635989270256101081285116138863 i": ildouble: 1 ldouble: 1 +Test "Real part of: csin (0.75 + 11357.25 i) == 8.385498349388321535962327491346664141020e4931 + 9.001213196851067077465606717616495588201e4931 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: csin (0.75 + 710.5 i) == 1.255317763348154410745082950806112487736e308 + 1.347490911916428129246890157395342279438e308 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: csin (0.75 + 89.5 i) == 2.522786001038096774676288412995370563339e38 + 2.708024460708609732016532185663087200560e38 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csin (0.75 + 89.5 i) == 2.522786001038096774676288412995370563339e38 + 2.708024460708609732016532185663087200560e38 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: csin (0.75 - 11357.25 i) == 8.385498349388321535962327491346664141020e4931 - 9.001213196851067077465606717616495588201e4931 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: csin (0.75 - 710.5 i) == 1.255317763348154410745082950806112487736e308 - 1.347490911916428129246890157395342279438e308 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: csin (0.75 - 89.5 i) == 2.522786001038096774676288412995370563339e38 - 2.708024460708609732016532185663087200560e38 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csin (0.75 - 89.5 i) == 2.522786001038096774676288412995370563339e38 - 2.708024460708609732016532185663087200560e38 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: csin (0x1p-1074 + 1440 i) == 5.981479269486130556466515778180916082415e301 + inf i": +double: 1 +idouble: 1 +Test "Real part of: csin (0x1p-16434 + 22730 i) == 1.217853148905605987081057582351152052687e4924 + inf i": +ildouble: 1 +ldouble: 1 # csinh +Test "Imaginary part of: csinh (-11357.25 + 0.75 i) == -9.001213196851067077465606717616495588201e4931 + 8.385498349388321535962327491346664141020e4931 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csinh (-11357.25 - 0.75 i) == -9.001213196851067077465606717616495588201e4931 - 8.385498349388321535962327491346664141020e4931 i": +ildouble: 1 +ldouble: 1 Test "Real part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i": ildouble: 1 ldouble: 1 Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i": double: 1 idouble: 1 +Test "Imaginary part of: csinh (-710.5 + 0.75 i) == -1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csinh (-710.5 - 0.75 i) == -1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: csinh (-89.5 + 0.75 i) == -2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csinh (-89.5 + 0.75 i) == -2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: csinh (-89.5 - 0.75 i) == -2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csinh (-89.5 - 0.75 i) == -2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": float: 1 ifloat: 1 Test "Imaginary part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": float: 1 ifloat: 1 +Test "Imaginary part of: csinh (11357.25 + 0.75 i) == 9.001213196851067077465606717616495588201e4931 + 8.385498349388321535962327491346664141020e4931 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csinh (11357.25 - 0.75 i) == 9.001213196851067077465606717616495588201e4931 - 8.385498349388321535962327491346664141020e4931 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csinh (1440 + 0x1p-1074 i) == inf + 5.981479269486130556466515778180916082415e301 i": +double: 1 +idouble: 1 +Test "Imaginary part of: csinh (22730 + 0x1p-16434 i) == inf + 1.217853148905605987081057582351152052687e4924 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csinh (710.5 + 0.75 i) == 1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csinh (710.5 - 0.75 i) == 1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: csinh (89.5 + 0.75 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csinh (89.5 + 0.75 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: csinh (89.5 - 0.75 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csinh (89.5 - 0.75 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 # csqrt Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": @@ -360,12 +1347,47 @@ ldouble: 1 Test "Imaginary part of: csqrt (0.75 + 1.25 i) == 1.05065169626078392338656675760808326 + 0.594868882070379067881984030639932657 i": ildouble: 1 ldouble: 1 +Test "Imaginary part of: csqrt (0x1.fffffep+127 + 1.0 i) == 1.844674352395372953599975585936590505260e+19 + 2.710505511993121390769065968615872097053e-20 i": +float: 1 +ifloat: 1 +Test "Real part of: csqrt (0x1.fffffffffffffp+1023 + 0x1.fffffffffffffp+1023 i) == 1.473094556905565378990473658199034571917e+154 + 6.101757441282702188537080005372547713595e+153 i": +double: 1 +idouble: 1 +Test "Imaginary part of: csqrt (0x1.fffffffffffffp+1023 + 0x1.fffffffffffffp+1023 i) == 1.473094556905565378990473658199034571917e+154 + 6.101757441282702188537080005372547713595e+153 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csqrt (0x1.fffffffffffffp+1023 + 0x1p+1023 i) == 1.379778091031440685006200821918878702861e+154 + 3.257214233483129514781233066898042490248e+153 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: csqrt (0x1.fp+16383 + 0x1.fp+16383 i) == 1.179514222452201722651836720466795901016e+2466 + 4.885707879516577666702435054303191575148e+2465 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csqrt (0x1.fp+16383 + 0x1.fp+16383 i) == 1.179514222452201722651836720466795901016e+2466 + 4.885707879516577666702435054303191575148e+2465 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csqrt (0x1.fp+16383 + 0x1p+16383 i) == 1.106698967236475180613254276996359485630e+2466 + 2.687568007603946993388538156299100955642e+2465 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csqrt (0x1p-16440 + 0x1p-16441 i) == 3.514690655930285351254618340783294558136e-2475 + 8.297059146828716918029689466551384219370e-2476 i": +ildouble: 1 +ldouble: 1 # ctan Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": +float: 1 +ifloat: 1 ildouble: 1 ldouble: 1 Test "Imaginary part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i": ildouble: 1 ldouble: 1 Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i": @@ -373,6 +1395,43 @@ double: 1 idouble: 1 ildouble: 2 ldouble: 2 +Test "Real part of: ctan (0x1p1023 + 1 i) == -0.2254627924997545057926782581695274244229 + 0.8786063118883068695462540226219865087189 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ctan (0x1p1023 + 1 i) == -0.2254627924997545057926782581695274244229 + 0.8786063118883068695462540226219865087189 i": +ildouble: 2 +ldouble: 2 +Test "Real part of: ctan (0x1p127 + 1 i) == 0.2446359391192790896381501310437708987204 + 0.9101334047676183761532873794426475906201 i": +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: ctan (0x1p127 + 1 i) == 0.2446359391192790896381501310437708987204 + 0.9101334047676183761532873794426475906201 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: ctan (0x1p16383 + 1 i) == 0.1608598776370396607204448234354670036772 + 0.8133818522051542536316746743877629761488 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ctan (0x1p16383 + 1 i) == 0.1608598776370396607204448234354670036772 + 0.8133818522051542536316746743877629761488 i": +ildouble: 2 +ldouble: 2 +Test "Real part of: ctan (0x3.243f6cp-1 + 0 i) == -2.287733242885645987394874673945769518150e7 + 0.0 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: ctan (1 + 355 i) == 8.140551093483276762350406321792653551513e-309 + 1.0 i": +ildouble: 2 +ldouble: 2 +Test "Real part of: ctan (1 + 365 i) == 1.677892637497921890115075995898773550884e-317 + 1.0 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: ctan (1 + 45 i) == 1.490158918874345552942703234806348520895e-39 + 1.000000000000000000000000000000000000001 i": +ildouble: 2 +ldouble: 2 +Test "Real part of: ctan (1 + 47 i) == 2.729321264492904590777293425576722354636e-41 + 1.0 i": +ildouble: 1 +ldouble: 1 # ctanh Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": @@ -383,14 +1442,64 @@ ifloat: 2 ildouble: 1 ldouble: 1 Test "Imaginary part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ctanh (0 + 0x3.243f6cp-1 i) == 0.0 - 2.287733242885645987394874673945769518150e7 i": +float: 1 +ifloat: 1 ildouble: 1 ldouble: 1 Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i": +double: 1 float: 1 +idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i": double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i": +float: 2 +ifloat: 2 +Test "Real part of: ctanh (1 + 0x1p1023 i) == 0.8786063118883068695462540226219865087189 - 0.2254627924997545057926782581695274244229 i": +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: ctanh (1 + 0x1p1023 i) == 0.8786063118883068695462540226219865087189 - 0.2254627924997545057926782581695274244229 i": +double: 1 +idouble: 1 +Test "Real part of: ctanh (1 + 0x1p127 i) == 0.9101334047676183761532873794426475906201 + 0.2446359391192790896381501310437708987204 i": +double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ctanh (1 + 0x1p127 i) == 0.9101334047676183761532873794426475906201 + 0.2446359391192790896381501310437708987204 i": +ildouble: 2 +ldouble: 2 +Test "Real part of: ctanh (1 + 0x1p16383 i) == 0.8133818522051542536316746743877629761488 + 0.1608598776370396607204448234354670036772 i": +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: ctanh (1 + 0x1p16383 i) == 0.8133818522051542536316746743877629761488 + 0.1608598776370396607204448234354670036772 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ctanh (355 + 1 i) == 1.0 + 8.140551093483276762350406321792653551513e-309 i": +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: ctanh (365 + 1 i) == 1.0 + 1.677892637497921890115075995898773550884e-317 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ctanh (45 + 1 i) == 1.000000000000000000000000000000000000001 + 1.490158918874345552942703234806348520895e-39 i": +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: ctanh (47 + 1 i) == 1.0 + 2.729321264492904590777293425576722354636e-41 i": +ildouble: 1 +ldouble: 1 # erf Test "erf (1.25) == 0.922900128256458230136523481197281140": @@ -398,6 +1507,17 @@ double: 1 idouble: 1 # erfc +Test "erfc (0x1.f7303cp+1) == 2.705500297238986897105236321218861842255e-8": +double: 1 +idouble: 1 +Test "erfc (0x1.ffa002p+2) == 1.233585992097580296336099501489175967033e-29": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "erfc (0x1.ffffc8p+2) == 1.122671365033056305522366683719541099329e-29": +ildouble: 1 +ldouble: 1 Test "erfc (2.0) == 0.00467773498104726583793074363274707139": double: 1 idouble: 1 @@ -414,6 +1534,14 @@ double: 2 float: 1 idouble: 2 ifloat: 1 +Test "exp10 (-305) == 1.0e-305": +double: 1 +idouble: 1 +Test "exp10 (-36) == 1.0e-36": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 Test "exp10 (0.75) == 5.62341325190349080394951039776481231": double: 1 float: 1 @@ -426,11 +1554,51 @@ idouble: 6 ifloat: 2 ildouble: 1 ldouble: 1 +Test "exp10 (36) == 1.0e36": +double: 1 +idouble: 1 +Test "exp10 (4932) == 1.0e4932": +ildouble: 1 +ldouble: 1 # exp2 Test "exp2 (10) == 1024": ildouble: 2 ldouble: 2 +Test "exp2 (100.5) == 1.792728671193156477399422023278661496394e+30": +ildouble: 1 +ldouble: 1 + +# exp_downward +Test "exp_downward (2) == e^2": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "exp_downward (3) == e^3": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# exp_towardzero +Test "exp_towardzero (2) == e^2": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "exp_towardzero (3) == e^3": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# exp_upward +Test "exp_upward (1) == e": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 # expm1 Test "expm1 (0.75) == 1.11700001661267466854536981983709561": @@ -443,6 +1611,23 @@ idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 +Test "expm1 (500.0) == 1.4035922178528374107397703328409120821806e+217": +double: 1 +idouble: 1 + +# fma +Test "fma (-0x1.19cab66d73e17p-959, 0x1.c7108a8c5ff51p-107, -0x0.80b0ad65d9b64p-1022) == -0x0.80b0ad65d9d59p-1022": +double: 1 +idouble: 1 +Test "fma (0x1.0000002p+0, 0x1.ffffffcp-1, -0x1p-300) == 0x1.fffffffffffffp-1": +double: 1 +idouble: 1 +Test "fma (0x1.153d650bb9f06p-907, 0x1.2d01230d48407p-125, -0x0.b278d5acfc3cp-1022) == -0x0.b22757123bbe9p-1022": +double: 1 +idouble: 1 +Test "fma (0x1.4000004p-967, 0x1p-106, 0x0.000001p-1022) == 0x0.0000010000003p-1022": +double: 1 +idouble: 1 # gamma Test "gamma (-0.5) == log(2*sqrt(pi))": @@ -476,6 +1661,9 @@ float: 1 ifloat: 1 # j0 +Test "j0 (-0x1.001000001p+593) == -3.927269966354206207832593635798954916263e-90": +ildouble: 1 +ldouble: 1 Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1": double: 1 float: 1 @@ -484,6 +1672,11 @@ ifloat: 1 Test "j0 (0.75) == 0.864242275166648623555731103820923211": float: 1 ifloat: 1 +Test "j0 (0x1.d7ce3ap+107) == 2.775523647291230802651040996274861694514e-17": +float: 2 +ifloat: 2 +ildouble: 1 +ldouble: 1 Test "j0 (10.0) == -0.245935764451348335197760862485328754": double: 2 float: 1 @@ -511,7 +1704,17 @@ ldouble: 1 Test "j1 (-1.0) == -0.440050585744933515959682203718914913": ildouble: 1 ldouble: 1 -Test "j1 (0.75) == 0.349243602174862192523281016426251335": +Test "j1 (0.75) == 0.349243602174862192523281016426251335": +ildouble: 1 +ldouble: 1 +Test "j1 (0x1.3ffp+74) == 1.818984347516051243459364437186082741567e-12": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "j1 (0x1.ff00000000002p+840) == 1.846591691699331493194965158699937660696e-127": +double: 1 +idouble: 1 ildouble: 1 ldouble: 1 Test "j1 (1.0) == 0.440050585744933515959682203718914913": @@ -612,8 +1815,22 @@ ifloat: 3 ildouble: 2 ldouble: 2 Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6": +double: 1 float: 4 +idouble: 1 ifloat: 4 +Test "jn (2, 0x1.ffff62p+99) == -4.43860668048170034334926693188979974489e-16": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +Test "jn (2, 2.4048255576957729) == 0.43175480701968038399746111312430703": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 1 +ldouble: 1 Test "jn (3, 0.125) == 0.406503832554912875023029337653442868e-4": double: 1 float: 1 @@ -636,67 +1853,367 @@ double: 1 float: 2 idouble: 1 ifloat: 2 +Test "jn (3, 2.4048255576957729) == 0.19899990535769083404042146764530813": +double: 3 +idouble: 3 +ildouble: 1 +ldouble: 1 +Test "jn (4, 2.4048255576957729) == 0.647466661641779720084932282551219891E-1": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "jn (5, 2.4048255576957729) == 0.163892432048058525099230549946147698E-1": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "jn (6, 2.4048255576957729) == 0.34048184720278336646673682895929161E-2": +double: 4 +float: 3 +idouble: 4 +ifloat: 3 +ildouble: 5 +ldouble: 5 +Test "jn (7, 2.4048255576957729) == 0.60068836573295394221291569249883076E-3": +double: 3 +float: 5 +idouble: 3 +ifloat: 5 +ildouble: 3 +ldouble: 3 +Test "jn (8, 2.4048255576957729) == 0.92165786705344923232879022467054148E-4": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 +ildouble: 8 +ldouble: 8 +Test "jn (9, 2.4048255576957729) == 0.12517270977961513005428966643852564E-4": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 3 +ldouble: 3 # lgamma Test "lgamma (-0.5) == log(2*sqrt(pi))": ildouble: 1 ldouble: 1 -Test "lgamma (0.7) == 0.260867246531666514385732417016759578": -double: 1 +Test "lgamma (0.7) == 0.260867246531666514385732417016759578": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 1 +ldouble: 1 + +# log10 +Test "log10 (0.75) == -0.124938736608299953132449886193870744": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +Test "log10 (e) == log10(e)": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# log1p +Test "log1p (-0.25) == -0.287682072451780927439219005993827432": +float: 1 +ifloat: 1 + +# log2 +Test "log2 (0.75) == -.415037499278843818546261056052183492": +ildouble: 1 +ldouble: 1 + +# pow +Test "pow (0x0.ffffffp0, -0x1p24) == 2.7182819094701610539628664526874952929416": +float: 1 +ifloat: 1 +Test "pow (0x0.ffffffp0, 0x1p24) == 0.3678794302077803437135155590023422899744": +float: 1 +ifloat: 1 +Test "pow (0x1.000002p0, 0x1p24) == 7.3890552180866447284268641248075832310141": +float: 1 +ifloat: 1 + +# pow_downward +Test "pow_downward (1.5, 1.03125) == 1.519127098714743184071644334163037684948": +float: 1 +ifloat: 1 + +# pow_towardzero +Test "pow_towardzero (1.5, 1.03125) == 1.519127098714743184071644334163037684948": +float: 1 +ifloat: 1 + +# pow_upward +Test "pow_upward (1.0625, 1.125) == 1.070582293028761362162622578677070098674": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# sin_downward +Test "sin_downward (10) == -0.5440211108893698134047476618513772816836": +float: 1 +ifloat: 1 +Test "sin_downward (2) == 0.9092974268256816953960198659117448427023": +ildouble: 1 +ldouble: 1 +Test "sin_downward (3) == 0.1411200080598672221007448028081102798469": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "sin_downward (4) == -0.7568024953079282513726390945118290941359": +ildouble: 1 +ldouble: 1 +Test "sin_downward (5) == -0.9589242746631384688931544061559939733525": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "sin_downward (6) == -0.2794154981989258728115554466118947596280": +float: 1 +ifloat: 1 +Test "sin_downward (8) == 0.9893582466233817778081235982452886721164": +ildouble: 1 +ldouble: 1 +Test "sin_downward (9) == 0.4121184852417565697562725663524351793439": +ildouble: 1 +ldouble: 1 + +# sin_tonearest +Test "sin_tonearest (1) == 0.8414709848078965066525023216302989996226": +float: 1 +ifloat: 1 +Test "sin_tonearest (3) == 0.1411200080598672221007448028081102798469": +ildouble: 1 +ldouble: 1 + +# sin_towardzero +Test "sin_towardzero (1) == 0.8414709848078965066525023216302989996226": +float: 1 +ifloat: 1 +Test "sin_towardzero (10) == -0.5440211108893698134047476618513772816836": +float: 1 +ifloat: 1 +Test "sin_towardzero (2) == 0.9092974268256816953960198659117448427023": +ildouble: 1 +ldouble: 1 +Test "sin_towardzero (3) == 0.1411200080598672221007448028081102798469": +ildouble: 1 +ldouble: 1 +Test "sin_towardzero (4) == -0.7568024953079282513726390945118290941359": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "sin_towardzero (5) == -0.9589242746631384688931544061559939733525": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "sin_towardzero (8) == 0.9893582466233817778081235982452886721164": +ildouble: 1 +ldouble: 1 +Test "sin_towardzero (9) == 0.4121184852417565697562725663524351793439": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# sin_upward +Test "sin_upward (1) == 0.8414709848078965066525023216302989996226": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "sin_upward (10) == -0.5440211108893698134047476618513772816836": +ildouble: 1 +ldouble: 1 +Test "sin_upward (2) == 0.9092974268256816953960198659117448427023": +float: 2 +ifloat: 2 +Test "sin_upward (3) == 0.1411200080598672221007448028081102798469": +ildouble: 1 +ldouble: 1 +Test "sin_upward (4) == -0.7568024953079282513726390945118290941359": +float: 1 +ifloat: 1 +Test "sin_upward (6) == -0.2794154981989258728115554466118947596280": +ildouble: 1 +ldouble: 1 +Test "sin_upward (7) == 0.6569865987187890903969990915936351779369": +ildouble: 1 +ldouble: 1 +Test "sin_upward (9) == 0.4121184852417565697562725663524351793439": +float: 1 +ifloat: 1 + +# sincos +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res": +float: 1 +ifloat: 1 + +# sinh_downward +Test "sinh_downward (22) == 1792456423.065795780701106568345764104225": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "sinh_downward (23) == 4872401723.124451299966006944252978187305": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "sinh_downward (24) == 13244561064.92173614705070540368454568168": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# sinh_towardzero +Test "sinh_towardzero (22) == 1792456423.065795780701106568345764104225": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "sinh_towardzero (23) == 4872401723.124451299966006944252978187305": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "sinh_towardzero (24) == 13244561064.92173614705070540368454568168": +float: 1 +ifloat: 1 + +# sinh_upward +Test "sinh_upward (22) == 1792456423.065795780701106568345764104225": +ildouble: 1 +ldouble: 1 +Test "sinh_upward (23) == 4872401723.124451299966006944252978187305": +ildouble: 1 +ldouble: 1 +Test "sinh_upward (24) == 13244561064.92173614705070540368454568168": +ildouble: 1 +ldouble: 1 + +# sqrt +Test "sqrt (2) == M_SQRT2l": +ildouble: 1 +ldouble: 1 + +# tan_downward +Test "tan_downward (1) == 1.5574077246549022305069748074583601730873": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "tan_downward (10) == 0.6483608274590866712591249330098086768169": +float: 1 +ifloat: 1 +Test "tan_downward (2) == -2.1850398632615189916433061023136825434320": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "tan_downward (6) == -0.2910061913847491570536995888681755428312": +float: 1 +ifloat: 1 +Test "tan_downward (8) == -6.7997114552203786999252627596086333648814": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "tan_downward (9) == -0.4523156594418098405903708757987855343087": +float: 1 +ifloat: 1 + +# tan_towardzero +Test "tan_towardzero (10) == 0.6483608274590866712591249330098086768169": +float: 1 +ifloat: 1 +Test "tan_towardzero (3) == -0.1425465430742778052956354105339134932261": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "tan_towardzero (4) == 1.1578212823495775831373424182673239231198": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "tan_towardzero (5) == -3.3805150062465856369827058794473439087096": float: 1 -idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 -Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 +Test "tan_towardzero (6) == -0.2910061913847491570536995888681755428312": ildouble: 1 ldouble: 1 - -# log10 -Test "log10 (0.75) == -0.124938736608299953132449886193870744": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -Test "log10 (e) == log10(e)": +Test "tan_towardzero (9) == -0.4523156594418098405903708757987855343087": float: 1 ifloat: 1 ildouble: 1 ldouble: 1 -# log1p -Test "log1p (-0.25) == -0.287682072451780927439219005993827432": +# tan_upward +Test "tan_upward (1) == 1.5574077246549022305069748074583601730873": +float: 1 +ifloat: 1 +Test "tan_upward (10) == 0.6483608274590866712591249330098086768169": float: 1 ifloat: 1 - -# log2 -Test "log2 (0.75) == -.415037499278843818546261056052183492": ildouble: 1 ldouble: 1 - -# sincos -Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": -double: 1 -idouble: 1 +Test "tan_upward (2) == -2.1850398632615189916433061023136825434320": ildouble: 1 ldouble: 1 -Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res": -double: 1 +Test "tan_upward (3) == -0.1425465430742778052956354105339134932261": float: 1 -idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 -Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res": +Test "tan_upward (4) == 1.1578212823495775831373424182673239231198": +ildouble: 1 +ldouble: 1 +Test "tan_upward (5) == -3.3805150062465856369827058794473439087096": float: 1 ifloat: 1 - -# sqrt -Test "sqrt (2) == M_SQRT2l": +ildouble: 1 +ldouble: 1 +Test "tan_upward (6) == -0.2910061913847491570536995888681755428312": +ildouble: 1 +ldouble: 1 +Test "tan_upward (9) == -0.4523156594418098405903708757987855343087": ildouble: 1 ldouble: 1 @@ -735,6 +2252,16 @@ ildouble: 1 ldouble: 1 # y0 +Test "y0 (0x1.3ffp+74) == 1.818984347516051243459467456433028748678e-12": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "y0 (0x1.ff00000000002p+840) == 1.846591691699331493194965158699937660696e-127": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 Test "y0 (1.0) == 0.0882569642156769579829267660235151628": double: 2 float: 1 @@ -765,6 +2292,12 @@ idouble: 1 Test "y1 (0.75) == -1.03759455076928541973767132140642198": ildouble: 1 ldouble: 1 +Test "y1 (0x1.001000001p+593) == 3.927269966354206207832593635798954916263e-90": +ildouble: 1 +ldouble: 1 +Test "y1 (0x1.27e204p+99) == -8.881610148467797208469612080785210013461e-16": +double: 1 +idouble: 1 Test "y1 (1.5) == -0.412308626973911295952829820633445323": float: 1 ifloat: 1 @@ -894,6 +2427,46 @@ double: 1 idouble: 1 # Maximal error of functions: +Function: "acos_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "acos_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "acos_upward": +ildouble: 1 +ldouble: 1 + +Function: "asin_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "asin_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "asin_upward": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + Function: "atan2": float: 1 ifloat: 1 @@ -904,12 +2477,32 @@ Function: "atanh": float: 1 ifloat: 1 +Function: Real part of "cacos": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + Function: Imaginary part of "cacos": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "cacosh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 ildouble: 1 ldouble: 1 Function: Imaginary part of "cacosh": +double: 1 float: 1 +idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 @@ -921,6 +2514,10 @@ idouble: 1 ifloat: 1 Function: Imaginary part of "casin": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 ildouble: 1 ldouble: 1 @@ -973,7 +2570,9 @@ ildouble: 1 ldouble: 1 Function: Imaginary part of "ccos": +double: 1 float: 1 +idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 @@ -987,31 +2586,41 @@ ildouble: 1 ldouble: 1 Function: Imaginary part of "ccosh": +double: 1 float: 1 +idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 Function: Real part of "cexp": +double: 2 float: 1 +idouble: 2 ifloat: 1 ildouble: 1 ldouble: 1 Function: Imaginary part of "cexp": +double: 1 float: 1 +idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 Function: Real part of "clog": +double: 1 float: 1 +idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 Function: Real part of "clog10": +double: 1 float: 1 +idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 @@ -1032,6 +2641,48 @@ ifloat: 1 ildouble: 1 ldouble: 1 +Function: "cos_downward": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: "cos_tonearest": +float: 1 +ifloat: 1 + +Function: "cos_towardzero": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: "cos_upward": +float: 2 +ifloat: 2 +ildouble: 1 +ldouble: 1 + +Function: "cosh_downward": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "cosh_tonearest": +ildouble: 1 +ldouble: 1 + +Function: "cosh_towardzero": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "cosh_upward": +ildouble: 1 +ldouble: 1 + Function: Real part of "cpow": double: 2 float: 4 @@ -1049,6 +2700,10 @@ ildouble: 1 ldouble: 1 Function: Real part of "csin": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 ildouble: 1 ldouble: 1 @@ -1067,18 +2722,30 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: Real part of "csqrt": +double: 1 float: 1 +idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 Function: Imaginary part of "csqrt": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 ildouble: 1 ldouble: 1 Function: Real part of "ctan": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 ildouble: 1 ldouble: 1 @@ -1097,7 +2764,9 @@ ildouble: 1 ldouble: 1 Function: Imaginary part of "ctanh": +double: 1 float: 1 +idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 @@ -1108,7 +2777,9 @@ idouble: 1 Function: "erfc": double: 1 +float: 1 idouble: 1 +ifloat: 1 ildouble: 1 ldouble: 1 @@ -1124,6 +2795,24 @@ Function: "exp2": ildouble: 2 ldouble: 2 +Function: "exp_downward": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "exp_towardzero": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "exp_upward": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + Function: "expm1": double: 1 float: 1 @@ -1132,6 +2821,10 @@ ifloat: 1 ildouble: 1 ldouble: 1 +Function: "fma": +double: 1 +idouble: 1 + Function: "gamma": ildouble: 1 ldouble: 1 @@ -1190,6 +2883,48 @@ Function: "log2": ildouble: 1 ldouble: 1 +Function: "pow": +float: 1 +ifloat: 1 + +Function: "pow_downward": +float: 1 +ifloat: 1 + +Function: "pow_towardzero": +float: 1 +ifloat: 1 + +Function: "pow_upward": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "sin_downward": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "sin_tonearest": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "sin_towardzero": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "sin_upward": +float: 2 +ifloat: 2 +ildouble: 1 +ldouble: 1 + Function: "sincos": double: 1 float: 1 @@ -1198,6 +2933,22 @@ ifloat: 1 ildouble: 1 ldouble: 1 +Function: "sinh_downward": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: "sinh_towardzero": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: "sinh_upward": +ildouble: 1 +ldouble: 1 + Function: "sqrt": ildouble: 1 ldouble: 1 @@ -1206,6 +2957,24 @@ Function: "tan": double: 1 idouble: 1 +Function: "tan_downward": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "tan_towardzero": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "tan_upward": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + Function: "tanh": ildouble: 1 ldouble: 1 From fd5beba75e4cd779bbf5ca81c7547e904d4ec9cc Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 30 May 2012 23:44:17 +0000 Subject: [PATCH 4451/4487] Move MIPS ABI settings out of conditional. --- ChangeLog.mips | 3 +++ sysdeps/unix/sysv/linux/mips/Makefile | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index ced2d36d3d..6243cfcb7d 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,5 +1,8 @@ 2012-05-30 Joseph Myers + * sysdeps/unix/sysv/linux/mips/Makefile [subdir = misc]: Move ABI + settings out of conditional. + * sysdeps/unix/sysv/linux/mips/syscalls.list: Remove __connect_internal alias. diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile index fd6e3e0fcf..2bbc9a4dfb 100644 --- a/sysdeps/unix/sysv/linux/mips/Makefile +++ b/sysdeps/unix/sysv/linux/mips/Makefile @@ -6,6 +6,7 @@ ifeq ($(subdir),misc) sysdep_routines += cachectl cacheflush sysmips _test_and_set sysdep_headers += sys/cachectl.h sys/sysmips.h sys/tas.h +endif # _MIPS_SIM_ABI32 == 1, _MIPS_SIM_ABIN32 == 2, _MIPS_SIM_ABI64 == 3 abi-variants := o32 n32 n64 @@ -16,7 +17,6 @@ abi-n32-options := -D_MIPS_SIM=2 abi-n32-condition := _MIPS_SIM == _MIPS_SIM_ABIN32 abi-n64-options := -D_MIPS_SIM=3 abi-n64-condition := _MIPS_SIM == _MIPS_SIM_ABI64 -endif ifeq ($(subdir),elf) ifeq ($(build-shared),yes) From c33aff6db686f97c50839395a4810088ae3cc284 Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Wed, 30 May 2012 19:48:28 -0400 Subject: [PATCH 4452/4487] tile: Remove __connect_internal alias --- ChangeLog.tile | 3 +++ sysdeps/unix/sysv/linux/generic/syscalls.list | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog.tile b/ChangeLog.tile index ce8c3e07c6..ff914495a0 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,5 +1,8 @@ 2012-05-30 Chris Metcalf + * sysdeps/unix/sysv/linux/generic/syscalls.list: Remove + __connect_internal alias. + * sysdeps/unix/sysv/linux/tile/tilegx/Makefile: Remove test that $(subdir) is "misc" when setting abi- variables. diff --git a/sysdeps/unix/sysv/linux/generic/syscalls.list b/sysdeps/unix/sysv/linux/generic/syscalls.list index c9602ca870..4b2e74762f 100644 --- a/sysdeps/unix/sysv/linux/generic/syscalls.list +++ b/sysdeps/unix/sysv/linux/generic/syscalls.list @@ -20,7 +20,7 @@ socketpair - socketpair i:iiif __socketpair socketpair bind - bind i:ipi __bind bind listen - listen i:ii __listen listen accept - accept Ci:iBN __libc_accept __accept accept -connect - connect Ci:ipi __libc_connect __connect_internal __connect connect +connect - connect Ci:ipi __libc_connect __connect connect getsockname - getsockname i:ipp __getsockname getsockname getpeername - getpeername i:ipp __getpeername getpeername sendto - sendto Ci:ibnibn __libc_sendto __sendto sendto From ee0c156dae8579550f49e28fe20b19d0c0477e1a Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 31 May 2012 00:00:14 -0400 Subject: [PATCH 4453/4487] ia64: remove __connect_internal alias Signed-off-by: Mike Frysinger --- ChangeLog.ia64 | 5 +++++ sysdeps/unix/sysv/linux/ia64/syscalls.list | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.ia64 b/ChangeLog.ia64 index 429cdfbcb6..3a144b45c6 100644 --- a/ChangeLog.ia64 +++ b/ChangeLog.ia64 @@ -1,3 +1,8 @@ +2012-05-30 Mike Frysinger + + * sysdeps/unix/sysv/linux/ia64/syscalls.list: Remove + __connect_internal alias. + 2012-05-25 Mike Frysinger * sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist: Update. diff --git a/sysdeps/unix/sysv/linux/ia64/syscalls.list b/sysdeps/unix/sysv/linux/ia64/syscalls.list index c55c70ef54..8642bac152 100644 --- a/sysdeps/unix/sysv/linux/ia64/syscalls.list +++ b/sysdeps/unix/sysv/linux/ia64/syscalls.list @@ -21,7 +21,7 @@ semctl - semctl i:iiii __semctl semctl # proper socket implementations: accept - accept Ci:iBN __libc_accept __accept accept bind - bind i:ipi __bind bind -connect - connect Ci:ipi __libc_connect __connect_internal __connect connect +connect - connect Ci:ipi __libc_connect __connect connect getpeername - getpeername i:ipp __getpeername getpeername getsockname - getsockname i:ipp __getsockname getsockname getsockopt - getsockopt i:iiiBN __getsockopt getsockopt From 944c96688772d3c627194cdfefed3add67700657 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 31 May 2012 00:02:00 -0400 Subject: [PATCH 4454/4487] ia64: use hidden_def with internal pthread funcs Signed-off-by: Mike Frysinger --- ChangeLog.ia64 | 3 +++ sysdeps/unix/sysv/linux/ia64/nptl/pthread_once.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog.ia64 b/ChangeLog.ia64 index 3a144b45c6..c9e9ea7861 100644 --- a/ChangeLog.ia64 +++ b/ChangeLog.ia64 @@ -3,6 +3,9 @@ * sysdeps/unix/sysv/linux/ia64/syscalls.list: Remove __connect_internal alias. + * sysdeps/unix/sysv/linux/ia64/nptl/pthread_once.c: Replace + _internal alias by hidden_def. + 2012-05-25 Mike Frysinger * sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist: Update. diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/pthread_once.c b/sysdeps/unix/sysv/linux/ia64/nptl/pthread_once.c index 1f22a8b9ec..7730935dfe 100644 --- a/sysdeps/unix/sysv/linux/ia64/nptl/pthread_once.c +++ b/sysdeps/unix/sysv/linux/ia64/nptl/pthread_once.c @@ -90,4 +90,4 @@ __pthread_once (once_control, init_routine) return 0; } weak_alias (__pthread_once, pthread_once) -strong_alias (__pthread_once, __pthread_once_internal) +hidden_def (__pthread_once) From 3c9d6deca50d600669dfe45127602d1ad44f723f Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 31 May 2012 11:13:57 +0000 Subject: [PATCH 4455/4487] Regenerate MIPS libm-test-ulps. --- ChangeLog.mips | 5 + sysdeps/mips/mips32/libm-test-ulps | 1131 ++++++++++++++-- sysdeps/mips/mips64/libm-test-ulps | 1936 ++++++++++++++++++++++++---- 3 files changed, 2725 insertions(+), 347 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 6243cfcb7d..54e1f268d4 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2012-05-31 Joseph Myers + + * sysdeps/mips/mips32/libm-test-ulps: Regenerate. + * sysdeps/mips/mips64/libm-test-ulps: Likewise. + 2012-05-30 Joseph Myers * sysdeps/unix/sysv/linux/mips/Makefile [subdir = misc]: Move ABI diff --git a/sysdeps/mips/mips32/libm-test-ulps b/sysdeps/mips/mips32/libm-test-ulps index ff24b738ce..51356dddb6 100644 --- a/sysdeps/mips/mips32/libm-test-ulps +++ b/sysdeps/mips/mips32/libm-test-ulps @@ -1,12 +1,80 @@ # Begin of automatic generation +# acos_downward +Test "acos_downward (-0) == pi/2": +float: 1 +ifloat: 1 +Test "acos_downward (-0.5) == M_PI_6l*4.0": +double: 1 +idouble: 1 +Test "acos_downward (-1) == pi": +float: 1 +ifloat: 1 +Test "acos_downward (0) == pi/2": +float: 1 +ifloat: 1 +Test "acos_downward (0.5) == M_PI_6l*2.0": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# acos_towardzero +Test "acos_towardzero (-0) == pi/2": +float: 1 +ifloat: 1 +Test "acos_towardzero (-0.5) == M_PI_6l*4.0": +double: 1 +idouble: 1 +Test "acos_towardzero (-1) == pi": +float: 1 +ifloat: 1 +Test "acos_towardzero (0) == pi/2": +float: 1 +ifloat: 1 +Test "acos_towardzero (0.5) == M_PI_6l*2.0": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# asin_downward +Test "asin_downward (-0.5) == -pi/6": +double: 1 +idouble: 1 +Test "asin_downward (0.5) == pi/6": +double: 1 +idouble: 1 +Test "asin_downward (1.0) == pi/2": +float: 1 +ifloat: 1 + +# asin_towardzero +Test "asin_towardzero (-0.5) == -pi/6": +double: 1 +idouble: 1 +Test "asin_towardzero (-1.0) == -pi/2": +float: 1 +ifloat: 1 +Test "asin_towardzero (0.5) == pi/6": +double: 1 +idouble: 1 +Test "asin_towardzero (1.0) == pi/2": +float: 1 +ifloat: 1 + +# asin_upward +Test "asin_upward (-1.0) == -pi/2": +float: 1 +ifloat: 1 + # atan2 Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025": -float: 3 -ifloat: 3 +float: 1 +ifloat: 1 Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025": -float: 3 -ifloat: 3 +float: 1 +ifloat: 1 Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772": float: 1 ifloat: 1 @@ -16,26 +84,253 @@ Test "atanh (0.75) == 0.972955074527656652552676371721589865": float: 1 ifloat: 1 +# cacos +Test "Imaginary part of: cacos (+0 + 0.5 i) == pi/2 - 0.4812118250596034474977589134243684231352 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Imaginary part of: cacos (+0 + 1.0 i) == pi/2 - 0.8813735870195430252326093249797923090282 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Imaginary part of: cacos (+0 + 1.5 i) == pi/2 - 1.194763217287109304111930828519090523536 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Imaginary part of: cacos (+0 - 0.5 i) == pi/2 + 0.4812118250596034474977589134243684231352 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (+0 - 1.0 i) == pi/2 + 0.8813735870195430252326093249797923090282 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: cacos (+0 - 1.5 i) == pi/2 + 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cacos (-0 + 0.5 i) == pi/2 - 0.4812118250596034474977589134243684231352 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Imaginary part of: cacos (-0 + 1.0 i) == pi/2 - 0.8813735870195430252326093249797923090282 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Imaginary part of: cacos (-0 + 1.5 i) == pi/2 - 1.194763217287109304111930828519090523536 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Imaginary part of: cacos (-0 - 0.5 i) == pi/2 + 0.4812118250596034474977589134243684231352 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-0 - 1.0 i) == pi/2 + 0.8813735870195430252326093249797923090282 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-0 - 1.5 i) == pi/2 + 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cacos (-1.5 + +0 i) == pi - 0.9624236501192068949955178268487368462704 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: cacos (0.5 + +0 i) == 1.047197551196597746154214461093167628066 - 0 i": +double: 1 +idouble: 1 +Test "Real part of: cacos (0.5 - 0 i) == 1.047197551196597746154214461093167628066 + +0 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cacos (1.5 + +0 i) == +0 - 0.9624236501192068949955178268487368462704 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + # cacosh -Test "Real part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": +Test "Real part of: cacosh (+0 + 0.5 i) == 0.4812118250596034474977589134243684231352 + pi/2 i": +float: 1 +ifloat: 1 +Test "Real part of: cacosh (+0 + 1.0 i) == 0.8813735870195430252326093249797923090282 + pi/2 i": double: 1 -float: 7 +float: 1 idouble: 1 -ifloat: 7 -Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": +ifloat: 1 +Test "Real part of: cacosh (+0 + 1.5 i) == 1.194763217287109304111930828519090523536 + pi/2 i": double: 1 -float: 3 idouble: 1 -ifloat: 3 +Test "Real part of: cacosh (+0 - 0.5 i) == 0.4812118250596034474977589134243684231352 - pi/2 i": +float: 1 +ifloat: 1 +Test "Real part of: cacosh (+0 - 1.0 i) == 0.8813735870195430252326093249797923090282 - pi/2 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: cacosh (+0 - 1.5 i) == 1.194763217287109304111930828519090523536 - pi/2 i": +double: 1 +idouble: 1 +Test "Real part of: cacosh (-0 + 0.5 i) == 0.4812118250596034474977589134243684231352 + pi/2 i": +float: 1 +ifloat: 1 +Test "Real part of: cacosh (-0 + 1.0 i) == 0.8813735870195430252326093249797923090282 + pi/2 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: cacosh (-0 + 1.5 i) == 1.194763217287109304111930828519090523536 + pi/2 i": +double: 1 +idouble: 1 +Test "Real part of: cacosh (-0 - 0.5 i) == 0.4812118250596034474977589134243684231352 - pi/2 i": +float: 1 +ifloat: 1 +Test "Real part of: cacosh (-0 - 1.0 i) == 0.8813735870195430252326093249797923090282 - pi/2 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: cacosh (-0 - 1.5 i) == 1.194763217287109304111930828519090523536 - pi/2 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cacosh (-0.5 + +0 i) == +0 + 2.094395102393195492308428922186335256131 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cacosh (-0.5 - 0 i) == +0 - 2.094395102393195492308428922186335256131 i": +double: 1 +idouble: 1 +Test "Real part of: cacosh (-1.5 + +0 i) == 0.9624236501192068949955178268487368462704 + pi i": +float: 1 +ifloat: 1 +Test "Real part of: cacosh (-1.5 - 0 i) == 0.9624236501192068949955178268487368462704 - pi i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": +float: 1 +ifloat: 1 +Test "Real part of: cacosh (1.5 + +0 i) == 0.9624236501192068949955178268487368462704 + +0 i": +float: 1 +ifloat: 1 +Test "Real part of: cacosh (1.5 - 0 i) == 0.9624236501192068949955178268487368462704 - 0 i": +float: 1 +ifloat: 1 # casin +Test "Imaginary part of: casin (+0 + 0.5 i) == +0 + 0.4812118250596034474977589134243684231352 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Imaginary part of: casin (+0 + 1.0 i) == +0 + 0.8813735870195430252326093249797923090282 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Imaginary part of: casin (+0 + 1.5 i) == +0 + 1.194763217287109304111930828519090523536 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Imaginary part of: casin (+0 - 0.5 i) == +0 - 0.4812118250596034474977589134243684231352 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: casin (+0 - 1.0 i) == +0 - 0.8813735870195430252326093249797923090282 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: casin (+0 - 1.5 i) == +0 - 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +Test "Imaginary part of: casin (-0 + 0.5 i) == -0 + 0.4812118250596034474977589134243684231352 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Imaginary part of: casin (-0 + 1.0 i) == -0 + 0.8813735870195430252326093249797923090282 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Imaginary part of: casin (-0 + 1.5 i) == -0 + 1.194763217287109304111930828519090523536 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Imaginary part of: casin (-0 - 0.5 i) == -0 - 0.4812118250596034474977589134243684231352 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: casin (-0 - 1.0 i) == -0 - 0.8813735870195430252326093249797923090282 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: casin (-0 - 1.5 i) == -0 - 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +Test "Imaginary part of: casin (-1.5 + +0 i) == -pi/2 + 0.9624236501192068949955178268487368462704 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": double: 1 float: 1 idouble: 1 ifloat: 1 +Test "Imaginary part of: casin (1.5 + +0 i) == pi/2 + 0.9624236501192068949955178268487368462704 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 # casinh +Test "Real part of: casinh (-0 + 1.5 i) == -0.9624236501192068949955178268487368462704 + pi/2 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casinh (-0 - 1.5 i) == -0.9624236501192068949955178268487368462704 - pi/2 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casinh (-0.5 + +0 i) == -0.4812118250596034474977589134243684231352 + +0 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Real part of: casinh (-0.5 - 0 i) == -0.4812118250596034474977589134243684231352 - 0 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Real part of: casinh (-1.0 + +0 i) == -0.8813735870195430252326093249797923090282 + +0 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Real part of: casinh (-1.0 - 0 i) == -0.8813735870195430252326093249797923090282 - 0 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Real part of: casinh (-1.5 + +0 i) == -1.194763217287109304111930828519090523536 + +0 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Real part of: casinh (-1.5 - 0 i) == -1.194763217287109304111930828519090523536 - 0 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": double: 5 float: 1 @@ -46,6 +341,12 @@ double: 3 float: 6 idouble: 3 ifloat: 6 +Test "Real part of: casinh (0.5 + +0 i) == 0.4812118250596034474977589134243684231352 + +0 i": +float: 1 +ifloat: 1 +Test "Real part of: casinh (0.5 - 0 i) == 0.4812118250596034474977589134243684231352 - 0 i": +float: 1 +ifloat: 1 Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": float: 1 ifloat: 1 @@ -54,33 +355,37 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +Test "Real part of: casinh (1.0 + +0 i) == 0.8813735870195430252326093249797923090282 + +0 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casinh (1.0 - 0 i) == 0.8813735870195430252326093249797923090282 - 0 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casinh (1.5 + +0 i) == 1.194763217287109304111930828519090523536 + +0 i": +double: 1 +idouble: 1 +Test "Real part of: casinh (1.5 - 0 i) == 1.194763217287109304111930828519090523536 - 0 i": +double: 1 +idouble: 1 # catan -Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": -float: 3 -ifloat: 3 Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Real part of: catan (0.75 + 1.25 i) == 1.10714871779409050301706546017853704 + 0.549306144334054845697622618461262852 i": -float: 4 -ifloat: 4 # catanh Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": double: 4 idouble: 4 -Test "Imaginary part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": -float: 4 -ifloat: 4 Test "Real part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i": double: 1 idouble: 1 -Test "Imaginary part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i": -float: 6 -ifloat: 6 # cbrt Test "cbrt (-27.0) == -3.0": @@ -94,6 +399,18 @@ double: 1 idouble: 1 # ccos +Test "Imaginary part of: ccos (-0.75 + 710.5 i) == 1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ccos (-0.75 + 89.5 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: ccos (-0.75 - 710.5 i) == 1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ccos (-0.75 - 89.5 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i": float: 1 ifloat: 1 @@ -105,6 +422,21 @@ ifloat: 1 Test "Imaginary part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": float: 1 ifloat: 1 +Test "Imaginary part of: ccos (0.75 + 710.5 i) == 1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ccos (0.75 + 89.5 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: ccos (0.75 - 710.5 i) == 1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ccos (0.75 - 89.5 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: ccos (0x1p-1074 + 1440 i) == inf - 5.981479269486130556466515778180916082415e301 i": +double: 1 +idouble: 1 # ccosh Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": @@ -113,6 +445,18 @@ ifloat: 1 Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": float: 1 ifloat: 1 +Test "Imaginary part of: ccosh (-710.5 + 0.75 i) == 1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ccosh (-710.5 - 0.75 i) == 1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ccosh (-89.5 + 0.75 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: ccosh (-89.5 - 0.75 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": double: 1 float: 1 @@ -121,22 +465,69 @@ ifloat: 1 Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": float: 1 ifloat: 1 +Test "Imaginary part of: ccosh (1440 + 0x1p-1074 i) == inf + 5.981479269486130556466515778180916082415e301 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ccosh (710.5 + 0.75 i) == 1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ccosh (710.5 - 0.75 i) == 1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ccosh (89.5 + 0.75 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: ccosh (89.5 - 0.75 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 # cexp Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": float: 1 ifloat: 1 +Test "Imaginary part of: cexp (-95 + 0.75 i) == 4.039714446238306526889476684000081624047e-42 + 3.763383677300535390271646960780570275931e-42 i": +double: 1 +idouble: 1 Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": float: 1 ifloat: 1 +Test "Imaginary part of: cexp (1440 + 0x1p-1074 i) == inf + 1.196295853897226111293303155636183216483e302 i": +double: 1 +idouble: 1 +Test "Real part of: cexp (50 + 0x1p127 i) == 4.053997150228616856622417636046265337193e21 + 3.232070315463388524466674772633810238819e21 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Imaginary part of: cexp (50 + 0x1p127 i) == 4.053997150228616856622417636046265337193e21 + 3.232070315463388524466674772633810238819e21 i": +double: 1 +idouble: 1 +Test "Real part of: cexp (500 + 0x1p1023 i) == -1.159886268932754433233243794561351783426e217 + 7.904017694554466595359379965081774849708e216 i": +double: 1 +idouble: 1 +Test "Real part of: cexp (709.8125 + 0.75 i) == 1.355121963080879535248452862759108365762e308 + 1.262426823598609432507811340856186873507e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cexp (709.8125 + 0.75 i) == 1.355121963080879535248452862759108365762e308 + 1.262426823598609432507811340856186873507e308 i": +double: 1 +idouble: 1 +Test "Real part of: cexp (88.75 + 0.75 i) == 2.558360358486542817001900410314204322891e38 + 2.383359453227311447654736314679677655100e38 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cexp (88.75 + 0.75 i) == 2.558360358486542817001900410314204322891e38 + 2.383359453227311447654736314679677655100e38 i": +float: 2 +ifloat: 2 # clog -Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i": -float: 3 -ifloat: 3 Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i": float: 1 ifloat: 1 +Test "Real part of: clog (0x1p-1074 + 0x1p-1074 i) == -744.0934983311012896593986823853525458290 + pi/4 i": +double: 1 +idouble: 1 +Test "Real part of: clog (0x1p-147 + 0x1p-147 i) == -101.5460619520319878296245057936228672231 + pi/4 i": +float: 1 +ifloat: 1 # clog10 Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i": @@ -147,9 +538,7 @@ float: 1 ifloat: 1 Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i": double: 1 -float: 5 idouble: 1 -ifloat: 5 Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i": float: 1 ifloat: 1 @@ -177,6 +566,21 @@ ifloat: 1 Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i": float: 1 ifloat: 1 +Test "Imaginary part of: clog10 (0x1.fffffep+127 + 0x1.fffffep+127 i) == 38.68235441693561449174780668781319348761 + pi/4*log10(e) i": +float: 1 +ifloat: 1 +Test "Real part of: clog10 (0x1.fffffep+127 + 1.0 i) == 38.53183941910362389414093724045094697423 + 1.276276851248440096917018665609900318458e-39 i": +float: 1 +ifloat: 1 +Test "Real part of: clog10 (0x1p-1074 + 0x1p-1074 i) == -323.1557003452838130619487034867432642357 + pi/4*log10(e) i": +double: 1 +idouble: 1 +Test "Imaginary part of: clog10 (0x1p-147 + 0x1p-147 i) == -44.10089436477324509881274807713822842154 + pi/4*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0x1p-149 + 0x1p-149 i) == -44.70295435610120748924022586658721447508 + pi/4*log10(e) i": +float: 1 +ifloat: 1 Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i": float: 1 ifloat: 1 @@ -193,18 +597,92 @@ ifloat: 1 # cos Test "cos (M_PI_6l * 2.0) == 0.5": double: 1 -float: 1 idouble: 1 -ifloat: 1 Test "cos (M_PI_6l * 4.0) == -0.5": double: 2 float: 1 idouble: 2 ifloat: 1 -Test "cos (pi/2) == 0": -double: 1 + +# cos_downward +Test "cos_downward (1) == 0.5403023058681397174009366074429766037323": +float: 1 +ifloat: 1 +Test "cos_downward (2) == -0.4161468365471423869975682295007621897660": +float: 1 +ifloat: 1 +Test "cos_downward (3) == -0.9899924966004454572715727947312613023937": +float: 1 +ifloat: 1 +Test "cos_downward (4) == -0.6536436208636119146391681830977503814241": +float: 1 +ifloat: 1 +Test "cos_downward (5) == 0.2836621854632262644666391715135573083344": +float: 1 +ifloat: 1 +Test "cos_downward (7) == 0.7539022543433046381411975217191820122183": +float: 1 +ifloat: 1 +Test "cos_downward (8) == -0.1455000338086135258688413818311946826093": +float: 1 +ifloat: 1 + +# cos_tonearest +Test "cos_tonearest (7) == 0.7539022543433046381411975217191820122183": +float: 1 +ifloat: 1 + +# cos_towardzero +Test "cos_towardzero (2) == -0.4161468365471423869975682295007621897660": +float: 1 +ifloat: 1 +Test "cos_towardzero (3) == -0.9899924966004454572715727947312613023937": +float: 1 +ifloat: 1 +Test "cos_towardzero (5) == 0.2836621854632262644666391715135573083344": +float: 1 +ifloat: 1 +Test "cos_towardzero (7) == 0.7539022543433046381411975217191820122183": +float: 1 +ifloat: 1 +Test "cos_towardzero (8) == -0.1455000338086135258688413818311946826093": +float: 1 +ifloat: 1 + +# cos_upward +Test "cos_upward (10) == -0.8390715290764524522588639478240648345199": +float: 1 +ifloat: 1 +Test "cos_upward (6) == 0.9601702866503660205456522979229244054519": +float: 1 +ifloat: 1 +Test "cos_upward (7) == 0.7539022543433046381411975217191820122183": +float: 1 +ifloat: 1 +Test "cos_upward (9) == -0.9111302618846769883682947111811653112463": +float: 2 +ifloat: 2 + +# cosh_downward +Test "cosh_downward (22) == 1792456423.065795780980053377632656584997": +float: 1 +ifloat: 1 +Test "cosh_downward (23) == 4872401723.124451300068625740569997090344": +float: 1 +ifloat: 1 +Test "cosh_downward (24) == 13244561064.92173614708845674912733665919": +float: 1 +ifloat: 1 + +# cosh_towardzero +Test "cosh_towardzero (22) == 1792456423.065795780980053377632656584997": +float: 1 +ifloat: 1 +Test "cosh_towardzero (23) == 4872401723.124451300068625740569997090344": +float: 1 +ifloat: 1 +Test "cosh_towardzero (24) == 13244561064.92173614708845674912733665919": float: 1 -idouble: 1 ifloat: 1 # cpow @@ -238,16 +716,72 @@ float: 2 idouble: 2 ifloat: 2 +# csin +Test "Real part of: csin (-0.75 + 710.5 i) == -1.255317763348154410745082950806112487736e308 + 1.347490911916428129246890157395342279438e308 i": +double: 1 +idouble: 1 +Test "Real part of: csin (-0.75 + 89.5 i) == -2.522786001038096774676288412995370563339e38 + 2.708024460708609732016532185663087200560e38 i": +float: 1 +ifloat: 1 +Test "Real part of: csin (-0.75 - 710.5 i) == -1.255317763348154410745082950806112487736e308 - 1.347490911916428129246890157395342279438e308 i": +double: 1 +idouble: 1 +Test "Real part of: csin (-0.75 - 89.5 i) == -2.522786001038096774676288412995370563339e38 - 2.708024460708609732016532185663087200560e38 i": +float: 1 +ifloat: 1 +Test "Real part of: csin (0.75 + 710.5 i) == 1.255317763348154410745082950806112487736e308 + 1.347490911916428129246890157395342279438e308 i": +double: 1 +idouble: 1 +Test "Real part of: csin (0.75 + 89.5 i) == 2.522786001038096774676288412995370563339e38 + 2.708024460708609732016532185663087200560e38 i": +float: 1 +ifloat: 1 +Test "Real part of: csin (0.75 - 710.5 i) == 1.255317763348154410745082950806112487736e308 - 1.347490911916428129246890157395342279438e308 i": +double: 1 +idouble: 1 +Test "Real part of: csin (0.75 - 89.5 i) == 2.522786001038096774676288412995370563339e38 - 2.708024460708609732016532185663087200560e38 i": +float: 1 +ifloat: 1 +Test "Real part of: csin (0x1p-1074 + 1440 i) == 5.981479269486130556466515778180916082415e301 + inf i": +double: 1 +idouble: 1 + # csinh Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i": double: 1 idouble: 1 +Test "Imaginary part of: csinh (-710.5 + 0.75 i) == -1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: csinh (-710.5 - 0.75 i) == -1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: csinh (-89.5 + 0.75 i) == -2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: csinh (-89.5 - 0.75 i) == -2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": float: 1 ifloat: 1 Test "Imaginary part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": float: 1 ifloat: 1 +Test "Imaginary part of: csinh (1440 + 0x1p-1074 i) == inf + 5.981479269486130556466515778180916082415e301 i": +double: 1 +idouble: 1 +Test "Imaginary part of: csinh (710.5 + 0.75 i) == 1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: csinh (710.5 - 0.75 i) == 1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: csinh (89.5 + 0.75 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: csinh (89.5 - 0.75 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 # csqrt Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": @@ -256,26 +790,71 @@ ifloat: 1 Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i": float: 1 ifloat: 1 +Test "Imaginary part of: csqrt (0x1.fffffep+127 + 1.0 i) == 1.844674352395372953599975585936590505260e+19 + 2.710505511993121390769065968615872097053e-20 i": +float: 1 +ifloat: 1 +Test "Real part of: csqrt (0x1.fffffffffffffp+1023 + 0x1.fffffffffffffp+1023 i) == 1.473094556905565378990473658199034571917e+154 + 6.101757441282702188537080005372547713595e+153 i": +double: 1 +idouble: 1 +Test "Imaginary part of: csqrt (0x1.fffffffffffffp+1023 + 0x1.fffffffffffffp+1023 i) == 1.473094556905565378990473658199034571917e+154 + 6.101757441282702188537080005372547713595e+153 i": +double: 1 +idouble: 1 +Test "Imaginary part of: csqrt (0x1.fffffffffffffp+1023 + 0x1p+1023 i) == 1.379778091031440685006200821918878702861e+154 + 3.257214233483129514781233066898042490248e+153 i": +double: 1 +idouble: 1 # ctan Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": double: 1 idouble: 1 Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i": double: 1 idouble: 1 +Test "Real part of: ctan (0x1p1023 + 1 i) == -0.2254627924997545057926782581695274244229 + 0.8786063118883068695462540226219865087189 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ctan (0x1p127 + 1 i) == 0.2446359391192790896381501310437708987204 + 0.9101334047676183761532873794426475906201 i": +double: 1 +idouble: 1 +Test "Real part of: ctan (0x3.243f6cp-1 + 0 i) == -2.287733242885645987394874673945769518150e7 + 0.0 i": +float: 1 +ifloat: 1 # ctanh Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": double: 1 -float: 2 +float: 1 idouble: 1 -ifloat: 2 +ifloat: 1 +Test "Imaginary part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: ctanh (0 + 0x3.243f6cp-1 i) == 0.0 - 2.287733242885645987394874673945769518150e7 i": +float: 1 +ifloat: 1 Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i": +double: 1 float: 1 +idouble: 1 ifloat: 1 Test "Real part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i": double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i": +float: 2 +ifloat: 2 +Test "Imaginary part of: ctanh (1 + 0x1p1023 i) == 0.8786063118883068695462540226219865087189 - 0.2254627924997545057926782581695274244229 i": +double: 1 +idouble: 1 +Test "Real part of: ctanh (1 + 0x1p127 i) == 0.9101334047676183761532873794426475906201 + 0.2446359391192790896381501310437708987204 i": +double: 1 idouble: 1 # erf @@ -284,6 +863,12 @@ double: 1 idouble: 1 # erfc +Test "erfc (0x1.f7303cp+1) == 2.705500297238986897105236321218861842255e-8": +double: 1 +idouble: 1 +Test "erfc (0x1.ffa002p+2) == 1.233585992097580296336099501489175967033e-29": +float: 1 +ifloat: 1 Test "erfc (2.0) == 0.00467773498104726583793074363274707139": double: 1 idouble: 1 @@ -293,20 +878,41 @@ idouble: 1 # exp10 Test "exp10 (-1) == 0.1": -double: 2 +double: 1 +idouble: 1 +Test "exp10 (-305) == 1.0e-305": +double: 1 +idouble: 1 +Test "exp10 (-36) == 1.0e-36": +double: 1 +idouble: 1 +Test "exp10 (3) == 1000": +double: 1 +idouble: 1 +Test "exp10 (36) == 1.0e36": +double: 1 +idouble: 1 + +# exp_downward +Test "exp_downward (2) == e^2": float: 1 -idouble: 2 ifloat: 1 -Test "exp10 (0.75) == 5.62341325190349080394951039776481231": -double: 1 +Test "exp_downward (3) == e^3": +float: 1 +ifloat: 1 + +# exp_towardzero +Test "exp_towardzero (2) == e^2": +float: 1 +ifloat: 1 +Test "exp_towardzero (3) == e^3": +float: 1 +ifloat: 1 + +# exp_upward +Test "exp_upward (1) == e": float: 1 -idouble: 1 ifloat: 1 -Test "exp10 (3) == 1000": -double: 6 -float: 2 -idouble: 6 -ifloat: 2 # expm1 Test "expm1 (0.75) == 1.11700001661267466854536981983709561": @@ -315,6 +921,9 @@ idouble: 1 Test "expm1 (1) == M_El - 1.0": float: 1 ifloat: 1 +Test "expm1 (500.0) == 1.4035922178528374107397703328409120821806e+217": +double: 1 +idouble: 1 # hypot Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271": @@ -351,6 +960,9 @@ ifloat: 1 Test "j0 (0.75) == 0.864242275166648623555731103820923211": float: 1 ifloat: 1 +Test "j0 (0x1.d7ce3ap+107) == 2.775523647291230802651040996274861694514e-17": +float: 2 +ifloat: 2 Test "j0 (10.0) == -0.245935764451348335197760862485328754": double: 2 float: 1 @@ -369,6 +981,12 @@ float: 1 ifloat: 1 # j1 +Test "j1 (0x1.3ffp+74) == 1.818984347516051243459364437186082741567e-12": +double: 1 +idouble: 1 +Test "j1 (0x1.ff00000000002p+840) == 1.846591691699331493194965158699937660696e-127": +double: 1 +idouble: 1 Test "j1 (10.0) == 0.0434727461688614366697487680258592883": float: 2 ifloat: 2 @@ -430,9 +1048,14 @@ idouble: 4 ifloat: 3 Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6": double: 1 -float: 4 +float: 2 idouble: 1 -ifloat: 4 +ifloat: 2 +Test "jn (2, 0x1.ffff62p+99) == -4.43860668048170034334926693188979974489e-16": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 Test "jn (2, 2.4048255576957729) == 0.43175480701968038399746111312430703": double: 2 float: 1 @@ -454,10 +1077,8 @@ float: 1 idouble: 3 ifloat: 1 Test "jn (3, 2.0) == 0.128943249474402051098793332969239835": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 +float: 1 +ifloat: 1 Test "jn (3, 2.4048255576957729) == 0.19899990535769083404042146764530813": double: 3 idouble: 3 @@ -490,57 +1111,194 @@ float: 2 idouble: 1 ifloat: 2 -# lgamma -Test "lgamma (0.7) == 0.260867246531666514385732417016759578": -double: 1 +# lgamma +Test "lgamma (0.7) == 0.260867246531666514385732417016759578": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +# log10 +Test "log10 (0.75) == -0.124938736608299953132449886193870744": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +Test "log10 (e) == log10(e)": +float: 1 +ifloat: 1 + +# log1p +Test "log1p (-0.25) == -0.287682072451780927439219005993827432": +float: 1 +ifloat: 1 + +# pow +Test "pow (0x0.ffffffp0, -0x1p24) == 2.7182819094701610539628664526874952929416": +float: 1 +ifloat: 1 +Test "pow (0x0.ffffffp0, 0x1p24) == 0.3678794302077803437135155590023422899744": +float: 1 +ifloat: 1 +Test "pow (0x1.000002p0, 0x1p24) == 7.3890552180866447284268641248075832310141": +float: 1 +ifloat: 1 + +# pow_downward +Test "pow_downward (1.5, 1.03125) == 1.519127098714743184071644334163037684948": +float: 1 +ifloat: 1 + +# pow_towardzero +Test "pow_towardzero (1.5, 1.03125) == 1.519127098714743184071644334163037684948": +float: 1 +ifloat: 1 + +# pow_upward +Test "pow_upward (1.0625, 1.125) == 1.070582293028761362162622578677070098674": +float: 1 +ifloat: 1 + +# sin_downward +Test "sin_downward (10) == -0.5440211108893698134047476618513772816836": +float: 1 +ifloat: 1 +Test "sin_downward (3) == 0.1411200080598672221007448028081102798469": +float: 1 +ifloat: 1 +Test "sin_downward (5) == -0.9589242746631384688931544061559939733525": +float: 1 +ifloat: 1 +Test "sin_downward (6) == -0.2794154981989258728115554466118947596280": +float: 1 +ifloat: 1 + +# sin_tonearest +Test "sin_tonearest (1) == 0.8414709848078965066525023216302989996226": +float: 1 +ifloat: 1 + +# sin_towardzero +Test "sin_towardzero (1) == 0.8414709848078965066525023216302989996226": +float: 1 +ifloat: 1 +Test "sin_towardzero (10) == -0.5440211108893698134047476618513772816836": +float: 1 +ifloat: 1 +Test "sin_towardzero (4) == -0.7568024953079282513726390945118290941359": +float: 1 +ifloat: 1 +Test "sin_towardzero (5) == -0.9589242746631384688931544061559939733525": +float: 1 +ifloat: 1 +Test "sin_towardzero (9) == 0.4121184852417565697562725663524351793439": float: 1 -idouble: 1 ifloat: 1 -Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -# log10 -Test "log10 (0.75) == -0.124938736608299953132449886193870744": -double: 1 +# sin_upward +Test "sin_upward (1) == 0.8414709848078965066525023216302989996226": +float: 1 +ifloat: 1 +Test "sin_upward (2) == 0.9092974268256816953960198659117448427023": float: 2 -idouble: 1 ifloat: 2 -Test "log10 (e) == log10(e)": +Test "sin_upward (4) == -0.7568024953079282513726390945118290941359": float: 1 ifloat: 1 - -# log1p -Test "log1p (-0.25) == -0.287682072451780927439219005993827432": +Test "sin_upward (9) == 0.4121184852417565697562725663524351793439": float: 1 ifloat: 1 # sincos Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": double: 1 -float: 1 idouble: 1 -ifloat: 1 Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res": -double: 1 +Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res": float: 1 -idouble: 1 ifloat: 1 -Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res": + +# sinh_downward +Test "sinh_downward (22) == 1792456423.065795780701106568345764104225": +float: 1 +ifloat: 1 +Test "sinh_downward (23) == 4872401723.124451299966006944252978187305": +float: 1 +ifloat: 1 +Test "sinh_downward (24) == 13244561064.92173614705070540368454568168": float: 1 ifloat: 1 -# tan -Test "tan (pi/4) == 1": -double: 1 -idouble: 1 +# sinh_towardzero +Test "sinh_towardzero (22) == 1792456423.065795780701106568345764104225": +float: 1 +ifloat: 1 +Test "sinh_towardzero (23) == 4872401723.124451299966006944252978187305": +float: 1 +ifloat: 1 +Test "sinh_towardzero (24) == 13244561064.92173614705070540368454568168": +float: 1 +ifloat: 1 + +# tan_downward +Test "tan_downward (1) == 1.5574077246549022305069748074583601730873": +float: 1 +ifloat: 1 +Test "tan_downward (10) == 0.6483608274590866712591249330098086768169": +float: 1 +ifloat: 1 +Test "tan_downward (2) == -2.1850398632615189916433061023136825434320": +float: 1 +ifloat: 1 +Test "tan_downward (6) == -0.2910061913847491570536995888681755428312": +float: 1 +ifloat: 1 +Test "tan_downward (8) == -6.7997114552203786999252627596086333648814": +float: 1 +ifloat: 1 +Test "tan_downward (9) == -0.4523156594418098405903708757987855343087": +float: 1 +ifloat: 1 + +# tan_towardzero +Test "tan_towardzero (10) == 0.6483608274590866712591249330098086768169": +float: 1 +ifloat: 1 +Test "tan_towardzero (3) == -0.1425465430742778052956354105339134932261": +float: 1 +ifloat: 1 +Test "tan_towardzero (4) == 1.1578212823495775831373424182673239231198": +float: 1 +ifloat: 1 +Test "tan_towardzero (5) == -3.3805150062465856369827058794473439087096": +float: 1 +ifloat: 1 +Test "tan_towardzero (9) == -0.4523156594418098405903708757987855343087": +float: 1 +ifloat: 1 + +# tan_upward +Test "tan_upward (1) == 1.5574077246549022305069748074583601730873": +float: 1 +ifloat: 1 +Test "tan_upward (10) == 0.6483608274590866712591249330098086768169": +float: 1 +ifloat: 1 +Test "tan_upward (3) == -0.1425465430742778052956354105339134932261": +float: 1 +ifloat: 1 +Test "tan_upward (5) == -3.3805150062465856369827058794473439087096": +float: 1 +ifloat: 1 # tgamma Test "tgamma (-0.5) == -2 sqrt (pi)": @@ -558,6 +1316,12 @@ idouble: 1 ifloat: 1 # y0 +Test "y0 (0x1.3ffp+74) == 1.818984347516051243459467456433028748678e-12": +double: 1 +idouble: 1 +Test "y0 (0x1.ff00000000002p+840) == 1.846591691699331493194965158699937660696e-127": +double: 1 +idouble: 1 Test "y0 (1.0) == 0.0882569642156769579829267660235151628": double: 2 float: 1 @@ -581,6 +1345,9 @@ ifloat: 1 Test "y1 (0.125) == -5.19993611253477499595928744876579921": double: 1 idouble: 1 +Test "y1 (0x1.27e204p+99) == -8.881610148467797208469612080785210013461e-16": +double: 1 +idouble: 1 Test "y1 (1.5) == -0.412308626973911295952829820633445323": float: 1 ifloat: 1 @@ -677,25 +1444,63 @@ double: 1 idouble: 1 # Maximal error of functions: +Function: "acos_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "acos_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "asin_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "asin_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "asin_upward": +float: 1 +ifloat: 1 + Function: "atan2": -float: 3 -ifloat: 3 +float: 1 +ifloat: 1 Function: "atanh": float: 1 ifloat: 1 +Function: Real part of "cacos": +double: 1 +idouble: 1 + +Function: Imaginary part of "cacos": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + Function: Real part of "cacosh": double: 1 -float: 7 +float: 1 idouble: 1 -ifloat: 7 +ifloat: 1 Function: Imaginary part of "cacosh": double: 1 -float: 3 +float: 1 idouble: 1 -ifloat: 3 +ifloat: 1 Function: Real part of "casin": double: 1 @@ -703,6 +1508,12 @@ float: 1 idouble: 1 ifloat: 1 +Function: Imaginary part of "casin": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + Function: Real part of "casinh": double: 5 float: 1 @@ -715,10 +1526,6 @@ float: 6 idouble: 3 ifloat: 6 -Function: Real part of "catan": -float: 4 -ifloat: 4 - Function: Imaginary part of "catan": double: 1 float: 1 @@ -729,10 +1536,6 @@ Function: Real part of "catanh": double: 4 idouble: 4 -Function: Imaginary part of "catanh": -float: 6 -ifloat: 6 - Function: "cbrt": double: 1 idouble: 1 @@ -744,7 +1547,9 @@ idouble: 1 ifloat: 1 Function: Imaginary part of "ccos": +double: 1 float: 1 +idouble: 1 ifloat: 1 Function: Real part of "ccosh": @@ -754,34 +1559,40 @@ idouble: 1 ifloat: 1 Function: Imaginary part of "ccosh": +double: 1 float: 1 +idouble: 1 ifloat: 1 Function: Real part of "cexp": +double: 2 float: 1 +idouble: 2 ifloat: 1 Function: Imaginary part of "cexp": -float: 1 -ifloat: 1 +double: 1 +float: 2 +idouble: 1 +ifloat: 2 Function: Real part of "clog": +double: 1 float: 1 +idouble: 1 ifloat: 1 -Function: Imaginary part of "clog": -float: 3 -ifloat: 3 - Function: Real part of "clog10": +double: 1 float: 1 +idouble: 1 ifloat: 1 Function: Imaginary part of "clog10": double: 1 -float: 5 +float: 1 idouble: 1 -ifloat: 5 +ifloat: 1 Function: "cos": double: 2 @@ -789,6 +1600,30 @@ float: 1 idouble: 2 ifloat: 1 +Function: "cos_downward": +float: 1 +ifloat: 1 + +Function: "cos_tonearest": +float: 1 +ifloat: 1 + +Function: "cos_towardzero": +float: 1 +ifloat: 1 + +Function: "cos_upward": +float: 2 +ifloat: 2 + +Function: "cosh_downward": +float: 1 +ifloat: 1 + +Function: "cosh_towardzero": +float: 1 +ifloat: 1 + Function: Real part of "cpow": double: 2 float: 4 @@ -801,6 +1636,12 @@ float: 2 idouble: 2 ifloat: 2 +Function: Real part of "csin": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + Function: Real part of "csinh": float: 1 ifloat: 1 @@ -812,12 +1653,22 @@ idouble: 1 ifloat: 1 Function: Real part of "csqrt": +double: 1 float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "csqrt": +double: 1 +float: 1 +idouble: 1 ifloat: 1 Function: Real part of "ctan": double: 1 +float: 1 idouble: 1 +ifloat: 1 Function: Imaginary part of "ctan": double: 1 @@ -825,13 +1676,15 @@ idouble: 1 Function: Real part of "ctanh": double: 1 -float: 2 +float: 1 idouble: 1 -ifloat: 2 +ifloat: 1 Function: Imaginary part of "ctanh": -float: 1 -ifloat: 1 +double: 1 +float: 2 +idouble: 1 +ifloat: 2 Function: "erf": double: 1 @@ -839,13 +1692,25 @@ idouble: 1 Function: "erfc": double: 1 +float: 1 idouble: 1 +ifloat: 1 Function: "exp10": -double: 6 -float: 2 -idouble: 6 -ifloat: 2 +double: 1 +idouble: 1 + +Function: "exp_downward": +float: 1 +ifloat: 1 + +Function: "exp_towardzero": +float: 1 +ifloat: 1 + +Function: "exp_upward": +float: 1 +ifloat: 1 Function: "expm1": double: 1 @@ -891,16 +1756,68 @@ Function: "log1p": float: 1 ifloat: 1 +Function: "pow": +float: 1 +ifloat: 1 + +Function: "pow_downward": +float: 1 +ifloat: 1 + +Function: "pow_towardzero": +float: 1 +ifloat: 1 + +Function: "pow_upward": +float: 1 +ifloat: 1 + +Function: "sin_downward": +float: 1 +ifloat: 1 + +Function: "sin_tonearest": +float: 1 +ifloat: 1 + +Function: "sin_towardzero": +float: 1 +ifloat: 1 + +Function: "sin_upward": +float: 2 +ifloat: 2 + Function: "sincos": double: 1 float: 1 idouble: 1 ifloat: 1 +Function: "sinh_downward": +float: 1 +ifloat: 1 + +Function: "sinh_towardzero": +float: 1 +ifloat: 1 + Function: "tan": double: 1 idouble: 1 +Function: "tan_downward": +float: 1 +ifloat: 1 + +Function: "tan_towardzero": +float: 1 +ifloat: 1 + +Function: "tan_upward": +float: 1 +ifloat: 1 + Function: "tgamma": double: 1 float: 1 diff --git a/sysdeps/mips/mips64/libm-test-ulps b/sysdeps/mips/mips64/libm-test-ulps index f66e4cb6b1..c21b077583 100644 --- a/sysdeps/mips/mips64/libm-test-ulps +++ b/sysdeps/mips/mips64/libm-test-ulps @@ -1,5 +1,73 @@ # Begin of automatic generation +# acos_downward +Test "acos_downward (-0) == pi/2": +float: 1 +ifloat: 1 +Test "acos_downward (-0.5) == M_PI_6l*4.0": +double: 1 +idouble: 1 +Test "acos_downward (-1) == pi": +float: 1 +ifloat: 1 +Test "acos_downward (0) == pi/2": +float: 1 +ifloat: 1 +Test "acos_downward (0.5) == M_PI_6l*2.0": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# acos_towardzero +Test "acos_towardzero (-0) == pi/2": +float: 1 +ifloat: 1 +Test "acos_towardzero (-0.5) == M_PI_6l*4.0": +double: 1 +idouble: 1 +Test "acos_towardzero (-1) == pi": +float: 1 +ifloat: 1 +Test "acos_towardzero (0) == pi/2": +float: 1 +ifloat: 1 +Test "acos_towardzero (0.5) == M_PI_6l*2.0": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# asin_downward +Test "asin_downward (-0.5) == -pi/6": +double: 1 +idouble: 1 +Test "asin_downward (0.5) == pi/6": +double: 1 +idouble: 1 +Test "asin_downward (1.0) == pi/2": +float: 1 +ifloat: 1 + +# asin_towardzero +Test "asin_towardzero (-0.5) == -pi/6": +double: 1 +idouble: 1 +Test "asin_towardzero (-1.0) == -pi/2": +float: 1 +ifloat: 1 +Test "asin_towardzero (0.5) == pi/6": +double: 1 +idouble: 1 +Test "asin_towardzero (1.0) == pi/2": +float: 1 +ifloat: 1 + +# asin_upward +Test "asin_upward (-1.0) == -pi/2": +float: 1 +ifloat: 1 + # atan2 Test "atan2 (-0.00756827042671106339, -.001792735857538728036) == -1.80338464113663849327153994379639112": ildouble: 1 @@ -26,257 +94,955 @@ float: 1 ifloat: 1 # cacos -Test "Imaginary part of: cacos (0.75 + 1.25 i) == 1.11752014915610270578240049553777969 - 1.13239363160530819522266333696834467 i": +Test "Imaginary part of: cacos (+0 + 0.5 i) == pi/2 - 0.4812118250596034474977589134243684231352 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 ildouble: 1 ldouble: 1 - -# cacosh -Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": +Test "Imaginary part of: cacos (+0 + 1.0 i) == pi/2 - 0.8813735870195430252326093249797923090282 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 3 +ldouble: 3 +Test "Imaginary part of: cacos (+0 + 1.5 i) == pi/2 - 1.194763217287109304111930828519090523536 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: cacos (+0 - 0.5 i) == pi/2 + 0.4812118250596034474977589134243684231352 i": float: 1 ifloat: 1 ildouble: 1 ldouble: 1 - -# casin -Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": +Test "Imaginary part of: cacos (+0 - 1.0 i) == pi/2 + 0.8813735870195430252326093249797923090282 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Imaginary part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": ildouble: 1 ldouble: 1 - -# casinh -Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": -double: 5 +Test "Imaginary part of: cacos (+0 - 1.5 i) == pi/2 + 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0 + 0.5 i) == pi/2 - 0.4812118250596034474977589134243684231352 i": +double: 2 float: 1 -idouble: 5 +idouble: 2 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0 + 1.0 i) == pi/2 - 0.8813735870195430252326093249797923090282 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 3 +ldouble: 3 +Test "Imaginary part of: cacos (-0 + 1.5 i) == pi/2 - 1.194763217287109304111930828519090523536 i": +double: 2 +float: 1 +idouble: 2 ifloat: 1 -ildouble: 4 -ldouble: 4 -Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": -double: 3 -float: 6 -idouble: 3 -ifloat: 6 ildouble: 2 ldouble: 2 -Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": +Test "Imaginary part of: cacos (-0 - 0.5 i) == pi/2 + 0.4812118250596034474977589134243684231352 i": float: 1 ifloat: 1 ildouble: 1 ldouble: 1 -Test "Imaginary part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": +Test "Imaginary part of: cacos (-0 - 1.0 i) == pi/2 + 0.8813735870195430252326093249797923090282 i": double: 1 float: 1 idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 - -# catan -Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": +Test "Imaginary part of: cacos (-0 - 1.5 i) == pi/2 + 1.194763217287109304111930828519090523536 i": double: 1 -float: 1 idouble: 1 -ifloat: 1 -Test "Imaginary part of: catan (0.75 + 1.25 i) == 1.10714871779409050301706546017853704 + 0.549306144334054845697622618461262852 i": ildouble: 1 ldouble: 1 - -# catanh -Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": -double: 4 -idouble: 4 -Test "Real part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i": +Test "Imaginary part of: cacos (-1.5 + +0 i) == pi - 0.9624236501192068949955178268487368462704 i": double: 1 +float: 1 idouble: 1 +ifloat: 1 ildouble: 1 ldouble: 1 -Test "Imaginary part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i": -ildouble: 1 -ldouble: 1 - -# cbrt -Test "cbrt (-0.001) == -0.1": -ildouble: 1 -ldouble: 1 -Test "cbrt (-27.0) == -3.0": +Test "Real part of: cacos (0.5 + +0 i) == 1.047197551196597746154214461093167628066 - 0 i": double: 1 idouble: 1 -Test "cbrt (0.75) == 0.908560296416069829445605878163630251": -double: 1 -idouble: 1 -Test "cbrt (0.9921875) == 0.997389022060725270579075195353955217": +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (0.5 - 0 i) == 1.047197551196597746154214461093167628066 + +0 i": double: 1 idouble: 1 - -# ccos -Test "Real part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i": ildouble: 1 ldouble: 1 -Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i": -float: 1 -ifloat: 1 +Test "Imaginary part of: cacos (0.75 + 1.25 i) == 1.11752014915610270578240049553777969 - 1.13239363160530819522266333696834467 i": ildouble: 1 ldouble: 1 -Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": +Test "Imaginary part of: cacos (1.5 + +0 i) == +0 - 0.9624236501192068949955178268487368462704 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Imaginary part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": -float: 1 -ifloat: 1 - -# ccosh -Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": -float: 1 -ifloat: 1 ildouble: 1 ldouble: 1 -Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": + +# cacosh +Test "Real part of: cacosh (+0 + 0.5 i) == 0.4812118250596034474977589134243684231352 + pi/2 i": float: 1 ifloat: 1 ildouble: 1 ldouble: 1 -Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": +Test "Real part of: cacosh (+0 + 1.0 i) == 0.8813735870195430252326093249797923090282 + pi/2 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": -float: 1 -ifloat: 1 - -# cexp -Test "Real part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": ildouble: 1 ldouble: 1 -Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": -float: 1 -ifloat: 1 +Test "Real part of: cacosh (+0 + 1.5 i) == 1.194763217287109304111930828519090523536 + pi/2 i": +double: 1 +idouble: 1 ildouble: 1 ldouble: 1 -Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": +Test "Real part of: cacosh (+0 - 0.5 i) == 0.4812118250596034474977589134243684231352 - pi/2 i": float: 1 ifloat: 1 -Test "Imaginary part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": ildouble: 1 ldouble: 1 - -# clog -Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i": +Test "Real part of: cacosh (+0 - 1.0 i) == 0.8813735870195430252326093249797923090282 - pi/2 i": +double: 1 float: 1 +idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 - -# clog10 -Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i": +Test "Real part of: cacosh (+0 - 1.5 i) == 1.194763217287109304111930828519090523536 - pi/2 i": double: 1 -float: 1 idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: cacosh (-0 + 0.5 i) == 0.4812118250596034474977589134243684231352 + pi/2 i": +float: 1 ifloat: 1 -Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cacosh (-0 + 1.0 i) == 0.8813735870195430252326093249797923090282 + pi/2 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Real part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i": ildouble: 1 ldouble: 1 -Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i": +Test "Real part of: cacosh (-0 + 1.5 i) == 1.194763217287109304111930828519090523536 + pi/2 i": double: 1 idouble: 1 ildouble: 1 ldouble: 1 -Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i": -double: 1 +Test "Real part of: cacosh (-0 - 0.5 i) == 0.4812118250596034474977589134243684231352 - pi/2 i": float: 1 -idouble: 1 ifloat: 1 -Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cacosh (-0 - 1.0 i) == 0.8813735870195430252326093249797923090282 - pi/2 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cacosh (-0 - 1.5 i) == 1.194763217287109304111930828519090523536 - pi/2 i": double: 1 -float: 1 idouble: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacosh (-0.5 + +0 i) == +0 + 2.094395102393195492308428922186335256131 i": double: 1 -float: 1 idouble: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (-inf + inf i) == inf + 3/4 pi*log10(e) i": +Test "Imaginary part of: cacosh (-0.5 - 0 i) == +0 - 2.094395102393195492308428922186335256131 i": double: 1 idouble: 1 -Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i": -double: 1 +Test "Real part of: cacosh (-1.5 + +0 i) == 0.9624236501192068949955178268487368462704 + pi i": float: 1 -idouble: 1 ifloat: 1 -Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i": -double: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: cacosh (-1.5 - 0 i) == 0.9624236501192068949955178268487368462704 - pi i": float: 1 -idouble: 1 ifloat: 1 -Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i": -double: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": float: 1 -idouble: 1 ifloat: 1 -Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i": -double: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: cacosh (1.5 + +0 i) == 0.9624236501192068949955178268487368462704 + +0 i": float: 1 -idouble: 1 ifloat: 1 -Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cacosh (1.5 - 0 i) == 0.9624236501192068949955178268487368462704 - 0 i": float: 1 ifloat: 1 -Test "Imaginary part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i": ildouble: 1 ldouble: 1 -Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i": -double: 1 + +# casin +Test "Imaginary part of: casin (+0 + 0.5 i) == +0 + 0.4812118250596034474977589134243684231352 i": +double: 2 float: 1 -idouble: 1 +idouble: 2 ifloat: 1 -Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i": -double: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (+0 + 1.0 i) == +0 + 0.8813735870195430252326093249797923090282 i": +double: 2 float: 1 -idouble: 1 +idouble: 2 ifloat: 1 -Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i": -double: 1 +ildouble: 3 +ldouble: 3 +Test "Imaginary part of: casin (+0 + 1.5 i) == +0 + 1.194763217287109304111930828519090523536 i": +double: 2 float: 1 -idouble: 1 +idouble: 2 ifloat: 1 -Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i": +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: casin (+0 - 0.5 i) == +0 - 0.4812118250596034474977589134243684231352 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (+0 - 1.0 i) == +0 - 0.8813735870195430252326093249797923090282 i": double: 1 float: 1 idouble: 1 ifloat: 1 - -# cos -Test "cos (M_PI_6l * 2.0) == 0.5": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (+0 - 1.5 i) == +0 - 1.194763217287109304111930828519090523536 i": double: 1 idouble: 1 ildouble: 1 ldouble: 1 -Test "cos (M_PI_6l * 4.0) == -0.5": +Test "Imaginary part of: casin (-0 + 0.5 i) == -0 + 0.4812118250596034474977589134243684231352 i": double: 2 float: 1 idouble: 2 ifloat: 1 ildouble: 1 ldouble: 1 - -# cpow +Test "Imaginary part of: casin (-0 + 1.0 i) == -0 + 0.8813735870195430252326093249797923090282 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 3 +ldouble: 3 +Test "Imaginary part of: casin (-0 + 1.5 i) == -0 + 1.194763217287109304111930828519090523536 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: casin (-0 - 0.5 i) == -0 - 0.4812118250596034474977589134243684231352 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0 - 1.0 i) == -0 - 0.8813735870195430252326093249797923090282 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0 - 1.5 i) == -0 - 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-1.5 + +0 i) == -pi/2 + 0.9624236501192068949955178268487368462704 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (1.5 + +0 i) == pi/2 + 0.9624236501192068949955178268487368462704 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# casinh +Test "Real part of: casinh (-0 + 1.5 i) == -0.9624236501192068949955178268487368462704 + pi/2 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-0 - 1.5 i) == -0.9624236501192068949955178268487368462704 - pi/2 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-0.5 + +0 i) == -0.4812118250596034474977589134243684231352 + +0 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-0.5 - 0 i) == -0.4812118250596034474977589134243684231352 - 0 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-1.0 + +0 i) == -0.8813735870195430252326093249797923090282 + +0 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 3 +ldouble: 3 +Test "Real part of: casinh (-1.0 - 0 i) == -0.8813735870195430252326093249797923090282 - 0 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 3 +ldouble: 3 +Test "Real part of: casinh (-1.5 + +0 i) == -1.194763217287109304111930828519090523536 + +0 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "Real part of: casinh (-1.5 - 0 i) == -1.194763217287109304111930828519090523536 - 0 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": +double: 5 +float: 1 +idouble: 5 +ifloat: 1 +ildouble: 4 +ldouble: 4 +Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": +double: 3 +float: 6 +idouble: 3 +ifloat: 6 +ildouble: 2 +ldouble: 2 +Test "Real part of: casinh (0.5 + +0 i) == 0.4812118250596034474977589134243684231352 + +0 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (0.5 - 0 i) == 0.4812118250596034474977589134243684231352 - 0 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.0 + +0 i) == 0.8813735870195430252326093249797923090282 + +0 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.0 - 0 i) == 0.8813735870195430252326093249797923090282 - 0 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.5 + +0 i) == 1.194763217287109304111930828519090523536 + +0 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.5 - 0 i) == 1.194763217287109304111930828519090523536 - 0 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +# catan +Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: catan (0.75 + 1.25 i) == 1.10714871779409050301706546017853704 + 0.549306144334054845697622618461262852 i": +ildouble: 1 +ldouble: 1 + +# catanh +Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": +double: 4 +idouble: 4 +Test "Real part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i": +ildouble: 1 +ldouble: 1 + +# cbrt +Test "cbrt (-0.001) == -0.1": +ildouble: 1 +ldouble: 1 +Test "cbrt (-27.0) == -3.0": +double: 1 +idouble: 1 +Test "cbrt (0.75) == 0.908560296416069829445605878163630251": +double: 1 +idouble: 1 +Test "cbrt (0.9921875) == 0.997389022060725270579075195353955217": +double: 1 +idouble: 1 + +# ccos +Test "Imaginary part of: ccos (-0.75 + 11357.25 i) == 9.001213196851067077465606717616495588201e4931 + 8.385498349388321535962327491346664141020e4931 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccos (-0.75 + 710.5 i) == 1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: ccos (-0.75 + 89.5 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccos (-0.75 + 89.5 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccos (-0.75 - 11357.25 i) == 9.001213196851067077465606717616495588201e4931 - 8.385498349388321535962327491346664141020e4931 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccos (-0.75 - 710.5 i) == 1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: ccos (-0.75 - 89.5 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccos (-0.75 - 89.5 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: ccos (0.75 + 11357.25 i) == 9.001213196851067077465606717616495588201e4931 - 8.385498349388321535962327491346664141020e4931 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccos (0.75 + 710.5 i) == 1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: ccos (0.75 + 89.5 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccos (0.75 + 89.5 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccos (0.75 - 11357.25 i) == 9.001213196851067077465606717616495588201e4931 + 8.385498349388321535962327491346664141020e4931 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccos (0.75 - 710.5 i) == 1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: ccos (0.75 - 89.5 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccos (0.75 - 89.5 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccos (0x1p-1074 + 1440 i) == inf - 5.981479269486130556466515778180916082415e301 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ccos (0x1p-16434 + 22730 i) == inf - 1.217853148905605987081057582351152052687e4924 i": +ildouble: 1 +ldouble: 1 + +# ccosh +Test "Imaginary part of: ccosh (-11357.25 + 0.75 i) == 9.001213196851067077465606717616495588201e4931 - 8.385498349388321535962327491346664141020e4931 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccosh (-11357.25 - 0.75 i) == 9.001213196851067077465606717616495588201e4931 + 8.385498349388321535962327491346664141020e4931 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccosh (-710.5 + 0.75 i) == 1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccosh (-710.5 - 0.75 i) == 1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: ccosh (-89.5 + 0.75 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccosh (-89.5 + 0.75 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: ccosh (-89.5 - 0.75 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccosh (-89.5 - 0.75 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: ccosh (11357.25 + 0.75 i) == 9.001213196851067077465606717616495588201e4931 + 8.385498349388321535962327491346664141020e4931 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccosh (11357.25 - 0.75 i) == 9.001213196851067077465606717616495588201e4931 - 8.385498349388321535962327491346664141020e4931 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccosh (1440 + 0x1p-1074 i) == inf + 5.981479269486130556466515778180916082415e301 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ccosh (22730 + 0x1p-16434 i) == inf + 1.217853148905605987081057582351152052687e4924 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccosh (710.5 + 0.75 i) == 1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccosh (710.5 - 0.75 i) == 1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: ccosh (89.5 + 0.75 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccosh (89.5 + 0.75 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: ccosh (89.5 - 0.75 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccosh (89.5 - 0.75 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# cexp +Test "Imaginary part of: cexp (-10000 + 0x1p16383 i) == 1.045876464564882298442774542991176546722e-4343 + 4.421154026488516836023811173959413420548e-4344 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cexp (-720 + 0.75 i) == 1.486960657116368433685753325516638551722e-313 + 1.385247284245720590980701226843815229385e-313 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cexp (-95 + 0.75 i) == 4.039714446238306526889476684000081624047e-42 + 3.763383677300535390271646960780570275931e-42 i": +double: 1 +idouble: 1 +Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cexp (1440 + 0x1p-1074 i) == inf + 1.196295853897226111293303155636183216483e302 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cexp (22730 + 0x1p-16434 i) == inf + 2.435706297811211974162115164702304105374e4924 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cexp (50 + 0x1p127 i) == 4.053997150228616856622417636046265337193e21 + 3.232070315463388524466674772633810238819e21 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cexp (50 + 0x1p127 i) == 4.053997150228616856622417636046265337193e21 + 3.232070315463388524466674772633810238819e21 i": +double: 1 +idouble: 1 +Test "Real part of: cexp (500 + 0x1p1023 i) == -1.159886268932754433233243794561351783426e217 + 7.904017694554466595359379965081774849708e216 i": +double: 1 +idouble: 1 +Test "Real part of: cexp (709.8125 + 0.75 i) == 1.355121963080879535248452862759108365762e308 + 1.262426823598609432507811340856186873507e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cexp (709.8125 + 0.75 i) == 1.355121963080879535248452862759108365762e308 + 1.262426823598609432507811340856186873507e308 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: cexp (88.75 + 0.75 i) == 2.558360358486542817001900410314204322891e38 + 2.383359453227311447654736314679677655100e38 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cexp (88.75 + 0.75 i) == 2.558360358486542817001900410314204322891e38 + 2.383359453227311447654736314679677655100e38 i": +float: 2 +ifloat: 2 +ildouble: 1 +ldouble: 1 + +# clog +Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: clog (0x1.fp+16383 + 0x1.fp+16383 i) == 11356.83823118610934184548269774874545400 + pi/4 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: clog (0x1p-1074 + 0x1p-1074 i) == -744.0934983311012896593986823853525458290 + pi/4 i": +double: 1 +idouble: 1 +Test "Real part of: clog (0x1p-147 + 0x1p-147 i) == -101.5460619520319878296245057936228672231 + pi/4 i": +float: 1 +ifloat: 1 + +# clog10 +Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf + inf i) == inf + 3/4 pi*log10(e) i": +double: 1 +idouble: 1 +Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: clog10 (0x1.fffffep+127 + 0x1.fffffep+127 i) == 38.68235441693561449174780668781319348761 + pi/4*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: clog10 (0x1.fffffep+127 + 1.0 i) == 38.53183941910362389414093724045094697423 + 1.276276851248440096917018665609900318458e-39 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0x1.fffffffffffffp+1023 + 0x1.fffffffffffffp+1023 i) == 308.4052305577487344482591243175787477115 + pi/4*log10(e) i": +double: 1 +idouble: 1 +Test "Real part of: clog10 (0x1.fp+16383 + 0x1.fp+16383 i) == 4932.212175672014259683102930239951947672 + pi/4*log10(e) i": +ildouble: 1 +ldouble: 1 +Test "Real part of: clog10 (0x1.fp+16383 + 0x1p+16383 i) == 4932.112944269463028900262609694408579449 + 0.2069271710841128115912940666587802677383 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: clog10 (0x1p-1073 + 0x1p-1073 i) == -322.8546703496198318667349645920187712089 + pi/4*log10(e) i": +double: 1 +idouble: 1 +Test "Real part of: clog10 (0x1p-1074 + 0x1p-1074 i) == -323.1557003452838130619487034867432642357 + pi/4*log10(e) i": +double: 1 +idouble: 1 +Test "Imaginary part of: clog10 (0x1p-1074 + 0x1p-1074 i) == -323.1557003452838130619487034867432642357 + pi/4*log10(e) i": +double: 1 +idouble: 1 +Test "Imaginary part of: clog10 (0x1p-147 + 0x1p-147 i) == -44.10089436477324509881274807713822842154 + pi/4*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0x1p-149 + 0x1p-149 i) == -44.70295435610120748924022586658721447508 + pi/4*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# cos +Test "cos (M_PI_6l * 2.0) == 0.5": +double: 1 +idouble: 1 +Test "cos (M_PI_6l * 4.0) == -0.5": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# cos_downward +Test "cos_downward (1) == 0.5403023058681397174009366074429766037323": +float: 1 +ifloat: 1 +Test "cos_downward (2) == -0.4161468365471423869975682295007621897660": +float: 1 +ifloat: 1 +Test "cos_downward (3) == -0.9899924966004454572715727947312613023937": +float: 1 +ifloat: 1 +Test "cos_downward (4) == -0.6536436208636119146391681830977503814241": +float: 1 +ifloat: 1 +Test "cos_downward (5) == 0.2836621854632262644666391715135573083344": +float: 1 +ifloat: 1 +Test "cos_downward (7) == 0.7539022543433046381411975217191820122183": +float: 1 +ifloat: 1 +Test "cos_downward (8) == -0.1455000338086135258688413818311946826093": +float: 1 +ifloat: 1 + +# cos_tonearest +Test "cos_tonearest (7) == 0.7539022543433046381411975217191820122183": +float: 1 +ifloat: 1 + +# cos_towardzero +Test "cos_towardzero (2) == -0.4161468365471423869975682295007621897660": +float: 1 +ifloat: 1 +Test "cos_towardzero (3) == -0.9899924966004454572715727947312613023937": +float: 1 +ifloat: 1 +Test "cos_towardzero (5) == 0.2836621854632262644666391715135573083344": +float: 1 +ifloat: 1 +Test "cos_towardzero (7) == 0.7539022543433046381411975217191820122183": +float: 1 +ifloat: 1 +Test "cos_towardzero (8) == -0.1455000338086135258688413818311946826093": +float: 1 +ifloat: 1 + +# cos_upward +Test "cos_upward (10) == -0.8390715290764524522588639478240648345199": +float: 1 +ifloat: 1 +Test "cos_upward (6) == 0.9601702866503660205456522979229244054519": +float: 1 +ifloat: 1 +Test "cos_upward (7) == 0.7539022543433046381411975217191820122183": +float: 1 +ifloat: 1 +Test "cos_upward (9) == -0.9111302618846769883682947111811653112463": +float: 2 +ifloat: 2 + +# cosh_downward +Test "cosh_downward (22) == 1792456423.065795780980053377632656584997": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cosh_downward (23) == 4872401723.124451300068625740569997090344": +float: 1 +ifloat: 1 +Test "cosh_downward (24) == 13244561064.92173614708845674912733665919": +float: 1 +ifloat: 1 + +# cosh_tonearest +Test "cosh_tonearest (22) == 1792456423.065795780980053377632656584997": +ildouble: 1 +ldouble: 1 + +# cosh_towardzero +Test "cosh_towardzero (22) == 1792456423.065795780980053377632656584997": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cosh_towardzero (23) == 4872401723.124451300068625740569997090344": +float: 1 +ifloat: 1 +Test "cosh_towardzero (24) == 13244561064.92173614708845674912733665919": +float: 1 +ifloat: 1 + +# cosh_upward +Test "cosh_upward (22) == 1792456423.065795780980053377632656584997": +ildouble: 1 +ldouble: 1 + +# cpow Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": float: 1 ifloat: 1 @@ -291,9 +1057,6 @@ ifloat: 4 ildouble: 4 ldouble: 4 Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i": -ildouble: 2 -ldouble: 2 -Test "Imaginary part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i": ildouble: 1 ldouble: 1 Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i": @@ -301,8 +1064,8 @@ double: 2 float: 3 idouble: 2 ifloat: 3 -ildouble: 10 -ldouble: 10 +ildouble: 11 +ldouble: 11 Test "Real part of: cpow (2 + 0 i, 10 + 0 i) == 1024.0 + 0.0 i": ildouble: 2 ldouble: 2 @@ -311,8 +1074,8 @@ double: 1 float: 4 idouble: 1 ifloat: 4 -ildouble: 3 -ldouble: 3 +ildouble: 2 +ldouble: 2 Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": float: 2 ifloat: 2 @@ -325,26 +1088,166 @@ ildouble: 1 ldouble: 1 # csin +Test "Real part of: csin (-0.75 + 11357.25 i) == -8.385498349388321535962327491346664141020e4931 + 9.001213196851067077465606717616495588201e4931 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: csin (-0.75 + 710.5 i) == -1.255317763348154410745082950806112487736e308 + 1.347490911916428129246890157395342279438e308 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: csin (-0.75 + 89.5 i) == -2.522786001038096774676288412995370563339e38 + 2.708024460708609732016532185663087200560e38 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csin (-0.75 + 89.5 i) == -2.522786001038096774676288412995370563339e38 + 2.708024460708609732016532185663087200560e38 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: csin (-0.75 - 11357.25 i) == -8.385498349388321535962327491346664141020e4931 - 9.001213196851067077465606717616495588201e4931 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: csin (-0.75 - 710.5 i) == -1.255317763348154410745082950806112487736e308 - 1.347490911916428129246890157395342279438e308 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: csin (-0.75 - 89.5 i) == -2.522786001038096774676288412995370563339e38 - 2.708024460708609732016532185663087200560e38 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csin (-0.75 - 89.5 i) == -2.522786001038096774676288412995370563339e38 - 2.708024460708609732016532185663087200560e38 i": +ildouble: 1 +ldouble: 1 Test "Imaginary part of: csin (-2 - 3 i) == -9.15449914691142957346729954460983256 + 4.16890695996656435075481305885375484 i": ildouble: 1 ldouble: 1 Test "Real part of: csin (0.75 + 1.25 i) == 1.28722291002649188575873510790565441 + 1.17210635989270256101081285116138863 i": ildouble: 1 ldouble: 1 +Test "Real part of: csin (0.75 + 11357.25 i) == 8.385498349388321535962327491346664141020e4931 + 9.001213196851067077465606717616495588201e4931 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: csin (0.75 + 710.5 i) == 1.255317763348154410745082950806112487736e308 + 1.347490911916428129246890157395342279438e308 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: csin (0.75 + 89.5 i) == 2.522786001038096774676288412995370563339e38 + 2.708024460708609732016532185663087200560e38 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csin (0.75 + 89.5 i) == 2.522786001038096774676288412995370563339e38 + 2.708024460708609732016532185663087200560e38 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: csin (0.75 - 11357.25 i) == 8.385498349388321535962327491346664141020e4931 - 9.001213196851067077465606717616495588201e4931 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: csin (0.75 - 710.5 i) == 1.255317763348154410745082950806112487736e308 - 1.347490911916428129246890157395342279438e308 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: csin (0.75 - 89.5 i) == 2.522786001038096774676288412995370563339e38 - 2.708024460708609732016532185663087200560e38 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csin (0.75 - 89.5 i) == 2.522786001038096774676288412995370563339e38 - 2.708024460708609732016532185663087200560e38 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: csin (0x1p-1074 + 1440 i) == 5.981479269486130556466515778180916082415e301 + inf i": +double: 1 +idouble: 1 +Test "Real part of: csin (0x1p-16434 + 22730 i) == 1.217853148905605987081057582351152052687e4924 + inf i": +ildouble: 1 +ldouble: 1 # csinh +Test "Imaginary part of: csinh (-11357.25 + 0.75 i) == -9.001213196851067077465606717616495588201e4931 + 8.385498349388321535962327491346664141020e4931 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csinh (-11357.25 - 0.75 i) == -9.001213196851067077465606717616495588201e4931 - 8.385498349388321535962327491346664141020e4931 i": +ildouble: 1 +ldouble: 1 Test "Real part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i": ildouble: 1 ldouble: 1 Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i": double: 1 idouble: 1 +Test "Imaginary part of: csinh (-710.5 + 0.75 i) == -1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csinh (-710.5 - 0.75 i) == -1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: csinh (-89.5 + 0.75 i) == -2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csinh (-89.5 + 0.75 i) == -2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: csinh (-89.5 - 0.75 i) == -2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csinh (-89.5 - 0.75 i) == -2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": float: 1 ifloat: 1 Test "Imaginary part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": float: 1 ifloat: 1 +Test "Imaginary part of: csinh (11357.25 + 0.75 i) == 9.001213196851067077465606717616495588201e4931 + 8.385498349388321535962327491346664141020e4931 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csinh (11357.25 - 0.75 i) == 9.001213196851067077465606717616495588201e4931 - 8.385498349388321535962327491346664141020e4931 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csinh (1440 + 0x1p-1074 i) == inf + 5.981479269486130556466515778180916082415e301 i": +double: 1 +idouble: 1 +Test "Imaginary part of: csinh (22730 + 0x1p-16434 i) == inf + 1.217853148905605987081057582351152052687e4924 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csinh (710.5 + 0.75 i) == 1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csinh (710.5 - 0.75 i) == 1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: csinh (89.5 + 0.75 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csinh (89.5 + 0.75 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: csinh (89.5 - 0.75 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csinh (89.5 - 0.75 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 # csqrt Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": @@ -360,37 +1263,153 @@ ldouble: 1 Test "Imaginary part of: csqrt (0.75 + 1.25 i) == 1.05065169626078392338656675760808326 + 0.594868882070379067881984030639932657 i": ildouble: 1 ldouble: 1 +Test "Imaginary part of: csqrt (0x1.fffffep+127 + 1.0 i) == 1.844674352395372953599975585936590505260e+19 + 2.710505511993121390769065968615872097053e-20 i": +float: 1 +ifloat: 1 +Test "Real part of: csqrt (0x1.fffffffffffffp+1023 + 0x1.fffffffffffffp+1023 i) == 1.473094556905565378990473658199034571917e+154 + 6.101757441282702188537080005372547713595e+153 i": +double: 1 +idouble: 1 +Test "Imaginary part of: csqrt (0x1.fffffffffffffp+1023 + 0x1.fffffffffffffp+1023 i) == 1.473094556905565378990473658199034571917e+154 + 6.101757441282702188537080005372547713595e+153 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csqrt (0x1.fffffffffffffp+1023 + 0x1p+1023 i) == 1.379778091031440685006200821918878702861e+154 + 3.257214233483129514781233066898042490248e+153 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: csqrt (0x1.fp+16383 + 0x1.fp+16383 i) == 1.179514222452201722651836720466795901016e+2466 + 4.885707879516577666702435054303191575148e+2465 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csqrt (0x1.fp+16383 + 0x1.fp+16383 i) == 1.179514222452201722651836720466795901016e+2466 + 4.885707879516577666702435054303191575148e+2465 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csqrt (0x1.fp+16383 + 0x1p+16383 i) == 1.106698967236475180613254276996359485630e+2466 + 2.687568007603946993388538156299100955642e+2465 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csqrt (0x1p-16440 + 0x1p-16441 i) == 3.514690655930285351254618340783294558136e-2475 + 8.297059146828716918029689466551384219370e-2476 i": +ildouble: 1 +ldouble: 1 # ctan Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i": +double: 1 +idouble: 1 +ildouble: 2 +ldouble: 2 +Test "Real part of: ctan (0x1p1023 + 1 i) == -0.2254627924997545057926782581695274244229 + 0.8786063118883068695462540226219865087189 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ctan (0x1p1023 + 1 i) == -0.2254627924997545057926782581695274244229 + 0.8786063118883068695462540226219865087189 i": +ildouble: 2 +ldouble: 2 +Test "Real part of: ctan (0x1p127 + 1 i) == 0.2446359391192790896381501310437708987204 + 0.9101334047676183761532873794426475906201 i": +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: ctan (0x1p127 + 1 i) == 0.2446359391192790896381501310437708987204 + 0.9101334047676183761532873794426475906201 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: ctan (0x1p16383 + 1 i) == 0.1608598776370396607204448234354670036772 + 0.8133818522051542536316746743877629761488 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ctan (0x1p16383 + 1 i) == 0.1608598776370396607204448234354670036772 + 0.8133818522051542536316746743877629761488 i": +ildouble: 2 +ldouble: 2 +Test "Real part of: ctan (0x3.243f6cp-1 + 0 i) == -2.287733242885645987394874673945769518150e7 + 0.0 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: ctan (1 + 355 i) == 8.140551093483276762350406321792653551513e-309 + 1.0 i": +ildouble: 2 +ldouble: 2 +Test "Real part of: ctan (1 + 365 i) == 1.677892637497921890115075995898773550884e-317 + 1.0 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: ctan (1 + 45 i) == 1.490158918874345552942703234806348520895e-39 + 1.000000000000000000000000000000000000001 i": +ildouble: 2 +ldouble: 2 +Test "Real part of: ctan (1 + 47 i) == 2.729321264492904590777293425576722354636e-41 + 1.0 i": +ildouble: 1 +ldouble: 1 + +# ctanh +Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: ctanh (0 + 0x3.243f6cp-1 i) == 0.0 - 2.287733242885645987394874673945769518150e7 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i": +float: 2 +ifloat: 2 +Test "Real part of: ctanh (1 + 0x1p1023 i) == 0.8786063118883068695462540226219865087189 - 0.2254627924997545057926782581695274244229 i": +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: ctanh (1 + 0x1p1023 i) == 0.8786063118883068695462540226219865087189 - 0.2254627924997545057926782581695274244229 i": +double: 1 +idouble: 1 +Test "Real part of: ctanh (1 + 0x1p127 i) == 0.9101334047676183761532873794426475906201 + 0.2446359391192790896381501310437708987204 i": +double: 1 +idouble: 1 ildouble: 1 ldouble: 1 -Test "Imaginary part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": +Test "Imaginary part of: ctanh (1 + 0x1p127 i) == 0.9101334047676183761532873794426475906201 + 0.2446359391192790896381501310437708987204 i": +ildouble: 2 +ldouble: 2 +Test "Real part of: ctanh (1 + 0x1p16383 i) == 0.8133818522051542536316746743877629761488 + 0.1608598776370396607204448234354670036772 i": +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: ctanh (1 + 0x1p16383 i) == 0.8133818522051542536316746743877629761488 + 0.1608598776370396607204448234354670036772 i": ildouble: 1 ldouble: 1 -Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i": -double: 1 -idouble: 1 +Test "Imaginary part of: ctanh (355 + 1 i) == 1.0 + 8.140551093483276762350406321792653551513e-309 i": ildouble: 2 ldouble: 2 - -# ctanh -Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 +Test "Imaginary part of: ctanh (365 + 1 i) == 1.0 + 1.677892637497921890115075995898773550884e-317 i": ildouble: 1 ldouble: 1 -Test "Imaginary part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": +Test "Imaginary part of: ctanh (45 + 1 i) == 1.000000000000000000000000000000000000001 + 1.490158918874345552942703234806348520895e-39 i": +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: ctanh (47 + 1 i) == 1.0 + 2.729321264492904590777293425576722354636e-41 i": ildouble: 1 ldouble: 1 -Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i": -float: 1 -ifloat: 1 -Test "Real part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i": -double: 1 -idouble: 1 # erf Test "erf (1.25) == 0.922900128256458230136523481197281140": @@ -398,6 +1417,17 @@ double: 1 idouble: 1 # erfc +Test "erfc (0x1.f7303cp+1) == 2.705500297238986897105236321218861842255e-8": +double: 1 +idouble: 1 +Test "erfc (0x1.ffa002p+2) == 1.233585992097580296336099501489175967033e-29": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "erfc (0x1.ffffc8p+2) == 1.122671365033056305522366683719541099329e-29": +ildouble: 1 +ldouble: 1 Test "erfc (2.0) == 0.00467773498104726583793074363274707139": double: 1 idouble: 1 @@ -410,27 +1440,51 @@ idouble: 1 # exp10 Test "exp10 (-1) == 0.1": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -Test "exp10 (0.75) == 5.62341325190349080394951039776481231": double: 1 -float: 1 idouble: 1 -ifloat: 1 +Test "exp10 (-305) == 1.0e-305": +double: 1 +idouble: 1 +Test "exp10 (-36) == 1.0e-36": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 Test "exp10 (3) == 1000": -double: 6 -float: 2 -idouble: 6 -ifloat: 2 +double: 1 +idouble: 1 +Test "exp10 (36) == 1.0e36": +double: 1 +idouble: 1 +Test "exp10 (4932) == 1.0e4932": ildouble: 1 ldouble: 1 # exp2 -Test "exp2 (10) == 1024": -ildouble: 2 -ldouble: 2 +Test "exp2 (100.5) == 1.792728671193156477399422023278661496394e+30": +ildouble: 1 +ldouble: 1 + +# exp_downward +Test "exp_downward (2) == e^2": +float: 1 +ifloat: 1 +Test "exp_downward (3) == e^3": +float: 1 +ifloat: 1 + +# exp_towardzero +Test "exp_towardzero (2) == e^2": +float: 1 +ifloat: 1 +Test "exp_towardzero (3) == e^3": +float: 1 +ifloat: 1 + +# exp_upward +Test "exp_upward (1) == e": +float: 1 +ifloat: 1 # expm1 Test "expm1 (0.75) == 1.11700001661267466854536981983709561": @@ -443,6 +1497,9 @@ idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 +Test "expm1 (500.0) == 1.4035922178528374107397703328409120821806e+217": +double: 1 +idouble: 1 # gamma Test "gamma (-0.5) == log(2*sqrt(pi))": @@ -476,6 +1533,9 @@ float: 1 ifloat: 1 # j0 +Test "j0 (-0x1.001000001p+593) == -3.927269966354206207832593635798954916263e-90": +ildouble: 1 +ldouble: 1 Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1": double: 1 float: 1 @@ -484,6 +1544,11 @@ ifloat: 1 Test "j0 (0.75) == 0.864242275166648623555731103820923211": float: 1 ifloat: 1 +Test "j0 (0x1.d7ce3ap+107) == 2.775523647291230802651040996274861694514e-17": +float: 2 +ifloat: 2 +ildouble: 1 +ldouble: 1 Test "j0 (10.0) == -0.245935764451348335197760862485328754": double: 2 float: 1 @@ -514,6 +1579,16 @@ ldouble: 1 Test "j1 (0.75) == 0.349243602174862192523281016426251335": ildouble: 1 ldouble: 1 +Test "j1 (0x1.3ffp+74) == 1.818984347516051243459364437186082741567e-12": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "j1 (0x1.ff00000000002p+840) == 1.846591691699331493194965158699937660696e-127": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 Test "j1 (1.0) == 0.440050585744933515959682203718914913": ildouble: 1 ldouble: 1 @@ -613,14 +1688,21 @@ ildouble: 2 ldouble: 2 Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6": double: 1 -float: 4 +float: 2 idouble: 1 -ifloat: 4 +ifloat: 2 +Test "jn (2, 0x1.ffff62p+99) == -4.43860668048170034334926693188979974489e-16": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 Test "jn (2, 2.4048255576957729) == 0.43175480701968038399746111312430703": double: 2 float: 1 idouble: 2 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "jn (3, 0.125) == 0.406503832554912875023029337653442868e-4": double: 1 float: 1 @@ -639,41 +1721,53 @@ ifloat: 1 ildouble: 2 ldouble: 2 Test "jn (3, 2.0) == 0.128943249474402051098793332969239835": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 +float: 1 +ifloat: 1 Test "jn (3, 2.4048255576957729) == 0.19899990535769083404042146764530813": double: 3 idouble: 3 +ildouble: 1 +ldouble: 1 Test "jn (4, 2.4048255576957729) == 0.647466661641779720084932282551219891E-1": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 Test "jn (5, 2.4048255576957729) == 0.163892432048058525099230549946147698E-1": double: 3 float: 1 idouble: 3 ifloat: 1 +ildouble: 2 +ldouble: 2 Test "jn (6, 2.4048255576957729) == 0.34048184720278336646673682895929161E-2": double: 4 float: 3 idouble: 4 ifloat: 3 +ildouble: 5 +ldouble: 5 Test "jn (7, 2.4048255576957729) == 0.60068836573295394221291569249883076E-3": double: 3 float: 5 idouble: 3 ifloat: 5 +ildouble: 3 +ldouble: 3 Test "jn (8, 2.4048255576957729) == 0.92165786705344923232879022467054148E-4": double: 3 float: 2 idouble: 3 ifloat: 2 +ildouble: 8 +ldouble: 8 Test "jn (9, 2.4048255576957729) == 0.12517270977961513005428966643852564E-4": double: 1 float: 2 idouble: 1 ifloat: 2 +ildouble: 3 +ldouble: 3 # lgamma Test "lgamma (-0.5) == log(2*sqrt(pi))": @@ -682,62 +1776,218 @@ ldouble: 1 Test "lgamma (0.7) == 0.260867246531666514385732417016759578": double: 1 float: 1 -idouble: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 1 +ldouble: 1 + +# log10 +Test "log10 (0.75) == -0.124938736608299953132449886193870744": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +Test "log10 (e) == log10(e)": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# log1p +Test "log1p (-0.25) == -0.287682072451780927439219005993827432": +float: 1 +ifloat: 1 + +# log2 +Test "log2 (0.75) == -.415037499278843818546261056052183492": +ildouble: 1 +ldouble: 1 + +# pow +Test "pow (0x0.ffffffp0, -0x1p24) == 2.7182819094701610539628664526874952929416": +float: 1 +ifloat: 1 +Test "pow (0x0.ffffffp0, 0x1p24) == 0.3678794302077803437135155590023422899744": +float: 1 +ifloat: 1 +Test "pow (0x1.000002p0, 0x1p24) == 7.3890552180866447284268641248075832310141": +float: 1 +ifloat: 1 + +# pow_downward +Test "pow_downward (1.5, 1.03125) == 1.519127098714743184071644334163037684948": +float: 1 +ifloat: 1 + +# pow_towardzero +Test "pow_towardzero (1.5, 1.03125) == 1.519127098714743184071644334163037684948": +float: 1 +ifloat: 1 + +# pow_upward +Test "pow_upward (1.0625, 1.125) == 1.070582293028761362162622578677070098674": +float: 1 +ifloat: 1 + +# sin_downward +Test "sin_downward (10) == -0.5440211108893698134047476618513772816836": +float: 1 +ifloat: 1 +Test "sin_downward (3) == 0.1411200080598672221007448028081102798469": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "sin_downward (5) == -0.9589242746631384688931544061559939733525": +float: 1 +ifloat: 1 +Test "sin_downward (6) == -0.2794154981989258728115554466118947596280": +float: 1 +ifloat: 1 + +# sin_tonearest +Test "sin_tonearest (1) == 0.8414709848078965066525023216302989996226": +float: 1 +ifloat: 1 +Test "sin_tonearest (3) == 0.1411200080598672221007448028081102798469": +ildouble: 1 +ldouble: 1 + +# sin_towardzero +Test "sin_towardzero (1) == 0.8414709848078965066525023216302989996226": +float: 1 +ifloat: 1 +Test "sin_towardzero (10) == -0.5440211108893698134047476618513772816836": +float: 1 +ifloat: 1 +Test "sin_towardzero (3) == 0.1411200080598672221007448028081102798469": +ildouble: 1 +ldouble: 1 +Test "sin_towardzero (4) == -0.7568024953079282513726390945118290941359": +float: 1 +ifloat: 1 +Test "sin_towardzero (5) == -0.9589242746631384688931544061559939733525": +float: 1 +ifloat: 1 +Test "sin_towardzero (9) == 0.4121184852417565697562725663524351793439": +float: 1 +ifloat: 1 + +# sin_upward +Test "sin_upward (1) == 0.8414709848078965066525023216302989996226": +float: 1 +ifloat: 1 +Test "sin_upward (2) == 0.9092974268256816953960198659117448427023": +float: 2 +ifloat: 2 +Test "sin_upward (3) == 0.1411200080598672221007448028081102798469": +ildouble: 1 +ldouble: 1 +Test "sin_upward (4) == -0.7568024953079282513726390945118290941359": +float: 1 +ifloat: 1 +Test "sin_upward (9) == 0.4121184852417565697562725663524351793439": +float: 1 +ifloat: 1 + +# sincos +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": +double: 1 +idouble: 1 +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res": +float: 1 +ifloat: 1 + +# sinh_downward +Test "sinh_downward (22) == 1792456423.065795780701106568345764104225": +float: 1 +ifloat: 1 +Test "sinh_downward (23) == 4872401723.124451299966006944252978187305": +float: 1 +ifloat: 1 +Test "sinh_downward (24) == 13244561064.92173614705070540368454568168": +float: 1 +ifloat: 1 + +# sinh_towardzero +Test "sinh_towardzero (22) == 1792456423.065795780701106568345764104225": +float: 1 +ifloat: 1 +Test "sinh_towardzero (23) == 4872401723.124451299966006944252978187305": +float: 1 +ifloat: 1 +Test "sinh_towardzero (24) == 13244561064.92173614705070540368454568168": +float: 1 +ifloat: 1 + +# sqrt +Test "sqrt (2) == M_SQRT2l": +ildouble: 1 +ldouble: 1 + +# tan_downward +Test "tan_downward (1) == 1.5574077246549022305069748074583601730873": +float: 1 +ifloat: 1 +Test "tan_downward (10) == 0.6483608274590866712591249330098086768169": +float: 1 +ifloat: 1 +Test "tan_downward (2) == -2.1850398632615189916433061023136825434320": +float: 1 +ifloat: 1 +Test "tan_downward (6) == -0.2910061913847491570536995888681755428312": +float: 1 +ifloat: 1 +Test "tan_downward (8) == -6.7997114552203786999252627596086333648814": +float: 1 +ifloat: 1 +Test "tan_downward (9) == -0.4523156594418098405903708757987855343087": +float: 1 +ifloat: 1 + +# tan_towardzero +Test "tan_towardzero (10) == 0.6483608274590866712591249330098086768169": +float: 1 +ifloat: 1 +Test "tan_towardzero (3) == -0.1425465430742778052956354105339134932261": +float: 1 +ifloat: 1 +Test "tan_towardzero (4) == 1.1578212823495775831373424182673239231198": +float: 1 +ifloat: 1 +Test "tan_towardzero (5) == -3.3805150062465856369827058794473439087096": +float: 1 +ifloat: 1 +Test "tan_towardzero (9) == -0.4523156594418098405903708757987855343087": +float: 1 ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -ildouble: 1 -ldouble: 1 -# log10 -Test "log10 (0.75) == -0.124938736608299953132449886193870744": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -Test "log10 (e) == log10(e)": +# tan_upward +Test "tan_upward (1) == 1.5574077246549022305069748074583601730873": float: 1 ifloat: 1 -ildouble: 1 -ldouble: 1 - -# log1p -Test "log1p (-0.25) == -0.287682072451780927439219005993827432": +Test "tan_upward (10) == 0.6483608274590866712591249330098086768169": float: 1 ifloat: 1 - -# log2 -Test "log2 (0.75) == -.415037499278843818546261056052183492": -ildouble: 1 -ldouble: 1 - -# sincos -Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": -double: 1 -idouble: 1 -ildouble: 1 -ldouble: 1 -Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res": -double: 1 +Test "tan_upward (3) == -0.1425465430742778052956354105339134932261": float: 1 -idouble: 1 ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res": +Test "tan_upward (5) == -3.3805150062465856369827058794473439087096": float: 1 ifloat: 1 -# sqrt -Test "sqrt (2) == M_SQRT2l": -ildouble: 1 -ldouble: 1 - # tanh Test "tanh (-0.75) == -0.635148952387287319214434357312496495": ildouble: 1 @@ -773,6 +2023,16 @@ ildouble: 1 ldouble: 1 # y0 +Test "y0 (0x1.3ffp+74) == 1.818984347516051243459467456433028748678e-12": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "y0 (0x1.ff00000000002p+840) == 1.846591691699331493194965158699937660696e-127": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 Test "y0 (1.0) == 0.0882569642156769579829267660235151628": double: 2 float: 1 @@ -803,6 +2063,12 @@ idouble: 1 Test "y1 (0.75) == -1.03759455076928541973767132140642198": ildouble: 1 ldouble: 1 +Test "y1 (0x1.001000001p+593) == 3.927269966354206207832593635798954916263e-90": +ildouble: 1 +ldouble: 1 +Test "y1 (0x1.27e204p+99) == -8.881610148467797208469612080785210013461e-16": +double: 1 +idouble: 1 Test "y1 (1.5) == -0.412308626973911295952829820633445323": float: 1 ifloat: 1 @@ -932,6 +2198,34 @@ double: 1 idouble: 1 # Maximal error of functions: +Function: "acos_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "acos_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "asin_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "asin_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "asin_upward": +float: 1 +ifloat: 1 + Function: "atan2": float: 1 ifloat: 1 @@ -942,12 +2236,32 @@ Function: "atanh": float: 1 ifloat: 1 +Function: Real part of "cacos": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + Function: Imaginary part of "cacos": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 3 +ldouble: 3 + +Function: Real part of "cacosh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 ildouble: 1 ldouble: 1 Function: Imaginary part of "cacosh": +double: 1 float: 1 +idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 @@ -959,8 +2273,12 @@ idouble: 1 ifloat: 1 Function: Imaginary part of "casin": -ildouble: 1 -ldouble: 1 +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 3 +ldouble: 3 Function: Real part of "casinh": double: 5 @@ -1011,7 +2329,9 @@ ildouble: 1 ldouble: 1 Function: Imaginary part of "ccos": +double: 1 float: 1 +idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 @@ -1025,31 +2345,41 @@ ildouble: 1 ldouble: 1 Function: Imaginary part of "ccosh": +double: 1 float: 1 +idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 Function: Real part of "cexp": +double: 2 float: 1 +idouble: 2 ifloat: 1 ildouble: 1 ldouble: 1 Function: Imaginary part of "cexp": -float: 1 -ifloat: 1 +double: 1 +float: 2 +idouble: 1 +ifloat: 2 ildouble: 1 ldouble: 1 Function: Real part of "clog": +double: 1 float: 1 +idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 Function: Real part of "clog10": +double: 1 float: 1 +idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 @@ -1070,13 +2400,49 @@ ifloat: 1 ildouble: 1 ldouble: 1 +Function: "cos_downward": +float: 1 +ifloat: 1 + +Function: "cos_tonearest": +float: 1 +ifloat: 1 + +Function: "cos_towardzero": +float: 1 +ifloat: 1 + +Function: "cos_upward": +float: 2 +ifloat: 2 + +Function: "cosh_downward": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "cosh_tonearest": +ildouble: 1 +ldouble: 1 + +Function: "cosh_towardzero": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "cosh_upward": +ildouble: 1 +ldouble: 1 + Function: Real part of "cpow": double: 2 float: 4 idouble: 2 ifloat: 4 -ildouble: 10 -ldouble: 10 +ildouble: 11 +ldouble: 11 Function: Imaginary part of "cpow": double: 2 @@ -1087,6 +2453,10 @@ ildouble: 1 ldouble: 1 Function: Real part of "csin": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 ildouble: 1 ldouble: 1 @@ -1105,20 +2475,32 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: Real part of "csqrt": +double: 1 float: 1 +idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 Function: Imaginary part of "csqrt": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 ildouble: 1 ldouble: 1 Function: Real part of "ctan": -ildouble: 1 -ldouble: 1 +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 Function: Imaginary part of "ctan": double: 1 @@ -1128,17 +2510,19 @@ ldouble: 2 Function: Real part of "ctanh": double: 1 -float: 2 +float: 1 idouble: 1 -ifloat: 2 -ildouble: 1 -ldouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 Function: Imaginary part of "ctanh": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 2 +ldouble: 2 Function: "erf": double: 1 @@ -1146,21 +2530,33 @@ idouble: 1 Function: "erfc": double: 1 +float: 1 idouble: 1 +ifloat: 1 ildouble: 1 ldouble: 1 Function: "exp10": -double: 6 -float: 2 -idouble: 6 -ifloat: 2 +double: 1 +idouble: 1 ildouble: 1 ldouble: 1 Function: "exp2": -ildouble: 2 -ldouble: 2 +ildouble: 1 +ldouble: 1 + +Function: "exp_downward": +float: 1 +ifloat: 1 + +Function: "exp_towardzero": +float: 1 +ifloat: 1 + +Function: "exp_upward": +float: 1 +ifloat: 1 Function: "expm1": double: 1 @@ -1199,8 +2595,8 @@ double: 4 float: 5 idouble: 4 ifloat: 5 -ildouble: 4 -ldouble: 4 +ildouble: 8 +ldouble: 8 Function: "lgamma": double: 1 @@ -1228,6 +2624,46 @@ Function: "log2": ildouble: 1 ldouble: 1 +Function: "pow": +float: 1 +ifloat: 1 + +Function: "pow_downward": +float: 1 +ifloat: 1 + +Function: "pow_towardzero": +float: 1 +ifloat: 1 + +Function: "pow_upward": +float: 1 +ifloat: 1 + +Function: "sin_downward": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "sin_tonearest": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "sin_towardzero": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "sin_upward": +float: 2 +ifloat: 2 +ildouble: 1 +ldouble: 1 + Function: "sincos": double: 1 float: 1 @@ -1236,6 +2672,14 @@ ifloat: 1 ildouble: 1 ldouble: 1 +Function: "sinh_downward": +float: 1 +ifloat: 1 + +Function: "sinh_towardzero": +float: 1 +ifloat: 1 + Function: "sqrt": ildouble: 1 ldouble: 1 @@ -1244,6 +2688,18 @@ Function: "tan": double: 1 idouble: 1 +Function: "tan_downward": +float: 1 +ifloat: 1 + +Function: "tan_towardzero": +float: 1 +ifloat: 1 + +Function: "tan_upward": +float: 1 +ifloat: 1 + Function: "tanh": ildouble: 1 ldouble: 1 From 13488b2eaec9f589e488765687e131ec7c321c8f Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 30 May 2012 20:53:54 -0700 Subject: [PATCH 4456/4487] alpha: Fix error path for PIC __brk --- ChangeLog.alpha | 2 ++ sysdeps/unix/sysv/linux/alpha/brk.S | 32 ++++++++++++++++------------- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 3366261d1c..72e102ac8a 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,5 +1,7 @@ 2012-05-30 Richard Henderson + * sysdeps/unix/sysv/linux/alpha/brk.S: Fix error path for PIC. + * sysdeps/alpha/fpu/libm-test-ulps: Regenerate. * sysdeps/unix/sysv/linux/alpha/syscalls.list: Remove diff --git a/sysdeps/unix/sysv/linux/alpha/brk.S b/sysdeps/unix/sysv/linux/alpha/brk.S index 826d7374f9..cb759dbe9f 100644 --- a/sysdeps/unix/sysv/linux/alpha/brk.S +++ b/sysdeps/unix/sysv/linux/alpha/brk.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe , 1993. @@ -36,16 +36,22 @@ __curbrk: .skip 8 #endif .text -LEAF(__brk, 8) + .align 4 + .globl __brk + .ent __brk + .usepv __brk, std + + cfi_startproc +__brk: ldgp gp, 0(t12) - subq sp, 8, sp + subq sp, 16, sp + cfi_adjust_cfa_offset (16) #ifdef PROF .set noat lda AT, _mcount jsr AT, (AT), _mcount .set at #endif - .prologue 1 /* Save the requested brk across the system call. */ stq a0, 0(sp) @@ -54,27 +60,25 @@ LEAF(__brk, 8) call_pal PAL_callsys ldq a0, 0(sp) + addq sp, 16, sp + cfi_adjust_cfa_offset (-16) /* Be prepared for an OSF-style brk. */ - bne a3, $err1 + bne a3, SYSCALL_ERROR_LABEL beq v0, $ok /* Correctly handle the brk(0) query case. */ cmoveq a0, v0, a0 xor a0, v0, t0 - bne t0, $err0 + lda v0, ENOMEM + bne t0, SYSCALL_ERROR_LABEL /* Update __curbrk and return cleanly. */ - mov zero, v0 + lda v0, 0 $ok: stq a0, __curbrk - addq sp, 8, sp ret - /* What a horrible way to die. */ -$err0: ldi v0, ENOMEM -$err1: addq sp, 8, sp - SYSCALL_ERROR_HANDLER - - END(__brk) +PSEUDO_END(__brk) + cfi_endproc weak_alias (__brk, brk) From 8cac0ece48d57be4397e2ef3f124690391b7a6d5 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 30 May 2012 20:55:56 -0700 Subject: [PATCH 4457/4487] alpha: Add -mieee-with-inexact for fma compilation --- ChangeLog.alpha | 4 ++++ sysdeps/alpha/Makefile | 6 ++++++ sysdeps/alpha/fpu/libm-test-ulps | 14 -------------- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 72e102ac8a..48f3b97056 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,5 +1,9 @@ 2012-05-30 Richard Henderson + * sysdeps/alpha/Makefile (CFLAGS-s_fma.c): Set -mieee-with-inexact. + (CFLAGS-s_fmaf.c): Likewise. + * sysdeps/alpha/fpu/libm-test-ulps: Regenerate. + * sysdeps/unix/sysv/linux/alpha/brk.S: Fix error path for PIC. * sysdeps/alpha/fpu/libm-test-ulps: Regenerate. diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile index b08f69d997..17fd3b84d7 100644 --- a/sysdeps/alpha/Makefile +++ b/sysdeps/alpha/Makefile @@ -37,6 +37,12 @@ ifeq ($(subdir),elf) CFLAGS-rtld.c = -mbuild-constants endif +ifeq ($(subdir),math) +# The fma routines rely on inexact being raised for correct results. +CFLAGS-s_fma.c = -mieee-with-inexact +CFLAGS-s_fmaf.c = -mieee-with-inexact +endif + # Build everything with full IEEE math support, and with dynamic rounding; # there are a number of math routines that are defined to work with the # "current" rounding mode, and it's easiest to set this with all of them. diff --git a/sysdeps/alpha/fpu/libm-test-ulps b/sysdeps/alpha/fpu/libm-test-ulps index 39884260a8..908154c4e8 100644 --- a/sysdeps/alpha/fpu/libm-test-ulps +++ b/sysdeps/alpha/fpu/libm-test-ulps @@ -1615,20 +1615,6 @@ Test "expm1 (500.0) == 1.4035922178528374107397703328409120821806e+217": double: 1 idouble: 1 -# fma -Test "fma (-0x1.19cab66d73e17p-959, 0x1.c7108a8c5ff51p-107, -0x0.80b0ad65d9b64p-1022) == -0x0.80b0ad65d9d59p-1022": -double: 1 -idouble: 1 -Test "fma (0x1.0000002p+0, 0x1.ffffffcp-1, -0x1p-300) == 0x1.fffffffffffffp-1": -double: 1 -idouble: 1 -Test "fma (0x1.153d650bb9f06p-907, 0x1.2d01230d48407p-125, -0x0.b278d5acfc3cp-1022) == -0x0.b22757123bbe9p-1022": -double: 1 -idouble: 1 -Test "fma (0x1.4000004p-967, 0x1p-106, 0x0.000001p-1022) == 0x0.0000010000003p-1022": -double: 1 -idouble: 1 - # gamma Test "gamma (-0.5) == log(2*sqrt(pi))": ildouble: 1 From 5faedd6f22e653a2a447623a6b1124ef144ad0a5 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 31 May 2012 16:56:38 +0000 Subject: [PATCH 4458/4487] Regenerate powerpc-nofpu libm-test-ulps. --- ChangeLog.powerpc | 4 + sysdeps/powerpc/nofpu/libm-test-ulps | 2309 ++++++++++++++++++++------ 2 files changed, 1840 insertions(+), 473 deletions(-) diff --git a/ChangeLog.powerpc b/ChangeLog.powerpc index 1f7ac977a0..ee958ebc9e 100644 --- a/ChangeLog.powerpc +++ b/ChangeLog.powerpc @@ -1,3 +1,7 @@ +2012-05-31 Joseph Myers + + * sysdeps/powerpc/nofpu/libm-test-ulps: Regenerated. + 2012-05-30 Joseph Myers * sysdeps/powerpc/soft-fp/sfp-machine.h (FP_EX_DENORM): Remove. diff --git a/sysdeps/powerpc/nofpu/libm-test-ulps b/sysdeps/powerpc/nofpu/libm-test-ulps index 4d6b48a66a..651692a421 100644 --- a/sysdeps/powerpc/nofpu/libm-test-ulps +++ b/sysdeps/powerpc/nofpu/libm-test-ulps @@ -1,58 +1,32 @@ # Begin of automatic generation # acos -Test "acos (2e-17) == 1.57079632679489659923132169163975144": +Test "acos (-0x0.ffffffff8p0) == 3.1415773948007305904329067627145550395696": ildouble: 1 ldouble: 1 - -# asin -Test "asin (0.75) == 0.848062078981481008052944338998418080": -ildouble: 2 -ldouble: 2 - -# atan2 -Test "atan2 (-0.00756827042671106339, -.001792735857538728036) == -1.80338464113663849327153994379639112": +Test "acos (-0x0.ffffffp0) == 3.1412473866050770348750401337968641476999": ildouble: 1 ldouble: 1 -Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025": -float: 3 -ifloat: 3 -Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025": -float: 3 -ifloat: 3 -Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772": -float: 1 -ifloat: 1 +Test "acos (2e-17) == 1.57079632679489659923132169163975144": ildouble: 1 ldouble: 1 -# atanh -Test "atanh (0.75) == 0.972955074527656652552676371721589865": +# acos_downward +Test "acos_downward (-0) == pi/2": float: 1 ifloat: 1 - -# cabs -Test "cabs (0.75 + 1.25 i) == 1.45773797371132511771853821938639577": +Test "acos_downward (-0.5) == M_PI_6l*4.0": +double: 1 +idouble: 1 ildouble: 1 ldouble: 1 - -# cacosh -Test "Real part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": -double: 1 +Test "acos_downward (-1) == pi": float: 1 -idouble: 1 ifloat: 1 -Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": -double: 1 +Test "acos_downward (0) == pi/2": float: 1 -idouble: 1 ifloat: 1 - -# casin -Test "Real part of: casin (-2 - 3 i) == -0.57065278432109940071028387968566963 - 1.9833870299165354323470769028940395 i": -ildouble: 1 -ldouble: 1 -Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": +Test "acos_downward (0.5) == M_PI_6l*2.0": double: 1 float: 1 idouble: 1 @@ -60,634 +34,1796 @@ ifloat: 1 ildouble: 1 ldouble: 1 -# casinh -Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": -double: 5 +# acos_towardzero +Test "acos_towardzero (-0) == pi/2": float: 1 -idouble: 5 ifloat: 1 -ildouble: 4 -ldouble: 4 -Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": -double: 3 -float: 6 -idouble: 3 -ifloat: 6 +Test "acos_towardzero (-0.5) == M_PI_6l*4.0": +double: 1 +idouble: 1 ildouble: 1 ldouble: 1 -Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": +Test "acos_towardzero (-1) == pi": float: 1 ifloat: 1 -Test "Imaginary part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": -double: 1 +Test "acos_towardzero (0) == pi/2": float: 1 -idouble: 1 ifloat: 1 - -# catan -Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": -float: 3 -ifloat: 3 -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": +Test "acos_towardzero (0.5) == M_PI_6l*2.0": double: 1 float: 1 idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 -Test "Real part of: catan (0.75 + 1.25 i) == 1.10714871779409050301706546017853704 + 0.549306144334054845697622618461262852 i": -float: 4 -ifloat: 4 -# catanh -Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": -double: 4 -idouble: 4 -Test "Imaginary part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": -float: 4 -ifloat: 4 -Test "Real part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i": -double: 1 -idouble: 1 -Test "Imaginary part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i": -float: 6 -ifloat: 6 +# acos_upward +Test "acos_upward (-0) == pi/2": +ildouble: 2 +ldouble: 2 +Test "acos_upward (-1) == pi": +ildouble: 2 +ldouble: 2 +Test "acos_upward (0) == pi/2": +ildouble: 2 +ldouble: 2 -# cbrt -Test "cbrt (-27.0) == -3.0": +# asin +Test "asin (-0x0.ffffffff8p0) == -1.5707810680058339712015850710748035974710": +ildouble: 1 +ldouble: 1 +Test "asin (-0x0.ffffffp0) == -1.5704510598101804156437184421571127056013": +ildouble: 1 +ldouble: 1 +Test "asin (0.75) == 0.848062078981481008052944338998418080": +ildouble: 2 +ldouble: 2 +Test "asin (0x0.ffffffff8p0) == 1.5707810680058339712015850710748035974710": +ildouble: 1 +ldouble: 1 +Test "asin (0x0.ffffffp0) == 1.5704510598101804156437184421571127056013": +ildouble: 1 +ldouble: 1 + +# asin_downward +Test "asin_downward (-0.5) == -pi/6": double: 1 idouble: 1 -Test "cbrt (0.75) == 0.908560296416069829445605878163630251": +ildouble: 1 +ldouble: 1 +Test "asin_downward (-1.0) == -pi/2": +ildouble: 1 +ldouble: 1 +Test "asin_downward (0.5) == pi/6": double: 1 idouble: 1 -Test "cbrt (0.9921875) == 0.997389022060725270579075195353955217": +ildouble: 1 +ldouble: 1 +Test "asin_downward (1.0) == pi/2": +float: 1 +ifloat: 1 + +# asin_towardzero +Test "asin_towardzero (-0.5) == -pi/6": double: 1 idouble: 1 - -# ccos -Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i": +ildouble: 1 +ldouble: 1 +Test "asin_towardzero (-1.0) == -pi/2": float: 1 ifloat: 1 -Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": +Test "asin_towardzero (0.5) == pi/6": double: 1 -float: 1 idouble: 1 +ildouble: 1 +ldouble: 1 +Test "asin_towardzero (1.0) == pi/2": +float: 1 ifloat: 1 -Test "Imaginary part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": + +# asin_upward +Test "asin_upward (-1.0) == -pi/2": float: 1 ifloat: 1 +Test "asin_upward (1.0) == pi/2": +ildouble: 1 +ldouble: 1 -# ccosh -Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": +# atan2 +Test "atan2 (-0.00756827042671106339, -.001792735857538728036) == -1.80338464113663849327153994379639112": +ildouble: 1 +ldouble: 1 +Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025": float: 1 ifloat: 1 -Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": +Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025": float: 1 ifloat: 1 -Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": -double: 1 +Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772": float: 1 -idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 -Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": -float: 1 -ifloat: 1 -ildouble: 2 -ldouble: 2 -# cexp -Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": +# atanh +Test "atanh (0.75) == 0.972955074527656652552676371721589865": float: 1 ifloat: 1 -Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": + +# cabs +Test "cabs (0.75 + 1.25 i) == 1.45773797371132511771853821938639577": +ildouble: 1 +ldouble: 1 + +# cacos +Test "Imaginary part of: cacos (+0 + 0.5 i) == pi/2 - 0.4812118250596034474977589134243684231352 i": +double: 2 float: 1 +idouble: 2 ifloat: 1 ildouble: 2 ldouble: 2 -Test "Imaginary part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": +Test "Imaginary part of: cacos (+0 + 1.0 i) == pi/2 - 0.8813735870195430252326093249797923090282 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 ildouble: 1 ldouble: 1 - -# clog -Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i": -float: 3 -ifloat: 3 +Test "Imaginary part of: cacos (+0 + 1.5 i) == pi/2 - 1.194763217287109304111930828519090523536 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 ildouble: 1 ldouble: 1 -Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i": +Test "Imaginary part of: cacos (+0 - 0.5 i) == pi/2 + 0.4812118250596034474977589134243684231352 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (+0 - 1.0 i) == pi/2 + 0.8813735870195430252326093249797923090282 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: cacos (+0 - 1.5 i) == pi/2 + 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cacos (-0 + 0.5 i) == pi/2 - 0.4812118250596034474977589134243684231352 i": +double: 2 float: 1 +idouble: 2 ifloat: 1 ildouble: 2 ldouble: 2 -Test "Imaginary part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i": +Test "Imaginary part of: cacos (-0 + 1.0 i) == pi/2 - 0.8813735870195430252326093249797923090282 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 ildouble: 1 ldouble: 1 - -# clog10 -Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i": +Test "Imaginary part of: cacos (-0 + 1.5 i) == pi/2 - 1.194763217287109304111930828519090523536 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0 - 0.5 i) == pi/2 + 0.4812118250596034474977589134243684231352 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-0 - 1.0 i) == pi/2 + 0.8813735870195430252326093249797923090282 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i": +Test "Imaginary part of: cacos (-0 - 1.5 i) == pi/2 + 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cacos (-1.5 + +0 i) == pi - 0.9624236501192068949955178268487368462704 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i": +Test "Real part of: cacos (0.5 + +0 i) == 1.047197551196597746154214461093167628066 - 0 i": double: 1 -float: 5 idouble: 1 -ifloat: 5 ildouble: 1 ldouble: 1 -Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i": +Test "Real part of: cacos (0.5 - 0 i) == 1.047197551196597746154214461093167628066 + +0 i": double: 1 -float: 1 idouble: 1 -ifloat: 1 ildouble: 1 ldouble: 1 -Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i": +Test "Imaginary part of: cacos (1.5 + +0 i) == +0 - 0.9624236501192068949955178268487368462704 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i": -double: 1 + +# cacosh +Test "Real part of: cacosh (+0 + 0.5 i) == 0.4812118250596034474977589134243684231352 + pi/2 i": float: 1 -idouble: 1 ifloat: 1 -Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i": +Test "Real part of: cacosh (+0 + 1.0 i) == 0.8813735870195430252326093249797923090282 + pi/2 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Imaginary part of: clog10 (-inf + inf i) == inf + 3/4 pi*log10(e) i": +Test "Real part of: cacosh (+0 + 1.5 i) == 1.194763217287109304111930828519090523536 + pi/2 i": double: 1 idouble: 1 -Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i": -double: 1 +Test "Real part of: cacosh (+0 - 0.5 i) == 0.4812118250596034474977589134243684231352 - pi/2 i": float: 1 -idouble: 1 ifloat: 1 -Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i": +Test "Real part of: cacosh (+0 - 1.0 i) == 0.8813735870195430252326093249797923090282 - pi/2 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i": +Test "Real part of: cacosh (+0 - 1.5 i) == 1.194763217287109304111930828519090523536 - pi/2 i": double: 1 -float: 1 idouble: 1 +Test "Real part of: cacosh (-0 + 0.5 i) == 0.4812118250596034474977589134243684231352 + pi/2 i": +float: 1 ifloat: 1 -Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i": +Test "Real part of: cacosh (-0 + 1.0 i) == 0.8813735870195430252326093249797923090282 + pi/2 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i": +Test "Real part of: cacosh (-0 + 1.5 i) == 1.194763217287109304111930828519090523536 + pi/2 i": +double: 1 +idouble: 1 +Test "Real part of: cacosh (-0 - 0.5 i) == 0.4812118250596034474977589134243684231352 - pi/2 i": float: 1 ifloat: 1 -ildouble: 3 -ldouble: 3 -Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i": +Test "Real part of: cacosh (-0 - 1.0 i) == 0.8813735870195430252326093249797923090282 - pi/2 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i": +Test "Real part of: cacosh (-0 - 1.5 i) == 1.194763217287109304111930828519090523536 - pi/2 i": double: 1 -float: 1 idouble: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i": +Test "Imaginary part of: cacosh (-0.5 + +0 i) == +0 + 2.094395102393195492308428922186335256131 i": double: 1 -float: 1 idouble: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i": +Test "Imaginary part of: cacosh (-0.5 - 0 i) == +0 - 2.094395102393195492308428922186335256131 i": double: 1 -float: 1 idouble: 1 +Test "Real part of: cacosh (-1.5 + +0 i) == 0.9624236501192068949955178268487368462704 + pi i": +float: 1 ifloat: 1 - -# cos -Test "cos (M_PI_6l * 2.0) == 0.5": -double: 1 +Test "Real part of: cacosh (-1.5 - 0 i) == 0.9624236501192068949955178268487368462704 - pi i": float: 1 -idouble: 1 ifloat: 1 -Test "cos (M_PI_6l * 4.0) == -0.5": -double: 2 +Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": float: 1 -idouble: 2 ifloat: 1 -Test "cos (pi/2) == 0": -double: 1 +Test "Real part of: cacosh (1.5 + +0 i) == 0.9624236501192068949955178268487368462704 + +0 i": float: 1 -idouble: 1 ifloat: 1 - -# cpow -Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": +Test "Real part of: cacosh (1.5 - 0 i) == 0.9624236501192068949955178268487368462704 - 0 i": float: 1 ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": + +# casin +Test "Imaginary part of: casin (+0 + 0.5 i) == +0 + 0.4812118250596034474977589134243684231352 i": +double: 2 float: 1 +idouble: 2 ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i": -double: 1 -float: 4 -idouble: 1 -ifloat: 4 -Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i": -ildouble: 1 -ldouble: 1 -Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i": ildouble: 2 ldouble: 2 -Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i": +Test "Imaginary part of: casin (+0 + 1.0 i) == +0 + 0.8813735870195430252326093249797923090282 i": double: 2 -float: 3 +float: 1 idouble: 2 -ifloat: 3 +ifloat: 1 ildouble: 1 ldouble: 1 -Test "Real part of: cpow (2 + 0 i, 10 + 0 i) == 1024.0 + 0.0 i": +Test "Imaginary part of: casin (+0 + 1.5 i) == +0 + 1.194763217287109304111930828519090523536 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 ildouble: 1 ldouble: 1 -Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": +Test "Imaginary part of: casin (+0 - 0.5 i) == +0 - 0.4812118250596034474977589134243684231352 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: casin (+0 - 1.0 i) == +0 - 0.8813735870195430252326093249797923090282 i": double: 1 -float: 4 +float: 1 idouble: 1 -ifloat: 4 -Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": -float: 2 -ifloat: 2 -ildouble: 2 -ldouble: 2 -Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i": +ifloat: 1 +Test "Imaginary part of: casin (+0 - 1.5 i) == +0 - 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +Test "Imaginary part of: casin (-0 + 0.5 i) == -0 + 0.4812118250596034474977589134243684231352 i": double: 2 -float: 2 +float: 1 idouble: 2 -ifloat: 2 +ifloat: 1 ildouble: 2 ldouble: 2 - -# csinh -Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i": -double: 1 -idouble: 1 -ildouble: 1 -ldouble: 1 -Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": +Test "Imaginary part of: casin (-0 + 1.0 i) == -0 + 0.8813735870195430252326093249797923090282 i": +double: 2 float: 1 +idouble: 2 ifloat: 1 ildouble: 1 ldouble: 1 -Test "Imaginary part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": +Test "Imaginary part of: casin (-0 + 1.5 i) == -0 + 1.194763217287109304111930828519090523536 i": +double: 2 float: 1 +idouble: 2 ifloat: 1 ildouble: 1 ldouble: 1 - -# csqrt -Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": +Test "Imaginary part of: casin (-0 - 0.5 i) == -0 - 0.4812118250596034474977589134243684231352 i": float: 1 ifloat: 1 -Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i": -float: 1 -ifloat: 1 - -# ctan -Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": +Test "Imaginary part of: casin (-0 - 1.0 i) == -0 - 0.8813735870195430252326093249797923090282 i": double: 1 +float: 1 idouble: 1 -Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i": +ifloat: 1 +Test "Imaginary part of: casin (-0 - 1.5 i) == -0 - 1.194763217287109304111930828519090523536 i": double: 1 idouble: 1 - -# ctanh -Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": +Test "Imaginary part of: casin (-1.5 + +0 i) == -pi/2 + 0.9624236501192068949955178268487368462704 i": double: 1 -float: 2 -idouble: 1 -ifloat: 2 -Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i": float: 1 -ifloat: 1 -Test "Real part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i": -double: 1 idouble: 1 +ifloat: 1 +Test "Real part of: casin (-2 - 3 i) == -0.57065278432109940071028387968566963 - 1.9833870299165354323470769028940395 i": ildouble: 1 ldouble: 1 - -# erf -Test "erf (1.25) == 0.922900128256458230136523481197281140": +Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: casin (1.5 + +0 i) == pi/2 + 0.9624236501192068949955178268487368462704 i": double: 1 +float: 1 idouble: 1 +ifloat: 1 -# erfc -Test "erfc (2.0) == 0.00467773498104726583793074363274707139": +# casinh +Test "Real part of: casinh (-0 + 1.5 i) == -0.9624236501192068949955178268487368462704 + pi/2 i": double: 1 +float: 1 idouble: 1 -Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8": +ifloat: 1 +Test "Real part of: casinh (-0 - 1.5 i) == -0.9624236501192068949955178268487368462704 - pi/2 i": double: 1 +float: 1 idouble: 1 - -# exp -Test "exp (0.75) == 2.11700001661267466854536981983709561": +ifloat: 1 +Test "Real part of: casinh (-0.5 + +0 i) == -0.4812118250596034474977589134243684231352 + +0 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "Real part of: casinh (-0.5 - 0 i) == -0.4812118250596034474977589134243684231352 - 0 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "Real part of: casinh (-1.0 + +0 i) == -0.8813735870195430252326093249797923090282 + +0 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 ildouble: 1 ldouble: 1 -Test "exp (50.0) == 5184705528587072464087.45332293348538": +Test "Real part of: casinh (-1.0 - 0 i) == -0.8813735870195430252326093249797923090282 - 0 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 ildouble: 1 ldouble: 1 - -# exp10 -Test "exp10 (-1) == 0.1": +Test "Real part of: casinh (-1.5 + +0 i) == -1.194763217287109304111930828519090523536 + +0 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-1.5 - 0 i) == -1.194763217287109304111930828519090523536 - 0 i": double: 2 float: 1 idouble: 2 ifloat: 1 ildouble: 1 ldouble: 1 -Test "exp10 (0.75) == 5.62341325190349080394951039776481231": +Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": +double: 5 +float: 1 +idouble: 5 +ifloat: 1 +ildouble: 4 +ldouble: 4 +Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": +double: 3 +float: 6 +idouble: 3 +ifloat: 6 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (0.5 + +0 i) == 0.4812118250596034474977589134243684231352 + +0 i": +float: 1 +ifloat: 1 +Test "Real part of: casinh (0.5 - 0 i) == 0.4812118250596034474977589134243684231352 - 0 i": +float: 1 +ifloat: 1 +Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casinh (1.0 + +0 i) == 0.8813735870195430252326093249797923090282 + +0 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casinh (1.0 - 0 i) == 0.8813735870195430252326093249797923090282 - 0 i": double: 1 float: 1 idouble: 1 ifloat: 1 +Test "Real part of: casinh (1.5 + +0 i) == 1.194763217287109304111930828519090523536 + +0 i": +double: 1 +idouble: 1 +Test "Real part of: casinh (1.5 - 0 i) == 1.194763217287109304111930828519090523536 - 0 i": +double: 1 +idouble: 1 + +# catan +Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": ildouble: 1 ldouble: 1 -Test "exp10 (3) == 1000": -double: 6 -float: 2 -idouble: 6 -ifloat: 2 -ildouble: 8 -ldouble: 8 +Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 -# exp2 -Test "exp2 (10) == 1024": -ildouble: 2 -ldouble: 2 +# catanh +Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": +double: 4 +idouble: 4 +Test "Real part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i": +double: 1 +idouble: 1 -# expm1 -Test "expm1 (0.75) == 1.11700001661267466854536981983709561": +# cbrt +Test "cbrt (-27.0) == -3.0": double: 1 idouble: 1 -Test "expm1 (1) == M_El - 1.0": +Test "cbrt (0.75) == 0.908560296416069829445605878163630251": +double: 1 +idouble: 1 +Test "cbrt (0.9921875) == 0.997389022060725270579075195353955217": double: 1 -float: 1 idouble: 1 -ifloat: 1 -# hypot -Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271": +# ccos +Test "Imaginary part of: ccos (-0.75 + 710.5 i) == 1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ccos (-0.75 + 89.5 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": float: 1 ifloat: 1 -Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271": +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: ccos (-0.75 - 710.5 i) == 1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ccos (-0.75 - 89.5 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": float: 1 ifloat: 1 -Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271": +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i": float: 1 ifloat: 1 -Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271": +Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": +double: 1 float: 1 +idouble: 1 ifloat: 1 -Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271": +Test "Imaginary part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": float: 1 ifloat: 1 -Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271": +Test "Imaginary part of: ccos (0.75 + 710.5 i) == 1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ccos (0.75 + 89.5 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": float: 1 ifloat: 1 -Test "hypot (0.75, 1.25) == 1.45773797371132511771853821938639577": -ildouble: 1 -ldouble: 1 -Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271": +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: ccos (0.75 - 710.5 i) == 1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ccos (0.75 - 89.5 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": float: 1 ifloat: 1 -Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271": +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: ccos (0x1p-1074 + 1440 i) == inf - 5.981479269486130556466515778180916082415e301 i": +double: 1 +idouble: 1 + +# ccosh +Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": float: 1 ifloat: 1 - -# j0 -Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1": -double: 1 +Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": float: 1 -idouble: 1 ifloat: 1 -Test "j0 (0.75) == 0.864242275166648623555731103820923211": +Test "Imaginary part of: ccosh (-710.5 + 0.75 i) == 1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ccosh (-710.5 - 0.75 i) == 1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ccosh (-89.5 + 0.75 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": float: 1 ifloat: 1 -Test "j0 (10.0) == -0.245935764451348335197760862485328754": -double: 2 +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: ccosh (-89.5 - 0.75 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": float: 1 -idouble: 2 ifloat: 1 -Test "j0 (2.0) == 0.223890779141235668051827454649948626": -float: 2 -ifloat: 2 -Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1": +ildouble: 2 +ldouble: 2 +Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "j0 (8.0) == 0.171650807137553906090869407851972001": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: ccosh (1440 + 0x1p-1074 i) == inf + 5.981479269486130556466515778180916082415e301 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ccosh (710.5 + 0.75 i) == 1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ccosh (710.5 - 0.75 i) == 1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ccosh (89.5 + 0.75 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: ccosh (89.5 - 0.75 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +# cexp +Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cexp (-95 + 0.75 i) == 4.039714446238306526889476684000081624047e-42 + 3.763383677300535390271646960780570275931e-42 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cexp (1440 + 0x1p-1074 i) == inf + 1.196295853897226111293303155636183216483e302 i": +double: 1 +idouble: 1 +Test "Real part of: cexp (50 + 0x1p127 i) == 4.053997150228616856622417636046265337193e21 + 3.232070315463388524466674772633810238819e21 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cexp (50 + 0x1p127 i) == 4.053997150228616856622417636046265337193e21 + 3.232070315463388524466674772633810238819e21 i": +double: 1 +idouble: 1 +ildouble: 2 +ldouble: 2 +Test "Real part of: cexp (500 + 0x1p1023 i) == -1.159886268932754433233243794561351783426e217 + 7.904017694554466595359379965081774849708e216 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cexp (500 + 0x1p1023 i) == -1.159886268932754433233243794561351783426e217 + 7.904017694554466595359379965081774849708e216 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cexp (709.8125 + 0.75 i) == 1.355121963080879535248452862759108365762e308 + 1.262426823598609432507811340856186873507e308 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cexp (709.8125 + 0.75 i) == 1.355121963080879535248452862759108365762e308 + 1.262426823598609432507811340856186873507e308 i": +double: 1 +idouble: 1 +Test "Real part of: cexp (88.75 + 0.75 i) == 2.558360358486542817001900410314204322891e38 + 2.383359453227311447654736314679677655100e38 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cexp (88.75 + 0.75 i) == 2.558360358486542817001900410314204322891e38 + 2.383359453227311447654736314679677655100e38 i": +float: 2 +ifloat: 2 + +# clog +Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: clog (0x1p-1074 + 0x1p-1074 i) == -744.0934983311012896593986823853525458290 + pi/4 i": +double: 1 +idouble: 1 +Test "Real part of: clog (0x1p-147 + 0x1p-147 i) == -101.5460619520319878296245057936228672231 + pi/4 i": +float: 1 +ifloat: 1 + +# clog10 +Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf + inf i) == inf + 3/4 pi*log10(e) i": +double: 1 +idouble: 1 +Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i": +float: 1 +ifloat: 1 +ildouble: 3 +ldouble: 3 +Test "Imaginary part of: clog10 (0x1.fffffep+127 + 0x1.fffffep+127 i) == 38.68235441693561449174780668781319348761 + pi/4*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: clog10 (0x1.fffffep+127 + 1.0 i) == 38.53183941910362389414093724045094697423 + 1.276276851248440096917018665609900318458e-39 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0x1.fffffffffffffp+1023 + 0x1.fffffffffffffp+1023 i) == 308.4052305577487344482591243175787477115 + pi/4*log10(e) i": +double: 1 +idouble: 1 +Test "Imaginary part of: clog10 (0x1p-1073 + 0x1p-1073 i) == -322.8546703496198318667349645920187712089 + pi/4*log10(e) i": +double: 1 +idouble: 1 +Test "Real part of: clog10 (0x1p-1074 + 0x1p-1074 i) == -323.1557003452838130619487034867432642357 + pi/4*log10(e) i": +double: 1 +idouble: 1 +Test "Imaginary part of: clog10 (0x1p-1074 + 0x1p-1074 i) == -323.1557003452838130619487034867432642357 + pi/4*log10(e) i": +double: 1 +idouble: 1 +Test "Imaginary part of: clog10 (0x1p-147 + 0x1p-147 i) == -44.10089436477324509881274807713822842154 + pi/4*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0x1p-149 + 0x1p-149 i) == -44.70295435610120748924022586658721447508 + pi/4*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# cos +Test "cos (M_PI_6l * 2.0) == 0.5": +double: 1 +idouble: 1 +Test "cos (M_PI_6l * 4.0) == -0.5": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + +# cos_downward +Test "cos_downward (1) == 0.5403023058681397174009366074429766037323": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_downward (10) == -0.8390715290764524522588639478240648345199": +ildouble: 1 +ldouble: 1 +Test "cos_downward (2) == -0.4161468365471423869975682295007621897660": +float: 1 +ifloat: 1 +Test "cos_downward (3) == -0.9899924966004454572715727947312613023937": +float: 1 +ifloat: 1 +Test "cos_downward (4) == -0.6536436208636119146391681830977503814241": +float: 1 +ifloat: 1 +Test "cos_downward (5) == 0.2836621854632262644666391715135573083344": +float: 1 +ifloat: 1 +Test "cos_downward (6) == 0.9601702866503660205456522979229244054519": +ildouble: 1 +ldouble: 1 +Test "cos_downward (7) == 0.7539022543433046381411975217191820122183": +float: 1 +ifloat: 1 +Test "cos_downward (8) == -0.1455000338086135258688413818311946826093": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "cos_downward (9) == -0.9111302618846769883682947111811653112463": +ildouble: 1 +ldouble: 1 + +# cos_tonearest +Test "cos_tonearest (7) == 0.7539022543433046381411975217191820122183": +float: 1 +ifloat: 1 + +# cos_towardzero +Test "cos_towardzero (1) == 0.5403023058681397174009366074429766037323": +ildouble: 1 +ldouble: 1 +Test "cos_towardzero (10) == -0.8390715290764524522588639478240648345199": +ildouble: 1 +ldouble: 1 +Test "cos_towardzero (2) == -0.4161468365471423869975682295007621897660": +float: 1 +ifloat: 1 +Test "cos_towardzero (3) == -0.9899924966004454572715727947312613023937": +float: 1 +ifloat: 1 +Test "cos_towardzero (5) == 0.2836621854632262644666391715135573083344": +float: 1 +ifloat: 1 +Test "cos_towardzero (7) == 0.7539022543433046381411975217191820122183": +float: 1 +ifloat: 1 +Test "cos_towardzero (8) == -0.1455000338086135258688413818311946826093": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +# cos_upward +Test "cos_upward (10) == -0.8390715290764524522588639478240648345199": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_upward (4) == -0.6536436208636119146391681830977503814241": +ildouble: 1 +ldouble: 1 +Test "cos_upward (5) == 0.2836621854632262644666391715135573083344": +ildouble: 1 +ldouble: 1 +Test "cos_upward (6) == 0.9601702866503660205456522979229244054519": +float: 1 +ifloat: 1 +Test "cos_upward (7) == 0.7539022543433046381411975217191820122183": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_upward (9) == -0.9111302618846769883682947111811653112463": +float: 2 +ifloat: 2 + +# cosh_downward +Test "cosh_downward (22) == 1792456423.065795780980053377632656584997": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cosh_downward (23) == 4872401723.124451300068625740569997090344": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cosh_downward (24) == 13244561064.92173614708845674912733665919": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# cosh_tonearest +Test "cosh_tonearest (24) == 13244561064.92173614708845674912733665919": +ildouble: 1 +ldouble: 1 + +# cosh_towardzero +Test "cosh_towardzero (22) == 1792456423.065795780980053377632656584997": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cosh_towardzero (23) == 4872401723.124451300068625740569997090344": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cosh_towardzero (24) == 13244561064.92173614708845674912733665919": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# cosh_upward +Test "cosh_upward (22) == 1792456423.065795780980053377632656584997": +ildouble: 2 +ldouble: 2 +Test "cosh_upward (23) == 4872401723.124451300068625740569997090344": +ildouble: 2 +ldouble: 2 +Test "cosh_upward (24) == 13244561064.92173614708845674912733665919": +ildouble: 2 +ldouble: 2 + +# cpow +Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i": +double: 1 +float: 4 +idouble: 1 +ifloat: 4 +Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i": +ildouble: 2 +ldouble: 2 +Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i": +double: 2 +float: 3 +idouble: 2 +ifloat: 3 +ildouble: 1 +ldouble: 1 +Test "Real part of: cpow (2 + 0 i, 10 + 0 i) == 1024.0 + 0.0 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": +double: 1 +float: 4 +idouble: 1 +ifloat: 4 +Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": +float: 2 +ifloat: 2 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +ildouble: 2 +ldouble: 2 + +# csin +Test "Real part of: csin (-0.75 + 710.5 i) == -1.255317763348154410745082950806112487736e308 + 1.347490911916428129246890157395342279438e308 i": +double: 1 +idouble: 1 +Test "Real part of: csin (-0.75 + 89.5 i) == -2.522786001038096774676288412995370563339e38 + 2.708024460708609732016532185663087200560e38 i": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "Real part of: csin (-0.75 - 710.5 i) == -1.255317763348154410745082950806112487736e308 - 1.347490911916428129246890157395342279438e308 i": +double: 1 +idouble: 1 +Test "Real part of: csin (-0.75 - 89.5 i) == -2.522786001038096774676288412995370563339e38 - 2.708024460708609732016532185663087200560e38 i": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "Real part of: csin (0.75 + 710.5 i) == 1.255317763348154410745082950806112487736e308 + 1.347490911916428129246890157395342279438e308 i": +double: 1 +idouble: 1 +Test "Real part of: csin (0.75 + 89.5 i) == 2.522786001038096774676288412995370563339e38 + 2.708024460708609732016532185663087200560e38 i": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "Real part of: csin (0.75 - 710.5 i) == 1.255317763348154410745082950806112487736e308 - 1.347490911916428129246890157395342279438e308 i": +double: 1 +idouble: 1 +Test "Real part of: csin (0.75 - 89.5 i) == 2.522786001038096774676288412995370563339e38 - 2.708024460708609732016532185663087200560e38 i": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "Real part of: csin (0x1p-1074 + 1440 i) == 5.981479269486130556466515778180916082415e301 + inf i": +double: 1 +idouble: 1 + +# csinh +Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csinh (-710.5 + 0.75 i) == -1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: csinh (-710.5 - 0.75 i) == -1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: csinh (-89.5 + 0.75 i) == -2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: csinh (-89.5 - 0.75 i) == -2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: csinh (1440 + 0x1p-1074 i) == inf + 5.981479269486130556466515778180916082415e301 i": +double: 1 +idouble: 1 +Test "Imaginary part of: csinh (710.5 + 0.75 i) == 1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: csinh (710.5 - 0.75 i) == 1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i": +double: 1 +idouble: 1 +Test "Imaginary part of: csinh (89.5 + 0.75 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: csinh (89.5 - 0.75 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +# csqrt +Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": +float: 1 +ifloat: 1 +Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: csqrt (0x1.fffffep+127 + 1.0 i) == 1.844674352395372953599975585936590505260e+19 + 2.710505511993121390769065968615872097053e-20 i": +float: 1 +ifloat: 1 +Test "Real part of: csqrt (0x1.fffffffffffffp+1023 + 0x1.fffffffffffffp+1023 i) == 1.473094556905565378990473658199034571917e+154 + 6.101757441282702188537080005372547713595e+153 i": +double: 1 +idouble: 1 +Test "Imaginary part of: csqrt (0x1.fffffffffffffp+1023 + 0x1.fffffffffffffp+1023 i) == 1.473094556905565378990473658199034571917e+154 + 6.101757441282702188537080005372547713595e+153 i": +double: 1 +idouble: 1 +Test "Imaginary part of: csqrt (0x1.fffffffffffffp+1023 + 0x1p+1023 i) == 1.379778091031440685006200821918878702861e+154 + 3.257214233483129514781233066898042490248e+153 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +# ctan +Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: ctan (0x1p1023 + 1 i) == -0.2254627924997545057926782581695274244229 + 0.8786063118883068695462540226219865087189 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ctan (0x1p127 + 1 i) == 0.2446359391192790896381501310437708987204 + 0.9101334047676183761532873794426475906201 i": +double: 1 +idouble: 1 +Test "Real part of: ctan (0x3.243f6cp-1 + 0 i) == -2.287733242885645987394874673945769518150e7 + 0.0 i": +float: 1 +ifloat: 1 +Test "Real part of: ctan (1 + 47 i) == 2.729321264492904590777293425576722354636e-41 + 1.0 i": +ildouble: 2 +ldouble: 2 + +# ctanh +Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: ctanh (0 + 0x3.243f6cp-1 i) == 0.0 - 2.287733242885645987394874673945769518150e7 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i": +float: 2 +ifloat: 2 +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: ctanh (1 + 0x1p1023 i) == 0.8786063118883068695462540226219865087189 - 0.2254627924997545057926782581695274244229 i": +double: 1 +idouble: 1 +Test "Real part of: ctanh (1 + 0x1p127 i) == 0.9101334047676183761532873794426475906201 + 0.2446359391192790896381501310437708987204 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ctanh (47 + 1 i) == 1.0 + 2.729321264492904590777293425576722354636e-41 i": +ildouble: 2 +ldouble: 2 + +# erf +Test "erf (1.25) == 0.922900128256458230136523481197281140": +double: 1 +idouble: 1 + +# erfc +Test "erfc (0x1.f7303cp+1) == 2.705500297238986897105236321218861842255e-8": +double: 1 +idouble: 1 +Test "erfc (0x1.ffa002p+2) == 1.233585992097580296336099501489175967033e-29": +float: 1 +ifloat: 1 +Test "erfc (0x1.ffff56789abcdef0123456789a8p+2) == 1.123161416304655390092138725253789378459e-29": +ildouble: 1 +ldouble: 1 +Test "erfc (2.0) == 0.00467773498104726583793074363274707139": +double: 1 +idouble: 1 +Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8": +double: 1 +idouble: 1 + +# exp +Test "exp (0.75) == 2.11700001661267466854536981983709561": +ildouble: 1 +ldouble: 1 +Test "exp (50.0) == 5184705528587072464087.45332293348538": +ildouble: 1 +ldouble: 1 + +# exp10 +Test "exp10 (-1) == 0.1": +double: 1 +idouble: 1 +Test "exp10 (-305) == 1.0e-305": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "exp10 (-36) == 1.0e-36": +double: 1 +idouble: 1 +Test "exp10 (3) == 1000": +double: 1 +idouble: 1 +Test "exp10 (36) == 1.0e36": +double: 1 +idouble: 1 + +# exp_downward +Test "exp_downward (2) == e^2": +float: 1 +ifloat: 1 +Test "exp_downward (3) == e^3": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# exp_towardzero +Test "exp_towardzero (2) == e^2": +float: 1 +ifloat: 1 +Test "exp_towardzero (3) == e^3": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# exp_upward +Test "exp_upward (1) == e": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# expm1 +Test "expm1 (0.75) == 1.11700001661267466854536981983709561": +double: 1 +idouble: 1 +Test "expm1 (1) == M_El - 1.0": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "expm1 (500.0) == 1.4035922178528374107397703328409120821806e+217": +double: 1 +idouble: 1 + +# hypot +Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (0.75, 1.25) == 1.45773797371132511771853821938639577": +ildouble: 1 +ldouble: 1 +Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 + +# j0 +Test "j0 (-0x1.001000001p+593) == -3.927269966354206207832593635798954916263e-90": +ildouble: 2 +ldouble: 2 +Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "j0 (0.75) == 0.864242275166648623555731103820923211": +float: 1 +ifloat: 1 +Test "j0 (0x1.d7ce3ap+107) == 2.775523647291230802651040996274861694514e-17": +float: 2 +ifloat: 2 +ildouble: 1 +ldouble: 1 +Test "j0 (10.0) == -0.245935764451348335197760862485328754": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "j0 (2.0) == 0.223890779141235668051827454649948626": +float: 2 +ifloat: 2 +Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "j0 (8.0) == 0.171650807137553906090869407851972001": +float: 1 +ifloat: 1 + +# j1 +Test "j1 (0x1.3ffp+74) == 1.818984347516051243459364437186082741567e-12": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "j1 (0x1.ff00000000002p+840) == 1.846591691699331493194965158699937660696e-127": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "j1 (10.0) == 0.0434727461688614366697487680258592883": +float: 2 +ifloat: 2 +ildouble: 1 +ldouble: 1 +Test "j1 (2.0) == 0.576724807756873387202448242269137087": +double: 1 +idouble: 1 +Test "j1 (8.0) == 0.234636346853914624381276651590454612": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +# jn +Test "jn (0, -4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (0, 0.75) == 0.864242275166648623555731103820923211": +float: 1 +ifloat: 1 +Test "jn (0, 10.0) == -0.245935764451348335197760862485328754": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "jn (0, 2.0) == 0.223890779141235668051827454649948626": +float: 2 +ifloat: 2 +Test "jn (0, 4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (0, 8.0) == 0.171650807137553906090869407851972001": +float: 1 +ifloat: 1 +Test "jn (1, 10.0) == 0.0434727461688614366697487680258592883": +float: 2 +ifloat: 2 +ildouble: 1 +ldouble: 1 +Test "jn (1, 2.0) == 0.576724807756873387202448242269137087": +double: 1 +idouble: 1 +Test "jn (1, 8.0) == 0.234636346853914624381276651590454612": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "jn (10, -1.0) == 0.263061512368745320699785368779050294e-9": +ildouble: 1 +ldouble: 1 +Test "jn (10, 0.125) == 0.250543369809369890173993791865771547e-18": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "jn (10, 0.75) == 0.149621713117596814698712483621682835e-10": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (10, 1.0) == 0.263061512368745320699785368779050294e-9": +ildouble: 1 +ldouble: 1 +Test "jn (10, 10.0) == 0.207486106633358857697278723518753428": +double: 4 +float: 3 +idouble: 4 +ifloat: 3 +ildouble: 4 +ldouble: 4 +Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +Test "jn (2, 0x1.ffff62p+99) == -4.43860668048170034334926693188979974489e-16": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +Test "jn (2, 2.4048255576957729) == 0.43175480701968038399746111312430703": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "jn (3, 0.125) == 0.406503832554912875023029337653442868e-4": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (3, 0.75) == 0.848438342327410884392755236884386804e-2": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "jn (3, 10.0) == 0.0583793793051868123429354784103409563": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "jn (3, 2.0) == 0.128943249474402051098793332969239835": +float: 1 +ifloat: 1 +Test "jn (3, 2.4048255576957729) == 0.19899990535769083404042146764530813": +double: 3 +idouble: 3 +ildouble: 1 +ldouble: 1 +Test "jn (4, 2.4048255576957729) == 0.647466661641779720084932282551219891E-1": +double: 1 +idouble: 1 +ildouble: 2 +ldouble: 2 +Test "jn (5, 2.4048255576957729) == 0.163892432048058525099230549946147698E-1": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "jn (6, 2.4048255576957729) == 0.34048184720278336646673682895929161E-2": +double: 4 +float: 3 +idouble: 4 +ifloat: 3 +ildouble: 4 +ldouble: 4 +Test "jn (7, 2.4048255576957729) == 0.60068836573295394221291569249883076E-3": +double: 3 +float: 5 +idouble: 3 +ifloat: 5 +ildouble: 2 +ldouble: 2 +Test "jn (8, 2.4048255576957729) == 0.92165786705344923232879022467054148E-4": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 +ildouble: 4 +ldouble: 4 +Test "jn (9, 2.4048255576957729) == 0.12517270977961513005428966643852564E-4": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 7 +ldouble: 7 + +# lgamma +Test "lgamma (0.7) == 0.260867246531666514385732417016759578": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 3 +ldouble: 3 + +# log10 +Test "log10 (0.75) == -0.124938736608299953132449886193870744": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +Test "log10 (e) == log10(e)": +float: 1 +ifloat: 1 + +# log1p +Test "log1p (-0.25) == -0.287682072451780927439219005993827432": +float: 1 +ifloat: 1 + +# log2 +Test "log2 (e) == M_LOG2El": +ildouble: 1 +ldouble: 1 + +# pow +Test "pow (0x0.ffffffp0, -0x1p24) == 2.7182819094701610539628664526874952929416": +float: 1 +ifloat: 1 +Test "pow (0x0.ffffffp0, 0x1p24) == 0.3678794302077803437135155590023422899744": +float: 1 +ifloat: 1 +Test "pow (0x1.000002p0, 0x1p24) == 7.3890552180866447284268641248075832310141": +float: 1 +ifloat: 1 + +# pow_downward +Test "pow_downward (1.0625, 1.125) == 1.070582293028761362162622578677070098674": +ildouble: 1 +ldouble: 1 +Test "pow_downward (1.5, 1.03125) == 1.519127098714743184071644334163037684948": +float: 1 +ifloat: 1 + +# pow_towardzero +Test "pow_towardzero (1.0625, 1.125) == 1.070582293028761362162622578677070098674": +ildouble: 1 +ldouble: 1 +Test "pow_towardzero (1.5, 1.03125) == 1.519127098714743184071644334163037684948": +float: 1 +ifloat: 1 + +# pow_upward +Test "pow_upward (1.0625, 1.125) == 1.070582293028761362162622578677070098674": +float: 1 +ifloat: 1 +Test "pow_upward (1.5, 1.03125) == 1.519127098714743184071644334163037684948": +ildouble: 1 +ldouble: 1 + +# sin_downward +Test "sin_downward (1) == 0.8414709848078965066525023216302989996226": +ildouble: 4 +ldouble: 4 +Test "sin_downward (10) == -0.5440211108893698134047476618513772816836": +float: 1 +ifloat: 1 +Test "sin_downward (2) == 0.9092974268256816953960198659117448427023": +ildouble: 1 +ldouble: 1 +Test "sin_downward (3) == 0.1411200080598672221007448028081102798469": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "sin_downward (4) == -0.7568024953079282513726390945118290941359": +ildouble: 1 +ldouble: 1 +Test "sin_downward (5) == -0.9589242746631384688931544061559939733525": +float: 1 +ifloat: 1 +Test "sin_downward (6) == -0.2794154981989258728115554466118947596280": +float: 1 +ifloat: 1 +Test "sin_downward (8) == 0.9893582466233817778081235982452886721164": +ildouble: 1 +ldouble: 1 + +# sin_tonearest +Test "sin_tonearest (1) == 0.8414709848078965066525023216302989996226": +float: 1 +ifloat: 1 + +# sin_towardzero +Test "sin_towardzero (1) == 0.8414709848078965066525023216302989996226": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "sin_towardzero (10) == -0.5440211108893698134047476618513772816836": +float: 1 +ifloat: 1 +Test "sin_towardzero (2) == 0.9092974268256816953960198659117448427023": +ildouble: 1 +ldouble: 1 +Test "sin_towardzero (3) == 0.1411200080598672221007448028081102798469": +ildouble: 1 +ldouble: 1 +Test "sin_towardzero (4) == -0.7568024953079282513726390945118290941359": +float: 1 +ifloat: 1 +Test "sin_towardzero (5) == -0.9589242746631384688931544061559939733525": +float: 1 +ifloat: 1 +Test "sin_towardzero (8) == 0.9893582466233817778081235982452886721164": +ildouble: 1 +ldouble: 1 +Test "sin_towardzero (9) == 0.4121184852417565697562725663524351793439": +float: 1 +ifloat: 1 + +# sin_upward +Test "sin_upward (1) == 0.8414709848078965066525023216302989996226": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "sin_upward (2) == 0.9092974268256816953960198659117448427023": +float: 2 +ifloat: 2 +Test "sin_upward (3) == 0.1411200080598672221007448028081102798469": +ildouble: 1 +ldouble: 1 +Test "sin_upward (4) == -0.7568024953079282513726390945118290941359": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "sin_upward (6) == -0.2794154981989258728115554466118947596280": +ildouble: 1 +ldouble: 1 +Test "sin_upward (9) == 0.4121184852417565697562725663524351793439": float: 1 ifloat: 1 -# j1 -Test "j1 (10.0) == 0.0434727461688614366697487680258592883": -float: 2 -ifloat: 2 -ildouble: 1 -ldouble: 1 -Test "j1 (2.0) == 0.576724807756873387202448242269137087": +# sincos +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": double: 1 idouble: 1 -Test "j1 (8.0) == 0.234636346853914624381276651590454612": +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res": double: 1 +float: 1 idouble: 1 +ifloat: 1 +Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res": +float: 1 +ifloat: 1 + +# sinh +Test "sinh (0.75) == 0.822316731935829980703661634446913849": ildouble: 1 ldouble: 1 -# jn -Test "jn (0, -4.0) == -3.9714980986384737228659076845169804197562E-1": -double: 1 +# sinh_downward +Test "sinh_downward (22) == 1792456423.065795780701106568345764104225": float: 1 -idouble: 1 ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "jn (0, 0.75) == 0.864242275166648623555731103820923211": +ildouble: 2 +ldouble: 2 +Test "sinh_downward (23) == 4872401723.124451299966006944252978187305": float: 1 ifloat: 1 -Test "jn (0, 10.0) == -0.245935764451348335197760862485328754": -double: 2 +Test "sinh_downward (24) == 13244561064.92173614705070540368454568168": float: 1 -idouble: 2 ifloat: 1 ildouble: 1 ldouble: 1 -Test "jn (0, 2.0) == 0.223890779141235668051827454649948626": -float: 2 -ifloat: 2 -Test "jn (0, 4.0) == -3.9714980986384737228659076845169804197562E-1": -double: 1 + +# sinh_towardzero +Test "sinh_towardzero (22) == 1792456423.065795780701106568345764104225": float: 1 -idouble: 1 ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "jn (0, 8.0) == 0.171650807137553906090869407851972001": +ildouble: 2 +ldouble: 2 +Test "sinh_towardzero (23) == 4872401723.124451299966006944252978187305": +float: 1 +ifloat: 1 +Test "sinh_towardzero (24) == 13244561064.92173614705070540368454568168": float: 1 ifloat: 1 ildouble: 1 ldouble: 1 -Test "jn (1, 10.0) == 0.0434727461688614366697487680258592883": -float: 2 -ifloat: 2 + +# sinh_upward +Test "sinh_upward (23) == 4872401723.124451299966006944252978187305": ildouble: 1 ldouble: 1 -Test "jn (1, 2.0) == 0.576724807756873387202448242269137087": -double: 1 -idouble: 1 -Test "jn (1, 8.0) == 0.234636346853914624381276651590454612": -double: 1 -idouble: 1 +Test "sinh_upward (24) == 13244561064.92173614705070540368454568168": ildouble: 1 ldouble: 1 -Test "jn (10, -1.0) == 0.263061512368745320699785368779050294e-9": + +# tan +Test "tan (pi/4) == 1": ildouble: 1 ldouble: 1 -Test "jn (10, 0.125) == 0.250543369809369890173993791865771547e-18": -double: 1 + +# tan_downward +Test "tan_downward (1) == 1.5574077246549022305069748074583601730873": float: 1 -idouble: 1 ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "jn (10, 0.75) == 0.149621713117596814698712483621682835e-10": -double: 1 +ildouble: 2 +ldouble: 2 +Test "tan_downward (10) == 0.6483608274590866712591249330098086768169": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "tan_downward (2) == -2.1850398632615189916433061023136825434320": float: 1 -idouble: 1 ifloat: 1 -Test "jn (10, 1.0) == 0.263061512368745320699785368779050294e-9": ildouble: 1 ldouble: 1 -Test "jn (10, 10.0) == 0.207486106633358857697278723518753428": -double: 4 -float: 3 -idouble: 4 -ifloat: 3 -ildouble: 4 -ldouble: 4 -Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6": -float: 4 -ifloat: 4 -Test "jn (3, -1.0) == -0.0195633539826684059189053216217515083": +Test "tan_downward (6) == -0.2910061913847491570536995888681755428312": +float: 1 +ifloat: 1 ildouble: 1 ldouble: 1 -Test "jn (3, 0.125) == 0.406503832554912875023029337653442868e-4": -double: 1 +Test "tan_downward (8) == -6.7997114552203786999252627596086333648814": float: 1 -idouble: 1 ifloat: 1 -Test "jn (3, 0.75) == 0.848438342327410884392755236884386804e-2": -double: 1 +Test "tan_downward (9) == -0.4523156594418098405903708757987855343087": float: 1 -idouble: 1 ifloat: 1 -Test "jn (3, 1.0) == 0.0195633539826684059189053216217515083": ildouble: 1 ldouble: 1 -Test "jn (3, 10.0) == 0.0583793793051868123429354784103409563": -double: 3 + +# tan_tonearest +Test "tan_tonearest (10) == 0.6483608274590866712591249330098086768169": +ildouble: 1 +ldouble: 1 +Test "tan_tonearest (4) == 1.1578212823495775831373424182673239231198": +ildouble: 1 +ldouble: 1 +Test "tan_tonearest (7) == 0.8714479827243187364564508896003135663222": +ildouble: 1 +ldouble: 1 + +# tan_towardzero +Test "tan_towardzero (10) == 0.6483608274590866712591249330098086768169": float: 1 -idouble: 3 ifloat: 1 ildouble: 2 ldouble: 2 -Test "jn (3, 2.0) == 0.128943249474402051098793332969239835": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -ildouble: 2 -ldouble: 2 - -# lgamma -Test "lgamma (0.7) == 0.260867246531666514385732417016759578": -double: 1 +Test "tan_towardzero (3) == -0.1425465430742778052956354105339134932261": float: 1 -idouble: 1 ifloat: 1 -Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 ildouble: 3 ldouble: 3 - -# log10 -Test "log10 (0.75) == -0.124938736608299953132449886193870744": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -Test "log10 (e) == log10(e)": +Test "tan_towardzero (4) == 1.1578212823495775831373424182673239231198": float: 1 ifloat: 1 - -# log1p -Test "log1p (-0.25) == -0.287682072451780927439219005993827432": +ildouble: 1 +ldouble: 1 +Test "tan_towardzero (5) == -3.3805150062465856369827058794473439087096": +float: 1 +ifloat: 1 +Test "tan_towardzero (6) == -0.2910061913847491570536995888681755428312": +ildouble: 1 +ldouble: 1 +Test "tan_towardzero (7) == 0.8714479827243187364564508896003135663222": +ildouble: 2 +ldouble: 2 +Test "tan_towardzero (9) == -0.4523156594418098405903708757987855343087": float: 1 ifloat: 1 - -# log2 -Test "log2 (e) == M_LOG2El": ildouble: 1 ldouble: 1 -# sincos -Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": -double: 1 +# tan_upward +Test "tan_upward (1) == 1.5574077246549022305069748074583601730873": float: 1 -idouble: 1 ifloat: 1 -Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res": -double: 1 +Test "tan_upward (10) == 0.6483608274590866712591249330098086768169": float: 1 -idouble: 1 ifloat: 1 -Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res": -double: 1 +ildouble: 1 +ldouble: 1 +Test "tan_upward (3) == -0.1425465430742778052956354105339134932261": float: 1 -idouble: 1 ifloat: 1 -Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res": +ildouble: 3 +ldouble: 3 +Test "tan_upward (5) == -3.3805150062465856369827058794473439087096": float: 1 ifloat: 1 - -# sinh -Test "sinh (0.75) == 0.822316731935829980703661634446913849": ildouble: 1 ldouble: 1 - -# tan -Test "tan (pi/4) == 1": -double: 1 -idouble: 1 +Test "tan_upward (6) == -0.2910061913847491570536995888681755428312": +ildouble: 1 +ldouble: 1 +Test "tan_upward (7) == 0.8714479827243187364564508896003135663222": +ildouble: 1 +ldouble: 1 +Test "tan_upward (9) == -0.4523156594418098405903708757987855343087": ildouble: 1 ldouble: 1 @@ -718,7 +1854,12 @@ ifloat: 1 Test "y0 (0.125) == -1.38968062514384052915582277745018693": ildouble: 1 ldouble: 1 -Test "y0 (0.75) == -0.137172769385772397522814379396581855": +Test "y0 (0x1.3ffp+74) == 1.818984347516051243459467456433028748678e-12": +double: 1 +idouble: 1 +Test "y0 (0x1.ff00000000002p+840) == 1.846591691699331493194965158699937660696e-127": +double: 1 +idouble: 1 ildouble: 1 ldouble: 1 Test "y0 (1.0) == 0.0882569642156769579829267660235151628": @@ -738,9 +1879,6 @@ float: 1 ifloat: 1 ildouble: 1 ldouble: 1 -Test "y0 (2.0) == 0.510375672649745119596606592727157873": -double: 1 -idouble: 1 Test "y0 (8.0) == 0.223521489387566220527323400498620359": double: 1 float: 1 @@ -753,6 +1891,14 @@ ldouble: 1 Test "y1 (0.125) == -5.19993611253477499595928744876579921": double: 1 idouble: 1 +Test "y1 (0x1.001000001p+593) == 3.927269966354206207832593635798954916263e-90": +ildouble: 2 +ldouble: 2 +Test "y1 (0x1.27e204p+99) == -8.881610148467797208469612080785210013461e-16": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 Test "y1 (1.5) == -0.412308626973911295952829820633445323": float: 1 ifloat: 1 @@ -775,23 +1921,18 @@ double: 1 float: 2 idouble: 1 ifloat: 2 -ildouble: 2 -ldouble: 2 # yn Test "yn (0, 0.125) == -1.38968062514384052915582277745018693": ildouble: 1 ldouble: 1 -Test "yn (0, 0.75) == -0.137172769385772397522814379396581855": -ildouble: 1 -ldouble: 1 Test "yn (0, 1.0) == 0.0882569642156769579829267660235151628": double: 2 float: 1 idouble: 2 ifloat: 1 -ildouble: 2 -ldouble: 2 +ildouble: 1 +ldouble: 1 Test "yn (0, 1.5) == 0.382448923797758843955068554978089862": double: 2 float: 1 @@ -800,15 +1941,15 @@ ifloat: 1 Test "yn (0, 10.0) == 0.0556711672835993914244598774101900481": float: 1 ifloat: 1 -ildouble: 2 -ldouble: 2 +ildouble: 1 +ldouble: 1 Test "yn (0, 8.0) == 0.223521489387566220527323400498620359": double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 2 -ldouble: 2 +ildouble: 1 +ldouble: 1 Test "yn (1, 0.125) == -5.19993611253477499595928744876579921": double: 1 idouble: 1 @@ -834,8 +1975,6 @@ double: 1 float: 2 idouble: 1 ifloat: 2 -ildouble: 2 -ldouble: 2 Test "yn (10, 0.125) == -127057845771019398.252538486899753195": double: 1 idouble: 1 @@ -852,13 +1991,13 @@ double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 2 -ldouble: 2 +ildouble: 1 +ldouble: 1 Test "yn (10, 2.0) == -129184.542208039282635913145923304214": double: 2 idouble: 2 -ildouble: 2 -ldouble: 2 +ildouble: 1 +ldouble: 1 Test "yn (3, 0.125) == -2612.69757350066712600220955744091741": double: 1 idouble: 1 @@ -872,8 +2011,8 @@ double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 2 -ldouble: 2 +ildouble: 1 +ldouble: 1 Test "yn (3, 2.0) == -1.12778377684042778608158395773179238": double: 1 idouble: 1 @@ -883,6 +2022,30 @@ Function: "acos": ildouble: 1 ldouble: 1 +Function: "acos_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "acos_tonearest": +ildouble: 1 +ldouble: 1 + +Function: "acos_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "acos_upward": +ildouble: 2 +ldouble: 2 + Function: "acosh": ildouble: 1 ldouble: 1 @@ -891,13 +2054,39 @@ Function: "asin": ildouble: 2 ldouble: 2 +Function: "asin_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "asin_tonearest": +ildouble: 1 +ldouble: 1 + +Function: "asin_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "asin_upward": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + Function: "asinh": ildouble: 1 ldouble: 1 -Function: "atan2": -float: 3 -ifloat: 3 +Function: "atan2": +float: 1 +ifloat: 1 ildouble: 1 ldouble: 1 @@ -910,28 +2099,32 @@ ildouble: 1 ldouble: 1 Function: Real part of "cacos": +double: 1 +idouble: 1 ildouble: 1 ldouble: 1 Function: Imaginary part of "cacos": -ildouble: 1 -ldouble: 1 +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 2 +ldouble: 2 Function: Real part of "cacosh": double: 1 -float: 7 +float: 1 idouble: 1 -ifloat: 7 +ifloat: 1 ildouble: 1 ldouble: 1 Function: Imaginary part of "cacosh": double: 1 -float: 3 +float: 1 idouble: 1 -ifloat: 3 -ildouble: 1 -ldouble: 1 +ifloat: 1 Function: Real part of "casin": double: 1 @@ -942,8 +2135,12 @@ ildouble: 1 ldouble: 1 Function: Imaginary part of "casin": -ildouble: 1 -ldouble: 1 +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 2 +ldouble: 2 Function: Real part of "casinh": double: 5 @@ -962,8 +2159,6 @@ ildouble: 1 ldouble: 1 Function: Real part of "catan": -float: 4 -ifloat: 4 ildouble: 1 ldouble: 1 @@ -979,10 +2174,6 @@ Function: Real part of "catanh": double: 4 idouble: 4 -Function: Imaginary part of "catanh": -float: 6 -ifloat: 6 - Function: "cbrt": double: 1 idouble: 1 @@ -998,10 +2189,12 @@ ildouble: 1 ldouble: 1 Function: Imaginary part of "ccos": +double: 1 float: 1 +idouble: 1 ifloat: 1 -ildouble: 1 -ldouble: 1 +ildouble: 2 +ldouble: 2 Function: Real part of "ccosh": double: 1 @@ -1012,46 +2205,54 @@ ildouble: 1 ldouble: 1 Function: Imaginary part of "ccosh": +double: 1 float: 1 +idouble: 1 ifloat: 1 ildouble: 2 ldouble: 2 Function: Real part of "cexp": +double: 2 float: 1 +idouble: 2 ifloat: 1 ildouble: 2 ldouble: 2 Function: Imaginary part of "cexp": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 2 +ldouble: 2 Function: Real part of "clog": +double: 1 float: 1 +idouble: 1 ifloat: 1 ildouble: 2 ldouble: 2 Function: Imaginary part of "clog": -float: 3 -ifloat: 3 ildouble: 1 ldouble: 1 Function: Real part of "clog10": +double: 1 float: 1 +idouble: 1 ifloat: 1 ildouble: 3 ldouble: 3 Function: Imaginary part of "clog10": double: 1 -float: 5 +float: 1 idouble: 1 -ifloat: 5 +ifloat: 1 ildouble: 1 ldouble: 1 @@ -1063,10 +2264,54 @@ ifloat: 1 ildouble: 1 ldouble: 1 +Function: "cos_downward": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: "cos_tonearest": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "cos_towardzero": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: "cos_upward": +float: 2 +ifloat: 2 +ildouble: 1 +ldouble: 1 + Function: "cosh": ildouble: 1 ldouble: 1 +Function: "cosh_downward": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "cosh_tonearest": +ildouble: 1 +ldouble: 1 + +Function: "cosh_towardzero": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "cosh_upward": +ildouble: 2 +ldouble: 2 + Function: Real part of "cpow": double: 2 float: 4 @@ -1083,11 +2328,15 @@ ifloat: 2 ildouble: 2 ldouble: 2 -Function: Imaginary part of "cproj": -ildouble: 1 -ldouble: 1 - Function: Real part of "csin": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: Imaginary part of "csin": ildouble: 1 ldouble: 1 @@ -1102,24 +2351,32 @@ double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 1 -ldouble: 1 +ildouble: 2 +ldouble: 2 Function: Real part of "csqrt": +double: 1 float: 1 +idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 Function: Imaginary part of "csqrt": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 ildouble: 1 ldouble: 1 Function: Real part of "ctan": double: 1 +float: 1 idouble: 1 -ildouble: 1 -ldouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 Function: Imaginary part of "ctan": double: 1 @@ -1129,17 +2386,19 @@ ldouble: 1 Function: Real part of "ctanh": double: 1 -float: 2 +float: 1 idouble: 1 -ifloat: 2 +ifloat: 1 ildouble: 1 ldouble: 1 Function: Imaginary part of "ctanh": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 2 +ldouble: 2 Function: "erf": double: 1 @@ -1149,7 +2408,9 @@ ldouble: 1 Function: "erfc": double: 1 +float: 1 idouble: 1 +ifloat: 1 ildouble: 1 ldouble: 1 @@ -1158,22 +2419,40 @@ ildouble: 1 ldouble: 1 Function: "exp10": -double: 6 -float: 2 -idouble: 6 -ifloat: 2 -ildouble: 8 -ldouble: 8 +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 -Function: "exp2": -ildouble: 2 -ldouble: 2 +Function: "exp_downward": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "exp_tonearest": +ildouble: 1 +ldouble: 1 + +Function: "exp_towardzero": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "exp_upward": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 Function: "expm1": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: "gamma": ildouble: 1 @@ -1190,8 +2469,8 @@ double: 2 float: 2 idouble: 2 ifloat: 2 -ildouble: 1 -ldouble: 1 +ildouble: 2 +ldouble: 2 Function: "j1": double: 1 @@ -1203,11 +2482,11 @@ ldouble: 1 Function: "jn": double: 4 -float: 4 +float: 5 idouble: 4 -ifloat: 4 -ildouble: 4 -ldouble: 4 +ifloat: 5 +ildouble: 7 +ldouble: 7 Function: "lgamma": double: 1 @@ -1232,14 +2511,32 @@ ldouble: 1 Function: "log1p": float: 1 ifloat: 1 -ildouble: 1 -ldouble: 1 Function: "log2": ildouble: 1 ldouble: 1 Function: "pow": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "pow_downward": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "pow_towardzero": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "pow_upward": +float: 1 +ifloat: 1 ildouble: 1 ldouble: 1 @@ -1247,6 +2544,30 @@ Function: "sin": ildouble: 1 ldouble: 1 +Function: "sin_downward": +float: 1 +ifloat: 1 +ildouble: 4 +ldouble: 4 + +Function: "sin_tonearest": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "sin_towardzero": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: "sin_upward": +float: 2 +ifloat: 2 +ildouble: 2 +ldouble: 2 + Function: "sincos": double: 1 float: 1 @@ -1259,12 +2580,54 @@ Function: "sinh": ildouble: 1 ldouble: 1 +Function: "sinh_downward": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: "sinh_tonearest": +ildouble: 1 +ldouble: 1 + +Function: "sinh_towardzero": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: "sinh_upward": +ildouble: 1 +ldouble: 1 + Function: "tan": double: 1 idouble: 1 ildouble: 1 ldouble: 1 +Function: "tan_downward": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: "tan_tonearest": +ildouble: 1 +ldouble: 1 + +Function: "tan_towardzero": +float: 1 +ifloat: 1 +ildouble: 3 +ldouble: 3 + +Function: "tan_upward": +float: 1 +ifloat: 1 +ildouble: 3 +ldouble: 3 + Function: "tanh": ildouble: 1 ldouble: 1 @@ -1282,8 +2645,8 @@ double: 2 float: 1 idouble: 2 ifloat: 1 -ildouble: 2 -ldouble: 2 +ildouble: 1 +ldouble: 1 Function: "y1": double: 3 From d083acacea4f5b12ab3d4a312908caa3e30e4eee Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Thu, 31 May 2012 14:29:43 -0400 Subject: [PATCH 4459/4487] Move Changelog entry from ChangeLog.tile to ChangeLog.linux-generic --- ChangeLog.linux-generic | 5 +++++ ChangeLog.tile | 3 --- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ChangeLog.linux-generic b/ChangeLog.linux-generic index 821270f0fb..79d46129b3 100644 --- a/ChangeLog.linux-generic +++ b/ChangeLog.linux-generic @@ -1,3 +1,8 @@ +2012-05-30 Chris Metcalf + + * sysdeps/unix/sysv/linux/generic/syscalls.list: Remove + __connect_internal alias. + 2012-05-18 Chris Metcalf * sysdeps/unix/sysv/linux/generic/bits/typesizes.h diff --git a/ChangeLog.tile b/ChangeLog.tile index ff914495a0..ce8c3e07c6 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,8 +1,5 @@ 2012-05-30 Chris Metcalf - * sysdeps/unix/sysv/linux/generic/syscalls.list: Remove - __connect_internal alias. - * sysdeps/unix/sysv/linux/tile/tilegx/Makefile: Remove test that $(subdir) is "misc" when setting abi- variables. From 36d173fb67a9ecb5548538963237d5ef2dc3694a Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 31 May 2012 21:28:40 +0000 Subject: [PATCH 4460/4487] Remove sqrt ulps for MIPS. --- ChangeLog.mips | 2 ++ sysdeps/mips/mips64/libm-test-ulps | 9 --------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 54e1f268d4..f72dc4e41b 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,5 +1,7 @@ 2012-05-31 Joseph Myers + * sysdeps/mips/mips64/libm-test-ulps: Remove sqrt ulps. + * sysdeps/mips/mips32/libm-test-ulps: Regenerate. * sysdeps/mips/mips64/libm-test-ulps: Likewise. diff --git a/sysdeps/mips/mips64/libm-test-ulps b/sysdeps/mips/mips64/libm-test-ulps index c21b077583..bc9464eb71 100644 --- a/sysdeps/mips/mips64/libm-test-ulps +++ b/sysdeps/mips/mips64/libm-test-ulps @@ -1932,11 +1932,6 @@ Test "sinh_towardzero (24) == 13244561064.92173614705070540368454568168": float: 1 ifloat: 1 -# sqrt -Test "sqrt (2) == M_SQRT2l": -ildouble: 1 -ldouble: 1 - # tan_downward Test "tan_downward (1) == 1.5574077246549022305069748074583601730873": float: 1 @@ -2680,10 +2675,6 @@ Function: "sinh_towardzero": float: 1 ifloat: 1 -Function: "sqrt": -ildouble: 1 -ldouble: 1 - Function: "tan": double: 1 idouble: 1 From 12139ca306df26046c14c98c6dc13bd15d3071a2 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 1 Jun 2012 14:42:11 +0000 Subject: [PATCH 4461/4487] Fix typo in MIPS abi-n32-condition. --- ChangeLog.mips | 5 +++++ sysdeps/unix/sysv/linux/mips/Makefile | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index f72dc4e41b..5cd25e790e 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2012-06-01 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/Makefile (abi-n32-condition): Fix + typo. + 2012-05-31 Joseph Myers * sysdeps/mips/mips64/libm-test-ulps: Remove sqrt ulps. diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile index 2bbc9a4dfb..99c554ff67 100644 --- a/sysdeps/unix/sysv/linux/mips/Makefile +++ b/sysdeps/unix/sysv/linux/mips/Makefile @@ -8,13 +8,13 @@ sysdep_routines += cachectl cacheflush sysmips _test_and_set sysdep_headers += sys/cachectl.h sys/sysmips.h sys/tas.h endif -# _MIPS_SIM_ABI32 == 1, _MIPS_SIM_ABIN32 == 2, _MIPS_SIM_ABI64 == 3 +# _MIPS_SIM_ABI32 == 1, _MIPS_SIM_NABI32 == 2, _MIPS_SIM_ABI64 == 3 abi-variants := o32 n32 n64 abi-includes := sgidefs.h abi-o32-options := -D_MIPS_SIM=1 abi-o32-condition := _MIPS_SIM == _MIPS_SIM_ABI32 abi-n32-options := -D_MIPS_SIM=2 -abi-n32-condition := _MIPS_SIM == _MIPS_SIM_ABIN32 +abi-n32-condition := _MIPS_SIM == _MIPS_SIM_NABI32 abi-n64-options := -D_MIPS_SIM=3 abi-n64-condition := _MIPS_SIM == _MIPS_SIM_ABI64 From 4b32777daa1f17e23c463be1de3621e84025f938 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 1 Jun 2012 09:46:25 -0700 Subject: [PATCH 4462/4487] alpha: Update libm-test-ulps --- ChangeLog.alpha | 4 + sysdeps/alpha/fpu/libm-test-ulps | 124 ++++++++++--------------------- 2 files changed, 43 insertions(+), 85 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 48f3b97056..16d73c6111 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,7 @@ +2012-06-01 Richard Henderson + + * sysdeps/alpha/fpu/libm-test-ulps: Regenerate. + 2012-05-30 Richard Henderson * sysdeps/alpha/Makefile (CFLAGS-s_fma.c): Set -mieee-with-inexact. diff --git a/sysdeps/alpha/fpu/libm-test-ulps b/sysdeps/alpha/fpu/libm-test-ulps index 908154c4e8..bc3d8281d7 100644 --- a/sysdeps/alpha/fpu/libm-test-ulps +++ b/sysdeps/alpha/fpu/libm-test-ulps @@ -964,8 +964,6 @@ ifloat: 1 Test "cos (M_PI_6l * 2.0) == 0.5": double: 1 idouble: 1 -ildouble: 1 -ldouble: 1 Test "cos (M_PI_6l * 4.0) == -0.5": double: 2 float: 1 @@ -1138,9 +1136,6 @@ ifloat: 4 ildouble: 4 ldouble: 4 Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i": -ildouble: 2 -ldouble: 2 -Test "Imaginary part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i": ildouble: 1 ldouble: 1 Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i": @@ -1148,8 +1143,8 @@ double: 2 float: 3 idouble: 2 ifloat: 3 -ildouble: 10 -ldouble: 10 +ildouble: 11 +ldouble: 11 Test "Real part of: cpow (2 + 0 i, 10 + 0 i) == 1024.0 + 0.0 i": ildouble: 2 ldouble: 2 @@ -1158,8 +1153,8 @@ double: 1 float: 4 idouble: 1 ifloat: 4 -ildouble: 3 -ldouble: 3 +ildouble: 2 +ldouble: 2 Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": float: 2 ifloat: 2 @@ -1380,8 +1375,6 @@ ldouble: 1 Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": float: 1 ifloat: 1 -ildouble: 1 -ldouble: 1 Test "Imaginary part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": double: 1 idouble: 1 @@ -1436,18 +1429,14 @@ ldouble: 1 # ctanh Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": double: 1 -float: 2 +float: 1 idouble: 1 -ifloat: 2 -ildouble: 1 -ldouble: 1 +ifloat: 1 Test "Imaginary part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 1 -ldouble: 1 Test "Imaginary part of: ctanh (0 + 0x3.243f6cp-1 i) == 0.0 - 2.287733242885645987394874673945769518150e7 i": float: 1 ifloat: 1 @@ -1530,10 +1519,8 @@ idouble: 1 # exp10 Test "exp10 (-1) == 0.1": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 +double: 1 +idouble: 1 Test "exp10 (-305) == 1.0e-305": double: 1 idouble: 1 @@ -1542,18 +1529,9 @@ double: 1 idouble: 1 ildouble: 1 ldouble: 1 -Test "exp10 (0.75) == 5.62341325190349080394951039776481231": +Test "exp10 (3) == 1000": double: 1 -float: 1 idouble: 1 -ifloat: 1 -Test "exp10 (3) == 1000": -double: 6 -float: 2 -idouble: 6 -ifloat: 2 -ildouble: 1 -ldouble: 1 Test "exp10 (36) == 1.0e36": double: 1 idouble: 1 @@ -1562,9 +1540,6 @@ ildouble: 1 ldouble: 1 # exp2 -Test "exp2 (10) == 1024": -ildouble: 2 -ldouble: 2 Test "exp2 (100.5) == 1.792728671193156477399422023278661496394e+30": ildouble: 1 ldouble: 1 @@ -1802,9 +1777,9 @@ ildouble: 2 ldouble: 2 Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6": double: 1 -float: 4 +float: 2 idouble: 1 -ifloat: 4 +ifloat: 2 Test "jn (2, 0x1.ffff62p+99) == -4.43860668048170034334926693188979974489e-16": double: 2 float: 2 @@ -1835,10 +1810,8 @@ ifloat: 1 ildouble: 2 ldouble: 2 Test "jn (3, 2.0) == 0.128943249474402051098793332969239835": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 +float: 1 +ifloat: 1 Test "jn (3, 2.4048255576957729) == 0.19899990535769083404042146764530813": double: 3 idouble: 3 @@ -2056,15 +2029,11 @@ ifloat: 1 Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": double: 1 idouble: 1 -ildouble: 1 -ldouble: 1 Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res": double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 1 -ldouble: 1 Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res": float: 1 ifloat: 1 @@ -2112,11 +2081,6 @@ Test "sinh_upward (24) == 13244561064.92173614705070540368454568168": ildouble: 1 ldouble: 1 -# sqrt -Test "sqrt (2) == M_SQRT2l": -ildouble: 1 -ldouble: 1 - # tan_downward Test "tan_downward (1) == 1.5574077246549022305069748074583601730873": float: 1 @@ -2474,8 +2438,8 @@ double: 2 float: 1 idouble: 2 ifloat: 1 -ildouble: 1 -ldouble: 1 +ildouble: 3 +ldouble: 3 Function: Real part of "cacosh": double: 1 @@ -2504,8 +2468,8 @@ double: 2 float: 1 idouble: 2 ifloat: 1 -ildouble: 1 -ldouble: 1 +ildouble: 3 +ldouble: 3 Function: Real part of "casinh": double: 5 @@ -2589,9 +2553,9 @@ ldouble: 1 Function: Imaginary part of "cexp": double: 1 -float: 1 +float: 2 idouble: 1 -ifloat: 1 +ifloat: 2 ildouble: 1 ldouble: 1 @@ -2674,8 +2638,8 @@ double: 2 float: 4 idouble: 2 ifloat: 4 -ildouble: 10 -ldouble: 10 +ildouble: 11 +ldouble: 11 Function: Imaginary part of "cpow": double: 2 @@ -2732,8 +2696,8 @@ double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 1 -ldouble: 1 +ildouble: 2 +ldouble: 2 Function: Imaginary part of "ctan": double: 1 @@ -2743,19 +2707,19 @@ ldouble: 2 Function: Real part of "ctanh": double: 1 -float: 2 +float: 1 idouble: 1 -ifloat: 2 -ildouble: 1 -ldouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 Function: Imaginary part of "ctanh": double: 1 -float: 1 +float: 2 idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 +ifloat: 2 +ildouble: 2 +ldouble: 2 Function: "erf": double: 1 @@ -2770,16 +2734,14 @@ ildouble: 1 ldouble: 1 Function: "exp10": -double: 6 -float: 2 -idouble: 6 -ifloat: 2 +double: 1 +idouble: 1 ildouble: 1 ldouble: 1 Function: "exp2": -ildouble: 2 -ldouble: 2 +ildouble: 1 +ldouble: 1 Function: "exp_downward": float: 1 @@ -2807,10 +2769,6 @@ ifloat: 1 ildouble: 1 ldouble: 1 -Function: "fma": -double: 1 -idouble: 1 - Function: "gamma": ildouble: 1 ldouble: 1 @@ -2837,11 +2795,11 @@ ldouble: 4 Function: "jn": double: 4 -float: 4 +float: 5 idouble: 4 -ifloat: 4 -ildouble: 4 -ldouble: 4 +ifloat: 5 +ildouble: 8 +ldouble: 8 Function: "lgamma": double: 1 @@ -2935,10 +2893,6 @@ Function: "sinh_upward": ildouble: 1 ldouble: 1 -Function: "sqrt": -ildouble: 1 -ldouble: 1 - Function: "tan": double: 1 idouble: 1 From f93d7902de4adbf944a3712b35f9e13108cd2874 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 1 Jun 2012 10:46:08 -0700 Subject: [PATCH 4463/4487] alpha: Use -mieee-with-inexact with math/test-misc --- ChangeLog.alpha | 2 ++ sysdeps/alpha/Makefile | 2 ++ 2 files changed, 4 insertions(+) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 16d73c6111..1d3e6bd579 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,5 +1,7 @@ 2012-06-01 Richard Henderson + * sysdeps/alpha/Makefile (CFLAGS-test-misc.c): Set -mieee-with-inexact. + * sysdeps/alpha/fpu/libm-test-ulps: Regenerate. 2012-05-30 Richard Henderson diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile index 17fd3b84d7..1a80db8dcc 100644 --- a/sysdeps/alpha/Makefile +++ b/sysdeps/alpha/Makefile @@ -41,6 +41,8 @@ ifeq ($(subdir),math) # The fma routines rely on inexact being raised for correct results. CFLAGS-s_fma.c = -mieee-with-inexact CFLAGS-s_fmaf.c = -mieee-with-inexact +# This test tries to check for inexact being raised by arithmetic. +CFLAGS-test-misc.c += -mieee-with-inexact endif # Build everything with full IEEE math support, and with dynamic rounding; From d97b8a3d218fc43ce0b345a81b283bc0d439b1ea Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 1 Jun 2012 19:56:36 +0000 Subject: [PATCH 4464/4487] Use dbl-64 fma for MIPS64. --- ChangeLog.mips | 3 +++ sysdeps/mips/mips64/n32/s_fma.c | 6 ++++++ sysdeps/mips/mips64/n64/s_fma.c | 6 ++++++ 3 files changed, 15 insertions(+) create mode 100644 sysdeps/mips/mips64/n32/s_fma.c create mode 100644 sysdeps/mips/mips64/n64/s_fma.c diff --git a/ChangeLog.mips b/ChangeLog.mips index 5cd25e790e..853f286811 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,5 +1,8 @@ 2012-06-01 Joseph Myers + * sysdeps/mips/mips64/n32/s_fma.c: New file. + * sysdeps/mips/mips64/n64/s_fma.c: Likewise. + * sysdeps/unix/sysv/linux/mips/Makefile (abi-n32-condition): Fix typo. diff --git a/sysdeps/mips/mips64/n32/s_fma.c b/sysdeps/mips/mips64/n32/s_fma.c new file mode 100644 index 0000000000..74a1e01fc1 --- /dev/null +++ b/sysdeps/mips/mips64/n32/s_fma.c @@ -0,0 +1,6 @@ +/* MIPS long double is implemented in software by fp-bit (as of GCC + 4.7) without support for exceptions or rounding modes, so the fma + implementation in terms of long double is slow and will not produce + correctly rounding results. */ + +#include diff --git a/sysdeps/mips/mips64/n64/s_fma.c b/sysdeps/mips/mips64/n64/s_fma.c new file mode 100644 index 0000000000..74a1e01fc1 --- /dev/null +++ b/sysdeps/mips/mips64/n64/s_fma.c @@ -0,0 +1,6 @@ +/* MIPS long double is implemented in software by fp-bit (as of GCC + 4.7) without support for exceptions or rounding modes, so the fma + implementation in terms of long double is slow and will not produce + correctly rounding results. */ + +#include From 0ff73bfcb06a02f318850333f315dee587151d00 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 5 Jun 2012 08:08:25 -0700 Subject: [PATCH 4465/4487] alpha: Resurrect getppid, getegid, geteuid. The sysdeps/unix files deleted in the main tree weren't unused. Resurrect them in sysdeps/unix/alpha, and using the real syscall names. --- ChangeLog.alpha | 6 ++++++ sysdeps/unix/alpha/getegid.S | 26 ++++++++++++++++++++++++++ sysdeps/unix/alpha/geteuid.S | 26 ++++++++++++++++++++++++++ sysdeps/unix/alpha/getppid.S | 26 ++++++++++++++++++++++++++ 4 files changed, 84 insertions(+) create mode 100644 sysdeps/unix/alpha/getegid.S create mode 100644 sysdeps/unix/alpha/geteuid.S create mode 100644 sysdeps/unix/alpha/getppid.S diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 1d3e6bd579..77e6de1365 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,9 @@ +2012-06-05 Richard Henderson + + * sysdeps/unxi/alpha/getppid.S: New file. + * sysdeps/unxi/alpha/getegid.S: New file. + * sysdeps/unxi/alpha/geteuid.S: New file. + 2012-06-01 Richard Henderson * sysdeps/alpha/Makefile (CFLAGS-test-misc.c): Set -mieee-with-inexact. diff --git a/sysdeps/unix/alpha/getegid.S b/sysdeps/unix/alpha/getegid.S new file mode 100644 index 0000000000..a564f6c7a7 --- /dev/null +++ b/sysdeps/unix/alpha/getegid.S @@ -0,0 +1,26 @@ +/* Copyright (C) 1991-2012 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, see + . */ + +#include + + +PSEUDO (__getegid, getxgid, 0) + MOVE (r1, r0) + ret +PSEUDO_END (__getegid) + +weak_alias (__getegid, getegid) diff --git a/sysdeps/unix/alpha/geteuid.S b/sysdeps/unix/alpha/geteuid.S new file mode 100644 index 0000000000..289acbd1e3 --- /dev/null +++ b/sysdeps/unix/alpha/geteuid.S @@ -0,0 +1,26 @@ +/* Copyright (C) 1991-2012 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, see + . */ + +#include + + +PSEUDO (__geteuid, getxuid, 0) + MOVE (r1, r0) + ret +PSEUDO_END (__geteuid) + +weak_alias (__geteuid, geteuid) diff --git a/sysdeps/unix/alpha/getppid.S b/sysdeps/unix/alpha/getppid.S new file mode 100644 index 0000000000..8f7e7746de --- /dev/null +++ b/sysdeps/unix/alpha/getppid.S @@ -0,0 +1,26 @@ +/* Copyright (C) 1991-2012 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, see + . */ + +#include + + +PSEUDO (__getppid, getxpid, 0) + MOVE (r1, r0) + ret +PSEUDO_END (__getppid) + +weak_alias (__getppid, getppid) From 7d1feb5693be7e606104cc2b6657c746a93e5926 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 5 Jun 2012 08:12:03 -0700 Subject: [PATCH 4466/4487] alpha: Use .cfi_signal_frame in rt_sigaction --- ChangeLog.alpha | 3 ++ sysdeps/unix/sysv/linux/alpha/rt_sigaction.S | 31 +++++++------------- 2 files changed, 14 insertions(+), 20 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 77e6de1365..705a0204d7 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,5 +1,8 @@ 2012-06-05 Richard Henderson + * sysdeps/unix/sysv/linux/alpha/rt_sigaction.S: Use .cfi_signal_frame + instead of a hack using extra nops. + * sysdeps/unxi/alpha/getppid.S: New file. * sysdeps/unxi/alpha/getegid.S: New file. * sysdeps/unxi/alpha/geteuid.S: New file. diff --git a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S index 96069c72ba..42062b0847 100644 --- a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S +++ b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1998-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1998 @@ -28,7 +28,7 @@ .text ENTRY(__syscall_rt_sigaction) - .frame sp,0,ra,0 + cfi_startproc ldgp gp,0(pv) #ifdef PROF .set noat @@ -39,18 +39,12 @@ ENTRY(__syscall_rt_sigaction) .prologue 1 beq a1, 0f - ldl t0, 8(a1) # sa_flags - - /* The unwinder will subtract one from the return address when - attempting to find the call instruction that led us here. - Since we didn't get here via a normal call, if we do nothing - we would pick up the wrong symbol and the wrong FDE. Account - for this by adding a nop to the start of the function and - then skipping it here by adding 4. */ - ldah a4, __syscall_sigreturn+4(gp) !gprelhigh - ldah t1, __syscall_rt_sigreturn+4(gp) !gprelhigh - lda a4, __syscall_sigreturn+4(a4) !gprellow - lda t1, __syscall_rt_sigreturn+4(t1) !gprellow + ldl t0, 8(a1) # sa_flags + + ldah a4, __syscall_sigreturn(gp) !gprelhigh + ldah t1, __syscall_rt_sigreturn(gp) !gprelhigh + lda a4, __syscall_sigreturn(a4) !gprellow + lda t1, __syscall_rt_sigreturn(t1) !gprellow and t0, 0x40, t0 # SA_SIGINFO cmovne t0, t1, a4 @@ -58,7 +52,7 @@ ENTRY(__syscall_rt_sigaction) callsys bne a3, SYSCALL_ERROR_LABEL ret - + cfi_endproc PSEUDO_END(__syscall_rt_sigaction) /* To enable unwinding through the signal frame without special hackery @@ -90,26 +84,23 @@ PSEUDO_END(__syscall_rt_sigaction) .endm .align 4 - nop - nop - nop cfi_startproc cfi_return_column (64) + .cfi_signal_frame SIGCONTEXT_REGS -648 cfi_def_cfa_offset (648) __syscall_sigreturn: - nop mov sp, a0 ldi v0, __NR_sigreturn callsys .size __syscall_sigreturn, .-__syscall_sigreturn .type __syscall_sigreturn, @function + .align 4 cfi_def_cfa_offset (176 + 648) __syscall_rt_sigreturn: - nop mov sp,a0 ldi v0,__NR_rt_sigreturn callsys From a683563255826fa1623785b660ffe11956ba3f4a Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 6 Jun 2012 14:23:21 -0700 Subject: [PATCH 4467/4487] alpha: put mcount prologue at correct location --- ChangeLog.alpha | 4 ++++ sysdeps/alpha/_mcount.S | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 705a0204d7..2c107ad931 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,7 @@ +2012-06-06 Richard Henderson + + * sysdeps/alpha/_mcount.S: Move .prologue after stack alloc. + 2012-06-05 Richard Henderson * sysdeps/unix/sysv/linux/alpha/rt_sigaction.S: Use .cfi_signal_frame diff --git a/sysdeps/alpha/_mcount.S b/sysdeps/alpha/_mcount.S index 9d7c15be73..67c579e67c 100644 --- a/sysdeps/alpha/_mcount.S +++ b/sysdeps/alpha/_mcount.S @@ -38,9 +38,8 @@ .set noreorder LEAF(_mcount, 0xb0) - .prologue 0 - subq sp, 0xb0, sp + .prologue 0 stq a0, 0x00(sp) mov ra, a0 # a0 = caller-pc stq a1, 0x08(sp) From b2afe910fb24a9c53f78a9af3ecd18340d3c2b87 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 6 Jun 2012 14:35:00 -0700 Subject: [PATCH 4468/4487] alpha: Use cfi_startproc instead of dual procedure descriptors --- ChangeLog.alpha | 9 ++++++ sysdeps/alpha/alphaev6/stxcpy.S | 33 +++++++-------------- sysdeps/alpha/alphaev6/stxncpy.S | 49 +++++++++++--------------------- sysdeps/alpha/bzero.S | 21 ++++---------- sysdeps/alpha/memset.S | 25 ++++++---------- sysdeps/alpha/stxcpy.S | 30 ++++++------------- sysdeps/alpha/stxncpy.S | 31 ++++++-------------- sysdeps/unix/alpha/sysdep.h | 6 ++++ 8 files changed, 73 insertions(+), 131 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 2c107ad931..ceee910c3c 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,5 +1,14 @@ 2012-06-06 Richard Henderson + * sysdeps/alpha/alphaev6/stxcpy.S: Use cfi markup instead of + dual ecoff procedure descriptors. + * sysdeps/alpha/alphaev6/stxncpy.S: Likewise. + * sysdeps/alpha/bzero.S: Likewise. + * sysdeps/alpha/memset.S: Likewise. + * sysdeps/alpha/stxcpy.S: Likewise. + * sysdeps/alpha/stxncpy.S: Likewise. + * sysdeps/unix/alpha/sysdep.h (USEPV_PROF): New. + * sysdeps/alpha/_mcount.S: Move .prologue after stack alloc. 2012-06-05 Richard Henderson diff --git a/sysdeps/alpha/alphaev6/stxcpy.S b/sysdeps/alpha/alphaev6/stxcpy.S index 37ad737ba8..bdc8e72eb6 100644 --- a/sysdeps/alpha/alphaev6/stxcpy.S +++ b/sysdeps/alpha/alphaev6/stxcpy.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000-2012 Free Software Foundation, Inc. Contributed by Richard Henderson (rth@tamu.edu) EV6 optimized by Rick Gorton . This file is part of the GNU C Library. @@ -41,24 +41,20 @@ .arch ev6 .set noat .set noreorder - .text - -/* There is a problem with either gdb (as of 4.16) or gas (as of 2.7) that - doesn't like putting the entry point for a procedure somewhere in the - middle of the procedure descriptor. Work around this by putting the - aligned copy in its own procedure descriptor */ + .text + .type __stxcpy, @function + .globl __stxcpy + .usepv __stxcpy, no - .ent stxcpy_aligned - .align 4 -stxcpy_aligned: - .frame sp, 0, t9 - .prologue 0 + cfi_startproc + cfi_return_column (t9) /* On entry to this basic block: t0 == the first destination word for masking back in t1 == the first source word. */ - + .align 4 +stxcpy_aligned: /* Create the 1st output word and detect 0's in the 1st input word. */ lda t2, -1 # E : build a mask against false zero mskqh t2, a1, t2 # U : detection in the src word (stall) @@ -115,15 +111,8 @@ $a_eos: nop nop - .end stxcpy_aligned - .align 4 - .ent __stxcpy - .globl __stxcpy __stxcpy: - .frame sp, 0, t9 - .prologue 0 - /* Are source and destination co-aligned? */ xor a0, a1, t0 # E : unop # E : @@ -321,7 +310,5 @@ $unaligned: or t0, t1, t1 # e1 : and put it there stq_u t1, 0(a0) # .. e0 : (stall) ret (t9) # e1 : - nop - - .end __stxcpy + cfi_endproc diff --git a/sysdeps/alpha/alphaev6/stxncpy.S b/sysdeps/alpha/alphaev6/stxncpy.S index 31f85706f9..d134eb8c10 100644 --- a/sysdeps/alpha/alphaev6/stxncpy.S +++ b/sysdeps/alpha/alphaev6/stxncpy.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2002 Free Software Foundation, Inc. +/* Copyright (C) 2000-2012 Free Software Foundation, Inc. Contributed by Richard Henderson (rth@tamu.edu) EV6 optimized by Rick Gorton . This file is part of the GNU C Library. @@ -49,22 +49,19 @@ .set noat .set noreorder -/* There is a problem with either gdb (as of 4.16) or gas (as of 2.7) that - doesn't like putting the entry point for a procedure somewhere in the - middle of the procedure descriptor. Work around this by putting the - aligned copy in its own procedure descriptor */ + .text + .type __stxncpy, @function + .globl __stxncpy + .usepv __stxncpy, no - - .ent stxncpy_aligned - .align 4 -stxncpy_aligned: - .frame sp, 0, t9, 0 - .prologue 0 + cfi_startproc + cfi_return_column (t9) /* On entry to this basic block: t0 == the first destination word for masking back in t1 == the first source word. */ - + .align 4 +stxncpy_aligned: /* Create the 1st output word and detect 0's in the 1st input word. */ lda t2, -1 # E : build a mask against false zero mskqh t2, a1, t2 # U : detection in the src word (stall) @@ -111,7 +108,6 @@ $a_loop: On entry to this basic block we have: t0 == the source word containing the null t7 == the cmpbge mask that found it. */ - $a_eos: negq t7, t8 # E : find low bit set and t7, t8, t8 # E : (stall) @@ -144,15 +140,8 @@ $a_eoc: nop nop - .end stxncpy_aligned - .align 4 - .ent __stxncpy - .globl __stxncpy __stxncpy: - .frame sp, 0, t9, 0 - .prologue 0 - /* Are source and destination co-aligned? */ xor a0, a1, t1 # E : and a0, 7, t0 # E : find dest misalignment @@ -166,16 +155,14 @@ __stxncpy: sll t10, t2, t10 # U : t10 = bitmask of last count byte bne t1, $unaligned # U : + /* We are co-aligned; take care of a partial first word. */ ldq_u t1, 0(a1) # L : load first src word addq a1, 8, a1 # E : - - beq t0, stxncpy_aligned # U : avoid loading dest word if not needed + beq t0, stxncpy_aligned # U : avoid loading dest word if not needed ldq_u t0, 0(a0) # L : - nop - nop - br stxncpy_aligned # .. e1 : + br stxncpy_aligned # U : nop nop nop @@ -231,7 +218,7 @@ $u_head: extqh t2, a1, t0 # U : position lo-bits of hi word (stall) cmpbge zero, t2, t7 # E : - nop + nop bne t7, $u_eos # U : /* Unaligned copy main loop. In order to avoid reading too much, @@ -314,7 +301,7 @@ $u_final: 1: stq_u t0, 0(a0) # L : ret (t9) # L0 : Latency=3 - /* Got to end-of-count before end of string. + /* Got to end-of-count before end of string. On entry to this basic block: t1 == the shifted high-order bits from the previous source word */ $u_eoc: @@ -325,7 +312,7 @@ $u_eoc: ldq_u t2, 8(a1) # L : load final src word nop - extqh t2, a1, t0 # U : extract low bits for last word (stall) + extqh t2, a1, t0 # U : extract low bits for last word (stall) or t1, t0, t1 # E : (stall) 1: cmpbge zero, t1, t7 # E : @@ -394,9 +381,5 @@ $unaligned: stq_u t0, 0(a0) # L : (stall) ret (t9) # L0 : Latency=3 - nop - nop - nop - - .end __stxncpy + cfi_endproc diff --git a/sysdeps/alpha/bzero.S b/sysdeps/alpha/bzero.S index 091024b1ee..a691ff68b4 100644 --- a/sysdeps/alpha/bzero.S +++ b/sysdeps/alpha/bzero.S @@ -36,23 +36,19 @@ .set noreorder .text + .type __bzero, @function + .globl __bzero + .usepv __bzero, USEPV_PROF -/* There is a problem with either gdb (as of 4.16) or gas (as of 2.7) that - doesn't like putting the entry point for a procedure somewhere in the - middle of the procedure descriptor. Work around this by putting the main - loop in its own procedure descriptor. */ + cfi_startproc /* On entry to this basic block: t3 == loop counter t4 == bytes in partial final word a0 == possibly misaligned destination pointer */ - .ent bzero_loop .align 3 bzero_loop: - .frame sp, 0, ra, 0 - .prologue 0 - beq t3, $tail # blbc t3, 0f # skip single store if count even @@ -75,16 +71,11 @@ $tail: bne t4, 1f # is there a tail to do? stq_u t0, 0(a0) # ret # - .end bzero_loop - -ENTRY(__bzero) +__bzero: #ifdef PROF ldgp gp, 0(pv) lda AT, _mcount jsr AT, (AT), _mcount - .prologue 1 -#else - .prologue 0 #endif mov a0, v0 # e0 : move return value in place @@ -115,5 +106,5 @@ $oneq: $done: ret - END(__bzero) + cfi_endproc weak_alias (__bzero, bzero) diff --git a/sysdeps/alpha/memset.S b/sysdeps/alpha/memset.S index 4ac70929c2..db92771e29 100644 --- a/sysdeps/alpha/memset.S +++ b/sysdeps/alpha/memset.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1996-2012 Free Software Foundation, Inc. Contributed by Richard Henderson (rth@tamu.edu) This file is part of the GNU C Library. @@ -37,11 +37,11 @@ .set noreorder .text + .type memset, @function + .globl memset + .usepv memset, USEPV_PROF -/* There is a problem with either gdb (as of 4.16) or gas (as of 2.7) that - doesn't like putting the entry point for a procedure somewhere in the - middle of the procedure descriptor. Work around this by putting the main - loop in its own procedure descriptor. */ + cfi_startproc /* On entry to this basic block: t3 == loop counter @@ -49,12 +49,8 @@ a0 == possibly misaligned destination pointer a1 == replicated source character */ - .ent memset_loop .align 3 memset_loop: - .frame sp, 0, ra, 0 - .prologue 0 - beq t3, $tail blbc t3, 0f # skip single store if count even @@ -80,19 +76,14 @@ $tail: bne t4, 1f # is there a tail to do? stq_u t0, 0(a0) # e0 : ret # .. e1 : - .end memset_loop - -ENTRY(memset) +memset: #ifdef PROF ldgp gp, 0(pv) lda AT, _mcount jsr AT, (AT), _mcount - .prologue 1 -#else - .prologue 0 #endif - zapnot a1, 1, a1 # e0 : zero extend input character + and a1, 0xff, a1 # e0 : zero extend input character mov a0, v0 # .. e1 : move return value in place sll a1, 8, t0 # e0 : begin replicating the char beq a2, $done # .. e1 : early exit for zero-length store @@ -132,5 +123,5 @@ $oneq: $done: ret - END(memset) + cfi_endproc libc_hidden_builtin_def (memset) diff --git a/sysdeps/alpha/stxcpy.S b/sysdeps/alpha/stxcpy.S index 46f19a9858..c55d005893 100644 --- a/sysdeps/alpha/stxcpy.S +++ b/sysdeps/alpha/stxcpy.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996-2012 Free Software Foundation, Inc. Contributed by Richard Henderson (rth@tamu.edu) This file is part of the GNU C Library. @@ -43,22 +43,18 @@ .set noreorder .text + .type __stxcpy, @function + .globl __stxcpy + .usepv __stxcpy, no -/* There is a problem with either gdb (as of 4.16) or gas (as of 2.7) that - doesn't like putting the entry point for a procedure somewhere in the - middle of the procedure descriptor. Work around this by putting the - aligned copy in its own procedure descriptor */ - - .ent stxcpy_aligned - .align 3 -stxcpy_aligned: - .frame sp, 0, t9 - .prologue 0 + cfi_startproc + cfi_return_column (t9) /* On entry to this basic block: t0 == the first destination word for masking back in t1 == the first source word. */ - + .align 3 +stxcpy_aligned: /* Create the 1st output word and detect 0's in the 1st input word. */ lda t2, -1 # e1 : build a mask against false zero mskqh t2, a1, t2 # e0 : detection in the src word @@ -72,7 +68,6 @@ stxcpy_aligned: /* On entry to this basic block: t0 == the first destination word for masking back in t1 == a source word not containing a null. */ - $a_loop: stq_u t1, 0(a0) # e0 : addq a0, 8, a0 # .. e1 : @@ -106,15 +101,8 @@ $a_eos: 1: stq_u t1, 0(a0) # e0 : ret (t9) # .. e1 : - .end stxcpy_aligned - .align 3 - .ent __stxcpy - .globl __stxcpy __stxcpy: - .frame sp, 0, t9 - .prologue 0 - /* Are source and destination co-aligned? */ xor a0, a1, t0 # e0 : unop # : @@ -303,4 +291,4 @@ $unaligned: stq_u t1, 0(a0) # .. e0 : ret (t9) - .end __stxcpy + cfi_endproc diff --git a/sysdeps/alpha/stxncpy.S b/sysdeps/alpha/stxncpy.S index 5b81ac907b..f8b494af0c 100644 --- a/sysdeps/alpha/stxncpy.S +++ b/sysdeps/alpha/stxncpy.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1996-2012 Free Software Foundation, Inc. Contributed by Richard Henderson (rth@tamu.edu) This file is part of the GNU C Library. @@ -52,22 +52,18 @@ .set noreorder .text + .type __stxncpy, @function + .globl __stxncpy + .usepv __stxncpy, no -/* There is a problem with either gdb (as of 4.16) or gas (as of 2.7) that - doesn't like putting the entry point for a procedure somewhere in the - middle of the procedure descriptor. Work around this by putting the - aligned copy in its own procedure descriptor */ - - .ent stxncpy_aligned - .align 3 -stxncpy_aligned: - .frame sp, 0, t9, 0 - .prologue 0 + cfi_startproc + cfi_return_column (t9) /* On entry to this basic block: t0 == the first destination word for masking back in t1 == the first source word. */ - + .align 3 +stxncpy_aligned: /* Create the 1st output word and detect 0's in the 1st input word. */ lda t2, -1 # e1 : build a mask against false zero mskqh t2, a1, t2 # e0 : detection in the src word @@ -81,7 +77,6 @@ stxncpy_aligned: /* On entry to this basic block: t0 == a source word not containing a null. */ - $a_loop: stq_u t0, 0(a0) # e0 : addq a0, 8, a0 # .. e1 : @@ -98,7 +93,6 @@ $a_loop: On entry to this basic block we have: t0 == the source word containing the null t7 == the cmpbge mask that found it. */ - $a_eos: negq t7, t8 # e0 : find low bit set and t7, t8, t8 # e1 (stall) @@ -126,15 +120,8 @@ $a_eoc: or t10, t7, t7 br $a_eos - .end stxncpy_aligned - .align 3 - .ent __stxncpy - .globl __stxncpy __stxncpy: - .frame sp, 0, t9, 0 - .prologue 0 - /* Are source and destination co-aligned? */ xor a0, a1, t1 # e0 : and a0, 7, t0 # .. e1 : find dest misalignment @@ -359,4 +346,4 @@ $unaligned: stq_u t0, 0(a0) # e0 : ret (t9) # .. e1 : - .end __stxncpy + cfi_endproc diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h index e17bf211bd..4ee0746acc 100644 --- a/sysdeps/unix/alpha/sysdep.h +++ b/sysdeps/unix/alpha/sysdep.h @@ -71,6 +71,12 @@ .prologue 1 #endif /* PROF */ +#ifdef PROF +# define USEPV_PROF std +#else +# define USEPV_PROF no +#endif + #if RTLD_PRIVATE_ERRNO # define SYSCALL_ERROR_LABEL $syscall_error # define SYSCALL_ERROR_HANDLER \ From 43ac6d266566b995c0c184dd964987c23ce1e969 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 6 Jun 2012 14:39:23 -0700 Subject: [PATCH 4469/4487] alpha: Fix ev4 build with ev6 compiler --- ChangeLog.alpha | 3 +++ sysdeps/alpha/fpu/e_sqrt.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index ceee910c3c..0598d7ee19 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,5 +1,8 @@ 2012-06-06 Richard Henderson + * sysdeps/alpha/fpu/e_sqrt.c: Include before + redefining __ieee758_sqrt. + * sysdeps/alpha/alphaev6/stxcpy.S: Use cfi markup instead of dual ecoff procedure descriptors. * sysdeps/alpha/alphaev6/stxncpy.S: Likewise. diff --git a/sysdeps/alpha/fpu/e_sqrt.c b/sysdeps/alpha/fpu/e_sqrt.c index 22b24b53f3..ad10dade03 100644 --- a/sysdeps/alpha/fpu/e_sqrt.c +++ b/sysdeps/alpha/fpu/e_sqrt.c @@ -16,7 +16,8 @@ License along with the GNU C Library. If not, see . */ -#include +#include +#include #if !defined(_IEEE_FP_INEXACT) From 8e2f4e971fa048f55428ca49c3a55fa5dc03bd52 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 6 Jun 2012 14:45:45 -0700 Subject: [PATCH 4470/4487] alpha: Fix [BZ #13718] The routines expect to be able to bias the count by a small number. If the count is near -1ull, the count will overflow. Since we cannot use the whole 64-bit address space, bound the count to LONG_MAX. --- ChangeLog.alpha | 4 ++++ sysdeps/alpha/alphaev6/stxncpy.S | 19 +++++++++++++------ sysdeps/alpha/stxncpy.S | 23 +++++++++++++---------- 3 files changed, 30 insertions(+), 16 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 0598d7ee19..d291df970a 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,5 +1,9 @@ 2012-06-06 Richard Henderson + [BZ #13718] + * sysdeps/alpha/stxncmp.S: Bound count to LONG_MAX at startup. + * sysdeps/alpha/alphaev6/stxncmp.S: Likewise. + * sysdeps/alpha/fpu/e_sqrt.c: Include before redefining __ieee758_sqrt. diff --git a/sysdeps/alpha/alphaev6/stxncpy.S b/sysdeps/alpha/alphaev6/stxncpy.S index d134eb8c10..28495df004 100644 --- a/sysdeps/alpha/alphaev6/stxncpy.S +++ b/sysdeps/alpha/alphaev6/stxncpy.S @@ -143,18 +143,25 @@ $a_eoc: .align 4 __stxncpy: /* Are source and destination co-aligned? */ + lda t2, -1 # E : xor a0, a1, t1 # E : and a0, 7, t0 # E : find dest misalignment - and t1, 7, t1 # E : (stall) - addq a2, t0, a2 # E : bias count by dest misalignment (stall) + nop # E : - subq a2, 1, a2 # E : + srl t2, 1, t2 # U : + and t1, 7, t1 # E : + cmovlt a2, t2, a2 # E : bound count to LONG_MAX (stall) + nop # E : + + addq a2, t0, a2 # E : bias count by dest misalignment + subq a2, 1, a2 # E : (stall) and a2, 7, t2 # E : (stall) - srl a2, 3, a2 # U : a2 = loop counter = (count - 1)/8 (stall) - addq zero, 1, t10 # E : + lda t10, 1 # E : + srl a2, 3, a2 # U : a2 = loop counter = (count - 1)/8 sll t10, t2, t10 # U : t10 = bitmask of last count byte - bne t1, $unaligned # U : + nop # E : + bne t1, $unaligned # U : (stall) /* We are co-aligned; take care of a partial first word. */ ldq_u t1, 0(a1) # L : load first src word diff --git a/sysdeps/alpha/stxncpy.S b/sysdeps/alpha/stxncpy.S index f8b494af0c..d2cb9c3c93 100644 --- a/sysdeps/alpha/stxncpy.S +++ b/sysdeps/alpha/stxncpy.S @@ -123,16 +123,19 @@ $a_eoc: .align 3 __stxncpy: /* Are source and destination co-aligned? */ - xor a0, a1, t1 # e0 : - and a0, 7, t0 # .. e1 : find dest misalignment - and t1, 7, t1 # e0 : - addq a2, t0, a2 # .. e1 : bias count by dest misalignment - subq a2, 1, a2 # e0 : - and a2, 7, t2 # e1 : - srl a2, 3, a2 # e0 : a2 = loop counter = (count - 1)/8 - addq zero, 1, t10 # .. e1 : - sll t10, t2, t10 # e0 : t10 = bitmask of last count byte - bne t1, $unaligned # .. e1 : + lda t2, -1 + xor a0, a1, t1 + srl t2, 1, t2 + and a0, 7, t0 # find dest misalignment + cmovlt a2, t2, a2 # bound neg count to LONG_MAX + and t1, 7, t1 + addq a2, t0, a2 # bias count by dest misalignment + subq a2, 1, a2 + and a2, 7, t2 + srl a2, 3, a2 # a2 = loop counter = (count - 1)/8 + addq zero, 1, t10 + sll t10, t2, t10 # t10 = bitmask of last count byte + bne t1, $unaligned /* We are co-aligned; take care of a partial first word. */ From d8cbc13ab6b312b36e718908d57e35203ac07451 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 6 Jun 2012 14:51:05 -0700 Subject: [PATCH 4471/4487] alpha: Fix end-of-count checks in strncmp This routine suffered a similar problem as stxncpy in needing to bias a potentially very large unsigned number with wraparound. This exposed a secondary problem where we didn't properly handle end-of-count condition for the second string input resulting in stratcliff failures. --- ChangeLog.alpha | 3 + sysdeps/alpha/strncmp.S | 251 ++++++++++++++++++++++------------------ 2 files changed, 144 insertions(+), 110 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index d291df970a..824083c323 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,5 +1,8 @@ 2012-06-06 Richard Henderson + * sysdeps/alpha/strncmp.S: Bound count to LONG_MAX at startup. + Re-organize checks vs s2 end-of-count. + [BZ #13718] * sysdeps/alpha/stxncmp.S: Bound count to LONG_MAX at startup. * sysdeps/alpha/alphaev6/stxncmp.S: Likewise. diff --git a/sysdeps/alpha/strncmp.S b/sysdeps/alpha/strncmp.S index c9981e1b66..828f1b9703 100644 --- a/sysdeps/alpha/strncmp.S +++ b/sysdeps/alpha/strncmp.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1996-2012 Free Software Foundation, Inc. Contributed by Richard Henderson (rth@tamu.edu) This file is part of the GNU C Library. @@ -23,6 +23,15 @@ .set noat .set noreorder +/* EV6 only predicts one branch per octaword. We'll use these to push + subsequent branches back to the next bundle. This will generally add + a fetch+decode cycle to older machines, so skip in that case. */ +#ifdef __alpha_fix__ +# define ev6_unop unop +#else +# define ev6_unop +#endif + .text ENTRY(strncmp) @@ -35,128 +44,140 @@ ENTRY(strncmp) .prologue 0 #endif - xor a0, a1, t2 # e0 : are s1 and s2 co-aligned? - beq a2, $zerolength # .. e1 : - ldq_u t0, 0(a0) # e0 : give cache time to catch up - ldq_u t1, 0(a1) # .. e1 : - and t2, 7, t2 # e0 : - and a0, 7, t4 # .. e1 : find s1 misalignment - lda t3, -1 # e0 : - addq a2, t4, a2 # .. e1 : bias count by s1 misalignment - and a2, 7, t10 # e1 : ofs of last byte in last word - srl a2, 3, a2 # .. e0 : remaining full words in count - and a1, 7, t5 # e0 : find s2 misalignment - bne t2, $unaligned # .. e1 : + xor a0, a1, t2 # are s1 and s2 co-aligned? + beq a2, $zerolength + ldq_u t0, 0(a0) # load asap to give cache time to catch up + ldq_u t1, 0(a1) + lda t3, -1 + and t2, 7, t2 + srl t3, 1, t6 + and a0, 7, t4 # find s1 misalignment + and a1, 7, t5 # find s2 misalignment + cmovlt a2, t6, a2 # bound neg count to LONG_MAX + addq a1, a2, a3 # s2+count + addq a2, t4, a2 # bias count by s1 misalignment + and a2, 7, t10 # ofs of last byte in s1 last word + srl a2, 3, a2 # remaining full words in s1 count + bne t2, $unaligned /* On entry to this basic block: t0 == the first word of s1. t1 == the first word of s2. t3 == -1. */ - $aligned: - mskqh t3, a1, t3 # e0 : mask off leading garbage - nop # .. e1 : - ornot t1, t3, t1 # e0 : - ornot t0, t3, t0 # .. e1 : - cmpbge zero, t1, t7 # e0 : bits set iff null found - beq a2, $eoc # .. e1 : check end of count - unop # e0 : - bne t7, $eos # .. e1 : - unop # e0 : - beq t10, $ant_loop # .. e1 : + mskqh t3, a1, t8 # mask off leading garbage + ornot t1, t8, t1 + ornot t0, t8, t0 + cmpbge zero, t1, t7 # bits set iff null found + beq a2, $eoc # check end of count + bne t7, $eos + beq t10, $ant_loop /* Aligned compare main loop. On entry to this basic block: t0 == an s1 word. t1 == an s2 word not containing a null. */ + .align 4 $a_loop: xor t0, t1, t2 # e0 : bne t2, $wordcmp # .. e1 (zdb) ldq_u t1, 8(a1) # e0 : ldq_u t0, 8(a0) # .. e1 : + subq a2, 1, a2 # e0 : addq a1, 8, a1 # .. e1 : addq a0, 8, a0 # e0 : beq a2, $eoc # .. e1 : + cmpbge zero, t1, t7 # e0 : beq t7, $a_loop # .. e1 : - unop # e0 : - br $eos # .. e1 : + + br $eos /* Alternate aligned compare loop, for when there's no trailing bytes on the count. We have to avoid reading too much data. */ + .align 4 $ant_loop: xor t0, t1, t2 # e0 : + ev6_unop + ev6_unop bne t2, $wordcmp # .. e1 (zdb) + subq a2, 1, a2 # e0 : beq a2, $zerolength # .. e1 : ldq_u t1, 8(a1) # e0 : ldq_u t0, 8(a0) # .. e1 : + addq a1, 8, a1 # e0 : addq a0, 8, a0 # .. e1 : cmpbge zero, t1, t7 # e0 : beq t7, $ant_loop # .. e1 : - unop # e0 : - br $eos # .. e1 : + + br $eos /* The two strings are not co-aligned. Align s1 and cope. */ + /* On entry to this basic block: + t0 == the first word of s1. + t1 == the first word of s2. + t3 == -1. + t4 == misalignment of s1. + t5 == misalignment of s2. + t10 == misalignment of s1 end. */ + .align 4 $unaligned: - subq a1, t4, a1 # e0 : - unop # : - - /* If s2 misalignment is larger than s2 misalignment, we need + /* If s1 misalignment is larger than s2 misalignment, we need extra startup checks to avoid SEGV. */ + subq a1, t4, a1 # adjust s2 for s1 misalignment + cmpult t4, t5, t9 + subq a3, 1, a3 # last byte of s2 + bic a1, 7, t8 + mskqh t3, t5, t7 # mask garbage in s2 + subq a3, t8, a3 + ornot t1, t7, t7 + srl a3, 3, a3 # remaining full words in s2 count + beq t9, $u_head + + /* Failing that, we need to look for both eos and eoc within the + first word of s2. If we find either, we can continue by + pretending that the next word of s2 is all zeros. */ + lda t2, 0 # next = zero + cmpeq a3, 0, t8 # eoc in the first word of s2? + cmpbge zero, t7, t7 # eos in the first word of s2? + or t7, t8, t8 + bne t8, $u_head_nl - cmplt t4, t5, t8 # .. e1 : - beq t8, $u_head # e1 : - - mskqh t3, t5, t3 # e0 : - ornot t1, t3, t3 # e0 : - cmpbge zero, t3, t7 # e1 : is there a zero? - beq t7, $u_head # e1 : - - /* We've found a zero in the first partial word of s2. Align - our current s1 and s2 words and compare what we've got. */ - - extql t1, t5, t1 # e0 : - lda t3, -1 # .. e1 : - insql t1, a0, t1 # e0 : - mskqh t3, a0, t3 # e0 : - ornot t1, t3, t1 # e0 : - ornot t0, t3, t0 # .. e1 : - cmpbge zero, t1, t7 # e0 : find that zero again - beq a2, $eoc # .. e1 : and finish up - br $eos # e1 : - - .align 3 -$u_head: /* We know just enough now to be able to assemble the first full word of s2. We can still find a zero at the end of it. On entry to this basic block: t0 == first word of s1 - t1 == first partial word of s2. */ - - ldq_u t2, 8(a1) # e0 : load second partial s2 word - lda t3, -1 # .. e1 : create leading garbage mask - extql t1, a1, t1 # e0 : create first s2 word - mskqh t3, a0, t3 # e0 : - extqh t2, a1, t4 # e0 : - ornot t0, t3, t0 # .. e1 : kill s1 garbage - or t1, t4, t1 # e0 : s2 word now complete - ornot t1, t3, t1 # e1 : kill s2 garbage - cmpbge zero, t0, t7 # e0 : find zero in first s1 word - beq a2, $eoc # .. e1 : - lda t3, -1 # e0 : - bne t7, $eos # .. e1 : - subq a2, 1, a2 # e0 : - xor t0, t1, t4 # .. e1 : compare aligned words - mskql t3, a1, t3 # e0 : mask out s2[1] bits we have seen - bne t4, $wordcmp # .. e1 : - or t2, t3, t3 # e0 : - cmpbge zero, t3, t7 # e1 : find zero in high bits of s2[1] - bne t7, $u_final # e1 : + t1 == first partial word of s2. + t3 == -1. + t10 == ofs of last byte in s1 last word. + t11 == ofs of last byte in s2 last word. */ +$u_head: + ldq_u t2, 8(a1) # load second partial s2 word + subq a3, 1, a3 +$u_head_nl: + extql t1, a1, t1 # create first s2 word + mskqh t3, a0, t8 + extqh t2, a1, t4 + ornot t0, t8, t0 # kill s1 garbage + or t1, t4, t1 # s2 word now complete + cmpbge zero, t0, t7 # find eos in first s1 word + ornot t1, t8, t1 # kill s2 garbage + beq a2, $eoc + subq a2, 1, a2 + bne t7, $eos + mskql t3, a1, t8 # mask out s2[1] bits we have seen + xor t0, t1, t4 # compare aligned words + or t2, t8, t8 + bne t4, $wordcmp + cmpbge zero, t8, t7 # eos in high bits of s2[1]? + cmpeq a3, 0, t8 # eoc in s2[1]? + or t7, t8, t7 + bne t7, $u_final /* Unaligned copy main loop. In order to avoid reading too much, the loop is structured to detect zeros in aligned words from s2. @@ -166,43 +187,54 @@ $u_head: to run as fast as possible. On entry to this basic block: - t2 == the unshifted low-bits from the next s2 word. */ - - .align 3 + t2 == the unshifted low-bits from the next s2 word. + t10 == ofs of last byte in s1 last word. + t11 == ofs of last byte in s2 last word. */ + .align 4 $u_loop: extql t2, a1, t3 # e0 : ldq_u t2, 16(a1) # .. e1 : load next s2 high bits ldq_u t0, 8(a0) # e0 : load next s1 word addq a1, 8, a1 # .. e1 : + addq a0, 8, a0 # e0 : - nop # .. e1 : + subq a3, 1, a3 # .. e1 : extqh t2, a1, t1 # e0 : - cmpbge zero, t0, t7 # .. e1 : find zero in current s1 word + cmpbge zero, t0, t7 # .. e1 : eos in current s1 word + or t1, t3, t1 # e0 : - beq a2, $eoc # .. e1 : check for end of count + beq a2, $eoc # .. e1 : eoc in current s1 word subq a2, 1, a2 # e0 : + cmpbge zero, t2, t4 # .. e1 : eos in s2[1] + + xor t0, t1, t3 # e0 : compare the words + ev6_unop + ev6_unop bne t7, $eos # .. e1 : - xor t0, t1, t4 # e0 : compare the words - bne t4, $wordcmp # .. e1 (zdb) - cmpbge zero, t2, t4 # e0 : find zero in next low bits + + cmpeq a3, 0, t5 # e0 : eoc in s2[1] + ev6_unop + ev6_unop + bne t3, $wordcmp # .. e1 : + + or t4, t5, t4 # e0 : eos or eoc in s2[1]. beq t4, $u_loop # .. e1 (zdb) /* We've found a zero in the low bits of the last s2 word. Get the next s1 word and align them. */ + .align 3 $u_final: - ldq_u t0, 8(a0) # e1 : - extql t2, a1, t1 # .. e0 : - cmpbge zero, t1, t7 # e0 : - bne a2, $eos # .. e1 : + ldq_u t0, 8(a0) + extql t2, a1, t1 + cmpbge zero, t1, t7 + bne a2, $eos /* We've hit end of count. Zero everything after the count and compare whats left. */ - .align 3 $eoc: mskql t0, t10, t0 mskql t1, t10, t1 - unop cmpbge zero, t1, t7 /* We've found a zero somewhere in a word we just read. @@ -210,32 +242,31 @@ $eoc: t0 == s1 word t1 == s2 word t7 == cmpbge mask containing the zero. */ - + .align 3 $eos: - negq t7, t6 # e0 : create bytemask of valid data - and t6, t7, t8 # e1 : - subq t8, 1, t6 # e0 : - or t6, t8, t7 # e1 : - zapnot t0, t7, t0 # e0 : kill the garbage - zapnot t1, t7, t1 # .. e1 : - xor t0, t1, v0 # e0 : and compare - beq v0, $done # .. e1 : + negq t7, t6 # create bytemask of valid data + and t6, t7, t8 + subq t8, 1, t6 + or t6, t8, t7 + zapnot t0, t7, t0 # kill the garbage + zapnot t1, t7, t1 + xor t0, t1, v0 # ... and compare + beq v0, $done /* Here we have two differing co-aligned words in t0 & t1. Bytewise compare them and return (t0 > t1 ? 1 : -1). */ .align 3 $wordcmp: - cmpbge t0, t1, t2 # e0 : comparison yields bit mask of ge - cmpbge t1, t0, t3 # .. e1 : - xor t2, t3, t0 # e0 : bits set iff t0/t1 bytes differ - negq t0, t1 # e1 : clear all but least bit - and t0, t1, t0 # e0 : - lda v0, -1 # .. e1 : - and t0, t2, t1 # e0 : was bit set in t0 > t1? - cmovne t1, 1, v0 # .. e1 (zdb) - + cmpbge t0, t1, t2 # comparison yields bit mask of ge + cmpbge t1, t0, t3 + xor t2, t3, t0 # bits set iff t0/t1 bytes differ + negq t0, t1 # clear all but least bit + and t0, t1, t0 + lda v0, -1 + and t0, t2, t1 # was bit set in t0 > t1? + cmovne t1, 1, v0 $done: - ret # e1 : + ret .align 3 $zerolength: From e21d3e83ee6541416929f4a67a39539e3fb6ad59 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 8 Jun 2012 10:49:08 +0000 Subject: [PATCH 4472/4487] Update powerpc-nofpu ABI baseline for __mcount_internal. --- ChangeLog.powerpc | 5 +++++ .../sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist | 1 + 2 files changed, 6 insertions(+) diff --git a/ChangeLog.powerpc b/ChangeLog.powerpc index ee958ebc9e..8ad5badb54 100644 --- a/ChangeLog.powerpc +++ b/ChangeLog.powerpc @@ -1,3 +1,8 @@ +2012-06-08 Joseph Myers + + * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist: + Update. + 2012-05-31 Joseph Myers * sysdeps/powerpc/nofpu/libm-test-ulps: Regenerated. diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist index eb54f653a6..43015f4e92 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist @@ -1762,6 +1762,7 @@ GLIBC_2.15 GLIBC_2.16 GLIBC_2.16 A __getauxval F + __mcount_internal F __poll_chk F __ppoll_chk F aligned_alloc F From 64957ecc066d2358699baddafcaf761e61c8d590 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 12 Jun 2012 19:13:08 +0000 Subject: [PATCH 4473/4487] Use HIDDEN_JUMPTARGET for _exit jump from __startcontext. --- ChangeLog.arm | 5 +++++ sysdeps/unix/sysv/linux/arm/setcontext.S | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 20664aa19c..c411e1c1fc 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,8 @@ +2012-06-12 Joseph Myers + + * sysdeps/unix/sysv/linux/arm/setcontext.S (__startcontext): Use + HIDDEN_JUMPTARGET for _exit jump. + 2012-05-30 Joseph Myers * sysdeps/unix/sysv/linux/arm/syscalls.list: Remove diff --git a/sysdeps/unix/sysv/linux/arm/setcontext.S b/sysdeps/unix/sysv/linux/arm/setcontext.S index b472947731..d163fc4a4c 100644 --- a/sysdeps/unix/sysv/linux/arm/setcontext.S +++ b/sysdeps/unix/sysv/linux/arm/setcontext.S @@ -87,7 +87,7 @@ ENTRY(__startcontext) bne PLTJMP(__setcontext) @ New context was 0 - exit - b PLTJMP(_exit) + b PLTJMP(HIDDEN_JUMPTARGET(_exit)) END(__startcontext) #ifdef PIC From 7fe70b0c0610a5dcc13f557468eabc91cdd34a27 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 13 Jun 2012 21:12:06 +0000 Subject: [PATCH 4474/4487] powerpc-nofpu: Allow abort and soft-fp symbols to be absent in localplt test. --- ChangeLog.powerpc | 5 +++ data/localplt-powerpcsoft-linux-gnu.data | 52 ++++++++++++------------ 2 files changed, 31 insertions(+), 26 deletions(-) diff --git a/ChangeLog.powerpc b/ChangeLog.powerpc index 8ad5badb54..0c7d3af0e2 100644 --- a/ChangeLog.powerpc +++ b/ChangeLog.powerpc @@ -1,3 +1,8 @@ +2012-06-13 Joseph Myers + + * data/localplt-powerpcsoft-linux-gnu.data: Allow abort and + soft-fp symbols to be absent. + 2012-06-08 Joseph Myers * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist: diff --git a/data/localplt-powerpcsoft-linux-gnu.data b/data/localplt-powerpcsoft-linux-gnu.data index 65fa5dac96..0743b08a39 100644 --- a/data/localplt-powerpcsoft-linux-gnu.data +++ b/data/localplt-powerpcsoft-linux-gnu.data @@ -1,32 +1,32 @@ libc.so: _Unwind_Find_FDE -libc.so: __adddf3 -libc.so: __addsf3 -libc.so: __divdf3 -libc.so: __divsf3 -libc.so: __eqdf2 -libc.so: __eqsf2 -libc.so: __extendsfdf2 -libc.so: __fixdfsi -libc.so: __fixsfsi -libc.so: __fixunsdfsi -libc.so: __floatsidf -libc.so: __floatsisf -libc.so: __floatunsidf -libc.so: __floatunsisf -libc.so: __gedf2 -libc.so: __gtdf2 -libc.so: __ledf2 -libc.so: __ltdf2 -libc.so: __muldf3 -libc.so: __mulsf3 -libc.so: __nedf2 +libc.so: __adddf3 ? +libc.so: __addsf3 ? +libc.so: __divdf3 ? +libc.so: __divsf3 ? +libc.so: __eqdf2 ? +libc.so: __eqsf2 ? +libc.so: __extendsfdf2 ? +libc.so: __fixdfsi ? +libc.so: __fixsfsi ? +libc.so: __fixunsdfsi ? +libc.so: __floatsidf ? +libc.so: __floatsisf ? +libc.so: __floatunsidf ? +libc.so: __floatunsisf ? +libc.so: __gedf2 ? +libc.so: __gtdf2 ? +libc.so: __ledf2 ? +libc.so: __ltdf2 ? +libc.so: __muldf3 ? +libc.so: __mulsf3 ? +libc.so: __nedf2 ? libc.so: __signbit libc.so: __signbitl -libc.so: __subdf3 -libc.so: __subsf3 -libc.so: __truncdfsf2 -libc.so: __unorddf2 -libc.so: abort +libc.so: __subdf3 ? +libc.so: __subsf3 ? +libc.so: __truncdfsf2 ? +libc.so: __unorddf2 ? +libc.so: abort ? libc.so: calloc libc.so: free libc.so: malloc From e525bc9c260c6dcb96cd08590a8a983701af9419 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 14 Jun 2012 15:18:27 +0000 Subject: [PATCH 4475/4487] Fix MIPS32 frame-pointer forcing for more recent GCC. --- ChangeLog.mips | 6 ++++++ sysdeps/unix/sysv/linux/mips/mips32/sysdep.h | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 853f286811..9469b5c576 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,9 @@ +2012-06-14 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/mips32/sysdep.h + (FORCE_FRAME_POINTER): Assign result of alloca to a volatile + variable. + 2012-06-01 Joseph Myers * sysdeps/mips/mips64/n32/s_fma.c: New file. diff --git a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h index e51f3295ea..8c024b0241 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h @@ -194,8 +194,9 @@ /* We need to use a frame pointer for the functions in which we adjust $sp around the syscall, or debug information and unwind information will be $sp relative and thus wrong during the syscall. As - of GCC 3.4.3, this is sufficient. */ -#define FORCE_FRAME_POINTER alloca (4) + of GCC 4.7, this is sufficient. */ +#define FORCE_FRAME_POINTER \ + void *volatile __fp_force __attribute__ ((unused)) = alloca (4) #define internal_syscall5(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4, arg5)\ ({ \ From a7940a70850f0e98e51bd76616203bc17aaa0621 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 15 Jun 2012 11:56:47 -0700 Subject: [PATCH 4476/4487] alpha: Fix float_t in bits/mathdef.h --- sysdeps/alpha/bits/mathdef.h | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/sysdeps/alpha/bits/mathdef.h b/sysdeps/alpha/bits/mathdef.h index ae0049ade3..393547c1e6 100644 --- a/sysdeps/alpha/bits/mathdef.h +++ b/sysdeps/alpha/bits/mathdef.h @@ -25,19 +25,9 @@ #if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF # define _MATH_H_MATHDEF 1 -# ifdef __GNUC__ - -/* In GNU or ANSI mode, gcc leaves `float' expressions as-is. */ -typedef float float_t; -typedef double double_t; - -# else - -/* Wild guess at types for float_t and double_t. */ -typedef double float_t; -typedef double double_t; - -# endif +/* Alpha has "float" and "double" operations. */ +typedef float float_t; /* float expressions are evaluated as float. */ +typedef double double_t; /* double expressions are evaluated as double. */ /* The values returned by `ilogb' for 0 and NaN respectively. */ # define FP_ILOGB0 (-2147483647) From c0b21b69584c20eb757931f7a7f6a0e8b1154419 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 15 Jun 2012 12:00:25 -0700 Subject: [PATCH 4477/4487] alpha: Remove some __GNUC_PREREQs that are too old --- sysdeps/alpha/fpu/cfloat-compat.h | 21 +++---------------- sysdeps/alpha/fpu/s_fabs.c | 7 +------ sysdeps/alpha/fpu/s_fabsf.c | 7 +------ sysdeps/unix/sysv/linux/alpha/sysconf.c | 28 ++----------------------- 4 files changed, 7 insertions(+), 56 deletions(-) diff --git a/sysdeps/alpha/fpu/cfloat-compat.h b/sysdeps/alpha/fpu/cfloat-compat.h index f75bb9bb82..35542e641c 100644 --- a/sysdeps/alpha/fpu/cfloat-compat.h +++ b/sysdeps/alpha/fpu/cfloat-compat.h @@ -1,5 +1,5 @@ /* Compatibility macros for old and new Alpha complex float ABI. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004-2012 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,35 +25,20 @@ follow the official Tru64 ABI, which passes the components of a complex as separate parameters. */ -#if __GNUC_PREREQ(3,4) - typedef union { double d; _Complex float cf; } c1_compat; +typedef union { double d; _Complex float cf; } c1_compat; # define c1_cfloat_decl(x) double x # define c1_cfloat_real(x) __real__ c1_cfloat_value (x) # define c1_cfloat_imag(x) __imag__ c1_cfloat_value (x) # define c1_cfloat_value(x) (((c1_compat *)(void *)&x)->cf) # define c1_cfloat_rettype double # define c1_cfloat_return(x) ({ c1_compat _; _.cf = (x); _.d; }) + # define c2_cfloat_decl(x) _Complex float x # define c2_cfloat_real(x) __real__ x # define c2_cfloat_imag(x) __imag__ x # define c2_cfloat_value(x) x # define c2_cfloat_rettype _Complex float # define c2_cfloat_return(x) x -#else -# define c1_cfloat_decl(x) _Complex float x -# define c1_cfloat_real(x) __real__ x -# define c1_cfloat_imag(x) __imag__ x -# define c1_cfloat_value(x) x -# define c1_cfloat_rettype _Complex float -# define c1_cfloat_return(x) x -# define c2_cfloat_decl(x) float x ## r, float x ## i -# define c2_cfloat_real(x) x ## r -# define c2_cfloat_imag(x) x ## i -# define c2_cfloat_value(x) \ - ({ _Complex float _; __real__ _ = x##r; __imag__ _ = x##i; _; }) -# define c2_cfloat_rettype double _Complex -# define c2_cfloat_return(x) x -#endif /* Get the proper symbol versions defined for each function. */ diff --git a/sysdeps/alpha/fpu/s_fabs.c b/sysdeps/alpha/fpu/s_fabs.c index 0105162719..f970acd80d 100644 --- a/sysdeps/alpha/fpu/s_fabs.c +++ b/sysdeps/alpha/fpu/s_fabs.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2006, 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson. @@ -22,12 +22,7 @@ double __fabs (double x) { -#if __GNUC_PREREQ (2, 8) return __builtin_fabs (x); -#else - __asm ("cpys $f31, %1, %0" : "=f" (x) : "f" (x)); - return x; -#endif } weak_alias (__fabs, fabs) diff --git a/sysdeps/alpha/fpu/s_fabsf.c b/sysdeps/alpha/fpu/s_fabsf.c index 05f776e906..5c80ae856c 100644 --- a/sysdeps/alpha/fpu/s_fabsf.c +++ b/sysdeps/alpha/fpu/s_fabsf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson. @@ -21,12 +21,7 @@ float __fabsf (float x) { -#if __GNUC_PREREQ (2, 8) return __builtin_fabsf (x); -#else - __asm ("cpys $f31, %1, %0" : "=f" (x) : "f" (x)); - return x; -#endif } weak_alias (__fabsf, fabsf) diff --git a/sysdeps/unix/sysv/linux/alpha/sysconf.c b/sysdeps/unix/sysv/linux/alpha/sysconf.c index afb7aa6d7f..603157e3ac 100644 --- a/sysdeps/unix/sysv/linux/alpha/sysconf.c +++ b/sysdeps/unix/sysv/linux/alpha/sysconf.c @@ -28,30 +28,6 @@ static long int linux_sysconf (int name); extern long __libc_alpha_cache_shape[4]; -static inline unsigned long -implver (void) -{ - unsigned long i; -#if __GNUC_PREREQ(3,3) - i = __builtin_alpha_implver (); -#else - asm ("implver %0" : "=r" (i)); -#endif - return i; -} - -static inline unsigned long -amask (unsigned long x) -{ - unsigned long r; -#if __GNUC_PREREQ(3,3) - r = __builtin_alpha_amask (x); -#else - asm ("amask %1,%0" : "=r"(r) : "Ir"(x)); -#endif - return r; -} - /* Get the value of the system variable NAME. */ long int __sysconf (int name) @@ -79,7 +55,7 @@ __sysconf (int name) pages or have the kernel do the timings from KSEG. Fortunately, kernels beginning with 2.6.5 will pass us this info in auxvec. */ - switch (implver()) + switch (__builtin_alpha_implver ()) { case 0: /* EV4 */ /* EV4/LCA45 had 8k L1 caches; EV45 had 16k L1 caches. */ @@ -89,7 +65,7 @@ __sysconf (int name) break; case 1: /* EV5 */ - if (amask (1 << 8)) + if (__builtin_alpha_amask (1 << 8)) { /* MAX insns not present; either EV5 or EV56. */ shape_l1i = shape_l1d = CSHAPE(8*1024, 5, 1); From 53c2cb7641bd866398156625ef672bbd2d78a0d8 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 15 Jun 2012 12:01:39 -0700 Subject: [PATCH 4478/4487] alpha: Add missing definitions in resource.h, shm.h --- sysdeps/unix/sysv/linux/alpha/bits/resource.h | 42 +++++++++++++++++-- sysdeps/unix/sysv/linux/alpha/bits/shm.h | 4 +- 2 files changed, 40 insertions(+), 6 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/resource.h b/sysdeps/unix/sysv/linux/alpha/bits/resource.h index da7b5a41a8..4df082cd21 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/resource.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/resource.h @@ -1,6 +1,5 @@ /* Bit values & structures for resource limits. Alpha/Linux version. - Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2004, 2005 - Free Software Foundation, Inc. + Copyright (C) 1994-2012 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 @@ -99,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 @@ -157,10 +162,11 @@ enum __rusage_who #define RUSAGE_SELF RUSAGE_SELF /* All of its terminated child processes. */ - RUSAGE_CHILDREN = -1, + RUSAGE_CHILDREN = -1 #define RUSAGE_CHILDREN RUSAGE_CHILDREN #ifdef __USE_GNU + , /* The calling thread. */ RUSAGE_THREAD = 1 # define RUSAGE_THREAD RUSAGE_THREAD @@ -230,3 +236,31 @@ enum __priority_which PRIO_USER = 2 /* WHO is a user ID. */ #define PRIO_USER PRIO_USER }; + + +__BEGIN_DECLS + +#ifdef __USE_GNU +/* Modify and return resource limits of a process atomically. */ +# ifndef __USE_FILE_OFFSET64 +extern int prlimit (__pid_t __pid, enum __rlimit_resource __resource, + const struct rlimit *__new_limit, + struct rlimit *__old_limit) __THROW; +# else +# ifdef __REDIRECT_NTH +extern int __REDIRECT_NTH (prlimit, (__pid_t __pid, + enum __rlimit_resource __resource, + const struct rlimit *__new_limit, + struct rlimit *__old_limit), prlimit64); +# else +# define prlimit prlimit64 +# endif +# endif +# ifdef __USE_LARGEFILE64 +extern int prlimit64 (__pid_t __pid, enum __rlimit_resource __resource, + const struct rlimit64 *__new_limit, + struct rlimit64 *__old_limit) __THROW; +# endif +#endif + +__END_DECLS diff --git a/sysdeps/unix/sysv/linux/alpha/bits/shm.h b/sysdeps/unix/sysv/linux/alpha/bits/shm.h index a52a266a77..48f4cb9305 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/shm.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/shm.h @@ -1,5 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997, 2000, 2002, 2004 - Free Software Foundation, Inc. +/* Copyright (C) 1995-2012 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 @@ -30,6 +29,7 @@ #define SHM_RDONLY 010000 /* attach read-only else read-write */ #define SHM_RND 020000 /* round attach address to SHMLBA */ #define SHM_REMAP 040000 /* take-over region on attach */ +#define SHM_EXEC 0100000 /* execution access */ /* Commands for `shmctl'. */ #define SHM_LOCK 11 /* lock segment (root only) */ From ef4239ed09dd9f242de9d02f8629f1248b8e0bfa Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 15 Jun 2012 12:05:26 -0700 Subject: [PATCH 4479/4487] alpha: Fix protection on UTIME_NOW --- sysdeps/unix/sysv/linux/alpha/bits/stat.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/stat.h b/sysdeps/unix/sysv/linux/alpha/bits/stat.h index a958916469..68e5989aa2 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/stat.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/stat.h @@ -1,5 +1,4 @@ -/* Copyright (C) 1996,1997,1998,1999,2000,2001,2004,2010,2012 - Free Software Foundation, Inc. +/* Copyright (C) 1996-2012 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 @@ -153,8 +152,7 @@ struct stat64 #define __S_IWRITE 0200 /* Write by owner. */ #define __S_IEXEC 0100 /* Execute by owner. */ -#if defined __USE_ATFILE || defined __USE_GNU -/* XXX This will change to the macro for the next 2008 POSIX revision. */ +#ifdef __USE_ATFILE # define UTIME_NOW ((1l << 30) - 1l) # define UTIME_OMIT ((1l << 30) - 2l) #endif From 45c8de68d5ffe794665a22cb537c87834e83f726 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 15 Jun 2012 12:06:44 -0700 Subject: [PATCH 4480/4487] alpha: Use builtins for copysign --- sysdeps/alpha/fpu/s_copysign.c | 5 ++--- sysdeps/alpha/fpu/s_copysignf.c | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/sysdeps/alpha/fpu/s_copysign.c b/sysdeps/alpha/fpu/s_copysign.c index 51a5c645a1..b01202772b 100644 --- a/sysdeps/alpha/fpu/s_copysign.c +++ b/sysdeps/alpha/fpu/s_copysign.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2006, 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson. @@ -22,8 +22,7 @@ double __copysign (double x, double y) { - __asm ("cpys %1, %2, %0" : "=f" (x) : "f" (y), "f" (x)); - return x; + return __builtin_copysign (x, y); } weak_alias (__copysign, copysign) diff --git a/sysdeps/alpha/fpu/s_copysignf.c b/sysdeps/alpha/fpu/s_copysignf.c index 2ccd52e0b8..c304949899 100644 --- a/sysdeps/alpha/fpu/s_copysignf.c +++ b/sysdeps/alpha/fpu/s_copysignf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson. @@ -21,8 +21,7 @@ float __copysignf (float x, float y) { - __asm ("cpys %1, %2, %0" : "=f" (x) : "f" (y), "f" (x)); - return x; + return __builtin_copysignf (x, y); } weak_alias (__copysignf, copysignf) From f56ed78d4ad3fa029df5db1110aee06f1e26f199 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 15 Jun 2012 12:17:11 -0700 Subject: [PATCH 4481/4487] [BZ #13848] alpha: Fix s_nearbyint implementation. --- sysdeps/alpha/fpu/s_nearbyint.c | 31 ++++++++++++++-------------- sysdeps/alpha/fpu/s_nearbyintf.c | 35 +++++++++++++++++++------------- 2 files changed, 37 insertions(+), 29 deletions(-) diff --git a/sysdeps/alpha/fpu/s_nearbyint.c b/sysdeps/alpha/fpu/s_nearbyint.c index 1f89260569..4589bfcc3e 100644 --- a/sysdeps/alpha/fpu/s_nearbyint.c +++ b/sysdeps/alpha/fpu/s_nearbyint.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2007 Free Software Foundation, Inc. +/* Copyright (C) 2000-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson. @@ -19,22 +19,23 @@ #include #include -#ifdef _IEEE_FP_INEXACT -#error "Don't compile with -mieee-with-inexact" -#endif double __nearbyint (double x) { - double two52 = copysign (0x1.0p52, x); - double r; - - r = x + two52; - r = r - two52; - - /* nearbyint(-0.1) == -0, and in general we'll always have the same sign - as our input. */ - return copysign (r, x); + if (isless (fabs (x), 9007199254740992.0)) /* 1 << DBL_MANT_DIG */ + { + double tmp1, new_x; + __asm ("cvttq/svd %2,%1\n\t" + "cvtqt/d %1,%0\n\t" + : "=f"(new_x), "=&f"(tmp1) + : "f"(x)); + + /* nearbyint(-0.1) == -0, and in general we'll always have the same + sign as our input. */ + x = copysign(new_x, x); + } + return x; } weak_alias (__nearbyint, nearbyint) @@ -42,6 +43,6 @@ weak_alias (__nearbyint, nearbyint) strong_alias (__nearbyint, __nearbyintl) weak_alias (__nearbyint, nearbyintl) #endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __nearbyint, nearbyintl, GLIBC_2_1); +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) +compat_symbol (libm, __nearbyint, nearbyintl, GLIBC_2_0); #endif diff --git a/sysdeps/alpha/fpu/s_nearbyintf.c b/sysdeps/alpha/fpu/s_nearbyintf.c index efea95902b..871b9f6a02 100644 --- a/sysdeps/alpha/fpu/s_nearbyintf.c +++ b/sysdeps/alpha/fpu/s_nearbyintf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2007 Free Software Foundation, Inc. +/* Copyright (C) 2007-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson. @@ -18,22 +18,29 @@ #include -#ifdef _IEEE_FP_INEXACT -#error "Don't compile with -mieee-with-inexact" -#endif - float __nearbyintf (float x) { - float two23 = copysignf (0x1.0p23, x); - float r; - - r = x + two23; - r = r - two23; - - /* nearbyint(-0.1) == -0, and in general we'll always have the same sign - as our input. */ - return copysign (r, x); + if (isless (fabsf (x), 16777216.0f)) /* 1 << FLT_MANT_DIG */ + { + /* Note that Alpha S_Floating is stored in registers in a + restricted T_Floating format, so we don't even need to + convert back to S_Floating in the end. The initial + conversion to T_Floating is needed to handle denormals. */ + + float tmp1, tmp2, new_x; + + __asm ("cvtst/s %3,%2\n\t" + "cvttq/svd %2,%1\n\t" + "cvtqt/d %1,%0\n\t" + : "=f"(new_x), "=&f"(tmp1), "=&f"(tmp2) + : "f"(x)); + + /* nearbyintf(-0.1) == -0, and in general we'll always have the same + sign as our input. */ + x = copysignf(new_x, x); + } + return x; } weak_alias (__nearbyintf, nearbyintf) From 7fd8e5a4e43032533a724efa1a8e9488bcbcf040 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 15 Jun 2012 12:17:48 -0700 Subject: [PATCH 4482/4487] alpha: Always handle inexact in rint implementations --- ChangeLog.alpha | 30 ++++++++++++++++++++++++++++++ sysdeps/alpha/fpu/s_rint.c | 9 ++------- sysdeps/alpha/fpu/s_rintf.c | 6 +----- 3 files changed, 33 insertions(+), 12 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 824083c323..5ec363444b 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,33 @@ +2012-06-15 Richard Henderson + + * sysdeps/alpha/fpu/s_rint.c (__rint): Handle inexact regardless + of -mieee-with-inexact. + * sysdeps/alpha/fpu/s_rintf.c (__rintf): Likewise. + + [BZ #13848] + * sysdeps/alpha/fpu/s_nearbyint.c (__nearbyint): Fix corner cases + similar to BZ#5350. + * sysdeps/alpha/fpu/s_nearbyintf.c (__nearbyintf): Likewise. + + * sysdeps/alpha/fpu/s_copysign.c (__copysign): Use builtin. + * sysdeps/alpha/fpu/s_copysignf.c (__copysignf): Use builtin. + + * sysdeps/unix/sysv/linux/alpha/bits/resource.h (RLIMIT_RTTIME): New. + (prlimit, prlimit64): New declarations. + * sysdeps/unix/sysv/linux/alpha/bits/shm.h (SHM_EXEC): New. + * sysdeps/unix/sysv/linux/alpha/bits/stat.h: Use only __USE_ATFILE + to protect UTIME_NOW and UTIME_OMIT. + + * sysdeps/alpha/fpu/cfloat-compat.h: Remove __GNUC_PREREQ check. + * sysdeps/alpha/fpu/s_fabs.c (__fabs): Likewise. + * sysdeps/alpha/fpu/s_fabsf.c (__fabsf): Likewise. + * sysdeps/unix/sysv/linux/alpha/sysconf.c (implver): Remove. + (amask): Remove. + (__sysconf): Use builtins directly. + + * sysdeps/alpha/bits/mathdef.h (float_t): Define as float + regardless of __GNUC__. + 2012-06-06 Richard Henderson * sysdeps/alpha/strncmp.S: Bound count to LONG_MAX at startup. diff --git a/sysdeps/alpha/fpu/s_rint.c b/sysdeps/alpha/fpu/s_rint.c index b58ef81edf..6ddcc13bf2 100644 --- a/sysdeps/alpha/fpu/s_rint.c +++ b/sysdeps/alpha/fpu/s_rint.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2006, 2007 Free Software Foundation, Inc. +/* Copyright (C) 2000-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson. @@ -26,12 +26,7 @@ __rint (double x) if (isless (fabs (x), 9007199254740992.0)) /* 1 << DBL_MANT_DIG */ { double tmp1, new_x; - __asm ( -#ifdef _IEEE_FP_INEXACT - "cvttq/svid %2,%1\n\t" -#else - "cvttq/svd %2,%1\n\t" -#endif + __asm ("cvttq/svid %2,%1\n\t" "cvtqt/d %1,%0\n\t" : "=f"(new_x), "=&f"(tmp1) : "f"(x)); diff --git a/sysdeps/alpha/fpu/s_rintf.c b/sysdeps/alpha/fpu/s_rintf.c index b17bf8c364..226e77e9bf 100644 --- a/sysdeps/alpha/fpu/s_rintf.c +++ b/sysdeps/alpha/fpu/s_rintf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2007 Free Software Foundation, Inc. +/* Copyright (C) 2000-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson. @@ -32,11 +32,7 @@ __rintf (float x) float tmp1, tmp2, new_x; __asm ("cvtst/s %3,%2\n\t" -#ifdef _IEEE_FP_INEXACT "cvttq/svid %2,%1\n\t" -#else - "cvttq/svd %2,%1\n\t" -#endif "cvtqt/d %1,%0\n\t" : "=f"(new_x), "=&f"(tmp1), "=&f"(tmp2) : "f"(x)); From 5400a7d131ecf621f074ae242867de2f78076b28 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 15 Jun 2012 14:26:58 -0700 Subject: [PATCH 4483/4487] alpha: Define FP_TRAPPING_EXCEPTIONS --- ChangeLog.alpha | 2 ++ sysdeps/alpha/soft-fp/sfp-machine.h | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 5ec363444b..062b4f283d 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,5 +1,7 @@ 2012-06-15 Richard Henderson + * sysdeps/alpha/soft-fp/sfp-machine.h (FP_TRAPPING_EXCEPTIONS): New. + * sysdeps/alpha/fpu/s_rint.c (__rint): Handle inexact regardless of -mieee-with-inexact. * sysdeps/alpha/fpu/s_rintf.c (__rintf): Likewise. diff --git a/sysdeps/alpha/soft-fp/sfp-machine.h b/sysdeps/alpha/soft-fp/sfp-machine.h index ef6e957140..202f7366cb 100644 --- a/sysdeps/alpha/soft-fp/sfp-machine.h +++ b/sysdeps/alpha/soft-fp/sfp-machine.h @@ -1,6 +1,6 @@ /* Machine-dependent software floating-point definitions. Alpha userland IEEE 128-bit version. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com), Jakub Jelinek (jj@ultra.linux.cz) and @@ -91,3 +91,6 @@ do { \ __ieee_set_fp_control (t | _fex); \ } \ } while (0) + +#define FP_TRAPPING_EXCEPTIONS \ + ((__ieee_get_fp_control () & SWCR_ENABLE_MASK) << SWCR_ENABLE_SHIFT) From a978616d7be275bc615ae00c671745c854e8e715 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 19 Jun 2012 16:38:44 +0000 Subject: [PATCH 4484/4487] Update MIPS32 ABI baselines for _gp_disp. --- ChangeLog.mips | 43 +++++++++++++++++++ .../sysv/linux/mips/mips32/nptl/ld.abilist | 2 +- .../mips/mips32/nptl/libBrokenLocale.abilist | 2 +- .../linux/mips/mips32/nptl/libanl.abilist | 2 +- .../sysv/linux/mips/mips32/nptl/libc.abilist | 2 +- .../linux/mips/mips32/nptl/libcidn.abilist | 2 +- .../linux/mips/mips32/nptl/libcrypt.abilist | 2 +- .../sysv/linux/mips/mips32/nptl/libdl.abilist | 2 +- .../sysv/linux/mips/mips32/nptl/libm.abilist | 2 +- .../linux/mips/mips32/nptl/libnsl.abilist | 2 +- .../mips/mips32/nptl/libnss_compat.abilist | 2 +- .../linux/mips/mips32/nptl/libnss_db.abilist | 2 +- .../linux/mips/mips32/nptl/libnss_dns.abilist | 2 +- .../mips/mips32/nptl/libnss_files.abilist | 2 +- .../mips/mips32/nptl/libnss_hesiod.abilist | 2 +- .../linux/mips/mips32/nptl/libnss_nis.abilist | 2 +- .../mips/mips32/nptl/libnss_nisplus.abilist | 2 +- .../linux/mips/mips32/nptl/libpthread.abilist | 2 +- .../linux/mips/mips32/nptl/libresolv.abilist | 2 +- .../sysv/linux/mips/mips32/nptl/librt.abilist | 2 +- .../mips/mips32/nptl/libthread_db.abilist | 2 +- .../linux/mips/mips32/nptl/libutil.abilist | 2 +- 22 files changed, 64 insertions(+), 21 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 9469b5c576..337ef43c9a 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,46 @@ +2012-06-19 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/mips32/nptl/ld.abilist: Update + _gp_disp entry. + * sysdeps/unix/sysv/linux/mips/mips32/nptl/libBrokenLocale.abilist: + Likewise. + * sysdeps/unix/sysv/linux/mips/mips32/nptl/libanl.abilist: + Likewise. + * sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist: Likewise. + * sysdeps/unix/sysv/linux/mips/mips32/nptl/libcidn.abilist: + Likewise. + * sysdeps/unix/sysv/linux/mips/mips32/nptl/libcrypt.abilist: + Likewise. + * sysdeps/unix/sysv/linux/mips/mips32/nptl/libdl.abilist: + Likewise. + * sysdeps/unix/sysv/linux/mips/mips32/nptl/libm.abilist: Likewise. + * sysdeps/unix/sysv/linux/mips/mips32/nptl/libnsl.abilist: + Likewise. + * sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_compat.abilist: + Likewise. + * sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_db.abilist: + Likewise. + * sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_dns.abilist: + Likewise. + * sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_files.abilist: + Likewise. + * sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_hesiod.abilist: + Likewise. + * sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_nis.abilist: + Likewise. + * sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_nisplus.abilist: + Likewise. + * sysdeps/unix/sysv/linux/mips/mips32/nptl/libpthread.abilist: + Likewise. + * sysdeps/unix/sysv/linux/mips/mips32/nptl/libresolv.abilist: + Likewise. + * sysdeps/unix/sysv/linux/mips/mips32/nptl/librt.abilist: + Likewise. + * sysdeps/unix/sysv/linux/mips/mips32/nptl/libthread_db.abilist: + Likewise. + * sysdeps/unix/sysv/linux/mips/mips32/nptl/libutil.abilist: + Likewise. + 2012-06-14 Joseph Myers * sysdeps/unix/sysv/linux/mips/mips32/sysdep.h diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/ld.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nptl/ld.abilist index 507115565b..21a212d1ff 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/nptl/ld.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/nptl/ld.abilist @@ -17,4 +17,4 @@ GLIBC_2.4 GLIBC_2.4 A __stack_chk_guard D 0x4 _gp_disp - A + _gp_disp A diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libBrokenLocale.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libBrokenLocale.abilist index 6951abb98e..1f5c1e2935 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libBrokenLocale.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libBrokenLocale.abilist @@ -2,4 +2,4 @@ GLIBC_2.0 GLIBC_2.0 A __ctype_get_mb_cur_max F _gp_disp - A + _gp_disp A diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libanl.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libanl.abilist index 14555a7127..b1dcc5ade6 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libanl.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libanl.abilist @@ -5,4 +5,4 @@ GLIBC_2.2.3 gai_suspend F getaddrinfo_a F _gp_disp - A + _gp_disp A diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist index c780ca60fd..80f7d3321d 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist @@ -2241,4 +2241,4 @@ GLIBC_2.9 inotify_init1 F pipe2 F _gp_disp - A + _gp_disp A diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libcidn.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libcidn.abilist index 426f583bab..3bda3ac3b1 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libcidn.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libcidn.abilist @@ -1,2 +1,2 @@ _gp_disp - A + _gp_disp A diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libcrypt.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libcrypt.abilist index 26399f96cc..c548eee671 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libcrypt.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libcrypt.abilist @@ -8,4 +8,4 @@ GLIBC_2.0 setkey F setkey_r F _gp_disp - A + _gp_disp A diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libdl.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libdl.abilist index d7e86d0447..49d9581f59 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libdl.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libdl.abilist @@ -17,4 +17,4 @@ GLIBC_2.3.4 GLIBC_2.3.4 A dlmopen F _gp_disp - A + _gp_disp A diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libm.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libm.abilist index 6361c9d59a..defa1b0b49 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libm.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libm.abilist @@ -373,4 +373,4 @@ GLIBC_2.4 GLIBC_2.4 A exp2l F _gp_disp - A + _gp_disp A diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnsl.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnsl.abilist index d230db86ca..dbf11b808f 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnsl.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnsl.abilist @@ -124,4 +124,4 @@ GLIBC_2.2 xdr_obj_p F xdr_ypall F _gp_disp - A + _gp_disp A diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_compat.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_compat.abilist index 426f583bab..3bda3ac3b1 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_compat.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_compat.abilist @@ -1,2 +1,2 @@ _gp_disp - A + _gp_disp A diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_db.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_db.abilist index 426f583bab..3bda3ac3b1 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_db.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_db.abilist @@ -1,2 +1,2 @@ _gp_disp - A + _gp_disp A diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_dns.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_dns.abilist index 426f583bab..3bda3ac3b1 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_dns.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_dns.abilist @@ -1,2 +1,2 @@ _gp_disp - A + _gp_disp A diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_files.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_files.abilist index 426f583bab..3bda3ac3b1 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_files.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_files.abilist @@ -1,2 +1,2 @@ _gp_disp - A + _gp_disp A diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_hesiod.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_hesiod.abilist index 426f583bab..3bda3ac3b1 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_hesiod.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_hesiod.abilist @@ -1,2 +1,2 @@ _gp_disp - A + _gp_disp A diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_nis.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_nis.abilist index 426f583bab..3bda3ac3b1 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_nis.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_nis.abilist @@ -1,2 +1,2 @@ _gp_disp - A + _gp_disp A diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_nisplus.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_nisplus.abilist index 426f583bab..3bda3ac3b1 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_nisplus.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_nisplus.abilist @@ -1,2 +1,2 @@ _gp_disp - A + _gp_disp A diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libpthread.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libpthread.abilist index 2280889f7f..c3ba9d4f4d 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libpthread.abilist @@ -262,4 +262,4 @@ GLIBC_2.4 pthread_mutexattr_setprotocol F pthread_mutexattr_setrobust_np F _gp_disp - A + _gp_disp A diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libresolv.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libresolv.abilist index 2cd54d8d2f..41205ea636 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libresolv.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libresolv.abilist @@ -103,4 +103,4 @@ GLIBC_2.9 ns_sprintrrf F ns_subdomain F _gp_disp - A + _gp_disp A diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/librt.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nptl/librt.abilist index 63fdc10e6f..207605eff3 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/nptl/librt.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/nptl/librt.abilist @@ -49,4 +49,4 @@ GLIBC_2.7 GLIBC_2.7 A __mq_open_2 F _gp_disp - A + _gp_disp A diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libthread_db.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libthread_db.abilist index 9f4cadb78a..76ded51299 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libthread_db.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libthread_db.abilist @@ -47,4 +47,4 @@ GLIBC_2.3.3 GLIBC_2.3.3 A td_thr_tlsbase F _gp_disp - A + _gp_disp A diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libutil.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libutil.abilist index 8f3d9336eb..119a9df922 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libutil.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/nptl/libutil.abilist @@ -7,4 +7,4 @@ GLIBC_2.0 logwtmp F openpty F _gp_disp - A + _gp_disp A From ac80ce0bd9c22b85aae0a39cd719b9c90b08ced7 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Thu, 21 Jun 2012 17:05:25 +0000 Subject: [PATCH 4485/4487] Add .gitignore. Ignore the autoconf cache directory. --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..1c3f260296 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +autom4te*.cache From a20c2b3c87aebc7d4b090c622d36480263b80042 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Thu, 21 Jun 2012 17:08:19 +0000 Subject: [PATCH 4486/4487] Add Changelog ... ... for ac80ce0bd9c22b85aae0a39cd719b9c90b08ced7. --- ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ChangeLog b/ChangeLog index 6a37d349fc..4eb1e7f61b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2012-06-21 Carlos O'Donell + + * .gitignore: New file. + 2012-02-07 Joseph Myers * README: Update. From e64ac02c24b43659048622714afdc92fedf561fa Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sun, 1 Jul 2012 13:06:41 +0000 Subject: [PATCH 4487/4487] Move all files into ports/ subdirectory in preparation for merge with glibc --- .gitignore => ports/.gitignore | 0 Banner => ports/Banner | 0 ChangeLog => ports/ChangeLog | 0 ChangeLog.aix => ports/ChangeLog.aix | 0 ChangeLog.alpha => ports/ChangeLog.alpha | 0 ChangeLog.am33 => ports/ChangeLog.am33 | 0 ChangeLog.arm => ports/ChangeLog.arm | 0 ChangeLog.cris => ports/ChangeLog.cris | 0 ChangeLog.hppa => ports/ChangeLog.hppa | 0 ChangeLog.ia64 => ports/ChangeLog.ia64 | 0 ChangeLog.linux-generic => ports/ChangeLog.linux-generic | 0 ChangeLog.m68k => ports/ChangeLog.m68k | 0 ChangeLog.mips => ports/ChangeLog.mips | 0 ChangeLog.powerpc => ports/ChangeLog.powerpc | 0 ChangeLog.tile => ports/ChangeLog.tile | 0 Makefile => ports/Makefile | 0 README => ports/README | 0 {data => ports/data}/c++-types-arm-linux-gnueabi.data | 0 {data => ports/data}/c++-types-m68k-linux-gnu.data | 0 {data => ports/data}/c++-types-powerpcsoft-linux-gnu.data | 0 {data => ports/data}/c++-types-tilegx-linux-gnu.data | 0 {data => ports/data}/c++-types-tilepro-linux-gnu.data | 0 {data => ports/data}/localplt-alpha-linux-gnu.data | 0 {data => ports/data}/localplt-arm-linux-gnueabi.data | 0 {data => ports/data}/localplt-ia64-linux-gnu.data | 0 {data => ports/data}/localplt-m68k-linux-gnu.data | 0 {data => ports/data}/localplt-powerpcsoft-linux-gnu.data | 0 {sysdeps => ports/sysdeps}/alpha/Implies | 0 {sysdeps => ports/sysdeps}/alpha/Makefile | 0 {sysdeps => ports/sysdeps}/alpha/Subdirs | 0 {sysdeps => ports/sysdeps}/alpha/Versions | 0 {sysdeps => ports/sysdeps}/alpha/__longjmp.S | 0 {sysdeps => ports/sysdeps}/alpha/_mcount.S | 0 {sysdeps => ports/sysdeps}/alpha/add_n.S | 0 {sysdeps => ports/sysdeps}/alpha/addmul_1.S | 0 {sysdeps => ports/sysdeps}/alpha/alphaev5/add_n.S | 0 {sysdeps => ports/sysdeps}/alpha/alphaev5/lshift.S | 0 {sysdeps => ports/sysdeps}/alpha/alphaev5/rshift.S | 0 {sysdeps => ports/sysdeps}/alpha/alphaev5/sub_n.S | 0 {sysdeps => ports/sysdeps}/alpha/alphaev6/Implies | 0 {sysdeps => ports/sysdeps}/alpha/alphaev6/addmul_1.S | 0 {sysdeps => ports/sysdeps}/alpha/alphaev6/fpu/e_sqrt.S | 0 {sysdeps => ports/sysdeps}/alpha/alphaev6/fpu/e_sqrtf.S | 0 {sysdeps => ports/sysdeps}/alpha/alphaev6/memcpy.S | 0 {sysdeps => ports/sysdeps}/alpha/alphaev6/memset.S | 0 {sysdeps => ports/sysdeps}/alpha/alphaev6/stxcpy.S | 0 {sysdeps => ports/sysdeps}/alpha/alphaev6/stxncpy.S | 0 {sysdeps => ports/sysdeps}/alpha/alphaev67/Implies | 0 {sysdeps => ports/sysdeps}/alpha/alphaev67/ffs.S | 0 {sysdeps => ports/sysdeps}/alpha/alphaev67/ffsll.S | 0 {sysdeps => ports/sysdeps}/alpha/alphaev67/fpu/Implies | 0 {sysdeps => ports/sysdeps}/alpha/alphaev67/rawmemchr.S | 0 {sysdeps => ports/sysdeps}/alpha/alphaev67/stpcpy.S | 0 {sysdeps => ports/sysdeps}/alpha/alphaev67/stpncpy.S | 0 {sysdeps => ports/sysdeps}/alpha/alphaev67/strcat.S | 0 {sysdeps => ports/sysdeps}/alpha/alphaev67/strchr.S | 0 {sysdeps => ports/sysdeps}/alpha/alphaev67/strlen.S | 0 {sysdeps => ports/sysdeps}/alpha/alphaev67/strncat.S | 0 {sysdeps => ports/sysdeps}/alpha/alphaev67/strrchr.S | 0 {sysdeps => ports/sysdeps}/alpha/backtrace.c | 0 {sysdeps => ports/sysdeps}/alpha/bb_init_func.S | 0 {sysdeps => ports/sysdeps}/alpha/bits/atomic.h | 0 {sysdeps => ports/sysdeps}/alpha/bits/endian.h | 0 {sysdeps => ports/sysdeps}/alpha/bits/link.h | 0 {sysdeps => ports/sysdeps}/alpha/bits/mathdef.h | 0 {sysdeps => ports/sysdeps}/alpha/bits/setjmp.h | 0 {sysdeps => ports/sysdeps}/alpha/bsd-_setjmp.S | 0 {sysdeps => ports/sysdeps}/alpha/bsd-setjmp.S | 0 {sysdeps => ports/sysdeps}/alpha/bzero.S | 0 {sysdeps => ports/sysdeps}/alpha/configure | 0 {sysdeps => ports/sysdeps}/alpha/configure.in | 0 {sysdeps => ports/sysdeps}/alpha/crti.S | 0 {sysdeps => ports/sysdeps}/alpha/crtn.S | 0 {sysdeps => ports/sysdeps}/alpha/div.S | 0 {sysdeps => ports/sysdeps}/alpha/div_libc.h | 0 {sysdeps => ports/sysdeps}/alpha/divl.S | 0 {sysdeps => ports/sysdeps}/alpha/divlu.S | 0 {sysdeps => ports/sysdeps}/alpha/divq.S | 0 {sysdeps => ports/sysdeps}/alpha/divqu.S | 0 {sysdeps => ports/sysdeps}/alpha/dl-dtprocnum.h | 0 {sysdeps => ports/sysdeps}/alpha/dl-machine.h | 0 {sysdeps => ports/sysdeps}/alpha/dl-procinfo.c | 0 {sysdeps => ports/sysdeps}/alpha/dl-procinfo.h | 0 {sysdeps => ports/sysdeps}/alpha/dl-sysdep.h | 0 {sysdeps => ports/sysdeps}/alpha/dl-tls.h | 0 {sysdeps => ports/sysdeps}/alpha/dl-trampoline.S | 0 {sysdeps => ports/sysdeps}/alpha/ffs.S | 0 {sysdeps => ports/sysdeps}/alpha/ffsll.S | 0 {sysdeps => ports/sysdeps}/alpha/fpu/Versions | 0 {sysdeps => ports/sysdeps}/alpha/fpu/bits/fenv.h | 0 {sysdeps => ports/sysdeps}/alpha/fpu/bits/mathinline.h | 0 {sysdeps => ports/sysdeps}/alpha/fpu/cabsf.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/cargf.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/cfloat-compat.h | 0 {sysdeps => ports/sysdeps}/alpha/fpu/cimagf.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/conjf.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/crealf.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/e_sqrt.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/fclrexcpt.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/fedisblxcpt.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/feenablxcpt.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/fegetenv.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/fegetexcept.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/fegetround.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/feholdexcpt.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/fenv_libc.h | 0 {sysdeps => ports/sysdeps}/alpha/fpu/fesetenv.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/fesetround.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/feupdateenv.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/fgetexcptflg.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/fpu_control.h | 0 {sysdeps => ports/sysdeps}/alpha/fpu/fsetexcptflg.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/ftestexcept.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/libm-test-ulps | 0 {sysdeps => ports/sysdeps}/alpha/fpu/math_private.h | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_cacosf.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_cacoshf.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_casinf.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_casinhf.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_catanf.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_catanhf.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_ccosf.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_ccoshf.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_ceil.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_ceilf.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_cexpf.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_clog10f.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_clogf.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_copysign.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_copysignf.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_cpowf.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_cprojf.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_csinf.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_csinhf.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_csqrtf.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_ctanf.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_ctanhf.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_fabs.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_fabsf.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_floor.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_floorf.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_fmax.S | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_fmaxf.S | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_fmin.S | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_fminf.S | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_isnan.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_isnanf.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_llrint.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_llrintf.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_llround.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_llroundf.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_lrint.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_lrintf.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_lround.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_lroundf.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_nearbyint.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_nearbyintf.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_rint.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_rintf.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_round.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_roundf.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_trunc.c | 0 {sysdeps => ports/sysdeps}/alpha/fpu/s_truncf.c | 0 {sysdeps => ports/sysdeps}/alpha/gccframe.h | 0 {sysdeps => ports/sysdeps}/alpha/hp-timing.h | 0 {sysdeps => ports/sysdeps}/alpha/htonl.S | 0 {sysdeps => ports/sysdeps}/alpha/htons.S | 0 {sysdeps => ports/sysdeps}/alpha/jmpbuf-offsets.h | 0 {sysdeps => ports/sysdeps}/alpha/jmpbuf-unwind.h | 0 {sysdeps => ports/sysdeps}/alpha/ldiv.S | 0 {sysdeps => ports/sysdeps}/alpha/ldsodefs.h | 0 {sysdeps => ports/sysdeps}/alpha/libc-tls.c | 0 {sysdeps => ports/sysdeps}/alpha/lldiv.S | 0 {sysdeps => ports/sysdeps}/alpha/lshift.S | 0 {sysdeps => ports/sysdeps}/alpha/machine-gmon.h | 0 {sysdeps => ports/sysdeps}/alpha/memchr.c | 0 {sysdeps => ports/sysdeps}/alpha/memset.S | 0 {sysdeps => ports/sysdeps}/alpha/memusage.h | 0 {sysdeps => ports/sysdeps}/alpha/mul_1.S | 0 {sysdeps => ports/sysdeps}/alpha/nptl/Makefile | 0 {sysdeps => ports/sysdeps}/alpha/nptl/pthread_spin_lock.S | 0 {sysdeps => ports/sysdeps}/alpha/nptl/pthread_spin_trylock.S | 0 {sysdeps => ports/sysdeps}/alpha/nptl/pthreaddef.h | 0 {sysdeps => ports/sysdeps}/alpha/nptl/tcb-offsets.sym | 0 {sysdeps => ports/sysdeps}/alpha/nptl/tls.h | 0 {sysdeps => ports/sysdeps}/alpha/nscd-types.h | 0 {sysdeps => ports/sysdeps}/alpha/preconfigure | 0 {sysdeps => ports/sysdeps}/alpha/rawmemchr.S | 0 {sysdeps => ports/sysdeps}/alpha/reml.S | 0 {sysdeps => ports/sysdeps}/alpha/remlu.S | 0 {sysdeps => ports/sysdeps}/alpha/remq.S | 0 {sysdeps => ports/sysdeps}/alpha/remqu.S | 0 {sysdeps => ports/sysdeps}/alpha/rshift.S | 0 {sysdeps => ports/sysdeps}/alpha/setjmp.S | 0 {sysdeps => ports/sysdeps}/alpha/shlib-versions | 0 {sysdeps => ports/sysdeps}/alpha/soft-fp/Makefile | 0 {sysdeps => ports/sysdeps}/alpha/soft-fp/Versions | 0 {sysdeps => ports/sysdeps}/alpha/soft-fp/e_sqrtl.c | 0 {sysdeps => ports/sysdeps}/alpha/soft-fp/local-soft-fp.h | 0 {sysdeps => ports/sysdeps}/alpha/soft-fp/ots_add.c | 0 {sysdeps => ports/sysdeps}/alpha/soft-fp/ots_cmp.c | 0 {sysdeps => ports/sysdeps}/alpha/soft-fp/ots_cmpe.c | 0 {sysdeps => ports/sysdeps}/alpha/soft-fp/ots_cvtqux.c | 0 {sysdeps => ports/sysdeps}/alpha/soft-fp/ots_cvtqx.c | 0 {sysdeps => ports/sysdeps}/alpha/soft-fp/ots_cvttx.c | 0 {sysdeps => ports/sysdeps}/alpha/soft-fp/ots_cvtxq.c | 0 {sysdeps => ports/sysdeps}/alpha/soft-fp/ots_cvtxt.c | 0 {sysdeps => ports/sysdeps}/alpha/soft-fp/ots_div.c | 0 {sysdeps => ports/sysdeps}/alpha/soft-fp/ots_mul.c | 0 {sysdeps => ports/sysdeps}/alpha/soft-fp/ots_nintxq.c | 0 {sysdeps => ports/sysdeps}/alpha/soft-fp/ots_sub.c | 0 {sysdeps => ports/sysdeps}/alpha/soft-fp/sfp-machine.h | 0 {sysdeps => ports/sysdeps}/alpha/stackinfo.h | 0 {sysdeps => ports/sysdeps}/alpha/start.S | 0 {sysdeps => ports/sysdeps}/alpha/stpcpy.S | 0 {sysdeps => ports/sysdeps}/alpha/stpncpy.S | 0 {sysdeps => ports/sysdeps}/alpha/strcat.S | 0 {sysdeps => ports/sysdeps}/alpha/strchr.S | 0 {sysdeps => ports/sysdeps}/alpha/strcmp.S | 0 {sysdeps => ports/sysdeps}/alpha/strcpy.S | 0 {sysdeps => ports/sysdeps}/alpha/strlen.S | 0 {sysdeps => ports/sysdeps}/alpha/strncat.S | 0 {sysdeps => ports/sysdeps}/alpha/strncmp.S | 0 {sysdeps => ports/sysdeps}/alpha/strncpy.S | 0 {sysdeps => ports/sysdeps}/alpha/strrchr.S | 0 {sysdeps => ports/sysdeps}/alpha/stxcpy.S | 0 {sysdeps => ports/sysdeps}/alpha/stxncpy.S | 0 {sysdeps => ports/sysdeps}/alpha/sub_n.S | 0 {sysdeps => ports/sysdeps}/alpha/submul_1.S | 0 {sysdeps => ports/sysdeps}/alpha/tls-macros.h | 0 {sysdeps => ports/sysdeps}/alpha/tst-audit.h | 0 {sysdeps => ports/sysdeps}/alpha/udiv_qrnnd.S | 0 {sysdeps => ports/sysdeps}/am33/Implies | 0 {sysdeps => ports/sysdeps}/am33/__longjmp.S | 0 {sysdeps => ports/sysdeps}/am33/atomicity.h | 0 {sysdeps => ports/sysdeps}/am33/bits/endian.h | 0 {sysdeps => ports/sysdeps}/am33/bits/setjmp.h | 0 {sysdeps => ports/sysdeps}/am33/bsd-_setjmp.S | 0 {sysdeps => ports/sysdeps}/am33/bsd-setjmp.S | 0 {sysdeps => ports/sysdeps}/am33/dl-machine.h | 0 {sysdeps => ports/sysdeps}/am33/elf/start.S | 0 {sysdeps => ports/sysdeps}/am33/fpu/bits/fenv.h | 0 {sysdeps => ports/sysdeps}/am33/fpu/fclrexcpt.c | 0 {sysdeps => ports/sysdeps}/am33/fpu/fedisblxcpt.c | 0 {sysdeps => ports/sysdeps}/am33/fpu/feenablxcpt.c | 0 {sysdeps => ports/sysdeps}/am33/fpu/fegetenv.c | 0 {sysdeps => ports/sysdeps}/am33/fpu/fegetexcept.c | 0 {sysdeps => ports/sysdeps}/am33/fpu/fegetround.c | 0 {sysdeps => ports/sysdeps}/am33/fpu/feholdexcpt.c | 0 {sysdeps => ports/sysdeps}/am33/fpu/fenv_libc.h | 0 {sysdeps => ports/sysdeps}/am33/fpu/fesetenv.c | 0 {sysdeps => ports/sysdeps}/am33/fpu/fesetround.c | 0 {sysdeps => ports/sysdeps}/am33/fpu/feupdateenv.c | 0 {sysdeps => ports/sysdeps}/am33/fpu/fgetexcptflg.c | 0 {sysdeps => ports/sysdeps}/am33/fpu/fpu_control.h | 0 {sysdeps => ports/sysdeps}/am33/fpu/fraiseexcpt.c | 0 {sysdeps => ports/sysdeps}/am33/fpu/fsetexcptflg.c | 0 {sysdeps => ports/sysdeps}/am33/fpu/ftestexcept.c | 0 {sysdeps => ports/sysdeps}/am33/jmpbuf-offsets.h | 0 {sysdeps => ports/sysdeps}/am33/jmpbuf-unwind.h | 0 {sysdeps => ports/sysdeps}/am33/linuxthreads/pspinlock.c | 0 {sysdeps => ports/sysdeps}/am33/linuxthreads/pt-machine.h | 0 {sysdeps => ports/sysdeps}/am33/memusage.h | 0 {sysdeps => ports/sysdeps}/am33/preconfigure | 0 {sysdeps => ports/sysdeps}/am33/setjmp.S | 0 {sysdeps => ports/sysdeps}/am33/shlib-versions | 0 {sysdeps => ports/sysdeps}/am33/stackinfo.h | 0 {sysdeps => ports/sysdeps}/am33/sys/ucontext.h | 0 {sysdeps => ports/sysdeps}/am33/sysdep.h | 0 {sysdeps => ports/sysdeps}/arm/Implies | 0 {sysdeps => ports/sysdeps}/arm/Makefile | 0 {sysdeps => ports/sysdeps}/arm/Versions | 0 {sysdeps => ports/sysdeps}/arm/__longjmp.S | 0 {sysdeps => ports/sysdeps}/arm/abi-note.S | 0 {sysdeps => ports/sysdeps}/arm/aeabi_assert.c | 0 {sysdeps => ports/sysdeps}/arm/aeabi_atexit.c | 0 {sysdeps => ports/sysdeps}/arm/aeabi_errno_addr.c | 0 {sysdeps => ports/sysdeps}/arm/aeabi_lcsts.c | 0 {sysdeps => ports/sysdeps}/arm/aeabi_localeconv.c | 0 {sysdeps => ports/sysdeps}/arm/aeabi_math.c | 0 {sysdeps => ports/sysdeps}/arm/aeabi_mb_cur_max.c | 0 {sysdeps => ports/sysdeps}/arm/aeabi_memclr.c | 0 {sysdeps => ports/sysdeps}/arm/aeabi_memcpy.c | 0 {sysdeps => ports/sysdeps}/arm/aeabi_memmove.c | 0 {sysdeps => ports/sysdeps}/arm/aeabi_memset.c | 0 {sysdeps => ports/sysdeps}/arm/aeabi_sighandlers.S | 0 {sysdeps => ports/sysdeps}/arm/aeabi_unwind_cpp_pr1.c | 0 {sysdeps => ports/sysdeps}/arm/arm-mcount.S | 0 {sysdeps => ports/sysdeps}/arm/armv6t2/memchr.S | 0 {sysdeps => ports/sysdeps}/arm/armv7/Implies | 0 {sysdeps => ports/sysdeps}/arm/backtrace.c | 0 {sysdeps => ports/sysdeps}/arm/bits/endian.h | 0 {sysdeps => ports/sysdeps}/arm/bits/fenv.h | 0 {sysdeps => ports/sysdeps}/arm/bits/link.h | 0 {sysdeps => ports/sysdeps}/arm/bits/linkmap.h | 0 {sysdeps => ports/sysdeps}/arm/bits/mathdef.h | 0 {sysdeps => ports/sysdeps}/arm/bits/setjmp.h | 0 {sysdeps => ports/sysdeps}/arm/bsd-_setjmp.S | 0 {sysdeps => ports/sysdeps}/arm/bsd-setjmp.S | 0 {sysdeps => ports/sysdeps}/arm/configure | 0 {sysdeps => ports/sysdeps}/arm/configure.in | 0 {sysdeps => ports/sysdeps}/arm/crti.S | 0 {sysdeps => ports/sysdeps}/arm/crtn.S | 0 {sysdeps => ports/sysdeps}/arm/dl-irel.h | 0 {sysdeps => ports/sysdeps}/arm/dl-lookupcfg.h | 0 {sysdeps => ports/sysdeps}/arm/dl-machine.h | 0 {sysdeps => ports/sysdeps}/arm/dl-sysdep.h | 0 {sysdeps => ports/sysdeps}/arm/dl-tls.h | 0 {sysdeps => ports/sysdeps}/arm/dl-tlsdesc.S | 0 {sysdeps => ports/sysdeps}/arm/dl-tlsdesc.h | 0 {sysdeps => ports/sysdeps}/arm/dl-trampoline.S | 0 {sysdeps => ports/sysdeps}/arm/fclrexcpt.c | 0 {sysdeps => ports/sysdeps}/arm/fedisblxcpt.c | 0 {sysdeps => ports/sysdeps}/arm/feenablxcpt.c | 0 {sysdeps => ports/sysdeps}/arm/fegetenv.c | 0 {sysdeps => ports/sysdeps}/arm/fegetexcept.c | 0 {sysdeps => ports/sysdeps}/arm/fegetround.c | 0 {sysdeps => ports/sysdeps}/arm/feholdexcpt.c | 0 {sysdeps => ports/sysdeps}/arm/fesetenv.c | 0 {sysdeps => ports/sysdeps}/arm/fesetround.c | 0 {sysdeps => ports/sysdeps}/arm/feupdateenv.c | 0 {sysdeps => ports/sysdeps}/arm/fgetexcptflg.c | 0 {sysdeps => ports/sysdeps}/arm/find_exidx.c | 0 {sysdeps => ports/sysdeps}/arm/fpu_control.h | 0 {sysdeps => ports/sysdeps}/arm/fraiseexcpt.c | 0 {sysdeps => ports/sysdeps}/arm/frame.h | 0 {sysdeps => ports/sysdeps}/arm/framestate.c | 0 {sysdeps => ports/sysdeps}/arm/fsetexcptflg.c | 0 {sysdeps => ports/sysdeps}/arm/ftestexcept.c | 0 {sysdeps => ports/sysdeps}/arm/gccframe.h | 0 {sysdeps => ports/sysdeps}/arm/gmp-mparam.h | 0 {sysdeps => ports/sysdeps}/arm/jmpbuf-offsets.h | 0 {sysdeps => ports/sysdeps}/arm/jmpbuf-unwind.h | 0 {sysdeps => ports/sysdeps}/arm/ldsodefs.h | 0 {sysdeps => ports/sysdeps}/arm/libc-tls.c | 0 {sysdeps => ports/sysdeps}/arm/libm-test-ulps | 0 {sysdeps => ports/sysdeps}/arm/machine-gmon.h | 0 {sysdeps => ports/sysdeps}/arm/memcpy.S | 0 {sysdeps => ports/sysdeps}/arm/memmove.S | 0 {sysdeps => ports/sysdeps}/arm/memset.S | 0 {sysdeps => ports/sysdeps}/arm/memusage.h | 0 {sysdeps => ports/sysdeps}/arm/nptl/Makefile | 0 {sysdeps => ports/sysdeps}/arm/nptl/pthread_spin_lock.c | 0 {sysdeps => ports/sysdeps}/arm/nptl/pthread_spin_trylock.c | 0 {sysdeps => ports/sysdeps}/arm/nptl/pthreaddef.h | 0 {sysdeps => ports/sysdeps}/arm/nptl/tcb-offsets.sym | 0 {sysdeps => ports/sysdeps}/arm/nptl/tls.h | 0 {sysdeps => ports/sysdeps}/arm/preconfigure | 0 {sysdeps => ports/sysdeps}/arm/rtld-global-offsets.sym | 0 {sysdeps => ports/sysdeps}/arm/setfpucw.c | 0 {sysdeps => ports/sysdeps}/arm/setjmp.S | 0 {sysdeps => ports/sysdeps}/arm/shlib-versions | 0 {sysdeps => ports/sysdeps}/arm/stackinfo.h | 0 {sysdeps => ports/sysdeps}/arm/start.S | 0 {sysdeps => ports/sysdeps}/arm/strlen.S | 0 {sysdeps => ports/sysdeps}/arm/sys/ucontext.h | 0 {sysdeps => ports/sysdeps}/arm/sysdep.h | 0 {sysdeps => ports/sysdeps}/arm/tls-macros.h | 0 {sysdeps => ports/sysdeps}/arm/tlsdesc.c | 0 {sysdeps => ports/sysdeps}/arm/tlsdesc.sym | 0 {sysdeps => ports/sysdeps}/arm/tst-audit.h | 0 {sysdeps => ports/sysdeps}/arm/unwind-dw2-fde-glibc.c | 0 {sysdeps => ports/sysdeps}/arm/unwind-pe.c | 0 {sysdeps => ports/sysdeps}/hppa/Makefile | 0 {sysdeps => ports/sysdeps}/hppa/Versions | 0 {sysdeps => ports/sysdeps}/hppa/__longjmp.S | 0 {sysdeps => ports/sysdeps}/hppa/abort-instr.h | 0 {sysdeps => ports/sysdeps}/hppa/add_n.S | 0 {sysdeps => ports/sysdeps}/hppa/bits/endian.h | 0 {sysdeps => ports/sysdeps}/hppa/bits/link.h | 0 {sysdeps => ports/sysdeps}/hppa/bits/linkmap.h | 0 {sysdeps => ports/sysdeps}/hppa/bits/setjmp.h | 0 {sysdeps => ports/sysdeps}/hppa/bsd-_setjmp.S | 0 {sysdeps => ports/sysdeps}/hppa/bsd-setjmp.S | 0 {sysdeps => ports/sysdeps}/hppa/configure | 0 {sysdeps => ports/sysdeps}/hppa/configure.in | 0 {sysdeps => ports/sysdeps}/hppa/crti.S | 0 {sysdeps => ports/sysdeps}/hppa/crtn.S | 0 {sysdeps => ports/sysdeps}/hppa/dl-fptr.c | 0 {sysdeps => ports/sysdeps}/hppa/dl-fptr.h | 0 {sysdeps => ports/sysdeps}/hppa/dl-irel.h | 0 {sysdeps => ports/sysdeps}/hppa/dl-lookupcfg.h | 0 {sysdeps => ports/sysdeps}/hppa/dl-machine.h | 0 {sysdeps => ports/sysdeps}/hppa/dl-symaddr.c | 0 {sysdeps => ports/sysdeps}/hppa/dl-tls.h | 0 {sysdeps => ports/sysdeps}/hppa/dl-trampoline.S | 0 {sysdeps => ports/sysdeps}/hppa/entry.h | 0 {sysdeps => ports/sysdeps}/hppa/fpu/bits/fenv.h | 0 {sysdeps => ports/sysdeps}/hppa/fpu/bits/mathdef.h | 0 {sysdeps => ports/sysdeps}/hppa/fpu/fclrexcpt.c | 0 {sysdeps => ports/sysdeps}/hppa/fpu/fedisblxcpt.c | 0 {sysdeps => ports/sysdeps}/hppa/fpu/feenablxcpt.c | 0 {sysdeps => ports/sysdeps}/hppa/fpu/fegetenv.c | 0 {sysdeps => ports/sysdeps}/hppa/fpu/fegetexcept.c | 0 {sysdeps => ports/sysdeps}/hppa/fpu/fegetround.c | 0 {sysdeps => ports/sysdeps}/hppa/fpu/feholdexcpt.c | 0 {sysdeps => ports/sysdeps}/hppa/fpu/fesetenv.c | 0 {sysdeps => ports/sysdeps}/hppa/fpu/fesetround.c | 0 {sysdeps => ports/sysdeps}/hppa/fpu/feupdateenv.c | 0 {sysdeps => ports/sysdeps}/hppa/fpu/fgetexcptflg.c | 0 {sysdeps => ports/sysdeps}/hppa/fpu/fraiseexcpt.c | 0 {sysdeps => ports/sysdeps}/hppa/fpu/fsetexcptflg.c | 0 {sysdeps => ports/sysdeps}/hppa/fpu/ftestexcept.c | 0 {sysdeps => ports/sysdeps}/hppa/fpu/libm-test-ulps | 0 {sysdeps => ports/sysdeps}/hppa/frame.h | 0 {sysdeps => ports/sysdeps}/hppa/gccframe.h | 0 {sysdeps => ports/sysdeps}/hppa/hppa1.1/Implies | 0 {sysdeps => ports/sysdeps}/hppa/hppa1.1/addmul_1.S | 0 {sysdeps => ports/sysdeps}/hppa/hppa1.1/mul_1.S | 0 {sysdeps => ports/sysdeps}/hppa/hppa1.1/s_signbit.c | 0 {sysdeps => ports/sysdeps}/hppa/hppa1.1/submul_1.S | 0 {sysdeps => ports/sysdeps}/hppa/hppa1.1/udiv_qrnnd.S | 0 {sysdeps => ports/sysdeps}/hppa/jmpbuf-offsets.h | 0 {sysdeps => ports/sysdeps}/hppa/jmpbuf-unwind.h | 0 {sysdeps => ports/sysdeps}/hppa/ldsodefs.h | 0 {sysdeps => ports/sysdeps}/hppa/libc-tls.c | 0 {sysdeps => ports/sysdeps}/hppa/libgcc-compat.c | 0 {sysdeps => ports/sysdeps}/hppa/lshift.S | 0 {sysdeps => ports/sysdeps}/hppa/machine-gmon.h | 0 {sysdeps => ports/sysdeps}/hppa/memusage.h | 0 {sysdeps => ports/sysdeps}/hppa/mp_clz_tab.c | 0 {sysdeps => ports/sysdeps}/hppa/nptl/Makefile | 0 {sysdeps => ports/sysdeps}/hppa/nptl/jmpbuf-unwind.h | 0 {sysdeps => ports/sysdeps}/hppa/nptl/pthread_spin_init.c | 0 {sysdeps => ports/sysdeps}/hppa/nptl/pthread_spin_lock.c | 0 {sysdeps => ports/sysdeps}/hppa/nptl/pthread_spin_trylock.c | 0 {sysdeps => ports/sysdeps}/hppa/nptl/pthread_spin_unlock.c | 0 {sysdeps => ports/sysdeps}/hppa/nptl/pthreaddef.h | 0 {sysdeps => ports/sysdeps}/hppa/nptl/tcb-offsets.sym | 0 {sysdeps => ports/sysdeps}/hppa/nptl/tls.h | 0 {sysdeps => ports/sysdeps}/hppa/preconfigure | 0 {sysdeps => ports/sysdeps}/hppa/rshift.S | 0 {sysdeps => ports/sysdeps}/hppa/setjmp.S | 0 {sysdeps => ports/sysdeps}/hppa/shlib-versions | 0 {sysdeps => ports/sysdeps}/hppa/stackinfo.h | 0 {sysdeps => ports/sysdeps}/hppa/start.S | 0 {sysdeps => ports/sysdeps}/hppa/sub_n.S | 0 {sysdeps => ports/sysdeps}/hppa/sysdep.h | 0 {sysdeps => ports/sysdeps}/hppa/tls-macros.h | 0 {sysdeps => ports/sysdeps}/hppa/tst-audit.h | 0 {sysdeps => ports/sysdeps}/hppa/udiv_qrnnd.S | 0 {sysdeps => ports/sysdeps}/ia64/Implies | 0 {sysdeps => ports/sysdeps}/ia64/Makefile | 0 {sysdeps => ports/sysdeps}/ia64/Versions | 0 {sysdeps => ports/sysdeps}/ia64/_mcount.S | 0 {sysdeps => ports/sysdeps}/ia64/abort-instr.h | 0 {sysdeps => ports/sysdeps}/ia64/backtrace.c | 0 {sysdeps => ports/sysdeps}/ia64/bcopy.S | 0 {sysdeps => ports/sysdeps}/ia64/bits/atomic.h | 0 {sysdeps => ports/sysdeps}/ia64/bits/byteswap-16.h | 0 {sysdeps => ports/sysdeps}/ia64/bits/byteswap.h | 0 {sysdeps => ports/sysdeps}/ia64/bits/fenv.h | 0 {sysdeps => ports/sysdeps}/ia64/bits/huge_vall.h | 0 {sysdeps => ports/sysdeps}/ia64/bits/link.h | 0 {sysdeps => ports/sysdeps}/ia64/bits/linkmap.h | 0 {sysdeps => ports/sysdeps}/ia64/bits/mathdef.h | 0 {sysdeps => ports/sysdeps}/ia64/bits/xtitypes.h | 0 {sysdeps => ports/sysdeps}/ia64/bzero.S | 0 {sysdeps => ports/sysdeps}/ia64/configure | 0 {sysdeps => ports/sysdeps}/ia64/configure.in | 0 {sysdeps => ports/sysdeps}/ia64/crti.S | 0 {sysdeps => ports/sysdeps}/ia64/crtn.S | 0 {sysdeps => ports/sysdeps}/ia64/dl-dtprocnum.h | 0 {sysdeps => ports/sysdeps}/ia64/dl-fptr.h | 0 {sysdeps => ports/sysdeps}/ia64/dl-lookupcfg.h | 0 {sysdeps => ports/sysdeps}/ia64/dl-machine.h | 0 {sysdeps => ports/sysdeps}/ia64/dl-sysdep.h | 0 {sysdeps => ports/sysdeps}/ia64/dl-tls.h | 0 {sysdeps => ports/sysdeps}/ia64/dl-trampoline.S | 0 {sysdeps => ports/sysdeps}/ia64/entry.h | 0 {sysdeps => ports/sysdeps}/ia64/fpu/Makefile | 0 {sysdeps => ports/sysdeps}/ia64/fpu/README | 0 {sysdeps => ports/sysdeps}/ia64/fpu/Versions | 0 {sysdeps => ports/sysdeps}/ia64/fpu/bits/math-finite.h | 0 {sysdeps => ports/sysdeps}/ia64/fpu/bits/mathinline.h | 0 {sysdeps => ports/sysdeps}/ia64/fpu/branred.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/doasin.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/dosincos.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_acos.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_acosf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_acosh.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_acoshf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_acoshl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_acosl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_asin.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_asinf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_asinl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_atan2.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_atan2f.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_atan2l.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_atanh.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_atanhf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_atanhl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_cosh.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_coshf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_coshl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_exp.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_exp10.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_exp10f.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_exp10l.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_exp2.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_exp2f.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_exp2l.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_expf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_expl.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_fmod.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_fmodf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_fmodl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_gamma_r.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_gammaf_r.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_gammal_r.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_hypot.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_hypotf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_hypotl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_ilogbl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_lgamma_r.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_lgammaf_r.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_lgammal_r.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_log.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_log10.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_log10f.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_log10l.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_log2.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_log2f.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_log2l.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_logf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_logl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_pow.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_powf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_powl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_rem_pio2.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_rem_pio2f.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_rem_pio2l.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_remainder.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_remainderf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_remainderl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_scalb.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_scalbf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_scalbl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_sinh.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_sinhf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_sinhl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_sqrt.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_sqrtf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/e_sqrtl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/fclrexcpt.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/fedisblxcpt.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/feenablxcpt.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/fegetenv.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/fegetexcept.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/fegetround.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/feholdexcpt.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/fesetenv.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/fesetround.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/feupdateenv.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/fgetexcptflg.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/fraiseexcpt.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/fsetexcptflg.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/ftestexcept.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/gen_import_file_list | 0 {sysdeps => ports/sysdeps}/ia64/fpu/halfulp.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/import_check | 0 {sysdeps => ports/sysdeps}/ia64/fpu/import_diffs | 0 {sysdeps => ports/sysdeps}/ia64/fpu/import_file.awk | 0 {sysdeps => ports/sysdeps}/ia64/fpu/import_intel_libm | 0 {sysdeps => ports/sysdeps}/ia64/fpu/k_rem_pio2.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/k_rem_pio2f.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/k_rem_pio2l.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/libc_libm_error.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/libm-symbols.h | 0 {sysdeps => ports/sysdeps}/ia64/fpu/libm-test-ulps | 0 {sysdeps => ports/sysdeps}/ia64/fpu/libm_cpu_defs.h | 0 {sysdeps => ports/sysdeps}/ia64/fpu/libm_error.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/libm_error_codes.h | 0 {sysdeps => ports/sysdeps}/ia64/fpu/libm_frexp.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/libm_frexp4.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/libm_frexp4f.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/libm_frexp4l.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/libm_frexpf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/libm_frexpl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/libm_lgamma.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/libm_lgammaf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/libm_lgammal.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/libm_reduce.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/libm_scalblnf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/libm_sincos.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/libm_sincos_large.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/libm_sincosf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/libm_sincosl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/libm_support.h | 0 {sysdeps => ports/sysdeps}/ia64/fpu/libm_tan.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/math_ldbl.h | 0 {sysdeps => ports/sysdeps}/ia64/fpu/mpa.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/mpatan.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/mpatan2.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/mpexp.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/mplog.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/mpsqrt.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/mptan.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/printf_fphex.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_asinh.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_asinhf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_asinhl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_atan.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_atanf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_atanl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_cbrt.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_cbrtf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_cbrtl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_ceil.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_ceilf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_ceill.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_copysign.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_copysignf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_copysignl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_cos.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_cosf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_cosl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_erf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_erfc.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_erfcf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_erfcl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_erff.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_erfl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_expm1.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_expm1f.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_expm1l.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_fabs.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_fabsf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_fabsl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_fdim.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_fdimf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_fdiml.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_finite.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_finitef.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_finitel.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_floor.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_floorf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_floorl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_fma.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_fmaf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_fmal.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_fmax.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_fmaxf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_fmaxl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_fpclassify.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_fpclassifyf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_fpclassifyl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_frexp.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_frexpf.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_frexpl.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_ilogb.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_ilogbf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_isinf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_isinff.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_isinfl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_isnan.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_isnanf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_isnanl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_ldexp.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_ldexpf.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_ldexpl.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_libm_ldexp.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_libm_ldexpf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_libm_ldexpl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_libm_scalbn.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_libm_scalbnf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_libm_scalbnl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_log1p.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_log1pf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_log1pl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_logb.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_logbf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_logbl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_matherrf.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_matherrl.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_modf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_modff.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_modfl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_nearbyint.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_nearbyintf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_nearbyintl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_nextafter.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_nextafterf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_nextafterl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_nexttoward.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_nexttowardf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_nexttowardl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_rint.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_rintf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_rintl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_round.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_roundf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_roundl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_scalblnf.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_scalbn.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_scalbnf.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_scalbnl.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_signbit.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_signbitf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_signbitl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_significand.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_significandf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_significandl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_sin.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_sincos.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_sincosf.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_sincosl.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_sinf.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_sinl.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_tan.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_tanf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_tanh.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_tanhf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_tanhl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_tanl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_trunc.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_truncf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/s_truncl.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/sincos32.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/slowexp.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/slowpow.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/t_exp.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_acos.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_acosf.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_acosh.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_acoshf.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_acoshl.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_acosl.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_asin.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_asinf.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_asinl.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_atan2.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_atan2f.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_atan2l.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_atanh.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_atanhf.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_atanhl.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_cosh.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_coshf.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_coshl.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_exp.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_exp10.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_exp10f.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_exp10l.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_exp2.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_exp2f.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_exp2l.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_expf.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_expl.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_fmod.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_fmodf.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_fmodl.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_hypot.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_hypotf.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_hypotl.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_lgamma.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_lgamma_r.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_lgammaf.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_lgammaf_r.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_lgammal.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_lgammal_r.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_log.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_log10.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_log10f.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_log10l.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_log2.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_log2f.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_log2l.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_logf.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_logl.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_pow.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_powf.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_powl.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_remainder.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_remainderf.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_remainderl.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_scalb.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_scalbf.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_scalbl.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_sinh.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_sinhf.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_sinhl.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_sqrt.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_sqrtf.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_sqrtl.c | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_tgamma.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_tgammaf.S | 0 {sysdeps => ports/sysdeps}/ia64/fpu/w_tgammal.S | 0 {sysdeps => ports/sysdeps}/ia64/gccframe.h | 0 {sysdeps => ports/sysdeps}/ia64/hp-timing.c | 0 {sysdeps => ports/sysdeps}/ia64/hp-timing.h | 0 {sysdeps => ports/sysdeps}/ia64/htonl.S | 0 {sysdeps => ports/sysdeps}/ia64/htons.S | 0 {sysdeps => ports/sysdeps}/ia64/ia64libgcc.S | 0 {sysdeps => ports/sysdeps}/ia64/ieee754.h | 0 {sysdeps => ports/sysdeps}/ia64/jmpbuf-unwind.h | 0 {sysdeps => ports/sysdeps}/ia64/ldbl2mpn.c | 0 {sysdeps => ports/sysdeps}/ia64/ldsodefs.h | 0 {sysdeps => ports/sysdeps}/ia64/libc-tls.c | 0 {sysdeps => ports/sysdeps}/ia64/machine-gmon.h | 0 {sysdeps => ports/sysdeps}/ia64/memccpy.S | 0 {sysdeps => ports/sysdeps}/ia64/memchr.S | 0 {sysdeps => ports/sysdeps}/ia64/memcmp.S | 0 {sysdeps => ports/sysdeps}/ia64/memcpy.S | 0 {sysdeps => ports/sysdeps}/ia64/memmove.S | 0 {sysdeps => ports/sysdeps}/ia64/memset.S | 0 {sysdeps => ports/sysdeps}/ia64/memusage.h | 0 {sysdeps => ports/sysdeps}/ia64/nptl/Makefile | 0 {sysdeps => ports/sysdeps}/ia64/nptl/pthread_spin_lock.c | 0 {sysdeps => ports/sysdeps}/ia64/nptl/pthread_spin_trylock.c | 0 {sysdeps => ports/sysdeps}/ia64/nptl/pthread_spin_unlock.c | 0 {sysdeps => ports/sysdeps}/ia64/nptl/pthreaddef.h | 0 {sysdeps => ports/sysdeps}/ia64/nptl/shlib-versions | 0 {sysdeps => ports/sysdeps}/ia64/nptl/tcb-offsets.sym | 0 {sysdeps => ports/sysdeps}/ia64/nptl/tls.h | 0 {sysdeps => ports/sysdeps}/ia64/preconfigure | 0 {sysdeps => ports/sysdeps}/ia64/sched_cpucount.c | 0 {sysdeps => ports/sysdeps}/ia64/shlib-versions | 0 {sysdeps => ports/sysdeps}/ia64/softpipe.h | 0 {sysdeps => ports/sysdeps}/ia64/stackguard-macros.h | 0 {sysdeps => ports/sysdeps}/ia64/stackinfo.h | 0 {sysdeps => ports/sysdeps}/ia64/start.S | 0 {sysdeps => ports/sysdeps}/ia64/strcat.c | 0 {sysdeps => ports/sysdeps}/ia64/strchr.S | 0 {sysdeps => ports/sysdeps}/ia64/strcmp.S | 0 {sysdeps => ports/sysdeps}/ia64/strcpy.S | 0 {sysdeps => ports/sysdeps}/ia64/strlen.S | 0 {sysdeps => ports/sysdeps}/ia64/strncmp.S | 0 {sysdeps => ports/sysdeps}/ia64/strncpy.S | 0 {sysdeps => ports/sysdeps}/ia64/sysdep.h | 0 {sysdeps => ports/sysdeps}/ia64/tls-macros.h | 0 {sysdeps => ports/sysdeps}/ia64/tst-audit.h | 0 {sysdeps => ports/sysdeps}/m68k/Implies | 0 {sysdeps => ports/sysdeps}/m68k/Makefile | 0 {sysdeps => ports/sysdeps}/m68k/Versions | 0 {sysdeps => ports/sysdeps}/m68k/__longjmp.c | 0 {sysdeps => ports/sysdeps}/m68k/abort-instr.h | 0 {sysdeps => ports/sysdeps}/m68k/asm-syntax.h | 0 {sysdeps => ports/sysdeps}/m68k/bits/byteswap.h | 0 {sysdeps => ports/sysdeps}/m68k/bits/endian.h | 0 {sysdeps => ports/sysdeps}/m68k/bits/link.h | 0 {sysdeps => ports/sysdeps}/m68k/bits/setjmp.h | 0 {sysdeps => ports/sysdeps}/m68k/bsd-_setjmp.c | 0 {sysdeps => ports/sysdeps}/m68k/bsd-setjmp.c | 0 {sysdeps => ports/sysdeps}/m68k/coldfire/bits/atomic.h | 0 {sysdeps => ports/sysdeps}/m68k/coldfire/fpu/e_sqrt.c | 0 {sysdeps => ports/sysdeps}/m68k/coldfire/fpu/e_sqrtf.c | 0 {sysdeps => ports/sysdeps}/m68k/coldfire/fpu/fraiseexcpt.c | 0 {sysdeps => ports/sysdeps}/m68k/coldfire/fpu/libm-test-ulps | 0 {sysdeps => ports/sysdeps}/m68k/coldfire/fpu/s_fabs.c | 0 {sysdeps => ports/sysdeps}/m68k/coldfire/fpu/s_fabsf.c | 0 {sysdeps => ports/sysdeps}/m68k/coldfire/fpu/s_lrint.c | 0 {sysdeps => ports/sysdeps}/m68k/coldfire/fpu/s_lrintf.c | 0 {sysdeps => ports/sysdeps}/m68k/coldfire/fpu/s_rint.c | 0 {sysdeps => ports/sysdeps}/m68k/coldfire/fpu/s_rintf.c | 0 {sysdeps => ports/sysdeps}/m68k/coldfire/shlib-versions | 0 {sysdeps => ports/sysdeps}/m68k/coldfire/sysdep.h | 0 {sysdeps => ports/sysdeps}/m68k/crti.S | 0 {sysdeps => ports/sysdeps}/m68k/crtn.S | 0 {sysdeps => ports/sysdeps}/m68k/dl-machine.h | 0 {sysdeps => ports/sysdeps}/m68k/dl-tls.h | 0 {sysdeps => ports/sysdeps}/m68k/dl-trampoline.S | 0 {sysdeps => ports/sysdeps}/m68k/ffs.c | 0 {sysdeps => ports/sysdeps}/m68k/fpu/bits/fenv.h | 0 {sysdeps => ports/sysdeps}/m68k/fpu/fclrexcpt.c | 0 {sysdeps => ports/sysdeps}/m68k/fpu/fedisblxcpt.c | 0 {sysdeps => ports/sysdeps}/m68k/fpu/feenablxcpt.c | 0 {sysdeps => ports/sysdeps}/m68k/fpu/fegetenv.c | 0 {sysdeps => ports/sysdeps}/m68k/fpu/fegetexcept.c | 0 {sysdeps => ports/sysdeps}/m68k/fpu/fegetround.c | 0 {sysdeps => ports/sysdeps}/m68k/fpu/feholdexcpt.c | 0 {sysdeps => ports/sysdeps}/m68k/fpu/fesetenv.c | 0 {sysdeps => ports/sysdeps}/m68k/fpu/fesetround.c | 0 {sysdeps => ports/sysdeps}/m68k/fpu/feupdateenv.c | 0 {sysdeps => ports/sysdeps}/m68k/fpu/fgetexcptflg.c | 0 {sysdeps => ports/sysdeps}/m68k/fpu/fsetexcptflg.c | 0 {sysdeps => ports/sysdeps}/m68k/fpu/ftestexcept.c | 0 {sysdeps => ports/sysdeps}/m68k/fpu_control.h | 0 {sysdeps => ports/sysdeps}/m68k/gccframe.h | 0 {sysdeps => ports/sysdeps}/m68k/jmpbuf-unwind.h | 0 {sysdeps => ports/sysdeps}/m68k/ldsodefs.h | 0 {sysdeps => ports/sysdeps}/m68k/libc-tls.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/Implies | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/Makefile | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/add_n.S | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/bits/huge_vall.h | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/bits/mathdef.h | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/bits/mathinline.h | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/branred.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/doasin.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/dosincos.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_acos.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_acosf.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_acosl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_asin.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_asinf.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_asinl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_atan2.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_atan2f.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_atan2l.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_atanh.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_atanhf.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_atanhl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_cosh.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_coshf.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_coshl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_exp.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_exp10.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_exp10f.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_exp10l.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_exp2.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_exp2f.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_exp2l.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_expf.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_expl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_fmod.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_fmodf.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_fmodl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_ilogb.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_ilogbf.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_ilogbl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_log.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_log10.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_log10f.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_log10l.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_log2.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_log2f.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_log2l.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_logf.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_logl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_pow.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_powf.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_powl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_rem_pio2.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_rem_pio2f.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_rem_pio2l.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_remainder.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_remainderf.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_remainderl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_scalb.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_scalbf.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_scalbl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_sinh.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_sinhf.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_sinhl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_sqrt.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_sqrtf.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_sqrtl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/fraiseexcpt.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/halfulp.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/k_cosl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/k_rem_pio2.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/k_rem_pio2f.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/k_rem_pio2l.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/k_sinl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/k_tanf.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/k_tanl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/libm-test-ulps | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/math_private.h | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/mathimpl.h | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/mpa.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/mpatan.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/mpatan2.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/mpexp.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/mplog.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/mpsqrt.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/mptan.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_atan.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_atanf.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_atanl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_ccosh.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_ccoshf.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_ccoshl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_ceil.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_ceilf.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_ceill.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_cexp.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_cexpf.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_cexpl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_cos.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_cosf.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_cosl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_csin.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_csinf.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_csinh.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_csinhf.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_csinhl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_csinl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_expm1.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_expm1f.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_expm1l.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_fabs.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_fabsf.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_fabsl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_finite.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_finitef.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_finitel.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_floor.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_floorf.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_floorl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_fpclassifyl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_frexp.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_frexpf.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_frexpl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_isinf.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_isinff.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_isinfl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_isnan.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_isnanf.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_isnanl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_llrint.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_llrintf.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_llrintl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_log1p.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_log1pf.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_log1pl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_logbl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_lrint.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_lrintf.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_lrintl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_modf.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_modff.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_modfl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_nearbyint.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_nearbyintf.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_nearbyintl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_nextafterl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_remquo.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_remquof.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_remquol.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_rint.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_rintf.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_rintl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_scalbln.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_scalblnf.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_scalblnl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_scalbn.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_scalbnf.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_scalbnl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_significand.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_significandf.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_significandl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_sin.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_sincos.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_sincosf.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_sincosl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_sinf.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_sinl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_tan.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_tanf.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_tanh.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_tanhf.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_tanhl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_tanl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_trunc.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_truncf.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_truncl.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/sincos32.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/sincostab.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/slowexp.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/slowpow.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/t_exp.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/lshift.S | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/m68020/Makefile | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/m68020/addmul_1.S | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/m68020/bits/atomic.h | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/m68020/bits/string.h | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/m68020/mul_1.S | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/m68020/submul_1.S | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/m68020/wordcopy.S | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/printf_fphex.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/rshift.S | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/strtold_l.c | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/sub_n.S | 0 {sysdeps => ports/sysdeps}/m68k/m680x0/sysdep.h | 0 {sysdeps => ports/sysdeps}/m68k/memchr.S | 0 {sysdeps => ports/sysdeps}/m68k/memcopy.h | 0 {sysdeps => ports/sysdeps}/m68k/memusage.h | 0 {sysdeps => ports/sysdeps}/m68k/nptl/Makefile | 0 {sysdeps => ports/sysdeps}/m68k/nptl/pthread_spin_lock.c | 0 {sysdeps => ports/sysdeps}/m68k/nptl/pthread_spin_trylock.c | 0 {sysdeps => ports/sysdeps}/m68k/nptl/pthreaddef.h | 0 {sysdeps => ports/sysdeps}/m68k/nptl/tcb-offsets.sym | 0 {sysdeps => ports/sysdeps}/m68k/nptl/tls.h | 0 {sysdeps => ports/sysdeps}/m68k/preconfigure | 0 {sysdeps => ports/sysdeps}/m68k/rawmemchr.S | 0 {sysdeps => ports/sysdeps}/m68k/setjmp.c | 0 {sysdeps => ports/sysdeps}/m68k/shlib-versions | 0 {sysdeps => ports/sysdeps}/m68k/stackinfo.h | 0 {sysdeps => ports/sysdeps}/m68k/start.S | 0 {sysdeps => ports/sysdeps}/m68k/strchr.S | 0 {sysdeps => ports/sysdeps}/m68k/strchrnul.S | 0 {sysdeps => ports/sysdeps}/m68k/sys/ucontext.h | 0 {sysdeps => ports/sysdeps}/m68k/sysdep.h | 0 {sysdeps => ports/sysdeps}/m68k/tls-macros.h | 0 {sysdeps => ports/sysdeps}/m68k/tst-audit.h | 0 {sysdeps => ports/sysdeps}/m68k/wcpcpy.c | 0 {sysdeps => ports/sysdeps}/m68k/wcpcpy_chk.c | 0 {sysdeps => ports/sysdeps}/mips/Implies | 0 {sysdeps => ports/sysdeps}/mips/Makefile | 0 {sysdeps => ports/sysdeps}/mips/__longjmp.c | 0 {sysdeps => ports/sysdeps}/mips/abort-instr.h | 0 {sysdeps => ports/sysdeps}/mips/add_n.S | 0 {sysdeps => ports/sysdeps}/mips/addmul_1.S | 0 {sysdeps => ports/sysdeps}/mips/backtrace.c | 0 {sysdeps => ports/sysdeps}/mips/bits/atomic.h | 0 {sysdeps => ports/sysdeps}/mips/bits/dlfcn.h | 0 {sysdeps => ports/sysdeps}/mips/bits/endian.h | 0 {sysdeps => ports/sysdeps}/mips/bits/fenv.h | 0 {sysdeps => ports/sysdeps}/mips/bits/ipctypes.h | 0 {sysdeps => ports/sysdeps}/mips/bits/link.h | 0 {sysdeps => ports/sysdeps}/mips/bits/linkmap.h | 0 {sysdeps => ports/sysdeps}/mips/bits/mathdef.h | 0 {sysdeps => ports/sysdeps}/mips/bits/nan.h | 0 {sysdeps => ports/sysdeps}/mips/bits/setjmp.h | 0 {sysdeps => ports/sysdeps}/mips/bits/wordsize.h | 0 {sysdeps => ports/sysdeps}/mips/bsd-_setjmp.S | 0 {sysdeps => ports/sysdeps}/mips/bsd-setjmp.S | 0 {sysdeps => ports/sysdeps}/mips/configure | 0 {sysdeps => ports/sysdeps}/mips/configure.in | 0 {sysdeps => ports/sysdeps}/mips/dl-dtprocnum.h | 0 {sysdeps => ports/sysdeps}/mips/dl-lookup.c | 0 {sysdeps => ports/sysdeps}/mips/dl-machine.h | 0 {sysdeps => ports/sysdeps}/mips/dl-procinfo.c | 0 {sysdeps => ports/sysdeps}/mips/dl-procinfo.h | 0 {sysdeps => ports/sysdeps}/mips/dl-tls.h | 0 {sysdeps => ports/sysdeps}/mips/dl-trampoline.c | 0 {sysdeps => ports/sysdeps}/mips/fpregdef.h | 0 {sysdeps => ports/sysdeps}/mips/fpu/e_sqrt.c | 0 {sysdeps => ports/sysdeps}/mips/fpu/e_sqrtf.c | 0 {sysdeps => ports/sysdeps}/mips/fpu/fclrexcpt.c | 0 {sysdeps => ports/sysdeps}/mips/fpu/fedisblxcpt.c | 0 {sysdeps => ports/sysdeps}/mips/fpu/feenablxcpt.c | 0 {sysdeps => ports/sysdeps}/mips/fpu/fegetenv.c | 0 {sysdeps => ports/sysdeps}/mips/fpu/fegetexcept.c | 0 {sysdeps => ports/sysdeps}/mips/fpu/fegetround.c | 0 {sysdeps => ports/sysdeps}/mips/fpu/feholdexcpt.c | 0 {sysdeps => ports/sysdeps}/mips/fpu/fenv_libc.h | 0 {sysdeps => ports/sysdeps}/mips/fpu/fesetenv.c | 0 {sysdeps => ports/sysdeps}/mips/fpu/fesetround.c | 0 {sysdeps => ports/sysdeps}/mips/fpu/feupdateenv.c | 0 {sysdeps => ports/sysdeps}/mips/fpu/fgetexcptflg.c | 0 {sysdeps => ports/sysdeps}/mips/fpu/fraiseexcpt.c | 0 {sysdeps => ports/sysdeps}/mips/fpu/fsetexcptflg.c | 0 {sysdeps => ports/sysdeps}/mips/fpu/ftestexcept.c | 0 {sysdeps => ports/sysdeps}/mips/fpu_control.h | 0 {sysdeps => ports/sysdeps}/mips/gccframe.h | 0 {sysdeps => ports/sysdeps}/mips/ieee754.h | 0 {sysdeps => ports/sysdeps}/mips/init-first.c | 0 {sysdeps => ports/sysdeps}/mips/jmpbuf-unwind.h | 0 {sysdeps => ports/sysdeps}/mips/ldsodefs.h | 0 {sysdeps => ports/sysdeps}/mips/libc-tls.c | 0 {sysdeps => ports/sysdeps}/mips/lshift.S | 0 {sysdeps => ports/sysdeps}/mips/machine-gmon.h | 0 {sysdeps => ports/sysdeps}/mips/memcpy.S | 0 {sysdeps => ports/sysdeps}/mips/memset.S | 0 {sysdeps => ports/sysdeps}/mips/memusage.h | 0 {sysdeps => ports/sysdeps}/mips/mips32/Implies | 0 {sysdeps => ports/sysdeps}/mips/mips32/Makefile | 0 {sysdeps => ports/sysdeps}/mips/mips32/crti.S | 0 {sysdeps => ports/sysdeps}/mips/mips32/crtn.S | 0 {sysdeps => ports/sysdeps}/mips/mips32/libm-test-ulps | 0 {sysdeps => ports/sysdeps}/mips/mips64/Implies | 0 {sysdeps => ports/sysdeps}/mips/mips64/Versions | 0 {sysdeps => ports/sysdeps}/mips/mips64/__longjmp.c | 0 {sysdeps => ports/sysdeps}/mips/mips64/add_n.S | 0 {sysdeps => ports/sysdeps}/mips/mips64/addmul_1.S | 0 {sysdeps => ports/sysdeps}/mips/mips64/bsd-_setjmp.S | 0 {sysdeps => ports/sysdeps}/mips/mips64/bsd-setjmp.S | 0 {sysdeps => ports/sysdeps}/mips/mips64/gmp-mparam.h | 0 {sysdeps => ports/sysdeps}/mips/mips64/libm-test-ulps | 0 {sysdeps => ports/sysdeps}/mips/mips64/lshift.S | 0 {sysdeps => ports/sysdeps}/mips/mips64/memcpy.S | 0 {sysdeps => ports/sysdeps}/mips/mips64/memset.S | 0 {sysdeps => ports/sysdeps}/mips/mips64/mul_1.S | 0 {sysdeps => ports/sysdeps}/mips/mips64/n32/Implies | 0 {sysdeps => ports/sysdeps}/mips/mips64/n32/Makefile | 0 {sysdeps => ports/sysdeps}/mips/mips64/n32/crti.S | 0 {sysdeps => ports/sysdeps}/mips/mips64/n32/crtn.S | 0 {sysdeps => ports/sysdeps}/mips/mips64/n32/s_fma.c | 0 {sysdeps => ports/sysdeps}/mips/mips64/n64/Implies | 0 {sysdeps => ports/sysdeps}/mips/mips64/n64/Makefile | 0 {sysdeps => ports/sysdeps}/mips/mips64/n64/crti.S | 0 {sysdeps => ports/sysdeps}/mips/mips64/n64/crtn.S | 0 {sysdeps => ports/sysdeps}/mips/mips64/n64/s_fma.c | 0 {sysdeps => ports/sysdeps}/mips/mips64/rshift.S | 0 {sysdeps => ports/sysdeps}/mips/mips64/setjmp.S | 0 {sysdeps => ports/sysdeps}/mips/mips64/setjmp_aux.c | 0 {sysdeps => ports/sysdeps}/mips/mips64/soft-fp/Makefile | 0 {sysdeps => ports/sysdeps}/mips/mips64/soft-fp/e_sqrtl.c | 0 {sysdeps => ports/sysdeps}/mips/mips64/soft-fp/sfp-machine.h | 0 {sysdeps => ports/sysdeps}/mips/mips64/sub_n.S | 0 {sysdeps => ports/sysdeps}/mips/mips64/submul_1.S | 0 {sysdeps => ports/sysdeps}/mips/mul_1.S | 0 {sysdeps => ports/sysdeps}/mips/nptl/Makefile | 0 {sysdeps => ports/sysdeps}/mips/nptl/nptl-sysdep.S | 0 {sysdeps => ports/sysdeps}/mips/nptl/pthread_spin_lock.S | 0 {sysdeps => ports/sysdeps}/mips/nptl/pthread_spin_trylock.S | 0 {sysdeps => ports/sysdeps}/mips/nptl/pthreaddef.h | 0 {sysdeps => ports/sysdeps}/mips/nptl/shlib-versions | 0 {sysdeps => ports/sysdeps}/mips/nptl/tcb-offsets.sym | 0 {sysdeps => ports/sysdeps}/mips/nptl/tls.h | 0 {sysdeps => ports/sysdeps}/mips/preconfigure | 0 {sysdeps => ports/sysdeps}/mips/regdef.h | 0 {sysdeps => ports/sysdeps}/mips/rshift.S | 0 {sysdeps => ports/sysdeps}/mips/setjmp.S | 0 {sysdeps => ports/sysdeps}/mips/setjmp_aux.c | 0 {sysdeps => ports/sysdeps}/mips/sgidefs.h | 0 {sysdeps => ports/sysdeps}/mips/shlib-versions | 0 {sysdeps => ports/sysdeps}/mips/soft-fp/sfp-machine.h | 0 {sysdeps => ports/sysdeps}/mips/stackinfo.h | 0 {sysdeps => ports/sysdeps}/mips/start.S | 0 {sysdeps => ports/sysdeps}/mips/sub_n.S | 0 {sysdeps => ports/sysdeps}/mips/submul_1.S | 0 {sysdeps => ports/sysdeps}/mips/sys/asm.h | 0 {sysdeps => ports/sysdeps}/mips/sys/fpregdef.h | 0 {sysdeps => ports/sysdeps}/mips/sys/regdef.h | 0 {sysdeps => ports/sysdeps}/mips/sys/tas.h | 0 {sysdeps => ports/sysdeps}/mips/sys/ucontext.h | 0 {sysdeps => ports/sysdeps}/mips/tls-macros.h | 0 {sysdeps => ports/sysdeps}/mips/tst-audit.h | 0 {sysdeps => ports/sysdeps}/powerpc/dl-procinfo.c | 0 {sysdeps => ports/sysdeps}/powerpc/dl-procinfo.h | 0 {sysdeps => ports/sysdeps}/powerpc/nofpu/Makefile | 0 {sysdeps => ports/sysdeps}/powerpc/nofpu/Subdirs | 0 {sysdeps => ports/sysdeps}/powerpc/nofpu/Versions | 0 {sysdeps => ports/sysdeps}/powerpc/nofpu/fclrexcpt.c | 0 {sysdeps => ports/sysdeps}/powerpc/nofpu/fedisblxcpt.c | 0 {sysdeps => ports/sysdeps}/powerpc/nofpu/feenablxcpt.c | 0 {sysdeps => ports/sysdeps}/powerpc/nofpu/fegetenv.c | 0 {sysdeps => ports/sysdeps}/powerpc/nofpu/fegetexcept.c | 0 {sysdeps => ports/sysdeps}/powerpc/nofpu/fegetround.c | 0 {sysdeps => ports/sysdeps}/powerpc/nofpu/feholdexcpt.c | 0 {sysdeps => ports/sysdeps}/powerpc/nofpu/fenv_const.c | 0 {sysdeps => ports/sysdeps}/powerpc/nofpu/fenv_libc.h | 0 {sysdeps => ports/sysdeps}/powerpc/nofpu/fesetenv.c | 0 {sysdeps => ports/sysdeps}/powerpc/nofpu/fesetround.c | 0 {sysdeps => ports/sysdeps}/powerpc/nofpu/feupdateenv.c | 0 {sysdeps => ports/sysdeps}/powerpc/nofpu/fgetexcptflg.c | 0 {sysdeps => ports/sysdeps}/powerpc/nofpu/fraiseexcpt.c | 0 {sysdeps => ports/sysdeps}/powerpc/nofpu/fsetexcptflg.c | 0 {sysdeps => ports/sysdeps}/powerpc/nofpu/ftestexcept.c | 0 {sysdeps => ports/sysdeps}/powerpc/nofpu/libm-test-ulps | 0 {sysdeps => ports/sysdeps}/powerpc/nofpu/shlib-versions | 0 {sysdeps => ports/sysdeps}/powerpc/nofpu/sim-full.c | 0 {sysdeps => ports/sysdeps}/powerpc/nofpu/soft-supp.h | 0 {sysdeps => ports/sysdeps}/powerpc/powerpc32/405/memcmp.S | 0 {sysdeps => ports/sysdeps}/powerpc/powerpc32/405/memcpy.S | 0 {sysdeps => ports/sysdeps}/powerpc/powerpc32/405/memset.S | 0 {sysdeps => ports/sysdeps}/powerpc/powerpc32/405/strcmp.S | 0 {sysdeps => ports/sysdeps}/powerpc/powerpc32/405/strcpy.S | 0 {sysdeps => ports/sysdeps}/powerpc/powerpc32/405/strlen.S | 0 {sysdeps => ports/sysdeps}/powerpc/powerpc32/405/strncmp.S | 0 {sysdeps => ports/sysdeps}/powerpc/powerpc32/440/Implies | 0 {sysdeps => ports/sysdeps}/powerpc/powerpc32/464/Implies | 0 {sysdeps => ports/sysdeps}/powerpc/powerpc32/476/Implies | 0 {sysdeps => ports/sysdeps}/powerpc/powerpc32/Makefile | 0 {sysdeps => ports/sysdeps}/powerpc/soft-fp/sfp-machine.h | 0 {sysdeps => ports/sysdeps}/tile/Implies | 0 {sysdeps => ports/sysdeps}/tile/Makefile | 0 {sysdeps => ports/sysdeps}/tile/Versions | 0 {sysdeps => ports/sysdeps}/tile/__longjmp.S | 0 {sysdeps => ports/sysdeps}/tile/__tls_get_addr.S | 0 {sysdeps => ports/sysdeps}/tile/_mcount.S | 0 {sysdeps => ports/sysdeps}/tile/abort-instr.h | 0 {sysdeps => ports/sysdeps}/tile/backtrace.c | 0 {sysdeps => ports/sysdeps}/tile/bits/atomic.h | 0 {sysdeps => ports/sysdeps}/tile/bits/byteswap.h | 0 {sysdeps => ports/sysdeps}/tile/bits/endian.h | 0 {sysdeps => ports/sysdeps}/tile/bits/fenv.h | 0 {sysdeps => ports/sysdeps}/tile/bits/link.h | 0 {sysdeps => ports/sysdeps}/tile/bits/mathdef.h | 0 {sysdeps => ports/sysdeps}/tile/bits/mathinline.h | 0 {sysdeps => ports/sysdeps}/tile/bits/setjmp.h | 0 {sysdeps => ports/sysdeps}/tile/bsd-_setjmp.S | 0 {sysdeps => ports/sysdeps}/tile/bsd-setjmp.S | 0 {sysdeps => ports/sysdeps}/tile/bzero.S | 0 {sysdeps => ports/sysdeps}/tile/crti.S | 0 {sysdeps => ports/sysdeps}/tile/crtn.S | 0 {sysdeps => ports/sysdeps}/tile/dl-lookupcfg.h | 0 {sysdeps => ports/sysdeps}/tile/dl-machine.h | 0 {sysdeps => ports/sysdeps}/tile/dl-runtime.c | 0 {sysdeps => ports/sysdeps}/tile/dl-start.S | 0 {sysdeps => ports/sysdeps}/tile/dl-tls.c | 0 {sysdeps => ports/sysdeps}/tile/dl-tls.h | 0 {sysdeps => ports/sysdeps}/tile/dl-trampoline.S | 0 {sysdeps => ports/sysdeps}/tile/fegetenv.c | 0 {sysdeps => ports/sysdeps}/tile/fegetround.c | 0 {sysdeps => ports/sysdeps}/tile/feholdexcpt.c | 0 {sysdeps => ports/sysdeps}/tile/fesetenv.c | 0 {sysdeps => ports/sysdeps}/tile/fesetround.c | 0 {sysdeps => ports/sysdeps}/tile/feupdateenv.c | 0 {sysdeps => ports/sysdeps}/tile/ffs.c | 0 {sysdeps => ports/sysdeps}/tile/ffsll.c | 0 {sysdeps => ports/sysdeps}/tile/gccframe.h | 0 {sysdeps => ports/sysdeps}/tile/jmpbuf-offsets.h | 0 {sysdeps => ports/sysdeps}/tile/jmpbuf-unwind.h | 0 {sysdeps => ports/sysdeps}/tile/ldsodefs.h | 0 {sysdeps => ports/sysdeps}/tile/libm-test-ulps | 0 {sysdeps => ports/sysdeps}/tile/machine-gmon.h | 0 {sysdeps => ports/sysdeps}/tile/math_private.h | 0 {sysdeps => ports/sysdeps}/tile/nptl/Makefile | 0 {sysdeps => ports/sysdeps}/tile/nptl/pthread_spin_lock.c | 0 {sysdeps => ports/sysdeps}/tile/nptl/pthread_spin_trylock.c | 0 {sysdeps => ports/sysdeps}/tile/nptl/pthreaddef.h | 0 {sysdeps => ports/sysdeps}/tile/nptl/tcb-offsets.sym | 0 {sysdeps => ports/sysdeps}/tile/nptl/tls.h | 0 {sysdeps => ports/sysdeps}/tile/preconfigure | 0 {sysdeps => ports/sysdeps}/tile/s_fma.c | 0 {sysdeps => ports/sysdeps}/tile/s_fmaf.c | 0 {sysdeps => ports/sysdeps}/tile/setjmp.S | 0 {sysdeps => ports/sysdeps}/tile/shlib-versions | 0 {sysdeps => ports/sysdeps}/tile/sotruss-lib.c | 0 {sysdeps => ports/sysdeps}/tile/stackguard-macros.h | 0 {sysdeps => ports/sysdeps}/tile/stackinfo.h | 0 {sysdeps => ports/sysdeps}/tile/start.S | 0 {sysdeps => ports/sysdeps}/tile/sysdep.h | 0 {sysdeps => ports/sysdeps}/tile/tilegx/bits/atomic.h | 0 {sysdeps => ports/sysdeps}/tile/tilegx/bits/wordsize.h | 0 {sysdeps => ports/sysdeps}/tile/tilegx/memchr.c | 0 {sysdeps => ports/sysdeps}/tile/tilegx/memcpy.c | 0 {sysdeps => ports/sysdeps}/tile/tilegx/memset.c | 0 {sysdeps => ports/sysdeps}/tile/tilegx/memusage.h | 0 {sysdeps => ports/sysdeps}/tile/tilegx/rawmemchr.c | 0 {sysdeps => ports/sysdeps}/tile/tilegx/strchr.c | 0 {sysdeps => ports/sysdeps}/tile/tilegx/strchrnul.c | 0 {sysdeps => ports/sysdeps}/tile/tilegx/string-endian.h | 0 {sysdeps => ports/sysdeps}/tile/tilegx/strlen.c | 0 {sysdeps => ports/sysdeps}/tile/tilegx/strrchr.c | 0 {sysdeps => ports/sysdeps}/tile/tilegx/tilegx32/Implies | 0 {sysdeps => ports/sysdeps}/tile/tilegx/tilegx64/Implies | 0 {sysdeps => ports/sysdeps}/tile/tilepro/Implies | 0 {sysdeps => ports/sysdeps}/tile/tilepro/bits/atomic.h | 0 {sysdeps => ports/sysdeps}/tile/tilepro/bits/wordsize.h | 0 {sysdeps => ports/sysdeps}/tile/tilepro/memchr.c | 0 {sysdeps => ports/sysdeps}/tile/tilepro/memcpy.S | 0 {sysdeps => ports/sysdeps}/tile/tilepro/memset.c | 0 {sysdeps => ports/sysdeps}/tile/tilepro/memusage.h | 0 {sysdeps => ports/sysdeps}/tile/tilepro/rawmemchr.c | 0 {sysdeps => ports/sysdeps}/tile/tilepro/strchr.c | 0 {sysdeps => ports/sysdeps}/tile/tilepro/strchrnul.c | 0 {sysdeps => ports/sysdeps}/tile/tilepro/strlen.c | 0 {sysdeps => ports/sysdeps}/tile/tilepro/strrchr.c | 0 {sysdeps => ports/sysdeps}/tile/tls-macros.h | 0 {sysdeps => ports/sysdeps}/tile/tst-audit.h | 0 {sysdeps => ports/sysdeps}/unix/alpha/Makefile | 0 {sysdeps => ports/sysdeps}/unix/alpha/getegid.S | 0 {sysdeps => ports/sysdeps}/unix/alpha/geteuid.S | 0 {sysdeps => ports/sysdeps}/unix/alpha/getppid.S | 0 {sysdeps => ports/sysdeps}/unix/alpha/pipe.S | 0 {sysdeps => ports/sysdeps}/unix/alpha/rt-sysdep.S | 0 {sysdeps => ports/sysdeps}/unix/alpha/sysdep.S | 0 {sysdeps => ports/sysdeps}/unix/alpha/sysdep.h | 0 {sysdeps => ports/sysdeps}/unix/am33/sysdep.S | 0 {sysdeps => ports/sysdeps}/unix/am33/sysdep.h | 0 {sysdeps => ports/sysdeps}/unix/arm/sysdep.S | 0 {sysdeps => ports/sysdeps}/unix/arm/sysdep.h | 0 {sysdeps => ports/sysdeps}/unix/mips/entry.h | 0 {sysdeps => ports/sysdeps}/unix/mips/mips32/sysdep.h | 0 {sysdeps => ports/sysdeps}/unix/mips/mips64/n32/sysdep.h | 0 {sysdeps => ports/sysdeps}/unix/mips/mips64/n64/sysdep.h | 0 {sysdeps => ports/sysdeps}/unix/mips/pipe.S | 0 {sysdeps => ports/sysdeps}/unix/mips/rt-sysdep.S | 0 {sysdeps => ports/sysdeps}/unix/mips/sysdep.S | 0 {sysdeps => ports/sysdeps}/unix/mips/sysdep.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/Implies | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/Makefile | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/Versions | 0 .../sysdeps}/unix/sysv/linux/alpha/____longjmp_chk.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/a.out.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/adjtime.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/alpha/ptrace.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/alpha/regdef.h | 0 .../sysdeps}/unix/sysv/linux/alpha/alphaev6/fpu/Implies | 0 .../sysdeps}/unix/sysv/linux/alpha/alphaev67/fpu/Implies | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/a.out.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/dirent.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/elfclass.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/epoll.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/errno.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/eventfd.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/fcntl.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/inotify.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/ioctls.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/ipc.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/mman.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/msq.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/netdb.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/resource.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/sem.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/shm.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/sigaction.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/siginfo.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/signalfd.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/signum.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/sigstack.h | 0 .../sysdeps}/unix/sysv/linux/alpha/bits/socket_type.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/stat.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/statfs.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/termios.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/timerfd.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/typesizes.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/wordsize.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/brk.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/clone.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/configure | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/configure.in | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/creat.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/dl-auxv.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/dl-brk.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/dl-fxstatat64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/dl-support.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/dl-sysdep.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/fpu/Implies | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/fraiseexcpt.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/fstatfs64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/fstatvfs.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/fstatvfs64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/fxstat.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/fxstatat.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/getclktck.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/getcontext.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/getdents.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/getdents64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/gethostname.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/getsysstats.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/glob.c | 0 .../sysdeps}/unix/sysv/linux/alpha/ieee_get_fp_control.S | 0 .../sysdeps}/unix/sysv/linux/alpha/ieee_set_fp_control.S | 0 .../sysdeps}/unix/sysv/linux/alpha/internal_statvfs64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/ioperm.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/ipc_priv.h | 0 .../sysdeps}/unix/sysv/linux/alpha/kernel-features.h | 0 .../sysdeps}/unix/sysv/linux/alpha/kernel_sigaction.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/kernel_stat.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/kernel_sysinfo.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/kernel_termios.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/lxstat.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/makecontext.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/msgctl.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/nldbl-abi.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/nptl/Makefile | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/nptl/Versions | 0 .../sysdeps}/unix/sysv/linux/alpha/nptl/aio_cancel.c | 0 .../sysdeps}/unix/sysv/linux/alpha/nptl/bits/local_lim.h | 0 .../sysdeps}/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h | 0 .../sysdeps}/unix/sysv/linux/alpha/nptl/bits/semaphore.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/nptl/clone.S | 0 .../sysdeps}/unix/sysv/linux/alpha/nptl/createthread.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/nptl/fork.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/nptl/ld.abilist | 0 .../sysdeps}/unix/sysv/linux/alpha/nptl/libBrokenLocale.abilist | 0 .../sysdeps}/unix/sysv/linux/alpha/nptl/libanl.abilist | 0 .../sysdeps}/unix/sysv/linux/alpha/nptl/libc.abilist | 0 .../sysdeps}/unix/sysv/linux/alpha/nptl/libcrypt.abilist | 0 .../sysdeps}/unix/sysv/linux/alpha/nptl/libdl.abilist | 0 .../sysdeps}/unix/sysv/linux/alpha/nptl/libm.abilist | 0 .../sysdeps}/unix/sysv/linux/alpha/nptl/libnsl.abilist | 0 .../sysdeps}/unix/sysv/linux/alpha/nptl/libpthread.abilist | 0 .../sysdeps}/unix/sysv/linux/alpha/nptl/libresolv.abilist | 0 .../sysdeps}/unix/sysv/linux/alpha/nptl/librt.abilist | 0 .../sysdeps}/unix/sysv/linux/alpha/nptl/libthread_db.abilist | 0 .../sysdeps}/unix/sysv/linux/alpha/nptl/libutil.abilist | 0 .../sysdeps}/unix/sysv/linux/alpha/nptl/lowlevellock.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/nptl/pt-vfork.S | 0 .../sysdeps}/unix/sysv/linux/alpha/nptl/pthread_once.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/nptl/sem_post.c | 0 .../sysdeps}/unix/sysv/linux/alpha/nptl/sysdep-cancel.h | 0 .../sysdeps}/unix/sysv/linux/alpha/nptl/timer_create.c | 0 .../sysdeps}/unix/sysv/linux/alpha/nptl/timer_delete.c | 0 .../sysdeps}/unix/sysv/linux/alpha/nptl/timer_getoverr.c | 0 .../sysdeps}/unix/sysv/linux/alpha/nptl/timer_gettime.c | 0 .../sysdeps}/unix/sysv/linux/alpha/nptl/timer_settime.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/nptl/vfork.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/oldglob.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/pipe.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/register-dump.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/rt_sigaction.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/semctl.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/setcontext.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/setfpucw.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/shmctl.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/sigaction.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/sigcontextinfo.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/sigprocmask.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/sigsuspend.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/sizes.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/statfs64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/statvfs.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/statvfs64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/swapcontext.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/sys/acct.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/sys/io.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/sys/procfs.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/sys/ucontext.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/sys/user.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/syscall.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/syscalls.list | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/sysconf.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/sysdep.h | 0 .../sysdeps}/unix/sysv/linux/alpha/ucontext-offsets.sym | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/wordexp.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/xstat.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/xstatconv.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/xstatconv.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/Makefile | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/bits/fcntl.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/bits/mman.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/brk.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/chown.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/clone.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/configure | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/configure.in | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/fchown.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/fcntl.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/fxstat.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/getegid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/geteuid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/getgid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/getgroups.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/getmsg.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/getresgid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/getresuid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/getrlimit.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/getuid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/lchown.c | 0 .../sysdeps}/unix/sysv/linux/am33/linuxthreads/sysdep-cancel.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/lockf64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/lxstat.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/profil-counter.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/putmsg.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/setegid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/seteuid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/setfsgid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/setfsuid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/setgid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/setgroups.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/setregid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/setresgid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/setresuid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/setreuid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/setrlimit.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/setuid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/socket.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/syscall.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/sysdep.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/sysdep.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/xstat.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/Makefile | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/Versions | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/____longjmp_chk.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/aeabi_read_tp.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/alphasort64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/bits/fcntl.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/bits/hwcap.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/bits/mman.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/bits/shm.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/brk.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/clone.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/configure | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/configure.in | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/dl-procinfo.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/dl-procinfo.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/fchown.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/fcntl.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/ftruncate64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/fxstat.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/fxstatat.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/getcontext.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/getdents64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/getegid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/geteuid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/getgid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/getgroups.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/getresgid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/getresuid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/getrlimit.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/getrlimit64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/getuid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/glob64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/internal_accept4.S | 0 .../sysdeps}/unix/sysv/linux/arm/internal_recvmmsg.S | 0 .../sysdeps}/unix/sysv/linux/arm/internal_sendmmsg.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/ioperm.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/kernel-features.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/lchown.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/ldsodefs.h | 0 .../sysdeps}/unix/sysv/linux/arm/libc-aeabi_read_tp.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/libc-do-syscall.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/lockf64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/lxstat.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/makecontext.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/mmap.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/mmap64.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/msgctl.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/Makefile | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/Versions | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/bits/atomic.h | 0 .../sysdeps}/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h | 0 .../sysdeps}/unix/sysv/linux/arm/nptl/bits/semaphore.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/clone.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/configure | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/configure.in | 0 .../sysdeps}/unix/sysv/linux/arm/nptl/createthread.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/fork.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/ld.abilist | 0 .../sysdeps}/unix/sysv/linux/arm/nptl/libBrokenLocale.abilist | 0 .../sysdeps}/unix/sysv/linux/arm/nptl/libanl.abilist | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/libc.abilist | 0 .../sysdeps}/unix/sysv/linux/arm/nptl/libcrypt.abilist | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/libdl.abilist | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/libm.abilist | 0 .../sysdeps}/unix/sysv/linux/arm/nptl/libnsl.abilist | 0 .../sysdeps}/unix/sysv/linux/arm/nptl/libpthread.abilist | 0 .../sysdeps}/unix/sysv/linux/arm/nptl/libresolv.abilist | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/librt.abilist | 0 .../sysdeps}/unix/sysv/linux/arm/nptl/libthread_db.abilist | 0 .../sysdeps}/unix/sysv/linux/arm/nptl/libutil.abilist | 0 .../sysdeps}/unix/sysv/linux/arm/nptl/lowlevellock.c | 0 .../sysdeps}/unix/sysv/linux/arm/nptl/lowlevellock.h | 0 .../sysdeps}/unix/sysv/linux/arm/nptl/nptl-aeabi_unwind_cpp_pr1.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/pt-vfork.S | 0 .../sysdeps}/unix/sysv/linux/arm/nptl/pthread_once.c | 0 .../sysdeps}/unix/sysv/linux/arm/nptl/rt-aeabi_unwind_cpp_pr1.c | 0 .../sysdeps}/unix/sysv/linux/arm/nptl/sysdep-cancel.h | 0 .../sysdeps}/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c | 0 .../sysdeps}/unix/sysv/linux/arm/nptl/unwind-resume.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/unwind.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/vfork.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/oldgetrlimit.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/oldgetrlimit64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/oldsetrlimit.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/posix_fadvise.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/posix_fadvise64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/pread.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/pread64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/profil-counter.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/pwrite.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/pwrite64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/readahead.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/readdir64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/readdir64_r.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/register-dump.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/scandir64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/semctl.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/setcontext.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/setegid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/seteuid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/setfsgid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/setfsuid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/setgid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/setgroups.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/setregid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/setresgid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/setresuid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/setreuid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/setrlimit.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/setuid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/shmctl.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/sigaction.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/sigcontextinfo.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/sigrestorer.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/swapcontext.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/sys/elf.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/sys/io.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/sys/procfs.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/sys/ucontext.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/sys/user.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/syscall.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/syscalls.list | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/sysdep.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/sysdep.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/truncate64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/ucontext_i.sym | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/umount.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/versionsort64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/vfork.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/xstat.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/Makefile | 0 .../sysdeps}/unix/sysv/linux/generic/____longjmp_chk.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/access.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/bits/fcntl.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/bits/msq.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/bits/sem.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/bits/shm.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/bits/stat.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/bits/statfs.h | 0 .../sysdeps}/unix/sysv/linux/generic/bits/typesizes.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/brk.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/chmod.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/chown.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/creat.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/dl-origin.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/dup2.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/epoll_create.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/epoll_wait.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/futimesat.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/getdents.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/getdents64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/inotify_init.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/kernel_stat.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/lchown.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/link.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/lxstat.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/mkdir.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/not-cancel.h | 0 .../sysdeps}/unix/sysv/linux/generic/nptl/not-cancel.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/open.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/open64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/pause.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/pipe.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/poll.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/readlink.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/readlink_chk.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/recv.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/rename.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/rmdir.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/select.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/send.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/symlink.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/syscalls.list | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/sysctl.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/sysdep.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/umount.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/unlink.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/ustat.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/utimes.c | 0 .../sysdeps}/unix/sysv/linux/generic/wordsize-32/Versions | 0 .../sysdeps}/unix/sysv/linux/generic/wordsize-32/fcntl.c | 0 .../sysdeps}/unix/sysv/linux/generic/wordsize-32/fstatfs.c | 0 .../sysdeps}/unix/sysv/linux/generic/wordsize-32/ftruncate.c | 0 .../sysdeps}/unix/sysv/linux/generic/wordsize-32/ftruncate64.c | 0 .../sysdeps}/unix/sysv/linux/generic/wordsize-32/fxstat.c | 0 .../sysdeps}/unix/sysv/linux/generic/wordsize-32/fxstatat.c | 0 .../sysdeps}/unix/sysv/linux/generic/wordsize-32/getdents.c | 0 .../sysdeps}/unix/sysv/linux/generic/wordsize-32/llseek.c | 0 .../sysdeps}/unix/sysv/linux/generic/wordsize-32/lseek.c | 0 .../sysdeps}/unix/sysv/linux/generic/wordsize-32/lxstat.c | 0 .../sysdeps}/unix/sysv/linux/generic/wordsize-32/lxstat64.c | 0 .../sysdeps}/unix/sysv/linux/generic/wordsize-32/mmap.c | 0 .../sysdeps}/unix/sysv/linux/generic/wordsize-32/overflow.h | 0 .../sysdeps}/unix/sysv/linux/generic/wordsize-32/posix_fadvise.c | 0 .../sysdeps}/unix/sysv/linux/generic/wordsize-32/pread.c | 0 .../sysdeps}/unix/sysv/linux/generic/wordsize-32/pread64.c | 0 .../sysdeps}/unix/sysv/linux/generic/wordsize-32/preadv.c | 0 .../sysdeps}/unix/sysv/linux/generic/wordsize-32/preadv64.c | 0 .../sysdeps}/unix/sysv/linux/generic/wordsize-32/pwrite.c | 0 .../sysdeps}/unix/sysv/linux/generic/wordsize-32/pwrite64.c | 0 .../sysdeps}/unix/sysv/linux/generic/wordsize-32/pwritev.c | 0 .../sysdeps}/unix/sysv/linux/generic/wordsize-32/pwritev64.c | 0 .../sysdeps}/unix/sysv/linux/generic/wordsize-32/sendfile.c | 0 .../sysdeps}/unix/sysv/linux/generic/wordsize-32/statfs.c | 0 .../sysdeps}/unix/sysv/linux/generic/wordsize-32/syscalls.list | 0 .../sysdeps}/unix/sysv/linux/generic/wordsize-32/truncate.c | 0 .../sysdeps}/unix/sysv/linux/generic/wordsize-32/truncate64.c | 0 .../sysdeps}/unix/sysv/linux/generic/wordsize-32/xstat.c | 0 .../sysdeps}/unix/sysv/linux/generic/wordsize-32/xstat64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/xmknod.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/xstat.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/Makefile | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/Versions | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/bits/atomic.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/bits/errno.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/bits/fcntl.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/bits/ioctls.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/bits/ipc.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/bits/mman.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/bits/msq.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/bits/sem.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/bits/shm.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/bits/sigaction.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/bits/signum.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/bits/socket.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/brk.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/clone.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/fcntl.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/fxstat.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/fxstatat.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/getcontext.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/getdents64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/getrlimit64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/internaltypes.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/kernel-features.h | 0 .../sysdeps}/unix/sysv/linux/hppa/kernel_sigaction.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/kernel_stat.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/lxstat.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/makecontext.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/mmap.c | 0 .../sysdeps}/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h | 0 .../sysdeps}/unix/sysv/linux/hppa/nptl/bits/semaphore.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/nptl/clone.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/nptl/configure | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/nptl/configure.in | 0 .../sysdeps}/unix/sysv/linux/hppa/nptl/createthread.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/nptl/fork.c | 0 .../sysdeps}/unix/sysv/linux/hppa/nptl/libc-lowlevellock.c | 0 .../sysdeps}/unix/sysv/linux/hppa/nptl/lowlevellock.c | 0 .../sysdeps}/unix/sysv/linux/hppa/nptl/lowlevellock.h | 0 .../sysdeps}/unix/sysv/linux/hppa/nptl/pt-initfini.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/nptl/pt-vfork.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/nptl/pthread.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/nptl/pthreadP.h | 0 .../sysdeps}/unix/sysv/linux/hppa/nptl/pthread_cond_broadcast.c | 0 .../sysdeps}/unix/sysv/linux/hppa/nptl/pthread_cond_destroy.c | 0 .../sysdeps}/unix/sysv/linux/hppa/nptl/pthread_cond_init.c | 0 .../sysdeps}/unix/sysv/linux/hppa/nptl/pthread_cond_signal.c | 0 .../sysdeps}/unix/sysv/linux/hppa/nptl/pthread_cond_timedwait.c | 0 .../sysdeps}/unix/sysv/linux/hppa/nptl/pthread_cond_wait.c | 0 .../sysdeps}/unix/sysv/linux/hppa/nptl/pthread_once.c | 0 .../sysdeps}/unix/sysv/linux/hppa/nptl/sysdep-cancel.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/profil-counter.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/setcontext.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/socket.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/swapcontext.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/sys/epoll.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/sys/eventfd.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/sys/inotify.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/sys/procfs.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/sys/signalfd.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/sys/timerfd.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/sys/ucontext.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/sys/user.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/syscall.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/syscalls.list | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/sysdep.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/sysdep.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/ucontext_i.sym | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/umount.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/xstat.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/Implies | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/Makefile | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/Versions | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/____longjmp_chk.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/__longjmp.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/__start_context.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/bits/endian.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/bits/fcntl.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/bits/ipc.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/bits/mman.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/bits/msq.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/bits/sem.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/bits/setjmp.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/bits/shm.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/bits/sigaction.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/bits/sigcontext.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/bits/siginfo.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/bits/sigstack.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/bits/stat.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/brk.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/bsd-_setjmp.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/bsd-setjmp.S | 0 .../sysdeps}/unix/sysv/linux/ia64/clock_getcpuclockid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/clone.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/clone2.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/configure | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/configure.in | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/dl-brk.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/dl-cache.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/dl-static.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/fork.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/get_clockfreq.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/getclktck.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/getcontext.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/getpagesize.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/has_cpuclock.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/ioperm.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/kernel-features.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/kernel_stat.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/ldconfig.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/ldd-rewrite.sed | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/ldsodefs.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/makecontext.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/Makefile | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/Versions | 0 .../sysdeps}/unix/sysv/linux/ia64/nptl/__ia64_longjmp.S | 0 .../sysdeps}/unix/sysv/linux/ia64/nptl/__sigstack_longjmp.c | 0 .../sysdeps}/unix/sysv/linux/ia64/nptl/bits/local_lim.h | 0 .../sysdeps}/unix/sysv/linux/ia64/nptl/bits/pthreadtypes.h | 0 .../sysdeps}/unix/sysv/linux/ia64/nptl/bits/semaphore.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/clone2.S | 0 .../sysdeps}/unix/sysv/linux/ia64/nptl/createthread.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/dl-sysdep.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/fork.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/ld.abilist | 0 .../sysdeps}/unix/sysv/linux/ia64/nptl/libBrokenLocale.abilist | 0 .../sysdeps}/unix/sysv/linux/ia64/nptl/libanl.abilist | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/libc.abilist | 0 .../sysdeps}/unix/sysv/linux/ia64/nptl/libcrypt.abilist | 0 .../sysdeps}/unix/sysv/linux/ia64/nptl/libdl.abilist | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/libm.abilist | 0 .../sysdeps}/unix/sysv/linux/ia64/nptl/libnsl.abilist | 0 .../sysdeps}/unix/sysv/linux/ia64/nptl/libpthread.abilist | 0 .../sysdeps}/unix/sysv/linux/ia64/nptl/libresolv.abilist | 0 .../sysdeps}/unix/sysv/linux/ia64/nptl/librt.abilist | 0 .../sysdeps}/unix/sysv/linux/ia64/nptl/libthread_db.abilist | 0 .../sysdeps}/unix/sysv/linux/ia64/nptl/libutil.abilist | 0 .../sysdeps}/unix/sysv/linux/ia64/nptl/lowlevellock.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/pt-vfork.S | 0 .../sysdeps}/unix/sysv/linux/ia64/nptl/pthread_once.c | 0 .../sysdeps}/unix/sysv/linux/ia64/nptl/sysdep-cancel.h | 0 .../sysdeps}/unix/sysv/linux/ia64/nptl/timer_create.c | 0 .../sysdeps}/unix/sysv/linux/ia64/nptl/timer_delete.c | 0 .../sysdeps}/unix/sysv/linux/ia64/nptl/timer_getoverr.c | 0 .../sysdeps}/unix/sysv/linux/ia64/nptl/timer_gettime.c | 0 .../sysdeps}/unix/sysv/linux/ia64/nptl/timer_settime.c | 0 .../sysdeps}/unix/sysv/linux/ia64/nptl/unwind-forcedunwind.c | 0 .../sysdeps}/unix/sysv/linux/ia64/nptl/unwind_longjmp.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/vfork.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/pipe.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/profil-counter.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/readelflib.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/register-dump.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/rt-sysdep.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/setcontext.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/setjmp.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/sigaction.c | 0 .../sysdeps}/unix/sysv/linux/ia64/sigcontext-offsets.sym | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/sigcontextinfo.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/sigpending.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/sigprocmask.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/swapcontext.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/sys/io.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/sys/procfs.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/sys/ptrace.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/sys/rse.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/sys/ucontext.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/sys/user.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/syscall.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/syscalls.list | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/sysconf.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/sysdep.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/sysdep.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/system.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/ucontext_i.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/umount.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/unwind-dw2-fde.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/vfork.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/wordexp.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/Makefile | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/Versions | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/____longjmp_chk.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/alphasort64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/bits/a.out.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/bits/fcntl.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/bits/m68k-vdso.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/bits/mman.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/bits/poll.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/bits/stat.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/brk.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/clone.S | 0 .../sysdeps}/unix/sysv/linux/m68k/coldfire/nptl/bits/atomic.h | 0 .../sysdeps}/unix/sysv/linux/m68k/coldfire/nptl/ld.abilist | 0 .../unix/sysv/linux/m68k/coldfire/nptl/libBrokenLocale.abilist | 0 .../sysdeps}/unix/sysv/linux/m68k/coldfire/nptl/libanl.abilist | 0 .../sysdeps}/unix/sysv/linux/m68k/coldfire/nptl/libc.abilist | 0 .../sysdeps}/unix/sysv/linux/m68k/coldfire/nptl/libcrypt.abilist | 0 .../sysdeps}/unix/sysv/linux/m68k/coldfire/nptl/libdl.abilist | 0 .../sysdeps}/unix/sysv/linux/m68k/coldfire/nptl/libm.abilist | 0 .../sysdeps}/unix/sysv/linux/m68k/coldfire/nptl/libnsl.abilist | 0 .../unix/sysv/linux/m68k/coldfire/nptl/libpthread.abilist | 0 .../sysdeps}/unix/sysv/linux/m68k/coldfire/nptl/libresolv.abilist | 0 .../sysdeps}/unix/sysv/linux/m68k/coldfire/nptl/librt.abilist | 0 .../unix/sysv/linux/m68k/coldfire/nptl/libthread_db.abilist | 0 .../sysdeps}/unix/sysv/linux/m68k/coldfire/nptl/libutil.abilist | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/coldfire/sysdep.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/configure | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/configure.in | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/dl-librecon.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/fchown.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/fchownat.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/fcntl.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/fxstat.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/fxstatat.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/getdents64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/getegid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/geteuid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/getgid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/getgroups.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/getmsg.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/getpagesize.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/getresgid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/getresuid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/getrlimit.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/getrlimit64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/getsysstats.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/getuid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/glob64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/init-first.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/kernel-features.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/lchown.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/ldconfig.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/libc-m68k-vdso.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/lockf64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/lxstat.c | 0 .../sysdeps}/unix/sysv/linux/m68k/m680x0/nptl/ld.abilist | 0 .../unix/sysv/linux/m68k/m680x0/nptl/libBrokenLocale.abilist | 0 .../sysdeps}/unix/sysv/linux/m68k/m680x0/nptl/libanl.abilist | 0 .../sysdeps}/unix/sysv/linux/m68k/m680x0/nptl/libc.abilist | 0 .../sysdeps}/unix/sysv/linux/m68k/m680x0/nptl/libcrypt.abilist | 0 .../sysdeps}/unix/sysv/linux/m68k/m680x0/nptl/libdl.abilist | 0 .../sysdeps}/unix/sysv/linux/m68k/m680x0/nptl/libm.abilist | 0 .../sysdeps}/unix/sysv/linux/m68k/m680x0/nptl/libnsl.abilist | 0 .../sysdeps}/unix/sysv/linux/m68k/m680x0/nptl/libpthread.abilist | 0 .../sysdeps}/unix/sysv/linux/m68k/m680x0/nptl/libresolv.abilist | 0 .../sysdeps}/unix/sysv/linux/m68k/m680x0/nptl/librt.abilist | 0 .../unix/sysv/linux/m68k/m680x0/nptl/libthread_db.abilist | 0 .../sysdeps}/unix/sysv/linux/m68k/m680x0/nptl/libutil.abilist | 0 .../sysdeps}/unix/sysv/linux/m68k/m680x0/syscalls.list | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/m680x0/sysdep.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/m68k-helpers.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/m68k-vdso.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/mmap.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/mremap.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/msgctl.c | 0 .../sysdeps}/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h | 0 .../sysdeps}/unix/sysv/linux/m68k/nptl/bits/semaphore.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/nptl/clone.S | 0 .../sysdeps}/unix/sysv/linux/m68k/nptl/createthread.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/nptl/fork.c | 0 .../sysdeps}/unix/sysv/linux/m68k/nptl/lowlevellock.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/nptl/pt-vfork.S | 0 .../sysdeps}/unix/sysv/linux/m68k/nptl/pthread_once.c | 0 .../sysdeps}/unix/sysv/linux/m68k/nptl/sysdep-cancel.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/nptl/vfork.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/oldgetrlimit64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/putmsg.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/readdir64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/readdir64_r.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/register-dump.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/scandir64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/semctl.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/semtimedop.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/setegid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/seteuid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/setfsgid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/setfsuid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/setgid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/setgroups.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/setregid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/setresgid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/setresuid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/setreuid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/setrlimit.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/setuid.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/shmctl.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/sigcontextinfo.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/socket.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/sys/procfs.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/sys/reg.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/sys/ucontext.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/sys/user.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/syscall.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/syscalls.list | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/sysdep.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/sysdep.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/versionsort64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/vfork.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/xstat.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/Makefile | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/Versions | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/____longjmp_chk.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/_test_and_set.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/endian.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/epoll.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/errno.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/eventfd.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/fcntl.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/inotify.h | 0 .../sysdeps}/unix/sysv/linux/mips/bits/ioctl-types.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/ipc.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/mman.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/msq.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/poll.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/resource.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/sem.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/shm.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/sigaction.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/sigcontext.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/siginfo.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/signalfd.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/signum.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/sigstack.h | 0 .../sysdeps}/unix/sysv/linux/mips/bits/socket_type.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/stat.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/statfs.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/termios.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/timerfd.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/brk.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/clone.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/configure | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/configure.in | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/dl-cache.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/dl-static.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/fcntl.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/getcontext.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/getmsg.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/getsysstats.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/ipc_priv.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/kernel-features.h | 0 .../sysdeps}/unix/sysv/linux/mips/kernel_rt_sigframe.h | 0 .../sysdeps}/unix/sysv/linux/mips/kernel_sigaction.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/kernel_stat.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/kernel_termios.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/ldsodefs.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/libc-abis | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/lockf64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/makecontext.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips32/Makefile | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips32/accept4.c | 0 .../sysdeps}/unix/sysv/linux/mips/mips32/ftruncate64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips32/fxstatat.c | 0 .../sysdeps}/unix/sysv/linux/mips/mips32/internal_accept4.S | 0 .../sysdeps}/unix/sysv/linux/mips/mips32/internal_recvmmsg.S | 0 .../sysdeps}/unix/sysv/linux/mips/mips32/internal_sendmmsg.S | 0 .../sysdeps}/unix/sysv/linux/mips/mips32/nptl/ld.abilist | 0 .../unix/sysv/linux/mips/mips32/nptl/libBrokenLocale.abilist | 0 .../sysdeps}/unix/sysv/linux/mips/mips32/nptl/libanl.abilist | 0 .../sysdeps}/unix/sysv/linux/mips/mips32/nptl/libc.abilist | 0 .../sysdeps}/unix/sysv/linux/mips/mips32/nptl/libcidn.abilist | 0 .../sysdeps}/unix/sysv/linux/mips/mips32/nptl/libcrypt.abilist | 0 .../sysdeps}/unix/sysv/linux/mips/mips32/nptl/libdl.abilist | 0 .../sysdeps}/unix/sysv/linux/mips/mips32/nptl/libm.abilist | 0 .../sysdeps}/unix/sysv/linux/mips/mips32/nptl/libnsl.abilist | 0 .../unix/sysv/linux/mips/mips32/nptl/libnss_compat.abilist | 0 .../sysdeps}/unix/sysv/linux/mips/mips32/nptl/libnss_db.abilist | 0 .../sysdeps}/unix/sysv/linux/mips/mips32/nptl/libnss_dns.abilist | 0 .../unix/sysv/linux/mips/mips32/nptl/libnss_files.abilist | 0 .../unix/sysv/linux/mips/mips32/nptl/libnss_hesiod.abilist | 0 .../sysdeps}/unix/sysv/linux/mips/mips32/nptl/libnss_nis.abilist | 0 .../unix/sysv/linux/mips/mips32/nptl/libnss_nisplus.abilist | 0 .../sysdeps}/unix/sysv/linux/mips/mips32/nptl/libpthread.abilist | 0 .../sysdeps}/unix/sysv/linux/mips/mips32/nptl/libresolv.abilist | 0 .../sysdeps}/unix/sysv/linux/mips/mips32/nptl/librt.abilist | 0 .../unix/sysv/linux/mips/mips32/nptl/libthread_db.abilist | 0 .../sysdeps}/unix/sysv/linux/mips/mips32/nptl/libutil.abilist | 0 .../sysdeps}/unix/sysv/linux/mips/mips32/posix_fadvise.c | 0 .../sysdeps}/unix/sysv/linux/mips/mips32/posix_fadvise64.c | 0 .../sysdeps}/unix/sysv/linux/mips/mips32/readahead.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips32/recvmmsg.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips32/sendmmsg.c | 0 .../sysdeps}/unix/sysv/linux/mips/mips32/sync_file_range.c | 0 .../sysdeps}/unix/sysv/linux/mips/mips32/syscalls.list | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips32/sysdep.h | 0 .../sysdeps}/unix/sysv/linux/mips/mips32/truncate64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/Makefile | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/configure | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/configure.in | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/ftruncate64.c | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/fxstatat64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/ldconfig.h | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/ldd-rewrite.sed | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/llseek.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/msgctl.c | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/n32/Makefile | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/n32/fallocate.c | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/n32/fallocate64.c | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/n32/nptl/ld.abilist | 0 .../unix/sysv/linux/mips/mips64/n32/nptl/libBrokenLocale.abilist | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/n32/nptl/libanl.abilist | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/n32/nptl/libc.abilist | 0 .../unix/sysv/linux/mips/mips64/n32/nptl/libcrypt.abilist | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/n32/nptl/libdl.abilist | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/n32/nptl/libm.abilist | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/n32/nptl/libnsl.abilist | 0 .../unix/sysv/linux/mips/mips64/n32/nptl/libpthread.abilist | 0 .../unix/sysv/linux/mips/mips64/n32/nptl/libresolv.abilist | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/n32/nptl/librt.abilist | 0 .../unix/sysv/linux/mips/mips64/n32/nptl/libthread_db.abilist | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/n32/nptl/libutil.abilist | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/n32/posix_fadvise.c | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/n32/posix_fadvise64.c | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/n32/posix_fallocate.c | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/n32/posix_fallocate64.c | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/n32/syscalls.list | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/n32/sysdep.h | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/n64/Makefile | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/n64/fallocate.c | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/n64/fallocate64.c | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/n64/fstatfs64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n64/ftw.c | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/n64/ftw64.c | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/n64/glob64.c | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/n64/ioctl.S | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/n64/nptl/ld.abilist | 0 .../unix/sysv/linux/mips/mips64/n64/nptl/libBrokenLocale.abilist | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/n64/nptl/libanl.abilist | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilist | 0 .../unix/sysv/linux/mips/mips64/n64/nptl/libcrypt.abilist | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/n64/nptl/libdl.abilist | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/n64/nptl/libm.abilist | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/n64/nptl/libnsl.abilist | 0 .../unix/sysv/linux/mips/mips64/n64/nptl/libpthread.abilist | 0 .../unix/sysv/linux/mips/mips64/n64/nptl/libresolv.abilist | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/n64/nptl/librt.abilist | 0 .../unix/sysv/linux/mips/mips64/n64/nptl/libthread_db.abilist | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/n64/nptl/libutil.abilist | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/n64/posix_fadvise.c | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/n64/posix_fadvise64.c | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/n64/posix_fallocate.c | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/n64/posix_fallocate64.c | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/n64/preadv64.c | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/n64/pwritev64.c | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/n64/statfs64.c | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/n64/syscalls.list | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/n64/sysdep.h | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/recv.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/semctl.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/send.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/shmctl.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/syscall.S | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/syscalls.list | 0 .../sysdeps}/unix/sysv/linux/mips/mips64/truncate64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/umount.c | 0 .../sysdeps}/unix/sysv/linux/mips/nptl/bits/local_lim.h | 0 .../sysdeps}/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h | 0 .../sysdeps}/unix/sysv/linux/mips/nptl/bits/semaphore.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/nptl/clone.S | 0 .../sysdeps}/unix/sysv/linux/mips/nptl/createthread.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/nptl/fork.c | 0 .../sysdeps}/unix/sysv/linux/mips/nptl/lowlevellock.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/nptl/pt-vfork.S | 0 .../sysdeps}/unix/sysv/linux/mips/nptl/pthread_once.c | 0 .../sysdeps}/unix/sysv/linux/mips/nptl/sysdep-cancel.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/nptl/vfork.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/pipe.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/pread.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/pread64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/profil-counter.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/putmsg.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/pwrite.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/pwrite64.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/readelflib.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/register-dump.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/setcontext.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/sigaction.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/sigcontextinfo.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/swapcontext.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/sys/cachectl.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/sys/procfs.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/sys/sysmips.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/sys/ucontext.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/sys/user.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/syscalls.list | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/ucontext_i.sym | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/ustat.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/vfork.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/xstatconv.c | 0 .../sysdeps}/unix/sysv/linux/powerpc/powerpc32/405/Implies | 0 .../sysdeps}/unix/sysv/linux/powerpc/powerpc32/440/Implies | 0 .../sysdeps}/unix/sysv/linux/powerpc/powerpc32/464/Implies | 0 .../sysdeps}/unix/sysv/linux/powerpc/powerpc32/476/Implies | 0 .../sysdeps}/unix/sysv/linux/powerpc/powerpc32/nofpu/Implies | 0 .../sysdeps}/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S | 0 .../unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/ld.abilist | 0 .../linux/powerpc/powerpc32/nofpu/nptl/libBrokenLocale.abilist | 0 .../unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libanl.abilist | 0 .../unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist | 0 .../unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libcrypt.abilist | 0 .../unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libdl.abilist | 0 .../unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libm.abilist | 0 .../unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libnsl.abilist | 0 .../sysv/linux/powerpc/powerpc32/nofpu/nptl/libpthread.abilist | 0 .../sysv/linux/powerpc/powerpc32/nofpu/nptl/libresolv.abilist | 0 .../unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/librt.abilist | 0 .../sysv/linux/powerpc/powerpc32/nofpu/nptl/libthread_db.abilist | 0 .../unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libutil.abilist | 0 .../sysdeps}/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S | 0 .../unix/sysv/linux/powerpc/powerpc32/nofpu/swapcontext.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/Makefile | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/Versions | 0 .../sysdeps}/unix/sysv/linux/tile/bits/environments.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/bits/local_lim.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/bits/mman.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/bits/sigaction.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/bits/siginfo.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/cacheflush.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/configure | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/configure.in | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/getcontext.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/kernel-features.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/makecontext.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/nptl/Makefile | 0 .../sysdeps}/unix/sysv/linux/tile/nptl/bits/pthreadtypes.h | 0 .../sysdeps}/unix/sysv/linux/tile/nptl/bits/semaphore.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/nptl/clone.S | 0 .../sysdeps}/unix/sysv/linux/tile/nptl/createthread.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/nptl/fork.c | 0 .../sysdeps}/unix/sysv/linux/tile/nptl/lowlevellock.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/nptl/pt-vfork.S | 0 .../sysdeps}/unix/sysv/linux/tile/nptl/pthread_once.c | 0 .../sysdeps}/unix/sysv/linux/tile/nptl/sysdep-cancel.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/nptl/vfork.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/nptl/waitpid.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/profil-counter.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/set_dataplane.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/setcontext.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/sigcontextinfo.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/swapcontext.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/sys/cachectl.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/sys/dataplane.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/sys/procfs.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/sys/ptrace.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/sys/reg.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/sys/ucontext.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/sys/user.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/syscall.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/sysdep.c | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/sysdep.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilegx/Makefile | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilegx/ioctl.S | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilegx/ldconfig.h | 0 .../sysdeps}/unix/sysv/linux/tile/tilegx/register-dump.h | 0 .../sysdeps}/unix/sysv/linux/tile/tilegx/tilegx32/Implies | 0 .../sysdeps}/unix/sysv/linux/tile/tilegx/tilegx32/Makefile | 0 .../sysdeps}/unix/sysv/linux/tile/tilegx/tilegx32/nptl/ld.abilist | 0 .../sysv/linux/tile/tilegx/tilegx32/nptl/libBrokenLocale.abilist | 0 .../unix/sysv/linux/tile/tilegx/tilegx32/nptl/libanl.abilist | 0 .../unix/sysv/linux/tile/tilegx/tilegx32/nptl/libc.abilist | 0 .../unix/sysv/linux/tile/tilegx/tilegx32/nptl/libcrypt.abilist | 0 .../unix/sysv/linux/tile/tilegx/tilegx32/nptl/libdl.abilist | 0 .../unix/sysv/linux/tile/tilegx/tilegx32/nptl/libm.abilist | 0 .../unix/sysv/linux/tile/tilegx/tilegx32/nptl/libnsl.abilist | 0 .../unix/sysv/linux/tile/tilegx/tilegx32/nptl/libpthread.abilist | 0 .../unix/sysv/linux/tile/tilegx/tilegx32/nptl/libresolv.abilist | 0 .../unix/sysv/linux/tile/tilegx/tilegx32/nptl/librt.abilist | 0 .../sysv/linux/tile/tilegx/tilegx32/nptl/libthread_db.abilist | 0 .../unix/sysv/linux/tile/tilegx/tilegx32/nptl/libutil.abilist | 0 .../sysdeps}/unix/sysv/linux/tile/tilegx/tilegx64/Implies | 0 .../sysdeps}/unix/sysv/linux/tile/tilegx/tilegx64/Makefile | 0 .../sysdeps}/unix/sysv/linux/tile/tilegx/tilegx64/nptl/ld.abilist | 0 .../sysv/linux/tile/tilegx/tilegx64/nptl/libBrokenLocale.abilist | 0 .../unix/sysv/linux/tile/tilegx/tilegx64/nptl/libanl.abilist | 0 .../unix/sysv/linux/tile/tilegx/tilegx64/nptl/libc.abilist | 0 .../unix/sysv/linux/tile/tilegx/tilegx64/nptl/libcrypt.abilist | 0 .../unix/sysv/linux/tile/tilegx/tilegx64/nptl/libdl.abilist | 0 .../unix/sysv/linux/tile/tilegx/tilegx64/nptl/libm.abilist | 0 .../unix/sysv/linux/tile/tilegx/tilegx64/nptl/libnsl.abilist | 0 .../unix/sysv/linux/tile/tilegx/tilegx64/nptl/libpthread.abilist | 0 .../unix/sysv/linux/tile/tilegx/tilegx64/nptl/libresolv.abilist | 0 .../unix/sysv/linux/tile/tilegx/tilegx64/nptl/librt.abilist | 0 .../sysv/linux/tile/tilegx/tilegx64/nptl/libthread_db.abilist | 0 .../unix/sysv/linux/tile/tilegx/tilegx64/nptl/libutil.abilist | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilepro/Implies | 0 .../sysdeps}/unix/sysv/linux/tile/tilepro/ldconfig.h | 0 .../sysdeps}/unix/sysv/linux/tile/tilepro/nptl/ld.abilist | 0 .../unix/sysv/linux/tile/tilepro/nptl/libBrokenLocale.abilist | 0 .../sysdeps}/unix/sysv/linux/tile/tilepro/nptl/libanl.abilist | 0 .../sysdeps}/unix/sysv/linux/tile/tilepro/nptl/libc.abilist | 0 .../sysdeps}/unix/sysv/linux/tile/tilepro/nptl/libcrypt.abilist | 0 .../sysdeps}/unix/sysv/linux/tile/tilepro/nptl/libdl.abilist | 0 .../sysdeps}/unix/sysv/linux/tile/tilepro/nptl/libm.abilist | 0 .../sysdeps}/unix/sysv/linux/tile/tilepro/nptl/libnsl.abilist | 0 .../sysdeps}/unix/sysv/linux/tile/tilepro/nptl/libpthread.abilist | 0 .../sysdeps}/unix/sysv/linux/tile/tilepro/nptl/libresolv.abilist | 0 .../sysdeps}/unix/sysv/linux/tile/tilepro/nptl/librt.abilist | 0 .../unix/sysv/linux/tile/tilepro/nptl/libthread_db.abilist | 0 .../sysdeps}/unix/sysv/linux/tile/tilepro/nptl/libutil.abilist | 0 .../sysdeps}/unix/sysv/linux/tile/tilepro/register-dump.h | 0 {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/ucontext_i.h | 0 2361 files changed, 0 insertions(+), 0 deletions(-) rename .gitignore => ports/.gitignore (100%) rename Banner => ports/Banner (100%) rename ChangeLog => ports/ChangeLog (100%) rename ChangeLog.aix => ports/ChangeLog.aix (100%) rename ChangeLog.alpha => ports/ChangeLog.alpha (100%) rename ChangeLog.am33 => ports/ChangeLog.am33 (100%) rename ChangeLog.arm => ports/ChangeLog.arm (100%) rename ChangeLog.cris => ports/ChangeLog.cris (100%) rename ChangeLog.hppa => ports/ChangeLog.hppa (100%) rename ChangeLog.ia64 => ports/ChangeLog.ia64 (100%) rename ChangeLog.linux-generic => ports/ChangeLog.linux-generic (100%) rename ChangeLog.m68k => ports/ChangeLog.m68k (100%) rename ChangeLog.mips => ports/ChangeLog.mips (100%) rename ChangeLog.powerpc => ports/ChangeLog.powerpc (100%) rename ChangeLog.tile => ports/ChangeLog.tile (100%) rename Makefile => ports/Makefile (100%) rename README => ports/README (100%) rename {data => ports/data}/c++-types-arm-linux-gnueabi.data (100%) rename {data => ports/data}/c++-types-m68k-linux-gnu.data (100%) rename {data => ports/data}/c++-types-powerpcsoft-linux-gnu.data (100%) rename {data => ports/data}/c++-types-tilegx-linux-gnu.data (100%) rename {data => ports/data}/c++-types-tilepro-linux-gnu.data (100%) rename {data => ports/data}/localplt-alpha-linux-gnu.data (100%) rename {data => ports/data}/localplt-arm-linux-gnueabi.data (100%) rename {data => ports/data}/localplt-ia64-linux-gnu.data (100%) rename {data => ports/data}/localplt-m68k-linux-gnu.data (100%) rename {data => ports/data}/localplt-powerpcsoft-linux-gnu.data (100%) rename {sysdeps => ports/sysdeps}/alpha/Implies (100%) rename {sysdeps => ports/sysdeps}/alpha/Makefile (100%) rename {sysdeps => ports/sysdeps}/alpha/Subdirs (100%) rename {sysdeps => ports/sysdeps}/alpha/Versions (100%) rename {sysdeps => ports/sysdeps}/alpha/__longjmp.S (100%) rename {sysdeps => ports/sysdeps}/alpha/_mcount.S (100%) rename {sysdeps => ports/sysdeps}/alpha/add_n.S (100%) rename {sysdeps => ports/sysdeps}/alpha/addmul_1.S (100%) rename {sysdeps => ports/sysdeps}/alpha/alphaev5/add_n.S (100%) rename {sysdeps => ports/sysdeps}/alpha/alphaev5/lshift.S (100%) rename {sysdeps => ports/sysdeps}/alpha/alphaev5/rshift.S (100%) rename {sysdeps => ports/sysdeps}/alpha/alphaev5/sub_n.S (100%) rename {sysdeps => ports/sysdeps}/alpha/alphaev6/Implies (100%) rename {sysdeps => ports/sysdeps}/alpha/alphaev6/addmul_1.S (100%) rename {sysdeps => ports/sysdeps}/alpha/alphaev6/fpu/e_sqrt.S (100%) rename {sysdeps => ports/sysdeps}/alpha/alphaev6/fpu/e_sqrtf.S (100%) rename {sysdeps => ports/sysdeps}/alpha/alphaev6/memcpy.S (100%) rename {sysdeps => ports/sysdeps}/alpha/alphaev6/memset.S (100%) rename {sysdeps => ports/sysdeps}/alpha/alphaev6/stxcpy.S (100%) rename {sysdeps => ports/sysdeps}/alpha/alphaev6/stxncpy.S (100%) rename {sysdeps => ports/sysdeps}/alpha/alphaev67/Implies (100%) rename {sysdeps => ports/sysdeps}/alpha/alphaev67/ffs.S (100%) rename {sysdeps => ports/sysdeps}/alpha/alphaev67/ffsll.S (100%) rename {sysdeps => ports/sysdeps}/alpha/alphaev67/fpu/Implies (100%) rename {sysdeps => ports/sysdeps}/alpha/alphaev67/rawmemchr.S (100%) rename {sysdeps => ports/sysdeps}/alpha/alphaev67/stpcpy.S (100%) rename {sysdeps => ports/sysdeps}/alpha/alphaev67/stpncpy.S (100%) rename {sysdeps => ports/sysdeps}/alpha/alphaev67/strcat.S (100%) rename {sysdeps => ports/sysdeps}/alpha/alphaev67/strchr.S (100%) rename {sysdeps => ports/sysdeps}/alpha/alphaev67/strlen.S (100%) rename {sysdeps => ports/sysdeps}/alpha/alphaev67/strncat.S (100%) rename {sysdeps => ports/sysdeps}/alpha/alphaev67/strrchr.S (100%) rename {sysdeps => ports/sysdeps}/alpha/backtrace.c (100%) rename {sysdeps => ports/sysdeps}/alpha/bb_init_func.S (100%) rename {sysdeps => ports/sysdeps}/alpha/bits/atomic.h (100%) rename {sysdeps => ports/sysdeps}/alpha/bits/endian.h (100%) rename {sysdeps => ports/sysdeps}/alpha/bits/link.h (100%) rename {sysdeps => ports/sysdeps}/alpha/bits/mathdef.h (100%) rename {sysdeps => ports/sysdeps}/alpha/bits/setjmp.h (100%) rename {sysdeps => ports/sysdeps}/alpha/bsd-_setjmp.S (100%) rename {sysdeps => ports/sysdeps}/alpha/bsd-setjmp.S (100%) rename {sysdeps => ports/sysdeps}/alpha/bzero.S (100%) rename {sysdeps => ports/sysdeps}/alpha/configure (100%) rename {sysdeps => ports/sysdeps}/alpha/configure.in (100%) rename {sysdeps => ports/sysdeps}/alpha/crti.S (100%) rename {sysdeps => ports/sysdeps}/alpha/crtn.S (100%) rename {sysdeps => ports/sysdeps}/alpha/div.S (100%) rename {sysdeps => ports/sysdeps}/alpha/div_libc.h (100%) rename {sysdeps => ports/sysdeps}/alpha/divl.S (100%) rename {sysdeps => ports/sysdeps}/alpha/divlu.S (100%) rename {sysdeps => ports/sysdeps}/alpha/divq.S (100%) rename {sysdeps => ports/sysdeps}/alpha/divqu.S (100%) rename {sysdeps => ports/sysdeps}/alpha/dl-dtprocnum.h (100%) rename {sysdeps => ports/sysdeps}/alpha/dl-machine.h (100%) rename {sysdeps => ports/sysdeps}/alpha/dl-procinfo.c (100%) rename {sysdeps => ports/sysdeps}/alpha/dl-procinfo.h (100%) rename {sysdeps => ports/sysdeps}/alpha/dl-sysdep.h (100%) rename {sysdeps => ports/sysdeps}/alpha/dl-tls.h (100%) rename {sysdeps => ports/sysdeps}/alpha/dl-trampoline.S (100%) rename {sysdeps => ports/sysdeps}/alpha/ffs.S (100%) rename {sysdeps => ports/sysdeps}/alpha/ffsll.S (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/Versions (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/bits/fenv.h (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/bits/mathinline.h (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/cabsf.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/cargf.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/cfloat-compat.h (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/cimagf.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/conjf.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/crealf.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/e_sqrt.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/fclrexcpt.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/fedisblxcpt.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/feenablxcpt.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/fegetenv.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/fegetexcept.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/fegetround.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/feholdexcpt.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/fenv_libc.h (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/fesetenv.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/fesetround.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/feupdateenv.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/fgetexcptflg.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/fpu_control.h (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/fsetexcptflg.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/ftestexcept.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/libm-test-ulps (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/math_private.h (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_cacosf.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_cacoshf.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_casinf.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_casinhf.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_catanf.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_catanhf.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_ccosf.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_ccoshf.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_ceil.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_ceilf.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_cexpf.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_clog10f.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_clogf.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_copysign.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_copysignf.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_cpowf.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_cprojf.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_csinf.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_csinhf.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_csqrtf.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_ctanf.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_ctanhf.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_fabs.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_fabsf.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_floor.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_floorf.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_fmax.S (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_fmaxf.S (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_fmin.S (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_fminf.S (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_isnan.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_isnanf.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_llrint.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_llrintf.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_llround.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_llroundf.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_lrint.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_lrintf.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_lround.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_lroundf.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_nearbyint.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_nearbyintf.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_rint.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_rintf.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_round.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_roundf.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_trunc.c (100%) rename {sysdeps => ports/sysdeps}/alpha/fpu/s_truncf.c (100%) rename {sysdeps => ports/sysdeps}/alpha/gccframe.h (100%) rename {sysdeps => ports/sysdeps}/alpha/hp-timing.h (100%) rename {sysdeps => ports/sysdeps}/alpha/htonl.S (100%) rename {sysdeps => ports/sysdeps}/alpha/htons.S (100%) rename {sysdeps => ports/sysdeps}/alpha/jmpbuf-offsets.h (100%) rename {sysdeps => ports/sysdeps}/alpha/jmpbuf-unwind.h (100%) rename {sysdeps => ports/sysdeps}/alpha/ldiv.S (100%) rename {sysdeps => ports/sysdeps}/alpha/ldsodefs.h (100%) rename {sysdeps => ports/sysdeps}/alpha/libc-tls.c (100%) rename {sysdeps => ports/sysdeps}/alpha/lldiv.S (100%) rename {sysdeps => ports/sysdeps}/alpha/lshift.S (100%) rename {sysdeps => ports/sysdeps}/alpha/machine-gmon.h (100%) rename {sysdeps => ports/sysdeps}/alpha/memchr.c (100%) rename {sysdeps => ports/sysdeps}/alpha/memset.S (100%) rename {sysdeps => ports/sysdeps}/alpha/memusage.h (100%) rename {sysdeps => ports/sysdeps}/alpha/mul_1.S (100%) rename {sysdeps => ports/sysdeps}/alpha/nptl/Makefile (100%) rename {sysdeps => ports/sysdeps}/alpha/nptl/pthread_spin_lock.S (100%) rename {sysdeps => ports/sysdeps}/alpha/nptl/pthread_spin_trylock.S (100%) rename {sysdeps => ports/sysdeps}/alpha/nptl/pthreaddef.h (100%) rename {sysdeps => ports/sysdeps}/alpha/nptl/tcb-offsets.sym (100%) rename {sysdeps => ports/sysdeps}/alpha/nptl/tls.h (100%) rename {sysdeps => ports/sysdeps}/alpha/nscd-types.h (100%) rename {sysdeps => ports/sysdeps}/alpha/preconfigure (100%) rename {sysdeps => ports/sysdeps}/alpha/rawmemchr.S (100%) rename {sysdeps => ports/sysdeps}/alpha/reml.S (100%) rename {sysdeps => ports/sysdeps}/alpha/remlu.S (100%) rename {sysdeps => ports/sysdeps}/alpha/remq.S (100%) rename {sysdeps => ports/sysdeps}/alpha/remqu.S (100%) rename {sysdeps => ports/sysdeps}/alpha/rshift.S (100%) rename {sysdeps => ports/sysdeps}/alpha/setjmp.S (100%) rename {sysdeps => ports/sysdeps}/alpha/shlib-versions (100%) rename {sysdeps => ports/sysdeps}/alpha/soft-fp/Makefile (100%) rename {sysdeps => ports/sysdeps}/alpha/soft-fp/Versions (100%) rename {sysdeps => ports/sysdeps}/alpha/soft-fp/e_sqrtl.c (100%) rename {sysdeps => ports/sysdeps}/alpha/soft-fp/local-soft-fp.h (100%) rename {sysdeps => ports/sysdeps}/alpha/soft-fp/ots_add.c (100%) rename {sysdeps => ports/sysdeps}/alpha/soft-fp/ots_cmp.c (100%) rename {sysdeps => ports/sysdeps}/alpha/soft-fp/ots_cmpe.c (100%) rename {sysdeps => ports/sysdeps}/alpha/soft-fp/ots_cvtqux.c (100%) rename {sysdeps => ports/sysdeps}/alpha/soft-fp/ots_cvtqx.c (100%) rename {sysdeps => ports/sysdeps}/alpha/soft-fp/ots_cvttx.c (100%) rename {sysdeps => ports/sysdeps}/alpha/soft-fp/ots_cvtxq.c (100%) rename {sysdeps => ports/sysdeps}/alpha/soft-fp/ots_cvtxt.c (100%) rename {sysdeps => ports/sysdeps}/alpha/soft-fp/ots_div.c (100%) rename {sysdeps => ports/sysdeps}/alpha/soft-fp/ots_mul.c (100%) rename {sysdeps => ports/sysdeps}/alpha/soft-fp/ots_nintxq.c (100%) rename {sysdeps => ports/sysdeps}/alpha/soft-fp/ots_sub.c (100%) rename {sysdeps => ports/sysdeps}/alpha/soft-fp/sfp-machine.h (100%) rename {sysdeps => ports/sysdeps}/alpha/stackinfo.h (100%) rename {sysdeps => ports/sysdeps}/alpha/start.S (100%) rename {sysdeps => ports/sysdeps}/alpha/stpcpy.S (100%) rename {sysdeps => ports/sysdeps}/alpha/stpncpy.S (100%) rename {sysdeps => ports/sysdeps}/alpha/strcat.S (100%) rename {sysdeps => ports/sysdeps}/alpha/strchr.S (100%) rename {sysdeps => ports/sysdeps}/alpha/strcmp.S (100%) rename {sysdeps => ports/sysdeps}/alpha/strcpy.S (100%) rename {sysdeps => ports/sysdeps}/alpha/strlen.S (100%) rename {sysdeps => ports/sysdeps}/alpha/strncat.S (100%) rename {sysdeps => ports/sysdeps}/alpha/strncmp.S (100%) rename {sysdeps => ports/sysdeps}/alpha/strncpy.S (100%) rename {sysdeps => ports/sysdeps}/alpha/strrchr.S (100%) rename {sysdeps => ports/sysdeps}/alpha/stxcpy.S (100%) rename {sysdeps => ports/sysdeps}/alpha/stxncpy.S (100%) rename {sysdeps => ports/sysdeps}/alpha/sub_n.S (100%) rename {sysdeps => ports/sysdeps}/alpha/submul_1.S (100%) rename {sysdeps => ports/sysdeps}/alpha/tls-macros.h (100%) rename {sysdeps => ports/sysdeps}/alpha/tst-audit.h (100%) rename {sysdeps => ports/sysdeps}/alpha/udiv_qrnnd.S (100%) rename {sysdeps => ports/sysdeps}/am33/Implies (100%) rename {sysdeps => ports/sysdeps}/am33/__longjmp.S (100%) rename {sysdeps => ports/sysdeps}/am33/atomicity.h (100%) rename {sysdeps => ports/sysdeps}/am33/bits/endian.h (100%) rename {sysdeps => ports/sysdeps}/am33/bits/setjmp.h (100%) rename {sysdeps => ports/sysdeps}/am33/bsd-_setjmp.S (100%) rename {sysdeps => ports/sysdeps}/am33/bsd-setjmp.S (100%) rename {sysdeps => ports/sysdeps}/am33/dl-machine.h (100%) rename {sysdeps => ports/sysdeps}/am33/elf/start.S (100%) rename {sysdeps => ports/sysdeps}/am33/fpu/bits/fenv.h (100%) rename {sysdeps => ports/sysdeps}/am33/fpu/fclrexcpt.c (100%) rename {sysdeps => ports/sysdeps}/am33/fpu/fedisblxcpt.c (100%) rename {sysdeps => ports/sysdeps}/am33/fpu/feenablxcpt.c (100%) rename {sysdeps => ports/sysdeps}/am33/fpu/fegetenv.c (100%) rename {sysdeps => ports/sysdeps}/am33/fpu/fegetexcept.c (100%) rename {sysdeps => ports/sysdeps}/am33/fpu/fegetround.c (100%) rename {sysdeps => ports/sysdeps}/am33/fpu/feholdexcpt.c (100%) rename {sysdeps => ports/sysdeps}/am33/fpu/fenv_libc.h (100%) rename {sysdeps => ports/sysdeps}/am33/fpu/fesetenv.c (100%) rename {sysdeps => ports/sysdeps}/am33/fpu/fesetround.c (100%) rename {sysdeps => ports/sysdeps}/am33/fpu/feupdateenv.c (100%) rename {sysdeps => ports/sysdeps}/am33/fpu/fgetexcptflg.c (100%) rename {sysdeps => ports/sysdeps}/am33/fpu/fpu_control.h (100%) rename {sysdeps => ports/sysdeps}/am33/fpu/fraiseexcpt.c (100%) rename {sysdeps => ports/sysdeps}/am33/fpu/fsetexcptflg.c (100%) rename {sysdeps => ports/sysdeps}/am33/fpu/ftestexcept.c (100%) rename {sysdeps => ports/sysdeps}/am33/jmpbuf-offsets.h (100%) rename {sysdeps => ports/sysdeps}/am33/jmpbuf-unwind.h (100%) rename {sysdeps => ports/sysdeps}/am33/linuxthreads/pspinlock.c (100%) rename {sysdeps => ports/sysdeps}/am33/linuxthreads/pt-machine.h (100%) rename {sysdeps => ports/sysdeps}/am33/memusage.h (100%) rename {sysdeps => ports/sysdeps}/am33/preconfigure (100%) rename {sysdeps => ports/sysdeps}/am33/setjmp.S (100%) rename {sysdeps => ports/sysdeps}/am33/shlib-versions (100%) rename {sysdeps => ports/sysdeps}/am33/stackinfo.h (100%) rename {sysdeps => ports/sysdeps}/am33/sys/ucontext.h (100%) rename {sysdeps => ports/sysdeps}/am33/sysdep.h (100%) rename {sysdeps => ports/sysdeps}/arm/Implies (100%) rename {sysdeps => ports/sysdeps}/arm/Makefile (100%) rename {sysdeps => ports/sysdeps}/arm/Versions (100%) rename {sysdeps => ports/sysdeps}/arm/__longjmp.S (100%) rename {sysdeps => ports/sysdeps}/arm/abi-note.S (100%) rename {sysdeps => ports/sysdeps}/arm/aeabi_assert.c (100%) rename {sysdeps => ports/sysdeps}/arm/aeabi_atexit.c (100%) rename {sysdeps => ports/sysdeps}/arm/aeabi_errno_addr.c (100%) rename {sysdeps => ports/sysdeps}/arm/aeabi_lcsts.c (100%) rename {sysdeps => ports/sysdeps}/arm/aeabi_localeconv.c (100%) rename {sysdeps => ports/sysdeps}/arm/aeabi_math.c (100%) rename {sysdeps => ports/sysdeps}/arm/aeabi_mb_cur_max.c (100%) rename {sysdeps => ports/sysdeps}/arm/aeabi_memclr.c (100%) rename {sysdeps => ports/sysdeps}/arm/aeabi_memcpy.c (100%) rename {sysdeps => ports/sysdeps}/arm/aeabi_memmove.c (100%) rename {sysdeps => ports/sysdeps}/arm/aeabi_memset.c (100%) rename {sysdeps => ports/sysdeps}/arm/aeabi_sighandlers.S (100%) rename {sysdeps => ports/sysdeps}/arm/aeabi_unwind_cpp_pr1.c (100%) rename {sysdeps => ports/sysdeps}/arm/arm-mcount.S (100%) rename {sysdeps => ports/sysdeps}/arm/armv6t2/memchr.S (100%) rename {sysdeps => ports/sysdeps}/arm/armv7/Implies (100%) rename {sysdeps => ports/sysdeps}/arm/backtrace.c (100%) rename {sysdeps => ports/sysdeps}/arm/bits/endian.h (100%) rename {sysdeps => ports/sysdeps}/arm/bits/fenv.h (100%) rename {sysdeps => ports/sysdeps}/arm/bits/link.h (100%) rename {sysdeps => ports/sysdeps}/arm/bits/linkmap.h (100%) rename {sysdeps => ports/sysdeps}/arm/bits/mathdef.h (100%) rename {sysdeps => ports/sysdeps}/arm/bits/setjmp.h (100%) rename {sysdeps => ports/sysdeps}/arm/bsd-_setjmp.S (100%) rename {sysdeps => ports/sysdeps}/arm/bsd-setjmp.S (100%) rename {sysdeps => ports/sysdeps}/arm/configure (100%) rename {sysdeps => ports/sysdeps}/arm/configure.in (100%) rename {sysdeps => ports/sysdeps}/arm/crti.S (100%) rename {sysdeps => ports/sysdeps}/arm/crtn.S (100%) rename {sysdeps => ports/sysdeps}/arm/dl-irel.h (100%) rename {sysdeps => ports/sysdeps}/arm/dl-lookupcfg.h (100%) rename {sysdeps => ports/sysdeps}/arm/dl-machine.h (100%) rename {sysdeps => ports/sysdeps}/arm/dl-sysdep.h (100%) rename {sysdeps => ports/sysdeps}/arm/dl-tls.h (100%) rename {sysdeps => ports/sysdeps}/arm/dl-tlsdesc.S (100%) rename {sysdeps => ports/sysdeps}/arm/dl-tlsdesc.h (100%) rename {sysdeps => ports/sysdeps}/arm/dl-trampoline.S (100%) rename {sysdeps => ports/sysdeps}/arm/fclrexcpt.c (100%) rename {sysdeps => ports/sysdeps}/arm/fedisblxcpt.c (100%) rename {sysdeps => ports/sysdeps}/arm/feenablxcpt.c (100%) rename {sysdeps => ports/sysdeps}/arm/fegetenv.c (100%) rename {sysdeps => ports/sysdeps}/arm/fegetexcept.c (100%) rename {sysdeps => ports/sysdeps}/arm/fegetround.c (100%) rename {sysdeps => ports/sysdeps}/arm/feholdexcpt.c (100%) rename {sysdeps => ports/sysdeps}/arm/fesetenv.c (100%) rename {sysdeps => ports/sysdeps}/arm/fesetround.c (100%) rename {sysdeps => ports/sysdeps}/arm/feupdateenv.c (100%) rename {sysdeps => ports/sysdeps}/arm/fgetexcptflg.c (100%) rename {sysdeps => ports/sysdeps}/arm/find_exidx.c (100%) rename {sysdeps => ports/sysdeps}/arm/fpu_control.h (100%) rename {sysdeps => ports/sysdeps}/arm/fraiseexcpt.c (100%) rename {sysdeps => ports/sysdeps}/arm/frame.h (100%) rename {sysdeps => ports/sysdeps}/arm/framestate.c (100%) rename {sysdeps => ports/sysdeps}/arm/fsetexcptflg.c (100%) rename {sysdeps => ports/sysdeps}/arm/ftestexcept.c (100%) rename {sysdeps => ports/sysdeps}/arm/gccframe.h (100%) rename {sysdeps => ports/sysdeps}/arm/gmp-mparam.h (100%) rename {sysdeps => ports/sysdeps}/arm/jmpbuf-offsets.h (100%) rename {sysdeps => ports/sysdeps}/arm/jmpbuf-unwind.h (100%) rename {sysdeps => ports/sysdeps}/arm/ldsodefs.h (100%) rename {sysdeps => ports/sysdeps}/arm/libc-tls.c (100%) rename {sysdeps => ports/sysdeps}/arm/libm-test-ulps (100%) rename {sysdeps => ports/sysdeps}/arm/machine-gmon.h (100%) rename {sysdeps => ports/sysdeps}/arm/memcpy.S (100%) rename {sysdeps => ports/sysdeps}/arm/memmove.S (100%) rename {sysdeps => ports/sysdeps}/arm/memset.S (100%) rename {sysdeps => ports/sysdeps}/arm/memusage.h (100%) rename {sysdeps => ports/sysdeps}/arm/nptl/Makefile (100%) rename {sysdeps => ports/sysdeps}/arm/nptl/pthread_spin_lock.c (100%) rename {sysdeps => ports/sysdeps}/arm/nptl/pthread_spin_trylock.c (100%) rename {sysdeps => ports/sysdeps}/arm/nptl/pthreaddef.h (100%) rename {sysdeps => ports/sysdeps}/arm/nptl/tcb-offsets.sym (100%) rename {sysdeps => ports/sysdeps}/arm/nptl/tls.h (100%) rename {sysdeps => ports/sysdeps}/arm/preconfigure (100%) rename {sysdeps => ports/sysdeps}/arm/rtld-global-offsets.sym (100%) rename {sysdeps => ports/sysdeps}/arm/setfpucw.c (100%) rename {sysdeps => ports/sysdeps}/arm/setjmp.S (100%) rename {sysdeps => ports/sysdeps}/arm/shlib-versions (100%) rename {sysdeps => ports/sysdeps}/arm/stackinfo.h (100%) rename {sysdeps => ports/sysdeps}/arm/start.S (100%) rename {sysdeps => ports/sysdeps}/arm/strlen.S (100%) rename {sysdeps => ports/sysdeps}/arm/sys/ucontext.h (100%) rename {sysdeps => ports/sysdeps}/arm/sysdep.h (100%) rename {sysdeps => ports/sysdeps}/arm/tls-macros.h (100%) rename {sysdeps => ports/sysdeps}/arm/tlsdesc.c (100%) rename {sysdeps => ports/sysdeps}/arm/tlsdesc.sym (100%) rename {sysdeps => ports/sysdeps}/arm/tst-audit.h (100%) rename {sysdeps => ports/sysdeps}/arm/unwind-dw2-fde-glibc.c (100%) rename {sysdeps => ports/sysdeps}/arm/unwind-pe.c (100%) rename {sysdeps => ports/sysdeps}/hppa/Makefile (100%) rename {sysdeps => ports/sysdeps}/hppa/Versions (100%) rename {sysdeps => ports/sysdeps}/hppa/__longjmp.S (100%) rename {sysdeps => ports/sysdeps}/hppa/abort-instr.h (100%) rename {sysdeps => ports/sysdeps}/hppa/add_n.S (100%) rename {sysdeps => ports/sysdeps}/hppa/bits/endian.h (100%) rename {sysdeps => ports/sysdeps}/hppa/bits/link.h (100%) rename {sysdeps => ports/sysdeps}/hppa/bits/linkmap.h (100%) rename {sysdeps => ports/sysdeps}/hppa/bits/setjmp.h (100%) rename {sysdeps => ports/sysdeps}/hppa/bsd-_setjmp.S (100%) rename {sysdeps => ports/sysdeps}/hppa/bsd-setjmp.S (100%) rename {sysdeps => ports/sysdeps}/hppa/configure (100%) rename {sysdeps => ports/sysdeps}/hppa/configure.in (100%) rename {sysdeps => ports/sysdeps}/hppa/crti.S (100%) rename {sysdeps => ports/sysdeps}/hppa/crtn.S (100%) rename {sysdeps => ports/sysdeps}/hppa/dl-fptr.c (100%) rename {sysdeps => ports/sysdeps}/hppa/dl-fptr.h (100%) rename {sysdeps => ports/sysdeps}/hppa/dl-irel.h (100%) rename {sysdeps => ports/sysdeps}/hppa/dl-lookupcfg.h (100%) rename {sysdeps => ports/sysdeps}/hppa/dl-machine.h (100%) rename {sysdeps => ports/sysdeps}/hppa/dl-symaddr.c (100%) rename {sysdeps => ports/sysdeps}/hppa/dl-tls.h (100%) rename {sysdeps => ports/sysdeps}/hppa/dl-trampoline.S (100%) rename {sysdeps => ports/sysdeps}/hppa/entry.h (100%) rename {sysdeps => ports/sysdeps}/hppa/fpu/bits/fenv.h (100%) rename {sysdeps => ports/sysdeps}/hppa/fpu/bits/mathdef.h (100%) rename {sysdeps => ports/sysdeps}/hppa/fpu/fclrexcpt.c (100%) rename {sysdeps => ports/sysdeps}/hppa/fpu/fedisblxcpt.c (100%) rename {sysdeps => ports/sysdeps}/hppa/fpu/feenablxcpt.c (100%) rename {sysdeps => ports/sysdeps}/hppa/fpu/fegetenv.c (100%) rename {sysdeps => ports/sysdeps}/hppa/fpu/fegetexcept.c (100%) rename {sysdeps => ports/sysdeps}/hppa/fpu/fegetround.c (100%) rename {sysdeps => ports/sysdeps}/hppa/fpu/feholdexcpt.c (100%) rename {sysdeps => ports/sysdeps}/hppa/fpu/fesetenv.c (100%) rename {sysdeps => ports/sysdeps}/hppa/fpu/fesetround.c (100%) rename {sysdeps => ports/sysdeps}/hppa/fpu/feupdateenv.c (100%) rename {sysdeps => ports/sysdeps}/hppa/fpu/fgetexcptflg.c (100%) rename {sysdeps => ports/sysdeps}/hppa/fpu/fraiseexcpt.c (100%) rename {sysdeps => ports/sysdeps}/hppa/fpu/fsetexcptflg.c (100%) rename {sysdeps => ports/sysdeps}/hppa/fpu/ftestexcept.c (100%) rename {sysdeps => ports/sysdeps}/hppa/fpu/libm-test-ulps (100%) rename {sysdeps => ports/sysdeps}/hppa/frame.h (100%) rename {sysdeps => ports/sysdeps}/hppa/gccframe.h (100%) rename {sysdeps => ports/sysdeps}/hppa/hppa1.1/Implies (100%) rename {sysdeps => ports/sysdeps}/hppa/hppa1.1/addmul_1.S (100%) rename {sysdeps => ports/sysdeps}/hppa/hppa1.1/mul_1.S (100%) rename {sysdeps => ports/sysdeps}/hppa/hppa1.1/s_signbit.c (100%) rename {sysdeps => ports/sysdeps}/hppa/hppa1.1/submul_1.S (100%) rename {sysdeps => ports/sysdeps}/hppa/hppa1.1/udiv_qrnnd.S (100%) rename {sysdeps => ports/sysdeps}/hppa/jmpbuf-offsets.h (100%) rename {sysdeps => ports/sysdeps}/hppa/jmpbuf-unwind.h (100%) rename {sysdeps => ports/sysdeps}/hppa/ldsodefs.h (100%) rename {sysdeps => ports/sysdeps}/hppa/libc-tls.c (100%) rename {sysdeps => ports/sysdeps}/hppa/libgcc-compat.c (100%) rename {sysdeps => ports/sysdeps}/hppa/lshift.S (100%) rename {sysdeps => ports/sysdeps}/hppa/machine-gmon.h (100%) rename {sysdeps => ports/sysdeps}/hppa/memusage.h (100%) rename {sysdeps => ports/sysdeps}/hppa/mp_clz_tab.c (100%) rename {sysdeps => ports/sysdeps}/hppa/nptl/Makefile (100%) rename {sysdeps => ports/sysdeps}/hppa/nptl/jmpbuf-unwind.h (100%) rename {sysdeps => ports/sysdeps}/hppa/nptl/pthread_spin_init.c (100%) rename {sysdeps => ports/sysdeps}/hppa/nptl/pthread_spin_lock.c (100%) rename {sysdeps => ports/sysdeps}/hppa/nptl/pthread_spin_trylock.c (100%) rename {sysdeps => ports/sysdeps}/hppa/nptl/pthread_spin_unlock.c (100%) rename {sysdeps => ports/sysdeps}/hppa/nptl/pthreaddef.h (100%) rename {sysdeps => ports/sysdeps}/hppa/nptl/tcb-offsets.sym (100%) rename {sysdeps => ports/sysdeps}/hppa/nptl/tls.h (100%) rename {sysdeps => ports/sysdeps}/hppa/preconfigure (100%) rename {sysdeps => ports/sysdeps}/hppa/rshift.S (100%) rename {sysdeps => ports/sysdeps}/hppa/setjmp.S (100%) rename {sysdeps => ports/sysdeps}/hppa/shlib-versions (100%) rename {sysdeps => ports/sysdeps}/hppa/stackinfo.h (100%) rename {sysdeps => ports/sysdeps}/hppa/start.S (100%) rename {sysdeps => ports/sysdeps}/hppa/sub_n.S (100%) rename {sysdeps => ports/sysdeps}/hppa/sysdep.h (100%) rename {sysdeps => ports/sysdeps}/hppa/tls-macros.h (100%) rename {sysdeps => ports/sysdeps}/hppa/tst-audit.h (100%) rename {sysdeps => ports/sysdeps}/hppa/udiv_qrnnd.S (100%) rename {sysdeps => ports/sysdeps}/ia64/Implies (100%) rename {sysdeps => ports/sysdeps}/ia64/Makefile (100%) rename {sysdeps => ports/sysdeps}/ia64/Versions (100%) rename {sysdeps => ports/sysdeps}/ia64/_mcount.S (100%) rename {sysdeps => ports/sysdeps}/ia64/abort-instr.h (100%) rename {sysdeps => ports/sysdeps}/ia64/backtrace.c (100%) rename {sysdeps => ports/sysdeps}/ia64/bcopy.S (100%) rename {sysdeps => ports/sysdeps}/ia64/bits/atomic.h (100%) rename {sysdeps => ports/sysdeps}/ia64/bits/byteswap-16.h (100%) rename {sysdeps => ports/sysdeps}/ia64/bits/byteswap.h (100%) rename {sysdeps => ports/sysdeps}/ia64/bits/fenv.h (100%) rename {sysdeps => ports/sysdeps}/ia64/bits/huge_vall.h (100%) rename {sysdeps => ports/sysdeps}/ia64/bits/link.h (100%) rename {sysdeps => ports/sysdeps}/ia64/bits/linkmap.h (100%) rename {sysdeps => ports/sysdeps}/ia64/bits/mathdef.h (100%) rename {sysdeps => ports/sysdeps}/ia64/bits/xtitypes.h (100%) rename {sysdeps => ports/sysdeps}/ia64/bzero.S (100%) rename {sysdeps => ports/sysdeps}/ia64/configure (100%) rename {sysdeps => ports/sysdeps}/ia64/configure.in (100%) rename {sysdeps => ports/sysdeps}/ia64/crti.S (100%) rename {sysdeps => ports/sysdeps}/ia64/crtn.S (100%) rename {sysdeps => ports/sysdeps}/ia64/dl-dtprocnum.h (100%) rename {sysdeps => ports/sysdeps}/ia64/dl-fptr.h (100%) rename {sysdeps => ports/sysdeps}/ia64/dl-lookupcfg.h (100%) rename {sysdeps => ports/sysdeps}/ia64/dl-machine.h (100%) rename {sysdeps => ports/sysdeps}/ia64/dl-sysdep.h (100%) rename {sysdeps => ports/sysdeps}/ia64/dl-tls.h (100%) rename {sysdeps => ports/sysdeps}/ia64/dl-trampoline.S (100%) rename {sysdeps => ports/sysdeps}/ia64/entry.h (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/Makefile (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/README (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/Versions (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/bits/math-finite.h (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/bits/mathinline.h (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/branred.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/doasin.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/dosincos.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_acos.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_acosf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_acosh.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_acoshf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_acoshl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_acosl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_asin.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_asinf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_asinl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_atan2.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_atan2f.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_atan2l.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_atanh.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_atanhf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_atanhl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_cosh.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_coshf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_coshl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_exp.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_exp10.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_exp10f.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_exp10l.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_exp2.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_exp2f.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_exp2l.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_expf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_expl.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_fmod.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_fmodf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_fmodl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_gamma_r.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_gammaf_r.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_gammal_r.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_hypot.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_hypotf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_hypotl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_ilogbl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_lgamma_r.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_lgammaf_r.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_lgammal_r.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_log.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_log10.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_log10f.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_log10l.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_log2.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_log2f.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_log2l.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_logf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_logl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_pow.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_powf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_powl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_rem_pio2.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_rem_pio2f.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_rem_pio2l.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_remainder.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_remainderf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_remainderl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_scalb.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_scalbf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_scalbl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_sinh.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_sinhf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_sinhl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_sqrt.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_sqrtf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/e_sqrtl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/fclrexcpt.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/fedisblxcpt.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/feenablxcpt.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/fegetenv.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/fegetexcept.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/fegetround.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/feholdexcpt.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/fesetenv.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/fesetround.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/feupdateenv.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/fgetexcptflg.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/fraiseexcpt.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/fsetexcptflg.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/ftestexcept.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/gen_import_file_list (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/halfulp.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/import_check (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/import_diffs (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/import_file.awk (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/import_intel_libm (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/k_rem_pio2.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/k_rem_pio2f.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/k_rem_pio2l.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/libc_libm_error.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/libm-symbols.h (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/libm-test-ulps (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/libm_cpu_defs.h (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/libm_error.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/libm_error_codes.h (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/libm_frexp.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/libm_frexp4.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/libm_frexp4f.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/libm_frexp4l.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/libm_frexpf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/libm_frexpl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/libm_lgamma.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/libm_lgammaf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/libm_lgammal.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/libm_reduce.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/libm_scalblnf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/libm_sincos.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/libm_sincos_large.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/libm_sincosf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/libm_sincosl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/libm_support.h (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/libm_tan.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/math_ldbl.h (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/mpa.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/mpatan.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/mpatan2.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/mpexp.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/mplog.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/mpsqrt.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/mptan.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/printf_fphex.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_asinh.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_asinhf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_asinhl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_atan.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_atanf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_atanl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_cbrt.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_cbrtf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_cbrtl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_ceil.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_ceilf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_ceill.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_copysign.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_copysignf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_copysignl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_cos.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_cosf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_cosl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_erf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_erfc.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_erfcf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_erfcl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_erff.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_erfl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_expm1.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_expm1f.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_expm1l.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_fabs.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_fabsf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_fabsl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_fdim.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_fdimf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_fdiml.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_finite.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_finitef.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_finitel.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_floor.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_floorf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_floorl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_fma.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_fmaf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_fmal.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_fmax.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_fmaxf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_fmaxl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_fpclassify.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_fpclassifyf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_fpclassifyl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_frexp.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_frexpf.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_frexpl.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_ilogb.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_ilogbf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_isinf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_isinff.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_isinfl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_isnan.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_isnanf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_isnanl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_ldexp.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_ldexpf.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_ldexpl.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_libm_ldexp.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_libm_ldexpf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_libm_ldexpl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_libm_scalbn.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_libm_scalbnf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_libm_scalbnl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_log1p.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_log1pf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_log1pl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_logb.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_logbf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_logbl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_matherrf.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_matherrl.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_modf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_modff.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_modfl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_nearbyint.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_nearbyintf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_nearbyintl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_nextafter.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_nextafterf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_nextafterl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_nexttoward.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_nexttowardf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_nexttowardl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_rint.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_rintf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_rintl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_round.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_roundf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_roundl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_scalblnf.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_scalbn.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_scalbnf.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_scalbnl.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_signbit.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_signbitf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_signbitl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_significand.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_significandf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_significandl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_sin.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_sincos.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_sincosf.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_sincosl.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_sinf.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_sinl.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_tan.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_tanf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_tanh.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_tanhf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_tanhl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_tanl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_trunc.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_truncf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/s_truncl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/sincos32.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/slowexp.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/slowpow.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/t_exp.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_acos.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_acosf.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_acosh.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_acoshf.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_acoshl.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_acosl.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_asin.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_asinf.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_asinl.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_atan2.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_atan2f.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_atan2l.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_atanh.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_atanhf.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_atanhl.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_cosh.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_coshf.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_coshl.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_exp.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_exp10.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_exp10f.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_exp10l.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_exp2.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_exp2f.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_exp2l.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_expf.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_expl.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_fmod.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_fmodf.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_fmodl.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_hypot.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_hypotf.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_hypotl.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_lgamma.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_lgamma_r.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_lgammaf.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_lgammaf_r.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_lgammal.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_lgammal_r.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_log.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_log10.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_log10f.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_log10l.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_log2.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_log2f.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_log2l.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_logf.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_logl.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_pow.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_powf.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_powl.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_remainder.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_remainderf.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_remainderl.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_scalb.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_scalbf.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_scalbl.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_sinh.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_sinhf.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_sinhl.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_sqrt.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_sqrtf.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_sqrtl.c (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_tgamma.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_tgammaf.S (100%) rename {sysdeps => ports/sysdeps}/ia64/fpu/w_tgammal.S (100%) rename {sysdeps => ports/sysdeps}/ia64/gccframe.h (100%) rename {sysdeps => ports/sysdeps}/ia64/hp-timing.c (100%) rename {sysdeps => ports/sysdeps}/ia64/hp-timing.h (100%) rename {sysdeps => ports/sysdeps}/ia64/htonl.S (100%) rename {sysdeps => ports/sysdeps}/ia64/htons.S (100%) rename {sysdeps => ports/sysdeps}/ia64/ia64libgcc.S (100%) rename {sysdeps => ports/sysdeps}/ia64/ieee754.h (100%) rename {sysdeps => ports/sysdeps}/ia64/jmpbuf-unwind.h (100%) rename {sysdeps => ports/sysdeps}/ia64/ldbl2mpn.c (100%) rename {sysdeps => ports/sysdeps}/ia64/ldsodefs.h (100%) rename {sysdeps => ports/sysdeps}/ia64/libc-tls.c (100%) rename {sysdeps => ports/sysdeps}/ia64/machine-gmon.h (100%) rename {sysdeps => ports/sysdeps}/ia64/memccpy.S (100%) rename {sysdeps => ports/sysdeps}/ia64/memchr.S (100%) rename {sysdeps => ports/sysdeps}/ia64/memcmp.S (100%) rename {sysdeps => ports/sysdeps}/ia64/memcpy.S (100%) rename {sysdeps => ports/sysdeps}/ia64/memmove.S (100%) rename {sysdeps => ports/sysdeps}/ia64/memset.S (100%) rename {sysdeps => ports/sysdeps}/ia64/memusage.h (100%) rename {sysdeps => ports/sysdeps}/ia64/nptl/Makefile (100%) rename {sysdeps => ports/sysdeps}/ia64/nptl/pthread_spin_lock.c (100%) rename {sysdeps => ports/sysdeps}/ia64/nptl/pthread_spin_trylock.c (100%) rename {sysdeps => ports/sysdeps}/ia64/nptl/pthread_spin_unlock.c (100%) rename {sysdeps => ports/sysdeps}/ia64/nptl/pthreaddef.h (100%) rename {sysdeps => ports/sysdeps}/ia64/nptl/shlib-versions (100%) rename {sysdeps => ports/sysdeps}/ia64/nptl/tcb-offsets.sym (100%) rename {sysdeps => ports/sysdeps}/ia64/nptl/tls.h (100%) rename {sysdeps => ports/sysdeps}/ia64/preconfigure (100%) rename {sysdeps => ports/sysdeps}/ia64/sched_cpucount.c (100%) rename {sysdeps => ports/sysdeps}/ia64/shlib-versions (100%) rename {sysdeps => ports/sysdeps}/ia64/softpipe.h (100%) rename {sysdeps => ports/sysdeps}/ia64/stackguard-macros.h (100%) rename {sysdeps => ports/sysdeps}/ia64/stackinfo.h (100%) rename {sysdeps => ports/sysdeps}/ia64/start.S (100%) rename {sysdeps => ports/sysdeps}/ia64/strcat.c (100%) rename {sysdeps => ports/sysdeps}/ia64/strchr.S (100%) rename {sysdeps => ports/sysdeps}/ia64/strcmp.S (100%) rename {sysdeps => ports/sysdeps}/ia64/strcpy.S (100%) rename {sysdeps => ports/sysdeps}/ia64/strlen.S (100%) rename {sysdeps => ports/sysdeps}/ia64/strncmp.S (100%) rename {sysdeps => ports/sysdeps}/ia64/strncpy.S (100%) rename {sysdeps => ports/sysdeps}/ia64/sysdep.h (100%) rename {sysdeps => ports/sysdeps}/ia64/tls-macros.h (100%) rename {sysdeps => ports/sysdeps}/ia64/tst-audit.h (100%) rename {sysdeps => ports/sysdeps}/m68k/Implies (100%) rename {sysdeps => ports/sysdeps}/m68k/Makefile (100%) rename {sysdeps => ports/sysdeps}/m68k/Versions (100%) rename {sysdeps => ports/sysdeps}/m68k/__longjmp.c (100%) rename {sysdeps => ports/sysdeps}/m68k/abort-instr.h (100%) rename {sysdeps => ports/sysdeps}/m68k/asm-syntax.h (100%) rename {sysdeps => ports/sysdeps}/m68k/bits/byteswap.h (100%) rename {sysdeps => ports/sysdeps}/m68k/bits/endian.h (100%) rename {sysdeps => ports/sysdeps}/m68k/bits/link.h (100%) rename {sysdeps => ports/sysdeps}/m68k/bits/setjmp.h (100%) rename {sysdeps => ports/sysdeps}/m68k/bsd-_setjmp.c (100%) rename {sysdeps => ports/sysdeps}/m68k/bsd-setjmp.c (100%) rename {sysdeps => ports/sysdeps}/m68k/coldfire/bits/atomic.h (100%) rename {sysdeps => ports/sysdeps}/m68k/coldfire/fpu/e_sqrt.c (100%) rename {sysdeps => ports/sysdeps}/m68k/coldfire/fpu/e_sqrtf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/coldfire/fpu/fraiseexcpt.c (100%) rename {sysdeps => ports/sysdeps}/m68k/coldfire/fpu/libm-test-ulps (100%) rename {sysdeps => ports/sysdeps}/m68k/coldfire/fpu/s_fabs.c (100%) rename {sysdeps => ports/sysdeps}/m68k/coldfire/fpu/s_fabsf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/coldfire/fpu/s_lrint.c (100%) rename {sysdeps => ports/sysdeps}/m68k/coldfire/fpu/s_lrintf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/coldfire/fpu/s_rint.c (100%) rename {sysdeps => ports/sysdeps}/m68k/coldfire/fpu/s_rintf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/coldfire/shlib-versions (100%) rename {sysdeps => ports/sysdeps}/m68k/coldfire/sysdep.h (100%) rename {sysdeps => ports/sysdeps}/m68k/crti.S (100%) rename {sysdeps => ports/sysdeps}/m68k/crtn.S (100%) rename {sysdeps => ports/sysdeps}/m68k/dl-machine.h (100%) rename {sysdeps => ports/sysdeps}/m68k/dl-tls.h (100%) rename {sysdeps => ports/sysdeps}/m68k/dl-trampoline.S (100%) rename {sysdeps => ports/sysdeps}/m68k/ffs.c (100%) rename {sysdeps => ports/sysdeps}/m68k/fpu/bits/fenv.h (100%) rename {sysdeps => ports/sysdeps}/m68k/fpu/fclrexcpt.c (100%) rename {sysdeps => ports/sysdeps}/m68k/fpu/fedisblxcpt.c (100%) rename {sysdeps => ports/sysdeps}/m68k/fpu/feenablxcpt.c (100%) rename {sysdeps => ports/sysdeps}/m68k/fpu/fegetenv.c (100%) rename {sysdeps => ports/sysdeps}/m68k/fpu/fegetexcept.c (100%) rename {sysdeps => ports/sysdeps}/m68k/fpu/fegetround.c (100%) rename {sysdeps => ports/sysdeps}/m68k/fpu/feholdexcpt.c (100%) rename {sysdeps => ports/sysdeps}/m68k/fpu/fesetenv.c (100%) rename {sysdeps => ports/sysdeps}/m68k/fpu/fesetround.c (100%) rename {sysdeps => ports/sysdeps}/m68k/fpu/feupdateenv.c (100%) rename {sysdeps => ports/sysdeps}/m68k/fpu/fgetexcptflg.c (100%) rename {sysdeps => ports/sysdeps}/m68k/fpu/fsetexcptflg.c (100%) rename {sysdeps => ports/sysdeps}/m68k/fpu/ftestexcept.c (100%) rename {sysdeps => ports/sysdeps}/m68k/fpu_control.h (100%) rename {sysdeps => ports/sysdeps}/m68k/gccframe.h (100%) rename {sysdeps => ports/sysdeps}/m68k/jmpbuf-unwind.h (100%) rename {sysdeps => ports/sysdeps}/m68k/ldsodefs.h (100%) rename {sysdeps => ports/sysdeps}/m68k/libc-tls.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/Implies (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/Makefile (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/add_n.S (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/bits/huge_vall.h (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/bits/mathdef.h (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/bits/mathinline.h (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/branred.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/doasin.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/dosincos.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_acos.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_acosf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_acosl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_asin.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_asinf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_asinl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_atan2.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_atan2f.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_atan2l.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_atanh.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_atanhf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_atanhl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_cosh.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_coshf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_coshl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_exp.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_exp10.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_exp10f.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_exp10l.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_exp2.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_exp2f.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_exp2l.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_expf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_expl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_fmod.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_fmodf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_fmodl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_ilogb.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_ilogbf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_ilogbl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_log.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_log10.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_log10f.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_log10l.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_log2.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_log2f.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_log2l.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_logf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_logl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_pow.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_powf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_powl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_rem_pio2.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_rem_pio2f.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_rem_pio2l.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_remainder.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_remainderf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_remainderl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_scalb.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_scalbf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_scalbl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_sinh.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_sinhf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_sinhl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_sqrt.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_sqrtf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/e_sqrtl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/fraiseexcpt.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/halfulp.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/k_cosl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/k_rem_pio2.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/k_rem_pio2f.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/k_rem_pio2l.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/k_sinl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/k_tanf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/k_tanl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/libm-test-ulps (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/math_private.h (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/mathimpl.h (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/mpa.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/mpatan.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/mpatan2.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/mpexp.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/mplog.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/mpsqrt.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/mptan.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_atan.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_atanf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_atanl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_ccosh.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_ccoshf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_ccoshl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_ceil.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_ceilf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_ceill.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_cexp.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_cexpf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_cexpl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_cos.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_cosf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_cosl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_csin.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_csinf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_csinh.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_csinhf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_csinhl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_csinl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_expm1.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_expm1f.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_expm1l.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_fabs.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_fabsf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_fabsl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_finite.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_finitef.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_finitel.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_floor.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_floorf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_floorl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_fpclassifyl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_frexp.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_frexpf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_frexpl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_isinf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_isinff.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_isinfl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_isnan.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_isnanf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_isnanl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_llrint.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_llrintf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_llrintl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_log1p.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_log1pf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_log1pl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_logbl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_lrint.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_lrintf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_lrintl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_modf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_modff.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_modfl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_nearbyint.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_nearbyintf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_nearbyintl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_nextafterl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_remquo.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_remquof.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_remquol.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_rint.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_rintf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_rintl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_scalbln.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_scalblnf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_scalblnl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_scalbn.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_scalbnf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_scalbnl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_significand.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_significandf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_significandl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_sin.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_sincos.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_sincosf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_sincosl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_sinf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_sinl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_tan.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_tanf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_tanh.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_tanhf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_tanhl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_tanl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_trunc.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_truncf.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/s_truncl.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/sincos32.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/sincostab.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/slowexp.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/slowpow.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/fpu/t_exp.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/lshift.S (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/m68020/Makefile (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/m68020/addmul_1.S (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/m68020/bits/atomic.h (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/m68020/bits/string.h (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/m68020/mul_1.S (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/m68020/submul_1.S (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/m68020/wordcopy.S (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/printf_fphex.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/rshift.S (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/strtold_l.c (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/sub_n.S (100%) rename {sysdeps => ports/sysdeps}/m68k/m680x0/sysdep.h (100%) rename {sysdeps => ports/sysdeps}/m68k/memchr.S (100%) rename {sysdeps => ports/sysdeps}/m68k/memcopy.h (100%) rename {sysdeps => ports/sysdeps}/m68k/memusage.h (100%) rename {sysdeps => ports/sysdeps}/m68k/nptl/Makefile (100%) rename {sysdeps => ports/sysdeps}/m68k/nptl/pthread_spin_lock.c (100%) rename {sysdeps => ports/sysdeps}/m68k/nptl/pthread_spin_trylock.c (100%) rename {sysdeps => ports/sysdeps}/m68k/nptl/pthreaddef.h (100%) rename {sysdeps => ports/sysdeps}/m68k/nptl/tcb-offsets.sym (100%) rename {sysdeps => ports/sysdeps}/m68k/nptl/tls.h (100%) rename {sysdeps => ports/sysdeps}/m68k/preconfigure (100%) rename {sysdeps => ports/sysdeps}/m68k/rawmemchr.S (100%) rename {sysdeps => ports/sysdeps}/m68k/setjmp.c (100%) rename {sysdeps => ports/sysdeps}/m68k/shlib-versions (100%) rename {sysdeps => ports/sysdeps}/m68k/stackinfo.h (100%) rename {sysdeps => ports/sysdeps}/m68k/start.S (100%) rename {sysdeps => ports/sysdeps}/m68k/strchr.S (100%) rename {sysdeps => ports/sysdeps}/m68k/strchrnul.S (100%) rename {sysdeps => ports/sysdeps}/m68k/sys/ucontext.h (100%) rename {sysdeps => ports/sysdeps}/m68k/sysdep.h (100%) rename {sysdeps => ports/sysdeps}/m68k/tls-macros.h (100%) rename {sysdeps => ports/sysdeps}/m68k/tst-audit.h (100%) rename {sysdeps => ports/sysdeps}/m68k/wcpcpy.c (100%) rename {sysdeps => ports/sysdeps}/m68k/wcpcpy_chk.c (100%) rename {sysdeps => ports/sysdeps}/mips/Implies (100%) rename {sysdeps => ports/sysdeps}/mips/Makefile (100%) rename {sysdeps => ports/sysdeps}/mips/__longjmp.c (100%) rename {sysdeps => ports/sysdeps}/mips/abort-instr.h (100%) rename {sysdeps => ports/sysdeps}/mips/add_n.S (100%) rename {sysdeps => ports/sysdeps}/mips/addmul_1.S (100%) rename {sysdeps => ports/sysdeps}/mips/backtrace.c (100%) rename {sysdeps => ports/sysdeps}/mips/bits/atomic.h (100%) rename {sysdeps => ports/sysdeps}/mips/bits/dlfcn.h (100%) rename {sysdeps => ports/sysdeps}/mips/bits/endian.h (100%) rename {sysdeps => ports/sysdeps}/mips/bits/fenv.h (100%) rename {sysdeps => ports/sysdeps}/mips/bits/ipctypes.h (100%) rename {sysdeps => ports/sysdeps}/mips/bits/link.h (100%) rename {sysdeps => ports/sysdeps}/mips/bits/linkmap.h (100%) rename {sysdeps => ports/sysdeps}/mips/bits/mathdef.h (100%) rename {sysdeps => ports/sysdeps}/mips/bits/nan.h (100%) rename {sysdeps => ports/sysdeps}/mips/bits/setjmp.h (100%) rename {sysdeps => ports/sysdeps}/mips/bits/wordsize.h (100%) rename {sysdeps => ports/sysdeps}/mips/bsd-_setjmp.S (100%) rename {sysdeps => ports/sysdeps}/mips/bsd-setjmp.S (100%) rename {sysdeps => ports/sysdeps}/mips/configure (100%) rename {sysdeps => ports/sysdeps}/mips/configure.in (100%) rename {sysdeps => ports/sysdeps}/mips/dl-dtprocnum.h (100%) rename {sysdeps => ports/sysdeps}/mips/dl-lookup.c (100%) rename {sysdeps => ports/sysdeps}/mips/dl-machine.h (100%) rename {sysdeps => ports/sysdeps}/mips/dl-procinfo.c (100%) rename {sysdeps => ports/sysdeps}/mips/dl-procinfo.h (100%) rename {sysdeps => ports/sysdeps}/mips/dl-tls.h (100%) rename {sysdeps => ports/sysdeps}/mips/dl-trampoline.c (100%) rename {sysdeps => ports/sysdeps}/mips/fpregdef.h (100%) rename {sysdeps => ports/sysdeps}/mips/fpu/e_sqrt.c (100%) rename {sysdeps => ports/sysdeps}/mips/fpu/e_sqrtf.c (100%) rename {sysdeps => ports/sysdeps}/mips/fpu/fclrexcpt.c (100%) rename {sysdeps => ports/sysdeps}/mips/fpu/fedisblxcpt.c (100%) rename {sysdeps => ports/sysdeps}/mips/fpu/feenablxcpt.c (100%) rename {sysdeps => ports/sysdeps}/mips/fpu/fegetenv.c (100%) rename {sysdeps => ports/sysdeps}/mips/fpu/fegetexcept.c (100%) rename {sysdeps => ports/sysdeps}/mips/fpu/fegetround.c (100%) rename {sysdeps => ports/sysdeps}/mips/fpu/feholdexcpt.c (100%) rename {sysdeps => ports/sysdeps}/mips/fpu/fenv_libc.h (100%) rename {sysdeps => ports/sysdeps}/mips/fpu/fesetenv.c (100%) rename {sysdeps => ports/sysdeps}/mips/fpu/fesetround.c (100%) rename {sysdeps => ports/sysdeps}/mips/fpu/feupdateenv.c (100%) rename {sysdeps => ports/sysdeps}/mips/fpu/fgetexcptflg.c (100%) rename {sysdeps => ports/sysdeps}/mips/fpu/fraiseexcpt.c (100%) rename {sysdeps => ports/sysdeps}/mips/fpu/fsetexcptflg.c (100%) rename {sysdeps => ports/sysdeps}/mips/fpu/ftestexcept.c (100%) rename {sysdeps => ports/sysdeps}/mips/fpu_control.h (100%) rename {sysdeps => ports/sysdeps}/mips/gccframe.h (100%) rename {sysdeps => ports/sysdeps}/mips/ieee754.h (100%) rename {sysdeps => ports/sysdeps}/mips/init-first.c (100%) rename {sysdeps => ports/sysdeps}/mips/jmpbuf-unwind.h (100%) rename {sysdeps => ports/sysdeps}/mips/ldsodefs.h (100%) rename {sysdeps => ports/sysdeps}/mips/libc-tls.c (100%) rename {sysdeps => ports/sysdeps}/mips/lshift.S (100%) rename {sysdeps => ports/sysdeps}/mips/machine-gmon.h (100%) rename {sysdeps => ports/sysdeps}/mips/memcpy.S (100%) rename {sysdeps => ports/sysdeps}/mips/memset.S (100%) rename {sysdeps => ports/sysdeps}/mips/memusage.h (100%) rename {sysdeps => ports/sysdeps}/mips/mips32/Implies (100%) rename {sysdeps => ports/sysdeps}/mips/mips32/Makefile (100%) rename {sysdeps => ports/sysdeps}/mips/mips32/crti.S (100%) rename {sysdeps => ports/sysdeps}/mips/mips32/crtn.S (100%) rename {sysdeps => ports/sysdeps}/mips/mips32/libm-test-ulps (100%) rename {sysdeps => ports/sysdeps}/mips/mips64/Implies (100%) rename {sysdeps => ports/sysdeps}/mips/mips64/Versions (100%) rename {sysdeps => ports/sysdeps}/mips/mips64/__longjmp.c (100%) rename {sysdeps => ports/sysdeps}/mips/mips64/add_n.S (100%) rename {sysdeps => ports/sysdeps}/mips/mips64/addmul_1.S (100%) rename {sysdeps => ports/sysdeps}/mips/mips64/bsd-_setjmp.S (100%) rename {sysdeps => ports/sysdeps}/mips/mips64/bsd-setjmp.S (100%) rename {sysdeps => ports/sysdeps}/mips/mips64/gmp-mparam.h (100%) rename {sysdeps => ports/sysdeps}/mips/mips64/libm-test-ulps (100%) rename {sysdeps => ports/sysdeps}/mips/mips64/lshift.S (100%) rename {sysdeps => ports/sysdeps}/mips/mips64/memcpy.S (100%) rename {sysdeps => ports/sysdeps}/mips/mips64/memset.S (100%) rename {sysdeps => ports/sysdeps}/mips/mips64/mul_1.S (100%) rename {sysdeps => ports/sysdeps}/mips/mips64/n32/Implies (100%) rename {sysdeps => ports/sysdeps}/mips/mips64/n32/Makefile (100%) rename {sysdeps => ports/sysdeps}/mips/mips64/n32/crti.S (100%) rename {sysdeps => ports/sysdeps}/mips/mips64/n32/crtn.S (100%) rename {sysdeps => ports/sysdeps}/mips/mips64/n32/s_fma.c (100%) rename {sysdeps => ports/sysdeps}/mips/mips64/n64/Implies (100%) rename {sysdeps => ports/sysdeps}/mips/mips64/n64/Makefile (100%) rename {sysdeps => ports/sysdeps}/mips/mips64/n64/crti.S (100%) rename {sysdeps => ports/sysdeps}/mips/mips64/n64/crtn.S (100%) rename {sysdeps => ports/sysdeps}/mips/mips64/n64/s_fma.c (100%) rename {sysdeps => ports/sysdeps}/mips/mips64/rshift.S (100%) rename {sysdeps => ports/sysdeps}/mips/mips64/setjmp.S (100%) rename {sysdeps => ports/sysdeps}/mips/mips64/setjmp_aux.c (100%) rename {sysdeps => ports/sysdeps}/mips/mips64/soft-fp/Makefile (100%) rename {sysdeps => ports/sysdeps}/mips/mips64/soft-fp/e_sqrtl.c (100%) rename {sysdeps => ports/sysdeps}/mips/mips64/soft-fp/sfp-machine.h (100%) rename {sysdeps => ports/sysdeps}/mips/mips64/sub_n.S (100%) rename {sysdeps => ports/sysdeps}/mips/mips64/submul_1.S (100%) rename {sysdeps => ports/sysdeps}/mips/mul_1.S (100%) rename {sysdeps => ports/sysdeps}/mips/nptl/Makefile (100%) rename {sysdeps => ports/sysdeps}/mips/nptl/nptl-sysdep.S (100%) rename {sysdeps => ports/sysdeps}/mips/nptl/pthread_spin_lock.S (100%) rename {sysdeps => ports/sysdeps}/mips/nptl/pthread_spin_trylock.S (100%) rename {sysdeps => ports/sysdeps}/mips/nptl/pthreaddef.h (100%) rename {sysdeps => ports/sysdeps}/mips/nptl/shlib-versions (100%) rename {sysdeps => ports/sysdeps}/mips/nptl/tcb-offsets.sym (100%) rename {sysdeps => ports/sysdeps}/mips/nptl/tls.h (100%) rename {sysdeps => ports/sysdeps}/mips/preconfigure (100%) rename {sysdeps => ports/sysdeps}/mips/regdef.h (100%) rename {sysdeps => ports/sysdeps}/mips/rshift.S (100%) rename {sysdeps => ports/sysdeps}/mips/setjmp.S (100%) rename {sysdeps => ports/sysdeps}/mips/setjmp_aux.c (100%) rename {sysdeps => ports/sysdeps}/mips/sgidefs.h (100%) rename {sysdeps => ports/sysdeps}/mips/shlib-versions (100%) rename {sysdeps => ports/sysdeps}/mips/soft-fp/sfp-machine.h (100%) rename {sysdeps => ports/sysdeps}/mips/stackinfo.h (100%) rename {sysdeps => ports/sysdeps}/mips/start.S (100%) rename {sysdeps => ports/sysdeps}/mips/sub_n.S (100%) rename {sysdeps => ports/sysdeps}/mips/submul_1.S (100%) rename {sysdeps => ports/sysdeps}/mips/sys/asm.h (100%) rename {sysdeps => ports/sysdeps}/mips/sys/fpregdef.h (100%) rename {sysdeps => ports/sysdeps}/mips/sys/regdef.h (100%) rename {sysdeps => ports/sysdeps}/mips/sys/tas.h (100%) rename {sysdeps => ports/sysdeps}/mips/sys/ucontext.h (100%) rename {sysdeps => ports/sysdeps}/mips/tls-macros.h (100%) rename {sysdeps => ports/sysdeps}/mips/tst-audit.h (100%) rename {sysdeps => ports/sysdeps}/powerpc/dl-procinfo.c (100%) rename {sysdeps => ports/sysdeps}/powerpc/dl-procinfo.h (100%) rename {sysdeps => ports/sysdeps}/powerpc/nofpu/Makefile (100%) rename {sysdeps => ports/sysdeps}/powerpc/nofpu/Subdirs (100%) rename {sysdeps => ports/sysdeps}/powerpc/nofpu/Versions (100%) rename {sysdeps => ports/sysdeps}/powerpc/nofpu/fclrexcpt.c (100%) rename {sysdeps => ports/sysdeps}/powerpc/nofpu/fedisblxcpt.c (100%) rename {sysdeps => ports/sysdeps}/powerpc/nofpu/feenablxcpt.c (100%) rename {sysdeps => ports/sysdeps}/powerpc/nofpu/fegetenv.c (100%) rename {sysdeps => ports/sysdeps}/powerpc/nofpu/fegetexcept.c (100%) rename {sysdeps => ports/sysdeps}/powerpc/nofpu/fegetround.c (100%) rename {sysdeps => ports/sysdeps}/powerpc/nofpu/feholdexcpt.c (100%) rename {sysdeps => ports/sysdeps}/powerpc/nofpu/fenv_const.c (100%) rename {sysdeps => ports/sysdeps}/powerpc/nofpu/fenv_libc.h (100%) rename {sysdeps => ports/sysdeps}/powerpc/nofpu/fesetenv.c (100%) rename {sysdeps => ports/sysdeps}/powerpc/nofpu/fesetround.c (100%) rename {sysdeps => ports/sysdeps}/powerpc/nofpu/feupdateenv.c (100%) rename {sysdeps => ports/sysdeps}/powerpc/nofpu/fgetexcptflg.c (100%) rename {sysdeps => ports/sysdeps}/powerpc/nofpu/fraiseexcpt.c (100%) rename {sysdeps => ports/sysdeps}/powerpc/nofpu/fsetexcptflg.c (100%) rename {sysdeps => ports/sysdeps}/powerpc/nofpu/ftestexcept.c (100%) rename {sysdeps => ports/sysdeps}/powerpc/nofpu/libm-test-ulps (100%) rename {sysdeps => ports/sysdeps}/powerpc/nofpu/shlib-versions (100%) rename {sysdeps => ports/sysdeps}/powerpc/nofpu/sim-full.c (100%) rename {sysdeps => ports/sysdeps}/powerpc/nofpu/soft-supp.h (100%) rename {sysdeps => ports/sysdeps}/powerpc/powerpc32/405/memcmp.S (100%) rename {sysdeps => ports/sysdeps}/powerpc/powerpc32/405/memcpy.S (100%) rename {sysdeps => ports/sysdeps}/powerpc/powerpc32/405/memset.S (100%) rename {sysdeps => ports/sysdeps}/powerpc/powerpc32/405/strcmp.S (100%) rename {sysdeps => ports/sysdeps}/powerpc/powerpc32/405/strcpy.S (100%) rename {sysdeps => ports/sysdeps}/powerpc/powerpc32/405/strlen.S (100%) rename {sysdeps => ports/sysdeps}/powerpc/powerpc32/405/strncmp.S (100%) rename {sysdeps => ports/sysdeps}/powerpc/powerpc32/440/Implies (100%) rename {sysdeps => ports/sysdeps}/powerpc/powerpc32/464/Implies (100%) rename {sysdeps => ports/sysdeps}/powerpc/powerpc32/476/Implies (100%) rename {sysdeps => ports/sysdeps}/powerpc/powerpc32/Makefile (100%) rename {sysdeps => ports/sysdeps}/powerpc/soft-fp/sfp-machine.h (100%) rename {sysdeps => ports/sysdeps}/tile/Implies (100%) rename {sysdeps => ports/sysdeps}/tile/Makefile (100%) rename {sysdeps => ports/sysdeps}/tile/Versions (100%) rename {sysdeps => ports/sysdeps}/tile/__longjmp.S (100%) rename {sysdeps => ports/sysdeps}/tile/__tls_get_addr.S (100%) rename {sysdeps => ports/sysdeps}/tile/_mcount.S (100%) rename {sysdeps => ports/sysdeps}/tile/abort-instr.h (100%) rename {sysdeps => ports/sysdeps}/tile/backtrace.c (100%) rename {sysdeps => ports/sysdeps}/tile/bits/atomic.h (100%) rename {sysdeps => ports/sysdeps}/tile/bits/byteswap.h (100%) rename {sysdeps => ports/sysdeps}/tile/bits/endian.h (100%) rename {sysdeps => ports/sysdeps}/tile/bits/fenv.h (100%) rename {sysdeps => ports/sysdeps}/tile/bits/link.h (100%) rename {sysdeps => ports/sysdeps}/tile/bits/mathdef.h (100%) rename {sysdeps => ports/sysdeps}/tile/bits/mathinline.h (100%) rename {sysdeps => ports/sysdeps}/tile/bits/setjmp.h (100%) rename {sysdeps => ports/sysdeps}/tile/bsd-_setjmp.S (100%) rename {sysdeps => ports/sysdeps}/tile/bsd-setjmp.S (100%) rename {sysdeps => ports/sysdeps}/tile/bzero.S (100%) rename {sysdeps => ports/sysdeps}/tile/crti.S (100%) rename {sysdeps => ports/sysdeps}/tile/crtn.S (100%) rename {sysdeps => ports/sysdeps}/tile/dl-lookupcfg.h (100%) rename {sysdeps => ports/sysdeps}/tile/dl-machine.h (100%) rename {sysdeps => ports/sysdeps}/tile/dl-runtime.c (100%) rename {sysdeps => ports/sysdeps}/tile/dl-start.S (100%) rename {sysdeps => ports/sysdeps}/tile/dl-tls.c (100%) rename {sysdeps => ports/sysdeps}/tile/dl-tls.h (100%) rename {sysdeps => ports/sysdeps}/tile/dl-trampoline.S (100%) rename {sysdeps => ports/sysdeps}/tile/fegetenv.c (100%) rename {sysdeps => ports/sysdeps}/tile/fegetround.c (100%) rename {sysdeps => ports/sysdeps}/tile/feholdexcpt.c (100%) rename {sysdeps => ports/sysdeps}/tile/fesetenv.c (100%) rename {sysdeps => ports/sysdeps}/tile/fesetround.c (100%) rename {sysdeps => ports/sysdeps}/tile/feupdateenv.c (100%) rename {sysdeps => ports/sysdeps}/tile/ffs.c (100%) rename {sysdeps => ports/sysdeps}/tile/ffsll.c (100%) rename {sysdeps => ports/sysdeps}/tile/gccframe.h (100%) rename {sysdeps => ports/sysdeps}/tile/jmpbuf-offsets.h (100%) rename {sysdeps => ports/sysdeps}/tile/jmpbuf-unwind.h (100%) rename {sysdeps => ports/sysdeps}/tile/ldsodefs.h (100%) rename {sysdeps => ports/sysdeps}/tile/libm-test-ulps (100%) rename {sysdeps => ports/sysdeps}/tile/machine-gmon.h (100%) rename {sysdeps => ports/sysdeps}/tile/math_private.h (100%) rename {sysdeps => ports/sysdeps}/tile/nptl/Makefile (100%) rename {sysdeps => ports/sysdeps}/tile/nptl/pthread_spin_lock.c (100%) rename {sysdeps => ports/sysdeps}/tile/nptl/pthread_spin_trylock.c (100%) rename {sysdeps => ports/sysdeps}/tile/nptl/pthreaddef.h (100%) rename {sysdeps => ports/sysdeps}/tile/nptl/tcb-offsets.sym (100%) rename {sysdeps => ports/sysdeps}/tile/nptl/tls.h (100%) rename {sysdeps => ports/sysdeps}/tile/preconfigure (100%) rename {sysdeps => ports/sysdeps}/tile/s_fma.c (100%) rename {sysdeps => ports/sysdeps}/tile/s_fmaf.c (100%) rename {sysdeps => ports/sysdeps}/tile/setjmp.S (100%) rename {sysdeps => ports/sysdeps}/tile/shlib-versions (100%) rename {sysdeps => ports/sysdeps}/tile/sotruss-lib.c (100%) rename {sysdeps => ports/sysdeps}/tile/stackguard-macros.h (100%) rename {sysdeps => ports/sysdeps}/tile/stackinfo.h (100%) rename {sysdeps => ports/sysdeps}/tile/start.S (100%) rename {sysdeps => ports/sysdeps}/tile/sysdep.h (100%) rename {sysdeps => ports/sysdeps}/tile/tilegx/bits/atomic.h (100%) rename {sysdeps => ports/sysdeps}/tile/tilegx/bits/wordsize.h (100%) rename {sysdeps => ports/sysdeps}/tile/tilegx/memchr.c (100%) rename {sysdeps => ports/sysdeps}/tile/tilegx/memcpy.c (100%) rename {sysdeps => ports/sysdeps}/tile/tilegx/memset.c (100%) rename {sysdeps => ports/sysdeps}/tile/tilegx/memusage.h (100%) rename {sysdeps => ports/sysdeps}/tile/tilegx/rawmemchr.c (100%) rename {sysdeps => ports/sysdeps}/tile/tilegx/strchr.c (100%) rename {sysdeps => ports/sysdeps}/tile/tilegx/strchrnul.c (100%) rename {sysdeps => ports/sysdeps}/tile/tilegx/string-endian.h (100%) rename {sysdeps => ports/sysdeps}/tile/tilegx/strlen.c (100%) rename {sysdeps => ports/sysdeps}/tile/tilegx/strrchr.c (100%) rename {sysdeps => ports/sysdeps}/tile/tilegx/tilegx32/Implies (100%) rename {sysdeps => ports/sysdeps}/tile/tilegx/tilegx64/Implies (100%) rename {sysdeps => ports/sysdeps}/tile/tilepro/Implies (100%) rename {sysdeps => ports/sysdeps}/tile/tilepro/bits/atomic.h (100%) rename {sysdeps => ports/sysdeps}/tile/tilepro/bits/wordsize.h (100%) rename {sysdeps => ports/sysdeps}/tile/tilepro/memchr.c (100%) rename {sysdeps => ports/sysdeps}/tile/tilepro/memcpy.S (100%) rename {sysdeps => ports/sysdeps}/tile/tilepro/memset.c (100%) rename {sysdeps => ports/sysdeps}/tile/tilepro/memusage.h (100%) rename {sysdeps => ports/sysdeps}/tile/tilepro/rawmemchr.c (100%) rename {sysdeps => ports/sysdeps}/tile/tilepro/strchr.c (100%) rename {sysdeps => ports/sysdeps}/tile/tilepro/strchrnul.c (100%) rename {sysdeps => ports/sysdeps}/tile/tilepro/strlen.c (100%) rename {sysdeps => ports/sysdeps}/tile/tilepro/strrchr.c (100%) rename {sysdeps => ports/sysdeps}/tile/tls-macros.h (100%) rename {sysdeps => ports/sysdeps}/tile/tst-audit.h (100%) rename {sysdeps => ports/sysdeps}/unix/alpha/Makefile (100%) rename {sysdeps => ports/sysdeps}/unix/alpha/getegid.S (100%) rename {sysdeps => ports/sysdeps}/unix/alpha/geteuid.S (100%) rename {sysdeps => ports/sysdeps}/unix/alpha/getppid.S (100%) rename {sysdeps => ports/sysdeps}/unix/alpha/pipe.S (100%) rename {sysdeps => ports/sysdeps}/unix/alpha/rt-sysdep.S (100%) rename {sysdeps => ports/sysdeps}/unix/alpha/sysdep.S (100%) rename {sysdeps => ports/sysdeps}/unix/alpha/sysdep.h (100%) rename {sysdeps => ports/sysdeps}/unix/am33/sysdep.S (100%) rename {sysdeps => ports/sysdeps}/unix/am33/sysdep.h (100%) rename {sysdeps => ports/sysdeps}/unix/arm/sysdep.S (100%) rename {sysdeps => ports/sysdeps}/unix/arm/sysdep.h (100%) rename {sysdeps => ports/sysdeps}/unix/mips/entry.h (100%) rename {sysdeps => ports/sysdeps}/unix/mips/mips32/sysdep.h (100%) rename {sysdeps => ports/sysdeps}/unix/mips/mips64/n32/sysdep.h (100%) rename {sysdeps => ports/sysdeps}/unix/mips/mips64/n64/sysdep.h (100%) rename {sysdeps => ports/sysdeps}/unix/mips/pipe.S (100%) rename {sysdeps => ports/sysdeps}/unix/mips/rt-sysdep.S (100%) rename {sysdeps => ports/sysdeps}/unix/mips/sysdep.S (100%) rename {sysdeps => ports/sysdeps}/unix/mips/sysdep.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/Implies (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/Makefile (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/Versions (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/____longjmp_chk.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/a.out.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/adjtime.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/alpha/ptrace.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/alpha/regdef.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/alphaev6/fpu/Implies (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/alphaev67/fpu/Implies (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/a.out.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/dirent.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/elfclass.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/epoll.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/errno.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/eventfd.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/fcntl.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/inotify.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/ioctls.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/ipc.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/mman.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/msq.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/netdb.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/resource.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/sem.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/shm.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/sigaction.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/siginfo.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/signalfd.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/signum.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/sigstack.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/socket_type.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/stat.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/statfs.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/termios.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/timerfd.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/typesizes.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/bits/wordsize.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/brk.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/clone.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/configure (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/configure.in (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/creat.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/dl-auxv.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/dl-brk.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/dl-fxstatat64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/dl-support.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/dl-sysdep.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/fpu/Implies (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/fraiseexcpt.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/fstatfs64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/fstatvfs.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/fstatvfs64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/fxstat.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/fxstatat.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/getclktck.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/getcontext.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/getdents.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/getdents64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/gethostname.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/getsysstats.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/glob.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/ieee_get_fp_control.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/ieee_set_fp_control.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/internal_statvfs64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/ioperm.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/ipc_priv.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/kernel-features.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/kernel_sigaction.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/kernel_stat.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/kernel_sysinfo.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/kernel_termios.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/lxstat.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/makecontext.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/msgctl.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/nldbl-abi.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/nptl/Makefile (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/nptl/Versions (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/nptl/aio_cancel.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/nptl/bits/local_lim.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/nptl/bits/semaphore.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/nptl/clone.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/nptl/createthread.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/nptl/fork.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/nptl/ld.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/nptl/libBrokenLocale.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/nptl/libanl.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/nptl/libc.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/nptl/libcrypt.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/nptl/libdl.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/nptl/libm.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/nptl/libnsl.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/nptl/libpthread.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/nptl/libresolv.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/nptl/librt.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/nptl/libthread_db.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/nptl/libutil.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/nptl/lowlevellock.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/nptl/pt-vfork.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/nptl/pthread_once.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/nptl/sem_post.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/nptl/sysdep-cancel.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/nptl/timer_create.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/nptl/timer_delete.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/nptl/timer_getoverr.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/nptl/timer_gettime.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/nptl/timer_settime.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/nptl/vfork.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/oldglob.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/pipe.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/register-dump.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/rt_sigaction.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/semctl.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/setcontext.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/setfpucw.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/shmctl.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/sigaction.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/sigcontextinfo.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/sigprocmask.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/sigsuspend.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/sizes.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/statfs64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/statvfs.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/statvfs64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/swapcontext.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/sys/acct.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/sys/io.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/sys/procfs.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/sys/ucontext.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/sys/user.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/syscall.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/syscalls.list (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/sysconf.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/sysdep.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/ucontext-offsets.sym (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/wordexp.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/xstat.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/xstatconv.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/alpha/xstatconv.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/Makefile (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/bits/fcntl.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/bits/mman.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/brk.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/chown.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/clone.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/configure (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/configure.in (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/fchown.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/fcntl.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/fxstat.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/getegid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/geteuid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/getgid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/getgroups.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/getmsg.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/getresgid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/getresuid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/getrlimit.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/getuid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/lchown.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/linuxthreads/sysdep-cancel.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/lockf64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/lxstat.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/profil-counter.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/putmsg.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/setegid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/seteuid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/setfsgid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/setfsuid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/setgid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/setgroups.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/setregid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/setresgid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/setresuid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/setreuid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/setrlimit.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/setuid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/socket.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/syscall.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/sysdep.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/sysdep.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/am33/xstat.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/Makefile (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/Versions (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/____longjmp_chk.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/aeabi_read_tp.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/alphasort64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/bits/fcntl.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/bits/hwcap.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/bits/mman.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/bits/shm.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/brk.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/clone.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/configure (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/configure.in (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/dl-procinfo.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/dl-procinfo.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/fchown.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/fcntl.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/ftruncate64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/fxstat.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/fxstatat.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/getcontext.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/getdents64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/getegid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/geteuid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/getgid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/getgroups.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/getresgid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/getresuid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/getrlimit.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/getrlimit64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/getuid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/glob64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/internal_accept4.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/internal_recvmmsg.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/internal_sendmmsg.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/ioperm.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/kernel-features.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/lchown.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/ldsodefs.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/libc-aeabi_read_tp.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/libc-do-syscall.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/lockf64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/lxstat.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/makecontext.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/mmap.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/mmap64.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/msgctl.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/Makefile (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/Versions (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/bits/atomic.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/bits/semaphore.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/clone.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/configure (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/configure.in (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/createthread.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/fork.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/ld.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/libBrokenLocale.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/libanl.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/libc.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/libcrypt.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/libdl.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/libm.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/libnsl.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/libpthread.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/libresolv.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/librt.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/libthread_db.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/libutil.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/lowlevellock.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/lowlevellock.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/nptl-aeabi_unwind_cpp_pr1.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/pt-vfork.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/pthread_once.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/rt-aeabi_unwind_cpp_pr1.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/sysdep-cancel.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/unwind-resume.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/unwind.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/nptl/vfork.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/oldgetrlimit.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/oldgetrlimit64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/oldsetrlimit.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/posix_fadvise.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/posix_fadvise64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/pread.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/pread64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/profil-counter.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/pwrite.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/pwrite64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/readahead.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/readdir64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/readdir64_r.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/register-dump.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/scandir64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/semctl.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/setcontext.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/setegid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/seteuid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/setfsgid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/setfsuid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/setgid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/setgroups.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/setregid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/setresgid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/setresuid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/setreuid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/setrlimit.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/setuid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/shmctl.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/sigaction.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/sigcontextinfo.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/sigrestorer.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/swapcontext.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/sys/elf.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/sys/io.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/sys/procfs.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/sys/ucontext.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/sys/user.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/syscall.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/syscalls.list (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/sysdep.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/sysdep.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/truncate64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/ucontext_i.sym (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/umount.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/versionsort64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/vfork.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/arm/xstat.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/Makefile (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/____longjmp_chk.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/access.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/bits/fcntl.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/bits/msq.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/bits/sem.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/bits/shm.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/bits/stat.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/bits/statfs.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/bits/typesizes.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/brk.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/chmod.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/chown.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/creat.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/dl-origin.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/dup2.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/epoll_create.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/epoll_wait.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/futimesat.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/getdents.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/getdents64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/inotify_init.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/kernel_stat.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/lchown.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/link.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/lxstat.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/mkdir.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/not-cancel.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/nptl/not-cancel.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/open.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/open64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/pause.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/pipe.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/poll.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/readlink.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/readlink_chk.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/recv.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/rename.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/rmdir.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/select.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/send.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/symlink.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/syscalls.list (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/sysctl.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/sysdep.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/umount.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/unlink.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/ustat.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/utimes.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/wordsize-32/Versions (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/wordsize-32/fcntl.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/wordsize-32/fstatfs.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/wordsize-32/ftruncate.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/wordsize-32/ftruncate64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/wordsize-32/fxstat.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/wordsize-32/fxstatat.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/wordsize-32/getdents.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/wordsize-32/llseek.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/wordsize-32/lseek.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/wordsize-32/lxstat.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/wordsize-32/lxstat64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/wordsize-32/mmap.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/wordsize-32/overflow.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/wordsize-32/posix_fadvise.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/wordsize-32/pread.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/wordsize-32/pread64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/wordsize-32/preadv.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/wordsize-32/preadv64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/wordsize-32/pwrite.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/wordsize-32/pwrite64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/wordsize-32/pwritev.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/wordsize-32/pwritev64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/wordsize-32/sendfile.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/wordsize-32/statfs.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/wordsize-32/syscalls.list (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/wordsize-32/truncate.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/wordsize-32/truncate64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/wordsize-32/xstat.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/wordsize-32/xstat64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/xmknod.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/generic/xstat.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/Makefile (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/Versions (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/bits/atomic.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/bits/errno.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/bits/fcntl.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/bits/ioctls.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/bits/ipc.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/bits/mman.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/bits/msq.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/bits/sem.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/bits/shm.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/bits/sigaction.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/bits/signum.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/bits/socket.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/brk.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/clone.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/fcntl.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/fxstat.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/fxstatat.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/getcontext.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/getdents64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/getrlimit64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/internaltypes.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/kernel-features.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/kernel_sigaction.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/kernel_stat.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/lxstat.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/makecontext.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/mmap.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/nptl/bits/semaphore.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/nptl/clone.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/nptl/configure (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/nptl/configure.in (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/nptl/createthread.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/nptl/fork.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/nptl/libc-lowlevellock.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/nptl/lowlevellock.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/nptl/lowlevellock.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/nptl/pt-initfini.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/nptl/pt-vfork.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/nptl/pthread.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/nptl/pthreadP.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/nptl/pthread_cond_broadcast.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/nptl/pthread_cond_destroy.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/nptl/pthread_cond_init.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/nptl/pthread_cond_signal.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/nptl/pthread_cond_timedwait.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/nptl/pthread_cond_wait.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/nptl/pthread_once.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/nptl/sysdep-cancel.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/profil-counter.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/setcontext.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/socket.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/swapcontext.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/sys/epoll.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/sys/eventfd.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/sys/inotify.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/sys/procfs.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/sys/signalfd.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/sys/timerfd.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/sys/ucontext.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/sys/user.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/syscall.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/syscalls.list (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/sysdep.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/sysdep.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/ucontext_i.sym (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/umount.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/hppa/xstat.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/Implies (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/Makefile (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/Versions (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/____longjmp_chk.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/__longjmp.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/__start_context.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/bits/endian.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/bits/fcntl.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/bits/ipc.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/bits/mman.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/bits/msq.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/bits/sem.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/bits/setjmp.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/bits/shm.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/bits/sigaction.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/bits/sigcontext.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/bits/siginfo.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/bits/sigstack.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/bits/stat.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/brk.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/bsd-_setjmp.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/bsd-setjmp.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/clock_getcpuclockid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/clone.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/clone2.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/configure (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/configure.in (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/dl-brk.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/dl-cache.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/dl-static.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/fork.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/get_clockfreq.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/getclktck.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/getcontext.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/getpagesize.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/has_cpuclock.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/ioperm.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/kernel-features.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/kernel_stat.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/ldconfig.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/ldd-rewrite.sed (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/ldsodefs.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/makecontext.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/Makefile (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/Versions (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/__ia64_longjmp.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/__sigstack_longjmp.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/bits/local_lim.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/bits/pthreadtypes.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/bits/semaphore.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/clone2.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/createthread.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/dl-sysdep.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/fork.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/ld.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/libBrokenLocale.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/libanl.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/libc.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/libcrypt.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/libdl.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/libm.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/libnsl.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/libpthread.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/libresolv.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/librt.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/libthread_db.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/libutil.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/lowlevellock.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/pt-vfork.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/pthread_once.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/sysdep-cancel.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/timer_create.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/timer_delete.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/timer_getoverr.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/timer_gettime.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/timer_settime.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/unwind-forcedunwind.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/unwind_longjmp.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/nptl/vfork.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/pipe.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/profil-counter.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/readelflib.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/register-dump.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/rt-sysdep.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/setcontext.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/setjmp.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/sigaction.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/sigcontext-offsets.sym (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/sigcontextinfo.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/sigpending.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/sigprocmask.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/swapcontext.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/sys/io.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/sys/procfs.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/sys/ptrace.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/sys/rse.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/sys/ucontext.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/sys/user.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/syscall.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/syscalls.list (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/sysconf.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/sysdep.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/sysdep.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/system.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/ucontext_i.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/umount.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/unwind-dw2-fde.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/vfork.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/ia64/wordexp.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/Makefile (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/Versions (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/____longjmp_chk.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/alphasort64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/bits/a.out.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/bits/fcntl.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/bits/m68k-vdso.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/bits/mman.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/bits/poll.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/bits/stat.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/brk.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/clone.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/coldfire/nptl/bits/atomic.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/coldfire/nptl/ld.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/coldfire/nptl/libBrokenLocale.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/coldfire/nptl/libanl.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/coldfire/nptl/libc.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/coldfire/nptl/libcrypt.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/coldfire/nptl/libdl.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/coldfire/nptl/libm.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/coldfire/nptl/libnsl.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/coldfire/nptl/libpthread.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/coldfire/nptl/libresolv.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/coldfire/nptl/librt.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/coldfire/nptl/libthread_db.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/coldfire/nptl/libutil.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/coldfire/sysdep.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/configure (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/configure.in (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/dl-librecon.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/fchown.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/fchownat.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/fcntl.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/fxstat.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/fxstatat.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/getdents64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/getegid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/geteuid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/getgid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/getgroups.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/getmsg.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/getpagesize.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/getresgid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/getresuid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/getrlimit.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/getrlimit64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/getsysstats.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/getuid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/glob64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/init-first.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/kernel-features.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/lchown.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/ldconfig.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/libc-m68k-vdso.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/lockf64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/lxstat.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/m680x0/nptl/ld.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/m680x0/nptl/libBrokenLocale.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/m680x0/nptl/libanl.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/m680x0/nptl/libc.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/m680x0/nptl/libcrypt.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/m680x0/nptl/libdl.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/m680x0/nptl/libm.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/m680x0/nptl/libnsl.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/m680x0/nptl/libpthread.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/m680x0/nptl/libresolv.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/m680x0/nptl/librt.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/m680x0/nptl/libthread_db.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/m680x0/nptl/libutil.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/m680x0/syscalls.list (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/m680x0/sysdep.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/m68k-helpers.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/m68k-vdso.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/mmap.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/mremap.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/msgctl.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/nptl/bits/semaphore.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/nptl/clone.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/nptl/createthread.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/nptl/fork.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/nptl/lowlevellock.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/nptl/pt-vfork.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/nptl/pthread_once.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/nptl/sysdep-cancel.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/nptl/vfork.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/oldgetrlimit64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/putmsg.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/readdir64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/readdir64_r.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/register-dump.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/scandir64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/semctl.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/semtimedop.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/setegid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/seteuid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/setfsgid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/setfsuid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/setgid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/setgroups.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/setregid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/setresgid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/setresuid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/setreuid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/setrlimit.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/setuid.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/shmctl.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/sigcontextinfo.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/socket.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/sys/procfs.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/sys/reg.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/sys/ucontext.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/sys/user.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/syscall.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/syscalls.list (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/sysdep.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/sysdep.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/versionsort64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/vfork.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/m68k/xstat.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/Makefile (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/Versions (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/____longjmp_chk.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/_test_and_set.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/endian.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/epoll.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/errno.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/eventfd.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/fcntl.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/inotify.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/ioctl-types.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/ipc.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/mman.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/msq.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/poll.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/resource.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/sem.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/shm.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/sigaction.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/sigcontext.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/siginfo.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/signalfd.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/signum.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/sigstack.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/socket_type.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/stat.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/statfs.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/termios.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/bits/timerfd.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/brk.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/clone.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/configure (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/configure.in (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/dl-cache.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/dl-static.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/fcntl.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/getcontext.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/getmsg.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/getsysstats.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/ipc_priv.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/kernel-features.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/kernel_rt_sigframe.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/kernel_sigaction.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/kernel_stat.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/kernel_termios.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/ldsodefs.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/libc-abis (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/lockf64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/makecontext.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips32/Makefile (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips32/accept4.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips32/ftruncate64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips32/fxstatat.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips32/internal_accept4.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips32/internal_recvmmsg.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips32/internal_sendmmsg.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips32/nptl/ld.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips32/nptl/libBrokenLocale.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips32/nptl/libanl.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips32/nptl/libc.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips32/nptl/libcidn.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips32/nptl/libcrypt.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips32/nptl/libdl.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips32/nptl/libm.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips32/nptl/libnsl.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips32/nptl/libnss_compat.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips32/nptl/libnss_db.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips32/nptl/libnss_dns.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips32/nptl/libnss_files.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips32/nptl/libnss_hesiod.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips32/nptl/libnss_nis.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips32/nptl/libnss_nisplus.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips32/nptl/libpthread.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips32/nptl/libresolv.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips32/nptl/librt.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips32/nptl/libthread_db.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips32/nptl/libutil.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips32/posix_fadvise.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips32/posix_fadvise64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips32/readahead.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips32/recvmmsg.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips32/sendmmsg.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips32/sync_file_range.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips32/syscalls.list (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips32/sysdep.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips32/truncate64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/Makefile (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/configure (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/configure.in (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/ftruncate64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/fxstatat64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/ldconfig.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/ldd-rewrite.sed (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/llseek.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/msgctl.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n32/Makefile (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n32/fallocate.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n32/fallocate64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n32/nptl/ld.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n32/nptl/libBrokenLocale.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n32/nptl/libanl.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n32/nptl/libc.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n32/nptl/libcrypt.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n32/nptl/libdl.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n32/nptl/libm.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n32/nptl/libnsl.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n32/nptl/libpthread.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n32/nptl/libresolv.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n32/nptl/librt.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n32/nptl/libthread_db.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n32/nptl/libutil.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n32/posix_fadvise.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n32/posix_fadvise64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n32/posix_fallocate.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n32/posix_fallocate64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n32/syscalls.list (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n32/sysdep.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n64/Makefile (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n64/fallocate.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n64/fallocate64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n64/fstatfs64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n64/ftw.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n64/ftw64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n64/glob64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n64/ioctl.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n64/nptl/ld.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n64/nptl/libBrokenLocale.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n64/nptl/libanl.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n64/nptl/libcrypt.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n64/nptl/libdl.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n64/nptl/libm.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n64/nptl/libnsl.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n64/nptl/libpthread.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n64/nptl/libresolv.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n64/nptl/librt.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n64/nptl/libthread_db.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n64/nptl/libutil.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n64/posix_fadvise.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n64/posix_fadvise64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n64/posix_fallocate.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n64/posix_fallocate64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n64/preadv64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n64/pwritev64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n64/statfs64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n64/syscalls.list (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/n64/sysdep.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/recv.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/semctl.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/send.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/shmctl.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/syscall.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/syscalls.list (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/truncate64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/mips64/umount.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/nptl/bits/local_lim.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/nptl/bits/semaphore.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/nptl/clone.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/nptl/createthread.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/nptl/fork.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/nptl/lowlevellock.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/nptl/pt-vfork.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/nptl/pthread_once.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/nptl/sysdep-cancel.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/nptl/vfork.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/pipe.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/pread.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/pread64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/profil-counter.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/putmsg.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/pwrite.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/pwrite64.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/readelflib.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/register-dump.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/setcontext.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/sigaction.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/sigcontextinfo.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/swapcontext.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/sys/cachectl.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/sys/procfs.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/sys/sysmips.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/sys/ucontext.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/sys/user.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/syscalls.list (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/ucontext_i.sym (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/ustat.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/vfork.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/mips/xstatconv.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/powerpc/powerpc32/405/Implies (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/powerpc/powerpc32/440/Implies (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/powerpc/powerpc32/464/Implies (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/powerpc/powerpc32/476/Implies (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/powerpc/powerpc32/nofpu/Implies (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/ld.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libBrokenLocale.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libanl.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libcrypt.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libdl.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libm.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libnsl.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libpthread.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libresolv.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/librt.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libthread_db.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libutil.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/powerpc/powerpc32/nofpu/swapcontext.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/Makefile (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/Versions (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/bits/environments.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/bits/local_lim.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/bits/mman.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/bits/sigaction.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/bits/siginfo.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/cacheflush.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/configure (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/configure.in (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/getcontext.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/kernel-features.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/makecontext.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/nptl/Makefile (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/nptl/bits/pthreadtypes.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/nptl/bits/semaphore.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/nptl/clone.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/nptl/createthread.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/nptl/fork.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/nptl/lowlevellock.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/nptl/pt-vfork.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/nptl/pthread_once.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/nptl/sysdep-cancel.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/nptl/vfork.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/nptl/waitpid.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/profil-counter.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/set_dataplane.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/setcontext.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/sigcontextinfo.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/swapcontext.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/sys/cachectl.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/sys/dataplane.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/sys/procfs.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/sys/ptrace.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/sys/reg.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/sys/ucontext.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/sys/user.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/syscall.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/sysdep.c (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/sysdep.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilegx/Makefile (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilegx/ioctl.S (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilegx/ldconfig.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilegx/register-dump.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilegx/tilegx32/Implies (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilegx/tilegx32/Makefile (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilegx/tilegx32/nptl/ld.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libBrokenLocale.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libanl.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libc.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libcrypt.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libdl.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libm.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libnsl.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libpthread.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libresolv.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilegx/tilegx32/nptl/librt.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libthread_db.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libutil.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilegx/tilegx64/Implies (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilegx/tilegx64/Makefile (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilegx/tilegx64/nptl/ld.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libBrokenLocale.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libanl.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libc.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libcrypt.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libdl.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libm.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libnsl.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libpthread.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libresolv.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilegx/tilegx64/nptl/librt.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libthread_db.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libutil.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilepro/Implies (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilepro/ldconfig.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilepro/nptl/ld.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilepro/nptl/libBrokenLocale.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilepro/nptl/libanl.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilepro/nptl/libc.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilepro/nptl/libcrypt.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilepro/nptl/libdl.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilepro/nptl/libm.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilepro/nptl/libnsl.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilepro/nptl/libpthread.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilepro/nptl/libresolv.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilepro/nptl/librt.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilepro/nptl/libthread_db.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilepro/nptl/libutil.abilist (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/tilepro/register-dump.h (100%) rename {sysdeps => ports/sysdeps}/unix/sysv/linux/tile/ucontext_i.h (100%) diff --git a/.gitignore b/ports/.gitignore similarity index 100% rename from .gitignore rename to ports/.gitignore diff --git a/Banner b/ports/Banner similarity index 100% rename from Banner rename to ports/Banner diff --git a/ChangeLog b/ports/ChangeLog similarity index 100% rename from ChangeLog rename to ports/ChangeLog diff --git a/ChangeLog.aix b/ports/ChangeLog.aix similarity index 100% rename from ChangeLog.aix rename to ports/ChangeLog.aix diff --git a/ChangeLog.alpha b/ports/ChangeLog.alpha similarity index 100% rename from ChangeLog.alpha rename to ports/ChangeLog.alpha diff --git a/ChangeLog.am33 b/ports/ChangeLog.am33 similarity index 100% rename from ChangeLog.am33 rename to ports/ChangeLog.am33 diff --git a/ChangeLog.arm b/ports/ChangeLog.arm similarity index 100% rename from ChangeLog.arm rename to ports/ChangeLog.arm diff --git a/ChangeLog.cris b/ports/ChangeLog.cris similarity index 100% rename from ChangeLog.cris rename to ports/ChangeLog.cris diff --git a/ChangeLog.hppa b/ports/ChangeLog.hppa similarity index 100% rename from ChangeLog.hppa rename to ports/ChangeLog.hppa diff --git a/ChangeLog.ia64 b/ports/ChangeLog.ia64 similarity index 100% rename from ChangeLog.ia64 rename to ports/ChangeLog.ia64 diff --git a/ChangeLog.linux-generic b/ports/ChangeLog.linux-generic similarity index 100% rename from ChangeLog.linux-generic rename to ports/ChangeLog.linux-generic diff --git a/ChangeLog.m68k b/ports/ChangeLog.m68k similarity index 100% rename from ChangeLog.m68k rename to ports/ChangeLog.m68k diff --git a/ChangeLog.mips b/ports/ChangeLog.mips similarity index 100% rename from ChangeLog.mips rename to ports/ChangeLog.mips diff --git a/ChangeLog.powerpc b/ports/ChangeLog.powerpc similarity index 100% rename from ChangeLog.powerpc rename to ports/ChangeLog.powerpc diff --git a/ChangeLog.tile b/ports/ChangeLog.tile similarity index 100% rename from ChangeLog.tile rename to ports/ChangeLog.tile diff --git a/Makefile b/ports/Makefile similarity index 100% rename from Makefile rename to ports/Makefile diff --git a/README b/ports/README similarity index 100% rename from README rename to ports/README diff --git a/data/c++-types-arm-linux-gnueabi.data b/ports/data/c++-types-arm-linux-gnueabi.data similarity index 100% rename from data/c++-types-arm-linux-gnueabi.data rename to ports/data/c++-types-arm-linux-gnueabi.data diff --git a/data/c++-types-m68k-linux-gnu.data b/ports/data/c++-types-m68k-linux-gnu.data similarity index 100% rename from data/c++-types-m68k-linux-gnu.data rename to ports/data/c++-types-m68k-linux-gnu.data diff --git a/data/c++-types-powerpcsoft-linux-gnu.data b/ports/data/c++-types-powerpcsoft-linux-gnu.data similarity index 100% rename from data/c++-types-powerpcsoft-linux-gnu.data rename to ports/data/c++-types-powerpcsoft-linux-gnu.data diff --git a/data/c++-types-tilegx-linux-gnu.data b/ports/data/c++-types-tilegx-linux-gnu.data similarity index 100% rename from data/c++-types-tilegx-linux-gnu.data rename to ports/data/c++-types-tilegx-linux-gnu.data diff --git a/data/c++-types-tilepro-linux-gnu.data b/ports/data/c++-types-tilepro-linux-gnu.data similarity index 100% rename from data/c++-types-tilepro-linux-gnu.data rename to ports/data/c++-types-tilepro-linux-gnu.data diff --git a/data/localplt-alpha-linux-gnu.data b/ports/data/localplt-alpha-linux-gnu.data similarity index 100% rename from data/localplt-alpha-linux-gnu.data rename to ports/data/localplt-alpha-linux-gnu.data diff --git a/data/localplt-arm-linux-gnueabi.data b/ports/data/localplt-arm-linux-gnueabi.data similarity index 100% rename from data/localplt-arm-linux-gnueabi.data rename to ports/data/localplt-arm-linux-gnueabi.data diff --git a/data/localplt-ia64-linux-gnu.data b/ports/data/localplt-ia64-linux-gnu.data similarity index 100% rename from data/localplt-ia64-linux-gnu.data rename to ports/data/localplt-ia64-linux-gnu.data diff --git a/data/localplt-m68k-linux-gnu.data b/ports/data/localplt-m68k-linux-gnu.data similarity index 100% rename from data/localplt-m68k-linux-gnu.data rename to ports/data/localplt-m68k-linux-gnu.data diff --git a/data/localplt-powerpcsoft-linux-gnu.data b/ports/data/localplt-powerpcsoft-linux-gnu.data similarity index 100% rename from data/localplt-powerpcsoft-linux-gnu.data rename to ports/data/localplt-powerpcsoft-linux-gnu.data diff --git a/sysdeps/alpha/Implies b/ports/sysdeps/alpha/Implies similarity index 100% rename from sysdeps/alpha/Implies rename to ports/sysdeps/alpha/Implies diff --git a/sysdeps/alpha/Makefile b/ports/sysdeps/alpha/Makefile similarity index 100% rename from sysdeps/alpha/Makefile rename to ports/sysdeps/alpha/Makefile diff --git a/sysdeps/alpha/Subdirs b/ports/sysdeps/alpha/Subdirs similarity index 100% rename from sysdeps/alpha/Subdirs rename to ports/sysdeps/alpha/Subdirs diff --git a/sysdeps/alpha/Versions b/ports/sysdeps/alpha/Versions similarity index 100% rename from sysdeps/alpha/Versions rename to ports/sysdeps/alpha/Versions diff --git a/sysdeps/alpha/__longjmp.S b/ports/sysdeps/alpha/__longjmp.S similarity index 100% rename from sysdeps/alpha/__longjmp.S rename to ports/sysdeps/alpha/__longjmp.S diff --git a/sysdeps/alpha/_mcount.S b/ports/sysdeps/alpha/_mcount.S similarity index 100% rename from sysdeps/alpha/_mcount.S rename to ports/sysdeps/alpha/_mcount.S diff --git a/sysdeps/alpha/add_n.S b/ports/sysdeps/alpha/add_n.S similarity index 100% rename from sysdeps/alpha/add_n.S rename to ports/sysdeps/alpha/add_n.S diff --git a/sysdeps/alpha/addmul_1.S b/ports/sysdeps/alpha/addmul_1.S similarity index 100% rename from sysdeps/alpha/addmul_1.S rename to ports/sysdeps/alpha/addmul_1.S diff --git a/sysdeps/alpha/alphaev5/add_n.S b/ports/sysdeps/alpha/alphaev5/add_n.S similarity index 100% rename from sysdeps/alpha/alphaev5/add_n.S rename to ports/sysdeps/alpha/alphaev5/add_n.S diff --git a/sysdeps/alpha/alphaev5/lshift.S b/ports/sysdeps/alpha/alphaev5/lshift.S similarity index 100% rename from sysdeps/alpha/alphaev5/lshift.S rename to ports/sysdeps/alpha/alphaev5/lshift.S diff --git a/sysdeps/alpha/alphaev5/rshift.S b/ports/sysdeps/alpha/alphaev5/rshift.S similarity index 100% rename from sysdeps/alpha/alphaev5/rshift.S rename to ports/sysdeps/alpha/alphaev5/rshift.S diff --git a/sysdeps/alpha/alphaev5/sub_n.S b/ports/sysdeps/alpha/alphaev5/sub_n.S similarity index 100% rename from sysdeps/alpha/alphaev5/sub_n.S rename to ports/sysdeps/alpha/alphaev5/sub_n.S diff --git a/sysdeps/alpha/alphaev6/Implies b/ports/sysdeps/alpha/alphaev6/Implies similarity index 100% rename from sysdeps/alpha/alphaev6/Implies rename to ports/sysdeps/alpha/alphaev6/Implies diff --git a/sysdeps/alpha/alphaev6/addmul_1.S b/ports/sysdeps/alpha/alphaev6/addmul_1.S similarity index 100% rename from sysdeps/alpha/alphaev6/addmul_1.S rename to ports/sysdeps/alpha/alphaev6/addmul_1.S diff --git a/sysdeps/alpha/alphaev6/fpu/e_sqrt.S b/ports/sysdeps/alpha/alphaev6/fpu/e_sqrt.S similarity index 100% rename from sysdeps/alpha/alphaev6/fpu/e_sqrt.S rename to ports/sysdeps/alpha/alphaev6/fpu/e_sqrt.S diff --git a/sysdeps/alpha/alphaev6/fpu/e_sqrtf.S b/ports/sysdeps/alpha/alphaev6/fpu/e_sqrtf.S similarity index 100% rename from sysdeps/alpha/alphaev6/fpu/e_sqrtf.S rename to ports/sysdeps/alpha/alphaev6/fpu/e_sqrtf.S diff --git a/sysdeps/alpha/alphaev6/memcpy.S b/ports/sysdeps/alpha/alphaev6/memcpy.S similarity index 100% rename from sysdeps/alpha/alphaev6/memcpy.S rename to ports/sysdeps/alpha/alphaev6/memcpy.S diff --git a/sysdeps/alpha/alphaev6/memset.S b/ports/sysdeps/alpha/alphaev6/memset.S similarity index 100% rename from sysdeps/alpha/alphaev6/memset.S rename to ports/sysdeps/alpha/alphaev6/memset.S diff --git a/sysdeps/alpha/alphaev6/stxcpy.S b/ports/sysdeps/alpha/alphaev6/stxcpy.S similarity index 100% rename from sysdeps/alpha/alphaev6/stxcpy.S rename to ports/sysdeps/alpha/alphaev6/stxcpy.S diff --git a/sysdeps/alpha/alphaev6/stxncpy.S b/ports/sysdeps/alpha/alphaev6/stxncpy.S similarity index 100% rename from sysdeps/alpha/alphaev6/stxncpy.S rename to ports/sysdeps/alpha/alphaev6/stxncpy.S diff --git a/sysdeps/alpha/alphaev67/Implies b/ports/sysdeps/alpha/alphaev67/Implies similarity index 100% rename from sysdeps/alpha/alphaev67/Implies rename to ports/sysdeps/alpha/alphaev67/Implies diff --git a/sysdeps/alpha/alphaev67/ffs.S b/ports/sysdeps/alpha/alphaev67/ffs.S similarity index 100% rename from sysdeps/alpha/alphaev67/ffs.S rename to ports/sysdeps/alpha/alphaev67/ffs.S diff --git a/sysdeps/alpha/alphaev67/ffsll.S b/ports/sysdeps/alpha/alphaev67/ffsll.S similarity index 100% rename from sysdeps/alpha/alphaev67/ffsll.S rename to ports/sysdeps/alpha/alphaev67/ffsll.S diff --git a/sysdeps/alpha/alphaev67/fpu/Implies b/ports/sysdeps/alpha/alphaev67/fpu/Implies similarity index 100% rename from sysdeps/alpha/alphaev67/fpu/Implies rename to ports/sysdeps/alpha/alphaev67/fpu/Implies diff --git a/sysdeps/alpha/alphaev67/rawmemchr.S b/ports/sysdeps/alpha/alphaev67/rawmemchr.S similarity index 100% rename from sysdeps/alpha/alphaev67/rawmemchr.S rename to ports/sysdeps/alpha/alphaev67/rawmemchr.S diff --git a/sysdeps/alpha/alphaev67/stpcpy.S b/ports/sysdeps/alpha/alphaev67/stpcpy.S similarity index 100% rename from sysdeps/alpha/alphaev67/stpcpy.S rename to ports/sysdeps/alpha/alphaev67/stpcpy.S diff --git a/sysdeps/alpha/alphaev67/stpncpy.S b/ports/sysdeps/alpha/alphaev67/stpncpy.S similarity index 100% rename from sysdeps/alpha/alphaev67/stpncpy.S rename to ports/sysdeps/alpha/alphaev67/stpncpy.S diff --git a/sysdeps/alpha/alphaev67/strcat.S b/ports/sysdeps/alpha/alphaev67/strcat.S similarity index 100% rename from sysdeps/alpha/alphaev67/strcat.S rename to ports/sysdeps/alpha/alphaev67/strcat.S diff --git a/sysdeps/alpha/alphaev67/strchr.S b/ports/sysdeps/alpha/alphaev67/strchr.S similarity index 100% rename from sysdeps/alpha/alphaev67/strchr.S rename to ports/sysdeps/alpha/alphaev67/strchr.S diff --git a/sysdeps/alpha/alphaev67/strlen.S b/ports/sysdeps/alpha/alphaev67/strlen.S similarity index 100% rename from sysdeps/alpha/alphaev67/strlen.S rename to ports/sysdeps/alpha/alphaev67/strlen.S diff --git a/sysdeps/alpha/alphaev67/strncat.S b/ports/sysdeps/alpha/alphaev67/strncat.S similarity index 100% rename from sysdeps/alpha/alphaev67/strncat.S rename to ports/sysdeps/alpha/alphaev67/strncat.S diff --git a/sysdeps/alpha/alphaev67/strrchr.S b/ports/sysdeps/alpha/alphaev67/strrchr.S similarity index 100% rename from sysdeps/alpha/alphaev67/strrchr.S rename to ports/sysdeps/alpha/alphaev67/strrchr.S diff --git a/sysdeps/alpha/backtrace.c b/ports/sysdeps/alpha/backtrace.c similarity index 100% rename from sysdeps/alpha/backtrace.c rename to ports/sysdeps/alpha/backtrace.c diff --git a/sysdeps/alpha/bb_init_func.S b/ports/sysdeps/alpha/bb_init_func.S similarity index 100% rename from sysdeps/alpha/bb_init_func.S rename to ports/sysdeps/alpha/bb_init_func.S diff --git a/sysdeps/alpha/bits/atomic.h b/ports/sysdeps/alpha/bits/atomic.h similarity index 100% rename from sysdeps/alpha/bits/atomic.h rename to ports/sysdeps/alpha/bits/atomic.h diff --git a/sysdeps/alpha/bits/endian.h b/ports/sysdeps/alpha/bits/endian.h similarity index 100% rename from sysdeps/alpha/bits/endian.h rename to ports/sysdeps/alpha/bits/endian.h diff --git a/sysdeps/alpha/bits/link.h b/ports/sysdeps/alpha/bits/link.h similarity index 100% rename from sysdeps/alpha/bits/link.h rename to ports/sysdeps/alpha/bits/link.h diff --git a/sysdeps/alpha/bits/mathdef.h b/ports/sysdeps/alpha/bits/mathdef.h similarity index 100% rename from sysdeps/alpha/bits/mathdef.h rename to ports/sysdeps/alpha/bits/mathdef.h diff --git a/sysdeps/alpha/bits/setjmp.h b/ports/sysdeps/alpha/bits/setjmp.h similarity index 100% rename from sysdeps/alpha/bits/setjmp.h rename to ports/sysdeps/alpha/bits/setjmp.h diff --git a/sysdeps/alpha/bsd-_setjmp.S b/ports/sysdeps/alpha/bsd-_setjmp.S similarity index 100% rename from sysdeps/alpha/bsd-_setjmp.S rename to ports/sysdeps/alpha/bsd-_setjmp.S diff --git a/sysdeps/alpha/bsd-setjmp.S b/ports/sysdeps/alpha/bsd-setjmp.S similarity index 100% rename from sysdeps/alpha/bsd-setjmp.S rename to ports/sysdeps/alpha/bsd-setjmp.S diff --git a/sysdeps/alpha/bzero.S b/ports/sysdeps/alpha/bzero.S similarity index 100% rename from sysdeps/alpha/bzero.S rename to ports/sysdeps/alpha/bzero.S diff --git a/sysdeps/alpha/configure b/ports/sysdeps/alpha/configure similarity index 100% rename from sysdeps/alpha/configure rename to ports/sysdeps/alpha/configure diff --git a/sysdeps/alpha/configure.in b/ports/sysdeps/alpha/configure.in similarity index 100% rename from sysdeps/alpha/configure.in rename to ports/sysdeps/alpha/configure.in diff --git a/sysdeps/alpha/crti.S b/ports/sysdeps/alpha/crti.S similarity index 100% rename from sysdeps/alpha/crti.S rename to ports/sysdeps/alpha/crti.S diff --git a/sysdeps/alpha/crtn.S b/ports/sysdeps/alpha/crtn.S similarity index 100% rename from sysdeps/alpha/crtn.S rename to ports/sysdeps/alpha/crtn.S diff --git a/sysdeps/alpha/div.S b/ports/sysdeps/alpha/div.S similarity index 100% rename from sysdeps/alpha/div.S rename to ports/sysdeps/alpha/div.S diff --git a/sysdeps/alpha/div_libc.h b/ports/sysdeps/alpha/div_libc.h similarity index 100% rename from sysdeps/alpha/div_libc.h rename to ports/sysdeps/alpha/div_libc.h diff --git a/sysdeps/alpha/divl.S b/ports/sysdeps/alpha/divl.S similarity index 100% rename from sysdeps/alpha/divl.S rename to ports/sysdeps/alpha/divl.S diff --git a/sysdeps/alpha/divlu.S b/ports/sysdeps/alpha/divlu.S similarity index 100% rename from sysdeps/alpha/divlu.S rename to ports/sysdeps/alpha/divlu.S diff --git a/sysdeps/alpha/divq.S b/ports/sysdeps/alpha/divq.S similarity index 100% rename from sysdeps/alpha/divq.S rename to ports/sysdeps/alpha/divq.S diff --git a/sysdeps/alpha/divqu.S b/ports/sysdeps/alpha/divqu.S similarity index 100% rename from sysdeps/alpha/divqu.S rename to ports/sysdeps/alpha/divqu.S diff --git a/sysdeps/alpha/dl-dtprocnum.h b/ports/sysdeps/alpha/dl-dtprocnum.h similarity index 100% rename from sysdeps/alpha/dl-dtprocnum.h rename to ports/sysdeps/alpha/dl-dtprocnum.h diff --git a/sysdeps/alpha/dl-machine.h b/ports/sysdeps/alpha/dl-machine.h similarity index 100% rename from sysdeps/alpha/dl-machine.h rename to ports/sysdeps/alpha/dl-machine.h diff --git a/sysdeps/alpha/dl-procinfo.c b/ports/sysdeps/alpha/dl-procinfo.c similarity index 100% rename from sysdeps/alpha/dl-procinfo.c rename to ports/sysdeps/alpha/dl-procinfo.c diff --git a/sysdeps/alpha/dl-procinfo.h b/ports/sysdeps/alpha/dl-procinfo.h similarity index 100% rename from sysdeps/alpha/dl-procinfo.h rename to ports/sysdeps/alpha/dl-procinfo.h diff --git a/sysdeps/alpha/dl-sysdep.h b/ports/sysdeps/alpha/dl-sysdep.h similarity index 100% rename from sysdeps/alpha/dl-sysdep.h rename to ports/sysdeps/alpha/dl-sysdep.h diff --git a/sysdeps/alpha/dl-tls.h b/ports/sysdeps/alpha/dl-tls.h similarity index 100% rename from sysdeps/alpha/dl-tls.h rename to ports/sysdeps/alpha/dl-tls.h diff --git a/sysdeps/alpha/dl-trampoline.S b/ports/sysdeps/alpha/dl-trampoline.S similarity index 100% rename from sysdeps/alpha/dl-trampoline.S rename to ports/sysdeps/alpha/dl-trampoline.S diff --git a/sysdeps/alpha/ffs.S b/ports/sysdeps/alpha/ffs.S similarity index 100% rename from sysdeps/alpha/ffs.S rename to ports/sysdeps/alpha/ffs.S diff --git a/sysdeps/alpha/ffsll.S b/ports/sysdeps/alpha/ffsll.S similarity index 100% rename from sysdeps/alpha/ffsll.S rename to ports/sysdeps/alpha/ffsll.S diff --git a/sysdeps/alpha/fpu/Versions b/ports/sysdeps/alpha/fpu/Versions similarity index 100% rename from sysdeps/alpha/fpu/Versions rename to ports/sysdeps/alpha/fpu/Versions diff --git a/sysdeps/alpha/fpu/bits/fenv.h b/ports/sysdeps/alpha/fpu/bits/fenv.h similarity index 100% rename from sysdeps/alpha/fpu/bits/fenv.h rename to ports/sysdeps/alpha/fpu/bits/fenv.h diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/ports/sysdeps/alpha/fpu/bits/mathinline.h similarity index 100% rename from sysdeps/alpha/fpu/bits/mathinline.h rename to ports/sysdeps/alpha/fpu/bits/mathinline.h diff --git a/sysdeps/alpha/fpu/cabsf.c b/ports/sysdeps/alpha/fpu/cabsf.c similarity index 100% rename from sysdeps/alpha/fpu/cabsf.c rename to ports/sysdeps/alpha/fpu/cabsf.c diff --git a/sysdeps/alpha/fpu/cargf.c b/ports/sysdeps/alpha/fpu/cargf.c similarity index 100% rename from sysdeps/alpha/fpu/cargf.c rename to ports/sysdeps/alpha/fpu/cargf.c diff --git a/sysdeps/alpha/fpu/cfloat-compat.h b/ports/sysdeps/alpha/fpu/cfloat-compat.h similarity index 100% rename from sysdeps/alpha/fpu/cfloat-compat.h rename to ports/sysdeps/alpha/fpu/cfloat-compat.h diff --git a/sysdeps/alpha/fpu/cimagf.c b/ports/sysdeps/alpha/fpu/cimagf.c similarity index 100% rename from sysdeps/alpha/fpu/cimagf.c rename to ports/sysdeps/alpha/fpu/cimagf.c diff --git a/sysdeps/alpha/fpu/conjf.c b/ports/sysdeps/alpha/fpu/conjf.c similarity index 100% rename from sysdeps/alpha/fpu/conjf.c rename to ports/sysdeps/alpha/fpu/conjf.c diff --git a/sysdeps/alpha/fpu/crealf.c b/ports/sysdeps/alpha/fpu/crealf.c similarity index 100% rename from sysdeps/alpha/fpu/crealf.c rename to ports/sysdeps/alpha/fpu/crealf.c diff --git a/sysdeps/alpha/fpu/e_sqrt.c b/ports/sysdeps/alpha/fpu/e_sqrt.c similarity index 100% rename from sysdeps/alpha/fpu/e_sqrt.c rename to ports/sysdeps/alpha/fpu/e_sqrt.c diff --git a/sysdeps/alpha/fpu/fclrexcpt.c b/ports/sysdeps/alpha/fpu/fclrexcpt.c similarity index 100% rename from sysdeps/alpha/fpu/fclrexcpt.c rename to ports/sysdeps/alpha/fpu/fclrexcpt.c diff --git a/sysdeps/alpha/fpu/fedisblxcpt.c b/ports/sysdeps/alpha/fpu/fedisblxcpt.c similarity index 100% rename from sysdeps/alpha/fpu/fedisblxcpt.c rename to ports/sysdeps/alpha/fpu/fedisblxcpt.c diff --git a/sysdeps/alpha/fpu/feenablxcpt.c b/ports/sysdeps/alpha/fpu/feenablxcpt.c similarity index 100% rename from sysdeps/alpha/fpu/feenablxcpt.c rename to ports/sysdeps/alpha/fpu/feenablxcpt.c diff --git a/sysdeps/alpha/fpu/fegetenv.c b/ports/sysdeps/alpha/fpu/fegetenv.c similarity index 100% rename from sysdeps/alpha/fpu/fegetenv.c rename to ports/sysdeps/alpha/fpu/fegetenv.c diff --git a/sysdeps/alpha/fpu/fegetexcept.c b/ports/sysdeps/alpha/fpu/fegetexcept.c similarity index 100% rename from sysdeps/alpha/fpu/fegetexcept.c rename to ports/sysdeps/alpha/fpu/fegetexcept.c diff --git a/sysdeps/alpha/fpu/fegetround.c b/ports/sysdeps/alpha/fpu/fegetround.c similarity index 100% rename from sysdeps/alpha/fpu/fegetround.c rename to ports/sysdeps/alpha/fpu/fegetround.c diff --git a/sysdeps/alpha/fpu/feholdexcpt.c b/ports/sysdeps/alpha/fpu/feholdexcpt.c similarity index 100% rename from sysdeps/alpha/fpu/feholdexcpt.c rename to ports/sysdeps/alpha/fpu/feholdexcpt.c diff --git a/sysdeps/alpha/fpu/fenv_libc.h b/ports/sysdeps/alpha/fpu/fenv_libc.h similarity index 100% rename from sysdeps/alpha/fpu/fenv_libc.h rename to ports/sysdeps/alpha/fpu/fenv_libc.h diff --git a/sysdeps/alpha/fpu/fesetenv.c b/ports/sysdeps/alpha/fpu/fesetenv.c similarity index 100% rename from sysdeps/alpha/fpu/fesetenv.c rename to ports/sysdeps/alpha/fpu/fesetenv.c diff --git a/sysdeps/alpha/fpu/fesetround.c b/ports/sysdeps/alpha/fpu/fesetround.c similarity index 100% rename from sysdeps/alpha/fpu/fesetround.c rename to ports/sysdeps/alpha/fpu/fesetround.c diff --git a/sysdeps/alpha/fpu/feupdateenv.c b/ports/sysdeps/alpha/fpu/feupdateenv.c similarity index 100% rename from sysdeps/alpha/fpu/feupdateenv.c rename to ports/sysdeps/alpha/fpu/feupdateenv.c diff --git a/sysdeps/alpha/fpu/fgetexcptflg.c b/ports/sysdeps/alpha/fpu/fgetexcptflg.c similarity index 100% rename from sysdeps/alpha/fpu/fgetexcptflg.c rename to ports/sysdeps/alpha/fpu/fgetexcptflg.c diff --git a/sysdeps/alpha/fpu/fpu_control.h b/ports/sysdeps/alpha/fpu/fpu_control.h similarity index 100% rename from sysdeps/alpha/fpu/fpu_control.h rename to ports/sysdeps/alpha/fpu/fpu_control.h diff --git a/sysdeps/alpha/fpu/fsetexcptflg.c b/ports/sysdeps/alpha/fpu/fsetexcptflg.c similarity index 100% rename from sysdeps/alpha/fpu/fsetexcptflg.c rename to ports/sysdeps/alpha/fpu/fsetexcptflg.c diff --git a/sysdeps/alpha/fpu/ftestexcept.c b/ports/sysdeps/alpha/fpu/ftestexcept.c similarity index 100% rename from sysdeps/alpha/fpu/ftestexcept.c rename to ports/sysdeps/alpha/fpu/ftestexcept.c diff --git a/sysdeps/alpha/fpu/libm-test-ulps b/ports/sysdeps/alpha/fpu/libm-test-ulps similarity index 100% rename from sysdeps/alpha/fpu/libm-test-ulps rename to ports/sysdeps/alpha/fpu/libm-test-ulps diff --git a/sysdeps/alpha/fpu/math_private.h b/ports/sysdeps/alpha/fpu/math_private.h similarity index 100% rename from sysdeps/alpha/fpu/math_private.h rename to ports/sysdeps/alpha/fpu/math_private.h diff --git a/sysdeps/alpha/fpu/s_cacosf.c b/ports/sysdeps/alpha/fpu/s_cacosf.c similarity index 100% rename from sysdeps/alpha/fpu/s_cacosf.c rename to ports/sysdeps/alpha/fpu/s_cacosf.c diff --git a/sysdeps/alpha/fpu/s_cacoshf.c b/ports/sysdeps/alpha/fpu/s_cacoshf.c similarity index 100% rename from sysdeps/alpha/fpu/s_cacoshf.c rename to ports/sysdeps/alpha/fpu/s_cacoshf.c diff --git a/sysdeps/alpha/fpu/s_casinf.c b/ports/sysdeps/alpha/fpu/s_casinf.c similarity index 100% rename from sysdeps/alpha/fpu/s_casinf.c rename to ports/sysdeps/alpha/fpu/s_casinf.c diff --git a/sysdeps/alpha/fpu/s_casinhf.c b/ports/sysdeps/alpha/fpu/s_casinhf.c similarity index 100% rename from sysdeps/alpha/fpu/s_casinhf.c rename to ports/sysdeps/alpha/fpu/s_casinhf.c diff --git a/sysdeps/alpha/fpu/s_catanf.c b/ports/sysdeps/alpha/fpu/s_catanf.c similarity index 100% rename from sysdeps/alpha/fpu/s_catanf.c rename to ports/sysdeps/alpha/fpu/s_catanf.c diff --git a/sysdeps/alpha/fpu/s_catanhf.c b/ports/sysdeps/alpha/fpu/s_catanhf.c similarity index 100% rename from sysdeps/alpha/fpu/s_catanhf.c rename to ports/sysdeps/alpha/fpu/s_catanhf.c diff --git a/sysdeps/alpha/fpu/s_ccosf.c b/ports/sysdeps/alpha/fpu/s_ccosf.c similarity index 100% rename from sysdeps/alpha/fpu/s_ccosf.c rename to ports/sysdeps/alpha/fpu/s_ccosf.c diff --git a/sysdeps/alpha/fpu/s_ccoshf.c b/ports/sysdeps/alpha/fpu/s_ccoshf.c similarity index 100% rename from sysdeps/alpha/fpu/s_ccoshf.c rename to ports/sysdeps/alpha/fpu/s_ccoshf.c diff --git a/sysdeps/alpha/fpu/s_ceil.c b/ports/sysdeps/alpha/fpu/s_ceil.c similarity index 100% rename from sysdeps/alpha/fpu/s_ceil.c rename to ports/sysdeps/alpha/fpu/s_ceil.c diff --git a/sysdeps/alpha/fpu/s_ceilf.c b/ports/sysdeps/alpha/fpu/s_ceilf.c similarity index 100% rename from sysdeps/alpha/fpu/s_ceilf.c rename to ports/sysdeps/alpha/fpu/s_ceilf.c diff --git a/sysdeps/alpha/fpu/s_cexpf.c b/ports/sysdeps/alpha/fpu/s_cexpf.c similarity index 100% rename from sysdeps/alpha/fpu/s_cexpf.c rename to ports/sysdeps/alpha/fpu/s_cexpf.c diff --git a/sysdeps/alpha/fpu/s_clog10f.c b/ports/sysdeps/alpha/fpu/s_clog10f.c similarity index 100% rename from sysdeps/alpha/fpu/s_clog10f.c rename to ports/sysdeps/alpha/fpu/s_clog10f.c diff --git a/sysdeps/alpha/fpu/s_clogf.c b/ports/sysdeps/alpha/fpu/s_clogf.c similarity index 100% rename from sysdeps/alpha/fpu/s_clogf.c rename to ports/sysdeps/alpha/fpu/s_clogf.c diff --git a/sysdeps/alpha/fpu/s_copysign.c b/ports/sysdeps/alpha/fpu/s_copysign.c similarity index 100% rename from sysdeps/alpha/fpu/s_copysign.c rename to ports/sysdeps/alpha/fpu/s_copysign.c diff --git a/sysdeps/alpha/fpu/s_copysignf.c b/ports/sysdeps/alpha/fpu/s_copysignf.c similarity index 100% rename from sysdeps/alpha/fpu/s_copysignf.c rename to ports/sysdeps/alpha/fpu/s_copysignf.c diff --git a/sysdeps/alpha/fpu/s_cpowf.c b/ports/sysdeps/alpha/fpu/s_cpowf.c similarity index 100% rename from sysdeps/alpha/fpu/s_cpowf.c rename to ports/sysdeps/alpha/fpu/s_cpowf.c diff --git a/sysdeps/alpha/fpu/s_cprojf.c b/ports/sysdeps/alpha/fpu/s_cprojf.c similarity index 100% rename from sysdeps/alpha/fpu/s_cprojf.c rename to ports/sysdeps/alpha/fpu/s_cprojf.c diff --git a/sysdeps/alpha/fpu/s_csinf.c b/ports/sysdeps/alpha/fpu/s_csinf.c similarity index 100% rename from sysdeps/alpha/fpu/s_csinf.c rename to ports/sysdeps/alpha/fpu/s_csinf.c diff --git a/sysdeps/alpha/fpu/s_csinhf.c b/ports/sysdeps/alpha/fpu/s_csinhf.c similarity index 100% rename from sysdeps/alpha/fpu/s_csinhf.c rename to ports/sysdeps/alpha/fpu/s_csinhf.c diff --git a/sysdeps/alpha/fpu/s_csqrtf.c b/ports/sysdeps/alpha/fpu/s_csqrtf.c similarity index 100% rename from sysdeps/alpha/fpu/s_csqrtf.c rename to ports/sysdeps/alpha/fpu/s_csqrtf.c diff --git a/sysdeps/alpha/fpu/s_ctanf.c b/ports/sysdeps/alpha/fpu/s_ctanf.c similarity index 100% rename from sysdeps/alpha/fpu/s_ctanf.c rename to ports/sysdeps/alpha/fpu/s_ctanf.c diff --git a/sysdeps/alpha/fpu/s_ctanhf.c b/ports/sysdeps/alpha/fpu/s_ctanhf.c similarity index 100% rename from sysdeps/alpha/fpu/s_ctanhf.c rename to ports/sysdeps/alpha/fpu/s_ctanhf.c diff --git a/sysdeps/alpha/fpu/s_fabs.c b/ports/sysdeps/alpha/fpu/s_fabs.c similarity index 100% rename from sysdeps/alpha/fpu/s_fabs.c rename to ports/sysdeps/alpha/fpu/s_fabs.c diff --git a/sysdeps/alpha/fpu/s_fabsf.c b/ports/sysdeps/alpha/fpu/s_fabsf.c similarity index 100% rename from sysdeps/alpha/fpu/s_fabsf.c rename to ports/sysdeps/alpha/fpu/s_fabsf.c diff --git a/sysdeps/alpha/fpu/s_floor.c b/ports/sysdeps/alpha/fpu/s_floor.c similarity index 100% rename from sysdeps/alpha/fpu/s_floor.c rename to ports/sysdeps/alpha/fpu/s_floor.c diff --git a/sysdeps/alpha/fpu/s_floorf.c b/ports/sysdeps/alpha/fpu/s_floorf.c similarity index 100% rename from sysdeps/alpha/fpu/s_floorf.c rename to ports/sysdeps/alpha/fpu/s_floorf.c diff --git a/sysdeps/alpha/fpu/s_fmax.S b/ports/sysdeps/alpha/fpu/s_fmax.S similarity index 100% rename from sysdeps/alpha/fpu/s_fmax.S rename to ports/sysdeps/alpha/fpu/s_fmax.S diff --git a/sysdeps/alpha/fpu/s_fmaxf.S b/ports/sysdeps/alpha/fpu/s_fmaxf.S similarity index 100% rename from sysdeps/alpha/fpu/s_fmaxf.S rename to ports/sysdeps/alpha/fpu/s_fmaxf.S diff --git a/sysdeps/alpha/fpu/s_fmin.S b/ports/sysdeps/alpha/fpu/s_fmin.S similarity index 100% rename from sysdeps/alpha/fpu/s_fmin.S rename to ports/sysdeps/alpha/fpu/s_fmin.S diff --git a/sysdeps/alpha/fpu/s_fminf.S b/ports/sysdeps/alpha/fpu/s_fminf.S similarity index 100% rename from sysdeps/alpha/fpu/s_fminf.S rename to ports/sysdeps/alpha/fpu/s_fminf.S diff --git a/sysdeps/alpha/fpu/s_isnan.c b/ports/sysdeps/alpha/fpu/s_isnan.c similarity index 100% rename from sysdeps/alpha/fpu/s_isnan.c rename to ports/sysdeps/alpha/fpu/s_isnan.c diff --git a/sysdeps/alpha/fpu/s_isnanf.c b/ports/sysdeps/alpha/fpu/s_isnanf.c similarity index 100% rename from sysdeps/alpha/fpu/s_isnanf.c rename to ports/sysdeps/alpha/fpu/s_isnanf.c diff --git a/sysdeps/alpha/fpu/s_llrint.c b/ports/sysdeps/alpha/fpu/s_llrint.c similarity index 100% rename from sysdeps/alpha/fpu/s_llrint.c rename to ports/sysdeps/alpha/fpu/s_llrint.c diff --git a/sysdeps/alpha/fpu/s_llrintf.c b/ports/sysdeps/alpha/fpu/s_llrintf.c similarity index 100% rename from sysdeps/alpha/fpu/s_llrintf.c rename to ports/sysdeps/alpha/fpu/s_llrintf.c diff --git a/sysdeps/alpha/fpu/s_llround.c b/ports/sysdeps/alpha/fpu/s_llround.c similarity index 100% rename from sysdeps/alpha/fpu/s_llround.c rename to ports/sysdeps/alpha/fpu/s_llround.c diff --git a/sysdeps/alpha/fpu/s_llroundf.c b/ports/sysdeps/alpha/fpu/s_llroundf.c similarity index 100% rename from sysdeps/alpha/fpu/s_llroundf.c rename to ports/sysdeps/alpha/fpu/s_llroundf.c diff --git a/sysdeps/alpha/fpu/s_lrint.c b/ports/sysdeps/alpha/fpu/s_lrint.c similarity index 100% rename from sysdeps/alpha/fpu/s_lrint.c rename to ports/sysdeps/alpha/fpu/s_lrint.c diff --git a/sysdeps/alpha/fpu/s_lrintf.c b/ports/sysdeps/alpha/fpu/s_lrintf.c similarity index 100% rename from sysdeps/alpha/fpu/s_lrintf.c rename to ports/sysdeps/alpha/fpu/s_lrintf.c diff --git a/sysdeps/alpha/fpu/s_lround.c b/ports/sysdeps/alpha/fpu/s_lround.c similarity index 100% rename from sysdeps/alpha/fpu/s_lround.c rename to ports/sysdeps/alpha/fpu/s_lround.c diff --git a/sysdeps/alpha/fpu/s_lroundf.c b/ports/sysdeps/alpha/fpu/s_lroundf.c similarity index 100% rename from sysdeps/alpha/fpu/s_lroundf.c rename to ports/sysdeps/alpha/fpu/s_lroundf.c diff --git a/sysdeps/alpha/fpu/s_nearbyint.c b/ports/sysdeps/alpha/fpu/s_nearbyint.c similarity index 100% rename from sysdeps/alpha/fpu/s_nearbyint.c rename to ports/sysdeps/alpha/fpu/s_nearbyint.c diff --git a/sysdeps/alpha/fpu/s_nearbyintf.c b/ports/sysdeps/alpha/fpu/s_nearbyintf.c similarity index 100% rename from sysdeps/alpha/fpu/s_nearbyintf.c rename to ports/sysdeps/alpha/fpu/s_nearbyintf.c diff --git a/sysdeps/alpha/fpu/s_rint.c b/ports/sysdeps/alpha/fpu/s_rint.c similarity index 100% rename from sysdeps/alpha/fpu/s_rint.c rename to ports/sysdeps/alpha/fpu/s_rint.c diff --git a/sysdeps/alpha/fpu/s_rintf.c b/ports/sysdeps/alpha/fpu/s_rintf.c similarity index 100% rename from sysdeps/alpha/fpu/s_rintf.c rename to ports/sysdeps/alpha/fpu/s_rintf.c diff --git a/sysdeps/alpha/fpu/s_round.c b/ports/sysdeps/alpha/fpu/s_round.c similarity index 100% rename from sysdeps/alpha/fpu/s_round.c rename to ports/sysdeps/alpha/fpu/s_round.c diff --git a/sysdeps/alpha/fpu/s_roundf.c b/ports/sysdeps/alpha/fpu/s_roundf.c similarity index 100% rename from sysdeps/alpha/fpu/s_roundf.c rename to ports/sysdeps/alpha/fpu/s_roundf.c diff --git a/sysdeps/alpha/fpu/s_trunc.c b/ports/sysdeps/alpha/fpu/s_trunc.c similarity index 100% rename from sysdeps/alpha/fpu/s_trunc.c rename to ports/sysdeps/alpha/fpu/s_trunc.c diff --git a/sysdeps/alpha/fpu/s_truncf.c b/ports/sysdeps/alpha/fpu/s_truncf.c similarity index 100% rename from sysdeps/alpha/fpu/s_truncf.c rename to ports/sysdeps/alpha/fpu/s_truncf.c diff --git a/sysdeps/alpha/gccframe.h b/ports/sysdeps/alpha/gccframe.h similarity index 100% rename from sysdeps/alpha/gccframe.h rename to ports/sysdeps/alpha/gccframe.h diff --git a/sysdeps/alpha/hp-timing.h b/ports/sysdeps/alpha/hp-timing.h similarity index 100% rename from sysdeps/alpha/hp-timing.h rename to ports/sysdeps/alpha/hp-timing.h diff --git a/sysdeps/alpha/htonl.S b/ports/sysdeps/alpha/htonl.S similarity index 100% rename from sysdeps/alpha/htonl.S rename to ports/sysdeps/alpha/htonl.S diff --git a/sysdeps/alpha/htons.S b/ports/sysdeps/alpha/htons.S similarity index 100% rename from sysdeps/alpha/htons.S rename to ports/sysdeps/alpha/htons.S diff --git a/sysdeps/alpha/jmpbuf-offsets.h b/ports/sysdeps/alpha/jmpbuf-offsets.h similarity index 100% rename from sysdeps/alpha/jmpbuf-offsets.h rename to ports/sysdeps/alpha/jmpbuf-offsets.h diff --git a/sysdeps/alpha/jmpbuf-unwind.h b/ports/sysdeps/alpha/jmpbuf-unwind.h similarity index 100% rename from sysdeps/alpha/jmpbuf-unwind.h rename to ports/sysdeps/alpha/jmpbuf-unwind.h diff --git a/sysdeps/alpha/ldiv.S b/ports/sysdeps/alpha/ldiv.S similarity index 100% rename from sysdeps/alpha/ldiv.S rename to ports/sysdeps/alpha/ldiv.S diff --git a/sysdeps/alpha/ldsodefs.h b/ports/sysdeps/alpha/ldsodefs.h similarity index 100% rename from sysdeps/alpha/ldsodefs.h rename to ports/sysdeps/alpha/ldsodefs.h diff --git a/sysdeps/alpha/libc-tls.c b/ports/sysdeps/alpha/libc-tls.c similarity index 100% rename from sysdeps/alpha/libc-tls.c rename to ports/sysdeps/alpha/libc-tls.c diff --git a/sysdeps/alpha/lldiv.S b/ports/sysdeps/alpha/lldiv.S similarity index 100% rename from sysdeps/alpha/lldiv.S rename to ports/sysdeps/alpha/lldiv.S diff --git a/sysdeps/alpha/lshift.S b/ports/sysdeps/alpha/lshift.S similarity index 100% rename from sysdeps/alpha/lshift.S rename to ports/sysdeps/alpha/lshift.S diff --git a/sysdeps/alpha/machine-gmon.h b/ports/sysdeps/alpha/machine-gmon.h similarity index 100% rename from sysdeps/alpha/machine-gmon.h rename to ports/sysdeps/alpha/machine-gmon.h diff --git a/sysdeps/alpha/memchr.c b/ports/sysdeps/alpha/memchr.c similarity index 100% rename from sysdeps/alpha/memchr.c rename to ports/sysdeps/alpha/memchr.c diff --git a/sysdeps/alpha/memset.S b/ports/sysdeps/alpha/memset.S similarity index 100% rename from sysdeps/alpha/memset.S rename to ports/sysdeps/alpha/memset.S diff --git a/sysdeps/alpha/memusage.h b/ports/sysdeps/alpha/memusage.h similarity index 100% rename from sysdeps/alpha/memusage.h rename to ports/sysdeps/alpha/memusage.h diff --git a/sysdeps/alpha/mul_1.S b/ports/sysdeps/alpha/mul_1.S similarity index 100% rename from sysdeps/alpha/mul_1.S rename to ports/sysdeps/alpha/mul_1.S diff --git a/sysdeps/alpha/nptl/Makefile b/ports/sysdeps/alpha/nptl/Makefile similarity index 100% rename from sysdeps/alpha/nptl/Makefile rename to ports/sysdeps/alpha/nptl/Makefile diff --git a/sysdeps/alpha/nptl/pthread_spin_lock.S b/ports/sysdeps/alpha/nptl/pthread_spin_lock.S similarity index 100% rename from sysdeps/alpha/nptl/pthread_spin_lock.S rename to ports/sysdeps/alpha/nptl/pthread_spin_lock.S diff --git a/sysdeps/alpha/nptl/pthread_spin_trylock.S b/ports/sysdeps/alpha/nptl/pthread_spin_trylock.S similarity index 100% rename from sysdeps/alpha/nptl/pthread_spin_trylock.S rename to ports/sysdeps/alpha/nptl/pthread_spin_trylock.S diff --git a/sysdeps/alpha/nptl/pthreaddef.h b/ports/sysdeps/alpha/nptl/pthreaddef.h similarity index 100% rename from sysdeps/alpha/nptl/pthreaddef.h rename to ports/sysdeps/alpha/nptl/pthreaddef.h diff --git a/sysdeps/alpha/nptl/tcb-offsets.sym b/ports/sysdeps/alpha/nptl/tcb-offsets.sym similarity index 100% rename from sysdeps/alpha/nptl/tcb-offsets.sym rename to ports/sysdeps/alpha/nptl/tcb-offsets.sym diff --git a/sysdeps/alpha/nptl/tls.h b/ports/sysdeps/alpha/nptl/tls.h similarity index 100% rename from sysdeps/alpha/nptl/tls.h rename to ports/sysdeps/alpha/nptl/tls.h diff --git a/sysdeps/alpha/nscd-types.h b/ports/sysdeps/alpha/nscd-types.h similarity index 100% rename from sysdeps/alpha/nscd-types.h rename to ports/sysdeps/alpha/nscd-types.h diff --git a/sysdeps/alpha/preconfigure b/ports/sysdeps/alpha/preconfigure similarity index 100% rename from sysdeps/alpha/preconfigure rename to ports/sysdeps/alpha/preconfigure diff --git a/sysdeps/alpha/rawmemchr.S b/ports/sysdeps/alpha/rawmemchr.S similarity index 100% rename from sysdeps/alpha/rawmemchr.S rename to ports/sysdeps/alpha/rawmemchr.S diff --git a/sysdeps/alpha/reml.S b/ports/sysdeps/alpha/reml.S similarity index 100% rename from sysdeps/alpha/reml.S rename to ports/sysdeps/alpha/reml.S diff --git a/sysdeps/alpha/remlu.S b/ports/sysdeps/alpha/remlu.S similarity index 100% rename from sysdeps/alpha/remlu.S rename to ports/sysdeps/alpha/remlu.S diff --git a/sysdeps/alpha/remq.S b/ports/sysdeps/alpha/remq.S similarity index 100% rename from sysdeps/alpha/remq.S rename to ports/sysdeps/alpha/remq.S diff --git a/sysdeps/alpha/remqu.S b/ports/sysdeps/alpha/remqu.S similarity index 100% rename from sysdeps/alpha/remqu.S rename to ports/sysdeps/alpha/remqu.S diff --git a/sysdeps/alpha/rshift.S b/ports/sysdeps/alpha/rshift.S similarity index 100% rename from sysdeps/alpha/rshift.S rename to ports/sysdeps/alpha/rshift.S diff --git a/sysdeps/alpha/setjmp.S b/ports/sysdeps/alpha/setjmp.S similarity index 100% rename from sysdeps/alpha/setjmp.S rename to ports/sysdeps/alpha/setjmp.S diff --git a/sysdeps/alpha/shlib-versions b/ports/sysdeps/alpha/shlib-versions similarity index 100% rename from sysdeps/alpha/shlib-versions rename to ports/sysdeps/alpha/shlib-versions diff --git a/sysdeps/alpha/soft-fp/Makefile b/ports/sysdeps/alpha/soft-fp/Makefile similarity index 100% rename from sysdeps/alpha/soft-fp/Makefile rename to ports/sysdeps/alpha/soft-fp/Makefile diff --git a/sysdeps/alpha/soft-fp/Versions b/ports/sysdeps/alpha/soft-fp/Versions similarity index 100% rename from sysdeps/alpha/soft-fp/Versions rename to ports/sysdeps/alpha/soft-fp/Versions diff --git a/sysdeps/alpha/soft-fp/e_sqrtl.c b/ports/sysdeps/alpha/soft-fp/e_sqrtl.c similarity index 100% rename from sysdeps/alpha/soft-fp/e_sqrtl.c rename to ports/sysdeps/alpha/soft-fp/e_sqrtl.c diff --git a/sysdeps/alpha/soft-fp/local-soft-fp.h b/ports/sysdeps/alpha/soft-fp/local-soft-fp.h similarity index 100% rename from sysdeps/alpha/soft-fp/local-soft-fp.h rename to ports/sysdeps/alpha/soft-fp/local-soft-fp.h diff --git a/sysdeps/alpha/soft-fp/ots_add.c b/ports/sysdeps/alpha/soft-fp/ots_add.c similarity index 100% rename from sysdeps/alpha/soft-fp/ots_add.c rename to ports/sysdeps/alpha/soft-fp/ots_add.c diff --git a/sysdeps/alpha/soft-fp/ots_cmp.c b/ports/sysdeps/alpha/soft-fp/ots_cmp.c similarity index 100% rename from sysdeps/alpha/soft-fp/ots_cmp.c rename to ports/sysdeps/alpha/soft-fp/ots_cmp.c diff --git a/sysdeps/alpha/soft-fp/ots_cmpe.c b/ports/sysdeps/alpha/soft-fp/ots_cmpe.c similarity index 100% rename from sysdeps/alpha/soft-fp/ots_cmpe.c rename to ports/sysdeps/alpha/soft-fp/ots_cmpe.c diff --git a/sysdeps/alpha/soft-fp/ots_cvtqux.c b/ports/sysdeps/alpha/soft-fp/ots_cvtqux.c similarity index 100% rename from sysdeps/alpha/soft-fp/ots_cvtqux.c rename to ports/sysdeps/alpha/soft-fp/ots_cvtqux.c diff --git a/sysdeps/alpha/soft-fp/ots_cvtqx.c b/ports/sysdeps/alpha/soft-fp/ots_cvtqx.c similarity index 100% rename from sysdeps/alpha/soft-fp/ots_cvtqx.c rename to ports/sysdeps/alpha/soft-fp/ots_cvtqx.c diff --git a/sysdeps/alpha/soft-fp/ots_cvttx.c b/ports/sysdeps/alpha/soft-fp/ots_cvttx.c similarity index 100% rename from sysdeps/alpha/soft-fp/ots_cvttx.c rename to ports/sysdeps/alpha/soft-fp/ots_cvttx.c diff --git a/sysdeps/alpha/soft-fp/ots_cvtxq.c b/ports/sysdeps/alpha/soft-fp/ots_cvtxq.c similarity index 100% rename from sysdeps/alpha/soft-fp/ots_cvtxq.c rename to ports/sysdeps/alpha/soft-fp/ots_cvtxq.c diff --git a/sysdeps/alpha/soft-fp/ots_cvtxt.c b/ports/sysdeps/alpha/soft-fp/ots_cvtxt.c similarity index 100% rename from sysdeps/alpha/soft-fp/ots_cvtxt.c rename to ports/sysdeps/alpha/soft-fp/ots_cvtxt.c diff --git a/sysdeps/alpha/soft-fp/ots_div.c b/ports/sysdeps/alpha/soft-fp/ots_div.c similarity index 100% rename from sysdeps/alpha/soft-fp/ots_div.c rename to ports/sysdeps/alpha/soft-fp/ots_div.c diff --git a/sysdeps/alpha/soft-fp/ots_mul.c b/ports/sysdeps/alpha/soft-fp/ots_mul.c similarity index 100% rename from sysdeps/alpha/soft-fp/ots_mul.c rename to ports/sysdeps/alpha/soft-fp/ots_mul.c diff --git a/sysdeps/alpha/soft-fp/ots_nintxq.c b/ports/sysdeps/alpha/soft-fp/ots_nintxq.c similarity index 100% rename from sysdeps/alpha/soft-fp/ots_nintxq.c rename to ports/sysdeps/alpha/soft-fp/ots_nintxq.c diff --git a/sysdeps/alpha/soft-fp/ots_sub.c b/ports/sysdeps/alpha/soft-fp/ots_sub.c similarity index 100% rename from sysdeps/alpha/soft-fp/ots_sub.c rename to ports/sysdeps/alpha/soft-fp/ots_sub.c diff --git a/sysdeps/alpha/soft-fp/sfp-machine.h b/ports/sysdeps/alpha/soft-fp/sfp-machine.h similarity index 100% rename from sysdeps/alpha/soft-fp/sfp-machine.h rename to ports/sysdeps/alpha/soft-fp/sfp-machine.h diff --git a/sysdeps/alpha/stackinfo.h b/ports/sysdeps/alpha/stackinfo.h similarity index 100% rename from sysdeps/alpha/stackinfo.h rename to ports/sysdeps/alpha/stackinfo.h diff --git a/sysdeps/alpha/start.S b/ports/sysdeps/alpha/start.S similarity index 100% rename from sysdeps/alpha/start.S rename to ports/sysdeps/alpha/start.S diff --git a/sysdeps/alpha/stpcpy.S b/ports/sysdeps/alpha/stpcpy.S similarity index 100% rename from sysdeps/alpha/stpcpy.S rename to ports/sysdeps/alpha/stpcpy.S diff --git a/sysdeps/alpha/stpncpy.S b/ports/sysdeps/alpha/stpncpy.S similarity index 100% rename from sysdeps/alpha/stpncpy.S rename to ports/sysdeps/alpha/stpncpy.S diff --git a/sysdeps/alpha/strcat.S b/ports/sysdeps/alpha/strcat.S similarity index 100% rename from sysdeps/alpha/strcat.S rename to ports/sysdeps/alpha/strcat.S diff --git a/sysdeps/alpha/strchr.S b/ports/sysdeps/alpha/strchr.S similarity index 100% rename from sysdeps/alpha/strchr.S rename to ports/sysdeps/alpha/strchr.S diff --git a/sysdeps/alpha/strcmp.S b/ports/sysdeps/alpha/strcmp.S similarity index 100% rename from sysdeps/alpha/strcmp.S rename to ports/sysdeps/alpha/strcmp.S diff --git a/sysdeps/alpha/strcpy.S b/ports/sysdeps/alpha/strcpy.S similarity index 100% rename from sysdeps/alpha/strcpy.S rename to ports/sysdeps/alpha/strcpy.S diff --git a/sysdeps/alpha/strlen.S b/ports/sysdeps/alpha/strlen.S similarity index 100% rename from sysdeps/alpha/strlen.S rename to ports/sysdeps/alpha/strlen.S diff --git a/sysdeps/alpha/strncat.S b/ports/sysdeps/alpha/strncat.S similarity index 100% rename from sysdeps/alpha/strncat.S rename to ports/sysdeps/alpha/strncat.S diff --git a/sysdeps/alpha/strncmp.S b/ports/sysdeps/alpha/strncmp.S similarity index 100% rename from sysdeps/alpha/strncmp.S rename to ports/sysdeps/alpha/strncmp.S diff --git a/sysdeps/alpha/strncpy.S b/ports/sysdeps/alpha/strncpy.S similarity index 100% rename from sysdeps/alpha/strncpy.S rename to ports/sysdeps/alpha/strncpy.S diff --git a/sysdeps/alpha/strrchr.S b/ports/sysdeps/alpha/strrchr.S similarity index 100% rename from sysdeps/alpha/strrchr.S rename to ports/sysdeps/alpha/strrchr.S diff --git a/sysdeps/alpha/stxcpy.S b/ports/sysdeps/alpha/stxcpy.S similarity index 100% rename from sysdeps/alpha/stxcpy.S rename to ports/sysdeps/alpha/stxcpy.S diff --git a/sysdeps/alpha/stxncpy.S b/ports/sysdeps/alpha/stxncpy.S similarity index 100% rename from sysdeps/alpha/stxncpy.S rename to ports/sysdeps/alpha/stxncpy.S diff --git a/sysdeps/alpha/sub_n.S b/ports/sysdeps/alpha/sub_n.S similarity index 100% rename from sysdeps/alpha/sub_n.S rename to ports/sysdeps/alpha/sub_n.S diff --git a/sysdeps/alpha/submul_1.S b/ports/sysdeps/alpha/submul_1.S similarity index 100% rename from sysdeps/alpha/submul_1.S rename to ports/sysdeps/alpha/submul_1.S diff --git a/sysdeps/alpha/tls-macros.h b/ports/sysdeps/alpha/tls-macros.h similarity index 100% rename from sysdeps/alpha/tls-macros.h rename to ports/sysdeps/alpha/tls-macros.h diff --git a/sysdeps/alpha/tst-audit.h b/ports/sysdeps/alpha/tst-audit.h similarity index 100% rename from sysdeps/alpha/tst-audit.h rename to ports/sysdeps/alpha/tst-audit.h diff --git a/sysdeps/alpha/udiv_qrnnd.S b/ports/sysdeps/alpha/udiv_qrnnd.S similarity index 100% rename from sysdeps/alpha/udiv_qrnnd.S rename to ports/sysdeps/alpha/udiv_qrnnd.S diff --git a/sysdeps/am33/Implies b/ports/sysdeps/am33/Implies similarity index 100% rename from sysdeps/am33/Implies rename to ports/sysdeps/am33/Implies diff --git a/sysdeps/am33/__longjmp.S b/ports/sysdeps/am33/__longjmp.S similarity index 100% rename from sysdeps/am33/__longjmp.S rename to ports/sysdeps/am33/__longjmp.S diff --git a/sysdeps/am33/atomicity.h b/ports/sysdeps/am33/atomicity.h similarity index 100% rename from sysdeps/am33/atomicity.h rename to ports/sysdeps/am33/atomicity.h diff --git a/sysdeps/am33/bits/endian.h b/ports/sysdeps/am33/bits/endian.h similarity index 100% rename from sysdeps/am33/bits/endian.h rename to ports/sysdeps/am33/bits/endian.h diff --git a/sysdeps/am33/bits/setjmp.h b/ports/sysdeps/am33/bits/setjmp.h similarity index 100% rename from sysdeps/am33/bits/setjmp.h rename to ports/sysdeps/am33/bits/setjmp.h diff --git a/sysdeps/am33/bsd-_setjmp.S b/ports/sysdeps/am33/bsd-_setjmp.S similarity index 100% rename from sysdeps/am33/bsd-_setjmp.S rename to ports/sysdeps/am33/bsd-_setjmp.S diff --git a/sysdeps/am33/bsd-setjmp.S b/ports/sysdeps/am33/bsd-setjmp.S similarity index 100% rename from sysdeps/am33/bsd-setjmp.S rename to ports/sysdeps/am33/bsd-setjmp.S diff --git a/sysdeps/am33/dl-machine.h b/ports/sysdeps/am33/dl-machine.h similarity index 100% rename from sysdeps/am33/dl-machine.h rename to ports/sysdeps/am33/dl-machine.h diff --git a/sysdeps/am33/elf/start.S b/ports/sysdeps/am33/elf/start.S similarity index 100% rename from sysdeps/am33/elf/start.S rename to ports/sysdeps/am33/elf/start.S diff --git a/sysdeps/am33/fpu/bits/fenv.h b/ports/sysdeps/am33/fpu/bits/fenv.h similarity index 100% rename from sysdeps/am33/fpu/bits/fenv.h rename to ports/sysdeps/am33/fpu/bits/fenv.h diff --git a/sysdeps/am33/fpu/fclrexcpt.c b/ports/sysdeps/am33/fpu/fclrexcpt.c similarity index 100% rename from sysdeps/am33/fpu/fclrexcpt.c rename to ports/sysdeps/am33/fpu/fclrexcpt.c diff --git a/sysdeps/am33/fpu/fedisblxcpt.c b/ports/sysdeps/am33/fpu/fedisblxcpt.c similarity index 100% rename from sysdeps/am33/fpu/fedisblxcpt.c rename to ports/sysdeps/am33/fpu/fedisblxcpt.c diff --git a/sysdeps/am33/fpu/feenablxcpt.c b/ports/sysdeps/am33/fpu/feenablxcpt.c similarity index 100% rename from sysdeps/am33/fpu/feenablxcpt.c rename to ports/sysdeps/am33/fpu/feenablxcpt.c diff --git a/sysdeps/am33/fpu/fegetenv.c b/ports/sysdeps/am33/fpu/fegetenv.c similarity index 100% rename from sysdeps/am33/fpu/fegetenv.c rename to ports/sysdeps/am33/fpu/fegetenv.c diff --git a/sysdeps/am33/fpu/fegetexcept.c b/ports/sysdeps/am33/fpu/fegetexcept.c similarity index 100% rename from sysdeps/am33/fpu/fegetexcept.c rename to ports/sysdeps/am33/fpu/fegetexcept.c diff --git a/sysdeps/am33/fpu/fegetround.c b/ports/sysdeps/am33/fpu/fegetround.c similarity index 100% rename from sysdeps/am33/fpu/fegetround.c rename to ports/sysdeps/am33/fpu/fegetround.c diff --git a/sysdeps/am33/fpu/feholdexcpt.c b/ports/sysdeps/am33/fpu/feholdexcpt.c similarity index 100% rename from sysdeps/am33/fpu/feholdexcpt.c rename to ports/sysdeps/am33/fpu/feholdexcpt.c diff --git a/sysdeps/am33/fpu/fenv_libc.h b/ports/sysdeps/am33/fpu/fenv_libc.h similarity index 100% rename from sysdeps/am33/fpu/fenv_libc.h rename to ports/sysdeps/am33/fpu/fenv_libc.h diff --git a/sysdeps/am33/fpu/fesetenv.c b/ports/sysdeps/am33/fpu/fesetenv.c similarity index 100% rename from sysdeps/am33/fpu/fesetenv.c rename to ports/sysdeps/am33/fpu/fesetenv.c diff --git a/sysdeps/am33/fpu/fesetround.c b/ports/sysdeps/am33/fpu/fesetround.c similarity index 100% rename from sysdeps/am33/fpu/fesetround.c rename to ports/sysdeps/am33/fpu/fesetround.c diff --git a/sysdeps/am33/fpu/feupdateenv.c b/ports/sysdeps/am33/fpu/feupdateenv.c similarity index 100% rename from sysdeps/am33/fpu/feupdateenv.c rename to ports/sysdeps/am33/fpu/feupdateenv.c diff --git a/sysdeps/am33/fpu/fgetexcptflg.c b/ports/sysdeps/am33/fpu/fgetexcptflg.c similarity index 100% rename from sysdeps/am33/fpu/fgetexcptflg.c rename to ports/sysdeps/am33/fpu/fgetexcptflg.c diff --git a/sysdeps/am33/fpu/fpu_control.h b/ports/sysdeps/am33/fpu/fpu_control.h similarity index 100% rename from sysdeps/am33/fpu/fpu_control.h rename to ports/sysdeps/am33/fpu/fpu_control.h diff --git a/sysdeps/am33/fpu/fraiseexcpt.c b/ports/sysdeps/am33/fpu/fraiseexcpt.c similarity index 100% rename from sysdeps/am33/fpu/fraiseexcpt.c rename to ports/sysdeps/am33/fpu/fraiseexcpt.c diff --git a/sysdeps/am33/fpu/fsetexcptflg.c b/ports/sysdeps/am33/fpu/fsetexcptflg.c similarity index 100% rename from sysdeps/am33/fpu/fsetexcptflg.c rename to ports/sysdeps/am33/fpu/fsetexcptflg.c diff --git a/sysdeps/am33/fpu/ftestexcept.c b/ports/sysdeps/am33/fpu/ftestexcept.c similarity index 100% rename from sysdeps/am33/fpu/ftestexcept.c rename to ports/sysdeps/am33/fpu/ftestexcept.c diff --git a/sysdeps/am33/jmpbuf-offsets.h b/ports/sysdeps/am33/jmpbuf-offsets.h similarity index 100% rename from sysdeps/am33/jmpbuf-offsets.h rename to ports/sysdeps/am33/jmpbuf-offsets.h diff --git a/sysdeps/am33/jmpbuf-unwind.h b/ports/sysdeps/am33/jmpbuf-unwind.h similarity index 100% rename from sysdeps/am33/jmpbuf-unwind.h rename to ports/sysdeps/am33/jmpbuf-unwind.h diff --git a/sysdeps/am33/linuxthreads/pspinlock.c b/ports/sysdeps/am33/linuxthreads/pspinlock.c similarity index 100% rename from sysdeps/am33/linuxthreads/pspinlock.c rename to ports/sysdeps/am33/linuxthreads/pspinlock.c diff --git a/sysdeps/am33/linuxthreads/pt-machine.h b/ports/sysdeps/am33/linuxthreads/pt-machine.h similarity index 100% rename from sysdeps/am33/linuxthreads/pt-machine.h rename to ports/sysdeps/am33/linuxthreads/pt-machine.h diff --git a/sysdeps/am33/memusage.h b/ports/sysdeps/am33/memusage.h similarity index 100% rename from sysdeps/am33/memusage.h rename to ports/sysdeps/am33/memusage.h diff --git a/sysdeps/am33/preconfigure b/ports/sysdeps/am33/preconfigure similarity index 100% rename from sysdeps/am33/preconfigure rename to ports/sysdeps/am33/preconfigure diff --git a/sysdeps/am33/setjmp.S b/ports/sysdeps/am33/setjmp.S similarity index 100% rename from sysdeps/am33/setjmp.S rename to ports/sysdeps/am33/setjmp.S diff --git a/sysdeps/am33/shlib-versions b/ports/sysdeps/am33/shlib-versions similarity index 100% rename from sysdeps/am33/shlib-versions rename to ports/sysdeps/am33/shlib-versions diff --git a/sysdeps/am33/stackinfo.h b/ports/sysdeps/am33/stackinfo.h similarity index 100% rename from sysdeps/am33/stackinfo.h rename to ports/sysdeps/am33/stackinfo.h diff --git a/sysdeps/am33/sys/ucontext.h b/ports/sysdeps/am33/sys/ucontext.h similarity index 100% rename from sysdeps/am33/sys/ucontext.h rename to ports/sysdeps/am33/sys/ucontext.h diff --git a/sysdeps/am33/sysdep.h b/ports/sysdeps/am33/sysdep.h similarity index 100% rename from sysdeps/am33/sysdep.h rename to ports/sysdeps/am33/sysdep.h diff --git a/sysdeps/arm/Implies b/ports/sysdeps/arm/Implies similarity index 100% rename from sysdeps/arm/Implies rename to ports/sysdeps/arm/Implies diff --git a/sysdeps/arm/Makefile b/ports/sysdeps/arm/Makefile similarity index 100% rename from sysdeps/arm/Makefile rename to ports/sysdeps/arm/Makefile diff --git a/sysdeps/arm/Versions b/ports/sysdeps/arm/Versions similarity index 100% rename from sysdeps/arm/Versions rename to ports/sysdeps/arm/Versions diff --git a/sysdeps/arm/__longjmp.S b/ports/sysdeps/arm/__longjmp.S similarity index 100% rename from sysdeps/arm/__longjmp.S rename to ports/sysdeps/arm/__longjmp.S diff --git a/sysdeps/arm/abi-note.S b/ports/sysdeps/arm/abi-note.S similarity index 100% rename from sysdeps/arm/abi-note.S rename to ports/sysdeps/arm/abi-note.S diff --git a/sysdeps/arm/aeabi_assert.c b/ports/sysdeps/arm/aeabi_assert.c similarity index 100% rename from sysdeps/arm/aeabi_assert.c rename to ports/sysdeps/arm/aeabi_assert.c diff --git a/sysdeps/arm/aeabi_atexit.c b/ports/sysdeps/arm/aeabi_atexit.c similarity index 100% rename from sysdeps/arm/aeabi_atexit.c rename to ports/sysdeps/arm/aeabi_atexit.c diff --git a/sysdeps/arm/aeabi_errno_addr.c b/ports/sysdeps/arm/aeabi_errno_addr.c similarity index 100% rename from sysdeps/arm/aeabi_errno_addr.c rename to ports/sysdeps/arm/aeabi_errno_addr.c diff --git a/sysdeps/arm/aeabi_lcsts.c b/ports/sysdeps/arm/aeabi_lcsts.c similarity index 100% rename from sysdeps/arm/aeabi_lcsts.c rename to ports/sysdeps/arm/aeabi_lcsts.c diff --git a/sysdeps/arm/aeabi_localeconv.c b/ports/sysdeps/arm/aeabi_localeconv.c similarity index 100% rename from sysdeps/arm/aeabi_localeconv.c rename to ports/sysdeps/arm/aeabi_localeconv.c diff --git a/sysdeps/arm/aeabi_math.c b/ports/sysdeps/arm/aeabi_math.c similarity index 100% rename from sysdeps/arm/aeabi_math.c rename to ports/sysdeps/arm/aeabi_math.c diff --git a/sysdeps/arm/aeabi_mb_cur_max.c b/ports/sysdeps/arm/aeabi_mb_cur_max.c similarity index 100% rename from sysdeps/arm/aeabi_mb_cur_max.c rename to ports/sysdeps/arm/aeabi_mb_cur_max.c diff --git a/sysdeps/arm/aeabi_memclr.c b/ports/sysdeps/arm/aeabi_memclr.c similarity index 100% rename from sysdeps/arm/aeabi_memclr.c rename to ports/sysdeps/arm/aeabi_memclr.c diff --git a/sysdeps/arm/aeabi_memcpy.c b/ports/sysdeps/arm/aeabi_memcpy.c similarity index 100% rename from sysdeps/arm/aeabi_memcpy.c rename to ports/sysdeps/arm/aeabi_memcpy.c diff --git a/sysdeps/arm/aeabi_memmove.c b/ports/sysdeps/arm/aeabi_memmove.c similarity index 100% rename from sysdeps/arm/aeabi_memmove.c rename to ports/sysdeps/arm/aeabi_memmove.c diff --git a/sysdeps/arm/aeabi_memset.c b/ports/sysdeps/arm/aeabi_memset.c similarity index 100% rename from sysdeps/arm/aeabi_memset.c rename to ports/sysdeps/arm/aeabi_memset.c diff --git a/sysdeps/arm/aeabi_sighandlers.S b/ports/sysdeps/arm/aeabi_sighandlers.S similarity index 100% rename from sysdeps/arm/aeabi_sighandlers.S rename to ports/sysdeps/arm/aeabi_sighandlers.S diff --git a/sysdeps/arm/aeabi_unwind_cpp_pr1.c b/ports/sysdeps/arm/aeabi_unwind_cpp_pr1.c similarity index 100% rename from sysdeps/arm/aeabi_unwind_cpp_pr1.c rename to ports/sysdeps/arm/aeabi_unwind_cpp_pr1.c diff --git a/sysdeps/arm/arm-mcount.S b/ports/sysdeps/arm/arm-mcount.S similarity index 100% rename from sysdeps/arm/arm-mcount.S rename to ports/sysdeps/arm/arm-mcount.S diff --git a/sysdeps/arm/armv6t2/memchr.S b/ports/sysdeps/arm/armv6t2/memchr.S similarity index 100% rename from sysdeps/arm/armv6t2/memchr.S rename to ports/sysdeps/arm/armv6t2/memchr.S diff --git a/sysdeps/arm/armv7/Implies b/ports/sysdeps/arm/armv7/Implies similarity index 100% rename from sysdeps/arm/armv7/Implies rename to ports/sysdeps/arm/armv7/Implies diff --git a/sysdeps/arm/backtrace.c b/ports/sysdeps/arm/backtrace.c similarity index 100% rename from sysdeps/arm/backtrace.c rename to ports/sysdeps/arm/backtrace.c diff --git a/sysdeps/arm/bits/endian.h b/ports/sysdeps/arm/bits/endian.h similarity index 100% rename from sysdeps/arm/bits/endian.h rename to ports/sysdeps/arm/bits/endian.h diff --git a/sysdeps/arm/bits/fenv.h b/ports/sysdeps/arm/bits/fenv.h similarity index 100% rename from sysdeps/arm/bits/fenv.h rename to ports/sysdeps/arm/bits/fenv.h diff --git a/sysdeps/arm/bits/link.h b/ports/sysdeps/arm/bits/link.h similarity index 100% rename from sysdeps/arm/bits/link.h rename to ports/sysdeps/arm/bits/link.h diff --git a/sysdeps/arm/bits/linkmap.h b/ports/sysdeps/arm/bits/linkmap.h similarity index 100% rename from sysdeps/arm/bits/linkmap.h rename to ports/sysdeps/arm/bits/linkmap.h diff --git a/sysdeps/arm/bits/mathdef.h b/ports/sysdeps/arm/bits/mathdef.h similarity index 100% rename from sysdeps/arm/bits/mathdef.h rename to ports/sysdeps/arm/bits/mathdef.h diff --git a/sysdeps/arm/bits/setjmp.h b/ports/sysdeps/arm/bits/setjmp.h similarity index 100% rename from sysdeps/arm/bits/setjmp.h rename to ports/sysdeps/arm/bits/setjmp.h diff --git a/sysdeps/arm/bsd-_setjmp.S b/ports/sysdeps/arm/bsd-_setjmp.S similarity index 100% rename from sysdeps/arm/bsd-_setjmp.S rename to ports/sysdeps/arm/bsd-_setjmp.S diff --git a/sysdeps/arm/bsd-setjmp.S b/ports/sysdeps/arm/bsd-setjmp.S similarity index 100% rename from sysdeps/arm/bsd-setjmp.S rename to ports/sysdeps/arm/bsd-setjmp.S diff --git a/sysdeps/arm/configure b/ports/sysdeps/arm/configure similarity index 100% rename from sysdeps/arm/configure rename to ports/sysdeps/arm/configure diff --git a/sysdeps/arm/configure.in b/ports/sysdeps/arm/configure.in similarity index 100% rename from sysdeps/arm/configure.in rename to ports/sysdeps/arm/configure.in diff --git a/sysdeps/arm/crti.S b/ports/sysdeps/arm/crti.S similarity index 100% rename from sysdeps/arm/crti.S rename to ports/sysdeps/arm/crti.S diff --git a/sysdeps/arm/crtn.S b/ports/sysdeps/arm/crtn.S similarity index 100% rename from sysdeps/arm/crtn.S rename to ports/sysdeps/arm/crtn.S diff --git a/sysdeps/arm/dl-irel.h b/ports/sysdeps/arm/dl-irel.h similarity index 100% rename from sysdeps/arm/dl-irel.h rename to ports/sysdeps/arm/dl-irel.h diff --git a/sysdeps/arm/dl-lookupcfg.h b/ports/sysdeps/arm/dl-lookupcfg.h similarity index 100% rename from sysdeps/arm/dl-lookupcfg.h rename to ports/sysdeps/arm/dl-lookupcfg.h diff --git a/sysdeps/arm/dl-machine.h b/ports/sysdeps/arm/dl-machine.h similarity index 100% rename from sysdeps/arm/dl-machine.h rename to ports/sysdeps/arm/dl-machine.h diff --git a/sysdeps/arm/dl-sysdep.h b/ports/sysdeps/arm/dl-sysdep.h similarity index 100% rename from sysdeps/arm/dl-sysdep.h rename to ports/sysdeps/arm/dl-sysdep.h diff --git a/sysdeps/arm/dl-tls.h b/ports/sysdeps/arm/dl-tls.h similarity index 100% rename from sysdeps/arm/dl-tls.h rename to ports/sysdeps/arm/dl-tls.h diff --git a/sysdeps/arm/dl-tlsdesc.S b/ports/sysdeps/arm/dl-tlsdesc.S similarity index 100% rename from sysdeps/arm/dl-tlsdesc.S rename to ports/sysdeps/arm/dl-tlsdesc.S diff --git a/sysdeps/arm/dl-tlsdesc.h b/ports/sysdeps/arm/dl-tlsdesc.h similarity index 100% rename from sysdeps/arm/dl-tlsdesc.h rename to ports/sysdeps/arm/dl-tlsdesc.h diff --git a/sysdeps/arm/dl-trampoline.S b/ports/sysdeps/arm/dl-trampoline.S similarity index 100% rename from sysdeps/arm/dl-trampoline.S rename to ports/sysdeps/arm/dl-trampoline.S diff --git a/sysdeps/arm/fclrexcpt.c b/ports/sysdeps/arm/fclrexcpt.c similarity index 100% rename from sysdeps/arm/fclrexcpt.c rename to ports/sysdeps/arm/fclrexcpt.c diff --git a/sysdeps/arm/fedisblxcpt.c b/ports/sysdeps/arm/fedisblxcpt.c similarity index 100% rename from sysdeps/arm/fedisblxcpt.c rename to ports/sysdeps/arm/fedisblxcpt.c diff --git a/sysdeps/arm/feenablxcpt.c b/ports/sysdeps/arm/feenablxcpt.c similarity index 100% rename from sysdeps/arm/feenablxcpt.c rename to ports/sysdeps/arm/feenablxcpt.c diff --git a/sysdeps/arm/fegetenv.c b/ports/sysdeps/arm/fegetenv.c similarity index 100% rename from sysdeps/arm/fegetenv.c rename to ports/sysdeps/arm/fegetenv.c diff --git a/sysdeps/arm/fegetexcept.c b/ports/sysdeps/arm/fegetexcept.c similarity index 100% rename from sysdeps/arm/fegetexcept.c rename to ports/sysdeps/arm/fegetexcept.c diff --git a/sysdeps/arm/fegetround.c b/ports/sysdeps/arm/fegetround.c similarity index 100% rename from sysdeps/arm/fegetround.c rename to ports/sysdeps/arm/fegetround.c diff --git a/sysdeps/arm/feholdexcpt.c b/ports/sysdeps/arm/feholdexcpt.c similarity index 100% rename from sysdeps/arm/feholdexcpt.c rename to ports/sysdeps/arm/feholdexcpt.c diff --git a/sysdeps/arm/fesetenv.c b/ports/sysdeps/arm/fesetenv.c similarity index 100% rename from sysdeps/arm/fesetenv.c rename to ports/sysdeps/arm/fesetenv.c diff --git a/sysdeps/arm/fesetround.c b/ports/sysdeps/arm/fesetround.c similarity index 100% rename from sysdeps/arm/fesetround.c rename to ports/sysdeps/arm/fesetround.c diff --git a/sysdeps/arm/feupdateenv.c b/ports/sysdeps/arm/feupdateenv.c similarity index 100% rename from sysdeps/arm/feupdateenv.c rename to ports/sysdeps/arm/feupdateenv.c diff --git a/sysdeps/arm/fgetexcptflg.c b/ports/sysdeps/arm/fgetexcptflg.c similarity index 100% rename from sysdeps/arm/fgetexcptflg.c rename to ports/sysdeps/arm/fgetexcptflg.c diff --git a/sysdeps/arm/find_exidx.c b/ports/sysdeps/arm/find_exidx.c similarity index 100% rename from sysdeps/arm/find_exidx.c rename to ports/sysdeps/arm/find_exidx.c diff --git a/sysdeps/arm/fpu_control.h b/ports/sysdeps/arm/fpu_control.h similarity index 100% rename from sysdeps/arm/fpu_control.h rename to ports/sysdeps/arm/fpu_control.h diff --git a/sysdeps/arm/fraiseexcpt.c b/ports/sysdeps/arm/fraiseexcpt.c similarity index 100% rename from sysdeps/arm/fraiseexcpt.c rename to ports/sysdeps/arm/fraiseexcpt.c diff --git a/sysdeps/arm/frame.h b/ports/sysdeps/arm/frame.h similarity index 100% rename from sysdeps/arm/frame.h rename to ports/sysdeps/arm/frame.h diff --git a/sysdeps/arm/framestate.c b/ports/sysdeps/arm/framestate.c similarity index 100% rename from sysdeps/arm/framestate.c rename to ports/sysdeps/arm/framestate.c diff --git a/sysdeps/arm/fsetexcptflg.c b/ports/sysdeps/arm/fsetexcptflg.c similarity index 100% rename from sysdeps/arm/fsetexcptflg.c rename to ports/sysdeps/arm/fsetexcptflg.c diff --git a/sysdeps/arm/ftestexcept.c b/ports/sysdeps/arm/ftestexcept.c similarity index 100% rename from sysdeps/arm/ftestexcept.c rename to ports/sysdeps/arm/ftestexcept.c diff --git a/sysdeps/arm/gccframe.h b/ports/sysdeps/arm/gccframe.h similarity index 100% rename from sysdeps/arm/gccframe.h rename to ports/sysdeps/arm/gccframe.h diff --git a/sysdeps/arm/gmp-mparam.h b/ports/sysdeps/arm/gmp-mparam.h similarity index 100% rename from sysdeps/arm/gmp-mparam.h rename to ports/sysdeps/arm/gmp-mparam.h diff --git a/sysdeps/arm/jmpbuf-offsets.h b/ports/sysdeps/arm/jmpbuf-offsets.h similarity index 100% rename from sysdeps/arm/jmpbuf-offsets.h rename to ports/sysdeps/arm/jmpbuf-offsets.h diff --git a/sysdeps/arm/jmpbuf-unwind.h b/ports/sysdeps/arm/jmpbuf-unwind.h similarity index 100% rename from sysdeps/arm/jmpbuf-unwind.h rename to ports/sysdeps/arm/jmpbuf-unwind.h diff --git a/sysdeps/arm/ldsodefs.h b/ports/sysdeps/arm/ldsodefs.h similarity index 100% rename from sysdeps/arm/ldsodefs.h rename to ports/sysdeps/arm/ldsodefs.h diff --git a/sysdeps/arm/libc-tls.c b/ports/sysdeps/arm/libc-tls.c similarity index 100% rename from sysdeps/arm/libc-tls.c rename to ports/sysdeps/arm/libc-tls.c diff --git a/sysdeps/arm/libm-test-ulps b/ports/sysdeps/arm/libm-test-ulps similarity index 100% rename from sysdeps/arm/libm-test-ulps rename to ports/sysdeps/arm/libm-test-ulps diff --git a/sysdeps/arm/machine-gmon.h b/ports/sysdeps/arm/machine-gmon.h similarity index 100% rename from sysdeps/arm/machine-gmon.h rename to ports/sysdeps/arm/machine-gmon.h diff --git a/sysdeps/arm/memcpy.S b/ports/sysdeps/arm/memcpy.S similarity index 100% rename from sysdeps/arm/memcpy.S rename to ports/sysdeps/arm/memcpy.S diff --git a/sysdeps/arm/memmove.S b/ports/sysdeps/arm/memmove.S similarity index 100% rename from sysdeps/arm/memmove.S rename to ports/sysdeps/arm/memmove.S diff --git a/sysdeps/arm/memset.S b/ports/sysdeps/arm/memset.S similarity index 100% rename from sysdeps/arm/memset.S rename to ports/sysdeps/arm/memset.S diff --git a/sysdeps/arm/memusage.h b/ports/sysdeps/arm/memusage.h similarity index 100% rename from sysdeps/arm/memusage.h rename to ports/sysdeps/arm/memusage.h diff --git a/sysdeps/arm/nptl/Makefile b/ports/sysdeps/arm/nptl/Makefile similarity index 100% rename from sysdeps/arm/nptl/Makefile rename to ports/sysdeps/arm/nptl/Makefile diff --git a/sysdeps/arm/nptl/pthread_spin_lock.c b/ports/sysdeps/arm/nptl/pthread_spin_lock.c similarity index 100% rename from sysdeps/arm/nptl/pthread_spin_lock.c rename to ports/sysdeps/arm/nptl/pthread_spin_lock.c diff --git a/sysdeps/arm/nptl/pthread_spin_trylock.c b/ports/sysdeps/arm/nptl/pthread_spin_trylock.c similarity index 100% rename from sysdeps/arm/nptl/pthread_spin_trylock.c rename to ports/sysdeps/arm/nptl/pthread_spin_trylock.c diff --git a/sysdeps/arm/nptl/pthreaddef.h b/ports/sysdeps/arm/nptl/pthreaddef.h similarity index 100% rename from sysdeps/arm/nptl/pthreaddef.h rename to ports/sysdeps/arm/nptl/pthreaddef.h diff --git a/sysdeps/arm/nptl/tcb-offsets.sym b/ports/sysdeps/arm/nptl/tcb-offsets.sym similarity index 100% rename from sysdeps/arm/nptl/tcb-offsets.sym rename to ports/sysdeps/arm/nptl/tcb-offsets.sym diff --git a/sysdeps/arm/nptl/tls.h b/ports/sysdeps/arm/nptl/tls.h similarity index 100% rename from sysdeps/arm/nptl/tls.h rename to ports/sysdeps/arm/nptl/tls.h diff --git a/sysdeps/arm/preconfigure b/ports/sysdeps/arm/preconfigure similarity index 100% rename from sysdeps/arm/preconfigure rename to ports/sysdeps/arm/preconfigure diff --git a/sysdeps/arm/rtld-global-offsets.sym b/ports/sysdeps/arm/rtld-global-offsets.sym similarity index 100% rename from sysdeps/arm/rtld-global-offsets.sym rename to ports/sysdeps/arm/rtld-global-offsets.sym diff --git a/sysdeps/arm/setfpucw.c b/ports/sysdeps/arm/setfpucw.c similarity index 100% rename from sysdeps/arm/setfpucw.c rename to ports/sysdeps/arm/setfpucw.c diff --git a/sysdeps/arm/setjmp.S b/ports/sysdeps/arm/setjmp.S similarity index 100% rename from sysdeps/arm/setjmp.S rename to ports/sysdeps/arm/setjmp.S diff --git a/sysdeps/arm/shlib-versions b/ports/sysdeps/arm/shlib-versions similarity index 100% rename from sysdeps/arm/shlib-versions rename to ports/sysdeps/arm/shlib-versions diff --git a/sysdeps/arm/stackinfo.h b/ports/sysdeps/arm/stackinfo.h similarity index 100% rename from sysdeps/arm/stackinfo.h rename to ports/sysdeps/arm/stackinfo.h diff --git a/sysdeps/arm/start.S b/ports/sysdeps/arm/start.S similarity index 100% rename from sysdeps/arm/start.S rename to ports/sysdeps/arm/start.S diff --git a/sysdeps/arm/strlen.S b/ports/sysdeps/arm/strlen.S similarity index 100% rename from sysdeps/arm/strlen.S rename to ports/sysdeps/arm/strlen.S diff --git a/sysdeps/arm/sys/ucontext.h b/ports/sysdeps/arm/sys/ucontext.h similarity index 100% rename from sysdeps/arm/sys/ucontext.h rename to ports/sysdeps/arm/sys/ucontext.h diff --git a/sysdeps/arm/sysdep.h b/ports/sysdeps/arm/sysdep.h similarity index 100% rename from sysdeps/arm/sysdep.h rename to ports/sysdeps/arm/sysdep.h diff --git a/sysdeps/arm/tls-macros.h b/ports/sysdeps/arm/tls-macros.h similarity index 100% rename from sysdeps/arm/tls-macros.h rename to ports/sysdeps/arm/tls-macros.h diff --git a/sysdeps/arm/tlsdesc.c b/ports/sysdeps/arm/tlsdesc.c similarity index 100% rename from sysdeps/arm/tlsdesc.c rename to ports/sysdeps/arm/tlsdesc.c diff --git a/sysdeps/arm/tlsdesc.sym b/ports/sysdeps/arm/tlsdesc.sym similarity index 100% rename from sysdeps/arm/tlsdesc.sym rename to ports/sysdeps/arm/tlsdesc.sym diff --git a/sysdeps/arm/tst-audit.h b/ports/sysdeps/arm/tst-audit.h similarity index 100% rename from sysdeps/arm/tst-audit.h rename to ports/sysdeps/arm/tst-audit.h diff --git a/sysdeps/arm/unwind-dw2-fde-glibc.c b/ports/sysdeps/arm/unwind-dw2-fde-glibc.c similarity index 100% rename from sysdeps/arm/unwind-dw2-fde-glibc.c rename to ports/sysdeps/arm/unwind-dw2-fde-glibc.c diff --git a/sysdeps/arm/unwind-pe.c b/ports/sysdeps/arm/unwind-pe.c similarity index 100% rename from sysdeps/arm/unwind-pe.c rename to ports/sysdeps/arm/unwind-pe.c diff --git a/sysdeps/hppa/Makefile b/ports/sysdeps/hppa/Makefile similarity index 100% rename from sysdeps/hppa/Makefile rename to ports/sysdeps/hppa/Makefile diff --git a/sysdeps/hppa/Versions b/ports/sysdeps/hppa/Versions similarity index 100% rename from sysdeps/hppa/Versions rename to ports/sysdeps/hppa/Versions diff --git a/sysdeps/hppa/__longjmp.S b/ports/sysdeps/hppa/__longjmp.S similarity index 100% rename from sysdeps/hppa/__longjmp.S rename to ports/sysdeps/hppa/__longjmp.S diff --git a/sysdeps/hppa/abort-instr.h b/ports/sysdeps/hppa/abort-instr.h similarity index 100% rename from sysdeps/hppa/abort-instr.h rename to ports/sysdeps/hppa/abort-instr.h diff --git a/sysdeps/hppa/add_n.S b/ports/sysdeps/hppa/add_n.S similarity index 100% rename from sysdeps/hppa/add_n.S rename to ports/sysdeps/hppa/add_n.S diff --git a/sysdeps/hppa/bits/endian.h b/ports/sysdeps/hppa/bits/endian.h similarity index 100% rename from sysdeps/hppa/bits/endian.h rename to ports/sysdeps/hppa/bits/endian.h diff --git a/sysdeps/hppa/bits/link.h b/ports/sysdeps/hppa/bits/link.h similarity index 100% rename from sysdeps/hppa/bits/link.h rename to ports/sysdeps/hppa/bits/link.h diff --git a/sysdeps/hppa/bits/linkmap.h b/ports/sysdeps/hppa/bits/linkmap.h similarity index 100% rename from sysdeps/hppa/bits/linkmap.h rename to ports/sysdeps/hppa/bits/linkmap.h diff --git a/sysdeps/hppa/bits/setjmp.h b/ports/sysdeps/hppa/bits/setjmp.h similarity index 100% rename from sysdeps/hppa/bits/setjmp.h rename to ports/sysdeps/hppa/bits/setjmp.h diff --git a/sysdeps/hppa/bsd-_setjmp.S b/ports/sysdeps/hppa/bsd-_setjmp.S similarity index 100% rename from sysdeps/hppa/bsd-_setjmp.S rename to ports/sysdeps/hppa/bsd-_setjmp.S diff --git a/sysdeps/hppa/bsd-setjmp.S b/ports/sysdeps/hppa/bsd-setjmp.S similarity index 100% rename from sysdeps/hppa/bsd-setjmp.S rename to ports/sysdeps/hppa/bsd-setjmp.S diff --git a/sysdeps/hppa/configure b/ports/sysdeps/hppa/configure similarity index 100% rename from sysdeps/hppa/configure rename to ports/sysdeps/hppa/configure diff --git a/sysdeps/hppa/configure.in b/ports/sysdeps/hppa/configure.in similarity index 100% rename from sysdeps/hppa/configure.in rename to ports/sysdeps/hppa/configure.in diff --git a/sysdeps/hppa/crti.S b/ports/sysdeps/hppa/crti.S similarity index 100% rename from sysdeps/hppa/crti.S rename to ports/sysdeps/hppa/crti.S diff --git a/sysdeps/hppa/crtn.S b/ports/sysdeps/hppa/crtn.S similarity index 100% rename from sysdeps/hppa/crtn.S rename to ports/sysdeps/hppa/crtn.S diff --git a/sysdeps/hppa/dl-fptr.c b/ports/sysdeps/hppa/dl-fptr.c similarity index 100% rename from sysdeps/hppa/dl-fptr.c rename to ports/sysdeps/hppa/dl-fptr.c diff --git a/sysdeps/hppa/dl-fptr.h b/ports/sysdeps/hppa/dl-fptr.h similarity index 100% rename from sysdeps/hppa/dl-fptr.h rename to ports/sysdeps/hppa/dl-fptr.h diff --git a/sysdeps/hppa/dl-irel.h b/ports/sysdeps/hppa/dl-irel.h similarity index 100% rename from sysdeps/hppa/dl-irel.h rename to ports/sysdeps/hppa/dl-irel.h diff --git a/sysdeps/hppa/dl-lookupcfg.h b/ports/sysdeps/hppa/dl-lookupcfg.h similarity index 100% rename from sysdeps/hppa/dl-lookupcfg.h rename to ports/sysdeps/hppa/dl-lookupcfg.h diff --git a/sysdeps/hppa/dl-machine.h b/ports/sysdeps/hppa/dl-machine.h similarity index 100% rename from sysdeps/hppa/dl-machine.h rename to ports/sysdeps/hppa/dl-machine.h diff --git a/sysdeps/hppa/dl-symaddr.c b/ports/sysdeps/hppa/dl-symaddr.c similarity index 100% rename from sysdeps/hppa/dl-symaddr.c rename to ports/sysdeps/hppa/dl-symaddr.c diff --git a/sysdeps/hppa/dl-tls.h b/ports/sysdeps/hppa/dl-tls.h similarity index 100% rename from sysdeps/hppa/dl-tls.h rename to ports/sysdeps/hppa/dl-tls.h diff --git a/sysdeps/hppa/dl-trampoline.S b/ports/sysdeps/hppa/dl-trampoline.S similarity index 100% rename from sysdeps/hppa/dl-trampoline.S rename to ports/sysdeps/hppa/dl-trampoline.S diff --git a/sysdeps/hppa/entry.h b/ports/sysdeps/hppa/entry.h similarity index 100% rename from sysdeps/hppa/entry.h rename to ports/sysdeps/hppa/entry.h diff --git a/sysdeps/hppa/fpu/bits/fenv.h b/ports/sysdeps/hppa/fpu/bits/fenv.h similarity index 100% rename from sysdeps/hppa/fpu/bits/fenv.h rename to ports/sysdeps/hppa/fpu/bits/fenv.h diff --git a/sysdeps/hppa/fpu/bits/mathdef.h b/ports/sysdeps/hppa/fpu/bits/mathdef.h similarity index 100% rename from sysdeps/hppa/fpu/bits/mathdef.h rename to ports/sysdeps/hppa/fpu/bits/mathdef.h diff --git a/sysdeps/hppa/fpu/fclrexcpt.c b/ports/sysdeps/hppa/fpu/fclrexcpt.c similarity index 100% rename from sysdeps/hppa/fpu/fclrexcpt.c rename to ports/sysdeps/hppa/fpu/fclrexcpt.c diff --git a/sysdeps/hppa/fpu/fedisblxcpt.c b/ports/sysdeps/hppa/fpu/fedisblxcpt.c similarity index 100% rename from sysdeps/hppa/fpu/fedisblxcpt.c rename to ports/sysdeps/hppa/fpu/fedisblxcpt.c diff --git a/sysdeps/hppa/fpu/feenablxcpt.c b/ports/sysdeps/hppa/fpu/feenablxcpt.c similarity index 100% rename from sysdeps/hppa/fpu/feenablxcpt.c rename to ports/sysdeps/hppa/fpu/feenablxcpt.c diff --git a/sysdeps/hppa/fpu/fegetenv.c b/ports/sysdeps/hppa/fpu/fegetenv.c similarity index 100% rename from sysdeps/hppa/fpu/fegetenv.c rename to ports/sysdeps/hppa/fpu/fegetenv.c diff --git a/sysdeps/hppa/fpu/fegetexcept.c b/ports/sysdeps/hppa/fpu/fegetexcept.c similarity index 100% rename from sysdeps/hppa/fpu/fegetexcept.c rename to ports/sysdeps/hppa/fpu/fegetexcept.c diff --git a/sysdeps/hppa/fpu/fegetround.c b/ports/sysdeps/hppa/fpu/fegetround.c similarity index 100% rename from sysdeps/hppa/fpu/fegetround.c rename to ports/sysdeps/hppa/fpu/fegetround.c diff --git a/sysdeps/hppa/fpu/feholdexcpt.c b/ports/sysdeps/hppa/fpu/feholdexcpt.c similarity index 100% rename from sysdeps/hppa/fpu/feholdexcpt.c rename to ports/sysdeps/hppa/fpu/feholdexcpt.c diff --git a/sysdeps/hppa/fpu/fesetenv.c b/ports/sysdeps/hppa/fpu/fesetenv.c similarity index 100% rename from sysdeps/hppa/fpu/fesetenv.c rename to ports/sysdeps/hppa/fpu/fesetenv.c diff --git a/sysdeps/hppa/fpu/fesetround.c b/ports/sysdeps/hppa/fpu/fesetround.c similarity index 100% rename from sysdeps/hppa/fpu/fesetround.c rename to ports/sysdeps/hppa/fpu/fesetround.c diff --git a/sysdeps/hppa/fpu/feupdateenv.c b/ports/sysdeps/hppa/fpu/feupdateenv.c similarity index 100% rename from sysdeps/hppa/fpu/feupdateenv.c rename to ports/sysdeps/hppa/fpu/feupdateenv.c diff --git a/sysdeps/hppa/fpu/fgetexcptflg.c b/ports/sysdeps/hppa/fpu/fgetexcptflg.c similarity index 100% rename from sysdeps/hppa/fpu/fgetexcptflg.c rename to ports/sysdeps/hppa/fpu/fgetexcptflg.c diff --git a/sysdeps/hppa/fpu/fraiseexcpt.c b/ports/sysdeps/hppa/fpu/fraiseexcpt.c similarity index 100% rename from sysdeps/hppa/fpu/fraiseexcpt.c rename to ports/sysdeps/hppa/fpu/fraiseexcpt.c diff --git a/sysdeps/hppa/fpu/fsetexcptflg.c b/ports/sysdeps/hppa/fpu/fsetexcptflg.c similarity index 100% rename from sysdeps/hppa/fpu/fsetexcptflg.c rename to ports/sysdeps/hppa/fpu/fsetexcptflg.c diff --git a/sysdeps/hppa/fpu/ftestexcept.c b/ports/sysdeps/hppa/fpu/ftestexcept.c similarity index 100% rename from sysdeps/hppa/fpu/ftestexcept.c rename to ports/sysdeps/hppa/fpu/ftestexcept.c diff --git a/sysdeps/hppa/fpu/libm-test-ulps b/ports/sysdeps/hppa/fpu/libm-test-ulps similarity index 100% rename from sysdeps/hppa/fpu/libm-test-ulps rename to ports/sysdeps/hppa/fpu/libm-test-ulps diff --git a/sysdeps/hppa/frame.h b/ports/sysdeps/hppa/frame.h similarity index 100% rename from sysdeps/hppa/frame.h rename to ports/sysdeps/hppa/frame.h diff --git a/sysdeps/hppa/gccframe.h b/ports/sysdeps/hppa/gccframe.h similarity index 100% rename from sysdeps/hppa/gccframe.h rename to ports/sysdeps/hppa/gccframe.h diff --git a/sysdeps/hppa/hppa1.1/Implies b/ports/sysdeps/hppa/hppa1.1/Implies similarity index 100% rename from sysdeps/hppa/hppa1.1/Implies rename to ports/sysdeps/hppa/hppa1.1/Implies diff --git a/sysdeps/hppa/hppa1.1/addmul_1.S b/ports/sysdeps/hppa/hppa1.1/addmul_1.S similarity index 100% rename from sysdeps/hppa/hppa1.1/addmul_1.S rename to ports/sysdeps/hppa/hppa1.1/addmul_1.S diff --git a/sysdeps/hppa/hppa1.1/mul_1.S b/ports/sysdeps/hppa/hppa1.1/mul_1.S similarity index 100% rename from sysdeps/hppa/hppa1.1/mul_1.S rename to ports/sysdeps/hppa/hppa1.1/mul_1.S diff --git a/sysdeps/hppa/hppa1.1/s_signbit.c b/ports/sysdeps/hppa/hppa1.1/s_signbit.c similarity index 100% rename from sysdeps/hppa/hppa1.1/s_signbit.c rename to ports/sysdeps/hppa/hppa1.1/s_signbit.c diff --git a/sysdeps/hppa/hppa1.1/submul_1.S b/ports/sysdeps/hppa/hppa1.1/submul_1.S similarity index 100% rename from sysdeps/hppa/hppa1.1/submul_1.S rename to ports/sysdeps/hppa/hppa1.1/submul_1.S diff --git a/sysdeps/hppa/hppa1.1/udiv_qrnnd.S b/ports/sysdeps/hppa/hppa1.1/udiv_qrnnd.S similarity index 100% rename from sysdeps/hppa/hppa1.1/udiv_qrnnd.S rename to ports/sysdeps/hppa/hppa1.1/udiv_qrnnd.S diff --git a/sysdeps/hppa/jmpbuf-offsets.h b/ports/sysdeps/hppa/jmpbuf-offsets.h similarity index 100% rename from sysdeps/hppa/jmpbuf-offsets.h rename to ports/sysdeps/hppa/jmpbuf-offsets.h diff --git a/sysdeps/hppa/jmpbuf-unwind.h b/ports/sysdeps/hppa/jmpbuf-unwind.h similarity index 100% rename from sysdeps/hppa/jmpbuf-unwind.h rename to ports/sysdeps/hppa/jmpbuf-unwind.h diff --git a/sysdeps/hppa/ldsodefs.h b/ports/sysdeps/hppa/ldsodefs.h similarity index 100% rename from sysdeps/hppa/ldsodefs.h rename to ports/sysdeps/hppa/ldsodefs.h diff --git a/sysdeps/hppa/libc-tls.c b/ports/sysdeps/hppa/libc-tls.c similarity index 100% rename from sysdeps/hppa/libc-tls.c rename to ports/sysdeps/hppa/libc-tls.c diff --git a/sysdeps/hppa/libgcc-compat.c b/ports/sysdeps/hppa/libgcc-compat.c similarity index 100% rename from sysdeps/hppa/libgcc-compat.c rename to ports/sysdeps/hppa/libgcc-compat.c diff --git a/sysdeps/hppa/lshift.S b/ports/sysdeps/hppa/lshift.S similarity index 100% rename from sysdeps/hppa/lshift.S rename to ports/sysdeps/hppa/lshift.S diff --git a/sysdeps/hppa/machine-gmon.h b/ports/sysdeps/hppa/machine-gmon.h similarity index 100% rename from sysdeps/hppa/machine-gmon.h rename to ports/sysdeps/hppa/machine-gmon.h diff --git a/sysdeps/hppa/memusage.h b/ports/sysdeps/hppa/memusage.h similarity index 100% rename from sysdeps/hppa/memusage.h rename to ports/sysdeps/hppa/memusage.h diff --git a/sysdeps/hppa/mp_clz_tab.c b/ports/sysdeps/hppa/mp_clz_tab.c similarity index 100% rename from sysdeps/hppa/mp_clz_tab.c rename to ports/sysdeps/hppa/mp_clz_tab.c diff --git a/sysdeps/hppa/nptl/Makefile b/ports/sysdeps/hppa/nptl/Makefile similarity index 100% rename from sysdeps/hppa/nptl/Makefile rename to ports/sysdeps/hppa/nptl/Makefile diff --git a/sysdeps/hppa/nptl/jmpbuf-unwind.h b/ports/sysdeps/hppa/nptl/jmpbuf-unwind.h similarity index 100% rename from sysdeps/hppa/nptl/jmpbuf-unwind.h rename to ports/sysdeps/hppa/nptl/jmpbuf-unwind.h diff --git a/sysdeps/hppa/nptl/pthread_spin_init.c b/ports/sysdeps/hppa/nptl/pthread_spin_init.c similarity index 100% rename from sysdeps/hppa/nptl/pthread_spin_init.c rename to ports/sysdeps/hppa/nptl/pthread_spin_init.c diff --git a/sysdeps/hppa/nptl/pthread_spin_lock.c b/ports/sysdeps/hppa/nptl/pthread_spin_lock.c similarity index 100% rename from sysdeps/hppa/nptl/pthread_spin_lock.c rename to ports/sysdeps/hppa/nptl/pthread_spin_lock.c diff --git a/sysdeps/hppa/nptl/pthread_spin_trylock.c b/ports/sysdeps/hppa/nptl/pthread_spin_trylock.c similarity index 100% rename from sysdeps/hppa/nptl/pthread_spin_trylock.c rename to ports/sysdeps/hppa/nptl/pthread_spin_trylock.c diff --git a/sysdeps/hppa/nptl/pthread_spin_unlock.c b/ports/sysdeps/hppa/nptl/pthread_spin_unlock.c similarity index 100% rename from sysdeps/hppa/nptl/pthread_spin_unlock.c rename to ports/sysdeps/hppa/nptl/pthread_spin_unlock.c diff --git a/sysdeps/hppa/nptl/pthreaddef.h b/ports/sysdeps/hppa/nptl/pthreaddef.h similarity index 100% rename from sysdeps/hppa/nptl/pthreaddef.h rename to ports/sysdeps/hppa/nptl/pthreaddef.h diff --git a/sysdeps/hppa/nptl/tcb-offsets.sym b/ports/sysdeps/hppa/nptl/tcb-offsets.sym similarity index 100% rename from sysdeps/hppa/nptl/tcb-offsets.sym rename to ports/sysdeps/hppa/nptl/tcb-offsets.sym diff --git a/sysdeps/hppa/nptl/tls.h b/ports/sysdeps/hppa/nptl/tls.h similarity index 100% rename from sysdeps/hppa/nptl/tls.h rename to ports/sysdeps/hppa/nptl/tls.h diff --git a/sysdeps/hppa/preconfigure b/ports/sysdeps/hppa/preconfigure similarity index 100% rename from sysdeps/hppa/preconfigure rename to ports/sysdeps/hppa/preconfigure diff --git a/sysdeps/hppa/rshift.S b/ports/sysdeps/hppa/rshift.S similarity index 100% rename from sysdeps/hppa/rshift.S rename to ports/sysdeps/hppa/rshift.S diff --git a/sysdeps/hppa/setjmp.S b/ports/sysdeps/hppa/setjmp.S similarity index 100% rename from sysdeps/hppa/setjmp.S rename to ports/sysdeps/hppa/setjmp.S diff --git a/sysdeps/hppa/shlib-versions b/ports/sysdeps/hppa/shlib-versions similarity index 100% rename from sysdeps/hppa/shlib-versions rename to ports/sysdeps/hppa/shlib-versions diff --git a/sysdeps/hppa/stackinfo.h b/ports/sysdeps/hppa/stackinfo.h similarity index 100% rename from sysdeps/hppa/stackinfo.h rename to ports/sysdeps/hppa/stackinfo.h diff --git a/sysdeps/hppa/start.S b/ports/sysdeps/hppa/start.S similarity index 100% rename from sysdeps/hppa/start.S rename to ports/sysdeps/hppa/start.S diff --git a/sysdeps/hppa/sub_n.S b/ports/sysdeps/hppa/sub_n.S similarity index 100% rename from sysdeps/hppa/sub_n.S rename to ports/sysdeps/hppa/sub_n.S diff --git a/sysdeps/hppa/sysdep.h b/ports/sysdeps/hppa/sysdep.h similarity index 100% rename from sysdeps/hppa/sysdep.h rename to ports/sysdeps/hppa/sysdep.h diff --git a/sysdeps/hppa/tls-macros.h b/ports/sysdeps/hppa/tls-macros.h similarity index 100% rename from sysdeps/hppa/tls-macros.h rename to ports/sysdeps/hppa/tls-macros.h diff --git a/sysdeps/hppa/tst-audit.h b/ports/sysdeps/hppa/tst-audit.h similarity index 100% rename from sysdeps/hppa/tst-audit.h rename to ports/sysdeps/hppa/tst-audit.h diff --git a/sysdeps/hppa/udiv_qrnnd.S b/ports/sysdeps/hppa/udiv_qrnnd.S similarity index 100% rename from sysdeps/hppa/udiv_qrnnd.S rename to ports/sysdeps/hppa/udiv_qrnnd.S diff --git a/sysdeps/ia64/Implies b/ports/sysdeps/ia64/Implies similarity index 100% rename from sysdeps/ia64/Implies rename to ports/sysdeps/ia64/Implies diff --git a/sysdeps/ia64/Makefile b/ports/sysdeps/ia64/Makefile similarity index 100% rename from sysdeps/ia64/Makefile rename to ports/sysdeps/ia64/Makefile diff --git a/sysdeps/ia64/Versions b/ports/sysdeps/ia64/Versions similarity index 100% rename from sysdeps/ia64/Versions rename to ports/sysdeps/ia64/Versions diff --git a/sysdeps/ia64/_mcount.S b/ports/sysdeps/ia64/_mcount.S similarity index 100% rename from sysdeps/ia64/_mcount.S rename to ports/sysdeps/ia64/_mcount.S diff --git a/sysdeps/ia64/abort-instr.h b/ports/sysdeps/ia64/abort-instr.h similarity index 100% rename from sysdeps/ia64/abort-instr.h rename to ports/sysdeps/ia64/abort-instr.h diff --git a/sysdeps/ia64/backtrace.c b/ports/sysdeps/ia64/backtrace.c similarity index 100% rename from sysdeps/ia64/backtrace.c rename to ports/sysdeps/ia64/backtrace.c diff --git a/sysdeps/ia64/bcopy.S b/ports/sysdeps/ia64/bcopy.S similarity index 100% rename from sysdeps/ia64/bcopy.S rename to ports/sysdeps/ia64/bcopy.S diff --git a/sysdeps/ia64/bits/atomic.h b/ports/sysdeps/ia64/bits/atomic.h similarity index 100% rename from sysdeps/ia64/bits/atomic.h rename to ports/sysdeps/ia64/bits/atomic.h diff --git a/sysdeps/ia64/bits/byteswap-16.h b/ports/sysdeps/ia64/bits/byteswap-16.h similarity index 100% rename from sysdeps/ia64/bits/byteswap-16.h rename to ports/sysdeps/ia64/bits/byteswap-16.h diff --git a/sysdeps/ia64/bits/byteswap.h b/ports/sysdeps/ia64/bits/byteswap.h similarity index 100% rename from sysdeps/ia64/bits/byteswap.h rename to ports/sysdeps/ia64/bits/byteswap.h diff --git a/sysdeps/ia64/bits/fenv.h b/ports/sysdeps/ia64/bits/fenv.h similarity index 100% rename from sysdeps/ia64/bits/fenv.h rename to ports/sysdeps/ia64/bits/fenv.h diff --git a/sysdeps/ia64/bits/huge_vall.h b/ports/sysdeps/ia64/bits/huge_vall.h similarity index 100% rename from sysdeps/ia64/bits/huge_vall.h rename to ports/sysdeps/ia64/bits/huge_vall.h diff --git a/sysdeps/ia64/bits/link.h b/ports/sysdeps/ia64/bits/link.h similarity index 100% rename from sysdeps/ia64/bits/link.h rename to ports/sysdeps/ia64/bits/link.h diff --git a/sysdeps/ia64/bits/linkmap.h b/ports/sysdeps/ia64/bits/linkmap.h similarity index 100% rename from sysdeps/ia64/bits/linkmap.h rename to ports/sysdeps/ia64/bits/linkmap.h diff --git a/sysdeps/ia64/bits/mathdef.h b/ports/sysdeps/ia64/bits/mathdef.h similarity index 100% rename from sysdeps/ia64/bits/mathdef.h rename to ports/sysdeps/ia64/bits/mathdef.h diff --git a/sysdeps/ia64/bits/xtitypes.h b/ports/sysdeps/ia64/bits/xtitypes.h similarity index 100% rename from sysdeps/ia64/bits/xtitypes.h rename to ports/sysdeps/ia64/bits/xtitypes.h diff --git a/sysdeps/ia64/bzero.S b/ports/sysdeps/ia64/bzero.S similarity index 100% rename from sysdeps/ia64/bzero.S rename to ports/sysdeps/ia64/bzero.S diff --git a/sysdeps/ia64/configure b/ports/sysdeps/ia64/configure similarity index 100% rename from sysdeps/ia64/configure rename to ports/sysdeps/ia64/configure diff --git a/sysdeps/ia64/configure.in b/ports/sysdeps/ia64/configure.in similarity index 100% rename from sysdeps/ia64/configure.in rename to ports/sysdeps/ia64/configure.in diff --git a/sysdeps/ia64/crti.S b/ports/sysdeps/ia64/crti.S similarity index 100% rename from sysdeps/ia64/crti.S rename to ports/sysdeps/ia64/crti.S diff --git a/sysdeps/ia64/crtn.S b/ports/sysdeps/ia64/crtn.S similarity index 100% rename from sysdeps/ia64/crtn.S rename to ports/sysdeps/ia64/crtn.S diff --git a/sysdeps/ia64/dl-dtprocnum.h b/ports/sysdeps/ia64/dl-dtprocnum.h similarity index 100% rename from sysdeps/ia64/dl-dtprocnum.h rename to ports/sysdeps/ia64/dl-dtprocnum.h diff --git a/sysdeps/ia64/dl-fptr.h b/ports/sysdeps/ia64/dl-fptr.h similarity index 100% rename from sysdeps/ia64/dl-fptr.h rename to ports/sysdeps/ia64/dl-fptr.h diff --git a/sysdeps/ia64/dl-lookupcfg.h b/ports/sysdeps/ia64/dl-lookupcfg.h similarity index 100% rename from sysdeps/ia64/dl-lookupcfg.h rename to ports/sysdeps/ia64/dl-lookupcfg.h diff --git a/sysdeps/ia64/dl-machine.h b/ports/sysdeps/ia64/dl-machine.h similarity index 100% rename from sysdeps/ia64/dl-machine.h rename to ports/sysdeps/ia64/dl-machine.h diff --git a/sysdeps/ia64/dl-sysdep.h b/ports/sysdeps/ia64/dl-sysdep.h similarity index 100% rename from sysdeps/ia64/dl-sysdep.h rename to ports/sysdeps/ia64/dl-sysdep.h diff --git a/sysdeps/ia64/dl-tls.h b/ports/sysdeps/ia64/dl-tls.h similarity index 100% rename from sysdeps/ia64/dl-tls.h rename to ports/sysdeps/ia64/dl-tls.h diff --git a/sysdeps/ia64/dl-trampoline.S b/ports/sysdeps/ia64/dl-trampoline.S similarity index 100% rename from sysdeps/ia64/dl-trampoline.S rename to ports/sysdeps/ia64/dl-trampoline.S diff --git a/sysdeps/ia64/entry.h b/ports/sysdeps/ia64/entry.h similarity index 100% rename from sysdeps/ia64/entry.h rename to ports/sysdeps/ia64/entry.h diff --git a/sysdeps/ia64/fpu/Makefile b/ports/sysdeps/ia64/fpu/Makefile similarity index 100% rename from sysdeps/ia64/fpu/Makefile rename to ports/sysdeps/ia64/fpu/Makefile diff --git a/sysdeps/ia64/fpu/README b/ports/sysdeps/ia64/fpu/README similarity index 100% rename from sysdeps/ia64/fpu/README rename to ports/sysdeps/ia64/fpu/README diff --git a/sysdeps/ia64/fpu/Versions b/ports/sysdeps/ia64/fpu/Versions similarity index 100% rename from sysdeps/ia64/fpu/Versions rename to ports/sysdeps/ia64/fpu/Versions diff --git a/sysdeps/ia64/fpu/bits/math-finite.h b/ports/sysdeps/ia64/fpu/bits/math-finite.h similarity index 100% rename from sysdeps/ia64/fpu/bits/math-finite.h rename to ports/sysdeps/ia64/fpu/bits/math-finite.h diff --git a/sysdeps/ia64/fpu/bits/mathinline.h b/ports/sysdeps/ia64/fpu/bits/mathinline.h similarity index 100% rename from sysdeps/ia64/fpu/bits/mathinline.h rename to ports/sysdeps/ia64/fpu/bits/mathinline.h diff --git a/sysdeps/ia64/fpu/branred.c b/ports/sysdeps/ia64/fpu/branred.c similarity index 100% rename from sysdeps/ia64/fpu/branred.c rename to ports/sysdeps/ia64/fpu/branred.c diff --git a/sysdeps/ia64/fpu/doasin.c b/ports/sysdeps/ia64/fpu/doasin.c similarity index 100% rename from sysdeps/ia64/fpu/doasin.c rename to ports/sysdeps/ia64/fpu/doasin.c diff --git a/sysdeps/ia64/fpu/dosincos.c b/ports/sysdeps/ia64/fpu/dosincos.c similarity index 100% rename from sysdeps/ia64/fpu/dosincos.c rename to ports/sysdeps/ia64/fpu/dosincos.c diff --git a/sysdeps/ia64/fpu/e_acos.S b/ports/sysdeps/ia64/fpu/e_acos.S similarity index 100% rename from sysdeps/ia64/fpu/e_acos.S rename to ports/sysdeps/ia64/fpu/e_acos.S diff --git a/sysdeps/ia64/fpu/e_acosf.S b/ports/sysdeps/ia64/fpu/e_acosf.S similarity index 100% rename from sysdeps/ia64/fpu/e_acosf.S rename to ports/sysdeps/ia64/fpu/e_acosf.S diff --git a/sysdeps/ia64/fpu/e_acosh.S b/ports/sysdeps/ia64/fpu/e_acosh.S similarity index 100% rename from sysdeps/ia64/fpu/e_acosh.S rename to ports/sysdeps/ia64/fpu/e_acosh.S diff --git a/sysdeps/ia64/fpu/e_acoshf.S b/ports/sysdeps/ia64/fpu/e_acoshf.S similarity index 100% rename from sysdeps/ia64/fpu/e_acoshf.S rename to ports/sysdeps/ia64/fpu/e_acoshf.S diff --git a/sysdeps/ia64/fpu/e_acoshl.S b/ports/sysdeps/ia64/fpu/e_acoshl.S similarity index 100% rename from sysdeps/ia64/fpu/e_acoshl.S rename to ports/sysdeps/ia64/fpu/e_acoshl.S diff --git a/sysdeps/ia64/fpu/e_acosl.S b/ports/sysdeps/ia64/fpu/e_acosl.S similarity index 100% rename from sysdeps/ia64/fpu/e_acosl.S rename to ports/sysdeps/ia64/fpu/e_acosl.S diff --git a/sysdeps/ia64/fpu/e_asin.S b/ports/sysdeps/ia64/fpu/e_asin.S similarity index 100% rename from sysdeps/ia64/fpu/e_asin.S rename to ports/sysdeps/ia64/fpu/e_asin.S diff --git a/sysdeps/ia64/fpu/e_asinf.S b/ports/sysdeps/ia64/fpu/e_asinf.S similarity index 100% rename from sysdeps/ia64/fpu/e_asinf.S rename to ports/sysdeps/ia64/fpu/e_asinf.S diff --git a/sysdeps/ia64/fpu/e_asinl.S b/ports/sysdeps/ia64/fpu/e_asinl.S similarity index 100% rename from sysdeps/ia64/fpu/e_asinl.S rename to ports/sysdeps/ia64/fpu/e_asinl.S diff --git a/sysdeps/ia64/fpu/e_atan2.S b/ports/sysdeps/ia64/fpu/e_atan2.S similarity index 100% rename from sysdeps/ia64/fpu/e_atan2.S rename to ports/sysdeps/ia64/fpu/e_atan2.S diff --git a/sysdeps/ia64/fpu/e_atan2f.S b/ports/sysdeps/ia64/fpu/e_atan2f.S similarity index 100% rename from sysdeps/ia64/fpu/e_atan2f.S rename to ports/sysdeps/ia64/fpu/e_atan2f.S diff --git a/sysdeps/ia64/fpu/e_atan2l.c b/ports/sysdeps/ia64/fpu/e_atan2l.c similarity index 100% rename from sysdeps/ia64/fpu/e_atan2l.c rename to ports/sysdeps/ia64/fpu/e_atan2l.c diff --git a/sysdeps/ia64/fpu/e_atanh.S b/ports/sysdeps/ia64/fpu/e_atanh.S similarity index 100% rename from sysdeps/ia64/fpu/e_atanh.S rename to ports/sysdeps/ia64/fpu/e_atanh.S diff --git a/sysdeps/ia64/fpu/e_atanhf.S b/ports/sysdeps/ia64/fpu/e_atanhf.S similarity index 100% rename from sysdeps/ia64/fpu/e_atanhf.S rename to ports/sysdeps/ia64/fpu/e_atanhf.S diff --git a/sysdeps/ia64/fpu/e_atanhl.S b/ports/sysdeps/ia64/fpu/e_atanhl.S similarity index 100% rename from sysdeps/ia64/fpu/e_atanhl.S rename to ports/sysdeps/ia64/fpu/e_atanhl.S diff --git a/sysdeps/ia64/fpu/e_cosh.S b/ports/sysdeps/ia64/fpu/e_cosh.S similarity index 100% rename from sysdeps/ia64/fpu/e_cosh.S rename to ports/sysdeps/ia64/fpu/e_cosh.S diff --git a/sysdeps/ia64/fpu/e_coshf.S b/ports/sysdeps/ia64/fpu/e_coshf.S similarity index 100% rename from sysdeps/ia64/fpu/e_coshf.S rename to ports/sysdeps/ia64/fpu/e_coshf.S diff --git a/sysdeps/ia64/fpu/e_coshl.S b/ports/sysdeps/ia64/fpu/e_coshl.S similarity index 100% rename from sysdeps/ia64/fpu/e_coshl.S rename to ports/sysdeps/ia64/fpu/e_coshl.S diff --git a/sysdeps/ia64/fpu/e_exp.S b/ports/sysdeps/ia64/fpu/e_exp.S similarity index 100% rename from sysdeps/ia64/fpu/e_exp.S rename to ports/sysdeps/ia64/fpu/e_exp.S diff --git a/sysdeps/ia64/fpu/e_exp10.S b/ports/sysdeps/ia64/fpu/e_exp10.S similarity index 100% rename from sysdeps/ia64/fpu/e_exp10.S rename to ports/sysdeps/ia64/fpu/e_exp10.S diff --git a/sysdeps/ia64/fpu/e_exp10f.S b/ports/sysdeps/ia64/fpu/e_exp10f.S similarity index 100% rename from sysdeps/ia64/fpu/e_exp10f.S rename to ports/sysdeps/ia64/fpu/e_exp10f.S diff --git a/sysdeps/ia64/fpu/e_exp10l.S b/ports/sysdeps/ia64/fpu/e_exp10l.S similarity index 100% rename from sysdeps/ia64/fpu/e_exp10l.S rename to ports/sysdeps/ia64/fpu/e_exp10l.S diff --git a/sysdeps/ia64/fpu/e_exp2.S b/ports/sysdeps/ia64/fpu/e_exp2.S similarity index 100% rename from sysdeps/ia64/fpu/e_exp2.S rename to ports/sysdeps/ia64/fpu/e_exp2.S diff --git a/sysdeps/ia64/fpu/e_exp2f.S b/ports/sysdeps/ia64/fpu/e_exp2f.S similarity index 100% rename from sysdeps/ia64/fpu/e_exp2f.S rename to ports/sysdeps/ia64/fpu/e_exp2f.S diff --git a/sysdeps/ia64/fpu/e_exp2l.S b/ports/sysdeps/ia64/fpu/e_exp2l.S similarity index 100% rename from sysdeps/ia64/fpu/e_exp2l.S rename to ports/sysdeps/ia64/fpu/e_exp2l.S diff --git a/sysdeps/ia64/fpu/e_expf.S b/ports/sysdeps/ia64/fpu/e_expf.S similarity index 100% rename from sysdeps/ia64/fpu/e_expf.S rename to ports/sysdeps/ia64/fpu/e_expf.S diff --git a/sysdeps/ia64/fpu/e_expl.c b/ports/sysdeps/ia64/fpu/e_expl.c similarity index 100% rename from sysdeps/ia64/fpu/e_expl.c rename to ports/sysdeps/ia64/fpu/e_expl.c diff --git a/sysdeps/ia64/fpu/e_fmod.S b/ports/sysdeps/ia64/fpu/e_fmod.S similarity index 100% rename from sysdeps/ia64/fpu/e_fmod.S rename to ports/sysdeps/ia64/fpu/e_fmod.S diff --git a/sysdeps/ia64/fpu/e_fmodf.S b/ports/sysdeps/ia64/fpu/e_fmodf.S similarity index 100% rename from sysdeps/ia64/fpu/e_fmodf.S rename to ports/sysdeps/ia64/fpu/e_fmodf.S diff --git a/sysdeps/ia64/fpu/e_fmodl.S b/ports/sysdeps/ia64/fpu/e_fmodl.S similarity index 100% rename from sysdeps/ia64/fpu/e_fmodl.S rename to ports/sysdeps/ia64/fpu/e_fmodl.S diff --git a/sysdeps/ia64/fpu/e_gamma_r.c b/ports/sysdeps/ia64/fpu/e_gamma_r.c similarity index 100% rename from sysdeps/ia64/fpu/e_gamma_r.c rename to ports/sysdeps/ia64/fpu/e_gamma_r.c diff --git a/sysdeps/ia64/fpu/e_gammaf_r.c b/ports/sysdeps/ia64/fpu/e_gammaf_r.c similarity index 100% rename from sysdeps/ia64/fpu/e_gammaf_r.c rename to ports/sysdeps/ia64/fpu/e_gammaf_r.c diff --git a/sysdeps/ia64/fpu/e_gammal_r.c b/ports/sysdeps/ia64/fpu/e_gammal_r.c similarity index 100% rename from sysdeps/ia64/fpu/e_gammal_r.c rename to ports/sysdeps/ia64/fpu/e_gammal_r.c diff --git a/sysdeps/ia64/fpu/e_hypot.S b/ports/sysdeps/ia64/fpu/e_hypot.S similarity index 100% rename from sysdeps/ia64/fpu/e_hypot.S rename to ports/sysdeps/ia64/fpu/e_hypot.S diff --git a/sysdeps/ia64/fpu/e_hypotf.S b/ports/sysdeps/ia64/fpu/e_hypotf.S similarity index 100% rename from sysdeps/ia64/fpu/e_hypotf.S rename to ports/sysdeps/ia64/fpu/e_hypotf.S diff --git a/sysdeps/ia64/fpu/e_hypotl.S b/ports/sysdeps/ia64/fpu/e_hypotl.S similarity index 100% rename from sysdeps/ia64/fpu/e_hypotl.S rename to ports/sysdeps/ia64/fpu/e_hypotl.S diff --git a/sysdeps/ia64/fpu/e_ilogbl.S b/ports/sysdeps/ia64/fpu/e_ilogbl.S similarity index 100% rename from sysdeps/ia64/fpu/e_ilogbl.S rename to ports/sysdeps/ia64/fpu/e_ilogbl.S diff --git a/sysdeps/ia64/fpu/e_lgamma_r.c b/ports/sysdeps/ia64/fpu/e_lgamma_r.c similarity index 100% rename from sysdeps/ia64/fpu/e_lgamma_r.c rename to ports/sysdeps/ia64/fpu/e_lgamma_r.c diff --git a/sysdeps/ia64/fpu/e_lgammaf_r.c b/ports/sysdeps/ia64/fpu/e_lgammaf_r.c similarity index 100% rename from sysdeps/ia64/fpu/e_lgammaf_r.c rename to ports/sysdeps/ia64/fpu/e_lgammaf_r.c diff --git a/sysdeps/ia64/fpu/e_lgammal_r.c b/ports/sysdeps/ia64/fpu/e_lgammal_r.c similarity index 100% rename from sysdeps/ia64/fpu/e_lgammal_r.c rename to ports/sysdeps/ia64/fpu/e_lgammal_r.c diff --git a/sysdeps/ia64/fpu/e_log.S b/ports/sysdeps/ia64/fpu/e_log.S similarity index 100% rename from sysdeps/ia64/fpu/e_log.S rename to ports/sysdeps/ia64/fpu/e_log.S diff --git a/sysdeps/ia64/fpu/e_log10.c b/ports/sysdeps/ia64/fpu/e_log10.c similarity index 100% rename from sysdeps/ia64/fpu/e_log10.c rename to ports/sysdeps/ia64/fpu/e_log10.c diff --git a/sysdeps/ia64/fpu/e_log10f.c b/ports/sysdeps/ia64/fpu/e_log10f.c similarity index 100% rename from sysdeps/ia64/fpu/e_log10f.c rename to ports/sysdeps/ia64/fpu/e_log10f.c diff --git a/sysdeps/ia64/fpu/e_log10l.c b/ports/sysdeps/ia64/fpu/e_log10l.c similarity index 100% rename from sysdeps/ia64/fpu/e_log10l.c rename to ports/sysdeps/ia64/fpu/e_log10l.c diff --git a/sysdeps/ia64/fpu/e_log2.S b/ports/sysdeps/ia64/fpu/e_log2.S similarity index 100% rename from sysdeps/ia64/fpu/e_log2.S rename to ports/sysdeps/ia64/fpu/e_log2.S diff --git a/sysdeps/ia64/fpu/e_log2f.S b/ports/sysdeps/ia64/fpu/e_log2f.S similarity index 100% rename from sysdeps/ia64/fpu/e_log2f.S rename to ports/sysdeps/ia64/fpu/e_log2f.S diff --git a/sysdeps/ia64/fpu/e_log2l.S b/ports/sysdeps/ia64/fpu/e_log2l.S similarity index 100% rename from sysdeps/ia64/fpu/e_log2l.S rename to ports/sysdeps/ia64/fpu/e_log2l.S diff --git a/sysdeps/ia64/fpu/e_logf.S b/ports/sysdeps/ia64/fpu/e_logf.S similarity index 100% rename from sysdeps/ia64/fpu/e_logf.S rename to ports/sysdeps/ia64/fpu/e_logf.S diff --git a/sysdeps/ia64/fpu/e_logl.S b/ports/sysdeps/ia64/fpu/e_logl.S similarity index 100% rename from sysdeps/ia64/fpu/e_logl.S rename to ports/sysdeps/ia64/fpu/e_logl.S diff --git a/sysdeps/ia64/fpu/e_pow.S b/ports/sysdeps/ia64/fpu/e_pow.S similarity index 100% rename from sysdeps/ia64/fpu/e_pow.S rename to ports/sysdeps/ia64/fpu/e_pow.S diff --git a/sysdeps/ia64/fpu/e_powf.S b/ports/sysdeps/ia64/fpu/e_powf.S similarity index 100% rename from sysdeps/ia64/fpu/e_powf.S rename to ports/sysdeps/ia64/fpu/e_powf.S diff --git a/sysdeps/ia64/fpu/e_powl.S b/ports/sysdeps/ia64/fpu/e_powl.S similarity index 100% rename from sysdeps/ia64/fpu/e_powl.S rename to ports/sysdeps/ia64/fpu/e_powl.S diff --git a/sysdeps/ia64/fpu/e_rem_pio2.c b/ports/sysdeps/ia64/fpu/e_rem_pio2.c similarity index 100% rename from sysdeps/ia64/fpu/e_rem_pio2.c rename to ports/sysdeps/ia64/fpu/e_rem_pio2.c diff --git a/sysdeps/ia64/fpu/e_rem_pio2f.c b/ports/sysdeps/ia64/fpu/e_rem_pio2f.c similarity index 100% rename from sysdeps/ia64/fpu/e_rem_pio2f.c rename to ports/sysdeps/ia64/fpu/e_rem_pio2f.c diff --git a/sysdeps/ia64/fpu/e_rem_pio2l.c b/ports/sysdeps/ia64/fpu/e_rem_pio2l.c similarity index 100% rename from sysdeps/ia64/fpu/e_rem_pio2l.c rename to ports/sysdeps/ia64/fpu/e_rem_pio2l.c diff --git a/sysdeps/ia64/fpu/e_remainder.S b/ports/sysdeps/ia64/fpu/e_remainder.S similarity index 100% rename from sysdeps/ia64/fpu/e_remainder.S rename to ports/sysdeps/ia64/fpu/e_remainder.S diff --git a/sysdeps/ia64/fpu/e_remainderf.S b/ports/sysdeps/ia64/fpu/e_remainderf.S similarity index 100% rename from sysdeps/ia64/fpu/e_remainderf.S rename to ports/sysdeps/ia64/fpu/e_remainderf.S diff --git a/sysdeps/ia64/fpu/e_remainderl.S b/ports/sysdeps/ia64/fpu/e_remainderl.S similarity index 100% rename from sysdeps/ia64/fpu/e_remainderl.S rename to ports/sysdeps/ia64/fpu/e_remainderl.S diff --git a/sysdeps/ia64/fpu/e_scalb.S b/ports/sysdeps/ia64/fpu/e_scalb.S similarity index 100% rename from sysdeps/ia64/fpu/e_scalb.S rename to ports/sysdeps/ia64/fpu/e_scalb.S diff --git a/sysdeps/ia64/fpu/e_scalbf.S b/ports/sysdeps/ia64/fpu/e_scalbf.S similarity index 100% rename from sysdeps/ia64/fpu/e_scalbf.S rename to ports/sysdeps/ia64/fpu/e_scalbf.S diff --git a/sysdeps/ia64/fpu/e_scalbl.S b/ports/sysdeps/ia64/fpu/e_scalbl.S similarity index 100% rename from sysdeps/ia64/fpu/e_scalbl.S rename to ports/sysdeps/ia64/fpu/e_scalbl.S diff --git a/sysdeps/ia64/fpu/e_sinh.S b/ports/sysdeps/ia64/fpu/e_sinh.S similarity index 100% rename from sysdeps/ia64/fpu/e_sinh.S rename to ports/sysdeps/ia64/fpu/e_sinh.S diff --git a/sysdeps/ia64/fpu/e_sinhf.S b/ports/sysdeps/ia64/fpu/e_sinhf.S similarity index 100% rename from sysdeps/ia64/fpu/e_sinhf.S rename to ports/sysdeps/ia64/fpu/e_sinhf.S diff --git a/sysdeps/ia64/fpu/e_sinhl.S b/ports/sysdeps/ia64/fpu/e_sinhl.S similarity index 100% rename from sysdeps/ia64/fpu/e_sinhl.S rename to ports/sysdeps/ia64/fpu/e_sinhl.S diff --git a/sysdeps/ia64/fpu/e_sqrt.S b/ports/sysdeps/ia64/fpu/e_sqrt.S similarity index 100% rename from sysdeps/ia64/fpu/e_sqrt.S rename to ports/sysdeps/ia64/fpu/e_sqrt.S diff --git a/sysdeps/ia64/fpu/e_sqrtf.S b/ports/sysdeps/ia64/fpu/e_sqrtf.S similarity index 100% rename from sysdeps/ia64/fpu/e_sqrtf.S rename to ports/sysdeps/ia64/fpu/e_sqrtf.S diff --git a/sysdeps/ia64/fpu/e_sqrtl.S b/ports/sysdeps/ia64/fpu/e_sqrtl.S similarity index 100% rename from sysdeps/ia64/fpu/e_sqrtl.S rename to ports/sysdeps/ia64/fpu/e_sqrtl.S diff --git a/sysdeps/ia64/fpu/fclrexcpt.c b/ports/sysdeps/ia64/fpu/fclrexcpt.c similarity index 100% rename from sysdeps/ia64/fpu/fclrexcpt.c rename to ports/sysdeps/ia64/fpu/fclrexcpt.c diff --git a/sysdeps/ia64/fpu/fedisblxcpt.c b/ports/sysdeps/ia64/fpu/fedisblxcpt.c similarity index 100% rename from sysdeps/ia64/fpu/fedisblxcpt.c rename to ports/sysdeps/ia64/fpu/fedisblxcpt.c diff --git a/sysdeps/ia64/fpu/feenablxcpt.c b/ports/sysdeps/ia64/fpu/feenablxcpt.c similarity index 100% rename from sysdeps/ia64/fpu/feenablxcpt.c rename to ports/sysdeps/ia64/fpu/feenablxcpt.c diff --git a/sysdeps/ia64/fpu/fegetenv.c b/ports/sysdeps/ia64/fpu/fegetenv.c similarity index 100% rename from sysdeps/ia64/fpu/fegetenv.c rename to ports/sysdeps/ia64/fpu/fegetenv.c diff --git a/sysdeps/ia64/fpu/fegetexcept.c b/ports/sysdeps/ia64/fpu/fegetexcept.c similarity index 100% rename from sysdeps/ia64/fpu/fegetexcept.c rename to ports/sysdeps/ia64/fpu/fegetexcept.c diff --git a/sysdeps/ia64/fpu/fegetround.c b/ports/sysdeps/ia64/fpu/fegetround.c similarity index 100% rename from sysdeps/ia64/fpu/fegetround.c rename to ports/sysdeps/ia64/fpu/fegetround.c diff --git a/sysdeps/ia64/fpu/feholdexcpt.c b/ports/sysdeps/ia64/fpu/feholdexcpt.c similarity index 100% rename from sysdeps/ia64/fpu/feholdexcpt.c rename to ports/sysdeps/ia64/fpu/feholdexcpt.c diff --git a/sysdeps/ia64/fpu/fesetenv.c b/ports/sysdeps/ia64/fpu/fesetenv.c similarity index 100% rename from sysdeps/ia64/fpu/fesetenv.c rename to ports/sysdeps/ia64/fpu/fesetenv.c diff --git a/sysdeps/ia64/fpu/fesetround.c b/ports/sysdeps/ia64/fpu/fesetround.c similarity index 100% rename from sysdeps/ia64/fpu/fesetround.c rename to ports/sysdeps/ia64/fpu/fesetround.c diff --git a/sysdeps/ia64/fpu/feupdateenv.c b/ports/sysdeps/ia64/fpu/feupdateenv.c similarity index 100% rename from sysdeps/ia64/fpu/feupdateenv.c rename to ports/sysdeps/ia64/fpu/feupdateenv.c diff --git a/sysdeps/ia64/fpu/fgetexcptflg.c b/ports/sysdeps/ia64/fpu/fgetexcptflg.c similarity index 100% rename from sysdeps/ia64/fpu/fgetexcptflg.c rename to ports/sysdeps/ia64/fpu/fgetexcptflg.c diff --git a/sysdeps/ia64/fpu/fraiseexcpt.c b/ports/sysdeps/ia64/fpu/fraiseexcpt.c similarity index 100% rename from sysdeps/ia64/fpu/fraiseexcpt.c rename to ports/sysdeps/ia64/fpu/fraiseexcpt.c diff --git a/sysdeps/ia64/fpu/fsetexcptflg.c b/ports/sysdeps/ia64/fpu/fsetexcptflg.c similarity index 100% rename from sysdeps/ia64/fpu/fsetexcptflg.c rename to ports/sysdeps/ia64/fpu/fsetexcptflg.c diff --git a/sysdeps/ia64/fpu/ftestexcept.c b/ports/sysdeps/ia64/fpu/ftestexcept.c similarity index 100% rename from sysdeps/ia64/fpu/ftestexcept.c rename to ports/sysdeps/ia64/fpu/ftestexcept.c diff --git a/sysdeps/ia64/fpu/gen_import_file_list b/ports/sysdeps/ia64/fpu/gen_import_file_list similarity index 100% rename from sysdeps/ia64/fpu/gen_import_file_list rename to ports/sysdeps/ia64/fpu/gen_import_file_list diff --git a/sysdeps/ia64/fpu/halfulp.c b/ports/sysdeps/ia64/fpu/halfulp.c similarity index 100% rename from sysdeps/ia64/fpu/halfulp.c rename to ports/sysdeps/ia64/fpu/halfulp.c diff --git a/sysdeps/ia64/fpu/import_check b/ports/sysdeps/ia64/fpu/import_check similarity index 100% rename from sysdeps/ia64/fpu/import_check rename to ports/sysdeps/ia64/fpu/import_check diff --git a/sysdeps/ia64/fpu/import_diffs b/ports/sysdeps/ia64/fpu/import_diffs similarity index 100% rename from sysdeps/ia64/fpu/import_diffs rename to ports/sysdeps/ia64/fpu/import_diffs diff --git a/sysdeps/ia64/fpu/import_file.awk b/ports/sysdeps/ia64/fpu/import_file.awk similarity index 100% rename from sysdeps/ia64/fpu/import_file.awk rename to ports/sysdeps/ia64/fpu/import_file.awk diff --git a/sysdeps/ia64/fpu/import_intel_libm b/ports/sysdeps/ia64/fpu/import_intel_libm similarity index 100% rename from sysdeps/ia64/fpu/import_intel_libm rename to ports/sysdeps/ia64/fpu/import_intel_libm diff --git a/sysdeps/ia64/fpu/k_rem_pio2.c b/ports/sysdeps/ia64/fpu/k_rem_pio2.c similarity index 100% rename from sysdeps/ia64/fpu/k_rem_pio2.c rename to ports/sysdeps/ia64/fpu/k_rem_pio2.c diff --git a/sysdeps/ia64/fpu/k_rem_pio2f.c b/ports/sysdeps/ia64/fpu/k_rem_pio2f.c similarity index 100% rename from sysdeps/ia64/fpu/k_rem_pio2f.c rename to ports/sysdeps/ia64/fpu/k_rem_pio2f.c diff --git a/sysdeps/ia64/fpu/k_rem_pio2l.c b/ports/sysdeps/ia64/fpu/k_rem_pio2l.c similarity index 100% rename from sysdeps/ia64/fpu/k_rem_pio2l.c rename to ports/sysdeps/ia64/fpu/k_rem_pio2l.c diff --git a/sysdeps/ia64/fpu/libc_libm_error.c b/ports/sysdeps/ia64/fpu/libc_libm_error.c similarity index 100% rename from sysdeps/ia64/fpu/libc_libm_error.c rename to ports/sysdeps/ia64/fpu/libc_libm_error.c diff --git a/sysdeps/ia64/fpu/libm-symbols.h b/ports/sysdeps/ia64/fpu/libm-symbols.h similarity index 100% rename from sysdeps/ia64/fpu/libm-symbols.h rename to ports/sysdeps/ia64/fpu/libm-symbols.h diff --git a/sysdeps/ia64/fpu/libm-test-ulps b/ports/sysdeps/ia64/fpu/libm-test-ulps similarity index 100% rename from sysdeps/ia64/fpu/libm-test-ulps rename to ports/sysdeps/ia64/fpu/libm-test-ulps diff --git a/sysdeps/ia64/fpu/libm_cpu_defs.h b/ports/sysdeps/ia64/fpu/libm_cpu_defs.h similarity index 100% rename from sysdeps/ia64/fpu/libm_cpu_defs.h rename to ports/sysdeps/ia64/fpu/libm_cpu_defs.h diff --git a/sysdeps/ia64/fpu/libm_error.c b/ports/sysdeps/ia64/fpu/libm_error.c similarity index 100% rename from sysdeps/ia64/fpu/libm_error.c rename to ports/sysdeps/ia64/fpu/libm_error.c diff --git a/sysdeps/ia64/fpu/libm_error_codes.h b/ports/sysdeps/ia64/fpu/libm_error_codes.h similarity index 100% rename from sysdeps/ia64/fpu/libm_error_codes.h rename to ports/sysdeps/ia64/fpu/libm_error_codes.h diff --git a/sysdeps/ia64/fpu/libm_frexp.S b/ports/sysdeps/ia64/fpu/libm_frexp.S similarity index 100% rename from sysdeps/ia64/fpu/libm_frexp.S rename to ports/sysdeps/ia64/fpu/libm_frexp.S diff --git a/sysdeps/ia64/fpu/libm_frexp4.S b/ports/sysdeps/ia64/fpu/libm_frexp4.S similarity index 100% rename from sysdeps/ia64/fpu/libm_frexp4.S rename to ports/sysdeps/ia64/fpu/libm_frexp4.S diff --git a/sysdeps/ia64/fpu/libm_frexp4f.S b/ports/sysdeps/ia64/fpu/libm_frexp4f.S similarity index 100% rename from sysdeps/ia64/fpu/libm_frexp4f.S rename to ports/sysdeps/ia64/fpu/libm_frexp4f.S diff --git a/sysdeps/ia64/fpu/libm_frexp4l.S b/ports/sysdeps/ia64/fpu/libm_frexp4l.S similarity index 100% rename from sysdeps/ia64/fpu/libm_frexp4l.S rename to ports/sysdeps/ia64/fpu/libm_frexp4l.S diff --git a/sysdeps/ia64/fpu/libm_frexpf.S b/ports/sysdeps/ia64/fpu/libm_frexpf.S similarity index 100% rename from sysdeps/ia64/fpu/libm_frexpf.S rename to ports/sysdeps/ia64/fpu/libm_frexpf.S diff --git a/sysdeps/ia64/fpu/libm_frexpl.S b/ports/sysdeps/ia64/fpu/libm_frexpl.S similarity index 100% rename from sysdeps/ia64/fpu/libm_frexpl.S rename to ports/sysdeps/ia64/fpu/libm_frexpl.S diff --git a/sysdeps/ia64/fpu/libm_lgamma.S b/ports/sysdeps/ia64/fpu/libm_lgamma.S similarity index 100% rename from sysdeps/ia64/fpu/libm_lgamma.S rename to ports/sysdeps/ia64/fpu/libm_lgamma.S diff --git a/sysdeps/ia64/fpu/libm_lgammaf.S b/ports/sysdeps/ia64/fpu/libm_lgammaf.S similarity index 100% rename from sysdeps/ia64/fpu/libm_lgammaf.S rename to ports/sysdeps/ia64/fpu/libm_lgammaf.S diff --git a/sysdeps/ia64/fpu/libm_lgammal.S b/ports/sysdeps/ia64/fpu/libm_lgammal.S similarity index 100% rename from sysdeps/ia64/fpu/libm_lgammal.S rename to ports/sysdeps/ia64/fpu/libm_lgammal.S diff --git a/sysdeps/ia64/fpu/libm_reduce.S b/ports/sysdeps/ia64/fpu/libm_reduce.S similarity index 100% rename from sysdeps/ia64/fpu/libm_reduce.S rename to ports/sysdeps/ia64/fpu/libm_reduce.S diff --git a/sysdeps/ia64/fpu/libm_scalblnf.S b/ports/sysdeps/ia64/fpu/libm_scalblnf.S similarity index 100% rename from sysdeps/ia64/fpu/libm_scalblnf.S rename to ports/sysdeps/ia64/fpu/libm_scalblnf.S diff --git a/sysdeps/ia64/fpu/libm_sincos.S b/ports/sysdeps/ia64/fpu/libm_sincos.S similarity index 100% rename from sysdeps/ia64/fpu/libm_sincos.S rename to ports/sysdeps/ia64/fpu/libm_sincos.S diff --git a/sysdeps/ia64/fpu/libm_sincos_large.S b/ports/sysdeps/ia64/fpu/libm_sincos_large.S similarity index 100% rename from sysdeps/ia64/fpu/libm_sincos_large.S rename to ports/sysdeps/ia64/fpu/libm_sincos_large.S diff --git a/sysdeps/ia64/fpu/libm_sincosf.S b/ports/sysdeps/ia64/fpu/libm_sincosf.S similarity index 100% rename from sysdeps/ia64/fpu/libm_sincosf.S rename to ports/sysdeps/ia64/fpu/libm_sincosf.S diff --git a/sysdeps/ia64/fpu/libm_sincosl.S b/ports/sysdeps/ia64/fpu/libm_sincosl.S similarity index 100% rename from sysdeps/ia64/fpu/libm_sincosl.S rename to ports/sysdeps/ia64/fpu/libm_sincosl.S diff --git a/sysdeps/ia64/fpu/libm_support.h b/ports/sysdeps/ia64/fpu/libm_support.h similarity index 100% rename from sysdeps/ia64/fpu/libm_support.h rename to ports/sysdeps/ia64/fpu/libm_support.h diff --git a/sysdeps/ia64/fpu/libm_tan.S b/ports/sysdeps/ia64/fpu/libm_tan.S similarity index 100% rename from sysdeps/ia64/fpu/libm_tan.S rename to ports/sysdeps/ia64/fpu/libm_tan.S diff --git a/sysdeps/ia64/fpu/math_ldbl.h b/ports/sysdeps/ia64/fpu/math_ldbl.h similarity index 100% rename from sysdeps/ia64/fpu/math_ldbl.h rename to ports/sysdeps/ia64/fpu/math_ldbl.h diff --git a/sysdeps/ia64/fpu/mpa.c b/ports/sysdeps/ia64/fpu/mpa.c similarity index 100% rename from sysdeps/ia64/fpu/mpa.c rename to ports/sysdeps/ia64/fpu/mpa.c diff --git a/sysdeps/ia64/fpu/mpatan.c b/ports/sysdeps/ia64/fpu/mpatan.c similarity index 100% rename from sysdeps/ia64/fpu/mpatan.c rename to ports/sysdeps/ia64/fpu/mpatan.c diff --git a/sysdeps/ia64/fpu/mpatan2.c b/ports/sysdeps/ia64/fpu/mpatan2.c similarity index 100% rename from sysdeps/ia64/fpu/mpatan2.c rename to ports/sysdeps/ia64/fpu/mpatan2.c diff --git a/sysdeps/ia64/fpu/mpexp.c b/ports/sysdeps/ia64/fpu/mpexp.c similarity index 100% rename from sysdeps/ia64/fpu/mpexp.c rename to ports/sysdeps/ia64/fpu/mpexp.c diff --git a/sysdeps/ia64/fpu/mplog.c b/ports/sysdeps/ia64/fpu/mplog.c similarity index 100% rename from sysdeps/ia64/fpu/mplog.c rename to ports/sysdeps/ia64/fpu/mplog.c diff --git a/sysdeps/ia64/fpu/mpsqrt.c b/ports/sysdeps/ia64/fpu/mpsqrt.c similarity index 100% rename from sysdeps/ia64/fpu/mpsqrt.c rename to ports/sysdeps/ia64/fpu/mpsqrt.c diff --git a/sysdeps/ia64/fpu/mptan.c b/ports/sysdeps/ia64/fpu/mptan.c similarity index 100% rename from sysdeps/ia64/fpu/mptan.c rename to ports/sysdeps/ia64/fpu/mptan.c diff --git a/sysdeps/ia64/fpu/printf_fphex.c b/ports/sysdeps/ia64/fpu/printf_fphex.c similarity index 100% rename from sysdeps/ia64/fpu/printf_fphex.c rename to ports/sysdeps/ia64/fpu/printf_fphex.c diff --git a/sysdeps/ia64/fpu/s_asinh.S b/ports/sysdeps/ia64/fpu/s_asinh.S similarity index 100% rename from sysdeps/ia64/fpu/s_asinh.S rename to ports/sysdeps/ia64/fpu/s_asinh.S diff --git a/sysdeps/ia64/fpu/s_asinhf.S b/ports/sysdeps/ia64/fpu/s_asinhf.S similarity index 100% rename from sysdeps/ia64/fpu/s_asinhf.S rename to ports/sysdeps/ia64/fpu/s_asinhf.S diff --git a/sysdeps/ia64/fpu/s_asinhl.S b/ports/sysdeps/ia64/fpu/s_asinhl.S similarity index 100% rename from sysdeps/ia64/fpu/s_asinhl.S rename to ports/sysdeps/ia64/fpu/s_asinhl.S diff --git a/sysdeps/ia64/fpu/s_atan.S b/ports/sysdeps/ia64/fpu/s_atan.S similarity index 100% rename from sysdeps/ia64/fpu/s_atan.S rename to ports/sysdeps/ia64/fpu/s_atan.S diff --git a/sysdeps/ia64/fpu/s_atanf.S b/ports/sysdeps/ia64/fpu/s_atanf.S similarity index 100% rename from sysdeps/ia64/fpu/s_atanf.S rename to ports/sysdeps/ia64/fpu/s_atanf.S diff --git a/sysdeps/ia64/fpu/s_atanl.S b/ports/sysdeps/ia64/fpu/s_atanl.S similarity index 100% rename from sysdeps/ia64/fpu/s_atanl.S rename to ports/sysdeps/ia64/fpu/s_atanl.S diff --git a/sysdeps/ia64/fpu/s_cbrt.S b/ports/sysdeps/ia64/fpu/s_cbrt.S similarity index 100% rename from sysdeps/ia64/fpu/s_cbrt.S rename to ports/sysdeps/ia64/fpu/s_cbrt.S diff --git a/sysdeps/ia64/fpu/s_cbrtf.S b/ports/sysdeps/ia64/fpu/s_cbrtf.S similarity index 100% rename from sysdeps/ia64/fpu/s_cbrtf.S rename to ports/sysdeps/ia64/fpu/s_cbrtf.S diff --git a/sysdeps/ia64/fpu/s_cbrtl.S b/ports/sysdeps/ia64/fpu/s_cbrtl.S similarity index 100% rename from sysdeps/ia64/fpu/s_cbrtl.S rename to ports/sysdeps/ia64/fpu/s_cbrtl.S diff --git a/sysdeps/ia64/fpu/s_ceil.S b/ports/sysdeps/ia64/fpu/s_ceil.S similarity index 100% rename from sysdeps/ia64/fpu/s_ceil.S rename to ports/sysdeps/ia64/fpu/s_ceil.S diff --git a/sysdeps/ia64/fpu/s_ceilf.S b/ports/sysdeps/ia64/fpu/s_ceilf.S similarity index 100% rename from sysdeps/ia64/fpu/s_ceilf.S rename to ports/sysdeps/ia64/fpu/s_ceilf.S diff --git a/sysdeps/ia64/fpu/s_ceill.S b/ports/sysdeps/ia64/fpu/s_ceill.S similarity index 100% rename from sysdeps/ia64/fpu/s_ceill.S rename to ports/sysdeps/ia64/fpu/s_ceill.S diff --git a/sysdeps/ia64/fpu/s_copysign.S b/ports/sysdeps/ia64/fpu/s_copysign.S similarity index 100% rename from sysdeps/ia64/fpu/s_copysign.S rename to ports/sysdeps/ia64/fpu/s_copysign.S diff --git a/sysdeps/ia64/fpu/s_copysignf.S b/ports/sysdeps/ia64/fpu/s_copysignf.S similarity index 100% rename from sysdeps/ia64/fpu/s_copysignf.S rename to ports/sysdeps/ia64/fpu/s_copysignf.S diff --git a/sysdeps/ia64/fpu/s_copysignl.S b/ports/sysdeps/ia64/fpu/s_copysignl.S similarity index 100% rename from sysdeps/ia64/fpu/s_copysignl.S rename to ports/sysdeps/ia64/fpu/s_copysignl.S diff --git a/sysdeps/ia64/fpu/s_cos.S b/ports/sysdeps/ia64/fpu/s_cos.S similarity index 100% rename from sysdeps/ia64/fpu/s_cos.S rename to ports/sysdeps/ia64/fpu/s_cos.S diff --git a/sysdeps/ia64/fpu/s_cosf.S b/ports/sysdeps/ia64/fpu/s_cosf.S similarity index 100% rename from sysdeps/ia64/fpu/s_cosf.S rename to ports/sysdeps/ia64/fpu/s_cosf.S diff --git a/sysdeps/ia64/fpu/s_cosl.S b/ports/sysdeps/ia64/fpu/s_cosl.S similarity index 100% rename from sysdeps/ia64/fpu/s_cosl.S rename to ports/sysdeps/ia64/fpu/s_cosl.S diff --git a/sysdeps/ia64/fpu/s_erf.S b/ports/sysdeps/ia64/fpu/s_erf.S similarity index 100% rename from sysdeps/ia64/fpu/s_erf.S rename to ports/sysdeps/ia64/fpu/s_erf.S diff --git a/sysdeps/ia64/fpu/s_erfc.S b/ports/sysdeps/ia64/fpu/s_erfc.S similarity index 100% rename from sysdeps/ia64/fpu/s_erfc.S rename to ports/sysdeps/ia64/fpu/s_erfc.S diff --git a/sysdeps/ia64/fpu/s_erfcf.S b/ports/sysdeps/ia64/fpu/s_erfcf.S similarity index 100% rename from sysdeps/ia64/fpu/s_erfcf.S rename to ports/sysdeps/ia64/fpu/s_erfcf.S diff --git a/sysdeps/ia64/fpu/s_erfcl.S b/ports/sysdeps/ia64/fpu/s_erfcl.S similarity index 100% rename from sysdeps/ia64/fpu/s_erfcl.S rename to ports/sysdeps/ia64/fpu/s_erfcl.S diff --git a/sysdeps/ia64/fpu/s_erff.S b/ports/sysdeps/ia64/fpu/s_erff.S similarity index 100% rename from sysdeps/ia64/fpu/s_erff.S rename to ports/sysdeps/ia64/fpu/s_erff.S diff --git a/sysdeps/ia64/fpu/s_erfl.S b/ports/sysdeps/ia64/fpu/s_erfl.S similarity index 100% rename from sysdeps/ia64/fpu/s_erfl.S rename to ports/sysdeps/ia64/fpu/s_erfl.S diff --git a/sysdeps/ia64/fpu/s_expm1.S b/ports/sysdeps/ia64/fpu/s_expm1.S similarity index 100% rename from sysdeps/ia64/fpu/s_expm1.S rename to ports/sysdeps/ia64/fpu/s_expm1.S diff --git a/sysdeps/ia64/fpu/s_expm1f.S b/ports/sysdeps/ia64/fpu/s_expm1f.S similarity index 100% rename from sysdeps/ia64/fpu/s_expm1f.S rename to ports/sysdeps/ia64/fpu/s_expm1f.S diff --git a/sysdeps/ia64/fpu/s_expm1l.S b/ports/sysdeps/ia64/fpu/s_expm1l.S similarity index 100% rename from sysdeps/ia64/fpu/s_expm1l.S rename to ports/sysdeps/ia64/fpu/s_expm1l.S diff --git a/sysdeps/ia64/fpu/s_fabs.S b/ports/sysdeps/ia64/fpu/s_fabs.S similarity index 100% rename from sysdeps/ia64/fpu/s_fabs.S rename to ports/sysdeps/ia64/fpu/s_fabs.S diff --git a/sysdeps/ia64/fpu/s_fabsf.S b/ports/sysdeps/ia64/fpu/s_fabsf.S similarity index 100% rename from sysdeps/ia64/fpu/s_fabsf.S rename to ports/sysdeps/ia64/fpu/s_fabsf.S diff --git a/sysdeps/ia64/fpu/s_fabsl.S b/ports/sysdeps/ia64/fpu/s_fabsl.S similarity index 100% rename from sysdeps/ia64/fpu/s_fabsl.S rename to ports/sysdeps/ia64/fpu/s_fabsl.S diff --git a/sysdeps/ia64/fpu/s_fdim.S b/ports/sysdeps/ia64/fpu/s_fdim.S similarity index 100% rename from sysdeps/ia64/fpu/s_fdim.S rename to ports/sysdeps/ia64/fpu/s_fdim.S diff --git a/sysdeps/ia64/fpu/s_fdimf.S b/ports/sysdeps/ia64/fpu/s_fdimf.S similarity index 100% rename from sysdeps/ia64/fpu/s_fdimf.S rename to ports/sysdeps/ia64/fpu/s_fdimf.S diff --git a/sysdeps/ia64/fpu/s_fdiml.S b/ports/sysdeps/ia64/fpu/s_fdiml.S similarity index 100% rename from sysdeps/ia64/fpu/s_fdiml.S rename to ports/sysdeps/ia64/fpu/s_fdiml.S diff --git a/sysdeps/ia64/fpu/s_finite.S b/ports/sysdeps/ia64/fpu/s_finite.S similarity index 100% rename from sysdeps/ia64/fpu/s_finite.S rename to ports/sysdeps/ia64/fpu/s_finite.S diff --git a/sysdeps/ia64/fpu/s_finitef.S b/ports/sysdeps/ia64/fpu/s_finitef.S similarity index 100% rename from sysdeps/ia64/fpu/s_finitef.S rename to ports/sysdeps/ia64/fpu/s_finitef.S diff --git a/sysdeps/ia64/fpu/s_finitel.S b/ports/sysdeps/ia64/fpu/s_finitel.S similarity index 100% rename from sysdeps/ia64/fpu/s_finitel.S rename to ports/sysdeps/ia64/fpu/s_finitel.S diff --git a/sysdeps/ia64/fpu/s_floor.S b/ports/sysdeps/ia64/fpu/s_floor.S similarity index 100% rename from sysdeps/ia64/fpu/s_floor.S rename to ports/sysdeps/ia64/fpu/s_floor.S diff --git a/sysdeps/ia64/fpu/s_floorf.S b/ports/sysdeps/ia64/fpu/s_floorf.S similarity index 100% rename from sysdeps/ia64/fpu/s_floorf.S rename to ports/sysdeps/ia64/fpu/s_floorf.S diff --git a/sysdeps/ia64/fpu/s_floorl.S b/ports/sysdeps/ia64/fpu/s_floorl.S similarity index 100% rename from sysdeps/ia64/fpu/s_floorl.S rename to ports/sysdeps/ia64/fpu/s_floorl.S diff --git a/sysdeps/ia64/fpu/s_fma.S b/ports/sysdeps/ia64/fpu/s_fma.S similarity index 100% rename from sysdeps/ia64/fpu/s_fma.S rename to ports/sysdeps/ia64/fpu/s_fma.S diff --git a/sysdeps/ia64/fpu/s_fmaf.S b/ports/sysdeps/ia64/fpu/s_fmaf.S similarity index 100% rename from sysdeps/ia64/fpu/s_fmaf.S rename to ports/sysdeps/ia64/fpu/s_fmaf.S diff --git a/sysdeps/ia64/fpu/s_fmal.S b/ports/sysdeps/ia64/fpu/s_fmal.S similarity index 100% rename from sysdeps/ia64/fpu/s_fmal.S rename to ports/sysdeps/ia64/fpu/s_fmal.S diff --git a/sysdeps/ia64/fpu/s_fmax.S b/ports/sysdeps/ia64/fpu/s_fmax.S similarity index 100% rename from sysdeps/ia64/fpu/s_fmax.S rename to ports/sysdeps/ia64/fpu/s_fmax.S diff --git a/sysdeps/ia64/fpu/s_fmaxf.S b/ports/sysdeps/ia64/fpu/s_fmaxf.S similarity index 100% rename from sysdeps/ia64/fpu/s_fmaxf.S rename to ports/sysdeps/ia64/fpu/s_fmaxf.S diff --git a/sysdeps/ia64/fpu/s_fmaxl.S b/ports/sysdeps/ia64/fpu/s_fmaxl.S similarity index 100% rename from sysdeps/ia64/fpu/s_fmaxl.S rename to ports/sysdeps/ia64/fpu/s_fmaxl.S diff --git a/sysdeps/ia64/fpu/s_fpclassify.S b/ports/sysdeps/ia64/fpu/s_fpclassify.S similarity index 100% rename from sysdeps/ia64/fpu/s_fpclassify.S rename to ports/sysdeps/ia64/fpu/s_fpclassify.S diff --git a/sysdeps/ia64/fpu/s_fpclassifyf.S b/ports/sysdeps/ia64/fpu/s_fpclassifyf.S similarity index 100% rename from sysdeps/ia64/fpu/s_fpclassifyf.S rename to ports/sysdeps/ia64/fpu/s_fpclassifyf.S diff --git a/sysdeps/ia64/fpu/s_fpclassifyl.S b/ports/sysdeps/ia64/fpu/s_fpclassifyl.S similarity index 100% rename from sysdeps/ia64/fpu/s_fpclassifyl.S rename to ports/sysdeps/ia64/fpu/s_fpclassifyl.S diff --git a/sysdeps/ia64/fpu/s_frexp.c b/ports/sysdeps/ia64/fpu/s_frexp.c similarity index 100% rename from sysdeps/ia64/fpu/s_frexp.c rename to ports/sysdeps/ia64/fpu/s_frexp.c diff --git a/sysdeps/ia64/fpu/s_frexpf.c b/ports/sysdeps/ia64/fpu/s_frexpf.c similarity index 100% rename from sysdeps/ia64/fpu/s_frexpf.c rename to ports/sysdeps/ia64/fpu/s_frexpf.c diff --git a/sysdeps/ia64/fpu/s_frexpl.c b/ports/sysdeps/ia64/fpu/s_frexpl.c similarity index 100% rename from sysdeps/ia64/fpu/s_frexpl.c rename to ports/sysdeps/ia64/fpu/s_frexpl.c diff --git a/sysdeps/ia64/fpu/s_ilogb.S b/ports/sysdeps/ia64/fpu/s_ilogb.S similarity index 100% rename from sysdeps/ia64/fpu/s_ilogb.S rename to ports/sysdeps/ia64/fpu/s_ilogb.S diff --git a/sysdeps/ia64/fpu/s_ilogbf.S b/ports/sysdeps/ia64/fpu/s_ilogbf.S similarity index 100% rename from sysdeps/ia64/fpu/s_ilogbf.S rename to ports/sysdeps/ia64/fpu/s_ilogbf.S diff --git a/sysdeps/ia64/fpu/s_isinf.S b/ports/sysdeps/ia64/fpu/s_isinf.S similarity index 100% rename from sysdeps/ia64/fpu/s_isinf.S rename to ports/sysdeps/ia64/fpu/s_isinf.S diff --git a/sysdeps/ia64/fpu/s_isinff.S b/ports/sysdeps/ia64/fpu/s_isinff.S similarity index 100% rename from sysdeps/ia64/fpu/s_isinff.S rename to ports/sysdeps/ia64/fpu/s_isinff.S diff --git a/sysdeps/ia64/fpu/s_isinfl.S b/ports/sysdeps/ia64/fpu/s_isinfl.S similarity index 100% rename from sysdeps/ia64/fpu/s_isinfl.S rename to ports/sysdeps/ia64/fpu/s_isinfl.S diff --git a/sysdeps/ia64/fpu/s_isnan.S b/ports/sysdeps/ia64/fpu/s_isnan.S similarity index 100% rename from sysdeps/ia64/fpu/s_isnan.S rename to ports/sysdeps/ia64/fpu/s_isnan.S diff --git a/sysdeps/ia64/fpu/s_isnanf.S b/ports/sysdeps/ia64/fpu/s_isnanf.S similarity index 100% rename from sysdeps/ia64/fpu/s_isnanf.S rename to ports/sysdeps/ia64/fpu/s_isnanf.S diff --git a/sysdeps/ia64/fpu/s_isnanl.S b/ports/sysdeps/ia64/fpu/s_isnanl.S similarity index 100% rename from sysdeps/ia64/fpu/s_isnanl.S rename to ports/sysdeps/ia64/fpu/s_isnanl.S diff --git a/sysdeps/ia64/fpu/s_ldexp.c b/ports/sysdeps/ia64/fpu/s_ldexp.c similarity index 100% rename from sysdeps/ia64/fpu/s_ldexp.c rename to ports/sysdeps/ia64/fpu/s_ldexp.c diff --git a/sysdeps/ia64/fpu/s_ldexpf.c b/ports/sysdeps/ia64/fpu/s_ldexpf.c similarity index 100% rename from sysdeps/ia64/fpu/s_ldexpf.c rename to ports/sysdeps/ia64/fpu/s_ldexpf.c diff --git a/sysdeps/ia64/fpu/s_ldexpl.c b/ports/sysdeps/ia64/fpu/s_ldexpl.c similarity index 100% rename from sysdeps/ia64/fpu/s_ldexpl.c rename to ports/sysdeps/ia64/fpu/s_ldexpl.c diff --git a/sysdeps/ia64/fpu/s_libm_ldexp.S b/ports/sysdeps/ia64/fpu/s_libm_ldexp.S similarity index 100% rename from sysdeps/ia64/fpu/s_libm_ldexp.S rename to ports/sysdeps/ia64/fpu/s_libm_ldexp.S diff --git a/sysdeps/ia64/fpu/s_libm_ldexpf.S b/ports/sysdeps/ia64/fpu/s_libm_ldexpf.S similarity index 100% rename from sysdeps/ia64/fpu/s_libm_ldexpf.S rename to ports/sysdeps/ia64/fpu/s_libm_ldexpf.S diff --git a/sysdeps/ia64/fpu/s_libm_ldexpl.S b/ports/sysdeps/ia64/fpu/s_libm_ldexpl.S similarity index 100% rename from sysdeps/ia64/fpu/s_libm_ldexpl.S rename to ports/sysdeps/ia64/fpu/s_libm_ldexpl.S diff --git a/sysdeps/ia64/fpu/s_libm_scalbn.S b/ports/sysdeps/ia64/fpu/s_libm_scalbn.S similarity index 100% rename from sysdeps/ia64/fpu/s_libm_scalbn.S rename to ports/sysdeps/ia64/fpu/s_libm_scalbn.S diff --git a/sysdeps/ia64/fpu/s_libm_scalbnf.S b/ports/sysdeps/ia64/fpu/s_libm_scalbnf.S similarity index 100% rename from sysdeps/ia64/fpu/s_libm_scalbnf.S rename to ports/sysdeps/ia64/fpu/s_libm_scalbnf.S diff --git a/sysdeps/ia64/fpu/s_libm_scalbnl.S b/ports/sysdeps/ia64/fpu/s_libm_scalbnl.S similarity index 100% rename from sysdeps/ia64/fpu/s_libm_scalbnl.S rename to ports/sysdeps/ia64/fpu/s_libm_scalbnl.S diff --git a/sysdeps/ia64/fpu/s_log1p.S b/ports/sysdeps/ia64/fpu/s_log1p.S similarity index 100% rename from sysdeps/ia64/fpu/s_log1p.S rename to ports/sysdeps/ia64/fpu/s_log1p.S diff --git a/sysdeps/ia64/fpu/s_log1pf.S b/ports/sysdeps/ia64/fpu/s_log1pf.S similarity index 100% rename from sysdeps/ia64/fpu/s_log1pf.S rename to ports/sysdeps/ia64/fpu/s_log1pf.S diff --git a/sysdeps/ia64/fpu/s_log1pl.S b/ports/sysdeps/ia64/fpu/s_log1pl.S similarity index 100% rename from sysdeps/ia64/fpu/s_log1pl.S rename to ports/sysdeps/ia64/fpu/s_log1pl.S diff --git a/sysdeps/ia64/fpu/s_logb.S b/ports/sysdeps/ia64/fpu/s_logb.S similarity index 100% rename from sysdeps/ia64/fpu/s_logb.S rename to ports/sysdeps/ia64/fpu/s_logb.S diff --git a/sysdeps/ia64/fpu/s_logbf.S b/ports/sysdeps/ia64/fpu/s_logbf.S similarity index 100% rename from sysdeps/ia64/fpu/s_logbf.S rename to ports/sysdeps/ia64/fpu/s_logbf.S diff --git a/sysdeps/ia64/fpu/s_logbl.S b/ports/sysdeps/ia64/fpu/s_logbl.S similarity index 100% rename from sysdeps/ia64/fpu/s_logbl.S rename to ports/sysdeps/ia64/fpu/s_logbl.S diff --git a/sysdeps/ia64/fpu/s_matherrf.c b/ports/sysdeps/ia64/fpu/s_matherrf.c similarity index 100% rename from sysdeps/ia64/fpu/s_matherrf.c rename to ports/sysdeps/ia64/fpu/s_matherrf.c diff --git a/sysdeps/ia64/fpu/s_matherrl.c b/ports/sysdeps/ia64/fpu/s_matherrl.c similarity index 100% rename from sysdeps/ia64/fpu/s_matherrl.c rename to ports/sysdeps/ia64/fpu/s_matherrl.c diff --git a/sysdeps/ia64/fpu/s_modf.S b/ports/sysdeps/ia64/fpu/s_modf.S similarity index 100% rename from sysdeps/ia64/fpu/s_modf.S rename to ports/sysdeps/ia64/fpu/s_modf.S diff --git a/sysdeps/ia64/fpu/s_modff.S b/ports/sysdeps/ia64/fpu/s_modff.S similarity index 100% rename from sysdeps/ia64/fpu/s_modff.S rename to ports/sysdeps/ia64/fpu/s_modff.S diff --git a/sysdeps/ia64/fpu/s_modfl.S b/ports/sysdeps/ia64/fpu/s_modfl.S similarity index 100% rename from sysdeps/ia64/fpu/s_modfl.S rename to ports/sysdeps/ia64/fpu/s_modfl.S diff --git a/sysdeps/ia64/fpu/s_nearbyint.S b/ports/sysdeps/ia64/fpu/s_nearbyint.S similarity index 100% rename from sysdeps/ia64/fpu/s_nearbyint.S rename to ports/sysdeps/ia64/fpu/s_nearbyint.S diff --git a/sysdeps/ia64/fpu/s_nearbyintf.S b/ports/sysdeps/ia64/fpu/s_nearbyintf.S similarity index 100% rename from sysdeps/ia64/fpu/s_nearbyintf.S rename to ports/sysdeps/ia64/fpu/s_nearbyintf.S diff --git a/sysdeps/ia64/fpu/s_nearbyintl.S b/ports/sysdeps/ia64/fpu/s_nearbyintl.S similarity index 100% rename from sysdeps/ia64/fpu/s_nearbyintl.S rename to ports/sysdeps/ia64/fpu/s_nearbyintl.S diff --git a/sysdeps/ia64/fpu/s_nextafter.S b/ports/sysdeps/ia64/fpu/s_nextafter.S similarity index 100% rename from sysdeps/ia64/fpu/s_nextafter.S rename to ports/sysdeps/ia64/fpu/s_nextafter.S diff --git a/sysdeps/ia64/fpu/s_nextafterf.S b/ports/sysdeps/ia64/fpu/s_nextafterf.S similarity index 100% rename from sysdeps/ia64/fpu/s_nextafterf.S rename to ports/sysdeps/ia64/fpu/s_nextafterf.S diff --git a/sysdeps/ia64/fpu/s_nextafterl.S b/ports/sysdeps/ia64/fpu/s_nextafterl.S similarity index 100% rename from sysdeps/ia64/fpu/s_nextafterl.S rename to ports/sysdeps/ia64/fpu/s_nextafterl.S diff --git a/sysdeps/ia64/fpu/s_nexttoward.S b/ports/sysdeps/ia64/fpu/s_nexttoward.S similarity index 100% rename from sysdeps/ia64/fpu/s_nexttoward.S rename to ports/sysdeps/ia64/fpu/s_nexttoward.S diff --git a/sysdeps/ia64/fpu/s_nexttowardf.S b/ports/sysdeps/ia64/fpu/s_nexttowardf.S similarity index 100% rename from sysdeps/ia64/fpu/s_nexttowardf.S rename to ports/sysdeps/ia64/fpu/s_nexttowardf.S diff --git a/sysdeps/ia64/fpu/s_nexttowardl.S b/ports/sysdeps/ia64/fpu/s_nexttowardl.S similarity index 100% rename from sysdeps/ia64/fpu/s_nexttowardl.S rename to ports/sysdeps/ia64/fpu/s_nexttowardl.S diff --git a/sysdeps/ia64/fpu/s_rint.S b/ports/sysdeps/ia64/fpu/s_rint.S similarity index 100% rename from sysdeps/ia64/fpu/s_rint.S rename to ports/sysdeps/ia64/fpu/s_rint.S diff --git a/sysdeps/ia64/fpu/s_rintf.S b/ports/sysdeps/ia64/fpu/s_rintf.S similarity index 100% rename from sysdeps/ia64/fpu/s_rintf.S rename to ports/sysdeps/ia64/fpu/s_rintf.S diff --git a/sysdeps/ia64/fpu/s_rintl.S b/ports/sysdeps/ia64/fpu/s_rintl.S similarity index 100% rename from sysdeps/ia64/fpu/s_rintl.S rename to ports/sysdeps/ia64/fpu/s_rintl.S diff --git a/sysdeps/ia64/fpu/s_round.S b/ports/sysdeps/ia64/fpu/s_round.S similarity index 100% rename from sysdeps/ia64/fpu/s_round.S rename to ports/sysdeps/ia64/fpu/s_round.S diff --git a/sysdeps/ia64/fpu/s_roundf.S b/ports/sysdeps/ia64/fpu/s_roundf.S similarity index 100% rename from sysdeps/ia64/fpu/s_roundf.S rename to ports/sysdeps/ia64/fpu/s_roundf.S diff --git a/sysdeps/ia64/fpu/s_roundl.S b/ports/sysdeps/ia64/fpu/s_roundl.S similarity index 100% rename from sysdeps/ia64/fpu/s_roundl.S rename to ports/sysdeps/ia64/fpu/s_roundl.S diff --git a/sysdeps/ia64/fpu/s_scalblnf.c b/ports/sysdeps/ia64/fpu/s_scalblnf.c similarity index 100% rename from sysdeps/ia64/fpu/s_scalblnf.c rename to ports/sysdeps/ia64/fpu/s_scalblnf.c diff --git a/sysdeps/ia64/fpu/s_scalbn.c b/ports/sysdeps/ia64/fpu/s_scalbn.c similarity index 100% rename from sysdeps/ia64/fpu/s_scalbn.c rename to ports/sysdeps/ia64/fpu/s_scalbn.c diff --git a/sysdeps/ia64/fpu/s_scalbnf.c b/ports/sysdeps/ia64/fpu/s_scalbnf.c similarity index 100% rename from sysdeps/ia64/fpu/s_scalbnf.c rename to ports/sysdeps/ia64/fpu/s_scalbnf.c diff --git a/sysdeps/ia64/fpu/s_scalbnl.c b/ports/sysdeps/ia64/fpu/s_scalbnl.c similarity index 100% rename from sysdeps/ia64/fpu/s_scalbnl.c rename to ports/sysdeps/ia64/fpu/s_scalbnl.c diff --git a/sysdeps/ia64/fpu/s_signbit.S b/ports/sysdeps/ia64/fpu/s_signbit.S similarity index 100% rename from sysdeps/ia64/fpu/s_signbit.S rename to ports/sysdeps/ia64/fpu/s_signbit.S diff --git a/sysdeps/ia64/fpu/s_signbitf.S b/ports/sysdeps/ia64/fpu/s_signbitf.S similarity index 100% rename from sysdeps/ia64/fpu/s_signbitf.S rename to ports/sysdeps/ia64/fpu/s_signbitf.S diff --git a/sysdeps/ia64/fpu/s_signbitl.S b/ports/sysdeps/ia64/fpu/s_signbitl.S similarity index 100% rename from sysdeps/ia64/fpu/s_signbitl.S rename to ports/sysdeps/ia64/fpu/s_signbitl.S diff --git a/sysdeps/ia64/fpu/s_significand.S b/ports/sysdeps/ia64/fpu/s_significand.S similarity index 100% rename from sysdeps/ia64/fpu/s_significand.S rename to ports/sysdeps/ia64/fpu/s_significand.S diff --git a/sysdeps/ia64/fpu/s_significandf.S b/ports/sysdeps/ia64/fpu/s_significandf.S similarity index 100% rename from sysdeps/ia64/fpu/s_significandf.S rename to ports/sysdeps/ia64/fpu/s_significandf.S diff --git a/sysdeps/ia64/fpu/s_significandl.S b/ports/sysdeps/ia64/fpu/s_significandl.S similarity index 100% rename from sysdeps/ia64/fpu/s_significandl.S rename to ports/sysdeps/ia64/fpu/s_significandl.S diff --git a/sysdeps/ia64/fpu/s_sin.c b/ports/sysdeps/ia64/fpu/s_sin.c similarity index 100% rename from sysdeps/ia64/fpu/s_sin.c rename to ports/sysdeps/ia64/fpu/s_sin.c diff --git a/sysdeps/ia64/fpu/s_sincos.c b/ports/sysdeps/ia64/fpu/s_sincos.c similarity index 100% rename from sysdeps/ia64/fpu/s_sincos.c rename to ports/sysdeps/ia64/fpu/s_sincos.c diff --git a/sysdeps/ia64/fpu/s_sincosf.c b/ports/sysdeps/ia64/fpu/s_sincosf.c similarity index 100% rename from sysdeps/ia64/fpu/s_sincosf.c rename to ports/sysdeps/ia64/fpu/s_sincosf.c diff --git a/sysdeps/ia64/fpu/s_sincosl.c b/ports/sysdeps/ia64/fpu/s_sincosl.c similarity index 100% rename from sysdeps/ia64/fpu/s_sincosl.c rename to ports/sysdeps/ia64/fpu/s_sincosl.c diff --git a/sysdeps/ia64/fpu/s_sinf.c b/ports/sysdeps/ia64/fpu/s_sinf.c similarity index 100% rename from sysdeps/ia64/fpu/s_sinf.c rename to ports/sysdeps/ia64/fpu/s_sinf.c diff --git a/sysdeps/ia64/fpu/s_sinl.c b/ports/sysdeps/ia64/fpu/s_sinl.c similarity index 100% rename from sysdeps/ia64/fpu/s_sinl.c rename to ports/sysdeps/ia64/fpu/s_sinl.c diff --git a/sysdeps/ia64/fpu/s_tan.S b/ports/sysdeps/ia64/fpu/s_tan.S similarity index 100% rename from sysdeps/ia64/fpu/s_tan.S rename to ports/sysdeps/ia64/fpu/s_tan.S diff --git a/sysdeps/ia64/fpu/s_tanf.S b/ports/sysdeps/ia64/fpu/s_tanf.S similarity index 100% rename from sysdeps/ia64/fpu/s_tanf.S rename to ports/sysdeps/ia64/fpu/s_tanf.S diff --git a/sysdeps/ia64/fpu/s_tanh.S b/ports/sysdeps/ia64/fpu/s_tanh.S similarity index 100% rename from sysdeps/ia64/fpu/s_tanh.S rename to ports/sysdeps/ia64/fpu/s_tanh.S diff --git a/sysdeps/ia64/fpu/s_tanhf.S b/ports/sysdeps/ia64/fpu/s_tanhf.S similarity index 100% rename from sysdeps/ia64/fpu/s_tanhf.S rename to ports/sysdeps/ia64/fpu/s_tanhf.S diff --git a/sysdeps/ia64/fpu/s_tanhl.S b/ports/sysdeps/ia64/fpu/s_tanhl.S similarity index 100% rename from sysdeps/ia64/fpu/s_tanhl.S rename to ports/sysdeps/ia64/fpu/s_tanhl.S diff --git a/sysdeps/ia64/fpu/s_tanl.S b/ports/sysdeps/ia64/fpu/s_tanl.S similarity index 100% rename from sysdeps/ia64/fpu/s_tanl.S rename to ports/sysdeps/ia64/fpu/s_tanl.S diff --git a/sysdeps/ia64/fpu/s_trunc.S b/ports/sysdeps/ia64/fpu/s_trunc.S similarity index 100% rename from sysdeps/ia64/fpu/s_trunc.S rename to ports/sysdeps/ia64/fpu/s_trunc.S diff --git a/sysdeps/ia64/fpu/s_truncf.S b/ports/sysdeps/ia64/fpu/s_truncf.S similarity index 100% rename from sysdeps/ia64/fpu/s_truncf.S rename to ports/sysdeps/ia64/fpu/s_truncf.S diff --git a/sysdeps/ia64/fpu/s_truncl.S b/ports/sysdeps/ia64/fpu/s_truncl.S similarity index 100% rename from sysdeps/ia64/fpu/s_truncl.S rename to ports/sysdeps/ia64/fpu/s_truncl.S diff --git a/sysdeps/ia64/fpu/sincos32.c b/ports/sysdeps/ia64/fpu/sincos32.c similarity index 100% rename from sysdeps/ia64/fpu/sincos32.c rename to ports/sysdeps/ia64/fpu/sincos32.c diff --git a/sysdeps/ia64/fpu/slowexp.c b/ports/sysdeps/ia64/fpu/slowexp.c similarity index 100% rename from sysdeps/ia64/fpu/slowexp.c rename to ports/sysdeps/ia64/fpu/slowexp.c diff --git a/sysdeps/ia64/fpu/slowpow.c b/ports/sysdeps/ia64/fpu/slowpow.c similarity index 100% rename from sysdeps/ia64/fpu/slowpow.c rename to ports/sysdeps/ia64/fpu/slowpow.c diff --git a/sysdeps/ia64/fpu/t_exp.c b/ports/sysdeps/ia64/fpu/t_exp.c similarity index 100% rename from sysdeps/ia64/fpu/t_exp.c rename to ports/sysdeps/ia64/fpu/t_exp.c diff --git a/sysdeps/ia64/fpu/w_acos.c b/ports/sysdeps/ia64/fpu/w_acos.c similarity index 100% rename from sysdeps/ia64/fpu/w_acos.c rename to ports/sysdeps/ia64/fpu/w_acos.c diff --git a/sysdeps/ia64/fpu/w_acosf.c b/ports/sysdeps/ia64/fpu/w_acosf.c similarity index 100% rename from sysdeps/ia64/fpu/w_acosf.c rename to ports/sysdeps/ia64/fpu/w_acosf.c diff --git a/sysdeps/ia64/fpu/w_acosh.c b/ports/sysdeps/ia64/fpu/w_acosh.c similarity index 100% rename from sysdeps/ia64/fpu/w_acosh.c rename to ports/sysdeps/ia64/fpu/w_acosh.c diff --git a/sysdeps/ia64/fpu/w_acoshf.c b/ports/sysdeps/ia64/fpu/w_acoshf.c similarity index 100% rename from sysdeps/ia64/fpu/w_acoshf.c rename to ports/sysdeps/ia64/fpu/w_acoshf.c diff --git a/sysdeps/ia64/fpu/w_acoshl.c b/ports/sysdeps/ia64/fpu/w_acoshl.c similarity index 100% rename from sysdeps/ia64/fpu/w_acoshl.c rename to ports/sysdeps/ia64/fpu/w_acoshl.c diff --git a/sysdeps/ia64/fpu/w_acosl.c b/ports/sysdeps/ia64/fpu/w_acosl.c similarity index 100% rename from sysdeps/ia64/fpu/w_acosl.c rename to ports/sysdeps/ia64/fpu/w_acosl.c diff --git a/sysdeps/ia64/fpu/w_asin.c b/ports/sysdeps/ia64/fpu/w_asin.c similarity index 100% rename from sysdeps/ia64/fpu/w_asin.c rename to ports/sysdeps/ia64/fpu/w_asin.c diff --git a/sysdeps/ia64/fpu/w_asinf.c b/ports/sysdeps/ia64/fpu/w_asinf.c similarity index 100% rename from sysdeps/ia64/fpu/w_asinf.c rename to ports/sysdeps/ia64/fpu/w_asinf.c diff --git a/sysdeps/ia64/fpu/w_asinl.c b/ports/sysdeps/ia64/fpu/w_asinl.c similarity index 100% rename from sysdeps/ia64/fpu/w_asinl.c rename to ports/sysdeps/ia64/fpu/w_asinl.c diff --git a/sysdeps/ia64/fpu/w_atan2.c b/ports/sysdeps/ia64/fpu/w_atan2.c similarity index 100% rename from sysdeps/ia64/fpu/w_atan2.c rename to ports/sysdeps/ia64/fpu/w_atan2.c diff --git a/sysdeps/ia64/fpu/w_atan2f.c b/ports/sysdeps/ia64/fpu/w_atan2f.c similarity index 100% rename from sysdeps/ia64/fpu/w_atan2f.c rename to ports/sysdeps/ia64/fpu/w_atan2f.c diff --git a/sysdeps/ia64/fpu/w_atan2l.c b/ports/sysdeps/ia64/fpu/w_atan2l.c similarity index 100% rename from sysdeps/ia64/fpu/w_atan2l.c rename to ports/sysdeps/ia64/fpu/w_atan2l.c diff --git a/sysdeps/ia64/fpu/w_atanh.c b/ports/sysdeps/ia64/fpu/w_atanh.c similarity index 100% rename from sysdeps/ia64/fpu/w_atanh.c rename to ports/sysdeps/ia64/fpu/w_atanh.c diff --git a/sysdeps/ia64/fpu/w_atanhf.c b/ports/sysdeps/ia64/fpu/w_atanhf.c similarity index 100% rename from sysdeps/ia64/fpu/w_atanhf.c rename to ports/sysdeps/ia64/fpu/w_atanhf.c diff --git a/sysdeps/ia64/fpu/w_atanhl.c b/ports/sysdeps/ia64/fpu/w_atanhl.c similarity index 100% rename from sysdeps/ia64/fpu/w_atanhl.c rename to ports/sysdeps/ia64/fpu/w_atanhl.c diff --git a/sysdeps/ia64/fpu/w_cosh.c b/ports/sysdeps/ia64/fpu/w_cosh.c similarity index 100% rename from sysdeps/ia64/fpu/w_cosh.c rename to ports/sysdeps/ia64/fpu/w_cosh.c diff --git a/sysdeps/ia64/fpu/w_coshf.c b/ports/sysdeps/ia64/fpu/w_coshf.c similarity index 100% rename from sysdeps/ia64/fpu/w_coshf.c rename to ports/sysdeps/ia64/fpu/w_coshf.c diff --git a/sysdeps/ia64/fpu/w_coshl.c b/ports/sysdeps/ia64/fpu/w_coshl.c similarity index 100% rename from sysdeps/ia64/fpu/w_coshl.c rename to ports/sysdeps/ia64/fpu/w_coshl.c diff --git a/sysdeps/ia64/fpu/w_exp.c b/ports/sysdeps/ia64/fpu/w_exp.c similarity index 100% rename from sysdeps/ia64/fpu/w_exp.c rename to ports/sysdeps/ia64/fpu/w_exp.c diff --git a/sysdeps/ia64/fpu/w_exp10.c b/ports/sysdeps/ia64/fpu/w_exp10.c similarity index 100% rename from sysdeps/ia64/fpu/w_exp10.c rename to ports/sysdeps/ia64/fpu/w_exp10.c diff --git a/sysdeps/ia64/fpu/w_exp10f.c b/ports/sysdeps/ia64/fpu/w_exp10f.c similarity index 100% rename from sysdeps/ia64/fpu/w_exp10f.c rename to ports/sysdeps/ia64/fpu/w_exp10f.c diff --git a/sysdeps/ia64/fpu/w_exp10l.c b/ports/sysdeps/ia64/fpu/w_exp10l.c similarity index 100% rename from sysdeps/ia64/fpu/w_exp10l.c rename to ports/sysdeps/ia64/fpu/w_exp10l.c diff --git a/sysdeps/ia64/fpu/w_exp2.c b/ports/sysdeps/ia64/fpu/w_exp2.c similarity index 100% rename from sysdeps/ia64/fpu/w_exp2.c rename to ports/sysdeps/ia64/fpu/w_exp2.c diff --git a/sysdeps/ia64/fpu/w_exp2f.c b/ports/sysdeps/ia64/fpu/w_exp2f.c similarity index 100% rename from sysdeps/ia64/fpu/w_exp2f.c rename to ports/sysdeps/ia64/fpu/w_exp2f.c diff --git a/sysdeps/ia64/fpu/w_exp2l.c b/ports/sysdeps/ia64/fpu/w_exp2l.c similarity index 100% rename from sysdeps/ia64/fpu/w_exp2l.c rename to ports/sysdeps/ia64/fpu/w_exp2l.c diff --git a/sysdeps/ia64/fpu/w_expf.c b/ports/sysdeps/ia64/fpu/w_expf.c similarity index 100% rename from sysdeps/ia64/fpu/w_expf.c rename to ports/sysdeps/ia64/fpu/w_expf.c diff --git a/sysdeps/ia64/fpu/w_expl.c b/ports/sysdeps/ia64/fpu/w_expl.c similarity index 100% rename from sysdeps/ia64/fpu/w_expl.c rename to ports/sysdeps/ia64/fpu/w_expl.c diff --git a/sysdeps/ia64/fpu/w_fmod.c b/ports/sysdeps/ia64/fpu/w_fmod.c similarity index 100% rename from sysdeps/ia64/fpu/w_fmod.c rename to ports/sysdeps/ia64/fpu/w_fmod.c diff --git a/sysdeps/ia64/fpu/w_fmodf.c b/ports/sysdeps/ia64/fpu/w_fmodf.c similarity index 100% rename from sysdeps/ia64/fpu/w_fmodf.c rename to ports/sysdeps/ia64/fpu/w_fmodf.c diff --git a/sysdeps/ia64/fpu/w_fmodl.c b/ports/sysdeps/ia64/fpu/w_fmodl.c similarity index 100% rename from sysdeps/ia64/fpu/w_fmodl.c rename to ports/sysdeps/ia64/fpu/w_fmodl.c diff --git a/sysdeps/ia64/fpu/w_hypot.c b/ports/sysdeps/ia64/fpu/w_hypot.c similarity index 100% rename from sysdeps/ia64/fpu/w_hypot.c rename to ports/sysdeps/ia64/fpu/w_hypot.c diff --git a/sysdeps/ia64/fpu/w_hypotf.c b/ports/sysdeps/ia64/fpu/w_hypotf.c similarity index 100% rename from sysdeps/ia64/fpu/w_hypotf.c rename to ports/sysdeps/ia64/fpu/w_hypotf.c diff --git a/sysdeps/ia64/fpu/w_hypotl.c b/ports/sysdeps/ia64/fpu/w_hypotl.c similarity index 100% rename from sysdeps/ia64/fpu/w_hypotl.c rename to ports/sysdeps/ia64/fpu/w_hypotl.c diff --git a/sysdeps/ia64/fpu/w_lgamma.c b/ports/sysdeps/ia64/fpu/w_lgamma.c similarity index 100% rename from sysdeps/ia64/fpu/w_lgamma.c rename to ports/sysdeps/ia64/fpu/w_lgamma.c diff --git a/sysdeps/ia64/fpu/w_lgamma_r.c b/ports/sysdeps/ia64/fpu/w_lgamma_r.c similarity index 100% rename from sysdeps/ia64/fpu/w_lgamma_r.c rename to ports/sysdeps/ia64/fpu/w_lgamma_r.c diff --git a/sysdeps/ia64/fpu/w_lgammaf.c b/ports/sysdeps/ia64/fpu/w_lgammaf.c similarity index 100% rename from sysdeps/ia64/fpu/w_lgammaf.c rename to ports/sysdeps/ia64/fpu/w_lgammaf.c diff --git a/sysdeps/ia64/fpu/w_lgammaf_r.c b/ports/sysdeps/ia64/fpu/w_lgammaf_r.c similarity index 100% rename from sysdeps/ia64/fpu/w_lgammaf_r.c rename to ports/sysdeps/ia64/fpu/w_lgammaf_r.c diff --git a/sysdeps/ia64/fpu/w_lgammal.c b/ports/sysdeps/ia64/fpu/w_lgammal.c similarity index 100% rename from sysdeps/ia64/fpu/w_lgammal.c rename to ports/sysdeps/ia64/fpu/w_lgammal.c diff --git a/sysdeps/ia64/fpu/w_lgammal_r.c b/ports/sysdeps/ia64/fpu/w_lgammal_r.c similarity index 100% rename from sysdeps/ia64/fpu/w_lgammal_r.c rename to ports/sysdeps/ia64/fpu/w_lgammal_r.c diff --git a/sysdeps/ia64/fpu/w_log.c b/ports/sysdeps/ia64/fpu/w_log.c similarity index 100% rename from sysdeps/ia64/fpu/w_log.c rename to ports/sysdeps/ia64/fpu/w_log.c diff --git a/sysdeps/ia64/fpu/w_log10.c b/ports/sysdeps/ia64/fpu/w_log10.c similarity index 100% rename from sysdeps/ia64/fpu/w_log10.c rename to ports/sysdeps/ia64/fpu/w_log10.c diff --git a/sysdeps/ia64/fpu/w_log10f.c b/ports/sysdeps/ia64/fpu/w_log10f.c similarity index 100% rename from sysdeps/ia64/fpu/w_log10f.c rename to ports/sysdeps/ia64/fpu/w_log10f.c diff --git a/sysdeps/ia64/fpu/w_log10l.c b/ports/sysdeps/ia64/fpu/w_log10l.c similarity index 100% rename from sysdeps/ia64/fpu/w_log10l.c rename to ports/sysdeps/ia64/fpu/w_log10l.c diff --git a/sysdeps/ia64/fpu/w_log2.c b/ports/sysdeps/ia64/fpu/w_log2.c similarity index 100% rename from sysdeps/ia64/fpu/w_log2.c rename to ports/sysdeps/ia64/fpu/w_log2.c diff --git a/sysdeps/ia64/fpu/w_log2f.c b/ports/sysdeps/ia64/fpu/w_log2f.c similarity index 100% rename from sysdeps/ia64/fpu/w_log2f.c rename to ports/sysdeps/ia64/fpu/w_log2f.c diff --git a/sysdeps/ia64/fpu/w_log2l.c b/ports/sysdeps/ia64/fpu/w_log2l.c similarity index 100% rename from sysdeps/ia64/fpu/w_log2l.c rename to ports/sysdeps/ia64/fpu/w_log2l.c diff --git a/sysdeps/ia64/fpu/w_logf.c b/ports/sysdeps/ia64/fpu/w_logf.c similarity index 100% rename from sysdeps/ia64/fpu/w_logf.c rename to ports/sysdeps/ia64/fpu/w_logf.c diff --git a/sysdeps/ia64/fpu/w_logl.c b/ports/sysdeps/ia64/fpu/w_logl.c similarity index 100% rename from sysdeps/ia64/fpu/w_logl.c rename to ports/sysdeps/ia64/fpu/w_logl.c diff --git a/sysdeps/ia64/fpu/w_pow.c b/ports/sysdeps/ia64/fpu/w_pow.c similarity index 100% rename from sysdeps/ia64/fpu/w_pow.c rename to ports/sysdeps/ia64/fpu/w_pow.c diff --git a/sysdeps/ia64/fpu/w_powf.c b/ports/sysdeps/ia64/fpu/w_powf.c similarity index 100% rename from sysdeps/ia64/fpu/w_powf.c rename to ports/sysdeps/ia64/fpu/w_powf.c diff --git a/sysdeps/ia64/fpu/w_powl.c b/ports/sysdeps/ia64/fpu/w_powl.c similarity index 100% rename from sysdeps/ia64/fpu/w_powl.c rename to ports/sysdeps/ia64/fpu/w_powl.c diff --git a/sysdeps/ia64/fpu/w_remainder.c b/ports/sysdeps/ia64/fpu/w_remainder.c similarity index 100% rename from sysdeps/ia64/fpu/w_remainder.c rename to ports/sysdeps/ia64/fpu/w_remainder.c diff --git a/sysdeps/ia64/fpu/w_remainderf.c b/ports/sysdeps/ia64/fpu/w_remainderf.c similarity index 100% rename from sysdeps/ia64/fpu/w_remainderf.c rename to ports/sysdeps/ia64/fpu/w_remainderf.c diff --git a/sysdeps/ia64/fpu/w_remainderl.c b/ports/sysdeps/ia64/fpu/w_remainderl.c similarity index 100% rename from sysdeps/ia64/fpu/w_remainderl.c rename to ports/sysdeps/ia64/fpu/w_remainderl.c diff --git a/sysdeps/ia64/fpu/w_scalb.c b/ports/sysdeps/ia64/fpu/w_scalb.c similarity index 100% rename from sysdeps/ia64/fpu/w_scalb.c rename to ports/sysdeps/ia64/fpu/w_scalb.c diff --git a/sysdeps/ia64/fpu/w_scalbf.c b/ports/sysdeps/ia64/fpu/w_scalbf.c similarity index 100% rename from sysdeps/ia64/fpu/w_scalbf.c rename to ports/sysdeps/ia64/fpu/w_scalbf.c diff --git a/sysdeps/ia64/fpu/w_scalbl.c b/ports/sysdeps/ia64/fpu/w_scalbl.c similarity index 100% rename from sysdeps/ia64/fpu/w_scalbl.c rename to ports/sysdeps/ia64/fpu/w_scalbl.c diff --git a/sysdeps/ia64/fpu/w_sinh.c b/ports/sysdeps/ia64/fpu/w_sinh.c similarity index 100% rename from sysdeps/ia64/fpu/w_sinh.c rename to ports/sysdeps/ia64/fpu/w_sinh.c diff --git a/sysdeps/ia64/fpu/w_sinhf.c b/ports/sysdeps/ia64/fpu/w_sinhf.c similarity index 100% rename from sysdeps/ia64/fpu/w_sinhf.c rename to ports/sysdeps/ia64/fpu/w_sinhf.c diff --git a/sysdeps/ia64/fpu/w_sinhl.c b/ports/sysdeps/ia64/fpu/w_sinhl.c similarity index 100% rename from sysdeps/ia64/fpu/w_sinhl.c rename to ports/sysdeps/ia64/fpu/w_sinhl.c diff --git a/sysdeps/ia64/fpu/w_sqrt.c b/ports/sysdeps/ia64/fpu/w_sqrt.c similarity index 100% rename from sysdeps/ia64/fpu/w_sqrt.c rename to ports/sysdeps/ia64/fpu/w_sqrt.c diff --git a/sysdeps/ia64/fpu/w_sqrtf.c b/ports/sysdeps/ia64/fpu/w_sqrtf.c similarity index 100% rename from sysdeps/ia64/fpu/w_sqrtf.c rename to ports/sysdeps/ia64/fpu/w_sqrtf.c diff --git a/sysdeps/ia64/fpu/w_sqrtl.c b/ports/sysdeps/ia64/fpu/w_sqrtl.c similarity index 100% rename from sysdeps/ia64/fpu/w_sqrtl.c rename to ports/sysdeps/ia64/fpu/w_sqrtl.c diff --git a/sysdeps/ia64/fpu/w_tgamma.S b/ports/sysdeps/ia64/fpu/w_tgamma.S similarity index 100% rename from sysdeps/ia64/fpu/w_tgamma.S rename to ports/sysdeps/ia64/fpu/w_tgamma.S diff --git a/sysdeps/ia64/fpu/w_tgammaf.S b/ports/sysdeps/ia64/fpu/w_tgammaf.S similarity index 100% rename from sysdeps/ia64/fpu/w_tgammaf.S rename to ports/sysdeps/ia64/fpu/w_tgammaf.S diff --git a/sysdeps/ia64/fpu/w_tgammal.S b/ports/sysdeps/ia64/fpu/w_tgammal.S similarity index 100% rename from sysdeps/ia64/fpu/w_tgammal.S rename to ports/sysdeps/ia64/fpu/w_tgammal.S diff --git a/sysdeps/ia64/gccframe.h b/ports/sysdeps/ia64/gccframe.h similarity index 100% rename from sysdeps/ia64/gccframe.h rename to ports/sysdeps/ia64/gccframe.h diff --git a/sysdeps/ia64/hp-timing.c b/ports/sysdeps/ia64/hp-timing.c similarity index 100% rename from sysdeps/ia64/hp-timing.c rename to ports/sysdeps/ia64/hp-timing.c diff --git a/sysdeps/ia64/hp-timing.h b/ports/sysdeps/ia64/hp-timing.h similarity index 100% rename from sysdeps/ia64/hp-timing.h rename to ports/sysdeps/ia64/hp-timing.h diff --git a/sysdeps/ia64/htonl.S b/ports/sysdeps/ia64/htonl.S similarity index 100% rename from sysdeps/ia64/htonl.S rename to ports/sysdeps/ia64/htonl.S diff --git a/sysdeps/ia64/htons.S b/ports/sysdeps/ia64/htons.S similarity index 100% rename from sysdeps/ia64/htons.S rename to ports/sysdeps/ia64/htons.S diff --git a/sysdeps/ia64/ia64libgcc.S b/ports/sysdeps/ia64/ia64libgcc.S similarity index 100% rename from sysdeps/ia64/ia64libgcc.S rename to ports/sysdeps/ia64/ia64libgcc.S diff --git a/sysdeps/ia64/ieee754.h b/ports/sysdeps/ia64/ieee754.h similarity index 100% rename from sysdeps/ia64/ieee754.h rename to ports/sysdeps/ia64/ieee754.h diff --git a/sysdeps/ia64/jmpbuf-unwind.h b/ports/sysdeps/ia64/jmpbuf-unwind.h similarity index 100% rename from sysdeps/ia64/jmpbuf-unwind.h rename to ports/sysdeps/ia64/jmpbuf-unwind.h diff --git a/sysdeps/ia64/ldbl2mpn.c b/ports/sysdeps/ia64/ldbl2mpn.c similarity index 100% rename from sysdeps/ia64/ldbl2mpn.c rename to ports/sysdeps/ia64/ldbl2mpn.c diff --git a/sysdeps/ia64/ldsodefs.h b/ports/sysdeps/ia64/ldsodefs.h similarity index 100% rename from sysdeps/ia64/ldsodefs.h rename to ports/sysdeps/ia64/ldsodefs.h diff --git a/sysdeps/ia64/libc-tls.c b/ports/sysdeps/ia64/libc-tls.c similarity index 100% rename from sysdeps/ia64/libc-tls.c rename to ports/sysdeps/ia64/libc-tls.c diff --git a/sysdeps/ia64/machine-gmon.h b/ports/sysdeps/ia64/machine-gmon.h similarity index 100% rename from sysdeps/ia64/machine-gmon.h rename to ports/sysdeps/ia64/machine-gmon.h diff --git a/sysdeps/ia64/memccpy.S b/ports/sysdeps/ia64/memccpy.S similarity index 100% rename from sysdeps/ia64/memccpy.S rename to ports/sysdeps/ia64/memccpy.S diff --git a/sysdeps/ia64/memchr.S b/ports/sysdeps/ia64/memchr.S similarity index 100% rename from sysdeps/ia64/memchr.S rename to ports/sysdeps/ia64/memchr.S diff --git a/sysdeps/ia64/memcmp.S b/ports/sysdeps/ia64/memcmp.S similarity index 100% rename from sysdeps/ia64/memcmp.S rename to ports/sysdeps/ia64/memcmp.S diff --git a/sysdeps/ia64/memcpy.S b/ports/sysdeps/ia64/memcpy.S similarity index 100% rename from sysdeps/ia64/memcpy.S rename to ports/sysdeps/ia64/memcpy.S diff --git a/sysdeps/ia64/memmove.S b/ports/sysdeps/ia64/memmove.S similarity index 100% rename from sysdeps/ia64/memmove.S rename to ports/sysdeps/ia64/memmove.S diff --git a/sysdeps/ia64/memset.S b/ports/sysdeps/ia64/memset.S similarity index 100% rename from sysdeps/ia64/memset.S rename to ports/sysdeps/ia64/memset.S diff --git a/sysdeps/ia64/memusage.h b/ports/sysdeps/ia64/memusage.h similarity index 100% rename from sysdeps/ia64/memusage.h rename to ports/sysdeps/ia64/memusage.h diff --git a/sysdeps/ia64/nptl/Makefile b/ports/sysdeps/ia64/nptl/Makefile similarity index 100% rename from sysdeps/ia64/nptl/Makefile rename to ports/sysdeps/ia64/nptl/Makefile diff --git a/sysdeps/ia64/nptl/pthread_spin_lock.c b/ports/sysdeps/ia64/nptl/pthread_spin_lock.c similarity index 100% rename from sysdeps/ia64/nptl/pthread_spin_lock.c rename to ports/sysdeps/ia64/nptl/pthread_spin_lock.c diff --git a/sysdeps/ia64/nptl/pthread_spin_trylock.c b/ports/sysdeps/ia64/nptl/pthread_spin_trylock.c similarity index 100% rename from sysdeps/ia64/nptl/pthread_spin_trylock.c rename to ports/sysdeps/ia64/nptl/pthread_spin_trylock.c diff --git a/sysdeps/ia64/nptl/pthread_spin_unlock.c b/ports/sysdeps/ia64/nptl/pthread_spin_unlock.c similarity index 100% rename from sysdeps/ia64/nptl/pthread_spin_unlock.c rename to ports/sysdeps/ia64/nptl/pthread_spin_unlock.c diff --git a/sysdeps/ia64/nptl/pthreaddef.h b/ports/sysdeps/ia64/nptl/pthreaddef.h similarity index 100% rename from sysdeps/ia64/nptl/pthreaddef.h rename to ports/sysdeps/ia64/nptl/pthreaddef.h diff --git a/sysdeps/ia64/nptl/shlib-versions b/ports/sysdeps/ia64/nptl/shlib-versions similarity index 100% rename from sysdeps/ia64/nptl/shlib-versions rename to ports/sysdeps/ia64/nptl/shlib-versions diff --git a/sysdeps/ia64/nptl/tcb-offsets.sym b/ports/sysdeps/ia64/nptl/tcb-offsets.sym similarity index 100% rename from sysdeps/ia64/nptl/tcb-offsets.sym rename to ports/sysdeps/ia64/nptl/tcb-offsets.sym diff --git a/sysdeps/ia64/nptl/tls.h b/ports/sysdeps/ia64/nptl/tls.h similarity index 100% rename from sysdeps/ia64/nptl/tls.h rename to ports/sysdeps/ia64/nptl/tls.h diff --git a/sysdeps/ia64/preconfigure b/ports/sysdeps/ia64/preconfigure similarity index 100% rename from sysdeps/ia64/preconfigure rename to ports/sysdeps/ia64/preconfigure diff --git a/sysdeps/ia64/sched_cpucount.c b/ports/sysdeps/ia64/sched_cpucount.c similarity index 100% rename from sysdeps/ia64/sched_cpucount.c rename to ports/sysdeps/ia64/sched_cpucount.c diff --git a/sysdeps/ia64/shlib-versions b/ports/sysdeps/ia64/shlib-versions similarity index 100% rename from sysdeps/ia64/shlib-versions rename to ports/sysdeps/ia64/shlib-versions diff --git a/sysdeps/ia64/softpipe.h b/ports/sysdeps/ia64/softpipe.h similarity index 100% rename from sysdeps/ia64/softpipe.h rename to ports/sysdeps/ia64/softpipe.h diff --git a/sysdeps/ia64/stackguard-macros.h b/ports/sysdeps/ia64/stackguard-macros.h similarity index 100% rename from sysdeps/ia64/stackguard-macros.h rename to ports/sysdeps/ia64/stackguard-macros.h diff --git a/sysdeps/ia64/stackinfo.h b/ports/sysdeps/ia64/stackinfo.h similarity index 100% rename from sysdeps/ia64/stackinfo.h rename to ports/sysdeps/ia64/stackinfo.h diff --git a/sysdeps/ia64/start.S b/ports/sysdeps/ia64/start.S similarity index 100% rename from sysdeps/ia64/start.S rename to ports/sysdeps/ia64/start.S diff --git a/sysdeps/ia64/strcat.c b/ports/sysdeps/ia64/strcat.c similarity index 100% rename from sysdeps/ia64/strcat.c rename to ports/sysdeps/ia64/strcat.c diff --git a/sysdeps/ia64/strchr.S b/ports/sysdeps/ia64/strchr.S similarity index 100% rename from sysdeps/ia64/strchr.S rename to ports/sysdeps/ia64/strchr.S diff --git a/sysdeps/ia64/strcmp.S b/ports/sysdeps/ia64/strcmp.S similarity index 100% rename from sysdeps/ia64/strcmp.S rename to ports/sysdeps/ia64/strcmp.S diff --git a/sysdeps/ia64/strcpy.S b/ports/sysdeps/ia64/strcpy.S similarity index 100% rename from sysdeps/ia64/strcpy.S rename to ports/sysdeps/ia64/strcpy.S diff --git a/sysdeps/ia64/strlen.S b/ports/sysdeps/ia64/strlen.S similarity index 100% rename from sysdeps/ia64/strlen.S rename to ports/sysdeps/ia64/strlen.S diff --git a/sysdeps/ia64/strncmp.S b/ports/sysdeps/ia64/strncmp.S similarity index 100% rename from sysdeps/ia64/strncmp.S rename to ports/sysdeps/ia64/strncmp.S diff --git a/sysdeps/ia64/strncpy.S b/ports/sysdeps/ia64/strncpy.S similarity index 100% rename from sysdeps/ia64/strncpy.S rename to ports/sysdeps/ia64/strncpy.S diff --git a/sysdeps/ia64/sysdep.h b/ports/sysdeps/ia64/sysdep.h similarity index 100% rename from sysdeps/ia64/sysdep.h rename to ports/sysdeps/ia64/sysdep.h diff --git a/sysdeps/ia64/tls-macros.h b/ports/sysdeps/ia64/tls-macros.h similarity index 100% rename from sysdeps/ia64/tls-macros.h rename to ports/sysdeps/ia64/tls-macros.h diff --git a/sysdeps/ia64/tst-audit.h b/ports/sysdeps/ia64/tst-audit.h similarity index 100% rename from sysdeps/ia64/tst-audit.h rename to ports/sysdeps/ia64/tst-audit.h diff --git a/sysdeps/m68k/Implies b/ports/sysdeps/m68k/Implies similarity index 100% rename from sysdeps/m68k/Implies rename to ports/sysdeps/m68k/Implies diff --git a/sysdeps/m68k/Makefile b/ports/sysdeps/m68k/Makefile similarity index 100% rename from sysdeps/m68k/Makefile rename to ports/sysdeps/m68k/Makefile diff --git a/sysdeps/m68k/Versions b/ports/sysdeps/m68k/Versions similarity index 100% rename from sysdeps/m68k/Versions rename to ports/sysdeps/m68k/Versions diff --git a/sysdeps/m68k/__longjmp.c b/ports/sysdeps/m68k/__longjmp.c similarity index 100% rename from sysdeps/m68k/__longjmp.c rename to ports/sysdeps/m68k/__longjmp.c diff --git a/sysdeps/m68k/abort-instr.h b/ports/sysdeps/m68k/abort-instr.h similarity index 100% rename from sysdeps/m68k/abort-instr.h rename to ports/sysdeps/m68k/abort-instr.h diff --git a/sysdeps/m68k/asm-syntax.h b/ports/sysdeps/m68k/asm-syntax.h similarity index 100% rename from sysdeps/m68k/asm-syntax.h rename to ports/sysdeps/m68k/asm-syntax.h diff --git a/sysdeps/m68k/bits/byteswap.h b/ports/sysdeps/m68k/bits/byteswap.h similarity index 100% rename from sysdeps/m68k/bits/byteswap.h rename to ports/sysdeps/m68k/bits/byteswap.h diff --git a/sysdeps/m68k/bits/endian.h b/ports/sysdeps/m68k/bits/endian.h similarity index 100% rename from sysdeps/m68k/bits/endian.h rename to ports/sysdeps/m68k/bits/endian.h diff --git a/sysdeps/m68k/bits/link.h b/ports/sysdeps/m68k/bits/link.h similarity index 100% rename from sysdeps/m68k/bits/link.h rename to ports/sysdeps/m68k/bits/link.h diff --git a/sysdeps/m68k/bits/setjmp.h b/ports/sysdeps/m68k/bits/setjmp.h similarity index 100% rename from sysdeps/m68k/bits/setjmp.h rename to ports/sysdeps/m68k/bits/setjmp.h diff --git a/sysdeps/m68k/bsd-_setjmp.c b/ports/sysdeps/m68k/bsd-_setjmp.c similarity index 100% rename from sysdeps/m68k/bsd-_setjmp.c rename to ports/sysdeps/m68k/bsd-_setjmp.c diff --git a/sysdeps/m68k/bsd-setjmp.c b/ports/sysdeps/m68k/bsd-setjmp.c similarity index 100% rename from sysdeps/m68k/bsd-setjmp.c rename to ports/sysdeps/m68k/bsd-setjmp.c diff --git a/sysdeps/m68k/coldfire/bits/atomic.h b/ports/sysdeps/m68k/coldfire/bits/atomic.h similarity index 100% rename from sysdeps/m68k/coldfire/bits/atomic.h rename to ports/sysdeps/m68k/coldfire/bits/atomic.h diff --git a/sysdeps/m68k/coldfire/fpu/e_sqrt.c b/ports/sysdeps/m68k/coldfire/fpu/e_sqrt.c similarity index 100% rename from sysdeps/m68k/coldfire/fpu/e_sqrt.c rename to ports/sysdeps/m68k/coldfire/fpu/e_sqrt.c diff --git a/sysdeps/m68k/coldfire/fpu/e_sqrtf.c b/ports/sysdeps/m68k/coldfire/fpu/e_sqrtf.c similarity index 100% rename from sysdeps/m68k/coldfire/fpu/e_sqrtf.c rename to ports/sysdeps/m68k/coldfire/fpu/e_sqrtf.c diff --git a/sysdeps/m68k/coldfire/fpu/fraiseexcpt.c b/ports/sysdeps/m68k/coldfire/fpu/fraiseexcpt.c similarity index 100% rename from sysdeps/m68k/coldfire/fpu/fraiseexcpt.c rename to ports/sysdeps/m68k/coldfire/fpu/fraiseexcpt.c diff --git a/sysdeps/m68k/coldfire/fpu/libm-test-ulps b/ports/sysdeps/m68k/coldfire/fpu/libm-test-ulps similarity index 100% rename from sysdeps/m68k/coldfire/fpu/libm-test-ulps rename to ports/sysdeps/m68k/coldfire/fpu/libm-test-ulps diff --git a/sysdeps/m68k/coldfire/fpu/s_fabs.c b/ports/sysdeps/m68k/coldfire/fpu/s_fabs.c similarity index 100% rename from sysdeps/m68k/coldfire/fpu/s_fabs.c rename to ports/sysdeps/m68k/coldfire/fpu/s_fabs.c diff --git a/sysdeps/m68k/coldfire/fpu/s_fabsf.c b/ports/sysdeps/m68k/coldfire/fpu/s_fabsf.c similarity index 100% rename from sysdeps/m68k/coldfire/fpu/s_fabsf.c rename to ports/sysdeps/m68k/coldfire/fpu/s_fabsf.c diff --git a/sysdeps/m68k/coldfire/fpu/s_lrint.c b/ports/sysdeps/m68k/coldfire/fpu/s_lrint.c similarity index 100% rename from sysdeps/m68k/coldfire/fpu/s_lrint.c rename to ports/sysdeps/m68k/coldfire/fpu/s_lrint.c diff --git a/sysdeps/m68k/coldfire/fpu/s_lrintf.c b/ports/sysdeps/m68k/coldfire/fpu/s_lrintf.c similarity index 100% rename from sysdeps/m68k/coldfire/fpu/s_lrintf.c rename to ports/sysdeps/m68k/coldfire/fpu/s_lrintf.c diff --git a/sysdeps/m68k/coldfire/fpu/s_rint.c b/ports/sysdeps/m68k/coldfire/fpu/s_rint.c similarity index 100% rename from sysdeps/m68k/coldfire/fpu/s_rint.c rename to ports/sysdeps/m68k/coldfire/fpu/s_rint.c diff --git a/sysdeps/m68k/coldfire/fpu/s_rintf.c b/ports/sysdeps/m68k/coldfire/fpu/s_rintf.c similarity index 100% rename from sysdeps/m68k/coldfire/fpu/s_rintf.c rename to ports/sysdeps/m68k/coldfire/fpu/s_rintf.c diff --git a/sysdeps/m68k/coldfire/shlib-versions b/ports/sysdeps/m68k/coldfire/shlib-versions similarity index 100% rename from sysdeps/m68k/coldfire/shlib-versions rename to ports/sysdeps/m68k/coldfire/shlib-versions diff --git a/sysdeps/m68k/coldfire/sysdep.h b/ports/sysdeps/m68k/coldfire/sysdep.h similarity index 100% rename from sysdeps/m68k/coldfire/sysdep.h rename to ports/sysdeps/m68k/coldfire/sysdep.h diff --git a/sysdeps/m68k/crti.S b/ports/sysdeps/m68k/crti.S similarity index 100% rename from sysdeps/m68k/crti.S rename to ports/sysdeps/m68k/crti.S diff --git a/sysdeps/m68k/crtn.S b/ports/sysdeps/m68k/crtn.S similarity index 100% rename from sysdeps/m68k/crtn.S rename to ports/sysdeps/m68k/crtn.S diff --git a/sysdeps/m68k/dl-machine.h b/ports/sysdeps/m68k/dl-machine.h similarity index 100% rename from sysdeps/m68k/dl-machine.h rename to ports/sysdeps/m68k/dl-machine.h diff --git a/sysdeps/m68k/dl-tls.h b/ports/sysdeps/m68k/dl-tls.h similarity index 100% rename from sysdeps/m68k/dl-tls.h rename to ports/sysdeps/m68k/dl-tls.h diff --git a/sysdeps/m68k/dl-trampoline.S b/ports/sysdeps/m68k/dl-trampoline.S similarity index 100% rename from sysdeps/m68k/dl-trampoline.S rename to ports/sysdeps/m68k/dl-trampoline.S diff --git a/sysdeps/m68k/ffs.c b/ports/sysdeps/m68k/ffs.c similarity index 100% rename from sysdeps/m68k/ffs.c rename to ports/sysdeps/m68k/ffs.c diff --git a/sysdeps/m68k/fpu/bits/fenv.h b/ports/sysdeps/m68k/fpu/bits/fenv.h similarity index 100% rename from sysdeps/m68k/fpu/bits/fenv.h rename to ports/sysdeps/m68k/fpu/bits/fenv.h diff --git a/sysdeps/m68k/fpu/fclrexcpt.c b/ports/sysdeps/m68k/fpu/fclrexcpt.c similarity index 100% rename from sysdeps/m68k/fpu/fclrexcpt.c rename to ports/sysdeps/m68k/fpu/fclrexcpt.c diff --git a/sysdeps/m68k/fpu/fedisblxcpt.c b/ports/sysdeps/m68k/fpu/fedisblxcpt.c similarity index 100% rename from sysdeps/m68k/fpu/fedisblxcpt.c rename to ports/sysdeps/m68k/fpu/fedisblxcpt.c diff --git a/sysdeps/m68k/fpu/feenablxcpt.c b/ports/sysdeps/m68k/fpu/feenablxcpt.c similarity index 100% rename from sysdeps/m68k/fpu/feenablxcpt.c rename to ports/sysdeps/m68k/fpu/feenablxcpt.c diff --git a/sysdeps/m68k/fpu/fegetenv.c b/ports/sysdeps/m68k/fpu/fegetenv.c similarity index 100% rename from sysdeps/m68k/fpu/fegetenv.c rename to ports/sysdeps/m68k/fpu/fegetenv.c diff --git a/sysdeps/m68k/fpu/fegetexcept.c b/ports/sysdeps/m68k/fpu/fegetexcept.c similarity index 100% rename from sysdeps/m68k/fpu/fegetexcept.c rename to ports/sysdeps/m68k/fpu/fegetexcept.c diff --git a/sysdeps/m68k/fpu/fegetround.c b/ports/sysdeps/m68k/fpu/fegetround.c similarity index 100% rename from sysdeps/m68k/fpu/fegetround.c rename to ports/sysdeps/m68k/fpu/fegetround.c diff --git a/sysdeps/m68k/fpu/feholdexcpt.c b/ports/sysdeps/m68k/fpu/feholdexcpt.c similarity index 100% rename from sysdeps/m68k/fpu/feholdexcpt.c rename to ports/sysdeps/m68k/fpu/feholdexcpt.c diff --git a/sysdeps/m68k/fpu/fesetenv.c b/ports/sysdeps/m68k/fpu/fesetenv.c similarity index 100% rename from sysdeps/m68k/fpu/fesetenv.c rename to ports/sysdeps/m68k/fpu/fesetenv.c diff --git a/sysdeps/m68k/fpu/fesetround.c b/ports/sysdeps/m68k/fpu/fesetround.c similarity index 100% rename from sysdeps/m68k/fpu/fesetround.c rename to ports/sysdeps/m68k/fpu/fesetround.c diff --git a/sysdeps/m68k/fpu/feupdateenv.c b/ports/sysdeps/m68k/fpu/feupdateenv.c similarity index 100% rename from sysdeps/m68k/fpu/feupdateenv.c rename to ports/sysdeps/m68k/fpu/feupdateenv.c diff --git a/sysdeps/m68k/fpu/fgetexcptflg.c b/ports/sysdeps/m68k/fpu/fgetexcptflg.c similarity index 100% rename from sysdeps/m68k/fpu/fgetexcptflg.c rename to ports/sysdeps/m68k/fpu/fgetexcptflg.c diff --git a/sysdeps/m68k/fpu/fsetexcptflg.c b/ports/sysdeps/m68k/fpu/fsetexcptflg.c similarity index 100% rename from sysdeps/m68k/fpu/fsetexcptflg.c rename to ports/sysdeps/m68k/fpu/fsetexcptflg.c diff --git a/sysdeps/m68k/fpu/ftestexcept.c b/ports/sysdeps/m68k/fpu/ftestexcept.c similarity index 100% rename from sysdeps/m68k/fpu/ftestexcept.c rename to ports/sysdeps/m68k/fpu/ftestexcept.c diff --git a/sysdeps/m68k/fpu_control.h b/ports/sysdeps/m68k/fpu_control.h similarity index 100% rename from sysdeps/m68k/fpu_control.h rename to ports/sysdeps/m68k/fpu_control.h diff --git a/sysdeps/m68k/gccframe.h b/ports/sysdeps/m68k/gccframe.h similarity index 100% rename from sysdeps/m68k/gccframe.h rename to ports/sysdeps/m68k/gccframe.h diff --git a/sysdeps/m68k/jmpbuf-unwind.h b/ports/sysdeps/m68k/jmpbuf-unwind.h similarity index 100% rename from sysdeps/m68k/jmpbuf-unwind.h rename to ports/sysdeps/m68k/jmpbuf-unwind.h diff --git a/sysdeps/m68k/ldsodefs.h b/ports/sysdeps/m68k/ldsodefs.h similarity index 100% rename from sysdeps/m68k/ldsodefs.h rename to ports/sysdeps/m68k/ldsodefs.h diff --git a/sysdeps/m68k/libc-tls.c b/ports/sysdeps/m68k/libc-tls.c similarity index 100% rename from sysdeps/m68k/libc-tls.c rename to ports/sysdeps/m68k/libc-tls.c diff --git a/sysdeps/m68k/m680x0/Implies b/ports/sysdeps/m68k/m680x0/Implies similarity index 100% rename from sysdeps/m68k/m680x0/Implies rename to ports/sysdeps/m68k/m680x0/Implies diff --git a/sysdeps/m68k/m680x0/Makefile b/ports/sysdeps/m68k/m680x0/Makefile similarity index 100% rename from sysdeps/m68k/m680x0/Makefile rename to ports/sysdeps/m68k/m680x0/Makefile diff --git a/sysdeps/m68k/m680x0/add_n.S b/ports/sysdeps/m68k/m680x0/add_n.S similarity index 100% rename from sysdeps/m68k/m680x0/add_n.S rename to ports/sysdeps/m68k/m680x0/add_n.S diff --git a/sysdeps/m68k/m680x0/bits/huge_vall.h b/ports/sysdeps/m68k/m680x0/bits/huge_vall.h similarity index 100% rename from sysdeps/m68k/m680x0/bits/huge_vall.h rename to ports/sysdeps/m68k/m680x0/bits/huge_vall.h diff --git a/sysdeps/m68k/m680x0/bits/mathdef.h b/ports/sysdeps/m68k/m680x0/bits/mathdef.h similarity index 100% rename from sysdeps/m68k/m680x0/bits/mathdef.h rename to ports/sysdeps/m68k/m680x0/bits/mathdef.h diff --git a/sysdeps/m68k/m680x0/fpu/bits/mathinline.h b/ports/sysdeps/m68k/m680x0/fpu/bits/mathinline.h similarity index 100% rename from sysdeps/m68k/m680x0/fpu/bits/mathinline.h rename to ports/sysdeps/m68k/m680x0/fpu/bits/mathinline.h diff --git a/sysdeps/m68k/m680x0/fpu/branred.c b/ports/sysdeps/m68k/m680x0/fpu/branred.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/branred.c rename to ports/sysdeps/m68k/m680x0/fpu/branred.c diff --git a/sysdeps/m68k/m680x0/fpu/doasin.c b/ports/sysdeps/m68k/m680x0/fpu/doasin.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/doasin.c rename to ports/sysdeps/m68k/m680x0/fpu/doasin.c diff --git a/sysdeps/m68k/m680x0/fpu/dosincos.c b/ports/sysdeps/m68k/m680x0/fpu/dosincos.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/dosincos.c rename to ports/sysdeps/m68k/m680x0/fpu/dosincos.c diff --git a/sysdeps/m68k/m680x0/fpu/e_acos.c b/ports/sysdeps/m68k/m680x0/fpu/e_acos.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_acos.c rename to ports/sysdeps/m68k/m680x0/fpu/e_acos.c diff --git a/sysdeps/m68k/m680x0/fpu/e_acosf.c b/ports/sysdeps/m68k/m680x0/fpu/e_acosf.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_acosf.c rename to ports/sysdeps/m68k/m680x0/fpu/e_acosf.c diff --git a/sysdeps/m68k/m680x0/fpu/e_acosl.c b/ports/sysdeps/m68k/m680x0/fpu/e_acosl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_acosl.c rename to ports/sysdeps/m68k/m680x0/fpu/e_acosl.c diff --git a/sysdeps/m68k/m680x0/fpu/e_asin.c b/ports/sysdeps/m68k/m680x0/fpu/e_asin.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_asin.c rename to ports/sysdeps/m68k/m680x0/fpu/e_asin.c diff --git a/sysdeps/m68k/m680x0/fpu/e_asinf.c b/ports/sysdeps/m68k/m680x0/fpu/e_asinf.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_asinf.c rename to ports/sysdeps/m68k/m680x0/fpu/e_asinf.c diff --git a/sysdeps/m68k/m680x0/fpu/e_asinl.c b/ports/sysdeps/m68k/m680x0/fpu/e_asinl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_asinl.c rename to ports/sysdeps/m68k/m680x0/fpu/e_asinl.c diff --git a/sysdeps/m68k/m680x0/fpu/e_atan2.c b/ports/sysdeps/m68k/m680x0/fpu/e_atan2.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_atan2.c rename to ports/sysdeps/m68k/m680x0/fpu/e_atan2.c diff --git a/sysdeps/m68k/m680x0/fpu/e_atan2f.c b/ports/sysdeps/m68k/m680x0/fpu/e_atan2f.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_atan2f.c rename to ports/sysdeps/m68k/m680x0/fpu/e_atan2f.c diff --git a/sysdeps/m68k/m680x0/fpu/e_atan2l.c b/ports/sysdeps/m68k/m680x0/fpu/e_atan2l.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_atan2l.c rename to ports/sysdeps/m68k/m680x0/fpu/e_atan2l.c diff --git a/sysdeps/m68k/m680x0/fpu/e_atanh.c b/ports/sysdeps/m68k/m680x0/fpu/e_atanh.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_atanh.c rename to ports/sysdeps/m68k/m680x0/fpu/e_atanh.c diff --git a/sysdeps/m68k/m680x0/fpu/e_atanhf.c b/ports/sysdeps/m68k/m680x0/fpu/e_atanhf.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_atanhf.c rename to ports/sysdeps/m68k/m680x0/fpu/e_atanhf.c diff --git a/sysdeps/m68k/m680x0/fpu/e_atanhl.c b/ports/sysdeps/m68k/m680x0/fpu/e_atanhl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_atanhl.c rename to ports/sysdeps/m68k/m680x0/fpu/e_atanhl.c diff --git a/sysdeps/m68k/m680x0/fpu/e_cosh.c b/ports/sysdeps/m68k/m680x0/fpu/e_cosh.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_cosh.c rename to ports/sysdeps/m68k/m680x0/fpu/e_cosh.c diff --git a/sysdeps/m68k/m680x0/fpu/e_coshf.c b/ports/sysdeps/m68k/m680x0/fpu/e_coshf.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_coshf.c rename to ports/sysdeps/m68k/m680x0/fpu/e_coshf.c diff --git a/sysdeps/m68k/m680x0/fpu/e_coshl.c b/ports/sysdeps/m68k/m680x0/fpu/e_coshl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_coshl.c rename to ports/sysdeps/m68k/m680x0/fpu/e_coshl.c diff --git a/sysdeps/m68k/m680x0/fpu/e_exp.c b/ports/sysdeps/m68k/m680x0/fpu/e_exp.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_exp.c rename to ports/sysdeps/m68k/m680x0/fpu/e_exp.c diff --git a/sysdeps/m68k/m680x0/fpu/e_exp10.c b/ports/sysdeps/m68k/m680x0/fpu/e_exp10.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_exp10.c rename to ports/sysdeps/m68k/m680x0/fpu/e_exp10.c diff --git a/sysdeps/m68k/m680x0/fpu/e_exp10f.c b/ports/sysdeps/m68k/m680x0/fpu/e_exp10f.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_exp10f.c rename to ports/sysdeps/m68k/m680x0/fpu/e_exp10f.c diff --git a/sysdeps/m68k/m680x0/fpu/e_exp10l.c b/ports/sysdeps/m68k/m680x0/fpu/e_exp10l.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_exp10l.c rename to ports/sysdeps/m68k/m680x0/fpu/e_exp10l.c diff --git a/sysdeps/m68k/m680x0/fpu/e_exp2.c b/ports/sysdeps/m68k/m680x0/fpu/e_exp2.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_exp2.c rename to ports/sysdeps/m68k/m680x0/fpu/e_exp2.c diff --git a/sysdeps/m68k/m680x0/fpu/e_exp2f.c b/ports/sysdeps/m68k/m680x0/fpu/e_exp2f.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_exp2f.c rename to ports/sysdeps/m68k/m680x0/fpu/e_exp2f.c diff --git a/sysdeps/m68k/m680x0/fpu/e_exp2l.c b/ports/sysdeps/m68k/m680x0/fpu/e_exp2l.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_exp2l.c rename to ports/sysdeps/m68k/m680x0/fpu/e_exp2l.c diff --git a/sysdeps/m68k/m680x0/fpu/e_expf.c b/ports/sysdeps/m68k/m680x0/fpu/e_expf.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_expf.c rename to ports/sysdeps/m68k/m680x0/fpu/e_expf.c diff --git a/sysdeps/m68k/m680x0/fpu/e_expl.c b/ports/sysdeps/m68k/m680x0/fpu/e_expl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_expl.c rename to ports/sysdeps/m68k/m680x0/fpu/e_expl.c diff --git a/sysdeps/m68k/m680x0/fpu/e_fmod.c b/ports/sysdeps/m68k/m680x0/fpu/e_fmod.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_fmod.c rename to ports/sysdeps/m68k/m680x0/fpu/e_fmod.c diff --git a/sysdeps/m68k/m680x0/fpu/e_fmodf.c b/ports/sysdeps/m68k/m680x0/fpu/e_fmodf.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_fmodf.c rename to ports/sysdeps/m68k/m680x0/fpu/e_fmodf.c diff --git a/sysdeps/m68k/m680x0/fpu/e_fmodl.c b/ports/sysdeps/m68k/m680x0/fpu/e_fmodl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_fmodl.c rename to ports/sysdeps/m68k/m680x0/fpu/e_fmodl.c diff --git a/sysdeps/m68k/m680x0/fpu/e_ilogb.c b/ports/sysdeps/m68k/m680x0/fpu/e_ilogb.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_ilogb.c rename to ports/sysdeps/m68k/m680x0/fpu/e_ilogb.c diff --git a/sysdeps/m68k/m680x0/fpu/e_ilogbf.c b/ports/sysdeps/m68k/m680x0/fpu/e_ilogbf.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_ilogbf.c rename to ports/sysdeps/m68k/m680x0/fpu/e_ilogbf.c diff --git a/sysdeps/m68k/m680x0/fpu/e_ilogbl.c b/ports/sysdeps/m68k/m680x0/fpu/e_ilogbl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_ilogbl.c rename to ports/sysdeps/m68k/m680x0/fpu/e_ilogbl.c diff --git a/sysdeps/m68k/m680x0/fpu/e_log.c b/ports/sysdeps/m68k/m680x0/fpu/e_log.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_log.c rename to ports/sysdeps/m68k/m680x0/fpu/e_log.c diff --git a/sysdeps/m68k/m680x0/fpu/e_log10.c b/ports/sysdeps/m68k/m680x0/fpu/e_log10.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_log10.c rename to ports/sysdeps/m68k/m680x0/fpu/e_log10.c diff --git a/sysdeps/m68k/m680x0/fpu/e_log10f.c b/ports/sysdeps/m68k/m680x0/fpu/e_log10f.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_log10f.c rename to ports/sysdeps/m68k/m680x0/fpu/e_log10f.c diff --git a/sysdeps/m68k/m680x0/fpu/e_log10l.c b/ports/sysdeps/m68k/m680x0/fpu/e_log10l.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_log10l.c rename to ports/sysdeps/m68k/m680x0/fpu/e_log10l.c diff --git a/sysdeps/m68k/m680x0/fpu/e_log2.c b/ports/sysdeps/m68k/m680x0/fpu/e_log2.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_log2.c rename to ports/sysdeps/m68k/m680x0/fpu/e_log2.c diff --git a/sysdeps/m68k/m680x0/fpu/e_log2f.c b/ports/sysdeps/m68k/m680x0/fpu/e_log2f.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_log2f.c rename to ports/sysdeps/m68k/m680x0/fpu/e_log2f.c diff --git a/sysdeps/m68k/m680x0/fpu/e_log2l.c b/ports/sysdeps/m68k/m680x0/fpu/e_log2l.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_log2l.c rename to ports/sysdeps/m68k/m680x0/fpu/e_log2l.c diff --git a/sysdeps/m68k/m680x0/fpu/e_logf.c b/ports/sysdeps/m68k/m680x0/fpu/e_logf.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_logf.c rename to ports/sysdeps/m68k/m680x0/fpu/e_logf.c diff --git a/sysdeps/m68k/m680x0/fpu/e_logl.c b/ports/sysdeps/m68k/m680x0/fpu/e_logl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_logl.c rename to ports/sysdeps/m68k/m680x0/fpu/e_logl.c diff --git a/sysdeps/m68k/m680x0/fpu/e_pow.c b/ports/sysdeps/m68k/m680x0/fpu/e_pow.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_pow.c rename to ports/sysdeps/m68k/m680x0/fpu/e_pow.c diff --git a/sysdeps/m68k/m680x0/fpu/e_powf.c b/ports/sysdeps/m68k/m680x0/fpu/e_powf.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_powf.c rename to ports/sysdeps/m68k/m680x0/fpu/e_powf.c diff --git a/sysdeps/m68k/m680x0/fpu/e_powl.c b/ports/sysdeps/m68k/m680x0/fpu/e_powl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_powl.c rename to ports/sysdeps/m68k/m680x0/fpu/e_powl.c diff --git a/sysdeps/m68k/m680x0/fpu/e_rem_pio2.c b/ports/sysdeps/m68k/m680x0/fpu/e_rem_pio2.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_rem_pio2.c rename to ports/sysdeps/m68k/m680x0/fpu/e_rem_pio2.c diff --git a/sysdeps/m68k/m680x0/fpu/e_rem_pio2f.c b/ports/sysdeps/m68k/m680x0/fpu/e_rem_pio2f.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_rem_pio2f.c rename to ports/sysdeps/m68k/m680x0/fpu/e_rem_pio2f.c diff --git a/sysdeps/m68k/m680x0/fpu/e_rem_pio2l.c b/ports/sysdeps/m68k/m680x0/fpu/e_rem_pio2l.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_rem_pio2l.c rename to ports/sysdeps/m68k/m680x0/fpu/e_rem_pio2l.c diff --git a/sysdeps/m68k/m680x0/fpu/e_remainder.c b/ports/sysdeps/m68k/m680x0/fpu/e_remainder.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_remainder.c rename to ports/sysdeps/m68k/m680x0/fpu/e_remainder.c diff --git a/sysdeps/m68k/m680x0/fpu/e_remainderf.c b/ports/sysdeps/m68k/m680x0/fpu/e_remainderf.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_remainderf.c rename to ports/sysdeps/m68k/m680x0/fpu/e_remainderf.c diff --git a/sysdeps/m68k/m680x0/fpu/e_remainderl.c b/ports/sysdeps/m68k/m680x0/fpu/e_remainderl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_remainderl.c rename to ports/sysdeps/m68k/m680x0/fpu/e_remainderl.c diff --git a/sysdeps/m68k/m680x0/fpu/e_scalb.c b/ports/sysdeps/m68k/m680x0/fpu/e_scalb.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_scalb.c rename to ports/sysdeps/m68k/m680x0/fpu/e_scalb.c diff --git a/sysdeps/m68k/m680x0/fpu/e_scalbf.c b/ports/sysdeps/m68k/m680x0/fpu/e_scalbf.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_scalbf.c rename to ports/sysdeps/m68k/m680x0/fpu/e_scalbf.c diff --git a/sysdeps/m68k/m680x0/fpu/e_scalbl.c b/ports/sysdeps/m68k/m680x0/fpu/e_scalbl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_scalbl.c rename to ports/sysdeps/m68k/m680x0/fpu/e_scalbl.c diff --git a/sysdeps/m68k/m680x0/fpu/e_sinh.c b/ports/sysdeps/m68k/m680x0/fpu/e_sinh.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_sinh.c rename to ports/sysdeps/m68k/m680x0/fpu/e_sinh.c diff --git a/sysdeps/m68k/m680x0/fpu/e_sinhf.c b/ports/sysdeps/m68k/m680x0/fpu/e_sinhf.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_sinhf.c rename to ports/sysdeps/m68k/m680x0/fpu/e_sinhf.c diff --git a/sysdeps/m68k/m680x0/fpu/e_sinhl.c b/ports/sysdeps/m68k/m680x0/fpu/e_sinhl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_sinhl.c rename to ports/sysdeps/m68k/m680x0/fpu/e_sinhl.c diff --git a/sysdeps/m68k/m680x0/fpu/e_sqrt.c b/ports/sysdeps/m68k/m680x0/fpu/e_sqrt.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_sqrt.c rename to ports/sysdeps/m68k/m680x0/fpu/e_sqrt.c diff --git a/sysdeps/m68k/m680x0/fpu/e_sqrtf.c b/ports/sysdeps/m68k/m680x0/fpu/e_sqrtf.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_sqrtf.c rename to ports/sysdeps/m68k/m680x0/fpu/e_sqrtf.c diff --git a/sysdeps/m68k/m680x0/fpu/e_sqrtl.c b/ports/sysdeps/m68k/m680x0/fpu/e_sqrtl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/e_sqrtl.c rename to ports/sysdeps/m68k/m680x0/fpu/e_sqrtl.c diff --git a/sysdeps/m68k/m680x0/fpu/fraiseexcpt.c b/ports/sysdeps/m68k/m680x0/fpu/fraiseexcpt.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/fraiseexcpt.c rename to ports/sysdeps/m68k/m680x0/fpu/fraiseexcpt.c diff --git a/sysdeps/m68k/m680x0/fpu/halfulp.c b/ports/sysdeps/m68k/m680x0/fpu/halfulp.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/halfulp.c rename to ports/sysdeps/m68k/m680x0/fpu/halfulp.c diff --git a/sysdeps/m68k/m680x0/fpu/k_cosl.c b/ports/sysdeps/m68k/m680x0/fpu/k_cosl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/k_cosl.c rename to ports/sysdeps/m68k/m680x0/fpu/k_cosl.c diff --git a/sysdeps/m68k/m680x0/fpu/k_rem_pio2.c b/ports/sysdeps/m68k/m680x0/fpu/k_rem_pio2.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/k_rem_pio2.c rename to ports/sysdeps/m68k/m680x0/fpu/k_rem_pio2.c diff --git a/sysdeps/m68k/m680x0/fpu/k_rem_pio2f.c b/ports/sysdeps/m68k/m680x0/fpu/k_rem_pio2f.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/k_rem_pio2f.c rename to ports/sysdeps/m68k/m680x0/fpu/k_rem_pio2f.c diff --git a/sysdeps/m68k/m680x0/fpu/k_rem_pio2l.c b/ports/sysdeps/m68k/m680x0/fpu/k_rem_pio2l.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/k_rem_pio2l.c rename to ports/sysdeps/m68k/m680x0/fpu/k_rem_pio2l.c diff --git a/sysdeps/m68k/m680x0/fpu/k_sinl.c b/ports/sysdeps/m68k/m680x0/fpu/k_sinl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/k_sinl.c rename to ports/sysdeps/m68k/m680x0/fpu/k_sinl.c diff --git a/sysdeps/m68k/m680x0/fpu/k_tanf.c b/ports/sysdeps/m68k/m680x0/fpu/k_tanf.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/k_tanf.c rename to ports/sysdeps/m68k/m680x0/fpu/k_tanf.c diff --git a/sysdeps/m68k/m680x0/fpu/k_tanl.c b/ports/sysdeps/m68k/m680x0/fpu/k_tanl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/k_tanl.c rename to ports/sysdeps/m68k/m680x0/fpu/k_tanl.c diff --git a/sysdeps/m68k/m680x0/fpu/libm-test-ulps b/ports/sysdeps/m68k/m680x0/fpu/libm-test-ulps similarity index 100% rename from sysdeps/m68k/m680x0/fpu/libm-test-ulps rename to ports/sysdeps/m68k/m680x0/fpu/libm-test-ulps diff --git a/sysdeps/m68k/m680x0/fpu/math_private.h b/ports/sysdeps/m68k/m680x0/fpu/math_private.h similarity index 100% rename from sysdeps/m68k/m680x0/fpu/math_private.h rename to ports/sysdeps/m68k/m680x0/fpu/math_private.h diff --git a/sysdeps/m68k/m680x0/fpu/mathimpl.h b/ports/sysdeps/m68k/m680x0/fpu/mathimpl.h similarity index 100% rename from sysdeps/m68k/m680x0/fpu/mathimpl.h rename to ports/sysdeps/m68k/m680x0/fpu/mathimpl.h diff --git a/sysdeps/m68k/m680x0/fpu/mpa.c b/ports/sysdeps/m68k/m680x0/fpu/mpa.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/mpa.c rename to ports/sysdeps/m68k/m680x0/fpu/mpa.c diff --git a/sysdeps/m68k/m680x0/fpu/mpatan.c b/ports/sysdeps/m68k/m680x0/fpu/mpatan.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/mpatan.c rename to ports/sysdeps/m68k/m680x0/fpu/mpatan.c diff --git a/sysdeps/m68k/m680x0/fpu/mpatan2.c b/ports/sysdeps/m68k/m680x0/fpu/mpatan2.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/mpatan2.c rename to ports/sysdeps/m68k/m680x0/fpu/mpatan2.c diff --git a/sysdeps/m68k/m680x0/fpu/mpexp.c b/ports/sysdeps/m68k/m680x0/fpu/mpexp.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/mpexp.c rename to ports/sysdeps/m68k/m680x0/fpu/mpexp.c diff --git a/sysdeps/m68k/m680x0/fpu/mplog.c b/ports/sysdeps/m68k/m680x0/fpu/mplog.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/mplog.c rename to ports/sysdeps/m68k/m680x0/fpu/mplog.c diff --git a/sysdeps/m68k/m680x0/fpu/mpsqrt.c b/ports/sysdeps/m68k/m680x0/fpu/mpsqrt.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/mpsqrt.c rename to ports/sysdeps/m68k/m680x0/fpu/mpsqrt.c diff --git a/sysdeps/m68k/m680x0/fpu/mptan.c b/ports/sysdeps/m68k/m680x0/fpu/mptan.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/mptan.c rename to ports/sysdeps/m68k/m680x0/fpu/mptan.c diff --git a/sysdeps/m68k/m680x0/fpu/s_atan.c b/ports/sysdeps/m68k/m680x0/fpu/s_atan.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_atan.c rename to ports/sysdeps/m68k/m680x0/fpu/s_atan.c diff --git a/sysdeps/m68k/m680x0/fpu/s_atanf.c b/ports/sysdeps/m68k/m680x0/fpu/s_atanf.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_atanf.c rename to ports/sysdeps/m68k/m680x0/fpu/s_atanf.c diff --git a/sysdeps/m68k/m680x0/fpu/s_atanl.c b/ports/sysdeps/m68k/m680x0/fpu/s_atanl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_atanl.c rename to ports/sysdeps/m68k/m680x0/fpu/s_atanl.c diff --git a/sysdeps/m68k/m680x0/fpu/s_ccosh.c b/ports/sysdeps/m68k/m680x0/fpu/s_ccosh.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_ccosh.c rename to ports/sysdeps/m68k/m680x0/fpu/s_ccosh.c diff --git a/sysdeps/m68k/m680x0/fpu/s_ccoshf.c b/ports/sysdeps/m68k/m680x0/fpu/s_ccoshf.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_ccoshf.c rename to ports/sysdeps/m68k/m680x0/fpu/s_ccoshf.c diff --git a/sysdeps/m68k/m680x0/fpu/s_ccoshl.c b/ports/sysdeps/m68k/m680x0/fpu/s_ccoshl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_ccoshl.c rename to ports/sysdeps/m68k/m680x0/fpu/s_ccoshl.c diff --git a/sysdeps/m68k/m680x0/fpu/s_ceil.c b/ports/sysdeps/m68k/m680x0/fpu/s_ceil.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_ceil.c rename to ports/sysdeps/m68k/m680x0/fpu/s_ceil.c diff --git a/sysdeps/m68k/m680x0/fpu/s_ceilf.c b/ports/sysdeps/m68k/m680x0/fpu/s_ceilf.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_ceilf.c rename to ports/sysdeps/m68k/m680x0/fpu/s_ceilf.c diff --git a/sysdeps/m68k/m680x0/fpu/s_ceill.c b/ports/sysdeps/m68k/m680x0/fpu/s_ceill.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_ceill.c rename to ports/sysdeps/m68k/m680x0/fpu/s_ceill.c diff --git a/sysdeps/m68k/m680x0/fpu/s_cexp.c b/ports/sysdeps/m68k/m680x0/fpu/s_cexp.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_cexp.c rename to ports/sysdeps/m68k/m680x0/fpu/s_cexp.c diff --git a/sysdeps/m68k/m680x0/fpu/s_cexpf.c b/ports/sysdeps/m68k/m680x0/fpu/s_cexpf.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_cexpf.c rename to ports/sysdeps/m68k/m680x0/fpu/s_cexpf.c diff --git a/sysdeps/m68k/m680x0/fpu/s_cexpl.c b/ports/sysdeps/m68k/m680x0/fpu/s_cexpl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_cexpl.c rename to ports/sysdeps/m68k/m680x0/fpu/s_cexpl.c diff --git a/sysdeps/m68k/m680x0/fpu/s_cos.c b/ports/sysdeps/m68k/m680x0/fpu/s_cos.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_cos.c rename to ports/sysdeps/m68k/m680x0/fpu/s_cos.c diff --git a/sysdeps/m68k/m680x0/fpu/s_cosf.c b/ports/sysdeps/m68k/m680x0/fpu/s_cosf.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_cosf.c rename to ports/sysdeps/m68k/m680x0/fpu/s_cosf.c diff --git a/sysdeps/m68k/m680x0/fpu/s_cosl.c b/ports/sysdeps/m68k/m680x0/fpu/s_cosl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_cosl.c rename to ports/sysdeps/m68k/m680x0/fpu/s_cosl.c diff --git a/sysdeps/m68k/m680x0/fpu/s_csin.c b/ports/sysdeps/m68k/m680x0/fpu/s_csin.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_csin.c rename to ports/sysdeps/m68k/m680x0/fpu/s_csin.c diff --git a/sysdeps/m68k/m680x0/fpu/s_csinf.c b/ports/sysdeps/m68k/m680x0/fpu/s_csinf.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_csinf.c rename to ports/sysdeps/m68k/m680x0/fpu/s_csinf.c diff --git a/sysdeps/m68k/m680x0/fpu/s_csinh.c b/ports/sysdeps/m68k/m680x0/fpu/s_csinh.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_csinh.c rename to ports/sysdeps/m68k/m680x0/fpu/s_csinh.c diff --git a/sysdeps/m68k/m680x0/fpu/s_csinhf.c b/ports/sysdeps/m68k/m680x0/fpu/s_csinhf.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_csinhf.c rename to ports/sysdeps/m68k/m680x0/fpu/s_csinhf.c diff --git a/sysdeps/m68k/m680x0/fpu/s_csinhl.c b/ports/sysdeps/m68k/m680x0/fpu/s_csinhl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_csinhl.c rename to ports/sysdeps/m68k/m680x0/fpu/s_csinhl.c diff --git a/sysdeps/m68k/m680x0/fpu/s_csinl.c b/ports/sysdeps/m68k/m680x0/fpu/s_csinl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_csinl.c rename to ports/sysdeps/m68k/m680x0/fpu/s_csinl.c diff --git a/sysdeps/m68k/m680x0/fpu/s_expm1.c b/ports/sysdeps/m68k/m680x0/fpu/s_expm1.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_expm1.c rename to ports/sysdeps/m68k/m680x0/fpu/s_expm1.c diff --git a/sysdeps/m68k/m680x0/fpu/s_expm1f.c b/ports/sysdeps/m68k/m680x0/fpu/s_expm1f.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_expm1f.c rename to ports/sysdeps/m68k/m680x0/fpu/s_expm1f.c diff --git a/sysdeps/m68k/m680x0/fpu/s_expm1l.c b/ports/sysdeps/m68k/m680x0/fpu/s_expm1l.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_expm1l.c rename to ports/sysdeps/m68k/m680x0/fpu/s_expm1l.c diff --git a/sysdeps/m68k/m680x0/fpu/s_fabs.c b/ports/sysdeps/m68k/m680x0/fpu/s_fabs.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_fabs.c rename to ports/sysdeps/m68k/m680x0/fpu/s_fabs.c diff --git a/sysdeps/m68k/m680x0/fpu/s_fabsf.c b/ports/sysdeps/m68k/m680x0/fpu/s_fabsf.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_fabsf.c rename to ports/sysdeps/m68k/m680x0/fpu/s_fabsf.c diff --git a/sysdeps/m68k/m680x0/fpu/s_fabsl.c b/ports/sysdeps/m68k/m680x0/fpu/s_fabsl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_fabsl.c rename to ports/sysdeps/m68k/m680x0/fpu/s_fabsl.c diff --git a/sysdeps/m68k/m680x0/fpu/s_finite.c b/ports/sysdeps/m68k/m680x0/fpu/s_finite.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_finite.c rename to ports/sysdeps/m68k/m680x0/fpu/s_finite.c diff --git a/sysdeps/m68k/m680x0/fpu/s_finitef.c b/ports/sysdeps/m68k/m680x0/fpu/s_finitef.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_finitef.c rename to ports/sysdeps/m68k/m680x0/fpu/s_finitef.c diff --git a/sysdeps/m68k/m680x0/fpu/s_finitel.c b/ports/sysdeps/m68k/m680x0/fpu/s_finitel.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_finitel.c rename to ports/sysdeps/m68k/m680x0/fpu/s_finitel.c diff --git a/sysdeps/m68k/m680x0/fpu/s_floor.c b/ports/sysdeps/m68k/m680x0/fpu/s_floor.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_floor.c rename to ports/sysdeps/m68k/m680x0/fpu/s_floor.c diff --git a/sysdeps/m68k/m680x0/fpu/s_floorf.c b/ports/sysdeps/m68k/m680x0/fpu/s_floorf.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_floorf.c rename to ports/sysdeps/m68k/m680x0/fpu/s_floorf.c diff --git a/sysdeps/m68k/m680x0/fpu/s_floorl.c b/ports/sysdeps/m68k/m680x0/fpu/s_floorl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_floorl.c rename to ports/sysdeps/m68k/m680x0/fpu/s_floorl.c diff --git a/sysdeps/m68k/m680x0/fpu/s_fpclassifyl.c b/ports/sysdeps/m68k/m680x0/fpu/s_fpclassifyl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_fpclassifyl.c rename to ports/sysdeps/m68k/m680x0/fpu/s_fpclassifyl.c diff --git a/sysdeps/m68k/m680x0/fpu/s_frexp.c b/ports/sysdeps/m68k/m680x0/fpu/s_frexp.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_frexp.c rename to ports/sysdeps/m68k/m680x0/fpu/s_frexp.c diff --git a/sysdeps/m68k/m680x0/fpu/s_frexpf.c b/ports/sysdeps/m68k/m680x0/fpu/s_frexpf.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_frexpf.c rename to ports/sysdeps/m68k/m680x0/fpu/s_frexpf.c diff --git a/sysdeps/m68k/m680x0/fpu/s_frexpl.c b/ports/sysdeps/m68k/m680x0/fpu/s_frexpl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_frexpl.c rename to ports/sysdeps/m68k/m680x0/fpu/s_frexpl.c diff --git a/sysdeps/m68k/m680x0/fpu/s_isinf.c b/ports/sysdeps/m68k/m680x0/fpu/s_isinf.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_isinf.c rename to ports/sysdeps/m68k/m680x0/fpu/s_isinf.c diff --git a/sysdeps/m68k/m680x0/fpu/s_isinff.c b/ports/sysdeps/m68k/m680x0/fpu/s_isinff.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_isinff.c rename to ports/sysdeps/m68k/m680x0/fpu/s_isinff.c diff --git a/sysdeps/m68k/m680x0/fpu/s_isinfl.c b/ports/sysdeps/m68k/m680x0/fpu/s_isinfl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_isinfl.c rename to ports/sysdeps/m68k/m680x0/fpu/s_isinfl.c diff --git a/sysdeps/m68k/m680x0/fpu/s_isnan.c b/ports/sysdeps/m68k/m680x0/fpu/s_isnan.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_isnan.c rename to ports/sysdeps/m68k/m680x0/fpu/s_isnan.c diff --git a/sysdeps/m68k/m680x0/fpu/s_isnanf.c b/ports/sysdeps/m68k/m680x0/fpu/s_isnanf.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_isnanf.c rename to ports/sysdeps/m68k/m680x0/fpu/s_isnanf.c diff --git a/sysdeps/m68k/m680x0/fpu/s_isnanl.c b/ports/sysdeps/m68k/m680x0/fpu/s_isnanl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_isnanl.c rename to ports/sysdeps/m68k/m680x0/fpu/s_isnanl.c diff --git a/sysdeps/m68k/m680x0/fpu/s_llrint.c b/ports/sysdeps/m68k/m680x0/fpu/s_llrint.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_llrint.c rename to ports/sysdeps/m68k/m680x0/fpu/s_llrint.c diff --git a/sysdeps/m68k/m680x0/fpu/s_llrintf.c b/ports/sysdeps/m68k/m680x0/fpu/s_llrintf.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_llrintf.c rename to ports/sysdeps/m68k/m680x0/fpu/s_llrintf.c diff --git a/sysdeps/m68k/m680x0/fpu/s_llrintl.c b/ports/sysdeps/m68k/m680x0/fpu/s_llrintl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_llrintl.c rename to ports/sysdeps/m68k/m680x0/fpu/s_llrintl.c diff --git a/sysdeps/m68k/m680x0/fpu/s_log1p.c b/ports/sysdeps/m68k/m680x0/fpu/s_log1p.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_log1p.c rename to ports/sysdeps/m68k/m680x0/fpu/s_log1p.c diff --git a/sysdeps/m68k/m680x0/fpu/s_log1pf.c b/ports/sysdeps/m68k/m680x0/fpu/s_log1pf.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_log1pf.c rename to ports/sysdeps/m68k/m680x0/fpu/s_log1pf.c diff --git a/sysdeps/m68k/m680x0/fpu/s_log1pl.c b/ports/sysdeps/m68k/m680x0/fpu/s_log1pl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_log1pl.c rename to ports/sysdeps/m68k/m680x0/fpu/s_log1pl.c diff --git a/sysdeps/m68k/m680x0/fpu/s_logbl.c b/ports/sysdeps/m68k/m680x0/fpu/s_logbl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_logbl.c rename to ports/sysdeps/m68k/m680x0/fpu/s_logbl.c diff --git a/sysdeps/m68k/m680x0/fpu/s_lrint.c b/ports/sysdeps/m68k/m680x0/fpu/s_lrint.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_lrint.c rename to ports/sysdeps/m68k/m680x0/fpu/s_lrint.c diff --git a/sysdeps/m68k/m680x0/fpu/s_lrintf.c b/ports/sysdeps/m68k/m680x0/fpu/s_lrintf.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_lrintf.c rename to ports/sysdeps/m68k/m680x0/fpu/s_lrintf.c diff --git a/sysdeps/m68k/m680x0/fpu/s_lrintl.c b/ports/sysdeps/m68k/m680x0/fpu/s_lrintl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_lrintl.c rename to ports/sysdeps/m68k/m680x0/fpu/s_lrintl.c diff --git a/sysdeps/m68k/m680x0/fpu/s_modf.c b/ports/sysdeps/m68k/m680x0/fpu/s_modf.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_modf.c rename to ports/sysdeps/m68k/m680x0/fpu/s_modf.c diff --git a/sysdeps/m68k/m680x0/fpu/s_modff.c b/ports/sysdeps/m68k/m680x0/fpu/s_modff.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_modff.c rename to ports/sysdeps/m68k/m680x0/fpu/s_modff.c diff --git a/sysdeps/m68k/m680x0/fpu/s_modfl.c b/ports/sysdeps/m68k/m680x0/fpu/s_modfl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_modfl.c rename to ports/sysdeps/m68k/m680x0/fpu/s_modfl.c diff --git a/sysdeps/m68k/m680x0/fpu/s_nearbyint.c b/ports/sysdeps/m68k/m680x0/fpu/s_nearbyint.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_nearbyint.c rename to ports/sysdeps/m68k/m680x0/fpu/s_nearbyint.c diff --git a/sysdeps/m68k/m680x0/fpu/s_nearbyintf.c b/ports/sysdeps/m68k/m680x0/fpu/s_nearbyintf.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_nearbyintf.c rename to ports/sysdeps/m68k/m680x0/fpu/s_nearbyintf.c diff --git a/sysdeps/m68k/m680x0/fpu/s_nearbyintl.c b/ports/sysdeps/m68k/m680x0/fpu/s_nearbyintl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_nearbyintl.c rename to ports/sysdeps/m68k/m680x0/fpu/s_nearbyintl.c diff --git a/sysdeps/m68k/m680x0/fpu/s_nextafterl.c b/ports/sysdeps/m68k/m680x0/fpu/s_nextafterl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_nextafterl.c rename to ports/sysdeps/m68k/m680x0/fpu/s_nextafterl.c diff --git a/sysdeps/m68k/m680x0/fpu/s_remquo.c b/ports/sysdeps/m68k/m680x0/fpu/s_remquo.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_remquo.c rename to ports/sysdeps/m68k/m680x0/fpu/s_remquo.c diff --git a/sysdeps/m68k/m680x0/fpu/s_remquof.c b/ports/sysdeps/m68k/m680x0/fpu/s_remquof.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_remquof.c rename to ports/sysdeps/m68k/m680x0/fpu/s_remquof.c diff --git a/sysdeps/m68k/m680x0/fpu/s_remquol.c b/ports/sysdeps/m68k/m680x0/fpu/s_remquol.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_remquol.c rename to ports/sysdeps/m68k/m680x0/fpu/s_remquol.c diff --git a/sysdeps/m68k/m680x0/fpu/s_rint.c b/ports/sysdeps/m68k/m680x0/fpu/s_rint.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_rint.c rename to ports/sysdeps/m68k/m680x0/fpu/s_rint.c diff --git a/sysdeps/m68k/m680x0/fpu/s_rintf.c b/ports/sysdeps/m68k/m680x0/fpu/s_rintf.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_rintf.c rename to ports/sysdeps/m68k/m680x0/fpu/s_rintf.c diff --git a/sysdeps/m68k/m680x0/fpu/s_rintl.c b/ports/sysdeps/m68k/m680x0/fpu/s_rintl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_rintl.c rename to ports/sysdeps/m68k/m680x0/fpu/s_rintl.c diff --git a/sysdeps/m68k/m680x0/fpu/s_scalbln.c b/ports/sysdeps/m68k/m680x0/fpu/s_scalbln.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_scalbln.c rename to ports/sysdeps/m68k/m680x0/fpu/s_scalbln.c diff --git a/sysdeps/m68k/m680x0/fpu/s_scalblnf.c b/ports/sysdeps/m68k/m680x0/fpu/s_scalblnf.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_scalblnf.c rename to ports/sysdeps/m68k/m680x0/fpu/s_scalblnf.c diff --git a/sysdeps/m68k/m680x0/fpu/s_scalblnl.c b/ports/sysdeps/m68k/m680x0/fpu/s_scalblnl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_scalblnl.c rename to ports/sysdeps/m68k/m680x0/fpu/s_scalblnl.c diff --git a/sysdeps/m68k/m680x0/fpu/s_scalbn.c b/ports/sysdeps/m68k/m680x0/fpu/s_scalbn.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_scalbn.c rename to ports/sysdeps/m68k/m680x0/fpu/s_scalbn.c diff --git a/sysdeps/m68k/m680x0/fpu/s_scalbnf.c b/ports/sysdeps/m68k/m680x0/fpu/s_scalbnf.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_scalbnf.c rename to ports/sysdeps/m68k/m680x0/fpu/s_scalbnf.c diff --git a/sysdeps/m68k/m680x0/fpu/s_scalbnl.c b/ports/sysdeps/m68k/m680x0/fpu/s_scalbnl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_scalbnl.c rename to ports/sysdeps/m68k/m680x0/fpu/s_scalbnl.c diff --git a/sysdeps/m68k/m680x0/fpu/s_significand.c b/ports/sysdeps/m68k/m680x0/fpu/s_significand.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_significand.c rename to ports/sysdeps/m68k/m680x0/fpu/s_significand.c diff --git a/sysdeps/m68k/m680x0/fpu/s_significandf.c b/ports/sysdeps/m68k/m680x0/fpu/s_significandf.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_significandf.c rename to ports/sysdeps/m68k/m680x0/fpu/s_significandf.c diff --git a/sysdeps/m68k/m680x0/fpu/s_significandl.c b/ports/sysdeps/m68k/m680x0/fpu/s_significandl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_significandl.c rename to ports/sysdeps/m68k/m680x0/fpu/s_significandl.c diff --git a/sysdeps/m68k/m680x0/fpu/s_sin.c b/ports/sysdeps/m68k/m680x0/fpu/s_sin.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_sin.c rename to ports/sysdeps/m68k/m680x0/fpu/s_sin.c diff --git a/sysdeps/m68k/m680x0/fpu/s_sincos.c b/ports/sysdeps/m68k/m680x0/fpu/s_sincos.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_sincos.c rename to ports/sysdeps/m68k/m680x0/fpu/s_sincos.c diff --git a/sysdeps/m68k/m680x0/fpu/s_sincosf.c b/ports/sysdeps/m68k/m680x0/fpu/s_sincosf.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_sincosf.c rename to ports/sysdeps/m68k/m680x0/fpu/s_sincosf.c diff --git a/sysdeps/m68k/m680x0/fpu/s_sincosl.c b/ports/sysdeps/m68k/m680x0/fpu/s_sincosl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_sincosl.c rename to ports/sysdeps/m68k/m680x0/fpu/s_sincosl.c diff --git a/sysdeps/m68k/m680x0/fpu/s_sinf.c b/ports/sysdeps/m68k/m680x0/fpu/s_sinf.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_sinf.c rename to ports/sysdeps/m68k/m680x0/fpu/s_sinf.c diff --git a/sysdeps/m68k/m680x0/fpu/s_sinl.c b/ports/sysdeps/m68k/m680x0/fpu/s_sinl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_sinl.c rename to ports/sysdeps/m68k/m680x0/fpu/s_sinl.c diff --git a/sysdeps/m68k/m680x0/fpu/s_tan.c b/ports/sysdeps/m68k/m680x0/fpu/s_tan.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_tan.c rename to ports/sysdeps/m68k/m680x0/fpu/s_tan.c diff --git a/sysdeps/m68k/m680x0/fpu/s_tanf.c b/ports/sysdeps/m68k/m680x0/fpu/s_tanf.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_tanf.c rename to ports/sysdeps/m68k/m680x0/fpu/s_tanf.c diff --git a/sysdeps/m68k/m680x0/fpu/s_tanh.c b/ports/sysdeps/m68k/m680x0/fpu/s_tanh.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_tanh.c rename to ports/sysdeps/m68k/m680x0/fpu/s_tanh.c diff --git a/sysdeps/m68k/m680x0/fpu/s_tanhf.c b/ports/sysdeps/m68k/m680x0/fpu/s_tanhf.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_tanhf.c rename to ports/sysdeps/m68k/m680x0/fpu/s_tanhf.c diff --git a/sysdeps/m68k/m680x0/fpu/s_tanhl.c b/ports/sysdeps/m68k/m680x0/fpu/s_tanhl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_tanhl.c rename to ports/sysdeps/m68k/m680x0/fpu/s_tanhl.c diff --git a/sysdeps/m68k/m680x0/fpu/s_tanl.c b/ports/sysdeps/m68k/m680x0/fpu/s_tanl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_tanl.c rename to ports/sysdeps/m68k/m680x0/fpu/s_tanl.c diff --git a/sysdeps/m68k/m680x0/fpu/s_trunc.c b/ports/sysdeps/m68k/m680x0/fpu/s_trunc.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_trunc.c rename to ports/sysdeps/m68k/m680x0/fpu/s_trunc.c diff --git a/sysdeps/m68k/m680x0/fpu/s_truncf.c b/ports/sysdeps/m68k/m680x0/fpu/s_truncf.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_truncf.c rename to ports/sysdeps/m68k/m680x0/fpu/s_truncf.c diff --git a/sysdeps/m68k/m680x0/fpu/s_truncl.c b/ports/sysdeps/m68k/m680x0/fpu/s_truncl.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/s_truncl.c rename to ports/sysdeps/m68k/m680x0/fpu/s_truncl.c diff --git a/sysdeps/m68k/m680x0/fpu/sincos32.c b/ports/sysdeps/m68k/m680x0/fpu/sincos32.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/sincos32.c rename to ports/sysdeps/m68k/m680x0/fpu/sincos32.c diff --git a/sysdeps/m68k/m680x0/fpu/sincostab.c b/ports/sysdeps/m68k/m680x0/fpu/sincostab.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/sincostab.c rename to ports/sysdeps/m68k/m680x0/fpu/sincostab.c diff --git a/sysdeps/m68k/m680x0/fpu/slowexp.c b/ports/sysdeps/m68k/m680x0/fpu/slowexp.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/slowexp.c rename to ports/sysdeps/m68k/m680x0/fpu/slowexp.c diff --git a/sysdeps/m68k/m680x0/fpu/slowpow.c b/ports/sysdeps/m68k/m680x0/fpu/slowpow.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/slowpow.c rename to ports/sysdeps/m68k/m680x0/fpu/slowpow.c diff --git a/sysdeps/m68k/m680x0/fpu/t_exp.c b/ports/sysdeps/m68k/m680x0/fpu/t_exp.c similarity index 100% rename from sysdeps/m68k/m680x0/fpu/t_exp.c rename to ports/sysdeps/m68k/m680x0/fpu/t_exp.c diff --git a/sysdeps/m68k/m680x0/lshift.S b/ports/sysdeps/m68k/m680x0/lshift.S similarity index 100% rename from sysdeps/m68k/m680x0/lshift.S rename to ports/sysdeps/m68k/m680x0/lshift.S diff --git a/sysdeps/m68k/m680x0/m68020/Makefile b/ports/sysdeps/m68k/m680x0/m68020/Makefile similarity index 100% rename from sysdeps/m68k/m680x0/m68020/Makefile rename to ports/sysdeps/m68k/m680x0/m68020/Makefile diff --git a/sysdeps/m68k/m680x0/m68020/addmul_1.S b/ports/sysdeps/m68k/m680x0/m68020/addmul_1.S similarity index 100% rename from sysdeps/m68k/m680x0/m68020/addmul_1.S rename to ports/sysdeps/m68k/m680x0/m68020/addmul_1.S diff --git a/sysdeps/m68k/m680x0/m68020/bits/atomic.h b/ports/sysdeps/m68k/m680x0/m68020/bits/atomic.h similarity index 100% rename from sysdeps/m68k/m680x0/m68020/bits/atomic.h rename to ports/sysdeps/m68k/m680x0/m68020/bits/atomic.h diff --git a/sysdeps/m68k/m680x0/m68020/bits/string.h b/ports/sysdeps/m68k/m680x0/m68020/bits/string.h similarity index 100% rename from sysdeps/m68k/m680x0/m68020/bits/string.h rename to ports/sysdeps/m68k/m680x0/m68020/bits/string.h diff --git a/sysdeps/m68k/m680x0/m68020/mul_1.S b/ports/sysdeps/m68k/m680x0/m68020/mul_1.S similarity index 100% rename from sysdeps/m68k/m680x0/m68020/mul_1.S rename to ports/sysdeps/m68k/m680x0/m68020/mul_1.S diff --git a/sysdeps/m68k/m680x0/m68020/submul_1.S b/ports/sysdeps/m68k/m680x0/m68020/submul_1.S similarity index 100% rename from sysdeps/m68k/m680x0/m68020/submul_1.S rename to ports/sysdeps/m68k/m680x0/m68020/submul_1.S diff --git a/sysdeps/m68k/m680x0/m68020/wordcopy.S b/ports/sysdeps/m68k/m680x0/m68020/wordcopy.S similarity index 100% rename from sysdeps/m68k/m680x0/m68020/wordcopy.S rename to ports/sysdeps/m68k/m680x0/m68020/wordcopy.S diff --git a/sysdeps/m68k/m680x0/printf_fphex.c b/ports/sysdeps/m68k/m680x0/printf_fphex.c similarity index 100% rename from sysdeps/m68k/m680x0/printf_fphex.c rename to ports/sysdeps/m68k/m680x0/printf_fphex.c diff --git a/sysdeps/m68k/m680x0/rshift.S b/ports/sysdeps/m68k/m680x0/rshift.S similarity index 100% rename from sysdeps/m68k/m680x0/rshift.S rename to ports/sysdeps/m68k/m680x0/rshift.S diff --git a/sysdeps/m68k/m680x0/strtold_l.c b/ports/sysdeps/m68k/m680x0/strtold_l.c similarity index 100% rename from sysdeps/m68k/m680x0/strtold_l.c rename to ports/sysdeps/m68k/m680x0/strtold_l.c diff --git a/sysdeps/m68k/m680x0/sub_n.S b/ports/sysdeps/m68k/m680x0/sub_n.S similarity index 100% rename from sysdeps/m68k/m680x0/sub_n.S rename to ports/sysdeps/m68k/m680x0/sub_n.S diff --git a/sysdeps/m68k/m680x0/sysdep.h b/ports/sysdeps/m68k/m680x0/sysdep.h similarity index 100% rename from sysdeps/m68k/m680x0/sysdep.h rename to ports/sysdeps/m68k/m680x0/sysdep.h diff --git a/sysdeps/m68k/memchr.S b/ports/sysdeps/m68k/memchr.S similarity index 100% rename from sysdeps/m68k/memchr.S rename to ports/sysdeps/m68k/memchr.S diff --git a/sysdeps/m68k/memcopy.h b/ports/sysdeps/m68k/memcopy.h similarity index 100% rename from sysdeps/m68k/memcopy.h rename to ports/sysdeps/m68k/memcopy.h diff --git a/sysdeps/m68k/memusage.h b/ports/sysdeps/m68k/memusage.h similarity index 100% rename from sysdeps/m68k/memusage.h rename to ports/sysdeps/m68k/memusage.h diff --git a/sysdeps/m68k/nptl/Makefile b/ports/sysdeps/m68k/nptl/Makefile similarity index 100% rename from sysdeps/m68k/nptl/Makefile rename to ports/sysdeps/m68k/nptl/Makefile diff --git a/sysdeps/m68k/nptl/pthread_spin_lock.c b/ports/sysdeps/m68k/nptl/pthread_spin_lock.c similarity index 100% rename from sysdeps/m68k/nptl/pthread_spin_lock.c rename to ports/sysdeps/m68k/nptl/pthread_spin_lock.c diff --git a/sysdeps/m68k/nptl/pthread_spin_trylock.c b/ports/sysdeps/m68k/nptl/pthread_spin_trylock.c similarity index 100% rename from sysdeps/m68k/nptl/pthread_spin_trylock.c rename to ports/sysdeps/m68k/nptl/pthread_spin_trylock.c diff --git a/sysdeps/m68k/nptl/pthreaddef.h b/ports/sysdeps/m68k/nptl/pthreaddef.h similarity index 100% rename from sysdeps/m68k/nptl/pthreaddef.h rename to ports/sysdeps/m68k/nptl/pthreaddef.h diff --git a/sysdeps/m68k/nptl/tcb-offsets.sym b/ports/sysdeps/m68k/nptl/tcb-offsets.sym similarity index 100% rename from sysdeps/m68k/nptl/tcb-offsets.sym rename to ports/sysdeps/m68k/nptl/tcb-offsets.sym diff --git a/sysdeps/m68k/nptl/tls.h b/ports/sysdeps/m68k/nptl/tls.h similarity index 100% rename from sysdeps/m68k/nptl/tls.h rename to ports/sysdeps/m68k/nptl/tls.h diff --git a/sysdeps/m68k/preconfigure b/ports/sysdeps/m68k/preconfigure similarity index 100% rename from sysdeps/m68k/preconfigure rename to ports/sysdeps/m68k/preconfigure diff --git a/sysdeps/m68k/rawmemchr.S b/ports/sysdeps/m68k/rawmemchr.S similarity index 100% rename from sysdeps/m68k/rawmemchr.S rename to ports/sysdeps/m68k/rawmemchr.S diff --git a/sysdeps/m68k/setjmp.c b/ports/sysdeps/m68k/setjmp.c similarity index 100% rename from sysdeps/m68k/setjmp.c rename to ports/sysdeps/m68k/setjmp.c diff --git a/sysdeps/m68k/shlib-versions b/ports/sysdeps/m68k/shlib-versions similarity index 100% rename from sysdeps/m68k/shlib-versions rename to ports/sysdeps/m68k/shlib-versions diff --git a/sysdeps/m68k/stackinfo.h b/ports/sysdeps/m68k/stackinfo.h similarity index 100% rename from sysdeps/m68k/stackinfo.h rename to ports/sysdeps/m68k/stackinfo.h diff --git a/sysdeps/m68k/start.S b/ports/sysdeps/m68k/start.S similarity index 100% rename from sysdeps/m68k/start.S rename to ports/sysdeps/m68k/start.S diff --git a/sysdeps/m68k/strchr.S b/ports/sysdeps/m68k/strchr.S similarity index 100% rename from sysdeps/m68k/strchr.S rename to ports/sysdeps/m68k/strchr.S diff --git a/sysdeps/m68k/strchrnul.S b/ports/sysdeps/m68k/strchrnul.S similarity index 100% rename from sysdeps/m68k/strchrnul.S rename to ports/sysdeps/m68k/strchrnul.S diff --git a/sysdeps/m68k/sys/ucontext.h b/ports/sysdeps/m68k/sys/ucontext.h similarity index 100% rename from sysdeps/m68k/sys/ucontext.h rename to ports/sysdeps/m68k/sys/ucontext.h diff --git a/sysdeps/m68k/sysdep.h b/ports/sysdeps/m68k/sysdep.h similarity index 100% rename from sysdeps/m68k/sysdep.h rename to ports/sysdeps/m68k/sysdep.h diff --git a/sysdeps/m68k/tls-macros.h b/ports/sysdeps/m68k/tls-macros.h similarity index 100% rename from sysdeps/m68k/tls-macros.h rename to ports/sysdeps/m68k/tls-macros.h diff --git a/sysdeps/m68k/tst-audit.h b/ports/sysdeps/m68k/tst-audit.h similarity index 100% rename from sysdeps/m68k/tst-audit.h rename to ports/sysdeps/m68k/tst-audit.h diff --git a/sysdeps/m68k/wcpcpy.c b/ports/sysdeps/m68k/wcpcpy.c similarity index 100% rename from sysdeps/m68k/wcpcpy.c rename to ports/sysdeps/m68k/wcpcpy.c diff --git a/sysdeps/m68k/wcpcpy_chk.c b/ports/sysdeps/m68k/wcpcpy_chk.c similarity index 100% rename from sysdeps/m68k/wcpcpy_chk.c rename to ports/sysdeps/m68k/wcpcpy_chk.c diff --git a/sysdeps/mips/Implies b/ports/sysdeps/mips/Implies similarity index 100% rename from sysdeps/mips/Implies rename to ports/sysdeps/mips/Implies diff --git a/sysdeps/mips/Makefile b/ports/sysdeps/mips/Makefile similarity index 100% rename from sysdeps/mips/Makefile rename to ports/sysdeps/mips/Makefile diff --git a/sysdeps/mips/__longjmp.c b/ports/sysdeps/mips/__longjmp.c similarity index 100% rename from sysdeps/mips/__longjmp.c rename to ports/sysdeps/mips/__longjmp.c diff --git a/sysdeps/mips/abort-instr.h b/ports/sysdeps/mips/abort-instr.h similarity index 100% rename from sysdeps/mips/abort-instr.h rename to ports/sysdeps/mips/abort-instr.h diff --git a/sysdeps/mips/add_n.S b/ports/sysdeps/mips/add_n.S similarity index 100% rename from sysdeps/mips/add_n.S rename to ports/sysdeps/mips/add_n.S diff --git a/sysdeps/mips/addmul_1.S b/ports/sysdeps/mips/addmul_1.S similarity index 100% rename from sysdeps/mips/addmul_1.S rename to ports/sysdeps/mips/addmul_1.S diff --git a/sysdeps/mips/backtrace.c b/ports/sysdeps/mips/backtrace.c similarity index 100% rename from sysdeps/mips/backtrace.c rename to ports/sysdeps/mips/backtrace.c diff --git a/sysdeps/mips/bits/atomic.h b/ports/sysdeps/mips/bits/atomic.h similarity index 100% rename from sysdeps/mips/bits/atomic.h rename to ports/sysdeps/mips/bits/atomic.h diff --git a/sysdeps/mips/bits/dlfcn.h b/ports/sysdeps/mips/bits/dlfcn.h similarity index 100% rename from sysdeps/mips/bits/dlfcn.h rename to ports/sysdeps/mips/bits/dlfcn.h diff --git a/sysdeps/mips/bits/endian.h b/ports/sysdeps/mips/bits/endian.h similarity index 100% rename from sysdeps/mips/bits/endian.h rename to ports/sysdeps/mips/bits/endian.h diff --git a/sysdeps/mips/bits/fenv.h b/ports/sysdeps/mips/bits/fenv.h similarity index 100% rename from sysdeps/mips/bits/fenv.h rename to ports/sysdeps/mips/bits/fenv.h diff --git a/sysdeps/mips/bits/ipctypes.h b/ports/sysdeps/mips/bits/ipctypes.h similarity index 100% rename from sysdeps/mips/bits/ipctypes.h rename to ports/sysdeps/mips/bits/ipctypes.h diff --git a/sysdeps/mips/bits/link.h b/ports/sysdeps/mips/bits/link.h similarity index 100% rename from sysdeps/mips/bits/link.h rename to ports/sysdeps/mips/bits/link.h diff --git a/sysdeps/mips/bits/linkmap.h b/ports/sysdeps/mips/bits/linkmap.h similarity index 100% rename from sysdeps/mips/bits/linkmap.h rename to ports/sysdeps/mips/bits/linkmap.h diff --git a/sysdeps/mips/bits/mathdef.h b/ports/sysdeps/mips/bits/mathdef.h similarity index 100% rename from sysdeps/mips/bits/mathdef.h rename to ports/sysdeps/mips/bits/mathdef.h diff --git a/sysdeps/mips/bits/nan.h b/ports/sysdeps/mips/bits/nan.h similarity index 100% rename from sysdeps/mips/bits/nan.h rename to ports/sysdeps/mips/bits/nan.h diff --git a/sysdeps/mips/bits/setjmp.h b/ports/sysdeps/mips/bits/setjmp.h similarity index 100% rename from sysdeps/mips/bits/setjmp.h rename to ports/sysdeps/mips/bits/setjmp.h diff --git a/sysdeps/mips/bits/wordsize.h b/ports/sysdeps/mips/bits/wordsize.h similarity index 100% rename from sysdeps/mips/bits/wordsize.h rename to ports/sysdeps/mips/bits/wordsize.h diff --git a/sysdeps/mips/bsd-_setjmp.S b/ports/sysdeps/mips/bsd-_setjmp.S similarity index 100% rename from sysdeps/mips/bsd-_setjmp.S rename to ports/sysdeps/mips/bsd-_setjmp.S diff --git a/sysdeps/mips/bsd-setjmp.S b/ports/sysdeps/mips/bsd-setjmp.S similarity index 100% rename from sysdeps/mips/bsd-setjmp.S rename to ports/sysdeps/mips/bsd-setjmp.S diff --git a/sysdeps/mips/configure b/ports/sysdeps/mips/configure similarity index 100% rename from sysdeps/mips/configure rename to ports/sysdeps/mips/configure diff --git a/sysdeps/mips/configure.in b/ports/sysdeps/mips/configure.in similarity index 100% rename from sysdeps/mips/configure.in rename to ports/sysdeps/mips/configure.in diff --git a/sysdeps/mips/dl-dtprocnum.h b/ports/sysdeps/mips/dl-dtprocnum.h similarity index 100% rename from sysdeps/mips/dl-dtprocnum.h rename to ports/sysdeps/mips/dl-dtprocnum.h diff --git a/sysdeps/mips/dl-lookup.c b/ports/sysdeps/mips/dl-lookup.c similarity index 100% rename from sysdeps/mips/dl-lookup.c rename to ports/sysdeps/mips/dl-lookup.c diff --git a/sysdeps/mips/dl-machine.h b/ports/sysdeps/mips/dl-machine.h similarity index 100% rename from sysdeps/mips/dl-machine.h rename to ports/sysdeps/mips/dl-machine.h diff --git a/sysdeps/mips/dl-procinfo.c b/ports/sysdeps/mips/dl-procinfo.c similarity index 100% rename from sysdeps/mips/dl-procinfo.c rename to ports/sysdeps/mips/dl-procinfo.c diff --git a/sysdeps/mips/dl-procinfo.h b/ports/sysdeps/mips/dl-procinfo.h similarity index 100% rename from sysdeps/mips/dl-procinfo.h rename to ports/sysdeps/mips/dl-procinfo.h diff --git a/sysdeps/mips/dl-tls.h b/ports/sysdeps/mips/dl-tls.h similarity index 100% rename from sysdeps/mips/dl-tls.h rename to ports/sysdeps/mips/dl-tls.h diff --git a/sysdeps/mips/dl-trampoline.c b/ports/sysdeps/mips/dl-trampoline.c similarity index 100% rename from sysdeps/mips/dl-trampoline.c rename to ports/sysdeps/mips/dl-trampoline.c diff --git a/sysdeps/mips/fpregdef.h b/ports/sysdeps/mips/fpregdef.h similarity index 100% rename from sysdeps/mips/fpregdef.h rename to ports/sysdeps/mips/fpregdef.h diff --git a/sysdeps/mips/fpu/e_sqrt.c b/ports/sysdeps/mips/fpu/e_sqrt.c similarity index 100% rename from sysdeps/mips/fpu/e_sqrt.c rename to ports/sysdeps/mips/fpu/e_sqrt.c diff --git a/sysdeps/mips/fpu/e_sqrtf.c b/ports/sysdeps/mips/fpu/e_sqrtf.c similarity index 100% rename from sysdeps/mips/fpu/e_sqrtf.c rename to ports/sysdeps/mips/fpu/e_sqrtf.c diff --git a/sysdeps/mips/fpu/fclrexcpt.c b/ports/sysdeps/mips/fpu/fclrexcpt.c similarity index 100% rename from sysdeps/mips/fpu/fclrexcpt.c rename to ports/sysdeps/mips/fpu/fclrexcpt.c diff --git a/sysdeps/mips/fpu/fedisblxcpt.c b/ports/sysdeps/mips/fpu/fedisblxcpt.c similarity index 100% rename from sysdeps/mips/fpu/fedisblxcpt.c rename to ports/sysdeps/mips/fpu/fedisblxcpt.c diff --git a/sysdeps/mips/fpu/feenablxcpt.c b/ports/sysdeps/mips/fpu/feenablxcpt.c similarity index 100% rename from sysdeps/mips/fpu/feenablxcpt.c rename to ports/sysdeps/mips/fpu/feenablxcpt.c diff --git a/sysdeps/mips/fpu/fegetenv.c b/ports/sysdeps/mips/fpu/fegetenv.c similarity index 100% rename from sysdeps/mips/fpu/fegetenv.c rename to ports/sysdeps/mips/fpu/fegetenv.c diff --git a/sysdeps/mips/fpu/fegetexcept.c b/ports/sysdeps/mips/fpu/fegetexcept.c similarity index 100% rename from sysdeps/mips/fpu/fegetexcept.c rename to ports/sysdeps/mips/fpu/fegetexcept.c diff --git a/sysdeps/mips/fpu/fegetround.c b/ports/sysdeps/mips/fpu/fegetround.c similarity index 100% rename from sysdeps/mips/fpu/fegetround.c rename to ports/sysdeps/mips/fpu/fegetround.c diff --git a/sysdeps/mips/fpu/feholdexcpt.c b/ports/sysdeps/mips/fpu/feholdexcpt.c similarity index 100% rename from sysdeps/mips/fpu/feholdexcpt.c rename to ports/sysdeps/mips/fpu/feholdexcpt.c diff --git a/sysdeps/mips/fpu/fenv_libc.h b/ports/sysdeps/mips/fpu/fenv_libc.h similarity index 100% rename from sysdeps/mips/fpu/fenv_libc.h rename to ports/sysdeps/mips/fpu/fenv_libc.h diff --git a/sysdeps/mips/fpu/fesetenv.c b/ports/sysdeps/mips/fpu/fesetenv.c similarity index 100% rename from sysdeps/mips/fpu/fesetenv.c rename to ports/sysdeps/mips/fpu/fesetenv.c diff --git a/sysdeps/mips/fpu/fesetround.c b/ports/sysdeps/mips/fpu/fesetround.c similarity index 100% rename from sysdeps/mips/fpu/fesetround.c rename to ports/sysdeps/mips/fpu/fesetround.c diff --git a/sysdeps/mips/fpu/feupdateenv.c b/ports/sysdeps/mips/fpu/feupdateenv.c similarity index 100% rename from sysdeps/mips/fpu/feupdateenv.c rename to ports/sysdeps/mips/fpu/feupdateenv.c diff --git a/sysdeps/mips/fpu/fgetexcptflg.c b/ports/sysdeps/mips/fpu/fgetexcptflg.c similarity index 100% rename from sysdeps/mips/fpu/fgetexcptflg.c rename to ports/sysdeps/mips/fpu/fgetexcptflg.c diff --git a/sysdeps/mips/fpu/fraiseexcpt.c b/ports/sysdeps/mips/fpu/fraiseexcpt.c similarity index 100% rename from sysdeps/mips/fpu/fraiseexcpt.c rename to ports/sysdeps/mips/fpu/fraiseexcpt.c diff --git a/sysdeps/mips/fpu/fsetexcptflg.c b/ports/sysdeps/mips/fpu/fsetexcptflg.c similarity index 100% rename from sysdeps/mips/fpu/fsetexcptflg.c rename to ports/sysdeps/mips/fpu/fsetexcptflg.c diff --git a/sysdeps/mips/fpu/ftestexcept.c b/ports/sysdeps/mips/fpu/ftestexcept.c similarity index 100% rename from sysdeps/mips/fpu/ftestexcept.c rename to ports/sysdeps/mips/fpu/ftestexcept.c diff --git a/sysdeps/mips/fpu_control.h b/ports/sysdeps/mips/fpu_control.h similarity index 100% rename from sysdeps/mips/fpu_control.h rename to ports/sysdeps/mips/fpu_control.h diff --git a/sysdeps/mips/gccframe.h b/ports/sysdeps/mips/gccframe.h similarity index 100% rename from sysdeps/mips/gccframe.h rename to ports/sysdeps/mips/gccframe.h diff --git a/sysdeps/mips/ieee754.h b/ports/sysdeps/mips/ieee754.h similarity index 100% rename from sysdeps/mips/ieee754.h rename to ports/sysdeps/mips/ieee754.h diff --git a/sysdeps/mips/init-first.c b/ports/sysdeps/mips/init-first.c similarity index 100% rename from sysdeps/mips/init-first.c rename to ports/sysdeps/mips/init-first.c diff --git a/sysdeps/mips/jmpbuf-unwind.h b/ports/sysdeps/mips/jmpbuf-unwind.h similarity index 100% rename from sysdeps/mips/jmpbuf-unwind.h rename to ports/sysdeps/mips/jmpbuf-unwind.h diff --git a/sysdeps/mips/ldsodefs.h b/ports/sysdeps/mips/ldsodefs.h similarity index 100% rename from sysdeps/mips/ldsodefs.h rename to ports/sysdeps/mips/ldsodefs.h diff --git a/sysdeps/mips/libc-tls.c b/ports/sysdeps/mips/libc-tls.c similarity index 100% rename from sysdeps/mips/libc-tls.c rename to ports/sysdeps/mips/libc-tls.c diff --git a/sysdeps/mips/lshift.S b/ports/sysdeps/mips/lshift.S similarity index 100% rename from sysdeps/mips/lshift.S rename to ports/sysdeps/mips/lshift.S diff --git a/sysdeps/mips/machine-gmon.h b/ports/sysdeps/mips/machine-gmon.h similarity index 100% rename from sysdeps/mips/machine-gmon.h rename to ports/sysdeps/mips/machine-gmon.h diff --git a/sysdeps/mips/memcpy.S b/ports/sysdeps/mips/memcpy.S similarity index 100% rename from sysdeps/mips/memcpy.S rename to ports/sysdeps/mips/memcpy.S diff --git a/sysdeps/mips/memset.S b/ports/sysdeps/mips/memset.S similarity index 100% rename from sysdeps/mips/memset.S rename to ports/sysdeps/mips/memset.S diff --git a/sysdeps/mips/memusage.h b/ports/sysdeps/mips/memusage.h similarity index 100% rename from sysdeps/mips/memusage.h rename to ports/sysdeps/mips/memusage.h diff --git a/sysdeps/mips/mips32/Implies b/ports/sysdeps/mips/mips32/Implies similarity index 100% rename from sysdeps/mips/mips32/Implies rename to ports/sysdeps/mips/mips32/Implies diff --git a/sysdeps/mips/mips32/Makefile b/ports/sysdeps/mips/mips32/Makefile similarity index 100% rename from sysdeps/mips/mips32/Makefile rename to ports/sysdeps/mips/mips32/Makefile diff --git a/sysdeps/mips/mips32/crti.S b/ports/sysdeps/mips/mips32/crti.S similarity index 100% rename from sysdeps/mips/mips32/crti.S rename to ports/sysdeps/mips/mips32/crti.S diff --git a/sysdeps/mips/mips32/crtn.S b/ports/sysdeps/mips/mips32/crtn.S similarity index 100% rename from sysdeps/mips/mips32/crtn.S rename to ports/sysdeps/mips/mips32/crtn.S diff --git a/sysdeps/mips/mips32/libm-test-ulps b/ports/sysdeps/mips/mips32/libm-test-ulps similarity index 100% rename from sysdeps/mips/mips32/libm-test-ulps rename to ports/sysdeps/mips/mips32/libm-test-ulps diff --git a/sysdeps/mips/mips64/Implies b/ports/sysdeps/mips/mips64/Implies similarity index 100% rename from sysdeps/mips/mips64/Implies rename to ports/sysdeps/mips/mips64/Implies diff --git a/sysdeps/mips/mips64/Versions b/ports/sysdeps/mips/mips64/Versions similarity index 100% rename from sysdeps/mips/mips64/Versions rename to ports/sysdeps/mips/mips64/Versions diff --git a/sysdeps/mips/mips64/__longjmp.c b/ports/sysdeps/mips/mips64/__longjmp.c similarity index 100% rename from sysdeps/mips/mips64/__longjmp.c rename to ports/sysdeps/mips/mips64/__longjmp.c diff --git a/sysdeps/mips/mips64/add_n.S b/ports/sysdeps/mips/mips64/add_n.S similarity index 100% rename from sysdeps/mips/mips64/add_n.S rename to ports/sysdeps/mips/mips64/add_n.S diff --git a/sysdeps/mips/mips64/addmul_1.S b/ports/sysdeps/mips/mips64/addmul_1.S similarity index 100% rename from sysdeps/mips/mips64/addmul_1.S rename to ports/sysdeps/mips/mips64/addmul_1.S diff --git a/sysdeps/mips/mips64/bsd-_setjmp.S b/ports/sysdeps/mips/mips64/bsd-_setjmp.S similarity index 100% rename from sysdeps/mips/mips64/bsd-_setjmp.S rename to ports/sysdeps/mips/mips64/bsd-_setjmp.S diff --git a/sysdeps/mips/mips64/bsd-setjmp.S b/ports/sysdeps/mips/mips64/bsd-setjmp.S similarity index 100% rename from sysdeps/mips/mips64/bsd-setjmp.S rename to ports/sysdeps/mips/mips64/bsd-setjmp.S diff --git a/sysdeps/mips/mips64/gmp-mparam.h b/ports/sysdeps/mips/mips64/gmp-mparam.h similarity index 100% rename from sysdeps/mips/mips64/gmp-mparam.h rename to ports/sysdeps/mips/mips64/gmp-mparam.h diff --git a/sysdeps/mips/mips64/libm-test-ulps b/ports/sysdeps/mips/mips64/libm-test-ulps similarity index 100% rename from sysdeps/mips/mips64/libm-test-ulps rename to ports/sysdeps/mips/mips64/libm-test-ulps diff --git a/sysdeps/mips/mips64/lshift.S b/ports/sysdeps/mips/mips64/lshift.S similarity index 100% rename from sysdeps/mips/mips64/lshift.S rename to ports/sysdeps/mips/mips64/lshift.S diff --git a/sysdeps/mips/mips64/memcpy.S b/ports/sysdeps/mips/mips64/memcpy.S similarity index 100% rename from sysdeps/mips/mips64/memcpy.S rename to ports/sysdeps/mips/mips64/memcpy.S diff --git a/sysdeps/mips/mips64/memset.S b/ports/sysdeps/mips/mips64/memset.S similarity index 100% rename from sysdeps/mips/mips64/memset.S rename to ports/sysdeps/mips/mips64/memset.S diff --git a/sysdeps/mips/mips64/mul_1.S b/ports/sysdeps/mips/mips64/mul_1.S similarity index 100% rename from sysdeps/mips/mips64/mul_1.S rename to ports/sysdeps/mips/mips64/mul_1.S diff --git a/sysdeps/mips/mips64/n32/Implies b/ports/sysdeps/mips/mips64/n32/Implies similarity index 100% rename from sysdeps/mips/mips64/n32/Implies rename to ports/sysdeps/mips/mips64/n32/Implies diff --git a/sysdeps/mips/mips64/n32/Makefile b/ports/sysdeps/mips/mips64/n32/Makefile similarity index 100% rename from sysdeps/mips/mips64/n32/Makefile rename to ports/sysdeps/mips/mips64/n32/Makefile diff --git a/sysdeps/mips/mips64/n32/crti.S b/ports/sysdeps/mips/mips64/n32/crti.S similarity index 100% rename from sysdeps/mips/mips64/n32/crti.S rename to ports/sysdeps/mips/mips64/n32/crti.S diff --git a/sysdeps/mips/mips64/n32/crtn.S b/ports/sysdeps/mips/mips64/n32/crtn.S similarity index 100% rename from sysdeps/mips/mips64/n32/crtn.S rename to ports/sysdeps/mips/mips64/n32/crtn.S diff --git a/sysdeps/mips/mips64/n32/s_fma.c b/ports/sysdeps/mips/mips64/n32/s_fma.c similarity index 100% rename from sysdeps/mips/mips64/n32/s_fma.c rename to ports/sysdeps/mips/mips64/n32/s_fma.c diff --git a/sysdeps/mips/mips64/n64/Implies b/ports/sysdeps/mips/mips64/n64/Implies similarity index 100% rename from sysdeps/mips/mips64/n64/Implies rename to ports/sysdeps/mips/mips64/n64/Implies diff --git a/sysdeps/mips/mips64/n64/Makefile b/ports/sysdeps/mips/mips64/n64/Makefile similarity index 100% rename from sysdeps/mips/mips64/n64/Makefile rename to ports/sysdeps/mips/mips64/n64/Makefile diff --git a/sysdeps/mips/mips64/n64/crti.S b/ports/sysdeps/mips/mips64/n64/crti.S similarity index 100% rename from sysdeps/mips/mips64/n64/crti.S rename to ports/sysdeps/mips/mips64/n64/crti.S diff --git a/sysdeps/mips/mips64/n64/crtn.S b/ports/sysdeps/mips/mips64/n64/crtn.S similarity index 100% rename from sysdeps/mips/mips64/n64/crtn.S rename to ports/sysdeps/mips/mips64/n64/crtn.S diff --git a/sysdeps/mips/mips64/n64/s_fma.c b/ports/sysdeps/mips/mips64/n64/s_fma.c similarity index 100% rename from sysdeps/mips/mips64/n64/s_fma.c rename to ports/sysdeps/mips/mips64/n64/s_fma.c diff --git a/sysdeps/mips/mips64/rshift.S b/ports/sysdeps/mips/mips64/rshift.S similarity index 100% rename from sysdeps/mips/mips64/rshift.S rename to ports/sysdeps/mips/mips64/rshift.S diff --git a/sysdeps/mips/mips64/setjmp.S b/ports/sysdeps/mips/mips64/setjmp.S similarity index 100% rename from sysdeps/mips/mips64/setjmp.S rename to ports/sysdeps/mips/mips64/setjmp.S diff --git a/sysdeps/mips/mips64/setjmp_aux.c b/ports/sysdeps/mips/mips64/setjmp_aux.c similarity index 100% rename from sysdeps/mips/mips64/setjmp_aux.c rename to ports/sysdeps/mips/mips64/setjmp_aux.c diff --git a/sysdeps/mips/mips64/soft-fp/Makefile b/ports/sysdeps/mips/mips64/soft-fp/Makefile similarity index 100% rename from sysdeps/mips/mips64/soft-fp/Makefile rename to ports/sysdeps/mips/mips64/soft-fp/Makefile diff --git a/sysdeps/mips/mips64/soft-fp/e_sqrtl.c b/ports/sysdeps/mips/mips64/soft-fp/e_sqrtl.c similarity index 100% rename from sysdeps/mips/mips64/soft-fp/e_sqrtl.c rename to ports/sysdeps/mips/mips64/soft-fp/e_sqrtl.c diff --git a/sysdeps/mips/mips64/soft-fp/sfp-machine.h b/ports/sysdeps/mips/mips64/soft-fp/sfp-machine.h similarity index 100% rename from sysdeps/mips/mips64/soft-fp/sfp-machine.h rename to ports/sysdeps/mips/mips64/soft-fp/sfp-machine.h diff --git a/sysdeps/mips/mips64/sub_n.S b/ports/sysdeps/mips/mips64/sub_n.S similarity index 100% rename from sysdeps/mips/mips64/sub_n.S rename to ports/sysdeps/mips/mips64/sub_n.S diff --git a/sysdeps/mips/mips64/submul_1.S b/ports/sysdeps/mips/mips64/submul_1.S similarity index 100% rename from sysdeps/mips/mips64/submul_1.S rename to ports/sysdeps/mips/mips64/submul_1.S diff --git a/sysdeps/mips/mul_1.S b/ports/sysdeps/mips/mul_1.S similarity index 100% rename from sysdeps/mips/mul_1.S rename to ports/sysdeps/mips/mul_1.S diff --git a/sysdeps/mips/nptl/Makefile b/ports/sysdeps/mips/nptl/Makefile similarity index 100% rename from sysdeps/mips/nptl/Makefile rename to ports/sysdeps/mips/nptl/Makefile diff --git a/sysdeps/mips/nptl/nptl-sysdep.S b/ports/sysdeps/mips/nptl/nptl-sysdep.S similarity index 100% rename from sysdeps/mips/nptl/nptl-sysdep.S rename to ports/sysdeps/mips/nptl/nptl-sysdep.S diff --git a/sysdeps/mips/nptl/pthread_spin_lock.S b/ports/sysdeps/mips/nptl/pthread_spin_lock.S similarity index 100% rename from sysdeps/mips/nptl/pthread_spin_lock.S rename to ports/sysdeps/mips/nptl/pthread_spin_lock.S diff --git a/sysdeps/mips/nptl/pthread_spin_trylock.S b/ports/sysdeps/mips/nptl/pthread_spin_trylock.S similarity index 100% rename from sysdeps/mips/nptl/pthread_spin_trylock.S rename to ports/sysdeps/mips/nptl/pthread_spin_trylock.S diff --git a/sysdeps/mips/nptl/pthreaddef.h b/ports/sysdeps/mips/nptl/pthreaddef.h similarity index 100% rename from sysdeps/mips/nptl/pthreaddef.h rename to ports/sysdeps/mips/nptl/pthreaddef.h diff --git a/sysdeps/mips/nptl/shlib-versions b/ports/sysdeps/mips/nptl/shlib-versions similarity index 100% rename from sysdeps/mips/nptl/shlib-versions rename to ports/sysdeps/mips/nptl/shlib-versions diff --git a/sysdeps/mips/nptl/tcb-offsets.sym b/ports/sysdeps/mips/nptl/tcb-offsets.sym similarity index 100% rename from sysdeps/mips/nptl/tcb-offsets.sym rename to ports/sysdeps/mips/nptl/tcb-offsets.sym diff --git a/sysdeps/mips/nptl/tls.h b/ports/sysdeps/mips/nptl/tls.h similarity index 100% rename from sysdeps/mips/nptl/tls.h rename to ports/sysdeps/mips/nptl/tls.h diff --git a/sysdeps/mips/preconfigure b/ports/sysdeps/mips/preconfigure similarity index 100% rename from sysdeps/mips/preconfigure rename to ports/sysdeps/mips/preconfigure diff --git a/sysdeps/mips/regdef.h b/ports/sysdeps/mips/regdef.h similarity index 100% rename from sysdeps/mips/regdef.h rename to ports/sysdeps/mips/regdef.h diff --git a/sysdeps/mips/rshift.S b/ports/sysdeps/mips/rshift.S similarity index 100% rename from sysdeps/mips/rshift.S rename to ports/sysdeps/mips/rshift.S diff --git a/sysdeps/mips/setjmp.S b/ports/sysdeps/mips/setjmp.S similarity index 100% rename from sysdeps/mips/setjmp.S rename to ports/sysdeps/mips/setjmp.S diff --git a/sysdeps/mips/setjmp_aux.c b/ports/sysdeps/mips/setjmp_aux.c similarity index 100% rename from sysdeps/mips/setjmp_aux.c rename to ports/sysdeps/mips/setjmp_aux.c diff --git a/sysdeps/mips/sgidefs.h b/ports/sysdeps/mips/sgidefs.h similarity index 100% rename from sysdeps/mips/sgidefs.h rename to ports/sysdeps/mips/sgidefs.h diff --git a/sysdeps/mips/shlib-versions b/ports/sysdeps/mips/shlib-versions similarity index 100% rename from sysdeps/mips/shlib-versions rename to ports/sysdeps/mips/shlib-versions diff --git a/sysdeps/mips/soft-fp/sfp-machine.h b/ports/sysdeps/mips/soft-fp/sfp-machine.h similarity index 100% rename from sysdeps/mips/soft-fp/sfp-machine.h rename to ports/sysdeps/mips/soft-fp/sfp-machine.h diff --git a/sysdeps/mips/stackinfo.h b/ports/sysdeps/mips/stackinfo.h similarity index 100% rename from sysdeps/mips/stackinfo.h rename to ports/sysdeps/mips/stackinfo.h diff --git a/sysdeps/mips/start.S b/ports/sysdeps/mips/start.S similarity index 100% rename from sysdeps/mips/start.S rename to ports/sysdeps/mips/start.S diff --git a/sysdeps/mips/sub_n.S b/ports/sysdeps/mips/sub_n.S similarity index 100% rename from sysdeps/mips/sub_n.S rename to ports/sysdeps/mips/sub_n.S diff --git a/sysdeps/mips/submul_1.S b/ports/sysdeps/mips/submul_1.S similarity index 100% rename from sysdeps/mips/submul_1.S rename to ports/sysdeps/mips/submul_1.S diff --git a/sysdeps/mips/sys/asm.h b/ports/sysdeps/mips/sys/asm.h similarity index 100% rename from sysdeps/mips/sys/asm.h rename to ports/sysdeps/mips/sys/asm.h diff --git a/sysdeps/mips/sys/fpregdef.h b/ports/sysdeps/mips/sys/fpregdef.h similarity index 100% rename from sysdeps/mips/sys/fpregdef.h rename to ports/sysdeps/mips/sys/fpregdef.h diff --git a/sysdeps/mips/sys/regdef.h b/ports/sysdeps/mips/sys/regdef.h similarity index 100% rename from sysdeps/mips/sys/regdef.h rename to ports/sysdeps/mips/sys/regdef.h diff --git a/sysdeps/mips/sys/tas.h b/ports/sysdeps/mips/sys/tas.h similarity index 100% rename from sysdeps/mips/sys/tas.h rename to ports/sysdeps/mips/sys/tas.h diff --git a/sysdeps/mips/sys/ucontext.h b/ports/sysdeps/mips/sys/ucontext.h similarity index 100% rename from sysdeps/mips/sys/ucontext.h rename to ports/sysdeps/mips/sys/ucontext.h diff --git a/sysdeps/mips/tls-macros.h b/ports/sysdeps/mips/tls-macros.h similarity index 100% rename from sysdeps/mips/tls-macros.h rename to ports/sysdeps/mips/tls-macros.h diff --git a/sysdeps/mips/tst-audit.h b/ports/sysdeps/mips/tst-audit.h similarity index 100% rename from sysdeps/mips/tst-audit.h rename to ports/sysdeps/mips/tst-audit.h diff --git a/sysdeps/powerpc/dl-procinfo.c b/ports/sysdeps/powerpc/dl-procinfo.c similarity index 100% rename from sysdeps/powerpc/dl-procinfo.c rename to ports/sysdeps/powerpc/dl-procinfo.c diff --git a/sysdeps/powerpc/dl-procinfo.h b/ports/sysdeps/powerpc/dl-procinfo.h similarity index 100% rename from sysdeps/powerpc/dl-procinfo.h rename to ports/sysdeps/powerpc/dl-procinfo.h diff --git a/sysdeps/powerpc/nofpu/Makefile b/ports/sysdeps/powerpc/nofpu/Makefile similarity index 100% rename from sysdeps/powerpc/nofpu/Makefile rename to ports/sysdeps/powerpc/nofpu/Makefile diff --git a/sysdeps/powerpc/nofpu/Subdirs b/ports/sysdeps/powerpc/nofpu/Subdirs similarity index 100% rename from sysdeps/powerpc/nofpu/Subdirs rename to ports/sysdeps/powerpc/nofpu/Subdirs diff --git a/sysdeps/powerpc/nofpu/Versions b/ports/sysdeps/powerpc/nofpu/Versions similarity index 100% rename from sysdeps/powerpc/nofpu/Versions rename to ports/sysdeps/powerpc/nofpu/Versions diff --git a/sysdeps/powerpc/nofpu/fclrexcpt.c b/ports/sysdeps/powerpc/nofpu/fclrexcpt.c similarity index 100% rename from sysdeps/powerpc/nofpu/fclrexcpt.c rename to ports/sysdeps/powerpc/nofpu/fclrexcpt.c diff --git a/sysdeps/powerpc/nofpu/fedisblxcpt.c b/ports/sysdeps/powerpc/nofpu/fedisblxcpt.c similarity index 100% rename from sysdeps/powerpc/nofpu/fedisblxcpt.c rename to ports/sysdeps/powerpc/nofpu/fedisblxcpt.c diff --git a/sysdeps/powerpc/nofpu/feenablxcpt.c b/ports/sysdeps/powerpc/nofpu/feenablxcpt.c similarity index 100% rename from sysdeps/powerpc/nofpu/feenablxcpt.c rename to ports/sysdeps/powerpc/nofpu/feenablxcpt.c diff --git a/sysdeps/powerpc/nofpu/fegetenv.c b/ports/sysdeps/powerpc/nofpu/fegetenv.c similarity index 100% rename from sysdeps/powerpc/nofpu/fegetenv.c rename to ports/sysdeps/powerpc/nofpu/fegetenv.c diff --git a/sysdeps/powerpc/nofpu/fegetexcept.c b/ports/sysdeps/powerpc/nofpu/fegetexcept.c similarity index 100% rename from sysdeps/powerpc/nofpu/fegetexcept.c rename to ports/sysdeps/powerpc/nofpu/fegetexcept.c diff --git a/sysdeps/powerpc/nofpu/fegetround.c b/ports/sysdeps/powerpc/nofpu/fegetround.c similarity index 100% rename from sysdeps/powerpc/nofpu/fegetround.c rename to ports/sysdeps/powerpc/nofpu/fegetround.c diff --git a/sysdeps/powerpc/nofpu/feholdexcpt.c b/ports/sysdeps/powerpc/nofpu/feholdexcpt.c similarity index 100% rename from sysdeps/powerpc/nofpu/feholdexcpt.c rename to ports/sysdeps/powerpc/nofpu/feholdexcpt.c diff --git a/sysdeps/powerpc/nofpu/fenv_const.c b/ports/sysdeps/powerpc/nofpu/fenv_const.c similarity index 100% rename from sysdeps/powerpc/nofpu/fenv_const.c rename to ports/sysdeps/powerpc/nofpu/fenv_const.c diff --git a/sysdeps/powerpc/nofpu/fenv_libc.h b/ports/sysdeps/powerpc/nofpu/fenv_libc.h similarity index 100% rename from sysdeps/powerpc/nofpu/fenv_libc.h rename to ports/sysdeps/powerpc/nofpu/fenv_libc.h diff --git a/sysdeps/powerpc/nofpu/fesetenv.c b/ports/sysdeps/powerpc/nofpu/fesetenv.c similarity index 100% rename from sysdeps/powerpc/nofpu/fesetenv.c rename to ports/sysdeps/powerpc/nofpu/fesetenv.c diff --git a/sysdeps/powerpc/nofpu/fesetround.c b/ports/sysdeps/powerpc/nofpu/fesetround.c similarity index 100% rename from sysdeps/powerpc/nofpu/fesetround.c rename to ports/sysdeps/powerpc/nofpu/fesetround.c diff --git a/sysdeps/powerpc/nofpu/feupdateenv.c b/ports/sysdeps/powerpc/nofpu/feupdateenv.c similarity index 100% rename from sysdeps/powerpc/nofpu/feupdateenv.c rename to ports/sysdeps/powerpc/nofpu/feupdateenv.c diff --git a/sysdeps/powerpc/nofpu/fgetexcptflg.c b/ports/sysdeps/powerpc/nofpu/fgetexcptflg.c similarity index 100% rename from sysdeps/powerpc/nofpu/fgetexcptflg.c rename to ports/sysdeps/powerpc/nofpu/fgetexcptflg.c diff --git a/sysdeps/powerpc/nofpu/fraiseexcpt.c b/ports/sysdeps/powerpc/nofpu/fraiseexcpt.c similarity index 100% rename from sysdeps/powerpc/nofpu/fraiseexcpt.c rename to ports/sysdeps/powerpc/nofpu/fraiseexcpt.c diff --git a/sysdeps/powerpc/nofpu/fsetexcptflg.c b/ports/sysdeps/powerpc/nofpu/fsetexcptflg.c similarity index 100% rename from sysdeps/powerpc/nofpu/fsetexcptflg.c rename to ports/sysdeps/powerpc/nofpu/fsetexcptflg.c diff --git a/sysdeps/powerpc/nofpu/ftestexcept.c b/ports/sysdeps/powerpc/nofpu/ftestexcept.c similarity index 100% rename from sysdeps/powerpc/nofpu/ftestexcept.c rename to ports/sysdeps/powerpc/nofpu/ftestexcept.c diff --git a/sysdeps/powerpc/nofpu/libm-test-ulps b/ports/sysdeps/powerpc/nofpu/libm-test-ulps similarity index 100% rename from sysdeps/powerpc/nofpu/libm-test-ulps rename to ports/sysdeps/powerpc/nofpu/libm-test-ulps diff --git a/sysdeps/powerpc/nofpu/shlib-versions b/ports/sysdeps/powerpc/nofpu/shlib-versions similarity index 100% rename from sysdeps/powerpc/nofpu/shlib-versions rename to ports/sysdeps/powerpc/nofpu/shlib-versions diff --git a/sysdeps/powerpc/nofpu/sim-full.c b/ports/sysdeps/powerpc/nofpu/sim-full.c similarity index 100% rename from sysdeps/powerpc/nofpu/sim-full.c rename to ports/sysdeps/powerpc/nofpu/sim-full.c diff --git a/sysdeps/powerpc/nofpu/soft-supp.h b/ports/sysdeps/powerpc/nofpu/soft-supp.h similarity index 100% rename from sysdeps/powerpc/nofpu/soft-supp.h rename to ports/sysdeps/powerpc/nofpu/soft-supp.h diff --git a/sysdeps/powerpc/powerpc32/405/memcmp.S b/ports/sysdeps/powerpc/powerpc32/405/memcmp.S similarity index 100% rename from sysdeps/powerpc/powerpc32/405/memcmp.S rename to ports/sysdeps/powerpc/powerpc32/405/memcmp.S diff --git a/sysdeps/powerpc/powerpc32/405/memcpy.S b/ports/sysdeps/powerpc/powerpc32/405/memcpy.S similarity index 100% rename from sysdeps/powerpc/powerpc32/405/memcpy.S rename to ports/sysdeps/powerpc/powerpc32/405/memcpy.S diff --git a/sysdeps/powerpc/powerpc32/405/memset.S b/ports/sysdeps/powerpc/powerpc32/405/memset.S similarity index 100% rename from sysdeps/powerpc/powerpc32/405/memset.S rename to ports/sysdeps/powerpc/powerpc32/405/memset.S diff --git a/sysdeps/powerpc/powerpc32/405/strcmp.S b/ports/sysdeps/powerpc/powerpc32/405/strcmp.S similarity index 100% rename from sysdeps/powerpc/powerpc32/405/strcmp.S rename to ports/sysdeps/powerpc/powerpc32/405/strcmp.S diff --git a/sysdeps/powerpc/powerpc32/405/strcpy.S b/ports/sysdeps/powerpc/powerpc32/405/strcpy.S similarity index 100% rename from sysdeps/powerpc/powerpc32/405/strcpy.S rename to ports/sysdeps/powerpc/powerpc32/405/strcpy.S diff --git a/sysdeps/powerpc/powerpc32/405/strlen.S b/ports/sysdeps/powerpc/powerpc32/405/strlen.S similarity index 100% rename from sysdeps/powerpc/powerpc32/405/strlen.S rename to ports/sysdeps/powerpc/powerpc32/405/strlen.S diff --git a/sysdeps/powerpc/powerpc32/405/strncmp.S b/ports/sysdeps/powerpc/powerpc32/405/strncmp.S similarity index 100% rename from sysdeps/powerpc/powerpc32/405/strncmp.S rename to ports/sysdeps/powerpc/powerpc32/405/strncmp.S diff --git a/sysdeps/powerpc/powerpc32/440/Implies b/ports/sysdeps/powerpc/powerpc32/440/Implies similarity index 100% rename from sysdeps/powerpc/powerpc32/440/Implies rename to ports/sysdeps/powerpc/powerpc32/440/Implies diff --git a/sysdeps/powerpc/powerpc32/464/Implies b/ports/sysdeps/powerpc/powerpc32/464/Implies similarity index 100% rename from sysdeps/powerpc/powerpc32/464/Implies rename to ports/sysdeps/powerpc/powerpc32/464/Implies diff --git a/sysdeps/powerpc/powerpc32/476/Implies b/ports/sysdeps/powerpc/powerpc32/476/Implies similarity index 100% rename from sysdeps/powerpc/powerpc32/476/Implies rename to ports/sysdeps/powerpc/powerpc32/476/Implies diff --git a/sysdeps/powerpc/powerpc32/Makefile b/ports/sysdeps/powerpc/powerpc32/Makefile similarity index 100% rename from sysdeps/powerpc/powerpc32/Makefile rename to ports/sysdeps/powerpc/powerpc32/Makefile diff --git a/sysdeps/powerpc/soft-fp/sfp-machine.h b/ports/sysdeps/powerpc/soft-fp/sfp-machine.h similarity index 100% rename from sysdeps/powerpc/soft-fp/sfp-machine.h rename to ports/sysdeps/powerpc/soft-fp/sfp-machine.h diff --git a/sysdeps/tile/Implies b/ports/sysdeps/tile/Implies similarity index 100% rename from sysdeps/tile/Implies rename to ports/sysdeps/tile/Implies diff --git a/sysdeps/tile/Makefile b/ports/sysdeps/tile/Makefile similarity index 100% rename from sysdeps/tile/Makefile rename to ports/sysdeps/tile/Makefile diff --git a/sysdeps/tile/Versions b/ports/sysdeps/tile/Versions similarity index 100% rename from sysdeps/tile/Versions rename to ports/sysdeps/tile/Versions diff --git a/sysdeps/tile/__longjmp.S b/ports/sysdeps/tile/__longjmp.S similarity index 100% rename from sysdeps/tile/__longjmp.S rename to ports/sysdeps/tile/__longjmp.S diff --git a/sysdeps/tile/__tls_get_addr.S b/ports/sysdeps/tile/__tls_get_addr.S similarity index 100% rename from sysdeps/tile/__tls_get_addr.S rename to ports/sysdeps/tile/__tls_get_addr.S diff --git a/sysdeps/tile/_mcount.S b/ports/sysdeps/tile/_mcount.S similarity index 100% rename from sysdeps/tile/_mcount.S rename to ports/sysdeps/tile/_mcount.S diff --git a/sysdeps/tile/abort-instr.h b/ports/sysdeps/tile/abort-instr.h similarity index 100% rename from sysdeps/tile/abort-instr.h rename to ports/sysdeps/tile/abort-instr.h diff --git a/sysdeps/tile/backtrace.c b/ports/sysdeps/tile/backtrace.c similarity index 100% rename from sysdeps/tile/backtrace.c rename to ports/sysdeps/tile/backtrace.c diff --git a/sysdeps/tile/bits/atomic.h b/ports/sysdeps/tile/bits/atomic.h similarity index 100% rename from sysdeps/tile/bits/atomic.h rename to ports/sysdeps/tile/bits/atomic.h diff --git a/sysdeps/tile/bits/byteswap.h b/ports/sysdeps/tile/bits/byteswap.h similarity index 100% rename from sysdeps/tile/bits/byteswap.h rename to ports/sysdeps/tile/bits/byteswap.h diff --git a/sysdeps/tile/bits/endian.h b/ports/sysdeps/tile/bits/endian.h similarity index 100% rename from sysdeps/tile/bits/endian.h rename to ports/sysdeps/tile/bits/endian.h diff --git a/sysdeps/tile/bits/fenv.h b/ports/sysdeps/tile/bits/fenv.h similarity index 100% rename from sysdeps/tile/bits/fenv.h rename to ports/sysdeps/tile/bits/fenv.h diff --git a/sysdeps/tile/bits/link.h b/ports/sysdeps/tile/bits/link.h similarity index 100% rename from sysdeps/tile/bits/link.h rename to ports/sysdeps/tile/bits/link.h diff --git a/sysdeps/tile/bits/mathdef.h b/ports/sysdeps/tile/bits/mathdef.h similarity index 100% rename from sysdeps/tile/bits/mathdef.h rename to ports/sysdeps/tile/bits/mathdef.h diff --git a/sysdeps/tile/bits/mathinline.h b/ports/sysdeps/tile/bits/mathinline.h similarity index 100% rename from sysdeps/tile/bits/mathinline.h rename to ports/sysdeps/tile/bits/mathinline.h diff --git a/sysdeps/tile/bits/setjmp.h b/ports/sysdeps/tile/bits/setjmp.h similarity index 100% rename from sysdeps/tile/bits/setjmp.h rename to ports/sysdeps/tile/bits/setjmp.h diff --git a/sysdeps/tile/bsd-_setjmp.S b/ports/sysdeps/tile/bsd-_setjmp.S similarity index 100% rename from sysdeps/tile/bsd-_setjmp.S rename to ports/sysdeps/tile/bsd-_setjmp.S diff --git a/sysdeps/tile/bsd-setjmp.S b/ports/sysdeps/tile/bsd-setjmp.S similarity index 100% rename from sysdeps/tile/bsd-setjmp.S rename to ports/sysdeps/tile/bsd-setjmp.S diff --git a/sysdeps/tile/bzero.S b/ports/sysdeps/tile/bzero.S similarity index 100% rename from sysdeps/tile/bzero.S rename to ports/sysdeps/tile/bzero.S diff --git a/sysdeps/tile/crti.S b/ports/sysdeps/tile/crti.S similarity index 100% rename from sysdeps/tile/crti.S rename to ports/sysdeps/tile/crti.S diff --git a/sysdeps/tile/crtn.S b/ports/sysdeps/tile/crtn.S similarity index 100% rename from sysdeps/tile/crtn.S rename to ports/sysdeps/tile/crtn.S diff --git a/sysdeps/tile/dl-lookupcfg.h b/ports/sysdeps/tile/dl-lookupcfg.h similarity index 100% rename from sysdeps/tile/dl-lookupcfg.h rename to ports/sysdeps/tile/dl-lookupcfg.h diff --git a/sysdeps/tile/dl-machine.h b/ports/sysdeps/tile/dl-machine.h similarity index 100% rename from sysdeps/tile/dl-machine.h rename to ports/sysdeps/tile/dl-machine.h diff --git a/sysdeps/tile/dl-runtime.c b/ports/sysdeps/tile/dl-runtime.c similarity index 100% rename from sysdeps/tile/dl-runtime.c rename to ports/sysdeps/tile/dl-runtime.c diff --git a/sysdeps/tile/dl-start.S b/ports/sysdeps/tile/dl-start.S similarity index 100% rename from sysdeps/tile/dl-start.S rename to ports/sysdeps/tile/dl-start.S diff --git a/sysdeps/tile/dl-tls.c b/ports/sysdeps/tile/dl-tls.c similarity index 100% rename from sysdeps/tile/dl-tls.c rename to ports/sysdeps/tile/dl-tls.c diff --git a/sysdeps/tile/dl-tls.h b/ports/sysdeps/tile/dl-tls.h similarity index 100% rename from sysdeps/tile/dl-tls.h rename to ports/sysdeps/tile/dl-tls.h diff --git a/sysdeps/tile/dl-trampoline.S b/ports/sysdeps/tile/dl-trampoline.S similarity index 100% rename from sysdeps/tile/dl-trampoline.S rename to ports/sysdeps/tile/dl-trampoline.S diff --git a/sysdeps/tile/fegetenv.c b/ports/sysdeps/tile/fegetenv.c similarity index 100% rename from sysdeps/tile/fegetenv.c rename to ports/sysdeps/tile/fegetenv.c diff --git a/sysdeps/tile/fegetround.c b/ports/sysdeps/tile/fegetround.c similarity index 100% rename from sysdeps/tile/fegetround.c rename to ports/sysdeps/tile/fegetround.c diff --git a/sysdeps/tile/feholdexcpt.c b/ports/sysdeps/tile/feholdexcpt.c similarity index 100% rename from sysdeps/tile/feholdexcpt.c rename to ports/sysdeps/tile/feholdexcpt.c diff --git a/sysdeps/tile/fesetenv.c b/ports/sysdeps/tile/fesetenv.c similarity index 100% rename from sysdeps/tile/fesetenv.c rename to ports/sysdeps/tile/fesetenv.c diff --git a/sysdeps/tile/fesetround.c b/ports/sysdeps/tile/fesetround.c similarity index 100% rename from sysdeps/tile/fesetround.c rename to ports/sysdeps/tile/fesetround.c diff --git a/sysdeps/tile/feupdateenv.c b/ports/sysdeps/tile/feupdateenv.c similarity index 100% rename from sysdeps/tile/feupdateenv.c rename to ports/sysdeps/tile/feupdateenv.c diff --git a/sysdeps/tile/ffs.c b/ports/sysdeps/tile/ffs.c similarity index 100% rename from sysdeps/tile/ffs.c rename to ports/sysdeps/tile/ffs.c diff --git a/sysdeps/tile/ffsll.c b/ports/sysdeps/tile/ffsll.c similarity index 100% rename from sysdeps/tile/ffsll.c rename to ports/sysdeps/tile/ffsll.c diff --git a/sysdeps/tile/gccframe.h b/ports/sysdeps/tile/gccframe.h similarity index 100% rename from sysdeps/tile/gccframe.h rename to ports/sysdeps/tile/gccframe.h diff --git a/sysdeps/tile/jmpbuf-offsets.h b/ports/sysdeps/tile/jmpbuf-offsets.h similarity index 100% rename from sysdeps/tile/jmpbuf-offsets.h rename to ports/sysdeps/tile/jmpbuf-offsets.h diff --git a/sysdeps/tile/jmpbuf-unwind.h b/ports/sysdeps/tile/jmpbuf-unwind.h similarity index 100% rename from sysdeps/tile/jmpbuf-unwind.h rename to ports/sysdeps/tile/jmpbuf-unwind.h diff --git a/sysdeps/tile/ldsodefs.h b/ports/sysdeps/tile/ldsodefs.h similarity index 100% rename from sysdeps/tile/ldsodefs.h rename to ports/sysdeps/tile/ldsodefs.h diff --git a/sysdeps/tile/libm-test-ulps b/ports/sysdeps/tile/libm-test-ulps similarity index 100% rename from sysdeps/tile/libm-test-ulps rename to ports/sysdeps/tile/libm-test-ulps diff --git a/sysdeps/tile/machine-gmon.h b/ports/sysdeps/tile/machine-gmon.h similarity index 100% rename from sysdeps/tile/machine-gmon.h rename to ports/sysdeps/tile/machine-gmon.h diff --git a/sysdeps/tile/math_private.h b/ports/sysdeps/tile/math_private.h similarity index 100% rename from sysdeps/tile/math_private.h rename to ports/sysdeps/tile/math_private.h diff --git a/sysdeps/tile/nptl/Makefile b/ports/sysdeps/tile/nptl/Makefile similarity index 100% rename from sysdeps/tile/nptl/Makefile rename to ports/sysdeps/tile/nptl/Makefile diff --git a/sysdeps/tile/nptl/pthread_spin_lock.c b/ports/sysdeps/tile/nptl/pthread_spin_lock.c similarity index 100% rename from sysdeps/tile/nptl/pthread_spin_lock.c rename to ports/sysdeps/tile/nptl/pthread_spin_lock.c diff --git a/sysdeps/tile/nptl/pthread_spin_trylock.c b/ports/sysdeps/tile/nptl/pthread_spin_trylock.c similarity index 100% rename from sysdeps/tile/nptl/pthread_spin_trylock.c rename to ports/sysdeps/tile/nptl/pthread_spin_trylock.c diff --git a/sysdeps/tile/nptl/pthreaddef.h b/ports/sysdeps/tile/nptl/pthreaddef.h similarity index 100% rename from sysdeps/tile/nptl/pthreaddef.h rename to ports/sysdeps/tile/nptl/pthreaddef.h diff --git a/sysdeps/tile/nptl/tcb-offsets.sym b/ports/sysdeps/tile/nptl/tcb-offsets.sym similarity index 100% rename from sysdeps/tile/nptl/tcb-offsets.sym rename to ports/sysdeps/tile/nptl/tcb-offsets.sym diff --git a/sysdeps/tile/nptl/tls.h b/ports/sysdeps/tile/nptl/tls.h similarity index 100% rename from sysdeps/tile/nptl/tls.h rename to ports/sysdeps/tile/nptl/tls.h diff --git a/sysdeps/tile/preconfigure b/ports/sysdeps/tile/preconfigure similarity index 100% rename from sysdeps/tile/preconfigure rename to ports/sysdeps/tile/preconfigure diff --git a/sysdeps/tile/s_fma.c b/ports/sysdeps/tile/s_fma.c similarity index 100% rename from sysdeps/tile/s_fma.c rename to ports/sysdeps/tile/s_fma.c diff --git a/sysdeps/tile/s_fmaf.c b/ports/sysdeps/tile/s_fmaf.c similarity index 100% rename from sysdeps/tile/s_fmaf.c rename to ports/sysdeps/tile/s_fmaf.c diff --git a/sysdeps/tile/setjmp.S b/ports/sysdeps/tile/setjmp.S similarity index 100% rename from sysdeps/tile/setjmp.S rename to ports/sysdeps/tile/setjmp.S diff --git a/sysdeps/tile/shlib-versions b/ports/sysdeps/tile/shlib-versions similarity index 100% rename from sysdeps/tile/shlib-versions rename to ports/sysdeps/tile/shlib-versions diff --git a/sysdeps/tile/sotruss-lib.c b/ports/sysdeps/tile/sotruss-lib.c similarity index 100% rename from sysdeps/tile/sotruss-lib.c rename to ports/sysdeps/tile/sotruss-lib.c diff --git a/sysdeps/tile/stackguard-macros.h b/ports/sysdeps/tile/stackguard-macros.h similarity index 100% rename from sysdeps/tile/stackguard-macros.h rename to ports/sysdeps/tile/stackguard-macros.h diff --git a/sysdeps/tile/stackinfo.h b/ports/sysdeps/tile/stackinfo.h similarity index 100% rename from sysdeps/tile/stackinfo.h rename to ports/sysdeps/tile/stackinfo.h diff --git a/sysdeps/tile/start.S b/ports/sysdeps/tile/start.S similarity index 100% rename from sysdeps/tile/start.S rename to ports/sysdeps/tile/start.S diff --git a/sysdeps/tile/sysdep.h b/ports/sysdeps/tile/sysdep.h similarity index 100% rename from sysdeps/tile/sysdep.h rename to ports/sysdeps/tile/sysdep.h diff --git a/sysdeps/tile/tilegx/bits/atomic.h b/ports/sysdeps/tile/tilegx/bits/atomic.h similarity index 100% rename from sysdeps/tile/tilegx/bits/atomic.h rename to ports/sysdeps/tile/tilegx/bits/atomic.h diff --git a/sysdeps/tile/tilegx/bits/wordsize.h b/ports/sysdeps/tile/tilegx/bits/wordsize.h similarity index 100% rename from sysdeps/tile/tilegx/bits/wordsize.h rename to ports/sysdeps/tile/tilegx/bits/wordsize.h diff --git a/sysdeps/tile/tilegx/memchr.c b/ports/sysdeps/tile/tilegx/memchr.c similarity index 100% rename from sysdeps/tile/tilegx/memchr.c rename to ports/sysdeps/tile/tilegx/memchr.c diff --git a/sysdeps/tile/tilegx/memcpy.c b/ports/sysdeps/tile/tilegx/memcpy.c similarity index 100% rename from sysdeps/tile/tilegx/memcpy.c rename to ports/sysdeps/tile/tilegx/memcpy.c diff --git a/sysdeps/tile/tilegx/memset.c b/ports/sysdeps/tile/tilegx/memset.c similarity index 100% rename from sysdeps/tile/tilegx/memset.c rename to ports/sysdeps/tile/tilegx/memset.c diff --git a/sysdeps/tile/tilegx/memusage.h b/ports/sysdeps/tile/tilegx/memusage.h similarity index 100% rename from sysdeps/tile/tilegx/memusage.h rename to ports/sysdeps/tile/tilegx/memusage.h diff --git a/sysdeps/tile/tilegx/rawmemchr.c b/ports/sysdeps/tile/tilegx/rawmemchr.c similarity index 100% rename from sysdeps/tile/tilegx/rawmemchr.c rename to ports/sysdeps/tile/tilegx/rawmemchr.c diff --git a/sysdeps/tile/tilegx/strchr.c b/ports/sysdeps/tile/tilegx/strchr.c similarity index 100% rename from sysdeps/tile/tilegx/strchr.c rename to ports/sysdeps/tile/tilegx/strchr.c diff --git a/sysdeps/tile/tilegx/strchrnul.c b/ports/sysdeps/tile/tilegx/strchrnul.c similarity index 100% rename from sysdeps/tile/tilegx/strchrnul.c rename to ports/sysdeps/tile/tilegx/strchrnul.c diff --git a/sysdeps/tile/tilegx/string-endian.h b/ports/sysdeps/tile/tilegx/string-endian.h similarity index 100% rename from sysdeps/tile/tilegx/string-endian.h rename to ports/sysdeps/tile/tilegx/string-endian.h diff --git a/sysdeps/tile/tilegx/strlen.c b/ports/sysdeps/tile/tilegx/strlen.c similarity index 100% rename from sysdeps/tile/tilegx/strlen.c rename to ports/sysdeps/tile/tilegx/strlen.c diff --git a/sysdeps/tile/tilegx/strrchr.c b/ports/sysdeps/tile/tilegx/strrchr.c similarity index 100% rename from sysdeps/tile/tilegx/strrchr.c rename to ports/sysdeps/tile/tilegx/strrchr.c diff --git a/sysdeps/tile/tilegx/tilegx32/Implies b/ports/sysdeps/tile/tilegx/tilegx32/Implies similarity index 100% rename from sysdeps/tile/tilegx/tilegx32/Implies rename to ports/sysdeps/tile/tilegx/tilegx32/Implies diff --git a/sysdeps/tile/tilegx/tilegx64/Implies b/ports/sysdeps/tile/tilegx/tilegx64/Implies similarity index 100% rename from sysdeps/tile/tilegx/tilegx64/Implies rename to ports/sysdeps/tile/tilegx/tilegx64/Implies diff --git a/sysdeps/tile/tilepro/Implies b/ports/sysdeps/tile/tilepro/Implies similarity index 100% rename from sysdeps/tile/tilepro/Implies rename to ports/sysdeps/tile/tilepro/Implies diff --git a/sysdeps/tile/tilepro/bits/atomic.h b/ports/sysdeps/tile/tilepro/bits/atomic.h similarity index 100% rename from sysdeps/tile/tilepro/bits/atomic.h rename to ports/sysdeps/tile/tilepro/bits/atomic.h diff --git a/sysdeps/tile/tilepro/bits/wordsize.h b/ports/sysdeps/tile/tilepro/bits/wordsize.h similarity index 100% rename from sysdeps/tile/tilepro/bits/wordsize.h rename to ports/sysdeps/tile/tilepro/bits/wordsize.h diff --git a/sysdeps/tile/tilepro/memchr.c b/ports/sysdeps/tile/tilepro/memchr.c similarity index 100% rename from sysdeps/tile/tilepro/memchr.c rename to ports/sysdeps/tile/tilepro/memchr.c diff --git a/sysdeps/tile/tilepro/memcpy.S b/ports/sysdeps/tile/tilepro/memcpy.S similarity index 100% rename from sysdeps/tile/tilepro/memcpy.S rename to ports/sysdeps/tile/tilepro/memcpy.S diff --git a/sysdeps/tile/tilepro/memset.c b/ports/sysdeps/tile/tilepro/memset.c similarity index 100% rename from sysdeps/tile/tilepro/memset.c rename to ports/sysdeps/tile/tilepro/memset.c diff --git a/sysdeps/tile/tilepro/memusage.h b/ports/sysdeps/tile/tilepro/memusage.h similarity index 100% rename from sysdeps/tile/tilepro/memusage.h rename to ports/sysdeps/tile/tilepro/memusage.h diff --git a/sysdeps/tile/tilepro/rawmemchr.c b/ports/sysdeps/tile/tilepro/rawmemchr.c similarity index 100% rename from sysdeps/tile/tilepro/rawmemchr.c rename to ports/sysdeps/tile/tilepro/rawmemchr.c diff --git a/sysdeps/tile/tilepro/strchr.c b/ports/sysdeps/tile/tilepro/strchr.c similarity index 100% rename from sysdeps/tile/tilepro/strchr.c rename to ports/sysdeps/tile/tilepro/strchr.c diff --git a/sysdeps/tile/tilepro/strchrnul.c b/ports/sysdeps/tile/tilepro/strchrnul.c similarity index 100% rename from sysdeps/tile/tilepro/strchrnul.c rename to ports/sysdeps/tile/tilepro/strchrnul.c diff --git a/sysdeps/tile/tilepro/strlen.c b/ports/sysdeps/tile/tilepro/strlen.c similarity index 100% rename from sysdeps/tile/tilepro/strlen.c rename to ports/sysdeps/tile/tilepro/strlen.c diff --git a/sysdeps/tile/tilepro/strrchr.c b/ports/sysdeps/tile/tilepro/strrchr.c similarity index 100% rename from sysdeps/tile/tilepro/strrchr.c rename to ports/sysdeps/tile/tilepro/strrchr.c diff --git a/sysdeps/tile/tls-macros.h b/ports/sysdeps/tile/tls-macros.h similarity index 100% rename from sysdeps/tile/tls-macros.h rename to ports/sysdeps/tile/tls-macros.h diff --git a/sysdeps/tile/tst-audit.h b/ports/sysdeps/tile/tst-audit.h similarity index 100% rename from sysdeps/tile/tst-audit.h rename to ports/sysdeps/tile/tst-audit.h diff --git a/sysdeps/unix/alpha/Makefile b/ports/sysdeps/unix/alpha/Makefile similarity index 100% rename from sysdeps/unix/alpha/Makefile rename to ports/sysdeps/unix/alpha/Makefile diff --git a/sysdeps/unix/alpha/getegid.S b/ports/sysdeps/unix/alpha/getegid.S similarity index 100% rename from sysdeps/unix/alpha/getegid.S rename to ports/sysdeps/unix/alpha/getegid.S diff --git a/sysdeps/unix/alpha/geteuid.S b/ports/sysdeps/unix/alpha/geteuid.S similarity index 100% rename from sysdeps/unix/alpha/geteuid.S rename to ports/sysdeps/unix/alpha/geteuid.S diff --git a/sysdeps/unix/alpha/getppid.S b/ports/sysdeps/unix/alpha/getppid.S similarity index 100% rename from sysdeps/unix/alpha/getppid.S rename to ports/sysdeps/unix/alpha/getppid.S diff --git a/sysdeps/unix/alpha/pipe.S b/ports/sysdeps/unix/alpha/pipe.S similarity index 100% rename from sysdeps/unix/alpha/pipe.S rename to ports/sysdeps/unix/alpha/pipe.S diff --git a/sysdeps/unix/alpha/rt-sysdep.S b/ports/sysdeps/unix/alpha/rt-sysdep.S similarity index 100% rename from sysdeps/unix/alpha/rt-sysdep.S rename to ports/sysdeps/unix/alpha/rt-sysdep.S diff --git a/sysdeps/unix/alpha/sysdep.S b/ports/sysdeps/unix/alpha/sysdep.S similarity index 100% rename from sysdeps/unix/alpha/sysdep.S rename to ports/sysdeps/unix/alpha/sysdep.S diff --git a/sysdeps/unix/alpha/sysdep.h b/ports/sysdeps/unix/alpha/sysdep.h similarity index 100% rename from sysdeps/unix/alpha/sysdep.h rename to ports/sysdeps/unix/alpha/sysdep.h diff --git a/sysdeps/unix/am33/sysdep.S b/ports/sysdeps/unix/am33/sysdep.S similarity index 100% rename from sysdeps/unix/am33/sysdep.S rename to ports/sysdeps/unix/am33/sysdep.S diff --git a/sysdeps/unix/am33/sysdep.h b/ports/sysdeps/unix/am33/sysdep.h similarity index 100% rename from sysdeps/unix/am33/sysdep.h rename to ports/sysdeps/unix/am33/sysdep.h diff --git a/sysdeps/unix/arm/sysdep.S b/ports/sysdeps/unix/arm/sysdep.S similarity index 100% rename from sysdeps/unix/arm/sysdep.S rename to ports/sysdeps/unix/arm/sysdep.S diff --git a/sysdeps/unix/arm/sysdep.h b/ports/sysdeps/unix/arm/sysdep.h similarity index 100% rename from sysdeps/unix/arm/sysdep.h rename to ports/sysdeps/unix/arm/sysdep.h diff --git a/sysdeps/unix/mips/entry.h b/ports/sysdeps/unix/mips/entry.h similarity index 100% rename from sysdeps/unix/mips/entry.h rename to ports/sysdeps/unix/mips/entry.h diff --git a/sysdeps/unix/mips/mips32/sysdep.h b/ports/sysdeps/unix/mips/mips32/sysdep.h similarity index 100% rename from sysdeps/unix/mips/mips32/sysdep.h rename to ports/sysdeps/unix/mips/mips32/sysdep.h diff --git a/sysdeps/unix/mips/mips64/n32/sysdep.h b/ports/sysdeps/unix/mips/mips64/n32/sysdep.h similarity index 100% rename from sysdeps/unix/mips/mips64/n32/sysdep.h rename to ports/sysdeps/unix/mips/mips64/n32/sysdep.h diff --git a/sysdeps/unix/mips/mips64/n64/sysdep.h b/ports/sysdeps/unix/mips/mips64/n64/sysdep.h similarity index 100% rename from sysdeps/unix/mips/mips64/n64/sysdep.h rename to ports/sysdeps/unix/mips/mips64/n64/sysdep.h diff --git a/sysdeps/unix/mips/pipe.S b/ports/sysdeps/unix/mips/pipe.S similarity index 100% rename from sysdeps/unix/mips/pipe.S rename to ports/sysdeps/unix/mips/pipe.S diff --git a/sysdeps/unix/mips/rt-sysdep.S b/ports/sysdeps/unix/mips/rt-sysdep.S similarity index 100% rename from sysdeps/unix/mips/rt-sysdep.S rename to ports/sysdeps/unix/mips/rt-sysdep.S diff --git a/sysdeps/unix/mips/sysdep.S b/ports/sysdeps/unix/mips/sysdep.S similarity index 100% rename from sysdeps/unix/mips/sysdep.S rename to ports/sysdeps/unix/mips/sysdep.S diff --git a/sysdeps/unix/mips/sysdep.h b/ports/sysdeps/unix/mips/sysdep.h similarity index 100% rename from sysdeps/unix/mips/sysdep.h rename to ports/sysdeps/unix/mips/sysdep.h diff --git a/sysdeps/unix/sysv/linux/alpha/Implies b/ports/sysdeps/unix/sysv/linux/alpha/Implies similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/Implies rename to ports/sysdeps/unix/sysv/linux/alpha/Implies diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/ports/sysdeps/unix/sysv/linux/alpha/Makefile similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/Makefile rename to ports/sysdeps/unix/sysv/linux/alpha/Makefile diff --git a/sysdeps/unix/sysv/linux/alpha/Versions b/ports/sysdeps/unix/sysv/linux/alpha/Versions similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/Versions rename to ports/sysdeps/unix/sysv/linux/alpha/Versions diff --git a/sysdeps/unix/sysv/linux/alpha/____longjmp_chk.S b/ports/sysdeps/unix/sysv/linux/alpha/____longjmp_chk.S similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/____longjmp_chk.S rename to ports/sysdeps/unix/sysv/linux/alpha/____longjmp_chk.S diff --git a/sysdeps/unix/sysv/linux/alpha/a.out.h b/ports/sysdeps/unix/sysv/linux/alpha/a.out.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/a.out.h rename to ports/sysdeps/unix/sysv/linux/alpha/a.out.h diff --git a/sysdeps/unix/sysv/linux/alpha/adjtime.c b/ports/sysdeps/unix/sysv/linux/alpha/adjtime.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/adjtime.c rename to ports/sysdeps/unix/sysv/linux/alpha/adjtime.c diff --git a/sysdeps/unix/sysv/linux/alpha/alpha/ptrace.h b/ports/sysdeps/unix/sysv/linux/alpha/alpha/ptrace.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/alpha/ptrace.h rename to ports/sysdeps/unix/sysv/linux/alpha/alpha/ptrace.h diff --git a/sysdeps/unix/sysv/linux/alpha/alpha/regdef.h b/ports/sysdeps/unix/sysv/linux/alpha/alpha/regdef.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/alpha/regdef.h rename to ports/sysdeps/unix/sysv/linux/alpha/alpha/regdef.h diff --git a/sysdeps/unix/sysv/linux/alpha/alphaev6/fpu/Implies b/ports/sysdeps/unix/sysv/linux/alpha/alphaev6/fpu/Implies similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/alphaev6/fpu/Implies rename to ports/sysdeps/unix/sysv/linux/alpha/alphaev6/fpu/Implies diff --git a/sysdeps/unix/sysv/linux/alpha/alphaev67/fpu/Implies b/ports/sysdeps/unix/sysv/linux/alpha/alphaev67/fpu/Implies similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/alphaev67/fpu/Implies rename to ports/sysdeps/unix/sysv/linux/alpha/alphaev67/fpu/Implies diff --git a/sysdeps/unix/sysv/linux/alpha/bits/a.out.h b/ports/sysdeps/unix/sysv/linux/alpha/bits/a.out.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/bits/a.out.h rename to ports/sysdeps/unix/sysv/linux/alpha/bits/a.out.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/dirent.h b/ports/sysdeps/unix/sysv/linux/alpha/bits/dirent.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/bits/dirent.h rename to ports/sysdeps/unix/sysv/linux/alpha/bits/dirent.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/elfclass.h b/ports/sysdeps/unix/sysv/linux/alpha/bits/elfclass.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/bits/elfclass.h rename to ports/sysdeps/unix/sysv/linux/alpha/bits/elfclass.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/epoll.h b/ports/sysdeps/unix/sysv/linux/alpha/bits/epoll.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/bits/epoll.h rename to ports/sysdeps/unix/sysv/linux/alpha/bits/epoll.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/errno.h b/ports/sysdeps/unix/sysv/linux/alpha/bits/errno.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/bits/errno.h rename to ports/sysdeps/unix/sysv/linux/alpha/bits/errno.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/eventfd.h b/ports/sysdeps/unix/sysv/linux/alpha/bits/eventfd.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/bits/eventfd.h rename to ports/sysdeps/unix/sysv/linux/alpha/bits/eventfd.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/ports/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/bits/fcntl.h rename to ports/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/inotify.h b/ports/sysdeps/unix/sysv/linux/alpha/bits/inotify.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/bits/inotify.h rename to ports/sysdeps/unix/sysv/linux/alpha/bits/inotify.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h b/ports/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/bits/ioctls.h rename to ports/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/ipc.h b/ports/sysdeps/unix/sysv/linux/alpha/bits/ipc.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/bits/ipc.h rename to ports/sysdeps/unix/sysv/linux/alpha/bits/ipc.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/mman.h b/ports/sysdeps/unix/sysv/linux/alpha/bits/mman.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/bits/mman.h rename to ports/sysdeps/unix/sysv/linux/alpha/bits/mman.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/msq.h b/ports/sysdeps/unix/sysv/linux/alpha/bits/msq.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/bits/msq.h rename to ports/sysdeps/unix/sysv/linux/alpha/bits/msq.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/netdb.h b/ports/sysdeps/unix/sysv/linux/alpha/bits/netdb.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/bits/netdb.h rename to ports/sysdeps/unix/sysv/linux/alpha/bits/netdb.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/resource.h b/ports/sysdeps/unix/sysv/linux/alpha/bits/resource.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/bits/resource.h rename to ports/sysdeps/unix/sysv/linux/alpha/bits/resource.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sem.h b/ports/sysdeps/unix/sysv/linux/alpha/bits/sem.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/bits/sem.h rename to ports/sysdeps/unix/sysv/linux/alpha/bits/sem.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/shm.h b/ports/sysdeps/unix/sysv/linux/alpha/bits/shm.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/bits/shm.h rename to ports/sysdeps/unix/sysv/linux/alpha/bits/shm.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h b/ports/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/bits/sigaction.h rename to ports/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h b/ports/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/bits/siginfo.h rename to ports/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/signalfd.h b/ports/sysdeps/unix/sysv/linux/alpha/bits/signalfd.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/bits/signalfd.h rename to ports/sysdeps/unix/sysv/linux/alpha/bits/signalfd.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/signum.h b/ports/sysdeps/unix/sysv/linux/alpha/bits/signum.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/bits/signum.h rename to ports/sysdeps/unix/sysv/linux/alpha/bits/signum.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sigstack.h b/ports/sysdeps/unix/sysv/linux/alpha/bits/sigstack.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/bits/sigstack.h rename to ports/sysdeps/unix/sysv/linux/alpha/bits/sigstack.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/socket_type.h b/ports/sysdeps/unix/sysv/linux/alpha/bits/socket_type.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/bits/socket_type.h rename to ports/sysdeps/unix/sysv/linux/alpha/bits/socket_type.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/stat.h b/ports/sysdeps/unix/sysv/linux/alpha/bits/stat.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/bits/stat.h rename to ports/sysdeps/unix/sysv/linux/alpha/bits/stat.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/statfs.h b/ports/sysdeps/unix/sysv/linux/alpha/bits/statfs.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/bits/statfs.h rename to ports/sysdeps/unix/sysv/linux/alpha/bits/statfs.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/termios.h b/ports/sysdeps/unix/sysv/linux/alpha/bits/termios.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/bits/termios.h rename to ports/sysdeps/unix/sysv/linux/alpha/bits/termios.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/timerfd.h b/ports/sysdeps/unix/sysv/linux/alpha/bits/timerfd.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/bits/timerfd.h rename to ports/sysdeps/unix/sysv/linux/alpha/bits/timerfd.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h b/ports/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/bits/typesizes.h rename to ports/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h diff --git a/sysdeps/unix/sysv/linux/alpha/bits/wordsize.h b/ports/sysdeps/unix/sysv/linux/alpha/bits/wordsize.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/bits/wordsize.h rename to ports/sysdeps/unix/sysv/linux/alpha/bits/wordsize.h diff --git a/sysdeps/unix/sysv/linux/alpha/brk.S b/ports/sysdeps/unix/sysv/linux/alpha/brk.S similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/brk.S rename to ports/sysdeps/unix/sysv/linux/alpha/brk.S diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/ports/sysdeps/unix/sysv/linux/alpha/clone.S similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/clone.S rename to ports/sysdeps/unix/sysv/linux/alpha/clone.S diff --git a/sysdeps/unix/sysv/linux/alpha/configure b/ports/sysdeps/unix/sysv/linux/alpha/configure similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/configure rename to ports/sysdeps/unix/sysv/linux/alpha/configure diff --git a/sysdeps/unix/sysv/linux/alpha/configure.in b/ports/sysdeps/unix/sysv/linux/alpha/configure.in similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/configure.in rename to ports/sysdeps/unix/sysv/linux/alpha/configure.in diff --git a/sysdeps/unix/sysv/linux/alpha/creat.c b/ports/sysdeps/unix/sysv/linux/alpha/creat.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/creat.c rename to ports/sysdeps/unix/sysv/linux/alpha/creat.c diff --git a/sysdeps/unix/sysv/linux/alpha/dl-auxv.h b/ports/sysdeps/unix/sysv/linux/alpha/dl-auxv.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/dl-auxv.h rename to ports/sysdeps/unix/sysv/linux/alpha/dl-auxv.h diff --git a/sysdeps/unix/sysv/linux/alpha/dl-brk.S b/ports/sysdeps/unix/sysv/linux/alpha/dl-brk.S similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/dl-brk.S rename to ports/sysdeps/unix/sysv/linux/alpha/dl-brk.S diff --git a/sysdeps/unix/sysv/linux/alpha/dl-fxstatat64.c b/ports/sysdeps/unix/sysv/linux/alpha/dl-fxstatat64.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/dl-fxstatat64.c rename to ports/sysdeps/unix/sysv/linux/alpha/dl-fxstatat64.c diff --git a/sysdeps/unix/sysv/linux/alpha/dl-support.c b/ports/sysdeps/unix/sysv/linux/alpha/dl-support.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/dl-support.c rename to ports/sysdeps/unix/sysv/linux/alpha/dl-support.c diff --git a/sysdeps/unix/sysv/linux/alpha/dl-sysdep.c b/ports/sysdeps/unix/sysv/linux/alpha/dl-sysdep.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/dl-sysdep.c rename to ports/sysdeps/unix/sysv/linux/alpha/dl-sysdep.c diff --git a/sysdeps/unix/sysv/linux/alpha/fpu/Implies b/ports/sysdeps/unix/sysv/linux/alpha/fpu/Implies similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/fpu/Implies rename to ports/sysdeps/unix/sysv/linux/alpha/fpu/Implies diff --git a/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c b/ports/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c rename to ports/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c diff --git a/sysdeps/unix/sysv/linux/alpha/fstatfs64.c b/ports/sysdeps/unix/sysv/linux/alpha/fstatfs64.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/fstatfs64.c rename to ports/sysdeps/unix/sysv/linux/alpha/fstatfs64.c diff --git a/sysdeps/unix/sysv/linux/alpha/fstatvfs.c b/ports/sysdeps/unix/sysv/linux/alpha/fstatvfs.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/fstatvfs.c rename to ports/sysdeps/unix/sysv/linux/alpha/fstatvfs.c diff --git a/sysdeps/unix/sysv/linux/alpha/fstatvfs64.c b/ports/sysdeps/unix/sysv/linux/alpha/fstatvfs64.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/fstatvfs64.c rename to ports/sysdeps/unix/sysv/linux/alpha/fstatvfs64.c diff --git a/sysdeps/unix/sysv/linux/alpha/fxstat.c b/ports/sysdeps/unix/sysv/linux/alpha/fxstat.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/fxstat.c rename to ports/sysdeps/unix/sysv/linux/alpha/fxstat.c diff --git a/sysdeps/unix/sysv/linux/alpha/fxstatat.c b/ports/sysdeps/unix/sysv/linux/alpha/fxstatat.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/fxstatat.c rename to ports/sysdeps/unix/sysv/linux/alpha/fxstatat.c diff --git a/sysdeps/unix/sysv/linux/alpha/getclktck.c b/ports/sysdeps/unix/sysv/linux/alpha/getclktck.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/getclktck.c rename to ports/sysdeps/unix/sysv/linux/alpha/getclktck.c diff --git a/sysdeps/unix/sysv/linux/alpha/getcontext.S b/ports/sysdeps/unix/sysv/linux/alpha/getcontext.S similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/getcontext.S rename to ports/sysdeps/unix/sysv/linux/alpha/getcontext.S diff --git a/sysdeps/unix/sysv/linux/alpha/getdents.c b/ports/sysdeps/unix/sysv/linux/alpha/getdents.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/getdents.c rename to ports/sysdeps/unix/sysv/linux/alpha/getdents.c diff --git a/sysdeps/unix/sysv/linux/alpha/getdents64.c b/ports/sysdeps/unix/sysv/linux/alpha/getdents64.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/getdents64.c rename to ports/sysdeps/unix/sysv/linux/alpha/getdents64.c diff --git a/sysdeps/unix/sysv/linux/alpha/gethostname.c b/ports/sysdeps/unix/sysv/linux/alpha/gethostname.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/gethostname.c rename to ports/sysdeps/unix/sysv/linux/alpha/gethostname.c diff --git a/sysdeps/unix/sysv/linux/alpha/getsysstats.c b/ports/sysdeps/unix/sysv/linux/alpha/getsysstats.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/getsysstats.c rename to ports/sysdeps/unix/sysv/linux/alpha/getsysstats.c diff --git a/sysdeps/unix/sysv/linux/alpha/glob.c b/ports/sysdeps/unix/sysv/linux/alpha/glob.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/glob.c rename to ports/sysdeps/unix/sysv/linux/alpha/glob.c diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S b/ports/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S rename to ports/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S b/ports/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S rename to ports/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S diff --git a/sysdeps/unix/sysv/linux/alpha/internal_statvfs64.c b/ports/sysdeps/unix/sysv/linux/alpha/internal_statvfs64.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/internal_statvfs64.c rename to ports/sysdeps/unix/sysv/linux/alpha/internal_statvfs64.c diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/ioperm.c rename to ports/sysdeps/unix/sysv/linux/alpha/ioperm.c diff --git a/sysdeps/unix/sysv/linux/alpha/ipc_priv.h b/ports/sysdeps/unix/sysv/linux/alpha/ipc_priv.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/ipc_priv.h rename to ports/sysdeps/unix/sysv/linux/alpha/ipc_priv.h diff --git a/sysdeps/unix/sysv/linux/alpha/kernel-features.h b/ports/sysdeps/unix/sysv/linux/alpha/kernel-features.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/kernel-features.h rename to ports/sysdeps/unix/sysv/linux/alpha/kernel-features.h diff --git a/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h b/ports/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h rename to ports/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h diff --git a/sysdeps/unix/sysv/linux/alpha/kernel_stat.h b/ports/sysdeps/unix/sysv/linux/alpha/kernel_stat.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/kernel_stat.h rename to ports/sysdeps/unix/sysv/linux/alpha/kernel_stat.h diff --git a/sysdeps/unix/sysv/linux/alpha/kernel_sysinfo.h b/ports/sysdeps/unix/sysv/linux/alpha/kernel_sysinfo.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/kernel_sysinfo.h rename to ports/sysdeps/unix/sysv/linux/alpha/kernel_sysinfo.h diff --git a/sysdeps/unix/sysv/linux/alpha/kernel_termios.h b/ports/sysdeps/unix/sysv/linux/alpha/kernel_termios.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/kernel_termios.h rename to ports/sysdeps/unix/sysv/linux/alpha/kernel_termios.h diff --git a/sysdeps/unix/sysv/linux/alpha/lxstat.c b/ports/sysdeps/unix/sysv/linux/alpha/lxstat.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/lxstat.c rename to ports/sysdeps/unix/sysv/linux/alpha/lxstat.c diff --git a/sysdeps/unix/sysv/linux/alpha/makecontext.S b/ports/sysdeps/unix/sysv/linux/alpha/makecontext.S similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/makecontext.S rename to ports/sysdeps/unix/sysv/linux/alpha/makecontext.S diff --git a/sysdeps/unix/sysv/linux/alpha/msgctl.c b/ports/sysdeps/unix/sysv/linux/alpha/msgctl.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/msgctl.c rename to ports/sysdeps/unix/sysv/linux/alpha/msgctl.c diff --git a/sysdeps/unix/sysv/linux/alpha/nldbl-abi.h b/ports/sysdeps/unix/sysv/linux/alpha/nldbl-abi.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/nldbl-abi.h rename to ports/sysdeps/unix/sysv/linux/alpha/nldbl-abi.h diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/Makefile b/ports/sysdeps/unix/sysv/linux/alpha/nptl/Makefile similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/nptl/Makefile rename to ports/sysdeps/unix/sysv/linux/alpha/nptl/Makefile diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/Versions b/ports/sysdeps/unix/sysv/linux/alpha/nptl/Versions similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/nptl/Versions rename to ports/sysdeps/unix/sysv/linux/alpha/nptl/Versions diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/aio_cancel.c b/ports/sysdeps/unix/sysv/linux/alpha/nptl/aio_cancel.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/nptl/aio_cancel.c rename to ports/sysdeps/unix/sysv/linux/alpha/nptl/aio_cancel.c diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h b/ports/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h rename to ports/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h b/ports/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h rename to ports/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/semaphore.h b/ports/sysdeps/unix/sysv/linux/alpha/nptl/bits/semaphore.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/nptl/bits/semaphore.h rename to ports/sysdeps/unix/sysv/linux/alpha/nptl/bits/semaphore.h diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/clone.S b/ports/sysdeps/unix/sysv/linux/alpha/nptl/clone.S similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/nptl/clone.S rename to ports/sysdeps/unix/sysv/linux/alpha/nptl/clone.S diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/createthread.c b/ports/sysdeps/unix/sysv/linux/alpha/nptl/createthread.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/nptl/createthread.c rename to ports/sysdeps/unix/sysv/linux/alpha/nptl/createthread.c diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/fork.c b/ports/sysdeps/unix/sysv/linux/alpha/nptl/fork.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/nptl/fork.c rename to ports/sysdeps/unix/sysv/linux/alpha/nptl/fork.c diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/ld.abilist b/ports/sysdeps/unix/sysv/linux/alpha/nptl/ld.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/nptl/ld.abilist rename to ports/sysdeps/unix/sysv/linux/alpha/nptl/ld.abilist diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/libBrokenLocale.abilist b/ports/sysdeps/unix/sysv/linux/alpha/nptl/libBrokenLocale.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/nptl/libBrokenLocale.abilist rename to ports/sysdeps/unix/sysv/linux/alpha/nptl/libBrokenLocale.abilist diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/libanl.abilist b/ports/sysdeps/unix/sysv/linux/alpha/nptl/libanl.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/nptl/libanl.abilist rename to ports/sysdeps/unix/sysv/linux/alpha/nptl/libanl.abilist diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/alpha/nptl/libc.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/nptl/libc.abilist rename to ports/sysdeps/unix/sysv/linux/alpha/nptl/libc.abilist diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/libcrypt.abilist b/ports/sysdeps/unix/sysv/linux/alpha/nptl/libcrypt.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/nptl/libcrypt.abilist rename to ports/sysdeps/unix/sysv/linux/alpha/nptl/libcrypt.abilist diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/libdl.abilist b/ports/sysdeps/unix/sysv/linux/alpha/nptl/libdl.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/nptl/libdl.abilist rename to ports/sysdeps/unix/sysv/linux/alpha/nptl/libdl.abilist diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/libm.abilist b/ports/sysdeps/unix/sysv/linux/alpha/nptl/libm.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/nptl/libm.abilist rename to ports/sysdeps/unix/sysv/linux/alpha/nptl/libm.abilist diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/libnsl.abilist b/ports/sysdeps/unix/sysv/linux/alpha/nptl/libnsl.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/nptl/libnsl.abilist rename to ports/sysdeps/unix/sysv/linux/alpha/nptl/libnsl.abilist diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/libpthread.abilist b/ports/sysdeps/unix/sysv/linux/alpha/nptl/libpthread.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/nptl/libpthread.abilist rename to ports/sysdeps/unix/sysv/linux/alpha/nptl/libpthread.abilist diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/libresolv.abilist b/ports/sysdeps/unix/sysv/linux/alpha/nptl/libresolv.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/nptl/libresolv.abilist rename to ports/sysdeps/unix/sysv/linux/alpha/nptl/libresolv.abilist diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/librt.abilist b/ports/sysdeps/unix/sysv/linux/alpha/nptl/librt.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/nptl/librt.abilist rename to ports/sysdeps/unix/sysv/linux/alpha/nptl/librt.abilist diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/libthread_db.abilist b/ports/sysdeps/unix/sysv/linux/alpha/nptl/libthread_db.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/nptl/libthread_db.abilist rename to ports/sysdeps/unix/sysv/linux/alpha/nptl/libthread_db.abilist diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/libutil.abilist b/ports/sysdeps/unix/sysv/linux/alpha/nptl/libutil.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/nptl/libutil.abilist rename to ports/sysdeps/unix/sysv/linux/alpha/nptl/libutil.abilist diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/ports/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h rename to ports/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/pt-vfork.S b/ports/sysdeps/unix/sysv/linux/alpha/nptl/pt-vfork.S similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/nptl/pt-vfork.S rename to ports/sysdeps/unix/sysv/linux/alpha/nptl/pt-vfork.S diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c b/ports/sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c rename to ports/sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/sem_post.c b/ports/sysdeps/unix/sysv/linux/alpha/nptl/sem_post.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/nptl/sem_post.c rename to ports/sysdeps/unix/sysv/linux/alpha/nptl/sem_post.c diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h b/ports/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h rename to ports/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/timer_create.c b/ports/sysdeps/unix/sysv/linux/alpha/nptl/timer_create.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/nptl/timer_create.c rename to ports/sysdeps/unix/sysv/linux/alpha/nptl/timer_create.c diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/timer_delete.c b/ports/sysdeps/unix/sysv/linux/alpha/nptl/timer_delete.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/nptl/timer_delete.c rename to ports/sysdeps/unix/sysv/linux/alpha/nptl/timer_delete.c diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/timer_getoverr.c b/ports/sysdeps/unix/sysv/linux/alpha/nptl/timer_getoverr.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/nptl/timer_getoverr.c rename to ports/sysdeps/unix/sysv/linux/alpha/nptl/timer_getoverr.c diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/timer_gettime.c b/ports/sysdeps/unix/sysv/linux/alpha/nptl/timer_gettime.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/nptl/timer_gettime.c rename to ports/sysdeps/unix/sysv/linux/alpha/nptl/timer_gettime.c diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/timer_settime.c b/ports/sysdeps/unix/sysv/linux/alpha/nptl/timer_settime.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/nptl/timer_settime.c rename to ports/sysdeps/unix/sysv/linux/alpha/nptl/timer_settime.c diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/vfork.S b/ports/sysdeps/unix/sysv/linux/alpha/nptl/vfork.S similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/nptl/vfork.S rename to ports/sysdeps/unix/sysv/linux/alpha/nptl/vfork.S diff --git a/sysdeps/unix/sysv/linux/alpha/oldglob.c b/ports/sysdeps/unix/sysv/linux/alpha/oldglob.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/oldglob.c rename to ports/sysdeps/unix/sysv/linux/alpha/oldglob.c diff --git a/sysdeps/unix/sysv/linux/alpha/pipe.S b/ports/sysdeps/unix/sysv/linux/alpha/pipe.S similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/pipe.S rename to ports/sysdeps/unix/sysv/linux/alpha/pipe.S diff --git a/sysdeps/unix/sysv/linux/alpha/register-dump.h b/ports/sysdeps/unix/sysv/linux/alpha/register-dump.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/register-dump.h rename to ports/sysdeps/unix/sysv/linux/alpha/register-dump.h diff --git a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S b/ports/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/rt_sigaction.S rename to ports/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S diff --git a/sysdeps/unix/sysv/linux/alpha/semctl.c b/ports/sysdeps/unix/sysv/linux/alpha/semctl.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/semctl.c rename to ports/sysdeps/unix/sysv/linux/alpha/semctl.c diff --git a/sysdeps/unix/sysv/linux/alpha/setcontext.S b/ports/sysdeps/unix/sysv/linux/alpha/setcontext.S similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/setcontext.S rename to ports/sysdeps/unix/sysv/linux/alpha/setcontext.S diff --git a/sysdeps/unix/sysv/linux/alpha/setfpucw.c b/ports/sysdeps/unix/sysv/linux/alpha/setfpucw.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/setfpucw.c rename to ports/sysdeps/unix/sysv/linux/alpha/setfpucw.c diff --git a/sysdeps/unix/sysv/linux/alpha/shmctl.c b/ports/sysdeps/unix/sysv/linux/alpha/shmctl.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/shmctl.c rename to ports/sysdeps/unix/sysv/linux/alpha/shmctl.c diff --git a/sysdeps/unix/sysv/linux/alpha/sigaction.c b/ports/sysdeps/unix/sysv/linux/alpha/sigaction.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/sigaction.c rename to ports/sysdeps/unix/sysv/linux/alpha/sigaction.c diff --git a/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h b/ports/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h rename to ports/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h diff --git a/sysdeps/unix/sysv/linux/alpha/sigprocmask.c b/ports/sysdeps/unix/sysv/linux/alpha/sigprocmask.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/sigprocmask.c rename to ports/sysdeps/unix/sysv/linux/alpha/sigprocmask.c diff --git a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S b/ports/sysdeps/unix/sysv/linux/alpha/sigsuspend.S similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/sigsuspend.S rename to ports/sysdeps/unix/sysv/linux/alpha/sigsuspend.S diff --git a/sysdeps/unix/sysv/linux/alpha/sizes.h b/ports/sysdeps/unix/sysv/linux/alpha/sizes.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/sizes.h rename to ports/sysdeps/unix/sysv/linux/alpha/sizes.h diff --git a/sysdeps/unix/sysv/linux/alpha/statfs64.c b/ports/sysdeps/unix/sysv/linux/alpha/statfs64.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/statfs64.c rename to ports/sysdeps/unix/sysv/linux/alpha/statfs64.c diff --git a/sysdeps/unix/sysv/linux/alpha/statvfs.c b/ports/sysdeps/unix/sysv/linux/alpha/statvfs.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/statvfs.c rename to ports/sysdeps/unix/sysv/linux/alpha/statvfs.c diff --git a/sysdeps/unix/sysv/linux/alpha/statvfs64.c b/ports/sysdeps/unix/sysv/linux/alpha/statvfs64.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/statvfs64.c rename to ports/sysdeps/unix/sysv/linux/alpha/statvfs64.c diff --git a/sysdeps/unix/sysv/linux/alpha/swapcontext.S b/ports/sysdeps/unix/sysv/linux/alpha/swapcontext.S similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/swapcontext.S rename to ports/sysdeps/unix/sysv/linux/alpha/swapcontext.S diff --git a/sysdeps/unix/sysv/linux/alpha/sys/acct.h b/ports/sysdeps/unix/sysv/linux/alpha/sys/acct.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/sys/acct.h rename to ports/sysdeps/unix/sysv/linux/alpha/sys/acct.h diff --git a/sysdeps/unix/sysv/linux/alpha/sys/io.h b/ports/sysdeps/unix/sysv/linux/alpha/sys/io.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/sys/io.h rename to ports/sysdeps/unix/sysv/linux/alpha/sys/io.h diff --git a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h b/ports/sysdeps/unix/sysv/linux/alpha/sys/procfs.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/sys/procfs.h rename to ports/sysdeps/unix/sysv/linux/alpha/sys/procfs.h diff --git a/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h b/ports/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/sys/ucontext.h rename to ports/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h diff --git a/sysdeps/unix/sysv/linux/alpha/sys/user.h b/ports/sysdeps/unix/sysv/linux/alpha/sys/user.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/sys/user.h rename to ports/sysdeps/unix/sysv/linux/alpha/sys/user.h diff --git a/sysdeps/unix/sysv/linux/alpha/syscall.S b/ports/sysdeps/unix/sysv/linux/alpha/syscall.S similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/syscall.S rename to ports/sysdeps/unix/sysv/linux/alpha/syscall.S diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/ports/sysdeps/unix/sysv/linux/alpha/syscalls.list similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/syscalls.list rename to ports/sysdeps/unix/sysv/linux/alpha/syscalls.list diff --git a/sysdeps/unix/sysv/linux/alpha/sysconf.c b/ports/sysdeps/unix/sysv/linux/alpha/sysconf.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/sysconf.c rename to ports/sysdeps/unix/sysv/linux/alpha/sysconf.c diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/ports/sysdeps/unix/sysv/linux/alpha/sysdep.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/sysdep.h rename to ports/sysdeps/unix/sysv/linux/alpha/sysdep.h diff --git a/sysdeps/unix/sysv/linux/alpha/ucontext-offsets.sym b/ports/sysdeps/unix/sysv/linux/alpha/ucontext-offsets.sym similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/ucontext-offsets.sym rename to ports/sysdeps/unix/sysv/linux/alpha/ucontext-offsets.sym diff --git a/sysdeps/unix/sysv/linux/alpha/wordexp.c b/ports/sysdeps/unix/sysv/linux/alpha/wordexp.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/wordexp.c rename to ports/sysdeps/unix/sysv/linux/alpha/wordexp.c diff --git a/sysdeps/unix/sysv/linux/alpha/xstat.c b/ports/sysdeps/unix/sysv/linux/alpha/xstat.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/xstat.c rename to ports/sysdeps/unix/sysv/linux/alpha/xstat.c diff --git a/sysdeps/unix/sysv/linux/alpha/xstatconv.c b/ports/sysdeps/unix/sysv/linux/alpha/xstatconv.c similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/xstatconv.c rename to ports/sysdeps/unix/sysv/linux/alpha/xstatconv.c diff --git a/sysdeps/unix/sysv/linux/alpha/xstatconv.h b/ports/sysdeps/unix/sysv/linux/alpha/xstatconv.h similarity index 100% rename from sysdeps/unix/sysv/linux/alpha/xstatconv.h rename to ports/sysdeps/unix/sysv/linux/alpha/xstatconv.h diff --git a/sysdeps/unix/sysv/linux/am33/Makefile b/ports/sysdeps/unix/sysv/linux/am33/Makefile similarity index 100% rename from sysdeps/unix/sysv/linux/am33/Makefile rename to ports/sysdeps/unix/sysv/linux/am33/Makefile diff --git a/sysdeps/unix/sysv/linux/am33/bits/fcntl.h b/ports/sysdeps/unix/sysv/linux/am33/bits/fcntl.h similarity index 100% rename from sysdeps/unix/sysv/linux/am33/bits/fcntl.h rename to ports/sysdeps/unix/sysv/linux/am33/bits/fcntl.h diff --git a/sysdeps/unix/sysv/linux/am33/bits/mman.h b/ports/sysdeps/unix/sysv/linux/am33/bits/mman.h similarity index 100% rename from sysdeps/unix/sysv/linux/am33/bits/mman.h rename to ports/sysdeps/unix/sysv/linux/am33/bits/mman.h diff --git a/sysdeps/unix/sysv/linux/am33/brk.c b/ports/sysdeps/unix/sysv/linux/am33/brk.c similarity index 100% rename from sysdeps/unix/sysv/linux/am33/brk.c rename to ports/sysdeps/unix/sysv/linux/am33/brk.c diff --git a/sysdeps/unix/sysv/linux/am33/chown.c b/ports/sysdeps/unix/sysv/linux/am33/chown.c similarity index 100% rename from sysdeps/unix/sysv/linux/am33/chown.c rename to ports/sysdeps/unix/sysv/linux/am33/chown.c diff --git a/sysdeps/unix/sysv/linux/am33/clone.S b/ports/sysdeps/unix/sysv/linux/am33/clone.S similarity index 100% rename from sysdeps/unix/sysv/linux/am33/clone.S rename to ports/sysdeps/unix/sysv/linux/am33/clone.S diff --git a/sysdeps/unix/sysv/linux/am33/configure b/ports/sysdeps/unix/sysv/linux/am33/configure similarity index 100% rename from sysdeps/unix/sysv/linux/am33/configure rename to ports/sysdeps/unix/sysv/linux/am33/configure diff --git a/sysdeps/unix/sysv/linux/am33/configure.in b/ports/sysdeps/unix/sysv/linux/am33/configure.in similarity index 100% rename from sysdeps/unix/sysv/linux/am33/configure.in rename to ports/sysdeps/unix/sysv/linux/am33/configure.in diff --git a/sysdeps/unix/sysv/linux/am33/fchown.c b/ports/sysdeps/unix/sysv/linux/am33/fchown.c similarity index 100% rename from sysdeps/unix/sysv/linux/am33/fchown.c rename to ports/sysdeps/unix/sysv/linux/am33/fchown.c diff --git a/sysdeps/unix/sysv/linux/am33/fcntl.c b/ports/sysdeps/unix/sysv/linux/am33/fcntl.c similarity index 100% rename from sysdeps/unix/sysv/linux/am33/fcntl.c rename to ports/sysdeps/unix/sysv/linux/am33/fcntl.c diff --git a/sysdeps/unix/sysv/linux/am33/fxstat.c b/ports/sysdeps/unix/sysv/linux/am33/fxstat.c similarity index 100% rename from sysdeps/unix/sysv/linux/am33/fxstat.c rename to ports/sysdeps/unix/sysv/linux/am33/fxstat.c diff --git a/sysdeps/unix/sysv/linux/am33/getegid.c b/ports/sysdeps/unix/sysv/linux/am33/getegid.c similarity index 100% rename from sysdeps/unix/sysv/linux/am33/getegid.c rename to ports/sysdeps/unix/sysv/linux/am33/getegid.c diff --git a/sysdeps/unix/sysv/linux/am33/geteuid.c b/ports/sysdeps/unix/sysv/linux/am33/geteuid.c similarity index 100% rename from sysdeps/unix/sysv/linux/am33/geteuid.c rename to ports/sysdeps/unix/sysv/linux/am33/geteuid.c diff --git a/sysdeps/unix/sysv/linux/am33/getgid.c b/ports/sysdeps/unix/sysv/linux/am33/getgid.c similarity index 100% rename from sysdeps/unix/sysv/linux/am33/getgid.c rename to ports/sysdeps/unix/sysv/linux/am33/getgid.c diff --git a/sysdeps/unix/sysv/linux/am33/getgroups.c b/ports/sysdeps/unix/sysv/linux/am33/getgroups.c similarity index 100% rename from sysdeps/unix/sysv/linux/am33/getgroups.c rename to ports/sysdeps/unix/sysv/linux/am33/getgroups.c diff --git a/sysdeps/unix/sysv/linux/am33/getmsg.c b/ports/sysdeps/unix/sysv/linux/am33/getmsg.c similarity index 100% rename from sysdeps/unix/sysv/linux/am33/getmsg.c rename to ports/sysdeps/unix/sysv/linux/am33/getmsg.c diff --git a/sysdeps/unix/sysv/linux/am33/getresgid.c b/ports/sysdeps/unix/sysv/linux/am33/getresgid.c similarity index 100% rename from sysdeps/unix/sysv/linux/am33/getresgid.c rename to ports/sysdeps/unix/sysv/linux/am33/getresgid.c diff --git a/sysdeps/unix/sysv/linux/am33/getresuid.c b/ports/sysdeps/unix/sysv/linux/am33/getresuid.c similarity index 100% rename from sysdeps/unix/sysv/linux/am33/getresuid.c rename to ports/sysdeps/unix/sysv/linux/am33/getresuid.c diff --git a/sysdeps/unix/sysv/linux/am33/getrlimit.c b/ports/sysdeps/unix/sysv/linux/am33/getrlimit.c similarity index 100% rename from sysdeps/unix/sysv/linux/am33/getrlimit.c rename to ports/sysdeps/unix/sysv/linux/am33/getrlimit.c diff --git a/sysdeps/unix/sysv/linux/am33/getuid.c b/ports/sysdeps/unix/sysv/linux/am33/getuid.c similarity index 100% rename from sysdeps/unix/sysv/linux/am33/getuid.c rename to ports/sysdeps/unix/sysv/linux/am33/getuid.c diff --git a/sysdeps/unix/sysv/linux/am33/lchown.c b/ports/sysdeps/unix/sysv/linux/am33/lchown.c similarity index 100% rename from sysdeps/unix/sysv/linux/am33/lchown.c rename to ports/sysdeps/unix/sysv/linux/am33/lchown.c diff --git a/sysdeps/unix/sysv/linux/am33/linuxthreads/sysdep-cancel.h b/ports/sysdeps/unix/sysv/linux/am33/linuxthreads/sysdep-cancel.h similarity index 100% rename from sysdeps/unix/sysv/linux/am33/linuxthreads/sysdep-cancel.h rename to ports/sysdeps/unix/sysv/linux/am33/linuxthreads/sysdep-cancel.h diff --git a/sysdeps/unix/sysv/linux/am33/lockf64.c b/ports/sysdeps/unix/sysv/linux/am33/lockf64.c similarity index 100% rename from sysdeps/unix/sysv/linux/am33/lockf64.c rename to ports/sysdeps/unix/sysv/linux/am33/lockf64.c diff --git a/sysdeps/unix/sysv/linux/am33/lxstat.c b/ports/sysdeps/unix/sysv/linux/am33/lxstat.c similarity index 100% rename from sysdeps/unix/sysv/linux/am33/lxstat.c rename to ports/sysdeps/unix/sysv/linux/am33/lxstat.c diff --git a/sysdeps/unix/sysv/linux/am33/profil-counter.h b/ports/sysdeps/unix/sysv/linux/am33/profil-counter.h similarity index 100% rename from sysdeps/unix/sysv/linux/am33/profil-counter.h rename to ports/sysdeps/unix/sysv/linux/am33/profil-counter.h diff --git a/sysdeps/unix/sysv/linux/am33/putmsg.c b/ports/sysdeps/unix/sysv/linux/am33/putmsg.c similarity index 100% rename from sysdeps/unix/sysv/linux/am33/putmsg.c rename to ports/sysdeps/unix/sysv/linux/am33/putmsg.c diff --git a/sysdeps/unix/sysv/linux/am33/setegid.c b/ports/sysdeps/unix/sysv/linux/am33/setegid.c similarity index 100% rename from sysdeps/unix/sysv/linux/am33/setegid.c rename to ports/sysdeps/unix/sysv/linux/am33/setegid.c diff --git a/sysdeps/unix/sysv/linux/am33/seteuid.c b/ports/sysdeps/unix/sysv/linux/am33/seteuid.c similarity index 100% rename from sysdeps/unix/sysv/linux/am33/seteuid.c rename to ports/sysdeps/unix/sysv/linux/am33/seteuid.c diff --git a/sysdeps/unix/sysv/linux/am33/setfsgid.c b/ports/sysdeps/unix/sysv/linux/am33/setfsgid.c similarity index 100% rename from sysdeps/unix/sysv/linux/am33/setfsgid.c rename to ports/sysdeps/unix/sysv/linux/am33/setfsgid.c diff --git a/sysdeps/unix/sysv/linux/am33/setfsuid.c b/ports/sysdeps/unix/sysv/linux/am33/setfsuid.c similarity index 100% rename from sysdeps/unix/sysv/linux/am33/setfsuid.c rename to ports/sysdeps/unix/sysv/linux/am33/setfsuid.c diff --git a/sysdeps/unix/sysv/linux/am33/setgid.c b/ports/sysdeps/unix/sysv/linux/am33/setgid.c similarity index 100% rename from sysdeps/unix/sysv/linux/am33/setgid.c rename to ports/sysdeps/unix/sysv/linux/am33/setgid.c diff --git a/sysdeps/unix/sysv/linux/am33/setgroups.c b/ports/sysdeps/unix/sysv/linux/am33/setgroups.c similarity index 100% rename from sysdeps/unix/sysv/linux/am33/setgroups.c rename to ports/sysdeps/unix/sysv/linux/am33/setgroups.c diff --git a/sysdeps/unix/sysv/linux/am33/setregid.c b/ports/sysdeps/unix/sysv/linux/am33/setregid.c similarity index 100% rename from sysdeps/unix/sysv/linux/am33/setregid.c rename to ports/sysdeps/unix/sysv/linux/am33/setregid.c diff --git a/sysdeps/unix/sysv/linux/am33/setresgid.c b/ports/sysdeps/unix/sysv/linux/am33/setresgid.c similarity index 100% rename from sysdeps/unix/sysv/linux/am33/setresgid.c rename to ports/sysdeps/unix/sysv/linux/am33/setresgid.c diff --git a/sysdeps/unix/sysv/linux/am33/setresuid.c b/ports/sysdeps/unix/sysv/linux/am33/setresuid.c similarity index 100% rename from sysdeps/unix/sysv/linux/am33/setresuid.c rename to ports/sysdeps/unix/sysv/linux/am33/setresuid.c diff --git a/sysdeps/unix/sysv/linux/am33/setreuid.c b/ports/sysdeps/unix/sysv/linux/am33/setreuid.c similarity index 100% rename from sysdeps/unix/sysv/linux/am33/setreuid.c rename to ports/sysdeps/unix/sysv/linux/am33/setreuid.c diff --git a/sysdeps/unix/sysv/linux/am33/setrlimit.c b/ports/sysdeps/unix/sysv/linux/am33/setrlimit.c similarity index 100% rename from sysdeps/unix/sysv/linux/am33/setrlimit.c rename to ports/sysdeps/unix/sysv/linux/am33/setrlimit.c diff --git a/sysdeps/unix/sysv/linux/am33/setuid.c b/ports/sysdeps/unix/sysv/linux/am33/setuid.c similarity index 100% rename from sysdeps/unix/sysv/linux/am33/setuid.c rename to ports/sysdeps/unix/sysv/linux/am33/setuid.c diff --git a/sysdeps/unix/sysv/linux/am33/socket.S b/ports/sysdeps/unix/sysv/linux/am33/socket.S similarity index 100% rename from sysdeps/unix/sysv/linux/am33/socket.S rename to ports/sysdeps/unix/sysv/linux/am33/socket.S diff --git a/sysdeps/unix/sysv/linux/am33/syscall.S b/ports/sysdeps/unix/sysv/linux/am33/syscall.S similarity index 100% rename from sysdeps/unix/sysv/linux/am33/syscall.S rename to ports/sysdeps/unix/sysv/linux/am33/syscall.S diff --git a/sysdeps/unix/sysv/linux/am33/sysdep.S b/ports/sysdeps/unix/sysv/linux/am33/sysdep.S similarity index 100% rename from sysdeps/unix/sysv/linux/am33/sysdep.S rename to ports/sysdeps/unix/sysv/linux/am33/sysdep.S diff --git a/sysdeps/unix/sysv/linux/am33/sysdep.h b/ports/sysdeps/unix/sysv/linux/am33/sysdep.h similarity index 100% rename from sysdeps/unix/sysv/linux/am33/sysdep.h rename to ports/sysdeps/unix/sysv/linux/am33/sysdep.h diff --git a/sysdeps/unix/sysv/linux/am33/xstat.c b/ports/sysdeps/unix/sysv/linux/am33/xstat.c similarity index 100% rename from sysdeps/unix/sysv/linux/am33/xstat.c rename to ports/sysdeps/unix/sysv/linux/am33/xstat.c diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/ports/sysdeps/unix/sysv/linux/arm/Makefile similarity index 100% rename from sysdeps/unix/sysv/linux/arm/Makefile rename to ports/sysdeps/unix/sysv/linux/arm/Makefile diff --git a/sysdeps/unix/sysv/linux/arm/Versions b/ports/sysdeps/unix/sysv/linux/arm/Versions similarity index 100% rename from sysdeps/unix/sysv/linux/arm/Versions rename to ports/sysdeps/unix/sysv/linux/arm/Versions diff --git a/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S b/ports/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S similarity index 100% rename from sysdeps/unix/sysv/linux/arm/____longjmp_chk.S rename to ports/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S diff --git a/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S b/ports/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S similarity index 100% rename from sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S rename to ports/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S diff --git a/sysdeps/unix/sysv/linux/arm/alphasort64.c b/ports/sysdeps/unix/sysv/linux/arm/alphasort64.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/alphasort64.c rename to ports/sysdeps/unix/sysv/linux/arm/alphasort64.c diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h similarity index 100% rename from sysdeps/unix/sysv/linux/arm/bits/fcntl.h rename to ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h diff --git a/sysdeps/unix/sysv/linux/arm/bits/hwcap.h b/ports/sysdeps/unix/sysv/linux/arm/bits/hwcap.h similarity index 100% rename from sysdeps/unix/sysv/linux/arm/bits/hwcap.h rename to ports/sysdeps/unix/sysv/linux/arm/bits/hwcap.h diff --git a/sysdeps/unix/sysv/linux/arm/bits/mman.h b/ports/sysdeps/unix/sysv/linux/arm/bits/mman.h similarity index 100% rename from sysdeps/unix/sysv/linux/arm/bits/mman.h rename to ports/sysdeps/unix/sysv/linux/arm/bits/mman.h diff --git a/sysdeps/unix/sysv/linux/arm/bits/shm.h b/ports/sysdeps/unix/sysv/linux/arm/bits/shm.h similarity index 100% rename from sysdeps/unix/sysv/linux/arm/bits/shm.h rename to ports/sysdeps/unix/sysv/linux/arm/bits/shm.h diff --git a/sysdeps/unix/sysv/linux/arm/brk.c b/ports/sysdeps/unix/sysv/linux/arm/brk.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/brk.c rename to ports/sysdeps/unix/sysv/linux/arm/brk.c diff --git a/sysdeps/unix/sysv/linux/arm/clone.S b/ports/sysdeps/unix/sysv/linux/arm/clone.S similarity index 100% rename from sysdeps/unix/sysv/linux/arm/clone.S rename to ports/sysdeps/unix/sysv/linux/arm/clone.S diff --git a/sysdeps/unix/sysv/linux/arm/configure b/ports/sysdeps/unix/sysv/linux/arm/configure similarity index 100% rename from sysdeps/unix/sysv/linux/arm/configure rename to ports/sysdeps/unix/sysv/linux/arm/configure diff --git a/sysdeps/unix/sysv/linux/arm/configure.in b/ports/sysdeps/unix/sysv/linux/arm/configure.in similarity index 100% rename from sysdeps/unix/sysv/linux/arm/configure.in rename to ports/sysdeps/unix/sysv/linux/arm/configure.in diff --git a/sysdeps/unix/sysv/linux/arm/dl-procinfo.c b/ports/sysdeps/unix/sysv/linux/arm/dl-procinfo.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/dl-procinfo.c rename to ports/sysdeps/unix/sysv/linux/arm/dl-procinfo.c diff --git a/sysdeps/unix/sysv/linux/arm/dl-procinfo.h b/ports/sysdeps/unix/sysv/linux/arm/dl-procinfo.h similarity index 100% rename from sysdeps/unix/sysv/linux/arm/dl-procinfo.h rename to ports/sysdeps/unix/sysv/linux/arm/dl-procinfo.h diff --git a/sysdeps/unix/sysv/linux/arm/fchown.c b/ports/sysdeps/unix/sysv/linux/arm/fchown.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/fchown.c rename to ports/sysdeps/unix/sysv/linux/arm/fchown.c diff --git a/sysdeps/unix/sysv/linux/arm/fcntl.c b/ports/sysdeps/unix/sysv/linux/arm/fcntl.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/fcntl.c rename to ports/sysdeps/unix/sysv/linux/arm/fcntl.c diff --git a/sysdeps/unix/sysv/linux/arm/ftruncate64.c b/ports/sysdeps/unix/sysv/linux/arm/ftruncate64.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/ftruncate64.c rename to ports/sysdeps/unix/sysv/linux/arm/ftruncate64.c diff --git a/sysdeps/unix/sysv/linux/arm/fxstat.c b/ports/sysdeps/unix/sysv/linux/arm/fxstat.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/fxstat.c rename to ports/sysdeps/unix/sysv/linux/arm/fxstat.c diff --git a/sysdeps/unix/sysv/linux/arm/fxstatat.c b/ports/sysdeps/unix/sysv/linux/arm/fxstatat.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/fxstatat.c rename to ports/sysdeps/unix/sysv/linux/arm/fxstatat.c diff --git a/sysdeps/unix/sysv/linux/arm/getcontext.S b/ports/sysdeps/unix/sysv/linux/arm/getcontext.S similarity index 100% rename from sysdeps/unix/sysv/linux/arm/getcontext.S rename to ports/sysdeps/unix/sysv/linux/arm/getcontext.S diff --git a/sysdeps/unix/sysv/linux/arm/getdents64.c b/ports/sysdeps/unix/sysv/linux/arm/getdents64.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/getdents64.c rename to ports/sysdeps/unix/sysv/linux/arm/getdents64.c diff --git a/sysdeps/unix/sysv/linux/arm/getegid.c b/ports/sysdeps/unix/sysv/linux/arm/getegid.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/getegid.c rename to ports/sysdeps/unix/sysv/linux/arm/getegid.c diff --git a/sysdeps/unix/sysv/linux/arm/geteuid.c b/ports/sysdeps/unix/sysv/linux/arm/geteuid.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/geteuid.c rename to ports/sysdeps/unix/sysv/linux/arm/geteuid.c diff --git a/sysdeps/unix/sysv/linux/arm/getgid.c b/ports/sysdeps/unix/sysv/linux/arm/getgid.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/getgid.c rename to ports/sysdeps/unix/sysv/linux/arm/getgid.c diff --git a/sysdeps/unix/sysv/linux/arm/getgroups.c b/ports/sysdeps/unix/sysv/linux/arm/getgroups.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/getgroups.c rename to ports/sysdeps/unix/sysv/linux/arm/getgroups.c diff --git a/sysdeps/unix/sysv/linux/arm/getresgid.c b/ports/sysdeps/unix/sysv/linux/arm/getresgid.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/getresgid.c rename to ports/sysdeps/unix/sysv/linux/arm/getresgid.c diff --git a/sysdeps/unix/sysv/linux/arm/getresuid.c b/ports/sysdeps/unix/sysv/linux/arm/getresuid.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/getresuid.c rename to ports/sysdeps/unix/sysv/linux/arm/getresuid.c diff --git a/sysdeps/unix/sysv/linux/arm/getrlimit.c b/ports/sysdeps/unix/sysv/linux/arm/getrlimit.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/getrlimit.c rename to ports/sysdeps/unix/sysv/linux/arm/getrlimit.c diff --git a/sysdeps/unix/sysv/linux/arm/getrlimit64.c b/ports/sysdeps/unix/sysv/linux/arm/getrlimit64.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/getrlimit64.c rename to ports/sysdeps/unix/sysv/linux/arm/getrlimit64.c diff --git a/sysdeps/unix/sysv/linux/arm/getuid.c b/ports/sysdeps/unix/sysv/linux/arm/getuid.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/getuid.c rename to ports/sysdeps/unix/sysv/linux/arm/getuid.c diff --git a/sysdeps/unix/sysv/linux/arm/glob64.c b/ports/sysdeps/unix/sysv/linux/arm/glob64.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/glob64.c rename to ports/sysdeps/unix/sysv/linux/arm/glob64.c diff --git a/sysdeps/unix/sysv/linux/arm/internal_accept4.S b/ports/sysdeps/unix/sysv/linux/arm/internal_accept4.S similarity index 100% rename from sysdeps/unix/sysv/linux/arm/internal_accept4.S rename to ports/sysdeps/unix/sysv/linux/arm/internal_accept4.S diff --git a/sysdeps/unix/sysv/linux/arm/internal_recvmmsg.S b/ports/sysdeps/unix/sysv/linux/arm/internal_recvmmsg.S similarity index 100% rename from sysdeps/unix/sysv/linux/arm/internal_recvmmsg.S rename to ports/sysdeps/unix/sysv/linux/arm/internal_recvmmsg.S diff --git a/sysdeps/unix/sysv/linux/arm/internal_sendmmsg.S b/ports/sysdeps/unix/sysv/linux/arm/internal_sendmmsg.S similarity index 100% rename from sysdeps/unix/sysv/linux/arm/internal_sendmmsg.S rename to ports/sysdeps/unix/sysv/linux/arm/internal_sendmmsg.S diff --git a/sysdeps/unix/sysv/linux/arm/ioperm.c b/ports/sysdeps/unix/sysv/linux/arm/ioperm.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/ioperm.c rename to ports/sysdeps/unix/sysv/linux/arm/ioperm.c diff --git a/sysdeps/unix/sysv/linux/arm/kernel-features.h b/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h similarity index 100% rename from sysdeps/unix/sysv/linux/arm/kernel-features.h rename to ports/sysdeps/unix/sysv/linux/arm/kernel-features.h diff --git a/sysdeps/unix/sysv/linux/arm/lchown.c b/ports/sysdeps/unix/sysv/linux/arm/lchown.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/lchown.c rename to ports/sysdeps/unix/sysv/linux/arm/lchown.c diff --git a/sysdeps/unix/sysv/linux/arm/ldsodefs.h b/ports/sysdeps/unix/sysv/linux/arm/ldsodefs.h similarity index 100% rename from sysdeps/unix/sysv/linux/arm/ldsodefs.h rename to ports/sysdeps/unix/sysv/linux/arm/ldsodefs.h diff --git a/sysdeps/unix/sysv/linux/arm/libc-aeabi_read_tp.S b/ports/sysdeps/unix/sysv/linux/arm/libc-aeabi_read_tp.S similarity index 100% rename from sysdeps/unix/sysv/linux/arm/libc-aeabi_read_tp.S rename to ports/sysdeps/unix/sysv/linux/arm/libc-aeabi_read_tp.S diff --git a/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S b/ports/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S similarity index 100% rename from sysdeps/unix/sysv/linux/arm/libc-do-syscall.S rename to ports/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S diff --git a/sysdeps/unix/sysv/linux/arm/lockf64.c b/ports/sysdeps/unix/sysv/linux/arm/lockf64.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/lockf64.c rename to ports/sysdeps/unix/sysv/linux/arm/lockf64.c diff --git a/sysdeps/unix/sysv/linux/arm/lxstat.c b/ports/sysdeps/unix/sysv/linux/arm/lxstat.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/lxstat.c rename to ports/sysdeps/unix/sysv/linux/arm/lxstat.c diff --git a/sysdeps/unix/sysv/linux/arm/makecontext.c b/ports/sysdeps/unix/sysv/linux/arm/makecontext.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/makecontext.c rename to ports/sysdeps/unix/sysv/linux/arm/makecontext.c diff --git a/sysdeps/unix/sysv/linux/arm/mmap.S b/ports/sysdeps/unix/sysv/linux/arm/mmap.S similarity index 100% rename from sysdeps/unix/sysv/linux/arm/mmap.S rename to ports/sysdeps/unix/sysv/linux/arm/mmap.S diff --git a/sysdeps/unix/sysv/linux/arm/mmap64.S b/ports/sysdeps/unix/sysv/linux/arm/mmap64.S similarity index 100% rename from sysdeps/unix/sysv/linux/arm/mmap64.S rename to ports/sysdeps/unix/sysv/linux/arm/mmap64.S diff --git a/sysdeps/unix/sysv/linux/arm/msgctl.c b/ports/sysdeps/unix/sysv/linux/arm/msgctl.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/msgctl.c rename to ports/sysdeps/unix/sysv/linux/arm/msgctl.c diff --git a/sysdeps/unix/sysv/linux/arm/nptl/Makefile b/ports/sysdeps/unix/sysv/linux/arm/nptl/Makefile similarity index 100% rename from sysdeps/unix/sysv/linux/arm/nptl/Makefile rename to ports/sysdeps/unix/sysv/linux/arm/nptl/Makefile diff --git a/sysdeps/unix/sysv/linux/arm/nptl/Versions b/ports/sysdeps/unix/sysv/linux/arm/nptl/Versions similarity index 100% rename from sysdeps/unix/sysv/linux/arm/nptl/Versions rename to ports/sysdeps/unix/sysv/linux/arm/nptl/Versions diff --git a/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h b/ports/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h similarity index 100% rename from sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h rename to ports/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h diff --git a/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h b/ports/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h similarity index 100% rename from sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h rename to ports/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h diff --git a/sysdeps/unix/sysv/linux/arm/nptl/bits/semaphore.h b/ports/sysdeps/unix/sysv/linux/arm/nptl/bits/semaphore.h similarity index 100% rename from sysdeps/unix/sysv/linux/arm/nptl/bits/semaphore.h rename to ports/sysdeps/unix/sysv/linux/arm/nptl/bits/semaphore.h diff --git a/sysdeps/unix/sysv/linux/arm/nptl/clone.S b/ports/sysdeps/unix/sysv/linux/arm/nptl/clone.S similarity index 100% rename from sysdeps/unix/sysv/linux/arm/nptl/clone.S rename to ports/sysdeps/unix/sysv/linux/arm/nptl/clone.S diff --git a/sysdeps/unix/sysv/linux/arm/nptl/configure b/ports/sysdeps/unix/sysv/linux/arm/nptl/configure similarity index 100% rename from sysdeps/unix/sysv/linux/arm/nptl/configure rename to ports/sysdeps/unix/sysv/linux/arm/nptl/configure diff --git a/sysdeps/unix/sysv/linux/arm/nptl/configure.in b/ports/sysdeps/unix/sysv/linux/arm/nptl/configure.in similarity index 100% rename from sysdeps/unix/sysv/linux/arm/nptl/configure.in rename to ports/sysdeps/unix/sysv/linux/arm/nptl/configure.in diff --git a/sysdeps/unix/sysv/linux/arm/nptl/createthread.c b/ports/sysdeps/unix/sysv/linux/arm/nptl/createthread.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/nptl/createthread.c rename to ports/sysdeps/unix/sysv/linux/arm/nptl/createthread.c diff --git a/sysdeps/unix/sysv/linux/arm/nptl/fork.c b/ports/sysdeps/unix/sysv/linux/arm/nptl/fork.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/nptl/fork.c rename to ports/sysdeps/unix/sysv/linux/arm/nptl/fork.c diff --git a/sysdeps/unix/sysv/linux/arm/nptl/ld.abilist b/ports/sysdeps/unix/sysv/linux/arm/nptl/ld.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/arm/nptl/ld.abilist rename to ports/sysdeps/unix/sysv/linux/arm/nptl/ld.abilist diff --git a/sysdeps/unix/sysv/linux/arm/nptl/libBrokenLocale.abilist b/ports/sysdeps/unix/sysv/linux/arm/nptl/libBrokenLocale.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/arm/nptl/libBrokenLocale.abilist rename to ports/sysdeps/unix/sysv/linux/arm/nptl/libBrokenLocale.abilist diff --git a/sysdeps/unix/sysv/linux/arm/nptl/libanl.abilist b/ports/sysdeps/unix/sysv/linux/arm/nptl/libanl.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/arm/nptl/libanl.abilist rename to ports/sysdeps/unix/sysv/linux/arm/nptl/libanl.abilist diff --git a/sysdeps/unix/sysv/linux/arm/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/arm/nptl/libc.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/arm/nptl/libc.abilist rename to ports/sysdeps/unix/sysv/linux/arm/nptl/libc.abilist diff --git a/sysdeps/unix/sysv/linux/arm/nptl/libcrypt.abilist b/ports/sysdeps/unix/sysv/linux/arm/nptl/libcrypt.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/arm/nptl/libcrypt.abilist rename to ports/sysdeps/unix/sysv/linux/arm/nptl/libcrypt.abilist diff --git a/sysdeps/unix/sysv/linux/arm/nptl/libdl.abilist b/ports/sysdeps/unix/sysv/linux/arm/nptl/libdl.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/arm/nptl/libdl.abilist rename to ports/sysdeps/unix/sysv/linux/arm/nptl/libdl.abilist diff --git a/sysdeps/unix/sysv/linux/arm/nptl/libm.abilist b/ports/sysdeps/unix/sysv/linux/arm/nptl/libm.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/arm/nptl/libm.abilist rename to ports/sysdeps/unix/sysv/linux/arm/nptl/libm.abilist diff --git a/sysdeps/unix/sysv/linux/arm/nptl/libnsl.abilist b/ports/sysdeps/unix/sysv/linux/arm/nptl/libnsl.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/arm/nptl/libnsl.abilist rename to ports/sysdeps/unix/sysv/linux/arm/nptl/libnsl.abilist diff --git a/sysdeps/unix/sysv/linux/arm/nptl/libpthread.abilist b/ports/sysdeps/unix/sysv/linux/arm/nptl/libpthread.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/arm/nptl/libpthread.abilist rename to ports/sysdeps/unix/sysv/linux/arm/nptl/libpthread.abilist diff --git a/sysdeps/unix/sysv/linux/arm/nptl/libresolv.abilist b/ports/sysdeps/unix/sysv/linux/arm/nptl/libresolv.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/arm/nptl/libresolv.abilist rename to ports/sysdeps/unix/sysv/linux/arm/nptl/libresolv.abilist diff --git a/sysdeps/unix/sysv/linux/arm/nptl/librt.abilist b/ports/sysdeps/unix/sysv/linux/arm/nptl/librt.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/arm/nptl/librt.abilist rename to ports/sysdeps/unix/sysv/linux/arm/nptl/librt.abilist diff --git a/sysdeps/unix/sysv/linux/arm/nptl/libthread_db.abilist b/ports/sysdeps/unix/sysv/linux/arm/nptl/libthread_db.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/arm/nptl/libthread_db.abilist rename to ports/sysdeps/unix/sysv/linux/arm/nptl/libthread_db.abilist diff --git a/sysdeps/unix/sysv/linux/arm/nptl/libutil.abilist b/ports/sysdeps/unix/sysv/linux/arm/nptl/libutil.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/arm/nptl/libutil.abilist rename to ports/sysdeps/unix/sysv/linux/arm/nptl/libutil.abilist diff --git a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c b/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c rename to ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c diff --git a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h b/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h similarity index 100% rename from sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h rename to ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h diff --git a/sysdeps/unix/sysv/linux/arm/nptl/nptl-aeabi_unwind_cpp_pr1.c b/ports/sysdeps/unix/sysv/linux/arm/nptl/nptl-aeabi_unwind_cpp_pr1.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/nptl/nptl-aeabi_unwind_cpp_pr1.c rename to ports/sysdeps/unix/sysv/linux/arm/nptl/nptl-aeabi_unwind_cpp_pr1.c diff --git a/sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S b/ports/sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S similarity index 100% rename from sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S rename to ports/sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S diff --git a/sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c b/ports/sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c rename to ports/sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c diff --git a/sysdeps/unix/sysv/linux/arm/nptl/rt-aeabi_unwind_cpp_pr1.c b/ports/sysdeps/unix/sysv/linux/arm/nptl/rt-aeabi_unwind_cpp_pr1.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/nptl/rt-aeabi_unwind_cpp_pr1.c rename to ports/sysdeps/unix/sysv/linux/arm/nptl/rt-aeabi_unwind_cpp_pr1.c diff --git a/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h b/ports/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h similarity index 100% rename from sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h rename to ports/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h diff --git a/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c rename to ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c diff --git a/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c rename to ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c diff --git a/sysdeps/unix/sysv/linux/arm/nptl/unwind.h b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind.h similarity index 100% rename from sysdeps/unix/sysv/linux/arm/nptl/unwind.h rename to ports/sysdeps/unix/sysv/linux/arm/nptl/unwind.h diff --git a/sysdeps/unix/sysv/linux/arm/nptl/vfork.S b/ports/sysdeps/unix/sysv/linux/arm/nptl/vfork.S similarity index 100% rename from sysdeps/unix/sysv/linux/arm/nptl/vfork.S rename to ports/sysdeps/unix/sysv/linux/arm/nptl/vfork.S diff --git a/sysdeps/unix/sysv/linux/arm/oldgetrlimit.c b/ports/sysdeps/unix/sysv/linux/arm/oldgetrlimit.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/oldgetrlimit.c rename to ports/sysdeps/unix/sysv/linux/arm/oldgetrlimit.c diff --git a/sysdeps/unix/sysv/linux/arm/oldgetrlimit64.c b/ports/sysdeps/unix/sysv/linux/arm/oldgetrlimit64.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/oldgetrlimit64.c rename to ports/sysdeps/unix/sysv/linux/arm/oldgetrlimit64.c diff --git a/sysdeps/unix/sysv/linux/arm/oldsetrlimit.c b/ports/sysdeps/unix/sysv/linux/arm/oldsetrlimit.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/oldsetrlimit.c rename to ports/sysdeps/unix/sysv/linux/arm/oldsetrlimit.c diff --git a/sysdeps/unix/sysv/linux/arm/posix_fadvise.c b/ports/sysdeps/unix/sysv/linux/arm/posix_fadvise.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/posix_fadvise.c rename to ports/sysdeps/unix/sysv/linux/arm/posix_fadvise.c diff --git a/sysdeps/unix/sysv/linux/arm/posix_fadvise64.c b/ports/sysdeps/unix/sysv/linux/arm/posix_fadvise64.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/posix_fadvise64.c rename to ports/sysdeps/unix/sysv/linux/arm/posix_fadvise64.c diff --git a/sysdeps/unix/sysv/linux/arm/pread.c b/ports/sysdeps/unix/sysv/linux/arm/pread.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/pread.c rename to ports/sysdeps/unix/sysv/linux/arm/pread.c diff --git a/sysdeps/unix/sysv/linux/arm/pread64.c b/ports/sysdeps/unix/sysv/linux/arm/pread64.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/pread64.c rename to ports/sysdeps/unix/sysv/linux/arm/pread64.c diff --git a/sysdeps/unix/sysv/linux/arm/profil-counter.h b/ports/sysdeps/unix/sysv/linux/arm/profil-counter.h similarity index 100% rename from sysdeps/unix/sysv/linux/arm/profil-counter.h rename to ports/sysdeps/unix/sysv/linux/arm/profil-counter.h diff --git a/sysdeps/unix/sysv/linux/arm/pwrite.c b/ports/sysdeps/unix/sysv/linux/arm/pwrite.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/pwrite.c rename to ports/sysdeps/unix/sysv/linux/arm/pwrite.c diff --git a/sysdeps/unix/sysv/linux/arm/pwrite64.c b/ports/sysdeps/unix/sysv/linux/arm/pwrite64.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/pwrite64.c rename to ports/sysdeps/unix/sysv/linux/arm/pwrite64.c diff --git a/sysdeps/unix/sysv/linux/arm/readahead.c b/ports/sysdeps/unix/sysv/linux/arm/readahead.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/readahead.c rename to ports/sysdeps/unix/sysv/linux/arm/readahead.c diff --git a/sysdeps/unix/sysv/linux/arm/readdir64.c b/ports/sysdeps/unix/sysv/linux/arm/readdir64.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/readdir64.c rename to ports/sysdeps/unix/sysv/linux/arm/readdir64.c diff --git a/sysdeps/unix/sysv/linux/arm/readdir64_r.c b/ports/sysdeps/unix/sysv/linux/arm/readdir64_r.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/readdir64_r.c rename to ports/sysdeps/unix/sysv/linux/arm/readdir64_r.c diff --git a/sysdeps/unix/sysv/linux/arm/register-dump.h b/ports/sysdeps/unix/sysv/linux/arm/register-dump.h similarity index 100% rename from sysdeps/unix/sysv/linux/arm/register-dump.h rename to ports/sysdeps/unix/sysv/linux/arm/register-dump.h diff --git a/sysdeps/unix/sysv/linux/arm/scandir64.c b/ports/sysdeps/unix/sysv/linux/arm/scandir64.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/scandir64.c rename to ports/sysdeps/unix/sysv/linux/arm/scandir64.c diff --git a/sysdeps/unix/sysv/linux/arm/semctl.c b/ports/sysdeps/unix/sysv/linux/arm/semctl.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/semctl.c rename to ports/sysdeps/unix/sysv/linux/arm/semctl.c diff --git a/sysdeps/unix/sysv/linux/arm/setcontext.S b/ports/sysdeps/unix/sysv/linux/arm/setcontext.S similarity index 100% rename from sysdeps/unix/sysv/linux/arm/setcontext.S rename to ports/sysdeps/unix/sysv/linux/arm/setcontext.S diff --git a/sysdeps/unix/sysv/linux/arm/setegid.c b/ports/sysdeps/unix/sysv/linux/arm/setegid.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/setegid.c rename to ports/sysdeps/unix/sysv/linux/arm/setegid.c diff --git a/sysdeps/unix/sysv/linux/arm/seteuid.c b/ports/sysdeps/unix/sysv/linux/arm/seteuid.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/seteuid.c rename to ports/sysdeps/unix/sysv/linux/arm/seteuid.c diff --git a/sysdeps/unix/sysv/linux/arm/setfsgid.c b/ports/sysdeps/unix/sysv/linux/arm/setfsgid.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/setfsgid.c rename to ports/sysdeps/unix/sysv/linux/arm/setfsgid.c diff --git a/sysdeps/unix/sysv/linux/arm/setfsuid.c b/ports/sysdeps/unix/sysv/linux/arm/setfsuid.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/setfsuid.c rename to ports/sysdeps/unix/sysv/linux/arm/setfsuid.c diff --git a/sysdeps/unix/sysv/linux/arm/setgid.c b/ports/sysdeps/unix/sysv/linux/arm/setgid.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/setgid.c rename to ports/sysdeps/unix/sysv/linux/arm/setgid.c diff --git a/sysdeps/unix/sysv/linux/arm/setgroups.c b/ports/sysdeps/unix/sysv/linux/arm/setgroups.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/setgroups.c rename to ports/sysdeps/unix/sysv/linux/arm/setgroups.c diff --git a/sysdeps/unix/sysv/linux/arm/setregid.c b/ports/sysdeps/unix/sysv/linux/arm/setregid.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/setregid.c rename to ports/sysdeps/unix/sysv/linux/arm/setregid.c diff --git a/sysdeps/unix/sysv/linux/arm/setresgid.c b/ports/sysdeps/unix/sysv/linux/arm/setresgid.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/setresgid.c rename to ports/sysdeps/unix/sysv/linux/arm/setresgid.c diff --git a/sysdeps/unix/sysv/linux/arm/setresuid.c b/ports/sysdeps/unix/sysv/linux/arm/setresuid.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/setresuid.c rename to ports/sysdeps/unix/sysv/linux/arm/setresuid.c diff --git a/sysdeps/unix/sysv/linux/arm/setreuid.c b/ports/sysdeps/unix/sysv/linux/arm/setreuid.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/setreuid.c rename to ports/sysdeps/unix/sysv/linux/arm/setreuid.c diff --git a/sysdeps/unix/sysv/linux/arm/setrlimit.c b/ports/sysdeps/unix/sysv/linux/arm/setrlimit.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/setrlimit.c rename to ports/sysdeps/unix/sysv/linux/arm/setrlimit.c diff --git a/sysdeps/unix/sysv/linux/arm/setuid.c b/ports/sysdeps/unix/sysv/linux/arm/setuid.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/setuid.c rename to ports/sysdeps/unix/sysv/linux/arm/setuid.c diff --git a/sysdeps/unix/sysv/linux/arm/shmctl.c b/ports/sysdeps/unix/sysv/linux/arm/shmctl.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/shmctl.c rename to ports/sysdeps/unix/sysv/linux/arm/shmctl.c diff --git a/sysdeps/unix/sysv/linux/arm/sigaction.c b/ports/sysdeps/unix/sysv/linux/arm/sigaction.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/sigaction.c rename to ports/sysdeps/unix/sysv/linux/arm/sigaction.c diff --git a/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h b/ports/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h similarity index 100% rename from sysdeps/unix/sysv/linux/arm/sigcontextinfo.h rename to ports/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h diff --git a/sysdeps/unix/sysv/linux/arm/sigrestorer.S b/ports/sysdeps/unix/sysv/linux/arm/sigrestorer.S similarity index 100% rename from sysdeps/unix/sysv/linux/arm/sigrestorer.S rename to ports/sysdeps/unix/sysv/linux/arm/sigrestorer.S diff --git a/sysdeps/unix/sysv/linux/arm/swapcontext.S b/ports/sysdeps/unix/sysv/linux/arm/swapcontext.S similarity index 100% rename from sysdeps/unix/sysv/linux/arm/swapcontext.S rename to ports/sysdeps/unix/sysv/linux/arm/swapcontext.S diff --git a/sysdeps/unix/sysv/linux/arm/sys/elf.h b/ports/sysdeps/unix/sysv/linux/arm/sys/elf.h similarity index 100% rename from sysdeps/unix/sysv/linux/arm/sys/elf.h rename to ports/sysdeps/unix/sysv/linux/arm/sys/elf.h diff --git a/sysdeps/unix/sysv/linux/arm/sys/io.h b/ports/sysdeps/unix/sysv/linux/arm/sys/io.h similarity index 100% rename from sysdeps/unix/sysv/linux/arm/sys/io.h rename to ports/sysdeps/unix/sysv/linux/arm/sys/io.h diff --git a/sysdeps/unix/sysv/linux/arm/sys/procfs.h b/ports/sysdeps/unix/sysv/linux/arm/sys/procfs.h similarity index 100% rename from sysdeps/unix/sysv/linux/arm/sys/procfs.h rename to ports/sysdeps/unix/sysv/linux/arm/sys/procfs.h diff --git a/sysdeps/unix/sysv/linux/arm/sys/ucontext.h b/ports/sysdeps/unix/sysv/linux/arm/sys/ucontext.h similarity index 100% rename from sysdeps/unix/sysv/linux/arm/sys/ucontext.h rename to ports/sysdeps/unix/sysv/linux/arm/sys/ucontext.h diff --git a/sysdeps/unix/sysv/linux/arm/sys/user.h b/ports/sysdeps/unix/sysv/linux/arm/sys/user.h similarity index 100% rename from sysdeps/unix/sysv/linux/arm/sys/user.h rename to ports/sysdeps/unix/sysv/linux/arm/sys/user.h diff --git a/sysdeps/unix/sysv/linux/arm/syscall.S b/ports/sysdeps/unix/sysv/linux/arm/syscall.S similarity index 100% rename from sysdeps/unix/sysv/linux/arm/syscall.S rename to ports/sysdeps/unix/sysv/linux/arm/syscall.S diff --git a/sysdeps/unix/sysv/linux/arm/syscalls.list b/ports/sysdeps/unix/sysv/linux/arm/syscalls.list similarity index 100% rename from sysdeps/unix/sysv/linux/arm/syscalls.list rename to ports/sysdeps/unix/sysv/linux/arm/syscalls.list diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.S b/ports/sysdeps/unix/sysv/linux/arm/sysdep.S similarity index 100% rename from sysdeps/unix/sysv/linux/arm/sysdep.S rename to ports/sysdeps/unix/sysv/linux/arm/sysdep.S diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/ports/sysdeps/unix/sysv/linux/arm/sysdep.h similarity index 100% rename from sysdeps/unix/sysv/linux/arm/sysdep.h rename to ports/sysdeps/unix/sysv/linux/arm/sysdep.h diff --git a/sysdeps/unix/sysv/linux/arm/truncate64.c b/ports/sysdeps/unix/sysv/linux/arm/truncate64.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/truncate64.c rename to ports/sysdeps/unix/sysv/linux/arm/truncate64.c diff --git a/sysdeps/unix/sysv/linux/arm/ucontext_i.sym b/ports/sysdeps/unix/sysv/linux/arm/ucontext_i.sym similarity index 100% rename from sysdeps/unix/sysv/linux/arm/ucontext_i.sym rename to ports/sysdeps/unix/sysv/linux/arm/ucontext_i.sym diff --git a/sysdeps/unix/sysv/linux/arm/umount.c b/ports/sysdeps/unix/sysv/linux/arm/umount.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/umount.c rename to ports/sysdeps/unix/sysv/linux/arm/umount.c diff --git a/sysdeps/unix/sysv/linux/arm/versionsort64.c b/ports/sysdeps/unix/sysv/linux/arm/versionsort64.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/versionsort64.c rename to ports/sysdeps/unix/sysv/linux/arm/versionsort64.c diff --git a/sysdeps/unix/sysv/linux/arm/vfork.S b/ports/sysdeps/unix/sysv/linux/arm/vfork.S similarity index 100% rename from sysdeps/unix/sysv/linux/arm/vfork.S rename to ports/sysdeps/unix/sysv/linux/arm/vfork.S diff --git a/sysdeps/unix/sysv/linux/arm/xstat.c b/ports/sysdeps/unix/sysv/linux/arm/xstat.c similarity index 100% rename from sysdeps/unix/sysv/linux/arm/xstat.c rename to ports/sysdeps/unix/sysv/linux/arm/xstat.c diff --git a/sysdeps/unix/sysv/linux/generic/Makefile b/ports/sysdeps/unix/sysv/linux/generic/Makefile similarity index 100% rename from sysdeps/unix/sysv/linux/generic/Makefile rename to ports/sysdeps/unix/sysv/linux/generic/Makefile diff --git a/sysdeps/unix/sysv/linux/generic/____longjmp_chk.c b/ports/sysdeps/unix/sysv/linux/generic/____longjmp_chk.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/____longjmp_chk.c rename to ports/sysdeps/unix/sysv/linux/generic/____longjmp_chk.c diff --git a/sysdeps/unix/sysv/linux/generic/access.c b/ports/sysdeps/unix/sysv/linux/generic/access.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/access.c rename to ports/sysdeps/unix/sysv/linux/generic/access.c diff --git a/sysdeps/unix/sysv/linux/generic/bits/fcntl.h b/ports/sysdeps/unix/sysv/linux/generic/bits/fcntl.h similarity index 100% rename from sysdeps/unix/sysv/linux/generic/bits/fcntl.h rename to ports/sysdeps/unix/sysv/linux/generic/bits/fcntl.h diff --git a/sysdeps/unix/sysv/linux/generic/bits/msq.h b/ports/sysdeps/unix/sysv/linux/generic/bits/msq.h similarity index 100% rename from sysdeps/unix/sysv/linux/generic/bits/msq.h rename to ports/sysdeps/unix/sysv/linux/generic/bits/msq.h diff --git a/sysdeps/unix/sysv/linux/generic/bits/sem.h b/ports/sysdeps/unix/sysv/linux/generic/bits/sem.h similarity index 100% rename from sysdeps/unix/sysv/linux/generic/bits/sem.h rename to ports/sysdeps/unix/sysv/linux/generic/bits/sem.h diff --git a/sysdeps/unix/sysv/linux/generic/bits/shm.h b/ports/sysdeps/unix/sysv/linux/generic/bits/shm.h similarity index 100% rename from sysdeps/unix/sysv/linux/generic/bits/shm.h rename to ports/sysdeps/unix/sysv/linux/generic/bits/shm.h diff --git a/sysdeps/unix/sysv/linux/generic/bits/stat.h b/ports/sysdeps/unix/sysv/linux/generic/bits/stat.h similarity index 100% rename from sysdeps/unix/sysv/linux/generic/bits/stat.h rename to ports/sysdeps/unix/sysv/linux/generic/bits/stat.h diff --git a/sysdeps/unix/sysv/linux/generic/bits/statfs.h b/ports/sysdeps/unix/sysv/linux/generic/bits/statfs.h similarity index 100% rename from sysdeps/unix/sysv/linux/generic/bits/statfs.h rename to ports/sysdeps/unix/sysv/linux/generic/bits/statfs.h diff --git a/sysdeps/unix/sysv/linux/generic/bits/typesizes.h b/ports/sysdeps/unix/sysv/linux/generic/bits/typesizes.h similarity index 100% rename from sysdeps/unix/sysv/linux/generic/bits/typesizes.h rename to ports/sysdeps/unix/sysv/linux/generic/bits/typesizes.h diff --git a/sysdeps/unix/sysv/linux/generic/brk.c b/ports/sysdeps/unix/sysv/linux/generic/brk.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/brk.c rename to ports/sysdeps/unix/sysv/linux/generic/brk.c diff --git a/sysdeps/unix/sysv/linux/generic/chmod.c b/ports/sysdeps/unix/sysv/linux/generic/chmod.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/chmod.c rename to ports/sysdeps/unix/sysv/linux/generic/chmod.c diff --git a/sysdeps/unix/sysv/linux/generic/chown.c b/ports/sysdeps/unix/sysv/linux/generic/chown.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/chown.c rename to ports/sysdeps/unix/sysv/linux/generic/chown.c diff --git a/sysdeps/unix/sysv/linux/generic/creat.c b/ports/sysdeps/unix/sysv/linux/generic/creat.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/creat.c rename to ports/sysdeps/unix/sysv/linux/generic/creat.c diff --git a/sysdeps/unix/sysv/linux/generic/dl-origin.c b/ports/sysdeps/unix/sysv/linux/generic/dl-origin.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/dl-origin.c rename to ports/sysdeps/unix/sysv/linux/generic/dl-origin.c diff --git a/sysdeps/unix/sysv/linux/generic/dup2.c b/ports/sysdeps/unix/sysv/linux/generic/dup2.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/dup2.c rename to ports/sysdeps/unix/sysv/linux/generic/dup2.c diff --git a/sysdeps/unix/sysv/linux/generic/epoll_create.c b/ports/sysdeps/unix/sysv/linux/generic/epoll_create.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/epoll_create.c rename to ports/sysdeps/unix/sysv/linux/generic/epoll_create.c diff --git a/sysdeps/unix/sysv/linux/generic/epoll_wait.c b/ports/sysdeps/unix/sysv/linux/generic/epoll_wait.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/epoll_wait.c rename to ports/sysdeps/unix/sysv/linux/generic/epoll_wait.c diff --git a/sysdeps/unix/sysv/linux/generic/futimesat.c b/ports/sysdeps/unix/sysv/linux/generic/futimesat.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/futimesat.c rename to ports/sysdeps/unix/sysv/linux/generic/futimesat.c diff --git a/sysdeps/unix/sysv/linux/generic/getdents.c b/ports/sysdeps/unix/sysv/linux/generic/getdents.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/getdents.c rename to ports/sysdeps/unix/sysv/linux/generic/getdents.c diff --git a/sysdeps/unix/sysv/linux/generic/getdents64.c b/ports/sysdeps/unix/sysv/linux/generic/getdents64.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/getdents64.c rename to ports/sysdeps/unix/sysv/linux/generic/getdents64.c diff --git a/sysdeps/unix/sysv/linux/generic/inotify_init.c b/ports/sysdeps/unix/sysv/linux/generic/inotify_init.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/inotify_init.c rename to ports/sysdeps/unix/sysv/linux/generic/inotify_init.c diff --git a/sysdeps/unix/sysv/linux/generic/kernel_stat.h b/ports/sysdeps/unix/sysv/linux/generic/kernel_stat.h similarity index 100% rename from sysdeps/unix/sysv/linux/generic/kernel_stat.h rename to ports/sysdeps/unix/sysv/linux/generic/kernel_stat.h diff --git a/sysdeps/unix/sysv/linux/generic/lchown.c b/ports/sysdeps/unix/sysv/linux/generic/lchown.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/lchown.c rename to ports/sysdeps/unix/sysv/linux/generic/lchown.c diff --git a/sysdeps/unix/sysv/linux/generic/link.c b/ports/sysdeps/unix/sysv/linux/generic/link.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/link.c rename to ports/sysdeps/unix/sysv/linux/generic/link.c diff --git a/sysdeps/unix/sysv/linux/generic/lxstat.c b/ports/sysdeps/unix/sysv/linux/generic/lxstat.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/lxstat.c rename to ports/sysdeps/unix/sysv/linux/generic/lxstat.c diff --git a/sysdeps/unix/sysv/linux/generic/mkdir.c b/ports/sysdeps/unix/sysv/linux/generic/mkdir.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/mkdir.c rename to ports/sysdeps/unix/sysv/linux/generic/mkdir.c diff --git a/sysdeps/unix/sysv/linux/generic/not-cancel.h b/ports/sysdeps/unix/sysv/linux/generic/not-cancel.h similarity index 100% rename from sysdeps/unix/sysv/linux/generic/not-cancel.h rename to ports/sysdeps/unix/sysv/linux/generic/not-cancel.h diff --git a/sysdeps/unix/sysv/linux/generic/nptl/not-cancel.h b/ports/sysdeps/unix/sysv/linux/generic/nptl/not-cancel.h similarity index 100% rename from sysdeps/unix/sysv/linux/generic/nptl/not-cancel.h rename to ports/sysdeps/unix/sysv/linux/generic/nptl/not-cancel.h diff --git a/sysdeps/unix/sysv/linux/generic/open.c b/ports/sysdeps/unix/sysv/linux/generic/open.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/open.c rename to ports/sysdeps/unix/sysv/linux/generic/open.c diff --git a/sysdeps/unix/sysv/linux/generic/open64.c b/ports/sysdeps/unix/sysv/linux/generic/open64.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/open64.c rename to ports/sysdeps/unix/sysv/linux/generic/open64.c diff --git a/sysdeps/unix/sysv/linux/generic/pause.c b/ports/sysdeps/unix/sysv/linux/generic/pause.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/pause.c rename to ports/sysdeps/unix/sysv/linux/generic/pause.c diff --git a/sysdeps/unix/sysv/linux/generic/pipe.c b/ports/sysdeps/unix/sysv/linux/generic/pipe.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/pipe.c rename to ports/sysdeps/unix/sysv/linux/generic/pipe.c diff --git a/sysdeps/unix/sysv/linux/generic/poll.c b/ports/sysdeps/unix/sysv/linux/generic/poll.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/poll.c rename to ports/sysdeps/unix/sysv/linux/generic/poll.c diff --git a/sysdeps/unix/sysv/linux/generic/readlink.c b/ports/sysdeps/unix/sysv/linux/generic/readlink.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/readlink.c rename to ports/sysdeps/unix/sysv/linux/generic/readlink.c diff --git a/sysdeps/unix/sysv/linux/generic/readlink_chk.c b/ports/sysdeps/unix/sysv/linux/generic/readlink_chk.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/readlink_chk.c rename to ports/sysdeps/unix/sysv/linux/generic/readlink_chk.c diff --git a/sysdeps/unix/sysv/linux/generic/recv.c b/ports/sysdeps/unix/sysv/linux/generic/recv.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/recv.c rename to ports/sysdeps/unix/sysv/linux/generic/recv.c diff --git a/sysdeps/unix/sysv/linux/generic/rename.c b/ports/sysdeps/unix/sysv/linux/generic/rename.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/rename.c rename to ports/sysdeps/unix/sysv/linux/generic/rename.c diff --git a/sysdeps/unix/sysv/linux/generic/rmdir.c b/ports/sysdeps/unix/sysv/linux/generic/rmdir.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/rmdir.c rename to ports/sysdeps/unix/sysv/linux/generic/rmdir.c diff --git a/sysdeps/unix/sysv/linux/generic/select.c b/ports/sysdeps/unix/sysv/linux/generic/select.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/select.c rename to ports/sysdeps/unix/sysv/linux/generic/select.c diff --git a/sysdeps/unix/sysv/linux/generic/send.c b/ports/sysdeps/unix/sysv/linux/generic/send.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/send.c rename to ports/sysdeps/unix/sysv/linux/generic/send.c diff --git a/sysdeps/unix/sysv/linux/generic/symlink.c b/ports/sysdeps/unix/sysv/linux/generic/symlink.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/symlink.c rename to ports/sysdeps/unix/sysv/linux/generic/symlink.c diff --git a/sysdeps/unix/sysv/linux/generic/syscalls.list b/ports/sysdeps/unix/sysv/linux/generic/syscalls.list similarity index 100% rename from sysdeps/unix/sysv/linux/generic/syscalls.list rename to ports/sysdeps/unix/sysv/linux/generic/syscalls.list diff --git a/sysdeps/unix/sysv/linux/generic/sysctl.c b/ports/sysdeps/unix/sysv/linux/generic/sysctl.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/sysctl.c rename to ports/sysdeps/unix/sysv/linux/generic/sysctl.c diff --git a/sysdeps/unix/sysv/linux/generic/sysdep.h b/ports/sysdeps/unix/sysv/linux/generic/sysdep.h similarity index 100% rename from sysdeps/unix/sysv/linux/generic/sysdep.h rename to ports/sysdeps/unix/sysv/linux/generic/sysdep.h diff --git a/sysdeps/unix/sysv/linux/generic/umount.c b/ports/sysdeps/unix/sysv/linux/generic/umount.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/umount.c rename to ports/sysdeps/unix/sysv/linux/generic/umount.c diff --git a/sysdeps/unix/sysv/linux/generic/unlink.c b/ports/sysdeps/unix/sysv/linux/generic/unlink.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/unlink.c rename to ports/sysdeps/unix/sysv/linux/generic/unlink.c diff --git a/sysdeps/unix/sysv/linux/generic/ustat.c b/ports/sysdeps/unix/sysv/linux/generic/ustat.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/ustat.c rename to ports/sysdeps/unix/sysv/linux/generic/ustat.c diff --git a/sysdeps/unix/sysv/linux/generic/utimes.c b/ports/sysdeps/unix/sysv/linux/generic/utimes.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/utimes.c rename to ports/sysdeps/unix/sysv/linux/generic/utimes.c diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/Versions b/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/Versions similarity index 100% rename from sysdeps/unix/sysv/linux/generic/wordsize-32/Versions rename to ports/sysdeps/unix/sysv/linux/generic/wordsize-32/Versions diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/fcntl.c b/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/fcntl.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/wordsize-32/fcntl.c rename to ports/sysdeps/unix/sysv/linux/generic/wordsize-32/fcntl.c diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/fstatfs.c b/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/fstatfs.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/wordsize-32/fstatfs.c rename to ports/sysdeps/unix/sysv/linux/generic/wordsize-32/fstatfs.c diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/ftruncate.c b/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/ftruncate.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/wordsize-32/ftruncate.c rename to ports/sysdeps/unix/sysv/linux/generic/wordsize-32/ftruncate.c diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/ftruncate64.c b/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/ftruncate64.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/wordsize-32/ftruncate64.c rename to ports/sysdeps/unix/sysv/linux/generic/wordsize-32/ftruncate64.c diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstat.c b/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstat.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/wordsize-32/fxstat.c rename to ports/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstat.c diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstatat.c b/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstatat.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/wordsize-32/fxstatat.c rename to ports/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstatat.c diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/getdents.c b/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/getdents.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/wordsize-32/getdents.c rename to ports/sysdeps/unix/sysv/linux/generic/wordsize-32/getdents.c diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/llseek.c b/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/llseek.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/wordsize-32/llseek.c rename to ports/sysdeps/unix/sysv/linux/generic/wordsize-32/llseek.c diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/lseek.c b/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/lseek.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/wordsize-32/lseek.c rename to ports/sysdeps/unix/sysv/linux/generic/wordsize-32/lseek.c diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat.c b/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat.c rename to ports/sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat.c diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat64.c b/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat64.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat64.c rename to ports/sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat64.c diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/mmap.c b/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/mmap.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/wordsize-32/mmap.c rename to ports/sysdeps/unix/sysv/linux/generic/wordsize-32/mmap.c diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/overflow.h b/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/overflow.h similarity index 100% rename from sysdeps/unix/sysv/linux/generic/wordsize-32/overflow.h rename to ports/sysdeps/unix/sysv/linux/generic/wordsize-32/overflow.h diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/posix_fadvise.c b/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/posix_fadvise.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/wordsize-32/posix_fadvise.c rename to ports/sysdeps/unix/sysv/linux/generic/wordsize-32/posix_fadvise.c diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/pread.c b/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/pread.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/wordsize-32/pread.c rename to ports/sysdeps/unix/sysv/linux/generic/wordsize-32/pread.c diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/pread64.c b/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/pread64.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/wordsize-32/pread64.c rename to ports/sysdeps/unix/sysv/linux/generic/wordsize-32/pread64.c diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/preadv.c b/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/preadv.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/wordsize-32/preadv.c rename to ports/sysdeps/unix/sysv/linux/generic/wordsize-32/preadv.c diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/preadv64.c b/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/preadv64.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/wordsize-32/preadv64.c rename to ports/sysdeps/unix/sysv/linux/generic/wordsize-32/preadv64.c diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite.c b/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite.c rename to ports/sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite.c diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite64.c b/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite64.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite64.c rename to ports/sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite64.c diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/pwritev.c b/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/pwritev.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/wordsize-32/pwritev.c rename to ports/sysdeps/unix/sysv/linux/generic/wordsize-32/pwritev.c diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/pwritev64.c b/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/pwritev64.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/wordsize-32/pwritev64.c rename to ports/sysdeps/unix/sysv/linux/generic/wordsize-32/pwritev64.c diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/sendfile.c b/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/sendfile.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/wordsize-32/sendfile.c rename to ports/sysdeps/unix/sysv/linux/generic/wordsize-32/sendfile.c diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/statfs.c b/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/statfs.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/wordsize-32/statfs.c rename to ports/sysdeps/unix/sysv/linux/generic/wordsize-32/statfs.c diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/syscalls.list b/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/syscalls.list similarity index 100% rename from sysdeps/unix/sysv/linux/generic/wordsize-32/syscalls.list rename to ports/sysdeps/unix/sysv/linux/generic/wordsize-32/syscalls.list diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/truncate.c b/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/truncate.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/wordsize-32/truncate.c rename to ports/sysdeps/unix/sysv/linux/generic/wordsize-32/truncate.c diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/truncate64.c b/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/truncate64.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/wordsize-32/truncate64.c rename to ports/sysdeps/unix/sysv/linux/generic/wordsize-32/truncate64.c diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/xstat.c b/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/xstat.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/wordsize-32/xstat.c rename to ports/sysdeps/unix/sysv/linux/generic/wordsize-32/xstat.c diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/xstat64.c b/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/xstat64.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/wordsize-32/xstat64.c rename to ports/sysdeps/unix/sysv/linux/generic/wordsize-32/xstat64.c diff --git a/sysdeps/unix/sysv/linux/generic/xmknod.c b/ports/sysdeps/unix/sysv/linux/generic/xmknod.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/xmknod.c rename to ports/sysdeps/unix/sysv/linux/generic/xmknod.c diff --git a/sysdeps/unix/sysv/linux/generic/xstat.c b/ports/sysdeps/unix/sysv/linux/generic/xstat.c similarity index 100% rename from sysdeps/unix/sysv/linux/generic/xstat.c rename to ports/sysdeps/unix/sysv/linux/generic/xstat.c diff --git a/sysdeps/unix/sysv/linux/hppa/Makefile b/ports/sysdeps/unix/sysv/linux/hppa/Makefile similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/Makefile rename to ports/sysdeps/unix/sysv/linux/hppa/Makefile diff --git a/sysdeps/unix/sysv/linux/hppa/Versions b/ports/sysdeps/unix/sysv/linux/hppa/Versions similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/Versions rename to ports/sysdeps/unix/sysv/linux/hppa/Versions diff --git a/sysdeps/unix/sysv/linux/hppa/bits/atomic.h b/ports/sysdeps/unix/sysv/linux/hppa/bits/atomic.h similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/bits/atomic.h rename to ports/sysdeps/unix/sysv/linux/hppa/bits/atomic.h diff --git a/sysdeps/unix/sysv/linux/hppa/bits/errno.h b/ports/sysdeps/unix/sysv/linux/hppa/bits/errno.h similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/bits/errno.h rename to ports/sysdeps/unix/sysv/linux/hppa/bits/errno.h diff --git a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h b/ports/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/bits/fcntl.h rename to ports/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h diff --git a/sysdeps/unix/sysv/linux/hppa/bits/ioctls.h b/ports/sysdeps/unix/sysv/linux/hppa/bits/ioctls.h similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/bits/ioctls.h rename to ports/sysdeps/unix/sysv/linux/hppa/bits/ioctls.h diff --git a/sysdeps/unix/sysv/linux/hppa/bits/ipc.h b/ports/sysdeps/unix/sysv/linux/hppa/bits/ipc.h similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/bits/ipc.h rename to ports/sysdeps/unix/sysv/linux/hppa/bits/ipc.h diff --git a/sysdeps/unix/sysv/linux/hppa/bits/mman.h b/ports/sysdeps/unix/sysv/linux/hppa/bits/mman.h similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/bits/mman.h rename to ports/sysdeps/unix/sysv/linux/hppa/bits/mman.h diff --git a/sysdeps/unix/sysv/linux/hppa/bits/msq.h b/ports/sysdeps/unix/sysv/linux/hppa/bits/msq.h similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/bits/msq.h rename to ports/sysdeps/unix/sysv/linux/hppa/bits/msq.h diff --git a/sysdeps/unix/sysv/linux/hppa/bits/sem.h b/ports/sysdeps/unix/sysv/linux/hppa/bits/sem.h similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/bits/sem.h rename to ports/sysdeps/unix/sysv/linux/hppa/bits/sem.h diff --git a/sysdeps/unix/sysv/linux/hppa/bits/shm.h b/ports/sysdeps/unix/sysv/linux/hppa/bits/shm.h similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/bits/shm.h rename to ports/sysdeps/unix/sysv/linux/hppa/bits/shm.h diff --git a/sysdeps/unix/sysv/linux/hppa/bits/sigaction.h b/ports/sysdeps/unix/sysv/linux/hppa/bits/sigaction.h similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/bits/sigaction.h rename to ports/sysdeps/unix/sysv/linux/hppa/bits/sigaction.h diff --git a/sysdeps/unix/sysv/linux/hppa/bits/signum.h b/ports/sysdeps/unix/sysv/linux/hppa/bits/signum.h similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/bits/signum.h rename to ports/sysdeps/unix/sysv/linux/hppa/bits/signum.h diff --git a/sysdeps/unix/sysv/linux/hppa/bits/socket.h b/ports/sysdeps/unix/sysv/linux/hppa/bits/socket.h similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/bits/socket.h rename to ports/sysdeps/unix/sysv/linux/hppa/bits/socket.h diff --git a/sysdeps/unix/sysv/linux/hppa/brk.c b/ports/sysdeps/unix/sysv/linux/hppa/brk.c similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/brk.c rename to ports/sysdeps/unix/sysv/linux/hppa/brk.c diff --git a/sysdeps/unix/sysv/linux/hppa/clone.S b/ports/sysdeps/unix/sysv/linux/hppa/clone.S similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/clone.S rename to ports/sysdeps/unix/sysv/linux/hppa/clone.S diff --git a/sysdeps/unix/sysv/linux/hppa/fcntl.c b/ports/sysdeps/unix/sysv/linux/hppa/fcntl.c similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/fcntl.c rename to ports/sysdeps/unix/sysv/linux/hppa/fcntl.c diff --git a/sysdeps/unix/sysv/linux/hppa/fxstat.c b/ports/sysdeps/unix/sysv/linux/hppa/fxstat.c similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/fxstat.c rename to ports/sysdeps/unix/sysv/linux/hppa/fxstat.c diff --git a/sysdeps/unix/sysv/linux/hppa/fxstatat.c b/ports/sysdeps/unix/sysv/linux/hppa/fxstatat.c similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/fxstatat.c rename to ports/sysdeps/unix/sysv/linux/hppa/fxstatat.c diff --git a/sysdeps/unix/sysv/linux/hppa/getcontext.S b/ports/sysdeps/unix/sysv/linux/hppa/getcontext.S similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/getcontext.S rename to ports/sysdeps/unix/sysv/linux/hppa/getcontext.S diff --git a/sysdeps/unix/sysv/linux/hppa/getdents64.c b/ports/sysdeps/unix/sysv/linux/hppa/getdents64.c similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/getdents64.c rename to ports/sysdeps/unix/sysv/linux/hppa/getdents64.c diff --git a/sysdeps/unix/sysv/linux/hppa/getrlimit64.c b/ports/sysdeps/unix/sysv/linux/hppa/getrlimit64.c similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/getrlimit64.c rename to ports/sysdeps/unix/sysv/linux/hppa/getrlimit64.c diff --git a/sysdeps/unix/sysv/linux/hppa/internaltypes.h b/ports/sysdeps/unix/sysv/linux/hppa/internaltypes.h similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/internaltypes.h rename to ports/sysdeps/unix/sysv/linux/hppa/internaltypes.h diff --git a/sysdeps/unix/sysv/linux/hppa/kernel-features.h b/ports/sysdeps/unix/sysv/linux/hppa/kernel-features.h similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/kernel-features.h rename to ports/sysdeps/unix/sysv/linux/hppa/kernel-features.h diff --git a/sysdeps/unix/sysv/linux/hppa/kernel_sigaction.h b/ports/sysdeps/unix/sysv/linux/hppa/kernel_sigaction.h similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/kernel_sigaction.h rename to ports/sysdeps/unix/sysv/linux/hppa/kernel_sigaction.h diff --git a/sysdeps/unix/sysv/linux/hppa/kernel_stat.h b/ports/sysdeps/unix/sysv/linux/hppa/kernel_stat.h similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/kernel_stat.h rename to ports/sysdeps/unix/sysv/linux/hppa/kernel_stat.h diff --git a/sysdeps/unix/sysv/linux/hppa/lxstat.c b/ports/sysdeps/unix/sysv/linux/hppa/lxstat.c similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/lxstat.c rename to ports/sysdeps/unix/sysv/linux/hppa/lxstat.c diff --git a/sysdeps/unix/sysv/linux/hppa/makecontext.c b/ports/sysdeps/unix/sysv/linux/hppa/makecontext.c similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/makecontext.c rename to ports/sysdeps/unix/sysv/linux/hppa/makecontext.c diff --git a/sysdeps/unix/sysv/linux/hppa/mmap.c b/ports/sysdeps/unix/sysv/linux/hppa/mmap.c similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/mmap.c rename to ports/sysdeps/unix/sysv/linux/hppa/mmap.c diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h b/ports/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h rename to ports/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h b/ports/sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h rename to ports/sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/clone.S b/ports/sysdeps/unix/sysv/linux/hppa/nptl/clone.S similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/nptl/clone.S rename to ports/sysdeps/unix/sysv/linux/hppa/nptl/clone.S diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/configure b/ports/sysdeps/unix/sysv/linux/hppa/nptl/configure similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/nptl/configure rename to ports/sysdeps/unix/sysv/linux/hppa/nptl/configure diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/configure.in b/ports/sysdeps/unix/sysv/linux/hppa/nptl/configure.in similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/nptl/configure.in rename to ports/sysdeps/unix/sysv/linux/hppa/nptl/configure.in diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/createthread.c b/ports/sysdeps/unix/sysv/linux/hppa/nptl/createthread.c similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/nptl/createthread.c rename to ports/sysdeps/unix/sysv/linux/hppa/nptl/createthread.c diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/fork.c b/ports/sysdeps/unix/sysv/linux/hppa/nptl/fork.c similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/nptl/fork.c rename to ports/sysdeps/unix/sysv/linux/hppa/nptl/fork.c diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/libc-lowlevellock.c b/ports/sysdeps/unix/sysv/linux/hppa/nptl/libc-lowlevellock.c similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/nptl/libc-lowlevellock.c rename to ports/sysdeps/unix/sysv/linux/hppa/nptl/libc-lowlevellock.c diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c b/ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c rename to ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h b/ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h rename to ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pt-initfini.c b/ports/sysdeps/unix/sysv/linux/hppa/nptl/pt-initfini.c similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/nptl/pt-initfini.c rename to ports/sysdeps/unix/sysv/linux/hppa/nptl/pt-initfini.c diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S b/ports/sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S rename to ports/sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pthread.h b/ports/sysdeps/unix/sysv/linux/hppa/nptl/pthread.h similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/nptl/pthread.h rename to ports/sysdeps/unix/sysv/linux/hppa/nptl/pthread.h diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pthreadP.h b/ports/sysdeps/unix/sysv/linux/hppa/nptl/pthreadP.h similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/nptl/pthreadP.h rename to ports/sysdeps/unix/sysv/linux/hppa/nptl/pthreadP.h diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_broadcast.c b/ports/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_broadcast.c similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_broadcast.c rename to ports/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_broadcast.c diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_destroy.c b/ports/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_destroy.c similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_destroy.c rename to ports/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_destroy.c diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_init.c b/ports/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_init.c similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_init.c rename to ports/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_init.c diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_signal.c b/ports/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_signal.c similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_signal.c rename to ports/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_signal.c diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_timedwait.c b/ports/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_timedwait.c similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_timedwait.c rename to ports/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_timedwait.c diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_wait.c b/ports/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_wait.c similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_wait.c rename to ports/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_wait.c diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pthread_once.c b/ports/sysdeps/unix/sysv/linux/hppa/nptl/pthread_once.c similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/nptl/pthread_once.c rename to ports/sysdeps/unix/sysv/linux/hppa/nptl/pthread_once.c diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h b/ports/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h rename to ports/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h diff --git a/sysdeps/unix/sysv/linux/hppa/profil-counter.h b/ports/sysdeps/unix/sysv/linux/hppa/profil-counter.h similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/profil-counter.h rename to ports/sysdeps/unix/sysv/linux/hppa/profil-counter.h diff --git a/sysdeps/unix/sysv/linux/hppa/setcontext.S b/ports/sysdeps/unix/sysv/linux/hppa/setcontext.S similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/setcontext.S rename to ports/sysdeps/unix/sysv/linux/hppa/setcontext.S diff --git a/sysdeps/unix/sysv/linux/hppa/socket.S b/ports/sysdeps/unix/sysv/linux/hppa/socket.S similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/socket.S rename to ports/sysdeps/unix/sysv/linux/hppa/socket.S diff --git a/sysdeps/unix/sysv/linux/hppa/swapcontext.c b/ports/sysdeps/unix/sysv/linux/hppa/swapcontext.c similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/swapcontext.c rename to ports/sysdeps/unix/sysv/linux/hppa/swapcontext.c diff --git a/sysdeps/unix/sysv/linux/hppa/sys/epoll.h b/ports/sysdeps/unix/sysv/linux/hppa/sys/epoll.h similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/sys/epoll.h rename to ports/sysdeps/unix/sysv/linux/hppa/sys/epoll.h diff --git a/sysdeps/unix/sysv/linux/hppa/sys/eventfd.h b/ports/sysdeps/unix/sysv/linux/hppa/sys/eventfd.h similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/sys/eventfd.h rename to ports/sysdeps/unix/sysv/linux/hppa/sys/eventfd.h diff --git a/sysdeps/unix/sysv/linux/hppa/sys/inotify.h b/ports/sysdeps/unix/sysv/linux/hppa/sys/inotify.h similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/sys/inotify.h rename to ports/sysdeps/unix/sysv/linux/hppa/sys/inotify.h diff --git a/sysdeps/unix/sysv/linux/hppa/sys/procfs.h b/ports/sysdeps/unix/sysv/linux/hppa/sys/procfs.h similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/sys/procfs.h rename to ports/sysdeps/unix/sysv/linux/hppa/sys/procfs.h diff --git a/sysdeps/unix/sysv/linux/hppa/sys/signalfd.h b/ports/sysdeps/unix/sysv/linux/hppa/sys/signalfd.h similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/sys/signalfd.h rename to ports/sysdeps/unix/sysv/linux/hppa/sys/signalfd.h diff --git a/sysdeps/unix/sysv/linux/hppa/sys/timerfd.h b/ports/sysdeps/unix/sysv/linux/hppa/sys/timerfd.h similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/sys/timerfd.h rename to ports/sysdeps/unix/sysv/linux/hppa/sys/timerfd.h diff --git a/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h b/ports/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/sys/ucontext.h rename to ports/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h diff --git a/sysdeps/unix/sysv/linux/hppa/sys/user.h b/ports/sysdeps/unix/sysv/linux/hppa/sys/user.h similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/sys/user.h rename to ports/sysdeps/unix/sysv/linux/hppa/sys/user.h diff --git a/sysdeps/unix/sysv/linux/hppa/syscall.S b/ports/sysdeps/unix/sysv/linux/hppa/syscall.S similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/syscall.S rename to ports/sysdeps/unix/sysv/linux/hppa/syscall.S diff --git a/sysdeps/unix/sysv/linux/hppa/syscalls.list b/ports/sysdeps/unix/sysv/linux/hppa/syscalls.list similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/syscalls.list rename to ports/sysdeps/unix/sysv/linux/hppa/syscalls.list diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.c b/ports/sysdeps/unix/sysv/linux/hppa/sysdep.c similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/sysdep.c rename to ports/sysdeps/unix/sysv/linux/hppa/sysdep.c diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.h b/ports/sysdeps/unix/sysv/linux/hppa/sysdep.h similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/sysdep.h rename to ports/sysdeps/unix/sysv/linux/hppa/sysdep.h diff --git a/sysdeps/unix/sysv/linux/hppa/ucontext_i.sym b/ports/sysdeps/unix/sysv/linux/hppa/ucontext_i.sym similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/ucontext_i.sym rename to ports/sysdeps/unix/sysv/linux/hppa/ucontext_i.sym diff --git a/sysdeps/unix/sysv/linux/hppa/umount.c b/ports/sysdeps/unix/sysv/linux/hppa/umount.c similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/umount.c rename to ports/sysdeps/unix/sysv/linux/hppa/umount.c diff --git a/sysdeps/unix/sysv/linux/hppa/xstat.c b/ports/sysdeps/unix/sysv/linux/hppa/xstat.c similarity index 100% rename from sysdeps/unix/sysv/linux/hppa/xstat.c rename to ports/sysdeps/unix/sysv/linux/hppa/xstat.c diff --git a/sysdeps/unix/sysv/linux/ia64/Implies b/ports/sysdeps/unix/sysv/linux/ia64/Implies similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/Implies rename to ports/sysdeps/unix/sysv/linux/ia64/Implies diff --git a/sysdeps/unix/sysv/linux/ia64/Makefile b/ports/sysdeps/unix/sysv/linux/ia64/Makefile similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/Makefile rename to ports/sysdeps/unix/sysv/linux/ia64/Makefile diff --git a/sysdeps/unix/sysv/linux/ia64/Versions b/ports/sysdeps/unix/sysv/linux/ia64/Versions similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/Versions rename to ports/sysdeps/unix/sysv/linux/ia64/Versions diff --git a/sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S b/ports/sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S rename to ports/sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S diff --git a/sysdeps/unix/sysv/linux/ia64/__longjmp.S b/ports/sysdeps/unix/sysv/linux/ia64/__longjmp.S similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/__longjmp.S rename to ports/sysdeps/unix/sysv/linux/ia64/__longjmp.S diff --git a/sysdeps/unix/sysv/linux/ia64/__start_context.S b/ports/sysdeps/unix/sysv/linux/ia64/__start_context.S similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/__start_context.S rename to ports/sysdeps/unix/sysv/linux/ia64/__start_context.S diff --git a/sysdeps/unix/sysv/linux/ia64/bits/endian.h b/ports/sysdeps/unix/sysv/linux/ia64/bits/endian.h similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/bits/endian.h rename to ports/sysdeps/unix/sysv/linux/ia64/bits/endian.h diff --git a/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h b/ports/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/bits/fcntl.h rename to ports/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h diff --git a/sysdeps/unix/sysv/linux/ia64/bits/ipc.h b/ports/sysdeps/unix/sysv/linux/ia64/bits/ipc.h similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/bits/ipc.h rename to ports/sysdeps/unix/sysv/linux/ia64/bits/ipc.h diff --git a/sysdeps/unix/sysv/linux/ia64/bits/mman.h b/ports/sysdeps/unix/sysv/linux/ia64/bits/mman.h similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/bits/mman.h rename to ports/sysdeps/unix/sysv/linux/ia64/bits/mman.h diff --git a/sysdeps/unix/sysv/linux/ia64/bits/msq.h b/ports/sysdeps/unix/sysv/linux/ia64/bits/msq.h similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/bits/msq.h rename to ports/sysdeps/unix/sysv/linux/ia64/bits/msq.h diff --git a/sysdeps/unix/sysv/linux/ia64/bits/sem.h b/ports/sysdeps/unix/sysv/linux/ia64/bits/sem.h similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/bits/sem.h rename to ports/sysdeps/unix/sysv/linux/ia64/bits/sem.h diff --git a/sysdeps/unix/sysv/linux/ia64/bits/setjmp.h b/ports/sysdeps/unix/sysv/linux/ia64/bits/setjmp.h similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/bits/setjmp.h rename to ports/sysdeps/unix/sysv/linux/ia64/bits/setjmp.h diff --git a/sysdeps/unix/sysv/linux/ia64/bits/shm.h b/ports/sysdeps/unix/sysv/linux/ia64/bits/shm.h similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/bits/shm.h rename to ports/sysdeps/unix/sysv/linux/ia64/bits/shm.h diff --git a/sysdeps/unix/sysv/linux/ia64/bits/sigaction.h b/ports/sysdeps/unix/sysv/linux/ia64/bits/sigaction.h similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/bits/sigaction.h rename to ports/sysdeps/unix/sysv/linux/ia64/bits/sigaction.h diff --git a/sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h b/ports/sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h rename to ports/sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h diff --git a/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h b/ports/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/bits/siginfo.h rename to ports/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h diff --git a/sysdeps/unix/sysv/linux/ia64/bits/sigstack.h b/ports/sysdeps/unix/sysv/linux/ia64/bits/sigstack.h similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/bits/sigstack.h rename to ports/sysdeps/unix/sysv/linux/ia64/bits/sigstack.h diff --git a/sysdeps/unix/sysv/linux/ia64/bits/stat.h b/ports/sysdeps/unix/sysv/linux/ia64/bits/stat.h similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/bits/stat.h rename to ports/sysdeps/unix/sysv/linux/ia64/bits/stat.h diff --git a/sysdeps/unix/sysv/linux/ia64/brk.S b/ports/sysdeps/unix/sysv/linux/ia64/brk.S similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/brk.S rename to ports/sysdeps/unix/sysv/linux/ia64/brk.S diff --git a/sysdeps/unix/sysv/linux/ia64/bsd-_setjmp.S b/ports/sysdeps/unix/sysv/linux/ia64/bsd-_setjmp.S similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/bsd-_setjmp.S rename to ports/sysdeps/unix/sysv/linux/ia64/bsd-_setjmp.S diff --git a/sysdeps/unix/sysv/linux/ia64/bsd-setjmp.S b/ports/sysdeps/unix/sysv/linux/ia64/bsd-setjmp.S similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/bsd-setjmp.S rename to ports/sysdeps/unix/sysv/linux/ia64/bsd-setjmp.S diff --git a/sysdeps/unix/sysv/linux/ia64/clock_getcpuclockid.c b/ports/sysdeps/unix/sysv/linux/ia64/clock_getcpuclockid.c similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/clock_getcpuclockid.c rename to ports/sysdeps/unix/sysv/linux/ia64/clock_getcpuclockid.c diff --git a/sysdeps/unix/sysv/linux/ia64/clone.S b/ports/sysdeps/unix/sysv/linux/ia64/clone.S similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/clone.S rename to ports/sysdeps/unix/sysv/linux/ia64/clone.S diff --git a/sysdeps/unix/sysv/linux/ia64/clone2.S b/ports/sysdeps/unix/sysv/linux/ia64/clone2.S similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/clone2.S rename to ports/sysdeps/unix/sysv/linux/ia64/clone2.S diff --git a/sysdeps/unix/sysv/linux/ia64/configure b/ports/sysdeps/unix/sysv/linux/ia64/configure similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/configure rename to ports/sysdeps/unix/sysv/linux/ia64/configure diff --git a/sysdeps/unix/sysv/linux/ia64/configure.in b/ports/sysdeps/unix/sysv/linux/ia64/configure.in similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/configure.in rename to ports/sysdeps/unix/sysv/linux/ia64/configure.in diff --git a/sysdeps/unix/sysv/linux/ia64/dl-brk.S b/ports/sysdeps/unix/sysv/linux/ia64/dl-brk.S similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/dl-brk.S rename to ports/sysdeps/unix/sysv/linux/ia64/dl-brk.S diff --git a/sysdeps/unix/sysv/linux/ia64/dl-cache.h b/ports/sysdeps/unix/sysv/linux/ia64/dl-cache.h similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/dl-cache.h rename to ports/sysdeps/unix/sysv/linux/ia64/dl-cache.h diff --git a/sysdeps/unix/sysv/linux/ia64/dl-static.c b/ports/sysdeps/unix/sysv/linux/ia64/dl-static.c similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/dl-static.c rename to ports/sysdeps/unix/sysv/linux/ia64/dl-static.c diff --git a/sysdeps/unix/sysv/linux/ia64/fork.S b/ports/sysdeps/unix/sysv/linux/ia64/fork.S similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/fork.S rename to ports/sysdeps/unix/sysv/linux/ia64/fork.S diff --git a/sysdeps/unix/sysv/linux/ia64/get_clockfreq.c b/ports/sysdeps/unix/sysv/linux/ia64/get_clockfreq.c similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/get_clockfreq.c rename to ports/sysdeps/unix/sysv/linux/ia64/get_clockfreq.c diff --git a/sysdeps/unix/sysv/linux/ia64/getclktck.c b/ports/sysdeps/unix/sysv/linux/ia64/getclktck.c similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/getclktck.c rename to ports/sysdeps/unix/sysv/linux/ia64/getclktck.c diff --git a/sysdeps/unix/sysv/linux/ia64/getcontext.S b/ports/sysdeps/unix/sysv/linux/ia64/getcontext.S similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/getcontext.S rename to ports/sysdeps/unix/sysv/linux/ia64/getcontext.S diff --git a/sysdeps/unix/sysv/linux/ia64/getpagesize.c b/ports/sysdeps/unix/sysv/linux/ia64/getpagesize.c similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/getpagesize.c rename to ports/sysdeps/unix/sysv/linux/ia64/getpagesize.c diff --git a/sysdeps/unix/sysv/linux/ia64/has_cpuclock.c b/ports/sysdeps/unix/sysv/linux/ia64/has_cpuclock.c similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/has_cpuclock.c rename to ports/sysdeps/unix/sysv/linux/ia64/has_cpuclock.c diff --git a/sysdeps/unix/sysv/linux/ia64/ioperm.c b/ports/sysdeps/unix/sysv/linux/ia64/ioperm.c similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/ioperm.c rename to ports/sysdeps/unix/sysv/linux/ia64/ioperm.c diff --git a/sysdeps/unix/sysv/linux/ia64/kernel-features.h b/ports/sysdeps/unix/sysv/linux/ia64/kernel-features.h similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/kernel-features.h rename to ports/sysdeps/unix/sysv/linux/ia64/kernel-features.h diff --git a/sysdeps/unix/sysv/linux/ia64/kernel_stat.h b/ports/sysdeps/unix/sysv/linux/ia64/kernel_stat.h similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/kernel_stat.h rename to ports/sysdeps/unix/sysv/linux/ia64/kernel_stat.h diff --git a/sysdeps/unix/sysv/linux/ia64/ldconfig.h b/ports/sysdeps/unix/sysv/linux/ia64/ldconfig.h similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/ldconfig.h rename to ports/sysdeps/unix/sysv/linux/ia64/ldconfig.h diff --git a/sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed b/ports/sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed rename to ports/sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed diff --git a/sysdeps/unix/sysv/linux/ia64/ldsodefs.h b/ports/sysdeps/unix/sysv/linux/ia64/ldsodefs.h similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/ldsodefs.h rename to ports/sysdeps/unix/sysv/linux/ia64/ldsodefs.h diff --git a/sysdeps/unix/sysv/linux/ia64/makecontext.c b/ports/sysdeps/unix/sysv/linux/ia64/makecontext.c similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/makecontext.c rename to ports/sysdeps/unix/sysv/linux/ia64/makecontext.c diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/Makefile b/ports/sysdeps/unix/sysv/linux/ia64/nptl/Makefile similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/nptl/Makefile rename to ports/sysdeps/unix/sysv/linux/ia64/nptl/Makefile diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/Versions b/ports/sysdeps/unix/sysv/linux/ia64/nptl/Versions similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/nptl/Versions rename to ports/sysdeps/unix/sysv/linux/ia64/nptl/Versions diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/__ia64_longjmp.S b/ports/sysdeps/unix/sysv/linux/ia64/nptl/__ia64_longjmp.S similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/nptl/__ia64_longjmp.S rename to ports/sysdeps/unix/sysv/linux/ia64/nptl/__ia64_longjmp.S diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/__sigstack_longjmp.c b/ports/sysdeps/unix/sysv/linux/ia64/nptl/__sigstack_longjmp.c similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/nptl/__sigstack_longjmp.c rename to ports/sysdeps/unix/sysv/linux/ia64/nptl/__sigstack_longjmp.c diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/bits/local_lim.h b/ports/sysdeps/unix/sysv/linux/ia64/nptl/bits/local_lim.h similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/nptl/bits/local_lim.h rename to ports/sysdeps/unix/sysv/linux/ia64/nptl/bits/local_lim.h diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/bits/pthreadtypes.h b/ports/sysdeps/unix/sysv/linux/ia64/nptl/bits/pthreadtypes.h similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/nptl/bits/pthreadtypes.h rename to ports/sysdeps/unix/sysv/linux/ia64/nptl/bits/pthreadtypes.h diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/bits/semaphore.h b/ports/sysdeps/unix/sysv/linux/ia64/nptl/bits/semaphore.h similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/nptl/bits/semaphore.h rename to ports/sysdeps/unix/sysv/linux/ia64/nptl/bits/semaphore.h diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/clone2.S b/ports/sysdeps/unix/sysv/linux/ia64/nptl/clone2.S similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/nptl/clone2.S rename to ports/sysdeps/unix/sysv/linux/ia64/nptl/clone2.S diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/createthread.c b/ports/sysdeps/unix/sysv/linux/ia64/nptl/createthread.c similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/nptl/createthread.c rename to ports/sysdeps/unix/sysv/linux/ia64/nptl/createthread.c diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/dl-sysdep.h b/ports/sysdeps/unix/sysv/linux/ia64/nptl/dl-sysdep.h similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/nptl/dl-sysdep.h rename to ports/sysdeps/unix/sysv/linux/ia64/nptl/dl-sysdep.h diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/fork.c b/ports/sysdeps/unix/sysv/linux/ia64/nptl/fork.c similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/nptl/fork.c rename to ports/sysdeps/unix/sysv/linux/ia64/nptl/fork.c diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/ld.abilist b/ports/sysdeps/unix/sysv/linux/ia64/nptl/ld.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/nptl/ld.abilist rename to ports/sysdeps/unix/sysv/linux/ia64/nptl/ld.abilist diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/libBrokenLocale.abilist b/ports/sysdeps/unix/sysv/linux/ia64/nptl/libBrokenLocale.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/nptl/libBrokenLocale.abilist rename to ports/sysdeps/unix/sysv/linux/ia64/nptl/libBrokenLocale.abilist diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/libanl.abilist b/ports/sysdeps/unix/sysv/linux/ia64/nptl/libanl.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/nptl/libanl.abilist rename to ports/sysdeps/unix/sysv/linux/ia64/nptl/libanl.abilist diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist rename to ports/sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/libcrypt.abilist b/ports/sysdeps/unix/sysv/linux/ia64/nptl/libcrypt.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/nptl/libcrypt.abilist rename to ports/sysdeps/unix/sysv/linux/ia64/nptl/libcrypt.abilist diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/libdl.abilist b/ports/sysdeps/unix/sysv/linux/ia64/nptl/libdl.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/nptl/libdl.abilist rename to ports/sysdeps/unix/sysv/linux/ia64/nptl/libdl.abilist diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/libm.abilist b/ports/sysdeps/unix/sysv/linux/ia64/nptl/libm.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/nptl/libm.abilist rename to ports/sysdeps/unix/sysv/linux/ia64/nptl/libm.abilist diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/libnsl.abilist b/ports/sysdeps/unix/sysv/linux/ia64/nptl/libnsl.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/nptl/libnsl.abilist rename to ports/sysdeps/unix/sysv/linux/ia64/nptl/libnsl.abilist diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/libpthread.abilist b/ports/sysdeps/unix/sysv/linux/ia64/nptl/libpthread.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/nptl/libpthread.abilist rename to ports/sysdeps/unix/sysv/linux/ia64/nptl/libpthread.abilist diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/libresolv.abilist b/ports/sysdeps/unix/sysv/linux/ia64/nptl/libresolv.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/nptl/libresolv.abilist rename to ports/sysdeps/unix/sysv/linux/ia64/nptl/libresolv.abilist diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/librt.abilist b/ports/sysdeps/unix/sysv/linux/ia64/nptl/librt.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/nptl/librt.abilist rename to ports/sysdeps/unix/sysv/linux/ia64/nptl/librt.abilist diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/libthread_db.abilist b/ports/sysdeps/unix/sysv/linux/ia64/nptl/libthread_db.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/nptl/libthread_db.abilist rename to ports/sysdeps/unix/sysv/linux/ia64/nptl/libthread_db.abilist diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/libutil.abilist b/ports/sysdeps/unix/sysv/linux/ia64/nptl/libutil.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/nptl/libutil.abilist rename to ports/sysdeps/unix/sysv/linux/ia64/nptl/libutil.abilist diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/lowlevellock.h b/ports/sysdeps/unix/sysv/linux/ia64/nptl/lowlevellock.h similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/nptl/lowlevellock.h rename to ports/sysdeps/unix/sysv/linux/ia64/nptl/lowlevellock.h diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/pt-vfork.S b/ports/sysdeps/unix/sysv/linux/ia64/nptl/pt-vfork.S similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/nptl/pt-vfork.S rename to ports/sysdeps/unix/sysv/linux/ia64/nptl/pt-vfork.S diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/pthread_once.c b/ports/sysdeps/unix/sysv/linux/ia64/nptl/pthread_once.c similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/nptl/pthread_once.c rename to ports/sysdeps/unix/sysv/linux/ia64/nptl/pthread_once.c diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/sysdep-cancel.h b/ports/sysdeps/unix/sysv/linux/ia64/nptl/sysdep-cancel.h similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/nptl/sysdep-cancel.h rename to ports/sysdeps/unix/sysv/linux/ia64/nptl/sysdep-cancel.h diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/timer_create.c b/ports/sysdeps/unix/sysv/linux/ia64/nptl/timer_create.c similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/nptl/timer_create.c rename to ports/sysdeps/unix/sysv/linux/ia64/nptl/timer_create.c diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/timer_delete.c b/ports/sysdeps/unix/sysv/linux/ia64/nptl/timer_delete.c similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/nptl/timer_delete.c rename to ports/sysdeps/unix/sysv/linux/ia64/nptl/timer_delete.c diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/timer_getoverr.c b/ports/sysdeps/unix/sysv/linux/ia64/nptl/timer_getoverr.c similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/nptl/timer_getoverr.c rename to ports/sysdeps/unix/sysv/linux/ia64/nptl/timer_getoverr.c diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/timer_gettime.c b/ports/sysdeps/unix/sysv/linux/ia64/nptl/timer_gettime.c similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/nptl/timer_gettime.c rename to ports/sysdeps/unix/sysv/linux/ia64/nptl/timer_gettime.c diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/timer_settime.c b/ports/sysdeps/unix/sysv/linux/ia64/nptl/timer_settime.c similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/nptl/timer_settime.c rename to ports/sysdeps/unix/sysv/linux/ia64/nptl/timer_settime.c diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/unwind-forcedunwind.c b/ports/sysdeps/unix/sysv/linux/ia64/nptl/unwind-forcedunwind.c similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/nptl/unwind-forcedunwind.c rename to ports/sysdeps/unix/sysv/linux/ia64/nptl/unwind-forcedunwind.c diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/unwind_longjmp.c b/ports/sysdeps/unix/sysv/linux/ia64/nptl/unwind_longjmp.c similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/nptl/unwind_longjmp.c rename to ports/sysdeps/unix/sysv/linux/ia64/nptl/unwind_longjmp.c diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/vfork.S b/ports/sysdeps/unix/sysv/linux/ia64/nptl/vfork.S similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/nptl/vfork.S rename to ports/sysdeps/unix/sysv/linux/ia64/nptl/vfork.S diff --git a/sysdeps/unix/sysv/linux/ia64/pipe.S b/ports/sysdeps/unix/sysv/linux/ia64/pipe.S similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/pipe.S rename to ports/sysdeps/unix/sysv/linux/ia64/pipe.S diff --git a/sysdeps/unix/sysv/linux/ia64/profil-counter.h b/ports/sysdeps/unix/sysv/linux/ia64/profil-counter.h similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/profil-counter.h rename to ports/sysdeps/unix/sysv/linux/ia64/profil-counter.h diff --git a/sysdeps/unix/sysv/linux/ia64/readelflib.c b/ports/sysdeps/unix/sysv/linux/ia64/readelflib.c similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/readelflib.c rename to ports/sysdeps/unix/sysv/linux/ia64/readelflib.c diff --git a/sysdeps/unix/sysv/linux/ia64/register-dump.h b/ports/sysdeps/unix/sysv/linux/ia64/register-dump.h similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/register-dump.h rename to ports/sysdeps/unix/sysv/linux/ia64/register-dump.h diff --git a/sysdeps/unix/sysv/linux/ia64/rt-sysdep.S b/ports/sysdeps/unix/sysv/linux/ia64/rt-sysdep.S similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/rt-sysdep.S rename to ports/sysdeps/unix/sysv/linux/ia64/rt-sysdep.S diff --git a/sysdeps/unix/sysv/linux/ia64/setcontext.S b/ports/sysdeps/unix/sysv/linux/ia64/setcontext.S similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/setcontext.S rename to ports/sysdeps/unix/sysv/linux/ia64/setcontext.S diff --git a/sysdeps/unix/sysv/linux/ia64/setjmp.S b/ports/sysdeps/unix/sysv/linux/ia64/setjmp.S similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/setjmp.S rename to ports/sysdeps/unix/sysv/linux/ia64/setjmp.S diff --git a/sysdeps/unix/sysv/linux/ia64/sigaction.c b/ports/sysdeps/unix/sysv/linux/ia64/sigaction.c similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/sigaction.c rename to ports/sysdeps/unix/sysv/linux/ia64/sigaction.c diff --git a/sysdeps/unix/sysv/linux/ia64/sigcontext-offsets.sym b/ports/sysdeps/unix/sysv/linux/ia64/sigcontext-offsets.sym similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/sigcontext-offsets.sym rename to ports/sysdeps/unix/sysv/linux/ia64/sigcontext-offsets.sym diff --git a/sysdeps/unix/sysv/linux/ia64/sigcontextinfo.h b/ports/sysdeps/unix/sysv/linux/ia64/sigcontextinfo.h similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/sigcontextinfo.h rename to ports/sysdeps/unix/sysv/linux/ia64/sigcontextinfo.h diff --git a/sysdeps/unix/sysv/linux/ia64/sigpending.c b/ports/sysdeps/unix/sysv/linux/ia64/sigpending.c similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/sigpending.c rename to ports/sysdeps/unix/sysv/linux/ia64/sigpending.c diff --git a/sysdeps/unix/sysv/linux/ia64/sigprocmask.c b/ports/sysdeps/unix/sysv/linux/ia64/sigprocmask.c similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/sigprocmask.c rename to ports/sysdeps/unix/sysv/linux/ia64/sigprocmask.c diff --git a/sysdeps/unix/sysv/linux/ia64/swapcontext.c b/ports/sysdeps/unix/sysv/linux/ia64/swapcontext.c similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/swapcontext.c rename to ports/sysdeps/unix/sysv/linux/ia64/swapcontext.c diff --git a/sysdeps/unix/sysv/linux/ia64/sys/io.h b/ports/sysdeps/unix/sysv/linux/ia64/sys/io.h similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/sys/io.h rename to ports/sysdeps/unix/sysv/linux/ia64/sys/io.h diff --git a/sysdeps/unix/sysv/linux/ia64/sys/procfs.h b/ports/sysdeps/unix/sysv/linux/ia64/sys/procfs.h similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/sys/procfs.h rename to ports/sysdeps/unix/sysv/linux/ia64/sys/procfs.h diff --git a/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h b/ports/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/sys/ptrace.h rename to ports/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h diff --git a/sysdeps/unix/sysv/linux/ia64/sys/rse.h b/ports/sysdeps/unix/sysv/linux/ia64/sys/rse.h similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/sys/rse.h rename to ports/sysdeps/unix/sysv/linux/ia64/sys/rse.h diff --git a/sysdeps/unix/sysv/linux/ia64/sys/ucontext.h b/ports/sysdeps/unix/sysv/linux/ia64/sys/ucontext.h similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/sys/ucontext.h rename to ports/sysdeps/unix/sysv/linux/ia64/sys/ucontext.h diff --git a/sysdeps/unix/sysv/linux/ia64/sys/user.h b/ports/sysdeps/unix/sysv/linux/ia64/sys/user.h similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/sys/user.h rename to ports/sysdeps/unix/sysv/linux/ia64/sys/user.h diff --git a/sysdeps/unix/sysv/linux/ia64/syscall.S b/ports/sysdeps/unix/sysv/linux/ia64/syscall.S similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/syscall.S rename to ports/sysdeps/unix/sysv/linux/ia64/syscall.S diff --git a/sysdeps/unix/sysv/linux/ia64/syscalls.list b/ports/sysdeps/unix/sysv/linux/ia64/syscalls.list similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/syscalls.list rename to ports/sysdeps/unix/sysv/linux/ia64/syscalls.list diff --git a/sysdeps/unix/sysv/linux/ia64/sysconf.c b/ports/sysdeps/unix/sysv/linux/ia64/sysconf.c similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/sysconf.c rename to ports/sysdeps/unix/sysv/linux/ia64/sysconf.c diff --git a/sysdeps/unix/sysv/linux/ia64/sysdep.S b/ports/sysdeps/unix/sysv/linux/ia64/sysdep.S similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/sysdep.S rename to ports/sysdeps/unix/sysv/linux/ia64/sysdep.S diff --git a/sysdeps/unix/sysv/linux/ia64/sysdep.h b/ports/sysdeps/unix/sysv/linux/ia64/sysdep.h similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/sysdep.h rename to ports/sysdeps/unix/sysv/linux/ia64/sysdep.h diff --git a/sysdeps/unix/sysv/linux/ia64/system.c b/ports/sysdeps/unix/sysv/linux/ia64/system.c similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/system.c rename to ports/sysdeps/unix/sysv/linux/ia64/system.c diff --git a/sysdeps/unix/sysv/linux/ia64/ucontext_i.h b/ports/sysdeps/unix/sysv/linux/ia64/ucontext_i.h similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/ucontext_i.h rename to ports/sysdeps/unix/sysv/linux/ia64/ucontext_i.h diff --git a/sysdeps/unix/sysv/linux/ia64/umount.c b/ports/sysdeps/unix/sysv/linux/ia64/umount.c similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/umount.c rename to ports/sysdeps/unix/sysv/linux/ia64/umount.c diff --git a/sysdeps/unix/sysv/linux/ia64/unwind-dw2-fde.c b/ports/sysdeps/unix/sysv/linux/ia64/unwind-dw2-fde.c similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/unwind-dw2-fde.c rename to ports/sysdeps/unix/sysv/linux/ia64/unwind-dw2-fde.c diff --git a/sysdeps/unix/sysv/linux/ia64/vfork.S b/ports/sysdeps/unix/sysv/linux/ia64/vfork.S similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/vfork.S rename to ports/sysdeps/unix/sysv/linux/ia64/vfork.S diff --git a/sysdeps/unix/sysv/linux/ia64/wordexp.c b/ports/sysdeps/unix/sysv/linux/ia64/wordexp.c similarity index 100% rename from sysdeps/unix/sysv/linux/ia64/wordexp.c rename to ports/sysdeps/unix/sysv/linux/ia64/wordexp.c diff --git a/sysdeps/unix/sysv/linux/m68k/Makefile b/ports/sysdeps/unix/sysv/linux/m68k/Makefile similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/Makefile rename to ports/sysdeps/unix/sysv/linux/m68k/Makefile diff --git a/sysdeps/unix/sysv/linux/m68k/Versions b/ports/sysdeps/unix/sysv/linux/m68k/Versions similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/Versions rename to ports/sysdeps/unix/sysv/linux/m68k/Versions diff --git a/sysdeps/unix/sysv/linux/m68k/____longjmp_chk.c b/ports/sysdeps/unix/sysv/linux/m68k/____longjmp_chk.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/____longjmp_chk.c rename to ports/sysdeps/unix/sysv/linux/m68k/____longjmp_chk.c diff --git a/sysdeps/unix/sysv/linux/m68k/alphasort64.c b/ports/sysdeps/unix/sysv/linux/m68k/alphasort64.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/alphasort64.c rename to ports/sysdeps/unix/sysv/linux/m68k/alphasort64.c diff --git a/sysdeps/unix/sysv/linux/m68k/bits/a.out.h b/ports/sysdeps/unix/sysv/linux/m68k/bits/a.out.h similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/bits/a.out.h rename to ports/sysdeps/unix/sysv/linux/m68k/bits/a.out.h diff --git a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h b/ports/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/bits/fcntl.h rename to ports/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h diff --git a/sysdeps/unix/sysv/linux/m68k/bits/m68k-vdso.h b/ports/sysdeps/unix/sysv/linux/m68k/bits/m68k-vdso.h similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/bits/m68k-vdso.h rename to ports/sysdeps/unix/sysv/linux/m68k/bits/m68k-vdso.h diff --git a/sysdeps/unix/sysv/linux/m68k/bits/mman.h b/ports/sysdeps/unix/sysv/linux/m68k/bits/mman.h similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/bits/mman.h rename to ports/sysdeps/unix/sysv/linux/m68k/bits/mman.h diff --git a/sysdeps/unix/sysv/linux/m68k/bits/poll.h b/ports/sysdeps/unix/sysv/linux/m68k/bits/poll.h similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/bits/poll.h rename to ports/sysdeps/unix/sysv/linux/m68k/bits/poll.h diff --git a/sysdeps/unix/sysv/linux/m68k/bits/stat.h b/ports/sysdeps/unix/sysv/linux/m68k/bits/stat.h similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/bits/stat.h rename to ports/sysdeps/unix/sysv/linux/m68k/bits/stat.h diff --git a/sysdeps/unix/sysv/linux/m68k/brk.c b/ports/sysdeps/unix/sysv/linux/m68k/brk.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/brk.c rename to ports/sysdeps/unix/sysv/linux/m68k/brk.c diff --git a/sysdeps/unix/sysv/linux/m68k/clone.S b/ports/sysdeps/unix/sysv/linux/m68k/clone.S similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/clone.S rename to ports/sysdeps/unix/sysv/linux/m68k/clone.S diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/bits/atomic.h b/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/bits/atomic.h similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/coldfire/nptl/bits/atomic.h rename to ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/bits/atomic.h diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/ld.abilist b/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/ld.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/coldfire/nptl/ld.abilist rename to ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/ld.abilist diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libBrokenLocale.abilist b/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libBrokenLocale.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libBrokenLocale.abilist rename to ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libBrokenLocale.abilist diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libanl.abilist b/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libanl.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libanl.abilist rename to ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libanl.abilist diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libc.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libc.abilist rename to ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libc.abilist diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libcrypt.abilist b/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libcrypt.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libcrypt.abilist rename to ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libcrypt.abilist diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libdl.abilist b/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libdl.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libdl.abilist rename to ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libdl.abilist diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libm.abilist b/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libm.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libm.abilist rename to ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libm.abilist diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libnsl.abilist b/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libnsl.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libnsl.abilist rename to ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libnsl.abilist diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libpthread.abilist b/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libpthread.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libpthread.abilist rename to ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libpthread.abilist diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libresolv.abilist b/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libresolv.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libresolv.abilist rename to ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libresolv.abilist diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/librt.abilist b/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/librt.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/coldfire/nptl/librt.abilist rename to ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/librt.abilist diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libthread_db.abilist b/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libthread_db.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libthread_db.abilist rename to ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libthread_db.abilist diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libutil.abilist b/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libutil.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libutil.abilist rename to ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libutil.abilist diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h b/ports/sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h rename to ports/sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h diff --git a/sysdeps/unix/sysv/linux/m68k/configure b/ports/sysdeps/unix/sysv/linux/m68k/configure similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/configure rename to ports/sysdeps/unix/sysv/linux/m68k/configure diff --git a/sysdeps/unix/sysv/linux/m68k/configure.in b/ports/sysdeps/unix/sysv/linux/m68k/configure.in similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/configure.in rename to ports/sysdeps/unix/sysv/linux/m68k/configure.in diff --git a/sysdeps/unix/sysv/linux/m68k/dl-librecon.h b/ports/sysdeps/unix/sysv/linux/m68k/dl-librecon.h similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/dl-librecon.h rename to ports/sysdeps/unix/sysv/linux/m68k/dl-librecon.h diff --git a/sysdeps/unix/sysv/linux/m68k/fchown.c b/ports/sysdeps/unix/sysv/linux/m68k/fchown.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/fchown.c rename to ports/sysdeps/unix/sysv/linux/m68k/fchown.c diff --git a/sysdeps/unix/sysv/linux/m68k/fchownat.c b/ports/sysdeps/unix/sysv/linux/m68k/fchownat.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/fchownat.c rename to ports/sysdeps/unix/sysv/linux/m68k/fchownat.c diff --git a/sysdeps/unix/sysv/linux/m68k/fcntl.c b/ports/sysdeps/unix/sysv/linux/m68k/fcntl.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/fcntl.c rename to ports/sysdeps/unix/sysv/linux/m68k/fcntl.c diff --git a/sysdeps/unix/sysv/linux/m68k/fxstat.c b/ports/sysdeps/unix/sysv/linux/m68k/fxstat.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/fxstat.c rename to ports/sysdeps/unix/sysv/linux/m68k/fxstat.c diff --git a/sysdeps/unix/sysv/linux/m68k/fxstatat.c b/ports/sysdeps/unix/sysv/linux/m68k/fxstatat.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/fxstatat.c rename to ports/sysdeps/unix/sysv/linux/m68k/fxstatat.c diff --git a/sysdeps/unix/sysv/linux/m68k/getdents64.c b/ports/sysdeps/unix/sysv/linux/m68k/getdents64.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/getdents64.c rename to ports/sysdeps/unix/sysv/linux/m68k/getdents64.c diff --git a/sysdeps/unix/sysv/linux/m68k/getegid.c b/ports/sysdeps/unix/sysv/linux/m68k/getegid.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/getegid.c rename to ports/sysdeps/unix/sysv/linux/m68k/getegid.c diff --git a/sysdeps/unix/sysv/linux/m68k/geteuid.c b/ports/sysdeps/unix/sysv/linux/m68k/geteuid.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/geteuid.c rename to ports/sysdeps/unix/sysv/linux/m68k/geteuid.c diff --git a/sysdeps/unix/sysv/linux/m68k/getgid.c b/ports/sysdeps/unix/sysv/linux/m68k/getgid.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/getgid.c rename to ports/sysdeps/unix/sysv/linux/m68k/getgid.c diff --git a/sysdeps/unix/sysv/linux/m68k/getgroups.c b/ports/sysdeps/unix/sysv/linux/m68k/getgroups.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/getgroups.c rename to ports/sysdeps/unix/sysv/linux/m68k/getgroups.c diff --git a/sysdeps/unix/sysv/linux/m68k/getmsg.c b/ports/sysdeps/unix/sysv/linux/m68k/getmsg.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/getmsg.c rename to ports/sysdeps/unix/sysv/linux/m68k/getmsg.c diff --git a/sysdeps/unix/sysv/linux/m68k/getpagesize.c b/ports/sysdeps/unix/sysv/linux/m68k/getpagesize.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/getpagesize.c rename to ports/sysdeps/unix/sysv/linux/m68k/getpagesize.c diff --git a/sysdeps/unix/sysv/linux/m68k/getresgid.c b/ports/sysdeps/unix/sysv/linux/m68k/getresgid.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/getresgid.c rename to ports/sysdeps/unix/sysv/linux/m68k/getresgid.c diff --git a/sysdeps/unix/sysv/linux/m68k/getresuid.c b/ports/sysdeps/unix/sysv/linux/m68k/getresuid.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/getresuid.c rename to ports/sysdeps/unix/sysv/linux/m68k/getresuid.c diff --git a/sysdeps/unix/sysv/linux/m68k/getrlimit.c b/ports/sysdeps/unix/sysv/linux/m68k/getrlimit.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/getrlimit.c rename to ports/sysdeps/unix/sysv/linux/m68k/getrlimit.c diff --git a/sysdeps/unix/sysv/linux/m68k/getrlimit64.c b/ports/sysdeps/unix/sysv/linux/m68k/getrlimit64.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/getrlimit64.c rename to ports/sysdeps/unix/sysv/linux/m68k/getrlimit64.c diff --git a/sysdeps/unix/sysv/linux/m68k/getsysstats.c b/ports/sysdeps/unix/sysv/linux/m68k/getsysstats.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/getsysstats.c rename to ports/sysdeps/unix/sysv/linux/m68k/getsysstats.c diff --git a/sysdeps/unix/sysv/linux/m68k/getuid.c b/ports/sysdeps/unix/sysv/linux/m68k/getuid.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/getuid.c rename to ports/sysdeps/unix/sysv/linux/m68k/getuid.c diff --git a/sysdeps/unix/sysv/linux/m68k/glob64.c b/ports/sysdeps/unix/sysv/linux/m68k/glob64.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/glob64.c rename to ports/sysdeps/unix/sysv/linux/m68k/glob64.c diff --git a/sysdeps/unix/sysv/linux/m68k/init-first.c b/ports/sysdeps/unix/sysv/linux/m68k/init-first.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/init-first.c rename to ports/sysdeps/unix/sysv/linux/m68k/init-first.c diff --git a/sysdeps/unix/sysv/linux/m68k/kernel-features.h b/ports/sysdeps/unix/sysv/linux/m68k/kernel-features.h similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/kernel-features.h rename to ports/sysdeps/unix/sysv/linux/m68k/kernel-features.h diff --git a/sysdeps/unix/sysv/linux/m68k/lchown.c b/ports/sysdeps/unix/sysv/linux/m68k/lchown.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/lchown.c rename to ports/sysdeps/unix/sysv/linux/m68k/lchown.c diff --git a/sysdeps/unix/sysv/linux/m68k/ldconfig.h b/ports/sysdeps/unix/sysv/linux/m68k/ldconfig.h similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/ldconfig.h rename to ports/sysdeps/unix/sysv/linux/m68k/ldconfig.h diff --git a/sysdeps/unix/sysv/linux/m68k/libc-m68k-vdso.c b/ports/sysdeps/unix/sysv/linux/m68k/libc-m68k-vdso.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/libc-m68k-vdso.c rename to ports/sysdeps/unix/sysv/linux/m68k/libc-m68k-vdso.c diff --git a/sysdeps/unix/sysv/linux/m68k/lockf64.c b/ports/sysdeps/unix/sysv/linux/m68k/lockf64.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/lockf64.c rename to ports/sysdeps/unix/sysv/linux/m68k/lockf64.c diff --git a/sysdeps/unix/sysv/linux/m68k/lxstat.c b/ports/sysdeps/unix/sysv/linux/m68k/lxstat.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/lxstat.c rename to ports/sysdeps/unix/sysv/linux/m68k/lxstat.c diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/ld.abilist b/ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/ld.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/m680x0/nptl/ld.abilist rename to ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/ld.abilist diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libBrokenLocale.abilist b/ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libBrokenLocale.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libBrokenLocale.abilist rename to ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libBrokenLocale.abilist diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libanl.abilist b/ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libanl.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libanl.abilist rename to ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libanl.abilist diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libc.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libc.abilist rename to ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libc.abilist diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libcrypt.abilist b/ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libcrypt.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libcrypt.abilist rename to ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libcrypt.abilist diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libdl.abilist b/ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libdl.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libdl.abilist rename to ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libdl.abilist diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libm.abilist b/ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libm.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libm.abilist rename to ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libm.abilist diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libnsl.abilist b/ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libnsl.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libnsl.abilist rename to ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libnsl.abilist diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libpthread.abilist b/ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libpthread.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libpthread.abilist rename to ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libpthread.abilist diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libresolv.abilist b/ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libresolv.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libresolv.abilist rename to ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libresolv.abilist diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/librt.abilist b/ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/librt.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/m680x0/nptl/librt.abilist rename to ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/librt.abilist diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libthread_db.abilist b/ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libthread_db.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libthread_db.abilist rename to ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libthread_db.abilist diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libutil.abilist b/ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libutil.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libutil.abilist rename to ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libutil.abilist diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/syscalls.list b/ports/sysdeps/unix/sysv/linux/m68k/m680x0/syscalls.list similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/m680x0/syscalls.list rename to ports/sysdeps/unix/sysv/linux/m68k/m680x0/syscalls.list diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/sysdep.h b/ports/sysdeps/unix/sysv/linux/m68k/m680x0/sysdep.h similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/m680x0/sysdep.h rename to ports/sysdeps/unix/sysv/linux/m68k/m680x0/sysdep.h diff --git a/sysdeps/unix/sysv/linux/m68k/m68k-helpers.S b/ports/sysdeps/unix/sysv/linux/m68k/m68k-helpers.S similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/m68k-helpers.S rename to ports/sysdeps/unix/sysv/linux/m68k/m68k-helpers.S diff --git a/sysdeps/unix/sysv/linux/m68k/m68k-vdso.c b/ports/sysdeps/unix/sysv/linux/m68k/m68k-vdso.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/m68k-vdso.c rename to ports/sysdeps/unix/sysv/linux/m68k/m68k-vdso.c diff --git a/sysdeps/unix/sysv/linux/m68k/mmap.S b/ports/sysdeps/unix/sysv/linux/m68k/mmap.S similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/mmap.S rename to ports/sysdeps/unix/sysv/linux/m68k/mmap.S diff --git a/sysdeps/unix/sysv/linux/m68k/mremap.S b/ports/sysdeps/unix/sysv/linux/m68k/mremap.S similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/mremap.S rename to ports/sysdeps/unix/sysv/linux/m68k/mremap.S diff --git a/sysdeps/unix/sysv/linux/m68k/msgctl.c b/ports/sysdeps/unix/sysv/linux/m68k/msgctl.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/msgctl.c rename to ports/sysdeps/unix/sysv/linux/m68k/msgctl.c diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h b/ports/sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h rename to ports/sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/bits/semaphore.h b/ports/sysdeps/unix/sysv/linux/m68k/nptl/bits/semaphore.h similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/nptl/bits/semaphore.h rename to ports/sysdeps/unix/sysv/linux/m68k/nptl/bits/semaphore.h diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/clone.S b/ports/sysdeps/unix/sysv/linux/m68k/nptl/clone.S similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/nptl/clone.S rename to ports/sysdeps/unix/sysv/linux/m68k/nptl/clone.S diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/createthread.c b/ports/sysdeps/unix/sysv/linux/m68k/nptl/createthread.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/nptl/createthread.c rename to ports/sysdeps/unix/sysv/linux/m68k/nptl/createthread.c diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/fork.c b/ports/sysdeps/unix/sysv/linux/m68k/nptl/fork.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/nptl/fork.c rename to ports/sysdeps/unix/sysv/linux/m68k/nptl/fork.c diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h b/ports/sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h rename to ports/sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/pt-vfork.S b/ports/sysdeps/unix/sysv/linux/m68k/nptl/pt-vfork.S similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/nptl/pt-vfork.S rename to ports/sysdeps/unix/sysv/linux/m68k/nptl/pt-vfork.S diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/pthread_once.c b/ports/sysdeps/unix/sysv/linux/m68k/nptl/pthread_once.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/nptl/pthread_once.c rename to ports/sysdeps/unix/sysv/linux/m68k/nptl/pthread_once.c diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/sysdep-cancel.h b/ports/sysdeps/unix/sysv/linux/m68k/nptl/sysdep-cancel.h similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/nptl/sysdep-cancel.h rename to ports/sysdeps/unix/sysv/linux/m68k/nptl/sysdep-cancel.h diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/vfork.S b/ports/sysdeps/unix/sysv/linux/m68k/nptl/vfork.S similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/nptl/vfork.S rename to ports/sysdeps/unix/sysv/linux/m68k/nptl/vfork.S diff --git a/sysdeps/unix/sysv/linux/m68k/oldgetrlimit64.c b/ports/sysdeps/unix/sysv/linux/m68k/oldgetrlimit64.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/oldgetrlimit64.c rename to ports/sysdeps/unix/sysv/linux/m68k/oldgetrlimit64.c diff --git a/sysdeps/unix/sysv/linux/m68k/putmsg.c b/ports/sysdeps/unix/sysv/linux/m68k/putmsg.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/putmsg.c rename to ports/sysdeps/unix/sysv/linux/m68k/putmsg.c diff --git a/sysdeps/unix/sysv/linux/m68k/readdir64.c b/ports/sysdeps/unix/sysv/linux/m68k/readdir64.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/readdir64.c rename to ports/sysdeps/unix/sysv/linux/m68k/readdir64.c diff --git a/sysdeps/unix/sysv/linux/m68k/readdir64_r.c b/ports/sysdeps/unix/sysv/linux/m68k/readdir64_r.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/readdir64_r.c rename to ports/sysdeps/unix/sysv/linux/m68k/readdir64_r.c diff --git a/sysdeps/unix/sysv/linux/m68k/register-dump.h b/ports/sysdeps/unix/sysv/linux/m68k/register-dump.h similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/register-dump.h rename to ports/sysdeps/unix/sysv/linux/m68k/register-dump.h diff --git a/sysdeps/unix/sysv/linux/m68k/scandir64.c b/ports/sysdeps/unix/sysv/linux/m68k/scandir64.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/scandir64.c rename to ports/sysdeps/unix/sysv/linux/m68k/scandir64.c diff --git a/sysdeps/unix/sysv/linux/m68k/semctl.c b/ports/sysdeps/unix/sysv/linux/m68k/semctl.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/semctl.c rename to ports/sysdeps/unix/sysv/linux/m68k/semctl.c diff --git a/sysdeps/unix/sysv/linux/m68k/semtimedop.S b/ports/sysdeps/unix/sysv/linux/m68k/semtimedop.S similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/semtimedop.S rename to ports/sysdeps/unix/sysv/linux/m68k/semtimedop.S diff --git a/sysdeps/unix/sysv/linux/m68k/setegid.c b/ports/sysdeps/unix/sysv/linux/m68k/setegid.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/setegid.c rename to ports/sysdeps/unix/sysv/linux/m68k/setegid.c diff --git a/sysdeps/unix/sysv/linux/m68k/seteuid.c b/ports/sysdeps/unix/sysv/linux/m68k/seteuid.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/seteuid.c rename to ports/sysdeps/unix/sysv/linux/m68k/seteuid.c diff --git a/sysdeps/unix/sysv/linux/m68k/setfsgid.c b/ports/sysdeps/unix/sysv/linux/m68k/setfsgid.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/setfsgid.c rename to ports/sysdeps/unix/sysv/linux/m68k/setfsgid.c diff --git a/sysdeps/unix/sysv/linux/m68k/setfsuid.c b/ports/sysdeps/unix/sysv/linux/m68k/setfsuid.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/setfsuid.c rename to ports/sysdeps/unix/sysv/linux/m68k/setfsuid.c diff --git a/sysdeps/unix/sysv/linux/m68k/setgid.c b/ports/sysdeps/unix/sysv/linux/m68k/setgid.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/setgid.c rename to ports/sysdeps/unix/sysv/linux/m68k/setgid.c diff --git a/sysdeps/unix/sysv/linux/m68k/setgroups.c b/ports/sysdeps/unix/sysv/linux/m68k/setgroups.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/setgroups.c rename to ports/sysdeps/unix/sysv/linux/m68k/setgroups.c diff --git a/sysdeps/unix/sysv/linux/m68k/setregid.c b/ports/sysdeps/unix/sysv/linux/m68k/setregid.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/setregid.c rename to ports/sysdeps/unix/sysv/linux/m68k/setregid.c diff --git a/sysdeps/unix/sysv/linux/m68k/setresgid.c b/ports/sysdeps/unix/sysv/linux/m68k/setresgid.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/setresgid.c rename to ports/sysdeps/unix/sysv/linux/m68k/setresgid.c diff --git a/sysdeps/unix/sysv/linux/m68k/setresuid.c b/ports/sysdeps/unix/sysv/linux/m68k/setresuid.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/setresuid.c rename to ports/sysdeps/unix/sysv/linux/m68k/setresuid.c diff --git a/sysdeps/unix/sysv/linux/m68k/setreuid.c b/ports/sysdeps/unix/sysv/linux/m68k/setreuid.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/setreuid.c rename to ports/sysdeps/unix/sysv/linux/m68k/setreuid.c diff --git a/sysdeps/unix/sysv/linux/m68k/setrlimit.c b/ports/sysdeps/unix/sysv/linux/m68k/setrlimit.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/setrlimit.c rename to ports/sysdeps/unix/sysv/linux/m68k/setrlimit.c diff --git a/sysdeps/unix/sysv/linux/m68k/setuid.c b/ports/sysdeps/unix/sysv/linux/m68k/setuid.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/setuid.c rename to ports/sysdeps/unix/sysv/linux/m68k/setuid.c diff --git a/sysdeps/unix/sysv/linux/m68k/shmctl.c b/ports/sysdeps/unix/sysv/linux/m68k/shmctl.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/shmctl.c rename to ports/sysdeps/unix/sysv/linux/m68k/shmctl.c diff --git a/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h b/ports/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h rename to ports/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h diff --git a/sysdeps/unix/sysv/linux/m68k/socket.S b/ports/sysdeps/unix/sysv/linux/m68k/socket.S similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/socket.S rename to ports/sysdeps/unix/sysv/linux/m68k/socket.S diff --git a/sysdeps/unix/sysv/linux/m68k/sys/procfs.h b/ports/sysdeps/unix/sysv/linux/m68k/sys/procfs.h similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/sys/procfs.h rename to ports/sysdeps/unix/sysv/linux/m68k/sys/procfs.h diff --git a/sysdeps/unix/sysv/linux/m68k/sys/reg.h b/ports/sysdeps/unix/sysv/linux/m68k/sys/reg.h similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/sys/reg.h rename to ports/sysdeps/unix/sysv/linux/m68k/sys/reg.h diff --git a/sysdeps/unix/sysv/linux/m68k/sys/ucontext.h b/ports/sysdeps/unix/sysv/linux/m68k/sys/ucontext.h similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/sys/ucontext.h rename to ports/sysdeps/unix/sysv/linux/m68k/sys/ucontext.h diff --git a/sysdeps/unix/sysv/linux/m68k/sys/user.h b/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/sys/user.h rename to ports/sysdeps/unix/sysv/linux/m68k/sys/user.h diff --git a/sysdeps/unix/sysv/linux/m68k/syscall.S b/ports/sysdeps/unix/sysv/linux/m68k/syscall.S similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/syscall.S rename to ports/sysdeps/unix/sysv/linux/m68k/syscall.S diff --git a/sysdeps/unix/sysv/linux/m68k/syscalls.list b/ports/sysdeps/unix/sysv/linux/m68k/syscalls.list similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/syscalls.list rename to ports/sysdeps/unix/sysv/linux/m68k/syscalls.list diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.S b/ports/sysdeps/unix/sysv/linux/m68k/sysdep.S similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/sysdep.S rename to ports/sysdeps/unix/sysv/linux/m68k/sysdep.S diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/ports/sysdeps/unix/sysv/linux/m68k/sysdep.h similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/sysdep.h rename to ports/sysdeps/unix/sysv/linux/m68k/sysdep.h diff --git a/sysdeps/unix/sysv/linux/m68k/versionsort64.c b/ports/sysdeps/unix/sysv/linux/m68k/versionsort64.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/versionsort64.c rename to ports/sysdeps/unix/sysv/linux/m68k/versionsort64.c diff --git a/sysdeps/unix/sysv/linux/m68k/vfork.S b/ports/sysdeps/unix/sysv/linux/m68k/vfork.S similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/vfork.S rename to ports/sysdeps/unix/sysv/linux/m68k/vfork.S diff --git a/sysdeps/unix/sysv/linux/m68k/xstat.c b/ports/sysdeps/unix/sysv/linux/m68k/xstat.c similarity index 100% rename from sysdeps/unix/sysv/linux/m68k/xstat.c rename to ports/sysdeps/unix/sysv/linux/m68k/xstat.c diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/ports/sysdeps/unix/sysv/linux/mips/Makefile similarity index 100% rename from sysdeps/unix/sysv/linux/mips/Makefile rename to ports/sysdeps/unix/sysv/linux/mips/Makefile diff --git a/sysdeps/unix/sysv/linux/mips/Versions b/ports/sysdeps/unix/sysv/linux/mips/Versions similarity index 100% rename from sysdeps/unix/sysv/linux/mips/Versions rename to ports/sysdeps/unix/sysv/linux/mips/Versions diff --git a/sysdeps/unix/sysv/linux/mips/____longjmp_chk.c b/ports/sysdeps/unix/sysv/linux/mips/____longjmp_chk.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/____longjmp_chk.c rename to ports/sysdeps/unix/sysv/linux/mips/____longjmp_chk.c diff --git a/sysdeps/unix/sysv/linux/mips/_test_and_set.c b/ports/sysdeps/unix/sysv/linux/mips/_test_and_set.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/_test_and_set.c rename to ports/sysdeps/unix/sysv/linux/mips/_test_and_set.c diff --git a/sysdeps/unix/sysv/linux/mips/bits/endian.h b/ports/sysdeps/unix/sysv/linux/mips/bits/endian.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/bits/endian.h rename to ports/sysdeps/unix/sysv/linux/mips/bits/endian.h diff --git a/sysdeps/unix/sysv/linux/mips/bits/epoll.h b/ports/sysdeps/unix/sysv/linux/mips/bits/epoll.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/bits/epoll.h rename to ports/sysdeps/unix/sysv/linux/mips/bits/epoll.h diff --git a/sysdeps/unix/sysv/linux/mips/bits/errno.h b/ports/sysdeps/unix/sysv/linux/mips/bits/errno.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/bits/errno.h rename to ports/sysdeps/unix/sysv/linux/mips/bits/errno.h diff --git a/sysdeps/unix/sysv/linux/mips/bits/eventfd.h b/ports/sysdeps/unix/sysv/linux/mips/bits/eventfd.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/bits/eventfd.h rename to ports/sysdeps/unix/sysv/linux/mips/bits/eventfd.h diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/ports/sysdeps/unix/sysv/linux/mips/bits/fcntl.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/bits/fcntl.h rename to ports/sysdeps/unix/sysv/linux/mips/bits/fcntl.h diff --git a/sysdeps/unix/sysv/linux/mips/bits/inotify.h b/ports/sysdeps/unix/sysv/linux/mips/bits/inotify.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/bits/inotify.h rename to ports/sysdeps/unix/sysv/linux/mips/bits/inotify.h diff --git a/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h b/ports/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h rename to ports/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h diff --git a/sysdeps/unix/sysv/linux/mips/bits/ipc.h b/ports/sysdeps/unix/sysv/linux/mips/bits/ipc.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/bits/ipc.h rename to ports/sysdeps/unix/sysv/linux/mips/bits/ipc.h diff --git a/sysdeps/unix/sysv/linux/mips/bits/mman.h b/ports/sysdeps/unix/sysv/linux/mips/bits/mman.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/bits/mman.h rename to ports/sysdeps/unix/sysv/linux/mips/bits/mman.h diff --git a/sysdeps/unix/sysv/linux/mips/bits/msq.h b/ports/sysdeps/unix/sysv/linux/mips/bits/msq.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/bits/msq.h rename to ports/sysdeps/unix/sysv/linux/mips/bits/msq.h diff --git a/sysdeps/unix/sysv/linux/mips/bits/poll.h b/ports/sysdeps/unix/sysv/linux/mips/bits/poll.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/bits/poll.h rename to ports/sysdeps/unix/sysv/linux/mips/bits/poll.h diff --git a/sysdeps/unix/sysv/linux/mips/bits/resource.h b/ports/sysdeps/unix/sysv/linux/mips/bits/resource.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/bits/resource.h rename to ports/sysdeps/unix/sysv/linux/mips/bits/resource.h diff --git a/sysdeps/unix/sysv/linux/mips/bits/sem.h b/ports/sysdeps/unix/sysv/linux/mips/bits/sem.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/bits/sem.h rename to ports/sysdeps/unix/sysv/linux/mips/bits/sem.h diff --git a/sysdeps/unix/sysv/linux/mips/bits/shm.h b/ports/sysdeps/unix/sysv/linux/mips/bits/shm.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/bits/shm.h rename to ports/sysdeps/unix/sysv/linux/mips/bits/shm.h diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h b/ports/sysdeps/unix/sysv/linux/mips/bits/sigaction.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/bits/sigaction.h rename to ports/sysdeps/unix/sysv/linux/mips/bits/sigaction.h diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h b/ports/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/bits/sigcontext.h rename to ports/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h diff --git a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h b/ports/sysdeps/unix/sysv/linux/mips/bits/siginfo.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/bits/siginfo.h rename to ports/sysdeps/unix/sysv/linux/mips/bits/siginfo.h diff --git a/sysdeps/unix/sysv/linux/mips/bits/signalfd.h b/ports/sysdeps/unix/sysv/linux/mips/bits/signalfd.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/bits/signalfd.h rename to ports/sysdeps/unix/sysv/linux/mips/bits/signalfd.h diff --git a/sysdeps/unix/sysv/linux/mips/bits/signum.h b/ports/sysdeps/unix/sysv/linux/mips/bits/signum.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/bits/signum.h rename to ports/sysdeps/unix/sysv/linux/mips/bits/signum.h diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigstack.h b/ports/sysdeps/unix/sysv/linux/mips/bits/sigstack.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/bits/sigstack.h rename to ports/sysdeps/unix/sysv/linux/mips/bits/sigstack.h diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket_type.h b/ports/sysdeps/unix/sysv/linux/mips/bits/socket_type.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/bits/socket_type.h rename to ports/sysdeps/unix/sysv/linux/mips/bits/socket_type.h diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/ports/sysdeps/unix/sysv/linux/mips/bits/stat.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/bits/stat.h rename to ports/sysdeps/unix/sysv/linux/mips/bits/stat.h diff --git a/sysdeps/unix/sysv/linux/mips/bits/statfs.h b/ports/sysdeps/unix/sysv/linux/mips/bits/statfs.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/bits/statfs.h rename to ports/sysdeps/unix/sysv/linux/mips/bits/statfs.h diff --git a/sysdeps/unix/sysv/linux/mips/bits/termios.h b/ports/sysdeps/unix/sysv/linux/mips/bits/termios.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/bits/termios.h rename to ports/sysdeps/unix/sysv/linux/mips/bits/termios.h diff --git a/sysdeps/unix/sysv/linux/mips/bits/timerfd.h b/ports/sysdeps/unix/sysv/linux/mips/bits/timerfd.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/bits/timerfd.h rename to ports/sysdeps/unix/sysv/linux/mips/bits/timerfd.h diff --git a/sysdeps/unix/sysv/linux/mips/brk.c b/ports/sysdeps/unix/sysv/linux/mips/brk.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/brk.c rename to ports/sysdeps/unix/sysv/linux/mips/brk.c diff --git a/sysdeps/unix/sysv/linux/mips/clone.S b/ports/sysdeps/unix/sysv/linux/mips/clone.S similarity index 100% rename from sysdeps/unix/sysv/linux/mips/clone.S rename to ports/sysdeps/unix/sysv/linux/mips/clone.S diff --git a/sysdeps/unix/sysv/linux/mips/configure b/ports/sysdeps/unix/sysv/linux/mips/configure similarity index 100% rename from sysdeps/unix/sysv/linux/mips/configure rename to ports/sysdeps/unix/sysv/linux/mips/configure diff --git a/sysdeps/unix/sysv/linux/mips/configure.in b/ports/sysdeps/unix/sysv/linux/mips/configure.in similarity index 100% rename from sysdeps/unix/sysv/linux/mips/configure.in rename to ports/sysdeps/unix/sysv/linux/mips/configure.in diff --git a/sysdeps/unix/sysv/linux/mips/dl-cache.h b/ports/sysdeps/unix/sysv/linux/mips/dl-cache.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/dl-cache.h rename to ports/sysdeps/unix/sysv/linux/mips/dl-cache.h diff --git a/sysdeps/unix/sysv/linux/mips/dl-static.c b/ports/sysdeps/unix/sysv/linux/mips/dl-static.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/dl-static.c rename to ports/sysdeps/unix/sysv/linux/mips/dl-static.c diff --git a/sysdeps/unix/sysv/linux/mips/fcntl.c b/ports/sysdeps/unix/sysv/linux/mips/fcntl.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/fcntl.c rename to ports/sysdeps/unix/sysv/linux/mips/fcntl.c diff --git a/sysdeps/unix/sysv/linux/mips/getcontext.S b/ports/sysdeps/unix/sysv/linux/mips/getcontext.S similarity index 100% rename from sysdeps/unix/sysv/linux/mips/getcontext.S rename to ports/sysdeps/unix/sysv/linux/mips/getcontext.S diff --git a/sysdeps/unix/sysv/linux/mips/getmsg.c b/ports/sysdeps/unix/sysv/linux/mips/getmsg.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/getmsg.c rename to ports/sysdeps/unix/sysv/linux/mips/getmsg.c diff --git a/sysdeps/unix/sysv/linux/mips/getsysstats.c b/ports/sysdeps/unix/sysv/linux/mips/getsysstats.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/getsysstats.c rename to ports/sysdeps/unix/sysv/linux/mips/getsysstats.c diff --git a/sysdeps/unix/sysv/linux/mips/ipc_priv.h b/ports/sysdeps/unix/sysv/linux/mips/ipc_priv.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/ipc_priv.h rename to ports/sysdeps/unix/sysv/linux/mips/ipc_priv.h diff --git a/sysdeps/unix/sysv/linux/mips/kernel-features.h b/ports/sysdeps/unix/sysv/linux/mips/kernel-features.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/kernel-features.h rename to ports/sysdeps/unix/sysv/linux/mips/kernel-features.h diff --git a/sysdeps/unix/sysv/linux/mips/kernel_rt_sigframe.h b/ports/sysdeps/unix/sysv/linux/mips/kernel_rt_sigframe.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/kernel_rt_sigframe.h rename to ports/sysdeps/unix/sysv/linux/mips/kernel_rt_sigframe.h diff --git a/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h b/ports/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/kernel_sigaction.h rename to ports/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h diff --git a/sysdeps/unix/sysv/linux/mips/kernel_stat.h b/ports/sysdeps/unix/sysv/linux/mips/kernel_stat.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/kernel_stat.h rename to ports/sysdeps/unix/sysv/linux/mips/kernel_stat.h diff --git a/sysdeps/unix/sysv/linux/mips/kernel_termios.h b/ports/sysdeps/unix/sysv/linux/mips/kernel_termios.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/kernel_termios.h rename to ports/sysdeps/unix/sysv/linux/mips/kernel_termios.h diff --git a/sysdeps/unix/sysv/linux/mips/ldsodefs.h b/ports/sysdeps/unix/sysv/linux/mips/ldsodefs.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/ldsodefs.h rename to ports/sysdeps/unix/sysv/linux/mips/ldsodefs.h diff --git a/sysdeps/unix/sysv/linux/mips/libc-abis b/ports/sysdeps/unix/sysv/linux/mips/libc-abis similarity index 100% rename from sysdeps/unix/sysv/linux/mips/libc-abis rename to ports/sysdeps/unix/sysv/linux/mips/libc-abis diff --git a/sysdeps/unix/sysv/linux/mips/lockf64.c b/ports/sysdeps/unix/sysv/linux/mips/lockf64.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/lockf64.c rename to ports/sysdeps/unix/sysv/linux/mips/lockf64.c diff --git a/sysdeps/unix/sysv/linux/mips/makecontext.S b/ports/sysdeps/unix/sysv/linux/mips/makecontext.S similarity index 100% rename from sysdeps/unix/sysv/linux/mips/makecontext.S rename to ports/sysdeps/unix/sysv/linux/mips/makecontext.S diff --git a/sysdeps/unix/sysv/linux/mips/mips32/Makefile b/ports/sysdeps/unix/sysv/linux/mips/mips32/Makefile similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips32/Makefile rename to ports/sysdeps/unix/sysv/linux/mips/mips32/Makefile diff --git a/sysdeps/unix/sysv/linux/mips/mips32/accept4.c b/ports/sysdeps/unix/sysv/linux/mips/mips32/accept4.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips32/accept4.c rename to ports/sysdeps/unix/sysv/linux/mips/mips32/accept4.c diff --git a/sysdeps/unix/sysv/linux/mips/mips32/ftruncate64.c b/ports/sysdeps/unix/sysv/linux/mips/mips32/ftruncate64.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips32/ftruncate64.c rename to ports/sysdeps/unix/sysv/linux/mips/mips32/ftruncate64.c diff --git a/sysdeps/unix/sysv/linux/mips/mips32/fxstatat.c b/ports/sysdeps/unix/sysv/linux/mips/mips32/fxstatat.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips32/fxstatat.c rename to ports/sysdeps/unix/sysv/linux/mips/mips32/fxstatat.c diff --git a/sysdeps/unix/sysv/linux/mips/mips32/internal_accept4.S b/ports/sysdeps/unix/sysv/linux/mips/mips32/internal_accept4.S similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips32/internal_accept4.S rename to ports/sysdeps/unix/sysv/linux/mips/mips32/internal_accept4.S diff --git a/sysdeps/unix/sysv/linux/mips/mips32/internal_recvmmsg.S b/ports/sysdeps/unix/sysv/linux/mips/mips32/internal_recvmmsg.S similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips32/internal_recvmmsg.S rename to ports/sysdeps/unix/sysv/linux/mips/mips32/internal_recvmmsg.S diff --git a/sysdeps/unix/sysv/linux/mips/mips32/internal_sendmmsg.S b/ports/sysdeps/unix/sysv/linux/mips/mips32/internal_sendmmsg.S similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips32/internal_sendmmsg.S rename to ports/sysdeps/unix/sysv/linux/mips/mips32/internal_sendmmsg.S diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/ld.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/ld.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips32/nptl/ld.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/ld.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libBrokenLocale.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libBrokenLocale.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips32/nptl/libBrokenLocale.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libBrokenLocale.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libanl.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libanl.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips32/nptl/libanl.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libanl.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libcidn.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libcidn.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips32/nptl/libcidn.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libcidn.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libcrypt.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libcrypt.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips32/nptl/libcrypt.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libcrypt.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libdl.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libdl.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips32/nptl/libdl.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libdl.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libm.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libm.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips32/nptl/libm.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libm.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnsl.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnsl.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips32/nptl/libnsl.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnsl.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_compat.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_compat.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_compat.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_compat.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_db.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_db.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_db.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_db.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_dns.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_dns.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_dns.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_dns.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_files.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_files.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_files.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_files.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_hesiod.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_hesiod.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_hesiod.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_hesiod.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_nis.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_nis.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_nis.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_nis.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_nisplus.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_nisplus.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_nisplus.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libnss_nisplus.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libpthread.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libpthread.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips32/nptl/libpthread.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libpthread.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libresolv.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libresolv.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips32/nptl/libresolv.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libresolv.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/librt.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/librt.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips32/nptl/librt.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/librt.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libthread_db.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libthread_db.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips32/nptl/libthread_db.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libthread_db.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nptl/libutil.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libutil.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips32/nptl/libutil.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libutil.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c b/ports/sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c rename to ports/sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c diff --git a/sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise64.c b/ports/sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise64.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise64.c rename to ports/sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise64.c diff --git a/sysdeps/unix/sysv/linux/mips/mips32/readahead.c b/ports/sysdeps/unix/sysv/linux/mips/mips32/readahead.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips32/readahead.c rename to ports/sysdeps/unix/sysv/linux/mips/mips32/readahead.c diff --git a/sysdeps/unix/sysv/linux/mips/mips32/recvmmsg.c b/ports/sysdeps/unix/sysv/linux/mips/mips32/recvmmsg.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips32/recvmmsg.c rename to ports/sysdeps/unix/sysv/linux/mips/mips32/recvmmsg.c diff --git a/sysdeps/unix/sysv/linux/mips/mips32/sendmmsg.c b/ports/sysdeps/unix/sysv/linux/mips/mips32/sendmmsg.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips32/sendmmsg.c rename to ports/sysdeps/unix/sysv/linux/mips/mips32/sendmmsg.c diff --git a/sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c b/ports/sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c rename to ports/sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c diff --git a/sysdeps/unix/sysv/linux/mips/mips32/syscalls.list b/ports/sysdeps/unix/sysv/linux/mips/mips32/syscalls.list similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips32/syscalls.list rename to ports/sysdeps/unix/sysv/linux/mips/mips32/syscalls.list diff --git a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h b/ports/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips32/sysdep.h rename to ports/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h diff --git a/sysdeps/unix/sysv/linux/mips/mips32/truncate64.c b/ports/sysdeps/unix/sysv/linux/mips/mips32/truncate64.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips32/truncate64.c rename to ports/sysdeps/unix/sysv/linux/mips/mips32/truncate64.c diff --git a/sysdeps/unix/sysv/linux/mips/mips64/Makefile b/ports/sysdeps/unix/sysv/linux/mips/mips64/Makefile similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/Makefile rename to ports/sysdeps/unix/sysv/linux/mips/mips64/Makefile diff --git a/sysdeps/unix/sysv/linux/mips/mips64/configure b/ports/sysdeps/unix/sysv/linux/mips/mips64/configure similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/configure rename to ports/sysdeps/unix/sysv/linux/mips/mips64/configure diff --git a/sysdeps/unix/sysv/linux/mips/mips64/configure.in b/ports/sysdeps/unix/sysv/linux/mips/mips64/configure.in similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/configure.in rename to ports/sysdeps/unix/sysv/linux/mips/mips64/configure.in diff --git a/sysdeps/unix/sysv/linux/mips/mips64/ftruncate64.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/ftruncate64.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/ftruncate64.c rename to ports/sysdeps/unix/sysv/linux/mips/mips64/ftruncate64.c diff --git a/sysdeps/unix/sysv/linux/mips/mips64/fxstatat64.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/fxstatat64.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/fxstatat64.c rename to ports/sysdeps/unix/sysv/linux/mips/mips64/fxstatat64.c diff --git a/sysdeps/unix/sysv/linux/mips/mips64/ldconfig.h b/ports/sysdeps/unix/sysv/linux/mips/mips64/ldconfig.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/ldconfig.h rename to ports/sysdeps/unix/sysv/linux/mips/mips64/ldconfig.h diff --git a/sysdeps/unix/sysv/linux/mips/mips64/ldd-rewrite.sed b/ports/sysdeps/unix/sysv/linux/mips/mips64/ldd-rewrite.sed similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/ldd-rewrite.sed rename to ports/sysdeps/unix/sysv/linux/mips/mips64/ldd-rewrite.sed diff --git a/sysdeps/unix/sysv/linux/mips/mips64/llseek.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/llseek.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/llseek.c rename to ports/sysdeps/unix/sysv/linux/mips/mips64/llseek.c diff --git a/sysdeps/unix/sysv/linux/mips/mips64/msgctl.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/msgctl.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/msgctl.c rename to ports/sysdeps/unix/sysv/linux/mips/mips64/msgctl.c diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/Makefile b/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/Makefile similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n32/Makefile rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n32/Makefile diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/ld.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/ld.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/ld.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/ld.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libBrokenLocale.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libBrokenLocale.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libBrokenLocale.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libBrokenLocale.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libanl.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libanl.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libanl.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libanl.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libc.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libc.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libc.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libcrypt.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libcrypt.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libcrypt.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libcrypt.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libdl.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libdl.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libdl.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libdl.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libm.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libm.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libm.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libm.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libnsl.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libnsl.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libnsl.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libnsl.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libpthread.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libpthread.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libpthread.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libpthread.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libresolv.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libresolv.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libresolv.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libresolv.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/librt.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/librt.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/librt.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/librt.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libthread_db.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libthread_db.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libthread_db.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libthread_db.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libutil.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libutil.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libutil.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libutil.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise.c rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise.c diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise64.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise64.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise64.c rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise64.c diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate.c rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate.c diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate64.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate64.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate64.c rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate64.c diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list b/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h b/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/Makefile b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/Makefile similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n64/Makefile rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n64/Makefile diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate.c rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate.c diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate64.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate64.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate64.c rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate64.c diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/fstatfs64.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/fstatfs64.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n64/fstatfs64.c rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n64/fstatfs64.c diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/ftw.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/ftw.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n64/ftw.c rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n64/ftw.c diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/ftw64.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/ftw64.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n64/ftw64.c rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n64/ftw64.c diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/glob64.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/glob64.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n64/glob64.c rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n64/glob64.c diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/ld.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/ld.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/ld.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/ld.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libBrokenLocale.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libBrokenLocale.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libBrokenLocale.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libBrokenLocale.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libanl.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libanl.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libanl.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libanl.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libcrypt.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libcrypt.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libcrypt.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libcrypt.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libdl.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libdl.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libdl.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libdl.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libm.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libm.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libm.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libm.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libnsl.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libnsl.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libnsl.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libnsl.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libpthread.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libpthread.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libpthread.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libpthread.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libresolv.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libresolv.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libresolv.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libresolv.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/librt.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/librt.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/librt.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/librt.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libthread_db.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libthread_db.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libthread_db.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libthread_db.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libutil.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libutil.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libutil.abilist rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libutil.abilist diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise.c rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise.c diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise64.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise64.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise64.c rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise64.c diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate.c rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate.c diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate64.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate64.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate64.c rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate64.c diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/preadv64.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/preadv64.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n64/preadv64.c rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n64/preadv64.c diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/pwritev64.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/pwritev64.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n64/pwritev64.c rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n64/pwritev64.c diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/statfs64.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/statfs64.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n64/statfs64.c rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n64/statfs64.c diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h rename to ports/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h diff --git a/sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h b/ports/sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h rename to ports/sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h diff --git a/sysdeps/unix/sysv/linux/mips/mips64/recv.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/recv.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/recv.c rename to ports/sysdeps/unix/sysv/linux/mips/mips64/recv.c diff --git a/sysdeps/unix/sysv/linux/mips/mips64/semctl.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/semctl.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/semctl.c rename to ports/sysdeps/unix/sysv/linux/mips/mips64/semctl.c diff --git a/sysdeps/unix/sysv/linux/mips/mips64/send.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/send.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/send.c rename to ports/sysdeps/unix/sysv/linux/mips/mips64/send.c diff --git a/sysdeps/unix/sysv/linux/mips/mips64/shmctl.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/shmctl.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/shmctl.c rename to ports/sysdeps/unix/sysv/linux/mips/mips64/shmctl.c diff --git a/sysdeps/unix/sysv/linux/mips/mips64/syscall.S b/ports/sysdeps/unix/sysv/linux/mips/mips64/syscall.S similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/syscall.S rename to ports/sysdeps/unix/sysv/linux/mips/mips64/syscall.S diff --git a/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list b/ports/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/syscalls.list rename to ports/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list diff --git a/sysdeps/unix/sysv/linux/mips/mips64/truncate64.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/truncate64.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/truncate64.c rename to ports/sysdeps/unix/sysv/linux/mips/mips64/truncate64.c diff --git a/sysdeps/unix/sysv/linux/mips/mips64/umount.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/umount.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/mips64/umount.c rename to ports/sysdeps/unix/sysv/linux/mips/mips64/umount.c diff --git a/sysdeps/unix/sysv/linux/mips/nptl/bits/local_lim.h b/ports/sysdeps/unix/sysv/linux/mips/nptl/bits/local_lim.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/nptl/bits/local_lim.h rename to ports/sysdeps/unix/sysv/linux/mips/nptl/bits/local_lim.h diff --git a/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h b/ports/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h rename to ports/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h diff --git a/sysdeps/unix/sysv/linux/mips/nptl/bits/semaphore.h b/ports/sysdeps/unix/sysv/linux/mips/nptl/bits/semaphore.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/nptl/bits/semaphore.h rename to ports/sysdeps/unix/sysv/linux/mips/nptl/bits/semaphore.h diff --git a/sysdeps/unix/sysv/linux/mips/nptl/clone.S b/ports/sysdeps/unix/sysv/linux/mips/nptl/clone.S similarity index 100% rename from sysdeps/unix/sysv/linux/mips/nptl/clone.S rename to ports/sysdeps/unix/sysv/linux/mips/nptl/clone.S diff --git a/sysdeps/unix/sysv/linux/mips/nptl/createthread.c b/ports/sysdeps/unix/sysv/linux/mips/nptl/createthread.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/nptl/createthread.c rename to ports/sysdeps/unix/sysv/linux/mips/nptl/createthread.c diff --git a/sysdeps/unix/sysv/linux/mips/nptl/fork.c b/ports/sysdeps/unix/sysv/linux/mips/nptl/fork.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/nptl/fork.c rename to ports/sysdeps/unix/sysv/linux/mips/nptl/fork.c diff --git a/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h b/ports/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h rename to ports/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h diff --git a/sysdeps/unix/sysv/linux/mips/nptl/pt-vfork.S b/ports/sysdeps/unix/sysv/linux/mips/nptl/pt-vfork.S similarity index 100% rename from sysdeps/unix/sysv/linux/mips/nptl/pt-vfork.S rename to ports/sysdeps/unix/sysv/linux/mips/nptl/pt-vfork.S diff --git a/sysdeps/unix/sysv/linux/mips/nptl/pthread_once.c b/ports/sysdeps/unix/sysv/linux/mips/nptl/pthread_once.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/nptl/pthread_once.c rename to ports/sysdeps/unix/sysv/linux/mips/nptl/pthread_once.c diff --git a/sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h b/ports/sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h rename to ports/sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h diff --git a/sysdeps/unix/sysv/linux/mips/nptl/vfork.S b/ports/sysdeps/unix/sysv/linux/mips/nptl/vfork.S similarity index 100% rename from sysdeps/unix/sysv/linux/mips/nptl/vfork.S rename to ports/sysdeps/unix/sysv/linux/mips/nptl/vfork.S diff --git a/sysdeps/unix/sysv/linux/mips/pipe.S b/ports/sysdeps/unix/sysv/linux/mips/pipe.S similarity index 100% rename from sysdeps/unix/sysv/linux/mips/pipe.S rename to ports/sysdeps/unix/sysv/linux/mips/pipe.S diff --git a/sysdeps/unix/sysv/linux/mips/pread.c b/ports/sysdeps/unix/sysv/linux/mips/pread.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/pread.c rename to ports/sysdeps/unix/sysv/linux/mips/pread.c diff --git a/sysdeps/unix/sysv/linux/mips/pread64.c b/ports/sysdeps/unix/sysv/linux/mips/pread64.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/pread64.c rename to ports/sysdeps/unix/sysv/linux/mips/pread64.c diff --git a/sysdeps/unix/sysv/linux/mips/profil-counter.h b/ports/sysdeps/unix/sysv/linux/mips/profil-counter.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/profil-counter.h rename to ports/sysdeps/unix/sysv/linux/mips/profil-counter.h diff --git a/sysdeps/unix/sysv/linux/mips/putmsg.c b/ports/sysdeps/unix/sysv/linux/mips/putmsg.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/putmsg.c rename to ports/sysdeps/unix/sysv/linux/mips/putmsg.c diff --git a/sysdeps/unix/sysv/linux/mips/pwrite.c b/ports/sysdeps/unix/sysv/linux/mips/pwrite.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/pwrite.c rename to ports/sysdeps/unix/sysv/linux/mips/pwrite.c diff --git a/sysdeps/unix/sysv/linux/mips/pwrite64.c b/ports/sysdeps/unix/sysv/linux/mips/pwrite64.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/pwrite64.c rename to ports/sysdeps/unix/sysv/linux/mips/pwrite64.c diff --git a/sysdeps/unix/sysv/linux/mips/readelflib.c b/ports/sysdeps/unix/sysv/linux/mips/readelflib.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/readelflib.c rename to ports/sysdeps/unix/sysv/linux/mips/readelflib.c diff --git a/sysdeps/unix/sysv/linux/mips/register-dump.h b/ports/sysdeps/unix/sysv/linux/mips/register-dump.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/register-dump.h rename to ports/sysdeps/unix/sysv/linux/mips/register-dump.h diff --git a/sysdeps/unix/sysv/linux/mips/setcontext.S b/ports/sysdeps/unix/sysv/linux/mips/setcontext.S similarity index 100% rename from sysdeps/unix/sysv/linux/mips/setcontext.S rename to ports/sysdeps/unix/sysv/linux/mips/setcontext.S diff --git a/sysdeps/unix/sysv/linux/mips/sigaction.c b/ports/sysdeps/unix/sysv/linux/mips/sigaction.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/sigaction.c rename to ports/sysdeps/unix/sysv/linux/mips/sigaction.c diff --git a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h b/ports/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/sigcontextinfo.h rename to ports/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h diff --git a/sysdeps/unix/sysv/linux/mips/swapcontext.S b/ports/sysdeps/unix/sysv/linux/mips/swapcontext.S similarity index 100% rename from sysdeps/unix/sysv/linux/mips/swapcontext.S rename to ports/sysdeps/unix/sysv/linux/mips/swapcontext.S diff --git a/sysdeps/unix/sysv/linux/mips/sys/cachectl.h b/ports/sysdeps/unix/sysv/linux/mips/sys/cachectl.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/sys/cachectl.h rename to ports/sysdeps/unix/sysv/linux/mips/sys/cachectl.h diff --git a/sysdeps/unix/sysv/linux/mips/sys/procfs.h b/ports/sysdeps/unix/sysv/linux/mips/sys/procfs.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/sys/procfs.h rename to ports/sysdeps/unix/sysv/linux/mips/sys/procfs.h diff --git a/sysdeps/unix/sysv/linux/mips/sys/sysmips.h b/ports/sysdeps/unix/sysv/linux/mips/sys/sysmips.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/sys/sysmips.h rename to ports/sysdeps/unix/sysv/linux/mips/sys/sysmips.h diff --git a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h b/ports/sysdeps/unix/sysv/linux/mips/sys/ucontext.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/sys/ucontext.h rename to ports/sysdeps/unix/sysv/linux/mips/sys/ucontext.h diff --git a/sysdeps/unix/sysv/linux/mips/sys/user.h b/ports/sysdeps/unix/sysv/linux/mips/sys/user.h similarity index 100% rename from sysdeps/unix/sysv/linux/mips/sys/user.h rename to ports/sysdeps/unix/sysv/linux/mips/sys/user.h diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/ports/sysdeps/unix/sysv/linux/mips/syscalls.list similarity index 100% rename from sysdeps/unix/sysv/linux/mips/syscalls.list rename to ports/sysdeps/unix/sysv/linux/mips/syscalls.list diff --git a/sysdeps/unix/sysv/linux/mips/ucontext_i.sym b/ports/sysdeps/unix/sysv/linux/mips/ucontext_i.sym similarity index 100% rename from sysdeps/unix/sysv/linux/mips/ucontext_i.sym rename to ports/sysdeps/unix/sysv/linux/mips/ucontext_i.sym diff --git a/sysdeps/unix/sysv/linux/mips/ustat.c b/ports/sysdeps/unix/sysv/linux/mips/ustat.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/ustat.c rename to ports/sysdeps/unix/sysv/linux/mips/ustat.c diff --git a/sysdeps/unix/sysv/linux/mips/vfork.S b/ports/sysdeps/unix/sysv/linux/mips/vfork.S similarity index 100% rename from sysdeps/unix/sysv/linux/mips/vfork.S rename to ports/sysdeps/unix/sysv/linux/mips/vfork.S diff --git a/sysdeps/unix/sysv/linux/mips/xstatconv.c b/ports/sysdeps/unix/sysv/linux/mips/xstatconv.c similarity index 100% rename from sysdeps/unix/sysv/linux/mips/xstatconv.c rename to ports/sysdeps/unix/sysv/linux/mips/xstatconv.c diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/405/Implies b/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/405/Implies similarity index 100% rename from sysdeps/unix/sysv/linux/powerpc/powerpc32/405/Implies rename to ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/405/Implies diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/440/Implies b/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/440/Implies similarity index 100% rename from sysdeps/unix/sysv/linux/powerpc/powerpc32/440/Implies rename to ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/440/Implies diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/464/Implies b/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/464/Implies similarity index 100% rename from sysdeps/unix/sysv/linux/powerpc/powerpc32/464/Implies rename to ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/464/Implies diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/476/Implies b/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/476/Implies similarity index 100% rename from sysdeps/unix/sysv/linux/powerpc/powerpc32/476/Implies rename to ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/476/Implies diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/Implies b/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/Implies similarity index 100% rename from sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/Implies rename to ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/Implies diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S b/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S similarity index 100% rename from sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S rename to ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/ld.abilist b/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/ld.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/ld.abilist rename to ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/ld.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libBrokenLocale.abilist b/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libBrokenLocale.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libBrokenLocale.abilist rename to ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libBrokenLocale.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libanl.abilist b/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libanl.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libanl.abilist rename to ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libanl.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist rename to ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libcrypt.abilist b/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libcrypt.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libcrypt.abilist rename to ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libcrypt.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libdl.abilist b/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libdl.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libdl.abilist rename to ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libdl.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libm.abilist b/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libm.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libm.abilist rename to ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libm.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libnsl.abilist b/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libnsl.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libnsl.abilist rename to ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libnsl.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libpthread.abilist b/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libpthread.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libpthread.abilist rename to ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libpthread.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libresolv.abilist b/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libresolv.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libresolv.abilist rename to ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libresolv.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/librt.abilist b/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/librt.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/librt.abilist rename to ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/librt.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libthread_db.abilist b/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libthread_db.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libthread_db.abilist rename to ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libthread_db.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libutil.abilist b/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libutil.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libutil.abilist rename to ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libutil.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S b/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S similarity index 100% rename from sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S rename to ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/swapcontext.S b/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/swapcontext.S similarity index 100% rename from sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/swapcontext.S rename to ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/swapcontext.S diff --git a/sysdeps/unix/sysv/linux/tile/Makefile b/ports/sysdeps/unix/sysv/linux/tile/Makefile similarity index 100% rename from sysdeps/unix/sysv/linux/tile/Makefile rename to ports/sysdeps/unix/sysv/linux/tile/Makefile diff --git a/sysdeps/unix/sysv/linux/tile/Versions b/ports/sysdeps/unix/sysv/linux/tile/Versions similarity index 100% rename from sysdeps/unix/sysv/linux/tile/Versions rename to ports/sysdeps/unix/sysv/linux/tile/Versions diff --git a/sysdeps/unix/sysv/linux/tile/bits/environments.h b/ports/sysdeps/unix/sysv/linux/tile/bits/environments.h similarity index 100% rename from sysdeps/unix/sysv/linux/tile/bits/environments.h rename to ports/sysdeps/unix/sysv/linux/tile/bits/environments.h diff --git a/sysdeps/unix/sysv/linux/tile/bits/local_lim.h b/ports/sysdeps/unix/sysv/linux/tile/bits/local_lim.h similarity index 100% rename from sysdeps/unix/sysv/linux/tile/bits/local_lim.h rename to ports/sysdeps/unix/sysv/linux/tile/bits/local_lim.h diff --git a/sysdeps/unix/sysv/linux/tile/bits/mman.h b/ports/sysdeps/unix/sysv/linux/tile/bits/mman.h similarity index 100% rename from sysdeps/unix/sysv/linux/tile/bits/mman.h rename to ports/sysdeps/unix/sysv/linux/tile/bits/mman.h diff --git a/sysdeps/unix/sysv/linux/tile/bits/sigaction.h b/ports/sysdeps/unix/sysv/linux/tile/bits/sigaction.h similarity index 100% rename from sysdeps/unix/sysv/linux/tile/bits/sigaction.h rename to ports/sysdeps/unix/sysv/linux/tile/bits/sigaction.h diff --git a/sysdeps/unix/sysv/linux/tile/bits/siginfo.h b/ports/sysdeps/unix/sysv/linux/tile/bits/siginfo.h similarity index 100% rename from sysdeps/unix/sysv/linux/tile/bits/siginfo.h rename to ports/sysdeps/unix/sysv/linux/tile/bits/siginfo.h diff --git a/sysdeps/unix/sysv/linux/tile/cacheflush.c b/ports/sysdeps/unix/sysv/linux/tile/cacheflush.c similarity index 100% rename from sysdeps/unix/sysv/linux/tile/cacheflush.c rename to ports/sysdeps/unix/sysv/linux/tile/cacheflush.c diff --git a/sysdeps/unix/sysv/linux/tile/configure b/ports/sysdeps/unix/sysv/linux/tile/configure similarity index 100% rename from sysdeps/unix/sysv/linux/tile/configure rename to ports/sysdeps/unix/sysv/linux/tile/configure diff --git a/sysdeps/unix/sysv/linux/tile/configure.in b/ports/sysdeps/unix/sysv/linux/tile/configure.in similarity index 100% rename from sysdeps/unix/sysv/linux/tile/configure.in rename to ports/sysdeps/unix/sysv/linux/tile/configure.in diff --git a/sysdeps/unix/sysv/linux/tile/getcontext.S b/ports/sysdeps/unix/sysv/linux/tile/getcontext.S similarity index 100% rename from sysdeps/unix/sysv/linux/tile/getcontext.S rename to ports/sysdeps/unix/sysv/linux/tile/getcontext.S diff --git a/sysdeps/unix/sysv/linux/tile/kernel-features.h b/ports/sysdeps/unix/sysv/linux/tile/kernel-features.h similarity index 100% rename from sysdeps/unix/sysv/linux/tile/kernel-features.h rename to ports/sysdeps/unix/sysv/linux/tile/kernel-features.h diff --git a/sysdeps/unix/sysv/linux/tile/makecontext.c b/ports/sysdeps/unix/sysv/linux/tile/makecontext.c similarity index 100% rename from sysdeps/unix/sysv/linux/tile/makecontext.c rename to ports/sysdeps/unix/sysv/linux/tile/makecontext.c diff --git a/sysdeps/unix/sysv/linux/tile/nptl/Makefile b/ports/sysdeps/unix/sysv/linux/tile/nptl/Makefile similarity index 100% rename from sysdeps/unix/sysv/linux/tile/nptl/Makefile rename to ports/sysdeps/unix/sysv/linux/tile/nptl/Makefile diff --git a/sysdeps/unix/sysv/linux/tile/nptl/bits/pthreadtypes.h b/ports/sysdeps/unix/sysv/linux/tile/nptl/bits/pthreadtypes.h similarity index 100% rename from sysdeps/unix/sysv/linux/tile/nptl/bits/pthreadtypes.h rename to ports/sysdeps/unix/sysv/linux/tile/nptl/bits/pthreadtypes.h diff --git a/sysdeps/unix/sysv/linux/tile/nptl/bits/semaphore.h b/ports/sysdeps/unix/sysv/linux/tile/nptl/bits/semaphore.h similarity index 100% rename from sysdeps/unix/sysv/linux/tile/nptl/bits/semaphore.h rename to ports/sysdeps/unix/sysv/linux/tile/nptl/bits/semaphore.h diff --git a/sysdeps/unix/sysv/linux/tile/nptl/clone.S b/ports/sysdeps/unix/sysv/linux/tile/nptl/clone.S similarity index 100% rename from sysdeps/unix/sysv/linux/tile/nptl/clone.S rename to ports/sysdeps/unix/sysv/linux/tile/nptl/clone.S diff --git a/sysdeps/unix/sysv/linux/tile/nptl/createthread.c b/ports/sysdeps/unix/sysv/linux/tile/nptl/createthread.c similarity index 100% rename from sysdeps/unix/sysv/linux/tile/nptl/createthread.c rename to ports/sysdeps/unix/sysv/linux/tile/nptl/createthread.c diff --git a/sysdeps/unix/sysv/linux/tile/nptl/fork.c b/ports/sysdeps/unix/sysv/linux/tile/nptl/fork.c similarity index 100% rename from sysdeps/unix/sysv/linux/tile/nptl/fork.c rename to ports/sysdeps/unix/sysv/linux/tile/nptl/fork.c diff --git a/sysdeps/unix/sysv/linux/tile/nptl/lowlevellock.h b/ports/sysdeps/unix/sysv/linux/tile/nptl/lowlevellock.h similarity index 100% rename from sysdeps/unix/sysv/linux/tile/nptl/lowlevellock.h rename to ports/sysdeps/unix/sysv/linux/tile/nptl/lowlevellock.h diff --git a/sysdeps/unix/sysv/linux/tile/nptl/pt-vfork.S b/ports/sysdeps/unix/sysv/linux/tile/nptl/pt-vfork.S similarity index 100% rename from sysdeps/unix/sysv/linux/tile/nptl/pt-vfork.S rename to ports/sysdeps/unix/sysv/linux/tile/nptl/pt-vfork.S diff --git a/sysdeps/unix/sysv/linux/tile/nptl/pthread_once.c b/ports/sysdeps/unix/sysv/linux/tile/nptl/pthread_once.c similarity index 100% rename from sysdeps/unix/sysv/linux/tile/nptl/pthread_once.c rename to ports/sysdeps/unix/sysv/linux/tile/nptl/pthread_once.c diff --git a/sysdeps/unix/sysv/linux/tile/nptl/sysdep-cancel.h b/ports/sysdeps/unix/sysv/linux/tile/nptl/sysdep-cancel.h similarity index 100% rename from sysdeps/unix/sysv/linux/tile/nptl/sysdep-cancel.h rename to ports/sysdeps/unix/sysv/linux/tile/nptl/sysdep-cancel.h diff --git a/sysdeps/unix/sysv/linux/tile/nptl/vfork.S b/ports/sysdeps/unix/sysv/linux/tile/nptl/vfork.S similarity index 100% rename from sysdeps/unix/sysv/linux/tile/nptl/vfork.S rename to ports/sysdeps/unix/sysv/linux/tile/nptl/vfork.S diff --git a/sysdeps/unix/sysv/linux/tile/nptl/waitpid.S b/ports/sysdeps/unix/sysv/linux/tile/nptl/waitpid.S similarity index 100% rename from sysdeps/unix/sysv/linux/tile/nptl/waitpid.S rename to ports/sysdeps/unix/sysv/linux/tile/nptl/waitpid.S diff --git a/sysdeps/unix/sysv/linux/tile/profil-counter.h b/ports/sysdeps/unix/sysv/linux/tile/profil-counter.h similarity index 100% rename from sysdeps/unix/sysv/linux/tile/profil-counter.h rename to ports/sysdeps/unix/sysv/linux/tile/profil-counter.h diff --git a/sysdeps/unix/sysv/linux/tile/set_dataplane.c b/ports/sysdeps/unix/sysv/linux/tile/set_dataplane.c similarity index 100% rename from sysdeps/unix/sysv/linux/tile/set_dataplane.c rename to ports/sysdeps/unix/sysv/linux/tile/set_dataplane.c diff --git a/sysdeps/unix/sysv/linux/tile/setcontext.S b/ports/sysdeps/unix/sysv/linux/tile/setcontext.S similarity index 100% rename from sysdeps/unix/sysv/linux/tile/setcontext.S rename to ports/sysdeps/unix/sysv/linux/tile/setcontext.S diff --git a/sysdeps/unix/sysv/linux/tile/sigcontextinfo.h b/ports/sysdeps/unix/sysv/linux/tile/sigcontextinfo.h similarity index 100% rename from sysdeps/unix/sysv/linux/tile/sigcontextinfo.h rename to ports/sysdeps/unix/sysv/linux/tile/sigcontextinfo.h diff --git a/sysdeps/unix/sysv/linux/tile/swapcontext.S b/ports/sysdeps/unix/sysv/linux/tile/swapcontext.S similarity index 100% rename from sysdeps/unix/sysv/linux/tile/swapcontext.S rename to ports/sysdeps/unix/sysv/linux/tile/swapcontext.S diff --git a/sysdeps/unix/sysv/linux/tile/sys/cachectl.h b/ports/sysdeps/unix/sysv/linux/tile/sys/cachectl.h similarity index 100% rename from sysdeps/unix/sysv/linux/tile/sys/cachectl.h rename to ports/sysdeps/unix/sysv/linux/tile/sys/cachectl.h diff --git a/sysdeps/unix/sysv/linux/tile/sys/dataplane.h b/ports/sysdeps/unix/sysv/linux/tile/sys/dataplane.h similarity index 100% rename from sysdeps/unix/sysv/linux/tile/sys/dataplane.h rename to ports/sysdeps/unix/sysv/linux/tile/sys/dataplane.h diff --git a/sysdeps/unix/sysv/linux/tile/sys/procfs.h b/ports/sysdeps/unix/sysv/linux/tile/sys/procfs.h similarity index 100% rename from sysdeps/unix/sysv/linux/tile/sys/procfs.h rename to ports/sysdeps/unix/sysv/linux/tile/sys/procfs.h diff --git a/sysdeps/unix/sysv/linux/tile/sys/ptrace.h b/ports/sysdeps/unix/sysv/linux/tile/sys/ptrace.h similarity index 100% rename from sysdeps/unix/sysv/linux/tile/sys/ptrace.h rename to ports/sysdeps/unix/sysv/linux/tile/sys/ptrace.h diff --git a/sysdeps/unix/sysv/linux/tile/sys/reg.h b/ports/sysdeps/unix/sysv/linux/tile/sys/reg.h similarity index 100% rename from sysdeps/unix/sysv/linux/tile/sys/reg.h rename to ports/sysdeps/unix/sysv/linux/tile/sys/reg.h diff --git a/sysdeps/unix/sysv/linux/tile/sys/ucontext.h b/ports/sysdeps/unix/sysv/linux/tile/sys/ucontext.h similarity index 100% rename from sysdeps/unix/sysv/linux/tile/sys/ucontext.h rename to ports/sysdeps/unix/sysv/linux/tile/sys/ucontext.h diff --git a/sysdeps/unix/sysv/linux/tile/sys/user.h b/ports/sysdeps/unix/sysv/linux/tile/sys/user.h similarity index 100% rename from sysdeps/unix/sysv/linux/tile/sys/user.h rename to ports/sysdeps/unix/sysv/linux/tile/sys/user.h diff --git a/sysdeps/unix/sysv/linux/tile/syscall.S b/ports/sysdeps/unix/sysv/linux/tile/syscall.S similarity index 100% rename from sysdeps/unix/sysv/linux/tile/syscall.S rename to ports/sysdeps/unix/sysv/linux/tile/syscall.S diff --git a/sysdeps/unix/sysv/linux/tile/sysdep.c b/ports/sysdeps/unix/sysv/linux/tile/sysdep.c similarity index 100% rename from sysdeps/unix/sysv/linux/tile/sysdep.c rename to ports/sysdeps/unix/sysv/linux/tile/sysdep.c diff --git a/sysdeps/unix/sysv/linux/tile/sysdep.h b/ports/sysdeps/unix/sysv/linux/tile/sysdep.h similarity index 100% rename from sysdeps/unix/sysv/linux/tile/sysdep.h rename to ports/sysdeps/unix/sysv/linux/tile/sysdep.h diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/Makefile b/ports/sysdeps/unix/sysv/linux/tile/tilegx/Makefile similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilegx/Makefile rename to ports/sysdeps/unix/sysv/linux/tile/tilegx/Makefile diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/ioctl.S b/ports/sysdeps/unix/sysv/linux/tile/tilegx/ioctl.S similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilegx/ioctl.S rename to ports/sysdeps/unix/sysv/linux/tile/tilegx/ioctl.S diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/ldconfig.h b/ports/sysdeps/unix/sysv/linux/tile/tilegx/ldconfig.h similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilegx/ldconfig.h rename to ports/sysdeps/unix/sysv/linux/tile/tilegx/ldconfig.h diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/register-dump.h b/ports/sysdeps/unix/sysv/linux/tile/tilegx/register-dump.h similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilegx/register-dump.h rename to ports/sysdeps/unix/sysv/linux/tile/tilegx/register-dump.h diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/Implies b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/Implies similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/Implies rename to ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/Implies diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/Makefile b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/Makefile similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/Makefile rename to ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/Makefile diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/ld.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/ld.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/ld.abilist rename to ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/ld.abilist diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libBrokenLocale.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libBrokenLocale.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libBrokenLocale.abilist rename to ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libBrokenLocale.abilist diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libanl.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libanl.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libanl.abilist rename to ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libanl.abilist diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libc.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libc.abilist rename to ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libc.abilist diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libcrypt.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libcrypt.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libcrypt.abilist rename to ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libcrypt.abilist diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libdl.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libdl.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libdl.abilist rename to ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libdl.abilist diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libm.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libm.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libm.abilist rename to ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libm.abilist diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libnsl.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libnsl.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libnsl.abilist rename to ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libnsl.abilist diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libpthread.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libpthread.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libpthread.abilist rename to ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libpthread.abilist diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libresolv.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libresolv.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libresolv.abilist rename to ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libresolv.abilist diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/librt.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/librt.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/librt.abilist rename to ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/librt.abilist diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libthread_db.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libthread_db.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libthread_db.abilist rename to ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libthread_db.abilist diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libutil.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libutil.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libutil.abilist rename to ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libutil.abilist diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/Implies b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/Implies similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/Implies rename to ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/Implies diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/Makefile b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/Makefile similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/Makefile rename to ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/Makefile diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/ld.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/ld.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/ld.abilist rename to ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/ld.abilist diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libBrokenLocale.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libBrokenLocale.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libBrokenLocale.abilist rename to ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libBrokenLocale.abilist diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libanl.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libanl.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libanl.abilist rename to ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libanl.abilist diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libc.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libc.abilist rename to ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libc.abilist diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libcrypt.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libcrypt.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libcrypt.abilist rename to ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libcrypt.abilist diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libdl.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libdl.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libdl.abilist rename to ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libdl.abilist diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libm.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libm.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libm.abilist rename to ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libm.abilist diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libnsl.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libnsl.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libnsl.abilist rename to ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libnsl.abilist diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libpthread.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libpthread.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libpthread.abilist rename to ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libpthread.abilist diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libresolv.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libresolv.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libresolv.abilist rename to ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libresolv.abilist diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/librt.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/librt.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/librt.abilist rename to ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/librt.abilist diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libthread_db.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libthread_db.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libthread_db.abilist rename to ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libthread_db.abilist diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libutil.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libutil.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libutil.abilist rename to ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libutil.abilist diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/Implies b/ports/sysdeps/unix/sysv/linux/tile/tilepro/Implies similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilepro/Implies rename to ports/sysdeps/unix/sysv/linux/tile/tilepro/Implies diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/ldconfig.h b/ports/sysdeps/unix/sysv/linux/tile/tilepro/ldconfig.h similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilepro/ldconfig.h rename to ports/sysdeps/unix/sysv/linux/tile/tilepro/ldconfig.h diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/nptl/ld.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/ld.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilepro/nptl/ld.abilist rename to ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/ld.abilist diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libBrokenLocale.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libBrokenLocale.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilepro/nptl/libBrokenLocale.abilist rename to ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libBrokenLocale.abilist diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libanl.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libanl.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilepro/nptl/libanl.abilist rename to ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libanl.abilist diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libc.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilepro/nptl/libc.abilist rename to ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libc.abilist diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libcrypt.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libcrypt.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilepro/nptl/libcrypt.abilist rename to ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libcrypt.abilist diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libdl.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libdl.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilepro/nptl/libdl.abilist rename to ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libdl.abilist diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libm.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libm.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilepro/nptl/libm.abilist rename to ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libm.abilist diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libnsl.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libnsl.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilepro/nptl/libnsl.abilist rename to ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libnsl.abilist diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libpthread.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libpthread.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilepro/nptl/libpthread.abilist rename to ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libpthread.abilist diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libresolv.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libresolv.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilepro/nptl/libresolv.abilist rename to ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libresolv.abilist diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/nptl/librt.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/librt.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilepro/nptl/librt.abilist rename to ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/librt.abilist diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libthread_db.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libthread_db.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilepro/nptl/libthread_db.abilist rename to ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libthread_db.abilist diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libutil.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libutil.abilist similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilepro/nptl/libutil.abilist rename to ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libutil.abilist diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/register-dump.h b/ports/sysdeps/unix/sysv/linux/tile/tilepro/register-dump.h similarity index 100% rename from sysdeps/unix/sysv/linux/tile/tilepro/register-dump.h rename to ports/sysdeps/unix/sysv/linux/tile/tilepro/register-dump.h diff --git a/sysdeps/unix/sysv/linux/tile/ucontext_i.h b/ports/sysdeps/unix/sysv/linux/tile/ucontext_i.h similarity index 100% rename from sysdeps/unix/sysv/linux/tile/ucontext_i.h rename to ports/sysdeps/unix/sysv/linux/tile/ucontext_i.h